lightly-studio 0.3.4__py3-none-any.whl → 0.4.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of lightly-studio might be problematic. Click here for more details.
- lightly_studio/__init__.py +1 -2
- lightly_studio/api/db_tables.py +3 -0
- lightly_studio/api/features.py +3 -5
- lightly_studio/api/routes/api/dataset.py +5 -3
- lightly_studio/api/routes/api/dataset_tag.py +10 -0
- lightly_studio/api/routes/api/embeddings2d.py +6 -47
- lightly_studio/core/dataset.py +89 -2
- lightly_studio/core/dataset_query/__init__.py +14 -0
- lightly_studio/core/dataset_query/dataset_query.py +98 -2
- lightly_studio/core/dataset_query/sample_field.py +11 -2
- lightly_studio/core/sample.py +33 -1
- lightly_studio/db_manager.py +4 -2
- lightly_studio/dist_lightly_studio_view_app/_app/env.js +1 -1
- lightly_studio/dist_lightly_studio_view_app/_app/immutable/assets/0.B-Bn8V7R.css +1 -0
- lightly_studio/dist_lightly_studio_view_app/_app/immutable/assets/Samples.CTl60pQb.css +1 -0
- lightly_studio/dist_lightly_studio_view_app/_app/immutable/assets/_layout.CxuTMeYy.css +1 -0
- lightly_studio/dist_lightly_studio_view_app/_app/immutable/assets/transform.Bte-FZ4V.css +1 -0
- lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/7XnHnNk_.js +1 -0
- lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/BDE1kT04.js +2 -0
- lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/{DQ8aZ1o-.js → BHoO7UL_.js} +2 -2
- lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/{CZGpyrcA.js → BTpMiPuk.js} +1 -1
- lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/BbG6fgnL.js +1 -0
- lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/Bip0vTKl.js +1 -0
- lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/{D_JuJOO3.js → BzYRexN9.js} +1 -1
- lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/{Frwd2CjB.js → C3xJX0nD.js} +1 -1
- lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/C5oezL0m.js +39 -0
- lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/{H4l0JFh9.js → CANX9QXL.js} +1 -1
- lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/CAPx0Bfm.js +1 -0
- lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/CEPpkZIV.js +1 -0
- lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/ChO13USc.js +96 -0
- lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/{DzBTnFhV.js → Cj4nZbtb.js} +1 -1
- lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/{Bqz7dyEC.js → CmNXvs5e.js} +1 -1
- lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/CpbA3HU7.js +2 -0
- lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/{DSxvnAMh.js → D9WxTSWa.js} +1 -1
- lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/DELrRF6e.js +4 -0
- lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/{sLqs1uaK.js → DFib3GIP.js} +1 -1
- lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/{CSCQddQS.js → DNJnBfHs.js} +1 -1
- lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/DVxjPOJB.js +1 -0
- lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/DeAqvaPB.js +1 -0
- lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/DgCXCApo.js +438 -0
- lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/DmGM9V9Q.js +1 -0
- lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/DoEId1MK.js +1 -0
- lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/DqhovIS0.js +1 -0
- lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/SiegjVo0.js +1 -0
- lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/gBp1tBnA.js +1 -0
- lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/xQhUoIl9.js +1 -0
- lightly_studio/dist_lightly_studio_view_app/_app/immutable/entry/app.CED-eiXl.js +2 -0
- lightly_studio/dist_lightly_studio_view_app/_app/immutable/entry/start.D6UcpqyO.js +1 -0
- lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/0.waSqEGqm.js +4 -0
- lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/{1.Cdy-7S5q.js → 1.Bb_sKkYl.js} +1 -1
- lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/10.D9Uicmfq.js +1 -0
- lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/11.DKnK0EcJ.js +1 -0
- lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/13.D7dGgxYC.js +1 -0
- lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/{2.BIldfkxL.js → 2.BzK1sjoM.js} +144 -105
- lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/{3.BC9z_TWM.js → 3.B08UPFst.js} +1 -1
- lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/{4.D8X_Ch5n.js → 4.C19_Nx95.js} +1 -1
- lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/5.B2cR7brs.js +39 -0
- lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/{6.DRA5Ru_2.js → 6.C9Y2LZxG.js} +1 -1
- lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/{7.WVBsruHQ.js → 7.CEbWmgIF.js} +1 -1
- lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/8.Con-GcPz.js +20 -0
- lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/9.DW7FBNNH.js +1 -0
- lightly_studio/dist_lightly_studio_view_app/_app/version.json +1 -1
- lightly_studio/dist_lightly_studio_view_app/index.html +13 -14
- lightly_studio/models/annotation/annotation_base.py +9 -0
- lightly_studio/models/caption.py +1 -0
- lightly_studio/models/dataset.py +6 -0
- lightly_studio/models/sample.py +8 -1
- lightly_studio/models/settings.py +5 -0
- lightly_studio/models/two_dim_embedding.py +16 -0
- lightly_studio/resolvers/annotation_resolver/get_all.py +3 -1
- lightly_studio/resolvers/dataset_resolver.py +20 -5
- lightly_studio/resolvers/sample_embedding_resolver.py +44 -2
- lightly_studio/resolvers/sample_resolver.py +2 -3
- lightly_studio/resolvers/settings_resolver.py +3 -0
- lightly_studio/resolvers/twodim_embedding_resolver.py +119 -0
- lightly_studio/selection/__init__.py +1 -0
- lightly_studio/selection/mundig.py +41 -0
- lightly_studio/selection/select.py +70 -1
- lightly_studio/selection/selection_config.py +1 -1
- lightly_studio-0.4.1.dist-info/METADATA +78 -0
- {lightly_studio-0.3.4.dist-info → lightly_studio-0.4.1.dist-info}/RECORD +83 -81
- lightly_studio/dataset/loader.py +0 -581
- lightly_studio/dist_lightly_studio_view_app/_app/immutable/assets/0.B3oFNb6O.css +0 -1
- lightly_studio/dist_lightly_studio_view_app/_app/immutable/assets/Samples.CIbricz7.css +0 -1
- lightly_studio/dist_lightly_studio_view_app/_app/immutable/assets/_layout.7Ma7YdVg.css +0 -1
- lightly_studio/dist_lightly_studio_view_app/_app/immutable/assets/transform.2jKMtOWG.css +0 -1
- lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/-DXuGN29.js +0 -1
- lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/B7302SU7.js +0 -1
- lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/BeWf8-vJ.js +0 -1
- lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/CfQ4mGwl.js +0 -1
- lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/CiaNZCBa.js +0 -1
- lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/Cqo0Vpvt.js +0 -417
- lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/Cy4fgWTG.js +0 -1
- lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/D5w4xp5l.js +0 -1
- lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/DD63uD-T.js +0 -1
- lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/D_ynJAfY.js +0 -2
- lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/Dafy4oEQ.js +0 -1
- lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/Dj4O-5se.js +0 -1
- lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/DmjAI-UV.js +0 -1
- lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/Dug7Bq1S.js +0 -1
- lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/Dv5BSBQG.js +0 -1
- lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/DzX_yyqb.js +0 -1
- lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/H60ATh8g.js +0 -2
- lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/qIv1kPyv.js +0 -1
- lightly_studio/dist_lightly_studio_view_app/_app/immutable/chunks/u-it74zV.js +0 -96
- lightly_studio/dist_lightly_studio_view_app/_app/immutable/entry/app.BPc0HQPq.js +0 -2
- lightly_studio/dist_lightly_studio_view_app/_app/immutable/entry/start.SNvc2nrm.js +0 -1
- lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/0.5jT7P06o.js +0 -1
- lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/10.C_uoESTX.js +0 -1
- lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/12.DcO8wIAc.js +0 -1
- lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/5.CAXhxJu6.js +0 -39
- lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/8.BuKUrCEN.js +0 -20
- lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/9.CUIn1yCR.js +0 -1
- lightly_studio/selection/README.md +0 -6
- lightly_studio-0.3.4.dist-info/METADATA +0 -879
- /lightly_studio/dist_lightly_studio_view_app/_app/immutable/nodes/{11.CWG1ehzT.js → 12.CWG1ehzT.js} +0 -0
- {lightly_studio-0.3.4.dist-info → lightly_studio-0.4.1.dist-info}/WHEEL +0 -0
|
@@ -0,0 +1,438 @@
|
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./BzYRexN9.js","./CWj6FrbW.js","./C3xJX0nD.js","./DIeogL5L.js","./CAPx0Bfm.js","./DoEId1MK.js","./xQhUoIl9.js","./DmGM9V9Q.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
var Dk=Object.defineProperty;var Fk=Object.getPrototypeOf;var Bk=Reflect.get;var r_=e=>{throw TypeError(e)};var zk=(e,t,n)=>t in e?Dk(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n;var $=(e,t,n)=>zk(e,typeof t!="symbol"?t+"":t,n),wg=(e,t,n)=>t.has(e)||r_("Cannot "+n);var _=(e,t,n)=>(wg(e,t,"read from private field"),n?n.call(e):t.get(e)),z=(e,t,n)=>t.has(e)?r_("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,n),He=(e,t,n,i)=>(wg(e,t,"write to private field"),i?i.call(e,n):t.set(e,n),n),Tt=(e,t,n)=>(wg(e,t,"access private method"),n);var i_=(e,t,n)=>Bk(Fk(e),n,t);import"./CWj6FrbW.js";import{o as xs,g as M0}from"./BHoO7UL_.js";import{I as Vk,b3 as Hk,bf as Wk,z as Yn,L as Zg,aQ as Uk,v as L0,bg as o_,N as Gk,O as Kk,P as jg,Q as Xd,U as s_,aq as xg,ao as Qg,X as a_,C as D0,A as Md,H as l_,G as c_,as as u_,d as qk,V as F0,x as B0,W as Ld,bh as Yk,aL as Xk,bi as Zk,E as z0,bj as jk,_ as Qk,R as Jk,K as V0,y as $k,bk as tT,bl as eT,a5 as H0,h as Br,bm as nT,D as W0,ah as rT,n as St,bn as U0,S as qs,aM as Hf,a6 as G0,bo as iT,aN as d_,m as Pn,o as Zo,al as pt,bd as f_,g as f,Z as O,ap as Ys,p as ut,a as dt,c as q,s as nt,r as K,f as N,b as E,bp as K0,t as Mt,ab as _n,u as be,w as $e,am as te,e as Wf,bc as oT,aO as h_,aP as sT,bq as aT,br as q0,q as _d,$ as lT}from"./C3xJX0nD.js";import{d as cT,e as g_,f as uT,s as me,c as dT,m as fT,u as hT}from"./CpbA3HU7.js";import{i as gt,a as pr,s as Kt,b as qo,m as Yo}from"./DmGM9V9Q.js";import{h as p_,p as gT,q as pT,r as vT,g as Yr,a as Vt,e as Wr,i as Uf,S as mT,s as Mn,t as Ur,b as Ln,o as Dd,k as bi,c as Pt,u as yu,j as So,v as bT,w as _T}from"./BDE1kT04.js";import{b as yT,d as Pr,a as y,c as U,f as Z,t as Ee}from"./CAPx0Bfm.js";import{o as rn,d as kr,e as ho}from"./SiegjVo0.js";import{p as k,r as wt,s as Nt,b as yn,c as At}from"./xQhUoIl9.js";import{P as Y0,c as Dr}from"./gBp1tBnA.js";import{a as Lp,u as wi}from"./Bip0vTKl.js";import{u as wT}from"./CmNXvs5e.js";import{z as xT,c as ST}from"./CEPpkZIV.js";import{p as Qi}from"./D9WxTSWa.js";import"./69_IOA4Y.js";import{s as ct}from"./DoEId1MK.js";import{i as X0}from"./Cj4nZbtb.js";import{Q as CT,l as AT,u as wu,m as PT,n as kT,o as TT,p as ET,j as Dp,h as Z0,q as Fp,s as IT,c as j0,t as OT,i as RT}from"./DqhovIS0.js";import{S as NT,s as MT,x as v_,e as Q0}from"./CANX9QXL.js";import{u as J0}from"./DeAqvaPB.js";import{r as $0}from"./7XnHnNk_.js";import{_ as m_}from"./C1FmrZbK.js";const LT=[];function ty(e,t=!1,n=!1){return Fd(e,new Map,"",LT,null,n)}function Fd(e,t,n,i,s=null,l=!1){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(Vk(e)){var c=Array(e.length);t.set(e,c),s!==null&&t.set(s,c);for(var d=0;d<e.length;d+=1){var h=e[d];d in e&&(c[d]=Fd(h,t,n,i,null,l))}return c}if(Hk(e)===Wk){c={},t.set(e,c),s!==null&&t.set(s,c);for(var g in e)c[g]=Fd(e[g],t,n,i,null,l);return c}if(e instanceof Date)return structuredClone(e);if(typeof e.toJSON=="function"&&!l)return Fd(e.toJSON(),t,n,i,e)}if(e instanceof EventTarget)return e;try{return structuredClone(e)}catch{return e}}const Sg=0,yd=1,Cg=2;function b_(e,t,n,i,s){Yn&&Zg();var l=e,a=Uk(),c=qk,d=s_,h,g,p,v=a?Qg(void 0):a_(void 0,!1,!1),b=a?Qg(void 0):a_(void 0,!1,!1),w=!1;function S(A,T){w=!0,T&&(l_(x),c_(x),u_(c));try{A===yd&&i&&(g?F0(g):g=B0(()=>i(l,v))),A!==Sg&&h&&Ld(h,()=>h=null),A!==yd&&g&&Ld(g,()=>g=null),A!==Cg&&p&&Ld(p,()=>p=null)}finally{T&&(u_(null),c_(null),l_(null),Yk||Xk())}}var x=L0(()=>{if(d===(d=t()))return;let A=Yn&&o_(d)===(l.data===Gk);if(A&&(l=Kk(),jg(l),Xd(!1),A=!0),o_(d)){var T=d;w=!1,T.then(D=>{T===d&&(xg(v,D),S(yd,!0))},D=>{if(T===d)throw xg(b,D),S(Cg,!0),b.v}),Yn||D0(()=>{w||S(Sg,!0)})}else xg(v,d),S(yd,!1);return A&&Xd(!0),()=>d=s_});Yn&&(l=Md)}function DT(e,t,n,i,s,l){let a=Yn;Yn&&Zg();var c,d,h=null;Yn&&Md.nodeType===Zk&&(h=Md,Zg());var g=Yn?Md:e,p;L0(()=>{const v=t()||null;var b=jk;v!==c&&(p&&(v===null?Ld(p,()=>{p=null,d=null}):v===d?F0(p):($k(p),g_(!1))),v&&v!==d&&(p=B0(()=>{if(h=Yn?h:document.createElementNS(b,v),yT(h,h),i){Yn&&cT(v)&&h.append(document.createComment(""));var w=Yn?Qk(h):h.appendChild(Jk());Yn&&(w===null?Xd(!1):jg(w)),i(h,w)}V0.nodes_end=h,g.before(h)})),c=v,c&&(d=c),g_(!0))},z0),a&&(Xd(!0),jg(g))}const FT=()=>performance.now(),mi={tick:e=>requestAnimationFrame(e),now:()=>FT(),tasks:new Set};function ey(){const e=mi.now();mi.tasks.forEach(t=>{t.c(e)||(mi.tasks.delete(t),t.f())}),mi.tasks.size!==0&&mi.tick(ey)}function BT(e){let t;return mi.tasks.size===0&&mi.tick(ey),{promise:new Promise(n=>{mi.tasks.add(t={c:e,f:n})}),abort(){mi.tasks.delete(t)}}}function wd(e,t){W0(()=>{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 __(e){const t={},n=e.split(";");for(const i of n){const[s,l]=i.split(":");if(!s||l===void 0)break;const a=zT(s.trim());t[a]=l.trim()}return t}const VT=e=>e;function Bp(e,t,n,i){var s=(e&nT)!==0,l="both",a,c=t.inert,d=t.style.overflow,h,g;function p(){return W0(()=>a??(a=n()(t,(i==null?void 0:i())??{},{direction:l})))}var v={is_global:s,in(){t.inert=c,wd(t,"introstart"),h=Jg(t,p(),g,1,()=>{wd(t,"introend"),h==null||h.abort(),h=a=void 0,t.style.overflow=d})},out(x){t.inert=!0,wd(t,"outrostart"),g=Jg(t,p(),h,0,()=>{wd(t,"outroend"),x==null||x()})},stop:()=>{h==null||h.abort(),g==null||g.abort()}},b=V0;if((b.transitions??(b.transitions=[])).push(v),uT){var w=s;if(!w){for(var S=b.parent;S&&S.f&z0;)for(;(S=S.parent)&&!(S.f&tT););w=!S||(S.f&eT)!==0}w&&H0(()=>{Br(()=>v.in())})}}function Jg(e,t,n,i,s){var l=i===1;if(rT(t)){var a,c=!1;return D0(()=>{if(!c){var x=t({direction:l?"in":"out"});a=Jg(e,x,n,i,s)}}),{abort:()=>{c=!0,a==null||a.abort()},deactivate:()=>a.deactivate(),reset:()=>a.reset(),t:()=>a.t()}}if(n==null||n.deactivate(),!(t!=null&&t.duration))return s(),{abort:St,deactivate:St,reset:St,t:()=>i};const{delay:d=0,css:h,tick:g,easing:p=VT}=t;var v=[];if(l&&n===void 0&&(g&&g(0,1),h)){var b=__(h(0,1));v.push(b,b)}var w=()=>1-i,S=e.animate(v,{duration:d,fill:"forwards"});return S.onfinish=()=>{S.cancel();var x=(n==null?void 0:n.t())??1-i;n==null||n.abort();var A=i-x,T=t.duration*Math.abs(A),D=[];if(T>0){var R=!1;if(h)for(var L=Math.ceil(T/16.666666666666668),V=0;V<=L;V+=1){var M=x+A*p(V/L),H=__(h(M,1-M));D.push(H),R||(R=H.overflow==="hidden")}R&&(e.style.overflow="hidden"),w=()=>{var j=S.currentTime;return x+A*p(j/T)},g&&BT(()=>{if(S.playState!=="running")return!1;var j=w();return g(j,1-j),!0})}S=e.animate(D,{duration:T,fill:"forwards"}),S.onfinish=()=>{w=()=>i,g==null||g(i,1-i),s()}},{abort:()=>{S&&(S.cancel(),S.effect=null,S.onfinish=St)},deactivate:()=>{s=St},reset:()=>{i===0&&(g==null||g(1,0))},t:()=>w()}}function Zd(e,t,n=t){var i=new WeakSet;U0(e,"input",async s=>{var l=s?e.defaultValue:e.value;if(l=Ag(e)?Pg(l):l,n(l),qs!==null&&i.add(qs),await Hf(),l!==(l=t())){var a=e.selectionStart,c=e.selectionEnd;e.value=l??"",c!==null&&(e.selectionStart=a,e.selectionEnd=Math.min(c,e.value.length))}}),(Yn&&e.defaultValue!==e.value||Br(t)==null&&e.value)&&(n(Ag(e)?Pg(e.value):e.value),qs!==null&&i.add(qs)),G0(()=>{var s=t();if(e===document.activeElement){var l=iT??qs;if(i.has(l))return}Ag(e)&&s===Pg(e.value)||e.type==="date"&&!s&&!e.value||s!==e.value&&(e.value=s??"")})}function Ag(e){var t=e.type;return t==="number"||t==="range"}function Pg(e){return e===""?null:+e}function HT(e,t,n=t){U0(e,"change",()=>{n(e.files)}),Yn&&e.files&&n(e.files),G0(()=>{e.files=t()})}var Ki,ns,_a,ff,ny;const hf=class hf{constructor(t){z(this,ff);z(this,Ki,new WeakMap);z(this,ns);z(this,_a);He(this,_a,t)}observe(t,n){var i=_(this,Ki).get(t)||new Set;return i.add(n),_(this,Ki).set(t,i),Tt(this,ff,ny).call(this).observe(t,_(this,_a)),()=>{var s=_(this,Ki).get(t);s.delete(n),s.size===0&&(_(this,Ki).delete(t),_(this,ns).unobserve(t))}}};Ki=new WeakMap,ns=new WeakMap,_a=new WeakMap,ff=new WeakSet,ny=function(){return _(this,ns)??He(this,ns,new ResizeObserver(t=>{for(var n of t){hf.entries.set(n.target,n);for(var i of _(this,Ki).get(n.target)||[])i(n)}}))},$(hf,"entries",new WeakMap);let $g=hf;var WT=new $g({box:"border-box"});function kg(e,t,n){var i=WT.observe(e,()=>n(e[t]));H0(()=>(Br(()=>n(e[t])),i))}var UT=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:p_()},t)}getOptimisticResult(e){return e.behavior=p_(),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,S;const{state:n}=e,i=super.createResult(e,t),{isFetching:s,isRefetching:l,isError:a,isRefetchError:c}=i,d=(S=(w=n.fetchMeta)==null?void 0:w.fetchMore)==null?void 0:S.direction,h=a&&d==="forward",g=s&&d==="forward",p=a&&d==="backward",v=s&&d==="backward";return{...i,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:pT(t,n.data),hasPreviousPage:gT(t,n.data),isFetchNextPageError:h,isFetchingNextPage:g,isFetchPreviousPageError:p,isFetchingPreviousPage:v,isRefetchError:c&&!h&&!p,isRefetching:l&&!g&&!v}}},qi,Yi,qn,fi,yi,Bd,tp,N0,GT=(N0=class extends NT{constructor(n,i){super();z(this,yi);z(this,qi);z(this,Yi);z(this,qn);z(this,fi);He(this,qi,n),this.setOptions(i),this.bindMethods(),Tt(this,yi,Bd).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=_(this,qi).defaultMutationOptions(n),MT(this.options,i)||_(this,qi).getMutationCache().notify({type:"observerOptionsUpdated",mutation:_(this,qn),observer:this}),i!=null&&i.mutationKey&&this.options.mutationKey&&v_(i.mutationKey)!==v_(this.options.mutationKey)?this.reset():((s=_(this,qn))==null?void 0:s.state.status)==="pending"&&_(this,qn).setOptions(this.options)}onUnsubscribe(){var n;this.hasListeners()||(n=_(this,qn))==null||n.removeObserver(this)}onMutationUpdate(n){Tt(this,yi,Bd).call(this),Tt(this,yi,tp).call(this,n)}getCurrentResult(){return _(this,Yi)}reset(){var n;(n=_(this,qn))==null||n.removeObserver(this),He(this,qn,void 0),Tt(this,yi,Bd).call(this),Tt(this,yi,tp).call(this)}mutate(n,i){var s;return He(this,fi,i),(s=_(this,qn))==null||s.removeObserver(this),He(this,qn,_(this,qi).getMutationCache().build(_(this,qi),this.options)),_(this,qn).addObserver(this),_(this,qn).execute(n)}},qi=new WeakMap,Yi=new WeakMap,qn=new WeakMap,fi=new WeakMap,yi=new WeakSet,Bd=function(){var i;const n=((i=_(this,qn))==null?void 0:i.state)??vT();He(this,Yi,{...n,isPending:n.status==="pending",isSuccess:n.status==="success",isError:n.status==="error",isIdle:n.status==="idle",mutate:this.mutate,reset:this.reset})},tp=function(n){Q0.batch(()=>{var i,s,l,a,c,d,h,g;if(_(this,fi)&&this.hasListeners()){const p=_(this,Yi).variables,v=_(this,Yi).context;(n==null?void 0:n.type)==="success"?((s=(i=_(this,fi)).onSuccess)==null||s.call(i,n.data,p,v),(a=(l=_(this,fi)).onSettled)==null||a.call(l,n.data,null,p,v)):(n==null?void 0:n.type)==="error"&&((d=(c=_(this,fi)).onError)==null||d.call(c,n.error,p,v),(g=(h=_(this,fi)).onSettled)==null||g.call(h,void 0,n.error,p,v))}this.listeners.forEach(p=>{p(_(this,Yi))})})},N0);function ry(e,t){return AT(e,UT)}function KT(e,t){const n=wu(),i=PT(e)?e:d_(e),s=new GT(n,Pn(i));let l;i.subscribe(d=>{l=(h,g)=>{s.mutate(h,g).catch(kT)},s.setOptions(d)});const a=d_(s.getCurrentResult(),d=>s.subscribe(Q0.batchCalls(h=>d(h)))),{subscribe:c}=Zo(a,d=>({...d,mutate:l,mutateAsync:d.mutate}));return{subscribe:c}}var Mr,Lr,hi,gf,Sr,ra,zd;const Ov=class Ov extends Map{constructor(n){super();z(this,Sr);z(this,Mr,new Map);z(this,Lr,pt(0));z(this,hi,pt(0));z(this,gf,f_||-1);if(n){for(var[i,s]of n)super.set(i,s);_(this,hi).v=super.size}}has(n){var i=_(this,Mr),s=i.get(n);if(s===void 0){var l=super.get(n);if(l!==void 0)s=Tt(this,Sr,ra).call(this,0),i.set(n,s);else return f(_(this,Lr)),!1}return f(s),!0}forEach(n,i){Tt(this,Sr,zd).call(this),super.forEach(n,i)}get(n){var i=_(this,Mr),s=i.get(n);if(s===void 0){var l=super.get(n);if(l!==void 0)s=Tt(this,Sr,ra).call(this,0),i.set(n,s);else{f(_(this,Lr));return}}return f(s),super.get(n)}set(n,i){var p;var s=_(this,Mr),l=s.get(n),a=super.get(n),c=super.set(n,i),d=_(this,Lr);if(l===void 0)l=Tt(this,Sr,ra).call(this,0),s.set(n,l),O(_(this,hi),super.size),Ys(d);else if(a!==i){Ys(l);var h=d.reactions===null?null:new Set(d.reactions),g=h===null||!((p=l.reactions)!=null&&p.every(v=>h.has(v)));g&&Ys(d)}return c}delete(n){var i=_(this,Mr),s=i.get(n),l=super.delete(n);return s!==void 0&&(i.delete(n),O(_(this,hi),super.size),O(s,-1),Ys(_(this,Lr))),l}clear(){if(super.size!==0){super.clear();var n=_(this,Mr);O(_(this,hi),0);for(var i of n.values())O(i,-1);Ys(_(this,Lr)),n.clear()}}keys(){return f(_(this,Lr)),super.keys()}values(){return Tt(this,Sr,zd).call(this),super.values()}entries(){return Tt(this,Sr,zd).call(this),super.entries()}[Symbol.iterator](){return this.entries()}get size(){return f(_(this,hi)),super.size}};Mr=new WeakMap,Lr=new WeakMap,hi=new WeakMap,gf=new WeakMap,Sr=new WeakSet,ra=function(n){return f_===_(this,gf)?pt(n):Qg(n)},zd=function(){f(_(this,Lr));var n=_(this,Mr);if(_(this,hi).v!==n.size){for(var i of i_(Ov.prototype,this,"keys").call(this))if(!n.has(i)){var s=Tt(this,Sr,ra).call(this,0);n.set(i,s)}}for([,s]of _(this,Mr))f(s)};let ca=Ov;/**
|
|
3
|
+
* @license @lucide/svelte v0.482.0 - ISC
|
|
4
|
+
*
|
|
5
|
+
* ISC License
|
|
6
|
+
*
|
|
7
|
+
* 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.
|
|
8
|
+
*
|
|
9
|
+
* Permission to use, copy, modify, and/or distribute this software for any
|
|
10
|
+
* purpose with or without fee is hereby granted, provided that the above
|
|
11
|
+
* copyright notice and this permission notice appear in all copies.
|
|
12
|
+
*
|
|
13
|
+
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
14
|
+
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
15
|
+
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
|
16
|
+
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
17
|
+
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
18
|
+
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
19
|
+
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
20
|
+
*
|
|
21
|
+
*/const qT={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 YT=Pr("<svg><!><!></svg>");function wn(e,t){ut(t,!0);const n=k(t,"color",3,"currentColor"),i=k(t,"size",3,24),s=k(t,"strokeWidth",3,2),l=k(t,"absoluteStrokeWidth",3,!1),a=k(t,"iconNode",19,()=>[]),c=wt(t,["$$slots","$$events","$$legacy","name","color","size","strokeWidth","absoluteStrokeWidth","iconNode","children"]),d=Yr(),[h,g]=d;var p=YT();Vt(p,w=>({...qT,...c,width:i(),height:i(),stroke:n(),"stroke-width":w,class:["lucide-icon lucide",t.name&&`lucide-${t.name}`,t.class]}),[()=>l()?Number(s())*24/Number(i()):s()]);var v=q(p);Wr(v,17,a,Uf,(w,S)=>{var x=E(()=>K0(f(S),2));let A=()=>f(x)[0],T=()=>f(x)[1];var D=U(),R=N(D);DT(R,A,!0,(L,V)=>{Vt(L,M=>({...M}),[()=>`${A()}`=="button"?g({...T()},[{attribute_name:"formaction"}]):`${A()}`=="form"?g({...T()},[{attribute_name:"action"}]):`${A()}`=="a"?g({...T()},[{attribute_name:"href",lang_attribute_name:"hreflang"}]):{...T()}])}),y(w,D)});var b=nt(v);ct(b,()=>t.children??St),K(p),y(e,p),dt()}function zp(e,t){ut(t,!0);/**
|
|
22
|
+
* @license @lucide/svelte v0.482.0 - ISC
|
|
23
|
+
*
|
|
24
|
+
* ISC License
|
|
25
|
+
*
|
|
26
|
+
* 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.
|
|
27
|
+
*
|
|
28
|
+
* Permission to use, copy, modify, and/or distribute this software for any
|
|
29
|
+
* purpose with or without fee is hereby granted, provided that the above
|
|
30
|
+
* copyright notice and this permission notice appear in all copies.
|
|
31
|
+
*
|
|
32
|
+
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
33
|
+
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
34
|
+
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
|
35
|
+
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
36
|
+
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
37
|
+
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
38
|
+
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
39
|
+
*
|
|
40
|
+
*/let n=wt(t,["$$slots","$$events","$$legacy"]);const i=[["path",{d:"M20 6 9 17l-5-5"}]];wn(e,Nt({name:"check"},()=>n,{get iconNode(){return i},children:(s,l)=>{var a=U(),c=N(a);ct(c,()=>t.children??St),y(s,a)},$$slots:{default:!0}})),dt()}function Gf(e,t){ut(t,!0);/**
|
|
41
|
+
* @license @lucide/svelte v0.482.0 - ISC
|
|
42
|
+
*
|
|
43
|
+
* ISC License
|
|
44
|
+
*
|
|
45
|
+
* 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.
|
|
46
|
+
*
|
|
47
|
+
* Permission to use, copy, modify, and/or distribute this software for any
|
|
48
|
+
* purpose with or without fee is hereby granted, provided that the above
|
|
49
|
+
* copyright notice and this permission notice appear in all copies.
|
|
50
|
+
*
|
|
51
|
+
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
52
|
+
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
53
|
+
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
|
54
|
+
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
55
|
+
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
56
|
+
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
57
|
+
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
58
|
+
*
|
|
59
|
+
*/let n=wt(t,["$$slots","$$events","$$legacy"]);const i=[["path",{d:"m6 9 6 6 6-6"}]];wn(e,Nt({name:"chevron-down"},()=>n,{get iconNode(){return i},children:(s,l)=>{var a=U(),c=N(a);ct(c,()=>t.children??St),y(s,a)},$$slots:{default:!0}})),dt()}function XT(e,t){ut(t,!0);/**
|
|
60
|
+
* @license @lucide/svelte v0.482.0 - ISC
|
|
61
|
+
*
|
|
62
|
+
* ISC License
|
|
63
|
+
*
|
|
64
|
+
* 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.
|
|
65
|
+
*
|
|
66
|
+
* Permission to use, copy, modify, and/or distribute this software for any
|
|
67
|
+
* purpose with or without fee is hereby granted, provided that the above
|
|
68
|
+
* copyright notice and this permission notice appear in all copies.
|
|
69
|
+
*
|
|
70
|
+
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
71
|
+
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
72
|
+
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
|
73
|
+
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
74
|
+
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
75
|
+
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
76
|
+
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
77
|
+
*
|
|
78
|
+
*/let n=wt(t,["$$slots","$$events","$$legacy"]);const i=[["path",{d:"m18 15-6-6-6 6"}]];wn(e,Nt({name:"chevron-up"},()=>n,{get iconNode(){return i},children:(s,l)=>{var a=U(),c=N(a);ct(c,()=>t.children??St),y(s,a)},$$slots:{default:!0}})),dt()}function ZT(e,t){ut(t,!0);/**
|
|
79
|
+
* @license @lucide/svelte v0.482.0 - ISC
|
|
80
|
+
*
|
|
81
|
+
* ISC License
|
|
82
|
+
*
|
|
83
|
+
* 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.
|
|
84
|
+
*
|
|
85
|
+
* Permission to use, copy, modify, and/or distribute this software for any
|
|
86
|
+
* purpose with or without fee is hereby granted, provided that the above
|
|
87
|
+
* copyright notice and this permission notice appear in all copies.
|
|
88
|
+
*
|
|
89
|
+
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
90
|
+
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
91
|
+
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
|
92
|
+
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
93
|
+
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
94
|
+
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
95
|
+
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
96
|
+
*
|
|
97
|
+
*/let n=wt(t,["$$slots","$$events","$$legacy"]);const i=[["path",{d:"m7 15 5 5 5-5"}],["path",{d:"m7 9 5-5 5 5"}]];wn(e,Nt({name:"chevrons-up-down"},()=>n,{get iconNode(){return i},children:(s,l)=>{var a=U(),c=N(a);ct(c,()=>t.children??St),y(s,a)},$$slots:{default:!0}})),dt()}function jT(e,t){ut(t,!0);/**
|
|
98
|
+
* @license @lucide/svelte v0.482.0 - ISC
|
|
99
|
+
*
|
|
100
|
+
* ISC License
|
|
101
|
+
*
|
|
102
|
+
* 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.
|
|
103
|
+
*
|
|
104
|
+
* Permission to use, copy, modify, and/or distribute this software for any
|
|
105
|
+
* purpose with or without fee is hereby granted, provided that the above
|
|
106
|
+
* copyright notice and this permission notice appear in all copies.
|
|
107
|
+
*
|
|
108
|
+
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
109
|
+
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
110
|
+
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
|
111
|
+
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
112
|
+
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
113
|
+
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
114
|
+
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
115
|
+
*
|
|
116
|
+
*/let n=wt(t,["$$slots","$$events","$$legacy"]);const i=[["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"}]];wn(e,Nt({name:"download"},()=>n,{get iconNode(){return i},children:(s,l)=>{var a=U(),c=N(a);ct(c,()=>t.children??St),y(s,a)},$$slots:{default:!0}})),dt()}function QT(e,t){ut(t,!0);/**
|
|
117
|
+
* @license @lucide/svelte v0.482.0 - ISC
|
|
118
|
+
*
|
|
119
|
+
* ISC License
|
|
120
|
+
*
|
|
121
|
+
* 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.
|
|
122
|
+
*
|
|
123
|
+
* Permission to use, copy, modify, and/or distribute this software for any
|
|
124
|
+
* purpose with or without fee is hereby granted, provided that the above
|
|
125
|
+
* copyright notice and this permission notice appear in all copies.
|
|
126
|
+
*
|
|
127
|
+
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
128
|
+
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
129
|
+
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
|
130
|
+
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
131
|
+
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
132
|
+
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
133
|
+
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
134
|
+
*
|
|
135
|
+
*/let n=wt(t,["$$slots","$$events","$$legacy"]);const i=[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143"}],["path",{d:"m2 2 20 20"}]];wn(e,Nt({name:"eye-off"},()=>n,{get iconNode(){return i},children:(s,l)=>{var a=U(),c=N(a);ct(c,()=>t.children??St),y(s,a)},$$slots:{default:!0}})),dt()}function JT(e,t){ut(t,!0);/**
|
|
136
|
+
* @license @lucide/svelte v0.482.0 - ISC
|
|
137
|
+
*
|
|
138
|
+
* ISC License
|
|
139
|
+
*
|
|
140
|
+
* 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.
|
|
141
|
+
*
|
|
142
|
+
* Permission to use, copy, modify, and/or distribute this software for any
|
|
143
|
+
* purpose with or without fee is hereby granted, provided that the above
|
|
144
|
+
* copyright notice and this permission notice appear in all copies.
|
|
145
|
+
*
|
|
146
|
+
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
147
|
+
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
148
|
+
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
|
149
|
+
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
150
|
+
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
151
|
+
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
152
|
+
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
153
|
+
*
|
|
154
|
+
*/let n=wt(t,["$$slots","$$events","$$legacy"]);const i=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0"}],["circle",{cx:"12",cy:"12",r:"3"}]];wn(e,Nt({name:"eye"},()=>n,{get iconNode(){return i},children:(s,l)=>{var a=U(),c=N(a);ct(c,()=>t.children??St),y(s,a)},$$slots:{default:!0}})),dt()}function Tg(e,t){ut(t,!0);/**
|
|
155
|
+
* @license @lucide/svelte v0.482.0 - ISC
|
|
156
|
+
*
|
|
157
|
+
* ISC License
|
|
158
|
+
*
|
|
159
|
+
* 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.
|
|
160
|
+
*
|
|
161
|
+
* Permission to use, copy, modify, and/or distribute this software for any
|
|
162
|
+
* purpose with or without fee is hereby granted, provided that the above
|
|
163
|
+
* copyright notice and this permission notice appear in all copies.
|
|
164
|
+
*
|
|
165
|
+
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
166
|
+
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
167
|
+
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
|
168
|
+
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
169
|
+
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
170
|
+
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
171
|
+
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
172
|
+
*
|
|
173
|
+
*/let n=wt(t,["$$slots","$$events","$$legacy"]);const i=[["circle",{cx:"12",cy:"12",r:"10"}],["path",{d:"M12 16v-4"}],["path",{d:"M12 8h.01"}]];wn(e,Nt({name:"info"},()=>n,{get iconNode(){return i},children:(s,l)=>{var a=U(),c=N(a);ct(c,()=>t.children??St),y(s,a)},$$slots:{default:!0}})),dt()}function $T(e,t){ut(t,!0);/**
|
|
174
|
+
* @license @lucide/svelte v0.482.0 - ISC
|
|
175
|
+
*
|
|
176
|
+
* ISC License
|
|
177
|
+
*
|
|
178
|
+
* 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.
|
|
179
|
+
*
|
|
180
|
+
* Permission to use, copy, modify, and/or distribute this software for any
|
|
181
|
+
* purpose with or without fee is hereby granted, provided that the above
|
|
182
|
+
* copyright notice and this permission notice appear in all copies.
|
|
183
|
+
*
|
|
184
|
+
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
185
|
+
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
186
|
+
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
|
187
|
+
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
188
|
+
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
189
|
+
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
190
|
+
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
191
|
+
*
|
|
192
|
+
*/let n=wt(t,["$$slots","$$events","$$legacy"]);const i=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56"}]];wn(e,Nt({name:"loader-circle"},()=>n,{get iconNode(){return i},children:(s,l)=>{var a=U(),c=N(a);ct(c,()=>t.children??St),y(s,a)},$$slots:{default:!0}})),dt()}function la(e,t){ut(t,!0);/**
|
|
193
|
+
* @license @lucide/svelte v0.482.0 - ISC
|
|
194
|
+
*
|
|
195
|
+
* ISC License
|
|
196
|
+
*
|
|
197
|
+
* 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.
|
|
198
|
+
*
|
|
199
|
+
* Permission to use, copy, modify, and/or distribute this software for any
|
|
200
|
+
* purpose with or without fee is hereby granted, provided that the above
|
|
201
|
+
* copyright notice and this permission notice appear in all copies.
|
|
202
|
+
*
|
|
203
|
+
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
204
|
+
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
205
|
+
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
|
206
|
+
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
207
|
+
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
208
|
+
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
209
|
+
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
210
|
+
*
|
|
211
|
+
*/let n=wt(t,["$$slots","$$events","$$legacy"]);const i=[["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"}]];wn(e,Nt({name:"network"},()=>n,{get iconNode(){return i},children:(s,l)=>{var a=U(),c=N(a);ct(c,()=>t.children??St),y(s,a)},$$slots:{default:!0}})),dt()}function tE(e,t){ut(t,!0);/**
|
|
212
|
+
* @license @lucide/svelte v0.482.0 - ISC
|
|
213
|
+
*
|
|
214
|
+
* ISC License
|
|
215
|
+
*
|
|
216
|
+
* 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.
|
|
217
|
+
*
|
|
218
|
+
* Permission to use, copy, modify, and/or distribute this software for any
|
|
219
|
+
* purpose with or without fee is hereby granted, provided that the above
|
|
220
|
+
* copyright notice and this permission notice appear in all copies.
|
|
221
|
+
*
|
|
222
|
+
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
223
|
+
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
224
|
+
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
|
225
|
+
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
226
|
+
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
227
|
+
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
228
|
+
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
229
|
+
*
|
|
230
|
+
*/let n=wt(t,["$$slots","$$events","$$legacy"]);const i=[["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"}]];wn(e,Nt({name:"pencil"},()=>n,{get iconNode(){return i},children:(s,l)=>{var a=U(),c=N(a);ct(c,()=>t.children??St),y(s,a)},$$slots:{default:!0}})),dt()}function y_(e,t){ut(t,!0);/**
|
|
231
|
+
* @license @lucide/svelte v0.482.0 - ISC
|
|
232
|
+
*
|
|
233
|
+
* ISC License
|
|
234
|
+
*
|
|
235
|
+
* 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.
|
|
236
|
+
*
|
|
237
|
+
* Permission to use, copy, modify, and/or distribute this software for any
|
|
238
|
+
* purpose with or without fee is hereby granted, provided that the above
|
|
239
|
+
* copyright notice and this permission notice appear in all copies.
|
|
240
|
+
*
|
|
241
|
+
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
242
|
+
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
243
|
+
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
|
244
|
+
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
245
|
+
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
246
|
+
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
247
|
+
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
248
|
+
*
|
|
249
|
+
*/let n=wt(t,["$$slots","$$events","$$legacy"]);const i=[["polygon",{points:"6 3 20 12 6 21 6 3"}]];wn(e,Nt({name:"play"},()=>n,{get iconNode(){return i},children:(s,l)=>{var a=U(),c=N(a);ct(c,()=>t.children??St),y(s,a)},$$slots:{default:!0}})),dt()}function eE(e,t){ut(t,!0);/**
|
|
250
|
+
* @license @lucide/svelte v0.482.0 - ISC
|
|
251
|
+
*
|
|
252
|
+
* ISC License
|
|
253
|
+
*
|
|
254
|
+
* 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.
|
|
255
|
+
*
|
|
256
|
+
* Permission to use, copy, modify, and/or distribute this software for any
|
|
257
|
+
* purpose with or without fee is hereby granted, provided that the above
|
|
258
|
+
* copyright notice and this permission notice appear in all copies.
|
|
259
|
+
*
|
|
260
|
+
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
261
|
+
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
262
|
+
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
|
263
|
+
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
264
|
+
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
265
|
+
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
266
|
+
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
267
|
+
*
|
|
268
|
+
*/let n=wt(t,["$$slots","$$events","$$legacy"]);const i=[["circle",{cx:"11",cy:"11",r:"8"}],["path",{d:"m21 21-4.3-4.3"}]];wn(e,Nt({name:"search"},()=>n,{get iconNode(){return i},children:(s,l)=>{var a=U(),c=N(a);ct(c,()=>t.children??St),y(s,a)},$$slots:{default:!0}})),dt()}function nE(e,t){ut(t,!0);/**
|
|
269
|
+
* @license @lucide/svelte v0.482.0 - ISC
|
|
270
|
+
*
|
|
271
|
+
* ISC License
|
|
272
|
+
*
|
|
273
|
+
* 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.
|
|
274
|
+
*
|
|
275
|
+
* Permission to use, copy, modify, and/or distribute this software for any
|
|
276
|
+
* purpose with or without fee is hereby granted, provided that the above
|
|
277
|
+
* copyright notice and this permission notice appear in all copies.
|
|
278
|
+
*
|
|
279
|
+
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
280
|
+
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
281
|
+
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
|
282
|
+
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
283
|
+
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
284
|
+
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
285
|
+
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
286
|
+
*
|
|
287
|
+
*/let n=wt(t,["$$slots","$$events","$$legacy"]);const i=[["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"}]];wn(e,Nt({name:"settings"},()=>n,{get iconNode(){return i},children:(s,l)=>{var a=U(),c=N(a);ct(c,()=>t.children??St),y(s,a)},$$slots:{default:!0}})),dt()}function rE(e,t){ut(t,!0);/**
|
|
288
|
+
* @license @lucide/svelte v0.482.0 - ISC
|
|
289
|
+
*
|
|
290
|
+
* ISC License
|
|
291
|
+
*
|
|
292
|
+
* 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.
|
|
293
|
+
*
|
|
294
|
+
* Permission to use, copy, modify, and/or distribute this software for any
|
|
295
|
+
* purpose with or without fee is hereby granted, provided that the above
|
|
296
|
+
* copyright notice and this permission notice appear in all copies.
|
|
297
|
+
*
|
|
298
|
+
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
299
|
+
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
300
|
+
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
|
301
|
+
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
302
|
+
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
303
|
+
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
304
|
+
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
305
|
+
*
|
|
306
|
+
*/let n=wt(t,["$$slots","$$events","$$legacy"]);const i=[["path",{d:"m15 5 6.3 6.3a2.4 2.4 0 0 1 0 3.4L17 19"}],["path",{d:"M9.586 5.586A2 2 0 0 0 8.172 5H3a1 1 0 0 0-1 1v5.172a2 2 0 0 0 .586 1.414L8.29 18.29a2.426 2.426 0 0 0 3.42 0l3.58-3.58a2.426 2.426 0 0 0 0-3.42z"}],["circle",{cx:"6.5",cy:"9.5",r:".5",fill:"currentColor"}]];wn(e,Nt({name:"tags"},()=>n,{get iconNode(){return i},children:(s,l)=>{var a=U(),c=N(a);ct(c,()=>t.children??St),y(s,a)},$$slots:{default:!0}})),dt()}function iE(e,t){ut(t,!0);/**
|
|
307
|
+
* @license @lucide/svelte v0.482.0 - ISC
|
|
308
|
+
*
|
|
309
|
+
* ISC License
|
|
310
|
+
*
|
|
311
|
+
* 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.
|
|
312
|
+
*
|
|
313
|
+
* Permission to use, copy, modify, and/or distribute this software for any
|
|
314
|
+
* purpose with or without fee is hereby granted, provided that the above
|
|
315
|
+
* copyright notice and this permission notice appear in all copies.
|
|
316
|
+
*
|
|
317
|
+
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
318
|
+
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
319
|
+
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
|
320
|
+
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
321
|
+
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
322
|
+
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
323
|
+
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
324
|
+
*
|
|
325
|
+
*/let n=wt(t,["$$slots","$$events","$$legacy"]);const i=[["path",{d:"M3 6h18"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17"}]];wn(e,Nt({name:"trash-2"},()=>n,{get iconNode(){return i},children:(s,l)=>{var a=U(),c=N(a);ct(c,()=>t.children??St),y(s,a)},$$slots:{default:!0}})),dt()}function oE(e,t){ut(t,!0);/**
|
|
326
|
+
* @license @lucide/svelte v0.482.0 - ISC
|
|
327
|
+
*
|
|
328
|
+
* ISC License
|
|
329
|
+
*
|
|
330
|
+
* 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.
|
|
331
|
+
*
|
|
332
|
+
* Permission to use, copy, modify, and/or distribute this software for any
|
|
333
|
+
* purpose with or without fee is hereby granted, provided that the above
|
|
334
|
+
* copyright notice and this permission notice appear in all copies.
|
|
335
|
+
*
|
|
336
|
+
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
337
|
+
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
338
|
+
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
|
339
|
+
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
340
|
+
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
341
|
+
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
342
|
+
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
343
|
+
*
|
|
344
|
+
*/let n=wt(t,["$$slots","$$events","$$legacy"]);const i=[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"}],["polyline",{points:"17 8 12 3 7 8"}],["line",{x1:"12",x2:"12",y1:"3",y2:"15"}]];wn(e,Nt({name:"upload"},()=>n,{get iconNode(){return i},children:(s,l)=>{var a=U(),c=N(a);ct(c,()=>t.children??St),y(s,a)},$$slots:{default:!0}})),dt()}function Vp(e,t){ut(t,!0);/**
|
|
345
|
+
* @license @lucide/svelte v0.482.0 - ISC
|
|
346
|
+
*
|
|
347
|
+
* ISC License
|
|
348
|
+
*
|
|
349
|
+
* 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.
|
|
350
|
+
*
|
|
351
|
+
* Permission to use, copy, modify, and/or distribute this software for any
|
|
352
|
+
* purpose with or without fee is hereby granted, provided that the above
|
|
353
|
+
* copyright notice and this permission notice appear in all copies.
|
|
354
|
+
*
|
|
355
|
+
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
356
|
+
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
357
|
+
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
|
358
|
+
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
359
|
+
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
360
|
+
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
361
|
+
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
362
|
+
*
|
|
363
|
+
*/let n=wt(t,["$$slots","$$events","$$legacy"]);const i=[["path",{d:"M18 6 6 18"}],["path",{d:"m6 6 12 12"}]];wn(e,Nt({name:"x"},()=>n,{get iconNode(){return i},children:(s,l)=>{var a=U(),c=N(a);ct(c,()=>t.children??St),y(s,a)},$$slots:{default:!0}})),dt()}/**
|
|
364
|
+
* @license @lucide/svelte v0.482.0 - ISC
|
|
365
|
+
*
|
|
366
|
+
* ISC License
|
|
367
|
+
*
|
|
368
|
+
* 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.
|
|
369
|
+
*
|
|
370
|
+
* Permission to use, copy, modify, and/or distribute this software for any
|
|
371
|
+
* purpose with or without fee is hereby granted, provided that the above
|
|
372
|
+
* copyright notice and this permission notice appear in all copies.
|
|
373
|
+
*
|
|
374
|
+
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
375
|
+
* WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
376
|
+
* MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
|
377
|
+
* ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
378
|
+
* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
379
|
+
* ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
380
|
+
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
381
|
+
*
|
|
382
|
+
*/const sE=Object.freeze(Object.defineProperty({__proto__:null,default:zp},Symbol.toStringTag,{value:"Module"}));var aE=Z('<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 Hp(e,t){var n=aE(),i=q(n),s=q(i,!0);K(i);var l=nt(i,2),a=q(l);ct(a,()=>t.children),K(l),K(n),Mt(()=>me(s,t.title)),y(e,n)}function lE(e=100){let t;return n=>{clearTimeout(t),t=setTimeout(n,e)}}function cE(e=200){let t,n;return(i,s)=>l=>{t&&(Math.abs(l-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=l}}const ep={ceil:(e,t)=>Math.ceil(e/t)*t,floor:(e,t)=>~~(e/t)*t},uE=(e,t,n,i,s,l)=>{const a=[],c=ep.floor(l/t*i,i),d=c>s?c-s:0,h=c>0&&d>=0?d:c,p=Math.min(e,ep.ceil((l+n)/t*i,i))+s,v=p<e?p:e;for(let b=h;b<v;b++)a.push(b);return a},Vz=(e,t,n,i,s)=>{const l=[],a=~~(s/t),c=a>i?a-i:0,d=c>=0?c:a,g=Math.min(e,~~((s+n)/t))+i,p=g<e?g:e;for(let v=d;v<p;v++)l.push(v);return l},w_=(e,t)=>~~(e/t),dE=lE(),fE=cE();var hE=Z("<div><!></div>"),gE=Z("<div><!> <div></div> <!></div>");function Wp(e,t){ut(t,!0);let n=k(t,"width",3,"100%"),i=k(t,"overScan",3,1),s=k(t,"marginLeft",3,0),l=k(t,"marginTop",3,0),a=k(t,"scrollPosition",15,0),c=k(t,"scrollBehavior",3,"auto"),d=k(t,"getKey",3,at=>at),h=wt(t,["$$slots","$$events","$$legacy","itemCount","itemHeight","itemWidth","height","width","overScan","marginLeft","marginTop","scrollPosition","scrollBehavior","getKey","columnCount","onscroll","header","item","placeholder","footer"]),g=pt(void 0),p=pt(_n(a())),v=pt(0),b=pt(0),w=pt(0),S=pt(_n([])),x=!1,A=!1,T=pt(!1);function D(at,st=c()){L(w_(at,f(j))*t.itemHeight+l()+f(v),st)}function R(at,st=c()){L(at,st)}const L=(at,st=c())=>{f(g)&&(x=!0,f(g).scrollTo({top:at,behavior:st}),x=!1)},V=at=>{f(g)&&!x&&!A&&(x=!0,f(g).scrollTo({top:at,behavior:c()}),x=!1)},M=at=>{const st=w_(at,f(j)),xt=at%f(j);return{rowIndex:st,columnIndex:xt,style:`position: absolute; transform: translate3d(${xt*t.itemWidth+s()}px, ${st*t.itemHeight+l()}px, 0px); height: ${t.itemHeight}px; width: ${t.itemWidth}px; will-change: transform;`}},H=at=>{A=!0,x||(O(p,Math.max(0,at.currentTarget.scrollTop-f(v)),!0),a(at.currentTarget.scrollTop),f(G)(f(p))),dE(()=>{A=!1})};let j=E(()=>t.columnCount?t.columnCount:Math.max(~~((f(b)-s()-(f(b)-f(w)))/t.itemWidth),1)),tt=E(()=>ep.ceil(t.itemCount,f(j))*t.itemHeight/f(j)),it=E(()=>f(j)*i());be(()=>{(f(b)||f(j))&&O(S,uE(t.itemCount,t.itemHeight,t.height,f(j),f(it),f(p)),!0)}),be(()=>{f(g)&&V(a())});let G=E(()=>fE(t.height,{fast:()=>{O(T,!0)},slow:()=>{O(T,!1)}}));var ot={scrollToIndex:D,scrollToPosition:R},Y=gE(),J=at=>{var st;H(at),(st=t.onscroll)==null||st.call(t,at)};Vt(Y,at=>({onscroll:J,...h,[mT]:at}),[()=>({position:"relative",overflow:"auto",height:`${t.height??""}px`,width:n()})]);var et=q(Y);{var rt=at=>{var st=hE(),xt=q(st);ct(xt,()=>t.header),K(st),kg(st,"offsetHeight",Lt=>O(v,Lt)),y(at,st)};gt(et,at=>{t.header&&at(rt)})}var ht=nt(et,2);let bt;Wr(ht,21,()=>f(S),at=>d()(at),(at,st)=>{const xt=E(()=>{const{rowIndex:Ut,columnIndex:Et,style:Ct}=M(f(st));return{rowIndex:Ut,columnIndex:Et,style:Ct}});var Lt=U(),Wt=N(Lt);{var Bt=Ut=>{var Et=U(),Ct=N(Et);ct(Ct,()=>t.item,()=>({index:f(st),rowIndex:f(xt).rowIndex,columnIndex:f(xt).columnIndex,style:f(xt).style})),y(Ut,Et)},de=Ut=>{var Et=U(),Ct=N(Et);ct(Ct,()=>t.placeholder,()=>({index:f(st),rowIndex:f(xt).rowIndex,columnIndex:f(xt).columnIndex,style:f(xt).style})),y(Ut,Et)};gt(Wt,Ut=>{!f(T)||!t.placeholder?Ut(Bt):Ut(de,!1)})}y(at,Lt)}),K(ht);var yt=nt(ht,2);return ct(yt,()=>t.footer??St),K(Y),yn(Y,at=>O(g,at),()=>f(g)),Mt(at=>bt=Mn(ht,"",bt,at),[()=>({height:`${f(tt)??""}px`,width:"100%"})]),kg(Y,"offsetWidth",at=>O(b,at)),kg(Y,"clientWidth",at=>O(w,at)),y(e,Y),dt(ot)}const iy=({datasetId:e})=>{const t=KT(TT());return t.subscribe(()=>{}),{updateAnnotations:i=>new Promise((s,l)=>{Pn(t).mutate({path:{dataset_id:e},body:i},{onSuccess:()=>{s()},onError:a=>{l(a)}})})}},pE=(...e)=>{const t=ET(...e),n=$e(!1),i=ry({...t,getNextPageParam:d=>d.nextCursor||void 0}),s=wu(),l=()=>{s.invalidateQueries({queryKey:t.queryKey}),s.invalidateQueries({queryKey:Dp({path:{dataset_id:a}}).queryKey})},a=e[0].path.dataset_id,{updateAnnotations:c}=iy({datasetId:a});return{annotations:i,refresh:l,isPending:n,updateAnnotations:async d=>{try{n.set(!0),await c(d),l(),Ur.success("Annotations updated successfully")}catch(h){Ur.error("Failed to update annotations:"+h.message)}finally{n.set(!1)}}}};var vE=Z('<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 oy(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"},l={left:"text-start",center:"text-center",right:"text-end"};var a=vE(),c=q(a);te(2),K(a),Mt(()=>Ln(c,0,s[n()]+" "+l[i()]+" spinner inline animate-spin text-gray-200 dark:text-gray-600","svelte-uqfq9v")),y(e,a)}function mE(e){return typeof e=="function"}function bE(e){return e!==null&&typeof e=="object"}const _E=["string","number","bigint","boolean"];function np(e){return e==null||_E.includes(typeof e)?!0:Array.isArray(e)?e.every(t=>np(t)):typeof e=="object"?Object.getPrototypeOf(e)===Object.prototype:!1}const ua=Symbol("box"),Up=Symbol("is-writable");function yE(e){return bE(e)&&ua in e}function wE(e){return B.isBox(e)&&Up in e}function B(e){let t=pt(_n(e));return{[ua]:!0,[Up]:!0,get current(){return f(t)},set current(n){O(t,n,!0)}}}function xE(e,t){const n=E(e);return t?{[ua]:!0,[Up]:!0,get current(){return f(n)},set current(i){t(i)}}:{[ua]:!0,get current(){return e()}}}function SE(e){return B.isBox(e)?e:mE(e)?B.with(e):B(e)}function CE(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 AE(e){return B.isWritableBox(e)?{[ua]:!0,get current(){return e.current}}:e}B.from=SE;B.with=xE;B.flatten=CE;B.readonly=AE;B.isBox=yE;B.isWritableBox=wE;function sy(...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 Fr=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function ay(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ly={},x_=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,PE=/\n/g,kE=/^\s*/,TE=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,EE=/^:\s*/,IE=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,OE=/^[;\s]*/,RE=/^\s+|\s+$/g,NE=`
|
|
383
|
+
`,S_="/",C_="*",go="",ME="comment",LE="declaration",DE=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(w){var S=w.match(PE);S&&(n+=S.length);var x=w.lastIndexOf(NE);i=~x?w.length-x:i+w.length}function l(){var w={line:n,column:i};return function(S){return S.position=new a(w),h(),S}}function a(w){this.start=w,this.end={line:n,column:i},this.source=t.source}a.prototype.content=e;function c(w){var S=new Error(t.source+":"+n+":"+i+": "+w);if(S.reason=w,S.filename=t.source,S.line=n,S.column=i,S.source=e,!t.silent)throw S}function d(w){var S=w.exec(e);if(S){var x=S[0];return s(x),e=e.slice(x.length),S}}function h(){d(kE)}function g(w){var S;for(w=w||[];S=p();)S!==!1&&w.push(S);return w}function p(){var w=l();if(!(S_!=e.charAt(0)||C_!=e.charAt(1))){for(var S=2;go!=e.charAt(S)&&(C_!=e.charAt(S)||S_!=e.charAt(S+1));)++S;if(S+=2,go===e.charAt(S-1))return c("End of comment missing");var x=e.slice(2,S-2);return i+=2,s(x),e=e.slice(S),i+=2,w({type:ME,comment:x})}}function v(){var w=l(),S=d(TE);if(S){if(p(),!d(EE))return c("property missing ':'");var x=d(IE),A=w({type:LE,property:A_(S[0].replace(x_,go)),value:x?A_(x[0].replace(x_,go)):go});return d(OE),A}}function b(){var w=[];g(w);for(var S;S=v();)S!==!1&&(w.push(S),g(w));return w}return h(),b()};function A_(e){return e?e.replace(RE,go):go}var FE=Fr&&Fr.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(ly,"__esModule",{value:!0});var P_=ly.default=zE,BE=FE(DE);function zE(e,t){var n=null;if(!e||typeof e!="string")return n;var i=(0,BE.default)(e),s=typeof t=="function";return i.forEach(function(l){if(l.type==="declaration"){var a=l.property,c=l.value;s?t(a,c,l):c&&(n=n||{},n[a]=c)}}),n}const VE=P_.default||P_,HE=/\d/,WE=["-","_","/","."];function UE(e=""){if(!HE.test(e))return e!==e.toLowerCase()}function GE(e){const t=[];let n="",i,s;for(const l of e){const a=WE.includes(l);if(a===!0){t.push(n),n="",i=void 0;continue}const c=UE(l);if(s===!1){if(i===!1&&c===!0){t.push(n),n=l,i=c;continue}if(i===!0&&c===!1&&n.length>1){const d=n.at(-1);t.push(n.slice(0,Math.max(0,n.length-1))),n=d+l,i=c;continue}}n+=l,i=c,s=a}return t.push(n),t}function cy(e){return e?GE(e).map(t=>qE(t)).join(""):""}function KE(e){return YE(cy(e||""))}function qE(e){return e?e[0].toUpperCase()+e.slice(1):""}function YE(e){return e?e[0].toLowerCase()+e.slice(1):""}function ia(e){if(!e)return{};const t={};function n(i,s){if(i.startsWith("-moz-")||i.startsWith("-webkit-")||i.startsWith("-ms-")||i.startsWith("-o-")){t[cy(i)]=s;return}if(i.startsWith("--")){t[i]=s;return}t[KE(i)]=s}return VE(e,n),t}function _i(...e){return(...t)=>{for(const n of e)typeof n=="function"&&n(...t)}}function XE(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 ZE=XE(/[A-Z]/,e=>`-${e.toLowerCase()}`);function jE(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=>`${ZE(t)}: ${e[t]};`).join(`
|
|
384
|
+
`)}function Gp(e={}){return jE(e).replace(`
|
|
385
|
+
`," ")}const uy={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%)"},QE=Gp(uy);function JE(e){var t;return e.length>2&&e.startsWith("on")&&e[2]===((t=e[2])==null?void 0:t.toLowerCase())}function Jt(...e){const t={...e[0]};for(let n=1;n<e.length;n++){const i=e[n];for(const s in i){const l=t[s],a=i[s],c=typeof l=="function",d=typeof a=="function";if(c&&JE(s)){const h=l,g=a;t[s]=sy(h,g)}else if(c&&d)t[s]=_i(l,a);else if(s==="class"){const h=np(l),g=np(a);h&&g?t[s]=Dd(l,a):h?t[s]=Dd(l):g&&(t[s]=Dd(a))}else if(s==="style"){const h=typeof l=="object",g=typeof a=="object",p=typeof l=="string",v=typeof a=="string";if(h&&g)t[s]={...l,...a};else if(h&&v){const b=ia(a);t[s]={...l,...b}}else if(p&&g){const b=ia(l);t[s]={...b,...a}}else if(p&&v){const b=ia(l),w=ia(a);t[s]={...b,...w}}else h?t[s]=l:g?t[s]=a:p?t[s]=l:v&&(t[s]=a)}else t[s]=a!==void 0?a:l}}return typeof t.style=="object"&&(t.style=Gp(t.style).replaceAll(`
|
|
386
|
+
`," ")),t.hidden!==!0&&(t.hidden=void 0,delete t.hidden),t.disabled!==!0&&(t.disabled=void 0,delete t.disabled),t}const dy=typeof window<"u"?window:void 0;function $E(e){let t=e.activeElement;for(;t!=null&&t.shadowRoot;){const n=t.shadowRoot.activeElement;if(n===t)break;t=n}return t}var rs,ya;class tI{constructor(t={}){z(this,rs);z(this,ya);const{window:n=dy,document:i=n==null?void 0:n.document}=t;n!==void 0&&(He(this,rs,i),He(this,ya,dT(s=>{const l=rn(n,"focusin",s),a=rn(n,"focusout",s);return()=>{l(),a()}})))}get current(){var t;return(t=_(this,ya))==null||t.call(this),_(this,rs)?$E(_(this,rs)):null}}rs=new WeakMap,ya=new WeakMap;new tI;function eI(e){return typeof e=="function"}function nI(e,t){switch(e){case"post":be(t);break;case"pre":Wf(t);break}}function fy(e,t,n,i={}){const{lazy:s=!1}=i;let l=!s,a=Array.isArray(e)?[]:void 0;nI(t,()=>{const c=Array.isArray(e)?e.map(h=>h()):e();if(!l){l=!0,a=c;return}const d=Br(()=>n(c,a));return a=c,d})}function Ce(e,t,n){fy(e,"post",t,n)}function rI(e,t,n){fy(e,"pre",t,n)}Ce.pre=rI;function iI(e){return eI(e)?e():e}var gi;class oI{constructor(t,n={box:"border-box"}){z(this,gi,pt(_n({width:0,height:0})));var s,l;const i=n.window??dy;O(_(this,gi),{width:((s=n.initialSize)==null?void 0:s.width)??0,height:((l=n.initialSize)==null?void 0:l.height)??0},!0),be(()=>{if(!i)return;const a=iI(t);if(!a)return;const c=new i.ResizeObserver(d=>{for(const h of d){const g=n.box==="content-box"?h.contentBoxSize:h.borderBoxSize,p=Array.isArray(g)?g:[g];f(_(this,gi)).width=p.reduce((v,b)=>Math.max(v,b.inlineSize),0),f(_(this,gi)).height=p.reduce((v,b)=>Math.max(v,b.blockSize),0)}});return c.observe(a),()=>{c.disconnect()}})}get current(){return f(_(this,gi))}get width(){return f(_(this,gi)).width}get height(){return f(_(this,gi)).height}}gi=new WeakMap;var wa,xa;class hy{constructor(t){z(this,wa,pt(void 0));z(this,xa);be(()=>{O(_(this,wa),_(this,xa),!0),He(this,xa,t())})}get current(){return f(_(this,wa))}}wa=new WeakMap,xa=new WeakMap;var Sa,pi;class kn{constructor(t){z(this,Sa);z(this,pi);He(this,Sa,t),He(this,pi,Symbol(t))}get key(){return _(this,pi)}exists(){return oT(_(this,pi))}get(){const t=h_(_(this,pi));if(t===void 0)throw new Error(`Context "${_(this,Sa)}" not found`);return t}getOr(t){const n=h_(_(this,pi));return n===void 0?t:n}set(t){return sT(_(this,pi),t)}}Sa=new WeakMap,pi=new WeakMap;function Kp(e){be(()=>()=>{e()})}function ae({id:e,ref:t,deps:n=()=>!0,onRefChange:i,getRootNode:s}){Ce([()=>e.current,n],([l])=>{const a=(s==null?void 0:s())??document,c=a==null?void 0:a.getElementById(l);c?t.current=c:t.current=null,i==null||i(t.current)}),Kp(()=>{t.current=null,i==null||i(null)})}function xu(e,t){return setTimeout(t,e)}function nr(e){Hf().then(e)}function qp(e){be(()=>Br(()=>e()))}function eo(e){return e?"open":"closed"}function sI(e){return e?"checked":"unchecked"}function Yp(e){return e?"true":"false"}function Su(e){return e?"true":"false"}function Zn(e){return e?"":void 0}function gy(e){return e?"true":"false"}function py(e){return e?"true":"false"}function vy(e,t){return t?"mixed":e?"true":"false"}function Hz(e){return e}function aI(e){return e?"true":void 0}function Wz(e){return e}function lI(e){return e?"":void 0}function cI(e){return e?"":void 0}function uI(e){return e?!0:void 0}function Xp(e){return e?!0:void 0}function dI(e){return e?!0:void 0}const xr="ArrowDown",Cu="ArrowLeft",Au="ArrowRight",gr="ArrowUp",Ss="End",Gr="Enter",fI="Escape",Cs="Home",my="PageDown",by="PageUp",zr=" ",rp="Tab",hI="p",gI="n",pI="j",vI="k";function mI(e){return window.getComputedStyle(e).getPropertyValue("direction")}function bI(e="ltr",t="horizontal"){return{horizontal:e==="rtl"?Cu:Au,vertical:xr}[t]}function _I(e="ltr",t="horizontal"){return{horizontal:e==="rtl"?Au:Cu,vertical:gr}[t]}function yI(e="ltr",t="horizontal"){return["ltr","rtl"].includes(e)||(e="ltr"),["horizontal","vertical"].includes(t)||(t="horizontal"),{nextKey:bI(e,t),prevKey:_I(e,t)}}const Kf=typeof document<"u",ip=wI();function wI(){var e,t;return Kf&&((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 op(e){return e instanceof HTMLElement}function _y(e){return e instanceof Element}function yy(e){return e instanceof Element||e instanceof SVGElement}function xI(e){return e!==null}function SI(e){return e instanceof HTMLInputElement&&"select"in e}function CI(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}function AI(e){const t=B(null);function n(){if(!Kf)return[];const a=document.getElementById(e.rootNodeId.current);return a?e.candidateSelector?Array.from(a.querySelectorAll(e.candidateSelector)):e.candidateAttr?Array.from(a.querySelectorAll(`[${e.candidateAttr}]:not([data-disabled])`)):[]:[]}function i(){var c;const a=n();a.length&&((c=a[0])==null||c.focus())}function s(a,c,d=!1){var D;const h=document.getElementById(e.rootNodeId.current);if(!h||!a)return;const g=n();if(!g.length)return;const p=g.indexOf(a),v=mI(h),{nextKey:b,prevKey:w}=yI(v,e.orientation.current),S=e.loop.current,x={[b]:p+1,[w]:p-1,[Cs]:0,[Ss]:g.length-1};if(d){const R=b===xr?Au:xr,L=w===gr?Cu:gr;x[R]=p+1,x[L]=p-1}let A=x[c.key];if(A===void 0)return;c.preventDefault(),A<0&&S?A=g.length-1:A===g.length&&S&&(A=0);const T=g[A];if(T)return T.focus(),t.current=T.id,(D=e.onCandidateFocus)==null||D.call(e,T),T}function l(a){const c=n(),d=t.current!==null;return a&&!d&&c[0]===a?(t.current=a.id,0):(a==null?void 0:a.id)===t.current?0:-1}return{setCurrentTabStopId(a){t.current=a},getTabIndex:l,handleKeydown:s,focusFirstCandidate:i,currentTabStopId:t}}globalThis.bitsIdCounter??(globalThis.bitsIdCounter={current:0});function le(e="bits"){return globalThis.bitsIdCounter.current++,`${e}-${globalThis.bitsIdCounter.current}`}function Ae(){}function PI(e,t){const n=B(e);function i(l){return t[n.current][l]??n.current}return{state:n,dispatch:l=>{n.current=i(l)}}}function kI(e,t){let n=pt(_n({})),i=pt("none");const s=e.current?"mounted":"unmounted";let l=pt(null);const a=new hy(()=>e.current);Ce([()=>t.current,()=>e.current],([v,b])=>{!v||!b||nr(()=>{O(l,document.getElementById(v),!0)})});const{state:c,dispatch:d}=PI(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});Ce(()=>e.current,v=>{if(f(l)||O(l,document.getElementById(t.current),!0),!f(l)||!(v!==a.current))return;const w=f(i),S=xd(f(l));v?d("MOUNT"):S==="none"||f(n).display==="none"?d("UNMOUNT"):d(a&&w!==S?"ANIMATION_OUT":"UNMOUNT")});function h(v){if(f(l)||O(l,document.getElementById(t.current),!0),!f(l))return;const b=xd(f(l)),w=b.includes(v.animationName)||b==="none";v.target===f(l)&&w&&d("ANIMATION_END")}function g(v){f(l)||O(l,document.getElementById(t.current),!0),f(l)&&v.target===f(l)&&O(i,xd(f(l)),!0)}Ce(()=>c.current,()=>{if(f(l)||O(l,document.getElementById(t.current),!0),!f(l))return;const v=xd(f(l));O(i,c.current==="mounted"?v:"none",!0)}),Ce(()=>f(l),v=>{if(v)return O(n,getComputedStyle(v),!0),_i(rn(v,"animationstart",g),rn(v,"animationcancel",h),rn(v,"animationend",h))});const p=E(()=>["mounted","unmountSuspended"].includes(c.current));return{get current(){return f(p)}}}function xd(e){return e&&getComputedStyle(e).animationName||"none"}function qf(e,t){ut(t,!0);const n=kI(B.with(()=>t.present),B.with(()=>t.id));var i=U(),s=N(i);{var l=a=>{var c=U(),d=N(c);ct(d,()=>t.presence??St,()=>({present:n})),y(a,c)};gt(s,a=>{(t.forceMount||t.present||n.current)&&a(l)})}y(e,i),dt()}function TI(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 Ca,Aa,Pa,ka,Ta,Ea,Ia,Oa,Ra,Na;class EI{constructor(t){$(this,"opts");z(this,Ca,pt(null));z(this,Aa,pt(null));z(this,Pa,pt(null));z(this,ka,pt(void 0));z(this,Ta,pt(void 0));z(this,Ea,pt(void 0));z(this,Ia,pt(void 0));z(this,Oa,pt(null));z(this,Ra,E(()=>TI(this.opts.variant.current)));z(this,Na,E(()=>({"data-state":eo(this.opts.open.current)})));this.opts=t,this.handleOpen=this.handleOpen.bind(this),this.handleClose=this.handleClose.bind(this)}get triggerNode(){return f(_(this,Ca))}set triggerNode(t){O(_(this,Ca),t,!0)}get contentNode(){return f(_(this,Aa))}set contentNode(t){O(_(this,Aa),t,!0)}get descriptionNode(){return f(_(this,Pa))}set descriptionNode(t){O(_(this,Pa),t,!0)}get contentId(){return f(_(this,ka))}set contentId(t){O(_(this,ka),t,!0)}get titleId(){return f(_(this,Ta))}set titleId(t){O(_(this,Ta),t,!0)}get triggerId(){return f(_(this,Ea))}set triggerId(t){O(_(this,Ea),t,!0)}get descriptionId(){return f(_(this,Ia))}set descriptionId(t){O(_(this,Ia),t,!0)}get cancelNode(){return f(_(this,Oa))}set cancelNode(t){O(_(this,Oa),t,!0)}get attrs(){return f(_(this,Ra))}set attrs(t){O(_(this,Ra),t)}handleOpen(){this.opts.open.current||(this.opts.open.current=!0)}handleClose(){this.opts.open.current&&(this.opts.open.current=!1)}get sharedProps(){return f(_(this,Na))}set sharedProps(t){O(_(this,Na),t)}}Ca=new WeakMap,Aa=new WeakMap,Pa=new WeakMap,ka=new WeakMap,Ta=new WeakMap,Ea=new WeakMap,Ia=new WeakMap,Oa=new WeakMap,Ra=new WeakMap,Na=new WeakMap;var Ma;class II{constructor(t,n){$(this,"opts");$(this,"root");z(this,Ma,E(()=>({id:this.opts.id.current,"aria-haspopup":"dialog","aria-expanded":Su(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,ae({...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===zr||t.key===Gr)&&(t.preventDefault(),this.root.handleOpen())}get props(){return f(_(this,Ma))}set props(t){O(_(this,Ma),t)}}Ma=new WeakMap;var pf,La;class OI{constructor(t,n){$(this,"opts");$(this,"root");z(this,pf,E(()=>this.root.attrs[this.opts.variant.current]));z(this,La,E(()=>({id:this.opts.id.current,[f(_(this,pf))]:"",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),ae({...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===zr||t.key===Gr)&&(t.preventDefault(),this.root.handleClose())}get props(){return f(_(this,La))}set props(t){O(_(this,La),t)}}pf=new WeakMap,La=new WeakMap;var Da;class RI{constructor(t,n){$(this,"opts");$(this,"root");z(this,Da,E(()=>({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,ae({...t,onRefChange:i=>{this.root.titleId=i==null?void 0:i.id},deps:()=>this.root.opts.open.current})}get props(){return f(_(this,Da))}set props(t){O(_(this,Da),t)}}Da=new WeakMap;var Fa;class NI{constructor(t,n){$(this,"opts");$(this,"root");z(this,Fa,E(()=>({id:this.opts.id.current,[this.root.attrs.description]:"",...this.root.sharedProps})));this.opts=t,this.root=n,ae({...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 f(_(this,Fa))}set props(t){O(_(this,Fa),t)}}Fa=new WeakMap;var Ba,za;class MI{constructor(t,n){$(this,"opts");$(this,"root");z(this,Ba,E(()=>({open:this.root.opts.open.current})));z(this,za,E(()=>({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,ae({...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 f(_(this,Ba))}set snippetProps(t){O(_(this,Ba),t)}get props(){return f(_(this,za))}set props(t){O(_(this,za),t)}}Ba=new WeakMap,za=new WeakMap;var Va,Ha;class LI{constructor(t,n){$(this,"opts");$(this,"root");z(this,Va,E(()=>({open:this.root.opts.open.current})));z(this,Ha,E(()=>({id:this.opts.id.current,[this.root.attrs.overlay]:"",style:{pointerEvents:"auto"},...this.root.sharedProps})));this.opts=t,this.root=n,ae({...t,deps:()=>this.root.opts.open.current})}get snippetProps(){return f(_(this,Va))}set snippetProps(t){O(_(this,Va),t)}get props(){return f(_(this,Ha))}set props(t){O(_(this,Ha),t)}}Va=new WeakMap,Ha=new WeakMap;const ko=new kn("Dialog.Root");function DI(e){return ko.set(new EI(e))}function FI(e){return new II(e,ko.get())}function BI(e){return new RI(e,ko.get())}function zI(e){return new MI(e,ko.get())}function VI(e){return new LI(e,ko.get())}function HI(e){return new NI(e,ko.get())}function WI(e){return new OI(e,ko.get())}var UI=Z("<div><!></div>");function GI(e,t){ut(t,!0);let n=k(t,"id",19,le),i=k(t,"ref",15,null),s=k(t,"level",3,2),l=wt(t,["$$slots","$$events","$$legacy","id","ref","child","children","level"]);const a=BI({id:B.with(()=>n()),level:B.with(()=>s()),ref:B.with(()=>i(),v=>i(v))}),c=E(()=>Jt(l,a.props));var d=U(),h=N(d);{var g=v=>{var b=U(),w=N(b);ct(w,()=>t.child,()=>({props:f(c)})),y(v,b)},p=v=>{var b=UI();Vt(b,()=>({...f(c)}));var w=q(b);ct(w,()=>t.children??St),K(b),y(v,b)};gt(h,v=>{t.child?v(g):v(p,!1)})}y(e,d),dt()}function KI(e,t){var n=U(),i=N(n);bi(i,()=>t.children,s=>{var l=U(),a=N(l);ct(a,()=>t.children??St),y(s,l)}),y(e,n)}function Pu(e,t){ut(t,!0);let n=k(t,"to",3,"body");const i=aT();let s=E(l);function l(){if(!Kf||t.disabled)return null;let p=null;return typeof n()=="string"?p=document.querySelector(n()):(n()instanceof HTMLElement||n()instanceof DocumentFragment)&&(p=n()),p}let a;function c(){a&&(hT(a),a=null)}Ce([()=>f(s),()=>t.disabled],([p,v])=>{if(!p||v){c();return}return a=fT(KI,{target:p,props:{children:t.children},context:i}),()=>{c()}});var d=U(),h=N(d);{var g=p=>{var v=U(),b=N(v);ct(b,()=>t.children??St),y(p,v)};gt(h,p=>{t.disabled&&p(g)})}y(e,d),dt()}function wy(e,t,n,i){const s=Array.isArray(t)?t:[t];return s.forEach(l=>e.addEventListener(l,n,i)),()=>{s.forEach(l=>e.removeEventListener(l,n,i))}}class xy{constructor(t,n={bubbles:!0,cancelable:!0}){$(this,"eventName");$(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=l=>{n(l)};return rn(t,this.eventName,s,i)}}function k_(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 Zp(e,t){return e===t||e.contains(t)}function Sy(e){return(e==null?void 0:e.ownerDocument)??document}function qI(e){if(!e)return null;for(const t of e.childNodes)if(t.nodeType!==Node.COMMENT_NODE)return t;return null}function YI(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 is,mo,Xi,os,ss,Zi,Wa,Ua,vi,vf,ws,Cy,mf,as,bf,_f,yf,wf,Ga,Ay,xf,Sf;class XI{constructor(t){z(this,ws);$(this,"opts");z(this,is);z(this,mo);z(this,Xi,{pointerdown:!1});z(this,os,!1);z(this,ss,!1);$(this,"node",B(null));z(this,Zi);z(this,Wa);z(this,Ua,pt(null));z(this,vi,Ae);z(this,vf,t=>{t.defaultPrevented||this.currNode&&nr(()=>{var n,i;!this.currNode||_(this,wf).call(this,t.target)||t.target&&!_(this,ss)&&((i=(n=_(this,Wa)).current)==null||i.call(n,t))})});z(this,mf,t=>{let n=t;n.defaultPrevented&&(n=T_(t)),_(this,is).current(t)});z(this,as,k_(t=>{if(!this.currNode){_(this,vi).call(this);return}const n=this.opts.isValidEvent.current(t,this.currNode)||JI(t,this.currNode);if(!_(this,os)||Tt(this,ws,Ay).call(this)||!n){_(this,vi).call(this);return}let i=t;if(i.defaultPrevented&&(i=T_(i)),_(this,mo).current!=="close"&&_(this,mo).current!=="defer-otherwise-close"){_(this,vi).call(this);return}t.pointerType==="touch"?(_(this,vi).call(this),He(this,vi,wy(_(this,Zi),"click",_(this,mf),{once:!0}))):_(this,is).current(i)},10));z(this,bf,t=>{_(this,Xi)[t.type]=!0});z(this,_f,t=>{_(this,Xi)[t.type]=!1});z(this,yf,()=>{this.node.current&&He(this,os,QI(this.node.current))});z(this,wf,t=>this.node.current?Zp(this.node.current,t):!1);z(this,Ga,k_(()=>{for(const t in _(this,Xi))_(this,Xi)[t]=!1;He(this,os,!1)},20));z(this,xf,()=>{He(this,ss,!0)});z(this,Sf,()=>{He(this,ss,!1)});$(this,"props",{onfocuscapture:_(this,xf),onblurcapture:_(this,Sf)});this.opts=t,ae({id:t.id,ref:this.node,deps:()=>t.enabled.current,onRefChange:s=>{this.currNode=s}}),He(this,mo,t.interactOutsideBehavior),He(this,is,t.onInteractOutside),He(this,Wa,t.onFocusOutside),be(()=>{He(this,Zi,Sy(this.currNode))});let n=Ae;const i=()=>{_(this,Ga).call(this),globalThis.bitsDismissableLayers.delete(this),_(this,as).destroy(),n()};Ce([()=>this.opts.enabled.current,()=>this.currNode],([s,l])=>{if(!(!s||!l))return xu(1,()=>{this.currNode&&(globalThis.bitsDismissableLayers.set(this,_(this,mo)),n(),n=Tt(this,ws,Cy).call(this))}),i}),Kp(()=>{_(this,Ga).destroy(),globalThis.bitsDismissableLayers.delete(this),_(this,as).destroy(),_(this,vi).call(this),n()})}get currNode(){return f(_(this,Ua))}set currNode(t){O(_(this,Ua),t,!0)}}is=new WeakMap,mo=new WeakMap,Xi=new WeakMap,os=new WeakMap,ss=new WeakMap,Zi=new WeakMap,Wa=new WeakMap,Ua=new WeakMap,vi=new WeakMap,vf=new WeakMap,ws=new WeakSet,Cy=function(){return _i(rn(_(this,Zi),"pointerdown",_i(_(this,bf),_(this,yf)),{capture:!0}),rn(_(this,Zi),"pointerdown",_i(_(this,_f),_(this,as))),rn(_(this,Zi),"focusin",_(this,vf)))},mf=new WeakMap,as=new WeakMap,bf=new WeakMap,_f=new WeakMap,yf=new WeakMap,wf=new WeakMap,Ga=new WeakMap,Ay=function(){return Object.values(_(this,Xi)).some(Boolean)},xf=new WeakMap,Sf=new WeakMap;function ZI(e){return new XI(e)}function jI(e){return e.findLast(([t,{current:n}])=>n==="close"||n==="ignore")}function QI(e){const t=[...globalThis.bitsDismissableLayers],n=jI(t);if(n)return n[0].node.current===e;const[i]=t[0];return i.node.current===e}function JI(e,t){if("button"in e&&e.button>0)return!1;const n=e.target;return _y(n)?Sy(n).documentElement.contains(n)&&!Zp(t,n)&&YI(e,t):!1}function T_(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:(a,c)=>c==="currentTarget"?t:c==="target"?n:c==="preventDefault"?()=>{s=!0,typeof a.preventDefault=="function"&&a.preventDefault()}:c==="defaultPrevented"?s:c in a?a[c]:e[c]})}function Py(e,t){ut(t,!0);let n=k(t,"interactOutsideBehavior",3,"close"),i=k(t,"onInteractOutside",3,Ae),s=k(t,"onFocusOutside",3,Ae),l=k(t,"isValidEvent",3,()=>!1);const a=ZI({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(()=>l())});var c=U(),d=N(c);ct(d,()=>t.children??St,()=>({props:a.props})),y(e,c),dt()}globalThis.bitsEscapeLayers??(globalThis.bitsEscapeLayers=new Map);var Cf,Af;class $I{constructor(t){$(this,"opts");z(this,Cf,()=>rn(document,"keydown",_(this,Af),{passive:!1}));z(this,Af,t=>{if(t.key!==fI||!eO(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=Ae;Ce(()=>t.enabled.current,i=>(i&&(globalThis.bitsEscapeLayers.set(this,t.escapeKeydownBehavior),n=_(this,Cf).call(this)),()=>{n(),globalThis.bitsEscapeLayers.delete(this)}))}}Cf=new WeakMap,Af=new WeakMap;function tO(e){return new $I(e)}function eO(e){const t=[...globalThis.bitsEscapeLayers],n=t.findLast(([s,{current:l}])=>l==="close"||l==="ignore");if(n)return n[0]===e;const[i]=t[0];return i===e}function ky(e,t){ut(t,!0);let n=k(t,"escapeKeydownBehavior",3,"close"),i=k(t,"onEscapeKeydown",3,Ae);tO({escapeKeydownBehavior:B.with(()=>n()),onEscapeKeydown:B.with(()=>i()),enabled:B.with(()=>t.enabled)});var s=U(),l=N(s);ct(l,()=>t.children??St),y(e,s),dt()}const Di=B([]);function nO(){return{add(e){const t=Di.current[0];t&&e.id!==t.id&&t.pause(),Di.current=E_(Di.current,e),Di.current.unshift(e)},remove(e){var t;Di.current=E_(Di.current,e),(t=Di.current[0])==null||t.resume()},get current(){return Di.current}}}function rO(){let e=pt(!1),t=pt(!1);return{id:le(),get paused(){return f(e)},get isHandlingFocus(){return f(t)},set isHandlingFocus(n){O(t,n,!0)},pause(){O(e,!0)},resume(){O(e,!1)}}}function E_(e,t){return[...e].filter(n=>n.id!==t.id)}function iO(e){return e.filter(t=>t.tagName!=="A")}function Hi(e,{select:t=!1}={}){if(!(e&&e.focus)||document.activeElement===e)return;const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&SI(e)&&t&&e.select()}function oO(e,{select:t=!1}={}){const n=document.activeElement;for(const i of e)if(Hi(i,{select:t}),document.activeElement!==n)return!0}function I_(e,t){for(const n of e)if(!CI(n,t))return n}function Ty(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 sO(e){const t=Ty(e),n=I_(t,e),i=I_(t.reverse(),e);return[n,i]}/*!
|
|
387
|
+
* tabbable 6.2.0
|
|
388
|
+
* @license MIT, https://github.com/focus-trap/tabbable/blob/master/LICENSE
|
|
389
|
+
*/var aO=["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])"],lO=aO.join(","),Ey=typeof Element>"u",jd=Ey?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Qd=!Ey&&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},cO=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"),l=s===""||s==="true",a=l||n&&t&&e(t.parentNode);return a},uO=function(t){var n,i=t==null||(n=t.getAttribute)===null||n===void 0?void 0:n.call(t,"contenteditable");return i===""||i==="true"},dO=function(t){return!isNaN(parseInt(t.getAttribute("tabindex"),10))},fO=function(t){if(!t)throw new Error("No node provided");return t.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(t.tagName)||uO(t))&&!dO(t)?0:t.tabIndex},Iy=function(t){return t.tagName==="INPUT"},hO=function(t){return Iy(t)&&t.type==="hidden"},gO=function(t){var n=t.tagName==="DETAILS"&&Array.prototype.slice.apply(t.children).some(function(i){return i.tagName==="SUMMARY"});return n},pO=function(t,n){for(var i=0;i<t.length;i++)if(t[i].checked&&t[i].form===n)return t[i]},vO=function(t){if(!t.name)return!0;var n=t.form||Qd(t),i=function(c){return n.querySelectorAll('input[type="radio"][name="'+c+'"]')},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(a){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",a.message),!1}var l=pO(s,t.form);return!l||l===t},mO=function(t){return Iy(t)&&t.type==="radio"},bO=function(t){return mO(t)&&!vO(t)},_O=function(t){var n,i=t&&Qd(t),s=(n=i)===null||n===void 0?void 0:n.host,l=!1;if(i&&i!==t){var a,c,d;for(l=!!((a=s)!==null&&a!==void 0&&(c=a.ownerDocument)!==null&&c!==void 0&&c.contains(s)||t!=null&&(d=t.ownerDocument)!==null&&d!==void 0&&d.contains(t));!l&&s;){var h,g,p;i=Qd(s),s=(h=i)===null||h===void 0?void 0:h.host,l=!!((g=s)!==null&&g!==void 0&&(p=g.ownerDocument)!==null&&p!==void 0&&p.contains(s))}}return l},O_=function(t){var n=t.getBoundingClientRect(),i=n.width,s=n.height;return i===0&&s===0},yO=function(t,n){var i=n.displayCheck,s=n.getShadowRoot;if(getComputedStyle(t).visibility==="hidden")return!0;var l=jd.call(t,"details>summary:first-of-type"),a=l?t.parentElement:t;if(jd.call(a,"details:not([open]) *"))return!0;if(!i||i==="full"||i==="legacy-full"){if(typeof s=="function"){for(var c=t;t;){var d=t.parentElement,h=Qd(t);if(d&&!d.shadowRoot&&s(d)===!0)return O_(t);t.assignedSlot?t=t.assignedSlot:!d&&h!==t.ownerDocument?t=h.host:t=d}t=c}if(_O(t))return!t.getClientRects().length;if(i!=="legacy-full")return!0}else if(i==="non-zero-area")return O_(t);return!1},wO=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 jd.call(n,"fieldset[disabled] *")?!0:!s.contains(t)}return!0}n=n.parentElement}return!1},xO=function(t,n){return!(n.disabled||cO(n)||hO(n)||yO(n,t)||gO(n)||wO(n))},SO=function(t,n){return!(bO(n)||fO(n)<0||!xO(t,n))},CO=function(t,n){if(n=n||{},!t)throw new Error("No node provided");return jd.call(t,lO)===!1?!1:SO(n,t)};const AO=new xy("focusScope.autoFocusOnMount",{bubbles:!1,cancelable:!0}),PO=new xy("focusScope.autoFocusOnDestroy",{bubbles:!1,cancelable:!0}),kO=new kn("FocusScope");function TO({id:e,loop:t,enabled:n,onOpenAutoFocus:i,onCloseAutoFocus:s,forceMount:l}){const a=nO(),c=rO(),d=B(null),h=kO.getOr({ignoreCloseAutoFocus:!1});let g=null;ae({id:e,ref:d,deps:()=>n.current});function p(A){if(!(c.paused||!d.current||c.isHandlingFocus)){c.isHandlingFocus=!0;try{const T=A.target;if(!op(T))return;const D=d.current.contains(T);if(A.type==="focusin")if(D)g=T;else{if(h.ignoreCloseAutoFocus)return;Hi(g,{select:!0})}else A.type==="focusout"&&!D&&!h.ignoreCloseAutoFocus&&Hi(g,{select:!0})}finally{c.isHandlingFocus=!1}}}function v(A){if(!g||!d.current)return;let T=!1;for(const D of A){if(D.type==="childList"&&D.removedNodes.length>0)for(const R of D.removedNodes){if(R===g){T=!0;break}if(R.nodeType===Node.ELEMENT_NODE&&R.contains(g)){T=!0;break}}if(T)break}T&&d.current&&!d.current.contains(document.activeElement)&&Hi(d.current)}Ce([()=>d.current,()=>n.current],([A,T])=>{if(!A||!T)return;const D=_i(rn(document,"focusin",p),rn(document,"focusout",p)),R=new MutationObserver(v);return R.observe(A,{childList:!0,subtree:!0,attributes:!1}),()=>{D(),R.disconnect()}}),Ce([()=>l.current,()=>d.current],([A,T])=>{if(A)return;const D=document.activeElement;return b(T,D),()=>{T&&w(D)}}),Ce([()=>l.current,()=>d.current,()=>n.current],([A,T])=>{if(!A)return;const D=document.activeElement;return b(T,D),()=>{T&&w(D)}});function b(A,T){if(A||(A=document.getElementById(e.current)),!A||!n.current)return;if(a.add(c),!A.contains(T)){const R=AO.createEvent();i.current(R),R.defaultPrevented||nr(()=>{if(!A)return;oO(iO(Ty(A)),{select:!0})||Hi(A)})}}function w(A){var R;const T=PO.createEvent();(R=s.current)==null||R.call(s,T);const D=h.ignoreCloseAutoFocus;xu(0,()=>{!T.defaultPrevented&&A&&!D&&Hi(CO(A)?A:document.body,{select:!0}),a.remove(c)})}function S(A){if(!n.current||!t.current&&!n.current||c.paused)return;const T=A.key===rp&&!A.ctrlKey&&!A.altKey&&!A.metaKey,D=document.activeElement;if(!(T&&D))return;const R=d.current;if(!R)return;const[L,V]=sO(R);L&&V?!A.shiftKey&&D===V?(A.preventDefault(),t.current&&Hi(L,{select:!0})):A.shiftKey&&D===L&&(A.preventDefault(),t.current&&Hi(V,{select:!0})):D===R&&A.preventDefault()}const x=E(()=>({id:e.current,tabindex:-1,onkeydown:S}));return{get props(){return f(x)}}}function Oy(e,t){ut(t,!0);let n=k(t,"trapFocus",3,!1),i=k(t,"loop",3,!1),s=k(t,"onCloseAutoFocus",3,Ae),l=k(t,"onOpenAutoFocus",3,Ae),a=k(t,"forceMount",3,!1);const c=TO({enabled:B.with(()=>n()),loop:B.with(()=>i()),onCloseAutoFocus:B.with(()=>s()),onOpenAutoFocus:B.with(()=>l()),id:B.with(()=>t.id),forceMount:B.with(()=>a())});var d=U(),h=N(d);ct(h,()=>t.focusScope??St,()=>({props:c.props})),y(e,d),dt()}globalThis.bitsTextSelectionLayers??(globalThis.bitsTextSelectionLayers=new Map);var ls,Ka,Pf,Ry,kf,qa;class EO{constructor(t){z(this,Pf);$(this,"opts");z(this,ls,Ae);z(this,Ka,B(null));z(this,kf,t=>{const n=_(this,Ka).current,i=t.target;!op(n)||!op(i)||!this.opts.enabled.current||!RO(this)||!Zp(n,i)||(this.opts.onPointerDown.current(t),!t.defaultPrevented&&He(this,ls,OO(n)))});z(this,qa,()=>{_(this,ls).call(this),He(this,ls,Ae)});this.opts=t,ae({id:t.id,ref:_(this,Ka),deps:()=>this.opts.enabled.current});let n=Ae;Ce(()=>this.opts.enabled.current,i=>(i&&(globalThis.bitsTextSelectionLayers.set(this,this.opts.enabled),n(),n=Tt(this,Pf,Ry).call(this)),()=>{n(),_(this,qa).call(this),globalThis.bitsTextSelectionLayers.delete(this)}))}}ls=new WeakMap,Ka=new WeakMap,Pf=new WeakSet,Ry=function(){return _i(rn(document,"pointerdown",_(this,kf)),rn(document,"pointerup",sy(_(this,qa),this.opts.onPointerUp.current)))},kf=new WeakMap,qa=new WeakMap;function IO(e){return new EO(e)}const R_=e=>e.style.userSelect||e.style.webkitUserSelect;function OO(e){const t=document.body,n=R_(t),i=R_(e);return Sd(t,"none"),Sd(e,"text"),()=>{Sd(t,n),Sd(e,i)}}function Sd(e,t){e.style.userSelect=t,e.style.webkitUserSelect=t}function RO(e){const t=[...globalThis.bitsTextSelectionLayers];if(!t.length)return!1;const n=t.at(-1);return n?n[0]===e:!1}function Ny(e,t){ut(t,!0);let n=k(t,"preventOverflowTextSelection",3,!0),i=k(t,"onPointerDown",3,Ae),s=k(t,"onPointerUp",3,Ae);IO({id:B.with(()=>t.id),onPointerDown:B.with(()=>i()),onPointerUp:B.with(()=>s()),enabled:B.with(()=>t.enabled&&n())});var l=U(),a=N(l);ct(a,()=>t.children??St),y(e,l),dt()}function NO(e){let t=0,n=pt(void 0),i;function s(){t-=1,i&&t<=0&&(i(),O(n,void 0),i=void 0)}return(...l)=>(t+=1,f(n)===void 0&&(i=q0(()=>{O(n,e(...l),!0)})),be(()=>()=>{s()}),f(n))}const MO=NO(()=>{const e=new ca,t=E(()=>{for(const l of e.values())if(l)return!0;return!1});let n=pt(null),i=null;function s(){Kf&&(document.body.setAttribute("style",f(n)??""),document.body.style.removeProperty("--scrollbar-width"),ip&&(i==null||i()))}return be(()=>{const l=f(t);return Br(()=>{if(!l)return;O(n,document.body.getAttribute("style"),!0);const a=getComputedStyle(document.body),c=window.innerWidth-document.documentElement.clientWidth,h={padding:Number.parseInt(a.paddingRight??"0",10)+c,margin:Number.parseInt(a.marginRight??"0",10)};c>0&&(document.body.style.paddingRight=`${h.padding}px`,document.body.style.marginRight=`${h.margin}px`,document.body.style.setProperty("--scrollbar-width",`${c}px`),document.body.style.overflow="hidden"),ip&&(i=wy(document,"touchmove",g=>{g.target===document.documentElement&&(g.touches.length>1||g.preventDefault())},{passive:!1})),nr(()=>{document.body.style.pointerEvents="none",document.body.style.overflow="hidden"})})}),be(()=>()=>{i==null||i()}),{get map(){return e},resetBodyStyle:s}});function LO(e,t=()=>null){const n=le(),i=MO();if(!i)return;const s=E(t);i.map.set(n,e??!1);const l=B.with(()=>i.map.get(n)??!1,a=>i.map.set(n,a));return be(()=>()=>{i.map.delete(n),!DO(i.map)&&(f(s)===null?requestAnimationFrame(()=>i.resetBodyStyle()):xu(f(s),()=>i.resetBodyStyle()))}),l}function DO(e){for(const[t,n]of e)if(n)return!0;return!1}function Jd(e,t){ut(t,!0);let n=k(t,"preventScroll",3,!0),i=k(t,"restoreScrollDelay",3,null);LO(n(),()=>i()),dt()}function FO({forceMount:e,present:t,trapFocus:n,open:i}){return e?i&&n:t&&n&&i}var BO=Z("<div><!></div>");function My(e,t){ut(t,!0);let n=k(t,"id",19,le),i=k(t,"forceMount",3,!1),s=k(t,"ref",15,null),l=wt(t,["$$slots","$$events","$$legacy","id","forceMount","child","children","ref"]);const a=VI({id:B.with(()=>n()),ref:B.with(()=>s(),d=>s(d))}),c=E(()=>Jt(l,a.props));{const d=g=>{var p=U(),v=N(p);{var b=S=>{var x=U(),A=N(x);{let T=E(()=>({props:Jt(f(c)),...a.snippetProps}));ct(A,()=>t.child,()=>f(T))}y(S,x)},w=S=>{var x=BO();Vt(x,T=>({...T}),[()=>Jt(f(c))]);var A=q(x);ct(A,()=>t.children??St,()=>a.snippetProps),K(x),y(S,x)};gt(v,S=>{t.child?S(b):S(w,!1)})}y(g,p)};let h=E(()=>a.root.opts.open.current||i());qf(e,{get id(){return n()},get present(){return f(h)},presence:d,$$slots:{presence:!0}})}dt()}var zO=Z("<button><!></button>");function VO(e,t){ut(t,!0);let n=k(t,"id",19,le),i=k(t,"ref",15,null),s=k(t,"disabled",3,!1),l=wt(t,["$$slots","$$events","$$legacy","id","ref","children","child","disabled"]);const a=FI({id:B.with(()=>n()),ref:B.with(()=>i(),S=>i(S)),disabled:B.with(()=>!!s())}),c=E(()=>Jt(l,a.props)),d=Yr(),[h,g]=d;var p=U(),v=N(p);{var b=S=>{var x=U(),A=N(x);ct(A,()=>t.child,()=>({props:f(c)})),y(S,x)},w=S=>{var x=zO();Vt(x,T=>({...T}),[()=>g({...f(c)},[{attribute_name:"formaction"}])]);var A=q(x);ct(A,()=>t.children??St),K(x),y(S,x)};gt(v,S=>{t.child?S(b):S(w,!1)})}y(e,p),dt()}var HO=Z("<div><!></div>");function WO(e,t){ut(t,!0);let n=k(t,"id",19,le),i=k(t,"ref",15,null),s=wt(t,["$$slots","$$events","$$legacy","id","children","child","ref"]);const l=HI({id:B.with(()=>n()),ref:B.with(()=>i(),p=>i(p))}),a=E(()=>Jt(s,l.props));var c=U(),d=N(c);{var h=p=>{var v=U(),b=N(v);ct(b,()=>t.child,()=>({props:f(a)})),y(p,v)},g=p=>{var v=HO();Vt(v,()=>({...f(a)}));var b=q(v);ct(b,()=>t.children??St),K(v),y(p,v)};gt(d,p=>{t.child?p(h):p(g,!1)})}y(e,c),dt()}function UO(e,t){return e>=0&&e<t.length}function GO(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 KO(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 qO(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 YO(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 jp(e,t,n){const i=t.toLowerCase();if(i.endsWith(" ")){const p=i.slice(0,-1);if(e.filter(S=>S.toLowerCase().startsWith(p)).length<=1)return jp(e,p,n);const b=n==null?void 0:n.toLowerCase();if(b&&b.startsWith(p)&&b.charAt(p.length)===" "&&t.trim()===p)return n;const w=e.filter(S=>S.toLowerCase().startsWith(i));if(w.length>0){const S=n?e.indexOf(n):-1;return N_(w,Math.max(S,0)).find(T=>T!==n)||n}}const l=t.length>1&&Array.from(t).every(p=>p===t[0])?t[0]:t,a=l.toLowerCase(),c=n?e.indexOf(n):-1;let d=N_(e,Math.max(c,0));l.length===1&&(d=d.filter(p=>p!==n));const g=d.find(p=>p==null?void 0:p.toLowerCase().startsWith(a));return g!==n?g:void 0}function N_(e,t){return e.map((n,i)=>e[(t+i)%e.length])}const XO="data-checkbox-root";var Ya,Xa,Za,ja,sp,Qa,Ja;class ZO{constructor(t,n=null){z(this,ja);$(this,"opts");$(this,"group");z(this,Ya,E(()=>this.group&&this.group.opts.name.current?this.group.opts.name.current:this.opts.name.current));z(this,Xa,E(()=>this.group&&this.group.opts.required.current?!0:this.opts.required.current));z(this,Za,E(()=>this.group&&this.group.opts.disabled.current?!0:this.opts.disabled.current));z(this,Qa,E(()=>({checked:this.opts.checked.current,indeterminate:this.opts.indeterminate.current})));z(this,Ja,E(()=>({id:this.opts.id.current,role:"checkbox",type:this.opts.type.current,disabled:this.trueDisabled,"aria-checked":vy(this.opts.checked.current,this.opts.indeterminate.current),"aria-required":gy(this.trueRequired),"data-disabled":Zn(this.trueDisabled),"data-state":QO(this.opts.checked.current,this.opts.indeterminate.current),[XO]:"",onclick:this.onclick,onkeydown:this.onkeydown})));this.opts=t,this.group=n,this.onkeydown=this.onkeydown.bind(this),this.onclick=this.onclick.bind(this),ae(t),Ce.pre([()=>{var i;return ty((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))}),Ce.pre(()=>this.opts.checked.current,i=>{var s,l;this.group&&(i?(s=this.group)==null||s.addValue(this.opts.value.current):(l=this.group)==null||l.removeValue(this.opts.value.current))})}get trueName(){return f(_(this,Ya))}set trueName(t){O(_(this,Ya),t)}get trueRequired(){return f(_(this,Xa))}set trueRequired(t){O(_(this,Xa),t)}get trueDisabled(){return f(_(this,Za))}set trueDisabled(t){O(_(this,Za),t)}onkeydown(t){this.opts.disabled.current||(t.key===Gr&&t.preventDefault(),t.key===zr&&(t.preventDefault(),Tt(this,ja,sp).call(this)))}onclick(t){this.opts.disabled.current||Tt(this,ja,sp).call(this)}get snippetProps(){return f(_(this,Qa))}set snippetProps(t){O(_(this,Qa),t)}get props(){return f(_(this,Ja))}set props(t){O(_(this,Ja),t)}}Ya=new WeakMap,Xa=new WeakMap,Za=new WeakMap,ja=new WeakSet,sp=function(){this.opts.indeterminate.current?(this.opts.indeterminate.current=!1,this.opts.checked.current=!0):this.opts.checked.current=!this.opts.checked.current},Qa=new WeakMap,Ja=new WeakMap;var $a,tl,el;class jO{constructor(t){$(this,"root");z(this,$a,E(()=>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));z(this,tl,E(()=>!!this.root.trueName));z(this,el,E(()=>({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 f(_(this,$a))}set trueChecked(t){O(_(this,$a),t)}get shouldRender(){return f(_(this,tl))}set shouldRender(t){O(_(this,tl),t)}get props(){return f(_(this,el))}set props(t){O(_(this,el),t)}}$a=new WeakMap,tl=new WeakMap,el=new WeakMap;function QO(e,t){return t?"indeterminate":e?"checked":"unchecked"}const JO=new kn("Checkbox.Group"),Ly=new kn("Checkbox.Root");function $O(e,t){return Ly.set(new ZO(e,t))}function tR(){return new jO(Ly.get())}var eR=Z("<input/>"),nR=Z("<input/>");function Qp(e,t){ut(t,!0);let n=k(t,"value",15),i=wt(t,["$$slots","$$events","$$legacy","value"]);const s=E(()=>Jt(i,{"aria-hidden":"true",tabindex:-1,style:QE}));var l=U(),a=N(l);{var c=h=>{var g=eR();Vt(g,()=>({...f(s),value:n()}),void 0,void 0,void 0,!0),y(h,g)},d=h=>{var g=nR();Vt(g,()=>({...f(s)}),void 0,void 0,void 0,!0),Zd(g,n),y(h,g)};gt(a,h=>{f(s).type==="checkbox"?h(c):h(d,!1)})}y(e,l),dt()}function rR(e,t){ut(t,!1);const n=tR();X0();var i=U(),s=N(i);{var l=a=>{Qp(a,Nt(()=>n.props))};gt(s,a=>{n.shouldRender&&a(l)})}y(e,i),dt()}var iR=Z("<button><!></button>"),oR=Z("<!> <!>",1);function sR(e,t){ut(t,!0);let n=k(t,"checked",15,!1),i=k(t,"ref",15,null),s=k(t,"disabled",3,!1),l=k(t,"required",3,!1),a=k(t,"name",3,void 0),c=k(t,"value",3,"on"),d=k(t,"id",19,le),h=k(t,"indeterminate",15,!1),g=k(t,"type",3,"button"),p=wt(t,["$$slots","$$events","$$legacy","checked","ref","onCheckedChange","children","disabled","required","name","value","id","indeterminate","onIndeterminateChange","child","type"]);const v=JO.getOr(null);v&&c()&&(v.opts.value.current.includes(c())?n(!0):n(!1)),Ce.pre(()=>c(),()=>{v&&c()&&(v.opts.value.current.includes(c())?n(!0):n(!1))});const b=$O({checked:B.with(()=>n(),M=>{var H;n(M),(H=t.onCheckedChange)==null||H.call(t,M)}),disabled:B.with(()=>s()??!1),required:B.with(()=>l()),name:B.with(()=>a()),value:B.with(()=>c()),id:B.with(()=>d()),ref:B.with(()=>i(),M=>i(M)),indeterminate:B.with(()=>h(),M=>{var H;h(M),(H=t.onIndeterminateChange)==null||H.call(t,M)}),type:B.with(()=>g())},v),w=E(()=>Jt({...p},b.props)),S=Yr(),[x,A]=S;var T=oR(),D=N(T);{var R=M=>{var H=U(),j=N(H);{let tt=E(()=>({props:f(w),...b.snippetProps}));ct(j,()=>t.child,()=>f(tt))}y(M,H)},L=M=>{var H=iR();Vt(H,tt=>({...tt}),[()=>A({...f(w)},[{attribute_name:"formaction"}])]);var j=q(H);ct(j,()=>t.children??St,()=>b.snippetProps),K(H),y(M,H)};gt(D,M=>{t.child?M(R):M(L,!1)})}var V=nt(D,2);rR(V,{}),y(e,T),dt()}const aR="data-collapsible-root",lR="data-collapsible-content",cR="data-collapsible-trigger";var nl,rl;class uR{constructor(t){$(this,"opts");z(this,nl,pt(null));z(this,rl,E(()=>({id:this.opts.id.current,"data-state":eo(this.opts.open.current),"data-disabled":Zn(this.opts.disabled.current),[aR]:""})));this.opts=t,this.toggleOpen=this.toggleOpen.bind(this),ae(t)}get contentNode(){return f(_(this,nl))}set contentNode(t){O(_(this,nl),t,!0)}toggleOpen(){this.opts.open.current=!this.opts.open.current}get props(){return f(_(this,rl))}set props(t){O(_(this,rl),t)}}nl=new WeakMap,rl=new WeakMap;var cs,us,ds,fs,il,ol,sl;class dR{constructor(t,n){$(this,"opts");$(this,"root");z(this,cs);z(this,us,pt(!1));z(this,ds,pt(0));z(this,fs,pt(0));z(this,il,E(()=>this.opts.forceMount.current||this.root.opts.open.current));z(this,ol,E(()=>({open:this.root.opts.open.current})));z(this,sl,E(()=>({id:this.opts.id.current,style:{"--bits-collapsible-content-height":f(_(this,fs))?`${f(_(this,fs))}px`:void 0,"--bits-collapsible-content-width":f(_(this,ds))?`${f(_(this,ds))}px`:void 0},"data-state":eo(this.root.opts.open.current),"data-disabled":Zn(this.root.opts.disabled.current),[lR]:""})));this.opts=t,this.root=n,O(_(this,us),n.opts.open.current,!0),ae({...t,deps:()=>this.present,onRefChange:i=>{this.root.contentNode=i}}),Wf(()=>{const i=requestAnimationFrame(()=>{O(_(this,us),!1)});return()=>{cancelAnimationFrame(i)}}),Ce([()=>this.opts.ref.current,()=>this.present],([i])=>{i&&nr(()=>{if(!this.opts.ref.current)return;He(this,cs,_(this,cs)||{transitionDuration:i.style.transitionDuration,animationName:i.style.animationName}),i.style.transitionDuration="0s",i.style.animationName="none";const s=i.getBoundingClientRect();if(O(_(this,fs),s.height,!0),O(_(this,ds),s.width,!0),!f(_(this,us))){const{animationName:l,transitionDuration:a}=_(this,cs);i.style.transitionDuration=a,i.style.animationName=l}})})}get present(){return f(_(this,il))}set present(t){O(_(this,il),t)}get snippetProps(){return f(_(this,ol))}set snippetProps(t){O(_(this,ol),t)}get props(){return f(_(this,sl))}set props(t){O(_(this,sl),t)}}cs=new WeakMap,us=new WeakMap,ds=new WeakMap,fs=new WeakMap,il=new WeakMap,ol=new WeakMap,sl=new WeakMap;var bo,al;class fR{constructor(t,n){$(this,"opts");$(this,"root");z(this,bo,E(()=>this.opts.disabled.current||this.root.opts.disabled.current));z(this,al,E(()=>{var t;return{id:this.opts.id.current,type:"button",disabled:f(_(this,bo)),"aria-controls":(t=this.root.contentNode)==null?void 0:t.id,"aria-expanded":Su(this.root.opts.open.current),"data-state":eo(this.root.opts.open.current),"data-disabled":Zn(f(_(this,bo))),[cR]:"",onclick:this.onclick,onkeydown:this.onkeydown}}));this.opts=t,this.root=n,this.onclick=this.onclick.bind(this),this.onkeydown=this.onkeydown.bind(this),ae(t)}onclick(t){if(!f(_(this,bo))){if(t.button!==0)return t.preventDefault();this.root.toggleOpen()}}onkeydown(t){f(_(this,bo))||(t.key===zr||t.key===Gr)&&(t.preventDefault(),this.root.toggleOpen())}get props(){return f(_(this,al))}set props(t){O(_(this,al),t)}}bo=new WeakMap,al=new WeakMap;const Jp=new kn("Collapsible.Root");function hR(e){return Jp.set(new uR(e))}function gR(e){return new fR(e,Jp.get())}function pR(e){return new dR(e,Jp.get())}var vR=Z("<div><!></div>");function mR(e,t){ut(t,!0);let n=k(t,"id",19,le),i=k(t,"ref",15,null),s=k(t,"open",15,!1),l=k(t,"disabled",3,!1),a=k(t,"onOpenChange",3,Ae),c=wt(t,["$$slots","$$events","$$legacy","children","child","id","ref","open","disabled","onOpenChange"]);const d=hR({open:B.with(()=>s(),w=>{s(w),a()(w)}),disabled:B.with(()=>l()),id:B.with(()=>n()),ref:B.with(()=>i(),w=>i(w))}),h=E(()=>Jt(c,d.props));var g=U(),p=N(g);{var v=w=>{var S=U(),x=N(S);ct(x,()=>t.child,()=>({props:f(h)})),y(w,S)},b=w=>{var S=vR();Vt(S,()=>({...f(h)}));var x=q(S);ct(x,()=>t.children??St),K(S),y(w,S)};gt(p,w=>{t.child?w(v):w(b,!1)})}y(e,g),dt()}var bR=Z("<div><!></div>");function _R(e,t){ut(t,!0);let n=k(t,"ref",15,null),i=k(t,"forceMount",3,!1),s=k(t,"id",19,le),l=wt(t,["$$slots","$$events","$$legacy","child","ref","forceMount","children","id"]);const a=pR({id:B.with(()=>s()),forceMount:B.with(()=>i()),ref:B.with(()=>n(),c=>n(c))});qf(e,{forceMount:!0,get present(){return a.present},get id(){return s()},presence:(d,h)=>{let g=()=>h==null?void 0:h().present;const p=E(()=>Jt(l,a.props,{hidden:i()?void 0:!g().current}));var v=U(),b=N(v);{var w=x=>{var A=U(),T=N(A);{let D=E(()=>({...a.snippetProps,props:f(p)}));ct(T,()=>t.child,()=>f(D))}y(x,A)},S=x=>{var A=bR();Vt(A,()=>({...f(p)}));var T=q(A);ct(T,()=>t.children??St),K(A),y(x,A)};gt(b,x=>{t.child?x(w):x(S,!1)})}y(d,v)},$$slots:{presence:!0}}),dt()}var yR=Z("<button><!></button>");function wR(e,t){ut(t,!0);let n=k(t,"ref",15,null),i=k(t,"id",19,le),s=k(t,"disabled",3,!1),l=wt(t,["$$slots","$$events","$$legacy","children","child","ref","id","disabled"]);const a=gR({id:B.with(()=>i()),ref:B.with(()=>n(),S=>n(S)),disabled:B.with(()=>s())}),c=E(()=>Jt(l,a.props)),d=Yr(),[h,g]=d;var p=U(),v=N(p);{var b=S=>{var x=U(),A=N(x);ct(A,()=>t.child,()=>({props:f(c)})),y(S,x)},w=S=>{var x=yR();Vt(x,T=>({...T}),[()=>g({...f(c)},[{attribute_name:"formaction"}])]);var A=q(x);ct(A,()=>t.children??St),K(x),y(S,x)};gt(v,S=>{t.child?S(b):S(w,!1)})}y(e,p),dt()}const xR=["top","right","bottom","left"],Ji=Math.min,rr=Math.max,$d=Math.round,Cd=Math.floor,Vr=e=>({x:e,y:e}),SR={left:"right",right:"left",bottom:"top",top:"bottom"},CR={start:"end",end:"start"};function ap(e,t,n){return rr(e,Ji(t,n))}function xi(e,t){return typeof e=="function"?e(t):e}function Si(e){return e.split("-")[0]}function As(e){return e.split("-")[1]}function $p(e){return e==="x"?"y":"x"}function tv(e){return e==="y"?"height":"width"}function $i(e){return["top","bottom"].includes(Si(e))?"y":"x"}function ev(e){return $p($i(e))}function AR(e,t,n){n===void 0&&(n=!1);const i=As(e),s=ev(e),l=tv(s);let a=s==="x"?i===(n?"end":"start")?"right":"left":i==="start"?"bottom":"top";return t.reference[l]>t.floating[l]&&(a=tf(a)),[a,tf(a)]}function PR(e){const t=tf(e);return[lp(e),t,lp(t)]}function lp(e){return e.replace(/start|end/g,t=>CR[t])}function kR(e,t,n){const i=["left","right"],s=["right","left"],l=["top","bottom"],a=["bottom","top"];switch(e){case"top":case"bottom":return n?t?s:i:t?i:s;case"left":case"right":return t?l:a;default:return[]}}function TR(e,t,n,i){const s=As(e);let l=kR(Si(e),n==="start",i);return s&&(l=l.map(a=>a+"-"+s),t&&(l=l.concat(l.map(lp)))),l}function tf(e){return e.replace(/left|right|bottom|top/g,t=>SR[t])}function ER(e){return{top:0,right:0,bottom:0,left:0,...e}}function Dy(e){return typeof e!="number"?ER(e):{top:e,right:e,bottom:e,left:e}}function ef(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 M_(e,t,n){let{reference:i,floating:s}=e;const l=$i(t),a=ev(t),c=tv(a),d=Si(t),h=l==="y",g=i.x+i.width/2-s.width/2,p=i.y+i.height/2-s.height/2,v=i[c]/2-s[c]/2;let b;switch(d){case"top":b={x:g,y:i.y-s.height};break;case"bottom":b={x:g,y:i.y+i.height};break;case"right":b={x:i.x+i.width,y:p};break;case"left":b={x:i.x-s.width,y:p};break;default:b={x:i.x,y:i.y}}switch(As(t)){case"start":b[a]-=v*(n&&h?-1:1);break;case"end":b[a]+=v*(n&&h?-1:1);break}return b}const IR=async(e,t,n)=>{const{placement:i="bottom",strategy:s="absolute",middleware:l=[],platform:a}=n,c=l.filter(Boolean),d=await(a.isRTL==null?void 0:a.isRTL(t));let h=await a.getElementRects({reference:e,floating:t,strategy:s}),{x:g,y:p}=M_(h,i,d),v=i,b={},w=0;for(let S=0;S<c.length;S++){const{name:x,fn:A}=c[S],{x:T,y:D,data:R,reset:L}=await A({x:g,y:p,initialPlacement:i,placement:v,strategy:s,middlewareData:b,rects:h,platform:a,elements:{reference:e,floating:t}});g=T??g,p=D??p,b={...b,[x]:{...b[x],...R}},L&&w<=50&&(w++,typeof L=="object"&&(L.placement&&(v=L.placement),L.rects&&(h=L.rects===!0?await a.getElementRects({reference:e,floating:t,strategy:s}):L.rects),{x:g,y:p}=M_(h,v,d)),S=-1)}return{x:g,y:p,placement:v,strategy:s,middlewareData:b}};async function da(e,t){var n;t===void 0&&(t={});const{x:i,y:s,platform:l,rects:a,elements:c,strategy:d}=e,{boundary:h="clippingAncestors",rootBoundary:g="viewport",elementContext:p="floating",altBoundary:v=!1,padding:b=0}=xi(t,e),w=Dy(b),x=c[v?p==="floating"?"reference":"floating":p],A=ef(await l.getClippingRect({element:(n=await(l.isElement==null?void 0:l.isElement(x)))==null||n?x:x.contextElement||await(l.getDocumentElement==null?void 0:l.getDocumentElement(c.floating)),boundary:h,rootBoundary:g,strategy:d})),T=p==="floating"?{x:i,y:s,width:a.floating.width,height:a.floating.height}:a.reference,D=await(l.getOffsetParent==null?void 0:l.getOffsetParent(c.floating)),R=await(l.isElement==null?void 0:l.isElement(D))?await(l.getScale==null?void 0:l.getScale(D))||{x:1,y:1}:{x:1,y:1},L=ef(l.convertOffsetParentRelativeRectToViewportRelativeRect?await l.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:T,offsetParent:D,strategy:d}):T);return{top:(A.top-L.top+w.top)/R.y,bottom:(L.bottom-A.bottom+w.bottom)/R.y,left:(A.left-L.left+w.left)/R.x,right:(L.right-A.right+w.right)/R.x}}const OR=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:i,placement:s,rects:l,platform:a,elements:c,middlewareData:d}=t,{element:h,padding:g=0}=xi(e,t)||{};if(h==null)return{};const p=Dy(g),v={x:n,y:i},b=ev(s),w=tv(b),S=await a.getDimensions(h),x=b==="y",A=x?"top":"left",T=x?"bottom":"right",D=x?"clientHeight":"clientWidth",R=l.reference[w]+l.reference[b]-v[b]-l.floating[w],L=v[b]-l.reference[b],V=await(a.getOffsetParent==null?void 0:a.getOffsetParent(h));let M=V?V[D]:0;(!M||!await(a.isElement==null?void 0:a.isElement(V)))&&(M=c.floating[D]||l.floating[w]);const H=R/2-L/2,j=M/2-S[w]/2-1,tt=Ji(p[A],j),it=Ji(p[T],j),G=tt,ot=M-S[w]-it,Y=M/2-S[w]/2+H,J=ap(G,Y,ot),et=!d.arrow&&As(s)!=null&&Y!==J&&l.reference[w]/2-(Y<G?tt:it)-S[w]/2<0,rt=et?Y<G?Y-G:Y-ot:0;return{[b]:v[b]+rt,data:{[b]:J,centerOffset:Y-J-rt,...et&&{alignmentOffset:rt}},reset:et}}}),RR=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,i;const{placement:s,middlewareData:l,rects:a,initialPlacement:c,platform:d,elements:h}=t,{mainAxis:g=!0,crossAxis:p=!0,fallbackPlacements:v,fallbackStrategy:b="bestFit",fallbackAxisSideDirection:w="none",flipAlignment:S=!0,...x}=xi(e,t);if((n=l.arrow)!=null&&n.alignmentOffset)return{};const A=Si(s),T=$i(c),D=Si(c)===c,R=await(d.isRTL==null?void 0:d.isRTL(h.floating)),L=v||(D||!S?[tf(c)]:PR(c)),V=w!=="none";!v&&V&&L.push(...TR(c,S,w,R));const M=[c,...L],H=await da(t,x),j=[];let tt=((i=l.flip)==null?void 0:i.overflows)||[];if(g&&j.push(H[A]),p){const Y=AR(s,a,R);j.push(H[Y[0]],H[Y[1]])}if(tt=[...tt,{placement:s,overflows:j}],!j.every(Y=>Y<=0)){var it,G;const Y=(((it=l.flip)==null?void 0:it.index)||0)+1,J=M[Y];if(J)return{data:{index:Y,overflows:tt},reset:{placement:J}};let et=(G=tt.filter(rt=>rt.overflows[0]<=0).sort((rt,ht)=>rt.overflows[1]-ht.overflows[1])[0])==null?void 0:G.placement;if(!et)switch(b){case"bestFit":{var ot;const rt=(ot=tt.filter(ht=>{if(V){const bt=$i(ht.placement);return bt===T||bt==="y"}return!0}).map(ht=>[ht.placement,ht.overflows.filter(bt=>bt>0).reduce((bt,yt)=>bt+yt,0)]).sort((ht,bt)=>ht[1]-bt[1])[0])==null?void 0:ot[0];rt&&(et=rt);break}case"initialPlacement":et=c;break}if(s!==et)return{reset:{placement:et}}}return{}}}};function L_(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function D_(e){return xR.some(t=>e[t]>=0)}const NR=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:i="referenceHidden",...s}=xi(e,t);switch(i){case"referenceHidden":{const l=await da(t,{...s,elementContext:"reference"}),a=L_(l,n.reference);return{data:{referenceHiddenOffsets:a,referenceHidden:D_(a)}}}case"escaped":{const l=await da(t,{...s,altBoundary:!0}),a=L_(l,n.floating);return{data:{escapedOffsets:a,escaped:D_(a)}}}default:return{}}}}};async function MR(e,t){const{placement:n,platform:i,elements:s}=e,l=await(i.isRTL==null?void 0:i.isRTL(s.floating)),a=Si(n),c=As(n),d=$i(n)==="y",h=["left","top"].includes(a)?-1:1,g=l&&d?-1:1,p=xi(t,e);let{mainAxis:v,crossAxis:b,alignmentAxis:w}=typeof p=="number"?{mainAxis:p,crossAxis:0,alignmentAxis:null}:{mainAxis:p.mainAxis||0,crossAxis:p.crossAxis||0,alignmentAxis:p.alignmentAxis};return c&&typeof w=="number"&&(b=c==="end"?w*-1:w),d?{x:b*g,y:v*h}:{x:v*h,y:b*g}}const LR=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,i;const{x:s,y:l,placement:a,middlewareData:c}=t,d=await MR(t,e);return a===((n=c.offset)==null?void 0:n.placement)&&(i=c.arrow)!=null&&i.alignmentOffset?{}:{x:s+d.x,y:l+d.y,data:{...d,placement:a}}}}},DR=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:i,placement:s}=t,{mainAxis:l=!0,crossAxis:a=!1,limiter:c={fn:x=>{let{x:A,y:T}=x;return{x:A,y:T}}},...d}=xi(e,t),h={x:n,y:i},g=await da(t,d),p=$i(Si(s)),v=$p(p);let b=h[v],w=h[p];if(l){const x=v==="y"?"top":"left",A=v==="y"?"bottom":"right",T=b+g[x],D=b-g[A];b=ap(T,b,D)}if(a){const x=p==="y"?"top":"left",A=p==="y"?"bottom":"right",T=w+g[x],D=w-g[A];w=ap(T,w,D)}const S=c.fn({...t,[v]:b,[p]:w});return{...S,data:{x:S.x-n,y:S.y-i,enabled:{[v]:l,[p]:a}}}}}},FR=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:i,placement:s,rects:l,middlewareData:a}=t,{offset:c=0,mainAxis:d=!0,crossAxis:h=!0}=xi(e,t),g={x:n,y:i},p=$i(s),v=$p(p);let b=g[v],w=g[p];const S=xi(c,t),x=typeof S=="number"?{mainAxis:S,crossAxis:0}:{mainAxis:0,crossAxis:0,...S};if(d){const D=v==="y"?"height":"width",R=l.reference[v]-l.floating[D]+x.mainAxis,L=l.reference[v]+l.reference[D]-x.mainAxis;b<R?b=R:b>L&&(b=L)}if(h){var A,T;const D=v==="y"?"width":"height",R=["top","left"].includes(Si(s)),L=l.reference[p]-l.floating[D]+(R&&((A=a.offset)==null?void 0:A[p])||0)+(R?0:x.crossAxis),V=l.reference[p]+l.reference[D]+(R?0:((T=a.offset)==null?void 0:T[p])||0)-(R?x.crossAxis:0);w<L?w=L:w>V&&(w=V)}return{[v]:b,[p]:w}}}},BR=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,i;const{placement:s,rects:l,platform:a,elements:c}=t,{apply:d=()=>{},...h}=xi(e,t),g=await da(t,h),p=Si(s),v=As(s),b=$i(s)==="y",{width:w,height:S}=l.floating;let x,A;p==="top"||p==="bottom"?(x=p,A=v===(await(a.isRTL==null?void 0:a.isRTL(c.floating))?"start":"end")?"left":"right"):(A=p,x=v==="end"?"top":"bottom");const T=S-g.top-g.bottom,D=w-g.left-g.right,R=Ji(S-g[x],T),L=Ji(w-g[A],D),V=!t.middlewareData.shift;let M=R,H=L;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(H=D),(i=t.middlewareData.shift)!=null&&i.enabled.y&&(M=T),V&&!v){const tt=rr(g.left,0),it=rr(g.right,0),G=rr(g.top,0),ot=rr(g.bottom,0);b?H=w-2*(tt!==0||it!==0?tt+it:rr(g.left,g.right)):M=S-2*(G!==0||ot!==0?G+ot:rr(g.top,g.bottom))}await d({...t,availableWidth:H,availableHeight:M});const j=await a.getDimensions(c.floating);return w!==j.width||S!==j.height?{reset:{rects:!0}}:{}}}};function Yf(){return typeof window<"u"}function Ps(e){return Fy(e)?(e.nodeName||"").toLowerCase():"#document"}function ir(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Xr(e){var t;return(t=(Fy(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Fy(e){return Yf()?e instanceof Node||e instanceof ir(e).Node:!1}function Cr(e){return Yf()?e instanceof Element||e instanceof ir(e).Element:!1}function Kr(e){return Yf()?e instanceof HTMLElement||e instanceof ir(e).HTMLElement:!1}function F_(e){return!Yf()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ir(e).ShadowRoot}function ku(e){const{overflow:t,overflowX:n,overflowY:i,display:s}=Ar(e);return/auto|scroll|overlay|hidden|clip/.test(t+i+n)&&!["inline","contents"].includes(s)}function zR(e){return["table","td","th"].includes(Ps(e))}function Xf(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function nv(e){const t=rv(),n=Cr(e)?Ar(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 VR(e){let t=to(e);for(;Kr(t)&&!bs(t);){if(nv(t))return t;if(Xf(t))return null;t=to(t)}return null}function rv(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function bs(e){return["html","body","#document"].includes(Ps(e))}function Ar(e){return ir(e).getComputedStyle(e)}function Zf(e){return Cr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function to(e){if(Ps(e)==="html")return e;const t=e.assignedSlot||e.parentNode||F_(e)&&e.host||Xr(e);return F_(t)?t.host:t}function By(e){const t=to(e);return bs(t)?e.ownerDocument?e.ownerDocument.body:e.body:Kr(t)&&ku(t)?t:By(t)}function fa(e,t,n){var i;t===void 0&&(t=[]),n===void 0&&(n=!0);const s=By(e),l=s===((i=e.ownerDocument)==null?void 0:i.body),a=ir(s);if(l){const c=cp(a);return t.concat(a,a.visualViewport||[],ku(s)?s:[],c&&n?fa(c):[])}return t.concat(s,fa(s,[],n))}function cp(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function zy(e){const t=Ar(e);let n=parseFloat(t.width)||0,i=parseFloat(t.height)||0;const s=Kr(e),l=s?e.offsetWidth:n,a=s?e.offsetHeight:i,c=$d(n)!==l||$d(i)!==a;return c&&(n=l,i=a),{width:n,height:i,$:c}}function iv(e){return Cr(e)?e:e.contextElement}function jo(e){const t=iv(e);if(!Kr(t))return Vr(1);const n=t.getBoundingClientRect(),{width:i,height:s,$:l}=zy(t);let a=(l?$d(n.width):n.width)/i,c=(l?$d(n.height):n.height)/s;return(!a||!Number.isFinite(a))&&(a=1),(!c||!Number.isFinite(c))&&(c=1),{x:a,y:c}}const HR=Vr(0);function Vy(e){const t=ir(e);return!rv()||!t.visualViewport?HR:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function WR(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==ir(e)?!1:t}function Co(e,t,n,i){t===void 0&&(t=!1),n===void 0&&(n=!1);const s=e.getBoundingClientRect(),l=iv(e);let a=Vr(1);t&&(i?Cr(i)&&(a=jo(i)):a=jo(e));const c=WR(l,n,i)?Vy(l):Vr(0);let d=(s.left+c.x)/a.x,h=(s.top+c.y)/a.y,g=s.width/a.x,p=s.height/a.y;if(l){const v=ir(l),b=i&&Cr(i)?ir(i):i;let w=v,S=cp(w);for(;S&&i&&b!==w;){const x=jo(S),A=S.getBoundingClientRect(),T=Ar(S),D=A.left+(S.clientLeft+parseFloat(T.paddingLeft))*x.x,R=A.top+(S.clientTop+parseFloat(T.paddingTop))*x.y;d*=x.x,h*=x.y,g*=x.x,p*=x.y,d+=D,h+=R,w=ir(S),S=cp(w)}}return ef({width:g,height:p,x:d,y:h})}function ov(e,t){const n=Zf(e).scrollLeft;return t?t.left+n:Co(Xr(e)).left+n}function Hy(e,t,n){n===void 0&&(n=!1);const i=e.getBoundingClientRect(),s=i.left+t.scrollLeft-(n?0:ov(e,i)),l=i.top+t.scrollTop;return{x:s,y:l}}function UR(e){let{elements:t,rect:n,offsetParent:i,strategy:s}=e;const l=s==="fixed",a=Xr(i),c=t?Xf(t.floating):!1;if(i===a||c&&l)return n;let d={scrollLeft:0,scrollTop:0},h=Vr(1);const g=Vr(0),p=Kr(i);if((p||!p&&!l)&&((Ps(i)!=="body"||ku(a))&&(d=Zf(i)),Kr(i))){const b=Co(i);h=jo(i),g.x=b.x+i.clientLeft,g.y=b.y+i.clientTop}const v=a&&!p&&!l?Hy(a,d,!0):Vr(0);return{width:n.width*h.x,height:n.height*h.y,x:n.x*h.x-d.scrollLeft*h.x+g.x+v.x,y:n.y*h.y-d.scrollTop*h.y+g.y+v.y}}function GR(e){return Array.from(e.getClientRects())}function KR(e){const t=Xr(e),n=Zf(e),i=e.ownerDocument.body,s=rr(t.scrollWidth,t.clientWidth,i.scrollWidth,i.clientWidth),l=rr(t.scrollHeight,t.clientHeight,i.scrollHeight,i.clientHeight);let a=-n.scrollLeft+ov(e);const c=-n.scrollTop;return Ar(i).direction==="rtl"&&(a+=rr(t.clientWidth,i.clientWidth)-s),{width:s,height:l,x:a,y:c}}function qR(e,t){const n=ir(e),i=Xr(e),s=n.visualViewport;let l=i.clientWidth,a=i.clientHeight,c=0,d=0;if(s){l=s.width,a=s.height;const h=rv();(!h||h&&t==="fixed")&&(c=s.offsetLeft,d=s.offsetTop)}return{width:l,height:a,x:c,y:d}}function YR(e,t){const n=Co(e,!0,t==="fixed"),i=n.top+e.clientTop,s=n.left+e.clientLeft,l=Kr(e)?jo(e):Vr(1),a=e.clientWidth*l.x,c=e.clientHeight*l.y,d=s*l.x,h=i*l.y;return{width:a,height:c,x:d,y:h}}function B_(e,t,n){let i;if(t==="viewport")i=qR(e,n);else if(t==="document")i=KR(Xr(e));else if(Cr(t))i=YR(t,n);else{const s=Vy(e);i={x:t.x-s.x,y:t.y-s.y,width:t.width,height:t.height}}return ef(i)}function Wy(e,t){const n=to(e);return n===t||!Cr(n)||bs(n)?!1:Ar(n).position==="fixed"||Wy(n,t)}function XR(e,t){const n=t.get(e);if(n)return n;let i=fa(e,[],!1).filter(c=>Cr(c)&&Ps(c)!=="body"),s=null;const l=Ar(e).position==="fixed";let a=l?to(e):e;for(;Cr(a)&&!bs(a);){const c=Ar(a),d=nv(a);!d&&c.position==="fixed"&&(s=null),(l?!d&&!s:!d&&c.position==="static"&&!!s&&["absolute","fixed"].includes(s.position)||ku(a)&&!d&&Wy(e,a))?i=i.filter(g=>g!==a):s=c,a=to(a)}return t.set(e,i),i}function ZR(e){let{element:t,boundary:n,rootBoundary:i,strategy:s}=e;const a=[...n==="clippingAncestors"?Xf(t)?[]:XR(t,this._c):[].concat(n),i],c=a[0],d=a.reduce((h,g)=>{const p=B_(t,g,s);return h.top=rr(p.top,h.top),h.right=Ji(p.right,h.right),h.bottom=Ji(p.bottom,h.bottom),h.left=rr(p.left,h.left),h},B_(t,c,s));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function jR(e){const{width:t,height:n}=zy(e);return{width:t,height:n}}function QR(e,t,n){const i=Kr(t),s=Xr(t),l=n==="fixed",a=Co(e,!0,l,t);let c={scrollLeft:0,scrollTop:0};const d=Vr(0);if(i||!i&&!l)if((Ps(t)!=="body"||ku(s))&&(c=Zf(t)),i){const v=Co(t,!0,l,t);d.x=v.x+t.clientLeft,d.y=v.y+t.clientTop}else s&&(d.x=ov(s));const h=s&&!i&&!l?Hy(s,c):Vr(0),g=a.left+c.scrollLeft-d.x-h.x,p=a.top+c.scrollTop-d.y-h.y;return{x:g,y:p,width:a.width,height:a.height}}function Eg(e){return Ar(e).position==="static"}function z_(e,t){if(!Kr(e)||Ar(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Xr(e)===n&&(n=n.ownerDocument.body),n}function Uy(e,t){const n=ir(e);if(Xf(e))return n;if(!Kr(e)){let s=to(e);for(;s&&!bs(s);){if(Cr(s)&&!Eg(s))return s;s=to(s)}return n}let i=z_(e,t);for(;i&&zR(i)&&Eg(i);)i=z_(i,t);return i&&bs(i)&&Eg(i)&&!nv(i)?n:i||VR(e)||n}const JR=async function(e){const t=this.getOffsetParent||Uy,n=this.getDimensions,i=await n(e.floating);return{reference:QR(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:i.width,height:i.height}}};function $R(e){return Ar(e).direction==="rtl"}const tN={convertOffsetParentRelativeRectToViewportRelativeRect:UR,getDocumentElement:Xr,getClippingRect:ZR,getOffsetParent:Uy,getElementRects:JR,getClientRects:GR,getDimensions:jR,getScale:jo,isElement:Cr,isRTL:$R};function Gy(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function eN(e,t){let n=null,i;const s=Xr(e);function l(){var c;clearTimeout(i),(c=n)==null||c.disconnect(),n=null}function a(c,d){c===void 0&&(c=!1),d===void 0&&(d=1),l();const h=e.getBoundingClientRect(),{left:g,top:p,width:v,height:b}=h;if(c||t(),!v||!b)return;const w=Cd(p),S=Cd(s.clientWidth-(g+v)),x=Cd(s.clientHeight-(p+b)),A=Cd(g),D={rootMargin:-w+"px "+-S+"px "+-x+"px "+-A+"px",threshold:rr(0,Ji(1,d))||1};let R=!0;function L(V){const M=V[0].intersectionRatio;if(M!==d){if(!R)return a();M?a(!1,M):i=setTimeout(()=>{a(!1,1e-7)},1e3)}M===1&&!Gy(h,e.getBoundingClientRect())&&a(),R=!1}try{n=new IntersectionObserver(L,{...D,root:s.ownerDocument})}catch{n=new IntersectionObserver(L,D)}n.observe(e)}return a(!0),l}function nN(e,t,n,i){i===void 0&&(i={});const{ancestorScroll:s=!0,ancestorResize:l=!0,elementResize:a=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:d=!1}=i,h=iv(e),g=s||l?[...h?fa(h):[],...fa(t)]:[];g.forEach(A=>{s&&A.addEventListener("scroll",n,{passive:!0}),l&&A.addEventListener("resize",n)});const p=h&&c?eN(h,n):null;let v=-1,b=null;a&&(b=new ResizeObserver(A=>{let[T]=A;T&&T.target===h&&b&&(b.unobserve(t),cancelAnimationFrame(v),v=requestAnimationFrame(()=>{var D;(D=b)==null||D.observe(t)})),n()}),h&&!d&&b.observe(h),b.observe(t));let w,S=d?Co(e):null;d&&x();function x(){const A=Co(e);S&&!Gy(S,A)&&n(),S=A,w=requestAnimationFrame(x)}return n(),()=>{var A;g.forEach(T=>{s&&T.removeEventListener("scroll",n),l&&T.removeEventListener("resize",n)}),p==null||p(),(A=b)==null||A.disconnect(),b=null,d&&cancelAnimationFrame(w)}}const rN=LR,iN=DR,oN=RR,sN=BR,aN=NR,lN=OR,cN=FR,uN=(e,t,n)=>{const i=new Map,s={platform:tN,...n},l={...s.platform,_c:i};return IR(e,t,{...s,platform:l})};function Xs(e){return typeof e=="function"?e():e}function Ky(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function V_(e,t){const n=Ky(e);return Math.round(t*n)/n}function H_(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 dN(e){const t=e.whileElementsMounted,n=E(()=>Xs(e.open)??!0),i=E(()=>Xs(e.middleware)),s=E(()=>Xs(e.transform)??!0),l=E(()=>Xs(e.placement)??"bottom"),a=E(()=>Xs(e.strategy)??"absolute"),c=e.reference;let d=pt(0),h=pt(0);const g=B(null);let p=pt(_n(f(a))),v=pt(_n(f(l))),b=pt(_n({})),w=pt(!1);const S=E(()=>{const L={position:f(p),left:"0",top:"0"};if(!g.current)return L;const V=V_(g.current,f(d)),M=V_(g.current,f(h));return f(s)?{...L,transform:`translate(${V}px, ${M}px)`,...Ky(g.current)>=1.5&&{willChange:"transform"}}:{position:f(p),left:`${V}px`,top:`${M}px`}});let x;function A(){c.current===null||g.current===null||uN(c.current,g.current,{middleware:f(i),placement:f(l),strategy:f(a)}).then(L=>{O(d,L.x,!0),O(h,L.y,!0),O(p,L.strategy,!0),O(v,L.placement,!0),O(b,L.middlewareData,!0),O(w,!0)})}function T(){typeof x=="function"&&(x(),x=void 0)}function D(){if(T(),t===void 0){A();return}c.current===null||g.current===null||(x=t(c.current,g.current,A))}function R(){f(n)||O(w,!1)}return be(A),be(D),be(R),be(()=>T),{floating:g,reference:c,get strategy(){return f(p)},get placement(){return f(v)},get middlewareData(){return f(b)},get isPositioned(){return f(w)},get floatingStyles(){return f(S)},get update(){return A}}}const fN={top:"bottom",right:"left",bottom:"top",left:"right"};class hN{constructor(){$(this,"anchorNode",B(null));$(this,"customAnchorNode",B(null));$(this,"triggerNode",B(null));be(()=>{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 ll,Tf,cl,Ef,ul,If,dl,fl,hl,gl,pl,vl,ml,bl,_l,yl,wl,xl,Sl,Cl,Al,Pl,kl,Tl;class gN{constructor(t,n){$(this,"opts");$(this,"root");$(this,"contentRef",B(null));$(this,"wrapperRef",B(null));$(this,"arrowRef",B(null));$(this,"arrowId",B(le()));z(this,ll,E(()=>{if(typeof this.opts.style=="string")return ia(this.opts.style);if(!this.opts.style)return{}}));z(this,Tf);z(this,cl,new oI(()=>this.arrowRef.current??void 0));z(this,Ef,E(()=>{var t;return((t=_(this,cl))==null?void 0:t.width)??0}));z(this,ul,E(()=>{var t;return((t=_(this,cl))==null?void 0:t.height)??0}));z(this,If,E(()=>{var t;return((t=this.opts.side)==null?void 0:t.current)+(this.opts.align.current!=="center"?`-${this.opts.align.current}`:"")}));z(this,dl,E(()=>Array.isArray(this.opts.collisionBoundary.current)?this.opts.collisionBoundary.current:[this.opts.collisionBoundary.current]));z(this,fl,E(()=>f(_(this,dl)).length>0));z(this,hl,E(()=>({padding:this.opts.collisionPadding.current,boundary:f(_(this,dl)).filter(xI),altBoundary:this.hasExplicitBoundaries})));z(this,gl,pt(void 0));z(this,pl,pt(void 0));z(this,vl,pt(void 0));z(this,ml,pt(void 0));z(this,bl,E(()=>[rN({mainAxis:this.opts.sideOffset.current+f(_(this,ul)),alignmentAxis:this.opts.alignOffset.current}),this.opts.avoidCollisions.current&&iN({mainAxis:!0,crossAxis:!1,limiter:this.opts.sticky.current==="partial"?cN():void 0,...this.detectOverflowOptions}),this.opts.avoidCollisions.current&&oN({...this.detectOverflowOptions}),sN({...this.detectOverflowOptions,apply:({rects:t,availableWidth:n,availableHeight:i})=>{const{width:s,height:l}=t.reference;O(_(this,gl),n,!0),O(_(this,pl),i,!0),O(_(this,vl),s,!0),O(_(this,ml),l,!0)}}),this.arrowRef.current&&lN({element:this.arrowRef.current,padding:this.opts.arrowPadding.current}),yN({arrowWidth:f(_(this,Ef)),arrowHeight:f(_(this,ul))}),this.opts.hideWhenDetached.current&&aN({strategy:"referenceHidden",...this.detectOverflowOptions})].filter(Boolean)));$(this,"floating");z(this,_l,E(()=>wN(this.floating.placement)));z(this,yl,E(()=>xN(this.floating.placement)));z(this,wl,E(()=>{var t;return((t=this.floating.middlewareData.arrow)==null?void 0:t.x)??0}));z(this,xl,E(()=>{var t;return((t=this.floating.middlewareData.arrow)==null?void 0:t.y)??0}));z(this,Sl,E(()=>{var t;return((t=this.floating.middlewareData.arrow)==null?void 0:t.centerOffset)!==0}));z(this,Cl,pt());z(this,Al,E(()=>fN[this.placedSide]));z(this,Pl,E(()=>{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":`${f(_(this,gl))}px`,"--bits-floating-available-height":`${f(_(this,pl))}px`,"--bits-floating-anchor-width":`${f(_(this,vl))}px`,"--bits-floating-anchor-height":`${f(_(this,ml))}px`,...((i=this.floating.middlewareData.hide)==null?void 0:i.referenceHidden)&&{visibility:"hidden","pointer-events":"none"},...f(_(this,ll))},dir:this.opts.dir.current}}));z(this,kl,E(()=>({"data-side":this.placedSide,"data-align":this.placedAlign,style:Gp({...f(_(this,ll))})})));z(this,Tl,E(()=>({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),Ce(()=>t.customAnchor.current,i=>{this.root.customAnchorNode.current=i}),ae({id:this.opts.wrapperId,ref:this.wrapperRef,deps:()=>this.opts.enabled.current}),ae({id:this.opts.id,ref:this.contentRef,deps:()=>this.opts.enabled.current}),this.floating=dN({strategy:()=>this.opts.strategy.current,placement:()=>f(_(this,If)),middleware:()=>this.middleware,reference:this.root.anchorNode,whileElementsMounted:(...i)=>{var l;return nN(...i,{animationFrame:((l=_(this,Tf))==null?void 0:l.current)==="always"})},open:()=>this.opts.enabled.current}),be(()=>{var i;this.floating.isPositioned&&((i=this.opts.onPlaced)==null||i.current())}),Ce(()=>this.contentRef.current,i=>{i&&(this.contentZIndex=window.getComputedStyle(i).zIndex)}),be(()=>{this.floating.floating.current=this.wrapperRef.current})}get hasExplicitBoundaries(){return f(_(this,fl))}set hasExplicitBoundaries(t){O(_(this,fl),t)}get detectOverflowOptions(){return f(_(this,hl))}set detectOverflowOptions(t){O(_(this,hl),t)}get middleware(){return f(_(this,bl))}set middleware(t){O(_(this,bl),t)}get placedSide(){return f(_(this,_l))}set placedSide(t){O(_(this,_l),t)}get placedAlign(){return f(_(this,yl))}set placedAlign(t){O(_(this,yl),t)}get arrowX(){return f(_(this,wl))}set arrowX(t){O(_(this,wl),t)}get arrowY(){return f(_(this,xl))}set arrowY(t){O(_(this,xl),t)}get cannotCenterArrow(){return f(_(this,Sl))}set cannotCenterArrow(t){O(_(this,Sl),t)}get contentZIndex(){return f(_(this,Cl))}set contentZIndex(t){O(_(this,Cl),t,!0)}get arrowBaseSide(){return f(_(this,Al))}set arrowBaseSide(t){O(_(this,Al),t)}get wrapperProps(){return f(_(this,Pl))}set wrapperProps(t){O(_(this,Pl),t)}get props(){return f(_(this,kl))}set props(t){O(_(this,kl),t)}get arrowStyle(){return f(_(this,Tl))}set arrowStyle(t){O(_(this,Tl),t)}}ll=new WeakMap,Tf=new WeakMap,cl=new WeakMap,Ef=new WeakMap,ul=new WeakMap,If=new WeakMap,dl=new WeakMap,fl=new WeakMap,hl=new WeakMap,gl=new WeakMap,pl=new WeakMap,vl=new WeakMap,ml=new WeakMap,bl=new WeakMap,_l=new WeakMap,yl=new WeakMap,wl=new WeakMap,xl=new WeakMap,Sl=new WeakMap,Cl=new WeakMap,Al=new WeakMap,Pl=new WeakMap,kl=new WeakMap,Tl=new WeakMap;class pN{constructor(t,n){$(this,"opts");$(this,"root");$(this,"ref",B(null));this.opts=t,this.root=n,t.virtualEl&&t.virtualEl.current?n.triggerNode=B.from(t.virtualEl.current):ae({id:t.id,ref:this.ref,onRefChange:i=>{n.triggerNode.current=i}})}}const sv=new kn("Floating.Root"),vN=new kn("Floating.Content");function mN(){return sv.set(new hN)}function bN(e){return vN.set(new gN(e,sv.get()))}function _N(e){return new pN(e,sv.get())}function yN(e){return{name:"transformOrigin",options:e,fn(t){var x,A,T;const{placement:n,rects:i,middlewareData:s}=t,a=((x=s.arrow)==null?void 0:x.centerOffset)!==0,c=a?0:e.arrowWidth,d=a?0:e.arrowHeight,[h,g]=av(n),p={start:"0%",center:"50%",end:"100%"}[g],v=(((A=s.arrow)==null?void 0:A.x)??0)+c/2,b=(((T=s.arrow)==null?void 0:T.y)??0)+d/2;let w="",S="";return h==="bottom"?(w=a?p:`${v}px`,S=`${-d}px`):h==="top"?(w=a?p:`${v}px`,S=`${i.floating.height+d}px`):h==="right"?(w=`${-d}px`,S=a?p:`${b}px`):h==="left"&&(w=`${i.floating.width+d}px`,S=a?p:`${b}px`),{data:{x:w,y:S}}}}}function av(e){const[t,n="center"]=e.split("-");return[t,n]}function wN(e){return av(e)[0]}function xN(e){return av(e)[1]}function qy(e,t){ut(t,!0),mN();var n=U(),i=N(n);ct(i,()=>t.children??St),y(e,n),dt()}function Yy(e,t=1e4,n=Ae){let i=null,s=pt(_n(e));function l(){return window.setTimeout(()=>{O(s,e,!0),n(e)},t)}return be(()=>()=>{i&&clearTimeout(i)}),B.with(()=>f(s),a=>{O(s,a,!0),n(a),i&&clearTimeout(i),i=l()})}function SN(e){const t=Yy("",1e3),n=(e==null?void 0:e.onMatch)??(a=>a.focus()),i=(e==null?void 0:e.getCurrentItem)??(()=>document.activeElement);function s(a,c){var b,w;if(!c.length)return;t.current=t.current+a;const d=i(),h=((w=(b=c.find(S=>S===d))==null?void 0:b.textContent)==null?void 0:w.trim())??"",g=c.map(S=>{var x;return((x=S.textContent)==null?void 0:x.trim())??""}),p=jp(g,t.current,h),v=c.find(S=>{var x;return((x=S.textContent)==null?void 0:x.trim())===p});return v&&n(v),v}function l(){t.current=""}return{search:t,handleTypeaheadSearch:s,resetTypeahead:l}}function CN(e){const t=Yy("",1e3),n=E(()=>e.candidateValues());function i(l){if(!e.enabled||!f(n).length)return;t.current=t.current+l;const a=e.getCurrentItem(),c=f(n).find(p=>p===a)??"",d=f(n).map(p=>p??""),h=jp(d,t.current,c),g=f(n).find(p=>p===h);return g&&e.onMatch(g),g}function s(){t.current=""}return{search:t,handleTypeaheadSearch:i,resetTypeahead:s}}const AN=[xr,by,Cs],PN=[gr,my,Ss],kN=[...AN,...PN];var El,Il,Ol,Rl,Nl,Ml,Ll,Dl,Fl,Bl;class Xy{constructor(t){$(this,"opts");z(this,El,pt(!1));z(this,Il,pt(""));z(this,Ol,pt(null));z(this,Rl,pt(null));z(this,Nl,pt(null));z(this,Ml,pt(""));z(this,Ll,pt(null));z(this,Dl,E(()=>this.highlightedNode?this.highlightedNode.getAttribute("data-value"):null));z(this,Fl,E(()=>{if(this.highlightedNode)return this.highlightedNode.id}));z(this,Bl,E(()=>this.highlightedNode?this.highlightedNode.getAttribute("data-label"):null));$(this,"isUsingKeyboard",!1);$(this,"isCombobox",!1);$(this,"bitsAttrs");this.opts=t,this.isCombobox=t.isCombobox,this.bitsAttrs=jN(this),Wf(()=>{this.opts.open.current||this.setHighlightedNode(null)})}get touchedInput(){return f(_(this,El))}set touchedInput(t){O(_(this,El),t,!0)}get inputValue(){return f(_(this,Il))}set inputValue(t){O(_(this,Il),t,!0)}get inputNode(){return f(_(this,Ol))}set inputNode(t){O(_(this,Ol),t,!0)}get contentNode(){return f(_(this,Rl))}set contentNode(t){O(_(this,Rl),t,!0)}get triggerNode(){return f(_(this,Nl))}set triggerNode(t){O(_(this,Nl),t,!0)}get valueId(){return f(_(this,Ml))}set valueId(t){O(_(this,Ml),t,!0)}get highlightedNode(){return f(_(this,Ll))}set highlightedNode(t){O(_(this,Ll),t,!0)}get highlightedValue(){return f(_(this,Dl))}set highlightedValue(t){O(_(this,Dl),t)}get highlightedId(){return f(_(this,Fl))}set highlightedId(t){O(_(this,Fl),t)}get highlightedLabel(){return f(_(this,Bl))}set highlightedLabel(t){O(_(this,Bl),t)}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()}}El=new WeakMap,Il=new WeakMap,Ol=new WeakMap,Rl=new WeakMap,Nl=new WeakMap,Ml=new WeakMap,Ll=new WeakMap,Dl=new WeakMap,Fl=new WeakMap,Bl=new WeakMap;var zl,Vl,Hl,Wl;class TN extends Xy{constructor(n){super(n);$(this,"opts");$(this,"isMulti",!1);z(this,zl,E(()=>this.opts.value.current!==""));z(this,Vl,E(()=>{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)??"":""}));z(this,Hl,E(()=>this.opts.items.current.length?this.opts.items.current.filter(i=>!i.disabled).map(i=>i.label):[]));z(this,Wl,E(()=>!(this.isMulti||this.opts.items.current.length===0)));this.opts=n,be(()=>{!this.opts.open.current&&this.highlightedNode&&this.setHighlightedNode(null)}),Ce(()=>this.opts.open.current,()=>{this.opts.open.current&&this.setInitialHighlightedNode()})}get hasValue(){return f(_(this,zl))}set hasValue(n){O(_(this,zl),n)}get currentLabel(){return f(_(this,Vl))}set currentLabel(n){O(_(this,Vl),n)}get candidateLabels(){return f(_(this,Hl))}set candidateLabels(n){O(_(this,Hl),n)}get dataTypeaheadEnabled(){return f(_(this,Wl))}set dataTypeaheadEnabled(n){O(_(this,Wl),n)}includesItem(n){return this.opts.value.current===n}toggleItem(n,i=n){this.opts.value.current=this.includesItem(n)?"":n,this.inputValue=i}setInitialHighlightedNode(){nr(()=>{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)})}}zl=new WeakMap,Vl=new WeakMap,Hl=new WeakMap,Wl=new WeakMap;var Ul;class EN extends Xy{constructor(n){super(n);$(this,"opts");$(this,"isMulti",!0);z(this,Ul,E(()=>this.opts.value.current.length>0));this.opts=n,be(()=>{!this.opts.open.current&&this.highlightedNode&&this.setHighlightedNode(null)}),Ce(()=>this.opts.open.current,()=>{this.opts.open.current&&this.setInitialHighlightedNode()})}get hasValue(){return f(_(this,Ul))}set hasValue(n){O(_(this,Ul),n)}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(){nr(()=>{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)})}}Ul=new WeakMap;var _o,hs,qr,Zy,up,dp,Gl;class IN{constructor(t,n){z(this,qr);$(this,"opts");$(this,"root");z(this,_o);z(this,hs);z(this,Gl,E(()=>({id:this.opts.id.current,disabled:this.root.opts.disabled.current?!0:void 0,"aria-haspopup":"listbox","aria-expanded":Su(this.root.opts.open.current),"aria-activedescendant":this.root.highlightedId,"data-state":eo(this.root.opts.open.current),"data-disabled":Zn(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,ae({...t,onRefChange:i=>{this.root.triggerNode=i}}),He(this,_o,SN({getCurrentItem:()=>this.root.highlightedNode,onMatch:i=>{this.root.setHighlightedNode(i)}})),He(this,hs,CN({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(l=>l.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===gr||t.key===xr)&&t.preventDefault(),!this.root.opts.open.current){if(t.key===Gr||t.key===zr||t.key===xr||t.key===gr)t.preventDefault(),this.root.handleOpen();else if(!this.root.isMulti&&this.root.dataTypeaheadEnabled){_(this,hs).handleTypeaheadSearch(t.key);return}if(this.root.hasValue)return;const a=this.root.getCandidateNodes();if(!a.length)return;if(t.key===xr){const c=a[0];this.root.setHighlightedNode(c)}else if(t.key===gr){const c=a[a.length-1];this.root.setHighlightedNode(c)}return}if(t.key===rp){this.root.handleClose();return}if((t.key===Gr||t.key===zr&&_(this,_o).search.current==="")&&!t.isComposing&&(t.preventDefault(),Tt(this,qr,dp).call(this)))return;if(t.key===gr&&t.altKey&&this.root.handleClose(),kN.includes(t.key)){t.preventDefault();const a=this.root.getCandidateNodes(),c=this.root.highlightedNode,d=c?a.indexOf(c):-1,h=this.root.opts.loop.current;let g;if(t.key===xr?g=GO(a,d,h):t.key===gr?g=KO(a,d,h):t.key===my?g=qO(a,d,10,h):t.key===by?g=YO(a,d,10,h):t.key===Cs?g=a[0]:t.key===Ss&&(g=a[a.length-1]),!g)return;this.root.setHighlightedNode(g);return}const n=t.ctrlKey||t.altKey||t.metaKey,i=t.key.length===1,s=t.key===zr,l=this.root.getCandidateNodes();if(t.key!==rp){if(!n&&(i||s)){!_(this,_o).handleTypeaheadSearch(t.key,l)&&s&&(t.preventDefault(),Tt(this,qr,dp).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?Tt(this,qr,up).call(this,t):this.root.handleClose())}onpointerup(t){t.preventDefault(),t.pointerType==="touch"&&(this.root.opts.open.current===!1?Tt(this,qr,up).call(this,t):this.root.handleClose())}get props(){return f(_(this,Gl))}set props(t){O(_(this,Gl),t)}}_o=new WeakMap,hs=new WeakMap,qr=new WeakSet,Zy=function(){this.root.opts.open.current=!0,_(this,hs).resetTypeahead(),_(this,_o).resetTypeahead()},up=function(t){Tt(this,qr,Zy).call(this)},dp=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)},Gl=new WeakMap;var Kl,ql,Of,Yl,Xl;class ON{constructor(t,n){$(this,"opts");$(this,"root");z(this,Kl,pt(null));z(this,ql,pt(!1));z(this,Of,E(()=>{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)"}}));$(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()});$(this,"onEscapeKeydown",t=>{this.opts.onEscapeKeydown.current(t),!t.defaultPrevented&&this.root.handleClose()});$(this,"onOpenAutoFocus",t=>{t.preventDefault()});$(this,"onCloseAutoFocus",t=>{t.preventDefault()});z(this,Yl,E(()=>({open:this.root.opts.open.current})));z(this,Xl,E(()=>({id:this.opts.id.current,role:"listbox","aria-multiselectable":this.root.isMulti?"true":void 0,"data-state":eo(this.root.opts.open.current),[this.root.bitsAttrs.content]:"",style:{display:"flex",flexDirection:"column",outline:"none",boxSizing:"border-box",pointerEvents:"auto",...f(_(this,Of))},onpointermove:this.onpointermove})));$(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,ae({...t,onRefChange:i=>{this.root.contentNode=i},deps:()=>this.root.opts.open.current}),Kp(()=>{this.root.contentNode=null,this.isPositioned=!1}),Ce(()=>this.root.opts.open.current,()=>{this.root.opts.open.current||(this.isPositioned=!1)}),this.onpointermove=this.onpointermove.bind(this)}get viewportNode(){return f(_(this,Kl))}set viewportNode(t){O(_(this,Kl),t,!0)}get isPositioned(){return f(_(this,ql))}set isPositioned(t){O(_(this,ql),t,!0)}onpointermove(t){this.root.isUsingKeyboard=!1}get snippetProps(){return f(_(this,Yl))}set snippetProps(t){O(_(this,Yl),t)}get props(){return f(_(this,Xl))}set props(t){O(_(this,Xl),t)}}Kl=new WeakMap,ql=new WeakMap,Of=new WeakMap,Yl=new WeakMap,Xl=new WeakMap;var Zl,jl,Ql,Jl,$l;class RN{constructor(t,n){$(this,"opts");$(this,"root");z(this,Zl,E(()=>this.root.includesItem(this.opts.value.current)));z(this,jl,E(()=>this.root.highlightedValue===this.opts.value.current));$(this,"prevHighlighted",new hy(()=>this.isHighlighted));z(this,Ql,pt(!1));z(this,Jl,E(()=>({selected:this.isSelected,highlighted:this.isHighlighted})));z(this,$l,E(()=>({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":Zn(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,ae({...t,deps:()=>this.mounted}),Ce([()=>this.isHighlighted,()=>this.prevHighlighted.current],()=>{this.isHighlighted?this.opts.onHighlight.current():this.prevHighlighted.current&&this.opts.onUnhighlight.current()}),Ce(()=>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 f(_(this,Zl))}set isSelected(t){O(_(this,Zl),t)}get isHighlighted(){return f(_(this,jl))}set isHighlighted(t){O(_(this,jl),t)}get mounted(){return f(_(this,Ql))}set mounted(t){O(_(this,Ql),t,!0)}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 f(_(this,Jl))}set snippetProps(t){O(_(this,Jl),t)}onpointerdown(t){t.preventDefault()}onpointerup(t){if(!(t.defaultPrevented||!this.opts.ref.current)){if(t.pointerType==="touch"&&!ip){rn(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 f(_(this,$l))}set props(t){O(_(this,$l),t)}}Zl=new WeakMap,jl=new WeakMap,Ql=new WeakMap,Jl=new WeakMap,$l=new WeakMap;var tc,ec;class NN{constructor(t,n){$(this,"opts");$(this,"root");z(this,tc,pt(null));z(this,ec,E(()=>{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,ae(t)}get labelNode(){return f(_(this,tc))}set labelNode(t){O(_(this,tc),t,!0)}get props(){return f(_(this,ec))}set props(t){O(_(this,ec),t)}}tc=new WeakMap,ec=new WeakMap;var nc;class MN{constructor(t,n){$(this,"opts");$(this,"group");z(this,nc,E(()=>({id:this.opts.id.current,[this.group.root.bitsAttrs["group-label"]]:""})));this.opts=t,this.group=n,ae({...t,onRefChange:i=>{n.labelNode=i}})}get props(){return f(_(this,nc))}set props(t){O(_(this,nc),t)}}nc=new WeakMap;var rc,ic;class LN{constructor(t,n){$(this,"opts");$(this,"root");z(this,rc,E(()=>this.root.opts.name.current!==""));z(this,ic,E(()=>({disabled:Xp(this.root.opts.disabled.current),required:dI(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 f(_(this,rc))}set shouldRender(t){O(_(this,rc),t)}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 f(_(this,ic))}set props(t){O(_(this,ic),t)}}rc=new WeakMap,ic=new WeakMap;var oc,sc;class DN{constructor(t,n){$(this,"opts");$(this,"content");$(this,"root");z(this,oc,pt(0));z(this,sc,E(()=>({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,ae({...t,onRefChange:i=>{this.content.viewportNode=i},deps:()=>this.root.opts.open.current})}get prevScrollTop(){return f(_(this,oc))}set prevScrollTop(t){O(_(this,oc),t,!0)}get props(){return f(_(this,sc))}set props(t){O(_(this,sc),t)}}oc=new WeakMap,sc=new WeakMap;var ac,lc;class jy{constructor(t,n){$(this,"opts");$(this,"content");$(this,"root");$(this,"autoScrollTimer",null);$(this,"userScrollTimer",-1);$(this,"isUserScrolling",!1);$(this,"onAutoScroll",Ae);z(this,ac,pt(!1));z(this,lc,E(()=>({id:this.opts.id.current,"aria-hidden":aI(!0),style:{flexShrink:0},onpointerdown:this.onpointerdown,onpointermove:this.onpointermove,onpointerleave:this.onpointerleave})));this.opts=t,this.content=n,this.root=n.root,ae({...t,deps:()=>this.mounted}),Ce([()=>this.mounted],()=>{if(!this.mounted){this.isUserScrolling=!1;return}this.isUserScrolling}),be(()=>{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 f(_(this,ac))}set mounted(t){O(_(this,ac),t,!0)}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 f(_(this,lc))}set props(t){O(_(this,lc),t)}}ac=new WeakMap,lc=new WeakMap;var cc,uc;class FN{constructor(t){$(this,"scrollButtonState");$(this,"content");$(this,"root");z(this,cc,pt(!1));$(this,"scrollIntoViewTimer",null);$(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});$(this,"handleAutoScroll",()=>{const t=this.content.viewportNode,n=this.root.highlightedNode;!t||!n||(t.scrollTop=t.scrollTop+n.offsetHeight)});z(this,uc,E(()=>({...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,Ce([()=>this.content.viewportNode,()=>this.content.isPositioned],()=>{if(!(!this.content.viewportNode||!this.content.isPositioned))return this.handleScroll(!0),rn(this.content.viewportNode,"scroll",()=>this.handleScroll())}),Ce(()=>this.scrollButtonState.mounted,()=>{this.scrollButtonState.mounted&&(this.scrollIntoViewTimer&&clearTimeout(this.scrollIntoViewTimer),this.scrollIntoViewTimer=xu(5,()=>{const n=this.root.highlightedNode;n==null||n.scrollIntoView({block:this.root.opts.scrollAlignment.current})}))})}get canScrollDown(){return f(_(this,cc))}set canScrollDown(t){O(_(this,cc),t,!0)}get props(){return f(_(this,uc))}set props(t){O(_(this,uc),t)}}cc=new WeakMap,uc=new WeakMap;var dc,fc;class BN{constructor(t){$(this,"scrollButtonState");$(this,"content");$(this,"root");z(this,dc,pt(!1));$(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});$(this,"handleAutoScroll",()=>{!this.content.viewportNode||!this.root.highlightedNode||(this.content.viewportNode.scrollTop=this.content.viewportNode.scrollTop-this.root.highlightedNode.offsetHeight)});z(this,fc,E(()=>({...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,Ce([()=>this.content.viewportNode,()=>this.content.isPositioned],()=>{if(!(!this.content.viewportNode||!this.content.isPositioned))return this.handleScroll(!0),rn(this.content.viewportNode,"scroll",()=>this.handleScroll())})}get canScrollUp(){return f(_(this,dc))}set canScrollUp(t){O(_(this,dc),t,!0)}get props(){return f(_(this,fc))}set props(t){O(_(this,fc),t)}}dc=new WeakMap,fc=new WeakMap;const ks=new kn("Select.Root | Combobox.Root"),Qy=new kn("Select.Group | Combobox.Group"),jf=new kn("Select.Content | Combobox.Content");function zN(e){const{type:t,...n}=e,i=t==="single"?new TN(n):new EN(n);return ks.set(i)}function VN(e){return jf.set(new ON(e,ks.get()))}function HN(e){return new IN(e,ks.get())}function WN(e){return new RN(e,ks.get())}function UN(e){return new DN(e,jf.get())}function GN(e){return new BN(new jy(e,jf.get()))}function KN(e){return new FN(new jy(e,jf.get()))}function qN(e){return Qy.set(new NN(e,ks.get()))}function YN(e){return new MN(e,Qy.get())}function XN(e){return new LN(e,ks.get())}const ZN=["trigger","content","item","viewport","scroll-up-button","scroll-down-button","group","group-label","separator","arrow","input","content-wrapper","item-text","value"];function jN(e){const t=e.isCombobox,n={};for(const i of ZN)n[i]=t?`data-combobox-${i}`:`data-select-${i}`;return n}function W_(e,t){ut(t,!0);let n=k(t,"value",15,"");const i=XN({value:B.with(()=>n())});var s=U(),l=N(s);{var a=c=>{Qp(c,Nt(()=>i.props,{get value(){return n()},set value(d){n(d)}}))};gt(l,c=>{i.shouldRender&&c(a)})}y(e,s),dt()}function Jy(e,t){ut(t,!0),_N({id:B.with(()=>t.id),virtualEl:B.with(()=>t.virtualEl)});var n=U(),i=N(n);ct(i,()=>t.children??St),y(e,n),dt()}function QN(e,t){ut(t,!0);let n=k(t,"side",3,"bottom"),i=k(t,"sideOffset",3,0),s=k(t,"align",3,"center"),l=k(t,"alignOffset",3,0),a=k(t,"arrowPadding",3,0),c=k(t,"avoidCollisions",3,!0),d=k(t,"collisionBoundary",19,()=>[]),h=k(t,"collisionPadding",3,0),g=k(t,"hideWhenDetached",3,!1),p=k(t,"onPlaced",3,()=>{}),v=k(t,"sticky",3,"partial"),b=k(t,"updatePositionStrategy",3,"optimized"),w=k(t,"strategy",3,"fixed"),S=k(t,"dir",3,"ltr"),x=k(t,"style",19,()=>({})),A=k(t,"wrapperId",19,le),T=k(t,"customAnchor",3,null);const D=bN({side:B.with(()=>n()),sideOffset:B.with(()=>i()),align:B.with(()=>s()),alignOffset:B.with(()=>l()),id:B.with(()=>t.id),arrowPadding:B.with(()=>a()),avoidCollisions:B.with(()=>c()),collisionBoundary:B.with(()=>d()),collisionPadding:B.with(()=>h()),hideWhenDetached:B.with(()=>g()),onPlaced:B.with(()=>p()),sticky:B.with(()=>v()),updatePositionStrategy:B.with(()=>b()),strategy:B.with(()=>w()),dir:B.with(()=>S()),style:B.with(()=>x()),enabled:B.with(()=>t.enabled),wrapperId:B.with(()=>A()),customAnchor:B.with(()=>T())}),R=E(()=>Jt(D.wrapperProps,{style:{pointerEvents:"auto"}}));var L=U(),V=N(L);ct(V,()=>t.content??St,()=>({props:D.props,wrapperProps:f(R)})),y(e,L),dt()}function JN(e,t){ut(t,!0),xs(()=>{var s;(s=t.onPlaced)==null||s.call(t)});var n=U(),i=N(n);ct(i,()=>t.content??St,()=>({props:{},wrapperProps:{}})),y(e,n),dt()}function $N(e,t){let n=k(t,"isStatic",3,!1),i=wt(t,["$$slots","$$events","$$legacy","content","isStatic","onPlaced"]);var s=U(),l=N(s);{var a=d=>{JN(d,{get content(){return t.content},get onPlaced(){return t.onPlaced}})},c=d=>{QN(d,Nt({get content(){return t.content},get onPlaced(){return t.onPlaced}},()=>i))};gt(l,d=>{n()?d(a):d(c,!1)})}y(e,s)}var t3=Z("<!> <!>",1);function $y(e,t){ut(t,!0);let n=k(t,"interactOutsideBehavior",3,"close"),i=k(t,"trapFocus",3,!0),s=k(t,"isValidEvent",3,()=>!1),l=k(t,"customAnchor",3,null),a=k(t,"isStatic",3,!1),c=wt(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"]);$N(e,{get isStatic(){return a()},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 l()},get enabled(){return t.enabled},content:(h,g)=>{let p=()=>g==null?void 0:g().props,v=()=>g==null?void 0:g().wrapperProps;var b=t3(),w=N(b);{var S=T=>{Jd(T,{get preventScroll(){return t.preventScroll}})},x=T=>{var D=U(),R=N(D);{var L=V=>{Jd(V,{get preventScroll(){return t.preventScroll}})};gt(R,V=>{t.forceMount||V(L)},!0)}y(T,D)};gt(w,T=>{t.forceMount&&t.enabled?T(S):T(x,!1)})}var A=nt(w,2);{const T=(R,L)=>{let V=()=>L==null?void 0:L().props;ky(R,{get onEscapeKeydown(){return t.onEscapeKeydown},get escapeKeydownBehavior(){return t.escapeKeydownBehavior},get enabled(){return t.enabled},children:(M,H)=>{Py(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:(tt,it)=>{let G=()=>it==null?void 0:it().props;Ny(tt,{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:(ot,Y)=>{var J=U(),et=N(J);{let rt=E(()=>({props:Jt(c,p(),G(),V(),{style:{pointerEvents:"auto"}}),wrapperProps:v()}));ct(et,()=>t.popper??St,()=>f(rt))}y(ot,J)},$$slots:{default:!0}})},$$slots:{default:!0}})},$$slots:{default:!0}})};let D=E(()=>t.enabled&&i());Oy(A,{get id(){return t.id},get onOpenAutoFocus(){return t.onOpenAutoFocus},get onCloseAutoFocus(){return t.onCloseAutoFocus},get loop(){return t.loop},get trapFocus(){return f(D)},get forceMount(){return t.forceMount},focusScope:T,$$slots:{focusScope:!0}})}y(h,b)},$$slots:{content:!0}}),dt()}function tw(e,t){let n=k(t,"interactOutsideBehavior",3,"close"),i=k(t,"trapFocus",3,!0),s=k(t,"isValidEvent",3,()=>!1),l=k(t,"customAnchor",3,null),a=k(t,"isStatic",3,!1),c=wt(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"]);qf(e,Nt({get id(){return t.id},get present(){return t.present}},()=>c,{presence:h=>{$y(h,Nt({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 l()},get isStatic(){return a()},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},()=>c))},$$slots:{presence:!0}}))}function ew(e,t){let n=k(t,"interactOutsideBehavior",3,"close"),i=k(t,"trapFocus",3,!0),s=k(t,"isValidEvent",3,()=>!1),l=k(t,"customAnchor",3,null),a=k(t,"isStatic",3,!1),c=wt(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"]);$y(e,Nt({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 l()},get isStatic(){return a()},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}},()=>c,{forceMount:!0}))}var e3=Z("<div><div><!></div></div>"),n3=Z("<div><div><!></div></div>");function r3(e,t){ut(t,!0);let n=k(t,"id",19,le),i=k(t,"ref",15,null),s=k(t,"forceMount",3,!1),l=k(t,"side",3,"bottom"),a=k(t,"onInteractOutside",3,Ae),c=k(t,"onEscapeKeydown",3,Ae),d=k(t,"preventScroll",3,!1),h=wt(t,["$$slots","$$events","$$legacy","id","ref","forceMount","side","onInteractOutside","onEscapeKeydown","children","child","preventScroll"]);const g=VN({id:B.with(()=>n()),ref:B.with(()=>i(),x=>i(x)),onInteractOutside:B.with(()=>a()),onEscapeKeydown:B.with(()=>c())}),p=E(()=>Jt(h,g.props));var v=U(),b=N(v);{var w=x=>{ew(x,Nt(()=>f(p),()=>g.popperProps,{get side(){return l()},get enabled(){return g.root.opts.open.current},get id(){return n()},get preventScroll(){return d()},forceMount:!0,popper:(T,D)=>{let R=()=>D==null?void 0:D().props,L=()=>D==null?void 0:D().wrapperProps;const V=E(()=>Jt(R(),{style:g.props.style}));var M=U(),H=N(M);{var j=it=>{var G=U(),ot=N(G);{let Y=E(()=>({props:f(V),wrapperProps:L(),...g.snippetProps}));ct(ot,()=>t.child,()=>f(Y))}y(it,G)},tt=it=>{var G=e3();Vt(G,()=>({...L()}));var ot=q(G);Vt(ot,()=>({...f(V)}));var Y=q(ot);ct(Y,()=>t.children??St),K(ot),K(G),y(it,G)};gt(H,it=>{t.child?it(j):it(tt,!1)})}y(T,M)},$$slots:{popper:!0}}))},S=x=>{var A=U(),T=N(A);{var D=R=>{tw(R,Nt(()=>f(p),()=>g.popperProps,{get side(){return l()},get present(){return g.root.opts.open.current},get id(){return n()},get preventScroll(){return d()},forceMount:!1,popper:(V,M)=>{let H=()=>M==null?void 0:M().props,j=()=>M==null?void 0:M().wrapperProps;const tt=E(()=>Jt(H(),{style:g.props.style}));var it=U(),G=N(it);{var ot=J=>{var et=U(),rt=N(et);{let ht=E(()=>({props:f(tt),wrapperProps:j(),...g.snippetProps}));ct(rt,()=>t.child,()=>f(ht))}y(J,et)},Y=J=>{var et=n3();Vt(et,()=>({...j()}));var rt=q(et);Vt(rt,()=>({...f(tt)}));var ht=q(rt);ct(ht,()=>t.children??St),K(rt),K(et),y(J,et)};gt(G,J=>{t.child?J(ot):J(Y,!1)})}y(V,it)},$$slots:{popper:!0}}))};gt(T,R=>{s()||R(D)},!0)}y(x,A)};gt(b,x=>{s()?x(w):x(S,!1)})}y(e,v),dt()}function lv(e,t){ut(t,!0);let n=k(t,"mounted",15,!1),i=k(t,"onMountedChange",3,Ae);qp(()=>(n(!0),i()(!0),()=>{n(!1),i()(!1)})),dt()}var i3=Z("<div><!></div>"),o3=Z("<!> <!>",1);function s3(e,t){ut(t,!0);let n=k(t,"id",19,le),i=k(t,"ref",15,null),s=k(t,"label",19,()=>t.value),l=k(t,"disabled",3,!1),a=k(t,"onHighlight",3,Ae),c=k(t,"onUnhighlight",3,Ae),d=wt(t,["$$slots","$$events","$$legacy","id","ref","value","label","disabled","children","child","onHighlight","onUnhighlight"]);const h=WN({id:B.with(()=>n()),ref:B.with(()=>i(),x=>i(x)),value:B.with(()=>t.value),disabled:B.with(()=>l()),label:B.with(()=>s()),onHighlight:B.with(()=>a()),onUnhighlight:B.with(()=>c())}),g=E(()=>Jt(d,h.props));var p=o3(),v=N(p);{var b=x=>{var A=U(),T=N(A);{let D=E(()=>({props:f(g),...h.snippetProps}));ct(T,()=>t.child,()=>f(D))}y(x,A)},w=x=>{var A=i3();Vt(A,()=>({...f(g)}));var T=q(A);ct(T,()=>t.children??St,()=>h.snippetProps),K(A),y(x,A)};gt(v,x=>{t.child?x(b):x(w,!1)})}var S=nt(v,2);lv(S,{get mounted(){return h.mounted},set mounted(x){h.mounted=x}}),y(e,p),dt()}var a3=Z("<div><!></div>");function l3(e,t){ut(t,!0);let n=k(t,"id",19,le),i=k(t,"ref",15,null),s=wt(t,["$$slots","$$events","$$legacy","id","ref","children","child"]);const l=qN({id:B.with(()=>n()),ref:B.with(()=>i(),p=>i(p))}),a=E(()=>Jt(s,l.props));var c=U(),d=N(c);{var h=p=>{var v=U(),b=N(v);ct(b,()=>t.child,()=>({props:f(a)})),y(p,v)},g=p=>{var v=a3();Vt(v,()=>({...f(a)}));var b=q(v);ct(b,()=>t.children??St),K(v),y(p,v)};gt(d,p=>{t.child?p(h):p(g,!1)})}y(e,c),dt()}var c3=Z("<div><!></div>");function u3(e,t){ut(t,!0);let n=k(t,"id",19,le),i=k(t,"ref",15,null),s=wt(t,["$$slots","$$events","$$legacy","id","ref","child","children"]);const l=YN({id:B.with(()=>n()),ref:B.with(()=>i(),p=>i(p))}),a=E(()=>Jt(s,l.props));var c=U(),d=N(c);{var h=p=>{var v=U(),b=N(v);ct(b,()=>t.child,()=>({props:f(a)})),y(p,v)},g=p=>{var v=c3();Vt(v,()=>({...f(a)}));var b=q(v);ct(b,()=>t.children??St),K(v),y(p,v)};gt(d,p=>{t.child?p(h):p(g,!1)})}y(e,c),dt()}var d3=Z("<div><!></div>");function f3(e,t){ut(t,!0);let n=k(t,"id",19,le),i=k(t,"ref",15,null),s=wt(t,["$$slots","$$events","$$legacy","id","ref","children","child"]);const l=UN({id:B.with(()=>n()),ref:B.with(()=>i(),p=>i(p))}),a=E(()=>Jt(s,l.props));var c=U(),d=N(c);{var h=p=>{var v=U(),b=N(v);ct(b,()=>t.child,()=>({props:f(a)})),y(p,v)},g=p=>{var v=d3();Vt(v,()=>({...f(a)}));var b=q(v);ct(b,()=>t.children??St),K(v),y(p,v)};gt(d,p=>{t.child?p(h):p(g,!1)})}y(e,c),dt()}var h3=Z("<div><!></div>"),g3=Z("<!> <!>",1);function p3(e,t){ut(t,!0);let n=k(t,"id",19,le),i=k(t,"ref",15,null),s=k(t,"delay",3,()=>50),l=wt(t,["$$slots","$$events","$$legacy","id","ref","delay","child","children"]);const a=KN({id:B.with(()=>n()),ref:B.with(()=>i(),p=>i(p)),delay:B.with(()=>s())}),c=E(()=>Jt(l,a.props));var d=U(),h=N(d);{var g=p=>{var v=g3(),b=N(v);lv(b,{get mounted(){return a.scrollButtonState.mounted},set mounted(A){a.scrollButtonState.mounted=A}});var w=nt(b,2);{var S=A=>{var T=U(),D=N(T);ct(D,()=>t.child,()=>({props:l})),y(A,T)},x=A=>{var T=h3();Vt(T,()=>({...f(c)}));var D=q(T);ct(D,()=>t.children??St),K(T),y(A,T)};gt(w,A=>{t.child?A(S):A(x,!1)})}y(p,v)};gt(h,p=>{a.canScrollDown&&p(g)})}y(e,d),dt()}var v3=Z("<div><!></div>"),m3=Z("<!> <!>",1);function b3(e,t){ut(t,!0);let n=k(t,"id",19,le),i=k(t,"ref",15,null),s=k(t,"delay",3,()=>50),l=wt(t,["$$slots","$$events","$$legacy","id","ref","delay","child","children"]);const a=GN({id:B.with(()=>n()),ref:B.with(()=>i(),p=>i(p)),delay:B.with(()=>s())}),c=E(()=>Jt(l,a.props));var d=U(),h=N(d);{var g=p=>{var v=m3(),b=N(v);lv(b,{get mounted(){return a.scrollButtonState.mounted},set mounted(A){a.scrollButtonState.mounted=A}});var w=nt(b,2);{var S=A=>{var T=U(),D=N(T);ct(D,()=>t.child,()=>({props:l})),y(A,T)},x=A=>{var T=v3();Vt(T,()=>({...f(c)}));var D=q(T);ct(D,()=>t.children??St),K(T),y(A,T)};gt(w,A=>{t.child?A(S):A(x,!1)})}y(p,v)};gt(h,p=>{a.canScrollUp&&p(g)})}y(e,d),dt()}function _3(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function y3(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}var nw={exports:{}};/*! https://mths.be/cssescape v1.5.1 by @mathias | MIT license */(function(e,t){(function(n,i){e.exports=i(n)})(Fr,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 l=String(s),a=l.length,c=-1,d,h="",g=l.charCodeAt(0);++c<a;){if(d=l.charCodeAt(c),d==0){h+="�";continue}if(d>=1&&d<=31||d==127||c==0&&d>=48&&d<=57||c==1&&d>=48&&d<=57&&g==45){h+="\\"+d.toString(16)+" ";continue}if(c==0&&a==1&&d==45){h+="\\"+l.charAt(c);continue}if(d>=128||d==45||d==95||d>=48&&d<=57||d>=65&&d<=90||d>=97&&d<=122){h+=l.charAt(c);continue}h+="\\"+l.charAt(c)}return h};return n.CSS||(n.CSS={}),n.CSS.escape=i,i})})(nw);var w3=nw.exports;const rw=ay(w3),x3="data-command-root",S3="data-command-list",C3="data-command-input",A3="data-command-empty",iw="data-command-group",ow="data-command-group-items",sw="data-command-group-heading",aw="data-command-item",P3="data-command-input-label",po="data-value",Zs=`[${iw}]`,Ig=`[${ow}]`,k3=`[${sw}]`,lw=`[${aw}]`,Og=`${lw}:not([aria-disabled="true"])`,To=new kn("Command.Root"),T3=new kn("Command.List"),Tu=new kn("Command.Group"),U_={search:"",value:"",filtered:{count:0,items:new Map,groups:new Set}};var gs,hc,gc,pc,vc,mc,bc,xe,cw,Vd,fp,Hd,Wd,Ud,Ko,uw,hp,gp,pp,_c;class E3{constructor(t){z(this,xe);$(this,"opts");z(this,gs,!1);$(this,"sortAfterTick",!1);$(this,"sortAndFilterAfterTick",!1);$(this,"allItems",new Set);$(this,"allGroups",new Map);$(this,"allIds",new Map);z(this,hc,pt(0));z(this,gc,pt(null));z(this,pc,pt(null));z(this,vc,pt(null));z(this,mc,pt(U_));z(this,bc,pt(_n(U_)));z(this,_c,E(()=>({id:this.opts.id.current,role:"application",[x3]:"",tabindex:-1,onkeydown:this.onkeydown})));this.opts=t;const n={...this._commandState,value:this.opts.value.current??""};this._commandState=n,this.commandState=n,ae(t),this.onkeydown=this.onkeydown.bind(this)}get key(){return f(_(this,hc))}set key(t){O(_(this,hc),t,!0)}get viewportNode(){return f(_(this,gc))}set viewportNode(t){O(_(this,gc),t,!0)}get inputNode(){return f(_(this,pc))}set inputNode(t){O(_(this,pc),t,!0)}get labelNode(){return f(_(this,vc))}set labelNode(t){O(_(this,vc),t,!0)}get commandState(){return f(_(this,mc))}set commandState(t){O(_(this,mc),t)}get _commandState(){return f(_(this,bc))}set _commandState(t){O(_(this,bc),t,!0)}setState(t,n,i){Object.is(this._commandState[t],n)||(this._commandState[t]=n,t==="search"?(Tt(this,xe,Ud).call(this),Tt(this,xe,Hd).call(this)):t==="value"&&(i||Tt(this,xe,uw).call(this)),Tt(this,xe,Vd).call(this))}setValue(t,n){t!==this.opts.value.current&&t===""&&nr(()=>{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(Og)).filter(i=>!!i):[]}updateSelectedToIndex(t){const i=this.getValidItems()[t];i&&this.setValue(i.getAttribute(po)??"")}updateSelectedByItem(t){const n=Tt(this,xe,Ko).call(this),i=this.getValidItems(),s=i.findIndex(a=>a===n);let l=i[s+t];this.opts.loop.current&&(l=s+t<0?i[i.length-1]:s+t===i.length?i[0]:i[s+t]),l&&this.setValue(l.getAttribute(po)??"")}updateSelectedByGroup(t){const n=Tt(this,xe,Ko).call(this);let i=n==null?void 0:n.closest(Zs),s;for(;i&&!s;)i=t>0?_3(i,Zs):y3(i,Zs),s=i==null?void 0:i.querySelector(Og);s?this.setValue(s.getAttribute(po)??""):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,Tt(this,xe,fp).call(this,t,n)),this.sortAfterTick||(this.sortAfterTick=!0,nr(()=>{Tt(this,xe,Hd).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,nr(()=>{Tt(this,xe,Ud).call(this),Tt(this,xe,Hd).call(this),this.sortAndFilterAfterTick=!1})),Tt(this,xe,Vd).call(this),()=>{const i=Tt(this,xe,Ko).call(this);this.allIds.delete(t),this.allItems.delete(t),this.commandState.filtered.items.delete(t),Tt(this,xe,Ud).call(this),(i==null?void 0:i.getAttribute("id"))===t&&Tt(this,xe,Wd).call(this),Tt(this,xe,Vd).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 gI:case pI:{this.opts.vimBindings.current&&t.ctrlKey&&Tt(this,xe,gp).call(this,t);break}case xr:Tt(this,xe,gp).call(this,t);break;case hI:case vI:{this.opts.vimBindings.current&&t.ctrlKey&&Tt(this,xe,pp).call(this,t);break}case gr:Tt(this,xe,pp).call(this,t);break;case Cs:t.preventDefault(),this.updateSelectedToIndex(0);break;case Ss:t.preventDefault(),Tt(this,xe,hp).call(this);break;case Gr:if(!t.isComposing&&t.keyCode!==229){t.preventDefault();const n=Tt(this,xe,Ko).call(this);n&&(n==null||n.click())}}}get props(){return f(_(this,_c))}set props(t){O(_(this,_c),t)}}gs=new WeakMap,hc=new WeakMap,gc=new WeakMap,pc=new WeakMap,vc=new WeakMap,mc=new WeakMap,bc=new WeakMap,xe=new WeakSet,cw=function(){return ty(this._commandState)},Vd=function(){_(this,gs)||(He(this,gs,!0),nr(()=>{var i,s;He(this,gs,!1);const t=Tt(this,xe,cw).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))}))},fp=function(t,n){const i=this.opts.filter.current??hw;return t?i(t,this._commandState.search,n):0},Hd=function(){var a;if(!this._commandState.search||this.opts.shouldFilter.current===!1){Tt(this,xe,Wd).call(this);return}const t=this._commandState.filtered.items,n=[];for(const c of this._commandState.filtered.groups){const d=this.allGroups.get(c);let h=0;if(!d){n.push([c,h]);continue}for(const g of d){const p=t.get(g);h=Math.max(p??0,h)}n.push([c,h])}const i=this.viewportNode,s=this.getValidItems().sort((c,d)=>{const h=c.getAttribute("data-value"),g=d.getAttribute("data-value"),p=t.get(h)??0;return(t.get(g)??0)-p});for(const c of s){const d=c.closest(Ig);if(d){const h=c.parentElement===d?c:c.closest(`${Ig} > *`);h&&d.appendChild(h)}else{const h=c.parentElement===i?c:c.closest(`${Ig} > *`);h&&(i==null||i.appendChild(h))}}const l=n.sort((c,d)=>d[1]-c[1]);for(const c of l){const d=i==null?void 0:i.querySelector(`${Zs}[${po}="${rw(c[0])}"]`);(a=d==null?void 0:d.parentElement)==null||a.appendChild(d)}Tt(this,xe,Wd).call(this)},Wd=function(){nr(()=>{const t=this.getValidItems().find(i=>i.getAttribute("aria-disabled")!=="true"),n=t==null?void 0:t.getAttribute(po);this.setValue(n||"")})},Ud=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 l=((n=this.allIds.get(s))==null?void 0:n.value)??"",a=((i=this.allIds.get(s))==null?void 0:i.keywords)??[],c=Tt(this,xe,fp).call(this,l,a);this._commandState.filtered.items.set(s,c),c>0&&t++}for(const[s,l]of this.allGroups)for(const a of l){const c=this._commandState.filtered.items.get(a);if(c&&c>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(`${Og}[data-selected]`);if(n)return n},uw=function(){nr(()=>{var s,l,a,c;const t=Tt(this,xe,Ko).call(this);if(!t)return;const n=(s=t.parentElement)==null?void 0:s.parentElement;if(!n)return;const i=qI(n);if(i&&((l=i.dataset)==null?void 0:l.value)===((a=t.dataset)==null?void 0:a.value)){const d=(c=t==null?void 0:t.closest(Zs))==null?void 0:c.querySelector(k3);d==null||d.scrollIntoView({block:"nearest"});return}t.scrollIntoView({block:"nearest"})})},hp=function(){return this.updateSelectedToIndex(this.getValidItems().length-1)},gp=function(t){t.preventDefault(),t.metaKey?Tt(this,xe,hp).call(this):t.altKey?this.updateSelectedByGroup(1):this.updateSelectedByItem(1)},pp=function(t){t.preventDefault(),t.metaKey?this.updateSelectedToIndex(0):t.altKey?this.updateSelectedByGroup(-1):this.updateSelectedByItem(-1)},_c=new WeakMap;var yc,wc,xc;class I3{constructor(t,n){$(this,"opts");$(this,"root");z(this,yc,!0);z(this,wc,E(()=>this.root._commandState.filtered.count===0&&_(this,yc)===!1||this.opts.forceMount.current));z(this,xc,E(()=>({id:this.opts.id.current,role:"presentation",[A3]:""})));this.opts=t,this.root=n,Wf(()=>{He(this,yc,!1)}),ae({...t,deps:()=>this.shouldRender})}get shouldRender(){return f(_(this,wc))}set shouldRender(t){O(_(this,wc),t)}get props(){return f(_(this,xc))}set props(t){O(_(this,xc),t)}}yc=new WeakMap,wc=new WeakMap,xc=new WeakMap;var Sc,Cc,Ac,Pc;class O3{constructor(t,n){$(this,"opts");$(this,"root");z(this,Sc,pt(null));z(this,Cc,pt(""));z(this,Ac,E(()=>this.opts.forceMount.current||this.root.opts.shouldFilter.current===!1||!this.root.commandState.search?!0:this.root._commandState.filtered.groups.has(this.trueValue)));z(this,Pc,E(()=>({id:this.opts.id.current,role:"presentation",hidden:this.shouldRender?void 0:!0,"data-value":this.trueValue,[iw]:""})));this.opts=t,this.root=n,this.trueValue=t.value.current??t.id.current,ae({...t,deps:()=>this.shouldRender}),Ce(()=>this.trueValue,()=>this.root.registerGroup(this.trueValue)),be(()=>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 f(_(this,Sc))}set headingNode(t){O(_(this,Sc),t,!0)}get trueValue(){return f(_(this,Cc))}set trueValue(t){O(_(this,Cc),t,!0)}get shouldRender(){return f(_(this,Ac))}set shouldRender(t){O(_(this,Ac),t)}get props(){return f(_(this,Pc))}set props(t){O(_(this,Pc),t)}}Sc=new WeakMap,Cc=new WeakMap,Ac=new WeakMap,Pc=new WeakMap;var kc;class R3{constructor(t,n){$(this,"opts");$(this,"group");z(this,kc,E(()=>({id:this.opts.id.current,[sw]:""})));this.opts=t,this.group=n,ae({...t,onRefChange:i=>{this.group.headingNode=i}})}get props(){return f(_(this,kc))}set props(t){O(_(this,kc),t)}}kc=new WeakMap;var Tc;class N3{constructor(t,n){$(this,"opts");$(this,"group");z(this,Tc,E(()=>{var t;return{id:this.opts.id.current,role:"group",[ow]:"","aria-labelledby":((t=this.group.headingNode)==null?void 0:t.id)??void 0}}));this.opts=t,this.group=n,ae(t)}get props(){return f(_(this,Tc))}set props(t){O(_(this,Tc),t)}}Tc=new WeakMap;var Rf,Ec;class M3{constructor(t,n){$(this,"opts");$(this,"root");z(this,Rf,E(()=>{var n;const t=(n=this.root.viewportNode)==null?void 0:n.querySelector(`${lw}[${po}="${rw(this.root.opts.value.current)}"]`);if(t)return(t==null?void 0:t.getAttribute("id"))??void 0}));z(this,Ec,E(()=>{var t,n;return{id:this.opts.id.current,type:"text",[C3]:"",autocomplete:"off",autocorrect:"off",spellcheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":Su(!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":f(_(this,Rf))}}));this.opts=t,this.root=n,ae({...t,onRefChange:i=>{this.root.inputNode=i}}),Ce(()=>this.opts.ref.current,()=>{const i=this.opts.ref.current;i&&this.opts.autofocus.current&&xu(10,()=>i.focus())}),Ce(()=>this.opts.value.current,()=>{this.root.commandState.search!==this.opts.value.current&&this.root.setState("search",this.opts.value.current)})}get props(){return f(_(this,Ec))}set props(t){O(_(this,Ec),t)}}Rf=new WeakMap,Ec=new WeakMap;var yo,Nf,Ic,Oc,Rc,Po,dw,vp,Nc;class L3{constructor(t,n){z(this,Po);$(this,"opts");$(this,"root");z(this,yo,null);z(this,Nf,E(()=>{var t;return this.opts.forceMount.current||((t=_(this,yo))==null?void 0:t.opts.forceMount.current)===!0}));z(this,Ic,pt(""));z(this,Oc,E(()=>{if(this.opts.ref.current,f(_(this,Nf))||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}));z(this,Rc,E(()=>this.root.opts.value.current===this.trueValue&&this.trueValue!==""));z(this,Nc,E(()=>({id:this.opts.id.current,"aria-disabled":Yp(this.opts.disabled.current),"aria-selected":py(this.isSelected),"data-disabled":Zn(this.opts.disabled.current),"data-selected":cI(this.isSelected),"data-value":this.trueValue,[aw]:"",role:"option",onpointermove:this.onpointermove,onclick:this.onclick})));this.opts=t,this.root=n,He(this,yo,Tu.getOr(null)),this.trueValue=t.value.current,ae({...t,deps:()=>!!this.root.commandState.search}),Ce([()=>this.trueValue,()=>{var i;return(i=_(this,yo))==null?void 0:i.trueValue},()=>this.opts.forceMount.current],()=>{var i;if(!this.opts.forceMount.current)return this.root.registerItem(this.trueValue,(i=_(this,yo))==null?void 0:i.trueValue)}),Ce([()=>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(l=>l.trim())),(s=this.opts.ref.current)==null||s.setAttribute(po,this.trueValue)}),this.onclick=this.onclick.bind(this),this.onpointermove=this.onpointermove.bind(this)}get trueValue(){return f(_(this,Ic))}set trueValue(t){O(_(this,Ic),t,!0)}get shouldRender(){return f(_(this,Oc))}set shouldRender(t){O(_(this,Oc),t)}get isSelected(){return f(_(this,Rc))}set isSelected(t){O(_(this,Rc),t)}onpointermove(t){this.opts.disabled.current||this.root.opts.disablePointerSelection.current||Tt(this,Po,vp).call(this)}onclick(t){this.opts.disabled.current||Tt(this,Po,dw).call(this)}get props(){return f(_(this,Nc))}set props(t){O(_(this,Nc),t)}}yo=new WeakMap,Nf=new WeakMap,Ic=new WeakMap,Oc=new WeakMap,Rc=new WeakMap,Po=new WeakSet,dw=function(){var t;this.opts.disabled.current||(Tt(this,Po,vp).call(this),(t=this.opts.onSelect)==null||t.current())},vp=function(){this.opts.disabled.current||this.root.setValue(this.trueValue,!0)},Nc=new WeakMap;var Mc;class D3{constructor(t,n){$(this,"opts");$(this,"root");z(this,Mc,E(()=>({id:this.opts.id.current,role:"listbox","aria-label":this.opts.ariaLabel.current,[S3]:""})));this.opts=t,this.root=n,ae(t)}get props(){return f(_(this,Mc))}set props(t){O(_(this,Mc),t)}}Mc=new WeakMap;var Lc;class F3{constructor(t,n){$(this,"opts");$(this,"root");z(this,Lc,E(()=>{var t;return{id:this.opts.id.current,[P3]:"",for:(t=this.opts.for)==null?void 0:t.current,style:uy}}));this.opts=t,this.root=n,ae({...t,onRefChange:i=>{this.root.labelNode=i}})}get props(){return f(_(this,Lc))}set props(t){O(_(this,Lc),t)}}Lc=new WeakMap;function B3(e){return To.set(new E3(e))}function z3(e){return new I3(e,To.get())}function V3(e){const t=Tu.getOr(null);return new L3({...e,group:t},To.get())}function H3(e){return Tu.set(new O3(e,To.get()))}function W3(e){return new R3(e,Tu.get())}function U3(e){return new N3(e,Tu.get())}function G3(e){return new M3(e,To.get())}function K3(e){return T3.set(new D3(e,To.get()))}function q3(e){return new F3(e,To.get())}var Y3=Z("<label><!></label>");function X3(e,t){ut(t,!0);let n=k(t,"id",19,le),i=k(t,"ref",15,null),s=wt(t,["$$slots","$$events","$$legacy","id","ref","children"]);const l=q3({id:B.with(()=>n()),ref:B.with(()=>i(),h=>i(h))}),a=E(()=>Jt(s,l.props));var c=Y3();Vt(c,()=>({...f(a)}));var d=q(c);ct(d,()=>t.children??St),K(c),y(e,c),dt()}var Z3=Z("<!> <!>",1),j3=Z("<div><!> <!></div>");function Q3(e,t){ut(t,!0);const n=tt=>{X3(tt,{children:(it,G)=>{te();var ot=Ee();Mt(()=>me(ot,p())),y(it,ot)},$$slots:{default:!0}})};let i=k(t,"id",19,le),s=k(t,"ref",15,null),l=k(t,"value",15,""),a=k(t,"onValueChange",3,Ae),c=k(t,"onStateChange",3,Ae),d=k(t,"loop",3,!1),h=k(t,"shouldFilter",3,!0),g=k(t,"filter",3,hw),p=k(t,"label",3,""),v=k(t,"vimBindings",3,!0),b=k(t,"disablePointerSelection",3,!1),w=wt(t,["$$slots","$$events","$$legacy","id","ref","value","onValueChange","onStateChange","loop","shouldFilter","filter","label","vimBindings","disablePointerSelection","children","child"]);const S=B3({id:B.with(()=>i()),ref:B.with(()=>s(),tt=>s(tt)),filter:B.with(()=>g()),shouldFilter:B.with(()=>h()),loop:B.with(()=>d()),value:B.with(()=>l(),tt=>{l()!==tt&&(l(tt),a()(tt))}),vimBindings:B.with(()=>v()),disablePointerSelection:B.with(()=>b()),onStateChange:B.with(()=>c())}),x=tt=>S.updateSelectedToIndex(tt),A=tt=>S.updateSelectedByGroup(tt),T=tt=>S.updateSelectedByItem(tt),D=()=>S.getValidItems(),R=E(()=>Jt(w,S.props));var L={updateSelectedToIndex:x,updateSelectedByGroup:A,updateSelectedByItem:T,getValidItems:D},V=U(),M=N(V);{var H=tt=>{var it=Z3(),G=N(it);n(G);var ot=nt(G,2);ct(ot,()=>t.child,()=>({props:f(R)})),y(tt,it)},j=tt=>{var it=j3();Vt(it,()=>({...f(R)}));var G=q(it);n(G);var ot=nt(G,2);ct(ot,()=>t.children??St),K(it),y(tt,it)};gt(M,tt=>{t.child?tt(H):tt(j,!1)})}return y(e,V),dt(L)}var J3=Z("<div><!></div>");function $3(e,t){ut(t,!0);let n=k(t,"id",19,le),i=k(t,"ref",15,null),s=k(t,"forceMount",3,!1),l=wt(t,["$$slots","$$events","$$legacy","id","ref","children","child","forceMount"]);const a=z3({id:B.with(()=>n()),ref:B.with(()=>i(),p=>i(p)),forceMount:B.with(()=>s())}),c=E(()=>Jt(a.props,l));var d=U(),h=N(d);{var g=p=>{var v=U(),b=N(v);{var w=x=>{var A=U(),T=N(A);ct(T,()=>t.child,()=>({props:f(c)})),y(x,A)},S=x=>{var A=J3();Vt(A,()=>({...f(c)}));var T=q(A);ct(T,()=>t.children??St),K(A),y(x,A)};gt(b,x=>{t.child?x(w):x(S,!1)})}y(p,v)};gt(h,p=>{a.shouldRender&&p(g)})}y(e,d),dt()}var tM=Z("<div><!></div>");function eM(e,t){ut(t,!0);let n=k(t,"id",19,le),i=k(t,"ref",15,null),s=k(t,"value",3,""),l=k(t,"forceMount",3,!1),a=wt(t,["$$slots","$$events","$$legacy","id","ref","value","forceMount","children","child"]);const c=H3({id:B.with(()=>n()),ref:B.with(()=>i(),b=>i(b)),forceMount:B.with(()=>l()),value:B.with(()=>s())}),d=E(()=>Jt(a,c.props));var h=U(),g=N(h);{var p=b=>{var w=U(),S=N(w);ct(S,()=>t.child,()=>({props:f(d)})),y(b,w)},v=b=>{var w=tM();Vt(w,()=>({...f(d)}));var S=q(w);ct(S,()=>t.children??St),K(w),y(b,w)};gt(g,b=>{t.child?b(p):b(v,!1)})}y(e,h),dt()}var nM=Z("<div><!></div>");function rM(e,t){ut(t,!0);let n=k(t,"id",19,le),i=k(t,"ref",15,null),s=wt(t,["$$slots","$$events","$$legacy","id","ref","children","child"]);const l=W3({id:B.with(()=>n()),ref:B.with(()=>i(),p=>i(p))}),a=E(()=>Jt(s,l.props));var c=U(),d=N(c);{var h=p=>{var v=U(),b=N(v);ct(b,()=>t.child,()=>({props:f(a)})),y(p,v)},g=p=>{var v=nM();Vt(v,()=>({...f(a)}));var b=q(v);ct(b,()=>t.children??St),K(v),y(p,v)};gt(d,p=>{t.child?p(h):p(g,!1)})}y(e,c),dt()}var iM=Z("<div><!></div>"),oM=Z('<div style="display: contents;"><!></div>');function sM(e,t){ut(t,!0);let n=k(t,"id",19,le),i=k(t,"ref",15,null),s=wt(t,["$$slots","$$events","$$legacy","id","ref","children","child"]);const l=U3({id:B.with(()=>n()),ref:B.with(()=>i(),p=>i(p))}),a=E(()=>Jt(s,l.props));var c=oM(),d=q(c);{var h=p=>{var v=U(),b=N(v);ct(b,()=>t.child,()=>({props:f(a)})),y(p,v)},g=p=>{var v=iM();Vt(v,()=>({...f(a)}));var b=q(v);ct(b,()=>t.children??St),K(v),y(p,v)};gt(d,p=>{t.child?p(h):p(g,!1)})}K(c),y(e,c),dt()}var aM=Z("<input/>");function lM(e,t){ut(t,!0);let n=k(t,"value",15,""),i=k(t,"autofocus",3,!1),s=k(t,"id",19,le),l=k(t,"ref",15,null),a=wt(t,["$$slots","$$events","$$legacy","value","autofocus","id","ref","child"]);const c=G3({id:B.with(()=>s()),ref:B.with(()=>l(),b=>l(b)),value:B.with(()=>n(),b=>{n(b)}),autofocus:B.with(()=>i()??!1)}),d=E(()=>Jt(a,c.props));var h=U(),g=N(h);{var p=b=>{var w=U(),S=N(w);ct(S,()=>t.child,()=>({props:f(d)})),y(b,w)},v=b=>{var w=aM();Vt(w,()=>({...f(d)}),void 0,void 0,void 0,!0),Zd(w,n),y(b,w)};gt(g,b=>{t.child?b(p):b(v,!1)})}y(e,h),dt()}var cM=Z("<div><!></div>"),uM=Z('<div style="display: contents;" data-item-wrapper=""><!></div>');function dM(e,t){ut(t,!0);let n=k(t,"id",19,le),i=k(t,"ref",15,null),s=k(t,"value",3,""),l=k(t,"disabled",3,!1),a=k(t,"onSelect",3,Ae),c=k(t,"forceMount",3,!1),d=k(t,"keywords",19,()=>[]),h=wt(t,["$$slots","$$events","$$legacy","id","ref","value","disabled","children","child","onSelect","forceMount","keywords"]);const g=V3({id:B.with(()=>n()),ref:B.with(()=>i(),w=>i(w)),value:B.with(()=>s()),disabled:B.with(()=>l()),onSelect:B.with(()=>a()),forceMount:B.with(()=>c()),keywords:B.with(()=>d())}),p=E(()=>Jt(h,g.props));var v=U(),b=N(v);bi(b,()=>g.root.key,w=>{var S=uM(),x=q(S);{var A=T=>{var D=U(),R=N(D);{var L=M=>{var H=U(),j=N(H);ct(j,()=>t.child,()=>({props:f(p)})),y(M,H)},V=M=>{var H=cM();Vt(H,()=>({...f(p)}));var j=q(H);ct(j,()=>t.children??St),K(H),y(M,H)};gt(R,M=>{t.child?M(L):M(V,!1)})}y(T,D)};gt(x,T=>{g.shouldRender&&T(A)})}K(S),Mt(()=>Pt(S,"data-value",g.trueValue)),y(w,S)}),y(e,v),dt()}var fM=Z("<div><!></div>");function hM(e,t){ut(t,!0);let n=k(t,"id",19,le),i=k(t,"ref",15,null),s=wt(t,["$$slots","$$events","$$legacy","id","ref","child","children","aria-label"]);const l=K3({id:B.with(()=>n()),ref:B.with(()=>i(),h=>i(h)),ariaLabel:B.with(()=>t["aria-label"]??"Suggestions...")}),a=E(()=>Jt(s,l.props));var c=U(),d=N(c);bi(d,()=>l.root._commandState.search==="",h=>{var g=U(),p=N(g);{var v=w=>{var S=U(),x=N(S);ct(x,()=>t.child,()=>({props:f(a)})),y(w,S)},b=w=>{var S=fM();Vt(S,()=>({...f(a)}));var x=q(S);ct(x,()=>t.children??St),K(S),y(w,S)};gt(p,w=>{t.child?w(v):w(b,!1)})}y(h,g)}),y(e,c),dt()}const G_=1,gM=.9,pM=.8,vM=.17,Rg=.1,Ng=.999,mM=.9999,bM=.99,_M=/[\\/_+.#"@[({&]/,yM=/[\\/_+.#"@[({&]/g,wM=/[\s-]/,fw=/[\s-]/g;function mp(e,t,n,i,s,l,a){if(l===t.length)return s===e.length?G_:bM;const c=`${s},${l}`;if(a[c]!==void 0)return a[c];const d=i.charAt(l);let h=n.indexOf(d,s),g=0,p,v,b,w;for(;h>=0;)p=mp(e,t,n,i,h+1,l+1,a),p>g&&(h===s?p*=G_:_M.test(e.charAt(h-1))?(p*=pM,b=e.slice(s,h-1).match(yM),b&&s>0&&(p*=Ng**b.length)):wM.test(e.charAt(h-1))?(p*=gM,w=e.slice(s,h-1).match(fw),w&&s>0&&(p*=Ng**w.length)):(p*=vM,s>0&&(p*=Ng**(h-s))),e.charAt(h)!==t.charAt(l)&&(p*=mM)),(p<Rg&&n.charAt(h-1)===i.charAt(l+1)||i.charAt(l+1)===i.charAt(l)&&n.charAt(h-1)!==i.charAt(l))&&(v=mp(e,t,n,i,h+1,l+2,a),v*Rg>p&&(p=v*Rg)),p>g&&(g=p),h=n.indexOf(d,h+1);return a[c]=g,g}function K_(e){return e.toLowerCase().replace(fw," ")}function hw(e,t,n){return e=n&&n.length>0?`${`${e} ${n==null?void 0:n.join(" ")}`}`:e,mp(e,t,K_(e),K_(t),0,0,{})}var Dc,Fc;class xM{constructor(t){$(this,"opts");z(this,Dc,pt(null));z(this,Fc,pt(null));this.opts=t}get contentNode(){return f(_(this,Dc))}set contentNode(t){O(_(this,Dc),t,!0)}get triggerNode(){return f(_(this,Fc))}set triggerNode(t){O(_(this,Fc),t,!0)}toggleOpen(){this.opts.open.current=!this.opts.open.current}handleClose(){this.opts.open.current&&(this.opts.open.current=!1)}}Dc=new WeakMap,Fc=new WeakMap;var Mf,gw,Bc;class SM{constructor(t,n){z(this,Mf);$(this,"opts");$(this,"root");z(this,Bc,E(()=>({id:this.opts.id.current,"aria-haspopup":"dialog","aria-expanded":Su(this.root.opts.open.current),"data-state":eo(this.root.opts.open.current),"aria-controls":Tt(this,Mf,gw).call(this),"data-popover-trigger":"",disabled:this.opts.disabled.current,onkeydown:this.onkeydown,onclick:this.onclick})));this.opts=t,this.root=n,ae({...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===Gr||t.key===zr)&&(t.preventDefault(),this.root.toggleOpen())}get props(){return f(_(this,Bc))}set props(t){O(_(this,Bc),t)}}Mf=new WeakSet,gw=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},Bc=new WeakMap;var zc,Vc;class CM{constructor(t,n){$(this,"opts");$(this,"root");$(this,"onInteractOutside",t=>{this.opts.onInteractOutside.current(t),!(t.defaultPrevented||!_y(t.target)||t.target.closest("[data-popover-trigger]")===this.root.triggerNode)&&this.root.handleClose()});$(this,"onEscapeKeydown",t=>{this.opts.onEscapeKeydown.current(t),!t.defaultPrevented&&this.root.handleClose()});$(this,"onCloseAutoFocus",t=>{var n;this.opts.onCloseAutoFocus.current(t),!t.defaultPrevented&&(t.preventDefault(),(n=this.root.triggerNode)==null||n.focus())});z(this,zc,E(()=>({open:this.root.opts.open.current})));z(this,Vc,E(()=>({id:this.opts.id.current,tabindex:-1,"data-state":eo(this.root.opts.open.current),"data-popover-content":"",style:{pointerEvents:"auto"}})));$(this,"popperProps",{onInteractOutside:this.onInteractOutside,onEscapeKeydown:this.onEscapeKeydown,onCloseAutoFocus:this.onCloseAutoFocus});this.opts=t,this.root=n,ae({...t,deps:()=>this.root.opts.open.current,onRefChange:i=>{this.root.contentNode=i}})}get snippetProps(){return f(_(this,zc))}set snippetProps(t){O(_(this,zc),t)}get props(){return f(_(this,Vc))}set props(t){O(_(this,Vc),t)}}zc=new WeakMap,Vc=new WeakMap;const cv=new kn("Popover.Root");function AM(e){return cv.set(new xM(e))}function PM(e){return new SM(e,cv.get())}function kM(e){return new CM(e,cv.get())}var TM=Z("<div><div><!></div></div>"),EM=Z("<div><div><!></div></div>");function IM(e,t){ut(t,!0);let n=k(t,"ref",15,null),i=k(t,"id",19,le),s=k(t,"forceMount",3,!1),l=k(t,"onCloseAutoFocus",3,Ae),a=k(t,"onEscapeKeydown",3,Ae),c=k(t,"onInteractOutside",3,Ae),d=k(t,"trapFocus",3,!0),h=k(t,"preventScroll",3,!1),g=wt(t,["$$slots","$$events","$$legacy","child","children","ref","id","forceMount","onCloseAutoFocus","onEscapeKeydown","onInteractOutside","trapFocus","preventScroll"]);const p=kM({id:B.with(()=>i()),ref:B.with(()=>n(),A=>n(A)),onInteractOutside:B.with(()=>c()),onEscapeKeydown:B.with(()=>a()),onCloseAutoFocus:B.with(()=>l())}),v=E(()=>Jt(g,p.props));var b=U(),w=N(b);{var S=A=>{ew(A,Nt(()=>f(v),()=>p.popperProps,{get enabled(){return p.root.opts.open.current},get id(){return i()},get trapFocus(){return d()},get preventScroll(){return h()},loop:!0,forceMount:!0,popper:(D,R)=>{let L=()=>R==null?void 0:R().props,V=()=>R==null?void 0:R().wrapperProps;const M=E(()=>Jt(L(),{style:H_("popover")}));var H=U(),j=N(H);{var tt=G=>{var ot=U(),Y=N(ot);{let J=E(()=>({props:f(M),wrapperProps:V(),...p.snippetProps}));ct(Y,()=>t.child,()=>f(J))}y(G,ot)},it=G=>{var ot=TM();Vt(ot,()=>({...V()}));var Y=q(ot);Vt(Y,()=>({...f(M)}));var J=q(Y);ct(J,()=>t.children??St),K(Y),K(ot),y(G,ot)};gt(j,G=>{t.child?G(tt):G(it,!1)})}y(D,H)},$$slots:{popper:!0}}))},x=A=>{var T=U(),D=N(T);{var R=L=>{tw(L,Nt(()=>f(v),()=>p.popperProps,{get present(){return p.root.opts.open.current},get id(){return i()},get trapFocus(){return d()},get preventScroll(){return h()},loop:!0,forceMount:!1,popper:(M,H)=>{let j=()=>H==null?void 0:H().props,tt=()=>H==null?void 0:H().wrapperProps;const it=E(()=>Jt(j(),{style:H_("popover")}));var G=U(),ot=N(G);{var Y=et=>{var rt=U(),ht=N(rt);{let bt=E(()=>({props:f(it),wrapperProps:tt(),...p.snippetProps}));ct(ht,()=>t.child,()=>f(bt))}y(et,rt)},J=et=>{var rt=EM();Vt(rt,()=>({...tt()}));var ht=q(rt);Vt(ht,()=>({...f(it)}));var bt=q(ht);ct(bt,()=>t.children??St),K(ht),K(rt),y(et,rt)};gt(ot,et=>{t.child?et(Y):et(J,!1)})}y(M,G)},$$slots:{popper:!0}}))};gt(D,L=>{s()||L(R)},!0)}y(A,T)};gt(w,A=>{s()?A(S):A(x,!1)})}y(e,b),dt()}var OM=Z("<button><!></button>");function RM(e,t){ut(t,!0);let n=k(t,"id",19,le),i=k(t,"ref",15,null),s=k(t,"type",3,"button"),l=k(t,"disabled",3,!1),a=wt(t,["$$slots","$$events","$$legacy","children","child","id","ref","type","disabled"]);const c=PM({id:B.with(()=>n()),ref:B.with(()=>i(),v=>i(v)),disabled:B.with(()=>!!l())}),d=E(()=>Jt(a,c.props,{type:s()})),h=Yr(),[g,p]=h;Jy(e,{get id(){return n()},children:(v,b)=>{var w=U(),S=N(w);{var x=T=>{var D=U(),R=N(D);ct(R,()=>t.child,()=>({props:f(d)})),y(T,D)},A=T=>{var D=OM();Vt(D,L=>({...L}),[()=>p({...f(d)},[{attribute_name:"formaction"}])]);var R=q(D);ct(R,()=>t.children??St),K(D),y(T,D)};gt(S,T=>{t.child?T(x):T(A,!1)})}y(v,w)},$$slots:{default:!0}}),dt()}function NM(e,t){ut(t,!0);let n=k(t,"open",15,!1),i=k(t,"onOpenChange",3,Ae);DI({variant:B.with(()=>"dialog"),open:B.with(()=>n(),a=>{n(a),i()(a)})});var s=U(),l=N(s);ct(l,()=>t.children??St),y(e,s),dt()}var MM=Z("<button><!></button>");function pw(e,t){ut(t,!0);let n=k(t,"id",19,le),i=k(t,"ref",15,null),s=k(t,"disabled",3,!1),l=wt(t,["$$slots","$$events","$$legacy","children","child","id","ref","disabled"]);const a=WI({variant:B.with(()=>"close"),id:B.with(()=>n()),ref:B.with(()=>i(),S=>i(S)),disabled:B.with(()=>!!s())}),c=E(()=>Jt(l,a.props)),d=Yr(),[h,g]=d;var p=U(),v=N(p);{var b=S=>{var x=U(),A=N(x);ct(A,()=>t.child,()=>({props:f(c)})),y(S,x)},w=S=>{var x=MM();Vt(x,T=>({...T}),[()=>g({...f(c)},[{attribute_name:"formaction"}])]);var A=q(x);ct(A,()=>t.children??St),K(x),y(S,x)};gt(v,S=>{t.child?S(b):S(w,!1)})}y(e,p),dt()}var LM=Z("<!> <!>",1),DM=Z("<!> <div><!></div>",1);function vw(e,t){ut(t,!0);let n=k(t,"id",19,le),i=k(t,"ref",15,null),s=k(t,"forceMount",3,!1),l=k(t,"onCloseAutoFocus",3,Ae),a=k(t,"onOpenAutoFocus",3,Ae),c=k(t,"onEscapeKeydown",3,Ae),d=k(t,"onInteractOutside",3,Ae),h=k(t,"trapFocus",3,!0),g=k(t,"preventScroll",3,!0),p=k(t,"restoreScrollDelay",3,null),v=wt(t,["$$slots","$$events","$$legacy","id","children","child","ref","forceMount","onCloseAutoFocus","onOpenAutoFocus","onEscapeKeydown","onInteractOutside","trapFocus","preventScroll","restoreScrollDelay"]);const b=zI({id:B.with(()=>n()),ref:B.with(()=>i(),S=>i(S))}),w=E(()=>Jt(v,b.props));{const S=A=>{{const T=(R,L)=>{let V=()=>L==null?void 0:L().props;ky(R,Nt(()=>f(w),{get enabled(){return b.root.opts.open.current},onEscapeKeydown:M=>{c()(M),!M.defaultPrevented&&b.root.handleClose()},children:(M,H)=>{Py(M,Nt(()=>f(w),{get enabled(){return b.root.opts.open.current},onInteractOutside:j=>{d()(j),!j.defaultPrevented&&b.root.handleClose()},children:(j,tt)=>{Ny(j,Nt(()=>f(w),{get enabled(){return b.root.opts.open.current},children:(it,G)=>{var ot=U(),Y=N(ot);{var J=rt=>{var ht=LM(),bt=N(ht);{var yt=st=>{Jd(st,{get preventScroll(){return g()},get restoreScrollDelay(){return p()}})};gt(bt,st=>{b.root.opts.open.current&&st(yt)})}var at=nt(bt,2);{let st=E(()=>({props:Jt(f(w),V()),...b.snippetProps}));ct(at,()=>t.child,()=>f(st))}y(rt,ht)},et=rt=>{var ht=DM(),bt=N(ht);Jd(bt,{get preventScroll(){return g()}});var yt=nt(bt,2);Vt(yt,st=>({...st}),[()=>Jt(f(w),V())]);var at=q(yt);ct(at,()=>t.children??St),K(yt),y(rt,ht)};gt(Y,rt=>{t.child?rt(J):rt(et,!1)})}y(it,ot)},$$slots:{default:!0}}))},$$slots:{default:!0}}))},$$slots:{default:!0}}))};let D=E(()=>FO({forceMount:s(),present:b.root.opts.open.current,trapFocus:h(),open:b.root.opts.open.current}));Oy(A,{loop:!0,get trapFocus(){return f(D)},get onOpenAutoFocus(){return a()},get id(){return n()},onCloseAutoFocus:R=>{var L;l()(R),!R.defaultPrevented&&((L=b.root.triggerNode)==null||L.focus())},focusScope:T,$$slots:{focusScope:!0}})}};let x=E(()=>b.root.opts.open.current||s());qf(e,Nt(()=>f(w),{get forceMount(){return s()},get present(){return f(x)},presence:S,$$slots:{presence:!0}}))}dt()}const FM="data-label-root";var Hc;class BM{constructor(t){$(this,"opts");z(this,Hc,E(()=>({id:this.opts.id.current,[FM]:"",onmousedown:this.onmousedown})));this.opts=t,this.onmousedown=this.onmousedown.bind(this),ae(t)}onmousedown(t){t.detail>1&&t.preventDefault()}get props(){return f(_(this,Hc))}set props(t){O(_(this,Hc),t)}}Hc=new WeakMap;function zM(e){return new BM(e)}var VM=Z("<label><!></label>");function HM(e,t){ut(t,!0);let n=k(t,"id",19,le),i=k(t,"ref",15,null),s=wt(t,["$$slots","$$events","$$legacy","children","child","id","ref","for"]);const l=zM({id:B.with(()=>n()),ref:B.with(()=>i(),p=>i(p))}),a=E(()=>Jt(s,l.props,{for:t.for}));var c=U(),d=N(c);{var h=p=>{var v=U(),b=N(v);ct(b,()=>t.child,()=>({props:f(a)})),y(p,v)},g=p=>{var v=VM();Vt(v,()=>({...f(a),for:t.for}));var b=q(v);ct(b,()=>t.children??St),K(v),y(p,v)};gt(d,p=>{t.child?p(h):p(g,!1)})}y(e,c),dt()}function WM(e,t){ut(t,!0);let n=k(t,"open",15,!1),i=k(t,"onOpenChange",3,Ae);AM({open:B.with(()=>n(),s=>{n(s),i()(s)})}),qy(e,{children:(s,l)=>{var a=U(),c=N(a);ct(c,()=>t.children??St),y(s,a)},$$slots:{default:!0}}),dt()}var UM=Z("<!> <!>",1);function GM(e,t){ut(t,!0);let n=k(t,"value",15),i=k(t,"onValueChange",3,Ae),s=k(t,"name",3,""),l=k(t,"disabled",3,!1),a=k(t,"open",15,!1),c=k(t,"onOpenChange",3,Ae),d=k(t,"loop",3,!1),h=k(t,"scrollAlignment",3,"nearest"),g=k(t,"required",3,!1),p=k(t,"items",19,()=>[]),v=k(t,"allowDeselect",3,!1);function b(){n()===void 0&&n(t.type==="single"?"":[])}b(),Ce.pre(()=>n(),()=>{b()});const w=zN({type:t.type,value:B.with(()=>n(),R=>{n(R),i()(R)}),disabled:B.with(()=>l()),required:B.with(()=>g()),open:B.with(()=>a(),R=>{a(R),c()(R)}),loop:B.with(()=>d()),scrollAlignment:B.with(()=>h()),name:B.with(()=>s()),isCombobox:!1,items:B.with(()=>p()),allowDeselect:B.with(()=>v())});var S=UM(),x=N(S);qy(x,{children:(R,L)=>{var V=U(),M=N(V);ct(M,()=>t.children??St),y(R,V)},$$slots:{default:!0}});var A=nt(x,2);{var T=R=>{var L=U(),V=N(L);{var M=H=>{var j=U(),tt=N(j);Wr(tt,17,()=>w.opts.value.current,Uf,(it,G)=>{W_(it,{get value(){return f(G)}})}),y(H,j)};gt(V,H=>{w.opts.value.current.length&&H(M)})}y(R,L)},D=R=>{W_(R,{get value(){return w.opts.value.current},set value(L){w.opts.value.current=L}})};gt(A,R=>{Array.isArray(w.opts.value.current)?R(T):R(D,!1)})}y(e,S),dt()}var KM=Z("<button><!></button>");function qM(e,t){ut(t,!0);let n=k(t,"id",19,le),i=k(t,"ref",15,null),s=k(t,"type",3,"button"),l=wt(t,["$$slots","$$events","$$legacy","id","ref","child","children","type"]);const a=HN({id:B.with(()=>n()),ref:B.with(()=>i(),b=>i(b))}),c=E(()=>Jt(l,a.props,{type:s()})),d=Yr(),[h,g]=d;var p=U(),v=N(p);At(v,()=>Jy,(b,w)=>{w(b,{get id(){return n()},children:(S,x)=>{var A=U(),T=N(A);{var D=L=>{var V=U(),M=N(V);ct(M,()=>t.child,()=>({props:f(c)})),y(L,V)},R=L=>{var V=KM();Vt(V,H=>({...H}),[()=>g({...f(c)},[{attribute_name:"formaction"}])]);var M=q(V);ct(M,()=>t.children??St),K(V),y(L,V)};gt(T,L=>{t.child?L(D):L(R,!1)})}y(S,A)},$$slots:{default:!0}})}),y(e,p),dt()}function YM(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 mw(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 bw(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 Qo(e,t,n,i){const s=(e-(Number.isNaN(t)?0:t))%i;let l=Math.abs(s)*2>=i?e+Math.sign(s)*(i-Math.abs(s)):e-s;Number.isNaN(t)?!Number.isNaN(n)&&l>n&&(l=Math.floor(n/i)*i):l<t?l=t:!Number.isNaN(n)&&l>n&&(l=t+Math.floor((n-t)/i)*i);const a=i.toString(),c=a.indexOf("."),d=c>=0?a.length-c:0;if(d>0){const h=10**d;l=Math.round(l*h)/h}return l}function uv(e,t,n=!0){const[i,s]=e,[l,a]=t,c=(a-l)/(s-i);return d=>{const h=l+c*(d-i);return n?h>Math.max(l,a)?Math.max(l,a):h<Math.min(l,a)?Math.min(l,a):h:h}}const XM="data-slider-root",nf="data-slider-thumb",ZM="data-slider-range",_w="data-slider-tick";var Wc,Uc,Lf,Gc;class yw{constructor(t){$(this,"opts");z(this,Wc,pt(!1));z(this,Uc,E(()=>this.opts.orientation.current==="horizontal"?this.opts.dir.current==="rtl"?"rl":"lr":this.opts.dir.current==="rtl"?"tb":"bt"));z(this,Lf,E(()=>{if(!this.opts.disabled.current)return this.opts.orientation.current==="horizontal"?"pan-y":"pan-x"}));$(this,"getAllThumbs",()=>{const t=this.opts.ref.current;return t?Array.from(t.querySelectorAll(`[${nf}]`)):[]});$(this,"getThumbScale",()=>{var d,h;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:(h=this.opts.ref.current)==null?void 0:h.offsetWidth;if(s===void 0||Number.isNaN(s)||s===0)return[0,100];const l=i/2/s*100,a=l,c=100-l;return[a,c]});$(this,"getPositionFromValue",t=>{const n=this.getThumbScale();return uv([this.opts.min.current,this.opts.max.current],n)(t)});z(this,Gc,E(()=>({id:this.opts.id.current,"data-orientation":this.opts.orientation.current,"data-disabled":Zn(this.opts.disabled.current),style:{touchAction:f(_(this,Lf))},[XM]:""})));this.opts=t,ae(t)}get isActive(){return f(_(this,Wc))}set isActive(t){O(_(this,Wc),t,!0)}get direction(){return f(_(this,Uc))}set direction(t){O(_(this,Uc),t)}isThumbActive(t){return this.isActive}get props(){return f(_(this,Gc))}set props(t){O(_(this,Gc),t)}}Wc=new WeakMap,Uc=new WeakMap,Lf=new WeakMap,Gc=new WeakMap;var Kc,qc,Yc,Xc,Zc;class jM extends yw{constructor(n){super(n);$(this,"opts");$(this,"isMulti",!1);$(this,"updateValue",n=>{this.opts.value.current=Qo(n,this.opts.min.current,this.opts.max.current,this.opts.step.current)});$(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:l,right:a,top:c,bottom:d}=i.getBoundingClientRect();this.direction==="lr"?this.applyPosition({clientXY:n.clientX,start:l,end:a}):this.direction==="rl"?this.applyPosition({clientXY:n.clientX,start:a,end:l}):this.direction==="bt"?this.applyPosition({clientXY:n.clientY,start:d,end:c}):this.direction==="tb"&&this.applyPosition({clientXY:n.clientY,start:c,end:d})});$(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 l=n.target;!yy(l)||!i.contains(l)||(n.preventDefault(),s.focus(),this.isActive=!0,this.handlePointerMove(n))});$(this,"handlePointerUp",()=>{this.opts.disabled.current||(this.isActive&&this.opts.onValueCommit.current(Br(()=>this.opts.value.current)),this.isActive=!1)});z(this,Kc,E(()=>{const n=this.opts.value.current;return Array.from({length:1},()=>{const i=n,s=this.getPositionFromValue(i),l=mw(this.direction,s);return{role:"slider","aria-valuemin":this.opts.min.current,"aria-valuemax":this.opts.max.current,"aria-valuenow":i,"aria-disabled":Yp(this.opts.disabled.current),"aria-orientation":this.opts.orientation.current,"data-value":i,tabindex:this.opts.disabled.current?-1:0,style:l,[nf]:""}})}));z(this,qc,E(()=>this.thumbsPropsArr.map((n,i)=>i)));z(this,Yc,E(()=>{const n=this.opts.max.current,i=this.opts.min.current,s=this.opts.step.current,l=n-i;let a=Math.ceil(l/s);l%s==0&&a++;const c=this.opts.value.current;return Array.from({length:a},(d,h)=>{const g=h*s,p=uv([0,(a-1)*s],this.getThumbScale()),v=h===0,b=h===a-1,w=v?0:b?-100:-50,S=bw(this.direction,p(g),w),x=i+h*s,A=x<=c;return{"data-disabled":Zn(this.opts.disabled.current),"data-orientation":this.opts.orientation.current,"data-bounded":A?"":void 0,"data-value":x,style:S,[_w]:""}})}));z(this,Xc,E(()=>this.ticksPropsArr.map((n,i)=>i)));z(this,Zc,E(()=>({ticks:this.ticksRenderArr,thumbs:this.thumbsRenderArr})));this.opts=n,qp(()=>_i(rn(document,"pointerdown",this.handlePointerDown),rn(document,"pointerup",this.handlePointerUp),rn(document,"pointermove",this.handlePointerMove),rn(document,"pointerleave",this.handlePointerUp))),Ce([()=>this.opts.step.current,()=>this.opts.min.current,()=>this.opts.max.current,()=>this.opts.value.current],([i,s,l,a])=>{const c=h=>Qo(h,s,l,i)===h,d=h=>Qo(h,s,l,i);c(a)||(this.opts.value.current=d(a))})}applyPosition({clientXY:n,start:i,end:s}){const l=this.opts.min.current,a=this.opts.max.current,d=(n-i)/(s-i)*(a-l)+l;if(d<l)this.updateValue(l);else if(d>a)this.updateValue(a);else{const h=this.opts.step.current,g=Math.floor((d-l)/h),p=l+g*h+h/2,v=l+(g+1)*h+h/2,b=d>=p&&d<v?(g+1)*h+l:g*h+l;b<=a&&this.updateValue(b)}}get thumbsPropsArr(){return f(_(this,Kc))}set thumbsPropsArr(n){O(_(this,Kc),n)}get thumbsRenderArr(){return f(_(this,qc))}set thumbsRenderArr(n){O(_(this,qc),n)}get ticksPropsArr(){return f(_(this,Yc))}set ticksPropsArr(n){O(_(this,Yc),n)}get ticksRenderArr(){return f(_(this,Xc))}set ticksRenderArr(n){O(_(this,Xc),n)}get snippetProps(){return f(_(this,Zc))}set snippetProps(n){O(_(this,Zc),n)}}Kc=new WeakMap,qc=new WeakMap,Yc=new WeakMap,Xc=new WeakMap,Zc=new WeakMap;var jc,Qc,Df,Jc,$c,tu,eu,nu;class QM extends yw{constructor(n){super(n);$(this,"opts");$(this,"isMulti",!0);z(this,jc,pt(null));z(this,Qc,pt(0));z(this,Df,n=>{const i=this.getAllThumbs();if(!i.length)return;for(const c of i)c.blur();const s=i.map(c=>{if(this.opts.orientation.current==="horizontal"){const{left:d,right:h}=c.getBoundingClientRect();return Math.abs(n.clientX-(d+h)/2)}else{const{top:d,bottom:h}=c.getBoundingClientRect();return Math.abs(n.clientY-(d+h)/2)}}),l=i[s.indexOf(Math.min(...s))],a=i.indexOf(l);return{node:l,idx:a}});$(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:l,right:a,top:c,bottom:d}=i.getBoundingClientRect(),h=this.direction;h==="lr"?this.applyPosition({clientXY:n.clientX,activeThumbIdx:s.idx,start:l,end:a}):h==="rl"?this.applyPosition({clientXY:n.clientX,activeThumbIdx:s.idx,start:a,end:l}):h==="bt"?this.applyPosition({clientXY:n.clientY,activeThumbIdx:s.idx,start:d,end:c}):h==="tb"&&this.applyPosition({clientXY:n.clientY,activeThumbIdx:s.idx,start:c,end:d})});$(this,"handlePointerDown",n=>{if(n.button!==0||this.opts.disabled.current)return;const i=this.opts.ref.current,s=_(this,Df).call(this,n);if(!s||!i)return;const l=n.target;!yy(l)||!i.contains(l)||(n.preventDefault(),this.activeThumb=s,s.node.focus(),this.isActive=!0,this.handlePointerMove(n))});$(this,"handlePointerUp",()=>{this.opts.disabled.current||(this.isActive&&this.opts.onValueCommit.current(Br(()=>this.opts.value.current)),this.isActive=!1)});$(this,"getAllThumbs",()=>{const n=this.opts.ref.current;return n?Array.from(n.querySelectorAll(`[${nf}]`)):[]});$(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 a=[...s];if(!UO(i,a))return;const c=a[i]>n?-1:1,d=()=>{var w;const v=i+c;a[i]=a[v],a[v]=n;const b=this.getAllThumbs();b.length&&((w=b[v])==null||w.focus(),this.activeThumb={node:b[v],idx:v})};if(this.opts.autoSort.current&&(c===-1&&n<a[i-1]||c===1&&n>a[i+1])){d(),this.opts.value.current=a;return}const h=this.opts.min.current,g=this.opts.max.current,p=this.opts.step.current;a[i]=Qo(n,h,g,p),this.opts.value.current=a});z(this,Jc,E(()=>{const n=this.opts.value.current;return Array.from({length:n.length||1},(i,s)=>{const l=Br(()=>this.currentThumbIdx);l<n.length&&Br(()=>{this.currentThumbIdx=l+1});const a=n[s],c=this.getPositionFromValue(a??0),d=mw(this.direction,c);return{role:"slider","aria-valuemin":this.opts.min.current,"aria-valuemax":this.opts.max.current,"aria-valuenow":a,"aria-disabled":Yp(this.opts.disabled.current),"aria-orientation":this.opts.orientation.current,"data-value":a,tabindex:this.opts.disabled.current?-1:0,style:d,[nf]:""}})}));z(this,$c,E(()=>this.thumbsPropsArr.map((n,i)=>i)));z(this,tu,E(()=>{const n=this.opts.max.current,i=this.opts.min.current,s=this.opts.step.current,l=n-i;let a=Math.ceil(l/s);l%s==0&&a++;const c=this.opts.value.current;return Array.from({length:a},(d,h)=>{const g=h*s,p=uv([0,(a-1)*s],this.getThumbScale()),v=h===0,b=h===a-1,w=v?0:b?-100:-50,S=bw(this.direction,p(g),w),x=i+h*s,A=c.length===1?x<=c[0]:c[0]<=x&&x<=c[c.length-1];return{"data-disabled":Zn(this.opts.disabled.current),"data-orientation":this.opts.orientation.current,"data-bounded":A?"":void 0,"data-value":x,style:S,[_w]:""}})}));z(this,eu,E(()=>this.ticksPropsArr.map((n,i)=>i)));z(this,nu,E(()=>({ticks:this.ticksRenderArr,thumbs:this.thumbsRenderArr})));this.opts=n,qp(()=>_i(rn(document,"pointerdown",this.handlePointerDown),rn(document,"pointerup",this.handlePointerUp),rn(document,"pointermove",this.handlePointerMove),rn(document,"pointerleave",this.handlePointerUp))),Ce([()=>this.opts.step.current,()=>this.opts.min.current,()=>this.opts.max.current,()=>this.opts.value.current],([i,s,l,a])=>{const c=h=>Qo(h,s,l,i)===h,d=h=>Qo(h,s,l,i);a.some(h=>!c(h))&&(this.opts.value.current=a.map(d))})}get activeThumb(){return f(_(this,jc))}set activeThumb(n){O(_(this,jc),n,!0)}get currentThumbIdx(){return f(_(this,Qc))}set currentThumbIdx(n){O(_(this,Qc),n,!0)}isThumbActive(n){var i;return this.isActive&&((i=this.activeThumb)==null?void 0:i.idx)===n}applyPosition({clientXY:n,activeThumbIdx:i,start:s,end:l}){const a=this.opts.min.current,c=this.opts.max.current,h=(n-s)/(l-s)*(c-a)+a;if(h<a)this.updateValue(a,i);else if(h>c)this.updateValue(c,i);else{const g=this.opts.step.current,p=Math.floor((h-a)/g),v=a+p*g+g/2,b=a+(p+1)*g+g/2,w=h>=v&&h<b?(p+1)*g+a:p*g+a;w<=c&&this.updateValue(w,i)}}get thumbsPropsArr(){return f(_(this,Jc))}set thumbsPropsArr(n){O(_(this,Jc),n)}get thumbsRenderArr(){return f(_(this,$c))}set thumbsRenderArr(n){O(_(this,$c),n)}get ticksPropsArr(){return f(_(this,tu))}set ticksPropsArr(n){O(_(this,tu),n)}get ticksRenderArr(){return f(_(this,eu))}set ticksRenderArr(n){O(_(this,eu),n)}get snippetProps(){return f(_(this,nu))}set snippetProps(n){O(_(this,nu),n)}}jc=new WeakMap,Qc=new WeakMap,Df=new WeakMap,Jc=new WeakMap,$c=new WeakMap,tu=new WeakMap,eu=new WeakMap,nu=new WeakMap;const JM=[Cu,Au,gr,xr,Cs,Ss];var ru,iu;class $M{constructor(t,n){$(this,"opts");$(this,"root");z(this,ru,E(()=>{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",...YM(this.root.direction,t,n)}}));z(this,iu,E(()=>({id:this.opts.id.current,"data-orientation":this.root.opts.orientation.current,"data-disabled":Zn(this.root.opts.disabled.current),style:this.rangeStyles,[ZM]:""})));this.opts=t,this.root=n,ae(t)}get rangeStyles(){return f(_(this,ru))}set rangeStyles(t){O(_(this,ru),t)}get props(){return f(_(this,iu))}set props(t){O(_(this,iu),t)}}ru=new WeakMap,iu=new WeakMap;var Ff,An,zn,ou;class t5{constructor(t,n){z(this,An);$(this,"opts");$(this,"root");z(this,Ff,E(()=>this.root.opts.disabled.current||this.opts.disabled.current));z(this,ou,E(()=>({...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,ae(t),this.onkeydown=this.onkeydown.bind(this)}onkeydown(t){if(f(_(this,Ff)))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),!JM.includes(t.key))return;t.preventDefault();const l=this.root.opts.min.current,a=this.root.opts.max.current,c=this.root.opts.value.current,d=Array.isArray(c)?c[s]:c,h=this.root.opts.orientation.current,g=this.root.direction,p=this.root.opts.step.current;switch(t.key){case Cs:Tt(this,An,zn).call(this,l);break;case Ss:Tt(this,An,zn).call(this,a);break;case Cu:if(h!=="horizontal")break;if(t.metaKey){const v=g==="rl"?a:l;Tt(this,An,zn).call(this,v)}else g==="rl"&&d<a?Tt(this,An,zn).call(this,d+p):g==="lr"&&d>l&&Tt(this,An,zn).call(this,d-p);break;case Au:if(h!=="horizontal")break;if(t.metaKey){const v=g==="rl"?l:a;Tt(this,An,zn).call(this,v)}else g==="rl"&&d>l?Tt(this,An,zn).call(this,d-p):g==="lr"&&d<a&&Tt(this,An,zn).call(this,d+p);break;case gr:if(t.metaKey){const v=g==="tb"?l:a;Tt(this,An,zn).call(this,v)}else g==="tb"&&d>l?Tt(this,An,zn).call(this,d-p):g!=="tb"&&d<a&&Tt(this,An,zn).call(this,d+p);break;case xr:if(t.metaKey){const v=g==="tb"?a:l;Tt(this,An,zn).call(this,v)}else g==="tb"&&d<a?Tt(this,An,zn).call(this,d+p):g!=="tb"&&d>l&&Tt(this,An,zn).call(this,d-p);break}this.root.opts.onValueCommit.current(this.root.opts.value.current)}get props(){return f(_(this,ou))}set props(t){O(_(this,ou),t)}}Ff=new WeakMap,An=new WeakSet,zn=function(t){this.root.isMulti?this.root.updateValue(t,this.opts.index.current):this.root.updateValue(t)},ou=new WeakMap;const dv=new kn("Slider.Root");function e5(e){const{type:t,...n}=e,i=t==="single"?new jM(n):new QM(n);return dv.set(i)}function n5(e){return new $M(e,dv.get())}function r5(e){return new t5(e,dv.get())}var i5=Z("<span><!></span>");function o5(e,t){ut(t,!0);let n=k(t,"id",19,le),i=k(t,"ref",15,null),s=k(t,"value",15),l=k(t,"onValueChange",3,Ae),a=k(t,"onValueCommit",3,Ae),c=k(t,"disabled",3,!1),d=k(t,"min",3,0),h=k(t,"max",3,100),g=k(t,"step",3,1),p=k(t,"dir",3,"ltr"),v=k(t,"autoSort",3,!0),b=k(t,"orientation",3,"horizontal"),w=k(t,"thumbPositioning",3,"contain"),S=wt(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(),Ce.pre(()=>s(),()=>{x()});const A=e5({id:B.with(()=>n()),ref:B.with(()=>i(),M=>i(M)),value:B.with(()=>s(),M=>{s(M),l()(M)}),onValueCommit:B.with(()=>a()),disabled:B.with(()=>c()),min:B.with(()=>d()),max:B.with(()=>h()),step:B.with(()=>g()),dir:B.with(()=>p()),autoSort:B.with(()=>v()),orientation:B.with(()=>b()),thumbPositioning:B.with(()=>w()),type:t.type}),T=E(()=>Jt(S,A.props));var D=U(),R=N(D);{var L=M=>{var H=U(),j=N(H);{let tt=E(()=>({props:f(T),...A.snippetProps}));ct(j,()=>t.child,()=>f(tt))}y(M,H)},V=M=>{var H=i5();Vt(H,()=>({...f(T)}));var j=q(H);ct(j,()=>t.children??St,()=>A.snippetProps),K(H),y(M,H)};gt(R,M=>{t.child?M(L):M(V,!1)})}y(e,D),dt()}var s5=Z("<span><!></span>");function a5(e,t){ut(t,!0);let n=k(t,"ref",15,null),i=k(t,"id",19,le),s=wt(t,["$$slots","$$events","$$legacy","children","child","ref","id"]);const l=n5({id:B.with(()=>i()),ref:B.with(()=>n(),p=>n(p))}),a=E(()=>Jt(s,l.props));var c=U(),d=N(c);{var h=p=>{var v=U(),b=N(v);ct(b,()=>t.child,()=>({props:f(a)})),y(p,v)},g=p=>{var v=s5();Vt(v,()=>({...f(a)}));var b=q(v);ct(b,()=>t.children??St),K(v),y(p,v)};gt(d,p=>{t.child?p(h):p(g,!1)})}y(e,c),dt()}var l5=Z("<span><!></span>");function c5(e,t){ut(t,!0);let n=k(t,"ref",15,null),i=k(t,"id",19,le),s=k(t,"disabled",3,!1),l=wt(t,["$$slots","$$events","$$legacy","children","child","ref","id","index","disabled"]);const a=r5({id:B.with(()=>i()),ref:B.with(()=>n(),v=>n(v)),index:B.with(()=>t.index),disabled:B.with(()=>s())}),c=E(()=>Jt(l,a.props));var d=U(),h=N(d);{var g=v=>{var b=U(),w=N(b);{let S=E(()=>({active:a.root.isThumbActive(a.opts.index.current),props:f(c)}));ct(w,()=>t.child,()=>f(S))}y(v,b)},p=v=>{var b=l5();Vt(b,()=>({...f(c)}));var w=q(b);{let S=E(()=>({active:a.root.isThumbActive(a.opts.index.current)}));ct(w,()=>t.children??St,()=>f(S))}K(b),y(v,b)};gt(h,v=>{t.child?v(g):v(p,!1)})}y(e,d),dt()}const u5="data-switch-root",d5="data-switch-thumb";var su,bp,au,lu,cu;class f5{constructor(t){z(this,su);$(this,"opts");z(this,au,E(()=>({"data-disabled":Zn(this.opts.disabled.current),"data-state":sI(this.opts.checked.current),"data-required":lI(this.opts.required.current)})));z(this,lu,E(()=>({checked:this.opts.checked.current})));z(this,cu,E(()=>({...this.sharedProps,id:this.opts.id.current,role:"switch",disabled:Xp(this.opts.disabled.current),"aria-checked":vy(this.opts.checked.current,!1),"aria-required":gy(this.opts.required.current),[u5]:"",onclick:this.onclick,onkeydown:this.onkeydown})));this.opts=t,ae(t),this.onkeydown=this.onkeydown.bind(this),this.onclick=this.onclick.bind(this)}onkeydown(t){!(t.key===Gr||t.key===zr)||this.opts.disabled.current||(t.preventDefault(),Tt(this,su,bp).call(this))}onclick(t){this.opts.disabled.current||Tt(this,su,bp).call(this)}get sharedProps(){return f(_(this,au))}set sharedProps(t){O(_(this,au),t)}get snippetProps(){return f(_(this,lu))}set snippetProps(t){O(_(this,lu),t)}get props(){return f(_(this,cu))}set props(t){O(_(this,cu),t)}}su=new WeakSet,bp=function(){this.opts.checked.current=!this.opts.checked.current},au=new WeakMap,lu=new WeakMap,cu=new WeakMap;var uu,du;class h5{constructor(t){$(this,"root");z(this,uu,E(()=>this.root.opts.name.current!==void 0));z(this,du,E(()=>({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 f(_(this,uu))}set shouldRender(t){O(_(this,uu),t)}get props(){return f(_(this,du))}set props(t){O(_(this,du),t)}}uu=new WeakMap,du=new WeakMap;var fu,hu;class g5{constructor(t,n){$(this,"opts");$(this,"root");z(this,fu,E(()=>({checked:this.root.opts.checked.current})));z(this,hu,E(()=>({...this.root.sharedProps,id:this.opts.id.current,[d5]:""})));this.opts=t,this.root=n,ae(t)}get snippetProps(){return f(_(this,fu))}set snippetProps(t){O(_(this,fu),t)}get props(){return f(_(this,hu))}set props(t){O(_(this,hu),t)}}fu=new WeakMap,hu=new WeakMap;const fv=new kn("Switch.Root");function p5(e){return fv.set(new f5(e))}function v5(){return new h5(fv.get())}function m5(e){return new g5(e,fv.get())}function b5(e,t){ut(t,!1);const n=v5();X0();var i=U(),s=N(i);{var l=a=>{Qp(a,Nt(()=>n.props))};gt(s,a=>{n.shouldRender&&a(l)})}y(e,i),dt()}var _5=Z("<button><!></button>"),y5=Z("<!> <!>",1);function w5(e,t){ut(t,!0);let n=k(t,"ref",15,null),i=k(t,"id",19,le),s=k(t,"disabled",3,!1),l=k(t,"required",3,!1),a=k(t,"checked",15,!1),c=k(t,"value",3,"on"),d=k(t,"name",3,void 0),h=k(t,"type",3,"button"),g=k(t,"onCheckedChange",3,Ae),p=wt(t,["$$slots","$$events","$$legacy","child","children","ref","id","disabled","required","checked","value","name","type","onCheckedChange"]);const v=p5({checked:B.with(()=>a(),V=>{var M;a(V),(M=g())==null||M(V)}),disabled:B.with(()=>s()??!1),required:B.with(()=>l()),value:B.with(()=>c()),name:B.with(()=>d()),id:B.with(()=>i()),ref:B.with(()=>n(),V=>n(V))}),b=E(()=>Jt(p,v.props,{type:h()})),w=Yr(),[S,x]=w;var A=y5(),T=N(A);{var D=V=>{var M=U(),H=N(M);{let j=E(()=>({props:f(b),...v.snippetProps}));ct(H,()=>t.child,()=>f(j))}y(V,M)},R=V=>{var M=_5();Vt(M,j=>({...j}),[()=>x({...f(b)},[{attribute_name:"formaction"}])]);var H=q(M);ct(H,()=>t.children??St,()=>v.snippetProps),K(M),y(V,M)};gt(T,V=>{t.child?V(D):V(R,!1)})}var L=nt(T,2);b5(L,{}),y(e,A),dt()}var x5=Z("<span><!></span>");function S5(e,t){ut(t,!0);let n=k(t,"ref",15,null),i=k(t,"id",19,le),s=wt(t,["$$slots","$$events","$$legacy","child","children","ref","id"]);const l=m5({id:B.with(()=>i()),ref:B.with(()=>n(),p=>n(p))}),a=E(()=>Jt(s,l.props));var c=U(),d=N(c);{var h=p=>{var v=U(),b=N(v);{let w=E(()=>({props:f(a),...l.snippetProps}));ct(b,()=>t.child,()=>f(w))}y(p,v)},g=p=>{var v=x5();Vt(v,()=>({...f(a)}));var b=q(v);ct(b,()=>t.children??St,()=>l.snippetProps),K(v),y(p,v)};gt(d,p=>{t.child?p(h):p(g,!1)})}y(e,c),dt()}const C5="data-tabs-root",A5="data-tabs-list",ww="data-tabs-trigger",P5="data-tabs-content";var gu,pu;class k5{constructor(t){$(this,"opts");$(this,"rovingFocusGroup");z(this,gu,pt(_n([])));$(this,"valueToTriggerId",new ca);$(this,"valueToContentId",new ca);z(this,pu,E(()=>({id:this.opts.id.current,"data-orientation":this.opts.orientation.current,[C5]:""})));this.opts=t,ae(t),this.rovingFocusGroup=AI({candidateAttr:ww,rootNodeId:this.opts.id,loop:this.opts.loop,orientation:this.opts.orientation})}get triggerIds(){return f(_(this,gu))}set triggerIds(t){O(_(this,gu),t,!0)}registerTrigger(t,n){return this.triggerIds.push(t),this.valueToTriggerId.set(n,t),()=>{this.triggerIds=this.triggerIds.filter(i=>i!==t),this.valueToTriggerId.delete(n)}}registerContent(t,n){return this.valueToContentId.set(n,t),()=>{this.valueToContentId.delete(n)}}setValue(t){this.opts.value.current=t}get props(){return f(_(this,pu))}set props(t){O(_(this,pu),t)}}gu=new WeakMap,pu=new WeakMap;var Bf,vu;class T5{constructor(t,n){$(this,"opts");$(this,"root");z(this,Bf,E(()=>this.root.opts.disabled.current));z(this,vu,E(()=>({id:this.opts.id.current,role:"tablist","aria-orientation":this.root.opts.orientation.current,"data-orientation":this.root.opts.orientation.current,[A5]:"","data-disabled":Zn(f(_(this,Bf)))})));this.opts=t,this.root=n,ae(t)}get props(){return f(_(this,vu))}set props(t){O(_(this,vu),t)}}Bf=new WeakMap,vu=new WeakMap;var ps,ji,vs,zf,ms,Gd,mu;class E5{constructor(t,n){z(this,ms);$(this,"opts");$(this,"root");z(this,ps,E(()=>this.root.opts.value.current===this.opts.value.current));z(this,ji,E(()=>this.opts.disabled.current||this.root.opts.disabled.current));z(this,vs,pt(0));z(this,zf,E(()=>this.root.valueToContentId.get(this.opts.value.current)));z(this,mu,E(()=>({id:this.opts.id.current,role:"tab","data-state":xw(f(_(this,ps))),"data-value":this.opts.value.current,"data-orientation":this.root.opts.orientation.current,"data-disabled":Zn(f(_(this,ji))),"aria-selected":py(f(_(this,ps))),"aria-controls":f(_(this,zf)),[ww]:"",disabled:Xp(f(_(this,ji))),tabindex:f(_(this,vs)),onclick:this.onclick,onfocus:this.onfocus,onkeydown:this.onkeydown})));this.opts=t,this.root=n,ae(t),Ce([()=>this.opts.id.current,()=>this.opts.value.current],([i,s])=>this.root.registerTrigger(i,s)),be(()=>{this.root.triggerIds.length,f(_(this,ps))||!this.root.opts.value.current?O(_(this,vs),0):O(_(this,vs),-1)}),this.onfocus=this.onfocus.bind(this),this.onclick=this.onclick.bind(this),this.onkeydown=this.onkeydown.bind(this)}onfocus(t){this.root.opts.activationMode.current!=="automatic"||f(_(this,ji))||Tt(this,ms,Gd).call(this)}onclick(t){f(_(this,ji))||Tt(this,ms,Gd).call(this)}onkeydown(t){if(!f(_(this,ji))){if(t.key===zr||t.key===Gr){t.preventDefault(),Tt(this,ms,Gd).call(this);return}this.root.rovingFocusGroup.handleKeydown(this.opts.ref.current,t)}}get props(){return f(_(this,mu))}set props(t){O(_(this,mu),t)}}ps=new WeakMap,ji=new WeakMap,vs=new WeakMap,zf=new WeakMap,ms=new WeakSet,Gd=function(){this.root.opts.value.current!==this.opts.value.current&&this.root.setValue(this.opts.value.current)},mu=new WeakMap;var bu,Vf,_u;class I5{constructor(t,n){$(this,"opts");$(this,"root");z(this,bu,E(()=>this.root.opts.value.current===this.opts.value.current));z(this,Vf,E(()=>this.root.valueToTriggerId.get(this.opts.value.current)));z(this,_u,E(()=>({id:this.opts.id.current,role:"tabpanel",hidden:uI(!f(_(this,bu))),tabindex:0,"data-value":this.opts.value.current,"data-state":xw(f(_(this,bu))),"aria-labelledby":f(_(this,Vf)),[P5]:""})));this.opts=t,this.root=n,ae(t),Ce([()=>this.opts.id.current,()=>this.opts.value.current],([i,s])=>this.root.registerContent(i,s))}get props(){return f(_(this,_u))}set props(t){O(_(this,_u),t)}}bu=new WeakMap,Vf=new WeakMap,_u=new WeakMap;const Qf=new kn("Tabs.Root");function O5(e){return Qf.set(new k5(e))}function R5(e){return new E5(e,Qf.get())}function N5(e){return new T5(e,Qf.get())}function M5(e){return new I5(e,Qf.get())}function xw(e){return e?"active":"inactive"}var L5=Z("<div><!></div>");function D5(e,t){ut(t,!0);let n=k(t,"id",19,le),i=k(t,"ref",15,null),s=k(t,"value",15,""),l=k(t,"onValueChange",3,Ae),a=k(t,"orientation",3,"horizontal"),c=k(t,"loop",3,!0),d=k(t,"activationMode",3,"automatic"),h=k(t,"disabled",3,!1),g=wt(t,["$$slots","$$events","$$legacy","id","ref","value","onValueChange","orientation","loop","activationMode","disabled","children","child"]);const p=O5({id:B.with(()=>n()),value:B.with(()=>s(),A=>{s(A),l()(A)}),orientation:B.with(()=>a()),loop:B.with(()=>c()),activationMode:B.with(()=>d()),disabled:B.with(()=>h()),ref:B.with(()=>i(),A=>i(A))}),v=E(()=>Jt(g,p.props));var b=U(),w=N(b);{var S=A=>{var T=U(),D=N(T);ct(D,()=>t.child,()=>({props:f(v)})),y(A,T)},x=A=>{var T=L5();Vt(T,()=>({...f(v)}));var D=q(T);ct(D,()=>t.children??St),K(T),y(A,T)};gt(w,A=>{t.child?A(S):A(x,!1)})}y(e,b),dt()}var F5=Z("<div><!></div>");function B5(e,t){ut(t,!0);let n=k(t,"id",19,le),i=k(t,"ref",15,null),s=wt(t,["$$slots","$$events","$$legacy","children","child","id","ref","value"]);const l=M5({value:B.with(()=>t.value),id:B.with(()=>n()),ref:B.with(()=>i(),p=>i(p))}),a=E(()=>Jt(s,l.props));var c=U(),d=N(c);{var h=p=>{var v=U(),b=N(v);ct(b,()=>t.child,()=>({props:f(a)})),y(p,v)},g=p=>{var v=F5();Vt(v,()=>({...f(a)}));var b=q(v);ct(b,()=>t.children??St),K(v),y(p,v)};gt(d,p=>{t.child?p(h):p(g,!1)})}y(e,c),dt()}var z5=Z("<div><!></div>");function V5(e,t){ut(t,!0);let n=k(t,"id",19,le),i=k(t,"ref",15,null),s=wt(t,["$$slots","$$events","$$legacy","child","children","id","ref"]);const l=N5({id:B.with(()=>n()),ref:B.with(()=>i(),p=>i(p))}),a=E(()=>Jt(s,l.props));var c=U(),d=N(c);{var h=p=>{var v=U(),b=N(v);ct(b,()=>t.child,()=>({props:f(a)})),y(p,v)},g=p=>{var v=z5();Vt(v,()=>({...f(a)}));var b=q(v);ct(b,()=>t.children??St),K(v),y(p,v)};gt(d,p=>{t.child?p(h):p(g,!1)})}y(e,c),dt()}var H5=Z("<button><!></button>");function W5(e,t){ut(t,!0);let n=k(t,"disabled",3,!1),i=k(t,"id",19,le),s=k(t,"type",3,"button"),l=k(t,"ref",15,null),a=wt(t,["$$slots","$$events","$$legacy","child","children","disabled","id","type","value","ref"]);const c=R5({id:B.with(()=>i()),disabled:B.with(()=>n()??!1),value:B.with(()=>t.value),ref:B.with(()=>l(),x=>l(x))}),d=E(()=>Jt(a,c.props,{type:s()})),h=Yr(),[g,p]=h;var v=U(),b=N(v);{var w=x=>{var A=U(),T=N(A);ct(T,()=>t.child,()=>({props:f(d)})),y(x,A)},S=x=>{var A=H5();Vt(A,D=>({...D}),[()=>p({...f(d)},[{attribute_name:"formaction"}])]);var T=q(A);ct(T,()=>t.children??St),K(A),y(x,A)};gt(b,x=>{t.child?x(w):x(S,!1)})}y(e,v),dt()}const hv="-",U5=e=>{const t=K5(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:i}=e;return{getClassGroupId:a=>{const c=a.split(hv);return c[0]===""&&c.length!==1&&c.shift(),Sw(c,t)||G5(a)},getConflictingClassGroupIds:(a,c)=>{const d=n[a]||[];return c&&i[a]?[...d,...i[a]]:d}}},Sw=(e,t)=>{var a;if(e.length===0)return t.classGroupId;const n=e[0],i=t.nextPart.get(n),s=i?Sw(e.slice(1),i):void 0;if(s)return s;if(t.validators.length===0)return;const l=e.join(hv);return(a=t.validators.find(({validator:c})=>c(l)))==null?void 0:a.classGroupId},q_=/^\[(.+)\]$/,G5=e=>{if(q_.test(e)){const t=q_.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},K5=e=>{const{theme:t,prefix:n}=e,i={nextPart:new Map,validators:[]};return Y5(Object.entries(e.classGroups),n).forEach(([l,a])=>{_p(a,i,l,t)}),i},_p=(e,t,n,i)=>{e.forEach(s=>{if(typeof s=="string"){const l=s===""?t:Y_(t,s);l.classGroupId=n;return}if(typeof s=="function"){if(q5(s)){_p(s(i),t,n,i);return}t.validators.push({validator:s,classGroupId:n});return}Object.entries(s).forEach(([l,a])=>{_p(a,Y_(t,l),n,i)})})},Y_=(e,t)=>{let n=e;return t.split(hv).forEach(i=>{n.nextPart.has(i)||n.nextPart.set(i,{nextPart:new Map,validators:[]}),n=n.nextPart.get(i)}),n},q5=e=>e.isThemeGetter,Y5=(e,t)=>t?e.map(([n,i])=>{const s=i.map(l=>typeof l=="string"?t+l:typeof l=="object"?Object.fromEntries(Object.entries(l).map(([a,c])=>[t+a,c])):l);return[n,s]}):e,X5=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,i=new Map;const s=(l,a)=>{n.set(l,a),t++,t>e&&(t=0,i=n,n=new Map)};return{get(l){let a=n.get(l);if(a!==void 0)return a;if((a=i.get(l))!==void 0)return s(l,a),a},set(l,a){n.has(l)?n.set(l,a):s(l,a)}}},Cw="!",Z5=e=>{const{separator:t,experimentalParseClassName:n}=e,i=t.length===1,s=t[0],l=t.length,a=c=>{const d=[];let h=0,g=0,p;for(let x=0;x<c.length;x++){let A=c[x];if(h===0){if(A===s&&(i||c.slice(x,x+l)===t)){d.push(c.slice(g,x)),g=x+l;continue}if(A==="/"){p=x;continue}}A==="["?h++:A==="]"&&h--}const v=d.length===0?c:c.substring(g),b=v.startsWith(Cw),w=b?v.substring(1):v,S=p&&p>g?p-g:void 0;return{modifiers:d,hasImportantModifier:b,baseClassName:w,maybePostfixModifierPosition:S}};return n?c=>n({className:c,parseClassName:a}):a},j5=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},Q5=e=>({cache:X5(e.cacheSize),parseClassName:Z5(e),...U5(e)}),J5=/\s+/,$5=(e,t)=>{const{parseClassName:n,getClassGroupId:i,getConflictingClassGroupIds:s}=t,l=[],a=e.trim().split(J5);let c="";for(let d=a.length-1;d>=0;d-=1){const h=a[d],{modifiers:g,hasImportantModifier:p,baseClassName:v,maybePostfixModifierPosition:b}=n(h);let w=!!b,S=i(w?v.substring(0,b):v);if(!S){if(!w){c=h+(c.length>0?" "+c:c);continue}if(S=i(v),!S){c=h+(c.length>0?" "+c:c);continue}w=!1}const x=j5(g).join(":"),A=p?x+Cw:x,T=A+S;if(l.includes(T))continue;l.push(T);const D=s(S,w);for(let R=0;R<D.length;++R){const L=D[R];l.push(A+L)}c=h+(c.length>0?" "+c:c)}return c};function tL(){let e=0,t,n,i="";for(;e<arguments.length;)(t=arguments[e++])&&(n=Aw(t))&&(i&&(i+=" "),i+=n);return i}const Aw=e=>{if(typeof e=="string")return e;let t,n="";for(let i=0;i<e.length;i++)e[i]&&(t=Aw(e[i]))&&(n&&(n+=" "),n+=t);return n};function eL(e,...t){let n,i,s,l=a;function a(d){const h=t.reduce((g,p)=>p(g),e());return n=Q5(h),i=n.cache.get,s=n.cache.set,l=c,c(d)}function c(d){const h=i(d);if(h)return h;const g=$5(d,n);return s(d,g),g}return function(){return l(tL.apply(null,arguments))}}const en=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},Pw=/^\[(?:([a-z-]+):)?(.+)\]$/i,nL=/^\d+\/\d+$/,rL=new Set(["px","full","screen"]),iL=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,oL=/\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$/,sL=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,aL=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,lL=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,li=e=>Jo(e)||rL.has(e)||nL.test(e),Fi=e=>Ts(e,"length",vL),Jo=e=>!!e&&!Number.isNaN(Number(e)),Mg=e=>Ts(e,"number",Jo),js=e=>!!e&&Number.isInteger(Number(e)),cL=e=>e.endsWith("%")&&Jo(e.slice(0,-1)),pe=e=>Pw.test(e),Bi=e=>iL.test(e),uL=new Set(["length","size","percentage"]),dL=e=>Ts(e,uL,kw),fL=e=>Ts(e,"position",kw),hL=new Set(["image","url"]),gL=e=>Ts(e,hL,bL),pL=e=>Ts(e,"",mL),Qs=()=>!0,Ts=(e,t,n)=>{const i=Pw.exec(e);return i?i[1]?typeof t=="string"?i[1]===t:t.has(i[1]):n(i[2]):!1},vL=e=>oL.test(e)&&!sL.test(e),kw=()=>!1,mL=e=>aL.test(e),bL=e=>lL.test(e),_L=()=>{const e=en("colors"),t=en("spacing"),n=en("blur"),i=en("brightness"),s=en("borderColor"),l=en("borderRadius"),a=en("borderSpacing"),c=en("borderWidth"),d=en("contrast"),h=en("grayscale"),g=en("hueRotate"),p=en("invert"),v=en("gap"),b=en("gradientColorStops"),w=en("gradientColorStopPositions"),S=en("inset"),x=en("margin"),A=en("opacity"),T=en("padding"),D=en("saturate"),R=en("scale"),L=en("sepia"),V=en("skew"),M=en("space"),H=en("translate"),j=()=>["auto","contain","none"],tt=()=>["auto","hidden","clip","visible","scroll"],it=()=>["auto",pe,t],G=()=>[pe,t],ot=()=>["",li,Fi],Y=()=>["auto",Jo,pe],J=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],et=()=>["solid","dashed","dotted","double","none"],rt=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ht=()=>["start","end","center","between","around","evenly","stretch"],bt=()=>["","0",pe],yt=()=>["auto","avoid","all","avoid-page","page","left","right","column"],at=()=>[Jo,pe];return{cacheSize:500,separator:":",theme:{colors:[Qs],spacing:[li,Fi],blur:["none","",Bi,pe],brightness:at(),borderColor:[e],borderRadius:["none","","full",Bi,pe],borderSpacing:G(),borderWidth:ot(),contrast:at(),grayscale:bt(),hueRotate:at(),invert:bt(),gap:G(),gradientColorStops:[e],gradientColorStopPositions:[cL,Fi],inset:it(),margin:it(),opacity:at(),padding:G(),saturate:at(),scale:at(),sepia:bt(),skew:at(),space:G(),translate:G()},classGroups:{aspect:[{aspect:["auto","square","video",pe]}],container:["container"],columns:[{columns:[Bi]}],"break-after":[{"break-after":yt()}],"break-before":[{"break-before":yt()}],"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(),pe]}],overflow:[{overflow:tt()}],"overflow-x":[{"overflow-x":tt()}],"overflow-y":[{"overflow-y":tt()}],overscroll:[{overscroll:j()}],"overscroll-x":[{"overscroll-x":j()}],"overscroll-y":[{"overscroll-y":j()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[S]}],"inset-x":[{"inset-x":[S]}],"inset-y":[{"inset-y":[S]}],start:[{start:[S]}],end:[{end:[S]}],top:[{top:[S]}],right:[{right:[S]}],bottom:[{bottom:[S]}],left:[{left:[S]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",js,pe]}],basis:[{basis:it()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",pe]}],grow:[{grow:bt()}],shrink:[{shrink:bt()}],order:[{order:["first","last","none",js,pe]}],"grid-cols":[{"grid-cols":[Qs]}],"col-start-end":[{col:["auto",{span:["full",js,pe]},pe]}],"col-start":[{"col-start":Y()}],"col-end":[{"col-end":Y()}],"grid-rows":[{"grid-rows":[Qs]}],"row-start-end":[{row:["auto",{span:[js,pe]},pe]}],"row-start":[{"row-start":Y()}],"row-end":[{"row-end":Y()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",pe]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",pe]}],gap:[{gap:[v]}],"gap-x":[{"gap-x":[v]}],"gap-y":[{"gap-y":[v]}],"justify-content":[{justify:["normal",...ht()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...ht(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...ht(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[T]}],px:[{px:[T]}],py:[{py:[T]}],ps:[{ps:[T]}],pe:[{pe:[T]}],pt:[{pt:[T]}],pr:[{pr:[T]}],pb:[{pb:[T]}],pl:[{pl:[T]}],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",pe,t]}],"min-w":[{"min-w":[pe,t,"min","max","fit"]}],"max-w":[{"max-w":[pe,t,"none","full","min","max","fit","prose",{screen:[Bi]},Bi]}],h:[{h:[pe,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[pe,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[pe,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[pe,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Bi,Fi]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Mg]}],"font-family":[{font:[Qs]}],"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",pe]}],"line-clamp":[{"line-clamp":["none",Jo,Mg]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",li,pe]}],"list-image":[{"list-image":["none",pe]}],"list-style-type":[{list:["none","disc","decimal",pe]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[A]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[A]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...et(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",li,Fi]}],"underline-offset":[{"underline-offset":["auto",li,pe]}],"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:G()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",pe]}],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",pe]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[A]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...J(),fL]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",dL]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},gL]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[w]}],"gradient-via-pos":[{via:[w]}],"gradient-to-pos":[{to:[w]}],"gradient-from":[{from:[b]}],"gradient-via":[{via:[b]}],"gradient-to":[{to:[b]}],rounded:[{rounded:[l]}],"rounded-s":[{"rounded-s":[l]}],"rounded-e":[{"rounded-e":[l]}],"rounded-t":[{"rounded-t":[l]}],"rounded-r":[{"rounded-r":[l]}],"rounded-b":[{"rounded-b":[l]}],"rounded-l":[{"rounded-l":[l]}],"rounded-ss":[{"rounded-ss":[l]}],"rounded-se":[{"rounded-se":[l]}],"rounded-ee":[{"rounded-ee":[l]}],"rounded-es":[{"rounded-es":[l]}],"rounded-tl":[{"rounded-tl":[l]}],"rounded-tr":[{"rounded-tr":[l]}],"rounded-br":[{"rounded-br":[l]}],"rounded-bl":[{"rounded-bl":[l]}],"border-w":[{border:[c]}],"border-w-x":[{"border-x":[c]}],"border-w-y":[{"border-y":[c]}],"border-w-s":[{"border-s":[c]}],"border-w-e":[{"border-e":[c]}],"border-w-t":[{"border-t":[c]}],"border-w-r":[{"border-r":[c]}],"border-w-b":[{"border-b":[c]}],"border-w-l":[{"border-l":[c]}],"border-opacity":[{"border-opacity":[A]}],"border-style":[{border:[...et(),"hidden"]}],"divide-x":[{"divide-x":[c]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[c]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[A]}],"divide-style":[{divide:et()}],"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:["",...et()]}],"outline-offset":[{"outline-offset":[li,pe]}],"outline-w":[{outline:[li,Fi]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:ot()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[A]}],"ring-offset-w":[{"ring-offset":[li,Fi]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Bi,pL]}],"shadow-color":[{shadow:[Qs]}],opacity:[{opacity:[A]}],"mix-blend":[{"mix-blend":[...rt(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":rt()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[i]}],contrast:[{contrast:[d]}],"drop-shadow":[{"drop-shadow":["","none",Bi,pe]}],grayscale:[{grayscale:[h]}],"hue-rotate":[{"hue-rotate":[g]}],invert:[{invert:[p]}],saturate:[{saturate:[D]}],sepia:[{sepia:[L]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[i]}],"backdrop-contrast":[{"backdrop-contrast":[d]}],"backdrop-grayscale":[{"backdrop-grayscale":[h]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[g]}],"backdrop-invert":[{"backdrop-invert":[p]}],"backdrop-opacity":[{"backdrop-opacity":[A]}],"backdrop-saturate":[{"backdrop-saturate":[D]}],"backdrop-sepia":[{"backdrop-sepia":[L]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[a]}],"border-spacing-x":[{"border-spacing-x":[a]}],"border-spacing-y":[{"border-spacing-y":[a]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",pe]}],duration:[{duration:at()}],ease:[{ease:["linear","in","out","in-out",pe]}],delay:[{delay:at()}],animate:[{animate:["none","spin","ping","pulse","bounce",pe]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[R]}],"scale-x":[{"scale-x":[R]}],"scale-y":[{"scale-y":[R]}],rotate:[{rotate:[js,pe]}],"translate-x":[{"translate-x":[H]}],"translate-y":[{"translate-y":[H]}],"skew-x":[{"skew-x":[V]}],"skew-y":[{"skew-y":[V]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",pe]}],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",pe]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":G()}],"scroll-mx":[{"scroll-mx":G()}],"scroll-my":[{"scroll-my":G()}],"scroll-ms":[{"scroll-ms":G()}],"scroll-me":[{"scroll-me":G()}],"scroll-mt":[{"scroll-mt":G()}],"scroll-mr":[{"scroll-mr":G()}],"scroll-mb":[{"scroll-mb":G()}],"scroll-ml":[{"scroll-ml":G()}],"scroll-p":[{"scroll-p":G()}],"scroll-px":[{"scroll-px":G()}],"scroll-py":[{"scroll-py":G()}],"scroll-ps":[{"scroll-ps":G()}],"scroll-pe":[{"scroll-pe":G()}],"scroll-pt":[{"scroll-pt":G()}],"scroll-pr":[{"scroll-pr":G()}],"scroll-pb":[{"scroll-pb":G()}],"scroll-pl":[{"scroll-pl":G()}],"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",pe]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[li,Fi,Mg]}],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"]}}},yL=eL(_L);function ie(...e){return yL(Dd(e))}function wL(e,t){ut(t,!0);let n=k(t,"ref",15,null),i=k(t,"value",15,""),s=wt(t,["$$slots","$$events","$$legacy","ref","value","class"]);var l=U(),a=N(l);{let c=E(()=>ie("bg-popover text-popover-foreground flex h-full w-full flex-col overflow-hidden rounded-md",t.class));At(a,()=>Q3,(d,h)=>{h(d,Nt({get class(){return f(c)}},()=>s,{get value(){return i()},set value(g){i(g)},get ref(){return n()},set ref(g){n(g)}}))})}y(e,l),dt()}function Jf(e,t){ut(t,!0);let n=k(t,"ref",15,null),i=wt(t,["$$slots","$$events","$$legacy","ref","class"]);var s=U(),l=N(s);{let a=E(()=>ie("text-lg font-semibold leading-none tracking-tight",t.class));At(l,()=>GI,(c,d)=>{d(c,Nt({get class(){return f(a)}},()=>i,{get ref(){return n()},set ref(h){n(h)}}))})}y(e,s),dt()}var xL=Z("<div><!></div>");function gv(e,t){ut(t,!0);let n=k(t,"ref",15,null),i=wt(t,["$$slots","$$events","$$legacy","ref","class","children"]);var s=xL();Vt(s,a=>({class:a,...i}),[()=>ie("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",t.class)]);var l=q(s);ct(l,()=>t.children??St),K(s),yn(s,a=>n(a),()=>n()),y(e,s),dt()}var SL=Z("<div><!></div>");function $f(e,t){ut(t,!0);let n=k(t,"ref",15,null),i=wt(t,["$$slots","$$events","$$legacy","ref","class","children"]);var s=SL();Vt(s,a=>({class:a,...i}),[()=>ie("flex flex-col space-y-1.5 text-center sm:text-left",t.class)]);var l=q(s);ct(l,()=>t.children??St),K(s),yn(s,a=>n(a),()=>n()),y(e,s),dt()}function th(e,t){ut(t,!0);let n=k(t,"ref",15,null),i=wt(t,["$$slots","$$events","$$legacy","ref","class"]);var s=U(),l=N(s);{let a=E(()=>ie("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));At(l,()=>My,(c,d)=>{d(c,Nt({get class(){return f(a)}},()=>i,{get ref(){return n()},set ref(h){n(h)}}))})}y(e,s),dt()}var CL=Z('<!> <span class="sr-only">Close</span>',1),AL=Z("<!> <!>",1),PL=Z("<!> <!>",1);function eh(e,t){ut(t,!0);let n=k(t,"ref",15,null),i=wt(t,["$$slots","$$events","$$legacy","ref","class","portalProps","children"]);var s=U(),l=N(s);At(l,()=>rh,(a,c)=>{c(a,Nt(()=>t.portalProps,{children:(d,h)=>{var g=PL(),p=N(g);At(p,()=>th,(b,w)=>{w(b,{})});var v=nt(p,2);{let b=E(()=>ie("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));At(v,()=>vw,(w,S)=>{S(w,Nt({get class(){return f(b)}},()=>i,{get ref(){return n()},set ref(x){n(x)},children:(x,A)=>{var T=AL(),D=N(T);ct(D,()=>t.children??St);var R=nt(D,2);At(R,()=>pw,(L,V)=>{V(L,{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,H)=>{var j=CL(),tt=N(j);Vp(tt,{class:"size-4"}),te(2),y(M,j)},$$slots:{default:!0}})}),y(x,T)},$$slots:{default:!0}}))})}y(d,g)},$$slots:{default:!0}}))}),y(e,s),dt()}function pv(e,t){ut(t,!0);let n=k(t,"ref",15,null),i=wt(t,["$$slots","$$events","$$legacy","ref","class"]);var s=U(),l=N(s);{let a=E(()=>ie("text-muted-foreground text-sm",t.class));At(l,()=>WO,(c,d)=>{d(c,Nt({get class(){return f(a)}},()=>i,{get ref(){return n()},set ref(h){n(h)}}))})}y(e,s),dt()}const nh=NM,kL=VO,rh=Pu;function TL(e,t){ut(t,!0),k(t,"ref",11,null);let n=wt(t,["$$slots","$$events","$$legacy","ref","class"]);var i=U(),s=N(i);{let l=E(()=>ie("py-6 text-center text-sm",t.class));At(s,()=>$3,(a,c)=>{c(a,Nt({get class(){return f(l)}},()=>n))})}y(e,i),dt()}var EL=Z("<!> <!>",1);function IL(e,t){ut(t,!0);let n=k(t,"ref",15,null),i=wt(t,["$$slots","$$events","$$legacy","ref","class","children","heading","value"]);var s=U(),l=N(s);{let a=E(()=>ie("text-foreground overflow-hidden p-1",t.class)),c=E(()=>t.value??t.heading??`----${le()}`);At(l,()=>eM,(d,h)=>{h(d,Nt({get class(){return f(a)},get value(){return f(c)}},()=>i,{get ref(){return n()},set ref(g){n(g)},children:(g,p)=>{var v=EL(),b=N(v);{var w=x=>{var A=U(),T=N(A);At(T,()=>rM,(D,R)=>{R(D,{class:"text-muted-foreground px-2 py-1.5 text-xs font-medium",children:(L,V)=>{te();var M=Ee();Mt(()=>me(M,t.heading)),y(L,M)},$$slots:{default:!0}})}),y(x,A)};gt(b,x=>{t.heading&&x(w)})}var S=nt(b,2);At(S,()=>sM,(x,A)=>{A(x,{get children(){return t.children}})}),y(g,v)},$$slots:{default:!0}}))})}y(e,s),dt()}function X_(e,t){ut(t,!0);let n=k(t,"ref",15,null),i=wt(t,["$$slots","$$events","$$legacy","ref","class"]);var s=U(),l=N(s);{let a=E(()=>ie("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));At(l,()=>dM,(c,d)=>{d(c,Nt({get class(){return f(a)}},()=>i,{get ref(){return n()},set ref(h){n(h)}}))})}y(e,s),dt()}var OL=Z('<div class="flex items-center border-b px-2" data-command-input-wrapper=""><!> <!></div>');function RL(e,t){ut(t,!0);let n=k(t,"ref",15,null),i=k(t,"value",15,""),s=wt(t,["$$slots","$$events","$$legacy","ref","class","value"]);var l=OL(),a=q(l);eE(a,{class:"mr-2 size-4 shrink-0 opacity-50"});var c=nt(a,2);{let d=E(()=>ie("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));At(c,()=>lM,(h,g)=>{g(h,Nt({get class(){return f(d)}},()=>s,{get ref(){return n()},set ref(p){n(p)},get value(){return i()},set value(p){i(p)}}))})}K(l),y(e,l),dt()}function NL(e,t){ut(t,!0);let n=k(t,"ref",15,null),i=wt(t,["$$slots","$$events","$$legacy","ref","class"]);var s=U(),l=N(s);{let a=E(()=>ie("max-h-[300px] overflow-y-auto overflow-x-hidden",t.class));At(l,()=>hM,(c,d)=>{d(c,Nt({get class(){return f(a)}},()=>i,{get ref(){return n()},set ref(h){n(h)}}))})}y(e,s),dt()}function vv(e,t){ut(t,!0);let n=k(t,"ref",15,null),i=k(t,"sideOffset",3,4),s=k(t,"align",3,"center"),l=wt(t,["$$slots","$$events","$$legacy","ref","class","sideOffset","align","portalProps"]);var a=U(),c=N(a);At(c,()=>Pu,(d,h)=>{h(d,Nt(()=>t.portalProps,{children:(g,p)=>{var v=U(),b=N(v);{let w=E(()=>ie("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));At(b,()=>IM,(S,x)=>{x(S,Nt({get sideOffset(){return i()},get align(){return s()},get class(){return f(w)}},()=>l,{get ref(){return n()},set ref(A){n(A)}}))})}y(g,v)},$$slots:{default:!0}}))}),y(e,a),dt()}const mv=WM,bv=RM;var Z_=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Kn=e=>!e||typeof e!="object"||Object.keys(e).length===0,ML=(e,t)=>JSON.stringify(e)===JSON.stringify(t);function Tw(e,t){e.forEach(function(n){Array.isArray(n)?Tw(n,t):t.push(n)})}function Ew(e){let t=[];return Tw(e,t),t}var Iw=(...e)=>Ew(e).filter(Boolean),Ow=(e,t)=>{let n={},i=Object.keys(e),s=Object.keys(t);for(let l of i)if(s.includes(l)){let a=e[l],c=t[l];Array.isArray(a)||Array.isArray(c)?n[l]=Iw(c,a):typeof a=="object"&&typeof c=="object"?n[l]=Ow(a,c):n[l]=c+" "+a}else n[l]=e[l];for(let l of s)i.includes(l)||(n[l]=t[l]);return n},j_=e=>!e||typeof e!="string"?e:e.replace(/\s+/g," ").trim();const _v="-",LL=e=>{const t=FL(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:i}=e;return{getClassGroupId:a=>{const c=a.split(_v);return c[0]===""&&c.length!==1&&c.shift(),Rw(c,t)||DL(a)},getConflictingClassGroupIds:(a,c)=>{const d=n[a]||[];return c&&i[a]?[...d,...i[a]]:d}}},Rw=(e,t)=>{var a;if(e.length===0)return t.classGroupId;const n=e[0],i=t.nextPart.get(n),s=i?Rw(e.slice(1),i):void 0;if(s)return s;if(t.validators.length===0)return;const l=e.join(_v);return(a=t.validators.find(({validator:c})=>c(l)))==null?void 0:a.classGroupId},Q_=/^\[(.+)\]$/,DL=e=>{if(Q_.test(e)){const t=Q_.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},FL=e=>{const{theme:t,prefix:n}=e,i={nextPart:new Map,validators:[]};return zL(Object.entries(e.classGroups),n).forEach(([l,a])=>{yp(a,i,l,t)}),i},yp=(e,t,n,i)=>{e.forEach(s=>{if(typeof s=="string"){const l=s===""?t:J_(t,s);l.classGroupId=n;return}if(typeof s=="function"){if(BL(s)){yp(s(i),t,n,i);return}t.validators.push({validator:s,classGroupId:n});return}Object.entries(s).forEach(([l,a])=>{yp(a,J_(t,l),n,i)})})},J_=(e,t)=>{let n=e;return t.split(_v).forEach(i=>{n.nextPart.has(i)||n.nextPart.set(i,{nextPart:new Map,validators:[]}),n=n.nextPart.get(i)}),n},BL=e=>e.isThemeGetter,zL=(e,t)=>t?e.map(([n,i])=>{const s=i.map(l=>typeof l=="string"?t+l:typeof l=="object"?Object.fromEntries(Object.entries(l).map(([a,c])=>[t+a,c])):l);return[n,s]}):e,VL=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,i=new Map;const s=(l,a)=>{n.set(l,a),t++,t>e&&(t=0,i=n,n=new Map)};return{get(l){let a=n.get(l);if(a!==void 0)return a;if((a=i.get(l))!==void 0)return s(l,a),a},set(l,a){n.has(l)?n.set(l,a):s(l,a)}}},Nw="!",HL=e=>{const{separator:t,experimentalParseClassName:n}=e,i=t.length===1,s=t[0],l=t.length,a=c=>{const d=[];let h=0,g=0,p;for(let x=0;x<c.length;x++){let A=c[x];if(h===0){if(A===s&&(i||c.slice(x,x+l)===t)){d.push(c.slice(g,x)),g=x+l;continue}if(A==="/"){p=x;continue}}A==="["?h++:A==="]"&&h--}const v=d.length===0?c:c.substring(g),b=v.startsWith(Nw),w=b?v.substring(1):v,S=p&&p>g?p-g:void 0;return{modifiers:d,hasImportantModifier:b,baseClassName:w,maybePostfixModifierPosition:S}};return n?c=>n({className:c,parseClassName:a}):a},WL=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},UL=e=>({cache:VL(e.cacheSize),parseClassName:HL(e),...LL(e)}),GL=/\s+/,KL=(e,t)=>{const{parseClassName:n,getClassGroupId:i,getConflictingClassGroupIds:s}=t,l=[],a=e.trim().split(GL);let c="";for(let d=a.length-1;d>=0;d-=1){const h=a[d],{modifiers:g,hasImportantModifier:p,baseClassName:v,maybePostfixModifierPosition:b}=n(h);let w=!!b,S=i(w?v.substring(0,b):v);if(!S){if(!w){c=h+(c.length>0?" "+c:c);continue}if(S=i(v),!S){c=h+(c.length>0?" "+c:c);continue}w=!1}const x=WL(g).join(":"),A=p?x+Nw:x,T=A+S;if(l.includes(T))continue;l.push(T);const D=s(S,w);for(let R=0;R<D.length;++R){const L=D[R];l.push(A+L)}c=h+(c.length>0?" "+c:c)}return c};function qL(){let e=0,t,n,i="";for(;e<arguments.length;)(t=arguments[e++])&&(n=Mw(t))&&(i&&(i+=" "),i+=n);return i}const Mw=e=>{if(typeof e=="string")return e;let t,n="";for(let i=0;i<e.length;i++)e[i]&&(t=Mw(e[i]))&&(n&&(n+=" "),n+=t);return n};function wp(e,...t){let n,i,s,l=a;function a(d){const h=t.reduce((g,p)=>p(g),e());return n=UL(h),i=n.cache.get,s=n.cache.set,l=c,c(d)}function c(d){const h=i(d);if(h)return h;const g=KL(d,n);return s(d,g),g}return function(){return l(qL.apply(null,arguments))}}const nn=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},Lw=/^\[(?:([a-z-]+):)?(.+)\]$/i,YL=/^\d+\/\d+$/,XL=new Set(["px","full","screen"]),ZL=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,jL=/\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$/,QL=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,JL=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,$L=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,ci=e=>$o(e)||XL.has(e)||YL.test(e),zi=e=>Es(e,"length",a4),$o=e=>!!e&&!Number.isNaN(Number(e)),Lg=e=>Es(e,"number",$o),Js=e=>!!e&&Number.isInteger(Number(e)),t4=e=>e.endsWith("%")&&$o(e.slice(0,-1)),ve=e=>Lw.test(e),Vi=e=>ZL.test(e),e4=new Set(["length","size","percentage"]),n4=e=>Es(e,e4,Dw),r4=e=>Es(e,"position",Dw),i4=new Set(["image","url"]),o4=e=>Es(e,i4,c4),s4=e=>Es(e,"",l4),$s=()=>!0,Es=(e,t,n)=>{const i=Lw.exec(e);return i?i[1]?typeof t=="string"?i[1]===t:t.has(i[1]):n(i[2]):!1},a4=e=>jL.test(e)&&!QL.test(e),Dw=()=>!1,l4=e=>JL.test(e),c4=e=>$L.test(e),xp=()=>{const e=nn("colors"),t=nn("spacing"),n=nn("blur"),i=nn("brightness"),s=nn("borderColor"),l=nn("borderRadius"),a=nn("borderSpacing"),c=nn("borderWidth"),d=nn("contrast"),h=nn("grayscale"),g=nn("hueRotate"),p=nn("invert"),v=nn("gap"),b=nn("gradientColorStops"),w=nn("gradientColorStopPositions"),S=nn("inset"),x=nn("margin"),A=nn("opacity"),T=nn("padding"),D=nn("saturate"),R=nn("scale"),L=nn("sepia"),V=nn("skew"),M=nn("space"),H=nn("translate"),j=()=>["auto","contain","none"],tt=()=>["auto","hidden","clip","visible","scroll"],it=()=>["auto",ve,t],G=()=>[ve,t],ot=()=>["",ci,zi],Y=()=>["auto",$o,ve],J=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],et=()=>["solid","dashed","dotted","double","none"],rt=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ht=()=>["start","end","center","between","around","evenly","stretch"],bt=()=>["","0",ve],yt=()=>["auto","avoid","all","avoid-page","page","left","right","column"],at=()=>[$o,ve];return{cacheSize:500,separator:":",theme:{colors:[$s],spacing:[ci,zi],blur:["none","",Vi,ve],brightness:at(),borderColor:[e],borderRadius:["none","","full",Vi,ve],borderSpacing:G(),borderWidth:ot(),contrast:at(),grayscale:bt(),hueRotate:at(),invert:bt(),gap:G(),gradientColorStops:[e],gradientColorStopPositions:[t4,zi],inset:it(),margin:it(),opacity:at(),padding:G(),saturate:at(),scale:at(),sepia:bt(),skew:at(),space:G(),translate:G()},classGroups:{aspect:[{aspect:["auto","square","video",ve]}],container:["container"],columns:[{columns:[Vi]}],"break-after":[{"break-after":yt()}],"break-before":[{"break-before":yt()}],"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(),ve]}],overflow:[{overflow:tt()}],"overflow-x":[{"overflow-x":tt()}],"overflow-y":[{"overflow-y":tt()}],overscroll:[{overscroll:j()}],"overscroll-x":[{"overscroll-x":j()}],"overscroll-y":[{"overscroll-y":j()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[S]}],"inset-x":[{"inset-x":[S]}],"inset-y":[{"inset-y":[S]}],start:[{start:[S]}],end:[{end:[S]}],top:[{top:[S]}],right:[{right:[S]}],bottom:[{bottom:[S]}],left:[{left:[S]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Js,ve]}],basis:[{basis:it()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",ve]}],grow:[{grow:bt()}],shrink:[{shrink:bt()}],order:[{order:["first","last","none",Js,ve]}],"grid-cols":[{"grid-cols":[$s]}],"col-start-end":[{col:["auto",{span:["full",Js,ve]},ve]}],"col-start":[{"col-start":Y()}],"col-end":[{"col-end":Y()}],"grid-rows":[{"grid-rows":[$s]}],"row-start-end":[{row:["auto",{span:[Js,ve]},ve]}],"row-start":[{"row-start":Y()}],"row-end":[{"row-end":Y()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",ve]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",ve]}],gap:[{gap:[v]}],"gap-x":[{"gap-x":[v]}],"gap-y":[{"gap-y":[v]}],"justify-content":[{justify:["normal",...ht()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...ht(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...ht(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[T]}],px:[{px:[T]}],py:[{py:[T]}],ps:[{ps:[T]}],pe:[{pe:[T]}],pt:[{pt:[T]}],pr:[{pr:[T]}],pb:[{pb:[T]}],pl:[{pl:[T]}],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",ve,t]}],"min-w":[{"min-w":[ve,t,"min","max","fit"]}],"max-w":[{"max-w":[ve,t,"none","full","min","max","fit","prose",{screen:[Vi]},Vi]}],h:[{h:[ve,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[ve,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[ve,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[ve,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Vi,zi]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Lg]}],"font-family":[{font:[$s]}],"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",ve]}],"line-clamp":[{"line-clamp":["none",$o,Lg]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",ci,ve]}],"list-image":[{"list-image":["none",ve]}],"list-style-type":[{list:["none","disc","decimal",ve]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[A]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[A]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...et(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",ci,zi]}],"underline-offset":[{"underline-offset":["auto",ci,ve]}],"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:G()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ve]}],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",ve]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[A]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...J(),r4]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",n4]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},o4]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[w]}],"gradient-via-pos":[{via:[w]}],"gradient-to-pos":[{to:[w]}],"gradient-from":[{from:[b]}],"gradient-via":[{via:[b]}],"gradient-to":[{to:[b]}],rounded:[{rounded:[l]}],"rounded-s":[{"rounded-s":[l]}],"rounded-e":[{"rounded-e":[l]}],"rounded-t":[{"rounded-t":[l]}],"rounded-r":[{"rounded-r":[l]}],"rounded-b":[{"rounded-b":[l]}],"rounded-l":[{"rounded-l":[l]}],"rounded-ss":[{"rounded-ss":[l]}],"rounded-se":[{"rounded-se":[l]}],"rounded-ee":[{"rounded-ee":[l]}],"rounded-es":[{"rounded-es":[l]}],"rounded-tl":[{"rounded-tl":[l]}],"rounded-tr":[{"rounded-tr":[l]}],"rounded-br":[{"rounded-br":[l]}],"rounded-bl":[{"rounded-bl":[l]}],"border-w":[{border:[c]}],"border-w-x":[{"border-x":[c]}],"border-w-y":[{"border-y":[c]}],"border-w-s":[{"border-s":[c]}],"border-w-e":[{"border-e":[c]}],"border-w-t":[{"border-t":[c]}],"border-w-r":[{"border-r":[c]}],"border-w-b":[{"border-b":[c]}],"border-w-l":[{"border-l":[c]}],"border-opacity":[{"border-opacity":[A]}],"border-style":[{border:[...et(),"hidden"]}],"divide-x":[{"divide-x":[c]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[c]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[A]}],"divide-style":[{divide:et()}],"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:["",...et()]}],"outline-offset":[{"outline-offset":[ci,ve]}],"outline-w":[{outline:[ci,zi]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:ot()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[A]}],"ring-offset-w":[{"ring-offset":[ci,zi]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Vi,s4]}],"shadow-color":[{shadow:[$s]}],opacity:[{opacity:[A]}],"mix-blend":[{"mix-blend":[...rt(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":rt()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[i]}],contrast:[{contrast:[d]}],"drop-shadow":[{"drop-shadow":["","none",Vi,ve]}],grayscale:[{grayscale:[h]}],"hue-rotate":[{"hue-rotate":[g]}],invert:[{invert:[p]}],saturate:[{saturate:[D]}],sepia:[{sepia:[L]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[i]}],"backdrop-contrast":[{"backdrop-contrast":[d]}],"backdrop-grayscale":[{"backdrop-grayscale":[h]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[g]}],"backdrop-invert":[{"backdrop-invert":[p]}],"backdrop-opacity":[{"backdrop-opacity":[A]}],"backdrop-saturate":[{"backdrop-saturate":[D]}],"backdrop-sepia":[{"backdrop-sepia":[L]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[a]}],"border-spacing-x":[{"border-spacing-x":[a]}],"border-spacing-y":[{"border-spacing-y":[a]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",ve]}],duration:[{duration:at()}],ease:[{ease:["linear","in","out","in-out",ve]}],delay:[{delay:at()}],animate:[{animate:["none","spin","ping","pulse","bounce",ve]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[R]}],"scale-x":[{"scale-x":[R]}],"scale-y":[{"scale-y":[R]}],rotate:[{rotate:[Js,ve]}],"translate-x":[{"translate-x":[H]}],"translate-y":[{"translate-y":[H]}],"skew-x":[{"skew-x":[V]}],"skew-y":[{"skew-y":[V]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",ve]}],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",ve]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":G()}],"scroll-mx":[{"scroll-mx":G()}],"scroll-my":[{"scroll-my":G()}],"scroll-ms":[{"scroll-ms":G()}],"scroll-me":[{"scroll-me":G()}],"scroll-mt":[{"scroll-mt":G()}],"scroll-mr":[{"scroll-mr":G()}],"scroll-mb":[{"scroll-mb":G()}],"scroll-ml":[{"scroll-ml":G()}],"scroll-p":[{"scroll-p":G()}],"scroll-px":[{"scroll-px":G()}],"scroll-py":[{"scroll-py":G()}],"scroll-ps":[{"scroll-ps":G()}],"scroll-pe":[{"scroll-pe":G()}],"scroll-pt":[{"scroll-pt":G()}],"scroll-pr":[{"scroll-pr":G()}],"scroll-pb":[{"scroll-pb":G()}],"scroll-pl":[{"scroll-pl":G()}],"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",ve]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[ci,zi,Lg]}],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"]}}},u4=(e,{cacheSize:t,prefix:n,separator:i,experimentalParseClassName:s,extend:l={},override:a={}})=>{oa(e,"cacheSize",t),oa(e,"prefix",n),oa(e,"separator",i),oa(e,"experimentalParseClassName",s);for(const c in a)d4(e[c],a[c]);for(const c in l)f4(e[c],l[c]);return e},oa=(e,t,n)=>{n!==void 0&&(e[t]=n)},d4=(e,t)=>{if(t)for(const n in t)oa(e,n,t[n])},f4=(e,t)=>{if(t)for(const n in t){const i=t[n];i!==void 0&&(e[n]=(e[n]||[]).concat(i))}},h4=(e,...t)=>typeof e=="function"?wp(xp,e,...t):wp(()=>u4(xp(),e),...t),g4=wp(xp);var p4={twMerge:!0,twMergeConfig:{},responsiveVariants:!1},Fw=e=>e||void 0,ha=(...e)=>Fw(Ew(e).filter(Boolean).join(" ")),Dg=null,di={},Sp=!1,ta=(...e)=>t=>t.twMerge?((!Dg||Sp)&&(Sp=!1,Dg=Kn(di)?g4:h4({...di,extend:{theme:di.theme,classGroups:di.classGroups,conflictingClassGroupModifiers:di.conflictingClassGroupModifiers,conflictingClassGroups:di.conflictingClassGroups,...di.extend}})),Fw(Dg(ha(e)))):ha(e),$_=(e,t)=>{for(let n in t)e.hasOwnProperty(n)?e[n]=ha(e[n],t[n]):e[n]=t[n];return e},yv=(e,t)=>{let{extend:n=null,slots:i={},variants:s={},compoundVariants:l=[],compoundSlots:a=[],defaultVariants:c={}}=e,d={...p4,...t},h=n!=null&&n.base?ha(n.base,e==null?void 0:e.base):e==null?void 0:e.base,g=n!=null&&n.variants&&!Kn(n.variants)?Ow(s,n.variants):s,p=n!=null&&n.defaultVariants&&!Kn(n.defaultVariants)?{...n.defaultVariants,...c}:c;!Kn(d.twMergeConfig)&&!ML(d.twMergeConfig,di)&&(Sp=!0,di=d.twMergeConfig);let v=Kn(n==null?void 0:n.slots),b=Kn(i)?{}:{base:ha(e==null?void 0:e.base,v&&(n==null?void 0:n.base)),...i},w=v?b:$_({...n==null?void 0:n.slots},Kn(b)?{base:e==null?void 0:e.base}:b),S=Kn(n==null?void 0:n.compoundVariants)?l:Iw(n==null?void 0:n.compoundVariants,l),x=T=>{if(Kn(g)&&Kn(i)&&v)return ta(h,T==null?void 0:T.class,T==null?void 0:T.className)(d);if(S&&!Array.isArray(S))throw new TypeError(`The "compoundVariants" prop must be an array. Received: ${typeof S}`);if(a&&!Array.isArray(a))throw new TypeError(`The "compoundSlots" prop must be an array. Received: ${typeof a}`);let D=(G,ot,Y=[],J)=>{let et=Y;if(typeof ot=="string")et=et.concat(j_(ot).split(" ").map(rt=>`${G}:${rt}`));else if(Array.isArray(ot))et=et.concat(ot.reduce((rt,ht)=>rt.concat(`${G}:${ht}`),[]));else if(typeof ot=="object"&&typeof J=="string"){for(let rt in ot)if(ot.hasOwnProperty(rt)&&rt===J){let ht=ot[rt];if(ht&&typeof ht=="string"){let bt=j_(ht);et[J]?et[J]=et[J].concat(bt.split(" ").map(yt=>`${G}:${yt}`)):et[J]=bt.split(" ").map(yt=>`${G}:${yt}`)}else Array.isArray(ht)&&ht.length>0&&(et[J]=ht.reduce((bt,yt)=>bt.concat(`${G}:${yt}`),[]))}}return et},R=(G,ot=g,Y=null,J=null)=>{var et;let rt=ot[G];if(!rt||Kn(rt))return null;let ht=(et=J==null?void 0:J[G])!=null?et:T==null?void 0:T[G];if(ht===null)return null;let bt=Z_(ht),yt=Array.isArray(d.responsiveVariants)&&d.responsiveVariants.length>0||d.responsiveVariants===!0,at=p==null?void 0:p[G],st=[];if(typeof bt=="object"&&yt)for(let[Wt,Bt]of Object.entries(bt)){let de=rt[Bt];if(Wt==="initial"){at=Bt;continue}Array.isArray(d.responsiveVariants)&&!d.responsiveVariants.includes(Wt)||(st=D(Wt,de,st,Y))}let xt=bt!=null&&typeof bt!="object"?bt:Z_(at),Lt=rt[xt||"false"];return typeof st=="object"&&typeof Y=="string"&&st[Y]?$_(st,Lt):st.length>0?(st.push(Lt),Y==="base"?st.join(" "):st):Lt},L=()=>g?Object.keys(g).map(G=>R(G,g)):null,V=(G,ot)=>{if(!g||typeof g!="object")return null;let Y=new Array;for(let J in g){let et=R(J,g,G,ot),rt=G==="base"&&typeof et=="string"?et:et&&et[G];rt&&(Y[Y.length]=rt)}return Y},M={};for(let G in T)T[G]!==void 0&&(M[G]=T[G]);let H=(G,ot)=>{var Y;let J=typeof(T==null?void 0:T[G])=="object"?{[G]:(Y=T[G])==null?void 0:Y.initial}:{};return{...p,...M,...J,...ot}},j=(G=[],ot)=>{let Y=[];for(let{class:J,className:et,...rt}of G){let ht=!0;for(let[bt,yt]of Object.entries(rt)){let at=H(bt,ot)[bt];if(Array.isArray(yt)){if(!yt.includes(at)){ht=!1;break}}else{let st=xt=>xt==null||xt===!1;if(st(yt)&&st(at))continue;if(at!==yt){ht=!1;break}}}ht&&(J&&Y.push(J),et&&Y.push(et))}return Y},tt=G=>{let ot=j(S,G);if(!Array.isArray(ot))return ot;let Y={};for(let J of ot)if(typeof J=="string"&&(Y.base=ta(Y.base,J)(d)),typeof J=="object")for(let[et,rt]of Object.entries(J))Y[et]=ta(Y[et],rt)(d);return Y},it=G=>{if(a.length<1)return null;let ot={};for(let{slots:Y=[],class:J,className:et,...rt}of a){if(!Kn(rt)){let ht=!0;for(let bt of Object.keys(rt)){let yt=H(bt,G)[bt];if(yt===void 0||(Array.isArray(rt[bt])?!rt[bt].includes(yt):rt[bt]!==yt)){ht=!1;break}}if(!ht)continue}for(let ht of Y)ot[ht]=ot[ht]||[],ot[ht].push([J,et])}return ot};if(!Kn(i)||!v){let G={};if(typeof w=="object"&&!Kn(w))for(let ot of Object.keys(w))G[ot]=Y=>{var J,et;return ta(w[ot],V(ot,Y),((J=tt(Y))!=null?J:[])[ot],((et=it(Y))!=null?et:[])[ot],Y==null?void 0:Y.class,Y==null?void 0:Y.className)(d)};return G}return ta(h,L(),j(S),T==null?void 0:T.class,T==null?void 0:T.className)(d)},A=()=>{if(!(!g||typeof g!="object"))return Object.keys(g)};return x.variantKeys=A(),x.extend=n,x.base=h,x.slots=w,x.variants=g,x.defaultVariants=p,x.compoundSlots=a,x.compoundVariants=S,x};const t0=yv({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 v4=Z("<a><!></a>"),m4=Z("<button><!></button>");function Nn(e,t){ut(t,!0);let n=k(t,"variant",3,"default"),i=k(t,"size",3,"default"),s=k(t,"ref",15,null),l=k(t,"href",3,void 0),a=k(t,"type",3,"button"),c=wt(t,["$$slots","$$events","$$legacy","class","variant","size","ref","href","type","children"]);const d=Yr(),[h,g]=d;var p=U(),v=N(p);{var b=S=>{var x=v4();Vt(x,T=>({...T}),[()=>g({class:ie(t0({variant:n(),size:i()}),t.class),href:l(),...c},[{attribute_name:"href",lang_attribute_name:"hreflang"}])]);var A=q(x);ct(A,()=>t.children??St),K(x),yn(x,T=>s(T),()=>s()),y(S,x)},w=S=>{var x=m4();Vt(x,T=>({...T}),[()=>g({class:ie(t0({variant:n(),size:i()}),t.class),type:a(),...c},[{attribute_name:"formaction"}])]);var A=q(x);ct(A,()=>t.children??St),K(x),yn(x,T=>s(T),()=>s()),y(S,x)};gt(v,S=>{l()?S(b):S(w,!1)})}y(e,p),dt()}const b4=(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)},Go=$e({}),Ad=$e(0),wv=()=>({customLabelColorsStore:Go,colorVersion:Ad,getCustomColor:l=>Pn(Go)[l],setCustomColor:(l,a,c=1)=>{Go.update(d=>({...d,[l]:{color:a,alpha:c}})),Ad.update(d=>d+1)},hasCustomColor:l=>!!Pn(Go)[l],deleteCustomColor:l=>{Go.update(a=>{const{[l]:c,...d}=a;return d}),Ad.update(a=>a+1)},clearCustomColors:()=>{Go.set({}),Ad.update(l=>l+1)}}),Ui=(e,t=1)=>{t=Math.max(0,Math.min(t,1));const{getCustomColor:n,hasCustomColor:i}=wv();if(i(e)){const x=n(e);if(x)return((T,D)=>{const R=parseInt(T.slice(1,3),16),L=parseInt(T.slice(3,5),16),V=parseInt(T.slice(5,7),16);return{color:`rgba(${R}, ${L}, ${V}, ${D})`,contrastColor:`rgba(${255-R}, ${255-L}, ${255-V}, ${D})`}})(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 l;const a=s.length-1;if(l=Array.from(e).reduce((x,A)=>(x<<5)-x+A.charCodeAt(0),0),l=Math.abs(l)%a+1,l>=1&&l<=a)return{color:s[l-1].replace("alpha",t.toString()),contrastColor:`rgba(${255-Math.round(parseInt(s[l-1].split(",")[0].split("(")[1])*(t/255))}, ${255-Math.round(parseInt(s[l-1].split(",")[1]))}, ${255-Math.round(parseInt(s[l-1].split(",")[2]))}, ${t})`};const c=(l*30+20)%256,d=(l*60+100)%256,h=(l*90+150)%256,g=Math.max(c,d,h),p=Math.min(c,d,h);if(g-p===0)return{color:`rgba(255, 255, 255, ${t})`,contrastColor:`rgba(0, 0, 0, ${t})`};const b=255/g,w=`rgba(${Math.round(c*b)}, ${Math.round(d*b)}, ${Math.round(h*b)}, ${t})`,S=`rgba(${255-Math.round(c*b)}, ${255-Math.round(d*b)}, ${255-Math.round(h*b)}, ${t})`;return{color:w,contrastColor:S}};var _4=Z(" <!>",1),y4=Z('<div class="flex items-center space-x-4"><!> <!></div>'),w4=Z("<!> ",1),x4=Z('<span class="opacity-50">Create:</span> <span class="ml-1 font-semibold"> </span>',1),S4=Z('<div class="border-t"><!></div>'),C4=Z("<!> <!> <!>",1),A4=Z("<!> <!>",1),P4=Z("<!> <!>",1);function Bw(e,t){ut(t,!0);let n=pt(!1),i=pt(null);function s(){O(n,!1),Hf().then(()=>{f(i).focus()})}let l=k(t,"name",3,"items"),a=k(t,"label",3,"Select an item"),c=k(t,"selectedItem",15,void 0),d=k(t,"placeholder",3,"Search an item..."),h=k(t,"className",3,""),g=k(t,"contentClassName",3,""),p=k(t,"disabled",3,!1),v=k(t,"isLoading",3,!1),b=pt(""),w=pt("");const S=E(()=>{var L;return(L=c())==null?void 0:L.value});be(()=>{f(n)||(O(b,""),O(w,""))});const x=L=>{var V;c(L),(V=t.onSelect)==null||V.call(t,L),s()},A=L=>{const V=t.items.find(M=>M.value.toLowerCase()===L.toLowerCase());if(V)x(V);else{const M={value:L,label:L};t.items.push(M),x(M)}},T=L=>{L.key==="Enter"&&!f(w)&&f(b)?(A(f(b)),L.preventDefault(),L.stopPropagation()):(L.key==="ArrowLeft"||L.key==="ArrowRight")&&L.stopPropagation()};var D=U(),R=N(D);At(R,()=>mv,(L,V)=>{V(L,{get open(){return f(n)},set open(M){O(n,M,!0)},children:(M,H)=>{var j=P4(),tt=N(j);{const G=(ot,Y)=>{let J=()=>Y==null?void 0:Y().props;var et=y4(),rt=q(et);{let yt=E(()=>ie("w-[200px] justify-between",h()));Nn(rt,Nt(J,{variant:"secondary",get disabled(){return p()},get class(){return f(yt)},role:"combobox",get"aria-expanded"(){return f(n)},"data-testid":"select-list-trigger",children:(at,st)=>{te();var xt=_4(),Lt=N(xt),Wt=nt(Lt);ZT(Wt,{class:"opacity-50"}),Mt(()=>{var Bt;return me(Lt,`${(((Bt=c())==null?void 0:Bt.label)||a())??""} `)}),y(at,xt)},$$slots:{default:!0}}))}var ht=nt(rt,2);{var bt=yt=>{$T(yt,{class:"mr-2 h-4 w-4 animate-spin"})};gt(ht,yt=>{v()&&yt(bt)})}K(et),y(ot,et)};At(tt,()=>bv,(ot,Y)=>{Y(ot,{get ref(){return f(i)},set ref(J){O(i,J,!0)},child:G,$$slots:{child:!0}})})}var it=nt(tt,2);{let G=E(()=>ie("w-[200px] p-0",g()));At(it,()=>vv,(ot,Y)=>{Y(ot,{get class(){return f(G)},children:(J,et)=>{var rt=U(),ht=N(rt);At(ht,()=>wL,(bt,yt)=>{yt(bt,{get value(){return f(w)},set value(at){O(w,at,!0)},children:(at,st)=>{var xt=A4(),Lt=N(xt);At(Lt,()=>RL,(Bt,de)=>{de(Bt,{get placeholder(){return d()},onkeydown:T,"data-testid":"select-list-input",get value(){return f(b)},set value(Ut){O(b,Ut,!0)}})});var Wt=nt(Lt,2);At(Wt,()=>NL,(Bt,de)=>{de(Bt,{class:"dark:[color-scheme:dark]",children:(Ut,Et)=>{var Ct=C4(),Rt=N(Ct);At(Rt,()=>TL,(Yt,_e)=>{_e(Yt,{children:(he,Be)=>{var Ot=U(),Ht=N(Ot);{var $t=zt=>{var Xt=U(),fe=N(Xt);ct(fe,()=>t.notFound,()=>({inputValue:f(b)||""})),y(zt,Xt)},ye=zt=>{var Xt=Ee("Item not found");y(zt,Xt)};gt(Ht,zt=>{t.notFound?zt($t):zt(ye,!1)})}y(he,Ot)},$$slots:{default:!0}})});var qt=nt(Rt,2);At(qt,()=>IL,(Yt,_e)=>{_e(Yt,{get value(){return l()},children:(he,Be)=>{var Ot=U(),Ht=N(Ot);Wr(Ht,17,()=>t.items,$t=>$t.value,($t,ye)=>{var zt=U(),Xt=N(zt);At(Xt,()=>X_,(fe,Le)=>{Le(fe,{get value(){return f(ye).value},onSelect:()=>x(f(ye)),children:(Ke,qe)=>{var Pe=w4(),ze=N(Pe);{let Ye=E(()=>ie(f(S)!==f(ye).value&&"text-transparent"));zp(ze,{get class(){return f(Ye)}})}var De=nt(ze);Mt(()=>me(De,` ${f(ye).label??""}`)),y(Ke,Pe)},$$slots:{default:!0}})}),y($t,zt)}),y(he,Ot)},$$slots:{default:!0}})});var ce=nt(qt,2);{var ee=Yt=>{var _e=S4(),he=q(_e);At(he,()=>X_,(Be,Ot)=>{Ot(Be,{value:"__create__",onSelect:()=>{const Ht={value:f(b),label:f(b)};t.items.push(Ht),x(Ht)},forceMount:!0,keywords:[],children:(Ht,$t)=>{var ye=x4(),zt=nt(N(ye),2),Xt=q(zt,!0);K(zt),Mt(()=>me(Xt,f(b))),y(Ht,ye)},$$slots:{default:!0}})}),K(_e),y(Yt,_e)};gt(ce,Yt=>{f(b).trim()&&Yt(ee)})}y(Ut,Ct)},$$slots:{default:!0}})}),y(at,xt)},$$slots:{default:!0}})}),y(J,rt)},$$slots:{default:!0}})})}y(M,j)},$$slots:{default:!0}})}),y(e,D),dt()}const zw=()=>Z0(Fp());var k4=Z('<div class="text-md m-2">Press Enter to create a new <span class="font-semibold"> </span> label.</div>'),T4=Z('<div class="text-md m-2">Type to create a new label.</div>');function Vw(e,t){ut(t,!0);var n=U(),i=N(n);{var s=a=>{var c=k4(),d=nt(q(c)),h=q(d);K(d),te(),K(c),Mt(()=>me(h,`"${t.label??""}"`)),y(a,c)},l=a=>{var c=T4();y(a,c)};gt(i,a=>{t.label.length>0?a(s):a(l,!1)})}y(e,n),dt()}const Hw=e=>e.map(n=>{const i=n.annotation_label_name;return{value:i,label:i}}).sort((n,i)=>n.label.localeCompare(i.label));var E4=Z('<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>'),I4=Z('<div class="flex h-full min-h-0 flex-col space-y-4 overflow-hidden dark:[color-scheme:dark]"><!></div>');function O4(e,t){ut(t,!0);const n=()=>Kt(l,"$result",i),[i,s]=pr(),l=zw(),a=E(()=>Hw(n().data||[]));Z4(e,{className:"h-full",children:(c,d)=>{Q4(c,{className:"h-full flex flex-col",children:(h,g)=>{var p=I4(),v=q(p);{let b=E(()=>`Selected annotations: ${t.selectedAnnotations.length}`);qw(v,{get title(){return f(b)},children:(w,S)=>{var x=E4(),A=nt(q(x),2);Bw(A,{get items(){return f(a)},name:"annotation-label",placeholder:"Select or create a label",label:"Select a label",get onSelect(){return t.onSelect},get isLoading(){return t.isLoading},get disabled(){return t.disabled},notFound:(D,R)=>{let L=()=>R==null?void 0:R().inputValue;Vw(D,{get label(){return L()}})},$$slots:{notFound:!0}}),K(x),y(w,x)}})}K(p),y(h,p)},$$slots:{default:!0}})},$$slots:{default:!0}}),dt(),s()}const e0=new Map,Ww=e=>{const t=Lp(e,{position:0,filterHash:""});return{initialize:()=>{e0.get(e)||(t.set({position:0,filterHash:""}),e0.set(e,!0))},savePosition:(l,a)=>{t.set({position:l,filterHash:a})},getRestoredPosition:l=>{const a=Pn(t);return a.filterHash===l?a.position:0}}};function R4(e,t){const n=e.currentTarget.dataset.annotationId;t(n)}function N4(e,t){const n=e.currentTarget.dataset.annotationId,i=e.currentTarget.dataset.sampleId,s=e.currentTarget.dataset.index;M0($0.toSampleWithAnnotation({sampleId:i,annotationId:n,datasetId:t.dataset_id,annotationIndex:Number(s)}))}function M4(e,t){if(e.key==="Enter"||e.key===" "){e.preventDefault();const n=e.currentTarget.dataset.annotationId;t(n)}}var L4=Z(`<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>`),D4=Z('<div data-testid="annotation-grid-item" role="button" tabindex="0"><div class="absolute right-7 top-1 z-10"><!></div> <!></div>'),F4=Z('<div class="flex justify-center p-4"><!></div>'),B4=Z("<!> <!>",1),z4=Z('<div class="min-w-[250px] max-w-[30%] flex-1"><!></div>'),V4=Z('<div class="flex h-full flex-1" data-testid="annotations-grid"><div class="viewport flex-1"><!></div> <!></div>');function Uz(e,t){ut(t,!0);const n=()=>Kt(v,"$showAnnotationTextLabelsStore",h),i=()=>Kt(t.selectedAnnotationFilterIds,"$selectedAnnotationFilterIds",h),s=()=>Kt(p,"$tagsSelected",h),l=()=>Kt(f(H),"$infiniteAnnotations",h),a=()=>Kt(J,"$pickedAnnotationIds",h),c=()=>Kt(b,"$isEditingMode",h),d=()=>Kt(f(tt),"$isPending",h),[h,g]=pr(),{tagsSelected:p}=J0({dataset_id:t.dataset_id,kind:["annotation"]}),{showAnnotationTextLabelsStore:v}=yu(),{isEditingMode:b}=Qi.data.globalStorage;let w=E(n);const{getDatasetVersion:S,setfilteredAnnotationCount:x}=wi();let A=pt("");const{initialize:T,savePosition:D,getRestoredPosition:R}=Ww("annotations_scroll");xs(async()=>{T(),O(A,await S(t.dataset_id),!0)});let L=pt(null);const V=E(()=>({path:{dataset_id:t.dataset_id},query:{annotation_label_ids:i().length>0?i():void 0,tag_ids:s().size>0?Array.from(s()):void 0}})),M=E(()=>pE(f(V))),H=E(()=>f(M).annotations),j=E(()=>f(M).updateAnnotations),tt=E(()=>f(M).isPending);let it=E(()=>i().join(",")+Array.from(s()).join(","));const G=E(()=>f(it)),ot=E(()=>R(f(G)));function Y(Et){const Ct=Et.target.scrollTop;D(Ct,f(G))}be(()=>{f(H).subscribe(Et=>{Et.isSuccess&&Et.data.pages.length>0&&x(Et.data.pages[0].total_count)})});const{selectedSampleAnnotationCropIds:J,toggleSampleAnnotationCropSelection:et,clearSelectedSampleAnnotationCrops:rt}=wi(),ht=16;function bt(Et){Et&&et(Et)}const yt=E(()=>{var Et;return((Et=l().data)==null?void 0:Et.pages.flatMap(Ct=>Ct.data))||[]});function at(){l().hasNextPage&&l().fetchNextPage()}const st=E(()=>f(yt).filter(Et=>a().has(Et.annotation_id))),xt=async Et=>{await f(j)(f(st).map(Ct=>({annotation_id:Ct.annotation_id,label_name:Et.value,dataset_id:t.dataset_id}))),rt()};let Lt=pt(600);be(()=>{if(!f(L))return;const Et=new ResizeObserver(Ct=>{for(const Rt of Ct)O(Lt,Rt.contentRect.height,!0)});return Et.observe(f(L)),()=>{Et.disconnect()}});var Wt=U(),Bt=N(Wt);{var de=Et=>{var Ct=L4();y(Et,Ct)},Ut=Et=>{var Ct=V4(),Rt=q(Ct),qt=q(Rt);bi(qt,()=>f(it),Yt=>{{const _e=(ye,zt)=>{let Xt=()=>zt==null?void 0:zt().index,fe=()=>zt==null?void 0:zt().style;var Le=U(),Ke=N(Le);bi(Ke,()=>l().dataUpdatedAt,qe=>{var Pe=U(),ze=N(Pe);{var De=Ye=>{var ne=D4();ne.__click=[R4,bt],ne.__dblclick=[N4,t],ne.__keydown=[M4,bt];var oe=q(ne),an=q(oe);{let Gt=E(()=>a().has(f(yt)[Xt()].annotation_id));Pv(an,{onSelect:()=>{},get isSelected(){return f(Gt)}})}K(oe);var Ft=nt(oe,2);{let Gt=E(()=>a().has(f(yt)[Xt()].annotation_id));Y4(Ft,{get annotation(){return f(yt)[Xt()]},get width(){return t.itemWidth},get height(){return t.itemHeight},get cachedDatasetVersion(){return f(A)},get showLabel(){return f(w)},get selected(){return f(Gt)}})}K(ne),Mt(()=>{Mn(ne,fe()),Pt(ne,"data-annotation-id",f(yt)[Xt()].annotation_id),Pt(ne,"data-sample-id",f(yt)[Xt()].sample.sample_id),Pt(ne,"data-index",Xt()),Pt(ne,"aria-label",`Edit annotation: ${f(yt)[Xt()].annotation_id}`)}),y(Ye,ne)};gt(ze,Ye=>{f(yt)[Xt()]&&Ye(De)})}y(qe,Pe)}),y(ye,Le)},he=ye=>{var zt=B4(),Xt=N(zt);bi(Xt,()=>f(yt).length,Ke=>{tx(Ke,{onIntersect:at})});var fe=nt(Xt,2);{var Le=Ke=>{var qe=F4(),Pe=q(qe);oy(Pe,{}),K(qe),y(Ke,qe)};gt(fe,Ke=>{l().isFetchingNextPage&&Ke(Le)})}y(ye,zt)};let Be=E(()=>{var ye;return(ye=f(yt))==null?void 0:ye.length}),Ot=E(()=>t.itemHeight+ht),Ht=E(()=>t.itemWidth+ht),$t=E(()=>f(yt).length>0?f(ot):0);Wp(Yt,{get itemCount(){return f(Be)},get itemHeight(){return f(Ot)},get itemWidth(){return f(Ht)},get height(){return f(Lt)},get scrollPosition(){return f($t)},onscroll:Y,class:"overflow-none overflow-y-auto dark:[color-scheme:dark]",get style(){return`--sample-width: ${t.itemWidth??""}px; --sample-height: ${t.itemHeight??""}px;`},item:_e,footer:he,$$slots:{item:!0,footer:!0}})}}),K(Rt);var ce=nt(Rt,2);{var ee=Yt=>{var _e=z4(),he=q(_e);{let Be=E(()=>f(st).length===0);O4(he,{get selectedAnnotations(){return f(st)},get disabled(){return f(Be)},get isLoading(){return d()},onSelect:xt})}K(_e),y(Yt,_e)};gt(ce,Yt=>{c()&&Yt(ee)})}K(Ct),yn(Ct,Yt=>O(L,Yt),()=>f(L)),y(Et,Ct)};gt(Bt,Et=>{l().isFetched&&f(yt).length===0?Et(de):Et(Ut,!1)})}y(e,Wt),dt(),g()}kr(["click","dblclick","keydown"]);function n0(e){return e.annotation_type==="object_detection"}function H4(e){return e.annotation_type==="instance_segmentation"}function Gz(e){return e.annotation_type==="classification"}function rf(e){if(n0(e)||H4(e)){const t={...n0(e)?e.object_detection_details:e.instance_segmentation_details};return{x:Math.round(t.x),y:Math.round(t.y),width:Math.round(t.width),height:Math.round(t.height)}}else throw new Error(`Annotation type is not supported for bounding box extraction: ${e.annotation_type}`)}const W4=(e,t)=>{const n=rf(e),i=rf(t),s=n.height*n.width;return i.height*i.width-s},Kz=e=>e.annotations===void 0?[]:e.annotations.filter(t=>t.annotation_type!=="classification").sort(W4),r0=$e(!1);function Uw(){const{settingsStore:e}=yu(),t=Zo(e,i=>i.key_hide_annotations||"v");return{isHidden:r0,handleKeyEvent:i=>{if(i.target instanceof HTMLInputElement||i.target instanceof HTMLTextAreaElement||i.target instanceof HTMLSelectElement)return;let s;t.subscribe(a=>{s=a})(),i.key===s&&r0.set(i.type==="keydown")}}}var U4=Z('<div class="annotation-label flex items-center justify-between text-sm text-white svelte-112wvhq"><span class="truncate text-sm"> </span></div>'),G4=Pr("<svg><!></svg>"),K4=Z("<div><div><!> <!></div></div>"),q4=Z('<div class="crop flex items-center justify-center rounded-lg bg-black svelte-112wvhq"><div class="text-xs text-gray-400">Loading...</div></div>');function Y4(e,t){var yt,at;ut(t,!0);const n=()=>Kt(b,"$customLabelColorsStore",s),i=()=>Kt(v,"$isHidden",s),[s,l]=pr();let a=k(t,"cachedDatasetVersion",3,""),c=k(t,"showLabel",3,!0),d=k(t,"selected",3,!1);const h=20,g=t.annotation.sample,{getDatasetVersion:p}=wi(),{isHidden:v}=Uw(),{customLabelColorsStore:b}=wv();let w=pt(_n(a())),S=pt(!!a());if(xs(async()=>{!a()&&t.annotation.annotation_id&&(O(w,await p(t.annotation.annotation_id.split("-")[0]),!0),O(S,!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:x,height:A,x:T,y:D}=rf(t.annotation),R=(at=(yt=t.annotation)==null?void 0:yt.instance_segmentation_details)==null?void 0:at.segmentation_mask,L=E(()=>Math.min(t.width/(x+h*2),t.height/(A+h*2)));function V(){return-(T-h)*f(L)+(t.width-(x+h*2)*f(L))/2}function M(){return-(D-h)*f(L)+(t.height-(A+h*2)*f(L))/2}let H=t.annotation.annotation_label.annotation_label_name;const j=E(()=>{var st;return((st=n()[H])==null?void 0:st.color)??Ui(H,1).color}),tt=E(()=>{var st;return(st=n()[H])==null||st.color,Ui(H,.4).color}),it=E(()=>{var st;return((st=n()[H])==null?void 0:st.alpha)??.4}),G=!!R,ot=E(V),Y=E(M),J=E(()=>`${Y0}/sample/${g.sample_id}${f(w)?`?v=${f(w)}`:""}`);var et=U(),rt=N(et);{var ht=st=>{var xt=K4();let Lt;var Wt=q(xt);let Bt;var de=q(Wt);{var Ut=Rt=>{var qt=U4(),ce=q(qt),ee=q(ce,!0);K(ce),K(qt),Mt(Yt=>{Mn(qt,Yt),me(ee,H)},[()=>`background-color: ${f(tt)??Ui(H,.4).color};`]),y(Rt,qt)};gt(de,Rt=>{c()&&Rt(Ut)})}var Et=nt(de,2);{var Ct=Rt=>{var qt=G4(),ce=q(qt);gx(ce,{get segmentation(){return R},get width(){return g.width},get colorFill(){return f(tt)},get opacity(){return f(it)}}),K(qt),Mt(()=>Pt(qt,"viewBox",`${T} ${D} ${x} ${A}`)),y(Rt,qt)};gt(Et,Rt=>{G&&Rt(Ct)})}K(Wt),K(xt),Mt((Rt,qt,ce)=>{Lt=Ln(xt,1,"crop rounded-lg bg-black svelte-112wvhq",null,Lt,Rt),Mn(xt,`
|
|
390
|
+
width: ${t.width}px;
|
|
391
|
+
height: ${t.height}px;
|
|
392
|
+
background-image: url("${f(J)}");
|
|
393
|
+
background-position: ${f(ot)}px ${f(Y)}px;
|
|
394
|
+
background-size: ${g.width*f(L)}px ${g.height*f(L)}px;
|
|
395
|
+
background-repeat: no-repeat;
|
|
396
|
+
`),Bt=Ln(Wt,1,"annotation-box svelte-112wvhq",null,Bt,qt),Mn(Wt,ce)},[()=>({"annotation-selected":d()}),()=>({invisible:i()}),()=>`
|
|
397
|
+
left: ${(t.width-x*f(L))/2}px;
|
|
398
|
+
top: ${(t.height-A*f(L))/2}px;
|
|
399
|
+
width: ${x*f(L)}px;
|
|
400
|
+
height: ${A*f(L)}px;
|
|
401
|
+
border-color: ${G?"transparent":f(j)??Ui(H).color};
|
|
402
|
+
background-color: ${G?"transparent":f(tt)??Ui(H,.4).color};
|
|
403
|
+
border-style: solid;
|
|
404
|
+
|
|
405
|
+
`]),y(st,xt)},bt=st=>{var xt=q4();Mt(()=>Mn(xt,`width: ${t.width}px; height: ${t.height}px;`)),y(st,xt)};gt(rt,st=>{f(S)?st(ht):st(bt,!1)})}y(e,et),dt(),l()}var X4=Z("<div><!></div>");function Z4(e,t){ut(t,!0);var n=X4(),i=q(n);ct(i,()=>t.children),K(n),Mt(s=>Ln(n,1,s),[()=>So(ie("rounded-lg border border-gray-800 bg-black",t.className))]),y(e,n),dt()}var j4=Z("<div><!></div>");function Q4(e,t){ut(t,!0);var n=j4(),i=q(n);ct(i,()=>t.children),K(n),Mt(s=>Ln(n,1,s),[()=>So(ie("p-4",t.className))]),y(e,n),dt()}var J4=Z(`<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 $4(e,t){ut(t,!0);let n=k(t,"ref",15,null),i=k(t,"value",15),s=k(t,"orientation",3,"horizontal"),l=wt(t,["$$slots","$$events","$$legacy","ref","value","orientation","class"]);var a=U(),c=N(a);{const d=(g,p)=>{let v=()=>p==null?void 0:p().thumbs;var b=J4(),w=N(b),S=q(w);At(S,()=>a5,(A,T)=>{T(A,{class:"bg-primary absolute data-[orientation='horizontal']:h-full data-[orientation='vertical']:w-full"})}),K(w);var x=nt(w,2);Wr(x,17,v,Uf,(A,T)=>{var D=U(),R=N(D);At(R,()=>c5,(L,V)=>{V(L,{get index(){return f(T)},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"})}),y(A,D)}),Mt(()=>Pt(w,"data-orientation",s())),y(g,b)};let h=E(()=>ie("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));At(c,()=>o5,(g,p)=>{p(g,Nt({get orientation(){return s()},get class(){return f(h)}},()=>l,{get ref(){return n()},set ref(v){n(v)},get value(){return i()},set value(v){i(v)},children:d,$$slots:{default:!0}}))})}y(e,a),dt()}const tD=mR,eD=wR,nD=_R,rD=e=>e;function Gw(e){const t=e-1;return t*t*t+1}function i0(e){const t=typeof e=="string"&&e.match(/^\s*(-?[\d.]+)([^\s]*)\s*$/);return t?[parseFloat(t[1]),t[2]||"px"]:[e,"px"]}function qz(e,{delay:t=0,duration:n=400,easing:i=rD}={}){const s=+getComputedStyle(e).opacity;return{delay:t,duration:n,easing:i,css:l=>`opacity: ${l*s}`}}function Kw(e,{delay:t=0,duration:n=400,easing:i=Gw,x:s=0,y:l=0,opacity:a=0}={}){const c=getComputedStyle(e),d=+c.opacity,h=c.transform==="none"?"":c.transform,g=d*(1-a),[p,v]=i0(s),[b,w]=i0(l);return{delay:t,duration:n,easing:i,css:(S,x)=>`
|
|
406
|
+
transform: ${h} translate(${(1-S)*p}${v}, ${(1-S)*b}${w});
|
|
407
|
+
opacity: ${d-g*x}`}}function iD(e,{delay:t=0,duration:n=400,easing:i=Gw,axis:s="y"}={}){const l=getComputedStyle(e),a=+l.opacity,c=s==="y"?"height":"width",d=parseFloat(l[c]),h=s==="y"?["top","bottom"]:["left","right"],g=h.map(A=>`${A[0].toUpperCase()}${A.slice(1)}`),p=parseFloat(l[`padding${g[0]}`]),v=parseFloat(l[`padding${g[1]}`]),b=parseFloat(l[`margin${g[0]}`]),w=parseFloat(l[`margin${g[1]}`]),S=parseFloat(l[`border${g[0]}Width`]),x=parseFloat(l[`border${g[1]}Width`]);return{delay:t,duration:n,easing:i,css:A=>`overflow: hidden;opacity: ${Math.min(A*20,1)*a};${c}: ${A*d}px;padding-${h[0]}: ${A*p}px;padding-${h[1]}: ${A*v}px;margin-${h[0]}: ${A*b}px;margin-${h[1]}: ${A*w}px;border-${h[0]}-width: ${A*S}px;border-${h[1]}-width: ${A*x}px;min-${c}: 0`}}var oD=Z('<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>'),sD=Z('<div class="mt-2"><!></div>'),aD=Z("<!> <!>",1);function qw(e,t){let n=pt(!0);const i=168;tD(e,{get open(){return f(n)},set open(s){O(n,s,!0)},children:(s,l)=>{var a=aD(),c=N(a);eD(c,{class:"w-full",children:(h,g)=>{var p=oD(),v=q(p),b=q(v),w=q(b);{var S=R=>{var L=U(),V=N(L);At(V,()=>t.icon,(M,H)=>{H(M,{})}),y(R,L)};gt(w,R=>{t.icon&&R(S)})}var x=nt(w,2),A=q(x,!0);K(x),K(b);var T=nt(b,2),D=q(T);{let R=E(()=>`transform: ${f(n)?"rotate(-180deg)":"rotate(0deg)"}`);Gf(D,{class:"transition-transform duration-168",get style(){return f(R)}})}K(T),K(v),K(p),Mt(()=>me(A,t.title)),y(h,p)},$$slots:{default:!0}});var d=nt(c,2);nD(d,{forceMount:!0,children:(h,g)=>{var p=U(),v=N(p);{var b=w=>{var S=sD(),x=q(S);ct(x,()=>t.children),K(S),Bp(3,S,()=>iD,()=>({duration:i})),y(w,S)};gt(v,w=>{f(n)&&w(b)})}y(h,p)},$$slots:{default:!0}}),y(s,a)},$$slots:{default:!0}})}function lD(e,t){ut(t,!0);let n=k(t,"ref",15,null),i=wt(t,["$$slots","$$events","$$legacy","ref","class"]);var s=U(),l=N(s);{let a=E(()=>ie("py-1.5 pl-8 pr-2 text-sm font-semibold",t.class));At(l,()=>u3,(c,d)=>{d(c,Nt({get class(){return f(a)}},()=>i,{get ref(){return n()},set ref(h){n(h)}}))})}y(e,s),dt()}var cD=Z('<span class="absolute left-2 flex size-3.5 items-center justify-center"><!></span> <!>',1);function Cp(e,t){ut(t,!0);let n=k(t,"ref",15,null),i=wt(t,["$$slots","$$events","$$legacy","ref","class","value","label","children"]);var s=U(),l=N(s);{const a=(d,h)=>{let g=()=>h==null?void 0:h().selected,p=()=>h==null?void 0:h().highlighted;var v=cD(),b=N(v),w=q(b);{var S=D=>{zp(D,{class:"size-4"})};gt(w,D=>{g()&&D(S)})}K(b);var x=nt(b,2);{var A=D=>{var R=U(),L=N(R);ct(L,()=>t.children,()=>({selected:g(),highlighted:p()})),y(D,R)},T=D=>{var R=Ee();Mt(()=>me(R,t.label||t.value)),y(D,R)};gt(x,D=>{t.children?D(A):D(T,!1)})}y(d,v)};let c=E(()=>ie("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));At(l,()=>s3,(d,h)=>{h(d,Nt({get value(){return t.value},get class(){return f(c)}},()=>i,{get ref(){return n()},set ref(g){n(g)},children:a,$$slots:{default:!0}}))})}y(e,s),dt()}function uD(e,t){ut(t,!0);let n=k(t,"ref",15,null),i=wt(t,["$$slots","$$events","$$legacy","ref","class"]);var s=U(),l=N(s);{let a=E(()=>ie("flex cursor-default items-center justify-center py-1",t.class));At(l,()=>b3,(c,d)=>{d(c,Nt({get class(){return f(a)}},()=>i,{get ref(){return n()},set ref(h){n(h)},children:(h,g)=>{XT(h,{class:"size-4"})},$$slots:{default:!0}}))})}y(e,s),dt()}function dD(e,t){ut(t,!0);let n=k(t,"ref",15,null),i=wt(t,["$$slots","$$events","$$legacy","ref","class"]);var s=U(),l=N(s);{let a=E(()=>ie("flex cursor-default items-center justify-center py-1",t.class));At(l,()=>p3,(c,d)=>{d(c,Nt({get class(){return f(a)}},()=>i,{get ref(){return n()},set ref(h){n(h)},children:(h,g)=>{Gf(h,{class:"size-4"})},$$slots:{default:!0}}))})}y(e,s),dt()}var fD=Z("<!> <!> <!>",1);function Yw(e,t){ut(t,!0);let n=k(t,"ref",15,null),i=k(t,"sideOffset",3,4),s=wt(t,["$$slots","$$events","$$legacy","ref","class","sideOffset","portalProps","children"]);var l=U(),a=N(l);At(a,()=>Pu,(c,d)=>{d(c,Nt(()=>t.portalProps,{children:(h,g)=>{var p=U(),v=N(p);{let b=E(()=>ie("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));At(v,()=>r3,(w,S)=>{S(w,Nt({get sideOffset(){return i()},get class(){return f(b)}},()=>s,{get ref(){return n()},set ref(x){n(x)},children:(x,A)=>{var T=fD(),D=N(T);uD(D,{});var R=nt(D,2);{let V=E(()=>ie("h-[var(--bits-select-anchor-height)] w-full min-w-[var(--bits-select-anchor-width)] p-1"));At(R,()=>f3,(M,H)=>{H(M,{get class(){return f(V)},children:(j,tt)=>{var it=U(),G=N(it);ct(G,()=>t.children??St),y(j,it)},$$slots:{default:!0}})})}var L=nt(R,2);dD(L,{}),y(x,T)},$$slots:{default:!0}}))})}y(h,p)},$$slots:{default:!0}}))}),y(e,l),dt()}var hD=Z("<!> <!>",1);function Xw(e,t){ut(t,!0);let n=k(t,"ref",15,null),i=wt(t,["$$slots","$$events","$$legacy","ref","class","children"]);var s=U(),l=N(s);{let a=E(()=>ie("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));At(l,()=>qM,(c,d)=>{d(c,Nt({get class(){return f(a)}},()=>i,{get ref(){return n()},set ref(h){n(h)},children:(h,g)=>{var p=hD(),v=N(p);ct(v,()=>t.children??St);var b=nt(v,2);Gf(b,{class:"size-4 opacity-50"}),y(h,p)},$$slots:{default:!0}}))})}y(e,s),dt()}const Zw=GM,gD=l3;function o0(e,t){ut(t,!0);let n=k(t,"ref",15,null),i=wt(t,["$$slots","$$events","$$legacy","ref","class"]);var s=U(),l=N(s);{let a=E(()=>ie("ring-offset-background focus-visible:ring-ring mt-2 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2",t.class));At(l,()=>B5,(c,d)=>{d(c,Nt({get class(){return f(a)}},()=>i,{get ref(){return n()},set ref(h){n(h)}}))})}y(e,s),dt()}function pD(e,t){ut(t,!0);let n=k(t,"ref",15,null),i=wt(t,["$$slots","$$events","$$legacy","ref","class"]);var s=U(),l=N(s);{let a=E(()=>ie("bg-muted text-muted-foreground inline-flex h-10 items-center justify-center rounded-md p-1",t.class));At(l,()=>V5,(c,d)=>{d(c,Nt({get class(){return f(a)}},()=>i,{get ref(){return n()},set ref(h){n(h)}}))})}y(e,s),dt()}function s0(e,t){ut(t,!0);let n=k(t,"ref",15,null),i=wt(t,["$$slots","$$events","$$legacy","ref","class"]);var s=U(),l=N(s);{let a=E(()=>ie("ring-offset-background focus-visible:ring-ring data-[state=active]:bg-background data-[state=active]:text-foreground inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:shadow-sm",t.class));At(l,()=>W5,(c,d)=>{d(c,Nt({get class(){return f(a)}},()=>i,{get ref(){return n()},set ref(h){n(h)}}))})}y(e,s),dt()}const vD=D5,mD=yv({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 bD=Z("<div><!></div>");function Yz(e,t){ut(t,!0);let n=k(t,"ref",15,null),i=k(t,"variant",3,"default"),s=wt(t,["$$slots","$$events","$$legacy","ref","class","variant","children"]);var l=bD();Vt(l,c=>({class:c,...s,role:"alert"}),[()=>ie(mD({variant:i()}),t.class)]);var a=q(l);ct(a,()=>t.children??St),K(l),yn(l,c=>n(c),()=>n()),y(e,l),dt()}function _D(e,t){ut(t,!0);let n=k(t,"ref",15,null),i=k(t,"class",7),s=wt(t,["$$slots","$$events","$$legacy","ref","class"]);var l={get class(){return i()},set class(d){i(d)}},a=U(),c=N(a);{let d=E(()=>ie("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()));At(c,()=>My,(h,g)=>{g(h,Nt({get class(){return f(d)}},()=>s,{get ref(){return n()},set ref(p){n(p)}}))})}return y(e,a),dt(l)}const yD=yv({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 wD=Z('<!> <span class="sr-only">Close</span>',1),xD=Z("<!> <!>",1),SD=Z("<!> <!>",1);function Xz(e,t){ut(t,!0);let n=k(t,"ref",15,null),i=k(t,"side",3,"right"),s=wt(t,["$$slots","$$events","$$legacy","ref","class","side","portalProps","children"]);var l=U(),a=N(l);At(a,()=>Pu,(c,d)=>{d(c,Nt(()=>t.portalProps,{children:(h,g)=>{var p=SD(),v=N(p);_D(v,{});var b=nt(v,2);{let w=E(()=>ie(yD({side:i()}),t.class));At(b,()=>vw,(S,x)=>{x(S,Nt({get class(){return f(w)}},()=>s,{get ref(){return n()},set ref(A){n(A)},children:(A,T)=>{var D=xD(),R=N(D);ct(R,()=>t.children??St);var L=nt(R,2);At(L,()=>pw,(V,M)=>{M(V,{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:(H,j)=>{var tt=wD(),it=N(tt);Vp(it,{class:"size-4"}),te(2),y(H,tt)},$$slots:{default:!0}})}),y(A,D)},$$slots:{default:!0}}))})}y(h,p)},$$slots:{default:!0}}))}),y(e,l),dt()}var CD=Z('<div class="size-3.5"></div>'),AD=Z('<div class="flex size-4 items-center justify-center text-current"><!></div>');function jw(e,t){ut(t,!0);let n=k(t,"ref",15,null),i=k(t,"checked",15,!1),s=k(t,"indeterminate",15,!1),l=wt(t,["$$slots","$$events","$$legacy","ref","checked","indeterminate","class"]);var a=U(),c=N(a);{const d=(g,p)=>{let v=()=>p==null?void 0:p().checked,b=()=>p==null?void 0:p().indeterminate;var w=AD(),S=q(w);{var x=T=>{var D=U(),R=N(D);b_(R,()=>m_(()=>import("./BzYRexN9.js"),__vite__mapDeps([0,1,2,3,4,5,6,7]),import.meta.url),null,(L,V)=>{var M=E(()=>{var{default:it}=f(V);return{Minus:it}}),H=E(()=>f(M).Minus),j=U(),tt=N(j);At(tt,()=>f(H),(it,G)=>{G(it,{class:"size-3.5"})}),y(L,j)}),y(T,D)},A=T=>{var D=U(),R=N(D);{var L=M=>{var H=U(),j=N(H);b_(j,()=>m_(()=>Promise.resolve().then(()=>sE),void 0,import.meta.url),null,(tt,it)=>{var G=E(()=>{var{default:et}=f(it);return{Check:et}}),ot=E(()=>f(G).Check),Y=U(),J=N(Y);At(J,()=>f(ot),(et,rt)=>{rt(et,{class:"size-3.5"})}),y(tt,Y)}),y(M,H)},V=M=>{var H=CD();y(M,H)};gt(R,M=>{v()?M(L):M(V,!1)},!0)}y(T,D)};gt(S,T=>{b()?T(x):T(A,!1)})}K(w),y(g,w)};let h=E(()=>ie("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));At(c,()=>sR,(g,p)=>{p(g,Nt({get class(){return f(h)}},()=>l,{get ref(){return n()},set ref(v){n(v)},get checked(){return i()},set checked(v){i(v)},get indeterminate(){return s()},set indeterminate(v){s(v)},children:d,$$slots:{default:!0}}))})}y(e,a),dt()}function Gi(e,t){ut(t,!0);let n=k(t,"ref",15,null),i=wt(t,["$$slots","$$events","$$legacy","ref","class"]);var s=U(),l=N(s);{let a=E(()=>ie("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70",t.class));At(l,()=>HM,(c,d)=>{d(c,Nt({get class(){return f(a)}},()=>i,{get ref(){return n()},set ref(h){n(h)}}))})}y(e,s),dt()}var PD=Z('<div class="text-xs text-muted-foreground"> </div>'),kD=Z('<div class="flex flex-col gap-2"><div class="flex gap-2"><!> <!></div> <!></div>');function TD(e,t){const n=k(t,"isChecked",3,!1),i=k(t,"disabled",3,!1);var s=kD(),l=q(s),a=q(l);{let g=E(()=>`${t.name}-label`);jw(a,{get id(){return t.name},get"aria-labelledby"(){return f(g)},get checked(){return n()},get onCheckedChange(){return t.onCheckedChange},get disabled(){return i()}})}var c=nt(a,2);{let g=E(()=>`${t.name}-label`);Gi(c,{get id(){return f(g)},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:(p,v)=>{te();var b=Ee();Mt(()=>me(b,t.label)),y(p,b)},$$slots:{default:!0}})}K(l);var d=nt(l,2);{var h=g=>{var p=PD(),v=q(p,!0);K(p),Mt(()=>me(v,t.helperText)),y(g,p)};gt(d,g=>{t.helperText&&g(h)})}K(s),y(e,s)}var ED=Z("<input/>"),ID=Z("<input/>");function OD(e,t){ut(t,!0);let n=k(t,"ref",15,null),i=k(t,"value",15),s=k(t,"files",15),l=wt(t,["$$slots","$$events","$$legacy","ref","value","type","files","class"]);var a=U(),c=N(a);{var d=g=>{var p=ED();Vt(p,v=>({class:v,type:"file",...l}),[()=>ie("border-input bg-background ring-offset-background placeholder:text-muted-foreground focus-visible:ring-ring flex h-10 w-full rounded-md border px-3 py-2 text-base file:border-0 file:bg-transparent file:text-sm file:font-medium focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",t.class)],void 0,void 0,!0),yn(p,v=>n(v),()=>n()),HT(p,s),Zd(p,i),y(g,p)},h=g=>{var p=ID();Vt(p,v=>({class:v,type:t.type,...l}),[()=>ie("border-input bg-background ring-offset-background placeholder:text-muted-foreground focus-visible:ring-ring flex h-10 w-full rounded-md border px-3 py-2 text-base file:border-0 file:bg-transparent file:text-sm file:font-medium focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",t.class)],void 0,void 0,!0),yn(p,v=>n(v),()=>n()),Zd(p,i),y(g,p)};gt(c,g=>{t.type==="file"?g(d):g(h,!1)})}y(e,a),dt()}const Pd=$e(!1);function ih(){return{error:$e(null),isCreateClassifiersPanelOpen:Pd,openCreateClassifiersPanel:()=>Pd.set(!0),closeCreateClassifiersPanel:()=>{Pd.set(!1)},toggleCreateClassifiersPanel:()=>Pd.update(t=>!t)}}const Fg=$e(null),Bg=$e(new Set);function oh(){return{classifierSamples:Fg,classifierSelectedSampleIds:Bg,setClassifierSamples:s=>{Fg.set(s)},clearClassifierSamples:()=>{Fg.set(null)},toggleClassifierSampleSelection:s=>{Bg.update(l=>(l.has(s)?l.delete(s):l.add(s),l))},clearClassifierSelectedSamples:()=>{Bg.update(s=>(s.clear(),s))}}}const kd=$e(!1),zg=$e(null),a0=$e(null),l0=$e(null),c0=$e(null);function sh(){return{isRefineClassifiersPanelOpen:kd,currentMode:zg,currentClassifierName:a0,currentClassifierId:l0,currentClassifierClasses:c0,openRefineClassifiersPanel:(t,n,i,s)=>{zg.set(t),kd.set(!0),l0.set(n),a0.set(i),c0.set(s)},closeRefineClassifiersPanel:()=>{zg.set(null),kd.set(!1)},toggleRefineClassifiersPanel:()=>{kd.update(t=>!t)}}}const{selectedSampleIds:RD}=wi(),Vg=$e(new Set);function ND(){const e=$e(null),t=$e(!1),n=async(h,g)=>{try{e.set(null);const p=await Dr.POST("/api/classifiers/{classifier_id}/save_classifier_to_file/{export_type}",{params:{path:{classifier_id:h,export_type:g}},responseType:"arraybuffer",headers:{Accept:"application/octet-stream"},parseAs:"blob"}),v=p.response.headers.get("content-disposition"),b=v==null?void 0:v.match(/filename="(.+)"/),w=(b==null?void 0:b[1])??`classifier_${h}.pkl`;if(!p.data)return e.set(new Error("No data received from the server")),Promise.reject("No data received from the server");b4(w,p.data)}catch(p){throw e.set(p),p}},i=async h=>{var v;e.set(null);const g=h.target,p=(v=g.files)==null?void 0:v[0];if(!p){e.set(new Error("No file selected"));return}try{const b=new FormData;b.append("file",p),await Dr.POST("/api/classifiers/load_classifier_from_buffer",{body:b,headers:{Accept:"application/json"}}),g.value=""}catch(b){throw e.set(b),b}},s=async(h,g)=>{try{e.set(null),await Dr.POST("/api/classifiers/{classifier_id}/update_annotations",{params:{path:{classifier_id:h}},body:g})}catch(p){throw e.set(p),p}},l=async h=>{try{e.set(null),await Dr.POST("/api/classifiers/{classifier_id}/train_classifier",{params:{path:{classifier_id:h}}})}catch(g){throw e.set(g),g}};async function a(){const h=Pn(RD),g=Array.from(h),p=Qi.params.dataset_id;e.set(null);try{const v=await Dr.POST("/api/classifiers/get_negative_samples",{body:{dataset_id:p.toString(),positive_sample_ids:g}});return v.data?{positiveSampleIds:g,negativeSampleIds:v.data.negative_sample_ids}:(e.set(new Error("Failed to prepare samples")),Promise.reject("Failed to prepare samples"))}catch(v){return e.set(v),Promise.reject(v)}}return{error:e,isLoading:t,classifiersSelected:Vg,saveClassifier:n,loadClassifier:i,updateAnnotations:s,trainClassifier:l,prepareSamples:a,classifierSelectionToggle:h=>{Vg.update(g=>(g.has(h)?g.delete(h):g.add(h),new Set([...g])))},clearClassifiersSelected:()=>{Vg.set(new Set)}}}const{classifiers:ea}=wi(),{classifierSamples:u0,setClassifierSamples:Td,clearClassifierSamples:MD,classifierSelectedSampleIds:d0,clearClassifierSelectedSamples:Ed,toggleClassifierSampleSelection:Hg}=oh();function xv(){const e=ND(),t=$e(null),n=$e(!1),i=$e(!1),{openRefineClassifiersPanel:s,closeRefineClassifiersPanel:l}=sh(),{toggleCreateClassifiersPanel:a,closeCreateClassifiersPanel:c}=ih(),d=async()=>{var V;if(!Pn(n)){t.set(null),n.set(!0);try{const M=await Dr.GET("/api/classifiers/get_all_classifiers");(V=M.data)!=null&&V.classifiers?ea.set(M.data.classifiers):ea.set([])}catch(M){t.set(M)}finally{n.set(!1)}}};Pn(i)||(d(),i.set(!0));async function h(){t.set(null);try{const V=await e.prepareSamples();Td({positiveSampleIds:V.positiveSampleIds,negativeSampleIds:V.negativeSampleIds}),Ed(),V.positiveSampleIds.forEach(M=>{Hg(M)}),a(),t.set(null)}catch(V){t.set(V)}}async function g(V){try{if(t.set(null),!V.dataset_id)throw new Error("Dataset ID is required");const M=await Dr.POST("/api/classifiers/create",{body:{name:V.name,class_list:V.class_list,dataset_id:V.dataset_id.toString()}});if(!M.data)return t.set(Error("Failed to create classifier.")),Promise.reject("Failed to create classifier.");const H=Pn(u0),j=H?[...H.positiveSampleIds,...H.negativeSampleIds]:[],tt=Array.from(Pn(d0)),it=j.filter(ot=>!tt.includes(ot)),G={annotations:{positive:tt,negative:it}};return await e.updateAnnotations(M.data.classifier_id,G),await e.trainClassifier(M.data.classifier_id),await b(M.data.classifier_id,V.dataset_id.toString(),V.class_list),s("temp",M.data.classifier_id,M.data.name,V.class_list),c(),M.data}catch(M){return t.set(M),Promise.reject(M)}}const p=async()=>{var V;try{n.set(!0),t.set(null);const M=Array.from(Pn(e.classifiersSelected));for(const H of M){const j=Pn(ea).find(tt=>tt.classifier_id===H);if(j){const tt=((V=j.class_list)==null?void 0:V.map(it=>`${j.classifier_name}_${it}`))||[];await Dr.POST("/api/classifiers/{classifier_id}/run_on_dataset/{dataset_id}",{params:{path:{classifier_id:H,dataset_id:Qi.params.dataset_id}}}),Ur.success(`Classifier "${j.classifier_name}" completed successfully. New labels added: ${tt.join(", ")}. Annotations have been added to your dataset.`,{duration:1e4})}}n.set(!1)}catch(M){n.set(!1),t.set(M),Ur.error("Failed to run classifiers: "+M.message)}},v=async V=>{try{t.set(null),await Dr.POST("/api/classifiers/{classifier_id}/commit_temp_classifier",{params:{path:{classifier_id:V}}}),await d(),Pn(ea).find(H=>H.classifier_id===V)||t.set(Error("Failed to create classifier."))}catch(M){t.set(M);return}MD(),l()},b=async(V,M,H)=>{var j;try{t.set(null);const tt=await Dr.GET("/api/classifiers/{classifier_id}/samples_to_refine",{params:{path:{classifier_id:V},query:{dataset_id:M}}});if(!((j=tt.data)!=null&&j.samples)){Td({positiveSampleIds:[],negativeSampleIds:[]}),Ed();return}const it=tt.data.samples,G=Object.keys(it);if(G.length!==2){t.set(new Error("Invalid samples response structure"));return}if(!H.every(Y=>G.includes(Y))){t.set(new Error(`Invalid class names. Expected classes: ${G.join(", ")}`));return}const ot={positiveSampleIds:it[H[0]]||[],negativeSampleIds:it[H[1]]||[]};Ed(),ot.positiveSampleIds.forEach(Y=>{Hg(Y)}),Td(ot)}catch(tt){return t.set(tt),Promise.reject(tt)}};async function w(V,M,H,j,tt){try{t.set(null),await b(M,tt,j),s("existing",M,H,j)}catch(it){t.set(it)}}async function S(V,M,H){try{t.set(null);const j=Pn(u0),tt=j?[...j.positiveSampleIds,...j.negativeSampleIds]:[],it=Array.from(Pn(d0)),G=tt.filter(Y=>!it.includes(Y)),ot={annotations:{positive:it,negative:G}};await e.updateAnnotations(V,ot),await e.trainClassifier(V),await b(V,M,H)}catch(j){t.set(j)}}async function x(V,M,H,j){var tt;try{if(t.set(null),j){const G=(tt=(await xT({path:{classifier_id:V}})).data)==null?void 0:tt.samples;if(!G){t.set(new Error("No samples data received"));return}const ot=Object.keys(G);if(ot.length!==2){t.set(new Error("Invalid samples response structure"));return}if(!H.every(J=>ot.includes(J))){t.set(new Error(`Invalid class names. Expected classes: ${ot.join(", ")}`));return}const Y={positiveSampleIds:G[H[0]]||[],negativeSampleIds:G[H[1]]||[]};Ed(),Y.positiveSampleIds.forEach(J=>{Hg(J)}),Td(Y)}else await b(V,M,H)}catch(it){t.set(it)}}const A=async()=>{try{return t.set(null),await e.prepareSamples()}catch(V){throw t.set(V),V}},T=async(V,M)=>{try{t.set(null),await e.saveClassifier(V,M)}catch(H){throw t.set(H),H}},D=async V=>{try{t.set(null),await e.loadClassifier(V),d()}catch(M){throw t.set(M),M}},R=async(V,M)=>{try{t.set(null),await e.updateAnnotations(V,M)}catch(H){throw t.set(H),H}},L=async V=>{try{t.set(null),await e.trainClassifier(V)}catch(M){throw t.set(M),M}};return{classifiers:_d(ea),createClassifier:g,loadClassifiers:d,classifiersSelected:_d(e.classifiersSelected),classifierSelectionToggle:e.classifierSelectionToggle,clearClassifiersSelected:e.clearClassifiersSelected,apply:p,saveClassifier:T,updateAnnotations:R,trainClassifier:L,commitTempClassifier:v,getSamplesToRefine:b,prepareSamples:A,loadClassifier:D,startCreateClassifier:h,isLoading:_d(n),startRefinment:w,showClassifierTrainingSamples:x,refineClassifier:S,error:_d(t)}}const LD=e=>{const t=["readSamplesInfinite",e.dataset_id,e.mode,e.mode==="normal"?e.filters:e.classifierSamples,{metadata_values:e.metadata_values,text_embedding:e.text_embedding}];return IT({queryKey:t,queryFn:async({pageParam:n=0,signal:i})=>{const s=DD(e,n),{data:l}=await ST({path:{dataset_id:e.dataset_id},body:s,signal:i,throwOnError:!0});return l},initialPageParam:0,getNextPageParam:n=>n.nextCursor??void 0,enabled:FD(e)})},DD=(e,t)=>{var i,s,l;const n={pagination:{offset:t,limit:100},text_embedding:e.text_embedding,filters:{metadata_filters:e.metadata_values?j0(e.metadata_values):void 0}};if(e.mode==="classifier"&&e.classifierSamples){const a=[...e.classifierSamples.positiveSampleIds,...e.classifierSamples.negativeSampleIds];return{...n,sample_ids:a}}else if(e.mode==="normal"&&e.filters)return{...n,filters:{...n.filters,annotation_label_ids:(i=e.filters.annotation_label_ids)!=null&&i.length?e.filters.annotation_label_ids:void 0,tag_ids:(s=e.filters.tag_ids)!=null&&s.length?e.filters.tag_ids:void 0,width:e.filters.dimensions?{min:e.filters.dimensions.min_width,max:e.filters.dimensions.max_width}:void 0,height:e.filters.dimensions?{min:e.filters.dimensions.min_height,max:e.filters.dimensions.max_height}:void 0,sample_ids:(l=e.filters.sample_ids)!=null&&l.length?e.filters.sample_ids:void 0}};return n},FD=e=>e.mode==="classifier"?!!e.classifierSamples:!0,Qw=e=>{const t=LD(e),n=ry(t),i=wu();return{samples:n,refresh:()=>{i.invalidateQueries({queryKey:t.queryKey})}}},BD=(e,t)=>{const n=e.currentTarget.dataset.sampleId;t(n)},zD=(e,t)=>{e.preventDefault();const n=e.currentTarget.dataset.sampleId;t(n)},VD=(e,t)=>{if(e.key==="Enter"||e.key===" "){e.preventDefault();const n=e.currentTarget.dataset.sampleId;t(n)}};var HD=Z('<div class="flex h-full w-full items-center justify-center"><div class="text-sm text-muted-foreground">Loading samples...</div></div>'),WD=Z('<div class="flex h-full w-full items-center justify-center"><div class="text-sm text-muted-foreground">Error loading samples</div></div>'),UD=Z('<div class="flex h-full w-full items-center justify-center"><div class="text-center text-muted-foreground"><div class="mb-2 text-sm font-medium">No samples available</div> <div class="text-xs">No samples found for this classifier.</div></div></div>'),GD=Z('<div data-testid="classifier-sample-grid-item" role="button" tabindex="0"><div class="absolute inset-0 z-10"><!></div> <!></div>'),KD=Z('<div class="flex h-full w-full items-center justify-center"><div class="text-sm text-muted-foreground">No samples to display</div></div>'),qD=Z('<div class="viewport h-full w-full svelte-1mo6ri0"><!></div>');function Jw(e,t){ut(t,!0);const n=()=>Kt(d,"$classifierSamples",a),i=()=>Kt(f(w),"$infiniteSamples",a),s=()=>Kt(p,"$gridViewSampleRenderingStore",a),l=()=>Kt(h,"$classifierSelectedSampleIds",a),[a,c]=pr(),{classifierSamples:d,classifierSelectedSampleIds:h,toggleClassifierSampleSelection:g}=oh(),{gridViewSampleRenderingStore:p}=yu(),v=E(()=>({dataset_id:t.dataset_id,mode:"classifier",classifierSamples:n()||void 0})),b=E(()=>Qw(f(v))),w=E(()=>f(b).samples),S=E(()=>i()&&i().data&&n()&&(n().positiveSampleIds.length>0||n().negativeSampleIds.length>0)?i().data.pages.flatMap(it=>it.data):[]);let x=pt(null),A=_n(s()),T=pt(400);const D=160,R=160,L=6;be(()=>{if(f(x)){const it=new ResizeObserver(G=>{for(const ot of G)O(T,Math.max(ot.contentRect.height,200),!0)});return it.observe(f(x)),()=>it.disconnect()}});function V(it){g(it)}var M=U(),H=N(M);{var j=it=>{var G=HD();y(it,G)},tt=it=>{var G=U(),ot=N(G);{var Y=et=>{var rt=WD();y(et,rt)},J=et=>{var rt=U(),ht=N(rt);{var bt=at=>{var st=UD();y(at,st)},yt=at=>{var st=qD(),xt=q(st);{var Lt=Bt=>{{const de=(Ut,Et)=>{let Ct=()=>Et==null?void 0:Et().index,Rt=()=>Et==null?void 0:Et().style;var qt=U(),ce=N(qt);bi(ce,()=>i().dataUpdatedAt,ee=>{var Yt=U(),_e=N(Yt);{var he=Be=>{var Ot=GD();let Ht;Ot.__click=[BD,V],Ot.__dblclick=[zD,V],Ot.__keydown=[VD,V];var $t=q(Ot),ye=q($t);{let Xt=E(()=>l().has(f(S)[Ct()].sample_id));Pv(ye,{onSelect:()=>{},get isSelected(){return f(Xt)}})}K($t);var zt=nt($t,2);px(zt,{get sample(){return f(S)[Ct()]},get objectFit(){return A}}),K(Ot),Mt(Xt=>{Ht=Ln(Ot,1,"relative cursor-pointer svelte-1mo6ri0",null,Ht,Xt),Mn(Ot,Rt()),Pt(Ot,"data-sample-id",f(S)[Ct()].sample_id),Pt(Ot,"data-sample-name",f(S)[Ct()].file_name),Pt(Ot,"data-index",Ct()),Pt(Ot,"aria-label",`Select sample: ${f(S)[Ct()].file_name}`)},[()=>({"sample-selected":l().has(f(S)[Ct()].sample_id)})]),y(Be,Ot)};gt(_e,Be=>{f(S)[Ct()]&&Be(he)})}y(ee,Yt)}),y(Ut,qt)};Wp(Bt,{get itemCount(){return f(S).length},itemHeight:R+L,itemWidth:D+L,get height(){return f(T)},class:"overflow-none overflow-y-auto dark:[color-scheme:dark]",style:"--sample-width: 160px; --sample-height: 160px;",overScan:5,item:de,$$slots:{item:!0}})}},Wt=Bt=>{var de=KD();y(Bt,de)};gt(xt,Bt=>{f(S).length>0?Bt(Lt):Bt(Wt,!1)})}K(st),yn(st,Bt=>O(x,Bt),()=>f(x)),y(at,st)};gt(ht,at=>{i().isSuccess&&f(S).length===0?at(bt):at(yt,!1)},!0)}y(et,rt)};gt(ot,et=>{i().isError?et(Y):et(J,!1)},!0)}y(it,G)};gt(H,it=>{i().isPending?it(j):it(tt,!1)})}y(e,M),dt(),c()}kr(["click","dblclick","keydown"]);function YD(){const{clearClassifierSamples:e,clearClassifierSelectedSamples:t}=oh(),{closeCreateClassifiersPanel:n}=ih();e(),t(),n()}function XD(){const{clearClassifierSelectedSamples:e}=oh(),{clearSelectedSamples:t}=wi(),{closeRefineClassifiersPanel:n}=sh(),i=Lp("refine_classifier_show_training_samples",!1);t(),e(),i.set(!1),n()}async function ZD(e,t,n,i,s,l,a){if(e.preventDefault(),!(!f(t)||f(n))){O(n,!0),O(i,null);try{await s({name:f(l),class_list:["positive","negative"],dataset_id:a}),O(l,"")}catch(c){O(i,c instanceof Error?c.message:String(c),!0)}finally{O(n,!1)}}}var jD=Z("<!> Create Classifier",1),QD=Z("<!> <!>",1),JD=Z('<button type="button" class="inline-flex h-10 flex-shrink-0 items-center justify-center whitespace-nowrap rounded-md border border-input bg-background px-4 py-2 text-sm font-medium ring-offset-background transition-colors hover:bg-accent hover:text-accent-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50" data-testid="classifier-dialog-cancel">Cancel</button> <button type="button" class="inline-flex h-10 flex-shrink-0 items-center justify-center whitespace-nowrap rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground ring-offset-background transition-colors hover:bg-primary/90 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50" data-testid="classifier-dialog-submit"> </button>',1),$D=Z('<!> <div class="grid gap-4 py-4"><!> <div class="flex items-center gap-4"><!> <!></div></div> <div class="flex min-h-0 flex-1 flex-col border-t pt-4"><h3 class="mb-4 text-lg font-semibold">Select Positive Examples</h3> <div class="min-h-0 w-full flex-1 overflow-y-auto rounded-lg border dark:[color-scheme:dark]"><!></div></div> <!>',1),tF=Z("<!> <!>",1);function Zz(e,t){ut(t,!0);const n=()=>Kt(l,"$isCreateClassifiersPanelOpen",i),[i,s]=pr(),{isCreateClassifiersPanelOpen:l}=ih(),{createClassifier:a}=xv();let c=pt(""),d=Qi.params.dataset_id,h=pt(!1),g=pt(null);const p=E(()=>f(c).trim().length>0);function v(){O(c,""),YD(),O(g,null)}var b=U(),w=N(b);At(w,()=>nh,(S,x)=>{x(S,{onOpenChange:A=>!A&&v(),get open(){return Yo(),n()},set open(A){qo(l,A)},children:(A,T)=>{var D=U(),R=N(D);At(R,()=>rh,(L,V)=>{V(L,{children:(M,H)=>{var j=tF(),tt=N(j);At(tt,()=>th,(G,ot)=>{ot(G,{})});var it=nt(tt,2);At(it,()=>eh,(G,ot)=>{ot(G,{class:"h-[90vh] overflow-y-auto border-border bg-background dark:[color-scheme:dark] sm:max-h-[90vh] sm:max-w-[800px]",children:(Y,J)=>{var et=$D(),rt=N(et);At(rt,()=>$f,(Ut,Et)=>{Et(Ut,{children:(Ct,Rt)=>{var qt=QD(),ce=N(qt);At(ce,()=>Jf,(Yt,_e)=>{_e(Yt,{class:"flex items-center gap-2 text-foreground",children:(he,Be)=>{var Ot=jD(),Ht=N(Ot);la(Ht,{class:"size-5"}),te(),y(he,Ot)},$$slots:{default:!0}})});var ee=nt(ce,2);At(ee,()=>pv,(Yt,_e)=>{_e(Yt,{class:"text-foreground",children:(he,Be)=>{te();var Ot=Ee(`Create a new few-shot classifier providing positive and negative examples.
|
|
408
|
+
Selected samples are considered positive examples and unselected samples are
|
|
409
|
+
considered negative examples.`);y(he,Ot)},$$slots:{default:!0}})}),y(Ct,qt)},$$slots:{default:!0}})});var ht=nt(rt,2),bt=q(ht);{var yt=Ut=>{Hp(Ut,{title:"Failed to create classifier",children:(Et,Ct)=>{te();var Rt=Ee();Mt(()=>me(Rt,f(g))),y(Et,Rt)}})};gt(bt,Ut=>{f(g)&&Ut(yt)})}var at=nt(bt,2),st=q(at);Gi(st,{for:"classifier-name",class:"whitespace-nowrap text-left text-foreground",children:(Ut,Et)=>{te();var Ct=Ee("Classifier Name");y(Ut,Ct)},$$slots:{default:!0}});var xt=nt(st,2);OD(xt,{id:"classifier-name",type:"text",class:"flex-1",placeholder:"Enter classifier name",required:!0,"data-testid":"classifier-name-input",get value(){return f(c)},set value(Ut){O(c,Ut,!0)}}),K(at),K(ht);var Lt=nt(ht,2),Wt=nt(q(Lt),2),Bt=q(Wt);Jw(Bt,{get dataset_id(){return d}}),K(Wt),K(Lt);var de=nt(Lt,2);At(de,()=>gv,(Ut,Et)=>{Et(Ut,{class:"flex flex-nowrap gap-4",children:(Ct,Rt)=>{var qt=JD(),ce=N(qt);ce.__click=v;var ee=nt(ce,2);ee.__click=[ZD,p,h,g,a,c,d];var Yt=q(ee,!0);K(ee),Mt(()=>{ce.disabled=f(h),ee.disabled=!f(p)||f(h),me(Yt,f(h)?"Creating...":"Create Classifier")}),y(Ct,qt)},$$slots:{default:!0}})}),y(Y,et)},$$slots:{default:!0}})}),y(M,j)},$$slots:{default:!0}})}),y(A,D)},$$slots:{default:!0}})}),y(e,b),dt(),s()}kr(["click"]);function Ap(e,t){ut(t,!0);let n=k(t,"ref",15,null),i=k(t,"checked",15,!1),s=wt(t,["$$slots","$$events","$$legacy","ref","checked","class"]);var l=U(),a=N(l);{let c=E(()=>ie("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));At(a,()=>w5,(d,h)=>{h(d,Nt({get class(){return f(c)}},()=>s,{get ref(){return n()},set ref(g){n(g)},get checked(){return i()},set checked(g){i(g)},children:(g,p)=>{var v=U(),b=N(v);{let w=E(()=>ie("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"));At(b,()=>S5,(S,x)=>{x(S,{get class(){return f(w)}})})}y(g,v)},$$slots:{default:!0}}))})}y(e,l),dt()}const Wg=$e(!1),Ug=$e("create"),Gg=$e(null);function $w(){return{isDropdownOpen:Wg,activeTab:Ug,scrollToClassifierId:Gg,openClassifiersMenu:()=>{Wg.set(!0)},closeClassifiersMenu:()=>{Wg.set(!1)},switchToManageTab:()=>{Ug.set("manage")},switchToCreateTab:()=>{Ug.set("create")},scrollToAndSelectClassifier:l=>{Gg.set(l),setTimeout(()=>{Gg.set(null)},100)}}}var eF=Z("<!> ",1),nF=Z('You are refining classifier: <span class="font-medium"> </span>',1),rF=Z("<!> <!>",1),iF=(e,t)=>O(t,!f(t)),oF=Z(`<li>Once satisfied with the results, click "Save Classifier" to
|
|
410
|
+
save permanently.</li>`),sF=Z(`<ol class="mt-2 list-inside list-decimal space-y-2 text-sm text-muted-foreground"><li>Select positive examples from the samples below. Not selected
|
|
411
|
+
samples are considered negative examples.</li> <li>Click "Refine Classifier" to add your selections to the
|
|
412
|
+
classifier training data and retrain.</li> <!></ol>`),aF=Z('<button type="button" class="inline-flex h-10 flex-shrink-0 items-center justify-center whitespace-nowrap rounded-md border border-input bg-background px-4 py-2 text-sm font-medium ring-offset-background transition-colors hover:bg-accent hover:text-accent-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50" data-testid="commit-temp-classifier-button"> </button>'),lF=Z('<div class="flex items-center gap-4"><!> <!></div> <div class="flex flex-nowrap gap-2"><!> <button type="button" class="inline-flex h-10 flex-shrink-0 items-center justify-center whitespace-nowrap rounded-md border border-input bg-background px-4 py-2 text-sm font-medium ring-offset-background transition-colors hover:bg-accent hover:text-accent-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50" data-testid="refine-dialog-cancel"><!></button> <button type="button" class="inline-flex h-10 flex-shrink-0 items-center justify-center whitespace-nowrap rounded-md bg-primary px-4 py-2 text-sm font-medium text-primary-foreground ring-offset-background transition-colors hover:bg-primary/90 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50" data-testid="refine-classifier-button"> </button></div>',1),cF=Z('<!> <div class="grid gap-4 py-4"><!> <div class="space-y-4"><div><button type="button" class="flex w-full items-center justify-between text-left"><h3 class="text-lg font-semibold">Refinement Instructions</h3> <svg fill="none" stroke="currentColor" viewBox="0 0 24 24"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M19 9l-7 7-7-7"></path></svg></button> <!></div></div></div> <div class="flex min-h-0 flex-1 flex-col border-t pt-4"><h3 class="mb-4 text-lg font-semibold">Select Positive Examples</h3> <div class="min-h-0 w-full flex-1 overflow-y-auto rounded-lg border dark:[color-scheme:dark]"><!></div></div> <!>',1),uF=Z("<!> <!>",1);function jz(e,t){ut(t,!0);const n=()=>Kt(b,"$currentClassifierId",d),i=()=>Kt(S,"$currentClassifierClasses",d),s=()=>Kt(w,"$currentClassifierName",d),l=()=>Kt(p,"$isRefineClassifiersPanelOpen",d),a=()=>Kt(v,"$currentMode",d),c=()=>Kt(g,"$showTrainingSamplesToggle",d),[d,h]=pr(),g=Lp("refine_classifier_show_training_samples",!1),{isRefineClassifiersPanelOpen:p,currentMode:v,currentClassifierId:b,currentClassifierName:w,currentClassifierClasses:S}=sh(),{error:x,commitTempClassifier:A,refineClassifier:T,showClassifierTrainingSamples:D}=xv(),{openClassifiersMenu:R,switchToManageTab:L,scrollToAndSelectClassifier:V}=$w();let M=Qi.params.dataset_id,H=pt(!1),j=pt(!1),tt=pt(null);function it(){g.set(!1),O(j,!1),XD()}async function G(){if(!f(H)){O(H,!0),O(tt,null);try{g.set(!1),await T(n()||"",M,i()||[])}catch(rt){O(tt,rt instanceof Error?rt.message:String(rt),!0)}finally{O(H,!1)}}}async function ot(){if(!f(H)){O(H,!0),O(tt,null);try{g.set(!1),await A(n()||"",M),x?Ur.success(`Classifier "${s()}" created successfully.`):Ur.error("Failed to created classifier."),R(),L(),V(n()||""),it()}catch(rt){O(tt,rt instanceof Error?rt.message:String(rt),!0)}finally{O(H,!1)}}}function Y(rt){g.set(rt),D(n()||"",M,i()||[],rt)}var J=U(),et=N(J);At(et,()=>nh,(rt,ht)=>{ht(rt,{onOpenChange:bt=>!bt&&it(),get open(){return Yo(),l()},set open(bt){qo(p,bt)},children:(bt,yt)=>{var at=U(),st=N(at);At(st,()=>rh,(xt,Lt)=>{Lt(xt,{children:(Wt,Bt)=>{var de=uF(),Ut=N(de);At(Ut,()=>th,(Ct,Rt)=>{Rt(Ct,{})});var Et=nt(Ut,2);At(Et,()=>eh,(Ct,Rt)=>{Rt(Ct,{class:"h-[90vh] overflow-y-auto border-border bg-background dark:[color-scheme:dark] sm:max-h-[90vh] sm:max-w-[800px]",children:(qt,ce)=>{var ee=cF(),Yt=N(ee);At(Yt,()=>$f,(Pe,ze)=>{ze(Pe,{children:(De,Ye)=>{var ne=rF(),oe=N(ne);At(oe,()=>Jf,(Ft,Gt)=>{Gt(Ft,{class:"flex items-center gap-2 text-foreground",children:(re,dn)=>{var Ne=eF(),Ze=N(Ne);la(Ze,{class:"size-5"});var We=nt(Ze);Mt(()=>me(We,` ${a()==="temp"?"Refine Temporary Classifier":"Refine Classifier"}`)),y(re,Ne)},$$slots:{default:!0}})});var an=nt(oe,2);At(an,()=>pv,(Ft,Gt)=>{Gt(Ft,{class:"py-4 text-foreground",children:(re,dn)=>{te();var Ne=nF(),Ze=nt(N(Ne)),We=q(Ze,!0);K(Ze),Mt(()=>me(We,s())),y(re,Ne)},$$slots:{default:!0}})}),y(De,ne)},$$slots:{default:!0}})});var _e=nt(Yt,2),he=q(_e);{var Be=Pe=>{Hp(Pe,{title:"Operation failed",children:(ze,De)=>{te();var Ye=Ee();Mt(()=>me(Ye,f(tt))),y(ze,Ye)}})};gt(he,Pe=>{f(tt)&&Pe(Be)})}var Ot=nt(he,2),Ht=q(Ot),$t=q(Ht);$t.__click=[iF,j];var ye=nt(q($t),2);K($t);var zt=nt($t,2);{var Xt=Pe=>{var ze=sF(),De=nt(q(ze),4);{var Ye=ne=>{var oe=oF();y(ne,oe)};gt(De,ne=>{a()==="temp"&&ne(Ye)})}K(ze),y(Pe,ze)};gt(zt,Pe=>{f(j)&&Pe(Xt)})}K(Ht),K(Ot),K(_e);var fe=nt(_e,2),Le=nt(q(fe),2),Ke=q(Le);Jw(Ke,{get dataset_id(){return M}}),K(Le),K(fe);var qe=nt(fe,2);At(qe,()=>gv,(Pe,ze)=>{ze(Pe,{class:"flex flex-nowrap gap-4",children:(De,Ye)=>{var ne=lF(),oe=N(ne),an=q(oe);Gi(an,{class:"text-foreground",children:(ke,Te)=>{te();var ln=Ee("Show All Training Samples");y(ke,ln)},$$slots:{default:!0}});var Ft=nt(an,2);Ap(Ft,{get checked(){return c()},onCheckedChange:Y,class:""}),K(oe);var Gt=nt(oe,2),re=q(Gt);{var dn=ke=>{var Te=aF();Te.__click=ot;var ln=q(Te,!0);K(Te),Mt(()=>{Te.disabled=f(H),me(ln,f(H)?"Committing...":"Save Classifier")}),y(ke,Te)};gt(re,ke=>{a()==="temp"&&ke(dn)})}var Ne=nt(re,2);Ne.__click=it;var Ze=q(Ne);{var We=ke=>{var Te=Ee("Cancel");y(ke,Te)},Fe=ke=>{var Te=Ee("Done");y(ke,Te)};gt(Ze,ke=>{a()==="temp"?ke(We):ke(Fe,!1)})}K(Ne);var Oe=nt(Ne,2);Oe.__click=G;var Qe=q(Oe,!0);K(Oe),K(Gt),Mt(()=>{Ne.disabled=f(H),Oe.disabled=f(H),me(Qe,f(H)?"Refining...":"Refine Classifier")}),y(De,ne)},$$slots:{default:!0}})}),Mt(()=>Ln(ye,0,`size-5 transition-transform ${f(j)?"rotate-180":""}`)),y(qt,ee)},$$slots:{default:!0}})}),y(Wt,de)},$$slots:{default:!0}})}),y(bt,at)},$$slots:{default:!0}})}),y(e,J),dt(),h()}kr(["click"]);var dF=Z('<div role="tooltip" id="tooltip"> </div>'),fF=Z('<div class="relative inline-block" tabindex="0" role="button"><!> <!></div>');function hF(e,t){ut(t,!0);let n=k(t,"position",3,"top"),i=pt(!1),s;function l(){if(!s)return{};switch(n()){case"top":return{bottom:"100%",left:"50%",transform:"translateX(-50%)",marginBottom:"5px"};case"bottom":return{top:"100%",left:"50%",transform:"translateX(-50%)",marginTop:"5px"};case"left":return{right:"100%",top:"50%",transform:"translateY(-50%)",marginRight:"5px"};case"right":return{left:"100%",top:"50%",transform:"translateY(-50%)",marginLeft:"5px"};default:return{bottom:"100%",left:"50%",transform:"translateX(-50%)",marginBottom:"5px"}}}function a(){O(i,!0)}function c(){O(i,!1)}var d=fF(),h=q(d);ct(h,()=>t.children);var g=nt(h,2);{var p=v=>{var b=dF(),w=q(b,!0);K(b),Mt((S,x)=>{Ln(b,1,S),Mn(b,x),me(w,t.content)},[()=>So(ie("bg-popover text-popover-foreground absolute z-50 max-w-xs rounded-md px-3 py-1.5 text-xs shadow-md",t.class)),l]),Bp(3,b,()=>Kw,()=>({y:n()==="top"?5:n()==="bottom"?-5:0,x:n()==="left"?5:n()==="right"?-5:0,duration:200})),y(v,b)};gt(g,v=>{f(i)&&t.content&&v(p)})}K(d),yn(d,v=>s=v,()=>s),Mt(()=>Pt(d,"aria-describedby",f(i)?"tooltip":void 0)),ho("mouseenter",d,a),ho("mouseleave",d,c),ho("focusin",d,a),ho("focusout",d,c),ho("keydown",d,v=>v.key==="Escape"&&c()),y(e,d),dt()}function gF(e,t,n){t(e),n()}var pF=Z("<!> <span>Classifiers</span> <!>",1),vF=Z("<!> <!>",1),mF=Z('<div class="flex items-center gap-2"><p class="flex items-center gap-2 text-sm text-orange-600"><!> Select samples to create a classifier</p></div>'),bF=Z("<!> Create New Classifier",1),_F=Z('<p class="flex items-center gap-2 text-sm text-green-600"><!> </p> <!>',1),yF=Z("<!> Load Classifier (.pkl)",1),wF=Z('<div class="space-y-4"><div class="space-y-3"><!></div> <div class="border-t border-border"></div> <div class="space-y-3"><div class="flex items-center gap-2"><h4 class="text-sm font-medium">Load Existing Classifier</h4></div> <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>'),xF=Z('<div class="flex items-center justify-between rounded-lg border p-3 transition-colors hover:bg-muted/50"><div class="flex min-w-0 flex-1 items-center gap-3"><!> <div class="min-w-0 flex-1"><p class="truncate text-sm font-medium"> </p></div></div> <div class="flex items-center gap-1"><!> <!></div></div>'),SF=Z('<span class="mr-2 animate-spin">⏳</span> Running Classifiers...',1),CF=Z("<!> Run Selected Classifiers",1),AF=Z('<div class="rounded-lg bg-muted/50 p-4"><div class="flex items-start gap-2"><h4 class="mb-3 text-sm text-muted-foreground">Selected classifiers will be applied to your dataset</h4> <!></div> <!></div>'),PF=Z('<div class="rounded-lg bg-muted/30 py-4 text-center"><!> <p class="text-sm text-muted-foreground">No classifiers selected</p></div>'),kF=Z('<div class="max-h-48 space-y-2 overflow-y-auto dark:[color-scheme:dark]"></div> <div class="mt-4 border-t pt-4"><div class="mb-3 flex items-center gap-2"><h4 class="text-sm font-medium">Run Classifiers</h4> <span> </span></div> <!></div>',1),TF=Z('<div class="py-8 text-center"><!> <p class="text-sm text-muted-foreground">No classifiers found</p> <p class="mt-1 text-xs text-muted-foreground">Create your first classifier to get started</p></div>'),EF=Z("<!> <!> <!>",1),IF=Z('<div class="border-t p-4"><!></div>'),OF=Z('<div class="border-b"><div class="p-4 pb-0"><div class="flex items-center justify-between"><span class="inline-flex items-center rounded-full bg-secondary px-2 py-1 text-xs font-medium text-secondary-foreground"> </span></div></div> <!> <!></div>'),RF=Z("<!> <!>",1),NF=Z("<!> <!>",1),MF=Z("<!> <!>",1),LF=Z('<!> <div class="grid gap-4 py-4"><div class="space-y-2"><label for="exportType" class="text-sm font-medium">Select the export type for the classifier.</label> <!></div> <!></div>',1),DF=Z("<!> <!>",1);function Qz(e,t){ut(t,!0);const n=()=>Kt(V,"$isCreateClassifiersPanelOpen",A),i=()=>Kt(M,"$isRefineClassifiersPanelOpen",A),s=()=>Kt(G,"$scrollToClassifierId",A),l=()=>Kt(H,"$isDropdownOpen",A),a=()=>Kt(Lt,"$selectedSampleIds",A),c=()=>Kt(Y,"$classifiers",A),d=()=>Kt(j,"$activeTab",A),h=()=>Kt(Ct,"$sortedClassifiers",A),g=()=>Kt(J,"$classifiersSelected",A),p=()=>Kt(Ut,"$isApplyButtonEnabled",A),v=()=>Kt(et,"$isLoading",A),b=()=>Kt(ot,"$error",A),w=()=>Kt(Bt,"$showExportDialog",A),S=()=>Kt(Wt,"$exportType",A),x=()=>Kt(Et,"$triggerContent",A),[A,T]=pr(),D=["sklearn","lightly"];let R=Qi.params.dataset_id;const L=wu(),{isCreateClassifiersPanelOpen:V}=ih(),{isRefineClassifiersPanelOpen:M}=sh(),{isDropdownOpen:H,activeTab:j,switchToManageTab:tt,closeClassifiersMenu:it,scrollToClassifierId:G}=$w(),{error:ot,classifiers:Y,classifiersSelected:J,isLoading:et,classifierSelectionToggle:rt,apply:ht,saveClassifier:bt,loadClassifier:yt,startRefinment:at,startCreateClassifier:st,clearClassifiersSelected:xt}=xv(),{selectedSampleIds:Lt}=wi(),Wt=$e("sklearn"),Bt=$e(!1),de=$e(null),Ut=Zo([J,Y],([Ot,Ht])=>Ot.size>0&&Ht.length>0),Et=Zo(Wt,Ot=>Ot||"Select export type"),Ct=Zo(Y,Ot=>[...Ot].sort((Ht,$t)=>Ht.classifier_name.localeCompare($t.classifier_name)));function Rt(Ot){de.set(Ot),Bt.set(!0)}function qt(){const Ot=Pn(de),Ht=Pn(Wt);Ot&&(bt(Ot,Ht),Bt.set(!1),de.set(null))}function ce(){L.invalidateQueries({queryKey:Fp().queryKey}),L.invalidateQueries({queryKey:Dp({path:{dataset_id:R}}).queryKey})}async function ee(){await ht(),ce()}function Yt(){st(new Event("click")),it()}be(()=>{(n()||i())&&it()}),be(()=>{const Ot=s();Ot&&setTimeout(()=>{const Ht=document.querySelector(`[data-classifier-id="${Ot}"]`);Ht&&(Ht.scrollIntoView({behavior:"smooth",block:"center"}),rt(Ot))},50)}),be(()=>{l()||xt()});var _e=DF(),he=N(_e);mv(he,{get open(){return Yo(),l()},set open(Ot){qo(H,Ot)},children:(Ot,Ht)=>{var $t=RF(),ye=N($t);bv(ye,{children:(Xt,fe)=>{{let Le=E(()=>l()||a().size>0?"ring-2 ring-ring":""),Ke=E(()=>n()||i());Nn(Xt,{variant:"ghost",get class(){return`nav-button flex items-center space-x-2 ${f(Le)??""}`},get disabled(){return f(Ke)},title:"Classifiers",children:(qe,Pe)=>{var ze=pF(),De=N(ze);la(De,{class:"size-4"});var Ye=nt(De,4);Gf(Ye,{class:"size-4"}),y(qe,ze)},$$slots:{default:!0}})}},$$slots:{default:!0}});var zt=nt(ye,2);vv(zt,{class:"w-[480px] p-0",children:(Xt,fe)=>{var Le=OF(),Ke=q(Le),qe=q(Ke),Pe=q(qe),ze=q(Pe);K(Pe),K(qe),K(Ke);var De=nt(Ke,2);vD(De,{class:"mt-2 w-full",get value(){return Yo(),d()},set value(oe){qo(j,oe)},children:(oe,an)=>{var Ft=EF(),Gt=N(Ft);pD(Gt,{class:"mx-4 mb-4 grid w-auto grid-cols-2 gap-0",children:(Ne,Ze)=>{var We=vF(),Fe=N(We);s0(Fe,{value:"create",class:"flex items-center justify-center px-1 py-2 text-xs",children:(Qe,ke)=>{te();var Te=Ee("Create");y(Qe,Te)},$$slots:{default:!0}});var Oe=nt(Fe,2);s0(Oe,{value:"manage",class:"flex items-center justify-center px-1 py-2 text-xs",children:(Qe,ke)=>{te();var Te=Ee("Manage & Run");y(Qe,Te)},$$slots:{default:!0}}),y(Ne,We)},$$slots:{default:!0}});var re=nt(Gt,2);o0(re,{value:"create",class:"space-y-4 px-4 pb-4",children:(Ne,Ze)=>{var We=wF(),Fe=q(We),Oe=q(Fe);{var Qe=cn=>{var In=mF(),Ue=q(In),pn=q(Ue);Tg(pn,{class:"size-4"}),te(),K(Ue),K(In),y(cn,In)},ke=cn=>{var In=_F(),Ue=N(In),pn=q(Ue);Tg(pn,{class:"size-4"});var vr=nt(pn);K(Ue);var xn=nt(Ue,2);{let on=E(()=>a().size===0);Nn(xn,{variant:"default",class:"w-full",onclick:Yt,get disabled(){return f(on)},children:(Vn,Ai)=>{var jr=bF(),Er=N(jr);la(Er,{class:"mr-2 size-4"}),te(),y(Vn,jr)},$$slots:{default:!0}})}Mt(()=>me(vr,` ${a().size??""} samples selected`)),y(cn,In)};gt(Oe,cn=>{a().size===0?cn(Qe):cn(ke,!1)})}K(Fe);var Te=nt(Fe,4),ln=nt(q(Te),2),Tn=q(ln);Tn.__change=[gF,yt,tt];var En=nt(Tn,2);Nn(En,{variant:"outline",class:"w-full",children:(cn,In)=>{var Ue=yF(),pn=N(Ue);oE(pn,{class:"mr-2 size-4"}),te(),y(cn,Ue)},$$slots:{default:!0}}),K(ln),K(Te),K(We),y(Ne,We)},$$slots:{default:!0}});var dn=nt(re,2);o0(dn,{value:"manage",class:"space-y-4 px-4 pb-4",children:(Ne,Ze)=>{var We=U(),Fe=N(We);{var Oe=ke=>{var Te=kF(),ln=N(Te);Wr(ln,5,h,xn=>xn.classifier_id,(xn,on)=>{var Vn=xF(),Ai=q(Vn),jr=q(Ai);{let Qr=E(()=>g().has(f(on).classifier_id));TD(jr,{get name(){return f(on).classifier_id},label:"",get isChecked(){return f(Qr)},onCheckedChange:()=>rt(f(on).classifier_id)})}var Er=nt(jr,2),Pi=q(Er),Ou=q(Pi,!0);K(Pi),K(Er),K(Ai);var no=nt(Ai,2),Eo=q(no);Nn(Eo,{variant:"ghost",size:"sm",title:"Edit classifier",onclick:()=>{at("existing",f(on).classifier_id,f(on).classifier_name,f(on).class_list,R),it()},children:(Qr,Ir)=>{tE(Qr,{class:"size-4"})},$$slots:{default:!0}});var Is=nt(Eo,2);Nn(Is,{variant:"ghost",size:"sm",title:"Download classifier",onclick:()=>Rt(f(on).classifier_id),children:(Qr,Ir)=>{jT(Qr,{class:"size-4"})},$$slots:{default:!0}}),K(no),K(Vn),Mt(()=>{Pt(Vn,"data-classifier-id",f(on).classifier_id),me(Ou,f(on).classifier_name)}),y(xn,Vn)}),K(ln);var Tn=nt(ln,2),En=q(Tn),cn=nt(q(En),2),In=q(cn);K(cn),K(En);var Ue=nt(En,2);{var pn=xn=>{var on=AF(),Vn=q(on),Ai=nt(q(Vn),2);hF(Ai,{content:"The results will be added as new annotations to the dataset. New labels with the format 'classifier_class_name' will be created for each class of the classifier after a successful run.",children:(Er,Pi)=>{Tg(Er,{class:"mt-0.5 size-4 text-muted-foreground"})},$$slots:{default:!0}}),K(Vn);var jr=nt(Vn,2);{let Er=E(()=>!p());Nn(jr,{variant:"default",class:"w-full",get disabled(){return f(Er)},onclick:ee,children:(Pi,Ou)=>{var no=U(),Eo=N(no);{var Is=Ir=>{var Jr=SF();te(),y(Ir,Jr)},Qr=Ir=>{var Jr=CF(),uh=N(Jr);y_(uh,{class:"mr-2 size-4"}),te(),y(Ir,Jr)};gt(Eo,Ir=>{v()?Ir(Is):Ir(Qr,!1)})}y(Pi,no)},$$slots:{default:!0}})}K(on),y(xn,on)},vr=xn=>{var on=PF(),Vn=q(on);y_(Vn,{class:"mx-auto mb-2 size-8 text-muted-foreground"}),te(2),K(on),y(xn,on)};gt(Ue,xn=>{g().size>0?xn(pn):xn(vr,!1)})}K(Tn),Mt(()=>{Ln(cn,1,`inline-flex items-center rounded-full px-2 py-1 text-xs font-medium ${g().size>0?"bg-primary text-primary-foreground":"bg-secondary text-secondary-foreground"}`),me(In,`${g().size??""} selected`)}),y(ke,Te)},Qe=ke=>{var Te=TF(),ln=q(Te);la(ln,{class:"mx-auto mb-3 size-12 text-muted-foreground"}),te(4),K(Te),y(ke,Te)};gt(Fe,ke=>{h().length>0?ke(Oe):ke(Qe,!1)})}y(Ne,We)},$$slots:{default:!0}}),y(oe,Ft)},$$slots:{default:!0}});var Ye=nt(De,2);{var ne=oe=>{var an=IF(),Ft=q(an);Hp(Ft,{title:"Error occurred",children:(Gt,re)=>{te();var dn=Ee();Mt(()=>me(dn,b())),y(Gt,dn)}}),K(an),y(oe,an)};gt(Ye,oe=>{b()&&oe(ne)})}K(Le),Mt(()=>me(ze,`${c().length??""} total`)),y(Xt,Le)},$$slots:{default:!0}}),y(Ot,$t)},$$slots:{default:!0}});var Be=nt(he,2);nh(Be,{get open(){return Yo(),w()},set open(Ot){qo(Bt,Ot)},children:(Ot,Ht)=>{eh(Ot,{children:($t,ye)=>{var zt=LF(),Xt=N(zt);$f(Xt,{children:(Pe,ze)=>{Jf(Pe,{children:(De,Ye)=>{te();var ne=Ee("Export Classifier");y(De,ne)},$$slots:{default:!0}})},$$slots:{default:!0}});var fe=nt(Xt,2),Le=q(fe),Ke=nt(q(Le),2);At(Ke,()=>Zw,(Pe,ze)=>{ze(Pe,{type:"single",name:"exportType",get value(){return Yo(),S()},set value(De){qo(Wt,De)},children:(De,Ye)=>{var ne=MF(),oe=N(ne);At(oe,()=>Xw,(Ft,Gt)=>{Gt(Ft,{class:"w-full",children:(re,dn)=>{te();var Ne=Ee();Mt(()=>me(Ne,x())),y(re,Ne)},$$slots:{default:!0}})});var an=nt(oe,2);At(an,()=>Yw,(Ft,Gt)=>{Gt(Ft,{children:(re,dn)=>{var Ne=U(),Ze=N(Ne);At(Ze,()=>gD,(We,Fe)=>{Fe(We,{children:(Oe,Qe)=>{var ke=NF(),Te=N(ke);At(Te,()=>lD,(Tn,En)=>{En(Tn,{children:(cn,In)=>{te();var Ue=Ee("Export Types");y(cn,Ue)},$$slots:{default:!0}})});var ln=nt(Te,2);Wr(ln,16,()=>D,Tn=>Tn,(Tn,En)=>{var cn=U(),In=N(cn);At(In,()=>Cp,(Ue,pn)=>{pn(Ue,{get value(){return En},get label(){return En},children:(vr,xn)=>{te();var on=Ee();Mt(()=>me(on,En)),y(vr,on)},$$slots:{default:!0}})}),y(Tn,cn)}),y(Oe,ke)},$$slots:{default:!0}})}),y(re,Ne)},$$slots:{default:!0}})}),y(De,ne)},$$slots:{default:!0}})}),K(Le);var qe=nt(Le,2);Nn(qe,{class:"flex-1",onclick:()=>qt(),children:(Pe,ze)=>{te();var De=Ee("Export");y(Pe,De)},$$slots:{default:!0}}),K(fe),y($t,zt)},$$slots:{default:!0}})},$$slots:{default:!0}}),y(e,_e),dt(),T()}kr(["change"]);var FF=Z("<!> <span>Settings</span>",1),BF=Z("<!> <!>",1),zF=(e,t)=>{e.preventDefault(),t("hideAnnotations")},VF=Z('<span class="italic opacity-70">Press a key...</span>'),HF=Z("<span> </span>"),WF=(e,t)=>{e.preventDefault(),t("goBack")},UF=Z('<span class="italic opacity-70">Press a key...</span>'),GF=Z("<span> </span>"),KF=Z("<!> <!>",1),qF=Z("<!> <!>",1),YF=Z("<!> <!>",1),XF=Z('<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 class="grid grid-cols-2 items-center gap-4"><!> <!></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>'),ZF=Z("<!> <!>",1),jF=Z("<!> <!>",1);function Jz(e,t){ut(t,!0);const n=()=>Kt(a,"$settingsStore",s),i=()=>Kt(c,"$isLoadedStore",s),[s,l]=pr(),{settingsStore:a,isLoadedStore:c,saveSettings:d}=yu();let h=pt(!1),g=pt(!1),p=pt(_n({hideAnnotations:"v",goBack:"Escape"})),v=pt("contain"),b=pt(!0),w=pt(!1),S=!1;be(()=>{n()&&i()&&!S&&(O(p,{hideAnnotations:n().key_hide_annotations||"v",goBack:n().key_go_back||"Escape"},!0),O(v,n().grid_view_sample_rendering||"contain",!0),O(b,!!(n().show_annotation_text_labels??!0),!0),O(w,!!(n().show_sample_filenames??!1),!0),S=!0)});let x=pt(null);function A(j){O(h,j,!0),O(x,null)}function T(j){O(v,j,!0)}function D(j){j.preventDefault(),R()}async function R(){O(g,!0);try{await d({key_hide_annotations:f(p).hideAnnotations,key_go_back:f(p).goBack,grid_view_sample_rendering:f(v),show_annotation_text_labels:f(b),show_sample_filenames:f(w)}),A(!1)}catch(j){console.error("Error saving settings:",j)}finally{O(g,!1)}}const L=j=>{O(x,j,!0)},V=j=>{if(!f(x))return;j.preventDefault(),j.stopPropagation();let tt=j.key;tt===" "?tt="Space":tt.length===1&&/^[a-zA-Z]$/.test(tt)&&!j.getModifierState("CapsLock")&&(tt=tt.toLowerCase()),f(x)==="hideAnnotations"?f(p).hideAnnotations=tt:f(x)==="goBack"&&(f(p).goBack=tt),O(x,null)};var M=U();ho("keydown",lT,V);var H=N(M);At(H,()=>nh,(j,tt)=>{tt(j,{get open(){return f(h)},set open(it){O(h,it,!0)},children:(it,G)=>{var ot=jF(),Y=N(ot);At(Y,()=>kL,(et,rt)=>{rt(et,{children:(ht,bt)=>{Nn(ht,{title:"Settings",variant:"outline",class:"nav-button gap-2",children:(yt,at)=>{var st=FF(),xt=N(st);nE(xt,{class:"h-4 w-4"}),te(2),y(yt,st)},$$slots:{default:!0}})},$$slots:{default:!0}})});var J=nt(Y,2);At(J,()=>rh,(et,rt)=>{rt(et,{children:(ht,bt)=>{var yt=ZF(),at=N(yt);At(at,()=>th,(xt,Lt)=>{Lt(xt,{})});var st=nt(at,2);At(st,()=>eh,(xt,Lt)=>{Lt(xt,{class:"border-border bg-background sm:max-w-[500px]",children:(Wt,Bt)=>{var de=XF(),Ut=q(de);At(Ut,()=>$f,(Ft,Gt)=>{Gt(Ft,{children:(re,dn)=>{var Ne=BF(),Ze=N(Ne);At(Ze,()=>Jf,(Fe,Oe)=>{Oe(Fe,{class:"text-foreground",children:(Qe,ke)=>{te();var Te=Ee("Settings");y(Qe,Te)},$$slots:{default:!0}})});var We=nt(Ze,2);At(We,()=>pv,(Fe,Oe)=>{Oe(Fe,{class:"text-foreground",children:(Qe,ke)=>{te();var Te=Ee("Configure your application preferences.");y(Qe,Te)},$$slots:{default:!0}})}),y(re,Ne)},$$slots:{default:!0}})});var Et=nt(Ut,2),Ct=q(Et),Rt=nt(q(Ct),2),qt=q(Rt);Gi(qt,{for:"hide-annotations",class:"text-right text-foreground",children:(Ft,Gt)=>{te();var re=Ee("Hide Annotations");y(Ft,re)},$$slots:{default:!0}});var ce=nt(qt,2);ce.__click=[zF,L];var ee=q(ce);{var Yt=Ft=>{var Gt=VF();y(Ft,Gt)},_e=Ft=>{var Gt=HF(),re=q(Gt,!0);K(Gt),Mt(()=>me(re,f(p).hideAnnotations)),y(Ft,Gt)};gt(ee,Ft=>{f(x)==="hideAnnotations"?Ft(Yt):Ft(_e,!1)})}K(ce),K(Rt);var he=nt(Rt,2),Be=q(he);Gi(Be,{for:"go-back",class:"text-right text-foreground",children:(Ft,Gt)=>{te();var re=Ee("Go Back");y(Ft,re)},$$slots:{default:!0}});var Ot=nt(Be,2);Ot.__click=[WF,L];var Ht=q(Ot);{var $t=Ft=>{var Gt=UF();y(Ft,Gt)},ye=Ft=>{var Gt=GF(),re=q(Gt,!0);K(Gt),Mt(()=>me(re,f(p).goBack)),y(Ft,Gt)};gt(Ht,Ft=>{f(x)==="goBack"?Ft($t):Ft(ye,!1)})}K(Ot),K(he),K(Ct);var zt=nt(Ct,2),Xt=nt(q(zt),2),fe=q(Xt);Gi(fe,{for:"grid-view-rendering",class:"text-right text-foreground",children:(Ft,Gt)=>{te();var re=Ee("Grid View Rendering");y(Ft,re)},$$slots:{default:!0}});var Le=nt(fe,2),Ke=q(Le);Zw(Ke,{type:"single",get value(){return f(v)},onValueChange:T,children:(Ft,Gt)=>{var re=qF(),dn=N(re);Xw(dn,{id:"grid-view-rendering",children:(Ze,We)=>{te();var Fe=Ee();Mt(()=>me(Fe,f(v)==="cover"?"Cover":"Contain")),y(Ze,Fe)},$$slots:{default:!0}});var Ne=nt(dn,2);Yw(Ne,{children:(Ze,We)=>{var Fe=KF(),Oe=N(Fe);Cp(Oe,{value:"cover",children:(ke,Te)=>{te();var ln=Ee("Cover");y(ke,ln)},$$slots:{default:!0}});var Qe=nt(Oe,2);Cp(Qe,{value:"contain",children:(ke,Te)=>{te();var ln=Ee("Contain");y(ke,ln)},$$slots:{default:!0}}),y(Ze,Fe)},$$slots:{default:!0}}),y(Ft,re)},$$slots:{default:!0}}),K(Le),K(Xt);var qe=nt(Xt,2),Pe=q(qe);Gi(Pe,{for:"show-sample-filenames",class:"text-right text-foreground",children:(Ft,Gt)=>{te();var re=Ee("Show filenames in grid view");y(Ft,re)},$$slots:{default:!0}});var ze=nt(Pe,2);Ap(ze,{id:"show-sample-filenames",get disabled(){return f(g)},get checked(){return f(w)},set checked(Ft){O(w,Ft,!0)}}),K(qe),K(zt);var De=nt(zt,2),Ye=nt(q(De),2),ne=q(Ye);Gi(ne,{for:"show-annotation-text-labels",class:"text-right text-foreground",children:(Ft,Gt)=>{te();var re=Ee("Show Annotation Text Labels");y(Ft,re)},$$slots:{default:!0}});var oe=nt(ne,2);Ap(oe,{id:"show-annotation-text-labels",get disabled(){return f(g)},get checked(){return f(b)},set checked(Ft){O(b,Ft,!0)}}),K(Ye),K(De),K(Et);var an=nt(Et,2);At(an,()=>gv,(Ft,Gt)=>{Gt(Ft,{children:(re,dn)=>{var Ne=YF(),Ze=N(Ne);Nn(Ze,{variant:"outline",type:"button",onclick:()=>A(!1),children:(Fe,Oe)=>{te();var Qe=Ee("Cancel");y(Fe,Qe)},$$slots:{default:!0}});var We=nt(Ze,2);Nn(We,{type:"submit",get disabled(){return f(g)},children:(Fe,Oe)=>{te();var Qe=Ee();Mt(()=>me(Qe,f(g)?"Saving...":"Save Changes")),y(Fe,Qe)},$$slots:{default:!0}}),y(re,Ne)},$$slots:{default:!0}})}),K(de),ho("submit",de,D),y(Wt,de)},$$slots:{default:!0}})}),y(ht,yt)},$$slots:{default:!0}})}),y(it,ot)},$$slots:{default:!0}})}),y(e,M),dt(),l()}kr(["click"]);var of={exports:{}};/**
|
|
413
|
+
* @license
|
|
414
|
+
* Lodash <https://lodash.com/>
|
|
415
|
+
* Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
|
|
416
|
+
* Released under MIT license <https://lodash.com/license>
|
|
417
|
+
* Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
|
|
418
|
+
* Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
|
|
419
|
+
*/of.exports;(function(e,t){(function(){var n,i="4.17.21",s=200,l="Unsupported core-js use. Try https://npms.io/search?q=ponyfill.",a="Expected a function",c="Invalid `variable` option passed into `_.template`",d="__lodash_hash_undefined__",h=500,g="__lodash_placeholder__",p=1,v=2,b=4,w=1,S=2,x=1,A=2,T=4,D=8,R=16,L=32,V=64,M=128,H=256,j=512,tt=30,it="...",G=800,ot=16,Y=1,J=2,et=3,rt=1/0,ht=9007199254740991,bt=17976931348623157e292,yt=NaN,at=4294967295,st=at-1,xt=at>>>1,Lt=[["ary",M],["bind",x],["bindKey",A],["curry",D],["curryRight",R],["flip",j],["partial",L],["partialRight",V],["rearg",H]],Wt="[object Arguments]",Bt="[object Array]",de="[object AsyncFunction]",Ut="[object Boolean]",Et="[object Date]",Ct="[object DOMException]",Rt="[object Error]",qt="[object Function]",ce="[object GeneratorFunction]",ee="[object Map]",Yt="[object Number]",_e="[object Null]",he="[object Object]",Be="[object Promise]",Ot="[object Proxy]",Ht="[object RegExp]",$t="[object Set]",ye="[object String]",zt="[object Symbol]",Xt="[object Undefined]",fe="[object WeakMap]",Le="[object WeakSet]",Ke="[object ArrayBuffer]",qe="[object DataView]",Pe="[object Float32Array]",ze="[object Float64Array]",De="[object Int8Array]",Ye="[object Int16Array]",ne="[object Int32Array]",oe="[object Uint8Array]",an="[object Uint8ClampedArray]",Ft="[object Uint16Array]",Gt="[object Uint32Array]",re=/\b__p \+= '';/g,dn=/\b(__p \+=) '' \+/g,Ne=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Ze=/&(?:amp|lt|gt|quot|#39);/g,We=/[&<>"']/g,Fe=RegExp(Ze.source),Oe=RegExp(We.source),Qe=/<%-([\s\S]+?)%>/g,ke=/<%([\s\S]+?)%>/g,Te=/<%=([\s\S]+?)%>/g,ln=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,Tn=/^\w*$/,En=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,cn=/[\\^$.*+?()[\]{}|]/g,In=RegExp(cn.source),Ue=/^\s+/,pn=/\s/,vr=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,xn=/\{\n\/\* \[wrapped with (.+)\] \*/,on=/,? & /,Vn=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,Ai=/[()=,{}\[\]\/\s]/,jr=/\\(\\)?/g,Er=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,Pi=/\w*$/,Ou=/^[-+]0x[0-9a-f]+$/i,no=/^0b[01]+$/i,Eo=/^\[object .+?Constructor\]$/,Is=/^0o[0-7]+$/i,Qr=/^(?:0|[1-9]\d*)$/,Ir=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Jr=/($^)/,uh=/['\n\r\u2028\u2029\\]/g,Ru="\\ud800-\\udfff",Ex="\\u0300-\\u036f",Ix="\\ufe20-\\ufe2f",Ox="\\u20d0-\\u20ff",Rv=Ex+Ix+Ox,Nv="\\u2700-\\u27bf",Mv="a-z\\xdf-\\xf6\\xf8-\\xff",Rx="\\xac\\xb1\\xd7\\xf7",Nx="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",Mx="\\u2000-\\u206f",Lx=" \\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",Lv="A-Z\\xc0-\\xd6\\xd8-\\xde",Dv="\\ufe0e\\ufe0f",Fv=Rx+Nx+Mx+Lx,dh="['’]",Dx="["+Ru+"]",Bv="["+Fv+"]",Nu="["+Rv+"]",zv="\\d+",Fx="["+Nv+"]",Vv="["+Mv+"]",Hv="[^"+Ru+Fv+zv+Nv+Mv+Lv+"]",fh="\\ud83c[\\udffb-\\udfff]",Bx="(?:"+Nu+"|"+fh+")",Wv="[^"+Ru+"]",hh="(?:\\ud83c[\\udde6-\\uddff]){2}",gh="[\\ud800-\\udbff][\\udc00-\\udfff]",Io="["+Lv+"]",Uv="\\u200d",Gv="(?:"+Vv+"|"+Hv+")",zx="(?:"+Io+"|"+Hv+")",Kv="(?:"+dh+"(?:d|ll|m|re|s|t|ve))?",qv="(?:"+dh+"(?:D|LL|M|RE|S|T|VE))?",Yv=Bx+"?",Xv="["+Dv+"]?",Vx="(?:"+Uv+"(?:"+[Wv,hh,gh].join("|")+")"+Xv+Yv+")*",Hx="\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Wx="\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])",Zv=Xv+Yv+Vx,Ux="(?:"+[Fx,hh,gh].join("|")+")"+Zv,Gx="(?:"+[Wv+Nu+"?",Nu,hh,gh,Dx].join("|")+")",Kx=RegExp(dh,"g"),qx=RegExp(Nu,"g"),ph=RegExp(fh+"(?="+fh+")|"+Gx+Zv,"g"),Yx=RegExp([Io+"?"+Vv+"+"+Kv+"(?="+[Bv,Io,"$"].join("|")+")",zx+"+"+qv+"(?="+[Bv,Io+Gv,"$"].join("|")+")",Io+"?"+Gv+"+"+Kv,Io+"+"+qv,Wx,Hx,zv,Ux].join("|"),"g"),Xx=RegExp("["+Uv+Ru+Rv+Dv+"]"),Zx=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,jx=["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"],Qx=-1,tn={};tn[Pe]=tn[ze]=tn[De]=tn[Ye]=tn[ne]=tn[oe]=tn[an]=tn[Ft]=tn[Gt]=!0,tn[Wt]=tn[Bt]=tn[Ke]=tn[Ut]=tn[qe]=tn[Et]=tn[Rt]=tn[qt]=tn[ee]=tn[Yt]=tn[he]=tn[Ht]=tn[$t]=tn[ye]=tn[fe]=!1;var Je={};Je[Wt]=Je[Bt]=Je[Ke]=Je[qe]=Je[Ut]=Je[Et]=Je[Pe]=Je[ze]=Je[De]=Je[Ye]=Je[ne]=Je[ee]=Je[Yt]=Je[he]=Je[Ht]=Je[$t]=Je[ye]=Je[zt]=Je[oe]=Je[an]=Je[Ft]=Je[Gt]=!0,Je[Rt]=Je[qt]=Je[fe]=!1;var Jx={À:"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"},$x={"&":"&","<":"<",">":">",'"':""","'":"'"},t1={"&":"&","<":"<",">":">",""":'"',"'":"'"},e1={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},n1=parseFloat,r1=parseInt,jv=typeof Fr=="object"&&Fr&&Fr.Object===Object&&Fr,i1=typeof self=="object"&&self&&self.Object===Object&&self,Sn=jv||i1||Function("return this")(),vh=t&&!t.nodeType&&t,ro=vh&&!0&&e&&!e.nodeType&&e,Qv=ro&&ro.exports===vh,mh=Qv&&jv.process,sr=function(){try{var X=ro&&ro.require&&ro.require("util").types;return X||mh&&mh.binding&&mh.binding("util")}catch{}}(),Jv=sr&&sr.isArrayBuffer,$v=sr&&sr.isDate,tm=sr&&sr.isMap,em=sr&&sr.isRegExp,nm=sr&&sr.isSet,rm=sr&&sr.isTypedArray;function jn(X,ft,lt){switch(lt.length){case 0:return X.call(ft);case 1:return X.call(ft,lt[0]);case 2:return X.call(ft,lt[0],lt[1]);case 3:return X.call(ft,lt[0],lt[1],lt[2])}return X.apply(ft,lt)}function o1(X,ft,lt,It){for(var se=-1,Ve=X==null?0:X.length;++se<Ve;){var vn=X[se];ft(It,vn,lt(vn),X)}return It}function ar(X,ft){for(var lt=-1,It=X==null?0:X.length;++lt<It&&ft(X[lt],lt,X)!==!1;);return X}function s1(X,ft){for(var lt=X==null?0:X.length;lt--&&ft(X[lt],lt,X)!==!1;);return X}function im(X,ft){for(var lt=-1,It=X==null?0:X.length;++lt<It;)if(!ft(X[lt],lt,X))return!1;return!0}function ki(X,ft){for(var lt=-1,It=X==null?0:X.length,se=0,Ve=[];++lt<It;){var vn=X[lt];ft(vn,lt,X)&&(Ve[se++]=vn)}return Ve}function Mu(X,ft){var lt=X==null?0:X.length;return!!lt&&Oo(X,ft,0)>-1}function bh(X,ft,lt){for(var It=-1,se=X==null?0:X.length;++It<se;)if(lt(ft,X[It]))return!0;return!1}function sn(X,ft){for(var lt=-1,It=X==null?0:X.length,se=Array(It);++lt<It;)se[lt]=ft(X[lt],lt,X);return se}function Ti(X,ft){for(var lt=-1,It=ft.length,se=X.length;++lt<It;)X[se+lt]=ft[lt];return X}function _h(X,ft,lt,It){var se=-1,Ve=X==null?0:X.length;for(It&&Ve&&(lt=X[++se]);++se<Ve;)lt=ft(lt,X[se],se,X);return lt}function a1(X,ft,lt,It){var se=X==null?0:X.length;for(It&&se&&(lt=X[--se]);se--;)lt=ft(lt,X[se],se,X);return lt}function yh(X,ft){for(var lt=-1,It=X==null?0:X.length;++lt<It;)if(ft(X[lt],lt,X))return!0;return!1}var l1=wh("length");function c1(X){return X.split("")}function u1(X){return X.match(Vn)||[]}function om(X,ft,lt){var It;return lt(X,function(se,Ve,vn){if(ft(se,Ve,vn))return It=Ve,!1}),It}function Lu(X,ft,lt,It){for(var se=X.length,Ve=lt+(It?1:-1);It?Ve--:++Ve<se;)if(ft(X[Ve],Ve,X))return Ve;return-1}function Oo(X,ft,lt){return ft===ft?x1(X,ft,lt):Lu(X,sm,lt)}function d1(X,ft,lt,It){for(var se=lt-1,Ve=X.length;++se<Ve;)if(It(X[se],ft))return se;return-1}function sm(X){return X!==X}function am(X,ft){var lt=X==null?0:X.length;return lt?Sh(X,ft)/lt:yt}function wh(X){return function(ft){return ft==null?n:ft[X]}}function xh(X){return function(ft){return X==null?n:X[ft]}}function lm(X,ft,lt,It,se){return se(X,function(Ve,vn,je){lt=It?(It=!1,Ve):ft(lt,Ve,vn,je)}),lt}function f1(X,ft){var lt=X.length;for(X.sort(ft);lt--;)X[lt]=X[lt].value;return X}function Sh(X,ft){for(var lt,It=-1,se=X.length;++It<se;){var Ve=ft(X[It]);Ve!==n&&(lt=lt===n?Ve:lt+Ve)}return lt}function Ch(X,ft){for(var lt=-1,It=Array(X);++lt<X;)It[lt]=ft(lt);return It}function h1(X,ft){return sn(ft,function(lt){return[lt,X[lt]]})}function cm(X){return X&&X.slice(0,hm(X)+1).replace(Ue,"")}function Qn(X){return function(ft){return X(ft)}}function Ah(X,ft){return sn(ft,function(lt){return X[lt]})}function Os(X,ft){return X.has(ft)}function um(X,ft){for(var lt=-1,It=X.length;++lt<It&&Oo(ft,X[lt],0)>-1;);return lt}function dm(X,ft){for(var lt=X.length;lt--&&Oo(ft,X[lt],0)>-1;);return lt}function g1(X,ft){for(var lt=X.length,It=0;lt--;)X[lt]===ft&&++It;return It}var p1=xh(Jx),v1=xh($x);function m1(X){return"\\"+e1[X]}function b1(X,ft){return X==null?n:X[ft]}function Ro(X){return Xx.test(X)}function _1(X){return Zx.test(X)}function y1(X){for(var ft,lt=[];!(ft=X.next()).done;)lt.push(ft.value);return lt}function Ph(X){var ft=-1,lt=Array(X.size);return X.forEach(function(It,se){lt[++ft]=[se,It]}),lt}function fm(X,ft){return function(lt){return X(ft(lt))}}function Ei(X,ft){for(var lt=-1,It=X.length,se=0,Ve=[];++lt<It;){var vn=X[lt];(vn===ft||vn===g)&&(X[lt]=g,Ve[se++]=lt)}return Ve}function Du(X){var ft=-1,lt=Array(X.size);return X.forEach(function(It){lt[++ft]=It}),lt}function w1(X){var ft=-1,lt=Array(X.size);return X.forEach(function(It){lt[++ft]=[It,It]}),lt}function x1(X,ft,lt){for(var It=lt-1,se=X.length;++It<se;)if(X[It]===ft)return It;return-1}function S1(X,ft,lt){for(var It=lt+1;It--;)if(X[It]===ft)return It;return It}function No(X){return Ro(X)?A1(X):l1(X)}function mr(X){return Ro(X)?P1(X):c1(X)}function hm(X){for(var ft=X.length;ft--&&pn.test(X.charAt(ft)););return ft}var C1=xh(t1);function A1(X){for(var ft=ph.lastIndex=0;ph.test(X);)++ft;return ft}function P1(X){return X.match(ph)||[]}function k1(X){return X.match(Yx)||[]}var T1=function X(ft){ft=ft==null?Sn:Mo.defaults(Sn.Object(),ft,Mo.pick(Sn,jx));var lt=ft.Array,It=ft.Date,se=ft.Error,Ve=ft.Function,vn=ft.Math,je=ft.Object,kh=ft.RegExp,E1=ft.String,lr=ft.TypeError,Fu=lt.prototype,I1=Ve.prototype,Lo=je.prototype,Bu=ft["__core-js_shared__"],zu=I1.toString,Xe=Lo.hasOwnProperty,O1=0,gm=function(){var r=/[^.]+$/.exec(Bu&&Bu.keys&&Bu.keys.IE_PROTO||"");return r?"Symbol(src)_1."+r:""}(),Vu=Lo.toString,R1=zu.call(je),N1=Sn._,M1=kh("^"+zu.call(Xe).replace(cn,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Hu=Qv?ft.Buffer:n,Ii=ft.Symbol,Wu=ft.Uint8Array,pm=Hu?Hu.allocUnsafe:n,Uu=fm(je.getPrototypeOf,je),vm=je.create,mm=Lo.propertyIsEnumerable,Gu=Fu.splice,bm=Ii?Ii.isConcatSpreadable:n,Rs=Ii?Ii.iterator:n,io=Ii?Ii.toStringTag:n,Ku=function(){try{var r=co(je,"defineProperty");return r({},"",{}),r}catch{}}(),L1=ft.clearTimeout!==Sn.clearTimeout&&ft.clearTimeout,D1=It&&It.now!==Sn.Date.now&&It.now,F1=ft.setTimeout!==Sn.setTimeout&&ft.setTimeout,qu=vn.ceil,Yu=vn.floor,Th=je.getOwnPropertySymbols,B1=Hu?Hu.isBuffer:n,_m=ft.isFinite,z1=Fu.join,V1=fm(je.keys,je),mn=vn.max,On=vn.min,H1=It.now,W1=ft.parseInt,ym=vn.random,U1=Fu.reverse,Eh=co(ft,"DataView"),Ns=co(ft,"Map"),Ih=co(ft,"Promise"),Do=co(ft,"Set"),Ms=co(ft,"WeakMap"),Ls=co(je,"create"),Xu=Ms&&new Ms,Fo={},G1=uo(Eh),K1=uo(Ns),q1=uo(Ih),Y1=uo(Do),X1=uo(Ms),Zu=Ii?Ii.prototype:n,Ds=Zu?Zu.valueOf:n,wm=Zu?Zu.toString:n;function P(r){if(fn(r)&&!ue(r)&&!(r instanceof Re)){if(r instanceof cr)return r;if(Xe.call(r,"__wrapped__"))return xb(r)}return new cr(r)}var Bo=function(){function r(){}return function(o){if(!un(o))return{};if(vm)return vm(o);r.prototype=o;var u=new r;return r.prototype=n,u}}();function ju(){}function cr(r,o){this.__wrapped__=r,this.__actions__=[],this.__chain__=!!o,this.__index__=0,this.__values__=n}P.templateSettings={escape:Qe,evaluate:ke,interpolate:Te,variable:"",imports:{_:P}},P.prototype=ju.prototype,P.prototype.constructor=P,cr.prototype=Bo(ju.prototype),cr.prototype.constructor=cr;function Re(r){this.__wrapped__=r,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=at,this.__views__=[]}function Z1(){var r=new Re(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 j1(){if(this.__filtered__){var r=new Re(this);r.__dir__=-1,r.__filtered__=!0}else r=this.clone(),r.__dir__*=-1;return r}function Q1(){var r=this.__wrapped__.value(),o=this.__dir__,u=ue(r),m=o<0,C=u?r.length:0,I=c2(0,C,this.__views__),F=I.start,W=I.end,Q=W-F,vt=m?W:F-1,mt=this.__iteratees__,_t=mt.length,kt=0,Dt=On(Q,this.__takeCount__);if(!u||!m&&C==Q&&Dt==Q)return Km(r,this.__actions__);var jt=[];t:for(;Q--&&kt<Dt;){vt+=o;for(var we=-1,Qt=r[vt];++we<_t;){var Ie=mt[we],Me=Ie.iteratee,tr=Ie.type,Bn=Me(Qt);if(tr==J)Qt=Bn;else if(!Bn){if(tr==Y)continue t;break t}}jt[kt++]=Qt}return jt}Re.prototype=Bo(ju.prototype),Re.prototype.constructor=Re;function oo(r){var o=-1,u=r==null?0:r.length;for(this.clear();++o<u;){var m=r[o];this.set(m[0],m[1])}}function J1(){this.__data__=Ls?Ls(null):{},this.size=0}function $1(r){var o=this.has(r)&&delete this.__data__[r];return this.size-=o?1:0,o}function tS(r){var o=this.__data__;if(Ls){var u=o[r];return u===d?n:u}return Xe.call(o,r)?o[r]:n}function eS(r){var o=this.__data__;return Ls?o[r]!==n:Xe.call(o,r)}function nS(r,o){var u=this.__data__;return this.size+=this.has(r)?0:1,u[r]=Ls&&o===n?d:o,this}oo.prototype.clear=J1,oo.prototype.delete=$1,oo.prototype.get=tS,oo.prototype.has=eS,oo.prototype.set=nS;function $r(r){var o=-1,u=r==null?0:r.length;for(this.clear();++o<u;){var m=r[o];this.set(m[0],m[1])}}function rS(){this.__data__=[],this.size=0}function iS(r){var o=this.__data__,u=Qu(o,r);if(u<0)return!1;var m=o.length-1;return u==m?o.pop():Gu.call(o,u,1),--this.size,!0}function oS(r){var o=this.__data__,u=Qu(o,r);return u<0?n:o[u][1]}function sS(r){return Qu(this.__data__,r)>-1}function aS(r,o){var u=this.__data__,m=Qu(u,r);return m<0?(++this.size,u.push([r,o])):u[m][1]=o,this}$r.prototype.clear=rS,$r.prototype.delete=iS,$r.prototype.get=oS,$r.prototype.has=sS,$r.prototype.set=aS;function ti(r){var o=-1,u=r==null?0:r.length;for(this.clear();++o<u;){var m=r[o];this.set(m[0],m[1])}}function lS(){this.size=0,this.__data__={hash:new oo,map:new(Ns||$r),string:new oo}}function cS(r){var o=cd(this,r).delete(r);return this.size-=o?1:0,o}function uS(r){return cd(this,r).get(r)}function dS(r){return cd(this,r).has(r)}function fS(r,o){var u=cd(this,r),m=u.size;return u.set(r,o),this.size+=u.size==m?0:1,this}ti.prototype.clear=lS,ti.prototype.delete=cS,ti.prototype.get=uS,ti.prototype.has=dS,ti.prototype.set=fS;function so(r){var o=-1,u=r==null?0:r.length;for(this.__data__=new ti;++o<u;)this.add(r[o])}function hS(r){return this.__data__.set(r,d),this}function gS(r){return this.__data__.has(r)}so.prototype.add=so.prototype.push=hS,so.prototype.has=gS;function br(r){var o=this.__data__=new $r(r);this.size=o.size}function pS(){this.__data__=new $r,this.size=0}function vS(r){var o=this.__data__,u=o.delete(r);return this.size=o.size,u}function mS(r){return this.__data__.get(r)}function bS(r){return this.__data__.has(r)}function _S(r,o){var u=this.__data__;if(u instanceof $r){var m=u.__data__;if(!Ns||m.length<s-1)return m.push([r,o]),this.size=++u.size,this;u=this.__data__=new ti(m)}return u.set(r,o),this.size=u.size,this}br.prototype.clear=pS,br.prototype.delete=vS,br.prototype.get=mS,br.prototype.has=bS,br.prototype.set=_S;function xm(r,o){var u=ue(r),m=!u&&fo(r),C=!u&&!m&&Li(r),I=!u&&!m&&!C&&Wo(r),F=u||m||C||I,W=F?Ch(r.length,E1):[],Q=W.length;for(var vt in r)(o||Xe.call(r,vt))&&!(F&&(vt=="length"||C&&(vt=="offset"||vt=="parent")||I&&(vt=="buffer"||vt=="byteLength"||vt=="byteOffset")||ii(vt,Q)))&&W.push(vt);return W}function Sm(r){var o=r.length;return o?r[Hh(0,o-1)]:n}function yS(r,o){return ud(Hn(r),ao(o,0,r.length))}function wS(r){return ud(Hn(r))}function Oh(r,o,u){(u!==n&&!_r(r[o],u)||u===n&&!(o in r))&&ei(r,o,u)}function Fs(r,o,u){var m=r[o];(!(Xe.call(r,o)&&_r(m,u))||u===n&&!(o in r))&&ei(r,o,u)}function Qu(r,o){for(var u=r.length;u--;)if(_r(r[u][0],o))return u;return-1}function xS(r,o,u,m){return Oi(r,function(C,I,F){o(m,C,u(C),F)}),m}function Cm(r,o){return r&&Rr(o,bn(o),r)}function SS(r,o){return r&&Rr(o,Un(o),r)}function ei(r,o,u){o=="__proto__"&&Ku?Ku(r,o,{configurable:!0,enumerable:!0,value:u,writable:!0}):r[o]=u}function Rh(r,o){for(var u=-1,m=o.length,C=lt(m),I=r==null;++u<m;)C[u]=I?n:fg(r,o[u]);return C}function ao(r,o,u){return r===r&&(u!==n&&(r=r<=u?r:u),o!==n&&(r=r>=o?r:o)),r}function ur(r,o,u,m,C,I){var F,W=o&p,Q=o&v,vt=o&b;if(u&&(F=C?u(r,m,C,I):u(r)),F!==n)return F;if(!un(r))return r;var mt=ue(r);if(mt){if(F=d2(r),!W)return Hn(r,F)}else{var _t=Rn(r),kt=_t==qt||_t==ce;if(Li(r))return Xm(r,W);if(_t==he||_t==Wt||kt&&!C){if(F=Q||kt?{}:hb(r),!W)return Q?t2(r,SS(F,r)):$S(r,Cm(F,r))}else{if(!Je[_t])return C?r:{};F=f2(r,_t,W)}}I||(I=new br);var Dt=I.get(r);if(Dt)return Dt;I.set(r,F),Wb(r)?r.forEach(function(Qt){F.add(ur(Qt,o,u,Qt,r,I))}):Vb(r)&&r.forEach(function(Qt,Ie){F.set(Ie,ur(Qt,o,u,Ie,r,I))});var jt=vt?Q?Jh:Qh:Q?Un:bn,we=mt?n:jt(r);return ar(we||r,function(Qt,Ie){we&&(Ie=Qt,Qt=r[Ie]),Fs(F,Ie,ur(Qt,o,u,Ie,r,I))}),F}function CS(r){var o=bn(r);return function(u){return Am(u,r,o)}}function Am(r,o,u){var m=u.length;if(r==null)return!m;for(r=je(r);m--;){var C=u[m],I=o[C],F=r[C];if(F===n&&!(C in r)||!I(F))return!1}return!0}function Pm(r,o,u){if(typeof r!="function")throw new lr(a);return Gs(function(){r.apply(n,u)},o)}function Bs(r,o,u,m){var C=-1,I=Mu,F=!0,W=r.length,Q=[],vt=o.length;if(!W)return Q;u&&(o=sn(o,Qn(u))),m?(I=bh,F=!1):o.length>=s&&(I=Os,F=!1,o=new so(o));t:for(;++C<W;){var mt=r[C],_t=u==null?mt:u(mt);if(mt=m||mt!==0?mt:0,F&&_t===_t){for(var kt=vt;kt--;)if(o[kt]===_t)continue t;Q.push(mt)}else I(o,_t,m)||Q.push(mt)}return Q}var Oi=$m(Or),km=$m(Mh,!0);function AS(r,o){var u=!0;return Oi(r,function(m,C,I){return u=!!o(m,C,I),u}),u}function Ju(r,o,u){for(var m=-1,C=r.length;++m<C;){var I=r[m],F=o(I);if(F!=null&&(W===n?F===F&&!$n(F):u(F,W)))var W=F,Q=I}return Q}function PS(r,o,u,m){var C=r.length;for(u=ge(u),u<0&&(u=-u>C?0:C+u),m=m===n||m>C?C:ge(m),m<0&&(m+=C),m=u>m?0:Gb(m);u<m;)r[u++]=o;return r}function Tm(r,o){var u=[];return Oi(r,function(m,C,I){o(m,C,I)&&u.push(m)}),u}function Cn(r,o,u,m,C){var I=-1,F=r.length;for(u||(u=g2),C||(C=[]);++I<F;){var W=r[I];o>0&&u(W)?o>1?Cn(W,o-1,u,m,C):Ti(C,W):m||(C[C.length]=W)}return C}var Nh=tb(),Em=tb(!0);function Or(r,o){return r&&Nh(r,o,bn)}function Mh(r,o){return r&&Em(r,o,bn)}function $u(r,o){return ki(o,function(u){return oi(r[u])})}function lo(r,o){o=Ni(o,r);for(var u=0,m=o.length;r!=null&&u<m;)r=r[Nr(o[u++])];return u&&u==m?r:n}function Im(r,o,u){var m=o(r);return ue(r)?m:Ti(m,u(r))}function Dn(r){return r==null?r===n?Xt:_e:io&&io in je(r)?l2(r):w2(r)}function Lh(r,o){return r>o}function kS(r,o){return r!=null&&Xe.call(r,o)}function TS(r,o){return r!=null&&o in je(r)}function ES(r,o,u){return r>=On(o,u)&&r<mn(o,u)}function Dh(r,o,u){for(var m=u?bh:Mu,C=r[0].length,I=r.length,F=I,W=lt(I),Q=1/0,vt=[];F--;){var mt=r[F];F&&o&&(mt=sn(mt,Qn(o))),Q=On(mt.length,Q),W[F]=!u&&(o||C>=120&&mt.length>=120)?new so(F&&mt):n}mt=r[0];var _t=-1,kt=W[0];t:for(;++_t<C&&vt.length<Q;){var Dt=mt[_t],jt=o?o(Dt):Dt;if(Dt=u||Dt!==0?Dt:0,!(kt?Os(kt,jt):m(vt,jt,u))){for(F=I;--F;){var we=W[F];if(!(we?Os(we,jt):m(r[F],jt,u)))continue t}kt&&kt.push(jt),vt.push(Dt)}}return vt}function IS(r,o,u,m){return Or(r,function(C,I,F){o(m,u(C),I,F)}),m}function zs(r,o,u){o=Ni(o,r),r=mb(r,o);var m=r==null?r:r[Nr(fr(o))];return m==null?n:jn(m,r,u)}function Om(r){return fn(r)&&Dn(r)==Wt}function OS(r){return fn(r)&&Dn(r)==Ke}function RS(r){return fn(r)&&Dn(r)==Et}function Vs(r,o,u,m,C){return r===o?!0:r==null||o==null||!fn(r)&&!fn(o)?r!==r&&o!==o:NS(r,o,u,m,Vs,C)}function NS(r,o,u,m,C,I){var F=ue(r),W=ue(o),Q=F?Bt:Rn(r),vt=W?Bt:Rn(o);Q=Q==Wt?he:Q,vt=vt==Wt?he:vt;var mt=Q==he,_t=vt==he,kt=Q==vt;if(kt&&Li(r)){if(!Li(o))return!1;F=!0,mt=!1}if(kt&&!mt)return I||(I=new br),F||Wo(r)?ub(r,o,u,m,C,I):s2(r,o,Q,u,m,C,I);if(!(u&w)){var Dt=mt&&Xe.call(r,"__wrapped__"),jt=_t&&Xe.call(o,"__wrapped__");if(Dt||jt){var we=Dt?r.value():r,Qt=jt?o.value():o;return I||(I=new br),C(we,Qt,u,m,I)}}return kt?(I||(I=new br),a2(r,o,u,m,C,I)):!1}function MS(r){return fn(r)&&Rn(r)==ee}function Fh(r,o,u,m){var C=u.length,I=C,F=!m;if(r==null)return!I;for(r=je(r);C--;){var W=u[C];if(F&&W[2]?W[1]!==r[W[0]]:!(W[0]in r))return!1}for(;++C<I;){W=u[C];var Q=W[0],vt=r[Q],mt=W[1];if(F&&W[2]){if(vt===n&&!(Q in r))return!1}else{var _t=new br;if(m)var kt=m(vt,mt,Q,r,o,_t);if(!(kt===n?Vs(mt,vt,w|S,m,_t):kt))return!1}}return!0}function Rm(r){if(!un(r)||v2(r))return!1;var o=oi(r)?M1:Eo;return o.test(uo(r))}function LS(r){return fn(r)&&Dn(r)==Ht}function DS(r){return fn(r)&&Rn(r)==$t}function FS(r){return fn(r)&&vd(r.length)&&!!tn[Dn(r)]}function Nm(r){return typeof r=="function"?r:r==null?Gn:typeof r=="object"?ue(r)?Dm(r[0],r[1]):Lm(r):e_(r)}function Bh(r){if(!Us(r))return V1(r);var o=[];for(var u in je(r))Xe.call(r,u)&&u!="constructor"&&o.push(u);return o}function BS(r){if(!un(r))return y2(r);var o=Us(r),u=[];for(var m in r)m=="constructor"&&(o||!Xe.call(r,m))||u.push(m);return u}function zh(r,o){return r<o}function Mm(r,o){var u=-1,m=Wn(r)?lt(r.length):[];return Oi(r,function(C,I,F){m[++u]=o(C,I,F)}),m}function Lm(r){var o=tg(r);return o.length==1&&o[0][2]?pb(o[0][0],o[0][1]):function(u){return u===r||Fh(u,r,o)}}function Dm(r,o){return ng(r)&&gb(o)?pb(Nr(r),o):function(u){var m=fg(u,r);return m===n&&m===o?hg(u,r):Vs(o,m,w|S)}}function td(r,o,u,m,C){r!==o&&Nh(o,function(I,F){if(C||(C=new br),un(I))zS(r,o,F,u,td,m,C);else{var W=m?m(ig(r,F),I,F+"",r,o,C):n;W===n&&(W=I),Oh(r,F,W)}},Un)}function zS(r,o,u,m,C,I,F){var W=ig(r,u),Q=ig(o,u),vt=F.get(Q);if(vt){Oh(r,u,vt);return}var mt=I?I(W,Q,u+"",r,o,F):n,_t=mt===n;if(_t){var kt=ue(Q),Dt=!kt&&Li(Q),jt=!kt&&!Dt&&Wo(Q);mt=Q,kt||Dt||jt?ue(W)?mt=W:hn(W)?mt=Hn(W):Dt?(_t=!1,mt=Xm(Q,!0)):jt?(_t=!1,mt=Zm(Q,!0)):mt=[]:Ks(Q)||fo(Q)?(mt=W,fo(W)?mt=Kb(W):(!un(W)||oi(W))&&(mt=hb(Q))):_t=!1}_t&&(F.set(Q,mt),C(mt,Q,m,I,F),F.delete(Q)),Oh(r,u,mt)}function Fm(r,o){var u=r.length;if(u)return o+=o<0?u:0,ii(o,u)?r[o]:n}function Bm(r,o,u){o.length?o=sn(o,function(I){return ue(I)?function(F){return lo(F,I.length===1?I[0]:I)}:I}):o=[Gn];var m=-1;o=sn(o,Qn(Zt()));var C=Mm(r,function(I,F,W){var Q=sn(o,function(vt){return vt(I)});return{criteria:Q,index:++m,value:I}});return f1(C,function(I,F){return JS(I,F,u)})}function VS(r,o){return zm(r,o,function(u,m){return hg(r,m)})}function zm(r,o,u){for(var m=-1,C=o.length,I={};++m<C;){var F=o[m],W=lo(r,F);u(W,F)&&Hs(I,Ni(F,r),W)}return I}function HS(r){return function(o){return lo(o,r)}}function Vh(r,o,u,m){var C=m?d1:Oo,I=-1,F=o.length,W=r;for(r===o&&(o=Hn(o)),u&&(W=sn(r,Qn(u)));++I<F;)for(var Q=0,vt=o[I],mt=u?u(vt):vt;(Q=C(W,mt,Q,m))>-1;)W!==r&&Gu.call(W,Q,1),Gu.call(r,Q,1);return r}function Vm(r,o){for(var u=r?o.length:0,m=u-1;u--;){var C=o[u];if(u==m||C!==I){var I=C;ii(C)?Gu.call(r,C,1):Gh(r,C)}}return r}function Hh(r,o){return r+Yu(ym()*(o-r+1))}function WS(r,o,u,m){for(var C=-1,I=mn(qu((o-r)/(u||1)),0),F=lt(I);I--;)F[m?I:++C]=r,r+=u;return F}function Wh(r,o){var u="";if(!r||o<1||o>ht)return u;do o%2&&(u+=r),o=Yu(o/2),o&&(r+=r);while(o);return u}function Se(r,o){return og(vb(r,o,Gn),r+"")}function US(r){return Sm(Uo(r))}function GS(r,o){var u=Uo(r);return ud(u,ao(o,0,u.length))}function Hs(r,o,u,m){if(!un(r))return r;o=Ni(o,r);for(var C=-1,I=o.length,F=I-1,W=r;W!=null&&++C<I;){var Q=Nr(o[C]),vt=u;if(Q==="__proto__"||Q==="constructor"||Q==="prototype")return r;if(C!=F){var mt=W[Q];vt=m?m(mt,Q,W):n,vt===n&&(vt=un(mt)?mt:ii(o[C+1])?[]:{})}Fs(W,Q,vt),W=W[Q]}return r}var Hm=Xu?function(r,o){return Xu.set(r,o),r}:Gn,KS=Ku?function(r,o){return Ku(r,"toString",{configurable:!0,enumerable:!1,value:pg(o),writable:!0})}:Gn;function qS(r){return ud(Uo(r))}function dr(r,o,u){var m=-1,C=r.length;o<0&&(o=-o>C?0:C+o),u=u>C?C:u,u<0&&(u+=C),C=o>u?0:u-o>>>0,o>>>=0;for(var I=lt(C);++m<C;)I[m]=r[m+o];return I}function YS(r,o){var u;return Oi(r,function(m,C,I){return u=o(m,C,I),!u}),!!u}function ed(r,o,u){var m=0,C=r==null?m:r.length;if(typeof o=="number"&&o===o&&C<=xt){for(;m<C;){var I=m+C>>>1,F=r[I];F!==null&&!$n(F)&&(u?F<=o:F<o)?m=I+1:C=I}return C}return Uh(r,o,Gn,u)}function Uh(r,o,u,m){var C=0,I=r==null?0:r.length;if(I===0)return 0;o=u(o);for(var F=o!==o,W=o===null,Q=$n(o),vt=o===n;C<I;){var mt=Yu((C+I)/2),_t=u(r[mt]),kt=_t!==n,Dt=_t===null,jt=_t===_t,we=$n(_t);if(F)var Qt=m||jt;else vt?Qt=jt&&(m||kt):W?Qt=jt&&kt&&(m||!Dt):Q?Qt=jt&&kt&&!Dt&&(m||!we):Dt||we?Qt=!1:Qt=m?_t<=o:_t<o;Qt?C=mt+1:I=mt}return On(I,st)}function Wm(r,o){for(var u=-1,m=r.length,C=0,I=[];++u<m;){var F=r[u],W=o?o(F):F;if(!u||!_r(W,Q)){var Q=W;I[C++]=F===0?0:F}}return I}function Um(r){return typeof r=="number"?r:$n(r)?yt:+r}function Jn(r){if(typeof r=="string")return r;if(ue(r))return sn(r,Jn)+"";if($n(r))return wm?wm.call(r):"";var o=r+"";return o=="0"&&1/r==-1/0?"-0":o}function Ri(r,o,u){var m=-1,C=Mu,I=r.length,F=!0,W=[],Q=W;if(u)F=!1,C=bh;else if(I>=s){var vt=o?null:i2(r);if(vt)return Du(vt);F=!1,C=Os,Q=new so}else Q=o?[]:W;t:for(;++m<I;){var mt=r[m],_t=o?o(mt):mt;if(mt=u||mt!==0?mt:0,F&&_t===_t){for(var kt=Q.length;kt--;)if(Q[kt]===_t)continue t;o&&Q.push(_t),W.push(mt)}else C(Q,_t,u)||(Q!==W&&Q.push(_t),W.push(mt))}return W}function Gh(r,o){return o=Ni(o,r),r=mb(r,o),r==null||delete r[Nr(fr(o))]}function Gm(r,o,u,m){return Hs(r,o,u(lo(r,o)),m)}function nd(r,o,u,m){for(var C=r.length,I=m?C:-1;(m?I--:++I<C)&&o(r[I],I,r););return u?dr(r,m?0:I,m?I+1:C):dr(r,m?I+1:0,m?C:I)}function Km(r,o){var u=r;return u instanceof Re&&(u=u.value()),_h(o,function(m,C){return C.func.apply(C.thisArg,Ti([m],C.args))},u)}function Kh(r,o,u){var m=r.length;if(m<2)return m?Ri(r[0]):[];for(var C=-1,I=lt(m);++C<m;)for(var F=r[C],W=-1;++W<m;)W!=C&&(I[C]=Bs(I[C]||F,r[W],o,u));return Ri(Cn(I,1),o,u)}function qm(r,o,u){for(var m=-1,C=r.length,I=o.length,F={};++m<C;){var W=m<I?o[m]:n;u(F,r[m],W)}return F}function qh(r){return hn(r)?r:[]}function Yh(r){return typeof r=="function"?r:Gn}function Ni(r,o){return ue(r)?r:ng(r,o)?[r]:wb(Ge(r))}var XS=Se;function Mi(r,o,u){var m=r.length;return u=u===n?m:u,!o&&u>=m?r:dr(r,o,u)}var Ym=L1||function(r){return Sn.clearTimeout(r)};function Xm(r,o){if(o)return r.slice();var u=r.length,m=pm?pm(u):new r.constructor(u);return r.copy(m),m}function Xh(r){var o=new r.constructor(r.byteLength);return new Wu(o).set(new Wu(r)),o}function ZS(r,o){var u=o?Xh(r.buffer):r.buffer;return new r.constructor(u,r.byteOffset,r.byteLength)}function jS(r){var o=new r.constructor(r.source,Pi.exec(r));return o.lastIndex=r.lastIndex,o}function QS(r){return Ds?je(Ds.call(r)):{}}function Zm(r,o){var u=o?Xh(r.buffer):r.buffer;return new r.constructor(u,r.byteOffset,r.length)}function jm(r,o){if(r!==o){var u=r!==n,m=r===null,C=r===r,I=$n(r),F=o!==n,W=o===null,Q=o===o,vt=$n(o);if(!W&&!vt&&!I&&r>o||I&&F&&Q&&!W&&!vt||m&&F&&Q||!u&&Q||!C)return 1;if(!m&&!I&&!vt&&r<o||vt&&u&&C&&!m&&!I||W&&u&&C||!F&&C||!Q)return-1}return 0}function JS(r,o,u){for(var m=-1,C=r.criteria,I=o.criteria,F=C.length,W=u.length;++m<F;){var Q=jm(C[m],I[m]);if(Q){if(m>=W)return Q;var vt=u[m];return Q*(vt=="desc"?-1:1)}}return r.index-o.index}function Qm(r,o,u,m){for(var C=-1,I=r.length,F=u.length,W=-1,Q=o.length,vt=mn(I-F,0),mt=lt(Q+vt),_t=!m;++W<Q;)mt[W]=o[W];for(;++C<F;)(_t||C<I)&&(mt[u[C]]=r[C]);for(;vt--;)mt[W++]=r[C++];return mt}function Jm(r,o,u,m){for(var C=-1,I=r.length,F=-1,W=u.length,Q=-1,vt=o.length,mt=mn(I-W,0),_t=lt(mt+vt),kt=!m;++C<mt;)_t[C]=r[C];for(var Dt=C;++Q<vt;)_t[Dt+Q]=o[Q];for(;++F<W;)(kt||C<I)&&(_t[Dt+u[F]]=r[C++]);return _t}function Hn(r,o){var u=-1,m=r.length;for(o||(o=lt(m));++u<m;)o[u]=r[u];return o}function Rr(r,o,u,m){var C=!u;u||(u={});for(var I=-1,F=o.length;++I<F;){var W=o[I],Q=m?m(u[W],r[W],W,u,r):n;Q===n&&(Q=r[W]),C?ei(u,W,Q):Fs(u,W,Q)}return u}function $S(r,o){return Rr(r,eg(r),o)}function t2(r,o){return Rr(r,db(r),o)}function rd(r,o){return function(u,m){var C=ue(u)?o1:xS,I=o?o():{};return C(u,r,Zt(m,2),I)}}function zo(r){return Se(function(o,u){var m=-1,C=u.length,I=C>1?u[C-1]:n,F=C>2?u[2]:n;for(I=r.length>3&&typeof I=="function"?(C--,I):n,F&&Fn(u[0],u[1],F)&&(I=C<3?n:I,C=1),o=je(o);++m<C;){var W=u[m];W&&r(o,W,m,I)}return o})}function $m(r,o){return function(u,m){if(u==null)return u;if(!Wn(u))return r(u,m);for(var C=u.length,I=o?C:-1,F=je(u);(o?I--:++I<C)&&m(F[I],I,F)!==!1;);return u}}function tb(r){return function(o,u,m){for(var C=-1,I=je(o),F=m(o),W=F.length;W--;){var Q=F[r?W:++C];if(u(I[Q],Q,I)===!1)break}return o}}function e2(r,o,u){var m=o&x,C=Ws(r);function I(){var F=this&&this!==Sn&&this instanceof I?C:r;return F.apply(m?u:this,arguments)}return I}function eb(r){return function(o){o=Ge(o);var u=Ro(o)?mr(o):n,m=u?u[0]:o.charAt(0),C=u?Mi(u,1).join(""):o.slice(1);return m[r]()+C}}function Vo(r){return function(o){return _h($b(Jb(o).replace(Kx,"")),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 u=Bo(r.prototype),m=r.apply(u,o);return un(m)?m:u}}function n2(r,o,u){var m=Ws(r);function C(){for(var I=arguments.length,F=lt(I),W=I,Q=Ho(C);W--;)F[W]=arguments[W];var vt=I<3&&F[0]!==Q&&F[I-1]!==Q?[]:Ei(F,Q);if(I-=vt.length,I<u)return sb(r,o,id,C.placeholder,n,F,vt,n,n,u-I);var mt=this&&this!==Sn&&this instanceof C?m:r;return jn(mt,this,F)}return C}function nb(r){return function(o,u,m){var C=je(o);if(!Wn(o)){var I=Zt(u,3);o=bn(o),u=function(W){return I(C[W],W,C)}}var F=r(o,u,m);return F>-1?C[I?o[F]:F]:n}}function rb(r){return ri(function(o){var u=o.length,m=u,C=cr.prototype.thru;for(r&&o.reverse();m--;){var I=o[m];if(typeof I!="function")throw new lr(a);if(C&&!F&&ld(I)=="wrapper")var F=new cr([],!0)}for(m=F?m:u;++m<u;){I=o[m];var W=ld(I),Q=W=="wrapper"?$h(I):n;Q&&rg(Q[0])&&Q[1]==(M|D|L|H)&&!Q[4].length&&Q[9]==1?F=F[ld(Q[0])].apply(F,Q[3]):F=I.length==1&&rg(I)?F[W]():F.thru(I)}return function(){var vt=arguments,mt=vt[0];if(F&&vt.length==1&&ue(mt))return F.plant(mt).value();for(var _t=0,kt=u?o[_t].apply(this,vt):mt;++_t<u;)kt=o[_t].call(this,kt);return kt}})}function id(r,o,u,m,C,I,F,W,Q,vt){var mt=o&M,_t=o&x,kt=o&A,Dt=o&(D|R),jt=o&j,we=kt?n:Ws(r);function Qt(){for(var Ie=arguments.length,Me=lt(Ie),tr=Ie;tr--;)Me[tr]=arguments[tr];if(Dt)var Bn=Ho(Qt),er=g1(Me,Bn);if(m&&(Me=Qm(Me,m,C,Dt)),I&&(Me=Jm(Me,I,F,Dt)),Ie-=er,Dt&&Ie<vt){var gn=Ei(Me,Bn);return sb(r,o,id,Qt.placeholder,u,Me,gn,W,Q,vt-Ie)}var yr=_t?u:this,ai=kt?yr[r]:r;return Ie=Me.length,W?Me=x2(Me,W):jt&&Ie>1&&Me.reverse(),mt&&Q<Ie&&(Me.length=Q),this&&this!==Sn&&this instanceof Qt&&(ai=we||Ws(ai)),ai.apply(yr,Me)}return Qt}function ib(r,o){return function(u,m){return IS(u,r,o(m),{})}}function od(r,o){return function(u,m){var C;if(u===n&&m===n)return o;if(u!==n&&(C=u),m!==n){if(C===n)return m;typeof u=="string"||typeof m=="string"?(u=Jn(u),m=Jn(m)):(u=Um(u),m=Um(m)),C=r(u,m)}return C}}function Zh(r){return ri(function(o){return o=sn(o,Qn(Zt())),Se(function(u){var m=this;return r(o,function(C){return jn(C,m,u)})})})}function sd(r,o){o=o===n?" ":Jn(o);var u=o.length;if(u<2)return u?Wh(o,r):o;var m=Wh(o,qu(r/No(o)));return Ro(o)?Mi(mr(m),0,r).join(""):m.slice(0,r)}function r2(r,o,u,m){var C=o&x,I=Ws(r);function F(){for(var W=-1,Q=arguments.length,vt=-1,mt=m.length,_t=lt(mt+Q),kt=this&&this!==Sn&&this instanceof F?I:r;++vt<mt;)_t[vt]=m[vt];for(;Q--;)_t[vt++]=arguments[++W];return jn(kt,C?u:this,_t)}return F}function ob(r){return function(o,u,m){return m&&typeof m!="number"&&Fn(o,u,m)&&(u=m=n),o=si(o),u===n?(u=o,o=0):u=si(u),m=m===n?o<u?1:-1:si(m),WS(o,u,m,r)}}function ad(r){return function(o,u){return typeof o=="string"&&typeof u=="string"||(o=hr(o),u=hr(u)),r(o,u)}}function sb(r,o,u,m,C,I,F,W,Q,vt){var mt=o&D,_t=mt?F:n,kt=mt?n:F,Dt=mt?I:n,jt=mt?n:I;o|=mt?L:V,o&=~(mt?V:L),o&T||(o&=-4);var we=[r,o,C,Dt,_t,jt,kt,W,Q,vt],Qt=u.apply(n,we);return rg(r)&&bb(Qt,we),Qt.placeholder=m,_b(Qt,r,o)}function jh(r){var o=vn[r];return function(u,m){if(u=hr(u),m=m==null?0:On(ge(m),292),m&&_m(u)){var C=(Ge(u)+"e").split("e"),I=o(C[0]+"e"+(+C[1]+m));return C=(Ge(I)+"e").split("e"),+(C[0]+"e"+(+C[1]-m))}return o(u)}}var i2=Do&&1/Du(new Do([,-0]))[1]==rt?function(r){return new Do(r)}:bg;function ab(r){return function(o){var u=Rn(o);return u==ee?Ph(o):u==$t?w1(o):h1(o,r(o))}}function ni(r,o,u,m,C,I,F,W){var Q=o&A;if(!Q&&typeof r!="function")throw new lr(a);var vt=m?m.length:0;if(vt||(o&=-97,m=C=n),F=F===n?F:mn(ge(F),0),W=W===n?W:ge(W),vt-=C?C.length:0,o&V){var mt=m,_t=C;m=C=n}var kt=Q?n:$h(r),Dt=[r,o,u,m,C,mt,_t,I,F,W];if(kt&&_2(Dt,kt),r=Dt[0],o=Dt[1],u=Dt[2],m=Dt[3],C=Dt[4],W=Dt[9]=Dt[9]===n?Q?0:r.length:mn(Dt[9]-vt,0),!W&&o&(D|R)&&(o&=-25),!o||o==x)var jt=e2(r,o,u);else o==D||o==R?jt=n2(r,o,W):(o==L||o==(x|L))&&!C.length?jt=r2(r,o,u,m):jt=id.apply(n,Dt);var we=kt?Hm:bb;return _b(we(jt,Dt),r,o)}function lb(r,o,u,m){return r===n||_r(r,Lo[u])&&!Xe.call(m,u)?o:r}function cb(r,o,u,m,C,I){return un(r)&&un(o)&&(I.set(o,r),td(r,o,n,cb,I),I.delete(o)),r}function o2(r){return Ks(r)?n:r}function ub(r,o,u,m,C,I){var F=u&w,W=r.length,Q=o.length;if(W!=Q&&!(F&&Q>W))return!1;var vt=I.get(r),mt=I.get(o);if(vt&&mt)return vt==o&&mt==r;var _t=-1,kt=!0,Dt=u&S?new so:n;for(I.set(r,o),I.set(o,r);++_t<W;){var jt=r[_t],we=o[_t];if(m)var Qt=F?m(we,jt,_t,o,r,I):m(jt,we,_t,r,o,I);if(Qt!==n){if(Qt)continue;kt=!1;break}if(Dt){if(!yh(o,function(Ie,Me){if(!Os(Dt,Me)&&(jt===Ie||C(jt,Ie,u,m,I)))return Dt.push(Me)})){kt=!1;break}}else if(!(jt===we||C(jt,we,u,m,I))){kt=!1;break}}return I.delete(r),I.delete(o),kt}function s2(r,o,u,m,C,I,F){switch(u){case qe:if(r.byteLength!=o.byteLength||r.byteOffset!=o.byteOffset)return!1;r=r.buffer,o=o.buffer;case Ke:return!(r.byteLength!=o.byteLength||!I(new Wu(r),new Wu(o)));case Ut:case Et:case Yt:return _r(+r,+o);case Rt:return r.name==o.name&&r.message==o.message;case Ht:case ye:return r==o+"";case ee:var W=Ph;case $t:var Q=m&w;if(W||(W=Du),r.size!=o.size&&!Q)return!1;var vt=F.get(r);if(vt)return vt==o;m|=S,F.set(r,o);var mt=ub(W(r),W(o),m,C,I,F);return F.delete(r),mt;case zt:if(Ds)return Ds.call(r)==Ds.call(o)}return!1}function a2(r,o,u,m,C,I){var F=u&w,W=Qh(r),Q=W.length,vt=Qh(o),mt=vt.length;if(Q!=mt&&!F)return!1;for(var _t=Q;_t--;){var kt=W[_t];if(!(F?kt in o:Xe.call(o,kt)))return!1}var Dt=I.get(r),jt=I.get(o);if(Dt&&jt)return Dt==o&&jt==r;var we=!0;I.set(r,o),I.set(o,r);for(var Qt=F;++_t<Q;){kt=W[_t];var Ie=r[kt],Me=o[kt];if(m)var tr=F?m(Me,Ie,kt,o,r,I):m(Ie,Me,kt,r,o,I);if(!(tr===n?Ie===Me||C(Ie,Me,u,m,I):tr)){we=!1;break}Qt||(Qt=kt=="constructor")}if(we&&!Qt){var Bn=r.constructor,er=o.constructor;Bn!=er&&"constructor"in r&&"constructor"in o&&!(typeof Bn=="function"&&Bn instanceof Bn&&typeof er=="function"&&er instanceof er)&&(we=!1)}return I.delete(r),I.delete(o),we}function ri(r){return og(vb(r,n,Ab),r+"")}function Qh(r){return Im(r,bn,eg)}function Jh(r){return Im(r,Un,db)}var $h=Xu?function(r){return Xu.get(r)}:bg;function ld(r){for(var o=r.name+"",u=Fo[o],m=Xe.call(Fo,o)?u.length:0;m--;){var C=u[m],I=C.func;if(I==null||I==r)return C.name}return o}function Ho(r){var o=Xe.call(P,"placeholder")?P:r;return o.placeholder}function Zt(){var r=P.iteratee||vg;return r=r===vg?Nm:r,arguments.length?r(arguments[0],arguments[1]):r}function cd(r,o){var u=r.__data__;return p2(o)?u[typeof o=="string"?"string":"hash"]:u.map}function tg(r){for(var o=bn(r),u=o.length;u--;){var m=o[u],C=r[m];o[u]=[m,C,gb(C)]}return o}function co(r,o){var u=b1(r,o);return Rm(u)?u:n}function l2(r){var o=Xe.call(r,io),u=r[io];try{r[io]=n;var m=!0}catch{}var C=Vu.call(r);return m&&(o?r[io]=u:delete r[io]),C}var eg=Th?function(r){return r==null?[]:(r=je(r),ki(Th(r),function(o){return mm.call(r,o)}))}:_g,db=Th?function(r){for(var o=[];r;)Ti(o,eg(r)),r=Uu(r);return o}:_g,Rn=Dn;(Eh&&Rn(new Eh(new ArrayBuffer(1)))!=qe||Ns&&Rn(new Ns)!=ee||Ih&&Rn(Ih.resolve())!=Be||Do&&Rn(new Do)!=$t||Ms&&Rn(new Ms)!=fe)&&(Rn=function(r){var o=Dn(r),u=o==he?r.constructor:n,m=u?uo(u):"";if(m)switch(m){case G1:return qe;case K1:return ee;case q1:return Be;case Y1:return $t;case X1:return fe}return o});function c2(r,o,u){for(var m=-1,C=u.length;++m<C;){var I=u[m],F=I.size;switch(I.type){case"drop":r+=F;break;case"dropRight":o-=F;break;case"take":o=On(o,r+F);break;case"takeRight":r=mn(r,o-F);break}}return{start:r,end:o}}function u2(r){var o=r.match(xn);return o?o[1].split(on):[]}function fb(r,o,u){o=Ni(o,r);for(var m=-1,C=o.length,I=!1;++m<C;){var F=Nr(o[m]);if(!(I=r!=null&&u(r,F)))break;r=r[F]}return I||++m!=C?I:(C=r==null?0:r.length,!!C&&vd(C)&&ii(F,C)&&(ue(r)||fo(r)))}function d2(r){var o=r.length,u=new r.constructor(o);return o&&typeof r[0]=="string"&&Xe.call(r,"index")&&(u.index=r.index,u.input=r.input),u}function hb(r){return typeof r.constructor=="function"&&!Us(r)?Bo(Uu(r)):{}}function f2(r,o,u){var m=r.constructor;switch(o){case Ke:return Xh(r);case Ut:case Et:return new m(+r);case qe:return ZS(r,u);case Pe:case ze:case De:case Ye:case ne:case oe:case an:case Ft:case Gt:return Zm(r,u);case ee:return new m;case Yt:case ye:return new m(r);case Ht:return jS(r);case $t:return new m;case zt:return QS(r)}}function h2(r,o){var u=o.length;if(!u)return r;var m=u-1;return o[m]=(u>1?"& ":"")+o[m],o=o.join(u>2?", ":" "),r.replace(vr,`{
|
|
420
|
+
/* [wrapped with `+o+`] */
|
|
421
|
+
`)}function g2(r){return ue(r)||fo(r)||!!(bm&&r&&r[bm])}function ii(r,o){var u=typeof r;return o=o??ht,!!o&&(u=="number"||u!="symbol"&&Qr.test(r))&&r>-1&&r%1==0&&r<o}function Fn(r,o,u){if(!un(u))return!1;var m=typeof o;return(m=="number"?Wn(u)&&ii(o,u.length):m=="string"&&o in u)?_r(u[o],r):!1}function ng(r,o){if(ue(r))return!1;var u=typeof r;return u=="number"||u=="symbol"||u=="boolean"||r==null||$n(r)?!0:Tn.test(r)||!ln.test(r)||o!=null&&r in je(o)}function p2(r){var o=typeof r;return o=="string"||o=="number"||o=="symbol"||o=="boolean"?r!=="__proto__":r===null}function rg(r){var o=ld(r),u=P[o];if(typeof u!="function"||!(o in Re.prototype))return!1;if(r===u)return!0;var m=$h(u);return!!m&&r===m[0]}function v2(r){return!!gm&&gm in r}var m2=Bu?oi:yg;function Us(r){var o=r&&r.constructor,u=typeof o=="function"&&o.prototype||Lo;return r===u}function gb(r){return r===r&&!un(r)}function pb(r,o){return function(u){return u==null?!1:u[r]===o&&(o!==n||r in je(u))}}function b2(r){var o=gd(r,function(m){return u.size===h&&u.clear(),m}),u=o.cache;return o}function _2(r,o){var u=r[1],m=o[1],C=u|m,I=C<(x|A|M),F=m==M&&u==D||m==M&&u==H&&r[7].length<=o[8]||m==(M|H)&&o[7].length<=o[8]&&u==D;if(!(I||F))return r;m&x&&(r[2]=o[2],C|=u&x?0:T);var W=o[3];if(W){var Q=r[3];r[3]=Q?Qm(Q,W,o[4]):W,r[4]=Q?Ei(r[3],g):o[4]}return W=o[5],W&&(Q=r[5],r[5]=Q?Jm(Q,W,o[6]):W,r[6]=Q?Ei(r[5],g):o[6]),W=o[7],W&&(r[7]=W),m&M&&(r[8]=r[8]==null?o[8]:On(r[8],o[8])),r[9]==null&&(r[9]=o[9]),r[0]=o[0],r[1]=C,r}function y2(r){var o=[];if(r!=null)for(var u in je(r))o.push(u);return o}function w2(r){return Vu.call(r)}function vb(r,o,u){return o=mn(o===n?r.length-1:o,0),function(){for(var m=arguments,C=-1,I=mn(m.length-o,0),F=lt(I);++C<I;)F[C]=m[o+C];C=-1;for(var W=lt(o+1);++C<o;)W[C]=m[C];return W[o]=u(F),jn(r,this,W)}}function mb(r,o){return o.length<2?r:lo(r,dr(o,0,-1))}function x2(r,o){for(var u=r.length,m=On(o.length,u),C=Hn(r);m--;){var I=o[m];r[m]=ii(I,u)?C[I]:n}return r}function ig(r,o){if(!(o==="constructor"&&typeof r[o]=="function")&&o!="__proto__")return r[o]}var bb=yb(Hm),Gs=F1||function(r,o){return Sn.setTimeout(r,o)},og=yb(KS);function _b(r,o,u){var m=o+"";return og(r,h2(m,S2(u2(m),u)))}function yb(r){var o=0,u=0;return function(){var m=H1(),C=ot-(m-u);if(u=m,C>0){if(++o>=G)return arguments[0]}else o=0;return r.apply(n,arguments)}}function ud(r,o){var u=-1,m=r.length,C=m-1;for(o=o===n?m:o;++u<o;){var I=Hh(u,C),F=r[I];r[I]=r[u],r[u]=F}return r.length=o,r}var wb=b2(function(r){var o=[];return r.charCodeAt(0)===46&&o.push(""),r.replace(En,function(u,m,C,I){o.push(C?I.replace(jr,"$1"):m||u)}),o});function Nr(r){if(typeof r=="string"||$n(r))return r;var o=r+"";return o=="0"&&1/r==-1/0?"-0":o}function uo(r){if(r!=null){try{return zu.call(r)}catch{}try{return r+""}catch{}}return""}function S2(r,o){return ar(Lt,function(u){var m="_."+u[0];o&u[1]&&!Mu(r,m)&&r.push(m)}),r.sort()}function xb(r){if(r instanceof Re)return r.clone();var o=new cr(r.__wrapped__,r.__chain__);return o.__actions__=Hn(r.__actions__),o.__index__=r.__index__,o.__values__=r.__values__,o}function C2(r,o,u){(u?Fn(r,o,u):o===n)?o=1:o=mn(ge(o),0);var m=r==null?0:r.length;if(!m||o<1)return[];for(var C=0,I=0,F=lt(qu(m/o));C<m;)F[I++]=dr(r,C,C+=o);return F}function A2(r){for(var o=-1,u=r==null?0:r.length,m=0,C=[];++o<u;){var I=r[o];I&&(C[m++]=I)}return C}function P2(){var r=arguments.length;if(!r)return[];for(var o=lt(r-1),u=arguments[0],m=r;m--;)o[m-1]=arguments[m];return Ti(ue(u)?Hn(u):[u],Cn(o,1))}var k2=Se(function(r,o){return hn(r)?Bs(r,Cn(o,1,hn,!0)):[]}),T2=Se(function(r,o){var u=fr(o);return hn(u)&&(u=n),hn(r)?Bs(r,Cn(o,1,hn,!0),Zt(u,2)):[]}),E2=Se(function(r,o){var u=fr(o);return hn(u)&&(u=n),hn(r)?Bs(r,Cn(o,1,hn,!0),n,u):[]});function I2(r,o,u){var m=r==null?0:r.length;return m?(o=u||o===n?1:ge(o),dr(r,o<0?0:o,m)):[]}function O2(r,o,u){var m=r==null?0:r.length;return m?(o=u||o===n?1:ge(o),o=m-o,dr(r,0,o<0?0:o)):[]}function R2(r,o){return r&&r.length?nd(r,Zt(o,3),!0,!0):[]}function N2(r,o){return r&&r.length?nd(r,Zt(o,3),!0):[]}function M2(r,o,u,m){var C=r==null?0:r.length;return C?(u&&typeof u!="number"&&Fn(r,o,u)&&(u=0,m=C),PS(r,o,u,m)):[]}function Sb(r,o,u){var m=r==null?0:r.length;if(!m)return-1;var C=u==null?0:ge(u);return C<0&&(C=mn(m+C,0)),Lu(r,Zt(o,3),C)}function Cb(r,o,u){var m=r==null?0:r.length;if(!m)return-1;var C=m-1;return u!==n&&(C=ge(u),C=u<0?mn(m+C,0):On(C,m-1)),Lu(r,Zt(o,3),C,!0)}function Ab(r){var o=r==null?0:r.length;return o?Cn(r,1):[]}function L2(r){var o=r==null?0:r.length;return o?Cn(r,rt):[]}function D2(r,o){var u=r==null?0:r.length;return u?(o=o===n?1:ge(o),Cn(r,o)):[]}function F2(r){for(var o=-1,u=r==null?0:r.length,m={};++o<u;){var C=r[o];m[C[0]]=C[1]}return m}function Pb(r){return r&&r.length?r[0]:n}function B2(r,o,u){var m=r==null?0:r.length;if(!m)return-1;var C=u==null?0:ge(u);return C<0&&(C=mn(m+C,0)),Oo(r,o,C)}function z2(r){var o=r==null?0:r.length;return o?dr(r,0,-1):[]}var V2=Se(function(r){var o=sn(r,qh);return o.length&&o[0]===r[0]?Dh(o):[]}),H2=Se(function(r){var o=fr(r),u=sn(r,qh);return o===fr(u)?o=n:u.pop(),u.length&&u[0]===r[0]?Dh(u,Zt(o,2)):[]}),W2=Se(function(r){var o=fr(r),u=sn(r,qh);return o=typeof o=="function"?o:n,o&&u.pop(),u.length&&u[0]===r[0]?Dh(u,n,o):[]});function U2(r,o){return r==null?"":z1.call(r,o)}function fr(r){var o=r==null?0:r.length;return o?r[o-1]:n}function G2(r,o,u){var m=r==null?0:r.length;if(!m)return-1;var C=m;return u!==n&&(C=ge(u),C=C<0?mn(m+C,0):On(C,m-1)),o===o?S1(r,o,C):Lu(r,sm,C,!0)}function K2(r,o){return r&&r.length?Fm(r,ge(o)):n}var q2=Se(kb);function kb(r,o){return r&&r.length&&o&&o.length?Vh(r,o):r}function Y2(r,o,u){return r&&r.length&&o&&o.length?Vh(r,o,Zt(u,2)):r}function X2(r,o,u){return r&&r.length&&o&&o.length?Vh(r,o,n,u):r}var Z2=ri(function(r,o){var u=r==null?0:r.length,m=Rh(r,o);return Vm(r,sn(o,function(C){return ii(C,u)?+C:C}).sort(jm)),m});function j2(r,o){var u=[];if(!(r&&r.length))return u;var m=-1,C=[],I=r.length;for(o=Zt(o,3);++m<I;){var F=r[m];o(F,m,r)&&(u.push(F),C.push(m))}return Vm(r,C),u}function sg(r){return r==null?r:U1.call(r)}function Q2(r,o,u){var m=r==null?0:r.length;return m?(u&&typeof u!="number"&&Fn(r,o,u)?(o=0,u=m):(o=o==null?0:ge(o),u=u===n?m:ge(u)),dr(r,o,u)):[]}function J2(r,o){return ed(r,o)}function $2(r,o,u){return Uh(r,o,Zt(u,2))}function tC(r,o){var u=r==null?0:r.length;if(u){var m=ed(r,o);if(m<u&&_r(r[m],o))return m}return-1}function eC(r,o){return ed(r,o,!0)}function nC(r,o,u){return Uh(r,o,Zt(u,2),!0)}function rC(r,o){var u=r==null?0:r.length;if(u){var m=ed(r,o,!0)-1;if(_r(r[m],o))return m}return-1}function iC(r){return r&&r.length?Wm(r):[]}function oC(r,o){return r&&r.length?Wm(r,Zt(o,2)):[]}function sC(r){var o=r==null?0:r.length;return o?dr(r,1,o):[]}function aC(r,o,u){return r&&r.length?(o=u||o===n?1:ge(o),dr(r,0,o<0?0:o)):[]}function lC(r,o,u){var m=r==null?0:r.length;return m?(o=u||o===n?1:ge(o),o=m-o,dr(r,o<0?0:o,m)):[]}function cC(r,o){return r&&r.length?nd(r,Zt(o,3),!1,!0):[]}function uC(r,o){return r&&r.length?nd(r,Zt(o,3)):[]}var dC=Se(function(r){return Ri(Cn(r,1,hn,!0))}),fC=Se(function(r){var o=fr(r);return hn(o)&&(o=n),Ri(Cn(r,1,hn,!0),Zt(o,2))}),hC=Se(function(r){var o=fr(r);return o=typeof o=="function"?o:n,Ri(Cn(r,1,hn,!0),n,o)});function gC(r){return r&&r.length?Ri(r):[]}function pC(r,o){return r&&r.length?Ri(r,Zt(o,2)):[]}function vC(r,o){return o=typeof o=="function"?o:n,r&&r.length?Ri(r,n,o):[]}function ag(r){if(!(r&&r.length))return[];var o=0;return r=ki(r,function(u){if(hn(u))return o=mn(u.length,o),!0}),Ch(o,function(u){return sn(r,wh(u))})}function Tb(r,o){if(!(r&&r.length))return[];var u=ag(r);return o==null?u:sn(u,function(m){return jn(o,n,m)})}var mC=Se(function(r,o){return hn(r)?Bs(r,o):[]}),bC=Se(function(r){return Kh(ki(r,hn))}),_C=Se(function(r){var o=fr(r);return hn(o)&&(o=n),Kh(ki(r,hn),Zt(o,2))}),yC=Se(function(r){var o=fr(r);return o=typeof o=="function"?o:n,Kh(ki(r,hn),n,o)}),wC=Se(ag);function xC(r,o){return qm(r||[],o||[],Fs)}function SC(r,o){return qm(r||[],o||[],Hs)}var CC=Se(function(r){var o=r.length,u=o>1?r[o-1]:n;return u=typeof u=="function"?(r.pop(),u):n,Tb(r,u)});function Eb(r){var o=P(r);return o.__chain__=!0,o}function AC(r,o){return o(r),r}function dd(r,o){return o(r)}var PC=ri(function(r){var o=r.length,u=o?r[0]:0,m=this.__wrapped__,C=function(I){return Rh(I,r)};return o>1||this.__actions__.length||!(m instanceof Re)||!ii(u)?this.thru(C):(m=m.slice(u,+u+(o?1:0)),m.__actions__.push({func:dd,args:[C],thisArg:n}),new cr(m,this.__chain__).thru(function(I){return o&&!I.length&&I.push(n),I}))});function kC(){return Eb(this)}function TC(){return new cr(this.value(),this.__chain__)}function EC(){this.__values__===n&&(this.__values__=Ub(this.value()));var r=this.__index__>=this.__values__.length,o=r?n:this.__values__[this.__index__++];return{done:r,value:o}}function IC(){return this}function OC(r){for(var o,u=this;u instanceof ju;){var m=xb(u);m.__index__=0,m.__values__=n,o?C.__wrapped__=m:o=m;var C=m;u=u.__wrapped__}return C.__wrapped__=r,o}function RC(){var r=this.__wrapped__;if(r instanceof Re){var o=r;return this.__actions__.length&&(o=new Re(this)),o=o.reverse(),o.__actions__.push({func:dd,args:[sg],thisArg:n}),new cr(o,this.__chain__)}return this.thru(sg)}function NC(){return Km(this.__wrapped__,this.__actions__)}var MC=rd(function(r,o,u){Xe.call(r,u)?++r[u]:ei(r,u,1)});function LC(r,o,u){var m=ue(r)?im:AS;return u&&Fn(r,o,u)&&(o=n),m(r,Zt(o,3))}function DC(r,o){var u=ue(r)?ki:Tm;return u(r,Zt(o,3))}var FC=nb(Sb),BC=nb(Cb);function zC(r,o){return Cn(fd(r,o),1)}function VC(r,o){return Cn(fd(r,o),rt)}function HC(r,o,u){return u=u===n?1:ge(u),Cn(fd(r,o),u)}function Ib(r,o){var u=ue(r)?ar:Oi;return u(r,Zt(o,3))}function Ob(r,o){var u=ue(r)?s1:km;return u(r,Zt(o,3))}var WC=rd(function(r,o,u){Xe.call(r,u)?r[u].push(o):ei(r,u,[o])});function UC(r,o,u,m){r=Wn(r)?r:Uo(r),u=u&&!m?ge(u):0;var C=r.length;return u<0&&(u=mn(C+u,0)),md(r)?u<=C&&r.indexOf(o,u)>-1:!!C&&Oo(r,o,u)>-1}var GC=Se(function(r,o,u){var m=-1,C=typeof o=="function",I=Wn(r)?lt(r.length):[];return Oi(r,function(F){I[++m]=C?jn(o,F,u):zs(F,o,u)}),I}),KC=rd(function(r,o,u){ei(r,u,o)});function fd(r,o){var u=ue(r)?sn:Mm;return u(r,Zt(o,3))}function qC(r,o,u,m){return r==null?[]:(ue(o)||(o=o==null?[]:[o]),u=m?n:u,ue(u)||(u=u==null?[]:[u]),Bm(r,o,u))}var YC=rd(function(r,o,u){r[u?0:1].push(o)},function(){return[[],[]]});function XC(r,o,u){var m=ue(r)?_h:lm,C=arguments.length<3;return m(r,Zt(o,4),u,C,Oi)}function ZC(r,o,u){var m=ue(r)?a1:lm,C=arguments.length<3;return m(r,Zt(o,4),u,C,km)}function jC(r,o){var u=ue(r)?ki:Tm;return u(r,pd(Zt(o,3)))}function QC(r){var o=ue(r)?Sm:US;return o(r)}function JC(r,o,u){(u?Fn(r,o,u):o===n)?o=1:o=ge(o);var m=ue(r)?yS:GS;return m(r,o)}function $C(r){var o=ue(r)?wS:qS;return o(r)}function tA(r){if(r==null)return 0;if(Wn(r))return md(r)?No(r):r.length;var o=Rn(r);return o==ee||o==$t?r.size:Bh(r).length}function eA(r,o,u){var m=ue(r)?yh:YS;return u&&Fn(r,o,u)&&(o=n),m(r,Zt(o,3))}var nA=Se(function(r,o){if(r==null)return[];var u=o.length;return u>1&&Fn(r,o[0],o[1])?o=[]:u>2&&Fn(o[0],o[1],o[2])&&(o=[o[0]]),Bm(r,Cn(o,1),[])}),hd=D1||function(){return Sn.Date.now()};function rA(r,o){if(typeof o!="function")throw new lr(a);return r=ge(r),function(){if(--r<1)return o.apply(this,arguments)}}function Rb(r,o,u){return o=u?n:o,o=r&&o==null?r.length:o,ni(r,M,n,n,n,n,o)}function Nb(r,o){var u;if(typeof o!="function")throw new lr(a);return r=ge(r),function(){return--r>0&&(u=o.apply(this,arguments)),r<=1&&(o=n),u}}var lg=Se(function(r,o,u){var m=x;if(u.length){var C=Ei(u,Ho(lg));m|=L}return ni(r,m,o,u,C)}),Mb=Se(function(r,o,u){var m=x|A;if(u.length){var C=Ei(u,Ho(Mb));m|=L}return ni(o,m,r,u,C)});function Lb(r,o,u){o=u?n:o;var m=ni(r,D,n,n,n,n,n,o);return m.placeholder=Lb.placeholder,m}function Db(r,o,u){o=u?n:o;var m=ni(r,R,n,n,n,n,n,o);return m.placeholder=Db.placeholder,m}function Fb(r,o,u){var m,C,I,F,W,Q,vt=0,mt=!1,_t=!1,kt=!0;if(typeof r!="function")throw new lr(a);o=hr(o)||0,un(u)&&(mt=!!u.leading,_t="maxWait"in u,I=_t?mn(hr(u.maxWait)||0,o):I,kt="trailing"in u?!!u.trailing:kt);function Dt(gn){var yr=m,ai=C;return m=C=n,vt=gn,F=r.apply(ai,yr),F}function jt(gn){return vt=gn,W=Gs(Ie,o),mt?Dt(gn):F}function we(gn){var yr=gn-Q,ai=gn-vt,n_=o-yr;return _t?On(n_,I-ai):n_}function Qt(gn){var yr=gn-Q,ai=gn-vt;return Q===n||yr>=o||yr<0||_t&&ai>=I}function Ie(){var gn=hd();if(Qt(gn))return Me(gn);W=Gs(Ie,we(gn))}function Me(gn){return W=n,kt&&m?Dt(gn):(m=C=n,F)}function tr(){W!==n&&Ym(W),vt=0,m=Q=C=W=n}function Bn(){return W===n?F:Me(hd())}function er(){var gn=hd(),yr=Qt(gn);if(m=arguments,C=this,Q=gn,yr){if(W===n)return jt(Q);if(_t)return Ym(W),W=Gs(Ie,o),Dt(Q)}return W===n&&(W=Gs(Ie,o)),F}return er.cancel=tr,er.flush=Bn,er}var iA=Se(function(r,o){return Pm(r,1,o)}),oA=Se(function(r,o,u){return Pm(r,hr(o)||0,u)});function sA(r){return ni(r,j)}function gd(r,o){if(typeof r!="function"||o!=null&&typeof o!="function")throw new lr(a);var u=function(){var m=arguments,C=o?o.apply(this,m):m[0],I=u.cache;if(I.has(C))return I.get(C);var F=r.apply(this,m);return u.cache=I.set(C,F)||I,F};return u.cache=new(gd.Cache||ti),u}gd.Cache=ti;function pd(r){if(typeof r!="function")throw new lr(a);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 aA(r){return Nb(2,r)}var lA=XS(function(r,o){o=o.length==1&&ue(o[0])?sn(o[0],Qn(Zt())):sn(Cn(o,1),Qn(Zt()));var u=o.length;return Se(function(m){for(var C=-1,I=On(m.length,u);++C<I;)m[C]=o[C].call(this,m[C]);return jn(r,this,m)})}),cg=Se(function(r,o){var u=Ei(o,Ho(cg));return ni(r,L,n,o,u)}),Bb=Se(function(r,o){var u=Ei(o,Ho(Bb));return ni(r,V,n,o,u)}),cA=ri(function(r,o){return ni(r,H,n,n,n,o)});function uA(r,o){if(typeof r!="function")throw new lr(a);return o=o===n?o:ge(o),Se(r,o)}function dA(r,o){if(typeof r!="function")throw new lr(a);return o=o==null?0:mn(ge(o),0),Se(function(u){var m=u[o],C=Mi(u,0,o);return m&&Ti(C,m),jn(r,this,C)})}function fA(r,o,u){var m=!0,C=!0;if(typeof r!="function")throw new lr(a);return un(u)&&(m="leading"in u?!!u.leading:m,C="trailing"in u?!!u.trailing:C),Fb(r,o,{leading:m,maxWait:o,trailing:C})}function hA(r){return Rb(r,1)}function gA(r,o){return cg(Yh(o),r)}function pA(){if(!arguments.length)return[];var r=arguments[0];return ue(r)?r:[r]}function vA(r){return ur(r,b)}function mA(r,o){return o=typeof o=="function"?o:n,ur(r,b,o)}function bA(r){return ur(r,p|b)}function _A(r,o){return o=typeof o=="function"?o:n,ur(r,p|b,o)}function yA(r,o){return o==null||Am(r,o,bn(o))}function _r(r,o){return r===o||r!==r&&o!==o}var wA=ad(Lh),xA=ad(function(r,o){return r>=o}),fo=Om(function(){return arguments}())?Om:function(r){return fn(r)&&Xe.call(r,"callee")&&!mm.call(r,"callee")},ue=lt.isArray,SA=Jv?Qn(Jv):OS;function Wn(r){return r!=null&&vd(r.length)&&!oi(r)}function hn(r){return fn(r)&&Wn(r)}function CA(r){return r===!0||r===!1||fn(r)&&Dn(r)==Ut}var Li=B1||yg,AA=$v?Qn($v):RS;function PA(r){return fn(r)&&r.nodeType===1&&!Ks(r)}function kA(r){if(r==null)return!0;if(Wn(r)&&(ue(r)||typeof r=="string"||typeof r.splice=="function"||Li(r)||Wo(r)||fo(r)))return!r.length;var o=Rn(r);if(o==ee||o==$t)return!r.size;if(Us(r))return!Bh(r).length;for(var u in r)if(Xe.call(r,u))return!1;return!0}function TA(r,o){return Vs(r,o)}function EA(r,o,u){u=typeof u=="function"?u:n;var m=u?u(r,o):n;return m===n?Vs(r,o,n,u):!!m}function ug(r){if(!fn(r))return!1;var o=Dn(r);return o==Rt||o==Ct||typeof r.message=="string"&&typeof r.name=="string"&&!Ks(r)}function IA(r){return typeof r=="number"&&_m(r)}function oi(r){if(!un(r))return!1;var o=Dn(r);return o==qt||o==ce||o==de||o==Ot}function zb(r){return typeof r=="number"&&r==ge(r)}function vd(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=ht}function un(r){var o=typeof r;return r!=null&&(o=="object"||o=="function")}function fn(r){return r!=null&&typeof r=="object"}var Vb=tm?Qn(tm):MS;function OA(r,o){return r===o||Fh(r,o,tg(o))}function RA(r,o,u){return u=typeof u=="function"?u:n,Fh(r,o,tg(o),u)}function NA(r){return Hb(r)&&r!=+r}function MA(r){if(m2(r))throw new se(l);return Rm(r)}function LA(r){return r===null}function DA(r){return r==null}function Hb(r){return typeof r=="number"||fn(r)&&Dn(r)==Yt}function Ks(r){if(!fn(r)||Dn(r)!=he)return!1;var o=Uu(r);if(o===null)return!0;var u=Xe.call(o,"constructor")&&o.constructor;return typeof u=="function"&&u instanceof u&&zu.call(u)==R1}var dg=em?Qn(em):LS;function FA(r){return zb(r)&&r>=-9007199254740991&&r<=ht}var Wb=nm?Qn(nm):DS;function md(r){return typeof r=="string"||!ue(r)&&fn(r)&&Dn(r)==ye}function $n(r){return typeof r=="symbol"||fn(r)&&Dn(r)==zt}var Wo=rm?Qn(rm):FS;function BA(r){return r===n}function zA(r){return fn(r)&&Rn(r)==fe}function VA(r){return fn(r)&&Dn(r)==Le}var HA=ad(zh),WA=ad(function(r,o){return r<=o});function Ub(r){if(!r)return[];if(Wn(r))return md(r)?mr(r):Hn(r);if(Rs&&r[Rs])return y1(r[Rs]());var o=Rn(r),u=o==ee?Ph:o==$t?Du:Uo;return u(r)}function si(r){if(!r)return r===0?r:0;if(r=hr(r),r===rt||r===-1/0){var o=r<0?-1:1;return o*bt}return r===r?r:0}function ge(r){var o=si(r),u=o%1;return o===o?u?o-u:o:0}function Gb(r){return r?ao(ge(r),0,at):0}function hr(r){if(typeof r=="number")return r;if($n(r))return yt;if(un(r)){var o=typeof r.valueOf=="function"?r.valueOf():r;r=un(o)?o+"":o}if(typeof r!="string")return r===0?r:+r;r=cm(r);var u=no.test(r);return u||Is.test(r)?r1(r.slice(2),u?2:8):Ou.test(r)?yt:+r}function Kb(r){return Rr(r,Un(r))}function UA(r){return r?ao(ge(r),-9007199254740991,ht):r===0?r:0}function Ge(r){return r==null?"":Jn(r)}var GA=zo(function(r,o){if(Us(o)||Wn(o)){Rr(o,bn(o),r);return}for(var u in o)Xe.call(o,u)&&Fs(r,u,o[u])}),qb=zo(function(r,o){Rr(o,Un(o),r)}),bd=zo(function(r,o,u,m){Rr(o,Un(o),r,m)}),KA=zo(function(r,o,u,m){Rr(o,bn(o),r,m)}),qA=ri(Rh);function YA(r,o){var u=Bo(r);return o==null?u:Cm(u,o)}var XA=Se(function(r,o){r=je(r);var u=-1,m=o.length,C=m>2?o[2]:n;for(C&&Fn(o[0],o[1],C)&&(m=1);++u<m;)for(var I=o[u],F=Un(I),W=-1,Q=F.length;++W<Q;){var vt=F[W],mt=r[vt];(mt===n||_r(mt,Lo[vt])&&!Xe.call(r,vt))&&(r[vt]=I[vt])}return r}),ZA=Se(function(r){return r.push(n,cb),jn(Yb,n,r)});function jA(r,o){return om(r,Zt(o,3),Or)}function QA(r,o){return om(r,Zt(o,3),Mh)}function JA(r,o){return r==null?r:Nh(r,Zt(o,3),Un)}function $A(r,o){return r==null?r:Em(r,Zt(o,3),Un)}function tP(r,o){return r&&Or(r,Zt(o,3))}function eP(r,o){return r&&Mh(r,Zt(o,3))}function nP(r){return r==null?[]:$u(r,bn(r))}function rP(r){return r==null?[]:$u(r,Un(r))}function fg(r,o,u){var m=r==null?n:lo(r,o);return m===n?u:m}function iP(r,o){return r!=null&&fb(r,o,kS)}function hg(r,o){return r!=null&&fb(r,o,TS)}var oP=ib(function(r,o,u){o!=null&&typeof o.toString!="function"&&(o=Vu.call(o)),r[o]=u},pg(Gn)),sP=ib(function(r,o,u){o!=null&&typeof o.toString!="function"&&(o=Vu.call(o)),Xe.call(r,o)?r[o].push(u):r[o]=[u]},Zt),aP=Se(zs);function bn(r){return Wn(r)?xm(r):Bh(r)}function Un(r){return Wn(r)?xm(r,!0):BS(r)}function lP(r,o){var u={};return o=Zt(o,3),Or(r,function(m,C,I){ei(u,o(m,C,I),m)}),u}function cP(r,o){var u={};return o=Zt(o,3),Or(r,function(m,C,I){ei(u,C,o(m,C,I))}),u}var uP=zo(function(r,o,u){td(r,o,u)}),Yb=zo(function(r,o,u,m){td(r,o,u,m)}),dP=ri(function(r,o){var u={};if(r==null)return u;var m=!1;o=sn(o,function(I){return I=Ni(I,r),m||(m=I.length>1),I}),Rr(r,Jh(r),u),m&&(u=ur(u,p|v|b,o2));for(var C=o.length;C--;)Gh(u,o[C]);return u});function fP(r,o){return Xb(r,pd(Zt(o)))}var hP=ri(function(r,o){return r==null?{}:VS(r,o)});function Xb(r,o){if(r==null)return{};var u=sn(Jh(r),function(m){return[m]});return o=Zt(o),zm(r,u,function(m,C){return o(m,C[0])})}function gP(r,o,u){o=Ni(o,r);var m=-1,C=o.length;for(C||(C=1,r=n);++m<C;){var I=r==null?n:r[Nr(o[m])];I===n&&(m=C,I=u),r=oi(I)?I.call(r):I}return r}function pP(r,o,u){return r==null?r:Hs(r,o,u)}function vP(r,o,u,m){return m=typeof m=="function"?m:n,r==null?r:Hs(r,o,u,m)}var Zb=ab(bn),jb=ab(Un);function mP(r,o,u){var m=ue(r),C=m||Li(r)||Wo(r);if(o=Zt(o,4),u==null){var I=r&&r.constructor;C?u=m?new I:[]:un(r)?u=oi(I)?Bo(Uu(r)):{}:u={}}return(C?ar:Or)(r,function(F,W,Q){return o(u,F,W,Q)}),u}function bP(r,o){return r==null?!0:Gh(r,o)}function _P(r,o,u){return r==null?r:Gm(r,o,Yh(u))}function yP(r,o,u,m){return m=typeof m=="function"?m:n,r==null?r:Gm(r,o,Yh(u),m)}function Uo(r){return r==null?[]:Ah(r,bn(r))}function wP(r){return r==null?[]:Ah(r,Un(r))}function xP(r,o,u){return u===n&&(u=o,o=n),u!==n&&(u=hr(u),u=u===u?u:0),o!==n&&(o=hr(o),o=o===o?o:0),ao(hr(r),o,u)}function SP(r,o,u){return o=si(o),u===n?(u=o,o=0):u=si(u),r=hr(r),ES(r,o,u)}function CP(r,o,u){if(u&&typeof u!="boolean"&&Fn(r,o,u)&&(o=u=n),u===n&&(typeof o=="boolean"?(u=o,o=n):typeof r=="boolean"&&(u=r,r=n)),r===n&&o===n?(r=0,o=1):(r=si(r),o===n?(o=r,r=0):o=si(o)),r>o){var m=r;r=o,o=m}if(u||r%1||o%1){var C=ym();return On(r+C*(o-r+n1("1e-"+((C+"").length-1))),o)}return Hh(r,o)}var AP=Vo(function(r,o,u){return o=o.toLowerCase(),r+(u?Qb(o):o)});function Qb(r){return gg(Ge(r).toLowerCase())}function Jb(r){return r=Ge(r),r&&r.replace(Ir,p1).replace(qx,"")}function PP(r,o,u){r=Ge(r),o=Jn(o);var m=r.length;u=u===n?m:ao(ge(u),0,m);var C=u;return u-=o.length,u>=0&&r.slice(u,C)==o}function kP(r){return r=Ge(r),r&&Oe.test(r)?r.replace(We,v1):r}function TP(r){return r=Ge(r),r&&In.test(r)?r.replace(cn,"\\$&"):r}var EP=Vo(function(r,o,u){return r+(u?"-":"")+o.toLowerCase()}),IP=Vo(function(r,o,u){return r+(u?" ":"")+o.toLowerCase()}),OP=eb("toLowerCase");function RP(r,o,u){r=Ge(r),o=ge(o);var m=o?No(r):0;if(!o||m>=o)return r;var C=(o-m)/2;return sd(Yu(C),u)+r+sd(qu(C),u)}function NP(r,o,u){r=Ge(r),o=ge(o);var m=o?No(r):0;return o&&m<o?r+sd(o-m,u):r}function MP(r,o,u){r=Ge(r),o=ge(o);var m=o?No(r):0;return o&&m<o?sd(o-m,u)+r:r}function LP(r,o,u){return u||o==null?o=0:o&&(o=+o),W1(Ge(r).replace(Ue,""),o||0)}function DP(r,o,u){return(u?Fn(r,o,u):o===n)?o=1:o=ge(o),Wh(Ge(r),o)}function FP(){var r=arguments,o=Ge(r[0]);return r.length<3?o:o.replace(r[1],r[2])}var BP=Vo(function(r,o,u){return r+(u?"_":"")+o.toLowerCase()});function zP(r,o,u){return u&&typeof u!="number"&&Fn(r,o,u)&&(o=u=n),u=u===n?at:u>>>0,u?(r=Ge(r),r&&(typeof o=="string"||o!=null&&!dg(o))&&(o=Jn(o),!o&&Ro(r))?Mi(mr(r),0,u):r.split(o,u)):[]}var VP=Vo(function(r,o,u){return r+(u?" ":"")+gg(o)});function HP(r,o,u){return r=Ge(r),u=u==null?0:ao(ge(u),0,r.length),o=Jn(o),r.slice(u,u+o.length)==o}function WP(r,o,u){var m=P.templateSettings;u&&Fn(r,o,u)&&(o=n),r=Ge(r),o=bd({},o,m,lb);var C=bd({},o.imports,m.imports,lb),I=bn(C),F=Ah(C,I),W,Q,vt=0,mt=o.interpolate||Jr,_t="__p += '",kt=kh((o.escape||Jr).source+"|"+mt.source+"|"+(mt===Te?Er:Jr).source+"|"+(o.evaluate||Jr).source+"|$","g"),Dt="//# sourceURL="+(Xe.call(o,"sourceURL")?(o.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++Qx+"]")+`
|
|
422
|
+
`;r.replace(kt,function(Qt,Ie,Me,tr,Bn,er){return Me||(Me=tr),_t+=r.slice(vt,er).replace(uh,m1),Ie&&(W=!0,_t+=`' +
|
|
423
|
+
__e(`+Ie+`) +
|
|
424
|
+
'`),Bn&&(Q=!0,_t+=`';
|
|
425
|
+
`+Bn+`;
|
|
426
|
+
__p += '`),Me&&(_t+=`' +
|
|
427
|
+
((__t = (`+Me+`)) == null ? '' : __t) +
|
|
428
|
+
'`),vt=er+Qt.length,Qt}),_t+=`';
|
|
429
|
+
`;var jt=Xe.call(o,"variable")&&o.variable;if(!jt)_t=`with (obj) {
|
|
430
|
+
`+_t+`
|
|
431
|
+
}
|
|
432
|
+
`;else if(Ai.test(jt))throw new se(c);_t=(Q?_t.replace(re,""):_t).replace(dn,"$1").replace(Ne,"$1;"),_t="function("+(jt||"obj")+`) {
|
|
433
|
+
`+(jt?"":`obj || (obj = {});
|
|
434
|
+
`)+"var __t, __p = ''"+(W?", __e = _.escape":"")+(Q?`, __j = Array.prototype.join;
|
|
435
|
+
function print() { __p += __j.call(arguments, '') }
|
|
436
|
+
`:`;
|
|
437
|
+
`)+_t+`return __p
|
|
438
|
+
}`;var we=t_(function(){return Ve(I,Dt+"return "+_t).apply(n,F)});if(we.source=_t,ug(we))throw we;return we}function UP(r){return Ge(r).toLowerCase()}function GP(r){return Ge(r).toUpperCase()}function KP(r,o,u){if(r=Ge(r),r&&(u||o===n))return cm(r);if(!r||!(o=Jn(o)))return r;var m=mr(r),C=mr(o),I=um(m,C),F=dm(m,C)+1;return Mi(m,I,F).join("")}function qP(r,o,u){if(r=Ge(r),r&&(u||o===n))return r.slice(0,hm(r)+1);if(!r||!(o=Jn(o)))return r;var m=mr(r),C=dm(m,mr(o))+1;return Mi(m,0,C).join("")}function YP(r,o,u){if(r=Ge(r),r&&(u||o===n))return r.replace(Ue,"");if(!r||!(o=Jn(o)))return r;var m=mr(r),C=um(m,mr(o));return Mi(m,C).join("")}function XP(r,o){var u=tt,m=it;if(un(o)){var C="separator"in o?o.separator:C;u="length"in o?ge(o.length):u,m="omission"in o?Jn(o.omission):m}r=Ge(r);var I=r.length;if(Ro(r)){var F=mr(r);I=F.length}if(u>=I)return r;var W=u-No(m);if(W<1)return m;var Q=F?Mi(F,0,W).join(""):r.slice(0,W);if(C===n)return Q+m;if(F&&(W+=Q.length-W),dg(C)){if(r.slice(W).search(C)){var vt,mt=Q;for(C.global||(C=kh(C.source,Ge(Pi.exec(C))+"g")),C.lastIndex=0;vt=C.exec(mt);)var _t=vt.index;Q=Q.slice(0,_t===n?W:_t)}}else if(r.indexOf(Jn(C),W)!=W){var kt=Q.lastIndexOf(C);kt>-1&&(Q=Q.slice(0,kt))}return Q+m}function ZP(r){return r=Ge(r),r&&Fe.test(r)?r.replace(Ze,C1):r}var jP=Vo(function(r,o,u){return r+(u?" ":"")+o.toUpperCase()}),gg=eb("toUpperCase");function $b(r,o,u){return r=Ge(r),o=u?n:o,o===n?_1(r)?k1(r):u1(r):r.match(o)||[]}var t_=Se(function(r,o){try{return jn(r,n,o)}catch(u){return ug(u)?u:new se(u)}}),QP=ri(function(r,o){return ar(o,function(u){u=Nr(u),ei(r,u,lg(r[u],r))}),r});function JP(r){var o=r==null?0:r.length,u=Zt();return r=o?sn(r,function(m){if(typeof m[1]!="function")throw new lr(a);return[u(m[0]),m[1]]}):[],Se(function(m){for(var C=-1;++C<o;){var I=r[C];if(jn(I[0],this,m))return jn(I[1],this,m)}})}function $P(r){return CS(ur(r,p))}function pg(r){return function(){return r}}function tk(r,o){return r==null||r!==r?o:r}var ek=rb(),nk=rb(!0);function Gn(r){return r}function vg(r){return Nm(typeof r=="function"?r:ur(r,p))}function rk(r){return Lm(ur(r,p))}function ik(r,o){return Dm(r,ur(o,p))}var ok=Se(function(r,o){return function(u){return zs(u,r,o)}}),sk=Se(function(r,o){return function(u){return zs(r,u,o)}});function mg(r,o,u){var m=bn(o),C=$u(o,m);u==null&&!(un(o)&&(C.length||!m.length))&&(u=o,o=r,r=this,C=$u(o,bn(o)));var I=!(un(u)&&"chain"in u)||!!u.chain,F=oi(r);return ar(C,function(W){var Q=o[W];r[W]=Q,F&&(r.prototype[W]=function(){var vt=this.__chain__;if(I||vt){var mt=r(this.__wrapped__),_t=mt.__actions__=Hn(this.__actions__);return _t.push({func:Q,args:arguments,thisArg:r}),mt.__chain__=vt,mt}return Q.apply(r,Ti([this.value()],arguments))})}),r}function ak(){return Sn._===this&&(Sn._=N1),this}function bg(){}function lk(r){return r=ge(r),Se(function(o){return Fm(o,r)})}var ck=Zh(sn),uk=Zh(im),dk=Zh(yh);function e_(r){return ng(r)?wh(Nr(r)):HS(r)}function fk(r){return function(o){return r==null?n:lo(r,o)}}var hk=ob(),gk=ob(!0);function _g(){return[]}function yg(){return!1}function pk(){return{}}function vk(){return""}function mk(){return!0}function bk(r,o){if(r=ge(r),r<1||r>ht)return[];var u=at,m=On(r,at);o=Zt(o),r-=at;for(var C=Ch(m,o);++u<r;)o(u);return C}function _k(r){return ue(r)?sn(r,Nr):$n(r)?[r]:Hn(wb(Ge(r)))}function yk(r){var o=++O1;return Ge(r)+o}var wk=od(function(r,o){return r+o},0),xk=jh("ceil"),Sk=od(function(r,o){return r/o},1),Ck=jh("floor");function Ak(r){return r&&r.length?Ju(r,Gn,Lh):n}function Pk(r,o){return r&&r.length?Ju(r,Zt(o,2),Lh):n}function kk(r){return am(r,Gn)}function Tk(r,o){return am(r,Zt(o,2))}function Ek(r){return r&&r.length?Ju(r,Gn,zh):n}function Ik(r,o){return r&&r.length?Ju(r,Zt(o,2),zh):n}var Ok=od(function(r,o){return r*o},1),Rk=jh("round"),Nk=od(function(r,o){return r-o},0);function Mk(r){return r&&r.length?Sh(r,Gn):0}function Lk(r,o){return r&&r.length?Sh(r,Zt(o,2)):0}return P.after=rA,P.ary=Rb,P.assign=GA,P.assignIn=qb,P.assignInWith=bd,P.assignWith=KA,P.at=qA,P.before=Nb,P.bind=lg,P.bindAll=QP,P.bindKey=Mb,P.castArray=pA,P.chain=Eb,P.chunk=C2,P.compact=A2,P.concat=P2,P.cond=JP,P.conforms=$P,P.constant=pg,P.countBy=MC,P.create=YA,P.curry=Lb,P.curryRight=Db,P.debounce=Fb,P.defaults=XA,P.defaultsDeep=ZA,P.defer=iA,P.delay=oA,P.difference=k2,P.differenceBy=T2,P.differenceWith=E2,P.drop=I2,P.dropRight=O2,P.dropRightWhile=R2,P.dropWhile=N2,P.fill=M2,P.filter=DC,P.flatMap=zC,P.flatMapDeep=VC,P.flatMapDepth=HC,P.flatten=Ab,P.flattenDeep=L2,P.flattenDepth=D2,P.flip=sA,P.flow=ek,P.flowRight=nk,P.fromPairs=F2,P.functions=nP,P.functionsIn=rP,P.groupBy=WC,P.initial=z2,P.intersection=V2,P.intersectionBy=H2,P.intersectionWith=W2,P.invert=oP,P.invertBy=sP,P.invokeMap=GC,P.iteratee=vg,P.keyBy=KC,P.keys=bn,P.keysIn=Un,P.map=fd,P.mapKeys=lP,P.mapValues=cP,P.matches=rk,P.matchesProperty=ik,P.memoize=gd,P.merge=uP,P.mergeWith=Yb,P.method=ok,P.methodOf=sk,P.mixin=mg,P.negate=pd,P.nthArg=lk,P.omit=dP,P.omitBy=fP,P.once=aA,P.orderBy=qC,P.over=ck,P.overArgs=lA,P.overEvery=uk,P.overSome=dk,P.partial=cg,P.partialRight=Bb,P.partition=YC,P.pick=hP,P.pickBy=Xb,P.property=e_,P.propertyOf=fk,P.pull=q2,P.pullAll=kb,P.pullAllBy=Y2,P.pullAllWith=X2,P.pullAt=Z2,P.range=hk,P.rangeRight=gk,P.rearg=cA,P.reject=jC,P.remove=j2,P.rest=uA,P.reverse=sg,P.sampleSize=JC,P.set=pP,P.setWith=vP,P.shuffle=$C,P.slice=Q2,P.sortBy=nA,P.sortedUniq=iC,P.sortedUniqBy=oC,P.split=zP,P.spread=dA,P.tail=sC,P.take=aC,P.takeRight=lC,P.takeRightWhile=cC,P.takeWhile=uC,P.tap=AC,P.throttle=fA,P.thru=dd,P.toArray=Ub,P.toPairs=Zb,P.toPairsIn=jb,P.toPath=_k,P.toPlainObject=Kb,P.transform=mP,P.unary=hA,P.union=dC,P.unionBy=fC,P.unionWith=hC,P.uniq=gC,P.uniqBy=pC,P.uniqWith=vC,P.unset=bP,P.unzip=ag,P.unzipWith=Tb,P.update=_P,P.updateWith=yP,P.values=Uo,P.valuesIn=wP,P.without=mC,P.words=$b,P.wrap=gA,P.xor=bC,P.xorBy=_C,P.xorWith=yC,P.zip=wC,P.zipObject=xC,P.zipObjectDeep=SC,P.zipWith=CC,P.entries=Zb,P.entriesIn=jb,P.extend=qb,P.extendWith=bd,mg(P,P),P.add=wk,P.attempt=t_,P.camelCase=AP,P.capitalize=Qb,P.ceil=xk,P.clamp=xP,P.clone=vA,P.cloneDeep=bA,P.cloneDeepWith=_A,P.cloneWith=mA,P.conformsTo=yA,P.deburr=Jb,P.defaultTo=tk,P.divide=Sk,P.endsWith=PP,P.eq=_r,P.escape=kP,P.escapeRegExp=TP,P.every=LC,P.find=FC,P.findIndex=Sb,P.findKey=jA,P.findLast=BC,P.findLastIndex=Cb,P.findLastKey=QA,P.floor=Ck,P.forEach=Ib,P.forEachRight=Ob,P.forIn=JA,P.forInRight=$A,P.forOwn=tP,P.forOwnRight=eP,P.get=fg,P.gt=wA,P.gte=xA,P.has=iP,P.hasIn=hg,P.head=Pb,P.identity=Gn,P.includes=UC,P.indexOf=B2,P.inRange=SP,P.invoke=aP,P.isArguments=fo,P.isArray=ue,P.isArrayBuffer=SA,P.isArrayLike=Wn,P.isArrayLikeObject=hn,P.isBoolean=CA,P.isBuffer=Li,P.isDate=AA,P.isElement=PA,P.isEmpty=kA,P.isEqual=TA,P.isEqualWith=EA,P.isError=ug,P.isFinite=IA,P.isFunction=oi,P.isInteger=zb,P.isLength=vd,P.isMap=Vb,P.isMatch=OA,P.isMatchWith=RA,P.isNaN=NA,P.isNative=MA,P.isNil=DA,P.isNull=LA,P.isNumber=Hb,P.isObject=un,P.isObjectLike=fn,P.isPlainObject=Ks,P.isRegExp=dg,P.isSafeInteger=FA,P.isSet=Wb,P.isString=md,P.isSymbol=$n,P.isTypedArray=Wo,P.isUndefined=BA,P.isWeakMap=zA,P.isWeakSet=VA,P.join=U2,P.kebabCase=EP,P.last=fr,P.lastIndexOf=G2,P.lowerCase=IP,P.lowerFirst=OP,P.lt=HA,P.lte=WA,P.max=Ak,P.maxBy=Pk,P.mean=kk,P.meanBy=Tk,P.min=Ek,P.minBy=Ik,P.stubArray=_g,P.stubFalse=yg,P.stubObject=pk,P.stubString=vk,P.stubTrue=mk,P.multiply=Ok,P.nth=K2,P.noConflict=ak,P.noop=bg,P.now=hd,P.pad=RP,P.padEnd=NP,P.padStart=MP,P.parseInt=LP,P.random=CP,P.reduce=XC,P.reduceRight=ZC,P.repeat=DP,P.replace=FP,P.result=gP,P.round=Rk,P.runInContext=X,P.sample=QC,P.size=tA,P.snakeCase=BP,P.some=eA,P.sortedIndex=J2,P.sortedIndexBy=$2,P.sortedIndexOf=tC,P.sortedLastIndex=eC,P.sortedLastIndexBy=nC,P.sortedLastIndexOf=rC,P.startCase=VP,P.startsWith=HP,P.subtract=Nk,P.sum=Mk,P.sumBy=Lk,P.template=WP,P.times=bk,P.toFinite=si,P.toInteger=ge,P.toLength=Gb,P.toLower=UP,P.toNumber=hr,P.toSafeInteger=UA,P.toString=Ge,P.toUpper=GP,P.trim=KP,P.trimEnd=qP,P.trimStart=YP,P.truncate=XP,P.unescape=ZP,P.uniqueId=yk,P.upperCase=jP,P.upperFirst=gg,P.each=Ib,P.eachRight=Ob,P.first=Pb,mg(P,function(){var r={};return Or(P,function(o,u){Xe.call(P.prototype,u)||(r[u]=o)}),r}(),{chain:!1}),P.VERSION=i,ar(["bind","bindKey","curry","curryRight","partial","partialRight"],function(r){P[r].placeholder=P}),ar(["drop","take"],function(r,o){Re.prototype[r]=function(u){u=u===n?1:mn(ge(u),0);var m=this.__filtered__&&!o?new Re(this):this.clone();return m.__filtered__?m.__takeCount__=On(u,m.__takeCount__):m.__views__.push({size:On(u,at),type:r+(m.__dir__<0?"Right":"")}),m},Re.prototype[r+"Right"]=function(u){return this.reverse()[r](u).reverse()}}),ar(["filter","map","takeWhile"],function(r,o){var u=o+1,m=u==Y||u==et;Re.prototype[r]=function(C){var I=this.clone();return I.__iteratees__.push({iteratee:Zt(C,3),type:u}),I.__filtered__=I.__filtered__||m,I}}),ar(["head","last"],function(r,o){var u="take"+(o?"Right":"");Re.prototype[r]=function(){return this[u](1).value()[0]}}),ar(["initial","tail"],function(r,o){var u="drop"+(o?"":"Right");Re.prototype[r]=function(){return this.__filtered__?new Re(this):this[u](1)}}),Re.prototype.compact=function(){return this.filter(Gn)},Re.prototype.find=function(r){return this.filter(r).head()},Re.prototype.findLast=function(r){return this.reverse().find(r)},Re.prototype.invokeMap=Se(function(r,o){return typeof r=="function"?new Re(this):this.map(function(u){return zs(u,r,o)})}),Re.prototype.reject=function(r){return this.filter(pd(Zt(r)))},Re.prototype.slice=function(r,o){r=ge(r);var u=this;return u.__filtered__&&(r>0||o<0)?new Re(u):(r<0?u=u.takeRight(-r):r&&(u=u.drop(r)),o!==n&&(o=ge(o),u=o<0?u.dropRight(-o):u.take(o-r)),u)},Re.prototype.takeRightWhile=function(r){return this.reverse().takeWhile(r).reverse()},Re.prototype.toArray=function(){return this.take(at)},Or(Re.prototype,function(r,o){var u=/^(?:filter|find|map|reject)|While$/.test(o),m=/^(?:head|last)$/.test(o),C=P[m?"take"+(o=="last"?"Right":""):o],I=m||/^find/.test(o);C&&(P.prototype[o]=function(){var F=this.__wrapped__,W=m?[1]:arguments,Q=F instanceof Re,vt=W[0],mt=Q||ue(F),_t=function(Ie){var Me=C.apply(P,Ti([Ie],W));return m&&kt?Me[0]:Me};mt&&u&&typeof vt=="function"&&vt.length!=1&&(Q=mt=!1);var kt=this.__chain__,Dt=!!this.__actions__.length,jt=I&&!kt,we=Q&&!Dt;if(!I&&mt){F=we?F:new Re(this);var Qt=r.apply(F,W);return Qt.__actions__.push({func:dd,args:[_t],thisArg:n}),new cr(Qt,kt)}return jt&&we?r.apply(this,W):(Qt=this.thru(_t),jt?m?Qt.value()[0]:Qt.value():Qt)})}),ar(["pop","push","shift","sort","splice","unshift"],function(r){var o=Fu[r],u=/^(?:push|sort|unshift)$/.test(r)?"tap":"thru",m=/^(?:pop|shift)$/.test(r);P.prototype[r]=function(){var C=arguments;if(m&&!this.__chain__){var I=this.value();return o.apply(ue(I)?I:[],C)}return this[u](function(F){return o.apply(ue(F)?F:[],C)})}}),Or(Re.prototype,function(r,o){var u=P[o];if(u){var m=u.name+"";Xe.call(Fo,m)||(Fo[m]=[]),Fo[m].push({name:o,func:u})}}),Fo[id(n,A).name]=[{name:"wrapper",func:n}],Re.prototype.clone=Z1,Re.prototype.reverse=j1,Re.prototype.value=Q1,P.prototype.at=PC,P.prototype.chain=kC,P.prototype.commit=TC,P.prototype.next=EC,P.prototype.plant=OC,P.prototype.reverse=RC,P.prototype.toJSON=P.prototype.valueOf=P.prototype.value=NC,P.prototype.first=P.prototype.head,Rs&&(P.prototype[Rs]=IC),P},Mo=T1();ro?((ro.exports=Mo)._=Mo,vh._=Mo):Sn._=Mo}).call(Fr)})(of,of.exports);var QF=of.exports;const f0=ay(QF);function JF(e,t){const n=e.target.value;/^#[0-9A-Fa-f]{6}$/.test(n)&&O(t,n,!0)}function h0(e){e.stopPropagation(),e.preventDefault()}function $F(e,t,n){e.stopPropagation(),e.preventDefault(),O(t,!f(t)),f(t)&&setTimeout(n,0)}function g0(e,t){e.key==="Escape"&&t()}var t9=(e,t,n)=>t(f(n)),e9=Z('<button type="button"></button>'),n9=Z('<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>'),r9=Z('<div class="relative inline-block"><button type="button" class="m-0 border-0 bg-transparent p-0" tabindex="0"><!></button> <!></div>');function $z(e,t){ut(t,!0);let n=k(t,"initialColor",3,"#ff0000"),i=k(t,"initialAlpha",3,1),s=k(t,"position",3,"right"),l=pt(!1),a,c=pt(_n(n())),d=pt(_n(i()));const h=["#ff0000","#ff8000","#ffff00","#80ff00","#00ff00","#00ffff","#0080ff","#0000ff","#8000ff","#ff00ff","#ff0080","#ffffff","#cccccc","#888888","#444444","#000000"];let g,p,v=pt(0),b=pt(100),w=pt(50);be(()=>{if(f(c).startsWith("#")){const[Y,J,et]=S(f(c));O(v,Y,!0),O(b,J,!0),O(w,et,!0)}}),be(()=>{O(c,x(f(v),f(b),f(w)),!0)});function S(Y){Y=Y.replace(/^#/,"");const J=parseInt(Y.slice(0,2),16)/255,et=parseInt(Y.slice(2,4),16)/255,rt=parseInt(Y.slice(4,6),16)/255,ht=Math.max(J,et,rt),bt=Math.min(J,et,rt),yt=(ht+bt)/2;let at=0,st=0;if(ht!==bt){const xt=ht-bt;switch(st=yt>.5?xt/(2-ht-bt):xt/(ht+bt),ht){case J:at=((et-rt)/xt+(et<rt?6:0))/6;break;case et:at=((rt-J)/xt+2)/6;break;case rt:at=((J-et)/xt+4)/6;break}}return[Math.round(at*360),Math.round(st*100),Math.round(yt*100)]}function x(Y,J,et){Y/=360,J/=100,et/=100;let rt,ht,bt;if(J===0)rt=ht=bt=et;else{const st=et<.5?et*(1+J):et+J-et*J,xt=2*et-st;rt=yt(xt,st,Y+1/3),ht=yt(xt,st,Y),bt=yt(xt,st,Y-1/3)}function yt(st,xt,Lt){return Lt<0&&(Lt+=1),Lt>1&&(Lt-=1),Lt<1/6?st+(xt-st)*6*Lt:Lt<1/2?xt:Lt<2/3?st+(xt-st)*(2/3-Lt)*6:st}const at=st=>{const xt=Math.round(st*255).toString(16);return xt.length===1?"0"+xt:xt};return`#${at(rt)}${at(ht)}${at(bt)}`}function A(Y){if(!g)return;const J=g.getBoundingClientRect(),et=Math.max(0,Math.min(1,(Y.clientX-J.left)/J.width)),rt=Math.max(0,Math.min(1,(Y.clientY-J.top)/J.height));if(O(b,Math.round(et*100),!0),O(w,Math.round((1-rt)*100),!0),Y.buttons!==1&&Y.type!=="mousedown")return;const ht=bt=>A(bt);document.addEventListener("mousemove",ht),document.addEventListener("mouseup",()=>{document.removeEventListener("mousemove",ht)},{once:!0})}function T(Y){if(!p)return;const J=p.getBoundingClientRect(),et=Math.max(0,Math.min(1,(Y.clientX-J.left)/J.width));if(O(v,Math.round(et*360),!0),Y.buttons!==1&&Y.type!=="mousedown")return;const rt=ht=>T(ht);document.addEventListener("mousemove",rt),document.addEventListener("mouseup",()=>{document.removeEventListener("mousemove",rt)},{once:!0})}function D(Y){O(c,Y,!0)}function R(Y){O(d,Y[0],!0)}function L(){t.onChange&&t.onChange(f(c),f(d)),O(l,!1)}function V(){O(l,!1)}function M(){function Y(et){if(f(l)&&a){const rt=document.getElementById("color-picker-panel");rt&&!rt.contains(et.target)&&!a.contains(et.target)&&O(l,!1)}}document.addEventListener("mousedown",Y);const J=()=>H();return window.addEventListener("resize",J),{destroy:()=>{document.removeEventListener("mousedown",Y),window.removeEventListener("resize",J)}}}function H(){a&&requestAnimationFrame(()=>{const Y=document.getElementById("color-picker-panel");if(!Y)return;const J=a.getBoundingClientRect(),et=window.innerWidth,rt=window.innerHeight,ht=Y.offsetWidth,bt=Y.offsetHeight;let yt,at;switch(s()){case"top":yt=J.left+J.width/2-ht/2,at=J.top-bt-8;break;case"bottom":yt=J.left+J.width/2-ht/2,at=J.bottom+8;break;case"left":yt=J.left-ht-8,at=J.top;break;case"right":default:yt=J.right+8,at=J.top;break}yt<10&&(yt=10),at<10&&(at=10),yt+ht>et-10&&(yt=et-ht-10),at+bt>rt-10&&(at=rt-bt-10),Y.style.position="fixed",Y.style.left=`${yt}px`,Y.style.top=`${at}px`})}q0(()=>{if(f(l))return M().destroy});var j=r9(),tt=q(j);tt.__click=[$F,l,H],tt.__keydown=[g0,V];var it=q(tt);ct(it,()=>t.children),K(tt),yn(tt,Y=>a=Y,()=>a);var G=nt(tt,2);{var ot=Y=>{var J=U(),et=N(J);At(et,()=>Pu,(rt,ht)=>{ht(rt,{children:(bt,yt)=>{var at=n9();at.__keydown=[g0,V],at.__click=[h0],at.__mousedown=[h0];var st=q(at),xt=nt(q(st),2);Nn(xt,{variant:"ghost",size:"icon",class:"h-6 w-6",onclick:V,children:(zt,Xt)=>{Vp(zt,{class:"h-4 w-4"})},$$slots:{default:!0}}),K(st);var Lt=nt(st,2),Wt=q(Lt),Bt=q(Wt);Bt.__mousedown=A;var de=q(Bt);K(Bt),yn(Bt,zt=>g=zt,()=>g);var Ut=nt(Bt,2);Ut.__mousedown=T;var Et=q(Ut);K(Ut),yn(Ut,zt=>p=zt,()=>p);var Ct=nt(Ut,2),Rt=q(Ct),qt=nt(Rt,2);bT(qt),qt.__input=[JF,c],K(Ct);var ce=nt(Ct,2),ee=q(ce),Yt=nt(q(ee),2),_e=q(Yt);K(Yt),K(ee);var he=nt(ee,2);{let zt=E(()=>[f(d)]);$4(he,{min:0,max:1,step:.01,get value(){return f(zt)},onValueChange:R})}K(ce);var Be=nt(ce,2),Ot=nt(q(Be),2);Wr(Ot,21,()=>h,Uf,(zt,Xt)=>{var fe=e9();fe.__click=[t9,D,Xt],Mt(Le=>{Ln(fe,1,Le),Mn(fe,`background-color: ${f(Xt)}`),Pt(fe,"title",f(Xt))},[()=>So(ie("h-4 w-4 rounded-sm border",f(c)===f(Xt)?"ring-primary ring-1":""))]),y(zt,fe)}),K(Ot),K(Be),K(Wt);var Ht=nt(Wt,2),$t=q(Ht);Nn($t,{size:"sm",variant:"outline",class:"h-7 px-2 py-0 text-xs",onclick:V,children:(zt,Xt)=>{te();var fe=Ee("Cancel");y(zt,fe)},$$slots:{default:!0}});var ye=nt($t,2);Nn(ye,{size:"sm",class:"h-7 px-2 py-0 text-xs",onclick:L,children:(zt,Xt)=>{te();var fe=Ee("Apply");y(zt,fe)},$$slots:{default:!0}}),K(Ht),K(Lt),K(at),Mt((zt,Xt)=>{Ln(at,1,zt),Mn(Bt,`background-image: linear-gradient(to top, #000, transparent), linear-gradient(to right, #fff, hsl(${f(v)}, 100%, 50%))`),Mn(de,`left: ${f(b)}%; top: ${100-f(w)}%; background-color: ${f(c)}`),Mn(Et,`left: ${f(v)/360*100}%`),Mn(Rt,`background-color: ${f(c)}`),_T(qt,f(c)),me(_e,`${Xt??""}%`)},[()=>So(ie("bg-popover text-popover-foreground z-50 w-56 rounded-md border shadow-md",t.class)),()=>Math.round(f(d)*100)]),Bp(3,at,()=>Kw,()=>({duration:150,y:0,x:0})),y(bt,at)},$$slots:{default:!0}})}),y(Y,J)};gt(G,Y=>{f(l)&&Y(ot)})}K(j),y(e,j),dt()}kr(["click","keydown","mousedown","input"]);var i9=Z("<div></div>");function tx(e,t){ut(t,!0);const n=k(t,"rootMargin",3,"200px"),i=k(t,"threshold",3,0),s=k(t,"disabled",3,!1);let l=pt(null);be(()=>{if(!f(l)||s())return;const c=new IntersectionObserver(d=>{d[0].isIntersecting&&t.onIntersect()},{rootMargin:n(),threshold:i()});return c.observe(f(l)),()=>c.disconnect()});var a=i9();yn(a,c=>O(l,c),()=>f(l)),y(e,a),dt()}function Kg(e,t,n=!1){const s={...e};if(n)return s.x=Math.round(Math.max(t.x,Math.min(s.x,t.x+t.width-s.width))),s.y=Math.round(Math.max(t.y,Math.min(s.y,t.y+t.height-s.height))),s;{const l=e.x,a=e.y,c=e.x+e.width,d=e.y+e.height,h=Math.max(t.x,l),g=Math.max(t.y,a),p=Math.min(t.x+t.width,c),v=Math.min(t.y+t.height,d),b={x:Math.round(h),y:Math.round(g),width:Math.round(p-h),height:Math.round(v-g)};return b.width=Math.max(1,b.width),b.height=Math.max(1,b.height),b}}var Pp="http://www.w3.org/1999/xhtml";const p0={svg:"http://www.w3.org/2000/svg",xhtml:Pp,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function ah(e){var t=e+="",n=t.indexOf(":");return n>=0&&(t=e.slice(0,n))!=="xmlns"&&(e=e.slice(n+1)),p0.hasOwnProperty(t)?{space:p0[t],local:e}:e}function o9(e){return function(){var t=this.ownerDocument,n=this.namespaceURI;return n===Pp&&t.documentElement.namespaceURI===Pp?t.createElement(e):t.createElementNS(n,e)}}function s9(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function ex(e){var t=ah(e);return(t.local?s9:o9)(t)}function a9(){}function Sv(e){return e==null?a9:function(){return this.querySelector(e)}}function l9(e){typeof e!="function"&&(e=Sv(e));for(var t=this._groups,n=t.length,i=new Array(n),s=0;s<n;++s)for(var l=t[s],a=l.length,c=i[s]=new Array(a),d,h,g=0;g<a;++g)(d=l[g])&&(h=e.call(d,d.__data__,g,l))&&("__data__"in d&&(h.__data__=d.__data__),c[g]=h);return new or(i,this._parents)}function c9(e){return e==null?[]:Array.isArray(e)?e:Array.from(e)}function u9(){return[]}function nx(e){return e==null?u9:function(){return this.querySelectorAll(e)}}function d9(e){return function(){return c9(e.apply(this,arguments))}}function f9(e){typeof e=="function"?e=d9(e):e=nx(e);for(var t=this._groups,n=t.length,i=[],s=[],l=0;l<n;++l)for(var a=t[l],c=a.length,d,h=0;h<c;++h)(d=a[h])&&(i.push(e.call(d,d.__data__,h,a)),s.push(d));return new or(i,s)}function rx(e){return function(){return this.matches(e)}}function ix(e){return function(t){return t.matches(e)}}var h9=Array.prototype.find;function g9(e){return function(){return h9.call(this.children,e)}}function p9(){return this.firstElementChild}function v9(e){return this.select(e==null?p9:g9(typeof e=="function"?e:ix(e)))}var m9=Array.prototype.filter;function b9(){return Array.from(this.children)}function _9(e){return function(){return m9.call(this.children,e)}}function y9(e){return this.selectAll(e==null?b9:_9(typeof e=="function"?e:ix(e)))}function w9(e){typeof e!="function"&&(e=rx(e));for(var t=this._groups,n=t.length,i=new Array(n),s=0;s<n;++s)for(var l=t[s],a=l.length,c=i[s]=[],d,h=0;h<a;++h)(d=l[h])&&e.call(d,d.__data__,h,l)&&c.push(d);return new or(i,this._parents)}function ox(e){return new Array(e.length)}function x9(){return new or(this._enter||this._groups.map(ox),this._parents)}function sf(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}sf.prototype={constructor:sf,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 S9(e){return function(){return e}}function C9(e,t,n,i,s,l){for(var a=0,c,d=t.length,h=l.length;a<h;++a)(c=t[a])?(c.__data__=l[a],i[a]=c):n[a]=new sf(e,l[a]);for(;a<d;++a)(c=t[a])&&(s[a]=c)}function A9(e,t,n,i,s,l,a){var c,d,h=new Map,g=t.length,p=l.length,v=new Array(g),b;for(c=0;c<g;++c)(d=t[c])&&(v[c]=b=a.call(d,d.__data__,c,t)+"",h.has(b)?s[c]=d:h.set(b,d));for(c=0;c<p;++c)b=a.call(e,l[c],c,l)+"",(d=h.get(b))?(i[c]=d,d.__data__=l[c],h.delete(b)):n[c]=new sf(e,l[c]);for(c=0;c<g;++c)(d=t[c])&&h.get(v[c])===d&&(s[c]=d)}function P9(e){return e.__data__}function k9(e,t){if(!arguments.length)return Array.from(this,P9);var n=t?A9:C9,i=this._parents,s=this._groups;typeof e!="function"&&(e=S9(e));for(var l=s.length,a=new Array(l),c=new Array(l),d=new Array(l),h=0;h<l;++h){var g=i[h],p=s[h],v=p.length,b=T9(e.call(g,g&&g.__data__,h,i)),w=b.length,S=c[h]=new Array(w),x=a[h]=new Array(w),A=d[h]=new Array(v);n(g,p,S,x,A,b,t);for(var T=0,D=0,R,L;T<w;++T)if(R=S[T]){for(T>=D&&(D=T+1);!(L=x[D])&&++D<w;);R._next=L||null}}return a=new or(a,i),a._enter=c,a._exit=d,a}function T9(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function E9(){return new or(this._exit||this._groups.map(ox),this._parents)}function I9(e,t,n){var i=this.enter(),s=this,l=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?l.remove():n(l),i&&s?i.merge(s).order():s}function O9(e){for(var t=e.selection?e.selection():e,n=this._groups,i=t._groups,s=n.length,l=i.length,a=Math.min(s,l),c=new Array(s),d=0;d<a;++d)for(var h=n[d],g=i[d],p=h.length,v=c[d]=new Array(p),b,w=0;w<p;++w)(b=h[w]||g[w])&&(v[w]=b);for(;d<s;++d)c[d]=n[d];return new or(c,this._parents)}function R9(){for(var e=this._groups,t=-1,n=e.length;++t<n;)for(var i=e[t],s=i.length-1,l=i[s],a;--s>=0;)(a=i[s])&&(l&&a.compareDocumentPosition(l)^4&&l.parentNode.insertBefore(a,l),l=a);return this}function N9(e){e||(e=M9);function t(p,v){return p&&v?e(p.__data__,v.__data__):!p-!v}for(var n=this._groups,i=n.length,s=new Array(i),l=0;l<i;++l){for(var a=n[l],c=a.length,d=s[l]=new Array(c),h,g=0;g<c;++g)(h=a[g])&&(d[g]=h);d.sort(t)}return new or(s,this._parents).order()}function M9(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function L9(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}function D9(){return Array.from(this)}function F9(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var i=e[t],s=0,l=i.length;s<l;++s){var a=i[s];if(a)return a}return null}function B9(){let e=0;for(const t of this)++e;return e}function z9(){return!this.node()}function V9(e){for(var t=this._groups,n=0,i=t.length;n<i;++n)for(var s=t[n],l=0,a=s.length,c;l<a;++l)(c=s[l])&&e.call(c,c.__data__,l,s);return this}function H9(e){return function(){this.removeAttribute(e)}}function W9(e){return function(){this.removeAttributeNS(e.space,e.local)}}function U9(e,t){return function(){this.setAttribute(e,t)}}function G9(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function K9(e,t){return function(){var n=t.apply(this,arguments);n==null?this.removeAttribute(e):this.setAttribute(e,n)}}function q9(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 Y9(e,t){var n=ah(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?W9:H9:typeof t=="function"?n.local?q9:K9:n.local?G9:U9)(n,t))}function sx(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}function X9(e){return function(){this.style.removeProperty(e)}}function Z9(e,t,n){return function(){this.style.setProperty(e,t,n)}}function j9(e,t,n){return function(){var i=t.apply(this,arguments);i==null?this.style.removeProperty(e):this.style.setProperty(e,i,n)}}function Q9(e,t,n){return arguments.length>1?this.each((t==null?X9:typeof t=="function"?j9:Z9)(e,t,n??"")):_s(this.node(),e)}function _s(e,t){return e.style.getPropertyValue(t)||sx(e).getComputedStyle(e,null).getPropertyValue(t)}function J9(e){return function(){delete this[e]}}function $9(e,t){return function(){this[e]=t}}function t6(e,t){return function(){var n=t.apply(this,arguments);n==null?delete this[e]:this[e]=n}}function e6(e,t){return arguments.length>1?this.each((t==null?J9:typeof t=="function"?t6:$9)(e,t)):this.node()[e]}function ax(e){return e.trim().split(/^|\s+/)}function Cv(e){return e.classList||new lx(e)}function lx(e){this._node=e,this._names=ax(e.getAttribute("class")||"")}lx.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 cx(e,t){for(var n=Cv(e),i=-1,s=t.length;++i<s;)n.add(t[i])}function ux(e,t){for(var n=Cv(e),i=-1,s=t.length;++i<s;)n.remove(t[i])}function n6(e){return function(){cx(this,e)}}function r6(e){return function(){ux(this,e)}}function i6(e,t){return function(){(t.apply(this,arguments)?cx:ux)(this,e)}}function o6(e,t){var n=ax(e+"");if(arguments.length<2){for(var i=Cv(this.node()),s=-1,l=n.length;++s<l;)if(!i.contains(n[s]))return!1;return!0}return this.each((typeof t=="function"?i6:t?n6:r6)(n,t))}function s6(){this.textContent=""}function a6(e){return function(){this.textContent=e}}function l6(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function c6(e){return arguments.length?this.each(e==null?s6:(typeof e=="function"?l6:a6)(e)):this.node().textContent}function u6(){this.innerHTML=""}function d6(e){return function(){this.innerHTML=e}}function f6(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function h6(e){return arguments.length?this.each(e==null?u6:(typeof e=="function"?f6:d6)(e)):this.node().innerHTML}function g6(){this.nextSibling&&this.parentNode.appendChild(this)}function p6(){return this.each(g6)}function v6(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function m6(){return this.each(v6)}function b6(e){var t=typeof e=="function"?e:ex(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}function _6(){return null}function y6(e,t){var n=typeof e=="function"?e:ex(e),i=t==null?_6:typeof t=="function"?t:Sv(t);return this.select(function(){return this.insertBefore(n.apply(this,arguments),i.apply(this,arguments)||null)})}function w6(){var e=this.parentNode;e&&e.removeChild(this)}function x6(){return this.each(w6)}function S6(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function C6(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function A6(e){return this.select(e?C6:S6)}function P6(e){return arguments.length?this.property("__data__",e):this.node().__data__}function k6(e){return function(t){e.call(this,t,this.__data__)}}function T6(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 E6(e){return function(){var t=this.__on;if(t){for(var n=0,i=-1,s=t.length,l;n<s;++n)l=t[n],(!e.type||l.type===e.type)&&l.name===e.name?this.removeEventListener(l.type,l.listener,l.options):t[++i]=l;++i?t.length=i:delete this.__on}}}function I6(e,t,n){return function(){var i=this.__on,s,l=k6(t);if(i){for(var a=0,c=i.length;a<c;++a)if((s=i[a]).type===e.type&&s.name===e.name){this.removeEventListener(s.type,s.listener,s.options),this.addEventListener(s.type,s.listener=l,s.options=n),s.value=t;return}}this.addEventListener(e.type,l,n),s={type:e.type,name:e.name,value:t,listener:l,options:n},i?i.push(s):this.__on=[s]}}function O6(e,t,n){var i=T6(e+""),s,l=i.length,a;if(arguments.length<2){var c=this.node().__on;if(c){for(var d=0,h=c.length,g;d<h;++d)for(s=0,g=c[d];s<l;++s)if((a=i[s]).type===g.type&&a.name===g.name)return g.value}return}for(c=t?I6:E6,s=0;s<l;++s)this.each(c(i[s],t,n));return this}function dx(e,t,n){var i=sx(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 R6(e,t){return function(){return dx(this,e,t)}}function N6(e,t){return function(){return dx(this,e,t.apply(this,arguments))}}function M6(e,t){return this.each((typeof t=="function"?N6:R6)(e,t))}function*L6(){for(var e=this._groups,t=0,n=e.length;t<n;++t)for(var i=e[t],s=0,l=i.length,a;s<l;++s)(a=i[s])&&(yield a)}var fx=[null];function or(e,t){this._groups=e,this._parents=t}function Eu(){return new or([[document.documentElement]],fx)}function D6(){return this}or.prototype=Eu.prototype={constructor:or,select:l9,selectAll:f9,selectChild:v9,selectChildren:y9,filter:w9,data:k9,enter:x9,exit:E9,join:I9,merge:O9,selection:D6,order:R9,sort:N9,call:L9,nodes:D9,node:F9,size:B9,empty:z9,each:V9,attr:Y9,style:Q9,property:e6,classed:o6,text:c6,html:h6,raise:p6,lower:m6,append:b6,insert:y6,remove:x6,clone:A6,datum:P6,on:O6,dispatch:M6,[Symbol.iterator]:L6};function wo(e){return typeof e=="string"?new or([[document.querySelector(e)]],[document.documentElement]):new or([[e]],fx)}function F6(e){let t;for(;t=e.sourceEvent;)e=t;return e}function v0(e,t){if(e=F6(e),t===void 0&&(t=e.currentTarget),t){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var i=n.createSVGPoint();return i.x=e.clientX,i.y=e.clientY,i=i.matrixTransform(t.getScreenCTM().inverse()),[i.x,i.y]}if(t.getBoundingClientRect){var s=t.getBoundingClientRect();return[e.clientX-s.left-t.clientLeft,e.clientY-s.top-t.clientTop]}}return[e.pageX,e.pageY]}var B6={value:()=>{}};function Av(){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 Kd(n)}function Kd(e){this._=e}function z6(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}})}Kd.prototype=Av.prototype={constructor:Kd,on:function(e,t){var n=this._,i=z6(e+"",n),s,l=-1,a=i.length;if(arguments.length<2){for(;++l<a;)if((s=(e=i[l]).type)&&(s=V6(n[s],e.name)))return s;return}if(t!=null&&typeof t!="function")throw new Error("invalid callback: "+t);for(;++l<a;)if(s=(e=i[l]).type)n[s]=m0(n[s],e.name,t);else if(t==null)for(s in n)n[s]=m0(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 Kd(e)},call:function(e,t){if((s=arguments.length-2)>0)for(var n=new Array(s),i=0,s,l;i<s;++i)n[i]=arguments[i+2];if(!this._.hasOwnProperty(e))throw new Error("unknown type: "+e);for(l=this._[e],i=0,s=l.length;i<s;++i)l[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,l=i.length;s<l;++s)i[s].value.apply(t,n)}};function V6(e,t){for(var n=0,i=e.length,s;n<i;++n)if((s=e[n]).name===t)return s.value}function m0(e,t,n){for(var i=0,s=e.length;i<s;++i)if(e[i].name===t){e[i]=B6,e=e.slice(0,i).concat(e.slice(i+1));break}return n!=null&&e.push({name:t,value:n}),e}const H6={passive:!1},ga={capture:!0,passive:!1};function qg(e){e.stopImmediatePropagation()}function ts(e){e.preventDefault(),e.stopImmediatePropagation()}function W6(e){var t=e.document.documentElement,n=wo(e).on("dragstart.drag",ts,ga);"onselectstart"in t?n.on("selectstart.drag",ts,ga):(t.__noselect=t.style.MozUserSelect,t.style.MozUserSelect="none")}function U6(e,t){var n=e.document.documentElement,i=wo(e).on("dragstart.drag",null);t&&(i.on("click.drag",ts,ga),setTimeout(function(){i.on("click.drag",null)},0)),"onselectstart"in n?i.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}const Id=e=>()=>e;function kp(e,{sourceEvent:t,subject:n,target:i,identifier:s,active:l,x:a,y:c,dx:d,dy:h,dispatch:g}){Object.defineProperties(this,{type:{value:e,enumerable:!0,configurable:!0},sourceEvent:{value:t,enumerable:!0,configurable:!0},subject:{value:n,enumerable:!0,configurable:!0},target:{value:i,enumerable:!0,configurable:!0},identifier:{value:s,enumerable:!0,configurable:!0},active:{value:l,enumerable:!0,configurable:!0},x:{value:a,enumerable:!0,configurable:!0},y:{value:c,enumerable:!0,configurable:!0},dx:{value:d,enumerable:!0,configurable:!0},dy:{value:h,enumerable:!0,configurable:!0},_:{value:g}})}kp.prototype.on=function(){var e=this._.on.apply(this._,arguments);return e===this._?this:e};function G6(e){return!e.ctrlKey&&!e.button}function K6(){return this.parentNode}function q6(e,t){return t??{x:e.x,y:e.y}}function Y6(){return navigator.maxTouchPoints||"ontouchstart"in this}function hx(){var e=G6,t=K6,n=q6,i=Y6,s={},l=Av("start","drag","end"),a=0,c,d,h,g,p=0;function v(R){R.on("mousedown.drag",b).filter(i).on("touchstart.drag",x).on("touchmove.drag",A,H6).on("touchend.drag touchcancel.drag",T).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function b(R,L){if(!(g||!e.call(this,R,L))){var V=D(this,t.call(this,R,L),R,L,"mouse");V&&(wo(R.view).on("mousemove.drag",w,ga).on("mouseup.drag",S,ga),W6(R.view),qg(R),h=!1,c=R.clientX,d=R.clientY,V("start",R))}}function w(R){if(ts(R),!h){var L=R.clientX-c,V=R.clientY-d;h=L*L+V*V>p}s.mouse("drag",R)}function S(R){wo(R.view).on("mousemove.drag mouseup.drag",null),U6(R.view,h),ts(R),s.mouse("end",R)}function x(R,L){if(e.call(this,R,L)){var V=R.changedTouches,M=t.call(this,R,L),H=V.length,j,tt;for(j=0;j<H;++j)(tt=D(this,M,R,L,V[j].identifier,V[j]))&&(qg(R),tt("start",R,V[j]))}}function A(R){var L=R.changedTouches,V=L.length,M,H;for(M=0;M<V;++M)(H=s[L[M].identifier])&&(ts(R),H("drag",R,L[M]))}function T(R){var L=R.changedTouches,V=L.length,M,H;for(g&&clearTimeout(g),g=setTimeout(function(){g=null},500),M=0;M<V;++M)(H=s[L[M].identifier])&&(qg(R),H("end",R,L[M]))}function D(R,L,V,M,H,j){var tt=l.copy(),it=v0(j||V,L),G,ot,Y;if((Y=n.call(R,new kp("beforestart",{sourceEvent:V,target:v,identifier:H,active:a,x:it[0],y:it[1],dx:0,dy:0,dispatch:tt}),M))!=null)return G=Y.x-it[0]||0,ot=Y.y-it[1]||0,function J(et,rt,ht){var bt=it,yt;switch(et){case"start":s[H]=J,yt=a++;break;case"end":delete s[H],--a;case"drag":it=v0(ht||rt,L),yt=a;break}tt.call(et,R,new kp(et,{sourceEvent:rt,subject:Y,target:v,identifier:H,active:yt,x:it[0]+G,y:it[1]+ot,dx:it[0]-bt[0],dy:it[1]-bt[1],dispatch:tt}),M)}}return v.filter=function(R){return arguments.length?(e=typeof R=="function"?R:Id(!!R),v):e},v.container=function(R){return arguments.length?(t=typeof R=="function"?R:Id(R),v):t},v.subject=function(R){return arguments.length?(n=typeof R=="function"?R:Id(R),v):n},v.touchable=function(R){return arguments.length?(i=typeof R=="function"?R:Id(!!R),v):i},v.on=function(){var R=l.on.apply(l,arguments);return R===l?v:R},v.clickDistance=function(R){return arguments.length?(p=(R=+R)*R,v):Math.sqrt(p)},v}function X6({handle:e,getCurrentBbox:t,onResize:n,onDragEnd:i,onInteractionStart:s,onInteractionEnd:l}){let a;return hx().on("start",()=>{a=t(),s==null||s()}).on("drag",c=>{let d=a.x,h=a.y,g=a.width,p=a.height;const v=c.x-c.subject.x,b=c.y-c.subject.y;switch(e){case"nw":d=a.x+v,h=a.y+b,g=a.width-v,p=a.height-b;break;case"ne":h=a.y+b,g=a.width+v,p=a.height-b;break;case"sw":d=a.x+v,g=a.width-v,p=a.height+b;break;case"se":g=a.width+v,p=a.height+b;break;case"n":h=a.y+b,p=a.height-b;break;case"s":p=a.height+b;break;case"w":d=a.x+v,g=a.width-v;break;case"e":g=a.width+v;break}const w=1;g<w&&(g=w,e.includes("w")&&(d=a.x+a.width-w)),p<w&&(p=w,e.includes("n")&&(h=a.y+a.height-w));const S=Math.round(d),x=Math.round(h),A=Math.round(g),T=Math.round(p);n&&n({x:S,y:x,width:A,height:T})}).on("end",()=>{const{x:c,y:d,width:h,height:g}=t();i&&i({x:c,y:d,width:h,height:g}),l==null||l()})}function Z6({getCurrentBbox:e,onMove:t,onDragEnd:n,onInteractionStart:i,onInteractionEnd:s}){let l;return hx().on("start",()=>{l=e(),i==null||i()}).on("drag",a=>{const c=a.x-a.subject.x,d=a.y-a.subject.y,h=Math.round(l.x+c),g=Math.round(l.y+d);t&&t({x:h,y:g,width:l.width,height:l.height})}).on("end",()=>{const a=e();n&&n(a),s==null||s()})}var j6=Pr('<text dominant-baseline="middle" text-anchor="end"> </text><text text-anchor="middle"> </text><text dominant-baseline="middle" text-anchor="end"> </text>',1),Q6=Pr('<g><rect stroke-width="2" pointer-events="all" vector-effect="non-scaling-stroke" class="movable-rectangle" style="cursor: move;"></rect><!></g>');function J6(e,t){ut(t,!0);const n=k(t,"bbox",15),i=k(t,"colorStroke",3,"#007bff"),s=k(t,"colorFill",3,"transparent"),l=k(t,"opacity",3,.3),a=k(t,"handleSize",3,12),c=k(t,"scale",3,1),d=E(()=>n().x),h=E(()=>n().y),g=E(()=>n().width),p=E(()=>n().height);let v=pt(void 0),b=pt(!1);function w(){if(!f(v))return;const L=a()/c(),H=Math.max(3,Math.min(L,f(g)*.1,f(p)*.1,7)),j=[{id:"nw",x:f(d)-H/2,y:f(h)-H/2,cursor:"nwse-resize",label:"Resize northwest corner"},{id:"ne",x:f(d)+f(g)-H/2,y:f(h)-H/2,cursor:"nesw-resize",label:"Resize northeast corner"},{id:"sw",x:f(d)-H/2,y:f(h)+f(p)-H/2,cursor:"nesw-resize",label:"Resize southwest corner"},{id:"se",x:f(d)+f(g)-H/2,y:f(h)+f(p)-H/2,cursor:"nwse-resize",label:"Resize southeast corner"},{id:"n",x:f(d)+f(g)/2-H/2,y:f(h)-H/2,cursor:"ns-resize",label:"Resize top edge"},{id:"s",x:f(d)+f(g)/2-H/2,y:f(h)+f(p)-H/2,cursor:"ns-resize",label:"Resize bottom edge"},{id:"w",x:f(d)-H/2,y:f(h)+f(p)/2-H/2,cursor:"ew-resize",label:"Resize left edge"},{id:"e",x:f(d)+f(g)-H/2,y:f(h)+f(p)/2-H/2,cursor:"ew-resize",label:"Resize right edge"}],it=wo(f(v)).selectAll(".resize-handle").data(j,G=>G.id);it.enter().append("rect").attr("class","resize-handle").attr("width",H).attr("height",H).attr("fill",i()).attr("stroke",i()).attr("stroke-width","1").attr("vector-effect","non-scaling-stroke").attr("role","button").attr("style",G=>`cursor: ${G.cursor};`).attr("data-testid",G=>`resize-handle-${G.id}`).attr("aria-label",G=>G.label).merge(it).attr("x",G=>G.x).attr("y",G=>G.y).attr("width",H).attr("height",H).attr("fill",i()).attr("stroke",i()),it.exit().remove()}function S(){if(!f(v))return;["nw","ne","sw","se","n","s","w","e"].forEach(M=>{if(!f(v))return;const H=f(v).querySelector(`[data-testid="resize-handle-${M}"]`);H&&wo(H).call(X6({handle:M,getCurrentBbox:()=>({x:f(d),y:f(h),width:f(g),height:f(p)}),onResize:j=>{n(n().x=j.x,!0),n(n().y=j.y,!0),n(n().width=j.width,!0),n(n().height=j.height,!0),t.onResize&&t.onResize(j),w()},onDragEnd:j=>{t.onDragEnd&&t.onDragEnd(j)},onInteractionStart:()=>{O(b,!0)},onInteractionEnd:()=>{O(b,!1)}}))});const V=f(v).querySelector(".movable-rectangle");V&&wo(V).call(Z6({getCurrentBbox:()=>({x:f(d),y:f(h),width:f(g),height:f(p)}),onMove:M=>{n(n().x=M.x,!0),n(n().y=M.y,!0),n(n().width=M.width,!0),n(n().height=M.height,!0),t.onMove&&t.onMove(M),w()},onDragEnd:M=>{t.onDragEnd&&t.onDragEnd(M)},onInteractionStart:()=>{O(b,!0)},onInteractionEnd:()=>{O(b,!1)}}))}xs(()=>{f(v)&&(w(),S())});const x=async()=>{f(v)&&(await Hf(),w(),S())};be(()=>{w(),x()});var A=Q6(),T=q(A),D=nt(T);{var R=L=>{var V=j6(),M=N(V),H=q(M);K(M);var j=nt(M),tt=q(j);K(j);var it=nt(j),G=q(it);K(it),Mt(()=>{Pt(M,"x",f(d)-10/c()),Pt(M,"y",f(h)+1/c()),Pt(M,"fill",i()),Pt(M,"font-size",14/c()),me(H,`x: ${f(d)??""}, y: ${f(h)??""}`),Pt(j,"x",f(d)+f(g)/2),Pt(j,"y",f(h)+f(p)+20/c()),Pt(j,"fill",i()),Pt(j,"font-size",14/c()),me(tt,`w: ${f(g)??""}px`),Pt(it,"x",f(d)-10/c()),Pt(it,"y",f(h)+f(p)/2),Pt(it,"fill",i()),Pt(it,"font-size",14/c()),me(G,`h: ${f(p)??""}px`)}),y(L,V)};gt(D,L=>{f(b)&&L(R)})}K(A),yn(A,L=>O(v,L),()=>f(v)),Mt(()=>{Pt(T,"x",f(d)),Pt(T,"y",f(h)),Pt(T,"width",f(g)),Pt(T,"height",f(p)),Pt(T,"stroke",i()),Pt(T,"fill",s()),Pt(T,"fill-opacity",l())}),y(e,A),dt()}var $6=Pr('<g data-testid="sample-annotation"><!><!><!></g>');function tB(e,t){var ot,Y;ut(t,!0);const n=()=>Kt(d,"$customLabelColorsStore",i),[i,s]=pr(),l=k(t,"showLabel",3,!1),a=k(t,"isResizable",3,!1),c=k(t,"scale",3,1),{customLabelColorsStore:d}=wv(),h=E(()=>t.annotation.annotation_label.annotation_label_name),g=(Y=(ot=t.annotation)==null?void 0:ot.instance_segmentation_details)==null?void 0:Y.segmentation_mask,p=E(()=>t.annotation.annotation_id),v=E(()=>Ui(f(h),1)),b=E(()=>{var J;return((J=n()[f(h)])==null?void 0:J.color)??Ui(f(h),1).color}),w=E(()=>{var J;return((J=n()[f(h)])==null?void 0:J.color)??Ui(f(h),.4).color}),S=E(()=>{var J;return((J=n()[f(h)])==null?void 0:J.alpha)*.4});let x=pt(_n(rf(t.annotation)));const A=J=>{O(x,t.constraintBox?Kg(J,t.constraintBox,!1):J,!0)},T=J=>{O(x,t.constraintBox?Kg(J,t.constraintBox,!0):J,!0)},D=J=>{var rt;const et=t.constraintBox?Kg(J,t.constraintBox,!0):J;O(x,et,!0),(rt=t.onBoundingBoxChanged)==null||rt.call(t,et)},R=E(()=>[f(x).x,f(x).y,f(x).width,f(x).height]);var L=$6(),V=q(L);{var M=J=>{{let et=E(()=>[f(x).x,f(x).y]);iB(J,{get coordinates(){return f(et)},get colorText(){return f(v)},get label(){return f(h)}})}};gt(V,J=>{l()&&J(M)})}var H=nt(V);{var j=J=>{gx(J,{get segmentation(){return g},get width(){return t.imageWidth},get colorFill(){return f(w)},get opacity(){return f(S)}})};gt(H,J=>{g&&J(j)})}var tt=nt(H);{var it=J=>{J6(J,{get colorStroke(){return f(b)},get colorFill(){return f(w)},get opacity(){return f(S)},get scale(){return c()},onResize:A,onMove:T,onDragEnd:D,get bbox(){return f(x)},set bbox(et){O(x,et,!0)}})},G=J=>{nB(J,{get bbox(){return f(R)},get annotationId(){return f(p)},get label(){return f(h)},get colorStroke(){return f(b)},get colorFill(){return f(w)},get opacity(){return f(S)}})};gt(tt,J=>{a()&&t.constraintBox?J(it):J(G,!1)})}K(L),Mt(()=>{Pt(L,"data-annotation-label",f(h)),Pt(L,"data-annotation-id",f(p))}),y(e,L),dt(),s()}var eB=Pr('<rect vector-effect="non-scaling-stroke" stroke-width="2" pointer-events="all" data-testid="annotation_box"></rect>');function nB(e,t){const n=k(t,"isPrediction",3,!1),[i,s,l,a]=t.bbox,c=n()?"5,5":"none",d=n()?.8:1;var h=eB();Mt(()=>{Pt(h,"x",i),Pt(h,"y",s),Pt(h,"width",l),Pt(h,"height",a),Pt(h,"stroke",t.colorStroke),Pt(h,"stroke-opacity",d),Pt(h,"stroke-dasharray",c),Pt(h,"fill",t.colorFill),Pt(h,"fill-opacity",t.opacity),Pt(h,"aria-label",t.label)}),y(e,h)}var rB=Pr('<g class="unscaled"><rect></rect><text class="annotation-label-text" data-testid="svg-annotation-text"> </text></g>');function iB(e,t){ut(t,!0);const n=k(t,"fontSize",3,14),i=k(t,"isPrediction",3,!1),s=E(()=>K0(t.coordinates,2)),l=E(()=>f(s)[0]),a=E(()=>f(s)[1]);let c=pt(null);const d=E(()=>f(c)?(f(c).textContent=i()?`${t.label} (pred)`:t.label,f(c).getBBox()):{width:0,height:0}),h=5,g=i()?.8:1,p=i()?"italic":"normal";var v=rB(),b=q(v),w=nt(b);Pt(w,"x",h),Pt(w,"y",-5);var S=q(w,!0);K(w),yn(w,x=>O(c,x),()=>f(c)),K(v),Mt(()=>{var x,A,T;Pt(v,"transform",`translate(${f(l)}, ${f(a)})`),Pt(v,"data-label",t.label),Pt(b,"y",-((x=f(d))==null?void 0:x.height)),Pt(b,"width",((A=f(d))==null?void 0:A.width)+h*2),Pt(b,"height",(T=f(d))==null?void 0:T.height),Pt(b,"fill",t.colorText.color),Pt(b,"opacity",g),Pt(w,"fill",t.colorText.contrastColor),Pt(w,"font-size",n()),Pt(w,"font-style",p),me(S,i()?`${t.label} (pred)`:t.label)}),y(e,v),dt()}function oB(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 sB(e,t,n){const i=e.reduce((A,T)=>A+T,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 l=document.createElement("canvas");l.width=t,l.height=s;const a=l.getContext("2d",{willReadFrequently:!0});if(!a)throw new Error("Failed to get canvas 2D context. Check canvas support or mocks.");if(typeof a.createImageData!="function"||typeof a.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 c;try{c=a.createImageData(t,s)}catch(A){throw console.error(`Error calling ctx.createImageData(${t}, ${s}). Check mock implementation.`,A),A}const d=c.data,h=d.length,{r:g,g:p,b:v,a:b}=oB(n);let w=0,S=0;e.forEach((A,T)=>{if(A===0)return;if(T%2!==0){const R=w+A;for(;w<R;){const L=Math.floor(w/t),V=w%t;S=(L*t+V)*4,S>=0&&S<h-3&&(d[S]=g,d[S+1]=p,d[S+2]=v,d[S+3]=b),w++}}else w+=A}),a.putImageData(c,0,0);let x="";try{x=l.toDataURL()}catch(A){console.error("Error calling canvas.toDataURL(). Check mock implementation.",A),x="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII="}return{dataUrl:x,height:s}}var aB=Pr('<image x="0" y="0"></image>');function gx(e,t){ut(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=E(()=>{const d=n().replace(/rgba?\((\d+,\s*\d+,\s*\d+)(?:,\s*[\d.]+)?\)/,"rgb($1)");return sB(t.segmentation,t.width,d)}),l=E(()=>f(s).dataUrl),a=E(()=>f(s).height);var c=aB();Mt(()=>{Pt(c,"href",f(l)),Pt(c,"width",t.width),Pt(c,"height",f(a)),Pt(c,"opacity",i())}),y(e,c),dt()}var lB=Pr('<svg style="position: absolute; top: 0; left: 0;"><g></g></svg>');function cB(e,t){ut(t,!0);const n=()=>Kt(a,"$isHidden",i),[i,s]=pr(),l=k(t,"sampleImageObjectFit",3,"contain"),{isHidden:a}=Uw(),c=E(()=>t.sample.annotations.filter(p=>p.annotation_type!=="classification"));var d=lB(),h=q(d);let g;Wr(h,21,()=>f(c),p=>p.annotation_id,(p,v)=>{tB(p,{get annotation(){return f(v)},get showLabel(){return t.showLabel},get imageWidth(){return t.sample.width}})}),K(h),K(d),Mt(p=>{Pt(d,"viewBox",`0 0 ${t.sample.width} ${t.sample.height}`),Pt(d,"preserveAspectRatio",l()==="contain"?"xMidYMid meet":"xMidYMid slice"),Pt(d,"width",t.containerWidth),Pt(d,"height",t.containerHeight),g=Ln(h,0,"",null,g,p)},[()=>({invisible:n()})]),y(e,d),dt(),s()}function uB(e,t){(e.key==="Enter"||e.key===" ")&&(e.preventDefault(),t())}var dB=Pr('<rect fill="none" stroke="hsl(var(--primary))" stroke-width="3" pointer-events="none" vector-effect="non-scaling-stroke"></rect>'),fB=Pr('<g role="button" tabindex="0" data-testid="selectable-svg-group"><!><!></g>');function tV(e,t){ut(t,!0);let n=k(t,"isSelected",3,!1);const{x:i,y:s,width:l,height:a}=t.box,c=()=>{t.onSelect(t.groupId)};var d=fB();d.__click=c;let h;d.__keydown=[uB,c],Mn(d,"",{},{cursor:"pointer"});var g=q(d);ct(g,()=>t.children);var p=nt(g);{var v=b=>{var w=dB();Mt(()=>{Pt(w,"x",i),Pt(w,"y",s),Pt(w,"width",l),Pt(w,"height",a)}),y(b,w)};gt(p,b=>{n()&&b(v)})}K(d),Mt(b=>{h=Ln(d,0,"group svelte-lseqsj",null,h,b),Pt(d,"data-group-id",t.groupId)},[()=>({selected:n()})]),y(e,d),dt()}kr(["click","keydown"]);const hB=({datasetId:e,annotationId:t,onUpdate:n})=>{const i=OT({path:{annotation_id:t,dataset_id:e}}),s=wu(),{updateAnnotations:l}=iy({datasetId:e}),a=Z0(i),c=()=>{s.invalidateQueries({queryKey:i.queryKey}),s.invalidateQueries({queryKey:Fp().queryKey}),s.invalidateQueries({queryKey:Dp({path:{dataset_id:e}}).queryKey})};return{updateAnnotation:async h=>{try{await l([h]),c(),Ur.success("Annotation updated successfully"),n==null||n()}catch(g){Ur.error("Failed to update annotation:"+g.message)}},annotation:a,refetch:c}};var gB=Z('You are going to delete this annotation. This action cannot be undone. <div class="mt-2 flex justify-end gap-2"><!> <!></div>',1),pB=Z("<!> <!>",1),vB=Z('<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> <div class="flex gap-3"><!> <!></div></button>');function eV(e,t){ut(t,!0);const n=()=>Kt(b,"$result",l),i=()=>Kt(f(A),"$annotationResp",l),s=()=>Kt(p,"$isEditingMode",l),[l,a]=pr(),c=k(t,"isSelected",3,!1),d=k(t,"isHidden",3,!1),h=st=>{switch(st){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 st}},g=st=>{const xt=st.object_detection_details||st.instance_segmentation_details;if(xt){const{width:Lt,height:Wt}=xt;return`${Math.round(Lt)}x${Math.round(Wt)}px`}return""},{isEditingMode:p}=Qi.data.globalStorage,{datasetId:v}=Qi.data,b=zw(),w=E(()=>Hw(n().data||[])),S=E(()=>t.annotation.annotation_id),x=E(()=>hB({datasetId:v,annotationId:f(S),onUpdate:t.onUpdate})),A=E(()=>f(x).annotation),T=E(()=>f(x).updateAnnotation),D=E(()=>i().data||t.annotation),R=E(()=>{const st=f(D).annotation_label.annotation_label_name,xt=f(w).find(Lt=>Lt.value===st);return xt||{value:st,label:st}});let L=pt(!1);var V=vB();V.__click=function(...st){var xt;(xt=t.onClick)==null||xt.apply(this,st)};var M=q(V),H=q(M),j=q(H);{var tt=st=>{{const xt=(Wt,Bt)=>{let de=()=>Bt==null?void 0:Bt().inputValue;Vw(Wt,{get label(){return de()}})};let Lt=E(()=>f(w).find(Wt=>{var Bt;return Wt.value===((Bt=f(R))==null?void 0:Bt.value)}));Bw(st,{get items(){return f(w)},get selectedItem(){return f(Lt)},name:"annotation-label",placeholder:"Select or create a label",onSelect:Wt=>{f(T)({annotation_id:f(S),dataset_id:v,label_name:Wt.value})},notFound:xt,$$slots:{notFound:!0}})}},it=st=>{var xt=Ee();Mt(()=>me(xt,f(D).annotation_label.annotation_label_name)),y(st,xt)};gt(j,st=>{s()?st(tt):st(it,!1)})}K(H);var G=nt(H,2),ot=q(G),Y=nt(ot);{var J=st=>{var xt=Ee();Mt(Lt=>me(xt,`(${Lt??""})`),[()=>g(f(D))]),y(st,xt)};gt(Y,st=>{g(f(D))&&st(J)})}K(G),K(M);var et=nt(M,2),rt=q(et);{var ht=st=>{QT(st,{class:"size-6 text-muted-foreground",get onclick(){return t.onToggleShowAnnotation}})},bt=st=>{JT(st,{class:"size-6",get onclick(){return t.onToggleShowAnnotation}})};gt(rt,st=>{d()?st(ht):st(bt,!1)})}var yt=nt(rt,2);{var at=st=>{var xt=U(),Lt=N(xt);At(Lt,()=>mv,(Wt,Bt)=>{Bt(Wt,{get open(){return f(L)},set open(de){O(L,de,!0)},children:(de,Ut)=>{var Et=pB(),Ct=N(Et);At(Ct,()=>bv,(qt,ce)=>{ce(qt,{children:(ee,Yt)=>{iE(ee,{class:"size-6"})},$$slots:{default:!0}})});var Rt=nt(Ct,2);At(Rt,()=>vv,(qt,ce)=>{ce(qt,{children:(ee,Yt)=>{te();var _e=gB(),he=nt(N(_e)),Be=q(he);Nn(Be,{variant:"destructive",size:"sm",onclick:Ht=>{Ht.stopPropagation(),t.onDeleteAnnotation(Ht),O(L,!1)},children:(Ht,$t)=>{te();var ye=Ee("Delete");y(Ht,ye)},$$slots:{default:!0}});var Ot=nt(Be,2);Nn(Ot,{variant:"outline",size:"sm",onclick:Ht=>{Ht.stopPropagation(),O(L,!1)},children:(Ht,$t)=>{te();var ye=Ee("Cancel");y(Ht,ye)},$$slots:{default:!0}}),K(he),y(ee,_e)},$$slots:{default:!0}})}),y(de,Et)},$$slots:{default:!0}})}),y(st,xt)};gt(yt,st=>{s()&&st(at)})}K(et),K(V),Mt((st,xt)=>{Ln(V,1,st),me(ot,`${xt??""} `)},[()=>So(ie("flex w-full items-start justify-between gap-2 rounded-sm px-4 py-3 text-left align-baseline transition-colors",c()?"border border-accent-foreground/20 bg-accent":"bg-card hover:bg-accent/50")),()=>h(f(D).annotation_type)]),y(e,V),dt(),a()}kr(["click"]);var mB=(e,t,n)=>{e.stopPropagation(),t(f(n).tagId)},bB=Z('<div class="inline-flex items-center gap-1 rounded-lg bg-card px-2 py-1 text-xs"><span> </span> <button type="button" class="flex size-4 items-center justify-center rounded-full text-muted-foreground transition hover:text-destructive focus:outline-none disabled:cursor-not-allowed disabled:opacity-50">x</button></div>'),_B=Z('<div class="flex flex-wrap gap-1"></div>');function nV(e,t){ut(t,!0);const n=a=>{try{t.onClick(a),Ur.success("Tag removed successfully")}catch(c){Ur.error("Failed to remove tag. Please try again."),console.error("Error removing tag from sample:",c)}};var i=U(),s=N(i);{var l=a=>{qw(a,{title:"Tags",get icon(){return rE},children:(c,d)=>{var h=_B();Wr(h,21,()=>t.tags,g=>g.tagId,(g,p)=>{var v=bB(),b=q(v),w=q(b,!0);K(b);var S=nt(b,2);S.__click=[mB,n,p],K(v),Mt(()=>{me(w,f(p).name),Pt(S,"aria-label",`Remove tag ${f(p).name}`)}),y(g,v)}),K(h),y(c,h)}})};gt(s,a=>{t.tags.length>0&&a(l)})}y(e,i),dt()}kr(["click"]);var yB=Z('<img loading="lazy"/>');function px(e,t){ut(t,!0);const n=k(t,"objectFit",3,"contain"),{getDatasetVersion:i}=wi();let s=pt("");xs(async()=>{var a;(a=t.sample)!=null&&a.dataset_id&&O(s,await i(t.sample.dataset_id),!0)});var l=yB();Mt(a=>{Pt(l,"src",`${Y0}/sample/${t.sample.sample_id}${f(s)?`?v=${f(s)}`:""}`),Pt(l,"alt",t.sample.file_path_abs),Ln(l,1,a,"svelte-1a2mlic"),Mn(l,`--object-fit: ${n()??""}`)},[()=>So(ie("sample-image rounded-lg bg-black",t.class))]),y(e,l),dt()}const Tp=$e({}),b0=(e,t)=>{if(!(e==null&&t==null))return{min:e??void 0,max:t??void 0}},wB=e=>{if(!e)return{};const t=b0(e.min_width,e.max_width),n=b0(e.min_height,e.max_height);return{width:t,height:n}},xB=Zo(Tp,e=>{var c,d,h,g;if(!(e!=null&&e.dataset_id)||!(e!=null&&e.mode)||e.mode==="classifier")return null;const t={},{width:n,height:i}=wB((c=e.filters)==null?void 0:c.dimensions);n&&(t.width=n),i&&(t.height=i);const s=(d=e.filters)==null?void 0:d.sample_ids;s&&s.length>0&&(t.sample_ids=s);const l=(h=e.filters)==null?void 0:h.annotation_label_ids;l&&l.length>0&&(t.annotation_label_ids=l);const a=(g=e.filters)==null?void 0:g.tag_ids;if(a&&a.length>0&&(t.tag_ids=a),e.metadata_values){const p=j0(e.metadata_values);p.length>0&&(t.metadata_filters=p)}return Object.keys(t).length>0?t:null}),SB=()=>({filterParams:Tp,sampleFilter:xB,updateFilterParams:t=>{Tp.set(t)}});function CB(e,t){const n=e.currentTarget.dataset.sampleId;t(n)}function AB(e,t){const n=e.currentTarget.dataset.sampleId,i=e.currentTarget.dataset.index;M0($0.toSample({sampleId:n,datasetId:t.dataset_id,sampleIndex:Number(i)}))}function PB(e,t){if(e.key==="Enter"||e.key===" "){e.preventDefault();const n=e.currentTarget.dataset.sampleId;t(n)}}var kB=Z('<div class="flex h-full w-full items-center justify-center"><div>Loading samples...</div></div>'),TB=Z('<div class="flex h-full w-full items-center justify-center"><div class="mb-2 font-medium">Error loading samples</div></div>'),EB=Z(`<div class="flex h-full w-full items-center justify-center"><div class="text-center text-muted-foreground"><div class="mb-2 text-lg font-medium">No samples found</div> <div class="text-sm">This dataset doesn't contain any samples.</div></div></div>`),IB=Z('<div class="pointer-events-none absolute inset-x-0 bottom-0 z-10 rounded-b-lg bg-black/60 px-2 py-1 text-xs font-medium text-white"><span class="block truncate"> </span></div>'),OB=Z('<div data-testid="sample-grid-item" role="button" tabindex="0"><div class="absolute right-7 top-1 z-10"><!></div> <div class="relative overflow-hidden rounded-lg" style="width: var(--sample-width); height: var(--sample-height);"><!> <!> <!></div></div>'),RB=Z('<div class="flex justify-center p-4"><!></div>'),NB=Z("<!> <!>",1),MB=Z('<div class="viewport flex-1 svelte-w4icmb"><!></div>'),LB=Z('<div class="flex h-full w-full items-center justify-center" data-testid="samples-loading"><div>Loading...</div></div>');function rV(e,t){ut(t,!0);const n=()=>Kt(t.selectedAnnotationFilterIds,"$selectedAnnotationFilterIds",v),i=()=>Kt(x,"$tagsSelected",v),s=()=>Kt(A,"$dimensions",v),l=()=>Kt(T,"$metadataValues",v),a=()=>Kt(t.textEmbedding,"$textEmbedding",v),c=()=>Kt(j,"$filterParams",v),d=()=>Kt(f(G),"$infiniteSamples",v),h=()=>Kt(w,"$gridViewSampleRenderingStore",v),g=()=>Kt(S,"$showSampleFilenamesStore",v),p=()=>Kt(D,"$selectedSampleIds",v),[v,b]=pr(),{gridViewSampleRenderingStore:w,showSampleFilenamesStore:S}=yu(),{tagsSelected:x}=J0({dataset_id:t.dataset_id,kind:["sample"]}),{dimensionsValues:A}=wT(),{metadataValues:T}=RT(t.dataset_id),{selectedSampleIds:D,toggleSampleSelection:R,getDatasetVersion:L,setfilteredSampleCount:V}=wi(),M=E(()=>{var Ct,Rt;return{dataset_id:t.dataset_id,mode:"normal",filters:{annotation_label_ids:(Ct=n())!=null&&Ct.length?n():void 0,tag_ids:i().size>0?Array.from(i()):void 0,dimensions:s()},metadata_values:l(),text_embedding:(Rt=a())==null?void 0:Rt.embedding}}),H=Ct=>({...Ct,filters:Ct.filters?f0.omit(Ct.filters,["sample_ids"]):void 0}),{filterParams:j,updateFilterParams:tt}=SB();be(()=>{var ee;const Ct=f(M),Rt=c();if(Rt&&f0.isEqual(H(Ct),H(Rt)))return;let qt=Ct;const ce=(ee=Rt==null?void 0:Rt.filters)==null?void 0:ee.sample_ids;ce&&ce.length>0&&(qt={...qt,filters:{...qt.filters??{},sample_ids:ce}}),tt(qt)});const it=E(()=>Qw(c())),G=E(()=>f(it).samples),ot=E(()=>d()&&d().data?d().data.pages.flatMap(Ct=>Ct.data):[]);let Y=pt(null),J=pt(!1),et=pt(_n(h())),rt=pt(0);const{initialize:ht,savePosition:bt,getRestoredPosition:yt}=Ww("samples_scroll");xs(async()=>{ht(),await L(t.dataset_id),O(J,!0)});const at=E(()=>{var Rt;return[n().join(","),Array.from(i()).join(","),`${s().min_width}-${s().max_width}`,`${s().min_height}-${s().max_height}`,JSON.stringify(l()),((Rt=a())==null?void 0:Rt.queryText)||""].filter(Boolean).join("|")}),st=E(()=>yt(f(at)));function xt(Ct){const Rt=Ct.target.scrollTop;bt(Rt,f(at))}be(()=>{O(et,h(),!0)}),be(()=>{var Ct;d().isSuccess&&((Ct=d().data)==null?void 0:Ct.pages.length)>0&&V(d().data.pages[0].total_count)}),be(()=>{if(!f(Y))return;O(rt,f(Y).clientHeight,!0);const Ct=new ResizeObserver(()=>{f(Y)&&O(rt,f(Y).clientHeight,!0)});return Ct.observe(f(Y)),()=>{Ct.disconnect()}});function Lt(){d().hasNextPage&&!d().isFetchingNextPage&&d().fetchNextPage()}const Wt=16;var Bt=U(),de=N(Bt);{var Ut=Ct=>{var Rt=kB();y(Ct,Rt)},Et=Ct=>{var Rt=U(),qt=N(Rt);{var ce=Yt=>{var _e=TB();y(Yt,_e)},ee=Yt=>{var _e=U(),he=N(_e);{var Be=Ht=>{var $t=EB();y(Ht,$t)},Ot=Ht=>{var $t=U(),ye=N($t);{var zt=fe=>{var Le=MB(),Ke=q(Le);{const qe=(Ye,ne)=>{let oe=()=>ne==null?void 0:ne().index,an=()=>ne==null?void 0:ne().style;var Ft=U(),Gt=N(Ft);bi(Gt,()=>d().dataUpdatedAt,re=>{var dn=U(),Ne=N(dn);{var Ze=We=>{const Fe=E(()=>{var Ue,pn;return g()?f(ot)[oe()].file_name:(pn=(Ue=f(ot)[oe()].captions)==null?void 0:Ue[0])==null?void 0:pn.text});var Oe=OB();let Qe;Oe.__click=[CB,R],Oe.__dblclick=[AB,t],Oe.__keydown=[PB,R];var ke=q(Oe),Te=q(ke);{let Ue=E(()=>p().has(f(ot)[oe()].sample_id));Pv(Te,{onSelect:()=>{},get isSelected(){return f(Ue)}})}K(ke);var ln=nt(ke,2),Tn=q(ln);px(Tn,{get sample(){return f(ot)[oe()]},get objectFit(){return f(et)}});var En=nt(Tn,2);cB(En,{get sample(){return f(ot)[oe()]},get containerWidth(){return t.sampleWidth},get sampleImageObjectFit(){return f(et)},get containerHeight(){return t.sampleHeight}});var cn=nt(En,2);{var In=Ue=>{var pn=IB(),vr=q(pn),xn=q(vr,!0);K(vr),K(pn),Mt(()=>{Pt(vr,"title",f(Fe)),me(xn,f(Fe))}),y(Ue,pn)};gt(cn,Ue=>{f(Fe)&&Ue(In)})}K(ln),K(Oe),Mt(Ue=>{Qe=Ln(Oe,1,"relative svelte-w4icmb",null,Qe,Ue),Mn(Oe,an()),Pt(Oe,"data-sample-id",f(ot)[oe()].sample_id),Pt(Oe,"data-sample-name",f(ot)[oe()].file_name),Pt(Oe,"data-index",oe()),Pt(Oe,"aria-label",`View sample: ${f(ot)[oe()].file_name}`)},[()=>({"sample-selected":p().has(f(ot)[oe()].sample_id)})]),y(We,Oe)};gt(Ne,We=>{f(ot)[oe()]&&We(Ze)})}y(re,dn)}),y(Ye,Ft)},Pe=Ye=>{var ne=NB(),oe=N(ne);bi(oe,()=>f(ot).length,Gt=>{{let re=E(()=>!d().hasNextPage||d().isFetchingNextPage);tx(Gt,{onIntersect:Lt,get disabled(){return f(re)}})}});var an=nt(oe,2);{var Ft=Gt=>{var re=RB(),dn=q(re);oy(dn,{}),K(re),y(Gt,re)};gt(an,Gt=>{d().isFetchingNextPage&&Gt(Ft)})}y(Ye,ne)};let ze=E(()=>t.sampleHeight+Wt),De=E(()=>t.sampleWidth+Wt);Wp(Ke,{get itemCount(){return f(ot).length},get itemHeight(){return f(ze)},get itemWidth(){return f(De)},get height(){return f(rt)},get scrollPosition(){return f(st)},onscroll:xt,class:"overflow-none overflow-y-auto dark:[color-scheme:dark]",get style(){return`--sample-width: ${t.sampleWidth??""}px; --sample-height: ${t.sampleHeight??""}px;`},overScan:100,item:qe,footer:Pe,$$slots:{item:!0,footer:!0}})}K(Le),yn(Le,qe=>O(Y,qe),()=>f(Y)),y(fe,Le)},Xt=fe=>{var Le=LB();y(fe,Le)};gt(ye,fe=>{f(J)?fe(zt):fe(Xt,!1)},!0)}y(Ht,$t)};gt(he,Ht=>{d().isSuccess&&f(ot).length===0?Ht(Be):Ht(Ot,!1)},!0)}y(Yt,_e)};gt(qt,Yt=>{d().isError?Yt(ce):Yt(ee,!1)},!0)}y(Ct,Rt)};gt(de,Ct=>{d().isPending?Ct(Ut):Ct(Et,!1)})}y(e,Bt),dt(),b()}kr(["click","dblclick","keydown"]);function Pv(e,t){const n=k(t,"isSelected",3,!1);jw(e,{get checked(){return n()},get onCheckedChange(){return t.onSelect},"data-testid":"sample-selected-box"})}function kv(e,t,n){e.prototype=t.prototype=n,n.constructor=e}function vx(e,t){var n=Object.create(e.prototype);for(var i in t)n[i]=t[i];return n}function Iu(){}var pa=.7,af=1/pa,es="\\s*([+-]?\\d+)\\s*",va="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Hr="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",DB=/^#([0-9a-f]{3,8})$/,FB=new RegExp(`^rgb\\(${es},${es},${es}\\)$`),BB=new RegExp(`^rgb\\(${Hr},${Hr},${Hr}\\)$`),zB=new RegExp(`^rgba\\(${es},${es},${es},${va}\\)$`),VB=new RegExp(`^rgba\\(${Hr},${Hr},${Hr},${va}\\)$`),HB=new RegExp(`^hsl\\(${va},${Hr},${Hr}\\)$`),WB=new RegExp(`^hsla\\(${va},${Hr},${Hr},${va}\\)$`),_0={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};kv(Iu,ma,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:y0,formatHex:y0,formatHex8:UB,formatHsl:GB,formatRgb:w0,toString:w0});function y0(){return this.rgb().formatHex()}function UB(){return this.rgb().formatHex8()}function GB(){return mx(this).formatHsl()}function w0(){return this.rgb().formatRgb()}function ma(e){var t,n;return e=(e+"").trim().toLowerCase(),(t=DB.exec(e))?(n=t[1].length,t=parseInt(t[1],16),n===6?x0(t):n===3?new Xn(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):n===8?Od(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):n===4?Od(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=FB.exec(e))?new Xn(t[1],t[2],t[3],1):(t=BB.exec(e))?new Xn(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=zB.exec(e))?Od(t[1],t[2],t[3],t[4]):(t=VB.exec(e))?Od(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=HB.exec(e))?A0(t[1],t[2]/100,t[3]/100,1):(t=WB.exec(e))?A0(t[1],t[2]/100,t[3]/100,t[4]):_0.hasOwnProperty(e)?x0(_0[e]):e==="transparent"?new Xn(NaN,NaN,NaN,0):null}function x0(e){return new Xn(e>>16&255,e>>8&255,e&255,1)}function Od(e,t,n,i){return i<=0&&(e=t=n=NaN),new Xn(e,t,n,i)}function KB(e){return e instanceof Iu||(e=ma(e)),e?(e=e.rgb(),new Xn(e.r,e.g,e.b,e.opacity)):new Xn}function Ep(e,t,n,i){return arguments.length===1?KB(e):new Xn(e,t,n,i??1)}function Xn(e,t,n,i){this.r=+e,this.g=+t,this.b=+n,this.opacity=+i}kv(Xn,Ep,vx(Iu,{brighter(e){return e=e==null?af:Math.pow(af,e),new Xn(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?pa:Math.pow(pa,e),new Xn(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Xn(xo(this.r),xo(this.g),xo(this.b),lf(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:S0,formatHex:S0,formatHex8:qB,formatRgb:C0,toString:C0}));function S0(){return`#${vo(this.r)}${vo(this.g)}${vo(this.b)}`}function qB(){return`#${vo(this.r)}${vo(this.g)}${vo(this.b)}${vo((isNaN(this.opacity)?1:this.opacity)*255)}`}function C0(){const e=lf(this.opacity);return`${e===1?"rgb(":"rgba("}${xo(this.r)}, ${xo(this.g)}, ${xo(this.b)}${e===1?")":`, ${e})`}`}function lf(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function xo(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function vo(e){return e=xo(e),(e<16?"0":"")+e.toString(16)}function A0(e,t,n,i){return i<=0?e=t=n=NaN:n<=0||n>=1?e=t=NaN:t<=0&&(e=NaN),new wr(e,t,n,i)}function mx(e){if(e instanceof wr)return new wr(e.h,e.s,e.l,e.opacity);if(e instanceof Iu||(e=ma(e)),!e)return new wr;if(e instanceof wr)return e;e=e.rgb();var t=e.r/255,n=e.g/255,i=e.b/255,s=Math.min(t,n,i),l=Math.max(t,n,i),a=NaN,c=l-s,d=(l+s)/2;return c?(t===l?a=(n-i)/c+(n<i)*6:n===l?a=(i-t)/c+2:a=(t-n)/c+4,c/=d<.5?l+s:2-l-s,a*=60):c=d>0&&d<1?0:a,new wr(a,c,d,e.opacity)}function YB(e,t,n,i){return arguments.length===1?mx(e):new wr(e,t,n,i??1)}function wr(e,t,n,i){this.h=+e,this.s=+t,this.l=+n,this.opacity=+i}kv(wr,YB,vx(Iu,{brighter(e){return e=e==null?af:Math.pow(af,e),new wr(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?pa:Math.pow(pa,e),new wr(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 Xn(Yg(e>=240?e-240:e+120,s,i),Yg(e,s,i),Yg(e<120?e+240:e-120,s,i),this.opacity)},clamp(){return new wr(P0(this.h),Rd(this.s),Rd(this.l),lf(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=lf(this.opacity);return`${e===1?"hsl(":"hsla("}${P0(this.h)}, ${Rd(this.s)*100}%, ${Rd(this.l)*100}%${e===1?")":`, ${e})`}`}}));function P0(e){return e=(e||0)%360,e<0?e+360:e}function Rd(e){return Math.max(0,Math.min(1,e||0))}function Yg(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 bx=e=>()=>e;function XB(e,t){return function(n){return e+n*t}}function ZB(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 jB(e){return(e=+e)==1?_x:function(t,n){return n-t?ZB(t,n,e):bx(isNaN(t)?n:t)}}function _x(e,t){var n=t-e;return n?XB(e,n):bx(isNaN(e)?t:e)}const k0=function e(t){var n=jB(t);function i(s,l){var a=n((s=Ep(s)).r,(l=Ep(l)).r),c=n(s.g,l.g),d=n(s.b,l.b),h=_x(s.opacity,l.opacity);return function(g){return s.r=a(g),s.g=c(g),s.b=d(g),s.opacity=h(g),s+""}}return i.gamma=e,i}(1);function Wi(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}var Ip=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Xg=new RegExp(Ip.source,"g");function QB(e){return function(){return e}}function JB(e){return function(t){return e(t)+""}}function $B(e,t){var n=Ip.lastIndex=Xg.lastIndex=0,i,s,l,a=-1,c=[],d=[];for(e=e+"",t=t+"";(i=Ip.exec(e))&&(s=Xg.exec(t));)(l=s.index)>n&&(l=t.slice(n,l),c[a]?c[a]+=l:c[++a]=l),(i=i[0])===(s=s[0])?c[a]?c[a]+=s:c[++a]=s:(c[++a]=null,d.push({i:a,x:Wi(i,s)})),n=Xg.lastIndex;return n<t.length&&(l=t.slice(n),c[a]?c[a]+=l:c[++a]=l),c.length<2?d[0]?JB(d[0].x):QB(t):(t=d.length,function(h){for(var g=0,p;g<t;++g)c[(p=d[g]).i]=p.x(h);return c.join("")})}var T0=180/Math.PI,Op={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function yx(e,t,n,i,s,l){var a,c,d;return(a=Math.sqrt(e*e+t*t))&&(e/=a,t/=a),(d=e*n+t*i)&&(n-=e*d,i-=t*d),(c=Math.sqrt(n*n+i*i))&&(n/=c,i/=c,d/=c),e*i<t*n&&(e=-e,t=-t,d=-d,a=-a),{translateX:s,translateY:l,rotate:Math.atan2(t,e)*T0,skewX:Math.atan(d)*T0,scaleX:a,scaleY:c}}var Nd;function t8(e){const t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?Op:yx(t.a,t.b,t.c,t.d,t.e,t.f)}function e8(e){return e==null||(Nd||(Nd=document.createElementNS("http://www.w3.org/2000/svg","g")),Nd.setAttribute("transform",e),!(e=Nd.transform.baseVal.consolidate()))?Op:(e=e.matrix,yx(e.a,e.b,e.c,e.d,e.e,e.f))}function wx(e,t,n,i){function s(h){return h.length?h.pop()+" ":""}function l(h,g,p,v,b,w){if(h!==p||g!==v){var S=b.push("translate(",null,t,null,n);w.push({i:S-4,x:Wi(h,p)},{i:S-2,x:Wi(g,v)})}else(p||v)&&b.push("translate("+p+t+v+n)}function a(h,g,p,v){h!==g?(h-g>180?g+=360:g-h>180&&(h+=360),v.push({i:p.push(s(p)+"rotate(",null,i)-2,x:Wi(h,g)})):g&&p.push(s(p)+"rotate("+g+i)}function c(h,g,p,v){h!==g?v.push({i:p.push(s(p)+"skewX(",null,i)-2,x:Wi(h,g)}):g&&p.push(s(p)+"skewX("+g+i)}function d(h,g,p,v,b,w){if(h!==p||g!==v){var S=b.push(s(b)+"scale(",null,",",null,")");w.push({i:S-4,x:Wi(h,p)},{i:S-2,x:Wi(g,v)})}else(p!==1||v!==1)&&b.push(s(b)+"scale("+p+","+v+")")}return function(h,g){var p=[],v=[];return h=e(h),g=e(g),l(h.translateX,h.translateY,g.translateX,g.translateY,p,v),a(h.rotate,g.rotate,p,v),c(h.skewX,g.skewX,p,v),d(h.scaleX,h.scaleY,g.scaleX,g.scaleY,p,v),h=g=null,function(b){for(var w=-1,S=v.length,x;++w<S;)p[(x=v[w]).i]=x.x(b);return p.join("")}}}var n8=wx(t8,"px, ","px)","deg)"),r8=wx(e8,", ",")",")"),ys=0,sa=0,na=0,xx=1e3,cf,aa,uf=0,Ao=0,lh=0,ba=typeof performance=="object"&&performance.now?performance:Date,Sx=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)};function Tv(){return Ao||(Sx(i8),Ao=ba.now()+lh)}function i8(){Ao=0}function df(){this._call=this._time=this._next=null}df.prototype=Cx.prototype={constructor:df,restart:function(e,t,n){if(typeof e!="function")throw new TypeError("callback is not a function");n=(n==null?Tv():+n)+(t==null?0:+t),!this._next&&aa!==this&&(aa?aa._next=this:cf=this,aa=this),this._call=e,this._time=n,Rp()},stop:function(){this._call&&(this._call=null,this._time=1/0,Rp())}};function Cx(e,t,n){var i=new df;return i.restart(e,t,n),i}function o8(){Tv(),++ys;for(var e=cf,t;e;)(t=Ao-e._time)>=0&&e._call.call(void 0,t),e=e._next;--ys}function E0(){Ao=(uf=ba.now())+lh,ys=sa=0;try{o8()}finally{ys=0,a8(),Ao=0}}function s8(){var e=ba.now(),t=e-uf;t>xx&&(lh-=t,uf=e)}function a8(){for(var e,t=cf,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:cf=n);aa=e,Rp(i)}function Rp(e){if(!ys){sa&&(sa=clearTimeout(sa));var t=e-Ao;t>24?(e<1/0&&(sa=setTimeout(E0,e-ba.now()-lh)),na&&(na=clearInterval(na))):(na||(uf=ba.now(),na=setInterval(s8,xx)),ys=1,Sx(E0))}}function I0(e,t,n){var i=new df;return t=t==null?0:+t,i.restart(s=>{i.stop(),e(s+t)},t,n),i}var l8=Av("start","end","cancel","interrupt"),c8=[],Ax=0,O0=1,Np=2,qd=3,R0=4,Mp=5,Yd=6;function ch(e,t,n,i,s,l){var a=e.__transition;if(!a)e.__transition={};else if(n in a)return;u8(e,n,{name:t,index:i,group:s,on:l8,tween:c8,time:l.time,delay:l.delay,duration:l.duration,ease:l.ease,timer:null,state:Ax})}function Ev(e,t){var n=Tr(e,t);if(n.state>Ax)throw new Error("too late; already scheduled");return n}function Zr(e,t){var n=Tr(e,t);if(n.state>qd)throw new Error("too late; already running");return n}function Tr(e,t){var n=e.__transition;if(!n||!(n=n[t]))throw new Error("transition not found");return n}function u8(e,t,n){var i=e.__transition,s;i[t]=n,n.timer=Cx(l,0,n.time);function l(h){n.state=O0,n.timer.restart(a,n.delay,n.time),n.delay<=h&&a(h-n.delay)}function a(h){var g,p,v,b;if(n.state!==O0)return d();for(g in i)if(b=i[g],b.name===n.name){if(b.state===qd)return I0(a);b.state===R0?(b.state=Yd,b.timer.stop(),b.on.call("interrupt",e,e.__data__,b.index,b.group),delete i[g]):+g<t&&(b.state=Yd,b.timer.stop(),b.on.call("cancel",e,e.__data__,b.index,b.group),delete i[g])}if(I0(function(){n.state===qd&&(n.state=R0,n.timer.restart(c,n.delay,n.time),c(h))}),n.state=Np,n.on.call("start",e,e.__data__,n.index,n.group),n.state===Np){for(n.state=qd,s=new Array(v=n.tween.length),g=0,p=-1;g<v;++g)(b=n.tween[g].value.call(e,e.__data__,n.index,n.group))&&(s[++p]=b);s.length=p+1}}function c(h){for(var g=h<n.duration?n.ease.call(null,h/n.duration):(n.timer.restart(d),n.state=Mp,1),p=-1,v=s.length;++p<v;)s[p].call(e,g);n.state===Mp&&(n.on.call("end",e,e.__data__,n.index,n.group),d())}function d(){n.state=Yd,n.timer.stop(),delete i[t];for(var h in i)return;delete e.__transition}}function d8(e,t){var n=e.__transition,i,s,l=!0,a;if(n){t=t==null?null:t+"";for(a in n){if((i=n[a]).name!==t){l=!1;continue}s=i.state>Np&&i.state<Mp,i.state=Yd,i.timer.stop(),i.on.call(s?"interrupt":"cancel",e,e.__data__,i.index,i.group),delete n[a]}l&&delete e.__transition}}function f8(e){return this.each(function(){d8(this,e)})}function h8(e,t){var n,i;return function(){var s=Zr(this,e),l=s.tween;if(l!==n){i=n=l;for(var a=0,c=i.length;a<c;++a)if(i[a].name===t){i=i.slice(),i.splice(a,1);break}}s.tween=i}}function g8(e,t,n){var i,s;if(typeof n!="function")throw new Error;return function(){var l=Zr(this,e),a=l.tween;if(a!==i){s=(i=a).slice();for(var c={name:t,value:n},d=0,h=s.length;d<h;++d)if(s[d].name===t){s[d]=c;break}d===h&&s.push(c)}l.tween=s}}function p8(e,t){var n=this._id;if(e+="",arguments.length<2){for(var i=Tr(this.node(),n).tween,s=0,l=i.length,a;s<l;++s)if((a=i[s]).name===e)return a.value;return null}return this.each((t==null?h8:g8)(n,e,t))}function Iv(e,t,n){var i=e._id;return e.each(function(){var s=Zr(this,i);(s.value||(s.value={}))[t]=n.apply(this,arguments)}),function(s){return Tr(s,i).value[t]}}function Px(e,t){var n;return(typeof t=="number"?Wi:t instanceof ma?k0:(n=ma(t))?(t=n,k0):$B)(e,t)}function v8(e){return function(){this.removeAttribute(e)}}function m8(e){return function(){this.removeAttributeNS(e.space,e.local)}}function b8(e,t,n){var i,s=n+"",l;return function(){var a=this.getAttribute(e);return a===s?null:a===i?l:l=t(i=a,n)}}function _8(e,t,n){var i,s=n+"",l;return function(){var a=this.getAttributeNS(e.space,e.local);return a===s?null:a===i?l:l=t(i=a,n)}}function y8(e,t,n){var i,s,l;return function(){var a,c=n(this),d;return c==null?void this.removeAttribute(e):(a=this.getAttribute(e),d=c+"",a===d?null:a===i&&d===s?l:(s=d,l=t(i=a,c)))}}function w8(e,t,n){var i,s,l;return function(){var a,c=n(this),d;return c==null?void this.removeAttributeNS(e.space,e.local):(a=this.getAttributeNS(e.space,e.local),d=c+"",a===d?null:a===i&&d===s?l:(s=d,l=t(i=a,c)))}}function x8(e,t){var n=ah(e),i=n==="transform"?r8:Px;return this.attrTween(e,typeof t=="function"?(n.local?w8:y8)(n,i,Iv(this,"attr."+e,t)):t==null?(n.local?m8:v8)(n):(n.local?_8:b8)(n,i,t))}function S8(e,t){return function(n){this.setAttribute(e,t.call(this,n))}}function C8(e,t){return function(n){this.setAttributeNS(e.space,e.local,t.call(this,n))}}function A8(e,t){var n,i;function s(){var l=t.apply(this,arguments);return l!==i&&(n=(i=l)&&C8(e,l)),n}return s._value=t,s}function P8(e,t){var n,i;function s(){var l=t.apply(this,arguments);return l!==i&&(n=(i=l)&&S8(e,l)),n}return s._value=t,s}function k8(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=ah(e);return this.tween(n,(i.local?A8:P8)(i,t))}function T8(e,t){return function(){Ev(this,e).delay=+t.apply(this,arguments)}}function E8(e,t){return t=+t,function(){Ev(this,e).delay=t}}function I8(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?T8:E8)(t,e)):Tr(this.node(),t).delay}function O8(e,t){return function(){Zr(this,e).duration=+t.apply(this,arguments)}}function R8(e,t){return t=+t,function(){Zr(this,e).duration=t}}function N8(e){var t=this._id;return arguments.length?this.each((typeof e=="function"?O8:R8)(t,e)):Tr(this.node(),t).duration}function M8(e,t){if(typeof t!="function")throw new Error;return function(){Zr(this,e).ease=t}}function L8(e){var t=this._id;return arguments.length?this.each(M8(t,e)):Tr(this.node(),t).ease}function D8(e,t){return function(){var n=t.apply(this,arguments);if(typeof n!="function")throw new Error;Zr(this,e).ease=n}}function F8(e){if(typeof e!="function")throw new Error;return this.each(D8(this._id,e))}function B8(e){typeof e!="function"&&(e=rx(e));for(var t=this._groups,n=t.length,i=new Array(n),s=0;s<n;++s)for(var l=t[s],a=l.length,c=i[s]=[],d,h=0;h<a;++h)(d=l[h])&&e.call(d,d.__data__,h,l)&&c.push(d);return new Ci(i,this._parents,this._name,this._id)}function z8(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,n=e._groups,i=t.length,s=n.length,l=Math.min(i,s),a=new Array(i),c=0;c<l;++c)for(var d=t[c],h=n[c],g=d.length,p=a[c]=new Array(g),v,b=0;b<g;++b)(v=d[b]||h[b])&&(p[b]=v);for(;c<i;++c)a[c]=t[c];return new Ci(a,this._parents,this._name,this._id)}function V8(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 H8(e,t,n){var i,s,l=V8(t)?Ev:Zr;return function(){var a=l(this,e),c=a.on;c!==i&&(s=(i=c).copy()).on(t,n),a.on=s}}function W8(e,t){var n=this._id;return arguments.length<2?Tr(this.node(),n).on.on(e):this.each(H8(n,e,t))}function U8(e){return function(){var t=this.parentNode;for(var n in this.__transition)if(+n!==e)return;t&&t.removeChild(this)}}function G8(){return this.on("end.remove",U8(this._id))}function K8(e){var t=this._name,n=this._id;typeof e!="function"&&(e=Sv(e));for(var i=this._groups,s=i.length,l=new Array(s),a=0;a<s;++a)for(var c=i[a],d=c.length,h=l[a]=new Array(d),g,p,v=0;v<d;++v)(g=c[v])&&(p=e.call(g,g.__data__,v,c))&&("__data__"in g&&(p.__data__=g.__data__),h[v]=p,ch(h[v],t,n,v,h,Tr(g,n)));return new Ci(l,this._parents,t,n)}function q8(e){var t=this._name,n=this._id;typeof e!="function"&&(e=nx(e));for(var i=this._groups,s=i.length,l=[],a=[],c=0;c<s;++c)for(var d=i[c],h=d.length,g,p=0;p<h;++p)if(g=d[p]){for(var v=e.call(g,g.__data__,p,d),b,w=Tr(g,n),S=0,x=v.length;S<x;++S)(b=v[S])&&ch(b,t,n,S,v,w);l.push(v),a.push(g)}return new Ci(l,a,t,n)}var Y8=Eu.prototype.constructor;function X8(){return new Y8(this._groups,this._parents)}function Z8(e,t){var n,i,s;return function(){var l=_s(this,e),a=(this.style.removeProperty(e),_s(this,e));return l===a?null:l===n&&a===i?s:s=t(n=l,i=a)}}function kx(e){return function(){this.style.removeProperty(e)}}function j8(e,t,n){var i,s=n+"",l;return function(){var a=_s(this,e);return a===s?null:a===i?l:l=t(i=a,n)}}function Q8(e,t,n){var i,s,l;return function(){var a=_s(this,e),c=n(this),d=c+"";return c==null&&(d=c=(this.style.removeProperty(e),_s(this,e))),a===d?null:a===i&&d===s?l:(s=d,l=t(i=a,c))}}function J8(e,t){var n,i,s,l="style."+t,a="end."+l,c;return function(){var d=Zr(this,e),h=d.on,g=d.value[l]==null?c||(c=kx(t)):void 0;(h!==n||s!==g)&&(i=(n=h).copy()).on(a,s=g),d.on=i}}function $8(e,t,n){var i=(e+="")=="transform"?n8:Px;return t==null?this.styleTween(e,Z8(e,i)).on("end.style."+e,kx(e)):typeof t=="function"?this.styleTween(e,Q8(e,i,Iv(this,"style."+e,t))).each(J8(this._id,e)):this.styleTween(e,j8(e,i,t),n).on("end.style."+e,null)}function tz(e,t,n){return function(i){this.style.setProperty(e,t.call(this,i),n)}}function ez(e,t,n){var i,s;function l(){var a=t.apply(this,arguments);return a!==s&&(i=(s=a)&&tz(e,a,n)),i}return l._value=t,l}function nz(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,ez(e,t,n??""))}function rz(e){return function(){this.textContent=e}}function iz(e){return function(){var t=e(this);this.textContent=t??""}}function oz(e){return this.tween("text",typeof e=="function"?iz(Iv(this,"text",e)):rz(e==null?"":e+""))}function sz(e){return function(t){this.textContent=e.call(this,t)}}function az(e){var t,n;function i(){var s=e.apply(this,arguments);return s!==n&&(t=(n=s)&&sz(s)),t}return i._value=e,i}function lz(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,az(e))}function cz(){for(var e=this._name,t=this._id,n=Tx(),i=this._groups,s=i.length,l=0;l<s;++l)for(var a=i[l],c=a.length,d,h=0;h<c;++h)if(d=a[h]){var g=Tr(d,t);ch(d,e,n,h,a,{time:g.time+g.delay+g.duration,delay:0,duration:g.duration,ease:g.ease})}return new Ci(i,this._parents,e,n)}function uz(){var e,t,n=this,i=n._id,s=n.size();return new Promise(function(l,a){var c={value:a},d={value:function(){--s===0&&l()}};n.each(function(){var h=Zr(this,i),g=h.on;g!==e&&(t=(e=g).copy(),t._.cancel.push(c),t._.interrupt.push(c),t._.end.push(d)),h.on=t}),s===0&&l()})}var dz=0;function Ci(e,t,n,i){this._groups=e,this._parents=t,this._name=n,this._id=i}function Tx(){return++dz}var ui=Eu.prototype;Ci.prototype={constructor:Ci,select:K8,selectAll:q8,selectChild:ui.selectChild,selectChildren:ui.selectChildren,filter:B8,merge:z8,selection:X8,transition:cz,call:ui.call,nodes:ui.nodes,node:ui.node,size:ui.size,empty:ui.empty,each:ui.each,on:W8,attr:x8,attrTween:k8,style:$8,styleTween:nz,text:oz,textTween:lz,remove:G8,tween:p8,delay:I8,duration:N8,ease:L8,easeVarying:F8,end:uz,[Symbol.iterator]:ui[Symbol.iterator]};function fz(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var hz={time:null,delay:0,duration:250,ease:fz};function gz(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 pz(e){var t,n;e instanceof Ci?(t=e._id,e=e._name):(t=Tx(),(n=hz).time=Tv(),e=e==null?null:e+"");for(var i=this._groups,s=i.length,l=0;l<s;++l)for(var a=i[l],c=a.length,d,h=0;h<c;++h)(d=a[h])&&ch(d,e,t,h,a,n||gz(d,t));return new Ci(i,this._parents,e,t)}Eu.prototype.interrupt=f8;Eu.prototype.transition=pz;function Xo(e,t,n){this.k=e,this.x=t,this.y=n}Xo.prototype={constructor:Xo,scale:function(e){return e===1?this:new Xo(this.k*e,this.x,this.y)},translate:function(e,t){return e===0&t===0?this:new Xo(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 iV=new Xo(1,0,0);Xo.prototype;export{U6 as $,Uz as A,Q4 as B,Z4 as C,Pv as D,Ui as E,nV as F,qw as G,eV as H,wn as I,Nn as J,Bw as K,tx as L,Vw as M,Hw as N,Gz as O,or as P,fx as Q,J6 as R,rV as S,c9 as T,Av as U,iV as V,Xo as W,v0 as X,d8 as Y,W6 as Z,f0 as _,$4 as a,b4 as a0,GI as a1,pw as a2,NM as a3,Xz as a4,Yz as a5,Bp as a6,$T as a7,qz as a8,jT as a9,nh as aA,t0 as aB,rE as aC,rh as aD,th as aE,SB as aF,VE as aG,kn as aH,Ce as aI,ty as aJ,eE as aK,Zz as aL,jz as aM,pD as aa,s0 as ab,o0 as ac,Zw as ad,Xw as ae,Yw as af,gD as ag,lD as ah,vD as ai,TD as aj,Cp as ak,Jz as al,Qz as am,zp as an,tE as ao,jw as ap,Gi as aq,$z as ar,wv as as,eh as at,$f as au,Jf as av,pv as aw,OD as ax,gv as ay,Hp as az,aI as b,Hz as c,le as d,B as e,ie as f,Wz as g,Vz as h,kg as i,cE as j,ry as k,px as l,Jt as m,oy as n,rf as o,tV as p,tB as q,hB as r,lE as s,KT as t,ae as u,Uw as v,zw as w,Kz as x,wo as y,hx as z};
|