import{S as W,i as X,s as U,E as R,k as I,a as j,l as P,m as V,c as H,h as p,n as M,H as E,I as J,b as L,J as D,K as q,g as k,v as y,d as T,f as w,O as ie,P as ae,D as K,ad as Ve,ac as Ge,R as le,F as se,G as re,L as oe,M as ue,N as fe,Q as B,w as O,q as Y,r as Z,u as ce,a1 as x,C as Me,T as Re,o as je,a4 as _e,ap as He,U as $,y as F,z as A,A as C,V as ee,B as G,e as Q,a5 as qe,a3 as ze}from"../chunks/index.c7ccf096.js";import{T as de,x as Je,y as Ke,z as Oe,g as Ue,o as Qe,I as Ne,S as We,J as Xe}from"../chunks/utils.d5b83cd1.js";import{P as Ye}from"../chunks/Page.c565e4f4.js";import{d as Be}from"../chunks/taskQueries.d9517cd8.js";import{C as Ze}from"../chunks/ComboBox.259d7948.js";import{w as ye,B as we}from"../chunks/taskMonitoringStore.a15b9cd5.js";import{w as Fe}from"../chunks/index.273e036c.js";const xe=l=>({}),he=l=>({});function be(l){let e,t;const n=l[16].labelText,i=re(n,l,l[15],he),s=i||$e(l);return{c(){e=I("span"),s&&s.c(),this.h()},l(a){e=P(a,"SPAN",{});var o=V(e);s&&s.l(o),o.forEach(p),this.h()},h(){E(e,"bx--visually-hidden",l[7])},m(a,o){L(a,e,o),s&&s.m(e,null),t=!0},p(a,o){i?i.p&&(!t||o&32768)&&oe(i,n,a,a[15],t?fe(n,a[15],o,xe):ue(a[15]),he):s&&s.p&&(!t||o&64)&&s.p(a,t?o:-1),(!t||o&128)&&E(e,"bx--visually-hidden",a[7])},i(a){t||(k(s,a),t=!0)},o(a){T(s,a),t=!1},d(a){a&&p(e),s&&s.d(a)}}}function $e(l){let e;return{c(){e=Y(l[6])},l(t){e=Z(t,l[6])},m(t,n){L(t,e,n)},p(t,n){n&64&&ce(e,t[6])},d(t){t&&p(e)}}}function et(l){let e,t,n,i,s,a,o,r,u,d=(l[6]||l[13].labelText)&&be(l),h=[l[12]],c={};for(let m=0;m{d=null}),w()),(!o||v&256)&&M(i,"for",m[8]),J(e,c=ie(h,[v&4096&&m[12]])),E(e,"bx--radio-button-wrapper",!0),E(e,"bx--radio-button-wrapper--label-left",m[5]==="left")},i(m){o||(k(d),o=!0)},o(m){T(d),o=!1},d(m){m&&p(e),l[18](null),d&&d.d(),r=!1,ae(u)}}}function tt(l,e,t){const n=["value","checked","disabled","required","labelPosition","labelText","hideLabel","id","name","ref"];let i=K(e,n),s,{$$slots:a={},$$scope:o}=e;const r=Ve(a);let{value:u=""}=e,{checked:d=!1}=e,{disabled:h=!1}=e,{required:c=!1}=e,{labelPosition:m="right"}=e,{labelText:v=""}=e,{hideLabel:f=!1}=e,{id:b="ccs-"+Math.random().toString(36)}=e,{name:_=""}=e,{ref:N=null}=e;const z=Ge("RadioButtonGroup"),te=z?z.selectedValue:Fe(d?u:void 0);le(l,te,S=>t(14,s=S)),z&&z.add({id:b,checked:d,disabled:h,value:u});function ne(S){B.call(this,l,S)}function g(S){O[S?"unshift":"push"](()=>{N=S,t(1,N)})}const me=()=>{z&&z.update(u)};return l.$$set=S=>{e=R(R({},e),se(S)),t(12,i=K(e,n)),"value"in S&&t(2,u=S.value),"checked"in S&&t(0,d=S.checked),"disabled"in S&&t(3,h=S.disabled),"required"in S&&t(4,c=S.required),"labelPosition"in S&&t(5,m=S.labelPosition),"labelText"in S&&t(6,v=S.labelText),"hideLabel"in S&&t(7,f=S.hideLabel),"id"in S&&t(8,b=S.id),"name"in S&&t(9,_=S.name),"ref"in S&&t(1,N=S.ref),"$$scope"in S&&t(15,o=S.$$scope)},l.$$.update=()=>{l.$$.dirty&16388&&t(0,d=s===u)},[d,N,u,h,c,m,v,f,b,_,z,te,i,r,s,o,a,ne,g,me]}class lt extends W{constructor(e){super(),X(this,e,tt,et,U,{value:2,checked:0,disabled:3,required:4,labelPosition:5,labelText:6,hideLabel:7,id:8,name:9,ref:1})}}const nt=lt;function it(l){let e,t,n,i;const s=l[3].default,a=re(s,l,l[2],null);let o=[l[1]],r={};for(let u=0;u{o=f,t(0,o)})}return l.$$set=f=>{e=R(R({},e),se(f)),t(1,i=K(e,n)),"ref"in f&&t(0,o=f.ref),"$$scope"in f&&t(2,a=f.$$scope)},[o,i,a,s,r,u,d,h,c,m,v]}class st extends W{constructor(e){super(),X(this,e,at,it,U,{ref:0})}}const rt=st;function ge(l){let e,t,n;return{c(){e=I("legend"),t=Y(l[4]),this.h()},l(i){e=P(i,"LEGEND",{id:!0});var s=V(e);t=Z(s,l[4]),s.forEach(p),this.h()},h(){M(e,"id",n=l[5]||l[6]["aria-labelledby"]),E(e,"bx--label",!0)},m(i,s){L(i,e,s),D(e,t)},p(i,s){s&16&&ce(t,i[4]),s&96&&n!==(n=i[5]||i[6]["aria-labelledby"])&&M(e,"id",n)},d(i){i&&p(e)}}}function ve(l){let e,t;return{c(){e=I("div"),t=Y(l[3]),this.h()},l(n){e=P(n,"DIV",{});var i=V(e);t=Z(i,l[3]),i.forEach(p),this.h()},h(){E(e,"bx--form__requirement",!0)},m(n,i){L(n,e,i),D(e,t)},p(n,i){i&8&&ce(t,n[3])},d(n){n&&p(e)}}}function ot(l){let e,t,n,i,s,a,o,r,u=l[4]&&ge(l);const d=l[8].default,h=re(d,l,l[7],null);let c=l[2]&&ve(l),m=[{"data-invalid":i=l[1]||void 0},{"aria-labelledby":s=l[6]["aria-labelledby"]||l[5]},l[6]],v={};for(let f=0;f{e=R(R({},e),se(_)),t(6,i=K(e,n)),"noMargin"in _&&t(0,o=_.noMargin),"invalid"in _&&t(1,r=_.invalid),"message"in _&&t(2,u=_.message),"messageText"in _&&t(3,d=_.messageText),"legendText"in _&&t(4,h=_.legendText),"legendId"in _&&t(5,c=_.legendId),"$$scope"in _&&t(7,a=_.$$scope)},[o,r,u,d,h,c,i,a,s,m,v,f,b]}class ft extends W{constructor(e){super(),X(this,e,ut,ot,U,{noMargin:0,invalid:1,message:2,messageText:3,legendText:4,legendId:5})}}const pe=ft;function dt(l){let e,t,n,i,s,a,o=[l[0]],r={};for(let u=0;u{e=R(R({},e),se(u)),t(0,i=K(e,n))},[i,s,a,o,r]}class mt extends W{constructor(e){super(),X(this,e,ct,dt,U,{})}}const _t=mt,ht=l=>({}),ke=l=>({});function Te(l){let e,t;const n=l[11].legendText,i=re(n,l,l[10],ke),s=i||bt(l);return{c(){e=I("legend"),s&&s.c(),this.h()},l(a){e=P(a,"LEGEND",{});var o=V(e);s&&s.l(o),o.forEach(p),this.h()},h(){E(e,"bx--label",!0),E(e,"bx--visually-hidden",l[2])},m(a,o){L(a,e,o),s&&s.m(e,null),t=!0},p(a,o){i?i.p&&(!t||o&1024)&&oe(i,n,a,a[10],t?fe(n,a[10],o,ht):ue(a[10]),ke):s&&s.p&&(!t||o&2)&&s.p(a,t?o:-1),(!t||o&4)&&E(e,"bx--visually-hidden",a[2])},i(a){t||(k(s,a),t=!0)},o(a){T(s,a),t=!1},d(a){a&&p(e),s&&s.d(a)}}}function bt(l){let e;return{c(){e=Y(l[1])},l(t){e=Z(t,l[1])},m(t,n){L(t,e,n)},p(t,n){n&2&&ce(e,t[1])},d(t){t&&p(e)}}}function gt(l){let e,t,n,i,s,a,o=(l[1]||l[8].legendText)&&Te(l);const r=l[11].default,u=re(r,l,l[10],null);let d=[{id:l[5]},l[7]],h={};for(let c=0;c{o=null}),w()),u&&u.p&&(!i||m&1024)&&oe(u,r,c,c[10],i?fe(r,c[10],m,null):ue(c[10]),null),(!i||m&1)&&(t.disabled=c[0]),(!i||m&16)&&E(t,"bx--radio-button-group--vertical",c[4]==="vertical"),(!i||m&8)&&E(t,"bx--radio-button-group--label-left",c[3]==="left"),(!i||m&8)&&E(t,"bx--radio-button-group--label-right",c[3]==="right"),J(e,h=ie(d,[(!i||m&32)&&{id:c[5]},m&128&&c[7]])),E(e,"bx--form-item",!0)},i(c){i||(k(o),k(u,c),i=!0)},o(c){T(o),T(u,c),i=!1},d(c){c&&p(e),o&&o.d(),u&&u.d(c),s=!1,ae(a)}}}function vt(l,e,t){const n=["selected","disabled","legendText","hideLegend","labelPosition","orientation","id"];let i=K(e,n),s,{$$slots:a={},$$scope:o}=e;const r=Ve(a);let{selected:u=void 0}=e,{disabled:d=!1}=e,{legendText:h=""}=e,{hideLegend:c=!1}=e,{labelPosition:m="right"}=e,{orientation:v="horizontal"}=e,{id:f=void 0}=e;const b=Me(),_=Fe(u);le(l,_,g=>t(16,s=g)),Re("RadioButtonGroup",{selectedValue:_,add:({checked:g,value:me})=>{g&&_.set(me)},update:g=>{t(9,u=g)}}),je(()=>{_e(_,s=u,s)}),He(()=>{_e(_,s=u,s)}),_.subscribe(g=>{t(9,u=g),b("change",g)});function N(g){B.call(this,l,g)}function z(g){B.call(this,l,g)}function te(g){B.call(this,l,g)}function ne(g){B.call(this,l,g)}return l.$$set=g=>{e=R(R({},e),se(g)),t(7,i=K(e,n)),"selected"in g&&t(9,u=g.selected),"disabled"in g&&t(0,d=g.disabled),"legendText"in g&&t(1,h=g.legendText),"hideLegend"in g&&t(2,c=g.hideLegend),"labelPosition"in g&&t(3,m=g.labelPosition),"orientation"in g&&t(4,v=g.orientation),"id"in g&&t(5,f=g.id),"$$scope"in g&&t(10,o=g.$$scope)},[d,h,c,m,v,f,_,i,r,u,o,a,N,z,te,ne]}class pt extends W{constructor(e){super(),X(this,e,vt,gt,U,{selected:9,disabled:0,legendText:1,hideLegend:2,labelPosition:3,orientation:4,id:5})}}const kt=pt,Ae="huggingface",Ce=()=>Be({queryFn:()=>fetch("https://datasets-server.huggingface.co/valid").then(l=>l.json()),queryKey:[Ae,"listDatasets"],select:l=>l.valid}),Tt=l=>Be({queryFn:()=>fetch(`https://datasets-server.huggingface.co/splits?dataset=${l}`).then(e=>e.json()),queryKey:[Ae,"getSplits",l],select:e=>e.splits});function Et(l){let e,t,n;function i(a){l[6](a)}let s={invalid:l[1],invalidText:l[2],warn:!l[3],warnText:"Dataset doesn't exist"};return l[0]!==void 0&&(s.value=l[0]),e=new de({props:s}),O.push(()=>$(e,"value",i)),{c(){F(e.$$.fragment)},l(a){A(e.$$.fragment,a)},m(a,o){C(e,a,o),n=!0},p(a,[o]){const r={};o&2&&(r.invalid=a[1]),o&4&&(r.invalidText=a[2]),o&8&&(r.warn=!a[3]),!t&&o&1&&(t=!0,r.value=a[0],ee(()=>t=!1)),e.$set(r)},i(a){n||(k(e.$$.fragment,a),n=!0)},o(a){T(e.$$.fragment,a),n=!1},d(a){G(e,a)}}}function St(l,e,t){let n,i,{value:s}=e,{invalid:a}=e,{invalidText:o}=e;const r=Ce();le(l,r,d=>t(5,i=d));function u(d){s=d,t(0,s)}return l.$$set=d=>{"value"in d&&t(0,s=d.value),"invalid"in d&&t(1,a=d.invalid),"invalidText"in d&&t(2,o=d.invalidText)},l.$$.update=()=>{var d;l.$$.dirty&33&&t(3,n=(d=i.data)==null?void 0:d.includes(s))},[s,a,o,n,r,i,u]}class Ee extends W{constructor(e){super(),X(this,e,St,Et,U,{value:0,invalid:1,invalidText:2})}}function Dt(l){let e,t,n;function i(a){l[11](a)}let s={invalid:l[1],invalidText:l[2],labelText:"Split",placeholder:"(optional)"};return l[0]!==void 0&&(s.value=l[0]),e=new de({props:s}),O.push(()=>$(e,"value",i)),{c(){F(e.$$.fragment)},l(a){A(e.$$.fragment,a)},m(a,o){C(e,a,o),n=!0},p(a,o){const r={};o&2&&(r.invalid=a[1]),o&4&&(r.invalidText=a[2]),!t&&o&1&&(t=!0,r.value=a[0],ee(()=>t=!1)),e.$set(r)},i(a){n||(k(e.$$.fragment,a),n=!0)},o(a){T(e.$$.fragment,a),n=!1},d(a){G(e,a)}}}function It(l){var n,i;let e,t;return e=new Ze({props:{value:l[0]||"",invalid:l[1],invalidText:l[2],warn:!l[3],warnText:"Dataset doesn't exist",titleText:"Split",placeholder:"(optional)",items:((i=(n=l[5])==null?void 0:n.data)==null?void 0:i.map(Se))||[]}}),e.$on("select",l[10]),{c(){F(e.$$.fragment)},l(s){A(e.$$.fragment,s)},m(s,a){C(e,s,a),t=!0},p(s,a){var r,u;const o={};a&1&&(o.value=s[0]||""),a&2&&(o.invalid=s[1]),a&4&&(o.invalidText=s[2]),a&8&&(o.warn=!s[3]),a&32&&(o.items=((u=(r=s[5])==null?void 0:r.data)==null?void 0:u.map(Se))||[]),e.$set(o)},i(s){t||(k(e.$$.fragment,s),t=!0)},o(s){T(e.$$.fragment,s),t=!1},d(s){G(e,s)}}}function Pt(l){let e,t,n,i;const s=[It,Dt],a=[];function o(r,u){var d;return(d=r[5])!=null&&d.data&&r[3]?0:1}return e=o(l),t=a[e]=s[e](l),{c(){t.c(),n=Q()},l(r){t.l(r),n=Q()},m(r,u){a[e].m(r,u),L(r,n,u),i=!0},p(r,[u]){let d=e;e=o(r),e===d?a[e].p(r,u):(y(),T(a[d],1,1,()=>{a[d]=null}),w(),t=a[e],t?t.p(r,u):(t=a[e]=s[e](r),t.c()),k(t,1),t.m(n.parentNode,n))},i(r){i||(k(t),i=!0)},o(r){T(t),i=!1},d(r){a[e].d(r),r&&p(n)}}}const Se=l=>({id:l.split,text:l.split});function Lt(l,e,t){let n,i,s,a,o,r=x,u=()=>(r(),r=qe(s,_=>t(5,o=_)),s);l.$$.on_destroy.push(()=>r());let{value:d}=e,{invalid:h}=e,{invalidText:c}=e,{rootValue:m}=e;const v=Ce();le(l,v,_=>t(9,a=_));const f=_=>{var N;return t(0,d=(N=_.detail.selectedItem)==null?void 0:N.id)};function b(_){d=_,t(0,d)}return l.$$set=_=>{"value"in _&&t(0,d=_.value),"invalid"in _&&t(1,h=_.invalid),"invalidText"in _&&t(2,c=_.invalidText),"rootValue"in _&&t(7,m=_.rootValue)},l.$$.update=()=>{var _;l.$$.dirty&128&&t(8,n=m.dataset_name),l.$$.dirty&768&&t(3,i=(_=a.data)==null?void 0:_.includes(n)),l.$$.dirty&264&&u(t(4,s=i?Tt(n):void 0))},[d,h,c,i,s,o,v,m,n,a,f,b]}class De extends W{constructor(e){super(),X(this,e,Lt,Pt,U,{value:0,invalid:1,invalidText:2,rootValue:7})}}function Vt(l){const e=l.slice(),t=e[7].data;return e[17]=t,e}function Ie(l,e,t){const n=l.slice();return n[18]=e[t],n}function qt(l){let e,t,n,i,s,a,o,r,u,d;function h(f){l[11](f)}let c={labelText:"namespace",invalid:!l[0]};l[0]!==void 0&&(c.value=l[0]),t=new de({props:c}),O.push(()=>$(t,"value",h));function m(f){l[12](f)}let v={labelText:"name",invalid:!l[1]};return l[1]!==void 0&&(v.value=l[1]),r=new de({props:v}),O.push(()=>$(r,"value",m)),{c(){e=I("div"),F(t.$$.fragment),i=j(),s=I("span"),a=Y("/"),o=j(),F(r.$$.fragment),this.h()},l(f){e=P(f,"DIV",{class:!0});var b=V(e);A(t.$$.fragment,b),i=H(b),s=P(b,"SPAN",{class:!0});var _=V(s);a=Z(_,"/"),_.forEach(p),o=H(b),A(r.$$.fragment,b),b.forEach(p),this.h()},h(){M(s,"class","mx-4 mt-6 text-lg"),M(e,"class","flex flex-row content-start")},m(f,b){L(f,e,b),C(t,e,null),D(e,i),D(e,s),D(s,a),D(e,o),C(r,e,null),d=!0},p(f,b){const _={};b&1&&(_.invalid=!f[0]),!n&&b&1&&(n=!0,_.value=f[0],ee(()=>n=!1)),t.$set(_);const N={};b&2&&(N.invalid=!f[1]),!u&&b&2&&(u=!0,N.value=f[1],ee(()=>u=!1)),r.$set(N)},i(f){d||(k(t.$$.fragment,f),k(r.$$.fragment,f),d=!0)},o(f){T(t.$$.fragment,f),T(r.$$.fragment,f),d=!1},d(f){f&&p(e),G(t),G(r)}}}function Nt(l){let e,t;return e=new _t({}),{c(){F(e.$$.fragment)},l(n){A(e.$$.fragment,n)},m(n,i){C(e,n,i),t=!0},p:x,i(n){t||(k(e.$$.fragment,n),t=!0)},o(n){T(e.$$.fragment,n),t=!1},d(n){G(e,n)}}}function Bt(l){let e,t;return e=new Ne({props:{kind:"error",title:"Error",subtitle:l[6].error.message,hideCloseButton:!0}}),{c(){F(e.$$.fragment)},l(n){A(e.$$.fragment,n)},m(n,i){C(e,n,i),t=!0},p(n,i){const s={};i&64&&(s.subtitle=n[6].error.message),e.$set(s)},i(n){t||(k(e.$$.fragment,n),t=!0)},o(n){T(e.$$.fragment,n),t=!1},d(n){G(e,n)}}}function Ft(l){let e,t,n,i;function s(o){l[13](o)}let a={$$slots:{default:[At]},$$scope:{ctx:l}};return l[2]!==void 0&&(a.selected=l[2]),t=new kt({props:a}),O.push(()=>$(t,"selected",s)),{c(){e=I("div"),F(t.$$.fragment)},l(o){e=P(o,"DIV",{});var r=V(e);A(t.$$.fragment,r),r.forEach(p)},m(o,r){L(o,e,r),C(t,e,null),i=!0},p(o,r){const u={};r&2097216&&(u.$$scope={dirty:r,ctx:o}),!n&&r&4&&(n=!0,u.selected=o[2],ee(()=>n=!1)),t.$set(u)},i(o){i||(k(t.$$.fragment,o),i=!0)},o(o){T(t.$$.fragment,o),i=!1},d(o){o&&p(e),G(t)}}}function Pe(l){let e,t;return e=new nt({props:{labelText:l[18],value:l[18]}}),{c(){F(e.$$.fragment)},l(n){A(e.$$.fragment,n)},m(n,i){C(e,n,i),t=!0},p(n,i){const s={};i&64&&(s.labelText=n[18]),i&64&&(s.value=n[18]),e.$set(s)},i(n){t||(k(e.$$.fragment,n),t=!0)},o(n){T(e.$$.fragment,n),t=!1},d(n){G(e,n)}}}function At(l){let e,t,n=l[6].data.sources,i=[];for(let a=0;aT(i[a],1,1,()=>{i[a]=null});return{c(){for(let a=0;a$(e,"value",s)),O.push(()=>$(e,"validationErrors",a)),{c(){F(e.$$.fragment)},l(r){A(e.$$.fragment,r)},m(r,u){C(e,r,u),i=!0},p(r,u){const d={};u&128&&(d.schema=r[17]),u&4&&(d.customComponents=r[2]==="huggingface"?{"/dataset_name":Ee,"/split":De}:{}),!t&&u&16&&(t=!0,d.value=r[4],ee(()=>t=!1)),!n&&u&8&&(n=!0,d.validationErrors=r[3],ee(()=>n=!1)),e.$set(d)},i(r){i||(k(e.$$.fragment,r),i=!0)},o(r){T(e.$$.fragment,r),i=!1},d(r){G(e,r)}}}function Rt(l){let e,t,n,i,s,a,o;const r=[Ft,Bt,Nt],u=[];function d(f,b){return f[6].isSuccess?0:f[6].isError?1:f[6].isLoading?2:-1}~(e=d(l))&&(t=u[e]=r[e](l));const h=[Mt,Gt,Ct],c=[];function m(f,b){return f[7].isSuccess?0:f[7].isError?1:f[7].isLoading?2:-1}function v(f,b){return b===0?Vt(f):f}return~(i=m(l))&&(s=c[i]=h[i](v(l,i))),{c(){t&&t.c(),n=j(),s&&s.c(),a=Q()},l(f){t&&t.l(f),n=H(f),s&&s.l(f),a=Q()},m(f,b){~e&&u[e].m(f,b),L(f,n,b),~i&&c[i].m(f,b),L(f,a,b),o=!0},p(f,b){let _=e;e=d(f),e===_?~e&&u[e].p(f,b):(t&&(y(),T(u[_],1,1,()=>{u[_]=null}),w()),~e?(t=u[e],t?t.p(f,b):(t=u[e]=r[e](f),t.c()),k(t,1),t.m(n.parentNode,n)):t=null);let N=i;i=m(f),i===N?~i&&c[i].p(v(f,i),b):(s&&(y(),T(c[N],1,1,()=>{c[N]=null}),w()),~i?(s=c[i],s?s.p(v(f,i),b):(s=c[i]=h[i](v(f,i)),s.c()),k(s,1),s.m(a.parentNode,a)):s=null)},i(f){o||(k(t),k(s),o=!0)},o(f){T(t),T(s),o=!1},d(f){~e&&u[e].d(f),f&&p(n),~i&&c[i].d(f),f&&p(a)}}}function jt(l){let e;return{c(){e=Y("Add")},l(t){e=Z(t,"Add")},m(t,n){L(t,e,n)},d(t){t&&p(e)}}}function Ht(l){var o;let e,t,n,i,s,a;return e=new pe({props:{legendText:"Name",$$slots:{default:[qt]},$$scope:{ctx:l}}}),n=new pe({props:{legendText:"Data Loader",$$slots:{default:[Rt]},$$scope:{ctx:l}}}),s=new we({props:{disabled:((o=l[3])==null?void 0:o.length)>0||!l[1]||!l[0],$$slots:{default:[jt]},$$scope:{ctx:l}}}),s.$on("click",l[10]),{c(){F(e.$$.fragment),t=j(),F(n.$$.fragment),i=j(),F(s.$$.fragment)},l(r){A(e.$$.fragment,r),t=H(r),A(n.$$.fragment,r),i=H(r),A(s.$$.fragment,r)},m(r,u){C(e,r,u),L(r,t,u),C(n,r,u),L(r,i,u),C(s,r,u),a=!0},p(r,u){var m;const d={};u&2097155&&(d.$$scope={dirty:u,ctx:r}),e.$set(d);const h={};u&2097372&&(h.$$scope={dirty:u,ctx:r}),n.$set(h);const c={};u&11&&(c.disabled=((m=r[3])==null?void 0:m.length)>0||!r[1]||!r[0]),u&2097152&&(c.$$scope={dirty:u,ctx:r}),s.$set(c)},i(r){a||(k(e.$$.fragment,r),k(n.$$.fragment,r),k(s.$$.fragment,r),a=!0)},o(r){T(e.$$.fragment,r),T(n.$$.fragment,r),T(s.$$.fragment,r),a=!1},d(r){G(e,r),r&&p(t),G(n,r),r&&p(i),G(s,r)}}}function zt(l){let e,t,n,i,s,a,o;return a=new rt({props:{class:"pt-8",$$slots:{default:[Ht]},$$scope:{ctx:l}}}),{c(){e=I("div"),t=I("div"),n=I("h2"),i=Y("Add dataset"),s=j(),F(a.$$.fragment),this.h()},l(r){e=P(r,"DIV",{class:!0});var u=V(e);t=P(u,"DIV",{class:!0});var d=V(t);n=P(d,"H2",{});var h=V(n);i=Z(h,"Add dataset"),h.forEach(p),s=H(d),A(a.$$.fragment,d),d.forEach(p),u.forEach(p),this.h()},h(){M(t,"class","mx-auto flex max-w-xl flex-col"),M(e,"class","h-full w-full overflow-y-auto py-8")},m(r,u){L(r,e,u),D(e,t),D(t,n),D(n,i),D(t,s),C(a,t,null),o=!0},p(r,u){const d={};u&2097375&&(d.$$scope={dirty:u,ctx:r}),a.$set(d)},i(r){o||(k(a.$$.fragment,r),o=!0)},o(r){T(a.$$.fragment,r),o=!1},d(r){r&&p(e),G(a)}}}function Jt(l){let e,t;return e=new Ye({props:{title:"Datasets",$$slots:{default:[zt]},$$scope:{ctx:l}}}),{c(){F(e.$$.fragment)},l(n){A(e.$$.fragment,n)},m(n,i){C(e,n,i),t=!0},p(n,[i]){const s={};i&2097375&&(s.$$scope={dirty:i,ctx:n}),e.$set(s)},i(n){t||(k(e.$$.fragment,n),t=!0)},o(n){T(e.$$.fragment,n),t=!1},d(n){G(e,n)}}}function Kt(l,e,t){let n,i,s,a,o=x,r=()=>(o(),o=qe(n,g=>t(7,a=g)),n);l.$$.on_destroy.push(()=>o());const u=Je();le(l,u,g=>t(6,s=g));const d=Ke();le(l,d,g=>t(16,i=g));let h="local",c="",m="huggingface",v=[],f={};function b(){v.length||i.mutate([m,{namespace:h,dataset_name:c,config:f}],{onSuccess:g=>{ye(g.task_id,()=>{Ue(Qe(h,c))})}})}function _(g){h=g,t(0,h)}function N(g){c=g,t(1,c)}function z(g){m=g,t(2,m)}function te(g){f=g,t(4,f),t(0,h),t(1,c)}function ne(g){v=g,t(3,v)}return l.$$.update=()=>{l.$$.dirty&4&&r(t(5,n=Oe(m))),l.$$.dirty&3&&t(4,f.source_name=`${h}/${c}`,f)},[h,c,m,v,f,n,s,a,u,d,b,_,N,z,te,ne]}class yt extends W{constructor(e){super(),X(this,e,Kt,Jt,U,{})}}export{yt as component};