lightly-studio 0.3.1__py3-none-any.whl → 0.3.2__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 (133) hide show
  1. lightly_studio/__init__.py +4 -4
  2. lightly_studio/api/app.py +1 -1
  3. lightly_studio/api/routes/api/annotation.py +6 -16
  4. lightly_studio/api/routes/api/annotation_label.py +2 -5
  5. lightly_studio/api/routes/api/annotation_task.py +4 -5
  6. lightly_studio/api/routes/api/classifier.py +2 -5
  7. lightly_studio/api/routes/api/dataset.py +2 -3
  8. lightly_studio/api/routes/api/dataset_tag.py +2 -3
  9. lightly_studio/api/routes/api/metadata.py +2 -4
  10. lightly_studio/api/routes/api/metrics.py +2 -6
  11. lightly_studio/api/routes/api/sample.py +5 -13
  12. lightly_studio/api/routes/api/settings.py +2 -6
  13. lightly_studio/api/routes/images.py +6 -6
  14. lightly_studio/core/add_samples.py +383 -0
  15. lightly_studio/core/dataset.py +250 -362
  16. lightly_studio/core/dataset_query/__init__.py +0 -0
  17. lightly_studio/core/dataset_query/boolean_expression.py +67 -0
  18. lightly_studio/core/dataset_query/dataset_query.py +211 -0
  19. lightly_studio/core/dataset_query/field.py +113 -0
  20. lightly_studio/core/dataset_query/field_expression.py +79 -0
  21. lightly_studio/core/dataset_query/match_expression.py +23 -0
  22. lightly_studio/core/dataset_query/order_by.py +79 -0
  23. lightly_studio/core/dataset_query/sample_field.py +28 -0
  24. lightly_studio/core/dataset_query/tags_expression.py +46 -0
  25. lightly_studio/core/sample.py +159 -32
  26. lightly_studio/core/start_gui.py +35 -0
  27. lightly_studio/dataset/edge_embedding_generator.py +13 -8
  28. lightly_studio/dataset/embedding_generator.py +2 -3
  29. lightly_studio/dataset/embedding_manager.py +74 -6
  30. lightly_studio/dataset/fsspec_lister.py +275 -0
  31. lightly_studio/dataset/loader.py +49 -30
  32. lightly_studio/dataset/mobileclip_embedding_generator.py +6 -4
  33. lightly_studio/db_manager.py +145 -0
  34. lightly_studio/dist_lightly_studio_view_app/_app/immutable/assets/SelectableSvgGroup.BBm0IWdq.css +1 -0
  35. lightly_studio/dist_lightly_studio_view_app/_app/immutable/assets/SelectableSvgGroup.BNTuXSAe.css +1 -0
  36. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/2O287xak.js +3 -0
  37. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/{O-EABkf9.js → 7YNGEs1C.js} +1 -1
  38. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/BBoGk9hq.js +1 -0
  39. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/BRnH9v23.js +92 -0
  40. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/Bg1Y5eUZ.js +1 -0
  41. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/{DOlTMNyt.js → BqBqV92V.js} +1 -1
  42. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/C0JiMuYn.js +1 -0
  43. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/{DjfY96ND.js → C98Hk3r5.js} +1 -1
  44. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/{r64xT6ao.js → CG0dMCJi.js} +1 -1
  45. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/{C8I8rFJQ.js → Ccq4ZD0B.js} +1 -1
  46. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/Cpy-nab_.js +1 -0
  47. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/{Bu7uvVrG.js → Crk-jcvV.js} +1 -1
  48. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/Cs31G8Qn.js +1 -0
  49. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/CsKrY2zA.js +1 -0
  50. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/{x9G_hzyY.js → Cur71c3O.js} +1 -1
  51. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/CzgC3GFB.js +1 -0
  52. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/D8GZDMNN.js +1 -0
  53. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/DFRh-Spp.js +1 -0
  54. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/{BylOuP6i.js → DRZO-E-T.js} +1 -1
  55. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/{l7KrR96u.js → DcGCxgpH.js} +1 -1
  56. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/{Bsi3UGy5.js → Df3aMO5B.js} +1 -1
  57. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/{hQVEETDE.js → DkR_EZ_B.js} +1 -1
  58. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/DqUGznj_.js +1 -0
  59. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/KpAtIldw.js +1 -0
  60. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/M1Q1F7bw.js +4 -0
  61. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/{CDnpyLsT.js → OH7-C_mc.js} +1 -1
  62. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/{D6su9Aln.js → gLNdjSzu.js} +1 -1
  63. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/i0ZZ4z06.js +1 -0
  64. lightly_studio/dist_lightly_studio_view_app/_app/immutable/entry/app.BI-EA5gL.js +2 -0
  65. lightly_studio/dist_lightly_studio_view_app/_app/immutable/entry/start.CcsRl3cZ.js +1 -0
  66. lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/0.BbO4Zc3r.js +1 -0
  67. lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/{1.B4rNYwVp.js → 1._I9GR805.js} +1 -1
  68. lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/10.J2RBFrSr.js +1 -0
  69. lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/12.Cmqj25a-.js +1 -0
  70. lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/2.C45iKJHA.js +6 -0
  71. lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/{3.CWHpKonm.js → 3.w9g4AcAx.js} +1 -1
  72. lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/{4.OUWOLQeV.js → 4.BBI8KwnD.js} +1 -1
  73. lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/5.huHuxdiF.js +1 -0
  74. lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/6.CrbkRPam.js +1 -0
  75. lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/7.FomEdhD6.js +1 -0
  76. lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/8.Cb_ADSLk.js +1 -0
  77. lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/{9.CPu3CiBc.js → 9.CajIG5ce.js} +1 -1
  78. lightly_studio/dist_lightly_studio_view_app/_app/version.json +1 -1
  79. lightly_studio/dist_lightly_studio_view_app/index.html +14 -14
  80. lightly_studio/examples/example.py +13 -12
  81. lightly_studio/examples/example_coco.py +13 -0
  82. lightly_studio/examples/example_metadata.py +83 -98
  83. lightly_studio/examples/example_selection.py +7 -19
  84. lightly_studio/examples/example_split_work.py +12 -36
  85. lightly_studio/examples/{example_v2.py → example_yolo.py} +3 -4
  86. lightly_studio/models/annotation/annotation_base.py +7 -8
  87. lightly_studio/models/annotation/instance_segmentation.py +8 -8
  88. lightly_studio/models/annotation/object_detection.py +4 -4
  89. lightly_studio/models/dataset.py +6 -2
  90. lightly_studio/models/sample.py +10 -3
  91. lightly_studio/resolvers/dataset_resolver.py +10 -0
  92. lightly_studio/resolvers/embedding_model_resolver.py +22 -0
  93. lightly_studio/resolvers/sample_resolver.py +53 -9
  94. lightly_studio/resolvers/tag_resolver.py +23 -0
  95. lightly_studio/selection/select.py +55 -46
  96. lightly_studio/selection/select_via_db.py +23 -19
  97. lightly_studio/selection/selection_config.py +6 -3
  98. lightly_studio/services/annotations_service/__init__.py +4 -0
  99. lightly_studio/services/annotations_service/update_annotation.py +21 -32
  100. lightly_studio/services/annotations_service/update_annotation_bounding_box.py +36 -0
  101. lightly_studio-0.3.2.dist-info/METADATA +689 -0
  102. {lightly_studio-0.3.1.dist-info → lightly_studio-0.3.2.dist-info}/RECORD +104 -91
  103. lightly_studio/api/db.py +0 -133
  104. lightly_studio/dist_lightly_studio_view_app/_app/immutable/assets/SelectableSvgGroup.OwPEPQZu.css +0 -1
  105. lightly_studio/dist_lightly_studio_view_app/_app/immutable/assets/SelectableSvgGroup.b653GmVf.css +0 -1
  106. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/B2FVR0s0.js +0 -1
  107. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/B9zumHo5.js +0 -1
  108. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/BJXwVxaE.js +0 -1
  109. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/Bx1xMsFy.js +0 -1
  110. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/CcaPhhk3.js +0 -1
  111. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/CvOmgdoc.js +0 -93
  112. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/CxtLVaYz.js +0 -3
  113. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/D5-A_Ffd.js +0 -4
  114. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/D6RI2Zrd.js +0 -1
  115. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/D98V7j6A.js +0 -1
  116. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/DIRAtgl0.js +0 -1
  117. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/DjUWrjOv.js +0 -1
  118. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/XO7A28GO.js +0 -1
  119. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/nAHhluT7.js +0 -1
  120. lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/vC4nQVEB.js +0 -1
  121. lightly_studio/dist_lightly_studio_view_app/_app/immutable/entry/app.CjnvpsmS.js +0 -2
  122. lightly_studio/dist_lightly_studio_view_app/_app/immutable/entry/start.0o1H7wM9.js +0 -1
  123. lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/0.XRq_TUwu.js +0 -1
  124. lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/10.DfBwOEhN.js +0 -1
  125. lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/12.CwF2_8mP.js +0 -1
  126. lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/2.CS4muRY-.js +0 -6
  127. lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/5.Dm6t9F5W.js +0 -1
  128. lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/6.Bw5ck4gK.js +0 -1
  129. lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/7.CF0EDTR6.js +0 -1
  130. lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/8.Cw30LEcV.js +0 -1
  131. lightly_studio-0.3.1.dist-info/METADATA +0 -520
  132. /lightly_studio/dist_lightly_studio_view_app/_app/immutable/assets/{OpenSans- → OpenSans-Medium.DVUZMR_6.ttf} +0 -0
  133. {lightly_studio-0.3.1.dist-info → lightly_studio-0.3.2.dist-info}/WHEEL +0 -0
@@ -1,93 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./DjUWrjOv.js","./CWj6FrbW.js","./l7KrR96u.js","./DIeogL5L.js","./Bu7uvVrG.js","./DIRAtgl0.js","./BJXwVxaE.js","./vC4nQVEB.js","./D98V7j6A.js","./XO7A28GO.js"])))=>i.map(i=>d[i]);
2
- var PE=Object.defineProperty;var EE=Object.getPrototypeOf;var TE=Reflect.get;var wb=e=>{throw TypeError(e)};var kE=(e,t,n)=>t in e?PE(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var Y=(e,t,n)=>kE(e,typeof t!="symbol"?t+"":t,n),Hh=(e,t,n)=>t.has(e)||wb("Cannot "+n);var A=(e,t,n)=>(Hh(e,t,"read from private field"),n?n.call(e):t.get(e)),F=(e,t,n)=>t.has(e)?wb("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),ce=(e,t,n,i)=>(Hh(e,t,"write to private field"),i?i.call(e,n):t.set(e,n),n),Et=(e,t,n)=>(Hh(e,t,"access private method"),n);var yb=(e,t,n)=>TE(EE(e),n,t);import"./CWj6FrbW.js";import"./69_IOA4Y.js";import{a9 as $_,ah as t0,ab as IE,x as me,A as jo,aH as ep,o as vf,aI as OE,U as gg,aJ as Bs,ad as $n,J as pg,a5 as np,a7 as Lc,a6 as Dc,aK as xb,b as NE,G as mf,q as ll,I as No,av as RE,y as gr,aL as ME,aM as LE,g as v,am as nn,B as DE,C as Sb,D as Vs,F as $i,_ as FE,a3 as e0,aN as Uh,R as Hs,aO as rp,aP as BE,a2 as VE,aQ as WE,v as n0,aR as ip,aS as zE,P as r0,O as i0,X as HE,aT as o0,aU as UE,E as s0,aV as GE,aW as KE,aX as qE,aY as YE,aZ as XE,a_ as ZE,a$ as JE,ai as a0,i as On,b0 as QE,au as jE,n as Ct,a8 as $E,aj as op,L as et,b1 as tT,aw as qi,aB as l0,az as vg,c as rt,r as nt,s as mt,t as St,z as Ei,l as Te,w as Ce,p as ht,V as bt,u as xe,d as N,f as W,a as gt,aA as Ab,ax as we,e as bf,aF as eT,b2 as nT,b3 as c0,m as ac,$ as rT,ay as ui,aD as Co,k as Cb,aE as iT}from"./l7KrR96u.js";import{i as oT,b as Pb,c as sT,n as aT,d as lT,e as cT,s as De,m as uT,u as dT}from"./D6RI2Zrd.js";import{i as _t,s as rs,a as Ke,b as Eb,m as Tb}from"./XO7A28GO.js";import{b as fT,t as tt,a as P,c as X,n as cl,d as ye}from"./Bu7uvVrG.js";import{c as hT,d as so,f as gT,g as pT,w as vT,l as u0,o as Ne,e as mg}from"./DjfY96ND.js";import{i as _f}from"./O-EABkf9.js";import{p as no}from"./Bsi3UGy5.js";import{s as at,u as mT}from"./DIRAtgl0.js";import{p as k,a as ft,b as Kn,r as At,s as Rt,c as Ot,_ as kb}from"./D98V7j6A.js";import{c as In,P as bT}from"./BJXwVxaE.js";import{u as Us}from"./vC4nQVEB.js";import{q as _T,R as wT,t as yT,n as sp,v as xT,w as ST,x as AT,y as CT,S as PT,z as ET,k as Ib,A as TT,u as ap,B as kT,C as IT,D as OT,E as NT,c as d0,F as f0,G as RT,H as MT,a as LT}from"./Bx1xMsFy.js";import{o as wf,g as Sc,d as DT,c as FT}from"./CxtLVaYz.js";import"./D6su9Aln.js";import{r as Ac}from"./H7C68rOM.js";const BT=[];function h0(e,t=!1){return Cc(e,new Map,"",BT)}function Cc(e,t,n,i,s=null){if(typeof e=="object"&&e!==null){var a=t.get(e);if(a!==void 0)return a;if(e instanceof Map)return new Map(e);if(e instanceof Set)return new Set(e);if($_(e)){var l=Array(e.length);t.set(e,l),s!==null&&t.set(s,l);for(var u=0;u<e.length;u+=1){var d=e[u];u in e&&(l[u]=Cc(d,t,n,i))}return l}if(t0(e)===IE){l={},t.set(e,l),s!==null&&t.set(s,l);for(var f in e)l[f]=Cc(e[f],t,n,i);return l}if(e instanceof Date)return structuredClone(e);if(typeof e.toJSON=="function")return Cc(e.toJSON(),t,n,i,e)}if(e instanceof EventTarget)return e;try{return structuredClone(e)}catch{return e}}const Gh=0,lc=1,Kh=2;function Ob(e,t,n,i,s){me&&jo();var a=e,l=ep(),u=NE,d=gg,f,h,g,m=(l?$n:pg)(void 0),b=(l?$n:pg)(void 0),_=!1;function w(S,I){_=!0,I&&(Lc(x),Dc(x),xb(u));try{S===lc&&i&&(h?mf(h):h=ll(()=>i(a,m))),S!==Gh&&f&&No(f,()=>f=null),S!==lc&&h&&No(h,()=>h=null),S!==Kh&&g&&No(g,()=>g=null)}finally{I&&(xb(null),Dc(null),Lc(null),RE())}}var x=vf(()=>{if(d!==(d=t())){if(OE(d)){var S=d;_=!1,S.then(I=>{S===d&&(Bs(m,I),w(lc,!0))},I=>{if(S===d)throw Bs(b,I),w(Kh,!0),b.v}),me||np(()=>{_||w(Gh,!0)})}else Bs(m,d),w(lc,!1);return()=>d=gg}});me&&(a=gr)}function Gs(e,t,n){me&&jo();var i=e,s=gg,a,l=ep()?ME:LE;vf(()=>{l(s,s=t())&&(a&&No(a),a=ll(()=>n(i)))}),me&&(i=gr)}function yf(e,t){return t}function VT(e,t,n,i){for(var s=[],a=t.length,l=0;l<a;l++)BE(t[l].e,s,!0);var u=a>0&&s.length===0&&n!==null;if(u){var d=n.parentNode;VE(d),d.append(n),i.clear(),bi(e,t[0].prev,t[a-1].next)}WE(s,()=>{for(var f=0;f<a;f++){var h=t[f];u||(i.delete(h.k),bi(e,h.prev,h.next)),n0(h.e,!u)}})}function Ti(e,t,n,i,s,a=null){var l=e,u={flags:t,items:new Map,first:null},d=(t&o0)!==0;if(d){var f=e;l=me?Vs(r0(f)):f.appendChild(i0())}me&&jo();var h=null,g=!1,m=nn(()=>{var b=n();return $_(b)?b:b==null?[]:e0(b)});vf(()=>{var b=v(m),_=b.length;if(g&&_===0)return;g=_===0;let w=!1;if(me){var x=l.data===DE;x!==(_===0)&&(l=Sb(),Vs(l),$i(!1),w=!0)}if(me){for(var S=null,I,T=0;T<_;T++){if(gr.nodeType===8&&gr.data===FE){l=gr,w=!0,$i(!1);break}var O=b[T],D=i(O,T);I=g0(gr,u,S,null,O,D,T,s,t,n),u.items.set(D,I),S=I}_>0&&Vs(Sb())}me||WT(b,u,l,s,t,i,n),a!==null&&(_===0?h?mf(h):h=ll(()=>a(l)):h!==null&&No(h,()=>{h=null})),w&&$i(!0),v(m)}),me&&(l=gr)}function WT(e,t,n,i,s,a,l){var H,J,Q,ot;var u=(s&UE)!==0,d=(s&(ip|rp))!==0,f=e.length,h=t.items,g=t.first,m=g,b,_=null,w,x=[],S=[],I,T,O,D;if(u)for(D=0;D<f;D+=1)I=e[D],T=a(I,D),O=h.get(T),O!==void 0&&((H=O.a)==null||H.measure(),(w??(w=new Set)).add(O));for(D=0;D<f;D+=1){if(I=e[D],T=a(I,D),O=h.get(T),O===void 0){var L=m?m.e.nodes_start:n;_=g0(L,t,_,_===null?t.first:_.next,I,T,D,i,s,l),h.set(T,_),x=[],S=[],m=_.next;continue}if(d&&zT(O,I,D,s),O.e.f&Uh&&(mf(O.e),u&&((J=O.a)==null||J.unfix(),(w??(w=new Set)).delete(O))),O!==m){if(b!==void 0&&b.has(O)){if(x.length<S.length){var M=S[0],G;_=M.prev;var q=x[0],lt=x[x.length-1];for(G=0;G<x.length;G+=1)Nb(x[G],M,n);for(G=0;G<S.length;G+=1)b.delete(S[G]);bi(t,q.prev,lt.next),bi(t,_,q),bi(t,lt,M),m=M,_=lt,D-=1,x=[],S=[]}else b.delete(O),Nb(O,m,n),bi(t,O.prev,O.next),bi(t,O,_===null?t.first:_.next),bi(t,_,O),_=O;continue}for(x=[],S=[];m!==null&&m.k!==T;)m.e.f&Uh||(b??(b=new Set)).add(m),S.push(m),m=m.next;if(m===null)continue;O=m}x.push(O),_=O,m=O.next}if(m!==null||b!==void 0){for(var pt=b===void 0?[]:e0(b);m!==null;)m.e.f&Uh||pt.push(m),m=m.next;var z=pt.length;if(z>0){var $=s&o0&&f===0?n:null;if(u){for(D=0;D<z;D+=1)(Q=pt[D].a)==null||Q.measure();for(D=0;D<z;D+=1)(ot=pt[D].a)==null||ot.fix()}VT(t,pt,$,h)}}u&&np(()=>{var Z;if(w!==void 0)for(O of w)(Z=O.a)==null||Z.apply()}),Hs.first=t.first&&t.first.e,Hs.last=_&&_.e}function zT(e,t,n,i){i&ip&&Bs(e.v,t),i&rp?Bs(e.i,n):e.i=n}function g0(e,t,n,i,s,a,l,u,d,f){var h=(d&ip)!==0,g=(d&zE)===0,m=h?g?pg(s):$n(s):s,b=d&rp?$n(l):l,_={i:b,v:m,k:a,a:null,e:null,prev:n,next:i};try{return _.e=ll(()=>u(e,m,b,f),me),_.e.prev=n&&n.e,_.e.next=i&&i.e,n===null?t.first=_:(n.next=_,n.e.next=_.e),i!==null&&(i.prev=_,i.e.prev=_.e),_}finally{}}function Nb(e,t,n){for(var i=e.next?e.next.e.nodes_start:n,s=t?t.e.nodes_start:n,a=e.e.nodes_start;a!==i;){var l=HE(a);s.before(a),a=l}}function bi(e,t,n){t===null?e.first=n:(t.next=n,t.e.next=n&&n.e),n!==null&&(n.prev=t,n.e.prev=t&&t.e)}function cc(e,t,n,i,s){var u;me&&jo();var a=(u=t.$$slots)==null?void 0:u[n],l=!1;a===!0&&(a=t[n==="default"?"children":n],l=!0),a===void 0?s!==null&&s(e):a(e,l?()=>i:i)}function HT(e,t,n,i,s,a){let l=me;me&&jo();var u,d,f=null;me&&gr.nodeType===1&&(f=gr,jo());var h=me?gr:e,g;vf(()=>{const m=t()||null;var b=GE;m!==u&&(g&&(m===null?No(g,()=>{g=null,d=null}):m===d?mf(g):(n0(g),Pb(!1))),m&&m!==d&&(g=ll(()=>{if(f=me?f:document.createElementNS(b,m),fT(f,f),i){me&&oT(m)&&f.append(document.createComment(""));var _=me?r0(f):f.appendChild(i0());me&&(_===null?$i(!1):Vs(_)),i(f,_)}Hs.nodes_end=f,h.before(f)})),u=m,u&&(d=u),Pb(!0))},s0),l&&($i(!0),Vs(h))}function p0(e){var t,n,i="";if(typeof e=="string"||typeof e=="number")i+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;t<s;t++)e[t]&&(n=p0(e[t]))&&(i&&(i+=" "),i+=n)}else for(n in e)e[n]&&(i&&(i+=" "),i+=n);return i}function Ws(){for(var e,t,n=0,i="",s=arguments.length;n<s;n++)(e=arguments[n])&&(t=p0(e))&&(i&&(i+=" "),i+=t);return i}function ki(e){return typeof e=="object"?Ws(e):e??""}const Rb=[...`
3
- \r\f \v\uFEFF`];function UT(e,t,n){var i=e==null?"":""+e;if(t&&(i=i?i+" "+t:t),n){for(var s in n)if(n[s])i=i?i+" "+s:s;else if(i.length)for(var a=s.length,l=0;(l=i.indexOf(s,l))>=0;){var u=l+a;(l===0||Rb.includes(i[l-1]))&&(u===i.length||Rb.includes(i[u]))?i=(l===0?"":i.substring(0,l))+i.substring(u+1):l=u}}return i===""?null:i}function Mb(e,t=!1){var n=t?" !important;":";",i="";for(var s in e){var a=e[s];a!=null&&a!==""&&(i+=" "+s+": "+a+n)}return i}function qh(e){return e[0]!=="-"||e[1]!=="-"?e.toLowerCase():e}function GT(e,t){if(t){var n="",i,s;if(Array.isArray(t)?(i=t[0],s=t[1]):i=t,e){e=String(e).replaceAll(/\s*\/\*.*?\*\/\s*/g,"").trim();var a=!1,l=0,u=!1,d=[];i&&d.push(...Object.keys(i).map(qh)),s&&d.push(...Object.keys(s).map(qh));var f=0,h=-1;const w=e.length;for(var g=0;g<w;g++){var m=e[g];if(u?m==="/"&&e[g-1]==="*"&&(u=!1):a?a===m&&(a=!1):m==="/"&&e[g+1]==="*"?u=!0:m==='"'||m==="'"?a=m:m==="("?l++:m===")"&&l--,!u&&a===!1&&l===0){if(m===":"&&h===-1)h=g;else if(m===";"||g===w-1){if(h!==-1){var b=qh(e.substring(f,h).trim());if(!d.includes(b)){m!==";"&&g++;var _=e.substring(f,g).trim();n+=" "+_+";"}}f=g+1,h=-1}}}}return i&&(n+=Mb(i)),s&&(n+=Mb(s,!0)),n=n.trim(),n===""?null:n}return e==null?null:String(e)}function qn(e,t,n,i,s,a){var l=e.__className;if(me||l!==n){var u=UT(n,i,a);(!me||u!==e.getAttribute("class"))&&(u==null?e.removeAttribute("class"):t?e.className=u:e.setAttribute("class",u)),e.__className=n}else if(a&&s!==a)for(var d in a){var f=!!a[d];(s==null||f!==!!s[d])&&e.classList.toggle(d,f)}return a}function Yh(e,t={},n,i){for(var s in n){var a=n[s];t[s]!==a&&(n[s]==null?e.style.removeProperty(s):e.style.setProperty(s,a,i))}}function _n(e,t,n,i){var s=e.__style;if(me||s!==t){var a=GT(t,i);(!me||a!==e.getAttribute("style"))&&(a==null?e.removeAttribute("style"):e.style.cssText=a),e.__style=t}else i&&(Array.isArray(i)?(Yh(e,n==null?void 0:n[0],i[0]),Yh(e,n==null?void 0:n[1],i[1],"important")):Yh(e,n,i));return i}const As=Symbol("class"),Eo=Symbol("style"),v0=Symbol("is custom element"),m0=Symbol("is html");function Fc(e){if(me){var t=!1,n=()=>{if(!t){if(t=!0,e.hasAttribute("value")){var i=e.value;He(e,"value",null),e.value=i}if(e.hasAttribute("checked")){var s=e.checked;He(e,"checked",null),e.checked=s}}};e.__on_r=n,YE(n),pT()}}function KT(e,t){var n=lp(e);n.value===(n.value=t??void 0)||e.value===t&&(t!==0||e.nodeName!=="PROGRESS")||(e.value=t??"")}function qT(e,t){t?e.hasAttribute("selected")||e.setAttribute("selected",""):e.removeAttribute("selected")}function He(e,t,n,i){var s=lp(e);me&&(s[t]=e.getAttribute(t),t==="src"||t==="srcset"||t==="href"&&e.nodeName==="LINK")||s[t]!==(s[t]=n)&&(t==="loading"&&(e[KE]=n),n==null?e.removeAttribute(t):typeof n!="string"&&b0(e).includes(t)?e[t]=n:e.setAttribute(t,n))}function Lt(e,t,n,i,s=!1){var a=lp(e),l=a[v0],u=!a[m0];let d=me&&l;d&&$i(!1);var f=t||{},h=e.tagName==="OPTION";for(var g in t)g in n||(n[g]=null);n.class?n.class=ki(n.class):(i||n[As])&&(n.class=null),n[Eo]&&(n.style??(n.style=null));var m=b0(e);for(const T in n){let O=n[T];if(h&&T==="value"&&O==null){e.value=e.__value="",f[T]=O;continue}if(T==="class"){var b=e.namespaceURI==="http://www.w3.org/1999/xhtml";qn(e,b,O,i,t==null?void 0:t[As],n[As]),f[T]=O,f[As]=n[As];continue}if(T==="style"){_n(e,O,t==null?void 0:t[Eo],n[Eo]),f[T]=O,f[Eo]=n[Eo];continue}var _=f[T];if(O!==_){f[T]=O;var w=T[0]+T[1];if(w!=="$$")if(w==="on"){const D={},L="$$"+T;let M=T.slice(2);var x=lT(M);if(sT(M)&&(M=M.slice(0,-7),D.capture=!0),!x&&_){if(O!=null)continue;e.removeEventListener(M,f[L],D),f[L]=null}if(O!=null)if(x)e[`__${M}`]=O,so([M]);else{let G=function(q){f[T].call(this,q)};f[L]=hT(M,e,G,D)}else x&&(e[`__${M}`]=void 0)}else if(T==="style")He(e,T,O);else if(T==="autofocus")gT(e,!!O);else if(!l&&(T==="__value"||T==="value"&&O!=null))e.value=e.__value=O;else if(T==="selected"&&h)qT(e,O);else{var S=T;u||(S=aT(S));var I=S==="defaultValue"||S==="defaultChecked";if(O==null&&!l&&!I)if(a[T]=null,S==="value"||S==="checked"){let D=e;const L=t===void 0;if(S==="value"){let M=D.defaultValue;D.removeAttribute(S),D.defaultValue=M,D.value=D.__value=L?M:null}else{let M=D.defaultChecked;D.removeAttribute(S),D.defaultChecked=M,D.checked=L?M:!1}}else e.removeAttribute(T);else I||m.includes(S)&&(l||typeof O!="string")?e[S]=O:typeof O!="function"&&He(e,S,O)}}}return d&&$i(!0),f}function lp(e){return e.__attributes??(e.__attributes={[v0]:e.nodeName.includes("-"),[m0]:e.namespaceURI===qE})}var Lb=new Map;function b0(e){var t=Lb.get(e.nodeName);if(t)return t;Lb.set(e.nodeName,t=[]);for(var n,i=e,s=Element.prototype;s!==i;){n=XE(i);for(var a in n)n[a].set&&t.push(a);i=t0(i)}return t}const YT=()=>performance.now(),Hr={tick:e=>requestAnimationFrame(e),now:()=>YT(),tasks:new Set};function _0(){const e=Hr.now();Hr.tasks.forEach(t=>{t.c(e)||(Hr.tasks.delete(t),t.f())}),Hr.tasks.size!==0&&Hr.tick(_0)}function XT(e){let t;return Hr.tasks.size===0&&Hr.tick(_0),{promise:new Promise(n=>{Hr.tasks.add(t={c:e,f:n})}),abort(){Hr.tasks.delete(t)}}}function uc(e,t){vT(()=>{e.dispatchEvent(new CustomEvent(t))})}function ZT(e){if(e==="float")return"cssFloat";if(e==="offset")return"cssOffset";if(e.startsWith("--"))return e;const t=e.split("-");return t.length===1?t[0]:t[0]+t.slice(1).map(n=>n[0].toUpperCase()+n.slice(1)).join("")}function Db(e){const t={},n=e.split(";");for(const i of n){const[s,a]=i.split(":");if(!s||a===void 0)break;const l=ZT(s.trim());t[l]=a.trim()}return t}const JT=e=>e;function w0(e,t,n,i){var s=(e&QE)!==0,a="both",l,u=t.inert,d=t.style.overflow,f,h;function g(){var x=$E,S=Hs;Dc(null),Lc(null);try{return l??(l=n()(t,(i==null?void 0:i())??{},{direction:a}))}finally{Dc(x),Lc(S)}}var m={is_global:s,in(){t.inert=u,uc(t,"introstart"),f=bg(t,g(),h,1,()=>{uc(t,"introend"),f==null||f.abort(),f=l=void 0,t.style.overflow=d})},out(x){t.inert=!0,uc(t,"outrostart"),h=bg(t,g(),f,0,()=>{uc(t,"outroend"),x==null||x()})},stop:()=>{f==null||f.abort(),h==null||h.abort()}},b=Hs;if((b.transitions??(b.transitions=[])).push(m),cT){var _=s;if(!_){for(var w=b.parent;w&&w.f&s0;)for(;(w=w.parent)&&!(w.f&ZE););_=!w||(w.f&JE)!==0}_&&a0(()=>{On(()=>m.in())})}}function bg(e,t,n,i,s){var a=i===1;if(jE(t)){var l,u=!1;return np(()=>{if(!u){var x=t({direction:a?"in":"out"});l=bg(e,x,n,i,s)}}),{abort:()=>{u=!0,l==null||l.abort()},deactivate:()=>l.deactivate(),reset:()=>l.reset(),t:()=>l.t()}}if(n==null||n.deactivate(),!(t!=null&&t.duration))return s(),{abort:Ct,deactivate:Ct,reset:Ct,t:()=>i};const{delay:d=0,css:f,tick:h,easing:g=JT}=t;var m=[];if(a&&n===void 0&&(h&&h(0,1),f)){var b=Db(f(0,1));m.push(b,b)}var _=()=>1-i,w=e.animate(m,{duration:d});return w.onfinish=()=>{var x=(n==null?void 0:n.t())??1-i;n==null||n.abort();var S=i-x,I=t.duration*Math.abs(S),T=[];if(I>0){var O=!1;if(f)for(var D=Math.ceil(I/16.666666666666668),L=0;L<=D;L+=1){var M=x+S*g(L/D),G=Db(f(M,1-M));T.push(G),O||(O=G.overflow==="hidden")}O&&(e.style.overflow="hidden"),_=()=>{var q=w.currentTime;return x+S*g(q/I)},h&&XT(()=>{if(w.playState!=="running")return!1;var q=_();return h(q,1-q),!0})}w=e.animate(T,{duration:I,fill:"forwards"}),w.onfinish=()=>{_=()=>i,h==null||h(i,1-i),s()}},{abort:()=>{w&&(w.cancel(),w.effect=null,w.onfinish=Ct)},deactivate:()=>{s=Ct},reset:()=>{i===0&&(h==null||h(1,0))},t:()=>_()}}function y0(e,t,n=t){var i=ep();u0(e,"input",s=>{var a=s?e.defaultValue:e.value;if(a=Xh(e)?Zh(a):a,n(a),i&&a!==(a=t())){var l=e.selectionStart,u=e.selectionEnd;e.value=a??"",u!==null&&(e.selectionStart=l,e.selectionEnd=Math.min(u,e.value.length))}}),(me&&e.defaultValue!==e.value||On(t)==null&&e.value)&&n(Xh(e)?Zh(e.value):e.value),op(()=>{var s=t();Xh(e)&&s===Zh(e.value)||e.type==="date"&&!s&&!e.value||s!==e.value&&(e.value=s??"")})}function Xh(e){var t=e.type;return t==="number"||t==="range"}function Zh(e){return e===""?null:+e}function P6(e,t,n=t){u0(e,"change",()=>{n(e.files)}),me&&e.files&&n(e.files),op(()=>{e.files=t()})}var wi,Bo,$s,tu,x0;const eu=class eu{constructor(t){F(this,tu);F(this,wi,new WeakMap);F(this,Bo);F(this,$s);ce(this,$s,t)}observe(t,n){var i=A(this,wi).get(t)||new Set;return i.add(n),A(this,wi).set(t,i),Et(this,tu,x0).call(this).observe(t,A(this,$s)),()=>{var s=A(this,wi).get(t);s.delete(n),s.size===0&&(A(this,wi).delete(t),A(this,Bo).unobserve(t))}}};wi=new WeakMap,Bo=new WeakMap,$s=new WeakMap,tu=new WeakSet,x0=function(){return A(this,Bo)??ce(this,Bo,new ResizeObserver(t=>{for(var n of t){eu.entries.set(n.target,n);for(var i of A(this,wi).get(n.target)||[])i(n)}}))},Y(eu,"entries",new WeakMap);let _g=eu;var QT=new _g({box:"border-box"});function Jh(e,t,n){var i=QT.observe(e,()=>n(e[t]));a0(()=>(On(()=>n(e[t])),i))}function To(e){et(e,e.v+1)}function jT(e){let t=0,n=$n(0),i;return()=>{tT()&&(v(n),op(()=>(t===0&&(i=On(()=>e(()=>To(n)))),t+=1,()=>{qi().then(()=>{t-=1,t===0&&(i==null||i(),i=void 0)})})))}}const $T="data-no-translate",E6="paraglide:lang",T6="paraglide_lang",S0={},tk=()=>vg(S0),k6=e=>{l0(S0,e)};function Qr(){const e=tk();function t(i,s){return typeof i!="string"||!e?i:e.translateHref(i,s)}function n(i,s){if(i[$T])return i;for(const{attribute_name:a,lang_attribute_name:l}of s)if(a in i){const u=i[a],d=l?i[l]:void 0;i[a]=t(u,typeof d=="string"?d:void 0)}return i}return[t,n]}var ek=tt('<div class="relative rounded border border-red-400 bg-red-100 px-4 py-3 text-red-700" role="alert"><strong class="block font-bold"> </strong> <span class="block"><!></span></div>');function nk(e,t){var n=ek(),i=rt(n),s=rt(i,!0);nt(i);var a=mt(i,2),l=rt(a);at(l,()=>t.children),nt(a),nt(n),St(()=>De(s,t.title)),P(e,n)}const A0={setting_id:"00000000-0000-0000-0000-000000000000",grid_view_sample_rendering:"contain",key_hide_annotations:"v",key_go_back:"Escape",show_annotation_text_labels:!0,created_at:new Date().toISOString(),updated_at:new Date().toISOString()},br=Ce(A0),Pi=Ce(!1),to=Ce(null),zs=Ce(!1),Fb=Ei(br,e=>e.grid_view_sample_rendering||"contain"),Bb=Ei(br,e=>e.show_annotation_text_labels??!0),Vb=async()=>{if(br.set(A0),!(Te(zs)||Te(Pi))){Pi.set(!0),to.set(null);try{const{data:e}=await _T();e&&(br.set(e),zs.set(!0))}catch(e){to.set(String(e))}finally{Pi.set(!1)}}},C0=async e=>{Pi.set(!0),to.set(null);try{const t=Te(br),n={setting_id:t.setting_id||"",grid_view_sample_rendering:e.grid_view_sample_rendering||t.grid_view_sample_rendering||"contain",key_hide_annotations:e.key_hide_annotations||t.key_hide_annotations||"v",key_go_back:e.key_go_back||t.key_go_back||"Escape",show_annotation_text_labels:e.show_annotation_text_labels!==void 0?e.show_annotation_text_labels:t.show_annotation_text_labels??!0,created_at:t.created_at||new Date().toISOString(),updated_at:new Date().toISOString()},i=await In.POST("/api/settings",{body:n,headers:{"Content-Type":"application/json"}});if(i.error){const s=JSON.stringify(i.error);return console.error("Settings API error:",s),to.set(s),{success:!1,error:s}}return i.data?(br.set(i.data),{success:!0}):{success:!1,error:"No data returned from API"}}catch(t){const n=String(t);return console.error("Error saving settings:",n),to.set(n),{success:!1,error:n}}finally{Pi.set(!1)}},rk=async e=>C0({grid_view_sample_rendering:e}),ik=async e=>{const t=!!e,i={...Te(br),show_annotation_text_labels:t};try{const s=await In.POST("/api/settings",{body:i,headers:{"Content-Type":"application/json"}});return s.error?(console.error("API error saving setting:",s.error),{success:!1,error:JSON.stringify(s.error)}):s.data?(br.set(s.data),{success:!0}):{success:!1,error:"No data returned from API"}}catch(s){return console.error("Error saving annotation text label setting:",s),{success:!1,error:String(s)}}};function cp(){return!Te(zs)&&!Te(Pi)&&Vb(),{settingsStore:br,isLoadingStore:Pi,errorStore:to,isLoadedStore:zs,gridViewSampleRenderingStore:Fb,showAnnotationTextLabelsStore:Bb,initSettings:Vb,saveSettings:C0,updateGridViewSampleRendering:rk,updateShowAnnotationTextLabels:ik,get settings(){return Te(br)},get isLoading(){return Te(Pi)},get error(){return Te(to)},get isLoaded(){return Te(zs)},get getGridViewSampleRendering(){return Te(Fb)},get getShowAnnotationTextLabels(){return Te(Bb)}}}function ok(e=100){let t;return n=>{clearTimeout(t),t=setTimeout(n,e)}}function sk(e=200){let t,n;return(i,s)=>a=>{t&&(Math.abs(a-t)>i?(s.fast(),n!==void 0&&(clearTimeout(n),n=void 0),n=setTimeout(()=>{s.slow(),n=void 0},e)):n===void 0&&s.slow()),t=a}}const wg={ceil:(e,t)=>Math.ceil(e/t)*t,floor:(e,t)=>~~(e/t)*t},ak=(e,t,n,i,s,a)=>{const l=[],u=wg.floor(a/t*i,i),d=u>s?u-s:0,f=u>0&&d>=0?d:u,g=Math.min(e,wg.ceil((a+n)/t*i,i))+s,m=g<e?g:e;for(let b=f;b<m;b++)l.push(b);return l},Wb=(e,t)=>~~(e/t),lk=ok(),ck=sk();var uk=tt("<div><!></div>"),dk=tt("<div><!> <div></div> <!></div>");function fk(e,t){ht(t,!0);let n=k(t,"width",3,"100%"),i=k(t,"overScan",3,1),s=k(t,"marginLeft",3,0),a=k(t,"marginTop",3,0),l=k(t,"scrollPosition",15,0),u=k(t,"scrollBehavior",3,"auto"),d=k(t,"getKey",3,it=>it),f=At(t,["$$slots","$$events","$$legacy","itemCount","itemHeight","itemWidth","height","width","overScan","marginLeft","marginTop","scrollPosition","scrollBehavior","getKey","columnCount","onscroll","header","item","placeholder","footer"]),h=bt(void 0),g=bt(ft(l())),m=bt(0),b=bt(0),_=bt(0),w=bt(ft([])),x=!1,S=!1,I=bt(!1);function T(it,xt=u()){D(Wb(it,v(q))*t.itemHeight+a()+v(m),xt)}function O(it,xt=u()){D(it,xt)}const D=(it,xt=u())=>{v(h)&&(x=!0,v(h).scrollTo({top:it,behavior:xt}),x=!1)},L=it=>{v(h)&&!x&&!S&&(x=!0,v(h).scrollTo({top:it,behavior:u()}),x=!1)},M=it=>{const xt=Wb(it,v(q)),yt=it%v(q);return{rowIndex:xt,columnIndex:yt,style:`position: absolute; transform: translate3d(${yt*t.itemWidth+s()}px, ${xt*t.itemHeight+a()}px, 0px); height: ${t.itemHeight}px; width: ${t.itemWidth}px; will-change: transform;`}},G=it=>{S=!0,x||(et(g,ft(Math.max(0,it.currentTarget.scrollTop-v(m)))),l(it.currentTarget.scrollTop),v(z)(v(g))),lk(()=>{S=!1})};let q=N(()=>t.columnCount?t.columnCount:Math.max(~~((v(b)-s()-(v(b)-v(_)))/t.itemWidth),1)),lt=N(()=>wg.ceil(t.itemCount,v(q))*t.itemHeight/v(q)),pt=N(()=>v(q)*i());xe(()=>{(v(b)||v(q))&&et(w,ft(ak(t.itemCount,t.itemHeight,t.height,v(q),v(pt),v(g))))}),xe(()=>{v(h)&&L(l())});let z=N(()=>ck(t.height,{fast:()=>{et(I,!0)},slow:()=>{et(I,!1)}}));var $=dk(),H=it=>{var xt;G(it),(xt=t.onscroll)==null||xt.call(t,it)};let J;var Q=rt($);{var ot=it=>{var xt=uk(),yt=rt(xt);at(yt,()=>t.header),nt(xt),Jh(xt,"offsetHeight",Nt=>et(m,Nt)),P(it,xt)};_t(Q,it=>{t.header&&it(ot)})}var Z=mt(Q,2);let ct;Ti(Z,21,()=>v(w),it=>d()(it),(it,xt)=>{var yt=X();const Nt=N(()=>{const{rowIndex:Ut,columnIndex:Yt,style:re}=M(v(xt));return{rowIndex:Ut,columnIndex:Yt,style:re}});var kt=W(yt);{var Dt=Ut=>{var Yt=X(),re=W(Yt);at(re,()=>t.item,()=>({index:v(xt),rowIndex:v(Nt).rowIndex,columnIndex:v(Nt).columnIndex,style:v(Nt).style})),P(Ut,Yt)},ue=Ut=>{var Yt=X(),re=W(Yt);at(re,()=>t.placeholder,()=>({index:v(xt),rowIndex:v(Nt).rowIndex,columnIndex:v(Nt).columnIndex,style:v(Nt).style})),P(Ut,Yt)};_t(kt,Ut=>{!v(I)||!t.placeholder?Ut(Dt):Ut(ue,!1)})}P(it,yt)}),nt(Z);var wt=mt(Z,2);return at(wt,()=>t.footer??Ct),nt($),Kn($,it=>et(h,it),()=>v(h)),St(()=>{J=Lt($,J,{onscroll:H,...f,[Eo]:{position:"relative",overflow:"auto",height:`${t.height??""}px`,width:n()}}),ct=_n(Z,"",ct,{height:`${v(lt)??""}px`,width:"100%"})}),Jh($,"offsetWidth",it=>et(b,it)),Jh($,"clientWidth",it=>et(_,it)),P(e,$),gt({scrollToIndex:T,scrollToPosition:O})}var ur,dn,Xi,dr,vi,Q_,I6=(Q_=class extends wT{constructor(t){super();F(this,dr);F(this,ur);F(this,dn);F(this,Xi);this.mutationId=t.mutationId,ce(this,dn,t.mutationCache),ce(this,ur,[]),this.state=t.state||P0(),this.setOptions(t.options),this.scheduleGc()}setOptions(t){this.options=t,this.updateGcTime(this.options.gcTime)}get meta(){return this.options.meta}addObserver(t){A(this,ur).includes(t)||(A(this,ur).push(t),this.clearGcTimeout(),A(this,dn).notify({type:"observerAdded",mutation:this,observer:t}))}removeObserver(t){ce(this,ur,A(this,ur).filter(n=>n!==t)),this.scheduleGc(),A(this,dn).notify({type:"observerRemoved",mutation:this,observer:t})}optionalRemove(){A(this,ur).length||(this.state.status==="pending"?this.scheduleGc():A(this,dn).remove(this))}continue(){var t;return((t=A(this,Xi))==null?void 0:t.continue())??this.execute(this.state.variables)}async execute(t){var s,a,l,u,d,f,h,g,m,b,_,w,x,S,I,T,O,D,L,M;ce(this,Xi,yT({fn:()=>this.options.mutationFn?this.options.mutationFn(t):Promise.reject(new Error("No mutationFn found")),onFail:(G,q)=>{Et(this,dr,vi).call(this,{type:"failed",failureCount:G,error:q})},onPause:()=>{Et(this,dr,vi).call(this,{type:"pause"})},onContinue:()=>{Et(this,dr,vi).call(this,{type:"continue"})},retry:this.options.retry??0,retryDelay:this.options.retryDelay,networkMode:this.options.networkMode,canRun:()=>A(this,dn).canRun(this)}));const n=this.state.status==="pending",i=!A(this,Xi).canStart();try{if(!n){Et(this,dr,vi).call(this,{type:"pending",variables:t,isPaused:i}),await((a=(s=A(this,dn).config).onMutate)==null?void 0:a.call(s,t,this));const q=await((u=(l=this.options).onMutate)==null?void 0:u.call(l,t));q!==this.state.context&&Et(this,dr,vi).call(this,{type:"pending",context:q,variables:t,isPaused:i})}const G=await A(this,Xi).start();return await((f=(d=A(this,dn).config).onSuccess)==null?void 0:f.call(d,G,t,this.state.context,this)),await((g=(h=this.options).onSuccess)==null?void 0:g.call(h,G,t,this.state.context)),await((b=(m=A(this,dn).config).onSettled)==null?void 0:b.call(m,G,null,this.state.variables,this.state.context,this)),await((w=(_=this.options).onSettled)==null?void 0:w.call(_,G,null,t,this.state.context)),Et(this,dr,vi).call(this,{type:"success",data:G}),G}catch(G){try{throw await((S=(x=A(this,dn).config).onError)==null?void 0:S.call(x,G,t,this.state.context,this)),await((T=(I=this.options).onError)==null?void 0:T.call(I,G,t,this.state.context)),await((D=(O=A(this,dn).config).onSettled)==null?void 0:D.call(O,void 0,G,this.state.variables,this.state.context,this)),await((M=(L=this.options).onSettled)==null?void 0:M.call(L,void 0,G,t,this.state.context)),G}finally{Et(this,dr,vi).call(this,{type:"error",error:G})}}finally{A(this,dn).runNext(this)}}},ur=new WeakMap,dn=new WeakMap,Xi=new WeakMap,dr=new WeakSet,vi=function(t){const n=i=>{switch(t.type){case"failed":return{...i,failureCount:t.failureCount,failureReason:t.error};case"pause":return{...i,isPaused:!0};case"continue":return{...i,isPaused:!1};case"pending":return{...i,context:t.context,data:void 0,failureCount:0,failureReason:null,error:null,isPaused:t.isPaused,status:"pending",variables:t.variables,submittedAt:Date.now()};case"success":return{...i,data:t.data,failureCount:0,failureReason:null,error:null,status:"success",isPaused:!1};case"error":return{...i,data:void 0,error:t.error,failureCount:i.failureCount+1,failureReason:t.error,isPaused:!1,status:"error"}}};this.state=n(this.state),sp.batch(()=>{A(this,ur).forEach(i=>{i.onMutationUpdate(t)}),A(this,dn).notify({mutation:this,type:"updated",action:t})})},Q_);function P0(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:"idle",variables:void 0,submittedAt:0}}function zb(e){return{onFetch:(t,n)=>{var h,g,m,b,_;const i=t.options,s=(m=(g=(h=t.fetchOptions)==null?void 0:h.meta)==null?void 0:g.fetchMore)==null?void 0:m.direction,a=((b=t.state.data)==null?void 0:b.pages)||[],l=((_=t.state.data)==null?void 0:_.pageParams)||[];let u={pages:[],pageParams:[]},d=0;const f=async()=>{let w=!1;const x=T=>{Object.defineProperty(T,"signal",{enumerable:!0,get:()=>(t.signal.aborted?w=!0:t.signal.addEventListener("abort",()=>{w=!0}),t.signal)})},S=xT(t.options,t.fetchOptions),I=async(T,O,D)=>{if(w)return Promise.reject();if(O==null&&T.pages.length)return Promise.resolve(T);const L={client:t.client,queryKey:t.queryKey,pageParam:O,direction:D?"backward":"forward",meta:t.options.meta};x(L);const M=await S(L),{maxPages:G}=t.options,q=D?ST:AT;return{pages:q(T.pages,M,G),pageParams:q(T.pageParams,O,G)}};if(s&&a.length){const T=s==="backward",O=T?E0:yg,D={pages:a,pageParams:l},L=O(i,D);u=await I(D,L,T)}else{const T=e??a.length;do{const O=d===0?l[0]??i.initialPageParam:yg(i,u);if(d>0&&O==null)break;u=await I(u,O),d++}while(d<T)}return u};t.options.persister?t.fetchFn=()=>{var w,x;return(x=(w=t.options).persister)==null?void 0:x.call(w,f,{client:t.client,queryKey:t.queryKey,meta:t.options.meta,signal:t.signal},n)}:t.fetchFn=f}}}function yg(e,{pages:t,pageParams:n}){const i=t.length-1;return t.length>0?e.getNextPageParam(t[i],t,n[i],n):void 0}function E0(e,{pages:t,pageParams:n}){var i;return t.length>0?(i=e.getPreviousPageParam)==null?void 0:i.call(e,t[0],t,n[0],n):void 0}function hk(e,t){return t?yg(e,t)!=null:!1}function gk(e,t){return!t||!e.getPreviousPageParam?!1:E0(e,t)!=null}var pk=class extends CT{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e,t){super.setOptions({...e,behavior:zb()},t)}getOptimisticResult(e){return e.behavior=zb(),super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"forward"}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:"backward"}}})}createResult(e,t){var _,w;const{state:n}=e,i=super.createResult(e,t),{isFetching:s,isRefetching:a,isError:l,isRefetchError:u}=i,d=(w=(_=n.fetchMeta)==null?void 0:_.fetchMore)==null?void 0:w.direction,f=l&&d==="forward",h=s&&d==="forward",g=l&&d==="backward",m=s&&d==="backward";return{...i,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:hk(t,n.data),hasPreviousPage:gk(t,n.data),isFetchNextPageError:f,isFetchingNextPage:h,isFetchPreviousPageError:g,isFetchingPreviousPage:m,isRefetchError:u&&!f&&!g,isRefetching:a&&!h&&!m}}},yi,xi,bn,Fr,qr,Pc,xg,j_,vk=(j_=class extends PT{constructor(n,i){super();F(this,qr);F(this,yi);F(this,xi);F(this,bn);F(this,Fr);ce(this,yi,n),this.setOptions(i),this.bindMethods(),Et(this,qr,Pc).call(this)}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(n){var s;const i=this.options;this.options=A(this,yi).defaultMutationOptions(n),ET(this.options,i)||A(this,yi).getMutationCache().notify({type:"observerOptionsUpdated",mutation:A(this,bn),observer:this}),i!=null&&i.mutationKey&&this.options.mutationKey&&Ib(i.mutationKey)!==Ib(this.options.mutationKey)?this.reset():((s=A(this,bn))==null?void 0:s.state.status)==="pending"&&A(this,bn).setOptions(this.options)}onUnsubscribe(){var n;this.hasListeners()||(n=A(this,bn))==null||n.removeObserver(this)}onMutationUpdate(n){Et(this,qr,Pc).call(this),Et(this,qr,xg).call(this,n)}getCurrentResult(){return A(this,xi)}reset(){var n;(n=A(this,bn))==null||n.removeObserver(this),ce(this,bn,void 0),Et(this,qr,Pc).call(this),Et(this,qr,xg).call(this)}mutate(n,i){var s;return ce(this,Fr,i),(s=A(this,bn))==null||s.removeObserver(this),ce(this,bn,A(this,yi).getMutationCache().build(A(this,yi),this.options)),A(this,bn).addObserver(this),A(this,bn).execute(n)}},yi=new WeakMap,xi=new WeakMap,bn=new WeakMap,Fr=new WeakMap,qr=new WeakSet,Pc=function(){var i;const n=((i=A(this,bn))==null?void 0:i.state)??P0();ce(this,xi,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},xg=function(n){sp.batch(()=>{var i,s,a,l,u,d,f,h;if(A(this,Fr)&&this.hasListeners()){const g=A(this,xi).variables,m=A(this,xi).context;(n==null?void 0:n.type)==="success"?((s=(i=A(this,Fr)).onSuccess)==null||s.call(i,n.data,g,m),(l=(a=A(this,Fr)).onSettled)==null||l.call(a,n.data,null,g,m)):(n==null?void 0:n.type)==="error"&&((d=(u=A(this,Fr)).onError)==null||d.call(u,n.error,g,m),(h=(f=A(this,Fr)).onSettled)==null||h.call(f,void 0,n.error,g,m))}this.listeners.forEach(g=>{g(A(this,xi))})})},j_);function mk(e,t){return TT(e,pk)}function bk(e,t){const n=ap(),i=kT(e)?e:Ab(e),s=new vk(n,Te(i));let a;i.subscribe(d=>{a=(f,h)=>{s.mutate(f,h).catch(IT)},s.setOptions(d)});const l=Ab(s.getCurrentResult(),d=>s.subscribe(sp.batchCalls(f=>d(f)))),{subscribe:u}=Ei(l,d=>({...d,mutate:a,mutateAsync:d.mutate}));return{subscribe:u}}const T0=({datasetId:e})=>{const t=bk(OT());return t.subscribe(()=>{}),{updateAnnotations:i=>new Promise((s,a)=>{Te(t).mutate({path:{dataset_id:e},body:i},{onSuccess:()=>{s()},onError:l=>{a(l)}})})}};function N6(...e){return e.filter(Boolean).join(" ")}const _k=typeof document<"u";var fr,hr,Br,Vo,Ec;const qp=class qp extends Map{constructor(n){super();F(this,Vo);F(this,fr,new Map);F(this,hr,$n(0));F(this,Br,$n(0));if(n){for(var[i,s]of n)super.set(i,s);A(this,Br).v=super.size}}has(n){var i=A(this,fr),s=i.get(n);if(s===void 0){var a=super.get(n);if(a!==void 0)s=$n(0),i.set(n,s);else return v(A(this,hr)),!1}return v(s),!0}forEach(n,i){Et(this,Vo,Ec).call(this),super.forEach(n,i)}get(n){var i=A(this,fr),s=i.get(n);if(s===void 0){var a=super.get(n);if(a!==void 0)s=$n(0),i.set(n,s);else{v(A(this,hr));return}}return v(s),super.get(n)}set(n,i){var g;var s=A(this,fr),a=s.get(n),l=super.get(n),u=super.set(n,i),d=A(this,hr);if(a===void 0)s.set(n,$n(0)),et(A(this,Br),super.size),To(d);else if(l!==i){To(a);var f=d.reactions===null?null:new Set(d.reactions),h=f===null||!((g=a.reactions)!=null&&g.every(m=>f.has(m)));h&&To(d)}return u}delete(n){var i=A(this,fr),s=i.get(n),a=super.delete(n);return s!==void 0&&(i.delete(n),et(A(this,Br),super.size),et(s,-1),To(A(this,hr))),a}clear(){if(super.size!==0){super.clear();var n=A(this,fr);et(A(this,Br),0);for(var i of n.values())et(i,-1);To(A(this,hr)),n.clear()}}keys(){return v(A(this,hr)),super.keys()}values(){return Et(this,Vo,Ec).call(this),super.values()}entries(){return Et(this,Vo,Ec).call(this),super.entries()}[Symbol.iterator](){return this.entries()}get size(){return v(A(this,Br)),super.size}};fr=new WeakMap,hr=new WeakMap,Br=new WeakMap,Vo=new WeakSet,Ec=function(){v(A(this,hr));var n=A(this,fr);if(A(this,Br).v!==n.size)for(var i of yb(qp.prototype,this,"keys").call(this))n.has(i)||n.set(i,$n(0));for(var[,s]of A(this,fr))v(s)};let Sg=qp,Hb=0;var ta,ea,na;class wk{constructor(){F(this,ta,bt(ft([])));F(this,ea,bt(ft([])));F(this,na,t=>{const n=this.toasts.findIndex(i=>i.id===t);return n===-1?null:n});Y(this,"addToast",t=>{_k&&this.toasts.unshift(t)});Y(this,"updateToast",({id:t,data:n,type:i,message:s})=>{const a=this.toasts.findIndex(u=>u.id===t),l=this.toasts[a];this.toasts[a]={...l,...n,id:t,title:s,type:i,updated:!0}});Y(this,"create",t=>{var u;const{message:n,...i}=t,s=typeof(t==null?void 0:t.id)=="number"||t.id&&((u=t.id)==null?void 0:u.length)>0?t.id:Hb++,a=t.dismissable===void 0?!0:t.dismissable,l=t.type===void 0?"default":t.type;return On(()=>{this.toasts.find(f=>f.id===s)?this.updateToast({id:s,data:t,type:l,message:n,dismissable:a}):this.addToast({...i,id:s,title:n,dismissable:a,type:l})}),s});Y(this,"dismiss",t=>(On(()=>{if(t===void 0){this.toasts=this.toasts.map(i=>({...i,dismiss:!0}));return}const n=this.toasts.findIndex(i=>i.id===t);this.toasts[n]&&(this.toasts[n]={...this.toasts[n],dismiss:!0})}),t));Y(this,"remove",t=>{if(t===void 0){this.toasts=[];return}const n=A(this,na).call(this,t);if(n!==null)return this.toasts.splice(n,1),t});Y(this,"message",(t,n)=>this.create({...n,type:"default",message:t}));Y(this,"error",(t,n)=>this.create({...n,type:"error",message:t}));Y(this,"success",(t,n)=>this.create({...n,type:"success",message:t}));Y(this,"info",(t,n)=>this.create({...n,type:"info",message:t}));Y(this,"warning",(t,n)=>this.create({...n,type:"warning",message:t}));Y(this,"loading",(t,n)=>this.create({...n,type:"loading",message:t}));Y(this,"promise",(t,n)=>{if(!n)return;let i;n.loading!==void 0&&(i=this.create({...n,promise:t,type:"loading",message:typeof n.loading=="string"?n.loading:n.loading()}));const s=t instanceof Promise?t:t();let a=i!==void 0;return s.then(l=>{if(typeof l=="object"&&l&&"ok"in l&&typeof l.ok=="boolean"&&!l.ok){a=!1;const u=yk(l);this.create({id:i,type:"error",message:u})}else if(n.success!==void 0){a=!1;const u=typeof n.success=="function"?n.success(l):n.success;this.create({id:i,type:"success",message:u})}}).catch(l=>{if(n.error!==void 0){a=!1;const u=typeof n.error=="function"?n.error(l):n.error;this.create({id:i,type:"error",message:u})}}).finally(()=>{var l;a&&(this.dismiss(i),i=void 0),(l=n.finally)==null||l.call(n)}),i});Y(this,"custom",(t,n)=>{const i=(n==null?void 0:n.id)||Hb++;return this.create({component:t,id:i,...n}),i});Y(this,"removeHeight",t=>{this.heights=this.heights.filter(n=>n.toastId!==t)});Y(this,"setHeight",t=>{const n=A(this,na).call(this,t.toastId);if(n===null){this.heights.push(t);return}this.heights[n]=t});Y(this,"reset",()=>{this.toasts=[],this.heights=[]})}get toasts(){return v(A(this,ta))}set toasts(t){et(A(this,ta),ft(t))}get heights(){return v(A(this,ea))}set heights(t){et(A(this,ea),ft(t))}}ta=new WeakMap,ea=new WeakMap,na=new WeakMap;function yk(e){return e&&typeof e=="object"&&"status"in e?`HTTP error! Status: ${e.status}`:`Error! ${e}`}const Un=new wk;function xk(e,t){return Un.create({message:e,...t})}var nu;class R6{constructor(){F(this,nu,N(()=>Un.toasts.filter(t=>!t.dismiss)))}get toasts(){return v(A(this,nu))}}nu=new WeakMap;const Sk=xk,Bc=Object.assign(Sk,{success:Un.success,info:Un.info,warning:Un.warning,error:Un.error,custom:Un.custom,message:Un.message,promise:Un.promise,dismiss:Un.dismiss,loading:Un.loading,getActiveToasts:()=>Un.toasts.filter(e=>!e.dismiss)}),Ak=(...e)=>{const t=NT(...e),n=Ce(!1),i=mk({...t,getNextPageParam:d=>d.nextCursor||void 0}),s=ap(),a=()=>{s.invalidateQueries({queryKey:t.queryKey})},l=e[0].path.dataset_id,{updateAnnotations:u}=T0({datasetId:l});return{annotations:i,refresh:a,isPending:n,updateAnnotations:async d=>{try{n.set(!0),await u(d),a(),Bc.success("Annotations updated successfully")}catch(f){Bc.error("Failed to update annotations:"+f.message)}finally{n.set(!1)}}}};var Ck=tt('<div role="status"><svg aria-hidden="true" viewBox="0 0 100 101" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z" fill="currentColor"></path><path d="M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z" fill="currentFill"></path></svg> <span class="sr-only">Loading...</span></div>');function Pk(e,t){const n=k(t,"size",3,"medium"),i=k(t,"align",3,"center"),s={small:"h-4 w-4",medium:"h-6 w-6",large:"h-8 w-8"},a={left:"text-start",center:"text-center",right:"text-end"};var l=Ck(),u=rt(l);we(2),nt(l),St(()=>qn(u,0,s[n()]+" "+a[i()]+" spinner inline animate-spin text-gray-200 dark:text-gray-600","svelte-18zpdab")),P(e,l)}/**
4
- * @license @lucide/svelte v0.482.0 - ISC
5
- *
6
- * ISC License
7
- *
8
- * 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.
9
- *
10
- * Permission to use, copy, modify, and/or distribute this software for any
11
- * purpose with or without fee is hereby granted, provided that the above
12
- * copyright notice and this permission notice appear in all copies.
13
- *
14
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
15
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
16
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
17
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
18
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
19
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
20
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
21
- *
22
- */const Ek={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"};var Tk=cl("<svg><!><!></svg>");function Rn(e,t){ht(t,!0);const n=k(t,"color",3,"currentColor"),i=k(t,"size",3,24),s=k(t,"strokeWidth",3,2),a=k(t,"absoluteStrokeWidth",3,!1),l=k(t,"iconNode",19,()=>[]),u=At(t,["$$slots","$$events","$$legacy","name","color","size","strokeWidth","absoluteStrokeWidth","iconNode","children"]),d=Qr(),[f,h]=d;var g=Tk();let m;var b=rt(g);Ti(b,17,l,yf,(w,x)=>{let S=()=>v(x)[0],I=()=>v(x)[1];var T=X(),O=W(T);HT(O,S,!0,(D,L)=>{let M;St(G=>M=Lt(D,M,{...G}),[()=>`${S()}`=="button"?h({...I()},[{attribute_name:"formaction"}]):`${S()}`=="form"?h({...I()},[{attribute_name:"action"}]):`${S()}`=="a"?h({...I()},[{attribute_name:"href",lang_attribute_name:"hreflang"}]):{...I()}])}),P(w,T)});var _=mt(b);at(_,()=>t.children??Ct),nt(g),St(w=>m=Lt(g,m,{...Ek,...u,width:i(),height:i(),stroke:n(),"stroke-width":w,class:["lucide-icon lucide",t.name&&`lucide-${t.name}`,t.class]}),[()=>a()?Number(s())*24/Number(i()):s()]),P(e,g),gt()}function up(e,t){ht(t,!0);let n=At(t,["$$slots","$$events","$$legacy"]);Rn(e,Rt({name:"check"},()=>n,{iconNode:[["path",{d:"M20 6 9 17l-5-5"}]],children:(s,a)=>{var l=X(),u=W(l);at(u,()=>t.children??Ct),P(s,l)},$$slots:{default:!0}})),gt()}/**
23
- * @license @lucide/svelte v0.482.0 - ISC
24
- *
25
- * ISC License
26
- *
27
- * 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.
28
- *
29
- * Permission to use, copy, modify, and/or distribute this software for any
30
- * purpose with or without fee is hereby granted, provided that the above
31
- * copyright notice and this permission notice appear in all copies.
32
- *
33
- * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
34
- * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
35
- * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
36
- * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
37
- * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
38
- * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
39
- * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
40
- *
41
- */const kk=Object.freeze(Object.defineProperty({__proto__:null,default:up},Symbol.toStringTag,{value:"Module"}));function Ik(e,t){ht(t,!0);let n=At(t,["$$slots","$$events","$$legacy"]);Rn(e,Rt({name:"chevrons-up-down"},()=>n,{iconNode:[["path",{d:"m7 15 5 5 5-5"}],["path",{d:"m7 9 5-5 5 5"}]],children:(s,a)=>{var l=X(),u=W(l);at(u,()=>t.children??Ct),P(s,l)},$$slots:{default:!0}})),gt()}function Ok(e){return typeof e=="function"}function Nk(e){return e!==null&&typeof e=="object"}const Rk=["string","number","bigint","boolean"];function Ag(e){return e==null||Rk.includes(typeof e)?!0:Array.isArray(e)?e.every(t=>Ag(t)):typeof e=="object"?Object.getPrototypeOf(e)===Object.prototype:!1}const Ks=Symbol("box"),dp=Symbol("is-writable");function Mk(e){return Nk(e)&&Ks in e}function Lk(e){return B.isBox(e)&&dp in e}function B(e){let t=bt(ft(e));return{[Ks]:!0,[dp]:!0,get current(){return v(t)},set current(n){et(t,ft(n))}}}function Dk(e,t){const n=N(e);return t?{[Ks]:!0,[dp]:!0,get current(){return v(n)},set current(i){t(i)}}:{[Ks]:!0,get current(){return e()}}}function Fk(e){return B.isBox(e)?e:Ok(e)?B.with(e):B(e)}function Bk(e){return Object.entries(e).reduce((t,[n,i])=>B.isBox(i)?(B.isWritableBox(i)?Object.defineProperty(t,n,{get(){return i.current},set(s){i.current=s}}):Object.defineProperty(t,n,{get(){return i.current}}),t):Object.assign(t,{[n]:i}),{})}function Vk(e){return B.isWritableBox(e)?{[Ks]:!0,get current(){return e.current}}:e}B.from=Fk;B.with=Dk;B.flatten=Bk;B.readonly=Vk;B.isBox=Mk;B.isWritableBox=Lk;function k0(...e){return function(t){var n;for(const i of e)if(i){if(t.defaultPrevented)return;typeof i=="function"?i.call(this,t):(n=i.current)==null||n.call(this,t)}}}var pr=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function I0(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var O0={},Ub=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,Wk=/\n/g,zk=/^\s*/,Hk=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,Uk=/^:\s*/,Gk=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,Kk=/^[;\s]*/,qk=/^\s+|\s+$/g,Yk=`
42
- `,Gb="/",Kb="*",Gi="",Xk="comment",Zk="declaration",Jk=function(e,t){if(typeof e!="string")throw new TypeError("First argument must be a string");if(!e)return[];t=t||{};var n=1,i=1;function s(_){var w=_.match(Wk);w&&(n+=w.length);var x=_.lastIndexOf(Yk);i=~x?_.length-x:i+_.length}function a(){var _={line:n,column:i};return function(w){return w.position=new l(_),f(),w}}function l(_){this.start=_,this.end={line:n,column:i},this.source=t.source}l.prototype.content=e;function u(_){var w=new Error(t.source+":"+n+":"+i+": "+_);if(w.reason=_,w.filename=t.source,w.line=n,w.column=i,w.source=e,!t.silent)throw w}function d(_){var w=_.exec(e);if(w){var x=w[0];return s(x),e=e.slice(x.length),w}}function f(){d(zk)}function h(_){var w;for(_=_||[];w=g();)w!==!1&&_.push(w);return _}function g(){var _=a();if(!(Gb!=e.charAt(0)||Kb!=e.charAt(1))){for(var w=2;Gi!=e.charAt(w)&&(Kb!=e.charAt(w)||Gb!=e.charAt(w+1));)++w;if(w+=2,Gi===e.charAt(w-1))return u("End of comment missing");var x=e.slice(2,w-2);return i+=2,s(x),e=e.slice(w),i+=2,_({type:Xk,comment:x})}}function m(){var _=a(),w=d(Hk);if(w){if(g(),!d(Uk))return u("property missing ':'");var x=d(Gk),S=_({type:Zk,property:qb(w[0].replace(Ub,Gi)),value:x?qb(x[0].replace(Ub,Gi)):Gi});return d(Kk),S}}function b(){var _=[];h(_);for(var w;w=m();)w!==!1&&(_.push(w),h(_));return _}return f(),b()};function qb(e){return e?e.replace(qk,Gi):Gi}var Qk=pr&&pr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(O0,"__esModule",{value:!0});var Yb=O0.default=$k,jk=Qk(Jk);function $k(e,t){var n=null;if(!e||typeof e!="string")return n;var i=(0,jk.default)(e),s=typeof t=="function";return i.forEach(function(a){if(a.type==="declaration"){var l=a.property,u=a.value;s?t(l,u,a):u&&(n=n||{},n[l]=u)}}),n}const tI=Yb.default||Yb,eI=/\d/,nI=["-","_","/","."];function rI(e=""){if(!eI.test(e))return e!==e.toLowerCase()}function iI(e){const t=[];let n="",i,s;for(const a of e){const l=nI.includes(a);if(l===!0){t.push(n),n="",i=void 0;continue}const u=rI(a);if(s===!1){if(i===!1&&u===!0){t.push(n),n=a,i=u;continue}if(i===!0&&u===!1&&n.length>1){const d=n.at(-1);t.push(n.slice(0,Math.max(0,n.length-1))),n=d+a,i=u;continue}}n+=a,i=u,s=l}return t.push(n),t}function N0(e){return e?iI(e).map(t=>sI(t)).join(""):""}function oI(e){return aI(N0(e||""))}function sI(e){return e?e[0].toUpperCase()+e.slice(1):""}function aI(e){return e?e[0].toLowerCase()+e.slice(1):""}function Rs(e){if(!e)return{};const t={};function n(i,s){if(i.startsWith("-moz-")||i.startsWith("-webkit-")||i.startsWith("-ms-")||i.startsWith("-o-")){t[N0(i)]=s;return}if(i.startsWith("--")){t[i]=s;return}t[oI(i)]=s}return tI(e,n),t}function Gr(...e){return(...t)=>{for(const n of e)typeof n=="function"&&n(...t)}}function lI(e,t){const n=RegExp(e,"g");return i=>{if(typeof i!="string")throw new TypeError(`expected an argument of type string, but got ${typeof i}`);return i.match(n)?i.replace(n,t):i}}const cI=lI(/[A-Z]/,e=>`-${e.toLowerCase()}`);function uI(e){if(!e||typeof e!="object"||Array.isArray(e))throw new TypeError(`expected an argument of type object, but got ${typeof e}`);return Object.keys(e).map(t=>`${cI(t)}: ${e[t]};`).join(`
43
- `)}function fp(e={}){return uI(e).replace(`
44
- `," ")}const R0={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",transform:"translateX(-100%)"},dI=fp(R0);function fI(e){var t;return e.length>2&&e.startsWith("on")&&e[2]===((t=e[2])==null?void 0:t.toLowerCase())}function Wt(...e){const t={...e[0]};for(let n=1;n<e.length;n++){const i=e[n];for(const s in i){const a=t[s],l=i[s],u=typeof a=="function",d=typeof l=="function";if(u&&fI(s)){const f=a,h=l;t[s]=k0(f,h)}else if(u&&d)t[s]=Gr(a,l);else if(s==="class"){const f=Ag(a),h=Ag(l);f&&h?t[s]=Ws(a,l):f?t[s]=Ws(a):h&&(t[s]=Ws(l))}else if(s==="style"){const f=typeof a=="object",h=typeof l=="object",g=typeof a=="string",m=typeof l=="string";if(f&&h)t[s]={...a,...l};else if(f&&m){const b=Rs(l);t[s]={...a,...b}}else if(g&&h){const b=Rs(a);t[s]={...b,...l}}else if(g&&m){const b=Rs(a),_=Rs(l);t[s]={...b,..._}}else f?t[s]=a:h?t[s]=l:g?t[s]=a:m&&(t[s]=l)}else t[s]=l!==void 0?l:a}}return typeof t.style=="object"&&(t.style=fp(t.style).replaceAll(`
45
- `," ")),t.hidden!==!0&&(t.hidden=void 0,delete t.hidden),t.disabled!==!0&&(t.disabled=void 0,delete t.disabled),t}const M0=typeof window<"u"?window:void 0;function hI(e){let t=e.activeElement;for(;t!=null&&t.shadowRoot;){const n=t.shadowRoot.activeElement;if(n===t)break;t=n}return t}var Wo,ra;class gI{constructor(t={}){F(this,Wo);F(this,ra);const{window:n=M0,document:i=n==null?void 0:n.document}=t;n!==void 0&&(ce(this,Wo,i),ce(this,ra,jT(s=>{const a=Ne(n,"focusin",s),l=Ne(n,"focusout",s);return()=>{a(),l()}})))}get current(){var t;return(t=A(this,ra))==null||t.call(this),A(this,Wo)?hI(A(this,Wo)):null}}Wo=new WeakMap,ra=new WeakMap;new gI;function pI(e){return typeof e=="function"}function vI(e,t){switch(e){case"post":xe(t);break;case"pre":bf(t);break}}function L0(e,t,n,i={}){const{lazy:s=!1}=i;let a=!s,l=Array.isArray(e)?[]:void 0;vI(t,()=>{const u=Array.isArray(e)?e.map(f=>f()):e();if(!a){a=!0,l=u;return}const d=On(()=>n(u,l));return l=u,d})}function ne(e,t,n){L0(e,"post",t,n)}function mI(e,t,n){L0(e,"pre",t,n)}ne.pre=mI;function bI(e){return pI(e)?e():e}var Vr;class _I{constructor(t,n={box:"border-box"}){F(this,Vr,bt(ft({width:0,height:0})));var s,a;const i=n.window??M0;A(this,Vr).v=ft({width:((s=n.initialSize)==null?void 0:s.width)??0,height:((a=n.initialSize)==null?void 0:a.height)??0}),xe(()=>{if(!i)return;const l=bI(t);if(!l)return;const u=new i.ResizeObserver(d=>{for(const f of d){const h=n.box==="content-box"?f.contentBoxSize:f.borderBoxSize,g=Array.isArray(h)?h:[h];v(A(this,Vr)).width=g.reduce((m,b)=>Math.max(m,b.inlineSize),0),v(A(this,Vr)).height=g.reduce((m,b)=>Math.max(m,b.blockSize),0)}});return u.observe(l),()=>{u.disconnect()}})}get current(){return v(A(this,Vr))}get width(){return v(A(this,Vr)).width}get height(){return v(A(this,Vr)).height}}Vr=new WeakMap;var ia,oa;class D0{constructor(t){F(this,ia,bt(void 0));F(this,oa);xe(()=>{et(A(this,ia),ft(A(this,oa))),ce(this,oa,t())})}get current(){return v(A(this,ia))}}ia=new WeakMap,oa=new WeakMap;var sa,Wr;class sn{constructor(t){F(this,sa);F(this,Wr);ce(this,sa,t),ce(this,Wr,Symbol(t))}get key(){return A(this,Wr)}exists(){return eT(A(this,Wr))}get(){const t=vg(A(this,Wr));if(t===void 0)throw new Error(`Context "${A(this,sa)}" not found`);return t}getOr(t){const n=vg(A(this,Wr));return n===void 0?t:n}set(t){return l0(A(this,Wr),t)}}sa=new WeakMap,Wr=new WeakMap;function hp(e){xe(()=>()=>{e()})}function Jt({id:e,ref:t,deps:n=()=>!0,onRefChange:i,getRootNode:s}){ne([()=>e.current,n],([a])=>{const l=(s==null?void 0:s())??document,u=l==null?void 0:l.getElementById(a);u?t.current=u:t.current=null,i==null||i(t.current)}),hp(()=>{t.current=null,i==null||i(null)})}function ul(e,t){return setTimeout(t,e)}function Tn(e){qi().then(e)}function gp(e){xe(()=>On(()=>e()))}function Ri(e){return e?"open":"closed"}function wI(e){return e?"checked":"unchecked"}function pp(e){return e?"true":"false"}function dl(e){return e?"true":"false"}function Yn(e){return e?"":void 0}function F0(e){return e?"true":"false"}function yI(e){return e?"true":"false"}function B0(e,t){return t?"mixed":e?"true":"false"}function M6(e){return e}function xI(e){return e?"true":void 0}function L6(e){return e}function SI(e){return e?"":void 0}function AI(e){return e?"":void 0}function D6(e){return e?!0:void 0}function V0(e){return e?!0:void 0}function CI(e){return e?!0:void 0}const Ci="ArrowDown",W0="ArrowLeft",z0="ArrowRight",Ur="ArrowUp",fl="End",Yr="Enter",PI="Escape",hl="Home",H0="PageDown",U0="PageUp",Kr=" ",Cg="Tab",EI="p",TI="n",kI="j",II="k",vp=typeof document<"u",Pg=OI();function OI(){var e,t;return vp&&((e=window==null?void 0:window.navigator)==null?void 0:e.userAgent)&&(/iP(ad|hone|od)/.test(window.navigator.userAgent)||((t=window==null?void 0:window.navigator)==null?void 0:t.maxTouchPoints)>2&&/iPad|Macintosh/.test(window==null?void 0:window.navigator.userAgent))}function Eg(e){return e instanceof HTMLElement}function G0(e){return e instanceof Element}function K0(e){return e instanceof Element||e instanceof SVGElement}function NI(e){return e!==null}function RI(e){return e instanceof HTMLInputElement&&"select"in e}function MI(e,t){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}globalThis.bitsIdCounter??(globalThis.bitsIdCounter={current:0});function Qt(e="bits"){return globalThis.bitsIdCounter.current++,`${e}-${globalThis.bitsIdCounter.current}`}function $t(){}function LI(e,t){const n=B(e);function i(a){return t[n.current][a]??n.current}return{state:n,dispatch:a=>{n.current=i(a)}}}function DI(e,t){let n=bt(ft({})),i=bt("none");const s=e.current?"mounted":"unmounted";let a=bt(null);const l=new D0(()=>e.current);ne([()=>t.current,()=>e.current],([m,b])=>{!m||!b||Tn(()=>{et(a,ft(document.getElementById(m)))})});const{state:u,dispatch:d}=LI(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});ne(()=>e.current,m=>{if(v(a)||et(a,ft(document.getElementById(t.current))),!v(a)||!(m!==l.current))return;const _=v(i),w=dc(v(a));m?d("MOUNT"):w==="none"||v(n).display==="none"?d("UNMOUNT"):d(l&&_!==w?"ANIMATION_OUT":"UNMOUNT")});function f(m){if(v(a)||et(a,ft(document.getElementById(t.current))),!v(a))return;const b=dc(v(a)),_=b.includes(m.animationName)||b==="none";m.target===v(a)&&_&&d("ANIMATION_END")}function h(m){v(a)||et(a,ft(document.getElementById(t.current))),v(a)&&m.target===v(a)&&et(i,ft(dc(v(a))))}ne(()=>u.current,()=>{if(v(a)||et(a,ft(document.getElementById(t.current))),!v(a))return;const m=dc(v(a));et(i,ft(u.current==="mounted"?m:"none"))}),ne(()=>v(a),m=>{if(m)return et(n,ft(getComputedStyle(m))),Gr(Ne(m,"animationstart",h),Ne(m,"animationcancel",f),Ne(m,"animationend",f))});const g=N(()=>["mounted","unmountSuspended"].includes(u.current));return{get current(){return v(g)}}}function dc(e){return e&&getComputedStyle(e).animationName||"none"}function xf(e,t){ht(t,!0);const n=DI(B.with(()=>t.present),B.with(()=>t.id));var i=X(),s=W(i);{var a=l=>{var u=X(),d=W(u);at(d,()=>t.presence??Ct,()=>({present:n})),P(l,u)};_t(s,l=>{(t.forceMount||t.present||n.current)&&l(a)})}P(e,i),gt()}function FI(e){return{content:`data-${e}-content`,trigger:`data-${e}-trigger`,overlay:`data-${e}-overlay`,title:`data-${e}-title`,description:`data-${e}-description`,close:`data-${e}-close`,cancel:`data-${e}-cancel`,action:`data-${e}-action`}}var aa,la,ca,ua,da,fa,ha,ga,ru,iu;class BI{constructor(t){Y(this,"opts");F(this,aa,bt(null));F(this,la,bt(null));F(this,ca,bt(null));F(this,ua,bt(void 0));F(this,da,bt(void 0));F(this,fa,bt(void 0));F(this,ha,bt(void 0));F(this,ga,bt(null));F(this,ru,N(()=>FI(this.opts.variant.current)));F(this,iu,N(()=>({"data-state":Ri(this.opts.open.current)})));this.opts=t,this.handleOpen=this.handleOpen.bind(this),this.handleClose=this.handleClose.bind(this)}get triggerNode(){return v(A(this,aa))}set triggerNode(t){et(A(this,aa),ft(t))}get contentNode(){return v(A(this,la))}set contentNode(t){et(A(this,la),ft(t))}get descriptionNode(){return v(A(this,ca))}set descriptionNode(t){et(A(this,ca),ft(t))}get contentId(){return v(A(this,ua))}set contentId(t){et(A(this,ua),ft(t))}get titleId(){return v(A(this,da))}set titleId(t){et(A(this,da),ft(t))}get triggerId(){return v(A(this,fa))}set triggerId(t){et(A(this,fa),ft(t))}get descriptionId(){return v(A(this,ha))}set descriptionId(t){et(A(this,ha),ft(t))}get cancelNode(){return v(A(this,ga))}set cancelNode(t){et(A(this,ga),ft(t))}get attrs(){return v(A(this,ru))}handleOpen(){this.opts.open.current||(this.opts.open.current=!0)}handleClose(){this.opts.open.current&&(this.opts.open.current=!1)}get sharedProps(){return v(A(this,iu))}}aa=new WeakMap,la=new WeakMap,ca=new WeakMap,ua=new WeakMap,da=new WeakMap,fa=new WeakMap,ha=new WeakMap,ga=new WeakMap,ru=new WeakMap,iu=new WeakMap;var ou;class VI{constructor(t,n){Y(this,"opts");Y(this,"root");F(this,ou,N(()=>({id:this.opts.id.current,"aria-haspopup":"dialog","aria-expanded":dl(this.root.opts.open.current),"aria-controls":this.root.contentId,[this.root.attrs.trigger]:"",onkeydown:this.onkeydown,onclick:this.onclick,disabled:this.opts.disabled.current?!0:void 0,...this.root.sharedProps})));this.opts=t,this.root=n,Jt({...t,onRefChange:i=>{this.root.triggerNode=i,this.root.triggerId=i==null?void 0:i.id}}),this.onclick=this.onclick.bind(this),this.onkeydown=this.onkeydown.bind(this)}onclick(t){this.opts.disabled.current||t.button>0||this.root.handleOpen()}onkeydown(t){this.opts.disabled.current||(t.key===Kr||t.key===Yr)&&(t.preventDefault(),this.root.handleOpen())}get props(){return v(A(this,ou))}}ou=new WeakMap;var su,au;class WI{constructor(t,n){Y(this,"opts");Y(this,"root");F(this,su,N(()=>this.root.attrs[this.opts.variant.current]));F(this,au,N(()=>({id:this.opts.id.current,[v(A(this,su))]:"",onclick:this.onclick,onkeydown:this.onkeydown,disabled:this.opts.disabled.current?!0:void 0,tabindex:0,...this.root.sharedProps})));this.opts=t,this.root=n,this.onclick=this.onclick.bind(this),this.onkeydown=this.onkeydown.bind(this),Jt({...t,deps:()=>this.root.opts.open.current})}onclick(t){this.opts.disabled.current||t.button>0||this.root.handleClose()}onkeydown(t){this.opts.disabled.current||(t.key===Kr||t.key===Yr)&&(t.preventDefault(),this.root.handleClose())}get props(){return v(A(this,au))}}su=new WeakMap,au=new WeakMap;var lu;class zI{constructor(t,n){Y(this,"opts");Y(this,"root");F(this,lu,N(()=>({id:this.opts.id.current,role:"heading","aria-level":this.opts.level.current,[this.root.attrs.title]:"",...this.root.sharedProps})));this.opts=t,this.root=n,Jt({...t,onRefChange:i=>{this.root.titleId=i==null?void 0:i.id},deps:()=>this.root.opts.open.current})}get props(){return v(A(this,lu))}}lu=new WeakMap;var cu;class HI{constructor(t,n){Y(this,"opts");Y(this,"root");F(this,cu,N(()=>({id:this.opts.id.current,[this.root.attrs.description]:"",...this.root.sharedProps})));this.opts=t,this.root=n,Jt({...t,deps:()=>this.root.opts.open.current,onRefChange:i=>{this.root.descriptionNode=i,this.root.descriptionId=i==null?void 0:i.id}})}get props(){return v(A(this,cu))}}cu=new WeakMap;var uu,du;class UI{constructor(t,n){Y(this,"opts");Y(this,"root");F(this,uu,N(()=>({open:this.root.opts.open.current})));F(this,du,N(()=>({id:this.opts.id.current,role:this.root.opts.variant.current==="alert-dialog"?"alertdialog":"dialog","aria-modal":"true","aria-describedby":this.root.descriptionId,"aria-labelledby":this.root.titleId,[this.root.attrs.content]:"",style:{pointerEvents:"auto",outline:this.root.opts.variant.current==="alert-dialog"?"none":void 0},tabindex:this.root.opts.variant.current==="alert-dialog"?-1:void 0,...this.root.sharedProps})));this.opts=t,this.root=n,Jt({...t,deps:()=>this.root.opts.open.current,onRefChange:i=>{this.root.contentNode=i,this.root.contentId=i==null?void 0:i.id}})}get snippetProps(){return v(A(this,uu))}get props(){return v(A(this,du))}}uu=new WeakMap,du=new WeakMap;var fu,hu;class GI{constructor(t,n){Y(this,"opts");Y(this,"root");F(this,fu,N(()=>({open:this.root.opts.open.current})));F(this,hu,N(()=>({id:this.opts.id.current,[this.root.attrs.overlay]:"",style:{pointerEvents:"auto"},...this.root.sharedProps})));this.opts=t,this.root=n,Jt({...t,deps:()=>this.root.opts.open.current})}get snippetProps(){return v(A(this,fu))}get props(){return v(A(this,hu))}}fu=new WeakMap,hu=new WeakMap;const ao=new sn("Dialog.Root");function KI(e){return ao.set(new BI(e))}function qI(e){return new VI(e,ao.get())}function YI(e){return new zI(e,ao.get())}function XI(e){return new UI(e,ao.get())}function ZI(e){return new GI(e,ao.get())}function JI(e){return new HI(e,ao.get())}function QI(e){return new WI(e,ao.get())}var jI=tt("<div><!></div>");function $I(e,t){ht(t,!0);let n=k(t,"id",19,Qt),i=k(t,"ref",15,null),s=k(t,"level",3,2),a=At(t,["$$slots","$$events","$$legacy","id","ref","child","children","level"]);const l=YI({id:B.with(()=>n()),level:B.with(()=>s()),ref:B.with(()=>i(),m=>i(m))}),u=N(()=>Wt(a,l.props));var d=X(),f=W(d);{var h=m=>{var b=X(),_=W(b);at(_,()=>t.child,()=>({props:v(u)})),P(m,b)},g=m=>{var b=jI();let _;var w=rt(b);at(w,()=>t.children??Ct),nt(b),St(()=>_=Lt(b,_,{...v(u)})),P(m,b)};_t(f,m=>{t.child?m(h):m(g,!1)})}P(e,d),gt()}function tO(e,t){var n=X(),i=W(n);Gs(i,()=>t.children,s=>{var a=X(),l=W(a);at(l,()=>t.children??Ct),P(s,a)}),P(e,n)}function gl(e,t){ht(t,!0);let n=k(t,"to",3,"body");const i=nT();let s=N(a);function a(){if(!vp||t.disabled)return null;let g=null;return typeof n()=="string"?g=document.querySelector(n()):(n()instanceof HTMLElement||n()instanceof DocumentFragment)&&(g=n()),g}let l;function u(){l&&(dT(l),l=null)}ne([()=>v(s),()=>t.disabled],([g,m])=>{if(!g||m){u();return}return l=uT(tO,{target:g,props:{children:t.children},context:i}),()=>{u()}});var d=X(),f=W(d);{var h=g=>{var m=X(),b=W(m);at(b,()=>t.children??Ct),P(g,m)};_t(f,g=>{t.disabled&&g(h)})}P(e,d),gt()}function q0(e,t,n,i){const s=Array.isArray(t)?t:[t];return s.forEach(a=>e.addEventListener(a,n,i)),()=>{s.forEach(a=>e.removeEventListener(a,n,i))}}class Y0{constructor(t,n={bubbles:!0,cancelable:!0}){Y(this,"eventName");Y(this,"options");this.eventName=t,this.options=n}createEvent(t){return new CustomEvent(this.eventName,{...this.options,detail:t})}dispatch(t,n){const i=this.createEvent(n);return t.dispatchEvent(i),i}listen(t,n,i){const s=a=>{n(a)};return Ne(t,this.eventName,s,i)}}function Xb(e,t=500){let n=null;const i=(...s)=>{n!==null&&clearTimeout(n),n=setTimeout(()=>{e(...s)},t)};return i.destroy=()=>{n!==null&&(clearTimeout(n),n=null)},i}function mp(e,t){return e===t||e.contains(t)}function X0(e){return(e==null?void 0:e.ownerDocument)??document}function eO(e){if(!e)return null;for(const t of e.childNodes)if(t.nodeType!==Node.COMMENT_NODE)return t;return null}function nO(e,t){const{clientX:n,clientY:i}=e,s=t.getBoundingClientRect();return n<s.left||n>s.right||i<s.top||i>s.bottom}globalThis.bitsDismissableLayers??(globalThis.bitsDismissableLayers=new Map);var zo,Zi,Si,Ho,Uo,Ai,pa,va,zr,gu,ns,Z0,pu,Go,vu,mu,bu,_u,ma,J0,wu,yu;class rO{constructor(t){F(this,ns);Y(this,"opts");F(this,zo);F(this,Zi);F(this,Si,{pointerdown:!1});F(this,Ho,!1);F(this,Uo,!1);Y(this,"node",B(null));F(this,Ai);F(this,pa);F(this,va,bt(null));F(this,zr,$t);F(this,gu,t=>{t.defaultPrevented||this.currNode&&Tn(()=>{var n,i;!this.currNode||A(this,_u).call(this,t.target)||t.target&&!A(this,Uo)&&((i=(n=A(this,pa)).current)==null||i.call(n,t))})});F(this,pu,t=>{let n=t;n.defaultPrevented&&(n=Zb(t)),A(this,zo).current(t)});F(this,Go,Xb(t=>{if(!this.currNode){A(this,zr).call(this);return}const n=this.opts.isValidEvent.current(t,this.currNode)||aO(t,this.currNode);if(!A(this,Ho)||Et(this,ns,J0).call(this)||!n){A(this,zr).call(this);return}let i=t;if(i.defaultPrevented&&(i=Zb(i)),A(this,Zi).current!=="close"&&A(this,Zi).current!=="defer-otherwise-close"){A(this,zr).call(this);return}t.pointerType==="touch"?(A(this,zr).call(this),ce(this,zr,q0(A(this,Ai),"click",A(this,pu),{once:!0}))):A(this,zo).current(i)},10));F(this,vu,t=>{A(this,Si)[t.type]=!0});F(this,mu,t=>{A(this,Si)[t.type]=!1});F(this,bu,()=>{this.node.current&&ce(this,Ho,sO(this.node.current))});F(this,_u,t=>this.node.current?mp(this.node.current,t):!1);F(this,ma,Xb(()=>{for(const t in A(this,Si))A(this,Si)[t]=!1;ce(this,Ho,!1)},20));F(this,wu,()=>{ce(this,Uo,!0)});F(this,yu,()=>{ce(this,Uo,!1)});Y(this,"props",{onfocuscapture:A(this,wu),onblurcapture:A(this,yu)});this.opts=t,Jt({id:t.id,ref:this.node,deps:()=>t.enabled.current,onRefChange:s=>{this.currNode=s}}),ce(this,Zi,t.interactOutsideBehavior),ce(this,zo,t.onInteractOutside),ce(this,pa,t.onFocusOutside),xe(()=>{ce(this,Ai,X0(this.currNode))});let n=$t;const i=()=>{A(this,ma).call(this),globalThis.bitsDismissableLayers.delete(this),A(this,Go).destroy(),n()};ne([()=>this.opts.enabled.current,()=>this.currNode],([s,a])=>{if(!(!s||!a))return ul(1,()=>{this.currNode&&(globalThis.bitsDismissableLayers.set(this,A(this,Zi)),n(),n=Et(this,ns,Z0).call(this))}),i}),hp(()=>{A(this,ma).destroy(),globalThis.bitsDismissableLayers.delete(this),A(this,Go).destroy(),A(this,zr).call(this),n()})}get currNode(){return v(A(this,va))}set currNode(t){et(A(this,va),ft(t))}}zo=new WeakMap,Zi=new WeakMap,Si=new WeakMap,Ho=new WeakMap,Uo=new WeakMap,Ai=new WeakMap,pa=new WeakMap,va=new WeakMap,zr=new WeakMap,gu=new WeakMap,ns=new WeakSet,Z0=function(){return Gr(Ne(A(this,Ai),"pointerdown",Gr(A(this,vu),A(this,bu)),{capture:!0}),Ne(A(this,Ai),"pointerdown",Gr(A(this,mu),A(this,Go))),Ne(A(this,Ai),"focusin",A(this,gu)))},pu=new WeakMap,Go=new WeakMap,vu=new WeakMap,mu=new WeakMap,bu=new WeakMap,_u=new WeakMap,ma=new WeakMap,J0=function(){return Object.values(A(this,Si)).some(Boolean)},wu=new WeakMap,yu=new WeakMap;function iO(e){return new rO(e)}function oO(e){return e.findLast(([t,{current:n}])=>n==="close"||n==="ignore")}function sO(e){const t=[...globalThis.bitsDismissableLayers],n=oO(t);if(n)return n[0].node.current===e;const[i]=t[0];return i.node.current===e}function aO(e,t){if("button"in e&&e.button>0)return!1;const n=e.target;return G0(n)?X0(n).documentElement.contains(n)&&!mp(t,n)&&nO(e,t):!1}function Zb(e){const t=e.currentTarget,n=e.target;let i;e instanceof PointerEvent?i=new PointerEvent(e.type,e):i=new PointerEvent("pointerdown",e);let s=!1;return new Proxy(i,{get:(l,u)=>u==="currentTarget"?t:u==="target"?n:u==="preventDefault"?()=>{s=!0,typeof l.preventDefault=="function"&&l.preventDefault()}:u==="defaultPrevented"?s:u in l?l[u]:e[u]})}function Q0(e,t){ht(t,!0);let n=k(t,"interactOutsideBehavior",3,"close"),i=k(t,"onInteractOutside",3,$t),s=k(t,"onFocusOutside",3,$t),a=k(t,"isValidEvent",3,()=>!1);const l=iO({id:B.with(()=>t.id),interactOutsideBehavior:B.with(()=>n()),onInteractOutside:B.with(()=>i()),enabled:B.with(()=>t.enabled),onFocusOutside:B.with(()=>s()),isValidEvent:B.with(()=>a())});var u=X(),d=W(u);at(d,()=>t.children??Ct,()=>({props:l.props})),P(e,u),gt()}globalThis.bitsEscapeLayers??(globalThis.bitsEscapeLayers=new Map);var xu,Su;class lO{constructor(t){Y(this,"opts");F(this,xu,()=>Ne(document,"keydown",A(this,Su),{passive:!1}));F(this,Su,t=>{if(t.key!==PI||!uO(this))return;const n=new KeyboardEvent(t.type,t);t.preventDefault();const i=this.opts.escapeKeydownBehavior.current;i!=="close"&&i!=="defer-otherwise-close"||this.opts.onEscapeKeydown.current(n)});this.opts=t;let n=$t;ne(()=>t.enabled.current,i=>(i&&(globalThis.bitsEscapeLayers.set(this,t.escapeKeydownBehavior),n=A(this,xu).call(this)),()=>{n(),globalThis.bitsEscapeLayers.delete(this)}))}}xu=new WeakMap,Su=new WeakMap;function cO(e){return new lO(e)}function uO(e){const t=[...globalThis.bitsEscapeLayers],n=t.findLast(([s,{current:a}])=>a==="close"||a==="ignore");if(n)return n[0]===e;const[i]=t[0];return i===e}function j0(e,t){ht(t,!0);let n=k(t,"escapeKeydownBehavior",3,"close"),i=k(t,"onEscapeKeydown",3,$t);cO({escapeKeydownBehavior:B.with(()=>n()),onEscapeKeydown:B.with(()=>i()),enabled:B.with(()=>t.enabled)});var s=X(),a=W(s);at(a,()=>t.children??Ct),P(e,s),gt()}const di=B([]);function dO(){return{add(e){const t=di.current[0];t&&e.id!==t.id&&t.pause(),di.current=Jb(di.current,e),di.current.unshift(e)},remove(e){var t;di.current=Jb(di.current,e),(t=di.current[0])==null||t.resume()},get current(){return di.current}}}function fO(){let e=bt(!1),t=bt(!1);return{id:Qt(),get paused(){return v(e)},get isHandlingFocus(){return v(t)},set isHandlingFocus(n){et(t,ft(n))},pause(){et(e,!0)},resume(){et(e,!1)}}}function Jb(e,t){return[...e].filter(n=>n.id!==t.id)}function hO(e){return e.filter(t=>t.tagName!=="A")}function mi(e,{select:t=!1}={}){if(!(e&&e.focus)||document.activeElement===e)return;const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&RI(e)&&t&&e.select()}function gO(e,{select:t=!1}={}){const n=document.activeElement;for(const i of e)if(mi(i,{select:t}),document.activeElement!==n)return!0}function Qb(e,t){for(const n of e)if(!MI(n,t))return n}function $0(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:i=>{const s=i.tagName==="INPUT"&&i.type==="hidden";return i.disabled||i.hidden||s?NodeFilter.FILTER_SKIP:i.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function pO(e){const t=$0(e),n=Qb(t,e),i=Qb(t.reverse(),e);return[n,i]}/*!
46
- * tabbable 6.2.0
47
- * @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
48
- */var vO=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"],mO=vO.join(","),tw=typeof Element>"u",Vc=tw?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Wc=!tw&&Element.prototype.getRootNode?function(e){var t;return e==null||(t=e.getRootNode)===null||t===void 0?void 0:t.call(e)}:function(e){return e==null?void 0:e.ownerDocument},bO=function e(t,n){var i;n===void 0&&(n=!0);var s=t==null||(i=t.getAttribute)===null||i===void 0?void 0:i.call(t,"inert"),a=s===""||s==="true",l=a||n&&t&&e(t.parentNode);return l},_O=function(t){var n,i=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return i===""||i==="true"},wO=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},yO=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||_O(t))&&!wO(t)?0:t.tabIndex},ew=function(t){return t.tagName==="INPUT"},xO=function(t){return ew(t)&&t.type==="hidden"},SO=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(i){return i.tagName==="SUMMARY"});return n},AO=function(t,n){for(var i=0;i<t.length;i++)if(t[i].checked&&t[i].form===n)return t[i]},CO=function(t){if(!t.name)return!0;var n=t.form||Wc(t),i=function(u){return n.querySelectorAll('input[type="radio"][name="'+u+'"]')},s;if(typeof window<"u"&&typeof window.CSS<"u"&&typeof window.CSS.escape=="function")s=i(window.CSS.escape(t.name));else try{s=i(t.name)}catch(l){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",l.message),!1}var a=AO(s,t.form);return!a||a===t},PO=function(t){return ew(t)&&t.type==="radio"},EO=function(t){return PO(t)&&!CO(t)},TO=function(t){var n,i=t&&Wc(t),s=(n=i)===null||n===void 0?void 0:n.host,a=!1;if(i&&i!==t){var l,u,d;for(a=!!((l=s)!==null&&l!==void 0&&(u=l.ownerDocument)!==null&&u!==void 0&&u.contains(s)||t!=null&&(d=t.ownerDocument)!==null&&d!==void 0&&d.contains(t));!a&&s;){var f,h,g;i=Wc(s),s=(f=i)===null||f===void 0?void 0:f.host,a=!!((h=s)!==null&&h!==void 0&&(g=h.ownerDocument)!==null&&g!==void 0&&g.contains(s))}}return a},jb=function(t){var n=t.getBoundingClientRect(),i=n.width,s=n.height;return i===0&&s===0},kO=function(t,n){var i=n.displayCheck,s=n.getShadowRoot;if(getComputedStyle(t).visibility==="hidden")return!0;var a=Vc.call(t,"details>summary:first-of-type"),l=a?t.parentElement:t;if(Vc.call(l,"details:not([open]) *"))return!0;if(!i||i==="full"||i==="legacy-full"){if(typeof s=="function"){for(var u=t;t;){var d=t.parentElement,f=Wc(t);if(d&&!d.shadowRoot&&s(d)===!0)return jb(t);t.assignedSlot?t=t.assignedSlot:!d&&f!==t.ownerDocument?t=f.host:t=d}t=u}if(TO(t))return!t.getClientRects().length;if(i!=="legacy-full")return!0}else if(i==="non-zero-area")return jb(t);return!1},IO=function(t){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(t.tagName))for(var n=t.parentElement;n;){if(n.tagName==="FIELDSET"&&n.disabled){for(var i=0;i<n.children.length;i++){var s=n.children.item(i);if(s.tagName==="LEGEND")return Vc.call(n,"fieldset[disabled] *")?!0:!s.contains(t)}return!0}n=n.parentElement}return!1},OO=function(t,n){return!(n.disabled||bO(n)||xO(n)||kO(n,t)||SO(n)||IO(n))},NO=function(t,n){return!(EO(n)||yO(n)<0||!OO(t,n))},RO=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return Vc.call(t,mO)===!1?!1:NO(n,t)};const MO=new Y0("focusScope.autoFocusOnMount",{bubbles:!1,cancelable:!0}),LO=new Y0("focusScope.autoFocusOnDestroy",{bubbles:!1,cancelable:!0}),DO=new sn("FocusScope");function FO({id:e,loop:t,enabled:n,onOpenAutoFocus:i,onCloseAutoFocus:s,forceMount:a}){const l=dO(),u=fO(),d=B(null),f=DO.getOr({ignoreCloseAutoFocus:!1});let h=null;Jt({id:e,ref:d,deps:()=>n.current});function g(S){if(!(u.paused||!d.current||u.isHandlingFocus)){u.isHandlingFocus=!0;try{const I=S.target;if(!Eg(I))return;const T=d.current.contains(I);if(S.type==="focusin")if(T)h=I;else{if(f.ignoreCloseAutoFocus)return;mi(h,{select:!0})}else S.type==="focusout"&&!T&&!f.ignoreCloseAutoFocus&&mi(h,{select:!0})}finally{u.isHandlingFocus=!1}}}function m(S){if(!h||!d.current)return;let I=!1;for(const T of S){if(T.type==="childList"&&T.removedNodes.length>0)for(const O of T.removedNodes){if(O===h){I=!0;break}if(O.nodeType===Node.ELEMENT_NODE&&O.contains(h)){I=!0;break}}if(I)break}I&&d.current&&!d.current.contains(document.activeElement)&&mi(d.current)}ne([()=>d.current,()=>n.current],([S,I])=>{if(!S||!I)return;const T=Gr(Ne(document,"focusin",g),Ne(document,"focusout",g)),O=new MutationObserver(m);return O.observe(S,{childList:!0,subtree:!0,attributes:!1}),()=>{T(),O.disconnect()}}),ne([()=>a.current,()=>d.current],([S,I])=>{if(S)return;const T=document.activeElement;return b(I,T),()=>{I&&_(T)}}),ne([()=>a.current,()=>d.current,()=>n.current],([S,I])=>{if(!S)return;const T=document.activeElement;return b(I,T),()=>{I&&_(T)}});function b(S,I){if(S||(S=document.getElementById(e.current)),!S||!n.current)return;if(l.add(u),!S.contains(I)){const O=MO.createEvent();i.current(O),O.defaultPrevented||Tn(()=>{if(!S)return;gO(hO($0(S)),{select:!0})||mi(S)})}}function _(S){var O;const I=LO.createEvent();(O=s.current)==null||O.call(s,I);const T=f.ignoreCloseAutoFocus;ul(0,()=>{!I.defaultPrevented&&S&&!T&&mi(RO(S)?S:document.body,{select:!0}),l.remove(u)})}function w(S){if(!n.current||!t.current&&!n.current||u.paused)return;const I=S.key===Cg&&!S.ctrlKey&&!S.altKey&&!S.metaKey,T=document.activeElement;if(!(I&&T))return;const O=d.current;if(!O)return;const[D,L]=pO(O);D&&L?!S.shiftKey&&T===L?(S.preventDefault(),t.current&&mi(D,{select:!0})):S.shiftKey&&T===D&&(S.preventDefault(),t.current&&mi(L,{select:!0})):T===O&&S.preventDefault()}const x=N(()=>({id:e.current,tabindex:-1,onkeydown:w}));return{get props(){return v(x)}}}function nw(e,t){ht(t,!0);let n=k(t,"trapFocus",3,!1),i=k(t,"loop",3,!1),s=k(t,"onCloseAutoFocus",3,$t),a=k(t,"onOpenAutoFocus",3,$t),l=k(t,"forceMount",3,!1);const u=FO({enabled:B.with(()=>n()),loop:B.with(()=>i()),onCloseAutoFocus:B.with(()=>s()),onOpenAutoFocus:B.with(()=>a()),id:B.with(()=>t.id),forceMount:B.with(()=>l())});var d=X(),f=W(d);at(f,()=>t.focusScope??Ct,()=>({props:u.props})),P(e,d),gt()}globalThis.bitsTextSelectionLayers??(globalThis.bitsTextSelectionLayers=new Map);var Ko,ba,Au,rw,Cu,_a;class BO{constructor(t){F(this,Au);Y(this,"opts");F(this,Ko,$t);F(this,ba,B(null));F(this,Cu,t=>{const n=A(this,ba).current,i=t.target;!Eg(n)||!Eg(i)||!this.opts.enabled.current||!zO(this)||!mp(n,i)||(this.opts.onPointerDown.current(t),!t.defaultPrevented&&ce(this,Ko,WO(n)))});F(this,_a,()=>{A(this,Ko).call(this),ce(this,Ko,$t)});this.opts=t,Jt({id:t.id,ref:A(this,ba),deps:()=>this.opts.enabled.current});let n=$t;ne(()=>this.opts.enabled.current,i=>(i&&(globalThis.bitsTextSelectionLayers.set(this,this.opts.enabled),n(),n=Et(this,Au,rw).call(this)),()=>{n(),A(this,_a).call(this),globalThis.bitsTextSelectionLayers.delete(this)}))}}Ko=new WeakMap,ba=new WeakMap,Au=new WeakSet,rw=function(){return Gr(Ne(document,"pointerdown",A(this,Cu)),Ne(document,"pointerup",k0(A(this,_a),this.opts.onPointerUp.current)))},Cu=new WeakMap,_a=new WeakMap;function VO(e){return new BO(e)}const $b=e=>e.style.userSelect||e.style.webkitUserSelect;function WO(e){const t=document.body,n=$b(t),i=$b(e);return fc(t,"none"),fc(e,"text"),()=>{fc(t,n),fc(e,i)}}function fc(e,t){e.style.userSelect=t,e.style.webkitUserSelect=t}function zO(e){const t=[...globalThis.bitsTextSelectionLayers];if(!t.length)return!1;const n=t.at(-1);return n?n[0]===e:!1}function iw(e,t){ht(t,!0);let n=k(t,"preventOverflowTextSelection",3,!0),i=k(t,"onPointerDown",3,$t),s=k(t,"onPointerUp",3,$t);VO({id:B.with(()=>t.id),onPointerDown:B.with(()=>i()),onPointerUp:B.with(()=>s()),enabled:B.with(()=>t.enabled&&n())});var a=X(),l=W(a);at(l,()=>t.children??Ct),P(e,a),gt()}function HO(e){let t=0,n=bt(void 0),i;function s(){t-=1,i&&t<=0&&(i(),et(n,void 0),i=void 0)}return(...a)=>(t+=1,v(n)===void 0&&(i=c0(()=>{et(n,ft(e(...a)))})),xe(()=>()=>{s()}),v(n))}const UO=HO(()=>{const e=new Sg,t=N(()=>{for(const a of e.values())if(a)return!0;return!1});let n=bt(null),i=null;function s(){vp&&(document.body.setAttribute("style",v(n)??""),document.body.style.removeProperty("--scrollbar-width"),Pg&&(i==null||i()))}return xe(()=>{const a=v(t);return On(()=>{if(!a)return;et(n,ft(document.body.getAttribute("style")));const l=getComputedStyle(document.body),u=window.innerWidth-document.documentElement.clientWidth,f={padding:Number.parseInt(l.paddingRight??"0",10)+u,margin:Number.parseInt(l.marginRight??"0",10)};u>0&&(document.body.style.paddingRight=`${f.padding}px`,document.body.style.marginRight=`${f.margin}px`,document.body.style.setProperty("--scrollbar-width",`${u}px`),document.body.style.overflow="hidden"),Pg&&(i=q0(document,"touchmove",h=>{h.target===document.documentElement&&(h.touches.length>1||h.preventDefault())},{passive:!1})),Tn(()=>{document.body.style.pointerEvents="none",document.body.style.overflow="hidden"})})}),xe(()=>()=>{i==null||i()}),{get map(){return e},resetBodyStyle:s}});function GO(e,t=()=>null){const n=Qt(),i=UO();if(!i)return;const s=N(t);i.map.set(n,e??!1);const a=B.with(()=>i.map.get(n)??!1,l=>i.map.set(n,l));return xe(()=>()=>{i.map.delete(n),!KO(i.map)&&(v(s)===null?requestAnimationFrame(()=>i.resetBodyStyle()):ul(v(s),()=>i.resetBodyStyle()))}),a}function KO(e){for(const[t,n]of e)if(n)return!0;return!1}function zc(e,t){ht(t,!0);let n=k(t,"preventScroll",3,!0),i=k(t,"restoreScrollDelay",3,null);GO(n(),()=>i()),gt()}function qO({forceMount:e,present:t,trapFocus:n,open:i}){return e?i&&n:t&&n&&i}var YO=tt("<div><!></div>");function ow(e,t){ht(t,!0);let n=k(t,"id",19,Qt),i=k(t,"forceMount",3,!1),s=k(t,"ref",15,null),a=At(t,["$$slots","$$events","$$legacy","id","forceMount","child","children","ref"]);const l=ZI({id:B.with(()=>n()),ref:B.with(()=>s(),f=>s(f))}),u=N(()=>Wt(a,l.props)),d=N(()=>l.root.opts.open.current||i());xf(e,{get id(){return n()},get present(){return v(d)},presence:h=>{var g=X(),m=W(g);{var b=w=>{var x=X(),S=W(x),I=nn(()=>({props:Wt(v(u)),...l.snippetProps}));at(S,()=>t.child,()=>v(I)),P(w,x)},_=w=>{var x=YO();let S;var I=rt(x);at(I,()=>t.children??Ct,()=>l.snippetProps),nt(x),St(T=>S=Lt(x,S,{...T}),[()=>Wt(v(u))]),P(w,x)};_t(m,w=>{t.child?w(b):w(_,!1)})}P(h,g)},$$slots:{presence:!0}}),gt()}var XO=tt("<button><!></button>");function ZO(e,t){ht(t,!0);let n=k(t,"id",19,Qt),i=k(t,"ref",15,null),s=k(t,"disabled",3,!1),a=At(t,["$$slots","$$events","$$legacy","id","ref","children","child","disabled"]);const l=qI({id:B.with(()=>n()),ref:B.with(()=>i(),w=>i(w)),disabled:B.with(()=>!!s())}),u=N(()=>Wt(a,l.props)),d=Qr(),[f,h]=d;var g=X(),m=W(g);{var b=w=>{var x=X(),S=W(x);at(S,()=>t.child,()=>({props:v(u)})),P(w,x)},_=w=>{var x=XO();let S;var I=rt(x);at(I,()=>t.children??Ct),nt(x),St(T=>S=Lt(x,S,{...T}),[()=>h({...v(u)},[{attribute_name:"formaction"}])]),P(w,x)};_t(m,w=>{t.child?w(b):w(_,!1)})}P(e,g),gt()}var JO=tt("<div><!></div>");function QO(e,t){ht(t,!0);let n=k(t,"id",19,Qt),i=k(t,"ref",15,null),s=At(t,["$$slots","$$events","$$legacy","id","children","child","ref"]);const a=JI({id:B.with(()=>n()),ref:B.with(()=>i(),g=>i(g))}),l=N(()=>Wt(s,a.props));var u=X(),d=W(u);{var f=g=>{var m=X(),b=W(m);at(b,()=>t.child,()=>({props:v(l)})),P(g,m)},h=g=>{var m=JO();let b;var _=rt(m);at(_,()=>t.children??Ct),nt(m),St(()=>b=Lt(m,b,{...v(l)})),P(g,m)};_t(d,g=>{t.child?g(f):g(h,!1)})}P(e,u),gt()}function jO(e,t){return e>=0&&e<t.length}function $O(e,t,n=!0){if(!(e.length===0||t<0||t>=e.length))return e.length===1&&t===0?e[0]:t===e.length-1?n?e[0]:void 0:e[t+1]}function tN(e,t,n=!0){if(!(e.length===0||t<0||t>=e.length))return e.length===1&&t===0?e[0]:t===0?n?e[e.length-1]:void 0:e[t-1]}function eN(e,t,n,i=!0){if(e.length===0||t<0||t>=e.length)return;let s=t+n;return i?s=(s%e.length+e.length)%e.length:s=Math.max(0,Math.min(s,e.length-1)),e[s]}function nN(e,t,n,i=!0){if(e.length===0||t<0||t>=e.length)return;let s=t-n;return i?s=(s%e.length+e.length)%e.length:s=Math.max(0,Math.min(s,e.length-1)),e[s]}function bp(e,t,n){const i=t.toLowerCase();if(i.endsWith(" ")){const g=i.slice(0,-1);if(e.filter(w=>w.toLowerCase().startsWith(g)).length<=1)return bp(e,g,n);const b=n==null?void 0:n.toLowerCase();if(b&&b.startsWith(g)&&b.charAt(g.length)===" "&&t.trim()===g)return n;const _=e.filter(w=>w.toLowerCase().startsWith(i));if(_.length>0){const w=n?e.indexOf(n):-1;return t_(_,Math.max(w,0)).find(I=>I!==n)||n}}const a=t.length>1&&Array.from(t).every(g=>g===t[0])?t[0]:t,l=a.toLowerCase(),u=n?e.indexOf(n):-1;let d=t_(e,Math.max(u,0));a.length===1&&(d=d.filter(g=>g!==n));const h=d.find(g=>g==null?void 0:g.toLowerCase().startsWith(l));return h!==n?h:void 0}function t_(e,t){return e.map((n,i)=>e[(t+i)%e.length])}const rN="data-checkbox-root";var Pu,Eu,Tu,wa,Tg,ku,Iu;class iN{constructor(t,n=null){F(this,wa);Y(this,"opts");Y(this,"group");F(this,Pu,N(()=>this.group&&this.group.opts.name.current?this.group.opts.name.current:this.opts.name.current));F(this,Eu,N(()=>this.group&&this.group.opts.required.current?!0:this.opts.required.current));F(this,Tu,N(()=>this.group&&this.group.opts.disabled.current?!0:this.opts.disabled.current));F(this,ku,N(()=>({checked:this.opts.checked.current,indeterminate:this.opts.indeterminate.current})));F(this,Iu,N(()=>({id:this.opts.id.current,role:"checkbox",type:this.opts.type.current,disabled:this.trueDisabled,"aria-checked":B0(this.opts.checked.current,this.opts.indeterminate.current),"aria-required":F0(this.trueRequired),"data-disabled":Yn(this.trueDisabled),"data-state":sN(this.opts.checked.current,this.opts.indeterminate.current),[rN]:"",onclick:this.onclick,onkeydown:this.onkeydown})));this.opts=t,this.group=n,this.onkeydown=this.onkeydown.bind(this),this.onclick=this.onclick.bind(this),Jt(t),ne.pre([()=>{var i;return h0((i=this.group)==null?void 0:i.opts.value.current)},()=>this.opts.value.current],([i,s])=>{!i||!s||(this.opts.checked.current=i.includes(s))}),ne.pre(()=>this.opts.checked.current,i=>{var s,a;this.group&&(i?(s=this.group)==null||s.addValue(this.opts.value.current):(a=this.group)==null||a.removeValue(this.opts.value.current))})}get trueName(){return v(A(this,Pu))}get trueRequired(){return v(A(this,Eu))}get trueDisabled(){return v(A(this,Tu))}onkeydown(t){this.opts.disabled.current||(t.key===Yr&&t.preventDefault(),t.key===Kr&&(t.preventDefault(),Et(this,wa,Tg).call(this)))}onclick(t){this.opts.disabled.current||Et(this,wa,Tg).call(this)}get snippetProps(){return v(A(this,ku))}get props(){return v(A(this,Iu))}}Pu=new WeakMap,Eu=new WeakMap,Tu=new WeakMap,wa=new WeakSet,Tg=function(){this.opts.indeterminate.current?(this.opts.indeterminate.current=!1,this.opts.checked.current=!0):this.opts.checked.current=!this.opts.checked.current},ku=new WeakMap,Iu=new WeakMap;var Ou,Nu,Ru;class oN{constructor(t){Y(this,"root");F(this,Ou,N(()=>this.root.group?!!(this.root.opts.value.current!==void 0&&this.root.group.opts.value.current.includes(this.root.opts.value.current)):this.root.opts.checked.current));F(this,Nu,N(()=>!!this.root.trueName));F(this,Ru,N(()=>({type:"checkbox",checked:this.root.opts.checked.current===!0,disabled:this.root.trueDisabled,required:this.root.trueRequired,name:this.root.trueName,value:this.root.opts.value.current})));this.root=t}get trueChecked(){return v(A(this,Ou))}get shouldRender(){return v(A(this,Nu))}get props(){return v(A(this,Ru))}}Ou=new WeakMap,Nu=new WeakMap,Ru=new WeakMap;function sN(e,t){return t?"indeterminate":e?"checked":"unchecked"}const aN=new sn("Checkbox.Group"),sw=new sn("Checkbox.Root");function lN(e,t){return sw.set(new iN(e,t))}function cN(){return new oN(sw.get())}var uN=tt("<input>"),dN=tt("<input>");function _p(e,t){ht(t,!0);let n=k(t,"value",15),i=At(t,["$$slots","$$events","$$legacy","value"]);const s=N(()=>Wt(i,{"aria-hidden":"true",tabindex:-1,style:dI}));var a=X(),l=W(a);{var u=f=>{var h=uN();Fc(h);let g;St(()=>g=Lt(h,g,{...v(s),value:n()})),P(f,h)},d=f=>{var h=dN();Fc(h);let g;St(()=>g=Lt(h,g,{...v(s)})),y0(h,n),P(f,h)};_t(l,f=>{v(s).type==="checkbox"?f(u):f(d,!1)})}P(e,a),gt()}function fN(e,t){ht(t,!1);const n=cN();_f();var i=X(),s=W(i);{var a=l=>{_p(l,Rt(()=>n.props))};_t(s,l=>{n.shouldRender&&l(a)})}P(e,i),gt()}var hN=tt("<button><!></button>"),gN=tt("<!> <!>",1);function pN(e,t){ht(t,!0);let n=k(t,"checked",15,!1),i=k(t,"ref",15,null),s=k(t,"disabled",3,!1),a=k(t,"required",3,!1),l=k(t,"name",3,void 0),u=k(t,"value",3,"on"),d=k(t,"id",19,Qt),f=k(t,"indeterminate",15,!1),h=k(t,"type",3,"button"),g=At(t,["$$slots","$$events","$$legacy","checked","ref","onCheckedChange","children","disabled","required","name","value","id","indeterminate","onIndeterminateChange","child","type"]);const m=aN.getOr(null);m&&u()&&(m.opts.value.current.includes(u())?n(!0):n(!1)),ne.pre(()=>u(),()=>{m&&u()&&(m.opts.value.current.includes(u())?n(!0):n(!1))});const b=lN({checked:B.with(()=>n(),M=>{var G;n(M),(G=t.onCheckedChange)==null||G.call(t,M)}),disabled:B.with(()=>s()??!1),required:B.with(()=>a()),name:B.with(()=>l()),value:B.with(()=>u()),id:B.with(()=>d()),ref:B.with(()=>i(),M=>i(M)),indeterminate:B.with(()=>f(),M=>{var G;f(M),(G=t.onIndeterminateChange)==null||G.call(t,M)}),type:B.with(()=>h())},m),_=N(()=>Wt({...g},b.props)),w=Qr(),[x,S]=w;var I=gN(),T=W(I);{var O=M=>{var G=X(),q=W(G),lt=nn(()=>({props:v(_),...b.snippetProps}));at(q,()=>t.child,()=>v(lt)),P(M,G)},D=M=>{var G=hN();let q;var lt=rt(G);at(lt,()=>t.children??Ct,()=>b.snippetProps),nt(G),St(pt=>q=Lt(G,q,{...pt}),[()=>S({...v(_)},[{attribute_name:"formaction"}])]),P(M,G)};_t(T,M=>{t.child?M(O):M(D,!1)})}var L=mt(T,2);fN(L,{}),P(e,I),gt()}const vN="data-collapsible-root",mN="data-collapsible-content",bN="data-collapsible-trigger";var ya,Mu;class _N{constructor(t){Y(this,"opts");F(this,ya,bt(null));F(this,Mu,N(()=>({id:this.opts.id.current,"data-state":Ri(this.opts.open.current),"data-disabled":Yn(this.opts.disabled.current),[vN]:""})));this.opts=t,this.toggleOpen=this.toggleOpen.bind(this),Jt(t)}get contentNode(){return v(A(this,ya))}set contentNode(t){et(A(this,ya),ft(t))}toggleOpen(){this.opts.open.current=!this.opts.open.current}get props(){return v(A(this,Mu))}}ya=new WeakMap,Mu=new WeakMap;var qo,Yo,Xo,Zo,Lu,Du,Fu;class wN{constructor(t,n){Y(this,"opts");Y(this,"root");F(this,qo);F(this,Yo,bt(!1));F(this,Xo,bt(0));F(this,Zo,bt(0));F(this,Lu,N(()=>this.opts.forceMount.current||this.root.opts.open.current));F(this,Du,N(()=>({open:this.root.opts.open.current})));F(this,Fu,N(()=>({id:this.opts.id.current,style:{"--bits-collapsible-content-height":v(A(this,Zo))?`${v(A(this,Zo))}px`:void 0,"--bits-collapsible-content-width":v(A(this,Xo))?`${v(A(this,Xo))}px`:void 0},"data-state":Ri(this.root.opts.open.current),"data-disabled":Yn(this.root.opts.disabled.current),[mN]:""})));this.opts=t,this.root=n,A(this,Yo).v=ft(n.opts.open.current),Jt({...t,deps:()=>this.present,onRefChange:i=>{this.root.contentNode=i}}),bf(()=>{const i=requestAnimationFrame(()=>{et(A(this,Yo),!1)});return()=>{cancelAnimationFrame(i)}}),ne([()=>this.opts.ref.current,()=>this.present],([i])=>{i&&Tn(()=>{if(!this.opts.ref.current)return;ce(this,qo,A(this,qo)||{transitionDuration:i.style.transitionDuration,animationName:i.style.animationName}),i.style.transitionDuration="0s",i.style.animationName="none";const s=i.getBoundingClientRect();if(et(A(this,Zo),ft(s.height)),et(A(this,Xo),ft(s.width)),!v(A(this,Yo))){const{animationName:a,transitionDuration:l}=A(this,qo);i.style.transitionDuration=l,i.style.animationName=a}})})}get present(){return v(A(this,Lu))}get snippetProps(){return v(A(this,Du))}get props(){return v(A(this,Fu))}}qo=new WeakMap,Yo=new WeakMap,Xo=new WeakMap,Zo=new WeakMap,Lu=new WeakMap,Du=new WeakMap,Fu=new WeakMap;var Ji,Bu;class yN{constructor(t,n){Y(this,"opts");Y(this,"root");F(this,Ji,N(()=>this.opts.disabled.current||this.root.opts.disabled.current));F(this,Bu,N(()=>{var t;return{id:this.opts.id.current,type:"button",disabled:v(A(this,Ji)),"aria-controls":(t=this.root.contentNode)==null?void 0:t.id,"aria-expanded":dl(this.root.opts.open.current),"data-state":Ri(this.root.opts.open.current),"data-disabled":Yn(v(A(this,Ji))),[bN]:"",onclick:this.onclick,onkeydown:this.onkeydown}}));this.opts=t,this.root=n,this.onclick=this.onclick.bind(this),this.onkeydown=this.onkeydown.bind(this),Jt(t)}onclick(t){if(!v(A(this,Ji))){if(t.button!==0)return t.preventDefault();this.root.toggleOpen()}}onkeydown(t){v(A(this,Ji))||(t.key===Kr||t.key===Yr)&&(t.preventDefault(),this.root.toggleOpen())}get props(){return v(A(this,Bu))}}Ji=new WeakMap,Bu=new WeakMap;const wp=new sn("Collapsible.Root");function xN(e){return wp.set(new _N(e))}function SN(e){return new yN(e,wp.get())}function AN(e){return new wN(e,wp.get())}var CN=tt("<div><!></div>");function PN(e,t){ht(t,!0);let n=k(t,"id",19,Qt),i=k(t,"ref",15,null),s=k(t,"open",15,!1),a=k(t,"disabled",3,!1),l=k(t,"onOpenChange",3,$t),u=At(t,["$$slots","$$events","$$legacy","children","child","id","ref","open","disabled","onOpenChange"]);const d=xN({open:B.with(()=>s(),_=>{s(_),l()(_)}),disabled:B.with(()=>a()),id:B.with(()=>n()),ref:B.with(()=>i(),_=>i(_))}),f=N(()=>Wt(u,d.props));var h=X(),g=W(h);{var m=_=>{var w=X(),x=W(w);at(x,()=>t.child,()=>({props:v(f)})),P(_,w)},b=_=>{var w=CN();let x;var S=rt(w);at(S,()=>t.children??Ct),nt(w),St(()=>x=Lt(w,x,{...v(f)})),P(_,w)};_t(g,_=>{t.child?_(m):_(b,!1)})}P(e,h),gt()}var EN=tt("<div><!></div>");function TN(e,t){ht(t,!0);let n=k(t,"ref",15,null),i=k(t,"forceMount",3,!1),s=k(t,"id",19,Qt),a=At(t,["$$slots","$$events","$$legacy","child","ref","forceMount","children","id"]);const l=AN({id:B.with(()=>s()),forceMount:B.with(()=>i()),ref:B.with(()=>n(),u=>n(u))});xf(e,{forceMount:!0,get present(){return l.present},get id(){return s()},presence:(d,f)=>{let h=()=>f==null?void 0:f().present;var g=X();const m=N(()=>Wt(a,l.props,{hidden:i()?void 0:!h().current}));var b=W(g);{var _=x=>{var S=X(),I=W(S),T=nn(()=>({...l.snippetProps,props:v(m)}));at(I,()=>t.child,()=>v(T)),P(x,S)},w=x=>{var S=EN();let I;var T=rt(S);at(T,()=>t.children??Ct),nt(S),St(()=>I=Lt(S,I,{...v(m)})),P(x,S)};_t(b,x=>{t.child?x(_):x(w,!1)})}P(d,g)},$$slots:{presence:!0}}),gt()}var kN=tt("<button><!></button>");function IN(e,t){ht(t,!0);let n=k(t,"ref",15,null),i=k(t,"id",19,Qt),s=k(t,"disabled",3,!1),a=At(t,["$$slots","$$events","$$legacy","children","child","ref","id","disabled"]);const l=SN({id:B.with(()=>i()),ref:B.with(()=>n(),w=>n(w)),disabled:B.with(()=>s())}),u=N(()=>Wt(a,l.props)),d=Qr(),[f,h]=d;var g=X(),m=W(g);{var b=w=>{var x=X(),S=W(x);at(S,()=>t.child,()=>({props:v(u)})),P(w,x)},_=w=>{var x=kN();let S;var I=rt(x);at(I,()=>t.children??Ct),nt(x),St(T=>S=Lt(x,S,{...T}),[()=>h({...v(u)},[{attribute_name:"formaction"}])]),P(w,x)};_t(m,w=>{t.child?w(b):w(_,!1)})}P(e,g),gt()}const ON=["top","right","bottom","left"],Ii=Math.min,kn=Math.max,Hc=Math.round,hc=Math.floor,vr=e=>({x:e,y:e}),NN={left:"right",right:"left",bottom:"top",top:"bottom"},RN={start:"end",end:"start"};function kg(e,t,n){return kn(e,Ii(t,n))}function Xr(e,t){return typeof e=="function"?e(t):e}function Zr(e){return e.split("-")[0]}function is(e){return e.split("-")[1]}function yp(e){return e==="x"?"y":"x"}function xp(e){return e==="y"?"height":"width"}function Oi(e){return["top","bottom"].includes(Zr(e))?"y":"x"}function Sp(e){return yp(Oi(e))}function MN(e,t,n){n===void 0&&(n=!1);const i=is(e),s=Sp(e),a=xp(s);let l=s==="x"?i===(n?"end":"start")?"right":"left":i==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(l=Uc(l)),[l,Uc(l)]}function LN(e){const t=Uc(e);return[Ig(e),t,Ig(t)]}function Ig(e){return e.replace(/start|end/g,t=>RN[t])}function DN(e,t,n){const i=["left","right"],s=["right","left"],a=["top","bottom"],l=["bottom","top"];switch(e){case"top":case"bottom":return n?t?s:i:t?i:s;case"left":case"right":return t?a:l;default:return[]}}function FN(e,t,n,i){const s=is(e);let a=DN(Zr(e),n==="start",i);return s&&(a=a.map(l=>l+"-"+s),t&&(a=a.concat(a.map(Ig)))),a}function Uc(e){return e.replace(/left|right|bottom|top/g,t=>NN[t])}function BN(e){return{top:0,right:0,bottom:0,left:0,...e}}function aw(e){return typeof e!="number"?BN(e):{top:e,right:e,bottom:e,left:e}}function Gc(e){const{x:t,y:n,width:i,height:s}=e;return{width:i,height:s,top:n,left:t,right:t+i,bottom:n+s,x:t,y:n}}function e_(e,t,n){let{reference:i,floating:s}=e;const a=Oi(t),l=Sp(t),u=xp(l),d=Zr(t),f=a==="y",h=i.x+i.width/2-s.width/2,g=i.y+i.height/2-s.height/2,m=i[u]/2-s[u]/2;let b;switch(d){case"top":b={x:h,y:i.y-s.height};break;case"bottom":b={x:h,y:i.y+i.height};break;case"right":b={x:i.x+i.width,y:g};break;case"left":b={x:i.x-s.width,y:g};break;default:b={x:i.x,y:i.y}}switch(is(t)){case"start":b[l]-=m*(n&&f?-1:1);break;case"end":b[l]+=m*(n&&f?-1:1);break}return b}const VN=async(e,t,n)=>{const{placement:i="bottom",strategy:s="absolute",middleware:a=[],platform:l}=n,u=a.filter(Boolean),d=await(l.isRTL==null?void 0:l.isRTL(t));let f=await l.getElementRects({reference:e,floating:t,strategy:s}),{x:h,y:g}=e_(f,i,d),m=i,b={},_=0;for(let w=0;w<u.length;w++){const{name:x,fn:S}=u[w],{x:I,y:T,data:O,reset:D}=await S({x:h,y:g,initialPlacement:i,placement:m,strategy:s,middlewareData:b,rects:f,platform:l,elements:{reference:e,floating:t}});h=I??h,g=T??g,b={...b,[x]:{...b[x],...O}},D&&_<=50&&(_++,typeof D=="object"&&(D.placement&&(m=D.placement),D.rects&&(f=D.rects===!0?await l.getElementRects({reference:e,floating:t,strategy:s}):D.rects),{x:h,y:g}=e_(f,m,d)),w=-1)}return{x:h,y:g,placement:m,strategy:s,middlewareData:b}};async function qs(e,t){var n;t===void 0&&(t={});const{x:i,y:s,platform:a,rects:l,elements:u,strategy:d}=e,{boundary:f="clippingAncestors",rootBoundary:h="viewport",elementContext:g="floating",altBoundary:m=!1,padding:b=0}=Xr(t,e),_=aw(b),x=u[m?g==="floating"?"reference":"floating":g],S=Gc(await a.getClippingRect({element:(n=await(a.isElement==null?void 0:a.isElement(x)))==null||n?x:x.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(u.floating)),boundary:f,rootBoundary:h,strategy:d})),I=g==="floating"?{x:i,y:s,width:l.floating.width,height:l.floating.height}:l.reference,T=await(a.getOffsetParent==null?void 0:a.getOffsetParent(u.floating)),O=await(a.isElement==null?void 0:a.isElement(T))?await(a.getScale==null?void 0:a.getScale(T))||{x:1,y:1}:{x:1,y:1},D=Gc(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:u,rect:I,offsetParent:T,strategy:d}):I);return{top:(S.top-D.top+_.top)/O.y,bottom:(D.bottom-S.bottom+_.bottom)/O.y,left:(S.left-D.left+_.left)/O.x,right:(D.right-S.right+_.right)/O.x}}const WN=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:i,placement:s,rects:a,platform:l,elements:u,middlewareData:d}=t,{element:f,padding:h=0}=Xr(e,t)||{};if(f==null)return{};const g=aw(h),m={x:n,y:i},b=Sp(s),_=xp(b),w=await l.getDimensions(f),x=b==="y",S=x?"top":"left",I=x?"bottom":"right",T=x?"clientHeight":"clientWidth",O=a.reference[_]+a.reference[b]-m[b]-a.floating[_],D=m[b]-a.reference[b],L=await(l.getOffsetParent==null?void 0:l.getOffsetParent(f));let M=L?L[T]:0;(!M||!await(l.isElement==null?void 0:l.isElement(L)))&&(M=u.floating[T]||a.floating[_]);const G=O/2-D/2,q=M/2-w[_]/2-1,lt=Ii(g[S],q),pt=Ii(g[I],q),z=lt,$=M-w[_]-pt,H=M/2-w[_]/2+G,J=kg(z,H,$),Q=!d.arrow&&is(s)!=null&&H!==J&&a.reference[_]/2-(H<z?lt:pt)-w[_]/2<0,ot=Q?H<z?H-z:H-$:0;return{[b]:m[b]+ot,data:{[b]:J,centerOffset:H-J-ot,...Q&&{alignmentOffset:ot}},reset:Q}}}),zN=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,i;const{placement:s,middlewareData:a,rects:l,initialPlacement:u,platform:d,elements:f}=t,{mainAxis:h=!0,crossAxis:g=!0,fallbackPlacements:m,fallbackStrategy:b="bestFit",fallbackAxisSideDirection:_="none",flipAlignment:w=!0,...x}=Xr(e,t);if((n=a.arrow)!=null&&n.alignmentOffset)return{};const S=Zr(s),I=Oi(u),T=Zr(u)===u,O=await(d.isRTL==null?void 0:d.isRTL(f.floating)),D=m||(T||!w?[Uc(u)]:LN(u)),L=_!=="none";!m&&L&&D.push(...FN(u,w,_,O));const M=[u,...D],G=await qs(t,x),q=[];let lt=((i=a.flip)==null?void 0:i.overflows)||[];if(h&&q.push(G[S]),g){const H=MN(s,l,O);q.push(G[H[0]],G[H[1]])}if(lt=[...lt,{placement:s,overflows:q}],!q.every(H=>H<=0)){var pt,z;const H=(((pt=a.flip)==null?void 0:pt.index)||0)+1,J=M[H];if(J)return{data:{index:H,overflows:lt},reset:{placement:J}};let Q=(z=lt.filter(ot=>ot.overflows[0]<=0).sort((ot,Z)=>ot.overflows[1]-Z.overflows[1])[0])==null?void 0:z.placement;if(!Q)switch(b){case"bestFit":{var $;const ot=($=lt.filter(Z=>{if(L){const ct=Oi(Z.placement);return ct===I||ct==="y"}return!0}).map(Z=>[Z.placement,Z.overflows.filter(ct=>ct>0).reduce((ct,wt)=>ct+wt,0)]).sort((Z,ct)=>Z[1]-ct[1])[0])==null?void 0:$[0];ot&&(Q=ot);break}case"initialPlacement":Q=u;break}if(s!==Q)return{reset:{placement:Q}}}return{}}}};function n_(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function r_(e){return ON.some(t=>e[t]>=0)}const HN=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:i="referenceHidden",...s}=Xr(e,t);switch(i){case"referenceHidden":{const a=await qs(t,{...s,elementContext:"reference"}),l=n_(a,n.reference);return{data:{referenceHiddenOffsets:l,referenceHidden:r_(l)}}}case"escaped":{const a=await qs(t,{...s,altBoundary:!0}),l=n_(a,n.floating);return{data:{escapedOffsets:l,escaped:r_(l)}}}default:return{}}}}};async function UN(e,t){const{placement:n,platform:i,elements:s}=e,a=await(i.isRTL==null?void 0:i.isRTL(s.floating)),l=Zr(n),u=is(n),d=Oi(n)==="y",f=["left","top"].includes(l)?-1:1,h=a&&d?-1:1,g=Xr(t,e);let{mainAxis:m,crossAxis:b,alignmentAxis:_}=typeof g=="number"?{mainAxis:g,crossAxis:0,alignmentAxis:null}:{mainAxis:g.mainAxis||0,crossAxis:g.crossAxis||0,alignmentAxis:g.alignmentAxis};return u&&typeof _=="number"&&(b=u==="end"?_*-1:_),d?{x:b*h,y:m*f}:{x:m*f,y:b*h}}const GN=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,i;const{x:s,y:a,placement:l,middlewareData:u}=t,d=await UN(t,e);return l===((n=u.offset)==null?void 0:n.placement)&&(i=u.arrow)!=null&&i.alignmentOffset?{}:{x:s+d.x,y:a+d.y,data:{...d,placement:l}}}}},KN=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:i,placement:s}=t,{mainAxis:a=!0,crossAxis:l=!1,limiter:u={fn:x=>{let{x:S,y:I}=x;return{x:S,y:I}}},...d}=Xr(e,t),f={x:n,y:i},h=await qs(t,d),g=Oi(Zr(s)),m=yp(g);let b=f[m],_=f[g];if(a){const x=m==="y"?"top":"left",S=m==="y"?"bottom":"right",I=b+h[x],T=b-h[S];b=kg(I,b,T)}if(l){const x=g==="y"?"top":"left",S=g==="y"?"bottom":"right",I=_+h[x],T=_-h[S];_=kg(I,_,T)}const w=u.fn({...t,[m]:b,[g]:_});return{...w,data:{x:w.x-n,y:w.y-i,enabled:{[m]:a,[g]:l}}}}}},qN=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:i,placement:s,rects:a,middlewareData:l}=t,{offset:u=0,mainAxis:d=!0,crossAxis:f=!0}=Xr(e,t),h={x:n,y:i},g=Oi(s),m=yp(g);let b=h[m],_=h[g];const w=Xr(u,t),x=typeof w=="number"?{mainAxis:w,crossAxis:0}:{mainAxis:0,crossAxis:0,...w};if(d){const T=m==="y"?"height":"width",O=a.reference[m]-a.floating[T]+x.mainAxis,D=a.reference[m]+a.reference[T]-x.mainAxis;b<O?b=O:b>D&&(b=D)}if(f){var S,I;const T=m==="y"?"width":"height",O=["top","left"].includes(Zr(s)),D=a.reference[g]-a.floating[T]+(O&&((S=l.offset)==null?void 0:S[g])||0)+(O?0:x.crossAxis),L=a.reference[g]+a.reference[T]+(O?0:((I=l.offset)==null?void 0:I[g])||0)-(O?x.crossAxis:0);_<D?_=D:_>L&&(_=L)}return{[m]:b,[g]:_}}}},YN=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,i;const{placement:s,rects:a,platform:l,elements:u}=t,{apply:d=()=>{},...f}=Xr(e,t),h=await qs(t,f),g=Zr(s),m=is(s),b=Oi(s)==="y",{width:_,height:w}=a.floating;let x,S;g==="top"||g==="bottom"?(x=g,S=m===(await(l.isRTL==null?void 0:l.isRTL(u.floating))?"start":"end")?"left":"right"):(S=g,x=m==="end"?"top":"bottom");const I=w-h.top-h.bottom,T=_-h.left-h.right,O=Ii(w-h[x],I),D=Ii(_-h[S],T),L=!t.middlewareData.shift;let M=O,G=D;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(G=T),(i=t.middlewareData.shift)!=null&&i.enabled.y&&(M=I),L&&!m){const lt=kn(h.left,0),pt=kn(h.right,0),z=kn(h.top,0),$=kn(h.bottom,0);b?G=_-2*(lt!==0||pt!==0?lt+pt:kn(h.left,h.right)):M=w-2*(z!==0||$!==0?z+$:kn(h.top,h.bottom))}await d({...t,availableWidth:G,availableHeight:M});const q=await l.getDimensions(u.floating);return _!==q.width||w!==q.height?{reset:{rects:!0}}:{}}}};function Sf(){return typeof window<"u"}function os(e){return lw(e)?(e.nodeName||"").toLowerCase():"#document"}function Nn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function yr(e){var t;return(t=(lw(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function lw(e){return Sf()?e instanceof Node||e instanceof Nn(e).Node:!1}function er(e){return Sf()?e instanceof Element||e instanceof Nn(e).Element:!1}function _r(e){return Sf()?e instanceof HTMLElement||e instanceof Nn(e).HTMLElement:!1}function i_(e){return!Sf()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Nn(e).ShadowRoot}function pl(e){const{overflow:t,overflowX:n,overflowY:i,display:s}=nr(e);return/auto|scroll|overlay|hidden|clip/.test(t+i+n)&&!["inline","contents"].includes(s)}function XN(e){return["table","td","th"].includes(os(e))}function Af(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function Ap(e){const t=Cp(),n=er(e)?nr(e):e;return["transform","translate","scale","rotate","perspective"].some(i=>n[i]?n[i]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||["transform","translate","scale","rotate","perspective","filter"].some(i=>(n.willChange||"").includes(i))||["paint","layout","strict","content"].some(i=>(n.contain||"").includes(i))}function ZN(e){let t=Ni(e);for(;_r(t)&&!$o(t);){if(Ap(t))return t;if(Af(t))return null;t=Ni(t)}return null}function Cp(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function $o(e){return["html","body","#document"].includes(os(e))}function nr(e){return Nn(e).getComputedStyle(e)}function Cf(e){return er(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ni(e){if(os(e)==="html")return e;const t=e.assignedSlot||e.parentNode||i_(e)&&e.host||yr(e);return i_(t)?t.host:t}function cw(e){const t=Ni(e);return $o(t)?e.ownerDocument?e.ownerDocument.body:e.body:_r(t)&&pl(t)?t:cw(t)}function Ys(e,t,n){var i;t===void 0&&(t=[]),n===void 0&&(n=!0);const s=cw(e),a=s===((i=e.ownerDocument)==null?void 0:i.body),l=Nn(s);if(a){const u=Og(l);return t.concat(l,l.visualViewport||[],pl(s)?s:[],u&&n?Ys(u):[])}return t.concat(s,Ys(s,[],n))}function Og(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function uw(e){const t=nr(e);let n=parseFloat(t.width)||0,i=parseFloat(t.height)||0;const s=_r(e),a=s?e.offsetWidth:n,l=s?e.offsetHeight:i,u=Hc(n)!==a||Hc(i)!==l;return u&&(n=a,i=l),{width:n,height:i,$:u}}function Pp(e){return er(e)?e:e.contextElement}function Ro(e){const t=Pp(e);if(!_r(t))return vr(1);const n=t.getBoundingClientRect(),{width:i,height:s,$:a}=uw(t);let l=(a?Hc(n.width):n.width)/i,u=(a?Hc(n.height):n.height)/s;return(!l||!Number.isFinite(l))&&(l=1),(!u||!Number.isFinite(u))&&(u=1),{x:l,y:u}}const JN=vr(0);function dw(e){const t=Nn(e);return!Cp()||!t.visualViewport?JN:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function QN(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Nn(e)?!1:t}function ro(e,t,n,i){t===void 0&&(t=!1),n===void 0&&(n=!1);const s=e.getBoundingClientRect(),a=Pp(e);let l=vr(1);t&&(i?er(i)&&(l=Ro(i)):l=Ro(e));const u=QN(a,n,i)?dw(a):vr(0);let d=(s.left+u.x)/l.x,f=(s.top+u.y)/l.y,h=s.width/l.x,g=s.height/l.y;if(a){const m=Nn(a),b=i&&er(i)?Nn(i):i;let _=m,w=Og(_);for(;w&&i&&b!==_;){const x=Ro(w),S=w.getBoundingClientRect(),I=nr(w),T=S.left+(w.clientLeft+parseFloat(I.paddingLeft))*x.x,O=S.top+(w.clientTop+parseFloat(I.paddingTop))*x.y;d*=x.x,f*=x.y,h*=x.x,g*=x.y,d+=T,f+=O,_=Nn(w),w=Og(_)}}return Gc({width:h,height:g,x:d,y:f})}function Ep(e,t){const n=Cf(e).scrollLeft;return t?t.left+n:ro(yr(e)).left+n}function fw(e,t,n){n===void 0&&(n=!1);const i=e.getBoundingClientRect(),s=i.left+t.scrollLeft-(n?0:Ep(e,i)),a=i.top+t.scrollTop;return{x:s,y:a}}function jN(e){let{elements:t,rect:n,offsetParent:i,strategy:s}=e;const a=s==="fixed",l=yr(i),u=t?Af(t.floating):!1;if(i===l||u&&a)return n;let d={scrollLeft:0,scrollTop:0},f=vr(1);const h=vr(0),g=_r(i);if((g||!g&&!a)&&((os(i)!=="body"||pl(l))&&(d=Cf(i)),_r(i))){const b=ro(i);f=Ro(i),h.x=b.x+i.clientLeft,h.y=b.y+i.clientTop}const m=l&&!g&&!a?fw(l,d,!0):vr(0);return{width:n.width*f.x,height:n.height*f.y,x:n.x*f.x-d.scrollLeft*f.x+h.x+m.x,y:n.y*f.y-d.scrollTop*f.y+h.y+m.y}}function $N(e){return Array.from(e.getClientRects())}function tR(e){const t=yr(e),n=Cf(e),i=e.ownerDocument.body,s=kn(t.scrollWidth,t.clientWidth,i.scrollWidth,i.clientWidth),a=kn(t.scrollHeight,t.clientHeight,i.scrollHeight,i.clientHeight);let l=-n.scrollLeft+Ep(e);const u=-n.scrollTop;return nr(i).direction==="rtl"&&(l+=kn(t.clientWidth,i.clientWidth)-s),{width:s,height:a,x:l,y:u}}function eR(e,t){const n=Nn(e),i=yr(e),s=n.visualViewport;let a=i.clientWidth,l=i.clientHeight,u=0,d=0;if(s){a=s.width,l=s.height;const f=Cp();(!f||f&&t==="fixed")&&(u=s.offsetLeft,d=s.offsetTop)}return{width:a,height:l,x:u,y:d}}function nR(e,t){const n=ro(e,!0,t==="fixed"),i=n.top+e.clientTop,s=n.left+e.clientLeft,a=_r(e)?Ro(e):vr(1),l=e.clientWidth*a.x,u=e.clientHeight*a.y,d=s*a.x,f=i*a.y;return{width:l,height:u,x:d,y:f}}function o_(e,t,n){let i;if(t==="viewport")i=eR(e,n);else if(t==="document")i=tR(yr(e));else if(er(t))i=nR(t,n);else{const s=dw(e);i={x:t.x-s.x,y:t.y-s.y,width:t.width,height:t.height}}return Gc(i)}function hw(e,t){const n=Ni(e);return n===t||!er(n)||$o(n)?!1:nr(n).position==="fixed"||hw(n,t)}function rR(e,t){const n=t.get(e);if(n)return n;let i=Ys(e,[],!1).filter(u=>er(u)&&os(u)!=="body"),s=null;const a=nr(e).position==="fixed";let l=a?Ni(e):e;for(;er(l)&&!$o(l);){const u=nr(l),d=Ap(l);!d&&u.position==="fixed"&&(s=null),(a?!d&&!s:!d&&u.position==="static"&&!!s&&["absolute","fixed"].includes(s.position)||pl(l)&&!d&&hw(e,l))?i=i.filter(h=>h!==l):s=u,l=Ni(l)}return t.set(e,i),i}function iR(e){let{element:t,boundary:n,rootBoundary:i,strategy:s}=e;const l=[...n==="clippingAncestors"?Af(t)?[]:rR(t,this._c):[].concat(n),i],u=l[0],d=l.reduce((f,h)=>{const g=o_(t,h,s);return f.top=kn(g.top,f.top),f.right=Ii(g.right,f.right),f.bottom=Ii(g.bottom,f.bottom),f.left=kn(g.left,f.left),f},o_(t,u,s));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function oR(e){const{width:t,height:n}=uw(e);return{width:t,height:n}}function sR(e,t,n){const i=_r(t),s=yr(t),a=n==="fixed",l=ro(e,!0,a,t);let u={scrollLeft:0,scrollTop:0};const d=vr(0);if(i||!i&&!a)if((os(t)!=="body"||pl(s))&&(u=Cf(t)),i){const m=ro(t,!0,a,t);d.x=m.x+t.clientLeft,d.y=m.y+t.clientTop}else s&&(d.x=Ep(s));const f=s&&!i&&!a?fw(s,u):vr(0),h=l.left+u.scrollLeft-d.x-f.x,g=l.top+u.scrollTop-d.y-f.y;return{x:h,y:g,width:l.width,height:l.height}}function Qh(e){return nr(e).position==="static"}function s_(e,t){if(!_r(e)||nr(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return yr(e)===n&&(n=n.ownerDocument.body),n}function gw(e,t){const n=Nn(e);if(Af(e))return n;if(!_r(e)){let s=Ni(e);for(;s&&!$o(s);){if(er(s)&&!Qh(s))return s;s=Ni(s)}return n}let i=s_(e,t);for(;i&&XN(i)&&Qh(i);)i=s_(i,t);return i&&$o(i)&&Qh(i)&&!Ap(i)?n:i||ZN(e)||n}const aR=async function(e){const t=this.getOffsetParent||gw,n=this.getDimensions,i=await n(e.floating);return{reference:sR(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function lR(e){return nr(e).direction==="rtl"}const cR={convertOffsetParentRelativeRectToViewportRelativeRect:jN,getDocumentElement:yr,getClippingRect:iR,getOffsetParent:gw,getElementRects:aR,getClientRects:$N,getDimensions:oR,getScale:Ro,isElement:er,isRTL:lR};function pw(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function uR(e,t){let n=null,i;const s=yr(e);function a(){var u;clearTimeout(i),(u=n)==null||u.disconnect(),n=null}function l(u,d){u===void 0&&(u=!1),d===void 0&&(d=1),a();const f=e.getBoundingClientRect(),{left:h,top:g,width:m,height:b}=f;if(u||t(),!m||!b)return;const _=hc(g),w=hc(s.clientWidth-(h+m)),x=hc(s.clientHeight-(g+b)),S=hc(h),T={rootMargin:-_+"px "+-w+"px "+-x+"px "+-S+"px",threshold:kn(0,Ii(1,d))||1};let O=!0;function D(L){const M=L[0].intersectionRatio;if(M!==d){if(!O)return l();M?l(!1,M):i=setTimeout(()=>{l(!1,1e-7)},1e3)}M===1&&!pw(f,e.getBoundingClientRect())&&l(),O=!1}try{n=new IntersectionObserver(D,{...T,root:s.ownerDocument})}catch{n=new IntersectionObserver(D,T)}n.observe(e)}return l(!0),a}function dR(e,t,n,i){i===void 0&&(i={});const{ancestorScroll:s=!0,ancestorResize:a=!0,elementResize:l=typeof ResizeObserver=="function",layoutShift:u=typeof IntersectionObserver=="function",animationFrame:d=!1}=i,f=Pp(e),h=s||a?[...f?Ys(f):[],...Ys(t)]:[];h.forEach(S=>{s&&S.addEventListener("scroll",n,{passive:!0}),a&&S.addEventListener("resize",n)});const g=f&&u?uR(f,n):null;let m=-1,b=null;l&&(b=new ResizeObserver(S=>{let[I]=S;I&&I.target===f&&b&&(b.unobserve(t),cancelAnimationFrame(m),m=requestAnimationFrame(()=>{var T;(T=b)==null||T.observe(t)})),n()}),f&&!d&&b.observe(f),b.observe(t));let _,w=d?ro(e):null;d&&x();function x(){const S=ro(e);w&&!pw(w,S)&&n(),w=S,_=requestAnimationFrame(x)}return n(),()=>{var S;h.forEach(I=>{s&&I.removeEventListener("scroll",n),a&&I.removeEventListener("resize",n)}),g==null||g(),(S=b)==null||S.disconnect(),b=null,d&&cancelAnimationFrame(_)}}const fR=GN,hR=KN,gR=zN,pR=YN,vR=HN,mR=WN,bR=qN,_R=(e,t,n)=>{const i=new Map,s={platform:cR,...n},a={...s.platform,_c:i};return VN(e,t,{...s,platform:a})};function Cs(e){return typeof e=="function"?e():e}function vw(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function a_(e,t){const n=vw(e);return Math.round(t*n)/n}function l_(e){return{[`--bits-${e}-content-transform-origin`]:"var(--bits-floating-transform-origin)",[`--bits-${e}-content-available-width`]:"var(--bits-floating-available-width)",[`--bits-${e}-content-available-height`]:"var(--bits-floating-available-height)",[`--bits-${e}-anchor-width`]:"var(--bits-floating-anchor-width)",[`--bits-${e}-anchor-height`]:"var(--bits-floating-anchor-height)"}}function wR(e){const t=e.whileElementsMounted,n=N(()=>Cs(e.open)??!0),i=N(()=>Cs(e.middleware)),s=N(()=>Cs(e.transform)??!0),a=N(()=>Cs(e.placement)??"bottom"),l=N(()=>Cs(e.strategy)??"absolute"),u=e.reference;let d=bt(0),f=bt(0);const h=B(null);let g=bt(ft(v(l))),m=bt(ft(v(a))),b=bt(ft({})),_=bt(!1);const w=N(()=>{const D={position:v(g),left:"0",top:"0"};if(!h.current)return D;const L=a_(h.current,v(d)),M=a_(h.current,v(f));return v(s)?{...D,transform:`translate(${L}px, ${M}px)`,...vw(h.current)>=1.5&&{willChange:"transform"}}:{position:v(g),left:`${L}px`,top:`${M}px`}});let x;function S(){u.current===null||h.current===null||_R(u.current,h.current,{middleware:v(i),placement:v(a),strategy:v(l)}).then(D=>{et(d,ft(D.x)),et(f,ft(D.y)),et(g,ft(D.strategy)),et(m,ft(D.placement)),et(b,ft(D.middlewareData)),et(_,!0)})}function I(){typeof x=="function"&&(x(),x=void 0)}function T(){if(I(),t===void 0){S();return}u.current===null||h.current===null||(x=t(u.current,h.current,S))}function O(){v(n)||et(_,!1)}return xe(S),xe(T),xe(O),xe(()=>I),{floating:h,reference:u,get strategy(){return v(g)},get placement(){return v(m)},get middlewareData(){return v(b)},get isPositioned(){return v(_)},get floatingStyles(){return v(w)},get update(){return S}}}const yR={top:"bottom",right:"left",bottom:"top",left:"right"};class xR{constructor(){Y(this,"anchorNode",B(null));Y(this,"customAnchorNode",B(null));Y(this,"triggerNode",B(null));xe(()=>{this.customAnchorNode.current?typeof this.customAnchorNode.current=="string"?this.anchorNode.current=document.querySelector(this.customAnchorNode.current):this.anchorNode.current=this.customAnchorNode.current:this.anchorNode.current=this.triggerNode.current})}}var xa,Vu,Sa,Wu,Aa,zu,Ca,Hu,Uu,Pa,Ea,Ta,ka,Gu,Ku,qu,Yu,Xu,Zu,Ia,Ju,Qu,ju,$u;class SR{constructor(t,n){Y(this,"opts");Y(this,"root");Y(this,"contentRef",B(null));Y(this,"wrapperRef",B(null));Y(this,"arrowRef",B(null));Y(this,"arrowId",B(Qt()));F(this,xa,N(()=>{if(typeof this.opts.style=="string")return Rs(this.opts.style);if(!this.opts.style)return{}}));F(this,Vu);F(this,Sa,new _I(()=>this.arrowRef.current??void 0));F(this,Wu,N(()=>{var t;return((t=A(this,Sa))==null?void 0:t.width)??0}));F(this,Aa,N(()=>{var t;return((t=A(this,Sa))==null?void 0:t.height)??0}));F(this,zu,N(()=>{var t;return((t=this.opts.side)==null?void 0:t.current)+(this.opts.align.current!=="center"?`-${this.opts.align.current}`:"")}));F(this,Ca,N(()=>Array.isArray(this.opts.collisionBoundary.current)?this.opts.collisionBoundary.current:[this.opts.collisionBoundary.current]));F(this,Hu,N(()=>v(A(this,Ca)).length>0));F(this,Uu,N(()=>({padding:this.opts.collisionPadding.current,boundary:v(A(this,Ca)).filter(NI),altBoundary:this.hasExplicitBoundaries})));F(this,Pa,bt(void 0));F(this,Ea,bt(void 0));F(this,Ta,bt(void 0));F(this,ka,bt(void 0));F(this,Gu,N(()=>[fR({mainAxis:this.opts.sideOffset.current+v(A(this,Aa)),alignmentAxis:this.opts.alignOffset.current}),this.opts.avoidCollisions.current&&hR({mainAxis:!0,crossAxis:!1,limiter:this.opts.sticky.current==="partial"?bR():void 0,...this.detectOverflowOptions}),this.opts.avoidCollisions.current&&gR({...this.detectOverflowOptions}),pR({...this.detectOverflowOptions,apply:({rects:t,availableWidth:n,availableHeight:i})=>{const{width:s,height:a}=t.reference;et(A(this,Pa),ft(n)),et(A(this,Ea),ft(i)),et(A(this,Ta),ft(s)),et(A(this,ka),ft(a))}}),this.arrowRef.current&&mR({element:this.arrowRef.current,padding:this.opts.arrowPadding.current}),kR({arrowWidth:v(A(this,Wu)),arrowHeight:v(A(this,Aa))}),this.opts.hideWhenDetached.current&&vR({strategy:"referenceHidden",...this.detectOverflowOptions})].filter(Boolean)));Y(this,"floating");F(this,Ku,N(()=>IR(this.floating.placement)));F(this,qu,N(()=>OR(this.floating.placement)));F(this,Yu,N(()=>{var t;return((t=this.floating.middlewareData.arrow)==null?void 0:t.x)??0}));F(this,Xu,N(()=>{var t;return((t=this.floating.middlewareData.arrow)==null?void 0:t.y)??0}));F(this,Zu,N(()=>{var t;return((t=this.floating.middlewareData.arrow)==null?void 0:t.centerOffset)!==0}));F(this,Ia,bt());F(this,Ju,N(()=>yR[this.placedSide]));F(this,Qu,N(()=>{var t,n,i;return{id:this.opts.wrapperId.current,"data-bits-floating-content-wrapper":"",style:{...this.floating.floatingStyles,transform:this.floating.isPositioned?this.floating.floatingStyles.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:this.contentZIndex,"--bits-floating-transform-origin":`${(t=this.floating.middlewareData.transformOrigin)==null?void 0:t.x} ${(n=this.floating.middlewareData.transformOrigin)==null?void 0:n.y}`,"--bits-floating-available-width":`${v(A(this,Pa))}px`,"--bits-floating-available-height":`${v(A(this,Ea))}px`,"--bits-floating-anchor-width":`${v(A(this,Ta))}px`,"--bits-floating-anchor-height":`${v(A(this,ka))}px`,...((i=this.floating.middlewareData.hide)==null?void 0:i.referenceHidden)&&{visibility:"hidden","pointer-events":"none"},...v(A(this,xa))},dir:this.opts.dir.current}}));F(this,ju,N(()=>({"data-side":this.placedSide,"data-align":this.placedAlign,style:fp({...v(A(this,xa))})})));F(this,$u,N(()=>({position:"absolute",left:this.arrowX?`${this.arrowX}px`:void 0,top:this.arrowY?`${this.arrowY}px`:void 0,[this.arrowBaseSide]:0,"transform-origin":{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[this.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[this.placedSide],visibility:this.cannotCenterArrow?"hidden":void 0})));this.opts=t,this.root=n,t.customAnchor&&(this.root.customAnchorNode.current=t.customAnchor.current),ne(()=>t.customAnchor.current,i=>{this.root.customAnchorNode.current=i}),Jt({id:this.opts.wrapperId,ref:this.wrapperRef,deps:()=>this.opts.enabled.current}),Jt({id:this.opts.id,ref:this.contentRef,deps:()=>this.opts.enabled.current}),this.floating=wR({strategy:()=>this.opts.strategy.current,placement:()=>v(A(this,zu)),middleware:()=>this.middleware,reference:this.root.anchorNode,whileElementsMounted:(...i)=>{var a;return dR(...i,{animationFrame:((a=A(this,Vu))==null?void 0:a.current)==="always"})},open:()=>this.opts.enabled.current}),xe(()=>{var i;this.floating.isPositioned&&((i=this.opts.onPlaced)==null||i.current())}),ne(()=>this.contentRef.current,i=>{i&&(this.contentZIndex=window.getComputedStyle(i).zIndex)}),xe(()=>{this.floating.floating.current=this.wrapperRef.current})}get hasExplicitBoundaries(){return v(A(this,Hu))}get detectOverflowOptions(){return v(A(this,Uu))}get middleware(){return v(A(this,Gu))}get placedSide(){return v(A(this,Ku))}get placedAlign(){return v(A(this,qu))}get arrowX(){return v(A(this,Yu))}get arrowY(){return v(A(this,Xu))}get cannotCenterArrow(){return v(A(this,Zu))}get contentZIndex(){return v(A(this,Ia))}set contentZIndex(t){et(A(this,Ia),ft(t))}get arrowBaseSide(){return v(A(this,Ju))}get wrapperProps(){return v(A(this,Qu))}get props(){return v(A(this,ju))}get arrowStyle(){return v(A(this,$u))}}xa=new WeakMap,Vu=new WeakMap,Sa=new WeakMap,Wu=new WeakMap,Aa=new WeakMap,zu=new WeakMap,Ca=new WeakMap,Hu=new WeakMap,Uu=new WeakMap,Pa=new WeakMap,Ea=new WeakMap,Ta=new WeakMap,ka=new WeakMap,Gu=new WeakMap,Ku=new WeakMap,qu=new WeakMap,Yu=new WeakMap,Xu=new WeakMap,Zu=new WeakMap,Ia=new WeakMap,Ju=new WeakMap,Qu=new WeakMap,ju=new WeakMap,$u=new WeakMap;class AR{constructor(t,n){Y(this,"opts");Y(this,"root");Y(this,"ref",B(null));this.opts=t,this.root=n,t.virtualEl&&t.virtualEl.current?n.triggerNode=B.from(t.virtualEl.current):Jt({id:t.id,ref:this.ref,onRefChange:i=>{n.triggerNode.current=i}})}}const Tp=new sn("Floating.Root"),CR=new sn("Floating.Content");function PR(){return Tp.set(new xR)}function ER(e){return CR.set(new SR(e,Tp.get()))}function TR(e){return new AR(e,Tp.get())}function kR(e){return{name:"transformOrigin",options:e,fn(t){var x,S,I;const{placement:n,rects:i,middlewareData:s}=t,l=((x=s.arrow)==null?void 0:x.centerOffset)!==0,u=l?0:e.arrowWidth,d=l?0:e.arrowHeight,[f,h]=kp(n),g={start:"0%",center:"50%",end:"100%"}[h],m=(((S=s.arrow)==null?void 0:S.x)??0)+u/2,b=(((I=s.arrow)==null?void 0:I.y)??0)+d/2;let _="",w="";return f==="bottom"?(_=l?g:`${m}px`,w=`${-d}px`):f==="top"?(_=l?g:`${m}px`,w=`${i.floating.height+d}px`):f==="right"?(_=`${-d}px`,w=l?g:`${b}px`):f==="left"&&(_=`${i.floating.width+d}px`,w=l?g:`${b}px`),{data:{x:_,y:w}}}}}function kp(e){const[t,n="center"]=e.split("-");return[t,n]}function IR(e){return kp(e)[0]}function OR(e){return kp(e)[1]}function mw(e,t){ht(t,!0),PR();var n=X(),i=W(n);at(i,()=>t.children??Ct),P(e,n),gt()}function bw(e,t=1e4,n=$t){let i=null,s=bt(ft(e));function a(){return window.setTimeout(()=>{et(s,ft(e)),n(e)},t)}return xe(()=>()=>{i&&clearTimeout(i)}),B.with(()=>v(s),l=>{et(s,ft(l)),n(l),i&&clearTimeout(i),i=a()})}function NR(e){const t=bw("",1e3),n=(e==null?void 0:e.onMatch)??(l=>l.focus()),i=(e==null?void 0:e.getCurrentItem)??(()=>document.activeElement);function s(l,u){var b,_;if(!u.length)return;t.current=t.current+l;const d=i(),f=((_=(b=u.find(w=>w===d))==null?void 0:b.textContent)==null?void 0:_.trim())??"",h=u.map(w=>{var x;return((x=w.textContent)==null?void 0:x.trim())??""}),g=bp(h,t.current,f),m=u.find(w=>{var x;return((x=w.textContent)==null?void 0:x.trim())===g});return m&&n(m),m}function a(){t.current=""}return{search:t,handleTypeaheadSearch:s,resetTypeahead:a}}function RR(e){const t=bw("",1e3),n=N(()=>e.candidateValues());function i(a){if(!e.enabled||!v(n).length)return;t.current=t.current+a;const l=e.getCurrentItem(),u=v(n).find(g=>g===l)??"",d=v(n).map(g=>g??""),f=bp(d,t.current,u),h=v(n).find(g=>g===f);return h&&e.onMatch(h),h}function s(){t.current=""}return{search:t,handleTypeaheadSearch:i,resetTypeahead:s}}const MR=[Ci,U0,hl],LR=[Ur,H0,fl],DR=[...MR,...LR];var Oa,Na,Ra,Ma,La,Da,Fa,td,ed,nd;class _w{constructor(t){Y(this,"opts");F(this,Oa,bt(!1));F(this,Na,bt(""));F(this,Ra,bt(null));F(this,Ma,bt(null));F(this,La,bt(null));F(this,Da,bt(""));F(this,Fa,bt(null));F(this,td,N(()=>this.highlightedNode?this.highlightedNode.getAttribute("data-value"):null));F(this,ed,N(()=>{if(this.highlightedNode)return this.highlightedNode.id}));F(this,nd,N(()=>this.highlightedNode?this.highlightedNode.getAttribute("data-label"):null));Y(this,"isUsingKeyboard",!1);Y(this,"isCombobox",!1);Y(this,"bitsAttrs");this.opts=t,this.isCombobox=t.isCombobox,this.bitsAttrs=oM(this),bf(()=>{this.opts.open.current||this.setHighlightedNode(null)})}get touchedInput(){return v(A(this,Oa))}set touchedInput(t){et(A(this,Oa),ft(t))}get inputValue(){return v(A(this,Na))}set inputValue(t){et(A(this,Na),ft(t))}get inputNode(){return v(A(this,Ra))}set inputNode(t){et(A(this,Ra),ft(t))}get contentNode(){return v(A(this,Ma))}set contentNode(t){et(A(this,Ma),ft(t))}get triggerNode(){return v(A(this,La))}set triggerNode(t){et(A(this,La),ft(t))}get valueId(){return v(A(this,Da))}set valueId(t){et(A(this,Da),ft(t))}get highlightedNode(){return v(A(this,Fa))}set highlightedNode(t){et(A(this,Fa),ft(t))}get highlightedValue(){return v(A(this,td))}get highlightedId(){return v(A(this,ed))}get highlightedLabel(){return v(A(this,nd))}setHighlightedNode(t,n=!1){this.highlightedNode=t,t&&(this.isUsingKeyboard||n)&&t.scrollIntoView({block:this.opts.scrollAlignment.current})}getCandidateNodes(){const t=this.contentNode;return t?Array.from(t.querySelectorAll(`[${this.bitsAttrs.item}]:not([data-disabled])`)):[]}setHighlightedToFirstCandidate(){this.setHighlightedNode(null);const t=this.getCandidateNodes();t.length&&this.setHighlightedNode(t[0])}getNodeByValue(t){return this.getCandidateNodes().find(i=>i.dataset.value===t)??null}setOpen(t){this.opts.open.current=t}toggleOpen(){this.opts.open.current=!this.opts.open.current}handleOpen(){this.setOpen(!0)}handleClose(){this.setHighlightedNode(null),this.setOpen(!1)}toggleMenu(){this.toggleOpen()}}Oa=new WeakMap,Na=new WeakMap,Ra=new WeakMap,Ma=new WeakMap,La=new WeakMap,Da=new WeakMap,Fa=new WeakMap,td=new WeakMap,ed=new WeakMap,nd=new WeakMap;var rd,id,od,sd;class FR extends _w{constructor(n){super(n);Y(this,"opts");Y(this,"isMulti",!1);F(this,rd,N(()=>this.opts.value.current!==""));F(this,id,N(()=>{var i;return this.opts.items.current.length?((i=this.opts.items.current.find(s=>s.value===this.opts.value.current))==null?void 0:i.label)??"":""}));F(this,od,N(()=>this.opts.items.current.length?this.opts.items.current.filter(i=>!i.disabled).map(i=>i.label):[]));F(this,sd,N(()=>!(this.isMulti||this.opts.items.current.length===0)));this.opts=n,xe(()=>{!this.opts.open.current&&this.highlightedNode&&this.setHighlightedNode(null)}),ne(()=>this.opts.open.current,()=>{this.opts.open.current&&this.setInitialHighlightedNode()})}get hasValue(){return v(A(this,rd))}get currentLabel(){return v(A(this,id))}get candidateLabels(){return v(A(this,od))}get dataTypeaheadEnabled(){return v(A(this,sd))}includesItem(n){return this.opts.value.current===n}toggleItem(n,i=n){this.opts.value.current=this.includesItem(n)?"":n,this.inputValue=i}setInitialHighlightedNode(){Tn(()=>{if(this.highlightedNode&&document.contains(this.highlightedNode))return;if(this.opts.value.current!==""){const i=this.getNodeByValue(this.opts.value.current);if(i){this.setHighlightedNode(i,!0);return}}const n=this.getCandidateNodes()[0];n&&this.setHighlightedNode(n,!0)})}}rd=new WeakMap,id=new WeakMap,od=new WeakMap,sd=new WeakMap;var ad;class BR extends _w{constructor(n){super(n);Y(this,"opts");Y(this,"isMulti",!0);F(this,ad,N(()=>this.opts.value.current.length>0));this.opts=n,xe(()=>{!this.opts.open.current&&this.highlightedNode&&this.setHighlightedNode(null)}),ne(()=>this.opts.open.current,()=>{this.opts.open.current&&this.setInitialHighlightedNode()})}get hasValue(){return v(A(this,ad))}includesItem(n){return this.opts.value.current.includes(n)}toggleItem(n,i=n){this.includesItem(n)?this.opts.value.current=this.opts.value.current.filter(s=>s!==n):this.opts.value.current=[...this.opts.value.current,n],this.inputValue=i}setInitialHighlightedNode(){Tn(()=>{if(this.highlightedNode&&document.contains(this.highlightedNode))return;if(this.opts.value.current.length&&this.opts.value.current[0]!==""){const i=this.getNodeByValue(this.opts.value.current[0]);if(i){this.setHighlightedNode(i,!0);return}}const n=this.getCandidateNodes()[0];n&&this.setHighlightedNode(n,!0)})}}ad=new WeakMap;var Qi,Jo,wr,ww,Ng,Rg,ld;class VR{constructor(t,n){F(this,wr);Y(this,"opts");Y(this,"root");F(this,Qi);F(this,Jo);F(this,ld,N(()=>({id:this.opts.id.current,disabled:this.root.opts.disabled.current?!0:void 0,"aria-haspopup":"listbox","aria-expanded":dl(this.root.opts.open.current),"aria-activedescendant":this.root.highlightedId,"data-state":Ri(this.root.opts.open.current),"data-disabled":Yn(this.root.opts.disabled.current),"data-placeholder":this.root.hasValue?void 0:"",[this.root.bitsAttrs.trigger]:"",onpointerdown:this.onpointerdown,onkeydown:this.onkeydown,onclick:this.onclick,onpointerup:this.onpointerup})));this.opts=t,this.root=n,Jt({...t,onRefChange:i=>{this.root.triggerNode=i}}),ce(this,Qi,NR({getCurrentItem:()=>this.root.highlightedNode,onMatch:i=>{this.root.setHighlightedNode(i)}})),ce(this,Jo,RR({getCurrentItem:()=>this.root.isMulti?"":this.root.currentLabel,onMatch:i=>{if(this.root.isMulti||!this.root.opts.items.current)return;const s=this.root.opts.items.current.find(a=>a.label===i);s&&(this.root.opts.value.current=s.value)},enabled:!this.root.isMulti&&this.root.dataTypeaheadEnabled,candidateValues:()=>this.root.isMulti?[]:this.root.candidateLabels})),this.onkeydown=this.onkeydown.bind(this),this.onpointerdown=this.onpointerdown.bind(this),this.onpointerup=this.onpointerup.bind(this),this.onclick=this.onclick.bind(this)}onkeydown(t){if(this.root.isUsingKeyboard=!0,(t.key===Ur||t.key===Ci)&&t.preventDefault(),!this.root.opts.open.current){if(t.key===Yr||t.key===Kr||t.key===Ci||t.key===Ur)t.preventDefault(),this.root.handleOpen();else if(!this.root.isMulti&&this.root.dataTypeaheadEnabled){A(this,Jo).handleTypeaheadSearch(t.key);return}if(this.root.hasValue)return;const l=this.root.getCandidateNodes();if(!l.length)return;if(t.key===Ci){const u=l[0];this.root.setHighlightedNode(u)}else if(t.key===Ur){const u=l[l.length-1];this.root.setHighlightedNode(u)}return}if(t.key===Cg){this.root.handleClose();return}if((t.key===Yr||t.key===Kr&&A(this,Qi).search.current==="")&&!t.isComposing&&(t.preventDefault(),Et(this,wr,Rg).call(this)))return;if(t.key===Ur&&t.altKey&&this.root.handleClose(),DR.includes(t.key)){t.preventDefault();const l=this.root.getCandidateNodes(),u=this.root.highlightedNode,d=u?l.indexOf(u):-1,f=this.root.opts.loop.current;let h;if(t.key===Ci?h=$O(l,d,f):t.key===Ur?h=tN(l,d,f):t.key===H0?h=eN(l,d,10,f):t.key===U0?h=nN(l,d,10,f):t.key===hl?h=l[0]:t.key===fl&&(h=l[l.length-1]),!h)return;this.root.setHighlightedNode(h);return}const n=t.ctrlKey||t.altKey||t.metaKey,i=t.key.length===1,s=t.key===Kr,a=this.root.getCandidateNodes();if(t.key!==Cg){if(!n&&(i||s)){!A(this,Qi).handleTypeaheadSearch(t.key,a)&&s&&(t.preventDefault(),Et(this,wr,Rg).call(this));return}this.root.highlightedNode||this.root.setHighlightedToFirstCandidate()}}onclick(t){t.currentTarget.focus()}onpointerdown(t){if(this.root.opts.disabled.current)return;if(t.pointerType==="touch")return t.preventDefault();const n=t.target;n!=null&&n.hasPointerCapture(t.pointerId)&&(n==null||n.releasePointerCapture(t.pointerId)),t.button===0&&t.ctrlKey===!1&&(this.root.opts.open.current===!1?Et(this,wr,Ng).call(this,t):this.root.handleClose())}onpointerup(t){t.preventDefault(),t.pointerType==="touch"&&(this.root.opts.open.current===!1?Et(this,wr,Ng).call(this,t):this.root.handleClose())}get props(){return v(A(this,ld))}}Qi=new WeakMap,Jo=new WeakMap,wr=new WeakSet,ww=function(){this.root.opts.open.current=!0,A(this,Jo).resetTypeahead(),A(this,Qi).resetTypeahead()},Ng=function(t){Et(this,wr,ww).call(this)},Rg=function(){const t=this.root.highlightedValue===this.root.opts.value.current;return!this.root.opts.allowDeselect.current&&t&&!this.root.isMulti?(this.root.handleClose(),!0):(this.root.highlightedValue!==null&&this.root.toggleItem(this.root.highlightedValue,this.root.highlightedLabel??void 0),!this.root.isMulti&&!t?(this.root.handleClose(),!0):!1)},ld=new WeakMap;var Ba,Va,cd,ud,dd;class WR{constructor(t,n){Y(this,"opts");Y(this,"root");F(this,Ba,bt(null));F(this,Va,bt(!1));F(this,cd,N(()=>{const t=this.root.isCombobox?"--bits-combobox":"--bits-select";return{[`${t}-content-transform-origin`]:"var(--bits-floating-transform-origin)",[`${t}-content-available-width`]:"var(--bits-floating-available-width)",[`${t}-content-available-height`]:"var(--bits-floating-available-height)",[`${t}-anchor-width`]:" var(--bits-floating-anchor-width)",[`${t}-anchor-height`]:"var(--bits-floating-anchor-height)"}}));Y(this,"onInteractOutside",t=>{if(t.target===this.root.triggerNode||t.target===this.root.inputNode){t.preventDefault();return}this.opts.onInteractOutside.current(t),!t.defaultPrevented&&this.root.handleClose()});Y(this,"onEscapeKeydown",t=>{this.opts.onEscapeKeydown.current(t),!t.defaultPrevented&&this.root.handleClose()});Y(this,"onOpenAutoFocus",t=>{t.preventDefault()});Y(this,"onCloseAutoFocus",t=>{t.preventDefault()});F(this,ud,N(()=>({open:this.root.opts.open.current})));F(this,dd,N(()=>({id:this.opts.id.current,role:"listbox","aria-multiselectable":this.root.isMulti?"true":void 0,"data-state":Ri(this.root.opts.open.current),[this.root.bitsAttrs.content]:"",style:{display:"flex",flexDirection:"column",outline:"none",boxSizing:"border-box",pointerEvents:"auto",...v(A(this,cd))},onpointermove:this.onpointermove})));Y(this,"popperProps",{onInteractOutside:this.onInteractOutside,onEscapeKeydown:this.onEscapeKeydown,onOpenAutoFocus:this.onOpenAutoFocus,onCloseAutoFocus:this.onCloseAutoFocus,trapFocus:!1,loop:!1,onPlaced:()=>{this.root.opts.open.current&&(this.isPositioned=!0)}});this.opts=t,this.root=n,Jt({...t,onRefChange:i=>{this.root.contentNode=i},deps:()=>this.root.opts.open.current}),hp(()=>{this.root.contentNode=null,this.isPositioned=!1}),ne(()=>this.root.opts.open.current,()=>{this.root.opts.open.current||(this.isPositioned=!1)}),this.onpointermove=this.onpointermove.bind(this)}get viewportNode(){return v(A(this,Ba))}set viewportNode(t){et(A(this,Ba),ft(t))}get isPositioned(){return v(A(this,Va))}set isPositioned(t){et(A(this,Va),ft(t))}onpointermove(t){this.root.isUsingKeyboard=!1}get snippetProps(){return v(A(this,ud))}get props(){return v(A(this,dd))}}Ba=new WeakMap,Va=new WeakMap,cd=new WeakMap,ud=new WeakMap,dd=new WeakMap;var fd,hd,Wa,gd,pd;class zR{constructor(t,n){Y(this,"opts");Y(this,"root");F(this,fd,N(()=>this.root.includesItem(this.opts.value.current)));F(this,hd,N(()=>this.root.highlightedValue===this.opts.value.current));Y(this,"prevHighlighted",new D0(()=>this.isHighlighted));F(this,Wa,bt(!1));F(this,gd,N(()=>({selected:this.isSelected,highlighted:this.isHighlighted})));F(this,pd,N(()=>({id:this.opts.id.current,role:"option","aria-selected":this.root.includesItem(this.opts.value.current)?"true":void 0,"data-value":this.opts.value.current,"data-disabled":Yn(this.opts.disabled.current),"data-highlighted":this.root.highlightedValue===this.opts.value.current&&!this.opts.disabled.current?"":void 0,"data-selected":this.root.includesItem(this.opts.value.current)?"":void 0,"data-label":this.opts.label.current,[this.root.bitsAttrs.item]:"",onpointermove:this.onpointermove,onpointerdown:this.onpointerdown,onpointerup:this.onpointerup})));this.opts=t,this.root=n,Jt({...t,deps:()=>this.mounted}),ne([()=>this.isHighlighted,()=>this.prevHighlighted.current],()=>{this.isHighlighted?this.opts.onHighlight.current():this.prevHighlighted.current&&this.opts.onUnhighlight.current()}),ne(()=>this.mounted,()=>{this.mounted&&this.root.setInitialHighlightedNode()}),this.onpointerdown=this.onpointerdown.bind(this),this.onpointerup=this.onpointerup.bind(this),this.onpointermove=this.onpointermove.bind(this)}get isSelected(){return v(A(this,fd))}get isHighlighted(){return v(A(this,hd))}get mounted(){return v(A(this,Wa))}set mounted(t){et(A(this,Wa),ft(t))}handleSelect(){if(this.opts.disabled.current)return;const t=this.opts.value.current===this.root.opts.value.current;if(!this.root.opts.allowDeselect.current&&t&&!this.root.isMulti){this.root.handleClose();return}this.root.toggleItem(this.opts.value.current,this.opts.label.current),!this.root.isMulti&&!t&&this.root.handleClose()}get snippetProps(){return v(A(this,gd))}onpointerdown(t){t.preventDefault()}onpointerup(t){if(!(t.defaultPrevented||!this.opts.ref.current)){if(t.pointerType==="touch"&&!Pg){Ne(this.opts.ref.current,"click",()=>{this.handleSelect(),this.root.setHighlightedNode(this.opts.ref.current)},{once:!0});return}t.preventDefault(),this.handleSelect(),t.pointerType==="touch"&&this.root.setHighlightedNode(this.opts.ref.current)}}onpointermove(t){t.pointerType!=="touch"&&this.root.highlightedNode!==this.opts.ref.current&&this.root.setHighlightedNode(this.opts.ref.current)}get props(){return v(A(this,pd))}}fd=new WeakMap,hd=new WeakMap,Wa=new WeakMap,gd=new WeakMap,pd=new WeakMap;var za,vd;class HR{constructor(t,n){Y(this,"opts");Y(this,"root");F(this,za,bt(null));F(this,vd,N(()=>{var t;return{id:this.opts.id.current,role:"group",[this.root.bitsAttrs.group]:"","aria-labelledby":((t=this.labelNode)==null?void 0:t.id)??void 0}}));this.opts=t,this.root=n,Jt(t)}get labelNode(){return v(A(this,za))}set labelNode(t){et(A(this,za),ft(t))}get props(){return v(A(this,vd))}}za=new WeakMap,vd=new WeakMap;var md;class UR{constructor(t,n){Y(this,"opts");Y(this,"group");F(this,md,N(()=>({id:this.opts.id.current,[this.group.root.bitsAttrs["group-label"]]:""})));this.opts=t,this.group=n,Jt({...t,onRefChange:i=>{n.labelNode=i}})}get props(){return v(A(this,md))}}md=new WeakMap;var bd,_d;class GR{constructor(t,n){Y(this,"opts");Y(this,"root");F(this,bd,N(()=>this.root.opts.name.current!==""));F(this,_d,N(()=>({disabled:V0(this.root.opts.disabled.current),required:CI(this.root.opts.required.current),name:this.root.opts.name.current,value:this.opts.value.current,onfocus:this.onfocus})));this.opts=t,this.root=n,this.onfocus=this.onfocus.bind(this)}get shouldRender(){return v(A(this,bd))}onfocus(t){var n,i;t.preventDefault(),this.root.isCombobox?(i=this.root.inputNode)==null||i.focus():(n=this.root.triggerNode)==null||n.focus()}get props(){return v(A(this,_d))}}bd=new WeakMap,_d=new WeakMap;var Ha,wd;class KR{constructor(t,n){Y(this,"opts");Y(this,"content");Y(this,"root");F(this,Ha,bt(0));F(this,wd,N(()=>({id:this.opts.id.current,role:"presentation",[this.root.bitsAttrs.viewport]:"",style:{position:"relative",flex:1,overflow:"auto"}})));this.opts=t,this.content=n,this.root=n.root,Jt({...t,onRefChange:i=>{this.content.viewportNode=i},deps:()=>this.root.opts.open.current})}get prevScrollTop(){return v(A(this,Ha))}set prevScrollTop(t){et(A(this,Ha),ft(t))}get props(){return v(A(this,wd))}}Ha=new WeakMap,wd=new WeakMap;var Ua,yd;class yw{constructor(t,n){Y(this,"opts");Y(this,"content");Y(this,"root");Y(this,"autoScrollTimer",null);Y(this,"userScrollTimer",-1);Y(this,"isUserScrolling",!1);Y(this,"onAutoScroll",$t);F(this,Ua,bt(!1));F(this,yd,N(()=>({id:this.opts.id.current,"aria-hidden":xI(!0),style:{flexShrink:0},onpointerdown:this.onpointerdown,onpointermove:this.onpointermove,onpointerleave:this.onpointerleave})));this.opts=t,this.content=n,this.root=n.root,Jt({...t,deps:()=>this.mounted}),ne([()=>this.mounted],()=>{if(!this.mounted){this.isUserScrolling=!1;return}this.isUserScrolling}),xe(()=>{this.mounted||this.clearAutoScrollInterval()}),this.onpointerdown=this.onpointerdown.bind(this),this.onpointermove=this.onpointermove.bind(this),this.onpointerleave=this.onpointerleave.bind(this)}get mounted(){return v(A(this,Ua))}set mounted(t){et(A(this,Ua),ft(t))}handleUserScroll(){window.clearTimeout(this.userScrollTimer),this.isUserScrolling=!0,this.userScrollTimer=window.setTimeout(()=>{this.isUserScrolling=!1},200)}clearAutoScrollInterval(){this.autoScrollTimer!==null&&(window.clearTimeout(this.autoScrollTimer),this.autoScrollTimer=null)}onpointerdown(t){if(this.autoScrollTimer!==null)return;const n=i=>{this.onAutoScroll(),this.autoScrollTimer=window.setTimeout(()=>n(i+1),this.opts.delay.current(i))};this.autoScrollTimer=window.setTimeout(()=>n(1),this.opts.delay.current(0))}onpointermove(t){this.onpointerdown(t)}onpointerleave(t){this.clearAutoScrollInterval()}get props(){return v(A(this,yd))}}Ua=new WeakMap,yd=new WeakMap;var Ga,xd;class qR{constructor(t){Y(this,"scrollButtonState");Y(this,"content");Y(this,"root");F(this,Ga,bt(!1));Y(this,"scrollIntoViewTimer",null);Y(this,"handleScroll",(t=!1)=>{if(t||this.scrollButtonState.handleUserScroll(),!this.content.viewportNode)return;const n=this.content.viewportNode.scrollHeight-this.content.viewportNode.clientHeight,i=Number.parseInt(getComputedStyle(this.content.viewportNode).paddingTop,10);this.canScrollDown=Math.ceil(this.content.viewportNode.scrollTop)<n-i});Y(this,"handleAutoScroll",()=>{const t=this.content.viewportNode,n=this.root.highlightedNode;!t||!n||(t.scrollTop=t.scrollTop+n.offsetHeight)});F(this,xd,N(()=>({...this.scrollButtonState.props,[this.root.bitsAttrs["scroll-down-button"]]:""})));this.scrollButtonState=t,this.content=t.content,this.root=t.root,this.scrollButtonState.onAutoScroll=this.handleAutoScroll,ne([()=>this.content.viewportNode,()=>this.content.isPositioned],()=>{if(!(!this.content.viewportNode||!this.content.isPositioned))return this.handleScroll(!0),Ne(this.content.viewportNode,"scroll",()=>this.handleScroll())}),ne(()=>this.scrollButtonState.mounted,()=>{this.scrollButtonState.mounted&&(this.scrollIntoViewTimer&&clearTimeout(this.scrollIntoViewTimer),this.scrollIntoViewTimer=ul(5,()=>{const n=this.root.highlightedNode;n==null||n.scrollIntoView({block:this.root.opts.scrollAlignment.current})}))})}get canScrollDown(){return v(A(this,Ga))}set canScrollDown(t){et(A(this,Ga),ft(t))}get props(){return v(A(this,xd))}}Ga=new WeakMap,xd=new WeakMap;var Ka,Sd;class YR{constructor(t){Y(this,"scrollButtonState");Y(this,"content");Y(this,"root");F(this,Ka,bt(!1));Y(this,"handleScroll",(t=!1)=>{if(t||this.scrollButtonState.handleUserScroll(),!this.content.viewportNode)return;const n=Number.parseInt(getComputedStyle(this.content.viewportNode).paddingTop,10);this.canScrollUp=this.content.viewportNode.scrollTop-n>.1});Y(this,"handleAutoScroll",()=>{!this.content.viewportNode||!this.root.highlightedNode||(this.content.viewportNode.scrollTop=this.content.viewportNode.scrollTop-this.root.highlightedNode.offsetHeight)});F(this,Sd,N(()=>({...this.scrollButtonState.props,[this.root.bitsAttrs["scroll-up-button"]]:""})));this.scrollButtonState=t,this.content=t.content,this.root=t.root,this.scrollButtonState.onAutoScroll=this.handleAutoScroll,ne([()=>this.content.viewportNode,()=>this.content.isPositioned],()=>{if(!(!this.content.viewportNode||!this.content.isPositioned))return this.handleScroll(!0),Ne(this.content.viewportNode,"scroll",()=>this.handleScroll())})}get canScrollUp(){return v(A(this,Ka))}set canScrollUp(t){et(A(this,Ka),ft(t))}get props(){return v(A(this,Sd))}}Ka=new WeakMap,Sd=new WeakMap;const ss=new sn("Select.Root | Combobox.Root"),xw=new sn("Select.Group | Combobox.Group"),Pf=new sn("Select.Content | Combobox.Content");function XR(e){const{type:t,...n}=e,i=t==="single"?new FR(n):new BR(n);return ss.set(i)}function ZR(e){return Pf.set(new WR(e,ss.get()))}function JR(e){return new VR(e,ss.get())}function QR(e){return new zR(e,ss.get())}function jR(e){return new KR(e,Pf.get())}function $R(e){return new YR(new yw(e,Pf.get()))}function tM(e){return new qR(new yw(e,Pf.get()))}function eM(e){return xw.set(new HR(e,ss.get()))}function nM(e){return new UR(e,xw.get())}function rM(e){return new GR(e,ss.get())}const iM=["trigger","content","item","viewport","scroll-up-button","scroll-down-button","group","group-label","separator","arrow","input","content-wrapper","item-text","value"];function oM(e){const t=e.isCombobox,n={};for(const i of iM)n[i]=t?`data-combobox-${i}`:`data-select-${i}`;return n}function c_(e,t){ht(t,!0);let n=k(t,"value",15,"");const i=rM({value:B.with(()=>n())});var s=X(),a=W(s);{var l=u=>{_p(u,Rt(()=>i.props,{get value(){return n()},set value(d){n(d)}}))};_t(a,u=>{i.shouldRender&&u(l)})}P(e,s),gt()}function Sw(e,t){ht(t,!0),TR({id:B.with(()=>t.id),virtualEl:B.with(()=>t.virtualEl)});var n=X(),i=W(n);at(i,()=>t.children??Ct),P(e,n),gt()}function sM(e,t){ht(t,!0);let n=k(t,"side",3,"bottom"),i=k(t,"sideOffset",3,0),s=k(t,"align",3,"center"),a=k(t,"alignOffset",3,0),l=k(t,"arrowPadding",3,0),u=k(t,"avoidCollisions",3,!0),d=k(t,"collisionBoundary",19,()=>[]),f=k(t,"collisionPadding",3,0),h=k(t,"hideWhenDetached",3,!1),g=k(t,"onPlaced",3,()=>{}),m=k(t,"sticky",3,"partial"),b=k(t,"updatePositionStrategy",3,"optimized"),_=k(t,"strategy",3,"fixed"),w=k(t,"dir",3,"ltr"),x=k(t,"style",19,()=>({})),S=k(t,"wrapperId",19,Qt),I=k(t,"customAnchor",3,null);const T=ER({side:B.with(()=>n()),sideOffset:B.with(()=>i()),align:B.with(()=>s()),alignOffset:B.with(()=>a()),id:B.with(()=>t.id),arrowPadding:B.with(()=>l()),avoidCollisions:B.with(()=>u()),collisionBoundary:B.with(()=>d()),collisionPadding:B.with(()=>f()),hideWhenDetached:B.with(()=>h()),onPlaced:B.with(()=>g()),sticky:B.with(()=>m()),updatePositionStrategy:B.with(()=>b()),strategy:B.with(()=>_()),dir:B.with(()=>w()),style:B.with(()=>x()),enabled:B.with(()=>t.enabled),wrapperId:B.with(()=>S()),customAnchor:B.with(()=>I())}),O=N(()=>Wt(T.wrapperProps,{style:{pointerEvents:"auto"}}));var D=X(),L=W(D);at(L,()=>t.content??Ct,()=>({props:T.props,wrapperProps:v(O)})),P(e,D),gt()}function aM(e,t){ht(t,!0),wf(()=>{var s;(s=t.onPlaced)==null||s.call(t)});var n=X(),i=W(n);at(i,()=>t.content??Ct,()=>({props:{},wrapperProps:{}})),P(e,n),gt()}function lM(e,t){let n=k(t,"isStatic",3,!1),i=At(t,["$$slots","$$events","$$legacy","content","isStatic","onPlaced"]);var s=X(),a=W(s);{var l=d=>{aM(d,{get content(){return t.content},get onPlaced(){return t.onPlaced}})},u=d=>{sM(d,Rt({get content(){return t.content},get onPlaced(){return t.onPlaced}},()=>i))};_t(a,d=>{n()?d(l):d(u,!1)})}P(e,s)}var cM=tt("<!> <!>",1);function Aw(e,t){ht(t,!0);let n=k(t,"interactOutsideBehavior",3,"close"),i=k(t,"trapFocus",3,!0),s=k(t,"isValidEvent",3,()=>!1),a=k(t,"customAnchor",3,null),l=k(t,"isStatic",3,!1),u=At(t,["$$slots","$$events","$$legacy","popper","onEscapeKeydown","escapeKeydownBehavior","preventOverflowTextSelection","id","onPointerDown","onPointerUp","side","sideOffset","align","alignOffset","arrowPadding","avoidCollisions","collisionBoundary","collisionPadding","sticky","hideWhenDetached","updatePositionStrategy","strategy","dir","preventScroll","wrapperId","style","onPlaced","onInteractOutside","onCloseAutoFocus","onOpenAutoFocus","onFocusOutside","interactOutsideBehavior","loop","trapFocus","isValidEvent","customAnchor","isStatic","enabled"]);lM(e,{get isStatic(){return l()},get id(){return t.id},get side(){return t.side},get sideOffset(){return t.sideOffset},get align(){return t.align},get alignOffset(){return t.alignOffset},get arrowPadding(){return t.arrowPadding},get avoidCollisions(){return t.avoidCollisions},get collisionBoundary(){return t.collisionBoundary},get collisionPadding(){return t.collisionPadding},get sticky(){return t.sticky},get hideWhenDetached(){return t.hideWhenDetached},get updatePositionStrategy(){return t.updatePositionStrategy},get strategy(){return t.strategy},get dir(){return t.dir},get wrapperId(){return t.wrapperId},get style(){return t.style},get onPlaced(){return t.onPlaced},get customAnchor(){return a()},get enabled(){return t.enabled},content:(f,h)=>{let g=()=>h==null?void 0:h().props,m=()=>h==null?void 0:h().wrapperProps;var b=cM(),_=W(b);{var w=T=>{zc(T,{get preventScroll(){return t.preventScroll}})},x=(T,O)=>{{var D=L=>{zc(L,{get preventScroll(){return t.preventScroll}})};_t(T,L=>{t.forceMount||L(D)},O)}};_t(_,T=>{t.forceMount&&t.enabled?T(w):T(x,!1)})}var S=mt(_,2);const I=N(()=>t.enabled&&i());nw(S,{get id(){return t.id},get onOpenAutoFocus(){return t.onOpenAutoFocus},get onCloseAutoFocus(){return t.onCloseAutoFocus},get loop(){return t.loop},get trapFocus(){return v(I)},get forceMount(){return t.forceMount},focusScope:(O,D)=>{let L=()=>D==null?void 0:D().props;j0(O,{get onEscapeKeydown(){return t.onEscapeKeydown},get escapeKeydownBehavior(){return t.escapeKeydownBehavior},get enabled(){return t.enabled},children:(M,G)=>{Q0(M,{get id(){return t.id},get onInteractOutside(){return t.onInteractOutside},get onFocusOutside(){return t.onFocusOutside},get interactOutsideBehavior(){return n()},get isValidEvent(){return s()},get enabled(){return t.enabled},children:(lt,pt)=>{let z=()=>pt==null?void 0:pt().props;iw(lt,{get id(){return t.id},get preventOverflowTextSelection(){return t.preventOverflowTextSelection},get onPointerDown(){return t.onPointerDown},get onPointerUp(){return t.onPointerUp},get enabled(){return t.enabled},children:($,H)=>{var J=X(),Q=W(J),ot=nn(()=>({props:Wt(u,g(),z(),L(),{style:{pointerEvents:"auto"}}),wrapperProps:m()}));at(Q,()=>t.popper??Ct,()=>v(ot)),P($,J)},$$slots:{default:!0}})},$$slots:{default:!0}})},$$slots:{default:!0}})},$$slots:{focusScope:!0}}),P(f,b)},$$slots:{content:!0}}),gt()}function Cw(e,t){let n=k(t,"interactOutsideBehavior",3,"close"),i=k(t,"trapFocus",3,!0),s=k(t,"isValidEvent",3,()=>!1),a=k(t,"customAnchor",3,null),l=k(t,"isStatic",3,!1),u=At(t,["$$slots","$$events","$$legacy","popper","present","onEscapeKeydown","escapeKeydownBehavior","preventOverflowTextSelection","id","onPointerDown","onPointerUp","side","sideOffset","align","alignOffset","arrowPadding","avoidCollisions","collisionBoundary","collisionPadding","sticky","hideWhenDetached","updatePositionStrategy","strategy","dir","preventScroll","wrapperId","style","onPlaced","onInteractOutside","onCloseAutoFocus","onOpenAutoFocus","onFocusOutside","interactOutsideBehavior","loop","trapFocus","isValidEvent","customAnchor","isStatic"]);xf(e,Rt({get id(){return t.id},get present(){return t.present}},()=>u,{presence:f=>{Aw(f,Rt({get popper(){return t.popper},get onEscapeKeydown(){return t.onEscapeKeydown},get escapeKeydownBehavior(){return t.escapeKeydownBehavior},get preventOverflowTextSelection(){return t.preventOverflowTextSelection},get id(){return t.id},get onPointerDown(){return t.onPointerDown},get onPointerUp(){return t.onPointerUp},get side(){return t.side},get sideOffset(){return t.sideOffset},get align(){return t.align},get alignOffset(){return t.alignOffset},get arrowPadding(){return t.arrowPadding},get avoidCollisions(){return t.avoidCollisions},get collisionBoundary(){return t.collisionBoundary},get collisionPadding(){return t.collisionPadding},get sticky(){return t.sticky},get hideWhenDetached(){return t.hideWhenDetached},get updatePositionStrategy(){return t.updatePositionStrategy},get strategy(){return t.strategy},get dir(){return t.dir},get preventScroll(){return t.preventScroll},get wrapperId(){return t.wrapperId},get style(){return t.style},get onPlaced(){return t.onPlaced},get customAnchor(){return a()},get isStatic(){return l()},get enabled(){return t.present},get onInteractOutside(){return t.onInteractOutside},get onCloseAutoFocus(){return t.onCloseAutoFocus},get onOpenAutoFocus(){return t.onOpenAutoFocus},get interactOutsideBehavior(){return n()},get loop(){return t.loop},get trapFocus(){return i()},get isValidEvent(){return s()},get onFocusOutside(){return t.onFocusOutside},forceMount:!1},()=>u))},$$slots:{presence:!0}}))}function Pw(e,t){let n=k(t,"interactOutsideBehavior",3,"close"),i=k(t,"trapFocus",3,!0),s=k(t,"isValidEvent",3,()=>!1),a=k(t,"customAnchor",3,null),l=k(t,"isStatic",3,!1),u=At(t,["$$slots","$$events","$$legacy","popper","onEscapeKeydown","escapeKeydownBehavior","preventOverflowTextSelection","id","onPointerDown","onPointerUp","side","sideOffset","align","alignOffset","arrowPadding","avoidCollisions","collisionBoundary","collisionPadding","sticky","hideWhenDetached","updatePositionStrategy","strategy","dir","preventScroll","wrapperId","style","onPlaced","onInteractOutside","onCloseAutoFocus","onOpenAutoFocus","onFocusOutside","interactOutsideBehavior","loop","trapFocus","isValidEvent","customAnchor","isStatic","enabled"]);Aw(e,Rt({get popper(){return t.popper},get onEscapeKeydown(){return t.onEscapeKeydown},get escapeKeydownBehavior(){return t.escapeKeydownBehavior},get preventOverflowTextSelection(){return t.preventOverflowTextSelection},get id(){return t.id},get onPointerDown(){return t.onPointerDown},get onPointerUp(){return t.onPointerUp},get side(){return t.side},get sideOffset(){return t.sideOffset},get align(){return t.align},get alignOffset(){return t.alignOffset},get arrowPadding(){return t.arrowPadding},get avoidCollisions(){return t.avoidCollisions},get collisionBoundary(){return t.collisionBoundary},get collisionPadding(){return t.collisionPadding},get sticky(){return t.sticky},get hideWhenDetached(){return t.hideWhenDetached},get updatePositionStrategy(){return t.updatePositionStrategy},get strategy(){return t.strategy},get dir(){return t.dir},get preventScroll(){return t.preventScroll},get wrapperId(){return t.wrapperId},get style(){return t.style},get onPlaced(){return t.onPlaced},get customAnchor(){return a()},get isStatic(){return l()},get enabled(){return t.enabled},get onInteractOutside(){return t.onInteractOutside},get onCloseAutoFocus(){return t.onCloseAutoFocus},get onOpenAutoFocus(){return t.onOpenAutoFocus},get interactOutsideBehavior(){return n()},get loop(){return t.loop},get trapFocus(){return i()},get isValidEvent(){return s()},get onFocusOutside(){return t.onFocusOutside}},()=>u,{forceMount:!0}))}var uM=tt("<div><div><!></div></div>"),dM=tt("<div><div><!></div></div>");function fM(e,t){ht(t,!0);let n=k(t,"id",19,Qt),i=k(t,"ref",15,null),s=k(t,"forceMount",3,!1),a=k(t,"side",3,"bottom"),l=k(t,"onInteractOutside",3,$t),u=k(t,"onEscapeKeydown",3,$t),d=k(t,"preventScroll",3,!1),f=At(t,["$$slots","$$events","$$legacy","id","ref","forceMount","side","onInteractOutside","onEscapeKeydown","children","child","preventScroll"]);const h=ZR({id:B.with(()=>n()),ref:B.with(()=>i(),x=>i(x)),onInteractOutside:B.with(()=>l()),onEscapeKeydown:B.with(()=>u())}),g=N(()=>Wt(f,h.props));var m=X(),b=W(m);{var _=x=>{Pw(x,Rt(()=>v(g),()=>h.popperProps,{get side(){return a()},get enabled(){return h.root.opts.open.current},get id(){return n()},get preventScroll(){return d()},forceMount:!0,popper:(I,T)=>{let O=()=>T==null?void 0:T().props,D=()=>T==null?void 0:T().wrapperProps;var L=X();const M=N(()=>Wt(O(),{style:h.props.style}));var G=W(L);{var q=pt=>{var z=X(),$=W(z),H=nn(()=>({props:v(M),wrapperProps:D(),...h.snippetProps}));at($,()=>t.child,()=>v(H)),P(pt,z)},lt=pt=>{var z=uM();let $;var H=rt(z);let J;var Q=rt(H);at(Q,()=>t.children??Ct),nt(H),nt(z),St(()=>{$=Lt(z,$,{...D()}),J=Lt(H,J,{...v(M)})}),P(pt,z)};_t(G,pt=>{t.child?pt(q):pt(lt,!1)})}P(I,L)},$$slots:{popper:!0}}))},w=(x,S)=>{{var I=T=>{Cw(T,Rt(()=>v(g),()=>h.popperProps,{get side(){return a()},get present(){return h.root.opts.open.current},get id(){return n()},get preventScroll(){return d()},forceMount:!1,popper:(D,L)=>{let M=()=>L==null?void 0:L().props,G=()=>L==null?void 0:L().wrapperProps;var q=X();const lt=N(()=>Wt(M(),{style:h.props.style}));var pt=W(q);{var z=H=>{var J=X(),Q=W(J),ot=nn(()=>({props:v(lt),wrapperProps:G(),...h.snippetProps}));at(Q,()=>t.child,()=>v(ot)),P(H,J)},$=H=>{var J=dM();let Q;var ot=rt(J);let Z;var ct=rt(ot);at(ct,()=>t.children??Ct),nt(ot),nt(J),St(()=>{Q=Lt(J,Q,{...G()}),Z=Lt(ot,Z,{...v(lt)})}),P(H,J)};_t(pt,H=>{t.child?H(z):H($,!1)})}P(D,q)},$$slots:{popper:!0}}))};_t(x,T=>{s()||T(I)},S)}};_t(b,x=>{s()?x(_):x(w,!1)})}P(e,m),gt()}function Ip(e,t){ht(t,!0);let n=k(t,"mounted",15,!1),i=k(t,"onMountedChange",3,$t);gp(()=>(n(!0),i()(!0),()=>{n(!1),i()(!1)})),gt()}var hM=tt("<div><!></div>"),gM=tt("<!> <!>",1);function pM(e,t){ht(t,!0);let n=k(t,"id",19,Qt),i=k(t,"ref",15,null),s=k(t,"label",19,()=>t.value),a=k(t,"disabled",3,!1),l=k(t,"onHighlight",3,$t),u=k(t,"onUnhighlight",3,$t),d=At(t,["$$slots","$$events","$$legacy","id","ref","value","label","disabled","children","child","onHighlight","onUnhighlight"]);const f=QR({id:B.with(()=>n()),ref:B.with(()=>i(),x=>i(x)),value:B.with(()=>t.value),disabled:B.with(()=>a()),label:B.with(()=>s()),onHighlight:B.with(()=>l()),onUnhighlight:B.with(()=>u())}),h=N(()=>Wt(d,f.props));var g=gM(),m=W(g);{var b=x=>{var S=X(),I=W(S),T=nn(()=>({props:v(h),...f.snippetProps}));at(I,()=>t.child,()=>v(T)),P(x,S)},_=x=>{var S=hM();let I;var T=rt(S);at(T,()=>t.children??Ct,()=>f.snippetProps),nt(S),St(()=>I=Lt(S,I,{...v(h)})),P(x,S)};_t(m,x=>{t.child?x(b):x(_,!1)})}var w=mt(m,2);Ip(w,{get mounted(){return f.mounted},set mounted(x){f.mounted=x}}),P(e,g),gt()}var vM=tt("<div><!></div>");function mM(e,t){ht(t,!0);let n=k(t,"id",19,Qt),i=k(t,"ref",15,null),s=At(t,["$$slots","$$events","$$legacy","id","ref","children","child"]);const a=eM({id:B.with(()=>n()),ref:B.with(()=>i(),g=>i(g))}),l=N(()=>Wt(s,a.props));var u=X(),d=W(u);{var f=g=>{var m=X(),b=W(m);at(b,()=>t.child,()=>({props:v(l)})),P(g,m)},h=g=>{var m=vM();let b;var _=rt(m);at(_,()=>t.children??Ct),nt(m),St(()=>b=Lt(m,b,{...v(l)})),P(g,m)};_t(d,g=>{t.child?g(f):g(h,!1)})}P(e,u),gt()}var bM=tt("<div><!></div>");function _M(e,t){ht(t,!0);let n=k(t,"id",19,Qt),i=k(t,"ref",15,null),s=At(t,["$$slots","$$events","$$legacy","id","ref","child","children"]);const a=nM({id:B.with(()=>n()),ref:B.with(()=>i(),g=>i(g))}),l=N(()=>Wt(s,a.props));var u=X(),d=W(u);{var f=g=>{var m=X(),b=W(m);at(b,()=>t.child,()=>({props:v(l)})),P(g,m)},h=g=>{var m=bM();let b;var _=rt(m);at(_,()=>t.children??Ct),nt(m),St(()=>b=Lt(m,b,{...v(l)})),P(g,m)};_t(d,g=>{t.child?g(f):g(h,!1)})}P(e,u),gt()}var wM=tt("<div><!></div>");function yM(e,t){ht(t,!0);let n=k(t,"id",19,Qt),i=k(t,"ref",15,null),s=At(t,["$$slots","$$events","$$legacy","id","ref","children","child"]);const a=jR({id:B.with(()=>n()),ref:B.with(()=>i(),g=>i(g))}),l=N(()=>Wt(s,a.props));var u=X(),d=W(u);{var f=g=>{var m=X(),b=W(m);at(b,()=>t.child,()=>({props:v(l)})),P(g,m)},h=g=>{var m=wM();let b;var _=rt(m);at(_,()=>t.children??Ct),nt(m),St(()=>b=Lt(m,b,{...v(l)})),P(g,m)};_t(d,g=>{t.child?g(f):g(h,!1)})}P(e,u),gt()}var xM=tt("<div><!></div>"),SM=tt("<!> <!>",1);function AM(e,t){ht(t,!0);let n=k(t,"id",19,Qt),i=k(t,"ref",15,null),s=k(t,"delay",3,()=>50),a=At(t,["$$slots","$$events","$$legacy","id","ref","delay","child","children"]);const l=tM({id:B.with(()=>n()),ref:B.with(()=>i(),g=>i(g)),delay:B.with(()=>s())}),u=N(()=>Wt(a,l.props));var d=X(),f=W(d);{var h=g=>{var m=SM(),b=W(m);Ip(b,{get mounted(){return l.scrollButtonState.mounted},set mounted(S){l.scrollButtonState.mounted=S}});var _=mt(b,2);{var w=S=>{var I=X(),T=W(I);at(T,()=>t.child,()=>({props:a})),P(S,I)},x=S=>{var I=xM();let T;var O=rt(I);at(O,()=>t.children??Ct),nt(I),St(()=>T=Lt(I,T,{...v(u)})),P(S,I)};_t(_,S=>{t.child?S(w):S(x,!1)})}P(g,m)};_t(f,g=>{l.canScrollDown&&g(h)})}P(e,d),gt()}var CM=tt("<div><!></div>"),PM=tt("<!> <!>",1);function EM(e,t){ht(t,!0);let n=k(t,"id",19,Qt),i=k(t,"ref",15,null),s=k(t,"delay",3,()=>50),a=At(t,["$$slots","$$events","$$legacy","id","ref","delay","child","children"]);const l=$R({id:B.with(()=>n()),ref:B.with(()=>i(),g=>i(g)),delay:B.with(()=>s())}),u=N(()=>Wt(a,l.props));var d=X(),f=W(d);{var h=g=>{var m=PM(),b=W(m);Ip(b,{get mounted(){return l.scrollButtonState.mounted},set mounted(S){l.scrollButtonState.mounted=S}});var _=mt(b,2);{var w=S=>{var I=X(),T=W(I);at(T,()=>t.child,()=>({props:a})),P(S,I)},x=S=>{var I=CM();let T;var O=rt(I);at(O,()=>t.children??Ct),nt(I),St(()=>T=Lt(I,T,{...v(u)})),P(S,I)};_t(_,S=>{t.child?S(w):S(x,!1)})}P(g,m)};_t(f,g=>{l.canScrollUp&&g(h)})}P(e,d),gt()}function TM(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function kM(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}var Ew={exports:{}};/*! https://mths.be/cssescape v1.5.1 by @mathias | MIT license */(function(e,t){(function(n,i){e.exports=i(n)})(pr,function(n){if(n.CSS&&n.CSS.escape)return n.CSS.escape;var i=function(s){if(arguments.length==0)throw new TypeError("`CSS.escape` requires an argument.");for(var a=String(s),l=a.length,u=-1,d,f="",h=a.charCodeAt(0);++u<l;){if(d=a.charCodeAt(u),d==0){f+="�";continue}if(d>=1&&d<=31||d==127||u==0&&d>=48&&d<=57||u==1&&d>=48&&d<=57&&h==45){f+="\\"+d.toString(16)+" ";continue}if(u==0&&l==1&&d==45){f+="\\"+a.charAt(u);continue}if(d>=128||d==45||d==95||d>=48&&d<=57||d>=65&&d<=90||d>=97&&d<=122){f+=a.charAt(u);continue}f+="\\"+a.charAt(u)}return f};return n.CSS||(n.CSS={}),n.CSS.escape=i,i})})(Ew);var IM=Ew.exports;const Tw=I0(IM),OM="data-command-root",NM="data-command-list",RM="data-command-input",MM="data-command-empty",kw="data-command-group",Iw="data-command-group-items",Ow="data-command-group-heading",Nw="data-command-item",LM="data-command-input-label",Ki="data-value",Ps=`[${kw}]`,jh=`[${Iw}]`,DM=`[${Ow}]`,Rw=`[${Nw}]`,$h=`${Rw}:not([aria-disabled="true"])`,lo=new sn("Command.Root"),FM=new sn("Command.List"),vl=new sn("Command.Group"),u_={search:"",value:"",filtered:{count:0,items:new Map,groups:new Set}};var Qo,qa,Ya,Xa,Za,Ja,Qa,Zt,Mw,Tc,Mg,kc,Ic,Oc,ko,Lw,Lg,Dg,Fg,Ad;class BM{constructor(t){F(this,Zt);Y(this,"opts");F(this,Qo,!1);Y(this,"sortAfterTick",!1);Y(this,"sortAndFilterAfterTick",!1);Y(this,"allItems",new Set);Y(this,"allGroups",new Map);Y(this,"allIds",new Map);F(this,qa,bt(0));F(this,Ya,bt(null));F(this,Xa,bt(null));F(this,Za,bt(null));F(this,Ja,bt(u_));F(this,Qa,bt(ft(u_)));F(this,Ad,N(()=>({id:this.opts.id.current,role:"application",[OM]:"",tabindex:-1,onkeydown:this.onkeydown})));this.opts=t;const n={...this._commandState,value:this.opts.value.current??""};this._commandState=n,this.commandState=n,Jt(t),this.onkeydown=this.onkeydown.bind(this)}get key(){return v(A(this,qa))}set key(t){et(A(this,qa),ft(t))}get viewportNode(){return v(A(this,Ya))}set viewportNode(t){et(A(this,Ya),ft(t))}get inputNode(){return v(A(this,Xa))}set inputNode(t){et(A(this,Xa),ft(t))}get labelNode(){return v(A(this,Za))}set labelNode(t){et(A(this,Za),ft(t))}get commandState(){return v(A(this,Ja))}set commandState(t){et(A(this,Ja),t)}get _commandState(){return v(A(this,Qa))}set _commandState(t){et(A(this,Qa),ft(t))}setState(t,n,i){Object.is(this._commandState[t],n)||(this._commandState[t]=n,t==="search"?(Et(this,Zt,Oc).call(this),Et(this,Zt,kc).call(this)):t==="value"&&(i||Et(this,Zt,Lw).call(this)),Et(this,Zt,Tc).call(this))}setValue(t,n){t!==this.opts.value.current&&t===""&&Tn(()=>{this.key++}),this.setState("value",t,n),this.opts.value.current=t}getValidItems(){const t=this.opts.ref.current;return t?Array.from(t.querySelectorAll($h)).filter(i=>!!i):[]}updateSelectedToIndex(t){const i=this.getValidItems()[t];i&&this.setValue(i.getAttribute(Ki)??"")}updateSelectedByItem(t){const n=Et(this,Zt,ko).call(this),i=this.getValidItems(),s=i.findIndex(l=>l===n);let a=i[s+t];this.opts.loop.current&&(a=s+t<0?i[i.length-1]:s+t===i.length?i[0]:i[s+t]),a&&this.setValue(a.getAttribute(Ki)??"")}updateSelectedByGroup(t){const n=Et(this,Zt,ko).call(this);let i=n==null?void 0:n.closest(Ps),s;for(;i&&!s;)i=t>0?TM(i,Ps):kM(i,Ps),s=i==null?void 0:i.querySelector($h);s?this.setValue(s.getAttribute(Ki)??""):this.updateSelectedByItem(t)}registerValue(t,n){var i;return t&&t===((i=this.allIds.get(t))==null?void 0:i.value)||this.allIds.set(t,{value:t,keywords:n}),this._commandState.filtered.items.set(t,Et(this,Zt,Mg).call(this,t,n)),this.sortAfterTick||(this.sortAfterTick=!0,Tn(()=>{Et(this,Zt,kc).call(this),this.sortAfterTick=!1})),()=>{this.allIds.delete(t)}}registerItem(t,n){return this.allItems.add(t),n&&(this.allGroups.has(n)?this.allGroups.get(n).add(t):this.allGroups.set(n,new Set([t]))),this.sortAndFilterAfterTick||(this.sortAndFilterAfterTick=!0,Tn(()=>{Et(this,Zt,Oc).call(this),Et(this,Zt,kc).call(this),this.sortAndFilterAfterTick=!1})),Et(this,Zt,Tc).call(this),()=>{const i=Et(this,Zt,ko).call(this);this.allIds.delete(t),this.allItems.delete(t),this.commandState.filtered.items.delete(t),Et(this,Zt,Oc).call(this),(i==null?void 0:i.getAttribute("id"))===t&&Et(this,Zt,Ic).call(this),Et(this,Zt,Tc).call(this)}}registerGroup(t){return this.allGroups.has(t)||this.allGroups.set(t,new Set),()=>{this.allIds.delete(t),this.allGroups.delete(t)}}onkeydown(t){switch(t.key){case TI:case kI:{this.opts.vimBindings.current&&t.ctrlKey&&Et(this,Zt,Dg).call(this,t);break}case Ci:Et(this,Zt,Dg).call(this,t);break;case EI:case II:{this.opts.vimBindings.current&&t.ctrlKey&&Et(this,Zt,Fg).call(this,t);break}case Ur:Et(this,Zt,Fg).call(this,t);break;case hl:t.preventDefault(),this.updateSelectedToIndex(0);break;case fl:t.preventDefault(),Et(this,Zt,Lg).call(this);break;case Yr:if(!t.isComposing&&t.keyCode!==229){t.preventDefault();const n=Et(this,Zt,ko).call(this);n&&(n==null||n.click())}}}get props(){return v(A(this,Ad))}}Qo=new WeakMap,qa=new WeakMap,Ya=new WeakMap,Xa=new WeakMap,Za=new WeakMap,Ja=new WeakMap,Qa=new WeakMap,Zt=new WeakSet,Mw=function(){return h0(this._commandState)},Tc=function(){A(this,Qo)||(ce(this,Qo,!0),Tn(()=>{var i,s;ce(this,Qo,!1);const t=Et(this,Zt,Mw).call(this);!Object.is(this.commandState,t)&&(this.commandState=t,(s=(i=this.opts.onStateChange)==null?void 0:i.current)==null||s.call(i,t))}))},Mg=function(t,n){const i=this.opts.filter.current??Bw;return t?i(t,this._commandState.search,n):0},kc=function(){var l;if(!this._commandState.search||this.opts.shouldFilter.current===!1){Et(this,Zt,Ic).call(this);return}const t=this._commandState.filtered.items,n=[];for(const u of this._commandState.filtered.groups){const d=this.allGroups.get(u);let f=0;if(!d){n.push([u,f]);continue}for(const h of d){const g=t.get(h);f=Math.max(g??0,f)}n.push([u,f])}const i=this.viewportNode,s=this.getValidItems().sort((u,d)=>{const f=u.getAttribute("data-value"),h=d.getAttribute("data-value"),g=t.get(f)??0;return(t.get(h)??0)-g});for(const u of s){const d=u.closest(jh);if(d){const f=u.parentElement===d?u:u.closest(`${jh} > *`);f&&d.appendChild(f)}else{const f=u.parentElement===i?u:u.closest(`${jh} > *`);f&&(i==null||i.appendChild(f))}}const a=n.sort((u,d)=>d[1]-u[1]);for(const u of a){const d=i==null?void 0:i.querySelector(`${Ps}[${Ki}="${Tw(u[0])}"]`);(l=d==null?void 0:d.parentElement)==null||l.appendChild(d)}Et(this,Zt,Ic).call(this)},Ic=function(){Tn(()=>{const t=this.getValidItems().find(i=>i.getAttribute("aria-disabled")!=="true"),n=t==null?void 0:t.getAttribute(Ki);this.setValue(n||"")})},Oc=function(){var n,i;if(!this._commandState.search||this.opts.shouldFilter.current===!1){this._commandState.filtered.count=this.allItems.size;return}this._commandState.filtered.groups=new Set;let t=0;for(const s of this.allItems){const a=((n=this.allIds.get(s))==null?void 0:n.value)??"",l=((i=this.allIds.get(s))==null?void 0:i.keywords)??[],u=Et(this,Zt,Mg).call(this,a,l);this._commandState.filtered.items.set(s,u),u>0&&t++}for(const[s,a]of this.allGroups)for(const l of a){const u=this._commandState.filtered.items.get(l);if(u&&u>0){this._commandState.filtered.groups.add(s);break}}this._commandState.filtered.count=t},ko=function(){const t=this.opts.ref.current;if(!t)return;const n=t.querySelector(`${$h}[data-selected]`);if(n)return n},Lw=function(){Tn(()=>{var s,a,l,u;const t=Et(this,Zt,ko).call(this);if(!t)return;const n=(s=t.parentElement)==null?void 0:s.parentElement;if(!n)return;const i=eO(n);if(i&&((a=i.dataset)==null?void 0:a.value)===((l=t.dataset)==null?void 0:l.value)){const d=(u=t==null?void 0:t.closest(Ps))==null?void 0:u.querySelector(DM);d==null||d.scrollIntoView({block:"nearest"});return}t.scrollIntoView({block:"nearest"})})},Lg=function(){return this.updateSelectedToIndex(this.getValidItems().length-1)},Dg=function(t){t.preventDefault(),t.metaKey?Et(this,Zt,Lg).call(this):t.altKey?this.updateSelectedByGroup(1):this.updateSelectedByItem(1)},Fg=function(t){t.preventDefault(),t.metaKey?this.updateSelectedToIndex(0):t.altKey?this.updateSelectedByGroup(-1):this.updateSelectedByItem(-1)},Ad=new WeakMap;var ja,Cd,Pd;class VM{constructor(t,n){Y(this,"opts");Y(this,"root");F(this,ja,!0);F(this,Cd,N(()=>this.root._commandState.filtered.count===0&&A(this,ja)===!1||this.opts.forceMount.current));F(this,Pd,N(()=>({id:this.opts.id.current,role:"presentation",[MM]:""})));this.opts=t,this.root=n,bf(()=>{ce(this,ja,!1)}),Jt({...t,deps:()=>this.shouldRender})}get shouldRender(){return v(A(this,Cd))}get props(){return v(A(this,Pd))}}ja=new WeakMap,Cd=new WeakMap,Pd=new WeakMap;var $a,tl,Ed,Td;class WM{constructor(t,n){Y(this,"opts");Y(this,"root");F(this,$a,bt(null));F(this,tl,bt(""));F(this,Ed,N(()=>this.opts.forceMount.current||this.root.opts.shouldFilter.current===!1||!this.root.commandState.search?!0:this.root._commandState.filtered.groups.has(this.trueValue)));F(this,Td,N(()=>({id:this.opts.id.current,role:"presentation",hidden:this.shouldRender?void 0:!0,"data-value":this.trueValue,[kw]:""})));this.opts=t,this.root=n,this.trueValue=t.value.current??t.id.current,Jt({...t,deps:()=>this.shouldRender}),ne(()=>this.trueValue,()=>this.root.registerGroup(this.trueValue)),xe(()=>this.opts.value.current?(this.trueValue=this.opts.value.current,this.root.registerValue(this.opts.value.current)):this.headingNode&&this.headingNode.textContent?(this.trueValue=this.headingNode.textContent.trim().toLowerCase(),this.root.registerValue(this.trueValue)):(this.trueValue=`-----${this.opts.id.current}`,this.root.registerValue(this.trueValue)))}get headingNode(){return v(A(this,$a))}set headingNode(t){et(A(this,$a),ft(t))}get trueValue(){return v(A(this,tl))}set trueValue(t){et(A(this,tl),ft(t))}get shouldRender(){return v(A(this,Ed))}get props(){return v(A(this,Td))}}$a=new WeakMap,tl=new WeakMap,Ed=new WeakMap,Td=new WeakMap;var kd;class zM{constructor(t,n){Y(this,"opts");Y(this,"group");F(this,kd,N(()=>({id:this.opts.id.current,[Ow]:""})));this.opts=t,this.group=n,Jt({...t,onRefChange:i=>{this.group.headingNode=i}})}get props(){return v(A(this,kd))}}kd=new WeakMap;var Id;class HM{constructor(t,n){Y(this,"opts");Y(this,"group");F(this,Id,N(()=>{var t;return{id:this.opts.id.current,role:"group",[Iw]:"","aria-labelledby":((t=this.group.headingNode)==null?void 0:t.id)??void 0}}));this.opts=t,this.group=n,Jt(t)}get props(){return v(A(this,Id))}}Id=new WeakMap;var Od,Nd;class UM{constructor(t,n){Y(this,"opts");Y(this,"root");F(this,Od,N(()=>{var n;const t=(n=this.root.viewportNode)==null?void 0:n.querySelector(`${Rw}[${Ki}="${Tw(this.root.opts.value.current)}"]`);if(t)return(t==null?void 0:t.getAttribute("id"))??void 0}));F(this,Nd,N(()=>{var t,n;return{id:this.opts.id.current,type:"text",[RM]:"",autocomplete:"off",autocorrect:"off",spellcheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":dl(!0),"aria-controls":((t=this.root.viewportNode)==null?void 0:t.id)??void 0,"aria-labelledby":((n=this.root.labelNode)==null?void 0:n.id)??void 0,"aria-activedescendant":v(A(this,Od))}}));this.opts=t,this.root=n,Jt({...t,onRefChange:i=>{this.root.inputNode=i}}),ne(()=>this.opts.ref.current,()=>{const i=this.opts.ref.current;i&&this.opts.autofocus.current&&ul(10,()=>i.focus())}),ne(()=>this.opts.value.current,()=>{this.root.commandState.search!==this.opts.value.current&&this.root.setState("search",this.opts.value.current)})}get props(){return v(A(this,Nd))}}Od=new WeakMap,Nd=new WeakMap;var ji,Rd,el,Md,Ld,oo,Dw,Bg,Dd;class GM{constructor(t,n){F(this,oo);Y(this,"opts");Y(this,"root");F(this,ji,null);F(this,Rd,N(()=>{var t;return this.opts.forceMount.current||((t=A(this,ji))==null?void 0:t.opts.forceMount.current)===!0}));F(this,el,bt(""));F(this,Md,N(()=>{if(this.opts.ref.current,v(A(this,Rd))||this.root.opts.shouldFilter.current===!1||!this.root.commandState.search)return!0;const t=this.root.commandState.filtered.items.get(this.trueValue);return t===void 0?!1:t>0}));F(this,Ld,N(()=>this.root.opts.value.current===this.trueValue&&this.trueValue!==""));F(this,Dd,N(()=>({id:this.opts.id.current,"aria-disabled":pp(this.opts.disabled.current),"aria-selected":yI(this.isSelected),"data-disabled":Yn(this.opts.disabled.current),"data-selected":AI(this.isSelected),"data-value":this.trueValue,[Nw]:"",role:"option",onpointermove:this.onpointermove,onclick:this.onclick})));this.opts=t,this.root=n,ce(this,ji,vl.getOr(null)),this.trueValue=t.value.current,Jt({...t,deps:()=>!!this.root.commandState.search}),ne([()=>this.trueValue,()=>{var i;return(i=A(this,ji))==null?void 0:i.trueValue},()=>this.opts.forceMount.current],()=>{var i;if(!this.opts.forceMount.current)return this.root.registerItem(this.trueValue,(i=A(this,ji))==null?void 0:i.trueValue)}),ne([()=>this.opts.value.current,()=>this.opts.ref.current],()=>{var i,s;!this.opts.value.current&&((i=this.opts.ref.current)!=null&&i.textContent)&&(this.trueValue=this.opts.ref.current.textContent.trim()),this.root.registerValue(this.trueValue,t.keywords.current.map(a=>a.trim())),(s=this.opts.ref.current)==null||s.setAttribute(Ki,this.trueValue)}),this.onclick=this.onclick.bind(this),this.onpointermove=this.onpointermove.bind(this)}get trueValue(){return v(A(this,el))}set trueValue(t){et(A(this,el),ft(t))}get shouldRender(){return v(A(this,Md))}get isSelected(){return v(A(this,Ld))}onpointermove(t){this.opts.disabled.current||this.root.opts.disablePointerSelection.current||Et(this,oo,Bg).call(this)}onclick(t){this.opts.disabled.current||Et(this,oo,Dw).call(this)}get props(){return v(A(this,Dd))}}ji=new WeakMap,Rd=new WeakMap,el=new WeakMap,Md=new WeakMap,Ld=new WeakMap,oo=new WeakSet,Dw=function(){var t;this.opts.disabled.current||(Et(this,oo,Bg).call(this),(t=this.opts.onSelect)==null||t.current())},Bg=function(){this.opts.disabled.current||this.root.setValue(this.trueValue,!0)},Dd=new WeakMap;var Fd;class KM{constructor(t,n){Y(this,"opts");Y(this,"root");F(this,Fd,N(()=>({id:this.opts.id.current,role:"listbox","aria-label":this.opts.ariaLabel.current,[NM]:""})));this.opts=t,this.root=n,Jt(t)}get props(){return v(A(this,Fd))}}Fd=new WeakMap;var Bd;class qM{constructor(t,n){Y(this,"opts");Y(this,"root");F(this,Bd,N(()=>{var t;return{id:this.opts.id.current,[LM]:"",for:(t=this.opts.for)==null?void 0:t.current,style:R0}}));this.opts=t,this.root=n,Jt({...t,onRefChange:i=>{this.root.labelNode=i}})}get props(){return v(A(this,Bd))}}Bd=new WeakMap;function YM(e){return lo.set(new BM(e))}function XM(e){return new VM(e,lo.get())}function ZM(e){const t=vl.getOr(null);return new GM({...e,group:t},lo.get())}function JM(e){return vl.set(new WM(e,lo.get()))}function QM(e){return new zM(e,vl.get())}function jM(e){return new HM(e,vl.get())}function $M(e){return new UM(e,lo.get())}function t3(e){return FM.set(new KM(e,lo.get()))}function e3(e){return new qM(e,lo.get())}var n3=tt("<label><!></label>");function r3(e,t){ht(t,!0);let n=k(t,"id",19,Qt),i=k(t,"ref",15,null),s=At(t,["$$slots","$$events","$$legacy","id","ref","children"]);const a=e3({id:B.with(()=>n()),ref:B.with(()=>i(),h=>i(h))}),l=N(()=>Wt(s,a.props));var u=n3();let d;var f=rt(u);at(f,()=>t.children??Ct),nt(u),St(()=>d=Lt(u,d,{...v(l)})),P(e,u),gt()}var i3=tt("<!> <!>",1),o3=tt("<div><!> <!></div>");function s3(e,t){ht(t,!0);const n=q=>{r3(q,{children:(lt,pt)=>{we();var z=ye();St(()=>De(z,g())),P(lt,z)},$$slots:{default:!0}})};let i=k(t,"id",19,Qt),s=k(t,"ref",15,null),a=k(t,"value",15,""),l=k(t,"onValueChange",3,$t),u=k(t,"onStateChange",3,$t),d=k(t,"loop",3,!1),f=k(t,"shouldFilter",3,!0),h=k(t,"filter",3,Bw),g=k(t,"label",3,""),m=k(t,"vimBindings",3,!0),b=k(t,"disablePointerSelection",3,!1),_=At(t,["$$slots","$$events","$$legacy","id","ref","value","onValueChange","onStateChange","loop","shouldFilter","filter","label","vimBindings","disablePointerSelection","children","child"]);const w=YM({id:B.with(()=>i()),ref:B.with(()=>s(),q=>s(q)),filter:B.with(()=>h()),shouldFilter:B.with(()=>f()),loop:B.with(()=>d()),value:B.with(()=>a(),q=>{a()!==q&&(a(q),l()(q))}),vimBindings:B.with(()=>m()),disablePointerSelection:B.with(()=>b()),onStateChange:B.with(()=>u())}),x=q=>w.updateSelectedToIndex(q),S=q=>w.updateSelectedByGroup(q),I=q=>w.updateSelectedByItem(q),T=()=>w.getValidItems(),O=N(()=>Wt(_,w.props));var D=X(),L=W(D);{var M=q=>{var lt=i3(),pt=W(lt);n(pt);var z=mt(pt,2);at(z,()=>t.child,()=>({props:v(O)})),P(q,lt)},G=q=>{var lt=o3();let pt;var z=rt(lt);n(z);var $=mt(z,2);at($,()=>t.children??Ct),nt(lt),St(()=>pt=Lt(lt,pt,{...v(O)})),P(q,lt)};_t(L,q=>{t.child?q(M):q(G,!1)})}return P(e,D),gt({updateSelectedToIndex:x,updateSelectedByGroup:S,updateSelectedByItem:I,getValidItems:T})}var a3=tt("<div><!></div>");function l3(e,t){ht(t,!0);let n=k(t,"id",19,Qt),i=k(t,"ref",15,null),s=k(t,"forceMount",3,!1),a=At(t,["$$slots","$$events","$$legacy","id","ref","children","child","forceMount"]);const l=XM({id:B.with(()=>n()),ref:B.with(()=>i(),g=>i(g)),forceMount:B.with(()=>s())}),u=N(()=>Wt(l.props,a));var d=X(),f=W(d);{var h=g=>{var m=X(),b=W(m);{var _=x=>{var S=X(),I=W(S);at(I,()=>t.child,()=>({props:v(u)})),P(x,S)},w=x=>{var S=a3();let I;var T=rt(S);at(T,()=>t.children??Ct),nt(S),St(()=>I=Lt(S,I,{...v(u)})),P(x,S)};_t(b,x=>{t.child?x(_):x(w,!1)})}P(g,m)};_t(f,g=>{l.shouldRender&&g(h)})}P(e,d),gt()}var c3=tt("<div><!></div>");function u3(e,t){ht(t,!0);let n=k(t,"id",19,Qt),i=k(t,"ref",15,null),s=k(t,"value",3,""),a=k(t,"forceMount",3,!1),l=At(t,["$$slots","$$events","$$legacy","id","ref","value","forceMount","children","child"]);const u=JM({id:B.with(()=>n()),ref:B.with(()=>i(),b=>i(b)),forceMount:B.with(()=>a()),value:B.with(()=>s())}),d=N(()=>Wt(l,u.props));var f=X(),h=W(f);{var g=b=>{var _=X(),w=W(_);at(w,()=>t.child,()=>({props:v(d)})),P(b,_)},m=b=>{var _=c3();let w;var x=rt(_);at(x,()=>t.children??Ct),nt(_),St(()=>w=Lt(_,w,{...v(d)})),P(b,_)};_t(h,b=>{t.child?b(g):b(m,!1)})}P(e,f),gt()}var d3=tt("<div><!></div>");function f3(e,t){ht(t,!0);let n=k(t,"id",19,Qt),i=k(t,"ref",15,null),s=At(t,["$$slots","$$events","$$legacy","id","ref","children","child"]);const a=QM({id:B.with(()=>n()),ref:B.with(()=>i(),g=>i(g))}),l=N(()=>Wt(s,a.props));var u=X(),d=W(u);{var f=g=>{var m=X(),b=W(m);at(b,()=>t.child,()=>({props:v(l)})),P(g,m)},h=g=>{var m=d3();let b;var _=rt(m);at(_,()=>t.children??Ct),nt(m),St(()=>b=Lt(m,b,{...v(l)})),P(g,m)};_t(d,g=>{t.child?g(f):g(h,!1)})}P(e,u),gt()}var h3=tt("<div><!></div>"),g3=tt('<div style="display: contents;"><!></div>');function p3(e,t){ht(t,!0);let n=k(t,"id",19,Qt),i=k(t,"ref",15,null),s=At(t,["$$slots","$$events","$$legacy","id","ref","children","child"]);const a=jM({id:B.with(()=>n()),ref:B.with(()=>i(),g=>i(g))}),l=N(()=>Wt(s,a.props));var u=g3(),d=rt(u);{var f=g=>{var m=X(),b=W(m);at(b,()=>t.child,()=>({props:v(l)})),P(g,m)},h=g=>{var m=h3();let b;var _=rt(m);at(_,()=>t.children??Ct),nt(m),St(()=>b=Lt(m,b,{...v(l)})),P(g,m)};_t(d,g=>{t.child?g(f):g(h,!1)})}nt(u),P(e,u),gt()}var v3=tt("<input>");function m3(e,t){ht(t,!0);let n=k(t,"value",15,""),i=k(t,"autofocus",3,!1),s=k(t,"id",19,Qt),a=k(t,"ref",15,null),l=At(t,["$$slots","$$events","$$legacy","value","autofocus","id","ref","child"]);const u=$M({id:B.with(()=>s()),ref:B.with(()=>a(),b=>a(b)),value:B.with(()=>n(),b=>{n(b)}),autofocus:B.with(()=>i()??!1)}),d=N(()=>Wt(l,u.props));var f=X(),h=W(f);{var g=b=>{var _=X(),w=W(_);at(w,()=>t.child,()=>({props:v(d)})),P(b,_)},m=b=>{var _=v3();Fc(_);let w;St(()=>w=Lt(_,w,{...v(d)})),y0(_,n),P(b,_)};_t(h,b=>{t.child?b(g):b(m,!1)})}P(e,f),gt()}var b3=tt("<div><!></div>"),_3=tt('<div style="display: contents;" data-item-wrapper=""><!></div>');function w3(e,t){ht(t,!0);let n=k(t,"id",19,Qt),i=k(t,"ref",15,null),s=k(t,"value",3,""),a=k(t,"disabled",3,!1),l=k(t,"onSelect",3,$t),u=k(t,"forceMount",3,!1),d=k(t,"keywords",19,()=>[]),f=At(t,["$$slots","$$events","$$legacy","id","ref","value","disabled","children","child","onSelect","forceMount","keywords"]);const h=ZM({id:B.with(()=>n()),ref:B.with(()=>i(),_=>i(_)),value:B.with(()=>s()),disabled:B.with(()=>a()),onSelect:B.with(()=>l()),forceMount:B.with(()=>u()),keywords:B.with(()=>d())}),g=N(()=>Wt(f,h.props));var m=X(),b=W(m);Gs(b,()=>h.root.key,_=>{var w=_3(),x=rt(w);{var S=I=>{var T=X(),O=W(T);{var D=M=>{var G=X(),q=W(G);at(q,()=>t.child,()=>({props:v(g)})),P(M,G)},L=M=>{var G=b3();let q;var lt=rt(G);at(lt,()=>t.children??Ct),nt(G),St(()=>q=Lt(G,q,{...v(g)})),P(M,G)};_t(O,M=>{t.child?M(D):M(L,!1)})}P(I,T)};_t(x,I=>{h.shouldRender&&I(S)})}nt(w),St(()=>He(w,"data-value",h.trueValue)),P(_,w)}),P(e,m),gt()}var y3=tt("<div><!></div>");function x3(e,t){ht(t,!0);let n=k(t,"id",19,Qt),i=k(t,"ref",15,null),s=At(t,["$$slots","$$events","$$legacy","id","ref","child","children","aria-label"]);const a=t3({id:B.with(()=>n()),ref:B.with(()=>i(),f=>i(f)),ariaLabel:B.with(()=>t["aria-label"]??"Suggestions...")}),l=N(()=>Wt(s,a.props));var u=X(),d=W(u);Gs(d,()=>a.root._commandState.search==="",f=>{var h=X(),g=W(h);{var m=_=>{var w=X(),x=W(w);at(x,()=>t.child,()=>({props:v(l)})),P(_,w)},b=_=>{var w=y3();let x;var S=rt(w);at(S,()=>t.children??Ct),nt(w),St(()=>x=Lt(w,x,{...v(l)})),P(_,w)};_t(g,_=>{t.child?_(m):_(b,!1)})}P(f,h)}),P(e,u),gt()}const d_=1,S3=.9,A3=.8,C3=.17,tg=.1,eg=.999,P3=.9999,E3=.99,T3=/[\\/_+.#"@[({&]/,k3=/[\\/_+.#"@[({&]/g,I3=/[\s-]/,Fw=/[\s-]/g;function Vg(e,t,n,i,s,a,l){if(a===t.length)return s===e.length?d_:E3;const u=`${s},${a}`;if(l[u]!==void 0)return l[u];const d=i.charAt(a);let f=n.indexOf(d,s),h=0,g,m,b,_;for(;f>=0;)g=Vg(e,t,n,i,f+1,a+1,l),g>h&&(f===s?g*=d_:T3.test(e.charAt(f-1))?(g*=A3,b=e.slice(s,f-1).match(k3),b&&s>0&&(g*=eg**b.length)):I3.test(e.charAt(f-1))?(g*=S3,_=e.slice(s,f-1).match(Fw),_&&s>0&&(g*=eg**_.length)):(g*=C3,s>0&&(g*=eg**(f-s))),e.charAt(f)!==t.charAt(a)&&(g*=P3)),(g<tg&&n.charAt(f-1)===i.charAt(a+1)||i.charAt(a+1)===i.charAt(a)&&n.charAt(f-1)!==i.charAt(a))&&(m=Vg(e,t,n,i,f+1,a+2,l),m*tg>g&&(g=m*tg)),g>h&&(h=g),f=n.indexOf(d,f+1);return l[u]=h,h}function f_(e){return e.toLowerCase().replace(Fw," ")}function Bw(e,t,n){return e=n&&n.length>0?`${`${e} ${n==null?void 0:n.join(" ")}`}`:e,Vg(e,t,f_(e),f_(t),0,0,{})}var nl,rl;class O3{constructor(t){Y(this,"opts");F(this,nl,bt(null));F(this,rl,bt(null));this.opts=t}get contentNode(){return v(A(this,nl))}set contentNode(t){et(A(this,nl),ft(t))}get triggerNode(){return v(A(this,rl))}set triggerNode(t){et(A(this,rl),ft(t))}toggleOpen(){this.opts.open.current=!this.opts.open.current}handleClose(){this.opts.open.current&&(this.opts.open.current=!1)}}nl=new WeakMap,rl=new WeakMap;var Vd,Vw,Wd;class N3{constructor(t,n){F(this,Vd);Y(this,"opts");Y(this,"root");F(this,Wd,N(()=>({id:this.opts.id.current,"aria-haspopup":"dialog","aria-expanded":dl(this.root.opts.open.current),"data-state":Ri(this.root.opts.open.current),"aria-controls":Et(this,Vd,Vw).call(this),"data-popover-trigger":"",disabled:this.opts.disabled.current,onkeydown:this.onkeydown,onclick:this.onclick})));this.opts=t,this.root=n,Jt({...t,onRefChange:i=>{this.root.triggerNode=i}}),this.onclick=this.onclick.bind(this),this.onkeydown=this.onkeydown.bind(this)}onclick(t){this.opts.disabled.current||t.button===0&&this.root.toggleOpen()}onkeydown(t){this.opts.disabled.current||(t.key===Yr||t.key===Kr)&&(t.preventDefault(),this.root.toggleOpen())}get props(){return v(A(this,Wd))}}Vd=new WeakSet,Vw=function(){var t,n;if(this.root.opts.open.current&&((t=this.root.contentNode)!=null&&t.id))return(n=this.root.contentNode)==null?void 0:n.id},Wd=new WeakMap;var zd,Hd;class R3{constructor(t,n){Y(this,"opts");Y(this,"root");Y(this,"onInteractOutside",t=>{this.opts.onInteractOutside.current(t),!(t.defaultPrevented||!G0(t.target)||t.target.closest("[data-popover-trigger]")===this.root.triggerNode)&&this.root.handleClose()});Y(this,"onEscapeKeydown",t=>{this.opts.onEscapeKeydown.current(t),!t.defaultPrevented&&this.root.handleClose()});Y(this,"onCloseAutoFocus",t=>{var n;this.opts.onCloseAutoFocus.current(t),!t.defaultPrevented&&(t.preventDefault(),(n=this.root.triggerNode)==null||n.focus())});F(this,zd,N(()=>({open:this.root.opts.open.current})));F(this,Hd,N(()=>({id:this.opts.id.current,tabindex:-1,"data-state":Ri(this.root.opts.open.current),"data-popover-content":"",style:{pointerEvents:"auto"}})));Y(this,"popperProps",{onInteractOutside:this.onInteractOutside,onEscapeKeydown:this.onEscapeKeydown,onCloseAutoFocus:this.onCloseAutoFocus});this.opts=t,this.root=n,Jt({...t,deps:()=>this.root.opts.open.current,onRefChange:i=>{this.root.contentNode=i}})}get snippetProps(){return v(A(this,zd))}get props(){return v(A(this,Hd))}}zd=new WeakMap,Hd=new WeakMap;const Op=new sn("Popover.Root");function M3(e){return Op.set(new O3(e))}function L3(e){return new N3(e,Op.get())}function D3(e){return new R3(e,Op.get())}var F3=tt("<div><div><!></div></div>"),B3=tt("<div><div><!></div></div>");function V3(e,t){ht(t,!0);let n=k(t,"ref",15,null),i=k(t,"id",19,Qt),s=k(t,"forceMount",3,!1),a=k(t,"onCloseAutoFocus",3,$t),l=k(t,"onEscapeKeydown",3,$t),u=k(t,"onInteractOutside",3,$t),d=k(t,"trapFocus",3,!0),f=k(t,"preventScroll",3,!1),h=At(t,["$$slots","$$events","$$legacy","child","children","ref","id","forceMount","onCloseAutoFocus","onEscapeKeydown","onInteractOutside","trapFocus","preventScroll"]);const g=D3({id:B.with(()=>i()),ref:B.with(()=>n(),S=>n(S)),onInteractOutside:B.with(()=>u()),onEscapeKeydown:B.with(()=>l()),onCloseAutoFocus:B.with(()=>a())}),m=N(()=>Wt(h,g.props));var b=X(),_=W(b);{var w=S=>{Pw(S,Rt(()=>v(m),()=>g.popperProps,{get enabled(){return g.root.opts.open.current},get id(){return i()},get trapFocus(){return d()},get preventScroll(){return f()},loop:!0,forceMount:!0,popper:(T,O)=>{let D=()=>O==null?void 0:O().props,L=()=>O==null?void 0:O().wrapperProps;var M=X();const G=N(()=>Wt(D(),{style:l_("popover")}));var q=W(M);{var lt=z=>{var $=X(),H=W($),J=nn(()=>({props:v(G),wrapperProps:L(),...g.snippetProps}));at(H,()=>t.child,()=>v(J)),P(z,$)},pt=z=>{var $=F3();let H;var J=rt($);let Q;var ot=rt(J);at(ot,()=>t.children??Ct),nt(J),nt($),St(()=>{H=Lt($,H,{...L()}),Q=Lt(J,Q,{...v(G)})}),P(z,$)};_t(q,z=>{t.child?z(lt):z(pt,!1)})}P(T,M)},$$slots:{popper:!0}}))},x=(S,I)=>{{var T=O=>{Cw(O,Rt(()=>v(m),()=>g.popperProps,{get present(){return g.root.opts.open.current},get id(){return i()},get trapFocus(){return d()},get preventScroll(){return f()},loop:!0,forceMount:!1,popper:(L,M)=>{let G=()=>M==null?void 0:M().props,q=()=>M==null?void 0:M().wrapperProps;var lt=X();const pt=N(()=>Wt(G(),{style:l_("popover")}));var z=W(lt);{var $=J=>{var Q=X(),ot=W(Q),Z=nn(()=>({props:v(pt),wrapperProps:q(),...g.snippetProps}));at(ot,()=>t.child,()=>v(Z)),P(J,Q)},H=J=>{var Q=B3();let ot;var Z=rt(Q);let ct;var wt=rt(Z);at(wt,()=>t.children??Ct),nt(Z),nt(Q),St(()=>{ot=Lt(Q,ot,{...q()}),ct=Lt(Z,ct,{...v(pt)})}),P(J,Q)};_t(z,J=>{t.child?J($):J(H,!1)})}P(L,lt)},$$slots:{popper:!0}}))};_t(S,O=>{s()||O(T)},I)}};_t(_,S=>{s()?S(w):S(x,!1)})}P(e,b),gt()}var W3=tt("<button><!></button>");function z3(e,t){ht(t,!0);let n=k(t,"id",19,Qt),i=k(t,"ref",15,null),s=k(t,"type",3,"button"),a=k(t,"disabled",3,!1),l=At(t,["$$slots","$$events","$$legacy","children","child","id","ref","type","disabled"]);const u=L3({id:B.with(()=>n()),ref:B.with(()=>i(),m=>i(m)),disabled:B.with(()=>!!a())}),d=N(()=>Wt(l,u.props,{type:s()})),f=Qr(),[h,g]=f;Sw(e,{get id(){return n()},children:(m,b)=>{var _=X(),w=W(_);{var x=I=>{var T=X(),O=W(T);at(O,()=>t.child,()=>({props:v(d)})),P(I,T)},S=I=>{var T=W3();let O;var D=rt(T);at(D,()=>t.children??Ct),nt(T),St(L=>O=Lt(T,O,{...L}),[()=>g({...v(d)},[{attribute_name:"formaction"}])]),P(I,T)};_t(w,I=>{t.child?I(x):I(S,!1)})}P(m,_)},$$slots:{default:!0}}),gt()}function H3(e,t){ht(t,!0);let n=k(t,"open",15,!1),i=k(t,"onOpenChange",3,$t);KI({variant:B.with(()=>"dialog"),open:B.with(()=>n(),l=>{n(l),i()(l)})});var s=X(),a=W(s);at(a,()=>t.children??Ct),P(e,s),gt()}var U3=tt("<button><!></button>");function Ww(e,t){ht(t,!0);let n=k(t,"id",19,Qt),i=k(t,"ref",15,null),s=k(t,"disabled",3,!1),a=At(t,["$$slots","$$events","$$legacy","children","child","id","ref","disabled"]);const l=QI({variant:B.with(()=>"close"),id:B.with(()=>n()),ref:B.with(()=>i(),w=>i(w)),disabled:B.with(()=>!!s())}),u=N(()=>Wt(a,l.props)),d=Qr(),[f,h]=d;var g=X(),m=W(g);{var b=w=>{var x=X(),S=W(x);at(S,()=>t.child,()=>({props:v(u)})),P(w,x)},_=w=>{var x=U3();let S;var I=rt(x);at(I,()=>t.children??Ct),nt(x),St(T=>S=Lt(x,S,{...T}),[()=>h({...v(u)},[{attribute_name:"formaction"}])]),P(w,x)};_t(m,w=>{t.child?w(b):w(_,!1)})}P(e,g),gt()}var G3=tt("<!> <!>",1),K3=tt("<!> <div><!></div>",1);function zw(e,t){ht(t,!0);let n=k(t,"id",19,Qt),i=k(t,"ref",15,null),s=k(t,"forceMount",3,!1),a=k(t,"onCloseAutoFocus",3,$t),l=k(t,"onOpenAutoFocus",3,$t),u=k(t,"onEscapeKeydown",3,$t),d=k(t,"onInteractOutside",3,$t),f=k(t,"trapFocus",3,!0),h=k(t,"preventScroll",3,!0),g=k(t,"restoreScrollDelay",3,null),m=At(t,["$$slots","$$events","$$legacy","id","children","child","ref","forceMount","onCloseAutoFocus","onOpenAutoFocus","onEscapeKeydown","onInteractOutside","trapFocus","preventScroll","restoreScrollDelay"]);const b=XI({id:B.with(()=>n()),ref:B.with(()=>i(),x=>i(x))}),_=N(()=>Wt(m,b.props)),w=N(()=>b.root.opts.open.current||s());xf(e,Rt(()=>v(_),{get forceMount(){return s()},get present(){return v(w)},presence:S=>{const I=N(()=>qO({forceMount:s(),present:b.root.opts.open.current,trapFocus:f(),open:b.root.opts.open.current}));nw(S,{loop:!0,get trapFocus(){return v(I)},get onOpenAutoFocus(){return l()},get id(){return n()},onCloseAutoFocus:O=>{var D;a()(O),!O.defaultPrevented&&((D=b.root.triggerNode)==null||D.focus())},focusScope:(O,D)=>{let L=()=>D==null?void 0:D().props;j0(O,Rt(()=>v(_),{get enabled(){return b.root.opts.open.current},onEscapeKeydown:M=>{u()(M),!M.defaultPrevented&&b.root.handleClose()},children:(M,G)=>{Q0(M,Rt(()=>v(_),{get enabled(){return b.root.opts.open.current},onInteractOutside:q=>{d()(q),!q.defaultPrevented&&b.root.handleClose()},children:(q,lt)=>{iw(q,Rt(()=>v(_),{get enabled(){return b.root.opts.open.current},children:(pt,z)=>{var $=X(),H=W($);{var J=ot=>{var Z=G3(),ct=W(Z);{var wt=yt=>{zc(yt,{get preventScroll(){return h()},get restoreScrollDelay(){return g()}})};_t(ct,yt=>{b.root.opts.open.current&&yt(wt)})}var it=mt(ct,2),xt=nn(()=>({props:Wt(v(_),L()),...b.snippetProps}));at(it,()=>t.child,()=>v(xt)),P(ot,Z)},Q=ot=>{var Z=K3(),ct=W(Z);zc(ct,{get preventScroll(){return h()}});var wt=mt(ct,2);let it;var xt=rt(wt);at(xt,()=>t.children??Ct),nt(wt),St(yt=>it=Lt(wt,it,{...yt}),[()=>Wt(v(_),L())]),P(ot,Z)};_t(H,ot=>{t.child?ot(J):ot(Q,!1)})}P(pt,$)},$$slots:{default:!0}}))},$$slots:{default:!0}}))},$$slots:{default:!0}}))},$$slots:{focusScope:!0}})},$$slots:{presence:!0}})),gt()}const q3="data-label-root";var Ud;class Y3{constructor(t){Y(this,"opts");F(this,Ud,N(()=>({id:this.opts.id.current,[q3]:"",onmousedown:this.onmousedown})));this.opts=t,this.onmousedown=this.onmousedown.bind(this),Jt(t)}onmousedown(t){t.detail>1&&t.preventDefault()}get props(){return v(A(this,Ud))}}Ud=new WeakMap;function X3(e){return new Y3(e)}var Z3=tt("<label><!></label>");function J3(e,t){ht(t,!0);let n=k(t,"id",19,Qt),i=k(t,"ref",15,null),s=At(t,["$$slots","$$events","$$legacy","children","child","id","ref","for"]);const a=X3({id:B.with(()=>n()),ref:B.with(()=>i(),g=>i(g))}),l=N(()=>Wt(s,a.props,{for:t.for}));var u=X(),d=W(u);{var f=g=>{var m=X(),b=W(m);at(b,()=>t.child,()=>({props:v(l)})),P(g,m)},h=g=>{var m=Z3();let b;var _=rt(m);at(_,()=>t.children??Ct),nt(m),St(()=>b=Lt(m,b,{...v(l),for:t.for})),P(g,m)};_t(d,g=>{t.child?g(f):g(h,!1)})}P(e,u),gt()}function Q3(e,t){ht(t,!0);let n=k(t,"open",15,!1),i=k(t,"onOpenChange",3,$t);M3({open:B.with(()=>n(),s=>{n(s),i()(s)})}),mw(e,{children:(s,a)=>{var l=X(),u=W(l);at(u,()=>t.children??Ct),P(s,l)},$$slots:{default:!0}}),gt()}var j3=tt("<!> <!>",1);function $3(e,t){ht(t,!0);let n=k(t,"value",15),i=k(t,"onValueChange",3,$t),s=k(t,"name",3,""),a=k(t,"disabled",3,!1),l=k(t,"open",15,!1),u=k(t,"onOpenChange",3,$t),d=k(t,"loop",3,!1),f=k(t,"scrollAlignment",3,"nearest"),h=k(t,"required",3,!1),g=k(t,"items",19,()=>[]),m=k(t,"allowDeselect",3,!1);function b(){n()===void 0&&n(t.type==="single"?"":[])}b(),ne.pre(()=>n(),()=>{b()});const _=XR({type:t.type,value:B.with(()=>n(),O=>{n(O),i()(O)}),disabled:B.with(()=>a()),required:B.with(()=>h()),open:B.with(()=>l(),O=>{l(O),u()(O)}),loop:B.with(()=>d()),scrollAlignment:B.with(()=>f()),name:B.with(()=>s()),isCombobox:!1,items:B.with(()=>g()),allowDeselect:B.with(()=>m())});var w=j3(),x=W(w);mw(x,{children:(O,D)=>{var L=X(),M=W(L);at(M,()=>t.children??Ct),P(O,L)},$$slots:{default:!0}});var S=mt(x,2);{var I=O=>{var D=X(),L=W(D);{var M=G=>{var q=X(),lt=W(q);Ti(lt,17,()=>_.opts.value.current,yf,(pt,z)=>{c_(pt,{get value(){return v(z)}})}),P(G,q)};_t(L,G=>{_.opts.value.current.length&&G(M)})}P(O,D)},T=O=>{c_(O,{get value(){return _.opts.value.current},set value(D){_.opts.value.current=D}})};_t(S,O=>{Array.isArray(_.opts.value.current)?O(I):O(T,!1)})}P(e,w),gt()}var t5=tt("<button><!></button>");function e5(e,t){ht(t,!0);let n=k(t,"id",19,Qt),i=k(t,"ref",15,null),s=k(t,"type",3,"button"),a=At(t,["$$slots","$$events","$$legacy","id","ref","child","children","type"]);const l=JR({id:B.with(()=>n()),ref:B.with(()=>i(),b=>i(b))}),u=N(()=>Wt(a,l.props,{type:s()})),d=Qr(),[f,h]=d;var g=X(),m=W(g);Ot(m,()=>Sw,(b,_)=>{_(b,{get id(){return n()},children:(w,x)=>{var S=X(),I=W(S);{var T=D=>{var L=X(),M=W(L);at(M,()=>t.child,()=>({props:v(u)})),P(D,L)},O=D=>{var L=t5();let M;var G=rt(L);at(G,()=>t.children??Ct),nt(L),St(q=>M=Lt(L,M,{...q}),[()=>h({...v(u)},[{attribute_name:"formaction"}])]),P(D,L)};_t(I,D=>{t.child?D(T):D(O,!1)})}P(w,S)},$$slots:{default:!0}})}),P(e,g),gt()}function n5(e,t,n){const i={position:"absolute"};return e==="lr"?(i.left=`${t}%`,i.right=`${n}%`):e==="rl"?(i.right=`${t}%`,i.left=`${n}%`):e==="bt"?(i.bottom=`${t}%`,i.top=`${n}%`):(i.top=`${t}%`,i.bottom=`${n}%`),i}function Hw(e,t){const n={position:"absolute"};return e==="lr"?(n.left=`${t}%`,n.translate="-50% 0"):e==="rl"?(n.right=`${t}%`,n.translate="50% 0"):e==="bt"?(n.bottom=`${t}%`,n.translate="0 50%"):(n.top=`${t}%`,n.translate="0 -50%"),n}function Uw(e,t,n){const i={position:"absolute"};return e==="lr"?(i.left=`${t}%`,i.translate=`${n}% 0`):e==="rl"?(i.right=`${t}%`,i.translate=`${-n}% 0`):e==="bt"?(i.bottom=`${t}%`,i.translate=`0 ${-n}%`):(i.top=`${t}%`,i.translate=`0 ${n}%`),i}function Mo(e,t,n,i){const s=(e-(Number.isNaN(t)?0:t))%i;let a=Math.abs(s)*2>=i?e+Math.sign(s)*(i-Math.abs(s)):e-s;Number.isNaN(t)?!Number.isNaN(n)&&a>n&&(a=Math.floor(n/i)*i):a<t?a=t:!Number.isNaN(n)&&a>n&&(a=t+Math.floor((n-t)/i)*i);const l=i.toString(),u=l.indexOf("."),d=u>=0?l.length-u:0;if(d>0){const f=10**d;a=Math.round(a*f)/f}return a}function Np(e,t,n=!0){const[i,s]=e,[a,l]=t,u=(l-a)/(s-i);return d=>{const f=a+u*(d-i);return n?f>Math.max(a,l)?Math.max(a,l):f<Math.min(a,l)?Math.min(a,l):f:f}}const r5="data-slider-root",Kc="data-slider-thumb",i5="data-slider-range",Gw="data-slider-tick";var il,Gd,Kd,qd;class Kw{constructor(t){Y(this,"opts");F(this,il,bt(!1));F(this,Gd,N(()=>this.opts.orientation.current==="horizontal"?this.opts.dir.current==="rtl"?"rl":"lr":this.opts.dir.current==="rtl"?"tb":"bt"));F(this,Kd,N(()=>{if(!this.opts.disabled.current)return this.opts.orientation.current==="horizontal"?"pan-y":"pan-x"}));Y(this,"getAllThumbs",()=>{const t=this.opts.ref.current;return t?Array.from(t.querySelectorAll(`[${Kc}]`)):[]});Y(this,"getThumbScale",()=>{var d,f;if(this.opts.thumbPositioning.current==="exact")return[0,100];const t=this.opts.orientation.current==="vertical",n=this.getAllThumbs()[0],i=t?n==null?void 0:n.offsetHeight:n==null?void 0:n.offsetWidth;if(i===void 0||Number.isNaN(i)||i===0)return[0,100];const s=t?(d=this.opts.ref.current)==null?void 0:d.offsetHeight:(f=this.opts.ref.current)==null?void 0:f.offsetWidth;if(s===void 0||Number.isNaN(s)||s===0)return[0,100];const a=i/2/s*100,l=a,u=100-a;return[l,u]});Y(this,"getPositionFromValue",t=>{const n=this.getThumbScale();return Np([this.opts.min.current,this.opts.max.current],n)(t)});F(this,qd,N(()=>({id:this.opts.id.current,"data-orientation":this.opts.orientation.current,"data-disabled":Yn(this.opts.disabled.current),style:{touchAction:v(A(this,Kd))},[r5]:""})));this.opts=t,Jt(t)}get isActive(){return v(A(this,il))}set isActive(t){et(A(this,il),ft(t))}get direction(){return v(A(this,Gd))}isThumbActive(t){return this.isActive}get props(){return v(A(this,qd))}}il=new WeakMap,Gd=new WeakMap,Kd=new WeakMap,qd=new WeakMap;var Yd,Xd,Zd,Jd,Qd;class o5 extends Kw{constructor(n){super(n);Y(this,"opts");Y(this,"isMulti",!1);Y(this,"updateValue",n=>{this.opts.value.current=Mo(n,this.opts.min.current,this.opts.max.current,this.opts.step.current)});Y(this,"handlePointerMove",n=>{if(!this.isActive||this.opts.disabled.current)return;n.preventDefault(),n.stopPropagation();const i=this.opts.ref.current,s=this.getAllThumbs()[0];if(!i||!s)return;s.focus();const{left:a,right:l,top:u,bottom:d}=i.getBoundingClientRect();this.direction==="lr"?this.applyPosition({clientXY:n.clientX,start:a,end:l}):this.direction==="rl"?this.applyPosition({clientXY:n.clientX,start:l,end:a}):this.direction==="bt"?this.applyPosition({clientXY:n.clientY,start:d,end:u}):this.direction==="tb"&&this.applyPosition({clientXY:n.clientY,start:u,end:d})});Y(this,"handlePointerDown",n=>{if(n.button!==0||this.opts.disabled.current)return;const i=this.opts.ref.current,s=this.getAllThumbs()[0];if(!s||!i)return;const a=n.target;!K0(a)||!i.contains(a)||(n.preventDefault(),s.focus(),this.isActive=!0,this.handlePointerMove(n))});Y(this,"handlePointerUp",()=>{this.opts.disabled.current||(this.isActive&&this.opts.onValueCommit.current(On(()=>this.opts.value.current)),this.isActive=!1)});F(this,Yd,N(()=>{const n=this.opts.value.current;return Array.from({length:1},()=>{const i=n,s=this.getPositionFromValue(i),a=Hw(this.direction,s);return{role:"slider","aria-valuemin":this.opts.min.current,"aria-valuemax":this.opts.max.current,"aria-valuenow":i,"aria-disabled":pp(this.opts.disabled.current),"aria-orientation":this.opts.orientation.current,"data-value":i,tabindex:this.opts.disabled.current?-1:0,style:a,[Kc]:""}})}));F(this,Xd,N(()=>this.thumbsPropsArr.map((n,i)=>i)));F(this,Zd,N(()=>{const n=this.opts.max.current,i=this.opts.min.current,s=this.opts.step.current,a=n-i;let l=Math.ceil(a/s);a%s==0&&l++;const u=this.opts.value.current;return Array.from({length:l},(d,f)=>{const h=f*s,g=Np([0,(l-1)*s],this.getThumbScale()),m=f===0,b=f===l-1,_=m?0:b?-100:-50,w=Uw(this.direction,g(h),_),x=i+f*s,S=x<=u;return{"data-disabled":Yn(this.opts.disabled.current),"data-orientation":this.opts.orientation.current,"data-bounded":S?"":void 0,"data-value":x,style:w,[Gw]:""}})}));F(this,Jd,N(()=>this.ticksPropsArr.map((n,i)=>i)));F(this,Qd,N(()=>({ticks:this.ticksRenderArr,thumbs:this.thumbsRenderArr})));this.opts=n,gp(()=>Gr(Ne(document,"pointerdown",this.handlePointerDown),Ne(document,"pointerup",this.handlePointerUp),Ne(document,"pointermove",this.handlePointerMove),Ne(document,"pointerleave",this.handlePointerUp))),ne([()=>this.opts.step.current,()=>this.opts.min.current,()=>this.opts.max.current,()=>this.opts.value.current],([i,s,a,l])=>{const u=f=>Mo(f,s,a,i)===f,d=f=>Mo(f,s,a,i);u(l)||(this.opts.value.current=d(l))})}applyPosition({clientXY:n,start:i,end:s}){const a=this.opts.min.current,l=this.opts.max.current,d=(n-i)/(s-i)*(l-a)+a;if(d<a)this.updateValue(a);else if(d>l)this.updateValue(l);else{const f=this.opts.step.current,h=Math.floor((d-a)/f),g=a+h*f+f/2,m=a+(h+1)*f+f/2,b=d>=g&&d<m?(h+1)*f+a:h*f+a;b<=l&&this.updateValue(b)}}get thumbsPropsArr(){return v(A(this,Yd))}get thumbsRenderArr(){return v(A(this,Xd))}get ticksPropsArr(){return v(A(this,Zd))}get ticksRenderArr(){return v(A(this,Jd))}get snippetProps(){return v(A(this,Qd))}}Yd=new WeakMap,Xd=new WeakMap,Zd=new WeakMap,Jd=new WeakMap,Qd=new WeakMap;var ol,sl,jd,$d,tf,ef,nf,rf;class s5 extends Kw{constructor(n){super(n);Y(this,"opts");Y(this,"isMulti",!0);F(this,ol,bt(null));F(this,sl,bt(0));F(this,jd,n=>{const i=this.getAllThumbs();if(!i.length)return;for(const u of i)u.blur();const s=i.map(u=>{if(this.opts.orientation.current==="horizontal"){const{left:d,right:f}=u.getBoundingClientRect();return Math.abs(n.clientX-(d+f)/2)}else{const{top:d,bottom:f}=u.getBoundingClientRect();return Math.abs(n.clientY-(d+f)/2)}}),a=i[s.indexOf(Math.min(...s))],l=i.indexOf(a);return{node:a,idx:l}});Y(this,"handlePointerMove",n=>{if(!this.isActive||this.opts.disabled.current)return;n.preventDefault(),n.stopPropagation();const i=this.opts.ref.current,s=this.activeThumb;if(!i||!s)return;s.node.focus();const{left:a,right:l,top:u,bottom:d}=i.getBoundingClientRect(),f=this.direction;f==="lr"?this.applyPosition({clientXY:n.clientX,activeThumbIdx:s.idx,start:a,end:l}):f==="rl"?this.applyPosition({clientXY:n.clientX,activeThumbIdx:s.idx,start:l,end:a}):f==="bt"?this.applyPosition({clientXY:n.clientY,activeThumbIdx:s.idx,start:d,end:u}):f==="tb"&&this.applyPosition({clientXY:n.clientY,activeThumbIdx:s.idx,start:u,end:d})});Y(this,"handlePointerDown",n=>{if(n.button!==0||this.opts.disabled.current)return;const i=this.opts.ref.current,s=A(this,jd).call(this,n);if(!s||!i)return;const a=n.target;!K0(a)||!i.contains(a)||(n.preventDefault(),this.activeThumb=s,s.node.focus(),this.isActive=!0,this.handlePointerMove(n))});Y(this,"handlePointerUp",()=>{this.opts.disabled.current||(this.isActive&&this.opts.onValueCommit.current(On(()=>this.opts.value.current)),this.isActive=!1)});Y(this,"getAllThumbs",()=>{const n=this.opts.ref.current;return n?Array.from(n.querySelectorAll(`[${Kc}]`)):[]});Y(this,"updateValue",(n,i)=>{const s=this.opts.value.current;if(!s.length){this.opts.value.current.push(n);return}if(s[i]===n)return;const l=[...s];if(!jO(i,l))return;const u=l[i]>n?-1:1,d=()=>{var _;const m=i+u;l[i]=l[m],l[m]=n;const b=this.getAllThumbs();b.length&&((_=b[m])==null||_.focus(),this.activeThumb={node:b[m],idx:m})};if(this.opts.autoSort.current&&(u===-1&&n<l[i-1]||u===1&&n>l[i+1])){d(),this.opts.value.current=l;return}const f=this.opts.min.current,h=this.opts.max.current,g=this.opts.step.current;l[i]=Mo(n,f,h,g),this.opts.value.current=l});F(this,$d,N(()=>{const n=this.opts.value.current;return Array.from({length:n.length||1},(i,s)=>{const a=On(()=>this.currentThumbIdx);a<n.length&&On(()=>{this.currentThumbIdx=a+1});const l=n[s],u=this.getPositionFromValue(l??0),d=Hw(this.direction,u);return{role:"slider","aria-valuemin":this.opts.min.current,"aria-valuemax":this.opts.max.current,"aria-valuenow":l,"aria-disabled":pp(this.opts.disabled.current),"aria-orientation":this.opts.orientation.current,"data-value":l,tabindex:this.opts.disabled.current?-1:0,style:d,[Kc]:""}})}));F(this,tf,N(()=>this.thumbsPropsArr.map((n,i)=>i)));F(this,ef,N(()=>{const n=this.opts.max.current,i=this.opts.min.current,s=this.opts.step.current,a=n-i;let l=Math.ceil(a/s);a%s==0&&l++;const u=this.opts.value.current;return Array.from({length:l},(d,f)=>{const h=f*s,g=Np([0,(l-1)*s],this.getThumbScale()),m=f===0,b=f===l-1,_=m?0:b?-100:-50,w=Uw(this.direction,g(h),_),x=i+f*s,S=u.length===1?x<=u[0]:u[0]<=x&&x<=u[u.length-1];return{"data-disabled":Yn(this.opts.disabled.current),"data-orientation":this.opts.orientation.current,"data-bounded":S?"":void 0,"data-value":x,style:w,[Gw]:""}})}));F(this,nf,N(()=>this.ticksPropsArr.map((n,i)=>i)));F(this,rf,N(()=>({ticks:this.ticksRenderArr,thumbs:this.thumbsRenderArr})));this.opts=n,gp(()=>Gr(Ne(document,"pointerdown",this.handlePointerDown),Ne(document,"pointerup",this.handlePointerUp),Ne(document,"pointermove",this.handlePointerMove),Ne(document,"pointerleave",this.handlePointerUp))),ne([()=>this.opts.step.current,()=>this.opts.min.current,()=>this.opts.max.current,()=>this.opts.value.current],([i,s,a,l])=>{const u=f=>Mo(f,s,a,i)===f,d=f=>Mo(f,s,a,i);l.some(f=>!u(f))&&(this.opts.value.current=l.map(d))})}get activeThumb(){return v(A(this,ol))}set activeThumb(n){et(A(this,ol),ft(n))}get currentThumbIdx(){return v(A(this,sl))}set currentThumbIdx(n){et(A(this,sl),ft(n))}isThumbActive(n){var i;return this.isActive&&((i=this.activeThumb)==null?void 0:i.idx)===n}applyPosition({clientXY:n,activeThumbIdx:i,start:s,end:a}){const l=this.opts.min.current,u=this.opts.max.current,f=(n-s)/(a-s)*(u-l)+l;if(f<l)this.updateValue(l,i);else if(f>u)this.updateValue(u,i);else{const h=this.opts.step.current,g=Math.floor((f-l)/h),m=l+g*h+h/2,b=l+(g+1)*h+h/2,_=f>=m&&f<b?(g+1)*h+l:g*h+l;_<=u&&this.updateValue(_,i)}}get thumbsPropsArr(){return v(A(this,$d))}get thumbsRenderArr(){return v(A(this,tf))}get ticksPropsArr(){return v(A(this,ef))}get ticksRenderArr(){return v(A(this,nf))}get snippetProps(){return v(A(this,rf))}}ol=new WeakMap,sl=new WeakMap,jd=new WeakMap,$d=new WeakMap,tf=new WeakMap,ef=new WeakMap,nf=new WeakMap,rf=new WeakMap;const a5=[W0,z0,Ur,Ci,hl,fl];var of,sf;class l5{constructor(t,n){Y(this,"opts");Y(this,"root");F(this,of,N(()=>{const t=Array.isArray(this.root.opts.value.current)&&this.root.opts.value.current.length>1?this.root.getPositionFromValue(Math.min(...this.root.opts.value.current)??0):0,n=Array.isArray(this.root.opts.value.current)?100-this.root.getPositionFromValue(Math.max(...this.root.opts.value.current)??0):100-this.root.getPositionFromValue(this.root.opts.value.current);return{position:"absolute",...n5(this.root.direction,t,n)}}));F(this,sf,N(()=>({id:this.opts.id.current,"data-orientation":this.root.opts.orientation.current,"data-disabled":Yn(this.root.opts.disabled.current),style:this.rangeStyles,[i5]:""})));this.opts=t,this.root=n,Jt(t)}get rangeStyles(){return v(A(this,of))}get props(){return v(A(this,sf))}}of=new WeakMap,sf=new WeakMap;var af,en,un,lf;class c5{constructor(t,n){F(this,en);Y(this,"opts");Y(this,"root");F(this,af,N(()=>this.root.opts.disabled.current||this.opts.disabled.current));F(this,lf,N(()=>({...this.root.thumbsPropsArr[this.opts.index.current],id:this.opts.id.current,onkeydown:this.onkeydown,"data-active":this.root.isThumbActive(this.opts.index.current)?"":void 0})));this.opts=t,this.root=n,Jt(t),this.onkeydown=this.onkeydown.bind(this)}onkeydown(t){if(v(A(this,af)))return;const n=this.opts.ref.current;if(!n)return;const i=this.root.getAllThumbs();if(!i.length)return;const s=i.indexOf(n);if(this.root.isMulti&&(this.root.currentThumbIdx=s),!a5.includes(t.key))return;t.preventDefault();const a=this.root.opts.min.current,l=this.root.opts.max.current,u=this.root.opts.value.current,d=Array.isArray(u)?u[s]:u,f=this.root.opts.orientation.current,h=this.root.direction,g=this.root.opts.step.current;switch(t.key){case hl:Et(this,en,un).call(this,a);break;case fl:Et(this,en,un).call(this,l);break;case W0:if(f!=="horizontal")break;if(t.metaKey){const m=h==="rl"?l:a;Et(this,en,un).call(this,m)}else h==="rl"&&d<l?Et(this,en,un).call(this,d+g):h==="lr"&&d>a&&Et(this,en,un).call(this,d-g);break;case z0:if(f!=="horizontal")break;if(t.metaKey){const m=h==="rl"?a:l;Et(this,en,un).call(this,m)}else h==="rl"&&d>a?Et(this,en,un).call(this,d-g):h==="lr"&&d<l&&Et(this,en,un).call(this,d+g);break;case Ur:if(t.metaKey){const m=h==="tb"?a:l;Et(this,en,un).call(this,m)}else h==="tb"&&d>a?Et(this,en,un).call(this,d-g):h!=="tb"&&d<l&&Et(this,en,un).call(this,d+g);break;case Ci:if(t.metaKey){const m=h==="tb"?l:a;Et(this,en,un).call(this,m)}else h==="tb"&&d<l?Et(this,en,un).call(this,d+g):h!=="tb"&&d>a&&Et(this,en,un).call(this,d-g);break}this.root.opts.onValueCommit.current(this.root.opts.value.current)}get props(){return v(A(this,lf))}}af=new WeakMap,en=new WeakSet,un=function(t){this.root.isMulti?this.root.updateValue(t,this.opts.index.current):this.root.updateValue(t)},lf=new WeakMap;const Rp=new sn("Slider.Root");function u5(e){const{type:t,...n}=e,i=t==="single"?new o5(n):new s5(n);return Rp.set(i)}function d5(e){return new l5(e,Rp.get())}function f5(e){return new c5(e,Rp.get())}var h5=tt("<span><!></span>");function g5(e,t){ht(t,!0);let n=k(t,"id",19,Qt),i=k(t,"ref",15,null),s=k(t,"value",15),a=k(t,"onValueChange",3,$t),l=k(t,"onValueCommit",3,$t),u=k(t,"disabled",3,!1),d=k(t,"min",3,0),f=k(t,"max",3,100),h=k(t,"step",3,1),g=k(t,"dir",3,"ltr"),m=k(t,"autoSort",3,!0),b=k(t,"orientation",3,"horizontal"),_=k(t,"thumbPositioning",3,"contain"),w=At(t,["$$slots","$$events","$$legacy","children","child","id","ref","value","type","onValueChange","onValueCommit","disabled","min","max","step","dir","autoSort","orientation","thumbPositioning"]);function x(){s()===void 0&&s(t.type==="single"?0:[])}x(),ne.pre(()=>s(),()=>{x()});const S=u5({id:B.with(()=>n()),ref:B.with(()=>i(),M=>i(M)),value:B.with(()=>s(),M=>{s(M),a()(M)}),onValueCommit:B.with(()=>l()),disabled:B.with(()=>u()),min:B.with(()=>d()),max:B.with(()=>f()),step:B.with(()=>h()),dir:B.with(()=>g()),autoSort:B.with(()=>m()),orientation:B.with(()=>b()),thumbPositioning:B.with(()=>_()),type:t.type}),I=N(()=>Wt(w,S.props));var T=X(),O=W(T);{var D=M=>{var G=X(),q=W(G),lt=nn(()=>({props:v(I),...S.snippetProps}));at(q,()=>t.child,()=>v(lt)),P(M,G)},L=M=>{var G=h5();let q;var lt=rt(G);at(lt,()=>t.children??Ct,()=>S.snippetProps),nt(G),St(()=>q=Lt(G,q,{...v(I)})),P(M,G)};_t(O,M=>{t.child?M(D):M(L,!1)})}P(e,T),gt()}var p5=tt("<span><!></span>");function v5(e,t){ht(t,!0);let n=k(t,"ref",15,null),i=k(t,"id",19,Qt),s=At(t,["$$slots","$$events","$$legacy","children","child","ref","id"]);const a=d5({id:B.with(()=>i()),ref:B.with(()=>n(),g=>n(g))}),l=N(()=>Wt(s,a.props));var u=X(),d=W(u);{var f=g=>{var m=X(),b=W(m);at(b,()=>t.child,()=>({props:v(l)})),P(g,m)},h=g=>{var m=p5();let b;var _=rt(m);at(_,()=>t.children??Ct),nt(m),St(()=>b=Lt(m,b,{...v(l)})),P(g,m)};_t(d,g=>{t.child?g(f):g(h,!1)})}P(e,u),gt()}var m5=tt("<span><!></span>");function b5(e,t){ht(t,!0);let n=k(t,"ref",15,null),i=k(t,"id",19,Qt),s=k(t,"disabled",3,!1),a=At(t,["$$slots","$$events","$$legacy","children","child","ref","id","index","disabled"]);const l=f5({id:B.with(()=>i()),ref:B.with(()=>n(),m=>n(m)),index:B.with(()=>t.index),disabled:B.with(()=>s())}),u=N(()=>Wt(a,l.props));var d=X(),f=W(d);{var h=m=>{var b=X(),_=W(b),w=nn(()=>({active:l.root.isThumbActive(l.opts.index.current),props:v(u)}));at(_,()=>t.child,()=>v(w)),P(m,b)},g=m=>{var b=m5();let _;var w=rt(b),x=nn(()=>({active:l.root.isThumbActive(l.opts.index.current)}));at(w,()=>t.children??Ct,()=>v(x)),nt(b),St(()=>_=Lt(b,_,{...v(u)})),P(m,b)};_t(f,m=>{t.child?m(h):m(g,!1)})}P(e,d),gt()}const _5="data-switch-root",w5="data-switch-thumb";var al,Wg,cf,uf,df;class y5{constructor(t){F(this,al);Y(this,"opts");F(this,cf,N(()=>({"data-disabled":Yn(this.opts.disabled.current),"data-state":wI(this.opts.checked.current),"data-required":SI(this.opts.required.current)})));F(this,uf,N(()=>({checked:this.opts.checked.current})));F(this,df,N(()=>({...this.sharedProps,id:this.opts.id.current,role:"switch",disabled:V0(this.opts.disabled.current),"aria-checked":B0(this.opts.checked.current,!1),"aria-required":F0(this.opts.required.current),[_5]:"",onclick:this.onclick,onkeydown:this.onkeydown})));this.opts=t,Jt(t),this.onkeydown=this.onkeydown.bind(this),this.onclick=this.onclick.bind(this)}onkeydown(t){!(t.key===Yr||t.key===Kr)||this.opts.disabled.current||(t.preventDefault(),Et(this,al,Wg).call(this))}onclick(t){this.opts.disabled.current||Et(this,al,Wg).call(this)}get sharedProps(){return v(A(this,cf))}get snippetProps(){return v(A(this,uf))}get props(){return v(A(this,df))}}al=new WeakSet,Wg=function(){this.opts.checked.current=!this.opts.checked.current},cf=new WeakMap,uf=new WeakMap,df=new WeakMap;var ff,hf;class x5{constructor(t){Y(this,"root");F(this,ff,N(()=>this.root.opts.name.current!==void 0));F(this,hf,N(()=>({type:"checkbox",name:this.root.opts.name.current,value:this.root.opts.value.current,checked:this.root.opts.checked.current,disabled:this.root.opts.disabled.current,required:this.root.opts.required.current})));this.root=t}get shouldRender(){return v(A(this,ff))}get props(){return v(A(this,hf))}}ff=new WeakMap,hf=new WeakMap;var gf,pf;class S5{constructor(t,n){Y(this,"opts");Y(this,"root");F(this,gf,N(()=>({checked:this.root.opts.checked.current})));F(this,pf,N(()=>({...this.root.sharedProps,id:this.opts.id.current,[w5]:""})));this.opts=t,this.root=n,Jt(t)}get snippetProps(){return v(A(this,gf))}get props(){return v(A(this,pf))}}gf=new WeakMap,pf=new WeakMap;const Mp=new sn("Switch.Root");function A5(e){return Mp.set(new y5(e))}function C5(){return new x5(Mp.get())}function P5(e){return new S5(e,Mp.get())}function E5(e,t){ht(t,!1);const n=C5();_f();var i=X(),s=W(i);{var a=l=>{_p(l,Rt(()=>n.props))};_t(s,l=>{n.shouldRender&&l(a)})}P(e,i),gt()}var T5=tt("<button><!></button>"),k5=tt("<!> <!>",1);function I5(e,t){ht(t,!0);let n=k(t,"ref",15,null),i=k(t,"id",19,Qt),s=k(t,"disabled",3,!1),a=k(t,"required",3,!1),l=k(t,"checked",15,!1),u=k(t,"value",3,"on"),d=k(t,"name",3,void 0),f=k(t,"type",3,"button"),h=k(t,"onCheckedChange",3,$t),g=At(t,["$$slots","$$events","$$legacy","child","children","ref","id","disabled","required","checked","value","name","type","onCheckedChange"]);const m=A5({checked:B.with(()=>l(),L=>{var M;l(L),(M=h())==null||M(L)}),disabled:B.with(()=>s()??!1),required:B.with(()=>a()),value:B.with(()=>u()),name:B.with(()=>d()),id:B.with(()=>i()),ref:B.with(()=>n(),L=>n(L))}),b=N(()=>Wt(g,m.props,{type:f()})),_=Qr(),[w,x]=_;var S=k5(),I=W(S);{var T=L=>{var M=X(),G=W(M),q=nn(()=>({props:v(b),...m.snippetProps}));at(G,()=>t.child,()=>v(q)),P(L,M)},O=L=>{var M=T5();let G;var q=rt(M);at(q,()=>t.children??Ct,()=>m.snippetProps),nt(M),St(lt=>G=Lt(M,G,{...lt}),[()=>x({...v(b)},[{attribute_name:"formaction"}])]),P(L,M)};_t(I,L=>{t.child?L(T):L(O,!1)})}var D=mt(I,2);E5(D,{}),P(e,S),gt()}var O5=tt("<span><!></span>");function N5(e,t){ht(t,!0);let n=k(t,"ref",15,null),i=k(t,"id",19,Qt),s=At(t,["$$slots","$$events","$$legacy","child","children","ref","id"]);const a=P5({id:B.with(()=>i()),ref:B.with(()=>n(),g=>n(g))}),l=N(()=>Wt(s,a.props));var u=X(),d=W(u);{var f=g=>{var m=X(),b=W(m),_=nn(()=>({props:v(l),...a.snippetProps}));at(b,()=>t.child,()=>v(_)),P(g,m)},h=g=>{var m=O5();let b;var _=rt(m);at(_,()=>t.children??Ct,()=>a.snippetProps),nt(m),St(()=>b=Lt(m,b,{...v(l)})),P(g,m)};_t(d,g=>{t.child?g(f):g(h,!1)})}P(e,u),gt()}const Lp="-",R5=e=>{const t=L5(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:i}=e;return{getClassGroupId:l=>{const u=l.split(Lp);return u[0]===""&&u.length!==1&&u.shift(),qw(u,t)||M5(l)},getConflictingClassGroupIds:(l,u)=>{const d=n[l]||[];return u&&i[l]?[...d,...i[l]]:d}}},qw=(e,t)=>{var l;if(e.length===0)return t.classGroupId;const n=e[0],i=t.nextPart.get(n),s=i?qw(e.slice(1),i):void 0;if(s)return s;if(t.validators.length===0)return;const a=e.join(Lp);return(l=t.validators.find(({validator:u})=>u(a)))==null?void 0:l.classGroupId},h_=/^\[(.+)\]$/,M5=e=>{if(h_.test(e)){const t=h_.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},L5=e=>{const{theme:t,prefix:n}=e,i={nextPart:new Map,validators:[]};return F5(Object.entries(e.classGroups),n).forEach(([a,l])=>{zg(l,i,a,t)}),i},zg=(e,t,n,i)=>{e.forEach(s=>{if(typeof s=="string"){const a=s===""?t:g_(t,s);a.classGroupId=n;return}if(typeof s=="function"){if(D5(s)){zg(s(i),t,n,i);return}t.validators.push({validator:s,classGroupId:n});return}Object.entries(s).forEach(([a,l])=>{zg(l,g_(t,a),n,i)})})},g_=(e,t)=>{let n=e;return t.split(Lp).forEach(i=>{n.nextPart.has(i)||n.nextPart.set(i,{nextPart:new Map,validators:[]}),n=n.nextPart.get(i)}),n},D5=e=>e.isThemeGetter,F5=(e,t)=>t?e.map(([n,i])=>{const s=i.map(a=>typeof a=="string"?t+a:typeof a=="object"?Object.fromEntries(Object.entries(a).map(([l,u])=>[t+l,u])):a);return[n,s]}):e,B5=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,i=new Map;const s=(a,l)=>{n.set(a,l),t++,t>e&&(t=0,i=n,n=new Map)};return{get(a){let l=n.get(a);if(l!==void 0)return l;if((l=i.get(a))!==void 0)return s(a,l),l},set(a,l){n.has(a)?n.set(a,l):s(a,l)}}},Yw="!",V5=e=>{const{separator:t,experimentalParseClassName:n}=e,i=t.length===1,s=t[0],a=t.length,l=u=>{const d=[];let f=0,h=0,g;for(let x=0;x<u.length;x++){let S=u[x];if(f===0){if(S===s&&(i||u.slice(x,x+a)===t)){d.push(u.slice(h,x)),h=x+a;continue}if(S==="/"){g=x;continue}}S==="["?f++:S==="]"&&f--}const m=d.length===0?u:u.substring(h),b=m.startsWith(Yw),_=b?m.substring(1):m,w=g&&g>h?g-h:void 0;return{modifiers:d,hasImportantModifier:b,baseClassName:_,maybePostfixModifierPosition:w}};return n?u=>n({className:u,parseClassName:l}):l},W5=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(i=>{i[0]==="["?(t.push(...n.sort(),i),n=[]):n.push(i)}),t.push(...n.sort()),t},z5=e=>({cache:B5(e.cacheSize),parseClassName:V5(e),...R5(e)}),H5=/\s+/,U5=(e,t)=>{const{parseClassName:n,getClassGroupId:i,getConflictingClassGroupIds:s}=t,a=[],l=e.trim().split(H5);let u="";for(let d=l.length-1;d>=0;d-=1){const f=l[d],{modifiers:h,hasImportantModifier:g,baseClassName:m,maybePostfixModifierPosition:b}=n(f);let _=!!b,w=i(_?m.substring(0,b):m);if(!w){if(!_){u=f+(u.length>0?" "+u:u);continue}if(w=i(m),!w){u=f+(u.length>0?" "+u:u);continue}_=!1}const x=W5(h).join(":"),S=g?x+Yw:x,I=S+w;if(a.includes(I))continue;a.push(I);const T=s(w,_);for(let O=0;O<T.length;++O){const D=T[O];a.push(S+D)}u=f+(u.length>0?" "+u:u)}return u};function G5(){let e=0,t,n,i="";for(;e<arguments.length;)(t=arguments[e++])&&(n=Xw(t))&&(i&&(i+=" "),i+=n);return i}const Xw=e=>{if(typeof e=="string")return e;let t,n="";for(let i=0;i<e.length;i++)e[i]&&(t=Xw(e[i]))&&(n&&(n+=" "),n+=t);return n};function K5(e,...t){let n,i,s,a=l;function l(d){const f=t.reduce((h,g)=>g(h),e());return n=z5(f),i=n.cache.get,s=n.cache.set,a=u,u(d)}function u(d){const f=i(d);if(f)return f;const h=U5(d,n);return s(d,h),h}return function(){return a(G5.apply(null,arguments))}}const Ie=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},Zw=/^\[(?:([a-z-]+):)?(.+)\]$/i,q5=/^\d+\/\d+$/,Y5=new Set(["px","full","screen"]),X5=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Z5=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,J5=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Q5=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,j5=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Rr=e=>Lo(e)||Y5.has(e)||q5.test(e),fi=e=>as(e,"length",sL),Lo=e=>!!e&&!Number.isNaN(Number(e)),ng=e=>as(e,"number",Lo),Es=e=>!!e&&Number.isInteger(Number(e)),$5=e=>e.endsWith("%")&&Lo(e.slice(0,-1)),Kt=e=>Zw.test(e),hi=e=>X5.test(e),tL=new Set(["length","size","percentage"]),eL=e=>as(e,tL,Jw),nL=e=>as(e,"position",Jw),rL=new Set(["image","url"]),iL=e=>as(e,rL,lL),oL=e=>as(e,"",aL),Ts=()=>!0,as=(e,t,n)=>{const i=Zw.exec(e);return i?i[1]?typeof t=="string"?i[1]===t:t.has(i[1]):n(i[2]):!1},sL=e=>Z5.test(e)&&!J5.test(e),Jw=()=>!1,aL=e=>Q5.test(e),lL=e=>j5.test(e),cL=()=>{const e=Ie("colors"),t=Ie("spacing"),n=Ie("blur"),i=Ie("brightness"),s=Ie("borderColor"),a=Ie("borderRadius"),l=Ie("borderSpacing"),u=Ie("borderWidth"),d=Ie("contrast"),f=Ie("grayscale"),h=Ie("hueRotate"),g=Ie("invert"),m=Ie("gap"),b=Ie("gradientColorStops"),_=Ie("gradientColorStopPositions"),w=Ie("inset"),x=Ie("margin"),S=Ie("opacity"),I=Ie("padding"),T=Ie("saturate"),O=Ie("scale"),D=Ie("sepia"),L=Ie("skew"),M=Ie("space"),G=Ie("translate"),q=()=>["auto","contain","none"],lt=()=>["auto","hidden","clip","visible","scroll"],pt=()=>["auto",Kt,t],z=()=>[Kt,t],$=()=>["",Rr,fi],H=()=>["auto",Lo,Kt],J=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],Q=()=>["solid","dashed","dotted","double","none"],ot=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Z=()=>["start","end","center","between","around","evenly","stretch"],ct=()=>["","0",Kt],wt=()=>["auto","avoid","all","avoid-page","page","left","right","column"],it=()=>[Lo,Kt];return{cacheSize:500,separator:":",theme:{colors:[Ts],spacing:[Rr,fi],blur:["none","",hi,Kt],brightness:it(),borderColor:[e],borderRadius:["none","","full",hi,Kt],borderSpacing:z(),borderWidth:$(),contrast:it(),grayscale:ct(),hueRotate:it(),invert:ct(),gap:z(),gradientColorStops:[e],gradientColorStopPositions:[$5,fi],inset:pt(),margin:pt(),opacity:it(),padding:z(),saturate:it(),scale:it(),sepia:ct(),skew:it(),space:z(),translate:z()},classGroups:{aspect:[{aspect:["auto","square","video",Kt]}],container:["container"],columns:[{columns:[hi]}],"break-after":[{"break-after":wt()}],"break-before":[{"break-before":wt()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...J(),Kt]}],overflow:[{overflow:lt()}],"overflow-x":[{"overflow-x":lt()}],"overflow-y":[{"overflow-y":lt()}],overscroll:[{overscroll:q()}],"overscroll-x":[{"overscroll-x":q()}],"overscroll-y":[{"overscroll-y":q()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[w]}],"inset-x":[{"inset-x":[w]}],"inset-y":[{"inset-y":[w]}],start:[{start:[w]}],end:[{end:[w]}],top:[{top:[w]}],right:[{right:[w]}],bottom:[{bottom:[w]}],left:[{left:[w]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Es,Kt]}],basis:[{basis:pt()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",Kt]}],grow:[{grow:ct()}],shrink:[{shrink:ct()}],order:[{order:["first","last","none",Es,Kt]}],"grid-cols":[{"grid-cols":[Ts]}],"col-start-end":[{col:["auto",{span:["full",Es,Kt]},Kt]}],"col-start":[{"col-start":H()}],"col-end":[{"col-end":H()}],"grid-rows":[{"grid-rows":[Ts]}],"row-start-end":[{row:["auto",{span:[Es,Kt]},Kt]}],"row-start":[{"row-start":H()}],"row-end":[{"row-end":H()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",Kt]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",Kt]}],gap:[{gap:[m]}],"gap-x":[{"gap-x":[m]}],"gap-y":[{"gap-y":[m]}],"justify-content":[{justify:["normal",...Z()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...Z(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...Z(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[I]}],px:[{px:[I]}],py:[{py:[I]}],ps:[{ps:[I]}],pe:[{pe:[I]}],pt:[{pt:[I]}],pr:[{pr:[I]}],pb:[{pb:[I]}],pl:[{pl:[I]}],m:[{m:[x]}],mx:[{mx:[x]}],my:[{my:[x]}],ms:[{ms:[x]}],me:[{me:[x]}],mt:[{mt:[x]}],mr:[{mr:[x]}],mb:[{mb:[x]}],ml:[{ml:[x]}],"space-x":[{"space-x":[M]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[M]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",Kt,t]}],"min-w":[{"min-w":[Kt,t,"min","max","fit"]}],"max-w":[{"max-w":[Kt,t,"none","full","min","max","fit","prose",{screen:[hi]},hi]}],h:[{h:[Kt,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[Kt,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[Kt,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[Kt,t,"auto","min","max","fit"]}],"font-size":[{text:["base",hi,fi]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",ng]}],"font-family":[{font:[Ts]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",Kt]}],"line-clamp":[{"line-clamp":["none",Lo,ng]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Rr,Kt]}],"list-image":[{"list-image":["none",Kt]}],"list-style-type":[{list:["none","disc","decimal",Kt]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[S]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[S]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Q(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Rr,fi]}],"underline-offset":[{"underline-offset":["auto",Rr,Kt]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:z()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Kt]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Kt]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[S]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...J(),nL]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",eL]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},iL]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[_]}],"gradient-via-pos":[{via:[_]}],"gradient-to-pos":[{to:[_]}],"gradient-from":[{from:[b]}],"gradient-via":[{via:[b]}],"gradient-to":[{to:[b]}],rounded:[{rounded:[a]}],"rounded-s":[{"rounded-s":[a]}],"rounded-e":[{"rounded-e":[a]}],"rounded-t":[{"rounded-t":[a]}],"rounded-r":[{"rounded-r":[a]}],"rounded-b":[{"rounded-b":[a]}],"rounded-l":[{"rounded-l":[a]}],"rounded-ss":[{"rounded-ss":[a]}],"rounded-se":[{"rounded-se":[a]}],"rounded-ee":[{"rounded-ee":[a]}],"rounded-es":[{"rounded-es":[a]}],"rounded-tl":[{"rounded-tl":[a]}],"rounded-tr":[{"rounded-tr":[a]}],"rounded-br":[{"rounded-br":[a]}],"rounded-bl":[{"rounded-bl":[a]}],"border-w":[{border:[u]}],"border-w-x":[{"border-x":[u]}],"border-w-y":[{"border-y":[u]}],"border-w-s":[{"border-s":[u]}],"border-w-e":[{"border-e":[u]}],"border-w-t":[{"border-t":[u]}],"border-w-r":[{"border-r":[u]}],"border-w-b":[{"border-b":[u]}],"border-w-l":[{"border-l":[u]}],"border-opacity":[{"border-opacity":[S]}],"border-style":[{border:[...Q(),"hidden"]}],"divide-x":[{"divide-x":[u]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[u]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[S]}],"divide-style":[{divide:Q()}],"border-color":[{border:[s]}],"border-color-x":[{"border-x":[s]}],"border-color-y":[{"border-y":[s]}],"border-color-s":[{"border-s":[s]}],"border-color-e":[{"border-e":[s]}],"border-color-t":[{"border-t":[s]}],"border-color-r":[{"border-r":[s]}],"border-color-b":[{"border-b":[s]}],"border-color-l":[{"border-l":[s]}],"divide-color":[{divide:[s]}],"outline-style":[{outline:["",...Q()]}],"outline-offset":[{"outline-offset":[Rr,Kt]}],"outline-w":[{outline:[Rr,fi]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:$()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[S]}],"ring-offset-w":[{"ring-offset":[Rr,fi]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",hi,oL]}],"shadow-color":[{shadow:[Ts]}],opacity:[{opacity:[S]}],"mix-blend":[{"mix-blend":[...ot(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":ot()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[i]}],contrast:[{contrast:[d]}],"drop-shadow":[{"drop-shadow":["","none",hi,Kt]}],grayscale:[{grayscale:[f]}],"hue-rotate":[{"hue-rotate":[h]}],invert:[{invert:[g]}],saturate:[{saturate:[T]}],sepia:[{sepia:[D]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[i]}],"backdrop-contrast":[{"backdrop-contrast":[d]}],"backdrop-grayscale":[{"backdrop-grayscale":[f]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[h]}],"backdrop-invert":[{"backdrop-invert":[g]}],"backdrop-opacity":[{"backdrop-opacity":[S]}],"backdrop-saturate":[{"backdrop-saturate":[T]}],"backdrop-sepia":[{"backdrop-sepia":[D]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[l]}],"border-spacing-x":[{"border-spacing-x":[l]}],"border-spacing-y":[{"border-spacing-y":[l]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",Kt]}],duration:[{duration:it()}],ease:[{ease:["linear","in","out","in-out",Kt]}],delay:[{delay:it()}],animate:[{animate:["none","spin","ping","pulse","bounce",Kt]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[O]}],"scale-x":[{"scale-x":[O]}],"scale-y":[{"scale-y":[O]}],rotate:[{rotate:[Es,Kt]}],"translate-x":[{"translate-x":[G]}],"translate-y":[{"translate-y":[G]}],"skew-x":[{"skew-x":[L]}],"skew-y":[{"skew-y":[L]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",Kt]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Kt]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":z()}],"scroll-mx":[{"scroll-mx":z()}],"scroll-my":[{"scroll-my":z()}],"scroll-ms":[{"scroll-ms":z()}],"scroll-me":[{"scroll-me":z()}],"scroll-mt":[{"scroll-mt":z()}],"scroll-mr":[{"scroll-mr":z()}],"scroll-mb":[{"scroll-mb":z()}],"scroll-ml":[{"scroll-ml":z()}],"scroll-p":[{"scroll-p":z()}],"scroll-px":[{"scroll-px":z()}],"scroll-py":[{"scroll-py":z()}],"scroll-ps":[{"scroll-ps":z()}],"scroll-pe":[{"scroll-pe":z()}],"scroll-pt":[{"scroll-pt":z()}],"scroll-pr":[{"scroll-pr":z()}],"scroll-pb":[{"scroll-pb":z()}],"scroll-pl":[{"scroll-pl":z()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Kt]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Rr,fi,ng]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},uL=K5(cL);function ae(...e){return uL(Ws(e))}function dL(e,t){ht(t,!0);let n=k(t,"ref",15,null),i=k(t,"value",15,""),s=At(t,["$$slots","$$events","$$legacy","ref","value","class"]);var a=X(),l=W(a);const u=N(()=>ae("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",t.class));Ot(l,()=>s3,(d,f)=>{f(d,Rt({get class(){return v(u)}},()=>s,{get value(){return i()},set value(h){i(h)},get ref(){return n()},set ref(h){n(h)}}))}),P(e,a),gt()}function Qw(e,t){ht(t,!0);let n=k(t,"ref",15,null),i=At(t,["$$slots","$$events","$$legacy","ref","class"]);var s=X(),a=W(s);const l=N(()=>ae("text-lg font-semibold leading-none tracking-tight",t.class));Ot(a,()=>$I,(u,d)=>{d(u,Rt({get class(){return v(l)}},()=>i,{get ref(){return n()},set ref(f){n(f)}}))}),P(e,s),gt()}var fL=tt("<div><!></div>");function hL(e,t){ht(t,!0);let n=k(t,"ref",15,null),i=At(t,["$$slots","$$events","$$legacy","ref","class","children"]);var s=fL();let a;var l=rt(s);at(l,()=>t.children??Ct),nt(s),Kn(s,u=>n(u),()=>n()),St(u=>a=Lt(s,a,{class:u,...i}),[()=>ae("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",t.class)]),P(e,s),gt()}var gL=tt("<div><!></div>");function jw(e,t){ht(t,!0);let n=k(t,"ref",15,null),i=At(t,["$$slots","$$events","$$legacy","ref","class","children"]);var s=gL();let a;var l=rt(s);at(l,()=>t.children??Ct),nt(s),Kn(s,u=>n(u),()=>n()),St(u=>a=Lt(s,a,{class:u,...i}),[()=>ae("flex flex-col space-y-1.5 text-center sm:text-left",t.class)]),P(e,s),gt()}function $w(e,t){ht(t,!0);let n=k(t,"ref",15,null),i=At(t,["$$slots","$$events","$$legacy","ref","class"]);var s=X(),a=W(s);const l=N(()=>ae("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/80",t.class));Ot(a,()=>ow,(u,d)=>{d(u,Rt({get class(){return v(l)}},()=>i,{get ref(){return n()},set ref(f){n(f)}}))}),P(e,s),gt()}function Dp(e,t){ht(t,!0);let n=At(t,["$$slots","$$events","$$legacy"]);Rn(e,Rt({name:"x"},()=>n,{iconNode:[["path",{d:"M18 6 6 18"}],["path",{d:"m6 6 12 12"}]],children:(s,a)=>{var l=X(),u=W(l);at(u,()=>t.children??Ct),P(s,l)},$$slots:{default:!0}})),gt()}var pL=tt('<!> <span class="sr-only">Close</span>',1),vL=tt("<!> <!>",1),mL=tt("<!> <!>",1);function ty(e,t){ht(t,!0);let n=k(t,"ref",15,null),i=At(t,["$$slots","$$events","$$legacy","ref","class","portalProps","children"]);var s=X(),a=W(s);Ot(a,()=>ny,(l,u)=>{u(l,Rt(()=>t.portalProps,{children:(d,f)=>{var h=mL(),g=W(h);Ot(g,()=>$w,(_,w)=>{w(_,{})});var m=mt(g,2);const b=N(()=>ae("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] bg-background fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border p-6 shadow-lg duration-200 sm:rounded-lg",t.class));Ot(m,()=>zw,(_,w)=>{w(_,Rt({get class(){return v(b)}},()=>i,{get ref(){return n()},set ref(x){n(x)},children:(x,S)=>{var I=vL(),T=W(I);at(T,()=>t.children??Ct);var O=mt(T,2);Ot(O,()=>Ww,(D,L)=>{L(D,{class:"ring-offset-background focus:ring-ring absolute right-4 top-4 rounded-sm opacity-70 transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-offset-2 disabled:pointer-events-none",children:(M,G)=>{var q=pL(),lt=W(q);Dp(lt,{class:"size-4"}),we(2),P(M,q)},$$slots:{default:!0}})}),P(x,I)},$$slots:{default:!0}}))}),P(d,h)},$$slots:{default:!0}}))}),P(e,s),gt()}function bL(e,t){ht(t,!0);let n=k(t,"ref",15,null),i=At(t,["$$slots","$$events","$$legacy","ref","class"]);var s=X(),a=W(s);const l=N(()=>ae("text-muted-foreground text-sm",t.class));Ot(a,()=>QO,(u,d)=>{d(u,Rt({get class(){return v(l)}},()=>i,{get ref(){return n()},set ref(f){n(f)}}))}),P(e,s),gt()}const ey=H3,_L=ZO,ny=gl;function wL(e,t){ht(t,!0),k(t,"ref",11,null);let n=At(t,["$$slots","$$events","$$legacy","ref","class"]);var i=X(),s=W(i);const a=N(()=>ae("py-6 text-center text-sm",t.class));Ot(s,()=>l3,(l,u)=>{u(l,Rt({get class(){return v(a)}},()=>n))}),P(e,i),gt()}var yL=tt("<!> <!>",1);function xL(e,t){ht(t,!0);let n=k(t,"ref",15,null),i=At(t,["$$slots","$$events","$$legacy","ref","class","children","heading","value"]);var s=X(),a=W(s);const l=N(()=>ae("text-foreground overflow-hidden p-1",t.class)),u=N(()=>t.value??t.heading??`----${Qt()}`);Ot(a,()=>u3,(d,f)=>{f(d,Rt({get class(){return v(l)},get value(){return v(u)}},()=>i,{get ref(){return n()},set ref(h){n(h)},children:(h,g)=>{var m=yL(),b=W(m);{var _=x=>{var S=X(),I=W(S);Ot(I,()=>f3,(T,O)=>{O(T,{class:"text-muted-foreground px-2 py-1.5 text-xs font-medium",children:(D,L)=>{we();var M=ye();St(()=>De(M,t.heading)),P(D,M)},$$slots:{default:!0}})}),P(x,S)};_t(b,x=>{t.heading&&x(_)})}var w=mt(b,2);Ot(w,()=>p3,(x,S)=>{S(x,{get children(){return t.children}})}),P(h,m)},$$slots:{default:!0}}))}),P(e,s),gt()}function SL(e,t){ht(t,!0);let n=k(t,"ref",15,null),i=At(t,["$$slots","$$events","$$legacy","ref","class"]);var s=X(),a=W(s);const l=N(()=>ae("aria-selected:bg-accent aria-selected:text-accent-foreground relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",t.class));Ot(a,()=>w3,(u,d)=>{d(u,Rt({get class(){return v(l)}},()=>i,{get ref(){return n()},set ref(f){n(f)}}))}),P(e,s),gt()}function AL(e,t){ht(t,!0);let n=At(t,["$$slots","$$events","$$legacy"]);Rn(e,Rt({name:"search"},()=>n,{iconNode:[["circle",{cx:"11",cy:"11",r:"8"}],["path",{d:"m21 21-4.3-4.3"}]],children:(s,a)=>{var l=X(),u=W(l);at(u,()=>t.children??Ct),P(s,l)},$$slots:{default:!0}})),gt()}var CL=tt('<div class="flex items-center border-b px-2" data-command-input-wrapper=""><!> <!></div>');function PL(e,t){ht(t,!0);let n=k(t,"ref",15,null),i=k(t,"value",15,""),s=At(t,["$$slots","$$events","$$legacy","ref","class","value"]);var a=CL(),l=rt(a);AL(l,{class:"mr-2 size-4 shrink-0 opacity-50"});var u=mt(l,2);const d=N(()=>ae("placeholder:text-muted-foreground flex h-11 w-full rounded-md bg-transparent py-3 text-base outline-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",t.class));Ot(u,()=>m3,(f,h)=>{h(f,Rt({get class(){return v(d)}},()=>s,{get ref(){return n()},set ref(g){n(g)},get value(){return i()},set value(g){i(g)}}))}),nt(a),P(e,a),gt()}function EL(e,t){ht(t,!0);let n=k(t,"ref",15,null),i=At(t,["$$slots","$$events","$$legacy","ref","class"]);var s=X(),a=W(s);const l=N(()=>ae("max-h-[300px] overflow-y-auto overflow-x-hidden",t.class));Ot(a,()=>x3,(u,d)=>{d(u,Rt({get class(){return v(l)}},()=>i,{get ref(){return n()},set ref(f){n(f)}}))}),P(e,s),gt()}function TL(e,t){ht(t,!0);let n=k(t,"ref",15,null),i=k(t,"sideOffset",3,4),s=k(t,"align",3,"center"),a=At(t,["$$slots","$$events","$$legacy","ref","class","sideOffset","align","portalProps"]);var l=X(),u=W(l);Ot(u,()=>gl,(d,f)=>{f(d,Rt(()=>t.portalProps,{children:(h,g)=>{var m=X(),b=W(m);const _=N(()=>ae("bg-popover text-popover-foreground data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-72 rounded-md border p-4 shadow-md outline-none",t.class));Ot(b,()=>V3,(w,x)=>{x(w,Rt({get sideOffset(){return i()},get align(){return s()},get class(){return v(_)}},()=>a,{get ref(){return n()},set ref(S){n(S)}}))}),P(h,m)},$$slots:{default:!0}}))}),P(e,l),gt()}const kL=Q3,IL=z3;var p_=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,mn=e=>!e||typeof e!="object"||Object.keys(e).length===0,OL=(e,t)=>JSON.stringify(e)===JSON.stringify(t);function ry(e,t){e.forEach(function(n){Array.isArray(n)?ry(n,t):t.push(n)})}function iy(e){let t=[];return ry(e,t),t}var oy=(...e)=>iy(e).filter(Boolean),sy=(e,t)=>{let n={},i=Object.keys(e),s=Object.keys(t);for(let a of i)if(s.includes(a)){let l=e[a],u=t[a];Array.isArray(l)||Array.isArray(u)?n[a]=oy(u,l):typeof l=="object"&&typeof u=="object"?n[a]=sy(l,u):n[a]=u+" "+l}else n[a]=e[a];for(let a of s)i.includes(a)||(n[a]=t[a]);return n},v_=e=>!e||typeof e!="string"?e:e.replace(/\s+/g," ").trim();const Fp="-",NL=e=>{const t=ML(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:i}=e;return{getClassGroupId:l=>{const u=l.split(Fp);return u[0]===""&&u.length!==1&&u.shift(),ay(u,t)||RL(l)},getConflictingClassGroupIds:(l,u)=>{const d=n[l]||[];return u&&i[l]?[...d,...i[l]]:d}}},ay=(e,t)=>{var l;if(e.length===0)return t.classGroupId;const n=e[0],i=t.nextPart.get(n),s=i?ay(e.slice(1),i):void 0;if(s)return s;if(t.validators.length===0)return;const a=e.join(Fp);return(l=t.validators.find(({validator:u})=>u(a)))==null?void 0:l.classGroupId},m_=/^\[(.+)\]$/,RL=e=>{if(m_.test(e)){const t=m_.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},ML=e=>{const{theme:t,prefix:n}=e,i={nextPart:new Map,validators:[]};return DL(Object.entries(e.classGroups),n).forEach(([a,l])=>{Hg(l,i,a,t)}),i},Hg=(e,t,n,i)=>{e.forEach(s=>{if(typeof s=="string"){const a=s===""?t:b_(t,s);a.classGroupId=n;return}if(typeof s=="function"){if(LL(s)){Hg(s(i),t,n,i);return}t.validators.push({validator:s,classGroupId:n});return}Object.entries(s).forEach(([a,l])=>{Hg(l,b_(t,a),n,i)})})},b_=(e,t)=>{let n=e;return t.split(Fp).forEach(i=>{n.nextPart.has(i)||n.nextPart.set(i,{nextPart:new Map,validators:[]}),n=n.nextPart.get(i)}),n},LL=e=>e.isThemeGetter,DL=(e,t)=>t?e.map(([n,i])=>{const s=i.map(a=>typeof a=="string"?t+a:typeof a=="object"?Object.fromEntries(Object.entries(a).map(([l,u])=>[t+l,u])):a);return[n,s]}):e,FL=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,i=new Map;const s=(a,l)=>{n.set(a,l),t++,t>e&&(t=0,i=n,n=new Map)};return{get(a){let l=n.get(a);if(l!==void 0)return l;if((l=i.get(a))!==void 0)return s(a,l),l},set(a,l){n.has(a)?n.set(a,l):s(a,l)}}},ly="!",BL=e=>{const{separator:t,experimentalParseClassName:n}=e,i=t.length===1,s=t[0],a=t.length,l=u=>{const d=[];let f=0,h=0,g;for(let x=0;x<u.length;x++){let S=u[x];if(f===0){if(S===s&&(i||u.slice(x,x+a)===t)){d.push(u.slice(h,x)),h=x+a;continue}if(S==="/"){g=x;continue}}S==="["?f++:S==="]"&&f--}const m=d.length===0?u:u.substring(h),b=m.startsWith(ly),_=b?m.substring(1):m,w=g&&g>h?g-h:void 0;return{modifiers:d,hasImportantModifier:b,baseClassName:_,maybePostfixModifierPosition:w}};return n?u=>n({className:u,parseClassName:l}):l},VL=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(i=>{i[0]==="["?(t.push(...n.sort(),i),n=[]):n.push(i)}),t.push(...n.sort()),t},WL=e=>({cache:FL(e.cacheSize),parseClassName:BL(e),...NL(e)}),zL=/\s+/,HL=(e,t)=>{const{parseClassName:n,getClassGroupId:i,getConflictingClassGroupIds:s}=t,a=[],l=e.trim().split(zL);let u="";for(let d=l.length-1;d>=0;d-=1){const f=l[d],{modifiers:h,hasImportantModifier:g,baseClassName:m,maybePostfixModifierPosition:b}=n(f);let _=!!b,w=i(_?m.substring(0,b):m);if(!w){if(!_){u=f+(u.length>0?" "+u:u);continue}if(w=i(m),!w){u=f+(u.length>0?" "+u:u);continue}_=!1}const x=VL(h).join(":"),S=g?x+ly:x,I=S+w;if(a.includes(I))continue;a.push(I);const T=s(w,_);for(let O=0;O<T.length;++O){const D=T[O];a.push(S+D)}u=f+(u.length>0?" "+u:u)}return u};function UL(){let e=0,t,n,i="";for(;e<arguments.length;)(t=arguments[e++])&&(n=cy(t))&&(i&&(i+=" "),i+=n);return i}const cy=e=>{if(typeof e=="string")return e;let t,n="";for(let i=0;i<e.length;i++)e[i]&&(t=cy(e[i]))&&(n&&(n+=" "),n+=t);return n};function Ug(e,...t){let n,i,s,a=l;function l(d){const f=t.reduce((h,g)=>g(h),e());return n=WL(f),i=n.cache.get,s=n.cache.set,a=u,u(d)}function u(d){const f=i(d);if(f)return f;const h=HL(d,n);return s(d,h),h}return function(){return a(UL.apply(null,arguments))}}const Oe=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},uy=/^\[(?:([a-z-]+):)?(.+)\]$/i,GL=/^\d+\/\d+$/,KL=new Set(["px","full","screen"]),qL=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,YL=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,XL=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,ZL=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,JL=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Mr=e=>Do(e)||KL.has(e)||GL.test(e),gi=e=>ls(e,"length",iD),Do=e=>!!e&&!Number.isNaN(Number(e)),rg=e=>ls(e,"number",Do),ks=e=>!!e&&Number.isInteger(Number(e)),QL=e=>e.endsWith("%")&&Do(e.slice(0,-1)),qt=e=>uy.test(e),pi=e=>qL.test(e),jL=new Set(["length","size","percentage"]),$L=e=>ls(e,jL,dy),tD=e=>ls(e,"position",dy),eD=new Set(["image","url"]),nD=e=>ls(e,eD,sD),rD=e=>ls(e,"",oD),Is=()=>!0,ls=(e,t,n)=>{const i=uy.exec(e);return i?i[1]?typeof t=="string"?i[1]===t:t.has(i[1]):n(i[2]):!1},iD=e=>YL.test(e)&&!XL.test(e),dy=()=>!1,oD=e=>ZL.test(e),sD=e=>JL.test(e),Gg=()=>{const e=Oe("colors"),t=Oe("spacing"),n=Oe("blur"),i=Oe("brightness"),s=Oe("borderColor"),a=Oe("borderRadius"),l=Oe("borderSpacing"),u=Oe("borderWidth"),d=Oe("contrast"),f=Oe("grayscale"),h=Oe("hueRotate"),g=Oe("invert"),m=Oe("gap"),b=Oe("gradientColorStops"),_=Oe("gradientColorStopPositions"),w=Oe("inset"),x=Oe("margin"),S=Oe("opacity"),I=Oe("padding"),T=Oe("saturate"),O=Oe("scale"),D=Oe("sepia"),L=Oe("skew"),M=Oe("space"),G=Oe("translate"),q=()=>["auto","contain","none"],lt=()=>["auto","hidden","clip","visible","scroll"],pt=()=>["auto",qt,t],z=()=>[qt,t],$=()=>["",Mr,gi],H=()=>["auto",Do,qt],J=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],Q=()=>["solid","dashed","dotted","double","none"],ot=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],Z=()=>["start","end","center","between","around","evenly","stretch"],ct=()=>["","0",qt],wt=()=>["auto","avoid","all","avoid-page","page","left","right","column"],it=()=>[Do,qt];return{cacheSize:500,separator:":",theme:{colors:[Is],spacing:[Mr,gi],blur:["none","",pi,qt],brightness:it(),borderColor:[e],borderRadius:["none","","full",pi,qt],borderSpacing:z(),borderWidth:$(),contrast:it(),grayscale:ct(),hueRotate:it(),invert:ct(),gap:z(),gradientColorStops:[e],gradientColorStopPositions:[QL,gi],inset:pt(),margin:pt(),opacity:it(),padding:z(),saturate:it(),scale:it(),sepia:ct(),skew:it(),space:z(),translate:z()},classGroups:{aspect:[{aspect:["auto","square","video",qt]}],container:["container"],columns:[{columns:[pi]}],"break-after":[{"break-after":wt()}],"break-before":[{"break-before":wt()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...J(),qt]}],overflow:[{overflow:lt()}],"overflow-x":[{"overflow-x":lt()}],"overflow-y":[{"overflow-y":lt()}],overscroll:[{overscroll:q()}],"overscroll-x":[{"overscroll-x":q()}],"overscroll-y":[{"overscroll-y":q()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[w]}],"inset-x":[{"inset-x":[w]}],"inset-y":[{"inset-y":[w]}],start:[{start:[w]}],end:[{end:[w]}],top:[{top:[w]}],right:[{right:[w]}],bottom:[{bottom:[w]}],left:[{left:[w]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",ks,qt]}],basis:[{basis:pt()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",qt]}],grow:[{grow:ct()}],shrink:[{shrink:ct()}],order:[{order:["first","last","none",ks,qt]}],"grid-cols":[{"grid-cols":[Is]}],"col-start-end":[{col:["auto",{span:["full",ks,qt]},qt]}],"col-start":[{"col-start":H()}],"col-end":[{"col-end":H()}],"grid-rows":[{"grid-rows":[Is]}],"row-start-end":[{row:["auto",{span:[ks,qt]},qt]}],"row-start":[{"row-start":H()}],"row-end":[{"row-end":H()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",qt]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",qt]}],gap:[{gap:[m]}],"gap-x":[{"gap-x":[m]}],"gap-y":[{"gap-y":[m]}],"justify-content":[{justify:["normal",...Z()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...Z(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...Z(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[I]}],px:[{px:[I]}],py:[{py:[I]}],ps:[{ps:[I]}],pe:[{pe:[I]}],pt:[{pt:[I]}],pr:[{pr:[I]}],pb:[{pb:[I]}],pl:[{pl:[I]}],m:[{m:[x]}],mx:[{mx:[x]}],my:[{my:[x]}],ms:[{ms:[x]}],me:[{me:[x]}],mt:[{mt:[x]}],mr:[{mr:[x]}],mb:[{mb:[x]}],ml:[{ml:[x]}],"space-x":[{"space-x":[M]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[M]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",qt,t]}],"min-w":[{"min-w":[qt,t,"min","max","fit"]}],"max-w":[{"max-w":[qt,t,"none","full","min","max","fit","prose",{screen:[pi]},pi]}],h:[{h:[qt,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[qt,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[qt,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[qt,t,"auto","min","max","fit"]}],"font-size":[{text:["base",pi,gi]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",rg]}],"font-family":[{font:[Is]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractons"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",qt]}],"line-clamp":[{"line-clamp":["none",Do,rg]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Mr,qt]}],"list-image":[{"list-image":["none",qt]}],"list-style-type":[{list:["none","disc","decimal",qt]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[S]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[S]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...Q(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Mr,gi]}],"underline-offset":[{"underline-offset":["auto",Mr,qt]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:z()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",qt]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",qt]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[S]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...J(),tD]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",$L]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},nD]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[_]}],"gradient-via-pos":[{via:[_]}],"gradient-to-pos":[{to:[_]}],"gradient-from":[{from:[b]}],"gradient-via":[{via:[b]}],"gradient-to":[{to:[b]}],rounded:[{rounded:[a]}],"rounded-s":[{"rounded-s":[a]}],"rounded-e":[{"rounded-e":[a]}],"rounded-t":[{"rounded-t":[a]}],"rounded-r":[{"rounded-r":[a]}],"rounded-b":[{"rounded-b":[a]}],"rounded-l":[{"rounded-l":[a]}],"rounded-ss":[{"rounded-ss":[a]}],"rounded-se":[{"rounded-se":[a]}],"rounded-ee":[{"rounded-ee":[a]}],"rounded-es":[{"rounded-es":[a]}],"rounded-tl":[{"rounded-tl":[a]}],"rounded-tr":[{"rounded-tr":[a]}],"rounded-br":[{"rounded-br":[a]}],"rounded-bl":[{"rounded-bl":[a]}],"border-w":[{border:[u]}],"border-w-x":[{"border-x":[u]}],"border-w-y":[{"border-y":[u]}],"border-w-s":[{"border-s":[u]}],"border-w-e":[{"border-e":[u]}],"border-w-t":[{"border-t":[u]}],"border-w-r":[{"border-r":[u]}],"border-w-b":[{"border-b":[u]}],"border-w-l":[{"border-l":[u]}],"border-opacity":[{"border-opacity":[S]}],"border-style":[{border:[...Q(),"hidden"]}],"divide-x":[{"divide-x":[u]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[u]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[S]}],"divide-style":[{divide:Q()}],"border-color":[{border:[s]}],"border-color-x":[{"border-x":[s]}],"border-color-y":[{"border-y":[s]}],"border-color-s":[{"border-s":[s]}],"border-color-e":[{"border-e":[s]}],"border-color-t":[{"border-t":[s]}],"border-color-r":[{"border-r":[s]}],"border-color-b":[{"border-b":[s]}],"border-color-l":[{"border-l":[s]}],"divide-color":[{divide:[s]}],"outline-style":[{outline:["",...Q()]}],"outline-offset":[{"outline-offset":[Mr,qt]}],"outline-w":[{outline:[Mr,gi]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:$()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[S]}],"ring-offset-w":[{"ring-offset":[Mr,gi]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",pi,rD]}],"shadow-color":[{shadow:[Is]}],opacity:[{opacity:[S]}],"mix-blend":[{"mix-blend":[...ot(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":ot()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[i]}],contrast:[{contrast:[d]}],"drop-shadow":[{"drop-shadow":["","none",pi,qt]}],grayscale:[{grayscale:[f]}],"hue-rotate":[{"hue-rotate":[h]}],invert:[{invert:[g]}],saturate:[{saturate:[T]}],sepia:[{sepia:[D]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[i]}],"backdrop-contrast":[{"backdrop-contrast":[d]}],"backdrop-grayscale":[{"backdrop-grayscale":[f]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[h]}],"backdrop-invert":[{"backdrop-invert":[g]}],"backdrop-opacity":[{"backdrop-opacity":[S]}],"backdrop-saturate":[{"backdrop-saturate":[T]}],"backdrop-sepia":[{"backdrop-sepia":[D]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[l]}],"border-spacing-x":[{"border-spacing-x":[l]}],"border-spacing-y":[{"border-spacing-y":[l]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",qt]}],duration:[{duration:it()}],ease:[{ease:["linear","in","out","in-out",qt]}],delay:[{delay:it()}],animate:[{animate:["none","spin","ping","pulse","bounce",qt]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[O]}],"scale-x":[{"scale-x":[O]}],"scale-y":[{"scale-y":[O]}],rotate:[{rotate:[ks,qt]}],"translate-x":[{"translate-x":[G]}],"translate-y":[{"translate-y":[G]}],"skew-x":[{"skew-x":[L]}],"skew-y":[{"skew-y":[L]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",qt]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",qt]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":z()}],"scroll-mx":[{"scroll-mx":z()}],"scroll-my":[{"scroll-my":z()}],"scroll-ms":[{"scroll-ms":z()}],"scroll-me":[{"scroll-me":z()}],"scroll-mt":[{"scroll-mt":z()}],"scroll-mr":[{"scroll-mr":z()}],"scroll-mb":[{"scroll-mb":z()}],"scroll-ml":[{"scroll-ml":z()}],"scroll-p":[{"scroll-p":z()}],"scroll-px":[{"scroll-px":z()}],"scroll-py":[{"scroll-py":z()}],"scroll-ps":[{"scroll-ps":z()}],"scroll-pe":[{"scroll-pe":z()}],"scroll-pt":[{"scroll-pt":z()}],"scroll-pr":[{"scroll-pr":z()}],"scroll-pb":[{"scroll-pb":z()}],"scroll-pl":[{"scroll-pl":z()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",qt]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Mr,gi,rg]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},aD=(e,{cacheSize:t,prefix:n,separator:i,experimentalParseClassName:s,extend:a={},override:l={}})=>{Ms(e,"cacheSize",t),Ms(e,"prefix",n),Ms(e,"separator",i),Ms(e,"experimentalParseClassName",s);for(const u in l)lD(e[u],l[u]);for(const u in a)cD(e[u],a[u]);return e},Ms=(e,t,n)=>{n!==void 0&&(e[t]=n)},lD=(e,t)=>{if(t)for(const n in t)Ms(e,n,t[n])},cD=(e,t)=>{if(t)for(const n in t){const i=t[n];i!==void 0&&(e[n]=(e[n]||[]).concat(i))}},uD=(e,...t)=>typeof e=="function"?Ug(Gg,e,...t):Ug(()=>aD(Gg(),e),...t),dD=Ug(Gg);var fD={twMerge:!0,twMergeConfig:{},responsiveVariants:!1},fy=e=>e||void 0,Xs=(...e)=>fy(iy(e).filter(Boolean).join(" ")),ig=null,Dr={},Kg=!1,Os=(...e)=>t=>t.twMerge?((!ig||Kg)&&(Kg=!1,ig=mn(Dr)?dD:uD({...Dr,extend:{theme:Dr.theme,classGroups:Dr.classGroups,conflictingClassGroupModifiers:Dr.conflictingClassGroupModifiers,conflictingClassGroups:Dr.conflictingClassGroups,...Dr.extend}})),fy(ig(Xs(e)))):Xs(e),__=(e,t)=>{for(let n in t)e.hasOwnProperty(n)?e[n]=Xs(e[n],t[n]):e[n]=t[n];return e},Bp=(e,t)=>{let{extend:n=null,slots:i={},variants:s={},compoundVariants:a=[],compoundSlots:l=[],defaultVariants:u={}}=e,d={...fD,...t},f=n!=null&&n.base?Xs(n.base,e==null?void 0:e.base):e==null?void 0:e.base,h=n!=null&&n.variants&&!mn(n.variants)?sy(s,n.variants):s,g=n!=null&&n.defaultVariants&&!mn(n.defaultVariants)?{...n.defaultVariants,...u}:u;!mn(d.twMergeConfig)&&!OL(d.twMergeConfig,Dr)&&(Kg=!0,Dr=d.twMergeConfig);let m=mn(n==null?void 0:n.slots),b=mn(i)?{}:{base:Xs(e==null?void 0:e.base,m&&(n==null?void 0:n.base)),...i},_=m?b:__({...n==null?void 0:n.slots},mn(b)?{base:e==null?void 0:e.base}:b),w=mn(n==null?void 0:n.compoundVariants)?a:oy(n==null?void 0:n.compoundVariants,a),x=I=>{if(mn(h)&&mn(i)&&m)return Os(f,I==null?void 0:I.class,I==null?void 0:I.className)(d);if(w&&!Array.isArray(w))throw new TypeError(`The "compoundVariants" prop must be an array. Received: ${typeof w}`);if(l&&!Array.isArray(l))throw new TypeError(`The "compoundSlots" prop must be an array. Received: ${typeof l}`);let T=(z,$,H=[],J)=>{let Q=H;if(typeof $=="string")Q=Q.concat(v_($).split(" ").map(ot=>`${z}:${ot}`));else if(Array.isArray($))Q=Q.concat($.reduce((ot,Z)=>ot.concat(`${z}:${Z}`),[]));else if(typeof $=="object"&&typeof J=="string"){for(let ot in $)if($.hasOwnProperty(ot)&&ot===J){let Z=$[ot];if(Z&&typeof Z=="string"){let ct=v_(Z);Q[J]?Q[J]=Q[J].concat(ct.split(" ").map(wt=>`${z}:${wt}`)):Q[J]=ct.split(" ").map(wt=>`${z}:${wt}`)}else Array.isArray(Z)&&Z.length>0&&(Q[J]=Z.reduce((ct,wt)=>ct.concat(`${z}:${wt}`),[]))}}return Q},O=(z,$=h,H=null,J=null)=>{var Q;let ot=$[z];if(!ot||mn(ot))return null;let Z=(Q=J==null?void 0:J[z])!=null?Q:I==null?void 0:I[z];if(Z===null)return null;let ct=p_(Z),wt=Array.isArray(d.responsiveVariants)&&d.responsiveVariants.length>0||d.responsiveVariants===!0,it=g==null?void 0:g[z],xt=[];if(typeof ct=="object"&&wt)for(let[kt,Dt]of Object.entries(ct)){let ue=ot[Dt];if(kt==="initial"){it=Dt;continue}Array.isArray(d.responsiveVariants)&&!d.responsiveVariants.includes(kt)||(xt=T(kt,ue,xt,H))}let yt=ct!=null&&typeof ct!="object"?ct:p_(it),Nt=ot[yt||"false"];return typeof xt=="object"&&typeof H=="string"&&xt[H]?__(xt,Nt):xt.length>0?(xt.push(Nt),H==="base"?xt.join(" "):xt):Nt},D=()=>h?Object.keys(h).map(z=>O(z,h)):null,L=(z,$)=>{if(!h||typeof h!="object")return null;let H=new Array;for(let J in h){let Q=O(J,h,z,$),ot=z==="base"&&typeof Q=="string"?Q:Q&&Q[z];ot&&(H[H.length]=ot)}return H},M={};for(let z in I)I[z]!==void 0&&(M[z]=I[z]);let G=(z,$)=>{var H;let J=typeof(I==null?void 0:I[z])=="object"?{[z]:(H=I[z])==null?void 0:H.initial}:{};return{...g,...M,...J,...$}},q=(z=[],$)=>{let H=[];for(let{class:J,className:Q,...ot}of z){let Z=!0;for(let[ct,wt]of Object.entries(ot)){let it=G(ct,$)[ct];if(Array.isArray(wt)){if(!wt.includes(it)){Z=!1;break}}else{let xt=yt=>yt==null||yt===!1;if(xt(wt)&&xt(it))continue;if(it!==wt){Z=!1;break}}}Z&&(J&&H.push(J),Q&&H.push(Q))}return H},lt=z=>{let $=q(w,z);if(!Array.isArray($))return $;let H={};for(let J of $)if(typeof J=="string"&&(H.base=Os(H.base,J)(d)),typeof J=="object")for(let[Q,ot]of Object.entries(J))H[Q]=Os(H[Q],ot)(d);return H},pt=z=>{if(l.length<1)return null;let $={};for(let{slots:H=[],class:J,className:Q,...ot}of l){if(!mn(ot)){let Z=!0;for(let ct of Object.keys(ot)){let wt=G(ct,z)[ct];if(wt===void 0||(Array.isArray(ot[ct])?!ot[ct].includes(wt):ot[ct]!==wt)){Z=!1;break}}if(!Z)continue}for(let Z of H)$[Z]=$[Z]||[],$[Z].push([J,Q])}return $};if(!mn(i)||!m){let z={};if(typeof _=="object"&&!mn(_))for(let $ of Object.keys(_))z[$]=H=>{var J,Q;return Os(_[$],L($,H),((J=lt(H))!=null?J:[])[$],((Q=pt(H))!=null?Q:[])[$],H==null?void 0:H.class,H==null?void 0:H.className)(d)};return z}return Os(f,D(),q(w),I==null?void 0:I.class,I==null?void 0:I.className)(d)},S=()=>{if(!(!h||typeof h!="object"))return Object.keys(h)};return x.variantKeys=S(),x.extend=n,x.base=f,x.slots=_,x.variants=h,x.defaultVariants=g,x.compoundSlots=l,x.compoundVariants=w,x};const w_=Bp({base:"ring-offset-background focus-visible:ring-ring inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border-input bg-background hover:bg-accent hover:text-accent-foreground border",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}});var hD=tt("<a><!></a>"),gD=tt("<button><!></button>");function Gn(e,t){ht(t,!0);let n=k(t,"variant",3,"default"),i=k(t,"size",3,"default"),s=k(t,"ref",15,null),a=k(t,"href",3,void 0),l=k(t,"type",3,"button"),u=At(t,["$$slots","$$events","$$legacy","class","variant","size","ref","href","type","children"]);const d=Qr(),[f,h]=d;var g=X(),m=W(g);{var b=w=>{var x=hD();let S;var I=rt(x);at(I,()=>t.children??Ct),nt(x),Kn(x,T=>s(T),()=>s()),St(T=>S=Lt(x,S,{...T}),[()=>h({class:ae(w_({variant:n(),size:i()}),t.class),href:a(),...u},[{attribute_name:"href",lang_attribute_name:"hreflang"}])]),P(w,x)},_=w=>{var x=gD();let S;var I=rt(x);at(I,()=>t.children??Ct),nt(x),Kn(x,T=>s(T),()=>s()),St(T=>S=Lt(x,S,{...T}),[()=>h({class:ae(w_({variant:n(),size:i()}),t.class),type:l(),...u},[{attribute_name:"formaction"}])]),P(w,x)};_t(m,w=>{a()?w(b):w(_,!1)})}P(e,g),gt()}const pD=(e,t)=>{const n=window.URL.createObjectURL(t),i=document.createElement("a");i.href=n,i.setAttribute("download",e),document.body.appendChild(i),i.click(),i.remove(),window.URL.revokeObjectURL(n)},Po=Ce({}),gc=Ce(0),hy=()=>({customLabelColorsStore:Po,colorVersion:gc,getCustomColor:a=>Te(Po)[a],setCustomColor:(a,l,u=1)=>{Po.update(d=>({...d,[a]:{color:l,alpha:u}})),gc.update(d=>d+1)},hasCustomColor:a=>!!Te(Po)[a],deleteCustomColor:a=>{Po.update(l=>{const{[a]:u,...d}=l;return d}),gc.update(l=>l+1)},clearCustomColors:()=>{Po.set({}),gc.update(a=>a+1)}}),Io=(e,t=1)=>{t=Math.max(0,Math.min(t,1));const{getCustomColor:n,hasCustomColor:i}=hy();if(i(e)){const x=n(e);if(x)return((I,T)=>{const O=parseInt(I.slice(1,3),16),D=parseInt(I.slice(3,5),16),L=parseInt(I.slice(5,7),16);return{color:`rgba(${O}, ${D}, ${L}, ${T})`,contrastColor:`rgba(${255-O}, ${255-D}, ${255-L}, ${T})`}})(x.color,x.alpha*t)}const s=["rgba(255, 0, 0, alpha)","rgba(0, 255, 0, alpha)","rgba(0, 0, 255, alpha)","rgba(255, 255, 0, alpha)","rgba(255, 0, 255, alpha)","rgba(0, 255, 255, alpha)","rgba(128, 0, 0, alpha)","rgba(0, 128, 0, alpha)","rgba(0, 0, 128, alpha)","rgba(128, 128, 0, alpha)","rgba(128, 0, 128, alpha)","rgba(0, 128, 128, alpha)","rgba(192, 192, 192, alpha)","rgba(128, 128, 128, alpha)","rgba(255, 165, 0, alpha)","rgba(255, 20, 147, alpha)","rgba(75, 0, 130, alpha)","rgba(255, 105, 180, alpha)","rgba(0, 255, 127, alpha)","rgba(255, 215, 0, alpha)","rgba(255, 69, 0, alpha)"];let a;const l=s.length-1;if(a=Array.from(e).reduce((x,S)=>(x<<5)-x+S.charCodeAt(0),0),a=Math.abs(a)%l+1,a>=1&&a<=l)return{color:s[a-1].replace("alpha",t.toString()),contrastColor:`rgba(${255-Math.round(parseInt(s[a-1].split(",")[0].split("(")[1])*(t/255))}, ${255-Math.round(parseInt(s[a-1].split(",")[1]))}, ${255-Math.round(parseInt(s[a-1].split(",")[2]))}, ${t})`};const u=(a*30+20)%256,d=(a*60+100)%256,f=(a*90+150)%256,h=Math.max(u,d,f),g=Math.min(u,d,f);if(h-g===0)return{color:`rgba(255, 255, 255, ${t})`,contrastColor:`rgba(0, 0, 0, ${t})`};const b=255/h,_=`rgba(${Math.round(u*b)}, ${Math.round(d*b)}, ${Math.round(f*b)}, ${t})`,w=`rgba(${255-Math.round(u*b)}, ${255-Math.round(d*b)}, ${255-Math.round(f*b)}, ${t})`;return{color:_,contrastColor:w}};function vD(e,t){ht(t,!0);let n=At(t,["$$slots","$$events","$$legacy"]);Rn(e,Rt({name:"loader-circle"},()=>n,{iconNode:[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56"}]],children:(s,a)=>{var l=X(),u=W(l);at(u,()=>t.children??Ct),P(s,l)},$$slots:{default:!0}})),gt()}var mD=tt(" <!>",1),bD=tt('<div class="flex items-center space-x-4"><!> <!></div>'),_D=tt("<!> ",1),wD=tt("<!> <!>",1),yD=tt("<!> <!>",1),xD=tt("<!> <!>",1);function gy(e,t){var I;ht(t,!0);let n=bt(!1),i=bt(null);function s(){et(n,!1),qi().then(()=>{v(i).focus()})}let a=k(t,"name",3,"items"),l=k(t,"label",3,"Select an item"),u=k(t,"inputValue",15,""),d=k(t,"placeholder",3,"Search an item..."),f=k(t,"disabled",3,!1),h=k(t,"isLoading",3,!1),g=bt(ft(((I=t.value)==null?void 0:I.value)||""));const m=N(()=>{var T;return(T=t.items.find(O=>O.value===v(g)))==null?void 0:T.label}),b=T=>{var O;et(g,ft(T.value)),(O=t.onSelect)==null||O.call(t,T),s()},_=T=>{const O={value:T,label:T};t.items.push(O),b(O)},w=T=>{T.key==="Enter"&&u()&&(_(u()),u(""),T.preventDefault()),T.stopPropagation()};var x=X(),S=W(x);Ot(S,()=>kL,(T,O)=>{O(T,{get open(){return v(n)},set open(D){et(n,ft(D))},children:(D,L)=>{var M=xD(),G=W(M);Ot(G,()=>IL,(lt,pt)=>{pt(lt,{get ref(){return v(i)},set ref($){et(i,ft($))},child:($,H)=>{let J=()=>H==null?void 0:H().props;var Q=bD(),ot=rt(Q);Gn(ot,Rt(J,{variant:"secondary",get disabled(){return f()},class:"w-[200px] justify-between",role:"combobox",get"aria-expanded"(){return v(n)},"data-testid":"select-list-trigger",children:(wt,it)=>{we();var xt=mD(),yt=W(xt),Nt=mt(yt);Ik(Nt,{class:"opacity-50"}),St(()=>De(yt,`${(v(m)||l())??""} `)),P(wt,xt)},$$slots:{default:!0}}));var Z=mt(ot,2);{var ct=wt=>{vD(wt,{class:"mr-2 h-4 w-4 animate-spin"})};_t(Z,wt=>{h()&&wt(ct)})}nt(Q),P($,Q)},$$slots:{child:!0}})});var q=mt(G,2);Ot(q,()=>TL,(lt,pt)=>{pt(lt,{class:"w-[200px] p-0",children:(z,$)=>{var H=X(),J=W(H);Ot(J,()=>dL,(Q,ot)=>{ot(Q,{children:(Z,ct)=>{var wt=yD(),it=W(wt);Ot(it,()=>PL,(yt,Nt)=>{Nt(yt,{get placeholder(){return d()},onkeydown:w,"data-testid":"select-list-input",get value(){return u()},set value(kt){u(kt)}})});var xt=mt(it,2);Ot(xt,()=>EL,(yt,Nt)=>{Nt(yt,{children:(kt,Dt)=>{var ue=wD(),Ut=W(ue);Ot(Ut,()=>wL,(re,fe)=>{fe(re,{children:(ge,Ye)=>{var Vt=X(),te=W(Vt);{var pe=de=>{var Fe=X(),Pe=W(Fe);at(Pe,()=>t.notFound,()=>({inputValue:u()||""})),P(de,Fe)},ie=de=>{var Fe=ye("Item not found");P(de,Fe)};_t(te,de=>{t.notFound?de(pe):de(ie,!1)})}P(ge,Vt)},$$slots:{default:!0}})});var Yt=mt(Ut,2);Ot(Yt,()=>xL,(re,fe)=>{fe(re,{get value(){return a()},children:(ge,Ye)=>{var Vt=X(),te=W(Vt);Ti(te,17,()=>t.items,pe=>pe.value,(pe,ie)=>{var de=X(),Fe=W(de);Ot(Fe,()=>SL,(Pe,be)=>{be(Pe,{get value(){return v(ie).value},onSelect:()=>b(v(ie)),children:(qe,Se)=>{var Re=_D(),Be=W(Re);const Je=N(()=>ae(v(g)!==v(ie).value&&"text-transparent"));up(Be,{get class(){return v(Je)}});var fn=mt(Be);St(()=>De(fn,` ${v(ie).label??""}`)),P(qe,Re)},$$slots:{default:!0}})}),P(pe,de)}),P(ge,Vt)},$$slots:{default:!0}})}),P(kt,ue)},$$slots:{default:!0}})}),P(Z,wt)},$$slots:{default:!0}})}),P(z,H)},$$slots:{default:!0}})}),P(D,M)},$$slots:{default:!0}})}),P(e,x),gt()}const py=()=>d0(f0());var SD=tt('<div class="text-md m-2">New label <span class="font-semibold"> </span> will be created.</div>');function vy(e,t){ht(t,!0);var n=SD(),i=mt(rt(n)),s=rt(i);nt(i),we(),nt(n),St(a=>{_n(i,a),De(s,`"${t.label??""}"`)},[()=>`color: ${Io(t.label).color}`]),P(e,n),gt()}const my=e=>e.map(n=>{const i=n.annotation_label_name;return{value:i,label:i}}).sort((n,i)=>n.label.localeCompare(i.label));var AD=tt('<div class="flex flex-col space-y-4"><div class="text-md mb-2">You can edit labels for multiple annotations at once.</div> <!></div>'),CD=tt('<div class="flex h-full min-h-0 flex-col space-y-4 overflow-hidden dark:[color-scheme:dark]"><!></div>');function PD(e,t){ht(t,!0);const[n,i]=rs(),s=()=>Ke(a,"$result",n),a=py(),l=N(()=>my(s().data||[]));YD(e,{className:"h-full",children:(u,d)=>{ZD(u,{className:"h-full flex flex-col",children:(f,h)=>{var g=CD(),m=rt(g);const b=N(()=>`Selected annotations: ${t.selectedAnnotations.length}`);_y(m,{get title(){return v(b)},children:(_,w)=>{var x=AD(),S=mt(rt(x),2);gy(S,{get items(){return v(l)},name:"annotation-label",placeholder:"Select a label ",label:"Select a label",get onSelect(){return t.onSelect},get isLoading(){return t.isLoading},get disabled(){return t.disabled},notFound:(T,O)=>{let D=()=>O==null?void 0:O().inputValue;vy(T,{get label(){return D()}})},$$slots:{notFound:!0}}),nt(x),P(_,x)}}),nt(g),P(f,g)},$$slots:{default:!0}})},$$slots:{default:!0}}),gt(),i()}function ED(e,t){const n=e.currentTarget.dataset.annotationId;t(n)}function TD(e,t){if(e.key==="Enter"||e.key===" "){e.preventDefault();const n=e.currentTarget.dataset.annotationId;t(n)}}var kD=tt(`<div class="flex h-full flex-1 items-center justify-center"><div class="text-center text-muted-foreground"><div class="mb-2 text-lg font-medium">No annotations found</div> <div class="text-sm">This dataset doesn't contain any annotations.</div></div></div>`),ID=tt('<div data-testid="annotation-grid-item" role="button" tabindex="0"><div class="absolute right-7 top-1 z-10"><!></div> <!></div>'),OD=tt('<div class="flex justify-center p-4"><!></div>'),ND=tt("<!> <!>",1),RD=tt('<div class="min-w-[250px] max-w-[30%] flex-1"><!></div>'),MD=tt('<div class="flex h-full flex-1"><div class="viewport flex-1"><!></div> <!></div>');function F6(e,t){ht(t,!0);const[n,i]=rs(),s=()=>Ke(m,"$showAnnotationTextLabelsStore",n),a=()=>Ke(t.selectedAnnotationFilterIds,"$selectedAnnotationFilterIds",n),l=()=>Ke(g,"$tagsSelected",n),u=()=>Ke(v(D),"$infiniteAnnotations",n),d=()=>Ke(q,"$pickedAnnotationIds",n),f=()=>Ke(b,"$isEditingMode",n),h=()=>Ke(v(M),"$isPending",n),{tagsSelected:g}=mT({dataset_id:t.dataset_id,kind:["annotation"]}),{showAnnotationTextLabelsStore:m}=cp(),{isEditingMode:b}=no.data.globalStorage;let _=N(s);const{getDatasetVersion:w,setAnnotationsTotalCount:x}=Us();let S=bt("");wf(async()=>{et(S,ft(await w(t.dataset_id)))});let I=bt(null);const T=N(()=>({path:{dataset_id:t.dataset_id},query:{annotation_label_ids:a().length>0?a():void 0,tag_ids:l().size>0?Array.from(l()):void 0}})),O=N(()=>Ak(v(T))),D=N(()=>v(O).annotations),L=N(()=>v(O).updateAnnotations),M=N(()=>v(O).isPending);let G=N(()=>a().join(",")+Array.from(l()).join(","));xe(()=>{v(D).subscribe(yt=>{yt.isSuccess&&yt.data.pages.length>0&&x(yt.data.pages[0].total_count)})});const{selectedSampleAnnotationCropIds:q,toggleSampleAnnotationCropSelection:lt,clearSelectedSampleAnnotationCrops:pt}=Us(),z=16;function $(yt){yt&&lt(yt)}const H=N(()=>{var yt;return((yt=u().data)==null?void 0:yt.pages.flatMap(Nt=>Nt.data))||[]});function J(){u().hasNextPage&&u().fetchNextPage()}function Q(yt){const Nt=yt.currentTarget.dataset.annotationId,kt=yt.currentTarget.dataset.sampleId,Dt=yt.currentTarget.dataset.index;Sc(Ac.toSampleWithAnnotation({sampleId:kt,annotationId:Nt,datasetId:t.dataset_id,annotationIndex:Number(Dt)}))}const ot=N(()=>v(H).filter(yt=>d().has(yt.annotation_id))),Z=async yt=>{await v(L)(v(ot).map(Nt=>({annotation_id:Nt.annotation_id,label_name:yt.value,dataset_id:t.dataset_id}))),pt()};var ct=X(),wt=W(ct);{var it=yt=>{var Nt=kD();P(yt,Nt)},xt=yt=>{var Nt=MD(),kt=rt(Nt),Dt=rt(kt);Gs(Dt,()=>v(G),Yt=>{const re=N(()=>{var Vt;return(Vt=v(H))==null?void 0:Vt.length}),fe=N(()=>t.itemHeight+z),ge=N(()=>t.itemWidth+z),Ye=N(()=>{var Vt;return((Vt=v(I))==null?void 0:Vt.clientHeight)||0});fk(Yt,{get itemCount(){return v(re)},get itemHeight(){return v(fe)},get itemWidth(){return v(ge)},get height(){return v(Ye)},class:"overflow-none overflow-y-auto dark:[color-scheme:dark]",get style(){return`--sample-width: ${t.itemWidth??""}px; --sample-height: ${t.itemHeight??""}px;`},item:(pe,ie)=>{let de=()=>ie==null?void 0:ie().index,Fe=()=>ie==null?void 0:ie().style;var Pe=X(),be=W(Pe);Gs(be,()=>u().dataUpdatedAt,qe=>{var Se=ID();Se.__click=[ED,$],Se.__dblclick=Q,Se.__keydown=[TD,$];var Re=rt(Se),Be=rt(Re);const Je=N(()=>d().has(v(H)[de()].annotation_id));M4(Be,{onSelect:()=>{},get isSelected(){return v(Je)}}),nt(Re);var fn=mt(Re,2);const or=N(()=>d().has(v(H)[de()].annotation_id));KD(fn,{get annotation(){return v(H)[de()]},get width(){return t.itemWidth},get height(){return t.itemHeight},get cachedDatasetVersion(){return v(S)},get showLabel(){return v(_)},get selected(){return v(or)}}),nt(Se),St(()=>{var jr,oe;_n(Se,Fe()),He(Se,"data-annotation-id",(jr=v(H)[de()])==null?void 0:jr.annotation_id),He(Se,"data-sample-id",(oe=v(H)[de()])==null?void 0:oe.sample.sample_id),He(Se,"data-index",de()),He(Se,"aria-label",`Edit annotation: ${v(H)[de()].annotation_id}`)}),P(qe,Se)}),P(pe,Pe)},footer:pe=>{var ie=ND(),de=W(ie);f4(de,{onIntersect:J});var Fe=mt(de,2);{var Pe=be=>{var qe=OD(),Se=rt(qe);Pk(Se,{}),nt(qe),P(be,qe)};_t(Fe,be=>{u().isFetchingNextPage&&be(Pe)})}P(pe,ie)},$$slots:{item:!0,footer:!0}})}),nt(kt);var ue=mt(kt,2);{var Ut=Yt=>{var re=RD(),fe=rt(re);const ge=N(()=>v(ot).length===0);PD(fe,{get selectedAnnotations(){return v(ot)},get disabled(){return v(ge)},get isLoading(){return h()},onSelect:Z}),nt(re),P(Yt,re)};_t(ue,Yt=>{f()&&Yt(Ut)})}nt(Nt),Kn(Nt,Yt=>et(I,Yt),()=>v(I)),P(yt,Nt)};_t(wt,yt=>{u().isFetched&&v(H).length===0?yt(it):yt(xt,!1)})}P(e,ct),gt(),i()}so(["click","dblclick","keydown"]);function y_(e){return e.annotation_type==="object_detection"}function LD(e){return e.annotation_type==="instance_segmentation"}function B6(e){return e.annotation_type==="classification"}function qg(e){if(y_(e)||LD(e))return{...y_(e)?e.object_detection_details:e.instance_segmentation_details};throw new Error(`Annotation type is not supported for bounding box extraction: ${e.annotation_type}`)}const DD=(e,t)=>{const n=qg(e),i=qg(t),s=n.height*n.width;return i.height*i.width-s},V6=e=>e.annotations===void 0?[]:e.annotations.filter(t=>t.annotation_type!=="classification").sort(DD),og=Ce(!0),sg=Ce(null),qc=Ce([]),FD=Ei(qc,e=>{const t=new Map;return e.forEach(n=>{t.set(n.annotation_task_id,n)}),t}),BD=Ei(qc,e=>{const t=e.some(i=>i.is_prediction),n=e.some(i=>!i.is_prediction);return t&&n});let x_=!1;const VD=()=>{const e=async()=>{if(!x_){og.set(!0),sg.set(null);try{const t=await In.GET("/api/annotationtasks/");if("error"in t)throw new Error(JSON.stringify(t.error,null,2));if(!t.data)throw new Error("No annotation tasks found");qc.set(t.data),x_=!0}catch(t){sg.set(String(t))}finally{og.set(!1)}}};return e(),{annotationTasks:qc,taskMap:FD,isLoading:og,error:sg,refreshTasks:e,hasEnoughTasksForMetrics:BD}},S_=Ce(!1);function WD(){const{settingsStore:e}=cp(),t=Ei(e,i=>i.key_hide_annotations||"v");return{isHidden:S_,handleKeyEvent:i=>{if(i.target instanceof HTMLInputElement||i.target instanceof HTMLTextAreaElement||i.target instanceof HTMLSelectElement)return;let s;t.subscribe(l=>{s=l})(),i.key===s&&S_.set(i.type==="keydown")}}}var zD=tt('<div class="annotation-label flex items-center justify-between text-sm text-white svelte-20k33o"><span class="truncate text-sm"></span></div>'),HD=cl("<svg><!></svg>"),UD=tt("<div><div><!> <!></div></div>"),GD=tt('<div class="crop flex items-center justify-center rounded-lg bg-black svelte-20k33o"><div class="text-xs text-gray-400">Loading...</div></div>');function KD(e,t){var yt,Nt;ht(t,!0);const[n,i]=rs(),s=()=>Ke(_,"$customLabelColorsStore",n),a=()=>Ke(H,"$taskMap",n),l=()=>Ke(b,"$isHidden",n);let u=k(t,"cachedDatasetVersion",3,""),d=k(t,"showLabel",3,!0),f=k(t,"selected",3,!1);const h=20,g=t.annotation.sample,{getDatasetVersion:m}=Us(),{isHidden:b}=WD(),{customLabelColorsStore:_}=hy();let w=bt(ft(u())),x=bt(!!u());if(wf(async()=>{!u()&&t.annotation.annotation_id&&(et(w,ft(await m(t.annotation.annotation_id.split("-")[0]))),et(x,!0))}),!t.annotation.object_detection_details&&!t.annotation.instance_segmentation_details)throw new Error("Unsupported annotation: Only annotations with object_detection_details or instance_segmentation_details are supported. Please check the annotation data.");const{width:S,height:I,x:T,y:O}=qg(t.annotation),D=(Nt=(yt=t.annotation)==null?void 0:yt.instance_segmentation_details)==null?void 0:Nt.segmentation_mask,L=N(()=>Math.min(t.width/(S+h*2),t.height/(I+h*2)));function M(){return-(T-h)*v(L)+(t.width-(S+h*2)*v(L))/2}function G(){return-(O-h)*v(L)+(t.height-(I+h*2)*v(L))/2}let q=t.annotation.annotation_label.annotation_label_name;const lt=N(()=>{var kt;return((kt=s()[q])==null?void 0:kt.color)??Io(q,1).color}),pt=N(()=>{var kt;return(kt=s()[q])==null||kt.color,Io(q,.4).color}),z=N(()=>{var kt;return((kt=s()[q])==null?void 0:kt.alpha)??.4}),$=!!D,{taskMap:H}=VD(),J=N(()=>t.annotation.annotation_task_id&&a().has(t.annotation.annotation_task_id)?a().get(t.annotation.annotation_task_id).is_prediction:!1),Q=N(M),ot=N(G),Z=N(()=>`${bT}/sample/${g.sample_id}${v(w)?`?v=${v(w)}`:""}`);var ct=X(),wt=W(ct);{var it=kt=>{var Dt=UD();let ue;var Ut=rt(Dt);let Yt;var re=rt(Ut);{var fe=Vt=>{var te=zD(),pe=rt(te);pe.textContent=q,nt(te),St(ie=>_n(te,ie),[()=>`background-color: ${v(pt)??Io(q,.4).color};`]),P(Vt,te)};_t(re,Vt=>{d()&&Vt(fe)})}var ge=mt(re,2);{var Ye=Vt=>{var te=HD();He(te,"viewBox",`${T} ${O} ${S} ${I}`);var pe=rt(te);v4(pe,{segmentation:D,get width(){return g.width},get colorFill(){return v(pt)},get opacity(){return v(z)}}),nt(te),P(Vt,te)};_t(ge,Vt=>{$&&Vt(Ye)})}nt(Ut),nt(Dt),St((Vt,te,pe)=>{ue=qn(Dt,1,"crop rounded-lg bg-black svelte-20k33o",null,ue,Vt),_n(Dt,`
49
- width: ${t.width}px;
50
- height: ${t.height}px;
51
- background-image: url("${v(Z)}");
52
- background-position: ${v(Q)}px ${v(ot)}px;
53
- background-size: ${g.width*v(L)}px ${g.height*v(L)}px;
54
- background-repeat: no-repeat;
55
- `),Yt=qn(Ut,1,"annotation-box svelte-20k33o",null,Yt,te),_n(Ut,pe)},[()=>({"annotation-selected":f()}),()=>({invisible:l()}),()=>`
56
- left: ${(t.width-S*v(L))/2}px;
57
- top: ${(t.height-I*v(L))/2}px;
58
- width: ${S*v(L)}px;
59
- height: ${I*v(L)}px;
60
- border-color: ${$?"transparent":v(lt)??Io(q).color};
61
- background-color: ${$?"transparent":v(pt)??Io(q,.4).color};
62
- border-style: ${v(J)?"dashed":"solid"};
63
-
64
- `]),P(kt,Dt)},xt=kt=>{var Dt=GD();St(()=>_n(Dt,`width: ${t.width}px; height: ${t.height}px;`)),P(kt,Dt)};_t(wt,kt=>{v(x)?kt(it):kt(xt,!1)})}P(e,ct),gt(),i()}var qD=tt("<div><!></div>");function YD(e,t){ht(t,!0);var n=qD(),i=rt(n);at(i,()=>t.children),nt(n),St(s=>qn(n,1,s),[()=>ki(ae("rounded-lg border border-gray-800 bg-black",t.className))]),P(e,n),gt()}var XD=tt("<div><!></div>");function ZD(e,t){ht(t,!0);var n=XD(),i=rt(n);at(i,()=>t.children),nt(n),St(s=>qn(n,1,s),[()=>ki(ae("p-4",t.className))]),P(e,n),gt()}var JD=tt(`<span class="bg-secondary relative grow overflow-hidden rounded-full data-[orientation='horizontal']:h-2 data-[orientation='vertical']:h-full data-[orientation='horizontal']:w-full data-[orientation='vertical']:w-2"><!></span> <!>`,1);function QD(e,t){ht(t,!0);let n=k(t,"ref",15,null),i=k(t,"value",15),s=k(t,"orientation",3,"horizontal"),a=At(t,["$$slots","$$events","$$legacy","ref","value","orientation","class"]);var l=X(),u=W(l);const d=N(()=>ae("relative flex touch-none select-none items-center data-[orientation='vertical']:h-full data-[orientation='vertical']:min-h-44 data-[orientation='horizontal']:w-full data-[orientation='vertical']:w-auto data-[orientation='vertical']:flex-col",t.class));Ot(u,()=>g5,(f,h)=>{h(f,Rt({get orientation(){return s()},get class(){return v(d)}},()=>a,{get ref(){return n()},set ref(m){n(m)},get value(){return i()},set value(m){i(m)},children:(m,b)=>{let _=()=>b==null?void 0:b().thumbs;var w=JD(),x=W(w),S=rt(x);Ot(S,()=>v5,(T,O)=>{O(T,{class:"bg-primary absolute data-[orientation='horizontal']:h-full data-[orientation='vertical']:w-full"})}),nt(x);var I=mt(x,2);Ti(I,17,_,yf,(T,O)=>{var D=X(),L=W(D);Ot(L,()=>b5,(M,G)=>{G(M,{get index(){return v(O)},class:"border-primary bg-background ring-offset-background focus-visible:ring-ring block size-5 rounded-full border-2 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50"})}),P(T,D)}),St(()=>He(x,"data-orientation",s())),P(m,w)},$$slots:{default:!0}}))}),P(e,l),gt()}const jD=PN,$D=IN,tF=TN;function Vp(e,t){ht(t,!0);let n=At(t,["$$slots","$$events","$$legacy"]);Rn(e,Rt({name:"chevron-down"},()=>n,{iconNode:[["path",{d:"m6 9 6 6 6-6"}]],children:(s,a)=>{var l=X(),u=W(l);at(u,()=>t.children??Ct),P(s,l)},$$slots:{default:!0}})),gt()}const eF=e=>e;function by(e){const t=e-1;return t*t*t+1}function A_(e){const t=typeof e=="string"&&e.match(/^\s*(-?[\d.]+)([^\s]*)\s*$/);return t?[parseFloat(t[1]),t[2]||"px"]:[e,"px"]}function W6(e,{delay:t=0,duration:n=400,easing:i=eF}={}){const s=+getComputedStyle(e).opacity;return{delay:t,duration:n,easing:i,css:a=>`opacity: ${a*s}`}}function nF(e,{delay:t=0,duration:n=400,easing:i=by,x:s=0,y:a=0,opacity:l=0}={}){const u=getComputedStyle(e),d=+u.opacity,f=u.transform==="none"?"":u.transform,h=d*(1-l),[g,m]=A_(s),[b,_]=A_(a);return{delay:t,duration:n,easing:i,css:(w,x)=>`
65
- transform: ${f} translate(${(1-w)*g}${m}, ${(1-w)*b}${_});
66
- opacity: ${d-h*x}`}}function rF(e,{delay:t=0,duration:n=400,easing:i=by,axis:s="y"}={}){const a=getComputedStyle(e),l=+a.opacity,u=s==="y"?"height":"width",d=parseFloat(a[u]),f=s==="y"?["top","bottom"]:["left","right"],h=f.map(S=>`${S[0].toUpperCase()}${S.slice(1)}`),g=parseFloat(a[`padding${h[0]}`]),m=parseFloat(a[`padding${h[1]}`]),b=parseFloat(a[`margin${h[0]}`]),_=parseFloat(a[`margin${h[1]}`]),w=parseFloat(a[`border${h[0]}Width`]),x=parseFloat(a[`border${h[1]}Width`]);return{delay:t,duration:n,easing:i,css:S=>`overflow: hidden;opacity: ${Math.min(S*20,1)*l};${u}: ${S*d}px;padding-${f[0]}: ${S*g}px;padding-${f[1]}: ${S*m}px;margin-${f[0]}: ${S*b}px;margin-${f[1]}: ${S*_}px;border-${f[0]}-width: ${S*w}px;border-${f[1]}-width: ${S*x}px;min-${u}: 0`}}var iF=tt('<h2 class="py-2 text-lg font-semibold"><div class="flex items-center justify-between"><div class="flex items-center space-x-2"><!> <span> </span></div> <div><!></div></div></h2>'),oF=tt('<div class="mt-2"><!></div>'),sF=tt("<!> <!>",1);function _y(e,t){let n=bt(!0);const i=168;jD(e,{get open(){return v(n)},set open(s){et(n,ft(s))},children:(s,a)=>{var l=sF(),u=W(l);$D(u,{class:"w-full",children:(f,h)=>{var g=iF(),m=rt(g),b=rt(m),_=rt(b);{var w=D=>{var L=X(),M=W(L);Ot(M,()=>t.icon,(G,q)=>{q(G,{})}),P(D,L)};_t(_,D=>{t.icon&&D(w)})}var x=mt(_,2),S=rt(x,!0);nt(x),nt(b);var I=mt(b,2),T=rt(I);const O=N(()=>`transform: ${v(n)?"rotate(-180deg)":"rotate(0deg)"}`);Vp(T,{class:`transition-transform duration-${i}`,get style(){return v(O)}}),nt(I),nt(m),nt(g),St(()=>De(S,t.title)),P(f,g)},$$slots:{default:!0}});var d=mt(u,2);tF(d,{forceMount:!0,children:(f,h)=>{var g=X(),m=W(g);{var b=_=>{var w=oF(),x=rt(w);at(x,()=>t.children),nt(w),w0(3,w,()=>rF,()=>({duration:i})),P(_,w)};_t(m,_=>{v(n)&&_(b)})}P(f,g)},$$slots:{default:!0}}),P(s,l)},$$slots:{default:!0}})}var aF=tt("<label> </label>"),lF=tt("<label> </label>"),cF=tt('<p class="ml-4 text-xs text-muted-foreground"> </p>'),uF=tt('<div class="space-y-2"><div class="flex justify-between"><!></div> <!> <!></div>');function dF(e,t){const n="text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70";var i=uF(),s=rt(i),a=rt(s);{var l=g=>{var m=aF();qn(m,1,ki(n));var b=rt(m,!0);nt(m),St(()=>{He(m,"for",t.forComponent),De(b,t.label)}),P(g,m)},u=g=>{var m=lF();qn(m,1,ki(n));var b=rt(m,!0);nt(m),St(()=>De(b,t.label)),P(g,m)};_t(a,g=>{t.forComponent?g(l):g(u,!1)})}nt(s);var d=mt(s,2);at(d,()=>t.children);var f=mt(d,2);{var h=g=>{var m=cF(),b=rt(m,!0);nt(m),St(()=>De(b,t.description)),P(g,m)};_t(f,g=>{t.description&&g(h)})}nt(i),P(e,i)}function fF(e,t){ht(t,!0);let n=k(t,"ref",15,null),i=At(t,["$$slots","$$events","$$legacy","ref","class"]);var s=X(),a=W(s);const l=N(()=>ae("py-1.5 pl-8 pr-2 text-sm font-semibold",t.class));Ot(a,()=>_M,(u,d)=>{d(u,Rt({get class(){return v(l)}},()=>i,{get ref(){return n()},set ref(f){n(f)}}))}),P(e,s),gt()}var hF=tt('<span class="absolute left-2 flex size-3.5 items-center justify-center"><!></span> <!>',1);function Yg(e,t){ht(t,!0);let n=k(t,"ref",15,null),i=At(t,["$$slots","$$events","$$legacy","ref","class","value","label","children"]);var s=X(),a=W(s);const l=N(()=>ae("data-[highlighted]:bg-accent data-[highlighted]:text-accent-foreground relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t.class));Ot(a,()=>pM,(u,d)=>{d(u,Rt({get value(){return t.value},get class(){return v(l)}},()=>i,{get ref(){return n()},set ref(h){n(h)},children:(h,g)=>{let m=()=>g==null?void 0:g().selected,b=()=>g==null?void 0:g().highlighted;var _=hF(),w=W(_),x=rt(w);{var S=D=>{up(D,{class:"size-4"})};_t(x,D=>{m()&&D(S)})}nt(w);var I=mt(w,2);{var T=D=>{var L=X(),M=W(L);at(M,()=>t.children,()=>({selected:m(),highlighted:b()})),P(D,L)},O=D=>{var L=ye();St(()=>De(L,t.label||t.value)),P(D,L)};_t(I,D=>{t.children?D(T):D(O,!1)})}P(h,_)},$$slots:{default:!0}}))}),P(e,s),gt()}function gF(e,t){ht(t,!0);let n=At(t,["$$slots","$$events","$$legacy"]);Rn(e,Rt({name:"chevron-up"},()=>n,{iconNode:[["path",{d:"m18 15-6-6-6 6"}]],children:(s,a)=>{var l=X(),u=W(l);at(u,()=>t.children??Ct),P(s,l)},$$slots:{default:!0}})),gt()}function pF(e,t){ht(t,!0);let n=k(t,"ref",15,null),i=At(t,["$$slots","$$events","$$legacy","ref","class"]);var s=X(),a=W(s);const l=N(()=>ae("flex cursor-default items-center justify-center py-1",t.class));Ot(a,()=>EM,(u,d)=>{d(u,Rt({get class(){return v(l)}},()=>i,{get ref(){return n()},set ref(f){n(f)},children:(f,h)=>{gF(f,{class:"size-4"})},$$slots:{default:!0}}))}),P(e,s),gt()}function vF(e,t){ht(t,!0);let n=k(t,"ref",15,null),i=At(t,["$$slots","$$events","$$legacy","ref","class"]);var s=X(),a=W(s);const l=N(()=>ae("flex cursor-default items-center justify-center py-1",t.class));Ot(a,()=>AM,(u,d)=>{d(u,Rt({get class(){return v(l)}},()=>i,{get ref(){return n()},set ref(f){n(f)},children:(f,h)=>{Vp(f,{class:"size-4"})},$$slots:{default:!0}}))}),P(e,s),gt()}var mF=tt("<!> <!> <!>",1);function wy(e,t){ht(t,!0);let n=k(t,"ref",15,null),i=k(t,"sideOffset",3,4),s=At(t,["$$slots","$$events","$$legacy","ref","class","sideOffset","portalProps","children"]);var a=X(),l=W(a);Ot(l,()=>gl,(u,d)=>{d(u,Rt(()=>t.portalProps,{children:(f,h)=>{var g=X(),m=W(g);const b=N(()=>ae("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 bg-popover text-popover-foreground relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border shadow-md data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",t.class));Ot(m,()=>fM,(_,w)=>{w(_,Rt({get sideOffset(){return i()},get class(){return v(b)}},()=>s,{get ref(){return n()},set ref(x){n(x)},children:(x,S)=>{var I=mF(),T=W(I);pF(T,{});var O=mt(T,2);const D=N(()=>ae("h-[var(--bits-select-anchor-height)] w-full min-w-[var(--bits-select-anchor-width)] p-1"));Ot(O,()=>yM,(M,G)=>{G(M,{get class(){return v(D)},children:(q,lt)=>{var pt=X(),z=W(pt);at(z,()=>t.children??Ct),P(q,pt)},$$slots:{default:!0}})});var L=mt(O,2);vF(L,{}),P(x,I)},$$slots:{default:!0}}))}),P(f,g)},$$slots:{default:!0}}))}),P(e,a),gt()}var bF=tt("<!> <!>",1);function yy(e,t){ht(t,!0);let n=k(t,"ref",15,null),i=At(t,["$$slots","$$events","$$legacy","ref","class","children"]);var s=X(),a=W(s);const l=N(()=>ae("border-input bg-background ring-offset-background data-[placeholder]:text-muted-foreground focus:ring-ring flex h-10 w-full items-center justify-between rounded-md border px-3 py-2 text-sm focus:outline-none focus:ring-2 focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",t.class));Ot(a,()=>e5,(u,d)=>{d(u,Rt({get class(){return v(l)}},()=>i,{get ref(){return n()},set ref(f){n(f)},children:(f,h)=>{var g=bF(),m=W(g);at(m,()=>t.children??Ct);var b=mt(m,2);Vp(b,{class:"size-4 opacity-50"}),P(f,g)},$$slots:{default:!0}}))}),P(e,s),gt()}const xy=$3,_F=mM;function wF(e,t){ht(t,!0);let n=At(t,["$$slots","$$events","$$legacy"]);Rn(e,Rt({name:"download"},()=>n,{iconNode:[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}],["polyline",{points:"7 10 12 15 17 10"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3"}]],children:(s,a)=>{var l=X(),u=W(l);at(u,()=>t.children??Ct),P(s,l)},$$slots:{default:!0}})),gt()}function yF(e,t){ht(t,!0);let n=At(t,["$$slots","$$events","$$legacy"]);Rn(e,Rt({name:"file-input"},()=>n,{iconNode:[["path",{d:"M4 22h14a2 2 0 0 0 2-2V7l-5-5H6a2 2 0 0 0-2 2v4"}],["path",{d:"M14 2v4a2 2 0 0 0 2 2h4"}],["path",{d:"M2 15h10"}],["path",{d:"m9 18 3-3-3-3"}]],children:(s,a)=>{var l=X(),u=W(l);at(u,()=>t.children??Ct),P(s,l)},$$slots:{default:!0}})),gt()}function xF(e,t){ht(t,!0);let n=At(t,["$$slots","$$events","$$legacy"]);Rn(e,Rt({name:"network"},()=>n,{iconNode:[["rect",{x:"16",y:"16",width:"6",height:"6",rx:"1"}],["rect",{x:"2",y:"16",width:"6",height:"6",rx:"1"}],["rect",{x:"9",y:"2",width:"6",height:"6",rx:"1"}],["path",{d:"M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3"}],["path",{d:"M12 12V8"}]],children:(s,a)=>{var l=X(),u=W(l);at(u,()=>t.children??Ct),P(s,l)},$$slots:{default:!0}})),gt()}function SF(e,t){ht(t,!0);let n=At(t,["$$slots","$$events","$$legacy"]);Rn(e,Rt({name:"pencil"},()=>n,{iconNode:[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z"}],["path",{d:"m15 5 4 4"}]],children:(s,a)=>{var l=X(),u=W(l);at(u,()=>t.children??Ct),P(s,l)},$$slots:{default:!0}})),gt()}function AF(e,t){ht(t,!0);let n=At(t,["$$slots","$$events","$$legacy"]);Rn(e,Rt({name:"scan"},()=>n,{iconNode:[["path",{d:"M3 7V5a2 2 0 0 1 2-2h2"}],["path",{d:"M17 3h2a2 2 0 0 1 2 2v2"}],["path",{d:"M21 17v2a2 2 0 0 1-2 2h-2"}],["path",{d:"M7 21H5a2 2 0 0 1-2-2v-2"}]],children:(s,a)=>{var l=X(),u=W(l);at(u,()=>t.children??Ct),P(s,l)},$$slots:{default:!0}})),gt()}function CF(e,t){ht(t,!0);let n=At(t,["$$slots","$$events","$$legacy"]);Rn(e,Rt({name:"settings"},()=>n,{iconNode:[["path",{d:"M12.22 2h-.44a2 2 0 0 0-2 2v.18a2 2 0 0 1-1 1.73l-.43.25a2 2 0 0 1-2 0l-.15-.08a2 2 0 0 0-2.73.73l-.22.38a2 2 0 0 0 .73 2.73l.15.1a2 2 0 0 1 1 1.72v.51a2 2 0 0 1-1 1.74l-.15.09a2 2 0 0 0-.73 2.73l.22.38a2 2 0 0 0 2.73.73l.15-.08a2 2 0 0 1 2 0l.43.25a2 2 0 0 1 1 1.73V20a2 2 0 0 0 2 2h.44a2 2 0 0 0 2-2v-.18a2 2 0 0 1 1-1.73l.43-.25a2 2 0 0 1 2 0l.15.08a2 2 0 0 0 2.73-.73l.22-.39a2 2 0 0 0-.73-2.73l-.15-.08a2 2 0 0 1-1-1.74v-.5a2 2 0 0 1 1-1.74l.15-.09a2 2 0 0 0 .73-2.73l-.22-.38a2 2 0 0 0-2.73-.73l-.15.08a2 2 0 0 1-2 0l-.43-.25a2 2 0 0 1-1-1.73V4a2 2 0 0 0-2-2z"}],["circle",{cx:"12",cy:"12",r:"3"}]],children:(s,a)=>{var l=X(),u=W(l);at(u,()=>t.children??Ct),P(s,l)},$$slots:{default:!0}})),gt()}const PF=Bp({base:"[&>svg]:text-foreground relative w-full rounded-lg border p-4 [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg~*]:pl-7",variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"}},defaultVariants:{variant:"default"}});var EF=tt("<div><!></div>");function z6(e,t){ht(t,!0);let n=k(t,"ref",15,null),i=k(t,"variant",3,"default"),s=At(t,["$$slots","$$events","$$legacy","ref","class","variant","children"]);var a=EF();let l;var u=rt(a);at(u,()=>t.children??Ct),nt(a),Kn(a,d=>n(d),()=>n()),St(d=>l=Lt(a,l,{class:d,...s,role:"alert"}),[()=>ae(PF({variant:i()}),t.class)]),P(e,a),gt()}function TF(e,t){ht(t,!0);let n=k(t,"ref",15,null),i=k(t,"class",7),s=At(t,["$$slots","$$events","$$legacy","ref","class"]);var a=X(),l=W(a);const u=N(()=>ae("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/80",i()));return Ot(l,()=>ow,(d,f)=>{f(d,Rt({get class(){return v(u)}},()=>s,{get ref(){return n()},set ref(h){n(h)}}))}),P(e,a),gt({get class(){return i()},set class(d){i(d)}})}const kF=Bp({base:"bg-background data-[state=open]:animate-in data-[state=closed]:animate-out fixed z-50 gap-4 p-6 shadow-lg transition ease-in-out data-[state=closed]:duration-300 data-[state=open]:duration-500",variants:{side:{top:"data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top inset-x-0 top-0 border-b",bottom:"data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom inset-x-0 bottom-0 border-t",left:"data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left inset-y-0 left-0 h-full w-3/4 border-r sm:max-w-sm",right:"data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right inset-y-0 right-0 h-full w-3/4 border-l sm:max-w-sm"}},defaultVariants:{side:"right"}});var IF=tt('<!> <span class="sr-only">Close</span>',1),OF=tt("<!> <!>",1),NF=tt("<!> <!>",1);function H6(e,t){ht(t,!0);let n=k(t,"ref",15,null),i=k(t,"side",3,"right"),s=At(t,["$$slots","$$events","$$legacy","ref","class","side","portalProps","children"]);var a=X(),l=W(a);Ot(l,()=>gl,(u,d)=>{d(u,Rt(()=>t.portalProps,{children:(f,h)=>{var g=NF(),m=W(g);TF(m,{});var b=mt(m,2);const _=N(()=>ae(kF({side:i()}),t.class));Ot(b,()=>zw,(w,x)=>{x(w,Rt({get class(){return v(_)}},()=>s,{get ref(){return n()},set ref(S){n(S)},children:(S,I)=>{var T=OF(),O=W(T);at(O,()=>t.children??Ct);var D=mt(O,2);Ot(D,()=>Ww,(L,M)=>{M(L,{class:"ring-offset-background focus:ring-ring data-[state=open]:bg-secondary absolute right-4 top-4 rounded-sm opacity-70 transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-offset-2 disabled:pointer-events-none",children:(G,q)=>{var lt=IF(),pt=W(lt);Dp(pt,{class:"size-4"}),we(2),P(G,lt)},$$slots:{default:!0}})}),P(S,T)},$$slots:{default:!0}}))}),P(f,g)},$$slots:{default:!0}}))}),P(e,a),gt()}var RF=tt('<div class="size-3.5"></div>'),MF=tt('<div class="flex size-4 items-center justify-center text-current"><!></div>');function Sy(e,t){ht(t,!0);let n=k(t,"ref",15,null),i=k(t,"checked",15,!1),s=k(t,"indeterminate",15,!1),a=At(t,["$$slots","$$events","$$legacy","ref","checked","indeterminate","class"]);var l=X(),u=W(l);const d=N(()=>ae("border-primary ring-offset-background focus-visible:ring-ring data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground peer box-content size-4 shrink-0 rounded-sm border focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[disabled=true]:cursor-not-allowed data-[disabled=true]:opacity-50",t.class));Ot(u,()=>pN,(f,h)=>{h(f,Rt({get class(){return v(d)}},()=>a,{get ref(){return n()},set ref(m){n(m)},get checked(){return i()},set checked(m){i(m)},get indeterminate(){return s()},set indeterminate(m){s(m)},children:(m,b)=>{let _=()=>b==null?void 0:b().checked,w=()=>b==null?void 0:b().indeterminate;var x=MF(),S=rt(x);{var I=O=>{var D=X(),L=W(D);Ob(L,()=>kb(()=>import("./DjUWrjOv.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9]),import.meta.url),null,(M,G)=>{var q=N(()=>{var{default:$}=v(G);return{Minus:$}}),lt=N(()=>v(q).Minus),pt=X(),z=W(pt);Ot(z,()=>v(lt),($,H)=>{H($,{class:"size-3.5"})}),P(M,pt)}),P(O,D)},T=(O,D)=>{{var L=G=>{var q=X(),lt=W(q);Ob(lt,()=>kb(()=>Promise.resolve().then(()=>kk),void 0,import.meta.url),null,(pt,z)=>{var $=N(()=>{var{default:ot}=v(z);return{Check:ot}}),H=N(()=>v($).Check),J=X(),Q=W(J);Ot(Q,()=>v(H),(ot,Z)=>{Z(ot,{class:"size-3.5"})}),P(pt,J)}),P(G,q)},M=G=>{var q=RF();P(G,q)};_t(O,G=>{_()?G(L):G(M,!1)},D)}};_t(S,O=>{w()?O(I):O(T,!1)})}nt(x),P(m,x)},$$slots:{default:!0}}))}),P(e,l),gt()}function Ls(e,t){ht(t,!0);let n=k(t,"ref",15,null),i=At(t,["$$slots","$$events","$$legacy","ref","class"]);var s=X(),a=W(s);const l=N(()=>ae("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",t.class));Ot(a,()=>J3,(u,d)=>{d(u,Rt({get class(){return v(l)}},()=>i,{get ref(){return n()},set ref(f){n(f)}}))}),P(e,s),gt()}var LF=tt('<div class="text-xs text-muted-foreground"> </div>'),DF=tt('<div class="flex flex-col gap-2"><div class="flex gap-2"><!> <!></div> <!></div>');function FF(e,t){const n=k(t,"isChecked",3,!1);var i=DF(),s=rt(i),a=rt(s);const l=N(()=>`${t.name}-label`);Sy(a,{get id(){return t.name},get"aria-labelledby"(){return v(l)},get checked(){return n()},get onCheckedChange(){return t.onCheckedChange}});var u=mt(a,2);const d=N(()=>`${t.name}-label`);Ls(u,{get id(){return v(d)},get for(){return t.name},class:"text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70","data-testid":"tags-menu-label",children:(g,m)=>{we();var b=ye();St(()=>De(b,t.label)),P(g,b)},$$slots:{default:!0}}),nt(s);var f=mt(s,2);{var h=g=>{var m=LF(),b=rt(m,!0);nt(m),St(()=>De(b,t.helperText)),P(g,m)};_t(f,g=>{t.helperText&&g(h)})}nt(i),P(e,i)}const pc=Ce(!1);function BF(){return{error:Ce(null),isCreateClassifiersPanelOpen:pc,openCreateClassifiersPanel:()=>pc.set(!0),closeCreateClassifiersPanel:()=>{pc.set(!1)},toggleCreateClassifiersPanel:()=>pc.update(t=>!t)}}const vc=Ce(!1),ag=Ce(null),C_=Ce(null),P_=Ce(null),E_=Ce(null);function VF(){return{isRefineClassifiersPanelOpen:vc,currentMode:ag,currentClassifierName:C_,currentClassifierId:P_,currentClassifierClasses:E_,openRefineClassifiersPanel:(t,n,i,s)=>{ag.set(t),vc.set(!0),P_.set(n),C_.set(i),E_.set(s)},closeRefineClassifiersPanel:()=>{ag.set(null),vc.set(!1)},toggleRefineClassifiersPanel:()=>{vc.update(t=>!t)}}}const{selectedSampleIds:WF}=Us(),lg=Ce(new Set);function zF(){const e=Ce(null),t=Ce(!1),n=async(f,h)=>{try{e.set(null);const g=await In.POST("/api/classifiers/{classifier_id}/save_classifier_to_file/{export_type}",{params:{path:{classifier_id:f,export_type:h}},responseType:"arraybuffer",headers:{Accept:"application/octet-stream"},parseAs:"blob"}),m=g.response.headers.get("content-disposition"),b=m==null?void 0:m.match(/filename="(.+)"/),_=(b==null?void 0:b[1])??`classifier_${f}.pkl`;if(!g.data)return e.set(new Error("No data received from the server")),Promise.reject("No data received from the server");pD(_,g.data)}catch(g){throw e.set(g),g}},i=async f=>{var m;e.set(null);const h=f.target,g=(m=h.files)==null?void 0:m[0];if(!g){e.set(new Error("No file selected"));return}try{const b=new FormData;b.append("file",g),await In.POST("/api/classifiers/load_classifier_from_buffer",{body:b,headers:{Accept:"application/json"}}),h.value=""}catch(b){throw e.set(b),b}},s=async(f,h)=>{try{e.set(null),await In.POST("/api/classifiers/{classifier_id}/update_annotations",{params:{path:{classifier_id:f}},body:h})}catch(g){throw e.set(g),g}},a=async f=>{try{e.set(null),await In.POST("/api/classifiers/{classifier_id}/train_classifier",{params:{path:{classifier_id:f}}})}catch(h){throw e.set(h),h}};async function l(){const f=Te(WF),h=Array.from(f),g=no.params.dataset_id;e.set(null);try{const m=await In.POST("/api/classifiers/get_negative_samples",{body:{dataset_id:g.toString(),positive_sample_ids:h}});return m.data?{positiveSampleIds:h,negativeSampleIds:m.data.negative_sample_ids}:(e.set(new Error("Failed to prepare samples")),Promise.reject("Failed to prepare samples"))}catch(m){return e.set(m),Promise.reject(m)}}return{error:e,isLoading:t,classifiersSelected:lg,saveClassifier:n,loadClassifier:i,updateAnnotations:s,trainClassifier:a,prepareSamples:l,classifierSelectionToggle:f=>{lg.update(h=>(h.has(f)?h.delete(f):h.add(f),new Set([...h])))},clearClassifiersSelected:()=>{lg.set(new Set)}}}const{classifiers:cg,selectedSampleIds:T_,classifierSamples:k_,setClassifierSamples:ug,toggleSampleSelection:I_,clearSelectedSamples:dg}=Us();function HF(){const e=zF(),t=Ce(null),n=Ce(!1),i=Ce(!1),{openRefineClassifiersPanel:s,closeRefineClassifiersPanel:a}=VF(),{toggleCreateClassifiersPanel:l,closeCreateClassifiersPanel:u}=BF(),d=()=>{Te(n)||(t.set(null),n.set(!0),In.GET("/api/classifiers/get_all_classifiers").then(L=>{var M;(M=L.data)!=null&&M.classifiers?cg.set(L.data.classifiers):cg.set([])}).catch(L=>{t.set(L)}).finally(()=>{n.set(!1)}))};Te(i)||(d(),i.set(!0));async function f(){t.set(null);const L=no.params.dataset_id;try{const M=await e.prepareSamples();ug({positiveSampleIds:M.positiveSampleIds,negativeSampleIds:M.negativeSampleIds}),l(),Sc(Ac.toClassifiers(L)),t.set(null)}catch(M){t.set(M)}}async function h(L){try{if(t.set(null),!L.dataset_id)throw new Error("Dataset ID is required");const M=await In.POST("/api/classifiers/create",{body:{name:L.name,class_list:L.class_list,dataset_id:L.dataset_id.toString()}});if(!M.data)return t.set(Error("Failed to create classifier.")),Promise.reject("Failed to create classifier.");const G=Te(k_),q=G?[...G.positiveSampleIds,...G.negativeSampleIds]:[],lt=Te(T_),pt=Array.from(lt),z=q.filter(H=>!lt.has(H)),$={annotations:{positive:pt,negative:z}};return await e.updateAnnotations(M.data.classifier_id,$),await e.trainClassifier(M.data.classifier_id),await b(M.data.classifier_id,L.dataset_id.toString(),L.class_list),s("temp",M.data.classifier_id,M.data.name,L.class_list),u(),M.data}catch(M){return t.set(M),Promise.reject(M)}}const g=async()=>{try{n.set(!0),t.set(null);for(const L of Array.from(Te(e.classifiersSelected)))await In.POST("/api/classifiers/{classifier_id}/run_on_dataset/{dataset_id}",{params:{path:{classifier_id:L,dataset_id:no.params.dataset_id}}});n.set(!1)}catch(L){n.set(!1),t.set(L)}},m=async(L,M)=>{try{t.set(null),await In.POST("/api/classifiers/{classifier_id}/commit_temp_classifier",{params:{path:{classifier_id:L}}}),d()}catch(G){t.set(G);return}dg(),a(),Sc(Ac.toSamples(M))},b=async(L,M,G)=>{var q;try{t.set(null);const lt=await In.GET("/api/classifiers/{classifier_id}/samples_to_refine",{params:{path:{classifier_id:L},query:{dataset_id:M}}});if(!((q=lt.data)!=null&&q.samples)){t.set(new Error("Failed to get samples for refinement."));return}const pt=lt.data.samples,z=Object.keys(pt);if(z.length!==2){t.set(new Error("Invalid samples response structure"));return}if(!G.every(H=>z.includes(H))){t.set(new Error(`Invalid class names. Expected classes: ${z.join(", ")}`));return}const $={positiveSampleIds:pt[G[0]]||[],negativeSampleIds:pt[G[1]]||[]};$.positiveSampleIds.forEach(H=>{I_(H)}),ug($)}catch(lt){return t.set(lt),Promise.reject(lt)}};async function _(L,M,G,q,lt){try{t.set(null),await b(M,lt,q),s("existing",M,G,q),Sc(Ac.toClassifiers(lt))}catch(pt){t.set(pt)}}async function w(L,M,G){try{t.set(null);const q=Te(k_),lt=q?[...q.positiveSampleIds,...q.negativeSampleIds]:[],pt=Te(T_),z=Array.from(pt),$=lt.filter(J=>!pt.has(J)),H={annotations:{positive:z,negative:$}};dg(),await e.updateAnnotations(L,H),await e.trainClassifier(L),await b(L,M,G)}catch(q){t.set(q)}}async function x(L,M,G,q){var lt;try{if(t.set(null),dg(),q){const z=(lt=(await RT({path:{classifier_id:L}})).data)==null?void 0:lt.samples;if(!z){t.set(new Error("No samples data received"));return}const $=Object.keys(z);if($.length!==2){t.set(new Error("Invalid samples response structure"));return}if(!G.every(J=>$.includes(J))){t.set(new Error(`Invalid class names. Expected classes: ${$.join(", ")}`));return}const H={positiveSampleIds:z[G[0]]||[],negativeSampleIds:z[G[1]]||[]};H.positiveSampleIds.forEach(J=>{I_(J)}),ug(H)}else await b(L,M,G)}catch(pt){t.set(pt)}}const S=async()=>{try{return t.set(null),await e.prepareSamples()}catch(L){throw t.set(L),L}},I=async(L,M)=>{try{t.set(null),await e.saveClassifier(L,M)}catch(G){throw t.set(G),G}},T=async L=>{try{t.set(null),await e.loadClassifier(L),d()}catch(M){throw t.set(M),M}},O=async(L,M)=>{try{t.set(null),await e.updateAnnotations(L,M)}catch(G){throw t.set(G),G}},D=async L=>{try{t.set(null),await e.trainClassifier(L)}catch(M){throw t.set(M),M}};return{classifiers:ac(cg),createClassifier:h,loadClassifiers:d,classifiersSelected:ac(e.classifiersSelected),classifierSelectionToggle:e.classifierSelectionToggle,clearClassifiersSelected:e.clearClassifiersSelected,apply:g,saveClassifier:I,updateAnnotations:O,trainClassifier:D,commitTempClassifier:m,getSamplesToRefine:b,prepareSamples:S,loadClassifier:T,startCreateClassifier:f,isLoading:ac(n),startRefinment:_,showClassifierTrainingSamples:x,refineClassifier:w,error:ac(t)}}function UF(e,t){ht(t,!0);let n=k(t,"ref",15,null),i=k(t,"checked",15,!1),s=At(t,["$$slots","$$events","$$legacy","ref","checked","class"]);var a=X(),l=W(a);const u=N(()=>ae("focus-visible:ring-ring focus-visible:ring-offset-background data-[state=checked]:bg-primary data-[state=unchecked]:bg-input peer inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent shadow-sm transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",t.class));Ot(l,()=>I5,(d,f)=>{f(d,Rt({get class(){return v(u)}},()=>s,{get ref(){return n()},set ref(h){n(h)},get checked(){return i()},set checked(h){i(h)},children:(h,g)=>{var m=X(),b=W(m);const _=N(()=>ae("bg-background pointer-events-none block h-4 w-4 rounded-full shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-4 data-[state=unchecked]:translate-x-0"));Ot(b,()=>N5,(w,x)=>{x(w,{get class(){return v(_)}})}),P(h,m)},$$slots:{default:!0}}))}),P(e,a),gt()}var GF=tt("<!> <span>Settings</span>",1),KF=tt("<!> <!>",1),qF=(e,t)=>{e.preventDefault(),t("hideAnnotations")},YF=tt('<span class="italic opacity-70">Press a key...</span>'),XF=tt("<span> </span>"),ZF=(e,t)=>{e.preventDefault(),t("goBack")},JF=tt('<span class="italic opacity-70">Press a key...</span>'),QF=tt("<span> </span>"),jF=tt("<!> <!>",1),$F=tt("<!> <!>",1),t4=tt("<!> <!>",1),e4=tt('<form><!> <div class="grid gap-4 py-4"><div class="space-y-4"><h3 class="text-lg font-medium text-foreground">Keyboard Shortcuts</h3> <div class="grid grid-cols-2 items-center gap-4"><!> <button id="hide-annotations" type="button" class="rounded-md border border-input bg-background p-2 text-left text-foreground"><!></button></div> <div class="grid grid-cols-2 items-center gap-4"><!> <button id="go-back" type="button" class="rounded-md border border-input bg-background p-2 text-left text-foreground"><!></button></div></div> <div class="space-y-4"><h3 class="text-lg font-medium text-foreground">Display Settings</h3> <div class="grid grid-cols-2 items-center gap-4"><!> <div class="relative"><!></div></div></div> <div class="space-y-4"><h3 class="text-lg font-medium text-foreground">Annotation Settings</h3> <div class="grid grid-cols-2 items-center gap-4"><!> <!></div></div></div> <!></form>'),n4=tt("<!> <!>",1),r4=tt("<!> <!>",1);function U6(e,t){ht(t,!0);const[n,i]=rs(),s=()=>Ke(a,"$settingsStore",n),{settingsStore:a,saveSettings:l}=cp();let u=bt(!1),d=bt(!1),f=bt(ft({hideAnnotations:"v",goBack:"Escape"})),h=bt("contain"),g=bt(!0),m=!1;xe(()=>{s()&&!m&&(et(f,ft({hideAnnotations:s().key_hide_annotations||"v",goBack:s().key_go_back||"Escape"})),et(h,ft(s().grid_view_sample_rendering||"contain")),et(g,ft(!!(s().show_annotation_text_labels??!0))),m=!0)});let b=bt(null);function _(L){et(u,ft(L)),et(b,null)}function w(L){et(h,ft(L))}function x(L){L.preventDefault(),S()}async function S(){et(d,!0);try{await l({key_hide_annotations:v(f).hideAnnotations,key_go_back:v(f).goBack,grid_view_sample_rendering:v(h),show_annotation_text_labels:v(g)}),_(!1)}catch(L){console.error("Error saving settings:",L)}finally{et(d,!1)}}const I=L=>{et(b,ft(L))},T=L=>{if(!v(b))return;L.preventDefault(),L.stopPropagation();let M=L.key;M===" "?M="Space":M.length===1&&/^[a-zA-Z]$/.test(M)&&!L.getModifierState("CapsLock")&&(M=M.toLowerCase()),v(b)==="hideAnnotations"?v(f).hideAnnotations=M:v(b)==="goBack"&&(v(f).goBack=M),et(b,null)};var O=X();mg("keydown",rT,T);var D=W(O);Ot(D,()=>ey,(L,M)=>{M(L,{get open(){return v(u)},set open(G){et(u,ft(G))},children:(G,q)=>{var lt=r4(),pt=W(lt);Ot(pt,()=>_L,($,H)=>{H($,{children:(J,Q)=>{Gn(J,{variant:"outline",class:"gap-2",children:(ot,Z)=>{var ct=GF(),wt=W(ct);CF(wt,{class:"h-4 w-4"}),we(2),P(ot,ct)},$$slots:{default:!0}})},$$slots:{default:!0}})});var z=mt(pt,2);Ot(z,()=>ny,($,H)=>{H($,{children:(J,Q)=>{var ot=n4(),Z=W(ot);Ot(Z,()=>$w,(wt,it)=>{it(wt,{})});var ct=mt(Z,2);Ot(ct,()=>ty,(wt,it)=>{it(wt,{class:"border-border bg-background sm:max-w-[500px]",children:(xt,yt)=>{var Nt=e4(),kt=rt(Nt);Ot(kt,()=>jw,(oe,Me)=>{Me(oe,{children:(We,$r)=>{var Xn=KF(),yn=W(Xn);Ot(yn,()=>Qw,(je,sr)=>{sr(je,{class:"text-foreground",children:(Mn,Mi)=>{we();var ti=ye("Settings");P(Mn,ti)},$$slots:{default:!0}})});var Sr=mt(yn,2);Ot(Sr,()=>bL,(je,sr)=>{sr(je,{class:"text-foreground",children:(Mn,Mi)=>{we();var ti=ye("Configure your application preferences.");P(Mn,ti)},$$slots:{default:!0}})}),P(We,Xn)},$$slots:{default:!0}})});var Dt=mt(kt,2),ue=rt(Dt),Ut=mt(rt(ue),2),Yt=rt(Ut);Ls(Yt,{for:"hide-annotations",class:"text-right text-foreground",children:(oe,Me)=>{we();var We=ye("Hide Annotations");P(oe,We)},$$slots:{default:!0}});var re=mt(Yt,2);re.__click=[qF,I];var fe=rt(re);{var ge=oe=>{var Me=YF();P(oe,Me)},Ye=oe=>{var Me=XF(),We=rt(Me,!0);nt(Me),St(()=>De(We,v(f).hideAnnotations)),P(oe,Me)};_t(fe,oe=>{v(b)==="hideAnnotations"?oe(ge):oe(Ye,!1)})}nt(re),nt(Ut);var Vt=mt(Ut,2),te=rt(Vt);Ls(te,{for:"go-back",class:"text-right text-foreground",children:(oe,Me)=>{we();var We=ye("Go Back");P(oe,We)},$$slots:{default:!0}});var pe=mt(te,2);pe.__click=[ZF,I];var ie=rt(pe);{var de=oe=>{var Me=JF();P(oe,Me)},Fe=oe=>{var Me=QF(),We=rt(Me,!0);nt(Me),St(()=>De(We,v(f).goBack)),P(oe,Me)};_t(ie,oe=>{v(b)==="goBack"?oe(de):oe(Fe,!1)})}nt(pe),nt(Vt),nt(ue);var Pe=mt(ue,2),be=mt(rt(Pe),2),qe=rt(be);Ls(qe,{for:"grid-view-rendering",class:"text-right text-foreground",children:(oe,Me)=>{we();var We=ye("Grid View Rendering");P(oe,We)},$$slots:{default:!0}});var Se=mt(qe,2),Re=rt(Se);xy(Re,{type:"single",get value(){return v(h)},onValueChange:w,children:(oe,Me)=>{var We=$F(),$r=W(We);yy($r,{id:"grid-view-rendering",children:(yn,Sr)=>{we();var je=ye();St(()=>De(je,v(h)==="cover"?"Cover":"Contain")),P(yn,je)},$$slots:{default:!0}});var Xn=mt($r,2);wy(Xn,{children:(yn,Sr)=>{var je=jF(),sr=W(je);Yg(sr,{value:"cover",children:(Mi,ti)=>{we();var co=ye("Cover");P(Mi,co)},$$slots:{default:!0}});var Mn=mt(sr,2);Yg(Mn,{value:"contain",children:(Mi,ti)=>{we();var co=ye("Contain");P(Mi,co)},$$slots:{default:!0}}),P(yn,je)},$$slots:{default:!0}}),P(oe,We)},$$slots:{default:!0}}),nt(Se),nt(be),nt(Pe);var Be=mt(Pe,2),Je=mt(rt(Be),2),fn=rt(Je);Ls(fn,{for:"show-annotation-text-labels",class:"text-right text-foreground",children:(oe,Me)=>{we();var We=ye("Show Annotation Text Labels");P(oe,We)},$$slots:{default:!0}});var or=mt(fn,2);UF(or,{id:"show-annotation-text-labels",get disabled(){return v(d)},get checked(){return v(g)},set checked(oe){et(g,ft(oe))}}),nt(Je),nt(Be),nt(Dt);var jr=mt(Dt,2);Ot(jr,()=>hL,(oe,Me)=>{Me(oe,{children:(We,$r)=>{var Xn=t4(),yn=W(Xn);Gn(yn,{variant:"outline",type:"button",onclick:()=>_(!1),children:(je,sr)=>{we();var Mn=ye("Cancel");P(je,Mn)},$$slots:{default:!0}});var Sr=mt(yn,2);Gn(Sr,{type:"submit",get disabled(){return v(d)},children:(je,sr)=>{we();var Mn=ye();St(()=>De(Mn,v(d)?"Saving...":"Save Changes")),P(je,Mn)},$$slots:{default:!0}}),P(We,Xn)},$$slots:{default:!0}})}),nt(Nt),mg("submit",Nt,x),P(xt,Nt)},$$slots:{default:!0}})}),P(J,ot)},$$slots:{default:!0}})}),P(G,lt)},$$slots:{default:!0}})}),P(e,O),gt(),i()}so(["click"]);var Yc={exports:{}};/**
67
- * @license
68
- * Lodash <https://lodash.com/>
69
- * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
70
- * Released under MIT license <https://lodash.com/license>
71
- * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
72
- * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
73
- */Yc.exports;(function(e,t){(function(){var n,i="4.17.21",s=200,a="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",l="Expected a function",u="Invalid `variable` option passed into `_.template`",d="__lodash_hash_undefined__",f=500,h="__lodash_placeholder__",g=1,m=2,b=4,_=1,w=2,x=1,S=2,I=4,T=8,O=16,D=32,L=64,M=128,G=256,q=512,lt=30,pt="...",z=800,$=16,H=1,J=2,Q=3,ot=1/0,Z=9007199254740991,ct=17976931348623157e292,wt=NaN,it=4294967295,xt=it-1,yt=it>>>1,Nt=[["ary",M],["bind",x],["bindKey",S],["curry",T],["curryRight",O],["flip",q],["partial",D],["partialRight",L],["rearg",G]],kt="[object Arguments]",Dt="[object Array]",ue="[object AsyncFunction]",Ut="[object Boolean]",Yt="[object Date]",re="[object DOMException]",fe="[object Error]",ge="[object Function]",Ye="[object GeneratorFunction]",Vt="[object Map]",te="[object Number]",pe="[object Null]",ie="[object Object]",de="[object Promise]",Fe="[object Proxy]",Pe="[object RegExp]",be="[object Set]",qe="[object String]",Se="[object Symbol]",Re="[object Undefined]",Be="[object WeakMap]",Je="[object WeakSet]",fn="[object ArrayBuffer]",or="[object DataView]",jr="[object Float32Array]",oe="[object Float64Array]",Me="[object Int8Array]",We="[object Int16Array]",$r="[object Int32Array]",Xn="[object Uint8Array]",yn="[object Uint8ClampedArray]",Sr="[object Uint16Array]",je="[object Uint32Array]",sr=/\b__p \+= '';/g,Mn=/\b(__p \+=) '' \+/g,Mi=/(__e\(.*?\)|\b__t\)) \+\n'';/g,ti=/&(?:amp|lt|gt|quot|#39);/g,co=/[&<>"']/g,Jy=RegExp(ti.source),Qy=RegExp(co.source),jy=/<%-([\s\S]+?)%>/g,$y=/<%([\s\S]+?)%>/g,Yp=/<%=([\s\S]+?)%>/g,t1=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,e1=/^\w*$/,n1=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,If=/[\\^$.*+?()[\]{}|]/g,r1=RegExp(If.source),Of=/^\s+/,i1=/\s/,o1=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,s1=/\{\n\/\* \[wrapped with (.+)\] \*/,a1=/,? & /,l1=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,c1=/[()=,{}\[\]\/\s]/,u1=/\\(\\)?/g,d1=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Xp=/\w*$/,f1=/^[-+]0x[0-9a-f]+$/i,h1=/^0b[01]+$/i,g1=/^\[object .+?Constructor\]$/,p1=/^0o[0-7]+$/i,v1=/^(?:0|[1-9]\d*)$/,m1=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,_l=/($^)/,b1=/['\n\r\u2028\u2029\\]/g,wl="\\ud800-\\udfff",_1="\\u0300-\\u036f",w1="\\ufe20-\\ufe2f",y1="\\u20d0-\\u20ff",Zp=_1+w1+y1,Jp="\\u2700-\\u27bf",Qp="a-z\\xdf-\\xf6\\xf8-\\xff",x1="\\xac\\xb1\\xd7\\xf7",S1="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",A1="\\u2000-\\u206f",C1=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",jp="A-Z\\xc0-\\xd6\\xd8-\\xde",$p="\\ufe0e\\ufe0f",tv=x1+S1+A1+C1,Nf="['’]",P1="["+wl+"]",ev="["+tv+"]",yl="["+Zp+"]",nv="\\d+",E1="["+Jp+"]",rv="["+Qp+"]",iv="[^"+wl+tv+nv+Jp+Qp+jp+"]",Rf="\\ud83c[\\udffb-\\udfff]",T1="(?:"+yl+"|"+Rf+")",ov="[^"+wl+"]",Mf="(?:\\ud83c[\\udde6-\\uddff]){2}",Lf="[\\ud800-\\udbff][\\udc00-\\udfff]",uo="["+jp+"]",sv="\\u200d",av="(?:"+rv+"|"+iv+")",k1="(?:"+uo+"|"+iv+")",lv="(?:"+Nf+"(?:d|ll|m|re|s|t|ve))?",cv="(?:"+Nf+"(?:D|LL|M|RE|S|T|VE))?",uv=T1+"?",dv="["+$p+"]?",I1="(?:"+sv+"(?:"+[ov,Mf,Lf].join("|")+")"+dv+uv+")*",O1="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",N1="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",fv=dv+uv+I1,R1="(?:"+[E1,Mf,Lf].join("|")+")"+fv,M1="(?:"+[ov+yl+"?",yl,Mf,Lf,P1].join("|")+")",L1=RegExp(Nf,"g"),D1=RegExp(yl,"g"),Df=RegExp(Rf+"(?="+Rf+")|"+M1+fv,"g"),F1=RegExp([uo+"?"+rv+"+"+lv+"(?="+[ev,uo,"$"].join("|")+")",k1+"+"+cv+"(?="+[ev,uo+av,"$"].join("|")+")",uo+"?"+av+"+"+lv,uo+"+"+cv,N1,O1,nv,R1].join("|"),"g"),B1=RegExp("["+sv+wl+Zp+$p+"]"),V1=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,W1=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],z1=-1,ke={};ke[jr]=ke[oe]=ke[Me]=ke[We]=ke[$r]=ke[Xn]=ke[yn]=ke[Sr]=ke[je]=!0,ke[kt]=ke[Dt]=ke[fn]=ke[Ut]=ke[or]=ke[Yt]=ke[fe]=ke[ge]=ke[Vt]=ke[te]=ke[ie]=ke[Pe]=ke[be]=ke[qe]=ke[Be]=!1;var Ee={};Ee[kt]=Ee[Dt]=Ee[fn]=Ee[or]=Ee[Ut]=Ee[Yt]=Ee[jr]=Ee[oe]=Ee[Me]=Ee[We]=Ee[$r]=Ee[Vt]=Ee[te]=Ee[ie]=Ee[Pe]=Ee[be]=Ee[qe]=Ee[Se]=Ee[Xn]=Ee[yn]=Ee[Sr]=Ee[je]=!0,Ee[fe]=Ee[ge]=Ee[Be]=!1;var H1={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},U1={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"},G1={"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"},K1={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},q1=parseFloat,Y1=parseInt,hv=typeof pr=="object"&&pr&&pr.Object===Object&&pr,X1=typeof self=="object"&&self&&self.Object===Object&&self,$e=hv||X1||Function("return this")(),Ff=t&&!t.nodeType&&t,Li=Ff&&!0&&e&&!e.nodeType&&e,gv=Li&&Li.exports===Ff,Bf=gv&&hv.process,Ln=function(){try{var U=Li&&Li.require&&Li.require("util").types;return U||Bf&&Bf.binding&&Bf.binding("util")}catch{}}(),pv=Ln&&Ln.isArrayBuffer,vv=Ln&&Ln.isDate,mv=Ln&&Ln.isMap,bv=Ln&&Ln.isRegExp,_v=Ln&&Ln.isSet,wv=Ln&&Ln.isTypedArray;function xn(U,st,j){switch(j.length){case 0:return U.call(st);case 1:return U.call(st,j[0]);case 2:return U.call(st,j[0],j[1]);case 3:return U.call(st,j[0],j[1],j[2])}return U.apply(st,j)}function Z1(U,st,j,Tt){for(var zt=-1,he=U==null?0:U.length;++zt<he;){var Xe=U[zt];st(Tt,Xe,j(Xe),U)}return Tt}function Dn(U,st){for(var j=-1,Tt=U==null?0:U.length;++j<Tt&&st(U[j],j,U)!==!1;);return U}function J1(U,st){for(var j=U==null?0:U.length;j--&&st(U[j],j,U)!==!1;);return U}function yv(U,st){for(var j=-1,Tt=U==null?0:U.length;++j<Tt;)if(!st(U[j],j,U))return!1;return!0}function ei(U,st){for(var j=-1,Tt=U==null?0:U.length,zt=0,he=[];++j<Tt;){var Xe=U[j];st(Xe,j,U)&&(he[zt++]=Xe)}return he}function xl(U,st){var j=U==null?0:U.length;return!!j&&fo(U,st,0)>-1}function Vf(U,st,j){for(var Tt=-1,zt=U==null?0:U.length;++Tt<zt;)if(j(st,U[Tt]))return!0;return!1}function Le(U,st){for(var j=-1,Tt=U==null?0:U.length,zt=Array(Tt);++j<Tt;)zt[j]=st(U[j],j,U);return zt}function ni(U,st){for(var j=-1,Tt=st.length,zt=U.length;++j<Tt;)U[zt+j]=st[j];return U}function Wf(U,st,j,Tt){var zt=-1,he=U==null?0:U.length;for(Tt&&he&&(j=U[++zt]);++zt<he;)j=st(j,U[zt],zt,U);return j}function Q1(U,st,j,Tt){var zt=U==null?0:U.length;for(Tt&&zt&&(j=U[--zt]);zt--;)j=st(j,U[zt],zt,U);return j}function zf(U,st){for(var j=-1,Tt=U==null?0:U.length;++j<Tt;)if(st(U[j],j,U))return!0;return!1}var j1=Hf("length");function $1(U){return U.split("")}function tx(U){return U.match(l1)||[]}function xv(U,st,j){var Tt;return j(U,function(zt,he,Xe){if(st(zt,he,Xe))return Tt=he,!1}),Tt}function Sl(U,st,j,Tt){for(var zt=U.length,he=j+(Tt?1:-1);Tt?he--:++he<zt;)if(st(U[he],he,U))return he;return-1}function fo(U,st,j){return st===st?fx(U,st,j):Sl(U,Sv,j)}function ex(U,st,j,Tt){for(var zt=j-1,he=U.length;++zt<he;)if(Tt(U[zt],st))return zt;return-1}function Sv(U){return U!==U}function Av(U,st){var j=U==null?0:U.length;return j?Gf(U,st)/j:wt}function Hf(U){return function(st){return st==null?n:st[U]}}function Uf(U){return function(st){return U==null?n:U[st]}}function Cv(U,st,j,Tt,zt){return zt(U,function(he,Xe,Ae){j=Tt?(Tt=!1,he):st(j,he,Xe,Ae)}),j}function nx(U,st){var j=U.length;for(U.sort(st);j--;)U[j]=U[j].value;return U}function Gf(U,st){for(var j,Tt=-1,zt=U.length;++Tt<zt;){var he=st(U[Tt]);he!==n&&(j=j===n?he:j+he)}return j}function Kf(U,st){for(var j=-1,Tt=Array(U);++j<U;)Tt[j]=st(j);return Tt}function rx(U,st){return Le(st,function(j){return[j,U[j]]})}function Pv(U){return U&&U.slice(0,Iv(U)+1).replace(Of,"")}function Sn(U){return function(st){return U(st)}}function qf(U,st){return Le(st,function(j){return U[j]})}function cs(U,st){return U.has(st)}function Ev(U,st){for(var j=-1,Tt=U.length;++j<Tt&&fo(st,U[j],0)>-1;);return j}function Tv(U,st){for(var j=U.length;j--&&fo(st,U[j],0)>-1;);return j}function ix(U,st){for(var j=U.length,Tt=0;j--;)U[j]===st&&++Tt;return Tt}var ox=Uf(H1),sx=Uf(U1);function ax(U){return"\\"+K1[U]}function lx(U,st){return U==null?n:U[st]}function ho(U){return B1.test(U)}function cx(U){return V1.test(U)}function ux(U){for(var st,j=[];!(st=U.next()).done;)j.push(st.value);return j}function Yf(U){var st=-1,j=Array(U.size);return U.forEach(function(Tt,zt){j[++st]=[zt,Tt]}),j}function kv(U,st){return function(j){return U(st(j))}}function ri(U,st){for(var j=-1,Tt=U.length,zt=0,he=[];++j<Tt;){var Xe=U[j];(Xe===st||Xe===h)&&(U[j]=h,he[zt++]=j)}return he}function Al(U){var st=-1,j=Array(U.size);return U.forEach(function(Tt){j[++st]=Tt}),j}function dx(U){var st=-1,j=Array(U.size);return U.forEach(function(Tt){j[++st]=[Tt,Tt]}),j}function fx(U,st,j){for(var Tt=j-1,zt=U.length;++Tt<zt;)if(U[Tt]===st)return Tt;return-1}function hx(U,st,j){for(var Tt=j+1;Tt--;)if(U[Tt]===st)return Tt;return Tt}function go(U){return ho(U)?px(U):j1(U)}function Zn(U){return ho(U)?vx(U):$1(U)}function Iv(U){for(var st=U.length;st--&&i1.test(U.charAt(st)););return st}var gx=Uf(G1);function px(U){for(var st=Df.lastIndex=0;Df.test(U);)++st;return st}function vx(U){return U.match(Df)||[]}function mx(U){return U.match(F1)||[]}var bx=function U(st){st=st==null?$e:po.defaults($e.Object(),st,po.pick($e,W1));var j=st.Array,Tt=st.Date,zt=st.Error,he=st.Function,Xe=st.Math,Ae=st.Object,Xf=st.RegExp,_x=st.String,Fn=st.TypeError,Cl=j.prototype,wx=he.prototype,vo=Ae.prototype,Pl=st["__core-js_shared__"],El=wx.toString,_e=vo.hasOwnProperty,yx=0,Ov=function(){var r=/[^.]+$/.exec(Pl&&Pl.keys&&Pl.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""}(),Tl=vo.toString,xx=El.call(Ae),Sx=$e._,Ax=Xf("^"+El.call(_e).replace(If,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),kl=gv?st.Buffer:n,ii=st.Symbol,Il=st.Uint8Array,Nv=kl?kl.allocUnsafe:n,Ol=kv(Ae.getPrototypeOf,Ae),Rv=Ae.create,Mv=vo.propertyIsEnumerable,Nl=Cl.splice,Lv=ii?ii.isConcatSpreadable:n,us=ii?ii.iterator:n,Di=ii?ii.toStringTag:n,Rl=function(){try{var r=zi(Ae,"defineProperty");return r({},"",{}),r}catch{}}(),Cx=st.clearTimeout!==$e.clearTimeout&&st.clearTimeout,Px=Tt&&Tt.now!==$e.Date.now&&Tt.now,Ex=st.setTimeout!==$e.setTimeout&&st.setTimeout,Ml=Xe.ceil,Ll=Xe.floor,Zf=Ae.getOwnPropertySymbols,Tx=kl?kl.isBuffer:n,Dv=st.isFinite,kx=Cl.join,Ix=kv(Ae.keys,Ae),Ze=Xe.max,rn=Xe.min,Ox=Tt.now,Nx=st.parseInt,Fv=Xe.random,Rx=Cl.reverse,Jf=zi(st,"DataView"),ds=zi(st,"Map"),Qf=zi(st,"Promise"),mo=zi(st,"Set"),fs=zi(st,"WeakMap"),hs=zi(Ae,"create"),Dl=fs&&new fs,bo={},Mx=Hi(Jf),Lx=Hi(ds),Dx=Hi(Qf),Fx=Hi(mo),Bx=Hi(fs),Fl=ii?ii.prototype:n,gs=Fl?Fl.valueOf:n,Bv=Fl?Fl.toString:n;function C(r){if(ze(r)&&!Ht(r)&&!(r instanceof se)){if(r instanceof Bn)return r;if(_e.call(r,"__wrapped__"))return Vm(r)}return new Bn(r)}var _o=function(){function r(){}return function(o){if(!Ve(o))return{};if(Rv)return Rv(o);r.prototype=o;var c=new r;return r.prototype=n,c}}();function Bl(){}function Bn(r,o){this.__wrapped__=r,this.__actions__=[],this.__chain__=!!o,this.__index__=0,this.__values__=n}C.templateSettings={escape:jy,evaluate:$y,interpolate:Yp,variable:"",imports:{_:C}},C.prototype=Bl.prototype,C.prototype.constructor=C,Bn.prototype=_o(Bl.prototype),Bn.prototype.constructor=Bn;function se(r){this.__wrapped__=r,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=it,this.__views__=[]}function Vx(){var r=new se(this.__wrapped__);return r.__actions__=hn(this.__actions__),r.__dir__=this.__dir__,r.__filtered__=this.__filtered__,r.__iteratees__=hn(this.__iteratees__),r.__takeCount__=this.__takeCount__,r.__views__=hn(this.__views__),r}function Wx(){if(this.__filtered__){var r=new se(this);r.__dir__=-1,r.__filtered__=!0}else r=this.clone(),r.__dir__*=-1;return r}function zx(){var r=this.__wrapped__.value(),o=this.__dir__,c=Ht(r),p=o<0,y=c?r.length:0,E=$S(0,y,this.__views__),R=E.start,V=E.end,K=V-R,ut=p?V:R-1,dt=this.__iteratees__,vt=dt.length,Pt=0,It=rn(K,this.__takeCount__);if(!c||!p&&y==K&&It==K)return lm(r,this.__actions__);var Ft=[];t:for(;K--&&Pt<It;){ut+=o;for(var Xt=-1,Bt=r[ut];++Xt<vt;){var ee=dt[Xt],le=ee.iteratee,Pn=ee.type,cn=le(Bt);if(Pn==J)Bt=cn;else if(!cn){if(Pn==H)continue t;break t}}Ft[Pt++]=Bt}return Ft}se.prototype=_o(Bl.prototype),se.prototype.constructor=se;function Fi(r){var o=-1,c=r==null?0:r.length;for(this.clear();++o<c;){var p=r[o];this.set(p[0],p[1])}}function Hx(){this.__data__=hs?hs(null):{},this.size=0}function Ux(r){var o=this.has(r)&&delete this.__data__[r];return this.size-=o?1:0,o}function Gx(r){var o=this.__data__;if(hs){var c=o[r];return c===d?n:c}return _e.call(o,r)?o[r]:n}function Kx(r){var o=this.__data__;return hs?o[r]!==n:_e.call(o,r)}function qx(r,o){var c=this.__data__;return this.size+=this.has(r)?0:1,c[r]=hs&&o===n?d:o,this}Fi.prototype.clear=Hx,Fi.prototype.delete=Ux,Fi.prototype.get=Gx,Fi.prototype.has=Kx,Fi.prototype.set=qx;function Ar(r){var o=-1,c=r==null?0:r.length;for(this.clear();++o<c;){var p=r[o];this.set(p[0],p[1])}}function Yx(){this.__data__=[],this.size=0}function Xx(r){var o=this.__data__,c=Vl(o,r);if(c<0)return!1;var p=o.length-1;return c==p?o.pop():Nl.call(o,c,1),--this.size,!0}function Zx(r){var o=this.__data__,c=Vl(o,r);return c<0?n:o[c][1]}function Jx(r){return Vl(this.__data__,r)>-1}function Qx(r,o){var c=this.__data__,p=Vl(c,r);return p<0?(++this.size,c.push([r,o])):c[p][1]=o,this}Ar.prototype.clear=Yx,Ar.prototype.delete=Xx,Ar.prototype.get=Zx,Ar.prototype.has=Jx,Ar.prototype.set=Qx;function Cr(r){var o=-1,c=r==null?0:r.length;for(this.clear();++o<c;){var p=r[o];this.set(p[0],p[1])}}function jx(){this.size=0,this.__data__={hash:new Fi,map:new(ds||Ar),string:new Fi}}function $x(r){var o=Ql(this,r).delete(r);return this.size-=o?1:0,o}function tS(r){return Ql(this,r).get(r)}function eS(r){return Ql(this,r).has(r)}function nS(r,o){var c=Ql(this,r),p=c.size;return c.set(r,o),this.size+=c.size==p?0:1,this}Cr.prototype.clear=jx,Cr.prototype.delete=$x,Cr.prototype.get=tS,Cr.prototype.has=eS,Cr.prototype.set=nS;function Bi(r){var o=-1,c=r==null?0:r.length;for(this.__data__=new Cr;++o<c;)this.add(r[o])}function rS(r){return this.__data__.set(r,d),this}function iS(r){return this.__data__.has(r)}Bi.prototype.add=Bi.prototype.push=rS,Bi.prototype.has=iS;function Jn(r){var o=this.__data__=new Ar(r);this.size=o.size}function oS(){this.__data__=new Ar,this.size=0}function sS(r){var o=this.__data__,c=o.delete(r);return this.size=o.size,c}function aS(r){return this.__data__.get(r)}function lS(r){return this.__data__.has(r)}function cS(r,o){var c=this.__data__;if(c instanceof Ar){var p=c.__data__;if(!ds||p.length<s-1)return p.push([r,o]),this.size=++c.size,this;c=this.__data__=new Cr(p)}return c.set(r,o),this.size=c.size,this}Jn.prototype.clear=oS,Jn.prototype.delete=sS,Jn.prototype.get=aS,Jn.prototype.has=lS,Jn.prototype.set=cS;function Vv(r,o){var c=Ht(r),p=!c&&Ui(r),y=!c&&!p&&ci(r),E=!c&&!p&&!y&&So(r),R=c||p||y||E,V=R?Kf(r.length,_x):[],K=V.length;for(var ut in r)(o||_e.call(r,ut))&&!(R&&(ut=="length"||y&&(ut=="offset"||ut=="parent")||E&&(ut=="buffer"||ut=="byteLength"||ut=="byteOffset")||kr(ut,K)))&&V.push(ut);return V}function Wv(r){var o=r.length;return o?r[lh(0,o-1)]:n}function uS(r,o){return jl(hn(r),Vi(o,0,r.length))}function dS(r){return jl(hn(r))}function jf(r,o,c){(c!==n&&!Qn(r[o],c)||c===n&&!(o in r))&&Pr(r,o,c)}function ps(r,o,c){var p=r[o];(!(_e.call(r,o)&&Qn(p,c))||c===n&&!(o in r))&&Pr(r,o,c)}function Vl(r,o){for(var c=r.length;c--;)if(Qn(r[c][0],o))return c;return-1}function fS(r,o,c,p){return oi(r,function(y,E,R){o(p,y,c(y),R)}),p}function zv(r,o){return r&&lr(o,Qe(o),r)}function hS(r,o){return r&&lr(o,pn(o),r)}function Pr(r,o,c){o=="__proto__"&&Rl?Rl(r,o,{configurable:!0,enumerable:!0,value:c,writable:!0}):r[o]=c}function $f(r,o){for(var c=-1,p=o.length,y=j(p),E=r==null;++c<p;)y[c]=E?n:Rh(r,o[c]);return y}function Vi(r,o,c){return r===r&&(c!==n&&(r=r<=c?r:c),o!==n&&(r=r>=o?r:o)),r}function Vn(r,o,c,p,y,E){var R,V=o&g,K=o&m,ut=o&b;if(c&&(R=y?c(r,p,y,E):c(r)),R!==n)return R;if(!Ve(r))return r;var dt=Ht(r);if(dt){if(R=eA(r),!V)return hn(r,R)}else{var vt=on(r),Pt=vt==ge||vt==Ye;if(ci(r))return dm(r,V);if(vt==ie||vt==kt||Pt&&!y){if(R=K||Pt?{}:Im(r),!V)return K?GS(r,hS(R,r)):US(r,zv(R,r))}else{if(!Ee[vt])return y?r:{};R=nA(r,vt,V)}}E||(E=new Jn);var It=E.get(r);if(It)return It;E.set(r,R),ob(r)?r.forEach(function(Bt){R.add(Vn(Bt,o,c,Bt,r,E))}):rb(r)&&r.forEach(function(Bt,ee){R.set(ee,Vn(Bt,o,c,ee,r,E))});var Ft=ut?K?_h:bh:K?pn:Qe,Xt=dt?n:Ft(r);return Dn(Xt||r,function(Bt,ee){Xt&&(ee=Bt,Bt=r[ee]),ps(R,ee,Vn(Bt,o,c,ee,r,E))}),R}function gS(r){var o=Qe(r);return function(c){return Hv(c,r,o)}}function Hv(r,o,c){var p=c.length;if(r==null)return!p;for(r=Ae(r);p--;){var y=c[p],E=o[y],R=r[y];if(R===n&&!(y in r)||!E(R))return!1}return!0}function Uv(r,o,c){if(typeof r!="function")throw new Fn(l);return xs(function(){r.apply(n,c)},o)}function vs(r,o,c,p){var y=-1,E=xl,R=!0,V=r.length,K=[],ut=o.length;if(!V)return K;c&&(o=Le(o,Sn(c))),p?(E=Vf,R=!1):o.length>=s&&(E=cs,R=!1,o=new Bi(o));t:for(;++y<V;){var dt=r[y],vt=c==null?dt:c(dt);if(dt=p||dt!==0?dt:0,R&&vt===vt){for(var Pt=ut;Pt--;)if(o[Pt]===vt)continue t;K.push(dt)}else E(o,vt,p)||K.push(dt)}return K}var oi=vm(ar),Gv=vm(eh,!0);function pS(r,o){var c=!0;return oi(r,function(p,y,E){return c=!!o(p,y,E),c}),c}function Wl(r,o,c){for(var p=-1,y=r.length;++p<y;){var E=r[p],R=o(E);if(R!=null&&(V===n?R===R&&!Cn(R):c(R,V)))var V=R,K=E}return K}function vS(r,o,c,p){var y=r.length;for(c=Gt(c),c<0&&(c=-c>y?0:y+c),p=p===n||p>y?y:Gt(p),p<0&&(p+=y),p=c>p?0:ab(p);c<p;)r[c++]=o;return r}function Kv(r,o){var c=[];return oi(r,function(p,y,E){o(p,y,E)&&c.push(p)}),c}function tn(r,o,c,p,y){var E=-1,R=r.length;for(c||(c=iA),y||(y=[]);++E<R;){var V=r[E];o>0&&c(V)?o>1?tn(V,o-1,c,p,y):ni(y,V):p||(y[y.length]=V)}return y}var th=mm(),qv=mm(!0);function ar(r,o){return r&&th(r,o,Qe)}function eh(r,o){return r&&qv(r,o,Qe)}function zl(r,o){return ei(o,function(c){return Ir(r[c])})}function Wi(r,o){o=ai(o,r);for(var c=0,p=o.length;r!=null&&c<p;)r=r[cr(o[c++])];return c&&c==p?r:n}function Yv(r,o,c){var p=o(r);return Ht(r)?p:ni(p,c(r))}function an(r){return r==null?r===n?Re:pe:Di&&Di in Ae(r)?jS(r):dA(r)}function nh(r,o){return r>o}function mS(r,o){return r!=null&&_e.call(r,o)}function bS(r,o){return r!=null&&o in Ae(r)}function _S(r,o,c){return r>=rn(o,c)&&r<Ze(o,c)}function rh(r,o,c){for(var p=c?Vf:xl,y=r[0].length,E=r.length,R=E,V=j(E),K=1/0,ut=[];R--;){var dt=r[R];R&&o&&(dt=Le(dt,Sn(o))),K=rn(dt.length,K),V[R]=!c&&(o||y>=120&&dt.length>=120)?new Bi(R&&dt):n}dt=r[0];var vt=-1,Pt=V[0];t:for(;++vt<y&&ut.length<K;){var It=dt[vt],Ft=o?o(It):It;if(It=c||It!==0?It:0,!(Pt?cs(Pt,Ft):p(ut,Ft,c))){for(R=E;--R;){var Xt=V[R];if(!(Xt?cs(Xt,Ft):p(r[R],Ft,c)))continue t}Pt&&Pt.push(Ft),ut.push(It)}}return ut}function wS(r,o,c,p){return ar(r,function(y,E,R){o(p,c(y),E,R)}),p}function ms(r,o,c){o=ai(o,r),r=Mm(r,o);var p=r==null?r:r[cr(zn(o))];return p==null?n:xn(p,r,c)}function Xv(r){return ze(r)&&an(r)==kt}function yS(r){return ze(r)&&an(r)==fn}function xS(r){return ze(r)&&an(r)==Yt}function bs(r,o,c,p,y){return r===o?!0:r==null||o==null||!ze(r)&&!ze(o)?r!==r&&o!==o:SS(r,o,c,p,bs,y)}function SS(r,o,c,p,y,E){var R=Ht(r),V=Ht(o),K=R?Dt:on(r),ut=V?Dt:on(o);K=K==kt?ie:K,ut=ut==kt?ie:ut;var dt=K==ie,vt=ut==ie,Pt=K==ut;if(Pt&&ci(r)){if(!ci(o))return!1;R=!0,dt=!1}if(Pt&&!dt)return E||(E=new Jn),R||So(r)?Em(r,o,c,p,y,E):JS(r,o,K,c,p,y,E);if(!(c&_)){var It=dt&&_e.call(r,"__wrapped__"),Ft=vt&&_e.call(o,"__wrapped__");if(It||Ft){var Xt=It?r.value():r,Bt=Ft?o.value():o;return E||(E=new Jn),y(Xt,Bt,c,p,E)}}return Pt?(E||(E=new Jn),QS(r,o,c,p,y,E)):!1}function AS(r){return ze(r)&&on(r)==Vt}function ih(r,o,c,p){var y=c.length,E=y,R=!p;if(r==null)return!E;for(r=Ae(r);y--;){var V=c[y];if(R&&V[2]?V[1]!==r[V[0]]:!(V[0]in r))return!1}for(;++y<E;){V=c[y];var K=V[0],ut=r[K],dt=V[1];if(R&&V[2]){if(ut===n&&!(K in r))return!1}else{var vt=new Jn;if(p)var Pt=p(ut,dt,K,r,o,vt);if(!(Pt===n?bs(dt,ut,_|w,p,vt):Pt))return!1}}return!0}function Zv(r){if(!Ve(r)||sA(r))return!1;var o=Ir(r)?Ax:g1;return o.test(Hi(r))}function CS(r){return ze(r)&&an(r)==Pe}function PS(r){return ze(r)&&on(r)==be}function ES(r){return ze(r)&&ic(r.length)&&!!ke[an(r)]}function Jv(r){return typeof r=="function"?r:r==null?vn:typeof r=="object"?Ht(r)?$v(r[0],r[1]):jv(r):bb(r)}function oh(r){if(!ys(r))return Ix(r);var o=[];for(var c in Ae(r))_e.call(r,c)&&c!="constructor"&&o.push(c);return o}function TS(r){if(!Ve(r))return uA(r);var o=ys(r),c=[];for(var p in r)p=="constructor"&&(o||!_e.call(r,p))||c.push(p);return c}function sh(r,o){return r<o}function Qv(r,o){var c=-1,p=gn(r)?j(r.length):[];return oi(r,function(y,E,R){p[++c]=o(y,E,R)}),p}function jv(r){var o=yh(r);return o.length==1&&o[0][2]?Nm(o[0][0],o[0][1]):function(c){return c===r||ih(c,r,o)}}function $v(r,o){return Sh(r)&&Om(o)?Nm(cr(r),o):function(c){var p=Rh(c,r);return p===n&&p===o?Mh(c,r):bs(o,p,_|w)}}function Hl(r,o,c,p,y){r!==o&&th(o,function(E,R){if(y||(y=new Jn),Ve(E))kS(r,o,R,c,Hl,p,y);else{var V=p?p(Ch(r,R),E,R+"",r,o,y):n;V===n&&(V=E),jf(r,R,V)}},pn)}function kS(r,o,c,p,y,E,R){var V=Ch(r,c),K=Ch(o,c),ut=R.get(K);if(ut){jf(r,c,ut);return}var dt=E?E(V,K,c+"",r,o,R):n,vt=dt===n;if(vt){var Pt=Ht(K),It=!Pt&&ci(K),Ft=!Pt&&!It&&So(K);dt=K,Pt||It||Ft?Ht(V)?dt=V:Ue(V)?dt=hn(V):It?(vt=!1,dt=dm(K,!0)):Ft?(vt=!1,dt=fm(K,!0)):dt=[]:Ss(K)||Ui(K)?(dt=V,Ui(V)?dt=lb(V):(!Ve(V)||Ir(V))&&(dt=Im(K))):vt=!1}vt&&(R.set(K,dt),y(dt,K,p,E,R),R.delete(K)),jf(r,c,dt)}function tm(r,o){var c=r.length;if(c)return o+=o<0?c:0,kr(o,c)?r[o]:n}function em(r,o,c){o.length?o=Le(o,function(E){return Ht(E)?function(R){return Wi(R,E.length===1?E[0]:E)}:E}):o=[vn];var p=-1;o=Le(o,Sn(Mt()));var y=Qv(r,function(E,R,V){var K=Le(o,function(ut){return ut(E)});return{criteria:K,index:++p,value:E}});return nx(y,function(E,R){return HS(E,R,c)})}function IS(r,o){return nm(r,o,function(c,p){return Mh(r,p)})}function nm(r,o,c){for(var p=-1,y=o.length,E={};++p<y;){var R=o[p],V=Wi(r,R);c(V,R)&&_s(E,ai(R,r),V)}return E}function OS(r){return function(o){return Wi(o,r)}}function ah(r,o,c,p){var y=p?ex:fo,E=-1,R=o.length,V=r;for(r===o&&(o=hn(o)),c&&(V=Le(r,Sn(c)));++E<R;)for(var K=0,ut=o[E],dt=c?c(ut):ut;(K=y(V,dt,K,p))>-1;)V!==r&&Nl.call(V,K,1),Nl.call(r,K,1);return r}function rm(r,o){for(var c=r?o.length:0,p=c-1;c--;){var y=o[c];if(c==p||y!==E){var E=y;kr(y)?Nl.call(r,y,1):dh(r,y)}}return r}function lh(r,o){return r+Ll(Fv()*(o-r+1))}function NS(r,o,c,p){for(var y=-1,E=Ze(Ml((o-r)/(c||1)),0),R=j(E);E--;)R[p?E:++y]=r,r+=c;return R}function ch(r,o){var c="";if(!r||o<1||o>Z)return c;do o%2&&(c+=r),o=Ll(o/2),o&&(r+=r);while(o);return c}function jt(r,o){return Ph(Rm(r,o,vn),r+"")}function RS(r){return Wv(Ao(r))}function MS(r,o){var c=Ao(r);return jl(c,Vi(o,0,c.length))}function _s(r,o,c,p){if(!Ve(r))return r;o=ai(o,r);for(var y=-1,E=o.length,R=E-1,V=r;V!=null&&++y<E;){var K=cr(o[y]),ut=c;if(K==="__proto__"||K==="constructor"||K==="prototype")return r;if(y!=R){var dt=V[K];ut=p?p(dt,K,V):n,ut===n&&(ut=Ve(dt)?dt:kr(o[y+1])?[]:{})}ps(V,K,ut),V=V[K]}return r}var im=Dl?function(r,o){return Dl.set(r,o),r}:vn,LS=Rl?function(r,o){return Rl(r,"toString",{configurable:!0,enumerable:!1,value:Dh(o),writable:!0})}:vn;function DS(r){return jl(Ao(r))}function Wn(r,o,c){var p=-1,y=r.length;o<0&&(o=-o>y?0:y+o),c=c>y?y:c,c<0&&(c+=y),y=o>c?0:c-o>>>0,o>>>=0;for(var E=j(y);++p<y;)E[p]=r[p+o];return E}function FS(r,o){var c;return oi(r,function(p,y,E){return c=o(p,y,E),!c}),!!c}function Ul(r,o,c){var p=0,y=r==null?p:r.length;if(typeof o=="number"&&o===o&&y<=yt){for(;p<y;){var E=p+y>>>1,R=r[E];R!==null&&!Cn(R)&&(c?R<=o:R<o)?p=E+1:y=E}return y}return uh(r,o,vn,c)}function uh(r,o,c,p){var y=0,E=r==null?0:r.length;if(E===0)return 0;o=c(o);for(var R=o!==o,V=o===null,K=Cn(o),ut=o===n;y<E;){var dt=Ll((y+E)/2),vt=c(r[dt]),Pt=vt!==n,It=vt===null,Ft=vt===vt,Xt=Cn(vt);if(R)var Bt=p||Ft;else ut?Bt=Ft&&(p||Pt):V?Bt=Ft&&Pt&&(p||!It):K?Bt=Ft&&Pt&&!It&&(p||!Xt):It||Xt?Bt=!1:Bt=p?vt<=o:vt<o;Bt?y=dt+1:E=dt}return rn(E,xt)}function om(r,o){for(var c=-1,p=r.length,y=0,E=[];++c<p;){var R=r[c],V=o?o(R):R;if(!c||!Qn(V,K)){var K=V;E[y++]=R===0?0:R}}return E}function sm(r){return typeof r=="number"?r:Cn(r)?wt:+r}function An(r){if(typeof r=="string")return r;if(Ht(r))return Le(r,An)+"";if(Cn(r))return Bv?Bv.call(r):"";var o=r+"";return o=="0"&&1/r==-1/0?"-0":o}function si(r,o,c){var p=-1,y=xl,E=r.length,R=!0,V=[],K=V;if(c)R=!1,y=Vf;else if(E>=s){var ut=o?null:XS(r);if(ut)return Al(ut);R=!1,y=cs,K=new Bi}else K=o?[]:V;t:for(;++p<E;){var dt=r[p],vt=o?o(dt):dt;if(dt=c||dt!==0?dt:0,R&&vt===vt){for(var Pt=K.length;Pt--;)if(K[Pt]===vt)continue t;o&&K.push(vt),V.push(dt)}else y(K,vt,c)||(K!==V&&K.push(vt),V.push(dt))}return V}function dh(r,o){return o=ai(o,r),r=Mm(r,o),r==null||delete r[cr(zn(o))]}function am(r,o,c,p){return _s(r,o,c(Wi(r,o)),p)}function Gl(r,o,c,p){for(var y=r.length,E=p?y:-1;(p?E--:++E<y)&&o(r[E],E,r););return c?Wn(r,p?0:E,p?E+1:y):Wn(r,p?E+1:0,p?y:E)}function lm(r,o){var c=r;return c instanceof se&&(c=c.value()),Wf(o,function(p,y){return y.func.apply(y.thisArg,ni([p],y.args))},c)}function fh(r,o,c){var p=r.length;if(p<2)return p?si(r[0]):[];for(var y=-1,E=j(p);++y<p;)for(var R=r[y],V=-1;++V<p;)V!=y&&(E[y]=vs(E[y]||R,r[V],o,c));return si(tn(E,1),o,c)}function cm(r,o,c){for(var p=-1,y=r.length,E=o.length,R={};++p<y;){var V=p<E?o[p]:n;c(R,r[p],V)}return R}function hh(r){return Ue(r)?r:[]}function gh(r){return typeof r=="function"?r:vn}function ai(r,o){return Ht(r)?r:Sh(r,o)?[r]:Bm(ve(r))}var BS=jt;function li(r,o,c){var p=r.length;return c=c===n?p:c,!o&&c>=p?r:Wn(r,o,c)}var um=Cx||function(r){return $e.clearTimeout(r)};function dm(r,o){if(o)return r.slice();var c=r.length,p=Nv?Nv(c):new r.constructor(c);return r.copy(p),p}function ph(r){var o=new r.constructor(r.byteLength);return new Il(o).set(new Il(r)),o}function VS(r,o){var c=o?ph(r.buffer):r.buffer;return new r.constructor(c,r.byteOffset,r.byteLength)}function WS(r){var o=new r.constructor(r.source,Xp.exec(r));return o.lastIndex=r.lastIndex,o}function zS(r){return gs?Ae(gs.call(r)):{}}function fm(r,o){var c=o?ph(r.buffer):r.buffer;return new r.constructor(c,r.byteOffset,r.length)}function hm(r,o){if(r!==o){var c=r!==n,p=r===null,y=r===r,E=Cn(r),R=o!==n,V=o===null,K=o===o,ut=Cn(o);if(!V&&!ut&&!E&&r>o||E&&R&&K&&!V&&!ut||p&&R&&K||!c&&K||!y)return 1;if(!p&&!E&&!ut&&r<o||ut&&c&&y&&!p&&!E||V&&c&&y||!R&&y||!K)return-1}return 0}function HS(r,o,c){for(var p=-1,y=r.criteria,E=o.criteria,R=y.length,V=c.length;++p<R;){var K=hm(y[p],E[p]);if(K){if(p>=V)return K;var ut=c[p];return K*(ut=="desc"?-1:1)}}return r.index-o.index}function gm(r,o,c,p){for(var y=-1,E=r.length,R=c.length,V=-1,K=o.length,ut=Ze(E-R,0),dt=j(K+ut),vt=!p;++V<K;)dt[V]=o[V];for(;++y<R;)(vt||y<E)&&(dt[c[y]]=r[y]);for(;ut--;)dt[V++]=r[y++];return dt}function pm(r,o,c,p){for(var y=-1,E=r.length,R=-1,V=c.length,K=-1,ut=o.length,dt=Ze(E-V,0),vt=j(dt+ut),Pt=!p;++y<dt;)vt[y]=r[y];for(var It=y;++K<ut;)vt[It+K]=o[K];for(;++R<V;)(Pt||y<E)&&(vt[It+c[R]]=r[y++]);return vt}function hn(r,o){var c=-1,p=r.length;for(o||(o=j(p));++c<p;)o[c]=r[c];return o}function lr(r,o,c,p){var y=!c;c||(c={});for(var E=-1,R=o.length;++E<R;){var V=o[E],K=p?p(c[V],r[V],V,c,r):n;K===n&&(K=r[V]),y?Pr(c,V,K):ps(c,V,K)}return c}function US(r,o){return lr(r,xh(r),o)}function GS(r,o){return lr(r,Tm(r),o)}function Kl(r,o){return function(c,p){var y=Ht(c)?Z1:fS,E=o?o():{};return y(c,r,Mt(p,2),E)}}function wo(r){return jt(function(o,c){var p=-1,y=c.length,E=y>1?c[y-1]:n,R=y>2?c[2]:n;for(E=r.length>3&&typeof E=="function"?(y--,E):n,R&&ln(c[0],c[1],R)&&(E=y<3?n:E,y=1),o=Ae(o);++p<y;){var V=c[p];V&&r(o,V,p,E)}return o})}function vm(r,o){return function(c,p){if(c==null)return c;if(!gn(c))return r(c,p);for(var y=c.length,E=o?y:-1,R=Ae(c);(o?E--:++E<y)&&p(R[E],E,R)!==!1;);return c}}function mm(r){return function(o,c,p){for(var y=-1,E=Ae(o),R=p(o),V=R.length;V--;){var K=R[r?V:++y];if(c(E[K],K,E)===!1)break}return o}}function KS(r,o,c){var p=o&x,y=ws(r);function E(){var R=this&&this!==$e&&this instanceof E?y:r;return R.apply(p?c:this,arguments)}return E}function bm(r){return function(o){o=ve(o);var c=ho(o)?Zn(o):n,p=c?c[0]:o.charAt(0),y=c?li(c,1).join(""):o.slice(1);return p[r]()+y}}function yo(r){return function(o){return Wf(vb(pb(o).replace(L1,"")),r,"")}}function ws(r){return function(){var o=arguments;switch(o.length){case 0:return new r;case 1:return new r(o[0]);case 2:return new r(o[0],o[1]);case 3:return new r(o[0],o[1],o[2]);case 4:return new r(o[0],o[1],o[2],o[3]);case 5:return new r(o[0],o[1],o[2],o[3],o[4]);case 6:return new r(o[0],o[1],o[2],o[3],o[4],o[5]);case 7:return new r(o[0],o[1],o[2],o[3],o[4],o[5],o[6])}var c=_o(r.prototype),p=r.apply(c,o);return Ve(p)?p:c}}function qS(r,o,c){var p=ws(r);function y(){for(var E=arguments.length,R=j(E),V=E,K=xo(y);V--;)R[V]=arguments[V];var ut=E<3&&R[0]!==K&&R[E-1]!==K?[]:ri(R,K);if(E-=ut.length,E<c)return Sm(r,o,ql,y.placeholder,n,R,ut,n,n,c-E);var dt=this&&this!==$e&&this instanceof y?p:r;return xn(dt,this,R)}return y}function _m(r){return function(o,c,p){var y=Ae(o);if(!gn(o)){var E=Mt(c,3);o=Qe(o),c=function(V){return E(y[V],V,y)}}var R=r(o,c,p);return R>-1?y[E?o[R]:R]:n}}function wm(r){return Tr(function(o){var c=o.length,p=c,y=Bn.prototype.thru;for(r&&o.reverse();p--;){var E=o[p];if(typeof E!="function")throw new Fn(l);if(y&&!R&&Jl(E)=="wrapper")var R=new Bn([],!0)}for(p=R?p:c;++p<c;){E=o[p];var V=Jl(E),K=V=="wrapper"?wh(E):n;K&&Ah(K[0])&&K[1]==(M|T|D|G)&&!K[4].length&&K[9]==1?R=R[Jl(K[0])].apply(R,K[3]):R=E.length==1&&Ah(E)?R[V]():R.thru(E)}return function(){var ut=arguments,dt=ut[0];if(R&&ut.length==1&&Ht(dt))return R.plant(dt).value();for(var vt=0,Pt=c?o[vt].apply(this,ut):dt;++vt<c;)Pt=o[vt].call(this,Pt);return Pt}})}function ql(r,o,c,p,y,E,R,V,K,ut){var dt=o&M,vt=o&x,Pt=o&S,It=o&(T|O),Ft=o&q,Xt=Pt?n:ws(r);function Bt(){for(var ee=arguments.length,le=j(ee),Pn=ee;Pn--;)le[Pn]=arguments[Pn];if(It)var cn=xo(Bt),En=ix(le,cn);if(p&&(le=gm(le,p,y,It)),E&&(le=pm(le,E,R,It)),ee-=En,It&&ee<ut){var Ge=ri(le,cn);return Sm(r,o,ql,Bt.placeholder,c,le,Ge,V,K,ut-ee)}var jn=vt?c:this,Nr=Pt?jn[r]:r;return ee=le.length,V?le=fA(le,V):Ft&&ee>1&&le.reverse(),dt&&K<ee&&(le.length=K),this&&this!==$e&&this instanceof Bt&&(Nr=Xt||ws(Nr)),Nr.apply(jn,le)}return Bt}function ym(r,o){return function(c,p){return wS(c,r,o(p),{})}}function Yl(r,o){return function(c,p){var y;if(c===n&&p===n)return o;if(c!==n&&(y=c),p!==n){if(y===n)return p;typeof c=="string"||typeof p=="string"?(c=An(c),p=An(p)):(c=sm(c),p=sm(p)),y=r(c,p)}return y}}function vh(r){return Tr(function(o){return o=Le(o,Sn(Mt())),jt(function(c){var p=this;return r(o,function(y){return xn(y,p,c)})})})}function Xl(r,o){o=o===n?" ":An(o);var c=o.length;if(c<2)return c?ch(o,r):o;var p=ch(o,Ml(r/go(o)));return ho(o)?li(Zn(p),0,r).join(""):p.slice(0,r)}function YS(r,o,c,p){var y=o&x,E=ws(r);function R(){for(var V=-1,K=arguments.length,ut=-1,dt=p.length,vt=j(dt+K),Pt=this&&this!==$e&&this instanceof R?E:r;++ut<dt;)vt[ut]=p[ut];for(;K--;)vt[ut++]=arguments[++V];return xn(Pt,y?c:this,vt)}return R}function xm(r){return function(o,c,p){return p&&typeof p!="number"&&ln(o,c,p)&&(c=p=n),o=Or(o),c===n?(c=o,o=0):c=Or(c),p=p===n?o<c?1:-1:Or(p),NS(o,c,p,r)}}function Zl(r){return function(o,c){return typeof o=="string"&&typeof c=="string"||(o=Hn(o),c=Hn(c)),r(o,c)}}function Sm(r,o,c,p,y,E,R,V,K,ut){var dt=o&T,vt=dt?R:n,Pt=dt?n:R,It=dt?E:n,Ft=dt?n:E;o|=dt?D:L,o&=~(dt?L:D),o&I||(o&=-4);var Xt=[r,o,y,It,vt,Ft,Pt,V,K,ut],Bt=c.apply(n,Xt);return Ah(r)&&Lm(Bt,Xt),Bt.placeholder=p,Dm(Bt,r,o)}function mh(r){var o=Xe[r];return function(c,p){if(c=Hn(c),p=p==null?0:rn(Gt(p),292),p&&Dv(c)){var y=(ve(c)+"e").split("e"),E=o(y[0]+"e"+(+y[1]+p));return y=(ve(E)+"e").split("e"),+(y[0]+"e"+(+y[1]-p))}return o(c)}}var XS=mo&&1/Al(new mo([,-0]))[1]==ot?function(r){return new mo(r)}:Vh;function Am(r){return function(o){var c=on(o);return c==Vt?Yf(o):c==be?dx(o):rx(o,r(o))}}function Er(r,o,c,p,y,E,R,V){var K=o&S;if(!K&&typeof r!="function")throw new Fn(l);var ut=p?p.length:0;if(ut||(o&=-97,p=y=n),R=R===n?R:Ze(Gt(R),0),V=V===n?V:Gt(V),ut-=y?y.length:0,o&L){var dt=p,vt=y;p=y=n}var Pt=K?n:wh(r),It=[r,o,c,p,y,dt,vt,E,R,V];if(Pt&&cA(It,Pt),r=It[0],o=It[1],c=It[2],p=It[3],y=It[4],V=It[9]=It[9]===n?K?0:r.length:Ze(It[9]-ut,0),!V&&o&(T|O)&&(o&=-25),!o||o==x)var Ft=KS(r,o,c);else o==T||o==O?Ft=qS(r,o,V):(o==D||o==(x|D))&&!y.length?Ft=YS(r,o,c,p):Ft=ql.apply(n,It);var Xt=Pt?im:Lm;return Dm(Xt(Ft,It),r,o)}function Cm(r,o,c,p){return r===n||Qn(r,vo[c])&&!_e.call(p,c)?o:r}function Pm(r,o,c,p,y,E){return Ve(r)&&Ve(o)&&(E.set(o,r),Hl(r,o,n,Pm,E),E.delete(o)),r}function ZS(r){return Ss(r)?n:r}function Em(r,o,c,p,y,E){var R=c&_,V=r.length,K=o.length;if(V!=K&&!(R&&K>V))return!1;var ut=E.get(r),dt=E.get(o);if(ut&&dt)return ut==o&&dt==r;var vt=-1,Pt=!0,It=c&w?new Bi:n;for(E.set(r,o),E.set(o,r);++vt<V;){var Ft=r[vt],Xt=o[vt];if(p)var Bt=R?p(Xt,Ft,vt,o,r,E):p(Ft,Xt,vt,r,o,E);if(Bt!==n){if(Bt)continue;Pt=!1;break}if(It){if(!zf(o,function(ee,le){if(!cs(It,le)&&(Ft===ee||y(Ft,ee,c,p,E)))return It.push(le)})){Pt=!1;break}}else if(!(Ft===Xt||y(Ft,Xt,c,p,E))){Pt=!1;break}}return E.delete(r),E.delete(o),Pt}function JS(r,o,c,p,y,E,R){switch(c){case or:if(r.byteLength!=o.byteLength||r.byteOffset!=o.byteOffset)return!1;r=r.buffer,o=o.buffer;case fn:return!(r.byteLength!=o.byteLength||!E(new Il(r),new Il(o)));case Ut:case Yt:case te:return Qn(+r,+o);case fe:return r.name==o.name&&r.message==o.message;case Pe:case qe:return r==o+"";case Vt:var V=Yf;case be:var K=p&_;if(V||(V=Al),r.size!=o.size&&!K)return!1;var ut=R.get(r);if(ut)return ut==o;p|=w,R.set(r,o);var dt=Em(V(r),V(o),p,y,E,R);return R.delete(r),dt;case Se:if(gs)return gs.call(r)==gs.call(o)}return!1}function QS(r,o,c,p,y,E){var R=c&_,V=bh(r),K=V.length,ut=bh(o),dt=ut.length;if(K!=dt&&!R)return!1;for(var vt=K;vt--;){var Pt=V[vt];if(!(R?Pt in o:_e.call(o,Pt)))return!1}var It=E.get(r),Ft=E.get(o);if(It&&Ft)return It==o&&Ft==r;var Xt=!0;E.set(r,o),E.set(o,r);for(var Bt=R;++vt<K;){Pt=V[vt];var ee=r[Pt],le=o[Pt];if(p)var Pn=R?p(le,ee,Pt,o,r,E):p(ee,le,Pt,r,o,E);if(!(Pn===n?ee===le||y(ee,le,c,p,E):Pn)){Xt=!1;break}Bt||(Bt=Pt=="constructor")}if(Xt&&!Bt){var cn=r.constructor,En=o.constructor;cn!=En&&"constructor"in r&&"constructor"in o&&!(typeof cn=="function"&&cn instanceof cn&&typeof En=="function"&&En instanceof En)&&(Xt=!1)}return E.delete(r),E.delete(o),Xt}function Tr(r){return Ph(Rm(r,n,Hm),r+"")}function bh(r){return Yv(r,Qe,xh)}function _h(r){return Yv(r,pn,Tm)}var wh=Dl?function(r){return Dl.get(r)}:Vh;function Jl(r){for(var o=r.name+"",c=bo[o],p=_e.call(bo,o)?c.length:0;p--;){var y=c[p],E=y.func;if(E==null||E==r)return y.name}return o}function xo(r){var o=_e.call(C,"placeholder")?C:r;return o.placeholder}function Mt(){var r=C.iteratee||Fh;return r=r===Fh?Jv:r,arguments.length?r(arguments[0],arguments[1]):r}function Ql(r,o){var c=r.__data__;return oA(o)?c[typeof o=="string"?"string":"hash"]:c.map}function yh(r){for(var o=Qe(r),c=o.length;c--;){var p=o[c],y=r[p];o[c]=[p,y,Om(y)]}return o}function zi(r,o){var c=lx(r,o);return Zv(c)?c:n}function jS(r){var o=_e.call(r,Di),c=r[Di];try{r[Di]=n;var p=!0}catch{}var y=Tl.call(r);return p&&(o?r[Di]=c:delete r[Di]),y}var xh=Zf?function(r){return r==null?[]:(r=Ae(r),ei(Zf(r),function(o){return Mv.call(r,o)}))}:Wh,Tm=Zf?function(r){for(var o=[];r;)ni(o,xh(r)),r=Ol(r);return o}:Wh,on=an;(Jf&&on(new Jf(new ArrayBuffer(1)))!=or||ds&&on(new ds)!=Vt||Qf&&on(Qf.resolve())!=de||mo&&on(new mo)!=be||fs&&on(new fs)!=Be)&&(on=function(r){var o=an(r),c=o==ie?r.constructor:n,p=c?Hi(c):"";if(p)switch(p){case Mx:return or;case Lx:return Vt;case Dx:return de;case Fx:return be;case Bx:return Be}return o});function $S(r,o,c){for(var p=-1,y=c.length;++p<y;){var E=c[p],R=E.size;switch(E.type){case"drop":r+=R;break;case"dropRight":o-=R;break;case"take":o=rn(o,r+R);break;case"takeRight":r=Ze(r,o-R);break}}return{start:r,end:o}}function tA(r){var o=r.match(s1);return o?o[1].split(a1):[]}function km(r,o,c){o=ai(o,r);for(var p=-1,y=o.length,E=!1;++p<y;){var R=cr(o[p]);if(!(E=r!=null&&c(r,R)))break;r=r[R]}return E||++p!=y?E:(y=r==null?0:r.length,!!y&&ic(y)&&kr(R,y)&&(Ht(r)||Ui(r)))}function eA(r){var o=r.length,c=new r.constructor(o);return o&&typeof r[0]=="string"&&_e.call(r,"index")&&(c.index=r.index,c.input=r.input),c}function Im(r){return typeof r.constructor=="function"&&!ys(r)?_o(Ol(r)):{}}function nA(r,o,c){var p=r.constructor;switch(o){case fn:return ph(r);case Ut:case Yt:return new p(+r);case or:return VS(r,c);case jr:case oe:case Me:case We:case $r:case Xn:case yn:case Sr:case je:return fm(r,c);case Vt:return new p;case te:case qe:return new p(r);case Pe:return WS(r);case be:return new p;case Se:return zS(r)}}function rA(r,o){var c=o.length;if(!c)return r;var p=c-1;return o[p]=(c>1?"& ":"")+o[p],o=o.join(c>2?", ":" "),r.replace(o1,`{
74
- /* [wrapped with `+o+`] */
75
- `)}function iA(r){return Ht(r)||Ui(r)||!!(Lv&&r&&r[Lv])}function kr(r,o){var c=typeof r;return o=o??Z,!!o&&(c=="number"||c!="symbol"&&v1.test(r))&&r>-1&&r%1==0&&r<o}function ln(r,o,c){if(!Ve(c))return!1;var p=typeof o;return(p=="number"?gn(c)&&kr(o,c.length):p=="string"&&o in c)?Qn(c[o],r):!1}function Sh(r,o){if(Ht(r))return!1;var c=typeof r;return c=="number"||c=="symbol"||c=="boolean"||r==null||Cn(r)?!0:e1.test(r)||!t1.test(r)||o!=null&&r in Ae(o)}function oA(r){var o=typeof r;return o=="string"||o=="number"||o=="symbol"||o=="boolean"?r!=="__proto__":r===null}function Ah(r){var o=Jl(r),c=C[o];if(typeof c!="function"||!(o in se.prototype))return!1;if(r===c)return!0;var p=wh(c);return!!p&&r===p[0]}function sA(r){return!!Ov&&Ov in r}var aA=Pl?Ir:zh;function ys(r){var o=r&&r.constructor,c=typeof o=="function"&&o.prototype||vo;return r===c}function Om(r){return r===r&&!Ve(r)}function Nm(r,o){return function(c){return c==null?!1:c[r]===o&&(o!==n||r in Ae(c))}}function lA(r){var o=nc(r,function(p){return c.size===f&&c.clear(),p}),c=o.cache;return o}function cA(r,o){var c=r[1],p=o[1],y=c|p,E=y<(x|S|M),R=p==M&&c==T||p==M&&c==G&&r[7].length<=o[8]||p==(M|G)&&o[7].length<=o[8]&&c==T;if(!(E||R))return r;p&x&&(r[2]=o[2],y|=c&x?0:I);var V=o[3];if(V){var K=r[3];r[3]=K?gm(K,V,o[4]):V,r[4]=K?ri(r[3],h):o[4]}return V=o[5],V&&(K=r[5],r[5]=K?pm(K,V,o[6]):V,r[6]=K?ri(r[5],h):o[6]),V=o[7],V&&(r[7]=V),p&M&&(r[8]=r[8]==null?o[8]:rn(r[8],o[8])),r[9]==null&&(r[9]=o[9]),r[0]=o[0],r[1]=y,r}function uA(r){var o=[];if(r!=null)for(var c in Ae(r))o.push(c);return o}function dA(r){return Tl.call(r)}function Rm(r,o,c){return o=Ze(o===n?r.length-1:o,0),function(){for(var p=arguments,y=-1,E=Ze(p.length-o,0),R=j(E);++y<E;)R[y]=p[o+y];y=-1;for(var V=j(o+1);++y<o;)V[y]=p[y];return V[o]=c(R),xn(r,this,V)}}function Mm(r,o){return o.length<2?r:Wi(r,Wn(o,0,-1))}function fA(r,o){for(var c=r.length,p=rn(o.length,c),y=hn(r);p--;){var E=o[p];r[p]=kr(E,c)?y[E]:n}return r}function Ch(r,o){if(!(o==="constructor"&&typeof r[o]=="function")&&o!="__proto__")return r[o]}var Lm=Fm(im),xs=Ex||function(r,o){return $e.setTimeout(r,o)},Ph=Fm(LS);function Dm(r,o,c){var p=o+"";return Ph(r,rA(p,hA(tA(p),c)))}function Fm(r){var o=0,c=0;return function(){var p=Ox(),y=$-(p-c);if(c=p,y>0){if(++o>=z)return arguments[0]}else o=0;return r.apply(n,arguments)}}function jl(r,o){var c=-1,p=r.length,y=p-1;for(o=o===n?p:o;++c<o;){var E=lh(c,y),R=r[E];r[E]=r[c],r[c]=R}return r.length=o,r}var Bm=lA(function(r){var o=[];return r.charCodeAt(0)===46&&o.push(""),r.replace(n1,function(c,p,y,E){o.push(y?E.replace(u1,"$1"):p||c)}),o});function cr(r){if(typeof r=="string"||Cn(r))return r;var o=r+"";return o=="0"&&1/r==-1/0?"-0":o}function Hi(r){if(r!=null){try{return El.call(r)}catch{}try{return r+""}catch{}}return""}function hA(r,o){return Dn(Nt,function(c){var p="_."+c[0];o&c[1]&&!xl(r,p)&&r.push(p)}),r.sort()}function Vm(r){if(r instanceof se)return r.clone();var o=new Bn(r.__wrapped__,r.__chain__);return o.__actions__=hn(r.__actions__),o.__index__=r.__index__,o.__values__=r.__values__,o}function gA(r,o,c){(c?ln(r,o,c):o===n)?o=1:o=Ze(Gt(o),0);var p=r==null?0:r.length;if(!p||o<1)return[];for(var y=0,E=0,R=j(Ml(p/o));y<p;)R[E++]=Wn(r,y,y+=o);return R}function pA(r){for(var o=-1,c=r==null?0:r.length,p=0,y=[];++o<c;){var E=r[o];E&&(y[p++]=E)}return y}function vA(){var r=arguments.length;if(!r)return[];for(var o=j(r-1),c=arguments[0],p=r;p--;)o[p-1]=arguments[p];return ni(Ht(c)?hn(c):[c],tn(o,1))}var mA=jt(function(r,o){return Ue(r)?vs(r,tn(o,1,Ue,!0)):[]}),bA=jt(function(r,o){var c=zn(o);return Ue(c)&&(c=n),Ue(r)?vs(r,tn(o,1,Ue,!0),Mt(c,2)):[]}),_A=jt(function(r,o){var c=zn(o);return Ue(c)&&(c=n),Ue(r)?vs(r,tn(o,1,Ue,!0),n,c):[]});function wA(r,o,c){var p=r==null?0:r.length;return p?(o=c||o===n?1:Gt(o),Wn(r,o<0?0:o,p)):[]}function yA(r,o,c){var p=r==null?0:r.length;return p?(o=c||o===n?1:Gt(o),o=p-o,Wn(r,0,o<0?0:o)):[]}function xA(r,o){return r&&r.length?Gl(r,Mt(o,3),!0,!0):[]}function SA(r,o){return r&&r.length?Gl(r,Mt(o,3),!0):[]}function AA(r,o,c,p){var y=r==null?0:r.length;return y?(c&&typeof c!="number"&&ln(r,o,c)&&(c=0,p=y),vS(r,o,c,p)):[]}function Wm(r,o,c){var p=r==null?0:r.length;if(!p)return-1;var y=c==null?0:Gt(c);return y<0&&(y=Ze(p+y,0)),Sl(r,Mt(o,3),y)}function zm(r,o,c){var p=r==null?0:r.length;if(!p)return-1;var y=p-1;return c!==n&&(y=Gt(c),y=c<0?Ze(p+y,0):rn(y,p-1)),Sl(r,Mt(o,3),y,!0)}function Hm(r){var o=r==null?0:r.length;return o?tn(r,1):[]}function CA(r){var o=r==null?0:r.length;return o?tn(r,ot):[]}function PA(r,o){var c=r==null?0:r.length;return c?(o=o===n?1:Gt(o),tn(r,o)):[]}function EA(r){for(var o=-1,c=r==null?0:r.length,p={};++o<c;){var y=r[o];p[y[0]]=y[1]}return p}function Um(r){return r&&r.length?r[0]:n}function TA(r,o,c){var p=r==null?0:r.length;if(!p)return-1;var y=c==null?0:Gt(c);return y<0&&(y=Ze(p+y,0)),fo(r,o,y)}function kA(r){var o=r==null?0:r.length;return o?Wn(r,0,-1):[]}var IA=jt(function(r){var o=Le(r,hh);return o.length&&o[0]===r[0]?rh(o):[]}),OA=jt(function(r){var o=zn(r),c=Le(r,hh);return o===zn(c)?o=n:c.pop(),c.length&&c[0]===r[0]?rh(c,Mt(o,2)):[]}),NA=jt(function(r){var o=zn(r),c=Le(r,hh);return o=typeof o=="function"?o:n,o&&c.pop(),c.length&&c[0]===r[0]?rh(c,n,o):[]});function RA(r,o){return r==null?"":kx.call(r,o)}function zn(r){var o=r==null?0:r.length;return o?r[o-1]:n}function MA(r,o,c){var p=r==null?0:r.length;if(!p)return-1;var y=p;return c!==n&&(y=Gt(c),y=y<0?Ze(p+y,0):rn(y,p-1)),o===o?hx(r,o,y):Sl(r,Sv,y,!0)}function LA(r,o){return r&&r.length?tm(r,Gt(o)):n}var DA=jt(Gm);function Gm(r,o){return r&&r.length&&o&&o.length?ah(r,o):r}function FA(r,o,c){return r&&r.length&&o&&o.length?ah(r,o,Mt(c,2)):r}function BA(r,o,c){return r&&r.length&&o&&o.length?ah(r,o,n,c):r}var VA=Tr(function(r,o){var c=r==null?0:r.length,p=$f(r,o);return rm(r,Le(o,function(y){return kr(y,c)?+y:y}).sort(hm)),p});function WA(r,o){var c=[];if(!(r&&r.length))return c;var p=-1,y=[],E=r.length;for(o=Mt(o,3);++p<E;){var R=r[p];o(R,p,r)&&(c.push(R),y.push(p))}return rm(r,y),c}function Eh(r){return r==null?r:Rx.call(r)}function zA(r,o,c){var p=r==null?0:r.length;return p?(c&&typeof c!="number"&&ln(r,o,c)?(o=0,c=p):(o=o==null?0:Gt(o),c=c===n?p:Gt(c)),Wn(r,o,c)):[]}function HA(r,o){return Ul(r,o)}function UA(r,o,c){return uh(r,o,Mt(c,2))}function GA(r,o){var c=r==null?0:r.length;if(c){var p=Ul(r,o);if(p<c&&Qn(r[p],o))return p}return-1}function KA(r,o){return Ul(r,o,!0)}function qA(r,o,c){return uh(r,o,Mt(c,2),!0)}function YA(r,o){var c=r==null?0:r.length;if(c){var p=Ul(r,o,!0)-1;if(Qn(r[p],o))return p}return-1}function XA(r){return r&&r.length?om(r):[]}function ZA(r,o){return r&&r.length?om(r,Mt(o,2)):[]}function JA(r){var o=r==null?0:r.length;return o?Wn(r,1,o):[]}function QA(r,o,c){return r&&r.length?(o=c||o===n?1:Gt(o),Wn(r,0,o<0?0:o)):[]}function jA(r,o,c){var p=r==null?0:r.length;return p?(o=c||o===n?1:Gt(o),o=p-o,Wn(r,o<0?0:o,p)):[]}function $A(r,o){return r&&r.length?Gl(r,Mt(o,3),!1,!0):[]}function tC(r,o){return r&&r.length?Gl(r,Mt(o,3)):[]}var eC=jt(function(r){return si(tn(r,1,Ue,!0))}),nC=jt(function(r){var o=zn(r);return Ue(o)&&(o=n),si(tn(r,1,Ue,!0),Mt(o,2))}),rC=jt(function(r){var o=zn(r);return o=typeof o=="function"?o:n,si(tn(r,1,Ue,!0),n,o)});function iC(r){return r&&r.length?si(r):[]}function oC(r,o){return r&&r.length?si(r,Mt(o,2)):[]}function sC(r,o){return o=typeof o=="function"?o:n,r&&r.length?si(r,n,o):[]}function Th(r){if(!(r&&r.length))return[];var o=0;return r=ei(r,function(c){if(Ue(c))return o=Ze(c.length,o),!0}),Kf(o,function(c){return Le(r,Hf(c))})}function Km(r,o){if(!(r&&r.length))return[];var c=Th(r);return o==null?c:Le(c,function(p){return xn(o,n,p)})}var aC=jt(function(r,o){return Ue(r)?vs(r,o):[]}),lC=jt(function(r){return fh(ei(r,Ue))}),cC=jt(function(r){var o=zn(r);return Ue(o)&&(o=n),fh(ei(r,Ue),Mt(o,2))}),uC=jt(function(r){var o=zn(r);return o=typeof o=="function"?o:n,fh(ei(r,Ue),n,o)}),dC=jt(Th);function fC(r,o){return cm(r||[],o||[],ps)}function hC(r,o){return cm(r||[],o||[],_s)}var gC=jt(function(r){var o=r.length,c=o>1?r[o-1]:n;return c=typeof c=="function"?(r.pop(),c):n,Km(r,c)});function qm(r){var o=C(r);return o.__chain__=!0,o}function pC(r,o){return o(r),r}function $l(r,o){return o(r)}var vC=Tr(function(r){var o=r.length,c=o?r[0]:0,p=this.__wrapped__,y=function(E){return $f(E,r)};return o>1||this.__actions__.length||!(p instanceof se)||!kr(c)?this.thru(y):(p=p.slice(c,+c+(o?1:0)),p.__actions__.push({func:$l,args:[y],thisArg:n}),new Bn(p,this.__chain__).thru(function(E){return o&&!E.length&&E.push(n),E}))});function mC(){return qm(this)}function bC(){return new Bn(this.value(),this.__chain__)}function _C(){this.__values__===n&&(this.__values__=sb(this.value()));var r=this.__index__>=this.__values__.length,o=r?n:this.__values__[this.__index__++];return{done:r,value:o}}function wC(){return this}function yC(r){for(var o,c=this;c instanceof Bl;){var p=Vm(c);p.__index__=0,p.__values__=n,o?y.__wrapped__=p:o=p;var y=p;c=c.__wrapped__}return y.__wrapped__=r,o}function xC(){var r=this.__wrapped__;if(r instanceof se){var o=r;return this.__actions__.length&&(o=new se(this)),o=o.reverse(),o.__actions__.push({func:$l,args:[Eh],thisArg:n}),new Bn(o,this.__chain__)}return this.thru(Eh)}function SC(){return lm(this.__wrapped__,this.__actions__)}var AC=Kl(function(r,o,c){_e.call(r,c)?++r[c]:Pr(r,c,1)});function CC(r,o,c){var p=Ht(r)?yv:pS;return c&&ln(r,o,c)&&(o=n),p(r,Mt(o,3))}function PC(r,o){var c=Ht(r)?ei:Kv;return c(r,Mt(o,3))}var EC=_m(Wm),TC=_m(zm);function kC(r,o){return tn(tc(r,o),1)}function IC(r,o){return tn(tc(r,o),ot)}function OC(r,o,c){return c=c===n?1:Gt(c),tn(tc(r,o),c)}function Ym(r,o){var c=Ht(r)?Dn:oi;return c(r,Mt(o,3))}function Xm(r,o){var c=Ht(r)?J1:Gv;return c(r,Mt(o,3))}var NC=Kl(function(r,o,c){_e.call(r,c)?r[c].push(o):Pr(r,c,[o])});function RC(r,o,c,p){r=gn(r)?r:Ao(r),c=c&&!p?Gt(c):0;var y=r.length;return c<0&&(c=Ze(y+c,0)),oc(r)?c<=y&&r.indexOf(o,c)>-1:!!y&&fo(r,o,c)>-1}var MC=jt(function(r,o,c){var p=-1,y=typeof o=="function",E=gn(r)?j(r.length):[];return oi(r,function(R){E[++p]=y?xn(o,R,c):ms(R,o,c)}),E}),LC=Kl(function(r,o,c){Pr(r,c,o)});function tc(r,o){var c=Ht(r)?Le:Qv;return c(r,Mt(o,3))}function DC(r,o,c,p){return r==null?[]:(Ht(o)||(o=o==null?[]:[o]),c=p?n:c,Ht(c)||(c=c==null?[]:[c]),em(r,o,c))}var FC=Kl(function(r,o,c){r[c?0:1].push(o)},function(){return[[],[]]});function BC(r,o,c){var p=Ht(r)?Wf:Cv,y=arguments.length<3;return p(r,Mt(o,4),c,y,oi)}function VC(r,o,c){var p=Ht(r)?Q1:Cv,y=arguments.length<3;return p(r,Mt(o,4),c,y,Gv)}function WC(r,o){var c=Ht(r)?ei:Kv;return c(r,rc(Mt(o,3)))}function zC(r){var o=Ht(r)?Wv:RS;return o(r)}function HC(r,o,c){(c?ln(r,o,c):o===n)?o=1:o=Gt(o);var p=Ht(r)?uS:MS;return p(r,o)}function UC(r){var o=Ht(r)?dS:DS;return o(r)}function GC(r){if(r==null)return 0;if(gn(r))return oc(r)?go(r):r.length;var o=on(r);return o==Vt||o==be?r.size:oh(r).length}function KC(r,o,c){var p=Ht(r)?zf:FS;return c&&ln(r,o,c)&&(o=n),p(r,Mt(o,3))}var qC=jt(function(r,o){if(r==null)return[];var c=o.length;return c>1&&ln(r,o[0],o[1])?o=[]:c>2&&ln(o[0],o[1],o[2])&&(o=[o[0]]),em(r,tn(o,1),[])}),ec=Px||function(){return $e.Date.now()};function YC(r,o){if(typeof o!="function")throw new Fn(l);return r=Gt(r),function(){if(--r<1)return o.apply(this,arguments)}}function Zm(r,o,c){return o=c?n:o,o=r&&o==null?r.length:o,Er(r,M,n,n,n,n,o)}function Jm(r,o){var c;if(typeof o!="function")throw new Fn(l);return r=Gt(r),function(){return--r>0&&(c=o.apply(this,arguments)),r<=1&&(o=n),c}}var kh=jt(function(r,o,c){var p=x;if(c.length){var y=ri(c,xo(kh));p|=D}return Er(r,p,o,c,y)}),Qm=jt(function(r,o,c){var p=x|S;if(c.length){var y=ri(c,xo(Qm));p|=D}return Er(o,p,r,c,y)});function jm(r,o,c){o=c?n:o;var p=Er(r,T,n,n,n,n,n,o);return p.placeholder=jm.placeholder,p}function $m(r,o,c){o=c?n:o;var p=Er(r,O,n,n,n,n,n,o);return p.placeholder=$m.placeholder,p}function tb(r,o,c){var p,y,E,R,V,K,ut=0,dt=!1,vt=!1,Pt=!0;if(typeof r!="function")throw new Fn(l);o=Hn(o)||0,Ve(c)&&(dt=!!c.leading,vt="maxWait"in c,E=vt?Ze(Hn(c.maxWait)||0,o):E,Pt="trailing"in c?!!c.trailing:Pt);function It(Ge){var jn=p,Nr=y;return p=y=n,ut=Ge,R=r.apply(Nr,jn),R}function Ft(Ge){return ut=Ge,V=xs(ee,o),dt?It(Ge):R}function Xt(Ge){var jn=Ge-K,Nr=Ge-ut,_b=o-jn;return vt?rn(_b,E-Nr):_b}function Bt(Ge){var jn=Ge-K,Nr=Ge-ut;return K===n||jn>=o||jn<0||vt&&Nr>=E}function ee(){var Ge=ec();if(Bt(Ge))return le(Ge);V=xs(ee,Xt(Ge))}function le(Ge){return V=n,Pt&&p?It(Ge):(p=y=n,R)}function Pn(){V!==n&&um(V),ut=0,p=K=y=V=n}function cn(){return V===n?R:le(ec())}function En(){var Ge=ec(),jn=Bt(Ge);if(p=arguments,y=this,K=Ge,jn){if(V===n)return Ft(K);if(vt)return um(V),V=xs(ee,o),It(K)}return V===n&&(V=xs(ee,o)),R}return En.cancel=Pn,En.flush=cn,En}var XC=jt(function(r,o){return Uv(r,1,o)}),ZC=jt(function(r,o,c){return Uv(r,Hn(o)||0,c)});function JC(r){return Er(r,q)}function nc(r,o){if(typeof r!="function"||o!=null&&typeof o!="function")throw new Fn(l);var c=function(){var p=arguments,y=o?o.apply(this,p):p[0],E=c.cache;if(E.has(y))return E.get(y);var R=r.apply(this,p);return c.cache=E.set(y,R)||E,R};return c.cache=new(nc.Cache||Cr),c}nc.Cache=Cr;function rc(r){if(typeof r!="function")throw new Fn(l);return function(){var o=arguments;switch(o.length){case 0:return!r.call(this);case 1:return!r.call(this,o[0]);case 2:return!r.call(this,o[0],o[1]);case 3:return!r.call(this,o[0],o[1],o[2])}return!r.apply(this,o)}}function QC(r){return Jm(2,r)}var jC=BS(function(r,o){o=o.length==1&&Ht(o[0])?Le(o[0],Sn(Mt())):Le(tn(o,1),Sn(Mt()));var c=o.length;return jt(function(p){for(var y=-1,E=rn(p.length,c);++y<E;)p[y]=o[y].call(this,p[y]);return xn(r,this,p)})}),Ih=jt(function(r,o){var c=ri(o,xo(Ih));return Er(r,D,n,o,c)}),eb=jt(function(r,o){var c=ri(o,xo(eb));return Er(r,L,n,o,c)}),$C=Tr(function(r,o){return Er(r,G,n,n,n,o)});function t2(r,o){if(typeof r!="function")throw new Fn(l);return o=o===n?o:Gt(o),jt(r,o)}function e2(r,o){if(typeof r!="function")throw new Fn(l);return o=o==null?0:Ze(Gt(o),0),jt(function(c){var p=c[o],y=li(c,0,o);return p&&ni(y,p),xn(r,this,y)})}function n2(r,o,c){var p=!0,y=!0;if(typeof r!="function")throw new Fn(l);return Ve(c)&&(p="leading"in c?!!c.leading:p,y="trailing"in c?!!c.trailing:y),tb(r,o,{leading:p,maxWait:o,trailing:y})}function r2(r){return Zm(r,1)}function i2(r,o){return Ih(gh(o),r)}function o2(){if(!arguments.length)return[];var r=arguments[0];return Ht(r)?r:[r]}function s2(r){return Vn(r,b)}function a2(r,o){return o=typeof o=="function"?o:n,Vn(r,b,o)}function l2(r){return Vn(r,g|b)}function c2(r,o){return o=typeof o=="function"?o:n,Vn(r,g|b,o)}function u2(r,o){return o==null||Hv(r,o,Qe(o))}function Qn(r,o){return r===o||r!==r&&o!==o}var d2=Zl(nh),f2=Zl(function(r,o){return r>=o}),Ui=Xv(function(){return arguments}())?Xv:function(r){return ze(r)&&_e.call(r,"callee")&&!Mv.call(r,"callee")},Ht=j.isArray,h2=pv?Sn(pv):yS;function gn(r){return r!=null&&ic(r.length)&&!Ir(r)}function Ue(r){return ze(r)&&gn(r)}function g2(r){return r===!0||r===!1||ze(r)&&an(r)==Ut}var ci=Tx||zh,p2=vv?Sn(vv):xS;function v2(r){return ze(r)&&r.nodeType===1&&!Ss(r)}function m2(r){if(r==null)return!0;if(gn(r)&&(Ht(r)||typeof r=="string"||typeof r.splice=="function"||ci(r)||So(r)||Ui(r)))return!r.length;var o=on(r);if(o==Vt||o==be)return!r.size;if(ys(r))return!oh(r).length;for(var c in r)if(_e.call(r,c))return!1;return!0}function b2(r,o){return bs(r,o)}function _2(r,o,c){c=typeof c=="function"?c:n;var p=c?c(r,o):n;return p===n?bs(r,o,n,c):!!p}function Oh(r){if(!ze(r))return!1;var o=an(r);return o==fe||o==re||typeof r.message=="string"&&typeof r.name=="string"&&!Ss(r)}function w2(r){return typeof r=="number"&&Dv(r)}function Ir(r){if(!Ve(r))return!1;var o=an(r);return o==ge||o==Ye||o==ue||o==Fe}function nb(r){return typeof r=="number"&&r==Gt(r)}function ic(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=Z}function Ve(r){var o=typeof r;return r!=null&&(o=="object"||o=="function")}function ze(r){return r!=null&&typeof r=="object"}var rb=mv?Sn(mv):AS;function y2(r,o){return r===o||ih(r,o,yh(o))}function x2(r,o,c){return c=typeof c=="function"?c:n,ih(r,o,yh(o),c)}function S2(r){return ib(r)&&r!=+r}function A2(r){if(aA(r))throw new zt(a);return Zv(r)}function C2(r){return r===null}function P2(r){return r==null}function ib(r){return typeof r=="number"||ze(r)&&an(r)==te}function Ss(r){if(!ze(r)||an(r)!=ie)return!1;var o=Ol(r);if(o===null)return!0;var c=_e.call(o,"constructor")&&o.constructor;return typeof c=="function"&&c instanceof c&&El.call(c)==xx}var Nh=bv?Sn(bv):CS;function E2(r){return nb(r)&&r>=-9007199254740991&&r<=Z}var ob=_v?Sn(_v):PS;function oc(r){return typeof r=="string"||!Ht(r)&&ze(r)&&an(r)==qe}function Cn(r){return typeof r=="symbol"||ze(r)&&an(r)==Se}var So=wv?Sn(wv):ES;function T2(r){return r===n}function k2(r){return ze(r)&&on(r)==Be}function I2(r){return ze(r)&&an(r)==Je}var O2=Zl(sh),N2=Zl(function(r,o){return r<=o});function sb(r){if(!r)return[];if(gn(r))return oc(r)?Zn(r):hn(r);if(us&&r[us])return ux(r[us]());var o=on(r),c=o==Vt?Yf:o==be?Al:Ao;return c(r)}function Or(r){if(!r)return r===0?r:0;if(r=Hn(r),r===ot||r===-1/0){var o=r<0?-1:1;return o*ct}return r===r?r:0}function Gt(r){var o=Or(r),c=o%1;return o===o?c?o-c:o:0}function ab(r){return r?Vi(Gt(r),0,it):0}function Hn(r){if(typeof r=="number")return r;if(Cn(r))return wt;if(Ve(r)){var o=typeof r.valueOf=="function"?r.valueOf():r;r=Ve(o)?o+"":o}if(typeof r!="string")return r===0?r:+r;r=Pv(r);var c=h1.test(r);return c||p1.test(r)?Y1(r.slice(2),c?2:8):f1.test(r)?wt:+r}function lb(r){return lr(r,pn(r))}function R2(r){return r?Vi(Gt(r),-9007199254740991,Z):r===0?r:0}function ve(r){return r==null?"":An(r)}var M2=wo(function(r,o){if(ys(o)||gn(o)){lr(o,Qe(o),r);return}for(var c in o)_e.call(o,c)&&ps(r,c,o[c])}),cb=wo(function(r,o){lr(o,pn(o),r)}),sc=wo(function(r,o,c,p){lr(o,pn(o),r,p)}),L2=wo(function(r,o,c,p){lr(o,Qe(o),r,p)}),D2=Tr($f);function F2(r,o){var c=_o(r);return o==null?c:zv(c,o)}var B2=jt(function(r,o){r=Ae(r);var c=-1,p=o.length,y=p>2?o[2]:n;for(y&&ln(o[0],o[1],y)&&(p=1);++c<p;)for(var E=o[c],R=pn(E),V=-1,K=R.length;++V<K;){var ut=R[V],dt=r[ut];(dt===n||Qn(dt,vo[ut])&&!_e.call(r,ut))&&(r[ut]=E[ut])}return r}),V2=jt(function(r){return r.push(n,Pm),xn(ub,n,r)});function W2(r,o){return xv(r,Mt(o,3),ar)}function z2(r,o){return xv(r,Mt(o,3),eh)}function H2(r,o){return r==null?r:th(r,Mt(o,3),pn)}function U2(r,o){return r==null?r:qv(r,Mt(o,3),pn)}function G2(r,o){return r&&ar(r,Mt(o,3))}function K2(r,o){return r&&eh(r,Mt(o,3))}function q2(r){return r==null?[]:zl(r,Qe(r))}function Y2(r){return r==null?[]:zl(r,pn(r))}function Rh(r,o,c){var p=r==null?n:Wi(r,o);return p===n?c:p}function X2(r,o){return r!=null&&km(r,o,mS)}function Mh(r,o){return r!=null&&km(r,o,bS)}var Z2=ym(function(r,o,c){o!=null&&typeof o.toString!="function"&&(o=Tl.call(o)),r[o]=c},Dh(vn)),J2=ym(function(r,o,c){o!=null&&typeof o.toString!="function"&&(o=Tl.call(o)),_e.call(r,o)?r[o].push(c):r[o]=[c]},Mt),Q2=jt(ms);function Qe(r){return gn(r)?Vv(r):oh(r)}function pn(r){return gn(r)?Vv(r,!0):TS(r)}function j2(r,o){var c={};return o=Mt(o,3),ar(r,function(p,y,E){Pr(c,o(p,y,E),p)}),c}function $2(r,o){var c={};return o=Mt(o,3),ar(r,function(p,y,E){Pr(c,y,o(p,y,E))}),c}var tP=wo(function(r,o,c){Hl(r,o,c)}),ub=wo(function(r,o,c,p){Hl(r,o,c,p)}),eP=Tr(function(r,o){var c={};if(r==null)return c;var p=!1;o=Le(o,function(E){return E=ai(E,r),p||(p=E.length>1),E}),lr(r,_h(r),c),p&&(c=Vn(c,g|m|b,ZS));for(var y=o.length;y--;)dh(c,o[y]);return c});function nP(r,o){return db(r,rc(Mt(o)))}var rP=Tr(function(r,o){return r==null?{}:IS(r,o)});function db(r,o){if(r==null)return{};var c=Le(_h(r),function(p){return[p]});return o=Mt(o),nm(r,c,function(p,y){return o(p,y[0])})}function iP(r,o,c){o=ai(o,r);var p=-1,y=o.length;for(y||(y=1,r=n);++p<y;){var E=r==null?n:r[cr(o[p])];E===n&&(p=y,E=c),r=Ir(E)?E.call(r):E}return r}function oP(r,o,c){return r==null?r:_s(r,o,c)}function sP(r,o,c,p){return p=typeof p=="function"?p:n,r==null?r:_s(r,o,c,p)}var fb=Am(Qe),hb=Am(pn);function aP(r,o,c){var p=Ht(r),y=p||ci(r)||So(r);if(o=Mt(o,4),c==null){var E=r&&r.constructor;y?c=p?new E:[]:Ve(r)?c=Ir(E)?_o(Ol(r)):{}:c={}}return(y?Dn:ar)(r,function(R,V,K){return o(c,R,V,K)}),c}function lP(r,o){return r==null?!0:dh(r,o)}function cP(r,o,c){return r==null?r:am(r,o,gh(c))}function uP(r,o,c,p){return p=typeof p=="function"?p:n,r==null?r:am(r,o,gh(c),p)}function Ao(r){return r==null?[]:qf(r,Qe(r))}function dP(r){return r==null?[]:qf(r,pn(r))}function fP(r,o,c){return c===n&&(c=o,o=n),c!==n&&(c=Hn(c),c=c===c?c:0),o!==n&&(o=Hn(o),o=o===o?o:0),Vi(Hn(r),o,c)}function hP(r,o,c){return o=Or(o),c===n?(c=o,o=0):c=Or(c),r=Hn(r),_S(r,o,c)}function gP(r,o,c){if(c&&typeof c!="boolean"&&ln(r,o,c)&&(o=c=n),c===n&&(typeof o=="boolean"?(c=o,o=n):typeof r=="boolean"&&(c=r,r=n)),r===n&&o===n?(r=0,o=1):(r=Or(r),o===n?(o=r,r=0):o=Or(o)),r>o){var p=r;r=o,o=p}if(c||r%1||o%1){var y=Fv();return rn(r+y*(o-r+q1("1e-"+((y+"").length-1))),o)}return lh(r,o)}var pP=yo(function(r,o,c){return o=o.toLowerCase(),r+(c?gb(o):o)});function gb(r){return Lh(ve(r).toLowerCase())}function pb(r){return r=ve(r),r&&r.replace(m1,ox).replace(D1,"")}function vP(r,o,c){r=ve(r),o=An(o);var p=r.length;c=c===n?p:Vi(Gt(c),0,p);var y=c;return c-=o.length,c>=0&&r.slice(c,y)==o}function mP(r){return r=ve(r),r&&Qy.test(r)?r.replace(co,sx):r}function bP(r){return r=ve(r),r&&r1.test(r)?r.replace(If,"\\$&"):r}var _P=yo(function(r,o,c){return r+(c?"-":"")+o.toLowerCase()}),wP=yo(function(r,o,c){return r+(c?" ":"")+o.toLowerCase()}),yP=bm("toLowerCase");function xP(r,o,c){r=ve(r),o=Gt(o);var p=o?go(r):0;if(!o||p>=o)return r;var y=(o-p)/2;return Xl(Ll(y),c)+r+Xl(Ml(y),c)}function SP(r,o,c){r=ve(r),o=Gt(o);var p=o?go(r):0;return o&&p<o?r+Xl(o-p,c):r}function AP(r,o,c){r=ve(r),o=Gt(o);var p=o?go(r):0;return o&&p<o?Xl(o-p,c)+r:r}function CP(r,o,c){return c||o==null?o=0:o&&(o=+o),Nx(ve(r).replace(Of,""),o||0)}function PP(r,o,c){return(c?ln(r,o,c):o===n)?o=1:o=Gt(o),ch(ve(r),o)}function EP(){var r=arguments,o=ve(r[0]);return r.length<3?o:o.replace(r[1],r[2])}var TP=yo(function(r,o,c){return r+(c?"_":"")+o.toLowerCase()});function kP(r,o,c){return c&&typeof c!="number"&&ln(r,o,c)&&(o=c=n),c=c===n?it:c>>>0,c?(r=ve(r),r&&(typeof o=="string"||o!=null&&!Nh(o))&&(o=An(o),!o&&ho(r))?li(Zn(r),0,c):r.split(o,c)):[]}var IP=yo(function(r,o,c){return r+(c?" ":"")+Lh(o)});function OP(r,o,c){return r=ve(r),c=c==null?0:Vi(Gt(c),0,r.length),o=An(o),r.slice(c,c+o.length)==o}function NP(r,o,c){var p=C.templateSettings;c&&ln(r,o,c)&&(o=n),r=ve(r),o=sc({},o,p,Cm);var y=sc({},o.imports,p.imports,Cm),E=Qe(y),R=qf(y,E),V,K,ut=0,dt=o.interpolate||_l,vt="__p += '",Pt=Xf((o.escape||_l).source+"|"+dt.source+"|"+(dt===Yp?d1:_l).source+"|"+(o.evaluate||_l).source+"|$","g"),It="//# sourceURL="+(_e.call(o,"sourceURL")?(o.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++z1+"]")+`
76
- `;r.replace(Pt,function(Bt,ee,le,Pn,cn,En){return le||(le=Pn),vt+=r.slice(ut,En).replace(b1,ax),ee&&(V=!0,vt+=`' +
77
- __e(`+ee+`) +
78
- '`),cn&&(K=!0,vt+=`';
79
- `+cn+`;
80
- __p += '`),le&&(vt+=`' +
81
- ((__t = (`+le+`)) == null ? '' : __t) +
82
- '`),ut=En+Bt.length,Bt}),vt+=`';
83
- `;var Ft=_e.call(o,"variable")&&o.variable;if(!Ft)vt=`with (obj) {
84
- `+vt+`
85
- }
86
- `;else if(c1.test(Ft))throw new zt(u);vt=(K?vt.replace(sr,""):vt).replace(Mn,"$1").replace(Mi,"$1;"),vt="function("+(Ft||"obj")+`) {
87
- `+(Ft?"":`obj || (obj = {});
88
- `)+"var __t, __p = ''"+(V?", __e = _.escape":"")+(K?`, __j = Array.prototype.join;
89
- function print() { __p += __j.call(arguments, '') }
90
- `:`;
91
- `)+vt+`return __p
92
- }`;var Xt=mb(function(){return he(E,It+"return "+vt).apply(n,R)});if(Xt.source=vt,Oh(Xt))throw Xt;return Xt}function RP(r){return ve(r).toLowerCase()}function MP(r){return ve(r).toUpperCase()}function LP(r,o,c){if(r=ve(r),r&&(c||o===n))return Pv(r);if(!r||!(o=An(o)))return r;var p=Zn(r),y=Zn(o),E=Ev(p,y),R=Tv(p,y)+1;return li(p,E,R).join("")}function DP(r,o,c){if(r=ve(r),r&&(c||o===n))return r.slice(0,Iv(r)+1);if(!r||!(o=An(o)))return r;var p=Zn(r),y=Tv(p,Zn(o))+1;return li(p,0,y).join("")}function FP(r,o,c){if(r=ve(r),r&&(c||o===n))return r.replace(Of,"");if(!r||!(o=An(o)))return r;var p=Zn(r),y=Ev(p,Zn(o));return li(p,y).join("")}function BP(r,o){var c=lt,p=pt;if(Ve(o)){var y="separator"in o?o.separator:y;c="length"in o?Gt(o.length):c,p="omission"in o?An(o.omission):p}r=ve(r);var E=r.length;if(ho(r)){var R=Zn(r);E=R.length}if(c>=E)return r;var V=c-go(p);if(V<1)return p;var K=R?li(R,0,V).join(""):r.slice(0,V);if(y===n)return K+p;if(R&&(V+=K.length-V),Nh(y)){if(r.slice(V).search(y)){var ut,dt=K;for(y.global||(y=Xf(y.source,ve(Xp.exec(y))+"g")),y.lastIndex=0;ut=y.exec(dt);)var vt=ut.index;K=K.slice(0,vt===n?V:vt)}}else if(r.indexOf(An(y),V)!=V){var Pt=K.lastIndexOf(y);Pt>-1&&(K=K.slice(0,Pt))}return K+p}function VP(r){return r=ve(r),r&&Jy.test(r)?r.replace(ti,gx):r}var WP=yo(function(r,o,c){return r+(c?" ":"")+o.toUpperCase()}),Lh=bm("toUpperCase");function vb(r,o,c){return r=ve(r),o=c?n:o,o===n?cx(r)?mx(r):tx(r):r.match(o)||[]}var mb=jt(function(r,o){try{return xn(r,n,o)}catch(c){return Oh(c)?c:new zt(c)}}),zP=Tr(function(r,o){return Dn(o,function(c){c=cr(c),Pr(r,c,kh(r[c],r))}),r});function HP(r){var o=r==null?0:r.length,c=Mt();return r=o?Le(r,function(p){if(typeof p[1]!="function")throw new Fn(l);return[c(p[0]),p[1]]}):[],jt(function(p){for(var y=-1;++y<o;){var E=r[y];if(xn(E[0],this,p))return xn(E[1],this,p)}})}function UP(r){return gS(Vn(r,g))}function Dh(r){return function(){return r}}function GP(r,o){return r==null||r!==r?o:r}var KP=wm(),qP=wm(!0);function vn(r){return r}function Fh(r){return Jv(typeof r=="function"?r:Vn(r,g))}function YP(r){return jv(Vn(r,g))}function XP(r,o){return $v(r,Vn(o,g))}var ZP=jt(function(r,o){return function(c){return ms(c,r,o)}}),JP=jt(function(r,o){return function(c){return ms(r,c,o)}});function Bh(r,o,c){var p=Qe(o),y=zl(o,p);c==null&&!(Ve(o)&&(y.length||!p.length))&&(c=o,o=r,r=this,y=zl(o,Qe(o)));var E=!(Ve(c)&&"chain"in c)||!!c.chain,R=Ir(r);return Dn(y,function(V){var K=o[V];r[V]=K,R&&(r.prototype[V]=function(){var ut=this.__chain__;if(E||ut){var dt=r(this.__wrapped__),vt=dt.__actions__=hn(this.__actions__);return vt.push({func:K,args:arguments,thisArg:r}),dt.__chain__=ut,dt}return K.apply(r,ni([this.value()],arguments))})}),r}function QP(){return $e._===this&&($e._=Sx),this}function Vh(){}function jP(r){return r=Gt(r),jt(function(o){return tm(o,r)})}var $P=vh(Le),tE=vh(yv),eE=vh(zf);function bb(r){return Sh(r)?Hf(cr(r)):OS(r)}function nE(r){return function(o){return r==null?n:Wi(r,o)}}var rE=xm(),iE=xm(!0);function Wh(){return[]}function zh(){return!1}function oE(){return{}}function sE(){return""}function aE(){return!0}function lE(r,o){if(r=Gt(r),r<1||r>Z)return[];var c=it,p=rn(r,it);o=Mt(o),r-=it;for(var y=Kf(p,o);++c<r;)o(c);return y}function cE(r){return Ht(r)?Le(r,cr):Cn(r)?[r]:hn(Bm(ve(r)))}function uE(r){var o=++yx;return ve(r)+o}var dE=Yl(function(r,o){return r+o},0),fE=mh("ceil"),hE=Yl(function(r,o){return r/o},1),gE=mh("floor");function pE(r){return r&&r.length?Wl(r,vn,nh):n}function vE(r,o){return r&&r.length?Wl(r,Mt(o,2),nh):n}function mE(r){return Av(r,vn)}function bE(r,o){return Av(r,Mt(o,2))}function _E(r){return r&&r.length?Wl(r,vn,sh):n}function wE(r,o){return r&&r.length?Wl(r,Mt(o,2),sh):n}var yE=Yl(function(r,o){return r*o},1),xE=mh("round"),SE=Yl(function(r,o){return r-o},0);function AE(r){return r&&r.length?Gf(r,vn):0}function CE(r,o){return r&&r.length?Gf(r,Mt(o,2)):0}return C.after=YC,C.ary=Zm,C.assign=M2,C.assignIn=cb,C.assignInWith=sc,C.assignWith=L2,C.at=D2,C.before=Jm,C.bind=kh,C.bindAll=zP,C.bindKey=Qm,C.castArray=o2,C.chain=qm,C.chunk=gA,C.compact=pA,C.concat=vA,C.cond=HP,C.conforms=UP,C.constant=Dh,C.countBy=AC,C.create=F2,C.curry=jm,C.curryRight=$m,C.debounce=tb,C.defaults=B2,C.defaultsDeep=V2,C.defer=XC,C.delay=ZC,C.difference=mA,C.differenceBy=bA,C.differenceWith=_A,C.drop=wA,C.dropRight=yA,C.dropRightWhile=xA,C.dropWhile=SA,C.fill=AA,C.filter=PC,C.flatMap=kC,C.flatMapDeep=IC,C.flatMapDepth=OC,C.flatten=Hm,C.flattenDeep=CA,C.flattenDepth=PA,C.flip=JC,C.flow=KP,C.flowRight=qP,C.fromPairs=EA,C.functions=q2,C.functionsIn=Y2,C.groupBy=NC,C.initial=kA,C.intersection=IA,C.intersectionBy=OA,C.intersectionWith=NA,C.invert=Z2,C.invertBy=J2,C.invokeMap=MC,C.iteratee=Fh,C.keyBy=LC,C.keys=Qe,C.keysIn=pn,C.map=tc,C.mapKeys=j2,C.mapValues=$2,C.matches=YP,C.matchesProperty=XP,C.memoize=nc,C.merge=tP,C.mergeWith=ub,C.method=ZP,C.methodOf=JP,C.mixin=Bh,C.negate=rc,C.nthArg=jP,C.omit=eP,C.omitBy=nP,C.once=QC,C.orderBy=DC,C.over=$P,C.overArgs=jC,C.overEvery=tE,C.overSome=eE,C.partial=Ih,C.partialRight=eb,C.partition=FC,C.pick=rP,C.pickBy=db,C.property=bb,C.propertyOf=nE,C.pull=DA,C.pullAll=Gm,C.pullAllBy=FA,C.pullAllWith=BA,C.pullAt=VA,C.range=rE,C.rangeRight=iE,C.rearg=$C,C.reject=WC,C.remove=WA,C.rest=t2,C.reverse=Eh,C.sampleSize=HC,C.set=oP,C.setWith=sP,C.shuffle=UC,C.slice=zA,C.sortBy=qC,C.sortedUniq=XA,C.sortedUniqBy=ZA,C.split=kP,C.spread=e2,C.tail=JA,C.take=QA,C.takeRight=jA,C.takeRightWhile=$A,C.takeWhile=tC,C.tap=pC,C.throttle=n2,C.thru=$l,C.toArray=sb,C.toPairs=fb,C.toPairsIn=hb,C.toPath=cE,C.toPlainObject=lb,C.transform=aP,C.unary=r2,C.union=eC,C.unionBy=nC,C.unionWith=rC,C.uniq=iC,C.uniqBy=oC,C.uniqWith=sC,C.unset=lP,C.unzip=Th,C.unzipWith=Km,C.update=cP,C.updateWith=uP,C.values=Ao,C.valuesIn=dP,C.without=aC,C.words=vb,C.wrap=i2,C.xor=lC,C.xorBy=cC,C.xorWith=uC,C.zip=dC,C.zipObject=fC,C.zipObjectDeep=hC,C.zipWith=gC,C.entries=fb,C.entriesIn=hb,C.extend=cb,C.extendWith=sc,Bh(C,C),C.add=dE,C.attempt=mb,C.camelCase=pP,C.capitalize=gb,C.ceil=fE,C.clamp=fP,C.clone=s2,C.cloneDeep=l2,C.cloneDeepWith=c2,C.cloneWith=a2,C.conformsTo=u2,C.deburr=pb,C.defaultTo=GP,C.divide=hE,C.endsWith=vP,C.eq=Qn,C.escape=mP,C.escapeRegExp=bP,C.every=CC,C.find=EC,C.findIndex=Wm,C.findKey=W2,C.findLast=TC,C.findLastIndex=zm,C.findLastKey=z2,C.floor=gE,C.forEach=Ym,C.forEachRight=Xm,C.forIn=H2,C.forInRight=U2,C.forOwn=G2,C.forOwnRight=K2,C.get=Rh,C.gt=d2,C.gte=f2,C.has=X2,C.hasIn=Mh,C.head=Um,C.identity=vn,C.includes=RC,C.indexOf=TA,C.inRange=hP,C.invoke=Q2,C.isArguments=Ui,C.isArray=Ht,C.isArrayBuffer=h2,C.isArrayLike=gn,C.isArrayLikeObject=Ue,C.isBoolean=g2,C.isBuffer=ci,C.isDate=p2,C.isElement=v2,C.isEmpty=m2,C.isEqual=b2,C.isEqualWith=_2,C.isError=Oh,C.isFinite=w2,C.isFunction=Ir,C.isInteger=nb,C.isLength=ic,C.isMap=rb,C.isMatch=y2,C.isMatchWith=x2,C.isNaN=S2,C.isNative=A2,C.isNil=P2,C.isNull=C2,C.isNumber=ib,C.isObject=Ve,C.isObjectLike=ze,C.isPlainObject=Ss,C.isRegExp=Nh,C.isSafeInteger=E2,C.isSet=ob,C.isString=oc,C.isSymbol=Cn,C.isTypedArray=So,C.isUndefined=T2,C.isWeakMap=k2,C.isWeakSet=I2,C.join=RA,C.kebabCase=_P,C.last=zn,C.lastIndexOf=MA,C.lowerCase=wP,C.lowerFirst=yP,C.lt=O2,C.lte=N2,C.max=pE,C.maxBy=vE,C.mean=mE,C.meanBy=bE,C.min=_E,C.minBy=wE,C.stubArray=Wh,C.stubFalse=zh,C.stubObject=oE,C.stubString=sE,C.stubTrue=aE,C.multiply=yE,C.nth=LA,C.noConflict=QP,C.noop=Vh,C.now=ec,C.pad=xP,C.padEnd=SP,C.padStart=AP,C.parseInt=CP,C.random=gP,C.reduce=BC,C.reduceRight=VC,C.repeat=PP,C.replace=EP,C.result=iP,C.round=xE,C.runInContext=U,C.sample=zC,C.size=GC,C.snakeCase=TP,C.some=KC,C.sortedIndex=HA,C.sortedIndexBy=UA,C.sortedIndexOf=GA,C.sortedLastIndex=KA,C.sortedLastIndexBy=qA,C.sortedLastIndexOf=YA,C.startCase=IP,C.startsWith=OP,C.subtract=SE,C.sum=AE,C.sumBy=CE,C.template=NP,C.times=lE,C.toFinite=Or,C.toInteger=Gt,C.toLength=ab,C.toLower=RP,C.toNumber=Hn,C.toSafeInteger=R2,C.toString=ve,C.toUpper=MP,C.trim=LP,C.trimEnd=DP,C.trimStart=FP,C.truncate=BP,C.unescape=VP,C.uniqueId=uE,C.upperCase=WP,C.upperFirst=Lh,C.each=Ym,C.eachRight=Xm,C.first=Um,Bh(C,function(){var r={};return ar(C,function(o,c){_e.call(C.prototype,c)||(r[c]=o)}),r}(),{chain:!1}),C.VERSION=i,Dn(["bind","bindKey","curry","curryRight","partial","partialRight"],function(r){C[r].placeholder=C}),Dn(["drop","take"],function(r,o){se.prototype[r]=function(c){c=c===n?1:Ze(Gt(c),0);var p=this.__filtered__&&!o?new se(this):this.clone();return p.__filtered__?p.__takeCount__=rn(c,p.__takeCount__):p.__views__.push({size:rn(c,it),type:r+(p.__dir__<0?"Right":"")}),p},se.prototype[r+"Right"]=function(c){return this.reverse()[r](c).reverse()}}),Dn(["filter","map","takeWhile"],function(r,o){var c=o+1,p=c==H||c==Q;se.prototype[r]=function(y){var E=this.clone();return E.__iteratees__.push({iteratee:Mt(y,3),type:c}),E.__filtered__=E.__filtered__||p,E}}),Dn(["head","last"],function(r,o){var c="take"+(o?"Right":"");se.prototype[r]=function(){return this[c](1).value()[0]}}),Dn(["initial","tail"],function(r,o){var c="drop"+(o?"":"Right");se.prototype[r]=function(){return this.__filtered__?new se(this):this[c](1)}}),se.prototype.compact=function(){return this.filter(vn)},se.prototype.find=function(r){return this.filter(r).head()},se.prototype.findLast=function(r){return this.reverse().find(r)},se.prototype.invokeMap=jt(function(r,o){return typeof r=="function"?new se(this):this.map(function(c){return ms(c,r,o)})}),se.prototype.reject=function(r){return this.filter(rc(Mt(r)))},se.prototype.slice=function(r,o){r=Gt(r);var c=this;return c.__filtered__&&(r>0||o<0)?new se(c):(r<0?c=c.takeRight(-r):r&&(c=c.drop(r)),o!==n&&(o=Gt(o),c=o<0?c.dropRight(-o):c.take(o-r)),c)},se.prototype.takeRightWhile=function(r){return this.reverse().takeWhile(r).reverse()},se.prototype.toArray=function(){return this.take(it)},ar(se.prototype,function(r,o){var c=/^(?:filter|find|map|reject)|While$/.test(o),p=/^(?:head|last)$/.test(o),y=C[p?"take"+(o=="last"?"Right":""):o],E=p||/^find/.test(o);y&&(C.prototype[o]=function(){var R=this.__wrapped__,V=p?[1]:arguments,K=R instanceof se,ut=V[0],dt=K||Ht(R),vt=function(ee){var le=y.apply(C,ni([ee],V));return p&&Pt?le[0]:le};dt&&c&&typeof ut=="function"&&ut.length!=1&&(K=dt=!1);var Pt=this.__chain__,It=!!this.__actions__.length,Ft=E&&!Pt,Xt=K&&!It;if(!E&&dt){R=Xt?R:new se(this);var Bt=r.apply(R,V);return Bt.__actions__.push({func:$l,args:[vt],thisArg:n}),new Bn(Bt,Pt)}return Ft&&Xt?r.apply(this,V):(Bt=this.thru(vt),Ft?p?Bt.value()[0]:Bt.value():Bt)})}),Dn(["pop","push","shift","sort","splice","unshift"],function(r){var o=Cl[r],c=/^(?:push|sort|unshift)$/.test(r)?"tap":"thru",p=/^(?:pop|shift)$/.test(r);C.prototype[r]=function(){var y=arguments;if(p&&!this.__chain__){var E=this.value();return o.apply(Ht(E)?E:[],y)}return this[c](function(R){return o.apply(Ht(R)?R:[],y)})}}),ar(se.prototype,function(r,o){var c=C[o];if(c){var p=c.name+"";_e.call(bo,p)||(bo[p]=[]),bo[p].push({name:o,func:c})}}),bo[ql(n,S).name]=[{name:"wrapper",func:n}],se.prototype.clone=Vx,se.prototype.reverse=Wx,se.prototype.value=zx,C.prototype.at=vC,C.prototype.chain=mC,C.prototype.commit=bC,C.prototype.next=_C,C.prototype.plant=yC,C.prototype.reverse=xC,C.prototype.toJSON=C.prototype.valueOf=C.prototype.value=SC,C.prototype.first=C.prototype.head,us&&(C.prototype[us]=wC),C},po=bx();Li?((Li.exports=po)._=po,Ff._=po):$e._=po}).call(pr)})(Yc,Yc.exports);var i4=Yc.exports;const G6=I0(i4);function o4(e,t){const n=e.target.value;/^#[0-9A-Fa-f]{6}$/.test(n)&&et(t,ft(n))}function O_(e){e.stopPropagation(),e.preventDefault()}function s4(e,t,n){e.stopPropagation(),e.preventDefault(),et(t,!v(t)),v(t)&&setTimeout(n,0)}function N_(e,t){e.key==="Escape"&&t()}var a4=(e,t,n)=>t(v(n)),l4=tt('<button type="button"></button>'),c4=tt('<div id="color-picker-panel" tabindex="-1"><div class="flex items-center justify-between border-b px-3 py-2"><h3 class="text-sm font-medium">Color</h3> <!></div> <div class="p-3"><div class="space-y-3"><div class="relative h-28 cursor-crosshair rounded"><div class="absolute h-3 w-3 -translate-x-1/2 -translate-y-1/2 rounded-full border-2 border-white shadow-md"></div></div> <div class="relative h-4 cursor-pointer rounded" style="background: linear-gradient(to right, #f00, #ff0, #0f0, #0ff, #00f, #f0f, #f00)"><div class="absolute top-0 h-full w-1 -translate-x-1/2 border-x border-white shadow-sm"></div></div> <div class="flex items-center gap-2"><div class="h-6 w-6 rounded border"></div> <input type="text" class="bg-background flex-1 rounded border px-2 py-1 text-xs uppercase"></div> <div class="space-y-1"><div class="flex items-center justify-between text-xs"><span>Opacity</span> <span> </span></div> <!></div> <div class="space-y-1"><div class="text-xs">Presets</div> <div class="grid grid-cols-8 gap-1"></div></div></div> <div class="mt-3 flex justify-end gap-2"><!> <!></div></div></div>'),u4=tt('<div class="relative inline-block"><button type="button" class="m-0 border-0 bg-transparent p-0" tabindex="0"><!></button> <!></div>');function K6(e,t){ht(t,!0);let n=k(t,"initialColor",3,"#ff0000"),i=k(t,"initialAlpha",3,1),s=k(t,"position",3,"right"),a=bt(!1),l,u=bt(ft(n())),d=bt(ft(i()));const f=["#ff0000","#ff8000","#ffff00","#80ff00","#00ff00","#00ffff","#0080ff","#0000ff","#8000ff","#ff00ff","#ff0080","#ffffff","#cccccc","#888888","#444444","#000000"];let h,g,m=bt(0),b=bt(100),_=bt(50);xe(()=>{if(v(u).startsWith("#")){const[H,J,Q]=w(v(u));et(m,ft(H)),et(b,ft(J)),et(_,ft(Q))}}),xe(()=>{et(u,ft(x(v(m),v(b),v(_))))});function w(H){H=H.replace(/^#/,"");const J=parseInt(H.slice(0,2),16)/255,Q=parseInt(H.slice(2,4),16)/255,ot=parseInt(H.slice(4,6),16)/255,Z=Math.max(J,Q,ot),ct=Math.min(J,Q,ot),wt=(Z+ct)/2;let it=0,xt=0;if(Z!==ct){const yt=Z-ct;switch(xt=wt>.5?yt/(2-Z-ct):yt/(Z+ct),Z){case J:it=((Q-ot)/yt+(Q<ot?6:0))/6;break;case Q:it=((ot-J)/yt+2)/6;break;case ot:it=((J-Q)/yt+4)/6;break}}return[Math.round(it*360),Math.round(xt*100),Math.round(wt*100)]}function x(H,J,Q){H/=360,J/=100,Q/=100;let ot,Z,ct;if(J===0)ot=Z=ct=Q;else{const xt=Q<.5?Q*(1+J):Q+J-Q*J,yt=2*Q-xt;ot=wt(yt,xt,H+1/3),Z=wt(yt,xt,H),ct=wt(yt,xt,H-1/3)}function wt(xt,yt,Nt){return Nt<0&&(Nt+=1),Nt>1&&(Nt-=1),Nt<1/6?xt+(yt-xt)*6*Nt:Nt<1/2?yt:Nt<2/3?xt+(yt-xt)*(2/3-Nt)*6:xt}const it=xt=>{const yt=Math.round(xt*255).toString(16);return yt.length===1?"0"+yt:yt};return`#${it(ot)}${it(Z)}${it(ct)}`}function S(H){if(!h)return;const J=h.getBoundingClientRect(),Q=Math.max(0,Math.min(1,(H.clientX-J.left)/J.width)),ot=Math.max(0,Math.min(1,(H.clientY-J.top)/J.height));if(et(b,ft(Math.round(Q*100))),et(_,ft(Math.round((1-ot)*100))),H.buttons!==1&&H.type!=="mousedown")return;const Z=ct=>S(ct);document.addEventListener("mousemove",Z),document.addEventListener("mouseup",()=>{document.removeEventListener("mousemove",Z)},{once:!0})}function I(H){if(!g)return;const J=g.getBoundingClientRect(),Q=Math.max(0,Math.min(1,(H.clientX-J.left)/J.width));if(et(m,ft(Math.round(Q*360))),H.buttons!==1&&H.type!=="mousedown")return;const ot=Z=>I(Z);document.addEventListener("mousemove",ot),document.addEventListener("mouseup",()=>{document.removeEventListener("mousemove",ot)},{once:!0})}function T(H){et(u,ft(H))}function O(H){et(d,ft(H[0]))}function D(){t.onChange&&t.onChange(v(u),v(d)),et(a,!1)}function L(){et(a,!1)}function M(){function H(Q){if(v(a)&&l){const ot=document.getElementById("color-picker-panel");ot&&!ot.contains(Q.target)&&!l.contains(Q.target)&&et(a,!1)}}document.addEventListener("mousedown",H);const J=()=>G();return window.addEventListener("resize",J),{destroy:()=>{document.removeEventListener("mousedown",H),window.removeEventListener("resize",J)}}}function G(){l&&requestAnimationFrame(()=>{const H=document.getElementById("color-picker-panel");if(!H)return;const J=l.getBoundingClientRect(),Q=window.innerWidth,ot=window.innerHeight,Z=H.offsetWidth,ct=H.offsetHeight;let wt,it;switch(s()){case"top":wt=J.left+J.width/2-Z/2,it=J.top-ct-8;break;case"bottom":wt=J.left+J.width/2-Z/2,it=J.bottom+8;break;case"left":wt=J.left-Z-8,it=J.top;break;case"right":default:wt=J.right+8,it=J.top;break}wt<10&&(wt=10),it<10&&(it=10),wt+Z>Q-10&&(wt=Q-Z-10),it+ct>ot-10&&(it=ot-ct-10),H.style.position="fixed",H.style.left=`${wt}px`,H.style.top=`${it}px`})}c0(()=>{if(v(a))return M().destroy});var q=u4(),lt=rt(q);lt.__click=[s4,a,G],lt.__keydown=[N_,L];var pt=rt(lt);at(pt,()=>t.children),nt(lt),Kn(lt,H=>l=H,()=>l);var z=mt(lt,2);{var $=H=>{var J=X(),Q=W(J);Ot(Q,()=>gl,(ot,Z)=>{Z(ot,{children:(ct,wt)=>{var it=c4();it.__keydown=[N_,L],it.__click=[O_],it.__mousedown=[O_];var xt=rt(it),yt=mt(rt(xt),2);Gn(yt,{variant:"ghost",size:"icon",class:"h-6 w-6",onclick:L,children:(Re,Be)=>{Dp(Re,{class:"h-4 w-4"})},$$slots:{default:!0}}),nt(xt);var Nt=mt(xt,2),kt=rt(Nt),Dt=rt(kt);Dt.__mousedown=S;var ue=rt(Dt);nt(Dt),Kn(Dt,Re=>h=Re,()=>h);var Ut=mt(Dt,2);Ut.__mousedown=I;var Yt=rt(Ut);nt(Ut),Kn(Ut,Re=>g=Re,()=>g);var re=mt(Ut,2),fe=rt(re),ge=mt(fe,2);Fc(ge),ge.__input=[o4,u],nt(re);var Ye=mt(re,2),Vt=rt(Ye),te=mt(rt(Vt),2),pe=rt(te);nt(te),nt(Vt);var ie=mt(Vt,2);const de=N(()=>[v(d)]);QD(ie,{min:0,max:1,step:.01,get value(){return v(de)},onValueChange:O}),nt(Ye);var Fe=mt(Ye,2),Pe=mt(rt(Fe),2);Ti(Pe,21,()=>f,yf,(Re,Be)=>{var Je=l4();Je.__click=[a4,T,Be],St(fn=>{qn(Je,1,fn),_n(Je,`background-color: ${v(Be)}`),He(Je,"title",v(Be))},[()=>ki(ae("h-4 w-4 rounded-sm border",v(u)===v(Be)?"ring-primary ring-1":""))]),P(Re,Je)}),nt(Pe),nt(Fe),nt(kt);var be=mt(kt,2),qe=rt(be);Gn(qe,{size:"sm",variant:"outline",class:"h-7 px-2 py-0 text-xs",onclick:L,children:(Re,Be)=>{we();var Je=ye("Cancel");P(Re,Je)},$$slots:{default:!0}});var Se=mt(qe,2);Gn(Se,{size:"sm",class:"h-7 px-2 py-0 text-xs",onclick:D,children:(Re,Be)=>{we();var Je=ye("Apply");P(Re,Je)},$$slots:{default:!0}}),nt(be),nt(Nt),nt(it),St((Re,Be)=>{qn(it,1,Re),_n(Dt,`background-image: linear-gradient(to top, #000, transparent), linear-gradient(to right, #fff, hsl(${v(m)}, 100%, 50%))`),_n(ue,`left: ${v(b)}%; top: ${100-v(_)}%; background-color: ${v(u)}`),_n(Yt,`left: ${v(m)/360*100}%`),_n(fe,`background-color: ${v(u)}`),KT(ge,v(u)),De(pe,`${Be??""}%`)},[()=>ki(ae("bg-popover text-popover-foreground z-50 w-56 rounded-md border shadow-md",t.class)),()=>Math.round(v(d)*100)]),w0(3,it,()=>nF,()=>({duration:150,y:0,x:0})),P(ct,it)},$$slots:{default:!0}})}),P(H,J)};_t(z,H=>{v(a)&&H($)})}nt(q),P(e,q),gt()}so(["click","keydown","mousedown","input"]);var d4=tt("<div></div>");function f4(e,t){ht(t,!0);const n=k(t,"rootMargin",3,"200px"),i=k(t,"threshold",3,0),s=k(t,"disabled",3,!1);let a=bt(null);xe(()=>{if(!v(a)||s())return;const u=new IntersectionObserver(d=>{d[0].isIntersecting&&t.onIntersect()},{rootMargin:n(),threshold:i()});return u.observe(v(a)),()=>u.disconnect()});var l=d4();Kn(l,u=>et(a,u),()=>v(a)),P(e,l),gt()}function h4(e){if(typeof document>"u")return{r:0,g:0,b:0,a:255};const t=document.createElement("canvas");t.width=1,t.height=1;const n=t.getContext("2d",{willReadFrequently:!0});if(!n)return console.error("Failed to get context for color parsing, returning default black"),{r:0,g:0,b:0,a:255};n.fillStyle=e,n.fillRect(0,0,1,1);try{const i=n.getImageData(0,0,1,1).data;return{r:i[0],g:i[1],b:i[2],a:i[3]}}catch(i){return console.error("Failed to getImageData for color parsing, returning default black:",i),{r:0,g:0,b:0,a:255}}}function g4(e,t,n){const i=e.reduce((S,I)=>S+I,0),s=Math.ceil(i/t);if(t<=0||s<=0||!Number.isFinite(t)||!Number.isFinite(s))return{dataUrl:"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII=",height:0};if(typeof document>"u")throw new Error("Canvas API (document) not available. Ensure tests mock the DOM and Canvas.");const a=document.createElement("canvas");a.width=t,a.height=s;const l=a.getContext("2d",{willReadFrequently:!0});if(!l)throw new Error("Failed to get canvas 2D context. Check canvas support or mocks.");if(typeof l.createImageData!="function"||typeof l.putImageData!="function")throw new Error("Canvas context mock is incomplete. Missing 'createImageData' or 'putImageData'. Please update test environment mocks (e.g., jest-canvas-mock).");let u;try{u=l.createImageData(t,s)}catch(S){throw console.error(`Error calling ctx.createImageData(${t}, ${s}). Check mock implementation.`,S),S}const d=u.data,f=d.length,{r:h,g,b:m,a:b}=h4(n);let _=0,w=0;e.forEach((S,I)=>{if(S===0)return;if(I%2!==0){const O=_+S;for(;_<O;){const D=Math.floor(_/t),L=_%t;w=(D*t+L)*4,w>=0&&w<f-3&&(d[w]=h,d[w+1]=g,d[w+2]=m,d[w+3]=b),_++}}else _+=S}),l.putImageData(u,0,0);let x="";try{x=a.toDataURL()}catch(S){console.error("Error calling canvas.toDataURL(). Check mock implementation.",S),x="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII="}return{dataUrl:x,height:s}}var p4=cl('<image x="0" y="0"></image>');function v4(e,t){ht(t,!0);const n=k(t,"colorFill",3,"rgba(255, 0, 0, 0.2)"),i=k(t,"opacity",3,.4);if(!t.segmentation)throw new Error("Segmentation data is required");const s=N(()=>{const d=n().replace(/rgba?\((\d+,\s*\d+,\s*\d+)(?:,\s*[\d.]+)?\)/,"rgb($1)");return g4(t.segmentation,t.width,d)}),a=N(()=>v(s).dataUrl),l=N(()=>v(s).height);var u=p4();St(()=>{He(u,"href",v(a)),He(u,"width",t.width),He(u,"height",v(l)),He(u,"opacity",i())}),P(e,u),gt()}const m4=({datasetId:e,annotationId:t,onUpdate:n})=>{const i=MT({path:{annotation_id:t,dataset_id:e}}),s=ap(),{updateAnnotations:a}=T0({datasetId:e}),l=d0(i);return{updateAnnotation:async d=>{try{await a([d]),s.invalidateQueries({queryKey:i.queryKey}),s.invalidateQueries({queryKey:f0().queryKey}),s.invalidateQueries({queryKey:LT({path:{dataset_id:e}}).queryKey}),Bc.success("Annotation updated successfully"),n==null||n()}catch(f){Bc.error("Failed to update annotation:"+f.message)}},annotation:l}};var b4=tt('<button type="button"><span class="flex flex-1 flex-col gap-1"><span class="text-sm font-medium" data-testid="sample-details-pannel-annotation-name"><!></span> <span class="text-xs text-muted-foreground"> <!></span></span> <!></button>');function q6(e,t){ht(t,!0);const[n,i]=rs(),s=()=>Ke(g,"$result",n),a=()=>Ke(f,"$isEditingMode",n),l=k(t,"isSelected",3,!1),u=z=>{switch(z){case"object_detection":return"Object Detection";case"instance_segmentation":return"Instance Segmentation";case"semantic_segmentation":return"Semantic Segmentation";case"classification":return"Image Classification";default:return z}},d=z=>{const $=z.object_detection_details||z.instance_segmentation_details;if($){const{width:H,height:J}=$;return`${Math.round(H)}x${Math.round(J)}px`}return""},{isEditingMode:f}=no.data.globalStorage,{datasetId:h}=no.data,g=py(),m=N(()=>my(s().data||[])),b=N(()=>{const z=t.annotation.annotation_label.annotation_label_name,$=v(m).find(H=>H.value===z);return $||{value:z,label:z}}),_=N(()=>t.annotation.annotation_id),w=N(()=>m4({datasetId:h,annotationId:v(_),onUpdate:t.onUpdate})),x=N(()=>v(w).updateAnnotation);var S=b4();S.__click=function(...z){var $;($=t.onClick)==null||$.apply(this,z)};var I=rt(S),T=rt(I),O=rt(T);{var D=z=>{gy(z,{get items(){return v(m)},get value(){return v(b)},name:"annotation-label",placeholder:"Select a label",onSelect:H=>{v(x)({annotation_id:v(_),dataset_id:h,label_name:H.value})},notFound:(H,J)=>{let Q=()=>J==null?void 0:J().inputValue;vy(H,{get label(){return Q()}})},$$slots:{notFound:!0}})},L=z=>{var $=ye();St(()=>De($,t.annotation.annotation_label.annotation_label_name)),P(z,$)};_t(O,z=>{a()?z(D):z(L,!1)})}nt(T);var M=mt(T,2),G=rt(M),q=mt(G);{var lt=z=>{var $=ye();St(H=>De($,`(${H??""})`),[()=>d(t.annotation)]),P(z,$)};_t(q,z=>{d(t.annotation)&&z(lt)})}nt(M),nt(I);var pt=mt(I,2);AF(pt,{class:"size-6 transition-all hover:size-7",get onclick(){return t.onClickCenterIcon}}),nt(S),St((z,$)=>{qn(S,1,z),De(G,`${$??""} `)},[()=>ki(ae("flex w-full items-start justify-between gap-2 rounded-sm px-4 py-3 text-left align-baseline transition-colors",l()?"border border-accent-foreground/20 bg-accent":"bg-card hover:bg-accent/50")),()=>u(t.annotation.annotation_type)]),P(e,S),gt(),i()}so(["click"]);var _4=tt('<span class="loading-bubbles svelte-10h86fq"><span class="bubble-item svelte-10h86fq"></span> <span class="bubble-item svelte-10h86fq"></span> <span class="bubble-item svelte-10h86fq"></span> <span class="bubble-item svelte-10h86fq"></span> <span class="bubble-item svelte-10h86fq"></span> <span class="bubble-item svelte-10h86fq"></span> <span class="bubble-item svelte-10h86fq"></span> <span class="bubble-item svelte-10h86fq"></span></span>'),w4=tt('<span class="loading-circles svelte-10h86fq"><span class="circle-item svelte-10h86fq"></span> <span class="circle-item svelte-10h86fq"></span> <span class="circle-item svelte-10h86fq"></span> <span class="circle-item svelte-10h86fq"></span> <span class="circle-item svelte-10h86fq"></span> <span class="circle-item svelte-10h86fq"></span> <span class="circle-item svelte-10h86fq"></span> <span class="circle-item svelte-10h86fq"></span></span>'),y4=tt('<i class="loading-spiral svelte-10h86fq"></i>'),x4=tt('<span class="loading-wave-dots svelte-10h86fq"><span class="wave-item svelte-10h86fq"></span> <span class="wave-item svelte-10h86fq"></span> <span class="wave-item svelte-10h86fq"></span> <span class="wave-item svelte-10h86fq"></span> <span class="wave-item svelte-10h86fq"></span></span>'),S4=tt('<i class="loading-default svelte-10h86fq"></i>');function A4(e,t){let n=k(t,"spinner",8,"");var i=X(),s=W(i);{var a=u=>{var d=_4();P(u,d)},l=(u,d)=>{{var f=g=>{var m=w4();P(g,m)},h=(g,m)=>{{var b=w=>{var x=y4();P(w,x)},_=(w,x)=>{{var S=T=>{var O=x4();P(T,O)},I=T=>{var O=S4();P(T,O)};_t(w,T=>{n()==="wavedots"?T(S):T(I,!1)},x)}};_t(g,w=>{n()==="spiral"?w(b):w(_,!1)},m)}};_t(u,g=>{n()==="circles"?g(f):g(h,!1)},d)}};_t(s,u=>{n()==="bubbles"?u(a):u(l,!1)})}P(e,i)}const C4=50,P4=1e3,Ay=10,E4=[`executed the callback function more than ${Ay} times for a short time, it looks like searched a wrong scroll wrapper that doest not has fixed height or maximum height, please check it. If you want to force to set a element as scroll wrapper rather than automatic searching, you can do this:`,"<!-- add a special attribute for the real scroll wrapper (can also be data-infinite-wrapper) -->","<div infinite-wrapper>"," ..."," <!-- set forceUseInfiniteWrapper -->"," <InfiniteLoading forceUseInfiniteWrapper>","</div>","or",'<div class="infinite-wrapper">'," ..."," <!-- set forceUseInfiniteWrapper as css selector of the real scroll wrapper -->",' <InfiniteLoading forceUseInfiniteWrapper=".infinite-wrapper" />',"</div>"].join(`
93
- `),mc=(()=>{let e=!1;try{const t=Object.defineProperty({},"passive",{get(){return e={passive:!0},!0}});window.addEventListener("testPassive",null,t),window.removeEventListener("testPassive",null,t)}catch{}return e})(),bc={timers:[],caches:[],throttle(e){this.caches.indexOf(e)===-1&&(this.caches.push(e),this.timers.push(setTimeout(()=>{e(),this.caches.splice(this.caches.indexOf(e),1),this.timers.shift()},C4)))},reset(){this.timers.forEach(e=>{clearTimeout(e)}),this.timers.length=0,this.caches=[]}},R_={isChecked:!1,timer:null,times:0,track(){this.times+=1,clearTimeout(this.timer),this.timer=setTimeout(()=>{this.isChecked=!0},P4),this.times>Ay&&(console.error(E4),this.isChecked=!0)}},_c={key:"_infiniteScrollHeight",getScrollElement(e){return e===window?document.documentElement:e},save(e){const t=this.getScrollElement(e);t[this.key]=t.scrollHeight},restore(e){const t=this.getScrollElement(e);typeof t[this.key]=="number"&&(t.scrollTop=t.scrollHeight-t[this.key]+t.scrollTop),this.remove(t)},remove(e){e[this.key]!==void 0&&delete e[this.key]}};function M_(e){return e&&e.offsetWidth+e.offsetHeight>0}var T4=tt('<div class="infinite-status-prompt"><!></div>'),k4=tt('<div class="infinite-status-prompt"><!></div>'),I4=tt('<div class="infinite-status-prompt"><!></div>'),O4=tt('Oops, something went wrong :( <br> <button class="btn-try-infinite svelte-o3w4bf">Retry</button>',1),N4=tt('<div class="infinite-status-prompt"><!></div>'),R4=tt('<div class="infinite-loading-container svelte-o3w4bf"><!> <!> <!> <!></div>');function Y6(e,t){ht(t,!1);const n=ui(),i=ui(),s=ui(),a=ui(),l=DT(),u={READY:0,LOADING:1,COMPLETE:2,ERROR:3};let d=k(t,"distance",8,100),f=k(t,"spinner",8,"default"),h=k(t,"direction",8,"bottom"),g=k(t,"forceUseInfiniteWrapper",8,!1),m=k(t,"identifier",24,()=>+new Date),b=ui(!0),_=ui(u.READY),w=ui(!1),x=ui(),S;const I={loaded:async()=>{et(b,!1),h()==="top"&&(await qi(),_c.restore(S)),v(_)===u.LOADING&&(await qi(),await O(!0))},complete:async()=>{et(_,u.COMPLETE),await qi(),S.removeEventListener("scroll",T,mc)},reset:()=>{et(_,u.READY),et(b,!0),_c.remove(S),S.addEventListener("scroll",T,mc),setTimeout(()=>{bc.reset(),T()},1)},error:()=>{et(_,u.ERROR),bc.reset()}};function T(Z){v(_)===u.READY&&(Z&&Z.constructor===Event&&M_(v(x))?bc.throttle(O):O())}async function O(Z){v(_)!==u.COMPLETE&&M_(v(x))&&D()<=d()?(et(_,u.LOADING),h()==="top"&&(await qi(),_c.save(S)),l("infinite",I),Z&&!g()&&!R_.isChecked&&R_.track()):v(_)===u.LOADING&&et(_,u.READY)}function D(){let Z;if(h()==="top")Z=typeof S.scrollTop=="number"?S.scrollTop:S.pageYOffset;else{const ct=v(x).getBoundingClientRect().top,wt=S===window?window.innerHeight:S.getBoundingClientRect().bottom;Z=ct-wt}return Z}function L(Z=v(x)){let ct;return typeof g()=="string"&&(ct=document.querySelector(g())),ct||(Z.tagName==="BODY"?ct=window:(!g()&&["scroll","auto"].indexOf(getComputedStyle(Z).overflowY)>-1||Z.hasAttribute("infinite-wrapper")||Z.hasAttribute("data-infinite-wrapper"))&&(ct=Z)),ct||L(Z.parentNode)}function M(){v(w)&&(S=L())}function G(){v(w)&&I.reset()}wf(async()=>{et(w,!0),setTimeout(()=>{T(),S.addEventListener("scroll",T,mc)},1)}),FT(()=>{v(w)&&v(_)!==u.COMPLETE&&(bc.reset(),_c.remove(S),S.removeEventListener("scroll",T,mc))}),Co(()=>v(_),()=>{et(n,v(_)===u.LOADING)}),Co(()=>v(_),()=>{et(i,v(_)===u.ERROR)}),Co(()=>(v(_),v(b)),()=>{et(s,v(_)===u.COMPLETE&&v(b))}),Co(()=>(v(_),v(b)),()=>{et(a,v(_)===u.COMPLETE&&!v(b))}),Co(()=>(Cb(g()),v(w)),()=>{g(),v(w),M()}),Co(()=>(Cb(m()),v(w)),()=>{m(),v(w),G()}),iT(),_f();var q=R4(),lt=rt(q);{var pt=Z=>{var ct=T4(),wt=rt(ct);cc(wt,t,"spinner",{get isFirstLoad(){return v(b)}},it=>{A4(it,{get spinner(){return f()}})}),nt(ct),P(Z,ct)};_t(lt,Z=>{v(n)&&Z(pt)})}var z=mt(lt,2);{var $=Z=>{var ct=k4(),wt=rt(ct);cc(wt,t,"noResults",{},it=>{var xt=ye("No results :(");P(it,xt)}),nt(ct),P(Z,ct)};_t(z,Z=>{v(s)&&Z($)})}var H=mt(z,2);{var J=Z=>{var ct=I4(),wt=rt(ct);cc(wt,t,"noMore",{},it=>{var xt=ye("No more data :)");P(it,xt)}),nt(ct),P(Z,ct)};_t(H,Z=>{v(a)&&Z(J)})}var Q=mt(H,2);{var ot=Z=>{var ct=N4(),wt=rt(ct);cc(wt,t,"error",{attemptLoad:O},it=>{var xt=O4(),yt=mt(W(xt),3);mg("click",yt,O),P(it,xt)}),nt(ct),P(Z,ct)};_t(Q,Z=>{v(i)&&Z(ot)})}nt(q),Kn(q,Z=>et(x,Z),()=>v(x)),P(e,q),gt()}function M4(e,t){const n=k(t,"isSelected",3,!1);Sy(e,{get checked(){return n()},get onCheckedChange(){return t.onSelect},"data-testid":"sample-selected-box"})}var L4=tt('<div class="flex items-center justify-between space-x-2 py-1"><!> <div class="flex space-x-2"><!> <!> <!></div></div>'),D4=tt("<p>No classifiers loaded.</p>"),F4=tt('<span class="mr-2 animate-spin">⏳</span> Running...',1),B4=tt('<div class="mb-3 w-full space-y-2"><!> <div class="flex space-x-1"><!> <div class="relative"><input title="Load Classifier" type="file" accept=".pkl" class="absolute inset-0 h-full w-full cursor-pointer opacity-0"> <!></div></div></div>'),V4=tt("<!> <!>",1),W4=tt("<!> <!>",1),z4=tt('<!> <div class="grid gap-4 py-4"><!> <!></div>',1),H4=tt("<!> <!>",1);function X6(e,t){ht(t,!1);const[n,i]=rs(),s=()=>Ke(_,"$classifiers",n),a=()=>Ke(w,"$classifiersSelected",n),l=()=>Ke(b,"$error",n),u=()=>Ke(x,"$isLoading",n),d=()=>Ke(M,"$showExportDialog",n),f=()=>Ke(L,"$exportType",n),h=()=>Ke(lt,"$triggerContent",n),g=["sklearn","lightly"];let m=no.params.dataset_id;const{error:b,classifiers:_,classifiersSelected:w,isLoading:x,classifierSelectionToggle:S,apply:I,saveClassifier:T,loadClassifier:O,startRefinment:D}=HF(),L=Ce("sklearn"),M=Ce(!1),G=Ce(null),q=Ei([w,_],([Q,ot])=>Q.size>0&&ot.length>0),lt=Ei(L,Q=>Q||"Select export type");function pt(Q){G.set(Q),M.set(!0)}function z(){const Q=Te(G),ot=Te(L);Q&&(T(Q,ot),M.set(!1),G.set(null))}_f();var $=H4(),H=W($);_y(H,{title:"Classifiers",icon:xF,children:(Q,ot)=>{var Z=B4(),ct=rt(Z);Ti(ct,1,s,kt=>kt.classifier_id,(kt,Dt)=>{var ue=L4(),Ut=rt(ue);const Yt=nn(()=>a().has(v(Dt).classifier_id));FF(Ut,{get name(){return v(Dt).classifier_id},get isChecked(){return v(Yt)},get label(){return v(Dt).classifier_name},onCheckedChange:()=>S(v(Dt).classifier_id)});var re=mt(Ut,2),fe=rt(re);{var ge=te=>{nk(te,{title:"Error occured",children:(pe,ie)=>{we();var de=ye();St(()=>De(de,l())),P(pe,de)}})};_t(fe,te=>{l()&&te(ge)})}var Ye=mt(fe,2);Gn(Ye,{variant:"outline",size:"sm",title:"Edit",onclick:()=>D("existing",v(Dt).classifier_id,v(Dt).classifier_name,v(Dt).class_list,m),children:(te,pe)=>{SF(te,{})},$$slots:{default:!0}});var Vt=mt(Ye,2);Gn(Vt,{variant:"outline",size:"sm",title:"Download classifier",onclick:()=>pt(v(Dt).classifier_id),children:(te,pe)=>{wF(te,{})},$$slots:{default:!0}}),nt(re),nt(ue),P(kt,ue)},kt=>{var Dt=D4();P(kt,Dt)});var wt=mt(ct,2),it=rt(wt);Gn(it,{variant:"outline",class:"flex-1",disabled:!q,onclick:I,children:(kt,Dt)=>{var ue=X(),Ut=W(ue);{var Yt=fe=>{var ge=F4();we(),P(fe,ge)},re=fe=>{var ge=ye("Run Classifiers");P(fe,ge)};_t(Ut,fe=>{u()?fe(Yt):fe(re,!1)})}P(kt,ue)},$$slots:{default:!0}});var xt=mt(it,2),yt=rt(xt);yt.__change=O;var Nt=mt(yt,2);Gn(Nt,{variant:"outline",size:"sm",children:(kt,Dt)=>{yF(kt,{})},$$slots:{default:!0}}),nt(xt),nt(wt),nt(Z),P(Q,Z)}});var J=mt(H,2);ey(J,{get open(){return Tb(),d()},set open(Q){Eb(M,Q)},children:(Q,ot)=>{ty(Q,{children:(Z,ct)=>{var wt=z4(),it=W(wt);jw(it,{children:(kt,Dt)=>{Qw(kt,{children:(ue,Ut)=>{we();var Yt=ye("Export Classifier");P(ue,Yt)},$$slots:{default:!0}})},$$slots:{default:!0}});var xt=mt(it,2),yt=rt(xt);dF(yt,{label:"Select the export type for the classifier.",children:(kt,Dt)=>{xy(kt,{type:"single",name:"exportType",get value(){return Tb(),f()},set value(ue){Eb(L,ue)},children:(ue,Ut)=>{var Yt=W4(),re=W(Yt);yy(re,{class:"w-full",children:(ge,Ye)=>{we();var Vt=ye();St(()=>De(Vt,h())),P(ge,Vt)},$$slots:{default:!0}});var fe=mt(re,2);wy(fe,{children:(ge,Ye)=>{_F(ge,{children:(Vt,te)=>{var pe=V4(),ie=W(pe);fF(ie,{children:(Fe,Pe)=>{we();var be=ye("Export Types");P(Fe,be)},$$slots:{default:!0}});var de=mt(ie,2);Ti(de,1,()=>g,Fe=>Fe,(Fe,Pe)=>{Yg(Fe,{get value(){return v(Pe)},get label(){return v(Pe)},children:(be,qe)=>{we();var Se=ye();St(()=>De(Se,v(Pe))),P(be,Se)},$$slots:{default:!0}})}),P(Vt,pe)},$$slots:{default:!0}})},$$slots:{default:!0}}),P(ue,Yt)},$$slots:{default:!0},$$legacy:!0})}});var Nt=mt(yt,2);Gn(Nt,{class:"flex-1",onclick:()=>z(),children:(kt,Dt)=>{we();var ue=ye("Export");P(kt,ue)},$$slots:{default:!0}}),nt(xt),P(Z,wt)},$$slots:{default:!0}})},$$slots:{default:!0},$$legacy:!0}),P(e,$),gt(),i()}so(["change"]);var Xg="http://www.w3.org/1999/xhtml";const L_={svg:"http://www.w3.org/2000/svg",xhtml:Xg,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Ef(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),L_.hasOwnProperty(t)?{space:L_[t],local:e}:e}function U4(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===Xg&&t.documentElement.namespaceURI===Xg?t.createElement(e):t.createElementNS(n,e)}}function G4(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function Cy(e){var t=Ef(e);return(t.local?G4:U4)(t)}function K4(){}function Wp(e){return e==null?K4:function(){return this.querySelector(e)}}function q4(e){typeof e!="function"&&(e=Wp(e));for(var t=this._groups,n=t.length,i=new Array(n),s=0;s<n;++s)for(var a=t[s],l=a.length,u=i[s]=new Array(l),d,f,h=0;h<l;++h)(d=a[h])&&(f=e.call(d,d.__data__,h,a))&&("__data__"in d&&(f.__data__=d.__data__),u[h]=f);return new rr(i,this._parents)}function Y4(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function X4(){return[]}function Py(e){return e==null?X4:function(){return this.querySelectorAll(e)}}function Z4(e){return function(){return Y4(e.apply(this,arguments))}}function J4(e){typeof e=="function"?e=Z4(e):e=Py(e);for(var t=this._groups,n=t.length,i=[],s=[],a=0;a<n;++a)for(var l=t[a],u=l.length,d,f=0;f<u;++f)(d=l[f])&&(i.push(e.call(d,d.__data__,f,l)),s.push(d));return new rr(i,s)}function Ey(e){return function(){return this.matches(e)}}function Ty(e){return function(t){return t.matches(e)}}var Q4=Array.prototype.find;function j4(e){return function(){return Q4.call(this.children,e)}}function $4(){return this.firstElementChild}function tB(e){return this.select(e==null?$4:j4(typeof e=="function"?e:Ty(e)))}var eB=Array.prototype.filter;function nB(){return Array.from(this.children)}function rB(e){return function(){return eB.call(this.children,e)}}function iB(e){return this.selectAll(e==null?nB:rB(typeof e=="function"?e:Ty(e)))}function oB(e){typeof e!="function"&&(e=Ey(e));for(var t=this._groups,n=t.length,i=new Array(n),s=0;s<n;++s)for(var a=t[s],l=a.length,u=i[s]=[],d,f=0;f<l;++f)(d=a[f])&&e.call(d,d.__data__,f,a)&&u.push(d);return new rr(i,this._parents)}function ky(e){return new Array(e.length)}function sB(){return new rr(this._enter||this._groups.map(ky),this._parents)}function Xc(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}Xc.prototype={constructor:Xc,appendChild:function(e){return this._parent.insertBefore(e,this._next)},insertBefore:function(e,t){return this._parent.insertBefore(e,t)},querySelector:function(e){return this._parent.querySelector(e)},querySelectorAll:function(e){return this._parent.querySelectorAll(e)}};function aB(e){return function(){return e}}function lB(e,t,n,i,s,a){for(var l=0,u,d=t.length,f=a.length;l<f;++l)(u=t[l])?(u.__data__=a[l],i[l]=u):n[l]=new Xc(e,a[l]);for(;l<d;++l)(u=t[l])&&(s[l]=u)}function cB(e,t,n,i,s,a,l){var u,d,f=new Map,h=t.length,g=a.length,m=new Array(h),b;for(u=0;u<h;++u)(d=t[u])&&(m[u]=b=l.call(d,d.__data__,u,t)+"",f.has(b)?s[u]=d:f.set(b,d));for(u=0;u<g;++u)b=l.call(e,a[u],u,a)+"",(d=f.get(b))?(i[u]=d,d.__data__=a[u],f.delete(b)):n[u]=new Xc(e,a[u]);for(u=0;u<h;++u)(d=t[u])&&f.get(m[u])===d&&(s[u]=d)}function uB(e){return e.__data__}function dB(e,t){if(!arguments.length)return Array.from(this,uB);var n=t?cB:lB,i=this._parents,s=this._groups;typeof e!="function"&&(e=aB(e));for(var a=s.length,l=new Array(a),u=new Array(a),d=new Array(a),f=0;f<a;++f){var h=i[f],g=s[f],m=g.length,b=fB(e.call(h,h&&h.__data__,f,i)),_=b.length,w=u[f]=new Array(_),x=l[f]=new Array(_),S=d[f]=new Array(m);n(h,g,w,x,S,b,t);for(var I=0,T=0,O,D;I<_;++I)if(O=w[I]){for(I>=T&&(T=I+1);!(D=x[T])&&++T<_;);O._next=D||null}}return l=new rr(l,i),l._enter=u,l._exit=d,l}function fB(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function hB(){return new rr(this._exit||this._groups.map(ky),this._parents)}function gB(e,t,n){var i=this.enter(),s=this,a=this.exit();return typeof e=="function"?(i=e(i),i&&(i=i.selection())):i=i.append(e+""),t!=null&&(s=t(s),s&&(s=s.selection())),n==null?a.remove():n(a),i&&s?i.merge(s).order():s}function pB(e){for(var t=e.selection?e.selection():e,n=this._groups,i=t._groups,s=n.length,a=i.length,l=Math.min(s,a),u=new Array(s),d=0;d<l;++d)for(var f=n[d],h=i[d],g=f.length,m=u[d]=new Array(g),b,_=0;_<g;++_)(b=f[_]||h[_])&&(m[_]=b);for(;d<s;++d)u[d]=n[d];return new rr(u,this._parents)}function vB(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var i=e[t],s=i.length-1,a=i[s],l;--s>=0;)(l=i[s])&&(a&&l.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(l,a),a=l);return this}function mB(e){e||(e=bB);function t(g,m){return g&&m?e(g.__data__,m.__data__):!g-!m}for(var n=this._groups,i=n.length,s=new Array(i),a=0;a<i;++a){for(var l=n[a],u=l.length,d=s[a]=new Array(u),f,h=0;h<u;++h)(f=l[h])&&(d[h]=f);d.sort(t)}return new rr(s,this._parents).order()}function bB(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function _B(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function wB(){return Array.from(this)}function yB(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var i=e[t],s=0,a=i.length;s<a;++s){var l=i[s];if(l)return l}return null}function xB(){let e=0;for(const t of this)++e;return e}function SB(){return!this.node()}function AB(e){for(var t=this._groups,n=0,i=t.length;n<i;++n)for(var s=t[n],a=0,l=s.length,u;a<l;++a)(u=s[a])&&e.call(u,u.__data__,a,s);return this}function CB(e){return function(){this.removeAttribute(e)}}function PB(e){return function(){this.removeAttributeNS(e.space,e.local)}}function EB(e,t){return function(){this.setAttribute(e,t)}}function TB(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function kB(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function IB(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}}function OB(e,t){var n=Ef(e);if(arguments.length<2){var i=this.node();return n.local?i.getAttributeNS(n.space,n.local):i.getAttribute(n)}return this.each((t==null?n.local?PB:CB:typeof t=="function"?n.local?IB:kB:n.local?TB:EB)(n,t))}function Iy(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function NB(e){return function(){this.style.removeProperty(e)}}function RB(e,t,n){return function(){this.style.setProperty(e,t,n)}}function MB(e,t,n){return function(){var i=t.apply(this,arguments);i==null?this.style.removeProperty(e):this.style.setProperty(e,i,n)}}function LB(e,t,n){return arguments.length>1?this.each((t==null?NB:typeof t=="function"?MB:RB)(e,t,n??"")):ts(this.node(),e)}function ts(e,t){return e.style.getPropertyValue(t)||Iy(e).getComputedStyle(e,null).getPropertyValue(t)}function DB(e){return function(){delete this[e]}}function FB(e,t){return function(){this[e]=t}}function BB(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function VB(e,t){return arguments.length>1?this.each((t==null?DB:typeof t=="function"?BB:FB)(e,t)):this.node()[e]}function Oy(e){return e.trim().split(/^|\s+/)}function zp(e){return e.classList||new Ny(e)}function Ny(e){this._node=e,this._names=Oy(e.getAttribute("class")||"")}Ny.prototype={add:function(e){var t=this._names.indexOf(e);t<0&&(this._names.push(e),this._node.setAttribute("class",this._names.join(" ")))},remove:function(e){var t=this._names.indexOf(e);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(e){return this._names.indexOf(e)>=0}};function Ry(e,t){for(var n=zp(e),i=-1,s=t.length;++i<s;)n.add(t[i])}function My(e,t){for(var n=zp(e),i=-1,s=t.length;++i<s;)n.remove(t[i])}function WB(e){return function(){Ry(this,e)}}function zB(e){return function(){My(this,e)}}function HB(e,t){return function(){(t.apply(this,arguments)?Ry:My)(this,e)}}function UB(e,t){var n=Oy(e+"");if(arguments.length<2){for(var i=zp(this.node()),s=-1,a=n.length;++s<a;)if(!i.contains(n[s]))return!1;return!0}return this.each((typeof t=="function"?HB:t?WB:zB)(n,t))}function GB(){this.textContent=""}function KB(e){return function(){this.textContent=e}}function qB(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function YB(e){return arguments.length?this.each(e==null?GB:(typeof e=="function"?qB:KB)(e)):this.node().textContent}function XB(){this.innerHTML=""}function ZB(e){return function(){this.innerHTML=e}}function JB(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function QB(e){return arguments.length?this.each(e==null?XB:(typeof e=="function"?JB:ZB)(e)):this.node().innerHTML}function jB(){this.nextSibling&&this.parentNode.appendChild(this)}function $B(){return this.each(jB)}function t8(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function e8(){return this.each(t8)}function n8(e){var t=typeof e=="function"?e:Cy(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function r8(){return null}function i8(e,t){var n=typeof e=="function"?e:Cy(e),i=t==null?r8:typeof t=="function"?t:Wp(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),i.apply(this,arguments)||null)})}function o8(){var e=this.parentNode;e&&e.removeChild(this)}function s8(){return this.each(o8)}function a8(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function l8(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function c8(e){return this.select(e?l8:a8)}function u8(e){return arguments.length?this.property("__data__",e):this.node().__data__}function d8(e){return function(t){e.call(this,t,this.__data__)}}function f8(e){return e.trim().split(/^|\s+/).map(function(t){var n="",i=t.indexOf(".");return i>=0&&(n=t.slice(i+1),t=t.slice(0,i)),{type:t,name:n}})}function h8(e){return function(){var t=this.__on;if(t){for(var n=0,i=-1,s=t.length,a;n<s;++n)a=t[n],(!e.type||a.type===e.type)&&a.name===e.name?this.removeEventListener(a.type,a.listener,a.options):t[++i]=a;++i?t.length=i:delete this.__on}}}function g8(e,t,n){return function(){var i=this.__on,s,a=d8(t);if(i){for(var l=0,u=i.length;l<u;++l)if((s=i[l]).type===e.type&&s.name===e.name){this.removeEventListener(s.type,s.listener,s.options),this.addEventListener(s.type,s.listener=a,s.options=n),s.value=t;return}}this.addEventListener(e.type,a,n),s={type:e.type,name:e.name,value:t,listener:a,options:n},i?i.push(s):this.__on=[s]}}function p8(e,t,n){var i=f8(e+""),s,a=i.length,l;if(arguments.length<2){var u=this.node().__on;if(u){for(var d=0,f=u.length,h;d<f;++d)for(s=0,h=u[d];s<a;++s)if((l=i[s]).type===h.type&&l.name===h.name)return h.value}return}for(u=t?g8:h8,s=0;s<a;++s)this.each(u(i[s],t,n));return this}function Ly(e,t,n){var i=Iy(e),s=i.CustomEvent;typeof s=="function"?s=new s(t,n):(s=i.document.createEvent("Event"),n?(s.initEvent(t,n.bubbles,n.cancelable),s.detail=n.detail):s.initEvent(t,!1,!1)),e.dispatchEvent(s)}function v8(e,t){return function(){return Ly(this,e,t)}}function m8(e,t){return function(){return Ly(this,e,t.apply(this,arguments))}}function b8(e,t){return this.each((typeof t=="function"?m8:v8)(e,t))}function*_8(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var i=e[t],s=0,a=i.length,l;s<a;++s)(l=i[s])&&(yield l)}var w8=[null];function rr(e,t){this._groups=e,this._parents=t}function ml(){return new rr([[document.documentElement]],w8)}function y8(){return this}rr.prototype=ml.prototype={constructor:rr,select:q4,selectAll:J4,selectChild:tB,selectChildren:iB,filter:oB,data:dB,enter:sB,exit:hB,join:gB,merge:pB,selection:y8,order:vB,sort:mB,call:_B,nodes:wB,node:yB,size:xB,empty:SB,each:AB,attr:OB,style:LB,property:VB,classed:UB,text:YB,html:QB,raise:$B,lower:e8,append:n8,insert:i8,remove:s8,clone:c8,datum:u8,on:p8,dispatch:b8,[Symbol.iterator]:_8};var x8={value:()=>{}};function Dy(){for(var e=0,t=arguments.length,n={},i;e<t;++e){if(!(i=arguments[e]+"")||i in n||/[\s.]/.test(i))throw new Error("illegal type: "+i);n[i]=[]}return new Nc(n)}function Nc(e){this._=e}function S8(e,t){return e.trim().split(/^|\s+/).map(function(n){var i="",s=n.indexOf(".");if(s>=0&&(i=n.slice(s+1),n=n.slice(0,s)),n&&!t.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:i}})}Nc.prototype=Dy.prototype={constructor:Nc,on:function(e,t){var n=this._,i=S8(e+"",n),s,a=-1,l=i.length;if(arguments.length<2){for(;++a<l;)if((s=(e=i[a]).type)&&(s=A8(n[s],e.name)))return s;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++a<l;)if(s=(e=i[a]).type)n[s]=D_(n[s],e.name,t);else if(t==null)for(s in n)n[s]=D_(n[s],e.name,null);return this},copy:function(){var e={},t=this._;for(var n in t)e[n]=t[n].slice();return new Nc(e)},call:function(e,t){if((s=arguments.length-2)>0)for(var n=new Array(s),i=0,s,a;i<s;++i)n[i]=arguments[i+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(a=this._[e],i=0,s=a.length;i<s;++i)a[i].value.apply(t,n)},apply:function(e,t,n){if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(var i=this._[e],s=0,a=i.length;s<a;++s)i[s].value.apply(t,n)}};function A8(e,t){for(var n=0,i=e.length,s;n<i;++n)if((s=e[n]).name===t)return s.value}function D_(e,t,n){for(var i=0,s=e.length;i<s;++i)if(e[i].name===t){e[i]=x8,e=e.slice(0,i).concat(e.slice(i+1));break}return n!=null&&e.push({name:t,value:n}),e}function Hp(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function Fy(e,t){var n=Object.create(e.prototype);for(var i in t)n[i]=t[i];return n}function bl(){}var Zs=.7,Zc=1/Zs,Fo="\\s*([+-]?\\d+)\\s*",Js="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",mr="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",C8=/^#([0-9a-f]{3,8})$/,P8=new RegExp(`^rgb\\(${Fo},${Fo},${Fo}\\)$`),E8=new RegExp(`^rgb\\(${mr},${mr},${mr}\\)$`),T8=new RegExp(`^rgba\\(${Fo},${Fo},${Fo},${Js}\\)$`),k8=new RegExp(`^rgba\\(${mr},${mr},${mr},${Js}\\)$`),I8=new RegExp(`^hsl\\(${Js},${mr},${mr}\\)$`),O8=new RegExp(`^hsla\\(${Js},${mr},${mr},${Js}\\)$`),F_={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};Hp(bl,Qs,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:B_,formatHex:B_,formatHex8:N8,formatHsl:R8,formatRgb:V_,toString:V_});function B_(){return this.rgb().formatHex()}function N8(){return this.rgb().formatHex8()}function R8(){return By(this).formatHsl()}function V_(){return this.rgb().formatRgb()}function Qs(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=C8.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?W_(t):n===3?new wn(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?wc(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?wc(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=P8.exec(e))?new wn(t[1],t[2],t[3],1):(t=E8.exec(e))?new wn(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=T8.exec(e))?wc(t[1],t[2],t[3],t[4]):(t=k8.exec(e))?wc(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=I8.exec(e))?U_(t[1],t[2]/100,t[3]/100,1):(t=O8.exec(e))?U_(t[1],t[2]/100,t[3]/100,t[4]):F_.hasOwnProperty(e)?W_(F_[e]):e==="transparent"?new wn(NaN,NaN,NaN,0):null}function W_(e){return new wn(e>>16&255,e>>8&255,e&255,1)}function wc(e,t,n,i){return i<=0&&(e=t=n=NaN),new wn(e,t,n,i)}function M8(e){return e instanceof bl||(e=Qs(e)),e?(e=e.rgb(),new wn(e.r,e.g,e.b,e.opacity)):new wn}function Zg(e,t,n,i){return arguments.length===1?M8(e):new wn(e,t,n,i??1)}function wn(e,t,n,i){this.r=+e,this.g=+t,this.b=+n,this.opacity=+i}Hp(wn,Zg,Fy(bl,{brighter(e){return e=e==null?Zc:Math.pow(Zc,e),new wn(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Zs:Math.pow(Zs,e),new wn(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new wn(eo(this.r),eo(this.g),eo(this.b),Jc(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:z_,formatHex:z_,formatHex8:L8,formatRgb:H_,toString:H_}));function z_(){return`#${Yi(this.r)}${Yi(this.g)}${Yi(this.b)}`}function L8(){return`#${Yi(this.r)}${Yi(this.g)}${Yi(this.b)}${Yi((isNaN(this.opacity)?1:this.opacity)*255)}`}function H_(){const e=Jc(this.opacity);return`${e===1?"rgb(":"rgba("}${eo(this.r)}, ${eo(this.g)}, ${eo(this.b)}${e===1?")":`, ${e})`}`}function Jc(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function eo(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Yi(e){return e=eo(e),(e<16?"0":"")+e.toString(16)}function U_(e,t,n,i){return i<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new tr(e,t,n,i)}function By(e){if(e instanceof tr)return new tr(e.h,e.s,e.l,e.opacity);if(e instanceof bl||(e=Qs(e)),!e)return new tr;if(e instanceof tr)return e;e=e.rgb();var t=e.r/255,n=e.g/255,i=e.b/255,s=Math.min(t,n,i),a=Math.max(t,n,i),l=NaN,u=a-s,d=(a+s)/2;return u?(t===a?l=(n-i)/u+(n<i)*6:n===a?l=(i-t)/u+2:l=(t-n)/u+4,u/=d<.5?a+s:2-a-s,l*=60):u=d>0&&d<1?0:l,new tr(l,u,d,e.opacity)}function D8(e,t,n,i){return arguments.length===1?By(e):new tr(e,t,n,i??1)}function tr(e,t,n,i){this.h=+e,this.s=+t,this.l=+n,this.opacity=+i}Hp(tr,D8,Fy(bl,{brighter(e){return e=e==null?Zc:Math.pow(Zc,e),new tr(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Zs:Math.pow(Zs,e),new tr(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,n=this.l,i=n+(n<.5?n:1-n)*t,s=2*n-i;return new wn(fg(e>=240?e-240:e+120,s,i),fg(e,s,i),fg(e<120?e+240:e-120,s,i),this.opacity)},clamp(){return new tr(G_(this.h),yc(this.s),yc(this.l),Jc(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){const e=Jc(this.opacity);return`${e===1?"hsl(":"hsla("}${G_(this.h)}, ${yc(this.s)*100}%, ${yc(this.l)*100}%${e===1?")":`, ${e})`}`}}));function G_(e){return e=(e||0)%360,e<0?e+360:e}function yc(e){return Math.max(0,Math.min(1,e||0))}function fg(e,t,n){return(e<60?t+(n-t)*e/60:e<180?n:e<240?t+(n-t)*(240-e)/60:t)*255}const Vy=e=>()=>e;function F8(e,t){return function(n){return e+n*t}}function B8(e,t,n){return e=Math.pow(e,n),t=Math.pow(t,n)-e,n=1/n,function(i){return Math.pow(e+i*t,n)}}function V8(e){return(e=+e)==1?Wy:function(t,n){return n-t?B8(t,n,e):Vy(isNaN(t)?n:t)}}function Wy(e,t){var n=t-e;return n?F8(e,n):Vy(isNaN(e)?t:e)}const K_=function e(t){var n=V8(t);function i(s,a){var l=n((s=Zg(s)).r,(a=Zg(a)).r),u=n(s.g,a.g),d=n(s.b,a.b),f=Wy(s.opacity,a.opacity);return function(h){return s.r=l(h),s.g=u(h),s.b=d(h),s.opacity=f(h),s+""}}return i.gamma=e,i}(1);function _i(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}var Jg=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,hg=new RegExp(Jg.source,"g");function W8(e){return function(){return e}}function z8(e){return function(t){return e(t)+""}}function H8(e,t){var n=Jg.lastIndex=hg.lastIndex=0,i,s,a,l=-1,u=[],d=[];for(e=e+"",t=t+"";(i=Jg.exec(e))&&(s=hg.exec(t));)(a=s.index)>n&&(a=t.slice(n,a),u[l]?u[l]+=a:u[++l]=a),(i=i[0])===(s=s[0])?u[l]?u[l]+=s:u[++l]=s:(u[++l]=null,d.push({i:l,x:_i(i,s)})),n=hg.lastIndex;return n<t.length&&(a=t.slice(n),u[l]?u[l]+=a:u[++l]=a),u.length<2?d[0]?z8(d[0].x):W8(t):(t=d.length,function(f){for(var h=0,g;h<t;++h)u[(g=d[h]).i]=g.x(f);return u.join("")})}var q_=180/Math.PI,Qg={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function zy(e,t,n,i,s,a){var l,u,d;return(l=Math.sqrt(e*e+t*t))&&(e/=l,t/=l),(d=e*n+t*i)&&(n-=e*d,i-=t*d),(u=Math.sqrt(n*n+i*i))&&(n/=u,i/=u,d/=u),e*i<t*n&&(e=-e,t=-t,d=-d,l=-l),{translateX:s,translateY:a,rotate:Math.atan2(t,e)*q_,skewX:Math.atan(d)*q_,scaleX:l,scaleY:u}}var xc;function U8(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?Qg:zy(t.a,t.b,t.c,t.d,t.e,t.f)}function G8(e){return e==null||(xc||(xc=document.createElementNS("http://www.w3.org/2000/svg","g")),xc.setAttribute("transform",e),!(e=xc.transform.baseVal.consolidate()))?Qg:(e=e.matrix,zy(e.a,e.b,e.c,e.d,e.e,e.f))}function Hy(e,t,n,i){function s(f){return f.length?f.pop()+" ":""}function a(f,h,g,m,b,_){if(f!==g||h!==m){var w=b.push("translate(",null,t,null,n);_.push({i:w-4,x:_i(f,g)},{i:w-2,x:_i(h,m)})}else(g||m)&&b.push("translate("+g+t+m+n)}function l(f,h,g,m){f!==h?(f-h>180?h+=360:h-f>180&&(f+=360),m.push({i:g.push(s(g)+"rotate(",null,i)-2,x:_i(f,h)})):h&&g.push(s(g)+"rotate("+h+i)}function u(f,h,g,m){f!==h?m.push({i:g.push(s(g)+"skewX(",null,i)-2,x:_i(f,h)}):h&&g.push(s(g)+"skewX("+h+i)}function d(f,h,g,m,b,_){if(f!==g||h!==m){var w=b.push(s(b)+"scale(",null,",",null,")");_.push({i:w-4,x:_i(f,g)},{i:w-2,x:_i(h,m)})}else(g!==1||m!==1)&&b.push(s(b)+"scale("+g+","+m+")")}return function(f,h){var g=[],m=[];return f=e(f),h=e(h),a(f.translateX,f.translateY,h.translateX,h.translateY,g,m),l(f.rotate,h.rotate,g,m),u(f.skewX,h.skewX,g,m),d(f.scaleX,f.scaleY,h.scaleX,h.scaleY,g,m),f=h=null,function(b){for(var _=-1,w=m.length,x;++_<w;)g[(x=m[_]).i]=x.x(b);return g.join("")}}}var K8=Hy(U8,"px, ","px)","deg)"),q8=Hy(G8,", ",")",")"),es=0,Ds=0,Ns=0,Uy=1e3,Qc,Fs,jc=0,io=0,Tf=0,js=typeof performance=="object"&&performance.now?performance:Date,Gy=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function Up(){return io||(Gy(Y8),io=js.now()+Tf)}function Y8(){io=0}function $c(){this._call=this._time=this._next=null}$c.prototype=Ky.prototype={constructor:$c,restart:function(e,t,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?Up():+n)+(t==null?0:+t),!this._next&&Fs!==this&&(Fs?Fs._next=this:Qc=this,Fs=this),this._call=e,this._time=n,jg()},stop:function(){this._call&&(this._call=null,this._time=1/0,jg())}};function Ky(e,t,n){var i=new $c;return i.restart(e,t,n),i}function X8(){Up(),++es;for(var e=Qc,t;e;)(t=io-e._time)>=0&&e._call.call(void 0,t),e=e._next;--es}function Y_(){io=(jc=js.now())+Tf,es=Ds=0;try{X8()}finally{es=0,J8(),io=0}}function Z8(){var e=js.now(),t=e-jc;t>Uy&&(Tf-=t,jc=e)}function J8(){for(var e,t=Qc,n,i=1/0;t;)t._call?(i>t._time&&(i=t._time),e=t,t=t._next):(n=t._next,t._next=null,t=e?e._next=n:Qc=n);Fs=e,jg(i)}function jg(e){if(!es){Ds&&(Ds=clearTimeout(Ds));var t=e-io;t>24?(e<1/0&&(Ds=setTimeout(Y_,e-js.now()-Tf)),Ns&&(Ns=clearInterval(Ns))):(Ns||(jc=js.now(),Ns=setInterval(Z8,Uy)),es=1,Gy(Y_))}}function X_(e,t,n){var i=new $c;return t=t==null?0:+t,i.restart(s=>{i.stop(),e(s+t)},t,n),i}var Q8=Dy("start","end","cancel","interrupt"),j8=[],qy=0,Z_=1,$g=2,Rc=3,J_=4,tp=5,Mc=6;function kf(e,t,n,i,s,a){var l=e.__transition;if(!l)e.__transition={};else if(n in l)return;$8(e,n,{name:t,index:i,group:s,on:Q8,tween:j8,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:qy})}function Gp(e,t){var n=ir(e,t);if(n.state>qy)throw new Error("too late; already scheduled");return n}function xr(e,t){var n=ir(e,t);if(n.state>Rc)throw new Error("too late; already running");return n}function ir(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function $8(e,t,n){var i=e.__transition,s;i[t]=n,n.timer=Ky(a,0,n.time);function a(f){n.state=Z_,n.timer.restart(l,n.delay,n.time),n.delay<=f&&l(f-n.delay)}function l(f){var h,g,m,b;if(n.state!==Z_)return d();for(h in i)if(b=i[h],b.name===n.name){if(b.state===Rc)return X_(l);b.state===J_?(b.state=Mc,b.timer.stop(),b.on.call("interrupt",e,e.__data__,b.index,b.group),delete i[h]):+h<t&&(b.state=Mc,b.timer.stop(),b.on.call("cancel",e,e.__data__,b.index,b.group),delete i[h])}if(X_(function(){n.state===Rc&&(n.state=J_,n.timer.restart(u,n.delay,n.time),u(f))}),n.state=$g,n.on.call("start",e,e.__data__,n.index,n.group),n.state===$g){for(n.state=Rc,s=new Array(m=n.tween.length),h=0,g=-1;h<m;++h)(b=n.tween[h].value.call(e,e.__data__,n.index,n.group))&&(s[++g]=b);s.length=g+1}}function u(f){for(var h=f<n.duration?n.ease.call(null,f/n.duration):(n.timer.restart(d),n.state=tp,1),g=-1,m=s.length;++g<m;)s[g].call(e,h);n.state===tp&&(n.on.call("end",e,e.__data__,n.index,n.group),d())}function d(){n.state=Mc,n.timer.stop(),delete i[t];for(var f in i)return;delete e.__transition}}function t9(e,t){var n=e.__transition,i,s,a=!0,l;if(n){t=t==null?null:t+"";for(l in n){if((i=n[l]).name!==t){a=!1;continue}s=i.state>$g&&i.state<tp,i.state=Mc,i.timer.stop(),i.on.call(s?"interrupt":"cancel",e,e.__data__,i.index,i.group),delete n[l]}a&&delete e.__transition}}function e9(e){return this.each(function(){t9(this,e)})}function n9(e,t){var n,i;return function(){var s=xr(this,e),a=s.tween;if(a!==n){i=n=a;for(var l=0,u=i.length;l<u;++l)if(i[l].name===t){i=i.slice(),i.splice(l,1);break}}s.tween=i}}function r9(e,t,n){var i,s;if(typeof n!="function")throw new Error;return function(){var a=xr(this,e),l=a.tween;if(l!==i){s=(i=l).slice();for(var u={name:t,value:n},d=0,f=s.length;d<f;++d)if(s[d].name===t){s[d]=u;break}d===f&&s.push(u)}a.tween=s}}function i9(e,t){var n=this._id;if(e+="",arguments.length<2){for(var i=ir(this.node(),n).tween,s=0,a=i.length,l;s<a;++s)if((l=i[s]).name===e)return l.value;return null}return this.each((t==null?n9:r9)(n,e,t))}function Kp(e,t,n){var i=e._id;return e.each(function(){var s=xr(this,i);(s.value||(s.value={}))[t]=n.apply(this,arguments)}),function(s){return ir(s,i).value[t]}}function Yy(e,t){var n;return(typeof t=="number"?_i:t instanceof Qs?K_:(n=Qs(t))?(t=n,K_):H8)(e,t)}function o9(e){return function(){this.removeAttribute(e)}}function s9(e){return function(){this.removeAttributeNS(e.space,e.local)}}function a9(e,t,n){var i,s=n+"",a;return function(){var l=this.getAttribute(e);return l===s?null:l===i?a:a=t(i=l,n)}}function l9(e,t,n){var i,s=n+"",a;return function(){var l=this.getAttributeNS(e.space,e.local);return l===s?null:l===i?a:a=t(i=l,n)}}function c9(e,t,n){var i,s,a;return function(){var l,u=n(this),d;return u==null?void this.removeAttribute(e):(l=this.getAttribute(e),d=u+"",l===d?null:l===i&&d===s?a:(s=d,a=t(i=l,u)))}}function u9(e,t,n){var i,s,a;return function(){var l,u=n(this),d;return u==null?void this.removeAttributeNS(e.space,e.local):(l=this.getAttributeNS(e.space,e.local),d=u+"",l===d?null:l===i&&d===s?a:(s=d,a=t(i=l,u)))}}function d9(e,t){var n=Ef(e),i=n==="transform"?q8:Yy;return this.attrTween(e,typeof t=="function"?(n.local?u9:c9)(n,i,Kp(this,"attr."+e,t)):t==null?(n.local?s9:o9)(n):(n.local?l9:a9)(n,i,t))}function f9(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function h9(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function g9(e,t){var n,i;function s(){var a=t.apply(this,arguments);return a!==i&&(n=(i=a)&&h9(e,a)),n}return s._value=t,s}function p9(e,t){var n,i;function s(){var a=t.apply(this,arguments);return a!==i&&(n=(i=a)&&f9(e,a)),n}return s._value=t,s}function v9(e,t){var n="attr."+e;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(t==null)return this.tween(n,null);if(typeof t!="function")throw new Error;var i=Ef(e);return this.tween(n,(i.local?g9:p9)(i,t))}function m9(e,t){return function(){Gp(this,e).delay=+t.apply(this,arguments)}}function b9(e,t){return t=+t,function(){Gp(this,e).delay=t}}function _9(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?m9:b9)(t,e)):ir(this.node(),t).delay}function w9(e,t){return function(){xr(this,e).duration=+t.apply(this,arguments)}}function y9(e,t){return t=+t,function(){xr(this,e).duration=t}}function x9(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?w9:y9)(t,e)):ir(this.node(),t).duration}function S9(e,t){if(typeof t!="function")throw new Error;return function(){xr(this,e).ease=t}}function A9(e){var t=this._id;return arguments.length?this.each(S9(t,e)):ir(this.node(),t).ease}function C9(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!="function")throw new Error;xr(this,e).ease=n}}function P9(e){if(typeof e!="function")throw new Error;return this.each(C9(this._id,e))}function E9(e){typeof e!="function"&&(e=Ey(e));for(var t=this._groups,n=t.length,i=new Array(n),s=0;s<n;++s)for(var a=t[s],l=a.length,u=i[s]=[],d,f=0;f<l;++f)(d=a[f])&&e.call(d,d.__data__,f,a)&&u.push(d);return new Jr(i,this._parents,this._name,this._id)}function T9(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,i=t.length,s=n.length,a=Math.min(i,s),l=new Array(i),u=0;u<a;++u)for(var d=t[u],f=n[u],h=d.length,g=l[u]=new Array(h),m,b=0;b<h;++b)(m=d[b]||f[b])&&(g[b]=m);for(;u<i;++u)l[u]=t[u];return new Jr(l,this._parents,this._name,this._id)}function k9(e){return(e+"").trim().split(/^|\s+/).every(function(t){var n=t.indexOf(".");return n>=0&&(t=t.slice(0,n)),!t||t==="start"})}function I9(e,t,n){var i,s,a=k9(t)?Gp:xr;return function(){var l=a(this,e),u=l.on;u!==i&&(s=(i=u).copy()).on(t,n),l.on=s}}function O9(e,t){var n=this._id;return arguments.length<2?ir(this.node(),n).on.on(e):this.each(I9(n,e,t))}function N9(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function R9(){return this.on("end.remove",N9(this._id))}function M9(e){var t=this._name,n=this._id;typeof e!="function"&&(e=Wp(e));for(var i=this._groups,s=i.length,a=new Array(s),l=0;l<s;++l)for(var u=i[l],d=u.length,f=a[l]=new Array(d),h,g,m=0;m<d;++m)(h=u[m])&&(g=e.call(h,h.__data__,m,u))&&("__data__"in h&&(g.__data__=h.__data__),f[m]=g,kf(f[m],t,n,m,f,ir(h,n)));return new Jr(a,this._parents,t,n)}function L9(e){var t=this._name,n=this._id;typeof e!="function"&&(e=Py(e));for(var i=this._groups,s=i.length,a=[],l=[],u=0;u<s;++u)for(var d=i[u],f=d.length,h,g=0;g<f;++g)if(h=d[g]){for(var m=e.call(h,h.__data__,g,d),b,_=ir(h,n),w=0,x=m.length;w<x;++w)(b=m[w])&&kf(b,t,n,w,m,_);a.push(m),l.push(h)}return new Jr(a,l,t,n)}var D9=ml.prototype.constructor;function F9(){return new D9(this._groups,this._parents)}function B9(e,t){var n,i,s;return function(){var a=ts(this,e),l=(this.style.removeProperty(e),ts(this,e));return a===l?null:a===n&&l===i?s:s=t(n=a,i=l)}}function Xy(e){return function(){this.style.removeProperty(e)}}function V9(e,t,n){var i,s=n+"",a;return function(){var l=ts(this,e);return l===s?null:l===i?a:a=t(i=l,n)}}function W9(e,t,n){var i,s,a;return function(){var l=ts(this,e),u=n(this),d=u+"";return u==null&&(d=u=(this.style.removeProperty(e),ts(this,e))),l===d?null:l===i&&d===s?a:(s=d,a=t(i=l,u))}}function z9(e,t){var n,i,s,a="style."+t,l="end."+a,u;return function(){var d=xr(this,e),f=d.on,h=d.value[a]==null?u||(u=Xy(t)):void 0;(f!==n||s!==h)&&(i=(n=f).copy()).on(l,s=h),d.on=i}}function H9(e,t,n){var i=(e+="")=="transform"?K8:Yy;return t==null?this.styleTween(e,B9(e,i)).on("end.style."+e,Xy(e)):typeof t=="function"?this.styleTween(e,W9(e,i,Kp(this,"style."+e,t))).each(z9(this._id,e)):this.styleTween(e,V9(e,i,t),n).on("end.style."+e,null)}function U9(e,t,n){return function(i){this.style.setProperty(e,t.call(this,i),n)}}function G9(e,t,n){var i,s;function a(){var l=t.apply(this,arguments);return l!==s&&(i=(s=l)&&U9(e,l,n)),i}return a._value=t,a}function K9(e,t,n){var i="style."+(e+="");if(arguments.length<2)return(i=this.tween(i))&&i._value;if(t==null)return this.tween(i,null);if(typeof t!="function")throw new Error;return this.tween(i,G9(e,t,n??""))}function q9(e){return function(){this.textContent=e}}function Y9(e){return function(){var t=e(this);this.textContent=t??""}}function X9(e){return this.tween("text",typeof e=="function"?Y9(Kp(this,"text",e)):q9(e==null?"":e+""))}function Z9(e){return function(t){this.textContent=e.call(this,t)}}function J9(e){var t,n;function i(){var s=e.apply(this,arguments);return s!==n&&(t=(n=s)&&Z9(s)),t}return i._value=e,i}function Q9(e){var t="text";if(arguments.length<1)return(t=this.tween(t))&&t._value;if(e==null)return this.tween(t,null);if(typeof e!="function")throw new Error;return this.tween(t,J9(e))}function j9(){for(var e=this._name,t=this._id,n=Zy(),i=this._groups,s=i.length,a=0;a<s;++a)for(var l=i[a],u=l.length,d,f=0;f<u;++f)if(d=l[f]){var h=ir(d,t);kf(d,e,n,f,l,{time:h.time+h.delay+h.duration,delay:0,duration:h.duration,ease:h.ease})}return new Jr(i,this._parents,e,n)}function $9(){var e,t,n=this,i=n._id,s=n.size();return new Promise(function(a,l){var u={value:l},d={value:function(){--s===0&&a()}};n.each(function(){var f=xr(this,i),h=f.on;h!==e&&(t=(e=h).copy(),t._.cancel.push(u),t._.interrupt.push(u),t._.end.push(d)),f.on=t}),s===0&&a()})}var t6=0;function Jr(e,t,n,i){this._groups=e,this._parents=t,this._name=n,this._id=i}function Zy(){return++t6}var Lr=ml.prototype;Jr.prototype={constructor:Jr,select:M9,selectAll:L9,selectChild:Lr.selectChild,selectChildren:Lr.selectChildren,filter:E9,merge:T9,selection:F9,transition:j9,call:Lr.call,nodes:Lr.nodes,node:Lr.node,size:Lr.size,empty:Lr.empty,each:Lr.each,on:O9,attr:d9,attrTween:v9,style:H9,styleTween:K9,text:X9,textTween:Q9,remove:R9,tween:i9,delay:_9,duration:x9,ease:A9,easeVarying:P9,end:$9,[Symbol.iterator]:Lr[Symbol.iterator]};function e6(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var n6={time:null,delay:0,duration:250,ease:e6};function r6(e,t){for(var n;!(n=e.__transition)||!(n=n[t]);)if(!(e=e.parentNode))throw new Error(`transition ${t} not found`);return n}function i6(e){var t,n;e instanceof Jr?(t=e._id,e=e._name):(t=Zy(),(n=n6).time=Up(),e=e==null?null:e+"");for(var i=this._groups,s=i.length,a=0;a<s;++a)for(var l=i[a],u=l.length,d,f=0;f<u;++f)(d=l[f])&&kf(d,e,t,f,l,n||r6(d,t));return new Jr(i,this._parents,e,t)}ml.prototype.interrupt=e9;ml.prototype.transition=i6;function Oo(e,t,n){this.k=e,this.x=t,this.y=n}Oo.prototype={constructor:Oo,scale:function(e){return e===1?this:new Oo(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new Oo(this.k,this.x+this.k*e,this.y+this.k*t)},apply:function(e){return[e[0]*this.k+this.x,e[1]*this.k+this.y]},applyX:function(e){return e*this.k+this.x},applyY:function(e){return e*this.k+this.y},invert:function(e){return[(e[0]-this.x)/this.k,(e[1]-this.y)/this.k]},invertX:function(e){return(e-this.x)/this.k},invertY:function(e){return(e-this.y)/this.k},rescaleX:function(e){return e.copy().domain(e.range().map(this.invertX,this).map(e.invert,e))},rescaleY:function(e){return e.copy().domain(e.range().map(this.invertY,this).map(e.invert,e))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};var Z6=new Oo(1,0,0);Oo.prototype;function o6(e,t){(e.key==="Enter"||e.key===" ")&&(e.preventDefault(),t())}var s6=cl('<rect fill="none" stroke="hsl(var(--primary))" stroke-width="3" pointer-events="none" vector-effect="non-scaling-stroke"></rect>'),a6=cl('<g role="button" tabindex="0" data-testid="selectable-svg-group"><!><!></g>');function J6(e,t){ht(t,!0);let n=k(t,"isSelected",3,!1);const{x:i,y:s,width:a,height:l}=t.box,u=()=>{t.onSelect(t.groupId)};var d=a6();d.__click=u;let f;d.__keydown=[o6,u],_n(d,"",{},{cursor:"pointer"});var h=rt(d);at(h,()=>t.children);var g=mt(h);{var m=b=>{var _=s6();He(_,"x",i),He(_,"y",s),He(_,"width",a),He(_,"height",l),P(b,_)};_t(g,b=>{n()&&b(m)})}nt(d),St(b=>{f=qn(d,0,"group svelte-15p83yz",null,f,b),He(d,"data-group-id",t.groupId)},[()=>({selected:n()})]),P(e,d),gt()}so(["click","keydown"]);export{fF as $,F6 as A,J6 as B,YD as C,V6 as D,Pk as E,_y as F,fk as G,ki as H,Rn as I,q6 as J,py as K,m4 as L,gy as M,vy as N,my as O,B6 as P,Gs as Q,To as R,M4 as S,Gn as T,QD as U,dF as V,yy as W,wy as X,_F as Y,Yg as Z,xy as _,qn as a,z6 as a$,Fc as a0,P6 as a1,y0 as a2,HF as a3,nk as a4,G6 as a5,Sy as a6,Ls as a7,K6 as a8,bk as a9,Un as aA,N6 as aB,R6 as aC,Eo as aD,Ur as aE,z0 as aF,W0 as aG,Ci as aH,fl as aI,vp as aJ,hl as aK,sn as aL,Yn as aM,ne as aN,Kr as aO,Yr as aP,V0 as aQ,yI as aR,D6 as aS,Sg as aT,$t as aU,pD as aV,$I as aW,Ww as aX,H3 as aY,H6 as aZ,vD as a_,ty as aa,jw as ab,Qw as ac,bL as ad,FF as ae,hL as af,ey as ag,w_ as ah,UF as ai,AL as aj,Bc as ak,X6 as al,rr as am,w8 as an,Y4 as ao,Dy as ap,Z6 as aq,Oo as ar,t9 as as,T6 as at,k6 as au,E6 as av,cc as aw,I6 as ax,zb as ay,jT as az,Lt as b,w0 as b0,W6 as b1,wF as b2,nF as b3,xF as b4,U6 as b5,up as b6,SF as b7,ae as c,cp as d,Ti as e,BF as f,VF as g,Qr as h,yf as i,Y6 as j,_n as k,VD as l,Io as m,v4 as n,hy as o,qg as p,Jt as q,L6 as r,He as s,xI as t,WD as u,M6 as v,Qt as w,B as x,Wt as y,ZD as z};