import{S as R,i as U,s as W,y as I,z as C,A as V,g as _,d as b,B as D,k as x,q as A,a as F,l as S,m as E,r as O,h,c as j,n as w,b as L,a0 as m,v as M,f as Q,a1 as P,ab as G,e as H,a4 as X}from"../chunks/index.d15f259d.js";import{P as Y}from"../chunks/Page.626412ff.js";import{V as Z,S as ee,ai as te,a as se}from"../chunks/Commands.8cc00222.js";import{g as ne}from"../chunks/settingsStore.eddff611.js";function J(o,t,n){const e=o.slice();return e[5]=t[n],e}function ae(o){let t,n;return t=new ee({props:{labelText:"Preferred embedding",selected:o[3].embedding,$$slots:{default:[re]},$$scope:{ctx:o}}}),t.$on("change",o[4]),{c(){I(t.$$.fragment)},l(e){C(t.$$.fragment,e)},m(e,s){V(t,e,s),n=!0},p(e,s){const c={};s&8&&(c.selected=e[3].embedding),s&260&&(c.$$scope={dirty:s,ctx:e}),t.$set(c)},i(e){n||(_(t.$$.fragment,e),n=!0)},o(e){b(t.$$.fragment,e),n=!1},d(e){D(t,e)}}}function le(o){let t,n;return t=new te({}),{c(){I(t.$$.fragment)},l(e){C(t.$$.fragment,e)},m(e,s){V(t,e,s),n=!0},p:P,i(e){n||(_(t.$$.fragment,e),n=!0)},o(e){b(t.$$.fragment,e),n=!1},d(e){D(t,e)}}}function K(o){let t,n;return t=new se({props:{value:o[5].name}}),{c(){I(t.$$.fragment)},l(e){C(t.$$.fragment,e)},m(e,s){V(t,e,s),n=!0},p(e,s){const c={};s&4&&(c.value=e[5].name),t.$set(c)},i(e){n||(_(t.$$.fragment,e),n=!0)},o(e){b(t.$$.fragment,e),n=!1},d(e){D(t,e)}}}function re(o){let t,n,e=o[2].data||[],s=[];for(let a=0;a<e.length;a+=1)s[a]=K(J(o,e,a));const c=a=>b(s[a],1,1,()=>{s[a]=null});return{c(){for(let a=0;a<s.length;a+=1)s[a].c();t=H()},l(a){for(let r=0;r<s.length;r+=1)s[r].l(a);t=H()},m(a,r){for(let l=0;l<s.length;l+=1)s[l]&&s[l].m(a,r);L(a,t,r),n=!0},p(a,r){if(r&4){e=a[2].data||[];let l;for(l=0;l<e.length;l+=1){const d=J(a,e,l);s[l]?(s[l].p(d,r),_(s[l],1)):(s[l]=K(d),s[l].c(),_(s[l],1),s[l].m(t.parentNode,t))}for(M(),l=e.length;l<s.length;l+=1)c(l);Q()}},i(a){if(!n){for(let r=0;r<e.length;r+=1)_(s[r]);n=!0}},o(a){s=s.filter(Boolean);for(let r=0;r<s.length;r+=1)b(s[r]);n=!1},d(a){X(s,a),a&&h(t)}}}function oe(o){let t,n,e,s,c,a,r,l,d,g,f,i,v;const T=[le,ae],p=[];function q(u,$){return u[2].isFetching?0:1}return f=q(o),i=p[f]=T[f](o),{c(){t=x("div"),n=x("div"),e=x("section"),s=x("div"),c=A("Settings"),a=F(),r=x("div"),l=A(`Changes will apply to all datasets for your session. These settings are not saved
          server-side.`),d=F(),g=x("div"),i.c(),this.h()},l(u){t=S(u,"DIV",{class:!0});var $=E(t);n=S($,"DIV",{class:!0});var y=E(n);e=S(y,"SECTION",{class:!0});var k=E(e);s=S(k,"DIV",{class:!0});var B=E(s);c=O(B,"Settings"),B.forEach(h),a=j(k),r=S(k,"DIV",{class:!0});var N=E(r);l=O(N,`Changes will apply to all datasets for your session. These settings are not saved
          server-side.`),N.forEach(h),d=j(k),g=S(k,"DIV",{class:!0});var z=E(g);i.l(z),z.forEach(h),k.forEach(h),y.forEach(h),$.forEach(h),this.h()},h(){w(s,"class","text-lg text-gray-700"),w(r,"class","mb-4 text-sm text-gray-500"),w(g,"class","w-60"),w(e,"class","flex flex-col gap-y-1"),w(n,"class","flex flex-col gap-y-6"),w(t,"class","lilac-page flex p-8")},m(u,$){L(u,t,$),m(t,n),m(n,e),m(e,s),m(s,c),m(e,a),m(e,r),m(r,l),m(e,d),m(e,g),p[f].m(g,null),v=!0},p(u,$){let y=f;f=q(u),f===y?p[f].p(u,$):(M(),b(p[y],1,1,()=>{p[y]=null}),Q(),i=p[f],i?i.p(u,$):(i=p[f]=T[f](u),i.c()),_(i,1),i.m(g,null))},i(u){v||(_(i),v=!0)},o(u){b(i),v=!1},d(u){u&&h(t),p[f].d()}}}function ce(o){let t,n;return t=new Y({props:{$$slots:{default:[oe]},$$scope:{ctx:o}}}),{c(){I(t.$$.fragment)},l(e){C(t.$$.fragment,e)},m(e,s){V(t,e,s),n=!0},p(e,[s]){const c={};s&268&&(c.$$scope={dirty:s,ctx:e}),t.$set(c)},i(e){n||(_(t.$$.fragment,e),n=!0)},o(e){b(t.$$.fragment,e),n=!1},d(e){D(t,e)}}}function ie(o,t,n){let e,s,c,a=P,r=()=>(a(),a=G(e,i=>n(2,c=i)),e),l,d=P,g=()=>(d(),d=G(s,i=>n(3,l=i)),s);o.$$.on_destroy.push(()=>a()),o.$$.on_destroy.push(()=>d());function f(i){const v=i.target.value;s.setEmbedding(v)}return r(n(1,e=Z())),g(n(0,s=ne())),[s,e,c,l,f]}class me extends R{constructor(t){super(),U(this,t,ie,ce,W,{})}}export{me as component};
