import{S as ve,i as ke,s as pe,E as Q,k as I,l as D,m as E,h as m,I as Ae,H as T,b as V,K as ae,X as nt,a7 as Oi,O as ye,$ as te,P as Ye,D as de,F as be,q as X,a as J,r as x,c as G,J as k,Q as we,e as ue,v as le,d as v,f as ne,g as b,G as Re,L as Fe,M as He,N as Oe,y as j,z as Z,A as Y,W as vt,B as U,a8 as Li,w as je,x as qe,T as Xt,a2 as fe,a3 as oe,n as S,a4 as Me,u as me,C as ft,a9 as ul,aa as fr,ab as or,ac as ur,ad as Ht,R as ze,j as xt,o as qi,Y as dt,ae as cr,af as At,_ as ji,t as dr,Z as hr,p as Pe,ag as ht,ah as Yi,ai as Ke,aj as Ot,a0 as We,ak as st,U as $t,V as el,a5 as rt,al as mr,a1 as Mt,am as _r}from"../chunks/index.224851d7.js";import{u as gr}from"../chunks/urlHashStore.b3058edb.js";import{h as kt,i as br,j as Qe,t as ot,c as ut,k as $e,e as pr,l as tl,T as vr,a as kr,I as cl,q as wr,S as St,m as Er,n as Sr,o as Vr,p as Ui,C as zr,r as Mr,s as yr,u as Tr,v as Ir,w as Dr}from"../chunks/Commands.7700196d.js";import{b as ct,g as Nt,s as De,e as gt,p as Ue,f as ll,h as nl,L as Ze,i as Cr,V as tt,j as Ne,k as Ar,l as Wi,v as Zi,n as Nr,m as Br,o as bt,r as Ki,t as Qi,u as il,w as Pr,S as It,U as Rr,x as Fr,y as yt,z as Tt,A as Zt,B as Hr,C as Or,P as Ji,D as Lr,E as qr}from"../chunks/utils.2fa053fd.js";import{c as dl,W as jr,d as Yr,B as at}from"../chunks/taskMonitoringStore.8317b9f1.js";import{C as hl}from"../chunks/Checkmark.b39b03df.js";import{w as lt,d as ml}from"../chunks/index.fd964a74.js";import{C as Ur,S as Gi,a as Xi}from"../chunks/Toggle.b9cf6836.js";import{L as Wr,a as Zr,b as Kr,c as Qr,C as Jr}from"../chunks/ComboBox.1a71e223.js";import{I as xi}from"../chunks/InlineNotification.91d7c257.js";import{I as _l}from"../chunks/InProgress.26146721.js";import{M as Gr}from"../chunks/Modal.67c6d9e8.js";function gl(n,e,t){const l=n.slice();return l[7]=e[t],l}function bl(n,e){let t,l,i,f;return{key:n,first:null,c(){t=I("div"),l=I("span"),i=X(" "),f=J(),this.h()},l(r){t=D(r,"DIV",{});var s=E(t);l=D(s,"SPAN",{});var a=E(l);i=x(a," "),a.forEach(m),f=G(s),s.forEach(m),this.h()},h(){T(l,"bx--link",!0),T(t,"bx--breadcrumb-item",!0),this.first=t},m(r,s){V(r,t,s),k(t,l),k(l,i),k(t,f)},p(r,s){},d(r){r&&m(t)}}}function Xr(n){let e,t=[],l=new Map,i,f,r=Array.from({length:n[1]},pl);const s=u=>u[7];for(let u=0;ue;function xr(n,e,t){const l=["noTrailingSlash","count"];let i=de(e,l),{noTrailingSlash:f=!1}=e,{count:r=3}=e;function s(c){we.call(this,n,c)}function a(c){we.call(this,n,c)}function o(c){we.call(this,n,c)}function u(c){we.call(this,n,c)}return n.$$set=c=>{e=Q(Q({},e),be(c)),t(2,i=de(e,l)),"noTrailingSlash"in c&&t(0,f=c.noTrailingSlash),"count"in c&&t(1,r=c.count)},[f,r,i,s,a,o,u]}class $r extends ve{constructor(e){super(),ke(this,e,xr,Xr,pe,{noTrailingSlash:0,count:1})}}const es=$r;function ts(n){let e,t,l,i,f;const r=n[4].default,s=Re(r,n,n[3],null);let a=[{"aria-label":"Breadcrumb"},n[2]],o={};for(let u=0;u{r[u]=null}),ne(),t=r[e],t?t.p(a,o):(t=r[e]=f[e](a),t.c()),b(t,1),t.m(l.parentNode,l))},i(a){i||(b(t),i=!0)},o(a){v(t),i=!1},d(a){r[e].d(a),a&&m(l)}}}function is(n,e,t){const l=["noTrailingSlash","skeleton"];let i=de(e,l),{$$slots:f={},$$scope:r}=e,{noTrailingSlash:s=!1}=e,{skeleton:a=!1}=e;function o(w){we.call(this,n,w)}function u(w){we.call(this,n,w)}function c(w){we.call(this,n,w)}function d(w){we.call(this,n,w)}function _(w){we.call(this,n,w)}function h(w){we.call(this,n,w)}function g(w){we.call(this,n,w)}function p(w){we.call(this,n,w)}return n.$$set=w=>{e=Q(Q({},e),be(w)),t(2,i=de(e,l)),"noTrailingSlash"in w&&t(0,s=w.noTrailingSlash),"skeleton"in w&&t(1,a=w.skeleton),"$$scope"in w&&t(3,r=w.$$scope)},[s,a,i,r,f,o,u,c,d,_,h,g,p]}class rs extends ve{constructor(e){super(),ke(this,e,is,ns,pe,{noTrailingSlash:0,skeleton:1})}}const ss=rs,as=n=>({}),vl=n=>({}),fs=n=>({}),kl=n=>({});function os(n){let e,t,l,i,f,r;const s=n[10].default,a=Re(s,n,n[9],null);let o=!n[3]&&(n[8].icon||n[4])&&wl(n),u=[{rel:l=n[7].target==="_blank"?"noopener noreferrer":void 0},{href:n[2]},n[7]],c={};for(let d=0;d{o=null}),ne()),Ae(e,c=ye(u,[(!i||_&128&&l!==(l=d[7].target==="_blank"?"noopener noreferrer":void 0))&&{rel:l},(!i||_&4)&&{href:d[2]},_&128&&d[7]])),T(e,"bx--link",!0),T(e,"bx--link--disabled",d[5]),T(e,"bx--link--inline",d[3]),T(e,"bx--link--visited",d[6]),T(e,"bx--link--sm",d[1]==="sm"),T(e,"bx--link--lg",d[1]==="lg")},i(d){i||(b(a,d),b(o),i=!0)},o(d){v(a,d),v(o),i=!1},d(d){d&&m(e),a&&a.d(d),o&&o.d(),n[20](null),f=!1,Ye(r)}}}function us(n){let e,t,l,i,f;const r=n[10].default,s=Re(r,n,n[9],null);let a=!n[3]&&(n[8].icon||n[4])&&El(n),o=[n[7]],u={};for(let c=0;c{a=null}),ne()),Ae(e,u=ye(o,[d&128&&c[7]])),T(e,"bx--link",!0),T(e,"bx--link--disabled",c[5]),T(e,"bx--link--inline",c[3]),T(e,"bx--link--visited",c[6])},i(c){l||(b(s,c),b(a),l=!0)},o(c){v(s,c),v(a),l=!1},d(c){c&&m(e),s&&s.d(c),a&&a.d(),n[19](null),i=!1,Ye(f)}}}function wl(n){let e,t;const l=n[10].icon,i=Re(l,n,n[9],vl),f=i||cs(n);return{c(){e=I("div"),f&&f.c(),this.h()},l(r){e=D(r,"DIV",{});var s=E(e);f&&f.l(s),s.forEach(m),this.h()},h(){T(e,"bx--link__icon",!0)},m(r,s){V(r,e,s),f&&f.m(e,null),t=!0},p(r,s){i?i.p&&(!t||s&512)&&Fe(i,l,r,r[9],t?Oe(l,r[9],s,as):He(r[9]),vl):f&&f.p&&(!t||s&16)&&f.p(r,t?s:-1)},i(r){t||(b(f,r),t=!0)},o(r){v(f,r),t=!1},d(r){r&&m(e),f&&f.d(r)}}}function cs(n){let e,t,l;var i=n[4];function f(r){return{}}return i&&(e=qe(i,f())),{c(){e&&j(e.$$.fragment),t=ue()},l(r){e&&Z(e.$$.fragment,r),t=ue()},m(r,s){e&&Y(e,r,s),V(r,t,s),l=!0},p(r,s){if(s&16&&i!==(i=r[4])){if(e){le();const a=e;v(a.$$.fragment,1,0,()=>{U(a,1)}),ne()}i?(e=qe(i,f()),j(e.$$.fragment),b(e.$$.fragment,1),Y(e,t.parentNode,t)):e=null}},i(r){l||(e&&b(e.$$.fragment,r),l=!0)},o(r){e&&v(e.$$.fragment,r),l=!1},d(r){r&&m(t),e&&U(e,r)}}}function El(n){let e,t;const l=n[10].icon,i=Re(l,n,n[9],kl),f=i||ds(n);return{c(){e=I("div"),f&&f.c(),this.h()},l(r){e=D(r,"DIV",{});var s=E(e);f&&f.l(s),s.forEach(m),this.h()},h(){T(e,"bx--link__icon",!0)},m(r,s){V(r,e,s),f&&f.m(e,null),t=!0},p(r,s){i?i.p&&(!t||s&512)&&Fe(i,l,r,r[9],t?Oe(l,r[9],s,fs):He(r[9]),kl):f&&f.p&&(!t||s&16)&&f.p(r,t?s:-1)},i(r){t||(b(f,r),t=!0)},o(r){v(f,r),t=!1},d(r){r&&m(e),f&&f.d(r)}}}function ds(n){let e,t,l;var i=n[4];function f(r){return{}}return i&&(e=qe(i,f())),{c(){e&&j(e.$$.fragment),t=ue()},l(r){e&&Z(e.$$.fragment,r),t=ue()},m(r,s){e&&Y(e,r,s),V(r,t,s),l=!0},p(r,s){if(s&16&&i!==(i=r[4])){if(e){le();const a=e;v(a.$$.fragment,1,0,()=>{U(a,1)}),ne()}i?(e=qe(i,f()),j(e.$$.fragment),b(e.$$.fragment,1),Y(e,t.parentNode,t)):e=null}},i(r){l||(e&&b(e.$$.fragment,r),l=!0)},o(r){e&&v(e.$$.fragment,r),l=!1},d(r){r&&m(t),e&&U(e,r)}}}function hs(n){let e,t,l,i;const f=[us,os],r=[];function s(a,o){return a[5]?0:1}return e=s(n),t=r[e]=f[e](n),{c(){t.c(),l=ue()},l(a){t.l(a),l=ue()},m(a,o){r[e].m(a,o),V(a,l,o),i=!0},p(a,[o]){let u=e;e=s(a),e===u?r[e].p(a,o):(le(),v(r[u],1,1,()=>{r[u]=null}),ne(),t=r[e],t?t.p(a,o):(t=r[e]=f[e](a),t.c()),b(t,1),t.m(l.parentNode,l))},i(a){i||(b(t),i=!0)},o(a){v(t),i=!1},d(a){r[e].d(a),a&&m(l)}}}function ms(n,e,t){const l=["size","href","inline","icon","disabled","visited","ref"];let i=de(e,l),{$$slots:f={},$$scope:r}=e;const s=Li(f);let{size:a=void 0}=e,{href:o=void 0}=e,{inline:u=!1}=e,{icon:c=void 0}=e,{disabled:d=!1}=e,{visited:_=!1}=e,{ref:h=null}=e;function g(B){we.call(this,n,B)}function p(B){we.call(this,n,B)}function w(B){we.call(this,n,B)}function z(B){we.call(this,n,B)}function M(B){we.call(this,n,B)}function N(B){we.call(this,n,B)}function A(B){we.call(this,n,B)}function F(B){we.call(this,n,B)}function C(B){je[B?"unshift":"push"](()=>{h=B,t(0,h)})}function H(B){je[B?"unshift":"push"](()=>{h=B,t(0,h)})}return n.$$set=B=>{e=Q(Q({},e),be(B)),t(7,i=de(e,l)),"size"in B&&t(1,a=B.size),"href"in B&&t(2,o=B.href),"inline"in B&&t(3,u=B.inline),"icon"in B&&t(4,c=B.icon),"disabled"in B&&t(5,d=B.disabled),"visited"in B&&t(6,_=B.visited),"ref"in B&&t(0,h=B.ref),"$$scope"in B&&t(9,r=B.$$scope)},[h,a,o,u,c,d,_,i,s,r,f,g,p,w,z,M,N,A,F,C,H]}class _s extends ve{constructor(e){super(),ke(this,e,ms,hs,pe,{size:1,href:2,inline:3,icon:4,disabled:5,visited:6,ref:0})}}const gs=_s,bs=n=>({props:n&4}),Sl=n=>({props:{"aria-current":n[2]["aria-current"],class:"bx--link"}}),ps=n=>({props:n&4}),Vl=n=>({props:{"aria-current":n[2]["aria-current"],class:"bx--link"}});function vs(n){let e;const t=n[3].default,l=Re(t,n,n[8],Sl);return{c(){l&&l.c()},l(i){l&&l.l(i)},m(i,f){l&&l.m(i,f),e=!0},p(i,f){l&&l.p&&(!e||f&260)&&Fe(l,t,i,i[8],e?Oe(t,i[8],f,bs):He(i[8]),Sl)},i(i){e||(b(l,i),e=!0)},o(i){v(l,i),e=!1},d(i){l&&l.d(i)}}}function ks(n){let e,t;return e=new gs({props:{href:n[0],"aria-current":n[2]["aria-current"],$$slots:{default:[ws]},$$scope:{ctx:n}}}),{c(){j(e.$$.fragment)},l(l){Z(e.$$.fragment,l)},m(l,i){Y(e,l,i),t=!0},p(l,i){const f={};i&1&&(f.href=l[0]),i&4&&(f["aria-current"]=l[2]["aria-current"]),i&260&&(f.$$scope={dirty:i,ctx:l}),e.$set(f)},i(l){t||(b(e.$$.fragment,l),t=!0)},o(l){v(e.$$.fragment,l),t=!1},d(l){U(e,l)}}}function ws(n){let e;const t=n[3].default,l=Re(t,n,n[8],Vl);return{c(){l&&l.c()},l(i){l&&l.l(i)},m(i,f){l&&l.m(i,f),e=!0},p(i,f){l&&l.p&&(!e||f&260)&&Fe(l,t,i,i[8],e?Oe(t,i[8],f,ps):He(i[8]),Vl)},i(i){e||(b(l,i),e=!0)},o(i){v(l,i),e=!1},d(i){l&&l.d(i)}}}function Es(n){let e,t,l,i,f,r;const s=[ks,vs],a=[];function o(d,_){return d[0]?0:1}t=o(n),l=a[t]=s[t](n);let u=[n[2]],c={};for(let d=0;d{a[h]=null}),ne(),l=a[t],l?l.p(d,_):(l=a[t]=s[t](d),l.c()),b(l,1),l.m(e,null)),Ae(e,c=ye(u,[_&4&&d[2]])),T(e,"bx--breadcrumb-item",!0),T(e,"bx--breadcrumb-item--current",d[1]&&d[2]["aria-current"]!=="page")},i(d){i||(b(l),i=!0)},o(d){v(l),i=!1},d(d){d&&m(e),a[t].d(),f=!1,Ye(r)}}}function Ss(n,e,t){const l=["href","isCurrentPage"];let i=de(e,l),{$$slots:f={},$$scope:r}=e,{href:s=void 0}=e,{isCurrentPage:a=!1}=e;Xt("BreadcrumbItem",{});function o(_){we.call(this,n,_)}function u(_){we.call(this,n,_)}function c(_){we.call(this,n,_)}function d(_){we.call(this,n,_)}return n.$$set=_=>{e=Q(Q({},e),be(_)),t(2,i=de(e,l)),"href"in _&&t(0,s=_.href),"isCurrentPage"in _&&t(1,a=_.isCurrentPage),"$$scope"in _&&t(8,r=_.$$scope)},[s,a,i,f,o,u,c,d,r]}class Vs extends ve{constructor(e){super(),ke(this,e,Ss,Es,pe,{href:0,isCurrentPage:1})}}const Yt=Vs;function zl(n){let e,t;return{c(){e=fe("title"),t=X(n[1])},l(l){e=oe(l,"title",{});var i=E(e);t=x(i,n[1]),i.forEach(m)},m(l,i){V(l,e,i),k(e,t)},p(l,i){i&2&&me(t,l[1])},d(l){l&&m(e)}}}function zs(n){let e,t,l=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{t(5,e=Q(Q({},e),be(o))),t(3,r=de(e,f)),"size"in o&&t(0,s=o.size),"title"in o&&t(1,a=o.title)},n.$$.update=()=>{t(4,l=e["aria-label"]||e["aria-labelledby"]||a),t(2,i={"aria-hidden":l?void 0:!0,role:l?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=be(e),[s,a,i,r,l]}class ys extends ve{constructor(e){super(),ke(this,e,Ms,zs,pe,{size:0,title:1})}}const Ts=ys;function Is(n){let e,t,l,i,f,r,s=[n[1]],a={};for(let o=0;o{e=Q(Q({},e),be(u)),t(1,i=de(e,l)),"size"in u&&t(0,f=u.size)},[f,i,r,s,a,o]}class Cs extends ve{constructor(e){super(),ke(this,e,Ds,Is,pe,{size:0})}}const As=Cs,Ns=n=>({}),Ml=n=>({});function Bs(n){let e,t,l,i,f,r,s,a,o,u,c,d,_,h,g,p;var w=n[14];function z(y){return{props:{class:"bx--search-magnifier-icon"}}}w&&(l=qe(w,z()));const M=n[20].labelText,N=Re(M,n,n[19],Ml),A=N||Rs(n);let F=[{type:"text"},{role:"searchbox"},{autofocus:o=n[11]===!0?!0:void 0},{autocomplete:n[10]},{disabled:n[7]},{id:n[15]},{placeholder:n[9]},n[18]],C={};for(let y=0;y{U(W,1)}),ne()}w?(l=qe(w,z()),j(l.$$.fragment),b(l.$$.fragment,1),Y(l,t,null)):l=null}N?N.p&&(!h||R[0]&524288)&&Fe(N,M,y,y[19],h?Oe(M,y[19],R,Ns):He(y[19]),Ml):A&&A.p&&(!h||R[0]&8192)&&A.p(y,h?R:[-1,-1]),(!h||R[0]&32768&&r!==(r=y[15]+"-search"))&&S(f,"id",r),(!h||R[0]&32768)&&S(f,"for",y[15]),Ae(a,C=ye(F,[{type:"text"},{role:"searchbox"},(!h||R[0]&2048&&o!==(o=y[11]===!0?!0:void 0))&&{autofocus:o},(!h||R[0]&1024)&&{autocomplete:y[10]},(!h||R[0]&128)&&{disabled:y[7]},(!h||R[0]&32768)&&{id:y[15]},(!h||R[0]&512)&&{placeholder:y[9]},R[0]&262144&&y[18]])),R[0]&4&&a.value!==y[2]&&ul(a,y[2]),T(a,"bx--search-input",!0);const ee={};if(R[0]&8&&(ee.size=y[3]==="xl"?20:16),H!==(H=dl)){if(d){le();const W=d;v(W.$$.fragment,1,0,()=>{U(W,1)}),ne()}H?(d=qe(H,B(y)),j(d.$$.fragment),b(d.$$.fragment,1),Y(d,c,null)):d=null}else H&&d.$set(ee);(!h||R[0]&4096)&&S(c,"aria-label",y[12]),(!h||R[0]&128)&&(c.disabled=y[7]),(!h||R[0]&4)&&T(c,"bx--search-close--hidden",y[2]===""),(!h||R[0]&32768&&_!==(_=y[15]+"-search"))&&S(e,"aria-labelledby",_),(!h||R[0]&16)&&S(e,"class",y[4]),(!h||R[0]&16)&&T(e,"bx--search",!0),(!h||R[0]&80)&&T(e,"bx--search--light",y[6]),(!h||R[0]&144)&&T(e,"bx--search--disabled",y[7]),(!h||R[0]&24)&&T(e,"bx--search--sm",y[3]==="sm"),(!h||R[0]&24)&&T(e,"bx--search--lg",y[3]==="lg"),(!h||R[0]&24)&&T(e,"bx--search--xl",y[3]==="xl"),(!h||R[0]&272)&&T(e,"bx--search--expandable",y[8]),(!h||R[0]&17)&&T(e,"bx--search--expanded",y[0])},i(y){h||(l&&b(l.$$.fragment,y),b(A,y),d&&b(d.$$.fragment,y),h=!0)},o(y){l&&v(l.$$.fragment,y),v(A,y),d&&v(d.$$.fragment,y),h=!1},d(y){y&&m(e),l&&U(l),n[33](null),A&&A.d(y),n[35](null),d&&U(d),g=!1,Ye(p)}}}function Ps(n){let e,t;const l=[{size:n[3]},n[18]];let i={};for(let f=0;f{r[u]=null}),ne(),t=r[e],t?t.p(a,o):(t=r[e]=f[e](a),t.c()),b(t,1),t.m(l.parentNode,l))},i(a){i||(b(t),i=!0)},o(a){v(t),i=!1},d(a){r[e].d(a),a&&m(l)}}}function Hs(n,e,t){const l=["value","size","searchClass","skeleton","light","disabled","expandable","expanded","placeholder","autocomplete","autofocus","closeButtonLabelText","labelText","icon","id","ref"];let i=de(e,l),{$$slots:f={},$$scope:r}=e,{value:s=""}=e,{size:a="xl"}=e,{searchClass:o=""}=e,{skeleton:u=!1}=e,{light:c=!1}=e,{disabled:d=!1}=e,{expandable:_=!1}=e,{expanded:h=!1}=e,{placeholder:g="Search..."}=e,{autocomplete:p="off"}=e,{autofocus:w=!1}=e,{closeButtonLabelText:z="Clear search input"}=e,{labelText:M=""}=e,{icon:N=Ts}=e,{id:A="ccs-"+Math.random().toString(36)}=e,{ref:F=null}=e;const C=ft();let H=null;function B(O){we.call(this,n,O)}function y(O){we.call(this,n,O)}function R(O){we.call(this,n,O)}function ee(O){we.call(this,n,O)}function W(O){we.call(this,n,O)}function ie(O){we.call(this,n,O)}function he(O){we.call(this,n,O)}function $(O){we.call(this,n,O)}function P(O){we.call(this,n,O)}function ce(O){we.call(this,n,O)}function re(O){we.call(this,n,O)}function se(O){we.call(this,n,O)}function ge(O){je[O?"unshift":"push"](()=>{H=O,t(16,H)})}const Ee=()=>{_&&t(0,h=!0)};function Ce(O){je[O?"unshift":"push"](()=>{F=O,t(1,F)})}function _e(){s=this.value,t(2,s)}const Se=()=>{_&&t(0,h=!0)},K=()=>{h&&s.trim().length===0&&t(0,h=!1)},L=({key:O})=>{O==="Escape"&&(t(2,s=""),C("clear"))},q=()=>{t(2,s=""),F.focus(),C("clear")};return n.$$set=O=>{e=Q(Q({},e),be(O)),t(18,i=de(e,l)),"value"in O&&t(2,s=O.value),"size"in O&&t(3,a=O.size),"searchClass"in O&&t(4,o=O.searchClass),"skeleton"in O&&t(5,u=O.skeleton),"light"in O&&t(6,c=O.light),"disabled"in O&&t(7,d=O.disabled),"expandable"in O&&t(8,_=O.expandable),"expanded"in O&&t(0,h=O.expanded),"placeholder"in O&&t(9,g=O.placeholder),"autocomplete"in O&&t(10,p=O.autocomplete),"autofocus"in O&&t(11,w=O.autofocus),"closeButtonLabelText"in O&&t(12,z=O.closeButtonLabelText),"labelText"in O&&t(13,M=O.labelText),"icon"in O&&t(14,N=O.icon),"id"in O&&t(15,A=O.id),"ref"in O&&t(1,F=O.ref),"$$scope"in O&&t(19,r=O.$$scope)},n.$$.update=()=>{n.$$.dirty[0]&3&&h&&F&&F.focus(),n.$$.dirty[0]&1&&C(h?"expand":"collapse")},[h,F,s,a,o,u,c,d,_,g,p,w,z,M,N,A,H,C,i,r,f,B,y,R,ee,W,ie,he,$,P,ce,re,se,ge,Ee,Ce,_e,Se,K,L,q]}class Os extends ve{constructor(e){super(),ke(this,e,Hs,Fs,pe,{value:2,size:3,searchClass:4,skeleton:5,light:6,disabled:7,expandable:8,expanded:0,placeholder:9,autocomplete:10,autofocus:11,closeButtonLabelText:12,labelText:13,icon:14,id:15,ref:1},null,[-1,-1])}}const Ls=Os;function yl(n){let e,t;return{c(){e=fe("title"),t=X(n[1])},l(l){e=oe(l,"title",{});var i=E(e);t=x(i,n[1]),i.forEach(m)},m(l,i){V(l,e,i),k(e,t)},p(l,i){i&2&&me(t,l[1])},d(l){l&&m(e)}}}function qs(n){let e,t,l,i,f=n[1]&&yl(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]],s={};for(let a=0;a{t(5,e=Q(Q({},e),be(o))),t(3,r=de(e,f)),"size"in o&&t(0,s=o.size),"title"in o&&t(1,a=o.title)},n.$$.update=()=>{t(4,l=e["aria-label"]||e["aria-labelledby"]||a),t(2,i={"aria-hidden":l?void 0:!0,role:l?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=be(e),[s,a,i,r,l]}class Ys extends ve{constructor(e){super(),ke(this,e,js,qs,pe,{size:0,title:1})}}const Us=Ys;function Tl(n){let e,t;return{c(){e=fe("title"),t=X(n[1])},l(l){e=oe(l,"title",{});var i=E(e);t=x(i,n[1]),i.forEach(m)},m(l,i){V(l,e,i),k(e,t)},p(l,i){i&2&&me(t,l[1])},d(l){l&&m(e)}}}function Ws(n){let e,t,l,i,f=n[1]&&Tl(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]],s={};for(let a=0;a{t(5,e=Q(Q({},e),be(o))),t(3,r=de(e,f)),"size"in o&&t(0,s=o.size),"title"in o&&t(1,a=o.title)},n.$$.update=()=>{t(4,l=e["aria-label"]||e["aria-labelledby"]||a),t(2,i={"aria-hidden":l?void 0:!0,role:l?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=be(e),[s,a,i,r,l]}class Ks extends ve{constructor(e){super(),ke(this,e,Zs,Ws,pe,{size:0,title:1})}}const Qs=Ks,Js=n=>({}),Il=n=>({});function Gs(n){let e,t,l;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=qe(i,f(n))),{c(){e&&j(e.$$.fragment),t=ue()},l(r){e&&Z(e.$$.fragment,r),t=ue()},m(r,s){e&&Y(e,r,s),V(r,t,s),l=!0},p(r,s){const a={};if(s[0]&1024&&(a["aria-label"]=r[10]),s[0]&1024&&(a.title=r[10]),s[0]&512&&(a.class="bx--overflow-menu__icon "+r[9]),s[0]&2&&i!==(i=r[1])){if(e){le();const o=e;v(o.$$.fragment,1,0,()=>{U(o,1)}),ne()}i?(e=qe(i,f(r)),j(e.$$.fragment),b(e.$$.fragment,1),Y(e,t.parentNode,t)):e=null}else i&&e.$set(a)},i(r){l||(e&&b(e.$$.fragment,r),l=!0)},o(r){e&&v(e.$$.fragment,r),l=!1},d(r){r&&m(t),e&&U(e,r)}}}function Dl(n){let e,t;const l=n[24].default,i=Re(l,n,n[23],null);return{c(){e=I("ul"),i&&i.c(),this.h()},l(f){e=D(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(m),this.h()},h(){S(e,"role","menu"),S(e,"tabindex","-1"),S(e,"aria-label",n[13]),S(e,"data-floating-menu-direction",n[5]),S(e,"class",n[8]),T(e,"bx--overflow-menu-options",!0),T(e,"bx--overflow-menu--flip",n[7]),T(e,"bx--overflow-menu-options--open",n[0]),T(e,"bx--overflow-menu-options--light",n[6]),T(e,"bx--overflow-menu-options--sm",n[4]==="sm"),T(e,"bx--overflow-menu-options--xl",n[4]==="xl"),T(e,"bx--breadcrumb-menu-options",!!n[14])},m(f,r){V(f,e,r),i&&i.m(e,null),n[31](e),t=!0},p(f,r){i&&i.p&&(!t||r[0]&8388608)&&Fe(i,l,f,f[23],t?Oe(l,f[23],r,null):He(f[23]),null),(!t||r[0]&8192)&&S(e,"aria-label",f[13]),(!t||r[0]&32)&&S(e,"data-floating-menu-direction",f[5]),(!t||r[0]&256)&&S(e,"class",f[8]),(!t||r[0]&256)&&T(e,"bx--overflow-menu-options",!0),(!t||r[0]&384)&&T(e,"bx--overflow-menu--flip",f[7]),(!t||r[0]&257)&&T(e,"bx--overflow-menu-options--open",f[0]),(!t||r[0]&320)&&T(e,"bx--overflow-menu-options--light",f[6]),(!t||r[0]&272)&&T(e,"bx--overflow-menu-options--sm",f[4]==="sm"),(!t||r[0]&272)&&T(e,"bx--overflow-menu-options--xl",f[4]==="xl"),(!t||r[0]&16640)&&T(e,"bx--breadcrumb-menu-options",!!f[14])},i(f){t||(b(i,f),t=!0)},o(f){v(i,f),t=!1},d(f){f&&m(e),i&&i.d(f),n[31](null)}}}function Xs(n){let e,t,l,i,f,r,s,a;const o=n[24].menu,u=Re(o,n,n[23],Il),c=u||Gs(n);let d=n[0]&&Dl(n),_=[{type:"button"},{"aria-haspopup":""},{"aria-expanded":n[0]},{"aria-label":n[13]},{id:n[11]},n[19]],h={};for(let g=0;g<_.length;g+=1)h=Q(h,_[g]);return{c(){e=new fr(!1),t=ue(),l=J(),i=I("button"),c&&c.c(),f=J(),d&&d.c(),this.h()},l(g){const p=or("svelte-7ztmff",document.head);e=ur(p,!1),t=ue(),p.forEach(m),l=G(g),i=D(g,"BUTTON",{type:!0,"aria-haspopup":!0,"aria-expanded":!0,"aria-label":!0,id:!0});var w=E(i);c&&c.l(w),f=G(w),d&&d.l(w),w.forEach(m),this.h()},h(){e.a=t,Ae(i,h),T(i,"bx--overflow-menu",!0),T(i,"bx--overflow-menu--open",n[0]),T(i,"bx--overflow-menu--light",n[6]),T(i,"bx--overflow-menu--sm",n[4]==="sm"),T(i,"bx--overflow-menu--xl",n[4]==="xl")},m(g,p){e.m(n[12],document.head),k(document.head,t),V(g,l,p),V(g,i,p),c&&c.m(i,null),k(i,f),d&&d.m(i,null),i.autofocus&&i.focus(),n[32](i),r=!0,s||(a=[ae(window,"click",n[30]),ae(i,"click",n[25]),ae(i,"click",n[33]),ae(i,"mouseover",n[26]),ae(i,"mouseenter",n[27]),ae(i,"mouseleave",n[28]),ae(i,"keydown",n[29]),ae(i,"keydown",n[34]),ae(i,"focusout",n[35])],s=!0)},p(g,p){(!r||p[0]&4096)&&e.p(g[12]),u?u.p&&(!r||p[0]&8388608)&&Fe(u,o,g,g[23],r?Oe(o,g[23],p,Js):He(g[23]),Il):c&&c.p&&(!r||p[0]&1538)&&c.p(g,r?p:[-1,-1]),g[0]?d?(d.p(g,p),p[0]&1&&b(d,1)):(d=Dl(g),d.c(),b(d,1),d.m(i,null)):d&&(le(),v(d,1,1,()=>{d=null}),ne()),Ae(i,h=ye(_,[{type:"button"},{"aria-haspopup":""},(!r||p[0]&1)&&{"aria-expanded":g[0]},(!r||p[0]&8192)&&{"aria-label":g[13]},(!r||p[0]&2048)&&{id:g[11]},p[0]&524288&&g[19]])),T(i,"bx--overflow-menu",!0),T(i,"bx--overflow-menu--open",g[0]),T(i,"bx--overflow-menu--light",g[6]),T(i,"bx--overflow-menu--sm",g[4]==="sm"),T(i,"bx--overflow-menu--xl",g[4]==="xl")},i(g){r||(b(c,g),b(d),r=!0)},o(g){v(c,g),v(d),r=!1},d(g){m(t),g&&e.d(),g&&m(l),g&&m(i),c&&c.d(g),d&&d.d(),n[32](null),s=!1,Ye(a)}}}function xs(n,e,t){let l,i;const f=["size","direction","open","light","flipped","menuOptionsClass","icon","iconClass","iconDescription","id","buttonRef","menuRef"];let r=de(e,f),s,a,o,{$$slots:u={},$$scope:c}=e,{size:d=void 0}=e,{direction:_="bottom"}=e,{open:h=!1}=e,{light:g=!1}=e,{flipped:p=!1}=e,{menuOptionsClass:w=void 0}=e,{icon:z=Us}=e,{iconClass:M=void 0}=e,{iconDescription:N="Open and close list of options"}=e,{id:A="ccs-"+Math.random().toString(36)}=e,{buttonRef:F=null}=e,{menuRef:C=null}=e;const H=Ht("BreadcrumbItem"),B=ft(),y=lt([]);ze(n,y,L=>t(22,a=L));const R=lt(void 0);ze(n,R,L=>t(37,o=L));const ee=lt(void 0),W=lt(-1);ze(n,W,L=>t(21,s=L));let ie,he=!0;Xt("OverflowMenu",{focusedId:ee,add:({id:L,text:q,primaryFocus:O,disabled:Ve})=>{y.update(Le=>(O&&W.set(Le.length),[...Le,{id:L,text:q,primaryFocus:O,disabled:Ve,index:Le.length}]))},update:L=>{R.set(L)},change:L=>{let q=s+L;q<0?q=a.length-1:q>=a.length&&(q=0);let O=a[q].disabled;for(;O;)q=q+L,q<0?q=a.length-1:q>=a.length&&(q=0),O=a[q].disabled;W.set(q)}}),xt(()=>{if(o){const{index:L,text:q}=a.filter(O=>O.id===o)[0];B("close",{index:L,text:q}),t(0,h=!1)}if(h){const{width:L,height:q}=F.getBoundingClientRect();t(20,ie=L),!he&&s<0&&C.focus(),p&&(t(3,C.style.left="auto",C),t(3,C.style.right=0,C)),_==="top"?(t(3,C.style.top="auto",C),t(3,C.style.bottom=q+"px",C)):_==="bottom"&&t(3,C.style.top=q+"px",C),H&&(t(3,C.style.top=q+10+"px",C),t(3,C.style.left="-11px",C))}h||(y.set([]),R.set(void 0),W.set(0)),he=!1});function $(L){we.call(this,n,L)}function P(L){we.call(this,n,L)}function ce(L){we.call(this,n,L)}function re(L){we.call(this,n,L)}function se(L){we.call(this,n,L)}const ge=({target:L})=>{F&&F.contains(L)||C&&!C.contains(L)&&t(0,h=!1)};function Ee(L){je[L?"unshift":"push"](()=>{C=L,t(3,C)})}function Ce(L){je[L?"unshift":"push"](()=>{F=L,t(2,F)})}const _e=({target:L})=>{C&&C.contains(L)||(t(0,h=!h),h||B("close"))},Se=L=>{h&&(["ArrowDown","ArrowLeft","ArrowRight","ArrowUp"].includes(L.key)?L.preventDefault():L.key==="Escape"&&(L.stopPropagation(),B("close"),t(0,h=!1),F.focus()))},K=L=>{h&&(F.contains(L.relatedTarget)||(B("close"),t(0,h=!1)))};return n.$$set=L=>{t(39,e=Q(Q({},e),be(L))),t(19,r=de(e,f)),"size"in L&&t(4,d=L.size),"direction"in L&&t(5,_=L.direction),"open"in L&&t(0,h=L.open),"light"in L&&t(6,g=L.light),"flipped"in L&&t(7,p=L.flipped),"menuOptionsClass"in L&&t(8,w=L.menuOptionsClass),"icon"in L&&t(1,z=L.icon),"iconClass"in L&&t(9,M=L.iconClass),"iconDescription"in L&&t(10,N=L.iconDescription),"id"in L&&t(11,A=L.id),"buttonRef"in L&&t(2,F=L.buttonRef),"menuRef"in L&&t(3,C=L.menuRef),"$$scope"in L&&t(23,c=L.$$scope)},n.$$.update=()=>{t(13,l=e["aria-label"]||"menu"),n.$$.dirty[0]&6291456&&a[s]&&ee.set(a[s].id),n.$$.dirty[0]&1050624&&t(12,i=``)},H&&t(1,z=Qs),e=be(e),[h,z,F,C,d,_,g,p,w,M,N,A,i,l,H,B,y,R,W,r,ie,s,a,c,u,$,P,ce,re,se,ge,Ee,Ce,_e,Se,K]}class $s extends ve{constructor(e){super(),ke(this,e,xs,Xs,pe,{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 ea=$s;function ta(n){let e,t,l,i;const f=n[16].default,r=Re(f,n,n[15],null),s=r||na(n);let a=[n[7]],o={};for(let u=0;u{r[d]=null}),ne(),l=r[t],l?l.p(u,c):(l=r[t]=f[t](u),l.c()),b(l,1),l.m(e,null)),Ae(e,o=ye(a,[{role:"none"},(!i||c&64)&&{id:u[6]},c&2048&&u[11]])),T(e,"bx--overflow-menu-options__option",!0),T(e,"bx--overflow-menu--divider",u[4]),T(e,"bx--overflow-menu-options__option--danger",u[5]),T(e,"bx--overflow-menu-options__option--disabled",u[3])},i(u){i||(b(l),i=!0)},o(u){v(l),i=!1},d(u){u&&m(e),r[t].d()}}}function sa(n,e,t){let l;const i=["text","href","primaryFocus","disabled","hasDivider","danger","requireTitle","id","ref"];let f=de(e,i),r,{$$slots:s={},$$scope:a}=e;const o=Li(s);let{text:u="Provide text"}=e,{href:c=""}=e,{primaryFocus:d=!1}=e,{disabled:_=!1}=e,{hasDivider:h=!1}=e,{danger:g=!1}=e,{requireTitle:p=!0}=e,{id:w="ccs-"+Math.random().toString(36)}=e,{ref:z=null}=e;const{focusedId:M,add:N,update:A,change:F}=Ht("OverflowMenu");ze(n,M,P=>t(14,r=P)),N({id:w,text:u,primaryFocus:d,disabled:_}),xt(()=>{z&&d&&z.focus()});function C(P){we.call(this,n,P)}function H(P){we.call(this,n,P)}function B(P){we.call(this,n,P)}function y(P){we.call(this,n,P)}function R(P){je[P?"unshift":"push"](()=>{z=P,t(0,z)})}const ee=()=>{A(w)},W=({key:P})=>{P==="ArrowDown"?F(1):P==="ArrowUp"&&F(-1)};function ie(P){je[P?"unshift":"push"](()=>{z=P,t(0,z)})}const he=()=>{A(w)},$=({key:P})=>{P==="ArrowDown"?F(1):P==="ArrowUp"&&F(-1)};return n.$$set=P=>{e=Q(Q({},e),be(P)),t(11,f=de(e,i)),"text"in P&&t(1,u=P.text),"href"in P&&t(2,c=P.href),"primaryFocus"in P&&t(12,d=P.primaryFocus),"disabled"in P&&t(3,_=P.disabled),"hasDivider"in P&&t(4,h=P.hasDivider),"danger"in P&&t(5,g=P.danger),"requireTitle"in P&&t(13,p=P.requireTitle),"id"in P&&t(6,w=P.id),"ref"in P&&t(0,z=P.ref),"$$scope"in P&&t(15,a=P.$$scope)},n.$$.update=()=>{n.$$.dirty&16448&&t(12,d=r===w),n.$$.dirty&8206&&t(7,l={role:"menuitem",tabindex:"-1",class:"bx--overflow-menu-options__btn",disabled:c?void 0:_,href:c||void 0,title:p?o.default?void 0:u:void 0})},[z,u,c,_,h,g,w,l,M,A,F,f,d,p,r,a,s,C,H,B,y,R,ee,W,ie,he,$]}class aa extends ve{constructor(e){super(),ke(this,e,sa,ra,pe,{text:1,href:2,primaryFocus:12,disabled:3,hasDivider:4,danger:5,requireTitle:13,id:6,ref:0})}}const wt=aa;function Cl(n,e,t){const l=n.slice();return l[39]=e[t],l[41]=t,l}const fa=n=>({item:n[0]&8,index:n[0]&8}),Al=n=>({item:n[39],index:n[41]});function Nl(n){let e,t;return{c(){e=I("label"),t=X(n[10]),this.h()},l(l){e=D(l,"LABEL",{for:!0});var i=E(e);t=x(i,n[10]),i.forEach(m),this.h()},h(){S(e,"for",n[19]),T(e,"bx--label",!0),T(e,"bx--label--disabled",n[9]),T(e,"bx--visually-hidden",n[17])},m(l,i){V(l,e,i),k(e,t)},p(l,i){i[0]&1024&&me(t,l[10]),i[0]&524288&&S(e,"for",l[19]),i[0]&512&&T(e,"bx--label--disabled",l[9]),i[0]&131072&&T(e,"bx--visually-hidden",l[17])},d(l){l&&m(e)}}}function Bl(n){let e,t;return e=new jr({props:{class:"bx--list-box__invalid-icon"}}),{c(){j(e.$$.fragment)},l(l){Z(e.$$.fragment,l)},m(l,i){Y(e,l,i),t=!0},i(l){t||(b(e.$$.fragment,l),t=!0)},o(l){v(e.$$.fragment,l),t=!1},d(l){U(e,l)}}}function Pl(n){let e,t;return e=new Yr({props:{class:"bx--list-box__invalid-icon bx--list-box__invalid-icon--warning"}}),{c(){j(e.$$.fragment)},l(l){Z(e.$$.fragment,l)},m(l,i){Y(e,l,i),t=!0},i(l){t||(b(e.$$.fragment,l),t=!0)},o(l){v(e.$$.fragment,l),t=!1},d(l){U(e,l)}}}function oa(n){let e;return{c(){e=X(n[16])},l(t){e=x(t,n[16])},m(t,l){V(t,e,l)},p(t,l){l[0]&65536&&me(e,t[16])},d(t){t&&m(e)}}}function ua(n){let e=n[4](n[22])+"",t;return{c(){t=X(e)},l(l){t=x(l,e)},m(l,i){V(l,t,i)},p(l,i){i[0]&4194320&&e!==(e=l[4](l[22])+"")&&me(t,e)},d(l){l&&m(t)}}}function Rl(n){let e,t;return e=new Kr({props:{"aria-labelledby":n[19],id:n[19],$$slots:{default:[ha]},$$scope:{ctx:n}}}),{c(){j(e.$$.fragment)},l(l){Z(e.$$.fragment,l)},m(l,i){Y(e,l,i),t=!0},p(l,i){const f={};i[0]&524288&&(f["aria-labelledby"]=l[19]),i[0]&524288&&(f.id=l[19]),i[0]&2097181|i[1]&64&&(f.$$scope={dirty:i,ctx:l}),e.$set(f)},i(l){t||(b(e.$$.fragment,l),t=!0)},o(l){v(e.$$.fragment,l),t=!1},d(l){U(e,l)}}}function ca(n){let e=n[4](n[39])+"",t;return{c(){t=X(e)},l(l){t=x(l,e)},m(l,i){V(l,t,i)},p(l,i){i[0]&24&&e!==(e=l[4](l[39])+"")&&me(t,e)},d(l){l&&m(t)}}}function da(n){let e,t;const l=n[29].default,i=Re(l,n,n[37],Al),f=i||ca(n);return{c(){f&&f.c(),e=J()},l(r){f&&f.l(r),e=G(r)},m(r,s){f&&f.m(r,s),V(r,e,s),t=!0},p(r,s){i?i.p&&(!t||s[0]&8|s[1]&64)&&Fe(i,l,r,r[37],t?Oe(l,r[37],s,fa):He(r[37]),Al):f&&f.p&&(!t||s[0]&24)&&f.p(r,t?s:[-1,-1])},i(r){t||(b(f,r),t=!0)},o(r){v(f,r),t=!1},d(r){f&&f.d(r),r&&m(e)}}}function Fl(n,e){let t,l,i;function f(...s){return e[34](e[39],...s)}function r(){return e[35](e[39],e[41])}return l=new Qr({props:{id:e[39].id,active:e[0]===e[39].id,highlighted:e[21]===e[41],disabled:e[39].disabled,$$slots:{default:[da]},$$scope:{ctx:e}}}),l.$on("click",f),l.$on("mouseenter",r),{key:n,first:null,c(){t=ue(),j(l.$$.fragment),this.h()},l(s){t=ue(),Z(l.$$.fragment,s),this.h()},h(){this.first=t},m(s,a){V(s,t,a),Y(l,s,a),i=!0},p(s,a){e=s;const o={};a[0]&8&&(o.id=e[39].id),a[0]&9&&(o.active=e[0]===e[39].id),a[0]&2097160&&(o.highlighted=e[21]===e[41]),a[0]&8&&(o.disabled=e[39].disabled),a[0]&24|a[1]&64&&(o.$$scope={dirty:a,ctx:e}),l.$set(o)},i(s){i||(b(l.$$.fragment,s),i=!0)},o(s){v(l.$$.fragment,s),i=!1},d(s){s&&m(t),U(l,s)}}}function ha(n){let e=[],t=new Map,l,i,f=n[3];const r=s=>s[39].id;for(let s=0;s{d=null}),ne()),!z[11]&&z[13]?_?M[0]&10240&&b(_,1):(_=Pl(),_.c(),b(_,1),_.m(t.parentNode,t)):_&&(le(),v(_,1,1,()=>{_=null}),ne()),g===(g=h(z))&&p?p.p(z,M):(p.d(1),p=g(z),p&&(p.c(),p.m(i,null)));const N={};M[0]&262144&&(N.translateWithId=z[18]),M[0]&2&&(N.open=z[1]),r.$set(N),(!o||M[0]&2)&&S(l,"aria-expanded",z[1]),(!o||M[0]&512)&&(l.disabled=z[9]),(!o||M[0]&262144)&&S(l,"translatewithid",z[18]),(!o||M[0]&524288)&&S(l,"id",z[19]),z[1]?w?(w.p(z,M),M[0]&2&&b(w,1)):(w=Rl(z),w.c(),b(w,1),w.m(a.parentNode,a)):w&&(le(),v(w,1,1,()=>{w=null}),ne())},i(z){o||(b(d),b(_),b(r.$$.fragment,z),b(w),o=!0)},o(z){v(d),v(_),v(r.$$.fragment,z),v(w),o=!1},d(z){d&&d.d(z),z&&m(e),_&&_.d(z),z&&m(t),z&&m(l),p.d(),U(r),n[31](null),z&&m(s),w&&w.d(z),z&&m(a),u=!1,Ye(c)}}}function Hl(n){let e,t;return{c(){e=I("div"),t=X(n[15]),this.h()},l(l){e=D(l,"DIV",{});var i=E(e);t=x(i,n[15]),i.forEach(m),this.h()},h(){T(e,"bx--form__helper-text",!0),T(e,"bx--form__helper-text--disabled",n[9])},m(l,i){V(l,e,i),k(e,t)},p(l,i){i[0]&32768&&me(t,l[15]),i[0]&512&&T(e,"bx--form__helper-text--disabled",l[9])},d(l){l&&m(e)}}}function _a(n){let e,t,l,i,f,r,s,a=n[10]&&Nl(n);l=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:[ma]},$$scope:{ctx:n}}}),l.$on("click",n[36]);let o=!n[23]&&!n[11]&&!n[13]&&n[15]&&Hl(n),u=[n[27]],c={};for(let d=0;dK.text||K.id}=e,{selectedId:c}=e,{type:d="default"}=e,{direction:_="bottom"}=e,{size:h=void 0}=e,{open:g=!1}=e,{light:p=!1}=e,{disabled:w=!1}=e,{titleText:z=""}=e,{invalid:M=!1}=e,{invalidText:N=""}=e,{warn:A=!1}=e,{warnText:F=""}=e,{helperText:C=""}=e,{label:H=void 0}=e,{hideLabel:B=!1}=e,{translateWithId:y=void 0}=e,{id:R="ccs-"+Math.random().toString(36)}=e,{name:ee=void 0}=e,{ref:W=null}=e;const ie=ft();let he=-1;function $(K){let L=he+K;if(o.length===0)return;L<0?L=o.length-1:L>=o.length&&(L=0);let q=o[L].disabled;for(;q;)L=L+K,L<0?L=o.length-1:L>=o.length&&(L=0),q=o[L].disabled;t(21,he=L)}const P=()=>{ie("select",{selectedId:c,selectedItem:o.find(K=>K.id===c)})},ce=({target:K})=>{g&&W&&!W.contains(K)&&t(1,g=!1)};qi(()=>(parent&&parent.addEventListener("click",ce),()=>{parent&&parent.removeEventListener("click",ce)}));const re=K=>{K.stopPropagation(),!w&&t(1,g=!g)};function se(K){je[K?"unshift":"push"](()=>{W=K,t(2,W)})}const ge=K=>{const{key:L}=K;["Enter","ArrowDown","ArrowUp"].includes(L)&&K.preventDefault(),L==="Enter"?(t(1,g=!g),he>-1&&o[he].id!==c&&(t(0,c=o[he].id),P(),t(1,g=!1))):L==="Tab"?(t(1,g=!1),W.blur()):L==="ArrowDown"?(g||t(1,g=!0),$(1)):L==="ArrowUp"?(g||t(1,g=!0),$(-1)):L==="Escape"&&t(1,g=!1)},Ee=K=>{const{key:L}=K;if([" "].includes(L))K.preventDefault();else return;t(1,g=!g),he>-1&&o[he].id!==c&&(t(0,c=o[he].id),P(),t(1,g=!1))},Ce=(K,L)=>{if(K.disabled){L.stopPropagation();return}t(0,c=K.id),P(),W.focus()},_e=(K,L)=>{K.disabled||t(21,he=L)},Se=({target:K})=>{w||t(1,g=W.contains(K)?!g:!1)};return n.$$set=K=>{t(28,e=Q(Q({},e),be(K))),t(27,r=de(e,f)),"items"in K&&t(3,o=K.items),"itemToString"in K&&t(4,u=K.itemToString),"selectedId"in K&&t(0,c=K.selectedId),"type"in K&&t(5,d=K.type),"direction"in K&&t(6,_=K.direction),"size"in K&&t(7,h=K.size),"open"in K&&t(1,g=K.open),"light"in K&&t(8,p=K.light),"disabled"in K&&t(9,w=K.disabled),"titleText"in K&&t(10,z=K.titleText),"invalid"in K&&t(11,M=K.invalid),"invalidText"in K&&t(12,N=K.invalidText),"warn"in K&&t(13,A=K.warn),"warnText"in K&&t(14,F=K.warnText),"helperText"in K&&t(15,C=K.helperText),"label"in K&&t(16,H=K.label),"hideLabel"in K&&t(17,B=K.hideLabel),"translateWithId"in K&&t(18,y=K.translateWithId),"id"in K&&t(19,R=K.id),"name"in K&&t(20,ee=K.name),"ref"in K&&t(2,W=K.ref),"$$scope"in K&&t(37,a=K.$$scope)},n.$$.update=()=>{n.$$.dirty[0]&32&&t(23,l=d==="inline"),n.$$.dirty[0]&9&&t(22,i=o.find(K=>K.id===c)),n.$$.dirty[0]&2&&(g||t(21,he=-1))},e=be(e),[c,g,W,o,u,d,_,h,p,w,z,M,N,A,F,C,H,B,y,R,ee,he,i,l,$,P,ce,r,e,s,re,se,ge,Ee,Ce,_e,Se,a]}class ba extends ve{constructor(e){super(),ke(this,e,ga,_a,pe,{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 pa=ba;function va(n){const e=n-1;return e*e*e+1}function Ol(n,{delay:e=0,duration:t=400,easing:l=cr}={}){const i=+getComputedStyle(n).opacity;return{delay:e,duration:t,easing:l,css:f=>`opacity: ${f*i}`}}function pt(n,{delay:e=0,duration:t=400,easing:l=va,axis:i="y"}={}){const f=getComputedStyle(n),r=+f.opacity,s=i==="y"?"height":"width",a=parseFloat(f[s]),o=i==="y"?["top","bottom"]:["left","right"],u=o.map(w=>`${w[0].toUpperCase()}${w.slice(1)}`),c=parseFloat(f[`padding${u[0]}`]),d=parseFloat(f[`padding${u[1]}`]),_=parseFloat(f[`margin${u[0]}`]),h=parseFloat(f[`margin${u[1]}`]),g=parseFloat(f[`border${u[0]}Width`]),p=parseFloat(f[`border${u[1]}Width`]);return{delay:e,duration:t,easing:l,css:w=>`overflow: hidden;opacity: ${Math.min(w*20,1)*r};${s}: ${w*a}px;padding-${o[0]}: ${w*c}px;padding-${o[1]}: ${w*d}px;margin-${o[0]}: ${w*_}px;margin-${o[1]}: ${w*h}px;border-${o[0]}-width: ${w*g}px;border-${o[1]}-width: ${w*p}px;`}}const ka=n=>({}),Ll=n=>({});function ql(n){let e=n[3].label+"",t;return{c(){t=X(e)},l(l){t=x(l,e)},m(l,i){V(l,t,i)},p(l,i){i[0]&8&&e!==(e=l[3].label+"")&&me(t,e)},d(l){l&&m(t)}}}function wa(n){let e,t,l,i,f,r,s,a,o,u,c,d,_=n[3]&&ql(n);f=new Ur({props:{"aria-hidden":"true",title:n[1]}});const h=n[20].default,g=Re(h,n,n[19],null);let p=[{role:"navigation"},n[10]],w={};for(let N=0;Nt(18,o=se));const N=ml(M,se=>se.reduce((ge,Ee)=>({...ge,[Ee.id]:Ee}),{}));ze(n,N,se=>t(28,u=se));const A=lt(g),F=lt(void 0);ze(n,F,se=>t(16,s=se));const C=lt([]);ze(n,C,se=>t(17,a=se));const H=ml(C,se=>se.reduce((ge,Ee)=>({...ge,[Ee.id]:Ee}),{})),B=lt(void 0);let y=null;Xt("Tabs",{tabs:M,contentById:H,selectedTab:F,selectedContent:B,useAutoWidth:A,add:se=>{M.update(ge=>[...ge,{...se,index:ge.length}])},addContent:se=>{C.update(ge=>[...ge,{...se,index:ge.length}])},update:se=>{t(14,ee=u[se].index)},change:async se=>{let ge=ee+se;ge<0?ge=o.length-1:ge>=o.length&&(ge=0);let Ee=o[ge].disabled;for(;Ee;)ge=ge+se,ge<0?ge=o.length-1:ge>=o.length&&(ge=0),Ee=o[ge].disabled;t(14,ee=ge),await dr();const Ce=y==null?void 0:y.querySelectorAll("[role='tab']")[ee];Ce==null||Ce.focus()}}),xt(()=>{t(12,_=ee),W>-1&&W!==ee&&z("change",ee),W=ee});let R=!0,ee=_,W=-1;function ie(se){we.call(this,n,se)}function he(se){we.call(this,n,se)}const $=()=>{t(5,R=!R)},P=()=>{t(5,R=!R)},ce=()=>{t(5,R=!R)};function re(se){je[se?"unshift":"push"](()=>{y=se,t(4,y)})}return n.$$set=se=>{t(11,e=Q(Q({},e),be(se))),t(10,r=de(e,f)),"selected"in se&&t(12,_=se.selected),"type"in se&&t(0,h=se.type),"autoWidth"in se&&t(13,g=se.autoWidth),"iconDescription"in se&&t(1,p=se.iconDescription),"triggerHref"in se&&t(2,w=se.triggerHref),"$$scope"in se&&t(19,d=se.$$scope)},n.$$.update=()=>{n.$$.dirty[0]&4096&&t(14,ee=_),n.$$.dirty[0]&278528&&t(3,l=o[ee]||void 0),n.$$.dirty[0]&147456&&t(15,i=a[ee]||void 0),n.$$.dirty[0]&32776&&(l&&F.set(l.id),i&&B.set(i.id)),n.$$.dirty[0]&65536&&s&&t(5,R=!0),n.$$.dirty[0]&8192&&A.set(g)},e=be(e),[h,p,w,l,y,R,M,N,F,C,r,e,_,g,ee,i,s,a,o,d,c,ie,he,$,P,ce,re]}class Sa extends ve{constructor(e){super(),ke(this,e,Ea,wa,pe,{selected:12,type:0,autoWidth:13,iconDescription:1,triggerHref:2},null,[-1,-1])}}const $i=Sa;function Va(n){let e;return{c(){e=X(n[1])},l(t){e=x(t,n[1])},m(t,l){V(t,e,l)},p(t,l){l&2&&me(e,t[1])},d(t){t&&m(e)}}}function za(n){let e,t,l,i,f,r,s;const a=n[15].default,o=Re(a,n,n[14],null),u=o||Va(n);let c=[{tabindex:"-1"},{role:"presentation"},n[12]],d={};for(let _=0;_t(13,r=ee)),ze(n,w,ee=>t(7,s=ee)),z({id:h,label:u,disabled:d});function A(ee){we.call(this,n,ee)}function F(ee){we.call(this,n,ee)}function C(ee){we.call(this,n,ee)}function H(ee){we.call(this,n,ee)}function B(ee){je[ee?"unshift":"push"](()=>{g=ee,t(0,g)})}const y=()=>{d||M(h)},R=({key:ee})=>{d||(ee==="ArrowRight"?N(1):ee==="ArrowLeft"?N(-1):(ee===" "||ee==="Enter")&&M(h))};return n.$$set=ee=>{e=Q(Q({},e),be(ee)),t(12,f=de(e,i)),"label"in ee&&t(1,u=ee.label),"href"in ee&&t(2,c=ee.href),"disabled"in ee&&t(3,d=ee.disabled),"tabindex"in ee&&t(4,_=ee.tabindex),"id"in ee&&t(5,h=ee.id),"ref"in ee&&t(0,g=ee.ref),"$$scope"in ee&&t(14,o=ee.$$scope)},n.$$.update=()=>{n.$$.dirty&8224&&t(6,l=r===h)},[g,u,c,d,_,h,l,s,p,w,M,N,f,r,o,a,A,F,C,H,B,y,R]}class ya extends ve{constructor(e){super(),ke(this,e,Ma,za,pe,{label:1,href:2,disabled:3,tabindex:4,id:5,ref:0})}}const Vt=ya;function Ta(n){let e,t,l,i;const f=n[12].default,r=Re(f,n,n[11],null);let s=[{role:"tabpanel"},{"aria-labelledby":n[1]},{"aria-hidden":t=!n[2]},{hidden:l=n[2]?void 0:""},{id:n[0]},n[6]],a={};for(let o=0;ot(10,u=z)),ze(n,p,z=>t(8,a=z)),ze(n,w,z=>t(9,o=z)),g({id:_}),n.$$set=z=>{e=Q(Q({},e),be(z)),t(6,s=de(e,r)),"id"in z&&t(0,_=z.id),"$$scope"in z&&t(11,d=z.$$scope)},n.$$.update=()=>{n.$$.dirty&1025&&t(2,l=u===_),n.$$.dirty&513&&t(7,i=o[_].index),n.$$.dirty&384&&t(1,f=a[i].id)},[_,f,l,h,p,w,s,i,a,o,u,d,c]}class Da extends ve{constructor(e){super(),ke(this,e,Ia,Ta,pe,{id:0})}}const zt=Da;function jl(n){let e,t;return{c(){e=fe("title"),t=X(n[1])},l(l){e=oe(l,"title",{});var i=E(e);t=x(i,n[1]),i.forEach(m)},m(l,i){V(l,e,i),k(e,t)},p(l,i){i&2&&me(t,l[1])},d(l){l&&m(e)}}}function Ca(n){let e,t,l=n[1]&&jl(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{t(5,e=Q(Q({},e),be(o))),t(3,r=de(e,f)),"size"in o&&t(0,s=o.size),"title"in o&&t(1,a=o.title)},n.$$.update=()=>{t(4,l=e["aria-label"]||e["aria-labelledby"]||a),t(2,i={"aria-hidden":l?void 0:!0,role:l?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=be(e),[s,a,i,r,l]}class Na extends ve{constructor(e){super(),ke(this,e,Aa,Ca,pe,{size:0,title:1})}}function Yl(n){let e,t;return{c(){e=fe("title"),t=X(n[1])},l(l){e=oe(l,"title",{});var i=E(e);t=x(i,n[1]),i.forEach(m)},m(l,i){V(l,e,i),k(e,t)},p(l,i){i&2&&me(t,l[1])},d(l){l&&m(e)}}}function Ba(n){let e,t,l=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{t(5,e=Q(Q({},e),be(o))),t(3,r=de(e,f)),"size"in o&&t(0,s=o.size),"title"in o&&t(1,a=o.title)},n.$$.update=()=>{t(4,l=e["aria-label"]||e["aria-labelledby"]||a),t(2,i={"aria-hidden":l?void 0:!0,role:l?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=be(e),[s,a,i,r,l]}class Kt extends ve{constructor(e){super(),ke(this,e,Pa,Ba,pe,{size:0,title:1})}}function Ul(n){let e,t;return{c(){e=fe("title"),t=X(n[1])},l(l){e=oe(l,"title",{});var i=E(e);t=x(i,n[1]),i.forEach(m)},m(l,i){V(l,e,i),k(e,t)},p(l,i){i&2&&me(t,l[1])},d(l){l&&m(e)}}}function Ra(n){let e,t,l,i=n[1]&&Ul(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 s=0;s{t(5,e=Q(Q({},e),be(o))),t(3,r=de(e,f)),"size"in o&&t(0,s=o.size),"title"in o&&t(1,a=o.title)},n.$$.update=()=>{t(4,l=e["aria-label"]||e["aria-labelledby"]||a),t(2,i={"aria-hidden":l?void 0:!0,role:l?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=be(e),[s,a,i,r,l]}let Ha=class extends ve{constructor(e){super(),ke(this,e,Fa,Ra,pe,{size:0,title:1})}};function Wl(n){let e,t;return{c(){e=fe("title"),t=X(n[1])},l(l){e=oe(l,"title",{});var i=E(e);t=x(i,n[1]),i.forEach(m)},m(l,i){V(l,e,i),k(e,t)},p(l,i){i&2&&me(t,l[1])},d(l){l&&m(e)}}}function Oa(n){let e,t,l=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{t(5,e=Q(Q({},e),be(o))),t(3,r=de(e,f)),"size"in o&&t(0,s=o.size),"title"in o&&t(1,a=o.title)},n.$$.update=()=>{t(4,l=e["aria-label"]||e["aria-labelledby"]||a),t(2,i={"aria-hidden":l?void 0:!0,role:l?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=be(e),[s,a,i,r,l]}class qa extends ve{constructor(e){super(),ke(this,e,La,Oa,pe,{size:0,title:1})}}function Zl(n){let e,t;return{c(){e=fe("title"),t=X(n[1])},l(l){e=oe(l,"title",{});var i=E(e);t=x(i,n[1]),i.forEach(m)},m(l,i){V(l,e,i),k(e,t)},p(l,i){i&2&&me(t,l[1])},d(l){l&&m(e)}}}function ja(n){let e,t,l,i,f=n[1]&&Zl(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]],s={};for(let a=0;a{t(5,e=Q(Q({},e),be(o))),t(3,r=de(e,f)),"size"in o&&t(0,s=o.size),"title"in o&&t(1,a=o.title)},n.$$.update=()=>{t(4,l=e["aria-label"]||e["aria-labelledby"]||a),t(2,i={"aria-hidden":l?void 0:!0,role:l?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=be(e),[s,a,i,r,l]}class Ut extends ve{constructor(e){super(),ke(this,e,Ya,ja,pe,{size:0,title:1})}}function Kl(n){let e,t;return{c(){e=fe("title"),t=X(n[1])},l(l){e=oe(l,"title",{});var i=E(e);t=x(i,n[1]),i.forEach(m)},m(l,i){V(l,e,i),k(e,t)},p(l,i){i&2&&me(t,l[1])},d(l){l&&m(e)}}}function Ua(n){let e,t,l,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 s=0;s{t(5,e=Q(Q({},e),be(o))),t(3,r=de(e,f)),"size"in o&&t(0,s=o.size),"title"in o&&t(1,a=o.title)},n.$$.update=()=>{t(4,l=e["aria-label"]||e["aria-labelledby"]||a),t(2,i={"aria-hidden":l?void 0:!0,role:l?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=be(e),[s,a,i,r,l]}class it extends ve{constructor(e){super(),ke(this,e,Wa,Ua,pe,{size:0,title:1})}}function Ql(n){let e,t;return{c(){e=fe("title"),t=X(n[1])},l(l){e=oe(l,"title",{});var i=E(e);t=x(i,n[1]),i.forEach(m)},m(l,i){V(l,e,i),k(e,t)},p(l,i){i&2&&me(t,l[1])},d(l){l&&m(e)}}}function Za(n){let e,t,l=n[1]&&Ql(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{t(5,e=Q(Q({},e),be(o))),t(3,r=de(e,f)),"size"in o&&t(0,s=o.size),"title"in o&&t(1,a=o.title)},n.$$.update=()=>{t(4,l=e["aria-label"]||e["aria-labelledby"]||a),t(2,i={"aria-hidden":l?void 0:!0,role:l?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=be(e),[s,a,i,r,l]}class Qa extends ve{constructor(e){super(),ke(this,e,Ka,Za,pe,{size:0,title:1})}}function Jl(n){let e,t;return{c(){e=fe("title"),t=X(n[1])},l(l){e=oe(l,"title",{});var i=E(e);t=x(i,n[1]),i.forEach(m)},m(l,i){V(l,e,i),k(e,t)},p(l,i){i&2&&me(t,l[1])},d(l){l&&m(e)}}}function Ja(n){let e,t,l,i=n[1]&&Jl(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 s=0;s{t(5,e=Q(Q({},e),be(o))),t(3,r=de(e,f)),"size"in o&&t(0,s=o.size),"title"in o&&t(1,a=o.title)},n.$$.update=()=>{t(4,l=e["aria-label"]||e["aria-labelledby"]||a),t(2,i={"aria-hidden":l?void 0:!0,role:l?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=be(e),[s,a,i,r,l]}class Qt extends ve{constructor(e){super(),ke(this,e,Ga,Ja,pe,{size:0,title:1})}}function Gl(n){let e,t;return{c(){e=fe("title"),t=X(n[1])},l(l){e=oe(l,"title",{});var i=E(e);t=x(i,n[1]),i.forEach(m)},m(l,i){V(l,e,i),k(e,t)},p(l,i){i&2&&me(t,l[1])},d(l){l&&m(e)}}}function Xa(n){let e,t,l,i=n[1]&&Gl(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 s=0;s{t(5,e=Q(Q({},e),be(o))),t(3,r=de(e,f)),"size"in o&&t(0,s=o.size),"title"in o&&t(1,a=o.title)},n.$$.update=()=>{t(4,l=e["aria-label"]||e["aria-labelledby"]||a),t(2,i={"aria-hidden":l?void 0:!0,role:l?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=be(e),[s,a,i,r,l]}class $a extends ve{constructor(e){super(),ke(this,e,xa,Xa,pe,{size:0,title:1})}}function Xl(n){let e,t;return{c(){e=fe("title"),t=X(n[1])},l(l){e=oe(l,"title",{});var i=E(e);t=x(i,n[1]),i.forEach(m)},m(l,i){V(l,e,i),k(e,t)},p(l,i){i&2&&me(t,l[1])},d(l){l&&m(e)}}}function ef(n){let e,t,l=n[1]&&Xl(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{t(5,e=Q(Q({},e),be(o))),t(3,r=de(e,f)),"size"in o&&t(0,s=o.size),"title"in o&&t(1,a=o.title)},n.$$.update=()=>{t(4,l=e["aria-label"]||e["aria-labelledby"]||a),t(2,i={"aria-hidden":l?void 0:!0,role:l?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=be(e),[s,a,i,r,l]}class lf extends ve{constructor(e){super(),ke(this,e,tf,ef,pe,{size:0,title:1})}}function xl(n){let e,t;return{c(){e=fe("title"),t=X(n[1])},l(l){e=oe(l,"title",{});var i=E(e);t=x(i,n[1]),i.forEach(m)},m(l,i){V(l,e,i),k(e,t)},p(l,i){i&2&&me(t,l[1])},d(l){l&&m(e)}}}function nf(n){let e,t,l=n[1]&&xl(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{t(5,e=Q(Q({},e),be(o))),t(3,r=de(e,f)),"size"in o&&t(0,s=o.size),"title"in o&&t(1,a=o.title)},n.$$.update=()=>{t(4,l=e["aria-label"]||e["aria-labelledby"]||a),t(2,i={"aria-hidden":l?void 0:!0,role:l?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=be(e),[s,a,i,r,l]}class sf extends ve{constructor(e){super(),ke(this,e,rf,nf,pe,{size:0,title:1})}}function $l(n){let e,t;return{c(){e=fe("title"),t=X(n[1])},l(l){e=oe(l,"title",{});var i=E(e);t=x(i,n[1]),i.forEach(m)},m(l,i){V(l,e,i),k(e,t)},p(l,i){i&2&&me(t,l[1])},d(l){l&&m(e)}}}function af(n){let e,t,l,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 s=0;s{t(5,e=Q(Q({},e),be(o))),t(3,r=de(e,f)),"size"in o&&t(0,s=o.size),"title"in o&&t(1,a=o.title)},n.$$.update=()=>{t(4,l=e["aria-label"]||e["aria-labelledby"]||a),t(2,i={"aria-hidden":l?void 0:!0,role:l?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=be(e),[s,a,i,r,l]}class Bt extends ve{constructor(e){super(),ke(this,e,ff,af,pe,{size:0,title:1})}}function en(n){let e,t;return{c(){e=fe("title"),t=X(n[1])},l(l){e=oe(l,"title",{});var i=E(e);t=x(i,n[1]),i.forEach(m)},m(l,i){V(l,e,i),k(e,t)},p(l,i){i&2&&me(t,l[1])},d(l){l&&m(e)}}}function of(n){let e,t,l=n[1]&&en(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{t(5,e=Q(Q({},e),be(o))),t(3,r=de(e,f)),"size"in o&&t(0,s=o.size),"title"in o&&t(1,a=o.title)},n.$$.update=()=>{t(4,l=e["aria-label"]||e["aria-labelledby"]||a),t(2,i={"aria-hidden":l?void 0:!0,role:l?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=be(e),[s,a,i,r,l]}class cf extends ve{constructor(e){super(),ke(this,e,uf,of,pe,{size:0,title:1})}}function tn(n){let e,t;return{c(){e=fe("title"),t=X(n[1])},l(l){e=oe(l,"title",{});var i=E(e);t=x(i,n[1]),i.forEach(m)},m(l,i){V(l,e,i),k(e,t)},p(l,i){i&2&&me(t,l[1])},d(l){l&&m(e)}}}function df(n){let e,t,l=n[1]&&tn(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{t(5,e=Q(Q({},e),be(o))),t(3,r=de(e,f)),"size"in o&&t(0,s=o.size),"title"in o&&t(1,a=o.title)},n.$$.update=()=>{t(4,l=e["aria-label"]||e["aria-labelledby"]||a),t(2,i={"aria-hidden":l?void 0:!0,role:l?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=be(e),[s,a,i,r,l]}class Pt extends ve{constructor(e){super(),ke(this,e,hf,df,pe,{size:0,title:1})}}function ln(n){let e,t;return{c(){e=fe("title"),t=X(n[1])},l(l){e=oe(l,"title",{});var i=E(e);t=x(i,n[1]),i.forEach(m)},m(l,i){V(l,e,i),k(e,t)},p(l,i){i&2&&me(t,l[1])},d(l){l&&m(e)}}}function mf(n){let e,t,l=n[1]&&ln(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{t(5,e=Q(Q({},e),be(o))),t(3,r=de(e,f)),"size"in o&&t(0,s=o.size),"title"in o&&t(1,a=o.title)},n.$$.update=()=>{t(4,l=e["aria-label"]||e["aria-labelledby"]||a),t(2,i={"aria-hidden":l?void 0:!0,role:l?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=be(e),[s,a,i,r,l]}class Rt extends ve{constructor(e){super(),ke(this,e,_f,mf,pe,{size:0,title:1})}}function nn(n){let e,t;return{c(){e=fe("title"),t=X(n[1])},l(l){e=oe(l,"title",{});var i=E(e);t=x(i,n[1]),i.forEach(m)},m(l,i){V(l,e,i),k(e,t)},p(l,i){i&2&&me(t,l[1])},d(l){l&&m(e)}}}function gf(n){let e,t,l=n[1]&&nn(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{t(5,e=Q(Q({},e),be(o))),t(3,r=de(e,f)),"size"in o&&t(0,s=o.size),"title"in o&&t(1,a=o.title)},n.$$.update=()=>{t(4,l=e["aria-label"]||e["aria-labelledby"]||a),t(2,i={"aria-hidden":l?void 0:!0,role:l?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=be(e),[s,a,i,r,l]}class rn extends ve{constructor(e){super(),ke(this,e,bf,gf,pe,{size:0,title:1})}}function sn(n){let e,t;return{c(){e=fe("title"),t=X(n[1])},l(l){e=oe(l,"title",{});var i=E(e);t=x(i,n[1]),i.forEach(m)},m(l,i){V(l,e,i),k(e,t)},p(l,i){i&2&&me(t,l[1])},d(l){l&&m(e)}}}function pf(n){let e,t,l=n[1]&&sn(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{t(5,e=Q(Q({},e),be(o))),t(3,r=de(e,f)),"size"in o&&t(0,s=o.size),"title"in o&&t(1,a=o.title)},n.$$.update=()=>{t(4,l=e["aria-label"]||e["aria-labelledby"]||a),t(2,i={"aria-hidden":l?void 0:!0,role:l?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=be(e),[s,a,i,r,l]}class an extends ve{constructor(e){super(),ke(this,e,vf,pf,pe,{size:0,title:1})}}function fn(n){let e,t;return{c(){e=fe("title"),t=X(n[1])},l(l){e=oe(l,"title",{});var i=E(e);t=x(i,n[1]),i.forEach(m)},m(l,i){V(l,e,i),k(e,t)},p(l,i){i&2&&me(t,l[1])},d(l){l&&m(e)}}}function kf(n){let e,t,l,i=n[1]&&fn(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 s=0;s{t(5,e=Q(Q({},e),be(o))),t(3,r=de(e,f)),"size"in o&&t(0,s=o.size),"title"in o&&t(1,a=o.title)},n.$$.update=()=>{t(4,l=e["aria-label"]||e["aria-labelledby"]||a),t(2,i={"aria-hidden":l?void 0:!0,role:l?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=be(e),[s,a,i,r,l]}class Dt extends ve{constructor(e){super(),ke(this,e,wf,kf,pe,{size:0,title:1})}}function on(n){let e,t;return{c(){e=fe("title"),t=X(n[1])},l(l){e=oe(l,"title",{});var i=E(e);t=x(i,n[1]),i.forEach(m)},m(l,i){V(l,e,i),k(e,t)},p(l,i){i&2&&me(t,l[1])},d(l){l&&m(e)}}}function Ef(n){let e,t,l,i=n[1]&&on(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 s=0;s{t(5,e=Q(Q({},e),be(o))),t(3,r=de(e,f)),"size"in o&&t(0,s=o.size),"title"in o&&t(1,a=o.title)},n.$$.update=()=>{t(4,l=e["aria-label"]||e["aria-labelledby"]||a),t(2,i={"aria-hidden":l?void 0:!0,role:l?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=be(e),[s,a,i,r,l]}class Vf extends ve{constructor(e){super(),ke(this,e,Sf,Ef,pe,{size:0,title:1})}}const zf=100;function Mf(n,e,t,l){if(e==null)return[];let i=[];return l==null?i=ct(t||e):i=Nt(l,t||e),i.filter(f=>tr(n,f.path))}function yf(n,e){return e.some(t=>Ue(t.path,n.path))}function Tf(n,e){const t=Ze.field(n);return t==null?!1:yf(t,e)}function er(n,e){const t={};let l;if(n.fields!=null){for(const[f,r]of Object.entries(n.fields))if(e.some(s=>Ue(s.path,r.path))){const s=er(r,e);s!=null&&(t[f]=s)}}else n.repeated_field!=null&&(e.some(f=>{var r;return Ue(f.path,(r=n.repeated_field)==null?void 0:r.path)})?l=n.repeated_field:l=void 0);return l==null&&Object.keys(t).length===0?{...n,fields:void 0,repeated_field:void 0}:n.path.length===0||e.some(f=>Ue(f.path,n.path))?{...n,fields:t,repeated_field:l}:null}function If(n,e){var l,i;const t=[];for(const f of ll(n)){const r=e==null?void 0:e.find(a=>Ue(a.path,f.path)),s=(i=(l=r==null?void 0:r.stats)==null?void 0:l.data)==null?void 0:i.avg_text_length;s!=null&&s>zf&&t.push(f)}return t}function tr(n,e){if(n==null)return!1;if(typeof e!="string"&&(e=De(e)),n[e]!=null)return n[e];const t=gt(e);return t.length>1?tr(n,De(t.slice(0,t.length-1))):!0}function lr(n,e){return n.searchPath!=null&&n.selectedColumns[n.searchPath]!=!1?gt(n.searchPath):Df(e)}function nr(n,e,t,l){if(t==null)return null;if(n.searchEmbedding!=null)return n.searchEmbedding;const i=rl(e,t);return(i!=null?[...l||[]].sort((r,s)=>{const a=i.includes(r),o=i.includes(s);return a&&o?0:a?-1:o?1:0}):[])[0]}function rl(n,e){var i;if(n.schema==null||e==null)return[];const t=new Set,l=ct(nl(n.schema,e)).filter(f=>f.signal!=null&&ct(f).some(r=>r.dtype==="embedding"));for(const f of l)((i=f.signal)==null?void 0:i.signal_name)!=null&&t.add(f.signal.signal_name);return Array.from(t)}function Lt(n,e){return e==null||n==null?!1:(n.udfs||[]).some(t=>Cr(t.path,e))}function sl(n,e){return e==null?n.queryOptions.searches||[]:(n.queryOptions.searches||[]).filter(t=>Ue(t.path,e))}function Df(n){if(n.stats==null||n.stats.length===0)return null;const e=(n.visibleFields||[]).filter(t=>t.dtype==="string").map(t=>De(t.path));for(const t of n.stats){const l=De(t.path);if(e.indexOf(l)>=0)return t.path}return null}function Cf(n){var e,t;return(((t=(e=n.selectRowsSchema)==null?void 0:e.data)==null?void 0:t.sorts)||[])[0]||null}function Af(n,e){const t=n.length,l=Object.fromEntries(Object.keys(e).map(s=>[s,0]));for(const s of Object.keys(e))e[s].sort((a,o)=>{var d,_;const u=((d=a[tt])==null?void 0:d.start)||0,c=((_=o[tt])==null?void 0:_.start)||0;return u-c});let i=0;const f=[];let r=Object.fromEntries(Object.entries(l).map(([s,a])=>[s,[e[s][a],e[s][a+1]]]));for(;ii&&(s=d.start),d.endi&&(s=d.end))}const a=Object.fromEntries(Object.entries(r).map(([u,c])=>[u,c.filter(d=>d!=null&&d[tt]!=null&&d[tt].starti)]));for(const u of Object.keys(a))a[u].length===0&&delete a[u];const o=Object.values(a).flat().map(u=>Ze.path(u)).map(u=>De(u));f.push({text:n.slice(i,s),span:{start:i,end:s},originalSpans:a,paths:o});for(const u of Object.keys(l)){const c=l[u],d=(r[u][0]||{})[tt];if(!(d==null||c==null)&&d.end<=s){if(c>e[u].length){delete l[u];continue}l[u]++}}i=s,r=Object.fromEntries(Object.entries(l).map(([u,c])=>[u,[e[u][c],e[u][c+1]]]))}return i{if(!r)return;const M=z.target;p(M,s,i)<=l?(!u&&r&&(o("loadMore"),t(8,d=M.scrollHeight),t(9,_=M.scrollTop)),t(7,u=!0)):t(7,u=!1)},p=(z,M,N)=>{const A=z.documentElement?z.documentElement:z;return M?N?A.scrollLeft:A.scrollTop:N?A.scrollWidth-A.clientWidth-A.scrollLeft:A.scrollHeight-A.clientHeight-A.scrollTop};qi(()=>{a?t(10,h=document):f?t(10,h=f):t(10,h=c.parentNode)}),hr(()=>{h&&(h.removeEventListener("scroll",g),h.removeEventListener("resize",g))});function w(z){je[z?"unshift":"push"](()=>{c=z,t(2,c)})}return n.$$set=z=>{"threshold"in z&&t(3,l=z.threshold),"horizontal"in z&&t(4,i=z.horizontal),"elementScroll"in z&&t(0,f=z.elementScroll),"hasMore"in z&&t(5,r=z.hasMore),"reverse"in z&&t(6,s=z.reverse),"window"in z&&t(1,a=z.window)},n.$$.update=()=>{n.$$.dirty&1088&&h&&(s&&t(10,h.scrollTop=h.scrollHeight,h),h.addEventListener("scroll",g),h.addEventListener("resize",g)),n.$$.dirty&1984&&u&&s&&t(10,h.scrollTop=h.scrollHeight-d+_,h)},[f,a,c,l,i,r,s,u,d,_,h,w]}class Pf extends ve{constructor(e){super(),ke(this,e,Bf,Nf,pe,{threshold:3,horizontal:4,elementScroll:0,hasMore:5,reverse:6,window:1})}}function Rf(n){let e,t,l;const i=[n[4]];var f=n[3];function r(s){let a={};for(let o=0;o{U(u,1)}),ne()}f?(e=qe(f,r()),j(e.$$.fragment),b(e.$$.fragment,1),Y(e,t.parentNode,t)):e=null}else f&&e.$set(o)},i(s){l||(e&&b(e.$$.fragment,s),l=!0)},o(s){e&&v(e.$$.fragment,s),l=!1},d(s){s&&m(t),e&&U(e,s)}}}function Ff(n){let e,t;return{c(){e=I("span"),t=X(n[0]),this.h()},l(l){e=D(l,"SPAN",{class:!0});var i=E(e);t=x(i,n[0]),i.forEach(m),this.h()},h(){S(e,"class","whitespace-pre-wrap")},m(l,i){V(l,e,i),k(e,t)},p(l,i){i&1&&me(t,l[0])},i:te,o:te,d(l){l&&m(e)}}}function Hf(n){let e,t,l,i,f=`${n[2]}px`,r=`${Math.max(n[5]/2+Ct,Math.min(n[1],n[6]-n[5]/2-Ct))}px`,s;const a=[Ff,Rf],o=[];function u(c,d){return c[0]?0:c[3]?1:-1}return~(t=u(n))&&(l=o[t]=a[t](n)),{c(){e=I("div"),l&&l.c(),this.h()},l(c){e=D(c,"DIV",{role:!0,class:!0});var d=E(e);l&&l.l(d),d.forEach(m),this.h()},h(){S(e,"role","tooltip"),S(e,"class","absolute z-50 mt-2 min-w-max max-w-xs -translate-x-1/2 break-words border border-gray-300 bg-white p-2 shadow-md"),ht(()=>n[7].call(e)),Pe(e,"top",f),Pe(e,"left",r)},m(c,d){V(c,e,d),~t&&o[t].m(e,null),i=Yi(e,n[7].bind(e)),s=!0},p(c,[d]){let _=t;t=u(c),t===_?~t&&o[t].p(c,d):(l&&(le(),v(o[_],1,1,()=>{o[_]=null}),ne()),~t?(l=o[t],l?l.p(c,d):(l=o[t]=a[t](c),l.c()),b(l,1),l.m(e,null)):l=null),d&4&&f!==(f=`${c[2]}px`)&&Pe(e,"top",f),d&34&&r!==(r=`${Math.max(c[5]/2+Ct,Math.min(c[1],c[6]-c[5]/2-Ct))}px`)&&Pe(e,"left",r)},i(c){s||(b(l),s=!0)},o(c){v(l),s=!1},d(c){c&&m(e),~t&&o[t].d(),i()}}}const Ct=10;function Of(n,e,t){let{text:l}=e,{x:i}=e,{y:f}=e,{component:r}=e,{props:s}=e;const a=window.innerWidth;let o=0;function u(){o=this.clientWidth,t(5,o)}return n.$$set=c=>{"text"in c&&t(0,l=c.text),"x"in c&&t(1,i=c.x),"y"in c&&t(2,f=c.y),"component"in c&&t(3,r=c.component),"props"in c&&t(4,s=c.props)},[l,i,f,r,s,o,a,u]}class Lf extends ve{constructor(e){super(),ke(this,e,Of,Hf,pe,{text:0,x:1,y:2,component:3,props:4})}}function xe(n,{text:e,component:t,props:l}){if(t==null&&e==null)return;let i,f=e,r=t,s=l;function a(){if(i!=null)return;const u=n.getBoundingClientRect();i=new Lf({props:{text:f,component:r,props:s,x:u.left+u.width/2,y:u.bottom},target:document.body})}function o(){i==null||i.$destroy(),i=void 0}return n.addEventListener("mouseover",a),n.addEventListener("mouseleave",o),{update({text:u,component:c,props:d}){f=u,r=c,s=d,i==null||i.$set({tooltipText:u})},destroy(){o(),n.removeEventListener("mouseover",a),n.removeEventListener("mouseleave",o)}}}function qf(n){let e,t,l,i,f,r,s,a;l=new br({});const o=n[3].default,u=Re(o,n,n[6],null);return{c(){e=I("div"),t=I("button"),j(l.$$.fragment),i=J(),f=I("span"),u&&u.c(),this.h()},l(c){e=D(c,"DIV",{class:!0});var d=E(e);t=D(d,"BUTTON",{class:!0});var _=E(t);Z(l.$$.fragment,_),_.forEach(m),i=G(d),f=D(d,"SPAN",{class:!0});var h=E(f);u&&u.l(h),h.forEach(m),d.forEach(m),this.h()},h(){S(t,"class","opacity-50 hover:opacity-100"),S(f,"class","truncate"),S(e,"class","removable-tag flex items-center gap-x-1")},m(c,d){V(c,e,d),k(e,t),Y(l,t,null),k(e,i),k(e,f),u&&u.m(f,null),r=!0,s||(a=ae(t,"click",ji(n[4])),s=!0)},p(c,d){u&&u.p&&(!r||d&64)&&Fe(u,o,c,c[6],r?Oe(o,c[6],d,null):He(c[6]),null)},i(c){r||(b(l.$$.fragment,c),b(u,c),r=!0)},o(c){v(l.$$.fragment,c),v(u,c),r=!1},d(c){c&&m(e),U(l),u&&u.d(c),s=!1,a()}}}function jf(n){let e,t;const l=[{type:n[0]},n[2]];let i={$$slots:{default:[qf]},$$scope:{ctx:n}};for(let f=0;fs("remove");function u(c){we.call(this,n,c)}return n.$$set=c=>{e=Q(Q({},e),be(c)),t(2,i=de(e,l)),"type"in c&&t(0,a=c.type),"$$scope"in c&&t(6,r=c.$$scope)},[a,s,i,f,o,u,r]}class qt extends ve{constructor(e){super(),ke(this,e,Yf,jf,pe,{type:0})}}function Uf(n){let e=(n[2]?"":n[5])+"",t,l,i=n[0][n[1].op]+"",f,r,s;return{c(){t=X(e),l=J(),f=X(i),r=J(),s=X(n[4])},l(a){t=x(a,e),l=G(a),f=x(a,i),r=G(a),s=x(a,n[4])},m(a,o){V(a,t,o),V(a,l,o),V(a,f,o),V(a,r,o),V(a,s,o)},p(a,o){o&36&&e!==(e=(a[2]?"":a[5])+"")&&me(t,e),o&2&&i!==(i=a[0][a[1].op]+"")&&me(f,i),o&16&&me(s,a[4])},d(a){a&&m(t),a&&m(l),a&&m(f),a&&m(r),a&&m(s)}}}function Wf(n){let e,t,l,i,f,r;return t=new qt({props:{interactive:!0,type:"magenta",$$slots:{default:[Uf]},$$scope:{ctx:n}}}),t.$on("click",n[9]),t.$on("remove",n[10]),{c(){e=I("div"),j(t.$$.fragment),this.h()},l(s){e=D(s,"DIV",{class:!0});var a=E(e);Z(t.$$.fragment,a),a.forEach(m),this.h()},h(){S(e,"class","filter-pill items-center")},m(s,a){V(s,e,a),Y(t,e,null),i=!0,f||(r=Ke(l=xe.call(null,e,{text:n[6]})),f=!0)},p(s,[a]){const o={};a&2102&&(o.$$scope={dirty:a,ctx:s}),t.$set(o),l&&Ot(l.update)&&a&64&&l.update.call(null,{text:s[6]})},i(s){i||(b(t.$$.fragment,s),i=!0)},o(s){v(t.$$.fragment,s),i=!1},d(s){s&&m(e),U(t),f=!1,r()}}}function Zf(n,e,t){let l,i,f,r,s;const a={equals:"=",not_equal:"≠",less:"<",less_equal:"≤",greater:">",greater_equal:"≥",in:"in",exists:"exists"};let{filter:o}=e,{hidePath:u=!1}=e;const c=Qe();ze(n,c,h=>t(7,s=h));const d=()=>ot({command:ut.EditFilter,namespace:s.namespace,datasetName:s.datasetName,path:i}),_=()=>c.removeFilter(o);return n.$$set=h=>{"filter"in h&&t(1,o=h.filter),"hidePath"in h&&t(2,u=h.hidePath)},n.$$.update=()=>{n.$$.dirty&2&&t(4,l=Ne(o.value||"")),n.$$.dirty&2&&t(3,i=gt(o.path)),n.$$.dirty&18&&t(6,f=`${De(o.path)} ${a[o.op]} ${l}`),n.$$.dirty&8&&t(5,r=i.at(-1))},[a,o,u,i,l,r,f,s,c,d,_]}class al extends ve{constructor(e){super(),ke(this,e,Zf,Wf,pe,{FILTER_SHORTHANDS:0,filter:1,hidePath:2})}get FILTER_SHORTHANDS(){return this.$$.ctx[0]}}function Kf(n){let e=(n[1]?"":n[0])+"",t;return{c(){t=X(e)},l(l){t=x(l,e)},m(l,i){V(l,t,i)},p(l,i){i&3&&e!==(e=(l[1]?"":l[0])+"")&&me(t,e)},d(l){l&&m(t)}}}function Qf(n){let e,t,l,i,f;const r=[n[2],{type:"purple"},{icon:Kt}];let s={$$slots:{default:[Kf]},$$scope:{ctx:n}};for(let a=0;a{e=Q(Q({},e),be(s)),t(2,i=de(e,l)),"embedding"in s&&t(0,f=s.embedding),"hideEmbeddingName"in s&&t(1,r=s.hideEmbeddingName)},[f,r,i]}class jt extends ve{constructor(e){super(),ke(this,e,Jf,Qf,pe,{embedding:0,hideEmbeddingName:1})}}function Gf(n){let e=De(n[0].path)+"",t,l,i=n[0].query.type+"",f;return{c(){t=X(e),l=X(": "),f=X(i)},l(r){t=x(r,e),l=x(r,": "),f=x(r,i)},m(r,s){V(r,t,s),V(r,l,s),V(r,f,s)},p(r,s){s&1&&e!==(e=De(r[0].path)+"")&&me(t,e),s&1&&i!==(i=r[0].query.type+"")&&me(f,i)},d(r){r&&m(t),r&&m(l),r&&m(f)}}}function cn(n){let e,t,l;return t=new jt({props:{embedding:n[0].query.embedding}}),{c(){e=I("div"),j(t.$$.fragment),this.h()},l(i){e=D(i,"DIV",{class:!0});var f=E(e);Z(t.$$.fragment,f),f.forEach(m),this.h()},h(){S(e,"class","ml-2")},m(i,f){V(i,e,f),Y(t,e,null),l=!0},p(i,f){const r={};f&1&&(r.embedding=i[0].query.embedding),t.$set(r)},i(i){l||(b(t.$$.fragment,i),l=!0)},o(i){v(t.$$.fragment,i),l=!1},d(i){i&&m(e),U(t)}}}function dn(n){let e,t;return{c(){e=I("div"),t=X(n[2]),this.h()},l(l){e=D(l,"DIV",{class:!0});var i=E(e);t=x(i,n[2]),i.forEach(m),this.h()},h(){S(e,"class","mt-2 whitespace-pre-wrap text-left")},m(l,i){V(l,e,i),k(e,t)},p(l,i){i&4&&me(t,l[2])},d(l){l&&m(e)}}}function Xf(n){let e,t,l,i,f,r,s;l=new kt({props:{type:n[1],$$slots:{default:[Gf]},$$scope:{ctx:n}}});let a=(n[0].query.type==="semantic"||n[0].query.type==="concept")&&cn(n),o=n[2]&&dn(n);return{c(){e=I("div"),t=I("div"),j(l.$$.fragment),i=J(),a&&a.c(),f=J(),o&&o.c(),r=ue(),this.h()},l(u){e=D(u,"DIV",{class:!0});var c=E(e);t=D(c,"DIV",{class:!0});var d=E(t);Z(l.$$.fragment,d),d.forEach(m),i=G(c),a&&a.l(c),c.forEach(m),f=G(u),o&&o.l(u),r=ue(),this.h()},h(){S(t,"class","whitespace-nowrap"),S(e,"class","flex items-center justify-items-center")},m(u,c){V(u,e,c),k(e,t),Y(l,t,null),k(e,i),a&&a.m(e,null),V(u,f,c),o&&o.m(u,c),V(u,r,c),s=!0},p(u,[c]){const d={};c&2&&(d.type=u[1]),c&9&&(d.$$scope={dirty:c,ctx:u}),l.$set(d),u[0].query.type==="semantic"||u[0].query.type==="concept"?a?(a.p(u,c),c&1&&b(a,1)):(a=cn(u),a.c(),b(a,1),a.m(e,null)):a&&(le(),v(a,1,1,()=>{a=null}),ne()),u[2]?o?o.p(u,c):(o=dn(u),o.c(),o.m(r.parentNode,r)):o&&(o.d(1),o=null)},i(u){s||(b(l.$$.fragment,u),b(a),s=!0)},o(u){v(l.$$.fragment,u),v(a),s=!1},d(u){u&&m(e),U(l),a&&a.d(),u&&m(f),o&&o.d(u),u&&m(r)}}}function xf(n,e,t){let l,{search:i}=e,{tagType:f="outline"}=e;return n.$$set=r=>{"search"in r&&t(0,i=r.search),"tagType"in r&&t(1,f=r.tagType)},n.$$.update=()=>{n.$$.dirty&1&&t(2,l=i.query.type==="concept"?"":i.query.search)},[i,f,l]}class hn extends ve{constructor(e){super(),ke(this,e,xf,Xf,pe,{search:0,tagType:1})}}function $f(n){let e;return{c(){e=X(n[2])},l(t){e=x(t,n[2])},m(t,l){V(t,e,l)},p(t,l){l&4&&me(e,t[2])},d(t){t&&m(e)}}}function eo(n){let e,t,l,i,f,r;return t=new qt({props:{title:"query",interactive:!0,type:n[1],$$slots:{default:[$f]},$$scope:{ctx:n}}}),t.$on("remove",n[6]),{c(){e=I("div"),j(t.$$.fragment),this.h()},l(s){e=D(s,"DIV",{class:!0});var a=E(e);Z(t.$$.fragment,a),a.forEach(m),this.h()},h(){S(e,"class","search-pill items-center")},m(s,a){V(s,e,a),Y(t,e,null),i=!0,f||(r=Ke(l=xe.call(null,e,{component:hn,props:{search:n[0],tagType:n[1]}})),f=!0)},p(s,[a]){const o={};a&2&&(o.type=s[1]),a&260&&(o.$$scope={dirty:a,ctx:s}),t.$set(o),l&&Ot(l.update)&&a&3&&l.update.call(null,{component:hn,props:{search:s[0],tagType:s[1]}})},i(s){i||(b(t.$$.fragment,s),i=!0)},o(s){v(t.$$.fragment,s),i=!1},d(s){s&&m(e),U(t),f=!1,r()}}}function to(n,e,t){let l,i,f,{search:r}=e;const s={keyword:"outline",semantic:"teal",concept:"green"},a=Qe(),o=$e();ze(n,o,c=>t(3,f=c));const u=()=>{var c;return a.removeSearch(r,((c=f.selectRowsSchema)==null?void 0:c.data)||null)};return n.$$set=c=>{"search"in c&&t(0,r=c.search)},n.$$.update=()=>{n.$$.dirty&1&&t(2,l=r.query.type==="concept"?`${r.query.concept_namespace}/${r.query.concept_name}`:r.query.search),n.$$.dirty&1&&t(1,i=r.query.type!=null?s[r.query.type]:"outline")},[r,i,l,f,a,o,u]}class ir extends ve{constructor(e){super(),ke(this,e,to,eo,pe,{search:0})}}function mn(n,e,t){const l=n.slice();return l[9]=e[t],l}function _n(n,e,t){const l=n.slice();return l[12]=e[t],l}function gn(n,e,t){const l=n.slice();return l[15]=e[t],l}function bn(n){let e,t,l=n[6][n[12]]+"",i,f,r,s,a,o=n[2][n[12]],u=[];for(let d=0;dv(u[d],1,1,()=>{u[d]=null});return{c(){e=I("div"),t=I("div"),i=X(l),f=J(),r=I("div");for(let d=0;d{l=null}),ne())},i(i){t||(b(l),t=!0)},o(i){v(l),t=!1},d(i){l&&l.d(i),i&&m(e)}}}function kn(n){let e,t,l,i,f,r,s=n[3],a=[];for(let u=0;uv(a[u],1,1,()=>{a[u]=null});return{c(){e=I("div"),t=I("div"),l=X("Filters"),i=J(),f=I("div");for(let u=0;uv(a[d],1,1,()=>{a[d]=null});let u=n[3]!=null&&n[3].length>0&&kn(n),c=n[0]&&n[1]&&En(n);return{c(){e=I("div"),t=I("div");for(let d=0;d0?u?(u.p(d,_),_&8&&b(u,1)):(u=kn(d),u.c(),b(u,1),u.m(t,null)):u&&(le(),v(u,1,1,()=>{u=null}),ne()),d[0]&&d[1]?c?c.p(d,_):(c=En(d),c.c(),c.m(f,null)):c&&(c.d(1),c=null)},i(d){if(!r){for(let _=0;_t(8,f=d));const o=["keyword","semantic","concept"],u={keyword:"Keyword",semantic:"Semantic",concept:"Concepts"};let c={};return n.$$set=d=>{"totalNumRows"in d&&t(0,r=d.totalNumRows),"manifest"in d&&t(1,s=d.manifest)},n.$$.update=()=>{if(n.$$.dirty&256&&t(7,l=sl(f)),n.$$.dirty&256&&t(3,i=f.queryOptions.filters),n.$$.dirty&132){t(2,c={});for(const d of l)d.query.type&&(d.query.type in c||t(2,c[d.query.type]=[],c),c[d.query.type].push(d))}},[r,s,c,i,a,o,u,l,f]}class io extends ve{constructor(e){super(),ke(this,e,no,lo,pe,{totalNumRows:0,manifest:1})}}const Wt=.5,Sn=.3,ro=.8;function Jt(n){return`rgba(180,215,255,${n})`}function Gt(n){let e=0;if(n>Wt){const t=(n-Wt)/(1-Wt);e=Sn+t*(ro-Sn)}return Jt(e)}function Vn(n,e,t){const l=n.slice();return l[6]=e[t],l}function zn(n,e){let t,l,i=e[6].name+"",f,r,s,a,o=(typeof e[6].value=="number"?e[6].value.toFixed(3):e[6].value)+"",u,c;return{key:n,first:null,c(){t=I("div"),l=I("div"),f=X(i),r=J(),s=I("div"),a=I("span"),u=X(o),c=J(),this.h()},l(d){t=D(d,"DIV",{class:!0});var _=E(t);l=D(_,"DIV",{class:!0});var h=E(l);f=x(h,i),h.forEach(m),r=G(_),s=D(_,"DIV",{class:!0});var g=E(s);a=D(g,"SPAN",{class:!0});var p=E(a);u=x(p,o),p.forEach(m),g.forEach(m),c=G(_),_.forEach(m),this.h()},h(){S(l,"class","named-value-name table-cell max-w-xs truncate pr-2 svelte-1689hje"),S(a,"class","px-1"),Pe(a,"background-color",typeof e[6].value=="number"?Gt(e[6].value):""),S(s,"class","table-cell rounded text-right"),S(t,"class","table-row"),this.first=t},m(d,_){V(d,t,_),k(t,l),k(l,f),k(t,r),k(t,s),k(s,a),k(a,u),k(t,c)},p(d,_){e=d,_&1&&i!==(i=e[6].name+"")&&me(f,i),_&1&&o!==(o=(typeof e[6].value=="number"?e[6].value.toFixed(3):e[6].value)+"")&&me(u,o),_&1&&Pe(a,"background-color",typeof e[6].value=="number"?Gt(e[6].value):"")},d(d){d&&m(t)}}}function so(n){let e,t,l=[],i=new Map,f,r=`${n[2]}px`,s=`${Math.min(n[1],n[4]-n[3]-20)}px`,a=n[0];const o=u=>u[6];for(let u=0;un[5].call(e)),T(e,"hidden",n[0].length===0),Pe(e,"top",r),Pe(e,"left",s)},m(u,c){V(u,e,c),k(e,t);for(let d=0;d{"namedValues"in o&&t(0,l=o.namedValues),"x"in o&&t(1,i=o.x),"y"in o&&t(2,f=o.y)},[l,i,f,s,r,a]}class fo extends ve{constructor(e){super(),ke(this,e,ao,so,pe,{namedValues:0,x:1,y:2})}}function oo(n,e){let t,l=e;function i(){const r=n.getBoundingClientRect(),s=window.getComputedStyle(n),a=parseInt(s.getPropertyValue("line-height")),o=r.height>a?r.x+n.offsetLeft||n.clientLeft:r.x;t=new fo({props:{namedValues:l,x:o,y:r.top},target:document.body})}function f(){t==null||t.$destroy(),t=void 0}return n.addEventListener("mouseover",i),n.addEventListener("mouseleave",f),{update(r){l=r,t==null||t.$set({namedValues:r})},destroy(){f(),n.removeEventListener("mouseover",i),n.removeEventListener("mouseleave",f)}}}function uo(n,e){const t=l=>n&&!n.contains(l.target)&&!l.defaultPrevented&&e();return document.addEventListener("click",t,!0),{destroy(){document.removeEventListener("click",t,!0)}}}function Mn(n,e,t){const l=n.slice();return l[20]=e[t],l}function yn(n){let e,t,l=n[0].conceptNamespace+"",i,f,r=n[0].conceptName+"",s,a,o,u,c,d,_,h,g,p;return u=new vr({}),_=new kr({}),{c(){e=I("div"),t=I("span"),i=X(l),f=X(" / "),s=X(r),a=J(),o=I("button"),j(u.$$.fragment),c=J(),d=I("button"),j(_.$$.fragment),this.h()},l(w){e=D(w,"DIV",{class:!0});var z=E(e);t=D(z,"SPAN",{class:!0});var M=E(t);i=x(M,l),f=x(M," / "),s=x(M,r),M.forEach(m),a=G(z),o=D(z,"BUTTON",{class:!0});var N=E(o);Z(u.$$.fragment,N),N.forEach(m),c=G(z),d=D(z,"BUTTON",{class:!0});var A=E(d);Z(_.$$.fragment,A),A.forEach(m),z.forEach(m),this.h()},h(){S(t,"class","pr-4"),S(o,"class","px-2"),S(d,"class","px-2"),S(e,"class","flex flex-row px-4 pt-2")},m(w,z){V(w,e,z),k(e,t),k(t,i),k(t,f),k(t,s),k(e,a),k(e,o),Y(u,o,null),k(e,c),k(e,d),Y(_,d,null),h=!0,g||(p=[ae(o,"click",n[14]),ae(d,"click",n[15])],g=!0)},p(w,z){(!h||z&1)&&l!==(l=w[0].conceptNamespace+"")&&me(i,l),(!h||z&1)&&r!==(r=w[0].conceptName+"")&&me(s,r)},i(w){h||(b(u.$$.fragment,w),b(_.$$.fragment,w),h=!0)},o(w){v(u.$$.fragment,w),v(_.$$.fragment,w),h=!1},d(w){w&&m(e),U(u),U(_),g=!1,Ye(p)}}}function co(n){let e,t,l,i;return t=new jt({props:{class:"hover:cursor-pointer",embedding:n[20]}}),{c(){e=X("Find similar "),j(t.$$.fragment),l=J()},l(f){e=x(f,"Find similar "),Z(t.$$.fragment,f),l=G(f)},m(f,r){V(f,e,r),Y(t,f,r),V(f,l,r),i=!0},p(f,r){const s={};r&4&&(s.embedding=f[20]),t.$set(s)},i(f){i||(b(t.$$.fragment,f),i=!0)},o(f){v(t.$$.fragment,f),i=!1},d(f){f&&m(e),U(t,f),f&&m(l)}}}function Tn(n,e){let t,l,i;function f(){return e[16](e[20])}return l=new at({props:{kind:"ghost",class:"w-full",size:"small",$$slots:{default:[co]},$$scope:{ctx:e}}}),l.$on("click",f),{key:n,first:null,c(){t=ue(),j(l.$$.fragment),this.h()},l(r){t=ue(),Z(l.$$.fragment,r),this.h()},h(){this.first=t},m(r,s){V(r,t,s),Y(l,r,s),i=!0},p(r,s){e=r;const a={};s&8388612&&(a.$$scope={dirty:s,ctx:e}),l.$set(a)},i(r){i||(b(l.$$.fragment,r),i=!0)},o(r){v(l.$$.fragment,r),i=!1},d(r){r&&m(t),U(l,r)}}}function ho(n){let e,t,l,i=[],f=new Map,r,s,a,o,u,c=n[0].conceptName!=null&&n[0].conceptNamespace!=null&&yn(n),d=n[2];const _=h=>h[20];for(let h=0;h{c=null}),ne()),g&516&&(d=h[2],le(),i=nt(i,g,_,1,h,d,f,l,dt,Tn,null,Mn),ne()),(!a||g&2&&r!==(r=h[1]!=null?`left: ${h[1].x}px; top: ${h[1].y}px`:""))&&S(e,"style",r),(!a||g&4)&&T(e,"hidden",h[2].length===0)},i(h){if(!a){b(c);for(let g=0;g{a&&(s||(s=st(e,Ol,{duration:60},!0)),s.run(1))}),a=!0}},o(h){v(c);for(let g=0;gt(13,a=C));let _=$e();ze(n,_,C=>t(11,r=C));const h=pr();ze(n,h,C=>t(19,o=C));const g=ft();function p(C){if(!u.conceptName||!u.conceptNamespace)throw Error("Label could not be added, no active concept.");o.mutate([u.conceptNamespace,u.conceptName,{insert:[{text:u.text,label:C}]}]),g("click")}const w=tl();ze(n,w,C=>t(12,s=C));const z=C=>{l==null||i==null||(d.addSearch({path:[De(l)],query:{type:"semantic",search:u.text,embedding:C}}),g("click"))},M=()=>p(!0),N=()=>p(!1),A=C=>z(C),F=()=>g("close");return n.$$set=C=>{"details"in C&&t(0,u=C.details),"clickPosition"in C&&t(1,c=C.clickPosition)},n.$$.update=()=>{n.$$.dirty&10240&&t(10,l=lr(a,r)),n.$$.dirty&15360&&(i=nr(a,r,l,(s.data||[]).map(C=>C.name))),n.$$.dirty&3072&&t(2,f=rl(r,l))},[u,c,f,d,_,h,g,p,w,z,l,r,s,a,M,N,A,F]}class _o extends ve{constructor(e){super(),ke(this,e,mo,ho,pe,{details:0,clickPosition:1})}}function In(n,e,t){const l=n.slice();l[29]=e[t];const i=l[9](l[3],l[29]);return l[30]=i,l}function Dn(n){let e,t=n[29].text+"",l,i,f,r;function s(){return n[23](n[29])}function a(){return n[24](n[29])}function o(...c){return n[25](n[29],...c)}function u(...c){return n[26](n[29],...c)}return{c(){e=I("span"),l=X(t),this.h()},l(c){e=D(c,"SPAN",{class:!0});var d=E(e);l=x(d,t),d.forEach(m),this.h()},h(){S(e,"class","hover:cursor-poiner highlight-span text-sm leading-5 svelte-i4bfci"),T(e,"hover:cursor-pointer",n[0].length>0),T(e,"font-bold",n[29].isBolded),T(e,"underline",n[29].isUnderlined),Pe(e,"background-color",n[30]?Jt(An):n[29].backgroundColor)},m(c,d){V(c,e,d),k(e,l),f||(r=[Ke(i=oo.call(null,e,n[29].hoverInfo)),ae(e,"mouseenter",s),ae(e,"mouseleave",a),ae(e,"keydown",o),ae(e,"click",u)],f=!0)},p(c,d){n=c,d[0]&2&&t!==(t=n[29].text+"")&&me(l,t),i&&Ot(i.update)&&d[0]&2&&i.update.call(null,n[29].hoverInfo),d[0]&1&&T(e,"hover:cursor-pointer",n[0].length>0),d[0]&2&&T(e,"font-bold",n[29].isBolded),d[0]&2&&T(e,"underline",n[29].isUnderlined),d[0]&10&&Pe(e,"background-color",n[30]?Jt(An):n[29].backgroundColor)},d(c){c&&m(e),f=!1,Ye(r)}}}function Cn(n){let e,t;return e=new _o({props:{details:n[4],clickPosition:n[5]}}),e.$on("close",n[27]),e.$on("click",n[28]),{c(){j(e.$$.fragment)},l(l){Z(e.$$.fragment,l)},m(l,i){Y(e,l,i),t=!0},p(l,i){const f={};i[0]&16&&(f.details=l[4]),i[0]&32&&(f.clickPosition=l[5]),e.$set(f)},i(l){t||(b(e.$$.fragment,l),t=!0)},o(l){v(e.$$.fragment,l),t=!1},d(l){U(e,l)}}}function go(n){let e,t,l,i=n[1],f=[];for(let s=0;s{r=null}),ne())},i(s){l||(b(r),l=!0)},o(s){v(r),l=!1},d(s){s&&m(e),We(f,s),r&&r.d()}}}const An=.9;function bo(n,e,t){let l,i,f,r,s,a,{text:o}=e,{row:u}=e,{field:c}=e,{visibleKeywordSpanFields:d}=e,{visibleSpanFields:_}=e,{visibleLabelSpanFields:h}=e;const g=$e();ze(n,g,$=>t(22,a=$));let p,w,z={},M=new Set;const N=$=>{$.paths.forEach(P=>M.add(P)),t(3,M)},A=$=>{$.paths.forEach(P=>M.delete(P)),t(3,M)},F=($,P)=>P.paths.some(ce=>$.has(ce));let C,H,B;const y=$=>N($),R=$=>A($),ee=($,P)=>{P.key=="Enter"&&$.originalSpans!=null&&_.length>0&&t(2,C=$)},W=($,P)=>{$.originalSpans!=null&&_.length>0&&t(2,C=$),t(5,B={x:P.offsetX,y:P.offsetY})},ie=()=>{t(2,C=void 0)},he=()=>{t(2,C=void 0)};return n.$$set=$=>{"text"in $&&t(10,o=$.text),"row"in $&&t(11,u=$.row),"field"in $&&t(12,c=$.field),"visibleKeywordSpanFields"in $&&t(13,d=$.visibleKeywordSpanFields),"visibleSpanFields"in $&&t(0,_=$.visibleSpanFields),"visibleLabelSpanFields"in $&&t(14,h=$.visibleLabelSpanFields)},n.$$.update=()=>{var $;if(n.$$.dirty[0]&8192&&t(20,l=d.map(P=>De(P.path))),n.$$.dirty[0]&16384&&t(19,i=h.map(P=>De(P.path))),n.$$.dirty[0]&4194305&&t(18,f=Object.fromEntries(_.map(P=>[De(P.path),ll(P).filter(ce=>ce.dtype!="string_span").filter(ce=>{var re;return(re=a.visibleFields)==null?void 0:re.some(se=>Ue(se.path,ce.path))})]))),n.$$.dirty[0]&262144&&t(15,p=Object.fromEntries(Object.entries(f).map(([P,ce])=>[P,ce.filter(re=>Ar(re.signal))]).filter(([P,ce])=>ce.length>0))),n.$$.dirty[0]&2049&&t(21,r=Object.fromEntries(_.map(P=>[De(P.path),Wi(u,P.path)]))),n.$$.dirty[0]&2098176&&t(17,s=Af(o,r)),n.$$.dirty[0]&1970178){t(1,w=[]);for(const P of s){const ce=l.some(Ce=>P.originalSpans[Ce]!=null),re=i.some(Ce=>P.originalSpans[Ce]!=null),se={};let ge=-1/0;for(const[Ce,_e]of Object.entries(P.originalSpans)){const Se=f[Ce],K=gt(Ce);if(Se.length!==0)for(const L of _e)for(const q of Se){const O=q.path.slice(K.length),Ve=Zi(L,O);if(Ve==null)continue;const Le=Ze.value(Ve);if(Le!=null&&((($=q.signal)==null?void 0:$.signal_name)==="concept_score"?se[q.path.at(-1)]=Le:se[De(q.path.slice(c.path.length))]=Le,q.dtype==="float32")){const Je=Ze.value(Ve);Je!=null&&(ge=Math.max(ge,Je))}}}const Ee=Object.entries(se).map(([Ce,_e])=>({name:Ce,value:_e}));w.push({backgroundColor:Gt(ge),isBolded:ce,isUnderlined:re,hoverInfo:Ee,paths:P.paths,text:P.text,originalSpans:P.originalSpans})}}if(n.$$.dirty[0]&196608){t(16,z={});for(const P of s)for(const ce of P.paths)t(16,z[ce]=z[ce]||[],z),z[ce].push(P)}if(n.$$.dirty[0]&32774)if(C!=null){const ce=w.filter(re=>re.paths.some(se=>((C==null?void 0:C.paths)||[]).some(ge=>Ue(ge,se)))).map(re=>re.text).join("");t(4,H={conceptName:null,conceptNamespace:null,text:ce});for(const re of Object.keys(C.originalSpans))for(const se of p[re]||[]){t(4,H.conceptName=se.signal.concept_name,H),t(4,H.conceptNamespace=se.signal.namespace,H);break}}else t(4,H=void 0)},[_,w,C,M,H,B,g,N,A,F,o,u,c,d,h,p,z,s,f,i,l,r,a,y,R,ee,W,ie,he]}class po extends ve{constructor(e){super(),ke(this,e,bo,go,pe,{text:10,row:11,field:12,visibleKeywordSpanFields:13,visibleSpanFields:0,visibleLabelSpanFields:14},null,[-1,-1])}}function Nn(n,e,t){const l=n.slice();l[8]=e[t],l[11]=t;const i=l[3].length>1?`[${l[11]}]`:"";return l[9]=i,l}function Bn(n){let e,t,l,i=n[0].join(".")+n[9]+"",f,r,s,a,o,u;return a=new po({props:{text:Ne(n[8]),field:n[2],row:n[1],visibleKeywordSpanFields:n[6],visibleSpanFields:n[5],visibleLabelSpanFields:n[4]}}),{c(){e=I("div"),t=I("div"),l=I("div"),f=X(i),r=J(),s=I("div"),j(a.$$.fragment),o=J(),this.h()},l(c){e=D(c,"DIV",{class:!0});var d=E(e);t=D(d,"DIV",{class:!0});var _=E(t);l=D(_,"DIV",{class:!0});var h=E(l);f=x(h,i),h.forEach(m),r=G(_),s=D(_,"DIV",{class:!0});var g=E(s);Z(a.$$.fragment,g),g.forEach(m),_.forEach(m),o=G(d),d.forEach(m),this.h()},h(){S(l,"class","sticky top-0 z-10 w-full self-start border-t border-neutral-200 bg-neutral-50 px-2 py-2 pb-2 font-mono font-medium text-neutral-500 shadow backdrop-blur-sm"),S(s,"class","m-4 font-normal"),S(t,"class","flex w-full flex-col"),S(e,"class","flex flex-row")},m(c,d){V(c,e,d),k(e,t),k(t,l),k(l,f),k(t,r),k(t,s),Y(a,s,null),k(e,o),u=!0},p(c,d){(!u||d&9)&&i!==(i=c[0].join(".")+c[9]+"")&&me(f,i);const _={};d&8&&(_.text=Ne(c[8])),d&4&&(_.field=c[2]),d&2&&(_.row=c[1]),d&64&&(_.visibleKeywordSpanFields=c[6]),d&32&&(_.visibleSpanFields=c[5]),d&16&&(_.visibleLabelSpanFields=c[4]),a.$set(_)},i(c){u||(b(a.$$.fragment,c),u=!0)},o(c){v(a.$$.fragment,c),u=!1},d(c){c&&m(e),U(a)}}}function vo(n){let e,t,l=n[3],i=[];for(let r=0;rv(i[r],1,1,()=>{i[r]=null});return{c(){for(let r=0;r{"path"in c&&t(0,a=c.path),"row"in c&&t(1,o=c.row),"field"in c&&t(2,u=c.field)},n.$$.update=()=>{n.$$.dirty&4&&t(7,l=ct(u)),n.$$.dirty&128&&t(6,i=l.filter(c=>{var d;return((d=c.signal)==null?void 0:d.signal_name)==="substring_search"}).flatMap(c=>Nt("string_span",c))),n.$$.dirty&128&&t(5,f=l.filter(c=>{var d;return((d=c.signal)==null?void 0:d.signal_name)!=="substring_search"}).filter(c=>c.dtype==="string_span")),n.$$.dirty&128&&t(4,r=l.filter(c=>{var d;return((d=c.signal)==null?void 0:d.signal_name)==="concept_labels"}).flatMap(c=>Nt("string_span",c))),n.$$.dirty&3&&t(3,s=Wi(o,a).map(c=>Ze.value(c)).filter(Nr))},[a,o,u,s,r,f,i,l]}class wo extends ve{constructor(e){super(),ke(this,e,ko,vo,pe,{path:0,row:1,field:2})}}function Eo(n){let e,t,l,i,f;const r=[n[3],{type:n[0]?"green":"blue"},{icon:n[2]}];let s={};for(let a=0;a{e=Q(Q({},e),be(a)),t(3,i=de(e,l)),"isPreview"in a&&t(0,f=a.isPreview)},[f,r,s,i]}class fl extends ve{constructor(e){super(),ke(this,e,So,Eo,pe,{isPreview:0})}}function Pn(n,e,t){const l=n.slice();return l[0]=e[t],l}function Rn(n){let e,t,l=[],i=new Map,f,r=n[1];const s=a=>De(a[0].path);for(let a=0;a{A[B]=null}),ne()),~u?(c=A[u],c?c.p(e,H):(c=A[u]=N[u](e),c.c()),b(c,1),c.m(o,null)):c=null),(!M||H&2)&&g!==(g=e[0].formattedValue+"")&&me(p,g),(!M||H&2&&w!==(w=`${e[0].value}`))&&S(h,"title",w),(!M||H&2)&&T(h,"italic",e[0].formattedValue===null)},i(C){M||(b(c),M=!0)},o(C){v(c),M=!1},d(C){C&&m(t),~u&&A[u].d()}}}function Mo(n){let e,t,l=n[1].length>0&&Rn(n);return{c(){l&&l.c(),e=ue()},l(i){l&&l.l(i),e=ue()},m(i,f){l&&l.m(i,f),V(i,e,f),t=!0},p(i,[f]){i[1].length>0?l?(l.p(i,f),f&2&&b(l,1)):(l=Rn(i),l.c(),b(l,1),l.m(e.parentNode,e)):l&&(le(),v(l,1,1,()=>{l=null}),ne())},i(i){t||(b(l),t=!0)},o(i){v(l),t=!1},d(i){l&&l.d(i),i&&m(e)}}}function yo(n,e,t){let l,i,f,{row:r}=e,{visibleFields:s}=e;const a=$e();ze(n,a,c=>t(5,i=c));const o=tl();ze(n,o,c=>t(6,f=c));function u(c){return Br(c).filter(_=>Tf(_,s)).map(_=>{var N,A;const h=Ze.field(_),g=Ze.path(_);let p=Ze.value(_);if(h.dtype==="string_span")for(let F=g.length-1;F>0;F--){const C=g.slice(0,F),H=nl(Ze.field(c),C);if((H==null?void 0:H.dtype)==="string"){const B=Ze.value(Zi(c,H.path)),y=Ze.value(_);if(y==null)break;p=B==null?void 0:B.substring(y.start,y.end)}}const w=((N=f.data)==null?void 0:N.some(F=>{var C;return F.name===((C=h.signal)==null?void 0:C.signal_name)}))||!1,z=bt(h);let M;return w||z&&h.dtype==null||h.dtype==="embedding"||h.repeated_field!=null?M="":p==null?M=null:M=Ne(p),{indentLevel:g.length-1,fieldName:g[g.length-1],field:h,path:g,isSignal:z,isPreviewSignal:Lt(((A=i.selectRowsSchema)==null?void 0:A.data)||null,g),isEmbeddingSignal:w,value:p,formattedValue:M}})}return n.$$set=c=>{"row"in c&&t(0,r=c.row),"visibleFields"in c&&t(4,s=c.visibleFields)},n.$$.update=()=>{n.$$.dirty&1&&t(1,l=u(r))},[r,l,a,o,s]}class To extends ve{constructor(e){super(),ke(this,e,yo,Mo,pe,{row:0,visibleFields:4})}}function Hn(n,e,t){const l=n.slice();return l[3]=e[t],l[5]=t,l}function On(n){let e,t=[],l=new Map,i,f=n[1];const r=s=>De(s[3].path);for(let s=0;s0&&On(n);return f=new To({props:{row:n[0],visibleFields:n[2]}}),{c(){e=I("div"),t=I("div"),s&&s.c(),l=J(),i=I("div"),j(f.$$.fragment),this.h()},l(a){e=D(a,"DIV",{class:!0});var o=E(e);t=D(o,"DIV",{class:!0});var u=E(t);s&&s.l(u),l=G(u),i=D(u,"DIV",{class:!0});var c=E(i);Z(f.$$.fragment,c),c.forEach(m),u.forEach(m),o.forEach(m),this.h()},h(){S(i,"class","sticky top-0 w-1/3 self-start"),S(t,"class","flex w-full flex-row"),S(e,"class","mx-4 mb-10 rounded border-x border-b border-neutral-200 pb-2 shadow-md")},m(a,o){V(a,e,o),k(e,t),s&&s.m(t,null),k(t,l),k(t,i),Y(f,i,null),r=!0},p(a,[o]){a[1].length>0?s?(s.p(a,o),o&2&&b(s,1)):(s=On(a),s.c(),b(s,1),s.m(t,l)):s&&(le(),v(s,1,1,()=>{s=null}),ne());const u={};o&1&&(u.row=a[0]),o&4&&(u.visibleFields=a[2]),f.$set(u)},i(a){r||(b(s),b(f.$$.fragment,a),r=!0)},o(a){v(s),v(f.$$.fragment,a),r=!1},d(a){a&&m(e),s&&s.d(),U(f)}}}function Do(n,e,t){let{row:l}=e,{mediaFields:i}=e,{visibleFields:f}=e;return n.$$set=r=>{"row"in r&&t(0,l=r.row),"mediaFields"in r&&t(1,i=r.mediaFields),"visibleFields"in r&&t(2,f=r.visibleFields)},[l,i,f]}class Co extends ve{constructor(e){super(),ke(this,e,Do,Io,pe,{row:0,mediaFields:1,visibleFields:2})}}function qn(n,e,t){const l=n.slice();return l[50]=e[t],l}function jn(n,e,t){const l=n.slice();return l[53]=e[t],l}function Ao(n){let e=St[0]+"",t;return{c(){t=X(e)},l(l){t=x(l,e)},m(l,i){V(l,t,i)},p:te,d(l){l&&m(t)}}}function No(n){let e=St[1]+"",t;return{c(){t=X(e)},l(l){t=x(l,e)},m(l,i){V(l,t,i)},p:te,d(l){l&&m(t)}}}function Bo(n){let e,t,l,i;return e=new Vt({props:{$$slots:{default:[Ao]},$$scope:{ctx:n}}}),l=new Vt({props:{$$slots:{default:[No]},$$scope:{ctx:n}}}),{c(){j(e.$$.fragment),t=J(),j(l.$$.fragment)},l(f){Z(e.$$.fragment,f),t=G(f),Z(l.$$.fragment,f)},m(f,r){Y(e,f,r),V(f,t,r),Y(l,f,r),i=!0},p(f,r){const s={};r[1]&67108864&&(s.$$scope={dirty:r,ctx:f}),e.$set(s);const a={};r[1]&67108864&&(a.$$scope={dirty:r,ctx:f}),l.$set(a)},i(f){i||(b(e.$$.fragment,f),b(l.$$.fragment,f),i=!0)},o(f){v(e.$$.fragment,f),v(l.$$.fragment,f),i=!1},d(f){U(e,f),f&&m(t),U(l,f)}}}function Po(n){let e,t=n[56].text+"",l;return{c(){e=I("div"),l=X(t)},l(i){e=D(i,"DIV",{});var f=E(e);l=x(f,t),f.forEach(m)},m(i,f){V(i,e,f),k(e,l)},p(i,f){f[1]&33554432&&t!==(t=i[56].text+"")&&me(l,t)},i:te,o:te,d(i){i&&m(e)}}}function Ro(n){let e,t,l,i,f,r=n[0]!=""?":":"",s,a,o,u;return t=new kt({props:{$$slots:{default:[Fo]},$$scope:{ctx:n}}}),{c(){e=I("div"),j(t.$$.fragment),l=J(),i=I("div"),f=X("New concept"),s=X(r),a=J(),o=X(n[0]),this.h()},l(c){e=D(c,"DIV",{class:!0});var d=E(e);Z(t.$$.fragment,d),l=G(d),i=D(d,"DIV",{class:!0});var _=E(i);f=x(_,"New concept"),s=x(_,r),a=G(_),o=x(_,n[0]),_.forEach(m),d.forEach(m),this.h()},h(){S(i,"class","ml-2"),S(e,"class","new-concept flex flex-row items-center justify-items-center")},m(c,d){V(c,e,d),Y(t,e,null),k(e,l),k(e,i),k(i,f),k(i,s),k(i,a),k(i,o),u=!0},p(c,d){const _={};d[1]&67108864&&(_.$$scope={dirty:d,ctx:c}),t.$set(_),(!u||d[0]&1)&&r!==(r=c[0]!=""?":":"")&&me(s,r),(!u||d[0]&1)&&me(o,c[0])},i(c){u||(b(t.$$.fragment,c),u=!0)},o(c){v(t.$$.fragment,c),u=!1},d(c){c&&m(e),U(t)}}}function Fo(n){let e,t;return e=new Na({}),{c(){j(e.$$.fragment)},l(l){Z(e.$$.fragment,l)},m(l,i){Y(e,l,i),t=!0},i(l){t||(b(e.$$.fragment,l),t=!0)},o(l){v(e.$$.fragment,l),t=!1},d(l){U(e,l)}}}function Ho(n){let e,t,l,i;const f=[Ro,Po],r=[];function s(a,o){return a[56].id==="new-concept"?0:1}return e=s(n),t=r[e]=f[e](n),{c(){t.c(),l=ue()},l(a){t.l(a),l=ue()},m(a,o){r[e].m(a,o),V(a,l,o),i=!0},p(a,o){let u=e;e=s(a),e===u?r[e].p(a,o):(le(),v(r[u],1,1,()=>{r[u]=null}),ne(),t=r[e],t?t.p(a,o):(t=r[e]=f[e](a),t.c()),b(t,1),t.m(l.parentNode,l))},i(a){i||(b(t),i=!0)},o(a){v(t),i=!1},d(a){r[e].d(a),a&&m(l)}}}function Oo(n){let e,t,l,i,f;function r(a){n[41](a)}let s={size:"xl",items:n[11],disabled:!n[7],shouldFilterItem:Wo,placeholder:"Search by concept",$$slots:{default:[Ho,({item:a})=>({56:a}),({item:a})=>[0,a?33554432:0]]},$$scope:{ctx:n}};return n[0]!==void 0&&(s.value=n[0]),l=new Jr({props:s}),n[40](l),je.push(()=>$t(l,"value",r)),l.$on("select",n[26]),{c(){e=I("div"),t=I("div"),j(l.$$.fragment),this.h()},l(a){e=D(a,"DIV",{class:!0});var o=E(e);t=D(o,"DIV",{class:!0});var u=E(t);Z(l.$$.fragment,u),u.forEach(m),o.forEach(m),this.h()},h(){S(t,"class","flex-grow"),S(e,"class","flex w-full flex-row items-start justify-items-start")},m(a,o){V(a,e,o),k(e,t),Y(l,t,null),f=!0},p(a,o){const u={};o[0]&2048&&(u.items=a[11]),o[0]&128&&(u.disabled=!a[7]),o[0]&1|o[1]&100663296&&(u.$$scope={dirty:o,ctx:a}),!i&&o[0]&1&&(i=!0,u.value=a[0],el(()=>i=!1)),l.$set(u)},i(a){f||(b(l.$$.fragment,a),f=!0)},o(a){v(l.$$.fragment,a),f=!1},d(a){a&&m(e),n[40](null),U(l)}}}function Lo(n){let e,t,l;function i(r){n[42](r)}let f={placeholder:"Search by keywords",disabled:!n[15]};return n[10]!==void 0&&(f.value=n[10]),e=new Ls({props:f}),je.push(()=>$t(e,"value",i)),e.$on("keydown",n[43]),{c(){j(e.$$.fragment)},l(r){Z(e.$$.fragment,r)},m(r,s){Y(e,r,s),l=!0},p(r,s){const a={};s[0]&32768&&(a.disabled=!r[15]),!t&&s[0]&1024&&(t=!0,a.value=r[10],el(()=>t=!1)),e.$set(a)},i(r){l||(b(e.$$.fragment,r),l=!0)},o(r){v(e.$$.fragment,r),l=!1},d(r){U(e,r)}}}function qo(n){let e,t,l,i,f;return t=new zt({props:{class:"w-full",$$slots:{default:[Oo]},$$scope:{ctx:n}}}),i=new zt({props:{class:"w-full",$$slots:{default:[Lo]},$$scope:{ctx:n}}}),{c(){e=I("div"),j(t.$$.fragment),l=J(),j(i.$$.fragment),this.h()},l(r){e=D(r,"DIV",{class:!0});var s=E(e);Z(t.$$.fragment,s),l=G(s),Z(i.$$.fragment,s),s.forEach(m),this.h()},h(){S(e,"class","flex flex-row")},m(r,s){V(r,e,s),Y(t,e,null),k(e,l),Y(i,e,null),f=!0},p(r,s){const a={};s[0]&6273|s[1]&67108864&&(a.$$scope={dirty:s,ctx:r}),t.$set(a);const o={};s[0]&33792|s[1]&67108864&&(o.$$scope={dirty:s,ctx:r}),i.$set(o)},i(r){f||(b(t.$$.fragment,r),b(i.$$.fragment,r),f=!0)},o(r){v(t.$$.fragment,r),v(i.$$.fragment,r),f=!1},d(r){r&&m(e),U(t),U(i)}}}function Yn(n){let e,t;return e=new Xi({props:{value:De(n[53]),text:De(n[53])}}),{c(){j(e.$$.fragment)},l(l){Z(e.$$.fragment,l)},m(l,i){Y(e,l,i),t=!0},p(l,i){const f={};i[0]&131072&&(f.value=De(l[53])),i[0]&131072&&(f.text=De(l[53])),e.$set(f)},i(l){t||(b(e.$$.fragment,l),t=!0)},o(l){v(e.$$.fragment,l),t=!1},d(l){U(e,l)}}}function jo(n){let e,t,l=n[17],i=[];for(let r=0;rv(i[r],1,1,()=>{i[r]=null});return{c(){for(let r=0;rv(i[r],1,1,()=>{i[r]=null});return{c(){for(let r=0;r{B=null}),ne());const ce={};ie[0]&32&&(ce.selectedId=W[5]),ie[0]&8192&&(ce.items=W[13]),M.$set(ce);const re={};ie[0]&2&&(re.icon=((se=W[1])==null?void 0:se.order)==null?rn:((ge=W[1])==null?void 0:ge.order)==="ASC"?Pt:Rt),ie[0]&2&&(re.disabled=W[1]==null),ie[0]&2&&(re.iconDescription=((Ee=W[1])==null?void 0:Ee.order)==="ASC"?"Sorted ascending. Toggle to switch to descending.":"Sorted descending. Toggle to switch to ascending."),F.$set(re)},i(W){C||(b(l.$$.fragment,W),b(s.$$.fragment,W),b(H),b(h.$$.fragment,W),b(B),b(M.$$.fragment,W),b(F.$$.fragment,W),C=!0)},o(W){v(l.$$.fragment,W),v(s.$$.fragment,W),v(H),v(h.$$.fragment,W),v(B),v(M.$$.fragment,W),v(F.$$.fragment,W),C=!1},d(W){W&&m(e),U(l),U(s),H.d(W),U(h),B&&B.d(),U(M),U(F)}}}const Wo=(n,e)=>n.text.toLowerCase().includes(e.toLowerCase())||n.id==="new-concept";function Zo(n,e,t){let l,i,f,r,s,a,o,u,c,d,_,h,g,p,w,z,M,N,A,F,C,H,B=Qe();ze(n,B,Te=>t(37,F=Te));let y=$e();ze(n,y,Te=>t(36,A=Te));let R;const ee=Ki();ze(n,ee,Te=>t(47,N=Te));const W=tl();ze(n,W,Te=>t(9,H=Te));const ie=(Te,Xe)=>`${De(Te||"")}_${Xe}`;let he={};const $=wr();ze(n,$,Te=>t(38,C=Te));let P=[],ce,re="",se={};const ge=()=>{if(s!=null&&f==="Keyword"){if(R=="")return;B.addSearch({path:[De(s)],query:{type:"keyword",search:R}}),t(10,R="")}},Ee=Te=>{t(2,u=Te.target.value),B.setSearchEmbedding(Te.target.value)},Ce=()=>{u!=null&&(t(32,he[ie(s,u)]=!0,he),N.mutate([l,i,{leaf_path:gt(s||[]),signal:{signal_name:u}}]))};let _e;const Se=(Te,Xe)=>{s==null||u==null||(B.addSearch({path:[De(s)],query:{type:"concept",concept_namespace:Te,concept_name:Xe,embedding:u}}),_e.clear())},K=Te=>{if(!(s==null||u==null)){if(Te.detail.selectedId==="new-concept"){re===ce.id&&t(0,re="");const Xe=re.split("/",2);let Et="",mt="";Xe.length===2?[Et,mt]=Xe:[mt]=Xe,ot({command:ut.CreateConcept,namespace:Et,conceptName:mt,onCreate:Be=>Se(Be.detail.namespace,Be.detail.name)}),_e.clear();return}Se(Te.detail.selectedId.namespace,Te.detail.selectedId.name)}},L=Te=>{B.setSearchPath(Te.target.value)},q=Te=>{B.setSearchTab(St[Te.detail])},O=Te=>{if(Te.detail.selectedId==null){B.setSortBy(null);return}B.setSortBy(gt(Te.detail.selectedId))},Ve=()=>{B.clearSorts()},Le=()=>{p!=null&&B.setSortBy(p.path),B.setSortOrder((p==null?void 0:p.order)==="ASC"?"DESC":"ASC")},Je=()=>{d?ge():Ce()};function Ie(Te){je[Te?"unshift":"push"](()=>{_e=Te,t(12,_e)})}function Ge(Te){re=Te,t(0,re)}function et(Te){R=Te,t(10,R)}const ar=Te=>Te.key=="Enter"?ge():null;return n.$$.update=()=>{var Te,Xe,Et,mt;if(n.$$.dirty[1]&64&&(l=F.namespace),n.$$.dirty[1]&64&&(i=F.datasetName),n.$$.dirty[1]&64&&t(4,f=F.searchTab),n.$$.dirty[0]&16&&t(8,r=Object.values(St).findIndex(Be=>Be===f)),n.$$.dirty[1]&96&&t(3,s=lr(F,A)),n.$$.dirty[0]&8|n.$$.dirty[1]&64&&t(34,a=sl(F,s)),n.$$.dirty[1]&32&&t(17,o=(A.visibleFields||[]).filter(Be=>Be.dtype==="string").map(Be=>De(Be.path))),n.$$.dirty[0]&520|n.$$.dirty[1]&96&&t(2,u=nr(F,A,s,(H.data||[]).map(Be=>Be.name))),n.$$.dirty[0]&8|n.$$.dirty[1]&32&&t(35,c=rl(A,s)),n.$$.dirty[0]&4|n.$$.dirty[1]&16&&t(7,d=c!=null&&!!c.includes(u||"")),n.$$.dirty[0]&140|n.$$.dirty[1]&2&&t(16,_=!d&&he[ie(s,u)]),n.$$.dirty[0]&264&&t(15,h=St[r]==="Keyword"&&s!=null),n.$$.dirty[0]&144&&t(14,g=f==="Concepts"&&d),n.$$.dirty[0]&1&&t(33,ce={id:"new-concept",text:re}),n.$$.dirty[1]&140&&t(11,P=C!=null&&C.data?[ce,...C.data.map(Be=>({id:{namespace:Be.namespace,name:Be.name},text:`${Be.namespace}/${Be.name}`,disabled:a.some(_t=>_t.query.type==="concept"&&_t.query.concept_namespace===Be.namespace&&_t.query.concept_name===Be.name)}))]:[]),n.$$.dirty[1]&32&&t(1,p=Cf(A)),n.$$.dirty[1]&32)for(const Be of((Xe=(Te=A.selectRowsSchema)==null?void 0:Te.data)==null?void 0:Xe.search_results)||[])se[De(Be.result_path)]=Be;n.$$.dirty[0]&2&&t(5,w=p!=null&&p.path?De(p.path):null),n.$$.dirty[1]&64&&t(6,z=F.queryOptions.sort_by),n.$$.dirty[0]&96|n.$$.dirty[1]&32&&t(13,M=((mt=(Et=A.selectRowsSchema)==null?void 0:Et.data)==null?void 0:mt.schema)!=null?[{id:null,text:"None",disabled:z==null&&w!=null},...ll(A.selectRowsSchema.data.schema).map(Be=>{const _t=De(Be.path);return{id:_t,text:_t}})]:[])},[re,p,u,s,f,w,z,d,r,H,R,P,_e,M,g,h,_,o,B,y,ee,W,$,ge,Ee,Ce,K,L,q,O,Ve,Le,he,ce,a,c,A,F,C,Je,Ie,Ge,et,ar]}class Ko extends ve{constructor(e){super(),ke(this,e,Zo,Uo,pe,{},null,[-1,-1])}}function Kn(n,e,t){const l=n.slice();return l[18]=e[t],l}function Qo(n){let e,t;return{c(){e=I("div"),t=X("No results."),this.h()},l(l){e=D(l,"DIV",{class:!0});var i=E(e);t=x(i,"No results."),i.forEach(m),this.h()},h(){S(e,"class","mx-4 mt-8 w-full text-gray-600")},m(l,i){V(l,e,i),k(e,t)},p:te,i:te,o:te,d(l){l&&m(e)}}}function Jo(n){let e,t;return{c(){e=I("div"),t=X("Select fields to display"),this.h()},l(l){e=D(l,"DIV",{class:!0});var i=E(e);t=x(i,"Select fields to display"),i.forEach(m),this.h()},h(){S(e,"class","mt-12 w-full text-center text-gray-600")},m(l,i){V(l,e,i),k(e,t)},p:te,i:te,o:te,d(l){l&&m(e)}}}function Go(n){let e,t;return e=new It({props:{paragraph:!0,lines:3}}),{c(){j(e.$$.fragment)},l(l){Z(e.$$.fragment,l)},m(l,i){Y(e,l,i),t=!0},p:te,i(l){t||(b(e.$$.fragment,l),t=!0)},o(l){v(e.$$.fragment,l),t=!1},d(l){U(e,l)}}}function Xo(n){var l,i;let e,t;return e=new xi({props:{lowContrast:!0,title:"Could not fetch schema:",subtitle:((l=n[1].error.body)==null?void 0:l.detail)||((i=n[1])==null?void 0:i.error.message)}}),{c(){j(e.$$.fragment)},l(f){Z(e.$$.fragment,f)},m(f,r){Y(e,f,r),t=!0},p(f,r){var a,o;const s={};r&2&&(s.subtitle=((a=f[1].error.body)==null?void 0:a.detail)||((o=f[1])==null?void 0:o.error.message)),e.$set(s)},i(f){t||(b(e.$$.fragment,f),t=!0)},o(f){v(e.$$.fragment,f),t=!1},d(f){U(e,f)}}}function xo(n){var l;let e,t;return e=new xi({props:{lowContrast:!0,title:"Could not fetch rows:",subtitle:((l=n[2].error.body)==null?void 0:l.detail)||n[2].error.message}}),{c(){j(e.$$.fragment)},l(i){Z(e.$$.fragment,i)},m(i,f){Y(e,i,f),t=!0},p(i,f){var s;const r={};f&4&&(r.subtitle=((s=i[2].error.body)==null?void 0:s.detail)||i[2].error.message),e.$set(r)},i(i){t||(b(e.$$.fragment,i),t=!0)},o(i){v(e.$$.fragment,i),t=!1},d(i){U(e,i)}}}function Qn(n){let e,t=[],l=new Map,i,f,r=n[5];const s=o=>Ze.value(o[18][Rr]);for(let o=0;o0&&Gn(n);return{c(){e=I("div");for(let o=0;o0?a?(a.p(o,u),u&32&&b(a,1)):(a=Gn(o),a.c(),b(a,1),a.m(e,null)):a&&(le(),v(a,1,1,()=>{a=null}),ne())},i(o){if(!f){for(let u=0;u0&&n[3].isSuccess&&n[4]!=null&&Qn(n);return{c(){j(e.$$.fragment),t=J(),j(l.$$.fragment),i=J(),r&&r.c(),s=J(),_&&_.c(),a=ue()},l(h){Z(e.$$.fragment,h),t=G(h),Z(l.$$.fragment,h),i=G(h),r&&r.l(h),s=G(h),_&&_.l(h),a=ue()},m(h,g){Y(e,h,g),V(h,t,g),Y(l,h,g),V(h,i,g),~f&&c[f].m(h,g),V(h,s,g),_&&_.m(h,g),V(h,a,g),o=!0},p(h,[g]){const p={};g&64&&(p.totalNumRows=h[6]),g&512&&(p.manifest=h[9].data),l.$set(p);let w=f;f=d(h),f===w?~f&&c[f].p(h,g):(r&&(le(),v(c[w],1,1,()=>{c[w]=null}),ne()),~f?(r=c[f],r?r.p(h,g):(r=c[f]=u[f](h),r.c()),b(r,1),r.m(s.parentNode,s)):r=null),h[5]&&h[0].length>0&&h[3].isSuccess&&h[4]!=null?_?(_.p(h,g),g&57&&b(_,1)):(_=Qn(h),_.c(),b(_,1),_.m(a.parentNode,a)):_&&(le(),v(_,1,1,()=>{_=null}),ne())},i(h){o||(b(e.$$.fragment,h),b(l.$$.fragment,h),b(r),b(_),o=!0)},o(h){v(e.$$.fragment,h),v(l.$$.fragment,h),v(r),v(_),o=!1},d(h){U(e,h),h&&m(t),U(l,h),h&&m(i),~f&&c[f].d(h),h&&m(s),_&&_.d(h),h&&m(a)}}}function eu(n,e,t){let l,i,f,r,s,a,o,u,c,d,_,h=te,g=()=>(h(),h=rt(r,B=>t(2,_=B)),r),p,w,z=te,M=()=>(z(),z=rt(l,B=>t(3,w=B)),l),N;n.$$.on_destroy.push(()=>h()),n.$$.on_destroy.push(()=>z());let A=Qe();ze(n,A,B=>t(16,p=B));let F=$e();ze(n,F,B=>t(15,d=B));const C=Qi(p.namespace,p.datasetName);ze(n,C,B=>t(9,N=B));const H=()=>_==null?void 0:_.fetchNextPage();return n.$$.update=()=>{var B,y,R,ee;n.$$.dirty&65536&&M(t(8,l=il(p.namespace,p.datasetName))),n.$$.dirty&65544&&t(14,i=w.isSuccess?Sr(p):void 0),n.$$.dirty&32768&&t(1,f=d.selectRowsSchema),n.$$.dirty&81922&&g(t(7,r=Pr(p.namespace,p.datasetName,i||{},f!=null&&f.isSuccess?f.data.schema:void 0))),n.$$.dirty&4&&t(6,s=(B=_.data)==null?void 0:B.pages[0].total_num_rows),n.$$.dirty&4&&t(5,a=(y=_.data)==null?void 0:y.pages.flatMap(W=>W.rows)),n.$$.dirty&32768&&t(0,o=(d.visibleFields||[]).sort((W,ie)=>De(W.path)>De(ie.path)?1:-1)),n.$$.dirty&3&&t(13,u=((R=f==null?void 0:f.data)==null?void 0:R.schema)!=null?er((ee=f==null?void 0:f.data)==null?void 0:ee.schema,o):null),n.$$.dirty&40960&&t(4,c=u!=null?If(u,d.stats||[]):[])},[o,f,_,w,c,a,s,r,l,N,A,F,C,u,i,d,p,H]}class tu extends ve{constructor(e){super(),ke(this,e,eu,$o,pe,{})}}function lu(n){let e,t;return e=new at({props:{$$slots:{default:[iu]},$$scope:{ctx:n}}}),e.$on("click",n[5]),{c(){j(e.$$.fragment)},l(l){Z(e.$$.fragment,l)},m(l,i){Y(e,l,i),t=!0},p(l,i){const f={};i&512&&(f.$$scope={dirty:i,ctx:l}),e.$set(f)},i(l){t||(b(e.$$.fragment,l),t=!0)},o(l){v(e.$$.fragment,l),t=!1},d(l){U(e,l)}}}function nu(n){let e,t;return{c(){e=I("span"),t=X("Invalid query"),this.h()},l(l){e=D(l,"SPAN",{class:!0});var i=E(e);t=x(i,"Invalid query"),i.forEach(m),this.h()},h(){S(e,"class","text-red-500")},m(l,i){V(l,e,i),k(e,t)},p:te,i:te,o:te,d(l){l&&m(e)}}}function iu(n){let e;return{c(){e=X("Apply")},l(t){e=x(t,"Apply")},m(t,l){V(t,e,l)},d(t){t&&m(e)}}}function ru(n){let e,t,l,i,f,r,s,a,o,u,c;const d=[nu,lu],_=[];function h(g,p){return g[0]?g[3]?1:-1:0}return~(r=h(n))&&(s=_[r]=d[r](n)),{c(){e=I("pre"),t=X(""),l=X(n[2]),i=X(` `),f=J(),s&&s.c(),a=ue(),this.h()},l(g){e=D(g,"PRE",{class:!0,contenteditable:!0});var p=E(e);t=x(p,""),l=x(p,n[2]),i=x(p,` `),p.forEach(m),f=G(g),s&&s.l(g),a=ue(),this.h()},h(){S(e,"class","whitespace-pre bg-gray-50 p-4 font-mono"),S(e,"contenteditable",""),n[1]===void 0&&ht(()=>n[8].call(e)),T(e,"outline-red-500",!n[0])},m(g,p){V(g,e,p),k(e,t),k(e,l),k(e,i),n[1]!==void 0&&(e.innerText=n[1]),V(g,f,p),~r&&_[r].m(g,p),V(g,a,p),o=!0,u||(c=ae(e,"input",n[8]),u=!0)},p(g,[p]){(!o||p&4)&&mr(l,g[2]),p&2&&g[1]!==e.innerText&&(e.innerText=g[1]),(!o||p&1)&&T(e,"outline-red-500",!g[0]);let w=r;r=h(g),r===w?~r&&_[r].p(g,p):(s&&(le(),v(_[w],1,1,()=>{_[w]=null}),ne()),~r?(s=_[r],s?s.p(g,p):(s=_[r]=d[r](g),s.c()),b(s,1),s.m(a.parentNode,a)):s=null)},i(g){o||(b(s),o=!0)},o(g){v(s),o=!1},d(g){g&&m(e),g&&m(f),~r&&_[r].d(g),g&&m(a),u=!1,c()}}}function su(n,e,t){let l,i,f,r,s;const a=Qe();ze(n,a,d=>t(7,s=d));let o=!0;function u(){Mt(a,s.queryOptions=JSON.parse(f),s)}function c(){f=this.innerText,t(1,f),t(2,i),t(6,l),t(7,s)}return n.$$.update=()=>{if(n.$$.dirty&128&&t(6,l=s.queryOptions),n.$$.dirty&64&&t(2,i=l?JSON.stringify(l,null,2):""),n.$$.dirty&4&&t(1,f=i),n.$$.dirty&2)try{JSON.parse(f),t(0,o=!0)}catch{t(0,o=!1)}n.$$.dirty&67&&t(3,r=o&&!Vr(JSON.parse(f),l))},[o,f,i,r,a,u,l,s,c]}class au extends ve{constructor(e){super(),ke(this,e,su,ru,pe,{})}}function Xn(n){let e,t;return e=new ea({props:{light:!0,flipped:!0,$$slots:{default:[fu]},$$scope:{ctx:n}}}),{c(){j(e.$$.fragment)},l(l){Z(e.$$.fragment,l)},m(l,i){Y(e,l,i),t=!0},p(l,i){const f={};i&67108927&&(f.$$scope={dirty:i,ctx:l}),e.$set(f)},i(l){t||(b(e.$$.fragment,l),t=!0)},o(l){v(e.$$.fragment,l),t=!1},d(l){U(e,l)}}}function xn(n){let e,t;return e=new wt({props:{text:"Sort by"}}),e.$on("click",n[16]),{c(){j(e.$$.fragment)},l(l){Z(e.$$.fragment,l)},m(l,i){Y(e,l,i),t=!0},p:te,i(l){t||(b(e.$$.fragment,l),t=!0)},o(l){v(e.$$.fragment,l),t=!1},d(l){U(e,l)}}}function $n(n){let e,t;return e=new wt({props:{text:"Filter"}}),e.$on("click",n[17]),{c(){j(e.$$.fragment)},l(l){Z(e.$$.fragment,l)},m(l,i){Y(e,l,i),t=!0},p:te,i(l){t||(b(e.$$.fragment,l),t=!0)},o(l){v(e.$$.fragment,l),t=!1},d(l){U(e,l)}}}function ei(n){let e,t;return e=new wt({props:{text:"Compute embedding"}}),e.$on("click",n[18]),{c(){j(e.$$.fragment)},l(l){Z(e.$$.fragment,l)},m(l,i){Y(e,l,i),t=!0},p:te,i(l){t||(b(e.$$.fragment,l),t=!0)},o(l){v(e.$$.fragment,l),t=!1},d(l){U(e,l)}}}function ti(n){let e,t;return e=new wt({props:{text:"Preview signal"}}),e.$on("click",n[19]),{c(){j(e.$$.fragment)},l(l){Z(e.$$.fragment,l)},m(l,i){Y(e,l,i),t=!0},p:te,i(l){t||(b(e.$$.fragment,l),t=!0)},o(l){v(e.$$.fragment,l),t=!1},d(l){U(e,l)}}}function li(n){let e,t;return e=new wt({props:{text:"Compute signal"}}),e.$on("click",n[20]),{c(){j(e.$$.fragment)},l(l){Z(e.$$.fragment,l)},m(l,i){Y(e,l,i),t=!0},p:te,i(l){t||(b(e.$$.fragment,l),t=!0)},o(l){v(e.$$.fragment,l),t=!1},d(l){U(e,l)}}}function ni(n){let e,t;return e=new wt({props:{text:"Delete signal"}}),e.$on("click",n[21]),{c(){j(e.$$.fragment)},l(l){Z(e.$$.fragment,l)},m(l,i){Y(e,l,i),t=!0},p:te,i(l){t||(b(e.$$.fragment,l),t=!0)},o(l){v(e.$$.fragment,l),t=!1},d(l){U(e,l)}}}function fu(n){let e=Tt(n[0]),t,l=Zt(n[0]),i,f,r,s,a,o,u=e&&xn(n),c=l&&$n(n),d=!n[2]&&ei(n),_=!n[2]&&ti(n),h=!n[2]&&li(n),g=n[1]&&ni(n);return{c(){u&&u.c(),t=J(),c&&c.c(),i=J(),d&&d.c(),f=J(),_&&_.c(),r=J(),h&&h.c(),s=J(),g&&g.c(),a=ue()},l(p){u&&u.l(p),t=G(p),c&&c.l(p),i=G(p),d&&d.l(p),f=G(p),_&&_.l(p),r=G(p),h&&h.l(p),s=G(p),g&&g.l(p),a=ue()},m(p,w){u&&u.m(p,w),V(p,t,w),c&&c.m(p,w),V(p,i,w),d&&d.m(p,w),V(p,f,w),_&&_.m(p,w),V(p,r,w),h&&h.m(p,w),V(p,s,w),g&&g.m(p,w),V(p,a,w),o=!0},p(p,w){w&1&&(e=Tt(p[0])),e?u?(u.p(p,w),w&1&&b(u,1)):(u=xn(p),u.c(),b(u,1),u.m(t.parentNode,t)):u&&(le(),v(u,1,1,()=>{u=null}),ne()),w&1&&(l=Zt(p[0])),l?c?(c.p(p,w),w&1&&b(c,1)):(c=$n(p),c.c(),b(c,1),c.m(i.parentNode,i)):c&&(le(),v(c,1,1,()=>{c=null}),ne()),p[2]?d&&(le(),v(d,1,1,()=>{d=null}),ne()):d?(d.p(p,w),w&4&&b(d,1)):(d=ei(p),d.c(),b(d,1),d.m(f.parentNode,f)),p[2]?_&&(le(),v(_,1,1,()=>{_=null}),ne()):_?(_.p(p,w),w&4&&b(_,1)):(_=ti(p),_.c(),b(_,1),_.m(r.parentNode,r)),p[2]?h&&(le(),v(h,1,1,()=>{h=null}),ne()):h?(h.p(p,w),w&4&&b(h,1)):(h=li(p),h.c(),b(h,1),h.m(s.parentNode,s)),p[1]?g?(g.p(p,w),w&2&&b(g,1)):(g=ni(p),g.c(),b(g,1),g.m(a.parentNode,a)):g&&(le(),v(g,1,1,()=>{g=null}),ne())},i(p){o||(b(u),b(c),b(d),b(_),b(h),b(g),o=!0)},o(p){v(u),v(c),v(d),v(_),v(h),v(g),o=!1},d(p){u&&u.d(p),p&&m(t),c&&c.d(p),p&&m(i),d&&d.d(p),p&&m(f),_&&_.d(p),p&&m(r),h&&h.d(p),p&&m(s),g&&g.d(p),p&&m(a)}}}function ou(n){let e,t,l,i=De(n[0].path)+"",f,r,s,a,o;return{c(){e=I("p"),t=X("Confirm deleting "),l=I("code"),f=X(i),r=X(" ?"),s=J(),a=I("p"),o=X("This is a permanent action and cannot be undone."),this.h()},l(u){e=D(u,"P",{class:!0});var c=E(e);t=x(c,"Confirm deleting "),l=D(c,"CODE",{});var d=E(l);f=x(d,i),d.forEach(m),r=x(c," ?"),c.forEach(m),s=G(u),a=D(u,"P",{class:!0});var _=E(a);o=x(_,"This is a permanent action and cannot be undone."),_.forEach(m),this.h()},h(){S(e,"class","!text-lg"),S(a,"class","mt-2")},m(u,c){V(u,e,c),k(e,t),k(e,l),k(l,f),k(e,r),V(u,s,c),V(u,a,c),k(a,o)},p(u,c){c&1&&i!==(i=De(u[0].path)+"")&&me(f,i)},d(u){u&&m(e),u&&m(s),u&&m(a)}}}function uu(n){let e,t,l,i,f=n[6]&&Xn(n);function r(a){n[22](a)}let s={danger:!0,modalHeading:"Delete signal",primaryButtonText:"Delete",primaryButtonIcon:n[7].isLoading?_l:void 0,secondaryButtonText:"Cancel",$$slots:{default:[ou]},$$scope:{ctx:n}};return n[3]!==void 0&&(s.open=n[3]),t=new Gr({props:s}),je.push(()=>$t(t,"open",r)),t.$on("click:button--secondary",n[23]),t.$on("open",n[24]),t.$on("close",n[25]),t.$on("submit",n[11]),{c(){f&&f.c(),e=J(),j(t.$$.fragment)},l(a){f&&f.l(a),e=G(a),Z(t.$$.fragment,a)},m(a,o){f&&f.m(a,o),V(a,e,o),Y(t,a,o),i=!0},p(a,[o]){a[6]?f?(f.p(a,o),o&64&&b(f,1)):(f=Xn(a),f.c(),b(f,1),f.m(e.parentNode,e)):f&&(le(),v(f,1,1,()=>{f=null}),ne());const u={};o&128&&(u.primaryButtonIcon=a[7].isLoading?_l:void 0),o&67108865&&(u.$$scope={dirty:o,ctx:a}),!l&&o&8&&(l=!0,u.open=a[3],el(()=>l=!1)),t.$set(u)},i(a){i||(b(f),b(t.$$.fragment,a),i=!0)},o(a){v(f),v(t.$$.fragment,a),i=!1},d(a){f&&f.d(a),a&&m(e),U(t,a)}}}function cu(n,e,t){let l,i,f,r,s,a,o,u,c,{field:d}=e,{schema:_}=e,h=!1;const g=Qe();ze(n,g,W=>t(15,c=W));const p=$e();ze(n,p,W=>t(14,u=W));const w=Fr();ze(n,w,W=>t(7,o=W));function z(){o.mutate([l,i,{signal_path:d.path}],{onSuccess:()=>{t(3,h=!1),g.deleteSignal(d.path)}})}const M=()=>g.addSortBy(d.path),N=()=>ot({command:ut.EditFilter,namespace:l,datasetName:i,path:d.path}),A=()=>ot({command:ut.ComputeEmbedding,namespace:l,datasetName:i,path:d==null?void 0:d.path}),F=()=>ot({command:ut.PreviewConcept,namespace:l,datasetName:i,path:d==null?void 0:d.path}),C=()=>ot({command:ut.ComputeSignal,namespace:l,datasetName:i,path:d==null?void 0:d.path}),H=()=>t(3,h=!0);function B(W){h=W,t(3,h)}const y=()=>t(3,h=!1);function R(W){we.call(this,n,W)}function ee(W){we.call(this,n,W)}return n.$$set=W=>{"field"in W&&t(0,d=W.field),"schema"in W&&t(12,_=W.schema)},n.$$.update=()=>{var W;n.$$.dirty&32768&&t(5,l=c.namespace),n.$$.dirty&32768&&t(4,i=c.datasetName),n.$$.dirty&4097&&t(2,f=yt(d,_)),n.$$.dirty&1&&t(1,r=bt(d)),n.$$.dirty&16385&&t(13,s=Lt(((W=u.selectRowsSchema)==null?void 0:W.data)||null,d.path)),n.$$.dirty&8199&&t(6,a=(Tt(d)||Zt(d)||!f||r)&&!s)},[d,r,f,h,i,l,a,o,g,p,w,z,_,s,u,c,M,N,A,F,C,H,B,y,R,ee]}class rr extends ve{constructor(e){super(),ke(this,e,cu,uu,pe,{field:0,schema:12})}}function ii(n,e,t){var s;const l=n.slice();l[7]=e[t][0],l[8]=e[t][1],l[13]=t;const i=l[1]!=null?l[3](l[1][l[13]]):(s=l[7])==null?void 0:s.toString();l[9]=i;const f=`${l[8]/l[2]*100}%`;l[10]=f;const r=Ne(l[8]);return l[11]=r,l}function ri(n){let e,t,l=n[9]+"",i,f,r,s,a,o=n[11]+"",u,c,d,_,h;function g(){return n[6](n[7],n[13])}return{c(){e=I("button"),t=I("div"),i=X(l),r=J(),s=I("div"),a=I("div"),u=X(o),d=J(),this.h()},l(p){e=D(p,"BUTTON",{class:!0});var w=E(e);t=D(w,"DIV",{title:!0,class:!0});var z=E(t);i=x(z,l),z.forEach(m),r=G(w),s=D(w,"DIV",{class:!0});var M=E(s);a=D(M,"DIV",{title:!0,class:!0});var N=E(a);u=x(N,o),N.forEach(m),M.forEach(m),d=G(w),w.forEach(m),this.h()},h(){S(t,"title",f=n[9]),S(t,"class","w-48 flex-none truncate px-2"),S(a,"title",c=n[11]),S(a,"class","histogram-bar my-px bg-indigo-200 pl-2 text-xs leading-5"),Pe(a,"width",n[10]),S(s,"class","w-36 border-l border-gray-300 pl-2"),S(e,"class","flex items-center text-left text-xs text-black hover:bg-gray-200")},m(p,w){V(p,e,w),k(e,t),k(t,i),k(e,r),k(e,s),k(s,a),k(a,u),k(e,d),_||(h=ae(e,"click",g),_=!0)},p(p,w){n=p,w&3&&l!==(l=n[9]+"")&&me(i,l),w&3&&f!==(f=n[9])&&S(t,"title",f),w&1&&o!==(o=n[11]+"")&&me(u,o),w&1&&c!==(c=n[11])&&S(a,"title",c),w&5&&Pe(a,"width",n[10])},d(p){p&&m(e),_=!1,h()}}}function du(n){let e,t=n[0],l=[];for(let i=0;ia("row-click",{value:u,index:c});return n.$$set=u=>{"field"in u&&t(5,i=u.field),"counts"in u&&t(0,f=u.counts),"bins"in u&&t(1,r=u.bins)},n.$$.update=()=>{n.$$.dirty&1&&t(2,l=Math.max(...f.map(([u,c])=>c)))},[f,r,l,s,a,i,o]}class mu extends ve{constructor(e){super(),ke(this,e,hu,du,pe,{field:5,counts:0,bins:1})}}function _u(n){let e,t,l,i,f,r,s,a,o,u,c,d=Ne(n[4].total_count)+"",_,h,g,p,w,z,M,N,A,F,C,H,B=Ne(n[4].approx_count_distinct)+"",y,R,ee,W,ie,he;r=new Bt({props:{class:"inline"}}),z=new Bt({props:{class:"inline"}});let $=n[4].avg_text_length&&si(n),P=n[4].min_val&&n[4].max_val&&ai(n);return{c(){e=I("table"),t=I("tbody"),l=I("tr"),i=I("td"),f=I("span"),j(r.$$.fragment),s=J(),a=I("span"),o=X("Total count"),u=J(),c=I("td"),_=X(d),h=J(),g=I("tr"),p=I("td"),w=I("span"),j(z.$$.fragment),M=J(),N=I("span"),A=X("Unique values"),F=J(),C=I("td"),H=X("~"),y=X(B),R=J(),$&&$.c(),ee=J(),P&&P.c(),this.h()},l(ce){e=D(ce,"TABLE",{class:!0});var re=E(e);t=D(re,"TBODY",{});var se=E(t);l=D(se,"TR",{});var ge=E(l);i=D(ge,"TD",{class:!0});var Ee=E(i);f=D(Ee,"SPAN",{});var Ce=E(f);Z(r.$$.fragment,Ce),Ce.forEach(m),s=G(Ee),a=D(Ee,"SPAN",{});var _e=E(a);o=x(_e,"Total count"),_e.forEach(m),Ee.forEach(m),u=G(ge),c=D(ge,"TD",{class:!0});var Se=E(c);_=x(Se,d),Se.forEach(m),ge.forEach(m),h=G(se),g=D(se,"TR",{});var K=E(g);p=D(K,"TD",{class:!0});var L=E(p);w=D(L,"SPAN",{});var q=E(w);Z(z.$$.fragment,q),q.forEach(m),M=G(L),N=D(L,"SPAN",{});var O=E(N);A=x(O,"Unique values"),O.forEach(m),L.forEach(m),F=G(K),C=D(K,"TD",{class:!0});var Ve=E(C);H=x(Ve,"~"),y=x(Ve,B),Ve.forEach(m),K.forEach(m),R=G(se),$&&$.l(se),ee=G(se),P&&P.l(se),se.forEach(m),re.forEach(m),this.h()},h(){S(i,"class","svelte-1tctrjz"),S(c,"class","svelte-1tctrjz"),S(p,"class","svelte-1tctrjz"),S(C,"class","svelte-1tctrjz"),S(e,"class","stats-table w-full svelte-1tctrjz")},m(ce,re){V(ce,e,re),k(e,t),k(t,l),k(l,i),k(i,f),Y(r,f,null),k(i,s),k(i,a),k(a,o),k(l,u),k(l,c),k(c,_),k(t,h),k(t,g),k(g,p),k(p,w),Y(z,w,null),k(p,M),k(p,N),k(N,A),k(g,F),k(g,C),k(C,H),k(C,y),k(t,R),$&&$.m(t,null),k(t,ee),P&&P.m(t,null),W=!0,ie||(he=[Ke(xe.call(null,f,{text:"Total number of rows where the value is defined."})),Ke(xe.call(null,w,{text:"An approximation of the total number of unique values."}))],ie=!0)},p(ce,re){(!W||re&16)&&d!==(d=Ne(ce[4].total_count)+"")&&me(_,d),(!W||re&16)&&B!==(B=Ne(ce[4].approx_count_distinct)+"")&&me(y,B),ce[4].avg_text_length?$?($.p(ce,re),re&16&&b($,1)):($=si(ce),$.c(),b($,1),$.m(t,ee)):$&&(le(),v($,1,1,()=>{$=null}),ne()),ce[4].min_val&&ce[4].max_val?P?(P.p(ce,re),re&16&&b(P,1)):(P=ai(ce),P.c(),b(P,1),P.m(t,null)):P&&(le(),v(P,1,1,()=>{P=null}),ne())},i(ce){W||(b(r.$$.fragment,ce),b(z.$$.fragment,ce),b($),b(P),W=!0)},o(ce){v(r.$$.fragment,ce),v(z.$$.fragment,ce),v($),v(P),W=!1},d(ce){ce&&m(e),U(r),U(z),$&&$.d(),P&&P.d(),ie=!1,Ye(he)}}}function gu(n){let e,t;return e=new It({props:{paragraph:!0,width:"50%"}}),{c(){j(e.$$.fragment)},l(l){Z(e.$$.fragment,l)},m(l,i){Y(e,l,i),t=!0},p:te,i(l){t||(b(e.$$.fragment,l),t=!0)},o(l){v(e.$$.fragment,l),t=!1},d(l){U(e,l)}}}function bu(n){let e,t,l=n[2].error.message+"",i;return{c(){e=I("p"),t=X("Error: "),i=X(l)},l(f){e=D(f,"P",{});var r=E(e);t=x(r,"Error: "),i=x(r,l),r.forEach(m)},m(f,r){V(f,e,r),k(e,t),k(e,i)},p(f,r){r&4&&l!==(l=f[2].error.message+"")&&me(i,l)},i:te,o:te,d(f){f&&m(e)}}}function si(n){let e,t,l,i,f,r,s,a,o,u=Ne(n[4].avg_text_length)+"",c,d,_,h;return i=new Bt({props:{class:"inline"}}),{c(){e=I("tr"),t=I("td"),l=I("span"),j(i.$$.fragment),f=J(),r=I("span"),s=X("Average text length"),a=J(),o=I("td"),c=X(u),this.h()},l(g){e=D(g,"TR",{});var p=E(e);t=D(p,"TD",{class:!0});var w=E(t);l=D(w,"SPAN",{});var z=E(l);Z(i.$$.fragment,z),z.forEach(m),f=G(w),r=D(w,"SPAN",{});var M=E(r);s=x(M,"Average text length"),M.forEach(m),w.forEach(m),a=G(p),o=D(p,"TD",{class:!0});var N=E(o);c=x(N,u),N.forEach(m),p.forEach(m),this.h()},h(){S(t,"class","svelte-1tctrjz"),S(o,"class","svelte-1tctrjz")},m(g,p){V(g,e,p),k(e,t),k(t,l),Y(i,l,null),k(t,f),k(t,r),k(r,s),k(e,a),k(e,o),k(o,c),d=!0,_||(h=Ke(xe.call(null,l,{text:"The average length of the text in characters."})),_=!0)},p(g,p){(!d||p&16)&&u!==(u=Ne(g[4].avg_text_length)+"")&&me(c,u)},i(g){d||(b(i.$$.fragment,g),d=!0)},o(g){v(i.$$.fragment,g),d=!1},d(g){g&&m(e),U(i),_=!1,h()}}}function ai(n){let e,t,l,i,f,r,s,a,o,u=Ne(n[4].min_val)+"",c,d,_=Ne(n[4].max_val)+"",h,g,p,w;return i=new Bt({props:{class:"inline"}}),{c(){e=I("tr"),t=I("td"),l=I("span"),j(i.$$.fragment),f=J(),r=I("span"),s=X("Range"),a=J(),o=I("td"),c=X(u),d=X(" .. "),h=X(_),this.h()},l(z){e=D(z,"TR",{});var M=E(e);t=D(M,"TD",{class:!0});var N=E(t);l=D(N,"SPAN",{});var A=E(l);Z(i.$$.fragment,A),A.forEach(m),f=G(N),r=D(N,"SPAN",{});var F=E(r);s=x(F,"Range"),F.forEach(m),N.forEach(m),a=G(M),o=D(M,"TD",{class:!0});var C=E(o);c=x(C,u),d=x(C," .. "),h=x(C,_),C.forEach(m),M.forEach(m),this.h()},h(){S(t,"class","svelte-1tctrjz"),S(o,"class","svelte-1tctrjz")},m(z,M){V(z,e,M),k(e,t),k(t,l),Y(i,l,null),k(t,f),k(t,r),k(r,s),k(e,a),k(e,o),k(o,c),k(o,d),k(o,h),g=!0,p||(w=Ke(xe.call(null,l,{text:"The minimum and maximum value across the dataset"})),p=!0)},p(z,M){(!g||M&16)&&u!==(u=Ne(z[4].min_val)+"")&&me(c,u),(!g||M&16)&&_!==(_=Ne(z[4].max_val)+"")&&me(h,_)},i(z){g||(b(i.$$.fragment,z),g=!0)},o(z){v(i.$$.fragment,z),g=!1},d(z){z&&m(e),U(i),p=!1,w()}}}function pu(n){let e,t,l;return t=new mu({props:{counts:n[5],bins:n[3],field:n[0]}}),t.$on("row-click",n[11]),{c(){e=I("div"),j(t.$$.fragment),this.h()},l(i){e=D(i,"DIV",{class:!0});var f=E(e);Z(t.$$.fragment,f),f.forEach(m),this.h()},h(){S(e,"class","mt-4")},m(i,f){V(i,e,f),Y(t,e,null),l=!0},p(i,f){const r={};f&32&&(r.counts=i[5]),f&8&&(r.bins=i[3]),f&1&&(r.field=i[0]),t.$set(r)},i(i){l||(b(t.$$.fragment,i),l=!0)},o(i){v(t.$$.fragment,i),l=!1},d(i){i&&m(e),U(t)}}}function vu(n){let e,t;return e=new It({props:{paragraph:!0,width:"50%"}}),{c(){j(e.$$.fragment)},l(l){Z(e.$$.fragment,l)},m(l,i){Y(e,l,i),t=!0},p:te,i(l){t||(b(e.$$.fragment,l),t=!0)},o(l){v(e.$$.fragment,l),t=!1},d(l){U(e,l)}}}function ku(n){let e,t,l=n[1].error.message+"",i;return{c(){e=I("p"),t=X("Error: "),i=X(l)},l(f){e=D(f,"P",{});var r=E(e);t=x(r,"Error: "),i=x(r,l),r.forEach(m)},m(f,r){V(f,e,r),k(e,t),k(e,i)},p(f,r){r&2&&l!==(l=f[1].error.message+"")&&me(i,l)},i:te,o:te,d(f){f&&m(e)}}}function wu(n){let e,t,l,i,f,r,s;const a=[bu,gu,_u],o=[];function u(h,g){return h[2].error?0:h[4]==null?1:2}t=u(n),l=o[t]=a[t](n);const c=[ku,vu,pu],d=[];function _(h,g){return h[1].error?0:h[5]==null?1:h[5].length>0?2:-1}return~(f=_(n))&&(r=d[f]=c[f](n)),{c(){e=I("div"),l.c(),i=J(),r&&r.c(),this.h()},l(h){e=D(h,"DIV",{class:!0});var g=E(e);l.l(g),i=G(g),r&&r.l(g),g.forEach(m),this.h()},h(){S(e,"class","p-4")},m(h,g){V(h,e,g),o[t].m(e,null),k(e,i),~f&&d[f].m(e,null),s=!0},p(h,[g]){let p=t;t=u(h),t===p?o[t].p(h,g):(le(),v(o[p],1,1,()=>{o[p]=null}),ne(),l=o[t],l?l.p(h,g):(l=o[t]=a[t](h),l.c()),b(l,1),l.m(e,i));let w=f;f=_(h),f===w?~f&&d[f].p(h,g):(r&&(le(),v(d[w],1,1,()=>{d[w]=null}),ne()),~f?(r=d[f],r?r.p(h,g):(r=d[f]=c[f](h),r.c()),b(r,1),r.m(e,null)):r=null)},i(h){s||(b(l),b(r),s=!0)},o(h){v(l),v(r),s=!1},d(h){h&&m(e),o[t].d(),~f&&d[f].d()}}}function Eu(n,e,t){let l,i,f,r,s,a,o=te,u=()=>(o(),o=rt(i,M=>t(1,a=M)),i),c,d=te,_=()=>(d(),d=rt(l,M=>t(2,c=M)),l),h;n.$$.on_destroy.push(()=>o()),n.$$.on_destroy.push(()=>d());let{field:g}=e;const p=Qe();ze(n,p,M=>t(10,h=M));function w(M,N){if(M==null)return;if(s!=null){const[,F,C]=s[N];if(F!=null){const H={path:g.path,op:"greater_equal",value:F};p.addFilter(H)}if(C!=null){const H={path:g.path,op:"less",value:C};p.addFilter(H)}return}const A={path:g.path,op:"equals",value:M};p.addFilter(A)}const z=M=>w(M.detail.value,M.detail.index);return n.$$set=M=>{"field"in M&&t(0,g=M.field)},n.$$.update=()=>{n.$$.dirty&1025&&_(t(7,l=Hr(h.namespace,h.datasetName,{leaf_path:g.path}))),n.$$.dirty&1025&&u(t(6,i=Or(h.namespace,h.datasetName,{leaf_path:g.path,filters:h.queryOptions.filters}))),n.$$.dirty&2&&t(5,f=a.data!=null?a.data.counts:null),n.$$.dirty&4&&t(4,r=c.data!=null?c.data:null),n.$$.dirty&2&&t(3,s=a.data!=null?a.data.bins:null)},[g,a,c,s,r,f,i,l,p,w,h,z]}class Su extends ve{constructor(e){super(),ke(this,e,Eu,wu,pe,{field:0})}}const{Boolean:Ft}=_r;function fi(n,e,t){const l=n.slice();return l[37]=e[t],l}function oi(n,e,t){const l=n.slice();return l[40]=e[t],l}function ui(n,e,t){const l=n.slice();return l[43]=e[t],l}function ci(n,e,t){const l=n.slice();return l[46]=e[t],l}function Vu(n){let e,t="{}",l;return{c(){e=I("span"),l=X(t),this.h()},l(i){e=D(i,"SPAN",{class:!0});var f=E(e);l=x(f,t),f.forEach(m),this.h()},h(){S(e,"class","font-mono")},m(i,f){V(i,e,f),k(e,l)},p:te,i:te,o:te,d(i){i&&m(e)}}}function zu(n){let e,t,l,i;var f=n[22][n[1].repeated_field.dtype];function r(s){return{props:{title:s[1].dtype}}}return f&&(t=qe(f,r(n))),{c(){e=I("div"),t&&j(t.$$.fragment),l=X("[]"),this.h()},l(s){e=D(s,"DIV",{class:!0});var a=E(e);t&&Z(t.$$.fragment,a),l=x(a,"[]"),a.forEach(m),this.h()},h(){S(e,"class","flex")},m(s,a){V(s,e,a),t&&Y(t,e,null),k(e,l),i=!0},p(s,a){const o={};if(a[0]&2&&(o.title=s[1].dtype),a[0]&2&&f!==(f=s[22][s[1].repeated_field.dtype])){if(t){le();const u=t;v(u.$$.fragment,1,0,()=>{U(u,1)}),ne()}f?(t=qe(f,r(s)),j(t.$$.fragment),b(t.$$.fragment,1),Y(t,e,l)):t=null}else f&&t.$set(o)},i(s){i||(t&&b(t.$$.fragment,s),i=!0)},o(s){t&&v(t.$$.fragment,s),i=!1},d(s){s&&m(e),t&&U(t)}}}function Mu(n){let e,t,l;var i=n[22][n[1].dtype];function f(r){return{props:{title:r[1].dtype}}}return i&&(e=qe(i,f(n))),{c(){e&&j(e.$$.fragment),t=ue()},l(r){e&&Z(e.$$.fragment,r),t=ue()},m(r,s){e&&Y(e,r,s),V(r,t,s),l=!0},p(r,s){const a={};if(s[0]&2&&(a.title=r[1].dtype),s[0]&2&&i!==(i=r[22][r[1].dtype])){if(e){le();const o=e;v(o.$$.fragment,1,0,()=>{U(o,1)}),ne()}i?(e=qe(i,f(r)),j(e.$$.fragment),b(e.$$.fragment,1),Y(e,t.parentNode,t)):e=null}else i&&e.$set(a)},i(r){l||(e&&b(e.$$.fragment,r),l=!0)},o(r){e&&v(e.$$.fragment,r),l=!1},d(r){r&&m(t),e&&U(e,r)}}}function di(n){let e,t;return e=new qt({props:{interactive:!0,type:"green",$$slots:{default:[Iu]},$$scope:{ctx:n}}}),e.$on("click",n[31]),e.$on("remove",n[32]),{c(){j(e.$$.fragment)},l(l){Z(e.$$.fragment,l)},m(l,i){Y(e,l,i),t=!0},p(l,i){const f={};i[0]&8192|i[1]&262144&&(f.$$scope={dirty:i,ctx:l}),e.$set(f)},i(l){t||(b(e.$$.fragment,l),t=!0)},o(l){v(e.$$.fragment,l),t=!1},d(l){U(e,l)}}}function yu(n){let e,t;return e=new Rt({}),{c(){j(e.$$.fragment)},l(l){Z(e.$$.fragment,l)},m(l,i){Y(e,l,i),t=!0},i(l){t||(b(e.$$.fragment,l),t=!0)},o(l){v(e.$$.fragment,l),t=!1},d(l){U(e,l)}}}function Tu(n){let e,t;return e=new Pt({}),{c(){j(e.$$.fragment)},l(l){Z(e.$$.fragment,l)},m(l,i){Y(e,l,i),t=!0},i(l){t||(b(e.$$.fragment,l),t=!0)},o(l){v(e.$$.fragment,l),t=!1},d(l){U(e,l)}}}function Iu(n){let e,t,l,i,f,r,s,a;const o=[Tu,yu],u=[];function c(d,_){return d[13]=="ASC"?0:1}return r=c(n),s=u[r]=o[r](n),{c(){e=I("div"),t=I("div"),l=X("Sorted"),i=J(),f=I("span"),s.c(),this.h()},l(d){e=D(d,"DIV",{class:!0});var _=E(e);t=D(_,"DIV",{class:!0});var h=E(t);l=x(h,"Sorted"),h.forEach(m),i=G(_),f=D(_,"SPAN",{});var g=E(f);s.l(g),g.forEach(m),_.forEach(m),this.h()},h(){S(t,"class","mr-1"),S(e,"class","flex flex-row")},m(d,_){V(d,e,_),k(e,t),k(t,l),k(e,i),k(e,f),u[r].m(f,null),a=!0},p(d,_){let h=r;r=c(d),r!==h&&(le(),v(u[h],1,1,()=>{u[h]=null}),ne(),s=u[r],s||(s=u[r]=o[r](d),s.c()),b(s,1),s.m(f,null))},i(d){a||(b(s),a=!0)},o(d){v(s),a=!1},d(d){d&&m(e),u[r].d()}}}function hi(n){let e,t,l=n[6],i=[];for(let r=0;rv(i[r],1,1,()=>{i[r]=null});return{c(){for(let r=0;r{i&&(l||(l=st(e,pt,{},!0)),l.run(1))}),i=!0)},o(f){v(t.$$.fragment,f),f&&(l||(l=st(e,pt,{},!1)),l.run(0)),i=!1},d(f){f&&m(e),U(t),f&&l&&l.end()}}}function ki(n){let e,t,l=n[17],i=[];for(let r=0;rv(i[r],1,1,()=>{i[r]=null});return{c(){for(let r=0;rv(re[q],1,1,()=>{re[q]=null});let ge=n[15],Ee=[];for(let q=0;qv(Ee[q],1,1,()=>{Ee[q]=null});let _e=n[11]&&n[20]&&bi(n),Se=M&&pi(n);A=new rr({props:{field:n[1],schema:n[0]}});let K=n[19]&&vi(n),L=n[17].length&&ki(n);return{c(){e=I("div"),t=I("div"),l=I("div"),j(i.$$.fragment),f=J(),r=I("div"),a.c(),u=J(),c=I("div"),d=X(n[18]),_=J(),$&&$.c(),h=J(),P&&P.c(),g=J();for(let q=0;q{ie[Le]=null}),ne(),a=ie[s],a?a.p(q,O):(a=ie[s]=W[s](q),a.c()),b(a,1),a.m(r,null)),o&&Ot(o.update)&&O[0]&512&&o.update.call(null,{text:q[9]}),(!y||O[0]&16)&&T(r,"bg-blue-200",q[4]),(!y||O[0]&262144)&&me(d,q[18]),q[14]?$?($.p(q,O),O[0]&16384&&b($,1)):($=di(q),$.c(),b($,1),$.m(t,h)):$&&(le(),v($,1,1,()=>{$=null}),ne()),q[12]?P?(P.p(q,O),O[0]&4096&&b(P,1)):(P=hi(q),P.c(),b(P,1),P.m(t,g)):P&&(le(),v(P,1,1,()=>{P=null}),ne()),O[0]&1024){ce=q[10];let Ie;for(Ie=0;Ie{_e=null}),ne()),O[0]&2050&&(M=Tt(q[1])&&!q[11]),M?Se?(Se.p(q,O),O[0]&2050&&b(Se,1)):(Se=pi(q),Se.c(),b(Se,1),Se.m(t,N)):Se&&(le(),v(Se,1,1,()=>{Se=null}),ne());const Je={};O[0]&2&&(Je.field=q[1]),O[0]&1&&(Je.schema=q[0]),A.$set(Je),(!y||O[0]&16)&&T(t,"bg-blue-50",q[4]),(!y||O[0]&2048)&&T(t,"bg-emerald-100",q[11]),(!y||O[0]&16)&&T(t,"hover:bg-blue-100",q[4]),q[19]?K?(K.p(q,O),O[0]&524288&&b(K,1)):(K=vi(q),K.c(),b(K,1),K.m(e,C)):K&&(le(),v(K,1,1,()=>{K=null}),ne()),q[17].length?L?(L.p(q,O),O[0]&131072&&b(L,1)):(L=ki(q),L.c(),b(L,1),L.m(H,null)):L&&(le(),v(L,1,1,()=>{L=null}),ne()),(!y||O[0]&16)&&T(e,"border-b",!q[4])},i(q){if(!y){b(i.$$.fragment,q),b(a),b($),b(P);for(let O=0;O{y&&(B||(B=st(H,pt,{},!0)),B.run(1))}),y=!0}},o(q){v(i.$$.fragment,q),v(a),v($),v(P),re=re.filter(Ft);for(let O=0;Ot(21,H=_e));const he=Qe();ze(n,he,_e=>t(8,F=_e));const $=$e();ze(n,$,_e=>t(29,C=_e));function P(_e){return _e!=null&&_e.repeated_field?P(_e.repeated_field):_e!=null&&_e.fields?[...Object.values(_e.fields).filter(Se=>Se.path.at(-1)!==tt)].flatMap(Se=>{const K=P(Se);return K.some(L=>bt(L))?K:[Se]}).filter(Se=>{var K,L,q,O;return!(Se.dtype==="embedding"||Se.signal!=null&&ct(Se).some(Ve=>Ve.dtype==="embedding")||((K=Se.signal)==null?void 0:K.signal_name)==="sentences"||((L=Se.signal)==null?void 0:L.signal_name)==="substring_search"||((q=Se.signal)==null?void 0:q.signal_name)==="semantic_similarity"||((O=Se.signal)==null?void 0:O.signal_name)==="concept_labels")}):[]}const ce=()=>{c?he.removeSelectedColumn(r):he.addSelectedColumn(r)},re=()=>h==="ASC"?Mt(he,F.queryOptions.sort_order="DESC",F):Mt(he,F.queryOptions.sort_order="ASC",F),se=()=>he.removeSortBy(r),ge=()=>y.signal&&w&&R&&H.mutate([F.namespace,F.datasetName,{leaf_path:R.path,signal:y.signal}]),Ee=()=>{var _e;return y.signal&&w&&ot({command:ut.EditPreviewConcept,namespace:F.namespace,datasetName:F.datasetName,path:R==null?void 0:R.path,signalName:(_e=y.signal)==null?void 0:_e.signal_name,value:y.signal})},Ce=()=>{s?he.removeExpandedColumn(r):he.addExpandedColumn(r)};return n.$$set=_e=>{"schema"in _e&&t(0,B=_e.schema),"field"in _e&&t(1,y=_e.field),"sourceField"in _e&&t(2,R=_e.sourceField),"indent"in _e&&t(3,ee=_e.indent)},n.$$.update=()=>{var _e,Se,K,L;n.$$.dirty[0]&3&&t(4,l=yt(y,B)),n.$$.dirty[0]&2&&t(20,i=bt(y)),n.$$.dirty[0]&16&&t(7,f=!l),n.$$.dirty[0]&2&&t(5,r=y.path),n.$$.dirty[0]&288&&t(19,s=F.expandedColumns[De(r)]||!1),n.$$.dirty[0]&32&&t(28,a=r.at(-1)===Ji),n.$$.dirty[0]&268435488&&t(18,o=a?r.at(-2):r.at(-1)),n.$$.dirty[0]&2&&t(17,u=P(y)),n.$$.dirty[0]&536870944&&t(16,c=(_e=C.visibleFields)==null?void 0:_e.some(q=>Ue(q.path,r))),n.$$.dirty[0]&130&&t(15,d=f?ct(y).filter(q=>q.signal!=null&&ct(q).some(O=>O.dtype==="embedding")):[]),n.$$.dirty[0]&288&&t(14,_=(Se=F.queryOptions.sort_by)==null?void 0:Se.some(q=>Ue(q,r))),n.$$.dirty[0]&256&&t(13,h=F.queryOptions.sort_order),n.$$.dirty[0]&288&&t(6,g=((K=F.queryOptions.filters)==null?void 0:K.filter(q=>Ue(q.path,r)))||[]),n.$$.dirty[0]&64&&t(12,p=g.length>0),n.$$.dirty[0]&536870944&&t(11,w=Lt(((L=C.selectRowsSchema)==null?void 0:L.data)||null,r)),n.$$.dirty[0]&288&&t(10,z=sl(F,r)),n.$$.dirty[0]&16&&t(26,M=l?". This field was generated by a signal":""),n.$$.dirty[0]&2&&t(27,N=y.dtype??(y.repeated_field&&y.repeated_field.dtype?`${y.repeated_field.dtype}[]`:"object")),n.$$.dirty[0]&201326592&&t(9,A=`Data type: ${N}${M}`)},[B,y,R,ee,l,r,g,f,F,A,z,w,p,h,_,d,c,u,o,s,i,H,W,ie,he,$,M,N,a,C,ce,re,se,ge,Ee,Ce]}class sr extends ve{constructor(e){super(),ke(this,e,Cu,Du,pe,{schema:0,field:1,sourceField:2,indent:3},null,[-1,-1])}}function Ei(n,e,t){const l=n.slice();return l[28]=e[t],l}function Si(n,e,t){const l=n.slice();return l[31]=e[t],l}function Au(n){var B;let e,t,l,i,f,r,s,a,o,u,c,d,_,h,g,p,w,z;l=new Ui({props:{labelText:"Show",hideLabel:!0,checked:n[14],disabled:n[10]}}),l.$on("change",n[23]);let M=n[15]&&Vi(n),N=n[13]&&zi(n),A=n[11]&&Mi(n),F=n[17]&&Ti(n),C=((B=n[1])==null?void 0:B.dtype)&&Ii(n);g=new rr({props:{field:n[1],schema:n[0]}});let H=n[8]&&Di(n);return{c(){e=I("div"),t=I("div"),j(l.$$.fragment),i=J(),f=I("div"),M&&M.c(),r=J(),s=I("div"),a=X(n[16]),o=J(),N&&N.c(),u=J(),A&&A.c(),c=J(),F&&F.c(),d=J(),C&&C.c(),_=J(),h=I("div"),j(g.$$.fragment),p=J(),H&&H.c(),w=ue(),this.h()},l(y){e=D(y,"DIV",{class:!0});var R=E(e);t=D(R,"DIV",{class:!0});var ee=E(t);Z(l.$$.fragment,ee),ee.forEach(m),i=G(R),f=D(R,"DIV",{class:!0});var W=E(f);M&&M.l(W),W.forEach(m),r=G(R),s=D(R,"DIV",{class:!0,title:!0});var ie=E(s);a=x(ie,n[16]),ie.forEach(m),o=G(R),N&&N.l(R),u=G(R),A&&A.l(R),c=G(R),F&&F.l(R),d=G(R),C&&C.l(R),_=G(R),h=D(R,"DIV",{});var he=E(h);Z(g.$$.fragment,he),he.forEach(m),R.forEach(m),p=G(y),H&&H.l(y),w=ue(),this.h()},h(){S(t,"class","w-6"),S(f,"class","w-6"),Pe(f,"margin-left",n[2]*24+"px"),S(s,"class","grow truncate whitespace-nowrap pr-2 text-gray-900"),S(s,"title",n[16]),S(e,"class","flex w-full flex-row items-center border-b border-gray-200 px-4 py-2 hover:bg-gray-100"),T(e,"bg-blue-50",n[18]),T(e,"hover:bg-blue-100",n[18])},m(y,R){V(y,e,R),k(e,t),Y(l,t,null),k(e,i),k(e,f),M&&M.m(f,null),k(e,r),k(e,s),k(s,a),k(e,o),N&&N.m(e,null),k(e,u),A&&A.m(e,null),k(e,c),F&&F.m(e,null),k(e,d),C&&C.m(e,null),k(e,_),k(e,h),Y(g,h,null),V(y,p,R),H&&H.m(y,R),V(y,w,R),z=!0},p(y,R){var ie;const ee={};R[0]&16384&&(ee.checked=y[14]),R[0]&1024&&(ee.disabled=y[10]),l.$set(ee),y[15]?M?(M.p(y,R),R[0]&32768&&b(M,1)):(M=Vi(y),M.c(),b(M,1),M.m(f,null)):M&&(le(),v(M,1,1,()=>{M=null}),ne()),R[0]&4&&Pe(f,"margin-left",y[2]*24+"px"),(!z||R[0]&65536)&&me(a,y[16]),(!z||R[0]&65536)&&S(s,"title",y[16]),y[13]?N?(N.p(y,R),R[0]&8192&&b(N,1)):(N=zi(y),N.c(),b(N,1),N.m(e,u)):N&&(le(),v(N,1,1,()=>{N=null}),ne()),y[11]?A?(A.p(y,R),R[0]&2048&&b(A,1)):(A=Mi(y),A.c(),b(A,1),A.m(e,c)):A&&(le(),v(A,1,1,()=>{A=null}),ne()),y[17]?F?(F.p(y,R),R[0]&131072&&b(F,1)):(F=Ti(y),F.c(),b(F,1),F.m(e,d)):F&&(le(),v(F,1,1,()=>{F=null}),ne()),(ie=y[1])!=null&&ie.dtype?C?C.p(y,R):(C=Ii(y),C.c(),C.m(e,_)):C&&(C.d(1),C=null);const W={};R[0]&2&&(W.field=y[1]),R[0]&1&&(W.schema=y[0]),g.$set(W),(!z||R[0]&262144)&&T(e,"bg-blue-50",y[18]),(!z||R[0]&262144)&&T(e,"hover:bg-blue-100",y[18]),y[8]?H?(H.p(y,R),R[0]&256&&b(H,1)):(H=Di(y),H.c(),b(H,1),H.m(w.parentNode,w)):H&&(le(),v(H,1,1,()=>{H=null}),ne())},i(y){z||(b(l.$$.fragment,y),b(M),b(N),b(A),b(F),b(g.$$.fragment,y),b(H),z=!0)},o(y){v(l.$$.fragment,y),v(M),v(N),v(A),v(F),v(g.$$.fragment,y),v(H),z=!1},d(y){y&&m(e),U(l),M&&M.d(),N&&N.d(),A&&A.d(),F&&F.d(),C&&C.d(),U(g),y&&m(p),H&&H.d(y),y&&m(w)}}}function Nu(n){let e,t;return e=new ol({props:{field:n[1].repeated_field,indent:n[2],schema:n[0]}}),{c(){j(e.$$.fragment)},l(l){Z(e.$$.fragment,l)},m(l,i){Y(e,l,i),t=!0},p(l,i){const f={};i[0]&2&&(f.field=l[1].repeated_field),i[0]&4&&(f.indent=l[2]),i[0]&1&&(f.schema=l[0]),e.$set(f)},i(l){t||(b(e.$$.fragment,l),t=!0)},o(l){v(e.$$.fragment,l),t=!1},d(l){U(e,l)}}}function Vi(n){let e,t,l,i,f;return t=new qa({props:{class:"w-3"}}),{c(){e=I("button"),j(t.$$.fragment),this.h()},l(r){e=D(r,"BUTTON",{class:!0});var s=E(e);Z(t.$$.fragment,s),s.forEach(m),this.h()},h(){S(e,"class","p-2 transition hover:opacity-60"),T(e,"rotate-180",!n[8])},m(r,s){V(r,e,s),Y(t,e,null),l=!0,i||(f=ae(e,"click",n[24]),i=!0)},p(r,s){(!l||s[0]&256)&&T(e,"rotate-180",!r[8])},i(r){l||(b(t.$$.fragment,r),l=!0)},o(r){v(t.$$.fragment,r),l=!1},d(r){r&&m(e),U(t),i=!1,f()}}}function zi(n){let e,t;return e=new qt({props:{interactive:!0,type:"green",$$slots:{default:[Ru]},$$scope:{ctx:n}}}),e.$on("click",n[25]),e.$on("remove",n[26]),{c(){j(e.$$.fragment)},l(l){Z(e.$$.fragment,l)},m(l,i){Y(e,l,i),t=!0},p(l,i){const f={};i[0]&4096|i[1]&8&&(f.$$scope={dirty:i,ctx:l}),e.$set(f)},i(l){t||(b(e.$$.fragment,l),t=!0)},o(l){v(e.$$.fragment,l),t=!1},d(l){U(e,l)}}}function Bu(n){let e,t;return e=new Rt({}),{c(){j(e.$$.fragment)},l(l){Z(e.$$.fragment,l)},m(l,i){Y(e,l,i),t=!0},i(l){t||(b(e.$$.fragment,l),t=!0)},o(l){v(e.$$.fragment,l),t=!1},d(l){U(e,l)}}}function Pu(n){let e,t;return e=new Pt({}),{c(){j(e.$$.fragment)},l(l){Z(e.$$.fragment,l)},m(l,i){Y(e,l,i),t=!0},i(l){t||(b(e.$$.fragment,l),t=!0)},o(l){v(e.$$.fragment,l),t=!1},d(l){U(e,l)}}}function Ru(n){let e,t,l,i,f;const r=[Pu,Bu],s=[];function a(o,u){return o[12]=="ASC"?0:1}return t=a(n),l=s[t]=r[t](n),{c(){e=X(`Sorted `),l.c(),i=ue()},l(o){e=x(o,`Sorted `),l.l(o),i=ue()},m(o,u){V(o,e,u),s[t].m(o,u),V(o,i,u),f=!0},p(o,u){let c=t;t=a(o),t!==c&&(le(),v(s[c],1,1,()=>{s[c]=null}),ne(),l=s[t],l||(l=s[t]=r[t](o),l.c()),b(l,1),l.m(i.parentNode,i))},i(o){f||(b(l),f=!0)},o(o){v(l),f=!1},d(o){o&&m(e),s[t].d(o),o&&m(i)}}}function Mi(n){let e,t,l=n[4],i=[];for(let r=0;rv(i[r],1,1,()=>{i[r]=null});return{c(){for(let r=0;r{i=null}),ne())},i(f){l||(b(i),f&&ht(()=>{l&&(t||(t=st(e,pt,{},!0)),t.run(1))}),l=!0)},o(f){v(i),f&&(t||(t=st(e,pt,{},!1)),t.run(0)),l=!1},d(f){f&&m(e),i&&i.d(),f&&t&&t.end()}}}function Ci(n){let e,t,l=n[5],i=[];for(let r=0;rv(i[r],1,1,()=>{i[r]=null});return{c(){for(let r=0;r{r[u]=null}),ne(),t=r[e],t?t.p(a,o):(t=r[e]=f[e](a),t.c()),b(t,1),t.m(l.parentNode,l))},i(a){i||(b(t),i=!0)},o(a){v(t),i=!1},d(a){r[e].d(a),a&&m(l)}}}function Hu(n,e,t){let l,i,f,r,s,a,o,u,c,d,_,h,g,p,w,z,M,{schema:N}=e,{field:A}=e,{indent:F=0}=e;const C=Qe();ze(n,C,he=>t(7,M=he));const H=$e();ze(n,H,he=>t(22,z=he));let B=!0;function y(he){return he!=null&&he.fields?Object.values(he.fields).filter($=>$.path.at(-1)!==tt):[]}const R=()=>{c?C.removeSelectedColumn(l):C.addSelectedColumn(l)},ee=()=>t(8,B=!B),W=()=>_==="ASC"?Mt(C,M.queryOptions.sort_order="DESC",M):Mt(C,M.queryOptions.sort_order="ASC",M),ie=()=>C.removeSortBy(l);return n.$$set=he=>{"schema"in he&&t(0,N=he.schema),"field"in he&&t(1,A=he.field),"indent"in he&&t(2,F=he.indent)},n.$$.update=()=>{var he,$,P,ce;n.$$.dirty[0]&2&&t(3,l=A.path),n.$$.dirty[0]&3&&t(21,i=nl(N,A.path.slice(0,-1))),n.$$.dirty[0]&3&&t(18,f=yt(A,N)),n.$$.dirty[0]&2&&t(6,s=A.path.at(-1)===Ji),n.$$.dirty[0]&2097218&&t(17,r=s&&i?bt(i):bt(A)),n.$$.dirty[0]&66&&t(16,a=s?A.path.at(-2):A.path.at(-1)),n.$$.dirty[0]&2&&t(5,o=y(A)),n.$$.dirty[0]&32&&t(15,u=o.length>0),n.$$.dirty[0]&4194312&&t(14,c=(he=z.visibleFields)==null?void 0:he.some(re=>Ue(re.path,l))),n.$$.dirty[0]&136&&t(13,d=($=M.queryOptions.sort_by)==null?void 0:$.some(re=>Ue(re,l))),n.$$.dirty[0]&128&&t(12,_=M.queryOptions.sort_order),n.$$.dirty[0]&136&&t(4,h=((P=M.queryOptions.filters)==null?void 0:P.filter(re=>Ue(re.path,l)))||[]),n.$$.dirty[0]&16&&t(11,g=h.length>0),n.$$.dirty[0]&2&&t(10,p=!A.dtype||A.dtype==="embedding"),n.$$.dirty[0]&4194312&&t(9,w=Lt(((ce=z.selectRowsSchema)==null?void 0:ce.data)||null,l))},[N,A,F,l,h,o,s,M,B,w,p,g,_,d,c,u,a,r,f,C,H,i,z,R,ee,W,ie]}class ol extends ve{constructor(e){super(),ke(this,e,Hu,Fu,pe,{schema:0,field:1,indent:2},null,[-1,-1])}}function Ni(n,e,t){const l=n.slice();return l[10]=e[t],l}function Bi(n,e,t){const l=n.slice();return l[10]=e[t],l}function Ou(n){let e;return{c(){e=X("datasets")},l(t){e=x(t,"datasets")},m(t,l){V(t,e,l)},d(t){t&&m(e)}}}function Lu(n){let e=n[1].namespace+"",t;return{c(){t=X(e)},l(l){t=x(l,e)},m(l,i){V(l,t,i)},p(l,i){i&2&&e!==(e=l[1].namespace+"")&&me(t,e)},d(l){l&&m(t)}}}function qu(n){let e=n[1].datasetName+"",t;return{c(){t=X(e)},l(l){t=x(l,e)},m(l,i){V(l,t,i)},p(l,i){i&2&&e!==(e=l[1].datasetName+"")&&me(t,e)},d(l){l&&m(t)}}}function ju(n){let e,t,l,i,f,r;return e=new Yt({props:{href:"/",$$slots:{default:[Ou]},$$scope:{ctx:n}}}),l=new Yt({props:{href:"/",$$slots:{default:[Lu]},$$scope:{ctx:n}}}),f=new Yt({props:{$$slots:{default:[qu]},$$scope:{ctx:n}}}),{c(){j(e.$$.fragment),t=J(),j(l.$$.fragment),i=J(),j(f.$$.fragment)},l(s){Z(e.$$.fragment,s),t=G(s),Z(l.$$.fragment,s),i=G(s),Z(f.$$.fragment,s)},m(s,a){Y(e,s,a),V(s,t,a),Y(l,s,a),V(s,i,a),Y(f,s,a),r=!0},p(s,a){const o={};a&32768&&(o.$$scope={dirty:a,ctx:s}),e.$set(o);const u={};a&32770&&(u.$$scope={dirty:a,ctx:s}),l.$set(u);const c={};a&32770&&(c.$$scope={dirty:a,ctx:s}),f.$set(c)},i(s){r||(b(e.$$.fragment,s),b(l.$$.fragment,s),b(f.$$.fragment,s),r=!0)},o(s){v(e.$$.fragment,s),v(l.$$.fragment,s),v(f.$$.fragment,s),r=!1},d(s){U(e,s),s&&m(t),U(l,s),s&&m(i),U(f,s)}}}function Pi(n){let e,t=Ne(n[3].data.dataset_manifest.num_items)+"",l,i;return{c(){e=X("("),l=X(t),i=X(" rows)")},l(f){e=x(f,"("),l=x(f,t),i=x(f," rows)")},m(f,r){V(f,e,r),V(f,l,r),V(f,i,r)},p(f,r){r&8&&t!==(t=Ne(f[3].data.dataset_manifest.num_items)+"")&&me(l,t)},d(f){f&&m(e),f&&m(l),f&&m(i)}}}function Yu(n){let e,t,l,i,f,r;return e=new Vt({props:{label:"Schema",class:"w-1/3"}}),l=new Vt({props:{label:"Tree View",class:"w-1/3"}}),f=new Vt({props:{label:"Raw Query",class:"w-1/3"}}),{c(){j(e.$$.fragment),t=J(),j(l.$$.fragment),i=J(),j(f.$$.fragment)},l(s){Z(e.$$.fragment,s),t=G(s),Z(l.$$.fragment,s),i=G(s),Z(f.$$.fragment,s)},m(s,a){Y(e,s,a),V(s,t,a),Y(l,s,a),V(s,i,a),Y(f,s,a),r=!0},p:te,i(s){r||(b(e.$$.fragment,s),b(l.$$.fragment,s),b(f.$$.fragment,s),r=!0)},o(s){v(e.$$.fragment,s),v(l.$$.fragment,s),v(f.$$.fragment,s),r=!1},d(s){U(e,s),s&&m(t),U(l,s),s&&m(i),U(f,s)}}}function Uu(n){let e=[],t=new Map,l,i,f=Object.keys(n[0].data.schema.fields);const r=s=>s[10];for(let s=0;s{r[u]=null}),ne()),~e?(t=r[e],t?t.p(a,o):(t=r[e]=f[e](a),t.c()),b(t,1),t.m(l.parentNode,l)):t=null)},i(a){i||(b(t),i=!0)},o(a){v(t),i=!1},d(a){~e&&r[e].d(a),a&&m(l)}}}function Ku(n){let e=[],t=new Map,l,i,f=Object.keys(n[0].data.schema.fields);const r=s=>s[10];for(let s=0;s{r[u]=null}),ne()),~e?(t=r[e],t?t.p(a,o):(t=r[e]=f[e](a),t.c()),b(t,1),t.m(l.parentNode,l)):t=null)},i(a){i||(b(t),i=!0)},o(a){v(t),i=!1},d(a){~e&&r[e].d(a),a&&m(l)}}}function Gu(n){let e,t;return e=new au({}),{c(){j(e.$$.fragment)},l(l){Z(e.$$.fragment,l)},m(l,i){Y(e,l,i),t=!0},i(l){t||(b(e.$$.fragment,l),t=!0)},o(l){v(e.$$.fragment,l),t=!1},d(l){U(e,l)}}}function Xu(n){let e,t,l,i,f,r,s;return t=new zt({props:{$$slots:{default:[Zu]},$$scope:{ctx:n}}}),i=new zt({props:{$$slots:{default:[Ju]},$$scope:{ctx:n}}}),r=new zt({props:{$$slots:{default:[Gu]},$$scope:{ctx:n}}}),{c(){e=I("div"),j(t.$$.fragment),l=J(),j(i.$$.fragment),f=J(),j(r.$$.fragment),this.h()},l(a){e=D(a,"DIV",{class:!0,slot:!0});var o=E(e);Z(t.$$.fragment,o),l=G(o),Z(i.$$.fragment,o),f=G(o),Z(r.$$.fragment,o),o.forEach(m),this.h()},h(){S(e,"class","h-full overflow-y-auto"),S(e,"slot","content")},m(a,o){V(a,e,o),Y(t,e,null),k(e,l),Y(i,e,null),k(e,f),Y(r,e,null),s=!0},p(a,o){const u={};o&32769&&(u.$$scope={dirty:o,ctx:a}),t.$set(u);const c={};o&32769&&(c.$$scope={dirty:o,ctx:a}),i.$set(c);const d={};o&32768&&(d.$$scope={dirty:o,ctx:a}),r.$set(d)},i(a){s||(b(t.$$.fragment,a),b(i.$$.fragment,a),b(r.$$.fragment,a),s=!0)},o(a){v(t.$$.fragment,a),v(i.$$.fragment,a),v(r.$$.fragment,a),s=!1},d(a){a&&m(e),U(t),U(i),U(r)}}}function xu(n){let e,t,l,i,f,r,s,a,o,u,c,d,_;i=new ss({props:{noTrailingSlash:!0,skeleton:n[2].isLoading,$$slots:{default:[ju]},$$scope:{ctx:n}}});let h=n[3].isSuccess&&Pi(n);return a=new at({props:{size:"field",kind:"ghost",icon:cf,iconDescription:"Reset View"}}),a.$on("click",n[4].reset),u=new at({props:{size:"field",kind:"ghost",icon:lf,iconDescription:"Download selection"}}),u.$on("click",n[8]),d=new $i({props:{class:"overflow-hidden border-b border-gray-200",$$slots:{content:[Xu],default:[Yu]},$$scope:{ctx:n}}}),{c(){e=I("div"),t=I("div"),l=I("div"),j(i.$$.fragment),f=J(),h&&h.c(),r=J(),s=I("div"),j(a.$$.fragment),o=J(),j(u.$$.fragment),c=J(),j(d.$$.fragment),this.h()},l(g){e=D(g,"DIV",{class:!0});var p=E(e);t=D(p,"DIV",{class:!0});var w=E(t);l=D(w,"DIV",{class:!0});var z=E(l);Z(i.$$.fragment,z),f=G(z),h&&h.l(z),z.forEach(m),r=G(w),s=D(w,"DIV",{class:!0});var M=E(s);Z(a.$$.fragment,M),o=G(M),Z(u.$$.fragment,M),M.forEach(m),w.forEach(m),c=G(p),Z(d.$$.fragment,p),p.forEach(m),this.h()},h(){S(l,"class","flex items-center"),S(s,"class","flex"),S(t,"class","mb-2 flex w-full items-center justify-between gap-x-2 px-4"),S(e,"class","flex h-full flex-col pt-4")},m(g,p){V(g,e,p),k(e,t),k(t,l),Y(i,l,null),k(l,f),h&&h.m(l,null),k(t,r),k(t,s),Y(a,s,null),k(s,o),Y(u,s,null),k(e,c),Y(d,e,null),_=!0},p(g,[p]){const w={};p&4&&(w.skeleton=g[2].isLoading),p&32770&&(w.$$scope={dirty:p,ctx:g}),i.$set(w),g[3].isSuccess?h?h.p(g,p):(h=Pi(g),h.c(),h.m(l,null)):h&&(h.d(1),h=null);const z={};p&32769&&(z.$$scope={dirty:p,ctx:g}),d.$set(z)},i(g){_||(b(i.$$.fragment,g),b(a.$$.fragment,g),b(u.$$.fragment,g),b(d.$$.fragment,g),_=!0)},o(g){v(i.$$.fragment,g),v(a.$$.fragment,g),v(u.$$.fragment,g),v(d.$$.fragment,g),_=!1},d(g){g&&m(e),U(i),h&&h.d(),U(a),U(u),U(d)}}}function $u(n,e,t){let l,i,f,r,s;const a=Qe();ze(n,a,_=>t(1,f=_));const o=$e();ze(n,o,_=>t(9,i=_));const u=il(f.namespace,f.datasetName);ze(n,u,_=>t(2,r=_));const c=Qi(f.namespace,f.datasetName);ze(n,c,_=>t(3,s=_));async function d(){var z;const _=f.namespace,h=f.datasetName,g=f.queryOptions;g.columns=(z=i.visibleFields)==null?void 0:z.map(M=>M.path);const p=`/api/v1/datasets/${_}/${h}/select_rows_download?url_safe_options=${encodeURIComponent(JSON.stringify(g))}`,w=document.createElement("a");w.download=`${_}_${h}.json`,w.href=p,document.body.appendChild(w),w.click(),w.remove()}return n.$$.update=()=>{n.$$.dirty&512&&t(0,l=i.selectRowsSchema)},[l,f,r,s,a,o,u,c,d,i]}class ec extends ve{constructor(e){super(),ke(this,e,$u,xu,pe,{})}}function tc(n){let e,t,l,i,f,r,s,a,o;return l=new ec({}),r=new tu({}),a=new zr({}),{c(){e=I("div"),t=I("div"),j(l.$$.fragment),i=J(),f=I("div"),j(r.$$.fragment),s=J(),j(a.$$.fragment),this.h()},l(u){e=D(u,"DIV",{class:!0});var c=E(e);t=D(c,"DIV",{class:!0});var d=E(t);Z(l.$$.fragment,d),d.forEach(m),i=G(c),f=D(c,"DIV",{class:!0});var _=E(f);Z(r.$$.fragment,_),_.forEach(m),c.forEach(m),s=G(u),Z(a.$$.fragment,u),this.h()},h(){S(t,"class","h-full w-1/3 border-r border-gray-200"),S(f,"class","h-full w-2/3"),S(e,"class","flex h-full w-full")},m(u,c){V(u,e,c),k(e,t),Y(l,t,null),k(e,i),k(e,f),Y(r,f,null),V(u,s,c),Y(a,u,c),o=!0},p:te,i(u){o||(b(l.$$.fragment,u),b(r.$$.fragment,u),b(a.$$.fragment,u),o=!0)},o(u){v(l.$$.fragment,u),v(r.$$.fragment,u),v(a.$$.fragment,u),o=!1},d(u){u&&m(e),U(l),U(r),u&&m(s),U(a,u)}}}function lc(n,e,t){let l,i,f,r,s,a,o=te,u=()=>(o(),o=rt(s,H=>t(8,a=H)),s),c,d=te,_=()=>(d(),d=rt(l,H=>t(9,c=H)),l),h,g=te,p=()=>(g(),g=rt(i,H=>t(10,h=H)),i),w,z=te,M=()=>(z(),z=rt(r,H=>t(11,w=H)),r);n.$$.on_destroy.push(()=>o()),n.$$.on_destroy.push(()=>d()),n.$$.on_destroy.push(()=>g()),n.$$.on_destroy.push(()=>z());let{namespace:N}=e,{datasetName:A}=e;const F=Mr(N,A);yr(F);let C=null;return n.$$set=H=>{"namespace"in H&&t(4,N=H.namespace),"datasetName"in H&&t(5,A=H.datasetName)},n.$$.update=()=>{var H;if(n.$$.dirty&48&&_(t(0,l=Tr(N,A))),n.$$.dirty&1&&Ir(l),n.$$.dirty&512&&p(t(3,i=il(c.namespace,c.datasetName))),n.$$.dirty&1024&&t(7,f=Nt("string",h.data)),n.$$.dirty&640&&M(t(2,r=Lr(f.map(B=>[c.namespace,c.datasetName,{leaf_path:B.path}])))),n.$$.dirty&512&&u(t(1,s=qr(c.namespace,c.datasetName,Dr(c)))),n.$$.dirty&3200&&h.data!=null&&w.length>0&&!w.some(B=>B==null||B.isLoading)&&t(6,C=w.map((B,y)=>({path:f[y].path,stats:B})).sort((B,y)=>{var R,ee;return B==null||y==null?0:(((R=y.stats.data)==null?void 0:R.avg_text_length)||0)-(((ee=B.stats.data)==null?void 0:ee.avg_text_length)||0)})),n.$$.dirty&1024&&h.data!=null&&F.setSchema(h.data),n.$$.dirty&256&&a!=null&&F.setSelectRowsSchema(a),n.$$.dirty&64&&C!=null&&F.setStats(C),n.$$.dirty&768){const B=Mf(c.selectedColumns,((H=a==null?void 0:a.data)==null?void 0:H.schema)||null);F.setVisibleFields(B)}},[l,s,r,i,N,A,C,f,a,c,h,w]}class nc extends ve{constructor(e){super(),ke(this,e,lc,tc,pe,{namespace:4,datasetName:5})}}function Hi(n){let e,t;return e=new nc({props:{namespace:n[0],datasetName:n[1]}}),{c(){j(e.$$.fragment)},l(l){Z(e.$$.fragment,l)},m(l,i){Y(e,l,i),t=!0},p(l,i){const f={};i&1&&(f.namespace=l[0]),i&2&&(f.datasetName=l[1]),e.$set(f)},i(l){t||(b(e.$$.fragment,l),t=!0)},o(l){v(e.$$.fragment,l),t=!1},d(l){U(e,l)}}}function ic(n){let e,t,l=n[0]&&n[1]&&Hi(n);return{c(){l&&l.c(),e=ue()},l(i){l&&l.l(i),e=ue()},m(i,f){l&&l.m(i,f),V(i,e,f),t=!0},p(i,[f]){i[0]&&i[1]?l?(l.p(i,f),f&3&&b(l,1)):(l=Hi(i),l.c(),b(l,1),l.m(e.parentNode,e)):l&&(le(),v(l,1,1,()=>{l=null}),ne())},i(i){t||(b(l),t=!0)},o(i){v(l),t=!1},d(i){l&&l.d(i),i&&m(e)}}}function rc(n,e,t){let l;ze(n,gr,r=>t(2,l=r));let i,f;return n.$$.update=()=>{n.$$.dirty&4&&l.onHashChange("/(?.+)/(?.+)",r=>{t(0,i=r.namespace),t(1,f=r.datasetName)})},[i,f,l]}class vc extends ve{constructor(e){super(),ke(this,e,rc,ic,pe,{})}}export{vc as component};