lightly-studio 0.3.4__py3-none-any.whl → 0.4.1__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 (117) hide show
  1. lightly_studio/__init__.py +1 -2
  2. lightly_studio/api/db_tables.py +3 -0
  3. lightly_studio/api/features.py +3 -5
  4. lightly_studio/api/routes/api/dataset.py +5 -3
  5. lightly_studio/api/routes/api/dataset_tag.py +10 -0
  6. lightly_studio/api/routes/api/embeddings2d.py +6 -47
  7. lightly_studio/core/dataset.py +89 -2
  8. lightly_studio/core/dataset_query/__init__.py +14 -0
  9. lightly_studio/core/dataset_query/dataset_query.py +98 -2
  10. lightly_studio/core/dataset_query/sample_field.py +11 -2
  11. lightly_studio/core/sample.py +33 -1
  12. lightly_studio/db_manager.py +4 -2
  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.B-Bn8V7R.css +1 -0
  15. lightly_studio/dist_lightly_studio_view_app/_app/immutable/assets/Samples.CTl60pQb.css +1 -0
  16. lightly_studio/dist_lightly_studio_view_app/_app/immutable/assets/_layout.CxuTMeYy.css +1 -0
  17. lightly_studio/dist_lightly_studio_view_app/_app/immutable/assets/transform.Bte-FZ4V.css +1 -0
  18. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/7XnHnNk_.js +1 -0
  19. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/BDE1kT04.js +2 -0
  20. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/{DQ8aZ1o-.js → BHoO7UL_.js} +2 -2
  21. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/{CZGpyrcA.js → BTpMiPuk.js} +1 -1
  22. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/BbG6fgnL.js +1 -0
  23. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/Bip0vTKl.js +1 -0
  24. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/{D_JuJOO3.js → BzYRexN9.js} +1 -1
  25. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/{Frwd2CjB.js → C3xJX0nD.js} +1 -1
  26. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/C5oezL0m.js +39 -0
  27. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/{H4l0JFh9.js → CANX9QXL.js} +1 -1
  28. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/CAPx0Bfm.js +1 -0
  29. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/CEPpkZIV.js +1 -0
  30. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/ChO13USc.js +96 -0
  31. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/{DzBTnFhV.js → Cj4nZbtb.js} +1 -1
  32. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/{Bqz7dyEC.js → CmNXvs5e.js} +1 -1
  33. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/CpbA3HU7.js +2 -0
  34. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/{DSxvnAMh.js → D9WxTSWa.js} +1 -1
  35. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/DELrRF6e.js +4 -0
  36. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/{sLqs1uaK.js → DFib3GIP.js} +1 -1
  37. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/{CSCQddQS.js → DNJnBfHs.js} +1 -1
  38. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/DVxjPOJB.js +1 -0
  39. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/DeAqvaPB.js +1 -0
  40. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/DgCXCApo.js +438 -0
  41. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/DmGM9V9Q.js +1 -0
  42. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/DoEId1MK.js +1 -0
  43. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/DqhovIS0.js +1 -0
  44. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/SiegjVo0.js +1 -0
  45. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/gBp1tBnA.js +1 -0
  46. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/xQhUoIl9.js +1 -0
  47. lightly_studio/dist_lightly_studio_view_app/_app/immutable/entry/app.CED-eiXl.js +2 -0
  48. lightly_studio/dist_lightly_studio_view_app/_app/immutable/entry/start.D6UcpqyO.js +1 -0
  49. lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/0.waSqEGqm.js +4 -0
  50. lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/{1.Cdy-7S5q.js → 1.Bb_sKkYl.js} +1 -1
  51. lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/10.D9Uicmfq.js +1 -0
  52. lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/11.DKnK0EcJ.js +1 -0
  53. lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/13.D7dGgxYC.js +1 -0
  54. lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/{2.BIldfkxL.js → 2.BzK1sjoM.js} +144 -105
  55. lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/{3.BC9z_TWM.js → 3.B08UPFst.js} +1 -1
  56. lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/{4.D8X_Ch5n.js → 4.C19_Nx95.js} +1 -1
  57. lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/5.B2cR7brs.js +39 -0
  58. lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/{6.DRA5Ru_2.js → 6.C9Y2LZxG.js} +1 -1
  59. lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/{7.WVBsruHQ.js → 7.CEbWmgIF.js} +1 -1
  60. lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/8.Con-GcPz.js +20 -0
  61. lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/9.DW7FBNNH.js +1 -0
  62. lightly_studio/dist_lightly_studio_view_app/_app/version.json +1 -1
  63. lightly_studio/dist_lightly_studio_view_app/index.html +13 -14
  64. lightly_studio/models/annotation/annotation_base.py +9 -0
  65. lightly_studio/models/caption.py +1 -0
  66. lightly_studio/models/dataset.py +6 -0
  67. lightly_studio/models/sample.py +8 -1
  68. lightly_studio/models/settings.py +5 -0
  69. lightly_studio/models/two_dim_embedding.py +16 -0
  70. lightly_studio/resolvers/annotation_resolver/get_all.py +3 -1
  71. lightly_studio/resolvers/dataset_resolver.py +20 -5
  72. lightly_studio/resolvers/sample_embedding_resolver.py +44 -2
  73. lightly_studio/resolvers/sample_resolver.py +2 -3
  74. lightly_studio/resolvers/settings_resolver.py +3 -0
  75. lightly_studio/resolvers/twodim_embedding_resolver.py +119 -0
  76. lightly_studio/selection/__init__.py +1 -0
  77. lightly_studio/selection/mundig.py +41 -0
  78. lightly_studio/selection/select.py +70 -1
  79. lightly_studio/selection/selection_config.py +1 -1
  80. lightly_studio-0.4.1.dist-info/METADATA +78 -0
  81. {lightly_studio-0.3.4.dist-info → lightly_studio-0.4.1.dist-info}/RECORD +83 -81
  82. lightly_studio/dataset/loader.py +0 -581
  83. lightly_studio/dist_lightly_studio_view_app/_app/immutable/assets/0.B3oFNb6O.css +0 -1
  84. lightly_studio/dist_lightly_studio_view_app/_app/immutable/assets/Samples.CIbricz7.css +0 -1
  85. lightly_studio/dist_lightly_studio_view_app/_app/immutable/assets/_layout.7Ma7YdVg.css +0 -1
  86. lightly_studio/dist_lightly_studio_view_app/_app/immutable/assets/transform.2jKMtOWG.css +0 -1
  87. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/-DXuGN29.js +0 -1
  88. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/B7302SU7.js +0 -1
  89. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/BeWf8-vJ.js +0 -1
  90. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/CfQ4mGwl.js +0 -1
  91. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/CiaNZCBa.js +0 -1
  92. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/Cqo0Vpvt.js +0 -417
  93. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/Cy4fgWTG.js +0 -1
  94. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/D5w4xp5l.js +0 -1
  95. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/DD63uD-T.js +0 -1
  96. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/D_ynJAfY.js +0 -2
  97. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/Dafy4oEQ.js +0 -1
  98. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/Dj4O-5se.js +0 -1
  99. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/DmjAI-UV.js +0 -1
  100. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/Dug7Bq1S.js +0 -1
  101. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/Dv5BSBQG.js +0 -1
  102. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/DzX_yyqb.js +0 -1
  103. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/H60ATh8g.js +0 -2
  104. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/qIv1kPyv.js +0 -1
  105. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/u-it74zV.js +0 -96
  106. lightly_studio/dist_lightly_studio_view_app/_app/immutable/entry/app.BPc0HQPq.js +0 -2
  107. lightly_studio/dist_lightly_studio_view_app/_app/immutable/entry/start.SNvc2nrm.js +0 -1
  108. lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/0.5jT7P06o.js +0 -1
  109. lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/10.C_uoESTX.js +0 -1
  110. lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/12.DcO8wIAc.js +0 -1
  111. lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/5.CAXhxJu6.js +0 -39
  112. lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/8.BuKUrCEN.js +0 -20
  113. lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/9.CUIn1yCR.js +0 -1
  114. lightly_studio/selection/README.md +0 -6
  115. lightly_studio-0.3.4.dist-info/METADATA +0 -879
  116. /lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/{11.CWG1ehzT.js → 12.CWG1ehzT.js} +0 -0
  117. {lightly_studio-0.3.4.dist-info → lightly_studio-0.4.1.dist-info}/WHEEL +0 -0
