nsthorat commited on
Commit
2ad28d6
1 Parent(s): bfc0ec6
This view is limited to 50 files because it contains too many changes.   See raw diff
Files changed (50) hide show
  1. Dockerfile +0 -1
  2. README.md +4 -6
  3. data/.cache/lilac/concept/lilac/negative-sentiment/gte-small.pkl +0 -0
  4. data/.cache/lilac/concept/lilac/non-english/gte-small.pkl +0 -0
  5. data/.cache/lilac/concept/lilac/source-code/gte-small.pkl +0 -0
  6. demo_config.yml +0 -3
  7. docker_start.py +1 -5
  8. lilac/config.py +0 -14
  9. lilac/env.py +1 -1
  10. lilac/web/_app/immutable/assets/0.f5aaacd6.css +0 -0
  11. lilac/web/_app/immutable/assets/5.cd1a9257.css +1 -0
  12. lilac/web/_app/immutable/assets/6.8302e01e.css +1 -0
  13. lilac/web/_app/immutable/assets/8.483966d0.css +1 -0
  14. lilac/web/_app/immutable/assets/_layout.32d76eb8.css +0 -0
  15. lilac/web/_app/immutable/assets/_page.cd1a9257.css +1 -0
  16. lilac/web/_app/immutable/chunks/ArrowUpRight.0bb31a07.js +1 -0
  17. lilac/web/_app/immutable/chunks/ArrowUpRight.e306cdcd.js +1 -0
  18. lilac/web/_app/immutable/chunks/ChevronUp.4e645b65.js +6 -0
  19. lilac/web/_app/immutable/chunks/ChevronUp.95b74f6d.js +6 -0
  20. lilac/web/_app/immutable/chunks/ComboBox.5bfb4a00.js +1 -0
  21. lilac/web/_app/immutable/chunks/ComboBox.f990ad07.js +1 -0
  22. lilac/web/_app/immutable/chunks/Commands.1fffdf33.js +0 -0
  23. lilac/web/_app/immutable/chunks/Commands.539ca0ee.js +0 -0
  24. lilac/web/_app/immutable/chunks/ConceptView.6611745d.js +1 -0
  25. lilac/web/_app/immutable/chunks/ConceptView.68b6197e.js +1 -0
  26. lilac/web/_app/immutable/chunks/ConceptView.bcbb99f3.js +1 -0
  27. lilac/web/_app/immutable/chunks/ConceptView.f7cc213b.js +1 -0
  28. lilac/web/_app/immutable/chunks/Page.4b0754ae.js +5 -0
  29. lilac/web/_app/immutable/chunks/Page.b01ef977.js +5 -0
  30. lilac/web/_app/immutable/chunks/RowItemMetadata.760ed6a3.js +1 -0
  31. lilac/web/_app/immutable/chunks/RowItemMetadata.d22dceae.js +1 -0
  32. lilac/web/_app/immutable/chunks/Settings.e24cc1d1.js +1 -0
  33. lilac/web/_app/immutable/chunks/StringSpanHighlight.d39d06de.js +3 -0
  34. lilac/web/_app/immutable/chunks/StringSpanHighlight.d53dc1a7.js +3 -0
  35. lilac/web/_app/immutable/chunks/ToastNotification.66c9609a.js +1 -0
  36. lilac/web/_app/immutable/chunks/ToastNotification.94abd3f6.js +1 -0
  37. lilac/web/_app/immutable/chunks/index.2b0dd2f8.js +1 -0
  38. lilac/web/_app/immutable/chunks/index.b333a928.js +4 -0
  39. lilac/web/_app/immutable/chunks/navigation.079b07c9.js +1 -0
  40. lilac/web/_app/immutable/chunks/navigation.10308c75.js +1 -0
  41. lilac/web/_app/immutable/chunks/navigation.3e4f9d10.js +1 -0
  42. lilac/web/_app/immutable/chunks/navigation.c82332c0.js +1 -0
  43. lilac/web/_app/immutable/chunks/notificationsStore.87d33d60.js +2 -0
  44. lilac/web/_app/immutable/chunks/notificationsStore.e7f2bd3e.js +2 -0
  45. lilac/web/_app/immutable/chunks/settingsStore.6e7d5078.js +1 -0
  46. lilac/web/_app/immutable/chunks/singletons.25a196bd.js +1 -0
  47. lilac/web/_app/immutable/chunks/singletons.6c1e5288.js +1 -0
  48. lilac/web/_app/immutable/chunks/singletons.a8aafae6.js +1 -0
  49. lilac/web/_app/immutable/chunks/singletons.b4dec89c.js +1 -0
  50. lilac/web/_app/immutable/chunks/stores.0468e31e.js +1 -0
Dockerfile CHANGED
@@ -14,7 +14,6 @@ RUN pip install --no-cache-dir -r requirements.txt
14
 
15
  COPY .env .
16
  COPY .env.demo .
17
- COPY demo_config.yml .
18
  # Copy the README so we can read the datasets from the HuggingFace config.
19
  COPY README.md .
20
  COPY LICENSE .
 
14
 
15
  COPY .env .
16
  COPY .env.demo .
 
17
  # Copy the README so we can read the datasets from the HuggingFace config.
18
  COPY README.md .
19
  COPY LICENSE .
README.md CHANGED
@@ -2,11 +2,9 @@
2
  app_port: 5432
3
  colorFrom: purple
4
  colorTo: purple
5
- datasets:
6
- - lilacai/nikhil_staging-local-glue
7
- - lilacai/nikhil_staging-local-imdb
8
- emoji: 🌷
9
  sdk: docker
10
  title: Lilac
11
- duplicated_from: lilacai/nikhil_staging
12
- ---
 
2
  app_port: 5432
3
  colorFrom: purple
4
  colorTo: purple
5
+ datasets: [nsthorat-lilac/nikhil_no_persistent-local-glue]
6
+ emoji: "\U0001F337"
 
 
7
  sdk: docker
8
  title: Lilac
9
+
10
+ ---
data/.cache/lilac/concept/lilac/negative-sentiment/gte-small.pkl DELETED
Binary file (202 kB)
 
data/.cache/lilac/concept/lilac/non-english/gte-small.pkl DELETED
Binary file (331 kB)
 
data/.cache/lilac/concept/lilac/source-code/gte-small.pkl DELETED
Binary file (126 kB)
 
demo_config.yml DELETED
@@ -1,3 +0,0 @@
1
- lilac_hf_datasets:
2
- - {hf_dataset_repo_id: lilacai/nikhil_staging-local-glue, lilac_name: glue, lilac_namespace: local}
3
- - {hf_dataset_repo_id: lilacai/nikhil_staging-local-imdb, lilac_name: imdb, lilac_namespace: local}
 
 
 
 
docker_start.py CHANGED
@@ -53,10 +53,6 @@ def main() -> None:
53
 
54
  delete_old_files()
55
 
56
- print('readme:', os.path.abspath('README.md'))
57
- with open(os.path.abspath('README.md')) as f:
58
- print(f.read())
59
-
60
  with open(os.path.abspath('README.md')) as f:
61
  # Strip the '---' for the huggingface readme config.
62
  readme = f.read().strip('---')
@@ -74,7 +70,7 @@ def main() -> None:
74
  ignore_patterns=['.gitattributes', 'README.md'])
75
 
76
  snapshot_dir = snapshot_download(repo_id=repo_id, repo_type='space', token=env('HF_ACCESS_TOKEN'))
77
- # # Copy datasets.
78
  spaces_data_dir = os.path.join(snapshot_dir, 'data')
79
 
80
  # Delete cache files from persistent storage.
 
53
 
54
  delete_old_files()
55
 
 
 
 
 
56
  with open(os.path.abspath('README.md')) as f:
57
  # Strip the '---' for the huggingface readme config.
58
  readme = f.read().strip('---')
 
70
  ignore_patterns=['.gitattributes', 'README.md'])
71
 
72
  snapshot_dir = snapshot_download(repo_id=repo_id, repo_type='space', token=env('HF_ACCESS_TOKEN'))
73
+ # Copy datasets.
74
  spaces_data_dir = os.path.join(snapshot_dir, 'data')
75
 
76
  # Delete cache files from persistent storage.
lilac/config.py CHANGED
@@ -252,17 +252,3 @@ def read_config(config_path: str) -> Config:
252
  assert config is not None
253
 
254
  return config
255
-
256
-
257
- class LilacHuggingFaceDataset(BaseModel):
258
- """A huggingface dataset that powers the demo."""
259
- hf_dataset_repo_id: str
260
- lilac_namespace: str
261
- lilac_name: str
262
-
263
-
264
- class DemoConfig(BaseModel):
265
- """Configures a hosted demo."""
266
-
267
- # A list of huggingface dataset repositories that power the demo.
268
- lilac_hf_datasets: list[LilacHuggingFaceDataset] = []
 
252
  assert config is not None
253
 
254
  return config
 
 
 
 
 
 
 
 
 
 
 
 
 
 
lilac/env.py CHANGED
@@ -31,7 +31,7 @@ def _init_env() -> None:
31
  load_dotenv('.env.demo')
32
  load_dotenv('.env')
33
 
34
- if os.environ.get('LILAC_AUTH_ENABLED', None):
35
  if not os.environ.get('GOOGLE_CLIENT_ID', None) or not os.environ.get(
36
  'GOOGLE_CLIENT_SECRET', None):
37
  raise ValueError(
 
31
  load_dotenv('.env.demo')
32
  load_dotenv('.env')
33
 
34
+ if bool(os.environ.get('LILAC_AUTH_ENABLED', None)):
35
  if not os.environ.get('GOOGLE_CLIENT_ID', None) or not os.environ.get(
36
  'GOOGLE_CLIENT_SECRET', None):
37
  raise ValueError(
lilac/web/_app/immutable/assets/0.f5aaacd6.css ADDED
The diff for this file is too large to render. See raw diff
 
lilac/web/_app/immutable/assets/5.cd1a9257.css ADDED
@@ -0,0 +1 @@
 
 
1
+ .dataset-link .bx--btn.bx--btn--primary{display:flex;height:4rem;min-height:0px;flex-direction:row;align-items:center;justify-items:center;padding-top:1.5rem;padding-bottom:1.5rem;font-size:1rem;line-height:1.5rem}
lilac/web/_app/immutable/assets/6.8302e01e.css ADDED
@@ -0,0 +1 @@
 
 
1
+ .new-form .bx--form-item{margin-bottom:1.5rem}.bx--fieldset{border-radius:.25rem;border-width:1px;--tw-border-opacity:1;border-color:rgb(209 213 219 / var(--tw-border-opacity));padding:1rem}legend.bx--label{padding-left:.5rem;padding-right:.5rem;font-size:1.125rem;line-height:1.75rem}
lilac/web/_app/immutable/assets/8.483966d0.css ADDED
@@ -0,0 +1 @@
 
 
1
+ .bx--tab-content{padding:0}
lilac/web/_app/immutable/assets/_layout.32d76eb8.css ADDED
The diff for this file is too large to render. See raw diff
 
lilac/web/_app/immutable/assets/_page.cd1a9257.css ADDED
@@ -0,0 +1 @@
 
 
1
+ .dataset-link .bx--btn.bx--btn--primary{display:flex;height:4rem;min-height:0px;flex-direction:row;align-items:center;justify-items:center;padding-top:1.5rem;padding-bottom:1.5rem;font-size:1rem;line-height:1.5rem}
lilac/web/_app/immutable/chunks/ArrowUpRight.0bb31a07.js ADDED
@@ -0,0 +1 @@
 
 
1
+ import{S as A,i as M,s as E,E as f,Z as h,_,m,h as o,n as R,$ as g,b as z,a0 as p,L as B,a1 as c,N as v,Q as b,q as C,r as k,u as q}from"./index.b7741aa8.js";function w(a){let e,s;return{c(){e=h("title"),s=C(a[1])},l(t){e=_(t,"title",{});var r=m(e);s=k(r,a[1]),r.forEach(o)},m(t,r){z(t,e,r),p(e,s)},p(t,r){r&2&&q(s,t[1])},d(t){t&&o(e)}}}function x(a){let e,s,t=a[1]&&w(a),r=[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},{width:a[0]},{height:a[0]},a[2],a[3]],n={};for(let i=0;i<r.length;i+=1)n=f(n,r[i]);return{c(){e=h("svg"),t&&t.c(),s=h("path"),this.h()},l(i){e=_(i,"svg",{xmlns:!0,viewBox:!0,fill:!0,preserveAspectRatio:!0,width:!0,height:!0});var l=m(e);t&&t.l(l),s=_(l,"path",{d:!0}),m(s).forEach(o),l.forEach(o),this.h()},h(){R(s,"d","M10 6L10 8 22.59 8 6 24.59 7.41 26 24 9.41 24 22 26 22 26 6 10 6z"),g(e,n)},m(i,l){z(i,e,l),t&&t.m(e,null),p(e,s)},p(i,[l]){i[1]?t?t.p(i,l):(t=w(i),t.c(),t.m(e,s)):t&&(t.d(1),t=null),g(e,n=B(r,[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},l&1&&{width:i[0]},l&1&&{height:i[0]},l&4&&i[2],l&8&&i[3]]))},i:c,o:c,d(i){i&&o(e),t&&t.d()}}}function L(a,e,s){let t,r;const n=["size","title"];let i=v(e,n),{size:l=16}=e,{title:d=void 0}=e;return a.$$set=u=>{s(5,e=f(f({},e),b(u))),s(3,i=v(e,n)),"size"in u&&s(0,l=u.size),"title"in u&&s(1,d=u.title)},a.$$.update=()=>{s(4,t=e["aria-label"]||e["aria-labelledby"]||d),s(2,r={"aria-hidden":t?void 0:!0,role:t?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=b(e),[l,d,r,i,t]}class S extends A{constructor(e){super(),M(this,e,L,x,E,{size:0,title:1})}}export{S as A};
lilac/web/_app/immutable/chunks/ArrowUpRight.e306cdcd.js ADDED
@@ -0,0 +1 @@
 
 
1
+ import{S as A,i as M,s as E,E as f,Z as h,_,m,h as o,n as R,$ as g,b as z,a0 as p,L as B,a1 as c,N as v,Q as b,q as C,r as k,u as q}from"./index.b333a928.js";function w(a){let e,s;return{c(){e=h("title"),s=C(a[1])},l(t){e=_(t,"title",{});var r=m(e);s=k(r,a[1]),r.forEach(o)},m(t,r){z(t,e,r),p(e,s)},p(t,r){r&2&&q(s,t[1])},d(t){t&&o(e)}}}function x(a){let e,s,t=a[1]&&w(a),r=[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},{width:a[0]},{height:a[0]},a[2],a[3]],n={};for(let i=0;i<r.length;i+=1)n=f(n,r[i]);return{c(){e=h("svg"),t&&t.c(),s=h("path"),this.h()},l(i){e=_(i,"svg",{xmlns:!0,viewBox:!0,fill:!0,preserveAspectRatio:!0,width:!0,height:!0});var l=m(e);t&&t.l(l),s=_(l,"path",{d:!0}),m(s).forEach(o),l.forEach(o),this.h()},h(){R(s,"d","M10 6L10 8 22.59 8 6 24.59 7.41 26 24 9.41 24 22 26 22 26 6 10 6z"),g(e,n)},m(i,l){z(i,e,l),t&&t.m(e,null),p(e,s)},p(i,[l]){i[1]?t?t.p(i,l):(t=w(i),t.c(),t.m(e,s)):t&&(t.d(1),t=null),g(e,n=B(r,[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},l&1&&{width:i[0]},l&1&&{height:i[0]},l&4&&i[2],l&8&&i[3]]))},i:c,o:c,d(i){i&&o(e),t&&t.d()}}}function L(a,e,s){let t,r;const n=["size","title"];let i=v(e,n),{size:l=16}=e,{title:d=void 0}=e;return a.$$set=u=>{s(5,e=f(f({},e),b(u))),s(3,i=v(e,n)),"size"in u&&s(0,l=u.size),"title"in u&&s(1,d=u.title)},a.$$.update=()=>{s(4,t=e["aria-label"]||e["aria-labelledby"]||d),s(2,r={"aria-hidden":t?void 0:!0,role:t?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=b(e),[l,d,r,i,t]}class S extends A{constructor(e){super(),M(this,e,L,x,E,{size:0,title:1})}}export{S as A};
lilac/web/_app/immutable/chunks/ChevronUp.4e645b65.js ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ import{S as Me,i as ze,s as De,D as Be,E as U,k as N,a as j,l as V,m as T,c as G,h as m,n as b,G as g,F as Te,b as O,a0 as L,H as P,g as v,v as le,d as z,f as te,I as ye,J as Ce,K as Ee,L as Oe,M as sl,N as ie,C as fl,O as ul,j as dl,Q as ne,a8 as cl,y as ue,z as de,A as ce,B as me,q as w,r as p,u as x,R as fe,w as ge,e as Le,a4 as ml,Z as ae,_ as oe,$ as ke,a1 as ve}from"./index.b7741aa8.js";import{aB as bl,aC as je,B as Se}from"./Commands.539ca0ee.js";import{w as hl}from"./index.d3776286.js";function Ae(i,e,l){const t=i.slice();return t[55]=e[l],t}const _l=i=>({}),Fe=i=>({}),gl=i=>({}),He=i=>({});function Pe(i){let e,l,t,a,f;return l=new je({props:{size:20,class:"bx--modal-close__icon","aria-hidden":"true"}}),{c(){e=N("button"),ue(l.$$.fragment),this.h()},l(n){e=V(n,"BUTTON",{type:!0,"aria-label":!0});var o=T(e);de(l.$$.fragment,o),o.forEach(m),this.h()},h(){b(e,"type","button"),b(e,"aria-label",i[8]),g(e,"bx--modal-close",!0)},m(n,o){O(n,e,o),ce(l,e,null),i[37](e),t=!0,a||(f=P(e,"click",i[38]),a=!0)},p(n,o){(!t||o[0]&256)&&b(e,"aria-label",n[8])},i(n){t||(v(l.$$.fragment,n),t=!0)},o(n){z(l.$$.fragment,n),t=!1},d(n){n&&m(e),me(l),i[37](null),a=!1,f()}}}function Re(i){let e,l;const t=i[31].label,a=Be(t,i,i[50],He),f=a||kl(i);return{c(){e=N("h2"),f&&f.c(),this.h()},l(n){e=V(n,"H2",{id:!0});var o=T(e);f&&f.l(o),o.forEach(m),this.h()},h(){b(e,"id",i[25]),g(e,"bx--modal-header__label",!0)},m(n,o){O(n,e,o),f&&f.m(e,null),l=!0},p(n,o){a?a.p&&(!l||o[1]&524288)&&ye(a,t,n,n[50],l?Ee(t,n[50],o,gl):Ce(n[50]),He):f&&f.p&&(!l||o[0]&128)&&f.p(n,l?o:[-1,-1]),(!l||o[0]&33554432)&&b(e,"id",n[25])},i(n){l||(v(f,n),l=!0)},o(n){z(f,n),l=!1},d(n){n&&m(e),f&&f.d(n)}}}function kl(i){let e;return{c(){e=w(i[7])},l(l){e=p(l,i[7])},m(l,t){O(l,e,t)},p(l,t){t[0]&128&&x(e,l[7])},d(l){l&&m(e)}}}function vl(i){let e;return{c(){e=w(i[6])},l(l){e=p(l,i[6])},m(l,t){O(l,e,t)},p(l,t){t[0]&64&&x(e,l[6])},d(l){l&&m(e)}}}function Ne(i){let e,l,t,a,f;return l=new je({props:{size:20,class:"bx--modal-close__icon","aria-hidden":"true"}}),{c(){e=N("button"),ue(l.$$.fragment),this.h()},l(n){e=V(n,"BUTTON",{type:!0,"aria-label":!0});var o=T(e);de(l.$$.fragment,o),o.forEach(m),this.h()},h(){b(e,"type","button"),b(e,"aria-label",i[8]),g(e,"bx--modal-close",!0)},m(n,o){O(n,e,o),ce(l,e,null),i[39](e),t=!0,a||(f=P(e,"click",i[40]),a=!0)},p(n,o){(!t||o[0]&256)&&b(e,"aria-label",n[8])},i(n){t||(v(l.$$.fragment,n),t=!0)},o(n){z(l.$$.fragment,n),t=!1},d(n){n&&m(e),me(l),i[39](null),a=!1,f()}}}function Ve(i){let e;return{c(){e=N("div"),this.h()},l(l){e=V(l,"DIV",{}),T(e).forEach(m),this.h()},h(){g(e,"bx--modal-content--overflow-indicator",!0)},m(l,t){O(l,e,t)},d(l){l&&m(e)}}}function qe(i){let e,l,t,a,f,n;const o=[yl,Bl],u=[];function d(h,k){return h[16].length>0?0:h[15]?1:-1}return~(l=d(i))&&(t=u[l]=o[l](i)),f=new Se({props:{kind:i[3]?"danger":"primary",disabled:i[12],icon:i[13],$$slots:{default:[Ml]},$$scope:{ctx:i}}}),f.$on("click",i[43]),{c(){e=N("div"),t&&t.c(),a=j(),ue(f.$$.fragment),this.h()},l(h){e=V(h,"DIV",{});var k=T(e);t&&t.l(k),a=G(k),de(f.$$.fragment,k),k.forEach(m),this.h()},h(){g(e,"bx--modal-footer",!0),g(e,"bx--modal-footer--three-button",i[16].length===2)},m(h,k){O(h,e,k),~l&&u[l].m(e,null),L(e,a),ce(f,e,null),n=!0},p(h,k){let H=l;l=d(h),l===H?~l&&u[l].p(h,k):(t&&(le(),z(u[H],1,1,()=>{u[H]=null}),te()),~l?(t=u[l],t?t.p(h,k):(t=u[l]=o[l](h),t.c()),v(t,1),t.m(e,a)):t=null);const C={};k[0]&8&&(C.kind=h[3]?"danger":"primary"),k[0]&4096&&(C.disabled=h[12]),k[0]&8192&&(C.icon=h[13]),k[0]&2048|k[1]&524288&&(C.$$scope={dirty:k,ctx:h}),f.$set(C),(!n||k[0]&65536)&&g(e,"bx--modal-footer--three-button",h[16].length===2)},i(h){n||(v(t),v(f.$$.fragment,h),n=!0)},o(h){z(t),z(f.$$.fragment,h),n=!1},d(h){h&&m(e),~l&&u[l].d(),me(f)}}}function Bl(i){let e,l;return e=new Se({props:{kind:"secondary",$$slots:{default:[Cl]},$$scope:{ctx:i}}}),e.$on("click",i[42]),{c(){ue(e.$$.fragment)},l(t){de(e.$$.fragment,t)},m(t,a){ce(e,t,a),l=!0},p(t,a){const f={};a[0]&32768|a[1]&524288&&(f.$$scope={dirty:a,ctx:t}),e.$set(f)},i(t){l||(v(e.$$.fragment,t),l=!0)},o(t){z(e.$$.fragment,t),l=!1},d(t){me(e,t)}}}function yl(i){let e,l,t=i[16],a=[];for(let n=0;n<t.length;n+=1)a[n]=Ue(Ae(i,t,n));const f=n=>z(a[n],1,1,()=>{a[n]=null});return{c(){for(let n=0;n<a.length;n+=1)a[n].c();e=Le()},l(n){for(let o=0;o<a.length;o+=1)a[o].l(n);e=Le()},m(n,o){for(let u=0;u<a.length;u+=1)a[u]&&a[u].m(n,o);O(n,e,o),l=!0},p(n,o){if(o[0]&67174400){t=n[16];let u;for(u=0;u<t.length;u+=1){const d=Ae(n,t,u);a[u]?(a[u].p(d,o),v(a[u],1)):(a[u]=Ue(d),a[u].c(),v(a[u],1),a[u].m(e.parentNode,e))}for(le(),u=t.length;u<a.length;u+=1)f(u);te()}},i(n){if(!l){for(let o=0;o<t.length;o+=1)v(a[o]);l=!0}},o(n){a=a.filter(Boolean);for(let o=0;o<a.length;o+=1)z(a[o]);l=!1},d(n){ml(a,n),n&&m(e)}}}function Cl(i){let e;return{c(){e=w(i[15])},l(l){e=p(l,i[15])},m(l,t){O(l,e,t)},p(l,t){t[0]&32768&&x(e,l[15])},d(l){l&&m(e)}}}function El(i){let e=i[55].text+"",l,t;return{c(){l=w(e),t=j()},l(a){l=p(a,e),t=G(a)},m(a,f){O(a,l,f),O(a,t,f)},p(a,f){f[0]&65536&&e!==(e=a[55].text+"")&&x(l,e)},d(a){a&&m(l),a&&m(t)}}}function Ue(i){let e,l;function t(){return i[41](i[55])}return e=new Se({props:{kind:"secondary",$$slots:{default:[El]},$$scope:{ctx:i}}}),e.$on("click",t),{c(){ue(e.$$.fragment)},l(a){de(e.$$.fragment,a)},m(a,f){ce(e,a,f),l=!0},p(a,f){i=a;const n={};f[0]&65536|f[1]&524288&&(n.$$scope={dirty:f,ctx:i}),e.$set(n)},i(a){l||(v(e.$$.fragment,a),l=!0)},o(a){z(e.$$.fragment,a),l=!1},d(a){me(e,a)}}}function Ml(i){let e;return{c(){e=w(i[11])},l(l){e=p(l,i[11])},m(l,t){O(l,e,t)},p(l,t){t[0]&2048&&x(e,l[11])},d(l){l&&m(e)}}}function zl(i){let e,l,t,a,f,n,o,u,d,h,k,H,C,$,J,Q,Y,_,Z,re,E=i[5]&&Pe(i),M=i[7]&&Re(i);const ee=i[31].heading,K=Be(ee,i,i[50],Fe),S=K||vl(i);let B=!i[5]&&Ne(i);const W=i[31].default,I=Be(W,i,i[50],null);let D=i[10]&&Ve(),y=!i[5]&&qe(i),q=[{role:"presentation"},{id:i[18]},i[28]],R={};for(let s=0;s<q.length;s+=1)R=U(R,q[s]);return{c(){e=N("div"),l=N("div"),t=N("div"),E&&E.c(),a=j(),M&&M.c(),f=j(),n=N("h3"),S&&S.c(),o=j(),B&&B.c(),u=j(),d=N("div"),I&&I.c(),$=j(),D&&D.c(),J=j(),y&&y.c(),this.h()},l(s){e=V(s,"DIV",{role:!0,id:!0});var c=T(e);l=V(c,"DIV",{tabindex:!0,role:!0,"aria-describedby":!0,"aria-modal":!0,"aria-label":!0});var A=T(l);t=V(A,"DIV",{});var F=T(t);E&&E.l(F),a=G(F),M&&M.l(F),f=G(F),n=V(F,"H3",{id:!0});var X=T(n);S&&S.l(X),X.forEach(m),o=G(F),B&&B.l(F),F.forEach(m),u=G(A),d=V(A,"DIV",{id:!0,tabindex:!0,role:!0,"aria-label":!0,"aria-labelledby":!0});var be=T(d);I&&I.l(be),be.forEach(m),$=G(A),D&&D.l(A),J=G(A),y&&y.l(A),A.forEach(m),c.forEach(m),this.h()},h(){b(n,"id",i[24]),g(n,"bx--modal-header__heading",!0),g(t,"bx--modal-header",!0),b(d,"id",i[23]),b(d,"tabindex",h=i[10]?"0":void 0),b(d,"role",k=i[10]?"region":void 0),b(d,"aria-label",H=i[10]?i[22]:void 0),b(d,"aria-labelledby",C=i[7]?i[25]:i[24]),g(d,"bx--modal-content",!0),g(d,"bx--modal-content--with-form",i[9]),g(d,"bx--modal-scroll-content",i[10]),b(l,"tabindex","-1"),b(l,"role",Q=i[4]?i[5]?"alert":"alertdialog":"dialog"),b(l,"aria-describedby",Y=i[4]&&!i[5]?i[23]:void 0),b(l,"aria-modal","true"),b(l,"aria-label",i[22]),g(l,"bx--modal-container",!0),g(l,"bx--modal-container--xs",i[2]==="xs"),g(l,"bx--modal-container--sm",i[2]==="sm"),g(l,"bx--modal-container--lg",i[2]==="lg"),Te(e,R),g(e,"bx--modal",!0),g(e,"bx--modal-tall",!i[5]),g(e,"is-visible",i[0]),g(e,"bx--modal--danger",i[3])},m(s,c){O(s,e,c),L(e,l),L(l,t),E&&E.m(t,null),L(t,a),M&&M.m(t,null),L(t,f),L(t,n),S&&S.m(n,null),L(t,o),B&&B.m(t,null),L(l,u),L(l,d),I&&I.m(d,null),L(l,$),D&&D.m(l,null),L(l,J),y&&y.m(l,null),i[44](l),i[46](e),_=!0,Z||(re=[P(l,"click",i[45]),P(e,"keydown",i[32]),P(e,"keydown",i[47]),P(e,"click",i[33]),P(e,"click",i[48]),P(e,"mouseover",i[34]),P(e,"mouseenter",i[35]),P(e,"mouseleave",i[36]),P(e,"transitionend",i[49])],Z=!0)},p(s,c){s[5]?E?(E.p(s,c),c[0]&32&&v(E,1)):(E=Pe(s),E.c(),v(E,1),E.m(t,a)):E&&(le(),z(E,1,1,()=>{E=null}),te()),s[7]?M?(M.p(s,c),c[0]&128&&v(M,1)):(M=Re(s),M.c(),v(M,1),M.m(t,f)):M&&(le(),z(M,1,1,()=>{M=null}),te()),K?K.p&&(!_||c[1]&524288)&&ye(K,ee,s,s[50],_?Ee(ee,s[50],c,_l):Ce(s[50]),Fe):S&&S.p&&(!_||c[0]&64)&&S.p(s,_?c:[-1,-1]),(!_||c[0]&16777216)&&b(n,"id",s[24]),s[5]?B&&(le(),z(B,1,1,()=>{B=null}),te()):B?(B.p(s,c),c[0]&32&&v(B,1)):(B=Ne(s),B.c(),v(B,1),B.m(t,null)),I&&I.p&&(!_||c[1]&524288)&&ye(I,W,s,s[50],_?Ee(W,s[50],c,null):Ce(s[50]),null),(!_||c[0]&8388608)&&b(d,"id",s[23]),(!_||c[0]&1024&&h!==(h=s[10]?"0":void 0))&&b(d,"tabindex",h),(!_||c[0]&1024&&k!==(k=s[10]?"region":void 0))&&b(d,"role",k),(!_||c[0]&4195328&&H!==(H=s[10]?s[22]:void 0))&&b(d,"aria-label",H),(!_||c[0]&50331776&&C!==(C=s[7]?s[25]:s[24]))&&b(d,"aria-labelledby",C),(!_||c[0]&512)&&g(d,"bx--modal-content--with-form",s[9]),(!_||c[0]&1024)&&g(d,"bx--modal-scroll-content",s[10]),s[10]?D||(D=Ve(),D.c(),D.m(l,J)):D&&(D.d(1),D=null),s[5]?y&&(le(),z(y,1,1,()=>{y=null}),te()):y?(y.p(s,c),c[0]&32&&v(y,1)):(y=qe(s),y.c(),v(y,1),y.m(l,null)),(!_||c[0]&48&&Q!==(Q=s[4]?s[5]?"alert":"alertdialog":"dialog"))&&b(l,"role",Q),(!_||c[0]&8388656&&Y!==(Y=s[4]&&!s[5]?s[23]:void 0))&&b(l,"aria-describedby",Y),(!_||c[0]&4194304)&&b(l,"aria-label",s[22]),(!_||c[0]&4)&&g(l,"bx--modal-container--xs",s[2]==="xs"),(!_||c[0]&4)&&g(l,"bx--modal-container--sm",s[2]==="sm"),(!_||c[0]&4)&&g(l,"bx--modal-container--lg",s[2]==="lg"),Te(e,R=Oe(q,[{role:"presentation"},(!_||c[0]&262144)&&{id:s[18]},c[0]&268435456&&s[28]])),g(e,"bx--modal",!0),g(e,"bx--modal-tall",!s[5]),g(e,"is-visible",s[0]),g(e,"bx--modal--danger",s[3])},i(s){_||(v(E),v(M),v(S,s),v(B),v(I,s),v(y),_=!0)},o(s){z(E),z(M),z(S,s),z(B),z(I,s),z(y),_=!1},d(s){s&&m(e),E&&E.d(),M&&M.d(),S&&S.d(s),B&&B.d(),I&&I.d(s),D&&D.d(),y&&y.d(),i[44](null),i[46](null),Z=!1,sl(re)}}}function Dl(i,e,l){let t,a,f,n;const o=["size","open","danger","alert","passiveModal","modalHeading","modalLabel","modalAriaLabel","iconDescription","hasForm","hasScrollingContent","primaryButtonText","primaryButtonDisabled","primaryButtonIcon","shouldSubmitOnEnter","secondaryButtonText","secondaryButtons","selectorPrimaryFocus","preventCloseOnClickOutside","id","ref"];let u=ie(e,o),d,{$$slots:h={},$$scope:k}=e,{size:H=void 0}=e,{open:C=!1}=e,{danger:$=!1}=e,{alert:J=!1}=e,{passiveModal:Q=!1}=e,{modalHeading:Y=void 0}=e,{modalLabel:_=void 0}=e,{modalAriaLabel:Z=void 0}=e,{iconDescription:re="Close the modal"}=e,{hasForm:E=!1}=e,{hasScrollingContent:M=!1}=e,{primaryButtonText:ee=""}=e,{primaryButtonDisabled:K=!1}=e,{primaryButtonIcon:S=void 0}=e,{shouldSubmitOnEnter:B=!0}=e,{secondaryButtonText:W=""}=e,{secondaryButtons:I=[]}=e,{selectorPrimaryFocus:D="[data-modal-primary-focus]"}=e,{preventCloseOnClickOutside:y=!1}=e,{id:q="ccs-"+Math.random().toString(36)}=e,{ref:R=null}=e;const s=fl();let c=null,A=null,F=!1,X=!1;function be(r){((r||A).querySelector(D)||c).focus()}const he=hl(C);ul(i,he,r=>l(52,d=r)),bl(he),dl(()=>{F?C||(F=!1,s("close")):C&&(F=!0,be(),s("open"))});function Ge(r){fe.call(this,i,r)}function Je(r){fe.call(this,i,r)}function Qe(r){fe.call(this,i,r)}function Ze(r){fe.call(this,i,r)}function We(r){fe.call(this,i,r)}function Xe(r){ge[r?"unshift":"push"](()=>{c=r,l(19,c)})}const we=()=>{l(0,C=!1)};function pe(r){ge[r?"unshift":"push"](()=>{c=r,l(19,c)})}const xe=()=>{l(0,C=!1)},$e=r=>{s("click:button--secondary",{text:r.text})},el=()=>{s("click:button--secondary",{text:W})},ll=()=>{s("submit"),s("click:button--primary")};function tl(r){ge[r?"unshift":"push"](()=>{A=r,l(20,A)})}const il=()=>{l(21,X=!0)};function nl(r){ge[r?"unshift":"push"](()=>{R=r,l(1,R)})}const al=r=>{if(C)if(r.key==="Escape")l(0,C=!1);else if(r.key==="Tab"){const Ie=`
2
+ a[href], area[href], input:not([disabled]):not([tabindex='-1']),
3
+ button:not([disabled]):not([tabindex='-1']),select:not([disabled]):not([tabindex='-1']),
4
+ textarea:not([disabled]):not([tabindex='-1']),
5
+ iframe, object, embed, *[tabindex]:not([tabindex='-1']):not([disabled]), *[contenteditable=true]
6
+ `,_e=Array.from(R.querySelectorAll(Ie));let se=_e.indexOf(document.activeElement);se===-1&&r.shiftKey&&(se=0),se+=_e.length+(r.shiftKey?-1:1),se%=_e.length,_e[se].focus(),r.preventDefault()}else B&&r.key==="Enter"&&!K&&(s("submit"),s("click:button--primary"))},ol=()=>{!X&&!y&&l(0,C=!1),l(21,X=!1)},rl=r=>{r.propertyName==="transform"&&s("transitionend",{open:C})};return i.$$set=r=>{l(54,e=U(U({},e),ne(r))),l(28,u=ie(e,o)),"size"in r&&l(2,H=r.size),"open"in r&&l(0,C=r.open),"danger"in r&&l(3,$=r.danger),"alert"in r&&l(4,J=r.alert),"passiveModal"in r&&l(5,Q=r.passiveModal),"modalHeading"in r&&l(6,Y=r.modalHeading),"modalLabel"in r&&l(7,_=r.modalLabel),"modalAriaLabel"in r&&l(29,Z=r.modalAriaLabel),"iconDescription"in r&&l(8,re=r.iconDescription),"hasForm"in r&&l(9,E=r.hasForm),"hasScrollingContent"in r&&l(10,M=r.hasScrollingContent),"primaryButtonText"in r&&l(11,ee=r.primaryButtonText),"primaryButtonDisabled"in r&&l(12,K=r.primaryButtonDisabled),"primaryButtonIcon"in r&&l(13,S=r.primaryButtonIcon),"shouldSubmitOnEnter"in r&&l(14,B=r.shouldSubmitOnEnter),"secondaryButtonText"in r&&l(15,W=r.secondaryButtonText),"secondaryButtons"in r&&l(16,I=r.secondaryButtons),"selectorPrimaryFocus"in r&&l(30,D=r.selectorPrimaryFocus),"preventCloseOnClickOutside"in r&&l(17,y=r.preventCloseOnClickOutside),"id"in r&&l(18,q=r.id),"ref"in r&&l(1,R=r.ref),"$$scope"in r&&l(50,k=r.$$scope)},i.$$.update=()=>{i.$$.dirty[0]&1&&cl(he,d=C,d),i.$$.dirty[0]&262144&&l(25,t=`bx--modal-header__label--modal-${q}`),i.$$.dirty[0]&262144&&l(24,a=`bx--modal-header__heading--modal-${q}`),i.$$.dirty[0]&262144&&l(23,f=`bx--modal-body--${q}`),l(22,n=_||e["aria-label"]||Z||Y)},e=ne(e),[C,R,H,$,J,Q,Y,_,re,E,M,ee,K,S,B,W,I,y,q,c,A,X,n,f,a,t,s,he,u,Z,D,h,Ge,Je,Qe,Ze,We,Xe,we,pe,xe,$e,el,ll,tl,il,nl,al,ol,rl,k]}class Ol extends Me{constructor(e){super(),ze(this,e,Dl,zl,De,{size:2,open:0,danger:3,alert:4,passiveModal:5,modalHeading:6,modalLabel:7,modalAriaLabel:29,iconDescription:8,hasForm:9,hasScrollingContent:10,primaryButtonText:11,primaryButtonDisabled:12,primaryButtonIcon:13,shouldSubmitOnEnter:14,secondaryButtonText:15,secondaryButtons:16,selectorPrimaryFocus:30,preventCloseOnClickOutside:17,id:18,ref:1},null,[-1,-1])}}const Pl=Ol;function Ye(i){let e,l;return{c(){e=ae("title"),l=w(i[1])},l(t){e=oe(t,"title",{});var a=T(e);l=p(a,i[1]),a.forEach(m)},m(t,a){O(t,e,a),L(e,l)},p(t,a){a&2&&x(l,t[1])},d(t){t&&m(e)}}}function Sl(i){let e,l,t=i[1]&&Ye(i),a=[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},{width:i[0]},{height:i[0]},i[2],i[3]],f={};for(let n=0;n<a.length;n+=1)f=U(f,a[n]);return{c(){e=ae("svg"),t&&t.c(),l=ae("path"),this.h()},l(n){e=oe(n,"svg",{xmlns:!0,viewBox:!0,fill:!0,preserveAspectRatio:!0,width:!0,height:!0});var o=T(e);t&&t.l(o),l=oe(o,"path",{d:!0}),T(l).forEach(m),o.forEach(m),this.h()},h(){b(l,"d","M16 22L6 12 7.4 10.6 16 19.2 24.6 10.6 26 12z"),ke(e,f)},m(n,o){O(n,e,o),t&&t.m(e,null),L(e,l)},p(n,[o]){n[1]?t?t.p(n,o):(t=Ye(n),t.c(),t.m(e,l)):t&&(t.d(1),t=null),ke(e,f=Oe(a,[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},o&1&&{width:n[0]},o&1&&{height:n[0]},o&4&&n[2],o&8&&n[3]]))},i:ve,o:ve,d(n){n&&m(e),t&&t.d()}}}function Il(i,e,l){let t,a;const f=["size","title"];let n=ie(e,f),{size:o=16}=e,{title:u=void 0}=e;return i.$$set=d=>{l(5,e=U(U({},e),ne(d))),l(3,n=ie(e,f)),"size"in d&&l(0,o=d.size),"title"in d&&l(1,u=d.title)},i.$$.update=()=>{l(4,t=e["aria-label"]||e["aria-labelledby"]||u),l(2,a={"aria-hidden":t?void 0:!0,role:t?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=ne(e),[o,u,a,n,t]}class Rl extends Me{constructor(e){super(),ze(this,e,Il,Sl,De,{size:0,title:1})}}function Ke(i){let e,l;return{c(){e=ae("title"),l=w(i[1])},l(t){e=oe(t,"title",{});var a=T(e);l=p(a,i[1]),a.forEach(m)},m(t,a){O(t,e,a),L(e,l)},p(t,a){a&2&&x(l,t[1])},d(t){t&&m(e)}}}function Tl(i){let e,l,t=i[1]&&Ke(i),a=[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},{width:i[0]},{height:i[0]},i[2],i[3]],f={};for(let n=0;n<a.length;n+=1)f=U(f,a[n]);return{c(){e=ae("svg"),t&&t.c(),l=ae("path"),this.h()},l(n){e=oe(n,"svg",{xmlns:!0,viewBox:!0,fill:!0,preserveAspectRatio:!0,width:!0,height:!0});var o=T(e);t&&t.l(o),l=oe(o,"path",{d:!0}),T(l).forEach(m),o.forEach(m),this.h()},h(){b(l,"d","M16 10L26 20 24.6 21.4 16 12.8 7.4 21.4 6 20z"),ke(e,f)},m(n,o){O(n,e,o),t&&t.m(e,null),L(e,l)},p(n,[o]){n[1]?t?t.p(n,o):(t=Ke(n),t.c(),t.m(e,l)):t&&(t.d(1),t=null),ke(e,f=Oe(a,[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},o&1&&{width:n[0]},o&1&&{height:n[0]},o&4&&n[2],o&8&&n[3]]))},i:ve,o:ve,d(n){n&&m(e),t&&t.d()}}}function Ll(i,e,l){let t,a;const f=["size","title"];let n=ie(e,f),{size:o=16}=e,{title:u=void 0}=e;return i.$$set=d=>{l(5,e=U(U({},e),ne(d))),l(3,n=ie(e,f)),"size"in d&&l(0,o=d.size),"title"in d&&l(1,u=d.title)},i.$$.update=()=>{l(4,t=e["aria-label"]||e["aria-labelledby"]||u),l(2,a={"aria-hidden":t?void 0:!0,role:t?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=ne(e),[o,u,a,n,t]}class Nl extends Me{constructor(e){super(),ze(this,e,Ll,Tl,De,{size:0,title:1})}}export{Rl as C,Pl as M,Nl as a};
lilac/web/_app/immutable/chunks/ChevronUp.95b74f6d.js ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ import{S as Me,i as ze,s as De,D as Be,E as U,k as N,a as j,l as V,m as T,c as G,h as m,n as b,G as g,F as Te,b as O,a0 as L,H as P,g as v,v as le,d as z,f as te,I as ye,J as Ce,K as Ee,L as Oe,M as sl,N as ie,C as fl,O as ul,j as dl,Q as ne,a8 as cl,y as ue,z as de,A as ce,B as me,q as w,r as p,u as x,R as fe,w as ge,e as Le,a4 as ml,Z as ae,_ as oe,$ as ke,a1 as ve}from"./index.b333a928.js";import{aB as bl,aC as je,B as Se}from"./Commands.1fffdf33.js";import{w as hl}from"./index.2b0dd2f8.js";function Ae(i,e,l){const t=i.slice();return t[55]=e[l],t}const _l=i=>({}),Fe=i=>({}),gl=i=>({}),He=i=>({});function Pe(i){let e,l,t,a,f;return l=new je({props:{size:20,class:"bx--modal-close__icon","aria-hidden":"true"}}),{c(){e=N("button"),ue(l.$$.fragment),this.h()},l(n){e=V(n,"BUTTON",{type:!0,"aria-label":!0});var o=T(e);de(l.$$.fragment,o),o.forEach(m),this.h()},h(){b(e,"type","button"),b(e,"aria-label",i[8]),g(e,"bx--modal-close",!0)},m(n,o){O(n,e,o),ce(l,e,null),i[37](e),t=!0,a||(f=P(e,"click",i[38]),a=!0)},p(n,o){(!t||o[0]&256)&&b(e,"aria-label",n[8])},i(n){t||(v(l.$$.fragment,n),t=!0)},o(n){z(l.$$.fragment,n),t=!1},d(n){n&&m(e),me(l),i[37](null),a=!1,f()}}}function Re(i){let e,l;const t=i[31].label,a=Be(t,i,i[50],He),f=a||kl(i);return{c(){e=N("h2"),f&&f.c(),this.h()},l(n){e=V(n,"H2",{id:!0});var o=T(e);f&&f.l(o),o.forEach(m),this.h()},h(){b(e,"id",i[25]),g(e,"bx--modal-header__label",!0)},m(n,o){O(n,e,o),f&&f.m(e,null),l=!0},p(n,o){a?a.p&&(!l||o[1]&524288)&&ye(a,t,n,n[50],l?Ee(t,n[50],o,gl):Ce(n[50]),He):f&&f.p&&(!l||o[0]&128)&&f.p(n,l?o:[-1,-1]),(!l||o[0]&33554432)&&b(e,"id",n[25])},i(n){l||(v(f,n),l=!0)},o(n){z(f,n),l=!1},d(n){n&&m(e),f&&f.d(n)}}}function kl(i){let e;return{c(){e=w(i[7])},l(l){e=p(l,i[7])},m(l,t){O(l,e,t)},p(l,t){t[0]&128&&x(e,l[7])},d(l){l&&m(e)}}}function vl(i){let e;return{c(){e=w(i[6])},l(l){e=p(l,i[6])},m(l,t){O(l,e,t)},p(l,t){t[0]&64&&x(e,l[6])},d(l){l&&m(e)}}}function Ne(i){let e,l,t,a,f;return l=new je({props:{size:20,class:"bx--modal-close__icon","aria-hidden":"true"}}),{c(){e=N("button"),ue(l.$$.fragment),this.h()},l(n){e=V(n,"BUTTON",{type:!0,"aria-label":!0});var o=T(e);de(l.$$.fragment,o),o.forEach(m),this.h()},h(){b(e,"type","button"),b(e,"aria-label",i[8]),g(e,"bx--modal-close",!0)},m(n,o){O(n,e,o),ce(l,e,null),i[39](e),t=!0,a||(f=P(e,"click",i[40]),a=!0)},p(n,o){(!t||o[0]&256)&&b(e,"aria-label",n[8])},i(n){t||(v(l.$$.fragment,n),t=!0)},o(n){z(l.$$.fragment,n),t=!1},d(n){n&&m(e),me(l),i[39](null),a=!1,f()}}}function Ve(i){let e;return{c(){e=N("div"),this.h()},l(l){e=V(l,"DIV",{}),T(e).forEach(m),this.h()},h(){g(e,"bx--modal-content--overflow-indicator",!0)},m(l,t){O(l,e,t)},d(l){l&&m(e)}}}function qe(i){let e,l,t,a,f,n;const o=[yl,Bl],u=[];function d(h,k){return h[16].length>0?0:h[15]?1:-1}return~(l=d(i))&&(t=u[l]=o[l](i)),f=new Se({props:{kind:i[3]?"danger":"primary",disabled:i[12],icon:i[13],$$slots:{default:[Ml]},$$scope:{ctx:i}}}),f.$on("click",i[43]),{c(){e=N("div"),t&&t.c(),a=j(),ue(f.$$.fragment),this.h()},l(h){e=V(h,"DIV",{});var k=T(e);t&&t.l(k),a=G(k),de(f.$$.fragment,k),k.forEach(m),this.h()},h(){g(e,"bx--modal-footer",!0),g(e,"bx--modal-footer--three-button",i[16].length===2)},m(h,k){O(h,e,k),~l&&u[l].m(e,null),L(e,a),ce(f,e,null),n=!0},p(h,k){let H=l;l=d(h),l===H?~l&&u[l].p(h,k):(t&&(le(),z(u[H],1,1,()=>{u[H]=null}),te()),~l?(t=u[l],t?t.p(h,k):(t=u[l]=o[l](h),t.c()),v(t,1),t.m(e,a)):t=null);const C={};k[0]&8&&(C.kind=h[3]?"danger":"primary"),k[0]&4096&&(C.disabled=h[12]),k[0]&8192&&(C.icon=h[13]),k[0]&2048|k[1]&524288&&(C.$$scope={dirty:k,ctx:h}),f.$set(C),(!n||k[0]&65536)&&g(e,"bx--modal-footer--three-button",h[16].length===2)},i(h){n||(v(t),v(f.$$.fragment,h),n=!0)},o(h){z(t),z(f.$$.fragment,h),n=!1},d(h){h&&m(e),~l&&u[l].d(),me(f)}}}function Bl(i){let e,l;return e=new Se({props:{kind:"secondary",$$slots:{default:[Cl]},$$scope:{ctx:i}}}),e.$on("click",i[42]),{c(){ue(e.$$.fragment)},l(t){de(e.$$.fragment,t)},m(t,a){ce(e,t,a),l=!0},p(t,a){const f={};a[0]&32768|a[1]&524288&&(f.$$scope={dirty:a,ctx:t}),e.$set(f)},i(t){l||(v(e.$$.fragment,t),l=!0)},o(t){z(e.$$.fragment,t),l=!1},d(t){me(e,t)}}}function yl(i){let e,l,t=i[16],a=[];for(let n=0;n<t.length;n+=1)a[n]=Ue(Ae(i,t,n));const f=n=>z(a[n],1,1,()=>{a[n]=null});return{c(){for(let n=0;n<a.length;n+=1)a[n].c();e=Le()},l(n){for(let o=0;o<a.length;o+=1)a[o].l(n);e=Le()},m(n,o){for(let u=0;u<a.length;u+=1)a[u]&&a[u].m(n,o);O(n,e,o),l=!0},p(n,o){if(o[0]&67174400){t=n[16];let u;for(u=0;u<t.length;u+=1){const d=Ae(n,t,u);a[u]?(a[u].p(d,o),v(a[u],1)):(a[u]=Ue(d),a[u].c(),v(a[u],1),a[u].m(e.parentNode,e))}for(le(),u=t.length;u<a.length;u+=1)f(u);te()}},i(n){if(!l){for(let o=0;o<t.length;o+=1)v(a[o]);l=!0}},o(n){a=a.filter(Boolean);for(let o=0;o<a.length;o+=1)z(a[o]);l=!1},d(n){ml(a,n),n&&m(e)}}}function Cl(i){let e;return{c(){e=w(i[15])},l(l){e=p(l,i[15])},m(l,t){O(l,e,t)},p(l,t){t[0]&32768&&x(e,l[15])},d(l){l&&m(e)}}}function El(i){let e=i[55].text+"",l,t;return{c(){l=w(e),t=j()},l(a){l=p(a,e),t=G(a)},m(a,f){O(a,l,f),O(a,t,f)},p(a,f){f[0]&65536&&e!==(e=a[55].text+"")&&x(l,e)},d(a){a&&m(l),a&&m(t)}}}function Ue(i){let e,l;function t(){return i[41](i[55])}return e=new Se({props:{kind:"secondary",$$slots:{default:[El]},$$scope:{ctx:i}}}),e.$on("click",t),{c(){ue(e.$$.fragment)},l(a){de(e.$$.fragment,a)},m(a,f){ce(e,a,f),l=!0},p(a,f){i=a;const n={};f[0]&65536|f[1]&524288&&(n.$$scope={dirty:f,ctx:i}),e.$set(n)},i(a){l||(v(e.$$.fragment,a),l=!0)},o(a){z(e.$$.fragment,a),l=!1},d(a){me(e,a)}}}function Ml(i){let e;return{c(){e=w(i[11])},l(l){e=p(l,i[11])},m(l,t){O(l,e,t)},p(l,t){t[0]&2048&&x(e,l[11])},d(l){l&&m(e)}}}function zl(i){let e,l,t,a,f,n,o,u,d,h,k,H,C,$,J,Q,Y,_,Z,re,E=i[5]&&Pe(i),M=i[7]&&Re(i);const ee=i[31].heading,K=Be(ee,i,i[50],Fe),S=K||vl(i);let B=!i[5]&&Ne(i);const W=i[31].default,I=Be(W,i,i[50],null);let D=i[10]&&Ve(),y=!i[5]&&qe(i),q=[{role:"presentation"},{id:i[18]},i[28]],R={};for(let s=0;s<q.length;s+=1)R=U(R,q[s]);return{c(){e=N("div"),l=N("div"),t=N("div"),E&&E.c(),a=j(),M&&M.c(),f=j(),n=N("h3"),S&&S.c(),o=j(),B&&B.c(),u=j(),d=N("div"),I&&I.c(),$=j(),D&&D.c(),J=j(),y&&y.c(),this.h()},l(s){e=V(s,"DIV",{role:!0,id:!0});var c=T(e);l=V(c,"DIV",{tabindex:!0,role:!0,"aria-describedby":!0,"aria-modal":!0,"aria-label":!0});var A=T(l);t=V(A,"DIV",{});var F=T(t);E&&E.l(F),a=G(F),M&&M.l(F),f=G(F),n=V(F,"H3",{id:!0});var X=T(n);S&&S.l(X),X.forEach(m),o=G(F),B&&B.l(F),F.forEach(m),u=G(A),d=V(A,"DIV",{id:!0,tabindex:!0,role:!0,"aria-label":!0,"aria-labelledby":!0});var be=T(d);I&&I.l(be),be.forEach(m),$=G(A),D&&D.l(A),J=G(A),y&&y.l(A),A.forEach(m),c.forEach(m),this.h()},h(){b(n,"id",i[24]),g(n,"bx--modal-header__heading",!0),g(t,"bx--modal-header",!0),b(d,"id",i[23]),b(d,"tabindex",h=i[10]?"0":void 0),b(d,"role",k=i[10]?"region":void 0),b(d,"aria-label",H=i[10]?i[22]:void 0),b(d,"aria-labelledby",C=i[7]?i[25]:i[24]),g(d,"bx--modal-content",!0),g(d,"bx--modal-content--with-form",i[9]),g(d,"bx--modal-scroll-content",i[10]),b(l,"tabindex","-1"),b(l,"role",Q=i[4]?i[5]?"alert":"alertdialog":"dialog"),b(l,"aria-describedby",Y=i[4]&&!i[5]?i[23]:void 0),b(l,"aria-modal","true"),b(l,"aria-label",i[22]),g(l,"bx--modal-container",!0),g(l,"bx--modal-container--xs",i[2]==="xs"),g(l,"bx--modal-container--sm",i[2]==="sm"),g(l,"bx--modal-container--lg",i[2]==="lg"),Te(e,R),g(e,"bx--modal",!0),g(e,"bx--modal-tall",!i[5]),g(e,"is-visible",i[0]),g(e,"bx--modal--danger",i[3])},m(s,c){O(s,e,c),L(e,l),L(l,t),E&&E.m(t,null),L(t,a),M&&M.m(t,null),L(t,f),L(t,n),S&&S.m(n,null),L(t,o),B&&B.m(t,null),L(l,u),L(l,d),I&&I.m(d,null),L(l,$),D&&D.m(l,null),L(l,J),y&&y.m(l,null),i[44](l),i[46](e),_=!0,Z||(re=[P(l,"click",i[45]),P(e,"keydown",i[32]),P(e,"keydown",i[47]),P(e,"click",i[33]),P(e,"click",i[48]),P(e,"mouseover",i[34]),P(e,"mouseenter",i[35]),P(e,"mouseleave",i[36]),P(e,"transitionend",i[49])],Z=!0)},p(s,c){s[5]?E?(E.p(s,c),c[0]&32&&v(E,1)):(E=Pe(s),E.c(),v(E,1),E.m(t,a)):E&&(le(),z(E,1,1,()=>{E=null}),te()),s[7]?M?(M.p(s,c),c[0]&128&&v(M,1)):(M=Re(s),M.c(),v(M,1),M.m(t,f)):M&&(le(),z(M,1,1,()=>{M=null}),te()),K?K.p&&(!_||c[1]&524288)&&ye(K,ee,s,s[50],_?Ee(ee,s[50],c,_l):Ce(s[50]),Fe):S&&S.p&&(!_||c[0]&64)&&S.p(s,_?c:[-1,-1]),(!_||c[0]&16777216)&&b(n,"id",s[24]),s[5]?B&&(le(),z(B,1,1,()=>{B=null}),te()):B?(B.p(s,c),c[0]&32&&v(B,1)):(B=Ne(s),B.c(),v(B,1),B.m(t,null)),I&&I.p&&(!_||c[1]&524288)&&ye(I,W,s,s[50],_?Ee(W,s[50],c,null):Ce(s[50]),null),(!_||c[0]&8388608)&&b(d,"id",s[23]),(!_||c[0]&1024&&h!==(h=s[10]?"0":void 0))&&b(d,"tabindex",h),(!_||c[0]&1024&&k!==(k=s[10]?"region":void 0))&&b(d,"role",k),(!_||c[0]&4195328&&H!==(H=s[10]?s[22]:void 0))&&b(d,"aria-label",H),(!_||c[0]&50331776&&C!==(C=s[7]?s[25]:s[24]))&&b(d,"aria-labelledby",C),(!_||c[0]&512)&&g(d,"bx--modal-content--with-form",s[9]),(!_||c[0]&1024)&&g(d,"bx--modal-scroll-content",s[10]),s[10]?D||(D=Ve(),D.c(),D.m(l,J)):D&&(D.d(1),D=null),s[5]?y&&(le(),z(y,1,1,()=>{y=null}),te()):y?(y.p(s,c),c[0]&32&&v(y,1)):(y=qe(s),y.c(),v(y,1),y.m(l,null)),(!_||c[0]&48&&Q!==(Q=s[4]?s[5]?"alert":"alertdialog":"dialog"))&&b(l,"role",Q),(!_||c[0]&8388656&&Y!==(Y=s[4]&&!s[5]?s[23]:void 0))&&b(l,"aria-describedby",Y),(!_||c[0]&4194304)&&b(l,"aria-label",s[22]),(!_||c[0]&4)&&g(l,"bx--modal-container--xs",s[2]==="xs"),(!_||c[0]&4)&&g(l,"bx--modal-container--sm",s[2]==="sm"),(!_||c[0]&4)&&g(l,"bx--modal-container--lg",s[2]==="lg"),Te(e,R=Oe(q,[{role:"presentation"},(!_||c[0]&262144)&&{id:s[18]},c[0]&268435456&&s[28]])),g(e,"bx--modal",!0),g(e,"bx--modal-tall",!s[5]),g(e,"is-visible",s[0]),g(e,"bx--modal--danger",s[3])},i(s){_||(v(E),v(M),v(S,s),v(B),v(I,s),v(y),_=!0)},o(s){z(E),z(M),z(S,s),z(B),z(I,s),z(y),_=!1},d(s){s&&m(e),E&&E.d(),M&&M.d(),S&&S.d(s),B&&B.d(),I&&I.d(s),D&&D.d(),y&&y.d(),i[44](null),i[46](null),Z=!1,sl(re)}}}function Dl(i,e,l){let t,a,f,n;const o=["size","open","danger","alert","passiveModal","modalHeading","modalLabel","modalAriaLabel","iconDescription","hasForm","hasScrollingContent","primaryButtonText","primaryButtonDisabled","primaryButtonIcon","shouldSubmitOnEnter","secondaryButtonText","secondaryButtons","selectorPrimaryFocus","preventCloseOnClickOutside","id","ref"];let u=ie(e,o),d,{$$slots:h={},$$scope:k}=e,{size:H=void 0}=e,{open:C=!1}=e,{danger:$=!1}=e,{alert:J=!1}=e,{passiveModal:Q=!1}=e,{modalHeading:Y=void 0}=e,{modalLabel:_=void 0}=e,{modalAriaLabel:Z=void 0}=e,{iconDescription:re="Close the modal"}=e,{hasForm:E=!1}=e,{hasScrollingContent:M=!1}=e,{primaryButtonText:ee=""}=e,{primaryButtonDisabled:K=!1}=e,{primaryButtonIcon:S=void 0}=e,{shouldSubmitOnEnter:B=!0}=e,{secondaryButtonText:W=""}=e,{secondaryButtons:I=[]}=e,{selectorPrimaryFocus:D="[data-modal-primary-focus]"}=e,{preventCloseOnClickOutside:y=!1}=e,{id:q="ccs-"+Math.random().toString(36)}=e,{ref:R=null}=e;const s=fl();let c=null,A=null,F=!1,X=!1;function be(r){((r||A).querySelector(D)||c).focus()}const he=hl(C);ul(i,he,r=>l(52,d=r)),bl(he),dl(()=>{F?C||(F=!1,s("close")):C&&(F=!0,be(),s("open"))});function Ge(r){fe.call(this,i,r)}function Je(r){fe.call(this,i,r)}function Qe(r){fe.call(this,i,r)}function Ze(r){fe.call(this,i,r)}function We(r){fe.call(this,i,r)}function Xe(r){ge[r?"unshift":"push"](()=>{c=r,l(19,c)})}const we=()=>{l(0,C=!1)};function pe(r){ge[r?"unshift":"push"](()=>{c=r,l(19,c)})}const xe=()=>{l(0,C=!1)},$e=r=>{s("click:button--secondary",{text:r.text})},el=()=>{s("click:button--secondary",{text:W})},ll=()=>{s("submit"),s("click:button--primary")};function tl(r){ge[r?"unshift":"push"](()=>{A=r,l(20,A)})}const il=()=>{l(21,X=!0)};function nl(r){ge[r?"unshift":"push"](()=>{R=r,l(1,R)})}const al=r=>{if(C)if(r.key==="Escape")l(0,C=!1);else if(r.key==="Tab"){const Ie=`
2
+ a[href], area[href], input:not([disabled]):not([tabindex='-1']),
3
+ button:not([disabled]):not([tabindex='-1']),select:not([disabled]):not([tabindex='-1']),
4
+ textarea:not([disabled]):not([tabindex='-1']),
5
+ iframe, object, embed, *[tabindex]:not([tabindex='-1']):not([disabled]), *[contenteditable=true]
6
+ `,_e=Array.from(R.querySelectorAll(Ie));let se=_e.indexOf(document.activeElement);se===-1&&r.shiftKey&&(se=0),se+=_e.length+(r.shiftKey?-1:1),se%=_e.length,_e[se].focus(),r.preventDefault()}else B&&r.key==="Enter"&&!K&&(s("submit"),s("click:button--primary"))},ol=()=>{!X&&!y&&l(0,C=!1),l(21,X=!1)},rl=r=>{r.propertyName==="transform"&&s("transitionend",{open:C})};return i.$$set=r=>{l(54,e=U(U({},e),ne(r))),l(28,u=ie(e,o)),"size"in r&&l(2,H=r.size),"open"in r&&l(0,C=r.open),"danger"in r&&l(3,$=r.danger),"alert"in r&&l(4,J=r.alert),"passiveModal"in r&&l(5,Q=r.passiveModal),"modalHeading"in r&&l(6,Y=r.modalHeading),"modalLabel"in r&&l(7,_=r.modalLabel),"modalAriaLabel"in r&&l(29,Z=r.modalAriaLabel),"iconDescription"in r&&l(8,re=r.iconDescription),"hasForm"in r&&l(9,E=r.hasForm),"hasScrollingContent"in r&&l(10,M=r.hasScrollingContent),"primaryButtonText"in r&&l(11,ee=r.primaryButtonText),"primaryButtonDisabled"in r&&l(12,K=r.primaryButtonDisabled),"primaryButtonIcon"in r&&l(13,S=r.primaryButtonIcon),"shouldSubmitOnEnter"in r&&l(14,B=r.shouldSubmitOnEnter),"secondaryButtonText"in r&&l(15,W=r.secondaryButtonText),"secondaryButtons"in r&&l(16,I=r.secondaryButtons),"selectorPrimaryFocus"in r&&l(30,D=r.selectorPrimaryFocus),"preventCloseOnClickOutside"in r&&l(17,y=r.preventCloseOnClickOutside),"id"in r&&l(18,q=r.id),"ref"in r&&l(1,R=r.ref),"$$scope"in r&&l(50,k=r.$$scope)},i.$$.update=()=>{i.$$.dirty[0]&1&&cl(he,d=C,d),i.$$.dirty[0]&262144&&l(25,t=`bx--modal-header__label--modal-${q}`),i.$$.dirty[0]&262144&&l(24,a=`bx--modal-header__heading--modal-${q}`),i.$$.dirty[0]&262144&&l(23,f=`bx--modal-body--${q}`),l(22,n=_||e["aria-label"]||Z||Y)},e=ne(e),[C,R,H,$,J,Q,Y,_,re,E,M,ee,K,S,B,W,I,y,q,c,A,X,n,f,a,t,s,he,u,Z,D,h,Ge,Je,Qe,Ze,We,Xe,we,pe,xe,$e,el,ll,tl,il,nl,al,ol,rl,k]}class Ol extends Me{constructor(e){super(),ze(this,e,Dl,zl,De,{size:2,open:0,danger:3,alert:4,passiveModal:5,modalHeading:6,modalLabel:7,modalAriaLabel:29,iconDescription:8,hasForm:9,hasScrollingContent:10,primaryButtonText:11,primaryButtonDisabled:12,primaryButtonIcon:13,shouldSubmitOnEnter:14,secondaryButtonText:15,secondaryButtons:16,selectorPrimaryFocus:30,preventCloseOnClickOutside:17,id:18,ref:1},null,[-1,-1])}}const Pl=Ol;function Ye(i){let e,l;return{c(){e=ae("title"),l=w(i[1])},l(t){e=oe(t,"title",{});var a=T(e);l=p(a,i[1]),a.forEach(m)},m(t,a){O(t,e,a),L(e,l)},p(t,a){a&2&&x(l,t[1])},d(t){t&&m(e)}}}function Sl(i){let e,l,t=i[1]&&Ye(i),a=[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},{width:i[0]},{height:i[0]},i[2],i[3]],f={};for(let n=0;n<a.length;n+=1)f=U(f,a[n]);return{c(){e=ae("svg"),t&&t.c(),l=ae("path"),this.h()},l(n){e=oe(n,"svg",{xmlns:!0,viewBox:!0,fill:!0,preserveAspectRatio:!0,width:!0,height:!0});var o=T(e);t&&t.l(o),l=oe(o,"path",{d:!0}),T(l).forEach(m),o.forEach(m),this.h()},h(){b(l,"d","M16 22L6 12 7.4 10.6 16 19.2 24.6 10.6 26 12z"),ke(e,f)},m(n,o){O(n,e,o),t&&t.m(e,null),L(e,l)},p(n,[o]){n[1]?t?t.p(n,o):(t=Ye(n),t.c(),t.m(e,l)):t&&(t.d(1),t=null),ke(e,f=Oe(a,[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},o&1&&{width:n[0]},o&1&&{height:n[0]},o&4&&n[2],o&8&&n[3]]))},i:ve,o:ve,d(n){n&&m(e),t&&t.d()}}}function Il(i,e,l){let t,a;const f=["size","title"];let n=ie(e,f),{size:o=16}=e,{title:u=void 0}=e;return i.$$set=d=>{l(5,e=U(U({},e),ne(d))),l(3,n=ie(e,f)),"size"in d&&l(0,o=d.size),"title"in d&&l(1,u=d.title)},i.$$.update=()=>{l(4,t=e["aria-label"]||e["aria-labelledby"]||u),l(2,a={"aria-hidden":t?void 0:!0,role:t?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=ne(e),[o,u,a,n,t]}class Rl extends Me{constructor(e){super(),ze(this,e,Il,Sl,De,{size:0,title:1})}}function Ke(i){let e,l;return{c(){e=ae("title"),l=w(i[1])},l(t){e=oe(t,"title",{});var a=T(e);l=p(a,i[1]),a.forEach(m)},m(t,a){O(t,e,a),L(e,l)},p(t,a){a&2&&x(l,t[1])},d(t){t&&m(e)}}}function Tl(i){let e,l,t=i[1]&&Ke(i),a=[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},{width:i[0]},{height:i[0]},i[2],i[3]],f={};for(let n=0;n<a.length;n+=1)f=U(f,a[n]);return{c(){e=ae("svg"),t&&t.c(),l=ae("path"),this.h()},l(n){e=oe(n,"svg",{xmlns:!0,viewBox:!0,fill:!0,preserveAspectRatio:!0,width:!0,height:!0});var o=T(e);t&&t.l(o),l=oe(o,"path",{d:!0}),T(l).forEach(m),o.forEach(m),this.h()},h(){b(l,"d","M16 10L26 20 24.6 21.4 16 12.8 7.4 21.4 6 20z"),ke(e,f)},m(n,o){O(n,e,o),t&&t.m(e,null),L(e,l)},p(n,[o]){n[1]?t?t.p(n,o):(t=Ke(n),t.c(),t.m(e,l)):t&&(t.d(1),t=null),ke(e,f=Oe(a,[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},o&1&&{width:n[0]},o&1&&{height:n[0]},o&4&&n[2],o&8&&n[3]]))},i:ve,o:ve,d(n){n&&m(e),t&&t.d()}}}function Ll(i,e,l){let t,a;const f=["size","title"];let n=ie(e,f),{size:o=16}=e,{title:u=void 0}=e;return i.$$set=d=>{l(5,e=U(U({},e),ne(d))),l(3,n=ie(e,f)),"size"in d&&l(0,o=d.size),"title"in d&&l(1,u=d.title)},i.$$.update=()=>{l(4,t=e["aria-label"]||e["aria-labelledby"]||u),l(2,a={"aria-hidden":t?void 0:!0,role:t?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=ne(e),[o,u,a,n,t]}class Nl extends Me{constructor(e){super(),ze(this,e,Ll,Tl,De,{size:0,title:1})}}export{Rl as C,Pl as M,Nl as a};
lilac/web/_app/immutable/chunks/ComboBox.5bfb4a00.js ADDED
@@ -0,0 +1 @@
 
 
1
+ import{S as p,i as $,s as ee,E as B,Z as Ae,_ as ze,m as N,h as v,n as U,$ as Pe,b as S,a0 as q,L as le,a1 as Ve,N as F,Q as Z,q as ie,r as te,u as ne,D as he,k as V,a as K,e as y,l as R,c as O,F as j,G as I,H as A,al as Se,I as me,J as ce,K as _e,g as W,d as L,M as re,R as M,ae as oe,aj as ye,w as se,y as G,z as H,A as J,B as Q,v as ae,f as fe,C as xe,j as kl,t as Il,am as Re,T as vl,U as Tl,W as El,X as Wl}from"./index.b333a928.js";import{aK as Cl,aC as pe,aL as Sl,aM as Ll}from"./Commands.1fffdf33.js";function Fe(l){let e,i;return{c(){e=Ae("title"),i=ie(l[1])},l(t){e=ze(t,"title",{});var s=N(e);i=te(s,l[1]),s.forEach(v)},m(t,s){S(t,e,s),q(e,i)},p(t,s){s&2&&ne(i,t[1])},d(t){t&&v(e)}}}function Al(l){let e,i,t=l[1]&&Fe(l),s=[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},{width:l[0]},{height:l[0]},l[2],l[3]],o={};for(let f=0;f<s.length;f+=1)o=B(o,s[f]);return{c(){e=Ae("svg"),t&&t.c(),i=Ae("path"),this.h()},l(f){e=ze(f,"svg",{xmlns:!0,viewBox:!0,fill:!0,preserveAspectRatio:!0,width:!0,height:!0});var a=N(e);t&&t.l(a),i=ze(a,"path",{d:!0}),N(i).forEach(v),a.forEach(v),this.h()},h(){U(i,"d","M13 24L4 15 5.414 13.586 13 21.171 26.586 7.586 28 9 13 24z"),Pe(e,o)},m(f,a){S(f,e,a),t&&t.m(e,null),q(e,i)},p(f,[a]){f[1]?t?t.p(f,a):(t=Fe(f),t.c(),t.m(e,i)):t&&(t.d(1),t=null),Pe(e,o=le(s,[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},a&1&&{width:f[0]},a&1&&{height:f[0]},a&4&&f[2],a&8&&f[3]]))},i:Ve,o:Ve,d(f){f&&v(e),t&&t.d()}}}function zl(l,e,i){let t,s;const o=["size","title"];let f=F(e,o),{size:a=16}=e,{title:n=void 0}=e;return l.$$set=r=>{i(5,e=B(B({},e),Z(r))),i(3,f=F(e,o)),"size"in r&&i(0,a=r.size),"title"in r&&i(1,n=r.title)},l.$$.update=()=>{i(4,t=e["aria-label"]||e["aria-labelledby"]||n),i(2,s={"aria-hidden":t?void 0:!0,role:t?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=Z(e),[a,n,s,f,t]}class Bl extends p{constructor(e){super(),$(this,e,zl,Al,ee,{size:0,title:1})}}const Dl=Bl;function Ue(l){let e,i;return{c(){e=V("div"),i=ie(l[6]),this.h()},l(t){e=R(t,"DIV",{});var s=N(e);i=te(s,l[6]),s.forEach(v),this.h()},h(){I(e,"bx--form-requirement",!0)},m(t,s){S(t,e,s),q(e,i)},p(t,s){s&64&&ne(i,t[6])},d(t){t&&v(e)}}}function qe(l){let e,i;return{c(){e=V("div"),i=ie(l[8]),this.h()},l(t){e=R(t,"DIV",{});var s=N(e);i=te(s,l[8]),s.forEach(v),this.h()},h(){I(e,"bx--form-requirement",!0)},m(t,s){S(t,e,s),q(e,i)},p(t,s){s&256&&ne(i,t[8])},d(t){t&&v(e)}}}function Ml(l){let e,i,t,s,o,f,a,n;const r=l[11].default,d=he(r,l,l[10],null);let u=[{role:"listbox"},{tabindex:"-1"},{"data-invalid":i=l[5]||void 0},l[9]],b={};for(let m=0;m<u.length;m+=1)b=B(b,u[m]);let g=l[5]&&Ue(l),_=!l[5]&&l[7]&&qe(l);return{c(){e=V("div"),d&&d.c(),t=K(),g&&g.c(),s=K(),_&&_.c(),o=y(),this.h()},l(m){e=R(m,"DIV",{role:!0,tabindex:!0,"data-invalid":!0});var T=N(e);d&&d.l(T),T.forEach(v),t=O(m),g&&g.l(m),s=O(m),_&&_.l(m),o=y(),this.h()},h(){j(e,b),I(e,"bx--list-box",!0),I(e,"bx--list-box--sm",l[0]==="sm"),I(e,"bx--list-box--xl",l[0]==="xl"),I(e,"bx--list-box--inline",l[1]==="inline"),I(e,"bx--list-box--disabled",l[4]),I(e,"bx--list-box--expanded",l[2]),I(e,"bx--list-box--light",l[3]),I(e,"bx--list-box--warning",!l[5]&&l[7])},m(m,T){S(m,e,T),d&&d.m(e,null),S(m,t,T),g&&g.m(m,T),S(m,s,T),_&&_.m(m,T),S(m,o,T),f=!0,a||(n=[A(e,"keydown",l[12]),A(e,"keydown",Nl),A(e,"click",Se(l[13]))],a=!0)},p(m,[T]){d&&d.p&&(!f||T&1024)&&me(d,r,m,m[10],f?_e(r,m[10],T,null):ce(m[10]),null),j(e,b=le(u,[{role:"listbox"},{tabindex:"-1"},(!f||T&32&&i!==(i=m[5]||void 0))&&{"data-invalid":i},T&512&&m[9]])),I(e,"bx--list-box",!0),I(e,"bx--list-box--sm",m[0]==="sm"),I(e,"bx--list-box--xl",m[0]==="xl"),I(e,"bx--list-box--inline",m[1]==="inline"),I(e,"bx--list-box--disabled",m[4]),I(e,"bx--list-box--expanded",m[2]),I(e,"bx--list-box--light",m[3]),I(e,"bx--list-box--warning",!m[5]&&m[7]),m[5]?g?g.p(m,T):(g=Ue(m),g.c(),g.m(s.parentNode,s)):g&&(g.d(1),g=null),!m[5]&&m[7]?_?_.p(m,T):(_=qe(m),_.c(),_.m(o.parentNode,o)):_&&(_.d(1),_=null)},i(m){f||(W(d,m),f=!0)},o(m){L(d,m),f=!1},d(m){m&&v(e),d&&d.d(m),m&&v(t),g&&g.d(m),m&&v(s),_&&_.d(m),m&&v(o),a=!1,re(n)}}}const Nl=l=>{l.key==="Escape"&&l.stopPropagation()};function Pl(l,e,i){const t=["size","type","open","light","disabled","invalid","invalidText","warn","warnText"];let s=F(e,t),{$$slots:o={},$$scope:f}=e,{size:a=void 0}=e,{type:n="default"}=e,{open:r=!1}=e,{light:d=!1}=e,{disabled:u=!1}=e,{invalid:b=!1}=e,{invalidText:g=""}=e,{warn:_=!1}=e,{warnText:m=""}=e;function T(k){M.call(this,l,k)}function c(k){M.call(this,l,k)}return l.$$set=k=>{e=B(B({},e),Z(k)),i(9,s=F(e,t)),"size"in k&&i(0,a=k.size),"type"in k&&i(1,n=k.type),"open"in k&&i(2,r=k.open),"light"in k&&i(3,d=k.light),"disabled"in k&&i(4,u=k.disabled),"invalid"in k&&i(5,b=k.invalid),"invalidText"in k&&i(6,g=k.invalidText),"warn"in k&&i(7,_=k.warn),"warnText"in k&&i(8,m=k.warnText),"$$scope"in k&&i(10,f=k.$$scope)},[a,n,r,d,u,b,g,_,m,s,f,o,T,c]}class Vl extends p{constructor(e){super(),$(this,e,Pl,Ml,ee,{size:0,type:1,open:2,light:3,disabled:4,invalid:5,invalidText:6,warn:7,warnText:8})}}const Rl=Vl;function Fl(l){let e,i,t,s,o,f,a,n;const r=l[11].default,d=he(r,l,l[10],null);let u=[{role:l[2]},{"aria-expanded":l[6]},{"aria-owns":i=l[6]&&l[5]||void 0},{"aria-controls":t=l[6]&&l[5]||void 0},{"aria-disabled":l[1]},{"aria-label":s=l[6]?l[4]("close"):l[4]("open")},{tabindex:o=l[1]?"-1":l[3]},l[7]],b={};for(let g=0;g<u.length;g+=1)b=B(b,u[g]);return{c(){e=V("div"),d&&d.c(),this.h()},l(g){e=R(g,"DIV",{role:!0,"aria-expanded":!0,"aria-owns":!0,"aria-controls":!0,"aria-disabled":!0,"aria-label":!0,tabindex:!0});var _=N(e);d&&d.l(_),_.forEach(v),this.h()},h(){j(e,b),I(e,"bx--list-box__field",!0)},m(g,_){S(g,e,_),d&&d.m(e,null),l[19](e),f=!0,a||(n=[A(e,"click",l[12]),A(e,"mouseover",l[13]),A(e,"mouseenter",l[14]),A(e,"mouseleave",l[15]),A(e,"keydown",oe(l[16])),A(e,"focus",l[17]),A(e,"blur",l[18])],a=!0)},p(g,[_]){d&&d.p&&(!f||_&1024)&&me(d,r,g,g[10],f?_e(r,g[10],_,null):ce(g[10]),null),j(e,b=le(u,[(!f||_&4)&&{role:g[2]},(!f||_&64)&&{"aria-expanded":g[6]},(!f||_&96&&i!==(i=g[6]&&g[5]||void 0))&&{"aria-owns":i},(!f||_&96&&t!==(t=g[6]&&g[5]||void 0))&&{"aria-controls":t},(!f||_&2)&&{"aria-disabled":g[1]},(!f||_&80&&s!==(s=g[6]?g[4]("close"):g[4]("open")))&&{"aria-label":s},(!f||_&10&&o!==(o=g[1]?"-1":g[3]))&&{tabindex:o},_&128&&g[7]])),I(e,"bx--list-box__field",!0)},i(g){f||(W(d,g),f=!0)},o(g){L(d,g),f=!1},d(g){g&&v(e),d&&d.d(g),l[19](null),a=!1,re(n)}}}function Ul(l,e,i){let t,s;const o=["disabled","role","tabindex","translationIds","translateWithId","id","ref"];let f=F(e,o),{$$slots:a={},$$scope:n}=e,{disabled:r=!1}=e,{role:d="combobox"}=e,{tabindex:u="-1"}=e;const b={close:"close",open:"open"};let{translateWithId:g=E=>T[E]}=e,{id:_="ccs-"+Math.random().toString(36)}=e,{ref:m=null}=e;const T={[b.close]:"Close menu",[b.open]:"Open menu"},c=ye("MultiSelect");function k(E){M.call(this,l,E)}function w(E){M.call(this,l,E)}function ue(E){M.call(this,l,E)}function C(E){M.call(this,l,E)}function ge(E){M.call(this,l,E)}function ke(E){M.call(this,l,E)}function Ie(E){M.call(this,l,E)}function ve(E){se[E?"unshift":"push"](()=>{m=E,i(0,m)})}return l.$$set=E=>{i(22,e=B(B({},e),Z(E))),i(7,f=F(e,o)),"disabled"in E&&i(1,r=E.disabled),"role"in E&&i(2,d=E.role),"tabindex"in E&&i(3,u=E.tabindex),"translateWithId"in E&&i(4,g=E.translateWithId),"id"in E&&i(9,_=E.id),"ref"in E&&i(0,m=E.ref),"$$scope"in E&&i(10,n=E.$$scope)},l.$$.update=()=>{l.$$.dirty&1&&c&&m&&c.declareRef({key:"field",ref:m}),i(6,t=e["aria-expanded"]),l.$$.dirty&512&&i(5,s=`menu-${_}`)},e=Z(e),[m,r,d,u,g,s,t,f,b,_,n,a,k,w,ue,C,ge,ke,Ie,ve]}class ql extends p{constructor(e){super(),$(this,e,Ul,Fl,ee,{disabled:1,role:2,tabindex:3,translationIds:8,translateWithId:4,id:9,ref:0})}get translationIds(){return this.$$.ctx[8]}}const jl=ql;function Kl(l){let e,i,t,s,o;const f=l[4].default,a=he(f,l,l[3],null);let n=[{role:"listbox"},{id:i="menu-"+l[1]},l[2]],r={};for(let d=0;d<n.length;d+=1)r=B(r,n[d]);return{c(){e=V("div"),a&&a.c(),this.h()},l(d){e=R(d,"DIV",{role:!0,id:!0});var u=N(e);a&&a.l(u),u.forEach(v),this.h()},h(){j(e,r),I(e,"bx--list-box__menu",!0)},m(d,u){S(d,e,u),a&&a.m(e,null),l[6](e),t=!0,s||(o=A(e,"scroll",l[5]),s=!0)},p(d,[u]){a&&a.p&&(!t||u&8)&&me(a,f,d,d[3],t?_e(f,d[3],u,null):ce(d[3]),null),j(e,r=le(n,[{role:"listbox"},(!t||u&2&&i!==(i="menu-"+d[1]))&&{id:i},u&4&&d[2]])),I(e,"bx--list-box__menu",!0)},i(d){t||(W(a,d),t=!0)},o(d){L(a,d),t=!1},d(d){d&&v(e),a&&a.d(d),l[6](null),s=!1,o()}}}function Ol(l,e,i){const t=["id","ref"];let s=F(e,t),{$$slots:o={},$$scope:f}=e,{id:a="ccs-"+Math.random().toString(36)}=e,{ref:n=null}=e;function r(u){M.call(this,l,u)}function d(u){se[u?"unshift":"push"](()=>{n=u,i(0,n)})}return l.$$set=u=>{e=B(B({},e),Z(u)),i(2,s=F(e,t)),"id"in u&&i(1,a=u.id),"ref"in u&&i(0,n=u.ref),"$$scope"in u&&i(3,f=u.$$scope)},[n,a,s,f,o,r,d]}class Xl extends p{constructor(e){super(),$(this,e,Ol,Kl,ee,{id:1,ref:0})}}const Yl=Xl;function Gl(l){let e,i,t,s,o;i=new Cl({props:{"aria-label":l[1],title:l[1]}});let f=[l[2]],a={};for(let n=0;n<f.length;n+=1)a=B(a,f[n]);return{c(){e=V("div"),G(i.$$.fragment),this.h()},l(n){e=R(n,"DIV",{});var r=N(e);H(i.$$.fragment,r),r.forEach(v),this.h()},h(){j(e,a),I(e,"bx--list-box__menu-icon",!0),I(e,"bx--list-box__menu-icon--open",l[0])},m(n,r){S(n,e,r),J(i,e,null),t=!0,s||(o=A(e,"click",Se(l[6])),s=!0)},p(n,[r]){const d={};r&2&&(d["aria-label"]=n[1]),r&2&&(d.title=n[1]),i.$set(d),j(e,a=le(f,[r&4&&n[2]])),I(e,"bx--list-box__menu-icon",!0),I(e,"bx--list-box__menu-icon--open",n[0])},i(n){t||(W(i.$$.fragment,n),t=!0)},o(n){L(i.$$.fragment,n),t=!1},d(n){n&&v(e),Q(i),s=!1,o()}}}function Hl(l,e,i){let t,s;const o=["open","translationIds","translateWithId"];let f=F(e,o),{open:a=!1}=e;const n={close:"close",open:"open"};let{translateWithId:r=b=>d[b]}=e;const d={[n.close]:"Close menu",[n.open]:"Open menu"};function u(b){M.call(this,l,b)}return l.$$set=b=>{e=B(B({},e),Z(b)),i(2,f=F(e,o)),"open"in b&&i(0,a=b.open),"translateWithId"in b&&i(4,r=b.translateWithId)},l.$$.update=()=>{l.$$.dirty&1&&i(5,t=a?n.close:n.open),l.$$.dirty&48&&i(1,s=(r==null?void 0:r(t))??d[t])},[a,s,f,n,r,t,u]}class Jl extends p{constructor(e){super(),$(this,e,Hl,Gl,ee,{open:0,translationIds:3,translateWithId:4})}get translationIds(){return this.$$.ctx[3]}}const Ql=Jl;function Zl(l){let e,i,t,s,o,f;const a=l[8].default,n=he(a,l,l[7],null);let r=[{role:"option"},{tabindex:"-1"},{"aria-selected":l[0]},{disabled:t=l[2]?!0:void 0},l[5]],d={};for(let u=0;u<r.length;u+=1)d=B(d,r[u]);return{c(){e=V("div"),i=V("div"),n&&n.c(),this.h()},l(u){e=R(u,"DIV",{role:!0,tabindex:!0,"aria-selected":!0,disabled:!0});var b=N(e);i=R(b,"DIV",{title:!0});var g=N(i);n&&n.l(g),g.forEach(v),b.forEach(v),this.h()},h(){U(i,"title",l[4]),I(i,"bx--list-box__menu-item__option",!0),j(e,d),I(e,"bx--list-box__menu-item",!0),I(e,"bx--list-box__menu-item--active",l[0]),I(e,"bx--list-box__menu-item--highlighted",l[1]||l[0])},m(u,b){S(u,e,b),q(e,i),n&&n.m(i,null),l[12](i),s=!0,o||(f=[A(e,"click",l[9]),A(e,"mouseenter",l[10]),A(e,"mouseleave",l[11])],o=!0)},p(u,[b]){n&&n.p&&(!s||b&128)&&me(n,a,u,u[7],s?_e(a,u[7],b,null):ce(u[7]),null),(!s||b&16)&&U(i,"title",u[4]),j(e,d=le(r,[{role:"option"},{tabindex:"-1"},(!s||b&1)&&{"aria-selected":u[0]},(!s||b&4&&t!==(t=u[2]?!0:void 0))&&{disabled:t},b&32&&u[5]])),I(e,"bx--list-box__menu-item",!0),I(e,"bx--list-box__menu-item--active",u[0]),I(e,"bx--list-box__menu-item--highlighted",u[1]||u[0])},i(u){s||(W(n,u),s=!0)},o(u){L(n,u),s=!1},d(u){u&&v(e),n&&n.d(u),l[12](null),o=!1,re(f)}}}function wl(l,e,i){let t,s;const o=["active","highlighted","disabled"];let f=F(e,o),{$$slots:a={},$$scope:n}=e,{active:r=!1}=e,{highlighted:d=!1}=e,{disabled:u=!1}=e,b=null;function g(c){M.call(this,l,c)}function _(c){M.call(this,l,c)}function m(c){M.call(this,l,c)}function T(c){se[c?"unshift":"push"](()=>{b=c,i(3,b)})}return l.$$set=c=>{e=B(B({},e),Z(c)),i(5,f=F(e,o)),"active"in c&&i(0,r=c.active),"highlighted"in c&&i(1,d=c.highlighted),"disabled"in c&&i(2,u=c.disabled),"$$scope"in c&&i(7,n=c.$$scope)},l.$$.update=()=>{l.$$.dirty&8&&i(6,t=(b==null?void 0:b.offsetWidth)<(b==null?void 0:b.scrollWidth)),l.$$.dirty&72&&i(4,s=t?b==null?void 0:b.innerText:void 0),l.$$.dirty&10&&d&&b&&!b.matches(":hover")&&b.scrollIntoView({block:"nearest"})},[r,d,u,b,s,f,t,n,a,g,_,m,T]}class yl extends p{constructor(e){super(),$(this,e,wl,Zl,ee,{active:0,highlighted:1,disabled:2})}}const xl=yl;function pl(l){let e,i,t,s,o,f,a,n=l[1]!==void 0&&je(l);t=new pe({});let r=[{role:"button"},{"aria-label":l[4]},{title:l[4]},{tabindex:s=l[2]?"-1":"0"},l[6]],d={};for(let u=0;u<r.length;u+=1)d=B(d,r[u]);return{c(){e=V("div"),n&&n.c(),i=K(),G(t.$$.fragment),this.h()},l(u){e=R(u,"DIV",{role:!0,"aria-label":!0,title:!0,tabindex:!0});var b=N(e);n&&n.l(b),i=O(b),H(t.$$.fragment,b),b.forEach(v),this.h()},h(){j(e,d),I(e,"bx--list-box__selection",!0),I(e,"bx--tag--filter",l[1]),I(e,"bx--list-box__selection--multi",l[1])},m(u,b){S(u,e,b),n&&n.m(e,null),q(e,i),J(t,e,null),l[12](e),o=!0,f||(a=[A(e,"click",oe(Se(l[13]))),A(e,"keydown",oe(l[14]))],f=!0)},p(u,b){u[1]!==void 0?n?n.p(u,b):(n=je(u),n.c(),n.m(e,i)):n&&(n.d(1),n=null),j(e,d=le(r,[{role:"button"},(!o||b&16)&&{"aria-label":u[4]},(!o||b&16)&&{title:u[4]},(!o||b&4&&s!==(s=u[2]?"-1":"0"))&&{tabindex:s},b&64&&u[6]])),I(e,"bx--list-box__selection",!0),I(e,"bx--tag--filter",u[1]),I(e,"bx--list-box__selection--multi",u[1])},i(u){o||(W(t.$$.fragment,u),o=!0)},o(u){L(t.$$.fragment,u),o=!1},d(u){u&&v(e),n&&n.d(),Q(t),l[12](null),f=!1,re(a)}}}function $l(l){let e,i,t,s,o,f,a,n,r,d;return f=new pe({}),{c(){e=V("div"),i=V("span"),t=ie(l[1]),s=K(),o=V("div"),G(f.$$.fragment),this.h()},l(u){e=R(u,"DIV",{});var b=N(e);i=R(b,"SPAN",{title:!0});var g=N(i);t=te(g,l[1]),g.forEach(v),s=O(b),o=R(b,"DIV",{role:!0,tabindex:!0,disabled:!0,"aria-label":!0,title:!0});var _=N(o);H(f.$$.fragment,_),_.forEach(v),b.forEach(v),this.h()},h(){U(i,"title",l[1]),I(i,"bx--tag__label",!0),U(o,"role","button"),U(o,"tabindex",a=l[2]?-1:0),U(o,"disabled",l[2]),U(o,"aria-label",l[3].clearAll),U(o,"title",l[4]),I(o,"bx--tag__close-icon",!0),I(e,"bx--tag",!0),I(e,"bx--tag--filter",!0),I(e,"bx--tag--high-contrast",!0),I(e,"bx--tag--disabled",l[2])},m(u,b){S(u,e,b),q(e,i),q(i,t),q(e,s),q(e,o),J(f,o,null),l[9](o),n=!0,r||(d=[A(o,"click",oe(Se(l[10]))),A(o,"keydown",oe(l[11]))],r=!0)},p(u,b){(!n||b&2)&&ne(t,u[1]),(!n||b&2)&&U(i,"title",u[1]),(!n||b&4&&a!==(a=u[2]?-1:0))&&U(o,"tabindex",a),(!n||b&4)&&U(o,"disabled",u[2]),(!n||b&16)&&U(o,"title",u[4]),(!n||b&4)&&I(e,"bx--tag--disabled",u[2])},i(u){n||(W(f.$$.fragment,u),n=!0)},o(u){L(f.$$.fragment,u),n=!1},d(u){u&&v(e),Q(f),l[9](null),r=!1,re(d)}}}function je(l){let e;return{c(){e=ie(l[1])},l(i){e=te(i,l[1])},m(i,t){S(i,e,t)},p(i,t){t&2&&ne(e,i[1])},d(i){i&&v(e)}}}function ei(l){let e,i,t,s;const o=[$l,pl],f=[];function a(n,r){return n[1]!==void 0?0:1}return e=a(l),i=f[e]=o[e](l),{c(){i.c(),t=y()},l(n){i.l(n),t=y()},m(n,r){f[e].m(n,r),S(n,t,r),s=!0},p(n,[r]){let d=e;e=a(n),e===d?f[e].p(n,r):(ae(),L(f[d],1,1,()=>{f[d]=null}),fe(),i=f[e],i?i.p(n,r):(i=f[e]=o[e](n),i.c()),W(i,1),i.m(t.parentNode,t))},i(n){s||(W(i),s=!0)},o(n){L(i),s=!1},d(n){f[e].d(n),n&&v(t)}}}function li(l,e,i){let t,s;const o=["selectionCount","disabled","translationIds","translateWithId","ref"];let f=F(e,o),{selectionCount:a=void 0}=e,{disabled:n=!1}=e;const r={clearAll:"clearAll",clearSelection:"clearSelection"};let{translateWithId:d=C=>b[C]}=e,{ref:u=null}=e;const b={[r.clearAll]:"Clear all selected items",[r.clearSelection]:"Clear selected item"},g=xe(),_=ye("MultiSelect");function m(C){se[C?"unshift":"push"](()=>{u=C,i(0,u)})}const T=C=>{n||g("clear",C)},c=C=>{!n&&C.key==="Enter"&&g("clear",C)};function k(C){se[C?"unshift":"push"](()=>{u=C,i(0,u)})}const w=C=>{n||g("clear",C)},ue=C=>{!n&&C.key==="Enter"&&g("clear",C)};return l.$$set=C=>{e=B(B({},e),Z(C)),i(6,f=F(e,o)),"selectionCount"in C&&i(1,a=C.selectionCount),"disabled"in C&&i(2,n=C.disabled),"translateWithId"in C&&i(7,d=C.translateWithId),"ref"in C&&i(0,u=C.ref)},l.$$.update=()=>{l.$$.dirty&1&&_&&u&&_.declareRef({key:"selection",ref:u}),l.$$.dirty&2&&i(8,t=a?r.clearAll:r.clearSelection),l.$$.dirty&384&&i(4,s=(d==null?void 0:d(t))??b[t])},[u,a,n,r,s,g,f,d,t,m,T,c,k,w,ue]}class ii extends p{constructor(e){super(),$(this,e,li,ei,ee,{selectionCount:1,disabled:2,translationIds:3,translateWithId:7,ref:0})}get translationIds(){return this.$$.ctx[3]}}const ti=ii;function Ke(l,e,i){const t=l.slice();return t[56]=e[i],t[58]=i,t}const ni=l=>({item:l[0]&16777216,index:l[0]&16777216}),Oe=l=>({item:l[56],index:l[58]});function Xe(l){let e,i;return{c(){e=V("label"),i=ie(l[9]),this.h()},l(t){e=R(t,"LABEL",{for:!0});var s=N(e);i=te(s,l[9]),s.forEach(v),this.h()},h(){U(e,"for",l[19]),I(e,"bx--label",!0),I(e,"bx--label--disabled",l[8])},m(t,s){S(t,e,s),q(e,i)},p(t,s){s[0]&512&&ne(i,t[9]),s[0]&524288&&U(e,"for",t[19]),s[0]&256&&I(e,"bx--label--disabled",t[8])},d(t){t&&v(e)}}}function Ye(l){let e,i;return e=new Sl({props:{class:"bx--list-box__invalid-icon"}}),{c(){G(e.$$.fragment)},l(t){H(e.$$.fragment,t)},m(t,s){J(e,t,s),i=!0},i(t){i||(W(e.$$.fragment,t),i=!0)},o(t){L(e.$$.fragment,t),i=!1},d(t){Q(e,t)}}}function Ge(l){let e,i;return e=new Ll({props:{class:"bx--list-box__invalid-icon bx--list-box__invalid-icon--warning"}}),{c(){G(e.$$.fragment)},l(t){H(e.$$.fragment,t)},m(t,s){J(e,t,s),i=!0},i(t){i||(W(e.$$.fragment,t),i=!0)},o(t){L(e.$$.fragment,t),i=!1},d(t){Q(e,t)}}}function He(l){let e,i;return e=new ti({props:{translateWithId:l[18],disabled:l[8],open:l[2]}}),e.$on("clear",l[46]),e.$on("clear",l[21]),{c(){G(e.$$.fragment)},l(t){H(e.$$.fragment,t)},m(t,s){J(e,t,s),i=!0},p(t,s){const o={};s[0]&262144&&(o.translateWithId=t[18]),s[0]&256&&(o.disabled=t[8]),s[0]&4&&(o.open=t[2]),e.$set(o)},i(t){i||(W(e.$$.fragment,t),i=!0)},o(t){L(e.$$.fragment,t),i=!1},d(t){Q(e,t)}}}function ai(l){let e,i,t,s,o,f,a,n,r,d,u,b=[{tabindex:"0"},{autocomplete:"off"},{"aria-autocomplete":"list"},{"aria-expanded":l[2]},{"aria-activedescendant":l[25]},{"aria-labelledby":l[26]},{"aria-disabled":l[8]},{"aria-controls":i=l[2]?l[27]:void 0},{"aria-owns":t=l[2]?l[27]:void 0},{disabled:l[8]},{placeholder:l[10]},{id:l[19]},{name:l[20]},l[30]],g={};for(let c=0;c<b.length;c+=1)g=B(g,b[c]);let _=l[13]&&Ye(),m=!l[13]&&l[14]&&Ge(),T=l[1]&&He(l);return n=new Ql({props:{translateWithId:l[17],open:l[2]}}),n.$on("click",l[47]),{c(){e=V("input"),s=K(),_&&_.c(),o=K(),m&&m.c(),f=K(),T&&T.c(),a=K(),G(n.$$.fragment),this.h()},l(c){e=R(c,"INPUT",{tabindex:!0,autocomplete:!0,"aria-autocomplete":!0,"aria-expanded":!0,"aria-activedescendant":!0,"aria-labelledby":!0,"aria-disabled":!0,"aria-controls":!0,"aria-owns":!0,placeholder:!0,id:!0,name:!0}),s=O(c),_&&_.l(c),o=O(c),m&&m.l(c),f=O(c),T&&T.l(c),a=O(c),H(n.$$.fragment,c),this.h()},h(){j(e,g),I(e,"bx--text-input",!0),I(e,"bx--text-input--light",l[16]),I(e,"bx--text-input--empty",l[1]==="")},m(c,k){S(c,e,k),e.autofocus&&e.focus(),l[41](e),Re(e,l[1]),S(c,s,k),_&&_.m(c,k),S(c,o,k),m&&m.m(c,k),S(c,f,k),T&&T.m(c,k),S(c,a,k),J(n,c,k),r=!0,d||(u=[A(e,"input",l[42]),A(e,"input",l[43]),A(e,"keydown",l[35]),A(e,"keydown",oe(l[44])),A(e,"keyup",l[36]),A(e,"focus",l[37]),A(e,"blur",l[38]),A(e,"blur",l[45]),A(e,"paste",l[39])],d=!0)},p(c,k){j(e,g=le(b,[{tabindex:"0"},{autocomplete:"off"},{"aria-autocomplete":"list"},(!r||k[0]&4)&&{"aria-expanded":c[2]},(!r||k[0]&33554432)&&{"aria-activedescendant":c[25]},(!r||k[0]&67108864)&&{"aria-labelledby":c[26]},(!r||k[0]&256)&&{"aria-disabled":c[8]},(!r||k[0]&134217732&&i!==(i=c[2]?c[27]:void 0))&&{"aria-controls":i},(!r||k[0]&134217732&&t!==(t=c[2]?c[27]:void 0))&&{"aria-owns":t},(!r||k[0]&256)&&{disabled:c[8]},(!r||k[0]&1024)&&{placeholder:c[10]},(!r||k[0]&524288)&&{id:c[19]},(!r||k[0]&1048576)&&{name:c[20]},k[0]&1073741824&&c[30]])),k[0]&2&&e.value!==c[1]&&Re(e,c[1]),I(e,"bx--text-input",!0),I(e,"bx--text-input--light",c[16]),I(e,"bx--text-input--empty",c[1]===""),c[13]?_?k[0]&8192&&W(_,1):(_=Ye(),_.c(),W(_,1),_.m(o.parentNode,o)):_&&(ae(),L(_,1,1,()=>{_=null}),fe()),!c[13]&&c[14]?m?k[0]&24576&&W(m,1):(m=Ge(),m.c(),W(m,1),m.m(f.parentNode,f)):m&&(ae(),L(m,1,1,()=>{m=null}),fe()),c[1]?T?(T.p(c,k),k[0]&2&&W(T,1)):(T=He(c),T.c(),W(T,1),T.m(a.parentNode,a)):T&&(ae(),L(T,1,1,()=>{T=null}),fe());const w={};k[0]&131072&&(w.translateWithId=c[17]),k[0]&4&&(w.open=c[2]),n.$set(w)},i(c){r||(W(_),W(m),W(T),W(n.$$.fragment,c),r=!0)},o(c){L(_),L(m),L(T),L(n.$$.fragment,c),r=!1},d(c){c&&v(e),l[41](null),c&&v(s),_&&_.d(c),c&&v(o),m&&m.d(c),c&&v(f),T&&T.d(c),c&&v(a),Q(n,c),d=!1,re(u)}}}function Je(l){let e,i,t;function s(f){l[51](f)}let o={"aria-label":l[28],id:l[19],$$slots:{default:[ui]},$$scope:{ctx:l}};return l[4]!==void 0&&(o.ref=l[4]),e=new Yl({props:o}),se.push(()=>vl(e,"ref",s)),e.$on("scroll",l[52]),{c(){G(e.$$.fragment)},l(f){H(e.$$.fragment,f)},m(f,a){J(e,f,a),t=!0},p(f,a){const n={};a[0]&268435456&&(n["aria-label"]=f[28]),a[0]&524288&&(n.id=f[19]),a[0]&29360167|a[1]&4194304&&(n.$$scope={dirty:a,ctx:f}),!i&&a[0]&16&&(i=!0,n.ref=f[4],Tl(()=>i=!1)),e.$set(n)},i(f){t||(W(e.$$.fragment,f),t=!0)},o(f){L(e.$$.fragment,f),t=!1},d(f){Q(e,f)}}}function fi(l){let e=l[5](l[56])+"",i;return{c(){i=ie(e)},l(t){i=te(t,e)},m(t,s){S(t,i,s)},p(t,s){s[0]&16777248&&e!==(e=t[5](t[56])+"")&&ne(i,e)},d(t){t&&v(i)}}}function Qe(l){let e,i;return e=new Dl({props:{class:"bx--list-box__menu-item__selected-icon"}}),{c(){G(e.$$.fragment)},l(t){H(e.$$.fragment,t)},m(t,s){J(e,t,s),i=!0},i(t){i||(W(e.$$.fragment,t),i=!0)},o(t){L(e.$$.fragment,t),i=!1},d(t){Q(e,t)}}}function si(l){let e,i,t;const s=l[34].default,o=he(s,l,l[53],Oe),f=o||fi(l);let a=l[22]&&l[22].id===l[56].id&&Qe();return{c(){f&&f.c(),e=K(),a&&a.c(),i=K()},l(n){f&&f.l(n),e=O(n),a&&a.l(n),i=O(n)},m(n,r){f&&f.m(n,r),S(n,e,r),a&&a.m(n,r),S(n,i,r),t=!0},p(n,r){o?o.p&&(!t||r[0]&16777216|r[1]&4194304)&&me(o,s,n,n[53],t?_e(s,n[53],r,ni):ce(n[53]),Oe):f&&f.p&&(!t||r[0]&16777248)&&f.p(n,t?r:[-1,-1]),n[22]&&n[22].id===n[56].id?a?r[0]&20971520&&W(a,1):(a=Qe(),a.c(),W(a,1),a.m(i.parentNode,i)):a&&(ae(),L(a,1,1,()=>{a=null}),fe())},i(n){t||(W(f,n),W(a),t=!0)},o(n){L(f,n),L(a),t=!1},d(n){f&&f.d(n),n&&v(e),a&&a.d(n),n&&v(i)}}}function Ze(l,e){let i,t,s;function o(...a){return e[49](e[56],e[58],...a)}function f(){return e[50](e[56],e[58])}return t=new xl({props:{id:e[56].id,active:e[0]===e[56].id,highlighted:e[23]===e[58],disabled:e[56].disabled,$$slots:{default:[si]},$$scope:{ctx:e}}}),t.$on("click",o),t.$on("mouseenter",f),{key:l,first:null,c(){i=y(),G(t.$$.fragment),this.h()},l(a){i=y(),H(t.$$.fragment,a),this.h()},h(){this.first=i},m(a,n){S(a,i,n),J(t,a,n),s=!0},p(a,n){e=a;const r={};n[0]&16777216&&(r.id=e[56].id),n[0]&16777217&&(r.active=e[0]===e[56].id),n[0]&25165824&&(r.highlighted=e[23]===e[58]),n[0]&16777216&&(r.disabled=e[56].disabled),n[0]&20971552|n[1]&4194304&&(r.$$scope={dirty:n,ctx:e}),t.$set(r)},i(a){s||(W(t.$$.fragment,a),s=!0)},o(a){L(t.$$.fragment,a),s=!1},d(a){a&&v(i),Q(t,a)}}}function ui(l){let e=[],i=new Map,t,s,o=l[24];const f=a=>a[56].id;for(let a=0;a<o.length;a+=1){let n=Ke(l,o,a),r=f(n);i.set(r,e[a]=Ze(r,n))}return{c(){for(let a=0;a<e.length;a+=1)e[a].c();t=y()},l(a){for(let n=0;n<e.length;n+=1)e[n].l(a);t=y()},m(a,n){for(let r=0;r<e.length;r+=1)e[r]&&e[r].m(a,n);S(a,t,n),s=!0},p(a,n){n[0]&29360167|n[1]&4194304&&(o=a[24],ae(),e=El(e,n,f,1,a,o,i,t.parentNode,Wl,Ze,t,Ke),fe())},i(a){if(!s){for(let n=0;n<o.length;n+=1)W(e[n]);s=!0}},o(a){for(let n=0;n<e.length;n+=1)L(e[n]);s=!1},d(a){for(let n=0;n<e.length;n+=1)e[n].d(a);a&&v(t)}}}function oi(l){let e,i,t,s;e=new jl({props:{role:"button","aria-expanded":l[2],id:l[19],disabled:l[8],translateWithId:l[17],$$slots:{default:[ai]},$$scope:{ctx:l}}}),e.$on("click",l[48]);let o=l[2]&&Je(l);return{c(){G(e.$$.fragment),i=K(),o&&o.c(),t=y()},l(f){H(e.$$.fragment,f),i=O(f),o&&o.l(f),t=y()},m(f,a){J(e,f,a),S(f,i,a),o&&o.m(f,a),S(f,t,a),s=!0},p(f,a){const n={};a[0]&4&&(n["aria-expanded"]=f[2]),a[0]&524288&&(n.id=f[19]),a[0]&256&&(n.disabled=f[8]),a[0]&131072&&(n.translateWithId=f[17]),a[0]&1340040495|a[1]&4194304&&(n.$$scope={dirty:a,ctx:f}),e.$set(n),f[2]?o?(o.p(f,a),a[0]&4&&W(o,1)):(o=Je(f),o.c(),W(o,1),o.m(t.parentNode,t)):o&&(ae(),L(o,1,1,()=>{o=null}),fe())},i(f){s||(W(e.$$.fragment,f),W(o),s=!0)},o(f){L(e.$$.fragment,f),L(o),s=!1},d(f){Q(e,f),f&&v(i),o&&o.d(f),f&&v(t)}}}function we(l){let e,i;return{c(){e=V("div"),i=ie(l[11]),this.h()},l(t){e=R(t,"DIV",{});var s=N(e);i=te(s,l[11]),s.forEach(v),this.h()},h(){I(e,"bx--form__helper-text",!0),I(e,"bx--form__helper-text--disabled",l[8])},m(t,s){S(t,e,s),q(e,i)},p(t,s){s[0]&2048&&ne(i,t[11]),s[0]&256&&I(e,"bx--form__helper-text--disabled",t[8])},d(t){t&&v(e)}}}function ri(l){let e,i,t,s,o,f,a,n=l[9]&&Xe(l);t=new Rl({props:{class:"bx--combo-box "+(l[6]==="top"&&"bx--list-box--up")+" "+(!l[13]&&l[14]&&"bx--combo-box--warning"),id:l[26],"aria-label":l[28],disabled:l[8],invalid:l[13],invalidText:l[12],open:l[2],light:l[16],size:l[7],warn:l[14],warnText:l[15],$$slots:{default:[oi]},$$scope:{ctx:l}}});let r=!l[13]&&l[11]&&!l[14]&&we(l);return{c(){e=V("div"),n&&n.c(),i=K(),G(t.$$.fragment),s=K(),r&&r.c(),this.h()},l(d){e=R(d,"DIV",{});var u=N(e);n&&n.l(u),i=O(u),H(t.$$.fragment,u),s=O(u),r&&r.l(u),u.forEach(v),this.h()},h(){I(e,"bx--list-box__wrapper",!0)},m(d,u){S(d,e,u),n&&n.m(e,null),q(e,i),J(t,e,null),q(e,s),r&&r.m(e,null),o=!0,f||(a=A(window,"click",l[40]),f=!0)},p(d,u){d[9]?n?n.p(d,u):(n=Xe(d),n.c(),n.m(e,i)):n&&(n.d(1),n=null);const b={};u[0]&24640&&(b.class="bx--combo-box "+(d[6]==="top"&&"bx--list-box--up")+" "+(!d[13]&&d[14]&&"bx--combo-box--warning")),u[0]&67108864&&(b.id=d[26]),u[0]&268435456&&(b["aria-label"]=d[28]),u[0]&256&&(b.disabled=d[8]),u[0]&8192&&(b.invalid=d[13]),u[0]&4096&&(b.invalidText=d[12]),u[0]&4&&(b.open=d[2]),u[0]&65536&&(b.light=d[16]),u[0]&128&&(b.size=d[7]),u[0]&16384&&(b.warn=d[14]),u[0]&32768&&(b.warnText=d[15]),u[0]&1608475967|u[1]&4194304&&(b.$$scope={dirty:u,ctx:d}),t.$set(b),!d[13]&&d[11]&&!d[14]?r?r.p(d,u):(r=we(d),r.c(),r.m(e,null)):r&&(r.d(1),r=null)},i(d){o||(W(t.$$.fragment,d),o=!0)},o(d){L(t.$$.fragment,d),o=!1},d(d){d&&v(e),n&&n.d(),Q(t),r&&r.d(),f=!1,a()}}}function di(l,e,i){let t,s,o,f,a;const n=["items","itemToString","selectedId","value","direction","size","disabled","titleText","placeholder","helperText","invalidText","invalid","warn","warnText","light","open","shouldFilterItem","translateWithId","translateWithIdSelection","id","name","ref","listRef","clear"];let r=F(e,n),{$$slots:d={},$$scope:u}=e,{items:b=[]}=e,{itemToString:g=h=>h.text||h.id}=e,{selectedId:_=void 0}=e,{value:m=""}=e,{direction:T="bottom"}=e,{size:c=void 0}=e,{disabled:k=!1}=e,{titleText:w=""}=e,{placeholder:ue=""}=e,{helperText:C=""}=e,{invalidText:ge=""}=e,{invalid:ke=!1}=e,{warn:Ie=!1}=e,{warnText:ve=""}=e,{light:E=!1}=e,{open:D=!1}=e,{shouldFilterItem:Te=()=>!0}=e,{translateWithId:Be=void 0}=e,{translateWithIdSelection:De=void 0}=e,{id:Ee="ccs-"+Math.random().toString(36)}=e,{name:Me=void 0}=e,{ref:X=null}=e,{listRef:We=null}=e;const $e=xe();let Y,de=null,P=-1;function Le(h){let z=P+h,x=a!=null&&a.length?a:b;if(x.length===0)return;z<0?z=x.length-1:z>=x.length&&(z=0);let be=b[z].disabled;for(;be;)z=z+h,z<0?z=b.length-1:z>=b.length&&(z=0),be=b[z].disabled;i(23,P=z)}function Ne(h={}){i(33,de=null),i(23,P=-1),i(25,f=void 0),i(0,_=void 0),i(22,Y=void 0),i(2,D=!1),i(1,m=""),(h==null?void 0:h.focus)!==!1&&(X==null||X.focus())}kl(()=>{D?(X.focus(),i(24,a=b.filter(h=>Te(h,m)))):(i(23,P=-1),i(24,a=[]),Y?i(1,m=g(Y)):(i(0,_=void 0),i(1,m=""),i(23,P=-1),i(25,f=void 0)))});function el(h){M.call(this,l,h)}function ll(h){M.call(this,l,h)}function il(h){M.call(this,l,h)}function tl(h){M.call(this,l,h)}function nl(h){M.call(this,l,h)}const al=({target:h})=>{D&&X&&!X.contains(h)&&i(2,D=!1)};function fl(h){se[h?"unshift":"push"](()=>{X=h,i(3,X)})}function sl(){m=this.value,i(1,m)}const ul=({target:h})=>{!D&&h.value.length>0&&i(2,D=!0),m.length||(Ne(),i(2,D=!0))},ol=h=>{var x;const{key:z}=h;if(["Enter","ArrowDown","ArrowUp"].includes(z)&&h.preventDefault(),z==="Enter"){if(i(2,D=!D),P>-1&&((x=a[P])==null?void 0:x.id)!==_)i(2,D=!1),a[P]&&(i(1,m=g(a[P])),i(22,Y=a[P]),i(0,_=a[P].id));else{const be=a.find(Ce=>Ce.text.toLowerCase()===(m==null?void 0:m.toLowerCase())&&!Ce.disabled)??a.find(Ce=>!Ce.disabled);be&&(i(2,D=!1),i(22,Y=be),i(1,m=g(Y)),i(0,_=Y.id))}i(23,P=-1)}else z==="Tab"?i(2,D=!1):z==="ArrowDown"?Le(1):z==="ArrowUp"?Le(-1):z==="Escape"&&i(2,D=!1)},rl=({relatedTarget:h})=>{!D||!h||h&&!["INPUT","SELECT","TEXTAREA"].includes(h.tagName)&&h.getAttribute("role")!=="button"&&h.getAttribute("role")!=="searchbox"&&X.focus()};function dl(h){M.call(this,l,h)}const bl=h=>{k||(h.stopPropagation(),i(2,D=!D))},hl=async()=>{k||(i(2,D=!0),await Il(),X.focus())},ml=(h,z,x)=>{if(h.disabled){x.stopPropagation();return}i(0,_=h.id),i(2,D=!1),a[z]&&i(1,m=g(a[z]))},cl=(h,z)=>{h.disabled||i(23,P=z)};function _l(h){We=h,i(4,We)}function gl(h){M.call(this,l,h)}return l.$$set=h=>{i(55,e=B(B({},e),Z(h))),i(30,r=F(e,n)),"items"in h&&i(31,b=h.items),"itemToString"in h&&i(5,g=h.itemToString),"selectedId"in h&&i(0,_=h.selectedId),"value"in h&&i(1,m=h.value),"direction"in h&&i(6,T=h.direction),"size"in h&&i(7,c=h.size),"disabled"in h&&i(8,k=h.disabled),"titleText"in h&&i(9,w=h.titleText),"placeholder"in h&&i(10,ue=h.placeholder),"helperText"in h&&i(11,C=h.helperText),"invalidText"in h&&i(12,ge=h.invalidText),"invalid"in h&&i(13,ke=h.invalid),"warn"in h&&i(14,Ie=h.warn),"warnText"in h&&i(15,ve=h.warnText),"light"in h&&i(16,E=h.light),"open"in h&&i(2,D=h.open),"shouldFilterItem"in h&&i(32,Te=h.shouldFilterItem),"translateWithId"in h&&i(17,Be=h.translateWithId),"translateWithIdSelection"in h&&i(18,De=h.translateWithIdSelection),"id"in h&&i(19,Ee=h.id),"name"in h&&i(20,Me=h.name),"ref"in h&&i(3,X=h.ref),"listRef"in h&&i(4,We=h.listRef),"$$scope"in h&&i(53,u=h.$$scope)},l.$$.update=()=>{l.$$.dirty[0]&2|l.$$.dirty[1]&3&&i(24,a=b.filter(h=>Te(h,m))),l.$$.dirty[0]&20971525|l.$$.dirty[1]&5&&(_!==void 0?de!==_&&(i(33,de=_),(a==null?void 0:a.length)===1&&D?(i(0,_=a[0].id),i(22,Y=a[0]),i(23,P=-1),i(25,f=void 0)):i(22,Y=b.find(h=>h.id===_)),$e("select",{selectedId:_,selectedItem:Y})):(i(33,de=_),i(22,Y=void 0))),i(28,t=e["aria-label"]||"Choose an item"),l.$$.dirty[0]&524288&&i(27,s=`menu-${Ee}`),l.$$.dirty[0]&524288&&i(26,o=`combo-${Ee}`),l.$$.dirty[0]&8388608|l.$$.dirty[1]&1&&i(25,f=b[P]?b[P].id:0)},e=Z(e),[_,m,D,X,We,g,T,c,k,w,ue,C,ge,ke,Ie,ve,E,Be,De,Ee,Me,Ne,Y,P,a,f,o,s,t,Le,r,b,Te,de,d,el,ll,il,tl,nl,al,fl,sl,ul,ol,rl,dl,bl,hl,ml,cl,_l,gl,u]}class bi extends p{constructor(e){super(),$(this,e,di,ri,ee,{items:31,itemToString:5,selectedId:0,value:1,direction:6,size:7,disabled:8,titleText:9,placeholder:10,helperText:11,invalidText:12,invalid:13,warn:14,warnText:15,light:16,open:2,shouldFilterItem:32,translateWithId:17,translateWithIdSelection:18,id:19,name:20,ref:3,listRef:4,clear:21},null,[-1,-1])}get clear(){return this.$$.ctx[21]}}const ci=bi;export{ci as C};
lilac/web/_app/immutable/chunks/ComboBox.f990ad07.js ADDED
@@ -0,0 +1 @@
 
 
1
+ import{S as p,i as $,s as ee,E as B,Z as Ae,_ as ze,m as N,h as v,n as U,$ as Pe,b as S,a0 as q,L as le,a1 as Ve,N as F,Q as Z,q as ie,r as te,u as ne,D as he,k as V,a as O,e as y,l as R,c as X,F as K,G as I,H as A,ak as Se,I as me,J as ce,K as _e,g as W,d as L,M as re,R as M,ad as oe,ai as ye,w as se,y as G,z as H,A as J,B as Q,v as ae,f as fe,C as xe,j as kl,t as Il,al as Re,T as vl,U as Tl,W as El,X as Wl}from"./index.b7741aa8.js";import{aK as Cl,aC as pe,aL as Sl,aM as Ll}from"./Commands.539ca0ee.js";function Fe(l){let e,i;return{c(){e=Ae("title"),i=ie(l[1])},l(t){e=ze(t,"title",{});var s=N(e);i=te(s,l[1]),s.forEach(v)},m(t,s){S(t,e,s),q(e,i)},p(t,s){s&2&&ne(i,t[1])},d(t){t&&v(e)}}}function Al(l){let e,i,t=l[1]&&Fe(l),s=[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},{width:l[0]},{height:l[0]},l[2],l[3]],o={};for(let f=0;f<s.length;f+=1)o=B(o,s[f]);return{c(){e=Ae("svg"),t&&t.c(),i=Ae("path"),this.h()},l(f){e=ze(f,"svg",{xmlns:!0,viewBox:!0,fill:!0,preserveAspectRatio:!0,width:!0,height:!0});var a=N(e);t&&t.l(a),i=ze(a,"path",{d:!0}),N(i).forEach(v),a.forEach(v),this.h()},h(){U(i,"d","M13 24L4 15 5.414 13.586 13 21.171 26.586 7.586 28 9 13 24z"),Pe(e,o)},m(f,a){S(f,e,a),t&&t.m(e,null),q(e,i)},p(f,[a]){f[1]?t?t.p(f,a):(t=Fe(f),t.c(),t.m(e,i)):t&&(t.d(1),t=null),Pe(e,o=le(s,[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},a&1&&{width:f[0]},a&1&&{height:f[0]},a&4&&f[2],a&8&&f[3]]))},i:Ve,o:Ve,d(f){f&&v(e),t&&t.d()}}}function zl(l,e,i){let t,s;const o=["size","title"];let f=F(e,o),{size:a=16}=e,{title:n=void 0}=e;return l.$$set=r=>{i(5,e=B(B({},e),Z(r))),i(3,f=F(e,o)),"size"in r&&i(0,a=r.size),"title"in r&&i(1,n=r.title)},l.$$.update=()=>{i(4,t=e["aria-label"]||e["aria-labelledby"]||n),i(2,s={"aria-hidden":t?void 0:!0,role:t?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=Z(e),[a,n,s,f,t]}class Bl extends p{constructor(e){super(),$(this,e,zl,Al,ee,{size:0,title:1})}}const Dl=Bl;function Ue(l){let e,i;return{c(){e=V("div"),i=ie(l[6]),this.h()},l(t){e=R(t,"DIV",{});var s=N(e);i=te(s,l[6]),s.forEach(v),this.h()},h(){I(e,"bx--form-requirement",!0)},m(t,s){S(t,e,s),q(e,i)},p(t,s){s&64&&ne(i,t[6])},d(t){t&&v(e)}}}function qe(l){let e,i;return{c(){e=V("div"),i=ie(l[8]),this.h()},l(t){e=R(t,"DIV",{});var s=N(e);i=te(s,l[8]),s.forEach(v),this.h()},h(){I(e,"bx--form-requirement",!0)},m(t,s){S(t,e,s),q(e,i)},p(t,s){s&256&&ne(i,t[8])},d(t){t&&v(e)}}}function Ml(l){let e,i,t,s,o,f,a,n;const r=l[11].default,d=he(r,l,l[10],null);let u=[{role:"listbox"},{tabindex:"-1"},{"data-invalid":i=l[5]||void 0},l[9]],b={};for(let m=0;m<u.length;m+=1)b=B(b,u[m]);let g=l[5]&&Ue(l),_=!l[5]&&l[7]&&qe(l);return{c(){e=V("div"),d&&d.c(),t=O(),g&&g.c(),s=O(),_&&_.c(),o=y(),this.h()},l(m){e=R(m,"DIV",{role:!0,tabindex:!0,"data-invalid":!0});var T=N(e);d&&d.l(T),T.forEach(v),t=X(m),g&&g.l(m),s=X(m),_&&_.l(m),o=y(),this.h()},h(){K(e,b),I(e,"bx--list-box",!0),I(e,"bx--list-box--sm",l[0]==="sm"),I(e,"bx--list-box--xl",l[0]==="xl"),I(e,"bx--list-box--inline",l[1]==="inline"),I(e,"bx--list-box--disabled",l[4]),I(e,"bx--list-box--expanded",l[2]),I(e,"bx--list-box--light",l[3]),I(e,"bx--list-box--warning",!l[5]&&l[7])},m(m,T){S(m,e,T),d&&d.m(e,null),S(m,t,T),g&&g.m(m,T),S(m,s,T),_&&_.m(m,T),S(m,o,T),f=!0,a||(n=[A(e,"keydown",l[12]),A(e,"keydown",Nl),A(e,"click",Se(l[13]))],a=!0)},p(m,[T]){d&&d.p&&(!f||T&1024)&&me(d,r,m,m[10],f?_e(r,m[10],T,null):ce(m[10]),null),K(e,b=le(u,[{role:"listbox"},{tabindex:"-1"},(!f||T&32&&i!==(i=m[5]||void 0))&&{"data-invalid":i},T&512&&m[9]])),I(e,"bx--list-box",!0),I(e,"bx--list-box--sm",m[0]==="sm"),I(e,"bx--list-box--xl",m[0]==="xl"),I(e,"bx--list-box--inline",m[1]==="inline"),I(e,"bx--list-box--disabled",m[4]),I(e,"bx--list-box--expanded",m[2]),I(e,"bx--list-box--light",m[3]),I(e,"bx--list-box--warning",!m[5]&&m[7]),m[5]?g?g.p(m,T):(g=Ue(m),g.c(),g.m(s.parentNode,s)):g&&(g.d(1),g=null),!m[5]&&m[7]?_?_.p(m,T):(_=qe(m),_.c(),_.m(o.parentNode,o)):_&&(_.d(1),_=null)},i(m){f||(W(d,m),f=!0)},o(m){L(d,m),f=!1},d(m){m&&v(e),d&&d.d(m),m&&v(t),g&&g.d(m),m&&v(s),_&&_.d(m),m&&v(o),a=!1,re(n)}}}const Nl=l=>{l.key==="Escape"&&l.stopPropagation()};function Pl(l,e,i){const t=["size","type","open","light","disabled","invalid","invalidText","warn","warnText"];let s=F(e,t),{$$slots:o={},$$scope:f}=e,{size:a=void 0}=e,{type:n="default"}=e,{open:r=!1}=e,{light:d=!1}=e,{disabled:u=!1}=e,{invalid:b=!1}=e,{invalidText:g=""}=e,{warn:_=!1}=e,{warnText:m=""}=e;function T(k){M.call(this,l,k)}function c(k){M.call(this,l,k)}return l.$$set=k=>{e=B(B({},e),Z(k)),i(9,s=F(e,t)),"size"in k&&i(0,a=k.size),"type"in k&&i(1,n=k.type),"open"in k&&i(2,r=k.open),"light"in k&&i(3,d=k.light),"disabled"in k&&i(4,u=k.disabled),"invalid"in k&&i(5,b=k.invalid),"invalidText"in k&&i(6,g=k.invalidText),"warn"in k&&i(7,_=k.warn),"warnText"in k&&i(8,m=k.warnText),"$$scope"in k&&i(10,f=k.$$scope)},[a,n,r,d,u,b,g,_,m,s,f,o,T,c]}class Vl extends p{constructor(e){super(),$(this,e,Pl,Ml,ee,{size:0,type:1,open:2,light:3,disabled:4,invalid:5,invalidText:6,warn:7,warnText:8})}}const Rl=Vl;function Fl(l){let e,i,t,s,o,f,a,n;const r=l[11].default,d=he(r,l,l[10],null);let u=[{role:l[2]},{"aria-expanded":l[6]},{"aria-owns":i=l[6]&&l[5]||void 0},{"aria-controls":t=l[6]&&l[5]||void 0},{"aria-disabled":l[1]},{"aria-label":s=l[6]?l[4]("close"):l[4]("open")},{tabindex:o=l[1]?"-1":l[3]},l[7]],b={};for(let g=0;g<u.length;g+=1)b=B(b,u[g]);return{c(){e=V("div"),d&&d.c(),this.h()},l(g){e=R(g,"DIV",{role:!0,"aria-expanded":!0,"aria-owns":!0,"aria-controls":!0,"aria-disabled":!0,"aria-label":!0,tabindex:!0});var _=N(e);d&&d.l(_),_.forEach(v),this.h()},h(){K(e,b),I(e,"bx--list-box__field",!0)},m(g,_){S(g,e,_),d&&d.m(e,null),l[19](e),f=!0,a||(n=[A(e,"click",l[12]),A(e,"mouseover",l[13]),A(e,"mouseenter",l[14]),A(e,"mouseleave",l[15]),A(e,"keydown",oe(l[16])),A(e,"focus",l[17]),A(e,"blur",l[18])],a=!0)},p(g,[_]){d&&d.p&&(!f||_&1024)&&me(d,r,g,g[10],f?_e(r,g[10],_,null):ce(g[10]),null),K(e,b=le(u,[(!f||_&4)&&{role:g[2]},(!f||_&64)&&{"aria-expanded":g[6]},(!f||_&96&&i!==(i=g[6]&&g[5]||void 0))&&{"aria-owns":i},(!f||_&96&&t!==(t=g[6]&&g[5]||void 0))&&{"aria-controls":t},(!f||_&2)&&{"aria-disabled":g[1]},(!f||_&80&&s!==(s=g[6]?g[4]("close"):g[4]("open")))&&{"aria-label":s},(!f||_&10&&o!==(o=g[1]?"-1":g[3]))&&{tabindex:o},_&128&&g[7]])),I(e,"bx--list-box__field",!0)},i(g){f||(W(d,g),f=!0)},o(g){L(d,g),f=!1},d(g){g&&v(e),d&&d.d(g),l[19](null),a=!1,re(n)}}}function Ul(l,e,i){let t,s;const o=["disabled","role","tabindex","translationIds","translateWithId","id","ref"];let f=F(e,o),{$$slots:a={},$$scope:n}=e,{disabled:r=!1}=e,{role:d="combobox"}=e,{tabindex:u="-1"}=e;const b={close:"close",open:"open"};let{translateWithId:g=E=>T[E]}=e,{id:_="ccs-"+Math.random().toString(36)}=e,{ref:m=null}=e;const T={[b.close]:"Close menu",[b.open]:"Open menu"},c=ye("MultiSelect");function k(E){M.call(this,l,E)}function w(E){M.call(this,l,E)}function ue(E){M.call(this,l,E)}function C(E){M.call(this,l,E)}function ge(E){M.call(this,l,E)}function ke(E){M.call(this,l,E)}function Ie(E){M.call(this,l,E)}function ve(E){se[E?"unshift":"push"](()=>{m=E,i(0,m)})}return l.$$set=E=>{i(22,e=B(B({},e),Z(E))),i(7,f=F(e,o)),"disabled"in E&&i(1,r=E.disabled),"role"in E&&i(2,d=E.role),"tabindex"in E&&i(3,u=E.tabindex),"translateWithId"in E&&i(4,g=E.translateWithId),"id"in E&&i(9,_=E.id),"ref"in E&&i(0,m=E.ref),"$$scope"in E&&i(10,n=E.$$scope)},l.$$.update=()=>{l.$$.dirty&1&&c&&m&&c.declareRef({key:"field",ref:m}),i(6,t=e["aria-expanded"]),l.$$.dirty&512&&i(5,s=`menu-${_}`)},e=Z(e),[m,r,d,u,g,s,t,f,b,_,n,a,k,w,ue,C,ge,ke,Ie,ve]}class ql extends p{constructor(e){super(),$(this,e,Ul,Fl,ee,{disabled:1,role:2,tabindex:3,translationIds:8,translateWithId:4,id:9,ref:0})}get translationIds(){return this.$$.ctx[8]}}const Kl=ql;function Ol(l){let e,i,t,s,o;const f=l[4].default,a=he(f,l,l[3],null);let n=[{role:"listbox"},{id:i="menu-"+l[1]},l[2]],r={};for(let d=0;d<n.length;d+=1)r=B(r,n[d]);return{c(){e=V("div"),a&&a.c(),this.h()},l(d){e=R(d,"DIV",{role:!0,id:!0});var u=N(e);a&&a.l(u),u.forEach(v),this.h()},h(){K(e,r),I(e,"bx--list-box__menu",!0)},m(d,u){S(d,e,u),a&&a.m(e,null),l[6](e),t=!0,s||(o=A(e,"scroll",l[5]),s=!0)},p(d,[u]){a&&a.p&&(!t||u&8)&&me(a,f,d,d[3],t?_e(f,d[3],u,null):ce(d[3]),null),K(e,r=le(n,[{role:"listbox"},(!t||u&2&&i!==(i="menu-"+d[1]))&&{id:i},u&4&&d[2]])),I(e,"bx--list-box__menu",!0)},i(d){t||(W(a,d),t=!0)},o(d){L(a,d),t=!1},d(d){d&&v(e),a&&a.d(d),l[6](null),s=!1,o()}}}function Xl(l,e,i){const t=["id","ref"];let s=F(e,t),{$$slots:o={},$$scope:f}=e,{id:a="ccs-"+Math.random().toString(36)}=e,{ref:n=null}=e;function r(u){M.call(this,l,u)}function d(u){se[u?"unshift":"push"](()=>{n=u,i(0,n)})}return l.$$set=u=>{e=B(B({},e),Z(u)),i(2,s=F(e,t)),"id"in u&&i(1,a=u.id),"ref"in u&&i(0,n=u.ref),"$$scope"in u&&i(3,f=u.$$scope)},[n,a,s,f,o,r,d]}class Yl extends p{constructor(e){super(),$(this,e,Xl,Ol,ee,{id:1,ref:0})}}const jl=Yl;function Gl(l){let e,i,t,s,o;i=new Cl({props:{"aria-label":l[1],title:l[1]}});let f=[l[2]],a={};for(let n=0;n<f.length;n+=1)a=B(a,f[n]);return{c(){e=V("div"),G(i.$$.fragment),this.h()},l(n){e=R(n,"DIV",{});var r=N(e);H(i.$$.fragment,r),r.forEach(v),this.h()},h(){K(e,a),I(e,"bx--list-box__menu-icon",!0),I(e,"bx--list-box__menu-icon--open",l[0])},m(n,r){S(n,e,r),J(i,e,null),t=!0,s||(o=A(e,"click",Se(l[6])),s=!0)},p(n,[r]){const d={};r&2&&(d["aria-label"]=n[1]),r&2&&(d.title=n[1]),i.$set(d),K(e,a=le(f,[r&4&&n[2]])),I(e,"bx--list-box__menu-icon",!0),I(e,"bx--list-box__menu-icon--open",n[0])},i(n){t||(W(i.$$.fragment,n),t=!0)},o(n){L(i.$$.fragment,n),t=!1},d(n){n&&v(e),Q(i),s=!1,o()}}}function Hl(l,e,i){let t,s;const o=["open","translationIds","translateWithId"];let f=F(e,o),{open:a=!1}=e;const n={close:"close",open:"open"};let{translateWithId:r=b=>d[b]}=e;const d={[n.close]:"Close menu",[n.open]:"Open menu"};function u(b){M.call(this,l,b)}return l.$$set=b=>{e=B(B({},e),Z(b)),i(2,f=F(e,o)),"open"in b&&i(0,a=b.open),"translateWithId"in b&&i(4,r=b.translateWithId)},l.$$.update=()=>{l.$$.dirty&1&&i(5,t=a?n.close:n.open),l.$$.dirty&48&&i(1,s=(r==null?void 0:r(t))??d[t])},[a,s,f,n,r,t,u]}class Jl extends p{constructor(e){super(),$(this,e,Hl,Gl,ee,{open:0,translationIds:3,translateWithId:4})}get translationIds(){return this.$$.ctx[3]}}const Ql=Jl;function Zl(l){let e,i,t,s,o,f;const a=l[8].default,n=he(a,l,l[7],null);let r=[{role:"option"},{tabindex:"-1"},{"aria-selected":l[0]},{disabled:t=l[2]?!0:void 0},l[5]],d={};for(let u=0;u<r.length;u+=1)d=B(d,r[u]);return{c(){e=V("div"),i=V("div"),n&&n.c(),this.h()},l(u){e=R(u,"DIV",{role:!0,tabindex:!0,"aria-selected":!0,disabled:!0});var b=N(e);i=R(b,"DIV",{title:!0});var g=N(i);n&&n.l(g),g.forEach(v),b.forEach(v),this.h()},h(){U(i,"title",l[4]),I(i,"bx--list-box__menu-item__option",!0),K(e,d),I(e,"bx--list-box__menu-item",!0),I(e,"bx--list-box__menu-item--active",l[0]),I(e,"bx--list-box__menu-item--highlighted",l[1]||l[0])},m(u,b){S(u,e,b),q(e,i),n&&n.m(i,null),l[12](i),s=!0,o||(f=[A(e,"click",l[9]),A(e,"mouseenter",l[10]),A(e,"mouseleave",l[11])],o=!0)},p(u,[b]){n&&n.p&&(!s||b&128)&&me(n,a,u,u[7],s?_e(a,u[7],b,null):ce(u[7]),null),(!s||b&16)&&U(i,"title",u[4]),K(e,d=le(r,[{role:"option"},{tabindex:"-1"},(!s||b&1)&&{"aria-selected":u[0]},(!s||b&4&&t!==(t=u[2]?!0:void 0))&&{disabled:t},b&32&&u[5]])),I(e,"bx--list-box__menu-item",!0),I(e,"bx--list-box__menu-item--active",u[0]),I(e,"bx--list-box__menu-item--highlighted",u[1]||u[0])},i(u){s||(W(n,u),s=!0)},o(u){L(n,u),s=!1},d(u){u&&v(e),n&&n.d(u),l[12](null),o=!1,re(f)}}}function wl(l,e,i){let t,s;const o=["active","highlighted","disabled"];let f=F(e,o),{$$slots:a={},$$scope:n}=e,{active:r=!1}=e,{highlighted:d=!1}=e,{disabled:u=!1}=e,b=null;function g(c){M.call(this,l,c)}function _(c){M.call(this,l,c)}function m(c){M.call(this,l,c)}function T(c){se[c?"unshift":"push"](()=>{b=c,i(3,b)})}return l.$$set=c=>{e=B(B({},e),Z(c)),i(5,f=F(e,o)),"active"in c&&i(0,r=c.active),"highlighted"in c&&i(1,d=c.highlighted),"disabled"in c&&i(2,u=c.disabled),"$$scope"in c&&i(7,n=c.$$scope)},l.$$.update=()=>{l.$$.dirty&8&&i(6,t=(b==null?void 0:b.offsetWidth)<(b==null?void 0:b.scrollWidth)),l.$$.dirty&72&&i(4,s=t?b==null?void 0:b.innerText:void 0),l.$$.dirty&10&&d&&b&&!b.matches(":hover")&&b.scrollIntoView({block:"nearest"})},[r,d,u,b,s,f,t,n,a,g,_,m,T]}class yl extends p{constructor(e){super(),$(this,e,wl,Zl,ee,{active:0,highlighted:1,disabled:2})}}const xl=yl;function pl(l){let e,i,t,s,o,f,a,n=l[1]!==void 0&&Ke(l);t=new pe({});let r=[{role:"button"},{"aria-label":l[4]},{title:l[4]},{tabindex:s=l[2]?"-1":"0"},l[6]],d={};for(let u=0;u<r.length;u+=1)d=B(d,r[u]);return{c(){e=V("div"),n&&n.c(),i=O(),G(t.$$.fragment),this.h()},l(u){e=R(u,"DIV",{role:!0,"aria-label":!0,title:!0,tabindex:!0});var b=N(e);n&&n.l(b),i=X(b),H(t.$$.fragment,b),b.forEach(v),this.h()},h(){K(e,d),I(e,"bx--list-box__selection",!0),I(e,"bx--tag--filter",l[1]),I(e,"bx--list-box__selection--multi",l[1])},m(u,b){S(u,e,b),n&&n.m(e,null),q(e,i),J(t,e,null),l[12](e),o=!0,f||(a=[A(e,"click",oe(Se(l[13]))),A(e,"keydown",oe(l[14]))],f=!0)},p(u,b){u[1]!==void 0?n?n.p(u,b):(n=Ke(u),n.c(),n.m(e,i)):n&&(n.d(1),n=null),K(e,d=le(r,[{role:"button"},(!o||b&16)&&{"aria-label":u[4]},(!o||b&16)&&{title:u[4]},(!o||b&4&&s!==(s=u[2]?"-1":"0"))&&{tabindex:s},b&64&&u[6]])),I(e,"bx--list-box__selection",!0),I(e,"bx--tag--filter",u[1]),I(e,"bx--list-box__selection--multi",u[1])},i(u){o||(W(t.$$.fragment,u),o=!0)},o(u){L(t.$$.fragment,u),o=!1},d(u){u&&v(e),n&&n.d(),Q(t),l[12](null),f=!1,re(a)}}}function $l(l){let e,i,t,s,o,f,a,n,r,d;return f=new pe({}),{c(){e=V("div"),i=V("span"),t=ie(l[1]),s=O(),o=V("div"),G(f.$$.fragment),this.h()},l(u){e=R(u,"DIV",{});var b=N(e);i=R(b,"SPAN",{title:!0});var g=N(i);t=te(g,l[1]),g.forEach(v),s=X(b),o=R(b,"DIV",{role:!0,tabindex:!0,disabled:!0,"aria-label":!0,title:!0});var _=N(o);H(f.$$.fragment,_),_.forEach(v),b.forEach(v),this.h()},h(){U(i,"title",l[1]),I(i,"bx--tag__label",!0),U(o,"role","button"),U(o,"tabindex",a=l[2]?-1:0),U(o,"disabled",l[2]),U(o,"aria-label",l[3].clearAll),U(o,"title",l[4]),I(o,"bx--tag__close-icon",!0),I(e,"bx--tag",!0),I(e,"bx--tag--filter",!0),I(e,"bx--tag--high-contrast",!0),I(e,"bx--tag--disabled",l[2])},m(u,b){S(u,e,b),q(e,i),q(i,t),q(e,s),q(e,o),J(f,o,null),l[9](o),n=!0,r||(d=[A(o,"click",oe(Se(l[10]))),A(o,"keydown",oe(l[11]))],r=!0)},p(u,b){(!n||b&2)&&ne(t,u[1]),(!n||b&2)&&U(i,"title",u[1]),(!n||b&4&&a!==(a=u[2]?-1:0))&&U(o,"tabindex",a),(!n||b&4)&&U(o,"disabled",u[2]),(!n||b&16)&&U(o,"title",u[4]),(!n||b&4)&&I(e,"bx--tag--disabled",u[2])},i(u){n||(W(f.$$.fragment,u),n=!0)},o(u){L(f.$$.fragment,u),n=!1},d(u){u&&v(e),Q(f),l[9](null),r=!1,re(d)}}}function Ke(l){let e;return{c(){e=ie(l[1])},l(i){e=te(i,l[1])},m(i,t){S(i,e,t)},p(i,t){t&2&&ne(e,i[1])},d(i){i&&v(e)}}}function ei(l){let e,i,t,s;const o=[$l,pl],f=[];function a(n,r){return n[1]!==void 0?0:1}return e=a(l),i=f[e]=o[e](l),{c(){i.c(),t=y()},l(n){i.l(n),t=y()},m(n,r){f[e].m(n,r),S(n,t,r),s=!0},p(n,[r]){let d=e;e=a(n),e===d?f[e].p(n,r):(ae(),L(f[d],1,1,()=>{f[d]=null}),fe(),i=f[e],i?i.p(n,r):(i=f[e]=o[e](n),i.c()),W(i,1),i.m(t.parentNode,t))},i(n){s||(W(i),s=!0)},o(n){L(i),s=!1},d(n){f[e].d(n),n&&v(t)}}}function li(l,e,i){let t,s;const o=["selectionCount","disabled","translationIds","translateWithId","ref"];let f=F(e,o),{selectionCount:a=void 0}=e,{disabled:n=!1}=e;const r={clearAll:"clearAll",clearSelection:"clearSelection"};let{translateWithId:d=C=>b[C]}=e,{ref:u=null}=e;const b={[r.clearAll]:"Clear all selected items",[r.clearSelection]:"Clear selected item"},g=xe(),_=ye("MultiSelect");function m(C){se[C?"unshift":"push"](()=>{u=C,i(0,u)})}const T=C=>{n||g("clear",C)},c=C=>{!n&&C.key==="Enter"&&g("clear",C)};function k(C){se[C?"unshift":"push"](()=>{u=C,i(0,u)})}const w=C=>{n||g("clear",C)},ue=C=>{!n&&C.key==="Enter"&&g("clear",C)};return l.$$set=C=>{e=B(B({},e),Z(C)),i(6,f=F(e,o)),"selectionCount"in C&&i(1,a=C.selectionCount),"disabled"in C&&i(2,n=C.disabled),"translateWithId"in C&&i(7,d=C.translateWithId),"ref"in C&&i(0,u=C.ref)},l.$$.update=()=>{l.$$.dirty&1&&_&&u&&_.declareRef({key:"selection",ref:u}),l.$$.dirty&2&&i(8,t=a?r.clearAll:r.clearSelection),l.$$.dirty&384&&i(4,s=(d==null?void 0:d(t))??b[t])},[u,a,n,r,s,g,f,d,t,m,T,c,k,w,ue]}class ii extends p{constructor(e){super(),$(this,e,li,ei,ee,{selectionCount:1,disabled:2,translationIds:3,translateWithId:7,ref:0})}get translationIds(){return this.$$.ctx[3]}}const ti=ii;function Oe(l,e,i){const t=l.slice();return t[56]=e[i],t[58]=i,t}const ni=l=>({item:l[0]&16777216,index:l[0]&16777216}),Xe=l=>({item:l[56],index:l[58]});function Ye(l){let e,i;return{c(){e=V("label"),i=ie(l[9]),this.h()},l(t){e=R(t,"LABEL",{for:!0});var s=N(e);i=te(s,l[9]),s.forEach(v),this.h()},h(){U(e,"for",l[19]),I(e,"bx--label",!0),I(e,"bx--label--disabled",l[8])},m(t,s){S(t,e,s),q(e,i)},p(t,s){s[0]&512&&ne(i,t[9]),s[0]&524288&&U(e,"for",t[19]),s[0]&256&&I(e,"bx--label--disabled",t[8])},d(t){t&&v(e)}}}function je(l){let e,i;return e=new Sl({props:{class:"bx--list-box__invalid-icon"}}),{c(){G(e.$$.fragment)},l(t){H(e.$$.fragment,t)},m(t,s){J(e,t,s),i=!0},i(t){i||(W(e.$$.fragment,t),i=!0)},o(t){L(e.$$.fragment,t),i=!1},d(t){Q(e,t)}}}function Ge(l){let e,i;return e=new Ll({props:{class:"bx--list-box__invalid-icon bx--list-box__invalid-icon--warning"}}),{c(){G(e.$$.fragment)},l(t){H(e.$$.fragment,t)},m(t,s){J(e,t,s),i=!0},i(t){i||(W(e.$$.fragment,t),i=!0)},o(t){L(e.$$.fragment,t),i=!1},d(t){Q(e,t)}}}function He(l){let e,i;return e=new ti({props:{translateWithId:l[18],disabled:l[8],open:l[2]}}),e.$on("clear",l[46]),e.$on("clear",l[21]),{c(){G(e.$$.fragment)},l(t){H(e.$$.fragment,t)},m(t,s){J(e,t,s),i=!0},p(t,s){const o={};s[0]&262144&&(o.translateWithId=t[18]),s[0]&256&&(o.disabled=t[8]),s[0]&4&&(o.open=t[2]),e.$set(o)},i(t){i||(W(e.$$.fragment,t),i=!0)},o(t){L(e.$$.fragment,t),i=!1},d(t){Q(e,t)}}}function ai(l){let e,i,t,s,o,f,a,n,r,d,u,b=[{tabindex:"0"},{autocomplete:"off"},{"aria-autocomplete":"list"},{"aria-expanded":l[2]},{"aria-activedescendant":l[25]},{"aria-labelledby":l[26]},{"aria-disabled":l[8]},{"aria-controls":i=l[2]?l[27]:void 0},{"aria-owns":t=l[2]?l[27]:void 0},{disabled:l[8]},{placeholder:l[10]},{id:l[19]},{name:l[20]},l[30]],g={};for(let c=0;c<b.length;c+=1)g=B(g,b[c]);let _=l[13]&&je(),m=!l[13]&&l[14]&&Ge(),T=l[1]&&He(l);return n=new Ql({props:{translateWithId:l[17],open:l[2]}}),n.$on("click",l[47]),{c(){e=V("input"),s=O(),_&&_.c(),o=O(),m&&m.c(),f=O(),T&&T.c(),a=O(),G(n.$$.fragment),this.h()},l(c){e=R(c,"INPUT",{tabindex:!0,autocomplete:!0,"aria-autocomplete":!0,"aria-expanded":!0,"aria-activedescendant":!0,"aria-labelledby":!0,"aria-disabled":!0,"aria-controls":!0,"aria-owns":!0,placeholder:!0,id:!0,name:!0}),s=X(c),_&&_.l(c),o=X(c),m&&m.l(c),f=X(c),T&&T.l(c),a=X(c),H(n.$$.fragment,c),this.h()},h(){K(e,g),I(e,"bx--text-input",!0),I(e,"bx--text-input--light",l[16]),I(e,"bx--text-input--empty",l[1]==="")},m(c,k){S(c,e,k),e.autofocus&&e.focus(),l[41](e),Re(e,l[1]),S(c,s,k),_&&_.m(c,k),S(c,o,k),m&&m.m(c,k),S(c,f,k),T&&T.m(c,k),S(c,a,k),J(n,c,k),r=!0,d||(u=[A(e,"input",l[42]),A(e,"input",l[43]),A(e,"keydown",l[35]),A(e,"keydown",oe(l[44])),A(e,"keyup",l[36]),A(e,"focus",l[37]),A(e,"blur",l[38]),A(e,"blur",l[45]),A(e,"paste",l[39])],d=!0)},p(c,k){K(e,g=le(b,[{tabindex:"0"},{autocomplete:"off"},{"aria-autocomplete":"list"},(!r||k[0]&4)&&{"aria-expanded":c[2]},(!r||k[0]&33554432)&&{"aria-activedescendant":c[25]},(!r||k[0]&67108864)&&{"aria-labelledby":c[26]},(!r||k[0]&256)&&{"aria-disabled":c[8]},(!r||k[0]&134217732&&i!==(i=c[2]?c[27]:void 0))&&{"aria-controls":i},(!r||k[0]&134217732&&t!==(t=c[2]?c[27]:void 0))&&{"aria-owns":t},(!r||k[0]&256)&&{disabled:c[8]},(!r||k[0]&1024)&&{placeholder:c[10]},(!r||k[0]&524288)&&{id:c[19]},(!r||k[0]&1048576)&&{name:c[20]},k[0]&1073741824&&c[30]])),k[0]&2&&e.value!==c[1]&&Re(e,c[1]),I(e,"bx--text-input",!0),I(e,"bx--text-input--light",c[16]),I(e,"bx--text-input--empty",c[1]===""),c[13]?_?k[0]&8192&&W(_,1):(_=je(),_.c(),W(_,1),_.m(o.parentNode,o)):_&&(ae(),L(_,1,1,()=>{_=null}),fe()),!c[13]&&c[14]?m?k[0]&24576&&W(m,1):(m=Ge(),m.c(),W(m,1),m.m(f.parentNode,f)):m&&(ae(),L(m,1,1,()=>{m=null}),fe()),c[1]?T?(T.p(c,k),k[0]&2&&W(T,1)):(T=He(c),T.c(),W(T,1),T.m(a.parentNode,a)):T&&(ae(),L(T,1,1,()=>{T=null}),fe());const w={};k[0]&131072&&(w.translateWithId=c[17]),k[0]&4&&(w.open=c[2]),n.$set(w)},i(c){r||(W(_),W(m),W(T),W(n.$$.fragment,c),r=!0)},o(c){L(_),L(m),L(T),L(n.$$.fragment,c),r=!1},d(c){c&&v(e),l[41](null),c&&v(s),_&&_.d(c),c&&v(o),m&&m.d(c),c&&v(f),T&&T.d(c),c&&v(a),Q(n,c),d=!1,re(u)}}}function Je(l){let e,i,t;function s(f){l[51](f)}let o={"aria-label":l[28],id:l[19],$$slots:{default:[ui]},$$scope:{ctx:l}};return l[4]!==void 0&&(o.ref=l[4]),e=new jl({props:o}),se.push(()=>vl(e,"ref",s)),e.$on("scroll",l[52]),{c(){G(e.$$.fragment)},l(f){H(e.$$.fragment,f)},m(f,a){J(e,f,a),t=!0},p(f,a){const n={};a[0]&268435456&&(n["aria-label"]=f[28]),a[0]&524288&&(n.id=f[19]),a[0]&29360167|a[1]&4194304&&(n.$$scope={dirty:a,ctx:f}),!i&&a[0]&16&&(i=!0,n.ref=f[4],Tl(()=>i=!1)),e.$set(n)},i(f){t||(W(e.$$.fragment,f),t=!0)},o(f){L(e.$$.fragment,f),t=!1},d(f){Q(e,f)}}}function fi(l){let e=l[5](l[56])+"",i;return{c(){i=ie(e)},l(t){i=te(t,e)},m(t,s){S(t,i,s)},p(t,s){s[0]&16777248&&e!==(e=t[5](t[56])+"")&&ne(i,e)},d(t){t&&v(i)}}}function Qe(l){let e,i;return e=new Dl({props:{class:"bx--list-box__menu-item__selected-icon"}}),{c(){G(e.$$.fragment)},l(t){H(e.$$.fragment,t)},m(t,s){J(e,t,s),i=!0},i(t){i||(W(e.$$.fragment,t),i=!0)},o(t){L(e.$$.fragment,t),i=!1},d(t){Q(e,t)}}}function si(l){let e,i,t;const s=l[34].default,o=he(s,l,l[53],Xe),f=o||fi(l);let a=l[22]&&l[22].id===l[56].id&&Qe();return{c(){f&&f.c(),e=O(),a&&a.c(),i=O()},l(n){f&&f.l(n),e=X(n),a&&a.l(n),i=X(n)},m(n,r){f&&f.m(n,r),S(n,e,r),a&&a.m(n,r),S(n,i,r),t=!0},p(n,r){o?o.p&&(!t||r[0]&16777216|r[1]&4194304)&&me(o,s,n,n[53],t?_e(s,n[53],r,ni):ce(n[53]),Xe):f&&f.p&&(!t||r[0]&16777248)&&f.p(n,t?r:[-1,-1]),n[22]&&n[22].id===n[56].id?a?r[0]&20971520&&W(a,1):(a=Qe(),a.c(),W(a,1),a.m(i.parentNode,i)):a&&(ae(),L(a,1,1,()=>{a=null}),fe())},i(n){t||(W(f,n),W(a),t=!0)},o(n){L(f,n),L(a),t=!1},d(n){f&&f.d(n),n&&v(e),a&&a.d(n),n&&v(i)}}}function Ze(l,e){let i,t,s;function o(...a){return e[49](e[56],e[58],...a)}function f(){return e[50](e[56],e[58])}return t=new xl({props:{id:e[56].id,active:e[0]===e[56].id,highlighted:e[23]===e[58],disabled:e[56].disabled,$$slots:{default:[si]},$$scope:{ctx:e}}}),t.$on("click",o),t.$on("mouseenter",f),{key:l,first:null,c(){i=y(),G(t.$$.fragment),this.h()},l(a){i=y(),H(t.$$.fragment,a),this.h()},h(){this.first=i},m(a,n){S(a,i,n),J(t,a,n),s=!0},p(a,n){e=a;const r={};n[0]&16777216&&(r.id=e[56].id),n[0]&16777217&&(r.active=e[0]===e[56].id),n[0]&25165824&&(r.highlighted=e[23]===e[58]),n[0]&16777216&&(r.disabled=e[56].disabled),n[0]&20971552|n[1]&4194304&&(r.$$scope={dirty:n,ctx:e}),t.$set(r)},i(a){s||(W(t.$$.fragment,a),s=!0)},o(a){L(t.$$.fragment,a),s=!1},d(a){a&&v(i),Q(t,a)}}}function ui(l){let e=[],i=new Map,t,s,o=l[24];const f=a=>a[56].id;for(let a=0;a<o.length;a+=1){let n=Oe(l,o,a),r=f(n);i.set(r,e[a]=Ze(r,n))}return{c(){for(let a=0;a<e.length;a+=1)e[a].c();t=y()},l(a){for(let n=0;n<e.length;n+=1)e[n].l(a);t=y()},m(a,n){for(let r=0;r<e.length;r+=1)e[r]&&e[r].m(a,n);S(a,t,n),s=!0},p(a,n){n[0]&29360167|n[1]&4194304&&(o=a[24],ae(),e=El(e,n,f,1,a,o,i,t.parentNode,Wl,Ze,t,Oe),fe())},i(a){if(!s){for(let n=0;n<o.length;n+=1)W(e[n]);s=!0}},o(a){for(let n=0;n<e.length;n+=1)L(e[n]);s=!1},d(a){for(let n=0;n<e.length;n+=1)e[n].d(a);a&&v(t)}}}function oi(l){let e,i,t,s;e=new Kl({props:{role:"button","aria-expanded":l[2],id:l[19],disabled:l[8],translateWithId:l[17],$$slots:{default:[ai]},$$scope:{ctx:l}}}),e.$on("click",l[48]);let o=l[2]&&Je(l);return{c(){G(e.$$.fragment),i=O(),o&&o.c(),t=y()},l(f){H(e.$$.fragment,f),i=X(f),o&&o.l(f),t=y()},m(f,a){J(e,f,a),S(f,i,a),o&&o.m(f,a),S(f,t,a),s=!0},p(f,a){const n={};a[0]&4&&(n["aria-expanded"]=f[2]),a[0]&524288&&(n.id=f[19]),a[0]&256&&(n.disabled=f[8]),a[0]&131072&&(n.translateWithId=f[17]),a[0]&1340040495|a[1]&4194304&&(n.$$scope={dirty:a,ctx:f}),e.$set(n),f[2]?o?(o.p(f,a),a[0]&4&&W(o,1)):(o=Je(f),o.c(),W(o,1),o.m(t.parentNode,t)):o&&(ae(),L(o,1,1,()=>{o=null}),fe())},i(f){s||(W(e.$$.fragment,f),W(o),s=!0)},o(f){L(e.$$.fragment,f),L(o),s=!1},d(f){Q(e,f),f&&v(i),o&&o.d(f),f&&v(t)}}}function we(l){let e,i;return{c(){e=V("div"),i=ie(l[11]),this.h()},l(t){e=R(t,"DIV",{});var s=N(e);i=te(s,l[11]),s.forEach(v),this.h()},h(){I(e,"bx--form__helper-text",!0),I(e,"bx--form__helper-text--disabled",l[8])},m(t,s){S(t,e,s),q(e,i)},p(t,s){s[0]&2048&&ne(i,t[11]),s[0]&256&&I(e,"bx--form__helper-text--disabled",t[8])},d(t){t&&v(e)}}}function ri(l){let e,i,t,s,o,f,a,n=l[9]&&Ye(l);t=new Rl({props:{class:"bx--combo-box "+(l[6]==="top"&&"bx--list-box--up")+" "+(!l[13]&&l[14]&&"bx--combo-box--warning"),id:l[26],"aria-label":l[28],disabled:l[8],invalid:l[13],invalidText:l[12],open:l[2],light:l[16],size:l[7],warn:l[14],warnText:l[15],$$slots:{default:[oi]},$$scope:{ctx:l}}});let r=!l[13]&&l[11]&&!l[14]&&we(l);return{c(){e=V("div"),n&&n.c(),i=O(),G(t.$$.fragment),s=O(),r&&r.c(),this.h()},l(d){e=R(d,"DIV",{});var u=N(e);n&&n.l(u),i=X(u),H(t.$$.fragment,u),s=X(u),r&&r.l(u),u.forEach(v),this.h()},h(){I(e,"bx--list-box__wrapper",!0)},m(d,u){S(d,e,u),n&&n.m(e,null),q(e,i),J(t,e,null),q(e,s),r&&r.m(e,null),o=!0,f||(a=A(window,"click",l[40]),f=!0)},p(d,u){d[9]?n?n.p(d,u):(n=Ye(d),n.c(),n.m(e,i)):n&&(n.d(1),n=null);const b={};u[0]&24640&&(b.class="bx--combo-box "+(d[6]==="top"&&"bx--list-box--up")+" "+(!d[13]&&d[14]&&"bx--combo-box--warning")),u[0]&67108864&&(b.id=d[26]),u[0]&268435456&&(b["aria-label"]=d[28]),u[0]&256&&(b.disabled=d[8]),u[0]&8192&&(b.invalid=d[13]),u[0]&4096&&(b.invalidText=d[12]),u[0]&4&&(b.open=d[2]),u[0]&65536&&(b.light=d[16]),u[0]&128&&(b.size=d[7]),u[0]&16384&&(b.warn=d[14]),u[0]&32768&&(b.warnText=d[15]),u[0]&1608475967|u[1]&4194304&&(b.$$scope={dirty:u,ctx:d}),t.$set(b),!d[13]&&d[11]&&!d[14]?r?r.p(d,u):(r=we(d),r.c(),r.m(e,null)):r&&(r.d(1),r=null)},i(d){o||(W(t.$$.fragment,d),o=!0)},o(d){L(t.$$.fragment,d),o=!1},d(d){d&&v(e),n&&n.d(),Q(t),r&&r.d(),f=!1,a()}}}function di(l,e,i){let t,s,o,f,a;const n=["items","itemToString","selectedId","value","direction","size","disabled","titleText","placeholder","helperText","invalidText","invalid","warn","warnText","light","open","shouldFilterItem","translateWithId","translateWithIdSelection","id","name","ref","listRef","clear"];let r=F(e,n),{$$slots:d={},$$scope:u}=e,{items:b=[]}=e,{itemToString:g=h=>h.text||h.id}=e,{selectedId:_=void 0}=e,{value:m=""}=e,{direction:T="bottom"}=e,{size:c=void 0}=e,{disabled:k=!1}=e,{titleText:w=""}=e,{placeholder:ue=""}=e,{helperText:C=""}=e,{invalidText:ge=""}=e,{invalid:ke=!1}=e,{warn:Ie=!1}=e,{warnText:ve=""}=e,{light:E=!1}=e,{open:D=!1}=e,{shouldFilterItem:Te=()=>!0}=e,{translateWithId:Be=void 0}=e,{translateWithIdSelection:De=void 0}=e,{id:Ee="ccs-"+Math.random().toString(36)}=e,{name:Me=void 0}=e,{ref:Y=null}=e,{listRef:We=null}=e;const $e=xe();let j,de=null,P=-1;function Le(h){let z=P+h,x=a!=null&&a.length?a:b;if(x.length===0)return;z<0?z=x.length-1:z>=x.length&&(z=0);let be=b[z].disabled;for(;be;)z=z+h,z<0?z=b.length-1:z>=b.length&&(z=0),be=b[z].disabled;i(23,P=z)}function Ne(h={}){i(33,de=null),i(23,P=-1),i(25,f=void 0),i(0,_=void 0),i(22,j=void 0),i(2,D=!1),i(1,m=""),(h==null?void 0:h.focus)!==!1&&(Y==null||Y.focus())}kl(()=>{D?(Y.focus(),i(24,a=b.filter(h=>Te(h,m)))):(i(23,P=-1),i(24,a=[]),j?i(1,m=g(j)):(i(0,_=void 0),i(1,m=""),i(23,P=-1),i(25,f=void 0)))});function el(h){M.call(this,l,h)}function ll(h){M.call(this,l,h)}function il(h){M.call(this,l,h)}function tl(h){M.call(this,l,h)}function nl(h){M.call(this,l,h)}const al=({target:h})=>{D&&Y&&!Y.contains(h)&&i(2,D=!1)};function fl(h){se[h?"unshift":"push"](()=>{Y=h,i(3,Y)})}function sl(){m=this.value,i(1,m)}const ul=({target:h})=>{!D&&h.value.length>0&&i(2,D=!0),m.length||(Ne(),i(2,D=!0))},ol=h=>{var x;const{key:z}=h;if(["Enter","ArrowDown","ArrowUp"].includes(z)&&h.preventDefault(),z==="Enter"){if(i(2,D=!D),P>-1&&((x=a[P])==null?void 0:x.id)!==_)i(2,D=!1),a[P]&&(i(1,m=g(a[P])),i(22,j=a[P]),i(0,_=a[P].id));else{const be=a.find(Ce=>Ce.text.toLowerCase()===(m==null?void 0:m.toLowerCase())&&!Ce.disabled)??a.find(Ce=>!Ce.disabled);be&&(i(2,D=!1),i(22,j=be),i(1,m=g(j)),i(0,_=j.id))}i(23,P=-1)}else z==="Tab"?i(2,D=!1):z==="ArrowDown"?Le(1):z==="ArrowUp"?Le(-1):z==="Escape"&&i(2,D=!1)},rl=({relatedTarget:h})=>{!D||!h||h&&!["INPUT","SELECT","TEXTAREA"].includes(h.tagName)&&h.getAttribute("role")!=="button"&&h.getAttribute("role")!=="searchbox"&&Y.focus()};function dl(h){M.call(this,l,h)}const bl=h=>{k||(h.stopPropagation(),i(2,D=!D))},hl=async()=>{k||(i(2,D=!0),await Il(),Y.focus())},ml=(h,z,x)=>{if(h.disabled){x.stopPropagation();return}i(0,_=h.id),i(2,D=!1),a[z]&&i(1,m=g(a[z]))},cl=(h,z)=>{h.disabled||i(23,P=z)};function _l(h){We=h,i(4,We)}function gl(h){M.call(this,l,h)}return l.$$set=h=>{i(55,e=B(B({},e),Z(h))),i(30,r=F(e,n)),"items"in h&&i(31,b=h.items),"itemToString"in h&&i(5,g=h.itemToString),"selectedId"in h&&i(0,_=h.selectedId),"value"in h&&i(1,m=h.value),"direction"in h&&i(6,T=h.direction),"size"in h&&i(7,c=h.size),"disabled"in h&&i(8,k=h.disabled),"titleText"in h&&i(9,w=h.titleText),"placeholder"in h&&i(10,ue=h.placeholder),"helperText"in h&&i(11,C=h.helperText),"invalidText"in h&&i(12,ge=h.invalidText),"invalid"in h&&i(13,ke=h.invalid),"warn"in h&&i(14,Ie=h.warn),"warnText"in h&&i(15,ve=h.warnText),"light"in h&&i(16,E=h.light),"open"in h&&i(2,D=h.open),"shouldFilterItem"in h&&i(32,Te=h.shouldFilterItem),"translateWithId"in h&&i(17,Be=h.translateWithId),"translateWithIdSelection"in h&&i(18,De=h.translateWithIdSelection),"id"in h&&i(19,Ee=h.id),"name"in h&&i(20,Me=h.name),"ref"in h&&i(3,Y=h.ref),"listRef"in h&&i(4,We=h.listRef),"$$scope"in h&&i(53,u=h.$$scope)},l.$$.update=()=>{l.$$.dirty[0]&2|l.$$.dirty[1]&3&&i(24,a=b.filter(h=>Te(h,m))),l.$$.dirty[0]&20971525|l.$$.dirty[1]&5&&(_!==void 0?de!==_&&(i(33,de=_),(a==null?void 0:a.length)===1&&D?(i(0,_=a[0].id),i(22,j=a[0]),i(23,P=-1),i(25,f=void 0)):i(22,j=b.find(h=>h.id===_)),$e("select",{selectedId:_,selectedItem:j})):(i(33,de=_),i(22,j=void 0))),i(28,t=e["aria-label"]||"Choose an item"),l.$$.dirty[0]&524288&&i(27,s=`menu-${Ee}`),l.$$.dirty[0]&524288&&i(26,o=`combo-${Ee}`),l.$$.dirty[0]&8388608|l.$$.dirty[1]&1&&i(25,f=b[P]?b[P].id:0)},e=Z(e),[_,m,D,Y,We,g,T,c,k,w,ue,C,ge,ke,Ie,ve,E,Be,De,Ee,Me,Ne,j,P,a,f,o,s,t,Le,r,b,Te,de,d,el,ll,il,tl,nl,al,fl,sl,ul,ol,rl,dl,bl,hl,ml,cl,_l,gl,u]}class bi extends p{constructor(e){super(),$(this,e,di,ri,ee,{items:31,itemToString:5,selectedId:0,value:1,direction:6,size:7,disabled:8,titleText:9,placeholder:10,helperText:11,invalidText:12,invalid:13,warn:14,warnText:15,light:16,open:2,shouldFilterItem:32,translateWithId:17,translateWithIdSelection:18,id:19,name:20,ref:3,listRef:4,clear:21},null,[-1,-1])}get clear(){return this.$$.ctx[21]}}const ci=bi;export{ci as C};
lilac/web/_app/immutable/chunks/Commands.1fffdf33.js ADDED
The diff for this file is too large to render. See raw diff
 
lilac/web/_app/immutable/chunks/Commands.539ca0ee.js ADDED
The diff for this file is too large to render. See raw diff
 
lilac/web/_app/immutable/chunks/ConceptView.6611745d.js ADDED
@@ -0,0 +1 @@
 
 
1
+ import{S as ce,i as fe,s as ue,E as _e,Z as ae,_ as ie,m as D,h as g,n as S,$ as Se,b as L,a0 as b,L as qe,a1 as X,N as Ce,Q as Te,q as Z,r as j,u as ne,D as At,k as T,a as G,l as z,c as W,H as Le,I as Pt,J as Rt,K as Bt,v as te,d as V,f as le,g as k,y as N,z as H,A as O,B as F,w as Ee,T as Ve,U as De,a4 as Ae,C as xt,a6 as xe,O as Ie,ab as ye,a7 as Nt,aa as el,G as Pe,o as tl,e as we,M as ll}from"./index.b7741aa8.js";import{g as Ht}from"./navigation.10308c75.js";import{ae as nl,x as $e,ar as rl,as as sl,B as Ye,P as Ge,h as Ot,S as Ze,U as Ft,at as al,au as il,av as ol,aw as cl,c as Lt,a as He,e as fl,ax as Ut,a4 as Re,X as ul,z as Me,ay as dl,y as ml,O as Qt,af as qt,L as Be,az as Ne,a9 as Oe,aA as Yt,ag as et,ak as Zt,b as _l}from"./Commands.539ca0ee.js";import{f as jt}from"./utils.f3891c80.js";import{T as hl,S as gl,a as Gt,b as Wt}from"./StringSpanHighlight.d39d06de.js";import{C as pl,a as bl}from"./ChevronUp.4e645b65.js";import{g as Kt}from"./settingsStore.9e0a77f3.js";import{i as vl,r as $l}from"./notificationsStore.87d33d60.js";import{A as wl}from"./ArrowUpRight.0bb31a07.js";import{T as Jt}from"./ToastNotification.94abd3f6.js";function tt(r){let e,l;return{c(){e=ae("title"),l=Z(r[1])},l(t){e=ie(t,"title",{});var n=D(e);l=j(n,r[1]),n.forEach(g)},m(t,n){L(t,e,n),b(e,l)},p(t,n){n&2&&ne(l,t[1])},d(t){t&&g(e)}}}function kl(r){let e,l,t,n=r[1]&&tt(r),o=[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},{width:r[0]},{height:r[0]},r[2],r[3]],s={};for(let a=0;a<o.length;a+=1)s=_e(s,o[a]);return{c(){e=ae("svg"),n&&n.c(),l=ae("path"),t=ae("path"),this.h()},l(a){e=ie(a,"svg",{xmlns:!0,viewBox:!0,fill:!0,preserveAspectRatio:!0,width:!0,height:!0});var i=D(e);n&&n.l(i),l=ie(i,"path",{d:!0}),D(l).forEach(g),t=ie(i,"path",{d:!0}),D(t).forEach(g),i.forEach(g),this.h()},h(){S(l,"d","M11,11V21H21V11Zm8,8H13V13h6Z"),S(t,"d","M30,13V11H26V8a2,2,0,0,0-2-2H21V2H19V6H13V2H11V6H8A2,2,0,0,0,6,8v3H2v2H6v6H2v2H6v3a2,2,0,0,0,2,2h3v4h2V26h6v4h2V26h3a2,2,0,0,0,2-2V21h4V19H26V13ZM24,24H8V8H24Z"),Se(e,s)},m(a,i){L(a,e,i),n&&n.m(e,null),b(e,l),b(e,t)},p(a,[i]){a[1]?n?n.p(a,i):(n=tt(a),n.c(),n.m(e,l)):n&&(n.d(1),n=null),Se(e,s=qe(o,[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},i&1&&{width:a[0]},i&1&&{height:a[0]},i&4&&a[2],i&8&&a[3]]))},i:X,o:X,d(a){a&&g(e),n&&n.d()}}}function El(r,e,l){let t,n;const o=["size","title"];let s=Ce(e,o),{size:a=16}=e,{title:i=void 0}=e;return r.$$set=c=>{l(5,e=_e(_e({},e),Te(c))),l(3,s=Ce(e,o)),"size"in c&&l(0,a=c.size),"title"in c&&l(1,i=c.title)},r.$$.update=()=>{l(4,t=e["aria-label"]||e["aria-labelledby"]||i),l(2,n={"aria-hidden":t?void 0:!0,role:t?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=Te(e),[a,i,n,s,t]}class lt extends ce{constructor(e){super(),fe(this,e,El,kl,ue,{size:0,title:1})}}function nt(r){let e,l;return{c(){e=ae("title"),l=Z(r[1])},l(t){e=ie(t,"title",{});var n=D(e);l=j(n,r[1]),n.forEach(g)},m(t,n){L(t,e,n),b(e,l)},p(t,n){n&2&&ne(l,t[1])},d(t){t&&g(e)}}}function Vl(r){let e,l,t=r[1]&&nt(r),n=[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},{width:r[0]},{height:r[0]},r[2],r[3]],o={};for(let s=0;s<n.length;s+=1)o=_e(o,n[s]);return{c(){e=ae("svg"),t&&t.c(),l=ae("path"),this.h()},l(s){e=ie(s,"svg",{xmlns:!0,viewBox:!0,fill:!0,preserveAspectRatio:!0,width:!0,height:!0});var a=D(e);t&&t.l(a),l=ie(a,"path",{d:!0}),D(l).forEach(g),a.forEach(g),this.h()},h(){S(l,"d","M16,2A14,14,0,1,0,30,16,14.0158,14.0158,0,0,0,16,2Zm0,26A12,12,0,0,1,16,4V16l8.4812,8.4814A11.9625,11.9625,0,0,1,16,28Z"),Se(e,o)},m(s,a){L(s,e,a),t&&t.m(e,null),b(e,l)},p(s,[a]){s[1]?t?t.p(s,a):(t=nt(s),t.c(),t.m(e,l)):t&&(t.d(1),t=null),Se(e,o=qe(n,[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},a&1&&{width:s[0]},a&1&&{height:s[0]},a&4&&s[2],a&8&&s[3]]))},i:X,o:X,d(s){s&&g(e),t&&t.d()}}}function Dl(r,e,l){let t,n;const o=["size","title"];let s=Ce(e,o),{size:a=16}=e,{title:i=void 0}=e;return r.$$set=c=>{l(5,e=_e(_e({},e),Te(c))),l(3,s=Ce(e,o)),"size"in c&&l(0,a=c.size),"title"in c&&l(1,i=c.title)},r.$$.update=()=>{l(4,t=e["aria-label"]||e["aria-labelledby"]||i),l(2,n={"aria-hidden":t?void 0:!0,role:t?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=Te(e),[a,i,n,s,t]}class Kn extends ce{constructor(e){super(),fe(this,e,Dl,Vl,ue,{size:0,title:1})}}function rt(r){let e,l;return{c(){e=ae("title"),l=Z(r[1])},l(t){e=ie(t,"title",{});var n=D(e);l=j(n,r[1]),n.forEach(g)},m(t,n){L(t,e,n),b(e,l)},p(t,n){n&2&&ne(l,t[1])},d(t){t&&g(e)}}}function Il(r){let e,l,t,n=r[1]&&rt(r),o=[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},{width:r[0]},{height:r[0]},r[2],r[3]],s={};for(let a=0;a<o.length;a+=1)s=_e(s,o[a]);return{c(){e=ae("svg"),n&&n.c(),l=ae("path"),t=ae("path"),this.h()},l(a){e=ie(a,"svg",{xmlns:!0,viewBox:!0,fill:!0,preserveAspectRatio:!0,width:!0,height:!0});var i=D(e);n&&n.l(i),l=ie(i,"path",{d:!0}),D(l).forEach(g),t=ie(i,"path",{d:!0}),D(t).forEach(g),i.forEach(g),this.h()},h(){S(l,"d","M12 12H14V24H12zM18 12H20V24H18z"),S(t,"d","M4 6V8H6V28a2 2 0 002 2H24a2 2 0 002-2V8h2V6zM8 28V8H24V28zM12 2H20V4H12z"),Se(e,s)},m(a,i){L(a,e,i),n&&n.m(e,null),b(e,l),b(e,t)},p(a,[i]){a[1]?n?n.p(a,i):(n=rt(a),n.c(),n.m(e,l)):n&&(n.d(1),n=null),Se(e,s=qe(o,[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},i&1&&{width:a[0]},i&1&&{height:a[0]},i&4&&a[2],i&8&&a[3]]))},i:X,o:X,d(a){a&&g(e),n&&n.d()}}}function yl(r,e,l){let t,n;const o=["size","title"];let s=Ce(e,o),{size:a=16}=e,{title:i=void 0}=e;return r.$$set=c=>{l(5,e=_e(_e({},e),Te(c))),l(3,s=Ce(e,o)),"size"in c&&l(0,a=c.size),"title"in c&&l(1,i=c.title)},r.$$.update=()=>{l(4,t=e["aria-label"]||e["aria-labelledby"]||i),l(2,n={"aria-hidden":t?void 0:!0,role:t?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=Te(e),[a,i,n,s,t]}class Sl extends ce{constructor(e){super(),fe(this,e,yl,Il,ue,{size:0,title:1})}}function st(r){let e,l;return{c(){e=ae("title"),l=Z(r[1])},l(t){e=ie(t,"title",{});var n=D(e);l=j(n,r[1]),n.forEach(g)},m(t,n){L(t,e,n),b(e,l)},p(t,n){n&2&&ne(l,t[1])},d(t){t&&g(e)}}}function Cl(r){let e,l,t,n=r[1]&&st(r),o=[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},{width:r[0]},{height:r[0]},r[2],r[3]],s={};for(let a=0;a<o.length;a+=1)s=_e(s,o[a]);return{c(){e=ae("svg"),n&&n.c(),l=ae("path"),t=ae("path"),this.h()},l(a){e=ie(a,"svg",{xmlns:!0,viewBox:!0,fill:!0,preserveAspectRatio:!0,width:!0,height:!0});var i=D(e);n&&n.l(i),l=ie(i,"path",{d:!0}),D(l).forEach(g),t=ie(i,"path",{d:!0}),D(t).forEach(g),i.forEach(g),this.h()},h(){S(l,"d","M5.24,22.51l1.43-1.42A14.06,14.06,0,0,1,3.07,16C5.1,10.93,10.7,7,16,7a12.38,12.38,0,0,1,4,.72l1.55-1.56A14.72,14.72,0,0,0,16,5,16.69,16.69,0,0,0,1.06,15.66a1,1,0,0,0,0,.68A16,16,0,0,0,5.24,22.51Z"),S(t,"d","M12 15.73a4 4 0 013.7-3.7l1.81-1.82a6 6 0 00-7.33 7.33zM30.94 15.66A16.4 16.4 0 0025.2 8.22L30 3.41 28.59 2 2 28.59 3.41 30l5.1-5.1A15.29 15.29 0 0016 27 16.69 16.69 0 0030.94 16.34 1 1 0 0030.94 15.66zM20 16a4 4 0 01-6 3.44L19.44 14A4 4 0 0120 16zm-4 9a13.05 13.05 0 01-6-1.58l2.54-2.54a6 6 0 008.35-8.35l2.87-2.87A14.54 14.54 0 0128.93 16C26.9 21.07 21.3 25 16 25z"),Se(e,s)},m(a,i){L(a,e,i),n&&n.m(e,null),b(e,l),b(e,t)},p(a,[i]){a[1]?n?n.p(a,i):(n=st(a),n.c(),n.m(e,l)):n&&(n.d(1),n=null),Se(e,s=qe(o,[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},i&1&&{width:a[0]},i&1&&{height:a[0]},i&4&&a[2],i&8&&a[3]]))},i:X,o:X,d(a){a&&g(e),n&&n.d()}}}function Tl(r,e,l){let t,n;const o=["size","title"];let s=Ce(e,o),{size:a=16}=e,{title:i=void 0}=e;return r.$$set=c=>{l(5,e=_e(_e({},e),Te(c))),l(3,s=Ce(e,o)),"size"in c&&l(0,a=c.size),"title"in c&&l(1,i=c.title)},r.$$.update=()=>{l(4,t=e["aria-label"]||e["aria-labelledby"]||i),l(2,n={"aria-hidden":t?void 0:!0,role:t?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=Te(e),[a,i,n,s,t]}class zl extends ce{constructor(e){super(),fe(this,e,Tl,Cl,ue,{size:0,title:1})}}const Ml=r=>({}),at=r=>({}),Al=r=>({}),it=r=>({});function Pl(r){let e,l;return e=new pl({}),{c(){N(e.$$.fragment)},l(t){H(e.$$.fragment,t)},m(t,n){O(e,t,n),l=!0},i(t){l||(k(e.$$.fragment,t),l=!0)},o(t){V(e.$$.fragment,t),l=!1},d(t){F(e,t)}}}function Rl(r){let e,l;return e=new bl({}),{c(){N(e.$$.fragment)},l(t){H(e.$$.fragment,t)},m(t,n){O(e,t,n),l=!0},i(t){l||(k(e.$$.fragment,t),l=!0)},o(t){V(e.$$.fragment,t),l=!1},d(t){F(e,t)}}}function ot(r){let e,l;const t=r[2].below,n=At(t,r,r[1],at);return{c(){e=T("div"),n&&n.c(),this.h()},l(o){e=z(o,"DIV",{class:!0});var s=D(e);n&&n.l(s),s.forEach(g),this.h()},h(){S(e,"class","p-4")},m(o,s){L(o,e,s),n&&n.m(e,null),l=!0},p(o,s){n&&n.p&&(!l||s&2)&&Pt(n,t,o,o[1],l?Bt(t,o[1],s,Ml):Rt(o[1]),at)},i(o){l||(k(n,o),l=!0)},o(o){V(n,o),l=!1},d(o){o&&g(e),n&&n.d(o)}}}function Bl(r){let e,l,t,n,o,s,a,i,c,f;const E=r[2].above,m=At(E,r,r[1],it),h=[Rl,Pl],u=[];function $(d,_){return d[0]?0:1}o=$(r),s=u[o]=h[o](r);let p=r[0]&&ot(r);return{c(){e=T("div"),l=T("button"),t=T("div"),m&&m.c(),n=G(),s.c(),a=G(),p&&p.c(),this.h()},l(d){e=z(d,"DIV",{class:!0});var _=D(e);l=z(_,"BUTTON",{class:!0});var v=D(l);t=z(v,"DIV",{class:!0});var w=D(t);m&&m.l(w),n=W(w),s.l(w),w.forEach(g),v.forEach(g),a=W(_),p&&p.l(_),_.forEach(g),this.h()},h(){S(t,"class","flex items-center justify-between"),S(l,"class","w-full p-4 text-left hover:bg-gray-200"),S(e,"class","rounded-xl border border-gray-200")},m(d,_){L(d,e,_),b(e,l),b(l,t),m&&m.m(t,null),b(t,n),u[o].m(t,null),b(e,a),p&&p.m(e,null),i=!0,c||(f=Le(l,"click",r[3]),c=!0)},p(d,[_]){m&&m.p&&(!i||_&2)&&Pt(m,E,d,d[1],i?Bt(E,d[1],_,Al):Rt(d[1]),it);let v=o;o=$(d),o!==v&&(te(),V(u[v],1,1,()=>{u[v]=null}),le(),s=u[o],s||(s=u[o]=h[o](d),s.c()),k(s,1),s.m(t,null)),d[0]?p?(p.p(d,_),_&1&&k(p,1)):(p=ot(d),p.c(),k(p,1),p.m(e,null)):p&&(te(),V(p,1,1,()=>{p=null}),le())},i(d){i||(k(m,d),k(s),k(p),i=!0)},o(d){V(m,d),V(s),V(p),i=!1},d(d){d&&g(e),m&&m.d(d),u[o].d(),p&&p.d(),c=!1,f()}}}function Nl(r,e,l){let{$$slots:t={},$$scope:n}=e,{expanded:o=!1}=e;const s=()=>l(0,o=!o);return r.$$set=a=>{"expanded"in a&&l(0,o=a.expanded),"$$scope"in a&&l(1,n=a.$$scope)},[o,n,t,s]}class Fe extends ce{constructor(e){super(),fe(this,e,Nl,Bl,ue,{expanded:0})}}function ct(r,e,l){const t=r.slice();return t[6]=e[l],t}function ft(r){let e,l,t=r[6].text+"",n,o,s,a,i,c,f,E;a=new Sl({props:{size:16}});function m(){return r[5](r[6])}return{c(){e=T("div"),l=T("span"),n=Z(t),o=G(),s=T("button"),N(a.$$.fragment),i=G(),this.h()},l(h){e=z(h,"DIV",{class:!0});var u=D(e);l=z(u,"SPAN",{class:!0});var $=D(l);n=j($,t),$.forEach(g),o=W(u),s=z(u,"BUTTON",{title:!0,class:!0});var p=D(s);H(a.$$.fragment,p),p.forEach(g),i=W(u),u.forEach(g),this.h()},h(){S(l,"class","shrink"),S(s,"title","Remove sample"),S(s,"class","shrink-0 opacity-50 hover:text-red-400 hover:opacity-100"),S(e,"class","flex w-full justify-between gap-x-2 border-b border-gray-200 p-2 hover:bg-gray-50")},m(h,u){L(h,e,u),b(e,l),b(l,n),b(e,o),b(e,s),O(a,s,null),b(e,i),c=!0,f||(E=Le(s,"click",m),f=!0)},p(h,u){r=h,(!c||u&1)&&t!==(t=r[6].text+"")&&ne(n,t)},i(h){c||(k(a.$$.fragment,h),c=!0)},o(h){V(a.$$.fragment,h),c=!1},d(h){h&&g(e),F(a),f=!1,E()}}}function Hl(r){let e,l,t,n,o,s;function a(m){r[3](m)}let i={labelText:"Add example"};r[1]!==void 0&&(i.value=r[1]),l=new nl({props:i}),Ee.push(()=>Ve(l,"value",a)),l.$on("keydown",r[4]);let c=[...r[0]].reverse(),f=[];for(let m=0;m<c.length;m+=1)f[m]=ft(ct(r,c,m));const E=m=>V(f[m],1,1,()=>{f[m]=null});return{c(){e=T("div"),N(l.$$.fragment),n=G(),o=T("div");for(let m=0;m<f.length;m+=1)f[m].c();this.h()},l(m){e=z(m,"DIV",{class:!0});var h=D(e);H(l.$$.fragment,h),h.forEach(g),n=W(m),o=z(m,"DIV",{class:!0});var u=D(o);for(let $=0;$<f.length;$+=1)f[$].l(u);u.forEach(g),this.h()},h(){S(e,"class",""),S(o,"class","flex h-full w-full flex-col overflow-y-auto overflow-x-clip border border-gray-200")},m(m,h){L(m,e,h),O(l,e,null),L(m,n,h),L(m,o,h);for(let u=0;u<f.length;u+=1)f[u]&&f[u].m(o,null);s=!0},p(m,[h]){const u={};if(!t&&h&2&&(t=!0,u.value=m[1],De(()=>t=!1)),l.$set(u),h&5){c=[...m[0]].reverse();let $;for($=0;$<c.length;$+=1){const p=ct(m,c,$);f[$]?(f[$].p(p,h),k(f[$],1)):(f[$]=ft(p),f[$].c(),k(f[$],1),f[$].m(o,null))}for(te(),$=c.length;$<f.length;$+=1)E($);le()}},i(m){if(!s){k(l.$$.fragment,m);for(let h=0;h<c.length;h+=1)k(f[h]);s=!0}},o(m){V(l.$$.fragment,m),f=f.filter(Boolean);for(let h=0;h<f.length;h+=1)V(f[h]);s=!1},d(m){m&&g(e),F(l),m&&g(n),m&&g(o),Ae(f,m)}}}function Ol(r,e,l){let{data:t}=e,n;const o=xt();function s(c){n=c,l(1,n)}const a=c=>{c.key==="Enter"&&(o("add",n),l(1,n=""))},i=c=>o("remove",c.id);return r.$$set=c=>{"data"in c&&l(0,t=c.data)},[t,n,o,s,a,i]}class ut extends ce{constructor(e){super(),fe(this,e,Ol,Hl,ue,{data:0})}}const Ue={not_good:"text-red-600",ok:"text-yellow-600",good:"text-green-600",very_good:"text-blue-600",great:"text-purple-600"},Qe={not_good:"Not good",ok:"OK",good:"Good",very_good:"Very good",great:"Great"};function Fl(r){let e,l,t,n,o,s=Qe[r[0].overall]+"",a,i,c,f,E,m,h,u=$e(r[0].f1)+"",$,p,d,_,v,w,I=$e(r[0].recall)+"",y,P,q,C,B,A,M=$e(r[0].precision)+"",U,re,ee,R,de,oe,se=$e(r[0].roc_auc)+"",me;return{c(){e=T("table"),l=T("tr"),t=T("td"),n=Z("Overall score"),o=T("td"),a=Z(s),c=G(),f=T("tr"),E=T("td"),m=Z("F1"),h=T("td"),$=Z(u),p=G(),d=T("tr"),_=T("td"),v=Z("Recall"),w=T("td"),y=Z(I),P=G(),q=T("tr"),C=T("td"),B=Z("Precision"),A=T("td"),U=Z(M),re=G(),ee=T("tr"),R=T("td"),de=Z("Area under ROC"),oe=T("td"),me=Z(se),this.h()},l(J){e=z(J,"TABLE",{class:!0});var Y=D(e);l=z(Y,"TR",{});var x=D(l);t=z(x,"TD",{class:!0});var Q=D(t);n=j(Q,"Overall score"),Q.forEach(g),o=z(x,"TD",{class:!0});var K=D(o);a=j(K,s),K.forEach(g),x.forEach(g),c=W(Y),f=z(Y,"TR",{});var he=D(f);E=z(he,"TD",{class:!0});var be=D(E);m=j(be,"F1"),be.forEach(g),h=z(he,"TD",{class:!0});var ve=D(h);$=j(ve,u),ve.forEach(g),he.forEach(g),p=W(Y),d=z(Y,"TR",{});var ge=D(d);_=z(ge,"TD",{class:!0});var pe=D(_);v=j(pe,"Recall"),pe.forEach(g),w=z(ge,"TD",{class:!0});var ze=D(w);y=j(ze,I),ze.forEach(g),ge.forEach(g),P=W(Y),q=z(Y,"TR",{});var ke=D(q);C=z(ke,"TD",{class:!0});var We=D(C);B=j(We,"Precision"),We.forEach(g),A=z(ke,"TD",{class:!0});var Ke=D(A);U=j(Ke,M),Ke.forEach(g),ke.forEach(g),re=W(Y),ee=z(Y,"TR",{});var je=D(ee);R=z(je,"TD",{class:!0});var Je=D(R);de=j(Je,"Area under ROC"),Je.forEach(g),oe=z(je,"TD",{class:!0});var Xe=D(oe);me=j(Xe,se),Xe.forEach(g),je.forEach(g),Y.forEach(g),this.h()},h(){S(t,"class","svelte-zc5pc5"),S(o,"class",i=xe(Ue[r[0].overall])+" svelte-zc5pc5"),S(E,"class","svelte-zc5pc5"),S(h,"class","svelte-zc5pc5"),S(_,"class","svelte-zc5pc5"),S(w,"class","svelte-zc5pc5"),S(C,"class","svelte-zc5pc5"),S(A,"class","svelte-zc5pc5"),S(R,"class","svelte-zc5pc5"),S(oe,"class","svelte-zc5pc5"),S(e,"class","svelte-zc5pc5")},m(J,Y){L(J,e,Y),b(e,l),b(l,t),b(t,n),b(l,o),b(o,a),b(e,c),b(e,f),b(f,E),b(E,m),b(f,h),b(h,$),b(e,p),b(e,d),b(d,_),b(_,v),b(d,w),b(w,y),b(e,P),b(e,q),b(q,C),b(C,B),b(q,A),b(A,U),b(e,re),b(e,ee),b(ee,R),b(R,de),b(ee,oe),b(oe,me)},p(J,[Y]){Y&1&&s!==(s=Qe[J[0].overall]+"")&&ne(a,s),Y&1&&i!==(i=xe(Ue[J[0].overall])+" svelte-zc5pc5")&&S(o,"class",i),Y&1&&u!==(u=$e(J[0].f1)+"")&&ne($,u),Y&1&&I!==(I=$e(J[0].recall)+"")&&ne(y,I),Y&1&&M!==(M=$e(J[0].precision)+"")&&ne(U,M),Y&1&&se!==(se=$e(J[0].roc_auc)+"")&&ne(me,se)},i:X,o:X,d(J){J&&g(e)}}}function Ll(r,e,l){let{metrics:t}=e;return r.$$set=n=>{"metrics"in n&&l(0,t=n.metrics)},[t]}class dt extends ce{constructor(e){super(),fe(this,e,Ll,Fl,ue,{metrics:0})}}function Ul(r){const e=r.slice(),l=!0;return e[7]=l,e}function Ql(r){let e,l;function t(){return r[6](r[7])}return e=new Ye({props:{icon:r[4].isLoading?Ge:lt,class:"w-28 text-3xl",$$slots:{default:[Zl]},$$scope:{ctx:r}}}),e.$on("click",t),{c(){N(e.$$.fragment)},l(n){H(e.$$.fragment,n)},m(n,o){O(e,n,o),l=!0},p(n,o){r=n;const s={};o&16&&(s.icon=r[4].isLoading?Ge:lt),o&256&&(s.$$scope={dirty:o,ctx:r}),e.$set(s)},i(n){l||(k(e.$$.fragment,n),l=!0)},o(n){V(e.$$.fragment,n),l=!1},d(n){F(e,n)}}}function ql(r){let e,l=Qe[r[3].data.metrics.overall]+"",t,n,o,s,a;return{c(){e=T("div"),t=Z(l),this.h()},l(i){e=z(i,"DIV",{class:!0});var c=D(e);t=j(c,l),c.forEach(g),this.h()},h(){S(e,"class",n="concept-score-pill cursor-default text-2xl font-light "+Ue[r[3].data.metrics.overall])},m(i,c){L(i,e,c),b(e,t),s||(a=Nt(o=Ot.call(null,e,{component:dt,props:{metrics:r[3].data.metrics}})),s=!0)},p(i,c){c&8&&l!==(l=Qe[i[3].data.metrics.overall]+"")&&ne(t,l),c&8&&n!==(n="concept-score-pill cursor-default text-2xl font-light "+Ue[i[3].data.metrics.overall])&&S(e,"class",n),o&&el(o.update)&&c&8&&o.update.call(null,{component:dt,props:{metrics:i[3].data.metrics}})},i:X,o:X,d(i){i&&g(e),s=!1,a()}}}function Yl(r){let e,l,t;return l=new Ge({}),{c(){e=T("div"),N(l.$$.fragment),this.h()},l(n){e=z(n,"DIV",{class:!0});var o=D(e);H(l.$$.fragment,o),o.forEach(g),this.h()},h(){S(e,"class","flex flex-col items-center")},m(n,o){L(n,e,o),O(l,e,null),t=!0},p:X,i(n){t||(k(l.$$.fragment,n),t=!0)},o(n){V(l.$$.fragment,n),t=!1},d(n){n&&g(e),F(l)}}}function Zl(r){let e;return{c(){e=Z("Compute")},l(l){e=j(l,"Compute")},m(l,t){L(l,e,t)},d(l){l&&g(e)}}}function jl(r){let e,l,t,n,o,s,a;const i=[Yl,ql,Ql],c=[];function f(m,h){var u,$;return m[3].isFetching?0:($=(u=m[3])==null?void 0:u.data)!=null&&$.metrics?1:2}function E(m,h){return h===2?Ul(m):m}return o=f(r),s=c[o]=i[o](E(r,o)),{c(){e=T("div"),l=T("div"),t=Z(r[1]),n=G(),s.c(),this.h()},l(m){e=z(m,"DIV",{class:!0});var h=D(e);l=z(h,"DIV",{class:!0});var u=D(l);t=j(u,r[1]),u.forEach(g),n=W(h),s.l(h),h.forEach(g),this.h()},h(){S(l,"class","text-gray-500"),S(e,"class","flex w-36 flex-col items-center gap-y-2 rounded-md border border-b-0 border-gray-200 p-4 shadow-md")},m(m,h){L(m,e,h),b(e,l),b(l,t),b(e,n),c[o].m(e,null),a=!0},p(m,[h]){(!a||h&2)&&ne(t,m[1]);let u=o;o=f(m),o===u?c[o].p(E(m,o),h):(te(),V(c[u],1,1,()=>{c[u]=null}),le(),s=c[o],s?s.p(E(m,o),h):(s=c[o]=i[o](E(m,o)),s.c()),k(s,1),s.m(e,null))},i(m){a||(k(s),a=!0)},o(m){V(s),a=!1},d(m){m&&g(e),c[o].d()}}}function Gl(r,e,l){let t,n,o=X,s=()=>(o(),o=ye(t,m=>l(3,n=m)),t),a;r.$$.on_destroy.push(()=>o());let{concept:i}=e,{embedding:c}=e;const f=rl();Ie(r,f,m=>l(4,a=m));const E=m=>a.mutate([i.namespace,i.concept_name,c,m]);return r.$$set=m=>{"concept"in m&&l(0,i=m.concept),"embedding"in m&&l(1,c=m.embedding)},r.$$.update=()=>{r.$$.dirty&3&&s(l(2,t=sl(i.namespace,i.concept_name,c)))},[i,c,t,n,a,f,E]}class Wl extends ce{constructor(e){super(),fe(this,e,Gl,jl,ue,{concept:0,embedding:1})}}function mt(r,e,l){const t=r.slice();return t[21]=e[l],t}function Kl(r){let e;return{c(){e=Z("Compute")},l(l){e=j(l,"Compute")},m(l,t){L(l,e,t)},d(l){l&&g(e)}}}function _t(r){let e,l;return e=new He({props:{value:r[21].name}}),{c(){N(e.$$.fragment)},l(t){H(e.$$.fragment,t)},m(t,n){O(e,t,n),l=!0},p(t,n){const o={};n&512&&(o.value=t[21].name),e.$set(o)},i(t){l||(k(e.$$.fragment,t),l=!0)},o(t){V(e.$$.fragment,t),l=!1},d(t){F(e,t)}}}function Jl(r){var s;let e,l,t=((s=r[9])==null?void 0:s.data)||[],n=[];for(let a=0;a<t.length;a+=1)n[a]=_t(mt(r,t,a));const o=a=>V(n[a],1,1,()=>{n[a]=null});return{c(){for(let a=0;a<n.length;a+=1)n[a].c();e=we()},l(a){for(let i=0;i<n.length;i+=1)n[i].l(a);e=we()},m(a,i){for(let c=0;c<n.length;c+=1)n[c]&&n[c].m(a,i);L(a,e,i),l=!0},p(a,i){var c;if(i&512){t=((c=a[9])==null?void 0:c.data)||[];let f;for(f=0;f<t.length;f+=1){const E=mt(a,t,f);n[f]?(n[f].p(E,i),k(n[f],1)):(n[f]=_t(E),n[f].c(),k(n[f],1),n[f].m(e.parentNode,e))}for(te(),f=t.length;f<n.length;f+=1)o(f);le()}},i(a){if(!l){for(let i=0;i<t.length;i+=1)k(n[i]);l=!0}},o(a){n=n.filter(Boolean);for(let i=0;i<n.length;i+=1)V(n[i]);l=!1},d(a){Ae(n,a),a&&g(e)}}}function Xl(r){let e,l;return e=new gl({props:{text:r[0],row:r[4],spanPaths:r[6],valuePaths:r[5],embeddings:r[1]?[r[1]]:[]}}),{c(){N(e.$$.fragment)},l(t){H(e.$$.fragment,t)},m(t,n){O(e,t,n),l=!0},p(t,n){const o={};n&1&&(o.text=t[0]),n&16&&(o.row=t[4]),n&64&&(o.spanPaths=t[6]),n&32&&(o.valuePaths=t[5]),n&2&&(o.embeddings=t[1]?[t[1]]:[]),e.$set(o)},i(t){l||(k(e.$$.fragment,t),l=!0)},o(t){V(e.$$.fragment,t),l=!1},d(t){F(e,t)}}}function xl(r){let e,l;return e=new Lt({}),{c(){N(e.$$.fragment)},l(t){H(e.$$.fragment,t)},m(t,n){O(e,t,n),l=!0},p:X,i(t){l||(k(e.$$.fragment,t),l=!0)},o(t){V(e.$$.fragment,t),l=!1},d(t){F(e,t)}}}function en(r){let e,l,t,n,o,s,a,i,c,f,E,m,h,u,$,p;t=new hl({props:{value:r[3],cols:50,placeholder:"Paste text to try the concept.",rows:6,class:"mb-2"}}),t.$on("input",r[12]),a=new Ye({props:{$$slots:{default:[Kl]},$$scope:{ctx:r}}}),a.$on("click",r[18]);function d(y){r[19](y)}let _={labelText:"Embedding",$$slots:{default:[Jl]},$$scope:{ctx:r}};r[1]!==void 0&&(_.selected=r[1]),f=new Ze({props:_}),Ee.push(()=>Ve(f,"selected",d));const v=[xl,Xl],w=[];function I(y,P){var q;return y[7]&&((q=y[2])!=null&&q.isFetching)?0:y[4]!=null&&y[0]!=null?1:-1}return~(u=I(r))&&($=w[u]=v[u](r)),{c(){e=T("div"),l=T("div"),N(t.$$.fragment),n=G(),o=T("div"),s=T("div"),N(a.$$.fragment),i=G(),c=T("div"),N(f.$$.fragment),m=G(),h=T("div"),$&&$.c(),this.h()},l(y){e=z(y,"DIV",{class:!0});var P=D(e);l=z(P,"DIV",{});var q=D(l);H(t.$$.fragment,q),n=W(q),o=z(q,"DIV",{class:!0});var C=D(o);s=z(C,"DIV",{class:!0});var B=D(s);H(a.$$.fragment,B),B.forEach(g),i=W(C),c=z(C,"DIV",{class:!0});var A=D(c);H(f.$$.fragment,A),A.forEach(g),C.forEach(g),q.forEach(g),m=W(P),h=z(P,"DIV",{class:!0});var M=D(h);$&&$.l(M),M.forEach(g),P.forEach(g),this.h()},h(){S(s,"class","pt-4"),S(c,"class","mb-2 w-32"),S(o,"class","flex flex-row justify-between"),S(h,"class","mt-4 border-gray-200"),Pe(h,"border-t",r[0]!=null),S(e,"class","flex flex-col gap-x-8")},m(y,P){L(y,e,P),b(e,l),O(t,l,null),b(l,n),b(l,o),b(o,s),O(a,s,null),b(o,i),b(o,c),O(f,c,null),b(e,m),b(e,h),~u&&w[u].m(h,null),p=!0},p(y,[P]){const q={};P&8&&(q.value=y[3]),t.$set(q);const C={};P&16777216&&(C.$$scope={dirty:P,ctx:y}),a.$set(C);const B={};P&16777728&&(B.$$scope={dirty:P,ctx:y}),!E&&P&2&&(E=!0,B.selected=y[1],De(()=>E=!1)),f.$set(B);let A=u;u=I(y),u===A?~u&&w[u].p(y,P):($&&(te(),V(w[A],1,1,()=>{w[A]=null}),le()),~u?($=w[u],$?$.p(y,P):($=w[u]=v[u](y),$.c()),k($,1),$.m(h,null)):$=null),(!p||P&1)&&Pe(h,"border-t",y[0]!=null)},i(y){p||(k(t.$$.fragment,y),k(a.$$.fragment,y),k(f.$$.fragment,y),k($),p=!0)},o(y){V(t.$$.fragment,y),V(a.$$.fragment,y),V(f.$$.fragment,y),V($),p=!1},d(y){y&&g(e),F(t),F(a),F(f),~u&&w[u].d()}}}function tn(r,e,l){var M;let t,n,o,s,a=X,i=()=>(a(),a=ye(o,U=>l(2,s=U)),o),c,f=X,E=()=>(f(),f=ye(n,U=>l(17,c=U)),n),m,h;r.$$.on_destroy.push(()=>a()),r.$$.on_destroy.push(()=>f());let{concept:u}=e,{example:$}=e;const p=Ft();Ie(r,p,U=>l(9,h=U));const d=Kt();Ie(r,d,U=>l(20,m=U));let _=(M=$.text)==null?void 0:M.trim();tl(()=>{y()});function v(U){l(3,_=U.target.value),l(0,w=void 0)}let w,I=m.embedding;function y(){l(0,w=_)}let P,q,C;const B=()=>y();function A(U){I=U,l(1,I)}return r.$$set=U=>{"concept"in U&&l(14,u=U.concept),"example"in U&&l(15,$=U.example)},r.$$.update=()=>{var U;if(r.$$.dirty&32768&&$.text&&(l(3,_=$.text.trim()),l(0,w=void 0)),r.$$.dirty&16386&&l(16,t={signal_name:"concept_score",concept_name:u.concept_name,namespace:u.namespace,embedding:I}),r.$$.dirty&65536&&E(l(8,n=t.embedding?al({signal:t}):void 0)),r.$$.dirty&16387&&i(l(7,o=I!=null&&w!=null?il(u.namespace,u.concept_name,I,{examples:[{text:w}]}):null)),r.$$.dirty&196614&&(s==null?void 0:s.data)!=null&&I!=null&&((U=c==null?void 0:c.data)==null?void 0:U.fields)!=null){const re=ol(c.data.fields);re.signal=t,l(4,P=cl(s.data[0],re));const ee=vl(re);l(6,C=ee.spanPaths),l(5,q=ee.valuePaths)}},[w,I,s,_,P,q,C,o,n,h,p,d,v,y,u,$,t,c,B,A]}class ln extends ce{constructor(e){super(),fe(this,e,tn,en,ue,{concept:14,example:15})}}function ht(r,e,l){const t=r.slice();return t[20]=e[l],t}function gt(r,e,l){const t=r.slice();return t[23]=e[l],t}function pt(r,e,l){const t=r.slice();return t[1]=e[l],t}function nn(r){let e,l;return e=new Ze({props:{labelText:"Dataset",selected:r[7],$$slots:{default:[an]},$$scope:{ctx:r}}}),e.$on("change",r[11]),{c(){N(e.$$.fragment)},l(t){H(e.$$.fragment,t)},m(t,n){O(e,t,n),l=!0},p(t,n){const o={};n&128&&(o.selected=t[7]),n&268435472&&(o.$$scope={dirty:n,ctx:t}),e.$set(o)},i(t){l||(k(e.$$.fragment,t),l=!0)},o(t){V(e.$$.fragment,t),l=!1},d(t){F(e,t)}}}function rn(r){let e,l;return e=new Qt({props:{kind:"error",title:"Error",subtitle:r[4].error.message,hideCloseButton:!0}}),{c(){N(e.$$.fragment)},l(t){H(e.$$.fragment,t)},m(t,n){O(e,t,n),l=!0},p(t,n){const o={};n&16&&(o.subtitle=t[4].error.message),e.$set(o)},i(t){l||(k(e.$$.fragment,t),l=!0)},o(t){V(e.$$.fragment,t),l=!1},d(t){F(e,t)}}}function sn(r){let e,l;return e=new qt({}),{c(){N(e.$$.fragment)},l(t){H(e.$$.fragment,t)},m(t,n){O(e,t,n),l=!0},p:X,i(t){l||(k(e.$$.fragment,t),l=!0)},o(t){V(e.$$.fragment,t),l=!1},d(t){F(e,t)}}}function bt(r){let e,l;return e=new He({props:{value:`${r[1].namespace}/${r[1].dataset_name}`}}),{c(){N(e.$$.fragment)},l(t){H(e.$$.fragment,t)},m(t,n){O(e,t,n),l=!0},p(t,n){const o={};n&16&&(o.value=`${t[1].namespace}/${t[1].dataset_name}`),e.$set(o)},i(t){l||(k(e.$$.fragment,t),l=!0)},o(t){V(e.$$.fragment,t),l=!1},d(t){F(e,t)}}}function an(r){let e,l,t,n;e=new He({props:{value:"",text:"none"}});let o=r[4].data,s=[];for(let i=0;i<o.length;i+=1)s[i]=bt(pt(r,o,i));const a=i=>V(s[i],1,1,()=>{s[i]=null});return{c(){N(e.$$.fragment),l=G();for(let i=0;i<s.length;i+=1)s[i].c();t=we()},l(i){H(e.$$.fragment,i),l=W(i);for(let c=0;c<s.length;c+=1)s[c].l(i);t=we()},m(i,c){O(e,i,c),L(i,l,c);for(let f=0;f<s.length;f+=1)s[f]&&s[f].m(i,c);L(i,t,c),n=!0},p(i,c){if(c&16){o=i[4].data;let f;for(f=0;f<o.length;f+=1){const E=pt(i,o,f);s[f]?(s[f].p(E,c),k(s[f],1)):(s[f]=bt(E),s[f].c(),k(s[f],1),s[f].m(t.parentNode,t))}for(te(),f=o.length;f<s.length;f+=1)a(f);le()}},i(i){if(!n){k(e.$$.fragment,i);for(let c=0;c<o.length;c+=1)k(s[c]);n=!0}},o(i){V(e.$$.fragment,i),s=s.filter(Boolean);for(let c=0;c<s.length;c+=1)V(s[c]);n=!1},d(i){F(e,i),i&&g(l),Ae(s,i),i&&g(t)}}}function on(r){let e,l;return e=new Ze({props:{labelText:"Field with embeddings",selected:r[6],$$slots:{default:[un]},$$scope:{ctx:r}}}),e.$on("change",r[12]),{c(){N(e.$$.fragment)},l(t){H(e.$$.fragment,t)},m(t,n){O(e,t,n),l=!0},p(t,n){const o={};n&64&&(o.selected=t[6]),n&268435460&&(o.$$scope={dirty:n,ctx:t}),e.$set(o)},i(t){l||(k(e.$$.fragment,t),l=!0)},o(t){V(e.$$.fragment,t),l=!1},d(t){F(e,t)}}}function cn(r){let e,l;return e=new Qt({props:{kind:"error",title:"Error",subtitle:r[3].error.message,hideCloseButton:!0}}),{c(){N(e.$$.fragment)},l(t){H(e.$$.fragment,t)},m(t,n){O(e,t,n),l=!0},p(t,n){const o={};n&8&&(o.subtitle=t[3].error.message),e.$set(o)},i(t){l||(k(e.$$.fragment,t),l=!0)},o(t){V(e.$$.fragment,t),l=!1},d(t){F(e,t)}}}function fn(r){let e,l;return e=new qt({}),{c(){N(e.$$.fragment)},l(t){H(e.$$.fragment,t)},m(t,n){O(e,t,n),l=!0},p:X,i(t){l||(k(e.$$.fragment,t),l=!0)},o(t){V(e.$$.fragment,t),l=!1},d(t){F(e,t)}}}function vt(r){let e,l;return e=new He({props:{value:Me(r[23].path)}}),{c(){N(e.$$.fragment)},l(t){H(e.$$.fragment,t)},m(t,n){O(e,t,n),l=!0},p(t,n){const o={};n&4&&(o.value=Me(t[23].path)),e.$set(o)},i(t){l||(k(e.$$.fragment,t),l=!0)},o(t){V(e.$$.fragment,t),l=!1},d(t){F(e,t)}}}function un(r){let e,l,t=r[2],n=[];for(let s=0;s<t.length;s+=1)n[s]=vt(gt(r,t,s));const o=s=>V(n[s],1,1,()=>{n[s]=null});return{c(){for(let s=0;s<n.length;s+=1)n[s].c();e=we()},l(s){for(let a=0;a<n.length;a+=1)n[a].l(s);e=we()},m(s,a){for(let i=0;i<n.length;i+=1)n[i]&&n[i].m(s,a);L(s,e,a),l=!0},p(s,a){if(a&4){t=s[2];let i;for(i=0;i<t.length;i+=1){const c=gt(s,t,i);n[i]?(n[i].p(c,a),k(n[i],1)):(n[i]=vt(c),n[i].c(),k(n[i],1),n[i].m(e.parentNode,e))}for(te(),i=t.length;i<n.length;i+=1)o(i);le()}},i(s){if(!l){for(let a=0;a<t.length;a+=1)k(n[a]);l=!0}},o(s){n=n.filter(Boolean);for(let a=0;a<n.length;a+=1)V(n[a]);l=!1},d(s){Ae(n,s),s&&g(e)}}}function $t(r){let e,l,t;function n(s){r[19](s)}let o={labelText:"Embedding",$$slots:{default:[dn]},$$scope:{ctx:r}};return r[0]!==void 0&&(o.selected=r[0]),e=new Ze({props:o}),Ee.push(()=>Ve(e,"selected",n)),{c(){N(e.$$.fragment)},l(s){H(e.$$.fragment,s)},m(s,a){O(e,s,a),t=!0},p(s,a){const i={};a&268435488&&(i.$$scope={dirty:a,ctx:s}),!l&&a&1&&(l=!0,i.selected=s[0],De(()=>l=!1)),e.$set(i)},i(s){t||(k(e.$$.fragment,s),t=!0)},o(s){V(e.$$.fragment,s),t=!1},d(s){F(e,s)}}}function wt(r){let e,l;return e=new He({props:{value:r[20]}}),{c(){N(e.$$.fragment)},l(t){H(e.$$.fragment,t)},m(t,n){O(e,t,n),l=!0},p(t,n){const o={};n&32&&(o.value=t[20]),e.$set(o)},i(t){l||(k(e.$$.fragment,t),l=!0)},o(t){V(e.$$.fragment,t),l=!1},d(t){F(e,t)}}}function dn(r){let e,l,t=r[5],n=[];for(let s=0;s<t.length;s+=1)n[s]=wt(ht(r,t,s));const o=s=>V(n[s],1,1,()=>{n[s]=null});return{c(){for(let s=0;s<n.length;s+=1)n[s].c();e=we()},l(s){for(let a=0;a<n.length;a+=1)n[a].l(s);e=we()},m(s,a){for(let i=0;i<n.length;i+=1)n[i]&&n[i].m(s,a);L(s,e,a),l=!0},p(s,a){if(a&32){t=s[5];let i;for(i=0;i<t.length;i+=1){const c=ht(s,t,i);n[i]?(n[i].p(c,a),k(n[i],1)):(n[i]=wt(c),n[i].c(),k(n[i],1),n[i].m(e.parentNode,e))}for(te(),i=t.length;i<n.length;i+=1)o(i);le()}},i(s){if(!l){for(let a=0;a<t.length;a+=1)k(n[a]);l=!0}},o(s){n=n.filter(Boolean);for(let a=0;a<n.length;a+=1)V(n[a]);l=!1},d(s){Ae(n,s),s&&g(e)}}}function mn(r){let e,l,t,n,o,s,a,i,c,f,E;const m=[sn,rn,nn],h=[];function u(v,w){return v[4].isLoading?0:v[4].isError?1:v[4].data.length>0?2:-1}~(t=u(r))&&(n=h[t]=m[t](r));const $=[fn,cn,on],p=[];function d(v,w){return v[3].isLoading?0:v[3].isError?1:v[2].length>0?2:-1}~(a=d(r))&&(i=p[a]=$[a](r));let _=r[5].length>0&&$t(r);return{c(){e=T("div"),l=T("div"),n&&n.c(),o=G(),s=T("div"),i&&i.c(),c=G(),f=T("div"),_&&_.c(),this.h()},l(v){e=z(v,"DIV",{class:!0});var w=D(e);l=z(w,"DIV",{class:!0});var I=D(l);n&&n.l(I),I.forEach(g),o=W(w),s=z(w,"DIV",{class:!0});var y=D(s);i&&i.l(y),y.forEach(g),c=W(w),f=z(w,"DIV",{class:!0});var P=D(f);_&&_.l(P),P.forEach(g),w.forEach(g),this.h()},h(){S(l,"class","w-1/3"),S(s,"class","w-1/3"),S(f,"class","w-1/3"),S(e,"class","flex w-full flex-row gap-x-4")},m(v,w){L(v,e,w),b(e,l),~t&&h[t].m(l,null),b(e,o),b(e,s),~a&&p[a].m(s,null),b(e,c),b(e,f),_&&_.m(f,null),E=!0},p(v,[w]){let I=t;t=u(v),t===I?~t&&h[t].p(v,w):(n&&(te(),V(h[I],1,1,()=>{h[I]=null}),le()),~t?(n=h[t],n?n.p(v,w):(n=h[t]=m[t](v),n.c()),k(n,1),n.m(l,null)):n=null);let y=a;a=d(v),a===y?~a&&p[a].p(v,w):(i&&(te(),V(p[y],1,1,()=>{p[y]=null}),le()),~a?(i=p[a],i?i.p(v,w):(i=p[a]=$[a](v),i.c()),k(i,1),i.m(s,null)):i=null),v[5].length>0?_?(_.p(v,w),w&32&&k(_,1)):(_=$t(v),_.c(),k(_,1),_.m(f,null)):_&&(te(),V(_,1,1,()=>{_=null}),le())},i(v){E||(k(n),k(i),k(_),E=!0)},o(v){V(n),V(i),V(_),E=!1},d(v){v&&g(e),~t&&h[t].d(),~a&&p[a].d(),_&&_.d()}}}function _n(r,e,l){let t,n,o,s,a,i,c,f,E,m=X,h=()=>(m(),m=ye(n,C=>l(3,E=C)),n),u,$;r.$$.on_destroy.push(()=>m());let{dataset:p=void 0}=e,{path:d}=e,{embedding:_=void 0}=e;const v=Kt();Ie(r,v,C=>l(18,$=C));let w;const I=fl();Ie(r,I,C=>l(4,u=C));function y(C){const B=C.target.value;if(B==="")l(1,p=null);else{const[A,M]=B.split("/");l(1,p={namespace:A,name:M})}}function P(C){const B=C.target.value;l(13,d=ml(B))}function q(C){_=C,l(0,_),l(15,c),l(13,d),l(14,w),l(2,i),l(3,E),l(17,a)}return r.$$set=C=>{"dataset"in C&&l(1,p=C.dataset),"path"in C&&l(13,d=C.path),"embedding"in C&&l(0,_=C.embedding)},r.$$.update=()=>{if(r.$$.dirty&262144&&l(16,t=[$.embedding,"gte-small","gte-base","openai","sbert"]),r.$$.dirty&18&&u.data&&u.data.length>0&&p===void 0&&l(1,p={namespace:u.data[0].namespace,name:u.data[0].dataset_name}),r.$$.dirty&2&&h(l(8,n=Ut(p==null?void 0:p.namespace,p==null?void 0:p.name))),r.$$.dirty&2&&l(7,o=p?`${p.namespace}/${p.name}`:""),r.$$.dirty&8&&l(14,w=E.data),r.$$.dirty&16384&&l(17,a=w?Re(w).filter(C=>!ul(C,w)&&C.dtype!=null):[]),r.$$.dirty&131072&&l(2,i=a.filter(C=>Re(C).some(B=>B.signal!=null&&Re(B).some(A=>A.dtype==="embedding")))),r.$$.dirty&8196&&d!=null){const C=Me(d);i.some(A=>Me(A.path)===C)||l(13,d=void 0)}r.$$.dirty&8196&&i.length>0&&d==null&&l(13,d=i[0].path),r.$$.dirty&8192&&l(6,s=d?Me(d):void 0),r.$$.dirty&24576&&l(15,c=d&&w?Re(dl(w,d)).filter(C=>C.signal!=null&&Re(C).some(B=>B.dtype==="embedding")):[]),r.$$.dirty&98304&&l(5,f=c.map(C=>C.signal.signal_name).sort((C,B)=>{let A=t.indexOf(C),M=t.indexOf(B);return A===-1&&(A=t.length),M===-1&&(M=t.length),A-M})),r.$$.dirty&32769&&_!=null&&(c.some(B=>B.path.at(-1)===_)||l(0,_=void 0))},[_,p,i,E,u,f,s,o,n,v,I,y,P,d,w,c,t,a,$,q]}class Xt extends ce{constructor(e){super(),fe(this,e,_n,mn,ue,{dataset:1,path:13,embedding:0})}}function hn(r,e,l,t,n,o){const s={...r};if(e==null||l==null)return s;const a=[...e,...l],i=new Set,c=[];for(const u of a){const $=Be.value(Ne(u,[Oe]),"string");if($==null||i.has($))continue;i.add($);const p=Ne(u,n);if(p==null)continue;const d=Be.value(p,"string");if(d==null)continue;const _=`${t.namespace}/${t.concept_name}`,v=Ne(p,[`${_}/${o}`]);if(v==null)continue;const w=Ne(p,[`${_}/labels`]),I=[];if(w!=null)for(const y of w){const P=Be.value(y,"string_span");P!=null&&I.push(P)}for(const y of v){const P=Be.value(y,"string_span");if(P==null||!I.every(A=>A.start>P.end||A.end<P.start))continue;const C=Ne(y,["score"]);if(C==null)continue;const B=Be.value(C,"float32");B!=null&&c.push({rowid:$,text:d,span:P,score:B})}}function f(u){return{rowid:u.rowid,text:$l(u.text,u.span.start,u.span.end),score:u.score}}c.sort((u,$)=>$.score-u.score);const E=c[0],m=c.slice().reverse().find(u=>u!=E);c.sort((u,$)=>Math.abs(u.score-.5)-Math.abs($.score-.5));const h=c.find(u=>u!=E&&u!=m);return E!=null&&s.positive==null&&(s.positive=f(E)),h!=null&&s.neutral==null&&(s.neutral=f(h)),m!=null&&s.negative==null&&(s.negative=f(m)),s}function kt(r,e,l){const t=r.slice();return t[21]=e[l],t}function gn(r){const e=r.slice(),l=$n(e[21].score);e[24]=l;const t=wn(e[21].score);return e[25]=t,e}function pn(r){let e,l,t,n,o,s,a,i,c,f=r[21].text+"",E,m,h,u=r[25]+"",$,p,d=$e(r[21].score,2)+"",_,v,w,I,y,P;n=new Gt({});function q(){return r[18](r[21])}a=new Wt({});function C(){return r[19](r[21])}return{c(){e=T("div"),l=T("div"),t=T("button"),N(n.$$.fragment),o=G(),s=T("button"),N(a.$$.fragment),i=G(),c=T("div"),E=Z(f),m=G(),h=T("div"),$=Z(u),p=G(),_=Z(d),v=G(),this.h()},l(B){e=z(B,"DIV",{class:!0});var A=D(e);l=z(A,"DIV",{class:!0});var M=D(l);t=z(M,"BUTTON",{class:!0});var U=D(t);H(n.$$.fragment,U),U.forEach(g),o=W(M),s=z(M,"BUTTON",{class:!0});var re=D(s);H(a.$$.fragment,re),re.forEach(g),M.forEach(g),i=W(A),c=z(A,"DIV",{class:!0});var ee=D(c);E=j(ee,f),ee.forEach(g),m=W(A),h=z(A,"DIV",{class:!0});var R=D(h);$=j(R,u),p=W(R),_=j(R,d),R.forEach(g),v=W(A),A.forEach(g),this.h()},h(){S(t,"class","p-2 hover:bg-gray-200"),Pe(t,"text-blue-500",r[21].label===!0),S(s,"class","p-2 hover:bg-gray-200"),Pe(s,"text-red-500",r[21].label===!1),S(l,"class","mr-2 flex flex-shrink-0 gap-x-1"),S(c,"class","flex-grow"),S(h,"class","w-40 flex-shrink-0 text-right"),S(e,"class",w=`flex flex-grow items-center whitespace-break-spaces rounded-md border border-gray-300 p-4 pl-2 ${r[24]}`)},m(B,A){L(B,e,A),b(e,l),b(l,t),O(n,t,null),b(l,o),b(l,s),O(a,s,null),b(e,i),b(e,c),b(c,E),b(e,m),b(e,h),b(h,$),b(h,p),b(h,_),b(e,v),I=!0,y||(P=[Le(t,"click",q),Le(s,"click",C)],y=!0)},p(B,A){r=B,(!I||A&2)&&Pe(t,"text-blue-500",r[21].label===!0),(!I||A&2)&&Pe(s,"text-red-500",r[21].label===!1),(!I||A&2)&&f!==(f=r[21].text+"")&&ne(E,f),(!I||A&2)&&u!==(u=r[25]+"")&&ne($,u),(!I||A&2)&&d!==(d=$e(r[21].score,2)+"")&&ne(_,d),(!I||A&2&&w!==(w=`flex flex-grow items-center whitespace-break-spaces rounded-md border border-gray-300 p-4 pl-2 ${r[24]}`))&&S(e,"class",w)},i(B){I||(k(n.$$.fragment,B),k(a.$$.fragment,B),I=!0)},o(B){V(n.$$.fragment,B),V(a.$$.fragment,B),I=!1},d(B){B&&g(e),F(n),F(a),y=!1,ll(P)}}}function bn(r){let e,l;return e=new Lt({props:{paragraph:!0,lines:2}}),{c(){N(e.$$.fragment)},l(t){H(e.$$.fragment,t)},m(t,n){O(e,t,n),l=!0},p:X,i(t){l||(k(e.$$.fragment,t),l=!0)},o(t){V(e.$$.fragment,t),l=!1},d(t){F(e,t)}}}function Et(r){let e,l,t,n,o;const s=[bn,pn],a=[];function i(f,E){return E&3&&(e=null),e==null&&(e=!!(f[21]==null||f[0].includes(f[21].rowid))),e?0:1}function c(f,E){return E===1?gn(f):f}return l=i(r,-1),t=a[l]=s[l](c(r,l)),{c(){t.c(),n=we()},l(f){t.l(f),n=we()},m(f,E){a[l].m(f,E),L(f,n,E),o=!0},p(f,E){let m=l;l=i(f,E),l===m?a[l].p(c(f,l),E):(te(),V(a[m],1,1,()=>{a[m]=null}),le(),t=a[l],t?t.p(c(f,l),E):(t=a[l]=s[l](c(f,l)),t.c()),k(t,1),t.m(n.parentNode,n))},i(f){o||(k(t),o=!0)},o(f){V(t),o=!1},d(f){a[l].d(f),f&&g(n)}}}function vn(r){let e,l,t=r[1],n=[];for(let s=0;s<t.length;s+=1)n[s]=Et(kt(r,t,s));const o=s=>V(n[s],1,1,()=>{n[s]=null});return{c(){e=T("div");for(let s=0;s<n.length;s+=1)n[s].c();this.h()},l(s){e=z(s,"DIV",{class:!0});var a=D(e);for(let i=0;i<n.length;i+=1)n[i].l(a);a.forEach(g),this.h()},h(){S(e,"class","flex flex-col gap-y-4")},m(s,a){L(s,e,a);for(let i=0;i<n.length;i+=1)n[i]&&n[i].m(e,null);l=!0},p(s,[a]){if(a&35){t=s[1];let i;for(i=0;i<t.length;i+=1){const c=kt(s,t,i);n[i]?(n[i].p(c,a),k(n[i],1)):(n[i]=Et(c),n[i].c(),k(n[i],1),n[i].m(e,null))}for(te(),i=t.length;i<n.length;i+=1)o(i);le()}},i(s){if(!l){for(let a=0;a<t.length;a+=1)k(n[a]);l=!0}},o(s){n=n.filter(Boolean);for(let a=0;a<n.length;a+=1)V(n[a]);l=!1},d(s){s&&g(e),Ae(n,s)}}}const Vt=100;function $n(r){return r<.2?"bg-red-500/10":r<.8?"bg-yellow-500/10":"bg-blue-500/10"}function wn(r){return r<.2?"Likely not in concept":r<.8?"Uncertain":"Likely in concept"}function kn(r,e,l){let t,n,o,s,a,i,c,f,E=X,m=()=>(E(),E=ye(a,M=>l(16,f=M)),a),h,u=X,$=()=>(u(),u=ye(n,M=>l(17,h=M)),n);r.$$.on_destroy.push(()=>E()),r.$$.on_destroy.push(()=>u());let{dataset:p}=e,{concept:d}=e,{fieldPath:_}=e,{schema:v}=e,{embedding:w}=e;const I=Yt();Ie(r,I,M=>l(20,c=M));let y={},P={},q=[];function C(M,U){if(M==null)return;const re={text:M.text,label:U},ee=Object.keys(P).find(R=>P[R]===M);l(11,y={...P}),l(0,q=[M.rowid,...q]),c.mutate([d.namespace,d.concept_name,{insert:[re]}],{onSuccess:()=>{l(11,y={...y,[ee]:void 0})},onSettled:()=>{l(0,q=q.filter(R=>R!==M.rowid))}})}const B=M=>C(M,!0),A=M=>C(M,!1);return r.$$set=M=>{"dataset"in M&&l(6,p=M.dataset),"concept"in M&&l(7,d=M.concept),"fieldPath"in M&&l(8,_=M.fieldPath),"schema"in M&&l(9,v=M.schema),"embedding"in M&&l(10,w=M.embedding)},r.$$.update=()=>{var M,U;r.$$.dirty&1408&&l(15,t={path:_,type:"concept",concept_namespace:d.namespace,concept_name:d.concept_name,embedding:w}),r.$$.dirty&33600&&$(l(3,n=et(p.namespace,p.name,{columns:[Oe,_],limit:Vt,combine_columns:!0,searches:[t]},v))),r.$$.dirty&1152&&l(14,o={signal_name:"concept_score",namespace:d.namespace,concept_name:d.concept_name,embedding:w}),r.$$.dirty&128&&l(13,s={signal_name:"concept_labels",namespace:d.namespace,concept_name:d.concept_name}),r.$$.dirty&25408&&m(l(2,a=et(p.namespace,p.name,{columns:[Oe,_,{path:_,signal_udf:o},{path:_,signal_udf:s}],limit:Vt,combine_columns:!0,sort_by:[Oe]},v))),r.$$.dirty&200064&&l(12,P=hn(y,h.isFetching||(M=h.data)==null?void 0:M.rows,f.isFetching||(U=f.data)==null?void 0:U.rows,d,_,w)),r.$$.dirty&4096&&l(1,i=[P.positive,P.neutral,P.negative])},[q,i,a,n,I,C,p,d,_,v,w,y,P,s,o,t,f,h,B,A]}class En extends ce{constructor(e){super(),fe(this,e,kn,vn,ue,{dataset:6,concept:7,fieldPath:8,schema:9,embedding:10})}}function Dt(r){let e,l;return e=new Ye({props:{class:"dataset-link top-7 h-8",icon:wl,iconDescription:"Open dataset and apply concept."}}),e.$on("click",r[8]),{c(){N(e.$$.fragment)},l(t){H(e.$$.fragment,t)},m(t,n){O(e,t,n),l=!0},p:X,i(t){l||(k(e.$$.fragment,t),l=!0)},o(t){V(e.$$.fragment,t),l=!1},d(t){F(e,t)}}}function It(r){let e,l,t;return l=new En({props:{concept:r[0],dataset:r[1],fieldPath:r[2],schema:r[4],embedding:r[3]}}),{c(){e=T("div"),N(l.$$.fragment)},l(n){e=z(n,"DIV",{});var o=D(e);H(l.$$.fragment,o),o.forEach(g)},m(n,o){L(n,e,o),O(l,e,null),t=!0},p(n,o){const s={};o&1&&(s.concept=n[0]),o&2&&(s.dataset=n[1]),o&4&&(s.fieldPath=n[2]),o&16&&(s.schema=n[4]),o&8&&(s.embedding=n[3]),l.$set(s)},i(n){t||(k(l.$$.fragment,n),t=!0)},o(n){V(l.$$.fragment,n),t=!1},d(n){n&&g(e),F(l)}}}function yt(r){let e,l;return e=new Jt({props:{hideCloseButton:!0,kind:"warning",fullWidth:!0,lowContrast:!0,title:"No embeddings",caption:"Dataset has no fields with computed embeddings. Please compute an embedding index before using the labeler on this dataset."}}),{c(){N(e.$$.fragment)},l(t){H(e.$$.fragment,t)},m(t,n){O(e,t,n),l=!0},i(t){l||(k(e.$$.fragment,t),l=!0)},o(t){V(e.$$.fragment,t),l=!1},d(t){F(e,t)}}}function Vn(r){let e,l,t,n,o,s,a,i,c,f,E;function m(v){r[10](v)}function h(v){r[11](v)}function u(v){r[12](v)}let $={};r[1]!==void 0&&($.dataset=r[1]),r[2]!==void 0&&($.path=r[2]),r[3]!==void 0&&($.embedding=r[3]),n=new Xt({props:$}),Ee.push(()=>Ve(n,"dataset",m)),Ee.push(()=>Ve(n,"path",h)),Ee.push(()=>Ve(n,"embedding",u));let p=r[5]!=null&&r[3]!=null&&Dt(r),d=r[1]!=null&&r[2]!=null&&r[4]!=null&&r[3]!=null&&It(r),_=r[3]==null&&yt();return{c(){e=T("div"),l=T("div"),t=T("div"),N(n.$$.fragment),i=G(),p&&p.c(),c=G(),d&&d.c(),f=G(),_&&_.c(),this.h()},l(v){e=z(v,"DIV",{class:!0});var w=D(e);l=z(w,"DIV",{class:!0});var I=D(l);t=z(I,"DIV",{class:!0});var y=D(t);H(n.$$.fragment,y),y.forEach(g),i=W(I),p&&p.l(I),I.forEach(g),c=W(w),d&&d.l(w),f=W(w),_&&_.l(w),w.forEach(g),this.h()},h(){S(t,"class","flex-grow"),S(l,"class","flex flex-row gap-x-4"),S(e,"class","flex flex-col gap-y-4")},m(v,w){L(v,e,w),b(e,l),b(l,t),O(n,t,null),b(l,i),p&&p.m(l,null),b(e,c),d&&d.m(e,null),b(e,f),_&&_.m(e,null),E=!0},p(v,[w]){const I={};!o&&w&2&&(o=!0,I.dataset=v[1],De(()=>o=!1)),!s&&w&4&&(s=!0,I.path=v[2],De(()=>s=!1)),!a&&w&8&&(a=!0,I.embedding=v[3],De(()=>a=!1)),n.$set(I),v[5]!=null&&v[3]!=null?p?(p.p(v,w),w&40&&k(p,1)):(p=Dt(v),p.c(),k(p,1),p.m(l,null)):p&&(te(),V(p,1,1,()=>{p=null}),le()),v[1]!=null&&v[2]!=null&&v[4]!=null&&v[3]!=null?d?(d.p(v,w),w&30&&k(d,1)):(d=It(v),d.c(),k(d,1),d.m(e,f)):d&&(te(),V(d,1,1,()=>{d=null}),le()),v[3]==null?_?w&8&&k(_,1):(_=yt(),_.c(),k(_,1),_.m(e,null)):_&&(te(),V(_,1,1,()=>{_=null}),le())},i(v){E||(k(n.$$.fragment,v),k(p),k(d),k(_),E=!0)},o(v){V(n.$$.fragment,v),V(p),V(d),V(_),E=!1},d(v){v&&g(e),F(n),p&&p.d(),d&&d.d(),_&&_.d()}}}function Dn(r,e,l){let t,n,o,s,a=X,i=()=>(a(),a=ye(o,I=>l(13,s=I)),o),c,f=X,E=()=>(f(),f=ye(t,I=>l(9,c=I)),t);r.$$.on_destroy.push(()=>a()),r.$$.on_destroy.push(()=>f());let{concept:m}=e,h,u,$,p;function d(){n==null||p==null||h==null||o==null||s==null||(o.addSearch({path:[n],type:"concept",concept_namespace:m.namespace,concept_name:m.concept_name,embedding:p}),Ht(jt(h.namespace,h.name,s)))}function _(I){h=I,l(1,h)}function v(I){$=I,l(2,$)}function w(I){p=I,l(3,p)}return r.$$set=I=>{"concept"in I&&l(0,m=I.concept)},r.$$.update=()=>{r.$$.dirty&2&&E(l(7,t=Ut(h==null?void 0:h.namespace,h==null?void 0:h.name))),r.$$.dirty&512&&l(4,u=c.data),r.$$.dirty&4&&l(5,n=$?Me($):void 0),r.$$.dirty&14&&i(l(6,o=h!=null&&$!=null&&p!=null?Zt(h.namespace,h.name):null))},[m,h,$,p,u,n,o,t,d,c,_,v,w]}class In extends ce{constructor(e){super(),fe(this,e,Dn,Vn,ue,{concept:0})}}function St(r,e,l){const t=r.slice();return t[27]=e[l],t}function Ct(r){let e,l,t,n,o;return l=new zl({props:{class:"ml-2"}}),{c(){e=T("div"),N(l.$$.fragment)},l(s){e=z(s,"DIV",{});var a=D(e);H(l.$$.fragment,a),a.forEach(g)},m(s,a){L(s,e,a),O(l,e,null),t=!0,n||(o=Nt(Ot.call(null,e,{text:"Your concepts are only visible to you when logged in with Google."})),n=!0)},i(s){t||(k(l.$$.fragment,s),t=!0)},o(s){V(l.$$.fragment,s),t=!1},d(s){s&&g(e),F(l),n=!1,o()}}}function Tt(r){let e,l=r[0].description+"",t;return{c(){e=T("div"),t=Z(l),this.h()},l(n){e=z(n,"DIV",{class:!0});var o=D(e);t=j(o,l),o.forEach(g),this.h()},h(){S(e,"class","text text-base text-gray-600")},m(n,o){L(n,e,o),b(e,t)},p(n,o){o&1&&l!==(l=n[0].description+"")&&ne(t,l)},d(n){n&&g(e)}}}function yn(r){let e,l;return{c(){e=T("div"),l=Z("Try it"),this.h()},l(t){e=z(t,"DIV",{slot:!0,class:!0});var n=D(e);l=j(n,"Try it"),n.forEach(g),this.h()},h(){S(e,"slot","above"),S(e,"class","text-md font-semibold")},m(t,n){L(t,e,n),b(e,l)},p:X,d(t){t&&g(e)}}}function Sn(r){let e,l;return e=new ln({props:{example:r[6],concept:r[0],slot:"below"}}),{c(){N(e.$$.fragment)},l(t){H(e.$$.fragment,t)},m(t,n){O(e,t,n),l=!0},p(t,n){const o={};n&64&&(o.example=t[6]),n&1&&(o.concept=t[0]),e.$set(o)},i(t){l||(k(e.$$.fragment,t),l=!0)},o(t){V(e.$$.fragment,t),l=!1},d(t){F(e,t)}}}function Cn(r){let e,l;return{c(){e=T("div"),l=Z("Apply to a dataset"),this.h()},l(t){e=z(t,"DIV",{slot:!0,class:!0});var n=D(e);l=j(n,"Apply to a dataset"),n.forEach(g),this.h()},h(){S(e,"slot","above"),S(e,"class","text-md font-semibold")},m(t,n){L(t,e,n),b(e,l)},p:X,d(t){t&&g(e)}}}function Tn(r){let e,l;return e=new Jt({props:{hideCloseButton:!0,kind:"warning",fullWidth:!0,lowContrast:!0,title:"Choose a dataset with a computed embedding",caption:"Dataset has no fields with computed embeddings. Please compute an embedding index before you can search by concept."}}),{c(){N(e.$$.fragment)},l(t){H(e.$$.fragment,t)},m(t,n){O(e,t,n),l=!0},p:X,i(t){l||(k(e.$$.fragment,t),l=!0)},o(t){V(e.$$.fragment,t),l=!1},d(t){F(e,t)}}}function zn(r){let e,l,t;return l=new Ye({props:{class:"",iconDescription:"Open dataset and apply concept.",$$slots:{default:[Mn]},$$scope:{ctx:r}}}),l.$on("click",r[20]),{c(){e=T("div"),N(l.$$.fragment),this.h()},l(n){e=z(n,"DIV",{class:!0});var o=D(e);H(l.$$.fragment,o),o.forEach(g),this.h()},h(){S(e,"class","mt-4")},m(n,o){L(n,e,o),O(l,e,null),t=!0},p(n,o){const s={};o&1073741824&&(s.$$scope={dirty:o,ctx:n}),l.$set(s)},i(n){t||(k(l.$$.fragment,n),t=!0)},o(n){V(l.$$.fragment,n),t=!1},d(n){n&&g(e),F(l)}}}function Mn(r){let e;return{c(){e=Z("Search by concept")},l(l){e=j(l,"Search by concept")},m(l,t){L(l,e,t)},d(l){l&&g(e)}}}function An(r){let e,l,t,n,o,s,a,i,c;function f(d){r[17](d)}function E(d){r[18](d)}function m(d){r[19](d)}let h={};r[1]!==void 0&&(h.dataset=r[1]),r[2]!==void 0&&(h.path=r[2]),r[3]!==void 0&&(h.embedding=r[3]),l=new Xt({props:h}),Ee.push(()=>Ve(l,"dataset",f)),Ee.push(()=>Ve(l,"path",E)),Ee.push(()=>Ve(l,"embedding",m));const u=[zn,Tn],$=[];function p(d,_){return d[1]!=null&&d[2]!=null&&d[3]!=null?0:1}return a=p(r),i=$[a]=u[a](r),{c(){e=T("div"),N(l.$$.fragment),s=G(),i.c(),this.h()},l(d){e=z(d,"DIV",{slot:!0});var _=D(e);H(l.$$.fragment,_),s=W(_),i.l(_),_.forEach(g),this.h()},h(){S(e,"slot","below")},m(d,_){L(d,e,_),O(l,e,null),b(e,s),$[a].m(e,null),c=!0},p(d,_){const v={};!t&&_&2&&(t=!0,v.dataset=d[1],De(()=>t=!1)),!n&&_&4&&(n=!0,v.path=d[2],De(()=>n=!1)),!o&&_&8&&(o=!0,v.embedding=d[3],De(()=>o=!1)),l.$set(v);let w=a;a=p(d),a===w?$[a].p(d,_):(te(),V($[w],1,1,()=>{$[w]=null}),le(),i=$[a],i?i.p(d,_):(i=$[a]=u[a](d),i.c()),k(i,1),i.m(e,null))},i(d){c||(k(l.$$.fragment,d),k(i),c=!0)},o(d){V(l.$$.fragment,d),V(i),c=!1},d(d){d&&g(e),F(l),$[a].d()}}}function zt(r){let e,l;return e=new Fe({props:{expanded:!0,$$slots:{below:[Rn],above:[Pn]},$$scope:{ctx:r}}}),{c(){N(e.$$.fragment)},l(t){H(e.$$.fragment,t)},m(t,n){O(e,t,n),l=!0},p(t,n){const o={};n&1073742337&&(o.$$scope={dirty:n,ctx:t}),e.$set(o)},i(t){l||(k(e.$$.fragment,t),l=!0)},o(t){V(e.$$.fragment,t),l=!1},d(t){F(e,t)}}}function Pn(r){let e,l;return{c(){e=T("div"),l=Z("Metrics"),this.h()},l(t){e=z(t,"DIV",{slot:!0,class:!0});var n=D(e);l=j(n,"Metrics"),n.forEach(g),this.h()},h(){S(e,"slot","above"),S(e,"class","text-md font-semibold")},m(t,n){L(t,e,n),b(e,l)},p:X,d(t){t&&g(e)}}}function Mt(r){let e,l;return e=new Wl({props:{concept:r[0],embedding:r[27].name}}),{c(){N(e.$$.fragment)},l(t){H(e.$$.fragment,t)},m(t,n){O(e,t,n),l=!0},p(t,n){const o={};n&1&&(o.concept=t[0]),n&512&&(o.embedding=t[27].name),e.$set(o)},i(t){l||(k(e.$$.fragment,t),l=!0)},o(t){V(e.$$.fragment,t),l=!1},d(t){F(e,t)}}}function Rn(r){let e,l,t=r[9].data,n=[];for(let s=0;s<t.length;s+=1)n[s]=Mt(St(r,t,s));const o=s=>V(n[s],1,1,()=>{n[s]=null});return{c(){e=T("div");for(let s=0;s<n.length;s+=1)n[s].c();this.h()},l(s){e=z(s,"DIV",{slot:!0,class:!0});var a=D(e);for(let i=0;i<n.length;i+=1)n[i].l(a);a.forEach(g),this.h()},h(){S(e,"slot","below"),S(e,"class","model-metrics flex gap-x-4")},m(s,a){L(s,e,a);for(let i=0;i<n.length;i+=1)n[i]&&n[i].m(e,null);l=!0},p(s,a){if(a&513){t=s[9].data;let i;for(i=0;i<t.length;i+=1){const c=St(s,t,i);n[i]?(n[i].p(c,a),k(n[i],1)):(n[i]=Mt(c),n[i].c(),k(n[i],1),n[i].m(e,null))}for(te(),i=t.length;i<n.length;i+=1)o(i);le()}},i(s){if(!l){for(let a=0;a<t.length;a+=1)k(n[a]);l=!0}},o(s){n=n.filter(Boolean);for(let a=0;a<n.length;a+=1)V(n[a]);l=!1},d(s){s&&g(e),Ae(n,s)}}}function Bn(r){let e,l;return{c(){e=T("div"),l=Z("Collect labels"),this.h()},l(t){e=z(t,"DIV",{slot:!0,class:!0});var n=D(e);l=j(n,"Collect labels"),n.forEach(g),this.h()},h(){S(e,"slot","above"),S(e,"class","text-md font-semibold")},m(t,n){L(t,e,n),b(e,l)},p:X,d(t){t&&g(e)}}}function Nn(r){let e,l;return e=new In({props:{slot:"below",concept:r[0]}}),{c(){N(e.$$.fragment)},l(t){H(e.$$.fragment,t)},m(t,n){O(e,t,n),l=!0},p(t,n){const o={};n&1&&(o.concept=t[0]),e.$set(o)},i(t){l||(k(e.$$.fragment,t),l=!0)},o(t){V(e.$$.fragment,t),l=!1},d(t){F(e,t)}}}function Hn(r){let e,l,t,n=r[0].concept_name+"",o,s,a,i,c,f,E,m,h,u,$,p,d,_,v,w,I=r[4].length+"",y,P,q,C,B,A,M,U,re,ee=r[7].length+"",R,de,oe,se,me,J=r[8]==r[0].namespace&&Ct(),Y=r[0].description&&Tt(r);c=new Fe({props:{expanded:!0,$$slots:{below:[Sn],above:[yn]},$$scope:{ctx:r}}}),E=new Fe({props:{$$slots:{below:[An],above:[Cn]},$$scope:{ctx:r}}});let x=r[9].data&&zt(r);return u=new Fe({props:{$$slots:{below:[Nn],above:[Bn]},$$scope:{ctx:r}}}),v=new Gt({}),C=new ut({props:{data:r[4]}}),C.$on("remove",r[21]),C.$on("add",r[22]),U=new Wt({}),se=new ut({props:{data:r[7]}}),se.$on("remove",r[23]),se.$on("add",r[24]),{c(){e=T("div"),l=T("div"),t=T("div"),o=Z(n),s=G(),J&&J.c(),a=G(),Y&&Y.c(),i=G(),N(c.$$.fragment),f=G(),N(E.$$.fragment),m=G(),x&&x.c(),h=G(),N(u.$$.fragment),$=G(),p=T("div"),d=T("div"),_=T("span"),N(v.$$.fragment),w=Z(" In concept ("),y=Z(I),P=Z(" examples)"),q=G(),N(C.$$.fragment),B=G(),A=T("div"),M=T("span"),N(U.$$.fragment),re=Z("Not in concept ("),R=Z(ee),de=Z(" examples)"),oe=G(),N(se.$$.fragment),this.h()},l(Q){e=z(Q,"DIV",{class:!0});var K=D(e);l=z(K,"DIV",{});var he=D(l);t=z(he,"DIV",{class:!0});var be=D(t);o=j(be,n),s=W(be),J&&J.l(be),be.forEach(g),a=W(he),Y&&Y.l(he),he.forEach(g),i=W(K),H(c.$$.fragment,K),f=W(K),H(E.$$.fragment,K),m=W(K),x&&x.l(K),h=W(K),H(u.$$.fragment,K),$=W(K),p=z(K,"DIV",{class:!0});var ve=D(p);d=z(ve,"DIV",{class:!0});var ge=D(d);_=z(ge,"SPAN",{class:!0});var pe=D(_);H(v.$$.fragment,pe),w=j(pe," In concept ("),y=j(pe,I),P=j(pe," examples)"),pe.forEach(g),q=W(ge),H(C.$$.fragment,ge),ge.forEach(g),B=W(ve),A=z(ve,"DIV",{class:!0});var ze=D(A);M=z(ze,"SPAN",{class:!0});var ke=D(M);H(U.$$.fragment,ke),re=j(ke,"Not in concept ("),R=j(ke,ee),de=j(ke," examples)"),ke.forEach(g),oe=W(ze),H(se.$$.fragment,ze),ze.forEach(g),ve.forEach(g),K.forEach(g),this.h()},h(){S(t,"class","flex flex-row items-center text-2xl font-semibold"),S(_,"class","flex items-center gap-x-2 text-lg"),S(d,"class","flex w-0 flex-grow flex-col gap-y-4"),S(M,"class","flex items-center gap-x-2 text-lg"),S(A,"class","flex w-0 flex-grow flex-col gap-y-4"),S(p,"class","flex gap-x-4"),S(e,"class","flex h-full w-full flex-col gap-y-8 px-10")},m(Q,K){L(Q,e,K),b(e,l),b(l,t),b(t,o),b(t,s),J&&J.m(t,null),b(l,a),Y&&Y.m(l,null),b(e,i),O(c,e,null),b(e,f),O(E,e,null),b(e,m),x&&x.m(e,null),b(e,h),O(u,e,null),b(e,$),b(e,p),b(p,d),b(d,_),O(v,_,null),b(_,w),b(_,y),b(_,P),b(d,q),O(C,d,null),b(p,B),b(p,A),b(A,M),O(U,M,null),b(M,re),b(M,R),b(M,de),b(A,oe),O(se,A,null),me=!0},p(Q,[K]){(!me||K&1)&&n!==(n=Q[0].concept_name+"")&&ne(o,n),Q[8]==Q[0].namespace?J?K&257&&k(J,1):(J=Ct(),J.c(),k(J,1),J.m(t,null)):J&&(te(),V(J,1,1,()=>{J=null}),le()),Q[0].description?Y?Y.p(Q,K):(Y=Tt(Q),Y.c(),Y.m(l,null)):Y&&(Y.d(1),Y=null);const he={};K&1073741889&&(he.$$scope={dirty:K,ctx:Q}),c.$set(he);const be={};K&1073741838&&(be.$$scope={dirty:K,ctx:Q}),E.$set(be),Q[9].data?x?(x.p(Q,K),K&512&&k(x,1)):(x=zt(Q),x.c(),k(x,1),x.m(e,h)):x&&(te(),V(x,1,1,()=>{x=null}),le());const ve={};K&1073741825&&(ve.$$scope={dirty:K,ctx:Q}),u.$set(ve),(!me||K&16)&&I!==(I=Q[4].length+"")&&ne(y,I);const ge={};K&16&&(ge.data=Q[4]),C.$set(ge),(!me||K&128)&&ee!==(ee=Q[7].length+"")&&ne(R,ee);const pe={};K&128&&(pe.data=Q[7]),se.$set(pe)},i(Q){me||(k(J),k(c.$$.fragment,Q),k(E.$$.fragment,Q),k(x),k(u.$$.fragment,Q),k(v.$$.fragment,Q),k(C.$$.fragment,Q),k(U.$$.fragment,Q),k(se.$$.fragment,Q),me=!0)},o(Q){V(J),V(c.$$.fragment,Q),V(E.$$.fragment,Q),V(x),V(u.$$.fragment,Q),V(v.$$.fragment,Q),V(C.$$.fragment,Q),V(U.$$.fragment,Q),V(se.$$.fragment,Q),me=!1},d(Q){Q&&g(e),J&&J.d(),Y&&Y.d(),F(c),F(E),x&&x.d(),F(u),F(v),F(C),F(U),F(se)}}}function On(r,e,l){let t,n,o,s,a,i,c,f=X,E=()=>(f(),f=ye(a,R=>l(26,c=R)),a),m,h;r.$$.on_destroy.push(()=>f());let{concept:u}=e;const $=_l();Ie(r,$,R=>l(16,m=R));const p=Yt();Ie(r,p,R=>l(25,i=R));const d=Ft();Ie(r,d,R=>l(9,h=R));let _,v,w;function I(){const R=v?Me(v):void 0;R==null||w==null||_==null||a==null||c==null||(a.addSearch({path:[R],type:"concept",concept_namespace:u.namespace,concept_name:u.concept_name,embedding:w}),Ht(jt(_.namespace,_.name,c)))}function y(R){!u.namespace||!u.concept_name||i.mutate([u.namespace,u.concept_name,{remove:[R]}])}function P(R,de){!u.namespace||!u.concept_name||i.mutate([u.namespace,u.concept_name,{insert:[{text:R,label:de}]}])}function q(R){_=R,l(1,_)}function C(R){v=R,l(2,v)}function B(R){w=R,l(3,w)}const A=()=>I(),M=R=>y(R.detail),U=R=>P(R.detail,!0),re=R=>y(R.detail),ee=R=>P(R.detail,!1);return r.$$set=R=>{"concept"in R&&l(0,u=R.concept)},r.$$.update=()=>{var R,de;r.$$.dirty&65536&&l(8,t=(de=(R=m.data)==null?void 0:R.user)==null?void 0:de.id),r.$$.dirty&1&&l(4,n=Object.values(u.data).filter(oe=>oe.label==!0)),r.$$.dirty&1&&l(7,o=Object.values(u.data).filter(oe=>oe.label==!1)),r.$$.dirty&16&&l(6,s=n[Math.floor(Math.random()*n.length)]),r.$$.dirty&14&&E(l(5,a=_!=null&&v!=null&&w!=null?Zt(_.namespace,_.name):null))},[u,_,v,w,n,a,s,o,t,h,$,p,d,I,y,P,m,q,C,B,A,M,U,re,ee]}class Jn extends ce{constructor(e){super(),fe(this,e,On,Hn,ue,{concept:0})}}export{Jn as C,Kn as I,Sl as T,lt as a};
lilac/web/_app/immutable/chunks/ConceptView.68b6197e.js ADDED
@@ -0,0 +1 @@
 
 
1
+ import{S as ce,i as fe,s as ue,E as _e,Z as ae,_ as ie,m as D,h as g,n as S,$ as Se,b as L,a0 as b,L as qe,a1 as X,N as Ce,Q as Te,q as Z,r as j,u as ne,D as At,k as T,a as G,l as z,c as W,H as Le,I as Pt,J as Rt,K as Bt,v as te,d as V,f as le,g as k,y as N,z as H,A as O,B as F,w as Ee,T as Ve,U as De,a4 as Ae,C as xt,a6 as xe,O as Ie,ac as ye,a7 as Nt,ab as el,G as Pe,o as tl,e as we,M as ll}from"./index.b333a928.js";import{g as Ht}from"./navigation.3e4f9d10.js";import{ae as nl,x as $e,ar as rl,as as sl,B as Ye,P as Ge,h as Ot,S as Ze,U as Ft,at as al,au as il,av as ol,aw as cl,c as Lt,a as He,e as fl,ax as Ut,a4 as Re,X as ul,z as Me,ay as dl,y as ml,O as Qt,af as qt,L as Be,az as Ne,a9 as Oe,aA as Yt,ag as et,ak as Zt,b as _l}from"./Commands.1fffdf33.js";import{f as jt}from"./utils.4eeb8687.js";import{T as hl,S as gl,a as Gt,b as Wt}from"./StringSpanHighlight.d53dc1a7.js";import{C as pl,a as bl}from"./ChevronUp.95b74f6d.js";import{g as Kt}from"./settingsStore.6e7d5078.js";import{i as vl,r as $l}from"./notificationsStore.e7f2bd3e.js";import{A as wl}from"./ArrowUpRight.e306cdcd.js";import{T as Jt}from"./ToastNotification.66c9609a.js";function tt(r){let e,l;return{c(){e=ae("title"),l=Z(r[1])},l(t){e=ie(t,"title",{});var n=D(e);l=j(n,r[1]),n.forEach(g)},m(t,n){L(t,e,n),b(e,l)},p(t,n){n&2&&ne(l,t[1])},d(t){t&&g(e)}}}function kl(r){let e,l,t,n=r[1]&&tt(r),o=[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},{width:r[0]},{height:r[0]},r[2],r[3]],s={};for(let a=0;a<o.length;a+=1)s=_e(s,o[a]);return{c(){e=ae("svg"),n&&n.c(),l=ae("path"),t=ae("path"),this.h()},l(a){e=ie(a,"svg",{xmlns:!0,viewBox:!0,fill:!0,preserveAspectRatio:!0,width:!0,height:!0});var i=D(e);n&&n.l(i),l=ie(i,"path",{d:!0}),D(l).forEach(g),t=ie(i,"path",{d:!0}),D(t).forEach(g),i.forEach(g),this.h()},h(){S(l,"d","M11,11V21H21V11Zm8,8H13V13h6Z"),S(t,"d","M30,13V11H26V8a2,2,0,0,0-2-2H21V2H19V6H13V2H11V6H8A2,2,0,0,0,6,8v3H2v2H6v6H2v2H6v3a2,2,0,0,0,2,2h3v4h2V26h6v4h2V26h3a2,2,0,0,0,2-2V21h4V19H26V13ZM24,24H8V8H24Z"),Se(e,s)},m(a,i){L(a,e,i),n&&n.m(e,null),b(e,l),b(e,t)},p(a,[i]){a[1]?n?n.p(a,i):(n=tt(a),n.c(),n.m(e,l)):n&&(n.d(1),n=null),Se(e,s=qe(o,[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},i&1&&{width:a[0]},i&1&&{height:a[0]},i&4&&a[2],i&8&&a[3]]))},i:X,o:X,d(a){a&&g(e),n&&n.d()}}}function El(r,e,l){let t,n;const o=["size","title"];let s=Ce(e,o),{size:a=16}=e,{title:i=void 0}=e;return r.$$set=c=>{l(5,e=_e(_e({},e),Te(c))),l(3,s=Ce(e,o)),"size"in c&&l(0,a=c.size),"title"in c&&l(1,i=c.title)},r.$$.update=()=>{l(4,t=e["aria-label"]||e["aria-labelledby"]||i),l(2,n={"aria-hidden":t?void 0:!0,role:t?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=Te(e),[a,i,n,s,t]}class lt extends ce{constructor(e){super(),fe(this,e,El,kl,ue,{size:0,title:1})}}function nt(r){let e,l;return{c(){e=ae("title"),l=Z(r[1])},l(t){e=ie(t,"title",{});var n=D(e);l=j(n,r[1]),n.forEach(g)},m(t,n){L(t,e,n),b(e,l)},p(t,n){n&2&&ne(l,t[1])},d(t){t&&g(e)}}}function Vl(r){let e,l,t=r[1]&&nt(r),n=[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},{width:r[0]},{height:r[0]},r[2],r[3]],o={};for(let s=0;s<n.length;s+=1)o=_e(o,n[s]);return{c(){e=ae("svg"),t&&t.c(),l=ae("path"),this.h()},l(s){e=ie(s,"svg",{xmlns:!0,viewBox:!0,fill:!0,preserveAspectRatio:!0,width:!0,height:!0});var a=D(e);t&&t.l(a),l=ie(a,"path",{d:!0}),D(l).forEach(g),a.forEach(g),this.h()},h(){S(l,"d","M16,2A14,14,0,1,0,30,16,14.0158,14.0158,0,0,0,16,2Zm0,26A12,12,0,0,1,16,4V16l8.4812,8.4814A11.9625,11.9625,0,0,1,16,28Z"),Se(e,o)},m(s,a){L(s,e,a),t&&t.m(e,null),b(e,l)},p(s,[a]){s[1]?t?t.p(s,a):(t=nt(s),t.c(),t.m(e,l)):t&&(t.d(1),t=null),Se(e,o=qe(n,[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},a&1&&{width:s[0]},a&1&&{height:s[0]},a&4&&s[2],a&8&&s[3]]))},i:X,o:X,d(s){s&&g(e),t&&t.d()}}}function Dl(r,e,l){let t,n;const o=["size","title"];let s=Ce(e,o),{size:a=16}=e,{title:i=void 0}=e;return r.$$set=c=>{l(5,e=_e(_e({},e),Te(c))),l(3,s=Ce(e,o)),"size"in c&&l(0,a=c.size),"title"in c&&l(1,i=c.title)},r.$$.update=()=>{l(4,t=e["aria-label"]||e["aria-labelledby"]||i),l(2,n={"aria-hidden":t?void 0:!0,role:t?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=Te(e),[a,i,n,s,t]}class Kn extends ce{constructor(e){super(),fe(this,e,Dl,Vl,ue,{size:0,title:1})}}function rt(r){let e,l;return{c(){e=ae("title"),l=Z(r[1])},l(t){e=ie(t,"title",{});var n=D(e);l=j(n,r[1]),n.forEach(g)},m(t,n){L(t,e,n),b(e,l)},p(t,n){n&2&&ne(l,t[1])},d(t){t&&g(e)}}}function Il(r){let e,l,t,n=r[1]&&rt(r),o=[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},{width:r[0]},{height:r[0]},r[2],r[3]],s={};for(let a=0;a<o.length;a+=1)s=_e(s,o[a]);return{c(){e=ae("svg"),n&&n.c(),l=ae("path"),t=ae("path"),this.h()},l(a){e=ie(a,"svg",{xmlns:!0,viewBox:!0,fill:!0,preserveAspectRatio:!0,width:!0,height:!0});var i=D(e);n&&n.l(i),l=ie(i,"path",{d:!0}),D(l).forEach(g),t=ie(i,"path",{d:!0}),D(t).forEach(g),i.forEach(g),this.h()},h(){S(l,"d","M12 12H14V24H12zM18 12H20V24H18z"),S(t,"d","M4 6V8H6V28a2 2 0 002 2H24a2 2 0 002-2V8h2V6zM8 28V8H24V28zM12 2H20V4H12z"),Se(e,s)},m(a,i){L(a,e,i),n&&n.m(e,null),b(e,l),b(e,t)},p(a,[i]){a[1]?n?n.p(a,i):(n=rt(a),n.c(),n.m(e,l)):n&&(n.d(1),n=null),Se(e,s=qe(o,[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},i&1&&{width:a[0]},i&1&&{height:a[0]},i&4&&a[2],i&8&&a[3]]))},i:X,o:X,d(a){a&&g(e),n&&n.d()}}}function yl(r,e,l){let t,n;const o=["size","title"];let s=Ce(e,o),{size:a=16}=e,{title:i=void 0}=e;return r.$$set=c=>{l(5,e=_e(_e({},e),Te(c))),l(3,s=Ce(e,o)),"size"in c&&l(0,a=c.size),"title"in c&&l(1,i=c.title)},r.$$.update=()=>{l(4,t=e["aria-label"]||e["aria-labelledby"]||i),l(2,n={"aria-hidden":t?void 0:!0,role:t?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=Te(e),[a,i,n,s,t]}class Sl extends ce{constructor(e){super(),fe(this,e,yl,Il,ue,{size:0,title:1})}}function st(r){let e,l;return{c(){e=ae("title"),l=Z(r[1])},l(t){e=ie(t,"title",{});var n=D(e);l=j(n,r[1]),n.forEach(g)},m(t,n){L(t,e,n),b(e,l)},p(t,n){n&2&&ne(l,t[1])},d(t){t&&g(e)}}}function Cl(r){let e,l,t,n=r[1]&&st(r),o=[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},{width:r[0]},{height:r[0]},r[2],r[3]],s={};for(let a=0;a<o.length;a+=1)s=_e(s,o[a]);return{c(){e=ae("svg"),n&&n.c(),l=ae("path"),t=ae("path"),this.h()},l(a){e=ie(a,"svg",{xmlns:!0,viewBox:!0,fill:!0,preserveAspectRatio:!0,width:!0,height:!0});var i=D(e);n&&n.l(i),l=ie(i,"path",{d:!0}),D(l).forEach(g),t=ie(i,"path",{d:!0}),D(t).forEach(g),i.forEach(g),this.h()},h(){S(l,"d","M5.24,22.51l1.43-1.42A14.06,14.06,0,0,1,3.07,16C5.1,10.93,10.7,7,16,7a12.38,12.38,0,0,1,4,.72l1.55-1.56A14.72,14.72,0,0,0,16,5,16.69,16.69,0,0,0,1.06,15.66a1,1,0,0,0,0,.68A16,16,0,0,0,5.24,22.51Z"),S(t,"d","M12 15.73a4 4 0 013.7-3.7l1.81-1.82a6 6 0 00-7.33 7.33zM30.94 15.66A16.4 16.4 0 0025.2 8.22L30 3.41 28.59 2 2 28.59 3.41 30l5.1-5.1A15.29 15.29 0 0016 27 16.69 16.69 0 0030.94 16.34 1 1 0 0030.94 15.66zM20 16a4 4 0 01-6 3.44L19.44 14A4 4 0 0120 16zm-4 9a13.05 13.05 0 01-6-1.58l2.54-2.54a6 6 0 008.35-8.35l2.87-2.87A14.54 14.54 0 0128.93 16C26.9 21.07 21.3 25 16 25z"),Se(e,s)},m(a,i){L(a,e,i),n&&n.m(e,null),b(e,l),b(e,t)},p(a,[i]){a[1]?n?n.p(a,i):(n=st(a),n.c(),n.m(e,l)):n&&(n.d(1),n=null),Se(e,s=qe(o,[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},i&1&&{width:a[0]},i&1&&{height:a[0]},i&4&&a[2],i&8&&a[3]]))},i:X,o:X,d(a){a&&g(e),n&&n.d()}}}function Tl(r,e,l){let t,n;const o=["size","title"];let s=Ce(e,o),{size:a=16}=e,{title:i=void 0}=e;return r.$$set=c=>{l(5,e=_e(_e({},e),Te(c))),l(3,s=Ce(e,o)),"size"in c&&l(0,a=c.size),"title"in c&&l(1,i=c.title)},r.$$.update=()=>{l(4,t=e["aria-label"]||e["aria-labelledby"]||i),l(2,n={"aria-hidden":t?void 0:!0,role:t?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=Te(e),[a,i,n,s,t]}class zl extends ce{constructor(e){super(),fe(this,e,Tl,Cl,ue,{size:0,title:1})}}const Ml=r=>({}),at=r=>({}),Al=r=>({}),it=r=>({});function Pl(r){let e,l;return e=new pl({}),{c(){N(e.$$.fragment)},l(t){H(e.$$.fragment,t)},m(t,n){O(e,t,n),l=!0},i(t){l||(k(e.$$.fragment,t),l=!0)},o(t){V(e.$$.fragment,t),l=!1},d(t){F(e,t)}}}function Rl(r){let e,l;return e=new bl({}),{c(){N(e.$$.fragment)},l(t){H(e.$$.fragment,t)},m(t,n){O(e,t,n),l=!0},i(t){l||(k(e.$$.fragment,t),l=!0)},o(t){V(e.$$.fragment,t),l=!1},d(t){F(e,t)}}}function ot(r){let e,l;const t=r[2].below,n=At(t,r,r[1],at);return{c(){e=T("div"),n&&n.c(),this.h()},l(o){e=z(o,"DIV",{class:!0});var s=D(e);n&&n.l(s),s.forEach(g),this.h()},h(){S(e,"class","p-4")},m(o,s){L(o,e,s),n&&n.m(e,null),l=!0},p(o,s){n&&n.p&&(!l||s&2)&&Pt(n,t,o,o[1],l?Bt(t,o[1],s,Ml):Rt(o[1]),at)},i(o){l||(k(n,o),l=!0)},o(o){V(n,o),l=!1},d(o){o&&g(e),n&&n.d(o)}}}function Bl(r){let e,l,t,n,o,s,a,i,c,f;const E=r[2].above,m=At(E,r,r[1],it),h=[Rl,Pl],u=[];function $(d,_){return d[0]?0:1}o=$(r),s=u[o]=h[o](r);let p=r[0]&&ot(r);return{c(){e=T("div"),l=T("button"),t=T("div"),m&&m.c(),n=G(),s.c(),a=G(),p&&p.c(),this.h()},l(d){e=z(d,"DIV",{class:!0});var _=D(e);l=z(_,"BUTTON",{class:!0});var v=D(l);t=z(v,"DIV",{class:!0});var w=D(t);m&&m.l(w),n=W(w),s.l(w),w.forEach(g),v.forEach(g),a=W(_),p&&p.l(_),_.forEach(g),this.h()},h(){S(t,"class","flex items-center justify-between"),S(l,"class","w-full p-4 text-left hover:bg-gray-200"),S(e,"class","rounded-xl border border-gray-200")},m(d,_){L(d,e,_),b(e,l),b(l,t),m&&m.m(t,null),b(t,n),u[o].m(t,null),b(e,a),p&&p.m(e,null),i=!0,c||(f=Le(l,"click",r[3]),c=!0)},p(d,[_]){m&&m.p&&(!i||_&2)&&Pt(m,E,d,d[1],i?Bt(E,d[1],_,Al):Rt(d[1]),it);let v=o;o=$(d),o!==v&&(te(),V(u[v],1,1,()=>{u[v]=null}),le(),s=u[o],s||(s=u[o]=h[o](d),s.c()),k(s,1),s.m(t,null)),d[0]?p?(p.p(d,_),_&1&&k(p,1)):(p=ot(d),p.c(),k(p,1),p.m(e,null)):p&&(te(),V(p,1,1,()=>{p=null}),le())},i(d){i||(k(m,d),k(s),k(p),i=!0)},o(d){V(m,d),V(s),V(p),i=!1},d(d){d&&g(e),m&&m.d(d),u[o].d(),p&&p.d(),c=!1,f()}}}function Nl(r,e,l){let{$$slots:t={},$$scope:n}=e,{expanded:o=!1}=e;const s=()=>l(0,o=!o);return r.$$set=a=>{"expanded"in a&&l(0,o=a.expanded),"$$scope"in a&&l(1,n=a.$$scope)},[o,n,t,s]}class Fe extends ce{constructor(e){super(),fe(this,e,Nl,Bl,ue,{expanded:0})}}function ct(r,e,l){const t=r.slice();return t[6]=e[l],t}function ft(r){let e,l,t=r[6].text+"",n,o,s,a,i,c,f,E;a=new Sl({props:{size:16}});function m(){return r[5](r[6])}return{c(){e=T("div"),l=T("span"),n=Z(t),o=G(),s=T("button"),N(a.$$.fragment),i=G(),this.h()},l(h){e=z(h,"DIV",{class:!0});var u=D(e);l=z(u,"SPAN",{class:!0});var $=D(l);n=j($,t),$.forEach(g),o=W(u),s=z(u,"BUTTON",{title:!0,class:!0});var p=D(s);H(a.$$.fragment,p),p.forEach(g),i=W(u),u.forEach(g),this.h()},h(){S(l,"class","shrink"),S(s,"title","Remove sample"),S(s,"class","shrink-0 opacity-50 hover:text-red-400 hover:opacity-100"),S(e,"class","flex w-full justify-between gap-x-2 border-b border-gray-200 p-2 hover:bg-gray-50")},m(h,u){L(h,e,u),b(e,l),b(l,n),b(e,o),b(e,s),O(a,s,null),b(e,i),c=!0,f||(E=Le(s,"click",m),f=!0)},p(h,u){r=h,(!c||u&1)&&t!==(t=r[6].text+"")&&ne(n,t)},i(h){c||(k(a.$$.fragment,h),c=!0)},o(h){V(a.$$.fragment,h),c=!1},d(h){h&&g(e),F(a),f=!1,E()}}}function Hl(r){let e,l,t,n,o,s;function a(m){r[3](m)}let i={labelText:"Add example"};r[1]!==void 0&&(i.value=r[1]),l=new nl({props:i}),Ee.push(()=>Ve(l,"value",a)),l.$on("keydown",r[4]);let c=[...r[0]].reverse(),f=[];for(let m=0;m<c.length;m+=1)f[m]=ft(ct(r,c,m));const E=m=>V(f[m],1,1,()=>{f[m]=null});return{c(){e=T("div"),N(l.$$.fragment),n=G(),o=T("div");for(let m=0;m<f.length;m+=1)f[m].c();this.h()},l(m){e=z(m,"DIV",{class:!0});var h=D(e);H(l.$$.fragment,h),h.forEach(g),n=W(m),o=z(m,"DIV",{class:!0});var u=D(o);for(let $=0;$<f.length;$+=1)f[$].l(u);u.forEach(g),this.h()},h(){S(e,"class",""),S(o,"class","flex h-full w-full flex-col overflow-y-auto overflow-x-clip border border-gray-200")},m(m,h){L(m,e,h),O(l,e,null),L(m,n,h),L(m,o,h);for(let u=0;u<f.length;u+=1)f[u]&&f[u].m(o,null);s=!0},p(m,[h]){const u={};if(!t&&h&2&&(t=!0,u.value=m[1],De(()=>t=!1)),l.$set(u),h&5){c=[...m[0]].reverse();let $;for($=0;$<c.length;$+=1){const p=ct(m,c,$);f[$]?(f[$].p(p,h),k(f[$],1)):(f[$]=ft(p),f[$].c(),k(f[$],1),f[$].m(o,null))}for(te(),$=c.length;$<f.length;$+=1)E($);le()}},i(m){if(!s){k(l.$$.fragment,m);for(let h=0;h<c.length;h+=1)k(f[h]);s=!0}},o(m){V(l.$$.fragment,m),f=f.filter(Boolean);for(let h=0;h<f.length;h+=1)V(f[h]);s=!1},d(m){m&&g(e),F(l),m&&g(n),m&&g(o),Ae(f,m)}}}function Ol(r,e,l){let{data:t}=e,n;const o=xt();function s(c){n=c,l(1,n)}const a=c=>{c.key==="Enter"&&(o("add",n),l(1,n=""))},i=c=>o("remove",c.id);return r.$$set=c=>{"data"in c&&l(0,t=c.data)},[t,n,o,s,a,i]}class ut extends ce{constructor(e){super(),fe(this,e,Ol,Hl,ue,{data:0})}}const Ue={not_good:"text-red-600",ok:"text-yellow-600",good:"text-green-600",very_good:"text-blue-600",great:"text-purple-600"},Qe={not_good:"Not good",ok:"OK",good:"Good",very_good:"Very good",great:"Great"};function Fl(r){let e,l,t,n,o,s=Qe[r[0].overall]+"",a,i,c,f,E,m,h,u=$e(r[0].f1)+"",$,p,d,_,v,w,I=$e(r[0].recall)+"",y,P,q,C,B,A,M=$e(r[0].precision)+"",U,re,ee,R,de,oe,se=$e(r[0].roc_auc)+"",me;return{c(){e=T("table"),l=T("tr"),t=T("td"),n=Z("Overall score"),o=T("td"),a=Z(s),c=G(),f=T("tr"),E=T("td"),m=Z("F1"),h=T("td"),$=Z(u),p=G(),d=T("tr"),_=T("td"),v=Z("Recall"),w=T("td"),y=Z(I),P=G(),q=T("tr"),C=T("td"),B=Z("Precision"),A=T("td"),U=Z(M),re=G(),ee=T("tr"),R=T("td"),de=Z("Area under ROC"),oe=T("td"),me=Z(se),this.h()},l(J){e=z(J,"TABLE",{class:!0});var Y=D(e);l=z(Y,"TR",{});var x=D(l);t=z(x,"TD",{class:!0});var Q=D(t);n=j(Q,"Overall score"),Q.forEach(g),o=z(x,"TD",{class:!0});var K=D(o);a=j(K,s),K.forEach(g),x.forEach(g),c=W(Y),f=z(Y,"TR",{});var he=D(f);E=z(he,"TD",{class:!0});var be=D(E);m=j(be,"F1"),be.forEach(g),h=z(he,"TD",{class:!0});var ve=D(h);$=j(ve,u),ve.forEach(g),he.forEach(g),p=W(Y),d=z(Y,"TR",{});var ge=D(d);_=z(ge,"TD",{class:!0});var pe=D(_);v=j(pe,"Recall"),pe.forEach(g),w=z(ge,"TD",{class:!0});var ze=D(w);y=j(ze,I),ze.forEach(g),ge.forEach(g),P=W(Y),q=z(Y,"TR",{});var ke=D(q);C=z(ke,"TD",{class:!0});var We=D(C);B=j(We,"Precision"),We.forEach(g),A=z(ke,"TD",{class:!0});var Ke=D(A);U=j(Ke,M),Ke.forEach(g),ke.forEach(g),re=W(Y),ee=z(Y,"TR",{});var je=D(ee);R=z(je,"TD",{class:!0});var Je=D(R);de=j(Je,"Area under ROC"),Je.forEach(g),oe=z(je,"TD",{class:!0});var Xe=D(oe);me=j(Xe,se),Xe.forEach(g),je.forEach(g),Y.forEach(g),this.h()},h(){S(t,"class","svelte-zc5pc5"),S(o,"class",i=xe(Ue[r[0].overall])+" svelte-zc5pc5"),S(E,"class","svelte-zc5pc5"),S(h,"class","svelte-zc5pc5"),S(_,"class","svelte-zc5pc5"),S(w,"class","svelte-zc5pc5"),S(C,"class","svelte-zc5pc5"),S(A,"class","svelte-zc5pc5"),S(R,"class","svelte-zc5pc5"),S(oe,"class","svelte-zc5pc5"),S(e,"class","svelte-zc5pc5")},m(J,Y){L(J,e,Y),b(e,l),b(l,t),b(t,n),b(l,o),b(o,a),b(e,c),b(e,f),b(f,E),b(E,m),b(f,h),b(h,$),b(e,p),b(e,d),b(d,_),b(_,v),b(d,w),b(w,y),b(e,P),b(e,q),b(q,C),b(C,B),b(q,A),b(A,U),b(e,re),b(e,ee),b(ee,R),b(R,de),b(ee,oe),b(oe,me)},p(J,[Y]){Y&1&&s!==(s=Qe[J[0].overall]+"")&&ne(a,s),Y&1&&i!==(i=xe(Ue[J[0].overall])+" svelte-zc5pc5")&&S(o,"class",i),Y&1&&u!==(u=$e(J[0].f1)+"")&&ne($,u),Y&1&&I!==(I=$e(J[0].recall)+"")&&ne(y,I),Y&1&&M!==(M=$e(J[0].precision)+"")&&ne(U,M),Y&1&&se!==(se=$e(J[0].roc_auc)+"")&&ne(me,se)},i:X,o:X,d(J){J&&g(e)}}}function Ll(r,e,l){let{metrics:t}=e;return r.$$set=n=>{"metrics"in n&&l(0,t=n.metrics)},[t]}class dt extends ce{constructor(e){super(),fe(this,e,Ll,Fl,ue,{metrics:0})}}function Ul(r){const e=r.slice(),l=!0;return e[7]=l,e}function Ql(r){let e,l;function t(){return r[6](r[7])}return e=new Ye({props:{icon:r[4].isLoading?Ge:lt,class:"w-28 text-3xl",$$slots:{default:[Zl]},$$scope:{ctx:r}}}),e.$on("click",t),{c(){N(e.$$.fragment)},l(n){H(e.$$.fragment,n)},m(n,o){O(e,n,o),l=!0},p(n,o){r=n;const s={};o&16&&(s.icon=r[4].isLoading?Ge:lt),o&256&&(s.$$scope={dirty:o,ctx:r}),e.$set(s)},i(n){l||(k(e.$$.fragment,n),l=!0)},o(n){V(e.$$.fragment,n),l=!1},d(n){F(e,n)}}}function ql(r){let e,l=Qe[r[3].data.metrics.overall]+"",t,n,o,s,a;return{c(){e=T("div"),t=Z(l),this.h()},l(i){e=z(i,"DIV",{class:!0});var c=D(e);t=j(c,l),c.forEach(g),this.h()},h(){S(e,"class",n="concept-score-pill cursor-default text-2xl font-light "+Ue[r[3].data.metrics.overall])},m(i,c){L(i,e,c),b(e,t),s||(a=Nt(o=Ot.call(null,e,{component:dt,props:{metrics:r[3].data.metrics}})),s=!0)},p(i,c){c&8&&l!==(l=Qe[i[3].data.metrics.overall]+"")&&ne(t,l),c&8&&n!==(n="concept-score-pill cursor-default text-2xl font-light "+Ue[i[3].data.metrics.overall])&&S(e,"class",n),o&&el(o.update)&&c&8&&o.update.call(null,{component:dt,props:{metrics:i[3].data.metrics}})},i:X,o:X,d(i){i&&g(e),s=!1,a()}}}function Yl(r){let e,l,t;return l=new Ge({}),{c(){e=T("div"),N(l.$$.fragment),this.h()},l(n){e=z(n,"DIV",{class:!0});var o=D(e);H(l.$$.fragment,o),o.forEach(g),this.h()},h(){S(e,"class","flex flex-col items-center")},m(n,o){L(n,e,o),O(l,e,null),t=!0},p:X,i(n){t||(k(l.$$.fragment,n),t=!0)},o(n){V(l.$$.fragment,n),t=!1},d(n){n&&g(e),F(l)}}}function Zl(r){let e;return{c(){e=Z("Compute")},l(l){e=j(l,"Compute")},m(l,t){L(l,e,t)},d(l){l&&g(e)}}}function jl(r){let e,l,t,n,o,s,a;const i=[Yl,ql,Ql],c=[];function f(m,h){var u,$;return m[3].isFetching?0:($=(u=m[3])==null?void 0:u.data)!=null&&$.metrics?1:2}function E(m,h){return h===2?Ul(m):m}return o=f(r),s=c[o]=i[o](E(r,o)),{c(){e=T("div"),l=T("div"),t=Z(r[1]),n=G(),s.c(),this.h()},l(m){e=z(m,"DIV",{class:!0});var h=D(e);l=z(h,"DIV",{class:!0});var u=D(l);t=j(u,r[1]),u.forEach(g),n=W(h),s.l(h),h.forEach(g),this.h()},h(){S(l,"class","text-gray-500"),S(e,"class","flex w-36 flex-col items-center gap-y-2 rounded-md border border-b-0 border-gray-200 p-4 shadow-md")},m(m,h){L(m,e,h),b(e,l),b(l,t),b(e,n),c[o].m(e,null),a=!0},p(m,[h]){(!a||h&2)&&ne(t,m[1]);let u=o;o=f(m),o===u?c[o].p(E(m,o),h):(te(),V(c[u],1,1,()=>{c[u]=null}),le(),s=c[o],s?s.p(E(m,o),h):(s=c[o]=i[o](E(m,o)),s.c()),k(s,1),s.m(e,null))},i(m){a||(k(s),a=!0)},o(m){V(s),a=!1},d(m){m&&g(e),c[o].d()}}}function Gl(r,e,l){let t,n,o=X,s=()=>(o(),o=ye(t,m=>l(3,n=m)),t),a;r.$$.on_destroy.push(()=>o());let{concept:i}=e,{embedding:c}=e;const f=rl();Ie(r,f,m=>l(4,a=m));const E=m=>a.mutate([i.namespace,i.concept_name,c,m]);return r.$$set=m=>{"concept"in m&&l(0,i=m.concept),"embedding"in m&&l(1,c=m.embedding)},r.$$.update=()=>{r.$$.dirty&3&&s(l(2,t=sl(i.namespace,i.concept_name,c)))},[i,c,t,n,a,f,E]}class Wl extends ce{constructor(e){super(),fe(this,e,Gl,jl,ue,{concept:0,embedding:1})}}function mt(r,e,l){const t=r.slice();return t[21]=e[l],t}function Kl(r){let e;return{c(){e=Z("Compute")},l(l){e=j(l,"Compute")},m(l,t){L(l,e,t)},d(l){l&&g(e)}}}function _t(r){let e,l;return e=new He({props:{value:r[21].name}}),{c(){N(e.$$.fragment)},l(t){H(e.$$.fragment,t)},m(t,n){O(e,t,n),l=!0},p(t,n){const o={};n&512&&(o.value=t[21].name),e.$set(o)},i(t){l||(k(e.$$.fragment,t),l=!0)},o(t){V(e.$$.fragment,t),l=!1},d(t){F(e,t)}}}function Jl(r){var s;let e,l,t=((s=r[9])==null?void 0:s.data)||[],n=[];for(let a=0;a<t.length;a+=1)n[a]=_t(mt(r,t,a));const o=a=>V(n[a],1,1,()=>{n[a]=null});return{c(){for(let a=0;a<n.length;a+=1)n[a].c();e=we()},l(a){for(let i=0;i<n.length;i+=1)n[i].l(a);e=we()},m(a,i){for(let c=0;c<n.length;c+=1)n[c]&&n[c].m(a,i);L(a,e,i),l=!0},p(a,i){var c;if(i&512){t=((c=a[9])==null?void 0:c.data)||[];let f;for(f=0;f<t.length;f+=1){const E=mt(a,t,f);n[f]?(n[f].p(E,i),k(n[f],1)):(n[f]=_t(E),n[f].c(),k(n[f],1),n[f].m(e.parentNode,e))}for(te(),f=t.length;f<n.length;f+=1)o(f);le()}},i(a){if(!l){for(let i=0;i<t.length;i+=1)k(n[i]);l=!0}},o(a){n=n.filter(Boolean);for(let i=0;i<n.length;i+=1)V(n[i]);l=!1},d(a){Ae(n,a),a&&g(e)}}}function Xl(r){let e,l;return e=new gl({props:{text:r[0],row:r[4],spanPaths:r[6],valuePaths:r[5],embeddings:r[1]?[r[1]]:[]}}),{c(){N(e.$$.fragment)},l(t){H(e.$$.fragment,t)},m(t,n){O(e,t,n),l=!0},p(t,n){const o={};n&1&&(o.text=t[0]),n&16&&(o.row=t[4]),n&64&&(o.spanPaths=t[6]),n&32&&(o.valuePaths=t[5]),n&2&&(o.embeddings=t[1]?[t[1]]:[]),e.$set(o)},i(t){l||(k(e.$$.fragment,t),l=!0)},o(t){V(e.$$.fragment,t),l=!1},d(t){F(e,t)}}}function xl(r){let e,l;return e=new Lt({}),{c(){N(e.$$.fragment)},l(t){H(e.$$.fragment,t)},m(t,n){O(e,t,n),l=!0},p:X,i(t){l||(k(e.$$.fragment,t),l=!0)},o(t){V(e.$$.fragment,t),l=!1},d(t){F(e,t)}}}function en(r){let e,l,t,n,o,s,a,i,c,f,E,m,h,u,$,p;t=new hl({props:{value:r[3],cols:50,placeholder:"Paste text to try the concept.",rows:6,class:"mb-2"}}),t.$on("input",r[12]),a=new Ye({props:{$$slots:{default:[Kl]},$$scope:{ctx:r}}}),a.$on("click",r[18]);function d(y){r[19](y)}let _={labelText:"Embedding",$$slots:{default:[Jl]},$$scope:{ctx:r}};r[1]!==void 0&&(_.selected=r[1]),f=new Ze({props:_}),Ee.push(()=>Ve(f,"selected",d));const v=[xl,Xl],w=[];function I(y,P){var q;return y[7]&&((q=y[2])!=null&&q.isFetching)?0:y[4]!=null&&y[0]!=null?1:-1}return~(u=I(r))&&($=w[u]=v[u](r)),{c(){e=T("div"),l=T("div"),N(t.$$.fragment),n=G(),o=T("div"),s=T("div"),N(a.$$.fragment),i=G(),c=T("div"),N(f.$$.fragment),m=G(),h=T("div"),$&&$.c(),this.h()},l(y){e=z(y,"DIV",{class:!0});var P=D(e);l=z(P,"DIV",{});var q=D(l);H(t.$$.fragment,q),n=W(q),o=z(q,"DIV",{class:!0});var C=D(o);s=z(C,"DIV",{class:!0});var B=D(s);H(a.$$.fragment,B),B.forEach(g),i=W(C),c=z(C,"DIV",{class:!0});var A=D(c);H(f.$$.fragment,A),A.forEach(g),C.forEach(g),q.forEach(g),m=W(P),h=z(P,"DIV",{class:!0});var M=D(h);$&&$.l(M),M.forEach(g),P.forEach(g),this.h()},h(){S(s,"class","pt-4"),S(c,"class","mb-2 w-32"),S(o,"class","flex flex-row justify-between"),S(h,"class","mt-4 border-gray-200"),Pe(h,"border-t",r[0]!=null),S(e,"class","flex flex-col gap-x-8")},m(y,P){L(y,e,P),b(e,l),O(t,l,null),b(l,n),b(l,o),b(o,s),O(a,s,null),b(o,i),b(o,c),O(f,c,null),b(e,m),b(e,h),~u&&w[u].m(h,null),p=!0},p(y,[P]){const q={};P&8&&(q.value=y[3]),t.$set(q);const C={};P&16777216&&(C.$$scope={dirty:P,ctx:y}),a.$set(C);const B={};P&16777728&&(B.$$scope={dirty:P,ctx:y}),!E&&P&2&&(E=!0,B.selected=y[1],De(()=>E=!1)),f.$set(B);let A=u;u=I(y),u===A?~u&&w[u].p(y,P):($&&(te(),V(w[A],1,1,()=>{w[A]=null}),le()),~u?($=w[u],$?$.p(y,P):($=w[u]=v[u](y),$.c()),k($,1),$.m(h,null)):$=null),(!p||P&1)&&Pe(h,"border-t",y[0]!=null)},i(y){p||(k(t.$$.fragment,y),k(a.$$.fragment,y),k(f.$$.fragment,y),k($),p=!0)},o(y){V(t.$$.fragment,y),V(a.$$.fragment,y),V(f.$$.fragment,y),V($),p=!1},d(y){y&&g(e),F(t),F(a),F(f),~u&&w[u].d()}}}function tn(r,e,l){var M;let t,n,o,s,a=X,i=()=>(a(),a=ye(o,U=>l(2,s=U)),o),c,f=X,E=()=>(f(),f=ye(n,U=>l(17,c=U)),n),m,h;r.$$.on_destroy.push(()=>a()),r.$$.on_destroy.push(()=>f());let{concept:u}=e,{example:$}=e;const p=Ft();Ie(r,p,U=>l(9,h=U));const d=Kt();Ie(r,d,U=>l(20,m=U));let _=(M=$.text)==null?void 0:M.trim();tl(()=>{y()});function v(U){l(3,_=U.target.value),l(0,w=void 0)}let w,I=m.embedding;function y(){l(0,w=_)}let P,q,C;const B=()=>y();function A(U){I=U,l(1,I)}return r.$$set=U=>{"concept"in U&&l(14,u=U.concept),"example"in U&&l(15,$=U.example)},r.$$.update=()=>{var U;if(r.$$.dirty&32768&&$.text&&(l(3,_=$.text.trim()),l(0,w=void 0)),r.$$.dirty&16386&&l(16,t={signal_name:"concept_score",concept_name:u.concept_name,namespace:u.namespace,embedding:I}),r.$$.dirty&65536&&E(l(8,n=t.embedding?al({signal:t}):void 0)),r.$$.dirty&16387&&i(l(7,o=I!=null&&w!=null?il(u.namespace,u.concept_name,I,{examples:[{text:w}]}):null)),r.$$.dirty&196614&&(s==null?void 0:s.data)!=null&&I!=null&&((U=c==null?void 0:c.data)==null?void 0:U.fields)!=null){const re=ol(c.data.fields);re.signal=t,l(4,P=cl(s.data[0],re));const ee=vl(re);l(6,C=ee.spanPaths),l(5,q=ee.valuePaths)}},[w,I,s,_,P,q,C,o,n,h,p,d,v,y,u,$,t,c,B,A]}class ln extends ce{constructor(e){super(),fe(this,e,tn,en,ue,{concept:14,example:15})}}function ht(r,e,l){const t=r.slice();return t[20]=e[l],t}function gt(r,e,l){const t=r.slice();return t[23]=e[l],t}function pt(r,e,l){const t=r.slice();return t[1]=e[l],t}function nn(r){let e,l;return e=new Ze({props:{labelText:"Dataset",selected:r[7],$$slots:{default:[an]},$$scope:{ctx:r}}}),e.$on("change",r[11]),{c(){N(e.$$.fragment)},l(t){H(e.$$.fragment,t)},m(t,n){O(e,t,n),l=!0},p(t,n){const o={};n&128&&(o.selected=t[7]),n&268435472&&(o.$$scope={dirty:n,ctx:t}),e.$set(o)},i(t){l||(k(e.$$.fragment,t),l=!0)},o(t){V(e.$$.fragment,t),l=!1},d(t){F(e,t)}}}function rn(r){let e,l;return e=new Qt({props:{kind:"error",title:"Error",subtitle:r[4].error.message,hideCloseButton:!0}}),{c(){N(e.$$.fragment)},l(t){H(e.$$.fragment,t)},m(t,n){O(e,t,n),l=!0},p(t,n){const o={};n&16&&(o.subtitle=t[4].error.message),e.$set(o)},i(t){l||(k(e.$$.fragment,t),l=!0)},o(t){V(e.$$.fragment,t),l=!1},d(t){F(e,t)}}}function sn(r){let e,l;return e=new qt({}),{c(){N(e.$$.fragment)},l(t){H(e.$$.fragment,t)},m(t,n){O(e,t,n),l=!0},p:X,i(t){l||(k(e.$$.fragment,t),l=!0)},o(t){V(e.$$.fragment,t),l=!1},d(t){F(e,t)}}}function bt(r){let e,l;return e=new He({props:{value:`${r[1].namespace}/${r[1].dataset_name}`}}),{c(){N(e.$$.fragment)},l(t){H(e.$$.fragment,t)},m(t,n){O(e,t,n),l=!0},p(t,n){const o={};n&16&&(o.value=`${t[1].namespace}/${t[1].dataset_name}`),e.$set(o)},i(t){l||(k(e.$$.fragment,t),l=!0)},o(t){V(e.$$.fragment,t),l=!1},d(t){F(e,t)}}}function an(r){let e,l,t,n;e=new He({props:{value:"",text:"none"}});let o=r[4].data,s=[];for(let i=0;i<o.length;i+=1)s[i]=bt(pt(r,o,i));const a=i=>V(s[i],1,1,()=>{s[i]=null});return{c(){N(e.$$.fragment),l=G();for(let i=0;i<s.length;i+=1)s[i].c();t=we()},l(i){H(e.$$.fragment,i),l=W(i);for(let c=0;c<s.length;c+=1)s[c].l(i);t=we()},m(i,c){O(e,i,c),L(i,l,c);for(let f=0;f<s.length;f+=1)s[f]&&s[f].m(i,c);L(i,t,c),n=!0},p(i,c){if(c&16){o=i[4].data;let f;for(f=0;f<o.length;f+=1){const E=pt(i,o,f);s[f]?(s[f].p(E,c),k(s[f],1)):(s[f]=bt(E),s[f].c(),k(s[f],1),s[f].m(t.parentNode,t))}for(te(),f=o.length;f<s.length;f+=1)a(f);le()}},i(i){if(!n){k(e.$$.fragment,i);for(let c=0;c<o.length;c+=1)k(s[c]);n=!0}},o(i){V(e.$$.fragment,i),s=s.filter(Boolean);for(let c=0;c<s.length;c+=1)V(s[c]);n=!1},d(i){F(e,i),i&&g(l),Ae(s,i),i&&g(t)}}}function on(r){let e,l;return e=new Ze({props:{labelText:"Field with embeddings",selected:r[6],$$slots:{default:[un]},$$scope:{ctx:r}}}),e.$on("change",r[12]),{c(){N(e.$$.fragment)},l(t){H(e.$$.fragment,t)},m(t,n){O(e,t,n),l=!0},p(t,n){const o={};n&64&&(o.selected=t[6]),n&268435460&&(o.$$scope={dirty:n,ctx:t}),e.$set(o)},i(t){l||(k(e.$$.fragment,t),l=!0)},o(t){V(e.$$.fragment,t),l=!1},d(t){F(e,t)}}}function cn(r){let e,l;return e=new Qt({props:{kind:"error",title:"Error",subtitle:r[3].error.message,hideCloseButton:!0}}),{c(){N(e.$$.fragment)},l(t){H(e.$$.fragment,t)},m(t,n){O(e,t,n),l=!0},p(t,n){const o={};n&8&&(o.subtitle=t[3].error.message),e.$set(o)},i(t){l||(k(e.$$.fragment,t),l=!0)},o(t){V(e.$$.fragment,t),l=!1},d(t){F(e,t)}}}function fn(r){let e,l;return e=new qt({}),{c(){N(e.$$.fragment)},l(t){H(e.$$.fragment,t)},m(t,n){O(e,t,n),l=!0},p:X,i(t){l||(k(e.$$.fragment,t),l=!0)},o(t){V(e.$$.fragment,t),l=!1},d(t){F(e,t)}}}function vt(r){let e,l;return e=new He({props:{value:Me(r[23].path)}}),{c(){N(e.$$.fragment)},l(t){H(e.$$.fragment,t)},m(t,n){O(e,t,n),l=!0},p(t,n){const o={};n&4&&(o.value=Me(t[23].path)),e.$set(o)},i(t){l||(k(e.$$.fragment,t),l=!0)},o(t){V(e.$$.fragment,t),l=!1},d(t){F(e,t)}}}function un(r){let e,l,t=r[2],n=[];for(let s=0;s<t.length;s+=1)n[s]=vt(gt(r,t,s));const o=s=>V(n[s],1,1,()=>{n[s]=null});return{c(){for(let s=0;s<n.length;s+=1)n[s].c();e=we()},l(s){for(let a=0;a<n.length;a+=1)n[a].l(s);e=we()},m(s,a){for(let i=0;i<n.length;i+=1)n[i]&&n[i].m(s,a);L(s,e,a),l=!0},p(s,a){if(a&4){t=s[2];let i;for(i=0;i<t.length;i+=1){const c=gt(s,t,i);n[i]?(n[i].p(c,a),k(n[i],1)):(n[i]=vt(c),n[i].c(),k(n[i],1),n[i].m(e.parentNode,e))}for(te(),i=t.length;i<n.length;i+=1)o(i);le()}},i(s){if(!l){for(let a=0;a<t.length;a+=1)k(n[a]);l=!0}},o(s){n=n.filter(Boolean);for(let a=0;a<n.length;a+=1)V(n[a]);l=!1},d(s){Ae(n,s),s&&g(e)}}}function $t(r){let e,l,t;function n(s){r[19](s)}let o={labelText:"Embedding",$$slots:{default:[dn]},$$scope:{ctx:r}};return r[0]!==void 0&&(o.selected=r[0]),e=new Ze({props:o}),Ee.push(()=>Ve(e,"selected",n)),{c(){N(e.$$.fragment)},l(s){H(e.$$.fragment,s)},m(s,a){O(e,s,a),t=!0},p(s,a){const i={};a&268435488&&(i.$$scope={dirty:a,ctx:s}),!l&&a&1&&(l=!0,i.selected=s[0],De(()=>l=!1)),e.$set(i)},i(s){t||(k(e.$$.fragment,s),t=!0)},o(s){V(e.$$.fragment,s),t=!1},d(s){F(e,s)}}}function wt(r){let e,l;return e=new He({props:{value:r[20]}}),{c(){N(e.$$.fragment)},l(t){H(e.$$.fragment,t)},m(t,n){O(e,t,n),l=!0},p(t,n){const o={};n&32&&(o.value=t[20]),e.$set(o)},i(t){l||(k(e.$$.fragment,t),l=!0)},o(t){V(e.$$.fragment,t),l=!1},d(t){F(e,t)}}}function dn(r){let e,l,t=r[5],n=[];for(let s=0;s<t.length;s+=1)n[s]=wt(ht(r,t,s));const o=s=>V(n[s],1,1,()=>{n[s]=null});return{c(){for(let s=0;s<n.length;s+=1)n[s].c();e=we()},l(s){for(let a=0;a<n.length;a+=1)n[a].l(s);e=we()},m(s,a){for(let i=0;i<n.length;i+=1)n[i]&&n[i].m(s,a);L(s,e,a),l=!0},p(s,a){if(a&32){t=s[5];let i;for(i=0;i<t.length;i+=1){const c=ht(s,t,i);n[i]?(n[i].p(c,a),k(n[i],1)):(n[i]=wt(c),n[i].c(),k(n[i],1),n[i].m(e.parentNode,e))}for(te(),i=t.length;i<n.length;i+=1)o(i);le()}},i(s){if(!l){for(let a=0;a<t.length;a+=1)k(n[a]);l=!0}},o(s){n=n.filter(Boolean);for(let a=0;a<n.length;a+=1)V(n[a]);l=!1},d(s){Ae(n,s),s&&g(e)}}}function mn(r){let e,l,t,n,o,s,a,i,c,f,E;const m=[sn,rn,nn],h=[];function u(v,w){return v[4].isLoading?0:v[4].isError?1:v[4].data.length>0?2:-1}~(t=u(r))&&(n=h[t]=m[t](r));const $=[fn,cn,on],p=[];function d(v,w){return v[3].isLoading?0:v[3].isError?1:v[2].length>0?2:-1}~(a=d(r))&&(i=p[a]=$[a](r));let _=r[5].length>0&&$t(r);return{c(){e=T("div"),l=T("div"),n&&n.c(),o=G(),s=T("div"),i&&i.c(),c=G(),f=T("div"),_&&_.c(),this.h()},l(v){e=z(v,"DIV",{class:!0});var w=D(e);l=z(w,"DIV",{class:!0});var I=D(l);n&&n.l(I),I.forEach(g),o=W(w),s=z(w,"DIV",{class:!0});var y=D(s);i&&i.l(y),y.forEach(g),c=W(w),f=z(w,"DIV",{class:!0});var P=D(f);_&&_.l(P),P.forEach(g),w.forEach(g),this.h()},h(){S(l,"class","w-1/3"),S(s,"class","w-1/3"),S(f,"class","w-1/3"),S(e,"class","flex w-full flex-row gap-x-4")},m(v,w){L(v,e,w),b(e,l),~t&&h[t].m(l,null),b(e,o),b(e,s),~a&&p[a].m(s,null),b(e,c),b(e,f),_&&_.m(f,null),E=!0},p(v,[w]){let I=t;t=u(v),t===I?~t&&h[t].p(v,w):(n&&(te(),V(h[I],1,1,()=>{h[I]=null}),le()),~t?(n=h[t],n?n.p(v,w):(n=h[t]=m[t](v),n.c()),k(n,1),n.m(l,null)):n=null);let y=a;a=d(v),a===y?~a&&p[a].p(v,w):(i&&(te(),V(p[y],1,1,()=>{p[y]=null}),le()),~a?(i=p[a],i?i.p(v,w):(i=p[a]=$[a](v),i.c()),k(i,1),i.m(s,null)):i=null),v[5].length>0?_?(_.p(v,w),w&32&&k(_,1)):(_=$t(v),_.c(),k(_,1),_.m(f,null)):_&&(te(),V(_,1,1,()=>{_=null}),le())},i(v){E||(k(n),k(i),k(_),E=!0)},o(v){V(n),V(i),V(_),E=!1},d(v){v&&g(e),~t&&h[t].d(),~a&&p[a].d(),_&&_.d()}}}function _n(r,e,l){let t,n,o,s,a,i,c,f,E,m=X,h=()=>(m(),m=ye(n,C=>l(3,E=C)),n),u,$;r.$$.on_destroy.push(()=>m());let{dataset:p=void 0}=e,{path:d}=e,{embedding:_=void 0}=e;const v=Kt();Ie(r,v,C=>l(18,$=C));let w;const I=fl();Ie(r,I,C=>l(4,u=C));function y(C){const B=C.target.value;if(B==="")l(1,p=null);else{const[A,M]=B.split("/");l(1,p={namespace:A,name:M})}}function P(C){const B=C.target.value;l(13,d=ml(B))}function q(C){_=C,l(0,_),l(15,c),l(13,d),l(14,w),l(2,i),l(3,E),l(17,a)}return r.$$set=C=>{"dataset"in C&&l(1,p=C.dataset),"path"in C&&l(13,d=C.path),"embedding"in C&&l(0,_=C.embedding)},r.$$.update=()=>{if(r.$$.dirty&262144&&l(16,t=[$.embedding,"gte-small","gte-base","openai","sbert"]),r.$$.dirty&18&&u.data&&u.data.length>0&&p===void 0&&l(1,p={namespace:u.data[0].namespace,name:u.data[0].dataset_name}),r.$$.dirty&2&&h(l(8,n=Ut(p==null?void 0:p.namespace,p==null?void 0:p.name))),r.$$.dirty&2&&l(7,o=p?`${p.namespace}/${p.name}`:""),r.$$.dirty&8&&l(14,w=E.data),r.$$.dirty&16384&&l(17,a=w?Re(w).filter(C=>!ul(C,w)&&C.dtype!=null):[]),r.$$.dirty&131072&&l(2,i=a.filter(C=>Re(C).some(B=>B.signal!=null&&Re(B).some(A=>A.dtype==="embedding")))),r.$$.dirty&8196&&d!=null){const C=Me(d);i.some(A=>Me(A.path)===C)||l(13,d=void 0)}r.$$.dirty&8196&&i.length>0&&d==null&&l(13,d=i[0].path),r.$$.dirty&8192&&l(6,s=d?Me(d):void 0),r.$$.dirty&24576&&l(15,c=d&&w?Re(dl(w,d)).filter(C=>C.signal!=null&&Re(C).some(B=>B.dtype==="embedding")):[]),r.$$.dirty&98304&&l(5,f=c.map(C=>C.signal.signal_name).sort((C,B)=>{let A=t.indexOf(C),M=t.indexOf(B);return A===-1&&(A=t.length),M===-1&&(M=t.length),A-M})),r.$$.dirty&32769&&_!=null&&(c.some(B=>B.path.at(-1)===_)||l(0,_=void 0))},[_,p,i,E,u,f,s,o,n,v,I,y,P,d,w,c,t,a,$,q]}class Xt extends ce{constructor(e){super(),fe(this,e,_n,mn,ue,{dataset:1,path:13,embedding:0})}}function hn(r,e,l,t,n,o){const s={...r};if(e==null||l==null)return s;const a=[...e,...l],i=new Set,c=[];for(const u of a){const $=Be.value(Ne(u,[Oe]),"string");if($==null||i.has($))continue;i.add($);const p=Ne(u,n);if(p==null)continue;const d=Be.value(p,"string");if(d==null)continue;const _=`${t.namespace}/${t.concept_name}`,v=Ne(p,[`${_}/${o}`]);if(v==null)continue;const w=Ne(p,[`${_}/labels`]),I=[];if(w!=null)for(const y of w){const P=Be.value(y,"string_span");P!=null&&I.push(P)}for(const y of v){const P=Be.value(y,"string_span");if(P==null||!I.every(A=>A.start>P.end||A.end<P.start))continue;const C=Ne(y,["score"]);if(C==null)continue;const B=Be.value(C,"float32");B!=null&&c.push({rowid:$,text:d,span:P,score:B})}}function f(u){return{rowid:u.rowid,text:$l(u.text,u.span.start,u.span.end),score:u.score}}c.sort((u,$)=>$.score-u.score);const E=c[0],m=c.slice().reverse().find(u=>u!=E);c.sort((u,$)=>Math.abs(u.score-.5)-Math.abs($.score-.5));const h=c.find(u=>u!=E&&u!=m);return E!=null&&s.positive==null&&(s.positive=f(E)),h!=null&&s.neutral==null&&(s.neutral=f(h)),m!=null&&s.negative==null&&(s.negative=f(m)),s}function kt(r,e,l){const t=r.slice();return t[21]=e[l],t}function gn(r){const e=r.slice(),l=$n(e[21].score);e[24]=l;const t=wn(e[21].score);return e[25]=t,e}function pn(r){let e,l,t,n,o,s,a,i,c,f=r[21].text+"",E,m,h,u=r[25]+"",$,p,d=$e(r[21].score,2)+"",_,v,w,I,y,P;n=new Gt({});function q(){return r[18](r[21])}a=new Wt({});function C(){return r[19](r[21])}return{c(){e=T("div"),l=T("div"),t=T("button"),N(n.$$.fragment),o=G(),s=T("button"),N(a.$$.fragment),i=G(),c=T("div"),E=Z(f),m=G(),h=T("div"),$=Z(u),p=G(),_=Z(d),v=G(),this.h()},l(B){e=z(B,"DIV",{class:!0});var A=D(e);l=z(A,"DIV",{class:!0});var M=D(l);t=z(M,"BUTTON",{class:!0});var U=D(t);H(n.$$.fragment,U),U.forEach(g),o=W(M),s=z(M,"BUTTON",{class:!0});var re=D(s);H(a.$$.fragment,re),re.forEach(g),M.forEach(g),i=W(A),c=z(A,"DIV",{class:!0});var ee=D(c);E=j(ee,f),ee.forEach(g),m=W(A),h=z(A,"DIV",{class:!0});var R=D(h);$=j(R,u),p=W(R),_=j(R,d),R.forEach(g),v=W(A),A.forEach(g),this.h()},h(){S(t,"class","p-2 hover:bg-gray-200"),Pe(t,"text-blue-500",r[21].label===!0),S(s,"class","p-2 hover:bg-gray-200"),Pe(s,"text-red-500",r[21].label===!1),S(l,"class","mr-2 flex flex-shrink-0 gap-x-1"),S(c,"class","flex-grow"),S(h,"class","w-40 flex-shrink-0 text-right"),S(e,"class",w=`flex flex-grow items-center whitespace-break-spaces rounded-md border border-gray-300 p-4 pl-2 ${r[24]}`)},m(B,A){L(B,e,A),b(e,l),b(l,t),O(n,t,null),b(l,o),b(l,s),O(a,s,null),b(e,i),b(e,c),b(c,E),b(e,m),b(e,h),b(h,$),b(h,p),b(h,_),b(e,v),I=!0,y||(P=[Le(t,"click",q),Le(s,"click",C)],y=!0)},p(B,A){r=B,(!I||A&2)&&Pe(t,"text-blue-500",r[21].label===!0),(!I||A&2)&&Pe(s,"text-red-500",r[21].label===!1),(!I||A&2)&&f!==(f=r[21].text+"")&&ne(E,f),(!I||A&2)&&u!==(u=r[25]+"")&&ne($,u),(!I||A&2)&&d!==(d=$e(r[21].score,2)+"")&&ne(_,d),(!I||A&2&&w!==(w=`flex flex-grow items-center whitespace-break-spaces rounded-md border border-gray-300 p-4 pl-2 ${r[24]}`))&&S(e,"class",w)},i(B){I||(k(n.$$.fragment,B),k(a.$$.fragment,B),I=!0)},o(B){V(n.$$.fragment,B),V(a.$$.fragment,B),I=!1},d(B){B&&g(e),F(n),F(a),y=!1,ll(P)}}}function bn(r){let e,l;return e=new Lt({props:{paragraph:!0,lines:2}}),{c(){N(e.$$.fragment)},l(t){H(e.$$.fragment,t)},m(t,n){O(e,t,n),l=!0},p:X,i(t){l||(k(e.$$.fragment,t),l=!0)},o(t){V(e.$$.fragment,t),l=!1},d(t){F(e,t)}}}function Et(r){let e,l,t,n,o;const s=[bn,pn],a=[];function i(f,E){return E&3&&(e=null),e==null&&(e=!!(f[21]==null||f[0].includes(f[21].rowid))),e?0:1}function c(f,E){return E===1?gn(f):f}return l=i(r,-1),t=a[l]=s[l](c(r,l)),{c(){t.c(),n=we()},l(f){t.l(f),n=we()},m(f,E){a[l].m(f,E),L(f,n,E),o=!0},p(f,E){let m=l;l=i(f,E),l===m?a[l].p(c(f,l),E):(te(),V(a[m],1,1,()=>{a[m]=null}),le(),t=a[l],t?t.p(c(f,l),E):(t=a[l]=s[l](c(f,l)),t.c()),k(t,1),t.m(n.parentNode,n))},i(f){o||(k(t),o=!0)},o(f){V(t),o=!1},d(f){a[l].d(f),f&&g(n)}}}function vn(r){let e,l,t=r[1],n=[];for(let s=0;s<t.length;s+=1)n[s]=Et(kt(r,t,s));const o=s=>V(n[s],1,1,()=>{n[s]=null});return{c(){e=T("div");for(let s=0;s<n.length;s+=1)n[s].c();this.h()},l(s){e=z(s,"DIV",{class:!0});var a=D(e);for(let i=0;i<n.length;i+=1)n[i].l(a);a.forEach(g),this.h()},h(){S(e,"class","flex flex-col gap-y-4")},m(s,a){L(s,e,a);for(let i=0;i<n.length;i+=1)n[i]&&n[i].m(e,null);l=!0},p(s,[a]){if(a&35){t=s[1];let i;for(i=0;i<t.length;i+=1){const c=kt(s,t,i);n[i]?(n[i].p(c,a),k(n[i],1)):(n[i]=Et(c),n[i].c(),k(n[i],1),n[i].m(e,null))}for(te(),i=t.length;i<n.length;i+=1)o(i);le()}},i(s){if(!l){for(let a=0;a<t.length;a+=1)k(n[a]);l=!0}},o(s){n=n.filter(Boolean);for(let a=0;a<n.length;a+=1)V(n[a]);l=!1},d(s){s&&g(e),Ae(n,s)}}}const Vt=100;function $n(r){return r<.2?"bg-red-500/10":r<.8?"bg-yellow-500/10":"bg-blue-500/10"}function wn(r){return r<.2?"Likely not in concept":r<.8?"Uncertain":"Likely in concept"}function kn(r,e,l){let t,n,o,s,a,i,c,f,E=X,m=()=>(E(),E=ye(a,M=>l(16,f=M)),a),h,u=X,$=()=>(u(),u=ye(n,M=>l(17,h=M)),n);r.$$.on_destroy.push(()=>E()),r.$$.on_destroy.push(()=>u());let{dataset:p}=e,{concept:d}=e,{fieldPath:_}=e,{schema:v}=e,{embedding:w}=e;const I=Yt();Ie(r,I,M=>l(20,c=M));let y={},P={},q=[];function C(M,U){if(M==null)return;const re={text:M.text,label:U},ee=Object.keys(P).find(R=>P[R]===M);l(11,y={...P}),l(0,q=[M.rowid,...q]),c.mutate([d.namespace,d.concept_name,{insert:[re]}],{onSuccess:()=>{l(11,y={...y,[ee]:void 0})},onSettled:()=>{l(0,q=q.filter(R=>R!==M.rowid))}})}const B=M=>C(M,!0),A=M=>C(M,!1);return r.$$set=M=>{"dataset"in M&&l(6,p=M.dataset),"concept"in M&&l(7,d=M.concept),"fieldPath"in M&&l(8,_=M.fieldPath),"schema"in M&&l(9,v=M.schema),"embedding"in M&&l(10,w=M.embedding)},r.$$.update=()=>{var M,U;r.$$.dirty&1408&&l(15,t={path:_,type:"concept",concept_namespace:d.namespace,concept_name:d.concept_name,embedding:w}),r.$$.dirty&33600&&$(l(3,n=et(p.namespace,p.name,{columns:[Oe,_],limit:Vt,combine_columns:!0,searches:[t]},v))),r.$$.dirty&1152&&l(14,o={signal_name:"concept_score",namespace:d.namespace,concept_name:d.concept_name,embedding:w}),r.$$.dirty&128&&l(13,s={signal_name:"concept_labels",namespace:d.namespace,concept_name:d.concept_name}),r.$$.dirty&25408&&m(l(2,a=et(p.namespace,p.name,{columns:[Oe,_,{path:_,signal_udf:o},{path:_,signal_udf:s}],limit:Vt,combine_columns:!0,sort_by:[Oe]},v))),r.$$.dirty&200064&&l(12,P=hn(y,h.isFetching||(M=h.data)==null?void 0:M.rows,f.isFetching||(U=f.data)==null?void 0:U.rows,d,_,w)),r.$$.dirty&4096&&l(1,i=[P.positive,P.neutral,P.negative])},[q,i,a,n,I,C,p,d,_,v,w,y,P,s,o,t,f,h,B,A]}class En extends ce{constructor(e){super(),fe(this,e,kn,vn,ue,{dataset:6,concept:7,fieldPath:8,schema:9,embedding:10})}}function Dt(r){let e,l;return e=new Ye({props:{class:"dataset-link top-7 h-8",icon:wl,iconDescription:"Open dataset and apply concept."}}),e.$on("click",r[8]),{c(){N(e.$$.fragment)},l(t){H(e.$$.fragment,t)},m(t,n){O(e,t,n),l=!0},p:X,i(t){l||(k(e.$$.fragment,t),l=!0)},o(t){V(e.$$.fragment,t),l=!1},d(t){F(e,t)}}}function It(r){let e,l,t;return l=new En({props:{concept:r[0],dataset:r[1],fieldPath:r[2],schema:r[4],embedding:r[3]}}),{c(){e=T("div"),N(l.$$.fragment)},l(n){e=z(n,"DIV",{});var o=D(e);H(l.$$.fragment,o),o.forEach(g)},m(n,o){L(n,e,o),O(l,e,null),t=!0},p(n,o){const s={};o&1&&(s.concept=n[0]),o&2&&(s.dataset=n[1]),o&4&&(s.fieldPath=n[2]),o&16&&(s.schema=n[4]),o&8&&(s.embedding=n[3]),l.$set(s)},i(n){t||(k(l.$$.fragment,n),t=!0)},o(n){V(l.$$.fragment,n),t=!1},d(n){n&&g(e),F(l)}}}function yt(r){let e,l;return e=new Jt({props:{hideCloseButton:!0,kind:"warning",fullWidth:!0,lowContrast:!0,title:"No embeddings",caption:"Dataset has no fields with computed embeddings. Please compute an embedding index before using the labeler on this dataset."}}),{c(){N(e.$$.fragment)},l(t){H(e.$$.fragment,t)},m(t,n){O(e,t,n),l=!0},i(t){l||(k(e.$$.fragment,t),l=!0)},o(t){V(e.$$.fragment,t),l=!1},d(t){F(e,t)}}}function Vn(r){let e,l,t,n,o,s,a,i,c,f,E;function m(v){r[10](v)}function h(v){r[11](v)}function u(v){r[12](v)}let $={};r[1]!==void 0&&($.dataset=r[1]),r[2]!==void 0&&($.path=r[2]),r[3]!==void 0&&($.embedding=r[3]),n=new Xt({props:$}),Ee.push(()=>Ve(n,"dataset",m)),Ee.push(()=>Ve(n,"path",h)),Ee.push(()=>Ve(n,"embedding",u));let p=r[5]!=null&&r[3]!=null&&Dt(r),d=r[1]!=null&&r[2]!=null&&r[4]!=null&&r[3]!=null&&It(r),_=r[3]==null&&yt();return{c(){e=T("div"),l=T("div"),t=T("div"),N(n.$$.fragment),i=G(),p&&p.c(),c=G(),d&&d.c(),f=G(),_&&_.c(),this.h()},l(v){e=z(v,"DIV",{class:!0});var w=D(e);l=z(w,"DIV",{class:!0});var I=D(l);t=z(I,"DIV",{class:!0});var y=D(t);H(n.$$.fragment,y),y.forEach(g),i=W(I),p&&p.l(I),I.forEach(g),c=W(w),d&&d.l(w),f=W(w),_&&_.l(w),w.forEach(g),this.h()},h(){S(t,"class","flex-grow"),S(l,"class","flex flex-row gap-x-4"),S(e,"class","flex flex-col gap-y-4")},m(v,w){L(v,e,w),b(e,l),b(l,t),O(n,t,null),b(l,i),p&&p.m(l,null),b(e,c),d&&d.m(e,null),b(e,f),_&&_.m(e,null),E=!0},p(v,[w]){const I={};!o&&w&2&&(o=!0,I.dataset=v[1],De(()=>o=!1)),!s&&w&4&&(s=!0,I.path=v[2],De(()=>s=!1)),!a&&w&8&&(a=!0,I.embedding=v[3],De(()=>a=!1)),n.$set(I),v[5]!=null&&v[3]!=null?p?(p.p(v,w),w&40&&k(p,1)):(p=Dt(v),p.c(),k(p,1),p.m(l,null)):p&&(te(),V(p,1,1,()=>{p=null}),le()),v[1]!=null&&v[2]!=null&&v[4]!=null&&v[3]!=null?d?(d.p(v,w),w&30&&k(d,1)):(d=It(v),d.c(),k(d,1),d.m(e,f)):d&&(te(),V(d,1,1,()=>{d=null}),le()),v[3]==null?_?w&8&&k(_,1):(_=yt(),_.c(),k(_,1),_.m(e,null)):_&&(te(),V(_,1,1,()=>{_=null}),le())},i(v){E||(k(n.$$.fragment,v),k(p),k(d),k(_),E=!0)},o(v){V(n.$$.fragment,v),V(p),V(d),V(_),E=!1},d(v){v&&g(e),F(n),p&&p.d(),d&&d.d(),_&&_.d()}}}function Dn(r,e,l){let t,n,o,s,a=X,i=()=>(a(),a=ye(o,I=>l(13,s=I)),o),c,f=X,E=()=>(f(),f=ye(t,I=>l(9,c=I)),t);r.$$.on_destroy.push(()=>a()),r.$$.on_destroy.push(()=>f());let{concept:m}=e,h,u,$,p;function d(){n==null||p==null||h==null||o==null||s==null||(o.addSearch({path:[n],type:"concept",concept_namespace:m.namespace,concept_name:m.concept_name,embedding:p}),Ht(jt(h.namespace,h.name,s)))}function _(I){h=I,l(1,h)}function v(I){$=I,l(2,$)}function w(I){p=I,l(3,p)}return r.$$set=I=>{"concept"in I&&l(0,m=I.concept)},r.$$.update=()=>{r.$$.dirty&2&&E(l(7,t=Ut(h==null?void 0:h.namespace,h==null?void 0:h.name))),r.$$.dirty&512&&l(4,u=c.data),r.$$.dirty&4&&l(5,n=$?Me($):void 0),r.$$.dirty&14&&i(l(6,o=h!=null&&$!=null&&p!=null?Zt(h.namespace,h.name):null))},[m,h,$,p,u,n,o,t,d,c,_,v,w]}class In extends ce{constructor(e){super(),fe(this,e,Dn,Vn,ue,{concept:0})}}function St(r,e,l){const t=r.slice();return t[27]=e[l],t}function Ct(r){let e,l,t,n,o;return l=new zl({props:{class:"ml-2"}}),{c(){e=T("div"),N(l.$$.fragment)},l(s){e=z(s,"DIV",{});var a=D(e);H(l.$$.fragment,a),a.forEach(g)},m(s,a){L(s,e,a),O(l,e,null),t=!0,n||(o=Nt(Ot.call(null,e,{text:"Your concepts are only visible to you when logged in with Google."})),n=!0)},i(s){t||(k(l.$$.fragment,s),t=!0)},o(s){V(l.$$.fragment,s),t=!1},d(s){s&&g(e),F(l),n=!1,o()}}}function Tt(r){let e,l=r[0].description+"",t;return{c(){e=T("div"),t=Z(l),this.h()},l(n){e=z(n,"DIV",{class:!0});var o=D(e);t=j(o,l),o.forEach(g),this.h()},h(){S(e,"class","text text-base text-gray-600")},m(n,o){L(n,e,o),b(e,t)},p(n,o){o&1&&l!==(l=n[0].description+"")&&ne(t,l)},d(n){n&&g(e)}}}function yn(r){let e,l;return{c(){e=T("div"),l=Z("Try it"),this.h()},l(t){e=z(t,"DIV",{slot:!0,class:!0});var n=D(e);l=j(n,"Try it"),n.forEach(g),this.h()},h(){S(e,"slot","above"),S(e,"class","text-md font-semibold")},m(t,n){L(t,e,n),b(e,l)},p:X,d(t){t&&g(e)}}}function Sn(r){let e,l;return e=new ln({props:{example:r[6],concept:r[0],slot:"below"}}),{c(){N(e.$$.fragment)},l(t){H(e.$$.fragment,t)},m(t,n){O(e,t,n),l=!0},p(t,n){const o={};n&64&&(o.example=t[6]),n&1&&(o.concept=t[0]),e.$set(o)},i(t){l||(k(e.$$.fragment,t),l=!0)},o(t){V(e.$$.fragment,t),l=!1},d(t){F(e,t)}}}function Cn(r){let e,l;return{c(){e=T("div"),l=Z("Apply to a dataset"),this.h()},l(t){e=z(t,"DIV",{slot:!0,class:!0});var n=D(e);l=j(n,"Apply to a dataset"),n.forEach(g),this.h()},h(){S(e,"slot","above"),S(e,"class","text-md font-semibold")},m(t,n){L(t,e,n),b(e,l)},p:X,d(t){t&&g(e)}}}function Tn(r){let e,l;return e=new Jt({props:{hideCloseButton:!0,kind:"warning",fullWidth:!0,lowContrast:!0,title:"Choose a dataset with a computed embedding",caption:"Dataset has no fields with computed embeddings. Please compute an embedding index before you can search by concept."}}),{c(){N(e.$$.fragment)},l(t){H(e.$$.fragment,t)},m(t,n){O(e,t,n),l=!0},p:X,i(t){l||(k(e.$$.fragment,t),l=!0)},o(t){V(e.$$.fragment,t),l=!1},d(t){F(e,t)}}}function zn(r){let e,l,t;return l=new Ye({props:{class:"",iconDescription:"Open dataset and apply concept.",$$slots:{default:[Mn]},$$scope:{ctx:r}}}),l.$on("click",r[20]),{c(){e=T("div"),N(l.$$.fragment),this.h()},l(n){e=z(n,"DIV",{class:!0});var o=D(e);H(l.$$.fragment,o),o.forEach(g),this.h()},h(){S(e,"class","mt-4")},m(n,o){L(n,e,o),O(l,e,null),t=!0},p(n,o){const s={};o&1073741824&&(s.$$scope={dirty:o,ctx:n}),l.$set(s)},i(n){t||(k(l.$$.fragment,n),t=!0)},o(n){V(l.$$.fragment,n),t=!1},d(n){n&&g(e),F(l)}}}function Mn(r){let e;return{c(){e=Z("Search by concept")},l(l){e=j(l,"Search by concept")},m(l,t){L(l,e,t)},d(l){l&&g(e)}}}function An(r){let e,l,t,n,o,s,a,i,c;function f(d){r[17](d)}function E(d){r[18](d)}function m(d){r[19](d)}let h={};r[1]!==void 0&&(h.dataset=r[1]),r[2]!==void 0&&(h.path=r[2]),r[3]!==void 0&&(h.embedding=r[3]),l=new Xt({props:h}),Ee.push(()=>Ve(l,"dataset",f)),Ee.push(()=>Ve(l,"path",E)),Ee.push(()=>Ve(l,"embedding",m));const u=[zn,Tn],$=[];function p(d,_){return d[1]!=null&&d[2]!=null&&d[3]!=null?0:1}return a=p(r),i=$[a]=u[a](r),{c(){e=T("div"),N(l.$$.fragment),s=G(),i.c(),this.h()},l(d){e=z(d,"DIV",{slot:!0});var _=D(e);H(l.$$.fragment,_),s=W(_),i.l(_),_.forEach(g),this.h()},h(){S(e,"slot","below")},m(d,_){L(d,e,_),O(l,e,null),b(e,s),$[a].m(e,null),c=!0},p(d,_){const v={};!t&&_&2&&(t=!0,v.dataset=d[1],De(()=>t=!1)),!n&&_&4&&(n=!0,v.path=d[2],De(()=>n=!1)),!o&&_&8&&(o=!0,v.embedding=d[3],De(()=>o=!1)),l.$set(v);let w=a;a=p(d),a===w?$[a].p(d,_):(te(),V($[w],1,1,()=>{$[w]=null}),le(),i=$[a],i?i.p(d,_):(i=$[a]=u[a](d),i.c()),k(i,1),i.m(e,null))},i(d){c||(k(l.$$.fragment,d),k(i),c=!0)},o(d){V(l.$$.fragment,d),V(i),c=!1},d(d){d&&g(e),F(l),$[a].d()}}}function zt(r){let e,l;return e=new Fe({props:{expanded:!0,$$slots:{below:[Rn],above:[Pn]},$$scope:{ctx:r}}}),{c(){N(e.$$.fragment)},l(t){H(e.$$.fragment,t)},m(t,n){O(e,t,n),l=!0},p(t,n){const o={};n&1073742337&&(o.$$scope={dirty:n,ctx:t}),e.$set(o)},i(t){l||(k(e.$$.fragment,t),l=!0)},o(t){V(e.$$.fragment,t),l=!1},d(t){F(e,t)}}}function Pn(r){let e,l;return{c(){e=T("div"),l=Z("Metrics"),this.h()},l(t){e=z(t,"DIV",{slot:!0,class:!0});var n=D(e);l=j(n,"Metrics"),n.forEach(g),this.h()},h(){S(e,"slot","above"),S(e,"class","text-md font-semibold")},m(t,n){L(t,e,n),b(e,l)},p:X,d(t){t&&g(e)}}}function Mt(r){let e,l;return e=new Wl({props:{concept:r[0],embedding:r[27].name}}),{c(){N(e.$$.fragment)},l(t){H(e.$$.fragment,t)},m(t,n){O(e,t,n),l=!0},p(t,n){const o={};n&1&&(o.concept=t[0]),n&512&&(o.embedding=t[27].name),e.$set(o)},i(t){l||(k(e.$$.fragment,t),l=!0)},o(t){V(e.$$.fragment,t),l=!1},d(t){F(e,t)}}}function Rn(r){let e,l,t=r[9].data,n=[];for(let s=0;s<t.length;s+=1)n[s]=Mt(St(r,t,s));const o=s=>V(n[s],1,1,()=>{n[s]=null});return{c(){e=T("div");for(let s=0;s<n.length;s+=1)n[s].c();this.h()},l(s){e=z(s,"DIV",{slot:!0,class:!0});var a=D(e);for(let i=0;i<n.length;i+=1)n[i].l(a);a.forEach(g),this.h()},h(){S(e,"slot","below"),S(e,"class","model-metrics flex gap-x-4")},m(s,a){L(s,e,a);for(let i=0;i<n.length;i+=1)n[i]&&n[i].m(e,null);l=!0},p(s,a){if(a&513){t=s[9].data;let i;for(i=0;i<t.length;i+=1){const c=St(s,t,i);n[i]?(n[i].p(c,a),k(n[i],1)):(n[i]=Mt(c),n[i].c(),k(n[i],1),n[i].m(e,null))}for(te(),i=t.length;i<n.length;i+=1)o(i);le()}},i(s){if(!l){for(let a=0;a<t.length;a+=1)k(n[a]);l=!0}},o(s){n=n.filter(Boolean);for(let a=0;a<n.length;a+=1)V(n[a]);l=!1},d(s){s&&g(e),Ae(n,s)}}}function Bn(r){let e,l;return{c(){e=T("div"),l=Z("Collect labels"),this.h()},l(t){e=z(t,"DIV",{slot:!0,class:!0});var n=D(e);l=j(n,"Collect labels"),n.forEach(g),this.h()},h(){S(e,"slot","above"),S(e,"class","text-md font-semibold")},m(t,n){L(t,e,n),b(e,l)},p:X,d(t){t&&g(e)}}}function Nn(r){let e,l;return e=new In({props:{slot:"below",concept:r[0]}}),{c(){N(e.$$.fragment)},l(t){H(e.$$.fragment,t)},m(t,n){O(e,t,n),l=!0},p(t,n){const o={};n&1&&(o.concept=t[0]),e.$set(o)},i(t){l||(k(e.$$.fragment,t),l=!0)},o(t){V(e.$$.fragment,t),l=!1},d(t){F(e,t)}}}function Hn(r){let e,l,t,n=r[0].concept_name+"",o,s,a,i,c,f,E,m,h,u,$,p,d,_,v,w,I=r[4].length+"",y,P,q,C,B,A,M,U,re,ee=r[7].length+"",R,de,oe,se,me,J=r[8]==r[0].namespace&&Ct(),Y=r[0].description&&Tt(r);c=new Fe({props:{expanded:!0,$$slots:{below:[Sn],above:[yn]},$$scope:{ctx:r}}}),E=new Fe({props:{$$slots:{below:[An],above:[Cn]},$$scope:{ctx:r}}});let x=r[9].data&&zt(r);return u=new Fe({props:{$$slots:{below:[Nn],above:[Bn]},$$scope:{ctx:r}}}),v=new Gt({}),C=new ut({props:{data:r[4]}}),C.$on("remove",r[21]),C.$on("add",r[22]),U=new Wt({}),se=new ut({props:{data:r[7]}}),se.$on("remove",r[23]),se.$on("add",r[24]),{c(){e=T("div"),l=T("div"),t=T("div"),o=Z(n),s=G(),J&&J.c(),a=G(),Y&&Y.c(),i=G(),N(c.$$.fragment),f=G(),N(E.$$.fragment),m=G(),x&&x.c(),h=G(),N(u.$$.fragment),$=G(),p=T("div"),d=T("div"),_=T("span"),N(v.$$.fragment),w=Z(" In concept ("),y=Z(I),P=Z(" examples)"),q=G(),N(C.$$.fragment),B=G(),A=T("div"),M=T("span"),N(U.$$.fragment),re=Z("Not in concept ("),R=Z(ee),de=Z(" examples)"),oe=G(),N(se.$$.fragment),this.h()},l(Q){e=z(Q,"DIV",{class:!0});var K=D(e);l=z(K,"DIV",{});var he=D(l);t=z(he,"DIV",{class:!0});var be=D(t);o=j(be,n),s=W(be),J&&J.l(be),be.forEach(g),a=W(he),Y&&Y.l(he),he.forEach(g),i=W(K),H(c.$$.fragment,K),f=W(K),H(E.$$.fragment,K),m=W(K),x&&x.l(K),h=W(K),H(u.$$.fragment,K),$=W(K),p=z(K,"DIV",{class:!0});var ve=D(p);d=z(ve,"DIV",{class:!0});var ge=D(d);_=z(ge,"SPAN",{class:!0});var pe=D(_);H(v.$$.fragment,pe),w=j(pe," In concept ("),y=j(pe,I),P=j(pe," examples)"),pe.forEach(g),q=W(ge),H(C.$$.fragment,ge),ge.forEach(g),B=W(ve),A=z(ve,"DIV",{class:!0});var ze=D(A);M=z(ze,"SPAN",{class:!0});var ke=D(M);H(U.$$.fragment,ke),re=j(ke,"Not in concept ("),R=j(ke,ee),de=j(ke," examples)"),ke.forEach(g),oe=W(ze),H(se.$$.fragment,ze),ze.forEach(g),ve.forEach(g),K.forEach(g),this.h()},h(){S(t,"class","flex flex-row items-center text-2xl font-semibold"),S(_,"class","flex items-center gap-x-2 text-lg"),S(d,"class","flex w-0 flex-grow flex-col gap-y-4"),S(M,"class","flex items-center gap-x-2 text-lg"),S(A,"class","flex w-0 flex-grow flex-col gap-y-4"),S(p,"class","flex gap-x-4"),S(e,"class","flex h-full w-full flex-col gap-y-8 px-10")},m(Q,K){L(Q,e,K),b(e,l),b(l,t),b(t,o),b(t,s),J&&J.m(t,null),b(l,a),Y&&Y.m(l,null),b(e,i),O(c,e,null),b(e,f),O(E,e,null),b(e,m),x&&x.m(e,null),b(e,h),O(u,e,null),b(e,$),b(e,p),b(p,d),b(d,_),O(v,_,null),b(_,w),b(_,y),b(_,P),b(d,q),O(C,d,null),b(p,B),b(p,A),b(A,M),O(U,M,null),b(M,re),b(M,R),b(M,de),b(A,oe),O(se,A,null),me=!0},p(Q,[K]){(!me||K&1)&&n!==(n=Q[0].concept_name+"")&&ne(o,n),Q[8]==Q[0].namespace?J?K&257&&k(J,1):(J=Ct(),J.c(),k(J,1),J.m(t,null)):J&&(te(),V(J,1,1,()=>{J=null}),le()),Q[0].description?Y?Y.p(Q,K):(Y=Tt(Q),Y.c(),Y.m(l,null)):Y&&(Y.d(1),Y=null);const he={};K&1073741889&&(he.$$scope={dirty:K,ctx:Q}),c.$set(he);const be={};K&1073741838&&(be.$$scope={dirty:K,ctx:Q}),E.$set(be),Q[9].data?x?(x.p(Q,K),K&512&&k(x,1)):(x=zt(Q),x.c(),k(x,1),x.m(e,h)):x&&(te(),V(x,1,1,()=>{x=null}),le());const ve={};K&1073741825&&(ve.$$scope={dirty:K,ctx:Q}),u.$set(ve),(!me||K&16)&&I!==(I=Q[4].length+"")&&ne(y,I);const ge={};K&16&&(ge.data=Q[4]),C.$set(ge),(!me||K&128)&&ee!==(ee=Q[7].length+"")&&ne(R,ee);const pe={};K&128&&(pe.data=Q[7]),se.$set(pe)},i(Q){me||(k(J),k(c.$$.fragment,Q),k(E.$$.fragment,Q),k(x),k(u.$$.fragment,Q),k(v.$$.fragment,Q),k(C.$$.fragment,Q),k(U.$$.fragment,Q),k(se.$$.fragment,Q),me=!0)},o(Q){V(J),V(c.$$.fragment,Q),V(E.$$.fragment,Q),V(x),V(u.$$.fragment,Q),V(v.$$.fragment,Q),V(C.$$.fragment,Q),V(U.$$.fragment,Q),V(se.$$.fragment,Q),me=!1},d(Q){Q&&g(e),J&&J.d(),Y&&Y.d(),F(c),F(E),x&&x.d(),F(u),F(v),F(C),F(U),F(se)}}}function On(r,e,l){let t,n,o,s,a,i,c,f=X,E=()=>(f(),f=ye(a,R=>l(26,c=R)),a),m,h;r.$$.on_destroy.push(()=>f());let{concept:u}=e;const $=_l();Ie(r,$,R=>l(16,m=R));const p=Yt();Ie(r,p,R=>l(25,i=R));const d=Ft();Ie(r,d,R=>l(9,h=R));let _,v,w;function I(){const R=v?Me(v):void 0;R==null||w==null||_==null||a==null||c==null||(a.addSearch({path:[R],type:"concept",concept_namespace:u.namespace,concept_name:u.concept_name,embedding:w}),Ht(jt(_.namespace,_.name,c)))}function y(R){!u.namespace||!u.concept_name||i.mutate([u.namespace,u.concept_name,{remove:[R]}])}function P(R,de){!u.namespace||!u.concept_name||i.mutate([u.namespace,u.concept_name,{insert:[{text:R,label:de}]}])}function q(R){_=R,l(1,_)}function C(R){v=R,l(2,v)}function B(R){w=R,l(3,w)}const A=()=>I(),M=R=>y(R.detail),U=R=>P(R.detail,!0),re=R=>y(R.detail),ee=R=>P(R.detail,!1);return r.$$set=R=>{"concept"in R&&l(0,u=R.concept)},r.$$.update=()=>{var R,de;r.$$.dirty&65536&&l(8,t=(de=(R=m.data)==null?void 0:R.user)==null?void 0:de.id),r.$$.dirty&1&&l(4,n=Object.values(u.data).filter(oe=>oe.label==!0)),r.$$.dirty&1&&l(7,o=Object.values(u.data).filter(oe=>oe.label==!1)),r.$$.dirty&16&&l(6,s=n[Math.floor(Math.random()*n.length)]),r.$$.dirty&14&&E(l(5,a=_!=null&&v!=null&&w!=null?Zt(_.namespace,_.name):null))},[u,_,v,w,n,a,s,o,t,h,$,p,d,I,y,P,m,q,C,B,A,M,U,re,ee]}class Jn extends ce{constructor(e){super(),fe(this,e,On,Hn,ue,{concept:0})}}export{Jn as C,Kn as I,Sl as T,lt as a};
lilac/web/_app/immutable/chunks/ConceptView.bcbb99f3.js ADDED
@@ -0,0 +1 @@
 
 
1
+ import{S as ce,i as fe,s as ue,E as _e,Z as ae,_ as ie,m as D,h as g,n as S,$ as Se,b as L,a0 as b,L as qe,a1 as X,N as Ce,Q as Te,q as Z,r as j,u as ne,D as At,k as T,a as G,l as z,c as W,H as Le,I as Pt,J as Rt,K as Bt,v as te,d as V,f as le,g as k,y as N,z as H,A as O,B as F,w as Ee,T as Ve,U as De,a4 as Ae,C as xt,a6 as xe,O as Ie,ab as ye,a7 as Nt,aa as el,G as Pe,o as tl,e as we,M as ll}from"./index.b7741aa8.js";import{g as Ht}from"./navigation.079b07c9.js";import{ae as nl,x as $e,ar as rl,as as sl,B as Ye,P as Ge,h as Ot,S as Ze,U as Ft,at as al,au as il,av as ol,aw as cl,c as Lt,a as He,e as fl,ax as Ut,a4 as Re,X as ul,z as Me,ay as dl,y as ml,O as Qt,af as qt,L as Be,az as Ne,a9 as Oe,aA as Yt,ag as et,ak as Zt,b as _l}from"./Commands.539ca0ee.js";import{f as jt}from"./utils.f3891c80.js";import{T as hl,S as gl,a as Gt,b as Wt}from"./StringSpanHighlight.d39d06de.js";import{C as pl,a as bl}from"./ChevronUp.4e645b65.js";import{g as Kt}from"./settingsStore.9e0a77f3.js";import{i as vl,r as $l}from"./notificationsStore.87d33d60.js";import{A as wl}from"./ArrowUpRight.0bb31a07.js";import{T as Jt}from"./ToastNotification.94abd3f6.js";function tt(r){let e,l;return{c(){e=ae("title"),l=Z(r[1])},l(t){e=ie(t,"title",{});var n=D(e);l=j(n,r[1]),n.forEach(g)},m(t,n){L(t,e,n),b(e,l)},p(t,n){n&2&&ne(l,t[1])},d(t){t&&g(e)}}}function kl(r){let e,l,t,n=r[1]&&tt(r),o=[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},{width:r[0]},{height:r[0]},r[2],r[3]],s={};for(let a=0;a<o.length;a+=1)s=_e(s,o[a]);return{c(){e=ae("svg"),n&&n.c(),l=ae("path"),t=ae("path"),this.h()},l(a){e=ie(a,"svg",{xmlns:!0,viewBox:!0,fill:!0,preserveAspectRatio:!0,width:!0,height:!0});var i=D(e);n&&n.l(i),l=ie(i,"path",{d:!0}),D(l).forEach(g),t=ie(i,"path",{d:!0}),D(t).forEach(g),i.forEach(g),this.h()},h(){S(l,"d","M11,11V21H21V11Zm8,8H13V13h6Z"),S(t,"d","M30,13V11H26V8a2,2,0,0,0-2-2H21V2H19V6H13V2H11V6H8A2,2,0,0,0,6,8v3H2v2H6v6H2v2H6v3a2,2,0,0,0,2,2h3v4h2V26h6v4h2V26h3a2,2,0,0,0,2-2V21h4V19H26V13ZM24,24H8V8H24Z"),Se(e,s)},m(a,i){L(a,e,i),n&&n.m(e,null),b(e,l),b(e,t)},p(a,[i]){a[1]?n?n.p(a,i):(n=tt(a),n.c(),n.m(e,l)):n&&(n.d(1),n=null),Se(e,s=qe(o,[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},i&1&&{width:a[0]},i&1&&{height:a[0]},i&4&&a[2],i&8&&a[3]]))},i:X,o:X,d(a){a&&g(e),n&&n.d()}}}function El(r,e,l){let t,n;const o=["size","title"];let s=Ce(e,o),{size:a=16}=e,{title:i=void 0}=e;return r.$$set=c=>{l(5,e=_e(_e({},e),Te(c))),l(3,s=Ce(e,o)),"size"in c&&l(0,a=c.size),"title"in c&&l(1,i=c.title)},r.$$.update=()=>{l(4,t=e["aria-label"]||e["aria-labelledby"]||i),l(2,n={"aria-hidden":t?void 0:!0,role:t?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=Te(e),[a,i,n,s,t]}class lt extends ce{constructor(e){super(),fe(this,e,El,kl,ue,{size:0,title:1})}}function nt(r){let e,l;return{c(){e=ae("title"),l=Z(r[1])},l(t){e=ie(t,"title",{});var n=D(e);l=j(n,r[1]),n.forEach(g)},m(t,n){L(t,e,n),b(e,l)},p(t,n){n&2&&ne(l,t[1])},d(t){t&&g(e)}}}function Vl(r){let e,l,t=r[1]&&nt(r),n=[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},{width:r[0]},{height:r[0]},r[2],r[3]],o={};for(let s=0;s<n.length;s+=1)o=_e(o,n[s]);return{c(){e=ae("svg"),t&&t.c(),l=ae("path"),this.h()},l(s){e=ie(s,"svg",{xmlns:!0,viewBox:!0,fill:!0,preserveAspectRatio:!0,width:!0,height:!0});var a=D(e);t&&t.l(a),l=ie(a,"path",{d:!0}),D(l).forEach(g),a.forEach(g),this.h()},h(){S(l,"d","M16,2A14,14,0,1,0,30,16,14.0158,14.0158,0,0,0,16,2Zm0,26A12,12,0,0,1,16,4V16l8.4812,8.4814A11.9625,11.9625,0,0,1,16,28Z"),Se(e,o)},m(s,a){L(s,e,a),t&&t.m(e,null),b(e,l)},p(s,[a]){s[1]?t?t.p(s,a):(t=nt(s),t.c(),t.m(e,l)):t&&(t.d(1),t=null),Se(e,o=qe(n,[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},a&1&&{width:s[0]},a&1&&{height:s[0]},a&4&&s[2],a&8&&s[3]]))},i:X,o:X,d(s){s&&g(e),t&&t.d()}}}function Dl(r,e,l){let t,n;const o=["size","title"];let s=Ce(e,o),{size:a=16}=e,{title:i=void 0}=e;return r.$$set=c=>{l(5,e=_e(_e({},e),Te(c))),l(3,s=Ce(e,o)),"size"in c&&l(0,a=c.size),"title"in c&&l(1,i=c.title)},r.$$.update=()=>{l(4,t=e["aria-label"]||e["aria-labelledby"]||i),l(2,n={"aria-hidden":t?void 0:!0,role:t?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=Te(e),[a,i,n,s,t]}class Kn extends ce{constructor(e){super(),fe(this,e,Dl,Vl,ue,{size:0,title:1})}}function rt(r){let e,l;return{c(){e=ae("title"),l=Z(r[1])},l(t){e=ie(t,"title",{});var n=D(e);l=j(n,r[1]),n.forEach(g)},m(t,n){L(t,e,n),b(e,l)},p(t,n){n&2&&ne(l,t[1])},d(t){t&&g(e)}}}function Il(r){let e,l,t,n=r[1]&&rt(r),o=[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},{width:r[0]},{height:r[0]},r[2],r[3]],s={};for(let a=0;a<o.length;a+=1)s=_e(s,o[a]);return{c(){e=ae("svg"),n&&n.c(),l=ae("path"),t=ae("path"),this.h()},l(a){e=ie(a,"svg",{xmlns:!0,viewBox:!0,fill:!0,preserveAspectRatio:!0,width:!0,height:!0});var i=D(e);n&&n.l(i),l=ie(i,"path",{d:!0}),D(l).forEach(g),t=ie(i,"path",{d:!0}),D(t).forEach(g),i.forEach(g),this.h()},h(){S(l,"d","M12 12H14V24H12zM18 12H20V24H18z"),S(t,"d","M4 6V8H6V28a2 2 0 002 2H24a2 2 0 002-2V8h2V6zM8 28V8H24V28zM12 2H20V4H12z"),Se(e,s)},m(a,i){L(a,e,i),n&&n.m(e,null),b(e,l),b(e,t)},p(a,[i]){a[1]?n?n.p(a,i):(n=rt(a),n.c(),n.m(e,l)):n&&(n.d(1),n=null),Se(e,s=qe(o,[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},i&1&&{width:a[0]},i&1&&{height:a[0]},i&4&&a[2],i&8&&a[3]]))},i:X,o:X,d(a){a&&g(e),n&&n.d()}}}function yl(r,e,l){let t,n;const o=["size","title"];let s=Ce(e,o),{size:a=16}=e,{title:i=void 0}=e;return r.$$set=c=>{l(5,e=_e(_e({},e),Te(c))),l(3,s=Ce(e,o)),"size"in c&&l(0,a=c.size),"title"in c&&l(1,i=c.title)},r.$$.update=()=>{l(4,t=e["aria-label"]||e["aria-labelledby"]||i),l(2,n={"aria-hidden":t?void 0:!0,role:t?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=Te(e),[a,i,n,s,t]}class Sl extends ce{constructor(e){super(),fe(this,e,yl,Il,ue,{size:0,title:1})}}function st(r){let e,l;return{c(){e=ae("title"),l=Z(r[1])},l(t){e=ie(t,"title",{});var n=D(e);l=j(n,r[1]),n.forEach(g)},m(t,n){L(t,e,n),b(e,l)},p(t,n){n&2&&ne(l,t[1])},d(t){t&&g(e)}}}function Cl(r){let e,l,t,n=r[1]&&st(r),o=[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},{width:r[0]},{height:r[0]},r[2],r[3]],s={};for(let a=0;a<o.length;a+=1)s=_e(s,o[a]);return{c(){e=ae("svg"),n&&n.c(),l=ae("path"),t=ae("path"),this.h()},l(a){e=ie(a,"svg",{xmlns:!0,viewBox:!0,fill:!0,preserveAspectRatio:!0,width:!0,height:!0});var i=D(e);n&&n.l(i),l=ie(i,"path",{d:!0}),D(l).forEach(g),t=ie(i,"path",{d:!0}),D(t).forEach(g),i.forEach(g),this.h()},h(){S(l,"d","M5.24,22.51l1.43-1.42A14.06,14.06,0,0,1,3.07,16C5.1,10.93,10.7,7,16,7a12.38,12.38,0,0,1,4,.72l1.55-1.56A14.72,14.72,0,0,0,16,5,16.69,16.69,0,0,0,1.06,15.66a1,1,0,0,0,0,.68A16,16,0,0,0,5.24,22.51Z"),S(t,"d","M12 15.73a4 4 0 013.7-3.7l1.81-1.82a6 6 0 00-7.33 7.33zM30.94 15.66A16.4 16.4 0 0025.2 8.22L30 3.41 28.59 2 2 28.59 3.41 30l5.1-5.1A15.29 15.29 0 0016 27 16.69 16.69 0 0030.94 16.34 1 1 0 0030.94 15.66zM20 16a4 4 0 01-6 3.44L19.44 14A4 4 0 0120 16zm-4 9a13.05 13.05 0 01-6-1.58l2.54-2.54a6 6 0 008.35-8.35l2.87-2.87A14.54 14.54 0 0128.93 16C26.9 21.07 21.3 25 16 25z"),Se(e,s)},m(a,i){L(a,e,i),n&&n.m(e,null),b(e,l),b(e,t)},p(a,[i]){a[1]?n?n.p(a,i):(n=st(a),n.c(),n.m(e,l)):n&&(n.d(1),n=null),Se(e,s=qe(o,[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},i&1&&{width:a[0]},i&1&&{height:a[0]},i&4&&a[2],i&8&&a[3]]))},i:X,o:X,d(a){a&&g(e),n&&n.d()}}}function Tl(r,e,l){let t,n;const o=["size","title"];let s=Ce(e,o),{size:a=16}=e,{title:i=void 0}=e;return r.$$set=c=>{l(5,e=_e(_e({},e),Te(c))),l(3,s=Ce(e,o)),"size"in c&&l(0,a=c.size),"title"in c&&l(1,i=c.title)},r.$$.update=()=>{l(4,t=e["aria-label"]||e["aria-labelledby"]||i),l(2,n={"aria-hidden":t?void 0:!0,role:t?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=Te(e),[a,i,n,s,t]}class zl extends ce{constructor(e){super(),fe(this,e,Tl,Cl,ue,{size:0,title:1})}}const Ml=r=>({}),at=r=>({}),Al=r=>({}),it=r=>({});function Pl(r){let e,l;return e=new pl({}),{c(){N(e.$$.fragment)},l(t){H(e.$$.fragment,t)},m(t,n){O(e,t,n),l=!0},i(t){l||(k(e.$$.fragment,t),l=!0)},o(t){V(e.$$.fragment,t),l=!1},d(t){F(e,t)}}}function Rl(r){let e,l;return e=new bl({}),{c(){N(e.$$.fragment)},l(t){H(e.$$.fragment,t)},m(t,n){O(e,t,n),l=!0},i(t){l||(k(e.$$.fragment,t),l=!0)},o(t){V(e.$$.fragment,t),l=!1},d(t){F(e,t)}}}function ot(r){let e,l;const t=r[2].below,n=At(t,r,r[1],at);return{c(){e=T("div"),n&&n.c(),this.h()},l(o){e=z(o,"DIV",{class:!0});var s=D(e);n&&n.l(s),s.forEach(g),this.h()},h(){S(e,"class","p-4")},m(o,s){L(o,e,s),n&&n.m(e,null),l=!0},p(o,s){n&&n.p&&(!l||s&2)&&Pt(n,t,o,o[1],l?Bt(t,o[1],s,Ml):Rt(o[1]),at)},i(o){l||(k(n,o),l=!0)},o(o){V(n,o),l=!1},d(o){o&&g(e),n&&n.d(o)}}}function Bl(r){let e,l,t,n,o,s,a,i,c,f;const E=r[2].above,m=At(E,r,r[1],it),h=[Rl,Pl],u=[];function $(d,_){return d[0]?0:1}o=$(r),s=u[o]=h[o](r);let p=r[0]&&ot(r);return{c(){e=T("div"),l=T("button"),t=T("div"),m&&m.c(),n=G(),s.c(),a=G(),p&&p.c(),this.h()},l(d){e=z(d,"DIV",{class:!0});var _=D(e);l=z(_,"BUTTON",{class:!0});var v=D(l);t=z(v,"DIV",{class:!0});var w=D(t);m&&m.l(w),n=W(w),s.l(w),w.forEach(g),v.forEach(g),a=W(_),p&&p.l(_),_.forEach(g),this.h()},h(){S(t,"class","flex items-center justify-between"),S(l,"class","w-full p-4 text-left hover:bg-gray-200"),S(e,"class","rounded-xl border border-gray-200")},m(d,_){L(d,e,_),b(e,l),b(l,t),m&&m.m(t,null),b(t,n),u[o].m(t,null),b(e,a),p&&p.m(e,null),i=!0,c||(f=Le(l,"click",r[3]),c=!0)},p(d,[_]){m&&m.p&&(!i||_&2)&&Pt(m,E,d,d[1],i?Bt(E,d[1],_,Al):Rt(d[1]),it);let v=o;o=$(d),o!==v&&(te(),V(u[v],1,1,()=>{u[v]=null}),le(),s=u[o],s||(s=u[o]=h[o](d),s.c()),k(s,1),s.m(t,null)),d[0]?p?(p.p(d,_),_&1&&k(p,1)):(p=ot(d),p.c(),k(p,1),p.m(e,null)):p&&(te(),V(p,1,1,()=>{p=null}),le())},i(d){i||(k(m,d),k(s),k(p),i=!0)},o(d){V(m,d),V(s),V(p),i=!1},d(d){d&&g(e),m&&m.d(d),u[o].d(),p&&p.d(),c=!1,f()}}}function Nl(r,e,l){let{$$slots:t={},$$scope:n}=e,{expanded:o=!1}=e;const s=()=>l(0,o=!o);return r.$$set=a=>{"expanded"in a&&l(0,o=a.expanded),"$$scope"in a&&l(1,n=a.$$scope)},[o,n,t,s]}class Fe extends ce{constructor(e){super(),fe(this,e,Nl,Bl,ue,{expanded:0})}}function ct(r,e,l){const t=r.slice();return t[6]=e[l],t}function ft(r){let e,l,t=r[6].text+"",n,o,s,a,i,c,f,E;a=new Sl({props:{size:16}});function m(){return r[5](r[6])}return{c(){e=T("div"),l=T("span"),n=Z(t),o=G(),s=T("button"),N(a.$$.fragment),i=G(),this.h()},l(h){e=z(h,"DIV",{class:!0});var u=D(e);l=z(u,"SPAN",{class:!0});var $=D(l);n=j($,t),$.forEach(g),o=W(u),s=z(u,"BUTTON",{title:!0,class:!0});var p=D(s);H(a.$$.fragment,p),p.forEach(g),i=W(u),u.forEach(g),this.h()},h(){S(l,"class","shrink"),S(s,"title","Remove sample"),S(s,"class","shrink-0 opacity-50 hover:text-red-400 hover:opacity-100"),S(e,"class","flex w-full justify-between gap-x-2 border-b border-gray-200 p-2 hover:bg-gray-50")},m(h,u){L(h,e,u),b(e,l),b(l,n),b(e,o),b(e,s),O(a,s,null),b(e,i),c=!0,f||(E=Le(s,"click",m),f=!0)},p(h,u){r=h,(!c||u&1)&&t!==(t=r[6].text+"")&&ne(n,t)},i(h){c||(k(a.$$.fragment,h),c=!0)},o(h){V(a.$$.fragment,h),c=!1},d(h){h&&g(e),F(a),f=!1,E()}}}function Hl(r){let e,l,t,n,o,s;function a(m){r[3](m)}let i={labelText:"Add example"};r[1]!==void 0&&(i.value=r[1]),l=new nl({props:i}),Ee.push(()=>Ve(l,"value",a)),l.$on("keydown",r[4]);let c=[...r[0]].reverse(),f=[];for(let m=0;m<c.length;m+=1)f[m]=ft(ct(r,c,m));const E=m=>V(f[m],1,1,()=>{f[m]=null});return{c(){e=T("div"),N(l.$$.fragment),n=G(),o=T("div");for(let m=0;m<f.length;m+=1)f[m].c();this.h()},l(m){e=z(m,"DIV",{class:!0});var h=D(e);H(l.$$.fragment,h),h.forEach(g),n=W(m),o=z(m,"DIV",{class:!0});var u=D(o);for(let $=0;$<f.length;$+=1)f[$].l(u);u.forEach(g),this.h()},h(){S(e,"class",""),S(o,"class","flex h-full w-full flex-col overflow-y-auto overflow-x-clip border border-gray-200")},m(m,h){L(m,e,h),O(l,e,null),L(m,n,h),L(m,o,h);for(let u=0;u<f.length;u+=1)f[u]&&f[u].m(o,null);s=!0},p(m,[h]){const u={};if(!t&&h&2&&(t=!0,u.value=m[1],De(()=>t=!1)),l.$set(u),h&5){c=[...m[0]].reverse();let $;for($=0;$<c.length;$+=1){const p=ct(m,c,$);f[$]?(f[$].p(p,h),k(f[$],1)):(f[$]=ft(p),f[$].c(),k(f[$],1),f[$].m(o,null))}for(te(),$=c.length;$<f.length;$+=1)E($);le()}},i(m){if(!s){k(l.$$.fragment,m);for(let h=0;h<c.length;h+=1)k(f[h]);s=!0}},o(m){V(l.$$.fragment,m),f=f.filter(Boolean);for(let h=0;h<f.length;h+=1)V(f[h]);s=!1},d(m){m&&g(e),F(l),m&&g(n),m&&g(o),Ae(f,m)}}}function Ol(r,e,l){let{data:t}=e,n;const o=xt();function s(c){n=c,l(1,n)}const a=c=>{c.key==="Enter"&&(o("add",n),l(1,n=""))},i=c=>o("remove",c.id);return r.$$set=c=>{"data"in c&&l(0,t=c.data)},[t,n,o,s,a,i]}class ut extends ce{constructor(e){super(),fe(this,e,Ol,Hl,ue,{data:0})}}const Ue={not_good:"text-red-600",ok:"text-yellow-600",good:"text-green-600",very_good:"text-blue-600",great:"text-purple-600"},Qe={not_good:"Not good",ok:"OK",good:"Good",very_good:"Very good",great:"Great"};function Fl(r){let e,l,t,n,o,s=Qe[r[0].overall]+"",a,i,c,f,E,m,h,u=$e(r[0].f1)+"",$,p,d,_,v,w,I=$e(r[0].recall)+"",y,P,q,C,B,A,M=$e(r[0].precision)+"",U,re,ee,R,de,oe,se=$e(r[0].roc_auc)+"",me;return{c(){e=T("table"),l=T("tr"),t=T("td"),n=Z("Overall score"),o=T("td"),a=Z(s),c=G(),f=T("tr"),E=T("td"),m=Z("F1"),h=T("td"),$=Z(u),p=G(),d=T("tr"),_=T("td"),v=Z("Recall"),w=T("td"),y=Z(I),P=G(),q=T("tr"),C=T("td"),B=Z("Precision"),A=T("td"),U=Z(M),re=G(),ee=T("tr"),R=T("td"),de=Z("Area under ROC"),oe=T("td"),me=Z(se),this.h()},l(J){e=z(J,"TABLE",{class:!0});var Y=D(e);l=z(Y,"TR",{});var x=D(l);t=z(x,"TD",{class:!0});var Q=D(t);n=j(Q,"Overall score"),Q.forEach(g),o=z(x,"TD",{class:!0});var K=D(o);a=j(K,s),K.forEach(g),x.forEach(g),c=W(Y),f=z(Y,"TR",{});var he=D(f);E=z(he,"TD",{class:!0});var be=D(E);m=j(be,"F1"),be.forEach(g),h=z(he,"TD",{class:!0});var ve=D(h);$=j(ve,u),ve.forEach(g),he.forEach(g),p=W(Y),d=z(Y,"TR",{});var ge=D(d);_=z(ge,"TD",{class:!0});var pe=D(_);v=j(pe,"Recall"),pe.forEach(g),w=z(ge,"TD",{class:!0});var ze=D(w);y=j(ze,I),ze.forEach(g),ge.forEach(g),P=W(Y),q=z(Y,"TR",{});var ke=D(q);C=z(ke,"TD",{class:!0});var We=D(C);B=j(We,"Precision"),We.forEach(g),A=z(ke,"TD",{class:!0});var Ke=D(A);U=j(Ke,M),Ke.forEach(g),ke.forEach(g),re=W(Y),ee=z(Y,"TR",{});var je=D(ee);R=z(je,"TD",{class:!0});var Je=D(R);de=j(Je,"Area under ROC"),Je.forEach(g),oe=z(je,"TD",{class:!0});var Xe=D(oe);me=j(Xe,se),Xe.forEach(g),je.forEach(g),Y.forEach(g),this.h()},h(){S(t,"class","svelte-zc5pc5"),S(o,"class",i=xe(Ue[r[0].overall])+" svelte-zc5pc5"),S(E,"class","svelte-zc5pc5"),S(h,"class","svelte-zc5pc5"),S(_,"class","svelte-zc5pc5"),S(w,"class","svelte-zc5pc5"),S(C,"class","svelte-zc5pc5"),S(A,"class","svelte-zc5pc5"),S(R,"class","svelte-zc5pc5"),S(oe,"class","svelte-zc5pc5"),S(e,"class","svelte-zc5pc5")},m(J,Y){L(J,e,Y),b(e,l),b(l,t),b(t,n),b(l,o),b(o,a),b(e,c),b(e,f),b(f,E),b(E,m),b(f,h),b(h,$),b(e,p),b(e,d),b(d,_),b(_,v),b(d,w),b(w,y),b(e,P),b(e,q),b(q,C),b(C,B),b(q,A),b(A,U),b(e,re),b(e,ee),b(ee,R),b(R,de),b(ee,oe),b(oe,me)},p(J,[Y]){Y&1&&s!==(s=Qe[J[0].overall]+"")&&ne(a,s),Y&1&&i!==(i=xe(Ue[J[0].overall])+" svelte-zc5pc5")&&S(o,"class",i),Y&1&&u!==(u=$e(J[0].f1)+"")&&ne($,u),Y&1&&I!==(I=$e(J[0].recall)+"")&&ne(y,I),Y&1&&M!==(M=$e(J[0].precision)+"")&&ne(U,M),Y&1&&se!==(se=$e(J[0].roc_auc)+"")&&ne(me,se)},i:X,o:X,d(J){J&&g(e)}}}function Ll(r,e,l){let{metrics:t}=e;return r.$$set=n=>{"metrics"in n&&l(0,t=n.metrics)},[t]}class dt extends ce{constructor(e){super(),fe(this,e,Ll,Fl,ue,{metrics:0})}}function Ul(r){const e=r.slice(),l=!0;return e[7]=l,e}function Ql(r){let e,l;function t(){return r[6](r[7])}return e=new Ye({props:{icon:r[4].isLoading?Ge:lt,class:"w-28 text-3xl",$$slots:{default:[Zl]},$$scope:{ctx:r}}}),e.$on("click",t),{c(){N(e.$$.fragment)},l(n){H(e.$$.fragment,n)},m(n,o){O(e,n,o),l=!0},p(n,o){r=n;const s={};o&16&&(s.icon=r[4].isLoading?Ge:lt),o&256&&(s.$$scope={dirty:o,ctx:r}),e.$set(s)},i(n){l||(k(e.$$.fragment,n),l=!0)},o(n){V(e.$$.fragment,n),l=!1},d(n){F(e,n)}}}function ql(r){let e,l=Qe[r[3].data.metrics.overall]+"",t,n,o,s,a;return{c(){e=T("div"),t=Z(l),this.h()},l(i){e=z(i,"DIV",{class:!0});var c=D(e);t=j(c,l),c.forEach(g),this.h()},h(){S(e,"class",n="concept-score-pill cursor-default text-2xl font-light "+Ue[r[3].data.metrics.overall])},m(i,c){L(i,e,c),b(e,t),s||(a=Nt(o=Ot.call(null,e,{component:dt,props:{metrics:r[3].data.metrics}})),s=!0)},p(i,c){c&8&&l!==(l=Qe[i[3].data.metrics.overall]+"")&&ne(t,l),c&8&&n!==(n="concept-score-pill cursor-default text-2xl font-light "+Ue[i[3].data.metrics.overall])&&S(e,"class",n),o&&el(o.update)&&c&8&&o.update.call(null,{component:dt,props:{metrics:i[3].data.metrics}})},i:X,o:X,d(i){i&&g(e),s=!1,a()}}}function Yl(r){let e,l,t;return l=new Ge({}),{c(){e=T("div"),N(l.$$.fragment),this.h()},l(n){e=z(n,"DIV",{class:!0});var o=D(e);H(l.$$.fragment,o),o.forEach(g),this.h()},h(){S(e,"class","flex flex-col items-center")},m(n,o){L(n,e,o),O(l,e,null),t=!0},p:X,i(n){t||(k(l.$$.fragment,n),t=!0)},o(n){V(l.$$.fragment,n),t=!1},d(n){n&&g(e),F(l)}}}function Zl(r){let e;return{c(){e=Z("Compute")},l(l){e=j(l,"Compute")},m(l,t){L(l,e,t)},d(l){l&&g(e)}}}function jl(r){let e,l,t,n,o,s,a;const i=[Yl,ql,Ql],c=[];function f(m,h){var u,$;return m[3].isFetching?0:($=(u=m[3])==null?void 0:u.data)!=null&&$.metrics?1:2}function E(m,h){return h===2?Ul(m):m}return o=f(r),s=c[o]=i[o](E(r,o)),{c(){e=T("div"),l=T("div"),t=Z(r[1]),n=G(),s.c(),this.h()},l(m){e=z(m,"DIV",{class:!0});var h=D(e);l=z(h,"DIV",{class:!0});var u=D(l);t=j(u,r[1]),u.forEach(g),n=W(h),s.l(h),h.forEach(g),this.h()},h(){S(l,"class","text-gray-500"),S(e,"class","flex w-36 flex-col items-center gap-y-2 rounded-md border border-b-0 border-gray-200 p-4 shadow-md")},m(m,h){L(m,e,h),b(e,l),b(l,t),b(e,n),c[o].m(e,null),a=!0},p(m,[h]){(!a||h&2)&&ne(t,m[1]);let u=o;o=f(m),o===u?c[o].p(E(m,o),h):(te(),V(c[u],1,1,()=>{c[u]=null}),le(),s=c[o],s?s.p(E(m,o),h):(s=c[o]=i[o](E(m,o)),s.c()),k(s,1),s.m(e,null))},i(m){a||(k(s),a=!0)},o(m){V(s),a=!1},d(m){m&&g(e),c[o].d()}}}function Gl(r,e,l){let t,n,o=X,s=()=>(o(),o=ye(t,m=>l(3,n=m)),t),a;r.$$.on_destroy.push(()=>o());let{concept:i}=e,{embedding:c}=e;const f=rl();Ie(r,f,m=>l(4,a=m));const E=m=>a.mutate([i.namespace,i.concept_name,c,m]);return r.$$set=m=>{"concept"in m&&l(0,i=m.concept),"embedding"in m&&l(1,c=m.embedding)},r.$$.update=()=>{r.$$.dirty&3&&s(l(2,t=sl(i.namespace,i.concept_name,c)))},[i,c,t,n,a,f,E]}class Wl extends ce{constructor(e){super(),fe(this,e,Gl,jl,ue,{concept:0,embedding:1})}}function mt(r,e,l){const t=r.slice();return t[21]=e[l],t}function Kl(r){let e;return{c(){e=Z("Compute")},l(l){e=j(l,"Compute")},m(l,t){L(l,e,t)},d(l){l&&g(e)}}}function _t(r){let e,l;return e=new He({props:{value:r[21].name}}),{c(){N(e.$$.fragment)},l(t){H(e.$$.fragment,t)},m(t,n){O(e,t,n),l=!0},p(t,n){const o={};n&512&&(o.value=t[21].name),e.$set(o)},i(t){l||(k(e.$$.fragment,t),l=!0)},o(t){V(e.$$.fragment,t),l=!1},d(t){F(e,t)}}}function Jl(r){var s;let e,l,t=((s=r[9])==null?void 0:s.data)||[],n=[];for(let a=0;a<t.length;a+=1)n[a]=_t(mt(r,t,a));const o=a=>V(n[a],1,1,()=>{n[a]=null});return{c(){for(let a=0;a<n.length;a+=1)n[a].c();e=we()},l(a){for(let i=0;i<n.length;i+=1)n[i].l(a);e=we()},m(a,i){for(let c=0;c<n.length;c+=1)n[c]&&n[c].m(a,i);L(a,e,i),l=!0},p(a,i){var c;if(i&512){t=((c=a[9])==null?void 0:c.data)||[];let f;for(f=0;f<t.length;f+=1){const E=mt(a,t,f);n[f]?(n[f].p(E,i),k(n[f],1)):(n[f]=_t(E),n[f].c(),k(n[f],1),n[f].m(e.parentNode,e))}for(te(),f=t.length;f<n.length;f+=1)o(f);le()}},i(a){if(!l){for(let i=0;i<t.length;i+=1)k(n[i]);l=!0}},o(a){n=n.filter(Boolean);for(let i=0;i<n.length;i+=1)V(n[i]);l=!1},d(a){Ae(n,a),a&&g(e)}}}function Xl(r){let e,l;return e=new gl({props:{text:r[0],row:r[4],spanPaths:r[6],valuePaths:r[5],embeddings:r[1]?[r[1]]:[]}}),{c(){N(e.$$.fragment)},l(t){H(e.$$.fragment,t)},m(t,n){O(e,t,n),l=!0},p(t,n){const o={};n&1&&(o.text=t[0]),n&16&&(o.row=t[4]),n&64&&(o.spanPaths=t[6]),n&32&&(o.valuePaths=t[5]),n&2&&(o.embeddings=t[1]?[t[1]]:[]),e.$set(o)},i(t){l||(k(e.$$.fragment,t),l=!0)},o(t){V(e.$$.fragment,t),l=!1},d(t){F(e,t)}}}function xl(r){let e,l;return e=new Lt({}),{c(){N(e.$$.fragment)},l(t){H(e.$$.fragment,t)},m(t,n){O(e,t,n),l=!0},p:X,i(t){l||(k(e.$$.fragment,t),l=!0)},o(t){V(e.$$.fragment,t),l=!1},d(t){F(e,t)}}}function en(r){let e,l,t,n,o,s,a,i,c,f,E,m,h,u,$,p;t=new hl({props:{value:r[3],cols:50,placeholder:"Paste text to try the concept.",rows:6,class:"mb-2"}}),t.$on("input",r[12]),a=new Ye({props:{$$slots:{default:[Kl]},$$scope:{ctx:r}}}),a.$on("click",r[18]);function d(y){r[19](y)}let _={labelText:"Embedding",$$slots:{default:[Jl]},$$scope:{ctx:r}};r[1]!==void 0&&(_.selected=r[1]),f=new Ze({props:_}),Ee.push(()=>Ve(f,"selected",d));const v=[xl,Xl],w=[];function I(y,P){var q;return y[7]&&((q=y[2])!=null&&q.isFetching)?0:y[4]!=null&&y[0]!=null?1:-1}return~(u=I(r))&&($=w[u]=v[u](r)),{c(){e=T("div"),l=T("div"),N(t.$$.fragment),n=G(),o=T("div"),s=T("div"),N(a.$$.fragment),i=G(),c=T("div"),N(f.$$.fragment),m=G(),h=T("div"),$&&$.c(),this.h()},l(y){e=z(y,"DIV",{class:!0});var P=D(e);l=z(P,"DIV",{});var q=D(l);H(t.$$.fragment,q),n=W(q),o=z(q,"DIV",{class:!0});var C=D(o);s=z(C,"DIV",{class:!0});var B=D(s);H(a.$$.fragment,B),B.forEach(g),i=W(C),c=z(C,"DIV",{class:!0});var A=D(c);H(f.$$.fragment,A),A.forEach(g),C.forEach(g),q.forEach(g),m=W(P),h=z(P,"DIV",{class:!0});var M=D(h);$&&$.l(M),M.forEach(g),P.forEach(g),this.h()},h(){S(s,"class","pt-4"),S(c,"class","mb-2 w-32"),S(o,"class","flex flex-row justify-between"),S(h,"class","mt-4 border-gray-200"),Pe(h,"border-t",r[0]!=null),S(e,"class","flex flex-col gap-x-8")},m(y,P){L(y,e,P),b(e,l),O(t,l,null),b(l,n),b(l,o),b(o,s),O(a,s,null),b(o,i),b(o,c),O(f,c,null),b(e,m),b(e,h),~u&&w[u].m(h,null),p=!0},p(y,[P]){const q={};P&8&&(q.value=y[3]),t.$set(q);const C={};P&16777216&&(C.$$scope={dirty:P,ctx:y}),a.$set(C);const B={};P&16777728&&(B.$$scope={dirty:P,ctx:y}),!E&&P&2&&(E=!0,B.selected=y[1],De(()=>E=!1)),f.$set(B);let A=u;u=I(y),u===A?~u&&w[u].p(y,P):($&&(te(),V(w[A],1,1,()=>{w[A]=null}),le()),~u?($=w[u],$?$.p(y,P):($=w[u]=v[u](y),$.c()),k($,1),$.m(h,null)):$=null),(!p||P&1)&&Pe(h,"border-t",y[0]!=null)},i(y){p||(k(t.$$.fragment,y),k(a.$$.fragment,y),k(f.$$.fragment,y),k($),p=!0)},o(y){V(t.$$.fragment,y),V(a.$$.fragment,y),V(f.$$.fragment,y),V($),p=!1},d(y){y&&g(e),F(t),F(a),F(f),~u&&w[u].d()}}}function tn(r,e,l){var M;let t,n,o,s,a=X,i=()=>(a(),a=ye(o,U=>l(2,s=U)),o),c,f=X,E=()=>(f(),f=ye(n,U=>l(17,c=U)),n),m,h;r.$$.on_destroy.push(()=>a()),r.$$.on_destroy.push(()=>f());let{concept:u}=e,{example:$}=e;const p=Ft();Ie(r,p,U=>l(9,h=U));const d=Kt();Ie(r,d,U=>l(20,m=U));let _=(M=$.text)==null?void 0:M.trim();tl(()=>{y()});function v(U){l(3,_=U.target.value),l(0,w=void 0)}let w,I=m.embedding;function y(){l(0,w=_)}let P,q,C;const B=()=>y();function A(U){I=U,l(1,I)}return r.$$set=U=>{"concept"in U&&l(14,u=U.concept),"example"in U&&l(15,$=U.example)},r.$$.update=()=>{var U;if(r.$$.dirty&32768&&$.text&&(l(3,_=$.text.trim()),l(0,w=void 0)),r.$$.dirty&16386&&l(16,t={signal_name:"concept_score",concept_name:u.concept_name,namespace:u.namespace,embedding:I}),r.$$.dirty&65536&&E(l(8,n=t.embedding?al({signal:t}):void 0)),r.$$.dirty&16387&&i(l(7,o=I!=null&&w!=null?il(u.namespace,u.concept_name,I,{examples:[{text:w}]}):null)),r.$$.dirty&196614&&(s==null?void 0:s.data)!=null&&I!=null&&((U=c==null?void 0:c.data)==null?void 0:U.fields)!=null){const re=ol(c.data.fields);re.signal=t,l(4,P=cl(s.data[0],re));const ee=vl(re);l(6,C=ee.spanPaths),l(5,q=ee.valuePaths)}},[w,I,s,_,P,q,C,o,n,h,p,d,v,y,u,$,t,c,B,A]}class ln extends ce{constructor(e){super(),fe(this,e,tn,en,ue,{concept:14,example:15})}}function ht(r,e,l){const t=r.slice();return t[20]=e[l],t}function gt(r,e,l){const t=r.slice();return t[23]=e[l],t}function pt(r,e,l){const t=r.slice();return t[1]=e[l],t}function nn(r){let e,l;return e=new Ze({props:{labelText:"Dataset",selected:r[7],$$slots:{default:[an]},$$scope:{ctx:r}}}),e.$on("change",r[11]),{c(){N(e.$$.fragment)},l(t){H(e.$$.fragment,t)},m(t,n){O(e,t,n),l=!0},p(t,n){const o={};n&128&&(o.selected=t[7]),n&268435472&&(o.$$scope={dirty:n,ctx:t}),e.$set(o)},i(t){l||(k(e.$$.fragment,t),l=!0)},o(t){V(e.$$.fragment,t),l=!1},d(t){F(e,t)}}}function rn(r){let e,l;return e=new Qt({props:{kind:"error",title:"Error",subtitle:r[4].error.message,hideCloseButton:!0}}),{c(){N(e.$$.fragment)},l(t){H(e.$$.fragment,t)},m(t,n){O(e,t,n),l=!0},p(t,n){const o={};n&16&&(o.subtitle=t[4].error.message),e.$set(o)},i(t){l||(k(e.$$.fragment,t),l=!0)},o(t){V(e.$$.fragment,t),l=!1},d(t){F(e,t)}}}function sn(r){let e,l;return e=new qt({}),{c(){N(e.$$.fragment)},l(t){H(e.$$.fragment,t)},m(t,n){O(e,t,n),l=!0},p:X,i(t){l||(k(e.$$.fragment,t),l=!0)},o(t){V(e.$$.fragment,t),l=!1},d(t){F(e,t)}}}function bt(r){let e,l;return e=new He({props:{value:`${r[1].namespace}/${r[1].dataset_name}`}}),{c(){N(e.$$.fragment)},l(t){H(e.$$.fragment,t)},m(t,n){O(e,t,n),l=!0},p(t,n){const o={};n&16&&(o.value=`${t[1].namespace}/${t[1].dataset_name}`),e.$set(o)},i(t){l||(k(e.$$.fragment,t),l=!0)},o(t){V(e.$$.fragment,t),l=!1},d(t){F(e,t)}}}function an(r){let e,l,t,n;e=new He({props:{value:"",text:"none"}});let o=r[4].data,s=[];for(let i=0;i<o.length;i+=1)s[i]=bt(pt(r,o,i));const a=i=>V(s[i],1,1,()=>{s[i]=null});return{c(){N(e.$$.fragment),l=G();for(let i=0;i<s.length;i+=1)s[i].c();t=we()},l(i){H(e.$$.fragment,i),l=W(i);for(let c=0;c<s.length;c+=1)s[c].l(i);t=we()},m(i,c){O(e,i,c),L(i,l,c);for(let f=0;f<s.length;f+=1)s[f]&&s[f].m(i,c);L(i,t,c),n=!0},p(i,c){if(c&16){o=i[4].data;let f;for(f=0;f<o.length;f+=1){const E=pt(i,o,f);s[f]?(s[f].p(E,c),k(s[f],1)):(s[f]=bt(E),s[f].c(),k(s[f],1),s[f].m(t.parentNode,t))}for(te(),f=o.length;f<s.length;f+=1)a(f);le()}},i(i){if(!n){k(e.$$.fragment,i);for(let c=0;c<o.length;c+=1)k(s[c]);n=!0}},o(i){V(e.$$.fragment,i),s=s.filter(Boolean);for(let c=0;c<s.length;c+=1)V(s[c]);n=!1},d(i){F(e,i),i&&g(l),Ae(s,i),i&&g(t)}}}function on(r){let e,l;return e=new Ze({props:{labelText:"Field with embeddings",selected:r[6],$$slots:{default:[un]},$$scope:{ctx:r}}}),e.$on("change",r[12]),{c(){N(e.$$.fragment)},l(t){H(e.$$.fragment,t)},m(t,n){O(e,t,n),l=!0},p(t,n){const o={};n&64&&(o.selected=t[6]),n&268435460&&(o.$$scope={dirty:n,ctx:t}),e.$set(o)},i(t){l||(k(e.$$.fragment,t),l=!0)},o(t){V(e.$$.fragment,t),l=!1},d(t){F(e,t)}}}function cn(r){let e,l;return e=new Qt({props:{kind:"error",title:"Error",subtitle:r[3].error.message,hideCloseButton:!0}}),{c(){N(e.$$.fragment)},l(t){H(e.$$.fragment,t)},m(t,n){O(e,t,n),l=!0},p(t,n){const o={};n&8&&(o.subtitle=t[3].error.message),e.$set(o)},i(t){l||(k(e.$$.fragment,t),l=!0)},o(t){V(e.$$.fragment,t),l=!1},d(t){F(e,t)}}}function fn(r){let e,l;return e=new qt({}),{c(){N(e.$$.fragment)},l(t){H(e.$$.fragment,t)},m(t,n){O(e,t,n),l=!0},p:X,i(t){l||(k(e.$$.fragment,t),l=!0)},o(t){V(e.$$.fragment,t),l=!1},d(t){F(e,t)}}}function vt(r){let e,l;return e=new He({props:{value:Me(r[23].path)}}),{c(){N(e.$$.fragment)},l(t){H(e.$$.fragment,t)},m(t,n){O(e,t,n),l=!0},p(t,n){const o={};n&4&&(o.value=Me(t[23].path)),e.$set(o)},i(t){l||(k(e.$$.fragment,t),l=!0)},o(t){V(e.$$.fragment,t),l=!1},d(t){F(e,t)}}}function un(r){let e,l,t=r[2],n=[];for(let s=0;s<t.length;s+=1)n[s]=vt(gt(r,t,s));const o=s=>V(n[s],1,1,()=>{n[s]=null});return{c(){for(let s=0;s<n.length;s+=1)n[s].c();e=we()},l(s){for(let a=0;a<n.length;a+=1)n[a].l(s);e=we()},m(s,a){for(let i=0;i<n.length;i+=1)n[i]&&n[i].m(s,a);L(s,e,a),l=!0},p(s,a){if(a&4){t=s[2];let i;for(i=0;i<t.length;i+=1){const c=gt(s,t,i);n[i]?(n[i].p(c,a),k(n[i],1)):(n[i]=vt(c),n[i].c(),k(n[i],1),n[i].m(e.parentNode,e))}for(te(),i=t.length;i<n.length;i+=1)o(i);le()}},i(s){if(!l){for(let a=0;a<t.length;a+=1)k(n[a]);l=!0}},o(s){n=n.filter(Boolean);for(let a=0;a<n.length;a+=1)V(n[a]);l=!1},d(s){Ae(n,s),s&&g(e)}}}function $t(r){let e,l,t;function n(s){r[19](s)}let o={labelText:"Embedding",$$slots:{default:[dn]},$$scope:{ctx:r}};return r[0]!==void 0&&(o.selected=r[0]),e=new Ze({props:o}),Ee.push(()=>Ve(e,"selected",n)),{c(){N(e.$$.fragment)},l(s){H(e.$$.fragment,s)},m(s,a){O(e,s,a),t=!0},p(s,a){const i={};a&268435488&&(i.$$scope={dirty:a,ctx:s}),!l&&a&1&&(l=!0,i.selected=s[0],De(()=>l=!1)),e.$set(i)},i(s){t||(k(e.$$.fragment,s),t=!0)},o(s){V(e.$$.fragment,s),t=!1},d(s){F(e,s)}}}function wt(r){let e,l;return e=new He({props:{value:r[20]}}),{c(){N(e.$$.fragment)},l(t){H(e.$$.fragment,t)},m(t,n){O(e,t,n),l=!0},p(t,n){const o={};n&32&&(o.value=t[20]),e.$set(o)},i(t){l||(k(e.$$.fragment,t),l=!0)},o(t){V(e.$$.fragment,t),l=!1},d(t){F(e,t)}}}function dn(r){let e,l,t=r[5],n=[];for(let s=0;s<t.length;s+=1)n[s]=wt(ht(r,t,s));const o=s=>V(n[s],1,1,()=>{n[s]=null});return{c(){for(let s=0;s<n.length;s+=1)n[s].c();e=we()},l(s){for(let a=0;a<n.length;a+=1)n[a].l(s);e=we()},m(s,a){for(let i=0;i<n.length;i+=1)n[i]&&n[i].m(s,a);L(s,e,a),l=!0},p(s,a){if(a&32){t=s[5];let i;for(i=0;i<t.length;i+=1){const c=ht(s,t,i);n[i]?(n[i].p(c,a),k(n[i],1)):(n[i]=wt(c),n[i].c(),k(n[i],1),n[i].m(e.parentNode,e))}for(te(),i=t.length;i<n.length;i+=1)o(i);le()}},i(s){if(!l){for(let a=0;a<t.length;a+=1)k(n[a]);l=!0}},o(s){n=n.filter(Boolean);for(let a=0;a<n.length;a+=1)V(n[a]);l=!1},d(s){Ae(n,s),s&&g(e)}}}function mn(r){let e,l,t,n,o,s,a,i,c,f,E;const m=[sn,rn,nn],h=[];function u(v,w){return v[4].isLoading?0:v[4].isError?1:v[4].data.length>0?2:-1}~(t=u(r))&&(n=h[t]=m[t](r));const $=[fn,cn,on],p=[];function d(v,w){return v[3].isLoading?0:v[3].isError?1:v[2].length>0?2:-1}~(a=d(r))&&(i=p[a]=$[a](r));let _=r[5].length>0&&$t(r);return{c(){e=T("div"),l=T("div"),n&&n.c(),o=G(),s=T("div"),i&&i.c(),c=G(),f=T("div"),_&&_.c(),this.h()},l(v){e=z(v,"DIV",{class:!0});var w=D(e);l=z(w,"DIV",{class:!0});var I=D(l);n&&n.l(I),I.forEach(g),o=W(w),s=z(w,"DIV",{class:!0});var y=D(s);i&&i.l(y),y.forEach(g),c=W(w),f=z(w,"DIV",{class:!0});var P=D(f);_&&_.l(P),P.forEach(g),w.forEach(g),this.h()},h(){S(l,"class","w-1/3"),S(s,"class","w-1/3"),S(f,"class","w-1/3"),S(e,"class","flex w-full flex-row gap-x-4")},m(v,w){L(v,e,w),b(e,l),~t&&h[t].m(l,null),b(e,o),b(e,s),~a&&p[a].m(s,null),b(e,c),b(e,f),_&&_.m(f,null),E=!0},p(v,[w]){let I=t;t=u(v),t===I?~t&&h[t].p(v,w):(n&&(te(),V(h[I],1,1,()=>{h[I]=null}),le()),~t?(n=h[t],n?n.p(v,w):(n=h[t]=m[t](v),n.c()),k(n,1),n.m(l,null)):n=null);let y=a;a=d(v),a===y?~a&&p[a].p(v,w):(i&&(te(),V(p[y],1,1,()=>{p[y]=null}),le()),~a?(i=p[a],i?i.p(v,w):(i=p[a]=$[a](v),i.c()),k(i,1),i.m(s,null)):i=null),v[5].length>0?_?(_.p(v,w),w&32&&k(_,1)):(_=$t(v),_.c(),k(_,1),_.m(f,null)):_&&(te(),V(_,1,1,()=>{_=null}),le())},i(v){E||(k(n),k(i),k(_),E=!0)},o(v){V(n),V(i),V(_),E=!1},d(v){v&&g(e),~t&&h[t].d(),~a&&p[a].d(),_&&_.d()}}}function _n(r,e,l){let t,n,o,s,a,i,c,f,E,m=X,h=()=>(m(),m=ye(n,C=>l(3,E=C)),n),u,$;r.$$.on_destroy.push(()=>m());let{dataset:p=void 0}=e,{path:d}=e,{embedding:_=void 0}=e;const v=Kt();Ie(r,v,C=>l(18,$=C));let w;const I=fl();Ie(r,I,C=>l(4,u=C));function y(C){const B=C.target.value;if(B==="")l(1,p=null);else{const[A,M]=B.split("/");l(1,p={namespace:A,name:M})}}function P(C){const B=C.target.value;l(13,d=ml(B))}function q(C){_=C,l(0,_),l(15,c),l(13,d),l(14,w),l(2,i),l(3,E),l(17,a)}return r.$$set=C=>{"dataset"in C&&l(1,p=C.dataset),"path"in C&&l(13,d=C.path),"embedding"in C&&l(0,_=C.embedding)},r.$$.update=()=>{if(r.$$.dirty&262144&&l(16,t=[$.embedding,"gte-small","gte-base","openai","sbert"]),r.$$.dirty&18&&u.data&&u.data.length>0&&p===void 0&&l(1,p={namespace:u.data[0].namespace,name:u.data[0].dataset_name}),r.$$.dirty&2&&h(l(8,n=Ut(p==null?void 0:p.namespace,p==null?void 0:p.name))),r.$$.dirty&2&&l(7,o=p?`${p.namespace}/${p.name}`:""),r.$$.dirty&8&&l(14,w=E.data),r.$$.dirty&16384&&l(17,a=w?Re(w).filter(C=>!ul(C,w)&&C.dtype!=null):[]),r.$$.dirty&131072&&l(2,i=a.filter(C=>Re(C).some(B=>B.signal!=null&&Re(B).some(A=>A.dtype==="embedding")))),r.$$.dirty&8196&&d!=null){const C=Me(d);i.some(A=>Me(A.path)===C)||l(13,d=void 0)}r.$$.dirty&8196&&i.length>0&&d==null&&l(13,d=i[0].path),r.$$.dirty&8192&&l(6,s=d?Me(d):void 0),r.$$.dirty&24576&&l(15,c=d&&w?Re(dl(w,d)).filter(C=>C.signal!=null&&Re(C).some(B=>B.dtype==="embedding")):[]),r.$$.dirty&98304&&l(5,f=c.map(C=>C.signal.signal_name).sort((C,B)=>{let A=t.indexOf(C),M=t.indexOf(B);return A===-1&&(A=t.length),M===-1&&(M=t.length),A-M})),r.$$.dirty&32769&&_!=null&&(c.some(B=>B.path.at(-1)===_)||l(0,_=void 0))},[_,p,i,E,u,f,s,o,n,v,I,y,P,d,w,c,t,a,$,q]}class Xt extends ce{constructor(e){super(),fe(this,e,_n,mn,ue,{dataset:1,path:13,embedding:0})}}function hn(r,e,l,t,n,o){const s={...r};if(e==null||l==null)return s;const a=[...e,...l],i=new Set,c=[];for(const u of a){const $=Be.value(Ne(u,[Oe]),"string");if($==null||i.has($))continue;i.add($);const p=Ne(u,n);if(p==null)continue;const d=Be.value(p,"string");if(d==null)continue;const _=`${t.namespace}/${t.concept_name}`,v=Ne(p,[`${_}/${o}`]);if(v==null)continue;const w=Ne(p,[`${_}/labels`]),I=[];if(w!=null)for(const y of w){const P=Be.value(y,"string_span");P!=null&&I.push(P)}for(const y of v){const P=Be.value(y,"string_span");if(P==null||!I.every(A=>A.start>P.end||A.end<P.start))continue;const C=Ne(y,["score"]);if(C==null)continue;const B=Be.value(C,"float32");B!=null&&c.push({rowid:$,text:d,span:P,score:B})}}function f(u){return{rowid:u.rowid,text:$l(u.text,u.span.start,u.span.end),score:u.score}}c.sort((u,$)=>$.score-u.score);const E=c[0],m=c.slice().reverse().find(u=>u!=E);c.sort((u,$)=>Math.abs(u.score-.5)-Math.abs($.score-.5));const h=c.find(u=>u!=E&&u!=m);return E!=null&&s.positive==null&&(s.positive=f(E)),h!=null&&s.neutral==null&&(s.neutral=f(h)),m!=null&&s.negative==null&&(s.negative=f(m)),s}function kt(r,e,l){const t=r.slice();return t[21]=e[l],t}function gn(r){const e=r.slice(),l=$n(e[21].score);e[24]=l;const t=wn(e[21].score);return e[25]=t,e}function pn(r){let e,l,t,n,o,s,a,i,c,f=r[21].text+"",E,m,h,u=r[25]+"",$,p,d=$e(r[21].score,2)+"",_,v,w,I,y,P;n=new Gt({});function q(){return r[18](r[21])}a=new Wt({});function C(){return r[19](r[21])}return{c(){e=T("div"),l=T("div"),t=T("button"),N(n.$$.fragment),o=G(),s=T("button"),N(a.$$.fragment),i=G(),c=T("div"),E=Z(f),m=G(),h=T("div"),$=Z(u),p=G(),_=Z(d),v=G(),this.h()},l(B){e=z(B,"DIV",{class:!0});var A=D(e);l=z(A,"DIV",{class:!0});var M=D(l);t=z(M,"BUTTON",{class:!0});var U=D(t);H(n.$$.fragment,U),U.forEach(g),o=W(M),s=z(M,"BUTTON",{class:!0});var re=D(s);H(a.$$.fragment,re),re.forEach(g),M.forEach(g),i=W(A),c=z(A,"DIV",{class:!0});var ee=D(c);E=j(ee,f),ee.forEach(g),m=W(A),h=z(A,"DIV",{class:!0});var R=D(h);$=j(R,u),p=W(R),_=j(R,d),R.forEach(g),v=W(A),A.forEach(g),this.h()},h(){S(t,"class","p-2 hover:bg-gray-200"),Pe(t,"text-blue-500",r[21].label===!0),S(s,"class","p-2 hover:bg-gray-200"),Pe(s,"text-red-500",r[21].label===!1),S(l,"class","mr-2 flex flex-shrink-0 gap-x-1"),S(c,"class","flex-grow"),S(h,"class","w-40 flex-shrink-0 text-right"),S(e,"class",w=`flex flex-grow items-center whitespace-break-spaces rounded-md border border-gray-300 p-4 pl-2 ${r[24]}`)},m(B,A){L(B,e,A),b(e,l),b(l,t),O(n,t,null),b(l,o),b(l,s),O(a,s,null),b(e,i),b(e,c),b(c,E),b(e,m),b(e,h),b(h,$),b(h,p),b(h,_),b(e,v),I=!0,y||(P=[Le(t,"click",q),Le(s,"click",C)],y=!0)},p(B,A){r=B,(!I||A&2)&&Pe(t,"text-blue-500",r[21].label===!0),(!I||A&2)&&Pe(s,"text-red-500",r[21].label===!1),(!I||A&2)&&f!==(f=r[21].text+"")&&ne(E,f),(!I||A&2)&&u!==(u=r[25]+"")&&ne($,u),(!I||A&2)&&d!==(d=$e(r[21].score,2)+"")&&ne(_,d),(!I||A&2&&w!==(w=`flex flex-grow items-center whitespace-break-spaces rounded-md border border-gray-300 p-4 pl-2 ${r[24]}`))&&S(e,"class",w)},i(B){I||(k(n.$$.fragment,B),k(a.$$.fragment,B),I=!0)},o(B){V(n.$$.fragment,B),V(a.$$.fragment,B),I=!1},d(B){B&&g(e),F(n),F(a),y=!1,ll(P)}}}function bn(r){let e,l;return e=new Lt({props:{paragraph:!0,lines:2}}),{c(){N(e.$$.fragment)},l(t){H(e.$$.fragment,t)},m(t,n){O(e,t,n),l=!0},p:X,i(t){l||(k(e.$$.fragment,t),l=!0)},o(t){V(e.$$.fragment,t),l=!1},d(t){F(e,t)}}}function Et(r){let e,l,t,n,o;const s=[bn,pn],a=[];function i(f,E){return E&3&&(e=null),e==null&&(e=!!(f[21]==null||f[0].includes(f[21].rowid))),e?0:1}function c(f,E){return E===1?gn(f):f}return l=i(r,-1),t=a[l]=s[l](c(r,l)),{c(){t.c(),n=we()},l(f){t.l(f),n=we()},m(f,E){a[l].m(f,E),L(f,n,E),o=!0},p(f,E){let m=l;l=i(f,E),l===m?a[l].p(c(f,l),E):(te(),V(a[m],1,1,()=>{a[m]=null}),le(),t=a[l],t?t.p(c(f,l),E):(t=a[l]=s[l](c(f,l)),t.c()),k(t,1),t.m(n.parentNode,n))},i(f){o||(k(t),o=!0)},o(f){V(t),o=!1},d(f){a[l].d(f),f&&g(n)}}}function vn(r){let e,l,t=r[1],n=[];for(let s=0;s<t.length;s+=1)n[s]=Et(kt(r,t,s));const o=s=>V(n[s],1,1,()=>{n[s]=null});return{c(){e=T("div");for(let s=0;s<n.length;s+=1)n[s].c();this.h()},l(s){e=z(s,"DIV",{class:!0});var a=D(e);for(let i=0;i<n.length;i+=1)n[i].l(a);a.forEach(g),this.h()},h(){S(e,"class","flex flex-col gap-y-4")},m(s,a){L(s,e,a);for(let i=0;i<n.length;i+=1)n[i]&&n[i].m(e,null);l=!0},p(s,[a]){if(a&35){t=s[1];let i;for(i=0;i<t.length;i+=1){const c=kt(s,t,i);n[i]?(n[i].p(c,a),k(n[i],1)):(n[i]=Et(c),n[i].c(),k(n[i],1),n[i].m(e,null))}for(te(),i=t.length;i<n.length;i+=1)o(i);le()}},i(s){if(!l){for(let a=0;a<t.length;a+=1)k(n[a]);l=!0}},o(s){n=n.filter(Boolean);for(let a=0;a<n.length;a+=1)V(n[a]);l=!1},d(s){s&&g(e),Ae(n,s)}}}const Vt=100;function $n(r){return r<.2?"bg-red-500/10":r<.8?"bg-yellow-500/10":"bg-blue-500/10"}function wn(r){return r<.2?"Likely not in concept":r<.8?"Uncertain":"Likely in concept"}function kn(r,e,l){let t,n,o,s,a,i,c,f,E=X,m=()=>(E(),E=ye(a,M=>l(16,f=M)),a),h,u=X,$=()=>(u(),u=ye(n,M=>l(17,h=M)),n);r.$$.on_destroy.push(()=>E()),r.$$.on_destroy.push(()=>u());let{dataset:p}=e,{concept:d}=e,{fieldPath:_}=e,{schema:v}=e,{embedding:w}=e;const I=Yt();Ie(r,I,M=>l(20,c=M));let y={},P={},q=[];function C(M,U){if(M==null)return;const re={text:M.text,label:U},ee=Object.keys(P).find(R=>P[R]===M);l(11,y={...P}),l(0,q=[M.rowid,...q]),c.mutate([d.namespace,d.concept_name,{insert:[re]}],{onSuccess:()=>{l(11,y={...y,[ee]:void 0})},onSettled:()=>{l(0,q=q.filter(R=>R!==M.rowid))}})}const B=M=>C(M,!0),A=M=>C(M,!1);return r.$$set=M=>{"dataset"in M&&l(6,p=M.dataset),"concept"in M&&l(7,d=M.concept),"fieldPath"in M&&l(8,_=M.fieldPath),"schema"in M&&l(9,v=M.schema),"embedding"in M&&l(10,w=M.embedding)},r.$$.update=()=>{var M,U;r.$$.dirty&1408&&l(15,t={path:_,type:"concept",concept_namespace:d.namespace,concept_name:d.concept_name,embedding:w}),r.$$.dirty&33600&&$(l(3,n=et(p.namespace,p.name,{columns:[Oe,_],limit:Vt,combine_columns:!0,searches:[t]},v))),r.$$.dirty&1152&&l(14,o={signal_name:"concept_score",namespace:d.namespace,concept_name:d.concept_name,embedding:w}),r.$$.dirty&128&&l(13,s={signal_name:"concept_labels",namespace:d.namespace,concept_name:d.concept_name}),r.$$.dirty&25408&&m(l(2,a=et(p.namespace,p.name,{columns:[Oe,_,{path:_,signal_udf:o},{path:_,signal_udf:s}],limit:Vt,combine_columns:!0,sort_by:[Oe]},v))),r.$$.dirty&200064&&l(12,P=hn(y,h.isFetching||(M=h.data)==null?void 0:M.rows,f.isFetching||(U=f.data)==null?void 0:U.rows,d,_,w)),r.$$.dirty&4096&&l(1,i=[P.positive,P.neutral,P.negative])},[q,i,a,n,I,C,p,d,_,v,w,y,P,s,o,t,f,h,B,A]}class En extends ce{constructor(e){super(),fe(this,e,kn,vn,ue,{dataset:6,concept:7,fieldPath:8,schema:9,embedding:10})}}function Dt(r){let e,l;return e=new Ye({props:{class:"dataset-link top-7 h-8",icon:wl,iconDescription:"Open dataset and apply concept."}}),e.$on("click",r[8]),{c(){N(e.$$.fragment)},l(t){H(e.$$.fragment,t)},m(t,n){O(e,t,n),l=!0},p:X,i(t){l||(k(e.$$.fragment,t),l=!0)},o(t){V(e.$$.fragment,t),l=!1},d(t){F(e,t)}}}function It(r){let e,l,t;return l=new En({props:{concept:r[0],dataset:r[1],fieldPath:r[2],schema:r[4],embedding:r[3]}}),{c(){e=T("div"),N(l.$$.fragment)},l(n){e=z(n,"DIV",{});var o=D(e);H(l.$$.fragment,o),o.forEach(g)},m(n,o){L(n,e,o),O(l,e,null),t=!0},p(n,o){const s={};o&1&&(s.concept=n[0]),o&2&&(s.dataset=n[1]),o&4&&(s.fieldPath=n[2]),o&16&&(s.schema=n[4]),o&8&&(s.embedding=n[3]),l.$set(s)},i(n){t||(k(l.$$.fragment,n),t=!0)},o(n){V(l.$$.fragment,n),t=!1},d(n){n&&g(e),F(l)}}}function yt(r){let e,l;return e=new Jt({props:{hideCloseButton:!0,kind:"warning",fullWidth:!0,lowContrast:!0,title:"No embeddings",caption:"Dataset has no fields with computed embeddings. Please compute an embedding index before using the labeler on this dataset."}}),{c(){N(e.$$.fragment)},l(t){H(e.$$.fragment,t)},m(t,n){O(e,t,n),l=!0},i(t){l||(k(e.$$.fragment,t),l=!0)},o(t){V(e.$$.fragment,t),l=!1},d(t){F(e,t)}}}function Vn(r){let e,l,t,n,o,s,a,i,c,f,E;function m(v){r[10](v)}function h(v){r[11](v)}function u(v){r[12](v)}let $={};r[1]!==void 0&&($.dataset=r[1]),r[2]!==void 0&&($.path=r[2]),r[3]!==void 0&&($.embedding=r[3]),n=new Xt({props:$}),Ee.push(()=>Ve(n,"dataset",m)),Ee.push(()=>Ve(n,"path",h)),Ee.push(()=>Ve(n,"embedding",u));let p=r[5]!=null&&r[3]!=null&&Dt(r),d=r[1]!=null&&r[2]!=null&&r[4]!=null&&r[3]!=null&&It(r),_=r[3]==null&&yt();return{c(){e=T("div"),l=T("div"),t=T("div"),N(n.$$.fragment),i=G(),p&&p.c(),c=G(),d&&d.c(),f=G(),_&&_.c(),this.h()},l(v){e=z(v,"DIV",{class:!0});var w=D(e);l=z(w,"DIV",{class:!0});var I=D(l);t=z(I,"DIV",{class:!0});var y=D(t);H(n.$$.fragment,y),y.forEach(g),i=W(I),p&&p.l(I),I.forEach(g),c=W(w),d&&d.l(w),f=W(w),_&&_.l(w),w.forEach(g),this.h()},h(){S(t,"class","flex-grow"),S(l,"class","flex flex-row gap-x-4"),S(e,"class","flex flex-col gap-y-4")},m(v,w){L(v,e,w),b(e,l),b(l,t),O(n,t,null),b(l,i),p&&p.m(l,null),b(e,c),d&&d.m(e,null),b(e,f),_&&_.m(e,null),E=!0},p(v,[w]){const I={};!o&&w&2&&(o=!0,I.dataset=v[1],De(()=>o=!1)),!s&&w&4&&(s=!0,I.path=v[2],De(()=>s=!1)),!a&&w&8&&(a=!0,I.embedding=v[3],De(()=>a=!1)),n.$set(I),v[5]!=null&&v[3]!=null?p?(p.p(v,w),w&40&&k(p,1)):(p=Dt(v),p.c(),k(p,1),p.m(l,null)):p&&(te(),V(p,1,1,()=>{p=null}),le()),v[1]!=null&&v[2]!=null&&v[4]!=null&&v[3]!=null?d?(d.p(v,w),w&30&&k(d,1)):(d=It(v),d.c(),k(d,1),d.m(e,f)):d&&(te(),V(d,1,1,()=>{d=null}),le()),v[3]==null?_?w&8&&k(_,1):(_=yt(),_.c(),k(_,1),_.m(e,null)):_&&(te(),V(_,1,1,()=>{_=null}),le())},i(v){E||(k(n.$$.fragment,v),k(p),k(d),k(_),E=!0)},o(v){V(n.$$.fragment,v),V(p),V(d),V(_),E=!1},d(v){v&&g(e),F(n),p&&p.d(),d&&d.d(),_&&_.d()}}}function Dn(r,e,l){let t,n,o,s,a=X,i=()=>(a(),a=ye(o,I=>l(13,s=I)),o),c,f=X,E=()=>(f(),f=ye(t,I=>l(9,c=I)),t);r.$$.on_destroy.push(()=>a()),r.$$.on_destroy.push(()=>f());let{concept:m}=e,h,u,$,p;function d(){n==null||p==null||h==null||o==null||s==null||(o.addSearch({path:[n],type:"concept",concept_namespace:m.namespace,concept_name:m.concept_name,embedding:p}),Ht(jt(h.namespace,h.name,s)))}function _(I){h=I,l(1,h)}function v(I){$=I,l(2,$)}function w(I){p=I,l(3,p)}return r.$$set=I=>{"concept"in I&&l(0,m=I.concept)},r.$$.update=()=>{r.$$.dirty&2&&E(l(7,t=Ut(h==null?void 0:h.namespace,h==null?void 0:h.name))),r.$$.dirty&512&&l(4,u=c.data),r.$$.dirty&4&&l(5,n=$?Me($):void 0),r.$$.dirty&14&&i(l(6,o=h!=null&&$!=null&&p!=null?Zt(h.namespace,h.name):null))},[m,h,$,p,u,n,o,t,d,c,_,v,w]}class In extends ce{constructor(e){super(),fe(this,e,Dn,Vn,ue,{concept:0})}}function St(r,e,l){const t=r.slice();return t[27]=e[l],t}function Ct(r){let e,l,t,n,o;return l=new zl({props:{class:"ml-2"}}),{c(){e=T("div"),N(l.$$.fragment)},l(s){e=z(s,"DIV",{});var a=D(e);H(l.$$.fragment,a),a.forEach(g)},m(s,a){L(s,e,a),O(l,e,null),t=!0,n||(o=Nt(Ot.call(null,e,{text:"Your concepts are only visible to you when logged in with Google."})),n=!0)},i(s){t||(k(l.$$.fragment,s),t=!0)},o(s){V(l.$$.fragment,s),t=!1},d(s){s&&g(e),F(l),n=!1,o()}}}function Tt(r){let e,l=r[0].description+"",t;return{c(){e=T("div"),t=Z(l),this.h()},l(n){e=z(n,"DIV",{class:!0});var o=D(e);t=j(o,l),o.forEach(g),this.h()},h(){S(e,"class","text text-base text-gray-600")},m(n,o){L(n,e,o),b(e,t)},p(n,o){o&1&&l!==(l=n[0].description+"")&&ne(t,l)},d(n){n&&g(e)}}}function yn(r){let e,l;return{c(){e=T("div"),l=Z("Try it"),this.h()},l(t){e=z(t,"DIV",{slot:!0,class:!0});var n=D(e);l=j(n,"Try it"),n.forEach(g),this.h()},h(){S(e,"slot","above"),S(e,"class","text-md font-semibold")},m(t,n){L(t,e,n),b(e,l)},p:X,d(t){t&&g(e)}}}function Sn(r){let e,l;return e=new ln({props:{example:r[6],concept:r[0],slot:"below"}}),{c(){N(e.$$.fragment)},l(t){H(e.$$.fragment,t)},m(t,n){O(e,t,n),l=!0},p(t,n){const o={};n&64&&(o.example=t[6]),n&1&&(o.concept=t[0]),e.$set(o)},i(t){l||(k(e.$$.fragment,t),l=!0)},o(t){V(e.$$.fragment,t),l=!1},d(t){F(e,t)}}}function Cn(r){let e,l;return{c(){e=T("div"),l=Z("Apply to a dataset"),this.h()},l(t){e=z(t,"DIV",{slot:!0,class:!0});var n=D(e);l=j(n,"Apply to a dataset"),n.forEach(g),this.h()},h(){S(e,"slot","above"),S(e,"class","text-md font-semibold")},m(t,n){L(t,e,n),b(e,l)},p:X,d(t){t&&g(e)}}}function Tn(r){let e,l;return e=new Jt({props:{hideCloseButton:!0,kind:"warning",fullWidth:!0,lowContrast:!0,title:"Choose a dataset with a computed embedding",caption:"Dataset has no fields with computed embeddings. Please compute an embedding index before you can search by concept."}}),{c(){N(e.$$.fragment)},l(t){H(e.$$.fragment,t)},m(t,n){O(e,t,n),l=!0},p:X,i(t){l||(k(e.$$.fragment,t),l=!0)},o(t){V(e.$$.fragment,t),l=!1},d(t){F(e,t)}}}function zn(r){let e,l,t;return l=new Ye({props:{class:"",iconDescription:"Open dataset and apply concept.",$$slots:{default:[Mn]},$$scope:{ctx:r}}}),l.$on("click",r[20]),{c(){e=T("div"),N(l.$$.fragment),this.h()},l(n){e=z(n,"DIV",{class:!0});var o=D(e);H(l.$$.fragment,o),o.forEach(g),this.h()},h(){S(e,"class","mt-4")},m(n,o){L(n,e,o),O(l,e,null),t=!0},p(n,o){const s={};o&1073741824&&(s.$$scope={dirty:o,ctx:n}),l.$set(s)},i(n){t||(k(l.$$.fragment,n),t=!0)},o(n){V(l.$$.fragment,n),t=!1},d(n){n&&g(e),F(l)}}}function Mn(r){let e;return{c(){e=Z("Search by concept")},l(l){e=j(l,"Search by concept")},m(l,t){L(l,e,t)},d(l){l&&g(e)}}}function An(r){let e,l,t,n,o,s,a,i,c;function f(d){r[17](d)}function E(d){r[18](d)}function m(d){r[19](d)}let h={};r[1]!==void 0&&(h.dataset=r[1]),r[2]!==void 0&&(h.path=r[2]),r[3]!==void 0&&(h.embedding=r[3]),l=new Xt({props:h}),Ee.push(()=>Ve(l,"dataset",f)),Ee.push(()=>Ve(l,"path",E)),Ee.push(()=>Ve(l,"embedding",m));const u=[zn,Tn],$=[];function p(d,_){return d[1]!=null&&d[2]!=null&&d[3]!=null?0:1}return a=p(r),i=$[a]=u[a](r),{c(){e=T("div"),N(l.$$.fragment),s=G(),i.c(),this.h()},l(d){e=z(d,"DIV",{slot:!0});var _=D(e);H(l.$$.fragment,_),s=W(_),i.l(_),_.forEach(g),this.h()},h(){S(e,"slot","below")},m(d,_){L(d,e,_),O(l,e,null),b(e,s),$[a].m(e,null),c=!0},p(d,_){const v={};!t&&_&2&&(t=!0,v.dataset=d[1],De(()=>t=!1)),!n&&_&4&&(n=!0,v.path=d[2],De(()=>n=!1)),!o&&_&8&&(o=!0,v.embedding=d[3],De(()=>o=!1)),l.$set(v);let w=a;a=p(d),a===w?$[a].p(d,_):(te(),V($[w],1,1,()=>{$[w]=null}),le(),i=$[a],i?i.p(d,_):(i=$[a]=u[a](d),i.c()),k(i,1),i.m(e,null))},i(d){c||(k(l.$$.fragment,d),k(i),c=!0)},o(d){V(l.$$.fragment,d),V(i),c=!1},d(d){d&&g(e),F(l),$[a].d()}}}function zt(r){let e,l;return e=new Fe({props:{expanded:!0,$$slots:{below:[Rn],above:[Pn]},$$scope:{ctx:r}}}),{c(){N(e.$$.fragment)},l(t){H(e.$$.fragment,t)},m(t,n){O(e,t,n),l=!0},p(t,n){const o={};n&1073742337&&(o.$$scope={dirty:n,ctx:t}),e.$set(o)},i(t){l||(k(e.$$.fragment,t),l=!0)},o(t){V(e.$$.fragment,t),l=!1},d(t){F(e,t)}}}function Pn(r){let e,l;return{c(){e=T("div"),l=Z("Metrics"),this.h()},l(t){e=z(t,"DIV",{slot:!0,class:!0});var n=D(e);l=j(n,"Metrics"),n.forEach(g),this.h()},h(){S(e,"slot","above"),S(e,"class","text-md font-semibold")},m(t,n){L(t,e,n),b(e,l)},p:X,d(t){t&&g(e)}}}function Mt(r){let e,l;return e=new Wl({props:{concept:r[0],embedding:r[27].name}}),{c(){N(e.$$.fragment)},l(t){H(e.$$.fragment,t)},m(t,n){O(e,t,n),l=!0},p(t,n){const o={};n&1&&(o.concept=t[0]),n&512&&(o.embedding=t[27].name),e.$set(o)},i(t){l||(k(e.$$.fragment,t),l=!0)},o(t){V(e.$$.fragment,t),l=!1},d(t){F(e,t)}}}function Rn(r){let e,l,t=r[9].data,n=[];for(let s=0;s<t.length;s+=1)n[s]=Mt(St(r,t,s));const o=s=>V(n[s],1,1,()=>{n[s]=null});return{c(){e=T("div");for(let s=0;s<n.length;s+=1)n[s].c();this.h()},l(s){e=z(s,"DIV",{slot:!0,class:!0});var a=D(e);for(let i=0;i<n.length;i+=1)n[i].l(a);a.forEach(g),this.h()},h(){S(e,"slot","below"),S(e,"class","model-metrics flex gap-x-4")},m(s,a){L(s,e,a);for(let i=0;i<n.length;i+=1)n[i]&&n[i].m(e,null);l=!0},p(s,a){if(a&513){t=s[9].data;let i;for(i=0;i<t.length;i+=1){const c=St(s,t,i);n[i]?(n[i].p(c,a),k(n[i],1)):(n[i]=Mt(c),n[i].c(),k(n[i],1),n[i].m(e,null))}for(te(),i=t.length;i<n.length;i+=1)o(i);le()}},i(s){if(!l){for(let a=0;a<t.length;a+=1)k(n[a]);l=!0}},o(s){n=n.filter(Boolean);for(let a=0;a<n.length;a+=1)V(n[a]);l=!1},d(s){s&&g(e),Ae(n,s)}}}function Bn(r){let e,l;return{c(){e=T("div"),l=Z("Collect labels"),this.h()},l(t){e=z(t,"DIV",{slot:!0,class:!0});var n=D(e);l=j(n,"Collect labels"),n.forEach(g),this.h()},h(){S(e,"slot","above"),S(e,"class","text-md font-semibold")},m(t,n){L(t,e,n),b(e,l)},p:X,d(t){t&&g(e)}}}function Nn(r){let e,l;return e=new In({props:{slot:"below",concept:r[0]}}),{c(){N(e.$$.fragment)},l(t){H(e.$$.fragment,t)},m(t,n){O(e,t,n),l=!0},p(t,n){const o={};n&1&&(o.concept=t[0]),e.$set(o)},i(t){l||(k(e.$$.fragment,t),l=!0)},o(t){V(e.$$.fragment,t),l=!1},d(t){F(e,t)}}}function Hn(r){let e,l,t,n=r[0].concept_name+"",o,s,a,i,c,f,E,m,h,u,$,p,d,_,v,w,I=r[4].length+"",y,P,q,C,B,A,M,U,re,ee=r[7].length+"",R,de,oe,se,me,J=r[8]==r[0].namespace&&Ct(),Y=r[0].description&&Tt(r);c=new Fe({props:{expanded:!0,$$slots:{below:[Sn],above:[yn]},$$scope:{ctx:r}}}),E=new Fe({props:{$$slots:{below:[An],above:[Cn]},$$scope:{ctx:r}}});let x=r[9].data&&zt(r);return u=new Fe({props:{$$slots:{below:[Nn],above:[Bn]},$$scope:{ctx:r}}}),v=new Gt({}),C=new ut({props:{data:r[4]}}),C.$on("remove",r[21]),C.$on("add",r[22]),U=new Wt({}),se=new ut({props:{data:r[7]}}),se.$on("remove",r[23]),se.$on("add",r[24]),{c(){e=T("div"),l=T("div"),t=T("div"),o=Z(n),s=G(),J&&J.c(),a=G(),Y&&Y.c(),i=G(),N(c.$$.fragment),f=G(),N(E.$$.fragment),m=G(),x&&x.c(),h=G(),N(u.$$.fragment),$=G(),p=T("div"),d=T("div"),_=T("span"),N(v.$$.fragment),w=Z(" In concept ("),y=Z(I),P=Z(" examples)"),q=G(),N(C.$$.fragment),B=G(),A=T("div"),M=T("span"),N(U.$$.fragment),re=Z("Not in concept ("),R=Z(ee),de=Z(" examples)"),oe=G(),N(se.$$.fragment),this.h()},l(Q){e=z(Q,"DIV",{class:!0});var K=D(e);l=z(K,"DIV",{});var he=D(l);t=z(he,"DIV",{class:!0});var be=D(t);o=j(be,n),s=W(be),J&&J.l(be),be.forEach(g),a=W(he),Y&&Y.l(he),he.forEach(g),i=W(K),H(c.$$.fragment,K),f=W(K),H(E.$$.fragment,K),m=W(K),x&&x.l(K),h=W(K),H(u.$$.fragment,K),$=W(K),p=z(K,"DIV",{class:!0});var ve=D(p);d=z(ve,"DIV",{class:!0});var ge=D(d);_=z(ge,"SPAN",{class:!0});var pe=D(_);H(v.$$.fragment,pe),w=j(pe," In concept ("),y=j(pe,I),P=j(pe," examples)"),pe.forEach(g),q=W(ge),H(C.$$.fragment,ge),ge.forEach(g),B=W(ve),A=z(ve,"DIV",{class:!0});var ze=D(A);M=z(ze,"SPAN",{class:!0});var ke=D(M);H(U.$$.fragment,ke),re=j(ke,"Not in concept ("),R=j(ke,ee),de=j(ke," examples)"),ke.forEach(g),oe=W(ze),H(se.$$.fragment,ze),ze.forEach(g),ve.forEach(g),K.forEach(g),this.h()},h(){S(t,"class","flex flex-row items-center text-2xl font-semibold"),S(_,"class","flex items-center gap-x-2 text-lg"),S(d,"class","flex w-0 flex-grow flex-col gap-y-4"),S(M,"class","flex items-center gap-x-2 text-lg"),S(A,"class","flex w-0 flex-grow flex-col gap-y-4"),S(p,"class","flex gap-x-4"),S(e,"class","flex h-full w-full flex-col gap-y-8 px-10")},m(Q,K){L(Q,e,K),b(e,l),b(l,t),b(t,o),b(t,s),J&&J.m(t,null),b(l,a),Y&&Y.m(l,null),b(e,i),O(c,e,null),b(e,f),O(E,e,null),b(e,m),x&&x.m(e,null),b(e,h),O(u,e,null),b(e,$),b(e,p),b(p,d),b(d,_),O(v,_,null),b(_,w),b(_,y),b(_,P),b(d,q),O(C,d,null),b(p,B),b(p,A),b(A,M),O(U,M,null),b(M,re),b(M,R),b(M,de),b(A,oe),O(se,A,null),me=!0},p(Q,[K]){(!me||K&1)&&n!==(n=Q[0].concept_name+"")&&ne(o,n),Q[8]==Q[0].namespace?J?K&257&&k(J,1):(J=Ct(),J.c(),k(J,1),J.m(t,null)):J&&(te(),V(J,1,1,()=>{J=null}),le()),Q[0].description?Y?Y.p(Q,K):(Y=Tt(Q),Y.c(),Y.m(l,null)):Y&&(Y.d(1),Y=null);const he={};K&1073741889&&(he.$$scope={dirty:K,ctx:Q}),c.$set(he);const be={};K&1073741838&&(be.$$scope={dirty:K,ctx:Q}),E.$set(be),Q[9].data?x?(x.p(Q,K),K&512&&k(x,1)):(x=zt(Q),x.c(),k(x,1),x.m(e,h)):x&&(te(),V(x,1,1,()=>{x=null}),le());const ve={};K&1073741825&&(ve.$$scope={dirty:K,ctx:Q}),u.$set(ve),(!me||K&16)&&I!==(I=Q[4].length+"")&&ne(y,I);const ge={};K&16&&(ge.data=Q[4]),C.$set(ge),(!me||K&128)&&ee!==(ee=Q[7].length+"")&&ne(R,ee);const pe={};K&128&&(pe.data=Q[7]),se.$set(pe)},i(Q){me||(k(J),k(c.$$.fragment,Q),k(E.$$.fragment,Q),k(x),k(u.$$.fragment,Q),k(v.$$.fragment,Q),k(C.$$.fragment,Q),k(U.$$.fragment,Q),k(se.$$.fragment,Q),me=!0)},o(Q){V(J),V(c.$$.fragment,Q),V(E.$$.fragment,Q),V(x),V(u.$$.fragment,Q),V(v.$$.fragment,Q),V(C.$$.fragment,Q),V(U.$$.fragment,Q),V(se.$$.fragment,Q),me=!1},d(Q){Q&&g(e),J&&J.d(),Y&&Y.d(),F(c),F(E),x&&x.d(),F(u),F(v),F(C),F(U),F(se)}}}function On(r,e,l){let t,n,o,s,a,i,c,f=X,E=()=>(f(),f=ye(a,R=>l(26,c=R)),a),m,h;r.$$.on_destroy.push(()=>f());let{concept:u}=e;const $=_l();Ie(r,$,R=>l(16,m=R));const p=Yt();Ie(r,p,R=>l(25,i=R));const d=Ft();Ie(r,d,R=>l(9,h=R));let _,v,w;function I(){const R=v?Me(v):void 0;R==null||w==null||_==null||a==null||c==null||(a.addSearch({path:[R],type:"concept",concept_namespace:u.namespace,concept_name:u.concept_name,embedding:w}),Ht(jt(_.namespace,_.name,c)))}function y(R){!u.namespace||!u.concept_name||i.mutate([u.namespace,u.concept_name,{remove:[R]}])}function P(R,de){!u.namespace||!u.concept_name||i.mutate([u.namespace,u.concept_name,{insert:[{text:R,label:de}]}])}function q(R){_=R,l(1,_)}function C(R){v=R,l(2,v)}function B(R){w=R,l(3,w)}const A=()=>I(),M=R=>y(R.detail),U=R=>P(R.detail,!0),re=R=>y(R.detail),ee=R=>P(R.detail,!1);return r.$$set=R=>{"concept"in R&&l(0,u=R.concept)},r.$$.update=()=>{var R,de;r.$$.dirty&65536&&l(8,t=(de=(R=m.data)==null?void 0:R.user)==null?void 0:de.id),r.$$.dirty&1&&l(4,n=Object.values(u.data).filter(oe=>oe.label==!0)),r.$$.dirty&1&&l(7,o=Object.values(u.data).filter(oe=>oe.label==!1)),r.$$.dirty&16&&l(6,s=n[Math.floor(Math.random()*n.length)]),r.$$.dirty&14&&E(l(5,a=_!=null&&v!=null&&w!=null?Zt(_.namespace,_.name):null))},[u,_,v,w,n,a,s,o,t,h,$,p,d,I,y,P,m,q,C,B,A,M,U,re,ee]}class Jn extends ce{constructor(e){super(),fe(this,e,On,Hn,ue,{concept:0})}}export{Jn as C,Kn as I,Sl as T,lt as a};
lilac/web/_app/immutable/chunks/ConceptView.f7cc213b.js ADDED
@@ -0,0 +1 @@
 
 
1
+ import{S as ce,i as fe,s as ue,E as _e,Z as ae,_ as ie,m as D,h as g,n as S,$ as Se,b as L,a0 as b,L as qe,a1 as X,N as Ce,Q as Te,q as Z,r as j,u as ne,D as At,k as T,a as G,l as z,c as W,H as Le,I as Pt,J as Rt,K as Bt,v as te,d as V,f as le,g as k,y as N,z as H,A as O,B as F,w as Ee,T as Ve,U as De,a4 as Ae,C as xt,a6 as xe,O as Ie,ac as ye,a7 as Nt,ab as el,G as Pe,o as tl,e as we,M as ll}from"./index.b333a928.js";import{g as Ht}from"./navigation.c82332c0.js";import{ae as nl,x as $e,ar as rl,as as sl,B as Ye,P as Ge,h as Ot,S as Ze,U as Ft,at as al,au as il,av as ol,aw as cl,c as Lt,a as He,e as fl,ax as Ut,a4 as Re,X as ul,z as Me,ay as dl,y as ml,O as Qt,af as qt,L as Be,az as Ne,a9 as Oe,aA as Yt,ag as et,ak as Zt,b as _l}from"./Commands.1fffdf33.js";import{f as jt}from"./utils.4eeb8687.js";import{T as hl,S as gl,a as Gt,b as Wt}from"./StringSpanHighlight.d53dc1a7.js";import{C as pl,a as bl}from"./ChevronUp.95b74f6d.js";import{g as Kt}from"./settingsStore.6e7d5078.js";import{i as vl,r as $l}from"./notificationsStore.e7f2bd3e.js";import{A as wl}from"./ArrowUpRight.e306cdcd.js";import{T as Jt}from"./ToastNotification.66c9609a.js";function tt(r){let e,l;return{c(){e=ae("title"),l=Z(r[1])},l(t){e=ie(t,"title",{});var n=D(e);l=j(n,r[1]),n.forEach(g)},m(t,n){L(t,e,n),b(e,l)},p(t,n){n&2&&ne(l,t[1])},d(t){t&&g(e)}}}function kl(r){let e,l,t,n=r[1]&&tt(r),o=[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},{width:r[0]},{height:r[0]},r[2],r[3]],s={};for(let a=0;a<o.length;a+=1)s=_e(s,o[a]);return{c(){e=ae("svg"),n&&n.c(),l=ae("path"),t=ae("path"),this.h()},l(a){e=ie(a,"svg",{xmlns:!0,viewBox:!0,fill:!0,preserveAspectRatio:!0,width:!0,height:!0});var i=D(e);n&&n.l(i),l=ie(i,"path",{d:!0}),D(l).forEach(g),t=ie(i,"path",{d:!0}),D(t).forEach(g),i.forEach(g),this.h()},h(){S(l,"d","M11,11V21H21V11Zm8,8H13V13h6Z"),S(t,"d","M30,13V11H26V8a2,2,0,0,0-2-2H21V2H19V6H13V2H11V6H8A2,2,0,0,0,6,8v3H2v2H6v6H2v2H6v3a2,2,0,0,0,2,2h3v4h2V26h6v4h2V26h3a2,2,0,0,0,2-2V21h4V19H26V13ZM24,24H8V8H24Z"),Se(e,s)},m(a,i){L(a,e,i),n&&n.m(e,null),b(e,l),b(e,t)},p(a,[i]){a[1]?n?n.p(a,i):(n=tt(a),n.c(),n.m(e,l)):n&&(n.d(1),n=null),Se(e,s=qe(o,[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},i&1&&{width:a[0]},i&1&&{height:a[0]},i&4&&a[2],i&8&&a[3]]))},i:X,o:X,d(a){a&&g(e),n&&n.d()}}}function El(r,e,l){let t,n;const o=["size","title"];let s=Ce(e,o),{size:a=16}=e,{title:i=void 0}=e;return r.$$set=c=>{l(5,e=_e(_e({},e),Te(c))),l(3,s=Ce(e,o)),"size"in c&&l(0,a=c.size),"title"in c&&l(1,i=c.title)},r.$$.update=()=>{l(4,t=e["aria-label"]||e["aria-labelledby"]||i),l(2,n={"aria-hidden":t?void 0:!0,role:t?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=Te(e),[a,i,n,s,t]}class lt extends ce{constructor(e){super(),fe(this,e,El,kl,ue,{size:0,title:1})}}function nt(r){let e,l;return{c(){e=ae("title"),l=Z(r[1])},l(t){e=ie(t,"title",{});var n=D(e);l=j(n,r[1]),n.forEach(g)},m(t,n){L(t,e,n),b(e,l)},p(t,n){n&2&&ne(l,t[1])},d(t){t&&g(e)}}}function Vl(r){let e,l,t=r[1]&&nt(r),n=[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},{width:r[0]},{height:r[0]},r[2],r[3]],o={};for(let s=0;s<n.length;s+=1)o=_e(o,n[s]);return{c(){e=ae("svg"),t&&t.c(),l=ae("path"),this.h()},l(s){e=ie(s,"svg",{xmlns:!0,viewBox:!0,fill:!0,preserveAspectRatio:!0,width:!0,height:!0});var a=D(e);t&&t.l(a),l=ie(a,"path",{d:!0}),D(l).forEach(g),a.forEach(g),this.h()},h(){S(l,"d","M16,2A14,14,0,1,0,30,16,14.0158,14.0158,0,0,0,16,2Zm0,26A12,12,0,0,1,16,4V16l8.4812,8.4814A11.9625,11.9625,0,0,1,16,28Z"),Se(e,o)},m(s,a){L(s,e,a),t&&t.m(e,null),b(e,l)},p(s,[a]){s[1]?t?t.p(s,a):(t=nt(s),t.c(),t.m(e,l)):t&&(t.d(1),t=null),Se(e,o=qe(n,[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},a&1&&{width:s[0]},a&1&&{height:s[0]},a&4&&s[2],a&8&&s[3]]))},i:X,o:X,d(s){s&&g(e),t&&t.d()}}}function Dl(r,e,l){let t,n;const o=["size","title"];let s=Ce(e,o),{size:a=16}=e,{title:i=void 0}=e;return r.$$set=c=>{l(5,e=_e(_e({},e),Te(c))),l(3,s=Ce(e,o)),"size"in c&&l(0,a=c.size),"title"in c&&l(1,i=c.title)},r.$$.update=()=>{l(4,t=e["aria-label"]||e["aria-labelledby"]||i),l(2,n={"aria-hidden":t?void 0:!0,role:t?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=Te(e),[a,i,n,s,t]}class Kn extends ce{constructor(e){super(),fe(this,e,Dl,Vl,ue,{size:0,title:1})}}function rt(r){let e,l;return{c(){e=ae("title"),l=Z(r[1])},l(t){e=ie(t,"title",{});var n=D(e);l=j(n,r[1]),n.forEach(g)},m(t,n){L(t,e,n),b(e,l)},p(t,n){n&2&&ne(l,t[1])},d(t){t&&g(e)}}}function Il(r){let e,l,t,n=r[1]&&rt(r),o=[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},{width:r[0]},{height:r[0]},r[2],r[3]],s={};for(let a=0;a<o.length;a+=1)s=_e(s,o[a]);return{c(){e=ae("svg"),n&&n.c(),l=ae("path"),t=ae("path"),this.h()},l(a){e=ie(a,"svg",{xmlns:!0,viewBox:!0,fill:!0,preserveAspectRatio:!0,width:!0,height:!0});var i=D(e);n&&n.l(i),l=ie(i,"path",{d:!0}),D(l).forEach(g),t=ie(i,"path",{d:!0}),D(t).forEach(g),i.forEach(g),this.h()},h(){S(l,"d","M12 12H14V24H12zM18 12H20V24H18z"),S(t,"d","M4 6V8H6V28a2 2 0 002 2H24a2 2 0 002-2V8h2V6zM8 28V8H24V28zM12 2H20V4H12z"),Se(e,s)},m(a,i){L(a,e,i),n&&n.m(e,null),b(e,l),b(e,t)},p(a,[i]){a[1]?n?n.p(a,i):(n=rt(a),n.c(),n.m(e,l)):n&&(n.d(1),n=null),Se(e,s=qe(o,[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},i&1&&{width:a[0]},i&1&&{height:a[0]},i&4&&a[2],i&8&&a[3]]))},i:X,o:X,d(a){a&&g(e),n&&n.d()}}}function yl(r,e,l){let t,n;const o=["size","title"];let s=Ce(e,o),{size:a=16}=e,{title:i=void 0}=e;return r.$$set=c=>{l(5,e=_e(_e({},e),Te(c))),l(3,s=Ce(e,o)),"size"in c&&l(0,a=c.size),"title"in c&&l(1,i=c.title)},r.$$.update=()=>{l(4,t=e["aria-label"]||e["aria-labelledby"]||i),l(2,n={"aria-hidden":t?void 0:!0,role:t?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=Te(e),[a,i,n,s,t]}class Sl extends ce{constructor(e){super(),fe(this,e,yl,Il,ue,{size:0,title:1})}}function st(r){let e,l;return{c(){e=ae("title"),l=Z(r[1])},l(t){e=ie(t,"title",{});var n=D(e);l=j(n,r[1]),n.forEach(g)},m(t,n){L(t,e,n),b(e,l)},p(t,n){n&2&&ne(l,t[1])},d(t){t&&g(e)}}}function Cl(r){let e,l,t,n=r[1]&&st(r),o=[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},{width:r[0]},{height:r[0]},r[2],r[3]],s={};for(let a=0;a<o.length;a+=1)s=_e(s,o[a]);return{c(){e=ae("svg"),n&&n.c(),l=ae("path"),t=ae("path"),this.h()},l(a){e=ie(a,"svg",{xmlns:!0,viewBox:!0,fill:!0,preserveAspectRatio:!0,width:!0,height:!0});var i=D(e);n&&n.l(i),l=ie(i,"path",{d:!0}),D(l).forEach(g),t=ie(i,"path",{d:!0}),D(t).forEach(g),i.forEach(g),this.h()},h(){S(l,"d","M5.24,22.51l1.43-1.42A14.06,14.06,0,0,1,3.07,16C5.1,10.93,10.7,7,16,7a12.38,12.38,0,0,1,4,.72l1.55-1.56A14.72,14.72,0,0,0,16,5,16.69,16.69,0,0,0,1.06,15.66a1,1,0,0,0,0,.68A16,16,0,0,0,5.24,22.51Z"),S(t,"d","M12 15.73a4 4 0 013.7-3.7l1.81-1.82a6 6 0 00-7.33 7.33zM30.94 15.66A16.4 16.4 0 0025.2 8.22L30 3.41 28.59 2 2 28.59 3.41 30l5.1-5.1A15.29 15.29 0 0016 27 16.69 16.69 0 0030.94 16.34 1 1 0 0030.94 15.66zM20 16a4 4 0 01-6 3.44L19.44 14A4 4 0 0120 16zm-4 9a13.05 13.05 0 01-6-1.58l2.54-2.54a6 6 0 008.35-8.35l2.87-2.87A14.54 14.54 0 0128.93 16C26.9 21.07 21.3 25 16 25z"),Se(e,s)},m(a,i){L(a,e,i),n&&n.m(e,null),b(e,l),b(e,t)},p(a,[i]){a[1]?n?n.p(a,i):(n=st(a),n.c(),n.m(e,l)):n&&(n.d(1),n=null),Se(e,s=qe(o,[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},i&1&&{width:a[0]},i&1&&{height:a[0]},i&4&&a[2],i&8&&a[3]]))},i:X,o:X,d(a){a&&g(e),n&&n.d()}}}function Tl(r,e,l){let t,n;const o=["size","title"];let s=Ce(e,o),{size:a=16}=e,{title:i=void 0}=e;return r.$$set=c=>{l(5,e=_e(_e({},e),Te(c))),l(3,s=Ce(e,o)),"size"in c&&l(0,a=c.size),"title"in c&&l(1,i=c.title)},r.$$.update=()=>{l(4,t=e["aria-label"]||e["aria-labelledby"]||i),l(2,n={"aria-hidden":t?void 0:!0,role:t?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=Te(e),[a,i,n,s,t]}class zl extends ce{constructor(e){super(),fe(this,e,Tl,Cl,ue,{size:0,title:1})}}const Ml=r=>({}),at=r=>({}),Al=r=>({}),it=r=>({});function Pl(r){let e,l;return e=new pl({}),{c(){N(e.$$.fragment)},l(t){H(e.$$.fragment,t)},m(t,n){O(e,t,n),l=!0},i(t){l||(k(e.$$.fragment,t),l=!0)},o(t){V(e.$$.fragment,t),l=!1},d(t){F(e,t)}}}function Rl(r){let e,l;return e=new bl({}),{c(){N(e.$$.fragment)},l(t){H(e.$$.fragment,t)},m(t,n){O(e,t,n),l=!0},i(t){l||(k(e.$$.fragment,t),l=!0)},o(t){V(e.$$.fragment,t),l=!1},d(t){F(e,t)}}}function ot(r){let e,l;const t=r[2].below,n=At(t,r,r[1],at);return{c(){e=T("div"),n&&n.c(),this.h()},l(o){e=z(o,"DIV",{class:!0});var s=D(e);n&&n.l(s),s.forEach(g),this.h()},h(){S(e,"class","p-4")},m(o,s){L(o,e,s),n&&n.m(e,null),l=!0},p(o,s){n&&n.p&&(!l||s&2)&&Pt(n,t,o,o[1],l?Bt(t,o[1],s,Ml):Rt(o[1]),at)},i(o){l||(k(n,o),l=!0)},o(o){V(n,o),l=!1},d(o){o&&g(e),n&&n.d(o)}}}function Bl(r){let e,l,t,n,o,s,a,i,c,f;const E=r[2].above,m=At(E,r,r[1],it),h=[Rl,Pl],u=[];function $(d,_){return d[0]?0:1}o=$(r),s=u[o]=h[o](r);let p=r[0]&&ot(r);return{c(){e=T("div"),l=T("button"),t=T("div"),m&&m.c(),n=G(),s.c(),a=G(),p&&p.c(),this.h()},l(d){e=z(d,"DIV",{class:!0});var _=D(e);l=z(_,"BUTTON",{class:!0});var v=D(l);t=z(v,"DIV",{class:!0});var w=D(t);m&&m.l(w),n=W(w),s.l(w),w.forEach(g),v.forEach(g),a=W(_),p&&p.l(_),_.forEach(g),this.h()},h(){S(t,"class","flex items-center justify-between"),S(l,"class","w-full p-4 text-left hover:bg-gray-200"),S(e,"class","rounded-xl border border-gray-200")},m(d,_){L(d,e,_),b(e,l),b(l,t),m&&m.m(t,null),b(t,n),u[o].m(t,null),b(e,a),p&&p.m(e,null),i=!0,c||(f=Le(l,"click",r[3]),c=!0)},p(d,[_]){m&&m.p&&(!i||_&2)&&Pt(m,E,d,d[1],i?Bt(E,d[1],_,Al):Rt(d[1]),it);let v=o;o=$(d),o!==v&&(te(),V(u[v],1,1,()=>{u[v]=null}),le(),s=u[o],s||(s=u[o]=h[o](d),s.c()),k(s,1),s.m(t,null)),d[0]?p?(p.p(d,_),_&1&&k(p,1)):(p=ot(d),p.c(),k(p,1),p.m(e,null)):p&&(te(),V(p,1,1,()=>{p=null}),le())},i(d){i||(k(m,d),k(s),k(p),i=!0)},o(d){V(m,d),V(s),V(p),i=!1},d(d){d&&g(e),m&&m.d(d),u[o].d(),p&&p.d(),c=!1,f()}}}function Nl(r,e,l){let{$$slots:t={},$$scope:n}=e,{expanded:o=!1}=e;const s=()=>l(0,o=!o);return r.$$set=a=>{"expanded"in a&&l(0,o=a.expanded),"$$scope"in a&&l(1,n=a.$$scope)},[o,n,t,s]}class Fe extends ce{constructor(e){super(),fe(this,e,Nl,Bl,ue,{expanded:0})}}function ct(r,e,l){const t=r.slice();return t[6]=e[l],t}function ft(r){let e,l,t=r[6].text+"",n,o,s,a,i,c,f,E;a=new Sl({props:{size:16}});function m(){return r[5](r[6])}return{c(){e=T("div"),l=T("span"),n=Z(t),o=G(),s=T("button"),N(a.$$.fragment),i=G(),this.h()},l(h){e=z(h,"DIV",{class:!0});var u=D(e);l=z(u,"SPAN",{class:!0});var $=D(l);n=j($,t),$.forEach(g),o=W(u),s=z(u,"BUTTON",{title:!0,class:!0});var p=D(s);H(a.$$.fragment,p),p.forEach(g),i=W(u),u.forEach(g),this.h()},h(){S(l,"class","shrink"),S(s,"title","Remove sample"),S(s,"class","shrink-0 opacity-50 hover:text-red-400 hover:opacity-100"),S(e,"class","flex w-full justify-between gap-x-2 border-b border-gray-200 p-2 hover:bg-gray-50")},m(h,u){L(h,e,u),b(e,l),b(l,n),b(e,o),b(e,s),O(a,s,null),b(e,i),c=!0,f||(E=Le(s,"click",m),f=!0)},p(h,u){r=h,(!c||u&1)&&t!==(t=r[6].text+"")&&ne(n,t)},i(h){c||(k(a.$$.fragment,h),c=!0)},o(h){V(a.$$.fragment,h),c=!1},d(h){h&&g(e),F(a),f=!1,E()}}}function Hl(r){let e,l,t,n,o,s;function a(m){r[3](m)}let i={labelText:"Add example"};r[1]!==void 0&&(i.value=r[1]),l=new nl({props:i}),Ee.push(()=>Ve(l,"value",a)),l.$on("keydown",r[4]);let c=[...r[0]].reverse(),f=[];for(let m=0;m<c.length;m+=1)f[m]=ft(ct(r,c,m));const E=m=>V(f[m],1,1,()=>{f[m]=null});return{c(){e=T("div"),N(l.$$.fragment),n=G(),o=T("div");for(let m=0;m<f.length;m+=1)f[m].c();this.h()},l(m){e=z(m,"DIV",{class:!0});var h=D(e);H(l.$$.fragment,h),h.forEach(g),n=W(m),o=z(m,"DIV",{class:!0});var u=D(o);for(let $=0;$<f.length;$+=1)f[$].l(u);u.forEach(g),this.h()},h(){S(e,"class",""),S(o,"class","flex h-full w-full flex-col overflow-y-auto overflow-x-clip border border-gray-200")},m(m,h){L(m,e,h),O(l,e,null),L(m,n,h),L(m,o,h);for(let u=0;u<f.length;u+=1)f[u]&&f[u].m(o,null);s=!0},p(m,[h]){const u={};if(!t&&h&2&&(t=!0,u.value=m[1],De(()=>t=!1)),l.$set(u),h&5){c=[...m[0]].reverse();let $;for($=0;$<c.length;$+=1){const p=ct(m,c,$);f[$]?(f[$].p(p,h),k(f[$],1)):(f[$]=ft(p),f[$].c(),k(f[$],1),f[$].m(o,null))}for(te(),$=c.length;$<f.length;$+=1)E($);le()}},i(m){if(!s){k(l.$$.fragment,m);for(let h=0;h<c.length;h+=1)k(f[h]);s=!0}},o(m){V(l.$$.fragment,m),f=f.filter(Boolean);for(let h=0;h<f.length;h+=1)V(f[h]);s=!1},d(m){m&&g(e),F(l),m&&g(n),m&&g(o),Ae(f,m)}}}function Ol(r,e,l){let{data:t}=e,n;const o=xt();function s(c){n=c,l(1,n)}const a=c=>{c.key==="Enter"&&(o("add",n),l(1,n=""))},i=c=>o("remove",c.id);return r.$$set=c=>{"data"in c&&l(0,t=c.data)},[t,n,o,s,a,i]}class ut extends ce{constructor(e){super(),fe(this,e,Ol,Hl,ue,{data:0})}}const Ue={not_good:"text-red-600",ok:"text-yellow-600",good:"text-green-600",very_good:"text-blue-600",great:"text-purple-600"},Qe={not_good:"Not good",ok:"OK",good:"Good",very_good:"Very good",great:"Great"};function Fl(r){let e,l,t,n,o,s=Qe[r[0].overall]+"",a,i,c,f,E,m,h,u=$e(r[0].f1)+"",$,p,d,_,v,w,I=$e(r[0].recall)+"",y,P,q,C,B,A,M=$e(r[0].precision)+"",U,re,ee,R,de,oe,se=$e(r[0].roc_auc)+"",me;return{c(){e=T("table"),l=T("tr"),t=T("td"),n=Z("Overall score"),o=T("td"),a=Z(s),c=G(),f=T("tr"),E=T("td"),m=Z("F1"),h=T("td"),$=Z(u),p=G(),d=T("tr"),_=T("td"),v=Z("Recall"),w=T("td"),y=Z(I),P=G(),q=T("tr"),C=T("td"),B=Z("Precision"),A=T("td"),U=Z(M),re=G(),ee=T("tr"),R=T("td"),de=Z("Area under ROC"),oe=T("td"),me=Z(se),this.h()},l(J){e=z(J,"TABLE",{class:!0});var Y=D(e);l=z(Y,"TR",{});var x=D(l);t=z(x,"TD",{class:!0});var Q=D(t);n=j(Q,"Overall score"),Q.forEach(g),o=z(x,"TD",{class:!0});var K=D(o);a=j(K,s),K.forEach(g),x.forEach(g),c=W(Y),f=z(Y,"TR",{});var he=D(f);E=z(he,"TD",{class:!0});var be=D(E);m=j(be,"F1"),be.forEach(g),h=z(he,"TD",{class:!0});var ve=D(h);$=j(ve,u),ve.forEach(g),he.forEach(g),p=W(Y),d=z(Y,"TR",{});var ge=D(d);_=z(ge,"TD",{class:!0});var pe=D(_);v=j(pe,"Recall"),pe.forEach(g),w=z(ge,"TD",{class:!0});var ze=D(w);y=j(ze,I),ze.forEach(g),ge.forEach(g),P=W(Y),q=z(Y,"TR",{});var ke=D(q);C=z(ke,"TD",{class:!0});var We=D(C);B=j(We,"Precision"),We.forEach(g),A=z(ke,"TD",{class:!0});var Ke=D(A);U=j(Ke,M),Ke.forEach(g),ke.forEach(g),re=W(Y),ee=z(Y,"TR",{});var je=D(ee);R=z(je,"TD",{class:!0});var Je=D(R);de=j(Je,"Area under ROC"),Je.forEach(g),oe=z(je,"TD",{class:!0});var Xe=D(oe);me=j(Xe,se),Xe.forEach(g),je.forEach(g),Y.forEach(g),this.h()},h(){S(t,"class","svelte-zc5pc5"),S(o,"class",i=xe(Ue[r[0].overall])+" svelte-zc5pc5"),S(E,"class","svelte-zc5pc5"),S(h,"class","svelte-zc5pc5"),S(_,"class","svelte-zc5pc5"),S(w,"class","svelte-zc5pc5"),S(C,"class","svelte-zc5pc5"),S(A,"class","svelte-zc5pc5"),S(R,"class","svelte-zc5pc5"),S(oe,"class","svelte-zc5pc5"),S(e,"class","svelte-zc5pc5")},m(J,Y){L(J,e,Y),b(e,l),b(l,t),b(t,n),b(l,o),b(o,a),b(e,c),b(e,f),b(f,E),b(E,m),b(f,h),b(h,$),b(e,p),b(e,d),b(d,_),b(_,v),b(d,w),b(w,y),b(e,P),b(e,q),b(q,C),b(C,B),b(q,A),b(A,U),b(e,re),b(e,ee),b(ee,R),b(R,de),b(ee,oe),b(oe,me)},p(J,[Y]){Y&1&&s!==(s=Qe[J[0].overall]+"")&&ne(a,s),Y&1&&i!==(i=xe(Ue[J[0].overall])+" svelte-zc5pc5")&&S(o,"class",i),Y&1&&u!==(u=$e(J[0].f1)+"")&&ne($,u),Y&1&&I!==(I=$e(J[0].recall)+"")&&ne(y,I),Y&1&&M!==(M=$e(J[0].precision)+"")&&ne(U,M),Y&1&&se!==(se=$e(J[0].roc_auc)+"")&&ne(me,se)},i:X,o:X,d(J){J&&g(e)}}}function Ll(r,e,l){let{metrics:t}=e;return r.$$set=n=>{"metrics"in n&&l(0,t=n.metrics)},[t]}class dt extends ce{constructor(e){super(),fe(this,e,Ll,Fl,ue,{metrics:0})}}function Ul(r){const e=r.slice(),l=!0;return e[7]=l,e}function Ql(r){let e,l;function t(){return r[6](r[7])}return e=new Ye({props:{icon:r[4].isLoading?Ge:lt,class:"w-28 text-3xl",$$slots:{default:[Zl]},$$scope:{ctx:r}}}),e.$on("click",t),{c(){N(e.$$.fragment)},l(n){H(e.$$.fragment,n)},m(n,o){O(e,n,o),l=!0},p(n,o){r=n;const s={};o&16&&(s.icon=r[4].isLoading?Ge:lt),o&256&&(s.$$scope={dirty:o,ctx:r}),e.$set(s)},i(n){l||(k(e.$$.fragment,n),l=!0)},o(n){V(e.$$.fragment,n),l=!1},d(n){F(e,n)}}}function ql(r){let e,l=Qe[r[3].data.metrics.overall]+"",t,n,o,s,a;return{c(){e=T("div"),t=Z(l),this.h()},l(i){e=z(i,"DIV",{class:!0});var c=D(e);t=j(c,l),c.forEach(g),this.h()},h(){S(e,"class",n="concept-score-pill cursor-default text-2xl font-light "+Ue[r[3].data.metrics.overall])},m(i,c){L(i,e,c),b(e,t),s||(a=Nt(o=Ot.call(null,e,{component:dt,props:{metrics:r[3].data.metrics}})),s=!0)},p(i,c){c&8&&l!==(l=Qe[i[3].data.metrics.overall]+"")&&ne(t,l),c&8&&n!==(n="concept-score-pill cursor-default text-2xl font-light "+Ue[i[3].data.metrics.overall])&&S(e,"class",n),o&&el(o.update)&&c&8&&o.update.call(null,{component:dt,props:{metrics:i[3].data.metrics}})},i:X,o:X,d(i){i&&g(e),s=!1,a()}}}function Yl(r){let e,l,t;return l=new Ge({}),{c(){e=T("div"),N(l.$$.fragment),this.h()},l(n){e=z(n,"DIV",{class:!0});var o=D(e);H(l.$$.fragment,o),o.forEach(g),this.h()},h(){S(e,"class","flex flex-col items-center")},m(n,o){L(n,e,o),O(l,e,null),t=!0},p:X,i(n){t||(k(l.$$.fragment,n),t=!0)},o(n){V(l.$$.fragment,n),t=!1},d(n){n&&g(e),F(l)}}}function Zl(r){let e;return{c(){e=Z("Compute")},l(l){e=j(l,"Compute")},m(l,t){L(l,e,t)},d(l){l&&g(e)}}}function jl(r){let e,l,t,n,o,s,a;const i=[Yl,ql,Ql],c=[];function f(m,h){var u,$;return m[3].isFetching?0:($=(u=m[3])==null?void 0:u.data)!=null&&$.metrics?1:2}function E(m,h){return h===2?Ul(m):m}return o=f(r),s=c[o]=i[o](E(r,o)),{c(){e=T("div"),l=T("div"),t=Z(r[1]),n=G(),s.c(),this.h()},l(m){e=z(m,"DIV",{class:!0});var h=D(e);l=z(h,"DIV",{class:!0});var u=D(l);t=j(u,r[1]),u.forEach(g),n=W(h),s.l(h),h.forEach(g),this.h()},h(){S(l,"class","text-gray-500"),S(e,"class","flex w-36 flex-col items-center gap-y-2 rounded-md border border-b-0 border-gray-200 p-4 shadow-md")},m(m,h){L(m,e,h),b(e,l),b(l,t),b(e,n),c[o].m(e,null),a=!0},p(m,[h]){(!a||h&2)&&ne(t,m[1]);let u=o;o=f(m),o===u?c[o].p(E(m,o),h):(te(),V(c[u],1,1,()=>{c[u]=null}),le(),s=c[o],s?s.p(E(m,o),h):(s=c[o]=i[o](E(m,o)),s.c()),k(s,1),s.m(e,null))},i(m){a||(k(s),a=!0)},o(m){V(s),a=!1},d(m){m&&g(e),c[o].d()}}}function Gl(r,e,l){let t,n,o=X,s=()=>(o(),o=ye(t,m=>l(3,n=m)),t),a;r.$$.on_destroy.push(()=>o());let{concept:i}=e,{embedding:c}=e;const f=rl();Ie(r,f,m=>l(4,a=m));const E=m=>a.mutate([i.namespace,i.concept_name,c,m]);return r.$$set=m=>{"concept"in m&&l(0,i=m.concept),"embedding"in m&&l(1,c=m.embedding)},r.$$.update=()=>{r.$$.dirty&3&&s(l(2,t=sl(i.namespace,i.concept_name,c)))},[i,c,t,n,a,f,E]}class Wl extends ce{constructor(e){super(),fe(this,e,Gl,jl,ue,{concept:0,embedding:1})}}function mt(r,e,l){const t=r.slice();return t[21]=e[l],t}function Kl(r){let e;return{c(){e=Z("Compute")},l(l){e=j(l,"Compute")},m(l,t){L(l,e,t)},d(l){l&&g(e)}}}function _t(r){let e,l;return e=new He({props:{value:r[21].name}}),{c(){N(e.$$.fragment)},l(t){H(e.$$.fragment,t)},m(t,n){O(e,t,n),l=!0},p(t,n){const o={};n&512&&(o.value=t[21].name),e.$set(o)},i(t){l||(k(e.$$.fragment,t),l=!0)},o(t){V(e.$$.fragment,t),l=!1},d(t){F(e,t)}}}function Jl(r){var s;let e,l,t=((s=r[9])==null?void 0:s.data)||[],n=[];for(let a=0;a<t.length;a+=1)n[a]=_t(mt(r,t,a));const o=a=>V(n[a],1,1,()=>{n[a]=null});return{c(){for(let a=0;a<n.length;a+=1)n[a].c();e=we()},l(a){for(let i=0;i<n.length;i+=1)n[i].l(a);e=we()},m(a,i){for(let c=0;c<n.length;c+=1)n[c]&&n[c].m(a,i);L(a,e,i),l=!0},p(a,i){var c;if(i&512){t=((c=a[9])==null?void 0:c.data)||[];let f;for(f=0;f<t.length;f+=1){const E=mt(a,t,f);n[f]?(n[f].p(E,i),k(n[f],1)):(n[f]=_t(E),n[f].c(),k(n[f],1),n[f].m(e.parentNode,e))}for(te(),f=t.length;f<n.length;f+=1)o(f);le()}},i(a){if(!l){for(let i=0;i<t.length;i+=1)k(n[i]);l=!0}},o(a){n=n.filter(Boolean);for(let i=0;i<n.length;i+=1)V(n[i]);l=!1},d(a){Ae(n,a),a&&g(e)}}}function Xl(r){let e,l;return e=new gl({props:{text:r[0],row:r[4],spanPaths:r[6],valuePaths:r[5],embeddings:r[1]?[r[1]]:[]}}),{c(){N(e.$$.fragment)},l(t){H(e.$$.fragment,t)},m(t,n){O(e,t,n),l=!0},p(t,n){const o={};n&1&&(o.text=t[0]),n&16&&(o.row=t[4]),n&64&&(o.spanPaths=t[6]),n&32&&(o.valuePaths=t[5]),n&2&&(o.embeddings=t[1]?[t[1]]:[]),e.$set(o)},i(t){l||(k(e.$$.fragment,t),l=!0)},o(t){V(e.$$.fragment,t),l=!1},d(t){F(e,t)}}}function xl(r){let e,l;return e=new Lt({}),{c(){N(e.$$.fragment)},l(t){H(e.$$.fragment,t)},m(t,n){O(e,t,n),l=!0},p:X,i(t){l||(k(e.$$.fragment,t),l=!0)},o(t){V(e.$$.fragment,t),l=!1},d(t){F(e,t)}}}function en(r){let e,l,t,n,o,s,a,i,c,f,E,m,h,u,$,p;t=new hl({props:{value:r[3],cols:50,placeholder:"Paste text to try the concept.",rows:6,class:"mb-2"}}),t.$on("input",r[12]),a=new Ye({props:{$$slots:{default:[Kl]},$$scope:{ctx:r}}}),a.$on("click",r[18]);function d(y){r[19](y)}let _={labelText:"Embedding",$$slots:{default:[Jl]},$$scope:{ctx:r}};r[1]!==void 0&&(_.selected=r[1]),f=new Ze({props:_}),Ee.push(()=>Ve(f,"selected",d));const v=[xl,Xl],w=[];function I(y,P){var q;return y[7]&&((q=y[2])!=null&&q.isFetching)?0:y[4]!=null&&y[0]!=null?1:-1}return~(u=I(r))&&($=w[u]=v[u](r)),{c(){e=T("div"),l=T("div"),N(t.$$.fragment),n=G(),o=T("div"),s=T("div"),N(a.$$.fragment),i=G(),c=T("div"),N(f.$$.fragment),m=G(),h=T("div"),$&&$.c(),this.h()},l(y){e=z(y,"DIV",{class:!0});var P=D(e);l=z(P,"DIV",{});var q=D(l);H(t.$$.fragment,q),n=W(q),o=z(q,"DIV",{class:!0});var C=D(o);s=z(C,"DIV",{class:!0});var B=D(s);H(a.$$.fragment,B),B.forEach(g),i=W(C),c=z(C,"DIV",{class:!0});var A=D(c);H(f.$$.fragment,A),A.forEach(g),C.forEach(g),q.forEach(g),m=W(P),h=z(P,"DIV",{class:!0});var M=D(h);$&&$.l(M),M.forEach(g),P.forEach(g),this.h()},h(){S(s,"class","pt-4"),S(c,"class","mb-2 w-32"),S(o,"class","flex flex-row justify-between"),S(h,"class","mt-4 border-gray-200"),Pe(h,"border-t",r[0]!=null),S(e,"class","flex flex-col gap-x-8")},m(y,P){L(y,e,P),b(e,l),O(t,l,null),b(l,n),b(l,o),b(o,s),O(a,s,null),b(o,i),b(o,c),O(f,c,null),b(e,m),b(e,h),~u&&w[u].m(h,null),p=!0},p(y,[P]){const q={};P&8&&(q.value=y[3]),t.$set(q);const C={};P&16777216&&(C.$$scope={dirty:P,ctx:y}),a.$set(C);const B={};P&16777728&&(B.$$scope={dirty:P,ctx:y}),!E&&P&2&&(E=!0,B.selected=y[1],De(()=>E=!1)),f.$set(B);let A=u;u=I(y),u===A?~u&&w[u].p(y,P):($&&(te(),V(w[A],1,1,()=>{w[A]=null}),le()),~u?($=w[u],$?$.p(y,P):($=w[u]=v[u](y),$.c()),k($,1),$.m(h,null)):$=null),(!p||P&1)&&Pe(h,"border-t",y[0]!=null)},i(y){p||(k(t.$$.fragment,y),k(a.$$.fragment,y),k(f.$$.fragment,y),k($),p=!0)},o(y){V(t.$$.fragment,y),V(a.$$.fragment,y),V(f.$$.fragment,y),V($),p=!1},d(y){y&&g(e),F(t),F(a),F(f),~u&&w[u].d()}}}function tn(r,e,l){var M;let t,n,o,s,a=X,i=()=>(a(),a=ye(o,U=>l(2,s=U)),o),c,f=X,E=()=>(f(),f=ye(n,U=>l(17,c=U)),n),m,h;r.$$.on_destroy.push(()=>a()),r.$$.on_destroy.push(()=>f());let{concept:u}=e,{example:$}=e;const p=Ft();Ie(r,p,U=>l(9,h=U));const d=Kt();Ie(r,d,U=>l(20,m=U));let _=(M=$.text)==null?void 0:M.trim();tl(()=>{y()});function v(U){l(3,_=U.target.value),l(0,w=void 0)}let w,I=m.embedding;function y(){l(0,w=_)}let P,q,C;const B=()=>y();function A(U){I=U,l(1,I)}return r.$$set=U=>{"concept"in U&&l(14,u=U.concept),"example"in U&&l(15,$=U.example)},r.$$.update=()=>{var U;if(r.$$.dirty&32768&&$.text&&(l(3,_=$.text.trim()),l(0,w=void 0)),r.$$.dirty&16386&&l(16,t={signal_name:"concept_score",concept_name:u.concept_name,namespace:u.namespace,embedding:I}),r.$$.dirty&65536&&E(l(8,n=t.embedding?al({signal:t}):void 0)),r.$$.dirty&16387&&i(l(7,o=I!=null&&w!=null?il(u.namespace,u.concept_name,I,{examples:[{text:w}]}):null)),r.$$.dirty&196614&&(s==null?void 0:s.data)!=null&&I!=null&&((U=c==null?void 0:c.data)==null?void 0:U.fields)!=null){const re=ol(c.data.fields);re.signal=t,l(4,P=cl(s.data[0],re));const ee=vl(re);l(6,C=ee.spanPaths),l(5,q=ee.valuePaths)}},[w,I,s,_,P,q,C,o,n,h,p,d,v,y,u,$,t,c,B,A]}class ln extends ce{constructor(e){super(),fe(this,e,tn,en,ue,{concept:14,example:15})}}function ht(r,e,l){const t=r.slice();return t[20]=e[l],t}function gt(r,e,l){const t=r.slice();return t[23]=e[l],t}function pt(r,e,l){const t=r.slice();return t[1]=e[l],t}function nn(r){let e,l;return e=new Ze({props:{labelText:"Dataset",selected:r[7],$$slots:{default:[an]},$$scope:{ctx:r}}}),e.$on("change",r[11]),{c(){N(e.$$.fragment)},l(t){H(e.$$.fragment,t)},m(t,n){O(e,t,n),l=!0},p(t,n){const o={};n&128&&(o.selected=t[7]),n&268435472&&(o.$$scope={dirty:n,ctx:t}),e.$set(o)},i(t){l||(k(e.$$.fragment,t),l=!0)},o(t){V(e.$$.fragment,t),l=!1},d(t){F(e,t)}}}function rn(r){let e,l;return e=new Qt({props:{kind:"error",title:"Error",subtitle:r[4].error.message,hideCloseButton:!0}}),{c(){N(e.$$.fragment)},l(t){H(e.$$.fragment,t)},m(t,n){O(e,t,n),l=!0},p(t,n){const o={};n&16&&(o.subtitle=t[4].error.message),e.$set(o)},i(t){l||(k(e.$$.fragment,t),l=!0)},o(t){V(e.$$.fragment,t),l=!1},d(t){F(e,t)}}}function sn(r){let e,l;return e=new qt({}),{c(){N(e.$$.fragment)},l(t){H(e.$$.fragment,t)},m(t,n){O(e,t,n),l=!0},p:X,i(t){l||(k(e.$$.fragment,t),l=!0)},o(t){V(e.$$.fragment,t),l=!1},d(t){F(e,t)}}}function bt(r){let e,l;return e=new He({props:{value:`${r[1].namespace}/${r[1].dataset_name}`}}),{c(){N(e.$$.fragment)},l(t){H(e.$$.fragment,t)},m(t,n){O(e,t,n),l=!0},p(t,n){const o={};n&16&&(o.value=`${t[1].namespace}/${t[1].dataset_name}`),e.$set(o)},i(t){l||(k(e.$$.fragment,t),l=!0)},o(t){V(e.$$.fragment,t),l=!1},d(t){F(e,t)}}}function an(r){let e,l,t,n;e=new He({props:{value:"",text:"none"}});let o=r[4].data,s=[];for(let i=0;i<o.length;i+=1)s[i]=bt(pt(r,o,i));const a=i=>V(s[i],1,1,()=>{s[i]=null});return{c(){N(e.$$.fragment),l=G();for(let i=0;i<s.length;i+=1)s[i].c();t=we()},l(i){H(e.$$.fragment,i),l=W(i);for(let c=0;c<s.length;c+=1)s[c].l(i);t=we()},m(i,c){O(e,i,c),L(i,l,c);for(let f=0;f<s.length;f+=1)s[f]&&s[f].m(i,c);L(i,t,c),n=!0},p(i,c){if(c&16){o=i[4].data;let f;for(f=0;f<o.length;f+=1){const E=pt(i,o,f);s[f]?(s[f].p(E,c),k(s[f],1)):(s[f]=bt(E),s[f].c(),k(s[f],1),s[f].m(t.parentNode,t))}for(te(),f=o.length;f<s.length;f+=1)a(f);le()}},i(i){if(!n){k(e.$$.fragment,i);for(let c=0;c<o.length;c+=1)k(s[c]);n=!0}},o(i){V(e.$$.fragment,i),s=s.filter(Boolean);for(let c=0;c<s.length;c+=1)V(s[c]);n=!1},d(i){F(e,i),i&&g(l),Ae(s,i),i&&g(t)}}}function on(r){let e,l;return e=new Ze({props:{labelText:"Field with embeddings",selected:r[6],$$slots:{default:[un]},$$scope:{ctx:r}}}),e.$on("change",r[12]),{c(){N(e.$$.fragment)},l(t){H(e.$$.fragment,t)},m(t,n){O(e,t,n),l=!0},p(t,n){const o={};n&64&&(o.selected=t[6]),n&268435460&&(o.$$scope={dirty:n,ctx:t}),e.$set(o)},i(t){l||(k(e.$$.fragment,t),l=!0)},o(t){V(e.$$.fragment,t),l=!1},d(t){F(e,t)}}}function cn(r){let e,l;return e=new Qt({props:{kind:"error",title:"Error",subtitle:r[3].error.message,hideCloseButton:!0}}),{c(){N(e.$$.fragment)},l(t){H(e.$$.fragment,t)},m(t,n){O(e,t,n),l=!0},p(t,n){const o={};n&8&&(o.subtitle=t[3].error.message),e.$set(o)},i(t){l||(k(e.$$.fragment,t),l=!0)},o(t){V(e.$$.fragment,t),l=!1},d(t){F(e,t)}}}function fn(r){let e,l;return e=new qt({}),{c(){N(e.$$.fragment)},l(t){H(e.$$.fragment,t)},m(t,n){O(e,t,n),l=!0},p:X,i(t){l||(k(e.$$.fragment,t),l=!0)},o(t){V(e.$$.fragment,t),l=!1},d(t){F(e,t)}}}function vt(r){let e,l;return e=new He({props:{value:Me(r[23].path)}}),{c(){N(e.$$.fragment)},l(t){H(e.$$.fragment,t)},m(t,n){O(e,t,n),l=!0},p(t,n){const o={};n&4&&(o.value=Me(t[23].path)),e.$set(o)},i(t){l||(k(e.$$.fragment,t),l=!0)},o(t){V(e.$$.fragment,t),l=!1},d(t){F(e,t)}}}function un(r){let e,l,t=r[2],n=[];for(let s=0;s<t.length;s+=1)n[s]=vt(gt(r,t,s));const o=s=>V(n[s],1,1,()=>{n[s]=null});return{c(){for(let s=0;s<n.length;s+=1)n[s].c();e=we()},l(s){for(let a=0;a<n.length;a+=1)n[a].l(s);e=we()},m(s,a){for(let i=0;i<n.length;i+=1)n[i]&&n[i].m(s,a);L(s,e,a),l=!0},p(s,a){if(a&4){t=s[2];let i;for(i=0;i<t.length;i+=1){const c=gt(s,t,i);n[i]?(n[i].p(c,a),k(n[i],1)):(n[i]=vt(c),n[i].c(),k(n[i],1),n[i].m(e.parentNode,e))}for(te(),i=t.length;i<n.length;i+=1)o(i);le()}},i(s){if(!l){for(let a=0;a<t.length;a+=1)k(n[a]);l=!0}},o(s){n=n.filter(Boolean);for(let a=0;a<n.length;a+=1)V(n[a]);l=!1},d(s){Ae(n,s),s&&g(e)}}}function $t(r){let e,l,t;function n(s){r[19](s)}let o={labelText:"Embedding",$$slots:{default:[dn]},$$scope:{ctx:r}};return r[0]!==void 0&&(o.selected=r[0]),e=new Ze({props:o}),Ee.push(()=>Ve(e,"selected",n)),{c(){N(e.$$.fragment)},l(s){H(e.$$.fragment,s)},m(s,a){O(e,s,a),t=!0},p(s,a){const i={};a&268435488&&(i.$$scope={dirty:a,ctx:s}),!l&&a&1&&(l=!0,i.selected=s[0],De(()=>l=!1)),e.$set(i)},i(s){t||(k(e.$$.fragment,s),t=!0)},o(s){V(e.$$.fragment,s),t=!1},d(s){F(e,s)}}}function wt(r){let e,l;return e=new He({props:{value:r[20]}}),{c(){N(e.$$.fragment)},l(t){H(e.$$.fragment,t)},m(t,n){O(e,t,n),l=!0},p(t,n){const o={};n&32&&(o.value=t[20]),e.$set(o)},i(t){l||(k(e.$$.fragment,t),l=!0)},o(t){V(e.$$.fragment,t),l=!1},d(t){F(e,t)}}}function dn(r){let e,l,t=r[5],n=[];for(let s=0;s<t.length;s+=1)n[s]=wt(ht(r,t,s));const o=s=>V(n[s],1,1,()=>{n[s]=null});return{c(){for(let s=0;s<n.length;s+=1)n[s].c();e=we()},l(s){for(let a=0;a<n.length;a+=1)n[a].l(s);e=we()},m(s,a){for(let i=0;i<n.length;i+=1)n[i]&&n[i].m(s,a);L(s,e,a),l=!0},p(s,a){if(a&32){t=s[5];let i;for(i=0;i<t.length;i+=1){const c=ht(s,t,i);n[i]?(n[i].p(c,a),k(n[i],1)):(n[i]=wt(c),n[i].c(),k(n[i],1),n[i].m(e.parentNode,e))}for(te(),i=t.length;i<n.length;i+=1)o(i);le()}},i(s){if(!l){for(let a=0;a<t.length;a+=1)k(n[a]);l=!0}},o(s){n=n.filter(Boolean);for(let a=0;a<n.length;a+=1)V(n[a]);l=!1},d(s){Ae(n,s),s&&g(e)}}}function mn(r){let e,l,t,n,o,s,a,i,c,f,E;const m=[sn,rn,nn],h=[];function u(v,w){return v[4].isLoading?0:v[4].isError?1:v[4].data.length>0?2:-1}~(t=u(r))&&(n=h[t]=m[t](r));const $=[fn,cn,on],p=[];function d(v,w){return v[3].isLoading?0:v[3].isError?1:v[2].length>0?2:-1}~(a=d(r))&&(i=p[a]=$[a](r));let _=r[5].length>0&&$t(r);return{c(){e=T("div"),l=T("div"),n&&n.c(),o=G(),s=T("div"),i&&i.c(),c=G(),f=T("div"),_&&_.c(),this.h()},l(v){e=z(v,"DIV",{class:!0});var w=D(e);l=z(w,"DIV",{class:!0});var I=D(l);n&&n.l(I),I.forEach(g),o=W(w),s=z(w,"DIV",{class:!0});var y=D(s);i&&i.l(y),y.forEach(g),c=W(w),f=z(w,"DIV",{class:!0});var P=D(f);_&&_.l(P),P.forEach(g),w.forEach(g),this.h()},h(){S(l,"class","w-1/3"),S(s,"class","w-1/3"),S(f,"class","w-1/3"),S(e,"class","flex w-full flex-row gap-x-4")},m(v,w){L(v,e,w),b(e,l),~t&&h[t].m(l,null),b(e,o),b(e,s),~a&&p[a].m(s,null),b(e,c),b(e,f),_&&_.m(f,null),E=!0},p(v,[w]){let I=t;t=u(v),t===I?~t&&h[t].p(v,w):(n&&(te(),V(h[I],1,1,()=>{h[I]=null}),le()),~t?(n=h[t],n?n.p(v,w):(n=h[t]=m[t](v),n.c()),k(n,1),n.m(l,null)):n=null);let y=a;a=d(v),a===y?~a&&p[a].p(v,w):(i&&(te(),V(p[y],1,1,()=>{p[y]=null}),le()),~a?(i=p[a],i?i.p(v,w):(i=p[a]=$[a](v),i.c()),k(i,1),i.m(s,null)):i=null),v[5].length>0?_?(_.p(v,w),w&32&&k(_,1)):(_=$t(v),_.c(),k(_,1),_.m(f,null)):_&&(te(),V(_,1,1,()=>{_=null}),le())},i(v){E||(k(n),k(i),k(_),E=!0)},o(v){V(n),V(i),V(_),E=!1},d(v){v&&g(e),~t&&h[t].d(),~a&&p[a].d(),_&&_.d()}}}function _n(r,e,l){let t,n,o,s,a,i,c,f,E,m=X,h=()=>(m(),m=ye(n,C=>l(3,E=C)),n),u,$;r.$$.on_destroy.push(()=>m());let{dataset:p=void 0}=e,{path:d}=e,{embedding:_=void 0}=e;const v=Kt();Ie(r,v,C=>l(18,$=C));let w;const I=fl();Ie(r,I,C=>l(4,u=C));function y(C){const B=C.target.value;if(B==="")l(1,p=null);else{const[A,M]=B.split("/");l(1,p={namespace:A,name:M})}}function P(C){const B=C.target.value;l(13,d=ml(B))}function q(C){_=C,l(0,_),l(15,c),l(13,d),l(14,w),l(2,i),l(3,E),l(17,a)}return r.$$set=C=>{"dataset"in C&&l(1,p=C.dataset),"path"in C&&l(13,d=C.path),"embedding"in C&&l(0,_=C.embedding)},r.$$.update=()=>{if(r.$$.dirty&262144&&l(16,t=[$.embedding,"gte-small","gte-base","openai","sbert"]),r.$$.dirty&18&&u.data&&u.data.length>0&&p===void 0&&l(1,p={namespace:u.data[0].namespace,name:u.data[0].dataset_name}),r.$$.dirty&2&&h(l(8,n=Ut(p==null?void 0:p.namespace,p==null?void 0:p.name))),r.$$.dirty&2&&l(7,o=p?`${p.namespace}/${p.name}`:""),r.$$.dirty&8&&l(14,w=E.data),r.$$.dirty&16384&&l(17,a=w?Re(w).filter(C=>!ul(C,w)&&C.dtype!=null):[]),r.$$.dirty&131072&&l(2,i=a.filter(C=>Re(C).some(B=>B.signal!=null&&Re(B).some(A=>A.dtype==="embedding")))),r.$$.dirty&8196&&d!=null){const C=Me(d);i.some(A=>Me(A.path)===C)||l(13,d=void 0)}r.$$.dirty&8196&&i.length>0&&d==null&&l(13,d=i[0].path),r.$$.dirty&8192&&l(6,s=d?Me(d):void 0),r.$$.dirty&24576&&l(15,c=d&&w?Re(dl(w,d)).filter(C=>C.signal!=null&&Re(C).some(B=>B.dtype==="embedding")):[]),r.$$.dirty&98304&&l(5,f=c.map(C=>C.signal.signal_name).sort((C,B)=>{let A=t.indexOf(C),M=t.indexOf(B);return A===-1&&(A=t.length),M===-1&&(M=t.length),A-M})),r.$$.dirty&32769&&_!=null&&(c.some(B=>B.path.at(-1)===_)||l(0,_=void 0))},[_,p,i,E,u,f,s,o,n,v,I,y,P,d,w,c,t,a,$,q]}class Xt extends ce{constructor(e){super(),fe(this,e,_n,mn,ue,{dataset:1,path:13,embedding:0})}}function hn(r,e,l,t,n,o){const s={...r};if(e==null||l==null)return s;const a=[...e,...l],i=new Set,c=[];for(const u of a){const $=Be.value(Ne(u,[Oe]),"string");if($==null||i.has($))continue;i.add($);const p=Ne(u,n);if(p==null)continue;const d=Be.value(p,"string");if(d==null)continue;const _=`${t.namespace}/${t.concept_name}`,v=Ne(p,[`${_}/${o}`]);if(v==null)continue;const w=Ne(p,[`${_}/labels`]),I=[];if(w!=null)for(const y of w){const P=Be.value(y,"string_span");P!=null&&I.push(P)}for(const y of v){const P=Be.value(y,"string_span");if(P==null||!I.every(A=>A.start>P.end||A.end<P.start))continue;const C=Ne(y,["score"]);if(C==null)continue;const B=Be.value(C,"float32");B!=null&&c.push({rowid:$,text:d,span:P,score:B})}}function f(u){return{rowid:u.rowid,text:$l(u.text,u.span.start,u.span.end),score:u.score}}c.sort((u,$)=>$.score-u.score);const E=c[0],m=c.slice().reverse().find(u=>u!=E);c.sort((u,$)=>Math.abs(u.score-.5)-Math.abs($.score-.5));const h=c.find(u=>u!=E&&u!=m);return E!=null&&s.positive==null&&(s.positive=f(E)),h!=null&&s.neutral==null&&(s.neutral=f(h)),m!=null&&s.negative==null&&(s.negative=f(m)),s}function kt(r,e,l){const t=r.slice();return t[21]=e[l],t}function gn(r){const e=r.slice(),l=$n(e[21].score);e[24]=l;const t=wn(e[21].score);return e[25]=t,e}function pn(r){let e,l,t,n,o,s,a,i,c,f=r[21].text+"",E,m,h,u=r[25]+"",$,p,d=$e(r[21].score,2)+"",_,v,w,I,y,P;n=new Gt({});function q(){return r[18](r[21])}a=new Wt({});function C(){return r[19](r[21])}return{c(){e=T("div"),l=T("div"),t=T("button"),N(n.$$.fragment),o=G(),s=T("button"),N(a.$$.fragment),i=G(),c=T("div"),E=Z(f),m=G(),h=T("div"),$=Z(u),p=G(),_=Z(d),v=G(),this.h()},l(B){e=z(B,"DIV",{class:!0});var A=D(e);l=z(A,"DIV",{class:!0});var M=D(l);t=z(M,"BUTTON",{class:!0});var U=D(t);H(n.$$.fragment,U),U.forEach(g),o=W(M),s=z(M,"BUTTON",{class:!0});var re=D(s);H(a.$$.fragment,re),re.forEach(g),M.forEach(g),i=W(A),c=z(A,"DIV",{class:!0});var ee=D(c);E=j(ee,f),ee.forEach(g),m=W(A),h=z(A,"DIV",{class:!0});var R=D(h);$=j(R,u),p=W(R),_=j(R,d),R.forEach(g),v=W(A),A.forEach(g),this.h()},h(){S(t,"class","p-2 hover:bg-gray-200"),Pe(t,"text-blue-500",r[21].label===!0),S(s,"class","p-2 hover:bg-gray-200"),Pe(s,"text-red-500",r[21].label===!1),S(l,"class","mr-2 flex flex-shrink-0 gap-x-1"),S(c,"class","flex-grow"),S(h,"class","w-40 flex-shrink-0 text-right"),S(e,"class",w=`flex flex-grow items-center whitespace-break-spaces rounded-md border border-gray-300 p-4 pl-2 ${r[24]}`)},m(B,A){L(B,e,A),b(e,l),b(l,t),O(n,t,null),b(l,o),b(l,s),O(a,s,null),b(e,i),b(e,c),b(c,E),b(e,m),b(e,h),b(h,$),b(h,p),b(h,_),b(e,v),I=!0,y||(P=[Le(t,"click",q),Le(s,"click",C)],y=!0)},p(B,A){r=B,(!I||A&2)&&Pe(t,"text-blue-500",r[21].label===!0),(!I||A&2)&&Pe(s,"text-red-500",r[21].label===!1),(!I||A&2)&&f!==(f=r[21].text+"")&&ne(E,f),(!I||A&2)&&u!==(u=r[25]+"")&&ne($,u),(!I||A&2)&&d!==(d=$e(r[21].score,2)+"")&&ne(_,d),(!I||A&2&&w!==(w=`flex flex-grow items-center whitespace-break-spaces rounded-md border border-gray-300 p-4 pl-2 ${r[24]}`))&&S(e,"class",w)},i(B){I||(k(n.$$.fragment,B),k(a.$$.fragment,B),I=!0)},o(B){V(n.$$.fragment,B),V(a.$$.fragment,B),I=!1},d(B){B&&g(e),F(n),F(a),y=!1,ll(P)}}}function bn(r){let e,l;return e=new Lt({props:{paragraph:!0,lines:2}}),{c(){N(e.$$.fragment)},l(t){H(e.$$.fragment,t)},m(t,n){O(e,t,n),l=!0},p:X,i(t){l||(k(e.$$.fragment,t),l=!0)},o(t){V(e.$$.fragment,t),l=!1},d(t){F(e,t)}}}function Et(r){let e,l,t,n,o;const s=[bn,pn],a=[];function i(f,E){return E&3&&(e=null),e==null&&(e=!!(f[21]==null||f[0].includes(f[21].rowid))),e?0:1}function c(f,E){return E===1?gn(f):f}return l=i(r,-1),t=a[l]=s[l](c(r,l)),{c(){t.c(),n=we()},l(f){t.l(f),n=we()},m(f,E){a[l].m(f,E),L(f,n,E),o=!0},p(f,E){let m=l;l=i(f,E),l===m?a[l].p(c(f,l),E):(te(),V(a[m],1,1,()=>{a[m]=null}),le(),t=a[l],t?t.p(c(f,l),E):(t=a[l]=s[l](c(f,l)),t.c()),k(t,1),t.m(n.parentNode,n))},i(f){o||(k(t),o=!0)},o(f){V(t),o=!1},d(f){a[l].d(f),f&&g(n)}}}function vn(r){let e,l,t=r[1],n=[];for(let s=0;s<t.length;s+=1)n[s]=Et(kt(r,t,s));const o=s=>V(n[s],1,1,()=>{n[s]=null});return{c(){e=T("div");for(let s=0;s<n.length;s+=1)n[s].c();this.h()},l(s){e=z(s,"DIV",{class:!0});var a=D(e);for(let i=0;i<n.length;i+=1)n[i].l(a);a.forEach(g),this.h()},h(){S(e,"class","flex flex-col gap-y-4")},m(s,a){L(s,e,a);for(let i=0;i<n.length;i+=1)n[i]&&n[i].m(e,null);l=!0},p(s,[a]){if(a&35){t=s[1];let i;for(i=0;i<t.length;i+=1){const c=kt(s,t,i);n[i]?(n[i].p(c,a),k(n[i],1)):(n[i]=Et(c),n[i].c(),k(n[i],1),n[i].m(e,null))}for(te(),i=t.length;i<n.length;i+=1)o(i);le()}},i(s){if(!l){for(let a=0;a<t.length;a+=1)k(n[a]);l=!0}},o(s){n=n.filter(Boolean);for(let a=0;a<n.length;a+=1)V(n[a]);l=!1},d(s){s&&g(e),Ae(n,s)}}}const Vt=100;function $n(r){return r<.2?"bg-red-500/10":r<.8?"bg-yellow-500/10":"bg-blue-500/10"}function wn(r){return r<.2?"Likely not in concept":r<.8?"Uncertain":"Likely in concept"}function kn(r,e,l){let t,n,o,s,a,i,c,f,E=X,m=()=>(E(),E=ye(a,M=>l(16,f=M)),a),h,u=X,$=()=>(u(),u=ye(n,M=>l(17,h=M)),n);r.$$.on_destroy.push(()=>E()),r.$$.on_destroy.push(()=>u());let{dataset:p}=e,{concept:d}=e,{fieldPath:_}=e,{schema:v}=e,{embedding:w}=e;const I=Yt();Ie(r,I,M=>l(20,c=M));let y={},P={},q=[];function C(M,U){if(M==null)return;const re={text:M.text,label:U},ee=Object.keys(P).find(R=>P[R]===M);l(11,y={...P}),l(0,q=[M.rowid,...q]),c.mutate([d.namespace,d.concept_name,{insert:[re]}],{onSuccess:()=>{l(11,y={...y,[ee]:void 0})},onSettled:()=>{l(0,q=q.filter(R=>R!==M.rowid))}})}const B=M=>C(M,!0),A=M=>C(M,!1);return r.$$set=M=>{"dataset"in M&&l(6,p=M.dataset),"concept"in M&&l(7,d=M.concept),"fieldPath"in M&&l(8,_=M.fieldPath),"schema"in M&&l(9,v=M.schema),"embedding"in M&&l(10,w=M.embedding)},r.$$.update=()=>{var M,U;r.$$.dirty&1408&&l(15,t={path:_,type:"concept",concept_namespace:d.namespace,concept_name:d.concept_name,embedding:w}),r.$$.dirty&33600&&$(l(3,n=et(p.namespace,p.name,{columns:[Oe,_],limit:Vt,combine_columns:!0,searches:[t]},v))),r.$$.dirty&1152&&l(14,o={signal_name:"concept_score",namespace:d.namespace,concept_name:d.concept_name,embedding:w}),r.$$.dirty&128&&l(13,s={signal_name:"concept_labels",namespace:d.namespace,concept_name:d.concept_name}),r.$$.dirty&25408&&m(l(2,a=et(p.namespace,p.name,{columns:[Oe,_,{path:_,signal_udf:o},{path:_,signal_udf:s}],limit:Vt,combine_columns:!0,sort_by:[Oe]},v))),r.$$.dirty&200064&&l(12,P=hn(y,h.isFetching||(M=h.data)==null?void 0:M.rows,f.isFetching||(U=f.data)==null?void 0:U.rows,d,_,w)),r.$$.dirty&4096&&l(1,i=[P.positive,P.neutral,P.negative])},[q,i,a,n,I,C,p,d,_,v,w,y,P,s,o,t,f,h,B,A]}class En extends ce{constructor(e){super(),fe(this,e,kn,vn,ue,{dataset:6,concept:7,fieldPath:8,schema:9,embedding:10})}}function Dt(r){let e,l;return e=new Ye({props:{class:"dataset-link top-7 h-8",icon:wl,iconDescription:"Open dataset and apply concept."}}),e.$on("click",r[8]),{c(){N(e.$$.fragment)},l(t){H(e.$$.fragment,t)},m(t,n){O(e,t,n),l=!0},p:X,i(t){l||(k(e.$$.fragment,t),l=!0)},o(t){V(e.$$.fragment,t),l=!1},d(t){F(e,t)}}}function It(r){let e,l,t;return l=new En({props:{concept:r[0],dataset:r[1],fieldPath:r[2],schema:r[4],embedding:r[3]}}),{c(){e=T("div"),N(l.$$.fragment)},l(n){e=z(n,"DIV",{});var o=D(e);H(l.$$.fragment,o),o.forEach(g)},m(n,o){L(n,e,o),O(l,e,null),t=!0},p(n,o){const s={};o&1&&(s.concept=n[0]),o&2&&(s.dataset=n[1]),o&4&&(s.fieldPath=n[2]),o&16&&(s.schema=n[4]),o&8&&(s.embedding=n[3]),l.$set(s)},i(n){t||(k(l.$$.fragment,n),t=!0)},o(n){V(l.$$.fragment,n),t=!1},d(n){n&&g(e),F(l)}}}function yt(r){let e,l;return e=new Jt({props:{hideCloseButton:!0,kind:"warning",fullWidth:!0,lowContrast:!0,title:"No embeddings",caption:"Dataset has no fields with computed embeddings. Please compute an embedding index before using the labeler on this dataset."}}),{c(){N(e.$$.fragment)},l(t){H(e.$$.fragment,t)},m(t,n){O(e,t,n),l=!0},i(t){l||(k(e.$$.fragment,t),l=!0)},o(t){V(e.$$.fragment,t),l=!1},d(t){F(e,t)}}}function Vn(r){let e,l,t,n,o,s,a,i,c,f,E;function m(v){r[10](v)}function h(v){r[11](v)}function u(v){r[12](v)}let $={};r[1]!==void 0&&($.dataset=r[1]),r[2]!==void 0&&($.path=r[2]),r[3]!==void 0&&($.embedding=r[3]),n=new Xt({props:$}),Ee.push(()=>Ve(n,"dataset",m)),Ee.push(()=>Ve(n,"path",h)),Ee.push(()=>Ve(n,"embedding",u));let p=r[5]!=null&&r[3]!=null&&Dt(r),d=r[1]!=null&&r[2]!=null&&r[4]!=null&&r[3]!=null&&It(r),_=r[3]==null&&yt();return{c(){e=T("div"),l=T("div"),t=T("div"),N(n.$$.fragment),i=G(),p&&p.c(),c=G(),d&&d.c(),f=G(),_&&_.c(),this.h()},l(v){e=z(v,"DIV",{class:!0});var w=D(e);l=z(w,"DIV",{class:!0});var I=D(l);t=z(I,"DIV",{class:!0});var y=D(t);H(n.$$.fragment,y),y.forEach(g),i=W(I),p&&p.l(I),I.forEach(g),c=W(w),d&&d.l(w),f=W(w),_&&_.l(w),w.forEach(g),this.h()},h(){S(t,"class","flex-grow"),S(l,"class","flex flex-row gap-x-4"),S(e,"class","flex flex-col gap-y-4")},m(v,w){L(v,e,w),b(e,l),b(l,t),O(n,t,null),b(l,i),p&&p.m(l,null),b(e,c),d&&d.m(e,null),b(e,f),_&&_.m(e,null),E=!0},p(v,[w]){const I={};!o&&w&2&&(o=!0,I.dataset=v[1],De(()=>o=!1)),!s&&w&4&&(s=!0,I.path=v[2],De(()=>s=!1)),!a&&w&8&&(a=!0,I.embedding=v[3],De(()=>a=!1)),n.$set(I),v[5]!=null&&v[3]!=null?p?(p.p(v,w),w&40&&k(p,1)):(p=Dt(v),p.c(),k(p,1),p.m(l,null)):p&&(te(),V(p,1,1,()=>{p=null}),le()),v[1]!=null&&v[2]!=null&&v[4]!=null&&v[3]!=null?d?(d.p(v,w),w&30&&k(d,1)):(d=It(v),d.c(),k(d,1),d.m(e,f)):d&&(te(),V(d,1,1,()=>{d=null}),le()),v[3]==null?_?w&8&&k(_,1):(_=yt(),_.c(),k(_,1),_.m(e,null)):_&&(te(),V(_,1,1,()=>{_=null}),le())},i(v){E||(k(n.$$.fragment,v),k(p),k(d),k(_),E=!0)},o(v){V(n.$$.fragment,v),V(p),V(d),V(_),E=!1},d(v){v&&g(e),F(n),p&&p.d(),d&&d.d(),_&&_.d()}}}function Dn(r,e,l){let t,n,o,s,a=X,i=()=>(a(),a=ye(o,I=>l(13,s=I)),o),c,f=X,E=()=>(f(),f=ye(t,I=>l(9,c=I)),t);r.$$.on_destroy.push(()=>a()),r.$$.on_destroy.push(()=>f());let{concept:m}=e,h,u,$,p;function d(){n==null||p==null||h==null||o==null||s==null||(o.addSearch({path:[n],type:"concept",concept_namespace:m.namespace,concept_name:m.concept_name,embedding:p}),Ht(jt(h.namespace,h.name,s)))}function _(I){h=I,l(1,h)}function v(I){$=I,l(2,$)}function w(I){p=I,l(3,p)}return r.$$set=I=>{"concept"in I&&l(0,m=I.concept)},r.$$.update=()=>{r.$$.dirty&2&&E(l(7,t=Ut(h==null?void 0:h.namespace,h==null?void 0:h.name))),r.$$.dirty&512&&l(4,u=c.data),r.$$.dirty&4&&l(5,n=$?Me($):void 0),r.$$.dirty&14&&i(l(6,o=h!=null&&$!=null&&p!=null?Zt(h.namespace,h.name):null))},[m,h,$,p,u,n,o,t,d,c,_,v,w]}class In extends ce{constructor(e){super(),fe(this,e,Dn,Vn,ue,{concept:0})}}function St(r,e,l){const t=r.slice();return t[27]=e[l],t}function Ct(r){let e,l,t,n,o;return l=new zl({props:{class:"ml-2"}}),{c(){e=T("div"),N(l.$$.fragment)},l(s){e=z(s,"DIV",{});var a=D(e);H(l.$$.fragment,a),a.forEach(g)},m(s,a){L(s,e,a),O(l,e,null),t=!0,n||(o=Nt(Ot.call(null,e,{text:"Your concepts are only visible to you when logged in with Google."})),n=!0)},i(s){t||(k(l.$$.fragment,s),t=!0)},o(s){V(l.$$.fragment,s),t=!1},d(s){s&&g(e),F(l),n=!1,o()}}}function Tt(r){let e,l=r[0].description+"",t;return{c(){e=T("div"),t=Z(l),this.h()},l(n){e=z(n,"DIV",{class:!0});var o=D(e);t=j(o,l),o.forEach(g),this.h()},h(){S(e,"class","text text-base text-gray-600")},m(n,o){L(n,e,o),b(e,t)},p(n,o){o&1&&l!==(l=n[0].description+"")&&ne(t,l)},d(n){n&&g(e)}}}function yn(r){let e,l;return{c(){e=T("div"),l=Z("Try it"),this.h()},l(t){e=z(t,"DIV",{slot:!0,class:!0});var n=D(e);l=j(n,"Try it"),n.forEach(g),this.h()},h(){S(e,"slot","above"),S(e,"class","text-md font-semibold")},m(t,n){L(t,e,n),b(e,l)},p:X,d(t){t&&g(e)}}}function Sn(r){let e,l;return e=new ln({props:{example:r[6],concept:r[0],slot:"below"}}),{c(){N(e.$$.fragment)},l(t){H(e.$$.fragment,t)},m(t,n){O(e,t,n),l=!0},p(t,n){const o={};n&64&&(o.example=t[6]),n&1&&(o.concept=t[0]),e.$set(o)},i(t){l||(k(e.$$.fragment,t),l=!0)},o(t){V(e.$$.fragment,t),l=!1},d(t){F(e,t)}}}function Cn(r){let e,l;return{c(){e=T("div"),l=Z("Apply to a dataset"),this.h()},l(t){e=z(t,"DIV",{slot:!0,class:!0});var n=D(e);l=j(n,"Apply to a dataset"),n.forEach(g),this.h()},h(){S(e,"slot","above"),S(e,"class","text-md font-semibold")},m(t,n){L(t,e,n),b(e,l)},p:X,d(t){t&&g(e)}}}function Tn(r){let e,l;return e=new Jt({props:{hideCloseButton:!0,kind:"warning",fullWidth:!0,lowContrast:!0,title:"Choose a dataset with a computed embedding",caption:"Dataset has no fields with computed embeddings. Please compute an embedding index before you can search by concept."}}),{c(){N(e.$$.fragment)},l(t){H(e.$$.fragment,t)},m(t,n){O(e,t,n),l=!0},p:X,i(t){l||(k(e.$$.fragment,t),l=!0)},o(t){V(e.$$.fragment,t),l=!1},d(t){F(e,t)}}}function zn(r){let e,l,t;return l=new Ye({props:{class:"",iconDescription:"Open dataset and apply concept.",$$slots:{default:[Mn]},$$scope:{ctx:r}}}),l.$on("click",r[20]),{c(){e=T("div"),N(l.$$.fragment),this.h()},l(n){e=z(n,"DIV",{class:!0});var o=D(e);H(l.$$.fragment,o),o.forEach(g),this.h()},h(){S(e,"class","mt-4")},m(n,o){L(n,e,o),O(l,e,null),t=!0},p(n,o){const s={};o&1073741824&&(s.$$scope={dirty:o,ctx:n}),l.$set(s)},i(n){t||(k(l.$$.fragment,n),t=!0)},o(n){V(l.$$.fragment,n),t=!1},d(n){n&&g(e),F(l)}}}function Mn(r){let e;return{c(){e=Z("Search by concept")},l(l){e=j(l,"Search by concept")},m(l,t){L(l,e,t)},d(l){l&&g(e)}}}function An(r){let e,l,t,n,o,s,a,i,c;function f(d){r[17](d)}function E(d){r[18](d)}function m(d){r[19](d)}let h={};r[1]!==void 0&&(h.dataset=r[1]),r[2]!==void 0&&(h.path=r[2]),r[3]!==void 0&&(h.embedding=r[3]),l=new Xt({props:h}),Ee.push(()=>Ve(l,"dataset",f)),Ee.push(()=>Ve(l,"path",E)),Ee.push(()=>Ve(l,"embedding",m));const u=[zn,Tn],$=[];function p(d,_){return d[1]!=null&&d[2]!=null&&d[3]!=null?0:1}return a=p(r),i=$[a]=u[a](r),{c(){e=T("div"),N(l.$$.fragment),s=G(),i.c(),this.h()},l(d){e=z(d,"DIV",{slot:!0});var _=D(e);H(l.$$.fragment,_),s=W(_),i.l(_),_.forEach(g),this.h()},h(){S(e,"slot","below")},m(d,_){L(d,e,_),O(l,e,null),b(e,s),$[a].m(e,null),c=!0},p(d,_){const v={};!t&&_&2&&(t=!0,v.dataset=d[1],De(()=>t=!1)),!n&&_&4&&(n=!0,v.path=d[2],De(()=>n=!1)),!o&&_&8&&(o=!0,v.embedding=d[3],De(()=>o=!1)),l.$set(v);let w=a;a=p(d),a===w?$[a].p(d,_):(te(),V($[w],1,1,()=>{$[w]=null}),le(),i=$[a],i?i.p(d,_):(i=$[a]=u[a](d),i.c()),k(i,1),i.m(e,null))},i(d){c||(k(l.$$.fragment,d),k(i),c=!0)},o(d){V(l.$$.fragment,d),V(i),c=!1},d(d){d&&g(e),F(l),$[a].d()}}}function zt(r){let e,l;return e=new Fe({props:{expanded:!0,$$slots:{below:[Rn],above:[Pn]},$$scope:{ctx:r}}}),{c(){N(e.$$.fragment)},l(t){H(e.$$.fragment,t)},m(t,n){O(e,t,n),l=!0},p(t,n){const o={};n&1073742337&&(o.$$scope={dirty:n,ctx:t}),e.$set(o)},i(t){l||(k(e.$$.fragment,t),l=!0)},o(t){V(e.$$.fragment,t),l=!1},d(t){F(e,t)}}}function Pn(r){let e,l;return{c(){e=T("div"),l=Z("Metrics"),this.h()},l(t){e=z(t,"DIV",{slot:!0,class:!0});var n=D(e);l=j(n,"Metrics"),n.forEach(g),this.h()},h(){S(e,"slot","above"),S(e,"class","text-md font-semibold")},m(t,n){L(t,e,n),b(e,l)},p:X,d(t){t&&g(e)}}}function Mt(r){let e,l;return e=new Wl({props:{concept:r[0],embedding:r[27].name}}),{c(){N(e.$$.fragment)},l(t){H(e.$$.fragment,t)},m(t,n){O(e,t,n),l=!0},p(t,n){const o={};n&1&&(o.concept=t[0]),n&512&&(o.embedding=t[27].name),e.$set(o)},i(t){l||(k(e.$$.fragment,t),l=!0)},o(t){V(e.$$.fragment,t),l=!1},d(t){F(e,t)}}}function Rn(r){let e,l,t=r[9].data,n=[];for(let s=0;s<t.length;s+=1)n[s]=Mt(St(r,t,s));const o=s=>V(n[s],1,1,()=>{n[s]=null});return{c(){e=T("div");for(let s=0;s<n.length;s+=1)n[s].c();this.h()},l(s){e=z(s,"DIV",{slot:!0,class:!0});var a=D(e);for(let i=0;i<n.length;i+=1)n[i].l(a);a.forEach(g),this.h()},h(){S(e,"slot","below"),S(e,"class","model-metrics flex gap-x-4")},m(s,a){L(s,e,a);for(let i=0;i<n.length;i+=1)n[i]&&n[i].m(e,null);l=!0},p(s,a){if(a&513){t=s[9].data;let i;for(i=0;i<t.length;i+=1){const c=St(s,t,i);n[i]?(n[i].p(c,a),k(n[i],1)):(n[i]=Mt(c),n[i].c(),k(n[i],1),n[i].m(e,null))}for(te(),i=t.length;i<n.length;i+=1)o(i);le()}},i(s){if(!l){for(let a=0;a<t.length;a+=1)k(n[a]);l=!0}},o(s){n=n.filter(Boolean);for(let a=0;a<n.length;a+=1)V(n[a]);l=!1},d(s){s&&g(e),Ae(n,s)}}}function Bn(r){let e,l;return{c(){e=T("div"),l=Z("Collect labels"),this.h()},l(t){e=z(t,"DIV",{slot:!0,class:!0});var n=D(e);l=j(n,"Collect labels"),n.forEach(g),this.h()},h(){S(e,"slot","above"),S(e,"class","text-md font-semibold")},m(t,n){L(t,e,n),b(e,l)},p:X,d(t){t&&g(e)}}}function Nn(r){let e,l;return e=new In({props:{slot:"below",concept:r[0]}}),{c(){N(e.$$.fragment)},l(t){H(e.$$.fragment,t)},m(t,n){O(e,t,n),l=!0},p(t,n){const o={};n&1&&(o.concept=t[0]),e.$set(o)},i(t){l||(k(e.$$.fragment,t),l=!0)},o(t){V(e.$$.fragment,t),l=!1},d(t){F(e,t)}}}function Hn(r){let e,l,t,n=r[0].concept_name+"",o,s,a,i,c,f,E,m,h,u,$,p,d,_,v,w,I=r[4].length+"",y,P,q,C,B,A,M,U,re,ee=r[7].length+"",R,de,oe,se,me,J=r[8]==r[0].namespace&&Ct(),Y=r[0].description&&Tt(r);c=new Fe({props:{expanded:!0,$$slots:{below:[Sn],above:[yn]},$$scope:{ctx:r}}}),E=new Fe({props:{$$slots:{below:[An],above:[Cn]},$$scope:{ctx:r}}});let x=r[9].data&&zt(r);return u=new Fe({props:{$$slots:{below:[Nn],above:[Bn]},$$scope:{ctx:r}}}),v=new Gt({}),C=new ut({props:{data:r[4]}}),C.$on("remove",r[21]),C.$on("add",r[22]),U=new Wt({}),se=new ut({props:{data:r[7]}}),se.$on("remove",r[23]),se.$on("add",r[24]),{c(){e=T("div"),l=T("div"),t=T("div"),o=Z(n),s=G(),J&&J.c(),a=G(),Y&&Y.c(),i=G(),N(c.$$.fragment),f=G(),N(E.$$.fragment),m=G(),x&&x.c(),h=G(),N(u.$$.fragment),$=G(),p=T("div"),d=T("div"),_=T("span"),N(v.$$.fragment),w=Z(" In concept ("),y=Z(I),P=Z(" examples)"),q=G(),N(C.$$.fragment),B=G(),A=T("div"),M=T("span"),N(U.$$.fragment),re=Z("Not in concept ("),R=Z(ee),de=Z(" examples)"),oe=G(),N(se.$$.fragment),this.h()},l(Q){e=z(Q,"DIV",{class:!0});var K=D(e);l=z(K,"DIV",{});var he=D(l);t=z(he,"DIV",{class:!0});var be=D(t);o=j(be,n),s=W(be),J&&J.l(be),be.forEach(g),a=W(he),Y&&Y.l(he),he.forEach(g),i=W(K),H(c.$$.fragment,K),f=W(K),H(E.$$.fragment,K),m=W(K),x&&x.l(K),h=W(K),H(u.$$.fragment,K),$=W(K),p=z(K,"DIV",{class:!0});var ve=D(p);d=z(ve,"DIV",{class:!0});var ge=D(d);_=z(ge,"SPAN",{class:!0});var pe=D(_);H(v.$$.fragment,pe),w=j(pe," In concept ("),y=j(pe,I),P=j(pe," examples)"),pe.forEach(g),q=W(ge),H(C.$$.fragment,ge),ge.forEach(g),B=W(ve),A=z(ve,"DIV",{class:!0});var ze=D(A);M=z(ze,"SPAN",{class:!0});var ke=D(M);H(U.$$.fragment,ke),re=j(ke,"Not in concept ("),R=j(ke,ee),de=j(ke," examples)"),ke.forEach(g),oe=W(ze),H(se.$$.fragment,ze),ze.forEach(g),ve.forEach(g),K.forEach(g),this.h()},h(){S(t,"class","flex flex-row items-center text-2xl font-semibold"),S(_,"class","flex items-center gap-x-2 text-lg"),S(d,"class","flex w-0 flex-grow flex-col gap-y-4"),S(M,"class","flex items-center gap-x-2 text-lg"),S(A,"class","flex w-0 flex-grow flex-col gap-y-4"),S(p,"class","flex gap-x-4"),S(e,"class","flex h-full w-full flex-col gap-y-8 px-10")},m(Q,K){L(Q,e,K),b(e,l),b(l,t),b(t,o),b(t,s),J&&J.m(t,null),b(l,a),Y&&Y.m(l,null),b(e,i),O(c,e,null),b(e,f),O(E,e,null),b(e,m),x&&x.m(e,null),b(e,h),O(u,e,null),b(e,$),b(e,p),b(p,d),b(d,_),O(v,_,null),b(_,w),b(_,y),b(_,P),b(d,q),O(C,d,null),b(p,B),b(p,A),b(A,M),O(U,M,null),b(M,re),b(M,R),b(M,de),b(A,oe),O(se,A,null),me=!0},p(Q,[K]){(!me||K&1)&&n!==(n=Q[0].concept_name+"")&&ne(o,n),Q[8]==Q[0].namespace?J?K&257&&k(J,1):(J=Ct(),J.c(),k(J,1),J.m(t,null)):J&&(te(),V(J,1,1,()=>{J=null}),le()),Q[0].description?Y?Y.p(Q,K):(Y=Tt(Q),Y.c(),Y.m(l,null)):Y&&(Y.d(1),Y=null);const he={};K&1073741889&&(he.$$scope={dirty:K,ctx:Q}),c.$set(he);const be={};K&1073741838&&(be.$$scope={dirty:K,ctx:Q}),E.$set(be),Q[9].data?x?(x.p(Q,K),K&512&&k(x,1)):(x=zt(Q),x.c(),k(x,1),x.m(e,h)):x&&(te(),V(x,1,1,()=>{x=null}),le());const ve={};K&1073741825&&(ve.$$scope={dirty:K,ctx:Q}),u.$set(ve),(!me||K&16)&&I!==(I=Q[4].length+"")&&ne(y,I);const ge={};K&16&&(ge.data=Q[4]),C.$set(ge),(!me||K&128)&&ee!==(ee=Q[7].length+"")&&ne(R,ee);const pe={};K&128&&(pe.data=Q[7]),se.$set(pe)},i(Q){me||(k(J),k(c.$$.fragment,Q),k(E.$$.fragment,Q),k(x),k(u.$$.fragment,Q),k(v.$$.fragment,Q),k(C.$$.fragment,Q),k(U.$$.fragment,Q),k(se.$$.fragment,Q),me=!0)},o(Q){V(J),V(c.$$.fragment,Q),V(E.$$.fragment,Q),V(x),V(u.$$.fragment,Q),V(v.$$.fragment,Q),V(C.$$.fragment,Q),V(U.$$.fragment,Q),V(se.$$.fragment,Q),me=!1},d(Q){Q&&g(e),J&&J.d(),Y&&Y.d(),F(c),F(E),x&&x.d(),F(u),F(v),F(C),F(U),F(se)}}}function On(r,e,l){let t,n,o,s,a,i,c,f=X,E=()=>(f(),f=ye(a,R=>l(26,c=R)),a),m,h;r.$$.on_destroy.push(()=>f());let{concept:u}=e;const $=_l();Ie(r,$,R=>l(16,m=R));const p=Yt();Ie(r,p,R=>l(25,i=R));const d=Ft();Ie(r,d,R=>l(9,h=R));let _,v,w;function I(){const R=v?Me(v):void 0;R==null||w==null||_==null||a==null||c==null||(a.addSearch({path:[R],type:"concept",concept_namespace:u.namespace,concept_name:u.concept_name,embedding:w}),Ht(jt(_.namespace,_.name,c)))}function y(R){!u.namespace||!u.concept_name||i.mutate([u.namespace,u.concept_name,{remove:[R]}])}function P(R,de){!u.namespace||!u.concept_name||i.mutate([u.namespace,u.concept_name,{insert:[{text:R,label:de}]}])}function q(R){_=R,l(1,_)}function C(R){v=R,l(2,v)}function B(R){w=R,l(3,w)}const A=()=>I(),M=R=>y(R.detail),U=R=>P(R.detail,!0),re=R=>y(R.detail),ee=R=>P(R.detail,!1);return r.$$set=R=>{"concept"in R&&l(0,u=R.concept)},r.$$.update=()=>{var R,de;r.$$.dirty&65536&&l(8,t=(de=(R=m.data)==null?void 0:R.user)==null?void 0:de.id),r.$$.dirty&1&&l(4,n=Object.values(u.data).filter(oe=>oe.label==!0)),r.$$.dirty&1&&l(7,o=Object.values(u.data).filter(oe=>oe.label==!1)),r.$$.dirty&16&&l(6,s=n[Math.floor(Math.random()*n.length)]),r.$$.dirty&14&&E(l(5,a=_!=null&&v!=null&&w!=null?Zt(_.namespace,_.name):null))},[u,_,v,w,n,a,s,o,t,h,$,p,d,I,y,P,m,q,C,B,A,M,U,re,ee]}class Jn extends ce{constructor(e){super(),fe(this,e,On,Hn,ue,{concept:0})}}export{Jn as C,Kn as I,Sl as T,lt as a};
lilac/web/_app/immutable/chunks/Page.4b0754ae.js ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ import{S as ae,i as fe,s as ue,E as q,Z as Y,_ as G,m as D,h,n as E,$ as ke,b as L,a0 as I,L as de,a1 as le,N as ee,Q as re,q as X,r as W,u as ne,D as _e,aq as _t,e as we,a as Q,k as P,a9 as gt,ar as vt,c as Z,l as S,F as se,G as c,H as F,I as ge,J as ve,K as pe,g as V,v as Ee,d as B,f as Te,M as Ve,aj as ut,C as dt,O as Ce,P as pt,j as ct,x as qe,y as K,z as te,A as x,B as $,R as De,w as Ae,ai as kt,p as ye,ae as wt,a7 as je,ab as ht,W as Et,X as Tt,ac as It,a8 as Dt}from"./index.b333a928.js";import{aV as Mt,aW as zt,aX as Ue,aY as Ye,aZ as Ct,j as Ge,a_ as Ot,a$ as At,b0 as Vt,q as Rt,b as mt,h as Fe,b1 as Bt,b2 as Lt,g as Pt,B as St}from"./Commands.1fffdf33.js";import{w as Se}from"./index.2b0dd2f8.js";function Qe(l){let e,t;return{c(){e=Y("title"),t=X(l[1])},l(i){e=G(i,"title",{});var r=D(e);t=W(r,l[1]),r.forEach(h)},m(i,r){L(i,e,r),I(e,t)},p(i,r){r&2&&ne(t,i[1])},d(i){i&&h(e)}}}function Nt(l){let e,t,i,r,s=l[1]&&Qe(l),n=[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},{width:l[0]},{height:l[0]},l[2],l[3]],a={};for(let o=0;o<n.length;o+=1)a=q(a,n[o]);return{c(){e=Y("svg"),s&&s.c(),t=Y("circle"),i=Y("circle"),r=Y("circle"),this.h()},l(o){e=G(o,"svg",{xmlns:!0,viewBox:!0,fill:!0,preserveAspectRatio:!0,width:!0,height:!0});var f=D(e);s&&s.l(f),t=G(f,"circle",{cx:!0,cy:!0,r:!0}),D(t).forEach(h),i=G(f,"circle",{cx:!0,cy:!0,r:!0}),D(i).forEach(h),r=G(f,"circle",{cx:!0,cy:!0,r:!0}),D(r).forEach(h),f.forEach(h),this.h()},h(){E(t,"cx","16"),E(t,"cy","8"),E(t,"r","2"),E(i,"cx","16"),E(i,"cy","16"),E(i,"r","2"),E(r,"cx","16"),E(r,"cy","24"),E(r,"r","2"),ke(e,a)},m(o,f){L(o,e,f),s&&s.m(e,null),I(e,t),I(e,i),I(e,r)},p(o,[f]){o[1]?s?s.p(o,f):(s=Qe(o),s.c(),s.m(e,t)):s&&(s.d(1),s=null),ke(e,a=de(n,[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},f&1&&{width:o[0]},f&1&&{height:o[0]},f&4&&o[2],f&8&&o[3]]))},i:le,o:le,d(o){o&&h(e),s&&s.d()}}}function qt(l,e,t){let i,r;const s=["size","title"];let n=ee(e,s),{size:a=16}=e,{title:o=void 0}=e;return l.$$set=f=>{t(5,e=q(q({},e),re(f))),t(3,n=ee(e,s)),"size"in f&&t(0,a=f.size),"title"in f&&t(1,o=f.title)},l.$$.update=()=>{t(4,i=e["aria-label"]||e["aria-labelledby"]||o),t(2,r={"aria-hidden":i?void 0:!0,role:i?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=re(e),[a,o,r,n,i]}class yt extends ae{constructor(e){super(),fe(this,e,qt,Nt,ue,{size:0,title:1})}}const Ht=yt;function Ze(l){let e,t;return{c(){e=Y("title"),t=X(l[1])},l(i){e=G(i,"title",{});var r=D(e);t=W(r,l[1]),r.forEach(h)},m(i,r){L(i,e,r),I(e,t)},p(i,r){r&2&&ne(t,i[1])},d(i){i&&h(e)}}}function Ut(l){let e,t,i,r,s=l[1]&&Ze(l),n=[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},{width:l[0]},{height:l[0]},l[2],l[3]],a={};for(let o=0;o<n.length;o+=1)a=q(a,n[o]);return{c(){e=Y("svg"),s&&s.c(),t=Y("circle"),i=Y("circle"),r=Y("circle"),this.h()},l(o){e=G(o,"svg",{xmlns:!0,viewBox:!0,fill:!0,preserveAspectRatio:!0,width:!0,height:!0});var f=D(e);s&&s.l(f),t=G(f,"circle",{cx:!0,cy:!0,r:!0}),D(t).forEach(h),i=G(f,"circle",{cx:!0,cy:!0,r:!0}),D(i).forEach(h),r=G(f,"circle",{cx:!0,cy:!0,r:!0}),D(r).forEach(h),f.forEach(h),this.h()},h(){E(t,"cx","8"),E(t,"cy","16"),E(t,"r","2"),E(i,"cx","16"),E(i,"cy","16"),E(i,"r","2"),E(r,"cx","24"),E(r,"cy","16"),E(r,"r","2"),ke(e,a)},m(o,f){L(o,e,f),s&&s.m(e,null),I(e,t),I(e,i),I(e,r)},p(o,[f]){o[1]?s?s.p(o,f):(s=Ze(o),s.c(),s.m(e,t)):s&&(s.d(1),s=null),ke(e,a=de(n,[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},f&1&&{width:o[0]},f&1&&{height:o[0]},f&4&&o[2],f&8&&o[3]]))},i:le,o:le,d(o){o&&h(e),s&&s.d()}}}function Yt(l,e,t){let i,r;const s=["size","title"];let n=ee(e,s),{size:a=16}=e,{title:o=void 0}=e;return l.$$set=f=>{t(5,e=q(q({},e),re(f))),t(3,n=ee(e,s)),"size"in f&&t(0,a=f.size),"title"in f&&t(1,o=f.title)},l.$$.update=()=>{t(4,i=e["aria-label"]||e["aria-labelledby"]||o),t(2,r={"aria-hidden":i?void 0:!0,role:i?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=re(e),[a,o,r,n,i]}class Gt extends ae{constructor(e){super(),fe(this,e,Yt,Ut,ue,{size:0,title:1})}}const jt=Gt,Ft=l=>({}),Xe=l=>({});function Qt(l){let e,t,i;var r=l[1];function s(n){return{props:{"aria-label":n[10],title:n[10],class:"bx--overflow-menu__icon "+n[9]}}}return r&&(e=qe(r,s(l))),{c(){e&&K(e.$$.fragment),t=we()},l(n){e&&te(e.$$.fragment,n),t=we()},m(n,a){e&&x(e,n,a),L(n,t,a),i=!0},p(n,a){const o={};if(a[0]&1024&&(o["aria-label"]=n[10]),a[0]&1024&&(o.title=n[10]),a[0]&512&&(o.class="bx--overflow-menu__icon "+n[9]),a[0]&2&&r!==(r=n[1])){if(e){Ee();const f=e;B(f.$$.fragment,1,0,()=>{$(f,1)}),Te()}r?(e=qe(r,s(n)),K(e.$$.fragment),V(e.$$.fragment,1),x(e,t.parentNode,t)):e=null}else r&&e.$set(o)},i(n){i||(e&&V(e.$$.fragment,n),i=!0)},o(n){e&&B(e.$$.fragment,n),i=!1},d(n){n&&h(t),e&&$(e,n)}}}function We(l){let e,t;const i=l[24].default,r=_e(i,l,l[23],null);return{c(){e=P("ul"),r&&r.c(),this.h()},l(s){e=S(s,"UL",{role:!0,tabindex:!0,"aria-label":!0,"data-floating-menu-direction":!0,class:!0});var n=D(e);r&&r.l(n),n.forEach(h),this.h()},h(){E(e,"role","menu"),E(e,"tabindex","-1"),E(e,"aria-label",l[13]),E(e,"data-floating-menu-direction",l[5]),E(e,"class",l[8]),c(e,"bx--overflow-menu-options",!0),c(e,"bx--overflow-menu--flip",l[7]),c(e,"bx--overflow-menu-options--open",l[0]),c(e,"bx--overflow-menu-options--light",l[6]),c(e,"bx--overflow-menu-options--sm",l[4]==="sm"),c(e,"bx--overflow-menu-options--xl",l[4]==="xl"),c(e,"bx--breadcrumb-menu-options",!!l[14])},m(s,n){L(s,e,n),r&&r.m(e,null),l[31](e),t=!0},p(s,n){r&&r.p&&(!t||n[0]&8388608)&&ge(r,i,s,s[23],t?pe(i,s[23],n,null):ve(s[23]),null),(!t||n[0]&8192)&&E(e,"aria-label",s[13]),(!t||n[0]&32)&&E(e,"data-floating-menu-direction",s[5]),(!t||n[0]&256)&&E(e,"class",s[8]),(!t||n[0]&256)&&c(e,"bx--overflow-menu-options",!0),(!t||n[0]&384)&&c(e,"bx--overflow-menu--flip",s[7]),(!t||n[0]&257)&&c(e,"bx--overflow-menu-options--open",s[0]),(!t||n[0]&320)&&c(e,"bx--overflow-menu-options--light",s[6]),(!t||n[0]&272)&&c(e,"bx--overflow-menu-options--sm",s[4]==="sm"),(!t||n[0]&272)&&c(e,"bx--overflow-menu-options--xl",s[4]==="xl"),(!t||n[0]&16640)&&c(e,"bx--breadcrumb-menu-options",!!s[14])},i(s){t||(V(r,s),t=!0)},o(s){B(r,s),t=!1},d(s){s&&h(e),r&&r.d(s),l[31](null)}}}function Zt(l){let e,t,i,r,s,n,a,o;const f=l[24].menu,d=_e(f,l,l[23],Xe),u=d||Qt(l);let b=l[0]&&We(l),g=[{type:"button"},{"aria-haspopup":""},{"aria-expanded":l[0]},{"aria-label":l[13]},{id:l[11]},l[19]],T={};for(let _=0;_<g.length;_+=1)T=q(T,g[_]);return{c(){e=new _t(!1),t=we(),i=Q(),r=P("button"),u&&u.c(),s=Q(),b&&b.c(),this.h()},l(_){const k=gt("svelte-7ztmff",document.head);e=vt(k,!1),t=we(),k.forEach(h),i=Z(_),r=S(_,"BUTTON",{type:!0,"aria-haspopup":!0,"aria-expanded":!0,"aria-label":!0,id:!0});var p=D(r);u&&u.l(p),s=Z(p),b&&b.l(p),p.forEach(h),this.h()},h(){e.a=t,se(r,T),c(r,"bx--overflow-menu",!0),c(r,"bx--overflow-menu--open",l[0]),c(r,"bx--overflow-menu--light",l[6]),c(r,"bx--overflow-menu--sm",l[4]==="sm"),c(r,"bx--overflow-menu--xl",l[4]==="xl")},m(_,k){e.m(l[12],document.head),I(document.head,t),L(_,i,k),L(_,r,k),u&&u.m(r,null),I(r,s),b&&b.m(r,null),r.autofocus&&r.focus(),l[32](r),n=!0,a||(o=[F(window,"click",l[30]),F(r,"click",l[25]),F(r,"click",l[33]),F(r,"mouseover",l[26]),F(r,"mouseenter",l[27]),F(r,"mouseleave",l[28]),F(r,"keydown",l[29]),F(r,"keydown",l[34]),F(r,"focusout",l[35])],a=!0)},p(_,k){(!n||k[0]&4096)&&e.p(_[12]),d?d.p&&(!n||k[0]&8388608)&&ge(d,f,_,_[23],n?pe(f,_[23],k,Ft):ve(_[23]),Xe):u&&u.p&&(!n||k[0]&1538)&&u.p(_,n?k:[-1,-1]),_[0]?b?(b.p(_,k),k[0]&1&&V(b,1)):(b=We(_),b.c(),V(b,1),b.m(r,null)):b&&(Ee(),B(b,1,1,()=>{b=null}),Te()),se(r,T=de(g,[{type:"button"},{"aria-haspopup":""},(!n||k[0]&1)&&{"aria-expanded":_[0]},(!n||k[0]&8192)&&{"aria-label":_[13]},(!n||k[0]&2048)&&{id:_[11]},k[0]&524288&&_[19]])),c(r,"bx--overflow-menu",!0),c(r,"bx--overflow-menu--open",_[0]),c(r,"bx--overflow-menu--light",_[6]),c(r,"bx--overflow-menu--sm",_[4]==="sm"),c(r,"bx--overflow-menu--xl",_[4]==="xl")},i(_){n||(V(u,_),V(b),n=!0)},o(_){B(u,_),B(b),n=!1},d(_){h(t),_&&e.d(),_&&h(i),_&&h(r),u&&u.d(_),b&&b.d(),l[32](null),a=!1,Ve(o)}}}function Xt(l,e,t){let i,r;const s=["size","direction","open","light","flipped","menuOptionsClass","icon","iconClass","iconDescription","id","buttonRef","menuRef"];let n=ee(e,s),a,o,f,{$$slots:d={},$$scope:u}=e,{size:b=void 0}=e,{direction:g="bottom"}=e,{open:T=!1}=e,{light:_=!1}=e,{flipped:k=!1}=e,{menuOptionsClass:p=void 0}=e,{icon:m=Ht}=e,{iconClass:O=void 0}=e,{iconDescription:M="Open and close list of options"}=e,{id:w="ccs-"+Math.random().toString(36)}=e,{buttonRef:C=null}=e,{menuRef:R=null}=e;const oe=ut("BreadcrumbItem"),ce=dt(),he=Se([]);Ce(l,he,v=>t(22,o=v));const j=Se(void 0);Ce(l,j,v=>t(37,f=v));const Me=Se(void 0),U=Se(-1);Ce(l,U,v=>t(21,a=v));let me,J=!0;pt("OverflowMenu",{focusedId:Me,add:({id:v,text:N,primaryFocus:be,disabled:Pe})=>{he.update(He=>(be&&U.set(He.length),[...He,{id:v,text:N,primaryFocus:be,disabled:Pe,index:He.length}]))},update:v=>{j.set(v)},change:v=>{let N=a+v;N<0?N=o.length-1:N>=o.length&&(N=0);let be=o[N].disabled;for(;be;)N=N+v,N<0?N=o.length-1:N>=o.length&&(N=0),be=o[N].disabled;U.set(N)}}),ct(()=>{if(f){const{index:v,text:N}=o.filter(be=>be.id===f)[0];ce("close",{index:v,text:N}),t(0,T=!1)}if(T){const{width:v,height:N}=C.getBoundingClientRect();t(20,me=v),!J&&a<0&&R.focus(),k&&(t(3,R.style.left="auto",R),t(3,R.style.right=0,R)),g==="top"?(t(3,R.style.top="auto",R),t(3,R.style.bottom=N+"px",R)):g==="bottom"&&t(3,R.style.top=N+"px",R),oe&&(t(3,R.style.top=N+10+"px",R),t(3,R.style.left="-11px",R))}T||(he.set([]),j.set(void 0),U.set(0)),J=!1});function y(v){De.call(this,l,v)}function A(v){De.call(this,l,v)}function ie(v){De.call(this,l,v)}function Re(v){De.call(this,l,v)}function z(v){De.call(this,l,v)}const H=({target:v})=>{C&&C.contains(v)||R&&!R.contains(v)&&t(0,T=!1)};function Ie(v){Ae[v?"unshift":"push"](()=>{R=v,t(3,R)})}function Oe(v){Ae[v?"unshift":"push"](()=>{C=v,t(2,C)})}const ze=({target:v})=>{R&&R.contains(v)||(t(0,T=!T),T||ce("close"))},Be=v=>{T&&(["ArrowDown","ArrowLeft","ArrowRight","ArrowUp"].includes(v.key)?v.preventDefault():v.key==="Escape"&&(v.stopPropagation(),ce("close"),t(0,T=!1),C.focus()))},Le=v=>{T&&(C.contains(v.relatedTarget)||(ce("close"),t(0,T=!1)))};return l.$$set=v=>{t(39,e=q(q({},e),re(v))),t(19,n=ee(e,s)),"size"in v&&t(4,b=v.size),"direction"in v&&t(5,g=v.direction),"open"in v&&t(0,T=v.open),"light"in v&&t(6,_=v.light),"flipped"in v&&t(7,k=v.flipped),"menuOptionsClass"in v&&t(8,p=v.menuOptionsClass),"icon"in v&&t(1,m=v.icon),"iconClass"in v&&t(9,O=v.iconClass),"iconDescription"in v&&t(10,M=v.iconDescription),"id"in v&&t(11,w=v.id),"buttonRef"in v&&t(2,C=v.buttonRef),"menuRef"in v&&t(3,R=v.menuRef),"$$scope"in v&&t(23,u=v.$$scope)},l.$$.update=()=>{t(13,i=e["aria-label"]||"menu"),l.$$.dirty[0]&6291456&&o[a]&&Me.set(o[a].id),l.$$.dirty[0]&1050624&&t(12,r=`<style>
2
+ #${w} .bx--overflow-menu-options.bx--overflow-menu-options:after {
3
+ width: ${me?me+"px":"2rem"};
4
+ }
5
+ </style>`)},oe&&t(1,m=jt),e=re(e),[T,m,C,R,b,g,_,k,p,O,M,w,r,i,oe,ce,he,j,U,n,me,a,o,u,d,y,A,ie,Re,z,H,Ie,Oe,ze,Be,Le]}class Wt extends ae{constructor(e){super(),fe(this,e,Xt,Zt,ue,{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 bt=Wt;function Jt(l){let e,t,i,r;const s=l[16].default,n=_e(s,l,l[15],null),a=n||xt(l);let o=[l[7]],f={};for(let d=0;d<o.length;d+=1)f=q(f,o[d]);return{c(){e=P("button"),a&&a.c(),this.h()},l(d){e=S(d,"BUTTON",{});var u=D(e);a&&a.l(u),u.forEach(h),this.h()},h(){se(e,f)},m(d,u){L(d,e,u),a&&a.m(e,null),e.autofocus&&e.focus(),l[24](e),t=!0,i||(r=[F(e,"click",l[19]),F(e,"click",l[25]),F(e,"keydown",l[20]),F(e,"keydown",l[26])],i=!0)},p(d,u){n?n.p&&(!t||u&32768)&&ge(n,s,d,d[15],t?pe(s,d[15],u,null):ve(d[15]),null):a&&a.p&&(!t||u&2)&&a.p(d,t?u:-1),se(e,f=de(o,[u&128&&d[7]]))},i(d){t||(V(a,d),t=!0)},o(d){B(a,d),t=!1},d(d){d&&h(e),a&&a.d(d),l[24](null),i=!1,Ve(r)}}}function Kt(l){let e,t,i,r;const s=l[16].default,n=_e(s,l,l[15],null),a=n||$t(l);let o=[l[7]],f={};for(let d=0;d<o.length;d+=1)f=q(f,o[d]);return{c(){e=P("a"),a&&a.c(),this.h()},l(d){e=S(d,"A",{});var u=D(e);a&&a.l(u),u.forEach(h),this.h()},h(){se(e,f)},m(d,u){L(d,e,u),a&&a.m(e,null),l[21](e),t=!0,i||(r=[F(e,"click",l[17]),F(e,"click",l[22]),F(e,"keydown",l[18]),F(e,"keydown",l[23])],i=!0)},p(d,u){n?n.p&&(!t||u&32768)&&ge(n,s,d,d[15],t?pe(s,d[15],u,null):ve(d[15]),null):a&&a.p&&(!t||u&2)&&a.p(d,t?u:-1),se(e,f=de(o,[u&128&&d[7]]))},i(d){t||(V(a,d),t=!0)},o(d){B(a,d),t=!1},d(d){d&&h(e),a&&a.d(d),l[21](null),i=!1,Ve(r)}}}function xt(l){let e,t;return{c(){e=P("div"),t=X(l[1]),this.h()},l(i){e=S(i,"DIV",{});var r=D(e);t=W(r,l[1]),r.forEach(h),this.h()},h(){c(e,"bx--overflow-menu-options__option-content",!0)},m(i,r){L(i,e,r),I(e,t)},p(i,r){r&2&&ne(t,i[1])},d(i){i&&h(e)}}}function $t(l){let e,t;return{c(){e=P("div"),t=X(l[1]),this.h()},l(i){e=S(i,"DIV",{});var r=D(e);t=W(r,l[1]),r.forEach(h),this.h()},h(){c(e,"bx--overflow-menu-options__option-content",!0)},m(i,r){L(i,e,r),I(e,t)},p(i,r){r&2&&ne(t,i[1])},d(i){i&&h(e)}}}function el(l){let e,t,i,r;const s=[Kt,Jt],n=[];function a(d,u){return d[2]?0:1}t=a(l),i=n[t]=s[t](l);let o=[{role:"none"},{id:l[6]},l[11]],f={};for(let d=0;d<o.length;d+=1)f=q(f,o[d]);return{c(){e=P("li"),i.c(),this.h()},l(d){e=S(d,"LI",{role:!0,id:!0});var u=D(e);i.l(u),u.forEach(h),this.h()},h(){se(e,f),c(e,"bx--overflow-menu-options__option",!0),c(e,"bx--overflow-menu--divider",l[4]),c(e,"bx--overflow-menu-options__option--danger",l[5]),c(e,"bx--overflow-menu-options__option--disabled",l[3])},m(d,u){L(d,e,u),n[t].m(e,null),r=!0},p(d,[u]){let b=t;t=a(d),t===b?n[t].p(d,u):(Ee(),B(n[b],1,1,()=>{n[b]=null}),Te(),i=n[t],i?i.p(d,u):(i=n[t]=s[t](d),i.c()),V(i,1),i.m(e,null)),se(e,f=de(o,[{role:"none"},(!r||u&64)&&{id:d[6]},u&2048&&d[11]])),c(e,"bx--overflow-menu-options__option",!0),c(e,"bx--overflow-menu--divider",d[4]),c(e,"bx--overflow-menu-options__option--danger",d[5]),c(e,"bx--overflow-menu-options__option--disabled",d[3])},i(d){r||(V(i),r=!0)},o(d){B(i),r=!1},d(d){d&&h(e),n[t].d()}}}function tl(l,e,t){let i;const r=["text","href","primaryFocus","disabled","hasDivider","danger","requireTitle","id","ref"];let s=ee(e,r),n,{$$slots:a={},$$scope:o}=e;const f=kt(a);let{text:d="Provide text"}=e,{href:u=""}=e,{primaryFocus:b=!1}=e,{disabled:g=!1}=e,{hasDivider:T=!1}=e,{danger:_=!1}=e,{requireTitle:k=!0}=e,{id:p="ccs-"+Math.random().toString(36)}=e,{ref:m=null}=e;const{focusedId:O,add:M,update:w,change:C}=ut("OverflowMenu");Ce(l,O,A=>t(14,n=A)),M({id:p,text:d,primaryFocus:b,disabled:g}),ct(()=>{m&&b&&m.focus()});function R(A){De.call(this,l,A)}function oe(A){De.call(this,l,A)}function ce(A){De.call(this,l,A)}function he(A){De.call(this,l,A)}function j(A){Ae[A?"unshift":"push"](()=>{m=A,t(0,m)})}const Me=()=>{w(p)},U=({key:A})=>{A==="ArrowDown"?C(1):A==="ArrowUp"&&C(-1)};function me(A){Ae[A?"unshift":"push"](()=>{m=A,t(0,m)})}const J=()=>{w(p)},y=({key:A})=>{A==="ArrowDown"?C(1):A==="ArrowUp"&&C(-1)};return l.$$set=A=>{e=q(q({},e),re(A)),t(11,s=ee(e,r)),"text"in A&&t(1,d=A.text),"href"in A&&t(2,u=A.href),"primaryFocus"in A&&t(12,b=A.primaryFocus),"disabled"in A&&t(3,g=A.disabled),"hasDivider"in A&&t(4,T=A.hasDivider),"danger"in A&&t(5,_=A.danger),"requireTitle"in A&&t(13,k=A.requireTitle),"id"in A&&t(6,p=A.id),"ref"in A&&t(0,m=A.ref),"$$scope"in A&&t(15,o=A.$$scope)},l.$$.update=()=>{l.$$.dirty&16448&&t(12,b=n===p),l.$$.dirty&8206&&t(7,i={role:"menuitem",tabindex:"-1",class:"bx--overflow-menu-options__btn",disabled:u?void 0:g,href:u||void 0,title:k?f.default?void 0:d:void 0})},[m,d,u,g,T,_,p,i,O,w,C,s,b,k,n,o,a,R,oe,ce,he,j,Me,U,me,J,y]}class ll extends ae{constructor(e){super(),fe(this,e,tl,el,ue,{text:1,href:2,primaryFocus:12,disabled:3,hasDivider:4,danger:5,requireTitle:13,id:6,ref:0})}}const Ne=ll;function il(l){let e,t,i,r,s,n;const a=l[11].default,o=_e(a,l,l[10],null);let f=[l[9],{style:i=l[9].style+"; "+(l[6]&&"position: relative")}],d={};for(let u=0;u<f.length;u+=1)d=q(d,f[u]);return{c(){e=P("div"),t=P("div"),o&&o.c(),this.h()},l(u){e=S(u,"DIV",{style:!0});var b=D(e);t=S(b,"DIV",{});var g=D(t);o&&o.l(g),g.forEach(h),b.forEach(h),this.h()},h(){c(t,"bx--popover-contents",!0),se(e,d),c(e,"bx--popover",!0),c(e,"bx--popover--caret",l[2]),c(e,"bx--popover--light",l[4]),c(e,"bx--popover--high-contrast",l[5]),c(e,"bx--popover--top",l[3]==="top"),c(e,"bx--popover--top-left",l[3]==="top-left"),c(e,"bx--popover--top-right",l[3]==="top-right"),c(e,"bx--popover--bottom",l[3]==="bottom"),c(e,"bx--popover--bottom-left",l[3]==="bottom-left"),c(e,"bx--popover--bottom-right",l[3]==="bottom-right"),c(e,"bx--popover--left",l[3]==="left"),c(e,"bx--popover--left-bottom",l[3]==="left-bottom"),c(e,"bx--popover--left-top",l[3]==="left-top"),c(e,"bx--popover--right",l[3]==="right"),c(e,"bx--popover--right-bottom",l[3]==="right-bottom"),c(e,"bx--popover--right-top",l[3]==="right-top"),c(e,"bx--popover--open",l[0]),c(e,"bx--popover--relative",l[6])},m(u,b){L(u,e,b),I(e,t),o&&o.m(t,null),l[13](e),r=!0,s||(n=F(window,"click",l[12]),s=!0)},p(u,[b]){o&&o.p&&(!r||b&1024)&&ge(o,a,u,u[10],r?pe(a,u[10],b,null):ve(u[10]),null),se(e,d=de(f,[b&512&&u[9],(!r||b&576&&i!==(i=u[9].style+"; "+(u[6]&&"position: relative")))&&{style:i}])),c(e,"bx--popover",!0),c(e,"bx--popover--caret",u[2]),c(e,"bx--popover--light",u[4]),c(e,"bx--popover--high-contrast",u[5]),c(e,"bx--popover--top",u[3]==="top"),c(e,"bx--popover--top-left",u[3]==="top-left"),c(e,"bx--popover--top-right",u[3]==="top-right"),c(e,"bx--popover--bottom",u[3]==="bottom"),c(e,"bx--popover--bottom-left",u[3]==="bottom-left"),c(e,"bx--popover--bottom-right",u[3]==="bottom-right"),c(e,"bx--popover--left",u[3]==="left"),c(e,"bx--popover--left-bottom",u[3]==="left-bottom"),c(e,"bx--popover--left-top",u[3]==="left-top"),c(e,"bx--popover--right",u[3]==="right"),c(e,"bx--popover--right-bottom",u[3]==="right-bottom"),c(e,"bx--popover--right-top",u[3]==="right-top"),c(e,"bx--popover--open",u[0]),c(e,"bx--popover--relative",u[6])},i(u){r||(V(o,u),r=!0)},o(u){B(o,u),r=!1},d(u){u&&h(e),o&&o.d(u),l[13](null),s=!1,n()}}}function rl(l,e,t){const i=["open","closeOnOutsideClick","caret","align","light","highContrast","relative"];let r=ee(e,i),{$$slots:s={},$$scope:n}=e,{open:a=!1}=e,{closeOnOutsideClick:o=!1}=e,{caret:f=!1}=e,{align:d="top"}=e,{light:u=!1}=e,{highContrast:b=!1}=e,{relative:g=!1}=e;const T=dt();let _=null;const k=m=>{a&&(_.contains(m.target)||(T("click:outside",{target:m.target}),o&&t(0,a=!1)))};function p(m){Ae[m?"unshift":"push"](()=>{_=m,t(7,_)})}return l.$$set=m=>{e=q(q({},e),re(m)),t(9,r=ee(e,i)),"open"in m&&t(0,a=m.open),"closeOnOutsideClick"in m&&t(1,o=m.closeOnOutsideClick),"caret"in m&&t(2,f=m.caret),"align"in m&&t(3,d=m.align),"light"in m&&t(4,u=m.light),"highContrast"in m&&t(5,b=m.highContrast),"relative"in m&&t(6,g=m.relative),"$$scope"in m&&t(10,n=m.$$scope)},[a,o,f,d,u,b,g,_,T,r,n,s,k,p]}class nl extends ae{constructor(e){super(),fe(this,e,rl,il,ue,{open:0,closeOnOutsideClick:1,caret:2,align:3,light:4,highContrast:5,relative:6})}}const ol=nl,sl=l=>({}),Je=l=>({});function al(l){let e;return{c(){e=X(l[4])},l(t){e=W(t,l[4])},m(t,i){L(t,e,i)},p(t,i){i&16&&ne(e,t[4])},d(t){t&&h(e)}}}function Ke(l){let e,t,i;var r=l[10][l[2]];function s(n){return{props:{class:"bx--progress-bar__status-icon"}}}return r&&(e=qe(r,s())),{c(){e&&K(e.$$.fragment),t=we()},l(n){e&&te(e.$$.fragment,n),t=we()},m(n,a){e&&x(e,n,a),L(n,t,a),i=!0},p(n,a){if(a&4&&r!==(r=n[10][n[2]])){if(e){Ee();const o=e;B(o.$$.fragment,1,0,()=>{$(o,1)}),Te()}r?(e=qe(r,s()),K(e.$$.fragment),V(e.$$.fragment,1),x(e,t.parentNode,t)):e=null}},i(n){i||(e&&V(e.$$.fragment,n),i=!0)},o(n){e&&B(e.$$.fragment,n),i=!1},d(n){n&&h(t),e&&$(e,n)}}}function xe(l){let e,t;return{c(){e=P("div"),t=X(l[6]),this.h()},l(i){e=S(i,"DIV",{id:!0});var r=D(e);t=W(r,l[6]),r.forEach(h),this.h()},h(){E(e,"id",l[11]),c(e,"bx--progress-bar__helper-text",!0)},m(i,r){L(i,e,r),I(e,t)},p(i,r){r&64&&ne(t,i[6])},d(i){i&&h(e)}}}function fl(l){let e,t,i,r,s,n,a,o,f,d,u,b,g;const T=l[15].labelText,_=_e(T,l,l[14],Je),k=_||al(l);let p=(l[2]==="error"||l[2]==="finished")&&Ke(l),m=l[6]&&xe(l),O=[l[12]],M={};for(let w=0;w<O.length;w+=1)M=q(M,O[w]);return{c(){e=P("div"),t=P("label"),k&&k.c(),i=Q(),p&&p.c(),r=Q(),s=P("div"),n=P("div"),b=Q(),m&&m.c(),this.h()},l(w){e=S(w,"DIV",{});var C=D(e);t=S(C,"LABEL",{for:!0});var R=D(t);k&&k.l(R),i=Z(R),p&&p.l(R),R.forEach(h),r=Z(C),s=S(C,"DIV",{role:!0,id:!0,"aria-busy":!0,"aria-valuemin":!0,"aria-valuemax":!0,"aria-valuenow":!0,"aria-describedby":!0});var oe=D(s);n=S(oe,"DIV",{}),D(n).forEach(h),oe.forEach(h),b=Z(C),m&&m.l(C),C.forEach(h),this.h()},h(){E(t,"for",l[7]),c(t,"bx--progress-bar__label",!0),c(t,"bx--visually-hidden",l[5]),c(n,"bx--progress-bar__bar",!0),ye(n,"transform",l[2]==="active"&&`scaleX(${l[8]/l[0]})`),E(s,"role","progressbar"),E(s,"id",l[7]),E(s,"aria-busy",a=l[2]==="active"),E(s,"aria-valuemin",o=l[9]?void 0:0),E(s,"aria-valuemax",f=l[9]?void 0:l[0]),E(s,"aria-valuenow",d=l[9]?void 0:l[8]),E(s,"aria-describedby",u=l[6]?l[11]:null),c(s,"bx--progress-bar__track",!0),se(e,M),c(e,"bx--progress-bar",!0),c(e,"bx--progress-bar--indeterminate",l[9]),c(e,"bx--progress-bar--big",l[3]==="md"),c(e,"bx--progress-bar--small",l[3]==="sm"),c(e,"bx--progress-bar--inline",l[1]==="inline"),c(e,"bx--progress-bar--indented",l[1]==="indented"),c(e,"bx--progress-bar--error",l[2]==="error"),c(e,"bx--progress-bar--finished",l[2]==="finished")},m(w,C){L(w,e,C),I(e,t),k&&k.m(t,null),I(t,i),p&&p.m(t,null),I(e,r),I(e,s),I(s,n),I(e,b),m&&m.m(e,null),g=!0},p(w,[C]){_?_.p&&(!g||C&16384)&&ge(_,T,w,w[14],g?pe(T,w[14],C,sl):ve(w[14]),Je):k&&k.p&&(!g||C&16)&&k.p(w,g?C:-1),w[2]==="error"||w[2]==="finished"?p?(p.p(w,C),C&4&&V(p,1)):(p=Ke(w),p.c(),V(p,1),p.m(t,null)):p&&(Ee(),B(p,1,1,()=>{p=null}),Te()),(!g||C&128)&&E(t,"for",w[7]),(!g||C&32)&&c(t,"bx--visually-hidden",w[5]),C&261&&ye(n,"transform",w[2]==="active"&&`scaleX(${w[8]/w[0]})`),(!g||C&128)&&E(s,"id",w[7]),(!g||C&4&&a!==(a=w[2]==="active"))&&E(s,"aria-busy",a),(!g||C&512&&o!==(o=w[9]?void 0:0))&&E(s,"aria-valuemin",o),(!g||C&513&&f!==(f=w[9]?void 0:w[0]))&&E(s,"aria-valuemax",f),(!g||C&768&&d!==(d=w[9]?void 0:w[8]))&&E(s,"aria-valuenow",d),(!g||C&64&&u!==(u=w[6]?w[11]:null))&&E(s,"aria-describedby",u),w[6]?m?m.p(w,C):(m=xe(w),m.c(),m.m(e,null)):m&&(m.d(1),m=null),se(e,M=de(O,[C&4096&&w[12]])),c(e,"bx--progress-bar",!0),c(e,"bx--progress-bar--indeterminate",w[9]),c(e,"bx--progress-bar--big",w[3]==="md"),c(e,"bx--progress-bar--small",w[3]==="sm"),c(e,"bx--progress-bar--inline",w[1]==="inline"),c(e,"bx--progress-bar--indented",w[1]==="indented"),c(e,"bx--progress-bar--error",w[2]==="error"),c(e,"bx--progress-bar--finished",w[2]==="finished")},i(w){g||(V(k,w),V(p),g=!0)},o(w){B(k,w),B(p),g=!1},d(w){w&&h(e),k&&k.d(w),p&&p.d(),m&&m.d()}}}function ul(l,e,t){let i;const r=["value","max","kind","status","size","labelText","hideLabel","helperText","id"];let s=ee(e,r),{$$slots:n={},$$scope:a}=e,{value:o=void 0}=e,{max:f=100}=e,{kind:d="default"}=e,{status:u="active"}=e,{size:b="md"}=e,{labelText:g=""}=e,{hideLabel:T=!1}=e,{helperText:_=""}=e,{id:k="ccs-"+Math.random().toString(36)}=e;const p={error:Mt,finished:zt};let m="ccs-"+Math.random().toString(36),O;return l.$$set=M=>{e=q(q({},e),re(M)),t(12,s=ee(e,r)),"value"in M&&t(13,o=M.value),"max"in M&&t(0,f=M.max),"kind"in M&&t(1,d=M.kind),"status"in M&&t(2,u=M.status),"size"in M&&t(3,b=M.size),"labelText"in M&&t(4,g=M.labelText),"hideLabel"in M&&t(5,T=M.hideLabel),"helperText"in M&&t(6,_=M.helperText),"id"in M&&t(7,k=M.id),"$$scope"in M&&t(14,a=M.$$scope)},l.$$.update=()=>{l.$$.dirty&8196&&t(9,i=o===void 0&&u==="active"),l.$$.dirty&8197&&(u==="error"||o<0?t(8,O=0):o>f?t(8,O=f):t(8,O=o))},[f,d,u,b,g,T,_,k,O,i,p,m,s,o,a,n]}class dl extends ae{constructor(e){super(),fe(this,e,ul,fl,ue,{value:13,max:0,kind:1,status:2,size:3,labelText:4,hideLabel:5,helperText:6,id:7})}}const cl=dl;class hl{static login(e){return Ue(Ye,{method:"GET",url:"/google/login",query:{origin_url:e},errors:{422:"Validation Error"}})}static auth(){return Ue(Ye,{method:"GET",url:"/google/auth"})}static logout(){return Ue(Ye,{method:"GET",url:"/google/logout"})}}function $e(l){let e,t;return{c(){e=Y("title"),t=X(l[1])},l(i){e=G(i,"title",{});var r=D(e);t=W(r,l[1]),r.forEach(h)},m(i,r){L(i,e,r),I(e,t)},p(i,r){r&2&&ne(t,i[1])},d(i){i&&h(e)}}}function ml(l){let e,t,i=l[1]&&$e(l),r=[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},{width:l[0]},{height:l[0]},l[2],l[3]],s={};for(let n=0;n<r.length;n+=1)s=q(s,r[n]);return{c(){e=Y("svg"),i&&i.c(),t=Y("path"),this.h()},l(n){e=G(n,"svg",{xmlns:!0,viewBox:!0,fill:!0,preserveAspectRatio:!0,width:!0,height:!0});var a=D(e);i&&i.l(a),t=G(a,"path",{d:!0}),D(t).forEach(h),a.forEach(h),this.h()},h(){E(t,"d","M13 24L4 15 5.414 13.586 13 21.171 26.586 7.586 28 9 13 24z"),ke(e,s)},m(n,a){L(n,e,a),i&&i.m(e,null),I(e,t)},p(n,[a]){n[1]?i?i.p(n,a):(i=$e(n),i.c(),i.m(e,t)):i&&(i.d(1),i=null),ke(e,s=de(r,[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},a&1&&{width:n[0]},a&1&&{height:n[0]},a&4&&n[2],a&8&&n[3]]))},i:le,o:le,d(n){n&&h(e),i&&i.d()}}}function bl(l,e,t){let i,r;const s=["size","title"];let n=ee(e,s),{size:a=16}=e,{title:o=void 0}=e;return l.$$set=f=>{t(5,e=q(q({},e),re(f))),t(3,n=ee(e,s)),"size"in f&&t(0,a=f.size),"title"in f&&t(1,o=f.title)},l.$$.update=()=>{t(4,i=e["aria-label"]||e["aria-labelledby"]||o),t(2,r={"aria-hidden":i?void 0:!0,role:i?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=re(e),[a,o,r,n,i]}class _l extends ae{constructor(e){super(),fe(this,e,bl,ml,ue,{size:0,title:1})}}function et(l){let e,t;return{c(){e=Y("title"),t=X(l[1])},l(i){e=G(i,"title",{});var r=D(e);t=W(r,l[1]),r.forEach(h)},m(i,r){L(i,e,r),I(e,t)},p(i,r){r&2&&ne(t,i[1])},d(i){i&&h(e)}}}function gl(l){let e,t,i,r,s=l[1]&&et(l),n=[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},{width:l[0]},{height:l[0]},l[2],l[3]],a={};for(let o=0;o<n.length;o+=1)a=q(a,n[o]);return{c(){e=Y("svg"),s&&s.c(),t=Y("path"),i=Y("circle"),r=Y("path"),this.h()},l(o){e=G(o,"svg",{xmlns:!0,viewBox:!0,fill:!0,preserveAspectRatio:!0,width:!0,height:!0});var f=D(e);s&&s.l(f),t=G(f,"path",{d:!0}),D(t).forEach(h),i=G(f,"circle",{cx:!0,cy:!0,r:!0}),D(i).forEach(h),r=G(f,"path",{d:!0}),D(r).forEach(h),f.forEach(h),this.h()},h(){E(t,"d","M16,2A14,14,0,1,0,30,16,14,14,0,0,0,16,2Zm0,26A12,12,0,1,1,28,16,12,12,0,0,1,16,28Z"),E(i,"cx","16"),E(i,"cy","23.5"),E(i,"r","1.5"),E(r,"d","M17,8H15.5A4.49,4.49,0,0,0,11,12.5V13h2v-.5A2.5,2.5,0,0,1,15.5,10H17a2.5,2.5,0,0,1,0,5H15v4.5h2V17a4.5,4.5,0,0,0,0-9Z"),ke(e,a)},m(o,f){L(o,e,f),s&&s.m(e,null),I(e,t),I(e,i),I(e,r)},p(o,[f]){o[1]?s?s.p(o,f):(s=et(o),s.c(),s.m(e,t)):s&&(s.d(1),s=null),ke(e,a=de(n,[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},f&1&&{width:o[0]},f&1&&{height:o[0]},f&4&&o[2],f&8&&o[3]]))},i:le,o:le,d(o){o&&h(e),s&&s.d()}}}function vl(l,e,t){let i,r;const s=["size","title"];let n=ee(e,s),{size:a=16}=e,{title:o=void 0}=e;return l.$$set=f=>{t(5,e=q(q({},e),re(f))),t(3,n=ee(e,s)),"size"in f&&t(0,a=f.size),"title"in f&&t(1,o=f.title)},l.$$.update=()=>{t(4,i=e["aria-label"]||e["aria-labelledby"]||o),t(2,r={"aria-hidden":i?void 0:!0,role:i?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=re(e),[a,o,r,n,i]}class pl extends ae{constructor(e){super(),fe(this,e,vl,gl,ue,{size:0,title:1})}}function tt(l){let e,t;return{c(){e=Y("title"),t=X(l[1])},l(i){e=G(i,"title",{});var r=D(e);t=W(r,l[1]),r.forEach(h)},m(i,r){L(i,e,r),I(e,t)},p(i,r){r&2&&ne(t,i[1])},d(i){i&&h(e)}}}function kl(l){let e,t,i=l[1]&&tt(l),r=[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},{width:l[0]},{height:l[0]},l[2],l[3]],s={};for(let n=0;n<r.length;n+=1)s=q(s,r[n]);return{c(){e=Y("svg"),i&&i.c(),t=Y("path"),this.h()},l(n){e=G(n,"svg",{xmlns:!0,viewBox:!0,fill:!0,preserveAspectRatio:!0,width:!0,height:!0});var a=D(e);i&&i.l(a),t=G(a,"path",{d:!0}),D(t).forEach(h),a.forEach(h),this.h()},h(){E(t,"d","M28,4H4C2.9,4,2,4.9,2,6v20c0,1.1,0.9,2,2,2h24c1.1,0,2-0.9,2-2V6C30,4.9,29.1,4,28,4z M10,26H4V6h6V26z M28,26H12v-9h10.2 l-3.6,3.6L20,22l6-6l-6-6l-1.4,1.4l3.6,3.6H12V6h16V26z"),ke(e,s)},m(n,a){L(n,e,a),i&&i.m(e,null),I(e,t)},p(n,[a]){n[1]?i?i.p(n,a):(i=tt(n),i.c(),i.m(e,t)):i&&(i.d(1),i=null),ke(e,s=de(r,[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},a&1&&{width:n[0]},a&1&&{height:n[0]},a&4&&n[2],a&8&&n[3]]))},i:le,o:le,d(n){n&&h(e),i&&i.d()}}}function wl(l,e,t){let i,r;const s=["size","title"];let n=ee(e,s),{size:a=16}=e,{title:o=void 0}=e;return l.$$set=f=>{t(5,e=q(q({},e),re(f))),t(3,n=ee(e,s)),"size"in f&&t(0,a=f.size),"title"in f&&t(1,o=f.title)},l.$$.update=()=>{t(4,i=e["aria-label"]||e["aria-labelledby"]||o),t(2,r={"aria-hidden":i?void 0:!0,role:i?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=re(e),[a,o,r,n,i]}class El extends ae{constructor(e){super(),fe(this,e,wl,kl,ue,{size:0,title:1})}}const Tl=Ct(hl.logout,{onSuccess:()=>{Ge.invalidateQueries([Ot]),Ge.invalidateQueries([At]),Ge.invalidateQueries([Vt])}});function lt(l,e,t){const i=l.slice();i[13]=e[t][0],i[14]=e[t][1];const r=i[14].step_progress==null?void 0:i[14].step_progress;return i[15]=r,i}function it(l){let e,t,i,r,s,n,a,o,f,d,u,b,g;const T=[Ml,Dl,Il],_=[];function k(m,O){return m[5].length?0:m[4].length?1:2}r=k(l),s=_[r]=T[r](l);let p=l[5].length===1&&rt(l);return o=new ol({props:{align:"bottom-right",caret:!0,closeOnOutsideClick:!0,open:l[1],$$slots:{default:[zl]},$$scope:{ctx:l}}}),o.$on("click:outside",l[11]),{c(){e=P("div"),t=P("button"),i=P("div"),s.c(),n=Q(),p&&p.c(),a=Q(),K(o.$$.fragment),this.h()},l(m){e=S(m,"DIV",{});var O=D(e);t=S(O,"BUTTON",{class:!0});var M=D(t);i=S(M,"DIV",{class:!0});var w=D(i);s.l(w),w.forEach(h),n=Z(M),p&&p.l(M),a=Z(M),te(o.$$.fragment,M),M.forEach(h),O.forEach(h),this.h()},h(){E(i,"class","relative z-10 flex gap-x-2"),t.disabled=f=!l[2],E(t,"class","task-button relative h-8 rounded border p-2 transition"),c(t,"opacity-40",!l[2]),c(t,"bg-white",!l[5].length),c(t,"bg-blue-200",l[5].length),c(t,"border-blue-400",l[5].length)},m(m,O){L(m,e,O),I(e,t),I(t,i),_[r].m(i,null),I(t,n),p&&p.m(t,null),I(t,a),x(o,t,null),u=!0,b||(g=[F(t,"click",wt(l[12])),je(d=Fe.call(null,e,{text:l[2]?"":"User does not have access to run tasks."}))],b=!0)},p(m,O){let M=r;r=k(m),r===M?_[r].p(m,O):(Ee(),B(_[M],1,1,()=>{_[M]=null}),Te(),s=_[r],s?s.p(m,O):(s=_[r]=T[r](m),s.c()),V(s,1),s.m(i,null)),m[5].length===1?p?p.p(m,O):(p=rt(m),p.c(),p.m(t,a)):p&&(p.d(1),p=null);const w={};O&2&&(w.open=m[1]),O&262145&&(w.$$scope={dirty:O,ctx:m}),o.$set(w),(!u||O&4&&f!==(f=!m[2]))&&(t.disabled=f),(!u||O&4)&&c(t,"opacity-40",!m[2]),(!u||O&32)&&c(t,"bg-white",!m[5].length),(!u||O&32)&&c(t,"bg-blue-200",m[5].length),(!u||O&32)&&c(t,"border-blue-400",m[5].length),d&&ht(d.update)&&O&4&&d.update.call(null,{text:m[2]?"":"User does not have access to run tasks."})},i(m){u||(V(s),V(o.$$.fragment,m),u=!0)},o(m){B(s),B(o.$$.fragment,m),u=!1},d(m){m&&h(e),_[r].d(),p&&p.d(),$(o),b=!1,Ve(g)}}}function Il(l){let e,t,i;return t=new _l({}),{c(){e=X("Tasks "),K(t.$$.fragment)},l(r){e=W(r,"Tasks "),te(t.$$.fragment,r)},m(r,s){L(r,e,s),x(t,r,s),i=!0},p:le,i(r){i||(V(t.$$.fragment,r),i=!0)},o(r){B(t.$$.fragment,r),i=!1},d(r){r&&h(e),$(t,r)}}}function Dl(l){let e=l[4].length+"",t,i,r=l[4].length>1?"s":"",s;return{c(){t=X(e),i=X(" failed task"),s=X(r)},l(n){t=W(n,e),i=W(n," failed task"),s=W(n,r)},m(n,a){L(n,t,a),L(n,i,a),L(n,s,a)},p(n,a){a&16&&e!==(e=n[4].length+"")&&ne(t,e),a&16&&r!==(r=n[4].length>1?"s":"")&&ne(s,r)},i:le,o:le,d(n){n&&h(t),n&&h(i),n&&h(s)}}}function Ml(l){let e=l[5].length+"",t,i,r=l[5].length>1?"s":"",s,n,a,o;return a=new Bt({props:{withOverlay:!1,small:!0}}),{c(){t=X(e),i=X(" running task"),s=X(r),n=X("... "),K(a.$$.fragment)},l(f){t=W(f,e),i=W(f," running task"),s=W(f,r),n=W(f,"... "),te(a.$$.fragment,f)},m(f,d){L(f,t,d),L(f,i,d),L(f,s,d),L(f,n,d),x(a,f,d),o=!0},p(f,d){(!o||d&32)&&e!==(e=f[5].length+"")&&ne(t,e),(!o||d&32)&&r!==(r=f[5].length>1?"s":"")&&ne(s,r)},i(f){o||(V(a.$$.fragment,f),o=!0)},o(f){B(a.$$.fragment,f),o=!1},d(f){f&&h(t),f&&h(i),f&&h(s),f&&h(n),$(a,f)}}}function rt(l){let e,t=`${l[3]*100}%`;return{c(){e=P("div"),this.h()},l(i){e=S(i,"DIV",{class:!0}),D(e).forEach(h),this.h()},h(){E(e,"class","absolute left-0 top-0 z-0 h-full bg-blue-400 transition"),ye(e,"width",t)},m(i,r){L(i,e,r)},p(i,r){r&8&&t!==(t=`${i[3]*100}%`)&&ye(e,"width",t)},d(i){i&&h(e)}}}function nt(l,e){let t,i,r,s=e[14].name+"",n,a,o,f,d,u;return f=new cl({props:{labelText:e[14].message||"",helperText:e[14].status!="completed"?e[14].details:"",value:e[14].status==="completed"?1:e[15],max:1,size:"sm",status:e[7][e[14].status]}}),{key:l,first:null,c(){t=P("div"),i=P("div"),r=P("div"),n=X(s),a=Q(),o=P("div"),K(f.$$.fragment),d=Q(),this.h()},l(b){t=S(b,"DIV",{class:!0});var g=D(t);i=S(g,"DIV",{class:!0});var T=D(i);r=S(T,"DIV",{class:!0});var _=D(r);n=W(_,s),_.forEach(h),T.forEach(h),a=Z(g),o=S(g,"DIV",{class:!0});var k=D(o);te(f.$$.fragment,k),k.forEach(h),d=Z(g),g.forEach(h),this.h()},h(){E(r,"class","mr-2"),E(i,"class","text-s flex flex-row"),E(o,"class","progress-container mt-3"),E(t,"class","relative border-b-2 border-slate-200 p-4 text-left last:border-b-0"),this.first=t},m(b,g){L(b,t,g),I(t,i),I(i,r),I(r,n),I(t,a),I(t,o),x(f,o,null),I(t,d),u=!0},p(b,g){e=b,(!u||g&1)&&s!==(s=e[14].name+"")&&ne(n,s);const T={};g&1&&(T.labelText=e[14].message||""),g&1&&(T.helperText=e[14].status!="completed"?e[14].details:""),g&1&&(T.value=e[14].status==="completed"?1:e[15]),g&1&&(T.status=e[7][e[14].status]),f.$set(T)},i(b){u||(V(f.$$.fragment,b),u=!0)},o(b){B(f.$$.fragment,b),u=!1},d(b){b&&h(t),$(f)}}}function zl(l){let e,t=[],i=new Map,r,s=l[0];const n=a=>a[13];for(let a=0;a<s.length;a+=1){let o=lt(l,s,a),f=n(o);i.set(f,t[a]=nt(f,o))}return{c(){e=P("div");for(let a=0;a<t.length;a+=1)t[a].c();this.h()},l(a){e=S(a,"DIV",{class:!0});var o=D(e);for(let f=0;f<t.length;f+=1)t[f].l(o);o.forEach(h),this.h()},h(){E(e,"class","flex flex-col")},m(a,o){L(a,e,o);for(let f=0;f<t.length;f+=1)t[f]&&t[f].m(e,null);r=!0},p(a,o){o&129&&(s=a[0],Ee(),t=Et(t,o,n,1,a,s,i,e,Tt,nt,null,lt),Te())},i(a){if(!r){for(let o=0;o<s.length;o+=1)V(t[o]);r=!0}},o(a){for(let o=0;o<t.length;o+=1)B(t[o]);r=!1},d(a){a&&h(e);for(let o=0;o<t.length;o+=1)t[o].d()}}}function Cl(l){let e,t,i=l[2]&&it(l);return{c(){i&&i.c(),e=we()},l(r){i&&i.l(r),e=we()},m(r,s){i&&i.m(r,s),L(r,e,s),t=!0},p(r,[s]){r[2]?i?(i.p(r,s),s&4&&V(i,1)):(i=it(r),i.c(),V(i,1),i.m(e.parentNode,e)):i&&(Ee(),B(i,1,1,()=>{i=null}),Te())},i(r){t||(V(i),t=!0)},o(r){B(i),t=!1},d(r){i&&i.d(r),r&&h(e)}}}function Ol(l,e,t){let i,r,s,n,a,o,f;const d=Rt();Ce(l,d,k=>t(10,f=k));let u=!1;const b={pending:"active",completed:"finished",error:"error"},g=mt();Ce(l,g,k=>t(9,o=k));const T=()=>{u&&t(1,u=!1)},_=()=>t(1,u=!u);return l.$$.update=()=>{var k,p,m,O;l.$$.dirty&1024&&t(0,i=Object.entries(((k=f.data)==null?void 0:k.tasks)||{}).sort(([,M],[,w])=>Date.parse(w.start_timestamp)-Date.parse(M.start_timestamp))),l.$$.dirty&1&&t(5,r=i.filter(([,M])=>M.status==="pending")),l.$$.dirty&1&&t(4,s=i.filter(([,M])=>M.status==="error")),l.$$.dirty&1024&&t(3,n=((p=f.data)==null?void 0:p.progress)||0),l.$$.dirty&512&&t(2,a=((m=o.data)==null?void 0:m.access.dataset.compute_signals)||((O=o.data)==null?void 0:O.access.create_dataset))},[i,u,a,n,s,r,d,b,g,o,f,T,_]}class Al extends ae{constructor(e){super(),fe(this,e,Ol,Cl,ue,{})}}const Vl=l=>({}),ot=l=>({}),Rl=l=>({}),st=l=>({}),Bl=l=>({}),at=l=>({});function Ll(l){let e,t,i,r,s,n;return e=new Ne({props:{href:"https://lilacml.com",text:"Documentation"}}),i=new Ne({props:{href:"https://discord.gg/YpGxQMyk",text:"Discord"}}),s=new Ne({props:{href:"https://github.com/lilacai/lilac/issues/new",text:"File a bug"}}),{c(){K(e.$$.fragment),t=Q(),K(i.$$.fragment),r=Q(),K(s.$$.fragment)},l(a){te(e.$$.fragment,a),t=Z(a),te(i.$$.fragment,a),r=Z(a),te(s.$$.fragment,a)},m(a,o){x(e,a,o),L(a,t,o),x(i,a,o),L(a,r,o),x(s,a,o),n=!0},p:le,i(a){n||(V(e.$$.fragment,a),V(i.$$.fragment,a),V(s.$$.fragment,a),n=!0)},o(a){B(e.$$.fragment,a),B(i.$$.fragment,a),B(s.$$.fragment,a),n=!1},d(a){$(e,a),a&&h(t),$(i,a),a&&h(r),$(s,a)}}}function ft(l){let e,t,i,r;const s=[Sl,Pl],n=[];function a(o,f){var d;return((d=o[2].data)==null?void 0:d.user)!=null?0:1}return e=a(l),t=n[e]=s[e](l),{c(){t.c(),i=we()},l(o){t.l(o),i=we()},m(o,f){n[e].m(o,f),L(o,i,f),r=!0},p(o,f){let d=e;e=a(o),e===d?n[e].p(o,f):(Ee(),B(n[d],1,1,()=>{n[d]=null}),Te(),t=n[e],t?t.p(o,f):(t=n[e]=s[e](o),t.c()),V(t,1),t.m(i.parentNode,i))},i(o){r||(V(t),r=!0)},o(o){B(t),r=!1},d(o){n[e].d(o),o&&h(i)}}}function Pl(l){let e,t;return e=new St({props:{size:"small",href:l[4],target:l[7],$$slots:{default:[Nl]},$$scope:{ctx:l}}}),{c(){K(e.$$.fragment)},l(i){te(e.$$.fragment,i)},m(i,r){x(e,i,r),t=!0},p(i,r){const s={};r&1024&&(s.$$scope={dirty:r,ctx:i}),e.$set(s)},i(i){t||(V(e.$$.fragment,i),t=!0)},o(i){B(e.$$.fragment,i),t=!1},d(i){$(e,i)}}}function Sl(l){var b;let e,t,i=((b=l[2].data)==null?void 0:b.user.given_name)+"",r,s,n,a,o,f,d,u;return o=new bt({props:{flipped:!0,$$slots:{default:[ql]},$$scope:{ctx:l}}}),{c(){e=P("div"),t=P("div"),r=X(i),n=Q(),a=P("div"),K(o.$$.fragment),this.h()},l(g){e=S(g,"DIV",{class:!0});var T=D(e);t=S(T,"DIV",{class:!0});var _=D(t);r=W(_,i),_.forEach(h),n=Z(T),a=S(T,"DIV",{});var k=D(a);te(o.$$.fragment,k),k.forEach(h),T.forEach(h),this.h()},h(){E(t,"class","ml-2 mr-1 flex"),E(e,"class","flex h-9 flex-row items-center rounded border border-neutral-200")},m(g,T){var _,k;L(g,e,T),I(e,t),I(t,r),I(e,n),I(e,a),x(o,a,null),f=!0,d||(u=je(s=Fe.call(null,t,{text:`Logged into Google as ${(_=l[2].data)==null?void 0:_.user.name} with email ${(k=l[2].data)==null?void 0:k.user.email}`})),d=!0)},p(g,T){var k,p,m;(!f||T&4)&&i!==(i=((k=g[2].data)==null?void 0:k.user.given_name)+"")&&ne(r,i),s&&ht(s.update)&&T&4&&s.update.call(null,{text:`Logged into Google as ${(p=g[2].data)==null?void 0:p.user.name} with email ${(m=g[2].data)==null?void 0:m.user.email}`});const _={};T&1024&&(_.$$scope={dirty:T,ctx:g}),o.$set(_)},i(g){f||(V(o.$$.fragment,g),f=!0)},o(g){B(o.$$.fragment,g),f=!1},d(g){g&&h(e),$(o),d=!1,u()}}}function Nl(l){let e;return{c(){e=X("Login")},l(t){e=W(t,"Login")},m(t,i){L(t,e,i)},d(t){t&&h(e)}}}function ql(l){let e,t;return e=new Ne({props:{class:"optionOne",text:"Logout"}}),e.$on("click",l[6]),{c(){K(e.$$.fragment)},l(i){te(e.$$.fragment,i)},m(i,r){x(e,i,r),t=!0},p:le,i(i){t||(V(e.$$.fragment,i),t=!0)},o(i){B(e.$$.fragment,i),t=!1},d(i){$(e,i)}}}function yl(l){var Re;let e,t,i,r,s,n,a,o,f,d,u,b,g,T,_,k,p,m,O,M,w,C,R,oe,ce;r=new El({});const he=l[8]["header-subtext"],j=_e(he,l,l[10],at),Me=l[8]["header-center"],U=_e(Me,l,l[10],st),me=l[8]["header-right"],J=_e(me,l,l[10],ot);_=new bt({props:{flipped:!0,icon:pl,$$slots:{default:[Ll]},$$scope:{ctx:l}}}),p=new Al({});let y=((Re=l[2].data)==null?void 0:Re.auth_enabled)&&ft(l);const A=l[8].default,ie=_e(A,l,l[10],null);return C=new Lt({}),{c(){e=P("div"),t=P("div"),i=P("button"),K(r.$$.fragment),s=Q(),n=P("div"),a=P("div"),o=P("div"),j&&j.c(),f=Q(),d=P("div"),U&&U.c(),u=Q(),b=P("div"),J&&J.c(),g=Q(),T=P("div"),K(_.$$.fragment),k=Q(),K(p.$$.fragment),m=Q(),y&&y.c(),O=Q(),M=P("div"),ie&&ie.c(),w=Q(),K(C.$$.fragment),this.h()},l(z){e=S(z,"DIV",{class:!0});var H=D(e);t=S(H,"DIV",{class:!0});var Ie=D(t);i=S(Ie,"BUTTON",{class:!0});var Oe=D(i);te(r.$$.fragment,Oe),Oe.forEach(h),s=Z(Ie),n=S(Ie,"DIV",{class:!0});var ze=D(n);a=S(ze,"DIV",{class:!0});var Be=D(a);o=S(Be,"DIV",{});var Le=D(o);j&&j.l(Le),Le.forEach(h),Be.forEach(h),f=Z(ze),d=S(ze,"DIV",{class:!0});var v=D(d);U&&U.l(v),v.forEach(h),u=Z(ze),b=S(ze,"DIV",{class:!0});var N=D(b);J&&J.l(N),g=Z(N),T=S(N,"DIV",{});var be=D(T);te(_.$$.fragment,be),be.forEach(h),k=Z(N),te(p.$$.fragment,N),m=Z(N),y&&y.l(N),N.forEach(h),ze.forEach(h),Ie.forEach(h),O=Z(H),M=S(H,"DIV",{class:!0});var Pe=D(M);ie&&ie.l(Pe),Pe.forEach(h),w=Z(H),te(C.$$.fragment,H),H.forEach(h),this.h()},h(){E(i,"class","opacity-60 hover:bg-gray-200"),c(i,"invisible",l[1].open),E(a,"class","flex flex-row items-center"),E(d,"class","flex-grow flex-row items-center justify-center"),E(b,"class","flex flex-row items-center gap-x-2"),E(n,"class","flex flex-grow flex-row items-center justify-between justify-items-center gap-x-4 py-2 pr-4"),E(t,"class","header flex w-full flex-initial flex-row items-center justify-between justify-items-center border-b border-gray-200"),E(M,"class","relative flex h-full w-full overflow-hidden"),E(e,"class","flex h-full w-full flex-col")},m(z,H){L(z,e,H),I(e,t),I(t,i),x(r,i,null),I(t,s),I(t,n),I(n,a),I(a,o),j&&j.m(o,null),I(n,f),I(n,d),U&&U.m(d,null),I(n,u),I(n,b),J&&J.m(b,null),I(b,g),I(b,T),x(_,T,null),I(b,k),x(p,b,null),I(b,m),y&&y.m(b,null),I(e,O),I(e,M),ie&&ie.m(M,null),I(e,w),x(C,e,null),R=!0,oe||(ce=[je(Fe.call(null,i,{text:"Open sidebar"})),F(i,"click",l[9])],oe=!0)},p(z,[H]){var Oe;(!R||H&2)&&c(i,"invisible",z[1].open),j&&j.p&&(!R||H&1024)&&ge(j,he,z,z[10],R?pe(he,z[10],H,Bl):ve(z[10]),at),U&&U.p&&(!R||H&1024)&&ge(U,Me,z,z[10],R?pe(Me,z[10],H,Rl):ve(z[10]),st),J&&J.p&&(!R||H&1024)&&ge(J,me,z,z[10],R?pe(me,z[10],H,Vl):ve(z[10]),ot);const Ie={};H&1024&&(Ie.$$scope={dirty:H,ctx:z}),_.$set(Ie),(Oe=z[2].data)!=null&&Oe.auth_enabled?y?(y.p(z,H),H&4&&V(y,1)):(y=ft(z),y.c(),V(y,1),y.m(b,null)):y&&(Ee(),B(y,1,1,()=>{y=null}),Te()),ie&&ie.p&&(!R||H&1024)&&ge(ie,A,z,z[10],R?pe(A,z[10],H,null):ve(z[10]),null)},i(z){R||(V(r.$$.fragment,z),V(j,z),V(U,z),V(J,z),V(_.$$.fragment,z),V(p.$$.fragment,z),V(y),V(ie,z),V(C.$$.fragment,z),R=!0)},o(z){B(r.$$.fragment,z),B(j,z),B(U,z),B(J,z),B(_.$$.fragment,z),B(p.$$.fragment,z),B(y),B(ie,z),B(C.$$.fragment,z),R=!1},d(z){z&&h(e),$(r),j&&j.d(z),U&&U.d(z),J&&J.d(z),$(_),$(p),y&&y.d(),ie&&ie.d(z),$(C),oe=!1,Ve(ce)}}}function Hl(l,e,t){let i,r,s,n=le,a=()=>(n(),n=It(i,O=>t(1,s=O)),i),o;l.$$.on_destroy.push(()=>n());let{$$slots:f={},$$scope:d}=e;const u=mt();Ce(l,u,O=>t(2,o=O));const b=location.origin,g=`${b}/google/login?origin_url=${b}`,T=Tl();Ce(l,T,O=>t(11,r=O));function _(){r.mutate([])}const p=window.self!==window.top?"_blank":"",m=()=>Dt(i,s.open=!0,s);return l.$$set=O=>{"$$scope"in O&&t(10,d=O.$$scope)},a(t(0,i=Pt())),[i,s,o,u,g,T,_,p,f,m,d]}class jl extends ae{constructor(e){super(),fe(this,e,Hl,yl,ue,{})}}export{_l as C,bt as O,jl as P,Ne as a,cl as b};
lilac/web/_app/immutable/chunks/Page.b01ef977.js ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ import{S as ae,i as fe,s as ue,E as q,Z as Y,_ as G,m as D,h,n as E,$ as ke,b as L,a0 as I,L as de,a1 as le,N as ee,Q as re,q as X,r as W,u as ne,D as _e,ap as _t,e as we,a as Q,k as P,aq as gt,ar as vt,c as Z,l as S,F as se,G as c,H as j,I as ge,J as ve,K as pe,g as V,v as Ee,d as B,f as Te,M as Ve,ai as ut,C as dt,O as Ce,P as pt,j as ct,x as qe,y as K,z as te,A as x,B as $,R as De,w as Ae,ah as kt,p as ye,ad as wt,a7 as Fe,aa as ht,W as Et,X as Tt,ab as It,a8 as Dt}from"./index.b7741aa8.js";import{aV as Mt,aW as zt,aX as Ue,aY as Ye,aZ as Ct,j as Ge,a_ as Ot,a$ as At,b0 as Vt,q as Rt,b as mt,h as je,b1 as Bt,b2 as Lt,g as Pt,B as St}from"./Commands.539ca0ee.js";import{w as Se}from"./index.d3776286.js";function Qe(l){let e,t;return{c(){e=Y("title"),t=X(l[1])},l(i){e=G(i,"title",{});var r=D(e);t=W(r,l[1]),r.forEach(h)},m(i,r){L(i,e,r),I(e,t)},p(i,r){r&2&&ne(t,i[1])},d(i){i&&h(e)}}}function Nt(l){let e,t,i,r,s=l[1]&&Qe(l),n=[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},{width:l[0]},{height:l[0]},l[2],l[3]],a={};for(let o=0;o<n.length;o+=1)a=q(a,n[o]);return{c(){e=Y("svg"),s&&s.c(),t=Y("circle"),i=Y("circle"),r=Y("circle"),this.h()},l(o){e=G(o,"svg",{xmlns:!0,viewBox:!0,fill:!0,preserveAspectRatio:!0,width:!0,height:!0});var f=D(e);s&&s.l(f),t=G(f,"circle",{cx:!0,cy:!0,r:!0}),D(t).forEach(h),i=G(f,"circle",{cx:!0,cy:!0,r:!0}),D(i).forEach(h),r=G(f,"circle",{cx:!0,cy:!0,r:!0}),D(r).forEach(h),f.forEach(h),this.h()},h(){E(t,"cx","16"),E(t,"cy","8"),E(t,"r","2"),E(i,"cx","16"),E(i,"cy","16"),E(i,"r","2"),E(r,"cx","16"),E(r,"cy","24"),E(r,"r","2"),ke(e,a)},m(o,f){L(o,e,f),s&&s.m(e,null),I(e,t),I(e,i),I(e,r)},p(o,[f]){o[1]?s?s.p(o,f):(s=Qe(o),s.c(),s.m(e,t)):s&&(s.d(1),s=null),ke(e,a=de(n,[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},f&1&&{width:o[0]},f&1&&{height:o[0]},f&4&&o[2],f&8&&o[3]]))},i:le,o:le,d(o){o&&h(e),s&&s.d()}}}function qt(l,e,t){let i,r;const s=["size","title"];let n=ee(e,s),{size:a=16}=e,{title:o=void 0}=e;return l.$$set=f=>{t(5,e=q(q({},e),re(f))),t(3,n=ee(e,s)),"size"in f&&t(0,a=f.size),"title"in f&&t(1,o=f.title)},l.$$.update=()=>{t(4,i=e["aria-label"]||e["aria-labelledby"]||o),t(2,r={"aria-hidden":i?void 0:!0,role:i?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=re(e),[a,o,r,n,i]}class yt extends ae{constructor(e){super(),fe(this,e,qt,Nt,ue,{size:0,title:1})}}const Ht=yt;function Ze(l){let e,t;return{c(){e=Y("title"),t=X(l[1])},l(i){e=G(i,"title",{});var r=D(e);t=W(r,l[1]),r.forEach(h)},m(i,r){L(i,e,r),I(e,t)},p(i,r){r&2&&ne(t,i[1])},d(i){i&&h(e)}}}function Ut(l){let e,t,i,r,s=l[1]&&Ze(l),n=[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},{width:l[0]},{height:l[0]},l[2],l[3]],a={};for(let o=0;o<n.length;o+=1)a=q(a,n[o]);return{c(){e=Y("svg"),s&&s.c(),t=Y("circle"),i=Y("circle"),r=Y("circle"),this.h()},l(o){e=G(o,"svg",{xmlns:!0,viewBox:!0,fill:!0,preserveAspectRatio:!0,width:!0,height:!0});var f=D(e);s&&s.l(f),t=G(f,"circle",{cx:!0,cy:!0,r:!0}),D(t).forEach(h),i=G(f,"circle",{cx:!0,cy:!0,r:!0}),D(i).forEach(h),r=G(f,"circle",{cx:!0,cy:!0,r:!0}),D(r).forEach(h),f.forEach(h),this.h()},h(){E(t,"cx","8"),E(t,"cy","16"),E(t,"r","2"),E(i,"cx","16"),E(i,"cy","16"),E(i,"r","2"),E(r,"cx","24"),E(r,"cy","16"),E(r,"r","2"),ke(e,a)},m(o,f){L(o,e,f),s&&s.m(e,null),I(e,t),I(e,i),I(e,r)},p(o,[f]){o[1]?s?s.p(o,f):(s=Ze(o),s.c(),s.m(e,t)):s&&(s.d(1),s=null),ke(e,a=de(n,[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},f&1&&{width:o[0]},f&1&&{height:o[0]},f&4&&o[2],f&8&&o[3]]))},i:le,o:le,d(o){o&&h(e),s&&s.d()}}}function Yt(l,e,t){let i,r;const s=["size","title"];let n=ee(e,s),{size:a=16}=e,{title:o=void 0}=e;return l.$$set=f=>{t(5,e=q(q({},e),re(f))),t(3,n=ee(e,s)),"size"in f&&t(0,a=f.size),"title"in f&&t(1,o=f.title)},l.$$.update=()=>{t(4,i=e["aria-label"]||e["aria-labelledby"]||o),t(2,r={"aria-hidden":i?void 0:!0,role:i?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=re(e),[a,o,r,n,i]}class Gt extends ae{constructor(e){super(),fe(this,e,Yt,Ut,ue,{size:0,title:1})}}const Ft=Gt,jt=l=>({}),Xe=l=>({});function Qt(l){let e,t,i;var r=l[1];function s(n){return{props:{"aria-label":n[10],title:n[10],class:"bx--overflow-menu__icon "+n[9]}}}return r&&(e=qe(r,s(l))),{c(){e&&K(e.$$.fragment),t=we()},l(n){e&&te(e.$$.fragment,n),t=we()},m(n,a){e&&x(e,n,a),L(n,t,a),i=!0},p(n,a){const o={};if(a[0]&1024&&(o["aria-label"]=n[10]),a[0]&1024&&(o.title=n[10]),a[0]&512&&(o.class="bx--overflow-menu__icon "+n[9]),a[0]&2&&r!==(r=n[1])){if(e){Ee();const f=e;B(f.$$.fragment,1,0,()=>{$(f,1)}),Te()}r?(e=qe(r,s(n)),K(e.$$.fragment),V(e.$$.fragment,1),x(e,t.parentNode,t)):e=null}else r&&e.$set(o)},i(n){i||(e&&V(e.$$.fragment,n),i=!0)},o(n){e&&B(e.$$.fragment,n),i=!1},d(n){n&&h(t),e&&$(e,n)}}}function We(l){let e,t;const i=l[24].default,r=_e(i,l,l[23],null);return{c(){e=P("ul"),r&&r.c(),this.h()},l(s){e=S(s,"UL",{role:!0,tabindex:!0,"aria-label":!0,"data-floating-menu-direction":!0,class:!0});var n=D(e);r&&r.l(n),n.forEach(h),this.h()},h(){E(e,"role","menu"),E(e,"tabindex","-1"),E(e,"aria-label",l[13]),E(e,"data-floating-menu-direction",l[5]),E(e,"class",l[8]),c(e,"bx--overflow-menu-options",!0),c(e,"bx--overflow-menu--flip",l[7]),c(e,"bx--overflow-menu-options--open",l[0]),c(e,"bx--overflow-menu-options--light",l[6]),c(e,"bx--overflow-menu-options--sm",l[4]==="sm"),c(e,"bx--overflow-menu-options--xl",l[4]==="xl"),c(e,"bx--breadcrumb-menu-options",!!l[14])},m(s,n){L(s,e,n),r&&r.m(e,null),l[31](e),t=!0},p(s,n){r&&r.p&&(!t||n[0]&8388608)&&ge(r,i,s,s[23],t?pe(i,s[23],n,null):ve(s[23]),null),(!t||n[0]&8192)&&E(e,"aria-label",s[13]),(!t||n[0]&32)&&E(e,"data-floating-menu-direction",s[5]),(!t||n[0]&256)&&E(e,"class",s[8]),(!t||n[0]&256)&&c(e,"bx--overflow-menu-options",!0),(!t||n[0]&384)&&c(e,"bx--overflow-menu--flip",s[7]),(!t||n[0]&257)&&c(e,"bx--overflow-menu-options--open",s[0]),(!t||n[0]&320)&&c(e,"bx--overflow-menu-options--light",s[6]),(!t||n[0]&272)&&c(e,"bx--overflow-menu-options--sm",s[4]==="sm"),(!t||n[0]&272)&&c(e,"bx--overflow-menu-options--xl",s[4]==="xl"),(!t||n[0]&16640)&&c(e,"bx--breadcrumb-menu-options",!!s[14])},i(s){t||(V(r,s),t=!0)},o(s){B(r,s),t=!1},d(s){s&&h(e),r&&r.d(s),l[31](null)}}}function Zt(l){let e,t,i,r,s,n,a,o;const f=l[24].menu,d=_e(f,l,l[23],Xe),u=d||Qt(l);let b=l[0]&&We(l),g=[{type:"button"},{"aria-haspopup":""},{"aria-expanded":l[0]},{"aria-label":l[13]},{id:l[11]},l[19]],T={};for(let _=0;_<g.length;_+=1)T=q(T,g[_]);return{c(){e=new _t(!1),t=we(),i=Q(),r=P("button"),u&&u.c(),s=Q(),b&&b.c(),this.h()},l(_){const k=gt("svelte-7ztmff",document.head);e=vt(k,!1),t=we(),k.forEach(h),i=Z(_),r=S(_,"BUTTON",{type:!0,"aria-haspopup":!0,"aria-expanded":!0,"aria-label":!0,id:!0});var p=D(r);u&&u.l(p),s=Z(p),b&&b.l(p),p.forEach(h),this.h()},h(){e.a=t,se(r,T),c(r,"bx--overflow-menu",!0),c(r,"bx--overflow-menu--open",l[0]),c(r,"bx--overflow-menu--light",l[6]),c(r,"bx--overflow-menu--sm",l[4]==="sm"),c(r,"bx--overflow-menu--xl",l[4]==="xl")},m(_,k){e.m(l[12],document.head),I(document.head,t),L(_,i,k),L(_,r,k),u&&u.m(r,null),I(r,s),b&&b.m(r,null),r.autofocus&&r.focus(),l[32](r),n=!0,a||(o=[j(window,"click",l[30]),j(r,"click",l[25]),j(r,"click",l[33]),j(r,"mouseover",l[26]),j(r,"mouseenter",l[27]),j(r,"mouseleave",l[28]),j(r,"keydown",l[29]),j(r,"keydown",l[34]),j(r,"focusout",l[35])],a=!0)},p(_,k){(!n||k[0]&4096)&&e.p(_[12]),d?d.p&&(!n||k[0]&8388608)&&ge(d,f,_,_[23],n?pe(f,_[23],k,jt):ve(_[23]),Xe):u&&u.p&&(!n||k[0]&1538)&&u.p(_,n?k:[-1,-1]),_[0]?b?(b.p(_,k),k[0]&1&&V(b,1)):(b=We(_),b.c(),V(b,1),b.m(r,null)):b&&(Ee(),B(b,1,1,()=>{b=null}),Te()),se(r,T=de(g,[{type:"button"},{"aria-haspopup":""},(!n||k[0]&1)&&{"aria-expanded":_[0]},(!n||k[0]&8192)&&{"aria-label":_[13]},(!n||k[0]&2048)&&{id:_[11]},k[0]&524288&&_[19]])),c(r,"bx--overflow-menu",!0),c(r,"bx--overflow-menu--open",_[0]),c(r,"bx--overflow-menu--light",_[6]),c(r,"bx--overflow-menu--sm",_[4]==="sm"),c(r,"bx--overflow-menu--xl",_[4]==="xl")},i(_){n||(V(u,_),V(b),n=!0)},o(_){B(u,_),B(b),n=!1},d(_){h(t),_&&e.d(),_&&h(i),_&&h(r),u&&u.d(_),b&&b.d(),l[32](null),a=!1,Ve(o)}}}function Xt(l,e,t){let i,r;const s=["size","direction","open","light","flipped","menuOptionsClass","icon","iconClass","iconDescription","id","buttonRef","menuRef"];let n=ee(e,s),a,o,f,{$$slots:d={},$$scope:u}=e,{size:b=void 0}=e,{direction:g="bottom"}=e,{open:T=!1}=e,{light:_=!1}=e,{flipped:k=!1}=e,{menuOptionsClass:p=void 0}=e,{icon:m=Ht}=e,{iconClass:O=void 0}=e,{iconDescription:M="Open and close list of options"}=e,{id:w="ccs-"+Math.random().toString(36)}=e,{buttonRef:C=null}=e,{menuRef:R=null}=e;const oe=ut("BreadcrumbItem"),ce=dt(),he=Se([]);Ce(l,he,v=>t(22,o=v));const F=Se(void 0);Ce(l,F,v=>t(37,f=v));const Me=Se(void 0),U=Se(-1);Ce(l,U,v=>t(21,a=v));let me,J=!0;pt("OverflowMenu",{focusedId:Me,add:({id:v,text:N,primaryFocus:be,disabled:Pe})=>{he.update(He=>(be&&U.set(He.length),[...He,{id:v,text:N,primaryFocus:be,disabled:Pe,index:He.length}]))},update:v=>{F.set(v)},change:v=>{let N=a+v;N<0?N=o.length-1:N>=o.length&&(N=0);let be=o[N].disabled;for(;be;)N=N+v,N<0?N=o.length-1:N>=o.length&&(N=0),be=o[N].disabled;U.set(N)}}),ct(()=>{if(f){const{index:v,text:N}=o.filter(be=>be.id===f)[0];ce("close",{index:v,text:N}),t(0,T=!1)}if(T){const{width:v,height:N}=C.getBoundingClientRect();t(20,me=v),!J&&a<0&&R.focus(),k&&(t(3,R.style.left="auto",R),t(3,R.style.right=0,R)),g==="top"?(t(3,R.style.top="auto",R),t(3,R.style.bottom=N+"px",R)):g==="bottom"&&t(3,R.style.top=N+"px",R),oe&&(t(3,R.style.top=N+10+"px",R),t(3,R.style.left="-11px",R))}T||(he.set([]),F.set(void 0),U.set(0)),J=!1});function y(v){De.call(this,l,v)}function A(v){De.call(this,l,v)}function ie(v){De.call(this,l,v)}function Re(v){De.call(this,l,v)}function z(v){De.call(this,l,v)}const H=({target:v})=>{C&&C.contains(v)||R&&!R.contains(v)&&t(0,T=!1)};function Ie(v){Ae[v?"unshift":"push"](()=>{R=v,t(3,R)})}function Oe(v){Ae[v?"unshift":"push"](()=>{C=v,t(2,C)})}const ze=({target:v})=>{R&&R.contains(v)||(t(0,T=!T),T||ce("close"))},Be=v=>{T&&(["ArrowDown","ArrowLeft","ArrowRight","ArrowUp"].includes(v.key)?v.preventDefault():v.key==="Escape"&&(v.stopPropagation(),ce("close"),t(0,T=!1),C.focus()))},Le=v=>{T&&(C.contains(v.relatedTarget)||(ce("close"),t(0,T=!1)))};return l.$$set=v=>{t(39,e=q(q({},e),re(v))),t(19,n=ee(e,s)),"size"in v&&t(4,b=v.size),"direction"in v&&t(5,g=v.direction),"open"in v&&t(0,T=v.open),"light"in v&&t(6,_=v.light),"flipped"in v&&t(7,k=v.flipped),"menuOptionsClass"in v&&t(8,p=v.menuOptionsClass),"icon"in v&&t(1,m=v.icon),"iconClass"in v&&t(9,O=v.iconClass),"iconDescription"in v&&t(10,M=v.iconDescription),"id"in v&&t(11,w=v.id),"buttonRef"in v&&t(2,C=v.buttonRef),"menuRef"in v&&t(3,R=v.menuRef),"$$scope"in v&&t(23,u=v.$$scope)},l.$$.update=()=>{t(13,i=e["aria-label"]||"menu"),l.$$.dirty[0]&6291456&&o[a]&&Me.set(o[a].id),l.$$.dirty[0]&1050624&&t(12,r=`<style>
2
+ #${w} .bx--overflow-menu-options.bx--overflow-menu-options:after {
3
+ width: ${me?me+"px":"2rem"};
4
+ }
5
+ </style>`)},oe&&t(1,m=Ft),e=re(e),[T,m,C,R,b,g,_,k,p,O,M,w,r,i,oe,ce,he,F,U,n,me,a,o,u,d,y,A,ie,Re,z,H,Ie,Oe,ze,Be,Le]}class Wt extends ae{constructor(e){super(),fe(this,e,Xt,Zt,ue,{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 bt=Wt;function Jt(l){let e,t,i,r;const s=l[16].default,n=_e(s,l,l[15],null),a=n||xt(l);let o=[l[7]],f={};for(let d=0;d<o.length;d+=1)f=q(f,o[d]);return{c(){e=P("button"),a&&a.c(),this.h()},l(d){e=S(d,"BUTTON",{});var u=D(e);a&&a.l(u),u.forEach(h),this.h()},h(){se(e,f)},m(d,u){L(d,e,u),a&&a.m(e,null),e.autofocus&&e.focus(),l[24](e),t=!0,i||(r=[j(e,"click",l[19]),j(e,"click",l[25]),j(e,"keydown",l[20]),j(e,"keydown",l[26])],i=!0)},p(d,u){n?n.p&&(!t||u&32768)&&ge(n,s,d,d[15],t?pe(s,d[15],u,null):ve(d[15]),null):a&&a.p&&(!t||u&2)&&a.p(d,t?u:-1),se(e,f=de(o,[u&128&&d[7]]))},i(d){t||(V(a,d),t=!0)},o(d){B(a,d),t=!1},d(d){d&&h(e),a&&a.d(d),l[24](null),i=!1,Ve(r)}}}function Kt(l){let e,t,i,r;const s=l[16].default,n=_e(s,l,l[15],null),a=n||$t(l);let o=[l[7]],f={};for(let d=0;d<o.length;d+=1)f=q(f,o[d]);return{c(){e=P("a"),a&&a.c(),this.h()},l(d){e=S(d,"A",{});var u=D(e);a&&a.l(u),u.forEach(h),this.h()},h(){se(e,f)},m(d,u){L(d,e,u),a&&a.m(e,null),l[21](e),t=!0,i||(r=[j(e,"click",l[17]),j(e,"click",l[22]),j(e,"keydown",l[18]),j(e,"keydown",l[23])],i=!0)},p(d,u){n?n.p&&(!t||u&32768)&&ge(n,s,d,d[15],t?pe(s,d[15],u,null):ve(d[15]),null):a&&a.p&&(!t||u&2)&&a.p(d,t?u:-1),se(e,f=de(o,[u&128&&d[7]]))},i(d){t||(V(a,d),t=!0)},o(d){B(a,d),t=!1},d(d){d&&h(e),a&&a.d(d),l[21](null),i=!1,Ve(r)}}}function xt(l){let e,t;return{c(){e=P("div"),t=X(l[1]),this.h()},l(i){e=S(i,"DIV",{});var r=D(e);t=W(r,l[1]),r.forEach(h),this.h()},h(){c(e,"bx--overflow-menu-options__option-content",!0)},m(i,r){L(i,e,r),I(e,t)},p(i,r){r&2&&ne(t,i[1])},d(i){i&&h(e)}}}function $t(l){let e,t;return{c(){e=P("div"),t=X(l[1]),this.h()},l(i){e=S(i,"DIV",{});var r=D(e);t=W(r,l[1]),r.forEach(h),this.h()},h(){c(e,"bx--overflow-menu-options__option-content",!0)},m(i,r){L(i,e,r),I(e,t)},p(i,r){r&2&&ne(t,i[1])},d(i){i&&h(e)}}}function el(l){let e,t,i,r;const s=[Kt,Jt],n=[];function a(d,u){return d[2]?0:1}t=a(l),i=n[t]=s[t](l);let o=[{role:"none"},{id:l[6]},l[11]],f={};for(let d=0;d<o.length;d+=1)f=q(f,o[d]);return{c(){e=P("li"),i.c(),this.h()},l(d){e=S(d,"LI",{role:!0,id:!0});var u=D(e);i.l(u),u.forEach(h),this.h()},h(){se(e,f),c(e,"bx--overflow-menu-options__option",!0),c(e,"bx--overflow-menu--divider",l[4]),c(e,"bx--overflow-menu-options__option--danger",l[5]),c(e,"bx--overflow-menu-options__option--disabled",l[3])},m(d,u){L(d,e,u),n[t].m(e,null),r=!0},p(d,[u]){let b=t;t=a(d),t===b?n[t].p(d,u):(Ee(),B(n[b],1,1,()=>{n[b]=null}),Te(),i=n[t],i?i.p(d,u):(i=n[t]=s[t](d),i.c()),V(i,1),i.m(e,null)),se(e,f=de(o,[{role:"none"},(!r||u&64)&&{id:d[6]},u&2048&&d[11]])),c(e,"bx--overflow-menu-options__option",!0),c(e,"bx--overflow-menu--divider",d[4]),c(e,"bx--overflow-menu-options__option--danger",d[5]),c(e,"bx--overflow-menu-options__option--disabled",d[3])},i(d){r||(V(i),r=!0)},o(d){B(i),r=!1},d(d){d&&h(e),n[t].d()}}}function tl(l,e,t){let i;const r=["text","href","primaryFocus","disabled","hasDivider","danger","requireTitle","id","ref"];let s=ee(e,r),n,{$$slots:a={},$$scope:o}=e;const f=kt(a);let{text:d="Provide text"}=e,{href:u=""}=e,{primaryFocus:b=!1}=e,{disabled:g=!1}=e,{hasDivider:T=!1}=e,{danger:_=!1}=e,{requireTitle:k=!0}=e,{id:p="ccs-"+Math.random().toString(36)}=e,{ref:m=null}=e;const{focusedId:O,add:M,update:w,change:C}=ut("OverflowMenu");Ce(l,O,A=>t(14,n=A)),M({id:p,text:d,primaryFocus:b,disabled:g}),ct(()=>{m&&b&&m.focus()});function R(A){De.call(this,l,A)}function oe(A){De.call(this,l,A)}function ce(A){De.call(this,l,A)}function he(A){De.call(this,l,A)}function F(A){Ae[A?"unshift":"push"](()=>{m=A,t(0,m)})}const Me=()=>{w(p)},U=({key:A})=>{A==="ArrowDown"?C(1):A==="ArrowUp"&&C(-1)};function me(A){Ae[A?"unshift":"push"](()=>{m=A,t(0,m)})}const J=()=>{w(p)},y=({key:A})=>{A==="ArrowDown"?C(1):A==="ArrowUp"&&C(-1)};return l.$$set=A=>{e=q(q({},e),re(A)),t(11,s=ee(e,r)),"text"in A&&t(1,d=A.text),"href"in A&&t(2,u=A.href),"primaryFocus"in A&&t(12,b=A.primaryFocus),"disabled"in A&&t(3,g=A.disabled),"hasDivider"in A&&t(4,T=A.hasDivider),"danger"in A&&t(5,_=A.danger),"requireTitle"in A&&t(13,k=A.requireTitle),"id"in A&&t(6,p=A.id),"ref"in A&&t(0,m=A.ref),"$$scope"in A&&t(15,o=A.$$scope)},l.$$.update=()=>{l.$$.dirty&16448&&t(12,b=n===p),l.$$.dirty&8206&&t(7,i={role:"menuitem",tabindex:"-1",class:"bx--overflow-menu-options__btn",disabled:u?void 0:g,href:u||void 0,title:k?f.default?void 0:d:void 0})},[m,d,u,g,T,_,p,i,O,w,C,s,b,k,n,o,a,R,oe,ce,he,F,Me,U,me,J,y]}class ll extends ae{constructor(e){super(),fe(this,e,tl,el,ue,{text:1,href:2,primaryFocus:12,disabled:3,hasDivider:4,danger:5,requireTitle:13,id:6,ref:0})}}const Ne=ll;function il(l){let e,t,i,r,s,n;const a=l[11].default,o=_e(a,l,l[10],null);let f=[l[9],{style:i=l[9].style+"; "+(l[6]&&"position: relative")}],d={};for(let u=0;u<f.length;u+=1)d=q(d,f[u]);return{c(){e=P("div"),t=P("div"),o&&o.c(),this.h()},l(u){e=S(u,"DIV",{style:!0});var b=D(e);t=S(b,"DIV",{});var g=D(t);o&&o.l(g),g.forEach(h),b.forEach(h),this.h()},h(){c(t,"bx--popover-contents",!0),se(e,d),c(e,"bx--popover",!0),c(e,"bx--popover--caret",l[2]),c(e,"bx--popover--light",l[4]),c(e,"bx--popover--high-contrast",l[5]),c(e,"bx--popover--top",l[3]==="top"),c(e,"bx--popover--top-left",l[3]==="top-left"),c(e,"bx--popover--top-right",l[3]==="top-right"),c(e,"bx--popover--bottom",l[3]==="bottom"),c(e,"bx--popover--bottom-left",l[3]==="bottom-left"),c(e,"bx--popover--bottom-right",l[3]==="bottom-right"),c(e,"bx--popover--left",l[3]==="left"),c(e,"bx--popover--left-bottom",l[3]==="left-bottom"),c(e,"bx--popover--left-top",l[3]==="left-top"),c(e,"bx--popover--right",l[3]==="right"),c(e,"bx--popover--right-bottom",l[3]==="right-bottom"),c(e,"bx--popover--right-top",l[3]==="right-top"),c(e,"bx--popover--open",l[0]),c(e,"bx--popover--relative",l[6])},m(u,b){L(u,e,b),I(e,t),o&&o.m(t,null),l[13](e),r=!0,s||(n=j(window,"click",l[12]),s=!0)},p(u,[b]){o&&o.p&&(!r||b&1024)&&ge(o,a,u,u[10],r?pe(a,u[10],b,null):ve(u[10]),null),se(e,d=de(f,[b&512&&u[9],(!r||b&576&&i!==(i=u[9].style+"; "+(u[6]&&"position: relative")))&&{style:i}])),c(e,"bx--popover",!0),c(e,"bx--popover--caret",u[2]),c(e,"bx--popover--light",u[4]),c(e,"bx--popover--high-contrast",u[5]),c(e,"bx--popover--top",u[3]==="top"),c(e,"bx--popover--top-left",u[3]==="top-left"),c(e,"bx--popover--top-right",u[3]==="top-right"),c(e,"bx--popover--bottom",u[3]==="bottom"),c(e,"bx--popover--bottom-left",u[3]==="bottom-left"),c(e,"bx--popover--bottom-right",u[3]==="bottom-right"),c(e,"bx--popover--left",u[3]==="left"),c(e,"bx--popover--left-bottom",u[3]==="left-bottom"),c(e,"bx--popover--left-top",u[3]==="left-top"),c(e,"bx--popover--right",u[3]==="right"),c(e,"bx--popover--right-bottom",u[3]==="right-bottom"),c(e,"bx--popover--right-top",u[3]==="right-top"),c(e,"bx--popover--open",u[0]),c(e,"bx--popover--relative",u[6])},i(u){r||(V(o,u),r=!0)},o(u){B(o,u),r=!1},d(u){u&&h(e),o&&o.d(u),l[13](null),s=!1,n()}}}function rl(l,e,t){const i=["open","closeOnOutsideClick","caret","align","light","highContrast","relative"];let r=ee(e,i),{$$slots:s={},$$scope:n}=e,{open:a=!1}=e,{closeOnOutsideClick:o=!1}=e,{caret:f=!1}=e,{align:d="top"}=e,{light:u=!1}=e,{highContrast:b=!1}=e,{relative:g=!1}=e;const T=dt();let _=null;const k=m=>{a&&(_.contains(m.target)||(T("click:outside",{target:m.target}),o&&t(0,a=!1)))};function p(m){Ae[m?"unshift":"push"](()=>{_=m,t(7,_)})}return l.$$set=m=>{e=q(q({},e),re(m)),t(9,r=ee(e,i)),"open"in m&&t(0,a=m.open),"closeOnOutsideClick"in m&&t(1,o=m.closeOnOutsideClick),"caret"in m&&t(2,f=m.caret),"align"in m&&t(3,d=m.align),"light"in m&&t(4,u=m.light),"highContrast"in m&&t(5,b=m.highContrast),"relative"in m&&t(6,g=m.relative),"$$scope"in m&&t(10,n=m.$$scope)},[a,o,f,d,u,b,g,_,T,r,n,s,k,p]}class nl extends ae{constructor(e){super(),fe(this,e,rl,il,ue,{open:0,closeOnOutsideClick:1,caret:2,align:3,light:4,highContrast:5,relative:6})}}const ol=nl,sl=l=>({}),Je=l=>({});function al(l){let e;return{c(){e=X(l[4])},l(t){e=W(t,l[4])},m(t,i){L(t,e,i)},p(t,i){i&16&&ne(e,t[4])},d(t){t&&h(e)}}}function Ke(l){let e,t,i;var r=l[10][l[2]];function s(n){return{props:{class:"bx--progress-bar__status-icon"}}}return r&&(e=qe(r,s())),{c(){e&&K(e.$$.fragment),t=we()},l(n){e&&te(e.$$.fragment,n),t=we()},m(n,a){e&&x(e,n,a),L(n,t,a),i=!0},p(n,a){if(a&4&&r!==(r=n[10][n[2]])){if(e){Ee();const o=e;B(o.$$.fragment,1,0,()=>{$(o,1)}),Te()}r?(e=qe(r,s()),K(e.$$.fragment),V(e.$$.fragment,1),x(e,t.parentNode,t)):e=null}},i(n){i||(e&&V(e.$$.fragment,n),i=!0)},o(n){e&&B(e.$$.fragment,n),i=!1},d(n){n&&h(t),e&&$(e,n)}}}function xe(l){let e,t;return{c(){e=P("div"),t=X(l[6]),this.h()},l(i){e=S(i,"DIV",{id:!0});var r=D(e);t=W(r,l[6]),r.forEach(h),this.h()},h(){E(e,"id",l[11]),c(e,"bx--progress-bar__helper-text",!0)},m(i,r){L(i,e,r),I(e,t)},p(i,r){r&64&&ne(t,i[6])},d(i){i&&h(e)}}}function fl(l){let e,t,i,r,s,n,a,o,f,d,u,b,g;const T=l[15].labelText,_=_e(T,l,l[14],Je),k=_||al(l);let p=(l[2]==="error"||l[2]==="finished")&&Ke(l),m=l[6]&&xe(l),O=[l[12]],M={};for(let w=0;w<O.length;w+=1)M=q(M,O[w]);return{c(){e=P("div"),t=P("label"),k&&k.c(),i=Q(),p&&p.c(),r=Q(),s=P("div"),n=P("div"),b=Q(),m&&m.c(),this.h()},l(w){e=S(w,"DIV",{});var C=D(e);t=S(C,"LABEL",{for:!0});var R=D(t);k&&k.l(R),i=Z(R),p&&p.l(R),R.forEach(h),r=Z(C),s=S(C,"DIV",{role:!0,id:!0,"aria-busy":!0,"aria-valuemin":!0,"aria-valuemax":!0,"aria-valuenow":!0,"aria-describedby":!0});var oe=D(s);n=S(oe,"DIV",{}),D(n).forEach(h),oe.forEach(h),b=Z(C),m&&m.l(C),C.forEach(h),this.h()},h(){E(t,"for",l[7]),c(t,"bx--progress-bar__label",!0),c(t,"bx--visually-hidden",l[5]),c(n,"bx--progress-bar__bar",!0),ye(n,"transform",l[2]==="active"&&`scaleX(${l[8]/l[0]})`),E(s,"role","progressbar"),E(s,"id",l[7]),E(s,"aria-busy",a=l[2]==="active"),E(s,"aria-valuemin",o=l[9]?void 0:0),E(s,"aria-valuemax",f=l[9]?void 0:l[0]),E(s,"aria-valuenow",d=l[9]?void 0:l[8]),E(s,"aria-describedby",u=l[6]?l[11]:null),c(s,"bx--progress-bar__track",!0),se(e,M),c(e,"bx--progress-bar",!0),c(e,"bx--progress-bar--indeterminate",l[9]),c(e,"bx--progress-bar--big",l[3]==="md"),c(e,"bx--progress-bar--small",l[3]==="sm"),c(e,"bx--progress-bar--inline",l[1]==="inline"),c(e,"bx--progress-bar--indented",l[1]==="indented"),c(e,"bx--progress-bar--error",l[2]==="error"),c(e,"bx--progress-bar--finished",l[2]==="finished")},m(w,C){L(w,e,C),I(e,t),k&&k.m(t,null),I(t,i),p&&p.m(t,null),I(e,r),I(e,s),I(s,n),I(e,b),m&&m.m(e,null),g=!0},p(w,[C]){_?_.p&&(!g||C&16384)&&ge(_,T,w,w[14],g?pe(T,w[14],C,sl):ve(w[14]),Je):k&&k.p&&(!g||C&16)&&k.p(w,g?C:-1),w[2]==="error"||w[2]==="finished"?p?(p.p(w,C),C&4&&V(p,1)):(p=Ke(w),p.c(),V(p,1),p.m(t,null)):p&&(Ee(),B(p,1,1,()=>{p=null}),Te()),(!g||C&128)&&E(t,"for",w[7]),(!g||C&32)&&c(t,"bx--visually-hidden",w[5]),C&261&&ye(n,"transform",w[2]==="active"&&`scaleX(${w[8]/w[0]})`),(!g||C&128)&&E(s,"id",w[7]),(!g||C&4&&a!==(a=w[2]==="active"))&&E(s,"aria-busy",a),(!g||C&512&&o!==(o=w[9]?void 0:0))&&E(s,"aria-valuemin",o),(!g||C&513&&f!==(f=w[9]?void 0:w[0]))&&E(s,"aria-valuemax",f),(!g||C&768&&d!==(d=w[9]?void 0:w[8]))&&E(s,"aria-valuenow",d),(!g||C&64&&u!==(u=w[6]?w[11]:null))&&E(s,"aria-describedby",u),w[6]?m?m.p(w,C):(m=xe(w),m.c(),m.m(e,null)):m&&(m.d(1),m=null),se(e,M=de(O,[C&4096&&w[12]])),c(e,"bx--progress-bar",!0),c(e,"bx--progress-bar--indeterminate",w[9]),c(e,"bx--progress-bar--big",w[3]==="md"),c(e,"bx--progress-bar--small",w[3]==="sm"),c(e,"bx--progress-bar--inline",w[1]==="inline"),c(e,"bx--progress-bar--indented",w[1]==="indented"),c(e,"bx--progress-bar--error",w[2]==="error"),c(e,"bx--progress-bar--finished",w[2]==="finished")},i(w){g||(V(k,w),V(p),g=!0)},o(w){B(k,w),B(p),g=!1},d(w){w&&h(e),k&&k.d(w),p&&p.d(),m&&m.d()}}}function ul(l,e,t){let i;const r=["value","max","kind","status","size","labelText","hideLabel","helperText","id"];let s=ee(e,r),{$$slots:n={},$$scope:a}=e,{value:o=void 0}=e,{max:f=100}=e,{kind:d="default"}=e,{status:u="active"}=e,{size:b="md"}=e,{labelText:g=""}=e,{hideLabel:T=!1}=e,{helperText:_=""}=e,{id:k="ccs-"+Math.random().toString(36)}=e;const p={error:Mt,finished:zt};let m="ccs-"+Math.random().toString(36),O;return l.$$set=M=>{e=q(q({},e),re(M)),t(12,s=ee(e,r)),"value"in M&&t(13,o=M.value),"max"in M&&t(0,f=M.max),"kind"in M&&t(1,d=M.kind),"status"in M&&t(2,u=M.status),"size"in M&&t(3,b=M.size),"labelText"in M&&t(4,g=M.labelText),"hideLabel"in M&&t(5,T=M.hideLabel),"helperText"in M&&t(6,_=M.helperText),"id"in M&&t(7,k=M.id),"$$scope"in M&&t(14,a=M.$$scope)},l.$$.update=()=>{l.$$.dirty&8196&&t(9,i=o===void 0&&u==="active"),l.$$.dirty&8197&&(u==="error"||o<0?t(8,O=0):o>f?t(8,O=f):t(8,O=o))},[f,d,u,b,g,T,_,k,O,i,p,m,s,o,a,n]}class dl extends ae{constructor(e){super(),fe(this,e,ul,fl,ue,{value:13,max:0,kind:1,status:2,size:3,labelText:4,hideLabel:5,helperText:6,id:7})}}const cl=dl;class hl{static login(e){return Ue(Ye,{method:"GET",url:"/google/login",query:{origin_url:e},errors:{422:"Validation Error"}})}static auth(){return Ue(Ye,{method:"GET",url:"/google/auth"})}static logout(){return Ue(Ye,{method:"GET",url:"/google/logout"})}}function $e(l){let e,t;return{c(){e=Y("title"),t=X(l[1])},l(i){e=G(i,"title",{});var r=D(e);t=W(r,l[1]),r.forEach(h)},m(i,r){L(i,e,r),I(e,t)},p(i,r){r&2&&ne(t,i[1])},d(i){i&&h(e)}}}function ml(l){let e,t,i=l[1]&&$e(l),r=[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},{width:l[0]},{height:l[0]},l[2],l[3]],s={};for(let n=0;n<r.length;n+=1)s=q(s,r[n]);return{c(){e=Y("svg"),i&&i.c(),t=Y("path"),this.h()},l(n){e=G(n,"svg",{xmlns:!0,viewBox:!0,fill:!0,preserveAspectRatio:!0,width:!0,height:!0});var a=D(e);i&&i.l(a),t=G(a,"path",{d:!0}),D(t).forEach(h),a.forEach(h),this.h()},h(){E(t,"d","M13 24L4 15 5.414 13.586 13 21.171 26.586 7.586 28 9 13 24z"),ke(e,s)},m(n,a){L(n,e,a),i&&i.m(e,null),I(e,t)},p(n,[a]){n[1]?i?i.p(n,a):(i=$e(n),i.c(),i.m(e,t)):i&&(i.d(1),i=null),ke(e,s=de(r,[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},a&1&&{width:n[0]},a&1&&{height:n[0]},a&4&&n[2],a&8&&n[3]]))},i:le,o:le,d(n){n&&h(e),i&&i.d()}}}function bl(l,e,t){let i,r;const s=["size","title"];let n=ee(e,s),{size:a=16}=e,{title:o=void 0}=e;return l.$$set=f=>{t(5,e=q(q({},e),re(f))),t(3,n=ee(e,s)),"size"in f&&t(0,a=f.size),"title"in f&&t(1,o=f.title)},l.$$.update=()=>{t(4,i=e["aria-label"]||e["aria-labelledby"]||o),t(2,r={"aria-hidden":i?void 0:!0,role:i?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=re(e),[a,o,r,n,i]}class _l extends ae{constructor(e){super(),fe(this,e,bl,ml,ue,{size:0,title:1})}}function et(l){let e,t;return{c(){e=Y("title"),t=X(l[1])},l(i){e=G(i,"title",{});var r=D(e);t=W(r,l[1]),r.forEach(h)},m(i,r){L(i,e,r),I(e,t)},p(i,r){r&2&&ne(t,i[1])},d(i){i&&h(e)}}}function gl(l){let e,t,i,r,s=l[1]&&et(l),n=[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},{width:l[0]},{height:l[0]},l[2],l[3]],a={};for(let o=0;o<n.length;o+=1)a=q(a,n[o]);return{c(){e=Y("svg"),s&&s.c(),t=Y("path"),i=Y("circle"),r=Y("path"),this.h()},l(o){e=G(o,"svg",{xmlns:!0,viewBox:!0,fill:!0,preserveAspectRatio:!0,width:!0,height:!0});var f=D(e);s&&s.l(f),t=G(f,"path",{d:!0}),D(t).forEach(h),i=G(f,"circle",{cx:!0,cy:!0,r:!0}),D(i).forEach(h),r=G(f,"path",{d:!0}),D(r).forEach(h),f.forEach(h),this.h()},h(){E(t,"d","M16,2A14,14,0,1,0,30,16,14,14,0,0,0,16,2Zm0,26A12,12,0,1,1,28,16,12,12,0,0,1,16,28Z"),E(i,"cx","16"),E(i,"cy","23.5"),E(i,"r","1.5"),E(r,"d","M17,8H15.5A4.49,4.49,0,0,0,11,12.5V13h2v-.5A2.5,2.5,0,0,1,15.5,10H17a2.5,2.5,0,0,1,0,5H15v4.5h2V17a4.5,4.5,0,0,0,0-9Z"),ke(e,a)},m(o,f){L(o,e,f),s&&s.m(e,null),I(e,t),I(e,i),I(e,r)},p(o,[f]){o[1]?s?s.p(o,f):(s=et(o),s.c(),s.m(e,t)):s&&(s.d(1),s=null),ke(e,a=de(n,[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},f&1&&{width:o[0]},f&1&&{height:o[0]},f&4&&o[2],f&8&&o[3]]))},i:le,o:le,d(o){o&&h(e),s&&s.d()}}}function vl(l,e,t){let i,r;const s=["size","title"];let n=ee(e,s),{size:a=16}=e,{title:o=void 0}=e;return l.$$set=f=>{t(5,e=q(q({},e),re(f))),t(3,n=ee(e,s)),"size"in f&&t(0,a=f.size),"title"in f&&t(1,o=f.title)},l.$$.update=()=>{t(4,i=e["aria-label"]||e["aria-labelledby"]||o),t(2,r={"aria-hidden":i?void 0:!0,role:i?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=re(e),[a,o,r,n,i]}class pl extends ae{constructor(e){super(),fe(this,e,vl,gl,ue,{size:0,title:1})}}function tt(l){let e,t;return{c(){e=Y("title"),t=X(l[1])},l(i){e=G(i,"title",{});var r=D(e);t=W(r,l[1]),r.forEach(h)},m(i,r){L(i,e,r),I(e,t)},p(i,r){r&2&&ne(t,i[1])},d(i){i&&h(e)}}}function kl(l){let e,t,i=l[1]&&tt(l),r=[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},{width:l[0]},{height:l[0]},l[2],l[3]],s={};for(let n=0;n<r.length;n+=1)s=q(s,r[n]);return{c(){e=Y("svg"),i&&i.c(),t=Y("path"),this.h()},l(n){e=G(n,"svg",{xmlns:!0,viewBox:!0,fill:!0,preserveAspectRatio:!0,width:!0,height:!0});var a=D(e);i&&i.l(a),t=G(a,"path",{d:!0}),D(t).forEach(h),a.forEach(h),this.h()},h(){E(t,"d","M28,4H4C2.9,4,2,4.9,2,6v20c0,1.1,0.9,2,2,2h24c1.1,0,2-0.9,2-2V6C30,4.9,29.1,4,28,4z M10,26H4V6h6V26z M28,26H12v-9h10.2 l-3.6,3.6L20,22l6-6l-6-6l-1.4,1.4l3.6,3.6H12V6h16V26z"),ke(e,s)},m(n,a){L(n,e,a),i&&i.m(e,null),I(e,t)},p(n,[a]){n[1]?i?i.p(n,a):(i=tt(n),i.c(),i.m(e,t)):i&&(i.d(1),i=null),ke(e,s=de(r,[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},a&1&&{width:n[0]},a&1&&{height:n[0]},a&4&&n[2],a&8&&n[3]]))},i:le,o:le,d(n){n&&h(e),i&&i.d()}}}function wl(l,e,t){let i,r;const s=["size","title"];let n=ee(e,s),{size:a=16}=e,{title:o=void 0}=e;return l.$$set=f=>{t(5,e=q(q({},e),re(f))),t(3,n=ee(e,s)),"size"in f&&t(0,a=f.size),"title"in f&&t(1,o=f.title)},l.$$.update=()=>{t(4,i=e["aria-label"]||e["aria-labelledby"]||o),t(2,r={"aria-hidden":i?void 0:!0,role:i?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=re(e),[a,o,r,n,i]}class El extends ae{constructor(e){super(),fe(this,e,wl,kl,ue,{size:0,title:1})}}const Tl=Ct(hl.logout,{onSuccess:()=>{Ge.invalidateQueries([Ot]),Ge.invalidateQueries([At]),Ge.invalidateQueries([Vt])}});function lt(l,e,t){const i=l.slice();i[13]=e[t][0],i[14]=e[t][1];const r=i[14].step_progress==null?void 0:i[14].step_progress;return i[15]=r,i}function it(l){let e,t,i,r,s,n,a,o,f,d,u,b,g;const T=[Ml,Dl,Il],_=[];function k(m,O){return m[5].length?0:m[4].length?1:2}r=k(l),s=_[r]=T[r](l);let p=l[5].length===1&&rt(l);return o=new ol({props:{align:"bottom-right",caret:!0,closeOnOutsideClick:!0,open:l[1],$$slots:{default:[zl]},$$scope:{ctx:l}}}),o.$on("click:outside",l[11]),{c(){e=P("div"),t=P("button"),i=P("div"),s.c(),n=Q(),p&&p.c(),a=Q(),K(o.$$.fragment),this.h()},l(m){e=S(m,"DIV",{});var O=D(e);t=S(O,"BUTTON",{class:!0});var M=D(t);i=S(M,"DIV",{class:!0});var w=D(i);s.l(w),w.forEach(h),n=Z(M),p&&p.l(M),a=Z(M),te(o.$$.fragment,M),M.forEach(h),O.forEach(h),this.h()},h(){E(i,"class","relative z-10 flex gap-x-2"),t.disabled=f=!l[2],E(t,"class","task-button relative h-8 rounded border p-2 transition"),c(t,"opacity-40",!l[2]),c(t,"bg-white",!l[5].length),c(t,"bg-blue-200",l[5].length),c(t,"border-blue-400",l[5].length)},m(m,O){L(m,e,O),I(e,t),I(t,i),_[r].m(i,null),I(t,n),p&&p.m(t,null),I(t,a),x(o,t,null),u=!0,b||(g=[j(t,"click",wt(l[12])),Fe(d=je.call(null,e,{text:l[2]?"":"User does not have access to run tasks."}))],b=!0)},p(m,O){let M=r;r=k(m),r===M?_[r].p(m,O):(Ee(),B(_[M],1,1,()=>{_[M]=null}),Te(),s=_[r],s?s.p(m,O):(s=_[r]=T[r](m),s.c()),V(s,1),s.m(i,null)),m[5].length===1?p?p.p(m,O):(p=rt(m),p.c(),p.m(t,a)):p&&(p.d(1),p=null);const w={};O&2&&(w.open=m[1]),O&262145&&(w.$$scope={dirty:O,ctx:m}),o.$set(w),(!u||O&4&&f!==(f=!m[2]))&&(t.disabled=f),(!u||O&4)&&c(t,"opacity-40",!m[2]),(!u||O&32)&&c(t,"bg-white",!m[5].length),(!u||O&32)&&c(t,"bg-blue-200",m[5].length),(!u||O&32)&&c(t,"border-blue-400",m[5].length),d&&ht(d.update)&&O&4&&d.update.call(null,{text:m[2]?"":"User does not have access to run tasks."})},i(m){u||(V(s),V(o.$$.fragment,m),u=!0)},o(m){B(s),B(o.$$.fragment,m),u=!1},d(m){m&&h(e),_[r].d(),p&&p.d(),$(o),b=!1,Ve(g)}}}function Il(l){let e,t,i;return t=new _l({}),{c(){e=X("Tasks "),K(t.$$.fragment)},l(r){e=W(r,"Tasks "),te(t.$$.fragment,r)},m(r,s){L(r,e,s),x(t,r,s),i=!0},p:le,i(r){i||(V(t.$$.fragment,r),i=!0)},o(r){B(t.$$.fragment,r),i=!1},d(r){r&&h(e),$(t,r)}}}function Dl(l){let e=l[4].length+"",t,i,r=l[4].length>1?"s":"",s;return{c(){t=X(e),i=X(" failed task"),s=X(r)},l(n){t=W(n,e),i=W(n," failed task"),s=W(n,r)},m(n,a){L(n,t,a),L(n,i,a),L(n,s,a)},p(n,a){a&16&&e!==(e=n[4].length+"")&&ne(t,e),a&16&&r!==(r=n[4].length>1?"s":"")&&ne(s,r)},i:le,o:le,d(n){n&&h(t),n&&h(i),n&&h(s)}}}function Ml(l){let e=l[5].length+"",t,i,r=l[5].length>1?"s":"",s,n,a,o;return a=new Bt({props:{withOverlay:!1,small:!0}}),{c(){t=X(e),i=X(" running task"),s=X(r),n=X("... "),K(a.$$.fragment)},l(f){t=W(f,e),i=W(f," running task"),s=W(f,r),n=W(f,"... "),te(a.$$.fragment,f)},m(f,d){L(f,t,d),L(f,i,d),L(f,s,d),L(f,n,d),x(a,f,d),o=!0},p(f,d){(!o||d&32)&&e!==(e=f[5].length+"")&&ne(t,e),(!o||d&32)&&r!==(r=f[5].length>1?"s":"")&&ne(s,r)},i(f){o||(V(a.$$.fragment,f),o=!0)},o(f){B(a.$$.fragment,f),o=!1},d(f){f&&h(t),f&&h(i),f&&h(s),f&&h(n),$(a,f)}}}function rt(l){let e,t=`${l[3]*100}%`;return{c(){e=P("div"),this.h()},l(i){e=S(i,"DIV",{class:!0}),D(e).forEach(h),this.h()},h(){E(e,"class","absolute left-0 top-0 z-0 h-full bg-blue-400 transition"),ye(e,"width",t)},m(i,r){L(i,e,r)},p(i,r){r&8&&t!==(t=`${i[3]*100}%`)&&ye(e,"width",t)},d(i){i&&h(e)}}}function nt(l,e){let t,i,r,s=e[14].name+"",n,a,o,f,d,u;return f=new cl({props:{labelText:e[14].message||"",helperText:e[14].status!="completed"?e[14].details:"",value:e[14].status==="completed"?1:e[15],max:1,size:"sm",status:e[7][e[14].status]}}),{key:l,first:null,c(){t=P("div"),i=P("div"),r=P("div"),n=X(s),a=Q(),o=P("div"),K(f.$$.fragment),d=Q(),this.h()},l(b){t=S(b,"DIV",{class:!0});var g=D(t);i=S(g,"DIV",{class:!0});var T=D(i);r=S(T,"DIV",{class:!0});var _=D(r);n=W(_,s),_.forEach(h),T.forEach(h),a=Z(g),o=S(g,"DIV",{class:!0});var k=D(o);te(f.$$.fragment,k),k.forEach(h),d=Z(g),g.forEach(h),this.h()},h(){E(r,"class","mr-2"),E(i,"class","text-s flex flex-row"),E(o,"class","progress-container mt-3"),E(t,"class","relative border-b-2 border-slate-200 p-4 text-left last:border-b-0"),this.first=t},m(b,g){L(b,t,g),I(t,i),I(i,r),I(r,n),I(t,a),I(t,o),x(f,o,null),I(t,d),u=!0},p(b,g){e=b,(!u||g&1)&&s!==(s=e[14].name+"")&&ne(n,s);const T={};g&1&&(T.labelText=e[14].message||""),g&1&&(T.helperText=e[14].status!="completed"?e[14].details:""),g&1&&(T.value=e[14].status==="completed"?1:e[15]),g&1&&(T.status=e[7][e[14].status]),f.$set(T)},i(b){u||(V(f.$$.fragment,b),u=!0)},o(b){B(f.$$.fragment,b),u=!1},d(b){b&&h(t),$(f)}}}function zl(l){let e,t=[],i=new Map,r,s=l[0];const n=a=>a[13];for(let a=0;a<s.length;a+=1){let o=lt(l,s,a),f=n(o);i.set(f,t[a]=nt(f,o))}return{c(){e=P("div");for(let a=0;a<t.length;a+=1)t[a].c();this.h()},l(a){e=S(a,"DIV",{class:!0});var o=D(e);for(let f=0;f<t.length;f+=1)t[f].l(o);o.forEach(h),this.h()},h(){E(e,"class","flex flex-col")},m(a,o){L(a,e,o);for(let f=0;f<t.length;f+=1)t[f]&&t[f].m(e,null);r=!0},p(a,o){o&129&&(s=a[0],Ee(),t=Et(t,o,n,1,a,s,i,e,Tt,nt,null,lt),Te())},i(a){if(!r){for(let o=0;o<s.length;o+=1)V(t[o]);r=!0}},o(a){for(let o=0;o<t.length;o+=1)B(t[o]);r=!1},d(a){a&&h(e);for(let o=0;o<t.length;o+=1)t[o].d()}}}function Cl(l){let e,t,i=l[2]&&it(l);return{c(){i&&i.c(),e=we()},l(r){i&&i.l(r),e=we()},m(r,s){i&&i.m(r,s),L(r,e,s),t=!0},p(r,[s]){r[2]?i?(i.p(r,s),s&4&&V(i,1)):(i=it(r),i.c(),V(i,1),i.m(e.parentNode,e)):i&&(Ee(),B(i,1,1,()=>{i=null}),Te())},i(r){t||(V(i),t=!0)},o(r){B(i),t=!1},d(r){i&&i.d(r),r&&h(e)}}}function Ol(l,e,t){let i,r,s,n,a,o,f;const d=Rt();Ce(l,d,k=>t(10,f=k));let u=!1;const b={pending:"active",completed:"finished",error:"error"},g=mt();Ce(l,g,k=>t(9,o=k));const T=()=>{u&&t(1,u=!1)},_=()=>t(1,u=!u);return l.$$.update=()=>{var k,p,m,O;l.$$.dirty&1024&&t(0,i=Object.entries(((k=f.data)==null?void 0:k.tasks)||{}).sort(([,M],[,w])=>Date.parse(w.start_timestamp)-Date.parse(M.start_timestamp))),l.$$.dirty&1&&t(5,r=i.filter(([,M])=>M.status==="pending")),l.$$.dirty&1&&t(4,s=i.filter(([,M])=>M.status==="error")),l.$$.dirty&1024&&t(3,n=((p=f.data)==null?void 0:p.progress)||0),l.$$.dirty&512&&t(2,a=((m=o.data)==null?void 0:m.access.dataset.compute_signals)||((O=o.data)==null?void 0:O.access.create_dataset))},[i,u,a,n,s,r,d,b,g,o,f,T,_]}class Al extends ae{constructor(e){super(),fe(this,e,Ol,Cl,ue,{})}}const Vl=l=>({}),ot=l=>({}),Rl=l=>({}),st=l=>({}),Bl=l=>({}),at=l=>({});function Ll(l){let e,t,i,r,s,n;return e=new Ne({props:{href:"https://lilacml.com",text:"Documentation"}}),i=new Ne({props:{href:"https://discord.gg/YpGxQMyk",text:"Discord"}}),s=new Ne({props:{href:"https://github.com/lilacai/lilac/issues/new",text:"File a bug"}}),{c(){K(e.$$.fragment),t=Q(),K(i.$$.fragment),r=Q(),K(s.$$.fragment)},l(a){te(e.$$.fragment,a),t=Z(a),te(i.$$.fragment,a),r=Z(a),te(s.$$.fragment,a)},m(a,o){x(e,a,o),L(a,t,o),x(i,a,o),L(a,r,o),x(s,a,o),n=!0},p:le,i(a){n||(V(e.$$.fragment,a),V(i.$$.fragment,a),V(s.$$.fragment,a),n=!0)},o(a){B(e.$$.fragment,a),B(i.$$.fragment,a),B(s.$$.fragment,a),n=!1},d(a){$(e,a),a&&h(t),$(i,a),a&&h(r),$(s,a)}}}function ft(l){let e,t,i,r;const s=[Sl,Pl],n=[];function a(o,f){var d;return((d=o[2].data)==null?void 0:d.user)!=null?0:1}return e=a(l),t=n[e]=s[e](l),{c(){t.c(),i=we()},l(o){t.l(o),i=we()},m(o,f){n[e].m(o,f),L(o,i,f),r=!0},p(o,f){let d=e;e=a(o),e===d?n[e].p(o,f):(Ee(),B(n[d],1,1,()=>{n[d]=null}),Te(),t=n[e],t?t.p(o,f):(t=n[e]=s[e](o),t.c()),V(t,1),t.m(i.parentNode,i))},i(o){r||(V(t),r=!0)},o(o){B(t),r=!1},d(o){n[e].d(o),o&&h(i)}}}function Pl(l){let e,t;return e=new St({props:{size:"small",href:l[4],target:l[7],$$slots:{default:[Nl]},$$scope:{ctx:l}}}),{c(){K(e.$$.fragment)},l(i){te(e.$$.fragment,i)},m(i,r){x(e,i,r),t=!0},p(i,r){const s={};r&1024&&(s.$$scope={dirty:r,ctx:i}),e.$set(s)},i(i){t||(V(e.$$.fragment,i),t=!0)},o(i){B(e.$$.fragment,i),t=!1},d(i){$(e,i)}}}function Sl(l){var b;let e,t,i=((b=l[2].data)==null?void 0:b.user.given_name)+"",r,s,n,a,o,f,d,u;return o=new bt({props:{flipped:!0,$$slots:{default:[ql]},$$scope:{ctx:l}}}),{c(){e=P("div"),t=P("div"),r=X(i),n=Q(),a=P("div"),K(o.$$.fragment),this.h()},l(g){e=S(g,"DIV",{class:!0});var T=D(e);t=S(T,"DIV",{class:!0});var _=D(t);r=W(_,i),_.forEach(h),n=Z(T),a=S(T,"DIV",{});var k=D(a);te(o.$$.fragment,k),k.forEach(h),T.forEach(h),this.h()},h(){E(t,"class","ml-2 mr-1 flex"),E(e,"class","flex h-9 flex-row items-center rounded border border-neutral-200")},m(g,T){var _,k;L(g,e,T),I(e,t),I(t,r),I(e,n),I(e,a),x(o,a,null),f=!0,d||(u=Fe(s=je.call(null,t,{text:`Logged into Google as ${(_=l[2].data)==null?void 0:_.user.name} with email ${(k=l[2].data)==null?void 0:k.user.email}`})),d=!0)},p(g,T){var k,p,m;(!f||T&4)&&i!==(i=((k=g[2].data)==null?void 0:k.user.given_name)+"")&&ne(r,i),s&&ht(s.update)&&T&4&&s.update.call(null,{text:`Logged into Google as ${(p=g[2].data)==null?void 0:p.user.name} with email ${(m=g[2].data)==null?void 0:m.user.email}`});const _={};T&1024&&(_.$$scope={dirty:T,ctx:g}),o.$set(_)},i(g){f||(V(o.$$.fragment,g),f=!0)},o(g){B(o.$$.fragment,g),f=!1},d(g){g&&h(e),$(o),d=!1,u()}}}function Nl(l){let e;return{c(){e=X("Login")},l(t){e=W(t,"Login")},m(t,i){L(t,e,i)},d(t){t&&h(e)}}}function ql(l){let e,t;return e=new Ne({props:{class:"optionOne",text:"Logout"}}),e.$on("click",l[6]),{c(){K(e.$$.fragment)},l(i){te(e.$$.fragment,i)},m(i,r){x(e,i,r),t=!0},p:le,i(i){t||(V(e.$$.fragment,i),t=!0)},o(i){B(e.$$.fragment,i),t=!1},d(i){$(e,i)}}}function yl(l){var Re;let e,t,i,r,s,n,a,o,f,d,u,b,g,T,_,k,p,m,O,M,w,C,R,oe,ce;r=new El({});const he=l[8]["header-subtext"],F=_e(he,l,l[10],at),Me=l[8]["header-center"],U=_e(Me,l,l[10],st),me=l[8]["header-right"],J=_e(me,l,l[10],ot);_=new bt({props:{flipped:!0,icon:pl,$$slots:{default:[Ll]},$$scope:{ctx:l}}}),p=new Al({});let y=((Re=l[2].data)==null?void 0:Re.auth_enabled)&&ft(l);const A=l[8].default,ie=_e(A,l,l[10],null);return C=new Lt({}),{c(){e=P("div"),t=P("div"),i=P("button"),K(r.$$.fragment),s=Q(),n=P("div"),a=P("div"),o=P("div"),F&&F.c(),f=Q(),d=P("div"),U&&U.c(),u=Q(),b=P("div"),J&&J.c(),g=Q(),T=P("div"),K(_.$$.fragment),k=Q(),K(p.$$.fragment),m=Q(),y&&y.c(),O=Q(),M=P("div"),ie&&ie.c(),w=Q(),K(C.$$.fragment),this.h()},l(z){e=S(z,"DIV",{class:!0});var H=D(e);t=S(H,"DIV",{class:!0});var Ie=D(t);i=S(Ie,"BUTTON",{class:!0});var Oe=D(i);te(r.$$.fragment,Oe),Oe.forEach(h),s=Z(Ie),n=S(Ie,"DIV",{class:!0});var ze=D(n);a=S(ze,"DIV",{class:!0});var Be=D(a);o=S(Be,"DIV",{});var Le=D(o);F&&F.l(Le),Le.forEach(h),Be.forEach(h),f=Z(ze),d=S(ze,"DIV",{class:!0});var v=D(d);U&&U.l(v),v.forEach(h),u=Z(ze),b=S(ze,"DIV",{class:!0});var N=D(b);J&&J.l(N),g=Z(N),T=S(N,"DIV",{});var be=D(T);te(_.$$.fragment,be),be.forEach(h),k=Z(N),te(p.$$.fragment,N),m=Z(N),y&&y.l(N),N.forEach(h),ze.forEach(h),Ie.forEach(h),O=Z(H),M=S(H,"DIV",{class:!0});var Pe=D(M);ie&&ie.l(Pe),Pe.forEach(h),w=Z(H),te(C.$$.fragment,H),H.forEach(h),this.h()},h(){E(i,"class","opacity-60 hover:bg-gray-200"),c(i,"invisible",l[1].open),E(a,"class","flex flex-row items-center"),E(d,"class","flex-grow flex-row items-center justify-center"),E(b,"class","flex flex-row items-center gap-x-2"),E(n,"class","flex flex-grow flex-row items-center justify-between justify-items-center gap-x-4 py-2 pr-4"),E(t,"class","header flex w-full flex-initial flex-row items-center justify-between justify-items-center border-b border-gray-200"),E(M,"class","relative flex h-full w-full overflow-hidden"),E(e,"class","flex h-full w-full flex-col")},m(z,H){L(z,e,H),I(e,t),I(t,i),x(r,i,null),I(t,s),I(t,n),I(n,a),I(a,o),F&&F.m(o,null),I(n,f),I(n,d),U&&U.m(d,null),I(n,u),I(n,b),J&&J.m(b,null),I(b,g),I(b,T),x(_,T,null),I(b,k),x(p,b,null),I(b,m),y&&y.m(b,null),I(e,O),I(e,M),ie&&ie.m(M,null),I(e,w),x(C,e,null),R=!0,oe||(ce=[Fe(je.call(null,i,{text:"Open sidebar"})),j(i,"click",l[9])],oe=!0)},p(z,[H]){var Oe;(!R||H&2)&&c(i,"invisible",z[1].open),F&&F.p&&(!R||H&1024)&&ge(F,he,z,z[10],R?pe(he,z[10],H,Bl):ve(z[10]),at),U&&U.p&&(!R||H&1024)&&ge(U,Me,z,z[10],R?pe(Me,z[10],H,Rl):ve(z[10]),st),J&&J.p&&(!R||H&1024)&&ge(J,me,z,z[10],R?pe(me,z[10],H,Vl):ve(z[10]),ot);const Ie={};H&1024&&(Ie.$$scope={dirty:H,ctx:z}),_.$set(Ie),(Oe=z[2].data)!=null&&Oe.auth_enabled?y?(y.p(z,H),H&4&&V(y,1)):(y=ft(z),y.c(),V(y,1),y.m(b,null)):y&&(Ee(),B(y,1,1,()=>{y=null}),Te()),ie&&ie.p&&(!R||H&1024)&&ge(ie,A,z,z[10],R?pe(A,z[10],H,null):ve(z[10]),null)},i(z){R||(V(r.$$.fragment,z),V(F,z),V(U,z),V(J,z),V(_.$$.fragment,z),V(p.$$.fragment,z),V(y),V(ie,z),V(C.$$.fragment,z),R=!0)},o(z){B(r.$$.fragment,z),B(F,z),B(U,z),B(J,z),B(_.$$.fragment,z),B(p.$$.fragment,z),B(y),B(ie,z),B(C.$$.fragment,z),R=!1},d(z){z&&h(e),$(r),F&&F.d(z),U&&U.d(z),J&&J.d(z),$(_),$(p),y&&y.d(),ie&&ie.d(z),$(C),oe=!1,Ve(ce)}}}function Hl(l,e,t){let i,r,s,n=le,a=()=>(n(),n=It(i,O=>t(1,s=O)),i),o;l.$$.on_destroy.push(()=>n());let{$$slots:f={},$$scope:d}=e;const u=mt();Ce(l,u,O=>t(2,o=O));const b=location.origin,g=`${b}/google/login?origin_url=${b}`,T=Tl();Ce(l,T,O=>t(11,r=O));function _(){r.mutate([])}const p=window.self!==window.top?"_blank":"",m=()=>Dt(i,s.open=!0,s);return l.$$set=O=>{"$$scope"in O&&t(10,d=O.$$scope)},a(t(0,i=Pt())),[i,s,o,u,g,T,_,p,f,m,d]}class Fl extends ae{constructor(e){super(),fe(this,e,Hl,yl,ue,{})}}export{_l as C,bt as O,Fl as P,Ne as a,cl as b};
lilac/web/_app/immutable/chunks/RowItemMetadata.760ed6a3.js ADDED
@@ -0,0 +1 @@
 
 
1
+ import{S as O,i as Q,s as X,D as de,E as R,k as B,a as te,y as me,l as V,m as p,h as k,c as le,z as ge,n as A,G as D,F as ie,b as W,a0 as P,A as ve,H as q,al as ue,ae as Ze,I as fe,J as ce,K as he,L as re,g as N,d as H,B as ke,M as Re,N as F,C as qe,O as j,P as je,t as Ue,j as Ge,Q as U,q as ae,r as ne,u as se,R as ee,w as Be,aj as Ve,Z as K,_ as J,$ as _e,a1 as be,a7 as Ke,V as Je,e as ze,v as we,f as Ee,W as Oe,X as Qe,p as Me}from"./index.b333a928.js";import{d as Se,w as oe}from"./index.2b0dd2f8.js";import{aK as Xe,d as xe,h as $e,U as et,aT as tt,L as $,aS as lt,Y as it,x as at,z as nt}from"./Commands.1fffdf33.js";import{t as st,o as rt}from"./notificationsStore.e7f2bd3e.js";import{E as ot}from"./StringSpanHighlight.d53dc1a7.js";const dt=i=>({}),pe=i=>({});function Te(i){let e=i[3].label+"",t;return{c(){t=ae(e)},l(l){t=ne(l,e)},m(l,a){W(l,t,a)},p(l,a){a[0]&8&&e!==(e=l[3].label+"")&&se(t,e)},d(l){l&&k(t)}}}function ut(i){let e,t,l,a,o,d,f,s,n,r,g,M,u=i[3]&&Te(i);o=new Xe({props:{"aria-hidden":"true",title:i[1]}});const c=i[20].default,m=de(c,i,i[19],null);let C=[{role:"navigation"},i[10]],y={};for(let h=0;h<C.length;h+=1)y=R(y,C[h]);const E=i[20].content,v=de(E,i,i[19],pe);return{c(){e=B("div"),t=B("div"),l=B("a"),u&&u.c(),a=te(),me(o.$$.fragment),f=te(),s=B("ul"),m&&m.c(),n=te(),v&&v.c(),this.h()},l(h){e=V(h,"DIV",{role:!0});var w=p(e);t=V(w,"DIV",{role:!0,tabindex:!0,"aria-label":!0});var I=p(t);l=V(I,"A",{tabindex:!0,href:!0});var T=p(l);u&&u.l(T),T.forEach(k),a=le(I),ge(o.$$.fragment,I),I.forEach(k),f=le(w),s=V(w,"UL",{role:!0});var z=p(s);m&&m.l(z),z.forEach(k),w.forEach(k),n=le(h),v&&v.l(h),this.h()},h(){A(l,"tabindex","-1"),A(l,"href",i[2]),D(l,"bx--tabs-trigger-text",!0),A(t,"role","listbox"),A(t,"tabindex","0"),A(t,"aria-label",d=i[11]["aria-label"]||"listbox"),D(t,"bx--tabs-trigger",!0),A(s,"role","tablist"),D(s,"bx--tabs__nav",!0),D(s,"bx--tabs__nav--hidden",i[5]),ie(e,y),D(e,"bx--tabs",!0),D(e,"bx--tabs--container",i[0]==="container")},m(h,w){W(h,e,w),P(e,t),P(t,l),u&&u.m(l,null),P(t,a),ve(o,t,null),P(e,f),P(e,s),m&&m.m(s,null),i[26](s),W(h,n,w),v&&v.m(h,w),r=!0,g||(M=[q(l,"click",ue(i[22])),q(l,"click",Ze(ue(i[23]))),q(t,"click",i[24]),q(t,"keypress",i[21]),q(t,"keypress",i[25])],g=!0)},p(h,w){h[3]?u?u.p(h,w):(u=Te(h),u.c(),u.m(l,null)):u&&(u.d(1),u=null),(!r||w[0]&4)&&A(l,"href",h[2]);const I={};w[0]&2&&(I.title=h[1]),o.$set(I),(!r||w[0]&2048&&d!==(d=h[11]["aria-label"]||"listbox"))&&A(t,"aria-label",d),m&&m.p&&(!r||w[0]&524288)&&fe(m,c,h,h[19],r?he(c,h[19],w,null):ce(h[19]),null),(!r||w[0]&32)&&D(s,"bx--tabs__nav--hidden",h[5]),ie(e,y=re(C,[{role:"navigation"},w[0]&1024&&h[10]])),D(e,"bx--tabs",!0),D(e,"bx--tabs--container",h[0]==="container"),v&&v.p&&(!r||w[0]&524288)&&fe(v,E,h,h[19],r?he(E,h[19],w,dt):ce(h[19]),pe)},i(h){r||(N(o.$$.fragment,h),N(m,h),N(v,h),r=!0)},o(h){H(o.$$.fragment,h),H(m,h),H(v,h),r=!1},d(h){h&&k(e),u&&u.d(),ke(o),m&&m.d(h),i[26](null),h&&k(n),v&&v.d(h),g=!1,Re(M)}}}function ft(i,e,t){let l,a;const o=["selected","type","autoWidth","iconDescription","triggerHref"];let d=F(e,o),f,s,n,r,{$$slots:g={},$$scope:M}=e,{selected:u=0}=e,{type:c="default"}=e,{autoWidth:m=!1}=e,{iconDescription:C="Show menu options"}=e,{triggerHref:y="#"}=e;const E=qe(),v=oe([]);j(i,v,b=>t(18,n=b));const h=Se(v,b=>b.reduce((S,G)=>({...S,[G.id]:G}),{}));j(i,h,b=>t(28,r=b));const w=oe(m),I=oe(void 0);j(i,I,b=>t(16,f=b));const T=oe([]);j(i,T,b=>t(17,s=b));const z=Se(T,b=>b.reduce((S,G)=>({...S,[G.id]:G}),{})),Y=oe(void 0);let Z=null;je("Tabs",{tabs:v,contentById:z,selectedTab:I,selectedContent:Y,useAutoWidth:w,add:b=>{v.update(S=>[...S,{...b,index:S.length}])},addContent:b=>{T.update(S=>[...S,{...b,index:S.length}])},update:b=>{t(14,_=r[b].index)},change:async b=>{let S=_+b;S<0?S=n.length-1:S>=n.length&&(S=0);let G=n[S].disabled;for(;G;)S=S+b,S<0?S=n.length-1:S>=n.length&&(S=0),G=n[S].disabled;t(14,_=S),await Ue();const Ae=Z==null?void 0:Z.querySelectorAll("[role='tab']")[_];Ae==null||Ae.focus()}}),Ge(()=>{t(12,u=_),x>-1&&x!==_&&E("change",_),x=_});let L=!0,_=u,x=-1;function Ne(b){ee.call(this,i,b)}function We(b){ee.call(this,i,b)}const Le=()=>{t(5,L=!L)},He=()=>{t(5,L=!L)},Fe=()=>{t(5,L=!L)};function Ye(b){Be[b?"unshift":"push"](()=>{Z=b,t(4,Z)})}return i.$$set=b=>{t(11,e=R(R({},e),U(b))),t(10,d=F(e,o)),"selected"in b&&t(12,u=b.selected),"type"in b&&t(0,c=b.type),"autoWidth"in b&&t(13,m=b.autoWidth),"iconDescription"in b&&t(1,C=b.iconDescription),"triggerHref"in b&&t(2,y=b.triggerHref),"$$scope"in b&&t(19,M=b.$$scope)},i.$$.update=()=>{i.$$.dirty[0]&4096&&t(14,_=u),i.$$.dirty[0]&278528&&t(3,l=n[_]||void 0),i.$$.dirty[0]&147456&&t(15,a=s[_]||void 0),i.$$.dirty[0]&32776&&(l&&I.set(l.id),a&&Y.set(a.id)),i.$$.dirty[0]&65536&&f&&t(5,L=!0),i.$$.dirty[0]&8192&&w.set(m)},e=U(e),[c,C,y,l,Z,L,v,h,I,T,d,e,u,m,_,a,f,s,n,M,g,Ne,We,Le,He,Fe,Ye]}class ct extends O{constructor(e){super(),Q(this,e,ft,ut,X,{selected:12,type:0,autoWidth:13,iconDescription:1,triggerHref:2},null,[-1,-1])}}const Lt=ct;function ht(i){let e;return{c(){e=ae(i[1])},l(t){e=ne(t,i[1])},m(t,l){W(t,e,l)},p(t,l){l&2&&se(e,t[1])},d(t){t&&k(e)}}}function _t(i){let e,t,l,a,o,d,f;const s=i[15].default,n=de(s,i,i[14],null),r=n||ht(i);let g=[{tabindex:"-1"},{role:"presentation"},i[12]],M={};for(let u=0;u<g.length;u+=1)M=R(M,g[u]);return{c(){e=B("li"),t=B("a"),r&&r.c(),this.h()},l(u){e=V(u,"LI",{tabindex:!0,role:!0});var c=p(e);t=V(c,"A",{role:!0,tabindex:!0,"aria-selected":!0,"aria-disabled":!0,id:!0,href:!0,style:!0});var m=p(t);r&&r.l(m),m.forEach(k),c.forEach(k),this.h()},h(){A(t,"role","tab"),A(t,"tabindex",l=i[3]?"-1":i[4]),A(t,"aria-selected",i[6]),A(t,"aria-disabled",i[3]),A(t,"id",i[5]),A(t,"href",i[2]),A(t,"style",a=i[7]?"width: auto":void 0),D(t,"bx--tabs__nav-link",!0),ie(e,M),D(e,"bx--tabs__nav-item",!0),D(e,"bx--tabs__nav-item--disabled",i[3]),D(e,"bx--tabs__nav-item--selected",i[6])},m(u,c){W(u,e,c),P(e,t),r&&r.m(t,null),i[20](t),o=!0,d||(f=[q(e,"click",ue(i[16])),q(e,"click",ue(i[21])),q(e,"mouseover",i[17]),q(e,"mouseenter",i[18]),q(e,"mouseleave",i[19]),q(e,"keydown",i[22])],d=!0)},p(u,[c]){n?n.p&&(!o||c&16384)&&fe(n,s,u,u[14],o?he(s,u[14],c,null):ce(u[14]),null):r&&r.p&&(!o||c&2)&&r.p(u,o?c:-1),(!o||c&24&&l!==(l=u[3]?"-1":u[4]))&&A(t,"tabindex",l),(!o||c&64)&&A(t,"aria-selected",u[6]),(!o||c&8)&&A(t,"aria-disabled",u[3]),(!o||c&32)&&A(t,"id",u[5]),(!o||c&4)&&A(t,"href",u[2]),(!o||c&128&&a!==(a=u[7]?"width: auto":void 0))&&A(t,"style",a),ie(e,M=re(g,[{tabindex:"-1"},{role:"presentation"},c&4096&&u[12]])),D(e,"bx--tabs__nav-item",!0),D(e,"bx--tabs__nav-item--disabled",u[3]),D(e,"bx--tabs__nav-item--selected",u[6])},i(u){o||(N(r,u),o=!0)},o(u){H(r,u),o=!1},d(u){u&&k(e),r&&r.d(u),i[20](null),d=!1,Re(f)}}}function bt(i,e,t){let l;const a=["label","href","disabled","tabindex","id","ref"];let o=F(e,a),d,f,{$$slots:s={},$$scope:n}=e,{label:r=""}=e,{href:g="#"}=e,{disabled:M=!1}=e,{tabindex:u="0"}=e,{id:c="ccs-"+Math.random().toString(36)}=e,{ref:m=null}=e;const{selectedTab:C,useAutoWidth:y,add:E,update:v,change:h}=Ve("Tabs");j(i,C,_=>t(13,d=_)),j(i,y,_=>t(7,f=_)),E({id:c,label:r,disabled:M});function w(_){ee.call(this,i,_)}function I(_){ee.call(this,i,_)}function T(_){ee.call(this,i,_)}function z(_){ee.call(this,i,_)}function Y(_){Be[_?"unshift":"push"](()=>{m=_,t(0,m)})}const Z=()=>{M||v(c)},L=({key:_})=>{M||(_==="ArrowRight"?h(1):_==="ArrowLeft"?h(-1):(_===" "||_==="Enter")&&v(c))};return i.$$set=_=>{e=R(R({},e),U(_)),t(12,o=F(e,a)),"label"in _&&t(1,r=_.label),"href"in _&&t(2,g=_.href),"disabled"in _&&t(3,M=_.disabled),"tabindex"in _&&t(4,u=_.tabindex),"id"in _&&t(5,c=_.id),"ref"in _&&t(0,m=_.ref),"$$scope"in _&&t(14,n=_.$$scope)},i.$$.update=()=>{i.$$.dirty&8224&&t(6,l=d===c)},[m,r,g,M,u,c,l,f,C,y,v,h,o,d,n,s,w,I,T,z,Y,Z,L]}class mt extends O{constructor(e){super(),Q(this,e,bt,_t,X,{label:1,href:2,disabled:3,tabindex:4,id:5,ref:0})}}const Ht=mt;function gt(i){let e,t,l,a;const o=i[12].default,d=de(o,i,i[11],null);let f=[{role:"tabpanel"},{"aria-labelledby":i[1]},{"aria-hidden":t=!i[2]},{hidden:l=i[2]?void 0:""},{id:i[0]},i[6]],s={};for(let n=0;n<f.length;n+=1)s=R(s,f[n]);return{c(){e=B("div"),d&&d.c(),this.h()},l(n){e=V(n,"DIV",{role:!0,"aria-labelledby":!0,"aria-hidden":!0,id:!0});var r=p(e);d&&d.l(r),r.forEach(k),this.h()},h(){ie(e,s),D(e,"bx--tab-content",!0)},m(n,r){W(n,e,r),d&&d.m(e,null),a=!0},p(n,[r]){d&&d.p&&(!a||r&2048)&&fe(d,o,n,n[11],a?he(o,n[11],r,null):ce(n[11]),null),ie(e,s=re(f,[{role:"tabpanel"},(!a||r&2)&&{"aria-labelledby":n[1]},(!a||r&4&&t!==(t=!n[2]))&&{"aria-hidden":t},(!a||r&4&&l!==(l=n[2]?void 0:""))&&{hidden:l},(!a||r&1)&&{id:n[0]},r&64&&n[6]])),D(e,"bx--tab-content",!0)},i(n){a||(N(d,n),a=!0)},o(n){H(d,n),a=!1},d(n){n&&k(e),d&&d.d(n)}}}function vt(i,e,t){let l,a,o;const d=["id"];let f=F(e,d),s,n,r,{$$slots:g={},$$scope:M}=e,{id:u="ccs-"+Math.random().toString(36)}=e;const{selectedContent:c,addContent:m,tabs:C,contentById:y}=Ve("Tabs");return j(i,c,E=>t(10,r=E)),j(i,C,E=>t(8,s=E)),j(i,y,E=>t(9,n=E)),m({id:u}),i.$$set=E=>{e=R(R({},e),U(E)),t(6,f=F(e,d)),"id"in E&&t(0,u=E.id),"$$scope"in E&&t(11,M=E.$$scope)},i.$$.update=()=>{i.$$.dirty&1025&&t(2,l=r===u),i.$$.dirty&513&&t(7,a=n[u].index),i.$$.dirty&384&&t(1,o=s[a].id)},[u,o,l,c,C,y,f,a,s,n,r,M,g]}class kt extends O{constructor(e){super(),Q(this,e,vt,gt,X,{id:0})}}const Ft=kt;function Pe(i){let e,t;return{c(){e=K("title"),t=ae(i[1])},l(l){e=J(l,"title",{});var a=p(e);t=ne(a,i[1]),a.forEach(k)},m(l,a){W(l,e,a),P(e,t)},p(l,a){a&2&&se(t,l[1])},d(l){l&&k(e)}}}function At(i){let e,t,l=i[1]&&Pe(i),a=[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},{width:i[0]},{height:i[0]},i[2],i[3]],o={};for(let d=0;d<a.length;d+=1)o=R(o,a[d]);return{c(){e=K("svg"),l&&l.c(),t=K("path"),this.h()},l(d){e=J(d,"svg",{xmlns:!0,viewBox:!0,fill:!0,preserveAspectRatio:!0,width:!0,height:!0});var f=p(e);l&&l.l(f),t=J(f,"path",{d:!0}),p(t).forEach(k),f.forEach(k),this.h()},h(){A(t,"d","M16 7a3 3 0 113-3A3.0033 3.0033 0 0116 7zm0-4a1 1 0 101 1A1.001 1.001 0 0016 3zM11 30a3 3 0 113-3A3.0033 3.0033 0 0111 30zm0-4a1 1 0 101 1A1.001 1.001 0 0011 26zM7 11a3 3 0 113-3A3.0033 3.0033 0 017 11zM7 7A1 1 0 108 8 1.001 1.001 0 007 7zM21 30a3 3 0 113-3A3.0033 3.0033 0 0121 30zm0-4a1 1 0 101 1A1.001 1.001 0 0021 26zM25 11a3 3 0 113-3A3.0033 3.0033 0 0125 11zm0-4a1 1 0 101 1A1.001 1.001 0 0025 7zM4 21a3 3 0 113-3A3.0033 3.0033 0 014 21zm0-4a1 1 0 101 1A1.001 1.001 0 004 17zM28 21a3 3 0 113-3A3.0033 3.0033 0 0128 21zm0-4a1 1 0 101 1A1.001 1.001 0 0028 17zM16 22a6 6 0 116-6A6.0069 6.0069 0 0116 22zm0-10a4 4 0 104 4A4.0045 4.0045 0 0016 12z"),_e(e,o)},m(d,f){W(d,e,f),l&&l.m(e,null),P(e,t)},p(d,[f]){d[1]?l?l.p(d,f):(l=Pe(d),l.c(),l.m(e,t)):l&&(l.d(1),l=null),_e(e,o=re(a,[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},f&1&&{width:d[0]},f&1&&{height:d[0]},f&4&&d[2],f&8&&d[3]]))},i:be,o:be,d(d){d&&k(e),l&&l.d()}}}function wt(i,e,t){let l,a;const o=["size","title"];let d=F(e,o),{size:f=16}=e,{title:s=void 0}=e;return i.$$set=n=>{t(5,e=R(R({},e),U(n))),t(3,d=F(e,o)),"size"in n&&t(0,f=n.size),"title"in n&&t(1,s=n.title)},i.$$.update=()=>{t(4,l=e["aria-label"]||e["aria-labelledby"]||s),t(2,a={"aria-hidden":l?void 0:!0,role:l?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=U(e),[f,s,a,d,l]}class Et extends O{constructor(e){super(),Q(this,e,wt,At,X,{size:0,title:1})}}function Ce(i){let e,t;return{c(){e=K("title"),t=ae(i[1])},l(l){e=J(l,"title",{});var a=p(e);t=ne(a,i[1]),a.forEach(k)},m(l,a){W(l,e,a),P(e,t)},p(l,a){a&2&&se(t,l[1])},d(l){l&&k(e)}}}function zt(i){let e,t,l,a=i[1]&&Ce(i),o=[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},{width:i[0]},{height:i[0]},i[2],i[3]],d={};for(let f=0;f<o.length;f+=1)d=R(d,o[f]);return{c(){e=K("svg"),a&&a.c(),t=K("path"),l=K("path"),this.h()},l(f){e=J(f,"svg",{xmlns:!0,viewBox:!0,fill:!0,preserveAspectRatio:!0,width:!0,height:!0});var s=p(e);a&&a.l(s),t=J(s,"path",{d:!0}),p(t).forEach(k),l=J(s,"path",{d:!0}),p(l).forEach(k),s.forEach(k),this.h()},h(){A(t,"d","M30.94,15.66A16.69,16.69,0,0,0,16,5,16.69,16.69,0,0,0,1.06,15.66a1,1,0,0,0,0,.68A16.69,16.69,0,0,0,16,27,16.69,16.69,0,0,0,30.94,16.34,1,1,0,0,0,30.94,15.66ZM16,25c-5.3,0-10.9-3.93-12.93-9C5.1,10.93,10.7,7,16,7s10.9,3.93,12.93,9C26.9,21.07,21.3,25,16,25Z"),A(l,"d","M16,10a6,6,0,1,0,6,6A6,6,0,0,0,16,10Zm0,10a4,4,0,1,1,4-4A4,4,0,0,1,16,20Z"),_e(e,d)},m(f,s){W(f,e,s),a&&a.m(e,null),P(e,t),P(e,l)},p(f,[s]){f[1]?a?a.p(f,s):(a=Ce(f),a.c(),a.m(e,t)):a&&(a.d(1),a=null),_e(e,d=re(o,[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},s&1&&{width:f[0]},s&1&&{height:f[0]},s&4&&f[2],s&8&&f[3]]))},i:be,o:be,d(f){f&&k(e),a&&a.d()}}}function Mt(i,e,t){let l,a;const o=["size","title"];let d=F(e,o),{size:f=16}=e,{title:s=void 0}=e;return i.$$set=n=>{t(5,e=R(R({},e),U(n))),t(3,d=F(e,o)),"size"in n&&t(0,f=n.size),"title"in n&&t(1,s=n.title)},i.$$.update=()=>{t(4,l=e["aria-label"]||e["aria-labelledby"]||s),t(2,a={"aria-hidden":l?void 0:!0,role:l?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=U(e),[f,s,a,d,l]}class St extends O{constructor(e){super(),Q(this,e,Mt,zt,X,{size:0,title:1})}}function pt(i){let e,t,l,a,o;const d=[i[3],{type:i[0]?"green":"blue"},{icon:i[2]}];let f={};for(let s=0;s<d.length;s+=1)f=R(f,d[s]);return t=new xe({props:f}),{c(){e=B("div"),me(t.$$.fragment),this.h()},l(s){e=V(s,"DIV",{class:!0});var n=p(e);ge(t.$$.fragment,n),n.forEach(k),this.h()},h(){A(e,"class","signal-badge")},m(s,n){W(s,e,n),ve(t,e,null),l=!0,a||(o=Ke($e.call(null,e,{text:i[1]})),a=!0)},p(s,[n]){const r=n&13?re(d,[n&8&&Je(s[3]),n&1&&{type:s[0]?"green":"blue"},n&4&&{icon:s[2]}]):{};t.$set(r)},i(s){l||(N(t.$$.fragment,s),l=!0)},o(s){H(t.$$.fragment,s),l=!1},d(s){s&&k(e),ke(t),a=!1,o()}}}function Tt(i,e,t){const l=["isPreview"];let a=F(e,l),{isPreview:o=!1}=e;const d=o?"Signal is in preview mode and has not been computed for the whole dataset.":"Generated by a signal.",f=o?St:Et;return i.$$set=s=>{e=R(R({},e),U(s)),t(3,a=F(e,l)),"isPreview"in s&&t(0,o=s.isPreview)},[o,d,f,a]}class Pt extends O{constructor(e){super(),Q(this,e,Tt,pt,X,{isPreview:0})}}function ye(i,e,t){const l=i.slice();return l[0]=e[t],l}function Ie(i){let e,t,l=[],a=new Map,o,d=i[1];const f=s=>nt(s[0].path);for(let s=0;s<d.length;s+=1){let n=ye(i,d,s),r=f(n);a.set(r,l[s]=De(r,n))}return{c(){e=B("div"),t=B("table");for(let s=0;s<l.length;s+=1)l[s].c();this.h()},l(s){e=V(s,"DIV",{class:!0});var n=p(e);t=V(n,"TABLE",{class:!0});var r=p(t);for(let g=0;g<l.length;g+=1)l[g].l(r);r.forEach(k),n.forEach(k),this.h()},h(){A(t,"class","table w-full table-fixed border-collapse px-2 pt-1"),A(e,"class","border-t border-neutral-200 px-2 py-4")},m(s,n){W(s,e,n),P(e,t);for(let r=0;r<l.length;r+=1)l[r]&&l[r].m(t,null);o=!0},p(s,n){n&2&&(d=s[1],we(),l=Oe(l,n,f,1,s,d,a,t,Qe,De,null,ye),Ee())},i(s){if(!o){for(let n=0;n<d.length;n+=1)N(l[n]);o=!0}},o(s){for(let n=0;n<l.length;n+=1)H(l[n]);o=!1},d(s){s&&k(e);for(let n=0;n<l.length;n+=1)l[n].d()}}}function Ct(i){let e,t;return e=new Pt({props:{isPreview:i[0].isPreviewSignal}}),{c(){me(e.$$.fragment)},l(l){ge(e.$$.fragment,l)},m(l,a){ve(e,l,a),t=!0},p(l,a){const o={};a&2&&(o.isPreview=l[0].isPreviewSignal),e.$set(o)},i(l){t||(N(e.$$.fragment,l),t=!0)},o(l){H(e.$$.fragment,l),t=!1},d(l){ke(e,l)}}}function yt(i){var l;let e,t;return e=new ot({props:{hideEmbeddingName:!0,embedding:(l=i[0].field.signal)==null?void 0:l.signal_name}}),{c(){me(e.$$.fragment)},l(a){ge(e.$$.fragment,a)},m(a,o){ve(e,a,o),t=!0},p(a,o){var f;const d={};o&2&&(d.embedding=(f=a[0].field.signal)==null?void 0:f.signal_name),e.$set(d)},i(a){t||(N(e.$$.fragment,a),t=!0)},o(a){H(e.$$.fragment,a),t=!1},d(a){ke(e,a)}}}function De(i,e){let t,l,a,o=e[0].fieldName+"",d,f,s,n,r,g,M,u,c,m=e[0].formattedValue+"",C,y,E,v;const h=[yt,Ct],w=[];function I(T,z){return T[0].isEmbeddingSignal?0:T[0].isSignal?1:-1}return~(r=I(e))&&(g=w[r]=h[r](e)),{key:i,first:null,c(){t=B("tr"),l=B("td"),a=B("span"),d=ae(o),s=te(),n=B("td"),g&&g.c(),M=te(),u=B("td"),c=B("div"),C=ae(m),E=te(),this.h()},l(T){t=V(T,"TR",{class:!0});var z=p(t);l=V(z,"TD",{class:!0});var Y=p(l);a=V(Y,"SPAN",{title:!0});var Z=p(a);d=ne(Z,o),Z.forEach(k),Y.forEach(k),s=le(z),n=V(z,"TD",{class:!0});var L=p(n);g&&g.l(L),L.forEach(k),M=le(z),u=V(z,"TD",{class:!0});var _=p(u);c=V(_,"DIV",{title:!0,class:!0});var x=p(c);C=ne(x,m),x.forEach(k),_.forEach(k),E=le(z),z.forEach(k),this.h()},h(){A(a,"title",f=e[0].fieldName),Me(a,"padding-left",`${e[0].indentLevel*12}px`),A(l,"class","truncate p-2 font-mono text-xs font-medium text-neutral-500"),A(n,"class","w-10"),A(c,"title",y=`${e[0].value}`),A(c,"class","truncate pr-2 text-xs"),D(c,"italic",e[0].formattedValue===null),A(u,"class","p-2"),A(t,"class","border-gray-300"),this.first=t},m(T,z){W(T,t,z),P(t,l),P(l,a),P(a,d),P(t,s),P(t,n),~r&&w[r].m(n,null),P(t,M),P(t,u),P(u,c),P(c,C),P(t,E),v=!0},p(T,z){e=T,(!v||z&2)&&o!==(o=e[0].fieldName+"")&&se(d,o),(!v||z&2&&f!==(f=e[0].fieldName))&&A(a,"title",f),z&2&&Me(a,"padding-left",`${e[0].indentLevel*12}px`);let Y=r;r=I(e),r===Y?~r&&w[r].p(e,z):(g&&(we(),H(w[Y],1,1,()=>{w[Y]=null}),Ee()),~r?(g=w[r],g?g.p(e,z):(g=w[r]=h[r](e),g.c()),N(g,1),g.m(n,null)):g=null),(!v||z&2)&&m!==(m=e[0].formattedValue+"")&&se(C,m),(!v||z&2&&y!==(y=`${e[0].value}`))&&A(c,"title",y),(!v||z&2)&&D(c,"italic",e[0].formattedValue===null)},i(T){v||(N(g),v=!0)},o(T){H(g),v=!1},d(T){T&&k(t),~r&&w[r].d()}}}function It(i){let e,t,l=i[1].length>0&&Ie(i);return{c(){l&&l.c(),e=ze()},l(a){l&&l.l(a),e=ze()},m(a,o){l&&l.m(a,o),W(a,e,o),t=!0},p(a,[o]){a[1].length>0?l?(l.p(a,o),o&2&&N(l,1)):(l=Ie(a),l.c(),N(l,1),l.m(e.parentNode,e)):l&&(we(),H(l,1,1,()=>{l=null}),Ee())},i(a){t||(N(l),t=!0)},o(a){H(l),t=!1},d(a){l&&l.d(a),a&&k(e)}}}function Dt(i,e,t){let l,a,{row:o}=e,{visibleFields:d}=e,{selectRowsSchema:f=void 0}=e;const s=et();j(i,s,r=>t(5,a=r));function n(r){const g=tt(r).filter(u=>st(u,d)),M=g.filter(u=>{var c;return((c=$.field(u))==null?void 0:c.dtype)==="string_span"}).map(u=>$.path(u));return g.filter(u=>!M.some(c=>lt($.path(u),c))).map(u=>{var h;const c=$.field(u),m=$.path(u);let C=$.value(u);if(c.dtype==="string_span")return null;const y=((h=a.data)==null?void 0:h.some(w=>{var I;return w.name===((I=c.signal)==null?void 0:I.signal_name)}))||!1,E=it(c);let v;return y||E&&c.dtype==null||c.dtype==="embedding"||c.repeated_field!=null?v="":C==null?v=null:v=at(C),{indentLevel:m.length-1,fieldName:m[m.length-1],field:c,path:m,isSignal:E,isPreviewSignal:f!=null?rt(f,m):!1,isEmbeddingSignal:y,value:C,formattedValue:v}}).filter(u=>u!=null)}return i.$$set=r=>{"row"in r&&t(0,o=r.row),"visibleFields"in r&&t(3,d=r.visibleFields),"selectRowsSchema"in r&&t(4,f=r.selectRowsSchema)},i.$$.update=()=>{i.$$.dirty&1&&t(1,l=n(o))},[o,l,s,d,f]}class Yt extends O{constructor(e){super(),Q(this,e,Dt,It,X,{row:0,visibleFields:3,selectRowsSchema:4})}}export{Yt as R,Pt as S,Lt as T,Ht as a,Ft as b};
lilac/web/_app/immutable/chunks/RowItemMetadata.d22dceae.js ADDED
@@ -0,0 +1 @@
 
 
1
+ import{S as O,i as Q,s as X,D as de,E as R,k as B,a as te,y as me,l as V,m as p,h as k,c as le,z as ge,n as A,G as D,F as ie,b as W,a0 as P,A as ve,H as q,ak as ue,ad as Ze,I as fe,J as ce,K as he,L as re,g as N,d as H,B as ke,M as Re,N as F,C as qe,O as U,P as Ue,t as je,j as Ge,Q as j,q as ae,r as ne,u as se,R as ee,w as Be,ai as Ve,Z as K,_ as J,$ as _e,a1 as be,a7 as Ke,V as Je,e as ze,v as we,f as Ee,W as Oe,X as Qe,p as Me}from"./index.b7741aa8.js";import{d as Se,w as oe}from"./index.d3776286.js";import{aK as Xe,d as xe,h as $e,U as et,aT as tt,L as $,aS as lt,Y as it,x as at,z as nt}from"./Commands.539ca0ee.js";import{t as st,o as rt}from"./notificationsStore.87d33d60.js";import{E as ot}from"./StringSpanHighlight.d39d06de.js";const dt=i=>({}),pe=i=>({});function Te(i){let e=i[3].label+"",t;return{c(){t=ae(e)},l(l){t=ne(l,e)},m(l,a){W(l,t,a)},p(l,a){a[0]&8&&e!==(e=l[3].label+"")&&se(t,e)},d(l){l&&k(t)}}}function ut(i){let e,t,l,a,o,d,f,s,n,r,g,M,u=i[3]&&Te(i);o=new Xe({props:{"aria-hidden":"true",title:i[1]}});const c=i[20].default,m=de(c,i,i[19],null);let C=[{role:"navigation"},i[10]],y={};for(let h=0;h<C.length;h+=1)y=R(y,C[h]);const E=i[20].content,v=de(E,i,i[19],pe);return{c(){e=B("div"),t=B("div"),l=B("a"),u&&u.c(),a=te(),me(o.$$.fragment),f=te(),s=B("ul"),m&&m.c(),n=te(),v&&v.c(),this.h()},l(h){e=V(h,"DIV",{role:!0});var w=p(e);t=V(w,"DIV",{role:!0,tabindex:!0,"aria-label":!0});var I=p(t);l=V(I,"A",{tabindex:!0,href:!0});var T=p(l);u&&u.l(T),T.forEach(k),a=le(I),ge(o.$$.fragment,I),I.forEach(k),f=le(w),s=V(w,"UL",{role:!0});var z=p(s);m&&m.l(z),z.forEach(k),w.forEach(k),n=le(h),v&&v.l(h),this.h()},h(){A(l,"tabindex","-1"),A(l,"href",i[2]),D(l,"bx--tabs-trigger-text",!0),A(t,"role","listbox"),A(t,"tabindex","0"),A(t,"aria-label",d=i[11]["aria-label"]||"listbox"),D(t,"bx--tabs-trigger",!0),A(s,"role","tablist"),D(s,"bx--tabs__nav",!0),D(s,"bx--tabs__nav--hidden",i[5]),ie(e,y),D(e,"bx--tabs",!0),D(e,"bx--tabs--container",i[0]==="container")},m(h,w){W(h,e,w),P(e,t),P(t,l),u&&u.m(l,null),P(t,a),ve(o,t,null),P(e,f),P(e,s),m&&m.m(s,null),i[26](s),W(h,n,w),v&&v.m(h,w),r=!0,g||(M=[q(l,"click",ue(i[22])),q(l,"click",Ze(ue(i[23]))),q(t,"click",i[24]),q(t,"keypress",i[21]),q(t,"keypress",i[25])],g=!0)},p(h,w){h[3]?u?u.p(h,w):(u=Te(h),u.c(),u.m(l,null)):u&&(u.d(1),u=null),(!r||w[0]&4)&&A(l,"href",h[2]);const I={};w[0]&2&&(I.title=h[1]),o.$set(I),(!r||w[0]&2048&&d!==(d=h[11]["aria-label"]||"listbox"))&&A(t,"aria-label",d),m&&m.p&&(!r||w[0]&524288)&&fe(m,c,h,h[19],r?he(c,h[19],w,null):ce(h[19]),null),(!r||w[0]&32)&&D(s,"bx--tabs__nav--hidden",h[5]),ie(e,y=re(C,[{role:"navigation"},w[0]&1024&&h[10]])),D(e,"bx--tabs",!0),D(e,"bx--tabs--container",h[0]==="container"),v&&v.p&&(!r||w[0]&524288)&&fe(v,E,h,h[19],r?he(E,h[19],w,dt):ce(h[19]),pe)},i(h){r||(N(o.$$.fragment,h),N(m,h),N(v,h),r=!0)},o(h){H(o.$$.fragment,h),H(m,h),H(v,h),r=!1},d(h){h&&k(e),u&&u.d(),ke(o),m&&m.d(h),i[26](null),h&&k(n),v&&v.d(h),g=!1,Re(M)}}}function ft(i,e,t){let l,a;const o=["selected","type","autoWidth","iconDescription","triggerHref"];let d=F(e,o),f,s,n,r,{$$slots:g={},$$scope:M}=e,{selected:u=0}=e,{type:c="default"}=e,{autoWidth:m=!1}=e,{iconDescription:C="Show menu options"}=e,{triggerHref:y="#"}=e;const E=qe(),v=oe([]);U(i,v,b=>t(18,n=b));const h=Se(v,b=>b.reduce((S,G)=>({...S,[G.id]:G}),{}));U(i,h,b=>t(28,r=b));const w=oe(m),I=oe(void 0);U(i,I,b=>t(16,f=b));const T=oe([]);U(i,T,b=>t(17,s=b));const z=Se(T,b=>b.reduce((S,G)=>({...S,[G.id]:G}),{})),Y=oe(void 0);let Z=null;Ue("Tabs",{tabs:v,contentById:z,selectedTab:I,selectedContent:Y,useAutoWidth:w,add:b=>{v.update(S=>[...S,{...b,index:S.length}])},addContent:b=>{T.update(S=>[...S,{...b,index:S.length}])},update:b=>{t(14,_=r[b].index)},change:async b=>{let S=_+b;S<0?S=n.length-1:S>=n.length&&(S=0);let G=n[S].disabled;for(;G;)S=S+b,S<0?S=n.length-1:S>=n.length&&(S=0),G=n[S].disabled;t(14,_=S),await je();const Ae=Z==null?void 0:Z.querySelectorAll("[role='tab']")[_];Ae==null||Ae.focus()}}),Ge(()=>{t(12,u=_),x>-1&&x!==_&&E("change",_),x=_});let L=!0,_=u,x=-1;function Ne(b){ee.call(this,i,b)}function We(b){ee.call(this,i,b)}const Le=()=>{t(5,L=!L)},He=()=>{t(5,L=!L)},Fe=()=>{t(5,L=!L)};function Ye(b){Be[b?"unshift":"push"](()=>{Z=b,t(4,Z)})}return i.$$set=b=>{t(11,e=R(R({},e),j(b))),t(10,d=F(e,o)),"selected"in b&&t(12,u=b.selected),"type"in b&&t(0,c=b.type),"autoWidth"in b&&t(13,m=b.autoWidth),"iconDescription"in b&&t(1,C=b.iconDescription),"triggerHref"in b&&t(2,y=b.triggerHref),"$$scope"in b&&t(19,M=b.$$scope)},i.$$.update=()=>{i.$$.dirty[0]&4096&&t(14,_=u),i.$$.dirty[0]&278528&&t(3,l=n[_]||void 0),i.$$.dirty[0]&147456&&t(15,a=s[_]||void 0),i.$$.dirty[0]&32776&&(l&&I.set(l.id),a&&Y.set(a.id)),i.$$.dirty[0]&65536&&f&&t(5,L=!0),i.$$.dirty[0]&8192&&w.set(m)},e=j(e),[c,C,y,l,Z,L,v,h,I,T,d,e,u,m,_,a,f,s,n,M,g,Ne,We,Le,He,Fe,Ye]}class ct extends O{constructor(e){super(),Q(this,e,ft,ut,X,{selected:12,type:0,autoWidth:13,iconDescription:1,triggerHref:2},null,[-1,-1])}}const Lt=ct;function ht(i){let e;return{c(){e=ae(i[1])},l(t){e=ne(t,i[1])},m(t,l){W(t,e,l)},p(t,l){l&2&&se(e,t[1])},d(t){t&&k(e)}}}function _t(i){let e,t,l,a,o,d,f;const s=i[15].default,n=de(s,i,i[14],null),r=n||ht(i);let g=[{tabindex:"-1"},{role:"presentation"},i[12]],M={};for(let u=0;u<g.length;u+=1)M=R(M,g[u]);return{c(){e=B("li"),t=B("a"),r&&r.c(),this.h()},l(u){e=V(u,"LI",{tabindex:!0,role:!0});var c=p(e);t=V(c,"A",{role:!0,tabindex:!0,"aria-selected":!0,"aria-disabled":!0,id:!0,href:!0,style:!0});var m=p(t);r&&r.l(m),m.forEach(k),c.forEach(k),this.h()},h(){A(t,"role","tab"),A(t,"tabindex",l=i[3]?"-1":i[4]),A(t,"aria-selected",i[6]),A(t,"aria-disabled",i[3]),A(t,"id",i[5]),A(t,"href",i[2]),A(t,"style",a=i[7]?"width: auto":void 0),D(t,"bx--tabs__nav-link",!0),ie(e,M),D(e,"bx--tabs__nav-item",!0),D(e,"bx--tabs__nav-item--disabled",i[3]),D(e,"bx--tabs__nav-item--selected",i[6])},m(u,c){W(u,e,c),P(e,t),r&&r.m(t,null),i[20](t),o=!0,d||(f=[q(e,"click",ue(i[16])),q(e,"click",ue(i[21])),q(e,"mouseover",i[17]),q(e,"mouseenter",i[18]),q(e,"mouseleave",i[19]),q(e,"keydown",i[22])],d=!0)},p(u,[c]){n?n.p&&(!o||c&16384)&&fe(n,s,u,u[14],o?he(s,u[14],c,null):ce(u[14]),null):r&&r.p&&(!o||c&2)&&r.p(u,o?c:-1),(!o||c&24&&l!==(l=u[3]?"-1":u[4]))&&A(t,"tabindex",l),(!o||c&64)&&A(t,"aria-selected",u[6]),(!o||c&8)&&A(t,"aria-disabled",u[3]),(!o||c&32)&&A(t,"id",u[5]),(!o||c&4)&&A(t,"href",u[2]),(!o||c&128&&a!==(a=u[7]?"width: auto":void 0))&&A(t,"style",a),ie(e,M=re(g,[{tabindex:"-1"},{role:"presentation"},c&4096&&u[12]])),D(e,"bx--tabs__nav-item",!0),D(e,"bx--tabs__nav-item--disabled",u[3]),D(e,"bx--tabs__nav-item--selected",u[6])},i(u){o||(N(r,u),o=!0)},o(u){H(r,u),o=!1},d(u){u&&k(e),r&&r.d(u),i[20](null),d=!1,Re(f)}}}function bt(i,e,t){let l;const a=["label","href","disabled","tabindex","id","ref"];let o=F(e,a),d,f,{$$slots:s={},$$scope:n}=e,{label:r=""}=e,{href:g="#"}=e,{disabled:M=!1}=e,{tabindex:u="0"}=e,{id:c="ccs-"+Math.random().toString(36)}=e,{ref:m=null}=e;const{selectedTab:C,useAutoWidth:y,add:E,update:v,change:h}=Ve("Tabs");U(i,C,_=>t(13,d=_)),U(i,y,_=>t(7,f=_)),E({id:c,label:r,disabled:M});function w(_){ee.call(this,i,_)}function I(_){ee.call(this,i,_)}function T(_){ee.call(this,i,_)}function z(_){ee.call(this,i,_)}function Y(_){Be[_?"unshift":"push"](()=>{m=_,t(0,m)})}const Z=()=>{M||v(c)},L=({key:_})=>{M||(_==="ArrowRight"?h(1):_==="ArrowLeft"?h(-1):(_===" "||_==="Enter")&&v(c))};return i.$$set=_=>{e=R(R({},e),j(_)),t(12,o=F(e,a)),"label"in _&&t(1,r=_.label),"href"in _&&t(2,g=_.href),"disabled"in _&&t(3,M=_.disabled),"tabindex"in _&&t(4,u=_.tabindex),"id"in _&&t(5,c=_.id),"ref"in _&&t(0,m=_.ref),"$$scope"in _&&t(14,n=_.$$scope)},i.$$.update=()=>{i.$$.dirty&8224&&t(6,l=d===c)},[m,r,g,M,u,c,l,f,C,y,v,h,o,d,n,s,w,I,T,z,Y,Z,L]}class mt extends O{constructor(e){super(),Q(this,e,bt,_t,X,{label:1,href:2,disabled:3,tabindex:4,id:5,ref:0})}}const Ht=mt;function gt(i){let e,t,l,a;const o=i[12].default,d=de(o,i,i[11],null);let f=[{role:"tabpanel"},{"aria-labelledby":i[1]},{"aria-hidden":t=!i[2]},{hidden:l=i[2]?void 0:""},{id:i[0]},i[6]],s={};for(let n=0;n<f.length;n+=1)s=R(s,f[n]);return{c(){e=B("div"),d&&d.c(),this.h()},l(n){e=V(n,"DIV",{role:!0,"aria-labelledby":!0,"aria-hidden":!0,id:!0});var r=p(e);d&&d.l(r),r.forEach(k),this.h()},h(){ie(e,s),D(e,"bx--tab-content",!0)},m(n,r){W(n,e,r),d&&d.m(e,null),a=!0},p(n,[r]){d&&d.p&&(!a||r&2048)&&fe(d,o,n,n[11],a?he(o,n[11],r,null):ce(n[11]),null),ie(e,s=re(f,[{role:"tabpanel"},(!a||r&2)&&{"aria-labelledby":n[1]},(!a||r&4&&t!==(t=!n[2]))&&{"aria-hidden":t},(!a||r&4&&l!==(l=n[2]?void 0:""))&&{hidden:l},(!a||r&1)&&{id:n[0]},r&64&&n[6]])),D(e,"bx--tab-content",!0)},i(n){a||(N(d,n),a=!0)},o(n){H(d,n),a=!1},d(n){n&&k(e),d&&d.d(n)}}}function vt(i,e,t){let l,a,o;const d=["id"];let f=F(e,d),s,n,r,{$$slots:g={},$$scope:M}=e,{id:u="ccs-"+Math.random().toString(36)}=e;const{selectedContent:c,addContent:m,tabs:C,contentById:y}=Ve("Tabs");return U(i,c,E=>t(10,r=E)),U(i,C,E=>t(8,s=E)),U(i,y,E=>t(9,n=E)),m({id:u}),i.$$set=E=>{e=R(R({},e),j(E)),t(6,f=F(e,d)),"id"in E&&t(0,u=E.id),"$$scope"in E&&t(11,M=E.$$scope)},i.$$.update=()=>{i.$$.dirty&1025&&t(2,l=r===u),i.$$.dirty&513&&t(7,a=n[u].index),i.$$.dirty&384&&t(1,o=s[a].id)},[u,o,l,c,C,y,f,a,s,n,r,M,g]}class kt extends O{constructor(e){super(),Q(this,e,vt,gt,X,{id:0})}}const Ft=kt;function Pe(i){let e,t;return{c(){e=K("title"),t=ae(i[1])},l(l){e=J(l,"title",{});var a=p(e);t=ne(a,i[1]),a.forEach(k)},m(l,a){W(l,e,a),P(e,t)},p(l,a){a&2&&se(t,l[1])},d(l){l&&k(e)}}}function At(i){let e,t,l=i[1]&&Pe(i),a=[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},{width:i[0]},{height:i[0]},i[2],i[3]],o={};for(let d=0;d<a.length;d+=1)o=R(o,a[d]);return{c(){e=K("svg"),l&&l.c(),t=K("path"),this.h()},l(d){e=J(d,"svg",{xmlns:!0,viewBox:!0,fill:!0,preserveAspectRatio:!0,width:!0,height:!0});var f=p(e);l&&l.l(f),t=J(f,"path",{d:!0}),p(t).forEach(k),f.forEach(k),this.h()},h(){A(t,"d","M16 7a3 3 0 113-3A3.0033 3.0033 0 0116 7zm0-4a1 1 0 101 1A1.001 1.001 0 0016 3zM11 30a3 3 0 113-3A3.0033 3.0033 0 0111 30zm0-4a1 1 0 101 1A1.001 1.001 0 0011 26zM7 11a3 3 0 113-3A3.0033 3.0033 0 017 11zM7 7A1 1 0 108 8 1.001 1.001 0 007 7zM21 30a3 3 0 113-3A3.0033 3.0033 0 0121 30zm0-4a1 1 0 101 1A1.001 1.001 0 0021 26zM25 11a3 3 0 113-3A3.0033 3.0033 0 0125 11zm0-4a1 1 0 101 1A1.001 1.001 0 0025 7zM4 21a3 3 0 113-3A3.0033 3.0033 0 014 21zm0-4a1 1 0 101 1A1.001 1.001 0 004 17zM28 21a3 3 0 113-3A3.0033 3.0033 0 0128 21zm0-4a1 1 0 101 1A1.001 1.001 0 0028 17zM16 22a6 6 0 116-6A6.0069 6.0069 0 0116 22zm0-10a4 4 0 104 4A4.0045 4.0045 0 0016 12z"),_e(e,o)},m(d,f){W(d,e,f),l&&l.m(e,null),P(e,t)},p(d,[f]){d[1]?l?l.p(d,f):(l=Pe(d),l.c(),l.m(e,t)):l&&(l.d(1),l=null),_e(e,o=re(a,[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},f&1&&{width:d[0]},f&1&&{height:d[0]},f&4&&d[2],f&8&&d[3]]))},i:be,o:be,d(d){d&&k(e),l&&l.d()}}}function wt(i,e,t){let l,a;const o=["size","title"];let d=F(e,o),{size:f=16}=e,{title:s=void 0}=e;return i.$$set=n=>{t(5,e=R(R({},e),j(n))),t(3,d=F(e,o)),"size"in n&&t(0,f=n.size),"title"in n&&t(1,s=n.title)},i.$$.update=()=>{t(4,l=e["aria-label"]||e["aria-labelledby"]||s),t(2,a={"aria-hidden":l?void 0:!0,role:l?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=j(e),[f,s,a,d,l]}class Et extends O{constructor(e){super(),Q(this,e,wt,At,X,{size:0,title:1})}}function Ce(i){let e,t;return{c(){e=K("title"),t=ae(i[1])},l(l){e=J(l,"title",{});var a=p(e);t=ne(a,i[1]),a.forEach(k)},m(l,a){W(l,e,a),P(e,t)},p(l,a){a&2&&se(t,l[1])},d(l){l&&k(e)}}}function zt(i){let e,t,l,a=i[1]&&Ce(i),o=[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},{width:i[0]},{height:i[0]},i[2],i[3]],d={};for(let f=0;f<o.length;f+=1)d=R(d,o[f]);return{c(){e=K("svg"),a&&a.c(),t=K("path"),l=K("path"),this.h()},l(f){e=J(f,"svg",{xmlns:!0,viewBox:!0,fill:!0,preserveAspectRatio:!0,width:!0,height:!0});var s=p(e);a&&a.l(s),t=J(s,"path",{d:!0}),p(t).forEach(k),l=J(s,"path",{d:!0}),p(l).forEach(k),s.forEach(k),this.h()},h(){A(t,"d","M30.94,15.66A16.69,16.69,0,0,0,16,5,16.69,16.69,0,0,0,1.06,15.66a1,1,0,0,0,0,.68A16.69,16.69,0,0,0,16,27,16.69,16.69,0,0,0,30.94,16.34,1,1,0,0,0,30.94,15.66ZM16,25c-5.3,0-10.9-3.93-12.93-9C5.1,10.93,10.7,7,16,7s10.9,3.93,12.93,9C26.9,21.07,21.3,25,16,25Z"),A(l,"d","M16,10a6,6,0,1,0,6,6A6,6,0,0,0,16,10Zm0,10a4,4,0,1,1,4-4A4,4,0,0,1,16,20Z"),_e(e,d)},m(f,s){W(f,e,s),a&&a.m(e,null),P(e,t),P(e,l)},p(f,[s]){f[1]?a?a.p(f,s):(a=Ce(f),a.c(),a.m(e,t)):a&&(a.d(1),a=null),_e(e,d=re(o,[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},s&1&&{width:f[0]},s&1&&{height:f[0]},s&4&&f[2],s&8&&f[3]]))},i:be,o:be,d(f){f&&k(e),a&&a.d()}}}function Mt(i,e,t){let l,a;const o=["size","title"];let d=F(e,o),{size:f=16}=e,{title:s=void 0}=e;return i.$$set=n=>{t(5,e=R(R({},e),j(n))),t(3,d=F(e,o)),"size"in n&&t(0,f=n.size),"title"in n&&t(1,s=n.title)},i.$$.update=()=>{t(4,l=e["aria-label"]||e["aria-labelledby"]||s),t(2,a={"aria-hidden":l?void 0:!0,role:l?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=j(e),[f,s,a,d,l]}class St extends O{constructor(e){super(),Q(this,e,Mt,zt,X,{size:0,title:1})}}function pt(i){let e,t,l,a,o;const d=[i[3],{type:i[0]?"green":"blue"},{icon:i[2]}];let f={};for(let s=0;s<d.length;s+=1)f=R(f,d[s]);return t=new xe({props:f}),{c(){e=B("div"),me(t.$$.fragment),this.h()},l(s){e=V(s,"DIV",{class:!0});var n=p(e);ge(t.$$.fragment,n),n.forEach(k),this.h()},h(){A(e,"class","signal-badge")},m(s,n){W(s,e,n),ve(t,e,null),l=!0,a||(o=Ke($e.call(null,e,{text:i[1]})),a=!0)},p(s,[n]){const r=n&13?re(d,[n&8&&Je(s[3]),n&1&&{type:s[0]?"green":"blue"},n&4&&{icon:s[2]}]):{};t.$set(r)},i(s){l||(N(t.$$.fragment,s),l=!0)},o(s){H(t.$$.fragment,s),l=!1},d(s){s&&k(e),ke(t),a=!1,o()}}}function Tt(i,e,t){const l=["isPreview"];let a=F(e,l),{isPreview:o=!1}=e;const d=o?"Signal is in preview mode and has not been computed for the whole dataset.":"Generated by a signal.",f=o?St:Et;return i.$$set=s=>{e=R(R({},e),j(s)),t(3,a=F(e,l)),"isPreview"in s&&t(0,o=s.isPreview)},[o,d,f,a]}class Pt extends O{constructor(e){super(),Q(this,e,Tt,pt,X,{isPreview:0})}}function ye(i,e,t){const l=i.slice();return l[0]=e[t],l}function Ie(i){let e,t,l=[],a=new Map,o,d=i[1];const f=s=>nt(s[0].path);for(let s=0;s<d.length;s+=1){let n=ye(i,d,s),r=f(n);a.set(r,l[s]=De(r,n))}return{c(){e=B("div"),t=B("table");for(let s=0;s<l.length;s+=1)l[s].c();this.h()},l(s){e=V(s,"DIV",{class:!0});var n=p(e);t=V(n,"TABLE",{class:!0});var r=p(t);for(let g=0;g<l.length;g+=1)l[g].l(r);r.forEach(k),n.forEach(k),this.h()},h(){A(t,"class","table w-full table-fixed border-collapse px-2 pt-1"),A(e,"class","border-t border-neutral-200 px-2 py-4")},m(s,n){W(s,e,n),P(e,t);for(let r=0;r<l.length;r+=1)l[r]&&l[r].m(t,null);o=!0},p(s,n){n&2&&(d=s[1],we(),l=Oe(l,n,f,1,s,d,a,t,Qe,De,null,ye),Ee())},i(s){if(!o){for(let n=0;n<d.length;n+=1)N(l[n]);o=!0}},o(s){for(let n=0;n<l.length;n+=1)H(l[n]);o=!1},d(s){s&&k(e);for(let n=0;n<l.length;n+=1)l[n].d()}}}function Ct(i){let e,t;return e=new Pt({props:{isPreview:i[0].isPreviewSignal}}),{c(){me(e.$$.fragment)},l(l){ge(e.$$.fragment,l)},m(l,a){ve(e,l,a),t=!0},p(l,a){const o={};a&2&&(o.isPreview=l[0].isPreviewSignal),e.$set(o)},i(l){t||(N(e.$$.fragment,l),t=!0)},o(l){H(e.$$.fragment,l),t=!1},d(l){ke(e,l)}}}function yt(i){var l;let e,t;return e=new ot({props:{hideEmbeddingName:!0,embedding:(l=i[0].field.signal)==null?void 0:l.signal_name}}),{c(){me(e.$$.fragment)},l(a){ge(e.$$.fragment,a)},m(a,o){ve(e,a,o),t=!0},p(a,o){var f;const d={};o&2&&(d.embedding=(f=a[0].field.signal)==null?void 0:f.signal_name),e.$set(d)},i(a){t||(N(e.$$.fragment,a),t=!0)},o(a){H(e.$$.fragment,a),t=!1},d(a){ke(e,a)}}}function De(i,e){let t,l,a,o=e[0].fieldName+"",d,f,s,n,r,g,M,u,c,m=e[0].formattedValue+"",C,y,E,v;const h=[yt,Ct],w=[];function I(T,z){return T[0].isEmbeddingSignal?0:T[0].isSignal?1:-1}return~(r=I(e))&&(g=w[r]=h[r](e)),{key:i,first:null,c(){t=B("tr"),l=B("td"),a=B("span"),d=ae(o),s=te(),n=B("td"),g&&g.c(),M=te(),u=B("td"),c=B("div"),C=ae(m),E=te(),this.h()},l(T){t=V(T,"TR",{class:!0});var z=p(t);l=V(z,"TD",{class:!0});var Y=p(l);a=V(Y,"SPAN",{title:!0});var Z=p(a);d=ne(Z,o),Z.forEach(k),Y.forEach(k),s=le(z),n=V(z,"TD",{class:!0});var L=p(n);g&&g.l(L),L.forEach(k),M=le(z),u=V(z,"TD",{class:!0});var _=p(u);c=V(_,"DIV",{title:!0,class:!0});var x=p(c);C=ne(x,m),x.forEach(k),_.forEach(k),E=le(z),z.forEach(k),this.h()},h(){A(a,"title",f=e[0].fieldName),Me(a,"padding-left",`${e[0].indentLevel*12}px`),A(l,"class","truncate p-2 font-mono text-xs font-medium text-neutral-500"),A(n,"class","w-10"),A(c,"title",y=`${e[0].value}`),A(c,"class","truncate pr-2 text-xs"),D(c,"italic",e[0].formattedValue===null),A(u,"class","p-2"),A(t,"class","border-gray-300"),this.first=t},m(T,z){W(T,t,z),P(t,l),P(l,a),P(a,d),P(t,s),P(t,n),~r&&w[r].m(n,null),P(t,M),P(t,u),P(u,c),P(c,C),P(t,E),v=!0},p(T,z){e=T,(!v||z&2)&&o!==(o=e[0].fieldName+"")&&se(d,o),(!v||z&2&&f!==(f=e[0].fieldName))&&A(a,"title",f),z&2&&Me(a,"padding-left",`${e[0].indentLevel*12}px`);let Y=r;r=I(e),r===Y?~r&&w[r].p(e,z):(g&&(we(),H(w[Y],1,1,()=>{w[Y]=null}),Ee()),~r?(g=w[r],g?g.p(e,z):(g=w[r]=h[r](e),g.c()),N(g,1),g.m(n,null)):g=null),(!v||z&2)&&m!==(m=e[0].formattedValue+"")&&se(C,m),(!v||z&2&&y!==(y=`${e[0].value}`))&&A(c,"title",y),(!v||z&2)&&D(c,"italic",e[0].formattedValue===null)},i(T){v||(N(g),v=!0)},o(T){H(g),v=!1},d(T){T&&k(t),~r&&w[r].d()}}}function It(i){let e,t,l=i[1].length>0&&Ie(i);return{c(){l&&l.c(),e=ze()},l(a){l&&l.l(a),e=ze()},m(a,o){l&&l.m(a,o),W(a,e,o),t=!0},p(a,[o]){a[1].length>0?l?(l.p(a,o),o&2&&N(l,1)):(l=Ie(a),l.c(),N(l,1),l.m(e.parentNode,e)):l&&(we(),H(l,1,1,()=>{l=null}),Ee())},i(a){t||(N(l),t=!0)},o(a){H(l),t=!1},d(a){l&&l.d(a),a&&k(e)}}}function Dt(i,e,t){let l,a,{row:o}=e,{visibleFields:d}=e,{selectRowsSchema:f=void 0}=e;const s=et();U(i,s,r=>t(5,a=r));function n(r){const g=tt(r).filter(u=>st(u,d)),M=g.filter(u=>{var c;return((c=$.field(u))==null?void 0:c.dtype)==="string_span"}).map(u=>$.path(u));return g.filter(u=>!M.some(c=>lt($.path(u),c))).map(u=>{var h;const c=$.field(u),m=$.path(u);let C=$.value(u);if(c.dtype==="string_span")return null;const y=((h=a.data)==null?void 0:h.some(w=>{var I;return w.name===((I=c.signal)==null?void 0:I.signal_name)}))||!1,E=it(c);let v;return y||E&&c.dtype==null||c.dtype==="embedding"||c.repeated_field!=null?v="":C==null?v=null:v=at(C),{indentLevel:m.length-1,fieldName:m[m.length-1],field:c,path:m,isSignal:E,isPreviewSignal:f!=null?rt(f,m):!1,isEmbeddingSignal:y,value:C,formattedValue:v}}).filter(u=>u!=null)}return i.$$set=r=>{"row"in r&&t(0,o=r.row),"visibleFields"in r&&t(3,d=r.visibleFields),"selectRowsSchema"in r&&t(4,f=r.selectRowsSchema)},i.$$.update=()=>{i.$$.dirty&1&&t(1,l=n(o))},[o,l,s,d,f]}class Yt extends O{constructor(e){super(),Q(this,e,Dt,It,X,{row:0,visibleFields:3,selectRowsSchema:4})}}export{Yt as R,Pt as S,Lt as T,Ht as a,Ft as b};
lilac/web/_app/immutable/chunks/Settings.e24cc1d1.js ADDED
@@ -0,0 +1 @@
 
 
1
+ import{S as M,i as z,s as E,E as m,Z as f,_ as o,m as _,h as u,n as g,$ as v,b as p,a0 as c,L as Z,a1 as L,N as b,Q as w,q as S,r as B,u as C}from"./index.b333a928.js";function A(r){let e,l;return{c(){e=f("title"),l=S(r[1])},l(i){e=o(i,"title",{});var t=_(e);l=B(t,r[1]),t.forEach(u)},m(i,t){p(i,e,t),c(e,l)},p(i,t){t&2&&C(l,i[1])},d(i){i&&u(e)}}}function R(r){let e,l,i,t=r[1]&&A(r),h=[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},{width:r[0]},{height:r[0]},r[2],r[3]],n={};for(let a=0;a<h.length;a+=1)n=m(n,h[a]);return{c(){e=f("svg"),t&&t.c(),l=f("path"),i=f("path"),this.h()},l(a){e=o(a,"svg",{xmlns:!0,viewBox:!0,fill:!0,preserveAspectRatio:!0,width:!0,height:!0});var s=_(e);t&&t.l(s),l=o(s,"path",{d:!0}),_(l).forEach(u),i=o(s,"path",{d:!0}),_(i).forEach(u),s.forEach(u),this.h()},h(){g(l,"d","M27,16.76c0-.25,0-.5,0-.76s0-.51,0-.77l1.92-1.68A2,2,0,0,0,29.3,11L26.94,7a2,2,0,0,0-1.73-1,2,2,0,0,0-.64.1l-2.43.82a11.35,11.35,0,0,0-1.31-.75l-.51-2.52a2,2,0,0,0-2-1.61H13.64a2,2,0,0,0-2,1.61l-.51,2.52a11.48,11.48,0,0,0-1.32.75L7.43,6.06A2,2,0,0,0,6.79,6,2,2,0,0,0,5.06,7L2.7,11a2,2,0,0,0,.41,2.51L5,15.24c0,.25,0,.5,0,.76s0,.51,0,.77L3.11,18.45A2,2,0,0,0,2.7,21L5.06,25a2,2,0,0,0,1.73,1,2,2,0,0,0,.64-.1l2.43-.82a11.35,11.35,0,0,0,1.31.75l.51,2.52a2,2,0,0,0,2,1.61h4.72a2,2,0,0,0,2-1.61l.51-2.52a11.48,11.48,0,0,0,1.32-.75l2.42.82a2,2,0,0,0,.64.1,2,2,0,0,0,1.73-1L29.3,21a2,2,0,0,0-.41-2.51ZM25.21,24l-3.43-1.16a8.86,8.86,0,0,1-2.71,1.57L18.36,28H13.64l-.71-3.55a9.36,9.36,0,0,1-2.7-1.57L6.79,24,4.43,20l2.72-2.4a8.9,8.9,0,0,1,0-3.13L4.43,12,6.79,8l3.43,1.16a8.86,8.86,0,0,1,2.71-1.57L13.64,4h4.72l.71,3.55a9.36,9.36,0,0,1,2.7,1.57L25.21,8,27.57,12l-2.72,2.4a8.9,8.9,0,0,1,0,3.13L27.57,20Z"),g(i,"d","M16,22a6,6,0,1,1,6-6A5.94,5.94,0,0,1,16,22Zm0-10a3.91,3.91,0,0,0-4,4,3.91,3.91,0,0,0,4,4,3.91,3.91,0,0,0,4-4A3.91,3.91,0,0,0,16,12Z"),v(e,n)},m(a,s){p(a,e,s),t&&t.m(e,null),c(e,l),c(e,i)},p(a,[s]){a[1]?t?t.p(a,s):(t=A(a),t.c(),t.m(e,l)):t&&(t.d(1),t=null),v(e,n=Z(h,[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},s&1&&{width:a[0]},s&1&&{height:a[0]},s&4&&a[2],s&8&&a[3]]))},i:L,o:L,d(a){a&&u(e),t&&t.d()}}}function k(r,e,l){let i,t;const h=["size","title"];let n=b(e,h),{size:a=16}=e,{title:s=void 0}=e;return r.$$set=d=>{l(5,e=m(m({},e),w(d))),l(3,n=b(e,h)),"size"in d&&l(0,a=d.size),"title"in d&&l(1,s=d.title)},r.$$.update=()=>{l(4,i=e["aria-label"]||e["aria-labelledby"]||s),l(2,t={"aria-hidden":i?void 0:!0,role:i?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=w(e),[a,s,t,n,i]}class x extends M{constructor(e){super(),z(this,e,k,R,E,{size:0,title:1})}}export{x as S};
lilac/web/_app/immutable/chunks/StringSpanHighlight.d39d06de.js ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ import{S as le,i as ie,s as ne,E as R,k as B,a as U,l as L,m as w,c as X,h as c,F as De,G as C,n as V,b as P,a0 as S,al as Oe,H as O,g as N,v as x,d as A,f as $,L as he,M as ze,N as G,ah as wt,Q as ee,D as Et,I as yt,J as Tt,K as Nt,q as z,r as M,u as Y,y as ae,z as se,A as oe,B as re,R as Q,w as Ct,Z as K,_ as J,$ as fe,a1 as j,a7 as pe,V as Vt,a2 as bt,a3 as Fe,C as Pt,W as gt,X as Ht,p as te,ae as Bt,an as Lt,a4 as At,O as Ye,ai as It,e as Ee,ab as zt,aa as je}from"./index.b7741aa8.js";import{aL as Mt,d as Rt,h as vt,a0 as Le,y as pt,I as kt,az as Dt,L as Se,z as we,aA as Ot,H as Ft,B as St,aO as Yt}from"./Commands.539ca0ee.js";import{A as Ue,p as Xe,I as jt,u as Ut,v as Xt,f as Wt}from"./notificationsStore.87d33d60.js";import{d as qt}from"./utils.f3891c80.js";const Gt=i=>({}),We=i=>({});function qe(i){let e,t,l,a;const f=i[20].labelText,o=Et(f,i,i[19],We),n=o||Kt(i);let r=i[5]&&Ge(i);return{c(){e=B("div"),t=B("label"),n&&n.c(),l=U(),r&&r.c(),this.h()},l(s){e=L(s,"DIV",{});var u=w(e);t=L(u,"LABEL",{for:!0});var d=w(t);n&&n.l(d),d.forEach(c),l=X(u),r&&r.l(u),u.forEach(c),this.h()},h(){V(t,"for",i[14]),C(t,"bx--label",!0),C(t,"bx--visually-hidden",i[11]),C(t,"bx--label--disabled",i[7]),C(e,"bx--text-area__label-wrapper",!0)},m(s,u){P(s,e,u),S(e,t),n&&n.m(t,null),S(e,l),r&&r.m(e,null),a=!0},p(s,u){o?o.p&&(!a||u[0]&524288)&&yt(o,f,s,s[19],a?Nt(f,s[19],u,Gt):Tt(s[19]),We):n&&n.p&&(!a||u[0]&1024)&&n.p(s,a?u:[-1,-1]),(!a||u[0]&16384)&&V(t,"for",s[14]),(!a||u[0]&2048)&&C(t,"bx--visually-hidden",s[11]),(!a||u[0]&128)&&C(t,"bx--label--disabled",s[7]),s[5]?r?r.p(s,u):(r=Ge(s),r.c(),r.m(e,null)):r&&(r.d(1),r=null)},i(s){a||(N(n,s),a=!0)},o(s){A(n,s),a=!1},d(s){s&&c(e),n&&n.d(s),r&&r.d()}}}function Kt(i){let e;return{c(){e=z(i[10])},l(t){e=M(t,i[10])},m(t,l){P(t,e,l)},p(t,l){l[0]&1024&&Y(e,t[10])},d(t){t&&c(e)}}}function Ge(i){let e,t=i[0].length+"",l,a,f;return{c(){e=B("div"),l=z(t),a=z("/"),f=z(i[5]),this.h()},l(o){e=L(o,"DIV",{});var n=w(e);l=M(n,t),a=M(n,"/"),f=M(n,i[5]),n.forEach(c),this.h()},h(){C(e,"bx--label",!0),C(e,"bx--label--disabled",i[7])},m(o,n){P(o,e,n),S(e,l),S(e,a),S(e,f)},p(o,n){n[0]&1&&t!==(t=o[0].length+"")&&Y(l,t),n[0]&32&&Y(f,o[5]),n[0]&128&&C(e,"bx--label--disabled",o[7])},d(o){o&&c(e)}}}function Ke(i){let e,t;return e=new Mt({props:{class:"bx--text-area__invalid-icon"}}),{c(){ae(e.$$.fragment)},l(l){se(e.$$.fragment,l)},m(l,a){oe(e,l,a),t=!0},i(l){t||(N(e.$$.fragment,l),t=!0)},o(l){A(e.$$.fragment,l),t=!1},d(l){re(e,l)}}}function Je(i){let e,t;return{c(){e=B("div"),t=z(i[9]),this.h()},l(l){e=L(l,"DIV",{});var a=w(e);t=M(a,i[9]),a.forEach(c),this.h()},h(){C(e,"bx--form__helper-text",!0),C(e,"bx--form__helper-text--disabled",i[7])},m(l,a){P(l,e,a),S(e,t)},p(l,a){a[0]&512&&Y(t,l[9]),a[0]&128&&C(e,"bx--form__helper-text--disabled",l[7])},d(l){l&&c(e)}}}function Qe(i){let e,t;return{c(){e=B("div"),t=z(i[13]),this.h()},l(l){e=L(l,"DIV",{id:!0});var a=w(e);t=M(a,i[13]),a.forEach(c),this.h()},h(){V(e,"id",i[16]),C(e,"bx--form-requirement",!0)},m(l,a){P(l,e,a),S(e,t)},p(l,a){a[0]&8192&&Y(t,l[13]),a[0]&65536&&V(e,"id",l[16])},d(l){l&&c(e)}}}function Jt(i){let e,t,l,a,f,o,n,r,s,u,d,m,g,y,h=(i[10]||i[17].labelText)&&!i[11]&&qe(i),v=i[12]&&Ke(),T=[{"aria-invalid":o=i[12]||void 0},{"aria-describedby":n=i[12]?i[16]:void 0},{disabled:i[7]},{id:i[14]},{name:i[15]},{cols:i[3]},{rows:i[4]},{placeholder:i[2]},{readOnly:i[8]},{maxlength:r=i[5]??void 0},i[18]],I={};for(let _=0;_<T.length;_+=1)I=R(I,T[_]);let E=!i[12]&&i[9]&&Je(i),H=i[12]&&Qe(i);return{c(){e=B("div"),h&&h.c(),t=U(),l=B("div"),v&&v.c(),a=U(),f=B("textarea"),u=U(),E&&E.c(),d=U(),H&&H.c(),this.h()},l(_){e=L(_,"DIV",{});var k=w(e);h&&h.l(k),t=X(k),l=L(k,"DIV",{"data-invalid":!0});var F=w(l);v&&v.l(F),a=X(F),f=L(F,"TEXTAREA",{"aria-invalid":!0,"aria-describedby":!0,id:!0,name:!0,cols:!0,rows:!0,placeholder:!0,maxlength:!0}),w(f).forEach(c),F.forEach(c),u=X(k),E&&E.l(k),d=X(k),H&&H.l(k),k.forEach(c),this.h()},h(){De(f,I),C(f,"bx--text-area",!0),C(f,"bx--text-area--light",i[6]),C(f,"bx--text-area--invalid",i[12]),V(l,"data-invalid",s=i[12]||void 0),C(l,"bx--text-area__wrapper",!0),C(e,"bx--form-item",!0)},m(_,k){P(_,e,k),h&&h.m(e,null),S(e,t),S(e,l),v&&v.m(l,null),S(l,a),S(l,f),f.autofocus&&f.focus(),i[32](f),Oe(f,i[0]),S(e,u),E&&E.m(e,null),S(e,d),H&&H.m(e,null),m=!0,g||(y=[O(f,"input",i[33]),O(f,"change",i[25]),O(f,"input",i[26]),O(f,"keydown",i[27]),O(f,"keyup",i[28]),O(f,"focus",i[29]),O(f,"blur",i[30]),O(f,"paste",i[31]),O(e,"click",i[21]),O(e,"mouseover",i[22]),O(e,"mouseenter",i[23]),O(e,"mouseleave",i[24])],g=!0)},p(_,k){(_[10]||_[17].labelText)&&!_[11]?h?(h.p(_,k),k[0]&134144&&N(h,1)):(h=qe(_),h.c(),N(h,1),h.m(e,t)):h&&(x(),A(h,1,1,()=>{h=null}),$()),_[12]?v?k[0]&4096&&N(v,1):(v=Ke(),v.c(),N(v,1),v.m(l,a)):v&&(x(),A(v,1,1,()=>{v=null}),$()),De(f,I=he(T,[(!m||k[0]&4096&&o!==(o=_[12]||void 0))&&{"aria-invalid":o},(!m||k[0]&69632&&n!==(n=_[12]?_[16]:void 0))&&{"aria-describedby":n},(!m||k[0]&128)&&{disabled:_[7]},(!m||k[0]&16384)&&{id:_[14]},(!m||k[0]&32768)&&{name:_[15]},(!m||k[0]&8)&&{cols:_[3]},(!m||k[0]&16)&&{rows:_[4]},(!m||k[0]&4)&&{placeholder:_[2]},(!m||k[0]&256)&&{readOnly:_[8]},(!m||k[0]&32&&r!==(r=_[5]??void 0))&&{maxlength:r},k[0]&262144&&_[18]])),k[0]&1&&Oe(f,_[0]),C(f,"bx--text-area",!0),C(f,"bx--text-area--light",_[6]),C(f,"bx--text-area--invalid",_[12]),(!m||k[0]&4096&&s!==(s=_[12]||void 0))&&V(l,"data-invalid",s),!_[12]&&_[9]?E?E.p(_,k):(E=Je(_),E.c(),E.m(e,d)):E&&(E.d(1),E=null),_[12]?H?H.p(_,k):(H=Qe(_),H.c(),H.m(e,null)):H&&(H.d(1),H=null)},i(_){m||(N(h),N(v),m=!0)},o(_){A(h),A(v),m=!1},d(_){_&&c(e),h&&h.d(),v&&v.d(),i[32](null),E&&E.d(),H&&H.d(),g=!1,ze(y)}}}function Qt(i,e,t){let l;const a=["value","placeholder","cols","rows","maxCount","light","disabled","readonly","helperText","labelText","hideLabel","invalid","invalidText","id","name","ref"];let f=G(e,a),{$$slots:o={},$$scope:n}=e;const r=wt(o);let{value:s=""}=e,{placeholder:u=""}=e,{cols:d=50}=e,{rows:m=4}=e,{maxCount:g=void 0}=e,{light:y=!1}=e,{disabled:h=!1}=e,{readonly:v=!1}=e,{helperText:T=""}=e,{labelText:I=""}=e,{hideLabel:E=!1}=e,{invalid:H=!1}=e,{invalidText:_=""}=e,{id:k="ccs-"+Math.random().toString(36)}=e,{name:F=void 0}=e,{ref:W=null}=e;function q(b){Q.call(this,i,b)}function ue(b){Q.call(this,i,b)}function de(b){Q.call(this,i,b)}function ce(b){Q.call(this,i,b)}function Z(b){Q.call(this,i,b)}function ke(b){Q.call(this,i,b)}function me(b){Q.call(this,i,b)}function ye(b){Q.call(this,i,b)}function Te(b){Q.call(this,i,b)}function Ne(b){Q.call(this,i,b)}function Ce(b){Q.call(this,i,b)}function Ve(b){Ct[b?"unshift":"push"](()=>{W=b,t(1,W)})}function Pe(){s=this.value,t(0,s)}return i.$$set=b=>{e=R(R({},e),ee(b)),t(18,f=G(e,a)),"value"in b&&t(0,s=b.value),"placeholder"in b&&t(2,u=b.placeholder),"cols"in b&&t(3,d=b.cols),"rows"in b&&t(4,m=b.rows),"maxCount"in b&&t(5,g=b.maxCount),"light"in b&&t(6,y=b.light),"disabled"in b&&t(7,h=b.disabled),"readonly"in b&&t(8,v=b.readonly),"helperText"in b&&t(9,T=b.helperText),"labelText"in b&&t(10,I=b.labelText),"hideLabel"in b&&t(11,E=b.hideLabel),"invalid"in b&&t(12,H=b.invalid),"invalidText"in b&&t(13,_=b.invalidText),"id"in b&&t(14,k=b.id),"name"in b&&t(15,F=b.name),"ref"in b&&t(1,W=b.ref),"$$scope"in b&&t(19,n=b.$$scope)},i.$$.update=()=>{i.$$.dirty[0]&16384&&t(16,l=`error-${k}`)},[s,W,u,d,m,g,y,h,v,T,I,E,H,_,k,F,l,r,f,n,o,q,ue,de,ce,Z,ke,me,ye,Te,Ne,Ce,Ve,Pe]}class Zt extends le{constructor(e){super(),ie(this,e,Qt,Jt,ne,{value:0,placeholder:2,cols:3,rows:4,maxCount:5,light:6,disabled:7,readonly:8,helperText:9,labelText:10,hideLabel:11,invalid:12,invalidText:13,id:14,name:15,ref:1},null,[-1,-1])}}const Yl=Zt;function Ze(i){let e,t;return{c(){e=K("title"),t=z(i[1])},l(l){e=J(l,"title",{});var a=w(e);t=M(a,i[1]),a.forEach(c)},m(l,a){P(l,e,a),S(e,t)},p(l,a){a&2&&Y(t,l[1])},d(l){l&&c(e)}}}function xt(i){let e,t,l=i[1]&&Ze(i),a=[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},{width:i[0]},{height:i[0]},i[2],i[3]],f={};for(let o=0;o<a.length;o+=1)f=R(f,a[o]);return{c(){e=K("svg"),l&&l.c(),t=K("path"),this.h()},l(o){e=J(o,"svg",{xmlns:!0,viewBox:!0,fill:!0,preserveAspectRatio:!0,width:!0,height:!0});var n=w(e);l&&l.l(n),t=J(n,"path",{d:!0}),w(t).forEach(c),n.forEach(c),this.h()},h(){V(t,"d","M24.59 16.59L17 24.17 17 4 15 4 15 24.17 7.41 16.59 6 18 16 28 26 18 24.59 16.59z"),fe(e,f)},m(o,n){P(o,e,n),l&&l.m(e,null),S(e,t)},p(o,[n]){o[1]?l?l.p(o,n):(l=Ze(o),l.c(),l.m(e,t)):l&&(l.d(1),l=null),fe(e,f=he(a,[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},n&1&&{width:o[0]},n&1&&{height:o[0]},n&4&&o[2],n&8&&o[3]]))},i:j,o:j,d(o){o&&c(e),l&&l.d()}}}function $t(i,e,t){let l,a;const f=["size","title"];let o=G(e,f),{size:n=16}=e,{title:r=void 0}=e;return i.$$set=s=>{t(5,e=R(R({},e),ee(s))),t(3,o=G(e,f)),"size"in s&&t(0,n=s.size),"title"in s&&t(1,r=s.title)},i.$$.update=()=>{t(4,l=e["aria-label"]||e["aria-labelledby"]||r),t(2,a={"aria-hidden":l?void 0:!0,role:l?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=ee(e),[n,r,a,o,l]}class el extends le{constructor(e){super(),ie(this,e,$t,xt,ne,{size:0,title:1})}}function xe(i){let e,t;return{c(){e=K("title"),t=z(i[1])},l(l){e=J(l,"title",{});var a=w(e);t=M(a,i[1]),a.forEach(c)},m(l,a){P(l,e,a),S(e,t)},p(l,a){a&2&&Y(t,l[1])},d(l){l&&c(e)}}}function tl(i){let e,t,l=i[1]&&xe(i),a=[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},{width:i[0]},{height:i[0]},i[2],i[3]],f={};for(let o=0;o<a.length;o+=1)f=R(f,a[o]);return{c(){e=K("svg"),l&&l.c(),t=K("path"),this.h()},l(o){e=J(o,"svg",{xmlns:!0,viewBox:!0,fill:!0,preserveAspectRatio:!0,width:!0,height:!0});var n=w(e);l&&l.l(n),t=J(n,"path",{d:!0}),w(t).forEach(c),n.forEach(c),this.h()},h(){V(t,"d","M16 4L6 14 7.41 15.41 15 7.83 15 28 17 28 17 7.83 24.59 15.41 26 14 16 4z"),fe(e,f)},m(o,n){P(o,e,n),l&&l.m(e,null),S(e,t)},p(o,[n]){o[1]?l?l.p(o,n):(l=xe(o),l.c(),l.m(e,t)):l&&(l.d(1),l=null),fe(e,f=he(a,[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},n&1&&{width:o[0]},n&1&&{height:o[0]},n&4&&o[2],n&8&&o[3]]))},i:j,o:j,d(o){o&&c(e),l&&l.d()}}}function ll(i,e,t){let l,a;const f=["size","title"];let o=G(e,f),{size:n=16}=e,{title:r=void 0}=e;return i.$$set=s=>{t(5,e=R(R({},e),ee(s))),t(3,o=G(e,f)),"size"in s&&t(0,n=s.size),"title"in s&&t(1,r=s.title)},i.$$.update=()=>{t(4,l=e["aria-label"]||e["aria-labelledby"]||r),t(2,a={"aria-hidden":l?void 0:!0,role:l?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=ee(e),[n,r,a,o,l]}class il extends le{constructor(e){super(),ie(this,e,ll,tl,ne,{size:0,title:1})}}function $e(i){let e,t;return{c(){e=K("title"),t=z(i[1])},l(l){e=J(l,"title",{});var a=w(e);t=M(a,i[1]),a.forEach(c)},m(l,a){P(l,e,a),S(e,t)},p(l,a){a&2&&Y(t,l[1])},d(l){l&&c(e)}}}function nl(i){let e,t,l=i[1]&&$e(i),a=[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},{width:i[0]},{height:i[0]},i[2],i[3]],f={};for(let o=0;o<a.length;o+=1)f=R(f,a[o]);return{c(){e=K("svg"),l&&l.c(),t=K("path"),this.h()},l(o){e=J(o,"svg",{xmlns:!0,viewBox:!0,fill:!0,preserveAspectRatio:!0,width:!0,height:!0});var n=w(e);l&&l.l(n),t=J(n,"path",{d:!0}),w(t).forEach(c),n.forEach(c),this.h()},h(){V(t,"d","M2 2H7V16H2zM23 2H9V16.8027l3.0422 4.5635.8453 5.9165A2.0094 2.0094 0 0014.8672 29H15a3.0033 3.0033 0 003-3V20h8a4.0045 4.0045 0 004-4V9A7.0078 7.0078 0 0023 2z"),fe(e,f)},m(o,n){P(o,e,n),l&&l.m(e,null),S(e,t)},p(o,[n]){o[1]?l?l.p(o,n):(l=$e(o),l.c(),l.m(e,t)):l&&(l.d(1),l=null),fe(e,f=he(a,[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},n&1&&{width:o[0]},n&1&&{height:o[0]},n&4&&o[2],n&8&&o[3]]))},i:j,o:j,d(o){o&&c(e),l&&l.d()}}}function al(i,e,t){let l,a;const f=["size","title"];let o=G(e,f),{size:n=16}=e,{title:r=void 0}=e;return i.$$set=s=>{t(5,e=R(R({},e),ee(s))),t(3,o=G(e,f)),"size"in s&&t(0,n=s.size),"title"in s&&t(1,r=s.title)},i.$$.update=()=>{t(4,l=e["aria-label"]||e["aria-labelledby"]||r),t(2,a={"aria-hidden":l?void 0:!0,role:l?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=ee(e),[n,r,a,o,l]}class sl extends le{constructor(e){super(),ie(this,e,al,nl,ne,{size:0,title:1})}}function et(i){let e,t;return{c(){e=K("title"),t=z(i[1])},l(l){e=J(l,"title",{});var a=w(e);t=M(a,i[1]),a.forEach(c)},m(l,a){P(l,e,a),S(e,t)},p(l,a){a&2&&Y(t,l[1])},d(l){l&&c(e)}}}function ol(i){let e,t,l=i[1]&&et(i),a=[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},{width:i[0]},{height:i[0]},i[2],i[3]],f={};for(let o=0;o<a.length;o+=1)f=R(f,a[o]);return{c(){e=K("svg"),l&&l.c(),t=K("path"),this.h()},l(o){e=J(o,"svg",{xmlns:!0,viewBox:!0,fill:!0,preserveAspectRatio:!0,width:!0,height:!0});var n=w(e);l&&l.l(n),t=J(n,"path",{d:!0}),w(t).forEach(c),n.forEach(c),this.h()},h(){V(t,"d","M2 16H7V30H2zM23 30H9V15.1973l3.0422-4.5635.8453-5.9165A2.0094 2.0094 0 0114.8672 3H15a3.0033 3.0033 0 013 3v6h8a4.0045 4.0045 0 014 4v7A7.0078 7.0078 0 0123 30z"),fe(e,f)},m(o,n){P(o,e,n),l&&l.m(e,null),S(e,t)},p(o,[n]){o[1]?l?l.p(o,n):(l=et(o),l.c(),l.m(e,t)):l&&(l.d(1),l=null),fe(e,f=he(a,[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},n&1&&{width:o[0]},n&1&&{height:o[0]},n&4&&o[2],n&8&&o[3]]))},i:j,o:j,d(o){o&&c(e),l&&l.d()}}}function rl(i,e,t){let l,a;const f=["size","title"];let o=G(e,f),{size:n=16}=e,{title:r=void 0}=e;return i.$$set=s=>{t(5,e=R(R({},e),ee(s))),t(3,o=G(e,f)),"size"in s&&t(0,n=s.size),"title"in s&&t(1,r=s.title)},i.$$.update=()=>{t(4,l=e["aria-label"]||e["aria-labelledby"]||r),t(2,a={"aria-hidden":l?void 0:!0,role:l?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=ee(e),[n,r,a,o,l]}class fl extends le{constructor(e){super(),ie(this,e,rl,ol,ne,{size:0,title:1})}}function ul(i,e){const t=l=>i&&!i.contains(l.target)&&!l.defaultPrevented&&e();return document.addEventListener("click",t,!0),{destroy(){document.removeEventListener("click",t,!0)}}}function dl(i){let e=(i[1]?"":i[0])+"",t;return{c(){t=z(e)},l(l){t=M(l,e)},m(l,a){P(l,t,a)},p(l,a){a&3&&e!==(e=(l[1]?"":l[0])+"")&&Y(t,e)},d(l){l&&c(t)}}}function cl(i){let e,t,l,a,f;const o=[i[2],{type:"purple"},{icon:Ue}];let n={$$slots:{default:[dl]},$$scope:{ctx:i}};for(let r=0;r<o.length;r+=1)n=R(n,o[r]);return t=new Rt({props:n}),{c(){e=B("div"),ae(t.$$.fragment),this.h()},l(r){e=L(r,"DIV",{class:!0});var s=w(e);se(t.$$.fragment,s),s.forEach(c),this.h()},h(){V(e,"class","embedding-badge truncate"),C(e,"embedding-badge-nolabel",i[1])},m(r,s){P(r,e,s),oe(t,e,null),l=!0,a||(f=pe(vt.call(null,e,{text:"Embedding index"})),a=!0)},p(r,[s]){const u=s&4?he(o,[s&4&&Vt(r[2]),o[1],s&0&&{icon:Ue}]):{};s&11&&(u.$$scope={dirty:s,ctx:r}),t.$set(u),(!l||s&2)&&C(e,"embedding-badge-nolabel",r[1])},i(r){l||(N(t.$$.fragment,r),l=!0)},o(r){A(t.$$.fragment,r),l=!1},d(r){r&&c(e),re(t),a=!1,f()}}}function hl(i,e,t){const l=["embedding","hideEmbeddingName"];let a=G(e,l),{embedding:f}=e,{hideEmbeddingName:o=!1}=e;return i.$$set=n=>{e=R(R({},e),ee(n)),t(2,a=G(e,l)),"embedding"in n&&t(0,f=n.embedding),"hideEmbeddingName"in n&&t(1,o=n.hideEmbeddingName)},[f,o,a]}class ml extends le{constructor(e){super(),ie(this,e,hl,cl,ne,{embedding:0,hideEmbeddingName:1})}}function tt(i,e,t){const l=i.slice();return l[12]=e[t],l}function lt(i){let e,t,l=i[0].conceptNamespace+"",a,f,o=i[0].conceptName+"",n,r,s,u,d,m,g,y,h,v,T;return d=new fl({}),y=new sl({}),{c(){e=B("div"),t=B("div"),a=z(l),f=z(" / "),n=z(o),r=U(),s=B("div"),u=B("button"),ae(d.$$.fragment),m=U(),g=B("button"),ae(y.$$.fragment),this.h()},l(I){e=L(I,"DIV",{class:!0});var E=w(e);t=L(E,"DIV",{class:!0});var H=w(t);a=M(H,l),f=M(H," / "),n=M(H,o),H.forEach(c),r=X(E),s=L(E,"DIV",{class:!0});var _=w(s);u=L(_,"BUTTON",{class:!0});var k=w(u);se(d.$$.fragment,k),k.forEach(c),m=X(_),g=L(_,"BUTTON",{class:!0});var F=w(g);se(y.$$.fragment,F),F.forEach(c),_.forEach(c),E.forEach(c),this.h()},h(){V(t,"class","flex-grow"),V(u,"class","p-1"),V(g,"class","p-1"),V(s,"class","shrink-0"),V(e,"class","flex flex-row items-center justify-between gap-x-4 p-2")},m(I,E){P(I,e,E),S(e,t),S(t,a),S(t,f),S(t,n),S(e,r),S(e,s),S(s,u),oe(d,u,null),S(s,m),S(s,g),oe(y,g,null),h=!0,v||(T=[O(u,"click",i[8]),O(g,"click",i[9])],v=!0)},p(I,E){(!h||E&1)&&l!==(l=I[0].conceptNamespace+"")&&Y(a,l),(!h||E&1)&&o!==(o=I[0].conceptName+"")&&Y(n,o)},i(I){h||(N(d.$$.fragment,I),N(y.$$.fragment,I),h=!0)},o(I){A(d.$$.fragment,I),A(y.$$.fragment,I),h=!1},d(I){I&&c(e),re(d),re(y),v=!1,ze(T)}}}function it(i){let e,t=[],l=new Map,a,f=i[2];const o=n=>n[12];for(let n=0;n<f.length;n+=1){let r=tt(i,f,n),s=o(r);l.set(s,t[n]=nt(s,r))}return{c(){e=B("div");for(let n=0;n<t.length;n+=1)t[n].c();this.h()},l(n){e=L(n,"DIV",{class:!0});var r=w(e);for(let s=0;s<t.length;s+=1)t[s].l(r);r.forEach(c),this.h()},h(){V(e,"class","more-button flex flex-col")},m(n,r){P(n,e,r);for(let s=0;s<t.length;s+=1)t[s]&&t[s].m(e,null);a=!0},p(n,r){r&29&&(f=n[2],x(),t=gt(t,r,o,1,n,f,l,e,Ht,nt,null,tt),$())},i(n){if(!a){for(let r=0;r<f.length;r+=1)N(t[r]);a=!0}},o(n){for(let r=0;r<t.length;r+=1)A(t[r]);a=!1},d(n){n&&c(e);for(let r=0;r<t.length;r+=1)t[r].d()}}}function nt(i,e){let t,l,a,f,o,n,r,s,u;o=new ml({props:{class:"hover:cursor-pointer",embedding:e[12]}});function d(){return e[10](e[12])}return{key:i,first:null,c(){t=B("button"),l=B("div"),a=z("Find similar"),f=U(),ae(o.$$.fragment),n=U(),this.h()},l(m){t=L(m,"BUTTON",{class:!0});var g=w(t);l=L(g,"DIV",{});var y=w(l);a=M(y,"Find similar"),y.forEach(c),f=X(g),se(o.$$.fragment,g),n=X(g),g.forEach(c),this.h()},h(){V(t,"class","flex w-full items-center justify-between"),this.first=t},m(m,g){P(m,t,g),S(t,l),S(l,a),S(t,f),oe(o,t,null),S(t,n),r=!0,s||(u=O(t,"click",d),s=!0)},p(m,g){e=m;const y={};g&4&&(y.embedding=e[12]),o.$set(y)},i(m){r||(N(o.$$.fragment,m),r=!0)},o(m){A(o.$$.fragment,m),r=!1},d(m){m&&c(t),re(o),s=!1,u()}}}function _l(i){let e,t,l,a,f,o,n,r=i[0].conceptName!=null&&i[0].conceptNamespace!=null&&lt(i),s=i[3]!=null&&it(i);return{c(){e=B("div"),r&&r.c(),t=U(),s&&s.c(),this.h()},l(u){e=L(u,"DIV",{style:!0,class:!0});var d=w(e);r&&r.l(d),t=X(d),s&&s.l(d),d.forEach(c),this.h()},h(){V(e,"style",l=i[1]!=null?`left: ${i[1].x}px; top: ${i[1].y}px`:""),V(e,"class","absolute z-10 inline-flex -translate-x-1/2 translate-y-6 flex-col divide-y divide-gray-200 rounded border border-gray-200 bg-white shadow")},m(u,d){P(u,e,d),r&&r.m(e,null),S(e,t),s&&s.m(e,null),f=!0,o||(n=pe(ul.call(null,e,i[11])),o=!0)},p(u,[d]){u[0].conceptName!=null&&u[0].conceptNamespace!=null?r?(r.p(u,d),d&1&&N(r,1)):(r=lt(u),r.c(),N(r,1),r.m(e,t)):r&&(x(),A(r,1,1,()=>{r=null}),$()),u[3]!=null?s?(s.p(u,d),d&8&&N(s,1)):(s=it(u),s.c(),N(s,1),s.m(e,null)):s&&(x(),A(s,1,1,()=>{s=null}),$()),(!f||d&2&&l!==(l=u[1]!=null?`left: ${u[1].x}px; top: ${u[1].y}px`:""))&&V(e,"style",l)},i(u){f||(N(r),N(s),bt(()=>{f&&(a||(a=Fe(e,Xe,{duration:60},!0)),a.run(1))}),f=!0)},o(u){A(r),A(s),a||(a=Fe(e,Xe,{duration:60},!1)),a.run(0),f=!1},d(u){u&&c(e),r&&r.d(),s&&s.d(),u&&a&&a.end(),o=!1,n()}}}function bl(i,e,t){let{details:l}=e,{clickPosition:a}=e,{embeddings:f}=e,{addConceptLabel:o}=e,{findSimilar:n}=e,{addNotification:r}=e;const s=Pt();function u(h){if(!l.conceptName||!l.conceptNamespace)throw Error("Label could not be added, no active concept.");o(l.conceptNamespace,l.conceptName,l.text,h),r({kind:"success",title:`[${h===!0?"Positive":"Negative"}] Concept label added`,subtitle:qt(l.conceptNamespace,l.conceptName),message:l.text}),s("click")}const d=()=>u(!0),m=()=>u(!1),g=h=>{n&&n(h,l.text),s("click")},y=()=>s("close");return i.$$set=h=>{"details"in h&&t(0,l=h.details),"clickPosition"in h&&t(1,a=h.clickPosition),"embeddings"in h&&t(2,f=h.embeddings),"addConceptLabel"in h&&t(6,o=h.addConceptLabel),"findSimilar"in h&&t(3,n=h.findSimilar),"addNotification"in h&&t(7,r=h.addNotification)},[l,a,f,n,s,u,o,r,d,m,g,y]}class gl extends le{constructor(e){super(),ie(this,e,bl,_l,ne,{details:0,clickPosition:1,embeddings:2,addConceptLabel:6,findSimilar:3,addNotification:7})}}function vl(i,e){let t,l=e;i.addEventListener("click",o=>a(o));function a(o){l.disabled||(t=new gl({props:{details:l.details(),clickPosition:{x:o.clientX,y:o.clientY},embeddings:l.embeddings,addConceptLabel:l.addConceptLabel,addNotification:l.addNotification,findSimilar:l.findSimilar},target:document.body}),t.$on("close",f),t.$on("click",f))}function f(){t==null||t.$destroy(),t=void 0}return{update(o){l=o,t==null||t.$set({details:l.details()})},destroy(){f()}}}const Be=.5,at=.3,pl=.8,st="#3366cc";function Ae(i){return`rgba(180,215,255,${i})`}function Ie(i){let e=0;if(i>Be){const t=(i-Be)/(1-Be);e=at+t*(pl-at)}return Ae(e)}function ot(i,e,t){const l=i.slice();return l[7]=e[t],l}function rt(i,e){let t,l,a=e[7].info.name+"",f,o,n,r,s=ft(e[7])+"",u,d;return{key:i,first:null,c(){t=B("div"),l=B("div"),f=z(a),o=U(),n=B("div"),r=B("span"),u=z(s),d=U(),this.h()},l(m){t=L(m,"DIV",{class:!0});var g=w(t);l=L(g,"DIV",{class:!0});var y=w(l);f=M(y,a),y.forEach(c),o=X(g),n=L(g,"DIV",{class:!0});var h=w(n);r=L(h,"SPAN",{class:!0});var v=w(r);u=M(v,s),v.forEach(c),h.forEach(c),d=X(g),g.forEach(c),this.h()},h(){V(l,"class","named-value-name table-cell max-w-xs truncate pr-2 svelte-1689hje"),V(r,"class","px-1"),C(r,"font-bold",e[7].info.type==="keyword"||e[7].info.type==="metadata"&&!Le(e[7].info.dtype)),te(r,"background-color",(e[7].info.type==="concept_score"||e[7].info.type==="semantic_similarity")&&typeof e[7].value=="number"?Ie(e[7].value):""),V(n,"class","table-cell rounded text-right"),V(t,"class","table-row"),this.first=t},m(m,g){P(m,t,g),S(t,l),S(l,f),S(t,o),S(t,n),S(n,r),S(r,u),S(t,d)},p(m,g){e=m,g&1&&a!==(a=e[7].info.name+"")&&Y(f,a),g&1&&s!==(s=ft(e[7])+"")&&Y(u,s),g&1&&C(r,"font-bold",e[7].info.type==="keyword"||e[7].info.type==="metadata"&&!Le(e[7].info.dtype)),g&1&&te(r,"background-color",(e[7].info.type==="concept_score"||e[7].info.type==="semantic_similarity")&&typeof e[7].value=="number"?Ie(e[7].value):"")},d(m){m&&c(t)}}}function kl(i){let e,t,l=[],a=new Map,f,o=`${i[4]}px`,n=`${Math.min(i[1],i[3]-i[2]-20)}px`,r=i[0];const s=u=>u[7];for(let u=0;u<r.length;u+=1){let d=ot(i,r,u),m=s(d);a.set(m,l[u]=rt(m,d))}return{c(){e=B("div"),t=B("div");for(let u=0;u<l.length;u+=1)l[u].c();this.h()},l(u){e=L(u,"DIV",{role:!0,class:!0});var d=w(e);t=L(d,"DIV",{class:!0});var m=w(t);for(let g=0;g<l.length;g+=1)l[g].l(m);m.forEach(c),d.forEach(c),this.h()},h(){V(t,"class","table border-spacing-y-2"),V(e,"role","tooltip"),V(e,"class","absolute max-w-fit -translate-y-full break-words border border-gray-300 bg-white px-2 shadow-md"),bt(()=>i[6].call(e)),C(e,"hidden",i[0].length===0),te(e,"top",o),te(e,"left",n)},m(u,d){P(u,e,d),S(e,t);for(let m=0;m<l.length;m+=1)l[m]&&l[m].m(t,null);f=Bt(e,i[6].bind(e))},p(u,[d]){d&1&&(r=u[0],l=gt(l,d,s,1,u,r,a,t,Lt,rt,null,ot)),d&1&&C(e,"hidden",u[0].length===0),d&6&&n!==(n=`${Math.min(u[1],u[3]-u[2]-20)}px`)&&te(e,"left",n)},i:j,o:j,d(u){u&&c(e);for(let d=0;d<l.length;d+=1)l[d].d();f()}}}function ft(i){return typeof i.value=="number"?i.value.toFixed(3):i.info.dtype==="string_span"?"true":i.value}function Sl(i,e,t){let{namedValues:l}=e,{x:a}=e,{y:f}=e;const o=window.innerWidth;let n=0;const r=f-1;function s(){n=this.clientWidth,t(2,n)}return i.$$set=u=>{"namedValues"in u&&t(0,l=u.namedValues),"x"in u&&t(1,a=u.x),"y"in u&&t(5,f=u.y)},[l,a,n,o,r,f,s]}class wl extends le{constructor(e){super(),ie(this,e,Sl,kl,ne,{namedValues:0,x:1,y:5})}}function El(i,e){let t,l=e;const a=()=>o();l.isHovered&&f();function f(){const n=l.namedValues.filter(m=>Array.from(l.spansHovered).some(g=>{const y=pt(g);return kt(m.specificPath.slice(0,y.length),y)}));l.itemScrollContainer!=null&&l.itemScrollContainer.addEventListener("scroll",a);const r=i.getBoundingClientRect(),s=window.getComputedStyle(i),u=parseInt(s.getPropertyValue("line-height")),d=r.height>u?r.x+i.offsetLeft||i.clientLeft:r.x;t=new wl({props:{namedValues:n,x:d,y:r.top},target:document.body})}function o(){var n;t==null||t.$destroy(),(n=l.itemScrollContainer)==null||n.removeEventListener("scroll",a)}return{update(n){o(),l=n,l.isHovered&&f()},destroy(){o()}}}const yl=500,ve=100;function Tl(i,e,t){const l=[],a=new Set;for(const f of i){let o=!1;const n=[];for(const T of f.paths)a.has(T)||(n.push(T),a.add(T));const r=[],s=[];let u=-1/0;for(const[T,I]of Object.entries(f.originalSpans)){const E=e[T],H=pt(T);if(!(E==null||E.length===0))for(const _ of I)for(const k of E){const F=k.path.slice(H.length),W=Dt(_,F);if(W==null)continue;const q=Se.value(W);if(q==null)continue;if(k.dtype==="float32"){const Z=Se.value(W);Z!=null&&(u=Math.max(u,Z))}const ue=we(Se.path(_)),de=!n.includes(ue),ce={value:q,info:k,specificPath:Se.path(W)};de||r.push(ce),s.push(ce),k.type==="concept_score"||k.type==="semantic_similarity"?q>.5&&(o=!0):o=!0}}const d=s.some(T=>T.info.type==="label"),m=s.some(T=>T.info.type==="leaf_span"),g=s.some(T=>T.info.type==="keyword"),y=s.some(T=>T.info.type==="metadata"&&!Le(T.info.dtype)),h=f.paths.some(T=>t.has(T)),v=h&&n.length>0&&Array.from(t).some(T=>n.includes(T));l.push({backgroundColor:Ie(u),isBlackBolded:g||y||m,isHighlightBolded:d,isShownSnippet:o,snippetScore:u,namedValues:r,paths:f.paths,text:f.text,snippetText:f.text,originalSpans:f.originalSpans,isHovered:h,isFirstHover:v})}return l}function Nl(i,e){var o,n,r;if(i=i.map(s=>{if(s.isShownSnippet&&s.text.length>ve){const u={...s,text:s.text.slice(0,ve),snippetText:s.snippetText.slice(0,ve)},d={...s,text:s.text.slice(ve),snippetText:s.snippetText.slice(ve),isShownSnippet:!1,namedValues:[]};return[u,d]}else return[s]}).flat(),e)return{snippetSpans:i.map(s=>({renderSpan:s,isShown:!0})),someSnippetsHidden:!1};const t=[];let l=0;for(const s of i)s.isShownSnippet&&(l+=s.text.length);const a=i.filter(s=>!s.isShownSnippet).sort((s,u)=>u.snippetScore-s.snippetScore);for(const s of a)if(s.isShownSnippet=!0,l+=s.text.length,l>yl)break;let f=!1;for(const[s,u]of i.entries())if(u.isShownSnippet)t.push({renderSpan:u,isShown:!0});else{const d=((o=i[s+1])==null?void 0:o.isShownSnippet)===!0,m=((n=i[s-1])==null?void 0:n.isShownSnippet)===!0,g=((r=t[t.length-1])==null?void 0:r.isShown)===!0;t.push({renderSpan:u,isShown:!1,isEllipsis:(d||m)&&g,hasNewline:u.text.includes(`
2
+ `)}),f=!0}return{snippetSpans:t,someSnippetsHidden:f}}function ut(i,e,t){const l=i.slice();l[34]=e[t];const a=l[34].renderSpan;return l[35]=a,l}function Cl(i){let e,t,l,a,f,o=i[34].hasNewline&&dt();return{c(){e=B("span"),t=z("..."),o&&o.c(),l=Ee(),this.h()},l(n){e=L(n,"SPAN",{class:!0});var r=w(e);t=M(r,"..."),r.forEach(c),o&&o.l(n),l=Ee(),this.h()},h(){V(e,"class","highlight-span text-sm leading-5 svelte-8ox5pu")},m(n,r){P(n,e,r),S(e,t),o&&o.m(n,r),P(n,l,r),a||(f=pe(vt.call(null,e,{text:`Some text was hidden to improve readability.
3
+ Click "Show all" to show the entire document.`})),a=!0)},p(n,r){n[34].hasNewline?o||(o=dt(),o.c(),o.m(l.parentNode,l)):o&&(o.d(1),o=null)},i:j,o:j,d(n){n&&c(e),o&&o.d(n),n&&c(l),a=!1,f()}}}function Vl(i){let e,t,l,a,f,o,n,r;const s=[Hl,Pl],u=[];function d(h,v){return h[1]?0:1}t=d(i),l=u[t]=s[t](i);function m(){return i[27](i[35])}function g(){return i[28](i[35])}function y(){return i[29](i[35])}return{c(){e=B("span"),l.c(),this.h()},l(h){e=L(h,"SPAN",{class:!0});var v=w(e);l.l(v),v.forEach(c),this.h()},h(){V(e,"class","hover:cursor-poiner highlight-span break-words text-sm leading-5 svelte-8ox5pu"),C(e,"hover:cursor-pointer",i[0].length>0),C(e,"font-bold",i[35].isBlackBolded),C(e,"font-medium",i[35].isHighlightBolded&&!i[35].isBlackBolded),te(e,"color",i[35].isHighlightBolded&&!i[35].isBlackBolded?st:""),te(e,"background-color",i[35].isHovered?Ae(mt):i[35].backgroundColor)},m(h,v){P(h,e,v),u[t].m(e,null),o=!0,n||(r=[pe(a=El.call(null,e,{namedValues:i[35].namedValues,isHovered:i[35].isFirstHover,spansHovered:i[5],itemScrollContainer:i[9]})),pe(f=vl.call(null,e,{details:m,findSimilar:i[4]!=null?i[16]:null,embeddings:i[2],addConceptLabel:i[14],addNotification:i[17]!=null?i[17].addNotification:_t,disabled:i[35].paths.length===0||i[2].length===0})),O(e,"mouseenter",g),O(e,"mouseleave",y)],n=!0)},p(h,v){i=h;let T=t;t=d(i),t===T?u[t].p(i,v):(x(),A(u[T],1,1,()=>{u[T]=null}),$(),l=u[t],l?l.p(i,v):(l=u[t]=s[t](i),l.c()),N(l,1),l.m(e,null)),a&&je(a.update)&&v[0]&800&&a.update.call(null,{namedValues:i[35].namedValues,isHovered:i[35].isFirstHover,spansHovered:i[5],itemScrollContainer:i[9]}),f&&je(f.update)&&v[0]&276&&f.update.call(null,{details:m,findSimilar:i[4]!=null?i[16]:null,embeddings:i[2],addConceptLabel:i[14],addNotification:i[17]!=null?i[17].addNotification:_t,disabled:i[35].paths.length===0||i[2].length===0}),(!o||v[0]&1)&&C(e,"hover:cursor-pointer",i[0].length>0),(!o||v[0]&256)&&C(e,"font-bold",i[35].isBlackBolded),(!o||v[0]&256)&&C(e,"font-medium",i[35].isHighlightBolded&&!i[35].isBlackBolded),v[0]&256&&te(e,"color",i[35].isHighlightBolded&&!i[35].isBlackBolded?st:""),v[0]&256&&te(e,"background-color",i[35].isHovered?Ae(mt):i[35].backgroundColor)},i(h){o||(N(l),o=!0)},o(h){A(l),o=!1},d(h){h&&c(e),u[t].d(),n=!1,ze(r)}}}function dt(i){let e,t;return{c(){e=B("span"),t=B("br")},l(l){e=L(l,"SPAN",{});var a=w(e);t=L(a,"BR",{}),a.forEach(c)},m(l,a){P(l,e,a),S(e,t)},d(l){l&&c(e)}}}function Pl(i){let e=i[35].snippetText+"",t;return{c(){t=z(e)},l(l){t=M(l,e)},m(l,a){P(l,t,a)},p(l,a){a[0]&256&&e!==(e=l[35].snippetText+"")&&Y(t,e)},i:j,o:j,d(l){l&&c(t)}}}function Hl(i){let e,t;return e=new Yt({props:{source:i[35].snippetText}}),{c(){ae(e.$$.fragment)},l(l){se(e.$$.fragment,l)},m(l,a){oe(e,l,a),t=!0},p(l,a){const f={};a[0]&256&&(f.source=l[35].snippetText),e.$set(f)},i(l){t||(N(e.$$.fragment,l),t=!0)},o(l){A(e.$$.fragment,l),t=!1},d(l){re(e,l)}}}function ct(i){let e,t,l,a;const f=[Vl,Cl],o=[];function n(r,s){return r[34].isShown?0:r[34].isEllipsis?1:-1}return~(e=n(i))&&(t=o[e]=f[e](i)),{c(){t&&t.c(),l=Ee()},l(r){t&&t.l(r),l=Ee()},m(r,s){~e&&o[e].m(r,s),P(r,l,s),a=!0},p(r,s){let u=e;e=n(r),e===u?~e&&o[e].p(r,s):(t&&(x(),A(o[u],1,1,()=>{o[u]=null}),$()),~e?(t=o[e],t?t.p(r,s):(t=o[e]=f[e](r),t.c()),N(t,1),t.m(l.parentNode,l)):t=null)},i(r){a||(N(t),a=!0)},o(r){A(t),a=!1},d(r){~e&&o[e].d(r),r&&c(l)}}}function ht(i){let e,t,l,a,f;const o=[Ll,Bl],n=[];function r(s,u){return s[6]?1:0}return l=r(i),a=n[l]=o[l](i),{c(){e=B("div"),t=B("div"),a.c(),this.h()},l(s){e=L(s,"DIV",{class:!0});var u=w(e);t=L(u,"DIV",{class:!0});var d=w(t);a.l(d),d.forEach(c),u.forEach(c),this.h()},h(){V(t,"class","w-30 mt-2 rounded border border-neutral-300 text-center"),V(e,"class","flex flex-row justify-center")},m(s,u){P(s,e,u),S(e,t),n[l].m(t,null),f=!0},p(s,u){let d=l;l=r(s),l===d?n[l].p(s,u):(x(),A(n[d],1,1,()=>{n[d]=null}),$(),a=n[l],a?a.p(s,u):(a=n[l]=o[l](s),a.c()),N(a,1),a.m(t,null))},i(s){f||(N(a),f=!0)},o(s){A(a),f=!1},d(s){s&&c(e),n[l].d()}}}function Bl(i){let e,t;return e=new St({props:{size:"small",class:"w-full",kind:"ghost",icon:il,$$slots:{default:[Al]},$$scope:{ctx:i}}}),e.$on("click",i[31]),{c(){ae(e.$$.fragment)},l(l){se(e.$$.fragment,l)},m(l,a){oe(e,l,a),t=!0},p(l,a){const f={};a[1]&128&&(f.$$scope={dirty:a,ctx:l}),e.$set(f)},i(l){t||(N(e.$$.fragment,l),t=!0)},o(l){A(e.$$.fragment,l),t=!1},d(l){re(e,l)}}}function Ll(i){let e,t;return e=new St({props:{size:"small",class:"w-full",kind:"ghost",icon:el,$$slots:{default:[Il]},$$scope:{ctx:i}}}),e.$on("click",i[30]),{c(){ae(e.$$.fragment)},l(l){se(e.$$.fragment,l)},m(l,a){oe(e,l,a),t=!0},p(l,a){const f={};a[1]&128&&(f.$$scope={dirty:a,ctx:l}),e.$set(f)},i(l){t||(N(e.$$.fragment,l),t=!0)},o(l){A(e.$$.fragment,l),t=!1},d(l){re(e,l)}}}function Al(i){let e;return{c(){e=z("Hide excess")},l(t){e=M(t,"Hide excess")},m(t,l){P(t,e,l)},d(t){t&&c(e)}}}function Il(i){let e;return{c(){e=z("Show all")},l(t){e=M(t,"Show all")},m(t,l){P(t,e,l)},d(t){t&&c(e)}}}function zl(i){let e,t,l,a=i[8],f=[];for(let r=0;r<a.length;r+=1)f[r]=ct(ut(i,a,r));const o=r=>A(f[r],1,1,()=>{f[r]=null});let n=(i[7]||i[6])&&ht(i);return{c(){e=B("div");for(let r=0;r<f.length;r+=1)f[r].c();t=U(),n&&n.c(),this.h()},l(r){e=L(r,"DIV",{class:!0});var s=w(e);for(let u=0;u<f.length;u+=1)f[u].l(s);t=X(s),n&&n.l(s),s.forEach(c),this.h()},h(){V(e,"class","relative overflow-x-hidden text-ellipsis whitespace-break-spaces py-4")},m(r,s){P(r,e,s);for(let u=0;u<f.length;u+=1)f[u]&&f[u].m(e,null);S(e,t),n&&n.m(e,null),l=!0},p(r,s){if(s[0]&220983){a=r[8];let u;for(u=0;u<a.length;u+=1){const d=ut(r,a,u);f[u]?(f[u].p(d,s),N(f[u],1)):(f[u]=ct(d),f[u].c(),N(f[u],1),f[u].m(e,t))}for(x(),u=a.length;u<f.length;u+=1)o(u);$()}r[7]||r[6]?n?(n.p(r,s),s[0]&192&&N(n,1)):(n=ht(r),n.c(),N(n,1),n.m(e,null)):n&&(x(),A(n,1,1,()=>{n=null}),$())},i(r){if(!l){for(let s=0;s<a.length;s+=1)N(f[s]);N(n),l=!0}},o(r){f=f.filter(Boolean);for(let s=0;s<f.length;s+=1)A(f[s]);A(n),l=!1},d(r){r&&c(e),At(f,r),n&&n.d()}}}const mt=.9,_t=()=>null;function Ml(i,e,t){let l,a,f,o,n,r,s=j,u=()=>(s(),s=zt(E,p=>t(26,r=p)),E),d,m;i.$$.on_destroy.push(()=>s());let{text:g}=e,{row:y}=e,{spanPaths:h}=e,{valuePaths:v}=e,{markdown:T=!1}=e,{embeddings:I}=e,{datasetViewStore:E=void 0}=e;u();let{datasetStore:H=void 0}=e,_={},k=new Set;const F=p=>{p.paths.forEach(D=>k.add(D)),t(5,k)},W=p=>{p.paths.forEach(D=>k.delete(D)),t(5,k)};let q={};const ue=p=>{const _e={conceptName:null,conceptNamespace:null,text:f.filter(be=>be.paths.some(He=>((p==null?void 0:p.paths)||[]).some(ge=>kt(ge,He)))).map(be=>be.text).join("")};for(const be of Object.keys(p.originalSpans)){const He=(_[be]||[]).filter(ge=>ge.type==="concept_score");for(const ge of He){const Re=ge.signal;_e.conceptName=Re.concept_name,_e.conceptNamespace=Re.namespace;break}}return _e},de=Ot();Ye(i,de,p=>t(33,d=p));const ce=(p,D,Me,_e)=>{if(!D||!p)throw Error("Label could not be added, no active concept.");d.mutate([p,D,{insert:[{text:Me,label:_e}]}])};let Z=!1,ke=It(jt);Ye(i,ke,p=>t(9,m=p));let me;const ye=(p,D)=>{E==null||me==null||E.addSearch({path:[we(me)],type:"semantic",query:D,embedding:p})},Te=Ut(),Ne=p=>ue(p),Ce=p=>F(p),Ve=p=>W(p),Pe=()=>t(6,Z=!0),b=()=>t(6,Z=!1);return i.$$set=p=>{"text"in p&&t(18,g=p.text),"row"in p&&t(19,y=p.row),"spanPaths"in p&&t(0,h=p.spanPaths),"valuePaths"in p&&t(20,v=p.valuePaths),"markdown"in p&&t(1,T=p.markdown),"embeddings"in p&&t(2,I=p.embeddings),"datasetViewStore"in p&&u(t(3,E=p.datasetViewStore)),"datasetStore"in p&&t(4,H=p.datasetStore)},i.$$.update=()=>{if(i.$$.dirty[0]&524289&&t(25,l=Object.fromEntries(h.map(p=>[we(p),Ft(y,p)]))),i.$$.dirty[0]&3145728){t(21,_={});for(const p of v){const D=we(p.spanPath);_[D]==null&&t(21,_[D]=[],_),_[D].push(p)}}if(i.$$.dirty[0]&33816576&&t(24,a=Xt(g,l)),i.$$.dirty[0]&18874400&&t(23,f=Tl(a,_,k)),i.$$.dirty[0]&20971520){t(22,q={});for(const p of a)for(const D of p.paths)t(22,q[D]=q[D]||[],q),q[D].push(p)}i.$$.dirty[0]&8388672&&t(8,{snippetSpans:o,someSnippetsHidden:n}=Nl(f,Z),o,(t(7,n),t(23,f),t(6,Z),t(24,a),t(21,_),t(5,k),t(18,g),t(25,l),t(20,v),t(0,h),t(19,y))),i.$$.dirty[0]&67108880&&r!=null&&H!=null&&(me=Wt(r,H))},[h,T,I,E,H,k,Z,n,o,m,F,W,ue,de,ce,ke,ye,Te,g,y,v,_,q,f,a,l,r,Ne,Ce,Ve,Pe,b]}class jl extends le{constructor(e){super(),ie(this,e,Ml,zl,ne,{text:18,row:19,spanPaths:0,valuePaths:20,markdown:1,embeddings:2,datasetViewStore:3,datasetStore:4},null,[-1,-1])}}export{ml as E,jl as S,Yl as T,fl as a,sl as b};
lilac/web/_app/immutable/chunks/StringSpanHighlight.d53dc1a7.js ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ import{S as le,i as ie,s as ne,E as R,k as B,a as U,l as L,m as w,c as X,h as c,F as De,G as C,n as V,b as P,a0 as S,am as Oe,H as O,g as N,v as x,d as A,f as $,L as he,M as ze,N as G,ai as wt,Q as ee,D as Et,I as yt,J as Tt,K as Nt,q as z,r as M,u as Y,y as ae,z as se,A as oe,B as re,R as Q,w as Ct,Z as K,_ as J,$ as fe,a1 as j,a7 as pe,V as Vt,a2 as bt,a3 as Fe,C as Pt,W as gt,X as Ht,p as te,af as Bt,ao as Lt,a4 as At,O as Ye,aj as It,e as Ee,ac as zt,ab as je}from"./index.b333a928.js";import{aL as Mt,d as Rt,h as vt,a0 as Le,y as pt,I as kt,az as Dt,L as Se,z as we,aA as Ot,H as Ft,B as St,aO as Yt}from"./Commands.1fffdf33.js";import{A as Ue,p as Xe,I as jt,u as Ut,v as Xt,f as Wt}from"./notificationsStore.e7f2bd3e.js";import{d as qt}from"./utils.4eeb8687.js";const Gt=i=>({}),We=i=>({});function qe(i){let e,t,l,a;const f=i[20].labelText,o=Et(f,i,i[19],We),n=o||Kt(i);let r=i[5]&&Ge(i);return{c(){e=B("div"),t=B("label"),n&&n.c(),l=U(),r&&r.c(),this.h()},l(s){e=L(s,"DIV",{});var u=w(e);t=L(u,"LABEL",{for:!0});var d=w(t);n&&n.l(d),d.forEach(c),l=X(u),r&&r.l(u),u.forEach(c),this.h()},h(){V(t,"for",i[14]),C(t,"bx--label",!0),C(t,"bx--visually-hidden",i[11]),C(t,"bx--label--disabled",i[7]),C(e,"bx--text-area__label-wrapper",!0)},m(s,u){P(s,e,u),S(e,t),n&&n.m(t,null),S(e,l),r&&r.m(e,null),a=!0},p(s,u){o?o.p&&(!a||u[0]&524288)&&yt(o,f,s,s[19],a?Nt(f,s[19],u,Gt):Tt(s[19]),We):n&&n.p&&(!a||u[0]&1024)&&n.p(s,a?u:[-1,-1]),(!a||u[0]&16384)&&V(t,"for",s[14]),(!a||u[0]&2048)&&C(t,"bx--visually-hidden",s[11]),(!a||u[0]&128)&&C(t,"bx--label--disabled",s[7]),s[5]?r?r.p(s,u):(r=Ge(s),r.c(),r.m(e,null)):r&&(r.d(1),r=null)},i(s){a||(N(n,s),a=!0)},o(s){A(n,s),a=!1},d(s){s&&c(e),n&&n.d(s),r&&r.d()}}}function Kt(i){let e;return{c(){e=z(i[10])},l(t){e=M(t,i[10])},m(t,l){P(t,e,l)},p(t,l){l[0]&1024&&Y(e,t[10])},d(t){t&&c(e)}}}function Ge(i){let e,t=i[0].length+"",l,a,f;return{c(){e=B("div"),l=z(t),a=z("/"),f=z(i[5]),this.h()},l(o){e=L(o,"DIV",{});var n=w(e);l=M(n,t),a=M(n,"/"),f=M(n,i[5]),n.forEach(c),this.h()},h(){C(e,"bx--label",!0),C(e,"bx--label--disabled",i[7])},m(o,n){P(o,e,n),S(e,l),S(e,a),S(e,f)},p(o,n){n[0]&1&&t!==(t=o[0].length+"")&&Y(l,t),n[0]&32&&Y(f,o[5]),n[0]&128&&C(e,"bx--label--disabled",o[7])},d(o){o&&c(e)}}}function Ke(i){let e,t;return e=new Mt({props:{class:"bx--text-area__invalid-icon"}}),{c(){ae(e.$$.fragment)},l(l){se(e.$$.fragment,l)},m(l,a){oe(e,l,a),t=!0},i(l){t||(N(e.$$.fragment,l),t=!0)},o(l){A(e.$$.fragment,l),t=!1},d(l){re(e,l)}}}function Je(i){let e,t;return{c(){e=B("div"),t=z(i[9]),this.h()},l(l){e=L(l,"DIV",{});var a=w(e);t=M(a,i[9]),a.forEach(c),this.h()},h(){C(e,"bx--form__helper-text",!0),C(e,"bx--form__helper-text--disabled",i[7])},m(l,a){P(l,e,a),S(e,t)},p(l,a){a[0]&512&&Y(t,l[9]),a[0]&128&&C(e,"bx--form__helper-text--disabled",l[7])},d(l){l&&c(e)}}}function Qe(i){let e,t;return{c(){e=B("div"),t=z(i[13]),this.h()},l(l){e=L(l,"DIV",{id:!0});var a=w(e);t=M(a,i[13]),a.forEach(c),this.h()},h(){V(e,"id",i[16]),C(e,"bx--form-requirement",!0)},m(l,a){P(l,e,a),S(e,t)},p(l,a){a[0]&8192&&Y(t,l[13]),a[0]&65536&&V(e,"id",l[16])},d(l){l&&c(e)}}}function Jt(i){let e,t,l,a,f,o,n,r,s,u,d,m,g,y,h=(i[10]||i[17].labelText)&&!i[11]&&qe(i),v=i[12]&&Ke(),T=[{"aria-invalid":o=i[12]||void 0},{"aria-describedby":n=i[12]?i[16]:void 0},{disabled:i[7]},{id:i[14]},{name:i[15]},{cols:i[3]},{rows:i[4]},{placeholder:i[2]},{readOnly:i[8]},{maxlength:r=i[5]??void 0},i[18]],I={};for(let _=0;_<T.length;_+=1)I=R(I,T[_]);let E=!i[12]&&i[9]&&Je(i),H=i[12]&&Qe(i);return{c(){e=B("div"),h&&h.c(),t=U(),l=B("div"),v&&v.c(),a=U(),f=B("textarea"),u=U(),E&&E.c(),d=U(),H&&H.c(),this.h()},l(_){e=L(_,"DIV",{});var k=w(e);h&&h.l(k),t=X(k),l=L(k,"DIV",{"data-invalid":!0});var F=w(l);v&&v.l(F),a=X(F),f=L(F,"TEXTAREA",{"aria-invalid":!0,"aria-describedby":!0,id:!0,name:!0,cols:!0,rows:!0,placeholder:!0,maxlength:!0}),w(f).forEach(c),F.forEach(c),u=X(k),E&&E.l(k),d=X(k),H&&H.l(k),k.forEach(c),this.h()},h(){De(f,I),C(f,"bx--text-area",!0),C(f,"bx--text-area--light",i[6]),C(f,"bx--text-area--invalid",i[12]),V(l,"data-invalid",s=i[12]||void 0),C(l,"bx--text-area__wrapper",!0),C(e,"bx--form-item",!0)},m(_,k){P(_,e,k),h&&h.m(e,null),S(e,t),S(e,l),v&&v.m(l,null),S(l,a),S(l,f),f.autofocus&&f.focus(),i[32](f),Oe(f,i[0]),S(e,u),E&&E.m(e,null),S(e,d),H&&H.m(e,null),m=!0,g||(y=[O(f,"input",i[33]),O(f,"change",i[25]),O(f,"input",i[26]),O(f,"keydown",i[27]),O(f,"keyup",i[28]),O(f,"focus",i[29]),O(f,"blur",i[30]),O(f,"paste",i[31]),O(e,"click",i[21]),O(e,"mouseover",i[22]),O(e,"mouseenter",i[23]),O(e,"mouseleave",i[24])],g=!0)},p(_,k){(_[10]||_[17].labelText)&&!_[11]?h?(h.p(_,k),k[0]&134144&&N(h,1)):(h=qe(_),h.c(),N(h,1),h.m(e,t)):h&&(x(),A(h,1,1,()=>{h=null}),$()),_[12]?v?k[0]&4096&&N(v,1):(v=Ke(),v.c(),N(v,1),v.m(l,a)):v&&(x(),A(v,1,1,()=>{v=null}),$()),De(f,I=he(T,[(!m||k[0]&4096&&o!==(o=_[12]||void 0))&&{"aria-invalid":o},(!m||k[0]&69632&&n!==(n=_[12]?_[16]:void 0))&&{"aria-describedby":n},(!m||k[0]&128)&&{disabled:_[7]},(!m||k[0]&16384)&&{id:_[14]},(!m||k[0]&32768)&&{name:_[15]},(!m||k[0]&8)&&{cols:_[3]},(!m||k[0]&16)&&{rows:_[4]},(!m||k[0]&4)&&{placeholder:_[2]},(!m||k[0]&256)&&{readOnly:_[8]},(!m||k[0]&32&&r!==(r=_[5]??void 0))&&{maxlength:r},k[0]&262144&&_[18]])),k[0]&1&&Oe(f,_[0]),C(f,"bx--text-area",!0),C(f,"bx--text-area--light",_[6]),C(f,"bx--text-area--invalid",_[12]),(!m||k[0]&4096&&s!==(s=_[12]||void 0))&&V(l,"data-invalid",s),!_[12]&&_[9]?E?E.p(_,k):(E=Je(_),E.c(),E.m(e,d)):E&&(E.d(1),E=null),_[12]?H?H.p(_,k):(H=Qe(_),H.c(),H.m(e,null)):H&&(H.d(1),H=null)},i(_){m||(N(h),N(v),m=!0)},o(_){A(h),A(v),m=!1},d(_){_&&c(e),h&&h.d(),v&&v.d(),i[32](null),E&&E.d(),H&&H.d(),g=!1,ze(y)}}}function Qt(i,e,t){let l;const a=["value","placeholder","cols","rows","maxCount","light","disabled","readonly","helperText","labelText","hideLabel","invalid","invalidText","id","name","ref"];let f=G(e,a),{$$slots:o={},$$scope:n}=e;const r=wt(o);let{value:s=""}=e,{placeholder:u=""}=e,{cols:d=50}=e,{rows:m=4}=e,{maxCount:g=void 0}=e,{light:y=!1}=e,{disabled:h=!1}=e,{readonly:v=!1}=e,{helperText:T=""}=e,{labelText:I=""}=e,{hideLabel:E=!1}=e,{invalid:H=!1}=e,{invalidText:_=""}=e,{id:k="ccs-"+Math.random().toString(36)}=e,{name:F=void 0}=e,{ref:W=null}=e;function q(b){Q.call(this,i,b)}function ue(b){Q.call(this,i,b)}function de(b){Q.call(this,i,b)}function ce(b){Q.call(this,i,b)}function Z(b){Q.call(this,i,b)}function ke(b){Q.call(this,i,b)}function me(b){Q.call(this,i,b)}function ye(b){Q.call(this,i,b)}function Te(b){Q.call(this,i,b)}function Ne(b){Q.call(this,i,b)}function Ce(b){Q.call(this,i,b)}function Ve(b){Ct[b?"unshift":"push"](()=>{W=b,t(1,W)})}function Pe(){s=this.value,t(0,s)}return i.$$set=b=>{e=R(R({},e),ee(b)),t(18,f=G(e,a)),"value"in b&&t(0,s=b.value),"placeholder"in b&&t(2,u=b.placeholder),"cols"in b&&t(3,d=b.cols),"rows"in b&&t(4,m=b.rows),"maxCount"in b&&t(5,g=b.maxCount),"light"in b&&t(6,y=b.light),"disabled"in b&&t(7,h=b.disabled),"readonly"in b&&t(8,v=b.readonly),"helperText"in b&&t(9,T=b.helperText),"labelText"in b&&t(10,I=b.labelText),"hideLabel"in b&&t(11,E=b.hideLabel),"invalid"in b&&t(12,H=b.invalid),"invalidText"in b&&t(13,_=b.invalidText),"id"in b&&t(14,k=b.id),"name"in b&&t(15,F=b.name),"ref"in b&&t(1,W=b.ref),"$$scope"in b&&t(19,n=b.$$scope)},i.$$.update=()=>{i.$$.dirty[0]&16384&&t(16,l=`error-${k}`)},[s,W,u,d,m,g,y,h,v,T,I,E,H,_,k,F,l,r,f,n,o,q,ue,de,ce,Z,ke,me,ye,Te,Ne,Ce,Ve,Pe]}class Zt extends le{constructor(e){super(),ie(this,e,Qt,Jt,ne,{value:0,placeholder:2,cols:3,rows:4,maxCount:5,light:6,disabled:7,readonly:8,helperText:9,labelText:10,hideLabel:11,invalid:12,invalidText:13,id:14,name:15,ref:1},null,[-1,-1])}}const Yl=Zt;function Ze(i){let e,t;return{c(){e=K("title"),t=z(i[1])},l(l){e=J(l,"title",{});var a=w(e);t=M(a,i[1]),a.forEach(c)},m(l,a){P(l,e,a),S(e,t)},p(l,a){a&2&&Y(t,l[1])},d(l){l&&c(e)}}}function xt(i){let e,t,l=i[1]&&Ze(i),a=[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},{width:i[0]},{height:i[0]},i[2],i[3]],f={};for(let o=0;o<a.length;o+=1)f=R(f,a[o]);return{c(){e=K("svg"),l&&l.c(),t=K("path"),this.h()},l(o){e=J(o,"svg",{xmlns:!0,viewBox:!0,fill:!0,preserveAspectRatio:!0,width:!0,height:!0});var n=w(e);l&&l.l(n),t=J(n,"path",{d:!0}),w(t).forEach(c),n.forEach(c),this.h()},h(){V(t,"d","M24.59 16.59L17 24.17 17 4 15 4 15 24.17 7.41 16.59 6 18 16 28 26 18 24.59 16.59z"),fe(e,f)},m(o,n){P(o,e,n),l&&l.m(e,null),S(e,t)},p(o,[n]){o[1]?l?l.p(o,n):(l=Ze(o),l.c(),l.m(e,t)):l&&(l.d(1),l=null),fe(e,f=he(a,[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},n&1&&{width:o[0]},n&1&&{height:o[0]},n&4&&o[2],n&8&&o[3]]))},i:j,o:j,d(o){o&&c(e),l&&l.d()}}}function $t(i,e,t){let l,a;const f=["size","title"];let o=G(e,f),{size:n=16}=e,{title:r=void 0}=e;return i.$$set=s=>{t(5,e=R(R({},e),ee(s))),t(3,o=G(e,f)),"size"in s&&t(0,n=s.size),"title"in s&&t(1,r=s.title)},i.$$.update=()=>{t(4,l=e["aria-label"]||e["aria-labelledby"]||r),t(2,a={"aria-hidden":l?void 0:!0,role:l?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=ee(e),[n,r,a,o,l]}class el extends le{constructor(e){super(),ie(this,e,$t,xt,ne,{size:0,title:1})}}function xe(i){let e,t;return{c(){e=K("title"),t=z(i[1])},l(l){e=J(l,"title",{});var a=w(e);t=M(a,i[1]),a.forEach(c)},m(l,a){P(l,e,a),S(e,t)},p(l,a){a&2&&Y(t,l[1])},d(l){l&&c(e)}}}function tl(i){let e,t,l=i[1]&&xe(i),a=[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},{width:i[0]},{height:i[0]},i[2],i[3]],f={};for(let o=0;o<a.length;o+=1)f=R(f,a[o]);return{c(){e=K("svg"),l&&l.c(),t=K("path"),this.h()},l(o){e=J(o,"svg",{xmlns:!0,viewBox:!0,fill:!0,preserveAspectRatio:!0,width:!0,height:!0});var n=w(e);l&&l.l(n),t=J(n,"path",{d:!0}),w(t).forEach(c),n.forEach(c),this.h()},h(){V(t,"d","M16 4L6 14 7.41 15.41 15 7.83 15 28 17 28 17 7.83 24.59 15.41 26 14 16 4z"),fe(e,f)},m(o,n){P(o,e,n),l&&l.m(e,null),S(e,t)},p(o,[n]){o[1]?l?l.p(o,n):(l=xe(o),l.c(),l.m(e,t)):l&&(l.d(1),l=null),fe(e,f=he(a,[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},n&1&&{width:o[0]},n&1&&{height:o[0]},n&4&&o[2],n&8&&o[3]]))},i:j,o:j,d(o){o&&c(e),l&&l.d()}}}function ll(i,e,t){let l,a;const f=["size","title"];let o=G(e,f),{size:n=16}=e,{title:r=void 0}=e;return i.$$set=s=>{t(5,e=R(R({},e),ee(s))),t(3,o=G(e,f)),"size"in s&&t(0,n=s.size),"title"in s&&t(1,r=s.title)},i.$$.update=()=>{t(4,l=e["aria-label"]||e["aria-labelledby"]||r),t(2,a={"aria-hidden":l?void 0:!0,role:l?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=ee(e),[n,r,a,o,l]}class il extends le{constructor(e){super(),ie(this,e,ll,tl,ne,{size:0,title:1})}}function $e(i){let e,t;return{c(){e=K("title"),t=z(i[1])},l(l){e=J(l,"title",{});var a=w(e);t=M(a,i[1]),a.forEach(c)},m(l,a){P(l,e,a),S(e,t)},p(l,a){a&2&&Y(t,l[1])},d(l){l&&c(e)}}}function nl(i){let e,t,l=i[1]&&$e(i),a=[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},{width:i[0]},{height:i[0]},i[2],i[3]],f={};for(let o=0;o<a.length;o+=1)f=R(f,a[o]);return{c(){e=K("svg"),l&&l.c(),t=K("path"),this.h()},l(o){e=J(o,"svg",{xmlns:!0,viewBox:!0,fill:!0,preserveAspectRatio:!0,width:!0,height:!0});var n=w(e);l&&l.l(n),t=J(n,"path",{d:!0}),w(t).forEach(c),n.forEach(c),this.h()},h(){V(t,"d","M2 2H7V16H2zM23 2H9V16.8027l3.0422 4.5635.8453 5.9165A2.0094 2.0094 0 0014.8672 29H15a3.0033 3.0033 0 003-3V20h8a4.0045 4.0045 0 004-4V9A7.0078 7.0078 0 0023 2z"),fe(e,f)},m(o,n){P(o,e,n),l&&l.m(e,null),S(e,t)},p(o,[n]){o[1]?l?l.p(o,n):(l=$e(o),l.c(),l.m(e,t)):l&&(l.d(1),l=null),fe(e,f=he(a,[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},n&1&&{width:o[0]},n&1&&{height:o[0]},n&4&&o[2],n&8&&o[3]]))},i:j,o:j,d(o){o&&c(e),l&&l.d()}}}function al(i,e,t){let l,a;const f=["size","title"];let o=G(e,f),{size:n=16}=e,{title:r=void 0}=e;return i.$$set=s=>{t(5,e=R(R({},e),ee(s))),t(3,o=G(e,f)),"size"in s&&t(0,n=s.size),"title"in s&&t(1,r=s.title)},i.$$.update=()=>{t(4,l=e["aria-label"]||e["aria-labelledby"]||r),t(2,a={"aria-hidden":l?void 0:!0,role:l?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=ee(e),[n,r,a,o,l]}class sl extends le{constructor(e){super(),ie(this,e,al,nl,ne,{size:0,title:1})}}function et(i){let e,t;return{c(){e=K("title"),t=z(i[1])},l(l){e=J(l,"title",{});var a=w(e);t=M(a,i[1]),a.forEach(c)},m(l,a){P(l,e,a),S(e,t)},p(l,a){a&2&&Y(t,l[1])},d(l){l&&c(e)}}}function ol(i){let e,t,l=i[1]&&et(i),a=[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},{width:i[0]},{height:i[0]},i[2],i[3]],f={};for(let o=0;o<a.length;o+=1)f=R(f,a[o]);return{c(){e=K("svg"),l&&l.c(),t=K("path"),this.h()},l(o){e=J(o,"svg",{xmlns:!0,viewBox:!0,fill:!0,preserveAspectRatio:!0,width:!0,height:!0});var n=w(e);l&&l.l(n),t=J(n,"path",{d:!0}),w(t).forEach(c),n.forEach(c),this.h()},h(){V(t,"d","M2 16H7V30H2zM23 30H9V15.1973l3.0422-4.5635.8453-5.9165A2.0094 2.0094 0 0114.8672 3H15a3.0033 3.0033 0 013 3v6h8a4.0045 4.0045 0 014 4v7A7.0078 7.0078 0 0123 30z"),fe(e,f)},m(o,n){P(o,e,n),l&&l.m(e,null),S(e,t)},p(o,[n]){o[1]?l?l.p(o,n):(l=et(o),l.c(),l.m(e,t)):l&&(l.d(1),l=null),fe(e,f=he(a,[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},n&1&&{width:o[0]},n&1&&{height:o[0]},n&4&&o[2],n&8&&o[3]]))},i:j,o:j,d(o){o&&c(e),l&&l.d()}}}function rl(i,e,t){let l,a;const f=["size","title"];let o=G(e,f),{size:n=16}=e,{title:r=void 0}=e;return i.$$set=s=>{t(5,e=R(R({},e),ee(s))),t(3,o=G(e,f)),"size"in s&&t(0,n=s.size),"title"in s&&t(1,r=s.title)},i.$$.update=()=>{t(4,l=e["aria-label"]||e["aria-labelledby"]||r),t(2,a={"aria-hidden":l?void 0:!0,role:l?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=ee(e),[n,r,a,o,l]}class fl extends le{constructor(e){super(),ie(this,e,rl,ol,ne,{size:0,title:1})}}function ul(i,e){const t=l=>i&&!i.contains(l.target)&&!l.defaultPrevented&&e();return document.addEventListener("click",t,!0),{destroy(){document.removeEventListener("click",t,!0)}}}function dl(i){let e=(i[1]?"":i[0])+"",t;return{c(){t=z(e)},l(l){t=M(l,e)},m(l,a){P(l,t,a)},p(l,a){a&3&&e!==(e=(l[1]?"":l[0])+"")&&Y(t,e)},d(l){l&&c(t)}}}function cl(i){let e,t,l,a,f;const o=[i[2],{type:"purple"},{icon:Ue}];let n={$$slots:{default:[dl]},$$scope:{ctx:i}};for(let r=0;r<o.length;r+=1)n=R(n,o[r]);return t=new Rt({props:n}),{c(){e=B("div"),ae(t.$$.fragment),this.h()},l(r){e=L(r,"DIV",{class:!0});var s=w(e);se(t.$$.fragment,s),s.forEach(c),this.h()},h(){V(e,"class","embedding-badge truncate"),C(e,"embedding-badge-nolabel",i[1])},m(r,s){P(r,e,s),oe(t,e,null),l=!0,a||(f=pe(vt.call(null,e,{text:"Embedding index"})),a=!0)},p(r,[s]){const u=s&4?he(o,[s&4&&Vt(r[2]),o[1],s&0&&{icon:Ue}]):{};s&11&&(u.$$scope={dirty:s,ctx:r}),t.$set(u),(!l||s&2)&&C(e,"embedding-badge-nolabel",r[1])},i(r){l||(N(t.$$.fragment,r),l=!0)},o(r){A(t.$$.fragment,r),l=!1},d(r){r&&c(e),re(t),a=!1,f()}}}function hl(i,e,t){const l=["embedding","hideEmbeddingName"];let a=G(e,l),{embedding:f}=e,{hideEmbeddingName:o=!1}=e;return i.$$set=n=>{e=R(R({},e),ee(n)),t(2,a=G(e,l)),"embedding"in n&&t(0,f=n.embedding),"hideEmbeddingName"in n&&t(1,o=n.hideEmbeddingName)},[f,o,a]}class ml extends le{constructor(e){super(),ie(this,e,hl,cl,ne,{embedding:0,hideEmbeddingName:1})}}function tt(i,e,t){const l=i.slice();return l[12]=e[t],l}function lt(i){let e,t,l=i[0].conceptNamespace+"",a,f,o=i[0].conceptName+"",n,r,s,u,d,m,g,y,h,v,T;return d=new fl({}),y=new sl({}),{c(){e=B("div"),t=B("div"),a=z(l),f=z(" / "),n=z(o),r=U(),s=B("div"),u=B("button"),ae(d.$$.fragment),m=U(),g=B("button"),ae(y.$$.fragment),this.h()},l(I){e=L(I,"DIV",{class:!0});var E=w(e);t=L(E,"DIV",{class:!0});var H=w(t);a=M(H,l),f=M(H," / "),n=M(H,o),H.forEach(c),r=X(E),s=L(E,"DIV",{class:!0});var _=w(s);u=L(_,"BUTTON",{class:!0});var k=w(u);se(d.$$.fragment,k),k.forEach(c),m=X(_),g=L(_,"BUTTON",{class:!0});var F=w(g);se(y.$$.fragment,F),F.forEach(c),_.forEach(c),E.forEach(c),this.h()},h(){V(t,"class","flex-grow"),V(u,"class","p-1"),V(g,"class","p-1"),V(s,"class","shrink-0"),V(e,"class","flex flex-row items-center justify-between gap-x-4 p-2")},m(I,E){P(I,e,E),S(e,t),S(t,a),S(t,f),S(t,n),S(e,r),S(e,s),S(s,u),oe(d,u,null),S(s,m),S(s,g),oe(y,g,null),h=!0,v||(T=[O(u,"click",i[8]),O(g,"click",i[9])],v=!0)},p(I,E){(!h||E&1)&&l!==(l=I[0].conceptNamespace+"")&&Y(a,l),(!h||E&1)&&o!==(o=I[0].conceptName+"")&&Y(n,o)},i(I){h||(N(d.$$.fragment,I),N(y.$$.fragment,I),h=!0)},o(I){A(d.$$.fragment,I),A(y.$$.fragment,I),h=!1},d(I){I&&c(e),re(d),re(y),v=!1,ze(T)}}}function it(i){let e,t=[],l=new Map,a,f=i[2];const o=n=>n[12];for(let n=0;n<f.length;n+=1){let r=tt(i,f,n),s=o(r);l.set(s,t[n]=nt(s,r))}return{c(){e=B("div");for(let n=0;n<t.length;n+=1)t[n].c();this.h()},l(n){e=L(n,"DIV",{class:!0});var r=w(e);for(let s=0;s<t.length;s+=1)t[s].l(r);r.forEach(c),this.h()},h(){V(e,"class","more-button flex flex-col")},m(n,r){P(n,e,r);for(let s=0;s<t.length;s+=1)t[s]&&t[s].m(e,null);a=!0},p(n,r){r&29&&(f=n[2],x(),t=gt(t,r,o,1,n,f,l,e,Ht,nt,null,tt),$())},i(n){if(!a){for(let r=0;r<f.length;r+=1)N(t[r]);a=!0}},o(n){for(let r=0;r<t.length;r+=1)A(t[r]);a=!1},d(n){n&&c(e);for(let r=0;r<t.length;r+=1)t[r].d()}}}function nt(i,e){let t,l,a,f,o,n,r,s,u;o=new ml({props:{class:"hover:cursor-pointer",embedding:e[12]}});function d(){return e[10](e[12])}return{key:i,first:null,c(){t=B("button"),l=B("div"),a=z("Find similar"),f=U(),ae(o.$$.fragment),n=U(),this.h()},l(m){t=L(m,"BUTTON",{class:!0});var g=w(t);l=L(g,"DIV",{});var y=w(l);a=M(y,"Find similar"),y.forEach(c),f=X(g),se(o.$$.fragment,g),n=X(g),g.forEach(c),this.h()},h(){V(t,"class","flex w-full items-center justify-between"),this.first=t},m(m,g){P(m,t,g),S(t,l),S(l,a),S(t,f),oe(o,t,null),S(t,n),r=!0,s||(u=O(t,"click",d),s=!0)},p(m,g){e=m;const y={};g&4&&(y.embedding=e[12]),o.$set(y)},i(m){r||(N(o.$$.fragment,m),r=!0)},o(m){A(o.$$.fragment,m),r=!1},d(m){m&&c(t),re(o),s=!1,u()}}}function _l(i){let e,t,l,a,f,o,n,r=i[0].conceptName!=null&&i[0].conceptNamespace!=null&&lt(i),s=i[3]!=null&&it(i);return{c(){e=B("div"),r&&r.c(),t=U(),s&&s.c(),this.h()},l(u){e=L(u,"DIV",{style:!0,class:!0});var d=w(e);r&&r.l(d),t=X(d),s&&s.l(d),d.forEach(c),this.h()},h(){V(e,"style",l=i[1]!=null?`left: ${i[1].x}px; top: ${i[1].y}px`:""),V(e,"class","absolute z-10 inline-flex -translate-x-1/2 translate-y-6 flex-col divide-y divide-gray-200 rounded border border-gray-200 bg-white shadow")},m(u,d){P(u,e,d),r&&r.m(e,null),S(e,t),s&&s.m(e,null),f=!0,o||(n=pe(ul.call(null,e,i[11])),o=!0)},p(u,[d]){u[0].conceptName!=null&&u[0].conceptNamespace!=null?r?(r.p(u,d),d&1&&N(r,1)):(r=lt(u),r.c(),N(r,1),r.m(e,t)):r&&(x(),A(r,1,1,()=>{r=null}),$()),u[3]!=null?s?(s.p(u,d),d&8&&N(s,1)):(s=it(u),s.c(),N(s,1),s.m(e,null)):s&&(x(),A(s,1,1,()=>{s=null}),$()),(!f||d&2&&l!==(l=u[1]!=null?`left: ${u[1].x}px; top: ${u[1].y}px`:""))&&V(e,"style",l)},i(u){f||(N(r),N(s),bt(()=>{f&&(a||(a=Fe(e,Xe,{duration:60},!0)),a.run(1))}),f=!0)},o(u){A(r),A(s),a||(a=Fe(e,Xe,{duration:60},!1)),a.run(0),f=!1},d(u){u&&c(e),r&&r.d(),s&&s.d(),u&&a&&a.end(),o=!1,n()}}}function bl(i,e,t){let{details:l}=e,{clickPosition:a}=e,{embeddings:f}=e,{addConceptLabel:o}=e,{findSimilar:n}=e,{addNotification:r}=e;const s=Pt();function u(h){if(!l.conceptName||!l.conceptNamespace)throw Error("Label could not be added, no active concept.");o(l.conceptNamespace,l.conceptName,l.text,h),r({kind:"success",title:`[${h===!0?"Positive":"Negative"}] Concept label added`,subtitle:qt(l.conceptNamespace,l.conceptName),message:l.text}),s("click")}const d=()=>u(!0),m=()=>u(!1),g=h=>{n&&n(h,l.text),s("click")},y=()=>s("close");return i.$$set=h=>{"details"in h&&t(0,l=h.details),"clickPosition"in h&&t(1,a=h.clickPosition),"embeddings"in h&&t(2,f=h.embeddings),"addConceptLabel"in h&&t(6,o=h.addConceptLabel),"findSimilar"in h&&t(3,n=h.findSimilar),"addNotification"in h&&t(7,r=h.addNotification)},[l,a,f,n,s,u,o,r,d,m,g,y]}class gl extends le{constructor(e){super(),ie(this,e,bl,_l,ne,{details:0,clickPosition:1,embeddings:2,addConceptLabel:6,findSimilar:3,addNotification:7})}}function vl(i,e){let t,l=e;i.addEventListener("click",o=>a(o));function a(o){l.disabled||(t=new gl({props:{details:l.details(),clickPosition:{x:o.clientX,y:o.clientY},embeddings:l.embeddings,addConceptLabel:l.addConceptLabel,addNotification:l.addNotification,findSimilar:l.findSimilar},target:document.body}),t.$on("close",f),t.$on("click",f))}function f(){t==null||t.$destroy(),t=void 0}return{update(o){l=o,t==null||t.$set({details:l.details()})},destroy(){f()}}}const Be=.5,at=.3,pl=.8,st="#3366cc";function Ae(i){return`rgba(180,215,255,${i})`}function Ie(i){let e=0;if(i>Be){const t=(i-Be)/(1-Be);e=at+t*(pl-at)}return Ae(e)}function ot(i,e,t){const l=i.slice();return l[7]=e[t],l}function rt(i,e){let t,l,a=e[7].info.name+"",f,o,n,r,s=ft(e[7])+"",u,d;return{key:i,first:null,c(){t=B("div"),l=B("div"),f=z(a),o=U(),n=B("div"),r=B("span"),u=z(s),d=U(),this.h()},l(m){t=L(m,"DIV",{class:!0});var g=w(t);l=L(g,"DIV",{class:!0});var y=w(l);f=M(y,a),y.forEach(c),o=X(g),n=L(g,"DIV",{class:!0});var h=w(n);r=L(h,"SPAN",{class:!0});var v=w(r);u=M(v,s),v.forEach(c),h.forEach(c),d=X(g),g.forEach(c),this.h()},h(){V(l,"class","named-value-name table-cell max-w-xs truncate pr-2 svelte-1689hje"),V(r,"class","px-1"),C(r,"font-bold",e[7].info.type==="keyword"||e[7].info.type==="metadata"&&!Le(e[7].info.dtype)),te(r,"background-color",(e[7].info.type==="concept_score"||e[7].info.type==="semantic_similarity")&&typeof e[7].value=="number"?Ie(e[7].value):""),V(n,"class","table-cell rounded text-right"),V(t,"class","table-row"),this.first=t},m(m,g){P(m,t,g),S(t,l),S(l,f),S(t,o),S(t,n),S(n,r),S(r,u),S(t,d)},p(m,g){e=m,g&1&&a!==(a=e[7].info.name+"")&&Y(f,a),g&1&&s!==(s=ft(e[7])+"")&&Y(u,s),g&1&&C(r,"font-bold",e[7].info.type==="keyword"||e[7].info.type==="metadata"&&!Le(e[7].info.dtype)),g&1&&te(r,"background-color",(e[7].info.type==="concept_score"||e[7].info.type==="semantic_similarity")&&typeof e[7].value=="number"?Ie(e[7].value):"")},d(m){m&&c(t)}}}function kl(i){let e,t,l=[],a=new Map,f,o=`${i[4]}px`,n=`${Math.min(i[1],i[3]-i[2]-20)}px`,r=i[0];const s=u=>u[7];for(let u=0;u<r.length;u+=1){let d=ot(i,r,u),m=s(d);a.set(m,l[u]=rt(m,d))}return{c(){e=B("div"),t=B("div");for(let u=0;u<l.length;u+=1)l[u].c();this.h()},l(u){e=L(u,"DIV",{role:!0,class:!0});var d=w(e);t=L(d,"DIV",{class:!0});var m=w(t);for(let g=0;g<l.length;g+=1)l[g].l(m);m.forEach(c),d.forEach(c),this.h()},h(){V(t,"class","table border-spacing-y-2"),V(e,"role","tooltip"),V(e,"class","absolute max-w-fit -translate-y-full break-words border border-gray-300 bg-white px-2 shadow-md"),bt(()=>i[6].call(e)),C(e,"hidden",i[0].length===0),te(e,"top",o),te(e,"left",n)},m(u,d){P(u,e,d),S(e,t);for(let m=0;m<l.length;m+=1)l[m]&&l[m].m(t,null);f=Bt(e,i[6].bind(e))},p(u,[d]){d&1&&(r=u[0],l=gt(l,d,s,1,u,r,a,t,Lt,rt,null,ot)),d&1&&C(e,"hidden",u[0].length===0),d&6&&n!==(n=`${Math.min(u[1],u[3]-u[2]-20)}px`)&&te(e,"left",n)},i:j,o:j,d(u){u&&c(e);for(let d=0;d<l.length;d+=1)l[d].d();f()}}}function ft(i){return typeof i.value=="number"?i.value.toFixed(3):i.info.dtype==="string_span"?"true":i.value}function Sl(i,e,t){let{namedValues:l}=e,{x:a}=e,{y:f}=e;const o=window.innerWidth;let n=0;const r=f-1;function s(){n=this.clientWidth,t(2,n)}return i.$$set=u=>{"namedValues"in u&&t(0,l=u.namedValues),"x"in u&&t(1,a=u.x),"y"in u&&t(5,f=u.y)},[l,a,n,o,r,f,s]}class wl extends le{constructor(e){super(),ie(this,e,Sl,kl,ne,{namedValues:0,x:1,y:5})}}function El(i,e){let t,l=e;const a=()=>o();l.isHovered&&f();function f(){const n=l.namedValues.filter(m=>Array.from(l.spansHovered).some(g=>{const y=pt(g);return kt(m.specificPath.slice(0,y.length),y)}));l.itemScrollContainer!=null&&l.itemScrollContainer.addEventListener("scroll",a);const r=i.getBoundingClientRect(),s=window.getComputedStyle(i),u=parseInt(s.getPropertyValue("line-height")),d=r.height>u?r.x+i.offsetLeft||i.clientLeft:r.x;t=new wl({props:{namedValues:n,x:d,y:r.top},target:document.body})}function o(){var n;t==null||t.$destroy(),(n=l.itemScrollContainer)==null||n.removeEventListener("scroll",a)}return{update(n){o(),l=n,l.isHovered&&f()},destroy(){o()}}}const yl=500,ve=100;function Tl(i,e,t){const l=[],a=new Set;for(const f of i){let o=!1;const n=[];for(const T of f.paths)a.has(T)||(n.push(T),a.add(T));const r=[],s=[];let u=-1/0;for(const[T,I]of Object.entries(f.originalSpans)){const E=e[T],H=pt(T);if(!(E==null||E.length===0))for(const _ of I)for(const k of E){const F=k.path.slice(H.length),W=Dt(_,F);if(W==null)continue;const q=Se.value(W);if(q==null)continue;if(k.dtype==="float32"){const Z=Se.value(W);Z!=null&&(u=Math.max(u,Z))}const ue=we(Se.path(_)),de=!n.includes(ue),ce={value:q,info:k,specificPath:Se.path(W)};de||r.push(ce),s.push(ce),k.type==="concept_score"||k.type==="semantic_similarity"?q>.5&&(o=!0):o=!0}}const d=s.some(T=>T.info.type==="label"),m=s.some(T=>T.info.type==="leaf_span"),g=s.some(T=>T.info.type==="keyword"),y=s.some(T=>T.info.type==="metadata"&&!Le(T.info.dtype)),h=f.paths.some(T=>t.has(T)),v=h&&n.length>0&&Array.from(t).some(T=>n.includes(T));l.push({backgroundColor:Ie(u),isBlackBolded:g||y||m,isHighlightBolded:d,isShownSnippet:o,snippetScore:u,namedValues:r,paths:f.paths,text:f.text,snippetText:f.text,originalSpans:f.originalSpans,isHovered:h,isFirstHover:v})}return l}function Nl(i,e){var o,n,r;if(i=i.map(s=>{if(s.isShownSnippet&&s.text.length>ve){const u={...s,text:s.text.slice(0,ve),snippetText:s.snippetText.slice(0,ve)},d={...s,text:s.text.slice(ve),snippetText:s.snippetText.slice(ve),isShownSnippet:!1,namedValues:[]};return[u,d]}else return[s]}).flat(),e)return{snippetSpans:i.map(s=>({renderSpan:s,isShown:!0})),someSnippetsHidden:!1};const t=[];let l=0;for(const s of i)s.isShownSnippet&&(l+=s.text.length);const a=i.filter(s=>!s.isShownSnippet).sort((s,u)=>u.snippetScore-s.snippetScore);for(const s of a)if(s.isShownSnippet=!0,l+=s.text.length,l>yl)break;let f=!1;for(const[s,u]of i.entries())if(u.isShownSnippet)t.push({renderSpan:u,isShown:!0});else{const d=((o=i[s+1])==null?void 0:o.isShownSnippet)===!0,m=((n=i[s-1])==null?void 0:n.isShownSnippet)===!0,g=((r=t[t.length-1])==null?void 0:r.isShown)===!0;t.push({renderSpan:u,isShown:!1,isEllipsis:(d||m)&&g,hasNewline:u.text.includes(`
2
+ `)}),f=!0}return{snippetSpans:t,someSnippetsHidden:f}}function ut(i,e,t){const l=i.slice();l[34]=e[t];const a=l[34].renderSpan;return l[35]=a,l}function Cl(i){let e,t,l,a,f,o=i[34].hasNewline&&dt();return{c(){e=B("span"),t=z("..."),o&&o.c(),l=Ee(),this.h()},l(n){e=L(n,"SPAN",{class:!0});var r=w(e);t=M(r,"..."),r.forEach(c),o&&o.l(n),l=Ee(),this.h()},h(){V(e,"class","highlight-span text-sm leading-5 svelte-8ox5pu")},m(n,r){P(n,e,r),S(e,t),o&&o.m(n,r),P(n,l,r),a||(f=pe(vt.call(null,e,{text:`Some text was hidden to improve readability.
3
+ Click "Show all" to show the entire document.`})),a=!0)},p(n,r){n[34].hasNewline?o||(o=dt(),o.c(),o.m(l.parentNode,l)):o&&(o.d(1),o=null)},i:j,o:j,d(n){n&&c(e),o&&o.d(n),n&&c(l),a=!1,f()}}}function Vl(i){let e,t,l,a,f,o,n,r;const s=[Hl,Pl],u=[];function d(h,v){return h[1]?0:1}t=d(i),l=u[t]=s[t](i);function m(){return i[27](i[35])}function g(){return i[28](i[35])}function y(){return i[29](i[35])}return{c(){e=B("span"),l.c(),this.h()},l(h){e=L(h,"SPAN",{class:!0});var v=w(e);l.l(v),v.forEach(c),this.h()},h(){V(e,"class","hover:cursor-poiner highlight-span break-words text-sm leading-5 svelte-8ox5pu"),C(e,"hover:cursor-pointer",i[0].length>0),C(e,"font-bold",i[35].isBlackBolded),C(e,"font-medium",i[35].isHighlightBolded&&!i[35].isBlackBolded),te(e,"color",i[35].isHighlightBolded&&!i[35].isBlackBolded?st:""),te(e,"background-color",i[35].isHovered?Ae(mt):i[35].backgroundColor)},m(h,v){P(h,e,v),u[t].m(e,null),o=!0,n||(r=[pe(a=El.call(null,e,{namedValues:i[35].namedValues,isHovered:i[35].isFirstHover,spansHovered:i[5],itemScrollContainer:i[9]})),pe(f=vl.call(null,e,{details:m,findSimilar:i[4]!=null?i[16]:null,embeddings:i[2],addConceptLabel:i[14],addNotification:i[17]!=null?i[17].addNotification:_t,disabled:i[35].paths.length===0||i[2].length===0})),O(e,"mouseenter",g),O(e,"mouseleave",y)],n=!0)},p(h,v){i=h;let T=t;t=d(i),t===T?u[t].p(i,v):(x(),A(u[T],1,1,()=>{u[T]=null}),$(),l=u[t],l?l.p(i,v):(l=u[t]=s[t](i),l.c()),N(l,1),l.m(e,null)),a&&je(a.update)&&v[0]&800&&a.update.call(null,{namedValues:i[35].namedValues,isHovered:i[35].isFirstHover,spansHovered:i[5],itemScrollContainer:i[9]}),f&&je(f.update)&&v[0]&276&&f.update.call(null,{details:m,findSimilar:i[4]!=null?i[16]:null,embeddings:i[2],addConceptLabel:i[14],addNotification:i[17]!=null?i[17].addNotification:_t,disabled:i[35].paths.length===0||i[2].length===0}),(!o||v[0]&1)&&C(e,"hover:cursor-pointer",i[0].length>0),(!o||v[0]&256)&&C(e,"font-bold",i[35].isBlackBolded),(!o||v[0]&256)&&C(e,"font-medium",i[35].isHighlightBolded&&!i[35].isBlackBolded),v[0]&256&&te(e,"color",i[35].isHighlightBolded&&!i[35].isBlackBolded?st:""),v[0]&256&&te(e,"background-color",i[35].isHovered?Ae(mt):i[35].backgroundColor)},i(h){o||(N(l),o=!0)},o(h){A(l),o=!1},d(h){h&&c(e),u[t].d(),n=!1,ze(r)}}}function dt(i){let e,t;return{c(){e=B("span"),t=B("br")},l(l){e=L(l,"SPAN",{});var a=w(e);t=L(a,"BR",{}),a.forEach(c)},m(l,a){P(l,e,a),S(e,t)},d(l){l&&c(e)}}}function Pl(i){let e=i[35].snippetText+"",t;return{c(){t=z(e)},l(l){t=M(l,e)},m(l,a){P(l,t,a)},p(l,a){a[0]&256&&e!==(e=l[35].snippetText+"")&&Y(t,e)},i:j,o:j,d(l){l&&c(t)}}}function Hl(i){let e,t;return e=new Yt({props:{source:i[35].snippetText}}),{c(){ae(e.$$.fragment)},l(l){se(e.$$.fragment,l)},m(l,a){oe(e,l,a),t=!0},p(l,a){const f={};a[0]&256&&(f.source=l[35].snippetText),e.$set(f)},i(l){t||(N(e.$$.fragment,l),t=!0)},o(l){A(e.$$.fragment,l),t=!1},d(l){re(e,l)}}}function ct(i){let e,t,l,a;const f=[Vl,Cl],o=[];function n(r,s){return r[34].isShown?0:r[34].isEllipsis?1:-1}return~(e=n(i))&&(t=o[e]=f[e](i)),{c(){t&&t.c(),l=Ee()},l(r){t&&t.l(r),l=Ee()},m(r,s){~e&&o[e].m(r,s),P(r,l,s),a=!0},p(r,s){let u=e;e=n(r),e===u?~e&&o[e].p(r,s):(t&&(x(),A(o[u],1,1,()=>{o[u]=null}),$()),~e?(t=o[e],t?t.p(r,s):(t=o[e]=f[e](r),t.c()),N(t,1),t.m(l.parentNode,l)):t=null)},i(r){a||(N(t),a=!0)},o(r){A(t),a=!1},d(r){~e&&o[e].d(r),r&&c(l)}}}function ht(i){let e,t,l,a,f;const o=[Ll,Bl],n=[];function r(s,u){return s[6]?1:0}return l=r(i),a=n[l]=o[l](i),{c(){e=B("div"),t=B("div"),a.c(),this.h()},l(s){e=L(s,"DIV",{class:!0});var u=w(e);t=L(u,"DIV",{class:!0});var d=w(t);a.l(d),d.forEach(c),u.forEach(c),this.h()},h(){V(t,"class","w-30 mt-2 rounded border border-neutral-300 text-center"),V(e,"class","flex flex-row justify-center")},m(s,u){P(s,e,u),S(e,t),n[l].m(t,null),f=!0},p(s,u){let d=l;l=r(s),l===d?n[l].p(s,u):(x(),A(n[d],1,1,()=>{n[d]=null}),$(),a=n[l],a?a.p(s,u):(a=n[l]=o[l](s),a.c()),N(a,1),a.m(t,null))},i(s){f||(N(a),f=!0)},o(s){A(a),f=!1},d(s){s&&c(e),n[l].d()}}}function Bl(i){let e,t;return e=new St({props:{size:"small",class:"w-full",kind:"ghost",icon:il,$$slots:{default:[Al]},$$scope:{ctx:i}}}),e.$on("click",i[31]),{c(){ae(e.$$.fragment)},l(l){se(e.$$.fragment,l)},m(l,a){oe(e,l,a),t=!0},p(l,a){const f={};a[1]&128&&(f.$$scope={dirty:a,ctx:l}),e.$set(f)},i(l){t||(N(e.$$.fragment,l),t=!0)},o(l){A(e.$$.fragment,l),t=!1},d(l){re(e,l)}}}function Ll(i){let e,t;return e=new St({props:{size:"small",class:"w-full",kind:"ghost",icon:el,$$slots:{default:[Il]},$$scope:{ctx:i}}}),e.$on("click",i[30]),{c(){ae(e.$$.fragment)},l(l){se(e.$$.fragment,l)},m(l,a){oe(e,l,a),t=!0},p(l,a){const f={};a[1]&128&&(f.$$scope={dirty:a,ctx:l}),e.$set(f)},i(l){t||(N(e.$$.fragment,l),t=!0)},o(l){A(e.$$.fragment,l),t=!1},d(l){re(e,l)}}}function Al(i){let e;return{c(){e=z("Hide excess")},l(t){e=M(t,"Hide excess")},m(t,l){P(t,e,l)},d(t){t&&c(e)}}}function Il(i){let e;return{c(){e=z("Show all")},l(t){e=M(t,"Show all")},m(t,l){P(t,e,l)},d(t){t&&c(e)}}}function zl(i){let e,t,l,a=i[8],f=[];for(let r=0;r<a.length;r+=1)f[r]=ct(ut(i,a,r));const o=r=>A(f[r],1,1,()=>{f[r]=null});let n=(i[7]||i[6])&&ht(i);return{c(){e=B("div");for(let r=0;r<f.length;r+=1)f[r].c();t=U(),n&&n.c(),this.h()},l(r){e=L(r,"DIV",{class:!0});var s=w(e);for(let u=0;u<f.length;u+=1)f[u].l(s);t=X(s),n&&n.l(s),s.forEach(c),this.h()},h(){V(e,"class","relative overflow-x-hidden text-ellipsis whitespace-break-spaces py-4")},m(r,s){P(r,e,s);for(let u=0;u<f.length;u+=1)f[u]&&f[u].m(e,null);S(e,t),n&&n.m(e,null),l=!0},p(r,s){if(s[0]&220983){a=r[8];let u;for(u=0;u<a.length;u+=1){const d=ut(r,a,u);f[u]?(f[u].p(d,s),N(f[u],1)):(f[u]=ct(d),f[u].c(),N(f[u],1),f[u].m(e,t))}for(x(),u=a.length;u<f.length;u+=1)o(u);$()}r[7]||r[6]?n?(n.p(r,s),s[0]&192&&N(n,1)):(n=ht(r),n.c(),N(n,1),n.m(e,null)):n&&(x(),A(n,1,1,()=>{n=null}),$())},i(r){if(!l){for(let s=0;s<a.length;s+=1)N(f[s]);N(n),l=!0}},o(r){f=f.filter(Boolean);for(let s=0;s<f.length;s+=1)A(f[s]);A(n),l=!1},d(r){r&&c(e),At(f,r),n&&n.d()}}}const mt=.9,_t=()=>null;function Ml(i,e,t){let l,a,f,o,n,r,s=j,u=()=>(s(),s=zt(E,p=>t(26,r=p)),E),d,m;i.$$.on_destroy.push(()=>s());let{text:g}=e,{row:y}=e,{spanPaths:h}=e,{valuePaths:v}=e,{markdown:T=!1}=e,{embeddings:I}=e,{datasetViewStore:E=void 0}=e;u();let{datasetStore:H=void 0}=e,_={},k=new Set;const F=p=>{p.paths.forEach(D=>k.add(D)),t(5,k)},W=p=>{p.paths.forEach(D=>k.delete(D)),t(5,k)};let q={};const ue=p=>{const _e={conceptName:null,conceptNamespace:null,text:f.filter(be=>be.paths.some(He=>((p==null?void 0:p.paths)||[]).some(ge=>kt(ge,He)))).map(be=>be.text).join("")};for(const be of Object.keys(p.originalSpans)){const He=(_[be]||[]).filter(ge=>ge.type==="concept_score");for(const ge of He){const Re=ge.signal;_e.conceptName=Re.concept_name,_e.conceptNamespace=Re.namespace;break}}return _e},de=Ot();Ye(i,de,p=>t(33,d=p));const ce=(p,D,Me,_e)=>{if(!D||!p)throw Error("Label could not be added, no active concept.");d.mutate([p,D,{insert:[{text:Me,label:_e}]}])};let Z=!1,ke=It(jt);Ye(i,ke,p=>t(9,m=p));let me;const ye=(p,D)=>{E==null||me==null||E.addSearch({path:[we(me)],type:"semantic",query:D,embedding:p})},Te=Ut(),Ne=p=>ue(p),Ce=p=>F(p),Ve=p=>W(p),Pe=()=>t(6,Z=!0),b=()=>t(6,Z=!1);return i.$$set=p=>{"text"in p&&t(18,g=p.text),"row"in p&&t(19,y=p.row),"spanPaths"in p&&t(0,h=p.spanPaths),"valuePaths"in p&&t(20,v=p.valuePaths),"markdown"in p&&t(1,T=p.markdown),"embeddings"in p&&t(2,I=p.embeddings),"datasetViewStore"in p&&u(t(3,E=p.datasetViewStore)),"datasetStore"in p&&t(4,H=p.datasetStore)},i.$$.update=()=>{if(i.$$.dirty[0]&524289&&t(25,l=Object.fromEntries(h.map(p=>[we(p),Ft(y,p)]))),i.$$.dirty[0]&3145728){t(21,_={});for(const p of v){const D=we(p.spanPath);_[D]==null&&t(21,_[D]=[],_),_[D].push(p)}}if(i.$$.dirty[0]&33816576&&t(24,a=Xt(g,l)),i.$$.dirty[0]&18874400&&t(23,f=Tl(a,_,k)),i.$$.dirty[0]&20971520){t(22,q={});for(const p of a)for(const D of p.paths)t(22,q[D]=q[D]||[],q),q[D].push(p)}i.$$.dirty[0]&8388672&&t(8,{snippetSpans:o,someSnippetsHidden:n}=Nl(f,Z),o,(t(7,n),t(23,f),t(6,Z),t(24,a),t(21,_),t(5,k),t(18,g),t(25,l),t(20,v),t(0,h),t(19,y))),i.$$.dirty[0]&67108880&&r!=null&&H!=null&&(me=Wt(r,H))},[h,T,I,E,H,k,Z,n,o,m,F,W,ue,de,ce,ke,ye,Te,g,y,v,_,q,f,a,l,r,Ne,Ce,Ve,Pe,b]}class jl extends le{constructor(e){super(),ie(this,e,Ml,zl,ne,{text:18,row:19,spanPaths:0,valuePaths:20,markdown:1,embeddings:2,datasetViewStore:3,datasetStore:4},null,[-1,-1])}}export{ml as E,jl as S,Yl as T,fl as a,sl as b};
lilac/web/_app/immutable/chunks/ToastNotification.66c9609a.js ADDED
@@ -0,0 +1 @@
 
 
1
+ import{S as gt,i as kt,s as Dt,e as ot,b as P,g as h,v as rt,d as D,f as _t,h as v,N as nt,C as vt,o as Ct,E as w,Q as Bt,D as R,k as F,y as mt,a as G,l as J,m as K,z as bt,c as L,G as c,F as st,A as dt,a0 as C,H as j,I as O,J as U,K as X,L as It,B as ht,M as pt,R as Y,q as y,r as x,u as $}from"./index.b333a928.js";import{aD as Et,aE as qt}from"./Commands.1fffdf33.js";const Nt=i=>({}),lt=i=>({}),Tt=i=>({}),at=i=>({}),Wt=i=>({}),ft=i=>({});function ut(i){let t,o,n,l,r,E,k,q,g,N,T,B,f,W,S;o=new Et({props:{kind:i[0],iconDescription:i[6]}});const V=i[15].title,I=R(V,i,i[14],ft),m=I||Vt(i),H=i[15].subtitle,p=R(H,i,i[14],at),_=p||Ht(i),z=i[15].caption,M=R(z,i,i[14],lt),b=M||Mt(i),A=i[15].default,s=R(A,i,i[14],null);let u=!i[8]&&ct(i),Z=[{role:i[2]},{kind:i[0]},i[12],{style:B=""+((i[9]&&"width: 100%;")+i[12].style)}],Q={};for(let e=0;e<Z.length;e+=1)Q=w(Q,Z[e]);return{c(){t=F("div"),mt(o.$$.fragment),n=G(),l=F("div"),r=F("h3"),m&&m.c(),E=G(),k=F("div"),_&&_.c(),q=G(),g=F("div"),b&&b.c(),N=G(),s&&s.c(),T=G(),u&&u.c(),this.h()},l(e){t=J(e,"DIV",{role:!0,kind:!0,style:!0});var a=K(t);bt(o.$$.fragment,a),n=L(a),l=J(a,"DIV",{});var d=K(l);r=J(d,"H3",{});var tt=K(r);m&&m.l(tt),tt.forEach(v),E=L(d),k=J(d,"DIV",{});var it=K(k);_&&_.l(it),it.forEach(v),q=L(d),g=J(d,"DIV",{});var et=K(g);b&&b.l(et),et.forEach(v),N=L(d),s&&s.l(d),d.forEach(v),T=L(a),u&&u.l(a),a.forEach(v),this.h()},h(){c(r,"bx--toast-notification__title",!0),c(k,"bx--toast-notification__subtitle",!0),c(g,"bx--toast-notification__caption",!0),c(l,"bx--toast-notification__details",!0),st(t,Q),c(t,"bx--toast-notification",!0),c(t,"bx--toast-notification--low-contrast",i[1]),c(t,"bx--toast-notification--error",i[0]==="error"),c(t,"bx--toast-notification--info",i[0]==="info"),c(t,"bx--toast-notification--info-square",i[0]==="info-square"),c(t,"bx--toast-notification--success",i[0]==="success"),c(t,"bx--toast-notification--warning",i[0]==="warning"),c(t,"bx--toast-notification--warning-alt",i[0]==="warning-alt")},m(e,a){P(e,t,a),dt(o,t,null),C(t,n),C(t,l),C(l,r),m&&m.m(r,null),C(l,E),C(l,k),_&&_.m(k,null),C(l,q),C(l,g),b&&b.m(g,null),C(l,N),s&&s.m(l,null),C(t,T),u&&u.m(t,null),f=!0,W||(S=[j(t,"click",i[16]),j(t,"mouseover",i[17]),j(t,"mouseenter",i[18]),j(t,"mouseleave",i[19])],W=!0)},p(e,a){const d={};a&1&&(d.kind=e[0]),a&64&&(d.iconDescription=e[6]),o.$set(d),I?I.p&&(!f||a&16384)&&O(I,V,e,e[14],f?X(V,e[14],a,Wt):U(e[14]),ft):m&&m.p&&(!f||a&8)&&m.p(e,f?a:-1),p?p.p&&(!f||a&16384)&&O(p,H,e,e[14],f?X(H,e[14],a,Tt):U(e[14]),at):_&&_.p&&(!f||a&16)&&_.p(e,f?a:-1),M?M.p&&(!f||a&16384)&&O(M,z,e,e[14],f?X(z,e[14],a,Nt):U(e[14]),lt):b&&b.p&&(!f||a&32)&&b.p(e,f?a:-1),s&&s.p&&(!f||a&16384)&&O(s,A,e,e[14],f?X(A,e[14],a,null):U(e[14]),null),e[8]?u&&(rt(),D(u,1,1,()=>{u=null}),_t()):u?(u.p(e,a),a&256&&h(u,1)):(u=ct(e),u.c(),h(u,1),u.m(t,null)),st(t,Q=It(Z,[(!f||a&4)&&{role:e[2]},(!f||a&1)&&{kind:e[0]},a&4096&&e[12],(!f||a&4608&&B!==(B=""+((e[9]&&"width: 100%;")+e[12].style)))&&{style:B}])),c(t,"bx--toast-notification",!0),c(t,"bx--toast-notification--low-contrast",e[1]),c(t,"bx--toast-notification--error",e[0]==="error"),c(t,"bx--toast-notification--info",e[0]==="info"),c(t,"bx--toast-notification--info-square",e[0]==="info-square"),c(t,"bx--toast-notification--success",e[0]==="success"),c(t,"bx--toast-notification--warning",e[0]==="warning"),c(t,"bx--toast-notification--warning-alt",e[0]==="warning-alt")},i(e){f||(h(o.$$.fragment,e),h(m,e),h(_,e),h(b,e),h(s,e),h(u),f=!0)},o(e){D(o.$$.fragment,e),D(m,e),D(_,e),D(b,e),D(s,e),D(u),f=!1},d(e){e&&v(t),ht(o),m&&m.d(e),_&&_.d(e),b&&b.d(e),s&&s.d(e),u&&u.d(),W=!1,pt(S)}}}function Vt(i){let t;return{c(){t=y(i[3])},l(o){t=x(o,i[3])},m(o,n){P(o,t,n)},p(o,n){n&8&&$(t,o[3])},d(o){o&&v(t)}}}function Ht(i){let t;return{c(){t=y(i[4])},l(o){t=x(o,i[4])},m(o,n){P(o,t,n)},p(o,n){n&16&&$(t,o[4])},d(o){o&&v(t)}}}function Mt(i){let t;return{c(){t=y(i[5])},l(o){t=x(o,i[5])},m(o,n){P(o,t,n)},p(o,n){n&32&&$(t,o[5])},d(o){o&&v(t)}}}function ct(i){let t,o;return t=new qt({props:{iconDescription:i[7]}}),t.$on("click",i[11]),{c(){mt(t.$$.fragment)},l(n){bt(t.$$.fragment,n)},m(n,l){dt(t,n,l),o=!0},p(n,l){const r={};l&128&&(r.iconDescription=n[7]),t.$set(r)},i(n){o||(h(t.$$.fragment,n),o=!0)},o(n){D(t.$$.fragment,n),o=!1},d(n){ht(t,n)}}}function St(i){let t,o,n=i[10]&&ut(i);return{c(){n&&n.c(),t=ot()},l(l){n&&n.l(l),t=ot()},m(l,r){n&&n.m(l,r),P(l,t,r),o=!0},p(l,[r]){l[10]?n?(n.p(l,r),r&1024&&h(n,1)):(n=ut(l),n.c(),h(n,1),n.m(t.parentNode,t)):n&&(rt(),D(n,1,1,()=>{n=null}),_t())},i(l){o||(h(n),o=!0)},o(l){D(n),o=!1},d(l){n&&n.d(l),l&&v(t)}}}function zt(i,t,o){const n=["kind","lowContrast","timeout","role","title","subtitle","caption","statusIconDescription","closeButtonDescription","hideCloseButton","fullWidth"];let l=nt(t,n),{$$slots:r={},$$scope:E}=t,{kind:k="error"}=t,{lowContrast:q=!1}=t,{timeout:g=0}=t,{role:N="alert"}=t,{title:T=""}=t,{subtitle:B=""}=t,{caption:f=""}=t,{statusIconDescription:W=k+" icon"}=t,{closeButtonDescription:S="Close notification"}=t,{hideCloseButton:V=!1}=t,{fullWidth:I=!1}=t;const m=vt();let H=!0,p;function _(s){m("close",{timeout:s===!0},{cancelable:!0})&&o(10,H=!1)}Ct(()=>(g&&(p=setTimeout(()=>_(!0),g)),()=>{clearTimeout(p)}));function z(s){Y.call(this,i,s)}function M(s){Y.call(this,i,s)}function b(s){Y.call(this,i,s)}function A(s){Y.call(this,i,s)}return i.$$set=s=>{t=w(w({},t),Bt(s)),o(12,l=nt(t,n)),"kind"in s&&o(0,k=s.kind),"lowContrast"in s&&o(1,q=s.lowContrast),"timeout"in s&&o(13,g=s.timeout),"role"in s&&o(2,N=s.role),"title"in s&&o(3,T=s.title),"subtitle"in s&&o(4,B=s.subtitle),"caption"in s&&o(5,f=s.caption),"statusIconDescription"in s&&o(6,W=s.statusIconDescription),"closeButtonDescription"in s&&o(7,S=s.closeButtonDescription),"hideCloseButton"in s&&o(8,V=s.hideCloseButton),"fullWidth"in s&&o(9,I=s.fullWidth),"$$scope"in s&&o(14,E=s.$$scope)},[k,q,N,T,B,f,W,S,V,I,H,_,l,g,E,r,z,M,b,A]}class At extends gt{constructor(t){super(),kt(this,t,zt,St,Dt,{kind:0,lowContrast:1,timeout:13,role:2,title:3,subtitle:4,caption:5,statusIconDescription:6,closeButtonDescription:7,hideCloseButton:8,fullWidth:9})}}const Jt=At;export{Jt as T};
lilac/web/_app/immutable/chunks/ToastNotification.94abd3f6.js ADDED
@@ -0,0 +1 @@
 
 
1
+ import{S as gt,i as kt,s as Dt,e as ot,b as P,g as h,v as rt,d as D,f as _t,h as v,N as nt,C as vt,o as Ct,E as w,Q as Bt,D as R,k as F,y as mt,a as G,l as J,m as K,z as bt,c as L,G as c,F as st,A as dt,a0 as C,H as j,I as O,J as U,K as X,L as It,B as ht,M as pt,R as Y,q as y,r as x,u as $}from"./index.b7741aa8.js";import{aD as Et,aE as qt}from"./Commands.539ca0ee.js";const Nt=i=>({}),lt=i=>({}),Tt=i=>({}),at=i=>({}),Wt=i=>({}),ft=i=>({});function ut(i){let t,o,n,l,r,E,k,q,g,N,T,B,f,W,S;o=new Et({props:{kind:i[0],iconDescription:i[6]}});const V=i[15].title,I=R(V,i,i[14],ft),m=I||Vt(i),H=i[15].subtitle,p=R(H,i,i[14],at),_=p||Ht(i),z=i[15].caption,M=R(z,i,i[14],lt),b=M||Mt(i),A=i[15].default,s=R(A,i,i[14],null);let u=!i[8]&&ct(i),Z=[{role:i[2]},{kind:i[0]},i[12],{style:B=""+((i[9]&&"width: 100%;")+i[12].style)}],Q={};for(let e=0;e<Z.length;e+=1)Q=w(Q,Z[e]);return{c(){t=F("div"),mt(o.$$.fragment),n=G(),l=F("div"),r=F("h3"),m&&m.c(),E=G(),k=F("div"),_&&_.c(),q=G(),g=F("div"),b&&b.c(),N=G(),s&&s.c(),T=G(),u&&u.c(),this.h()},l(e){t=J(e,"DIV",{role:!0,kind:!0,style:!0});var a=K(t);bt(o.$$.fragment,a),n=L(a),l=J(a,"DIV",{});var d=K(l);r=J(d,"H3",{});var tt=K(r);m&&m.l(tt),tt.forEach(v),E=L(d),k=J(d,"DIV",{});var it=K(k);_&&_.l(it),it.forEach(v),q=L(d),g=J(d,"DIV",{});var et=K(g);b&&b.l(et),et.forEach(v),N=L(d),s&&s.l(d),d.forEach(v),T=L(a),u&&u.l(a),a.forEach(v),this.h()},h(){c(r,"bx--toast-notification__title",!0),c(k,"bx--toast-notification__subtitle",!0),c(g,"bx--toast-notification__caption",!0),c(l,"bx--toast-notification__details",!0),st(t,Q),c(t,"bx--toast-notification",!0),c(t,"bx--toast-notification--low-contrast",i[1]),c(t,"bx--toast-notification--error",i[0]==="error"),c(t,"bx--toast-notification--info",i[0]==="info"),c(t,"bx--toast-notification--info-square",i[0]==="info-square"),c(t,"bx--toast-notification--success",i[0]==="success"),c(t,"bx--toast-notification--warning",i[0]==="warning"),c(t,"bx--toast-notification--warning-alt",i[0]==="warning-alt")},m(e,a){P(e,t,a),dt(o,t,null),C(t,n),C(t,l),C(l,r),m&&m.m(r,null),C(l,E),C(l,k),_&&_.m(k,null),C(l,q),C(l,g),b&&b.m(g,null),C(l,N),s&&s.m(l,null),C(t,T),u&&u.m(t,null),f=!0,W||(S=[j(t,"click",i[16]),j(t,"mouseover",i[17]),j(t,"mouseenter",i[18]),j(t,"mouseleave",i[19])],W=!0)},p(e,a){const d={};a&1&&(d.kind=e[0]),a&64&&(d.iconDescription=e[6]),o.$set(d),I?I.p&&(!f||a&16384)&&O(I,V,e,e[14],f?X(V,e[14],a,Wt):U(e[14]),ft):m&&m.p&&(!f||a&8)&&m.p(e,f?a:-1),p?p.p&&(!f||a&16384)&&O(p,H,e,e[14],f?X(H,e[14],a,Tt):U(e[14]),at):_&&_.p&&(!f||a&16)&&_.p(e,f?a:-1),M?M.p&&(!f||a&16384)&&O(M,z,e,e[14],f?X(z,e[14],a,Nt):U(e[14]),lt):b&&b.p&&(!f||a&32)&&b.p(e,f?a:-1),s&&s.p&&(!f||a&16384)&&O(s,A,e,e[14],f?X(A,e[14],a,null):U(e[14]),null),e[8]?u&&(rt(),D(u,1,1,()=>{u=null}),_t()):u?(u.p(e,a),a&256&&h(u,1)):(u=ct(e),u.c(),h(u,1),u.m(t,null)),st(t,Q=It(Z,[(!f||a&4)&&{role:e[2]},(!f||a&1)&&{kind:e[0]},a&4096&&e[12],(!f||a&4608&&B!==(B=""+((e[9]&&"width: 100%;")+e[12].style)))&&{style:B}])),c(t,"bx--toast-notification",!0),c(t,"bx--toast-notification--low-contrast",e[1]),c(t,"bx--toast-notification--error",e[0]==="error"),c(t,"bx--toast-notification--info",e[0]==="info"),c(t,"bx--toast-notification--info-square",e[0]==="info-square"),c(t,"bx--toast-notification--success",e[0]==="success"),c(t,"bx--toast-notification--warning",e[0]==="warning"),c(t,"bx--toast-notification--warning-alt",e[0]==="warning-alt")},i(e){f||(h(o.$$.fragment,e),h(m,e),h(_,e),h(b,e),h(s,e),h(u),f=!0)},o(e){D(o.$$.fragment,e),D(m,e),D(_,e),D(b,e),D(s,e),D(u),f=!1},d(e){e&&v(t),ht(o),m&&m.d(e),_&&_.d(e),b&&b.d(e),s&&s.d(e),u&&u.d(),W=!1,pt(S)}}}function Vt(i){let t;return{c(){t=y(i[3])},l(o){t=x(o,i[3])},m(o,n){P(o,t,n)},p(o,n){n&8&&$(t,o[3])},d(o){o&&v(t)}}}function Ht(i){let t;return{c(){t=y(i[4])},l(o){t=x(o,i[4])},m(o,n){P(o,t,n)},p(o,n){n&16&&$(t,o[4])},d(o){o&&v(t)}}}function Mt(i){let t;return{c(){t=y(i[5])},l(o){t=x(o,i[5])},m(o,n){P(o,t,n)},p(o,n){n&32&&$(t,o[5])},d(o){o&&v(t)}}}function ct(i){let t,o;return t=new qt({props:{iconDescription:i[7]}}),t.$on("click",i[11]),{c(){mt(t.$$.fragment)},l(n){bt(t.$$.fragment,n)},m(n,l){dt(t,n,l),o=!0},p(n,l){const r={};l&128&&(r.iconDescription=n[7]),t.$set(r)},i(n){o||(h(t.$$.fragment,n),o=!0)},o(n){D(t.$$.fragment,n),o=!1},d(n){ht(t,n)}}}function St(i){let t,o,n=i[10]&&ut(i);return{c(){n&&n.c(),t=ot()},l(l){n&&n.l(l),t=ot()},m(l,r){n&&n.m(l,r),P(l,t,r),o=!0},p(l,[r]){l[10]?n?(n.p(l,r),r&1024&&h(n,1)):(n=ut(l),n.c(),h(n,1),n.m(t.parentNode,t)):n&&(rt(),D(n,1,1,()=>{n=null}),_t())},i(l){o||(h(n),o=!0)},o(l){D(n),o=!1},d(l){n&&n.d(l),l&&v(t)}}}function zt(i,t,o){const n=["kind","lowContrast","timeout","role","title","subtitle","caption","statusIconDescription","closeButtonDescription","hideCloseButton","fullWidth"];let l=nt(t,n),{$$slots:r={},$$scope:E}=t,{kind:k="error"}=t,{lowContrast:q=!1}=t,{timeout:g=0}=t,{role:N="alert"}=t,{title:T=""}=t,{subtitle:B=""}=t,{caption:f=""}=t,{statusIconDescription:W=k+" icon"}=t,{closeButtonDescription:S="Close notification"}=t,{hideCloseButton:V=!1}=t,{fullWidth:I=!1}=t;const m=vt();let H=!0,p;function _(s){m("close",{timeout:s===!0},{cancelable:!0})&&o(10,H=!1)}Ct(()=>(g&&(p=setTimeout(()=>_(!0),g)),()=>{clearTimeout(p)}));function z(s){Y.call(this,i,s)}function M(s){Y.call(this,i,s)}function b(s){Y.call(this,i,s)}function A(s){Y.call(this,i,s)}return i.$$set=s=>{t=w(w({},t),Bt(s)),o(12,l=nt(t,n)),"kind"in s&&o(0,k=s.kind),"lowContrast"in s&&o(1,q=s.lowContrast),"timeout"in s&&o(13,g=s.timeout),"role"in s&&o(2,N=s.role),"title"in s&&o(3,T=s.title),"subtitle"in s&&o(4,B=s.subtitle),"caption"in s&&o(5,f=s.caption),"statusIconDescription"in s&&o(6,W=s.statusIconDescription),"closeButtonDescription"in s&&o(7,S=s.closeButtonDescription),"hideCloseButton"in s&&o(8,V=s.hideCloseButton),"fullWidth"in s&&o(9,I=s.fullWidth),"$$scope"in s&&o(14,E=s.$$scope)},[k,q,N,T,B,f,W,S,V,I,H,_,l,g,E,r,z,M,b,A]}class At extends gt{constructor(t){super(),kt(this,t,zt,St,Dt,{kind:0,lowContrast:1,timeout:13,role:2,title:3,subtitle:4,caption:5,statusIconDescription:6,closeButtonDescription:7,hideCloseButton:8,fullWidth:9})}}const Jt=At;export{Jt as T};
lilac/web/_app/immutable/chunks/index.2b0dd2f8.js ADDED
@@ -0,0 +1 @@
 
 
1
+ import{a1 as f,s as y,ac as m,M as q,ab as w}from"./index.b333a928.js";const o=[];function z(e,u){return{subscribe:A(e,u).subscribe}}function A(e,u=f){let r;const n=new Set;function a(t){if(y(e,t)&&(e=t,r)){const i=!o.length;for(const s of n)s[1](),o.push(s,e);if(i){for(let s=0;s<o.length;s+=2)o[s][0](o[s+1]);o.length=0}}}function l(t){a(t(e))}function b(t,i=f){const s=[t,i];return n.add(s),n.size===1&&(r=u(a)||f),t(e),()=>{n.delete(s),n.size===0&&r&&(r(),r=null)}}return{set:a,update:l,subscribe:b}}function M(e,u,r){const n=!Array.isArray(e),a=n?[e]:e,l=u.length<2;return z(r,b=>{let t=!1;const i=[];let s=0,d=f;const g=()=>{if(s)return;d();const c=u(n?i[0]:i,b);l?b(c):d=w(c)?c:f},_=a.map((c,p)=>m(c,h=>{i[p]=h,s&=~(1<<p),t&&g()},()=>{s|=1<<p}));return t=!0,g(),function(){q(_),d(),t=!1}})}export{M as d,z as r,A as w};
lilac/web/_app/immutable/chunks/index.b333a928.js ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ function x(){}const ot=t=>t;function Mt(t,e){for(const n in e)t[n]=e[n];return t}function ct(t){return t()}function et(){return Object.create(null)}function v(t){t.forEach(ct)}function z(t){return typeof t=="function"}function te(t,e){return t!=t?e==e:t!==e||t&&typeof t=="object"||typeof t=="function"}let B;function ee(t,e){return B||(B=document.createElement("a")),B.href=e,t===B.href}function St(t){return Object.keys(t).length===0}function lt(t,...e){if(t==null)return x;const n=t.subscribe(...e);return n.unsubscribe?()=>n.unsubscribe():n}function ne(t){let e;return lt(t,n=>e=n)(),e}function ie(t,e,n){t.$$.on_destroy.push(lt(e,n))}function se(t,e,n,i){if(t){const s=at(t,e,n,i);return t[0](s)}}function at(t,e,n,i){return t[1]&&i?Mt(n.ctx.slice(),t[1](i(e))):n.ctx}function re(t,e,n,i){if(t[2]&&i){const s=t[2](i(n));if(e.dirty===void 0)return s;if(typeof s=="object"){const c=[],r=Math.max(e.dirty.length,s.length);for(let o=0;o<r;o+=1)c[o]=e.dirty[o]|s[o];return c}return e.dirty|s}return e.dirty}function oe(t,e,n,i,s,c){if(s){const r=at(e,n,i,c);t.p(r,s)}}function ce(t){if(t.ctx.length>32){const e=[],n=t.ctx.length/32;for(let i=0;i<n;i++)e[i]=-1;return e}return-1}function le(t){const e={};for(const n in t)n[0]!=="$"&&(e[n]=t[n]);return e}function ae(t,e){const n={};e=new Set(e);for(const i in t)!e.has(i)&&i[0]!=="$"&&(n[i]=t[i]);return n}function ue(t){const e={};for(const n in t)e[n]=!0;return e}function fe(t){return t??""}function de(t,e,n){return t.set(n),e}function _e(t){return t&&z(t.destroy)?t.destroy:x}const ut=typeof window<"u";let ft=ut?()=>window.performance.now():()=>Date.now(),Z=ut?t=>requestAnimationFrame(t):x;const S=new Set;function dt(t){S.forEach(e=>{e.c(t)||(S.delete(e),e.f())}),S.size!==0&&Z(dt)}function _t(t){let e;return S.size===0&&Z(dt),{promise:new Promise(n=>{S.add(e={c:t,f:n})}),abort(){S.delete(e)}}}const he=typeof window<"u"?window:typeof globalThis<"u"?globalThis:global;let U=!1;function Ct(){U=!0}function jt(){U=!1}function Dt(t,e,n,i){for(;t<e;){const s=t+(e-t>>1);n(s)<=i?t=s+1:e=s}return t}function Pt(t){if(t.hydrate_init)return;t.hydrate_init=!0;let e=t.childNodes;if(t.nodeName==="HEAD"){const l=[];for(let a=0;a<e.length;a++){const f=e[a];f.claim_order!==void 0&&l.push(f)}e=l}const n=new Int32Array(e.length+1),i=new Int32Array(e.length);n[0]=-1;let s=0;for(let l=0;l<e.length;l++){const a=e[l].claim_order,f=(s>0&&e[n[s]].claim_order<=a?s+1:Dt(1,s,h=>e[n[h]].claim_order,a))-1;i[l]=n[f]+1;const d=f+1;n[d]=l,s=Math.max(d,s)}const c=[],r=[];let o=e.length-1;for(let l=n[s]+1;l!=0;l=i[l-1]){for(c.push(e[l-1]);o>=l;o--)r.push(e[o]);o--}for(;o>=0;o--)r.push(e[o]);c.reverse(),r.sort((l,a)=>l.claim_order-a.claim_order);for(let l=0,a=0;l<r.length;l++){for(;a<c.length&&r[l].claim_order>=c[a].claim_order;)a++;const f=a<c.length?c[a]:null;t.insertBefore(r[l],f)}}function ht(t,e){t.appendChild(e)}function mt(t){if(!t)return document;const e=t.getRootNode?t.getRootNode():t.ownerDocument;return e&&e.host?e:t.ownerDocument}function Lt(t){const e=J("style");return Ht(mt(t),e),e.sheet}function Ht(t,e){return ht(t.head||t,e),e.sheet}function Ot(t,e){if(U){for(Pt(t),(t.actual_end_child===void 0||t.actual_end_child!==null&&t.actual_end_child.parentNode!==t)&&(t.actual_end_child=t.firstChild);t.actual_end_child!==null&&t.actual_end_child.claim_order===void 0;)t.actual_end_child=t.actual_end_child.nextSibling;e!==t.actual_end_child?(e.claim_order!==void 0||e.parentNode!==t)&&t.insertBefore(e,t.actual_end_child):t.actual_end_child=e.nextSibling}else(e.parentNode!==t||e.nextSibling!==null)&&t.appendChild(e)}function zt(t,e,n){t.insertBefore(e,n||null)}function Rt(t,e,n){U&&!n?Ot(t,e):(e.parentNode!==t||e.nextSibling!=n)&&t.insertBefore(e,n||null)}function j(t){t.parentNode&&t.parentNode.removeChild(t)}function me(t,e){for(let n=0;n<t.length;n+=1)t[n]&&t[n].d(e)}function J(t){return document.createElement(t)}function pt(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function tt(t){return document.createTextNode(t)}function pe(){return tt(" ")}function ye(){return tt("")}function nt(t,e,n,i){return t.addEventListener(e,n,i),()=>t.removeEventListener(e,n,i)}function ge(t){return function(e){return e.preventDefault(),t.call(this,e)}}function we(t){return function(e){return e.stopPropagation(),t.call(this,e)}}function yt(t,e,n){n==null?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}const qt=["width","height"];function be(t,e){const n=Object.getOwnPropertyDescriptors(t.__proto__);for(const i in e)e[i]==null?t.removeAttribute(i):i==="style"?t.style.cssText=e[i]:i==="__value"?t.value=t[i]=e[i]:n[i]&&n[i].set&&qt.indexOf(i)===-1?t[i]=e[i]:yt(t,i,e[i])}function $e(t,e){for(const n in e)yt(t,n,e[n])}function Bt(t){return Array.from(t.childNodes)}function gt(t){t.claim_info===void 0&&(t.claim_info={last_index:0,total_claimed:0})}function wt(t,e,n,i,s=!1){gt(t);const c=(()=>{for(let r=t.claim_info.last_index;r<t.length;r++){const o=t[r];if(e(o)){const l=n(o);return l===void 0?t.splice(r,1):t[r]=l,s||(t.claim_info.last_index=r),o}}for(let r=t.claim_info.last_index-1;r>=0;r--){const o=t[r];if(e(o)){const l=n(o);return l===void 0?t.splice(r,1):t[r]=l,s?l===void 0&&t.claim_info.last_index--:t.claim_info.last_index=r,o}}return i()})();return c.claim_order=t.claim_info.total_claimed,t.claim_info.total_claimed+=1,c}function bt(t,e,n,i){return wt(t,s=>s.nodeName===e,s=>{const c=[];for(let r=0;r<s.attributes.length;r++){const o=s.attributes[r];n[o.name]||c.push(o.name)}c.forEach(r=>s.removeAttribute(r))},()=>i(e))}function xe(t,e,n){return bt(t,e,n,J)}function ve(t,e,n){return bt(t,e,n,pt)}function Wt(t,e){return wt(t,n=>n.nodeType===3,n=>{const i=""+e;if(n.data.startsWith(i)){if(n.data.length!==i.length)return n.splitText(i.length)}else n.data=i},()=>tt(e),!0)}function Ee(t){return Wt(t," ")}function it(t,e,n){for(let i=n;i<t.length;i+=1){const s=t[i];if(s.nodeType===8&&s.textContent.trim()===e)return i}return t.length}function ke(t,e){const n=it(t,"HTML_TAG_START",0),i=it(t,"HTML_TAG_END",n);if(n===i)return new st(void 0,e);gt(t);const s=t.splice(n,i-n+1);j(s[0]),j(s[s.length-1]);const c=s.slice(1,s.length-1);for(const r of c)r.claim_order=t.claim_info.total_claimed,t.claim_info.total_claimed+=1;return new st(c,e)}function Te(t,e){e=""+e,t.data!==e&&(t.data=e)}function Ne(t,e){e=""+e,t.wholeText!==e&&(t.data=e)}function Ae(t,e){t.value=e??""}function Me(t,e,n,i){n==null?t.style.removeProperty(e):t.style.setProperty(e,n,i?"important":"")}let W;function Ft(){if(W===void 0){W=!1;try{typeof window<"u"&&window.parent&&window.parent.document}catch{W=!0}}return W}function Se(t,e){getComputedStyle(t).position==="static"&&(t.style.position="relative");const i=J("iframe");i.setAttribute("style","display: block; position: absolute; top: 0; left: 0; width: 100%; height: 100%; overflow: hidden; border: 0; opacity: 0; pointer-events: none; z-index: -1;"),i.setAttribute("aria-hidden","true"),i.tabIndex=-1;const s=Ft();let c;return s?(i.src="data:text/html,<script>onresize=function(){parent.postMessage(0,'*')}<\/script>",c=nt(window,"message",r=>{r.source===i.contentWindow&&e()})):(i.src="about:blank",i.onload=()=>{c=nt(i.contentWindow,"resize",e),e()}),ht(t,i),()=>{(s||c&&i.contentWindow)&&c(),j(i)}}function Ce(t,e,n){t.classList[n?"add":"remove"](e)}function $t(t,e,{bubbles:n=!1,cancelable:i=!1}={}){const s=document.createEvent("CustomEvent");return s.initCustomEvent(t,n,i,e),s}function je(t,e){const n=[];let i=0;for(const s of e.childNodes)if(s.nodeType===8){const c=s.textContent.trim();c===`HEAD_${t}_END`?(i-=1,n.push(s)):c===`HEAD_${t}_START`&&(i+=1,n.push(s))}else i>0&&n.push(s);return n}class Gt{constructor(e=!1){this.is_svg=!1,this.is_svg=e,this.e=this.n=null}c(e){this.h(e)}m(e,n,i=null){this.e||(this.is_svg?this.e=pt(n.nodeName):this.e=J(n.nodeType===11?"TEMPLATE":n.nodeName),this.t=n.tagName!=="TEMPLATE"?n:n.content,this.c(e)),this.i(i)}h(e){this.e.innerHTML=e,this.n=Array.from(this.e.nodeName==="TEMPLATE"?this.e.content.childNodes:this.e.childNodes)}i(e){for(let n=0;n<this.n.length;n+=1)zt(this.t,this.n[n],e)}p(e){this.d(),this.h(e),this.i(this.a)}d(){this.n.forEach(j)}}class st extends Gt{constructor(e,n=!1){super(n),this.e=this.n=null,this.l=e}c(e){this.l?this.n=this.l:super.c(e)}i(e){for(let n=0;n<this.n.length;n+=1)Rt(this.t,this.n[n],e)}}function De(t,e){return new t(e)}const G=new Map;let I=0;function It(t){let e=5381,n=t.length;for(;n--;)e=(e<<5)-e^t.charCodeAt(n);return e>>>0}function Ut(t,e){const n={stylesheet:Lt(e),rules:{}};return G.set(t,n),n}function V(t,e,n,i,s,c,r,o=0){const l=16.666/i;let a=`{
2
+ `;for(let p=0;p<=1;p+=l){const g=e+(n-e)*c(p);a+=p*100+`%{${r(g,1-g)}}
3
+ `}const f=a+`100% {${r(n,1-n)}}
4
+ }`,d=`__svelte_${It(f)}_${o}`,h=mt(t),{stylesheet:u,rules:_}=G.get(h)||Ut(h,t);_[d]||(_[d]=!0,u.insertRule(`@keyframes ${d} ${f}`,u.cssRules.length));const y=t.style.animation||"";return t.style.animation=`${y?`${y}, `:""}${d} ${i}ms linear ${s}ms 1 both`,I+=1,d}function xt(t,e){const n=(t.style.animation||"").split(", "),i=n.filter(e?c=>c.indexOf(e)<0:c=>c.indexOf("__svelte")===-1),s=n.length-i.length;s&&(t.style.animation=i.join(", "),I-=s,I||Jt())}function Jt(){Z(()=>{I||(G.forEach(t=>{const{ownerNode:e}=t.stylesheet;e&&j(e)}),G.clear())})}let H;function P(t){H=t}function E(){if(!H)throw new Error("Function called outside component initialization");return H}function Pe(t){E().$$.before_update.push(t)}function Le(t){E().$$.on_mount.push(t)}function He(t){E().$$.after_update.push(t)}function Oe(t){E().$$.on_destroy.push(t)}function ze(){const t=E();return(e,n,{cancelable:i=!1}={})=>{const s=t.$$.callbacks[e];if(s){const c=$t(e,n,{cancelable:i});return s.slice().forEach(r=>{r.call(t,c)}),!c.defaultPrevented}return!0}}function Re(t,e){return E().$$.context.set(t,e),e}function qe(t){return E().$$.context.get(t)}function Be(t){return E().$$.context.has(t)}function We(t,e){const n=t.$$.callbacks[e.type];n&&n.slice().forEach(i=>i.call(this,e))}const M=[],rt=[];let C=[];const X=[],vt=Promise.resolve();let Y=!1;function Et(){Y||(Y=!0,vt.then(kt))}function Fe(){return Et(),vt}function O(t){C.push(t)}function Ge(t){X.push(t)}const Q=new Set;let A=0;function kt(){if(A!==0)return;const t=H;do{try{for(;A<M.length;){const e=M[A];A++,P(e),Kt(e.$$)}}catch(e){throw M.length=0,A=0,e}for(P(null),M.length=0,A=0;rt.length;)rt.pop()();for(let e=0;e<C.length;e+=1){const n=C[e];Q.has(n)||(Q.add(n),n())}C.length=0}while(M.length);for(;X.length;)X.pop()();Y=!1,Q.clear(),P(t)}function Kt(t){if(t.fragment!==null){t.update(),v(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(O)}}function Qt(t){const e=[],n=[];C.forEach(i=>t.indexOf(i)===-1?e.push(i):n.push(i)),n.forEach(i=>i()),C=e}let D;function Tt(){return D||(D=Promise.resolve(),D.then(()=>{D=null})),D}function L(t,e,n){t.dispatchEvent($t(`${e?"intro":"outro"}${n}`))}const F=new Set;let $;function Ie(){$={r:0,c:[],p:$}}function Ue(){$.r||v($.c),$=$.p}function Nt(t,e){t&&t.i&&(F.delete(t),t.i(e))}function Vt(t,e,n,i){if(t&&t.o){if(F.has(t))return;F.add(t),$.c.push(()=>{F.delete(t),i&&(n&&t.d(1),i())}),t.o(e)}else i&&i()}const At={duration:0};function Je(t,e,n){const i={direction:"out"};let s=e(t,n,i),c=!0,r;const o=$;o.r+=1;function l(){const{delay:a=0,duration:f=300,easing:d=ot,tick:h=x,css:u}=s||At;u&&(r=V(t,1,0,f,a,d,u));const _=ft()+a,y=_+f;O(()=>L(t,!1,"start")),_t(p=>{if(c){if(p>=y)return h(0,1),L(t,!1,"end"),--o.r||v(o.c),!1;if(p>=_){const g=d((p-_)/f);h(1-g,g)}}return c})}return z(s)?Tt().then(()=>{s=s(i),l()}):l(),{end(a){a&&s.tick&&s.tick(1,0),c&&(r&&xt(t,r),c=!1)}}}function Ke(t,e,n,i){const s={direction:"both"};let c=e(t,n,s),r=i?0:1,o=null,l=null,a=null;function f(){a&&xt(t,a)}function d(u,_){const y=u.b-r;return _*=Math.abs(y),{a:r,b:u.b,d:y,duration:_,start:u.start,end:u.start+_,group:u.group}}function h(u){const{delay:_=0,duration:y=300,easing:p=ot,tick:g=x,css:k}=c||At,N={start:ft()+_,b:u};u||(N.group=$,$.r+=1),o||l?l=N:(k&&(f(),a=V(t,r,u,y,_,p,k)),u&&g(0,1),o=d(N,y),O(()=>L(t,u,"start")),_t(T=>{if(l&&T>l.start&&(o=d(l,y),l=null,L(t,o.b,"start"),k&&(f(),a=V(t,r,o.b,o.duration,0,p,c.css))),o){if(T>=o.end)g(r=o.b,1-r),L(t,o.b,"end"),l||(o.b?f():--o.group.r||v(o.group.c)),o=null;else if(T>=o.start){const R=T-o.start;r=o.a+o.d*p(R/o.duration),g(r,1-r)}}return!!(o||l)}))}return{run(u){z(c)?Tt().then(()=>{c=c(s),h(u)}):h(u)},end(){f(),o=l=null}}}function Qe(t,e){t.d(1),e.delete(t.key)}function Ve(t,e){Vt(t,1,1,()=>{e.delete(t.key)})}function Xe(t,e,n,i,s,c,r,o,l,a,f,d){let h=t.length,u=c.length,_=h;const y={};for(;_--;)y[t[_].key]=_;const p=[],g=new Map,k=new Map,N=[];for(_=u;_--;){const m=d(s,c,_),w=n(m);let b=r.get(w);b?i&&N.push(()=>b.p(m,e)):(b=a(w,m),b.c()),g.set(w,p[_]=b),w in y&&k.set(w,Math.abs(_-y[w]))}const T=new Set,R=new Set;function K(m){Nt(m,1),m.m(o,f),r.set(m.key,m),f=m.first,u--}for(;h&&u;){const m=p[u-1],w=t[h-1],b=m.key,q=w.key;m===w?(f=m.first,h--,u--):g.has(q)?!r.has(b)||T.has(b)?K(m):R.has(q)?h--:k.get(b)>k.get(q)?(R.add(b),K(m)):(T.add(q),h--):(l(w,r),h--)}for(;h--;){const m=t[h];g.has(m.key)||l(m,r)}for(;u;)K(p[u-1]);return v(N),p}function Ye(t,e){const n={},i={},s={$$scope:1};let c=t.length;for(;c--;){const r=t[c],o=e[c];if(o){for(const l in r)l in o||(i[l]=1);for(const l in o)s[l]||(n[l]=o[l],s[l]=1);t[c]=o}else for(const l in r)s[l]=1}for(const r in i)r in n||(n[r]=void 0);return n}function Ze(t){return typeof t=="object"&&t!==null?t:{}}function tn(t,e,n){const i=t.$$.props[e];i!==void 0&&(t.$$.bound[i]=n,n(t.$$.ctx[i]))}function en(t){t&&t.c()}function nn(t,e){t&&t.l(e)}function Xt(t,e,n,i){const{fragment:s,after_update:c}=t.$$;s&&s.m(e,n),i||O(()=>{const r=t.$$.on_mount.map(ct).filter(z);t.$$.on_destroy?t.$$.on_destroy.push(...r):v(r),t.$$.on_mount=[]}),c.forEach(O)}function Yt(t,e){const n=t.$$;n.fragment!==null&&(Qt(n.after_update),v(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function Zt(t,e){t.$$.dirty[0]===-1&&(M.push(t),Et(),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}function sn(t,e,n,i,s,c,r,o=[-1]){const l=H;P(t);const a=t.$$={fragment:null,ctx:[],props:c,update:x,not_equal:s,bound:et(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(e.context||(l?l.$$.context:[])),callbacks:et(),dirty:o,skip_bound:!1,root:e.target||l.$$.root};r&&r(a.root);let f=!1;if(a.ctx=n?n(t,e.props||{},(d,h,...u)=>{const _=u.length?u[0]:h;return a.ctx&&s(a.ctx[d],a.ctx[d]=_)&&(!a.skip_bound&&a.bound[d]&&a.bound[d](_),f&&Zt(t,d)),h}):[],a.update(),f=!0,v(a.before_update),a.fragment=i?i(a.ctx):!1,e.target){if(e.hydrate){Ct();const d=Bt(e.target);a.fragment&&a.fragment.l(d),d.forEach(j)}else a.fragment&&a.fragment.c();e.intro&&Nt(t.$$.fragment),Xt(t,e.target,e.anchor,e.customElement),jt(),kt()}P(l)}class rn{$destroy(){Yt(this,1),this.$destroy=x}$on(e,n){if(!z(n))return x;const i=this.$$.callbacks[e]||(this.$$.callbacks[e]=[]);return i.push(n),()=>{const s=i.indexOf(n);s!==-1&&i.splice(s,1)}}$set(e){this.$$set&&!St(e)&&(this.$$.skip_bound=!0,this.$$set(e),this.$$.skip_bound=!1)}}export{$e as $,Xt as A,Yt as B,ze as C,se as D,Mt as E,be as F,Ce as G,nt as H,oe as I,ce as J,re as K,Ye as L,v as M,ae as N,ie as O,Re as P,le as Q,We as R,rn as S,tn as T,Ge as U,Ze as V,Xe as W,Ve as X,Oe as Y,pt as Z,ve as _,pe as a,Ot as a0,x as a1,O as a2,Ke as a3,me as a4,ee as a5,fe as a6,_e as a7,de as a8,je as a9,he as aa,z as ab,lt as ac,ne as ad,we as ae,Se as af,Ne as ag,Je as ah,ue as ai,qe as aj,Pe as ak,ge as al,Ae as am,Be as an,Qe as ao,ot as ap,st as aq,ke as ar,Rt as b,Ee as c,Vt as d,ye as e,Ue as f,Nt as g,j as h,sn as i,He as j,J as k,xe as l,Bt as m,yt as n,Le as o,Me as p,tt as q,Wt as r,te as s,Fe as t,Te as u,Ie as v,rt as w,De as x,en as y,nn as z};
lilac/web/_app/immutable/chunks/navigation.079b07c9.js ADDED
@@ -0,0 +1 @@
 
 
1
+ import{j as o}from"./singletons.b4dec89c.js";const e=o("goto");export{e as g};
lilac/web/_app/immutable/chunks/navigation.10308c75.js ADDED
@@ -0,0 +1 @@
 
 
1
+ import{j as o}from"./singletons.25a196bd.js";const e=o("goto");export{e as g};
lilac/web/_app/immutable/chunks/navigation.3e4f9d10.js ADDED
@@ -0,0 +1 @@
 
 
1
+ import{j as o}from"./singletons.6c1e5288.js";const e=o("goto");export{e as g};
lilac/web/_app/immutable/chunks/navigation.c82332c0.js ADDED
@@ -0,0 +1 @@
 
 
1
+ import{j as o}from"./singletons.a8aafae6.js";const e=o("goto");export{e as g};
lilac/web/_app/immutable/chunks/notificationsStore.87d33d60.js ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ import{ao as ue,S as B,i as N,s as P,E as b,Z as c,_ as g,m,h,n as V,$ as y,b as H,a0 as w,L as R,a1 as E,N as C,Q as A,q as x,r as j,u as S,P as fe,am as he,ai as de}from"./index.b7741aa8.js";import{a4 as L,am as ce,z as F,y as le,aU as ge,I,aS as q,ay as se,a5 as T,L as ae}from"./Commands.539ca0ee.js";import{f as me,c as pe}from"./utils.f3891c80.js";import{w as be}from"./index.d3776286.js";function ve(l){const e=l-1;return e*e*e+1}function Ue(l,{delay:e=0,duration:n=400,easing:t=ue}={}){const i=+getComputedStyle(l).opacity;return{delay:e,duration:n,easing:t,css:r=>`opacity: ${r*i}`}}function Xe(l,{delay:e=0,duration:n=400,easing:t=ve,axis:i="y"}={}){const r=getComputedStyle(l),a=+r.opacity,s=i==="y"?"height":"width",o=parseFloat(r[s]),u=i==="y"?["top","bottom"]:["left","right"],f=u.map(O=>`${O[0].toUpperCase()}${O.slice(1)}`),_=parseFloat(r[`padding${f[0]}`]),p=parseFloat(r[`padding${f[1]}`]),z=parseFloat(r[`margin${f[0]}`]),v=parseFloat(r[`margin${f[1]}`]),d=parseFloat(r[`border${f[0]}Width`]),Y=parseFloat(r[`border${f[1]}Width`]);return{delay:e,duration:n,easing:t,css:O=>`overflow: hidden;opacity: ${Math.min(O*20,1)*a};${s}: ${O*o}px;padding-${u[0]}: ${O*_}px;padding-${u[1]}: ${O*p}px;margin-${u[0]}: ${O*z}px;margin-${u[1]}: ${O*v}px;border-${u[0]}-width: ${O*d}px;border-${u[1]}-width: ${O*Y}px;`}}function X(l){let e,n;return{c(){e=c("title"),n=x(l[1])},l(t){e=g(t,"title",{});var i=m(e);n=j(i,l[1]),i.forEach(h)},m(t,i){H(t,e,i),w(e,n)},p(t,i){i&2&&S(n,t[1])},d(t){t&&h(e)}}}function _e(l){let e,n,t=l[1]&&X(l),i=[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},{width:l[0]},{height:l[0]},l[2],l[3]],r={};for(let a=0;a<i.length;a+=1)r=b(r,i[a]);return{c(){e=c("svg"),t&&t.c(),n=c("path"),this.h()},l(a){e=g(a,"svg",{xmlns:!0,viewBox:!0,fill:!0,preserveAspectRatio:!0,width:!0,height:!0});var s=m(e);t&&t.l(s),n=g(s,"path",{d:!0}),m(n).forEach(h),s.forEach(h),this.h()},h(){V(n,"d","M21.3 4.9l-4.5-2.7C16.5 2.1 16.3 2 16 2s-.5.1-.7.2l-4.5 2.7C10.3 5.2 10 5.7 10 6.2v5.6c0 .5.3 1 .7 1.3l4.5 2.7c.2.1.5.2.7.2s.5-.1.7-.2l4.5-2.7c.4-.3.7-.7.7-1.3V6.2C22 5.7 21.7 5.2 21.3 4.9zM20 11.5l-4 2.4-4-2.4v-5l4-2.4 4 2.4V11.5zM29.3 18.9l-4.5-2.7C24.5 16.1 24.3 16 24 16s-.5.1-.7.2l-4.5 2.7c-.4.3-.7.7-.7 1.3v5.6c0 .5.3 1 .7 1.3l4.5 2.7c.2.1.5.2.7.2s.5-.1.7-.2l4.5-2.7c.4-.3.7-.7.7-1.3v-5.6C30 19.7 29.7 19.2 29.3 18.9zM28 25.5l-4 2.4-4-2.4v-5l4-2.4 4 2.4V25.5zM13.3 18.9l-4.5-2.7C8.5 16.1 8.3 16 8 16s-.5.1-.7.2l-4.5 2.7C2.3 19.2 2 19.7 2 20.2v5.6c0 .5.3 1 .7 1.3l4.5 2.7C7.5 29.9 7.7 30 8 30s.5-.1.7-.2l4.5-2.7c.4-.3.7-.7.7-1.3v-5.6C14 19.7 13.7 19.2 13.3 18.9zM12 25.5l-4 2.4-4-2.4v-5l4-2.4 4 2.4V25.5z"),y(e,r)},m(a,s){H(a,e,s),t&&t.m(e,null),w(e,n)},p(a,[s]){a[1]?t?t.p(a,s):(t=X(a),t.c(),t.m(e,n)):t&&(t.d(1),t=null),y(e,r=R(i,[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},s&1&&{width:a[0]},s&1&&{height:a[0]},s&4&&a[2],s&8&&a[3]]))},i:E,o:E,d(a){a&&h(e),t&&t.d()}}}function we(l,e,n){let t,i;const r=["size","title"];let a=C(e,r),{size:s=16}=e,{title:o=void 0}=e;return l.$$set=u=>{n(5,e=b(b({},e),A(u))),n(3,a=C(e,r)),"size"in u&&n(0,s=u.size),"title"in u&&n(1,o=u.title)},l.$$.update=()=>{n(4,t=e["aria-label"]||e["aria-labelledby"]||o),n(2,i={"aria-hidden":t?void 0:!0,role:t?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=A(e),[s,o,i,a,t]}class ze extends B{constructor(e){super(),N(this,e,we,_e,P,{size:0,title:1})}}function G(l){let e,n;return{c(){e=c("title"),n=x(l[1])},l(t){e=g(t,"title",{});var i=m(e);n=j(i,l[1]),i.forEach(h)},m(t,i){H(t,e,i),w(e,n)},p(t,i){i&2&&S(n,t[1])},d(t){t&&h(e)}}}function Me(l){let e,n,t,i=l[1]&&G(l),r=[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},{width:l[0]},{height:l[0]},l[2],l[3]],a={};for(let s=0;s<r.length;s+=1)a=b(a,r[s]);return{c(){e=c("svg"),i&&i.c(),n=c("path"),t=c("circle"),this.h()},l(s){e=g(s,"svg",{xmlns:!0,viewBox:!0,fill:!0,preserveAspectRatio:!0,width:!0,height:!0});var o=m(e);i&&i.l(o),n=g(o,"path",{d:!0}),m(n).forEach(h),t=g(o,"circle",{cx:!0,cy:!0,r:!0}),m(t).forEach(h),o.forEach(h),this.h()},h(){V(n,"d","M23,23a7,7,0,1,1,7-7A7.0078,7.0078,0,0,1,23,23Zm0-12a5,5,0,1,0,5,5A5.0055,5.0055,0,0,0,23,11Z"),V(t,"cx","9"),V(t,"cy","16"),V(t,"r","7"),y(e,a)},m(s,o){H(s,e,o),i&&i.m(e,null),w(e,n),w(e,t)},p(s,[o]){s[1]?i?i.p(s,o):(i=G(s),i.c(),i.m(e,n)):i&&(i.d(1),i=null),y(e,a=R(r,[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},o&1&&{width:s[0]},o&1&&{height:s[0]},o&4&&s[2],o&8&&s[3]]))},i:E,o:E,d(s){s&&h(e),i&&i.d()}}}function Ve(l,e,n){let t,i;const r=["size","title"];let a=C(e,r),{size:s=16}=e,{title:o=void 0}=e;return l.$$set=u=>{n(5,e=b(b({},e),A(u))),n(3,a=C(e,r)),"size"in u&&n(0,s=u.size),"title"in u&&n(1,o=u.title)},l.$$.update=()=>{n(4,t=e["aria-label"]||e["aria-labelledby"]||o),n(2,i={"aria-hidden":t?void 0:!0,role:t?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=A(e),[s,o,i,a,t]}class ye extends B{constructor(e){super(),N(this,e,Ve,Me,P,{size:0,title:1})}}function Q(l){let e,n;return{c(){e=c("title"),n=x(l[1])},l(t){e=g(t,"title",{});var i=m(e);n=j(i,l[1]),i.forEach(h)},m(t,i){H(t,e,i),w(e,n)},p(t,i){i&2&&S(n,t[1])},d(t){t&&h(e)}}}function Ee(l){let e,n,t,i,r=l[1]&&Q(l),a=[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},{width:l[0]},{height:l[0]},l[2],l[3]],s={};for(let o=0;o<a.length;o+=1)s=b(s,a[o]);return{c(){e=c("svg"),r&&r.c(),n=c("path"),t=c("path"),i=c("path"),this.h()},l(o){e=g(o,"svg",{xmlns:!0,viewBox:!0,fill:!0,preserveAspectRatio:!0,width:!0,height:!0});var u=m(e);r&&r.l(u),n=g(u,"path",{d:!0}),m(n).forEach(h),t=g(u,"path",{d:!0}),m(t).forEach(h),i=g(u,"path",{d:!0}),m(i).forEach(h),u.forEach(h),this.h()},h(){V(n,"d","M21 15H23V17H21z"),V(t,"d","M24 23H20a2.0023 2.0023 0 01-2-2V11a2.002 2.002 0 012-2h4a2.0023 2.0023 0 012 2V21A2.0027 2.0027 0 0124 23zM20 11h0V21h4V11zM11 15H13V17H11z"),V(i,"d","M14 23H10a2.0023 2.0023 0 01-2-2V11a2.002 2.002 0 012-2h4a2.0023 2.0023 0 012 2V21A2.0027 2.0027 0 0114 23zM10 11h0V21h4V11zM4 21H6V23H4z"),y(e,s)},m(o,u){H(o,e,u),r&&r.m(e,null),w(e,n),w(e,t),w(e,i)},p(o,[u]){o[1]?r?r.p(o,u):(r=Q(o),r.c(),r.m(e,n)):r&&(r.d(1),r=null),y(e,s=R(a,[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},u&1&&{width:o[0]},u&1&&{height:o[0]},u&4&&o[2],u&8&&o[3]]))},i:E,o:E,d(o){o&&h(e),r&&r.d()}}}function Ce(l,e,n){let t,i;const r=["size","title"];let a=C(e,r),{size:s=16}=e,{title:o=void 0}=e;return l.$$set=u=>{n(5,e=b(b({},e),A(u))),n(3,a=C(e,r)),"size"in u&&n(0,s=u.size),"title"in u&&n(1,o=u.title)},l.$$.update=()=>{n(4,t=e["aria-label"]||e["aria-labelledby"]||o),n(2,i={"aria-hidden":t?void 0:!0,role:t?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=A(e),[s,o,i,a,t]}class D extends B{constructor(e){super(),N(this,e,Ce,Ee,P,{size:0,title:1})}}function J(l){let e,n;return{c(){e=c("title"),n=x(l[1])},l(t){e=g(t,"title",{});var i=m(e);n=j(i,l[1]),i.forEach(h)},m(t,i){H(t,e,i),w(e,n)},p(t,i){i&2&&S(n,t[1])},d(t){t&&h(e)}}}function Ae(l){let e,n,t,i=l[1]&&J(l),r=[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},{width:l[0]},{height:l[0]},l[2],l[3]],a={};for(let s=0;s<r.length;s+=1)a=b(a,r[s]);return{c(){e=c("svg"),i&&i.c(),n=c("path"),t=c("path"),this.h()},l(s){e=g(s,"svg",{xmlns:!0,viewBox:!0,fill:!0,preserveAspectRatio:!0,width:!0,height:!0});var o=m(e);i&&i.l(o),n=g(o,"path",{d:!0}),m(n).forEach(h),t=g(o,"path",{d:!0}),m(t).forEach(h),o.forEach(h),this.h()},h(){V(n,"d","M28 9H22v2h6v4H24v2h4v4H22v2h6a2.0027 2.0027 0 002-2V11A2.0023 2.0023 0 0028 9zM20 23H12V17a2.002 2.002 0 012-2h4V11H12V9h6a2.0023 2.0023 0 012 2v4a2.0023 2.0023 0 01-2 2H14v4h6zM2.5 22.5L2.5 21.5 5.5 21.5 5.5 10.5 2.5 10.5 2.5 9.5 6.5 9.5 6.5 21.5 9.5 21.5 9.5 22.5 2.5 22.5z"),V(t,"d","M6,10V22H6V10M7,9H2v2H5V21H2v2h8V21H7V9Z"),y(e,a)},m(s,o){H(s,e,o),i&&i.m(e,null),w(e,n),w(e,t)},p(s,[o]){s[1]?i?i.p(s,o):(i=J(s),i.c(),i.m(e,n)):i&&(i.d(1),i=null),y(e,a=R(r,[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},o&1&&{width:s[0]},o&1&&{height:s[0]},o&4&&s[2],o&8&&s[3]]))},i:E,o:E,d(s){s&&h(e),i&&i.d()}}}function He(l,e,n){let t,i;const r=["size","title"];let a=C(e,r),{size:s=16}=e,{title:o=void 0}=e;return l.$$set=u=>{n(5,e=b(b({},e),A(u))),n(3,a=C(e,r)),"size"in u&&n(0,s=u.size),"title"in u&&n(1,o=u.title)},l.$$.update=()=>{n(4,t=e["aria-label"]||e["aria-labelledby"]||o),n(2,i={"aria-hidden":t?void 0:!0,role:t?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=A(e),[s,o,i,a,t]}class k extends B{constructor(e){super(),N(this,e,He,Ae,P,{size:0,title:1})}}function $(l){let e,n;return{c(){e=c("title"),n=x(l[1])},l(t){e=g(t,"title",{});var i=m(e);n=j(i,l[1]),i.forEach(h)},m(t,i){H(t,e,i),w(e,n)},p(t,i){i&2&&S(n,t[1])},d(t){t&&h(e)}}}function Oe(l){let e,n,t,i=l[1]&&$(l),r=[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},{width:l[0]},{height:l[0]},l[2],l[3]],a={};for(let s=0;s<r.length;s+=1)a=b(a,r[s]);return{c(){e=c("svg"),i&&i.c(),n=c("path"),t=c("path"),this.h()},l(s){e=g(s,"svg",{xmlns:!0,viewBox:!0,fill:!0,preserveAspectRatio:!0,width:!0,height:!0});var o=m(e);i&&i.l(o),n=g(o,"path",{d:!0}),m(n).forEach(h),t=g(o,"path",{d:!0}),m(t).forEach(h),o.forEach(h),this.h()},h(){V(n,"d","M28,30H4a2.0021,2.0021,0,0,1-2-2V4A2.0021,2.0021,0,0,1,4,2H28a2.0021,2.0021,0,0,1,2,2V28A2.0021,2.0021,0,0,1,28,30ZM4,4V28H28V4Z"),V(t,"d","M13 7H15V14H13zM8 7H10V14H8zM22 14H20a2.0021 2.0021 0 01-2-2V9a2.0021 2.0021 0 012-2h2a2.0021 2.0021 0 012 2v3A2.0021 2.0021 0 0122 14zM20 9v3h2V9zM22 18H24V25H22zM8 18H10V25H8zM17 25H15a2.0021 2.0021 0 01-2-2V20a2.0021 2.0021 0 012-2h2a2.0021 2.0021 0 012 2v3A2.0021 2.0021 0 0117 25zm-2-5v3h2V20z"),y(e,a)},m(s,o){H(s,e,o),i&&i.m(e,null),w(e,n),w(e,t)},p(s,[o]){s[1]?i?i.p(s,o):(i=$(s),i.c(),i.m(e,n)):i&&(i.d(1),i=null),y(e,a=R(r,[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},o&1&&{width:s[0]},o&1&&{height:s[0]},o&4&&s[2],o&8&&s[3]]))},i:E,o:E,d(s){s&&h(e),i&&i.d()}}}function ke(l,e,n){let t,i;const r=["size","title"];let a=C(e,r),{size:s=16}=e,{title:o=void 0}=e;return l.$$set=u=>{n(5,e=b(b({},e),A(u))),n(3,a=C(e,r)),"size"in u&&n(0,s=u.size),"title"in u&&n(1,o=u.title)},l.$$.update=()=>{n(4,t=e["aria-label"]||e["aria-labelledby"]||o),n(2,i={"aria-hidden":t?void 0:!0,role:t?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=A(e),[s,o,i,a,t]}class Be extends B{constructor(e){super(),N(this,e,ke,Oe,P,{size:0,title:1})}}function ee(l){let e,n;return{c(){e=c("title"),n=x(l[1])},l(t){e=g(t,"title",{});var i=m(e);n=j(i,l[1]),i.forEach(h)},m(t,i){H(t,e,i),w(e,n)},p(t,i){i&2&&S(n,t[1])},d(t){t&&h(e)}}}function Ne(l){let e,n,t=l[1]&&ee(l),i=[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},{width:l[0]},{height:l[0]},l[2],l[3]],r={};for(let a=0;a<i.length;a+=1)r=b(r,i[a]);return{c(){e=c("svg"),t&&t.c(),n=c("path"),this.h()},l(a){e=g(a,"svg",{xmlns:!0,viewBox:!0,fill:!0,preserveAspectRatio:!0,width:!0,height:!0});var s=m(e);t&&t.l(s),n=g(s,"path",{d:!0}),m(n).forEach(h),s.forEach(h),this.h()},h(){V(n,"d","M4 15H14V17H4zM18 15H28V17H18z"),y(e,r)},m(a,s){H(a,e,s),t&&t.m(e,null),w(e,n)},p(a,[s]){a[1]?t?t.p(a,s):(t=ee(a),t.c(),t.m(e,n)):t&&(t.d(1),t=null),y(e,r=R(i,[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},s&1&&{width:a[0]},s&1&&{height:a[0]},s&4&&a[2],s&8&&a[3]]))},i:E,o:E,d(a){a&&h(e),t&&t.d()}}}function Pe(l,e,n){let t,i;const r=["size","title"];let a=C(e,r),{size:s=16}=e,{title:o=void 0}=e;return l.$$set=u=>{n(5,e=b(b({},e),A(u))),n(3,a=C(e,r)),"size"in u&&n(0,s=u.size),"title"in u&&n(1,o=u.title)},l.$$.update=()=>{n(4,t=e["aria-label"]||e["aria-labelledby"]||o),n(2,i={"aria-hidden":t?void 0:!0,role:t?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=A(e),[s,o,i,a,t]}class Re extends B{constructor(e){super(),N(this,e,Pe,Ne,P,{size:0,title:1})}}function te(l){let e,n;return{c(){e=c("title"),n=x(l[1])},l(t){e=g(t,"title",{});var i=m(e);n=j(i,l[1]),i.forEach(h)},m(t,i){H(t,e,i),w(e,n)},p(t,i){i&2&&S(n,t[1])},d(t){t&&h(e)}}}function xe(l){let e,n,t=l[1]&&te(l),i=[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},{width:l[0]},{height:l[0]},l[2],l[3]],r={};for(let a=0;a<i.length;a+=1)r=b(r,i[a]);return{c(){e=c("svg"),t&&t.c(),n=c("path"),this.h()},l(a){e=g(a,"svg",{xmlns:!0,viewBox:!0,fill:!0,preserveAspectRatio:!0,width:!0,height:!0});var s=m(e);t&&t.l(s),n=g(s,"path",{d:!0}),m(n).forEach(h),s.forEach(h),this.h()},h(){V(n,"d","M29 22H24a2.0027 2.0027 0 01-2-2V14a2.0023 2.0023 0 012-2h5v2H24v6h5zM18 12H14V8H12V22h6a2.0027 2.0027 0 002-2V14A2.0023 2.0023 0 0018 12zm-4 8V14h4v6zM8 12H3v2H8v2H4a2 2 0 00-2 2v2a2 2 0 002 2h6V14A2.0023 2.0023 0 008 12zm0 8H4V18H8z"),y(e,r)},m(a,s){H(a,e,s),t&&t.m(e,null),w(e,n)},p(a,[s]){a[1]?t?t.p(a,s):(t=te(a),t.c(),t.m(e,n)):t&&(t.d(1),t=null),y(e,r=R(i,[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},s&1&&{width:a[0]},s&1&&{height:a[0]},s&4&&a[2],s&8&&a[3]]))},i:E,o:E,d(a){a&&h(e),t&&t.d()}}}function je(l,e,n){let t,i;const r=["size","title"];let a=C(e,r),{size:s=16}=e,{title:o=void 0}=e;return l.$$set=u=>{n(5,e=b(b({},e),A(u))),n(3,a=C(e,r)),"size"in u&&n(0,s=u.size),"title"in u&&n(1,o=u.title)},l.$$.update=()=>{n(4,t=e["aria-label"]||e["aria-labelledby"]||o),n(2,i={"aria-hidden":t?void 0:!0,role:t?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=A(e),[s,o,i,a,t]}class ie extends B{constructor(e){super(),N(this,e,je,xe,P,{size:0,title:1})}}function ne(l){let e,n;return{c(){e=c("title"),n=x(l[1])},l(t){e=g(t,"title",{});var i=m(e);n=j(i,l[1]),i.forEach(h)},m(t,i){H(t,e,i),w(e,n)},p(t,i){i&2&&S(n,t[1])},d(t){t&&h(e)}}}function Se(l){let e,n,t,i=l[1]&&ne(l),r=[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},{width:l[0]},{height:l[0]},l[2],l[3]],a={};for(let s=0;s<r.length;s+=1)a=b(a,r[s]);return{c(){e=c("svg"),i&&i.c(),n=c("path"),t=c("path"),this.h()},l(s){e=g(s,"svg",{xmlns:!0,viewBox:!0,fill:!0,preserveAspectRatio:!0,width:!0,height:!0});var o=m(e);i&&i.l(o),n=g(o,"path",{d:!0}),m(n).forEach(h),t=g(o,"path",{d:!0}),m(t).forEach(h),o.forEach(h),this.h()},h(){V(n,"d","M16,30A14,14,0,1,1,30,16,14,14,0,0,1,16,30ZM16,4A12,12,0,1,0,28,16,12,12,0,0,0,16,4Z"),V(t,"d","M20.59 22L15 16.41 15 7 17 7 17 15.58 22 20.59 20.59 22z"),y(e,a)},m(s,o){H(s,e,o),i&&i.m(e,null),w(e,n),w(e,t)},p(s,[o]){s[1]?i?i.p(s,o):(i=ne(s),i.c(),i.m(e,n)):i&&(i.d(1),i=null),y(e,a=R(r,[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},o&1&&{width:s[0]},o&1&&{height:s[0]},o&4&&s[2],o&8&&s[3]]))},i:E,o:E,d(s){s&&h(e),i&&i.d()}}}function Te(l,e,n){let t,i;const r=["size","title"];let a=C(e,r),{size:s=16}=e,{title:o=void 0}=e;return l.$$set=u=>{n(5,e=b(b({},e),A(u))),n(3,a=C(e,r)),"size"in u&&n(0,s=u.size),"title"in u&&n(1,o=u.title)},l.$$.update=()=>{n(4,t=e["aria-label"]||e["aria-labelledby"]||o),n(2,i={"aria-hidden":t?void 0:!0,role:t?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=A(e),[s,o,i,a,t]}class Z extends B{constructor(e){super(),N(this,e,Te,Se,P,{size:0,title:1})}}const Ge="itemScrollContainer",Qe={string:ie,string_span:ie,uint8:k,uint16:k,uint32:k,uint64:k,int8:k,int16:k,int32:k,int64:k,boolean:ye,float16:D,float32:D,float64:D,time:Z,date:Z,timestamp:Z,interval:Z,embedding:ze,binary:Be,null:Re};function Je(l,e,n,t){if(e==null)return[];let i=[];return t==null?i=L(n||e):i=ce(t,n||e),i.filter(r=>re(l,r.path))}function Ye(l,e){return e.some(n=>I(n.path,l.path))}function $e(l,e){const n=ae.field(l);return n==null?!1:Ye(n,e)}function Le(l,e){const n={};let t;if(l.fields!=null){for(const[r,a]of Object.entries(l.fields))if(e.some(s=>I(s.path,a.path))){const s=Le(a,e);s!=null&&(n[r]=s)}}else l.repeated_field!=null&&(e.some(r=>{var a;return I(r.path,(a=l.repeated_field)==null?void 0:a.path)})?t=l.repeated_field:t=void 0);return t==null&&Object.keys(n).length===0?{...l,fields:void 0,repeated_field:void 0}:l.path.length===0||e.some(r=>I(r.path,l.path))?{...l,fields:n,repeated_field:t}:null}function et(l,e){var n;return l==null?[]:e==null?[]:(((n=e==null?void 0:e.ui)==null?void 0:n.media_paths)||[]).map(t=>se(l,t))}function re(l,e){if(l==null)return!1;if(typeof e!="string"&&(e=F(e)),l[e]!=null)return l[e];const n=le(e);return n.length>1?re(l,F(n.slice(0,n.length-1))):!0}function tt(l,e){return l.searchPath!=null&&l.selectedColumns[l.searchPath]!=!1?le(l.searchPath):Ie(e)}function it(l,e,n,t,i,r){if(n.searchEmbedding!=null)return n.searchEmbedding;if(e!=null&&e.preferred_embedding!=null)return e.preferred_embedding;if(l.embedding!=null)return l.embedding;if(i==null)return null;const a=oe(t,i);return(a!=null?[...r||[]].sort((o,u)=>{const f=a.includes(o),_=a.includes(u);return f&&_?0:f?-1:_?1:0}):[])[0]}function oe(l,e){if(l.schema==null||e==null)return[];const n=new Set,t=L(se(l.schema,e)).filter(i=>i.signal!=null&&L(i).some(r=>r.dtype==="embedding"));for(const i of t)i.signal!=null&&n.add(i.signal.signal_name);return Array.from(n)}function nt(l,e){return e==null||l==null?!1:(l.udfs||[]).some(n=>q(e,n.path))}function lt(l,e){return e==null?l.query.searches||[]:(l.query.searches||[]).filter(n=>I(n.path,e))}function Ie(l){if(l.stats==null||l.stats.length===0)return null;const e=(l.visibleFields||[]).filter(t=>t.dtype==="string").map(t=>F(t.path));let n=l.stats.map(t=>({path:t.path,embeddings:oe(l,t.path),avgTextLength:t.avg_text_length,isVisible:e.indexOf(F(t.path))>=0}));return n=n.sort((t,i)=>!t.isVisible&&i.isVisible?1:t.isVisible&&!i.isVisible||t.embeddings.length>0&&i.embeddings.length===0?-1:t.embeddings.length===0&&i.embeddings.length>0?1:t.avgTextLength!=null&&i.avgTextLength!=null?i.avgTextLength-t.avgTextLength:i.embeddings.length-t.embeddings.length),n[0].path}function st(l,e){const n={};for(const r of e){let a=[""];r.tags!=null&&r.tags.length>0&&(a=r.tags);for(const s of a)n[s]==null&&(n[s]={}),n[s][r.namespace]==null&&(n[s][r.namespace]=[]),n[s][r.namespace].push(r)}const t=["lilac"],i=[];for(const r of Object.keys(n).sort()){const a=Object.keys(n[r]).sort((s,o)=>t.indexOf(s)-t.indexOf(o)||s.localeCompare(o)).map(s=>({group:s,items:n[r][s].sort((o,u)=>o.dataset_name.localeCompare(u.dataset_name)).map(o=>({name:o.dataset_name,link:me(o.namespace,o.dataset_name),isSelected:(l==null?void 0:l.namespace)===o.namespace&&(l==null?void 0:l.datasetName)===o.dataset_name}))}));i.push({tag:r,groups:a})}return i}function at(l,e,n,t){const i={};for(const s of e){let o=[""];s.tags!=null&&s.tags.length>0&&(o=s.tags);for(const u of o)i[u]==null&&(i[u]={}),i[u][s.namespace]==null&&(i[u][s.namespace]=[]),i[u][s.namespace].push(s)}const r=["lilac"],a=[];for(const s of Object.keys(i).sort()){const o=Object.keys(i[s]).sort((u,f)=>r.indexOf(u)-r.indexOf(f)||u.localeCompare(f)).map(u=>({group:u===n?`${t}'s concepts`:u,items:i[s][u].sort((f,_)=>f.name.localeCompare(_.name)).map(f=>({name:f.name,link:pe(f.namespace,f.name),isSelected:(l==null?void 0:l.namespace)===f.namespace&&(l==null?void 0:l.name)===f.name}))}));a.push({tag:s,groups:o})}return a}function rt(l,e){const n={};for(const i of l)n[i.namespace]==null&&(n[i.namespace]=[]),n[i.namespace].push(i);const t=[e,"lilac"];return Object.keys(n).sort((i,r)=>t.indexOf(i)-t.indexOf(r)||i.localeCompare(r)).map(i=>({namespace:i,concepts:n[i].sort((r,a)=>r.name.localeCompare(a.name))}))}function ot(l,e,n){var t;return n!=null&&n.auth_enabled&&((t=n.user)==null?void 0:t.id)===l?e:`${l}/${e}`}function ut(l){var e,n;return(((n=(e=l.selectRowsSchema)==null?void 0:e.data)==null?void 0:n.sorts)||[])[0]||null}function ft(l,e){const n=[l,...L(l)],t=n.filter(f=>ge(f.signal)),i=n.filter(f=>{var _;return((_=f.signal)==null?void 0:_.signal_name)==="concept_labels"}),r=n.filter(f=>{var _;return((_=f.signal)==null?void 0:_.signal_name)==="semantic_similarity"}),a=n.filter(f=>{var _;return((_=f.signal)==null?void 0:_.signal_name)==="substring_search"}),s=n.filter(f=>f.dtype==="string_span").filter(f=>!L(f).some(_=>_.dtype==="embedding")),o=s.map(f=>f.path),u=[];for(const f of s){const p=L(f).filter(d=>d.dtype!="string_span").filter(d=>e==null||(e==null?void 0:e.some(Y=>I(Y.path,d.path)))).filter(d=>d.dtype!=null&&d.dtype!="embedding"),z=f.path,v=a.find(d=>q(f.path,d.path));if(v!=null){const d=v.signal;u.push({path:f.path,spanPath:z,type:"keyword",name:d.query,dtype:f.dtype,signal:d})}else p.length===0&&u.push({path:f.path,spanPath:z,type:"leaf_span",name:F(f.path.slice(0,-1)),dtype:f.dtype});for(const d of p){const Y=t.find(M=>q(d.path,M.path)),O=i.find(M=>q(d.path,M.path)),U=r.find(M=>q(d.path,M.path));if(Y!=null){const M=Y.signal;u.push({path:d.path,spanPath:z,type:"concept_score",name:`${M.namespace}/${M.concept_name}`,dtype:d.dtype,signal:M})}else if(O!=null){const M=O.signal;u.push({path:d.path,spanPath:z,type:"label",name:`${M.namespace}/${M.concept_name} label`,dtype:d.dtype,signal:M})}else if(U!=null){const M=U.signal;u.push({path:d.path,spanPath:z,type:"semantic_similarity",name:`similarity: ${M.query}`,dtype:d.dtype,signal:M})}else u.push({path:d.path,spanPath:z,type:"metadata",name:d.path[d.path.length-1],dtype:d.dtype})}}return{spanPaths:o,valuePaths:u}}function Fe(l){const e=`
2
+ `,n=l.split(e),t=[];let i=0;for(let r=0;r<n.length;r++){const a=n[r]+(r<n.length-1?e:""),s=i+qe(a),o={start:i,end:s};t.push({text:a,span:o,originalSpans:{},paths:[]}),i=s}return t}function ht(l,e){e=Object.fromEntries(Object.entries(e).filter(([,u])=>u.length>0));const n=Object.keys(e);if(n.length===0)return Fe(l);const t=K(l),i=t.length,r=Object.fromEntries(Object.keys(e).map(u=>[u,0]));for(const u of n)e[u].sort((f,_)=>{var v,d;const p=((v=f[T])==null?void 0:v.start)||0,z=((d=_[T])==null?void 0:d.start)||0;return p-z});let a=0;const s=[];let o=Object.fromEntries(Object.entries(r).map(([u,f])=>[u,[e[u][f],e[u][f+1]]]));for(;a<i;){let u=i;for(const p of Object.values(o))for(const z of p){const v=(z||{})[T];v!=null&&(v.start<u&&v.start>a&&(u=v.start),v.end<u&&v.end>a&&(u=v.end))}const f=Object.fromEntries(Object.entries(o).map(([p,z])=>[p,z.filter(v=>v!=null&&v[T]!=null&&v[T].start<u&&v[T].end>a)]));for(const p of Object.keys(f))f[p].length===0&&delete f[p];const _=Object.values(f).flat().map(p=>ae.path(p)).map(p=>F(p));s.push({text:t.slice(a,u).join(""),span:{start:a,end:u},originalSpans:f,paths:_});for(const p of Object.keys(r)){const z=r[p],v=(o[p][0]||{})[T];if(!(v==null||z==null)&&v.end<=u){if(z>e[p].length){delete r[p];continue}r[p]++}}a=u,o=Object.fromEntries(Object.entries(r).map(([p,z])=>[p,[e[p][z],e[p][z+1]]]))}return a<i&&s.push({text:t.slice(a).join(""),span:{start:a,end:i},originalSpans:{},paths:[]}),s}function dt(l,e,n){return K(l).slice(e,n).join("")}function K(l){return[...l]}function qe(l){return K(l).length}const W="NOTIFICATIONS_CONTEXT";function ct(){const{subscribe:l,set:e,update:n}=be({notifications:[]});return{subscribe:l,set:e,update:n,reset(){e({notifications:[]})},addNotification(t){n(i=>(i.notifications.push(t),i))},removeNotification(t){n(i=>(i.notifications=i.notifications.filter(r=>r!==t),i))}}}function gt(l){fe(W,l)}function mt(){if(!he(W))throw new Error("NotificationContext not found");return de(W)}export{ze as A,Qe as D,Ge as I,at as a,gt as b,ct as c,lt as d,ut as e,tt as f,st as g,oe as h,ft as i,Le as j,et as k,it as l,rt as m,ot as n,nt as o,Ue as p,Je as q,dt as r,Xe as s,$e as t,mt as u,ht as v};
lilac/web/_app/immutable/chunks/notificationsStore.e7f2bd3e.js ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ import{ap as ue,S as B,i as N,s as P,E as b,Z as c,_ as g,m,h,n as V,$ as y,b as H,a0 as w,L as R,a1 as E,N as C,Q as A,q as j,r as x,u as S,P as fe,an as he,aj as de}from"./index.b333a928.js";import{a4 as L,am as ce,z as F,y as le,aU as ge,I,aS as q,ay as se,a5 as T,L as ae}from"./Commands.1fffdf33.js";import{f as me,c as pe}from"./utils.4eeb8687.js";import{w as be}from"./index.2b0dd2f8.js";function ve(l){const e=l-1;return e*e*e+1}function Ue(l,{delay:e=0,duration:n=400,easing:t=ue}={}){const i=+getComputedStyle(l).opacity;return{delay:e,duration:n,easing:t,css:r=>`opacity: ${r*i}`}}function Xe(l,{delay:e=0,duration:n=400,easing:t=ve,axis:i="y"}={}){const r=getComputedStyle(l),a=+r.opacity,s=i==="y"?"height":"width",o=parseFloat(r[s]),u=i==="y"?["top","bottom"]:["left","right"],f=u.map(O=>`${O[0].toUpperCase()}${O.slice(1)}`),_=parseFloat(r[`padding${f[0]}`]),p=parseFloat(r[`padding${f[1]}`]),z=parseFloat(r[`margin${f[0]}`]),v=parseFloat(r[`margin${f[1]}`]),d=parseFloat(r[`border${f[0]}Width`]),Y=parseFloat(r[`border${f[1]}Width`]);return{delay:e,duration:n,easing:t,css:O=>`overflow: hidden;opacity: ${Math.min(O*20,1)*a};${s}: ${O*o}px;padding-${u[0]}: ${O*_}px;padding-${u[1]}: ${O*p}px;margin-${u[0]}: ${O*z}px;margin-${u[1]}: ${O*v}px;border-${u[0]}-width: ${O*d}px;border-${u[1]}-width: ${O*Y}px;`}}function X(l){let e,n;return{c(){e=c("title"),n=j(l[1])},l(t){e=g(t,"title",{});var i=m(e);n=x(i,l[1]),i.forEach(h)},m(t,i){H(t,e,i),w(e,n)},p(t,i){i&2&&S(n,t[1])},d(t){t&&h(e)}}}function _e(l){let e,n,t=l[1]&&X(l),i=[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},{width:l[0]},{height:l[0]},l[2],l[3]],r={};for(let a=0;a<i.length;a+=1)r=b(r,i[a]);return{c(){e=c("svg"),t&&t.c(),n=c("path"),this.h()},l(a){e=g(a,"svg",{xmlns:!0,viewBox:!0,fill:!0,preserveAspectRatio:!0,width:!0,height:!0});var s=m(e);t&&t.l(s),n=g(s,"path",{d:!0}),m(n).forEach(h),s.forEach(h),this.h()},h(){V(n,"d","M21.3 4.9l-4.5-2.7C16.5 2.1 16.3 2 16 2s-.5.1-.7.2l-4.5 2.7C10.3 5.2 10 5.7 10 6.2v5.6c0 .5.3 1 .7 1.3l4.5 2.7c.2.1.5.2.7.2s.5-.1.7-.2l4.5-2.7c.4-.3.7-.7.7-1.3V6.2C22 5.7 21.7 5.2 21.3 4.9zM20 11.5l-4 2.4-4-2.4v-5l4-2.4 4 2.4V11.5zM29.3 18.9l-4.5-2.7C24.5 16.1 24.3 16 24 16s-.5.1-.7.2l-4.5 2.7c-.4.3-.7.7-.7 1.3v5.6c0 .5.3 1 .7 1.3l4.5 2.7c.2.1.5.2.7.2s.5-.1.7-.2l4.5-2.7c.4-.3.7-.7.7-1.3v-5.6C30 19.7 29.7 19.2 29.3 18.9zM28 25.5l-4 2.4-4-2.4v-5l4-2.4 4 2.4V25.5zM13.3 18.9l-4.5-2.7C8.5 16.1 8.3 16 8 16s-.5.1-.7.2l-4.5 2.7C2.3 19.2 2 19.7 2 20.2v5.6c0 .5.3 1 .7 1.3l4.5 2.7C7.5 29.9 7.7 30 8 30s.5-.1.7-.2l4.5-2.7c.4-.3.7-.7.7-1.3v-5.6C14 19.7 13.7 19.2 13.3 18.9zM12 25.5l-4 2.4-4-2.4v-5l4-2.4 4 2.4V25.5z"),y(e,r)},m(a,s){H(a,e,s),t&&t.m(e,null),w(e,n)},p(a,[s]){a[1]?t?t.p(a,s):(t=X(a),t.c(),t.m(e,n)):t&&(t.d(1),t=null),y(e,r=R(i,[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},s&1&&{width:a[0]},s&1&&{height:a[0]},s&4&&a[2],s&8&&a[3]]))},i:E,o:E,d(a){a&&h(e),t&&t.d()}}}function we(l,e,n){let t,i;const r=["size","title"];let a=C(e,r),{size:s=16}=e,{title:o=void 0}=e;return l.$$set=u=>{n(5,e=b(b({},e),A(u))),n(3,a=C(e,r)),"size"in u&&n(0,s=u.size),"title"in u&&n(1,o=u.title)},l.$$.update=()=>{n(4,t=e["aria-label"]||e["aria-labelledby"]||o),n(2,i={"aria-hidden":t?void 0:!0,role:t?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=A(e),[s,o,i,a,t]}class ze extends B{constructor(e){super(),N(this,e,we,_e,P,{size:0,title:1})}}function G(l){let e,n;return{c(){e=c("title"),n=j(l[1])},l(t){e=g(t,"title",{});var i=m(e);n=x(i,l[1]),i.forEach(h)},m(t,i){H(t,e,i),w(e,n)},p(t,i){i&2&&S(n,t[1])},d(t){t&&h(e)}}}function Me(l){let e,n,t,i=l[1]&&G(l),r=[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},{width:l[0]},{height:l[0]},l[2],l[3]],a={};for(let s=0;s<r.length;s+=1)a=b(a,r[s]);return{c(){e=c("svg"),i&&i.c(),n=c("path"),t=c("circle"),this.h()},l(s){e=g(s,"svg",{xmlns:!0,viewBox:!0,fill:!0,preserveAspectRatio:!0,width:!0,height:!0});var o=m(e);i&&i.l(o),n=g(o,"path",{d:!0}),m(n).forEach(h),t=g(o,"circle",{cx:!0,cy:!0,r:!0}),m(t).forEach(h),o.forEach(h),this.h()},h(){V(n,"d","M23,23a7,7,0,1,1,7-7A7.0078,7.0078,0,0,1,23,23Zm0-12a5,5,0,1,0,5,5A5.0055,5.0055,0,0,0,23,11Z"),V(t,"cx","9"),V(t,"cy","16"),V(t,"r","7"),y(e,a)},m(s,o){H(s,e,o),i&&i.m(e,null),w(e,n),w(e,t)},p(s,[o]){s[1]?i?i.p(s,o):(i=G(s),i.c(),i.m(e,n)):i&&(i.d(1),i=null),y(e,a=R(r,[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},o&1&&{width:s[0]},o&1&&{height:s[0]},o&4&&s[2],o&8&&s[3]]))},i:E,o:E,d(s){s&&h(e),i&&i.d()}}}function Ve(l,e,n){let t,i;const r=["size","title"];let a=C(e,r),{size:s=16}=e,{title:o=void 0}=e;return l.$$set=u=>{n(5,e=b(b({},e),A(u))),n(3,a=C(e,r)),"size"in u&&n(0,s=u.size),"title"in u&&n(1,o=u.title)},l.$$.update=()=>{n(4,t=e["aria-label"]||e["aria-labelledby"]||o),n(2,i={"aria-hidden":t?void 0:!0,role:t?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=A(e),[s,o,i,a,t]}class ye extends B{constructor(e){super(),N(this,e,Ve,Me,P,{size:0,title:1})}}function Q(l){let e,n;return{c(){e=c("title"),n=j(l[1])},l(t){e=g(t,"title",{});var i=m(e);n=x(i,l[1]),i.forEach(h)},m(t,i){H(t,e,i),w(e,n)},p(t,i){i&2&&S(n,t[1])},d(t){t&&h(e)}}}function Ee(l){let e,n,t,i,r=l[1]&&Q(l),a=[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},{width:l[0]},{height:l[0]},l[2],l[3]],s={};for(let o=0;o<a.length;o+=1)s=b(s,a[o]);return{c(){e=c("svg"),r&&r.c(),n=c("path"),t=c("path"),i=c("path"),this.h()},l(o){e=g(o,"svg",{xmlns:!0,viewBox:!0,fill:!0,preserveAspectRatio:!0,width:!0,height:!0});var u=m(e);r&&r.l(u),n=g(u,"path",{d:!0}),m(n).forEach(h),t=g(u,"path",{d:!0}),m(t).forEach(h),i=g(u,"path",{d:!0}),m(i).forEach(h),u.forEach(h),this.h()},h(){V(n,"d","M21 15H23V17H21z"),V(t,"d","M24 23H20a2.0023 2.0023 0 01-2-2V11a2.002 2.002 0 012-2h4a2.0023 2.0023 0 012 2V21A2.0027 2.0027 0 0124 23zM20 11h0V21h4V11zM11 15H13V17H11z"),V(i,"d","M14 23H10a2.0023 2.0023 0 01-2-2V11a2.002 2.002 0 012-2h4a2.0023 2.0023 0 012 2V21A2.0027 2.0027 0 0114 23zM10 11h0V21h4V11zM4 21H6V23H4z"),y(e,s)},m(o,u){H(o,e,u),r&&r.m(e,null),w(e,n),w(e,t),w(e,i)},p(o,[u]){o[1]?r?r.p(o,u):(r=Q(o),r.c(),r.m(e,n)):r&&(r.d(1),r=null),y(e,s=R(a,[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},u&1&&{width:o[0]},u&1&&{height:o[0]},u&4&&o[2],u&8&&o[3]]))},i:E,o:E,d(o){o&&h(e),r&&r.d()}}}function Ce(l,e,n){let t,i;const r=["size","title"];let a=C(e,r),{size:s=16}=e,{title:o=void 0}=e;return l.$$set=u=>{n(5,e=b(b({},e),A(u))),n(3,a=C(e,r)),"size"in u&&n(0,s=u.size),"title"in u&&n(1,o=u.title)},l.$$.update=()=>{n(4,t=e["aria-label"]||e["aria-labelledby"]||o),n(2,i={"aria-hidden":t?void 0:!0,role:t?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=A(e),[s,o,i,a,t]}class D extends B{constructor(e){super(),N(this,e,Ce,Ee,P,{size:0,title:1})}}function J(l){let e,n;return{c(){e=c("title"),n=j(l[1])},l(t){e=g(t,"title",{});var i=m(e);n=x(i,l[1]),i.forEach(h)},m(t,i){H(t,e,i),w(e,n)},p(t,i){i&2&&S(n,t[1])},d(t){t&&h(e)}}}function Ae(l){let e,n,t,i=l[1]&&J(l),r=[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},{width:l[0]},{height:l[0]},l[2],l[3]],a={};for(let s=0;s<r.length;s+=1)a=b(a,r[s]);return{c(){e=c("svg"),i&&i.c(),n=c("path"),t=c("path"),this.h()},l(s){e=g(s,"svg",{xmlns:!0,viewBox:!0,fill:!0,preserveAspectRatio:!0,width:!0,height:!0});var o=m(e);i&&i.l(o),n=g(o,"path",{d:!0}),m(n).forEach(h),t=g(o,"path",{d:!0}),m(t).forEach(h),o.forEach(h),this.h()},h(){V(n,"d","M28 9H22v2h6v4H24v2h4v4H22v2h6a2.0027 2.0027 0 002-2V11A2.0023 2.0023 0 0028 9zM20 23H12V17a2.002 2.002 0 012-2h4V11H12V9h6a2.0023 2.0023 0 012 2v4a2.0023 2.0023 0 01-2 2H14v4h6zM2.5 22.5L2.5 21.5 5.5 21.5 5.5 10.5 2.5 10.5 2.5 9.5 6.5 9.5 6.5 21.5 9.5 21.5 9.5 22.5 2.5 22.5z"),V(t,"d","M6,10V22H6V10M7,9H2v2H5V21H2v2h8V21H7V9Z"),y(e,a)},m(s,o){H(s,e,o),i&&i.m(e,null),w(e,n),w(e,t)},p(s,[o]){s[1]?i?i.p(s,o):(i=J(s),i.c(),i.m(e,n)):i&&(i.d(1),i=null),y(e,a=R(r,[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},o&1&&{width:s[0]},o&1&&{height:s[0]},o&4&&s[2],o&8&&s[3]]))},i:E,o:E,d(s){s&&h(e),i&&i.d()}}}function He(l,e,n){let t,i;const r=["size","title"];let a=C(e,r),{size:s=16}=e,{title:o=void 0}=e;return l.$$set=u=>{n(5,e=b(b({},e),A(u))),n(3,a=C(e,r)),"size"in u&&n(0,s=u.size),"title"in u&&n(1,o=u.title)},l.$$.update=()=>{n(4,t=e["aria-label"]||e["aria-labelledby"]||o),n(2,i={"aria-hidden":t?void 0:!0,role:t?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=A(e),[s,o,i,a,t]}class k extends B{constructor(e){super(),N(this,e,He,Ae,P,{size:0,title:1})}}function $(l){let e,n;return{c(){e=c("title"),n=j(l[1])},l(t){e=g(t,"title",{});var i=m(e);n=x(i,l[1]),i.forEach(h)},m(t,i){H(t,e,i),w(e,n)},p(t,i){i&2&&S(n,t[1])},d(t){t&&h(e)}}}function Oe(l){let e,n,t,i=l[1]&&$(l),r=[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},{width:l[0]},{height:l[0]},l[2],l[3]],a={};for(let s=0;s<r.length;s+=1)a=b(a,r[s]);return{c(){e=c("svg"),i&&i.c(),n=c("path"),t=c("path"),this.h()},l(s){e=g(s,"svg",{xmlns:!0,viewBox:!0,fill:!0,preserveAspectRatio:!0,width:!0,height:!0});var o=m(e);i&&i.l(o),n=g(o,"path",{d:!0}),m(n).forEach(h),t=g(o,"path",{d:!0}),m(t).forEach(h),o.forEach(h),this.h()},h(){V(n,"d","M28,30H4a2.0021,2.0021,0,0,1-2-2V4A2.0021,2.0021,0,0,1,4,2H28a2.0021,2.0021,0,0,1,2,2V28A2.0021,2.0021,0,0,1,28,30ZM4,4V28H28V4Z"),V(t,"d","M13 7H15V14H13zM8 7H10V14H8zM22 14H20a2.0021 2.0021 0 01-2-2V9a2.0021 2.0021 0 012-2h2a2.0021 2.0021 0 012 2v3A2.0021 2.0021 0 0122 14zM20 9v3h2V9zM22 18H24V25H22zM8 18H10V25H8zM17 25H15a2.0021 2.0021 0 01-2-2V20a2.0021 2.0021 0 012-2h2a2.0021 2.0021 0 012 2v3A2.0021 2.0021 0 0117 25zm-2-5v3h2V20z"),y(e,a)},m(s,o){H(s,e,o),i&&i.m(e,null),w(e,n),w(e,t)},p(s,[o]){s[1]?i?i.p(s,o):(i=$(s),i.c(),i.m(e,n)):i&&(i.d(1),i=null),y(e,a=R(r,[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},o&1&&{width:s[0]},o&1&&{height:s[0]},o&4&&s[2],o&8&&s[3]]))},i:E,o:E,d(s){s&&h(e),i&&i.d()}}}function ke(l,e,n){let t,i;const r=["size","title"];let a=C(e,r),{size:s=16}=e,{title:o=void 0}=e;return l.$$set=u=>{n(5,e=b(b({},e),A(u))),n(3,a=C(e,r)),"size"in u&&n(0,s=u.size),"title"in u&&n(1,o=u.title)},l.$$.update=()=>{n(4,t=e["aria-label"]||e["aria-labelledby"]||o),n(2,i={"aria-hidden":t?void 0:!0,role:t?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=A(e),[s,o,i,a,t]}class Be extends B{constructor(e){super(),N(this,e,ke,Oe,P,{size:0,title:1})}}function ee(l){let e,n;return{c(){e=c("title"),n=j(l[1])},l(t){e=g(t,"title",{});var i=m(e);n=x(i,l[1]),i.forEach(h)},m(t,i){H(t,e,i),w(e,n)},p(t,i){i&2&&S(n,t[1])},d(t){t&&h(e)}}}function Ne(l){let e,n,t=l[1]&&ee(l),i=[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},{width:l[0]},{height:l[0]},l[2],l[3]],r={};for(let a=0;a<i.length;a+=1)r=b(r,i[a]);return{c(){e=c("svg"),t&&t.c(),n=c("path"),this.h()},l(a){e=g(a,"svg",{xmlns:!0,viewBox:!0,fill:!0,preserveAspectRatio:!0,width:!0,height:!0});var s=m(e);t&&t.l(s),n=g(s,"path",{d:!0}),m(n).forEach(h),s.forEach(h),this.h()},h(){V(n,"d","M4 15H14V17H4zM18 15H28V17H18z"),y(e,r)},m(a,s){H(a,e,s),t&&t.m(e,null),w(e,n)},p(a,[s]){a[1]?t?t.p(a,s):(t=ee(a),t.c(),t.m(e,n)):t&&(t.d(1),t=null),y(e,r=R(i,[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},s&1&&{width:a[0]},s&1&&{height:a[0]},s&4&&a[2],s&8&&a[3]]))},i:E,o:E,d(a){a&&h(e),t&&t.d()}}}function Pe(l,e,n){let t,i;const r=["size","title"];let a=C(e,r),{size:s=16}=e,{title:o=void 0}=e;return l.$$set=u=>{n(5,e=b(b({},e),A(u))),n(3,a=C(e,r)),"size"in u&&n(0,s=u.size),"title"in u&&n(1,o=u.title)},l.$$.update=()=>{n(4,t=e["aria-label"]||e["aria-labelledby"]||o),n(2,i={"aria-hidden":t?void 0:!0,role:t?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=A(e),[s,o,i,a,t]}class Re extends B{constructor(e){super(),N(this,e,Pe,Ne,P,{size:0,title:1})}}function te(l){let e,n;return{c(){e=c("title"),n=j(l[1])},l(t){e=g(t,"title",{});var i=m(e);n=x(i,l[1]),i.forEach(h)},m(t,i){H(t,e,i),w(e,n)},p(t,i){i&2&&S(n,t[1])},d(t){t&&h(e)}}}function je(l){let e,n,t=l[1]&&te(l),i=[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},{width:l[0]},{height:l[0]},l[2],l[3]],r={};for(let a=0;a<i.length;a+=1)r=b(r,i[a]);return{c(){e=c("svg"),t&&t.c(),n=c("path"),this.h()},l(a){e=g(a,"svg",{xmlns:!0,viewBox:!0,fill:!0,preserveAspectRatio:!0,width:!0,height:!0});var s=m(e);t&&t.l(s),n=g(s,"path",{d:!0}),m(n).forEach(h),s.forEach(h),this.h()},h(){V(n,"d","M29 22H24a2.0027 2.0027 0 01-2-2V14a2.0023 2.0023 0 012-2h5v2H24v6h5zM18 12H14V8H12V22h6a2.0027 2.0027 0 002-2V14A2.0023 2.0023 0 0018 12zm-4 8V14h4v6zM8 12H3v2H8v2H4a2 2 0 00-2 2v2a2 2 0 002 2h6V14A2.0023 2.0023 0 008 12zm0 8H4V18H8z"),y(e,r)},m(a,s){H(a,e,s),t&&t.m(e,null),w(e,n)},p(a,[s]){a[1]?t?t.p(a,s):(t=te(a),t.c(),t.m(e,n)):t&&(t.d(1),t=null),y(e,r=R(i,[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},s&1&&{width:a[0]},s&1&&{height:a[0]},s&4&&a[2],s&8&&a[3]]))},i:E,o:E,d(a){a&&h(e),t&&t.d()}}}function xe(l,e,n){let t,i;const r=["size","title"];let a=C(e,r),{size:s=16}=e,{title:o=void 0}=e;return l.$$set=u=>{n(5,e=b(b({},e),A(u))),n(3,a=C(e,r)),"size"in u&&n(0,s=u.size),"title"in u&&n(1,o=u.title)},l.$$.update=()=>{n(4,t=e["aria-label"]||e["aria-labelledby"]||o),n(2,i={"aria-hidden":t?void 0:!0,role:t?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=A(e),[s,o,i,a,t]}class ie extends B{constructor(e){super(),N(this,e,xe,je,P,{size:0,title:1})}}function ne(l){let e,n;return{c(){e=c("title"),n=j(l[1])},l(t){e=g(t,"title",{});var i=m(e);n=x(i,l[1]),i.forEach(h)},m(t,i){H(t,e,i),w(e,n)},p(t,i){i&2&&S(n,t[1])},d(t){t&&h(e)}}}function Se(l){let e,n,t,i=l[1]&&ne(l),r=[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},{width:l[0]},{height:l[0]},l[2],l[3]],a={};for(let s=0;s<r.length;s+=1)a=b(a,r[s]);return{c(){e=c("svg"),i&&i.c(),n=c("path"),t=c("path"),this.h()},l(s){e=g(s,"svg",{xmlns:!0,viewBox:!0,fill:!0,preserveAspectRatio:!0,width:!0,height:!0});var o=m(e);i&&i.l(o),n=g(o,"path",{d:!0}),m(n).forEach(h),t=g(o,"path",{d:!0}),m(t).forEach(h),o.forEach(h),this.h()},h(){V(n,"d","M16,30A14,14,0,1,1,30,16,14,14,0,0,1,16,30ZM16,4A12,12,0,1,0,28,16,12,12,0,0,0,16,4Z"),V(t,"d","M20.59 22L15 16.41 15 7 17 7 17 15.58 22 20.59 20.59 22z"),y(e,a)},m(s,o){H(s,e,o),i&&i.m(e,null),w(e,n),w(e,t)},p(s,[o]){s[1]?i?i.p(s,o):(i=ne(s),i.c(),i.m(e,n)):i&&(i.d(1),i=null),y(e,a=R(r,[{xmlns:"http://www.w3.org/2000/svg"},{viewBox:"0 0 32 32"},{fill:"currentColor"},{preserveAspectRatio:"xMidYMid meet"},o&1&&{width:s[0]},o&1&&{height:s[0]},o&4&&s[2],o&8&&s[3]]))},i:E,o:E,d(s){s&&h(e),i&&i.d()}}}function Te(l,e,n){let t,i;const r=["size","title"];let a=C(e,r),{size:s=16}=e,{title:o=void 0}=e;return l.$$set=u=>{n(5,e=b(b({},e),A(u))),n(3,a=C(e,r)),"size"in u&&n(0,s=u.size),"title"in u&&n(1,o=u.title)},l.$$.update=()=>{n(4,t=e["aria-label"]||e["aria-labelledby"]||o),n(2,i={"aria-hidden":t?void 0:!0,role:t?"img":void 0,focusable:Number(e.tabindex)===0?!0:void 0})},e=A(e),[s,o,i,a,t]}class Z extends B{constructor(e){super(),N(this,e,Te,Se,P,{size:0,title:1})}}const Ge="itemScrollContainer",Qe={string:ie,string_span:ie,uint8:k,uint16:k,uint32:k,uint64:k,int8:k,int16:k,int32:k,int64:k,boolean:ye,float16:D,float32:D,float64:D,time:Z,date:Z,timestamp:Z,interval:Z,embedding:ze,binary:Be,null:Re};function Je(l,e,n,t){if(e==null)return[];let i=[];return t==null?i=L(n||e):i=ce(t,n||e),i.filter(r=>re(l,r.path))}function Ye(l,e){return e.some(n=>I(n.path,l.path))}function $e(l,e){const n=ae.field(l);return n==null?!1:Ye(n,e)}function Le(l,e){const n={};let t;if(l.fields!=null){for(const[r,a]of Object.entries(l.fields))if(e.some(s=>I(s.path,a.path))){const s=Le(a,e);s!=null&&(n[r]=s)}}else l.repeated_field!=null&&(e.some(r=>{var a;return I(r.path,(a=l.repeated_field)==null?void 0:a.path)})?t=l.repeated_field:t=void 0);return t==null&&Object.keys(n).length===0?{...l,fields:void 0,repeated_field:void 0}:l.path.length===0||e.some(r=>I(r.path,l.path))?{...l,fields:n,repeated_field:t}:null}function et(l,e){var n;return l==null?[]:e==null?[]:(((n=e==null?void 0:e.ui)==null?void 0:n.media_paths)||[]).map(t=>se(l,t))}function re(l,e){if(l==null)return!1;if(typeof e!="string"&&(e=F(e)),l[e]!=null)return l[e];const n=le(e);return n.length>1?re(l,F(n.slice(0,n.length-1))):!0}function tt(l,e){return l.searchPath!=null&&l.selectedColumns[l.searchPath]!=!1?le(l.searchPath):Ie(e)}function it(l,e,n,t,i,r){if(n.searchEmbedding!=null)return n.searchEmbedding;if(e!=null&&e.preferred_embedding!=null)return e.preferred_embedding;if(l.embedding!=null)return l.embedding;if(i==null)return null;const a=oe(t,i);return(a!=null?[...r||[]].sort((o,u)=>{const f=a.includes(o),_=a.includes(u);return f&&_?0:f?-1:_?1:0}):[])[0]}function oe(l,e){if(l.schema==null||e==null)return[];const n=new Set,t=L(se(l.schema,e)).filter(i=>i.signal!=null&&L(i).some(r=>r.dtype==="embedding"));for(const i of t)i.signal!=null&&n.add(i.signal.signal_name);return Array.from(n)}function nt(l,e){return e==null||l==null?!1:(l.udfs||[]).some(n=>q(e,n.path))}function lt(l,e){return e==null?l.query.searches||[]:(l.query.searches||[]).filter(n=>I(n.path,e))}function Ie(l){if(l.stats==null||l.stats.length===0)return null;const e=(l.visibleFields||[]).filter(t=>t.dtype==="string").map(t=>F(t.path));let n=l.stats.map(t=>({path:t.path,embeddings:oe(l,t.path),avgTextLength:t.avg_text_length,isVisible:e.indexOf(F(t.path))>=0}));return n=n.sort((t,i)=>!t.isVisible&&i.isVisible?1:t.isVisible&&!i.isVisible||t.embeddings.length>0&&i.embeddings.length===0?-1:t.embeddings.length===0&&i.embeddings.length>0?1:t.avgTextLength!=null&&i.avgTextLength!=null?i.avgTextLength-t.avgTextLength:i.embeddings.length-t.embeddings.length),n[0].path}function st(l,e){const n={};for(const r of e){let a=[""];r.tags!=null&&r.tags.length>0&&(a=r.tags);for(const s of a)n[s]==null&&(n[s]={}),n[s][r.namespace]==null&&(n[s][r.namespace]=[]),n[s][r.namespace].push(r)}const t=["lilac"],i=[];for(const r of Object.keys(n).sort()){const a=Object.keys(n[r]).sort((s,o)=>t.indexOf(s)-t.indexOf(o)||s.localeCompare(o)).map(s=>({group:s,items:n[r][s].sort((o,u)=>o.dataset_name.localeCompare(u.dataset_name)).map(o=>({name:o.dataset_name,link:me(o.namespace,o.dataset_name),isSelected:(l==null?void 0:l.namespace)===o.namespace&&(l==null?void 0:l.datasetName)===o.dataset_name}))}));i.push({tag:r,groups:a})}return i}function at(l,e,n,t){const i={};for(const s of e){let o=[""];s.tags!=null&&s.tags.length>0&&(o=s.tags);for(const u of o)i[u]==null&&(i[u]={}),i[u][s.namespace]==null&&(i[u][s.namespace]=[]),i[u][s.namespace].push(s)}const r=["lilac"],a=[];for(const s of Object.keys(i).sort()){const o=Object.keys(i[s]).sort((u,f)=>r.indexOf(u)-r.indexOf(f)||u.localeCompare(f)).map(u=>({group:u===n?`${t}'s concepts`:u,items:i[s][u].sort((f,_)=>f.name.localeCompare(_.name)).map(f=>({name:f.name,link:pe(f.namespace,f.name),isSelected:(l==null?void 0:l.namespace)===f.namespace&&(l==null?void 0:l.name)===f.name}))}));a.push({tag:s,groups:o})}return a}function rt(l,e){const n={};for(const i of l)n[i.namespace]==null&&(n[i.namespace]=[]),n[i.namespace].push(i);const t=[e,"lilac"];return Object.keys(n).sort((i,r)=>t.indexOf(i)-t.indexOf(r)||i.localeCompare(r)).map(i=>({namespace:i,concepts:n[i].sort((r,a)=>r.name.localeCompare(a.name))}))}function ot(l,e,n){var t;return n!=null&&n.auth_enabled&&((t=n.user)==null?void 0:t.id)===l?e:`${l}/${e}`}function ut(l){var e,n;return(((n=(e=l.selectRowsSchema)==null?void 0:e.data)==null?void 0:n.sorts)||[])[0]||null}function ft(l,e){const n=[l,...L(l)],t=n.filter(f=>ge(f.signal)),i=n.filter(f=>{var _;return((_=f.signal)==null?void 0:_.signal_name)==="concept_labels"}),r=n.filter(f=>{var _;return((_=f.signal)==null?void 0:_.signal_name)==="semantic_similarity"}),a=n.filter(f=>{var _;return((_=f.signal)==null?void 0:_.signal_name)==="substring_search"}),s=n.filter(f=>f.dtype==="string_span").filter(f=>!L(f).some(_=>_.dtype==="embedding")),o=s.map(f=>f.path),u=[];for(const f of s){const p=L(f).filter(d=>d.dtype!="string_span").filter(d=>e==null||(e==null?void 0:e.some(Y=>I(Y.path,d.path)))).filter(d=>d.dtype!=null&&d.dtype!="embedding"),z=f.path,v=a.find(d=>q(f.path,d.path));if(v!=null){const d=v.signal;u.push({path:f.path,spanPath:z,type:"keyword",name:d.query,dtype:f.dtype,signal:d})}else p.length===0&&u.push({path:f.path,spanPath:z,type:"leaf_span",name:F(f.path.slice(0,-1)),dtype:f.dtype});for(const d of p){const Y=t.find(M=>q(d.path,M.path)),O=i.find(M=>q(d.path,M.path)),U=r.find(M=>q(d.path,M.path));if(Y!=null){const M=Y.signal;u.push({path:d.path,spanPath:z,type:"concept_score",name:`${M.namespace}/${M.concept_name}`,dtype:d.dtype,signal:M})}else if(O!=null){const M=O.signal;u.push({path:d.path,spanPath:z,type:"label",name:`${M.namespace}/${M.concept_name} label`,dtype:d.dtype,signal:M})}else if(U!=null){const M=U.signal;u.push({path:d.path,spanPath:z,type:"semantic_similarity",name:`similarity: ${M.query}`,dtype:d.dtype,signal:M})}else u.push({path:d.path,spanPath:z,type:"metadata",name:d.path[d.path.length-1],dtype:d.dtype})}}return{spanPaths:o,valuePaths:u}}function Fe(l){const e=`
2
+ `,n=l.split(e),t=[];let i=0;for(let r=0;r<n.length;r++){const a=n[r]+(r<n.length-1?e:""),s=i+qe(a),o={start:i,end:s};t.push({text:a,span:o,originalSpans:{},paths:[]}),i=s}return t}function ht(l,e){e=Object.fromEntries(Object.entries(e).filter(([,u])=>u.length>0));const n=Object.keys(e);if(n.length===0)return Fe(l);const t=K(l),i=t.length,r=Object.fromEntries(Object.keys(e).map(u=>[u,0]));for(const u of n)e[u].sort((f,_)=>{var v,d;const p=((v=f[T])==null?void 0:v.start)||0,z=((d=_[T])==null?void 0:d.start)||0;return p-z});let a=0;const s=[];let o=Object.fromEntries(Object.entries(r).map(([u,f])=>[u,[e[u][f],e[u][f+1]]]));for(;a<i;){let u=i;for(const p of Object.values(o))for(const z of p){const v=(z||{})[T];v!=null&&(v.start<u&&v.start>a&&(u=v.start),v.end<u&&v.end>a&&(u=v.end))}const f=Object.fromEntries(Object.entries(o).map(([p,z])=>[p,z.filter(v=>v!=null&&v[T]!=null&&v[T].start<u&&v[T].end>a)]));for(const p of Object.keys(f))f[p].length===0&&delete f[p];const _=Object.values(f).flat().map(p=>ae.path(p)).map(p=>F(p));s.push({text:t.slice(a,u).join(""),span:{start:a,end:u},originalSpans:f,paths:_});for(const p of Object.keys(r)){const z=r[p],v=(o[p][0]||{})[T];if(!(v==null||z==null)&&v.end<=u){if(z>e[p].length){delete r[p];continue}r[p]++}}a=u,o=Object.fromEntries(Object.entries(r).map(([p,z])=>[p,[e[p][z],e[p][z+1]]]))}return a<i&&s.push({text:t.slice(a).join(""),span:{start:a,end:i},originalSpans:{},paths:[]}),s}function dt(l,e,n){return K(l).slice(e,n).join("")}function K(l){return[...l]}function qe(l){return K(l).length}const W="NOTIFICATIONS_CONTEXT";function ct(){const{subscribe:l,set:e,update:n}=be({notifications:[]});return{subscribe:l,set:e,update:n,reset(){e({notifications:[]})},addNotification(t){n(i=>(i.notifications.push(t),i))},removeNotification(t){n(i=>(i.notifications=i.notifications.filter(r=>r!==t),i))}}}function gt(l){fe(W,l)}function mt(){if(!he(W))throw new Error("NotificationContext not found");return de(W)}export{ze as A,Qe as D,Ge as I,at as a,gt as b,ct as c,lt as d,ut as e,tt as f,st as g,oe as h,ft as i,Le as j,et as k,it as l,rt as m,ot as n,nt as o,Ue as p,Je as q,dt as r,Xe as s,$e as t,mt as u,ht as v};
lilac/web/_app/immutable/chunks/settingsStore.6e7d5078.js ADDED
@@ -0,0 +1 @@
 
 
1
+ import{ad as E,P as T,an as b,aj as C}from"./index.b333a928.js";import{w as x}from"./index.2b0dd2f8.js";const d={};function m(t){return t==="local"?localStorage:sessionStorage}function N(t,c,e){const r=(e==null?void 0:e.serializer)??JSON,a=(e==null?void 0:e.storage)??"local",s=typeof window<"u"&&typeof document<"u";function S(i,u){s&&m(a).setItem(i,r.stringify(u))}if(!d[t]){const i=x(c,n=>{const o=s?m(a).getItem(t):null;if(o&&n(r.parse(o)),s){const w=g=>{g.key===t&&n(g.newValue?r.parse(g.newValue):null)};return window.addEventListener("storage",w),()=>window.removeEventListener("storage",w)}}),{subscribe:u,set:l}=i;d[t]={set(n){S(t,n),l(n)},update(n){const o=n(E(i));S(t,o),l(o)},subscribe:u}}return d[t]}const f="SETTINGS_CONTEXT",O="settingsStore";function I(){const t={},{subscribe:c,set:e,update:r}=N(O,t,{storage:"session"});return{subscribe:c,set:e,update:r,reset(){e(JSON.parse(JSON.stringify(t)))},setEmbedding(a){r(s=>(s.embedding=a,s))}}}function h(t){T(f,t)}function J(){if(!b(f))throw new Error("SettingsContext not found");return C(f)}export{I as c,J as g,h as s};
lilac/web/_app/immutable/chunks/singletons.25a196bd.js ADDED
@@ -0,0 +1 @@
 
 
1
+ import{w as u}from"./index.d3776286.js";var p;const k=((p=globalThis.__sveltekit_v4cnvd)==null?void 0:p.base)??"";var h;const m=((h=globalThis.__sveltekit_v4cnvd)==null?void 0:h.assets)??k,w="1692622163727",T="sveltekit:snapshot",y="sveltekit:scroll",I="sveltekit:index",f={tap:1,hover:2,viewport:3,eager:4,off:-1};function S(e){let t=e.baseURI;if(!t){const n=e.getElementsByTagName("base");t=n.length?n[0].href:e.URL}return t}function x(){return{x:pageXOffset,y:pageYOffset}}function c(e,t){return e.getAttribute(`data-sveltekit-${t}`)}const d={...f,"":f.hover};function g(e){let t=e.assignedSlot??e.parentNode;return(t==null?void 0:t.nodeType)===11&&(t=t.host),t}function O(e,t){for(;e&&e!==t;){if(e.nodeName.toUpperCase()==="A"&&e.hasAttribute("href"))return e;e=g(e)}}function U(e,t){let n;try{n=new URL(e instanceof SVGAElement?e.href.baseVal:e.href,document.baseURI)}catch{}const o=e instanceof SVGAElement?e.target.baseVal:e.target,r=!n||!!o||A(n,t)||(e.getAttribute("rel")||"").split(/\s+/).includes("external"),l=(n==null?void 0:n.origin)===location.origin&&e.hasAttribute("download");return{url:n,external:r,target:o,download:l}}function L(e){let t=null,n=null,o=null,r=null,l=null,a=null,s=e;for(;s&&s!==document.documentElement;)o===null&&(o=c(s,"preload-code")),r===null&&(r=c(s,"preload-data")),t===null&&(t=c(s,"keepfocus")),n===null&&(n=c(s,"noscroll")),l===null&&(l=c(s,"reload")),a===null&&(a=c(s,"replacestate")),s=g(s);function i(v){switch(v){case"":case"true":return!0;case"off":case"false":return!1;default:return null}}return{preload_code:d[o??"off"],preload_data:d[r??"off"],keep_focus:i(t),noscroll:i(n),reload:i(l),replace_state:i(a)}}function _(e){const t=u(e);let n=!0;function o(){n=!0,t.update(a=>a)}function r(a){n=!1,t.set(a)}function l(a){let s;return t.subscribe(i=>{(s===void 0||n&&i!==s)&&a(s=i)})}return{notify:o,set:r,subscribe:l}}function E(){const{set:e,subscribe:t}=u(!1);let n;async function o(){clearTimeout(n);try{const r=await fetch(`${m}/_app/version.json`,{headers:{pragma:"no-cache","cache-control":"no-cache"}});if(!r.ok)return!1;const a=(await r.json()).version!==w;return a&&(e(!0),clearTimeout(n)),a}catch{return!1}}return{subscribe:t,check:o}}function A(e,t){return e.origin!==location.origin||!e.pathname.startsWith(t)}let b;function N(e){b=e.client}function P(e){return(...t)=>b[e](...t)}const V={url:_({}),page:_({}),navigating:u(null),updated:E()};export{I,f as P,y as S,T as a,U as b,L as c,x as d,k as e,O as f,S as g,N as h,A as i,P as j,V as s};
lilac/web/_app/immutable/chunks/singletons.6c1e5288.js ADDED
@@ -0,0 +1 @@
 
 
1
+ import{w as u}from"./index.2b0dd2f8.js";var _;const k=((_=globalThis.__sveltekit_rrqtp3)==null?void 0:_.base)??"";var h;const m=((h=globalThis.__sveltekit_rrqtp3)==null?void 0:h.assets)??k,w="1692640103907",T="sveltekit:snapshot",y="sveltekit:scroll",I="sveltekit:index",f={tap:1,hover:2,viewport:3,eager:4,off:-1};function S(e){let t=e.baseURI;if(!t){const n=e.getElementsByTagName("base");t=n.length?n[0].href:e.URL}return t}function x(){return{x:pageXOffset,y:pageYOffset}}function c(e,t){return e.getAttribute(`data-sveltekit-${t}`)}const d={...f,"":f.hover};function g(e){let t=e.assignedSlot??e.parentNode;return(t==null?void 0:t.nodeType)===11&&(t=t.host),t}function O(e,t){for(;e&&e!==t;){if(e.nodeName.toUpperCase()==="A"&&e.hasAttribute("href"))return e;e=g(e)}}function U(e,t){let n;try{n=new URL(e instanceof SVGAElement?e.href.baseVal:e.href,document.baseURI)}catch{}const o=e instanceof SVGAElement?e.target.baseVal:e.target,r=!n||!!o||A(n,t)||(e.getAttribute("rel")||"").split(/\s+/).includes("external"),l=(n==null?void 0:n.origin)===location.origin&&e.hasAttribute("download");return{url:n,external:r,target:o,download:l}}function L(e){let t=null,n=null,o=null,r=null,l=null,a=null,s=e;for(;s&&s!==document.documentElement;)o===null&&(o=c(s,"preload-code")),r===null&&(r=c(s,"preload-data")),t===null&&(t=c(s,"keepfocus")),n===null&&(n=c(s,"noscroll")),l===null&&(l=c(s,"reload")),a===null&&(a=c(s,"replacestate")),s=g(s);function i(v){switch(v){case"":case"true":return!0;case"off":case"false":return!1;default:return null}}return{preload_code:d[o??"off"],preload_data:d[r??"off"],keep_focus:i(t),noscroll:i(n),reload:i(l),replace_state:i(a)}}function p(e){const t=u(e);let n=!0;function o(){n=!0,t.update(a=>a)}function r(a){n=!1,t.set(a)}function l(a){let s;return t.subscribe(i=>{(s===void 0||n&&i!==s)&&a(s=i)})}return{notify:o,set:r,subscribe:l}}function E(){const{set:e,subscribe:t}=u(!1);let n;async function o(){clearTimeout(n);try{const r=await fetch(`${m}/_app/version.json`,{headers:{pragma:"no-cache","cache-control":"no-cache"}});if(!r.ok)return!1;const a=(await r.json()).version!==w;return a&&(e(!0),clearTimeout(n)),a}catch{return!1}}return{subscribe:t,check:o}}function A(e,t){return e.origin!==location.origin||!e.pathname.startsWith(t)}let b;function N(e){b=e.client}function P(e){return(...t)=>b[e](...t)}const V={url:p({}),page:p({}),navigating:u(null),updated:E()};export{I,f as P,y as S,T as a,U as b,L as c,x as d,k as e,O as f,S as g,N as h,A as i,P as j,V as s};
lilac/web/_app/immutable/chunks/singletons.a8aafae6.js ADDED
@@ -0,0 +1 @@
 
 
1
+ import{w as u}from"./index.2b0dd2f8.js";var p;const k=((p=globalThis.__sveltekit_1b53qz7)==null?void 0:p.base)??"";var h;const m=((h=globalThis.__sveltekit_1b53qz7)==null?void 0:h.assets)??k,w="1692640051518",T="sveltekit:snapshot",y="sveltekit:scroll",I="sveltekit:index",f={tap:1,hover:2,viewport:3,eager:4,off:-1};function S(e){let t=e.baseURI;if(!t){const n=e.getElementsByTagName("base");t=n.length?n[0].href:e.URL}return t}function x(){return{x:pageXOffset,y:pageYOffset}}function c(e,t){return e.getAttribute(`data-sveltekit-${t}`)}const d={...f,"":f.hover};function g(e){let t=e.assignedSlot??e.parentNode;return(t==null?void 0:t.nodeType)===11&&(t=t.host),t}function O(e,t){for(;e&&e!==t;){if(e.nodeName.toUpperCase()==="A"&&e.hasAttribute("href"))return e;e=g(e)}}function U(e,t){let n;try{n=new URL(e instanceof SVGAElement?e.href.baseVal:e.href,document.baseURI)}catch{}const o=e instanceof SVGAElement?e.target.baseVal:e.target,r=!n||!!o||A(n,t)||(e.getAttribute("rel")||"").split(/\s+/).includes("external"),l=(n==null?void 0:n.origin)===location.origin&&e.hasAttribute("download");return{url:n,external:r,target:o,download:l}}function L(e){let t=null,n=null,o=null,r=null,l=null,a=null,s=e;for(;s&&s!==document.documentElement;)o===null&&(o=c(s,"preload-code")),r===null&&(r=c(s,"preload-data")),t===null&&(t=c(s,"keepfocus")),n===null&&(n=c(s,"noscroll")),l===null&&(l=c(s,"reload")),a===null&&(a=c(s,"replacestate")),s=g(s);function i(v){switch(v){case"":case"true":return!0;case"off":case"false":return!1;default:return null}}return{preload_code:d[o??"off"],preload_data:d[r??"off"],keep_focus:i(t),noscroll:i(n),reload:i(l),replace_state:i(a)}}function _(e){const t=u(e);let n=!0;function o(){n=!0,t.update(a=>a)}function r(a){n=!1,t.set(a)}function l(a){let s;return t.subscribe(i=>{(s===void 0||n&&i!==s)&&a(s=i)})}return{notify:o,set:r,subscribe:l}}function E(){const{set:e,subscribe:t}=u(!1);let n;async function o(){clearTimeout(n);try{const r=await fetch(`${m}/_app/version.json`,{headers:{pragma:"no-cache","cache-control":"no-cache"}});if(!r.ok)return!1;const a=(await r.json()).version!==w;return a&&(e(!0),clearTimeout(n)),a}catch{return!1}}return{subscribe:t,check:o}}function A(e,t){return e.origin!==location.origin||!e.pathname.startsWith(t)}let b;function N(e){b=e.client}function P(e){return(...t)=>b[e](...t)}const V={url:_({}),page:_({}),navigating:u(null),updated:E()};export{I,f as P,y as S,T as a,U as b,L as c,x as d,k as e,O as f,S as g,N as h,A as i,P as j,V as s};
lilac/web/_app/immutable/chunks/singletons.b4dec89c.js ADDED
@@ -0,0 +1 @@
 
 
1
+ import{w as u}from"./index.d3776286.js";var p;const k=((p=globalThis.__sveltekit_1euxevx)==null?void 0:p.base)??"";var h;const m=((h=globalThis.__sveltekit_1euxevx)==null?void 0:h.assets)??k,w="1692587581244",R="sveltekit:snapshot",T="sveltekit:scroll",y="sveltekit:index",f={tap:1,hover:2,viewport:3,eager:4,off:-1};function I(e){let t=e.baseURI;if(!t){const n=e.getElementsByTagName("base");t=n.length?n[0].href:e.URL}return t}function S(){return{x:pageXOffset,y:pageYOffset}}function c(e,t){return e.getAttribute(`data-sveltekit-${t}`)}const d={...f,"":f.hover};function g(e){let t=e.assignedSlot??e.parentNode;return(t==null?void 0:t.nodeType)===11&&(t=t.host),t}function O(e,t){for(;e&&e!==t;){if(e.nodeName.toUpperCase()==="A"&&e.hasAttribute("href"))return e;e=g(e)}}function U(e,t){let n;try{n=new URL(e instanceof SVGAElement?e.href.baseVal:e.href,document.baseURI)}catch{}const o=e instanceof SVGAElement?e.target.baseVal:e.target,r=!n||!!o||E(n,t)||(e.getAttribute("rel")||"").split(/\s+/).includes("external"),l=(n==null?void 0:n.origin)===location.origin&&e.hasAttribute("download");return{url:n,external:r,target:o,download:l}}function L(e){let t=null,n=null,o=null,r=null,l=null,a=null,s=e;for(;s&&s!==document.documentElement;)o===null&&(o=c(s,"preload-code")),r===null&&(r=c(s,"preload-data")),t===null&&(t=c(s,"keepfocus")),n===null&&(n=c(s,"noscroll")),l===null&&(l=c(s,"reload")),a===null&&(a=c(s,"replacestate")),s=g(s);function i(v){switch(v){case"":case"true":return!0;case"off":case"false":return!1;default:return null}}return{preload_code:d[o??"off"],preload_data:d[r??"off"],keep_focus:i(t),noscroll:i(n),reload:i(l),replace_state:i(a)}}function _(e){const t=u(e);let n=!0;function o(){n=!0,t.update(a=>a)}function r(a){n=!1,t.set(a)}function l(a){let s;return t.subscribe(i=>{(s===void 0||n&&i!==s)&&a(s=i)})}return{notify:o,set:r,subscribe:l}}function x(){const{set:e,subscribe:t}=u(!1);let n;async function o(){clearTimeout(n);try{const r=await fetch(`${m}/_app/version.json`,{headers:{pragma:"no-cache","cache-control":"no-cache"}});if(!r.ok)return!1;const a=(await r.json()).version!==w;return a&&(e(!0),clearTimeout(n)),a}catch{return!1}}return{subscribe:t,check:o}}function E(e,t){return e.origin!==location.origin||!e.pathname.startsWith(t)}let b;function N(e){b=e.client}function P(e){return(...t)=>b[e](...t)}const V={url:_({}),page:_({}),navigating:u(null),updated:x()};export{y as I,f as P,T as S,R as a,U as b,L as c,S as d,k as e,O as f,I as g,N as h,E as i,P as j,V as s};
lilac/web/_app/immutable/chunks/stores.0468e31e.js ADDED
@@ -0,0 +1 @@
 
 
1
+ import{s as e}from"./singletons.a8aafae6.js";const r=()=>{const s=e;return{page:{subscribe:s.page.subscribe},navigating:{subscribe:s.navigating.subscribe},updated:s.updated}},b={subscribe(s){return r().page.subscribe(s)}};export{b as p};