lightly-studio 0.3.3__py3-none-any.whl → 0.4.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of lightly-studio might be problematic. Click here for more details.

Files changed (137) hide show
  1. lightly_studio/api/app.py +2 -0
  2. lightly_studio/api/features.py +3 -5
  3. lightly_studio/api/routes/api/caption.py +30 -0
  4. lightly_studio/api/routes/api/dataset_tag.py +10 -0
  5. lightly_studio/api/routes/api/embeddings2d.py +42 -39
  6. lightly_studio/api/routes/api/metadata.py +57 -1
  7. lightly_studio/core/add_samples.py +138 -0
  8. lightly_studio/core/dataset.py +232 -18
  9. lightly_studio/core/dataset_query/__init__.py +14 -0
  10. lightly_studio/core/sample.py +33 -1
  11. lightly_studio/dataset/loader.py +2 -8
  12. lightly_studio/db_manager.py +14 -6
  13. lightly_studio/dist_lightly_studio_view_app/_app/env.js +1 -1
  14. lightly_studio/dist_lightly_studio_view_app/_app/immutable/assets/0.CN4hnTks.css +1 -0
  15. lightly_studio/dist_lightly_studio_view_app/_app/immutable/assets/2.CkOblLn7.css +1 -0
  16. lightly_studio/dist_lightly_studio_view_app/_app/immutable/assets/Samples.C0_eo9eP.css +1 -0
  17. lightly_studio/dist_lightly_studio_view_app/_app/immutable/assets/{useFeatureFlags.CV-KWLNP.css → _layout.CefECEWA.css} +1 -1
  18. lightly_studio/dist_lightly_studio_view_app/_app/immutable/assets/_layout.kFFGI0zL.css +1 -0
  19. lightly_studio/dist_lightly_studio_view_app/_app/immutable/assets/transform.sLzR40om.css +1 -0
  20. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/{6t3IJ0vQ.js → BOmrKuMn.js} +1 -1
  21. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/{Cs1XmhiF.js → BPpOWbDa.js} +1 -1
  22. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/BaFFwDFr.js +1 -0
  23. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/BiGQqqJP.js +1 -0
  24. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/BrNKoXwc.js +20 -0
  25. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/BsaJCCG_.js +96 -0
  26. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/BtXGzlpP.js +20 -0
  27. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/C1FmrZbK.js +1 -0
  28. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/C3xJX0nD.js +1 -0
  29. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/CANX9QXL.js +1 -0
  30. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/CAPx0Bfm.js +1 -0
  31. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/CP9M7pei.js +39 -0
  32. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/CWuDkrMZ.js +436 -0
  33. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/ChlxSwqI.js +1 -0
  34. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/Cj4nZbtb.js +1 -0
  35. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/ClzkJBWk.js +1 -0
  36. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/CpbA3HU7.js +2 -0
  37. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/D8ZGoCPm.js +3 -0
  38. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/DMJzr1NB.js +1 -0
  39. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/{BdfTHw61.js → DNJnBfHs.js} +1 -1
  40. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/{keKYsoph.js → DUtlYNuP.js} +1 -1
  41. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/DVxjPOJB.js +1 -0
  42. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/DmGM9V9Q.js +1 -0
  43. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/DoEId1MK.js +1 -0
  44. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/DthpwYR_.js +2 -0
  45. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/DyIcJj6J.js +1 -0
  46. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/SiegjVo0.js +1 -0
  47. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/{BfHVnyNT.js → WEyXQRi6.js} +1 -1
  48. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/gBp1tBnA.js +1 -0
  49. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/xQhUoIl9.js +1 -0
  50. lightly_studio/dist_lightly_studio_view_app/_app/immutable/entry/app.Y-sSoz5q.js +2 -0
  51. lightly_studio/dist_lightly_studio_view_app/_app/immutable/entry/start.CvxVp0Cu.js +1 -0
  52. lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/0.0Fm6E-5B.js +4 -0
  53. lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/1.DB-0vkHb.js +1 -0
  54. lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/10.vaUePh5k.js +1 -0
  55. lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/11.7i7ljNVT.js +1 -0
  56. lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/13.9qy3WtZv.js +1 -0
  57. lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/{2.C8HLK8mj.js → 2.Drwwdm7A.js} +267 -111
  58. lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/{3.CLvg3QcJ.js → 3.D3X_-Wan.js} +1 -1
  59. lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/{4.BQhDtXUI.js → 4.C9TqY3tA.js} +1 -1
  60. lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/5.iRw6HCWX.js +39 -0
  61. lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/{6.uBV1Lhat.js → 6.fqfYR7dB.js} +1 -1
  62. lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/7.C7gMM-gk.js +1 -0
  63. lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/8.C4v1w-oS.js +20 -0
  64. lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/9.DbHcSiMn.js +1 -0
  65. lightly_studio/dist_lightly_studio_view_app/_app/version.json +1 -1
  66. lightly_studio/dist_lightly_studio_view_app/index.html +15 -14
  67. lightly_studio/examples/example.py +4 -0
  68. lightly_studio/examples/example_coco.py +4 -0
  69. lightly_studio/examples/example_coco_caption.py +24 -0
  70. lightly_studio/examples/example_metadata.py +4 -1
  71. lightly_studio/examples/example_selection.py +4 -0
  72. lightly_studio/examples/example_split_work.py +4 -0
  73. lightly_studio/examples/example_yolo.py +4 -0
  74. lightly_studio/export/export_dataset.py +11 -3
  75. lightly_studio/metadata/compute_typicality.py +1 -1
  76. lightly_studio/models/caption.py +74 -0
  77. lightly_studio/models/dataset.py +1 -2
  78. lightly_studio/models/metadata.py +1 -1
  79. lightly_studio/models/sample.py +9 -2
  80. lightly_studio/models/settings.py +5 -0
  81. lightly_studio/resolvers/caption_resolver.py +80 -0
  82. lightly_studio/resolvers/dataset_resolver.py +6 -11
  83. lightly_studio/resolvers/metadata_resolver/__init__.py +2 -2
  84. lightly_studio/resolvers/metadata_resolver/sample/__init__.py +3 -3
  85. lightly_studio/resolvers/metadata_resolver/sample/bulk_update_metadata.py +46 -0
  86. lightly_studio/resolvers/sample_resolver.py +1 -0
  87. lightly_studio/resolvers/samples_filter.py +18 -10
  88. lightly_studio/resolvers/settings_resolver.py +3 -0
  89. lightly_studio/resolvers/twodim_embedding_resolver.py +29 -0
  90. lightly_studio/selection/__init__.py +1 -0
  91. lightly_studio/selection/mundig.py +41 -0
  92. lightly_studio/type_definitions.py +2 -0
  93. lightly_studio-0.4.0.dist-info/METADATA +78 -0
  94. {lightly_studio-0.3.3.dist-info → lightly_studio-0.4.0.dist-info}/RECORD +96 -88
  95. lightly_studio/dist_lightly_studio_view_app/_app/immutable/assets/0.CA_CXIBb.css +0 -1
  96. lightly_studio/dist_lightly_studio_view_app/_app/immutable/assets/_layout.DS78jgNY.css +0 -1
  97. lightly_studio/dist_lightly_studio_view_app/_app/immutable/assets/index.BVs_sZj9.css +0 -1
  98. lightly_studio/dist_lightly_studio_view_app/_app/immutable/assets/transform.D487hwJk.css +0 -1
  99. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/8NsknIT2.js +0 -1
  100. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/BND_-4Kp.js +0 -1
  101. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/BjkP1AHA.js +0 -1
  102. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/BuuNVL9G.js +0 -1
  103. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/BzKGpnl4.js +0 -1
  104. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/CCx7Ho51.js +0 -1
  105. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/CH6P3X75.js +0 -1
  106. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/CR2upx_Q.js +0 -4
  107. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/CWPZrTTJ.js +0 -1
  108. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/CwPowJfP.js +0 -1
  109. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/CxFKfZ9T.js +0 -1
  110. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/Cxevwdid.js +0 -1
  111. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/D4whDBUi.js +0 -1
  112. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/D6r9vr07.js +0 -1
  113. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/DA6bFLPR.js +0 -1
  114. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/DEgUu98i.js +0 -3
  115. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/DGTPl6Gk.js +0 -1
  116. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/DKGxBSlK.js +0 -1
  117. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/DQXoLcsF.js +0 -1
  118. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/DQe_kdRt.js +0 -92
  119. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/DcY4jgG3.js +0 -1
  120. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/H7C68rOM.js +0 -1
  121. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/RmD8FzRo.js +0 -1
  122. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/V-MnMC1X.js +0 -1
  123. lightly_studio/dist_lightly_studio_view_app/_app/immutable/entry/app.BVr6DYqP.js +0 -2
  124. lightly_studio/dist_lightly_studio_view_app/_app/immutable/entry/start.u7zsVvqp.js +0 -1
  125. lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/0.Da2agmdd.js +0 -1
  126. lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/1.B11tVRJV.js +0 -1
  127. lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/10.l30Zud4h.js +0 -1
  128. lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/12.CgKPGcAP.js +0 -1
  129. lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/5.-6XqWX5G.js +0 -1
  130. lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/7.BXsgoQZh.js +0 -1
  131. lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/8.BkbcnUs8.js +0 -1
  132. lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/9.Bkrv-Vww.js +0 -1
  133. lightly_studio/resolvers/metadata_resolver/sample/bulk_set_metadata.py +0 -48
  134. lightly_studio/selection/README.md +0 -6
  135. lightly_studio-0.3.3.dist-info/METADATA +0 -814
  136. /lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/{11.CWG1ehzT.js → 12.CWG1ehzT.js} +0 -0
  137. {lightly_studio-0.3.3.dist-info → lightly_studio-0.4.0.dist-info}/WHEEL +0 -0