@@ -0,0 +1,39 @@
1
+ import"./CWj6FrbW.js";import{p as c,a as m,f as $,n as _,c as G,s as f,g,b as v,r as P}from"./C3xJX0nD.js";import{c as w,a as p,f as L}from"./CAPx0Bfm.js";import{s as S,r as y,p as x}from"./xQhUoIl9.js";import{a as V,s as j}from"./DmGM9V9Q.js";import{I as z,_ as k,a as q}from"./DgCXCApo.js";import{u as A}from"./Bip0vTKl.js";import{s as I}from"./DoEId1MK.js";function B(a,e){c(e,!0);/**
2
+ * @license @lucide/svelte v0.482.0 - ISC
3
+ *
4
+ * ISC License
5
+ *
6
+ * Copyright (c) for portions of Lucide are held by Cole Bemis 2013-2022 as part of Feather (MIT). All other copyright (c) for Lucide are held by Lucide Contributors 2022.
7
+ *
8
+ * Permission to use, copy, modify, and/or distribute this software for any
9
+ * purpose with or without fee is hereby granted, provided that the above
10
+ * copyright notice and this permission notice appear in all copies.
11
+ *
12
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
13
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
14
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
15
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
16
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
17
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
18
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
19
+ *
20
+ */let r=y(e,["$$slots","$$events","$$legacy"]);const s=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2"}],["path",{d:"M3 9h18"}],["path",{d:"M3 15h18"}],["path",{d:"M9 3v18"}],["path",{d:"M15 3v18"}]];z(a,S({name:"grid-3x3"},()=>r,{get iconNode(){return s},children:(o,i)=>{var t=w(),n=$(t);I(n,()=>e.children??_),p(o,t)},$$slots:{default:!0}})),m()}function D(a,e){c(e,!0);/**
21
+ * @license @lucide/svelte v0.482.0 - ISC
22
+ *
23
+ * ISC License
24
+ *
25
+ * Copyright (c) for portions of Lucide are held by Cole Bemis 2013-2022 as part of Feather (MIT). All other copyright (c) for Lucide are held by Lucide Contributors 2022.
26
+ *
27
+ * Permission to use, copy, modify, and/or distribute this software for any
28
+ * purpose with or without fee is hereby granted, provided that the above
29
+ * copyright notice and this permission notice appear in all copies.
30
+ *
31
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
32
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
33
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
34
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
35
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
36
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
37
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
38
+ *
39
+ */let r=y(e,["$$slots","$$events","$$legacy"]);const s=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",ry:"2"}],["circle",{cx:"9",cy:"9",r:"2"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21"}]];z(a,S({name:"image"},()=>r,{get iconNode(){return s},children:(o,i)=>{var t=w(),n=$(t);I(n,()=>e.children??_),p(o,t)},$$slots:{default:!0}})),m()}var E=L('<div class="w-300 flex space-x-4 text-diffuse-foreground"><!> <!> <!></div>');function U(a,e){c(e,!0);const r=()=>j(n,"$sampleSize",s),[s,o]=V(),i=x(e,"min",3,100),t=x(e,"max",3,1500),{sampleSize:n,updateSampleSize:M}=A(),N=v(()=>r().width),b=k.throttle(d=>{M(d[0])},100);var l=E(),h=G(l);B(h,{class:"h-6 w-6"});var u=f(h,2);{let d=v(()=>[g(N)]);q(u,{class:"w-full flex-1",get value(){return g(d)},get min(){return i()},get max(){return t()},step:1,get onValueChange(){return b}})}var C=f(u,2);D(C,{class:"h-6 w-6"}),P(l),p(a,l),m(),o()}export{U as I,D as a};
@@ -1 +1 @@
1
- var B=t=>{throw TypeError(t)};var G=(t,e,s)=>e.has(t)||B("Cannot "+s);var n=(t,e,s)=>(G(t,e,"read from private field"),s?s.call(t):e.get(t)),p=(t,e,s)=>e.has(t)?B("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,s),h=(t,e,s,r)=>(G(t,e,"write to private field"),r?r.call(t,s):e.set(t,s),s),g=(t,e,s)=>(G(t,e,"access private method"),s);import{aO as se,aN as V,aP as fe}from"./Frwd2CjB.js";var re=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(t){return this.listeners.add(t),this.onSubscribe(),()=>{this.listeners.delete(t),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},I=typeof window>"u"||"Deno"in globalThis;function J(){}function Me(t,e){return typeof t=="function"?t(e):t}function de(t){return typeof t=="number"&&t>=0&&t!==1/0}function ye(t,e){return Math.max(t+(e||0)-Date.now(),0)}function xe(t,e){return typeof t=="function"?t(e):t}function pe(t,e){return typeof t=="function"?t(e):t}function Ke(t,e){const{type:s="all",exact:r,fetchStatus:i,predicate:o,queryKey:l,stale:a}=t;if(l){if(r){if(e.queryHash!==ve(l,e.options))return!1}else if(!z(e.queryKey,l))return!1}if(s!=="all"){const f=e.isActive();if(s==="active"&&!f||s==="inactive"&&f)return!1}return!(typeof a=="boolean"&&e.isStale()!==a||i&&i!==e.state.fetchStatus||o&&!o(e))}function Le(t,e){const{exact:s,status:r,predicate:i,mutationKey:o}=t;if(o){if(!e.options.mutationKey)return!1;if(s){if(H(e.options.mutationKey)!==H(o))return!1}else if(!z(e.options.mutationKey,o))return!1}return!(r&&e.state.status!==r||i&&!i(e))}function ve(t,e){return((e==null?void 0:e.queryKeyHashFn)||H)(t)}function H(t){return JSON.stringify(t,(e,s)=>$(s)?Object.keys(s).sort().reduce((r,i)=>(r[i]=s[i],r),{}):s)}function z(t,e){return t===e?!0:typeof t!=typeof e?!1:t&&e&&typeof t=="object"&&typeof e=="object"?!Object.keys(e).some(s=>!z(t[s],e[s])):!1}function ie(t,e){if(t===e)return t;const s=W(t)&&W(e);if(s||$(t)&&$(e)){const r=s?t:Object.keys(t),i=r.length,o=s?e:Object.keys(e),l=o.length,a=s?[]:{};let f=0;for(let w=0;w<l;w++){const y=s?w:o[w];(!s&&r.includes(y)||s)&&t[y]===void 0&&e[y]===void 0?(a[y]=void 0,f++):(a[y]=ie(t[y],e[y]),a[y]===t[y]&&t[y]!==void 0&&f++)}return i===l&&f===i?t:a}return e}function ke(t,e){if(!e||Object.keys(t).length!==Object.keys(e).length)return!1;for(const s in t)if(t[s]!==e[s])return!1;return!0}function W(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function $(t){if(!X(t))return!1;const e=t.constructor;if(e===void 0)return!0;const s=e.prototype;return!(!X(s)||!s.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(t)!==Object.prototype)}function X(t){return Object.prototype.toString.call(t)==="[object Object]"}function be(t){return new Promise(e=>{setTimeout(e,t)})}function me(t,e,s){return typeof s.structuralSharing=="function"?s.structuralSharing(t,e):s.structuralSharing!==!1?ie(t,e):e}function Ie(t,e,s=0){const r=[...t,e];return s&&r.length>s?r.slice(1):r}function Qe(t,e,s=0){const r=[e,...t];return s&&r.length>s?r.slice(0,-1):r}var ne=Symbol();function Se(t,e){return!t.queryFn&&(e!=null&&e.initialPromise)?()=>e.initialPromise:!t.queryFn||t.queryFn===ne?()=>Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)):t.queryFn}var q,j,T,Y,we=(Y=class extends re{constructor(){super();p(this,q);p(this,j);p(this,T);h(this,T,e=>{if(!I&&window.addEventListener){const s=()=>e();return window.addEventListener("visibilitychange",s,!1),()=>{window.removeEventListener("visibilitychange",s)}}})}onSubscribe(){n(this,j)||this.setEventListener(n(this,T))}onUnsubscribe(){var e;this.hasListeners()||((e=n(this,j))==null||e.call(this),h(this,j,void 0))}setEventListener(e){var s;h(this,T,e),(s=n(this,j))==null||s.call(this),h(this,j,e(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(e){n(this,q)!==e&&(h(this,q,e),this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(s=>{s(e)})}isFocused(){var e;return typeof n(this,q)=="boolean"?n(this,q):((e=globalThis.document)==null?void 0:e.visibilityState)!=="hidden"}},q=new WeakMap,j=new WeakMap,T=new WeakMap,Y),Fe=new we,A,O,M,Z,Ce=(Z=class extends re{constructor(){super();p(this,A,!0);p(this,O);p(this,M);h(this,M,e=>{if(!I&&window.addEventListener){const s=()=>e(!0),r=()=>e(!1);return window.addEventListener("online",s,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",s),window.removeEventListener("offline",r)}}})}onSubscribe(){n(this,O)||this.setEventListener(n(this,M))}onUnsubscribe(){var e;this.hasListeners()||((e=n(this,O))==null||e.call(this),h(this,O,void 0))}setEventListener(e){var s;h(this,M,e),(s=n(this,O))==null||s.call(this),h(this,O,e(this.setOnline.bind(this)))}setOnline(e){n(this,A)!==e&&(h(this,A,e),this.listeners.forEach(r=>{r(e)}))}isOnline(){return n(this,A)}},A=new WeakMap,O=new WeakMap,M=new WeakMap,Z),ae=new Ce;function ge(){let t,e;const s=new Promise((i,o)=>{t=i,e=o});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}),t(i)},s.reject=i=>{r({status:"rejected",reason:i}),e(i)},s}function Re(t){return Math.min(1e3*2**t,3e4)}function ue(t){return(t??"online")==="online"?ae.isOnline():!0}var oe=class extends Error{constructor(t){super("CancelledError"),this.revert=t==null?void 0:t.revert,this.silent=t==null?void 0:t.silent}};function N(t){return t instanceof oe}function Ee(t){let e=!1,s=0,r=!1,i;const o=ge(),l=c=>{var b;r||(d(new oe(c)),(b=t.abort)==null||b.call(t))},a=()=>{e=!0},f=()=>{e=!1},w=()=>Fe.isFocused()&&(t.networkMode==="always"||ae.isOnline())&&t.canRun(),y=()=>ue(t.networkMode)&&t.canRun(),u=c=>{var b;r||(r=!0,(b=t.onSuccess)==null||b.call(t,c),i==null||i(),o.resolve(c))},d=c=>{var b;r||(r=!0,(b=t.onError)==null||b.call(t,c),i==null||i(),o.reject(c))},E=()=>new Promise(c=>{var b;i=C=>{(r||w())&&c(C)},(b=t.onPause)==null||b.call(t)}).then(()=>{var c;i=void 0,r||(c=t.onContinue)==null||c.call(t)}),F=()=>{if(r)return;let c;const b=s===0?t.initialPromise:void 0;try{c=b??t.fn()}catch(C){c=Promise.reject(C)}Promise.resolve(c).then(u).catch(C=>{var _;if(r)return;const L=t.retry??(I?0:3),Q=t.retryDelay??Re,he=typeof Q=="function"?Q(s,C):Q,le=L===!0||typeof L=="number"&&s<L||typeof L=="function"&&L(s,C);if(e||!le){d(C);return}s++,(_=t.onFail)==null||_.call(t,s,C),be(he).then(()=>w()?void 0:E()).then(()=>{e?d(C):F()})})};return{promise:o,cancel:l,continue:()=>(i==null||i(),o),cancelRetry:a,continueRetry:f,canStart:y,start:()=>(y()?F():E().then(F),o)}}function je(){let t=[],e=0,s=a=>{a()},r=a=>{a()},i=a=>setTimeout(a,0);const o=a=>{e?t.push(a):i(()=>{s(a)})},l=()=>{const a=t;t=[],a.length&&i(()=>{r(()=>{a.forEach(f=>{s(f)})})})};return{batch:a=>{let f;e++;try{f=a()}finally{e--,e||l()}return f},batchCalls:a=>(...f)=>{o(()=>{a(...f)})},schedule:o,setNotifyFunction:a=>{s=a},setBatchNotifyFunction:a=>{r=a},setScheduler:a=>{i=a}}}var Oe=je(),U,ee,qe=(ee=class{constructor(){p(this,U)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),de(this.gcTime)&&h(this,U,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(t){this.gcTime=Math.max(this.gcTime||0,t??(I?1/0:5*60*1e3))}clearGcTimeout(){n(this,U)&&(clearTimeout(n(this,U)),h(this,U,void 0))}},U=new WeakMap,ee),x,K,m,P,v,k,D,S,R,te,Ge=(te=class extends qe{constructor(e){super();p(this,S);p(this,x);p(this,K);p(this,m);p(this,P);p(this,v);p(this,k);p(this,D);h(this,D,!1),h(this,k,e.defaultOptions),this.setOptions(e.options),this.observers=[],h(this,P,e.client),h(this,m,n(this,P).getQueryCache()),this.queryKey=e.queryKey,this.queryHash=e.queryHash,h(this,x,Pe(this.options)),this.state=e.state??n(this,x),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var e;return(e=n(this,v))==null?void 0:e.promise}setOptions(e){this.options={...n(this,k),...e},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&n(this,m).remove(this)}setData(e,s){const r=me(this.state.data,e,this.options);return g(this,S,R).call(this,{data:r,type:"success",dataUpdatedAt:s==null?void 0:s.updatedAt,manual:s==null?void 0:s.manual}),r}setState(e,s){g(this,S,R).call(this,{type:"setState",state:e,setStateOptions:s})}cancel(e){var r,i;const s=(r=n(this,v))==null?void 0:r.promise;return(i=n(this,v))==null||i.cancel(e),s?s.then(J).catch(J):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(n(this,x))}isActive(){return this.observers.some(e=>pe(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===ne||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStale(){return this.state.isInvalidated?!0:this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0}isStaleByTime(e=0){return this.state.isInvalidated||this.state.data===void 0||!ye(this.state.dataUpdatedAt,e)}onFocus(){var s;const e=this.observers.find(r=>r.shouldFetchOnWindowFocus());e==null||e.refetch({cancelRefetch:!1}),(s=n(this,v))==null||s.continue()}onOnline(){var s;const e=this.observers.find(r=>r.shouldFetchOnReconnect());e==null||e.refetch({cancelRefetch:!1}),(s=n(this,v))==null||s.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),n(this,m).notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(s=>s!==e),this.observers.length||(n(this,v)&&(n(this,D)?n(this,v).cancel({revert:!0}):n(this,v).cancelRetry()),this.scheduleGc()),n(this,m).notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||g(this,S,R).call(this,{type:"invalidate"})}fetch(e,s){var f,w,y;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(s!=null&&s.cancelRefetch))this.cancel({silent:!0});else if(n(this,v))return n(this,v).continueRetry(),n(this,v).promise}if(e&&this.setOptions(e),!this.options.queryFn){const u=this.observers.find(d=>d.options.queryFn);u&&this.setOptions(u.options)}const r=new AbortController,i=u=>{Object.defineProperty(u,"signal",{enumerable:!0,get:()=>(h(this,D,!0),r.signal)})},o=()=>{const u=Se(this.options,s),d={client:n(this,P),queryKey:this.queryKey,meta:this.meta};return i(d),h(this,D,!1),this.options.persister?this.options.persister(u,d,this):u(d)},l={fetchOptions:s,options:this.options,queryKey:this.queryKey,client:n(this,P),state:this.state,fetchFn:o};i(l),(f=this.options.behavior)==null||f.onFetch(l,this),h(this,K,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((w=l.fetchOptions)==null?void 0:w.meta))&&g(this,S,R).call(this,{type:"fetch",meta:(y=l.fetchOptions)==null?void 0:y.meta});const a=u=>{var d,E,F,c;N(u)&&u.silent||g(this,S,R).call(this,{type:"error",error:u}),N(u)||((E=(d=n(this,m).config).onError)==null||E.call(d,u,this),(c=(F=n(this,m).config).onSettled)==null||c.call(F,this.state.data,u,this)),this.scheduleGc()};return h(this,v,Ee({initialPromise:s==null?void 0:s.initialPromise,fn:l.fetchFn,abort:r.abort.bind(r),onSuccess:u=>{var d,E,F,c;if(u===void 0){a(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(u)}catch(b){a(b);return}(E=(d=n(this,m).config).onSuccess)==null||E.call(d,u,this),(c=(F=n(this,m).config).onSettled)==null||c.call(F,u,this.state.error,this),this.scheduleGc()},onError:a,onFail:(u,d)=>{g(this,S,R).call(this,{type:"failed",failureCount:u,error:d})},onPause:()=>{g(this,S,R).call(this,{type:"pause"})},onContinue:()=>{g(this,S,R).call(this,{type:"continue"})},retry:l.options.retry,retryDelay:l.options.retryDelay,networkMode:l.options.networkMode,canRun:()=>!0})),n(this,v).start()}},x=new WeakMap,K=new WeakMap,m=new WeakMap,P=new WeakMap,v=new WeakMap,k=new WeakMap,D=new WeakMap,S=new WeakSet,R=function(e){const s=r=>{switch(e.type){case"failed":return{...r,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...Ue(r.data,this.options),fetchMeta:e.meta??null};case"success":return{...r,data:e.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:e.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const i=e.error;return N(i)&&i.revert&&n(this,K)?{...n(this,K),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,...e.state}}};this.state=s(this.state),Oe.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),n(this,m).notify({query:this,type:"updated",action:e})})},te);function Ue(t,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:ue(e.networkMode)?"fetching":"paused",...t===void 0&&{error:null,status:"pending"}}}function Pe(t){const e=typeof t.initialData=="function"?t.initialData():t.initialData,s=e!==void 0,r=s?typeof t.initialDataUpdatedAt=="function"?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:e,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"}}const ce="$$_queryClient",Ne=()=>{const t=se(ce);if(!t)throw new Error("No QueryClient was found in Svelte context. Did you forget to wrap your component with QueryClientProvider?");return t},He=t=>{fe(ce,t)},De="$$_isRestoring",$e=()=>{try{const t=se(De);return t||V(!1)}catch{return V(!1)}};export{He as A,Ge as Q,qe as R,re as S,xe as a,de as b,Ue as c,me as d,Oe as e,Fe as f,$e as g,Ne as h,I as i,Ee as j,Se as k,Qe as l,Ie as m,J as n,ve as o,ge as p,Ke as q,pe as r,ke as s,ye as t,Le as u,ae as v,Me as w,H as x,z as y,ne as z};
1
+ var B=t=>{throw TypeError(t)};var G=(t,e,s)=>e.has(t)||B("Cannot "+s);var n=(t,e,s)=>(G(t,e,"read from private field"),s?s.call(t):e.get(t)),p=(t,e,s)=>e.has(t)?B("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,s),h=(t,e,s,r)=>(G(t,e,"write to private field"),r?r.call(t,s):e.set(t,s),s),g=(t,e,s)=>(G(t,e,"access private method"),s);import{aO as se,aN as V,aP as fe}from"./C3xJX0nD.js";var re=class{constructor(){this.listeners=new Set,this.subscribe=this.subscribe.bind(this)}subscribe(t){return this.listeners.add(t),this.onSubscribe(),()=>{this.listeners.delete(t),this.onUnsubscribe()}}hasListeners(){return this.listeners.size>0}onSubscribe(){}onUnsubscribe(){}},I=typeof window>"u"||"Deno"in globalThis;function J(){}function Me(t,e){return typeof t=="function"?t(e):t}function de(t){return typeof t=="number"&&t>=0&&t!==1/0}function ye(t,e){return Math.max(t+(e||0)-Date.now(),0)}function xe(t,e){return typeof t=="function"?t(e):t}function pe(t,e){return typeof t=="function"?t(e):t}function Ke(t,e){const{type:s="all",exact:r,fetchStatus:i,predicate:o,queryKey:l,stale:a}=t;if(l){if(r){if(e.queryHash!==ve(l,e.options))return!1}else if(!z(e.queryKey,l))return!1}if(s!=="all"){const f=e.isActive();if(s==="active"&&!f||s==="inactive"&&f)return!1}return!(typeof a=="boolean"&&e.isStale()!==a||i&&i!==e.state.fetchStatus||o&&!o(e))}function Le(t,e){const{exact:s,status:r,predicate:i,mutationKey:o}=t;if(o){if(!e.options.mutationKey)return!1;if(s){if(H(e.options.mutationKey)!==H(o))return!1}else if(!z(e.options.mutationKey,o))return!1}return!(r&&e.state.status!==r||i&&!i(e))}function ve(t,e){return((e==null?void 0:e.queryKeyHashFn)||H)(t)}function H(t){return JSON.stringify(t,(e,s)=>$(s)?Object.keys(s).sort().reduce((r,i)=>(r[i]=s[i],r),{}):s)}function z(t,e){return t===e?!0:typeof t!=typeof e?!1:t&&e&&typeof t=="object"&&typeof e=="object"?!Object.keys(e).some(s=>!z(t[s],e[s])):!1}function ie(t,e){if(t===e)return t;const s=W(t)&&W(e);if(s||$(t)&&$(e)){const r=s?t:Object.keys(t),i=r.length,o=s?e:Object.keys(e),l=o.length,a=s?[]:{};let f=0;for(let w=0;w<l;w++){const y=s?w:o[w];(!s&&r.includes(y)||s)&&t[y]===void 0&&e[y]===void 0?(a[y]=void 0,f++):(a[y]=ie(t[y],e[y]),a[y]===t[y]&&t[y]!==void 0&&f++)}return i===l&&f===i?t:a}return e}function ke(t,e){if(!e||Object.keys(t).length!==Object.keys(e).length)return!1;for(const s in t)if(t[s]!==e[s])return!1;return!0}function W(t){return Array.isArray(t)&&t.length===Object.keys(t).length}function $(t){if(!X(t))return!1;const e=t.constructor;if(e===void 0)return!0;const s=e.prototype;return!(!X(s)||!s.hasOwnProperty("isPrototypeOf")||Object.getPrototypeOf(t)!==Object.prototype)}function X(t){return Object.prototype.toString.call(t)==="[object Object]"}function be(t){return new Promise(e=>{setTimeout(e,t)})}function me(t,e,s){return typeof s.structuralSharing=="function"?s.structuralSharing(t,e):s.structuralSharing!==!1?ie(t,e):e}function Ie(t,e,s=0){const r=[...t,e];return s&&r.length>s?r.slice(1):r}function Qe(t,e,s=0){const r=[e,...t];return s&&r.length>s?r.slice(0,-1):r}var ne=Symbol();function Se(t,e){return!t.queryFn&&(e!=null&&e.initialPromise)?()=>e.initialPromise:!t.queryFn||t.queryFn===ne?()=>Promise.reject(new Error(`Missing queryFn: '${t.queryHash}'`)):t.queryFn}var q,j,T,Y,we=(Y=class extends re{constructor(){super();p(this,q);p(this,j);p(this,T);h(this,T,e=>{if(!I&&window.addEventListener){const s=()=>e();return window.addEventListener("visibilitychange",s,!1),()=>{window.removeEventListener("visibilitychange",s)}}})}onSubscribe(){n(this,j)||this.setEventListener(n(this,T))}onUnsubscribe(){var e;this.hasListeners()||((e=n(this,j))==null||e.call(this),h(this,j,void 0))}setEventListener(e){var s;h(this,T,e),(s=n(this,j))==null||s.call(this),h(this,j,e(r=>{typeof r=="boolean"?this.setFocused(r):this.onFocus()}))}setFocused(e){n(this,q)!==e&&(h(this,q,e),this.onFocus())}onFocus(){const e=this.isFocused();this.listeners.forEach(s=>{s(e)})}isFocused(){var e;return typeof n(this,q)=="boolean"?n(this,q):((e=globalThis.document)==null?void 0:e.visibilityState)!=="hidden"}},q=new WeakMap,j=new WeakMap,T=new WeakMap,Y),Fe=new we,A,O,M,Z,Ce=(Z=class extends re{constructor(){super();p(this,A,!0);p(this,O);p(this,M);h(this,M,e=>{if(!I&&window.addEventListener){const s=()=>e(!0),r=()=>e(!1);return window.addEventListener("online",s,!1),window.addEventListener("offline",r,!1),()=>{window.removeEventListener("online",s),window.removeEventListener("offline",r)}}})}onSubscribe(){n(this,O)||this.setEventListener(n(this,M))}onUnsubscribe(){var e;this.hasListeners()||((e=n(this,O))==null||e.call(this),h(this,O,void 0))}setEventListener(e){var s;h(this,M,e),(s=n(this,O))==null||s.call(this),h(this,O,e(this.setOnline.bind(this)))}setOnline(e){n(this,A)!==e&&(h(this,A,e),this.listeners.forEach(r=>{r(e)}))}isOnline(){return n(this,A)}},A=new WeakMap,O=new WeakMap,M=new WeakMap,Z),ae=new Ce;function ge(){let t,e;const s=new Promise((i,o)=>{t=i,e=o});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}),t(i)},s.reject=i=>{r({status:"rejected",reason:i}),e(i)},s}function Re(t){return Math.min(1e3*2**t,3e4)}function ue(t){return(t??"online")==="online"?ae.isOnline():!0}var oe=class extends Error{constructor(t){super("CancelledError"),this.revert=t==null?void 0:t.revert,this.silent=t==null?void 0:t.silent}};function N(t){return t instanceof oe}function Ee(t){let e=!1,s=0,r=!1,i;const o=ge(),l=c=>{var b;r||(d(new oe(c)),(b=t.abort)==null||b.call(t))},a=()=>{e=!0},f=()=>{e=!1},w=()=>Fe.isFocused()&&(t.networkMode==="always"||ae.isOnline())&&t.canRun(),y=()=>ue(t.networkMode)&&t.canRun(),u=c=>{var b;r||(r=!0,(b=t.onSuccess)==null||b.call(t,c),i==null||i(),o.resolve(c))},d=c=>{var b;r||(r=!0,(b=t.onError)==null||b.call(t,c),i==null||i(),o.reject(c))},E=()=>new Promise(c=>{var b;i=C=>{(r||w())&&c(C)},(b=t.onPause)==null||b.call(t)}).then(()=>{var c;i=void 0,r||(c=t.onContinue)==null||c.call(t)}),F=()=>{if(r)return;let c;const b=s===0?t.initialPromise:void 0;try{c=b??t.fn()}catch(C){c=Promise.reject(C)}Promise.resolve(c).then(u).catch(C=>{var _;if(r)return;const L=t.retry??(I?0:3),Q=t.retryDelay??Re,he=typeof Q=="function"?Q(s,C):Q,le=L===!0||typeof L=="number"&&s<L||typeof L=="function"&&L(s,C);if(e||!le){d(C);return}s++,(_=t.onFail)==null||_.call(t,s,C),be(he).then(()=>w()?void 0:E()).then(()=>{e?d(C):F()})})};return{promise:o,cancel:l,continue:()=>(i==null||i(),o),cancelRetry:a,continueRetry:f,canStart:y,start:()=>(y()?F():E().then(F),o)}}function je(){let t=[],e=0,s=a=>{a()},r=a=>{a()},i=a=>setTimeout(a,0);const o=a=>{e?t.push(a):i(()=>{s(a)})},l=()=>{const a=t;t=[],a.length&&i(()=>{r(()=>{a.forEach(f=>{s(f)})})})};return{batch:a=>{let f;e++;try{f=a()}finally{e--,e||l()}return f},batchCalls:a=>(...f)=>{o(()=>{a(...f)})},schedule:o,setNotifyFunction:a=>{s=a},setBatchNotifyFunction:a=>{r=a},setScheduler:a=>{i=a}}}var Oe=je(),U,ee,qe=(ee=class{constructor(){p(this,U)}destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),de(this.gcTime)&&h(this,U,setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(t){this.gcTime=Math.max(this.gcTime||0,t??(I?1/0:5*60*1e3))}clearGcTimeout(){n(this,U)&&(clearTimeout(n(this,U)),h(this,U,void 0))}},U=new WeakMap,ee),x,K,m,P,v,k,D,S,R,te,Ge=(te=class extends qe{constructor(e){super();p(this,S);p(this,x);p(this,K);p(this,m);p(this,P);p(this,v);p(this,k);p(this,D);h(this,D,!1),h(this,k,e.defaultOptions),this.setOptions(e.options),this.observers=[],h(this,P,e.client),h(this,m,n(this,P).getQueryCache()),this.queryKey=e.queryKey,this.queryHash=e.queryHash,h(this,x,Pe(this.options)),this.state=e.state??n(this,x),this.scheduleGc()}get meta(){return this.options.meta}get promise(){var e;return(e=n(this,v))==null?void 0:e.promise}setOptions(e){this.options={...n(this,k),...e},this.updateGcTime(this.options.gcTime)}optionalRemove(){!this.observers.length&&this.state.fetchStatus==="idle"&&n(this,m).remove(this)}setData(e,s){const r=me(this.state.data,e,this.options);return g(this,S,R).call(this,{data:r,type:"success",dataUpdatedAt:s==null?void 0:s.updatedAt,manual:s==null?void 0:s.manual}),r}setState(e,s){g(this,S,R).call(this,{type:"setState",state:e,setStateOptions:s})}cancel(e){var r,i;const s=(r=n(this,v))==null?void 0:r.promise;return(i=n(this,v))==null||i.cancel(e),s?s.then(J).catch(J):Promise.resolve()}destroy(){super.destroy(),this.cancel({silent:!0})}reset(){this.destroy(),this.setState(n(this,x))}isActive(){return this.observers.some(e=>pe(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===ne||this.state.dataUpdateCount+this.state.errorUpdateCount===0}isStale(){return this.state.isInvalidated?!0:this.getObserversCount()>0?this.observers.some(e=>e.getCurrentResult().isStale):this.state.data===void 0}isStaleByTime(e=0){return this.state.isInvalidated||this.state.data===void 0||!ye(this.state.dataUpdatedAt,e)}onFocus(){var s;const e=this.observers.find(r=>r.shouldFetchOnWindowFocus());e==null||e.refetch({cancelRefetch:!1}),(s=n(this,v))==null||s.continue()}onOnline(){var s;const e=this.observers.find(r=>r.shouldFetchOnReconnect());e==null||e.refetch({cancelRefetch:!1}),(s=n(this,v))==null||s.continue()}addObserver(e){this.observers.includes(e)||(this.observers.push(e),this.clearGcTimeout(),n(this,m).notify({type:"observerAdded",query:this,observer:e}))}removeObserver(e){this.observers.includes(e)&&(this.observers=this.observers.filter(s=>s!==e),this.observers.length||(n(this,v)&&(n(this,D)?n(this,v).cancel({revert:!0}):n(this,v).cancelRetry()),this.scheduleGc()),n(this,m).notify({type:"observerRemoved",query:this,observer:e}))}getObserversCount(){return this.observers.length}invalidate(){this.state.isInvalidated||g(this,S,R).call(this,{type:"invalidate"})}fetch(e,s){var f,w,y;if(this.state.fetchStatus!=="idle"){if(this.state.data!==void 0&&(s!=null&&s.cancelRefetch))this.cancel({silent:!0});else if(n(this,v))return n(this,v).continueRetry(),n(this,v).promise}if(e&&this.setOptions(e),!this.options.queryFn){const u=this.observers.find(d=>d.options.queryFn);u&&this.setOptions(u.options)}const r=new AbortController,i=u=>{Object.defineProperty(u,"signal",{enumerable:!0,get:()=>(h(this,D,!0),r.signal)})},o=()=>{const u=Se(this.options,s),d={client:n(this,P),queryKey:this.queryKey,meta:this.meta};return i(d),h(this,D,!1),this.options.persister?this.options.persister(u,d,this):u(d)},l={fetchOptions:s,options:this.options,queryKey:this.queryKey,client:n(this,P),state:this.state,fetchFn:o};i(l),(f=this.options.behavior)==null||f.onFetch(l,this),h(this,K,this.state),(this.state.fetchStatus==="idle"||this.state.fetchMeta!==((w=l.fetchOptions)==null?void 0:w.meta))&&g(this,S,R).call(this,{type:"fetch",meta:(y=l.fetchOptions)==null?void 0:y.meta});const a=u=>{var d,E,F,c;N(u)&&u.silent||g(this,S,R).call(this,{type:"error",error:u}),N(u)||((E=(d=n(this,m).config).onError)==null||E.call(d,u,this),(c=(F=n(this,m).config).onSettled)==null||c.call(F,this.state.data,u,this)),this.scheduleGc()};return h(this,v,Ee({initialPromise:s==null?void 0:s.initialPromise,fn:l.fetchFn,abort:r.abort.bind(r),onSuccess:u=>{var d,E,F,c;if(u===void 0){a(new Error(`${this.queryHash} data is undefined`));return}try{this.setData(u)}catch(b){a(b);return}(E=(d=n(this,m).config).onSuccess)==null||E.call(d,u,this),(c=(F=n(this,m).config).onSettled)==null||c.call(F,u,this.state.error,this),this.scheduleGc()},onError:a,onFail:(u,d)=>{g(this,S,R).call(this,{type:"failed",failureCount:u,error:d})},onPause:()=>{g(this,S,R).call(this,{type:"pause"})},onContinue:()=>{g(this,S,R).call(this,{type:"continue"})},retry:l.options.retry,retryDelay:l.options.retryDelay,networkMode:l.options.networkMode,canRun:()=>!0})),n(this,v).start()}},x=new WeakMap,K=new WeakMap,m=new WeakMap,P=new WeakMap,v=new WeakMap,k=new WeakMap,D=new WeakMap,S=new WeakSet,R=function(e){const s=r=>{switch(e.type){case"failed":return{...r,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case"pause":return{...r,fetchStatus:"paused"};case"continue":return{...r,fetchStatus:"fetching"};case"fetch":return{...r,...Ue(r.data,this.options),fetchMeta:e.meta??null};case"success":return{...r,data:e.data,dataUpdateCount:r.dataUpdateCount+1,dataUpdatedAt:e.dataUpdatedAt??Date.now(),error:null,isInvalidated:!1,status:"success",...!e.manual&&{fetchStatus:"idle",fetchFailureCount:0,fetchFailureReason:null}};case"error":const i=e.error;return N(i)&&i.revert&&n(this,K)?{...n(this,K),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,...e.state}}};this.state=s(this.state),Oe.batch(()=>{this.observers.forEach(r=>{r.onQueryUpdate()}),n(this,m).notify({query:this,type:"updated",action:e})})},te);function Ue(t,e){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:ue(e.networkMode)?"fetching":"paused",...t===void 0&&{error:null,status:"pending"}}}function Pe(t){const e=typeof t.initialData=="function"?t.initialData():t.initialData,s=e!==void 0,r=s?typeof t.initialDataUpdatedAt=="function"?t.initialDataUpdatedAt():t.initialDataUpdatedAt:0;return{data:e,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"}}const ce="$$_queryClient",Ne=()=>{const t=se(ce);if(!t)throw new Error("No QueryClient was found in Svelte context. Did you forget to wrap your component with QueryClientProvider?");return t},He=t=>{fe(ce,t)},De="$$_isRestoring",$e=()=>{try{const t=se(De);return t||V(!1)}catch{return V(!1)}};export{He as A,Ge as Q,qe as R,re as S,xe as a,de as b,Ue as c,me as d,Oe as e,Fe as f,$e as g,Ne as h,I as i,Ee as j,Se as k,Qe as l,Ie as m,J as n,ve as o,ge as p,Ke as q,pe as r,ke as s,ye as t,Le as u,ae as v,Me as w,H as x,z as y,ne as z};
@@ -0,0 +1 @@
1
+ import{R as m,_ as o,a0 as N,K as v,a1 as p,a2 as x,z as u,A as a,L as h,a3 as C,P as M,a4 as w}from"./C3xJX0nD.js";function g(e){var r=document.createElement("template");return r.innerHTML=e.replaceAll("<!>","<!---->"),r.content}function s(e,r){var t=v;t.nodes_start===null&&(t.nodes_start=e,t.nodes_end=r)}function D(e,r){var t=(r&p)!==0,_=(r&x)!==0,i,c=!e.startsWith("<!>");return()=>{if(u)return s(a,null),a;i===void 0&&(i=g(c?e:"<!>"+e),t||(i=o(i)));var n=_||N?document.importNode(i,!0):i.cloneNode(!0);if(t){var l=o(n),d=n.lastChild;s(l,d)}else s(n,n);return n}}function y(e,r,t="svg"){var _=!e.startsWith("<!>"),i=(r&p)!==0,c=`<${t}>${_?e:"<!>"+e}</${t}>`,n;return()=>{if(u)return s(a,null),a;if(!n){var l=g(c),d=o(l);if(i)for(n=document.createDocumentFragment();o(d);)n.appendChild(o(d));else n=o(d)}var f=n.cloneNode(!0);if(i){var E=o(f),T=f.lastChild;s(E,T)}else s(f,f);return f}}function O(e,r){return y(e,r,"svg")}function $(e=""){if(!u){var r=m(e+"");return s(r,r),r}var t=a;return t.nodeType!==C&&(t.before(t=m()),M(t)),s(t,t),t}function b(){if(u)return s(a,null),a;var e=document.createDocumentFragment(),r=document.createComment(""),t=m();return e.append(r,t),s(r,t),e}function L(e,r){if(u){v.nodes_end=a,h();return}e!==null&&e.before(r)}function P(){var e,r;if(u&&a&&a.nodeType===w&&((e=a.textContent)!=null&&e.startsWith("$"))){const t=a.textContent.substring(1);return h(),t}return(r=window.__svelte??(window.__svelte={})).uid??(r.uid=1),`c${window.__svelte.uid++}`}export{L as a,s as b,b as c,O as d,D as f,P as p,$ as t};
@@ -0,0 +1 @@
1
+ var V=Object.defineProperty;var E=(e,t,r)=>t in e?V(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var j=(e,t,r)=>E(e,typeof t!="symbol"?t+"":t,r);const U={bodySerializer:e=>JSON.stringify(e,(t,r)=>typeof r=="bigint"?r.toString():r)},W=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},P=e=>{switch(e){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},k=e=>{switch(e){case"form":return",";case"pipeDelimited":return"|";case"spaceDelimited":return"%20";default:return","}},H=e=>{switch(e){case"label":return".";case"matrix":return";";case"simple":return",";default:return"&"}},x=({allowReserved:e,explode:t,name:r,style:o,value:s})=>{if(!t){const n=(e?s:s.map(c=>encodeURIComponent(c))).join(k(o));switch(o){case"label":return`.${n}`;case"matrix":return`;${r}=${n}`;case"simple":return n;default:return`${r}=${n}`}}const i=P(o),a=s.map(n=>o==="label"||o==="simple"?e?n:encodeURIComponent(n):_({allowReserved:e,name:r,value:n})).join(i);return o==="label"||o==="matrix"?i+a:a},_=({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)}`},D=({allowReserved:e,explode:t,name:r,style:o,value:s,valueOnly:i})=>{if(s instanceof Date)return i?s.toISOString():`${r}=${s.toISOString()}`;if(o!=="deepObject"&&!t){let c=[];Object.entries(s).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 a=H(o),n=Object.entries(s).map(([c,f])=>_({allowReserved:e,name:o==="deepObject"?`${r}[${c}]`:c,value:f})).join(a);return o==="label"||o==="matrix"?a+n:n},N=/\{[^{}]+\}/g,B=({path:e,url:t})=>{let r=t;const o=t.match(N);if(o)for(const s of o){let i=!1,a=s.substring(1,s.length-1),n="simple";a.endsWith("*")&&(i=!0,a=a.substring(0,a.length-1)),a.startsWith(".")?(a=a.substring(1),n="label"):a.startsWith(";")&&(a=a.substring(1),n="matrix");const c=e[a];if(c==null)continue;if(Array.isArray(c)){r=r.replace(s,x({explode:i,name:a,style:n,value:c}));continue}if(typeof c=="object"){r=r.replace(s,D({explode:i,name:a,style:n,value:c,valueOnly:!0}));continue}if(n==="matrix"){r=r.replace(s,`;${_({name:a,value:c})}`);continue}const f=encodeURIComponent(n==="label"?`.${c}`:c);r=r.replace(s,f)}return r},R=({allowReserved:e,array:t,object:r}={})=>s=>{const i=[];if(s&&typeof s=="object")for(const a in s){const n=s[a];if(n!=null)if(Array.isArray(n)){const c=x({allowReserved:e,explode:!0,name:a,style:"form",value:n,...t});c&&i.push(c)}else if(typeof n=="object"){const c=D({allowReserved:e,explode:!0,name:a,style:"deepObject",value:n,...r});c&&i.push(c)}else{const c=_({allowReserved:e,name:a,value:n});c&&i.push(c)}}return i.join("&")},L=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"}},J=async({security:e,...t})=>{for(const r of e){const o=await W(r,t.auth);if(!o)continue;const s=r.name??"Authorization";switch(r.in){case"query":t.query||(t.query={}),t.query[s]=o;break;case"cookie":t.headers.append("Cookie",`${s}=${o}`);break;case"header":default:t.headers.set(s,o);break}return}},A=e=>M({baseUrl:e.baseUrl,path:e.path,query:e.query,querySerializer:typeof e.querySerializer=="function"?e.querySerializer:R(e.querySerializer),url:e.url}),M=({baseUrl:e,path:t,query:r,querySerializer:o,url:s})=>{const i=s.startsWith("/")?s:`/${s}`;let a=(e??"")+i;t&&(a=B({path:t,url:a}));let n=r?o(r):"";return n.startsWith("?")&&(n=n.substring(1)),n&&(a+=`?${n}`),a},C=(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=I(e.headers,t.headers),r},I=(...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[s,i]of o)if(i===null)t.delete(s);else if(Array.isArray(i))for(const a of i)t.append(s,a);else i!==void 0&&t.set(s,typeof i=="object"?JSON.stringify(i):i)}return t};class T{constructor(){j(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 v=()=>({error:new T,request:new T,response:new T}),F=R({allowReserved:!1,array:{explode:!0,style:"form"},object:{explode:!0,style:"deepObject"}}),Q={"Content-Type":"application/json"},$=(e={})=>({...U,headers:Q,parseAs:"auto",querySerializer:F,...e}),G=(e={})=>{let t=C($(),e);const r=()=>({...t}),o=a=>(t=C(t,a),r()),s=v(),i=async a=>{const n={...t,...a,fetch:a.fetch??t.fetch??globalThis.fetch,headers:I(t.headers,a.headers)};n.security&&await J({...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 s.request._fns)d&&(p=await d(p,n));const y=n.fetch;let l=await y(p);for(const d of s.response._fns)d&&(l=await d(l,p,n));const g={request:p,response:l};if(l.ok){if(l.status===204||l.headers.get("Content-Length")==="0")return n.responseStyle==="data"?{}:{data:{},...g};const d=(n.parseAs==="auto"?L(l.headers.get("Content-Type")):n.parseAs)??"json";let m;switch(d){case"arrayBuffer":case"blob":case"formData":case"json":case"text":m=await l[d]();break;case"stream":return n.responseStyle==="data"?l.body:{data:l.body,...g}}return d==="json"&&(n.responseValidator&&await n.responseValidator(m),n.responseTransformer&&(m=await n.responseTransformer(m))),n.responseStyle==="data"?m:{data:m,...g}}const b=await l.text();let w;try{w=JSON.parse(b)}catch{}const S=w??b;let h=S;for(const d of s.error._fns)d&&(h=await d(S,l,p,n));if(h=h||{},n.throwOnError)throw h;return n.responseStyle==="data"?void 0:{error:h,...g}};return{buildUrl:A,connect:a=>i({...a,method:"CONNECT"}),delete:a=>i({...a,method:"DELETE"}),get:a=>i({...a,method:"GET"}),getConfig:r,head:a=>i({...a,method:"HEAD"}),interceptors:s,options:a=>i({...a,method:"OPTIONS"}),patch:a=>i({...a,method:"PATCH"}),post:a=>i({...a,method:"POST"}),put:a=>i({...a,method:"PUT"}),request:i,setConfig:o,trace:a=>i({...a,method:"TRACE"})}},K=e=>(e.created_at=new Date(e.created_at),e.updated_at=new Date(e.updated_at),e),X=async e=>(e=e.map(t=>K(t)),e),Y=e=>(e.created_at=new Date(e.created_at),e.updated_at=new Date(e.updated_at),e),Z=async e=>(e=Y(e),e),z=e=>(e.created_at=new Date(e.created_at),e.updated_at=new Date(e.updated_at),e),ee=async e=>(e=e.map(t=>z(t)),e),te=async e=>(e=z(e),e),O=e=>(e.created_at=new Date(e.created_at),e),re=e=>(e.created_at=new Date(e.created_at),e.updated_at=new Date(e.updated_at),e),q=e=>(e.annotations=e.annotations.map(t=>O(t)),e.tags=e.tags.map(t=>re(t)),e),ne=e=>(e.data=e.data.map(t=>q(t)),e),ae=async e=>(e=ne(e),e),se=async e=>(e=q(e),e),oe=e=>(e.created_at=new Date(e.created_at),e),ie=e=>(e.data=e.data.map(t=>oe(t)),e),ce=async e=>(e=ie(e),e),ue=async e=>(e=O(e),e),le=e=>(e.created_at&&(e.created_at=new Date(e.created_at)),e),de=async e=>(e=e.map(t=>le(t)),e),fe=e=>(e.created_at=new Date(e.created_at),e),pe=async e=>(e=fe(e),e),me=e=>(e.created_at=new Date(e.created_at),e.updated_at=new Date(e.updated_at),e),he=async e=>(e=me(e),e),u=G($()),ge=e=>((e==null?void 0:e.client)??u).get({responseTransformer:X,url:"/api/datasets",...e}),_e=e=>(e.client??u).get({responseTransformer:Z,url:"/api/datasets/{dataset_id}",...e}),Te=e=>(e.client??u).get({responseTransformer:ee,url:"/api/datasets/{dataset_id}/tags",...e}),be=e=>(e.client??u).post({responseTransformer:te,url:"/api/datasets/{dataset_id}/tags",...e,headers:{"Content-Type":"application/json",...e.headers}}),we=e=>(e.client??u).post({url:"/api/datasets/{dataset_id}/tags/{tag_id}/add/samples",...e,headers:{"Content-Type":"application/json",...e.headers}}),Se=e=>(e.client??u).post({url:"/api/datasets/{dataset_id}/tags/{tag_id}/add/annotations",...e,headers:{"Content-Type":"application/json",...e.headers}}),je=e=>(e.client??u).post({responseTransformer:ae,url:"/api/datasets/{dataset_id}/samples/list",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ae=e=>(e.client??u).get({responseTransformer:se,url:"/api/datasets/{dataset_id}/samples/{sample_id}",...e}),Ce=e=>(e.client??u).delete({url:"/api/datasets/{dataset_id}/samples/{sample_id}/tag/{tag_id}",...e}),xe=e=>((e==null?void 0:e.client)??u).get({url:"/api/annotation_labels",...e}),De=e=>(e.client??u).post({url:"/api/annotation_labels",...e,headers:{"Content-Type":"application/json",...e.headers}}),Re=e=>(e.client??u).get({responseTransformer:ce,url:"/api/datasets/{dataset_id}/annotations",...e}),Ie=e=>(e.client??u).post({responseTransformer:ue,url:"/api/datasets/{dataset_id}/annotations",...e,headers:{"Content-Type":"application/json",...e.headers}}),$e=e=>(e.client??u).put({responseTransformer:de,url:"/api/datasets/{dataset_id}/annotations",...e,headers:{"Content-Type":"application/json",...e.headers}}),ze=e=>(e.client??u).get({url:"/api/datasets/{dataset_id}/annotations/count",...e,headers:{"Content-Type":"application/json",...e.headers}}),Oe=e=>(e.client??u).delete({url:"/api/datasets/{dataset_id}/annotations/{annotation_id}/tag/{tag_id}",...e}),qe=e=>(e.client??u).delete({url:"/api/datasets/{dataset_id}/annotations/{annotation_id}",...e}),Ve=e=>(e.client??u).get({responseTransformer:pe,url:"/api/datasets/{dataset_id}/annotations/{annotation_id}",...e}),Ee=e=>(e.client??u).get({url:"/api/datasets/{dataset_id}/captions",...e}),Ue=e=>((e==null?void 0:e.client)??u).get({responseTransformer:he,url:"/api/settings",...e}),We=e=>(e.client??u).get({url:"/api/classifiers/{classifier_id}/sample_history",...e}),Pe=e=>((e==null?void 0:e.client)??u).post({url:"/api/embeddings2d/default",...e,headers:{"Content-Type":"application/json",...e==null?void 0:e.headers}}),ke=e=>(e.client??u).get({url:"/api/datasets/{dataset_id}/metadata/info",...e}),He=e=>(e.client??u).post({url:"/api/datasets/{dataset_id}/metadata/typicality",...e,headers:{"Content-Type":"application/json",...e.headers}}),Ne=e=>(e.client??u).post({url:"/api/datasets/{dataset_id}/selection",...e,headers:{"Content-Type":"application/json",...e.headers}});export{Te as a,_e as b,je as c,u as d,qe as e,Ce as f,ke as g,Ie as h,De as i,Ae as j,xe as k,ze as l,Ee as m,Re as n,Ve as o,Oe as p,Pe as q,ge as r,Ue as s,be as t,$e as u,we as v,Se as w,Ne as x,He as y,We as z};
@@ -0,0 +1,96 @@
1
+ import"./CWj6FrbW.js";import{p as F,f as W,n as j,a as H,c as A,r as I,g as l,b as ct,s as at,t as ft,am as At,u as kt,al as ut,Z as tt,ab as Ct}from"./C3xJX0nD.js";import{c as nt,a as T,f as O,t as Et}from"./CAPx0Bfm.js";import{s as X}from"./DoEId1MK.js";import{s as vt,r as K,p as ot,b as it}from"./xQhUoIl9.js";import{I as gt,P as Nt,f as _t,o as Vt,G as Bt,U as Rt,V as pt,W as wt,y as et,X as rt,Y as zt,Z as Yt,$ as Ot,J as Mt}from"./DgCXCApo.js";import{a as ht,g as Xt,e as St,c as lt,s as Ft}from"./BDE1kT04.js";import{i as xt}from"./DmGM9V9Q.js";import{P as Ht}from"./gBp1tBnA.js";import{g as qt,u as Gt,h as Ut}from"./DqhovIS0.js";import"./CEPpkZIV.js";import{s as st}from"./CpbA3HU7.js";import{f as Pt,a as Wt}from"./DELrRF6e.js";import{o as jt}from"./BHoO7UL_.js";function Kt(a,t){F(t,!0);/**
2
+ * @license @lucide/svelte v0.482.0 - ISC
3
+ *
4
+ * ISC License
5
+ *
6
+ * Copyright (c) for portions of Lucide are held by Cole Bemis 2013-2022 as part of Feather (MIT). All other copyright (c) for Lucide are held by Lucide Contributors 2022.
7
+ *
8
+ * Permission to use, copy, modify, and/or distribute this software for any
9
+ * purpose with or without fee is hereby granted, provided that the above
10
+ * copyright notice and this permission notice appear in all copies.
11
+ *
12
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
13
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
14
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
15
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
16
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
17
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
18
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
19
+ *
20
+ */let o=K(t,["$$slots","$$events","$$legacy"]);const d=[["path",{d:"m9 18 6-6-6-6"}]];gt(a,vt({name:"chevron-right"},()=>o,{get iconNode(){return d},children:(i,u)=>{var r=nt(),x=W(r);X(x,()=>t.children??j),T(i,r)},$$slots:{default:!0}})),H()}function He(a,t){F(t,!0);/**
21
+ * @license @lucide/svelte v0.482.0 - ISC
22
+ *
23
+ * ISC License
24
+ *
25
+ * Copyright (c) for portions of Lucide are held by Cole Bemis 2013-2022 as part of Feather (MIT). All other copyright (c) for Lucide are held by Lucide Contributors 2022.
26
+ *
27
+ * Permission to use, copy, modify, and/or distribute this software for any
28
+ * purpose with or without fee is hereby granted, provided that the above
29
+ * copyright notice and this permission notice appear in all copies.
30
+ *
31
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
32
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
33
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
34
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
35
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
36
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
37
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
38
+ *
39
+ */let o=K(t,["$$slots","$$events","$$legacy"]);const d=[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5"}],["path",{d:"M3 12A9 3 0 0 0 21 12"}]];gt(a,vt({name:"database"},()=>o,{get iconNode(){return d},children:(i,u)=>{var r=nt(),x=W(r);X(x,()=>t.children??j),T(i,r)},$$slots:{default:!0}})),H()}function qe(a,t){F(t,!0);/**
40
+ * @license @lucide/svelte v0.482.0 - ISC
41
+ *
42
+ * ISC License
43
+ *
44
+ * Copyright (c) for portions of Lucide are held by Cole Bemis 2013-2022 as part of Feather (MIT). All other copyright (c) for Lucide are held by Lucide Contributors 2022.
45
+ *
46
+ * Permission to use, copy, modify, and/or distribute this software for any
47
+ * purpose with or without fee is hereby granted, provided that the above
48
+ * copyright notice and this permission notice appear in all copies.
49
+ *
50
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
51
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
52
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
53
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
54
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
55
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
56
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
57
+ *
58
+ */let o=K(t,["$$slots","$$events","$$legacy"]);const d=[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-5.999a2 2 0 0 1 2.582 0l7 5.999A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z"}]];gt(a,vt({name:"house"},()=>o,{get iconNode(){return d},children:(i,u)=>{var r=nt(),x=W(r);X(x,()=>t.children??j),T(i,r)},$$slots:{default:!0}})),H()}function Qt(a,t){F(t,!0);/**
59
+ * @license @lucide/svelte v0.482.0 - ISC
60
+ *
61
+ * ISC License
62
+ *
63
+ * Copyright (c) for portions of Lucide are held by Cole Bemis 2013-2022 as part of Feather (MIT). All other copyright (c) for Lucide are held by Lucide Contributors 2022.
64
+ *
65
+ * Permission to use, copy, modify, and/or distribute this software for any
66
+ * purpose with or without fee is hereby granted, provided that the above
67
+ * copyright notice and this permission notice appear in all copies.
68
+ *
69
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
70
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
71
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
72
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
73
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
74
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
75
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
76
+ *
77
+ */let o=K(t,["$$slots","$$events","$$legacy"]);const d=[["circle",{cx:"11",cy:"11",r:"8"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65"}],["line",{x1:"11",x2:"11",y1:"8",y2:"14"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11"}]];gt(a,vt({name:"zoom-in"},()=>o,{get iconNode(){return d},children:(i,u)=>{var r=nt(),x=W(r);X(x,()=>t.children??j),T(i,r)},$$slots:{default:!0}})),H()}function Lt(a,t){F(t,!0);/**
78
+ * @license @lucide/svelte v0.482.0 - ISC
79
+ *
80
+ * ISC License
81
+ *
82
+ * Copyright (c) for portions of Lucide are held by Cole Bemis 2013-2022 as part of Feather (MIT). All other copyright (c) for Lucide are held by Lucide Contributors 2022.
83
+ *
84
+ * Permission to use, copy, modify, and/or distribute this software for any
85
+ * purpose with or without fee is hereby granted, provided that the above
86
+ * copyright notice and this permission notice appear in all copies.
87
+ *
88
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
89
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
90
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
91
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
92
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
93
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
94
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
95
+ *
96
+ */let o=K(t,["$$slots","$$events","$$legacy"]);const d=[["circle",{cx:"11",cy:"11",r:"8"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11"}]];gt(a,vt({name:"zoom-out"},()=>o,{get iconNode(){return d},children:(i,u)=>{var r=nt(),x=W(r);X(x,()=>t.children??j),T(i,r)},$$slots:{default:!0}})),H()}function Jt(a){return new Nt([document.querySelectorAll(a)],[document.documentElement])}var $t=O("<nav><!></nav>");function Ge(a,t){F(t,!0);let o=ot(t,"ref",15),d=K(t,["$$slots","$$events","$$legacy","ref","class","children"]);var i=$t();ht(i,()=>({class:t.class,"aria-label":"breadcrumb",...d}));var u=A(i);X(u,()=>t.children??j),I(i),it(i,r=>o(r),()=>o()),T(a,i),H()}var te=O("<li><!></li>");function Ue(a,t){F(t,!0);let o=ot(t,"ref",15,null),d=K(t,["$$slots","$$events","$$legacy","ref","class","children"]);var i=te();ht(i,r=>({class:r,...d}),[()=>_t("inline-flex items-center gap-1.5",t.class)]);var u=A(i);X(u,()=>t.children??j),I(i),it(i,r=>o(r),()=>o()),T(a,i),H()}var ee=O("<li><!></li>");function We(a,t){F(t,!0);let o=ot(t,"ref",15,null),d=K(t,["$$slots","$$events","$$legacy","ref","class","children"]);var i=ee();ht(i,g=>({role:"presentation","aria-hidden":"true",class:g,...d}),[()=>_t("[&>svg]:size-3.5",t.class)]);var u=A(i);{var r=g=>{var f=nt(),M=W(f);X(M,()=>t.children??j),T(g,f)},x=g=>{Kt(g,{})};xt(u,g=>{t.children?g(r):g(x,!1)})}I(i),it(i,g=>o(g),()=>o()),T(a,i),H()}var ae=O("<a><!></a>");function je(a,t){F(t,!0);let o=ot(t,"ref",15,null),d=ot(t,"href",3,void 0),i=K(t,["$$slots","$$events","$$legacy","ref","class","href","child","children"]);const u=ct(()=>({class:_t("hover:text-foreground transition-colors",t.class),href:d(),...i})),r=Xt(),[x,g]=r;var f=nt(),M=W(f);{var C=w=>{var b=nt(),k=W(b);X(k,()=>t.child,()=>({props:l(u)})),T(w,b)},_=w=>{var b=ae();ht(b,Z=>({...Z}),[()=>g({...l(u)},[{attribute_name:"href",lang_attribute_name:"hreflang"}])]);var k=A(b);X(k,()=>t.children??j),I(b),it(b,Z=>o(Z),()=>o()),T(w,b)};xt(M,w=>{t.child?w(C):w(_,!1)})}T(a,f),H()}var ne=O("<ol><!></ol>");function Ke(a,t){F(t,!0);let o=ot(t,"ref",15,null),d=K(t,["$$slots","$$events","$$legacy","ref","class","children"]);var i=ne();ht(i,r=>({class:r,...d}),[()=>_t("text-muted-foreground flex flex-wrap items-center gap-1.5 break-words text-sm sm:gap-2.5",t.class)]);var u=A(i);X(u,()=>t.children??j),I(i),it(i,r=>o(r),()=>o()),T(a,i),H()}var oe=O("<span><!></span>");function Qe(a,t){F(t,!0);let o=ot(t,"ref",15,null),d=K(t,["$$slots","$$events","$$legacy","ref","class","children"]);var i=oe();ht(i,r=>({role:"link","aria-disabled":"true","aria-current":"page",class:r,...d}),[()=>_t("text-foreground font-normal",t.class)]);var u=A(i);X(u,()=>t.children??j),I(i),it(i,r=>o(r),()=>o()),T(a,i),H()}const Le=a=>`${Ht}/sample/${a}`,Je=({sampleId:a,datasetId:t})=>{const o=qt({path:{sample_id:a,dataset_id:t}}),d=Gt(),i=Ut(o);return{refetch:()=>{d.invalidateQueries({queryKey:o.queryKey})},sample:i}},ie="bbox-change-annotation-details",$e=({annotation:a,addReversibleAction:t,updateAnnotation:o})=>{const d=Vt(a),i=async()=>{const u={annotation_id:a.annotation_id,dataset_id:a.dataset_id,bounding_box:d};await o(u)};t({id:`bbox-change-${a.annotation_id}-${Date.now()}`,description:`Revert bounding box change for annotation ${a.annotation_id}`,execute:i,timestamp:new Date,groupId:ie})};var re=O('<span class="text-sm"> </span> <span class="break-all text-sm"> </span>',1),se=O('<div class="grid grid-cols-[6rem_1fr] gap-y-3 text-diffuse-foreground"></div>'),le=O('<div class="flex items-start gap-3"><span class="truncate text-sm font-medium"> </span> <pre class="min-w-[8rem] flex-1 overflow-x-auto whitespace-pre-wrap rounded bg-muted p-2 text-sm"> </pre></div>'),ue=O('<div class="flex items-start gap-3"><span class="truncate text-sm font-medium"> </span> <span class="min-w-[8rem] flex-1 break-all text-sm"> </span></div>'),ce=O('<div class="space-y-3 text-diffuse-foreground"></div>'),he=O("<!> <!>",1);function ta(a,t){F(t,!0);const o=ot(t,"showCustomMetadata",3,!0),d=ct(()=>[{id:"height",label:"Height:",value:Pt(t.sample.height)+"px"},{id:"width",label:"Width:",value:Pt(t.sample.width)+"px"},{id:"filename",label:"Filename:",value:t.sample.file_name},{id:"filepath",label:"Filepath:",value:t.sample.file_path_abs}]),i=ct(()=>{const f=[];if(t.sample.metadata_dict&&typeof t.sample.metadata_dict=="object"&&"data"in t.sample.metadata_dict){const M=t.sample.metadata_dict.data;M&&typeof M=="object"&&Object.entries(M).forEach(([C,_])=>{const w=Wt(_),b=typeof _=="object"&&_!==null&&!Array.isArray(_);f.push({id:`metadata_${C}`,label:`${C}:`,value:w,isComplex:b})})}return f});var u=he(),r=W(u);Bt(r,{title:"Sample details",children:(f,M)=>{var C=se();St(C,21,()=>l(d),({label:_,value:w,id:b})=>_,(_,w)=>{let b=()=>l(w).label,k=()=>l(w).value,Z=()=>l(w).id;var h=re(),E=W(h),B=A(E,!0);I(E);var N=at(E,2),Y=A(N,!0);I(N),ft(()=>{st(B,b()),lt(N,"data-testid",`sample-metadata-${Z()}`),st(Y,k())}),T(_,h)}),I(C),T(f,C)}});var x=at(r,2);{var g=f=>{Bt(f,{title:"Metadata",children:(M,C)=>{var _=ce();St(_,21,()=>l(i),({label:w,value:b,id:k,isComplex:Z})=>w,(w,b)=>{let k=()=>l(b).label,Z=()=>l(b).value,h=()=>l(b).id,E=()=>l(b).isComplex;var B=nt(),N=W(B);{var Y=m=>{var S=le(),P=A(S),q=A(P,!0);I(P);var Q=at(P,2),dt=A(Q,!0);I(Q),I(S),ft(()=>{lt(P,"title",k()),st(q,k()),st(dt,Z())}),T(m,S)},R=m=>{var S=ue(),P=A(S),q=A(P,!0);I(P);var Q=at(P,2),dt=A(Q,!0);I(Q),I(S),ft(()=>{lt(P,"title",k()),st(q,k()),lt(Q,"data-testid",`sample-metadata-${h()}`),st(dt,Z())}),T(m,S)};xt(N,m=>{E()?m(Y):m(R,!1)})}T(w,B)}),I(_),T(M,_)}})};xt(x,f=>{o()&&l(i).length>0&&f(g)})}T(a,u),H()}var de=1e-12;function Dt(a){return((a=Math.exp(a))+1/a)/2}function me(a){return((a=Math.exp(a))-1/a)/2}function fe(a){return((a=Math.exp(2*a))-1)/(a+1)}const ve=function a(t,o,d){function i(u,r){var x=u[0],g=u[1],f=u[2],M=r[0],C=r[1],_=r[2],w=M-x,b=C-g,k=w*w+b*b,Z,h;if(k<de)h=Math.log(_/f)/t,Z=function(m){return[x+m*w,g+m*b,f*Math.exp(t*m*h)]};else{var E=Math.sqrt(k),B=(_*_-f*f+d*k)/(2*f*o*E),N=(_*_-f*f-d*k)/(2*_*o*E),Y=Math.log(Math.sqrt(B*B+1)-B),R=Math.log(Math.sqrt(N*N+1)-N);h=(R-Y)/t,Z=function(m){var S=m*h,P=Dt(Y),q=f/(o*E)*(P*fe(t*S+Y)-me(Y));return[x+q*w,g+q*b,f*P/Dt(t*S+Y)]}}return Z.duration=h*1e3*t/Math.SQRT2,Z}return i.rho=function(u){var r=Math.max(.001,+u),x=r*r,g=x*x;return a(r,x,g)},i}(Math.SQRT2,2,4),yt=a=>()=>a;function ge(a,{sourceEvent:t,target:o,transform:d,dispatch:i}){Object.defineProperties(this,{type:{value:a,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},target:{value:o,enumerable:!0,configurable:!0},transform:{value:d,enumerable:!0,configurable:!0},_:{value:i}})}function Tt(a){a.stopImmediatePropagation()}function mt(a){a.preventDefault(),a.stopImmediatePropagation()}function _e(a){return(!a.ctrlKey||a.type==="wheel")&&!a.button}function ye(){var a=this;return a instanceof SVGElement?(a=a.ownerSVGElement||a,a.hasAttribute("viewBox")?(a=a.viewBox.baseVal,[[a.x,a.y],[a.x+a.width,a.y+a.height]]):[[0,0],[a.width.baseVal.value,a.height.baseVal.value]]):[[0,0],[a.clientWidth,a.clientHeight]]}function It(){return this.__zoom||pt}function pe(a){return-a.deltaY*(a.deltaMode===1?.05:a.deltaMode?1:.002)*(a.ctrlKey?10:1)}function xe(){return navigator.maxTouchPoints||"ontouchstart"in this}function be(a,t,o){var d=a.invertX(t[0][0])-o[0][0],i=a.invertX(t[1][0])-o[1][0],u=a.invertY(t[0][1])-o[0][1],r=a.invertY(t[1][1])-o[1][1];return a.translate(i>d?(d+i)/2:Math.min(0,d)||Math.max(0,i),r>u?(u+r)/2:Math.min(0,u)||Math.max(0,r))}function we(){var a=_e,t=ye,o=be,d=pe,i=xe,u=[0,1/0],r=[[-1/0,-1/0],[1/0,1/0]],x=250,g=ve,f=Rt("start","zoom","end"),M,C,_,w=500,b=150,k=0,Z=10;function h(e){e.property("__zoom",It).on("wheel.zoom",S,{passive:!1}).on("mousedown.zoom",P).on("dblclick.zoom",q).filter(i).on("touchstart.zoom",Q).on("touchmove.zoom",dt).on("touchend.zoom touchcancel.zoom",Zt).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}h.transform=function(e,s,n,c){var v=e.selection?e.selection():e;v.property("__zoom",It),e!==v?Y(e,s,n,c):v.interrupt().each(function(){R(this,arguments).event(c).start().zoom(null,typeof s=="function"?s.apply(this,arguments):s).end()})},h.scaleBy=function(e,s,n,c){h.scaleTo(e,function(){var v=this.__zoom.k,y=typeof s=="function"?s.apply(this,arguments):s;return v*y},n,c)},h.scaleTo=function(e,s,n,c){h.transform(e,function(){var v=t.apply(this,arguments),y=this.__zoom,p=n==null?N(v):typeof n=="function"?n.apply(this,arguments):n,z=y.invert(p),D=typeof s=="function"?s.apply(this,arguments):s;return o(B(E(y,D),p,z),v,r)},n,c)},h.translateBy=function(e,s,n,c){h.transform(e,function(){return o(this.__zoom.translate(typeof s=="function"?s.apply(this,arguments):s,typeof n=="function"?n.apply(this,arguments):n),t.apply(this,arguments),r)},null,c)},h.translateTo=function(e,s,n,c,v){h.transform(e,function(){var y=t.apply(this,arguments),p=this.__zoom,z=c==null?N(y):typeof c=="function"?c.apply(this,arguments):c;return o(pt.translate(z[0],z[1]).scale(p.k).translate(typeof s=="function"?-s.apply(this,arguments):-s,typeof n=="function"?-n.apply(this,arguments):-n),y,r)},c,v)};function E(e,s){return s=Math.max(u[0],Math.min(u[1],s)),s===e.k?e:new wt(s,e.x,e.y)}function B(e,s,n){var c=s[0]-n[0]*e.k,v=s[1]-n[1]*e.k;return c===e.x&&v===e.y?e:new wt(e.k,c,v)}function N(e){return[(+e[0][0]+ +e[1][0])/2,(+e[0][1]+ +e[1][1])/2]}function Y(e,s,n,c){e.on("start.zoom",function(){R(this,arguments).event(c).start()}).on("interrupt.zoom end.zoom",function(){R(this,arguments).event(c).end()}).tween("zoom",function(){var v=this,y=arguments,p=R(v,y).event(c),z=t.apply(v,y),D=n==null?N(z):typeof n=="function"?n.apply(v,y):n,L=Math.max(z[1][0]-z[0][0],z[1][1]-z[0][1]),V=v.__zoom,G=typeof s=="function"?s.apply(v,y):s,J=g(V.invert(D).concat(L/V.k),G.invert(D).concat(L/G.k));return function(U){if(U===1)U=G;else{var $=J(U),bt=L/$[2];U=new wt(bt,D[0]-$[0]*bt,D[1]-$[1]*bt)}p.zoom(null,U)}})}function R(e,s,n){return!n&&e.__zooming||new m(e,s)}function m(e,s){this.that=e,this.args=s,this.active=0,this.sourceEvent=null,this.extent=t.apply(e,s),this.taps=0}m.prototype={event:function(e){return e&&(this.sourceEvent=e),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(e,s){return this.mouse&&e!=="mouse"&&(this.mouse[1]=s.invert(this.mouse[0])),this.touch0&&e!=="touch"&&(this.touch0[1]=s.invert(this.touch0[0])),this.touch1&&e!=="touch"&&(this.touch1[1]=s.invert(this.touch1[0])),this.that.__zoom=s,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(e){var s=et(this.that).datum();f.call(e,this.that,new ge(e,{sourceEvent:this.sourceEvent,target:h,transform:this.that.__zoom,dispatch:f}),s)}};function S(e,...s){if(!a.apply(this,arguments))return;var n=R(this,s).event(e),c=this.__zoom,v=Math.max(u[0],Math.min(u[1],c.k*Math.pow(2,d.apply(this,arguments)))),y=rt(e);if(n.wheel)(n.mouse[0][0]!==y[0]||n.mouse[0][1]!==y[1])&&(n.mouse[1]=c.invert(n.mouse[0]=y)),clearTimeout(n.wheel);else{if(c.k===v)return;n.mouse=[y,c.invert(y)],zt(this),n.start()}mt(e),n.wheel=setTimeout(p,b),n.zoom("mouse",o(B(E(c,v),n.mouse[0],n.mouse[1]),n.extent,r));function p(){n.wheel=null,n.end()}}function P(e,...s){if(_||!a.apply(this,arguments))return;var n=e.currentTarget,c=R(this,s,!0).event(e),v=et(e.view).on("mousemove.zoom",D,!0).on("mouseup.zoom",L,!0),y=rt(e,n),p=e.clientX,z=e.clientY;Yt(e.view),Tt(e),c.mouse=[y,this.__zoom.invert(y)],zt(this),c.start();function D(V){if(mt(V),!c.moved){var G=V.clientX-p,J=V.clientY-z;c.moved=G*G+J*J>k}c.event(V).zoom("mouse",o(B(c.that.__zoom,c.mouse[0]=rt(V,n),c.mouse[1]),c.extent,r))}function L(V){v.on("mousemove.zoom mouseup.zoom",null),Ot(V.view,c.moved),mt(V),c.event(V).end()}}function q(e,...s){if(a.apply(this,arguments)){var n=this.__zoom,c=rt(e.changedTouches?e.changedTouches[0]:e,this),v=n.invert(c),y=n.k*(e.shiftKey?.5:2),p=o(B(E(n,y),c,v),t.apply(this,s),r);mt(e),x>0?et(this).transition().duration(x).call(Y,p,c,e):et(this).call(h.transform,p,c,e)}}function Q(e,...s){if(a.apply(this,arguments)){var n=e.touches,c=n.length,v=R(this,s,e.changedTouches.length===c).event(e),y,p,z,D;for(Tt(e),p=0;p<c;++p)z=n[p],D=rt(z,this),D=[D,this.__zoom.invert(D),z.identifier],v.touch0?!v.touch1&&v.touch0[2]!==D[2]&&(v.touch1=D,v.taps=0):(v.touch0=D,y=!0,v.taps=1+!!M);M&&(M=clearTimeout(M)),y&&(v.taps<2&&(C=D[0],M=setTimeout(function(){M=null},w)),zt(this),v.start())}}function dt(e,...s){if(this.__zooming){var n=R(this,s).event(e),c=e.changedTouches,v=c.length,y,p,z,D;for(mt(e),y=0;y<v;++y)p=c[y],z=rt(p,this),n.touch0&&n.touch0[2]===p.identifier?n.touch0[0]=z:n.touch1&&n.touch1[2]===p.identifier&&(n.touch1[0]=z);if(p=n.that.__zoom,n.touch1){var L=n.touch0[0],V=n.touch0[1],G=n.touch1[0],J=n.touch1[1],U=(U=G[0]-L[0])*U+(U=G[1]-L[1])*U,$=($=J[0]-V[0])*$+($=J[1]-V[1])*$;p=E(p,Math.sqrt(U/$)),z=[(L[0]+G[0])/2,(L[1]+G[1])/2],D=[(V[0]+J[0])/2,(V[1]+J[1])/2]}else if(n.touch0)z=n.touch0[0],D=n.touch0[1];else return;n.zoom("touch",o(B(p,z,D),n.extent,r))}}function Zt(e,...s){if(this.__zooming){var n=R(this,s).event(e),c=e.changedTouches,v=c.length,y,p;for(Tt(e),_&&clearTimeout(_),_=setTimeout(function(){_=null},w),y=0;y<v;++y)p=c[y],n.touch0&&n.touch0[2]===p.identifier?delete n.touch0:n.touch1&&n.touch1[2]===p.identifier&&delete n.touch1;if(n.touch1&&!n.touch0&&(n.touch0=n.touch1,delete n.touch1),n.touch0)n.touch0[1]=this.__zoom.invert(n.touch0[0]);else if(n.end(),n.taps===2&&(p=rt(p,this),Math.hypot(C[0]-p[0],C[1]-p[1])<Z)){var z=et(this).on("dblclick.zoom");z&&z.apply(this,arguments)}}}return h.wheelDelta=function(e){return arguments.length?(d=typeof e=="function"?e:yt(+e),h):d},h.filter=function(e){return arguments.length?(a=typeof e=="function"?e:yt(!!e),h):a},h.touchable=function(e){return arguments.length?(i=typeof e=="function"?e:yt(!!e),h):i},h.extent=function(e){return arguments.length?(t=typeof e=="function"?e:yt([[+e[0][0],+e[0][1]],[+e[1][0],+e[1][1]]]),h):t},h.scaleExtent=function(e){return arguments.length?(u[0]=+e[0],u[1]=+e[1],h):[u[0],u[1]]},h.translateExtent=function(e){return arguments.length?(r[0][0]=+e[0][0],r[1][0]=+e[1][0],r[0][1]=+e[0][1],r[1][1]=+e[1][1],h):[[r[0][0],r[0][1]],[r[1][0],r[1][1]]]},h.constrain=function(e){return arguments.length?(o=e,h):o},h.duration=function(e){return arguments.length?(x=+e,h):x},h.interpolate=function(e){return arguments.length?(g=e,h):g},h.on=function(){var e=f.on.apply(f,arguments);return e===f?h:e},h.clickDistance=function(e){return arguments.length?(k=(e=+e)*e,h):Math.sqrt(k)},h.tapDistance=function(e){return arguments.length?(Z=+e,h):Z},h}function ze(a,t){let o=a.scaleIndependentXForm;o||(o=a.scaleIndependentXForm=t.createSVGTransform(),a.transform.baseVal.appendItem(o));const d=a.parentNode;if(d){const i=d.getScreenCTM();if(i){const u=i.inverse().multiply(t.getScreenCTM());u.e=u.f=0,o.setMatrix(u)}}}var Me=O('<div class="pointer-events-auto absolute bottom-0 left-1 z-20 flex select-none items-center gap-1 rounded-lg bg-muted bg-opacity-80 shadow-md backdrop-blur-sm"><!> <div class="h-6 w-px bg-white bg-opacity-20"></div> <!> <div class="w-[32px] text-center text-sm text-muted-foreground" data-testid="zoom-level"> </div> <!></div>');function Te(a,t){var o=Me(),d=A(o);Mt(d,{variant:"ghost","data-testid":"zoom-reset",size:"sm",get onclick(){return t.onZoomReset},get disabled(){return t.isResetDisabled},children:(g,f)=>{At();var M=Et("Reset");T(g,M)},$$slots:{default:!0}});var i=at(d,4);Mt(i,{title:"zoom out",variant:"ghost",size:"icon","data-testid":"zoom-out",get onclick(){return t.onZoomOut},get disabled(){return t.isZoominDisabled},children:(g,f)=>{Lt(g,{class:"h-4 w-4"})},$$slots:{default:!0}});var u=at(i,2),r=A(u);I(u);var x=at(u,2);Mt(x,{title:"zoom in",variant:"ghost",size:"icon","data-testid":"zoom-in",get onclick(){return t.onZoomIn},get disabled(){return t.isZoomoutDisabled},children:(g,f)=>{Qt(g,{class:"h-4 w-4"})},$$slots:{default:!0}}),I(o),ft(g=>st(r,`${g??""}%`),[()=>Math.round(t.scale*100)]),T(a,o)}var ke=O('<div class="relative flex h-full w-full select-none items-center justify-center"><!> <svg class="z-10 h-full w-full" preserveAspectRatio="xMidYMid meet"><g><!></g></svg> <svg class="pointer-events-none absolute inset-0" preserveAspectRatio="xMidYMid meet"></svg></div>');function ea(a,t){F(t,!0);let o=ut(null),d=ut(null);const i=ot(t,"cursor",3,"auto");let u=ut(800),r=ut(600);kt(()=>{if(!l(o))return;tt(u,l(o).clientWidth,!0),tt(r,l(o).clientHeight,!0);const m=new ResizeObserver(()=>{l(o)&&(tt(u,l(o).clientWidth,!0),tt(r,l(o).clientHeight,!0))});return m.observe(l(o)),()=>m.disconnect()});const x=10,g=ct(()=>{const m={x:0,y:0,width:t.width,height:t.height};if(t.boundingBox){k();const{x:S,y:P,width:q,height:Q}=t.boundingBox;return{x:Math.round(Math.max(0,S-x)),y:Math.round(Math.max(0,P-x)),width:Math.round(Math.min(t.width-S,q+x*2)),height:Math.round(Math.min(t.height-P,Q+x*2))}}return m});let f=ut(Ct({k:1,x:0,y:0}));const M=ct(()=>{if(!l(o))return 1;const m=l(u)/t.width,S=l(r)/t.height,P=Math.min(m,S);return l(f).k*P}),C=ct(()=>{if(!l(o))return 1;let m=l(M);if(t.boundingBox){const S=t.width/l(g).width,P=t.height/l(g).height,q=Math.min(S,P);m*=q}return m});let _=ut(null);const w=()=>{l(o)&&(tt(_,we().on("zoom",m=>{tt(f,m.transform,!0)}).filter(m=>(!m.ctrlKey||m.type==="wheel")&&!m.button&&!(m.type==="mousedown"&&m.button===2)).wheelDelta(m=>-m.deltaY*.002),!0),et(l(o)).call(l(_)).on("dblclick.zoom",null))},b=m=>{if(!l(o)||!l(_))return;const S=m?1.5:.75;et(l(o)).transition().duration(300).call(l(_).scaleBy,S)},k=()=>{!l(o)||!l(_)||et(l(o)).transition().duration(300).call(l(_).transform,pt)},Z=()=>{tt(f,{k:1,x:0,y:0},!0),l(o)&&l(_)&&et(l(o)).call(l(_).transform,pt)};jt(()=>{var m;w(),(m=t.registerResetFn)==null||m.call(t,Z)}),kt(()=>{l(f).k,Jt(".unscaled").each(function(){ze(this,l(d))})});var h=ke(),E=A(h);Te(E,{get scale(){return l(M)},onZoomIn:()=>b(!0),onZoomOut:()=>b(!1),onZoomReset:k});var B=at(E,2),N=A(B),Y=A(N);X(Y,()=>t.zoomableContent,()=>({scale:l(C)})),I(N),I(B),it(B,m=>tt(o,m),()=>l(o));var R=at(B,2);lt(R,"viewBox","0 0 1024 768"),it(R,m=>tt(d,m),()=>l(d)),I(h),ft(()=>{Ft(B,`cursor: ${i()};`),lt(B,"viewBox",`${l(g).x} ${l(g).y} ${l(g).width} ${l(g).height}`),lt(N,"transform",`translate(${l(f).x}, ${l(f).y}) scale(${l(f).k})`)}),T(a,h),H()}export{Ge as B,He as D,qe as H,ta as S,ea as Z,Ke as a,Ue as b,je as c,We as d,Qe as e,$e as f,ie as g,Le as h,Je as u};
@@ -1 +1 @@
1
- import{d,e as g,u as c,h as m,i as b,j as l,g as p,k as h,l as k}from"./Frwd2CjB.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=m(()=>e.m.map(b));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
+ import{d,e as g,u as c,h as m,i as b,j as l,g as p,k as h,l as k}from"./C3xJX0nD.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=m(()=>e.m.map(b));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 +1 @@
1
- import{c as d}from"./DzX_yyqb.js";import{a as r}from"./qIv1kPyv.js";import{m,w as u}from"./Frwd2CjB.js";const l=async({dataset_id:s,annotation_label_ids:n})=>{const t={data:void 0,error:void 0};try{const i=await d.GET("/api/datasets/{dataset_id}/samples/dimensions",{params:{path:{dataset_id:s},query:{annotation_label_ids:n}}});if(i.error)throw new Error(JSON.stringify(i.error,null,2));if(!i.data)throw new Error("No dimension bounds data");t.data=i.data}catch(i){t.error="Error loading dimension bounds: "+String(i)}return t},o=r("lightlyStudio_dimensions_bounds",{min_width:0,max_width:0,min_height:0,max_height:0}),e=r("lightlyStudio_dimensions_values",{min_width:0,max_width:0,min_height:0,max_height:0}),h=s=>{e.set(s)},c=s=>{o.set(s)},a=u(!1),w=async s=>{if(m(a))return;const{data:n}=await l({dataset_id:s});n&&(o.set(n),e.set(n)),a.set(!0)},f=s=>(s&&w(s),{dimensionsBounds:o,dimensionsValues:e,updateDimensionsValues:h,updateDimensionsBounds:c});export{f as u};
1
+ import{c as d}from"./gBp1tBnA.js";import{a as r}from"./Bip0vTKl.js";import{m,w as u}from"./C3xJX0nD.js";const l=async({dataset_id:s,annotation_label_ids:n})=>{const t={data:void 0,error:void 0};try{const i=await d.GET("/api/datasets/{dataset_id}/samples/dimensions",{params:{path:{dataset_id:s},query:{annotation_label_ids:n}}});if(i.error)throw new Error(JSON.stringify(i.error,null,2));if(!i.data)throw new Error("No dimension bounds data");t.data=i.data}catch(i){t.error="Error loading dimension bounds: "+String(i)}return t},o=r("lightlyStudio_dimensions_bounds",{min_width:0,max_width:0,min_height:0,max_height:0}),e=r("lightlyStudio_dimensions_values",{min_width:0,max_width:0,min_height:0,max_height:0}),h=s=>{e.set(s)},c=s=>{o.set(s)},a=u(!1),w=async s=>{if(m(a))return;const{data:n}=await l({dataset_id:s});n&&(o.set(n),e.set(n)),a.set(!0)},f=s=>(s&&w(s),{dimensionsBounds:o,dimensionsValues:e,updateDimensionsValues:h,updateDimensionsBounds:c});export{f as u};
@@ -0,0 +1,2 @@
1
+ var Re=Object.defineProperty;var ae=t=>{throw TypeError(t)};var ke=(t,e,i)=>e in t?Re(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i;var oe=(t,e,i)=>ke(t,typeof e!="symbol"?e+"":e,i),$=(t,e,i)=>e.has(t)||ae("Cannot "+i);var s=(t,e,i)=>($(t,e,"read from private field"),i?i.call(t):e.get(t)),o=(t,e,i)=>e.has(t)?ae("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(t):e.set(t,i),n=(t,e,i,r)=>($(t,e,"write to private field"),r?r.call(t,i):e.set(t,i),i),g=(t,e,i)=>($(t,e,"access private method"),i);import{an as Ne,g as _e,ao as pe,a6 as Se,h as De,ap as le,C as Z,A as w,z as T,aq as Ce,K as Y,v as ve,L as Fe,a4 as K,N as Oe,x as C,ar as M,W as Q,H as ue,G as B,as as he,at as Ie,J as de,d as ge,au as Le,y as X,P,am as Ve,O as Pe,av as fe,aw as xe,E as He,ax as Me,ay as Be,az as z,aA as We,R as ye,aB as Ye,aC as me,Q as V,_ as Ee,aD as ee,aE as te,aF as je,aG as qe,aH as ze,aI as Ge,p as Je,aJ as Ke,aK as Ue,a as $e}from"./C3xJX0nD.js";import{a as Qe,r as ce,h as W}from"./SiegjVo0.js";import{b as Xe}from"./CAPx0Bfm.js";function Ze(t){let e=0,i=pe(0),r;return()=>{Ne()&&(_e(i),Se(()=>(e===0&&(r=De(()=>t(()=>le(i)))),e+=1,()=>{Z(()=>{e-=1,e===0&&(r==null||r(),r=void 0,le(i))})})))}}var et=He|Me|Be;function tt(t,e,i){new st(t,e,i)}var y,f,H,m,F,E,v,h,b,A,O,R,I,k,G,J,l,be,Te,j,q,se;class st{constructor(e,i,r){o(this,l);oe(this,"parent");o(this,y,!1);o(this,f);o(this,H,T?w:null);o(this,m);o(this,F);o(this,E);o(this,v,null);o(this,h,null);o(this,b,null);o(this,A,null);o(this,O,0);o(this,R,0);o(this,I,!1);o(this,k,null);o(this,G,()=>{s(this,k)&&Ce(s(this,k),s(this,O))});o(this,J,Ze(()=>(n(this,k,pe(s(this,O))),()=>{n(this,k,null)})));n(this,f,e),n(this,m,i),n(this,F,r),this.parent=Y.b,n(this,y,!!s(this,m).pending),n(this,E,ve(()=>{if(Y.b=this,T){const u=s(this,H);Fe(),u.nodeType===K&&u.data===Oe?g(this,l,Te).call(this):g(this,l,be).call(this)}else{try{n(this,v,C(()=>r(s(this,f))))}catch(u){this.error(u)}s(this,R)>0?g(this,l,q).call(this):n(this,y,!1)}},et)),T&&n(this,f,w)}is_pending(){return s(this,y)||!!this.parent&&this.parent.is_pending()}has_pending_snippet(){return!!s(this,m).pending}update_pending_count(e){g(this,l,se).call(this,e),n(this,O,s(this,O)+e),Le.add(s(this,G))}get_effect_pending(){return s(this,J).call(this),_e(s(this,k))}error(e){var i=s(this,m).onerror;let r=s(this,m).failed;if(s(this,I)||!i&&!r)throw e;s(this,v)&&(X(s(this,v)),n(this,v,null)),s(this,h)&&(X(s(this,h)),n(this,h,null)),s(this,b)&&(X(s(this,b)),n(this,b,null)),T&&(P(s(this,H)),Ve(),P(Pe()));var u=!1,a=!1;const c=()=>{if(u){We();return}u=!0,a&&xe(),M.ensure(),n(this,O,0),s(this,b)!==null&&Q(s(this,b),()=>{n(this,b,null)}),n(this,y,this.has_pending_snippet()),n(this,v,g(this,l,j).call(this,()=>(n(this,I,!1),C(()=>s(this,F).call(this,s(this,f)))))),s(this,R)>0?g(this,l,q).call(this):n(this,y,!1)};var N=de;try{B(null),a=!0,i==null||i(e,c),a=!1}catch(S){fe(S,s(this,E)&&s(this,E).parent)}finally{B(N)}r&&Z(()=>{n(this,b,g(this,l,j).call(this,()=>{n(this,I,!0);try{return C(()=>{r(s(this,f),()=>e,()=>c)})}catch(S){return fe(S,s(this,E).parent),null}finally{n(this,I,!1)}}))})}}y=new WeakMap,f=new WeakMap,H=new WeakMap,m=new WeakMap,F=new WeakMap,E=new WeakMap,v=new WeakMap,h=new WeakMap,b=new WeakMap,A=new WeakMap,O=new WeakMap,R=new WeakMap,I=new WeakMap,k=new WeakMap,G=new WeakMap,J=new WeakMap,l=new WeakSet,be=function(){try{n(this,v,C(()=>s(this,F).call(this,s(this,f))))}catch(e){this.error(e)}n(this,y,!1)},Te=function(){const e=s(this,m).pending;e&&(n(this,h,C(()=>e(s(this,f)))),M.enqueue(()=>{n(this,v,g(this,l,j).call(this,()=>(M.ensure(),C(()=>s(this,F).call(this,s(this,f)))))),s(this,R)>0?g(this,l,q).call(this):(Q(s(this,h),()=>{n(this,h,null)}),n(this,y,!1))}))},j=function(e){var i=Y,r=de,u=ge;ue(s(this,E)),B(s(this,E)),he(s(this,E).ctx);try{return e()}catch(a){return Ie(a),null}finally{ue(i),B(r),he(u)}},q=function(){const e=s(this,m).pending;s(this,v)!==null&&(n(this,A,document.createDocumentFragment()),it(s(this,v),s(this,A))),s(this,h)===null&&n(this,h,C(()=>e(s(this,f))))},se=function(e){var i;if(!this.has_pending_snippet()){this.parent&&g(i=this.parent,l,se).call(i,e);return}n(this,R,s(this,R)+e),s(this,R)===0&&(n(this,y,!1),s(this,h)&&Q(s(this,h),()=>{n(this,h,null)}),s(this,A)&&(s(this,f).before(s(this,A)),n(this,A,null)),Z(()=>{M.ensure().flush()}))};function it(t,e){for(var i=t.nodes_start,r=t.nodes_end;i!==null;){var u=i===r?null:z(i);e.append(i),i=u}}function pt(t){return t.endsWith("capture")&&t!=="gotpointercapture"&&t!=="lostpointercapture"}const nt=["beforeinput","click","change","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"];function vt(t){return nt.includes(t)}const rt={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 gt(t){return t=t.toLowerCase(),rt[t]??t}const at=["touchstart","touchmove"];function ot(t){return at.includes(t)}const lt=["textarea","script","style","title"];function yt(t){return lt.includes(t)}let p;function ut(){p=void 0}function mt(t){let e=null,i=T;var r;if(T){for(e=w,p===void 0&&(p=Ee(document.head));p!==null&&(p.nodeType!==K||p.data!==me);)p=z(p);p===null?V(!1):p=P(z(p))}T||(r=document.head.appendChild(ye()));try{ve(()=>t(r),Ye)}finally{i&&(V(!0),p=w,P(e))}}let ie=!0;function Et(t){ie=t}function bt(t,e){var i=e==null?"":typeof e=="object"?e+"":e;i!==(t.__t??(t.__t=t.nodeValue))&&(t.__t=i,t.nodeValue=i+"")}function ht(t,e){return we(t,e)}function Tt(t,e){ee(),e.intro=e.intro??!1;const i=e.target,r=T,u=w;try{for(var a=Ee(i);a&&(a.nodeType!==K||a.data!==me);)a=z(a);if(!a)throw te;V(!0),P(a);const c=we(t,{...e,anchor:a});return V(!1),c}catch(c){if(c instanceof Error&&c.message.split(`
2
+ `).some(N=>N.startsWith("https://svelte.dev/e/")))throw c;return c!==te&&console.warn("Failed to hydrate: ",c),e.recover===!1&&je(),ee(),qe(i),V(!1),ht(t,e)}finally{V(r),P(u),ut()}}const L=new Map;function we(t,{target:e,anchor:i,props:r={},events:u,context:a,intro:c=!0}){ee();var N=new Set,S=D=>{for(var _=0;_<D.length;_++){var d=D[_];if(!N.has(d)){N.add(d);var x=ot(d);e.addEventListener(d,W,{passive:x});var re=L.get(d);re===void 0?(document.addEventListener(d,W,{passive:x}),L.set(d,1)):L.set(d,re+1)}}};S(ze(Qe)),ce.add(S);var U=void 0,Ae=Ge(()=>{var D=i??e.appendChild(ye());return tt(D,{pending:()=>{}},_=>{if(a){Je({});var d=ge;d.c=a}if(u&&(r.$$events=u),T&&Xe(_,null),ie=c,U=t(_,r)||{},ie=!0,T&&(Y.nodes_end=w,w===null||w.nodeType!==K||w.data!==Ke))throw Ue(),te;a&&$e()}),()=>{var x;for(var _ of N){e.removeEventListener(_,W);var d=L.get(_);--d===0?(document.removeEventListener(_,W),L.delete(_)):L.set(_,d)}ce.delete(S),D!==i&&((x=D.parentNode)==null||x.removeChild(D))}});return ne.set(U,Ae),U}let ne=new WeakMap;function wt(t,e){const i=ne.get(t);return i?(ne.delete(t),i(e)):Promise.resolve()}export{vt as a,mt as b,Ze as c,yt as d,Et as e,ie as f,Tt as h,pt as i,ht as m,gt as n,bt as s,wt as u};
@@ -1 +1 @@
1
- import{s as t,p as r}from"./DQ8aZ1o-.js";const e={get data(){return r.data},get error(){return r.error},get form(){return r.form},get params(){return r.params},get route(){return r.route},get state(){return r.state},get status(){return r.status},get url(){return r.url}};t.updated.check;const s=e;export{s as p};
1
+ import{s as t,p as r}from"./BHoO7UL_.js";const e={get data(){return r.data},get error(){return r.error},get form(){return r.form},get params(){return r.params},get route(){return r.route},get state(){return r.state},get status(){return r.status},get url(){return r.url}};t.updated.check;const s=e;export{s as p};
@@ -0,0 +1,4 @@
1
+ const s="en-US",f=r=>new Intl.NumberFormat(s,{}).format(r).toString(),m=(r,t=3,n=0)=>new Intl.NumberFormat(s,{maximumFractionDigits:t,minimumFractionDigits:n}).format(r).toString(),i=r=>{if(r==null)return"null";if(typeof r=="string")return r;if(typeof r=="number")return Number.isInteger(r)?f(r):m(r);if(typeof r=="boolean")return r?"true":"false";if(Array.isArray(r))return r.length===0?"[]":r.length<=3&&r.every(t=>typeof t!="object"||t===null)?`[${r.map(t=>i(t)).join(", ")}]`:`[${r.map(n=>i(n)).join(", ")}]`;if(typeof r=="object"&&r!==null&&!Array.isArray(r)){const t=r,n=Object.keys(t);return n.length===0?"{}":n.length<=3&&n.every(e=>{const o=t[e];return typeof o!="object"||o===null||Array.isArray(o)})?`{${n.map(o=>`${o}: ${i(t[o])}`).join(", ")}}`:`{
2
+ ${n.map(e=>{const o=i(t[e]);return`${e}: ${o}`}).join(`
3
+ `)}
4
+ }`}return String(r)};export{i as a,m as b,f};
@@ -1,4 +1,4 @@
1
- import"./CWj6FrbW.js";import{p as n,f as l,n as m,a as i}from"./Frwd2CjB.js";import{c as d,a as c}from"./CiaNZCBa.js";import{s as f}from"./DzX_yyqb.js";import{s as h,r as u}from"./Dafy4oEQ.js";import{I as $}from"./Cqo0Vpvt.js";function N(t,a){n(a,!0);/**
1
+ import"./CWj6FrbW.js";import{p as n,f as l,n as m,a as i}from"./C3xJX0nD.js";import{c as d,a as c}from"./CAPx0Bfm.js";import{s as f}from"./DoEId1MK.js";import{s as h,r as u}from"./xQhUoIl9.js";import{I as $}from"./DgCXCApo.js";function N(t,a){n(a,!0);/**
2
2
  * @license @lucide/svelte v0.482.0 - ISC
3
3
  *
4
4
  * ISC License
@@ -1 +1 @@
1
- import"./CWj6FrbW.js";import{p as w,$ as f,f as g,s as b,a as k}from"./Frwd2CjB.js";import{d as m,e as y}from"./Dug7Bq1S.js";import{f as n,a as r}from"./CiaNZCBa.js";import{i as c}from"./-DXuGN29.js";var x=n('<button class="absolute left-4 top-1/2 z-30 -translate-y-1/2 rounded-full bg-black/30 p-2 text-white opacity-50 transition-opacity hover:opacity-100" aria-label="Previous sample"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="m15 18-6-6 6-6"></path></svg></button>'),_=n('<button class="absolute right-4 top-1/2 z-30 -translate-y-1/2 rounded-full bg-black/30 p-2 text-white opacity-50 transition-opacity hover:opacity-100" aria-label="Next sample"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="m9 18 6-6-6-6"></path></svg></button>'),N=n("<!> <!>",1);function C(h,o){w(o,!0);const u=t=>{switch(t.key){case"ArrowRight":o.onNext();break;case"ArrowLeft":o.onPrevious();break}};var s=N();y("keydown",f,u);var l=g(s);{var v=t=>{var a=x();a.__click=function(...i){var e;(e=o.onPrevious)==null||e.apply(this,i)},r(t,a)};c(l,t=>{o.hasPrevious&&t(v)})}var p=b(l,2);{var d=t=>{var a=_();a.__click=function(...i){var e;(e=o.onNext)==null||e.apply(this,i)},r(t,a)};c(p,t=>{o.hasNext&&t(d)})}r(h,s),k()}m(["click"]);export{C as S};
1
+ import"./CWj6FrbW.js";import{p as w,$ as f,f as g,s as b,a as k}from"./C3xJX0nD.js";import{d as m,e as y}from"./SiegjVo0.js";import{f as n,a as r}from"./CAPx0Bfm.js";import{i as c}from"./DmGM9V9Q.js";var x=n('<button class="absolute left-4 top-1/2 z-30 -translate-y-1/2 rounded-full bg-black/30 p-2 text-white opacity-50 transition-opacity hover:opacity-100" aria-label="Previous sample"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="m15 18-6-6 6-6"></path></svg></button>'),_=n('<button class="absolute right-4 top-1/2 z-30 -translate-y-1/2 rounded-full bg-black/30 p-2 text-white opacity-50 transition-opacity hover:opacity-100" aria-label="Next sample"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="m9 18 6-6-6-6"></path></svg></button>'),N=n("<!> <!>",1);function C(h,o){w(o,!0);const u=t=>{switch(t.key){case"ArrowRight":o.onNext();break;case"ArrowLeft":o.onPrevious();break}};var s=N();y("keydown",f,u);var l=g(s);{var v=t=>{var a=x();a.__click=function(...i){var e;(e=o.onPrevious)==null||e.apply(this,i)},r(t,a)};c(l,t=>{o.hasPrevious&&t(v)})}var p=b(l,2);{var d=t=>{var a=_();a.__click=function(...i){var e;(e=o.onNext)==null||e.apply(this,i)},r(t,a)};c(p,t=>{o.hasNext&&t(d)})}r(h,s),k()}m(["click"]);export{C as S};
@@ -0,0 +1 @@
1
+ import"./CWj6FrbW.js";import{f as m}from"./C3xJX0nD.js";import{c as i,a as p}from"./CAPx0Bfm.js";import{s as n}from"./DoEId1MK.js";function d(o,a){var r=i(),t=m(r);n(t,()=>a.children),p(o,r)}export{d as L};
@@ -0,0 +1 @@
1
+ import{m as f,w as s,o as h,q as r}from"./C3xJX0nD.js";import{a as p}from"./CEPpkZIV.js";import{u as y}from"./Bip0vTKl.js";const o=s(new Set);function v(u){const{dataset_id:n,kind:i}=u,{tags:l}=y(),g=s(!1),c=s(null),e=s(!1),d=()=>{f(e)||(e.set(!0),p({path:{dataset_id:n}}).then(t=>{if(t.error)throw new Error(JSON.stringify(t.error));t.data&&l.set(t.data)}).catch(t=>{c.set(t)}).finally(()=>{e.set(!1)}))};!f(g)&&n&&(d(),g.set(!0));const S=h(l,t=>{const a=t??[];return i?a.filter(T=>i.includes(T.kind)):a}),m=t=>{o.update(a=>(a.has(t)?a.delete(t):a.add(t),new Set([...a])))},w=()=>{o.set(new Set)};return{tags:r(S),loadTags:d,tagsSelected:r(o),tagSelectionToggle:m,clearTagsSelected:w,isLoading:r(e),error:c}}export{v as u};