import{S as be,i as pe,s as ge,E as ee,_ as ie,$ as ne,m as E,h,n as y,a0 as we,b as V,J as v,O as De,a1 as X,D as he,F as me,q as W,r as Z,u as oe,G as Ye,a7 as vn,e as fe,a as K,k as I,a8 as wn,a9 as kn,c as J,l as A,I as Te,H as G,K as Ee,L as je,M as Ue,N as We,g,v as re,d as w,f as se,P as Fe,aa as Dt,C as ot,R as ke,T as Pt,j as Ht,x as nt,y as L,z as j,A as O,B as Y,Q as Ae,w as He,ab as En,o as ln,X as ut,Y as ct,ac as wt,ad as Ft,t as Sn,Z as yn,p as Oe,W as nn,ae as Re,af as dt,a3 as Be,a5 as Qe,ag as bt,ah as zn,U as rn,V as sn,ai as Mn,a4 as rt,aj as st,a2 as Dn,ak as pt}from"../chunks/index.4fe0636c.js";import{C as Qt,P as an}from"../chunks/Page.a668fc01.js";import{g as lt,h as Vn,i as Pe,j as qe,t as xe,b as et,E as qt,k as Ze,l as Lt,m as Cn,a as In,e as An,S as Tn,n as Nn,o as Vt,p as Bn,r as Rn,s as Pn,u as Hn,v as Kt,w as Bt,q as Fn,x as qn,y as Ln,z as On,A as Yn,I as kt,B as fn,D as jn,F as at,G as Un,C as Wn,H as Zn,J as Qn,K as Kn,L as Jn,M as Gn,N as Xn,T as $n}from"../chunks/ConceptView.ac768a1a.js";import{f as Ve,d as Ot,s as Ie,p as xn,C as er,S as it,a as _t,i as tr,b as tt,e as mt,g as lr,L as Xe,n as ir,l as nr,h as ft,q as rr,j as on,k as sr,I as Yt,U as ar,m as un,o as fr,r as gt,t as Et,u as Rt,v as or,w as ur,P as cn,V as dn,x as cr,y as dr,z as hr,A as mr,B as _r,D as gr,E as Jt}from"../chunks/utils.72a3bae8.js";import{w as Le,d as Gt}from"../chunks/index.d0787736.js";import{W as br,b as pr,C as vr,S as hn,a as mn}from"../chunks/SelectItem.dd7a8f06.js";import{L as wr,a as kr,b as Er,c as Sr,C as yr}from"../chunks/ComboBox.5f87ed5e.js";import{B as Ke,g as It}from"../chunks/navigation.1d956f81.js";import{M as jt,u as zr}from"../chunks/urlHashStore.b5f29cd0.js";import{q as _n}from"../chunks/signalQueries.ea6829fe.js";function Xt(n){let e,l;return{c(){e=ie("title"),l=W(n[1])},l(t){e=ne(t,"title",{});var i=E(e);l=Z(i,n[1]),i.forEach(h)},m(t,i){V(t,e,i),v(e,l)},p(t,i){i&2&&oe(l,t[1])},d(t){t&&h(e)}}}function Mr(n){let e,l,t,i,f=n[1]&&Xt(n),r=[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},{width:n[0]},{height:n[0]},n[2],n[3]],a={};for(let s=0;s{l(5,e=ee(ee({},e),me(o))),l(3,r=he(e,f)),"size"in o&&l(0,a=o.size),"title"in o&&l(1,s=o.title)},n.$$.update=()=>{l(4,t=e["aria-label"]||e["aria-labelledby"]||s),l(2,i={"aria-hidden":t?void 0:!0,role:t?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=me(e),[a,s,i,r,t]}class Vr extends be{constructor(e){super(),pe(this,e,Dr,Mr,ge,{size:0,title:1})}}const Cr=Vr;function $t(n){let e,l;return{c(){e=ie("title"),l=W(n[1])},l(t){e=ne(t,"title",{});var i=E(e);l=Z(i,n[1]),i.forEach(h)},m(t,i){V(t,e,i),v(e,l)},p(t,i){i&2&&oe(l,t[1])},d(t){t&&h(e)}}}function Ir(n){let e,l,t,i,f=n[1]&&$t(n),r=[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},{width:n[0]},{height:n[0]},n[2],n[3]],a={};for(let s=0;s{l(5,e=ee(ee({},e),me(o))),l(3,r=he(e,f)),"size"in o&&l(0,a=o.size),"title"in o&&l(1,s=o.title)},n.$$.update=()=>{l(4,t=e["aria-label"]||e["aria-labelledby"]||s),l(2,i={"aria-hidden":t?void 0:!0,role:t?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=me(e),[a,s,i,r,t]}class Tr extends be{constructor(e){super(),pe(this,e,Ar,Ir,ge,{size:0,title:1})}}const Nr=Tr,Br=n=>({}),xt=n=>({});function Rr(n){let e,l,t;var i=n[1];function f(r){return{props:{"aria-label":r[10],title:r[10],class:"bx--overflow-menu__icon "+r[9]}}}return i&&(e=nt(i,f(n))),{c(){e&&L(e.$$.fragment),l=fe()},l(r){e&&j(e.$$.fragment,r),l=fe()},m(r,a){e&&O(e,r,a),V(r,l,a),t=!0},p(r,a){const s={};if(a[0]&1024&&(s["aria-label"]=r[10]),a[0]&1024&&(s.title=r[10]),a[0]&512&&(s.class="bx--overflow-menu__icon "+r[9]),a[0]&2&&i!==(i=r[1])){if(e){re();const o=e;w(o.$$.fragment,1,0,()=>{Y(o,1)}),se()}i?(e=nt(i,f(r)),L(e.$$.fragment),g(e.$$.fragment,1),O(e,l.parentNode,l)):e=null}else i&&e.$set(s)},i(r){t||(e&&g(e.$$.fragment,r),t=!0)},o(r){e&&w(e.$$.fragment,r),t=!1},d(r){r&&h(l),e&&Y(e,r)}}}function el(n){let e,l;const t=n[24].default,i=Ye(t,n,n[23],null);return{c(){e=I("ul"),i&&i.c(),this.h()},l(f){e=A(f,"UL",{role:!0,tabindex:!0,"aria-label":!0,"data-floating-menu-direction":!0,class:!0});var r=E(e);i&&i.l(r),r.forEach(h),this.h()},h(){y(e,"role","menu"),y(e,"tabindex","-1"),y(e,"aria-label",n[13]),y(e,"data-floating-menu-direction",n[5]),y(e,"class",n[8]),G(e,"bx--overflow-menu-options",!0),G(e,"bx--overflow-menu--flip",n[7]),G(e,"bx--overflow-menu-options--open",n[0]),G(e,"bx--overflow-menu-options--light",n[6]),G(e,"bx--overflow-menu-options--sm",n[4]==="sm"),G(e,"bx--overflow-menu-options--xl",n[4]==="xl"),G(e,"bx--breadcrumb-menu-options",!!n[14])},m(f,r){V(f,e,r),i&&i.m(e,null),n[31](e),l=!0},p(f,r){i&&i.p&&(!l||r[0]&8388608)&&je(i,t,f,f[23],l?We(t,f[23],r,null):Ue(f[23]),null),(!l||r[0]&8192)&&y(e,"aria-label",f[13]),(!l||r[0]&32)&&y(e,"data-floating-menu-direction",f[5]),(!l||r[0]&256)&&y(e,"class",f[8]),(!l||r[0]&256)&&G(e,"bx--overflow-menu-options",!0),(!l||r[0]&384)&&G(e,"bx--overflow-menu--flip",f[7]),(!l||r[0]&257)&&G(e,"bx--overflow-menu-options--open",f[0]),(!l||r[0]&320)&&G(e,"bx--overflow-menu-options--light",f[6]),(!l||r[0]&272)&&G(e,"bx--overflow-menu-options--sm",f[4]==="sm"),(!l||r[0]&272)&&G(e,"bx--overflow-menu-options--xl",f[4]==="xl"),(!l||r[0]&16640)&&G(e,"bx--breadcrumb-menu-options",!!f[14])},i(f){l||(g(i,f),l=!0)},o(f){w(i,f),l=!1},d(f){f&&h(e),i&&i.d(f),n[31](null)}}}function Pr(n){let e,l,t,i,f,r,a,s;const o=n[24].menu,u=Ye(o,n,n[23],xt),d=u||Rr(n);let c=n[0]&&el(n),m=[{type:"button"},{"aria-haspopup":""},{"aria-expanded":n[0]},{"aria-label":n[13]},{id:n[11]},n[19]],_={};for(let b=0;b{c=null}),se()),Te(i,_=De(m,[{type:"button"},{"aria-haspopup":""},(!r||p[0]&1)&&{"aria-expanded":b[0]},(!r||p[0]&8192)&&{"aria-label":b[13]},(!r||p[0]&2048)&&{id:b[11]},p[0]&524288&&b[19]])),G(i,"bx--overflow-menu",!0),G(i,"bx--overflow-menu--open",b[0]),G(i,"bx--overflow-menu--light",b[6]),G(i,"bx--overflow-menu--sm",b[4]==="sm"),G(i,"bx--overflow-menu--xl",b[4]==="xl")},i(b){r||(g(d,b),g(c),r=!0)},o(b){w(d,b),w(c),r=!1},d(b){h(l),b&&e.d(),b&&h(t),b&&h(i),d&&d.d(b),c&&c.d(),n[32](null),a=!1,Fe(s)}}}function Hr(n,e,l){let t,i;const f=["size","direction","open","light","flipped","menuOptionsClass","icon","iconClass","iconDescription","id","buttonRef","menuRef"];let r=he(e,f),a,s,o,{$$slots:u={},$$scope:d}=e,{size:c=void 0}=e,{direction:m="bottom"}=e,{open:_=!1}=e,{light:b=!1}=e,{flipped:p=!1}=e,{menuOptionsClass:z=void 0}=e,{icon:S=Cr}=e,{iconClass:k=void 0}=e,{iconDescription:M="Open and close list of options"}=e,{id:B="ccs-"+Math.random().toString(36)}=e,{buttonRef:q=null}=e,{menuRef:T=null}=e;const C=Dt("BreadcrumbItem"),P=ot(),R=Le([]);ke(n,R,D=>l(22,s=D));const H=Le(void 0);ke(n,H,D=>l(37,o=D));const N=Le(void 0),U=Le(-1);ke(n,U,D=>l(21,a=D));let ae,$=!0;Pt("OverflowMenu",{focusedId:N,add:({id:D,text:x,primaryFocus:_e,disabled:Ce})=>{R.update(Ne=>(_e&&U.set(Ne.length),[...Ne,{id:D,text:x,primaryFocus:_e,disabled:Ce,index:Ne.length}]))},update:D=>{H.set(D)},change:D=>{let x=a+D;x<0?x=s.length-1:x>=s.length&&(x=0);let _e=s[x].disabled;for(;_e;)x=x+D,x<0?x=s.length-1:x>=s.length&&(x=0),_e=s[x].disabled;U.set(x)}}),Ht(()=>{if(o){const{index:D,text:x}=s.filter(_e=>_e.id===o)[0];P("close",{index:D,text:x}),l(0,_=!1)}if(_){const{width:D,height:x}=q.getBoundingClientRect();l(20,ae=D),!$&&a<0&&T.focus(),p&&(l(3,T.style.left="auto",T),l(3,T.style.right=0,T)),m==="top"?(l(3,T.style.top="auto",T),l(3,T.style.bottom=x+"px",T)):m==="bottom"&&l(3,T.style.top=x+"px",T),C&&(l(3,T.style.top=x+10+"px",T),l(3,T.style.left="-11px",T))}_||(R.set([]),H.set(void 0),U.set(0)),$=!1});function te(D){Ae.call(this,n,D)}function Q(D){Ae.call(this,n,D)}function le(D){Ae.call(this,n,D)}function ye(D){Ae.call(this,n,D)}function ue(D){Ae.call(this,n,D)}const de=({target:D})=>{q&&q.contains(D)||T&&!T.contains(D)&&l(0,_=!1)};function ce(D){He[D?"unshift":"push"](()=>{T=D,l(3,T)})}function ve(D){He[D?"unshift":"push"](()=>{q=D,l(2,q)})}const Me=({target:D})=>{T&&T.contains(D)||(l(0,_=!_),_||P("close"))},ze=D=>{_&&(["ArrowDown","ArrowLeft","ArrowRight","ArrowUp"].includes(D.key)?D.preventDefault():D.key==="Escape"&&(D.stopPropagation(),P("close"),l(0,_=!1),q.focus()))},F=D=>{_&&(q.contains(D.relatedTarget)||(P("close"),l(0,_=!1)))};return n.$$set=D=>{l(39,e=ee(ee({},e),me(D))),l(19,r=he(e,f)),"size"in D&&l(4,c=D.size),"direction"in D&&l(5,m=D.direction),"open"in D&&l(0,_=D.open),"light"in D&&l(6,b=D.light),"flipped"in D&&l(7,p=D.flipped),"menuOptionsClass"in D&&l(8,z=D.menuOptionsClass),"icon"in D&&l(1,S=D.icon),"iconClass"in D&&l(9,k=D.iconClass),"iconDescription"in D&&l(10,M=D.iconDescription),"id"in D&&l(11,B=D.id),"buttonRef"in D&&l(2,q=D.buttonRef),"menuRef"in D&&l(3,T=D.menuRef),"$$scope"in D&&l(23,d=D.$$scope)},n.$$.update=()=>{l(13,t=e["aria-label"]||"menu"),n.$$.dirty[0]&6291456&&s[a]&&N.set(s[a].id),n.$$.dirty[0]&1050624&&l(12,i=``)},C&&l(1,S=Nr),e=me(e),[_,S,q,T,c,m,b,p,z,k,M,B,i,t,C,P,R,H,U,r,ae,a,s,d,u,te,Q,le,ye,ue,de,ce,ve,Me,ze,F]}class Fr extends be{constructor(e){super(),pe(this,e,Hr,Pr,ge,{size:4,direction:5,open:0,light:6,flipped:7,menuOptionsClass:8,icon:1,iconClass:9,iconDescription:10,id:11,buttonRef:2,menuRef:3},null,[-1,-1])}}const qr=Fr;function Lr(n){let e,l,t,i;const f=n[16].default,r=Ye(f,n,n[15],null),a=r||Yr(n);let s=[n[7]],o={};for(let u=0;u{r[c]=null}),se(),t=r[l],t?t.p(u,d):(t=r[l]=f[l](u),t.c()),g(t,1),t.m(e,null)),Te(e,o=De(s,[{role:"none"},(!i||d&64)&&{id:u[6]},d&2048&&u[11]])),G(e,"bx--overflow-menu-options__option",!0),G(e,"bx--overflow-menu--divider",u[4]),G(e,"bx--overflow-menu-options__option--danger",u[5]),G(e,"bx--overflow-menu-options__option--disabled",u[3])},i(u){i||(g(t),i=!0)},o(u){w(t),i=!1},d(u){u&&h(e),r[l].d()}}}function Wr(n,e,l){let t;const i=["text","href","primaryFocus","disabled","hasDivider","danger","requireTitle","id","ref"];let f=he(e,i),r,{$$slots:a={},$$scope:s}=e;const o=En(a);let{text:u="Provide text"}=e,{href:d=""}=e,{primaryFocus:c=!1}=e,{disabled:m=!1}=e,{hasDivider:_=!1}=e,{danger:b=!1}=e,{requireTitle:p=!0}=e,{id:z="ccs-"+Math.random().toString(36)}=e,{ref:S=null}=e;const{focusedId:k,add:M,update:B,change:q}=Dt("OverflowMenu");ke(n,k,Q=>l(14,r=Q)),M({id:z,text:u,primaryFocus:c,disabled:m}),Ht(()=>{S&&c&&S.focus()});function T(Q){Ae.call(this,n,Q)}function C(Q){Ae.call(this,n,Q)}function P(Q){Ae.call(this,n,Q)}function R(Q){Ae.call(this,n,Q)}function H(Q){He[Q?"unshift":"push"](()=>{S=Q,l(0,S)})}const N=()=>{B(z)},U=({key:Q})=>{Q==="ArrowDown"?q(1):Q==="ArrowUp"&&q(-1)};function ae(Q){He[Q?"unshift":"push"](()=>{S=Q,l(0,S)})}const $=()=>{B(z)},te=({key:Q})=>{Q==="ArrowDown"?q(1):Q==="ArrowUp"&&q(-1)};return n.$$set=Q=>{e=ee(ee({},e),me(Q)),l(11,f=he(e,i)),"text"in Q&&l(1,u=Q.text),"href"in Q&&l(2,d=Q.href),"primaryFocus"in Q&&l(12,c=Q.primaryFocus),"disabled"in Q&&l(3,m=Q.disabled),"hasDivider"in Q&&l(4,_=Q.hasDivider),"danger"in Q&&l(5,b=Q.danger),"requireTitle"in Q&&l(13,p=Q.requireTitle),"id"in Q&&l(6,z=Q.id),"ref"in Q&&l(0,S=Q.ref),"$$scope"in Q&&l(15,s=Q.$$scope)},n.$$.update=()=>{n.$$.dirty&16448&&l(12,c=r===z),n.$$.dirty&8206&&l(7,t={role:"menuitem",tabindex:"-1",class:"bx--overflow-menu-options__btn",disabled:d?void 0:m,href:d||void 0,title:p?o.default?void 0:u:void 0})},[S,u,d,m,_,b,z,t,k,B,q,f,c,p,r,s,a,T,C,P,R,H,N,U,ae,$,te]}class Zr extends be{constructor(e){super(),pe(this,e,Wr,Ur,ge,{text:1,href:2,primaryFocus:12,disabled:3,hasDivider:4,danger:5,requireTitle:13,id:6,ref:0})}}const ht=Zr;function tl(n,e,l){const t=n.slice();return t[39]=e[l],t[41]=l,t}const Qr=n=>({item:n[0]&8,index:n[0]&8}),ll=n=>({item:n[39],index:n[41]});function il(n){let e,l;return{c(){e=I("label"),l=W(n[10]),this.h()},l(t){e=A(t,"LABEL",{for:!0});var i=E(e);l=Z(i,n[10]),i.forEach(h),this.h()},h(){y(e,"for",n[19]),G(e,"bx--label",!0),G(e,"bx--label--disabled",n[9]),G(e,"bx--visually-hidden",n[17])},m(t,i){V(t,e,i),v(e,l)},p(t,i){i[0]&1024&&oe(l,t[10]),i[0]&524288&&y(e,"for",t[19]),i[0]&512&&G(e,"bx--label--disabled",t[9]),i[0]&131072&&G(e,"bx--visually-hidden",t[17])},d(t){t&&h(e)}}}function nl(n){let e,l;return e=new br({props:{class:"bx--list-box__invalid-icon"}}),{c(){L(e.$$.fragment)},l(t){j(e.$$.fragment,t)},m(t,i){O(e,t,i),l=!0},i(t){l||(g(e.$$.fragment,t),l=!0)},o(t){w(e.$$.fragment,t),l=!1},d(t){Y(e,t)}}}function rl(n){let e,l;return e=new pr({props:{class:"bx--list-box__invalid-icon bx--list-box__invalid-icon--warning"}}),{c(){L(e.$$.fragment)},l(t){j(e.$$.fragment,t)},m(t,i){O(e,t,i),l=!0},i(t){l||(g(e.$$.fragment,t),l=!0)},o(t){w(e.$$.fragment,t),l=!1},d(t){Y(e,t)}}}function Kr(n){let e;return{c(){e=W(n[16])},l(l){e=Z(l,n[16])},m(l,t){V(l,e,t)},p(l,t){t[0]&65536&&oe(e,l[16])},d(l){l&&h(e)}}}function Jr(n){let e=n[4](n[22])+"",l;return{c(){l=W(e)},l(t){l=Z(t,e)},m(t,i){V(t,l,i)},p(t,i){i[0]&4194320&&e!==(e=t[4](t[22])+"")&&oe(l,e)},d(t){t&&h(l)}}}function sl(n){let e,l;return e=new Er({props:{"aria-labelledby":n[19],id:n[19],$$slots:{default:[$r]},$$scope:{ctx:n}}}),{c(){L(e.$$.fragment)},l(t){j(e.$$.fragment,t)},m(t,i){O(e,t,i),l=!0},p(t,i){const f={};i[0]&524288&&(f["aria-labelledby"]=t[19]),i[0]&524288&&(f.id=t[19]),i[0]&2097181|i[1]&64&&(f.$$scope={dirty:i,ctx:t}),e.$set(f)},i(t){l||(g(e.$$.fragment,t),l=!0)},o(t){w(e.$$.fragment,t),l=!1},d(t){Y(e,t)}}}function Gr(n){let e=n[4](n[39])+"",l;return{c(){l=W(e)},l(t){l=Z(t,e)},m(t,i){V(t,l,i)},p(t,i){i[0]&24&&e!==(e=t[4](t[39])+"")&&oe(l,e)},d(t){t&&h(l)}}}function Xr(n){let e,l;const t=n[29].default,i=Ye(t,n,n[37],ll),f=i||Gr(n);return{c(){f&&f.c(),e=K()},l(r){f&&f.l(r),e=J(r)},m(r,a){f&&f.m(r,a),V(r,e,a),l=!0},p(r,a){i?i.p&&(!l||a[0]&8|a[1]&64)&&je(i,t,r,r[37],l?We(t,r[37],a,Qr):Ue(r[37]),ll):f&&f.p&&(!l||a[0]&24)&&f.p(r,l?a:[-1,-1])},i(r){l||(g(f,r),l=!0)},o(r){w(f,r),l=!1},d(r){f&&f.d(r),r&&h(e)}}}function al(n,e){let l,t,i;function f(...a){return e[34](e[39],...a)}function r(){return e[35](e[39],e[41])}return t=new Sr({props:{id:e[39].id,active:e[0]===e[39].id,highlighted:e[21]===e[41],disabled:e[39].disabled,$$slots:{default:[Xr]},$$scope:{ctx:e}}}),t.$on("click",f),t.$on("mouseenter",r),{key:n,first:null,c(){l=fe(),L(t.$$.fragment),this.h()},l(a){l=fe(),j(t.$$.fragment,a),this.h()},h(){this.first=l},m(a,s){V(a,l,s),O(t,a,s),i=!0},p(a,s){e=a;const o={};s[0]&8&&(o.id=e[39].id),s[0]&9&&(o.active=e[0]===e[39].id),s[0]&2097160&&(o.highlighted=e[21]===e[41]),s[0]&8&&(o.disabled=e[39].disabled),s[0]&24|s[1]&64&&(o.$$scope={dirty:s,ctx:e}),t.$set(o)},i(a){i||(g(t.$$.fragment,a),i=!0)},o(a){w(t.$$.fragment,a),i=!1},d(a){a&&h(l),Y(t,a)}}}function $r(n){let e=[],l=new Map,t,i,f=n[3];const r=a=>a[39].id;for(let a=0;a{c=null}),se()),!S[11]&&S[13]?m?k[0]&10240&&g(m,1):(m=rl(),m.c(),g(m,1),m.m(l.parentNode,l)):m&&(re(),w(m,1,1,()=>{m=null}),se()),b===(b=_(S))&&p?p.p(S,k):(p.d(1),p=b(S),p&&(p.c(),p.m(i,null)));const M={};k[0]&262144&&(M.translateWithId=S[18]),k[0]&2&&(M.open=S[1]),r.$set(M),(!o||k[0]&2)&&y(t,"aria-expanded",S[1]),(!o||k[0]&512)&&(t.disabled=S[9]),(!o||k[0]&262144)&&y(t,"translatewithid",S[18]),(!o||k[0]&524288)&&y(t,"id",S[19]),S[1]?z?(z.p(S,k),k[0]&2&&g(z,1)):(z=sl(S),z.c(),g(z,1),z.m(s.parentNode,s)):z&&(re(),w(z,1,1,()=>{z=null}),se())},i(S){o||(g(c),g(m),g(r.$$.fragment,S),g(z),o=!0)},o(S){w(c),w(m),w(r.$$.fragment,S),w(z),o=!1},d(S){c&&c.d(S),S&&h(e),m&&m.d(S),S&&h(l),S&&h(t),p.d(),Y(r),n[31](null),S&&h(a),z&&z.d(S),S&&h(s),u=!1,Fe(d)}}}function fl(n){let e,l;return{c(){e=I("div"),l=W(n[15]),this.h()},l(t){e=A(t,"DIV",{});var i=E(e);l=Z(i,n[15]),i.forEach(h),this.h()},h(){G(e,"bx--form__helper-text",!0),G(e,"bx--form__helper-text--disabled",n[9])},m(t,i){V(t,e,i),v(e,l)},p(t,i){i[0]&32768&&oe(l,t[15]),i[0]&512&&G(e,"bx--form__helper-text--disabled",t[9])},d(t){t&&h(e)}}}function es(n){let e,l,t,i,f,r,a,s=n[10]&&il(n);t=new wr({props:{role:void 0,type:n[5],size:n[7],name:n[20],"aria-label":n[28]["aria-label"],class:`bx--dropdown `+(n[6]==="top"&&"bx--list-box--up")+` `+(n[11]&&"bx--dropdown--invalid")+` `+(!n[11]&&n[13]&&"bx--dropdown--warning")+` `+(n[1]&&"bx--dropdown--open")+` `+(n[7]==="sm"&&"bx--dropdown--sm")+` `+(n[7]==="xl"&&"bx--dropdown--xl")+` `+(n[23]&&"bx--dropdown--inline")+` `+(n[9]&&"bx--dropdown--disabled")+` `+(n[8]&&"bx--dropdown--light"),disabled:n[9],open:n[1],invalid:n[11],invalidText:n[12],light:n[8],warn:n[13],warnText:n[14],$$slots:{default:[xr]},$$scope:{ctx:n}}}),t.$on("click",n[36]);let o=!n[23]&&!n[11]&&!n[13]&&n[15]&&fl(n),u=[n[27]],d={};for(let c=0;cF.text||F.id}=e,{selectedId:d}=e,{type:c="default"}=e,{direction:m="bottom"}=e,{size:_=void 0}=e,{open:b=!1}=e,{light:p=!1}=e,{disabled:z=!1}=e,{titleText:S=""}=e,{invalid:k=!1}=e,{invalidText:M=""}=e,{warn:B=!1}=e,{warnText:q=""}=e,{helperText:T=""}=e,{label:C=void 0}=e,{hideLabel:P=!1}=e,{translateWithId:R=void 0}=e,{id:H="ccs-"+Math.random().toString(36)}=e,{name:N=void 0}=e,{ref:U=null}=e;const ae=ot();let $=-1;function te(F){let D=$+F;if(o.length===0)return;D<0?D=o.length-1:D>=o.length&&(D=0);let x=o[D].disabled;for(;x;)D=D+F,D<0?D=o.length-1:D>=o.length&&(D=0),x=o[D].disabled;l(21,$=D)}const Q=()=>{ae("select",{selectedId:d,selectedItem:o.find(F=>F.id===d)})},le=({target:F})=>{b&&U&&!U.contains(F)&&l(1,b=!1)};ln(()=>(parent&&parent.addEventListener("click",le),()=>{parent&&parent.removeEventListener("click",le)}));const ye=F=>{F.stopPropagation(),!z&&l(1,b=!b)};function ue(F){He[F?"unshift":"push"](()=>{U=F,l(2,U)})}const de=F=>{const{key:D}=F;["Enter","ArrowDown","ArrowUp"].includes(D)&&F.preventDefault(),D==="Enter"?(l(1,b=!b),$>-1&&o[$].id!==d&&(l(0,d=o[$].id),Q(),l(1,b=!1))):D==="Tab"?(l(1,b=!1),U.blur()):D==="ArrowDown"?(b||l(1,b=!0),te(1)):D==="ArrowUp"?(b||l(1,b=!0),te(-1)):D==="Escape"&&l(1,b=!1)},ce=F=>{const{key:D}=F;if([" "].includes(D))F.preventDefault();else return;l(1,b=!b),$>-1&&o[$].id!==d&&(l(0,d=o[$].id),Q(),l(1,b=!1))},ve=(F,D)=>{if(F.disabled){D.stopPropagation();return}l(0,d=F.id),Q(),U.focus()},Me=(F,D)=>{F.disabled||l(21,$=D)},ze=({target:F})=>{z||l(1,b=U.contains(F)?!b:!1)};return n.$$set=F=>{l(28,e=ee(ee({},e),me(F))),l(27,r=he(e,f)),"items"in F&&l(3,o=F.items),"itemToString"in F&&l(4,u=F.itemToString),"selectedId"in F&&l(0,d=F.selectedId),"type"in F&&l(5,c=F.type),"direction"in F&&l(6,m=F.direction),"size"in F&&l(7,_=F.size),"open"in F&&l(1,b=F.open),"light"in F&&l(8,p=F.light),"disabled"in F&&l(9,z=F.disabled),"titleText"in F&&l(10,S=F.titleText),"invalid"in F&&l(11,k=F.invalid),"invalidText"in F&&l(12,M=F.invalidText),"warn"in F&&l(13,B=F.warn),"warnText"in F&&l(14,q=F.warnText),"helperText"in F&&l(15,T=F.helperText),"label"in F&&l(16,C=F.label),"hideLabel"in F&&l(17,P=F.hideLabel),"translateWithId"in F&&l(18,R=F.translateWithId),"id"in F&&l(19,H=F.id),"name"in F&&l(20,N=F.name),"ref"in F&&l(2,U=F.ref),"$$scope"in F&&l(37,s=F.$$scope)},n.$$.update=()=>{n.$$.dirty[0]&32&&l(23,t=c==="inline"),n.$$.dirty[0]&9&&l(22,i=o.find(F=>F.id===d)),n.$$.dirty[0]&2&&(b||l(21,$=-1))},e=me(e),[d,b,U,o,u,c,m,_,p,z,S,k,M,B,q,T,C,P,R,H,N,$,i,t,te,Q,le,r,e,a,ye,ue,de,ce,ve,Me,ze,s]}class ls extends be{constructor(e){super(),pe(this,e,ts,es,ge,{items:3,itemToString:4,selectedId:0,type:5,direction:6,size:7,open:1,light:8,disabled:9,titleText:10,invalid:11,invalidText:12,warn:13,warnText:14,helperText:15,label:16,hideLabel:17,translateWithId:18,id:19,name:20,ref:2},null,[-1,-1])}}const is=ls,ns=n=>({}),ol=n=>({});function ul(n){let e=n[3].label+"",l;return{c(){l=W(e)},l(t){l=Z(t,e)},m(t,i){V(t,l,i)},p(t,i){i[0]&8&&e!==(e=t[3].label+"")&&oe(l,e)},d(t){t&&h(l)}}}function rs(n){let e,l,t,i,f,r,a,s,o,u,d,c,m=n[3]&&ul(n);f=new vr({props:{"aria-hidden":"true",title:n[1]}});const _=n[20].default,b=Ye(_,n,n[19],null);let p=[{role:"navigation"},n[10]],z={};for(let M=0;Ml(18,o=ue));const M=Gt(k,ue=>ue.reduce((de,ce)=>({...de,[ce.id]:ce}),{}));ke(n,M,ue=>l(28,u=ue));const B=Le(b),q=Le(void 0);ke(n,q,ue=>l(16,a=ue));const T=Le([]);ke(n,T,ue=>l(17,s=ue));const C=Gt(T,ue=>ue.reduce((de,ce)=>({...de,[ce.id]:ce}),{})),P=Le(void 0);let R=null;Pt("Tabs",{tabs:k,contentById:C,selectedTab:q,selectedContent:P,useAutoWidth:B,add:ue=>{k.update(de=>[...de,{...ue,index:de.length}])},addContent:ue=>{T.update(de=>[...de,{...ue,index:de.length}])},update:ue=>{l(14,N=u[ue].index)},change:async ue=>{let de=N+ue;de<0?de=o.length-1:de>=o.length&&(de=0);let ce=o[de].disabled;for(;ce;)de=de+ue,de<0?de=o.length-1:de>=o.length&&(de=0),ce=o[de].disabled;l(14,N=de),await Sn();const ve=R==null?void 0:R.querySelectorAll("[role='tab']")[N];ve==null||ve.focus()}}),Ht(()=>{l(12,m=N),U>-1&&U!==N&&S("change",N),U=N});let H=!0,N=m,U=-1;function ae(ue){Ae.call(this,n,ue)}function $(ue){Ae.call(this,n,ue)}const te=()=>{l(5,H=!H)},Q=()=>{l(5,H=!H)},le=()=>{l(5,H=!H)};function ye(ue){He[ue?"unshift":"push"](()=>{R=ue,l(4,R)})}return n.$$set=ue=>{l(11,e=ee(ee({},e),me(ue))),l(10,r=he(e,f)),"selected"in ue&&l(12,m=ue.selected),"type"in ue&&l(0,_=ue.type),"autoWidth"in ue&&l(13,b=ue.autoWidth),"iconDescription"in ue&&l(1,p=ue.iconDescription),"triggerHref"in ue&&l(2,z=ue.triggerHref),"$$scope"in ue&&l(19,c=ue.$$scope)},n.$$.update=()=>{n.$$.dirty[0]&4096&&l(14,N=m),n.$$.dirty[0]&278528&&l(3,t=o[N]||void 0),n.$$.dirty[0]&147456&&l(15,i=s[N]||void 0),n.$$.dirty[0]&32776&&(t&&q.set(t.id),i&&P.set(i.id)),n.$$.dirty[0]&65536&&a&&l(5,H=!0),n.$$.dirty[0]&8192&&B.set(b)},e=me(e),[_,p,z,t,R,H,k,M,q,T,r,e,m,b,N,i,a,s,o,c,d,ae,$,te,Q,le,ye]}class as extends be{constructor(e){super(),pe(this,e,ss,rs,ge,{selected:12,type:0,autoWidth:13,iconDescription:1,triggerHref:2},null,[-1,-1])}}const fs=as;function os(n){let e;return{c(){e=W(n[1])},l(l){e=Z(l,n[1])},m(l,t){V(l,e,t)},p(l,t){t&2&&oe(e,l[1])},d(l){l&&h(e)}}}function us(n){let e,l,t,i,f,r,a;const s=n[15].default,o=Ye(s,n,n[14],null),u=o||os(n);let d=[{tabindex:"-1"},{role:"presentation"},n[12]],c={};for(let m=0;ml(13,r=N)),ke(n,z,N=>l(7,a=N)),S({id:_,label:u,disabled:c});function B(N){Ae.call(this,n,N)}function q(N){Ae.call(this,n,N)}function T(N){Ae.call(this,n,N)}function C(N){Ae.call(this,n,N)}function P(N){He[N?"unshift":"push"](()=>{b=N,l(0,b)})}const R=()=>{c||k(_)},H=({key:N})=>{c||(N==="ArrowRight"?M(1):N==="ArrowLeft"?M(-1):(N===" "||N==="Enter")&&k(_))};return n.$$set=N=>{e=ee(ee({},e),me(N)),l(12,f=he(e,i)),"label"in N&&l(1,u=N.label),"href"in N&&l(2,d=N.href),"disabled"in N&&l(3,c=N.disabled),"tabindex"in N&&l(4,m=N.tabindex),"id"in N&&l(5,_=N.id),"ref"in N&&l(0,b=N.ref),"$$scope"in N&&l(14,o=N.$$scope)},n.$$.update=()=>{n.$$.dirty&8224&&l(6,t=r===_)},[b,u,d,c,m,_,t,a,p,z,k,M,f,r,o,s,B,q,T,C,P,R,H]}class ds extends be{constructor(e){super(),pe(this,e,cs,us,ge,{label:1,href:2,disabled:3,tabindex:4,id:5,ref:0})}}const At=ds;function hs(n){let e,l,t,i;const f=n[12].default,r=Ye(f,n,n[11],null);let a=[{role:"tabpanel"},{"aria-labelledby":n[1]},{"aria-hidden":l=!n[2]},{hidden:t=n[2]?void 0:""},{id:n[0]},n[6]],s={};for(let o=0;ol(10,u=S)),ke(n,p,S=>l(8,s=S)),ke(n,z,S=>l(9,o=S)),b({id:m}),n.$$set=S=>{e=ee(ee({},e),me(S)),l(6,a=he(e,r)),"id"in S&&l(0,m=S.id),"$$scope"in S&&l(11,c=S.$$scope)},n.$$.update=()=>{n.$$.dirty&1025&&l(2,t=u===m),n.$$.dirty&513&&l(7,i=o[m].index),n.$$.dirty&384&&l(1,f=s[i].id)},[m,f,t,_,p,z,a,i,s,o,u,c,d]}class _s extends be{constructor(e){super(),pe(this,e,ms,hs,ge,{id:0})}}const Tt=_s;function cl(n){let e,l;return{c(){e=ie("title"),l=W(n[1])},l(t){e=ne(t,"title",{});var i=E(e);l=Z(i,n[1]),i.forEach(h)},m(t,i){V(t,e,i),v(e,l)},p(t,i){i&2&&oe(l,t[1])},d(t){t&&h(e)}}}function gs(n){let e,l,t=n[1]&&cl(n),i=[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},{width:n[0]},{height:n[0]},n[2],n[3]],f={};for(let r=0;r{l(5,e=ee(ee({},e),me(o))),l(3,r=he(e,f)),"size"in o&&l(0,a=o.size),"title"in o&&l(1,s=o.title)},n.$$.update=()=>{l(4,t=e["aria-label"]||e["aria-labelledby"]||s),l(2,i={"aria-hidden":t?void 0:!0,role:t?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=me(e),[a,s,i,r,t]}class ps extends be{constructor(e){super(),pe(this,e,bs,gs,ge,{size:0,title:1})}}function dl(n){let e,l;return{c(){e=ie("title"),l=W(n[1])},l(t){e=ne(t,"title",{});var i=E(e);l=Z(i,n[1]),i.forEach(h)},m(t,i){V(t,e,i),v(e,l)},p(t,i){i&2&&oe(l,t[1])},d(t){t&&h(e)}}}function vs(n){let e,l,t,i=n[1]&&dl(n),f=[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},{width:n[0]},{height:n[0]},n[2],n[3]],r={};for(let a=0;a{l(5,e=ee(ee({},e),me(o))),l(3,r=he(e,f)),"size"in o&&l(0,a=o.size),"title"in o&&l(1,s=o.title)},n.$$.update=()=>{l(4,t=e["aria-label"]||e["aria-labelledby"]||s),l(2,i={"aria-hidden":t?void 0:!0,role:t?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=me(e),[a,s,i,r,t]}let ks=class extends be{constructor(e){super(),pe(this,e,ws,vs,ge,{size:0,title:1})}};function hl(n){let e,l;return{c(){e=ie("title"),l=W(n[1])},l(t){e=ne(t,"title",{});var i=E(e);l=Z(i,n[1]),i.forEach(h)},m(t,i){V(t,e,i),v(e,l)},p(t,i){i&2&&oe(l,t[1])},d(t){t&&h(e)}}}function Es(n){let e,l,t=n[1]&&hl(n),i=[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},{width:n[0]},{height:n[0]},n[2],n[3]],f={};for(let r=0;r{l(5,e=ee(ee({},e),me(o))),l(3,r=he(e,f)),"size"in o&&l(0,a=o.size),"title"in o&&l(1,s=o.title)},n.$$.update=()=>{l(4,t=e["aria-label"]||e["aria-labelledby"]||s),l(2,i={"aria-hidden":t?void 0:!0,role:t?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=me(e),[a,s,i,r,t]}class ys extends be{constructor(e){super(),pe(this,e,Ss,Es,ge,{size:0,title:1})}}function ml(n){let e,l;return{c(){e=ie("title"),l=W(n[1])},l(t){e=ne(t,"title",{});var i=E(e);l=Z(i,n[1]),i.forEach(h)},m(t,i){V(t,e,i),v(e,l)},p(t,i){i&2&&oe(l,t[1])},d(t){t&&h(e)}}}function zs(n){let e,l,t,i,f=n[1]&&ml(n),r=[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},{width:n[0]},{height:n[0]},n[2],n[3]],a={};for(let s=0;s{l(5,e=ee(ee({},e),me(o))),l(3,r=he(e,f)),"size"in o&&l(0,a=o.size),"title"in o&&l(1,s=o.title)},n.$$.update=()=>{l(4,t=e["aria-label"]||e["aria-labelledby"]||s),l(2,i={"aria-hidden":t?void 0:!0,role:t?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=me(e),[a,s,i,r,t]}class Nt extends be{constructor(e){super(),pe(this,e,Ms,zs,ge,{size:0,title:1})}}function _l(n){let e,l;return{c(){e=ie("title"),l=W(n[1])},l(t){e=ne(t,"title",{});var i=E(e);l=Z(i,n[1]),i.forEach(h)},m(t,i){V(t,e,i),v(e,l)},p(t,i){i&2&&oe(l,t[1])},d(t){t&&h(e)}}}function Ds(n){let e,l,t,i=n[1]&&_l(n),f=[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},{width:n[0]},{height:n[0]},n[2],n[3]],r={};for(let a=0;a{l(5,e=ee(ee({},e),me(o))),l(3,r=he(e,f)),"size"in o&&l(0,a=o.size),"title"in o&&l(1,s=o.title)},n.$$.update=()=>{l(4,t=e["aria-label"]||e["aria-labelledby"]||s),l(2,i={"aria-hidden":t?void 0:!0,role:t?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=me(e),[a,s,i,r,t]}class Ge extends be{constructor(e){super(),pe(this,e,Vs,Ds,ge,{size:0,title:1})}}function gl(n){let e,l;return{c(){e=ie("title"),l=W(n[1])},l(t){e=ne(t,"title",{});var i=E(e);l=Z(i,n[1]),i.forEach(h)},m(t,i){V(t,e,i),v(e,l)},p(t,i){i&2&&oe(l,t[1])},d(t){t&&h(e)}}}function Cs(n){let e,l,t=n[1]&&gl(n),i=[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},{width:n[0]},{height:n[0]},n[2],n[3]],f={};for(let r=0;r{l(5,e=ee(ee({},e),me(o))),l(3,r=he(e,f)),"size"in o&&l(0,a=o.size),"title"in o&&l(1,s=o.title)},n.$$.update=()=>{l(4,t=e["aria-label"]||e["aria-labelledby"]||s),l(2,i={"aria-hidden":t?void 0:!0,role:t?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=me(e),[a,s,i,r,t]}class As extends be{constructor(e){super(),pe(this,e,Is,Cs,ge,{size:0,title:1})}}function bl(n){let e,l;return{c(){e=ie("title"),l=W(n[1])},l(t){e=ne(t,"title",{});var i=E(e);l=Z(i,n[1]),i.forEach(h)},m(t,i){V(t,e,i),v(e,l)},p(t,i){i&2&&oe(l,t[1])},d(t){t&&h(e)}}}function Ts(n){let e,l,t=n[1]&&bl(n),i=[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},{width:n[0]},{height:n[0]},n[2],n[3]],f={};for(let r=0;r{l(5,e=ee(ee({},e),me(o))),l(3,r=he(e,f)),"size"in o&&l(0,a=o.size),"title"in o&&l(1,s=o.title)},n.$$.update=()=>{l(4,t=e["aria-label"]||e["aria-labelledby"]||s),l(2,i={"aria-hidden":t?void 0:!0,role:t?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=me(e),[a,s,i,r,t]}class Bs extends be{constructor(e){super(),pe(this,e,Ns,Ts,ge,{size:0,title:1})}}function pl(n){let e,l;return{c(){e=ie("title"),l=W(n[1])},l(t){e=ne(t,"title",{});var i=E(e);l=Z(i,n[1]),i.forEach(h)},m(t,i){V(t,e,i),v(e,l)},p(t,i){i&2&&oe(l,t[1])},d(t){t&&h(e)}}}function Rs(n){let e,l,t,i=n[1]&&pl(n),f=[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},{width:n[0]},{height:n[0]},n[2],n[3]],r={};for(let a=0;a{l(5,e=ee(ee({},e),me(o))),l(3,r=he(e,f)),"size"in o&&l(0,a=o.size),"title"in o&&l(1,s=o.title)},n.$$.update=()=>{l(4,t=e["aria-label"]||e["aria-labelledby"]||s),l(2,i={"aria-hidden":t?void 0:!0,role:t?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=me(e),[a,s,i,r,t]}class Hs extends be{constructor(e){super(),pe(this,e,Ps,Rs,ge,{size:0,title:1})}}function vl(n){let e,l;return{c(){e=ie("title"),l=W(n[1])},l(t){e=ne(t,"title",{});var i=E(e);l=Z(i,n[1]),i.forEach(h)},m(t,i){V(t,e,i),v(e,l)},p(t,i){i&2&&oe(l,t[1])},d(t){t&&h(e)}}}function Fs(n){let e,l,t=n[1]&&vl(n),i=[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},{width:n[0]},{height:n[0]},n[2],n[3]],f={};for(let r=0;r{l(5,e=ee(ee({},e),me(o))),l(3,r=he(e,f)),"size"in o&&l(0,a=o.size),"title"in o&&l(1,s=o.title)},n.$$.update=()=>{l(4,t=e["aria-label"]||e["aria-labelledby"]||s),l(2,i={"aria-hidden":t?void 0:!0,role:t?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=me(e),[a,s,i,r,t]}class Ls extends be{constructor(e){super(),pe(this,e,qs,Fs,ge,{size:0,title:1})}}function wl(n){let e,l;return{c(){e=ie("title"),l=W(n[1])},l(t){e=ne(t,"title",{});var i=E(e);l=Z(i,n[1]),i.forEach(h)},m(t,i){V(t,e,i),v(e,l)},p(t,i){i&2&&oe(l,t[1])},d(t){t&&h(e)}}}function Os(n){let e,l,t=n[1]&&wl(n),i=[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},{width:n[0]},{height:n[0]},n[2],n[3]],f={};for(let r=0;r{l(5,e=ee(ee({},e),me(o))),l(3,r=he(e,f)),"size"in o&&l(0,a=o.size),"title"in o&&l(1,s=o.title)},n.$$.update=()=>{l(4,t=e["aria-label"]||e["aria-labelledby"]||s),l(2,i={"aria-hidden":t?void 0:!0,role:t?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=me(e),[a,s,i,r,t]}class js extends be{constructor(e){super(),pe(this,e,Ys,Os,ge,{size:0,title:1})}}function kl(n){let e,l;return{c(){e=ie("title"),l=W(n[1])},l(t){e=ne(t,"title",{});var i=E(e);l=Z(i,n[1]),i.forEach(h)},m(t,i){V(t,e,i),v(e,l)},p(t,i){i&2&&oe(l,t[1])},d(t){t&&h(e)}}}function Us(n){let e,l,t,i=n[1]&&kl(n),f=[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},{width:n[0]},{height:n[0]},n[2],n[3]],r={};for(let a=0;a{l(5,e=ee(ee({},e),me(o))),l(3,r=he(e,f)),"size"in o&&l(0,a=o.size),"title"in o&&l(1,s=o.title)},n.$$.update=()=>{l(4,t=e["aria-label"]||e["aria-labelledby"]||s),l(2,i={"aria-hidden":t?void 0:!0,role:t?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=me(e),[a,s,i,r,t]}class St extends be{constructor(e){super(),pe(this,e,Ws,Us,ge,{size:0,title:1})}}function El(n){let e,l;return{c(){e=ie("title"),l=W(n[1])},l(t){e=ne(t,"title",{});var i=E(e);l=Z(i,n[1]),i.forEach(h)},m(t,i){V(t,e,i),v(e,l)},p(t,i){i&2&&oe(l,t[1])},d(t){t&&h(e)}}}function Zs(n){let e,l,t=n[1]&&El(n),i=[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},{width:n[0]},{height:n[0]},n[2],n[3]],f={};for(let r=0;r{l(5,e=ee(ee({},e),me(o))),l(3,r=he(e,f)),"size"in o&&l(0,a=o.size),"title"in o&&l(1,s=o.title)},n.$$.update=()=>{l(4,t=e["aria-label"]||e["aria-labelledby"]||s),l(2,i={"aria-hidden":t?void 0:!0,role:t?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=me(e),[a,s,i,r,t]}class Ks extends be{constructor(e){super(),pe(this,e,Qs,Zs,ge,{size:0,title:1})}}function Sl(n){let e,l;return{c(){e=ie("title"),l=W(n[1])},l(t){e=ne(t,"title",{});var i=E(e);l=Z(i,n[1]),i.forEach(h)},m(t,i){V(t,e,i),v(e,l)},p(t,i){i&2&&oe(l,t[1])},d(t){t&&h(e)}}}function Js(n){let e,l,t=n[1]&&Sl(n),i=[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},{width:n[0]},{height:n[0]},n[2],n[3]],f={};for(let r=0;r{l(5,e=ee(ee({},e),me(o))),l(3,r=he(e,f)),"size"in o&&l(0,a=o.size),"title"in o&&l(1,s=o.title)},n.$$.update=()=>{l(4,t=e["aria-label"]||e["aria-labelledby"]||s),l(2,i={"aria-hidden":t?void 0:!0,role:t?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=me(e),[a,s,i,r,t]}class Xs extends be{constructor(e){super(),pe(this,e,Gs,Js,ge,{size:0,title:1})}}function yl(n){let e,l;return{c(){e=ie("title"),l=W(n[1])},l(t){e=ne(t,"title",{});var i=E(e);l=Z(i,n[1]),i.forEach(h)},m(t,i){V(t,e,i),v(e,l)},p(t,i){i&2&&oe(l,t[1])},d(t){t&&h(e)}}}function $s(n){let e,l,t=n[1]&&yl(n),i=[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},{width:n[0]},{height:n[0]},n[2],n[3]],f={};for(let r=0;r{l(5,e=ee(ee({},e),me(o))),l(3,r=he(e,f)),"size"in o&&l(0,a=o.size),"title"in o&&l(1,s=o.title)},n.$$.update=()=>{l(4,t=e["aria-label"]||e["aria-labelledby"]||s),l(2,i={"aria-hidden":t?void 0:!0,role:t?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=me(e),[a,s,i,r,t]}class ea extends be{constructor(e){super(),pe(this,e,xs,$s,ge,{size:0,title:1})}}function zl(n){let e,l;return{c(){e=ie("title"),l=W(n[1])},l(t){e=ne(t,"title",{});var i=E(e);l=Z(i,n[1]),i.forEach(h)},m(t,i){V(t,e,i),v(e,l)},p(t,i){i&2&&oe(l,t[1])},d(t){t&&h(e)}}}function ta(n){let e,l,t=n[1]&&zl(n),i=[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},{width:n[0]},{height:n[0]},n[2],n[3]],f={};for(let r=0;r{l(5,e=ee(ee({},e),me(o))),l(3,r=he(e,f)),"size"in o&&l(0,a=o.size),"title"in o&&l(1,s=o.title)},n.$$.update=()=>{l(4,t=e["aria-label"]||e["aria-labelledby"]||s),l(2,i={"aria-hidden":t?void 0:!0,role:t?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=me(e),[a,s,i,r,t]}class yt extends be{constructor(e){super(),pe(this,e,la,ta,ge,{size:0,title:1})}}function Ml(n){let e,l;return{c(){e=ie("title"),l=W(n[1])},l(t){e=ne(t,"title",{});var i=E(e);l=Z(i,n[1]),i.forEach(h)},m(t,i){V(t,e,i),v(e,l)},p(t,i){i&2&&oe(l,t[1])},d(t){t&&h(e)}}}function ia(n){let e,l,t=n[1]&&Ml(n),i=[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},{width:n[0]},{height:n[0]},n[2],n[3]],f={};for(let r=0;r{l(5,e=ee(ee({},e),me(o))),l(3,r=he(e,f)),"size"in o&&l(0,a=o.size),"title"in o&&l(1,s=o.title)},n.$$.update=()=>{l(4,t=e["aria-label"]||e["aria-labelledby"]||s),l(2,i={"aria-hidden":t?void 0:!0,role:t?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=me(e),[a,s,i,r,t]}class zt extends be{constructor(e){super(),pe(this,e,na,ia,ge,{size:0,title:1})}}function Dl(n){let e,l;return{c(){e=ie("title"),l=W(n[1])},l(t){e=ne(t,"title",{});var i=E(e);l=Z(i,n[1]),i.forEach(h)},m(t,i){V(t,e,i),v(e,l)},p(t,i){i&2&&oe(l,t[1])},d(t){t&&h(e)}}}function ra(n){let e,l,t=n[1]&&Dl(n),i=[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},{width:n[0]},{height:n[0]},n[2],n[3]],f={};for(let r=0;r{l(5,e=ee(ee({},e),me(o))),l(3,r=he(e,f)),"size"in o&&l(0,a=o.size),"title"in o&&l(1,s=o.title)},n.$$.update=()=>{l(4,t=e["aria-label"]||e["aria-labelledby"]||s),l(2,i={"aria-hidden":t?void 0:!0,role:t?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=me(e),[a,s,i,r,t]}class Vl extends be{constructor(e){super(),pe(this,e,sa,ra,ge,{size:0,title:1})}}function Cl(n){let e,l;return{c(){e=ie("title"),l=W(n[1])},l(t){e=ne(t,"title",{});var i=E(e);l=Z(i,n[1]),i.forEach(h)},m(t,i){V(t,e,i),v(e,l)},p(t,i){i&2&&oe(l,t[1])},d(t){t&&h(e)}}}function aa(n){let e,l,t=n[1]&&Cl(n),i=[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},{width:n[0]},{height:n[0]},n[2],n[3]],f={};for(let r=0;r{l(5,e=ee(ee({},e),me(o))),l(3,r=he(e,f)),"size"in o&&l(0,a=o.size),"title"in o&&l(1,s=o.title)},n.$$.update=()=>{l(4,t=e["aria-label"]||e["aria-labelledby"]||s),l(2,i={"aria-hidden":t?void 0:!0,role:t?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=me(e),[a,s,i,r,t]}class Il extends be{constructor(e){super(),pe(this,e,fa,aa,ge,{size:0,title:1})}}function Al(n){let e,l;return{c(){e=ie("title"),l=W(n[1])},l(t){e=ne(t,"title",{});var i=E(e);l=Z(i,n[1]),i.forEach(h)},m(t,i){V(t,e,i),v(e,l)},p(t,i){i&2&&oe(l,t[1])},d(t){t&&h(e)}}}function oa(n){let e,l,t,i=n[1]&&Al(n),f=[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},{width:n[0]},{height:n[0]},n[2],n[3]],r={};for(let a=0;a{l(5,e=ee(ee({},e),me(o))),l(3,r=he(e,f)),"size"in o&&l(0,a=o.size),"title"in o&&l(1,s=o.title)},n.$$.update=()=>{l(4,t=e["aria-label"]||e["aria-labelledby"]||s),l(2,i={"aria-hidden":t?void 0:!0,role:t?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=me(e),[a,s,i,r,t]}class vt extends be{constructor(e){super(),pe(this,e,ua,oa,ge,{size:0,title:1})}}function Tl(n){let e,l;return{c(){e=ie("title"),l=W(n[1])},l(t){e=ne(t,"title",{});var i=E(e);l=Z(i,n[1]),i.forEach(h)},m(t,i){V(t,e,i),v(e,l)},p(t,i){i&2&&oe(l,t[1])},d(t){t&&h(e)}}}function ca(n){let e,l,t,i=n[1]&&Tl(n),f=[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},{width:n[0]},{height:n[0]},n[2],n[3]],r={};for(let a=0;a{l(5,e=ee(ee({},e),me(o))),l(3,r=he(e,f)),"size"in o&&l(0,a=o.size),"title"in o&&l(1,s=o.title)},n.$$.update=()=>{l(4,t=e["aria-label"]||e["aria-labelledby"]||s),l(2,i={"aria-hidden":t?void 0:!0,role:t?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=me(e),[a,s,i,r,t]}class ha extends be{constructor(e){super(),pe(this,e,da,ca,ge,{size:0,title:1})}}function Nl(n){let e;return{c(){e=I("div"),this.h()},l(l){e=A(l,"DIV",{id:!0,style:!0}),E(e).forEach(h),this.h()},h(){y(e,"id","svelte-infinite-scroll"),Oe(e,"width","0")},m(l,t){V(l,e,t),n[11](e)},p:X,d(l){l&&h(e),n[11](null)}}}function ma(n){let e,l=!n[1]&&!n[0]&&Nl(n);return{c(){l&&l.c(),e=fe()},l(t){l&&l.l(t),e=fe()},m(t,i){l&&l.m(t,i),V(t,e,i)},p(t,[i]){!t[1]&&!t[0]?l?l.p(t,i):(l=Nl(t),l.c(),l.m(e.parentNode,e)):l&&(l.d(1),l=null)},i:X,o:X,d(t){l&&l.d(t),t&&h(e)}}}function _a(n,e,l){let{threshold:t=0}=e,{horizontal:i=!1}=e,{elementScroll:f=null}=e,{hasMore:r=!0}=e,{reverse:a=!1}=e,{window:s=!1}=e;const o=ot();let u=!1,d,c,m,_;const b=S=>{if(!r)return;const k=S.target;p(k,a,i)<=t?(!u&&r&&(o("loadMore"),l(8,c=k.scrollHeight),l(9,m=k.scrollTop)),l(7,u=!0)):l(7,u=!1)},p=(S,k,M)=>{const B=S.documentElement?S.documentElement:S;return k?M?B.scrollLeft:B.scrollTop:M?B.scrollWidth-B.clientWidth-B.scrollLeft:B.scrollHeight-B.clientHeight-B.scrollTop};ln(()=>{s?l(10,_=document):f?l(10,_=f):l(10,_=d.parentNode)}),yn(()=>{_&&(_.removeEventListener("scroll",b),_.removeEventListener("resize",b))});function z(S){He[S?"unshift":"push"](()=>{d=S,l(2,d)})}return n.$$set=S=>{"threshold"in S&&l(3,t=S.threshold),"horizontal"in S&&l(4,i=S.horizontal),"elementScroll"in S&&l(0,f=S.elementScroll),"hasMore"in S&&l(5,r=S.hasMore),"reverse"in S&&l(6,a=S.reverse),"window"in S&&l(1,s=S.window)},n.$$.update=()=>{n.$$.dirty&1088&&_&&(a&&l(10,_.scrollTop=_.scrollHeight,_),_.addEventListener("scroll",b),_.addEventListener("resize",b)),n.$$.dirty&1984&&u&&a&&l(10,_.scrollTop=_.scrollHeight-c+m,_)},[f,s,d,t,i,r,a,u,c,m,_,z]}class ga extends be{constructor(e){super(),pe(this,e,_a,ma,ge,{threshold:3,horizontal:4,elementScroll:0,hasMore:5,reverse:6,window:1})}}function ba(n){let e,l,t,i,f,r,a,s;t=new Vn({});const o=n[3].default,u=Ye(o,n,n[6],null);return{c(){e=I("div"),l=I("button"),L(t.$$.fragment),i=K(),f=I("span"),u&&u.c(),this.h()},l(d){e=A(d,"DIV",{class:!0});var c=E(e);l=A(c,"BUTTON",{class:!0});var m=E(l);j(t.$$.fragment,m),m.forEach(h),i=J(c),f=A(c,"SPAN",{class:!0});var _=E(f);u&&u.l(_),_.forEach(h),c.forEach(h),this.h()},h(){y(l,"class","opacity-50 hover:opacity-100"),y(f,"class","truncate"),y(e,"class","removable-tag flex items-center gap-x-1")},m(d,c){V(d,e,c),v(e,l),O(t,l,null),v(e,i),v(e,f),u&&u.m(f,null),r=!0,a||(s=Ee(l,"click",Ft(n[4])),a=!0)},p(d,c){u&&u.p&&(!r||c&64)&&je(u,o,d,d[6],r?We(o,d[6],c,null):Ue(d[6]),null)},i(d){r||(g(t.$$.fragment,d),g(u,d),r=!0)},o(d){w(t.$$.fragment,d),w(u,d),r=!1},d(d){d&&h(e),Y(t),u&&u.d(d),a=!1,s()}}}function pa(n){let e,l;const t=[{type:n[0]},n[2]];let i={$$slots:{default:[ba]},$$scope:{ctx:n}};for(let f=0;fa("remove");function u(d){Ae.call(this,n,d)}return n.$$set=d=>{e=ee(ee({},e),me(d)),l(2,i=he(e,t)),"type"in d&&l(0,s=d.type),"$$scope"in d&&l(6,r=d.$$scope)},[s,a,i,f,o,u,r]}class Ct extends be{constructor(e){super(),pe(this,e,va,pa,ge,{type:0})}}function wa(n){let e=(n[2]?"":n[5])+"",l,t,i=n[0][n[1].op]+"",f,r,a;return{c(){l=W(e),t=K(),f=W(i),r=K(),a=W(n[4])},l(s){l=Z(s,e),t=J(s),f=Z(s,i),r=J(s),a=Z(s,n[4])},m(s,o){V(s,l,o),V(s,t,o),V(s,f,o),V(s,r,o),V(s,a,o)},p(s,o){o&36&&e!==(e=(s[2]?"":s[5])+"")&&oe(l,e),o&2&&i!==(i=s[0][s[1].op]+"")&&oe(f,i),o&16&&oe(a,s[4])},d(s){s&&h(l),s&&h(t),s&&h(f),s&&h(r),s&&h(a)}}}function ka(n){let e,l,t,i,f,r;return l=new Ct({props:{interactive:!0,type:"magenta",$$slots:{default:[wa]},$$scope:{ctx:n}}}),l.$on("click",n[9]),l.$on("remove",n[10]),{c(){e=I("div"),L(l.$$.fragment),this.h()},l(a){e=A(a,"DIV",{class:!0});var s=E(e);j(l.$$.fragment,s),s.forEach(h),this.h()},h(){y(e,"class","filter-pill items-center")},m(a,s){V(a,e,s),O(l,e,null),i=!0,f||(r=Re(t=Pe.call(null,e,{text:n[6]})),f=!0)},p(a,[s]){const o={};s&2102&&(o.$$scope={dirty:s,ctx:a}),l.$set(o),t&&dt(t.update)&&s&64&&t.update.call(null,{text:a[6]})},i(a){i||(g(l.$$.fragment,a),i=!0)},o(a){w(l.$$.fragment,a),i=!1},d(a){a&&h(e),Y(l),f=!1,r()}}}function Ea(n,e,l){let t,i,f,r,a;const s={equals:"=",not_equal:"≠",less:"<",less_equal:"≤",greater:">",greater_equal:"≥",in:"in",exists:"exists"};let{filter:o}=e,{hidePath:u=!1}=e;const d=qe();ke(n,d,_=>l(7,a=_));const c=()=>xe({command:et.EditFilter,namespace:a.namespace,datasetName:a.datasetName,path:i}),m=()=>d.removeFilter(o);return n.$$set=_=>{"filter"in _&&l(1,o=_.filter),"hidePath"in _&&l(2,u=_.hidePath)},n.$$.update=()=>{n.$$.dirty&2&&l(4,t=Ve(o.value||"false")),n.$$.dirty&2&&l(3,i=Ot(o.path)),n.$$.dirty&18&&l(6,f=`${Ie(o.path)} ${s[o.op]} ${t}`),n.$$.dirty&8&&l(5,r=i.at(-1))},[s,o,u,i,t,r,f,a,d,c,m]}class Ut extends be{constructor(e){super(),pe(this,e,Ea,ka,ge,{FILTER_SHORTHANDS:0,filter:1,hidePath:2})}get FILTER_SHORTHANDS(){return this.$$.ctx[0]}}function Sa(n){let e=Ie(n[0].path)+"",l,t,i=n[0].query.type+"",f;return{c(){l=W(e),t=W(": "),f=W(i)},l(r){l=Z(r,e),t=Z(r,": "),f=Z(r,i)},m(r,a){V(r,l,a),V(r,t,a),V(r,f,a)},p(r,a){a&1&&e!==(e=Ie(r[0].path)+"")&&oe(l,e),a&1&&i!==(i=r[0].query.type+"")&&oe(f,i)},d(r){r&&h(l),r&&h(t),r&&h(f)}}}function Bl(n){let e,l,t;return l=new qt({props:{embedding:n[0].query.embedding}}),{c(){e=I("div"),L(l.$$.fragment),this.h()},l(i){e=A(i,"DIV",{class:!0});var f=E(e);j(l.$$.fragment,f),f.forEach(h),this.h()},h(){y(e,"class","ml-2")},m(i,f){V(i,e,f),O(l,e,null),t=!0},p(i,f){const r={};f&1&&(r.embedding=i[0].query.embedding),l.$set(r)},i(i){t||(g(l.$$.fragment,i),t=!0)},o(i){w(l.$$.fragment,i),t=!1},d(i){i&&h(e),Y(l)}}}function Rl(n){let e,l;return{c(){e=I("div"),l=W(n[2]),this.h()},l(t){e=A(t,"DIV",{class:!0});var i=E(e);l=Z(i,n[2]),i.forEach(h),this.h()},h(){y(e,"class","mt-2 whitespace-pre-wrap text-left")},m(t,i){V(t,e,i),v(e,l)},p(t,i){i&4&&oe(l,t[2])},d(t){t&&h(e)}}}function ya(n){let e,l,t,i,f,r,a;t=new lt({props:{type:n[1],$$slots:{default:[Sa]},$$scope:{ctx:n}}});let s=(n[0].query.type==="semantic"||n[0].query.type==="concept")&&Bl(n),o=n[2]&&Rl(n);return{c(){e=I("div"),l=I("div"),L(t.$$.fragment),i=K(),s&&s.c(),f=K(),o&&o.c(),r=fe(),this.h()},l(u){e=A(u,"DIV",{class:!0});var d=E(e);l=A(d,"DIV",{class:!0});var c=E(l);j(t.$$.fragment,c),c.forEach(h),i=J(d),s&&s.l(d),d.forEach(h),f=J(u),o&&o.l(u),r=fe(),this.h()},h(){y(l,"class","whitespace-nowrap"),y(e,"class","flex items-center justify-items-center")},m(u,d){V(u,e,d),v(e,l),O(t,l,null),v(e,i),s&&s.m(e,null),V(u,f,d),o&&o.m(u,d),V(u,r,d),a=!0},p(u,[d]){const c={};d&2&&(c.type=u[1]),d&9&&(c.$$scope={dirty:d,ctx:u}),t.$set(c),u[0].query.type==="semantic"||u[0].query.type==="concept"?s?(s.p(u,d),d&1&&g(s,1)):(s=Bl(u),s.c(),g(s,1),s.m(e,null)):s&&(re(),w(s,1,1,()=>{s=null}),se()),u[2]?o?o.p(u,d):(o=Rl(u),o.c(),o.m(r.parentNode,r)):o&&(o.d(1),o=null)},i(u){a||(g(t.$$.fragment,u),g(s),a=!0)},o(u){w(t.$$.fragment,u),w(s),a=!1},d(u){u&&h(e),Y(t),s&&s.d(),u&&h(f),o&&o.d(u),u&&h(r)}}}function za(n,e,l){let t,{search:i}=e,{tagType:f="outline"}=e;return n.$$set=r=>{"search"in r&&l(0,i=r.search),"tagType"in r&&l(1,f=r.tagType)},n.$$.update=()=>{n.$$.dirty&1&&l(2,t=i.query.type==="concept"?"":i.query.search)},[i,f,t]}class Pl extends be{constructor(e){super(),pe(this,e,za,ya,ge,{search:0,tagType:1})}}function Ma(n){let e;return{c(){e=W(n[2])},l(l){e=Z(l,n[2])},m(l,t){V(l,e,t)},p(l,t){t&4&&oe(e,l[2])},d(l){l&&h(e)}}}function Da(n){let e,l,t,i,f,r;return l=new Ct({props:{title:"query",interactive:!0,type:n[1],$$slots:{default:[Ma]},$$scope:{ctx:n}}}),l.$on("remove",n[7]),{c(){e=I("button"),L(l.$$.fragment),this.h()},l(a){e=A(a,"BUTTON",{class:!0});var s=E(e);j(l.$$.fragment,s),s.forEach(h),this.h()},h(){y(e,"class","search-pill items-center text-left")},m(a,s){V(a,e,s),O(l,e,null),i=!0,f||(r=[Re(t=Pe.call(null,e,{component:Pl,props:{search:n[0],tagType:n[1]}})),Ee(e,"click",n[6])],f=!0)},p(a,[s]){const o={};s&2&&(o.type=a[1]),s&516&&(o.$$scope={dirty:s,ctx:a}),l.$set(o),t&&dt(t.update)&&s&3&&t.update.call(null,{component:Pl,props:{search:a[0],tagType:a[1]}})},i(a){i||(g(l.$$.fragment,a),i=!0)},o(a){w(l.$$.fragment,a),i=!1},d(a){a&&h(e),Y(l),f=!1,Fe(r)}}}function Va(n,e,l){let t,i,f,{search:r}=e;const a={keyword:"outline",semantic:"teal",concept:"green"},s=qe(),o=Ze();ke(n,o,c=>l(3,f=c));function u(c){Ae.call(this,n,c)}const d=()=>{var c;return s.removeSearch(r,((c=f.selectRowsSchema)==null?void 0:c.data)||null)};return n.$$set=c=>{"search"in c&&l(0,r=c.search)},n.$$.update=()=>{n.$$.dirty&1&&l(2,t=r.query.type==="concept"?`${r.query.concept_namespace}/${r.query.concept_name}`:r.query.search),n.$$.dirty&1&&l(1,i=r.query.type!=null?a[r.query.type]:"outline")},[r,i,t,f,s,o,u,d]}class gn extends be{constructor(e){super(),pe(this,e,Va,Da,ge,{search:0})}}function Hl(n,e,l){const t=n.slice();return t[25]=e[l],t}function Fl(n,e,l){const t=n.slice();return t[28]=e[l],t}function ql(n,e,l){const t=n.slice();return t[31]=e[l],t}function Ca(n){let e,l,t,i=n[13],f=[];for(let s=0;sw(f[s],1,1,()=>{f[s]=null});let a=n[8]!=null&&n[8].length>0&&jl(n);return{c(){e=I("div");for(let s=0;s0?a?(a.p(s,o),o[0]&256&&g(a,1)):(a=jl(s),a.c(),g(a,1),a.m(e,null)):a&&(re(),w(a,1,1,()=>{a=null}),se())},i(s){if(!t){for(let o=0;ow(u[c],1,1,()=>{u[c]=null});return{c(){e=I("div"),l=I("div"),i=W(t),f=K(),r=I("div");for(let c=0;c{t=null}),se())},i(i){l||(g(t),l=!0)},o(i){w(t),l=!1},d(i){t&&t.d(i),i&&h(e)}}}function jl(n){let e,l,t,i,f,r,a=n[8],s=[];for(let u=0;uw(s[u],1,1,()=>{s[u]=null});return{c(){e=I("div"),l=I("div"),t=W("Filters"),i=K(),f=I("div");for(let u=0;u{r[u]=null}),se()),~e?(l=r[e],l?l.p(s,o):(l=r[e]=f[e](s),l.c()),g(l,1),l.m(t.parentNode,t)):l=null)},i(s){i||(g(l),i=!0)},o(s){w(l),i=!1},d(s){~e&&r[e].d(s),s&&h(t)}}}function Ba(n){var B,q,T;let e,l,t,i,f,r,a,s,o,u,d,c,m,_,b,p,z=n[13].length>0&&Ca(n),S=n[0]&&n[1]&&Wl(n),k=n[6]!=null&&Zl(n);u=new is({props:{size:"sm",titleText:"Sort by",class:"w-36",selectedId:n[5],items:n[7]}}),u.$on("select",n[16]),m=new Ke({props:{class:"top-2",kind:"ghost",expressive:!0,icon:((B=n[4])==null?void 0:B.order)==null?Vl:((q=n[4])==null?void 0:q.order)==="ASC"?yt:zt,disabled:n[4]==null,tooltipPosition:"bottom",tooltipAlignment:"end",iconDescription:((T=n[4])==null?void 0:T.order)==="ASC"?"Sorted ascending. Toggle to switch to descending.":"Sorted descending. Toggle to switch to ascending."}}),m.$on("click",n[17]);let M=n[2]&&Ql(n);return{c(){e=I("div"),l=I("div"),z&&z.c(),t=K(),i=I("div"),f=I("div"),S&&S.c(),r=K(),a=I("div"),s=I("div"),k&&k.c(),o=K(),L(u.$$.fragment),d=K(),c=I("div"),L(m.$$.fragment),_=K(),M&&M.c(),b=fe(),this.h()},l(C){e=A(C,"DIV",{class:!0});var P=E(e);l=A(P,"DIV",{class:!0});var R=E(l);z&&z.l(R),t=J(R),i=A(R,"DIV",{class:!0});var H=E(i);f=A(H,"DIV",{class:!0});var N=E(f);S&&S.l(N),N.forEach(h),r=J(H),a=A(H,"DIV",{class:!0});var U=E(a);s=A(U,"DIV",{class:!0});var ae=E(s);k&&k.l(ae),ae.forEach(h),o=J(U),j(u.$$.fragment,U),d=J(U),c=A(U,"DIV",{class:!0});var $=E(c);j(m.$$.fragment,$),$.forEach(h),U.forEach(h),H.forEach(h),R.forEach(h),P.forEach(h),_=J(C),M&&M.l(C),b=fe(),this.h()},h(){y(f,"class","self-end py-1"),y(s,"class","ml-1 w-8"),y(c,"class","ml-1"),y(a,"class","sort-container flex flex-row items-center"),y(i,"class","flex w-full flex-row items-end justify-between"),y(l,"class","flex w-full flex-col"),y(e,"class","mx-5 my-2 flex items-center justify-between")},m(C,P){V(C,e,P),v(e,l),z&&z.m(l,null),v(l,t),v(l,i),v(i,f),S&&S.m(f,null),v(i,r),v(i,a),v(a,s),k&&k.m(s,null),v(a,o),O(u,a,null),v(a,d),v(a,c),O(m,c,null),V(C,_,P),M&&M.m(C,P),V(C,b,P),p=!0},p(C,P){var N,U,ae;C[13].length>0&&z.p(C,P),C[0]&&C[1]?S?S.p(C,P):(S=Wl(C),S.c(),S.m(f,null)):S&&(S.d(1),S=null),C[6]!=null?k?(k.p(C,P),P[0]&64&&g(k,1)):(k=Zl(C),k.c(),g(k,1),k.m(s,null)):k&&(re(),w(k,1,1,()=>{k=null}),se());const R={};P[0]&32&&(R.selectedId=C[5]),P[0]&128&&(R.items=C[7]),u.$set(R);const H={};P[0]&16&&(H.icon=((N=C[4])==null?void 0:N.order)==null?Vl:((U=C[4])==null?void 0:U.order)==="ASC"?yt:zt),P[0]&16&&(H.disabled=C[4]==null),P[0]&16&&(H.iconDescription=((ae=C[4])==null?void 0:ae.order)==="ASC"?"Sorted ascending. Toggle to switch to descending.":"Sorted descending. Toggle to switch to ascending."),m.$set(H),C[2]?M?(M.p(C,P),P[0]&4&&g(M,1)):(M=Ql(C),M.c(),g(M,1),M.m(b.parentNode,b)):M&&(re(),w(M,1,1,()=>{M=null}),se())},i(C){p||(g(z),g(k),g(u.$$.fragment,C),g(m.$$.fragment,C),g(M),p=!0)},o(C){w(z),w(k),w(u.$$.fragment,C),w(m.$$.fragment,C),w(M),p=!1},d(C){C&&h(e),z&&z.d(),S&&S.d(),k&&k.d(),Y(u),Y(m),C&&h(_),M&&M.d(C),C&&h(b)}}}function Ra(n,e,l){let t,i,f,r,a,s,o,u,d,c,m=X,_=()=>(m(),m=Qe(t,ae=>l(10,c=ae)),t);n.$$.on_destroy.push(()=>m());let{totalNumRows:b}=e,{manifest:p}=e,z=qe();ke(n,z,ae=>l(21,d=ae));let S=Ze();ke(n,S,ae=>l(20,u=ae));let k=null;const M=["keyword","semantic","concept"],B={keyword:"Keyword",semantic:"Semantic",concept:"Concepts"};let q={};function T(ae){if(ae.query.type==="concept"){const $=ae.query;l(2,k={namespace:$.concept_namespace,name:$.concept_name})}}let C={};const P=ae=>{if(ae.detail.selectedId==null){z.setSortBy(null);return}z.setSortBy(Ot(ae.detail.selectedId))},R=()=>{r!=null&&z.setSortBy(r.path),z.setSortOrder((r==null?void 0:r.order)==="ASC"?"DESC":"ASC")},H=()=>{z.clearSorts()},N=ae=>T(ae),U=()=>l(2,k=null);return n.$$set=ae=>{"totalNumRows"in ae&&l(0,b=ae.totalNumRows),"manifest"in ae&&l(1,p=ae.manifest)},n.$$.update=()=>{var ae,$,te,Q;if(n.$$.dirty[0]&4&&_(l(9,t=k?In(k.namespace,k.name):void 0)),n.$$.dirty[0]&2097152&&l(19,i=Lt(d)),n.$$.dirty[0]&2097152&&l(8,f=d.queryOptions.filters),n.$$.dirty[0]&524296){l(3,q={});for(const le of i)le.query.type&&(le.query.type in q||l(3,q[le.query.type]=[],q),q[le.query.type].push(le))}if(n.$$.dirty[0]&1048576&&l(4,r=Cn(u)),n.$$.dirty[0]&1048576)for(const le of(($=(ae=u.selectRowsSchema)==null?void 0:ae.data)==null?void 0:$.search_results)||[])C[Ie(le.result_path)]=le;n.$$.dirty[0]&16&&l(5,a=r!=null&&r.path?Ie(r.path):null),n.$$.dirty[0]&2097152&&l(6,s=d.queryOptions.sort_by),n.$$.dirty[0]&1048672&&l(7,o=((Q=(te=u.selectRowsSchema)==null?void 0:te.data)==null?void 0:Q.schema)!=null?[{id:null,text:"None",disabled:s==null&&a!=null},...xn(u.selectRowsSchema.data.schema).map(le=>{const ye=Ie(le.path);return{id:ye,text:ye}})]:[])},[b,p,k,q,r,a,s,o,f,t,c,z,S,M,B,T,P,R,H,i,u,d,N,U]}class Pa extends be{constructor(e){super(),pe(this,e,Ra,Ba,ge,{totalNumRows:0,manifest:1},null,[-1,-1])}}function Kl(n,e,l){const t=n.slice();t[16]=e[l],t[19]=l;const i=t[2].length>1?`[${t[19]}]`:"";return t[17]=i,t}function Jl(n){let e,l,t,i=n[0].join(".")+n[17]+"",f,r,a,s,o,u;return s=new Tn({props:{text:Ve(n[16]),row:n[1],spanPaths:n[3],valuePaths:n[5],datasetViewStore:n[6],datasetStore:n[4]}}),{c(){e=I("div"),l=I("div"),t=I("div"),f=W(i),r=K(),a=I("div"),L(s.$$.fragment),o=K(),this.h()},l(d){e=A(d,"DIV",{class:!0});var c=E(e);l=A(c,"DIV",{class:!0});var m=E(l);t=A(m,"DIV",{class:!0});var _=E(t);f=Z(_,i),_.forEach(h),r=J(m),a=A(m,"DIV",{class:!0});var b=E(a);j(s.$$.fragment,b),b.forEach(h),m.forEach(h),o=J(c),c.forEach(h),this.h()},h(){y(t,"class","sticky top-0 z-10 w-full self-start border-t border-neutral-200 bg-neutral-100 px-2 py-2 pb-2 font-mono font-medium text-neutral-500"),y(a,"class","font-normal"),y(l,"class","flex w-full flex-col"),y(e,"class","flex flex-row")},m(d,c){V(d,e,c),v(e,l),v(l,t),v(t,f),v(l,r),v(l,a),O(s,a,null),v(e,o),u=!0},p(d,c){(!u||c&5)&&i!==(i=d[0].join(".")+d[17]+"")&&oe(f,i);const m={};c&4&&(m.text=Ve(d[16])),c&2&&(m.row=d[1]),c&8&&(m.spanPaths=d[3]),c&16&&(m.datasetStore=d[4]),s.$set(m)},i(d){u||(g(s.$$.fragment,d),u=!0)},o(d){w(s.$$.fragment,d),u=!1},d(d){d&&h(e),Y(s)}}}function Ha(n){let e,l,t=n[2],i=[];for(let r=0;rw(i[r],1,1,()=>{i[r]=null});return{c(){for(let r=0;rl(4,d=k));const S=d.visibleFields||[];return n.$$set=k=>{"path"in k&&l(0,c=k.path),"row"in k&&l(1,m=k.row),"field"in k&&l(8,_=k.field)},n.$$.update=()=>{if(n.$$.dirty&256&&l(14,t=_t(_)),n.$$.dirty&16384&&l(11,i=t.filter(k=>tr(k.signal))),n.$$.dirty&16384&&l(10,f=t.filter(k=>{var M;return((M=k.signal)==null?void 0:M.signal_name)==="concept_labels"})),n.$$.dirty&16384&&l(9,r=t.filter(k=>{var M;return((M=k.signal)==null?void 0:M.signal_name)==="semantic_similarity"})),n.$$.dirty&16384&&l(12,a=t.filter(k=>{var M;return((M=k.signal)==null?void 0:M.signal_name)==="substring_search"})),n.$$.dirty&16384&&l(13,s=t.filter(k=>k.dtype==="string_span")),n.$$.dirty&8192&&l(3,o=s.map(k=>k.path)),n.$$.dirty&15872)for(const k of s){const B=_t(k).filter(C=>C.dtype!="string_span").filter(C=>S==null?void 0:S.some(P=>tt(P.path,C.path))).filter(C=>C.dtype!=null&&C.dtype!="embedding"),q=k.path,T=a.find(C=>mt(k.path,C.path));if(T!=null){const C=T.signal;b.push({path:k.path,spanPath:q,type:"keyword",name:C.query,dtype:k.dtype,signal:C})}for(const C of B){const P=i.find(N=>mt(C.path,N.path)),R=f.find(N=>mt(C.path,N.path)),H=r.find(N=>mt(C.path,N.path));if(P!=null){const N=P.signal;b.push({path:C.path,spanPath:q,type:"concept_score",name:`${N.namespace}/${N.concept_name}`,dtype:C.dtype,signal:N})}else if(R!=null){const N=R.signal;b.push({path:C.path,spanPath:q,type:"label",name:`${N.namespace}/${N.concept_name} label`,dtype:C.dtype,signal:N})}else if(H!=null){const N=H.signal;b.push({path:C.path,spanPath:q,type:"semantic_similarity",name:`similarity: ${N.query}`,dtype:C.dtype,signal:N})}else b.push({path:C.path,spanPath:q,type:"metadata",name:C.path[C.path.length-1],dtype:C.dtype})}}n.$$.dirty&3&&l(2,u=lr(m,c).map(k=>Xe.value(k)).filter(ir))},[c,m,u,o,d,b,p,z,_,r,f,i,a,s,t]}class qa extends be{constructor(e){super(),pe(this,e,Fa,Ha,ge,{path:0,row:1,field:8})}}function La(n){let e,l,t,i,f;const r=[n[3],{type:n[0]?"green":"blue"},{icon:n[2]}];let a={};for(let s=0;s{e=ee(ee({},e),me(s)),l(3,i=he(e,t)),"isPreview"in s&&l(0,f=s.isPreview)},[f,r,a,i]}class Wt extends be{constructor(e){super(),pe(this,e,Oa,La,ge,{isPreview:0})}}function Gl(n,e,l){const t=n.slice();return t[0]=e[l],t}function Xl(n){let e,l,t=[],i=new Map,f,r=n[1];const a=s=>Ie(s[0].path);for(let s=0;s{B[P]=null}),se()),~u?(d=B[u],d?d.p(e,C):(d=B[u]=M[u](e),d.c()),g(d,1),d.m(o,null)):d=null),(!k||C&2)&&b!==(b=e[0].formattedValue+"")&&oe(p,b),(!k||C&2&&z!==(z=`${e[0].value}`))&&y(_,"title",z),(!k||C&2)&&G(_,"italic",e[0].formattedValue===null)},i(T){k||(g(d),k=!0)},o(T){w(d),k=!1},d(T){T&&h(l),~u&&B[u].d()}}}function Ua(n){let e,l,t=n[1].length>0&&Xl(n);return{c(){t&&t.c(),e=fe()},l(i){t&&t.l(i),e=fe()},m(i,f){t&&t.m(i,f),V(i,e,f),l=!0},p(i,[f]){i[1].length>0?t?(t.p(i,f),f&2&&g(t,1)):(t=Xl(i),t.c(),g(t,1),t.m(e.parentNode,e)):t&&(re(),w(t,1,1,()=>{t=null}),se())},i(i){l||(g(t),l=!0)},o(i){w(t),l=!1},d(i){t&&t.d(i),i&&h(e)}}}function Wa(n,e,l){let t,i,f,{row:r}=e,{visibleFields:a}=e;const s=Ze();ke(n,s,d=>l(5,i=d));const o=_n();ke(n,o,d=>l(6,f=d));function u(d){const c=nr(d).filter(_=>Nn(_,a)),m=c.filter(_=>{var b;return((b=Xe.field(_))==null?void 0:b.dtype)==="string_span"}).map(_=>Xe.path(_));return c.filter(_=>!m.some(b=>mt(Xe.path(_),b))).map(_=>{var B,q;const b=Xe.field(_),p=Xe.path(_);let z=Xe.value(_);if(b.dtype==="string_span")return null;const S=((B=f.data)==null?void 0:B.some(T=>{var C;return T.name===((C=b.signal)==null?void 0:C.signal_name)}))||!1,k=ft(b);let M;return S||k&&b.dtype==null||b.dtype==="embedding"||b.repeated_field!=null?M="":z==null?M=null:M=Ve(z),{indentLevel:p.length-1,fieldName:p[p.length-1],field:b,path:p,isSignal:k,isPreviewSignal:Vt(((q=i.selectRowsSchema)==null?void 0:q.data)||null,p),isEmbeddingSignal:S,value:z,formattedValue:M}}).filter(_=>_!=null)}return n.$$set=d=>{"row"in d&&l(0,r=d.row),"visibleFields"in d&&l(4,a=d.visibleFields)},n.$$.update=()=>{n.$$.dirty&1&&l(1,t=u(r))},[r,t,s,o,a]}class Za extends be{constructor(e){super(),pe(this,e,Wa,Ua,ge,{row:0,visibleFields:4})}}function xl(n,e,l){const t=n.slice();return t[5]=e[l],t[7]=l,t}function ei(n){let e,l=[],t=new Map,i,f,r=n[1];const a=s=>Ie(s[5].path);for(let s=0;sn[4].call(e))},m(s,o){V(s,e,o);for(let u=0;u0&&ei(n);return a=new Za({props:{row:n[0],visibleFields:n[2]}}),{c(){e=I("div"),l=I("div"),u&&u.c(),t=K(),i=I("div"),f=I("div"),r=I("div"),L(a.$$.fragment),this.h()},l(d){e=A(d,"DIV",{class:!0});var c=E(e);l=A(c,"DIV",{class:!0});var m=E(l);u&&u.l(m),t=J(m),i=A(m,"DIV",{class:!0});var _=E(i);f=A(_,"DIV",{class:!0});var b=E(f);r=A(b,"DIV",{style:!0,class:!0});var p=E(r);j(a.$$.fragment,p),p.forEach(h),b.forEach(h),_.forEach(h),m.forEach(h),c.forEach(h),this.h()},h(){y(r,"style",s=`max-height: ${Math.max(li,n[3])}px`),y(r,"class","overflow-y-auto"),y(f,"class","sticky top-0 self-start"),y(i,"class","flex h-full w-1/3 bg-neutral-100"),y(l,"class","flex h-full w-full flex-row"),y(e,"class","mx-5 mb-10 rounded border-x border-b border-neutral-200 shadow-md")},m(d,c){V(d,e,c),v(e,l),u&&u.m(l,null),v(l,t),v(l,i),v(i,f),v(f,r),O(a,r,null),o=!0},p(d,[c]){d[1].length>0?u?(u.p(d,c),c&2&&g(u,1)):(u=ei(d),u.c(),g(u,1),u.m(l,t)):u&&(re(),w(u,1,1,()=>{u=null}),se());const m={};c&1&&(m.row=d[0]),c&4&&(m.visibleFields=d[2]),a.$set(m),(!o||c&8&&s!==(s=`max-height: ${Math.max(li,d[3])}px`))&&y(r,"style",s)},i(d){o||(g(u),g(a.$$.fragment,d),o=!0)},o(d){w(u),w(a.$$.fragment,d),o=!1},d(d){d&&h(e),u&&u.d(),Y(a)}}}const li=320;function Ka(n,e,l){let{row:t}=e,{mediaFields:i}=e,{visibleFields:f}=e,r=0;function a(){r=this.clientHeight,l(3,r)}return n.$$set=s=>{"row"in s&&l(0,t=s.row),"mediaFields"in s&&l(1,i=s.mediaFields),"visibleFields"in s&&l(2,f=s.visibleFields)},[t,i,f,r,a]}class Ja extends be{constructor(e){super(),pe(this,e,Ka,Qa,ge,{row:0,mediaFields:1,visibleFields:2})}}function ii(n,e,l){const t=n.slice();return t[21]=e[l],t}function Ga(n){let e,l;return{c(){e=I("div"),l=W("No results."),this.h()},l(t){e=A(t,"DIV",{class:!0});var i=E(e);l=Z(i,"No results."),i.forEach(h),this.h()},h(){y(e,"class","mx-4 mt-8 w-full text-gray-600")},m(t,i){V(t,e,i),v(e,l)},p:X,i:X,o:X,d(t){t&&h(e)}}}function Xa(n){let e,l;return{c(){e=I("div"),l=W("Select fields to display"),this.h()},l(t){e=A(t,"DIV",{class:!0});var i=E(e);l=Z(i,"Select fields to display"),i.forEach(h),this.h()},h(){y(e,"class","mt-12 w-full text-center text-gray-600")},m(t,i){V(t,e,i),v(e,l)},p:X,i:X,o:X,d(t){t&&h(e)}}}function $a(n){let e,l;return e=new it({props:{paragraph:!0,lines:3}}),{c(){L(e.$$.fragment)},l(t){j(e.$$.fragment,t)},m(t,i){O(e,t,i),l=!0},p:X,i(t){l||(g(e.$$.fragment,t),l=!0)},o(t){w(e.$$.fragment,t),l=!1},d(t){Y(e,t)}}}function xa(n){var t,i;let e,l;return e=new Yt({props:{lowContrast:!0,title:"Could not fetch schema:",subtitle:((t=n[2].error.body)==null?void 0:t.detail)||((i=n[2])==null?void 0:i.error.message)}}),{c(){L(e.$$.fragment)},l(f){j(e.$$.fragment,f)},m(f,r){O(e,f,r),l=!0},p(f,r){var s,o;const a={};r&4&&(a.subtitle=((s=f[2].error.body)==null?void 0:s.detail)||((o=f[2])==null?void 0:o.error.message)),e.$set(a)},i(f){l||(g(e.$$.fragment,f),l=!0)},o(f){w(e.$$.fragment,f),l=!1},d(f){Y(e,f)}}}function ef(n){var t;let e,l;return e=new Yt({props:{lowContrast:!0,title:"Could not fetch rows:",subtitle:((t=n[3].error.body)==null?void 0:t.detail)||n[3].error.message}}),{c(){L(e.$$.fragment)},l(i){j(e.$$.fragment,i)},m(i,f){O(e,i,f),l=!0},p(i,f){var a;const r={};f&8&&(r.subtitle=((a=i[3].error.body)==null?void 0:a.detail)||i[3].error.message),e.$set(r)},i(i){l||(g(e.$$.fragment,i),l=!0)},o(i){w(e.$$.fragment,i),l=!1},d(i){Y(e,i)}}}function ni(n){let e,l=[],t=new Map,i,f,r=n[6];const a=o=>Xe.value(o[21][ar]);for(let o=0;o0&&si(n);return{c(){e=I("div");for(let o=0;o0?s?(s.p(o,u),u&64&&g(s,1)):(s=si(o),s.c(),g(s,1),s.m(e,null)):s&&(re(),w(s,1,1,()=>{s=null}),se())},i(o){if(!f){for(let u=0;u0&&n[4].isSuccess&&n[5]!=null&&ni(n);return{c(){L(e.$$.fragment),l=K(),i&&i.c(),f=K(),d&&d.c(),r=fe()},l(c){j(e.$$.fragment,c),l=J(c),i&&i.l(c),f=J(c),d&&d.l(c),r=fe()},m(c,m){O(e,c,m),V(c,l,m),~t&&o[t].m(c,m),V(c,f,m),d&&d.m(c,m),V(c,r,m),a=!0},p(c,[m]){const _={};m&128&&(_.totalNumRows=c[7]),m&1024&&(_.manifest=c[10].data),e.$set(_);let b=t;t=u(c),t===b?~t&&o[t].p(c,m):(i&&(re(),w(o[b],1,1,()=>{o[b]=null}),se()),~t?(i=o[t],i?i.p(c,m):(i=o[t]=s[t](c),i.c()),g(i,1),i.m(f.parentNode,f)):i=null),c[6]&&c[1].length>0&&c[4].isSuccess&&c[5]!=null?d?(d.p(c,m),m&114&&g(d,1)):(d=ni(c),d.c(),g(d,1),d.m(r.parentNode,r)):d&&(re(),w(d,1,1,()=>{d=null}),se())},i(c){a||(g(e.$$.fragment,c),g(i),g(d),a=!0)},o(c){w(e.$$.fragment,c),w(i),w(d),a=!1},d(c){Y(e,c),c&&h(l),~t&&o[t].d(c),c&&h(f),d&&d.d(c),c&&h(r)}}}function lf(n,e,l){let t,i,f,r,a,s,o,u,d,c,m,_=X,b=()=>(_(),_=Qe(r,N=>l(3,m=N)),r),p,z,S=X,k=()=>(S(),S=Qe(t,N=>l(4,z=N)),t),M;n.$$.on_destroy.push(()=>_()),n.$$.on_destroy.push(()=>S());let B=qe();ke(n,B,N=>l(17,p=N));let q=Ze();ke(n,q,N=>l(16,c=N));const T=rr(p.namespace,p.datasetName);ke(n,T,N=>l(10,M=N));let C=null;const P=Le(C),R=()=>m==null?void 0:m.fetchNextPage();function H(N){He[N?"unshift":"push"](()=>{C=N,l(0,C)})}return n.$$.update=()=>{var N,U,ae,$;n.$$.dirty&131072&&k(l(9,t=on(p.namespace,p.datasetName))),n.$$.dirty&131088&&l(15,i=z.isSuccess?Bn(p):void 0),n.$$.dirty&65536&&l(2,f=c.selectRowsSchema),n.$$.dirty&163844&&b(l(8,r=sr(p.namespace,p.datasetName,i||{},f!=null&&f.isSuccess?f.data.schema:void 0))),n.$$.dirty&8&&l(7,a=(N=m.data)==null?void 0:N.pages[0].total_num_rows),n.$$.dirty&8&&l(6,s=(U=m.data)==null?void 0:U.pages.flatMap(te=>te.rows)),n.$$.dirty&65536&&l(1,o=(c.visibleFields||[]).sort((te,Q)=>Ie(te.path)>Ie(Q.path)?1:-1)),n.$$.dirty&6&&l(14,u=((ae=f==null?void 0:f.data)==null?void 0:ae.schema)!=null?Rn(($=f==null?void 0:f.data)==null?void 0:$.schema,o):null),n.$$.dirty&81920&&l(5,d=u!=null?Pn(u,c.stats||[]):[]),n.$$.dirty&1&&P.set(C)},Pt(Hn,P),[C,o,f,m,z,d,s,a,r,t,M,B,q,T,u,i,c,p,R,H]}class nf extends be{constructor(e){super(),pe(this,e,lf,tf,ge,{})}}function ai(n,e,l){const t=n.slice();return t[35]=e[l],t}function fi(n,e,l){const t=n.slice();return t[38]=e[l],t}function rf(n){let e,l=n[41].text+"",t;return{c(){e=I("div"),t=W(l)},l(i){e=A(i,"DIV",{});var f=E(e);t=Z(f,l),f.forEach(h)},m(i,f){V(i,e,f),v(e,t)},p(i,f){f[1]&1024&&l!==(l=i[41].text+"")&&oe(t,l)},i:X,o:X,d(i){i&&h(e)}}}function sf(n){let e,l,t,i,f,r,a;return l=new lt({props:{$$slots:{default:[ff]},$$scope:{ctx:n}}}),{c(){e=I("div"),L(l.$$.fragment),t=K(),i=I("div"),f=W(`Keyword search: `),r=W(n[0]),this.h()},l(s){e=A(s,"DIV",{class:!0});var o=E(e);j(l.$$.fragment,o),t=J(o),i=A(o,"DIV",{class:!0});var u=E(i);f=Z(u,`Keyword search: `),r=Z(u,n[0]),u.forEach(h),o.forEach(h),this.h()},h(){y(i,"class","ml-2"),y(e,"class","new-keyword flex flex-row items-center justify-items-center")},m(s,o){V(s,e,o),O(l,e,null),v(e,t),v(e,i),v(i,f),v(i,r),a=!0},p(s,o){const u={};o[1]&2048&&(u.$$scope={dirty:o,ctx:s}),l.$set(u),(!a||o[0]&1)&&oe(r,s[0])},i(s){a||(g(l.$$.fragment,s),a=!0)},o(s){w(l.$$.fragment,s),a=!1},d(s){s&&h(e),Y(l)}}}function af(n){let e,l,t,i,f,r=n[0]!=""?":":"",a,s,o,u;return l=new lt({props:{$$slots:{default:[of]},$$scope:{ctx:n}}}),{c(){e=I("div"),L(l.$$.fragment),t=K(),i=I("div"),f=W("New concept"),a=W(r),s=K(),o=W(n[0]),this.h()},l(d){e=A(d,"DIV",{class:!0});var c=E(e);j(l.$$.fragment,c),t=J(c),i=A(c,"DIV",{class:!0});var m=E(i);f=Z(m,"New concept"),a=Z(m,r),s=J(m),o=Z(m,n[0]),m.forEach(h),c.forEach(h),this.h()},h(){y(i,"class","ml-2"),y(e,"class","new-concept flex flex-row items-center justify-items-center")},m(d,c){V(d,e,c),O(l,e,null),v(e,t),v(e,i),v(i,f),v(i,a),v(i,s),v(i,o),u=!0},p(d,c){const m={};c[1]&2048&&(m.$$scope={dirty:c,ctx:d}),l.$set(m),(!u||c[0]&1)&&r!==(r=d[0]!=""?":":"")&&oe(a,r),(!u||c[0]&1)&&oe(o,d[0])},i(d){u||(g(l.$$.fragment,d),u=!0)},o(d){w(l.$$.fragment,d),u=!1},d(d){d&&h(e),Y(l)}}}function ff(n){let e,l;return e=new ea({}),{c(){L(e.$$.fragment)},l(t){j(e.$$.fragment,t)},m(t,i){O(e,t,i),l=!0},i(t){l||(g(e.$$.fragment,t),l=!0)},o(t){w(e.$$.fragment,t),l=!1},d(t){Y(e,t)}}}function of(n){let e,l;return e=new ps({}),{c(){L(e.$$.fragment)},l(t){j(e.$$.fragment,t)},m(t,i){O(e,t,i),l=!0},i(t){l||(g(e.$$.fragment,t),l=!0)},o(t){w(e.$$.fragment,t),l=!1},d(t){Y(e,t)}}}function uf(n){let e,l,t,i;const f=[af,sf,rf],r=[];function a(s,o){return s[41].id==="new-concept"?0:s[41].id==="keyword-search"?1:2}return e=a(n),l=r[e]=f[e](n),{c(){l.c(),t=fe()},l(s){l.l(s),t=fe()},m(s,o){r[e].m(s,o),V(s,t,o),i=!0},p(s,o){let u=e;e=a(s),e===u?r[e].p(s,o):(re(),w(r[u],1,1,()=>{r[u]=null}),se(),l=r[e],l?l.p(s,o):(l=r[e]=f[e](s),l.c()),g(l,1),l.m(t.parentNode,t))},i(s){i||(g(l),i=!0)},o(s){w(l),i=!1},d(s){r[e].d(s),s&&h(t)}}}function oi(n){let e,l;return e=new mn({props:{value:Ie(n[38]),text:Ie(n[38])}}),{c(){L(e.$$.fragment)},l(t){j(e.$$.fragment,t)},m(t,i){O(e,t,i),l=!0},p(t,i){const f={};i[0]&512&&(f.value=Ie(t[38])),i[0]&512&&(f.text=Ie(t[38])),e.$set(f)},i(t){l||(g(e.$$.fragment,t),l=!0)},o(t){w(e.$$.fragment,t),l=!1},d(t){Y(e,t)}}}function cf(n){let e,l,t=n[9],i=[];for(let r=0;rw(i[r],1,1,()=>{i[r]=null});return{c(){for(let r=0;rw(i[r],1,1,()=>{i[r]=null});return{c(){for(let r=0;r({41:P}),({item:P})=>[0,P?1024:0]]},$$scope:{ctx:n}};n[0]!==void 0&&(T.value=n[0]),u=new yr({props:T}),n[28](u),He.push(()=>rn(u,"value",q)),u.$on("select",n[17]);let C=ui(n);return S=new hn({props:{size:"xl",selected:n[2]||"",name:n[2]||"",$$slots:{default:[df]},$$scope:{ctx:n}}}),S.$on("change",n[15]),{c(){e=I("div"),l=I("div"),L(t.$$.fragment),i=K(),f=I("div"),r=I("div"),a=I("div"),s=I("div"),o=I("div"),L(u.$$.fragment),c=K(),m=I("div"),C.c(),b=K(),p=I("div"),z=I("div"),L(S.$$.fragment),this.h()},l(P){e=A(P,"DIV",{class:!0});var R=E(e);l=A(R,"DIV",{class:!0});var H=E(l);j(t.$$.fragment,H),H.forEach(h),i=J(R),f=A(R,"DIV",{class:!0});var N=E(f);r=A(N,"DIV",{class:!0});var U=E(r);a=A(U,"DIV",{class:!0});var ae=E(a);s=A(ae,"DIV",{class:!0});var $=E(s);o=A($,"DIV",{class:!0});var te=E(o);j(u.$$.fragment,te),te.forEach(h),$.forEach(h),ae.forEach(h),U.forEach(h),N.forEach(h),c=J(R),m=A(R,"DIV",{class:!0});var Q=E(m);C.l(Q),Q.forEach(h),b=J(R),p=A(R,"DIV",{class:!0});var le=E(p);z=A(le,"DIV",{class:!0});var ye=E(z);j(S.$$.fragment,ye),ye.forEach(h),le.forEach(h),R.forEach(h),this.h()},h(){y(l,"class","compute-embedding mr-1"),G(l,"compute-embedding-indexing",n[8]),y(o,"class","flex-grow"),y(s,"class","flex w-full flex-row items-start justify-items-start"),y(a,"class","flex flex-row"),y(r,"class","w-full"),y(f,"class","search-container flex w-full flex-grow flex-row"),y(m,"class","mx-1"),y(z,"class","w-28"),y(p,"class","embedding-select mr-8 flex flex-row"),y(e,"class","border-1 flex w-full flex-row items-center px-4")},m(P,R){V(P,e,R),v(e,l),O(t,l,null),v(e,i),v(e,f),v(f,r),v(r,a),v(a,s),v(s,o),O(u,o,null),v(e,c),v(e,m),C.m(m,null),v(e,b),v(e,p),v(p,z),O(S,z,null),k=!0,M||(B=[Re(Pe.call(null,m,{text:"Select the field to search over."})),Re(Pe.call(null,z,{text:"Select the embedding to use."}))],M=!0)},p(P,R){const H={};R[0]&264&&(H.disabled=P[3]||P[8]),R[0]&264&&(H.icon=P[3]?Qt:P[8]?Kt:Bt),t.$set(H),(!k||R[0]&256)&&G(l,"compute-embedding-indexing",P[8]);const N={};R[0]&32&&(N.items=P[5]),R[0]&128&&(N.placeholder=P[7]),R[0]&1|R[1]&3072&&(N.$$scope={dirty:R,ctx:P}),!d&&R[0]&1&&(d=!0,N.value=P[0],sn(()=>d=!1)),u.$set(N),R[0]&512&&ge(_,_=P[9])?(re(),w(C,1,1,X),se(),C=ui(P),C.c(),g(C,1),C.m(m,null)):C.p(P,R);const U={};R[0]&4&&(U.selected=P[2]||""),R[0]&4&&(U.name=P[2]||""),R[0]&16|R[1]&2048&&(U.$$scope={dirty:R,ctx:P}),S.$set(U)},i(P){k||(g(t.$$.fragment,P),g(u.$$.fragment,P),g(C),g(S.$$.fragment,P),k=!0)},o(P){w(t.$$.fragment,P),w(u.$$.fragment,P),w(C),w(S.$$.fragment,P),k=!1},d(P){P&&h(e),Y(t),n[28](null),Y(u),C.d(P),Y(S),M=!1,Fe(B)}}}const mf=(n,e)=>n.text.toLowerCase().includes(e.toLowerCase())||n.id==="new-concept";function _f(n,e,l){let t,i,f,r,a,s,o,u,d,c,m,_,b,p,z,S,k=qe();ke(n,k,ce=>l(26,S=ce));let M=Ze();ke(n,M,ce=>l(25,p=ce));const B=un();ke(n,B,ce=>l(32,_=ce));const q=_n();ke(n,q,ce=>l(4,z=ce));const T=(ce,ve)=>`${Ie(ce||"")}_${ve}`;let C={};const P=Fn();ke(n,P,ce=>l(24,b=ce));let R=[],H="",N;const U=ce=>{l(2,s=ce.target.value),k.setSearchEmbedding(ce.target.value)},ae=()=>{s!=null&&(l(19,C[T(f,s)]=!0,C),_.mutate([t,i,{leaf_path:Ot(f||[]),signal:{signal_name:s}}]))};let $;const te=(ce,ve)=>{f==null||s==null||(k.addSearch({path:[Ie(f)],query:{type:"concept",concept_namespace:ce,concept_name:ve,embedding:s}}),$.clear())},Q=ce=>{if(!(f==null||s==null)){if(ce.detail.selectedId==="new-concept"){H===N.id&&l(0,H="");const ve=H.split("/",2);let Me="",ze="";ve.length===2?[Me,ze]=ve:[ze]=ve,xe({command:et.CreateConcept,namespace:Me,conceptName:ze,onCreate:F=>te(F.detail.namespace,F.detail.name)}),$.clear();return}else if(ce.detail.selectedId==="keyword-search"){if(H=="")return;k.addSearch({path:[Ie(f)],query:{type:"keyword",search:H}});return}te(ce.detail.selectedId.namespace,ce.detail.selectedId.name)}},le=ce=>{k.setSearchPath(ce.target.value)},ye=()=>{ae()};function ue(ce){He[ce?"unshift":"push"](()=>{$=ce,l(6,$)})}function de(ce){H=ce,l(0,H)}return n.$$.update=()=>{n.$$.dirty[0]&67108864&&(t=S.namespace),n.$$.dirty[0]&67108864&&(i=S.datasetName),n.$$.dirty[0]&100663296&&l(1,f=qn(S,p)),n.$$.dirty[0]&67108866&&l(21,r=Lt(S,f)),n.$$.dirty[0]&33554432&&l(9,a=(p.visibleFields||[]).filter(ce=>ce.dtype==="string").map(ce=>Ie(ce.path))),n.$$.dirty[0]&100663314&&l(2,s=Ln(S,p,f,(z.data||[]).map(ce=>ce.name))),n.$$.dirty[0]&33554434&&l(23,o=On(p,f)),n.$$.dirty[0]&8388612&&l(3,u=o!=null&&!!o.includes(s||"")),n.$$.dirty[0]&524302&&l(8,d=!u&&C[T(f,s)]),n.$$.dirty[0]&8&&l(7,c=u?"Search by concept or keyword.":"Search by keyword. Click index to search by concept."),n.$$.dirty[0]&9&&l(20,N={id:"new-concept",text:H,disabled:!u}),n.$$.dirty[0]&1&&l(22,m={id:"keyword-search",text:H}),n.$$.dirty[0]&24117257&&l(5,R=b!=null&&b.data?[N,...H!=""?[m]:[],...b.data.map(ce=>({id:{namespace:ce.namespace,name:ce.name},text:`${ce.namespace}/${ce.name}`,disabled:!u||r.some(ve=>ve.query.type==="concept"&&ve.query.concept_namespace===ce.namespace&&ve.query.concept_name===ce.name)}))]:[])},[H,f,s,u,z,R,$,c,d,a,k,M,B,q,P,U,ae,Q,le,C,N,r,m,o,b,p,S,ye,ue,de]}class gf extends be{constructor(e){super(),pe(this,e,_f,hf,ge,{},null,[-1,-1])}}function bf(n){let e,l;return e=new Ke({props:{$$slots:{default:[vf]},$$scope:{ctx:n}}}),e.$on("click",n[5]),{c(){L(e.$$.fragment)},l(t){j(e.$$.fragment,t)},m(t,i){O(e,t,i),l=!0},p(t,i){const f={};i&512&&(f.$$scope={dirty:i,ctx:t}),e.$set(f)},i(t){l||(g(e.$$.fragment,t),l=!0)},o(t){w(e.$$.fragment,t),l=!1},d(t){Y(e,t)}}}function pf(n){let e,l;return{c(){e=I("span"),l=W("Invalid query"),this.h()},l(t){e=A(t,"SPAN",{class:!0});var i=E(e);l=Z(i,"Invalid query"),i.forEach(h),this.h()},h(){y(e,"class","text-red-500")},m(t,i){V(t,e,i),v(e,l)},p:X,i:X,o:X,d(t){t&&h(e)}}}function vf(n){let e;return{c(){e=W("Apply")},l(l){e=Z(l,"Apply")},m(l,t){V(l,e,t)},d(l){l&&h(e)}}}function wf(n){let e,l,t,i,f,r,a,s,o,u,d;const c=[pf,bf],m=[];function _(b,p){return b[0]?b[3]?1:-1:0}return~(r=_(n))&&(a=m[r]=c[r](n)),{c(){e=I("pre"),l=W(""),t=W(n[2]),i=W(` `),f=K(),a&&a.c(),s=fe(),this.h()},l(b){e=A(b,"PRE",{class:!0,contenteditable:!0});var p=E(e);l=Z(p,""),t=Z(p,n[2]),i=Z(p,` `),p.forEach(h),f=J(b),a&&a.l(b),s=fe(),this.h()},h(){y(e,"class","whitespace-pre bg-gray-50 p-4 font-mono"),y(e,"contenteditable",""),n[1]===void 0&&bt(()=>n[8].call(e)),G(e,"outline-red-500",!n[0])},m(b,p){V(b,e,p),v(e,l),v(e,t),v(e,i),n[1]!==void 0&&(e.innerText=n[1]),V(b,f,p),~r&&m[r].m(b,p),V(b,s,p),o=!0,u||(d=Ee(e,"input",n[8]),u=!0)},p(b,[p]){(!o||p&4)&&Mn(t,b[2]),p&2&&b[1]!==e.innerText&&(e.innerText=b[1]),(!o||p&1)&&G(e,"outline-red-500",!b[0]);let z=r;r=_(b),r===z?~r&&m[r].p(b,p):(a&&(re(),w(m[z],1,1,()=>{m[z]=null}),se()),~r?(a=m[r],a?a.p(b,p):(a=m[r]=c[r](b),a.c()),g(a,1),a.m(s.parentNode,s)):a=null)},i(b){o||(g(a),o=!0)},o(b){w(a),o=!1},d(b){b&&h(e),b&&h(f),~r&&m[r].d(b),b&&h(s),u=!1,d()}}}function kf(n,e,l){let t,i,f,r,a;const s=qe();ke(n,s,c=>l(7,a=c));let o=!0;function u(){rt(s,a.queryOptions=JSON.parse(f),a)}function d(){f=this.innerText,l(1,f),l(2,i),l(6,t),l(7,a)}return n.$$.update=()=>{if(n.$$.dirty&128&&l(6,t=a.queryOptions),n.$$.dirty&64&&l(2,i=t?JSON.stringify(t,null,2):""),n.$$.dirty&4&&l(1,f=i),n.$$.dirty&2)try{JSON.parse(f),l(0,o=!0)}catch{l(0,o=!1)}n.$$.dirty&67&&l(3,r=o&&!Yn(JSON.parse(f),t))},[o,f,i,r,s,u,t,a,d]}class Ef extends be{constructor(e){super(),pe(this,e,kf,wf,ge,{})}}function di(n){let e,l;return e=new qr({props:{light:!0,flipped:!0,$$slots:{default:[Sf]},$$scope:{ctx:n}}}),{c(){L(e.$$.fragment)},l(t){j(e.$$.fragment,t)},m(t,i){O(e,t,i),l=!0},p(t,i){const f={};i&67108927&&(f.$$scope={dirty:i,ctx:t}),e.$set(f)},i(t){l||(g(e.$$.fragment,t),l=!0)},o(t){w(e.$$.fragment,t),l=!1},d(t){Y(e,t)}}}function hi(n){let e,l;return e=new ht({props:{text:"Sort by"}}),e.$on("click",n[16]),{c(){L(e.$$.fragment)},l(t){j(e.$$.fragment,t)},m(t,i){O(e,t,i),l=!0},p:X,i(t){l||(g(e.$$.fragment,t),l=!0)},o(t){w(e.$$.fragment,t),l=!1},d(t){Y(e,t)}}}function mi(n){let e,l;return e=new ht({props:{text:"Filter"}}),e.$on("click",n[17]),{c(){L(e.$$.fragment)},l(t){j(e.$$.fragment,t)},m(t,i){O(e,t,i),l=!0},p:X,i(t){l||(g(e.$$.fragment,t),l=!0)},o(t){w(e.$$.fragment,t),l=!1},d(t){Y(e,t)}}}function _i(n){let e,l;return e=new ht({props:{text:"Compute embedding"}}),e.$on("click",n[18]),{c(){L(e.$$.fragment)},l(t){j(e.$$.fragment,t)},m(t,i){O(e,t,i),l=!0},p:X,i(t){l||(g(e.$$.fragment,t),l=!0)},o(t){w(e.$$.fragment,t),l=!1},d(t){Y(e,t)}}}function gi(n){let e,l;return e=new ht({props:{text:"Preview signal"}}),e.$on("click",n[19]),{c(){L(e.$$.fragment)},l(t){j(e.$$.fragment,t)},m(t,i){O(e,t,i),l=!0},p:X,i(t){l||(g(e.$$.fragment,t),l=!0)},o(t){w(e.$$.fragment,t),l=!1},d(t){Y(e,t)}}}function bi(n){let e,l;return e=new ht({props:{text:"Compute signal"}}),e.$on("click",n[20]),{c(){L(e.$$.fragment)},l(t){j(e.$$.fragment,t)},m(t,i){O(e,t,i),l=!0},p:X,i(t){l||(g(e.$$.fragment,t),l=!0)},o(t){w(e.$$.fragment,t),l=!1},d(t){Y(e,t)}}}function pi(n){let e,l;return e=new ht({props:{text:"Delete signal"}}),e.$on("click",n[21]),{c(){L(e.$$.fragment)},l(t){j(e.$$.fragment,t)},m(t,i){O(e,t,i),l=!0},p:X,i(t){l||(g(e.$$.fragment,t),l=!0)},o(t){w(e.$$.fragment,t),l=!1},d(t){Y(e,t)}}}function Sf(n){let e=Et(n[0]),l,t=Rt(n[0]),i,f,r,a,s,o,u=e&&hi(n),d=t&&mi(n),c=!n[2]&&_i(n),m=!n[2]&&gi(n),_=!n[2]&&bi(n),b=n[1]&&pi(n);return{c(){u&&u.c(),l=K(),d&&d.c(),i=K(),c&&c.c(),f=K(),m&&m.c(),r=K(),_&&_.c(),a=K(),b&&b.c(),s=fe()},l(p){u&&u.l(p),l=J(p),d&&d.l(p),i=J(p),c&&c.l(p),f=J(p),m&&m.l(p),r=J(p),_&&_.l(p),a=J(p),b&&b.l(p),s=fe()},m(p,z){u&&u.m(p,z),V(p,l,z),d&&d.m(p,z),V(p,i,z),c&&c.m(p,z),V(p,f,z),m&&m.m(p,z),V(p,r,z),_&&_.m(p,z),V(p,a,z),b&&b.m(p,z),V(p,s,z),o=!0},p(p,z){z&1&&(e=Et(p[0])),e?u?(u.p(p,z),z&1&&g(u,1)):(u=hi(p),u.c(),g(u,1),u.m(l.parentNode,l)):u&&(re(),w(u,1,1,()=>{u=null}),se()),z&1&&(t=Rt(p[0])),t?d?(d.p(p,z),z&1&&g(d,1)):(d=mi(p),d.c(),g(d,1),d.m(i.parentNode,i)):d&&(re(),w(d,1,1,()=>{d=null}),se()),p[2]?c&&(re(),w(c,1,1,()=>{c=null}),se()):c?(c.p(p,z),z&4&&g(c,1)):(c=_i(p),c.c(),g(c,1),c.m(f.parentNode,f)),p[2]?m&&(re(),w(m,1,1,()=>{m=null}),se()):m?(m.p(p,z),z&4&&g(m,1)):(m=gi(p),m.c(),g(m,1),m.m(r.parentNode,r)),p[2]?_&&(re(),w(_,1,1,()=>{_=null}),se()):_?(_.p(p,z),z&4&&g(_,1)):(_=bi(p),_.c(),g(_,1),_.m(a.parentNode,a)),p[1]?b?(b.p(p,z),z&2&&g(b,1)):(b=pi(p),b.c(),g(b,1),b.m(s.parentNode,s)):b&&(re(),w(b,1,1,()=>{b=null}),se())},i(p){o||(g(u),g(d),g(c),g(m),g(_),g(b),o=!0)},o(p){w(u),w(d),w(c),w(m),w(_),w(b),o=!1},d(p){u&&u.d(p),p&&h(l),d&&d.d(p),p&&h(i),c&&c.d(p),p&&h(f),m&&m.d(p),p&&h(r),_&&_.d(p),p&&h(a),b&&b.d(p),p&&h(s)}}}function yf(n){let e,l,t,i=Ie(n[0].path)+"",f,r,a,s,o;return{c(){e=I("p"),l=W("Confirm deleting "),t=I("code"),f=W(i),r=W(" ?"),a=K(),s=I("p"),o=W("This is a permanent action and cannot be undone."),this.h()},l(u){e=A(u,"P",{class:!0});var d=E(e);l=Z(d,"Confirm deleting "),t=A(d,"CODE",{});var c=E(t);f=Z(c,i),c.forEach(h),r=Z(d," ?"),d.forEach(h),a=J(u),s=A(u,"P",{class:!0});var m=E(s);o=Z(m,"This is a permanent action and cannot be undone."),m.forEach(h),this.h()},h(){y(e,"class","!text-lg"),y(s,"class","mt-2")},m(u,d){V(u,e,d),v(e,l),v(e,t),v(t,f),v(e,r),V(u,a,d),V(u,s,d),v(s,o)},p(u,d){d&1&&i!==(i=Ie(u[0].path)+"")&&oe(f,i)},d(u){u&&h(e),u&&h(a),u&&h(s)}}}function zf(n){let e,l,t,i,f=n[6]&&di(n);function r(s){n[22](s)}let a={danger:!0,modalHeading:"Delete signal",primaryButtonText:"Delete",primaryButtonIcon:n[7].isLoading?kt:void 0,secondaryButtonText:"Cancel",$$slots:{default:[yf]},$$scope:{ctx:n}};return n[3]!==void 0&&(a.open=n[3]),l=new jt({props:a}),He.push(()=>rn(l,"open",r)),l.$on("click:button--secondary",n[23]),l.$on("open",n[24]),l.$on("close",n[25]),l.$on("submit",n[11]),{c(){f&&f.c(),e=K(),L(l.$$.fragment)},l(s){f&&f.l(s),e=J(s),j(l.$$.fragment,s)},m(s,o){f&&f.m(s,o),V(s,e,o),O(l,s,o),i=!0},p(s,[o]){s[6]?f?(f.p(s,o),o&64&&g(f,1)):(f=di(s),f.c(),g(f,1),f.m(e.parentNode,e)):f&&(re(),w(f,1,1,()=>{f=null}),se());const u={};o&128&&(u.primaryButtonIcon=s[7].isLoading?kt:void 0),o&67108865&&(u.$$scope={dirty:o,ctx:s}),!t&&o&8&&(t=!0,u.open=s[3],sn(()=>t=!1)),l.$set(u)},i(s){i||(g(f),g(l.$$.fragment,s),i=!0)},o(s){w(f),w(l.$$.fragment,s),i=!1},d(s){f&&f.d(s),s&&h(e),Y(l,s)}}}function Mf(n,e,l){let t,i,f,r,a,s,o,u,d,{field:c}=e,{schema:m}=e,_=!1;const b=qe();ke(n,b,U=>l(15,d=U));const p=Ze();ke(n,p,U=>l(14,u=U));const z=fr();ke(n,z,U=>l(7,o=U));function S(){o.mutate([t,i,{signal_path:c.path}],{onSuccess:()=>{l(3,_=!1),b.deleteSignal(c.path)}})}const k=()=>b.addSortBy(c.path),M=()=>xe({command:et.EditFilter,namespace:t,datasetName:i,path:c.path}),B=()=>xe({command:et.ComputeEmbedding,namespace:t,datasetName:i,path:c==null?void 0:c.path}),q=()=>xe({command:et.PreviewConcept,namespace:t,datasetName:i,path:c==null?void 0:c.path}),T=()=>xe({command:et.ComputeSignal,namespace:t,datasetName:i,path:c==null?void 0:c.path}),C=()=>l(3,_=!0);function P(U){_=U,l(3,_)}const R=()=>l(3,_=!1);function H(U){Ae.call(this,n,U)}function N(U){Ae.call(this,n,U)}return n.$$set=U=>{"field"in U&&l(0,c=U.field),"schema"in U&&l(12,m=U.schema)},n.$$.update=()=>{var U;n.$$.dirty&32768&&l(5,t=d.namespace),n.$$.dirty&32768&&l(4,i=d.datasetName),n.$$.dirty&4097&&l(2,f=gt(c,m)),n.$$.dirty&1&&l(1,r=ft(c)),n.$$.dirty&16385&&l(13,a=Vt(((U=u.selectRowsSchema)==null?void 0:U.data)||null,c.path)),n.$$.dirty&8199&&l(6,s=(Et(c)||Rt(c)||!f||r)&&!a)},[c,r,f,_,i,t,s,o,b,p,z,S,m,a,u,d,k,M,B,q,T,C,P,R,H,N]}class bn extends be{constructor(e){super(),pe(this,e,Mf,zf,ge,{field:0,schema:12})}}function vi(n,e,l){const t=n.slice();t[7]=e[l][0],t[8]=e[l][1];const i=t[2](t[7]);t[9]=i;const f=`${t[8]/t[1]*100}%`;t[10]=f;const r=Ve(t[8]);return t[11]=r,t}function wi(n){let e,l,t=n[9]+"",i,f,r,a,s,o=n[11]+"",u,d,c,m,_;function b(){return n[6](n[7])}return{c(){e=I("button"),l=I("div"),i=W(t),r=K(),a=I("div"),s=I("div"),u=W(o),c=K(),this.h()},l(p){e=A(p,"BUTTON",{class:!0});var z=E(e);l=A(z,"DIV",{title:!0,class:!0});var S=E(l);i=Z(S,t),S.forEach(h),r=J(z),a=A(z,"DIV",{class:!0});var k=E(a);s=A(k,"DIV",{title:!0,class:!0});var M=E(s);u=Z(M,o),M.forEach(h),k.forEach(h),c=J(z),z.forEach(h),this.h()},h(){y(l,"title",f=n[9]),y(l,"class","w-48 flex-none truncate px-2"),y(s,"title",d=n[11]),y(s,"class","histogram-bar my-px bg-indigo-200 pl-2 text-xs leading-5"),Oe(s,"width",n[10]),y(a,"class","w-36 border-l border-gray-300 pl-2"),y(e,"class","flex items-center text-left text-xs text-black hover:bg-gray-200")},m(p,z){V(p,e,z),v(e,l),v(l,i),v(e,r),v(e,a),v(a,s),v(s,u),v(e,c),m||(_=Ee(e,"click",b),m=!0)},p(p,z){n=p,z&1&&t!==(t=n[9]+"")&&oe(i,t),z&1&&f!==(f=n[9])&&y(l,"title",f),z&1&&o!==(o=n[11]+"")&&oe(u,o),z&1&&d!==(d=n[11])&&y(s,"title",d),z&3&&Oe(s,"width",n[10])},d(p){p&&h(e),m=!1,_()}}}function Df(n){let e,l=n[0],t=[];for(let i=0;is("row-click",{value:u});return n.$$set=u=>{"field"in u&&l(4,i=u.field),"counts"in u&&l(0,f=u.counts),"bins"in u&&l(5,r=u.bins)},n.$$.update=()=>{n.$$.dirty&1&&l(1,t=Math.max(...f.map(([u,d])=>d)))},[f,t,a,s,i,r,o]}class Cf extends be{constructor(e){super(),pe(this,e,Vf,Df,ge,{field:4,counts:0,bins:5})}}function If(n){let e,l,t,i,f,r,a,s,o,u,d,c=Ve(n[4].total_count)+"",m,_,b,p,z,S,k,M,B,q,T,C,P=Ve(n[4].approx_count_distinct)+"",R,H,N,U,ae,$;r=new St({props:{class:"inline"}}),S=new St({props:{class:"inline"}});let te=n[4].avg_text_length&&ki(n),Q=n[4].min_val&&n[4].max_val&&Ei(n);return{c(){e=I("table"),l=I("tbody"),t=I("tr"),i=I("td"),f=I("span"),L(r.$$.fragment),a=K(),s=I("span"),o=W("Total count"),u=K(),d=I("td"),m=W(c),_=K(),b=I("tr"),p=I("td"),z=I("span"),L(S.$$.fragment),k=K(),M=I("span"),B=W("Unique values"),q=K(),T=I("td"),C=W("~"),R=W(P),H=K(),te&&te.c(),N=K(),Q&&Q.c(),this.h()},l(le){e=A(le,"TABLE",{class:!0});var ye=E(e);l=A(ye,"TBODY",{});var ue=E(l);t=A(ue,"TR",{});var de=E(t);i=A(de,"TD",{class:!0});var ce=E(i);f=A(ce,"SPAN",{});var ve=E(f);j(r.$$.fragment,ve),ve.forEach(h),a=J(ce),s=A(ce,"SPAN",{});var Me=E(s);o=Z(Me,"Total count"),Me.forEach(h),ce.forEach(h),u=J(de),d=A(de,"TD",{class:!0});var ze=E(d);m=Z(ze,c),ze.forEach(h),de.forEach(h),_=J(ue),b=A(ue,"TR",{});var F=E(b);p=A(F,"TD",{class:!0});var D=E(p);z=A(D,"SPAN",{});var x=E(z);j(S.$$.fragment,x),x.forEach(h),k=J(D),M=A(D,"SPAN",{});var _e=E(M);B=Z(_e,"Unique values"),_e.forEach(h),D.forEach(h),q=J(F),T=A(F,"TD",{class:!0});var Ce=E(T);C=Z(Ce,"~"),R=Z(Ce,P),Ce.forEach(h),F.forEach(h),H=J(ue),te&&te.l(ue),N=J(ue),Q&&Q.l(ue),ue.forEach(h),ye.forEach(h),this.h()},h(){y(i,"class","svelte-1tctrjz"),y(d,"class","svelte-1tctrjz"),y(p,"class","svelte-1tctrjz"),y(T,"class","svelte-1tctrjz"),y(e,"class","stats-table w-full svelte-1tctrjz")},m(le,ye){V(le,e,ye),v(e,l),v(l,t),v(t,i),v(i,f),O(r,f,null),v(i,a),v(i,s),v(s,o),v(t,u),v(t,d),v(d,m),v(l,_),v(l,b),v(b,p),v(p,z),O(S,z,null),v(p,k),v(p,M),v(M,B),v(b,q),v(b,T),v(T,C),v(T,R),v(l,H),te&&te.m(l,null),v(l,N),Q&&Q.m(l,null),U=!0,ae||($=[Re(Pe.call(null,f,{text:"Total number of rows where the value is defined."})),Re(Pe.call(null,z,{text:"An approximation of the total number of unique values."}))],ae=!0)},p(le,ye){(!U||ye&16)&&c!==(c=Ve(le[4].total_count)+"")&&oe(m,c),(!U||ye&16)&&P!==(P=Ve(le[4].approx_count_distinct)+"")&&oe(R,P),le[4].avg_text_length?te?(te.p(le,ye),ye&16&&g(te,1)):(te=ki(le),te.c(),g(te,1),te.m(l,N)):te&&(re(),w(te,1,1,()=>{te=null}),se()),le[4].min_val&&le[4].max_val?Q?(Q.p(le,ye),ye&16&&g(Q,1)):(Q=Ei(le),Q.c(),g(Q,1),Q.m(l,null)):Q&&(re(),w(Q,1,1,()=>{Q=null}),se())},i(le){U||(g(r.$$.fragment,le),g(S.$$.fragment,le),g(te),g(Q),U=!0)},o(le){w(r.$$.fragment,le),w(S.$$.fragment,le),w(te),w(Q),U=!1},d(le){le&&h(e),Y(r),Y(S),te&&te.d(),Q&&Q.d(),ae=!1,Fe($)}}}function Af(n){let e,l;return e=new it({props:{paragraph:!0,width:"50%"}}),{c(){L(e.$$.fragment)},l(t){j(e.$$.fragment,t)},m(t,i){O(e,t,i),l=!0},p:X,i(t){l||(g(e.$$.fragment,t),l=!0)},o(t){w(e.$$.fragment,t),l=!1},d(t){Y(e,t)}}}function Tf(n){let e,l,t=n[2].error.message+"",i;return{c(){e=I("p"),l=W("Error: "),i=W(t)},l(f){e=A(f,"P",{});var r=E(e);l=Z(r,"Error: "),i=Z(r,t),r.forEach(h)},m(f,r){V(f,e,r),v(e,l),v(e,i)},p(f,r){r&4&&t!==(t=f[2].error.message+"")&&oe(i,t)},i:X,o:X,d(f){f&&h(e)}}}function ki(n){let e,l,t,i,f,r,a,s,o,u=Ve(n[4].avg_text_length)+"",d,c,m,_;return i=new St({props:{class:"inline"}}),{c(){e=I("tr"),l=I("td"),t=I("span"),L(i.$$.fragment),f=K(),r=I("span"),a=W("Average text length"),s=K(),o=I("td"),d=W(u),this.h()},l(b){e=A(b,"TR",{});var p=E(e);l=A(p,"TD",{class:!0});var z=E(l);t=A(z,"SPAN",{});var S=E(t);j(i.$$.fragment,S),S.forEach(h),f=J(z),r=A(z,"SPAN",{});var k=E(r);a=Z(k,"Average text length"),k.forEach(h),z.forEach(h),s=J(p),o=A(p,"TD",{class:!0});var M=E(o);d=Z(M,u),M.forEach(h),p.forEach(h),this.h()},h(){y(l,"class","svelte-1tctrjz"),y(o,"class","svelte-1tctrjz")},m(b,p){V(b,e,p),v(e,l),v(l,t),O(i,t,null),v(l,f),v(l,r),v(r,a),v(e,s),v(e,o),v(o,d),c=!0,m||(_=Re(Pe.call(null,t,{text:"The average length of the text in characters."})),m=!0)},p(b,p){(!c||p&16)&&u!==(u=Ve(b[4].avg_text_length)+"")&&oe(d,u)},i(b){c||(g(i.$$.fragment,b),c=!0)},o(b){w(i.$$.fragment,b),c=!1},d(b){b&&h(e),Y(i),m=!1,_()}}}function Ei(n){let e,l,t,i,f,r,a,s,o,u=Ve(n[4].min_val)+"",d,c,m=Ve(n[4].max_val)+"",_,b,p,z;return i=new St({props:{class:"inline"}}),{c(){e=I("tr"),l=I("td"),t=I("span"),L(i.$$.fragment),f=K(),r=I("span"),a=W("Range"),s=K(),o=I("td"),d=W(u),c=W(" .. "),_=W(m),this.h()},l(S){e=A(S,"TR",{});var k=E(e);l=A(k,"TD",{class:!0});var M=E(l);t=A(M,"SPAN",{});var B=E(t);j(i.$$.fragment,B),B.forEach(h),f=J(M),r=A(M,"SPAN",{});var q=E(r);a=Z(q,"Range"),q.forEach(h),M.forEach(h),s=J(k),o=A(k,"TD",{class:!0});var T=E(o);d=Z(T,u),c=Z(T," .. "),_=Z(T,m),T.forEach(h),k.forEach(h),this.h()},h(){y(l,"class","svelte-1tctrjz"),y(o,"class","svelte-1tctrjz")},m(S,k){V(S,e,k),v(e,l),v(l,t),O(i,t,null),v(l,f),v(l,r),v(r,a),v(e,s),v(e,o),v(o,d),v(o,c),v(o,_),b=!0,p||(z=Re(Pe.call(null,t,{text:"The minimum and maximum value across the dataset"})),p=!0)},p(S,k){(!b||k&16)&&u!==(u=Ve(S[4].min_val)+"")&&oe(d,u),(!b||k&16)&&m!==(m=Ve(S[4].max_val)+"")&&oe(_,m)},i(S){b||(g(i.$$.fragment,S),b=!0)},o(S){w(i.$$.fragment,S),b=!1},d(S){S&&h(e),Y(i),p=!1,z()}}}function Nf(n){let e,l,t;return l=new Cf({props:{counts:n[5],bins:n[3],field:n[0]}}),l.$on("row-click",n[11]),{c(){e=I("div"),L(l.$$.fragment),this.h()},l(i){e=A(i,"DIV",{class:!0});var f=E(e);j(l.$$.fragment,f),f.forEach(h),this.h()},h(){y(e,"class","mt-4")},m(i,f){V(i,e,f),O(l,e,null),t=!0},p(i,f){const r={};f&32&&(r.counts=i[5]),f&8&&(r.bins=i[3]),f&1&&(r.field=i[0]),l.$set(r)},i(i){t||(g(l.$$.fragment,i),t=!0)},o(i){w(l.$$.fragment,i),t=!1},d(i){i&&h(e),Y(l)}}}function Bf(n){let e,l;return e=new it({props:{paragraph:!0,width:"50%"}}),{c(){L(e.$$.fragment)},l(t){j(e.$$.fragment,t)},m(t,i){O(e,t,i),l=!0},p:X,i(t){l||(g(e.$$.fragment,t),l=!0)},o(t){w(e.$$.fragment,t),l=!1},d(t){Y(e,t)}}}function Rf(n){let e,l,t=n[1].error.message+"",i;return{c(){e=I("p"),l=W("Error: "),i=W(t)},l(f){e=A(f,"P",{});var r=E(e);l=Z(r,"Error: "),i=Z(r,t),r.forEach(h)},m(f,r){V(f,e,r),v(e,l),v(e,i)},p(f,r){r&2&&t!==(t=f[1].error.message+"")&&oe(i,t)},i:X,o:X,d(f){f&&h(e)}}}function Pf(n){let e,l,t,i,f,r,a;const s=[Tf,Af,If],o=[];function u(_,b){return _[2].error?0:_[4]==null?1:2}l=u(n),t=o[l]=s[l](n);const d=[Rf,Bf,Nf],c=[];function m(_,b){return _[1].error?0:_[5]==null?1:_[5].length>0?2:-1}return~(f=m(n))&&(r=c[f]=d[f](n)),{c(){e=I("div"),t.c(),i=K(),r&&r.c(),this.h()},l(_){e=A(_,"DIV",{class:!0});var b=E(e);t.l(b),i=J(b),r&&r.l(b),b.forEach(h),this.h()},h(){y(e,"class","p-4")},m(_,b){V(_,e,b),o[l].m(e,null),v(e,i),~f&&c[f].m(e,null),a=!0},p(_,[b]){let p=l;l=u(_),l===p?o[l].p(_,b):(re(),w(o[p],1,1,()=>{o[p]=null}),se(),t=o[l],t?t.p(_,b):(t=o[l]=s[l](_),t.c()),g(t,1),t.m(e,i));let z=f;f=m(_),f===z?~f&&c[f].p(_,b):(r&&(re(),w(c[z],1,1,()=>{c[z]=null}),se()),~f?(r=c[f],r?r.p(_,b):(r=c[f]=d[f](_),r.c()),g(r,1),r.m(e,null)):r=null)},i(_){a||(g(t),g(r),a=!0)},o(_){w(t),w(r),a=!1},d(_){_&&h(e),o[l].d(),~f&&c[f].d()}}}function Hf(n,e,l){let t,i,f,r,a,s=X,o=()=>(s(),s=Qe(i,k=>l(1,a=k)),i),u,d=X,c=()=>(d(),d=Qe(t,k=>l(2,u=k)),t),m;n.$$.on_destroy.push(()=>s()),n.$$.on_destroy.push(()=>d());let{field:_}=e;const b=qe();ke(n,b,k=>l(10,m=k));let p=null;function z(k){if(k==null)return;if(p!=null){const[B,q]=p[k.toString()];if(B!=null){const T={path:_.path,op:"greater_equal",value:B};b.addFilter(T)}if(q!=null){const T={path:_.path,op:"less",value:q};b.addFilter(T)}return}const M={path:_.path,op:"equals",value:k};b.addFilter(M)}const S=k=>z(k.detail.value);return n.$$set=k=>{"field"in k&&l(0,_=k.field)},n.$$.update=()=>{var k;if(n.$$.dirty&1025&&c(l(7,t=or(m.namespace,m.datasetName,{leaf_path:_.path}))),n.$$.dirty&1025&&o(l(6,i=ur(m.namespace,m.datasetName,{leaf_path:_.path,filters:m.queryOptions.filters}))),n.$$.dirty&2&&l(5,f=a.data!=null?a.data.counts:null),n.$$.dirty&4&&l(4,r=u.data!=null?u.data:null),n.$$.dirty&2)if(((k=a.data)==null?void 0:k.bins)!=null){l(3,p={});for(const[M,B,q]of Object.values(a.data.bins))l(3,p[M]=[B,q],p)}else l(3,p=null)},[_,a,u,p,r,f,i,t,b,z,m,S]}class Ff extends be{constructor(e){super(),pe(this,e,Hf,Pf,ge,{field:0})}}const{Boolean:Mt}=Dn;function Si(n,e,l){const t=n.slice();return t[39]=e[l],t}function yi(n,e,l){const t=n.slice();return t[42]=e[l],t}function zi(n,e,l){const t=n.slice();return t[45]=e[l],t}function Mi(n,e,l){const t=n.slice();return t[48]=e[l],t}function qf(n){let e,l="{}",t;return{c(){e=I("span"),t=W(l),this.h()},l(i){e=A(i,"SPAN",{class:!0});var f=E(e);t=Z(f,l),f.forEach(h),this.h()},h(){y(e,"class","font-mono")},m(i,f){V(i,e,f),v(e,t)},p:X,i:X,o:X,d(i){i&&h(e)}}}function Lf(n){let e,l,t,i;var f=n[23][n[1].repeated_field.dtype];function r(a){return{props:{title:a[1].dtype}}}return f&&(l=nt(f,r(n))),{c(){e=I("div"),l&&L(l.$$.fragment),t=W("[]"),this.h()},l(a){e=A(a,"DIV",{class:!0});var s=E(e);l&&j(l.$$.fragment,s),t=Z(s,"[]"),s.forEach(h),this.h()},h(){y(e,"class","flex")},m(a,s){V(a,e,s),l&&O(l,e,null),v(e,t),i=!0},p(a,s){const o={};if(s[0]&2&&(o.title=a[1].dtype),s[0]&2&&f!==(f=a[23][a[1].repeated_field.dtype])){if(l){re();const u=l;w(u.$$.fragment,1,0,()=>{Y(u,1)}),se()}f?(l=nt(f,r(a)),L(l.$$.fragment),g(l.$$.fragment,1),O(l,e,t)):l=null}else f&&l.$set(o)},i(a){i||(l&&g(l.$$.fragment,a),i=!0)},o(a){l&&w(l.$$.fragment,a),i=!1},d(a){a&&h(e),l&&Y(l)}}}function Of(n){let e,l,t;var i=n[23][n[1].dtype];function f(r){return{props:{title:r[1].dtype}}}return i&&(e=nt(i,f(n))),{c(){e&&L(e.$$.fragment),l=fe()},l(r){e&&j(e.$$.fragment,r),l=fe()},m(r,a){e&&O(e,r,a),V(r,l,a),t=!0},p(r,a){const s={};if(a[0]&2&&(s.title=r[1].dtype),a[0]&2&&i!==(i=r[23][r[1].dtype])){if(e){re();const o=e;w(o.$$.fragment,1,0,()=>{Y(o,1)}),se()}i?(e=nt(i,f(r)),L(e.$$.fragment),g(e.$$.fragment,1),O(e,l.parentNode,l)):e=null}else i&&e.$set(s)},i(r){t||(e&&g(e.$$.fragment,r),t=!0)},o(r){e&&w(e.$$.fragment,r),t=!1},d(r){r&&h(l),e&&Y(e,r)}}}function Di(n){let e,l;return e=new Ct({props:{interactive:!0,type:"green",$$slots:{default:[Uf]},$$scope:{ctx:n}}}),e.$on("click",n[33]),e.$on("remove",n[34]),{c(){L(e.$$.fragment)},l(t){j(e.$$.fragment,t)},m(t,i){O(e,t,i),l=!0},p(t,i){const f={};i[0]&16384|i[1]&1048576&&(f.$$scope={dirty:i,ctx:t}),e.$set(f)},i(t){l||(g(e.$$.fragment,t),l=!0)},o(t){w(e.$$.fragment,t),l=!1},d(t){Y(e,t)}}}function Yf(n){let e,l;return e=new zt({}),{c(){L(e.$$.fragment)},l(t){j(e.$$.fragment,t)},m(t,i){O(e,t,i),l=!0},i(t){l||(g(e.$$.fragment,t),l=!0)},o(t){w(e.$$.fragment,t),l=!1},d(t){Y(e,t)}}}function jf(n){let e,l;return e=new yt({}),{c(){L(e.$$.fragment)},l(t){j(e.$$.fragment,t)},m(t,i){O(e,t,i),l=!0},i(t){l||(g(e.$$.fragment,t),l=!0)},o(t){w(e.$$.fragment,t),l=!1},d(t){Y(e,t)}}}function Uf(n){let e,l,t,i,f,r,a,s;const o=[jf,Yf],u=[];function d(c,m){return c[14]=="ASC"?0:1}return r=d(n),a=u[r]=o[r](n),{c(){e=I("div"),l=I("div"),t=W("Sorted"),i=K(),f=I("span"),a.c(),this.h()},l(c){e=A(c,"DIV",{class:!0});var m=E(e);l=A(m,"DIV",{class:!0});var _=E(l);t=Z(_,"Sorted"),_.forEach(h),i=J(m),f=A(m,"SPAN",{});var b=E(f);a.l(b),b.forEach(h),m.forEach(h),this.h()},h(){y(l,"class","mr-1"),y(e,"class","flex flex-row")},m(c,m){V(c,e,m),v(e,l),v(l,t),v(e,i),v(e,f),u[r].m(f,null),s=!0},p(c,m){let _=r;r=d(c),r!==_&&(re(),w(u[_],1,1,()=>{u[_]=null}),se(),a=u[r],a||(a=u[r]=o[r](c),a.c()),g(a,1),a.m(f,null))},i(c){s||(g(a),s=!0)},o(c){w(a),s=!1},d(c){c&&h(e),u[r].d()}}}function Vi(n){let e,l,t=n[7],i=[];for(let r=0;rw(i[r],1,1,()=>{i[r]=null});return{c(){for(let r=0;r{i&&(t||(t=st(e,at,{},!0)),t.run(1))}),i=!0)},o(f){w(l.$$.fragment,f),f&&(t||(t=st(e,at,{},!1)),t.run(0)),i=!1},d(f){f&&h(e),Y(l),f&&t&&t.end()}}}function Ri(n){let e,l,t=n[18],i=[];for(let r=0;rw(i[r],1,1,()=>{i[r]=null});return{c(){for(let r=0;rw(le[D],1,1,()=>{le[D]=null});let ue=n[16],de=[];for(let D=0;Dw(de[D],1,1,()=>{de[D]=null});let ve=n[4]&&n[21]&&Ti(n),Me=n[10]&&Ni(n);M=new bn({props:{field:n[1],schema:n[0]}});let ze=n[20]&&Bi(n),F=n[18].length&&Ri(n);return{c(){e=I("div"),l=I("div"),t=I("div"),L(i.$$.fragment),f=K(),r=I("div"),s.c(),u=K(),d=I("button"),c=W(n[19]),m=K(),$&&$.c(),_=K(),te&&te.c(),b=K();for(let D=0;D{U[Ce]=null}),se(),s=U[a],s?s.p(D,x):(s=U[a]=N[a](D),s.c()),g(s,1),s.m(r,null)),o&&dt(o.update)&&x[0]&2048&&o.update.call(null,{text:D[11]}),(!P||x[0]&32)&&G(r,"bg-blue-200",D[5]),(!P||x[0]&524288)&&oe(c,D[19]),(!P||x[0]&1024)&&G(d,"cursor-default",!D[10]),D[15]?$?($.p(D,x),x[0]&32768&&g($,1)):($=Di(D),$.c(),g($,1),$.m(l,_)):$&&(re(),w($,1,1,()=>{$=null}),se()),D[13]?te?(te.p(D,x),x[0]&8192&&g(te,1)):(te=Vi(D),te.c(),g(te,1),te.m(l,b)):te&&(re(),w(te,1,1,()=>{te=null}),se()),x[0]&4096){Q=D[12];let Se;for(Se=0;Se{ve=null}),se()),D[10]?Me?(Me.p(D,x),x[0]&1024&&g(Me,1)):(Me=Ni(D),Me.c(),g(Me,1),Me.m(l,k)):Me&&(re(),w(Me,1,1,()=>{Me=null}),se());const Ne={};x[0]&2&&(Ne.field=D[1]),x[0]&1&&(Ne.schema=D[0]),M.$set(Ne),(!P||x[0]&32)&&G(l,"bg-blue-50",D[5]),(!P||x[0]&16)&&G(l,"bg-emerald-100",D[4]),(!P||x[0]&32)&&G(l,"hover:bg-blue-100",D[5]),D[20]?ze?(ze.p(D,x),x[0]&1048576&&g(ze,1)):(ze=Bi(D),ze.c(),g(ze,1),ze.m(e,q)):ze&&(re(),w(ze,1,1,()=>{ze=null}),se()),D[18].length?F?(F.p(D,x),x[0]&262144&&g(F,1)):(F=Ri(D),F.c(),g(F,1),F.m(T,null)):F&&(re(),w(F,1,1,()=>{F=null}),se()),(!P||x[0]&32)&&G(e,"border-b",!D[5])},i(D){if(!P){g(i.$$.fragment,D),g(s),g($),g(te);for(let x=0;x{P&&(C||(C=st(T,at,{},!0)),C.run(1))}),P=!0}},o(D){w(i.$$.fragment,D),w(s),w($),w(te),le=le.filter(Mt);for(let x=0;xl(22,P=F));const te=qe();ke(n,te,F=>l(9,T=F));const Q=Ze();ke(n,Q,F=>l(30,C=F));function le(F){return F!=null&&F.repeated_field?le(F.repeated_field):F!=null&&F.fields?[...Object.values(F.fields).filter(D=>D.path.at(-1)!==dn)].flatMap(D=>{const x=le(D);return x.some(_e=>ft(_e))?x:[D]}).filter(D=>{var x,_e,Ce,Ne;return!(D.dtype==="embedding"||D.signal!=null&&_t(D).some(Se=>Se.dtype==="embedding")||((x=D.signal)==null?void 0:x.signal_name)==="sentences"||((_e=D.signal)==null?void 0:_e.signal_name)==="substring_search"||((Ce=D.signal)==null?void 0:Ce.signal_name)==="semantic_similarity"||((Ne=D.signal)==null?void 0:Ne.signal_name)==="concept_labels")}):[]}const ye=()=>{d?te.removeSelectedColumn(r):te.addSelectedColumn(r)},ue=()=>{q&&(a?te.removeExpandedColumn(r):te.addExpandedColumn(r))},de=()=>_==="ASC"?rt(te,T.queryOptions.sort_order="DESC",T):rt(te,T.queryOptions.sort_order="ASC",T),ce=()=>te.removeSortBy(r),ve=()=>H.signal&&z&&N&&P.mutate([T.namespace,T.datasetName,{leaf_path:N.path,signal:H.signal}]),Me=()=>{var F;return H.signal&&z&&xe({command:et.EditPreviewConcept,namespace:T.namespace,datasetName:T.datasetName,path:N==null?void 0:N.path,signalName:(F=H.signal)==null?void 0:F.signal_name,value:H.signal})},ze=()=>{a?te.removeExpandedColumn(r):te.addExpandedColumn(r)};return n.$$set=F=>{"schema"in F&&l(0,R=F.schema),"field"in F&&l(1,H=F.field),"sourceField"in F&&l(2,N=F.sourceField),"indent"in F&&l(3,U=F.indent)},n.$$.update=()=>{var F,D,x,_e;n.$$.dirty[0]&3&&l(5,t=gt(H,R)),n.$$.dirty[0]&2&&l(21,i=ft(H)),n.$$.dirty[0]&32&&l(8,f=!t),n.$$.dirty[0]&2&&l(6,r=H.path),n.$$.dirty[0]&576&&l(20,a=T.expandedColumns[Ie(r)]||!1),n.$$.dirty[0]&64&&l(29,s=r.at(-1)===cn),n.$$.dirty[0]&536870976&&l(19,o=s?r.at(-2):r.at(-1)),n.$$.dirty[0]&2&&l(18,u=le(H)),n.$$.dirty[0]&1073741888&&l(17,d=(F=C.visibleFields)==null?void 0:F.some(Ce=>tt(Ce.path,r))),n.$$.dirty[0]&258&&l(16,c=f?_t(H).filter(Ce=>Ce.signal!=null&&_t(Ce).some(Ne=>Ne.dtype==="embedding")):[]),n.$$.dirty[0]&576&&l(15,m=(D=T.queryOptions.sort_by)==null?void 0:D.some(Ce=>tt(Ce,r))),n.$$.dirty[0]&512&&l(14,_=T.queryOptions.sort_order),n.$$.dirty[0]&576&&l(7,b=((x=T.queryOptions.filters)==null?void 0:x.filter(Ce=>tt(Ce.path,r)))||[]),n.$$.dirty[0]&128&&l(13,p=b.length>0),n.$$.dirty[0]&1073741888&&l(4,z=Vt(((_e=C.selectRowsSchema)==null?void 0:_e.data)||null,r)),n.$$.dirty[0]&576&&l(12,S=Lt(T,r)),n.$$.dirty[0]&32&&l(27,k=t?". This field was generated by a signal":""),n.$$.dirty[0]&2&&l(28,M=H.dtype??(H.repeated_field&&H.repeated_field.dtype?`${H.repeated_field.dtype}[]`:"object")),n.$$.dirty[0]&402653184&&l(11,B=`Data type: ${M}${k}`),n.$$.dirty[0]&18&&l(10,q=Et(H)&&!z)},[R,H,N,U,z,t,r,b,f,T,q,B,S,p,_,m,c,d,u,o,a,i,P,ae,$,te,Q,k,M,s,C,ye,ue,de,ce,ve,Me,ze]}class pn extends be{constructor(e){super(),pe(this,e,Zf,Wf,ge,{schema:0,field:1,sourceField:2,indent:3},null,[-1,-1])}}function Hi(n,e,l){const t=n.slice();return t[28]=e[l],t}function Fi(n,e,l){const t=n.slice();return t[31]=e[l],t}function Qf(n){var P;let e,l,t,i,f,r,a,s,o,u,d,c,m,_,b,p,z,S;t=new fn({props:{labelText:"Show",hideLabel:!0,checked:n[14],disabled:n[10]}}),t.$on("change",n[23]);let k=n[15]&&qi(n),M=n[13]&&Li(n),B=n[11]&&Oi(n),q=n[17]&&ji(n),T=((P=n[1])==null?void 0:P.dtype)&&Ui(n);b=new bn({props:{field:n[1],schema:n[0]}});let C=n[8]&&Wi(n);return{c(){e=I("div"),l=I("div"),L(t.$$.fragment),i=K(),f=I("div"),k&&k.c(),r=K(),a=I("div"),s=W(n[16]),o=K(),M&&M.c(),u=K(),B&&B.c(),d=K(),q&&q.c(),c=K(),T&&T.c(),m=K(),_=I("div"),L(b.$$.fragment),p=K(),C&&C.c(),z=fe(),this.h()},l(R){e=A(R,"DIV",{class:!0});var H=E(e);l=A(H,"DIV",{class:!0});var N=E(l);j(t.$$.fragment,N),N.forEach(h),i=J(H),f=A(H,"DIV",{class:!0});var U=E(f);k&&k.l(U),U.forEach(h),r=J(H),a=A(H,"DIV",{class:!0,title:!0});var ae=E(a);s=Z(ae,n[16]),ae.forEach(h),o=J(H),M&&M.l(H),u=J(H),B&&B.l(H),d=J(H),q&&q.l(H),c=J(H),T&&T.l(H),m=J(H),_=A(H,"DIV",{});var $=E(_);j(b.$$.fragment,$),$.forEach(h),H.forEach(h),p=J(R),C&&C.l(R),z=fe(),this.h()},h(){y(l,"class","w-6"),y(f,"class","w-6"),Oe(f,"margin-left",n[2]*24+"px"),y(a,"class","grow truncate whitespace-nowrap pr-2 text-gray-900"),y(a,"title",n[16]),y(e,"class","flex w-full flex-row items-center border-b border-gray-200 px-4 py-2 hover:bg-gray-100"),G(e,"bg-blue-50",n[18]),G(e,"hover:bg-blue-100",n[18])},m(R,H){V(R,e,H),v(e,l),O(t,l,null),v(e,i),v(e,f),k&&k.m(f,null),v(e,r),v(e,a),v(a,s),v(e,o),M&&M.m(e,null),v(e,u),B&&B.m(e,null),v(e,d),q&&q.m(e,null),v(e,c),T&&T.m(e,null),v(e,m),v(e,_),O(b,_,null),V(R,p,H),C&&C.m(R,H),V(R,z,H),S=!0},p(R,H){var ae;const N={};H[0]&16384&&(N.checked=R[14]),H[0]&1024&&(N.disabled=R[10]),t.$set(N),R[15]?k?(k.p(R,H),H[0]&32768&&g(k,1)):(k=qi(R),k.c(),g(k,1),k.m(f,null)):k&&(re(),w(k,1,1,()=>{k=null}),se()),H[0]&4&&Oe(f,"margin-left",R[2]*24+"px"),(!S||H[0]&65536)&&oe(s,R[16]),(!S||H[0]&65536)&&y(a,"title",R[16]),R[13]?M?(M.p(R,H),H[0]&8192&&g(M,1)):(M=Li(R),M.c(),g(M,1),M.m(e,u)):M&&(re(),w(M,1,1,()=>{M=null}),se()),R[11]?B?(B.p(R,H),H[0]&2048&&g(B,1)):(B=Oi(R),B.c(),g(B,1),B.m(e,d)):B&&(re(),w(B,1,1,()=>{B=null}),se()),R[17]?q?(q.p(R,H),H[0]&131072&&g(q,1)):(q=ji(R),q.c(),g(q,1),q.m(e,c)):q&&(re(),w(q,1,1,()=>{q=null}),se()),(ae=R[1])!=null&&ae.dtype?T?T.p(R,H):(T=Ui(R),T.c(),T.m(e,m)):T&&(T.d(1),T=null);const U={};H[0]&2&&(U.field=R[1]),H[0]&1&&(U.schema=R[0]),b.$set(U),(!S||H[0]&262144)&&G(e,"bg-blue-50",R[18]),(!S||H[0]&262144)&&G(e,"hover:bg-blue-100",R[18]),R[8]?C?(C.p(R,H),H[0]&256&&g(C,1)):(C=Wi(R),C.c(),g(C,1),C.m(z.parentNode,z)):C&&(re(),w(C,1,1,()=>{C=null}),se())},i(R){S||(g(t.$$.fragment,R),g(k),g(M),g(B),g(q),g(b.$$.fragment,R),g(C),S=!0)},o(R){w(t.$$.fragment,R),w(k),w(M),w(B),w(q),w(b.$$.fragment,R),w(C),S=!1},d(R){R&&h(e),Y(t),k&&k.d(),M&&M.d(),B&&B.d(),q&&q.d(),T&&T.d(),Y(b),R&&h(p),C&&C.d(R),R&&h(z)}}}function Kf(n){let e,l;return e=new Zt({props:{field:n[1].repeated_field,indent:n[2],schema:n[0]}}),{c(){L(e.$$.fragment)},l(t){j(e.$$.fragment,t)},m(t,i){O(e,t,i),l=!0},p(t,i){const f={};i[0]&2&&(f.field=t[1].repeated_field),i[0]&4&&(f.indent=t[2]),i[0]&1&&(f.schema=t[0]),e.$set(f)},i(t){l||(g(e.$$.fragment,t),l=!0)},o(t){w(e.$$.fragment,t),l=!1},d(t){Y(e,t)}}}function qi(n){let e,l,t,i,f;return l=new ys({props:{class:"w-3"}}),{c(){e=I("button"),L(l.$$.fragment),this.h()},l(r){e=A(r,"BUTTON",{class:!0});var a=E(e);j(l.$$.fragment,a),a.forEach(h),this.h()},h(){y(e,"class","p-2 transition hover:opacity-60"),G(e,"rotate-180",!n[8])},m(r,a){V(r,e,a),O(l,e,null),t=!0,i||(f=Ee(e,"click",n[24]),i=!0)},p(r,a){(!t||a[0]&256)&&G(e,"rotate-180",!r[8])},i(r){t||(g(l.$$.fragment,r),t=!0)},o(r){w(l.$$.fragment,r),t=!1},d(r){r&&h(e),Y(l),i=!1,f()}}}function Li(n){let e,l;return e=new Ct({props:{interactive:!0,type:"green",$$slots:{default:[Xf]},$$scope:{ctx:n}}}),e.$on("click",n[25]),e.$on("remove",n[26]),{c(){L(e.$$.fragment)},l(t){j(e.$$.fragment,t)},m(t,i){O(e,t,i),l=!0},p(t,i){const f={};i[0]&4096|i[1]&8&&(f.$$scope={dirty:i,ctx:t}),e.$set(f)},i(t){l||(g(e.$$.fragment,t),l=!0)},o(t){w(e.$$.fragment,t),l=!1},d(t){Y(e,t)}}}function Jf(n){let e,l;return e=new zt({}),{c(){L(e.$$.fragment)},l(t){j(e.$$.fragment,t)},m(t,i){O(e,t,i),l=!0},i(t){l||(g(e.$$.fragment,t),l=!0)},o(t){w(e.$$.fragment,t),l=!1},d(t){Y(e,t)}}}function Gf(n){let e,l;return e=new yt({}),{c(){L(e.$$.fragment)},l(t){j(e.$$.fragment,t)},m(t,i){O(e,t,i),l=!0},i(t){l||(g(e.$$.fragment,t),l=!0)},o(t){w(e.$$.fragment,t),l=!1},d(t){Y(e,t)}}}function Xf(n){let e,l,t,i,f;const r=[Gf,Jf],a=[];function s(o,u){return o[12]=="ASC"?0:1}return l=s(n),t=a[l]=r[l](n),{c(){e=W(`Sorted `),t.c(),i=fe()},l(o){e=Z(o,`Sorted `),t.l(o),i=fe()},m(o,u){V(o,e,u),a[l].m(o,u),V(o,i,u),f=!0},p(o,u){let d=l;l=s(o),l!==d&&(re(),w(a[d],1,1,()=>{a[d]=null}),se(),t=a[l],t||(t=a[l]=r[l](o),t.c()),g(t,1),t.m(i.parentNode,i))},i(o){f||(g(t),f=!0)},o(o){w(t),f=!1},d(o){o&&h(e),a[l].d(o),o&&h(i)}}}function Oi(n){let e,l,t=n[4],i=[];for(let r=0;rw(i[r],1,1,()=>{i[r]=null});return{c(){for(let r=0;r{i=null}),se())},i(f){t||(g(i),f&&bt(()=>{t&&(l||(l=st(e,at,{},!0)),l.run(1))}),t=!0)},o(f){w(i),f&&(l||(l=st(e,at,{},!1)),l.run(0)),t=!1},d(f){f&&h(e),i&&i.d(),f&&l&&l.end()}}}function Zi(n){let e,l,t=n[5],i=[];for(let r=0;rw(i[r],1,1,()=>{i[r]=null});return{c(){for(let r=0;r{r[u]=null}),se(),l=r[e],l?l.p(s,o):(l=r[e]=f[e](s),l.c()),g(l,1),l.m(t.parentNode,t))},i(s){i||(g(l),i=!0)},o(s){w(l),i=!1},d(s){r[e].d(s),s&&h(t)}}}function xf(n,e,l){let t,i,f,r,a,s,o,u,d,c,m,_,b,p,z,S,k,{schema:M}=e,{field:B}=e,{indent:q=0}=e;const T=qe();ke(n,T,$=>l(7,k=$));const C=Ze();ke(n,C,$=>l(22,S=$));let P=!0;function R($){return $!=null&&$.fields?Object.values($.fields).filter(te=>te.path.at(-1)!==dn):[]}const H=()=>{d?T.removeSelectedColumn(t):T.addSelectedColumn(t)},N=()=>l(8,P=!P),U=()=>m==="ASC"?rt(T,k.queryOptions.sort_order="DESC",k):rt(T,k.queryOptions.sort_order="ASC",k),ae=()=>T.removeSortBy(t);return n.$$set=$=>{"schema"in $&&l(0,M=$.schema),"field"in $&&l(1,B=$.field),"indent"in $&&l(2,q=$.indent)},n.$$.update=()=>{var $,te,Q,le;n.$$.dirty[0]&2&&l(3,t=B.path),n.$$.dirty[0]&3&&l(21,i=cr(M,B.path.slice(0,-1))),n.$$.dirty[0]&3&&l(18,f=gt(B,M)),n.$$.dirty[0]&2&&l(6,a=B.path.at(-1)===cn),n.$$.dirty[0]&2097218&&l(17,r=a&&i?ft(i):ft(B)),n.$$.dirty[0]&66&&l(16,s=a?B.path.at(-2):B.path.at(-1)),n.$$.dirty[0]&2&&l(5,o=R(B)),n.$$.dirty[0]&32&&l(15,u=o.length>0),n.$$.dirty[0]&4194312&&l(14,d=($=S.visibleFields)==null?void 0:$.some(ye=>tt(ye.path,t))),n.$$.dirty[0]&136&&l(13,c=(te=k.queryOptions.sort_by)==null?void 0:te.some(ye=>tt(ye,t))),n.$$.dirty[0]&128&&l(12,m=k.queryOptions.sort_order),n.$$.dirty[0]&136&&l(4,_=((Q=k.queryOptions.filters)==null?void 0:Q.filter(ye=>tt(ye.path,t)))||[]),n.$$.dirty[0]&16&&l(11,b=_.length>0),n.$$.dirty[0]&2&&l(10,p=!B.dtype||B.dtype==="embedding"),n.$$.dirty[0]&4194312&&l(9,z=Vt(((le=S.selectRowsSchema)==null?void 0:le.data)||null,t))},[M,B,q,t,_,o,a,k,P,z,p,b,m,c,d,u,s,r,f,T,C,i,S,H,N,U,ae]}class Zt extends be{constructor(e){super(),pe(this,e,xf,$f,ge,{schema:0,field:1,indent:2},null,[-1,-1])}}function Ki(n,e,l){const t=n.slice();return t[3]=e[l],t}function Ji(n,e,l){const t=n.slice();return t[3]=e[l],t}function eo(n){let e,l,t,i,f,r;return e=new At({props:{label:"Schema",class:"w-1/3"}}),t=new At({props:{label:"Tree View",class:"w-1/3"}}),f=new At({props:{label:"Raw Query",class:"w-1/3"}}),{c(){L(e.$$.fragment),l=K(),L(t.$$.fragment),i=K(),L(f.$$.fragment)},l(a){j(e.$$.fragment,a),l=J(a),j(t.$$.fragment,a),i=J(a),j(f.$$.fragment,a)},m(a,s){O(e,a,s),V(a,l,s),O(t,a,s),V(a,i,s),O(f,a,s),r=!0},p:X,i(a){r||(g(e.$$.fragment,a),g(t.$$.fragment,a),g(f.$$.fragment,a),r=!0)},o(a){w(e.$$.fragment,a),w(t.$$.fragment,a),w(f.$$.fragment,a),r=!1},d(a){Y(e,a),a&&h(l),Y(t,a),a&&h(i),Y(f,a)}}}function to(n){let e=[],l=new Map,t,i,f=Object.keys(n[0].data.schema.fields);const r=a=>a[3];for(let a=0;a{r[u]=null}),se()),~e?(l=r[e],l?l.p(s,o):(l=r[e]=f[e](s),l.c()),g(l,1),l.m(t.parentNode,t)):l=null)},i(s){i||(g(l),i=!0)},o(s){w(l),i=!1},d(s){~e&&r[e].d(s),s&&h(t)}}}function no(n){let e=[],l=new Map,t,i,f=Object.keys(n[0].data.schema.fields);const r=a=>a[3];for(let a=0;a{r[u]=null}),se()),~e?(l=r[e],l?l.p(s,o):(l=r[e]=f[e](s),l.c()),g(l,1),l.m(t.parentNode,t)):l=null)},i(s){i||(g(l),i=!0)},o(s){w(l),i=!1},d(s){~e&&r[e].d(s),s&&h(t)}}}function ao(n){let e,l;return e=new Ef({}),{c(){L(e.$$.fragment)},l(t){j(e.$$.fragment,t)},m(t,i){O(e,t,i),l=!0},i(t){l||(g(e.$$.fragment,t),l=!0)},o(t){w(e.$$.fragment,t),l=!1},d(t){Y(e,t)}}}function fo(n){let e,l,t,i,f,r,a;return l=new Tt({props:{$$slots:{default:[io]},$$scope:{ctx:n}}}),i=new Tt({props:{$$slots:{default:[so]},$$scope:{ctx:n}}}),r=new Tt({props:{$$slots:{default:[ao]},$$scope:{ctx:n}}}),{c(){e=I("div"),L(l.$$.fragment),t=K(),L(i.$$.fragment),f=K(),L(r.$$.fragment),this.h()},l(s){e=A(s,"DIV",{class:!0,slot:!0});var o=E(e);j(l.$$.fragment,o),t=J(o),j(i.$$.fragment,o),f=J(o),j(r.$$.fragment,o),o.forEach(h),this.h()},h(){y(e,"class","h-full overflow-y-auto"),y(e,"slot","content")},m(s,o){V(s,e,o),O(l,e,null),v(e,t),O(i,e,null),v(e,f),O(r,e,null),a=!0},p(s,o){const u={};o&257&&(u.$$scope={dirty:o,ctx:s}),l.$set(u);const d={};o&257&&(d.$$scope={dirty:o,ctx:s}),i.$set(d);const c={};o&256&&(c.$$scope={dirty:o,ctx:s}),r.$set(c)},i(s){a||(g(l.$$.fragment,s),g(i.$$.fragment,s),g(r.$$.fragment,s),a=!0)},o(s){w(l.$$.fragment,s),w(i.$$.fragment,s),w(r.$$.fragment,s),a=!1},d(s){s&&h(e),Y(l),Y(i),Y(r)}}}function oo(n){let e,l,t;return l=new fs({props:{class:"overflow-hidden border-b border-gray-200",$$slots:{content:[fo],default:[eo]},$$scope:{ctx:n}}}),{c(){e=I("div"),L(l.$$.fragment),this.h()},l(i){e=A(i,"DIV",{class:!0});var f=E(e);j(l.$$.fragment,f),f.forEach(h),this.h()},h(){y(e,"class","flex h-full flex-col pt-4")},m(i,f){V(i,e,f),O(l,e,null),t=!0},p(i,[f]){const r={};f&257&&(r.$$scope={dirty:f,ctx:i}),l.$set(r)},i(i){t||(g(l.$$.fragment,i),t=!0)},o(i){w(l.$$.fragment,i),t=!1},d(i){i&&h(e),Y(l)}}}function uo(n,e,l){let t,i;const f=Ze();return ke(n,f,r=>l(2,i=r)),n.$$.update=()=>{n.$$.dirty&4&&l(0,t=i.selectRowsSchema)},[t,f,i]}class co extends be{constructor(e){super(),pe(this,e,uo,oo,ge,{})}}function ho(n){let e,l;return e=new Bs({}),{c(){L(e.$$.fragment)},l(t){j(e.$$.fragment,t)},m(t,i){O(e,t,i),l=!0},i(t){l||(g(e.$$.fragment,t),l=!0)},o(t){w(e.$$.fragment,t),l=!1},d(t){Y(e,t)}}}function mo(n){let e,l;return e=new As({}),{c(){L(e.$$.fragment)},l(t){j(e.$$.fragment,t)},m(t,i){O(e,t,i),l=!0},i(t){l||(g(e.$$.fragment,t),l=!0)},o(t){w(e.$$.fragment,t),l=!1},d(t){Y(e,t)}}}function _o(n){let e,l,t,i,f,r,a,s,o,u,d,c,m,_,b,p;t=new co({});const z=[mo,ho],S=[];function k(M,B){return M[5]?1:0}return r=k(n),a=S[r]=z[r](n),m=new nf({}),{c(){e=I("div"),l=I("div"),L(t.$$.fragment),i=K(),f=I("div"),a.c(),d=K(),c=I("div"),L(m.$$.fragment),this.h()},l(M){e=A(M,"DIV",{class:!0});var B=E(e);l=A(B,"DIV",{class:!0});var q=E(l);j(t.$$.fragment,q),i=J(q),f=A(q,"DIV",{class:!0});var T=E(f);a.l(T),T.forEach(h),q.forEach(h),d=J(B),c=A(B,"DIV",{class:!0});var C=E(c);j(m.$$.fragment,C),C.forEach(h),B.forEach(h),this.h()},h(){y(f,"class",s=pt(`absolute right-0 top-1/2 flex h-8 w-4 cursor-pointer items-center justify-center rounded border border-neutral-200 bg-neutral-100 opacity-60 hover:bg-neutral-200 hover:opacity-100 ${n[5]?" translate-x-full":" translate-x-1/2"}`)+" svelte-1nu5kbu"),y(l,"class",u=pt(`schema-container relative h-full ${n[5]?"w-0":"w-1/3"} border-r border-gray-200`)+" svelte-1nu5kbu"),y(c,"class","h-full w-2/3 flex-grow"),y(e,"class","flex h-full w-full")},m(M,B){V(M,e,B),v(e,l),O(t,l,null),v(l,i),v(l,f),S[r].m(f,null),v(e,d),v(e,c),O(m,c,null),_=!0,b||(p=[Re(o=Pe.call(null,f,{text:n[5]?"Show Schema":"Hide Schema"})),Ee(f,"click",n[6]),Ee(f,"keypress",n[6])],b=!0)},p(M,B){let q=r;r=k(M),r!==q&&(re(),w(S[q],1,1,()=>{S[q]=null}),se(),a=S[r],a||(a=S[r]=z[r](M),a.c()),g(a,1),a.m(f,null)),(!_||B&32&&s!==(s=pt(`absolute right-0 top-1/2 flex h-8 w-4 cursor-pointer items-center justify-center rounded border border-neutral-200 bg-neutral-100 opacity-60 hover:bg-neutral-200 hover:opacity-100 ${M[5]?" translate-x-full":" translate-x-1/2"}`)+" svelte-1nu5kbu"))&&y(f,"class",s),o&&dt(o.update)&&B&32&&o.update.call(null,{text:M[5]?"Show Schema":"Hide Schema"}),(!_||B&32&&u!==(u=pt(`schema-container relative h-full ${M[5]?"w-0":"w-1/3"} border-r border-gray-200`)+" svelte-1nu5kbu"))&&y(l,"class",u)},i(M){_||(g(t.$$.fragment,M),g(a),g(m.$$.fragment,M),_=!0)},o(M){w(t.$$.fragment,M),w(a),w(m.$$.fragment,M),_=!1},d(M){M&&h(e),Y(t),S[r].d(),Y(m),b=!1,Fe(p)}}}function go(n){let e=n[1].datasetName+"",l;return{c(){l=W(e)},l(t){l=Z(t,e)},m(t,i){V(t,l,i)},p(t,i){i&2&&e!==(e=t[1].datasetName+"")&&oe(l,e)},d(t){t&&h(l)}}}function bo(n){let e,l,t,i,f,r,a;return t=new lt({props:{type:"outline",$$slots:{default:[go]},$$scope:{ctx:n}}}),{c(){e=I("div"),l=I("div"),L(t.$$.fragment),this.h()},l(s){e=A(s,"DIV",{slot:!0});var o=E(e);l=A(o,"DIV",{});var u=E(l);j(t.$$.fragment,u),u.forEach(h),o.forEach(h),this.h()},h(){y(e,"slot","header-subtext")},m(s,o){V(s,e,o),v(e,l),O(t,l,null),f=!0,r||(a=Re(i=Pe.call(null,l,{text:`${n[1].namespace}/${n[1].datasetName}`})),r=!0)},p(s,o){const u={};o&131074&&(u.$$scope={dirty:o,ctx:s}),t.$set(u),i&&dt(i.update)&&o&2&&i.update.call(null,{text:`${s[1].namespace}/${s[1].datasetName}`})},i(s){f||(g(t.$$.fragment,s),f=!0)},o(s){w(t.$$.fragment,s),f=!1},d(s){s&&h(e),Y(t),r=!1,a()}}}function po(n){let e,l,t;return l=new gf({}),{c(){e=I("div"),L(l.$$.fragment),this.h()},l(i){e=A(i,"DIV",{slot:!0,class:!0});var f=E(e);j(l.$$.fragment,f),f.forEach(h),this.h()},h(){y(e,"slot","header-center"),y(e,"class","flex w-full items-center")},m(i,f){V(i,e,f),O(l,e,null),t=!0},p:X,i(i){t||(g(l.$$.fragment,i),t=!0)},o(i){w(l.$$.fragment,i),t=!1},d(i){i&&h(e),Y(l)}}}function vo(n){let e,l,t,i,f,r,a;return i=new Ke({props:{size:"field",kind:"ghost",icon:Xs,iconDescription:"Reset View"}}),i.$on("click",function(){dt(n[0].reset)&&n[0].reset.apply(this,arguments)}),r=new Ke({props:{size:"field",kind:"ghost",icon:Ls,iconDescription:"Download selection"}}),r.$on("click",n[8]),{c(){e=I("div"),l=I("div"),t=I("div"),L(i.$$.fragment),f=K(),L(r.$$.fragment),this.h()},l(s){e=A(s,"DIV",{slot:!0});var o=E(e);l=A(o,"DIV",{class:!0});var u=E(l);t=A(u,"DIV",{class:!0});var d=E(t);j(i.$$.fragment,d),f=J(d),j(r.$$.fragment,d),d.forEach(h),u.forEach(h),o.forEach(h),this.h()},h(){y(t,"class","flex"),y(l,"class","flex h-full flex-col"),y(e,"slot","header-right")},m(s,o){V(s,e,o),v(e,l),v(l,t),O(i,t,null),v(t,f),O(r,t,null),a=!0},p(s,o){n=s},i(s){a||(g(i.$$.fragment,s),g(r.$$.fragment,s),a=!0)},o(s){w(i.$$.fragment,s),w(r.$$.fragment,s),a=!1},d(s){s&&h(e),Y(i),Y(r)}}}function wo(n){let e,l,t,i;return e=new an({props:{title:"Datasets",$$slots:{"header-right":[vo],"header-center":[po],"header-subtext":[bo],default:[_o]},$$scope:{ctx:n}}}),t=new Wn({}),{c(){L(e.$$.fragment),l=K(),L(t.$$.fragment)},l(f){j(e.$$.fragment,f),l=J(f),j(t.$$.fragment,f)},m(f,r){O(e,f,r),V(f,l,r),O(t,f,r),i=!0},p(f,[r]){const a={};r&131107&&(a.$$scope={dirty:r,ctx:f}),e.$set(a)},i(f){i||(g(e.$$.fragment,f),g(t.$$.fragment,f),i=!0)},o(f){w(e.$$.fragment,f),w(t.$$.fragment,f),i=!1},d(f){Y(e,f),f&&h(l),Y(t,f)}}}function ko(n,e,l){let t,i,f,r,a,s,o,u,d=X,c=()=>(d(),d=Qe(t,N=>l(1,u=N)),t),m,_=X,b=()=>(_(),_=Qe(s,N=>l(13,m=N)),s),p,z=X,S=()=>(z(),z=Qe(f,N=>l(14,p=N)),f),k,M=X,B=()=>(M(),M=Qe(a,N=>l(15,k=N)),a);n.$$.on_destroy.push(()=>d()),n.$$.on_destroy.push(()=>_()),n.$$.on_destroy.push(()=>z()),n.$$.on_destroy.push(()=>M());let{namespace:q}=e,{datasetName:T}=e;function C(){rt(t,u.schemaCollapsed=!u.schemaCollapsed,u)}const P=Zn(q,T);ke(n,P,N=>l(16,o=N)),Qn(P);let R=null;async function H(){var Q;const N=u.namespace,U=u.datasetName,ae=u.queryOptions;ae.columns=(Q=o.visibleFields)==null?void 0:Q.map(le=>le.path);const $=`/api/v1/datasets/${N}/${U}/select_rows_download?url_safe_options=${encodeURIComponent(JSON.stringify(ae))}`,te=document.createElement("a");te.download=`${N}_${U}.json`,te.href=$,document.body.appendChild(te),te.click(),te.remove()}return n.$$set=N=>{"namespace"in N&&l(9,q=N.namespace),"datasetName"in N&&l(10,T=N.datasetName)},n.$$.update=()=>{var N;if(n.$$.dirty&1536&&c(l(0,t=Kn(q,T))),n.$$.dirty&1&&Jn(t),n.$$.dirty&2&&l(5,i=u.schemaCollapsed),n.$$.dirty&2&&S(l(4,f=on(u.namespace,u.datasetName))),n.$$.dirty&16384&&l(12,r=dr("string",p.data)),n.$$.dirty&4098&&B(l(3,a=hr(r.map(U=>[u.namespace,u.datasetName,{leaf_path:U.path}])))),n.$$.dirty&2&&b(l(2,s=mr(u.namespace,u.datasetName,Gn(u)))),n.$$.dirty&53248&&p.data!=null&&k.length>0&&!k.some(U=>U==null||U.isLoading)&&l(11,R=k.map((U,ae)=>({path:r[ae].path,stats:U})).sort((U,ae)=>{var $,te;return U==null||ae==null?0:((($=ae.stats.data)==null?void 0:$.avg_text_length)||0)-(((te=U.stats.data)==null?void 0:te.avg_text_length)||0)})),n.$$.dirty&16384&&p.data!=null&&P.setSchema(p.data),n.$$.dirty&8192&&m!=null&&P.setSelectRowsSchema(m),n.$$.dirty&2048&&R!=null&&P.setStats(R),n.$$.dirty&8194){const U=Xn(u.selectedColumns,((N=m==null?void 0:m.data)==null?void 0:N.schema)||null);P.setVisibleFields(U)}},[t,u,s,a,f,i,C,P,H,q,T,R,r,m,p,k]}class Eo extends be{constructor(e){super(),pe(this,e,ko,wo,ge,{namespace:9,datasetName:10})}}function $i(n,e,l){const t=n.slice();return t[13]=e[l],t}function So(n){let e,l,t=n[2].data,i=[];for(let r=0;rw(i[r],1,1,()=>{i[r]=null});return{c(){for(let r=0;r{o[_]=null}),se()),~t?(i=o[t],i?i.p(c,m):(i=o[t]=s[t](c),i.c()),g(i,1),i.m(l,null)):i=null),c[0]?d?(d.p(c,m),m&1&&g(d,1)):(d=tn(c),d.c(),g(d,1),d.m(r.parentNode,r)):d&&(re(),w(d,1,1,()=>{d=null}),se())},i(c){a||(g(i),g(d),a=!0)},o(c){w(i),w(d),a=!1},d(c){c&&h(e),~t&&o[t].d(),c&&h(f),d&&d.d(c),c&&h(r)}}}function Co(n){let e;return{c(){e=W("Add Dataset")},l(l){e=Z(l,"Add Dataset")},m(l,t){V(l,e,t)},d(l){l&&h(e)}}}function Io(n){let e,l,t;return l=new Ke({props:{$$slots:{default:[Co]},$$scope:{ctx:n}}}),l.$on("click",n[6]),{c(){e=I("div"),L(l.$$.fragment),this.h()},l(i){e=A(i,"DIV",{slot:!0});var f=E(e);j(l.$$.fragment,f),f.forEach(h),this.h()},h(){y(e,"slot","header-right")},m(i,f){V(i,e,f),O(l,e,null),t=!0},p(i,f){const r={};f&65536&&(r.$$scope={dirty:f,ctx:i}),l.$set(r)},i(i){t||(g(l.$$.fragment,i),t=!0)},o(i){w(l.$$.fragment,i),t=!1},d(i){i&&h(e),Y(l)}}}function Ao(n){let e,l;return e=new an({props:{title:"Datasets",$$slots:{"header-right":[Io],default:[Vo]},$$scope:{ctx:n}}}),{c(){L(e.$$.fragment)},l(t){j(e.$$.fragment,t)},m(t,i){O(e,t,i),l=!0},p(t,[i]){const f={};i&65543&&(f.$$scope={dirty:i,ctx:t}),e.$set(f)},i(t){l||(g(e.$$.fragment,t),l=!0)},o(t){w(e.$$.fragment,t),l=!1},d(t){Y(e,t)}}}function To(n,e,l){let t,i;const f=_r();ke(n,f,p=>l(2,i=p));const r=gr();ke(n,r,p=>l(1,t=p));let a=null;function s(){if(a==null)return;const{namespace:p,name:z}=a;t.mutate([p,z],{onSuccess:()=>l(0,a=null)})}return[a,t,i,f,r,s,()=>It("/datasets/new"),p=>It(Jt(p.namespace,p.dataset_name)),p=>l(0,a={namespace:p.namespace,name:p.dataset_name}),p=>It(Jt(p.namespace,p.dataset_name)),()=>l(0,a=null),()=>l(0,a=null),()=>s()]}class No extends be{constructor(e){super(),pe(this,e,To,Ao,ge,{})}}function Bo(n){let e,l;return e=new No({}),{c(){L(e.$$.fragment)},l(t){j(e.$$.fragment,t)},m(t,i){O(e,t,i),l=!0},p:X,i(t){l||(g(e.$$.fragment,t),l=!0)},o(t){w(e.$$.fragment,t),l=!1},d(t){Y(e,t)}}}function Ro(n){let e,l;return e=new Eo({props:{namespace:n[0],datasetName:n[1]}}),{c(){L(e.$$.fragment)},l(t){j(e.$$.fragment,t)},m(t,i){O(e,t,i),l=!0},p(t,i){const f={};i&1&&(f.namespace=t[0]),i&2&&(f.datasetName=t[1]),e.$set(f)},i(t){l||(g(e.$$.fragment,t),l=!0)},o(t){w(e.$$.fragment,t),l=!1},d(t){Y(e,t)}}}function Po(n){let e,l,t,i;const f=[Ro,Bo],r=[];function a(s,o){return s[0]&&s[1]?0:1}return e=a(n),l=r[e]=f[e](n),{c(){l.c(),t=fe()},l(s){l.l(s),t=fe()},m(s,o){r[e].m(s,o),V(s,t,o),i=!0},p(s,[o]){let u=e;e=a(s),e===u?r[e].p(s,o):(re(),w(r[u],1,1,()=>{r[u]=null}),se(),l=r[e],l?l.p(s,o):(l=r[e]=f[e](s),l.c()),g(l,1),l.m(t.parentNode,t))},i(s){i||(g(l),i=!0)},o(s){w(l),i=!1},d(s){r[e].d(s),s&&h(t)}}}function Ho(n,e,l){let t;ke(n,zr,r=>l(2,t=r));let i,f;return n.$$.update=()=>{n.$$.dirty&4&&t.onHashChange("",()=>{l(0,i=void 0),l(1,f=void 0)}),n.$$.dirty&4&&t.onHashChange("/(?.+)/(?.+)",r=>{l(0,i=r.namespace),l(1,f=r.datasetName)}),n.$$.dirty&3&&console.log(i,f)},[i,f,t]}class Jo extends be{constructor(e){super(),pe(this,e,Ho,Po,ge,{})}}export{Jo as component};