@@ -1 +0,0 @@
1
- import"./CWj6FrbW.js";import{p,f as n,n as i,a as m}from"./CH6P3X75.js";import{c,a as d}from"./RmD8FzRo.js";import{s as f}from"./CCx7Ho51.js";import{s as l,r as u}from"./DQXoLcsF.js";import{I as h}from"./DQe_kdRt.js";function y(r,o){p(o,!0);let t=u(o,["$$slots","$$events","$$legacy"]);h(r,l({name:"minus"},()=>t,{iconNode:[["path",{d:"M5 12h14"}]],children:(a,_)=>{var s=c(),e=n(s);f(e,()=>o.children??i),d(a,s)},$$slots:{default:!0}})),m()}export{y as default};
@@ -1 +0,0 @@
1
- import{b as d,e as g,u as c,h as l,i as b,j as m,g as p,k as h,d as k}from"./CH6P3X75.js";function x(n=!1){const s=d,e=s.l.u;if(!e)return;let r=()=>h(s.s);if(n){let o=0,t={};const _=k(()=>{let i=!1;const a=s.s;for(const f in a)a[f]!==t[f]&&(t[f]=a[f],i=!0);return i&&o++,o});r=()=>p(_)}e.b.length&&g(()=>{u(s,r),l(e.b)}),c(()=>{const o=b(()=>e.m.map(m));return()=>{for(const t of o)typeof t=="function"&&t()}}),e.a.length&&c(()=>{u(s,r),l(e.a)})}function u(n,s){if(n.l.s)for(const e of n.l.s)p(e);s()}export{x as i};
@@ -1 +0,0 @@
1
- import{o as M,E as W,C as Q,n as J,at as Y,q as K,F as V,l as D,w as A,au as X,m as O}from"./CH6P3X75.js";import{u as Z}from"./6t3IJ0vQ.js";function ye(n,t,...e){var i=n,r=J,s;M(()=>{r!==(r=t())&&(s&&(Y(s),s=null),s=Q(()=>r(i,...e)))},W),K&&(i=V)}const ee=/\{[^{}]+\}/g,te=()=>{var n,t;return typeof process=="object"&&Number.parseInt((t=(n=process==null?void 0:process.versions)==null?void 0:n.node)==null?void 0:t.substring(0,2))>=18&&process.versions.undici};function re(){return Math.random().toString(36).slice(2,11)}function ne(n){let{baseUrl:t="",Request:e=globalThis.Request,fetch:i=globalThis.fetch,querySerializer:r,bodySerializer:s,headers:l,requestInitExt:f=void 0,...q}={...n};f=te()?f:void 0,t=v(t);const y=[];async function h(a,o){const{baseUrl:m,fetch:R=i,Request:ce=e,headers:N,params:g={},parseAs:U="json",querySerializer:S,bodySerializer:_=s??ae,body:P,...x}=o||{};m&&(t=v(m));let z=typeof r=="function"?r:H(r);S&&(z=typeof S=="function"?S:H({...typeof r=="object"?r:{},...S}));const C=P===void 0?void 0:_(P),B=C===void 0||C instanceof FormData?{}:{"Content-Type":"application/json"},G={redirect:"follow",...q,...x,body:C,headers:oe(B,l,N,g.header)};let j,E,b=new e(ie(a,{baseUrl:t,params:g,querySerializer:z}),G);for(const u in x)u in b||(b[u]=x[u]);if(y.length){j=re(),E=Object.freeze({baseUrl:t,fetch:R,parseAs:U,querySerializer:z,bodySerializer:_});for(const u of y)if(u&&typeof u=="object"&&typeof u.onRequest=="function"){const d=await u.onRequest({request:b,schemaPath:a,params:g,options:E,id:j});if(d){if(!(d instanceof e))throw new Error("onRequest: must return new Request() when modifying the request");b=d}}}let c;try{c=await R(b,f)}catch(u){let d=u;if(y.length)for(let p=y.length-1;p>=0;p--){const T=y[p];if(T&&typeof T=="object"&&typeof T.onError=="function"){const w=await T.onError({request:b,error:d,schemaPath:a,params:g,options:E,id:j});if(w){if(w instanceof Response){d=void 0,c=w;break}if(w instanceof Error){d=w;continue}throw new Error("onError: must return new Response() or instance of Error")}}}if(d)throw d}if(y.length)for(let u=y.length-1;u>=0;u--){const d=y[u];if(d&&typeof d=="object"&&typeof d.onResponse=="function"){const p=await d.onResponse({request:b,response:c,schemaPath:a,params:g,options:E,id:j});if(p){if(!(p instanceof Response))throw new Error("onResponse: must return new Response() when modifying the response");c=p}}}if(c.status===204||c.headers.get("Content-Length")==="0")return c.ok?{data:void 0,response:c}:{error:void 0,response:c};if(c.ok)return U==="stream"?{data:c.body,response:c}:{data:await c[U](),response:c};let I=await c.text();try{I=JSON.parse(I)}catch{}return{error:I,response:c}}return{request(a,o,m){return h(o,{...m,method:a.toUpperCase()})},GET(a,o){return h(a,{...o,method:"GET"})},PUT(a,o){return h(a,{...o,method:"PUT"})},POST(a,o){return h(a,{...o,method:"POST"})},DELETE(a,o){return h(a,{...o,method:"DELETE"})},OPTIONS(a,o){return h(a,{...o,method:"OPTIONS"})},HEAD(a,o){return h(a,{...o,method:"HEAD"})},PATCH(a,o){return h(a,{...o,method:"PATCH"})},TRACE(a,o){return h(a,{...o,method:"TRACE"})},use(...a){for(const o of a)if(o){if(typeof o!="object"||!("onRequest"in o||"onResponse"in o||"onError"in o))throw new Error("Middleware must be an object with one of `onRequest()`, `onResponse() or `onError()`");y.push(o)}},eject(...a){for(const o of a){const m=y.indexOf(o);m!==-1&&y.splice(m,1)}}}}function $(n,t,e){if(t==null)return"";if(typeof t=="object")throw new Error("Deeply-nested arrays/objects aren’t supported. Provide your own `querySerializer()` to handle these.");return`${n}=${(e==null?void 0:e.allowReserved)===!0?t:encodeURIComponent(t)}`}function k(n,t,e){if(!t||typeof t!="object")return"";const i=[],r={simple:",",label:".",matrix:";"}[e.style]||"&";if(e.style!=="deepObject"&&e.explode===!1){for(const f in t)i.push(f,e.allowReserved===!0?t[f]:encodeURIComponent(t[f]));const l=i.join(",");switch(e.style){case"form":return`${n}=${l}`;case"label":return`.${l}`;case"matrix":return`;${n}=${l}`;default:return l}}for(const l in t){const f=e.style==="deepObject"?`${n}[${l}]`:l;i.push($(f,t[l],e))}const s=i.join(r);return e.style==="label"||e.style==="matrix"?`${r}${s}`:s}function F(n,t,e){if(!Array.isArray(t))return"";if(e.explode===!1){const s={form:",",spaceDelimited:"%20",pipeDelimited:"|"}[e.style]||",",l=(e.allowReserved===!0?t:t.map(f=>encodeURIComponent(f))).join(s);switch(e.style){case"simple":return l;case"label":return`.${l}`;case"matrix":return`;${n}=${l}`;default:return`${n}=${l}`}}const i={simple:",",label:".",matrix:";"}[e.style]||"&",r=[];for(const s of t)e.style==="simple"||e.style==="label"?r.push(e.allowReserved===!0?s:encodeURIComponent(s)):r.push($(n,s,e));return e.style==="label"||e.style==="matrix"?`${i}${r.join(i)}`:r.join(i)}function H(n){return function(e){const i=[];if(e&&typeof e=="object")for(const r in e){const s=e[r];if(s!=null){if(Array.isArray(s)){if(s.length===0)continue;i.push(F(r,s,{style:"form",explode:!0,...n==null?void 0:n.array,allowReserved:(n==null?void 0:n.allowReserved)||!1}));continue}if(typeof s=="object"){i.push(k(r,s,{style:"deepObject",explode:!0,...n==null?void 0:n.object,allowReserved:(n==null?void 0:n.allowReserved)||!1}));continue}i.push($(r,s,n))}}return i.join("&")}}function se(n,t){let e=n;for(const i of n.match(ee)??[]){let r=i.substring(1,i.length-1),s=!1,l="simple";if(r.endsWith("*")&&(s=!0,r=r.substring(0,r.length-1)),r.startsWith(".")?(l="label",r=r.substring(1)):r.startsWith(";")&&(l="matrix",r=r.substring(1)),!t||t[r]===void 0||t[r]===null)continue;const f=t[r];if(Array.isArray(f)){e=e.replace(i,F(r,f,{style:l,explode:s}));continue}if(typeof f=="object"){e=e.replace(i,k(r,f,{style:l,explode:s}));continue}if(l==="matrix"){e=e.replace(i,`;${$(r,f)}`);continue}e=e.replace(i,l==="label"?`.${encodeURIComponent(f)}`:encodeURIComponent(f))}return e}function ae(n){return n instanceof FormData?n:JSON.stringify(n)}function ie(n,t){var r;let e=`${t.baseUrl}${n}`;(r=t.params)!=null&&r.path&&(e=se(e,t.params.path));let i=t.querySerializer(t.params.query??{});return i.startsWith("?")&&(i=i.substring(1)),i&&(e+=`?${i}`),e}function oe(...n){const t=new Headers;for(const e of n){if(!e||typeof e!="object")continue;const i=e instanceof Headers?e.entries():Object.entries(e);for(const[r,s]of i)if(s===null)t.delete(r);else if(Array.isArray(s))for(const l of s)t.append(r,l);else s!==void 0&&t.set(r,s)}return t}function v(n){return n.endsWith("/")?n.substring(0,n.length-1):n}const he="/images",le="/",fe=ne({baseUrl:le,fetch}),L=A(new Set);function me(n){const{dataset_id:t,kind:e}=n,{tags:i}=Z(),r=A(!1),s=A(null),l=A(!1),f=()=>{D(l)||(l.set(!0),fe.GET("/api/datasets/{dataset_id}/tags",{params:{path:{dataset_id:t}}}).then(a=>{a.data&&i.set(a.data)}).catch(a=>{s.set(a)}).finally(()=>{l.set(!1)}))};!D(r)&&t&&(f(),r.set(!0));const q=X(i,a=>{const o=a??[];return e?o.filter(R=>e.includes(R.kind)):o}),y=a=>{L.update(o=>(o.has(a)?o.delete(a):o.add(a),new Set([...o])))},h=()=>{L.set(new Set)};return{tags:O(q),loadTags:f,tagsSelected:O(L),tagSelectionToggle:y,clearTagsSelected:h,isLoading:O(l),error:s}}export{he as P,le as a,fe as c,ye as s,me as u};
@@ -1 +0,0 @@
1
- import{l as pt,t as an}from"./DIeogL5L.js";const yt=!1;var Zn=Array.isArray,ln=Array.prototype.indexOf,Wn=Array.from,Xn=Object.defineProperty,gt=Object.getOwnPropertyDescriptor,un=Object.getOwnPropertyDescriptors,Jn=Object.prototype,Qn=Array.prototype,on=Object.getPrototypeOf;function tr(t){return typeof t=="function"}const L=()=>{};function nr(t){return typeof(t==null?void 0:t.then)=="function"}function rr(t){return t()}function ht(t){for(var n=0;n<t.length;n++)t[n]()}const g=2,St=4,et=8,dt=16,x=32,D=64,Z=128,y=256,W=512,d=1024,S=2048,N=4096,Y=8192,st=16384,fn=32768,It=65536,er=1<<17,cn=1<<19,kt=1<<20,mt=Symbol("$state"),sr=Symbol("legacy props"),ar=Symbol("");function Rt(t){return t===this.v}function Ot(t,n){return t!=t?n==n:t!==n||t!==null&&typeof t=="object"||typeof t=="function"}function lr(t,n){return t!==n}function Ct(t){return!Ot(t,this.v)}function _n(t){throw new Error("https://svelte.dev/e/effect_in_teardown")}function vn(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}function pn(t){throw new Error("https://svelte.dev/e/effect_orphan")}function hn(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}function ur(){throw new Error("https://svelte.dev/e/hydration_failed")}function or(t){throw new Error("https://svelte.dev/e/props_invalid_value")}function fr(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}function ir(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}function dn(){throw new Error("https://svelte.dev/e/state_unsafe_local_read")}function wn(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}const cr=1,_r=2,vr=4,pr=8,hr=16,dr=1,wr=2,Er=4,yr=8,gr=16,mr=4,br=1,Tr=2,En="[",yn="[!",gn="]",Dt={},Ar=Symbol(),xr="http://www.w3.org/1999/xhtml",Sr="http://www.w3.org/2000/svg";function Nt(t){console.warn("https://svelte.dev/e/hydration_mismatch")}function mn(t){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}let i=null;function bt(t){i=t}function Ir(t){return lt().get(t)}function kr(t,n){return lt().set(t,n),n}function Rr(t){return lt().has(t)}function Or(){return lt()}function Cr(t,n=!1,r){var e=i={p:i,c:null,d:!1,e:null,m:!1,s:t,x:null,l:null};pt&&!n&&(i.l={s:null,u:null,r1:[],r2:wt(!1)}),On(()=>{e.d=!0})}function Dr(t){const n=i;if(n!==null){t!==void 0&&(n.x=t);const l=n.e;if(l!==null){var r=_,e=o;n.e=null;try{for(var s=0;s<l.length;s++){var a=l[s];tt(a.effect),Q(a.reaction),jt(a.fn)}}finally{tt(r),Q(e)}}i=n.p,n.m=!0}return t||{}}function at(){return!pt||i!==null&&i.l===null}function lt(t){return i===null&&mn(),i.c??(i.c=new Map(bn(i)||void 0))}function bn(t){let n=t.p;for(;n!==null;){const r=n.c;if(r!==null)return r;n=n.p}return null}const j=new Map;function wt(t,n){var r={f:0,v:t,reactions:null,equals:Rt,rv:0,wv:0};return r}function Nr(t){return Pt(wt(t))}function Tn(t,n=!1){var e;const r=wt(t);return n||(r.equals=Ct),pt&&i!==null&&i.l!==null&&((e=i.l).s??(e.s=[])).push(r),r}function Pr(t,n=!1){return Pt(Tn(t,n))}function Pt(t){return o!==null&&!E&&o.f&g&&(T===null?Fn([t]):T.push(t)),t}function An(t,n){return o!==null&&!E&&at()&&o.f&(g|dt)&&(T===null||!T.includes(t))&&wn(),xn(t,n)}function xn(t,n){if(!t.equals(n)){var r=t.v;$?j.set(t,n):j.set(t,r),t.v=n,t.wv=Xt(),Mt(t,S),at()&&_!==null&&_.f&d&&!(_.f&(x|D))&&(A===null?qn([t]):A.push(t))}return n}function Mt(t,n){var r=t.reactions;if(r!==null)for(var e=at(),s=r.length,a=0;a<s;a++){var l=r[a],u=l.f;u&S||!e&&l===_||(b(l,n),u&(d|y)&&(u&g?Mt(l,N):ft(l)))}}let C=!1;function Mr(t){C=t}let m;function U(t){if(t===null)throw Nt(),Dt;return m=t}function Fr(){return U(P(m))}function qr(t){if(C){if(P(m)!==null)throw Nt(),Dt;m=t}}function Lr(t=1){if(C){for(var n=t,r=m;n--;)r=P(r);m=r}}function Yr(){for(var t=0,n=m;;){if(n.nodeType===8){var r=n.data;if(r===gn){if(t===0)return n;t-=1}else(r===En||r===yn)&&(t+=1)}var e=P(n);n.remove(),n=e}}var Tt,Sn,Ft,qt;function Hr(){if(Tt===void 0){Tt=window,Sn=/Firefox/.test(navigator.userAgent);var t=Element.prototype,n=Node.prototype;Ft=gt(n,"firstChild").get,qt=gt(n,"nextSibling").get,t.__click=void 0,t.__className=void 0,t.__attributes=null,t.__style=void 0,t.__e=void 0,Text.prototype.__t=void 0}}function ct(t=""){return document.createTextNode(t)}function _t(t){return Ft.call(t)}function P(t){return qt.call(t)}function Br(t,n){if(!C)return _t(t);var r=_t(m);if(r===null)r=m.appendChild(ct());else if(n&&r.nodeType!==3){var e=ct();return r==null||r.before(e),U(e),e}return U(r),r}function jr(t,n){if(!C){var r=_t(t);return r instanceof Comment&&r.data===""?P(r):r}return m}function Ur(t,n=1,r=!1){let e=C?m:t;for(var s;n--;)s=e,e=P(e);if(!C)return e;var a=e==null?void 0:e.nodeType;if(r&&a!==3){var l=ct();return e===null?s==null||s.after(l):e.before(l),U(l),l}return U(e),e}function Vr(t){t.textContent=""}function Lt(t){var n=g|S,r=o!==null&&o.f&g?o:null;return _===null||r!==null&&r.f&y?n|=y:_.f|=kt,{ctx:i,deps:null,effects:null,equals:Rt,f:n,fn:t,reactions:null,rv:0,v:null,wv:0,parent:r??_}}function Gr(t){const n=Lt(t);return n.equals=Ct,n}function Yt(t){var n=t.effects;if(n!==null){t.effects=null;for(var r=0;r<n.length;r+=1)R(n[r])}}function In(t){for(var n=t.parent;n!==null;){if(!(n.f&g))return n;n=n.parent}return null}function kn(t){var n,r=_;tt(In(t));try{Yt(t),n=Qt(t)}finally{tt(r)}return n}function Ht(t){var n=kn(t),r=(k||t.f&y)&&t.deps!==null?N:d;b(t,r),t.equals(n)||(t.v=n,t.wv=Xt())}function Bt(t){_===null&&o===null&&pn(),o!==null&&o.f&y&&_===null&&vn(),$&&_n()}function Rn(t,n){var r=n.last;r===null?n.last=n.first=t:(r.next=t,t.prev=r,n.last=t)}function M(t,n,r,e=!0){var s=_,a={ctx:i,deps:null,nodes_start:null,nodes_end:null,f:t|S,first:null,fn:n,last:null,next:null,parent:s,prev:null,teardown:null,transitions:null,wv:0};if(r)try{ot(a),a.f|=fn}catch(c){throw R(a),c}else n!==null&&ft(a);var l=r&&a.deps===null&&a.first===null&&a.nodes_start===null&&a.teardown===null&&(a.f&(kt|Z))===0;if(!l&&e&&(s!==null&&Rn(a,s),o!==null&&o.f&g)){var u=o;(u.effects??(u.effects=[])).push(a)}return a}function $r(){return o!==null&&!E}function On(t){const n=M(et,null,!1);return b(n,d),n.teardown=t,n}function zr(t){Bt();var n=_!==null&&(_.f&x)!==0&&i!==null&&!i.m;if(n){var r=i;(r.e??(r.e=[])).push({fn:t,effect:_,reaction:o})}else{var e=jt(t);return e}}function Kr(t){return Bt(),Et(t)}function Zr(t){const n=M(D,t,!0);return()=>{R(n)}}function Wr(t){const n=M(D,t,!0);return(r={})=>new Promise(e=>{r.outro?Nn(n,()=>{R(n),e(void 0)}):(R(n),e(void 0))})}function jt(t){return M(St,t,!1)}function Xr(t,n){var r=i,e={effect:null,ran:!1};r.l.r1.push(e),e.effect=Et(()=>{t(),!e.ran&&(e.ran=!0,An(r.l.r2,!0),rn(n))})}function Jr(){var t=i;Et(()=>{if(nn(t.l.r2)){for(var n of t.l.r1){var r=n.effect;r.f&d&&b(r,N),H(r)&&ot(r),n.ran=!1}t.l.r2.v=!1}})}function Et(t){return M(et,t,!0)}function Qr(t,n=[],r=Lt){const e=n.map(r);return Cn(()=>t(...e.map(nn)))}function Cn(t,n=0){return M(et|dt|n,t,!0)}function te(t,n=!0){return M(et|x,t,!0,n)}function Ut(t){var n=t.teardown;if(n!==null){const r=$,e=o;xt(!0),Q(null);try{n.call(null)}finally{xt(r),Q(e)}}}function Vt(t,n=!1){var r=t.first;for(t.first=t.last=null;r!==null;){var e=r.next;r.f&D?r.parent=null:R(r,n),r=e}}function Dn(t){for(var n=t.first;n!==null;){var r=n.next;n.f&x||R(n),n=r}}function R(t,n=!0){var r=!1;if((n||t.f&cn)&&t.nodes_start!==null){for(var e=t.nodes_start,s=t.nodes_end;e!==null;){var a=e===s?null:P(e);e.remove(),e=a}r=!0}Vt(t,n&&!r),rt(t,0),b(t,st);var l=t.transitions;if(l!==null)for(const c of l)c.stop();Ut(t);var u=t.parent;u!==null&&u.first!==null&&Gt(t),t.next=t.prev=t.teardown=t.ctx=t.deps=t.fn=t.nodes_start=t.nodes_end=null}function Gt(t){var n=t.parent,r=t.prev,e=t.next;r!==null&&(r.next=e),e!==null&&(e.prev=r),n!==null&&(n.first===t&&(n.first=e),n.last===t&&(n.last=r))}function Nn(t,n){var r=[];$t(t,r,!0),Pn(r,()=>{R(t),n&&n()})}function Pn(t,n){var r=t.length;if(r>0){var e=()=>--r||n();for(var s of t)s.out(e)}else n()}function $t(t,n,r){if(!(t.f&Y)){if(t.f^=Y,t.transitions!==null)for(const l of t.transitions)(l.is_global||r)&&n.push(l);for(var e=t.first;e!==null;){var s=e.next,a=(e.f&It)!==0||(e.f&x)!==0;$t(e,n,a?r:!1),e=s}}}function ne(t){zt(t,!0)}function zt(t,n){if(t.f&Y){t.f^=Y,t.f&d||(t.f^=d),H(t)&&(b(t,S),ft(t));for(var r=t.first;r!==null;){var e=r.next,s=(r.f&It)!==0||(r.f&x)!==0;zt(r,s?n:!1),r=e}if(t.transitions!==null)for(const a of t.transitions)(a.is_global||n)&&a.in()}}const Mn=typeof requestIdleCallback>"u"?t=>setTimeout(t,1):requestIdleCallback;let V=[],G=[];function Kt(){var t=V;V=[],ht(t)}function Zt(){var t=G;G=[],ht(t)}function re(t){V.length===0&&queueMicrotask(Kt),V.push(t)}function ee(t){G.length===0&&Mn(Zt),G.push(t)}function At(){V.length>0&&Kt(),G.length>0&&Zt()}let K=!1,X=!1,J=null,O=!1,$=!1;function xt(t){$=t}let B=[];let o=null,E=!1;function Q(t){o=t}let _=null;function tt(t){_=t}let T=null;function Fn(t){T=t}let h=null,w=0,A=null;function qn(t){A=t}let Wt=1,nt=0,k=!1;function Xt(){return++Wt}function H(t){var v;var n=t.f;if(n&S)return!0;if(n&N){var r=t.deps,e=(n&y)!==0;if(r!==null){var s,a,l=(n&W)!==0,u=e&&_!==null&&!k,c=r.length;if(l||u){var f=t,I=f.parent;for(s=0;s<c;s++)a=r[s],(l||!((v=a==null?void 0:a.reactions)!=null&&v.includes(f)))&&(a.reactions??(a.reactions=[])).push(f);l&&(f.f^=W),u&&I!==null&&!(I.f&y)&&(f.f^=y)}for(s=0;s<c;s++)if(a=r[s],H(a)&&Ht(a),a.wv>t.wv)return!0}(!e||_!==null&&!k)&&b(t,d)}return!1}function Ln(t,n){for(var r=n;r!==null;){if(r.f&Z)try{r.fn(t);return}catch{r.f^=Z}r=r.parent}throw K=!1,t}function Yn(t){return(t.f&st)===0&&(t.parent===null||(t.parent.f&Z)===0)}function ut(t,n,r,e){if(K){if(r===null&&(K=!1),Yn(n))throw t;return}r!==null&&(K=!0);{Ln(t,n);return}}function Jt(t,n,r=!0){var e=t.reactions;if(e!==null)for(var s=0;s<e.length;s++){var a=e[s];a.f&g?Jt(a,n,!1):n===a&&(r?b(a,S):a.f&d&&b(a,N),ft(a))}}function Qt(t){var z;var n=h,r=w,e=A,s=o,a=k,l=T,u=i,c=E,f=t.f;h=null,w=0,A=null,k=(f&y)!==0&&(E||!O||o===null),o=f&(x|D)?null:t,T=null,bt(t.ctx),E=!1,nt++;try{var I=(0,t.fn)(),v=t.deps;if(h!==null){var p;if(rt(t,w),v!==null&&w>0)for(v.length=w+h.length,p=0;p<h.length;p++)v[w+p]=h[p];else t.deps=v=h;if(!k)for(p=w;p<v.length;p++)((z=v[p]).reactions??(z.reactions=[])).push(t)}else v!==null&&w<v.length&&(rt(t,w),v.length=w);if(at()&&A!==null&&!E&&v!==null&&!(t.f&(g|N|S)))for(p=0;p<A.length;p++)Jt(A[p],t);return s!==null&&nt++,I}finally{h=n,w=r,A=e,o=s,k=a,T=l,bt(u),E=c}}function Hn(t,n){let r=n.reactions;if(r!==null){var e=ln.call(r,t);if(e!==-1){var s=r.length-1;s===0?r=n.reactions=null:(r[e]=r[s],r.pop())}}r===null&&n.f&g&&(h===null||!h.includes(n))&&(b(n,N),n.f&(y|W)||(n.f^=W),Yt(n),rt(n,0))}function rt(t,n){var r=t.deps;if(r!==null)for(var e=n;e<r.length;e++)Hn(t,r[e])}function ot(t){var n=t.f;if(!(n&st)){b(t,d);var r=_,e=i,s=O;_=t,O=!0;try{n&dt?Dn(t):Vt(t),Ut(t);var a=Qt(t);t.teardown=typeof a=="function"?a:null,t.wv=Wt;var l=t.deps,u;yt&&an&&t.f&S}catch(c){ut(c,t,r,e||t.ctx)}finally{O=s,_=r}}}function Bn(){try{hn()}catch(t){if(J!==null)ut(t,J,null);else throw t}}function tn(){var t=O;try{var n=0;for(O=!0;B.length>0;){n++>1e3&&Bn();var r=B,e=r.length;B=[];for(var s=0;s<e;s++){var a=Un(r[s]);jn(a)}}}finally{X=!1,O=t,J=null,j.clear()}}function jn(t){var n=t.length;if(n!==0)for(var r=0;r<n;r++){var e=t[r];if(!(e.f&(st|Y)))try{H(e)&&(ot(e),e.deps===null&&e.first===null&&e.nodes_start===null&&(e.teardown===null?Gt(e):e.fn=null))}catch(s){ut(s,e,null,e.ctx)}}}function ft(t){X||(X=!0,queueMicrotask(tn));for(var n=J=t;n.parent!==null;){n=n.parent;var r=n.f;if(r&(D|x)){if(!(r&d))return;n.f^=d}}B.push(n)}function Un(t){for(var n=[],r=t;r!==null;){var e=r.f,s=(e&(x|D))!==0,a=s&&(e&d)!==0;if(!a&&!(e&Y)){if(e&St)n.push(r);else if(s)r.f^=d;else{var l=o;try{o=r,H(r)&&ot(r)}catch(f){ut(f,r,null,r.ctx)}finally{o=l}}var u=r.first;if(u!==null){r=u;continue}}var c=r.parent;for(r=r.next;r===null&&c!==null;)r=c.next,c=c.parent}return n}function Vn(t){var n;for(At();B.length>0;)X=!0,tn(),At();return n}async function se(){await Promise.resolve(),Vn()}function nn(t){var n=t.f,r=(n&g)!==0;if(o!==null&&!E){T!==null&&T.includes(t)&&dn();var e=o.deps;t.rv<nt&&(t.rv=nt,h===null&&e!==null&&e[w]===t?w++:h===null?h=[t]:(!k||!h.includes(t))&&h.push(t))}else if(r&&t.deps===null&&t.effects===null){var s=t,a=s.parent;a!==null&&!(a.f&y)&&(s.f^=y)}return r&&(s=t,H(s)&&Ht(s)),$&&j.has(t)?j.get(t):t.v}function rn(t){var n=E;try{return E=!0,t()}finally{E=n}}const Gn=-7169;function b(t,n){t.f=t.f&Gn|n}function ae(t){if(!(typeof t!="object"||!t||t instanceof EventTarget)){if(mt in t)vt(t);else if(!Array.isArray(t))for(let n in t){const r=t[n];typeof r=="object"&&r&&mt in r&&vt(r)}}}function vt(t,n=new Set){if(typeof t=="object"&&t!==null&&!(t instanceof EventTarget)&&!n.has(t)){n.add(t),t instanceof Date&&t.getTime();for(let e in t)try{vt(t[e],n)}catch{}const r=on(t);if(r!==Object.prototype&&r!==Array.prototype&&r!==Map.prototype&&r!==Set.prototype&&r!==Date.prototype){const e=un(r);for(let s in e){const a=e[s].get;if(a)try{a.call(t)}catch{}}}}}function en(t,n,r){if(t==null)return n(void 0),r&&r(void 0),L;const e=rn(()=>t.subscribe(n,r));return e.unsubscribe?()=>e.unsubscribe():e}const q=[];function $n(t,n){return{subscribe:zn(t,n).subscribe}}function zn(t,n=L){let r=null;const e=new Set;function s(u){if(Ot(t,u)&&(t=u,r)){const c=!q.length;for(const f of e)f[1](),q.push(f,t);if(c){for(let f=0;f<q.length;f+=2)q[f][0](q[f+1]);q.length=0}}}function a(u){s(u(t))}function l(u,c=L){const f=[u,c];return e.add(f),e.size===1&&(r=n(s,a)||L),u(t),()=>{e.delete(f),e.size===0&&r&&(r(),r=null)}}return{set:s,update:a,subscribe:l}}function le(t,n,r){const e=!Array.isArray(t),s=e?[t]:t;if(!s.every(Boolean))throw new Error("derived() expects stores as input, got a falsy value");const a=n.length<2;return $n(r,(l,u)=>{let c=!1;const f=[];let I=0,v=L;const p=()=>{if(I)return;v();const F=n(e?f[0]:f,l,u);a?l(F):v=typeof F=="function"?F:L},z=s.map((F,it)=>en(F,sn=>{f[it]=sn,I&=~(1<<it),c&&p()},()=>{I|=1<<it}));return c=!0,p(),function(){ht(z),v(),c=!1}})}function ue(t){return{subscribe:t.subscribe.bind(t)}}function oe(t){let n;return en(t,r=>n=r)(),n}export{Tt as $,Mr as A,ne as B,te as C,Nn as D,It as E,m as F,Tn as G,En as H,en as I,An as J,On as K,Xn as L,ct as M,_t as N,Sn as O,_ as P,Tr as Q,cn as R,P as S,br as T,Ar as U,Hr as V,Dt as W,gn as X,Nt as Y,ur as Z,Vr as _,Dr as a,fn as a$,Wn as a0,Wr as a1,re as a2,Q as a3,tt as a4,o as a5,Zn as a6,Nr as a7,mt as a8,Jn as a9,kr as aA,yt as aB,Xr as aC,Pr as aD,Jr as aE,Rr as aF,mn as aG,at as aH,nr as aI,xn as aJ,bt as aK,lr as aL,Ot as aM,Y as aN,_r as aO,$t as aP,Pn as aQ,cr as aR,hr as aS,vr as aT,pr as aU,Sr as aV,ar as aW,xr as aX,ee as aY,un as aZ,dt as a_,Qn as aa,wt as ab,ir as ac,gt as ad,fr as ae,on as af,jt as ag,Et as ah,or as ai,er as aj,Gr as ak,Er as al,Ct as am,yr as an,sr as ao,wr as ap,dr as aq,gr as ar,tr as as,R as at,le as au,Vn as av,se as aw,Lr as ax,Ir as ay,$n as az,i as b,mr as b0,$r as b1,Or as b2,Zr as b3,Br as c,Lt as d,Kr as e,jr as f,nn as g,ht as h,rn as i,rr as j,ae as k,oe as l,ue as m,L as n,Cn as o,Cr as p,C as q,qr as r,Ur as s,Qr as t,zr as u,Fr as v,zn as w,yn as x,Yr as y,U as z};
@@ -1,4 +0,0 @@
1
- var k=Object.defineProperty;var w=t=>{throw TypeError(t)};var V=(t,r,e)=>r in t?k(t,r,{enumerable:!0,configurable:!0,writable:!0,value:e}):t[r]=e;var v=(t,r,e)=>V(t,typeof r!="symbol"?r+"":r,e),B=(t,r,e)=>r.has(t)||w("Cannot "+e);var R=(t,r,e)=>(B(t,r,"read from private field"),e?e.call(t):r.get(t)),x=(t,r,e)=>r.has(t)?w("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(t):r.set(t,e);import"./CWj6FrbW.js";import{d as j,g as h,p as O,f as _,a as F,c as E,n as H,r as M,t as U}from"./CH6P3X75.js";import{c as A,a as u,t as q}from"./RmD8FzRo.js";import{p as c,r as P,c as C,s as G}from"./DQXoLcsF.js";import{u as J,g as K,d as L,e as Q,f as W,h as d,s as X,m as Y,c as Z}from"./DQe_kdRt.js";import{i as $}from"./DA6bFLPR.js";import{s as I}from"./CCx7Ho51.js";const tt="data-separator-root";var g;class rt{constructor(r){v(this,"opts");x(this,g,j(()=>({id:this.opts.id.current,role:this.opts.decorative.current?"none":"separator","aria-orientation":Q(this.opts.orientation.current),"aria-hidden":L(this.opts.decorative.current),"data-orientation":K(this.opts.orientation.current),[tt]:""})));this.opts=r,J(r)}get props(){return h(R(this,g))}}g=new WeakMap;function et(t){return new rt(t)}var ot=q("<div><!></div>");function nt(t,r){O(r,!0);let e=c(r,"id",19,W),s=c(r,"ref",15,null),n=c(r,"decorative",3,!1),o=c(r,"orientation",3,"horizontal"),b=P(r,["$$slots","$$events","$$legacy","id","ref","child","children","decorative","orientation"]);const y=et({ref:d.with(()=>s(),i=>s(i)),id:d.with(()=>e()),decorative:d.with(()=>n()),orientation:d.with(()=>o())}),f=j(()=>Y(b,y.props));var m=A(),S=_(m);{var z=i=>{var a=A(),p=_(a);I(p,()=>r.child,()=>({props:h(f)})),u(i,a)},D=i=>{var a=ot();let p;var N=E(a);I(N,()=>r.children??H),M(a),U(()=>p=X(a,p,{...h(f)})),u(i,a)};$(S,i=>{r.child?i(z):i(D,!1)})}u(t,m),F()}const T="en-US",it=t=>new Intl.NumberFormat(T,{}).format(t).toString(),at=(t,r=3,e=0)=>new Intl.NumberFormat(T,{maximumFractionDigits:r,minimumFractionDigits:e}).format(t).toString(),l=t=>{if(t==null)return"null";if(typeof t=="string")return t;if(typeof t=="number")return Number.isInteger(t)?it(t):at(t);if(typeof t=="boolean")return t?"true":"false";if(Array.isArray(t))return t.length===0?"[]":t.length<=3&&t.every(r=>typeof r!="object"||r===null)?`[${t.map(r=>l(r)).join(", ")}]`:`[${t.map(e=>l(e)).join(", ")}]`;if(typeof t=="object"&&t!==null&&!Array.isArray(t)){const r=t,e=Object.keys(r);return e.length===0?"{}":e.length<=3&&e.every(n=>{const o=r[n];return typeof o!="object"||o===null||Array.isArray(o)})?`{${e.map(o=>`${o}: ${l(r[o])}`).join(", ")}}`:`{
2
- ${e.map(n=>{const o=l(r[n]);return`${n}: ${o}`}).join(`
3
- `)}
4
- }`}return String(t)};function ht(t,r){O(r,!0);let e=c(r,"ref",15,null),s=c(r,"orientation",3,"horizontal"),n=P(r,["$$slots","$$events","$$legacy","ref","class","orientation"]);var o=A(),b=_(o);const y=j(()=>Z("bg-border shrink-0",s()==="horizontal"?"h-[1px] w-full":"min-h-full w-[1px]",r.class));C(b,()=>nt,(f,m)=>{m(f,G({get class(){return h(y)},get orientation(){return s()}},()=>n,{get ref(){return e()},set ref(S){e(S)}}))}),u(t,o),F()}export{ht as S,l as a,at as b,it as f};
@@ -1 +0,0 @@
1
- var xt=e=>{throw TypeError(e)};var pt=(e,t,s)=>t.has(e)||xt("Cannot "+s);var n=(e,t,s)=>(pt(e,t,"read from private field"),s?s.call(e):t.get(e)),f=(e,t,s)=>t.has(e)?xt("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,s),u=(e,t,s,r)=>(pt(e,t,"write to private field"),r?r.call(e,s):t.set(e,s),s),p=(e,t,s)=>(pt(e,t,"access private method"),s);import{ay as Vt,az as vt,aA as ae,au as bt,l as oe}from"./CH6P3X75.js";import{d as ue,e as he,g as ce,f as le,h as de,i as fe,j as ye,u as pe,k as be,c as me,l as ve,m as we}from"./CxFKfZ9T.js";var Mt=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(e){return this.listeners.add(e),this.onSubscribe(),()=>{this.listeners.delete(e),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},it=typeof window>"u"||"Deno"in globalThis;function wt(){}function Ye(e,t){return typeof e=="function"?e(t):e}function Ot(e){return typeof e=="number"&&e>=0&&e!==1/0}function Jt(e,t){return Math.max(e+(t||0)-Date.now(),0)}function ft(e,t){return typeof e=="function"?e(t):e}function D(e,t){return typeof e=="function"?e(t):e}function Ze(e,t){const{type:s="all",exact:r,fetchStatus:i,predicate:h,queryKey:c,stale:o}=e;if(c){if(r){if(t.queryHash!==Oe(c,t.options))return!1}else if(!jt(t.queryKey,c))return!1}if(s!=="all"){const v=t.isActive();if(s==="active"&&!v||s==="inactive"&&v)return!1}return!(typeof o=="boolean"&&t.isStale()!==o||i&&i!==t.state.fetchStatus||h&&!h(t))}function ts(e,t){const{exact:s,status:r,predicate:i,mutationKey:h}=e;if(h){if(!t.options.mutationKey)return!1;if(s){if(gt(t.options.mutationKey)!==gt(h))return!1}else if(!jt(t.options.mutationKey,h))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function Oe(e,t){return((t==null?void 0:t.queryKeyHashFn)||gt)(e)}function gt(e){return JSON.stringify(e,(t,s)=>Ct(s)?Object.keys(s).sort().reduce((r,i)=>(r[i]=s[i],r),{}):s)}function jt(e,t){return e===t?!0:typeof e!=typeof t?!1:e&&t&&typeof e=="object"&&typeof t=="object"?!Object.keys(t).some(s=>!jt(e[s],t[s])):!1}function Xt(e,t){if(e===t)return e;const s=kt(e)&&kt(t);if(s||Ct(e)&&Ct(t)){const r=s?e:Object.keys(e),i=r.length,h=s?t:Object.keys(t),c=h.length,o=s?[]:{};let v=0;for(let g=0;g<c;g++){const d=s?g:h[g];(!s&&r.includes(d)||s)&&e[d]===void 0&&t[d]===void 0?(o[d]=void 0,v++):(o[d]=Xt(e[d],t[d]),o[d]===e[d]&&e[d]!==void 0&&v++)}return i===c&&v===i?e:o}return t}function St(e,t){if(!t||Object.keys(e).length!==Object.keys(t).length)return!1;for(const s in e)if(e[s]!==t[s])return!1;return!0}function kt(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function Ct(e){if(!_t(e))return!1;const t=e.constructor;if(t===void 0)return!0;const s=t.prototype;return!(!_t(s)||!s.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(e)!==Object.prototype)}function _t(e){return Object.prototype.toString.call(e)==="[object Object]"}function ge(e){return new Promise(t=>{setTimeout(t,e)})}function Rt(e,t,s){return typeof s.structuralSharing=="function"?s.structuralSharing(e,t):s.structuralSharing!==!1?Xt(e,t):t}function es(e,t,s=0){const r=[...e,t];return s&&r.length>s?r.slice(1):r}function ss(e,t,s=0){const r=[t,...e];return s&&r.length>s?r.slice(0,-1):r}var Yt=Symbol();function Se(e,t){return!e.queryFn&&(t!=null&&t.initialPromise)?()=>t.initialPromise:!e.queryFn||e.queryFn===Yt?()=>Promise.reject(new Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}var k,j,J,zt,Ce=(zt=class extends Mt{constructor(){super();f(this,k);f(this,j);f(this,J);u(this,J,t=>{if(!it&&window.addEventListener){const s=()=>t();return window.addEventListener("visibilitychange",s,!1),()=>{window.removeEventListener("visibilitychange",s)}}})}onSubscribe(){n(this,j)||this.setEventListener(n(this,J))}onUnsubscribe(){var t;this.hasListeners()||((t=n(this,j))==null||t.call(this),u(this,j,void 0))}setEventListener(t){var s;u(this,J,t),(s=n(this,j))==null||s.call(this),u(this,j,t(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(t){n(this,k)!==t&&(u(this,k,t),this.onFocus())}onFocus(){const t=this.isFocused();this.listeners.forEach(s=>{s(t)})}isFocused(){var t;return typeof n(this,k)=="boolean"?n(this,k):((t=globalThis.document)==null?void 0:t.visibilityState)!=="hidden"}},k=new WeakMap,j=new WeakMap,J=new WeakMap,zt),Zt=new Ce,X,L,Y,Ht,Re=(Ht=class extends Mt{constructor(){super();f(this,X,!0);f(this,L);f(this,Y);u(this,Y,t=>{if(!it&&window.addEventListener){const s=()=>t(!0),r=()=>t(!1);return window.addEventListener("online",s,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",s),window.removeEventListener("offline",r)}}})}onSubscribe(){n(this,L)||this.setEventListener(n(this,Y))}onUnsubscribe(){var t;this.hasListeners()||((t=n(this,L))==null||t.call(this),u(this,L,void 0))}setEventListener(t){var s;u(this,Y,t),(s=n(this,L))==null||s.call(this),u(this,L,t(this.setOnline.bind(this)))}setOnline(t){n(this,X)!==t&&(u(this,X,t),this.listeners.forEach(r=>{r(t)}))}isOnline(){return n(this,X)}},X=new WeakMap,L=new WeakMap,Y=new WeakMap,Ht),te=new Re;function Ft(){let e,t;const s=new Promise((i,h)=>{e=i,t=h});s.status="pending",s.catch(()=>{});function r(i){Object.assign(s,i),delete s.resolve,delete s.reject}return s.resolve=i=>{r({status:"fulfilled",value:i}),e(i)},s.reject=i=>{r({status:"rejected",reason:i}),t(i)},s}function Fe(e){return Math.min(1e3*2**e,3e4)}function ee(e){return(e??"online")==="online"?te.isOnline():!0}var se=class extends Error{constructor(e){super("CancelledError"),this.revert=e==null?void 0:e.revert,this.silent=e==null?void 0:e.silent}};function mt(e){return e instanceof se}function Ee(e){let t=!1,s=0,r=!1,i;const h=Ft(),c=m=>{var w;r||(b(new se(m)),(w=e.abort)==null||w.call(e))},o=()=>{t=!0},v=()=>{t=!1},g=()=>Zt.isFocused()&&(e.networkMode==="always"||te.isOnline())&&e.canRun(),d=()=>ee(e.networkMode)&&e.canRun(),a=m=>{var w;r||(r=!0,(w=e.onSuccess)==null||w.call(e,m),i==null||i(),h.resolve(m))},b=m=>{var w;r||(r=!0,(w=e.onError)==null||w.call(e,m),i==null||i(),h.reject(m))},O=()=>new Promise(m=>{var w;i=E=>{(r||g())&&m(E)},(w=e.onPause)==null||w.call(e)}).then(()=>{var m;i=void 0,r||(m=e.onContinue)==null||m.call(e)}),A=()=>{if(r)return;let m;const w=s===0?e.initialPromise:void 0;try{m=w??e.fn()}catch(E){m=Promise.reject(E)}Promise.resolve(m).then(a).catch(E=>{var yt;if(r)return;const T=e.retry??(it?0:3),x=e.retryDelay??Fe,ct=typeof x=="function"?x(s,E):x,lt=T===!0||typeof T=="number"&&s<T||typeof T=="function"&&T(s,E);if(t||!lt){b(E);return}s++,(yt=e.onFail)==null||yt.call(e,s,E),ge(ct).then(()=>g()?void 0:O()).then(()=>{t?b(E):A()})})};return{promise:h,cancel:c,continue:()=>(i==null||i(),h),cancelRetry:o,continueRetry:v,canStart:d,start:()=>(d()?A():O().then(A),h)}}function Ae(){let e=[],t=0,s=o=>{o()},r=o=>{o()},i=o=>setTimeout(o,0);const h=o=>{t?e.push(o):i(()=>{s(o)})},c=()=>{const o=e;e=[],o.length&&i(()=>{r(()=>{o.forEach(v=>{s(v)})})})};return{batch:o=>{let v;t++;try{v=o()}finally{t--,t||c()}return v},batchCalls:o=>(...v)=>{h(()=>{o(...v)})},schedule:h,setNotifyFunction:o=>{s=o},setBatchNotifyFunction:o=>{r=o},setScheduler:o=>{i=o}}}var Lt=Ae(),_,Nt,Ie=(Nt=class{constructor(){f(this,_)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),Ot(this.gcTime)&&u(this,_,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(it?1/0:5*60*1e3))}clearGcTimeout(){n(this,_)&&(clearTimeout(n(this,_)),u(this,_,void 0))}},_=new WeakMap,Nt),Z,tt,I,G,S,ot,B,U,M,Wt,rs=(Wt=class extends Ie{constructor(t){super();f(this,U);f(this,Z);f(this,tt);f(this,I);f(this,G);f(this,S);f(this,ot);f(this,B);u(this,B,!1),u(this,ot,t.defaultOptions),this.setOptions(t.options),this.observers=[],u(this,G,t.client),u(this,I,n(this,G).getQueryCache()),this.queryKey=t.queryKey,this.queryHash=t.queryHash,u(this,Z,Ue(this.options)),this.state=t.state??n(this,Z),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var t;return(t=n(this,S))==null?void 0:t.promise}setOptions(t){this.options={...n(this,ot),...t},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&n(this,I).remove(this)}setData(t,s){const r=Rt(this.state.data,t,this.options);return p(this,U,M).call(this,{data:r,type:"success",dataUpdatedAt:s==null?void 0:s.updatedAt,manual:s==null?void 0:s.manual}),r}setState(t,s){p(this,U,M).call(this,{type:"setState",state:t,setStateOptions:s})}cancel(t){var r,i;const s=(r=n(this,S))==null?void 0:r.promise;return(i=n(this,S))==null||i.cancel(t),s?s.then(wt).catch(wt):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(n(this,Z))}isActive(){return this.observers.some(t=>D(t.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===Yt||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStale(){return this.state.isInvalidated?!0:this.getObserversCount()>0?this.observers.some(t=>t.getCurrentResult().isStale):this.state.data===void 0}isStaleByTime(t=0){return this.state.isInvalidated||this.state.data===void 0||!Jt(this.state.dataUpdatedAt,t)}onFocus(){var s;const t=this.observers.find(r=>r.shouldFetchOnWindowFocus());t==null||t.refetch({cancelRefetch:!1}),(s=n(this,S))==null||s.continue()}onOnline(){var s;const t=this.observers.find(r=>r.shouldFetchOnReconnect());t==null||t.refetch({cancelRefetch:!1}),(s=n(this,S))==null||s.continue()}addObserver(t){this.observers.includes(t)||(this.observers.push(t),this.clearGcTimeout(),n(this,I).notify({type:"observerAdded",query:this,observer:t}))}removeObserver(t){this.observers.includes(t)&&(this.observers=this.observers.filter(s=>s!==t),this.observers.length||(n(this,S)&&(n(this,B)?n(this,S).cancel({revert:!0}):n(this,S).cancelRetry()),this.scheduleGc()),n(this,I).notify({type:"observerRemoved",query:this,observer:t}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||p(this,U,M).call(this,{type:"invalidate"})}fetch(t,s){var v,g,d;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(s!=null&&s.cancelRefetch))this.cancel({silent:!0});else if(n(this,S))return n(this,S).continueRetry(),n(this,S).promise}if(t&&this.setOptions(t),!this.options.queryFn){const a=this.observers.find(b=>b.options.queryFn);a&&this.setOptions(a.options)}const r=new AbortController,i=a=>{Object.defineProperty(a,"signal",{enumerable:!0,get:()=>(u(this,B,!0),r.signal)})},h=()=>{const a=Se(this.options,s),b={client:n(this,G),queryKey:this.queryKey,meta:this.meta};return i(b),u(this,B,!1),this.options.persister?this.options.persister(a,b,this):a(b)},c={fetchOptions:s,options:this.options,queryKey:this.queryKey,client:n(this,G),state:this.state,fetchFn:h};i(c),(v=this.options.behavior)==null||v.onFetch(c,this),u(this,tt,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((g=c.fetchOptions)==null?void 0:g.meta))&&p(this,U,M).call(this,{type:"fetch",meta:(d=c.fetchOptions)==null?void 0:d.meta});const o=a=>{var b,O,A,m;mt(a)&&a.silent||p(this,U,M).call(this,{type:"error",error:a}),mt(a)||((O=(b=n(this,I).config).onError)==null||O.call(b,a,this),(m=(A=n(this,I).config).onSettled)==null||m.call(A,this.state.data,a,this)),this.scheduleGc()};return u(this,S,Ee({initialPromise:s==null?void 0:s.initialPromise,fn:c.fetchFn,abort:r.abort.bind(r),onSuccess:a=>{var b,O,A,m;if(a===void 0){o(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(a)}catch(w){o(w);return}(O=(b=n(this,I).config).onSuccess)==null||O.call(b,a,this),(m=(A=n(this,I).config).onSettled)==null||m.call(A,a,this.state.error,this),this.scheduleGc()},onError:o,onFail:(a,b)=>{p(this,U,M).call(this,{type:"failed",failureCount:a,error:b})},onPause:()=>{p(this,U,M).call(this,{type:"pause"})},onContinue:()=>{p(this,U,M).call(this,{type:"continue"})},retry:c.options.retry,retryDelay:c.options.retryDelay,networkMode:c.options.networkMode,canRun:()=>!0})),n(this,S).start()}},Z=new WeakMap,tt=new WeakMap,I=new WeakMap,G=new WeakMap,S=new WeakMap,ot=new WeakMap,B=new WeakMap,U=new WeakSet,M=function(t){const s=r=>{switch(t.type){case"failed":return{...r,fetchFailureCount:t.failureCount,fetchFailureReason:t.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...re(r.data,this.options),fetchMeta:t.meta??null};case"success":return{...r,data:t.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:t.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!t.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const i=t.error;return mt(i)&&i.revert&&n(this,tt)?{...n(this,tt),fetchStatus:"idle"}:{...r,error:i,errorUpdateCount:r.errorUpdateCount+1,errorUpdatedAt:Date.now(),fetchFailureCount:r.fetchFailureCount+1,fetchFailureReason:i,fetchStatus:"idle",status:"error"};case"invalidate":return{...r,isInvalidated:!0};case"setState":return{...r,...t.state}}};this.state=s(this.state),Lt.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),n(this,I).notify({query:this,type:"updated",action:t})})},Wt);function re(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:ee(t.networkMode)?"fetching":"paused",...e===void 0&&{error:null,status:"pending"}}}function Ue(e){const t=typeof e.initialData=="function"?e.initialData():e.initialData,s=t!==void 0,r=s?typeof e.initialDataUpdatedAt=="function"?e.initialDataUpdatedAt():e.initialDataUpdatedAt:0;return{data:t,dataUpdateCount:0,dataUpdatedAt:s?r??Date.now():0,error:null,errorUpdateCount:0,errorUpdatedAt:0,fetchFailureCount:0,fetchFailureReason:null,fetchMeta:null,isInvalidated:!1,status:s?"success":"pending",fetchStatus:"idle"}}var F,l,ut,R,z,et,P,Q,ht,st,rt,H,N,K,nt,y,at,Et,At,It,Ut,Dt,qt,Qt,ne,$t,De=($t=class extends Mt{constructor(t,s){super();f(this,y);f(this,F);f(this,l);f(this,ut);f(this,R);f(this,z);f(this,et);f(this,P);f(this,Q);f(this,ht);f(this,st);f(this,rt);f(this,H);f(this,N);f(this,K);f(this,nt,new Set);this.options=s,u(this,F,t),u(this,Q,null),u(this,P,Ft()),this.options.experimental_prefetchInRender||n(this,P).reject(new Error("experimental_prefetchInRender feature flag is not enabled")),this.bindMethods(),this.setOptions(s)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(n(this,l).addObserver(this),Gt(n(this,l),this.options)?p(this,y,at).call(this):this.updateResult(),p(this,y,Ut).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Tt(n(this,l),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Tt(n(this,l),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,p(this,y,Dt).call(this),p(this,y,qt).call(this),n(this,l).removeObserver(this)}setOptions(t,s){const r=this.options,i=n(this,l);if(this.options=n(this,F).defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof D(this.options.enabled,n(this,l))!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");p(this,y,Qt).call(this),n(this,l).setOptions(this.options),r._defaulted&&!St(this.options,r)&&n(this,F).getQueryCache().notify({type:"observerOptionsUpdated",query:n(this,l),observer:this});const h=this.hasListeners();h&&Bt(n(this,l),i,this.options,r)&&p(this,y,at).call(this),this.updateResult(s),h&&(n(this,l)!==i||D(this.options.enabled,n(this,l))!==D(r.enabled,n(this,l))||ft(this.options.staleTime,n(this,l))!==ft(r.staleTime,n(this,l)))&&p(this,y,Et).call(this);const c=p(this,y,At).call(this);h&&(n(this,l)!==i||D(this.options.enabled,n(this,l))!==D(r.enabled,n(this,l))||c!==n(this,K))&&p(this,y,It).call(this,c)}getOptimisticResult(t){const s=n(this,F).getQueryCache().build(n(this,F),t),r=this.createResult(s,t);return Qe(this,r)&&(u(this,R,r),u(this,et,this.options),u(this,z,n(this,l).state)),r}getCurrentResult(){return n(this,R)}trackResult(t,s){const r={};return Object.keys(t).forEach(i=>{Object.defineProperty(r,i,{configurable:!1,enumerable:!0,get:()=>(this.trackProp(i),s==null||s(i),t[i])})}),r}trackProp(t){n(this,nt).add(t)}getCurrentQuery(){return n(this,l)}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const s=n(this,F).defaultQueryOptions(t),r=n(this,F).getQueryCache().build(n(this,F),s);return r.fetch().then(()=>this.createResult(r,s))}fetch(t){return p(this,y,at).call(this,{...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),n(this,R)))}createResult(t,s){var Kt;const r=n(this,l),i=this.options,h=n(this,R),c=n(this,z),o=n(this,et),g=t!==r?t.state:n(this,ut),{state:d}=t;let a={...d},b=!1,O;if(s._optimisticResults){const C=this.hasListeners(),$=!C&&Gt(t,s),V=C&&Bt(t,r,s,i);($||V)&&(a={...a,...re(d.data,t.options)}),s._optimisticResults==="isRestoring"&&(a.fetchStatus="idle")}let{error:A,errorUpdatedAt:m,status:w}=a;if(s.select&&a.data!==void 0)if(h&&a.data===(c==null?void 0:c.data)&&s.select===n(this,ht))O=n(this,st);else try{u(this,ht,s.select),O=s.select(a.data),O=Rt(h==null?void 0:h.data,O,s),u(this,st,O),u(this,Q,null)}catch(C){u(this,Q,C)}else O=a.data;if(s.placeholderData!==void 0&&O===void 0&&w==="pending"){let C;if(h!=null&&h.isPlaceholderData&&s.placeholderData===(o==null?void 0:o.placeholderData))C=h.data;else if(C=typeof s.placeholderData=="function"?s.placeholderData((Kt=n(this,rt))==null?void 0:Kt.state.data,n(this,rt)):s.placeholderData,s.select&&C!==void 0)try{C=s.select(C),u(this,Q,null)}catch($){u(this,Q,$)}C!==void 0&&(w="success",O=Rt(h==null?void 0:h.data,C,s),b=!0)}n(this,Q)&&(A=n(this,Q),O=n(this,st),m=Date.now(),w="error");const E=a.fetchStatus==="fetching",T=w==="pending",x=w==="error",ct=T&&E,lt=O!==void 0,q={status:w,fetchStatus:a.fetchStatus,isPending:T,isSuccess:w==="success",isError:x,isInitialLoading:ct,isLoading:ct,data:O,dataUpdatedAt:a.dataUpdatedAt,error:A,errorUpdatedAt:m,failureCount:a.fetchFailureCount,failureReason:a.fetchFailureReason,errorUpdateCount:a.errorUpdateCount,isFetched:a.dataUpdateCount>0||a.errorUpdateCount>0,isFetchedAfterMount:a.dataUpdateCount>g.dataUpdateCount||a.errorUpdateCount>g.errorUpdateCount,isFetching:E,isRefetching:E&&!T,isLoadingError:x&&!lt,isPaused:a.fetchStatus==="paused",isPlaceholderData:b,isRefetchError:x&&lt,isStale:Pt(t,s),refetch:this.refetch,promise:n(this,P)};if(this.options.experimental_prefetchInRender){const C=dt=>{q.status==="error"?dt.reject(q.error):q.data!==void 0&&dt.resolve(q.data)},$=()=>{const dt=u(this,P,q.promise=Ft());C(dt)},V=n(this,P);switch(V.status){case"pending":t.queryHash===r.queryHash&&C(V);break;case"fulfilled":(q.status==="error"||q.data!==V.value)&&$();break;case"rejected":(q.status!=="error"||q.error!==V.reason)&&$();break}}return q}updateResult(t){const s=n(this,R),r=this.createResult(n(this,l),this.options);if(u(this,z,n(this,l).state),u(this,et,this.options),n(this,z).data!==void 0&&u(this,rt,n(this,l)),St(r,s))return;u(this,R,r);const i={},h=()=>{if(!s)return!0;const{notifyOnChangeProps:c}=this.options,o=typeof c=="function"?c():c;if(o==="all"||!o&&!n(this,nt).size)return!0;const v=new Set(o??n(this,nt));return this.options.throwOnError&&v.add("error"),Object.keys(n(this,R)).some(g=>{const d=g;return n(this,R)[d]!==s[d]&&v.has(d)})};(t==null?void 0:t.listeners)!==!1&&h()&&(i.listeners=!0),p(this,y,ne).call(this,{...i,...t})}onQueryUpdate(){this.updateResult(),this.hasListeners()&&p(this,y,Ut).call(this)}},F=new WeakMap,l=new WeakMap,ut=new WeakMap,R=new WeakMap,z=new WeakMap,et=new WeakMap,P=new WeakMap,Q=new WeakMap,ht=new WeakMap,st=new WeakMap,rt=new WeakMap,H=new WeakMap,N=new WeakMap,K=new WeakMap,nt=new WeakMap,y=new WeakSet,at=function(t){p(this,y,Qt).call(this);let s=n(this,l).fetch(this.options,t);return t!=null&&t.throwOnError||(s=s.catch(wt)),s},Et=function(){p(this,y,Dt).call(this);const t=ft(this.options.staleTime,n(this,l));if(it||n(this,R).isStale||!Ot(t))return;const r=Jt(n(this,R).dataUpdatedAt,t)+1;u(this,H,setTimeout(()=>{n(this,R).isStale||this.updateResult()},r))},At=function(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(n(this,l)):this.options.refetchInterval)??!1},It=function(t){p(this,y,qt).call(this),u(this,K,t),!(it||D(this.options.enabled,n(this,l))===!1||!Ot(n(this,K))||n(this,K)===0)&&u(this,N,setInterval(()=>{(this.options.refetchIntervalInBackground||Zt.isFocused())&&p(this,y,at).call(this)},n(this,K)))},Ut=function(){p(this,y,Et).call(this),p(this,y,It).call(this,p(this,y,At).call(this))},Dt=function(){n(this,H)&&(clearTimeout(n(this,H)),u(this,H,void 0))},qt=function(){n(this,N)&&(clearInterval(n(this,N)),u(this,N,void 0))},Qt=function(){const t=n(this,F).getQueryCache().build(n(this,F),this.options);if(t===n(this,l))return;const s=n(this,l);u(this,l,t),u(this,ut,t.state),this.hasListeners()&&(s==null||s.removeObserver(this),t.addObserver(this))},ne=function(t){Lt.batch(()=>{t.listeners&&this.listeners.forEach(s=>{s(n(this,R))}),n(this,F).getQueryCache().notify({query:n(this,l),type:"observerResultsUpdated"})})},$t);function qe(e,t){return D(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status==="error"&&t.retryOnMount===!1)}function Gt(e,t){return qe(e,t)||e.state.data!==void 0&&Tt(e,t,t.refetchOnMount)}function Tt(e,t,s){if(D(t.enabled,e)!==!1){const r=typeof s=="function"?s(e):s;return r==="always"||r!==!1&&Pt(e,t)}return!1}function Bt(e,t,s,r){return(e!==t||D(r.enabled,e)===!1)&&(!s.suspense||e.state.status!=="error")&&Pt(e,s)}function Pt(e,t){return D(t.enabled,e)!==!1&&e.isStaleByTime(ft(t.staleTime,e))}function Qe(e,t){return!St(e.getCurrentResult(),t)}const ie="$$_queryClient",Te=()=>{const e=Vt(ie);if(!e)throw new Error("No QueryClient was found in Svelte context. Did you forget to wrap your component with QueryClientProvider?");return e},ns=e=>{ae(ie,e)},Me="$$_isRestoring",je=()=>{try{const e=Vt(Me);return e||vt(!1)}catch{return vt(!1)}};function Le(){return je()}function Pe(e){return Te()}function Ke(e){return"subscribe"in e&&typeof e.subscribe=="function"}function xe(){}function ke(e,t,s){const r=Pe(),i=Le(),h=Ke(e)?e:vt(e),c=bt([h,i],([d,a])=>{const b=r.defaultQueryOptions(d);return b._optimisticResults=a?"isRestoring":"optimistic",b}),o=new t(r,oe(c));c.subscribe(d=>{o.setOptions(d,{listeners:!1})});const v=bt(i,(d,a)=>{const b=d?xe:o.subscribe(Lt.batchCalls(a));return o.updateResult(),b}),{subscribe:g}=bt([v,c],([d,a])=>(d=o.getOptimisticResult(a),a.notifyOnChangeProps?d:o.trackResult(d)));return{subscribe:g}}function is(e,t){return ke(e,De)}function as(e){return e}const W=(e,t,s)=>{const r={_id:e,baseUrl:(t==null?void 0:t.baseUrl)||((t==null?void 0:t.client)??ue).getConfig().baseUrl};return s&&(r._infinite=s),t!=null&&t.body&&(r.body=t.body),t!=null&&t.headers&&(r.headers=t.headers),t!=null&&t.path&&(r.path=t.path),t!=null&&t.query&&(r.query=t.query),[r]},_e=(e,t)=>{const s={...e[0]};return t.body&&(s.body={...e[0].body,...t.body}),t.headers&&(s.headers={...e[0].headers,...t.headers}),t.path&&(s.path={...e[0].path,...t.path}),t.query&&(s.query={...e[0].query,...t.query}),s},Ge=e=>W("readSample",e),os=e=>({queryFn:async({queryKey:t,signal:s})=>{const{data:r}=await fe({...e,...t[0],signal:s,throwOnError:!0});return r},queryKey:Ge(e)}),Be=e=>W("readAnnotationLabels",e),us=e=>({queryFn:async({queryKey:t,signal:s})=>{const{data:r}=await ye({...e,...t[0],signal:s,throwOnError:!0});return r},queryKey:Be(e)}),hs=e=>({mutationFn:async s=>{const{data:r}=await de({...e,...s,throwOnError:!0});return r}}),ze=e=>W("readAnnotations",e,!0),cs=e=>({queryFn:async({pageParam:t,queryKey:s,signal:r})=>{const h=_e(s,typeof t=="object"?t:{query:{cursor:t}}),{data:c}=await me({...e,...h,signal:r,throwOnError:!0});return c},queryKey:ze(e)}),ls=e=>({mutationFn:async s=>{const{data:r}=await le({...e,...s,throwOnError:!0});return r}}),ds=e=>({mutationFn:async s=>{const{data:r}=await pe({...e,...s,throwOnError:!0});return r}}),He=e=>W("countAnnotationsByDataset",e),fs=e=>({queryFn:async({queryKey:t,signal:s})=>{const{data:r}=await be({...e,...t[0],signal:s,throwOnError:!0});return r},queryKey:He(e)}),ys=e=>({mutationFn:async s=>{const{data:r}=await he({...e,...s,throwOnError:!0});return r}}),Ne=e=>W("getAnnotation",e),ps=e=>({queryFn:async({queryKey:t,signal:s})=>{const{data:r}=await ve({...e,...t[0],signal:s,throwOnError:!0});return r},queryKey:Ne(e)}),We=e=>W("getEmbeddings2dTsne",e),bs=e=>({queryFn:async({queryKey:t,signal:s})=>{const{data:r}=await we({...e,...t[0],signal:s,throwOnError:!0});return r},queryKey:We(e)}),$e=e=>W("getMetadataInfo",e),ms=e=>({queryFn:async({queryKey:t,signal:s})=>{const{data:r}=await ce({...e,...t[0],signal:s,throwOnError:!0});return r},queryKey:$e(e)});export{es as A,De as B,St as C,ke as D,Ke as E,xe as F,ds as G,cs as H,us as I,ps as J,rs as Q,Ie as R,Mt as S,ls as a,hs as b,is as c,ys as d,ts as e,wt as f,ms as g,Oe as h,as as i,Zt as j,ft as k,Ye as l,Ze as m,Lt as n,te as o,gt as p,jt as q,os as r,Yt as s,ns as t,Pe as u,fs as v,bs as w,Ee as x,Se as y,ss as z};
@@ -1 +0,0 @@
1
- import"./CWj6FrbW.js";import{p as e,f as n,n as l,a as m}from"./CH6P3X75.js";import{c as i,a as d}from"./RmD8FzRo.js";import{s as c}from"./CCx7Ho51.js";import{s as f,r as h}from"./DQXoLcsF.js";import{I as $}from"./DQe_kdRt.js";function N(t,a){e(a,!0);let s=h(a,["$$slots","$$events","$$legacy"]);$(t,f({name:"component"},()=>s,{iconNode:[["path",{d:"M15.536 11.293a1 1 0 0 0 0 1.414l2.376 2.377a1 1 0 0 0 1.414 0l2.377-2.377a1 1 0 0 0 0-1.414l-2.377-2.377a1 1 0 0 0-1.414 0z"}],["path",{d:"M2.297 11.293a1 1 0 0 0 0 1.414l2.377 2.377a1 1 0 0 0 1.414 0l2.377-2.377a1 1 0 0 0 0-1.414L6.088 8.916a1 1 0 0 0-1.414 0z"}],["path",{d:"M8.916 17.912a1 1 0 0 0 0 1.415l2.377 2.376a1 1 0 0 0 1.414 0l2.377-2.376a1 1 0 0 0 0-1.415l-2.377-2.376a1 1 0 0 0-1.414 0z"}],["path",{d:"M8.916 4.674a1 1 0 0 0 0 1.414l2.377 2.376a1 1 0 0 0 1.414 0l2.377-2.376a1 1 0 0 0 0-1.414l-2.377-2.377a1 1 0 0 0-1.414 0z"}]],children:(p,z)=>{var o=i(),r=n(o);c(r,()=>a.children??l),d(p,o)},$$slots:{default:!0}})),m()}export{N as C};
@@ -1 +0,0 @@
1
- var q=Object.defineProperty;var E=(e,t,r)=>t in e?q(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var w=(e,t,r)=>E(e,typeof t!="symbol"?t+"":t,r);const R={bodySerializer:e=>JSON.stringify(e,(t,r)=>typeof r=="bigint"?r.toString():r)},U=async(e,t)=>{const r=typeof t=="function"?await t(e):t;if(r)return e.scheme==="bearer"?`Bearer ${r}`:e.scheme==="basic"?`Basic ${btoa(r)}`:r},V=e=>{switch(e){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},P=e=>{switch(e){case"form":return",";case"pipeDelimited":return"|";case"spaceDelimited":return"%20";default:return","}},W=e=>{switch(e){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},C=({allowReserved:e,explode:t,name:r,style:o,value:a})=>{if(!t){const n=(e?a:a.map(c=>encodeURIComponent(c))).join(P(o));switch(o){case"label":return`.${n}`;case"matrix":return`;${r}=${n}`;case"simple":return n;default:return`${r}=${n}`}}const i=V(o),s=a.map(n=>o==="label"||o==="simple"?e?n:encodeURIComponent(n):g({allowReserved:e,name:r,value:n})).join(i);return o==="label"||o==="matrix"?i+s:s},g=({allowReserved:e,name:t,value:r})=>{if(r==null)return"";if(typeof r=="object")throw new Error("Deeply-nested arrays/objects aren’t supported. Provide your own `querySerializer()` to handle these.");return`${t}=${e?r:encodeURIComponent(r)}`},$=({allowReserved:e,explode:t,name:r,style:o,value:a,valueOnly:i})=>{if(a instanceof Date)return i?a.toISOString():`${r}=${a.toISOString()}`;if(o!=="deepObject"&&!t){let c=[];Object.entries(a).forEach(([p,y])=>{c=[...c,p,e?y:encodeURIComponent(y)]});const f=c.join(",");switch(o){case"form":return`${r}=${f}`;case"label":return`.${f}`;case"matrix":return`;${r}=${f}`;default:return f}}const s=W(o),n=Object.entries(a).map(([c,f])=>g({allowReserved:e,name:o==="deepObject"?`${r}[${c}]`:c,value:f})).join(s);return o==="label"||o==="matrix"?s+n:n},k=/\{[^{}]+\}/g,H=({path:e,url:t})=>{let r=t;const o=t.match(k);if(o)for(const a of o){let i=!1,s=a.substring(1,a.length-1),n="simple";s.endsWith("*")&&(i=!0,s=s.substring(0,s.length-1)),s.startsWith(".")?(s=s.substring(1),n="label"):s.startsWith(";")&&(s=s.substring(1),n="matrix");const c=e[s];if(c==null)continue;if(Array.isArray(c)){r=r.replace(a,C({explode:i,name:s,style:n,value:c}));continue}if(typeof c=="object"){r=r.replace(a,$({explode:i,name:s,style:n,value:c,valueOnly:!0}));continue}if(n==="matrix"){r=r.replace(a,`;${g({name:s,value:c})}`);continue}const f=encodeURIComponent(n==="label"?`.${c}`:c);r=r.replace(a,f)}return r},z=({allowReserved:e,array:t,object:r}={})=>a=>{const i=[];if(a&&typeof a=="object")for(const s in a){const n=a[s];if(n!=null)if(Array.isArray(n)){const c=C({allowReserved:e,explode:!0,name:s,style:"form",value:n,...t});c&&i.push(c)}else if(typeof n=="object"){const c=$({allowReserved:e,explode:!0,name:s,style:"deepObject",value:n,...r});c&&i.push(c)}else{const c=g({allowReserved:e,name:s,value:n});c&&i.push(c)}}return i.join("&")},N=e=>{var r;if(!e)return"stream";const t=(r=e.split(";")[0])==null?void 0:r.trim();if(t){if(t.startsWith("application/json")||t.endsWith("+json"))return"json";if(t==="multipart/form-data")return"formData";if(["application/","audio/","image/","video/"].some(o=>t.startsWith(o)))return"blob";if(t.startsWith("text/"))return"text"}},B=async({security:e,...t})=>{for(const r of e){const o=await U(r,t.auth);if(!o)continue;const a=r.name??"Authorization";switch(r.in){case"query":t.query||(t.query={}),t.query[a]=o;break;case"cookie":t.headers.append("Cookie",`${a}=${o}`);break;case"header":default:t.headers.set(a,o);break}return}},A=e=>L({baseUrl:e.baseUrl,path:e.path,query:e.query,querySerializer:typeof e.querySerializer=="function"?e.querySerializer:z(e.querySerializer),url:e.url}),L=({baseUrl:e,path:t,query:r,querySerializer:o,url:a})=>{const i=a.startsWith("/")?a:`/${a}`;let s=(e??"")+i;t&&(s=H({path:t,url:s}));let n=r?o(r):"";return n.startsWith("?")&&(n=n.substring(1)),n&&(s+=`?${n}`),s},x=(e,t)=>{var o;const r={...e,...t};return(o=r.baseUrl)!=null&&o.endsWith("/")&&(r.baseUrl=r.baseUrl.substring(0,r.baseUrl.length-1)),r.headers=D(e.headers,t.headers),r},D=(...e)=>{const t=new Headers;for(const r of e){if(!r||typeof r!="object")continue;const o=r instanceof Headers?r.entries():Object.entries(r);for(const[a,i]of o)if(i===null)t.delete(a);else if(Array.isArray(i))for(const s of i)t.append(a,s);else i!==void 0&&t.set(a,typeof i=="object"?JSON.stringify(i):i)}return t};class _{constructor(){w(this,"_fns");this._fns=[]}clear(){this._fns=[]}getInterceptorIndex(t){return typeof t=="number"?this._fns[t]?t:-1:this._fns.indexOf(t)}exists(t){const r=this.getInterceptorIndex(t);return!!this._fns[r]}eject(t){const r=this.getInterceptorIndex(t);this._fns[r]&&(this._fns[r]=null)}update(t,r){const o=this.getInterceptorIndex(t);return this._fns[o]?(this._fns[o]=r,t):!1}use(t){return this._fns=[...this._fns,t],this._fns.length-1}}const J=()=>({error:new _,request:new _,response:new _}),M=z({allowReserved:!1,array:{explode:!0,style:"form"},object:{explode:!0,style:"deepObject"}}),Q={"Content-Type":"application/json"},O=(e={})=>({...R,headers:Q,parseAs:"auto",querySerializer:M,...e}),G=(e={})=>{let t=x(O(),e);const r=()=>({...t}),o=s=>(t=x(t,s),r()),a=J(),i=async s=>{const n={...t,...s,fetch:s.fetch??t.fetch??globalThis.fetch,headers:D(t.headers,s.headers)};n.security&&await B({...n,security:n.security}),n.requestValidator&&await n.requestValidator(n),n.body&&n.bodySerializer&&(n.body=n.bodySerializer(n.body)),(n.body===void 0||n.body==="")&&n.headers.delete("Content-Type");const c=A(n),f={redirect:"follow",...n};let p=new Request(c,f);for(const d of a.request._fns)d&&(p=await d(p,n));const y=n.fetch;let l=await y(p);for(const d of a.response._fns)d&&(l=await d(l,p,n));const b={request:p,response:l};if(l.ok){if(l.status===204||l.headers.get("Content-Length")==="0")return n.responseStyle==="data"?{}:{data:{},...b};const d=(n.parseAs==="auto"?N(l.headers.get("Content-Type")):n.parseAs)??"json";let h;switch(d){case"arrayBuffer":case"blob":case"formData":case"json":case"text":h=await l[d]();break;case"stream":return n.responseStyle==="data"?l.body:{data:l.body,...b}}return d==="json"&&(n.responseValidator&&await n.responseValidator(h),n.responseTransformer&&(h=await n.responseTransformer(h))),n.responseStyle==="data"?h:{data:h,...b}}const j=await l.text();let T;try{T=JSON.parse(j)}catch{}const S=T??j;let m=S;for(const d of a.error._fns)d&&(m=await d(S,l,p,n));if(m=m||{},n.throwOnError)throw m;return n.responseStyle==="data"?void 0:{error:m,...b}};return{buildUrl:A,connect:s=>i({...s,method:"CONNECT"}),delete:s=>i({...s,method:"DELETE"}),get:s=>i({...s,method:"GET"}),getConfig:r,head:s=>i({...s,method:"HEAD"}),interceptors:a,options:s=>i({...s,method:"OPTIONS"}),patch:s=>i({...s,method:"PATCH"}),post:s=>i({...s,method:"POST"}),put:s=>i({...s,method:"PUT"}),request:i,setConfig:o,trace:s=>i({...s,method:"TRACE"})}},F=e=>(e.created_at=new Date(e.created_at),e.updated_at=new Date(e.updated_at),e),K=async e=>(e=e.map(t=>F(t)),e),X=e=>(e.created_at&&(e.created_at=new Date(e.created_at)),e.updated_at&&(e.updated_at=new Date(e.updated_at)),e),Y=async e=>(e=X(e),e),Z=e=>(e.created_at=new Date(e.created_at),e.updated_at=new Date(e.updated_at),e),I=e=>(e.tags&&(e.tags=e.tags.map(t=>Z(t))),e),v=e=>(e.data=e.data.map(t=>I(t)),e),ee=async e=>(e=v(e),e),te=async e=>(e=I(e),e),re=e=>(e.created_at&&(e.created_at=new Date(e.created_at)),e),ne=async e=>(e=e.map(t=>re(t)),e),se=e=>(e.created_at=new Date(e.created_at),e.updated_at=new Date(e.updated_at),e),ae=async e=>(e=se(e),e),u=G(O()),ie=e=>((e==null?void 0:e.client)??u).get({responseTransformer:K,url:"/api/datasets",...e}),ce=e=>(e.client??u).get({responseTransformer:Y,url:"/api/datasets/{dataset_id}",...e}),ue=e=>(e.client??u).post({responseTransformer:ee,url:"/api/datasets/{dataset_id}/samples/list",...e,headers:{"Content-Type":"application/json",...e.headers}}),le=e=>(e.client??u).get({responseTransformer:te,url:"/api/datasets/{dataset_id}/samples/{sample_id}",...e}),de=e=>((e==null?void 0:e.client)??u).get({url:"/api/annotation_labels",...e}),fe=e=>(e.client??u).post({url:"/api/annotation_labels",...e,headers:{"Content-Type":"application/json",...e.headers}}),pe=e=>(e.client??u).get({url:"/api/datasets/{dataset_id}/annotations",...e}),he=e=>(e.client??u).post({url:"/api/datasets/{dataset_id}/annotations",...e,headers:{"Content-Type":"application/json",...e.headers}}),me=e=>(e.client??u).put({responseTransformer:ne,url:"/api/datasets/{dataset_id}/annotations",...e,headers:{"Content-Type":"application/json",...e.headers}}),ye=e=>(e.client??u).get({url:"/api/datasets/{dataset_id}/annotations/count",...e,headers:{"Content-Type":"application/json",...e.headers}}),be=e=>(e.client??u).delete({url:"/api/datasets/{dataset_id}/annotations/{annotation_id}",...e}),ge=e=>(e.client??u).get({url:"/api/datasets/{dataset_id}/annotations/{annotation_id}",...e}),_e=e=>((e==null?void 0:e.client)??u).get({responseTransformer:ae,url:"/api/settings",...e}),je=e=>(e.client??u).get({url:"/api/classifiers/{classifier_id}/sample_history",...e}),Te=e=>((e==null?void 0:e.client)??u).get({url:"/api/embeddings2d/tsne",...e}),Se=e=>(e.client??u).get({url:"/api/datasets/{dataset_id}/metadata/info",...e}),we=e=>(e.client??u).post({url:"/api/datasets/{dataset_id}/selection",...e,headers:{"Content-Type":"application/json",...e.headers}});export{ce as a,ue as b,pe as c,u as d,be as e,he as f,Se as g,fe as h,le as i,de as j,ye as k,ge as l,Te as m,we as n,_e as o,ie as r,je as s,me as u};
@@ -1 +0,0 @@
1
- import"./CWj6FrbW.js";import{f as m}from"./CH6P3X75.js";import{c as i,a as p}from"./RmD8FzRo.js";import{s as n}from"./CCx7Ho51.js";function d(o,a){var r=i(),t=m(r);n(t,()=>a.children),p(o,r)}export{d as L};
@@ -1 +0,0 @@
1
- import{a2 as y,a3 as f,a4 as _,a5 as w,P as E,K as A,L as B,a6 as M,q as O}from"./CH6P3X75.js";function N(r,t){if(t){const e=document.body;r.autofocus=!0,y(()=>{document.activeElement===e&&r.focus()})}}let b=!1;function T(){b||(b=!0,document.addEventListener("reset",r=>{Promise.resolve().then(()=>{var t;if(!r.defaultPrevented)for(const e of r.target.elements)(t=e.__on_r)==null||t.call(e)})},{capture:!0}))}function L(r){var t=w,e=E;f(null),_(null);try{return r()}finally{f(t),_(e)}}function j(r,t,e,i=e){r.addEventListener(t,()=>L(e));const n=r.__on_r;n?r.__on_r=()=>{n(),i(!0)}:r.__on_r=()=>i(!0),T()}const W=new Set,C=new Set;function z(r){if(!O)return;r.onload&&r.removeAttribute("onload"),r.onerror&&r.removeAttribute("onerror");const t=r.__e;t!==void 0&&(r.__e=void 0,queueMicrotask(()=>{r.isConnected&&r.dispatchEvent(t)}))}function k(r,t,e,i={}){function n(a){if(i.capture||D.call(t,a),!a.cancelBubble)return L(()=>e==null?void 0:e.call(this,a))}return r.startsWith("pointer")||r.startsWith("touch")||r==="wheel"?y(()=>{t.addEventListener(r,n,i)}):t.addEventListener(r,n,i),n}function F(r,t,e,i={}){var n=k(t,r,e,i);return()=>{r.removeEventListener(t,n,i)}}function G(r,t,e,i,n){var a={capture:i,passive:n},o=k(r,t,e,a);(t===document.body||t===window||t===document)&&A(()=>{t.removeEventListener(r,o,a)})}function H(r){for(var t=0;t<r.length;t++)W.add(r[t]);for(var e of C)e(r)}function D(r){var g;var t=this,e=t.ownerDocument,i=r.type,n=((g=r.composedPath)==null?void 0:g.call(r))||[],a=n[0]||r.target,o=0,d=r.__root;if(d){var l=n.indexOf(d);if(l!==-1&&(t===document||t===window)){r.__root=t;return}var p=n.indexOf(t);if(p===-1)return;l<=p&&(o=l)}if(a=n[o]||r.target,a!==t){B(r,"currentTarget",{configurable:!0,get(){return a||e}});var q=w,P=E;f(null),_(null);try{for(var u,h=[];a!==null;){var v=a.assignedSlot||a.parentNode||a.host||null;try{var s=a["__"+i];if(s!=null&&(!a.disabled||r.target===a))if(M(s)){var[S,...x]=s;S.apply(a,[r,...x])}else s.call(a,r)}catch(c){u?h.push(c):u=c}if(r.cancelBubble||v===t||v===null)break;a=v}if(u){for(let c of h)queueMicrotask(()=>{throw c});throw u}}finally{r.__root=t,delete r.currentTarget,f(q),_(P)}}}export{W as a,z as b,k as c,H as d,G as e,N as f,T as g,D as h,j as l,F as o,C as r,L as w};
@@ -1 +0,0 @@
1
- import"./CWj6FrbW.js";import{p as at,g as e,a7 as Z,u as gt,c as H,s as G,r as q,J as L,t as Q,d as T,a as rt,aw as ft,f as ct}from"./CH6P3X75.js";import{n as B,a as V,t as mt}from"./RmD8FzRo.js";import{i as J,s as bt,a as xt}from"./DA6bFLPR.js";import{p as j,b as ut,a as W}from"./DQXoLcsF.js";import{Y as it,Z as yt,$ as wt,l as c,z as vt,a0 as zt,N as $,a1 as kt}from"./DQe_kdRt.js";import"./6t3IJ0vQ.js";import{o as St}from"./DEgUu98i.js";import"./8NsknIT2.js";import"./CxFKfZ9T.js";import"./keKYsoph.js";import"./69_IOA4Y.js";import"./CCx7Ho51.js";import{s as K}from"./DGTPl6Gk.js";function st(r,t){const n={...r};return n.x=Math.round(Math.max(t.x,Math.min(n.x,t.x+t.width-n.width))),n.y=Math.round(Math.max(t.y,Math.min(n.y,t.y+t.height-n.height))),n.width=Math.round(Math.min(n.width,t.x+t.width-n.x)),n.height=Math.round(Math.min(n.height,t.y+t.height-n.y)),n}function X(r){return typeof r=="string"?new it([[document.querySelector(r)]],[document.documentElement]):new it([[r]],yt)}function _t(r){let t;for(;t=r.sourceEvent;)r=t;return r}function lt(r,t){if(r=_t(r),t===void 0&&(t=r.currentTarget),t){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var u=n.createSVGPoint();return u.x=r.clientX,u.y=r.clientY,u=u.matrixTransform(t.getScreenCTM().inverse()),[u.x,u.y]}if(t.getBoundingClientRect){var w=t.getBoundingClientRect();return[r.clientX-w.left-t.clientLeft,r.clientY-w.top-t.clientTop]}}return[r.pageX,r.pageY]}const Mt={passive:!1},N={capture:!0,passive:!1};function tt(r){r.stopImmediatePropagation()}function O(r){r.preventDefault(),r.stopImmediatePropagation()}function Rt(r){var t=r.document.documentElement,n=X(r).on("dragstart.drag",O,N);"onselectstart"in t?n.on("selectstart.drag",O,N):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function Dt(r,t){var n=r.document.documentElement,u=X(r).on("dragstart.drag",null);t&&(u.on("click.drag",O,N),setTimeout(function(){u.on("click.drag",null)},0)),"onselectstart"in n?u.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}const p=r=>()=>r;function et(r,{sourceEvent:t,subject:n,target:u,identifier:w,active:z,x:i,y:x,dx:g,dy:o,dispatch:d}){Object.defineProperties(this,{type:{value:r,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:u,enumerable:!0,configurable:!0},identifier:{value:w,enumerable:!0,configurable:!0},active:{value:z,enumerable:!0,configurable:!0},x:{value:i,enumerable:!0,configurable:!0},y:{value:x,enumerable:!0,configurable:!0},dx:{value:g,enumerable:!0,configurable:!0},dy:{value:o,enumerable:!0,configurable:!0},_:{value:d}})}et.prototype.on=function(){var r=this._.on.apply(this._,arguments);return r===this._?this:r};function Tt(r){return!r.ctrlKey&&!r.button}function Ct(){return this.parentNode}function Et(r,t){return t??{x:r.x,y:r.y}}function jt(){return navigator.maxTouchPoints||"ontouchstart"in this}function ht(){var r=Tt,t=Ct,n=Et,u=jt,w={},z=wt("start","drag","end"),i=0,x,g,o,d,f=0;function l(a){a.on("mousedown.drag",v).filter(u).on("touchstart.drag",M).on("touchmove.drag",E,Mt).on("touchend.drag touchcancel.drag",C).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function v(a,b){if(!(d||!r.call(this,a,b))){var s=Y(this,t.call(this,a,b),a,b,"mouse");s&&(X(a.view).on("mousemove.drag",S,N).on("mouseup.drag",D,N),Rt(a.view),tt(a),o=!1,x=a.clientX,g=a.clientY,s("start",a))}}function S(a){if(O(a),!o){var b=a.clientX-x,s=a.clientY-g;o=b*b+s*s>f}w.mouse("drag",a)}function D(a){X(a.view).on("mousemove.drag mouseup.drag",null),Dt(a.view,o),O(a),w.mouse("end",a)}function M(a,b){if(r.call(this,a,b)){var s=a.changedTouches,h=t.call(this,a,b),_=s.length,y,k;for(y=0;y<_;++y)(k=Y(this,h,a,b,s[y].identifier,s[y]))&&(tt(a),k("start",a,s[y]))}}function E(a){var b=a.changedTouches,s=b.length,h,_;for(h=0;h<s;++h)(_=w[b[h].identifier])&&(O(a),_("drag",a,b[h]))}function C(a){var b=a.changedTouches,s=b.length,h,_;for(d&&clearTimeout(d),d=setTimeout(function(){d=null},500),h=0;h<s;++h)(_=w[b[h].identifier])&&(tt(a),_("end",a,b[h]))}function Y(a,b,s,h,_,y){var k=z.copy(),R=lt(y||s,b),F,U,m;if((m=n.call(a,new et("beforestart",{sourceEvent:s,target:l,identifier:_,active:i,x:R[0],y:R[1],dx:0,dy:0,dispatch:k}),h))!=null)return F=m.x-R[0]||0,U=m.y-R[1]||0,function P(A,nt,dt){var ot=R,I;switch(A){case"start":w[_]=P,I=i++;break;case"end":delete w[_],--i;case"drag":R=lt(dt||nt,b),I=i;break}k.call(A,a,new et(A,{sourceEvent:nt,subject:m,target:l,identifier:_,active:I,x:R[0]+F,y:R[1]+U,dx:R[0]-ot[0],dy:R[1]-ot[1],dispatch:k}),h)}}return l.filter=function(a){return arguments.length?(r=typeof a=="function"?a:p(!!a),l):r},l.container=function(a){return arguments.length?(t=typeof a=="function"?a:p(a),l):t},l.subject=function(a){return arguments.length?(n=typeof a=="function"?a:p(a),l):n},l.touchable=function(a){return arguments.length?(u=typeof a=="function"?a:p(!!a),l):u},l.on=function(){var a=z.on.apply(z,arguments);return a===z?l:a},l.clickDistance=function(a){return arguments.length?(f=(a=+a)*a,l):Math.sqrt(f)},l}function Lt({handle:r,getCurrentBbox:t,onResize:n,onDragEnd:u,onInteractionStart:w,onInteractionEnd:z}){let i;return ht().on("start",()=>{i=t(),w==null||w()}).on("drag",x=>{let g=i.x,o=i.y,d=i.width,f=i.height;const l=x.x-x.subject.x,v=x.y-x.subject.y;switch(r){case"nw":g=i.x+l,o=i.y+v,d=i.width-l,f=i.height-v;break;case"ne":o=i.y+v,d=i.width+l,f=i.height-v;break;case"sw":g=i.x+l,d=i.width-l,f=i.height+v;break;case"se":d=i.width+l,f=i.height+v;break;case"n":o=i.y+v,f=i.height-v;break;case"s":f=i.height+v;break;case"w":g=i.x+l,d=i.width-l;break;case"e":d=i.width+l;break}const S=1;d<S&&(d=S,r.includes("w")&&(g=i.x+i.width-S)),f<S&&(f=S,r.includes("n")&&(o=i.y+i.height-S));const D=Math.round(g),M=Math.round(o),E=Math.round(d),C=Math.round(f);n&&n({x:D,y:M,width:E,height:C})}).on("end",()=>{const{x,y:g,width:o,height:d}=t();u&&u({x,y:g,width:o,height:d}),z==null||z()})}function Pt({getCurrentBbox:r,onMove:t,onDragEnd:n,onInteractionStart:u,onInteractionEnd:w}){let z;return ht().on("start",()=>{z=r(),u==null||u()}).on("drag",i=>{const x=i.x-i.subject.x,g=i.y-i.subject.y,o=Math.round(z.x+x),d=Math.round(z.y+g);t&&t({x:o,y:d,width:z.width,height:z.height})}).on("end",()=>{const i=r();n&&n(i),w==null||w()})}var Ft=B('<text dominant-baseline="middle" text-anchor="end"> </text><text text-anchor="middle"> </text><text dominant-baseline="middle" text-anchor="end"> </text>',1),Xt=B('<g><rect stroke-width="2" pointer-events="all" vector-effect="non-scaling-stroke" class="movable-rectangle" style="cursor: move;"></rect><!></g>');function Yt(r,t){at(t,!0);const n=j(t,"bbox",15),u=j(t,"colorStroke",3,"#007bff"),w=j(t,"colorFill",3,"transparent"),z=j(t,"opacity",3,.3),i=j(t,"handleSize",3,12),x=j(t,"scale",3,1),g=T(()=>n().x),o=T(()=>n().y),d=T(()=>n().width),f=T(()=>n().height);let l=Z(void 0),v=Z(!1);function S(){if(!e(l))return;const b=i()/x(),s=Math.min(b,e(d)*.1,e(f)*.1),h=[{id:"nw",x:e(g)-s/2,y:e(o)-s/2,cursor:"nwse-resize",label:"Resize northwest corner"},{id:"ne",x:e(g)+e(d)-s/2,y:e(o)-s/2,cursor:"nesw-resize",label:"Resize northeast corner"},{id:"sw",x:e(g)-s/2,y:e(o)+e(f)-s/2,cursor:"nesw-resize",label:"Resize southwest corner"},{id:"se",x:e(g)+e(d)-s/2,y:e(o)+e(f)-s/2,cursor:"nwse-resize",label:"Resize southeast corner"},{id:"n",x:e(g)+e(d)/2-s/2,y:e(o)-s/2,cursor:"ns-resize",label:"Resize top edge"},{id:"s",x:e(g)+e(d)/2-s/2,y:e(o)+e(f)-s/2,cursor:"ns-resize",label:"Resize bottom edge"},{id:"w",x:e(g)-s/2,y:e(o)+e(f)/2-s/2,cursor:"ew-resize",label:"Resize left edge"},{id:"e",x:e(g)+e(d)-s/2,y:e(o)+e(f)/2-s/2,cursor:"ew-resize",label:"Resize right edge"}],y=X(e(l)).selectAll(".resize-handle").data(h,k=>k.id);y.enter().append("rect").attr("class","resize-handle").attr("width",s).attr("height",s).attr("fill",u()).attr("stroke",u()).attr("stroke-width","1").attr("vector-effect","non-scaling-stroke").attr("role","button").attr("style",k=>`cursor: ${k.cursor};`).attr("data-testid",k=>`resize-handle-${k.id}`).attr("aria-label",k=>k.label).merge(y).attr("x",k=>k.x).attr("y",k=>k.y).attr("width",s).attr("height",s).attr("fill",u()).attr("stroke",u()),y.exit().remove()}function D(){if(!e(l))return;["nw","ne","sw","se","n","s","w","e"].forEach(h=>{if(!e(l))return;const _=e(l).querySelector(`[data-testid="resize-handle-${h}"]`);_&&X(_).call(Lt({handle:h,getCurrentBbox:()=>({x:e(g),y:e(o),width:e(d),height:e(f)}),onResize:y=>{n(n().x=y.x,!0),n(n().y=y.y,!0),n(n().width=y.width,!0),n(n().height=y.height,!0),t.onResize&&t.onResize(y),S()},onDragEnd:y=>{t.onDragEnd&&t.onDragEnd(y)},onInteractionStart:()=>{L(v,!0)},onInteractionEnd:()=>{L(v,!1)}}))});const s=e(l).querySelector(".movable-rectangle");s&&X(s).call(Pt({getCurrentBbox:()=>({x:e(g),y:e(o),width:e(d),height:e(f)}),onMove:h=>{n(n().x=h.x,!0),n(n().y=h.y,!0),n(n().width=h.width,!0),n(n().height=h.height,!0),t.onResize&&t.onResize(h),S()},onDragEnd:h=>{t.onDragEnd&&t.onDragEnd(h)},onInteractionStart:()=>{L(v,!0)},onInteractionEnd:()=>{L(v,!1)}}))}St(()=>{e(l)&&(S(),D())});const M=async()=>{e(l)&&(await ft(),S(),D())};gt(()=>{S(),M()});var E=Xt(),C=H(E),Y=G(C);{var a=b=>{var s=Ft(),h=ct(s),_=H(h);q(h);var y=G(h),k=H(y);q(y);var R=G(y),F=H(R);q(R),Q(()=>{c(h,"x",e(g)-10/x()),c(h,"y",e(o)+1/x()),c(h,"fill",u()),c(h,"font-size",14/x()),K(_,`x: ${e(g)??""}, y: ${e(o)??""}`),c(y,"x",e(g)+e(d)/2),c(y,"y",e(o)+e(f)+20/x()),c(y,"fill",u()),c(y,"font-size",14/x()),K(k,`w: ${e(d)??""}px`),c(R,"x",e(g)-10/x()),c(R,"y",e(o)+e(f)/2),c(R,"fill",u()),c(R,"font-size",14/x()),K(F,`h: ${e(f)??""}px`)}),V(b,s)};J(Y,b=>{e(v)&&b(a)})}q(E),ut(E,b=>L(l,b),()=>e(l)),Q(()=>{c(C,"x",e(g)),c(C,"y",e(o)),c(C,"width",e(d)),c(C,"height",e(f)),c(C,"stroke",u()),c(C,"fill",w()),c(C,"fill-opacity",z())}),V(r,E),rt()}var At=mt("<!> <!> <!>",1);function ae(r,t){var F,U;at(t,!0);const[n,u]=bt(),w=()=>xt(g,"$customLabelColorsStore",n),z=j(t,"showLabel",3,!1),i=j(t,"isResizable",3,!1),x=j(t,"scale",3,1),{customLabelColorsStore:g}=kt(),o=T(()=>t.annotation.annotation_label.annotation_label_name),d=(U=(F=t.annotation)==null?void 0:F.instance_segmentation_details)==null?void 0:U.segmentation_mask,f=T(()=>t.annotation.annotation_id),l=T(()=>$(e(o),1)),v=T(()=>{var m;return((m=w()[e(o)])==null?void 0:m.color)??$(e(o),1).color}),S=T(()=>{var m;return((m=w()[e(o)])==null?void 0:m.color)??$(e(o),.4).color}),D=T(()=>{var m;return((m=w()[e(o)])==null?void 0:m.alpha)*.4});let M=Z(W(vt(t.annotation)));const E=m=>{L(M,W(t.constraintBox?st(m,t.constraintBox):m))},C=m=>{var A;const P=t.constraintBox?st(m,t.constraintBox):m;L(M,W(P)),(A=t.onBoundingBoxChanged)==null||A.call(t,P)},Y=T(()=>[e(M).x,e(M).y,e(M).width,e(M).height]);var a=At(),b=ct(a);{var s=m=>{const P=T(()=>[e(M).x,e(M).y]);Ot(m,{get coordinates(){return e(P)},get colorText(){return e(l)},get label(){return e(o)}})};J(b,m=>{z()&&m(s)})}var h=G(b,2);{var _=m=>{zt(m,{segmentation:d,get width(){return t.imageWidth},get colorFill(){return e(S)},get opacity(){return e(D)}})};J(h,m=>{d&&m(_)})}var y=G(h,2);{var k=m=>{Yt(m,{get colorStroke(){return e(v)},get colorFill(){return e(S)},get opacity(){return e(D)},get scale(){return x()},onResize:E,onDragEnd:C,get bbox(){return e(M)},set bbox(P){L(M,W(P))}})},R=m=>{qt(m,{get bbox(){return e(Y)},get annotationId(){return e(f)},get label(){return e(o)},get colorStroke(){return e(v)},get colorFill(){return e(S)},get opacity(){return e(D)}})};J(y,m=>{i()&&t.constraintBox?m(k):m(R,!1)})}V(r,a),rt(),u()}var Ht=B('<rect vector-effect="non-scaling-stroke" stroke-width="2" pointer-events="all" data-testid="annotation_box"></rect>');function qt(r,t){const n=j(t,"isPrediction",3,!1),[u,w,z,i]=t.bbox,x=n()?"5,5":"none",g=n()?.8:1;var o=Ht();c(o,"x",u),c(o,"y",w),c(o,"width",z),c(o,"height",i),c(o,"stroke-opacity",g),c(o,"stroke-dasharray",x),Q(()=>{c(o,"stroke",t.colorStroke),c(o,"fill",t.colorFill),c(o,"fill-opacity",t.opacity),c(o,"aria-label",t.label),c(o,"data-annotation-id",t.annotationId)}),V(r,o)}var Gt=B('<g class="unscaled"><rect></rect><text class="annotation-label-text" data-testid="svg-annotation-text"> </text></g>');function Ot(r,t){at(t,!0);const n=j(t,"fontSize",3,14),u=j(t,"isPrediction",3,!1),w=T(()=>t.coordinates[0]),z=T(()=>t.coordinates[1]);let i=Z(null);const x=T(()=>e(i)?(e(i).textContent=u()?`${t.label} (pred)`:t.label,e(i).getBBox()):{width:0,height:0}),g=5,o=u()?.8:1,d=u()?"italic":"normal";var f=Gt(),l=H(f);c(l,"opacity",o);var v=G(l);c(v,"x",g),c(v,"y",-5),c(v,"font-style",d);var S=H(v,!0);q(v),ut(v,D=>L(i,D),()=>e(i)),q(f),Q(()=>{var D,M,E;c(f,"transform",`translate(${e(w)}, ${e(z)})`),c(f,"data-label",t.label),c(l,"y",-((D=e(x))==null?void 0:D.height)),c(l,"width",((M=e(x))==null?void 0:M.width)+g*2),c(l,"height",(E=e(x))==null?void 0:E.height),c(l,"fill",t.colorText.color),c(v,"fill",t.colorText.contrastColor),c(v,"font-size",n()),K(S,u()?`${t.label} (pred)`:t.label)}),V(r,f),rt()}export{Yt as R,ae as S,Rt as a,ht as d,lt as p,X as s,Dt as y};
@@ -1 +0,0 @@
1
- import{o as D,q as _,v as U,E as y,H as F,x as H,y as L,z as O,A as I,B as T,C as A,D as E,U as h,F as k,n as N,G as q,I as C,J as Y,l as w,g as z,K as B,L as G}from"./CH6P3X75.js";function K(e,a,[n,s]=[0,0]){_&&n===0&&U();var u=e,t=null,f=null,r=h,m=n>0?y:0,c=!1;const R=(o,i=!0)=>{c=!0,g(i,o)},g=(o,i)=>{if(r===(r=o))return;let p=!1;if(_&&s!==-1){if(n===0){const b=u.data;b===F?s=0:b===H?s=1/0:(s=parseInt(b.substring(1)),s!==s&&(s=r?1/0:-1))}const S=s>n;!!r===S&&(u=L(),O(u),I(!1),p=!0,s=-1)}r?(t?T(t):i&&(t=A(()=>i(u))),f&&E(f,()=>{f=null})):(f?T(f):i&&(f=A(()=>i(u,[n+1,s]))),t&&E(t,()=>{t=null})),p&&I(!0)};D(()=>{c=!1,a(R),c||g(null,null)},m),_&&(u=k)}let l=!1,v=Symbol();function M(e,a,n){const s=n[a]??(n[a]={store:null,source:q(void 0),unsubscribe:N});if(s.store!==e&&!(v in n))if(s.unsubscribe(),s.store=e??null,e==null)s.source.v=void 0,s.unsubscribe=N;else{var u=!0;s.unsubscribe=C(e,t=>{u?s.source.v=t:Y(s.source,t)}),u=!1}return e&&v in n?w(e):z(s.source)}function P(e,a){return e.set(a),a}function Z(){const e={};function a(){B(()=>{for(var n in e)e[n].unsubscribe();G(e,v,{enumerable:!1,value:!0})})}return[e,a]}function $(){l=!0}function d(e){var a=l;try{return l=!1,[e(),l]}finally{l=a}}export{M as a,P as b,d as c,K as i,$ as m,Z as s};
@@ -1,3 +0,0 @@
1
- var tt=e=>{throw TypeError(e)};var qt=(e,t,n)=>t.has(e)||tt("Cannot "+n);var k=(e,t,n)=>(qt(e,t,"read from private field"),n?n.call(e):t.get(e)),x=(e,t,n)=>t.has(e)?tt("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n);import{aG as mt,u as Gt,b as he,i as _t,w as De,a7 as C,g as N,J as O,aw as Mt}from"./CH6P3X75.js";import{l as Ht}from"./DIeogL5L.js";import{H as Se,S as Fe,R as Ve}from"./CYgJF_JY.js";function ge(e){he===null&&mt(),Ht&&he.l!==null?Kt(he).m.push(e):Gt(()=>{const t=_t(e);if(typeof t=="function")return t})}function zn(e){he===null&&mt(),ge(()=>()=>_t(e))}function Kt(e){var t=e.l;return t.u??(t.u={a:[],b:[],m:[]})}new URL("sveltekit-internal://");function Wt(e,t){return e==="/"||t==="ignore"?e:t==="never"?e.endsWith("/")?e.slice(0,-1):e:t==="always"&&!e.endsWith("/")?e+"/":e}function Yt(e){return e.split("%25").map(decodeURI).join("%25")}function Jt(e){for(const t in e)e[t]=decodeURIComponent(e[t]);return e}function Te({href:e}){return e.split("#")[0]}function zt(e,t,n,r=!1){const a=new URL(e);Object.defineProperty(a,"searchParams",{value:new Proxy(a.searchParams,{get(i,o){if(o==="get"||o==="getAll"||o==="has")return l=>(n(l),i[o](l));t();const c=Reflect.get(i,o);return typeof c=="function"?c.bind(i):c}}),enumerable:!0,configurable:!0});const s=["href","pathname","search","toString","toJSON"];r&&s.push("hash");for(const i of s)Object.defineProperty(a,i,{get(){return t(),e[i]},enumerable:!0,configurable:!0});return a}function Xt(...e){let t=5381;for(const n of e)if(typeof n=="string"){let r=n.length;for(;r;)t=t*33^n.charCodeAt(--r)}else if(ArrayBuffer.isView(n)){const r=new Uint8Array(n.buffer,n.byteOffset,n.byteLength);let a=r.length;for(;a;)t=t*33^r[--a]}else throw new TypeError("value must be a string or TypedArray");return(t>>>0).toString(36)}function Zt(e){const t=atob(e),n=new Uint8Array(t.length);for(let r=0;r<t.length;r++)n[r]=t.charCodeAt(r);return n.buffer}const Qt=window.fetch;window.fetch=(e,t)=>((e instanceof Request?e.method:(t==null?void 0:t.method)||"GET")!=="GET"&&Y.delete(Be(e)),Qt(e,t));const Y=new Map;function en(e,t){const n=Be(e,t),r=document.querySelector(n);if(r!=null&&r.textContent){let{body:a,...s}=JSON.parse(r.textContent);const i=r.getAttribute("data-ttl");return i&&Y.set(n,{body:a,init:s,ttl:1e3*Number(i)}),r.getAttribute("data-b64")!==null&&(a=Zt(a)),Promise.resolve(new Response(a,s))}return window.fetch(e,t)}function tn(e,t,n){if(Y.size>0){const r=Be(e,n),a=Y.get(r);if(a){if(performance.now()<a.ttl&&["default","force-cache","only-if-cached",void 0].includes(n==null?void 0:n.cache))return new Response(a.body,a.init);Y.delete(r)}}return window.fetch(t,n)}function Be(e,t){let r=`script[data-sveltekit-fetched][data-url=${JSON.stringify(e instanceof Request?e.url:e)}]`;if(t!=null&&t.headers||t!=null&&t.body){const a=[];t.headers&&a.push([...new Headers(t.headers)].join(",")),t.body&&(typeof t.body=="string"||ArrayBuffer.isView(t.body))&&a.push(t.body),r+=`[data-hash="${Xt(...a)}"]`}return r}const nn=/^(\[)?(\.\.\.)?(\w+)(?:=(\w+))?(\])?$/;function an(e){const t=[];return{pattern:e==="/"?/^\/$/:new RegExp(`^${on(e).map(r=>{const a=/^\[\.\.\.(\w+)(?:=(\w+))?\]$/.exec(r);if(a)return t.push({name:a[1],matcher:a[2],optional:!1,rest:!0,chained:!0}),"(?:/(.*))?";const s=/^\[\[(\w+)(?:=(\w+))?\]\]$/.exec(r);if(s)return t.push({name:s[1],matcher:s[2],optional:!0,rest:!1,chained:!0}),"(?:/([^/]+))?";if(!r)return;const i=r.split(/\[(.+?)\](?!\])/);return"/"+i.map((c,l)=>{if(l%2){if(c.startsWith("x+"))return Pe(String.fromCharCode(parseInt(c.slice(2),16)));if(c.startsWith("u+"))return Pe(String.fromCharCode(...c.slice(2).split("-").map(p=>parseInt(p,16))));const h=nn.exec(c),[,u,_,f,m]=h;return t.push({name:f,matcher:m,optional:!!u,rest:!!_,chained:_?l===1&&i[0]==="":!1}),_?"(.*?)":u?"([^/]*)?":"([^/]+?)"}return Pe(c)}).join("")}).join("")}/?$`),params:t}}function rn(e){return!/^\([^)]+\)$/.test(e)}function on(e){return e.slice(1).split("/").filter(rn)}function sn(e,t,n){const r={},a=e.slice(1),s=a.filter(o=>o!==void 0);let i=0;for(let o=0;o<t.length;o+=1){const c=t[o];let l=a[o-i];if(c.chained&&c.rest&&i&&(l=a.slice(o-i,o+1).filter(h=>h).join("/"),i=0),l===void 0){c.rest&&(r[c.name]="");continue}if(!c.matcher||n[c.matcher](l)){r[c.name]=l;const h=t[o+1],u=a[o+1];h&&!h.rest&&h.optional&&u&&c.chained&&(i=0),!h&&!u&&Object.keys(r).length===s.length&&(i=0);continue}if(c.optional&&c.chained){i++;continue}return}if(!i)return r}function Pe(e){return e.normalize().replace(/[[\]]/g,"\\$&").replace(/%/g,"%25").replace(/\//g,"%2[Ff]").replace(/\?/g,"%3[Ff]").replace(/#/g,"%23").replace(/[.*+?^${}()|\\]/g,"\\$&")}function cn({nodes:e,server_loads:t,dictionary:n,matchers:r}){const a=new Set(t);return Object.entries(n).map(([o,[c,l,h]])=>{const{pattern:u,params:_}=an(o),f={id:o,exec:m=>{const p=u.exec(m);if(p)return sn(p,_,r)},errors:[1,...h||[]].map(m=>e[m]),layouts:[0,...l||[]].map(i),leaf:s(c)};return f.errors.length=f.layouts.length=Math.max(f.errors.length,f.layouts.length),f});function s(o){const c=o<0;return c&&(o=~o),[c,e[o]]}function i(o){return o===void 0?o:[a.has(o),e[o]]}}function wt(e,t=JSON.parse){try{return t(sessionStorage[e])}catch{}}function nt(e,t,n=JSON.stringify){const r=n(t);try{sessionStorage[e]=r}catch{}}var ut;const P=((ut=globalThis.__sveltekit_1gqf9ui)==null?void 0:ut.base)??"";var dt;const ln=((dt=globalThis.__sveltekit_1gqf9ui)==null?void 0:dt.assets)??P,fn="1759479212790",yt="sveltekit:snapshot",vt="sveltekit:scroll",bt="sveltekit:states",un="sveltekit:pageurl",G="sveltekit:history",z="sveltekit:navigation",V={tap:1,hover:2,viewport:3,eager:4,off:-1,false:-1},fe=location.origin;function kt(e){if(e instanceof URL)return e;let t=document.baseURI;if(!t){const n=document.getElementsByTagName("base");t=n.length?n[0].href:document.URL}return new URL(e,t)}function qe(){return{x:pageXOffset,y:pageYOffset}}function q(e,t){return e.getAttribute(`data-sveltekit-${t}`)}const at={...V,"":V.hover};function At(e){let t=e.assignedSlot??e.parentNode;return(t==null?void 0:t.nodeType)===11&&(t=t.host),t}function St(e,t){for(;e&&e!==t;){if(e.nodeName.toUpperCase()==="A"&&e.hasAttribute("href"))return e;e=At(e)}}function Oe(e,t,n){let r;try{if(r=new URL(e instanceof SVGAElement?e.href.baseVal:e.href,document.baseURI),n&&r.hash.match(/^#[^/]/)){const o=location.hash.split("#")[1]||"/";r.hash=`#${o}${r.hash}`}}catch{}const a=e instanceof SVGAElement?e.target.baseVal:e.target,s=!r||!!a||Ee(r,t,n)||(e.getAttribute("rel")||"").split(/\s+/).includes("external"),i=(r==null?void 0:r.origin)===fe&&e.hasAttribute("download");return{url:r,external:s,target:a,download:i}}function me(e){let t=null,n=null,r=null,a=null,s=null,i=null,o=e;for(;o&&o!==document.documentElement;)r===null&&(r=q(o,"preload-code")),a===null&&(a=q(o,"preload-data")),t===null&&(t=q(o,"keepfocus")),n===null&&(n=q(o,"noscroll")),s===null&&(s=q(o,"reload")),i===null&&(i=q(o,"replacestate")),o=At(o);function c(l){switch(l){case"":case"true":return!0;case"off":case"false":return!1;default:return}}return{preload_code:at[r??"off"],preload_data:at[a??"off"],keepfocus:c(t),noscroll:c(n),reload:c(s),replace_state:c(i)}}function rt(e){const t=De(e);let n=!0;function r(){n=!0,t.update(i=>i)}function a(i){n=!1,t.set(i)}function s(i){let o;return t.subscribe(c=>{(o===void 0||n&&c!==o)&&i(o=c)})}return{notify:r,set:a,subscribe:s}}const Et={v:()=>{}};function dn(){const{set:e,subscribe:t}=De(!1);let n;async function r(){clearTimeout(n);try{const a=await fetch(`${ln}/_app/version.json`,{headers:{pragma:"no-cache","cache-control":"no-cache"}});if(!a.ok)return!1;const i=(await a.json()).version!==fn;return i&&(e(!0),Et.v(),clearTimeout(n)),i}catch{return!1}}return{subscribe:t,check:r}}function Ee(e,t,n){return e.origin!==fe||!e.pathname.startsWith(t)?!0:n?!(e.pathname===t+"/"||e.pathname===t+"/index.html"||e.protocol==="file:"&&e.pathname.replace(/\/[^/]+\.html?$/,"")===t):!1}function Xn(e){}function ot(e){const t=pn(e),n=new ArrayBuffer(t.length),r=new DataView(n);for(let a=0;a<n.byteLength;a++)r.setUint8(a,t.charCodeAt(a));return n}const hn="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";function pn(e){e.length%4===0&&(e=e.replace(/==?$/,""));let t="",n=0,r=0;for(let a=0;a<e.length;a++)n<<=6,n|=hn.indexOf(e[a]),r+=6,r===24&&(t+=String.fromCharCode((n&16711680)>>16),t+=String.fromCharCode((n&65280)>>8),t+=String.fromCharCode(n&255),n=r=0);return r===12?(n>>=4,t+=String.fromCharCode(n)):r===18&&(n>>=2,t+=String.fromCharCode((n&65280)>>8),t+=String.fromCharCode(n&255)),t}const gn=-1,mn=-2,_n=-3,wn=-4,yn=-5,vn=-6;function bn(e,t){if(typeof e=="number")return a(e,!0);if(!Array.isArray(e)||e.length===0)throw new Error("Invalid input");const n=e,r=Array(n.length);function a(s,i=!1){if(s===gn)return;if(s===_n)return NaN;if(s===wn)return 1/0;if(s===yn)return-1/0;if(s===vn)return-0;if(i)throw new Error("Invalid input");if(s in r)return r[s];const o=n[s];if(!o||typeof o!="object")r[s]=o;else if(Array.isArray(o))if(typeof o[0]=="string"){const c=o[0],l=t==null?void 0:t[c];if(l)return r[s]=l(a(o[1]));switch(c){case"Date":r[s]=new Date(o[1]);break;case"Set":const h=new Set;r[s]=h;for(let f=1;f<o.length;f+=1)h.add(a(o[f]));break;case"Map":const u=new Map;r[s]=u;for(let f=1;f<o.length;f+=2)u.set(a(o[f]),a(o[f+1]));break;case"RegExp":r[s]=new RegExp(o[1],o[2]);break;case"Object":r[s]=Object(o[1]);break;case"BigInt":r[s]=BigInt(o[1]);break;case"null":const _=Object.create(null);r[s]=_;for(let f=1;f<o.length;f+=2)_[o[f]]=a(o[f+1]);break;case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"BigInt64Array":case"BigUint64Array":{const f=globalThis[c],m=o[1],p=ot(m),d=new f(p);r[s]=d;break}case"ArrayBuffer":{const f=o[1],m=ot(f);r[s]=m;break}default:throw new Error(`Unknown type ${c}`)}}else{const c=new Array(o.length);r[s]=c;for(let l=0;l<o.length;l+=1){const h=o[l];h!==mn&&(c[l]=a(h))}}else{const c={};r[s]=c;for(const l in o){const h=o[l];c[l]=a(h)}}return r[s]}return a(0)}const Rt=new Set(["load","prerender","csr","ssr","trailingSlash","config"]);[...Rt];const kn=new Set([...Rt]);[...kn];function An(e){return e.filter(t=>t!=null)}const Sn="x-sveltekit-invalidated",En="x-sveltekit-trailing-slash";function _e(e){return e instanceof Se||e instanceof Fe?e.status:500}function Rn(e){return e instanceof Fe?e.text:"Internal Error"}let R,X,xe;const In=ge.toString().includes("$$")||/function \w+\(\) \{\}/.test(ge.toString());var ee,te,ne,ae,re,oe,se,ie,ht,ce,pt,le,gt;In?(R={data:{},form:null,error:null,params:{},route:{id:null},state:{},status:-1,url:new URL("https://example.com")},X={current:null},xe={current:!1}):(R=new(ht=class{constructor(){x(this,ee,C({}));x(this,te,C(null));x(this,ne,C(null));x(this,ae,C({}));x(this,re,C({id:null}));x(this,oe,C({}));x(this,se,C(-1));x(this,ie,C(new URL("https://example.com")))}get data(){return N(k(this,ee))}set data(t){O(k(this,ee),t)}get form(){return N(k(this,te))}set form(t){O(k(this,te),t)}get error(){return N(k(this,ne))}set error(t){O(k(this,ne),t)}get params(){return N(k(this,ae))}set params(t){O(k(this,ae),t)}get route(){return N(k(this,re))}set route(t){O(k(this,re),t)}get state(){return N(k(this,oe))}set state(t){O(k(this,oe),t)}get status(){return N(k(this,se))}set status(t){O(k(this,se),t)}get url(){return N(k(this,ie))}set url(t){O(k(this,ie),t)}},ee=new WeakMap,te=new WeakMap,ne=new WeakMap,ae=new WeakMap,re=new WeakMap,oe=new WeakMap,se=new WeakMap,ie=new WeakMap,ht),X=new(pt=class{constructor(){x(this,ce,C(null))}get current(){return N(k(this,ce))}set current(t){O(k(this,ce),t)}},ce=new WeakMap,pt),xe=new(gt=class{constructor(){x(this,le,C(!1))}get current(){return N(k(this,le))}set current(t){O(k(this,le),t)}},le=new WeakMap,gt),Et.v=()=>xe.current=!0);function It(e){Object.assign(R,e)}const Un="/__data.json",Ln=".html__data.json";function Tn(e){return e.endsWith(".html")?e.replace(/\.html$/,Ln):e.replace(/\/$/,"")+Un}const Pn=new Set(["icon","shortcut icon","apple-touch-icon"]),B=wt(vt)??{},Z=wt(yt)??{},D={url:rt({}),page:rt({}),navigating:De(null),updated:dn()};function Ge(e){B[e]=qe()}function xn(e,t){let n=e+1;for(;B[n];)delete B[n],n+=1;for(n=t+1;Z[n];)delete Z[n],n+=1}function K(e){return location.href=e.href,new Promise(()=>{})}async function Ut(){if("serviceWorker"in navigator){const e=await navigator.serviceWorker.getRegistration(P||"/");e&&await e.update()}}function st(){}let Me,je,we,j,$e,A;const ye=[],ve=[];let L=null;const de=new Map,He=new Set,Cn=new Set,M=new Set;let y={branch:[],error:null,url:null},Ke=!1,be=!1,it=!0,Q=!1,W=!1,Lt=!1,We=!1,Ye,E,T,$;const J=new Set;let Ce;async function ta(e,t,n){var a,s,i,o;document.URL!==location.href&&(location.href=location.href),A=e,await((s=(a=e.hooks).init)==null?void 0:s.call(a)),Me=cn(e),j=document.documentElement,$e=t,je=e.nodes[0],we=e.nodes[1],je(),we(),E=(i=history.state)==null?void 0:i[G],T=(o=history.state)==null?void 0:o[z],E||(E=T=Date.now(),history.replaceState({...history.state,[G]:E,[z]:T},""));const r=B[E];r&&(history.scrollRestoration="manual",scrollTo(r.x,r.y)),n?await Gn($e,n):await Bn(A.hash?Hn(new URL(location.href)):location.href,{replaceState:!0}),qn()}async function Nn(){if(await(Ce||(Ce=Promise.resolve())),!Ce)return;Ce=null;const e=$={},t=await ue(y.url,!0);L=null;const n=t&&await Xe(t);if(!(!n||e!==$)){if(n.type==="redirect")return Re(new URL(n.location,y.url).href,{},1,e);n.props.page&&Object.assign(R,n.props.page),y=n.state,Tt(),Ye.$set(n.props),It(n.props.page)}}function Tt(){ye.length=0,We=!1}function Pt(e){ve.some(t=>t==null?void 0:t.snapshot)&&(Z[e]=ve.map(t=>{var n;return(n=t==null?void 0:t.snapshot)==null?void 0:n.capture()}))}function xt(e){var t;(t=Z[e])==null||t.forEach((n,r)=>{var a,s;(s=(a=ve[r])==null?void 0:a.snapshot)==null||s.restore(n)})}function ct(){Ge(E),nt(vt,B),Pt(T),nt(yt,Z)}async function Re(e,t,n,r){return pe({type:"goto",url:kt(e),keepfocus:t.keepFocus,noscroll:t.noScroll,replace_state:t.replaceState,state:t.state,redirect_count:n,nav_token:r,accept:()=>{t.invalidateAll&&(We=!0),t.invalidate&&t.invalidate.forEach(Dt)}})}async function On(e){if(e.id!==(L==null?void 0:L.id)){const t={};J.add(t),L={id:e.id,token:t,promise:Xe({...e,preload:t}).then(n=>(J.delete(t),n.type==="loaded"&&n.state.error&&(L=null),n))}}return L.promise}async function Ne(e){var n;const t=(n=await ue(e,!1))==null?void 0:n.route;t&&await Promise.all([...t.layouts,t.leaf].map(r=>r==null?void 0:r[1]()))}function Ct(e,t,n){var s;y=e.state;const r=document.querySelector("style[data-sveltekit]");r&&r.remove(),Object.assign(R,e.props.page),Ye=new A.root({target:t,props:{...e.props,stores:D,components:ve},hydrate:n,sync:!1}),xt(T);const a={from:null,to:{params:y.params,route:{id:((s=y.route)==null?void 0:s.id)??null},url:new URL(location.href)},willUnload:!1,type:"enter",complete:Promise.resolve()};M.forEach(i=>i(a)),be=!0}function ke({url:e,params:t,branch:n,status:r,error:a,route:s,form:i}){let o="never";if(P&&(e.pathname===P||e.pathname===P+"/"))o="always";else for(const f of n)(f==null?void 0:f.slash)!==void 0&&(o=f.slash);e.pathname=Wt(e.pathname,o),e.search=e.search;const c={type:"loaded",state:{url:e,params:t,branch:n,error:a,route:s},props:{constructors:An(n).map(f=>f.node.component),page:Ze(R)}};i!==void 0&&(c.props.form=i);let l={},h=!R,u=0;for(let f=0;f<Math.max(n.length,y.branch.length);f+=1){const m=n[f],p=y.branch[f];(m==null?void 0:m.data)!==(p==null?void 0:p.data)&&(h=!0),m&&(l={...l,...m.data},h&&(c.props[`data_${u}`]=l),u+=1)}return(!y.url||e.href!==y.url.href||y.error!==a||i!==void 0&&i!==R.form||h)&&(c.props.page={error:a,params:t,route:{id:(s==null?void 0:s.id)??null},state:{},status:r,url:new URL(e),form:i??null,data:h?l:R.data}),c}async function Je({loader:e,parent:t,url:n,params:r,route:a,server_data_node:s}){var h,u,_;let i=null,o=!0;const c={dependencies:new Set,params:new Set,parent:!1,route:!1,url:!1,search_params:new Set},l=await e();if((h=l.universal)!=null&&h.load){let f=function(...p){for(const d of p){const{href:v}=new URL(d,n);c.dependencies.add(v)}};const m={route:new Proxy(a,{get:(p,d)=>(o&&(c.route=!0),p[d])}),params:new Proxy(r,{get:(p,d)=>(o&&c.params.add(d),p[d])}),data:(s==null?void 0:s.data)??null,url:zt(n,()=>{o&&(c.url=!0)},p=>{o&&c.search_params.add(p)},A.hash),async fetch(p,d){p instanceof Request&&(d={body:p.method==="GET"||p.method==="HEAD"?void 0:await p.blob(),cache:p.cache,credentials:p.credentials,headers:[...p.headers].length?p.headers:void 0,integrity:p.integrity,keepalive:p.keepalive,method:p.method,mode:p.mode,redirect:p.redirect,referrer:p.referrer,referrerPolicy:p.referrerPolicy,signal:p.signal,...d});const{resolved:v,promise:I}=Nt(p,d,n);return o&&f(v.href),I},setHeaders:()=>{},depends:f,parent(){return o&&(c.parent=!0),t()},untrack(p){o=!1;try{return p()}finally{o=!0}}};i=await l.universal.load.call(null,m)??null}return{node:l,loader:e,server:s,universal:(u=l.universal)!=null&&u.load?{type:"data",data:i,uses:c}:null,data:i??(s==null?void 0:s.data)??null,slash:((_=l.universal)==null?void 0:_.trailingSlash)??(s==null?void 0:s.slash)}}function Nt(e,t,n){let r=e instanceof Request?e.url:e;const a=new URL(r,n);a.origin===n.origin&&(r=a.href.slice(n.origin.length));const s=be?tn(r,a.href,t):en(r,t);return{resolved:a,promise:s}}function lt(e,t,n,r,a,s){if(We)return!0;if(!a)return!1;if(a.parent&&e||a.route&&t||a.url&&n)return!0;for(const i of a.search_params)if(r.has(i))return!0;for(const i of a.params)if(s[i]!==y.params[i])return!0;for(const i of a.dependencies)if(ye.some(o=>o(new URL(i))))return!0;return!1}function ze(e,t){return(e==null?void 0:e.type)==="data"?e:(e==null?void 0:e.type)==="skip"?t??null:null}function jn(e,t){if(!e)return new Set(t.searchParams.keys());const n=new Set([...e.searchParams.keys(),...t.searchParams.keys()]);for(const r of n){const a=e.searchParams.getAll(r),s=t.searchParams.getAll(r);a.every(i=>s.includes(i))&&s.every(i=>a.includes(i))&&n.delete(r)}return n}function ft({error:e,url:t,route:n,params:r}){return{type:"loaded",state:{error:e,url:t,route:n,params:r,branch:[]},props:{page:Ze(R),constructors:[]}}}async function Xe({id:e,invalidating:t,url:n,params:r,route:a,preload:s}){if((L==null?void 0:L.id)===e)return J.delete(L.token),L.promise;const{errors:i,layouts:o,leaf:c}=a,l=[...o,c];i.forEach(g=>g==null?void 0:g().catch(()=>{})),l.forEach(g=>g==null?void 0:g[1]().catch(()=>{}));let h=null;const u=y.url?e!==Ae(y.url):!1,_=y.route?a.id!==y.route.id:!1,f=jn(y.url,n);let m=!1;const p=l.map((g,w)=>{var F;const b=y.branch[w],S=!!(g!=null&&g[0])&&((b==null?void 0:b.loader)!==g[1]||lt(m,_,u,f,(F=b.server)==null?void 0:F.uses,r));return S&&(m=!0),S});if(p.some(Boolean)){try{h=await Ft(n,p)}catch(g){const w=await H(g,{url:n,params:r,route:{id:e}});return J.has(s)?ft({error:w,url:n,params:r,route:a}):Ie({status:_e(g),error:w,url:n,route:a})}if(h.type==="redirect")return h}const d=h==null?void 0:h.nodes;let v=!1;const I=l.map(async(g,w)=>{var Ue;if(!g)return;const b=y.branch[w],S=d==null?void 0:d[w];if((!S||S.type==="skip")&&g[1]===(b==null?void 0:b.loader)&&!lt(v,_,u,f,(Ue=b.universal)==null?void 0:Ue.uses,r))return b;if(v=!0,(S==null?void 0:S.type)==="error")throw S;return Je({loader:g[1],url:n,params:r,route:a,parent:async()=>{var et;const Qe={};for(let Le=0;Le<w;Le+=1)Object.assign(Qe,(et=await I[Le])==null?void 0:et.data);return Qe},server_data_node:ze(S===void 0&&g[0]?{type:"skip"}:S??null,g[0]?b==null?void 0:b.server:void 0)})});for(const g of I)g.catch(()=>{});const U=[];for(let g=0;g<l.length;g+=1)if(l[g])try{U.push(await I[g])}catch(w){if(w instanceof Ve)return{type:"redirect",location:w.location};if(J.has(s))return ft({error:await H(w,{params:r,url:n,route:{id:a.id}}),url:n,params:r,route:a});let b=_e(w),S;if(d!=null&&d.includes(w))b=w.status??b,S=w.error;else if(w instanceof Se)S=w.body;else{if(await D.updated.check())return await Ut(),await K(n);S=await H(w,{params:r,url:n,route:{id:a.id}})}const F=await $n(g,U,i);return F?ke({url:n,params:r,branch:U.slice(0,F.idx).concat(F.node),status:b,error:S,route:a}):await jt(n,{id:a.id},S,b)}else U.push(void 0);return ke({url:n,params:r,branch:U,status:200,error:null,route:a,form:t?void 0:null})}async function $n(e,t,n){for(;e--;)if(n[e]){let r=e;for(;!t[r];)r-=1;try{return{idx:r+1,node:{node:await n[e](),loader:n[e],data:{},server:null,universal:null}}}catch{continue}}}async function Ie({status:e,error:t,url:n,route:r}){const a={};let s=null;if(A.server_loads[0]===0)try{const o=await Ft(n,[!0]);if(o.type!=="data"||o.nodes[0]&&o.nodes[0].type!=="data")throw 0;s=o.nodes[0]??null}catch{(n.origin!==fe||n.pathname!==location.pathname||Ke)&&await K(n)}try{const o=await Je({loader:je,url:n,params:a,route:r,parent:()=>Promise.resolve({}),server_data_node:ze(s)}),c={node:await we(),loader:we,universal:null,server:null,data:null};return ke({url:n,params:a,branch:[o,c],status:e,error:t,route:null})}catch(o){if(o instanceof Ve)return Re(new URL(o.location,location.href),{},0);throw o}}async function Dn(e){const t=e.href;if(de.has(t))return de.get(t);let n;try{const r=(async()=>{let a=await A.hooks.reroute({url:new URL(e),fetch:async(s,i)=>Nt(s,i,e).promise})??e;if(typeof a=="string"){const s=new URL(e);A.hash?s.hash=a:s.pathname=a,a=s}return a})();de.set(t,r),n=await r}catch{de.delete(t);return}return n}async function ue(e,t){if(e&&!Ee(e,P,A.hash)){const n=await Dn(e);if(!n)return;const r=Fn(n);for(const a of Me){const s=a.exec(r);if(s)return{id:Ae(e),invalidating:t,route:a,params:Jt(s),url:e}}}}function Fn(e){return Yt(A.hash?e.hash.replace(/^#/,"").replace(/[?#].+/,""):e.pathname.slice(P.length))||"/"}function Ae(e){return(A.hash?e.hash.replace(/^#/,""):e.pathname)+e.search}function Ot({url:e,type:t,intent:n,delta:r}){let a=!1;const s=Bt(y,n,e,t);r!==void 0&&(s.navigation.delta=r);const i={...s.navigation,cancel:()=>{a=!0,s.reject(new Error("navigation cancelled"))}};return Q||He.forEach(o=>o(i)),a?null:s}async function pe({type:e,url:t,popped:n,keepfocus:r,noscroll:a,replace_state:s,state:i={},redirect_count:o=0,nav_token:c={},accept:l=st,block:h=st}){const u=$;$=c;const _=await ue(t,!1),f=Ot({url:t,type:e,delta:n==null?void 0:n.delta,intent:_});if(!f){h(),$===c&&($=u);return}const m=E,p=T;l(),Q=!0,be&&D.navigating.set(X.current=f.navigation);let d=_&&await Xe(_);if(!d){if(Ee(t,P,A.hash))return await K(t);d=await jt(t,{id:null},await H(new Fe(404,"Not Found",`Not found: ${t.pathname}`),{url:t,params:{},route:{id:null}}),404)}if(t=(_==null?void 0:_.url)||t,$!==c)return f.reject(new Error("navigation aborted")),!1;if(d.type==="redirect")if(o>=20)d=await Ie({status:500,error:await H(new Error("Redirect loop"),{url:t,params:{},route:{id:null}}),url:t,route:{id:null}});else return await Re(new URL(d.location,t).href,{},o+1,c),!1;else d.props.page.status>=400&&await D.updated.check()&&(await Ut(),await K(t));if(Tt(),Ge(m),Pt(p),d.props.page.url.pathname!==t.pathname&&(t.pathname=d.props.page.url.pathname),i=n?n.state:i,!n){const g=s?0:1,w={[G]:E+=g,[z]:T+=g,[bt]:i};(s?history.replaceState:history.pushState).call(history,w,"",t),s||xn(E,T)}if(L=null,d.props.page.state=i,be){y=d.state,d.props.page&&(d.props.page.url=t);const g=(await Promise.all(Array.from(Cn,w=>w(f.navigation)))).filter(w=>typeof w=="function");if(g.length>0){let w=function(){g.forEach(b=>{M.delete(b)})};g.push(w),g.forEach(b=>{M.add(b)})}Ye.$set(d.props),It(d.props.page),Lt=!0}else Ct(d,$e,!1);const{activeElement:v}=document;await Mt();const I=n?n.scroll:a?qe():null;if(it){const g=t.hash&&document.getElementById(decodeURIComponent(A.hash?t.hash.split("#")[2]??"":t.hash.slice(1)));I?scrollTo(I.x,I.y):g?g.scrollIntoView():scrollTo(0,0)}const U=document.activeElement!==v&&document.activeElement!==document.body;!r&&!U&&Mn(),it=!0,d.props.page&&Object.assign(R,d.props.page),Q=!1,e==="popstate"&&xt(T),f.fulfil(void 0),M.forEach(g=>g(f.navigation)),D.navigating.set(X.current=null)}async function jt(e,t,n,r){return e.origin===fe&&e.pathname===location.pathname&&!Ke?await Ie({status:r,error:n,url:e,route:t}):await K(e)}function Vn(){let e,t,n;j.addEventListener("mousemove",o=>{const c=o.target;clearTimeout(e),e=setTimeout(()=>{s(c,V.hover)},20)});function r(o){o.defaultPrevented||s(o.composedPath()[0],V.tap)}j.addEventListener("mousedown",r),j.addEventListener("touchstart",r,{passive:!0});const a=new IntersectionObserver(o=>{for(const c of o)c.isIntersecting&&(Ne(new URL(c.target.href)),a.unobserve(c.target))},{threshold:0});async function s(o,c){const l=St(o,j),h=l===t&&c>=n;if(!l||h)return;const{url:u,external:_,download:f}=Oe(l,P,A.hash);if(_||f)return;const m=me(l),p=u&&Ae(y.url)===Ae(u);if(!(m.reload||p))if(c<=m.preload_data){t=l,n=V.tap;const d=await ue(u,!1);if(!d)return;On(d)}else c<=m.preload_code&&(t=l,n=c,Ne(u))}function i(){a.disconnect();for(const o of j.querySelectorAll("a")){const{url:c,external:l,download:h}=Oe(o,P,A.hash);if(l||h)continue;const u=me(o);u.reload||(u.preload_code===V.viewport&&a.observe(o),u.preload_code===V.eager&&Ne(c))}}M.add(i),i()}function H(e,t){if(e instanceof Se)return e.body;const n=_e(e),r=Rn(e);return A.hooks.handleError({error:e,event:t,status:n,message:r})??{message:r}}function $t(e,t){ge(()=>(e.add(t),()=>{e.delete(t)}))}function na(e){$t(M,e)}function aa(e){$t(He,e)}function Bn(e,t={}){return e=new URL(kt(e)),e.origin!==fe?Promise.reject(new Error("goto: invalid URL")):Re(e,t,0)}function ra(e){return Dt(e),Nn()}function Dt(e){if(typeof e=="function")ye.push(e);else{const{href:t}=new URL(e,location.href);ye.push(n=>n.href===t)}}function qn(){var t;history.scrollRestoration="manual",addEventListener("beforeunload",n=>{let r=!1;if(ct(),!Q){const a=Bt(y,void 0,null,"leave"),s={...a.navigation,cancel:()=>{r=!0,a.reject(new Error("navigation cancelled"))}};He.forEach(i=>i(s))}r?(n.preventDefault(),n.returnValue=""):history.scrollRestoration="auto"}),addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&ct()}),(t=navigator.connection)!=null&&t.saveData||Vn(),j.addEventListener("click",async n=>{if(n.button||n.which!==1||n.metaKey||n.ctrlKey||n.shiftKey||n.altKey||n.defaultPrevented)return;const r=St(n.composedPath()[0],j);if(!r)return;const{url:a,external:s,target:i,download:o}=Oe(r,P,A.hash);if(!a)return;if(i==="_parent"||i==="_top"){if(window.parent!==window)return}else if(i&&i!=="_self")return;const c=me(r);if(!(r instanceof SVGAElement)&&a.protocol!==location.protocol&&!(a.protocol==="https:"||a.protocol==="http:")||o)return;const[h,u]=(A.hash?a.hash.replace(/^#/,""):a.href).split("#"),_=h===Te(location);if(s||c.reload&&(!_||!u)){Ot({url:a,type:"link"})?Q=!0:n.preventDefault();return}if(u!==void 0&&_){const[,f]=y.url.href.split("#");if(f===u){if(n.preventDefault(),u===""||u==="top"&&r.ownerDocument.getElementById("top")===null)window.scrollTo({top:0});else{const m=r.ownerDocument.getElementById(decodeURIComponent(u));m&&(m.scrollIntoView(),m.focus())}return}if(W=!0,Ge(E),e(a),!c.replace_state)return;W=!1}n.preventDefault(),await new Promise(f=>{requestAnimationFrame(()=>{setTimeout(f,0)}),setTimeout(f,100)}),await pe({type:"link",url:a,keepfocus:c.keepfocus,noscroll:c.noscroll,replace_state:c.replace_state??a.href===location.href})}),j.addEventListener("submit",n=>{if(n.defaultPrevented)return;const r=HTMLFormElement.prototype.cloneNode.call(n.target),a=n.submitter;if(((a==null?void 0:a.formTarget)||r.target)==="_blank"||((a==null?void 0:a.formMethod)||r.method)!=="get")return;const o=new URL((a==null?void 0:a.hasAttribute("formaction"))&&(a==null?void 0:a.formAction)||r.action);if(Ee(o,P,!1))return;const c=n.target,l=me(c);if(l.reload)return;n.preventDefault(),n.stopPropagation();const h=new FormData(c),u=a==null?void 0:a.getAttribute("name");u&&h.append(u,(a==null?void 0:a.getAttribute("value"))??""),o.search=new URLSearchParams(h).toString(),pe({type:"form",url:o,keepfocus:l.keepfocus,noscroll:l.noscroll,replace_state:l.replace_state??o.href===location.href})}),addEventListener("popstate",async n=>{var r;if((r=n.state)!=null&&r[G]){const a=n.state[G];if($={},a===E)return;const s=B[a],i=n.state[bt]??{},o=new URL(n.state[un]??location.href),c=n.state[z],l=y.url?Te(location)===Te(y.url):!1;if(c===T&&(Lt||l)){i!==R.state&&(R.state=i),e(o),B[E]=qe(),s&&scrollTo(s.x,s.y),E=a;return}const u=a-E;await pe({type:"popstate",url:o,popped:{state:i,scroll:s,delta:u},accept:()=>{E=a,T=c},block:()=>{history.go(-u)},nav_token:$})}else if(!W){const a=new URL(location.href);e(a),A.hash&&location.reload()}}),addEventListener("hashchange",()=>{W&&(W=!1,history.replaceState({...history.state,[G]:++E,[z]:T},"",location.href))});for(const n of document.querySelectorAll("link"))Pn.has(n.rel)&&(n.href=n.href);addEventListener("pageshow",n=>{n.persisted&&D.navigating.set(X.current=null)});function e(n){y.url=R.url=n,D.page.set(Ze(R)),D.page.notify()}}async function Gn(e,{status:t=200,error:n,node_ids:r,params:a,route:s,server_route:i,data:o,form:c}){Ke=!0;const l=new URL(location.href);let h;({params:a={},route:s={id:null}}=await ue(l,!1)||{}),h=Me.find(({id:f})=>f===s.id);let u,_=!0;try{const f=r.map(async(p,d)=>{const v=o[d];return v!=null&&v.uses&&(v.uses=Vt(v.uses)),Je({loader:A.nodes[p],url:l,params:a,route:s,parent:async()=>{const I={};for(let U=0;U<d;U+=1)Object.assign(I,(await f[U]).data);return I},server_data_node:ze(v)})}),m=await Promise.all(f);if(h){const p=h.layouts;for(let d=0;d<p.length;d++)p[d]||m.splice(d,0,void 0)}u=ke({url:l,params:a,branch:m,status:t,error:n,form:c,route:h??null})}catch(f){if(f instanceof Ve){await K(new URL(f.location,location.href));return}u=await Ie({status:_e(f),error:await H(f,{url:l,params:a,route:s}),url:l,route:s}),e.textContent="",_=!1}u.props.page&&(u.props.page.state={}),Ct(u,e,_)}async function Ft(e,t){var s;const n=new URL(e);n.pathname=Tn(e.pathname),e.pathname.endsWith("/")&&n.searchParams.append(En,"1"),n.searchParams.append(Sn,t.map(i=>i?"1":"0").join(""));const r=window.fetch,a=await r(n.href,{});if(!a.ok){let i;throw(s=a.headers.get("content-type"))!=null&&s.includes("application/json")?i=await a.json():a.status===404?i="Not Found":a.status===500&&(i="Internal Error"),new Se(a.status,i)}return new Promise(async i=>{var _;const o=new Map,c=a.body.getReader(),l=new TextDecoder;function h(f){return bn(f,{...A.decoders,Promise:m=>new Promise((p,d)=>{o.set(m,{fulfil:p,reject:d})})})}let u="";for(;;){const{done:f,value:m}=await c.read();if(f&&!u)break;for(u+=!m&&u?`
2
- `:l.decode(m,{stream:!0});;){const p=u.indexOf(`
3
- `);if(p===-1)break;const d=JSON.parse(u.slice(0,p));if(u=u.slice(p+1),d.type==="redirect")return i(d);if(d.type==="data")(_=d.nodes)==null||_.forEach(v=>{(v==null?void 0:v.type)==="data"&&(v.uses=Vt(v.uses),v.data=h(v.data))}),i(d);else if(d.type==="chunk"){const{id:v,data:I,error:U}=d,g=o.get(v);o.delete(v),U?g.reject(h(U)):g.fulfil(h(I))}}}})}function Vt(e){return{dependencies:new Set((e==null?void 0:e.dependencies)??[]),params:new Set((e==null?void 0:e.params)??[]),parent:!!(e!=null&&e.parent),route:!!(e!=null&&e.route),url:!!(e!=null&&e.url),search_params:new Set((e==null?void 0:e.search_params)??[])}}function Mn(){const e=document.querySelector("[autofocus]");if(e)e.focus();else{const t=document.body,n=t.getAttribute("tabindex");t.tabIndex=-1,t.focus({preventScroll:!0,focusVisible:!1}),n!==null?t.setAttribute("tabindex",n):t.removeAttribute("tabindex");const r=getSelection();if(r&&r.type!=="None"){const a=[];for(let s=0;s<r.rangeCount;s+=1)a.push(r.getRangeAt(s));setTimeout(()=>{if(r.rangeCount===a.length){for(let s=0;s<r.rangeCount;s+=1){const i=a[s],o=r.getRangeAt(s);if(i.commonAncestorContainer!==o.commonAncestorContainer||i.startContainer!==o.startContainer||i.endContainer!==o.endContainer||i.startOffset!==o.startOffset||i.endOffset!==o.endOffset)return}r.removeAllRanges()}})}}}function Bt(e,t,n,r){var c,l;let a,s;const i=new Promise((h,u)=>{a=h,s=u});return i.catch(()=>{}),{navigation:{from:{params:e.params,route:{id:((c=e.route)==null?void 0:c.id)??null},url:e.url},to:n&&{params:(t==null?void 0:t.params)??null,route:{id:((l=t==null?void 0:t.route)==null?void 0:l.id)??null},url:n},willUnload:!t,type:r,complete:i},fulfil:a,reject:s}}function Ze(e){return{data:e.data,error:e.error,form:e.form,params:e.params,route:e.route,state:e.state,status:e.status,url:e.url}}function Hn(e){const t=new URL(e);return t.hash=decodeURIComponent(e.hash),t}export{na as a,P as b,aa as c,zn as d,ta as e,Bn as g,ra as i,Xn as l,ge as o,R as p,D as s};
@@ -1 +0,0 @@
1
- import{M as S,o as D,R as M,q as _,H as V,S as T,A as f,z as v,F as u,N as I,V as w,W as g,v as O,X as P,Y as H,Z as F,_ as W,a0 as Y,a1 as j,C as z,p as X,b as $,P as q,a as x}from"./CH6P3X75.js";import{a as B,r as N,h as y}from"./D4whDBUi.js";import{b as G}from"./RmD8FzRo.js";function oe(e){return e.endsWith("capture")&&e!=="gotpointercapture"&&e!=="lostpointercapture"}const U=["beforeinput","click","change","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"];function se(e){return U.includes(e)}const Z={formnovalidate:"formNoValidate",ismap:"isMap",nomodule:"noModule",playsinline:"playsInline",readonly:"readOnly",defaultvalue:"defaultValue",defaultchecked:"defaultChecked",srcobject:"srcObject",novalidate:"noValidate",allowfullscreen:"allowFullscreen",disablepictureinpicture:"disablePictureInPicture",disableremoteplayback:"disableRemotePlayback"};function ie(e){return e=e.toLowerCase(),Z[e]??e}const J=["touchstart","touchmove"];function K(e){return J.includes(e)}const Q=["textarea","script","style","title"];function de(e){return Q.includes(e)}let r;function ee(){r=void 0}function ue(e){let t=null,a=_;var d;if(_){for(t=u,r===void 0&&(r=I(document.head));r!==null&&(r.nodeType!==8||r.data!==V);)r=T(r);r===null?f(!1):r=v(T(r))}_||(d=document.head.appendChild(S()));try{D(()=>e(d),M)}finally{a&&(f(!0),r=u,v(t))}}let A=!0;function le(e){A=e}function ce(e,t){var a=t==null?"":typeof t=="object"?t+"":t;a!==(e.__t??(e.__t=e.nodeValue))&&(e.__t=a,e.nodeValue=a+"")}function te(e,t){return L(e,t)}function fe(e,t){w(),t.intro=t.intro??!1;const a=t.target,d=_,p=u;try{for(var n=I(a);n&&(n.nodeType!==8||n.data!==V);)n=T(n);if(!n)throw g;f(!0),v(n),O();const l=L(e,{...t,anchor:n});if(u===null||u.nodeType!==8||u.data!==P)throw H(),g;return f(!1),l}catch(l){if(l===g)return t.recover===!1&&F(),w(),W(a),f(!1),te(e,t);throw l}finally{f(d),v(p),ee()}}const c=new Map;function L(e,{target:t,anchor:a,props:d={},events:p,context:n,intro:l=!0}){w();var m=new Set,E=i=>{for(var o=0;o<i.length;o++){var s=i[o];if(!m.has(s)){m.add(s);var h=K(s);t.addEventListener(s,y,{passive:h});var k=c.get(s);k===void 0?(document.addEventListener(s,y,{passive:h}),c.set(s,1)):c.set(s,k+1)}}};E(Y(B)),N.add(E);var b=void 0,C=j(()=>{var i=a??t.appendChild(S());return z(()=>{if(n){X({});var o=$;o.c=n}p&&(d.$$events=p),_&&G(i,null),A=l,b=e(i,d)||{},A=!0,_&&(q.nodes_end=u),n&&x()}),()=>{var h;for(var o of m){t.removeEventListener(o,y);var s=c.get(o);--s===0?(document.removeEventListener(o,y),c.delete(o)):c.set(o,s)}N.delete(E),i!==a&&((h=i.parentNode)==null||h.removeChild(i))}});return R.set(b,C),b}let R=new WeakMap;function _e(e,t){const a=R.get(e);return a?(R.delete(e),a(t)):Promise.resolve()}export{ue as a,le as b,oe as c,se as d,A as e,fe as h,de as i,te as m,ie as n,ce as s,_e as u};
@@ -1 +0,0 @@
1
- import"./CWj6FrbW.js";import{p as ie,c as b,g as s,d as m,r as _,t as ae,a as ne,J as M,a7 as q,u as te,f as se,s as Q}from"./CH6P3X75.js";import{n as $e,a as o,t as x,c as ve,d as ue}from"./RmD8FzRo.js";import{a as f,s as ge,i as H}from"./DA6bFLPR.js";import{i as et,j as tt,k as st,l as B,n as it,c as at,s as nt,o as lt,p as ot,q as rt,t as dt,v as ct,w as mt,G as ft,L as vt,S as ut,x as gt,y as _t}from"./DQe_kdRt.js";import{p as _e,r as pt,a as E,b as ht}from"./DQXoLcsF.js";import{o as pe}from"./DEgUu98i.js";import{u as he}from"./6t3IJ0vQ.js";import{r as St}from"./H7C68rOM.js";import{u as bt}from"./8NsknIT2.js";import{c as xt,u as yt}from"./BND_-4Kp.js";import"./keKYsoph.js";import"./69_IOA4Y.js";import{P as wt,u as Pt}from"./CCx7Ho51.js";import{S as It}from"./D6r9vr07.js";import{b as Ft}from"./CxFKfZ9T.js";import{b as jt}from"./D4whDBUi.js";import{u as Ct,i as Ot}from"./CWPZrTTJ.js";var Ht=$e('<svg style="position: absolute; top: 0; left: 0;"><g></g></svg>');function Rt(e,t){ie(t,!0);const[i,d]=ge(),v=()=>f(y,"$isHidden",i),p=_e(t,"sampleImageObjectFit",3,"contain"),{isHidden:y}=et(),h=m(()=>t.sample.annotations.filter(w=>w.annotation_type!=="classification"));var n=Ht(),c=b(n);let u;tt(c,21,()=>s(h),st,(w,l)=>{It(w,{get annotation(){return s(l)},get showLabel(){return t.showLabel},get imageWidth(){return t.sample.width}})}),_(c),_(n),ae(w=>{B(n,"viewBox",`0 0 ${t.sample.width} ${t.sample.height}`),B(n,"preserveAspectRatio",p()==="contain"?"xMidYMid meet":"xMidYMid slice"),B(n,"width",t.containerWidth),B(n,"height",t.containerHeight),u=it(c,0,"",null,u,w)},[()=>({invisible:v()})]),o(e,n),ne(),d()}var At=x("<img>");function kt(e,t){ie(t,!0);const i=_e(t,"objectFit",3,"contain"),d=pt(t,["$$slots","$$events","$$legacy","sample","objectFit"]),{class:v,...p}=d,{getDatasetVersion:y}=he();let h=q("");pe(async()=>{var u;(u=t.sample)!=null&&u.dataset_id&&M(h,E(await y(t.sample.dataset_id)))});var n=At();let c;ae(u=>c=nt(n,c,{src:`${wt}/sample/${t.sample.sample_id}${s(h)?`?v=${s(h)}`:""}`,alt:t.sample.file_path_abs,class:u,style:`--object-fit: ${i()??""}`,loading:"lazy",...p},"svelte-1c6bz0a"),[()=>at("sample-image rounded-lg bg-black",v)]),jt(n),o(e,n),ne()}const Mt=e=>{const t=["readSamplesInfinite",e.dataset_id,e.mode,e.mode==="normal"?e.filters:e.classifierSamples,{metadata_values:e.metadata_values,text_embedding:e.text_embedding}];return Ot({queryKey:t,queryFn:async({pageParam:i=0,signal:d})=>{const v=Nt(e,i),{data:p}=await Ft({path:{dataset_id:e.dataset_id},body:v,signal:d,throwOnError:!0});return p},initialPageParam:0,getNextPageParam:i=>i.nextCursor??void 0,enabled:Vt(e)})},Nt=(e,t)=>{var d,v;const i={pagination:{offset:t,limit:100},text_embedding:e.text_embedding,filters:{metadata_filters:e.metadata_values?xt(e.metadata_values):void 0}};if(e.mode==="classifier"&&e.classifierSamples){const p=[...e.classifierSamples.positiveSampleIds,...e.classifierSamples.negativeSampleIds];return{...i,sample_ids:p}}else if(e.mode==="normal"&&e.filters)return{...i,filters:{...i.filters,annotation_label_ids:(d=e.filters.annotation_label_ids)!=null&&d.length?e.filters.annotation_label_ids:void 0,tag_ids:(v=e.filters.tag_ids)!=null&&v.length?e.filters.tag_ids:void 0,width:e.filters.dimensions?{min:e.filters.dimensions.min_width,max:e.filters.dimensions.max_width}:void 0,height:e.filters.dimensions?{min:e.filters.dimensions.min_height,max:e.filters.dimensions.max_height}:void 0}};return i},Vt=e=>e.mode==="classifier"?!!(e.classifierSamples&&(e.classifierSamples.positiveSampleIds.length>0||e.classifierSamples.negativeSampleIds.length>0)):!0,Lt=e=>{const t=Mt(e),i=lt(t),d=Ct();return{samples:i,refresh:()=>{d.invalidateQueries({queryKey:t.queryKey})}}};var zt=x('<div class="flex h-full w-full items-center justify-center"><div>Loading samples...</div></div>'),qt=x('<div class="flex h-full w-full items-center justify-center"><div class="mb-2 font-medium">Error loading samples</div></div>'),Bt=x('<div class="flex h-full w-full items-center justify-center"><div class="text-center text-muted-foreground"><div class="mb-2 text-lg font-medium">No samples found</div> <div class="text-sm"><!></div></div></div>'),Et=x('<div class="relative"><div class="absolute right-7 top-1 z-10"><!></div> <a data-testid="sample-link" class="block"><!> <!></a></div>'),Tt=x('<div class="flex justify-center p-4"><!></div>'),Wt=x("<!> <!>",1),Gt=x('<div class="viewport flex-1 svelte-gzepom"><!></div>'),Qt=x('<div class="flex h-full w-full items-center justify-center"><div>Loading...</div></div>');function fs(e,t){ie(t,!0);const[i,d]=ge(),v=()=>f(Pe,"$isCreateClassifiersPanelOpen",i),p=()=>f(Ie,"$isRefineClassifiersPanelOpen",i),y=()=>f(je,"$classifierSamples",i),h=()=>f(t.selectedAnnotationFilterIds,"$selectedAnnotationFilterIds",i),n=()=>f(xe,"$tagsSelected",i),c=()=>f(ye,"$dimensions",i),u=()=>f(we,"$metadataValues",i),w=()=>f(t.textEmbedding,"$textEmbedding",i),l=()=>f(s(ke),"$infiniteSamples",i),le=()=>f(be,"$gridViewSampleRenderingStore",i),Se=()=>f(Fe,"$selectedSampleIds",i),{gridViewSampleRenderingStore:be}=ot(),{tagsSelected:xe}=Pt({dataset_id:t.dataset_id,kind:["sample"]}),{dimensionsValues:ye}=bt(),{metadataValues:we}=yt(t.dataset_id),{isCreateClassifiersPanelOpen:Pe}=ct(),{isRefineClassifiersPanelOpen:Ie}=mt(),{selectedSampleIds:Fe,classifierSamples:je,toggleSampleSelection:Ce,getDatasetVersion:Oe,setSamplesTotalCount:He}=he(),N=m(()=>v()||p()),Re=m(()=>{var a,r;return{dataset_id:t.dataset_id,mode:s(N)?"classifier":"normal",...s(N)?{classifierSamples:y()}:{filters:{annotation_label_ids:(a=h())!=null&&a.length?h():void 0,tag_ids:n().size>0?Array.from(n()):void 0,dimensions:c()}},metadata_values:u(),text_embedding:(r=w())==null?void 0:r.embedding}}),Ae=m(()=>Lt(s(Re))),ke=m(()=>s(Ae).samples),P=m(()=>{var a;return((a=l().data)==null?void 0:a.pages.flatMap(r=>r.data))||[]});let C=q(null),oe=q(!1),D=q(E(le())),K=q(0);const{initialize:Me,savePosition:Ne,getRestoredPosition:Ve}=rt("samples_scroll");pe(async()=>{Me(),await Oe(t.dataset_id),M(oe,!0)});const re=m(()=>{var r;return[h().join(","),Array.from(n()).join(","),`${c().min_width}-${c().max_width}`,`${c().min_height}-${c().max_height}`,JSON.stringify(u()),((r=w())==null?void 0:r.queryText)||"",s(N)?"classifier":"normal",s(N)&&y()?`pos:${y().positiveSampleIds.length},neg:${y().negativeSampleIds.length}`:""].filter(Boolean).join("|")}),Le=m(()=>Ve(s(re)));function ze(a){const r=a.target.scrollTop;Ne(r,s(re))}te(()=>{M(D,E(le()))}),te(()=>{var a;l().isSuccess&&((a=l().data)==null?void 0:a.pages.length)>0&&He(l().data.pages[0].total_count)}),te(()=>{if(!s(C))return;M(K,E(s(C).clientHeight));const a=new ResizeObserver(()=>{s(C)&&M(K,E(s(C).clientHeight))});return a.observe(s(C)),()=>{a.disconnect()}});function qe(){l().hasNextPage&&!l().isFetchingNextPage&&l().fetchNextPage()}const de=16,Be=dt(),[Ee,Dt]=Be;var ce=ve(),Te=se(ce);{var We=a=>{var r=zt();o(a,r)},Ge=(a,r)=>{{var Qe=R=>{var J=qt();o(R,J)},De=(R,J)=>{{var Ke=A=>{var V=Bt(),T=b(V),W=Q(b(T),2),I=b(W);{var F=j=>{var L=ue("No samples available for this classifier.");o(j,L)},U=j=>{var L=ue("This dataset doesn't contain any samples.");o(j,L)};H(I,j=>{s(N)?j(F):j(U,!1)})}_(W),_(T),_(V),o(A,V)},Je=(A,V)=>{{var T=I=>{var F=Gt(),U=b(F);const j=m(()=>t.sampleHeight+de),L=m(()=>t.sampleWidth+de);ft(U,{get itemCount(){return s(P).length},get itemHeight(){return s(j)},get itemWidth(){return s(L)},get height(){return s(K)},get scrollPosition(){return s(Le)},onscroll:ze,class:"overflow-none overflow-y-auto dark:[color-scheme:dark]",get style(){return`--sample-width: ${t.sampleWidth??""}px; --sample-height: ${t.sampleHeight??""}px;`},overScan:100,item:(Y,S)=>{let g=()=>S==null?void 0:S().index,X=()=>S==null?void 0:S().style;var G=ve(),Z=se(G);{var z=O=>{var k=Et(),$=b(k),Ue=b($);const Ye=m(()=>Se().has(s(P)[g()].sample_id));ut(Ue,{onSelect:()=>Ce(s(P)[g()].sample_id),get isSelected(){return s(Ye)}}),_($);var ee=Q($,2),fe=b(ee);kt(fe,{get sample(){return s(P)[g()]},get objectFit(){return s(D)}});var Xe=Q(fe,2);Rt(Xe,{get sample(){return s(P)[g()]},get containerWidth(){return t.sampleWidth},get sampleImageObjectFit(){return s(D)},get containerHeight(){return t.sampleHeight}}),_(ee),_(k),ae(Ze=>{gt(k,X()),B(ee,"href",Ze)},[()=>Ee(St.toSample({sampleId:s(P)[g()].sample_id,datasetId:t.dataset_id,sampleIndex:g()}),void 0)]),o(O,k)};H(Z,O=>{s(P)[g()]&&O(z)})}o(Y,G)},footer:Y=>{var S=Wt(),g=se(S);const X=m(()=>!l().hasNextPage||l().isFetchingNextPage);vt(g,{onIntersect:qe,get disabled(){return s(X)}});var G=Q(g,2);{var Z=z=>{var O=Tt(),k=b(O);_t(k,{}),_(O),o(z,O)};H(G,z=>{l().isFetchingNextPage&&z(Z)})}o(Y,S)},$$slots:{item:!0,footer:!0}}),_(F),ht(F,me=>M(C,me),()=>s(C)),o(I,F)},W=I=>{var F=Qt();o(I,F)};H(A,I=>{s(oe)?I(T):I(W,!1)},V)}};H(R,A=>{l().isSuccess&&s(P).length===0?A(Ke):A(Je,!1)},J)}};H(a,R=>{l().isError?R(Qe):R(De,!1)},r)}};H(Te,a=>{l().isPending?a(We):a(Ge,!1)})}o(e,ce),ne(),d()}export{fs as S};
@@ -1 +0,0 @@
1
- import{a8 as I,a9 as F,aa as G,ab as p,ac as Z,g as b,U as g,J as w,ad as x,P as z,ae as J,af as M,a6 as V,q as B,v as W,o as k,E as H,C as Q,D as X,F as ee,ag as re,ah as te,i as T,a2 as ne,ai as ie,aj as se,d as C,ak as ae,al as fe,am as ue,an as le,ao as Y,ap as oe,aq as ce,G as de,ar as ve,as as D}from"./CH6P3X75.js";import{c as _e}from"./DA6bFLPR.js";import{l as he}from"./DIeogL5L.js";function S(e,r=null,s){if(typeof e!="object"||e===null||I in e)return e;const a=M(e);if(a!==F&&a!==G)return e;var n=new Map,l=V(e),h=p(0);l&&n.set("length",p(e.length));var d;return new Proxy(e,{defineProperty(c,t,i){(!("value"in i)||i.configurable===!1||i.enumerable===!1||i.writable===!1)&&J();var f=n.get(t);return f===void 0?(f=p(i.value),n.set(t,f)):w(f,S(i.value,d)),!0},deleteProperty(c,t){var i=n.get(t);if(i===void 0)t in c&&n.set(t,p(g));else{if(l&&typeof t=="string"){var f=n.get("length"),u=Number(t);Number.isInteger(u)&&u<f.v&&w(f,u)}w(i,g),U(h)}return!0},get(c,t,i){var v;if(t===I)return e;var f=n.get(t),u=t in c;if(f===void 0&&(!u||(v=x(c,t))!=null&&v.writable)&&(f=p(S(u?c[t]:g,d)),n.set(t,f)),f!==void 0){var o=b(f);return o===g?void 0:o}return Reflect.get(c,t,i)},getOwnPropertyDescriptor(c,t){var i=Reflect.getOwnPropertyDescriptor(c,t);if(i&&"value"in i){var f=n.get(t);f&&(i.value=b(f))}else if(i===void 0){var u=n.get(t),o=u==null?void 0:u.v;if(u!==void 0&&o!==g)return{enumerable:!0,configurable:!0,value:o,writable:!0}}return i},has(c,t){var o;if(t===I)return!0;var i=n.get(t),f=i!==void 0&&i.v!==g||Reflect.has(c,t);if(i!==void 0||z!==null&&(!f||(o=x(c,t))!=null&&o.writable)){i===void 0&&(i=p(f?S(c[t],d):g),n.set(t,i));var u=b(i);if(u===g)return!1}return f},set(c,t,i,f){var E;var u=n.get(t),o=t in c;if(l&&t==="length")for(var v=i;v<u.v;v+=1){var y=n.get(v+"");y!==void 0?w(y,g):v in c&&(y=p(g),n.set(v+"",y))}u===void 0?(!o||(E=x(c,t))!=null&&E.writable)&&(u=p(void 0),w(u,S(i,d)),n.set(t,u)):(o=u.v!==g,w(u,S(i,d)));var P=Reflect.getOwnPropertyDescriptor(c,t);if(P!=null&&P.set&&P.set.call(f,i),!o){if(l&&typeof t=="string"){var O=n.get("length"),A=Number(t);Number.isInteger(A)&&A>=O.v&&w(O,A+1)}U(h)}return!0},ownKeys(c){b(h);var t=Reflect.ownKeys(c).filter(u=>{var o=n.get(u);return o===void 0||o.v!==g});for(var[i,f]of n)f.v!==g&&!(i in c)&&t.push(i);return t},setPrototypeOf(){Z()}})}function U(e,r=1){w(e,e.v+r)}function Ee(e,r,s){B&&W();var a=e,n,l;k(()=>{n!==(n=r())&&(l&&(X(l),l=null),n&&(l=Q(()=>s(a,n))))},H),B&&(a=ee)}function j(e,r){return e===r||(e==null?void 0:e[I])===r}function Re(e={},r,s,a){return re(()=>{var n,l;return te(()=>{n=l,l=[],T(()=>{e!==s(...l)&&(r(e,...l),n&&j(s(...n),e)&&r(null,...n))})}),()=>{ne(()=>{l&&j(s(...l),e)&&r(null,...l)})}}),e}const ge={get(e,r){if(!e.exclude.includes(r))return e.props[r]},set(e,r){return!1},getOwnPropertyDescriptor(e,r){if(!e.exclude.includes(r)&&r in e.props)return{enumerable:!0,configurable:!0,value:e.props[r]}},has(e,r){return e.exclude.includes(r)?!1:r in e.props},ownKeys(e){return Reflect.ownKeys(e.props).filter(r=>!e.exclude.includes(r))}};function Se(e,r,s){return new Proxy({props:e,exclude:r},ge)}const ye={get(e,r){let s=e.props.length;for(;s--;){let a=e.props[s];if(D(a)&&(a=a()),typeof a=="object"&&a!==null&&r in a)return a[r]}},set(e,r,s){let a=e.props.length;for(;a--;){let n=e.props[a];D(n)&&(n=n());const l=x(n,r);if(l&&l.set)return l.set(s),!0}return!1},getOwnPropertyDescriptor(e,r){let s=e.props.length;for(;s--;){let a=e.props[s];if(D(a)&&(a=a()),typeof a=="object"&&a!==null&&r in a){const n=x(a,r);return n&&!n.configurable&&(n.configurable=!0),n}}},has(e,r){if(r===I||r===Y)return!1;for(let s of e.props)if(D(s)&&(s=s()),s!=null&&r in s)return!0;return!1},ownKeys(e){const r=[];for(let s of e.props){D(s)&&(s=s());for(const a in s)r.includes(a)||r.push(a)}return r}};function Ie(...e){return new Proxy({props:e},ye)}function K(e){var r;return((r=e.ctx)==null?void 0:r.d)??!1}function xe(e,r,s,a){var q;var n=(s&ce)!==0,l=!he||(s&oe)!==0,h=(s&le)!==0,d=(s&ve)!==0,c=!1,t;h?[t,c]=_e(()=>e[r]):t=e[r];var i=I in e||Y in e,f=h&&(((q=x(e,r))==null?void 0:q.set)??(i&&r in e&&(_=>e[r]=_)))||void 0,u=a,o=!0,v=!1,y=()=>(v=!0,o&&(o=!1,d?u=T(a):u=a),u);t===void 0&&a!==void 0&&(f&&l&&ie(),t=y(),f&&f(t));var P;if(l)P=()=>{var _=e[r];return _===void 0?y():(o=!0,v=!1,_)};else{var O=(n?C:ae)(()=>e[r]);O.f|=se,P=()=>{var _=b(O);return _!==void 0&&(u=void 0),_===void 0?u:_}}if(!(s&fe))return P;if(f){var A=e.$$legacy;return function(_,R){return arguments.length>0?((!l||!R||A||c)&&f(R?P():_),_):P()}}var E=!1,L=de(t),m=C(()=>{var _=P(),R=b(L);return E?(E=!1,R):L.v=_});return h&&b(m),n||(m.equals=ue),function(_,R){if(arguments.length>0){const N=R?b(m):l&&h?S(_):_;if(!m.equals(N)){if(E=!0,w(L,N),v&&u!==void 0&&(u=N),K(m))return _;T(()=>b(m))}return _}return K(m)?m.v:b(m)}}const Pe="modulepreload",be=function(e,r){return new URL(e,r).href},$={},Oe=function(r,s,a){let n=Promise.resolve();if(s&&s.length>0){const h=document.getElementsByTagName("link"),d=document.querySelector("meta[property=csp-nonce]"),c=(d==null?void 0:d.nonce)||(d==null?void 0:d.getAttribute("nonce"));n=Promise.allSettled(s.map(t=>{if(t=be(t,a),t in $)return;$[t]=!0;const i=t.endsWith(".css"),f=i?'[rel="stylesheet"]':"";if(!!a)for(let v=h.length-1;v>=0;v--){const y=h[v];if(y.href===t&&(!i||y.rel==="stylesheet"))return}else if(document.querySelector(`link[href="${t}"]${f}`))return;const o=document.createElement("link");if(o.rel=i?"stylesheet":Pe,i||(o.as="script"),o.crossOrigin="",o.href=t,c&&o.setAttribute("nonce",c),document.head.appendChild(o),i)return new Promise((v,y)=>{o.addEventListener("load",v),o.addEventListener("error",()=>y(new Error(`Unable to preload CSS for ${t}`)))})}))}function l(h){const d=new Event("vite:preloadError",{cancelable:!0});if(d.payload=h,window.dispatchEvent(d),!d.defaultPrevented)throw h}return n.then(h=>{for(const d of h||[])d.status==="rejected"&&l(d.reason);return r().catch(l)})};export{Oe as _,S as a,Re as b,Ee as c,xe as p,Se as r,Ie as s};