import{S as z,i as A,s as F,y as p,z as h,A as b,g as d,d as g,B as v,k,l as S,m as y,h as _,n as w,b as V,J as I,v as x,f as B,a1 as E,a5 as P,e as q,a3 as J}from"../chunks/index.0caa4e13.js";import{P as N}from"../chunks/Page.3f43a8d8.js";import{q as T,S as j}from"../chunks/signalQueries.036987f0.js";import{g as G}from"../chunks/settingsStore.cc81ce84.js";import{S as H,a as K}from"../chunks/SelectItem.6bf0ffa0.js";function C(c,n,s){const e=c.slice();return e[5]=n[s],e}function L(c){let n,s;return n=new H({props:{labelText:"Preferred embedding",selected:c[3].embedding,$$slots:{default:[O]},$$scope:{ctx:c}}}),n.$on("change",c[4]),{c(){p(n.$$.fragment)},l(e){h(n.$$.fragment,e)},m(e,t){b(n,e,t),s=!0},p(e,t){const a={};t&8&&(a.selected=e[3].embedding),t&260&&(a.$$scope={dirty:t,ctx:e}),n.$set(a)},i(e){s||(d(n.$$.fragment,e),s=!0)},o(e){g(n.$$.fragment,e),s=!1},d(e){v(n,e)}}}function M(c){let n,s;return n=new j({}),{c(){p(n.$$.fragment)},l(e){h(n.$$.fragment,e)},m(e,t){b(n,e,t),s=!0},p:E,i(e){s||(d(n.$$.fragment,e),s=!0)},o(e){g(n.$$.fragment,e),s=!1},d(e){v(n,e)}}}function D(c){let n,s;return n=new K({props:{value:c[5].name}}),{c(){p(n.$$.fragment)},l(e){h(n.$$.fragment,e)},m(e,t){b(n,e,t),s=!0},p(e,t){const a={};t&4&&(a.value=e[5].name),n.$set(a)},i(e){s||(d(n.$$.fragment,e),s=!0)},o(e){g(n.$$.fragment,e),s=!1},d(e){v(n,e)}}}function O(c){let n,s,e=c[2].data||[],t=[];for(let r=0;r<e.length;r+=1)t[r]=D(C(c,e,r));const a=r=>g(t[r],1,1,()=>{t[r]=null});return{c(){for(let r=0;r<t.length;r+=1)t[r].c();n=q()},l(r){for(let o=0;o<t.length;o+=1)t[o].l(r);n=q()},m(r,o){for(let l=0;l<t.length;l+=1)t[l]&&t[l].m(r,o);V(r,n,o),s=!0},p(r,o){if(o&4){e=r[2].data||[];let l;for(l=0;l<e.length;l+=1){const m=C(r,e,l);t[l]?(t[l].p(m,o),d(t[l],1)):(t[l]=D(m),t[l].c(),d(t[l],1),t[l].m(n.parentNode,n))}for(x(),l=e.length;l<t.length;l+=1)a(l);B()}},i(r){if(!s){for(let o=0;o<e.length;o+=1)d(t[o]);s=!0}},o(r){t=t.filter(Boolean);for(let o=0;o<t.length;o+=1)g(t[o]);s=!1},d(r){J(t,r),r&&_(n)}}}function Q(c){let n,s,e,t,a,r;const o=[M,L],l=[];function m(i,f){return i[2].isFetching?0:1}return t=m(c),a=l[t]=o[t](c),{c(){n=k("div"),s=k("div"),e=k("div"),a.c(),this.h()},l(i){n=S(i,"DIV",{class:!0});var f=y(n);s=S(f,"DIV",{class:!0});var u=y(s);e=S(u,"DIV",{class:!0});var $=y(e);a.l($),$.forEach(_),u.forEach(_),f.forEach(_),this.h()},h(){w(e,"class","w-60"),w(s,"class","lilac-page flex"),w(n,"class","lilac-container")},m(i,f){V(i,n,f),I(n,s),I(s,e),l[t].m(e,null),r=!0},p(i,f){let u=t;t=m(i),t===u?l[t].p(i,f):(x(),g(l[u],1,1,()=>{l[u]=null}),B(),a=l[t],a?a.p(i,f):(a=l[t]=o[t](i),a.c()),d(a,1),a.m(e,null))},i(i){r||(d(a),r=!0)},o(i){g(a),r=!1},d(i){i&&_(n),l[t].d()}}}function R(c){let n,s;return n=new N({props:{title:"Settings",$$slots:{default:[Q]},$$scope:{ctx:c}}}),{c(){p(n.$$.fragment)},l(e){h(n.$$.fragment,e)},m(e,t){b(n,e,t),s=!0},p(e,[t]){const a={};t&268&&(a.$$scope={dirty:t,ctx:e}),n.$set(a)},i(e){s||(d(n.$$.fragment,e),s=!0)},o(e){g(n.$$.fragment,e),s=!1},d(e){v(n,e)}}}function U(c,n,s){let e,t,a,r=E,o=()=>(r(),r=P(e,u=>s(2,a=u)),e),l,m=E,i=()=>(m(),m=P(t,u=>s(3,l=u)),t);c.$$.on_destroy.push(()=>r()),c.$$.on_destroy.push(()=>m());function f(u){const $=u.target.value;t.setEmbedding($)}return o(s(1,e=T())),i(s(0,t=G())),[t,e,a,l,f]}class te extends z{constructor(n){super(),A(this,n,U,R,F,{})}}export{te as component};
