cekat-ui 1.2.7 → 1.2.8

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.
package/dist/index.umd.js CHANGED
@@ -1,7 +1,7 @@
1
- (function(G,a){typeof exports=="object"&&typeof module<"u"?a(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],a):(G=typeof globalThis<"u"?globalThis:G||self,a(G.CekatUI={},G.React$1,G.$3wX5A$reactdom))})(this,(function(G,a,Ue){"use strict";function Jo(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const r in t)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(e,r,n.get?n:{enumerable:!0,get:()=>t[r]})}}return e.default=t,Object.freeze(e)}const f=Jo(a);function kr(t){var e,r,n="";if(typeof t=="string"||typeof t=="number")n+=t;else if(typeof t=="object")if(Array.isArray(t)){var o=t.length;for(e=0;e<o;e++)t[e]&&(r=kr(t[e]))&&(n&&(n+=" "),n+=r)}else for(r in t)t[r]&&(n&&(n+=" "),n+=r);return n}function L(){for(var t,e,r=0,n="",o=arguments.length;r<o;r++)(t=arguments[r])&&(e=kr(t))&&(n&&(n+=" "),n+=e);return n}const Ro=(t,e)=>{const r=new Array(t.length+e.length);for(let n=0;n<t.length;n++)r[n]=t[n];for(let n=0;n<e.length;n++)r[t.length+n]=e[n];return r},Qo=(t,e)=>({classGroupId:t,validator:e}),Cr=(t=new Map,e=null,r)=>({nextPart:t,validators:e,classGroupId:r}),qe="-",$r=[],ei="arbitrary..",ti=t=>{const e=ni(t),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=t;return{getClassGroupId:s=>{if(s.startsWith("[")&&s.endsWith("]"))return ri(s);const l=s.split(qe),c=l[0]===""&&l.length>1?1:0;return Tr(l,c,e)},getConflictingClassGroupIds:(s,l)=>{if(l){const c=n[s],d=r[s];return c?d?Ro(d,c):c:d||$r}return r[s]||$r}}},Tr=(t,e,r)=>{if(t.length-e===0)return r.classGroupId;const o=t[e],i=r.nextPart.get(o);if(i){const d=Tr(t,e+1,i);if(d)return d}const s=r.validators;if(s===null)return;const l=e===0?t.join(qe):t.slice(e).join(qe),c=s.length;for(let d=0;d<c;d++){const p=s[d];if(p.validator(l))return p.classGroupId}},ri=t=>t.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const e=t.slice(1,-1),r=e.indexOf(":"),n=e.slice(0,r);return n?ei+n:void 0})(),ni=t=>{const{theme:e,classGroups:r}=t;return oi(r,e)},oi=(t,e)=>{const r=Cr();for(const n in t){const o=t[n];Et(o,r,n,e)}return r},Et=(t,e,r,n)=>{const o=t.length;for(let i=0;i<o;i++){const s=t[i];ii(s,e,r,n)}},ii=(t,e,r,n)=>{if(typeof t=="string"){si(t,e,r);return}if(typeof t=="function"){li(t,e,r,n);return}ai(t,e,r,n)},si=(t,e,r)=>{const n=t===""?e:Nr(e,t);n.classGroupId=r},li=(t,e,r,n)=>{if(ci(t)){Et(t(n),e,r,n);return}e.validators===null&&(e.validators=[]),e.validators.push(Qo(r,t))},ai=(t,e,r,n)=>{const o=Object.entries(t),i=o.length;for(let s=0;s<i;s++){const[l,c]=o[s];Et(c,Nr(e,l),r,n)}},Nr=(t,e)=>{let r=t;const n=e.split(qe),o=n.length;for(let i=0;i<o;i++){const s=n[i];let l=r.nextPart.get(s);l||(l=Cr(),r.nextPart.set(s,l)),r=l}return r},ci=t=>"isThemeGetter"in t&&t.isThemeGetter===!0,di=t=>{if(t<1)return{get:()=>{},set:()=>{}};let e=0,r=Object.create(null),n=Object.create(null);const o=(i,s)=>{r[i]=s,e++,e>t&&(e=0,n=r,r=Object.create(null))};return{get(i){let s=r[i];if(s!==void 0)return s;if((s=n[i])!==void 0)return o(i,s),s},set(i,s){i in r?r[i]=s:o(i,s)}}},St="!",Kr=":",ui=[],Pr=(t,e,r,n,o)=>({modifiers:t,hasImportantModifier:e,baseClassName:r,maybePostfixModifierPosition:n,isExternal:o}),fi=t=>{const{prefix:e,experimentalParseClassName:r}=t;let n=o=>{const i=[];let s=0,l=0,c=0,d;const p=o.length;for(let x=0;x<p;x++){const w=o[x];if(s===0&&l===0){if(w===Kr){i.push(o.slice(c,x)),c=x+1;continue}if(w==="/"){d=x;continue}}w==="["?s++:w==="]"?s--:w==="("?l++:w===")"&&l--}const u=i.length===0?o:o.slice(c);let g=u,b=!1;u.endsWith(St)?(g=u.slice(0,-1),b=!0):u.startsWith(St)&&(g=u.slice(1),b=!0);const v=d&&d>c?d-c:void 0;return Pr(i,b,g,v)};if(e){const o=e+Kr,i=n;n=s=>s.startsWith(o)?i(s.slice(o.length)):Pr(ui,!1,s,void 0,!0)}if(r){const o=n;n=i=>r({className:i,parseClassName:o})}return n},pi=t=>{const e=new Map;return t.orderSensitiveModifiers.forEach((r,n)=>{e.set(r,1e6+n)}),r=>{const n=[];let o=[];for(let i=0;i<r.length;i++){const s=r[i],l=s[0]==="[",c=e.has(s);l||c?(o.length>0&&(o.sort(),n.push(...o),o=[]),n.push(s)):o.push(s)}return o.length>0&&(o.sort(),n.push(...o)),n}},hi=t=>({cache:di(t.cacheSize),parseClassName:fi(t),sortModifiers:pi(t),postfixLookupClassGroupIds:bi(t),...ti(t)}),bi=t=>{const e=Object.create(null),r=t.postfixLookupClassGroups;if(r)for(let n=0;n<r.length;n++)e[r[n]]=!0;return e},mi=/\s+/,gi=(t,e)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:o,sortModifiers:i,postfixLookupClassGroupIds:s}=e,l=[],c=t.trim().split(mi);let d="";for(let p=c.length-1;p>=0;p-=1){const u=c[p],{isExternal:g,modifiers:b,hasImportantModifier:v,baseClassName:x,maybePostfixModifierPosition:w}=r(u);if(g){d=u+(d.length>0?" "+d:d);continue}let k=!!w,S;if(k){const z=x.substring(0,w);S=n(z);const C=S&&s[S]?n(x):void 0;C&&C!==S&&(S=C,k=!1)}else S=n(x);if(!S){if(!k){d=u+(d.length>0?" "+d:d);continue}if(S=n(x),!S){d=u+(d.length>0?" "+d:d);continue}k=!1}const T=b.length===0?"":b.length===1?b[0]:i(b).join(":"),F=v?T+St:T,q=F+S;if(l.indexOf(q)>-1)continue;l.push(q);const _=o(S,k);for(let z=0;z<_.length;++z){const C=_[z];l.push(F+C)}d=u+(d.length>0?" "+d:d)}return d},yi=(...t)=>{let e=0,r,n,o="";for(;e<t.length;)(r=t[e++])&&(n=Lr(r))&&(o&&(o+=" "),o+=n);return o},Lr=t=>{if(typeof t=="string")return t;let e,r="";for(let n=0;n<t.length;n++)t[n]&&(e=Lr(t[n]))&&(r&&(r+=" "),r+=e);return r},xi=(t,...e)=>{let r,n,o,i;const s=c=>{const d=e.reduce((p,u)=>u(p),t());return r=hi(d),n=r.cache.get,o=r.cache.set,i=l,l(c)},l=c=>{const d=n(c);if(d)return d;const p=gi(c,r);return o(c,p),p};return i=s,(...c)=>i(yi(...c))},vi=[],te=t=>{const e=r=>r[t]||vi;return e.isThemeGetter=!0,e},Ir=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Mr=/^\((?:(\w[\w-]*):)?(.+)\)$/i,wi=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,Ei=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Si=/\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$/,ki=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Ci=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,$i=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,xe=t=>wi.test(t),H=t=>!!t&&!Number.isNaN(Number(t)),pe=t=>!!t&&Number.isInteger(Number(t)),kt=t=>t.endsWith("%")&&H(t.slice(0,-1)),me=t=>Ei.test(t),Dr=()=>!0,Ti=t=>Si.test(t)&&!ki.test(t),Ct=()=>!1,Ni=t=>Ci.test(t),Ki=t=>$i.test(t),Pi=t=>!M(t)&&!D(t),Li=t=>t.startsWith("@container")&&(t[10]==="/"&&t[11]!==void 0||t[11]==="s"&&t[16]!==void 0&&t.startsWith("-size/",10)||t[11]==="n"&&t[18]!==void 0&&t.startsWith("-normal/",10)),Ii=t=>ve(t,Br,Ct),M=t=>Ir.test(t),ke=t=>ve(t,Vr,Ti),Fr=t=>ve(t,Bi,H),Mi=t=>ve(t,Hr,Dr),Di=t=>ve(t,Wr,Ct),Ar=t=>ve(t,_r,Ct),Fi=t=>ve(t,zr,Ki),Ye=t=>ve(t,jr,Ni),D=t=>Mr.test(t),Fe=t=>Ce(t,Vr),Ai=t=>Ce(t,Wr),Or=t=>Ce(t,_r),Oi=t=>Ce(t,Br),_i=t=>Ce(t,zr),Xe=t=>Ce(t,jr,!0),zi=t=>Ce(t,Hr,!0),ve=(t,e,r)=>{const n=Ir.exec(t);return n?n[1]?e(n[1]):r(n[2]):!1},Ce=(t,e,r=!1)=>{const n=Mr.exec(t);return n?n[1]?e(n[1]):r:!1},_r=t=>t==="position"||t==="percentage",zr=t=>t==="image"||t==="url",Br=t=>t==="length"||t==="size"||t==="bg-size",Vr=t=>t==="length",Bi=t=>t==="number",Wr=t=>t==="family-name",Hr=t=>t==="number"||t==="weight",jr=t=>t==="shadow",Vi=xi(()=>{const t=te("color"),e=te("font"),r=te("text"),n=te("font-weight"),o=te("tracking"),i=te("leading"),s=te("breakpoint"),l=te("container"),c=te("spacing"),d=te("radius"),p=te("shadow"),u=te("inset-shadow"),g=te("text-shadow"),b=te("drop-shadow"),v=te("blur"),x=te("perspective"),w=te("aspect"),k=te("ease"),S=te("animate"),T=()=>["auto","avoid","all","avoid-page","page","left","right","column"],F=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],q=()=>[...F(),D,M],_=()=>["auto","hidden","clip","visible","scroll"],z=()=>["auto","contain","none"],C=()=>[D,M,c],B=()=>[xe,"full","auto",...C()],J=()=>[pe,"none","subgrid",D,M],Z=()=>["auto",{span:["full",pe,D,M]},pe,D,M],X=()=>[pe,"auto",D,M],Y=()=>["auto","min","max","fr",D,M],h=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],P=()=>["start","end","center","stretch","center-safe","end-safe"],V=()=>["auto",...C()],$=()=>[xe,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...C()],U=()=>[xe,"screen","full","dvw","lvw","svw","min","max","fit",...C()],m=()=>[xe,"screen","full","lh","dvh","lvh","svh","min","max","fit",...C()],y=()=>[t,D,M],A=()=>[...F(),Or,Ar,{position:[D,M]}],ie=()=>["no-repeat",{repeat:["","x","y","space","round"]}],ae=()=>["auto","cover","contain",Oi,Ii,{size:[D,M]}],se=()=>[kt,Fe,ke],E=()=>["","none","full",d,D,M],W=()=>["",H,Fe,ke],ne=()=>["solid","dashed","dotted","double"],be=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ee=()=>[H,kt,Or,Ar],wt=()=>["","none",v,D,M],K=()=>["none",H,D,M],N=()=>["none",H,D,M],re=()=>[H,D,M],R=()=>[xe,"full",...C()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[me],breakpoint:[me],color:[Dr],container:[me],"drop-shadow":[me],ease:["in","out","in-out"],font:[Pi],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[me],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[me],shadow:[me],spacing:["px",H],text:[me],"text-shadow":[me],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",xe,M,D,w]}],container:["container"],"container-type":[{"@container":["","normal","size",D,M]}],"container-named":[Li],columns:[{columns:[H,M,D,l]}],"break-after":[{"break-after":T()}],"break-before":[{"break-before":T()}],"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"],sr:["sr-only","not-sr-only"],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:q()}],overflow:[{overflow:_()}],"overflow-x":[{"overflow-x":_()}],"overflow-y":[{"overflow-y":_()}],overscroll:[{overscroll:z()}],"overscroll-x":[{"overscroll-x":z()}],"overscroll-y":[{"overscroll-y":z()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:B()}],"inset-x":[{"inset-x":B()}],"inset-y":[{"inset-y":B()}],start:[{"inset-s":B(),start:B()}],end:[{"inset-e":B(),end:B()}],"inset-bs":[{"inset-bs":B()}],"inset-be":[{"inset-be":B()}],top:[{top:B()}],right:[{right:B()}],bottom:[{bottom:B()}],left:[{left:B()}],visibility:["visible","invisible","collapse"],z:[{z:[pe,"auto",D,M]}],basis:[{basis:[xe,"full","auto",l,...C()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[H,xe,"auto","initial","none",M]}],grow:[{grow:["",H,D,M]}],shrink:[{shrink:["",H,D,M]}],order:[{order:[pe,"first","last","none",D,M]}],"grid-cols":[{"grid-cols":J()}],"col-start-end":[{col:Z()}],"col-start":[{"col-start":X()}],"col-end":[{"col-end":X()}],"grid-rows":[{"grid-rows":J()}],"row-start-end":[{row:Z()}],"row-start":[{"row-start":X()}],"row-end":[{"row-end":X()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":Y()}],"auto-rows":[{"auto-rows":Y()}],gap:[{gap:C()}],"gap-x":[{"gap-x":C()}],"gap-y":[{"gap-y":C()}],"justify-content":[{justify:[...h(),"normal"]}],"justify-items":[{"justify-items":[...P(),"normal"]}],"justify-self":[{"justify-self":["auto",...P()]}],"align-content":[{content:["normal",...h()]}],"align-items":[{items:[...P(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...P(),{baseline:["","last"]}]}],"place-content":[{"place-content":h()}],"place-items":[{"place-items":[...P(),"baseline"]}],"place-self":[{"place-self":["auto",...P()]}],p:[{p:C()}],px:[{px:C()}],py:[{py:C()}],ps:[{ps:C()}],pe:[{pe:C()}],pbs:[{pbs:C()}],pbe:[{pbe:C()}],pt:[{pt:C()}],pr:[{pr:C()}],pb:[{pb:C()}],pl:[{pl:C()}],m:[{m:V()}],mx:[{mx:V()}],my:[{my:V()}],ms:[{ms:V()}],me:[{me:V()}],mbs:[{mbs:V()}],mbe:[{mbe:V()}],mt:[{mt:V()}],mr:[{mr:V()}],mb:[{mb:V()}],ml:[{ml:V()}],"space-x":[{"space-x":C()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":C()}],"space-y-reverse":["space-y-reverse"],size:[{size:$()}],"inline-size":[{inline:["auto",...U()]}],"min-inline-size":[{"min-inline":["auto",...U()]}],"max-inline-size":[{"max-inline":["none",...U()]}],"block-size":[{block:["auto",...m()]}],"min-block-size":[{"min-block":["auto",...m()]}],"max-block-size":[{"max-block":["none",...m()]}],w:[{w:[l,"screen",...$()]}],"min-w":[{"min-w":[l,"screen","none",...$()]}],"max-w":[{"max-w":[l,"screen","none","prose",{screen:[s]},...$()]}],h:[{h:["screen","lh",...$()]}],"min-h":[{"min-h":["screen","lh","none",...$()]}],"max-h":[{"max-h":["screen","lh",...$()]}],"font-size":[{text:["base",r,Fe,ke]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,zi,Mi]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",kt,M]}],"font-family":[{font:[Ai,Di,e]}],"font-features":[{"font-features":[M]}],"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:[o,D,M]}],"line-clamp":[{"line-clamp":[H,"none",D,Fr]}],leading:[{leading:[i,...C()]}],"list-image":[{"list-image":["none",D,M]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",D,M]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:y()}],"text-color":[{text:y()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ne(),"wavy"]}],"text-decoration-thickness":[{decoration:[H,"from-font","auto",D,ke]}],"text-decoration-color":[{decoration:y()}],"underline-offset":[{"underline-offset":[H,"auto",D,M]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:C()}],"tab-size":[{tab:[pe,D,M]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",D,M]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",D,M]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:A()}],"bg-repeat":[{bg:ie()}],"bg-size":[{bg:ae()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},pe,D,M],radial:["",D,M],conic:[pe,D,M]},_i,Fi]}],"bg-color":[{bg:y()}],"gradient-from-pos":[{from:se()}],"gradient-via-pos":[{via:se()}],"gradient-to-pos":[{to:se()}],"gradient-from":[{from:y()}],"gradient-via":[{via:y()}],"gradient-to":[{to:y()}],rounded:[{rounded:E()}],"rounded-s":[{"rounded-s":E()}],"rounded-e":[{"rounded-e":E()}],"rounded-t":[{"rounded-t":E()}],"rounded-r":[{"rounded-r":E()}],"rounded-b":[{"rounded-b":E()}],"rounded-l":[{"rounded-l":E()}],"rounded-ss":[{"rounded-ss":E()}],"rounded-se":[{"rounded-se":E()}],"rounded-ee":[{"rounded-ee":E()}],"rounded-es":[{"rounded-es":E()}],"rounded-tl":[{"rounded-tl":E()}],"rounded-tr":[{"rounded-tr":E()}],"rounded-br":[{"rounded-br":E()}],"rounded-bl":[{"rounded-bl":E()}],"border-w":[{border:W()}],"border-w-x":[{"border-x":W()}],"border-w-y":[{"border-y":W()}],"border-w-s":[{"border-s":W()}],"border-w-e":[{"border-e":W()}],"border-w-bs":[{"border-bs":W()}],"border-w-be":[{"border-be":W()}],"border-w-t":[{"border-t":W()}],"border-w-r":[{"border-r":W()}],"border-w-b":[{"border-b":W()}],"border-w-l":[{"border-l":W()}],"divide-x":[{"divide-x":W()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":W()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ne(),"hidden","none"]}],"divide-style":[{divide:[...ne(),"hidden","none"]}],"border-color":[{border:y()}],"border-color-x":[{"border-x":y()}],"border-color-y":[{"border-y":y()}],"border-color-s":[{"border-s":y()}],"border-color-e":[{"border-e":y()}],"border-color-bs":[{"border-bs":y()}],"border-color-be":[{"border-be":y()}],"border-color-t":[{"border-t":y()}],"border-color-r":[{"border-r":y()}],"border-color-b":[{"border-b":y()}],"border-color-l":[{"border-l":y()}],"divide-color":[{divide:y()}],"outline-style":[{outline:[...ne(),"none","hidden"]}],"outline-offset":[{"outline-offset":[H,D,M]}],"outline-w":[{outline:["",H,Fe,ke]}],"outline-color":[{outline:y()}],shadow:[{shadow:["","none",p,Xe,Ye]}],"shadow-color":[{shadow:y()}],"inset-shadow":[{"inset-shadow":["none",u,Xe,Ye]}],"inset-shadow-color":[{"inset-shadow":y()}],"ring-w":[{ring:W()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:y()}],"ring-offset-w":[{"ring-offset":[H,ke]}],"ring-offset-color":[{"ring-offset":y()}],"inset-ring-w":[{"inset-ring":W()}],"inset-ring-color":[{"inset-ring":y()}],"text-shadow":[{"text-shadow":["none",g,Xe,Ye]}],"text-shadow-color":[{"text-shadow":y()}],opacity:[{opacity:[H,D,M]}],"mix-blend":[{"mix-blend":[...be(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":be()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[H]}],"mask-image-linear-from-pos":[{"mask-linear-from":ee()}],"mask-image-linear-to-pos":[{"mask-linear-to":ee()}],"mask-image-linear-from-color":[{"mask-linear-from":y()}],"mask-image-linear-to-color":[{"mask-linear-to":y()}],"mask-image-t-from-pos":[{"mask-t-from":ee()}],"mask-image-t-to-pos":[{"mask-t-to":ee()}],"mask-image-t-from-color":[{"mask-t-from":y()}],"mask-image-t-to-color":[{"mask-t-to":y()}],"mask-image-r-from-pos":[{"mask-r-from":ee()}],"mask-image-r-to-pos":[{"mask-r-to":ee()}],"mask-image-r-from-color":[{"mask-r-from":y()}],"mask-image-r-to-color":[{"mask-r-to":y()}],"mask-image-b-from-pos":[{"mask-b-from":ee()}],"mask-image-b-to-pos":[{"mask-b-to":ee()}],"mask-image-b-from-color":[{"mask-b-from":y()}],"mask-image-b-to-color":[{"mask-b-to":y()}],"mask-image-l-from-pos":[{"mask-l-from":ee()}],"mask-image-l-to-pos":[{"mask-l-to":ee()}],"mask-image-l-from-color":[{"mask-l-from":y()}],"mask-image-l-to-color":[{"mask-l-to":y()}],"mask-image-x-from-pos":[{"mask-x-from":ee()}],"mask-image-x-to-pos":[{"mask-x-to":ee()}],"mask-image-x-from-color":[{"mask-x-from":y()}],"mask-image-x-to-color":[{"mask-x-to":y()}],"mask-image-y-from-pos":[{"mask-y-from":ee()}],"mask-image-y-to-pos":[{"mask-y-to":ee()}],"mask-image-y-from-color":[{"mask-y-from":y()}],"mask-image-y-to-color":[{"mask-y-to":y()}],"mask-image-radial":[{"mask-radial":[D,M]}],"mask-image-radial-from-pos":[{"mask-radial-from":ee()}],"mask-image-radial-to-pos":[{"mask-radial-to":ee()}],"mask-image-radial-from-color":[{"mask-radial-from":y()}],"mask-image-radial-to-color":[{"mask-radial-to":y()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":F()}],"mask-image-conic-pos":[{"mask-conic":[H]}],"mask-image-conic-from-pos":[{"mask-conic-from":ee()}],"mask-image-conic-to-pos":[{"mask-conic-to":ee()}],"mask-image-conic-from-color":[{"mask-conic-from":y()}],"mask-image-conic-to-color":[{"mask-conic-to":y()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:A()}],"mask-repeat":[{mask:ie()}],"mask-size":[{mask:ae()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",D,M]}],filter:[{filter:["","none",D,M]}],blur:[{blur:wt()}],brightness:[{brightness:[H,D,M]}],contrast:[{contrast:[H,D,M]}],"drop-shadow":[{"drop-shadow":["","none",b,Xe,Ye]}],"drop-shadow-color":[{"drop-shadow":y()}],grayscale:[{grayscale:["",H,D,M]}],"hue-rotate":[{"hue-rotate":[H,D,M]}],invert:[{invert:["",H,D,M]}],saturate:[{saturate:[H,D,M]}],sepia:[{sepia:["",H,D,M]}],"backdrop-filter":[{"backdrop-filter":["","none",D,M]}],"backdrop-blur":[{"backdrop-blur":wt()}],"backdrop-brightness":[{"backdrop-brightness":[H,D,M]}],"backdrop-contrast":[{"backdrop-contrast":[H,D,M]}],"backdrop-grayscale":[{"backdrop-grayscale":["",H,D,M]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[H,D,M]}],"backdrop-invert":[{"backdrop-invert":["",H,D,M]}],"backdrop-opacity":[{"backdrop-opacity":[H,D,M]}],"backdrop-saturate":[{"backdrop-saturate":[H,D,M]}],"backdrop-sepia":[{"backdrop-sepia":["",H,D,M]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":C()}],"border-spacing-x":[{"border-spacing-x":C()}],"border-spacing-y":[{"border-spacing-y":C()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",D,M]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[H,"initial",D,M]}],ease:[{ease:["linear","initial",k,D,M]}],delay:[{delay:[H,D,M]}],animate:[{animate:["none",S,D,M]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[x,D,M]}],"perspective-origin":[{"perspective-origin":q()}],rotate:[{rotate:K()}],"rotate-x":[{"rotate-x":K()}],"rotate-y":[{"rotate-y":K()}],"rotate-z":[{"rotate-z":K()}],scale:[{scale:N()}],"scale-x":[{"scale-x":N()}],"scale-y":[{"scale-y":N()}],"scale-z":[{"scale-z":N()}],"scale-3d":["scale-3d"],skew:[{skew:re()}],"skew-x":[{"skew-x":re()}],"skew-y":[{"skew-y":re()}],transform:[{transform:[D,M,"","none","gpu","cpu"]}],"transform-origin":[{origin:q()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:R()}],"translate-x":[{"translate-x":R()}],"translate-y":[{"translate-y":R()}],"translate-z":[{"translate-z":R()}],"translate-none":["translate-none"],zoom:[{zoom:[pe,D,M]}],accent:[{accent:y()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:y()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],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",D,M]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scrollbar-thumb-color":[{"scrollbar-thumb":y()}],"scrollbar-track-color":[{"scrollbar-track":y()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":C()}],"scroll-mx":[{"scroll-mx":C()}],"scroll-my":[{"scroll-my":C()}],"scroll-ms":[{"scroll-ms":C()}],"scroll-me":[{"scroll-me":C()}],"scroll-mbs":[{"scroll-mbs":C()}],"scroll-mbe":[{"scroll-mbe":C()}],"scroll-mt":[{"scroll-mt":C()}],"scroll-mr":[{"scroll-mr":C()}],"scroll-mb":[{"scroll-mb":C()}],"scroll-ml":[{"scroll-ml":C()}],"scroll-p":[{"scroll-p":C()}],"scroll-px":[{"scroll-px":C()}],"scroll-py":[{"scroll-py":C()}],"scroll-ps":[{"scroll-ps":C()}],"scroll-pe":[{"scroll-pe":C()}],"scroll-pbs":[{"scroll-pbs":C()}],"scroll-pbe":[{"scroll-pbe":C()}],"scroll-pt":[{"scroll-pt":C()}],"scroll-pr":[{"scroll-pr":C()}],"scroll-pb":[{"scroll-pb":C()}],"scroll-pl":[{"scroll-pl":C()}],"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",D,M]}],fill:[{fill:["none",...y()]}],"stroke-w":[{stroke:[H,Fe,ke,Fr]}],stroke:[{stroke:["none",...y()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{"container-named":["container-type"],overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","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","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","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-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","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-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","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"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","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-pbs","scroll-pbe","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"]},postfixLookupClassGroups:["container-type"],orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}});function $t(...t){return Vi(L(t))}const Gr=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,Ur=L,I=(t,e)=>r=>{var n;if(e?.variants==null)return Ur(t,r?.class,r?.className);const{variants:o,defaultVariants:i}=e,s=Object.keys(o).map(d=>{const p=r?.[d],u=i?.[d];if(p===null)return null;const g=Gr(p)||Gr(u);return o[d][g]}),l=r&&Object.entries(r).reduce((d,p)=>{let[u,g]=p;return g===void 0||(d[u]=g),d},{}),c=e==null||(n=e.compoundVariants)===null||n===void 0?void 0:n.reduce((d,p)=>{let{class:u,className:g,...b}=p;return Object.entries(b).every(v=>{let[x,w]=v;return Array.isArray(w)?w.includes({...i,...l}[x]):{...i,...l}[x]===w})?[...d,u,g]:d},[]);return Ur(t,s,c,r?.class,r?.className)},Wi=I(["inline-flex items-center justify-center font-bold","transition-colors duration-150","focus-visible:outline-none","disabled:cursor-not-allowed"],{variants:{size:{xs:"py-1 px-2 gap-1 rounded-md text-caption-sm",sm:"h-[36px] px-4 gap-1 rounded-lg text-caption-sm",md:"h-[44px] px-4 gap-2 rounded-lg text-sm",lg:"h-[52px] px-5 gap-2 rounded-[10px] text-body-sm",xl:"h-[60px] px-6 gap-2 rounded-[10px] text-body-lg","2xl":"h-[68px] px-6 gap-2 rounded-[10px] text-body-lg"},tone:{primary:"",destructive:""},iconOnly:{true:"!p-0",false:""},variant:{solid:["text-white","disabled:bg-light-100 disabled:text-light-400"],outline:["bg-white border","disabled:bg-white disabled:text-light-400 disabled:border-light-200"],ghost:["bg-transparent","disabled:text-light-400"],"outline-primary":["bg-white border border-primary-500 text-primary-500","hover:bg-primary-100 hover:border-primary-300 hover:text-primary-800","focus-visible:ring-2 focus-visible:ring-primary-400 focus-visible:ring-offset-2 focus-visible:ring-offset-white","disabled:bg-white disabled:text-light-400 disabled:border-light-200"],"ghost-primary":["bg-transparent text-primary-500","hover:bg-primary-50 hover:text-primary-800","focus-visible:ring-2 focus-visible:ring-primary-400 focus-visible:ring-offset-2 focus-visible:ring-offset-white","disabled:text-light-400"],plain:["bg-transparent !rounded-md","disabled:text-light-400 h-auto !px-2"],"plain-black":["bg-transparent !rounded-md","disabled:text-light-400 h-auto !px-2 "]}},compoundVariants:[{tone:"primary",variant:"solid",class:["bg-primary-500","hover:bg-primary-800","focus-visible:ring-2 focus-visible:ring-primary-400 focus-visible:ring-offset-2 focus-visible:ring-offset-white"].join(" ")},{tone:"primary",variant:"outline",class:["border-light-200 text-light-900","hover:bg-light-50","focus-visible:ring-2 focus-visible:ring-primary-400 focus-visible:ring-offset-2 focus-visible:ring-offset-white"].join(" ")},{tone:"primary",variant:"ghost",class:["text-light-800","hover:bg-light-50 hover:text-light-900","focus-visible:ring-2 focus-visible:ring-primary-400 focus-visible:ring-offset-2 focus-visible:ring-offset-white"].join(" ")},{tone:"primary",variant:"plain",class:["text-primary-500","hover:text-primary-800 hover:bg-transparent","focus-visible:ring-2 focus-visible:ring-primary-400 focus-visible:ring-offset-2"].join(" ")},{tone:"primary",variant:"plain-black",class:["text-light-800","hover:text-light-900 hover:bg-transparent","focus-visible:ring-2 focus-visible:ring-primary-400 focus-visible:ring-offset-2"].join(" ")},{tone:"destructive",variant:"solid",class:["bg-error-500 text-white","hover:bg-error-800","focus-visible:ring-2 focus-visible:ring-error-300 focus-visible:ring-offset-2 focus-visible:ring-offset-white","disabled:bg-light-100"].join(" ")},{tone:"destructive",variant:"outline",class:["border-error-500 text-error-500","hover:border-error-300 hover:bg-error-100 hover:text-error-800","focus-visible:ring-2 focus-visible:ring-error-300 focus-visible:ring-offset-2 focus-visible:ring-offset-white"].join(" ")},{tone:"destructive",variant:"ghost",class:["text-error-500","hover:bg-error-50 hover:text-error-800","focus-visible:ring-2 focus-visible:ring-error-300 focus-visible:ring-offset-2 focus-visible:ring-offset-white","disabled:bg-white disabled:text-light-400"].join(" ")},{tone:"destructive",variant:"plain",class:["text-error-500","hover:text-error-800 hover:bg-transparent","focus-visible:ring-2 focus-visible:ring-error-300 focus-visible:ring-offset-2"].join(" ")},{size:"xs",iconOnly:!0,class:"!w-[26px] !h-[26px]"},{size:"sm",iconOnly:!0,class:"!w-[36px] !h-[36px]"},{size:"md",iconOnly:!0,class:"!w-[44px] !h-[44px]"},{size:"lg",iconOnly:!0,class:"!w-[52px] !h-[52px]"},{size:"xl",iconOnly:!0,class:"!w-[60px] !h-[60px]"},{size:"2xl",iconOnly:!0,class:"!w-[68px] !h-[68px]"}],defaultVariants:{size:"md",tone:"primary",variant:"solid",iconOnly:!1}}),qr=a.forwardRef(({children:t,className:e,tone:r,variant:n,size:o,iconOnly:i,...s},l)=>a.createElement("button",{ref:l,className:$t(Wi({tone:r,variant:n,size:o,iconOnly:i}),e),...s},t));qr.displayName="Button";const Hi=({children:t})=>a.createElement("span",{className:"flex items-center"},t),ji=({children:t})=>a.createElement("span",{className:"whitespace-nowrap"},t),Ze=qr;Ze.Icon=Hi,Ze.Text=ji;const Gi=I(["inline-flex items-center justify-center","border transition-colors duration-150","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-400 focus-visible:ring-offset-2 focus-visible:ring-offset-white"],{variants:{size:{sm:"h-4 w-4 rounded-[4px]",md:"h-5 w-5 rounded-[6px]",lg:"h-5 w-5 rounded-[6px]"},checked:{true:"",false:""},disabled:{true:"cursor-not-allowed",false:"cursor-pointer"}},compoundVariants:[{checked:!1,disabled:!1,className:"bg-white border-light-200 hover:border-light-400"},{checked:!0,disabled:!1,className:"bg-primary-500 border-primary-500 text-white hover:bg-primary-800 hover:border-primary-800"},{disabled:!0,className:"bg-light-100 border-light-200 text-white"}],defaultVariants:{size:"md",checked:!1,disabled:!1}}),Ui={sm:{width:12,height:9},md:{width:14,height:10},lg:{width:14,height:10}},Yr=f.forwardRef(({id:t,checked:e,indeterminate:r=!1,disabled:n,size:o="md",onCheckedChange:i,className:s},l)=>{const c=()=>{n||i?.(!e)},d=Ui[o],p=n?"text-white/80":"text-current";return f.createElement("button",{id:t,ref:l,type:"button",role:"checkbox","aria-checked":r?"mixed":e,disabled:n,onClick:c,className:L(Gi({size:o,checked:e,disabled:n}),s)},e&&!r&&f.createElement("svg",{width:d.width,height:d.height,viewBox:"0 0 14 10",fill:"none",className:p},f.createElement("path",{d:"M1 5L5 9L13 1",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})),r&&f.createElement("span",{className:L(p,"bg-current rounded-sm",o==="sm"&&"h-0.5 w-3",(o==="md"||o==="lg")&&"h-0.5 w-4")}))});Yr.displayName="Checkbox";const Xr=f.createContext(null),qi=({value:t,defaultValue:e,onValueChange:r,children:n,className:o})=>{const[i,s]=f.useState(e),l=t??i,c=d=>{s(d),r?.(d)};return f.createElement(Xr.Provider,{value:{value:l,onValueChange:c}},f.createElement("div",{role:"radiogroup",className:o},n))},Yi=()=>{const t=f.useContext(Xr);if(!t)throw new Error("RadioGroupItem must be used within RadioGroup");return t},Xi=I(["relative inline-flex items-center justify-center","border rounded-full transition-colors duration-150","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-400 focus-visible:ring-offset-2 focus-visible:ring-offset-white"],{variants:{size:{sm:"h-4 w-4",md:"h-5 w-5",lg:"h-5 w-5"},checked:{true:"",false:""},disabled:{true:"cursor-not-allowed",false:"cursor-pointer"}},compoundVariants:[{checked:!1,disabled:!1,className:"border-light-200 bg-white hover:border-light-400"},{checked:!0,disabled:!1,className:"border-primary-500 bg-primary-500 hover:bg-primary-800 hover:border-primary-800"},{disabled:!0,className:"border-light-200 bg-light-100"}],defaultVariants:{size:"md",checked:!1,disabled:!1}}),Zi=I(["rounded-full bg-white transition-all"],{variants:{size:{sm:"h-1.5 w-1.5",md:"h-2 w-2",lg:"h-2 w-2"},checked:{true:"scale-100",false:"scale-0"}},defaultVariants:{size:"md",checked:!1}}),Zr=f.forwardRef(({id:t,value:e,disabled:r,size:n="md",className:o},i)=>{const{value:s,onValueChange:l}=Yi(),c=s===e;return f.createElement("button",{ref:i,id:t,type:"button",role:"radio","aria-checked":c,disabled:r,onClick:()=>{r||l?.(e)},className:L(Xi({size:n,checked:c,disabled:r}),o)},f.createElement("span",{className:Zi({size:n,checked:c})}))});Zr.displayName="RadioGroupItem";const Ji=I(["inline-flex items-center shrink-0 rounded-full p-[2px]","transition-colors duration-200","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-offset-white"],{variants:{size:{sm:"h-5 w-9",md:"h-6 w-11",lg:"h-6 w-11"},checked:{true:"justify-end",false:"justify-start"},disabled:{true:"cursor-not-allowed",false:"cursor-pointer"},variant:{default:"",success:""}},compoundVariants:[{checked:!1,disabled:!1,className:"bg-light-200"},{checked:!0,disabled:!1,variant:"default",className:"bg-primary-500 hover:bg-primary-800"},{checked:!0,disabled:!1,variant:"success",className:"bg-success-500 hover:bg-success-800"},{disabled:!0,className:"bg-light-100"},{variant:"default",className:"focus-visible:ring-primary-400"},{variant:"success",className:"focus-visible:ring-success-500"}],defaultVariants:{size:"md",checked:!1,disabled:!1,variant:"default"}}),Ri=I("rounded-full shrink-0 shadow-[0_1px_3px_0_rgba(16,24,40,0.10),0_1px_2px_0_rgba(16,24,40,0.06)]",{variants:{size:{sm:"h-4 w-4",md:"h-5 w-5",lg:"h-5 w-5"},disabled:{true:"bg-light-50",false:"bg-white"}},defaultVariants:{size:"md",disabled:!1}}),Jr=f.forwardRef(({checked:t=!1,size:e="md",variant:r="default",disabled:n,onCheckedChange:o,className:i},s)=>f.createElement("button",{ref:s,type:"button",role:"switch","aria-checked":t,disabled:n,onClick:()=>{n||o?.(!t)},className:L(Ji({size:e,checked:t,disabled:n,variant:r}),i)},f.createElement("span",{className:Ri({size:e,disabled:n})})));Jr.displayName="Toggle";const Qi=I(["relative rounded-lg text-caption-sm font-semibold text-white","bg-primary-900","shadow-lg","pointer-events-none","select-none"],{variants:{side:{top:"",bottom:"",left:"",right:""},hasSupportingText:{true:"p-3",false:"px-3 py-2"}},defaultVariants:{side:"top",hasSupportingText:!1}}),es="mt-1 font-medium text-light-100",ts=I(["absolute"],{variants:{side:{top:["bottom-[-6px] left-1/2 -translate-x-1/2","border-x-8 border-x-transparent border-t-[6px] border-t-primary-900"],bottom:["top-[-6px] left-1/2 -translate-x-1/2","border-x-8 border-x-transparent border-b-[6px] border-b-primary-900"],left:["right-[-6px] top-1/2 -translate-y-1/2","border-y-8 border-y-transparent border-l-[6px] border-l-primary-900"],right:["left-[-6px] top-1/2 -translate-y-1/2","border-y-8 border-y-transparent border-r-[6px] border-r-primary-900"]}},defaultVariants:{side:"top"}}),Je=12,Re=({content:t,supportingText:e,side:r="top",open:n,defaultOpen:o=!1,disabled:i=!1,delay:s=0,className:l,children:c})=>{const[d,p]=f.useState(o),[u,g]=f.useState(null),b=n??d,v=f.useRef(null),x=f.useRef(null),w=f.useCallback(()=>{const T=v.current;if(!T)return null;const F=T.getBoundingClientRect();switch(r){case"top":return{top:F.top-Je,left:F.left+F.width/2};case"bottom":return{top:F.bottom+Je,left:F.left+F.width/2};case"left":return{top:F.top+F.height/2,left:F.left-Je};default:return{top:F.top+F.height/2,left:F.right+Je}}},[r]),k=()=>{if(i||!v.current)return;const T=()=>{g(w()),p(!0)};s>0?x.current=window.setTimeout(T,s):T()};f.useEffect(()=>{if(!b||!v.current)return;const T=()=>g(w());T();const F=new ResizeObserver(T);return F.observe(v.current),window.addEventListener("scroll",T,!0),window.addEventListener("resize",T),()=>{F.disconnect(),window.removeEventListener("scroll",T,!0),window.removeEventListener("resize",T)}},[b,w]);const S=()=>{x.current&&(clearTimeout(x.current),x.current=null),p(!1)};return f.createElement(f.Fragment,null,f.createElement("span",{ref:v,className:"inline-flex",onMouseEnter:k,onMouseLeave:S,onFocus:k,onBlur:S,tabIndex:0},c),b&&u&&Ue.createPortal(f.createElement("div",{role:"tooltip",className:"fixed z-[9999] pointer-events-none",style:{top:u.top,left:u.left,transform:r==="top"?"translate(-50%, -100%)":r==="bottom"?"translate(-50%, 0)":r==="left"?"translate(-100%, -50%)":"translate(0, -50%)"}},f.createElement("div",{className:L(Qi({side:r,hasSupportingText:!!e}),l)},t,e&&f.createElement("p",{className:es},e),f.createElement("span",{className:ts({side:r})}))),document.body))};Re.displayName="Tooltip";const rs={brand:{bg:"bg-primary-50",border:"border-primary-300",text:"text-primary-700"},gray:{bg:"bg-white",border:"border-light-200",text:"text-light-800"},error:{bg:"bg-error-50",border:"border-error-200",text:"text-error-700"},warning:{bg:"bg-warning-50",border:"border-warning-200",text:"text-warning-700"},success:{bg:"bg-success-50",border:"border-success-200",text:"text-success-700"},"blue-gray":{bg:"bg-blue-gray-50",border:"border-blue-gray-200",text:"text-blue-gray-700"},"blue-light":{bg:"bg-blue-light-50",border:"border-blue-light-200",text:"text-blue-light-700"},indigo:{bg:"bg-indigo-50",border:"border-indigo-200",text:"text-indigo-700"},purple:{bg:"bg-purple-50",border:"border-purple-200",text:"text-purple-700"},blue:{bg:"bg-blue-50",border:"border-blue-200",text:"text-blue-700"},pink:{bg:"bg-pink-50",border:"border-pink-200",text:"text-pink-700"},orange:{bg:"bg-orange-50",border:"border-orange-200",text:"text-orange-700"}},ns=I(["inline-flex items-center gap-1 border","font-medium transition-colors duration-150","select-none"],{variants:{size:{sm:"text-caption-sm py-[3px]",md:"text-caption-lg py-[2px]",lg:"text-caption-lg py-1"},shape:{rounded:"rounded-md",pill:"rounded-full"},hasLeading:{true:"",false:""},hasTrailing:{true:"",false:""},interactive:{true:"cursor-pointer focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-400 focus-visible:ring-offset-2 focus-visible:ring-offset-white",false:""},disabled:{true:"cursor-not-allowed opacity-60",false:""}},compoundVariants:[{size:"sm",hasLeading:!1,className:"pl-2"},{size:"sm",hasLeading:!0,className:"pl-1"},{size:"sm",hasTrailing:!1,className:"pr-2"},{size:"sm",hasTrailing:!0,className:"pr-1"},{size:"md",hasLeading:!1,className:"pl-[9px]"},{size:"md",hasLeading:!0,className:"pl-1"},{size:"md",hasTrailing:!1,className:"pr-[9px]"},{size:"md",hasTrailing:!0,className:"pr-1"},{size:"lg",hasLeading:!1,className:"pl-2.5"},{size:"lg",hasLeading:!0,className:"pl-1.5"},{size:"lg",hasTrailing:!1,className:"pr-2.5"},{size:"lg",hasTrailing:!0,className:"pr-1.5"}],defaultVariants:{size:"sm",shape:"rounded",hasLeading:!1,hasTrailing:!1,interactive:!1,disabled:!1}}),os=I(["shrink-0 rounded border bg-white transition-colors duration-150 size-3.5"],{variants:{checked:{true:"bg-primary-500 border-primary-500",false:""}},defaultVariants:{checked:!1}}),is="shrink-0 rounded-[3px] bg-light-100 px-1 text-light-800",ss="shrink-0 rounded-[3px] p-0.5 hover:bg-black/5 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-400",Rr=/^#([0-9a-f]{6})$/i,Qr=t=>Rr.test(t.trim()),en=(t,e)=>{const r=Rr.exec(t.trim());if(!r)return;const n=parseInt(r[1],16),o=n>>16&255,i=n>>8&255,s=n&255;return`rgba(${o}, ${i}, ${s}, ${e})`},Tt=({children:t,size:e="sm",shape:r="rounded",icon:n,checked:o,onCheckedChange:i,onClose:s,count:l,disabled:c=!1,className:d,color:p="gray",customColor:u})=>{const g=i!==void 0,b=o!==void 0||!!n,v=!!s||l!==void 0,x=rs[p],w=!!(u&&Qr(u)),k=w?{borderColor:u,backgroundColor:en(u,.12),color:u}:void 0,S=()=>{c||i?.(!o)},T=F=>{!g||c||(F.key==="Enter"||F.key===" ")&&(F.preventDefault(),S())};return f.createElement("div",{role:g?"checkbox":void 0,"aria-checked":g?!!o:void 0,"aria-disabled":c||void 0,tabIndex:g&&!c?0:void 0,onClick:g?S:void 0,onKeyDown:T,style:k,className:L(ns({size:e,shape:r,hasLeading:b,hasTrailing:v,interactive:g,disabled:c}),!w&&x.bg,!w&&x.border,!w&&x.text,d)},o!==void 0&&f.createElement("span",{className:L(os({checked:o}),!o&&!w&&x.border),style:!o&&w?{borderColor:u}:void 0},o&&f.createElement("svg",{viewBox:"0 0 14 10",fill:"none",className:"size-full text-white"},f.createElement("path",{d:"M1 5L5 9L13 1",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}))),n,f.createElement("span",{className:"whitespace-nowrap"},t),l!==void 0&&f.createElement("span",{className:is},l),s&&f.createElement("button",{type:"button","aria-label":"Remove",disabled:c,onClick:F=>{F.stopPropagation(),s()},className:ss},f.createElement("svg",{viewBox:"0 0 10 10",fill:"none",className:"size-2.5"},f.createElement("path",{d:"M1 1L9 9M9 1L1 9",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"}))))};Tt.displayName="Tag";const ls={brand:{solidBg:"bg-primary-50",solidBorder:"border-primary-300",solidText:"text-primary-500",outlineBorder:"border-primary-500",outlineText:"text-primary-700"},gray:{solidBg:"bg-light-50",solidBorder:"border-light-200",solidText:"text-light-700",outlineBorder:"border-light-600",outlineText:"text-light-700"},error:{solidBg:"bg-error-50",solidBorder:"border-error-200",solidText:"text-error-700",outlineBorder:"border-error-600",outlineText:"text-error-700"},warning:{solidBg:"bg-warning-50",solidBorder:"border-warning-200",solidText:"text-warning-700",outlineBorder:"border-warning-600",outlineText:"text-warning-700"},success:{solidBg:"bg-success-50",solidBorder:"border-success-200",solidText:"text-success-700",outlineBorder:"border-success-600",outlineText:"text-success-700"},"blue-gray":{solidBg:"bg-blue-gray-50",solidBorder:"border-blue-gray-200",solidText:"text-blue-gray-700",outlineBorder:"border-blue-gray-600",outlineText:"text-blue-gray-700"},"blue-light":{solidBg:"bg-blue-light-50",solidBorder:"border-blue-light-200",solidText:"text-blue-light-700",outlineBorder:"border-blue-light-600",outlineText:"text-blue-light-700"},indigo:{solidBg:"bg-indigo-50",solidBorder:"border-indigo-200",solidText:"text-indigo-700",outlineBorder:"border-indigo-600",outlineText:"text-indigo-700"},purple:{solidBg:"bg-purple-50",solidBorder:"border-purple-200",solidText:"text-purple-700",outlineBorder:"border-purple-600",outlineText:"text-purple-700"},blue:{solidBg:"bg-blue-50",solidBorder:"border-blue-200",solidText:"text-blue-700",outlineBorder:"border-blue-600",outlineText:"text-blue-700"},pink:{solidBg:"bg-pink-50",solidBorder:"border-pink-200",solidText:"text-pink-700",outlineBorder:"border-pink-600",outlineText:"text-pink-700"},orange:{solidBg:"bg-orange-50",solidBorder:"border-orange-200",solidText:"text-orange-700",outlineBorder:"border-orange-600",outlineText:"text-orange-700"}},as=I(["inline-flex items-center gap-1 border font-medium","transition-colors duration-150"],{variants:{size:{sm:"text-caption-sm py-0.5",md:"text-caption-lg py-0.5",lg:"text-caption-lg py-1"},shape:{pill:"rounded-full",badge:""},modern:{true:"rounded-md shadow-xs",false:""},hasLeading:{true:"",false:""},hasTrailing:{true:"",false:""},iconOnly:{true:"p-[5px]",false:""},interactive:{true:"cursor-pointer focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-400 focus-visible:ring-offset-2 focus-visible:ring-offset-white",false:""},disabled:{true:"cursor-not-allowed opacity-60",false:""}},compoundVariants:[{shape:"badge",size:"sm",modern:!1,className:"rounded-md"},{shape:"badge",size:"md",modern:!1,className:"rounded-md"},{shape:"badge",size:"lg",modern:!1,className:"rounded-lg"},{size:"sm",shape:"pill",iconOnly:!1,hasLeading:!1,className:"pl-2"},{size:"sm",shape:"badge",iconOnly:!1,hasLeading:!1,className:"pl-1.5"},{size:"sm",iconOnly:!1,hasLeading:!0,className:"pl-1"},{size:"sm",iconOnly:!1,hasTrailing:!1,className:"pr-2"},{size:"sm",iconOnly:!1,hasTrailing:!0,className:"pr-1"},{size:"md",iconOnly:!1,hasLeading:!1,className:"pl-2.5"},{size:"md",iconOnly:!1,hasLeading:!0,className:"pl-1"},{size:"md",iconOnly:!1,hasTrailing:!1,className:"pr-2.5"},{size:"md",iconOnly:!1,hasTrailing:!0,className:"pr-1"},{size:"lg",shape:"pill",iconOnly:!1,hasLeading:!1,className:"pl-3"},{size:"lg",shape:"badge",iconOnly:!1,hasLeading:!1,className:"pl-2.5"},{size:"lg",iconOnly:!1,hasLeading:!0,className:"pl-1.5"},{size:"lg",shape:"pill",iconOnly:!1,hasTrailing:!1,className:"pr-3"},{size:"lg",shape:"badge",iconOnly:!1,hasTrailing:!1,className:"pr-2.5"},{size:"lg",iconOnly:!1,hasTrailing:!0,className:"pr-1.5"}],defaultVariants:{size:"sm",shape:"pill",modern:!1,hasLeading:!1,hasTrailing:!1,iconOnly:!1,interactive:!1,disabled:!1}}),cs="size-4 shrink-0 rounded border bg-white",ds="shrink-0 rounded p-0.5 hover:bg-black/5 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-400",tn=({children:t,size:e="sm",shape:r="pill",variant:n="solid",color:o="brand",customColor:i,modern:s=!1,icon:l,trailingIcon:c,checked:d,onCheckedChange:p,onClose:u,iconOnly:g=!1,disabled:b=!1,className:v})=>{const x=p!==void 0,w=d!==void 0||!!l,k=!!u||!!c,S=ls[o],T=!!(i&&Qr(i)),F=T?{borderColor:i,color:i,backgroundColor:n==="outline"?"transparent":en(i,.1)}:void 0,q=()=>{b||p?.(!d)},_=z=>{!x||b||(z.key==="Enter"||z.key===" ")&&(z.preventDefault(),q())};return f.createElement("div",{role:x?"checkbox":void 0,"aria-checked":x?!!d:void 0,"aria-disabled":b||void 0,tabIndex:x&&!b?0:void 0,onClick:x?q:void 0,onKeyDown:_,style:F,className:L(as({size:e,shape:r,modern:s,hasLeading:w,hasTrailing:k,iconOnly:g,interactive:x,disabled:b}),!T&&(n==="outline"?L("bg-transparent",S.outlineBorder,S.outlineText):L(S.solidBg,S.solidBorder,S.solidText)),v)},d!==void 0&&f.createElement("span",{className:L(cs,d?"bg-primary-500 border-primary-500":!T&&S.solidBorder),style:!d&&T?{borderColor:i}:void 0},d&&f.createElement("svg",{viewBox:"0 0 14 10",fill:"none",className:"size-full text-white"},f.createElement("path",{d:"M1 5L5 9L13 1",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}))),l,!g&&f.createElement("span",{className:"whitespace-nowrap"},t),c,u&&f.createElement("button",{type:"button","aria-label":"Remove",disabled:b,onClick:z=>{z.stopPropagation(),u()},className:ds},f.createElement("svg",{viewBox:"0 0 10 10",fill:"none",className:"size-2.5"},f.createElement("path",{d:"M1 1L9 9M9 1L1 9",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"}))))};tn.displayName="Badge";const us={brand:{bg50:"bg-primary-50",hoverBg100:"hover:bg-primary-100",border200:"border-primary-200",border500:"border-primary-500",text500:"text-primary-500"},gray:{bg50:"bg-light-50",hoverBg100:"hover:bg-light-100",border200:"border-light-200",border500:"border-light-500",text500:"text-light-500"},error:{bg50:"bg-error-50",hoverBg100:"hover:bg-error-100",border200:"border-error-200",border500:"border-error-500",text500:"text-error-500"},warning:{bg50:"bg-warning-50",hoverBg100:"hover:bg-warning-100",border200:"border-warning-200",border500:"border-warning-500",text500:"text-warning-500"},success:{bg50:"bg-success-50",hoverBg100:"hover:bg-success-100",border200:"border-success-200",border500:"border-success-500",text500:"text-success-500"}},fs={md:{outerPad:{leading:"pl-1 pr-2.5 py-1",trailing:"pl-3 pr-1 py-1"},gap:"gap-2",chipPad:"px-2 py-0.5",text:"text-caption-lg"},lg:{outerPad:{leading:"pl-1.5 pr-3 py-1.5",trailing:"pl-3 pr-1.5 py-1.5"},gap:"gap-2",chipPad:"px-2.5 py-[3px]",text:"text-body-sm"}},rn=({badgeLabel:t,children:e,size:r="md",theme:n="light",color:o="brand",badgePosition:i="leading",icon:s,onClick:l,className:c})=>{const d=us[o],p=fs[r],u=n==="modern",g=n==="outline",b=L("inline-flex items-center border transition-colors duration-150",p.gap,p.outerPad[i],u?"rounded-lg bg-light-50 border-light-200 shadow-xs":g?L("rounded-full bg-white border-[1.5px]",d.border500):L("rounded-full",d.bg50,d.border200,d.hoverBg100),l&&"cursor-pointer",c),v=L("inline-flex shrink-0 items-center gap-1 border font-medium whitespace-nowrap",p.chipPad,p.text,u?"rounded-md bg-white border-light-200 text-light-800":g?L("rounded-full bg-white border-[1.5px]",d.border500,d.text500):L("rounded-full bg-white",d.border200,d.text500)),x=L("inline-flex items-center gap-1 font-medium",p.text,u?"text-light-800":d.text500),w=f.createElement("span",{className:v},u&&f.createElement("span",{className:"size-2 shrink-0 rounded-full bg-light-400"}),t);return f.createElement("div",{role:l?"button":void 0,tabIndex:l?0:void 0,onClick:l,className:b},i==="leading"&&w,f.createElement("span",{className:x},e,s),i==="trailing"&&w)};rn.displayName="BadgeGroup";const ps=({size:t})=>{const e=t*.09,r=(t-e)/2,n=2*Math.PI*r;return f.createElement("svg",{width:t,height:t,viewBox:`0 0 ${t} ${t}`,fill:"none",className:"animate-spin"},f.createElement("circle",{cx:t/2,cy:t/2,r,strokeWidth:e,className:"stroke-light-100"}),f.createElement("circle",{cx:t/2,cy:t/2,r,strokeWidth:e,strokeLinecap:"round",strokeDasharray:`${n*.25} ${n}`,className:"stroke-primary-600"}))},hs=({size:t})=>{const e=f.useId(),r=t*.125,n=(t-r)/2,o=2*Math.PI*n;return f.createElement("svg",{width:t,height:t,viewBox:`0 0 ${t} ${t}`,fill:"none",className:"animate-spin text-primary-600"},f.createElement("defs",null,f.createElement("linearGradient",{id:e,x1:"100%",y1:"0%",x2:"0%",y2:"100%"},f.createElement("stop",{offset:"0%",stopColor:"currentColor",stopOpacity:"1"}),f.createElement("stop",{offset:"100%",stopColor:"currentColor",stopOpacity:"0"}))),f.createElement("circle",{cx:t/2,cy:t/2,r:n,strokeWidth:r,className:"stroke-light-100"}),f.createElement("circle",{cx:t/2,cy:t/2,r:n,strokeWidth:r,strokeLinecap:"round",stroke:`url(#${e})`,strokeDasharray:`${o*.75} ${o}`}))},bs=({size:t})=>{const r=Math.max(t*.1,3),n=(t-r)/2;return f.createElement("div",{className:"relative animate-spin",style:{width:t,height:t}},Array.from({length:12}).map((o,i)=>{const s=30*i,l=.15+.85*i/11;return f.createElement("span",{key:i,className:"absolute rounded-full bg-primary-600 top-1/2 left-1/2",style:{width:r,height:r,opacity:l,marginTop:-r/2,marginLeft:-r/2,transform:`rotate(${s}deg) translate(${n}px) rotate(${-s}deg)`}})}))},ms={sm:{box:32,gapClass:"gap-4",textClass:"text-caption-lg"},md:{box:48,gapClass:"gap-4",textClass:"text-caption-lg"},lg:{box:56,gapClass:"gap-4",textClass:"text-body-lg"},xl:{box:64,gapClass:"gap-5",textClass:"text-body-lg"}},nn=({size:t="sm",style:e="line-simple",supportingText:r=!0,label:n="Loading...",className:o})=>{const{box:i,gapClass:s,textClass:l}=ms[t];return f.createElement("div",{role:"status","aria-label":typeof n=="string"?n:"Loading",className:L("inline-flex flex-col items-center",s,o)},e==="line-simple"&&f.createElement(ps,{size:i}),e==="line-spinner"&&f.createElement(hs,{size:i}),e==="dot-circle"&&f.createElement(bs,{size:i}),r&&f.createElement("p",{className:L("font-medium text-light-700 whitespace-nowrap",l)},n))};nn.displayName="Loading";const on=({className:t,style:e})=>f.createElement("svg",{viewBox:"0 0 24 24",fill:"none",className:t,style:e},f.createElement("path",{d:"M12 12a4.5 4.5 0 1 0 0-9 4.5 4.5 0 0 0 0 9Z",stroke:"currentColor",strokeWidth:"1.75"}),f.createElement("path",{d:"M3.75 20.25a8.25 8.25 0 0 1 16.5 0",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"})),sn=({className:t})=>f.createElement("svg",{viewBox:"0 0 20 20",fill:"none",className:t},f.createElement("circle",{cx:"10",cy:"10",r:"9",className:"fill-primary-500 stroke-white",strokeWidth:"1.5"}),f.createElement("path",{d:"M6 10.2 8.6 12.8 14 7",stroke:"white",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"})),gs={xs:{box:24,borderWidth:"0.5px",statusSize:6,badgeSize:10,textClass:"text-caption-sm"},sm:{box:32,borderWidth:"0.5px",statusSize:8,badgeSize:12,textClass:"text-caption-lg"},md:{box:40,borderWidth:"0.75px",statusSize:10,badgeSize:14,textClass:"text-body-sm"},lg:{box:48,borderWidth:"0.75px",statusSize:12,badgeSize:16,textClass:"text-body-lg"},xl:{box:56,borderWidth:"0.75px",statusSize:14,badgeSize:18,textClass:"text-h6"},"2xl":{box:64,borderWidth:"0.75px",statusSize:16,badgeSize:20,textClass:"text-h5 leading-7"}},ys="#17B26A",Ae=({src:t,alt:e,initials:r,size:n="md",status:o="none",statusIcon:i,contrastBorder:s=!0,className:l})=>{const{box:c,borderWidth:d,statusSize:p,badgeSize:u,textClass:g}=gs[n],b=t?"image":r!==void 0?"initials":"placeholder";return f.createElement("div",{className:L("relative inline-block shrink-0 rounded-full",l),style:{width:c,height:c}},b==="image"&&f.createElement("img",{src:t,alt:e??"",className:"absolute inset-0 size-full rounded-full object-cover"}),b==="placeholder"&&f.createElement("div",{className:"absolute inset-0 flex items-center justify-center rounded-full bg-light-50"},f.createElement(on,{className:"text-light-300",style:{width:c*.55,height:c*.55}})),b==="initials"&&f.createElement("div",{className:L("absolute inset-0 flex items-center justify-center rounded-full bg-light-50 font-semibold text-light-500",g)},r),s&&f.createElement("div",{className:"pointer-events-none absolute inset-0 rounded-full border-black/[0.08]",style:{borderWidth:d,borderStyle:"solid"}}),o==="online"&&f.createElement("span",{className:"absolute bottom-0 right-0 rounded-full border-[1.5px] border-white",style:{width:p,height:p,backgroundColor:ys}}),o==="company"&&f.createElement("div",{className:"absolute bottom-0 right-0 flex items-center justify-center overflow-hidden rounded-full border-[1.5px] border-white bg-white",style:{width:u,height:u}},i),o==="verified"&&f.createElement("div",{className:"absolute bottom-0 right-0",style:{width:u,height:u}},f.createElement(sn,{className:"size-full"})))};Ae.displayName="Avatar";const xs={xs:{box:24,overlap:-4,contrastBorderWidth:"0.5px",plusIconSize:16,textClass:"text-caption-sm"},sm:{box:32,overlap:-8,contrastBorderWidth:"0.5px",plusIconSize:16,textClass:"text-caption-lg"},md:{box:40,overlap:-12,contrastBorderWidth:"0.75px",plusIconSize:20,textClass:"text-body-sm"}},ln=({avatars:t,max:e,size:r="xs",onAdd:n,className:o})=>{const{box:i,overlap:s,contrastBorderWidth:l,textClass:c}=xs[r],d=e?t.slice(0,e):t,p=e&&t.length>e?t.length-e:0;return f.createElement("div",{className:L("inline-flex items-start gap-2",o)},f.createElement("div",{className:"flex items-start"},d.map((u,g)=>f.createElement(Re,{key:g,content:u.label,disabled:!u.label,side:"top"},f.createElement("div",{className:"relative shrink-0 overflow-hidden rounded-full border-[1.5px] border-white",style:{width:i,height:i,marginRight:s}},u.src?f.createElement("img",{src:u.src,alt:u.alt??"",className:"size-full object-cover"}):f.createElement("div",{className:"flex size-full items-center justify-center bg-light-50 font-semibold text-light-500"},u.initials),f.createElement("div",{className:"pointer-events-none absolute inset-0 rounded-full border-black/[0.08]",style:{borderWidth:l,borderStyle:"solid"}})))),p>0&&f.createElement(Re,{content:t.slice(e).map((u,g)=>f.createElement("div",{key:g},u.label)),disabled:!t.slice(e).some(u=>u.label),side:"top"},f.createElement("div",{className:"relative flex shrink-0 items-center justify-center rounded-full border-2 border-white bg-light-100",style:{width:i,height:i}},f.createElement("span",{className:L("font-semibold text-light-600",c)},"+",p)))),n&&f.createElement("button",{type:"button",onClick:n,"aria-label":"Add",className:"flex shrink-0 items-center justify-center rounded-full border border-dashed border-light-300 bg-white text-light-500 hover:bg-light-50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-400 focus-visible:ring-offset-2",style:{width:i,height:i}},f.createElement("svg",{width:i*.4,height:i*.4,viewBox:"0 0 20 20",fill:"none"},f.createElement("path",{d:"M10 4v12M4 10h12",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"}))))};ln.displayName="AvatarGroup";const vs={xs:{nameClass:"text-caption-sm",subtitleClass:"text-caption-sm"},sm:{nameClass:"text-caption-lg",subtitleClass:"text-caption-sm"},md:{nameClass:"text-caption-lg",subtitleClass:"text-caption-lg"},lg:{nameClass:"text-body-sm",subtitleClass:"text-body-sm"},xl:{nameClass:"text-body-lg",subtitleClass:"text-body-sm"}},an=({name:t,subtitle:e,src:r,initials:n,size:o="xs",status:i="none",statusIcon:s,className:l})=>{const{nameClass:c,subtitleClass:d}=vs[o];return f.createElement("div",{className:L("inline-flex items-center gap-2",l)},f.createElement(Ae,{src:r,initials:n,size:o,status:i,statusIcon:s}),f.createElement("div",{className:"flex flex-col items-start whitespace-nowrap"},f.createElement("span",{className:L("font-bold text-light-800",c)},t),e&&f.createElement("span",{className:L("font-normal text-light-700",d)},e)))};an.displayName="AvatarLabelGroup";const ws={sm:{box:72,ringWidth:3,shadowClass:"shadow-md",iconSize:36,textClass:"text-h4",verifiedSize:20,verifiedOffset:0},md:{box:96,ringWidth:4,shadowClass:"shadow-lg",iconSize:48,textClass:"text-h3",verifiedSize:24,verifiedOffset:0},lg:{box:160,ringWidth:4,shadowClass:"shadow-lg",iconSize:80,textClass:"text-h1",verifiedSize:32,verifiedOffset:4}},cn=({src:t,alt:e,initials:r,size:n="sm",verified:o=!0,contrastBorder:i=!0,className:s})=>{const{box:l,ringWidth:c,shadowClass:d,iconSize:p,textClass:u,verifiedSize:g,verifiedOffset:b}=ws[n],v=t?"image":r!==void 0?"initials":"placeholder";return f.createElement("div",{className:L("relative rounded-full",s),style:{width:l,height:l}},f.createElement("div",{className:L("absolute inset-0 overflow-hidden rounded-full border-white",d,v!=="image"&&"bg-light-100"),style:{borderWidth:c,borderStyle:"solid"}},v==="image"&&f.createElement("img",{src:t,alt:e??"",className:"absolute inset-0 size-full rounded-full object-cover"}),i&&f.createElement("div",{className:"pointer-events-none absolute inset-0 rounded-full border border-black/[0.08]"}),v==="placeholder"&&f.createElement("div",{className:"absolute inset-0 flex items-center justify-center"},f.createElement(on,{className:"text-light-300",style:{width:p,height:p}})),v==="initials"&&f.createElement("div",{className:L("absolute inset-0 flex items-center justify-center font-semibold text-light-500",u)},r)),o&&f.createElement("div",{className:"absolute",style:{width:g,height:g,bottom:b,right:b}},f.createElement(sn,{className:"size-full"})))};cn.displayName="AvatarProfilePhoto";function Oe(...t){return(...e)=>{for(let r of t)typeof r=="function"&&r(...e)}}const we=typeof document<"u"?a.useLayoutEffect:()=>{},Qe={prefix:String(Math.round(Math.random()*1e10)),current:0},dn=a.createContext(Qe),Es=a.createContext(!1);let Ss=!!(typeof window<"u"&&window.document&&window.document.createElement),Nt=new WeakMap;function ks(t=!1){let e=a.useContext(dn),r=a.useRef(null);if(r.current===null&&!t){let n=a.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED?.ReactCurrentOwner?.current;if(n){let o=Nt.get(n);o==null?Nt.set(n,{id:e.current,state:n.memoizedState}):n.memoizedState!==o.state&&(e.current=o.id,Nt.delete(n))}r.current=++e.current}return r.current}function Cs(t){let e=a.useContext(dn);e===Qe&&!Ss&&process.env.NODE_ENV!=="production"&&console.warn("When server rendering, you must wrap your application in an <SSRProvider> to ensure consistent ids are generated between the client and server.");let r=ks(!!t),n=e===Qe&&process.env.NODE_ENV==="test"?"react-aria":`react-aria${e.prefix}`;return t||`${n}-${r}`}function $s(t){let e=a.useId(),[r]=a.useState(et()),n=r||process.env.NODE_ENV==="test"?"react-aria":`react-aria${Qe.prefix}`;return t||`${n}-${e}`}const Ts=typeof a.useId=="function"?$s:Cs;function Ns(){return!1}function Ks(){return!0}function Ps(t){return()=>{}}function et(){return typeof a.useSyncExternalStore=="function"?a.useSyncExternalStore(Ps,Ns,Ks):a.useContext(Es)}let Ls=!!(typeof window<"u"&&window.document&&window.document.createElement),Ne=new Map,Ke;typeof FinalizationRegistry<"u"&&(Ke=new FinalizationRegistry(t=>{Ne.delete(t)}));let Kt=new WeakMap;function tt(t){let[e,r]=a.useState(t),n=a.useRef(null),o=Ts(e),i=a.useRef(null),s=Kt.get(i);if(Ke&&s!==o&&(s!=null&&Ke.unregister(i),Ke.register(i,o,i),Kt.set(i,o)),Ls){const l=Ne.get(o);l&&!l.includes(n)?l.push(n):Ne.set(o,[n])}return we(()=>{let l=o;return()=>{Ke&&(Ke.unregister(i),Kt.delete(i)),Ne.delete(l)}},[o]),a.useEffect(()=>{let l=n.current;return l&&r(l),()=>{l&&(n.current=null)}}),o}function Is(t,e){if(t===e)return t;let r=Ne.get(t);if(r)return r.forEach(o=>o.current=e),e;let n=Ne.get(e);return n?(n.forEach(o=>o.current=t),t):e}function Pt(...t){return t.length===1&&t[0]?t[0]:e=>{let r=!1;const n=t.map(o=>{const i=un(o,e);return r||=typeof i=="function",i});if(r)return()=>{n.forEach((o,i)=>{typeof o=="function"?o():un(t[i],null)})}}}function un(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}function oe(...t){let e={...t[0]};for(let r=1;r<t.length;r++){let n=t[r];for(let o in n){let i=e[o],s=n[o];typeof i=="function"&&typeof s=="function"&&o[0]==="o"&&o[1]==="n"&&o.charCodeAt(2)>=65&&o.charCodeAt(2)<=90?e[o]=Oe(i,s):(o==="className"||o==="UNSAFE_className")&&typeof i=="string"&&typeof s=="string"?e[o]=L(i,s):o==="id"&&i&&s?e.id=Is(i,s):o==="ref"&&i&&s?e.ref=Pt(i,s):e[o]=s!==void 0?s:i}}return e}function Lt(t){const e=a.useRef(null),r=a.useRef(void 0),n=a.useCallback(o=>{if(typeof t=="function"){const i=t,s=i(o);return()=>{typeof s=="function"?s():i(null)}}else if(t)return t.current=o,()=>{t.current=null}},[t]);return a.useMemo(()=>({get current(){return e.current},set current(o){e.current=o,r.current&&(r.current(),r.current=void 0),o!=null&&(r.current=n(o))}}),[n])}const Ms=Symbol("default");function Ds({values:t,children:e}){for(let[r,n]of t)e=a.createElement(r.Provider,{value:n},e);return e}function It(t){let{className:e,style:r,children:n,defaultClassName:o,defaultChildren:i,defaultStyle:s,values:l,render:c}=t;return a.useMemo(()=>{let d,p,u;return typeof e=="function"?d=e({...l,defaultClassName:o}):d=e,typeof r=="function"?p=r({...l,defaultStyle:s||{}}):p=r,typeof n=="function"?u=n({...l,defaultChildren:i}):n==null?u=i:u=n,{className:d??o,style:p||s?{...s,...p}:void 0,children:u??i,"data-rac":"",render:c?g=>c(g,l):void 0}},[e,r,n,o,i,s,l,c])}function fn(t,e){let r=a.useContext(t);if(e===null)return null;if(r&&typeof r=="object"&&"slots"in r&&r.slots){let n=e||Ms;if(!r.slots[n]){let o=new Intl.ListFormat().format(Object.keys(r.slots).map(s=>`"${s}"`)),i=e?`Invalid slot "${e}".`:"A slot prop is required.";throw new Error(`${i} Valid slot names are ${o}.`)}return r.slots[n]}return r}function Fs(t,e,r){let n=fn(r,t.slot)||{},{ref:o,...i}=n,s=Lt(a.useMemo(()=>Pt(e,o),[e,o])),l=oe(i,t);return"style"in i&&i.style&&"style"in t&&t.style&&(typeof i.style=="function"||typeof t.style=="function"?l.style=c=>{let d=typeof i.style=="function"?i.style(c):i.style,p={...c.defaultStyle,...d},u=typeof t.style=="function"?t.style({...c,defaultStyle:p}):t.style;return{...p,...u}}:l.style={...i.style,...t.style}),[l,s]}function As(t,e,r){let{render:n,...o}=e,i=a.useRef(null),s=a.useMemo(()=>Pt(r,i),[r,i]);we(()=>{process.env.NODE_ENV!=="production"&&n&&(i.current?i.current.localName!==t&&console.warn(`Unexpected DOM element returned by custom \`render\` function. Expected <${t}>, got <${i.current.localName}>. This may break the component behavior and accessibility.`):console.warn("Ref was not connected to DOM element returned by custom `render` function. Did you forget to pass through or merge the `ref`?"))},[t,n]);let l={...o,ref:s};return n?n(l,void 0):a.createElement(t,l)}const pn={},rt=new Proxy({},{get(t,e){if(typeof e!="string")return;let r=pn[e];return r||(r=a.forwardRef(As.bind(null,e)),pn[e]=r),r}}),Os="react-aria-clear-focus",_s="react-aria-focus",Q=t=>zs(t)?t.document:Bs(t)?t:t?.ownerDocument??(typeof document<"u"?document:void 0),le=t=>Q(t)?.defaultView??(typeof window<"u"?window:void 0);function hn(t){return t!==null&&typeof t=="object"&&"nodeType"in t&&typeof t.nodeType=="number"}function zs(t){return typeof t=="object"&&t!=null&&"window"in t&&t.window===t}function Bs(t){return hn(t)&&t.nodeType===9}function Vs(t){return hn(t)&&t.nodeType===11&&"host"in t}let Ws=!1;function nt(){return Ws}function j(t,e){if(!nt())return e&&t?t.contains(e):!1;if(!t||!e)return!1;let r=e;for(;r!==null;){if(r===t)return!0;typeof r.assignedElements!="function"&&r.assignedSlot?.parentNode?r=r.assignedSlot.parentNode:Vs(r)?r=r.host:r=r.parentNode}return!1}const ce=(t=document)=>{if(!nt())return t.activeElement;let e=t.activeElement;for(;e&&"shadowRoot"in e&&e.shadowRoot?.activeElement;)e=e.shadowRoot.activeElement;return e};function O(t){if(nt()&&t.target instanceof Element&&t.target.shadowRoot){if("composedPath"in t)return t.composedPath()[0]??null;if("composedPath"in t.nativeEvent)return t.nativeEvent.composedPath()[0]??null}return t.target}function bn(t){if(!t)return!1;let e=t.getRootNode(),r=le(t);if(!(e instanceof r.Document||e instanceof r.ShadowRoot))return!1;let n=e.activeElement;return n!=null&&t.contains(n)}function mn(t){let e=js(Q(t));e!==t&&(e&&Hs(e,t),t&&gn(t,e))}function Hs(t,e){t.dispatchEvent(new FocusEvent("blur",{relatedTarget:e})),t.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:e}))}function gn(t,e){t.dispatchEvent(new FocusEvent("focus",{relatedTarget:e})),t.dispatchEvent(new FocusEvent("focusin",{bubbles:!0,relatedTarget:e}))}function js(t){let e=ce(t),r=e?.getAttribute("aria-activedescendant");return r&&t.getElementById(r)||e}function ge(t){if(Gs())t.focus({preventScroll:!0});else{let e=Us(t);t.focus(),qs(e)}}let ot=null;function Gs(){if(ot==null){ot=!1;try{document.createElement("div").focus({get preventScroll(){return ot=!0,!0}})}catch{}}return ot}function Us(t){let e=t.parentNode,r=[],n=document.scrollingElement||document.documentElement;for(;e instanceof HTMLElement&&e!==n;)(e.offsetHeight<e.scrollHeight||e.offsetWidth<e.scrollWidth)&&r.push({element:e,scrollTop:e.scrollTop,scrollLeft:e.scrollLeft}),e=e.parentNode;return n instanceof HTMLElement&&r.push({element:n,scrollTop:n.scrollTop,scrollLeft:n.scrollLeft}),r}function qs(t){for(let{element:e,scrollTop:r,scrollLeft:n}of t)e.scrollTop=r,e.scrollLeft=n}const Ys=typeof Element<"u"&&"checkVisibility"in Element.prototype;function Xs(t){const e=le(t);if(!(t instanceof e.HTMLElement)&&!(t instanceof e.SVGElement))return!1;let{display:r,visibility:n}=t.style,o=r!=="none"&&n!=="hidden"&&n!=="collapse";if(o){const{getComputedStyle:i}=le(t);let{display:s,visibility:l}=i(t);o=s!=="none"&&l!=="hidden"&&l!=="collapse"}return o}function Zs(t,e){return!t.hasAttribute("hidden")&&!t.hasAttribute("data-react-aria-prevent-focus")&&(t.nodeName==="DETAILS"&&e&&e.nodeName!=="SUMMARY"?t.hasAttribute("open"):!0)}function Mt(t,e){return Ys?t.checkVisibility({visibilityProperty:!0})&&!t.closest("[data-react-aria-prevent-focus]"):t.nodeName!=="#comment"&&Xs(t)&&Zs(t,e)&&(!t.parentElement||Mt(t.parentElement,t))}const Dt=["input:not([disabled]):not([type=hidden])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable^="false"])',"permission"],Js=Dt.join(":not([hidden]),")+",[tabindex]:not([disabled]):not([hidden])";Dt.push('[tabindex]:not([tabindex="-1"]):not([disabled])');const Rs=Dt.join(':not([hidden]):not([tabindex="-1"]),');function yn(t,e){return t.matches(Js)&&!xn(t)&&(e?.skipVisibilityCheck||Mt(t))}function Ft(t){return t.matches(Rs)&&Mt(t)&&!xn(t)}function xn(t){let e=t;for(;e!=null;){if(e instanceof le(e).HTMLElement&&e.inert)return!0;e=e.parentElement}return!1}function At(t){let e=t;return e.nativeEvent=t,e.isDefaultPrevented=()=>e.defaultPrevented,e.isPropagationStopped=()=>e.cancelBubble,e.persist=()=>{},e}function vn(t,e){Object.defineProperty(t,"target",{value:e}),Object.defineProperty(t,"currentTarget",{value:e})}function wn(t){let e=a.useRef({isFocused:!1,observer:null});return we(()=>{const r=e.current;return()=>{r.observer&&(r.observer.disconnect(),r.observer=null)}},[]),a.useCallback(r=>{let n=O(r);if(n instanceof HTMLButtonElement||n instanceof HTMLInputElement||n instanceof HTMLTextAreaElement||n instanceof HTMLSelectElement){e.current.isFocused=!0;let o=n,i=s=>{if(e.current.isFocused=!1,o.disabled){let l=At(s);t?.(l)}e.current.observer&&(e.current.observer.disconnect(),e.current.observer=null)};o.addEventListener("focusout",i,{once:!0}),e.current.observer=new MutationObserver(()=>{if(e.current.isFocused&&o.disabled){e.current.observer?.disconnect();let s=o===ce()?null:ce();o.dispatchEvent(new FocusEvent("blur",{relatedTarget:s})),o.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:s}))}}),e.current.observer.observe(o,{attributes:!0,attributeFilter:["disabled"]})}},[t])}let it=!1;function En(t){for(;t&&!yn(t,{skipVisibilityCheck:!0});)t=t.parentElement;let e=le(t),r=e.document.activeElement;if(!r||r===t)return;it=!0;let n=!1,o=p=>{(O(p)===r||n)&&p.stopImmediatePropagation()},i=p=>{(O(p)===r||n)&&(p.stopImmediatePropagation(),!t&&!n&&(n=!0,ge(r),c()))},s=p=>{(O(p)===t||n)&&p.stopImmediatePropagation()},l=p=>{(O(p)===t||n)&&(p.stopImmediatePropagation(),n||(n=!0,ge(r),c()))};e.addEventListener("blur",o,!0),e.addEventListener("focusout",i,!0),e.addEventListener("focusin",l,!0),e.addEventListener("focus",s,!0);let c=()=>{cancelAnimationFrame(d),e.removeEventListener("blur",o,!0),e.removeEventListener("focusout",i,!0),e.removeEventListener("focusin",l,!0),e.removeEventListener("focus",s,!0),it=!1,n=!1},d=requestAnimationFrame(c);return c}function st(t){if(typeof window>"u"||window.navigator==null)return!1;let e=window.navigator.userAgentData?.brands;return Array.isArray(e)&&e.some(r=>t.test(r.brand))||t.test(window.navigator.userAgent)}function Ot(t){return typeof window<"u"&&window.navigator!=null?t.test(window.navigator.userAgentData?.platform||window.navigator.platform):!1}function he(t){if(process.env.NODE_ENV==="test")return t;let e=null;return()=>(e==null&&(e=t()),e)}const ue=he(function(){return Ot(/^Mac/i)}),Qs=he(function(){return Ot(/^iPhone/i)}),Sn=he(function(){return Ot(/^iPad/i)||ue()&&navigator.maxTouchPoints>1}),_e=he(function(){return Qs()||Sn()}),el=he(function(){return ue()||_e()}),Pe=he(function(){return st(/AppleWebKit/i)&&(_e()||!kn())});he(function(){return Pe()&&!kn()&&!Cn()});const kn=he(function(){return st(/Chrome|CriOS|CrMo/i)}),_t=he(function(){return st(/Android/i)}),Cn=he(function(){return st(/(Firefox|FxiOS)/i)});function zt(t){return t.pointerType===""&&t.isTrusted?!0:_t()&&t.pointerType?t.type==="click"&&t.buttons===1:t.detail===0&&!t.pointerType}function tl(t){return!_t()&&t.width===0&&t.height===0||_t()&&t.width===1&&t.height===1&&t.pressure===0&&t.detail===0&&t.pointerType==="mouse"}const rl=a.createContext({isNative:!0,open:ol,useHref:t=>t});function Bt(){return a.useContext(rl)}function ye(t,e,r=!0){let{metaKey:n,ctrlKey:o,altKey:i,shiftKey:s}=e;!Pe()&&Cn()&&window.event?.type?.startsWith("key")&&t.target==="_blank"&&(ue()?n=!0:o=!0);let l=Pe()&&ue()&&!Sn()&&process.env.NODE_ENV!=="test"?new KeyboardEvent("keydown",{keyIdentifier:"Enter",metaKey:n,ctrlKey:o,altKey:i,shiftKey:s}):new MouseEvent("click",{metaKey:n,ctrlKey:o,altKey:i,shiftKey:s,detail:1,bubbles:!0,cancelable:!0});ye.isOpening=r,ge(t),t.dispatchEvent(l),ye.isOpening=!1}ye.isOpening=!1;function nl(t,e){if(t instanceof HTMLAnchorElement)e(t);else if(t.hasAttribute("data-href")){let r=document.createElement("a");r.href=t.getAttribute("data-href"),t.hasAttribute("data-target")&&(r.target=t.getAttribute("data-target")),t.hasAttribute("data-rel")&&(r.rel=t.getAttribute("data-rel")),t.hasAttribute("data-download")&&(r.download=t.getAttribute("data-download")),t.hasAttribute("data-ping")&&(r.ping=t.getAttribute("data-ping")),t.hasAttribute("data-referrer-policy")&&(r.referrerPolicy=t.getAttribute("data-referrer-policy")),t.appendChild(r),e(r),t.removeChild(r)}}function ol(t,e){nl(t,r=>ye(r,e))}function il(t){const r=Bt().useHref(t?.href??"");let n={};if(t)for(let o of["href","target","rel","download","ping","referrerPolicy"])o in t&&t[o]!==void 0&&(n[o]=o==="href"?r:t[o]);return n}let Le=null;const Vt=new Set;let ze=new Map,$e=!1,Wt=!1;const sl={Tab:!0,Escape:!0};function Ht(t,e){for(let r of Vt)r(t,e)}function ll(t){return!(t.metaKey||!ue()&&t.altKey||t.ctrlKey||t.key==="Control"||t.key==="Shift"||t.key==="Meta")}function lt(t){$e=!0,!ye.isOpening&&ll(t)&&(Le="keyboard",Ht("keyboard",t))}function de(t){Le="pointer","pointerType"in t&&t.pointerType,(t.type==="mousedown"||t.type==="pointerdown")&&($e=!0,Ht("pointer",t))}function $n(t){!ye.isOpening&&zt(t)&&($e=!0,Le="virtual")}function Tn(t){let e=le(O(t)),r=Q(O(t));O(t)===e||O(t)===r||it||!t.isTrusted||(!$e&&!Wt&&(Le="virtual",Ht("virtual",t)),$e=!1,Wt=!1)}function Nn(){it||($e=!1,Wt=!0)}function jt(t){if(typeof window>"u"||typeof document>"u")return;const e=le(t),r=Q(t);if(ze.get(e))return;let n=e.HTMLElement.prototype.focus;Reflect.defineProperty(e.HTMLElement.prototype,"focus",{configurable:!0,writable:!0,value:function(){$e=!0,n.apply(this,arguments)}}),r.addEventListener("keydown",lt,!0),r.addEventListener("keyup",lt,!0),r.addEventListener("click",$n,!0),e.addEventListener("focus",Tn,!0),e.addEventListener("blur",Nn,!1),typeof PointerEvent<"u"?(r.addEventListener("pointerdown",de,!0),r.addEventListener("pointermove",de,!0),r.addEventListener("pointerup",de,!0)):process.env.NODE_ENV==="test"&&(r.addEventListener("mousedown",de,!0),r.addEventListener("mousemove",de,!0),r.addEventListener("mouseup",de,!0)),e.addEventListener("beforeunload",()=>{Kn(t)},{once:!0}),ze.set(e,{focus:n})}const Kn=(t,e)=>{const r=le(t),n=Q(t);e&&n.removeEventListener("DOMContentLoaded",e),ze.has(r)&&(Reflect.defineProperty(r.HTMLElement.prototype,"focus",{configurable:!0,writable:!0,value:ze.get(r).focus}),n.removeEventListener("keydown",lt,!0),n.removeEventListener("keyup",lt,!0),n.removeEventListener("click",$n,!0),r.removeEventListener("focus",Tn,!0),r.removeEventListener("blur",Nn,!1),typeof PointerEvent<"u"?(n.removeEventListener("pointerdown",de,!0),n.removeEventListener("pointermove",de,!0),n.removeEventListener("pointerup",de,!0)):process.env.NODE_ENV==="test"&&(n.removeEventListener("mousedown",de,!0),n.removeEventListener("mousemove",de,!0),n.removeEventListener("mouseup",de,!0)),ze.delete(r))};function al(t){const e=Q(t);let r;return e.readyState!=="loading"?jt(t):(r=()=>{jt(t)},e.addEventListener("DOMContentLoaded",r)),()=>Kn(t,r)}typeof document<"u"&&al();function Gt(){return Le!=="pointer"}function Ut(){return Le}const cl=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function dl(t,e,r){let n=r?O(r):void 0,o=Q(n),i=le(n);const s=typeof i<"u"?i.HTMLInputElement:HTMLInputElement,l=typeof i<"u"?i.HTMLTextAreaElement:HTMLTextAreaElement,c=typeof i<"u"?i.HTMLElement:HTMLElement,d=typeof i<"u"?i.KeyboardEvent:KeyboardEvent;let p=ce(o);return t=t||p instanceof s&&!cl.has(p.type)||p instanceof l||p instanceof c&&p.isContentEditable,!(t&&e==="keyboard"&&r instanceof d&&!sl[r.key])}function ul(t,e,r){jt(),a.useEffect(()=>{if(r?.enabled===!1)return;let n=(o,i)=>{dl(!!r?.isTextInput,o,i)&&t(Gt())};return Vt.add(n),()=>{Vt.delete(n)}},e)}function Be(t){return ue()?t.metaKey:t.ctrlKey}const fl=a.useInsertionEffect??we;function at(t){const e=a.useRef(null);return fl(()=>{e.current=t},[t]),a.useCallback((...r)=>{const n=e.current;return n?.(...r)},[])}function ct(t,e,r,n){let o=at(r),i=r==null;a.useEffect(()=>{if(i||!t.current)return;let s=t.current;return s.addEventListener(e,o,n),()=>{s.removeEventListener(e,o,n)}},[t,e,n,i])}function pl(t,e){let{id:r,"aria-label":n,"aria-labelledby":o}=t;return r=tt(r),o&&n?o=[...new Set([r,...o.trim().split(/\s+/)])].join(" "):o&&(o=o.trim().split(/\s+/).join(" ")),!n&&!o&&e&&(n=e),{id:r,"aria-label":n,"aria-labelledby":o}}const hl=new Set(["Arab","Syrc","Samr","Mand","Thaa","Mend","Nkoo","Adlm","Rohg","Hebr"]),bl=new Set(["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"]);function ml(t){if(Intl.Locale){let r=new Intl.Locale(t).maximize(),n=typeof r.getTextInfo=="function"?r.getTextInfo():r.textInfo;if(n)return n.direction==="rtl";if(r.script)return hl.has(r.script)}let e=t.split("-")[0];return bl.has(e)}const Pn=Symbol.for("react-aria.i18n.locale");function Ln(){let t=typeof window<"u"&&window[Pn]||typeof navigator<"u"&&(navigator.language||navigator.userLanguage)||"en-US";try{Intl.DateTimeFormat.supportedLocalesOf([t])}catch{t="en-US"}return{locale:t,direction:ml(t)?"rtl":"ltr"}}let qt=Ln(),Ve=new Set;function In(){qt=Ln();for(let t of Ve)t(qt)}function gl(){let t=et(),[e,r]=a.useState(qt);return a.useEffect(()=>(Ve.size===0&&window.addEventListener("languagechange",In),Ve.add(r),()=>{Ve.delete(r),Ve.size===0&&window.removeEventListener("languagechange",In)}),[]),t?{locale:typeof window<"u"&&window[Pn]||"en-US",direction:"ltr"}:e}const yl=a.createContext(null);function Mn(){let t=gl();return a.useContext(yl)||t}const xl=typeof document<"u"?a.useInsertionEffect??a.useLayoutEffect:()=>{};function Dn(t,e,r){let[n,o]=a.useState(t||e),i=a.useRef(n),s=a.useRef(t!==void 0),l=t!==void 0;a.useEffect(()=>{let u=s.current;u!==l&&process.env.NODE_ENV!=="production"&&console.warn(`WARN: A component changed from ${u?"controlled":"uncontrolled"} to ${l?"controlled":"uncontrolled"}.`),s.current=l},[l]);let c=l?t:n;xl(()=>{i.current=c});let[,d]=a.useReducer(()=>({}),{}),p=a.useCallback((u,...g)=>{let b=typeof u=="function"?u(i.current):u;Object.is(i.current,b)||(i.current=b,o(b),d(),r?.(b,...g))},[r]);return[c,p]}class We{constructor(e){this.value=null,this.level=0,this.hasChildNodes=!1,this.rendered=null,this.textValue="",this["aria-label"]=void 0,this.index=0,this.parentKey=null,this.prevKey=null,this.nextKey=null,this.firstChildKey=null,this.lastChildKey=null,this.props={},this.colSpan=null,this.colIndex=null,this.type=this.constructor.type,this.key=e}get childNodes(){throw new Error("childNodes is not supported")}clone(){let e=new this.constructor(this.key);return e.value=this.value,e.level=this.level,e.hasChildNodes=this.hasChildNodes,e.rendered=this.rendered,e.textValue=this.textValue,e["aria-label"]=this["aria-label"],e.index=this.index,e.parentKey=this.parentKey,e.prevKey=this.prevKey,e.nextKey=this.nextKey,e.firstChildKey=this.firstChildKey,e.lastChildKey=this.lastChildKey,e.props=this.props,e.render=this.render,e.colSpan=this.colSpan,e.colIndex=this.colIndex,e}filter(e,r,n){let o=this.clone();return r.addDescendants(o,e),o}}class Fn extends We{filter(e,r,n){let[o,i]=Bn(e,r,this.firstChildKey,n),s=this.clone();return s.firstChildKey=o,s.lastChildKey=i,s}}const xr=class xr extends We{};xr.type="header";let An=xr;const vr=class vr extends We{};vr.type="loader";let On=vr;const wr=class wr extends Fn{filter(e,r,n){if(n(this.textValue,this)){let o=this.clone();return r.addDescendants(o,e),o}return null}};wr.type="item";let _n=wr;const Er=class Er extends Fn{filter(e,r,n){let o=super.filter(e,r,n);if(o&&o.lastChildKey!==null){let i=e.getItem(o.lastChildKey);if(i&&i.type!=="header")return o}return null}};Er.type="section";let zn=Er;class vl{get size(){return this.itemCount}getKeys(){return this.keyMap.keys()}*[Symbol.iterator](){let e=this.firstKey!=null?this.keyMap.get(this.firstKey):void 0;for(;e;)yield e,e=e.nextKey!=null?this.keyMap.get(e.nextKey):void 0}getChildren(e){let r=this.keyMap;return{*[Symbol.iterator](){let n=r.get(e),o=n?.firstChildKey!=null?r.get(n.firstChildKey):null;for(;o;)yield o,o=o.nextKey!=null?r.get(o.nextKey):void 0}}}getKeyBefore(e){let r=this.keyMap.get(e);if(!r)return null;if(r.prevKey!=null){for(r=this.keyMap.get(r.prevKey);r&&r.type!=="item"&&r.lastChildKey!=null;)r=this.keyMap.get(r.lastChildKey);return r?.key??null}return r.parentKey}getKeyAfter(e){let r=this.keyMap.get(e);if(!r)return null;if(r.type!=="item"&&r.firstChildKey!=null)return r.firstChildKey;for(;r;){if(r.nextKey!=null)return r.nextKey;if(r.parentKey!=null)r=this.keyMap.get(r.parentKey);else return null}return null}getFirstKey(){return this.firstKey}getLastKey(){let e=this.lastKey!=null?this.keyMap.get(this.lastKey):null;for(;e?.lastChildKey!=null;)e=this.keyMap.get(e.lastChildKey);return e?.key??null}getItem(e){return this.keyMap.get(e)??null}at(){throw new Error("Not implemented")}clone(){let e=this.constructor,r=new e;return r.keyMap=new Map(this.keyMap),r.firstKey=this.firstKey,r.lastKey=this.lastKey,r.itemCount=this.itemCount,r}addNode(e){if(this.frozen)throw new Error("Cannot add a node to a frozen collection");e.type==="item"&&this.keyMap.get(e.key)==null&&this.itemCount++,this.keyMap.set(e.key,e)}addDescendants(e,r){this.addNode(e);let n=r.getChildren(e.key);for(let o of n)this.addDescendants(o,r)}removeNode(e){if(this.frozen)throw new Error("Cannot remove a node to a frozen collection");let r=this.keyMap.get(e);r!=null&&r.type==="item"&&this.itemCount--,this.keyMap.delete(e)}commit(e,r,n=!1){if(this.frozen)throw new Error("Cannot commit a frozen collection");this.firstKey=e,this.lastKey=r,this.frozen=!n}filter(e){let r=new this.constructor,[n,o]=Bn(this,r,this.firstKey,e);return r?.commit(n,o),r}constructor(){this.keyMap=new Map,this.firstKey=null,this.lastKey=null,this.frozen=!1,this.itemCount=0}}function Bn(t,e,r,n){if(r==null)return[null,null];let o=null,i=null,s=t.getItem(r);for(;s!=null;){let l=s.filter(t,e,n);l!=null&&(l.nextKey=null,i&&(l.prevKey=i.key,i.nextKey=l.key),o==null&&(o=l),e.addNode(l),i=l),s=s.nextKey!=null?t.getItem(s.nextKey):null}if(i&&i.type==="separator"){let l=i.prevKey;e.removeNode(i.key),l!=null?(i=e.getItem(l),i.nextKey=null):i=null}return[o?.key??null,i?.key??null]}class Vn{constructor(e){this._firstChild=null,this._lastChild=null,this._previousSibling=null,this._nextSibling=null,this._parentNode=null,this._minInvalidChildIndex=null,this.ownerDocument=e}*[Symbol.iterator](){let e=this.firstChild;for(;e;)yield e,e=e.nextSibling}get firstChild(){return this._firstChild}set firstChild(e){this._firstChild=e,this.ownerDocument.markDirty(this)}get lastChild(){return this._lastChild}set lastChild(e){this._lastChild=e,this.ownerDocument.markDirty(this)}get previousSibling(){return this._previousSibling}set previousSibling(e){this._previousSibling=e,this.ownerDocument.markDirty(this)}get nextSibling(){return this._nextSibling}set nextSibling(e){this._nextSibling=e,this.ownerDocument.markDirty(this)}get parentNode(){return this._parentNode}set parentNode(e){this._parentNode=e,this.ownerDocument.markDirty(this)}get isConnected(){return this.parentNode?.isConnected||!1}invalidateChildIndices(e){(this._minInvalidChildIndex==null||!this._minInvalidChildIndex.isConnected||e.index<this._minInvalidChildIndex.index)&&(this._minInvalidChildIndex=e,this.ownerDocument.markDirty(this))}updateChildIndices(){let e=this._minInvalidChildIndex;for(;e;)e.index=e.previousSibling?e.previousSibling.index+1:0,e=e.nextSibling;this._minInvalidChildIndex=null}appendChild(e){e.parentNode&&e.parentNode.removeChild(e),this.firstChild==null&&(this.firstChild=e),this.lastChild?(this.lastChild.nextSibling=e,e.index=this.lastChild.index+1,e.previousSibling=this.lastChild):(e.previousSibling=null,e.index=0),e.parentNode=this,e.nextSibling=null,this.lastChild=e,this.ownerDocument.markDirty(this),this.isConnected&&this.ownerDocument.queueUpdate()}insertBefore(e,r){if(r==null)return this.appendChild(e);e.parentNode&&e.parentNode.removeChild(e),e.nextSibling=r,e.previousSibling=r.previousSibling,e.index=r.index-1,this.firstChild===r?this.firstChild=e:r.previousSibling&&(r.previousSibling.nextSibling=e),r.previousSibling=e,e.parentNode=r.parentNode,this.invalidateChildIndices(e),this.isConnected&&this.ownerDocument.queueUpdate()}removeChild(e){e.parentNode===this&&(this._minInvalidChildIndex===e&&(this._minInvalidChildIndex=null),e.nextSibling&&(this.invalidateChildIndices(e.nextSibling),e.nextSibling.previousSibling=e.previousSibling),e.previousSibling&&(e.previousSibling.nextSibling=e.nextSibling),this.firstChild===e&&(this.firstChild=e.nextSibling),this.lastChild===e&&(this.lastChild=e.previousSibling),e.parentNode=null,e.nextSibling=null,e.previousSibling=null,e.index=0,this.ownerDocument.markDirty(e),this.isConnected&&this.ownerDocument.queueUpdate())}addEventListener(){}removeEventListener(){}get previousVisibleSibling(){let e=this.previousSibling;for(;e&&e.isHidden;)e=e.previousSibling;return e}get nextVisibleSibling(){let e=this.nextSibling;for(;e&&e.isHidden;)e=e.nextSibling;return e}get firstVisibleChild(){let e=this.firstChild;for(;e&&e.isHidden;)e=e.nextSibling;return e}get lastVisibleChild(){let e=this.lastChild;for(;e&&e.isHidden;)e=e.previousSibling;return e}}class Ie extends Vn{constructor(e,r){super(r),this.nodeType=8,this.isMutated=!0,this._index=0,this.isHidden=!1,this.node=null}get index(){return this._index}set index(e){this._index=e,this.ownerDocument.markDirty(this)}get level(){return this.parentNode instanceof Ie?this.parentNode.level+(this.parentNode.node?.type==="item"?1:0):0}getMutableNode(){return this.node==null?null:(this.isMutated||(this.node=this.node.clone(),this.isMutated=!0),this.ownerDocument.markDirty(this),this.node)}updateNode(){let e=this.nextVisibleSibling,r=this.getMutableNode();if(r!=null&&(r.index=this.index,r.level=this.level,r.parentKey=this.parentNode instanceof Ie?this.parentNode.node?.key??null:null,r.prevKey=this.previousVisibleSibling?.node?.key??null,r.nextKey=e?.node?.key??null,r.hasChildNodes=!!this.firstChild,r.firstChildKey=this.firstVisibleChild?.node?.key??null,r.lastChildKey=this.lastVisibleChild?.node?.key??null,(r.colSpan!=null||r.colIndex!=null)&&e)){let n=(r.colIndex??r.index)+(r.colSpan??1);if(e.node!=null&&n!==e.node.colIndex){let o=e.getMutableNode();o.colIndex=n}}}setProps(e,r,n,o,i){let s,{value:l,textValue:c,id:d,...p}=e;if(this.node==null?(s=new n(d??`react-aria-${++this.ownerDocument.nodeId}`),this.node=s):s=this.getMutableNode(),p.ref=r,s.props=p,s.rendered=o,s.render=i,s.value=l,e["aria-label"]&&(s["aria-label"]=e["aria-label"]),s.textValue=c||(typeof p.children=="string"?p.children:"")||e["aria-label"]||"",d!=null&&d!==s.key)throw new Error("Cannot change the id of an item");p.colSpan!=null&&(s.colSpan=p.colSpan),this.isConnected&&this.ownerDocument.queueUpdate()}get style(){let e=this;return{get display(){return e.isHidden?"none":""},set display(r){let n=r==="none";if(e.isHidden!==n){(e.parentNode?.firstVisibleChild===e||e.parentNode?.lastVisibleChild===e)&&e.ownerDocument.markDirty(e.parentNode);let o=e.previousVisibleSibling,i=e.nextVisibleSibling;o&&e.ownerDocument.markDirty(o),i&&e.ownerDocument.markDirty(i),e.isHidden=n,e.ownerDocument.markDirty(e)}}}}hasAttribute(){}setAttribute(){}setAttributeNS(){}removeAttribute(){}}class wl extends Vn{constructor(e){super(null),this.nodeType=11,this.ownerDocument=this,this.dirtyNodes=new Set,this.isSSR=!1,this.nodeId=0,this.nodesByProps=new WeakMap,this.nextCollection=null,this.subscriptions=new Set,this.queuedRender=!1,this.inSubscription=!1,this.collection=e,this.nextCollection=e}get isConnected(){return!0}createElement(e){return new Ie(e,this)}getMutableCollection(){return this.nextCollection||(this.nextCollection=this.collection.clone()),this.nextCollection}markDirty(e){this.dirtyNodes.add(e)}addNode(e){if(e.isHidden||e.node==null)return;let r=this.getMutableCollection();if(!r.getItem(e.node.key))for(let n of e)this.addNode(n);r.addNode(e.node)}removeNode(e){for(let r of e)this.removeNode(r);e.node&&this.getMutableCollection().removeNode(e.node.key)}getCollection(){return this.inSubscription?this.collection:(this.queuedRender=!1,this.updateCollection(),this.collection)}updateCollection(){for(let e of this.dirtyNodes)e instanceof Ie&&(!e.isConnected||e.isHidden)?this.removeNode(e):e.updateChildIndices();for(let e of this.dirtyNodes)e instanceof Ie?(e.isConnected&&!e.isHidden&&(e.updateNode(),this.addNode(e)),e.node&&this.dirtyNodes.delete(e),e.isMutated=!1):this.dirtyNodes.delete(e);this.nextCollection&&(this.nextCollection.commit(this.firstVisibleChild?.node?.key??null,this.lastVisibleChild?.node?.key??null,this.isSSR),this.isSSR||(this.collection=this.nextCollection,this.nextCollection=null))}queueUpdate(){if(!(this.dirtyNodes.size===0||this.queuedRender)){this.queuedRender=!0,this.inSubscription=!0,this.isSSR||(this.collection=this.collection.clone());for(let e of this.subscriptions)e();this.inSubscription=!1}}subscribe(e){return this.subscriptions.add(e),this.queuedRender&&e(),()=>this.subscriptions.delete(e)}resetAfterSSR(){this.isSSR&&(this.isSSR=!1,this.firstChild=null,this.lastChild=null,this.nodeId=0)}}function Wn(t){let{children:e,items:r,idScope:n,addIdAndValue:o,dependencies:i=[]}=t,s=a.useMemo(()=>process.env.NODE_ENV!=="production"&&typeof e=="function"?e.toString():void 0,[e]),l=a.useMemo(()=>new WeakMap,[...i,s]);return a.useMemo(()=>{if(r&&typeof e=="function"){let c=[];for(let d of r){let p=El(d)?d:null,u=p?l.get(p):null;if(!u){u=e(d);let g=u.props.id??d?.key??d?.id;n!=null&&u.props.id==null&&g!=null&&(g=n+":"+g);let b=g??c.length;u=a.cloneElement(u,o?{key:b,id:g,value:d}:{key:b}),p&&l.set(p,u)}c.push(u)}return c}else if(typeof e!="function")return e},[e,r,l,n,o])}function El(t){switch(typeof t){case"object":return t!=null;case"function":case"symbol":return!0;default:return!1}}let Ee=new Map,Yt=new Set;function Hn(){if(typeof window>"u")return;function t(n){return"propertyName"in n}let e=n=>{let o=O(n);if(!t(n)||!o)return;let i=Ee.get(o);i||(i=new Set,Ee.set(o,i),o.addEventListener("transitioncancel",r,{once:!0})),i.add(n.propertyName)},r=n=>{let o=O(n);if(!t(n)||!o)return;let i=Ee.get(o);if(i&&(i.delete(n.propertyName),i.size===0&&(o.removeEventListener("transitioncancel",r),Ee.delete(o)),Ee.size===0)){for(let s of Yt)s();Yt.clear()}};document.body.addEventListener("transitionrun",e),document.body.addEventListener("transitionend",r)}typeof document<"u"&&(document.readyState!=="loading"?Hn():document.addEventListener("DOMContentLoaded",Hn));function Sl(){for(const[t]of Ee)"isConnected"in t&&!t.isConnected&&Ee.delete(t)}function jn(t){requestAnimationFrame(()=>{Sl(),Ee.size===0?t():Yt.add(t)})}function dt(t){if(!t.isConnected)return;const e=Q(t);if(Ut()==="virtual"){let r=ce(e);jn(()=>{const n=ce(e);(n===r||n===e.body)&&t.isConnected&&ge(t)})}else ge(t)}function Gn(t){let{isDisabled:e,onFocus:r,onBlur:n,onFocusChange:o}=t;const i=a.useCallback(c=>{if(O(c)===c.currentTarget)return n&&n(c),o&&o(!1),!0},[n,o]),s=wn(i),l=a.useCallback(c=>{let d=O(c);const p=Q(d),u=p?ce(p):ce();d===c.currentTarget&&d===u&&(r&&r(c),o&&o(!0),s(c))},[o,r,s]);return{focusProps:{onFocus:!e&&(r||o||n)?l:void 0,onBlur:!e&&(n||o)?i:void 0}}}function ut(t){if(t)return e=>{let r=!0,n={...e,preventDefault(){e.preventDefault()},isDefaultPrevented(){return e.isDefaultPrevented()},stopPropagation(){r&&process.env.NODE_ENV!=="production"?console.error("stopPropagation is now the default behavior for events in React Spectrum. You can use continuePropagation() to revert this behavior."):r=!0},continuePropagation(){r=!1,typeof e.continuePropagation=="function"&&e.continuePropagation()},isPropagationStopped(){return r}};t(n),r&&!(typeof e.isPropagationStopped=="function"&&e.isPropagationStopped())&&e.stopPropagation()}}const kl=new Set(["shift","alt","control","meta","mod"]),Cl=["Alt","Control","Meta","Shift"];function $l(t){let e=new Set;return t.alt&&e.add("Alt"),t.shift&&e.add("Shift"),t.ctrl&&e.add("Control"),t.meta&&e.add("Meta"),t.mod&&e.add(ue()?"Meta":"Control"),e}function Tl(t){let e=new Set;return t.altKey&&e.add("Alt"),t.ctrlKey&&e.add("Control"),t.metaKey&&e.add("Meta"),t.shiftKey&&e.add("Shift"),e}function Un(t){return Cl.filter(e=>t.has(e))}function Nl(t){let e=t.split("+").reduce((r,n)=>{let o=n.toLowerCase();return kl.has(o)?o==="shift"?r.shift=!0:o==="alt"?r.alt=!0:o==="control"?r.ctrl=!0:o==="meta"?r.meta=!0:o==="mod"&&(r.mod=!0):r.key=n,r},{shift:!1,alt:!1,ctrl:!1,meta:!1,mod:!1,key:""});if(e.key==="")throw new Error(`Invalid keyboard shortcut: "${t}". Must include exactly one non-modifier key (e.g. "a", "Enter", "ArrowDown"). Combine any of Shift, Alt, Ctrl, Meta, and Mod.`);return e}function qn(t){return t.toLowerCase()}const Kl={space:" ",esc:"escape",del:"delete",ins:"insert",left:"arrowleft",right:"arrowright",up:"arrowup",down:"arrowdown",pageup:"pageup",pagedown:"pagedown"};function Pl(t){let e=qn(t),r=Kl[e];return r??e}function Ll(t){let e=Un($l(t)),r=Pl(t.key);return e.length>0?`${e.join("+")}+${r}`:r}function Il(t){let e=Un(Tl(t)),r=qn(t.key);return(e.length>0?`${e.join("+")}+`:"")+r}function Ml(t){let e=new Map;for(let[r,n]of Object.entries(t)){let o=Nl(r);e.set(Ll(o),n)}return r=>{let n=Il(r),o=e.get(n),i=o?.(r);i===void 0&&o!==void 0?i={shouldContinuePropagation:!1,shouldPreventDefault:!0}:typeof i=="boolean"&&(i={shouldContinuePropagation:!i,shouldPreventDefault:i}),i?.shouldPreventDefault&&r.preventDefault(),(!o||i?.shouldContinuePropagation)&&r.continuePropagation()}}function Xt(t){let{shortcuts:e,allowRepeats:r=!1,allowComposing:n=!1}=t,o,i;if(e){let s=Ml(e),l=ut(d=>{if(!j(d.currentTarget,O(d))){d.continuePropagation();return}if(d.nativeEvent?.repeat&&!r||d.nativeEvent?.isComposing&&!n){d.continuePropagation();return}s(d)}),c=ut(d=>{if(!j(d.currentTarget,O(d))){d.continuePropagation();return}if(d.nativeEvent?.repeat&&!r||d.nativeEvent?.isComposing&&!n){d.continuePropagation();return}d.continuePropagation()});o=t.onKeyDown?Oe(t.onKeyDown,l):l,i=t.onKeyUp?Oe(t.onKeyUp,c):c}else o=ut(t.onKeyDown),i=ut(t.onKeyUp);return{keyboardProps:t.isDisabled?{}:{onKeyDown:o,onKeyUp:i}}}function Yn(t,e){we(()=>{if(t&&t.ref&&e)return t.ref.current=e.current,()=>{t.ref&&(t.ref.current=null)}})}let Zt=a.createContext(null);function Dl(t){let e=a.useContext(Zt)||{};Yn(e,t);let{ref:r,...n}=e;return n}function Fl(t,e){let{focusProps:r}=Gn(t),{keyboardProps:n}=Xt(t),o=oe(r,n),i=Dl(e),s=t.isDisabled?{}:i,l=a.useRef(t.autoFocus);a.useEffect(()=>{l.current&&e.current&&dt(e.current),l.current=!1},[e]);let c=t.excludeFromTabOrder?-1:0;return t.isDisabled&&(c=void 0),{focusableProps:oe({...o,tabIndex:c},s)}}typeof HTMLTemplateElement<"u"&&(Object.defineProperty(HTMLTemplateElement.prototype,"firstChild",{configurable:!0,enumerable:!0,get:function(){return this.content.firstChild}}),Object.defineProperty(HTMLTemplateElement.prototype,"appendChild",{configurable:!0,enumerable:!0,value:function(t){return this.content.appendChild(t)}}),Object.defineProperty(HTMLTemplateElement.prototype,"removeChild",{configurable:!0,enumerable:!0,value:function(t){return this.content.removeChild(t)}}),Object.defineProperty(HTMLTemplateElement.prototype,"insertBefore",{configurable:!0,enumerable:!0,value:function(t,e){return this.content.insertBefore(t,e)}}));const Xn=a.createContext(!1);function Al(t){if(a.useContext(Xn))return a.createElement(a.Fragment,null,t.children);let r=a.createElement(Xn.Provider,{value:!0},t.children);return a.createElement("template",null,r)}var ft={exports:{}},Jt={};var Zn;function Ol(){if(Zn)return Jt;Zn=1;var t=a;function e(u,g){return u===g&&(u!==0||1/u===1/g)||u!==u&&g!==g}var r=typeof Object.is=="function"?Object.is:e,n=t.useState,o=t.useEffect,i=t.useLayoutEffect,s=t.useDebugValue;function l(u,g){var b=g(),v=n({inst:{value:b,getSnapshot:g}}),x=v[0].inst,w=v[1];return i(function(){x.value=b,x.getSnapshot=g,c(x)&&w({inst:x})},[u,b,g]),o(function(){return c(x)&&w({inst:x}),u(function(){c(x)&&w({inst:x})})},[u]),s(b),b}function c(u){var g=u.getSnapshot;u=u.value;try{var b=g();return!r(u,b)}catch{return!0}}function d(u,g){return g()}var p=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?d:l;return Jt.useSyncExternalStore=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:p,Jt}var Rt={};var Jn;function _l(){return Jn||(Jn=1,process.env.NODE_ENV!=="production"&&(function(){function t(b,v){return b===v&&(b!==0||1/b===1/v)||b!==b&&v!==v}function e(b,v){p||o.startTransition===void 0||(p=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var x=v();if(!u){var w=v();i(x,w)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),u=!0)}w=s({inst:{value:x,getSnapshot:v}});var k=w[0].inst,S=w[1];return c(function(){k.value=x,k.getSnapshot=v,r(k)&&S({inst:k})},[b,x,v]),l(function(){return r(k)&&S({inst:k}),b(function(){r(k)&&S({inst:k})})},[b]),d(x),x}function r(b){var v=b.getSnapshot;b=b.value;try{var x=v();return!i(b,x)}catch{return!0}}function n(b,v){return v()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var o=a,i=typeof Object.is=="function"?Object.is:t,s=o.useState,l=o.useEffect,c=o.useLayoutEffect,d=o.useDebugValue,p=!1,u=!1,g=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?n:e;Rt.useSyncExternalStore=o.useSyncExternalStore!==void 0?o.useSyncExternalStore:g,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),Rt}var Rn;function zl(){return Rn||(Rn=1,process.env.NODE_ENV==="production"?ft.exports=Ol():ft.exports=_l()),ft.exports}var Bl=zl();const Qn=a.createContext(!1),He=a.createContext(null);function Vl(t){if(a.useContext(He))return t.content;let{collection:r,document:n}=Gl(t.createCollection);return a.createElement(a.Fragment,null,a.createElement(Al,null,a.createElement(He.Provider,{value:n},t.content)),a.createElement(Wl,{render:t.children,collection:r}))}function Wl({collection:t,render:e}){return e(t)}function Hl(t,e,r){let n=et(),o=a.useRef(n);o.current=n;let i=a.useCallback(()=>o.current?r():e(),[e,r]);return Bl.useSyncExternalStore(t,i)}const jl=typeof a.useSyncExternalStore=="function"?a.useSyncExternalStore:Hl;function Gl(t){let[e]=a.useState(()=>new wl(t?.()||new vl)),r=a.useCallback(s=>e.subscribe(s),[e]),n=a.useCallback(()=>{let s=e.getCollection();return e.isSSR&&e.resetAfterSSR(),s},[e]),o=a.useCallback(()=>(e.isSSR=!0,e.getCollection()),[e]);return{collection:jl(r,n,o),document:e}}const Qt=a.createContext(null);function Ul(t){var r;return r=class extends We{},r.type=t,r}function ql(t,e,r,n,o,i){typeof t=="string"&&(t=Ul(t));let s=a.useCallback(c=>{c?.setProps(e,r,t,n,i)},[e,r,n,i,t]),l=a.useContext(Qt);if(l){let c=l.ownerDocument.nodesByProps.get(e);return c||(c=l.ownerDocument.createElement(t.type),c.setProps(e,r,t,n,i),l.appendChild(c),l.ownerDocument.updateCollection(),l.ownerDocument.nodesByProps.set(e,c)),o?a.createElement(Qt.Provider,{value:c},o):null}return a.createElement(t.type,{ref:s},o)}function Yl(t,e){let r=({node:o})=>e(o.props,o.props.ref,o),n=a.forwardRef((o,i)=>{let s=a.useContext(Zt);if(!a.useContext(Qn)){if(e.length>=3)throw new Error(e.name+" cannot be rendered outside a collection.");return e(o,i)}return ql(t,o,i,"children"in o?o.children:null,null,c=>a.createElement(Zt.Provider,{value:s},a.createElement(r,{node:c})))});return n.displayName=e.name,n}function Xl(t){return Wn({...t,addIdAndValue:!0})}const eo=a.createContext(null);function Zl(t){let e=a.useContext(eo),r=(e?.dependencies||[]).concat(t.dependencies),n=t.idScope??e?.idScope,o=Xl({...t,idScope:n,dependencies:r});return a.useContext(He)&&(o=a.createElement(Jl,null,o)),e=a.useMemo(()=>({dependencies:r,idScope:n}),[n,...r]),a.createElement(eo.Provider,{value:e},o)}function Jl({children:t}){let e=a.useContext(He),r=a.useMemo(()=>a.createElement(He.Provider,{value:null},a.createElement(Qn.Provider,{value:!0},t)),[t]);return et()?a.createElement(Qt.Provider,{value:e},r):Ue.createPortal(r,e)}const Rl={CollectionRoot({collection:t,renderDropIndicator:e}){return to(t,null,e)},CollectionBranch({collection:t,parent:e,renderDropIndicator:r}){return to(t,e,r)}};function to(t,e,r){return Wn({items:e?t.getChildren(e.key):t,dependencies:[r],children(n){if(n.type==="content")return a.createElement(a.Fragment,null);let o=n.render(n);return!r||n.type!=="item"?o:a.createElement(a.Fragment,null,r({type:"item",key:n.key,dropPosition:"before"}),o,Ql(t,n,r))}})}function Ql(t,e,r){let n=e.key,o=t.getKeyAfter(n),i=o!=null?t.getItem(o):null;for(;i!=null&&i.type!=="item";)o=t.getKeyAfter(i.key),i=o!=null?t.getItem(o):null;let s=e.nextKey!=null?t.getItem(e.nextKey):null;for(;s!=null&&s.type!=="item";)s=s.nextKey!=null?t.getItem(s.nextKey):null;let l=[];if(s==null){let c=e;for(;c?.type==="item"&&(!i||c.parentKey!==i.parentKey&&i.level<c.level);){let d=r({type:"item",key:c.key,dropPosition:"after"});a.isValidElement(d)&&l.push(a.cloneElement(d,{key:`${c.key}-after`})),c=c.parentKey!=null?t.getItem(c.parentKey):null}}return l}const ea=a.createContext(Rl);function ta(t){return a.useMemo(()=>t!=null?new Set([t]):null,[t])}const ra=new Set(["id"]),na=new Set(["aria-label","aria-labelledby","aria-describedby","aria-details"]),oa=new Set(["href","hrefLang","target","rel","download","ping","referrerPolicy"]),ia=new Set(["dir","lang","hidden","inert","translate"]),ro=new Set(["onClick","onAuxClick","onContextMenu","onDoubleClick","onMouseDown","onMouseEnter","onMouseLeave","onMouseMove","onMouseOut","onMouseOver","onMouseUp","onTouchCancel","onTouchEnd","onTouchMove","onTouchStart","onPointerDown","onPointerMove","onPointerUp","onPointerCancel","onPointerEnter","onPointerLeave","onPointerOver","onPointerOut","onGotPointerCapture","onLostPointerCapture","onScroll","onWheel","onAnimationStart","onAnimationEnd","onAnimationIteration","onTransitionCancel","onTransitionEnd","onTransitionRun","onTransitionStart"]),sa=/^(data-.*)$/;function pt(t,e={}){let{labelable:r,isLink:n,global:o,events:i=o,propNames:s}=e,l={};for(const c in t)Object.prototype.hasOwnProperty.call(t,c)&&(ra.has(c)||r&&na.has(c)||n&&oa.has(c)||o&&ia.has(c)||i&&(ro.has(c)||c.endsWith("Capture")&&ro.has(c.slice(0,-7)))||s?.has(c)||sa.test(c))&&(l[c]=t[c]);return l}let Me="default",er="",ht=new WeakMap;function no(t){if(_e()&&Pe()){if(Me==="default"){const e=Q(t);er=e.documentElement.style.webkitUserSelect,e.documentElement.style.webkitUserSelect="none"}Me="disabled"}else if(t instanceof HTMLElement||t instanceof SVGElement){let e="userSelect"in t.style?"userSelect":"webkitUserSelect";ht.set(t,t.style[e]),t.style[e]="none"}}function tr(t){if(_e()&&Pe()){if(Me!=="disabled")return;Me="restoring",setTimeout(()=>{jn(()=>{if(Me==="restoring"){const e=Q(t);e.documentElement.style.webkitUserSelect==="none"&&(e.documentElement.style.webkitUserSelect=er||""),er="",Me="default"}})},300)}else if((t instanceof HTMLElement||t instanceof SVGElement)&&t&&ht.has(t)){let e=ht.get(t),r="userSelect"in t.style?"userSelect":"webkitUserSelect";t.style[r]==="none"&&(t.style[r]=e),t.getAttribute("style")===""&&t.removeAttribute("style"),ht.delete(t)}}function oo(t){return t?.defaultView?.__webpack_nonce__||globalThis.__webpack_nonce__||void 0}let rr=new WeakMap;function la(t){let e=t??(typeof document<"u"?document:void 0);if(!e)return oo(e);if(rr.has(e))return rr.get(e);let r=e.querySelector('meta[property="csp-nonce"]'),n=r&&r instanceof le(r).HTMLMetaElement&&(r.nonce||r.content)||oo(e)||void 0;return n!==void 0&&rr.set(e,n),n}const io=a.createContext({register:()=>{}});io.displayName="PressResponderContext";function bt(){let t=a.useRef(new Map),e=a.useCallback((o,i,s,l)=>{let c=l?.once?(...d)=>{t.current.delete(s),s(...d)}:s;t.current.set(s,{type:i,eventTarget:o,fn:c,options:l}),o.addEventListener(i,c,l)},[]),r=a.useCallback((o,i,s,l)=>{let c=t.current.get(s)?.fn||s;o.removeEventListener(i,c,l),t.current.delete(s)},[]),n=a.useCallback(()=>{t.current.forEach((o,i)=>{r(o.eventTarget,o.type,i,o.options)})},[r]);return a.useEffect(()=>n,[n]),{addGlobalListener:e,removeGlobalListener:r,removeAllGlobalListeners:n}}function aa(t){let e=a.useContext(io);if(e){let{register:r,ref:n,...o}=e;t=oe(o,t),r()}return Yn(e,t.ref),t}class mt{#e;constructor(e,r,n,o){this.#e=!0;const s=(o?.target??n.currentTarget)?.getBoundingClientRect();let l,c=0,d,p=null;n.clientX!=null&&n.clientY!=null&&(d=n.clientX,p=n.clientY),s&&(d!=null&&p!=null?(l=d-s.left,c=p-s.top):(l=s.width/2,c=s.height/2)),this.type=e,this.pointerType=r,this.target=n.currentTarget,this.shiftKey=n.shiftKey,this.metaKey=n.metaKey,this.ctrlKey=n.ctrlKey,this.altKey=n.altKey,this.x=l,this.y=c,this.key=n.key}continuePropagation(){this.#e=!1}get shouldStopPropagation(){return this.#e}}const so=Symbol("linkClicked"),lo="react-aria-pressable-style",ao="data-react-aria-pressable";function co(t){let{onPress:e,onPressChange:r,onPressStart:n,onPressEnd:o,onPressUp:i,onClick:s,isDisabled:l,isPressed:c,preventFocusOnPress:d,shouldCancelOnPointerExit:p,allowTextSelectionOnPress:u,ref:g,...b}=aa(t),[v,x]=a.useState(!1),w=a.useRef({isPressed:!1,ignoreEmulatedMouseEvents:!1,didFirePressStart:!1,isTriggeringEvent:!1,activePointerId:null,target:null,isOverTarget:!1,pointerType:null,disposables:[]}),{addGlobalListener:k,removeAllGlobalListeners:S}=bt(),T=a.useCallback((h,P)=>{let V=w.current;if(l||V.didFirePressStart)return!1;let $=!0;if(V.isTriggeringEvent=!0,n){let U=new mt("pressstart",P,h);n(U),$=U.shouldStopPropagation}return r&&r(!0),V.isTriggeringEvent=!1,V.didFirePressStart=!0,x(!0),$},[l,n,r]),F=a.useCallback((h,P,V=!0)=>{let $=w.current;if(!$.didFirePressStart)return!1;$.didFirePressStart=!1,$.isTriggeringEvent=!0;let U=!0;if(o){let m=new mt("pressend",P,h);o(m),U=m.shouldStopPropagation}if(r&&r(!1),x(!1),e&&V&&!l){let m=new mt("press",P,h);e(m),U&&=m.shouldStopPropagation}return $.isTriggeringEvent=!1,U},[l,o,r,e]),q=at(F),_=a.useCallback((h,P)=>{let V=w.current;if(l)return!1;if(i){V.isTriggeringEvent=!0;let $=new mt("pressup",P,h);return i($),V.isTriggeringEvent=!1,$.shouldStopPropagation}return!0},[l,i]),z=at(_),C=a.useCallback(h=>{let P=w.current;if(P.isPressed&&P.target){P.didFirePressStart&&P.pointerType!=null&&F(Te(P.target,h),P.pointerType,!1),P.isPressed=!1,P.isOverTarget=!1,P.activePointerId=null,P.pointerType=null,S(),u||tr(P.target);for(let V of P.disposables)V();P.disposables=[]}},[u,S,F]),B=at(C);a.useEffect(()=>{l&&w.current.isPressed&&B({currentTarget:w.current.target,shiftKey:!1,ctrlKey:!1,metaKey:!1,altKey:!1})},[l]);let J=a.useCallback(h=>{p&&C(h)},[p,C]),Z=a.useCallback(h=>{l||s?.(h)},[l,s]),X=a.useCallback((h,P)=>{if(!l&&s){let V=new MouseEvent("click",h);vn(V,P),s(At(V))}},[l,s]),Y=a.useMemo(()=>{let h=w.current,P={onKeyDown($){if(or($.nativeEvent,$.currentTarget)&&j($.currentTarget,O($))){po(O($),$.key)&&$.preventDefault();let U=!0;!h.isPressed&&!$.repeat&&(h.target=$.currentTarget,h.isPressed=!0,h.pointerType="keyboard",U=T($,"keyboard"));let m=$.currentTarget,y=A=>{or(A,m)&&!A.repeat&&j(m,O(A))&&h.target&&z(Te(h.target,A),"keyboard")};k(Q($.currentTarget),"keyup",Oe(y,V),!0),U&&$.stopPropagation(),$.metaKey&&ue()&&h.metaKeyEvents?.set($.key,$.nativeEvent)}else $.key==="Meta"&&(h.metaKeyEvents=new Map)},onClick($){if(!($&&!j($.currentTarget,O($)))&&$&&$.button===0&&!h.isTriggeringEvent&&!ye.isOpening){let U=!0;if(l&&$.preventDefault(),!h.ignoreEmulatedMouseEvents&&!h.isPressed&&(h.pointerType==="virtual"||zt($.nativeEvent))){let m=T($,"virtual"),y=z($,"virtual"),A=q($,"virtual");Z($),U=m&&y&&A}else if(h.isPressed&&h.pointerType!=="keyboard"){let m=h.pointerType||$.nativeEvent.pointerType||"virtual",y=z(Te($.currentTarget,$),m),A=q(Te($.currentTarget,$),m,!0);U=y&&A,h.isOverTarget=!1,Z($),B($)}h.ignoreEmulatedMouseEvents=!1,U&&$.stopPropagation()}}},V=$=>{if(h.isPressed&&h.target&&or($,h.target)){po(O($),$.key)&&$.preventDefault();let U=O($),m=j(h.target,U);q(Te(h.target,$),"keyboard",m),m&&X($,h.target),S(),$.key!=="Enter"&&nr(h.target)&&j(h.target,U)&&!$[so]&&($[so]=!0,ye(h.target,$,!1)),h.isPressed=!1,h.metaKeyEvents?.delete($.key)}else if($.key==="Meta"&&h.metaKeyEvents?.size){let U=h.metaKeyEvents;h.metaKeyEvents=void 0;for(let m of U.values())h.target?.dispatchEvent(new KeyboardEvent("keyup",m))}};if(typeof PointerEvent<"u"){P.onPointerDown=m=>{if(m.button!==0||!j(m.currentTarget,O(m)))return;if(tl(m.nativeEvent)){h.pointerType="virtual";return}h.pointerType=m.pointerType;let y=!0;if(!h.isPressed){h.isPressed=!0,h.isOverTarget=!0,h.activePointerId=m.pointerId,h.target=m.currentTarget,u||no(h.target),y=T(m,h.pointerType);let A=O(m);"releasePointerCapture"in A&&("hasPointerCapture"in A?A.hasPointerCapture(m.pointerId)&&A.releasePointerCapture(m.pointerId):A.releasePointerCapture(m.pointerId)),k(Q(m.currentTarget),"pointerup",$,!1),k(Q(m.currentTarget),"pointercancel",U,!1)}y&&m.stopPropagation()},P.onMouseDown=m=>{if(j(m.currentTarget,O(m))&&m.button===0){if(d){let y=En(m.target);y&&h.disposables.push(y)}m.stopPropagation()}},P.onPointerUp=m=>{!j(m.currentTarget,O(m))||h.pointerType==="virtual"||m.button===0&&!h.isPressed&&z(m,h.pointerType||m.pointerType)},P.onPointerEnter=m=>{m.pointerId===h.activePointerId&&h.target&&!h.isOverTarget&&h.pointerType!=null&&(h.isOverTarget=!0,T(Te(h.target,m),h.pointerType))},P.onPointerLeave=m=>{m.pointerId===h.activePointerId&&h.target&&h.isOverTarget&&h.pointerType!=null&&(h.isOverTarget=!1,q(Te(h.target,m),h.pointerType,!1),J(m))};let $=m=>{if(m.pointerId===h.activePointerId&&h.isPressed&&m.button===0&&h.target){if(j(h.target,O(m))&&h.pointerType!=null){let y=!1,A=setTimeout(()=>{h.isPressed&&h.target instanceof HTMLElement&&(y?B(m):(ge(h.target),h.target.click()))},80);k(m.currentTarget,"click",()=>y=!0,!0),h.disposables.push(()=>clearTimeout(A))}else B(m);h.isOverTarget=!1}},U=m=>{B(m)};P.onDragStart=m=>{j(m.currentTarget,O(m))&&B(m)}}else if(process.env.NODE_ENV==="test"){P.onMouseDown=m=>{if(m.button!==0||!j(m.currentTarget,O(m)))return;if(h.ignoreEmulatedMouseEvents){m.stopPropagation();return}if(h.isPressed=!0,h.isOverTarget=!0,h.target=m.currentTarget,h.pointerType=zt(m.nativeEvent)?"virtual":"mouse",Ue.flushSync(()=>T(m,h.pointerType))&&m.stopPropagation(),d){let A=En(m.target);A&&h.disposables.push(A)}k(Q(m.currentTarget),"mouseup",$,!1)},P.onMouseEnter=m=>{if(!j(m.currentTarget,O(m)))return;let y=!0;h.isPressed&&!h.ignoreEmulatedMouseEvents&&h.pointerType!=null&&(h.isOverTarget=!0,y=T(m,h.pointerType)),y&&m.stopPropagation()},P.onMouseLeave=m=>{if(!j(m.currentTarget,O(m)))return;let y=!0;h.isPressed&&!h.ignoreEmulatedMouseEvents&&h.pointerType!=null&&(h.isOverTarget=!1,y=q(m,h.pointerType,!1),J(m)),y&&m.stopPropagation()},P.onMouseUp=m=>{j(m.currentTarget,O(m))&&!h.ignoreEmulatedMouseEvents&&m.button===0&&!h.isPressed&&z(m,h.pointerType||"mouse")};let $=m=>{if(m.button===0){if(h.ignoreEmulatedMouseEvents){h.ignoreEmulatedMouseEvents=!1;return}h.target&&j(h.target,O(m))&&h.pointerType!=null||B(m),h.isOverTarget=!1}};P.onTouchStart=m=>{if(!j(m.currentTarget,O(m)))return;let y=ca(m.nativeEvent);if(!y)return;h.activePointerId=y.identifier,h.ignoreEmulatedMouseEvents=!0,h.isOverTarget=!0,h.isPressed=!0,h.target=m.currentTarget,h.pointerType="touch",u||no(h.target),T(Se(h.target,m),h.pointerType)&&m.stopPropagation(),k(le(m.currentTarget),"scroll",U,!0)},P.onTouchMove=m=>{if(!j(m.currentTarget,O(m)))return;if(!h.isPressed){m.stopPropagation();return}let y=uo(m.nativeEvent,h.activePointerId),A=!0;y&&fo(y,m.currentTarget)?!h.isOverTarget&&h.pointerType!=null&&(h.isOverTarget=!0,A=T(Se(h.target,m),h.pointerType)):h.isOverTarget&&h.pointerType!=null&&(h.isOverTarget=!1,A=q(Se(h.target,m),h.pointerType,!1),J(Se(h.target,m))),A&&m.stopPropagation()},P.onTouchEnd=m=>{if(!j(m.currentTarget,O(m)))return;if(!h.isPressed){m.stopPropagation();return}let y=uo(m.nativeEvent,h.activePointerId),A=!0;y&&fo(y,m.currentTarget)&&h.pointerType!=null?(z(Se(h.target,m),h.pointerType),A=q(Se(h.target,m),h.pointerType),X(m.nativeEvent,h.target)):h.isOverTarget&&h.pointerType!=null&&(A=q(Se(h.target,m),h.pointerType,!1)),A&&m.stopPropagation(),h.isPressed=!1,h.activePointerId=null,h.isOverTarget=!1,h.ignoreEmulatedMouseEvents=!0,h.target&&!u&&tr(h.target),S()},P.onTouchCancel=m=>{j(m.currentTarget,O(m))&&(m.stopPropagation(),h.isPressed&&B(Se(h.target,m)))};let U=m=>{h.isPressed&&j(O(m),h.target)&&B({currentTarget:h.target,shiftKey:!1,ctrlKey:!1,metaKey:!1,altKey:!1})};P.onDragStart=m=>{j(m.currentTarget,O(m))&&B(m)}}return P},[k,l,d,S,u,J,T,Z,X]);return a.useEffect(()=>{if(!g||process.env.NODE_ENV==="test")return;const h=Q(g.current);if(!h||!h.head||h.getElementById(lo))return;const P=h.createElement("style");P.id=lo;let V=la(h);V&&(P.nonce=V),P.textContent=`
1
+ (function(G,a){typeof exports=="object"&&typeof module<"u"?a(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],a):(G=typeof globalThis<"u"?globalThis:G||self,a(G.CekatUI={},G.React$1,G.$3wX5A$reactdom))})(this,(function(G,a,Ue){"use strict";function Ro(t){const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const r in t)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(e,r,n.get?n:{enumerable:!0,get:()=>t[r]})}}return e.default=t,Object.freeze(e)}const f=Ro(a);function kr(t){var e,r,n="";if(typeof t=="string"||typeof t=="number")n+=t;else if(typeof t=="object")if(Array.isArray(t)){var o=t.length;for(e=0;e<o;e++)t[e]&&(r=kr(t[e]))&&(n&&(n+=" "),n+=r)}else for(r in t)t[r]&&(n&&(n+=" "),n+=r);return n}function P(){for(var t,e,r=0,n="",o=arguments.length;r<o;r++)(t=arguments[r])&&(e=kr(t))&&(n&&(n+=" "),n+=e);return n}const Qo=(t,e)=>{const r=new Array(t.length+e.length);for(let n=0;n<t.length;n++)r[n]=t[n];for(let n=0;n<e.length;n++)r[t.length+n]=e[n];return r},ei=(t,e)=>({classGroupId:t,validator:e}),Cr=(t=new Map,e=null,r)=>({nextPart:t,validators:e,classGroupId:r}),qe="-",$r=[],ti="arbitrary..",ri=t=>{const e=oi(t),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=t;return{getClassGroupId:s=>{if(s.startsWith("[")&&s.endsWith("]"))return ni(s);const l=s.split(qe),c=l[0]===""&&l.length>1?1:0;return Tr(l,c,e)},getConflictingClassGroupIds:(s,l)=>{if(l){const c=n[s],d=r[s];return c?d?Qo(d,c):c:d||$r}return r[s]||$r}}},Tr=(t,e,r)=>{if(t.length-e===0)return r.classGroupId;const o=t[e],i=r.nextPart.get(o);if(i){const d=Tr(t,e+1,i);if(d)return d}const s=r.validators;if(s===null)return;const l=e===0?t.join(qe):t.slice(e).join(qe),c=s.length;for(let d=0;d<c;d++){const p=s[d];if(p.validator(l))return p.classGroupId}},ni=t=>t.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const e=t.slice(1,-1),r=e.indexOf(":"),n=e.slice(0,r);return n?ti+n:void 0})(),oi=t=>{const{theme:e,classGroups:r}=t;return ii(r,e)},ii=(t,e)=>{const r=Cr();for(const n in t){const o=t[n];Et(o,r,n,e)}return r},Et=(t,e,r,n)=>{const o=t.length;for(let i=0;i<o;i++){const s=t[i];si(s,e,r,n)}},si=(t,e,r,n)=>{if(typeof t=="string"){li(t,e,r);return}if(typeof t=="function"){ai(t,e,r,n);return}ci(t,e,r,n)},li=(t,e,r)=>{const n=t===""?e:Nr(e,t);n.classGroupId=r},ai=(t,e,r,n)=>{if(di(t)){Et(t(n),e,r,n);return}e.validators===null&&(e.validators=[]),e.validators.push(ei(r,t))},ci=(t,e,r,n)=>{const o=Object.entries(t),i=o.length;for(let s=0;s<i;s++){const[l,c]=o[s];Et(c,Nr(e,l),r,n)}},Nr=(t,e)=>{let r=t;const n=e.split(qe),o=n.length;for(let i=0;i<o;i++){const s=n[i];let l=r.nextPart.get(s);l||(l=Cr(),r.nextPart.set(s,l)),r=l}return r},di=t=>"isThemeGetter"in t&&t.isThemeGetter===!0,ui=t=>{if(t<1)return{get:()=>{},set:()=>{}};let e=0,r=Object.create(null),n=Object.create(null);const o=(i,s)=>{r[i]=s,e++,e>t&&(e=0,n=r,r=Object.create(null))};return{get(i){let s=r[i];if(s!==void 0)return s;if((s=n[i])!==void 0)return o(i,s),s},set(i,s){i in r?r[i]=s:o(i,s)}}},St="!",Kr=":",fi=[],Pr=(t,e,r,n,o)=>({modifiers:t,hasImportantModifier:e,baseClassName:r,maybePostfixModifierPosition:n,isExternal:o}),pi=t=>{const{prefix:e,experimentalParseClassName:r}=t;let n=o=>{const i=[];let s=0,l=0,c=0,d;const p=o.length;for(let x=0;x<p;x++){const w=o[x];if(s===0&&l===0){if(w===Kr){i.push(o.slice(c,x)),c=x+1;continue}if(w==="/"){d=x;continue}}w==="["?s++:w==="]"?s--:w==="("?l++:w===")"&&l--}const u=i.length===0?o:o.slice(c);let g=u,b=!1;u.endsWith(St)?(g=u.slice(0,-1),b=!0):u.startsWith(St)&&(g=u.slice(1),b=!0);const v=d&&d>c?d-c:void 0;return Pr(i,b,g,v)};if(e){const o=e+Kr,i=n;n=s=>s.startsWith(o)?i(s.slice(o.length)):Pr(fi,!1,s,void 0,!0)}if(r){const o=n;n=i=>r({className:i,parseClassName:o})}return n},hi=t=>{const e=new Map;return t.orderSensitiveModifiers.forEach((r,n)=>{e.set(r,1e6+n)}),r=>{const n=[];let o=[];for(let i=0;i<r.length;i++){const s=r[i],l=s[0]==="[",c=e.has(s);l||c?(o.length>0&&(o.sort(),n.push(...o),o=[]),n.push(s)):o.push(s)}return o.length>0&&(o.sort(),n.push(...o)),n}},bi=t=>({cache:ui(t.cacheSize),parseClassName:pi(t),sortModifiers:hi(t),postfixLookupClassGroupIds:mi(t),...ri(t)}),mi=t=>{const e=Object.create(null),r=t.postfixLookupClassGroups;if(r)for(let n=0;n<r.length;n++)e[r[n]]=!0;return e},gi=/\s+/,yi=(t,e)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:o,sortModifiers:i,postfixLookupClassGroupIds:s}=e,l=[],c=t.trim().split(gi);let d="";for(let p=c.length-1;p>=0;p-=1){const u=c[p],{isExternal:g,modifiers:b,hasImportantModifier:v,baseClassName:x,maybePostfixModifierPosition:w}=r(u);if(g){d=u+(d.length>0?" "+d:d);continue}let k=!!w,S;if(k){const z=x.substring(0,w);S=n(z);const C=S&&s[S]?n(x):void 0;C&&C!==S&&(S=C,k=!1)}else S=n(x);if(!S){if(!k){d=u+(d.length>0?" "+d:d);continue}if(S=n(x),!S){d=u+(d.length>0?" "+d:d);continue}k=!1}const T=b.length===0?"":b.length===1?b[0]:i(b).join(":"),F=v?T+St:T,q=F+S;if(l.indexOf(q)>-1)continue;l.push(q);const _=o(S,k);for(let z=0;z<_.length;++z){const C=_[z];l.push(F+C)}d=u+(d.length>0?" "+d:d)}return d},xi=(...t)=>{let e=0,r,n,o="";for(;e<t.length;)(r=t[e++])&&(n=Lr(r))&&(o&&(o+=" "),o+=n);return o},Lr=t=>{if(typeof t=="string")return t;let e,r="";for(let n=0;n<t.length;n++)t[n]&&(e=Lr(t[n]))&&(r&&(r+=" "),r+=e);return r},vi=(t,...e)=>{let r,n,o,i;const s=c=>{const d=e.reduce((p,u)=>u(p),t());return r=bi(d),n=r.cache.get,o=r.cache.set,i=l,l(c)},l=c=>{const d=n(c);if(d)return d;const p=yi(c,r);return o(c,p),p};return i=s,(...c)=>i(xi(...c))},wi=[],te=t=>{const e=r=>r[t]||wi;return e.isThemeGetter=!0,e},Ir=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Mr=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Ei=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,Si=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,ki=/\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$/,Ci=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,$i=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Ti=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,xe=t=>Ei.test(t),H=t=>!!t&&!Number.isNaN(Number(t)),pe=t=>!!t&&Number.isInteger(Number(t)),kt=t=>t.endsWith("%")&&H(t.slice(0,-1)),me=t=>Si.test(t),Dr=()=>!0,Ni=t=>ki.test(t)&&!Ci.test(t),Ct=()=>!1,Ki=t=>$i.test(t),Pi=t=>Ti.test(t),Li=t=>!M(t)&&!D(t),Ii=t=>t.startsWith("@container")&&(t[10]==="/"&&t[11]!==void 0||t[11]==="s"&&t[16]!==void 0&&t.startsWith("-size/",10)||t[11]==="n"&&t[18]!==void 0&&t.startsWith("-normal/",10)),Mi=t=>ve(t,Br,Ct),M=t=>Ir.test(t),ke=t=>ve(t,Vr,Ni),Fr=t=>ve(t,Vi,H),Di=t=>ve(t,Hr,Dr),Fi=t=>ve(t,Wr,Ct),Ar=t=>ve(t,_r,Ct),Ai=t=>ve(t,zr,Pi),Ye=t=>ve(t,jr,Ki),D=t=>Mr.test(t),Fe=t=>Ce(t,Vr),Oi=t=>Ce(t,Wr),Or=t=>Ce(t,_r),_i=t=>Ce(t,Br),zi=t=>Ce(t,zr),Xe=t=>Ce(t,jr,!0),Bi=t=>Ce(t,Hr,!0),ve=(t,e,r)=>{const n=Ir.exec(t);return n?n[1]?e(n[1]):r(n[2]):!1},Ce=(t,e,r=!1)=>{const n=Mr.exec(t);return n?n[1]?e(n[1]):r:!1},_r=t=>t==="position"||t==="percentage",zr=t=>t==="image"||t==="url",Br=t=>t==="length"||t==="size"||t==="bg-size",Vr=t=>t==="length",Vi=t=>t==="number",Wr=t=>t==="family-name",Hr=t=>t==="number"||t==="weight",jr=t=>t==="shadow",Wi=vi(()=>{const t=te("color"),e=te("font"),r=te("text"),n=te("font-weight"),o=te("tracking"),i=te("leading"),s=te("breakpoint"),l=te("container"),c=te("spacing"),d=te("radius"),p=te("shadow"),u=te("inset-shadow"),g=te("text-shadow"),b=te("drop-shadow"),v=te("blur"),x=te("perspective"),w=te("aspect"),k=te("ease"),S=te("animate"),T=()=>["auto","avoid","all","avoid-page","page","left","right","column"],F=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],q=()=>[...F(),D,M],_=()=>["auto","hidden","clip","visible","scroll"],z=()=>["auto","contain","none"],C=()=>[D,M,c],B=()=>[xe,"full","auto",...C()],J=()=>[pe,"none","subgrid",D,M],Z=()=>["auto",{span:["full",pe,D,M]},pe,D,M],X=()=>[pe,"auto",D,M],Y=()=>["auto","min","max","fr",D,M],h=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],L=()=>["start","end","center","stretch","center-safe","end-safe"],V=()=>["auto",...C()],$=()=>[xe,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...C()],U=()=>[xe,"screen","full","dvw","lvw","svw","min","max","fit",...C()],m=()=>[xe,"screen","full","lh","dvh","lvh","svh","min","max","fit",...C()],y=()=>[t,D,M],A=()=>[...F(),Or,Ar,{position:[D,M]}],ie=()=>["no-repeat",{repeat:["","x","y","space","round"]}],ae=()=>["auto","cover","contain",_i,Mi,{size:[D,M]}],se=()=>[kt,Fe,ke],E=()=>["","none","full",d,D,M],W=()=>["",H,Fe,ke],ne=()=>["solid","dashed","dotted","double"],be=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],ee=()=>[H,kt,Or,Ar],wt=()=>["","none",v,D,M],K=()=>["none",H,D,M],N=()=>["none",H,D,M],re=()=>[H,D,M],R=()=>[xe,"full",...C()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[me],breakpoint:[me],color:[Dr],container:[me],"drop-shadow":[me],ease:["in","out","in-out"],font:[Li],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[me],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[me],shadow:[me],spacing:["px",H],text:[me],"text-shadow":[me],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",xe,M,D,w]}],container:["container"],"container-type":[{"@container":["","normal","size",D,M]}],"container-named":[Ii],columns:[{columns:[H,M,D,l]}],"break-after":[{"break-after":T()}],"break-before":[{"break-before":T()}],"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"],sr:["sr-only","not-sr-only"],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:q()}],overflow:[{overflow:_()}],"overflow-x":[{"overflow-x":_()}],"overflow-y":[{"overflow-y":_()}],overscroll:[{overscroll:z()}],"overscroll-x":[{"overscroll-x":z()}],"overscroll-y":[{"overscroll-y":z()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:B()}],"inset-x":[{"inset-x":B()}],"inset-y":[{"inset-y":B()}],start:[{"inset-s":B(),start:B()}],end:[{"inset-e":B(),end:B()}],"inset-bs":[{"inset-bs":B()}],"inset-be":[{"inset-be":B()}],top:[{top:B()}],right:[{right:B()}],bottom:[{bottom:B()}],left:[{left:B()}],visibility:["visible","invisible","collapse"],z:[{z:[pe,"auto",D,M]}],basis:[{basis:[xe,"full","auto",l,...C()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[H,xe,"auto","initial","none",M]}],grow:[{grow:["",H,D,M]}],shrink:[{shrink:["",H,D,M]}],order:[{order:[pe,"first","last","none",D,M]}],"grid-cols":[{"grid-cols":J()}],"col-start-end":[{col:Z()}],"col-start":[{"col-start":X()}],"col-end":[{"col-end":X()}],"grid-rows":[{"grid-rows":J()}],"row-start-end":[{row:Z()}],"row-start":[{"row-start":X()}],"row-end":[{"row-end":X()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":Y()}],"auto-rows":[{"auto-rows":Y()}],gap:[{gap:C()}],"gap-x":[{"gap-x":C()}],"gap-y":[{"gap-y":C()}],"justify-content":[{justify:[...h(),"normal"]}],"justify-items":[{"justify-items":[...L(),"normal"]}],"justify-self":[{"justify-self":["auto",...L()]}],"align-content":[{content:["normal",...h()]}],"align-items":[{items:[...L(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...L(),{baseline:["","last"]}]}],"place-content":[{"place-content":h()}],"place-items":[{"place-items":[...L(),"baseline"]}],"place-self":[{"place-self":["auto",...L()]}],p:[{p:C()}],px:[{px:C()}],py:[{py:C()}],ps:[{ps:C()}],pe:[{pe:C()}],pbs:[{pbs:C()}],pbe:[{pbe:C()}],pt:[{pt:C()}],pr:[{pr:C()}],pb:[{pb:C()}],pl:[{pl:C()}],m:[{m:V()}],mx:[{mx:V()}],my:[{my:V()}],ms:[{ms:V()}],me:[{me:V()}],mbs:[{mbs:V()}],mbe:[{mbe:V()}],mt:[{mt:V()}],mr:[{mr:V()}],mb:[{mb:V()}],ml:[{ml:V()}],"space-x":[{"space-x":C()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":C()}],"space-y-reverse":["space-y-reverse"],size:[{size:$()}],"inline-size":[{inline:["auto",...U()]}],"min-inline-size":[{"min-inline":["auto",...U()]}],"max-inline-size":[{"max-inline":["none",...U()]}],"block-size":[{block:["auto",...m()]}],"min-block-size":[{"min-block":["auto",...m()]}],"max-block-size":[{"max-block":["none",...m()]}],w:[{w:[l,"screen",...$()]}],"min-w":[{"min-w":[l,"screen","none",...$()]}],"max-w":[{"max-w":[l,"screen","none","prose",{screen:[s]},...$()]}],h:[{h:["screen","lh",...$()]}],"min-h":[{"min-h":["screen","lh","none",...$()]}],"max-h":[{"max-h":["screen","lh",...$()]}],"font-size":[{text:["base",r,Fe,ke]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,Bi,Di]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",kt,M]}],"font-family":[{font:[Oi,Fi,e]}],"font-features":[{"font-features":[M]}],"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:[o,D,M]}],"line-clamp":[{"line-clamp":[H,"none",D,Fr]}],leading:[{leading:[i,...C()]}],"list-image":[{"list-image":["none",D,M]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",D,M]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:y()}],"text-color":[{text:y()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ne(),"wavy"]}],"text-decoration-thickness":[{decoration:[H,"from-font","auto",D,ke]}],"text-decoration-color":[{decoration:y()}],"underline-offset":[{"underline-offset":[H,"auto",D,M]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:C()}],"tab-size":[{tab:[pe,D,M]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",D,M]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",D,M]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:A()}],"bg-repeat":[{bg:ie()}],"bg-size":[{bg:ae()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},pe,D,M],radial:["",D,M],conic:[pe,D,M]},zi,Ai]}],"bg-color":[{bg:y()}],"gradient-from-pos":[{from:se()}],"gradient-via-pos":[{via:se()}],"gradient-to-pos":[{to:se()}],"gradient-from":[{from:y()}],"gradient-via":[{via:y()}],"gradient-to":[{to:y()}],rounded:[{rounded:E()}],"rounded-s":[{"rounded-s":E()}],"rounded-e":[{"rounded-e":E()}],"rounded-t":[{"rounded-t":E()}],"rounded-r":[{"rounded-r":E()}],"rounded-b":[{"rounded-b":E()}],"rounded-l":[{"rounded-l":E()}],"rounded-ss":[{"rounded-ss":E()}],"rounded-se":[{"rounded-se":E()}],"rounded-ee":[{"rounded-ee":E()}],"rounded-es":[{"rounded-es":E()}],"rounded-tl":[{"rounded-tl":E()}],"rounded-tr":[{"rounded-tr":E()}],"rounded-br":[{"rounded-br":E()}],"rounded-bl":[{"rounded-bl":E()}],"border-w":[{border:W()}],"border-w-x":[{"border-x":W()}],"border-w-y":[{"border-y":W()}],"border-w-s":[{"border-s":W()}],"border-w-e":[{"border-e":W()}],"border-w-bs":[{"border-bs":W()}],"border-w-be":[{"border-be":W()}],"border-w-t":[{"border-t":W()}],"border-w-r":[{"border-r":W()}],"border-w-b":[{"border-b":W()}],"border-w-l":[{"border-l":W()}],"divide-x":[{"divide-x":W()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":W()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ne(),"hidden","none"]}],"divide-style":[{divide:[...ne(),"hidden","none"]}],"border-color":[{border:y()}],"border-color-x":[{"border-x":y()}],"border-color-y":[{"border-y":y()}],"border-color-s":[{"border-s":y()}],"border-color-e":[{"border-e":y()}],"border-color-bs":[{"border-bs":y()}],"border-color-be":[{"border-be":y()}],"border-color-t":[{"border-t":y()}],"border-color-r":[{"border-r":y()}],"border-color-b":[{"border-b":y()}],"border-color-l":[{"border-l":y()}],"divide-color":[{divide:y()}],"outline-style":[{outline:[...ne(),"none","hidden"]}],"outline-offset":[{"outline-offset":[H,D,M]}],"outline-w":[{outline:["",H,Fe,ke]}],"outline-color":[{outline:y()}],shadow:[{shadow:["","none",p,Xe,Ye]}],"shadow-color":[{shadow:y()}],"inset-shadow":[{"inset-shadow":["none",u,Xe,Ye]}],"inset-shadow-color":[{"inset-shadow":y()}],"ring-w":[{ring:W()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:y()}],"ring-offset-w":[{"ring-offset":[H,ke]}],"ring-offset-color":[{"ring-offset":y()}],"inset-ring-w":[{"inset-ring":W()}],"inset-ring-color":[{"inset-ring":y()}],"text-shadow":[{"text-shadow":["none",g,Xe,Ye]}],"text-shadow-color":[{"text-shadow":y()}],opacity:[{opacity:[H,D,M]}],"mix-blend":[{"mix-blend":[...be(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":be()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[H]}],"mask-image-linear-from-pos":[{"mask-linear-from":ee()}],"mask-image-linear-to-pos":[{"mask-linear-to":ee()}],"mask-image-linear-from-color":[{"mask-linear-from":y()}],"mask-image-linear-to-color":[{"mask-linear-to":y()}],"mask-image-t-from-pos":[{"mask-t-from":ee()}],"mask-image-t-to-pos":[{"mask-t-to":ee()}],"mask-image-t-from-color":[{"mask-t-from":y()}],"mask-image-t-to-color":[{"mask-t-to":y()}],"mask-image-r-from-pos":[{"mask-r-from":ee()}],"mask-image-r-to-pos":[{"mask-r-to":ee()}],"mask-image-r-from-color":[{"mask-r-from":y()}],"mask-image-r-to-color":[{"mask-r-to":y()}],"mask-image-b-from-pos":[{"mask-b-from":ee()}],"mask-image-b-to-pos":[{"mask-b-to":ee()}],"mask-image-b-from-color":[{"mask-b-from":y()}],"mask-image-b-to-color":[{"mask-b-to":y()}],"mask-image-l-from-pos":[{"mask-l-from":ee()}],"mask-image-l-to-pos":[{"mask-l-to":ee()}],"mask-image-l-from-color":[{"mask-l-from":y()}],"mask-image-l-to-color":[{"mask-l-to":y()}],"mask-image-x-from-pos":[{"mask-x-from":ee()}],"mask-image-x-to-pos":[{"mask-x-to":ee()}],"mask-image-x-from-color":[{"mask-x-from":y()}],"mask-image-x-to-color":[{"mask-x-to":y()}],"mask-image-y-from-pos":[{"mask-y-from":ee()}],"mask-image-y-to-pos":[{"mask-y-to":ee()}],"mask-image-y-from-color":[{"mask-y-from":y()}],"mask-image-y-to-color":[{"mask-y-to":y()}],"mask-image-radial":[{"mask-radial":[D,M]}],"mask-image-radial-from-pos":[{"mask-radial-from":ee()}],"mask-image-radial-to-pos":[{"mask-radial-to":ee()}],"mask-image-radial-from-color":[{"mask-radial-from":y()}],"mask-image-radial-to-color":[{"mask-radial-to":y()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":F()}],"mask-image-conic-pos":[{"mask-conic":[H]}],"mask-image-conic-from-pos":[{"mask-conic-from":ee()}],"mask-image-conic-to-pos":[{"mask-conic-to":ee()}],"mask-image-conic-from-color":[{"mask-conic-from":y()}],"mask-image-conic-to-color":[{"mask-conic-to":y()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:A()}],"mask-repeat":[{mask:ie()}],"mask-size":[{mask:ae()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",D,M]}],filter:[{filter:["","none",D,M]}],blur:[{blur:wt()}],brightness:[{brightness:[H,D,M]}],contrast:[{contrast:[H,D,M]}],"drop-shadow":[{"drop-shadow":["","none",b,Xe,Ye]}],"drop-shadow-color":[{"drop-shadow":y()}],grayscale:[{grayscale:["",H,D,M]}],"hue-rotate":[{"hue-rotate":[H,D,M]}],invert:[{invert:["",H,D,M]}],saturate:[{saturate:[H,D,M]}],sepia:[{sepia:["",H,D,M]}],"backdrop-filter":[{"backdrop-filter":["","none",D,M]}],"backdrop-blur":[{"backdrop-blur":wt()}],"backdrop-brightness":[{"backdrop-brightness":[H,D,M]}],"backdrop-contrast":[{"backdrop-contrast":[H,D,M]}],"backdrop-grayscale":[{"backdrop-grayscale":["",H,D,M]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[H,D,M]}],"backdrop-invert":[{"backdrop-invert":["",H,D,M]}],"backdrop-opacity":[{"backdrop-opacity":[H,D,M]}],"backdrop-saturate":[{"backdrop-saturate":[H,D,M]}],"backdrop-sepia":[{"backdrop-sepia":["",H,D,M]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":C()}],"border-spacing-x":[{"border-spacing-x":C()}],"border-spacing-y":[{"border-spacing-y":C()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",D,M]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[H,"initial",D,M]}],ease:[{ease:["linear","initial",k,D,M]}],delay:[{delay:[H,D,M]}],animate:[{animate:["none",S,D,M]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[x,D,M]}],"perspective-origin":[{"perspective-origin":q()}],rotate:[{rotate:K()}],"rotate-x":[{"rotate-x":K()}],"rotate-y":[{"rotate-y":K()}],"rotate-z":[{"rotate-z":K()}],scale:[{scale:N()}],"scale-x":[{"scale-x":N()}],"scale-y":[{"scale-y":N()}],"scale-z":[{"scale-z":N()}],"scale-3d":["scale-3d"],skew:[{skew:re()}],"skew-x":[{"skew-x":re()}],"skew-y":[{"skew-y":re()}],transform:[{transform:[D,M,"","none","gpu","cpu"]}],"transform-origin":[{origin:q()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:R()}],"translate-x":[{"translate-x":R()}],"translate-y":[{"translate-y":R()}],"translate-z":[{"translate-z":R()}],"translate-none":["translate-none"],zoom:[{zoom:[pe,D,M]}],accent:[{accent:y()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:y()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],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",D,M]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scrollbar-thumb-color":[{"scrollbar-thumb":y()}],"scrollbar-track-color":[{"scrollbar-track":y()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":C()}],"scroll-mx":[{"scroll-mx":C()}],"scroll-my":[{"scroll-my":C()}],"scroll-ms":[{"scroll-ms":C()}],"scroll-me":[{"scroll-me":C()}],"scroll-mbs":[{"scroll-mbs":C()}],"scroll-mbe":[{"scroll-mbe":C()}],"scroll-mt":[{"scroll-mt":C()}],"scroll-mr":[{"scroll-mr":C()}],"scroll-mb":[{"scroll-mb":C()}],"scroll-ml":[{"scroll-ml":C()}],"scroll-p":[{"scroll-p":C()}],"scroll-px":[{"scroll-px":C()}],"scroll-py":[{"scroll-py":C()}],"scroll-ps":[{"scroll-ps":C()}],"scroll-pe":[{"scroll-pe":C()}],"scroll-pbs":[{"scroll-pbs":C()}],"scroll-pbe":[{"scroll-pbe":C()}],"scroll-pt":[{"scroll-pt":C()}],"scroll-pr":[{"scroll-pr":C()}],"scroll-pb":[{"scroll-pb":C()}],"scroll-pl":[{"scroll-pl":C()}],"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",D,M]}],fill:[{fill:["none",...y()]}],"stroke-w":[{stroke:[H,Fe,ke,Fr]}],stroke:[{stroke:["none",...y()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{"container-named":["container-type"],overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","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","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","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-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","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-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","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"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","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-pbs","scroll-pbe","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"]},postfixLookupClassGroups:["container-type"],orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}});function $t(...t){return Wi(P(t))}const Gr=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,Ur=P,I=(t,e)=>r=>{var n;if(e?.variants==null)return Ur(t,r?.class,r?.className);const{variants:o,defaultVariants:i}=e,s=Object.keys(o).map(d=>{const p=r?.[d],u=i?.[d];if(p===null)return null;const g=Gr(p)||Gr(u);return o[d][g]}),l=r&&Object.entries(r).reduce((d,p)=>{let[u,g]=p;return g===void 0||(d[u]=g),d},{}),c=e==null||(n=e.compoundVariants)===null||n===void 0?void 0:n.reduce((d,p)=>{let{class:u,className:g,...b}=p;return Object.entries(b).every(v=>{let[x,w]=v;return Array.isArray(w)?w.includes({...i,...l}[x]):{...i,...l}[x]===w})?[...d,u,g]:d},[]);return Ur(t,s,c,r?.class,r?.className)},Hi=I(["inline-flex items-center justify-center font-bold","transition-colors duration-150","focus-visible:outline-none","disabled:cursor-not-allowed"],{variants:{size:{xs:"py-1 px-2 gap-1 rounded-md text-caption-sm",sm:"h-[36px] px-4 gap-1 rounded-lg text-caption-sm",md:"h-[44px] px-4 gap-2 rounded-lg text-sm",lg:"h-[52px] px-5 gap-2 rounded-[10px] text-body-sm",xl:"h-[60px] px-6 gap-2 rounded-[10px] text-body-lg","2xl":"h-[68px] px-6 gap-2 rounded-[10px] text-body-lg"},tone:{primary:"",destructive:""},iconOnly:{true:"!p-0",false:""},variant:{solid:["text-white","disabled:bg-light-100 disabled:text-light-400"],outline:["bg-white border","disabled:bg-white disabled:text-light-400 disabled:border-light-200"],ghost:["bg-transparent","disabled:text-light-400"],"outline-primary":["bg-white border border-primary-500 text-primary-500","hover:bg-primary-100 hover:border-primary-300 hover:text-primary-800","focus-visible:ring-2 focus-visible:ring-primary-400 focus-visible:ring-offset-2 focus-visible:ring-offset-white","disabled:bg-white disabled:text-light-400 disabled:border-light-200"],"ghost-primary":["bg-transparent text-primary-500","hover:bg-primary-50 hover:text-primary-800","focus-visible:ring-2 focus-visible:ring-primary-400 focus-visible:ring-offset-2 focus-visible:ring-offset-white","disabled:text-light-400"],plain:["bg-transparent !rounded-md","disabled:text-light-400 h-auto !px-2"],"plain-black":["bg-transparent !rounded-md","disabled:text-light-400 h-auto !px-2 "]}},compoundVariants:[{tone:"primary",variant:"solid",class:["bg-primary-500","hover:bg-primary-800","focus-visible:ring-2 focus-visible:ring-primary-400 focus-visible:ring-offset-2 focus-visible:ring-offset-white"].join(" ")},{tone:"primary",variant:"outline",class:["border-light-200 text-light-900","hover:bg-light-50","focus-visible:ring-2 focus-visible:ring-primary-400 focus-visible:ring-offset-2 focus-visible:ring-offset-white"].join(" ")},{tone:"primary",variant:"ghost",class:["text-light-800","hover:bg-light-50 hover:text-light-900","focus-visible:ring-2 focus-visible:ring-primary-400 focus-visible:ring-offset-2 focus-visible:ring-offset-white"].join(" ")},{tone:"primary",variant:"plain",class:["text-primary-500","hover:text-primary-800 hover:bg-transparent","focus-visible:ring-2 focus-visible:ring-primary-400 focus-visible:ring-offset-2"].join(" ")},{tone:"primary",variant:"plain-black",class:["text-light-800","hover:text-light-900 hover:bg-transparent","focus-visible:ring-2 focus-visible:ring-primary-400 focus-visible:ring-offset-2"].join(" ")},{tone:"destructive",variant:"solid",class:["bg-error-500 text-white","hover:bg-error-800","focus-visible:ring-2 focus-visible:ring-error-300 focus-visible:ring-offset-2 focus-visible:ring-offset-white","disabled:bg-light-100"].join(" ")},{tone:"destructive",variant:"outline",class:["border-error-500 text-error-500","hover:border-error-300 hover:bg-error-100 hover:text-error-800","focus-visible:ring-2 focus-visible:ring-error-300 focus-visible:ring-offset-2 focus-visible:ring-offset-white"].join(" ")},{tone:"destructive",variant:"ghost",class:["text-error-500","hover:bg-error-50 hover:text-error-800","focus-visible:ring-2 focus-visible:ring-error-300 focus-visible:ring-offset-2 focus-visible:ring-offset-white","disabled:bg-white disabled:text-light-400"].join(" ")},{tone:"destructive",variant:"plain",class:["text-error-500","hover:text-error-800 hover:bg-transparent","focus-visible:ring-2 focus-visible:ring-error-300 focus-visible:ring-offset-2"].join(" ")},{size:"xs",iconOnly:!0,class:"!w-[26px] !h-[26px]"},{size:"sm",iconOnly:!0,class:"!w-[36px] !h-[36px]"},{size:"md",iconOnly:!0,class:"!w-[44px] !h-[44px]"},{size:"lg",iconOnly:!0,class:"!w-[52px] !h-[52px]"},{size:"xl",iconOnly:!0,class:"!w-[60px] !h-[60px]"},{size:"2xl",iconOnly:!0,class:"!w-[68px] !h-[68px]"}],defaultVariants:{size:"md",tone:"primary",variant:"solid",iconOnly:!1}}),qr=a.forwardRef(({children:t,className:e,tone:r,variant:n,size:o,iconOnly:i,...s},l)=>a.createElement("button",{ref:l,className:$t(Hi({tone:r,variant:n,size:o,iconOnly:i}),e),...s},t));qr.displayName="Button";const ji=({children:t})=>a.createElement("span",{className:"flex items-center"},t),Gi=({children:t})=>a.createElement("span",{className:"whitespace-nowrap"},t),Ze=qr;Ze.Icon=ji,Ze.Text=Gi;const Ui=I(["inline-flex items-center justify-center","border transition-colors duration-150","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-400 focus-visible:ring-offset-2 focus-visible:ring-offset-white"],{variants:{size:{sm:"h-4 w-4 rounded-[4px]",md:"h-5 w-5 rounded-[6px]",lg:"h-5 w-5 rounded-[6px]"},checked:{true:"",false:""},disabled:{true:"cursor-not-allowed",false:"cursor-pointer"}},compoundVariants:[{checked:!1,disabled:!1,className:"bg-white border-light-200 hover:border-light-400"},{checked:!0,disabled:!1,className:"bg-primary-500 border-primary-500 text-white hover:bg-primary-800 hover:border-primary-800"},{disabled:!0,className:"bg-light-100 border-light-200 text-white"}],defaultVariants:{size:"md",checked:!1,disabled:!1}}),qi={sm:{width:12,height:9},md:{width:14,height:10},lg:{width:14,height:10}},Yr=f.forwardRef(({id:t,checked:e,indeterminate:r=!1,disabled:n,size:o="md",onCheckedChange:i,className:s},l)=>{const c=()=>{n||i?.(!e)},d=qi[o],p=n?"text-white/80":"text-current";return f.createElement("button",{id:t,ref:l,type:"button",role:"checkbox","aria-checked":r?"mixed":e,disabled:n,onClick:c,className:P(Ui({size:o,checked:e,disabled:n}),s)},e&&!r&&f.createElement("svg",{width:d.width,height:d.height,viewBox:"0 0 14 10",fill:"none",className:p},f.createElement("path",{d:"M1 5L5 9L13 1",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"})),r&&f.createElement("span",{className:P(p,"bg-current rounded-sm",o==="sm"&&"h-0.5 w-3",(o==="md"||o==="lg")&&"h-0.5 w-4")}))});Yr.displayName="Checkbox";const Xr=f.createContext(null),Yi=({value:t,defaultValue:e,onValueChange:r,children:n,className:o})=>{const[i,s]=f.useState(e),l=t??i,c=d=>{s(d),r?.(d)};return f.createElement(Xr.Provider,{value:{value:l,onValueChange:c}},f.createElement("div",{role:"radiogroup",className:o},n))},Xi=()=>{const t=f.useContext(Xr);if(!t)throw new Error("RadioGroupItem must be used within RadioGroup");return t},Zi=I(["relative inline-flex items-center justify-center","border rounded-full transition-colors duration-150","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-400 focus-visible:ring-offset-2 focus-visible:ring-offset-white"],{variants:{size:{sm:"h-4 w-4",md:"h-5 w-5",lg:"h-5 w-5"},checked:{true:"",false:""},disabled:{true:"cursor-not-allowed",false:"cursor-pointer"}},compoundVariants:[{checked:!1,disabled:!1,className:"border-light-200 bg-white hover:border-light-400"},{checked:!0,disabled:!1,className:"border-primary-500 bg-primary-500 hover:bg-primary-800 hover:border-primary-800"},{disabled:!0,className:"border-light-200 bg-light-100"}],defaultVariants:{size:"md",checked:!1,disabled:!1}}),Ji=I(["rounded-full bg-white transition-all"],{variants:{size:{sm:"h-1.5 w-1.5",md:"h-2 w-2",lg:"h-2 w-2"},checked:{true:"scale-100",false:"scale-0"}},defaultVariants:{size:"md",checked:!1}}),Zr=f.forwardRef(({id:t,value:e,disabled:r,size:n="md",className:o},i)=>{const{value:s,onValueChange:l}=Xi(),c=s===e;return f.createElement("button",{ref:i,id:t,type:"button",role:"radio","aria-checked":c,disabled:r,onClick:()=>{r||l?.(e)},className:P(Zi({size:n,checked:c,disabled:r}),o)},f.createElement("span",{className:Ji({size:n,checked:c})}))});Zr.displayName="RadioGroupItem";const Ri=I(["inline-flex items-center shrink-0 rounded-full p-[2px]","transition-colors duration-200","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:ring-offset-white"],{variants:{size:{sm:"h-5 w-9",md:"h-6 w-11",lg:"h-6 w-11"},checked:{true:"justify-end",false:"justify-start"},disabled:{true:"cursor-not-allowed",false:"cursor-pointer"},variant:{default:"",success:""}},compoundVariants:[{checked:!1,disabled:!1,className:"bg-light-200"},{checked:!0,disabled:!1,variant:"default",className:"bg-primary-500 hover:bg-primary-800"},{checked:!0,disabled:!1,variant:"success",className:"bg-success-500 hover:bg-success-800"},{disabled:!0,className:"bg-light-100"},{variant:"default",className:"focus-visible:ring-primary-400"},{variant:"success",className:"focus-visible:ring-success-500"}],defaultVariants:{size:"md",checked:!1,disabled:!1,variant:"default"}}),Qi=I("rounded-full shrink-0 shadow-[0_1px_3px_0_rgba(16,24,40,0.10),0_1px_2px_0_rgba(16,24,40,0.06)]",{variants:{size:{sm:"h-4 w-4",md:"h-5 w-5",lg:"h-5 w-5"},disabled:{true:"bg-light-50",false:"bg-white"}},defaultVariants:{size:"md",disabled:!1}}),Jr=f.forwardRef(({checked:t=!1,size:e="md",variant:r="default",disabled:n,onCheckedChange:o,className:i},s)=>f.createElement("button",{ref:s,type:"button",role:"switch","aria-checked":t,disabled:n,onClick:()=>{n||o?.(!t)},className:P(Ri({size:e,checked:t,disabled:n,variant:r}),i)},f.createElement("span",{className:Qi({size:e,disabled:n})})));Jr.displayName="Toggle";const es=I(["relative rounded-lg text-caption-sm font-semibold text-white","bg-primary-900","shadow-lg","pointer-events-none","select-none"],{variants:{side:{top:"",bottom:"",left:"",right:""},hasSupportingText:{true:"p-3",false:"px-3 py-2"}},defaultVariants:{side:"top",hasSupportingText:!1}}),ts="mt-1 font-medium text-light-100",rs=I(["absolute"],{variants:{side:{top:["bottom-[-6px] left-1/2 -translate-x-1/2","border-x-8 border-x-transparent border-t-[6px] border-t-primary-900"],bottom:["top-[-6px] left-1/2 -translate-x-1/2","border-x-8 border-x-transparent border-b-[6px] border-b-primary-900"],left:["right-[-6px] top-1/2 -translate-y-1/2","border-y-8 border-y-transparent border-l-[6px] border-l-primary-900"],right:["left-[-6px] top-1/2 -translate-y-1/2","border-y-8 border-y-transparent border-r-[6px] border-r-primary-900"]}},defaultVariants:{side:"top"}}),Je=12,Re=({content:t,supportingText:e,side:r="top",open:n,defaultOpen:o=!1,disabled:i=!1,delay:s=0,className:l,children:c})=>{const[d,p]=f.useState(o),[u,g]=f.useState(null),b=n??d,v=f.useRef(null),x=f.useRef(null),w=f.useCallback(()=>{const T=v.current;if(!T)return null;const F=T.getBoundingClientRect();switch(r){case"top":return{top:F.top-Je,left:F.left+F.width/2};case"bottom":return{top:F.bottom+Je,left:F.left+F.width/2};case"left":return{top:F.top+F.height/2,left:F.left-Je};default:return{top:F.top+F.height/2,left:F.right+Je}}},[r]),k=()=>{if(i||!v.current)return;const T=()=>{g(w()),p(!0)};s>0?x.current=window.setTimeout(T,s):T()};f.useEffect(()=>{if(!b||!v.current)return;const T=()=>g(w());T();const F=new ResizeObserver(T);return F.observe(v.current),window.addEventListener("scroll",T,!0),window.addEventListener("resize",T),()=>{F.disconnect(),window.removeEventListener("scroll",T,!0),window.removeEventListener("resize",T)}},[b,w]);const S=()=>{x.current&&(clearTimeout(x.current),x.current=null),p(!1)};return f.createElement(f.Fragment,null,f.createElement("span",{ref:v,className:"inline-flex",onMouseEnter:k,onMouseLeave:S,onFocus:k,onBlur:S,tabIndex:0},c),b&&u&&Ue.createPortal(f.createElement("div",{role:"tooltip",className:"fixed z-[9999] pointer-events-none",style:{top:u.top,left:u.left,transform:r==="top"?"translate(-50%, -100%)":r==="bottom"?"translate(-50%, 0)":r==="left"?"translate(-100%, -50%)":"translate(0, -50%)"}},f.createElement("div",{className:P(es({side:r,hasSupportingText:!!e}),l)},t,e&&f.createElement("p",{className:ts},e),f.createElement("span",{className:rs({side:r})}))),document.body))};Re.displayName="Tooltip";const ns={brand:{bg:"bg-primary-50",border:"border-primary-300",text:"text-primary-700"},gray:{bg:"bg-white",border:"border-light-200",text:"text-light-800"},error:{bg:"bg-error-50",border:"border-error-200",text:"text-error-700"},warning:{bg:"bg-warning-50",border:"border-warning-200",text:"text-warning-700"},success:{bg:"bg-success-50",border:"border-success-200",text:"text-success-700"},"blue-gray":{bg:"bg-blue-gray-50",border:"border-blue-gray-200",text:"text-blue-gray-700"},"blue-light":{bg:"bg-blue-light-50",border:"border-blue-light-200",text:"text-blue-light-700"},indigo:{bg:"bg-indigo-50",border:"border-indigo-200",text:"text-indigo-700"},purple:{bg:"bg-purple-50",border:"border-purple-200",text:"text-purple-700"},blue:{bg:"bg-blue-50",border:"border-blue-200",text:"text-blue-700"},pink:{bg:"bg-pink-50",border:"border-pink-200",text:"text-pink-700"},orange:{bg:"bg-orange-50",border:"border-orange-200",text:"text-orange-700"}},os=I(["inline-flex items-center gap-1 border","font-medium transition-colors duration-150","select-none"],{variants:{size:{sm:"text-caption-sm py-[3px]",md:"text-caption-lg py-[2px]",lg:"text-caption-lg py-1"},shape:{rounded:"rounded-md",pill:"rounded-full"},hasLeading:{true:"",false:""},hasTrailing:{true:"",false:""},interactive:{true:"cursor-pointer focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-400 focus-visible:ring-offset-2 focus-visible:ring-offset-white",false:""},disabled:{true:"cursor-not-allowed opacity-60",false:""}},compoundVariants:[{size:"sm",hasLeading:!1,className:"pl-2"},{size:"sm",hasLeading:!0,className:"pl-1"},{size:"sm",hasTrailing:!1,className:"pr-2"},{size:"sm",hasTrailing:!0,className:"pr-1"},{size:"md",hasLeading:!1,className:"pl-[9px]"},{size:"md",hasLeading:!0,className:"pl-1"},{size:"md",hasTrailing:!1,className:"pr-[9px]"},{size:"md",hasTrailing:!0,className:"pr-1"},{size:"lg",hasLeading:!1,className:"pl-2.5"},{size:"lg",hasLeading:!0,className:"pl-1.5"},{size:"lg",hasTrailing:!1,className:"pr-2.5"},{size:"lg",hasTrailing:!0,className:"pr-1.5"}],defaultVariants:{size:"sm",shape:"rounded",hasLeading:!1,hasTrailing:!1,interactive:!1,disabled:!1}}),is=I(["shrink-0 rounded border bg-white transition-colors duration-150 size-3.5"],{variants:{checked:{true:"bg-primary-500 border-primary-500",false:""}},defaultVariants:{checked:!1}}),ss="shrink-0 rounded-[3px] bg-light-100 px-1 text-light-800",ls="shrink-0 rounded-[3px] p-0.5 hover:bg-black/5 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-400",Rr=/^#([0-9a-f]{6})$/i,Qr=t=>Rr.test(t.trim()),en=(t,e)=>{const r=Rr.exec(t.trim());if(!r)return;const n=parseInt(r[1],16),o=n>>16&255,i=n>>8&255,s=n&255;return`rgba(${o}, ${i}, ${s}, ${e})`},Tt=({children:t,size:e="sm",shape:r="rounded",icon:n,checked:o,onCheckedChange:i,onClose:s,count:l,disabled:c=!1,className:d,color:p="gray",customColor:u})=>{const g=i!==void 0,b=o!==void 0||!!n,v=!!s||l!==void 0,x=ns[p],w=!!(u&&Qr(u)),k=w?{borderColor:u,backgroundColor:en(u,.12),color:u}:void 0,S=()=>{c||i?.(!o)},T=F=>{!g||c||(F.key==="Enter"||F.key===" ")&&(F.preventDefault(),S())};return f.createElement("div",{role:g?"checkbox":void 0,"aria-checked":g?!!o:void 0,"aria-disabled":c||void 0,tabIndex:g&&!c?0:void 0,onClick:g?S:void 0,onKeyDown:T,style:k,className:P(os({size:e,shape:r,hasLeading:b,hasTrailing:v,interactive:g,disabled:c}),!w&&x.bg,!w&&x.border,!w&&x.text,d)},o!==void 0&&f.createElement("span",{className:P(is({checked:o}),!o&&!w&&x.border),style:!o&&w?{borderColor:u}:void 0},o&&f.createElement("svg",{viewBox:"0 0 14 10",fill:"none",className:"size-full text-white"},f.createElement("path",{d:"M1 5L5 9L13 1",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}))),n,f.createElement("span",{className:"whitespace-nowrap"},t),l!==void 0&&f.createElement("span",{className:ss},l),s&&f.createElement("button",{type:"button","aria-label":"Remove",disabled:c,onClick:F=>{F.stopPropagation(),s()},className:ls},f.createElement("svg",{viewBox:"0 0 10 10",fill:"none",className:"size-2.5"},f.createElement("path",{d:"M1 1L9 9M9 1L1 9",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"}))))};Tt.displayName="Tag";const as={brand:{solidBg:"bg-primary-50",solidBorder:"border-primary-300",solidText:"text-primary-500",outlineBorder:"border-primary-500",outlineText:"text-primary-700"},gray:{solidBg:"bg-light-50",solidBorder:"border-light-200",solidText:"text-light-700",outlineBorder:"border-light-600",outlineText:"text-light-700"},error:{solidBg:"bg-error-50",solidBorder:"border-error-200",solidText:"text-error-700",outlineBorder:"border-error-600",outlineText:"text-error-700"},warning:{solidBg:"bg-warning-50",solidBorder:"border-warning-200",solidText:"text-warning-700",outlineBorder:"border-warning-600",outlineText:"text-warning-700"},success:{solidBg:"bg-success-50",solidBorder:"border-success-200",solidText:"text-success-700",outlineBorder:"border-success-600",outlineText:"text-success-700"},"blue-gray":{solidBg:"bg-blue-gray-50",solidBorder:"border-blue-gray-200",solidText:"text-blue-gray-700",outlineBorder:"border-blue-gray-600",outlineText:"text-blue-gray-700"},"blue-light":{solidBg:"bg-blue-light-50",solidBorder:"border-blue-light-200",solidText:"text-blue-light-700",outlineBorder:"border-blue-light-600",outlineText:"text-blue-light-700"},indigo:{solidBg:"bg-indigo-50",solidBorder:"border-indigo-200",solidText:"text-indigo-700",outlineBorder:"border-indigo-600",outlineText:"text-indigo-700"},purple:{solidBg:"bg-purple-50",solidBorder:"border-purple-200",solidText:"text-purple-700",outlineBorder:"border-purple-600",outlineText:"text-purple-700"},blue:{solidBg:"bg-blue-50",solidBorder:"border-blue-200",solidText:"text-blue-700",outlineBorder:"border-blue-600",outlineText:"text-blue-700"},pink:{solidBg:"bg-pink-50",solidBorder:"border-pink-200",solidText:"text-pink-700",outlineBorder:"border-pink-600",outlineText:"text-pink-700"},orange:{solidBg:"bg-orange-50",solidBorder:"border-orange-200",solidText:"text-orange-700",outlineBorder:"border-orange-600",outlineText:"text-orange-700"}},cs=I(["inline-flex items-center gap-1 border font-medium","transition-colors duration-150"],{variants:{size:{sm:"text-caption-sm py-0.5",md:"text-caption-lg py-0.5",lg:"text-caption-lg py-1"},shape:{pill:"rounded-full",badge:""},modern:{true:"rounded-md shadow-xs",false:""},hasLeading:{true:"",false:""},hasTrailing:{true:"",false:""},iconOnly:{true:"p-[5px]",false:""},interactive:{true:"cursor-pointer focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-400 focus-visible:ring-offset-2 focus-visible:ring-offset-white",false:""},disabled:{true:"cursor-not-allowed opacity-60",false:""}},compoundVariants:[{shape:"badge",size:"sm",modern:!1,className:"rounded-md"},{shape:"badge",size:"md",modern:!1,className:"rounded-md"},{shape:"badge",size:"lg",modern:!1,className:"rounded-lg"},{size:"sm",shape:"pill",iconOnly:!1,hasLeading:!1,className:"pl-2"},{size:"sm",shape:"badge",iconOnly:!1,hasLeading:!1,className:"pl-1.5"},{size:"sm",iconOnly:!1,hasLeading:!0,className:"pl-1"},{size:"sm",iconOnly:!1,hasTrailing:!1,className:"pr-2"},{size:"sm",iconOnly:!1,hasTrailing:!0,className:"pr-1"},{size:"md",iconOnly:!1,hasLeading:!1,className:"pl-2.5"},{size:"md",iconOnly:!1,hasLeading:!0,className:"pl-1"},{size:"md",iconOnly:!1,hasTrailing:!1,className:"pr-2.5"},{size:"md",iconOnly:!1,hasTrailing:!0,className:"pr-1"},{size:"lg",shape:"pill",iconOnly:!1,hasLeading:!1,className:"pl-3"},{size:"lg",shape:"badge",iconOnly:!1,hasLeading:!1,className:"pl-2.5"},{size:"lg",iconOnly:!1,hasLeading:!0,className:"pl-1.5"},{size:"lg",shape:"pill",iconOnly:!1,hasTrailing:!1,className:"pr-3"},{size:"lg",shape:"badge",iconOnly:!1,hasTrailing:!1,className:"pr-2.5"},{size:"lg",iconOnly:!1,hasTrailing:!0,className:"pr-1.5"}],defaultVariants:{size:"sm",shape:"pill",modern:!1,hasLeading:!1,hasTrailing:!1,iconOnly:!1,interactive:!1,disabled:!1}}),ds="size-4 shrink-0 rounded border bg-white",us="shrink-0 rounded p-0.5 hover:bg-black/5 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-400",tn=({children:t,size:e="sm",shape:r="pill",variant:n="solid",color:o="brand",customColor:i,modern:s=!1,icon:l,trailingIcon:c,checked:d,onCheckedChange:p,onClose:u,iconOnly:g=!1,disabled:b=!1,className:v})=>{const x=p!==void 0,w=d!==void 0||!!l,k=!!u||!!c,S=as[o],T=!!(i&&Qr(i)),F=T?{borderColor:i,color:i,backgroundColor:n==="outline"?"transparent":en(i,.1)}:void 0,q=()=>{b||p?.(!d)},_=z=>{!x||b||(z.key==="Enter"||z.key===" ")&&(z.preventDefault(),q())};return f.createElement("div",{role:x?"checkbox":void 0,"aria-checked":x?!!d:void 0,"aria-disabled":b||void 0,tabIndex:x&&!b?0:void 0,onClick:x?q:void 0,onKeyDown:_,style:F,className:P(cs({size:e,shape:r,modern:s,hasLeading:w,hasTrailing:k,iconOnly:g,interactive:x,disabled:b}),!T&&(n==="outline"?P("bg-transparent",S.outlineBorder,S.outlineText):P(S.solidBg,S.solidBorder,S.solidText)),v)},d!==void 0&&f.createElement("span",{className:P(ds,d?"bg-primary-500 border-primary-500":!T&&S.solidBorder),style:!d&&T?{borderColor:i}:void 0},d&&f.createElement("svg",{viewBox:"0 0 14 10",fill:"none",className:"size-full text-white"},f.createElement("path",{d:"M1 5L5 9L13 1",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}))),l,!g&&f.createElement("span",{className:"whitespace-nowrap"},t),c,u&&f.createElement("button",{type:"button","aria-label":"Remove",disabled:b,onClick:z=>{z.stopPropagation(),u()},className:us},f.createElement("svg",{viewBox:"0 0 10 10",fill:"none",className:"size-2.5"},f.createElement("path",{d:"M1 1L9 9M9 1L1 9",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"}))))};tn.displayName="Badge";const fs={brand:{bg50:"bg-primary-50",hoverBg100:"hover:bg-primary-100",border200:"border-primary-200",border500:"border-primary-500",text500:"text-primary-500"},gray:{bg50:"bg-light-50",hoverBg100:"hover:bg-light-100",border200:"border-light-200",border500:"border-light-500",text500:"text-light-500"},error:{bg50:"bg-error-50",hoverBg100:"hover:bg-error-100",border200:"border-error-200",border500:"border-error-500",text500:"text-error-500"},warning:{bg50:"bg-warning-50",hoverBg100:"hover:bg-warning-100",border200:"border-warning-200",border500:"border-warning-500",text500:"text-warning-500"},success:{bg50:"bg-success-50",hoverBg100:"hover:bg-success-100",border200:"border-success-200",border500:"border-success-500",text500:"text-success-500"}},ps={md:{outerPad:{leading:"pl-1 pr-2.5 py-1",trailing:"pl-3 pr-1 py-1"},gap:"gap-2",chipPad:"px-2 py-0.5",text:"text-caption-lg"},lg:{outerPad:{leading:"pl-1.5 pr-3 py-1.5",trailing:"pl-3 pr-1.5 py-1.5"},gap:"gap-2",chipPad:"px-2.5 py-[3px]",text:"text-body-sm"}},rn=({badgeLabel:t,children:e,size:r="md",theme:n="light",color:o="brand",badgePosition:i="leading",icon:s,onClick:l,className:c})=>{const d=fs[o],p=ps[r],u=n==="modern",g=n==="outline",b=P("inline-flex items-center border transition-colors duration-150",p.gap,p.outerPad[i],u?"rounded-lg bg-light-50 border-light-200 shadow-xs":g?P("rounded-full bg-white border-[1.5px]",d.border500):P("rounded-full",d.bg50,d.border200,d.hoverBg100),l&&"cursor-pointer",c),v=P("inline-flex shrink-0 items-center gap-1 border font-medium whitespace-nowrap",p.chipPad,p.text,u?"rounded-md bg-white border-light-200 text-light-800":g?P("rounded-full bg-white border-[1.5px]",d.border500,d.text500):P("rounded-full bg-white",d.border200,d.text500)),x=P("inline-flex items-center gap-1 font-medium",p.text,u?"text-light-800":d.text500),w=f.createElement("span",{className:v},u&&f.createElement("span",{className:"size-2 shrink-0 rounded-full bg-light-400"}),t);return f.createElement("div",{role:l?"button":void 0,tabIndex:l?0:void 0,onClick:l,className:b},i==="leading"&&w,f.createElement("span",{className:x},e,s),i==="trailing"&&w)};rn.displayName="BadgeGroup";const hs=({size:t})=>{const e=t*.09,r=(t-e)/2,n=2*Math.PI*r;return f.createElement("svg",{width:t,height:t,viewBox:`0 0 ${t} ${t}`,fill:"none",className:"animate-spin"},f.createElement("circle",{cx:t/2,cy:t/2,r,strokeWidth:e,className:"stroke-light-100"}),f.createElement("circle",{cx:t/2,cy:t/2,r,strokeWidth:e,strokeLinecap:"round",strokeDasharray:`${n*.25} ${n}`,className:"stroke-primary-600"}))},bs=({size:t})=>{const e=f.useId(),r=t*.125,n=(t-r)/2,o=2*Math.PI*n;return f.createElement("svg",{width:t,height:t,viewBox:`0 0 ${t} ${t}`,fill:"none",className:"animate-spin text-primary-600"},f.createElement("defs",null,f.createElement("linearGradient",{id:e,x1:"100%",y1:"0%",x2:"0%",y2:"100%"},f.createElement("stop",{offset:"0%",stopColor:"currentColor",stopOpacity:"1"}),f.createElement("stop",{offset:"100%",stopColor:"currentColor",stopOpacity:"0"}))),f.createElement("circle",{cx:t/2,cy:t/2,r:n,strokeWidth:r,className:"stroke-light-100"}),f.createElement("circle",{cx:t/2,cy:t/2,r:n,strokeWidth:r,strokeLinecap:"round",stroke:`url(#${e})`,strokeDasharray:`${o*.75} ${o}`}))},ms=({size:t})=>{const r=Math.max(t*.1,3),n=(t-r)/2;return f.createElement("div",{className:"relative animate-spin",style:{width:t,height:t}},Array.from({length:12}).map((o,i)=>{const s=30*i,l=.15+.85*i/11;return f.createElement("span",{key:i,className:"absolute rounded-full bg-primary-600 top-1/2 left-1/2",style:{width:r,height:r,opacity:l,marginTop:-r/2,marginLeft:-r/2,transform:`rotate(${s}deg) translate(${n}px) rotate(${-s}deg)`}})}))},gs={sm:{box:32,gapClass:"gap-4",textClass:"text-caption-lg"},md:{box:48,gapClass:"gap-4",textClass:"text-caption-lg"},lg:{box:56,gapClass:"gap-4",textClass:"text-body-lg"},xl:{box:64,gapClass:"gap-5",textClass:"text-body-lg"}},nn=({size:t="sm",style:e="line-simple",supportingText:r=!0,label:n="Loading...",className:o})=>{const{box:i,gapClass:s,textClass:l}=gs[t];return f.createElement("div",{role:"status","aria-label":typeof n=="string"?n:"Loading",className:P("inline-flex flex-col items-center",s,o)},e==="line-simple"&&f.createElement(hs,{size:i}),e==="line-spinner"&&f.createElement(bs,{size:i}),e==="dot-circle"&&f.createElement(ms,{size:i}),r&&f.createElement("p",{className:P("font-medium text-light-700 whitespace-nowrap",l)},n))};nn.displayName="Loading";const on=({className:t,style:e})=>f.createElement("svg",{viewBox:"0 0 24 24",fill:"none",className:t,style:e},f.createElement("path",{d:"M12 12a4.5 4.5 0 1 0 0-9 4.5 4.5 0 0 0 0 9Z",stroke:"currentColor",strokeWidth:"1.75"}),f.createElement("path",{d:"M3.75 20.25a8.25 8.25 0 0 1 16.5 0",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"})),sn=({className:t})=>f.createElement("svg",{viewBox:"0 0 20 20",fill:"none",className:t},f.createElement("circle",{cx:"10",cy:"10",r:"9",className:"fill-primary-500 stroke-white",strokeWidth:"1.5"}),f.createElement("path",{d:"M6 10.2 8.6 12.8 14 7",stroke:"white",strokeWidth:"1.75",strokeLinecap:"round",strokeLinejoin:"round"})),ys={xs:{box:24,borderWidth:"0.5px",statusSize:6,badgeSize:10,textClass:"text-caption-sm"},sm:{box:32,borderWidth:"0.5px",statusSize:8,badgeSize:12,textClass:"text-caption-lg"},md:{box:40,borderWidth:"0.75px",statusSize:10,badgeSize:14,textClass:"text-body-sm"},lg:{box:48,borderWidth:"0.75px",statusSize:12,badgeSize:16,textClass:"text-body-lg"},xl:{box:56,borderWidth:"0.75px",statusSize:14,badgeSize:18,textClass:"text-h6"},"2xl":{box:64,borderWidth:"0.75px",statusSize:16,badgeSize:20,textClass:"text-h5 leading-7"}},xs="#17B26A",Ae=({src:t,alt:e,initials:r,size:n="md",status:o="none",statusIcon:i,contrastBorder:s=!0,className:l})=>{const{box:c,borderWidth:d,statusSize:p,badgeSize:u,textClass:g}=ys[n],b=t?"image":r!==void 0?"initials":"placeholder";return f.createElement("div",{className:P("relative inline-block shrink-0 rounded-full",l),style:{width:c,height:c}},b==="image"&&f.createElement("img",{src:t,alt:e??"",className:"absolute inset-0 size-full rounded-full object-cover"}),b==="placeholder"&&f.createElement("div",{className:"absolute inset-0 flex items-center justify-center rounded-full bg-light-50"},f.createElement(on,{className:"text-light-300",style:{width:c*.55,height:c*.55}})),b==="initials"&&f.createElement("div",{className:P("absolute inset-0 flex items-center justify-center rounded-full bg-light-50 font-semibold text-light-500",g)},r),s&&f.createElement("div",{className:"pointer-events-none absolute inset-0 rounded-full border-black/[0.08]",style:{borderWidth:d,borderStyle:"solid"}}),o==="online"&&f.createElement("span",{className:"absolute bottom-0 right-0 rounded-full border-[1.5px] border-white",style:{width:p,height:p,backgroundColor:xs}}),o==="company"&&f.createElement("div",{className:"absolute bottom-0 right-0 flex items-center justify-center overflow-hidden rounded-full border-[1.5px] border-white bg-white",style:{width:u,height:u}},i),o==="verified"&&f.createElement("div",{className:"absolute bottom-0 right-0",style:{width:u,height:u}},f.createElement(sn,{className:"size-full"})))};Ae.displayName="Avatar";const ln=[{bg:"bg-primary-100",text:"text-primary-600"},{bg:"bg-secondary-100",text:"text-secondary-600"},{bg:"bg-purple-100",text:"text-purple-600"},{bg:"bg-pink-100",text:"text-pink-600"},{bg:"bg-orange-100",text:"text-orange-600"},{bg:"bg-teal-100",text:"text-teal-600"},{bg:"bg-indigo-100",text:"text-indigo-600"},{bg:"bg-rose-100",text:"text-rose-600"}],vs=t=>{let e=0;for(let n=0;n<t.length;n+=1)e=e*31+t.charCodeAt(n)|0;const r=Math.abs(e)%ln.length;return ln[r]},ws={xs:{box:24,overlap:-4,contrastBorderWidth:"0.5px",plusIconSize:16,textClass:"text-caption-sm"},sm:{box:32,overlap:-8,contrastBorderWidth:"0.5px",plusIconSize:16,textClass:"text-caption-lg"},md:{box:40,overlap:-12,contrastBorderWidth:"0.75px",plusIconSize:20,textClass:"text-body-sm"}},an=({avatars:t,max:e,size:r="xs",onAdd:n,className:o})=>{const{box:i,overlap:s,contrastBorderWidth:l,textClass:c}=ws[r],d=e?t.slice(0,e):t,p=e&&t.length>e?t.length-e:0;return f.createElement("div",{className:P("inline-flex items-start gap-2",o)},f.createElement("div",{className:"flex items-start"},d.map((u,g)=>f.createElement(Re,{key:g,content:u.label,disabled:!u.label,side:"top"},f.createElement("div",{className:"relative shrink-0 overflow-hidden rounded-full border-[1.5px] border-white",style:{width:i,height:i,marginRight:s}},u.src?f.createElement("img",{src:u.src,alt:u.alt??"",className:"size-full object-cover"}):(()=>{const{bg:b,text:v}=vs(String(u.label??u.alt??u.initials??g));return f.createElement("div",{className:P("flex size-full items-center justify-center font-semibold",b,v,c)},u.initials)})(),f.createElement("div",{className:"pointer-events-none absolute inset-0 rounded-full border-black/[0.08]",style:{borderWidth:l,borderStyle:"solid"}})))),p>0&&f.createElement(Re,{content:t.slice(e).map((u,g)=>f.createElement("div",{key:g},u.label)),disabled:!t.slice(e).some(u=>u.label),side:"top"},f.createElement("div",{className:"relative flex shrink-0 items-center justify-center rounded-full border-2 border-white bg-light-100",style:{width:i,height:i}},f.createElement("span",{className:P("font-semibold text-light-600",c)},"+",p)))),n&&f.createElement("button",{type:"button",onClick:n,"aria-label":"Add",className:"flex shrink-0 items-center justify-center rounded-full border border-dashed border-light-300 bg-white text-light-500 hover:bg-light-50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-400 focus-visible:ring-offset-2",style:{width:i,height:i}},f.createElement("svg",{width:i*.4,height:i*.4,viewBox:"0 0 20 20",fill:"none"},f.createElement("path",{d:"M10 4v12M4 10h12",stroke:"currentColor",strokeWidth:"1.75",strokeLinecap:"round"}))))};an.displayName="AvatarGroup";const Es={xs:{nameClass:"text-caption-sm",subtitleClass:"text-caption-sm"},sm:{nameClass:"text-caption-lg",subtitleClass:"text-caption-sm"},md:{nameClass:"text-caption-lg",subtitleClass:"text-caption-lg"},lg:{nameClass:"text-body-sm",subtitleClass:"text-body-sm"},xl:{nameClass:"text-body-lg",subtitleClass:"text-body-sm"}},cn=({name:t,subtitle:e,src:r,initials:n,size:o="xs",status:i="none",statusIcon:s,className:l})=>{const{nameClass:c,subtitleClass:d}=Es[o];return f.createElement("div",{className:P("inline-flex items-center gap-2",l)},f.createElement(Ae,{src:r,initials:n,size:o,status:i,statusIcon:s}),f.createElement("div",{className:"flex flex-col items-start whitespace-nowrap"},f.createElement("span",{className:P("font-bold text-light-800",c)},t),e&&f.createElement("span",{className:P("font-normal text-light-700",d)},e)))};cn.displayName="AvatarLabelGroup";const Ss={sm:{box:72,ringWidth:3,shadowClass:"shadow-md",iconSize:36,textClass:"text-h4",verifiedSize:20,verifiedOffset:0},md:{box:96,ringWidth:4,shadowClass:"shadow-lg",iconSize:48,textClass:"text-h3",verifiedSize:24,verifiedOffset:0},lg:{box:160,ringWidth:4,shadowClass:"shadow-lg",iconSize:80,textClass:"text-h1",verifiedSize:32,verifiedOffset:4}},dn=({src:t,alt:e,initials:r,size:n="sm",verified:o=!0,contrastBorder:i=!0,className:s})=>{const{box:l,ringWidth:c,shadowClass:d,iconSize:p,textClass:u,verifiedSize:g,verifiedOffset:b}=Ss[n],v=t?"image":r!==void 0?"initials":"placeholder";return f.createElement("div",{className:P("relative rounded-full",s),style:{width:l,height:l}},f.createElement("div",{className:P("absolute inset-0 overflow-hidden rounded-full border-white",d,v!=="image"&&"bg-light-100"),style:{borderWidth:c,borderStyle:"solid"}},v==="image"&&f.createElement("img",{src:t,alt:e??"",className:"absolute inset-0 size-full rounded-full object-cover"}),i&&f.createElement("div",{className:"pointer-events-none absolute inset-0 rounded-full border border-black/[0.08]"}),v==="placeholder"&&f.createElement("div",{className:"absolute inset-0 flex items-center justify-center"},f.createElement(on,{className:"text-light-300",style:{width:p,height:p}})),v==="initials"&&f.createElement("div",{className:P("absolute inset-0 flex items-center justify-center font-semibold text-light-500",u)},r)),o&&f.createElement("div",{className:"absolute",style:{width:g,height:g,bottom:b,right:b}},f.createElement(sn,{className:"size-full"})))};dn.displayName="AvatarProfilePhoto";function Oe(...t){return(...e)=>{for(let r of t)typeof r=="function"&&r(...e)}}const we=typeof document<"u"?a.useLayoutEffect:()=>{},Qe={prefix:String(Math.round(Math.random()*1e10)),current:0},un=a.createContext(Qe),ks=a.createContext(!1);let Cs=!!(typeof window<"u"&&window.document&&window.document.createElement),Nt=new WeakMap;function $s(t=!1){let e=a.useContext(un),r=a.useRef(null);if(r.current===null&&!t){let n=a.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED?.ReactCurrentOwner?.current;if(n){let o=Nt.get(n);o==null?Nt.set(n,{id:e.current,state:n.memoizedState}):n.memoizedState!==o.state&&(e.current=o.id,Nt.delete(n))}r.current=++e.current}return r.current}function Ts(t){let e=a.useContext(un);e===Qe&&!Cs&&process.env.NODE_ENV!=="production"&&console.warn("When server rendering, you must wrap your application in an <SSRProvider> to ensure consistent ids are generated between the client and server.");let r=$s(!!t),n=e===Qe&&process.env.NODE_ENV==="test"?"react-aria":`react-aria${e.prefix}`;return t||`${n}-${r}`}function Ns(t){let e=a.useId(),[r]=a.useState(et()),n=r||process.env.NODE_ENV==="test"?"react-aria":`react-aria${Qe.prefix}`;return t||`${n}-${e}`}const Ks=typeof a.useId=="function"?Ns:Ts;function Ps(){return!1}function Ls(){return!0}function Is(t){return()=>{}}function et(){return typeof a.useSyncExternalStore=="function"?a.useSyncExternalStore(Is,Ps,Ls):a.useContext(ks)}let Ms=!!(typeof window<"u"&&window.document&&window.document.createElement),Ne=new Map,Ke;typeof FinalizationRegistry<"u"&&(Ke=new FinalizationRegistry(t=>{Ne.delete(t)}));let Kt=new WeakMap;function tt(t){let[e,r]=a.useState(t),n=a.useRef(null),o=Ks(e),i=a.useRef(null),s=Kt.get(i);if(Ke&&s!==o&&(s!=null&&Ke.unregister(i),Ke.register(i,o,i),Kt.set(i,o)),Ms){const l=Ne.get(o);l&&!l.includes(n)?l.push(n):Ne.set(o,[n])}return we(()=>{let l=o;return()=>{Ke&&(Ke.unregister(i),Kt.delete(i)),Ne.delete(l)}},[o]),a.useEffect(()=>{let l=n.current;return l&&r(l),()=>{l&&(n.current=null)}}),o}function Ds(t,e){if(t===e)return t;let r=Ne.get(t);if(r)return r.forEach(o=>o.current=e),e;let n=Ne.get(e);return n?(n.forEach(o=>o.current=t),t):e}function Pt(...t){return t.length===1&&t[0]?t[0]:e=>{let r=!1;const n=t.map(o=>{const i=fn(o,e);return r||=typeof i=="function",i});if(r)return()=>{n.forEach((o,i)=>{typeof o=="function"?o():fn(t[i],null)})}}}function fn(t,e){if(typeof t=="function")return t(e);t!=null&&(t.current=e)}function oe(...t){let e={...t[0]};for(let r=1;r<t.length;r++){let n=t[r];for(let o in n){let i=e[o],s=n[o];typeof i=="function"&&typeof s=="function"&&o[0]==="o"&&o[1]==="n"&&o.charCodeAt(2)>=65&&o.charCodeAt(2)<=90?e[o]=Oe(i,s):(o==="className"||o==="UNSAFE_className")&&typeof i=="string"&&typeof s=="string"?e[o]=P(i,s):o==="id"&&i&&s?e.id=Ds(i,s):o==="ref"&&i&&s?e.ref=Pt(i,s):e[o]=s!==void 0?s:i}}return e}function Lt(t){const e=a.useRef(null),r=a.useRef(void 0),n=a.useCallback(o=>{if(typeof t=="function"){const i=t,s=i(o);return()=>{typeof s=="function"?s():i(null)}}else if(t)return t.current=o,()=>{t.current=null}},[t]);return a.useMemo(()=>({get current(){return e.current},set current(o){e.current=o,r.current&&(r.current(),r.current=void 0),o!=null&&(r.current=n(o))}}),[n])}const Fs=Symbol("default");function As({values:t,children:e}){for(let[r,n]of t)e=a.createElement(r.Provider,{value:n},e);return e}function It(t){let{className:e,style:r,children:n,defaultClassName:o,defaultChildren:i,defaultStyle:s,values:l,render:c}=t;return a.useMemo(()=>{let d,p,u;return typeof e=="function"?d=e({...l,defaultClassName:o}):d=e,typeof r=="function"?p=r({...l,defaultStyle:s||{}}):p=r,typeof n=="function"?u=n({...l,defaultChildren:i}):n==null?u=i:u=n,{className:d??o,style:p||s?{...s,...p}:void 0,children:u??i,"data-rac":"",render:c?g=>c(g,l):void 0}},[e,r,n,o,i,s,l,c])}function pn(t,e){let r=a.useContext(t);if(e===null)return null;if(r&&typeof r=="object"&&"slots"in r&&r.slots){let n=e||Fs;if(!r.slots[n]){let o=new Intl.ListFormat().format(Object.keys(r.slots).map(s=>`"${s}"`)),i=e?`Invalid slot "${e}".`:"A slot prop is required.";throw new Error(`${i} Valid slot names are ${o}.`)}return r.slots[n]}return r}function Os(t,e,r){let n=pn(r,t.slot)||{},{ref:o,...i}=n,s=Lt(a.useMemo(()=>Pt(e,o),[e,o])),l=oe(i,t);return"style"in i&&i.style&&"style"in t&&t.style&&(typeof i.style=="function"||typeof t.style=="function"?l.style=c=>{let d=typeof i.style=="function"?i.style(c):i.style,p={...c.defaultStyle,...d},u=typeof t.style=="function"?t.style({...c,defaultStyle:p}):t.style;return{...p,...u}}:l.style={...i.style,...t.style}),[l,s]}function _s(t,e,r){let{render:n,...o}=e,i=a.useRef(null),s=a.useMemo(()=>Pt(r,i),[r,i]);we(()=>{process.env.NODE_ENV!=="production"&&n&&(i.current?i.current.localName!==t&&console.warn(`Unexpected DOM element returned by custom \`render\` function. Expected <${t}>, got <${i.current.localName}>. This may break the component behavior and accessibility.`):console.warn("Ref was not connected to DOM element returned by custom `render` function. Did you forget to pass through or merge the `ref`?"))},[t,n]);let l={...o,ref:s};return n?n(l,void 0):a.createElement(t,l)}const hn={},rt=new Proxy({},{get(t,e){if(typeof e!="string")return;let r=hn[e];return r||(r=a.forwardRef(_s.bind(null,e)),hn[e]=r),r}}),zs="react-aria-clear-focus",Bs="react-aria-focus",Q=t=>Vs(t)?t.document:Ws(t)?t:t?.ownerDocument??(typeof document<"u"?document:void 0),le=t=>Q(t)?.defaultView??(typeof window<"u"?window:void 0);function bn(t){return t!==null&&typeof t=="object"&&"nodeType"in t&&typeof t.nodeType=="number"}function Vs(t){return typeof t=="object"&&t!=null&&"window"in t&&t.window===t}function Ws(t){return bn(t)&&t.nodeType===9}function Hs(t){return bn(t)&&t.nodeType===11&&"host"in t}let js=!1;function nt(){return js}function j(t,e){if(!nt())return e&&t?t.contains(e):!1;if(!t||!e)return!1;let r=e;for(;r!==null;){if(r===t)return!0;typeof r.assignedElements!="function"&&r.assignedSlot?.parentNode?r=r.assignedSlot.parentNode:Hs(r)?r=r.host:r=r.parentNode}return!1}const ce=(t=document)=>{if(!nt())return t.activeElement;let e=t.activeElement;for(;e&&"shadowRoot"in e&&e.shadowRoot?.activeElement;)e=e.shadowRoot.activeElement;return e};function O(t){if(nt()&&t.target instanceof Element&&t.target.shadowRoot){if("composedPath"in t)return t.composedPath()[0]??null;if("composedPath"in t.nativeEvent)return t.nativeEvent.composedPath()[0]??null}return t.target}function mn(t){if(!t)return!1;let e=t.getRootNode(),r=le(t);if(!(e instanceof r.Document||e instanceof r.ShadowRoot))return!1;let n=e.activeElement;return n!=null&&t.contains(n)}function gn(t){let e=Us(Q(t));e!==t&&(e&&Gs(e,t),t&&yn(t,e))}function Gs(t,e){t.dispatchEvent(new FocusEvent("blur",{relatedTarget:e})),t.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:e}))}function yn(t,e){t.dispatchEvent(new FocusEvent("focus",{relatedTarget:e})),t.dispatchEvent(new FocusEvent("focusin",{bubbles:!0,relatedTarget:e}))}function Us(t){let e=ce(t),r=e?.getAttribute("aria-activedescendant");return r&&t.getElementById(r)||e}function ge(t){if(qs())t.focus({preventScroll:!0});else{let e=Ys(t);t.focus(),Xs(e)}}let ot=null;function qs(){if(ot==null){ot=!1;try{document.createElement("div").focus({get preventScroll(){return ot=!0,!0}})}catch{}}return ot}function Ys(t){let e=t.parentNode,r=[],n=document.scrollingElement||document.documentElement;for(;e instanceof HTMLElement&&e!==n;)(e.offsetHeight<e.scrollHeight||e.offsetWidth<e.scrollWidth)&&r.push({element:e,scrollTop:e.scrollTop,scrollLeft:e.scrollLeft}),e=e.parentNode;return n instanceof HTMLElement&&r.push({element:n,scrollTop:n.scrollTop,scrollLeft:n.scrollLeft}),r}function Xs(t){for(let{element:e,scrollTop:r,scrollLeft:n}of t)e.scrollTop=r,e.scrollLeft=n}const Zs=typeof Element<"u"&&"checkVisibility"in Element.prototype;function Js(t){const e=le(t);if(!(t instanceof e.HTMLElement)&&!(t instanceof e.SVGElement))return!1;let{display:r,visibility:n}=t.style,o=r!=="none"&&n!=="hidden"&&n!=="collapse";if(o){const{getComputedStyle:i}=le(t);let{display:s,visibility:l}=i(t);o=s!=="none"&&l!=="hidden"&&l!=="collapse"}return o}function Rs(t,e){return!t.hasAttribute("hidden")&&!t.hasAttribute("data-react-aria-prevent-focus")&&(t.nodeName==="DETAILS"&&e&&e.nodeName!=="SUMMARY"?t.hasAttribute("open"):!0)}function Mt(t,e){return Zs?t.checkVisibility({visibilityProperty:!0})&&!t.closest("[data-react-aria-prevent-focus]"):t.nodeName!=="#comment"&&Js(t)&&Rs(t,e)&&(!t.parentElement||Mt(t.parentElement,t))}const Dt=["input:not([disabled]):not([type=hidden])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]",'[contenteditable]:not([contenteditable^="false"])',"permission"],Qs=Dt.join(":not([hidden]),")+",[tabindex]:not([disabled]):not([hidden])";Dt.push('[tabindex]:not([tabindex="-1"]):not([disabled])');const el=Dt.join(':not([hidden]):not([tabindex="-1"]),');function xn(t,e){return t.matches(Qs)&&!vn(t)&&(e?.skipVisibilityCheck||Mt(t))}function Ft(t){return t.matches(el)&&Mt(t)&&!vn(t)}function vn(t){let e=t;for(;e!=null;){if(e instanceof le(e).HTMLElement&&e.inert)return!0;e=e.parentElement}return!1}function At(t){let e=t;return e.nativeEvent=t,e.isDefaultPrevented=()=>e.defaultPrevented,e.isPropagationStopped=()=>e.cancelBubble,e.persist=()=>{},e}function wn(t,e){Object.defineProperty(t,"target",{value:e}),Object.defineProperty(t,"currentTarget",{value:e})}function En(t){let e=a.useRef({isFocused:!1,observer:null});return we(()=>{const r=e.current;return()=>{r.observer&&(r.observer.disconnect(),r.observer=null)}},[]),a.useCallback(r=>{let n=O(r);if(n instanceof HTMLButtonElement||n instanceof HTMLInputElement||n instanceof HTMLTextAreaElement||n instanceof HTMLSelectElement){e.current.isFocused=!0;let o=n,i=s=>{if(e.current.isFocused=!1,o.disabled){let l=At(s);t?.(l)}e.current.observer&&(e.current.observer.disconnect(),e.current.observer=null)};o.addEventListener("focusout",i,{once:!0}),e.current.observer=new MutationObserver(()=>{if(e.current.isFocused&&o.disabled){e.current.observer?.disconnect();let s=o===ce()?null:ce();o.dispatchEvent(new FocusEvent("blur",{relatedTarget:s})),o.dispatchEvent(new FocusEvent("focusout",{bubbles:!0,relatedTarget:s}))}}),e.current.observer.observe(o,{attributes:!0,attributeFilter:["disabled"]})}},[t])}let it=!1;function Sn(t){for(;t&&!xn(t,{skipVisibilityCheck:!0});)t=t.parentElement;let e=le(t),r=e.document.activeElement;if(!r||r===t)return;it=!0;let n=!1,o=p=>{(O(p)===r||n)&&p.stopImmediatePropagation()},i=p=>{(O(p)===r||n)&&(p.stopImmediatePropagation(),!t&&!n&&(n=!0,ge(r),c()))},s=p=>{(O(p)===t||n)&&p.stopImmediatePropagation()},l=p=>{(O(p)===t||n)&&(p.stopImmediatePropagation(),n||(n=!0,ge(r),c()))};e.addEventListener("blur",o,!0),e.addEventListener("focusout",i,!0),e.addEventListener("focusin",l,!0),e.addEventListener("focus",s,!0);let c=()=>{cancelAnimationFrame(d),e.removeEventListener("blur",o,!0),e.removeEventListener("focusout",i,!0),e.removeEventListener("focusin",l,!0),e.removeEventListener("focus",s,!0),it=!1,n=!1},d=requestAnimationFrame(c);return c}function st(t){if(typeof window>"u"||window.navigator==null)return!1;let e=window.navigator.userAgentData?.brands;return Array.isArray(e)&&e.some(r=>t.test(r.brand))||t.test(window.navigator.userAgent)}function Ot(t){return typeof window<"u"&&window.navigator!=null?t.test(window.navigator.userAgentData?.platform||window.navigator.platform):!1}function he(t){if(process.env.NODE_ENV==="test")return t;let e=null;return()=>(e==null&&(e=t()),e)}const ue=he(function(){return Ot(/^Mac/i)}),tl=he(function(){return Ot(/^iPhone/i)}),kn=he(function(){return Ot(/^iPad/i)||ue()&&navigator.maxTouchPoints>1}),_e=he(function(){return tl()||kn()}),rl=he(function(){return ue()||_e()}),Pe=he(function(){return st(/AppleWebKit/i)&&(_e()||!Cn())});he(function(){return Pe()&&!Cn()&&!$n()});const Cn=he(function(){return st(/Chrome|CriOS|CrMo/i)}),_t=he(function(){return st(/Android/i)}),$n=he(function(){return st(/(Firefox|FxiOS)/i)});function zt(t){return t.pointerType===""&&t.isTrusted?!0:_t()&&t.pointerType?t.type==="click"&&t.buttons===1:t.detail===0&&!t.pointerType}function nl(t){return!_t()&&t.width===0&&t.height===0||_t()&&t.width===1&&t.height===1&&t.pressure===0&&t.detail===0&&t.pointerType==="mouse"}const ol=a.createContext({isNative:!0,open:sl,useHref:t=>t});function Bt(){return a.useContext(ol)}function ye(t,e,r=!0){let{metaKey:n,ctrlKey:o,altKey:i,shiftKey:s}=e;!Pe()&&$n()&&window.event?.type?.startsWith("key")&&t.target==="_blank"&&(ue()?n=!0:o=!0);let l=Pe()&&ue()&&!kn()&&process.env.NODE_ENV!=="test"?new KeyboardEvent("keydown",{keyIdentifier:"Enter",metaKey:n,ctrlKey:o,altKey:i,shiftKey:s}):new MouseEvent("click",{metaKey:n,ctrlKey:o,altKey:i,shiftKey:s,detail:1,bubbles:!0,cancelable:!0});ye.isOpening=r,ge(t),t.dispatchEvent(l),ye.isOpening=!1}ye.isOpening=!1;function il(t,e){if(t instanceof HTMLAnchorElement)e(t);else if(t.hasAttribute("data-href")){let r=document.createElement("a");r.href=t.getAttribute("data-href"),t.hasAttribute("data-target")&&(r.target=t.getAttribute("data-target")),t.hasAttribute("data-rel")&&(r.rel=t.getAttribute("data-rel")),t.hasAttribute("data-download")&&(r.download=t.getAttribute("data-download")),t.hasAttribute("data-ping")&&(r.ping=t.getAttribute("data-ping")),t.hasAttribute("data-referrer-policy")&&(r.referrerPolicy=t.getAttribute("data-referrer-policy")),t.appendChild(r),e(r),t.removeChild(r)}}function sl(t,e){il(t,r=>ye(r,e))}function ll(t){const r=Bt().useHref(t?.href??"");let n={};if(t)for(let o of["href","target","rel","download","ping","referrerPolicy"])o in t&&t[o]!==void 0&&(n[o]=o==="href"?r:t[o]);return n}let Le=null;const Vt=new Set;let ze=new Map,$e=!1,Wt=!1;const al={Tab:!0,Escape:!0};function Ht(t,e){for(let r of Vt)r(t,e)}function cl(t){return!(t.metaKey||!ue()&&t.altKey||t.ctrlKey||t.key==="Control"||t.key==="Shift"||t.key==="Meta")}function lt(t){$e=!0,!ye.isOpening&&cl(t)&&(Le="keyboard",Ht("keyboard",t))}function de(t){Le="pointer","pointerType"in t&&t.pointerType,(t.type==="mousedown"||t.type==="pointerdown")&&($e=!0,Ht("pointer",t))}function Tn(t){!ye.isOpening&&zt(t)&&($e=!0,Le="virtual")}function Nn(t){let e=le(O(t)),r=Q(O(t));O(t)===e||O(t)===r||it||!t.isTrusted||(!$e&&!Wt&&(Le="virtual",Ht("virtual",t)),$e=!1,Wt=!1)}function Kn(){it||($e=!1,Wt=!0)}function jt(t){if(typeof window>"u"||typeof document>"u")return;const e=le(t),r=Q(t);if(ze.get(e))return;let n=e.HTMLElement.prototype.focus;Reflect.defineProperty(e.HTMLElement.prototype,"focus",{configurable:!0,writable:!0,value:function(){$e=!0,n.apply(this,arguments)}}),r.addEventListener("keydown",lt,!0),r.addEventListener("keyup",lt,!0),r.addEventListener("click",Tn,!0),e.addEventListener("focus",Nn,!0),e.addEventListener("blur",Kn,!1),typeof PointerEvent<"u"?(r.addEventListener("pointerdown",de,!0),r.addEventListener("pointermove",de,!0),r.addEventListener("pointerup",de,!0)):process.env.NODE_ENV==="test"&&(r.addEventListener("mousedown",de,!0),r.addEventListener("mousemove",de,!0),r.addEventListener("mouseup",de,!0)),e.addEventListener("beforeunload",()=>{Pn(t)},{once:!0}),ze.set(e,{focus:n})}const Pn=(t,e)=>{const r=le(t),n=Q(t);e&&n.removeEventListener("DOMContentLoaded",e),ze.has(r)&&(Reflect.defineProperty(r.HTMLElement.prototype,"focus",{configurable:!0,writable:!0,value:ze.get(r).focus}),n.removeEventListener("keydown",lt,!0),n.removeEventListener("keyup",lt,!0),n.removeEventListener("click",Tn,!0),r.removeEventListener("focus",Nn,!0),r.removeEventListener("blur",Kn,!1),typeof PointerEvent<"u"?(n.removeEventListener("pointerdown",de,!0),n.removeEventListener("pointermove",de,!0),n.removeEventListener("pointerup",de,!0)):process.env.NODE_ENV==="test"&&(n.removeEventListener("mousedown",de,!0),n.removeEventListener("mousemove",de,!0),n.removeEventListener("mouseup",de,!0)),ze.delete(r))};function dl(t){const e=Q(t);let r;return e.readyState!=="loading"?jt(t):(r=()=>{jt(t)},e.addEventListener("DOMContentLoaded",r)),()=>Pn(t,r)}typeof document<"u"&&dl();function Gt(){return Le!=="pointer"}function Ut(){return Le}const ul=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function fl(t,e,r){let n=r?O(r):void 0,o=Q(n),i=le(n);const s=typeof i<"u"?i.HTMLInputElement:HTMLInputElement,l=typeof i<"u"?i.HTMLTextAreaElement:HTMLTextAreaElement,c=typeof i<"u"?i.HTMLElement:HTMLElement,d=typeof i<"u"?i.KeyboardEvent:KeyboardEvent;let p=ce(o);return t=t||p instanceof s&&!ul.has(p.type)||p instanceof l||p instanceof c&&p.isContentEditable,!(t&&e==="keyboard"&&r instanceof d&&!al[r.key])}function pl(t,e,r){jt(),a.useEffect(()=>{if(r?.enabled===!1)return;let n=(o,i)=>{fl(!!r?.isTextInput,o,i)&&t(Gt())};return Vt.add(n),()=>{Vt.delete(n)}},e)}function Be(t){return ue()?t.metaKey:t.ctrlKey}const hl=a.useInsertionEffect??we;function at(t){const e=a.useRef(null);return hl(()=>{e.current=t},[t]),a.useCallback((...r)=>{const n=e.current;return n?.(...r)},[])}function ct(t,e,r,n){let o=at(r),i=r==null;a.useEffect(()=>{if(i||!t.current)return;let s=t.current;return s.addEventListener(e,o,n),()=>{s.removeEventListener(e,o,n)}},[t,e,n,i])}function bl(t,e){let{id:r,"aria-label":n,"aria-labelledby":o}=t;return r=tt(r),o&&n?o=[...new Set([r,...o.trim().split(/\s+/)])].join(" "):o&&(o=o.trim().split(/\s+/).join(" ")),!n&&!o&&e&&(n=e),{id:r,"aria-label":n,"aria-labelledby":o}}const ml=new Set(["Arab","Syrc","Samr","Mand","Thaa","Mend","Nkoo","Adlm","Rohg","Hebr"]),gl=new Set(["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"]);function yl(t){if(Intl.Locale){let r=new Intl.Locale(t).maximize(),n=typeof r.getTextInfo=="function"?r.getTextInfo():r.textInfo;if(n)return n.direction==="rtl";if(r.script)return ml.has(r.script)}let e=t.split("-")[0];return gl.has(e)}const Ln=Symbol.for("react-aria.i18n.locale");function In(){let t=typeof window<"u"&&window[Ln]||typeof navigator<"u"&&(navigator.language||navigator.userLanguage)||"en-US";try{Intl.DateTimeFormat.supportedLocalesOf([t])}catch{t="en-US"}return{locale:t,direction:yl(t)?"rtl":"ltr"}}let qt=In(),Ve=new Set;function Mn(){qt=In();for(let t of Ve)t(qt)}function xl(){let t=et(),[e,r]=a.useState(qt);return a.useEffect(()=>(Ve.size===0&&window.addEventListener("languagechange",Mn),Ve.add(r),()=>{Ve.delete(r),Ve.size===0&&window.removeEventListener("languagechange",Mn)}),[]),t?{locale:typeof window<"u"&&window[Ln]||"en-US",direction:"ltr"}:e}const vl=a.createContext(null);function Dn(){let t=xl();return a.useContext(vl)||t}const wl=typeof document<"u"?a.useInsertionEffect??a.useLayoutEffect:()=>{};function Fn(t,e,r){let[n,o]=a.useState(t||e),i=a.useRef(n),s=a.useRef(t!==void 0),l=t!==void 0;a.useEffect(()=>{let u=s.current;u!==l&&process.env.NODE_ENV!=="production"&&console.warn(`WARN: A component changed from ${u?"controlled":"uncontrolled"} to ${l?"controlled":"uncontrolled"}.`),s.current=l},[l]);let c=l?t:n;wl(()=>{i.current=c});let[,d]=a.useReducer(()=>({}),{}),p=a.useCallback((u,...g)=>{let b=typeof u=="function"?u(i.current):u;Object.is(i.current,b)||(i.current=b,o(b),d(),r?.(b,...g))},[r]);return[c,p]}class We{constructor(e){this.value=null,this.level=0,this.hasChildNodes=!1,this.rendered=null,this.textValue="",this["aria-label"]=void 0,this.index=0,this.parentKey=null,this.prevKey=null,this.nextKey=null,this.firstChildKey=null,this.lastChildKey=null,this.props={},this.colSpan=null,this.colIndex=null,this.type=this.constructor.type,this.key=e}get childNodes(){throw new Error("childNodes is not supported")}clone(){let e=new this.constructor(this.key);return e.value=this.value,e.level=this.level,e.hasChildNodes=this.hasChildNodes,e.rendered=this.rendered,e.textValue=this.textValue,e["aria-label"]=this["aria-label"],e.index=this.index,e.parentKey=this.parentKey,e.prevKey=this.prevKey,e.nextKey=this.nextKey,e.firstChildKey=this.firstChildKey,e.lastChildKey=this.lastChildKey,e.props=this.props,e.render=this.render,e.colSpan=this.colSpan,e.colIndex=this.colIndex,e}filter(e,r,n){let o=this.clone();return r.addDescendants(o,e),o}}class An extends We{filter(e,r,n){let[o,i]=Vn(e,r,this.firstChildKey,n),s=this.clone();return s.firstChildKey=o,s.lastChildKey=i,s}}const xr=class xr extends We{};xr.type="header";let On=xr;const vr=class vr extends We{};vr.type="loader";let _n=vr;const wr=class wr extends An{filter(e,r,n){if(n(this.textValue,this)){let o=this.clone();return r.addDescendants(o,e),o}return null}};wr.type="item";let zn=wr;const Er=class Er extends An{filter(e,r,n){let o=super.filter(e,r,n);if(o&&o.lastChildKey!==null){let i=e.getItem(o.lastChildKey);if(i&&i.type!=="header")return o}return null}};Er.type="section";let Bn=Er;class El{get size(){return this.itemCount}getKeys(){return this.keyMap.keys()}*[Symbol.iterator](){let e=this.firstKey!=null?this.keyMap.get(this.firstKey):void 0;for(;e;)yield e,e=e.nextKey!=null?this.keyMap.get(e.nextKey):void 0}getChildren(e){let r=this.keyMap;return{*[Symbol.iterator](){let n=r.get(e),o=n?.firstChildKey!=null?r.get(n.firstChildKey):null;for(;o;)yield o,o=o.nextKey!=null?r.get(o.nextKey):void 0}}}getKeyBefore(e){let r=this.keyMap.get(e);if(!r)return null;if(r.prevKey!=null){for(r=this.keyMap.get(r.prevKey);r&&r.type!=="item"&&r.lastChildKey!=null;)r=this.keyMap.get(r.lastChildKey);return r?.key??null}return r.parentKey}getKeyAfter(e){let r=this.keyMap.get(e);if(!r)return null;if(r.type!=="item"&&r.firstChildKey!=null)return r.firstChildKey;for(;r;){if(r.nextKey!=null)return r.nextKey;if(r.parentKey!=null)r=this.keyMap.get(r.parentKey);else return null}return null}getFirstKey(){return this.firstKey}getLastKey(){let e=this.lastKey!=null?this.keyMap.get(this.lastKey):null;for(;e?.lastChildKey!=null;)e=this.keyMap.get(e.lastChildKey);return e?.key??null}getItem(e){return this.keyMap.get(e)??null}at(){throw new Error("Not implemented")}clone(){let e=this.constructor,r=new e;return r.keyMap=new Map(this.keyMap),r.firstKey=this.firstKey,r.lastKey=this.lastKey,r.itemCount=this.itemCount,r}addNode(e){if(this.frozen)throw new Error("Cannot add a node to a frozen collection");e.type==="item"&&this.keyMap.get(e.key)==null&&this.itemCount++,this.keyMap.set(e.key,e)}addDescendants(e,r){this.addNode(e);let n=r.getChildren(e.key);for(let o of n)this.addDescendants(o,r)}removeNode(e){if(this.frozen)throw new Error("Cannot remove a node to a frozen collection");let r=this.keyMap.get(e);r!=null&&r.type==="item"&&this.itemCount--,this.keyMap.delete(e)}commit(e,r,n=!1){if(this.frozen)throw new Error("Cannot commit a frozen collection");this.firstKey=e,this.lastKey=r,this.frozen=!n}filter(e){let r=new this.constructor,[n,o]=Vn(this,r,this.firstKey,e);return r?.commit(n,o),r}constructor(){this.keyMap=new Map,this.firstKey=null,this.lastKey=null,this.frozen=!1,this.itemCount=0}}function Vn(t,e,r,n){if(r==null)return[null,null];let o=null,i=null,s=t.getItem(r);for(;s!=null;){let l=s.filter(t,e,n);l!=null&&(l.nextKey=null,i&&(l.prevKey=i.key,i.nextKey=l.key),o==null&&(o=l),e.addNode(l),i=l),s=s.nextKey!=null?t.getItem(s.nextKey):null}if(i&&i.type==="separator"){let l=i.prevKey;e.removeNode(i.key),l!=null?(i=e.getItem(l),i.nextKey=null):i=null}return[o?.key??null,i?.key??null]}class Wn{constructor(e){this._firstChild=null,this._lastChild=null,this._previousSibling=null,this._nextSibling=null,this._parentNode=null,this._minInvalidChildIndex=null,this.ownerDocument=e}*[Symbol.iterator](){let e=this.firstChild;for(;e;)yield e,e=e.nextSibling}get firstChild(){return this._firstChild}set firstChild(e){this._firstChild=e,this.ownerDocument.markDirty(this)}get lastChild(){return this._lastChild}set lastChild(e){this._lastChild=e,this.ownerDocument.markDirty(this)}get previousSibling(){return this._previousSibling}set previousSibling(e){this._previousSibling=e,this.ownerDocument.markDirty(this)}get nextSibling(){return this._nextSibling}set nextSibling(e){this._nextSibling=e,this.ownerDocument.markDirty(this)}get parentNode(){return this._parentNode}set parentNode(e){this._parentNode=e,this.ownerDocument.markDirty(this)}get isConnected(){return this.parentNode?.isConnected||!1}invalidateChildIndices(e){(this._minInvalidChildIndex==null||!this._minInvalidChildIndex.isConnected||e.index<this._minInvalidChildIndex.index)&&(this._minInvalidChildIndex=e,this.ownerDocument.markDirty(this))}updateChildIndices(){let e=this._minInvalidChildIndex;for(;e;)e.index=e.previousSibling?e.previousSibling.index+1:0,e=e.nextSibling;this._minInvalidChildIndex=null}appendChild(e){e.parentNode&&e.parentNode.removeChild(e),this.firstChild==null&&(this.firstChild=e),this.lastChild?(this.lastChild.nextSibling=e,e.index=this.lastChild.index+1,e.previousSibling=this.lastChild):(e.previousSibling=null,e.index=0),e.parentNode=this,e.nextSibling=null,this.lastChild=e,this.ownerDocument.markDirty(this),this.isConnected&&this.ownerDocument.queueUpdate()}insertBefore(e,r){if(r==null)return this.appendChild(e);e.parentNode&&e.parentNode.removeChild(e),e.nextSibling=r,e.previousSibling=r.previousSibling,e.index=r.index-1,this.firstChild===r?this.firstChild=e:r.previousSibling&&(r.previousSibling.nextSibling=e),r.previousSibling=e,e.parentNode=r.parentNode,this.invalidateChildIndices(e),this.isConnected&&this.ownerDocument.queueUpdate()}removeChild(e){e.parentNode===this&&(this._minInvalidChildIndex===e&&(this._minInvalidChildIndex=null),e.nextSibling&&(this.invalidateChildIndices(e.nextSibling),e.nextSibling.previousSibling=e.previousSibling),e.previousSibling&&(e.previousSibling.nextSibling=e.nextSibling),this.firstChild===e&&(this.firstChild=e.nextSibling),this.lastChild===e&&(this.lastChild=e.previousSibling),e.parentNode=null,e.nextSibling=null,e.previousSibling=null,e.index=0,this.ownerDocument.markDirty(e),this.isConnected&&this.ownerDocument.queueUpdate())}addEventListener(){}removeEventListener(){}get previousVisibleSibling(){let e=this.previousSibling;for(;e&&e.isHidden;)e=e.previousSibling;return e}get nextVisibleSibling(){let e=this.nextSibling;for(;e&&e.isHidden;)e=e.nextSibling;return e}get firstVisibleChild(){let e=this.firstChild;for(;e&&e.isHidden;)e=e.nextSibling;return e}get lastVisibleChild(){let e=this.lastChild;for(;e&&e.isHidden;)e=e.previousSibling;return e}}class Ie extends Wn{constructor(e,r){super(r),this.nodeType=8,this.isMutated=!0,this._index=0,this.isHidden=!1,this.node=null}get index(){return this._index}set index(e){this._index=e,this.ownerDocument.markDirty(this)}get level(){return this.parentNode instanceof Ie?this.parentNode.level+(this.parentNode.node?.type==="item"?1:0):0}getMutableNode(){return this.node==null?null:(this.isMutated||(this.node=this.node.clone(),this.isMutated=!0),this.ownerDocument.markDirty(this),this.node)}updateNode(){let e=this.nextVisibleSibling,r=this.getMutableNode();if(r!=null&&(r.index=this.index,r.level=this.level,r.parentKey=this.parentNode instanceof Ie?this.parentNode.node?.key??null:null,r.prevKey=this.previousVisibleSibling?.node?.key??null,r.nextKey=e?.node?.key??null,r.hasChildNodes=!!this.firstChild,r.firstChildKey=this.firstVisibleChild?.node?.key??null,r.lastChildKey=this.lastVisibleChild?.node?.key??null,(r.colSpan!=null||r.colIndex!=null)&&e)){let n=(r.colIndex??r.index)+(r.colSpan??1);if(e.node!=null&&n!==e.node.colIndex){let o=e.getMutableNode();o.colIndex=n}}}setProps(e,r,n,o,i){let s,{value:l,textValue:c,id:d,...p}=e;if(this.node==null?(s=new n(d??`react-aria-${++this.ownerDocument.nodeId}`),this.node=s):s=this.getMutableNode(),p.ref=r,s.props=p,s.rendered=o,s.render=i,s.value=l,e["aria-label"]&&(s["aria-label"]=e["aria-label"]),s.textValue=c||(typeof p.children=="string"?p.children:"")||e["aria-label"]||"",d!=null&&d!==s.key)throw new Error("Cannot change the id of an item");p.colSpan!=null&&(s.colSpan=p.colSpan),this.isConnected&&this.ownerDocument.queueUpdate()}get style(){let e=this;return{get display(){return e.isHidden?"none":""},set display(r){let n=r==="none";if(e.isHidden!==n){(e.parentNode?.firstVisibleChild===e||e.parentNode?.lastVisibleChild===e)&&e.ownerDocument.markDirty(e.parentNode);let o=e.previousVisibleSibling,i=e.nextVisibleSibling;o&&e.ownerDocument.markDirty(o),i&&e.ownerDocument.markDirty(i),e.isHidden=n,e.ownerDocument.markDirty(e)}}}}hasAttribute(){}setAttribute(){}setAttributeNS(){}removeAttribute(){}}class Sl extends Wn{constructor(e){super(null),this.nodeType=11,this.ownerDocument=this,this.dirtyNodes=new Set,this.isSSR=!1,this.nodeId=0,this.nodesByProps=new WeakMap,this.nextCollection=null,this.subscriptions=new Set,this.queuedRender=!1,this.inSubscription=!1,this.collection=e,this.nextCollection=e}get isConnected(){return!0}createElement(e){return new Ie(e,this)}getMutableCollection(){return this.nextCollection||(this.nextCollection=this.collection.clone()),this.nextCollection}markDirty(e){this.dirtyNodes.add(e)}addNode(e){if(e.isHidden||e.node==null)return;let r=this.getMutableCollection();if(!r.getItem(e.node.key))for(let n of e)this.addNode(n);r.addNode(e.node)}removeNode(e){for(let r of e)this.removeNode(r);e.node&&this.getMutableCollection().removeNode(e.node.key)}getCollection(){return this.inSubscription?this.collection:(this.queuedRender=!1,this.updateCollection(),this.collection)}updateCollection(){for(let e of this.dirtyNodes)e instanceof Ie&&(!e.isConnected||e.isHidden)?this.removeNode(e):e.updateChildIndices();for(let e of this.dirtyNodes)e instanceof Ie?(e.isConnected&&!e.isHidden&&(e.updateNode(),this.addNode(e)),e.node&&this.dirtyNodes.delete(e),e.isMutated=!1):this.dirtyNodes.delete(e);this.nextCollection&&(this.nextCollection.commit(this.firstVisibleChild?.node?.key??null,this.lastVisibleChild?.node?.key??null,this.isSSR),this.isSSR||(this.collection=this.nextCollection,this.nextCollection=null))}queueUpdate(){if(!(this.dirtyNodes.size===0||this.queuedRender)){this.queuedRender=!0,this.inSubscription=!0,this.isSSR||(this.collection=this.collection.clone());for(let e of this.subscriptions)e();this.inSubscription=!1}}subscribe(e){return this.subscriptions.add(e),this.queuedRender&&e(),()=>this.subscriptions.delete(e)}resetAfterSSR(){this.isSSR&&(this.isSSR=!1,this.firstChild=null,this.lastChild=null,this.nodeId=0)}}function Hn(t){let{children:e,items:r,idScope:n,addIdAndValue:o,dependencies:i=[]}=t,s=a.useMemo(()=>process.env.NODE_ENV!=="production"&&typeof e=="function"?e.toString():void 0,[e]),l=a.useMemo(()=>new WeakMap,[...i,s]);return a.useMemo(()=>{if(r&&typeof e=="function"){let c=[];for(let d of r){let p=kl(d)?d:null,u=p?l.get(p):null;if(!u){u=e(d);let g=u.props.id??d?.key??d?.id;n!=null&&u.props.id==null&&g!=null&&(g=n+":"+g);let b=g??c.length;u=a.cloneElement(u,o?{key:b,id:g,value:d}:{key:b}),p&&l.set(p,u)}c.push(u)}return c}else if(typeof e!="function")return e},[e,r,l,n,o])}function kl(t){switch(typeof t){case"object":return t!=null;case"function":case"symbol":return!0;default:return!1}}let Ee=new Map,Yt=new Set;function jn(){if(typeof window>"u")return;function t(n){return"propertyName"in n}let e=n=>{let o=O(n);if(!t(n)||!o)return;let i=Ee.get(o);i||(i=new Set,Ee.set(o,i),o.addEventListener("transitioncancel",r,{once:!0})),i.add(n.propertyName)},r=n=>{let o=O(n);if(!t(n)||!o)return;let i=Ee.get(o);if(i&&(i.delete(n.propertyName),i.size===0&&(o.removeEventListener("transitioncancel",r),Ee.delete(o)),Ee.size===0)){for(let s of Yt)s();Yt.clear()}};document.body.addEventListener("transitionrun",e),document.body.addEventListener("transitionend",r)}typeof document<"u"&&(document.readyState!=="loading"?jn():document.addEventListener("DOMContentLoaded",jn));function Cl(){for(const[t]of Ee)"isConnected"in t&&!t.isConnected&&Ee.delete(t)}function Gn(t){requestAnimationFrame(()=>{Cl(),Ee.size===0?t():Yt.add(t)})}function dt(t){if(!t.isConnected)return;const e=Q(t);if(Ut()==="virtual"){let r=ce(e);Gn(()=>{const n=ce(e);(n===r||n===e.body)&&t.isConnected&&ge(t)})}else ge(t)}function Un(t){let{isDisabled:e,onFocus:r,onBlur:n,onFocusChange:o}=t;const i=a.useCallback(c=>{if(O(c)===c.currentTarget)return n&&n(c),o&&o(!1),!0},[n,o]),s=En(i),l=a.useCallback(c=>{let d=O(c);const p=Q(d),u=p?ce(p):ce();d===c.currentTarget&&d===u&&(r&&r(c),o&&o(!0),s(c))},[o,r,s]);return{focusProps:{onFocus:!e&&(r||o||n)?l:void 0,onBlur:!e&&(n||o)?i:void 0}}}function ut(t){if(t)return e=>{let r=!0,n={...e,preventDefault(){e.preventDefault()},isDefaultPrevented(){return e.isDefaultPrevented()},stopPropagation(){r&&process.env.NODE_ENV!=="production"?console.error("stopPropagation is now the default behavior for events in React Spectrum. You can use continuePropagation() to revert this behavior."):r=!0},continuePropagation(){r=!1,typeof e.continuePropagation=="function"&&e.continuePropagation()},isPropagationStopped(){return r}};t(n),r&&!(typeof e.isPropagationStopped=="function"&&e.isPropagationStopped())&&e.stopPropagation()}}const $l=new Set(["shift","alt","control","meta","mod"]),Tl=["Alt","Control","Meta","Shift"];function Nl(t){let e=new Set;return t.alt&&e.add("Alt"),t.shift&&e.add("Shift"),t.ctrl&&e.add("Control"),t.meta&&e.add("Meta"),t.mod&&e.add(ue()?"Meta":"Control"),e}function Kl(t){let e=new Set;return t.altKey&&e.add("Alt"),t.ctrlKey&&e.add("Control"),t.metaKey&&e.add("Meta"),t.shiftKey&&e.add("Shift"),e}function qn(t){return Tl.filter(e=>t.has(e))}function Pl(t){let e=t.split("+").reduce((r,n)=>{let o=n.toLowerCase();return $l.has(o)?o==="shift"?r.shift=!0:o==="alt"?r.alt=!0:o==="control"?r.ctrl=!0:o==="meta"?r.meta=!0:o==="mod"&&(r.mod=!0):r.key=n,r},{shift:!1,alt:!1,ctrl:!1,meta:!1,mod:!1,key:""});if(e.key==="")throw new Error(`Invalid keyboard shortcut: "${t}". Must include exactly one non-modifier key (e.g. "a", "Enter", "ArrowDown"). Combine any of Shift, Alt, Ctrl, Meta, and Mod.`);return e}function Yn(t){return t.toLowerCase()}const Ll={space:" ",esc:"escape",del:"delete",ins:"insert",left:"arrowleft",right:"arrowright",up:"arrowup",down:"arrowdown",pageup:"pageup",pagedown:"pagedown"};function Il(t){let e=Yn(t),r=Ll[e];return r??e}function Ml(t){let e=qn(Nl(t)),r=Il(t.key);return e.length>0?`${e.join("+")}+${r}`:r}function Dl(t){let e=qn(Kl(t)),r=Yn(t.key);return(e.length>0?`${e.join("+")}+`:"")+r}function Fl(t){let e=new Map;for(let[r,n]of Object.entries(t)){let o=Pl(r);e.set(Ml(o),n)}return r=>{let n=Dl(r),o=e.get(n),i=o?.(r);i===void 0&&o!==void 0?i={shouldContinuePropagation:!1,shouldPreventDefault:!0}:typeof i=="boolean"&&(i={shouldContinuePropagation:!i,shouldPreventDefault:i}),i?.shouldPreventDefault&&r.preventDefault(),(!o||i?.shouldContinuePropagation)&&r.continuePropagation()}}function Xt(t){let{shortcuts:e,allowRepeats:r=!1,allowComposing:n=!1}=t,o,i;if(e){let s=Fl(e),l=ut(d=>{if(!j(d.currentTarget,O(d))){d.continuePropagation();return}if(d.nativeEvent?.repeat&&!r||d.nativeEvent?.isComposing&&!n){d.continuePropagation();return}s(d)}),c=ut(d=>{if(!j(d.currentTarget,O(d))){d.continuePropagation();return}if(d.nativeEvent?.repeat&&!r||d.nativeEvent?.isComposing&&!n){d.continuePropagation();return}d.continuePropagation()});o=t.onKeyDown?Oe(t.onKeyDown,l):l,i=t.onKeyUp?Oe(t.onKeyUp,c):c}else o=ut(t.onKeyDown),i=ut(t.onKeyUp);return{keyboardProps:t.isDisabled?{}:{onKeyDown:o,onKeyUp:i}}}function Xn(t,e){we(()=>{if(t&&t.ref&&e)return t.ref.current=e.current,()=>{t.ref&&(t.ref.current=null)}})}let Zt=a.createContext(null);function Al(t){let e=a.useContext(Zt)||{};Xn(e,t);let{ref:r,...n}=e;return n}function Ol(t,e){let{focusProps:r}=Un(t),{keyboardProps:n}=Xt(t),o=oe(r,n),i=Al(e),s=t.isDisabled?{}:i,l=a.useRef(t.autoFocus);a.useEffect(()=>{l.current&&e.current&&dt(e.current),l.current=!1},[e]);let c=t.excludeFromTabOrder?-1:0;return t.isDisabled&&(c=void 0),{focusableProps:oe({...o,tabIndex:c},s)}}typeof HTMLTemplateElement<"u"&&(Object.defineProperty(HTMLTemplateElement.prototype,"firstChild",{configurable:!0,enumerable:!0,get:function(){return this.content.firstChild}}),Object.defineProperty(HTMLTemplateElement.prototype,"appendChild",{configurable:!0,enumerable:!0,value:function(t){return this.content.appendChild(t)}}),Object.defineProperty(HTMLTemplateElement.prototype,"removeChild",{configurable:!0,enumerable:!0,value:function(t){return this.content.removeChild(t)}}),Object.defineProperty(HTMLTemplateElement.prototype,"insertBefore",{configurable:!0,enumerable:!0,value:function(t,e){return this.content.insertBefore(t,e)}}));const Zn=a.createContext(!1);function _l(t){if(a.useContext(Zn))return a.createElement(a.Fragment,null,t.children);let r=a.createElement(Zn.Provider,{value:!0},t.children);return a.createElement("template",null,r)}var ft={exports:{}},Jt={};var Jn;function zl(){if(Jn)return Jt;Jn=1;var t=a;function e(u,g){return u===g&&(u!==0||1/u===1/g)||u!==u&&g!==g}var r=typeof Object.is=="function"?Object.is:e,n=t.useState,o=t.useEffect,i=t.useLayoutEffect,s=t.useDebugValue;function l(u,g){var b=g(),v=n({inst:{value:b,getSnapshot:g}}),x=v[0].inst,w=v[1];return i(function(){x.value=b,x.getSnapshot=g,c(x)&&w({inst:x})},[u,b,g]),o(function(){return c(x)&&w({inst:x}),u(function(){c(x)&&w({inst:x})})},[u]),s(b),b}function c(u){var g=u.getSnapshot;u=u.value;try{var b=g();return!r(u,b)}catch{return!0}}function d(u,g){return g()}var p=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?d:l;return Jt.useSyncExternalStore=t.useSyncExternalStore!==void 0?t.useSyncExternalStore:p,Jt}var Rt={};var Rn;function Bl(){return Rn||(Rn=1,process.env.NODE_ENV!=="production"&&(function(){function t(b,v){return b===v&&(b!==0||1/b===1/v)||b!==b&&v!==v}function e(b,v){p||o.startTransition===void 0||(p=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var x=v();if(!u){var w=v();i(x,w)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),u=!0)}w=s({inst:{value:x,getSnapshot:v}});var k=w[0].inst,S=w[1];return c(function(){k.value=x,k.getSnapshot=v,r(k)&&S({inst:k})},[b,x,v]),l(function(){return r(k)&&S({inst:k}),b(function(){r(k)&&S({inst:k})})},[b]),d(x),x}function r(b){var v=b.getSnapshot;b=b.value;try{var x=v();return!i(b,x)}catch{return!0}}function n(b,v){return v()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var o=a,i=typeof Object.is=="function"?Object.is:t,s=o.useState,l=o.useEffect,c=o.useLayoutEffect,d=o.useDebugValue,p=!1,u=!1,g=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?n:e;Rt.useSyncExternalStore=o.useSyncExternalStore!==void 0?o.useSyncExternalStore:g,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()),Rt}var Qn;function Vl(){return Qn||(Qn=1,process.env.NODE_ENV==="production"?ft.exports=zl():ft.exports=Bl()),ft.exports}var Wl=Vl();const eo=a.createContext(!1),He=a.createContext(null);function Hl(t){if(a.useContext(He))return t.content;let{collection:r,document:n}=ql(t.createCollection);return a.createElement(a.Fragment,null,a.createElement(_l,null,a.createElement(He.Provider,{value:n},t.content)),a.createElement(jl,{render:t.children,collection:r}))}function jl({collection:t,render:e}){return e(t)}function Gl(t,e,r){let n=et(),o=a.useRef(n);o.current=n;let i=a.useCallback(()=>o.current?r():e(),[e,r]);return Wl.useSyncExternalStore(t,i)}const Ul=typeof a.useSyncExternalStore=="function"?a.useSyncExternalStore:Gl;function ql(t){let[e]=a.useState(()=>new Sl(t?.()||new El)),r=a.useCallback(s=>e.subscribe(s),[e]),n=a.useCallback(()=>{let s=e.getCollection();return e.isSSR&&e.resetAfterSSR(),s},[e]),o=a.useCallback(()=>(e.isSSR=!0,e.getCollection()),[e]);return{collection:Ul(r,n,o),document:e}}const Qt=a.createContext(null);function Yl(t){var r;return r=class extends We{},r.type=t,r}function Xl(t,e,r,n,o,i){typeof t=="string"&&(t=Yl(t));let s=a.useCallback(c=>{c?.setProps(e,r,t,n,i)},[e,r,n,i,t]),l=a.useContext(Qt);if(l){let c=l.ownerDocument.nodesByProps.get(e);return c||(c=l.ownerDocument.createElement(t.type),c.setProps(e,r,t,n,i),l.appendChild(c),l.ownerDocument.updateCollection(),l.ownerDocument.nodesByProps.set(e,c)),o?a.createElement(Qt.Provider,{value:c},o):null}return a.createElement(t.type,{ref:s},o)}function Zl(t,e){let r=({node:o})=>e(o.props,o.props.ref,o),n=a.forwardRef((o,i)=>{let s=a.useContext(Zt);if(!a.useContext(eo)){if(e.length>=3)throw new Error(e.name+" cannot be rendered outside a collection.");return e(o,i)}return Xl(t,o,i,"children"in o?o.children:null,null,c=>a.createElement(Zt.Provider,{value:s},a.createElement(r,{node:c})))});return n.displayName=e.name,n}function Jl(t){return Hn({...t,addIdAndValue:!0})}const to=a.createContext(null);function Rl(t){let e=a.useContext(to),r=(e?.dependencies||[]).concat(t.dependencies),n=t.idScope??e?.idScope,o=Jl({...t,idScope:n,dependencies:r});return a.useContext(He)&&(o=a.createElement(Ql,null,o)),e=a.useMemo(()=>({dependencies:r,idScope:n}),[n,...r]),a.createElement(to.Provider,{value:e},o)}function Ql({children:t}){let e=a.useContext(He),r=a.useMemo(()=>a.createElement(He.Provider,{value:null},a.createElement(eo.Provider,{value:!0},t)),[t]);return et()?a.createElement(Qt.Provider,{value:e},r):Ue.createPortal(r,e)}const ea={CollectionRoot({collection:t,renderDropIndicator:e}){return ro(t,null,e)},CollectionBranch({collection:t,parent:e,renderDropIndicator:r}){return ro(t,e,r)}};function ro(t,e,r){return Hn({items:e?t.getChildren(e.key):t,dependencies:[r],children(n){if(n.type==="content")return a.createElement(a.Fragment,null);let o=n.render(n);return!r||n.type!=="item"?o:a.createElement(a.Fragment,null,r({type:"item",key:n.key,dropPosition:"before"}),o,ta(t,n,r))}})}function ta(t,e,r){let n=e.key,o=t.getKeyAfter(n),i=o!=null?t.getItem(o):null;for(;i!=null&&i.type!=="item";)o=t.getKeyAfter(i.key),i=o!=null?t.getItem(o):null;let s=e.nextKey!=null?t.getItem(e.nextKey):null;for(;s!=null&&s.type!=="item";)s=s.nextKey!=null?t.getItem(s.nextKey):null;let l=[];if(s==null){let c=e;for(;c?.type==="item"&&(!i||c.parentKey!==i.parentKey&&i.level<c.level);){let d=r({type:"item",key:c.key,dropPosition:"after"});a.isValidElement(d)&&l.push(a.cloneElement(d,{key:`${c.key}-after`})),c=c.parentKey!=null?t.getItem(c.parentKey):null}}return l}const ra=a.createContext(ea);function na(t){return a.useMemo(()=>t!=null?new Set([t]):null,[t])}const oa=new Set(["id"]),ia=new Set(["aria-label","aria-labelledby","aria-describedby","aria-details"]),sa=new Set(["href","hrefLang","target","rel","download","ping","referrerPolicy"]),la=new Set(["dir","lang","hidden","inert","translate"]),no=new Set(["onClick","onAuxClick","onContextMenu","onDoubleClick","onMouseDown","onMouseEnter","onMouseLeave","onMouseMove","onMouseOut","onMouseOver","onMouseUp","onTouchCancel","onTouchEnd","onTouchMove","onTouchStart","onPointerDown","onPointerMove","onPointerUp","onPointerCancel","onPointerEnter","onPointerLeave","onPointerOver","onPointerOut","onGotPointerCapture","onLostPointerCapture","onScroll","onWheel","onAnimationStart","onAnimationEnd","onAnimationIteration","onTransitionCancel","onTransitionEnd","onTransitionRun","onTransitionStart"]),aa=/^(data-.*)$/;function pt(t,e={}){let{labelable:r,isLink:n,global:o,events:i=o,propNames:s}=e,l={};for(const c in t)Object.prototype.hasOwnProperty.call(t,c)&&(oa.has(c)||r&&ia.has(c)||n&&sa.has(c)||o&&la.has(c)||i&&(no.has(c)||c.endsWith("Capture")&&no.has(c.slice(0,-7)))||s?.has(c)||aa.test(c))&&(l[c]=t[c]);return l}let Me="default",er="",ht=new WeakMap;function oo(t){if(_e()&&Pe()){if(Me==="default"){const e=Q(t);er=e.documentElement.style.webkitUserSelect,e.documentElement.style.webkitUserSelect="none"}Me="disabled"}else if(t instanceof HTMLElement||t instanceof SVGElement){let e="userSelect"in t.style?"userSelect":"webkitUserSelect";ht.set(t,t.style[e]),t.style[e]="none"}}function tr(t){if(_e()&&Pe()){if(Me!=="disabled")return;Me="restoring",setTimeout(()=>{Gn(()=>{if(Me==="restoring"){const e=Q(t);e.documentElement.style.webkitUserSelect==="none"&&(e.documentElement.style.webkitUserSelect=er||""),er="",Me="default"}})},300)}else if((t instanceof HTMLElement||t instanceof SVGElement)&&t&&ht.has(t)){let e=ht.get(t),r="userSelect"in t.style?"userSelect":"webkitUserSelect";t.style[r]==="none"&&(t.style[r]=e),t.getAttribute("style")===""&&t.removeAttribute("style"),ht.delete(t)}}function io(t){return t?.defaultView?.__webpack_nonce__||globalThis.__webpack_nonce__||void 0}let rr=new WeakMap;function ca(t){let e=t??(typeof document<"u"?document:void 0);if(!e)return io(e);if(rr.has(e))return rr.get(e);let r=e.querySelector('meta[property="csp-nonce"]'),n=r&&r instanceof le(r).HTMLMetaElement&&(r.nonce||r.content)||io(e)||void 0;return n!==void 0&&rr.set(e,n),n}const so=a.createContext({register:()=>{}});so.displayName="PressResponderContext";function bt(){let t=a.useRef(new Map),e=a.useCallback((o,i,s,l)=>{let c=l?.once?(...d)=>{t.current.delete(s),s(...d)}:s;t.current.set(s,{type:i,eventTarget:o,fn:c,options:l}),o.addEventListener(i,c,l)},[]),r=a.useCallback((o,i,s,l)=>{let c=t.current.get(s)?.fn||s;o.removeEventListener(i,c,l),t.current.delete(s)},[]),n=a.useCallback(()=>{t.current.forEach((o,i)=>{r(o.eventTarget,o.type,i,o.options)})},[r]);return a.useEffect(()=>n,[n]),{addGlobalListener:e,removeGlobalListener:r,removeAllGlobalListeners:n}}function da(t){let e=a.useContext(so);if(e){let{register:r,ref:n,...o}=e;t=oe(o,t),r()}return Xn(e,t.ref),t}class mt{#e;constructor(e,r,n,o){this.#e=!0;const s=(o?.target??n.currentTarget)?.getBoundingClientRect();let l,c=0,d,p=null;n.clientX!=null&&n.clientY!=null&&(d=n.clientX,p=n.clientY),s&&(d!=null&&p!=null?(l=d-s.left,c=p-s.top):(l=s.width/2,c=s.height/2)),this.type=e,this.pointerType=r,this.target=n.currentTarget,this.shiftKey=n.shiftKey,this.metaKey=n.metaKey,this.ctrlKey=n.ctrlKey,this.altKey=n.altKey,this.x=l,this.y=c,this.key=n.key}continuePropagation(){this.#e=!1}get shouldStopPropagation(){return this.#e}}const lo=Symbol("linkClicked"),ao="react-aria-pressable-style",co="data-react-aria-pressable";function uo(t){let{onPress:e,onPressChange:r,onPressStart:n,onPressEnd:o,onPressUp:i,onClick:s,isDisabled:l,isPressed:c,preventFocusOnPress:d,shouldCancelOnPointerExit:p,allowTextSelectionOnPress:u,ref:g,...b}=da(t),[v,x]=a.useState(!1),w=a.useRef({isPressed:!1,ignoreEmulatedMouseEvents:!1,didFirePressStart:!1,isTriggeringEvent:!1,activePointerId:null,target:null,isOverTarget:!1,pointerType:null,disposables:[]}),{addGlobalListener:k,removeAllGlobalListeners:S}=bt(),T=a.useCallback((h,L)=>{let V=w.current;if(l||V.didFirePressStart)return!1;let $=!0;if(V.isTriggeringEvent=!0,n){let U=new mt("pressstart",L,h);n(U),$=U.shouldStopPropagation}return r&&r(!0),V.isTriggeringEvent=!1,V.didFirePressStart=!0,x(!0),$},[l,n,r]),F=a.useCallback((h,L,V=!0)=>{let $=w.current;if(!$.didFirePressStart)return!1;$.didFirePressStart=!1,$.isTriggeringEvent=!0;let U=!0;if(o){let m=new mt("pressend",L,h);o(m),U=m.shouldStopPropagation}if(r&&r(!1),x(!1),e&&V&&!l){let m=new mt("press",L,h);e(m),U&&=m.shouldStopPropagation}return $.isTriggeringEvent=!1,U},[l,o,r,e]),q=at(F),_=a.useCallback((h,L)=>{let V=w.current;if(l)return!1;if(i){V.isTriggeringEvent=!0;let $=new mt("pressup",L,h);return i($),V.isTriggeringEvent=!1,$.shouldStopPropagation}return!0},[l,i]),z=at(_),C=a.useCallback(h=>{let L=w.current;if(L.isPressed&&L.target){L.didFirePressStart&&L.pointerType!=null&&F(Te(L.target,h),L.pointerType,!1),L.isPressed=!1,L.isOverTarget=!1,L.activePointerId=null,L.pointerType=null,S(),u||tr(L.target);for(let V of L.disposables)V();L.disposables=[]}},[u,S,F]),B=at(C);a.useEffect(()=>{l&&w.current.isPressed&&B({currentTarget:w.current.target,shiftKey:!1,ctrlKey:!1,metaKey:!1,altKey:!1})},[l]);let J=a.useCallback(h=>{p&&C(h)},[p,C]),Z=a.useCallback(h=>{l||s?.(h)},[l,s]),X=a.useCallback((h,L)=>{if(!l&&s){let V=new MouseEvent("click",h);wn(V,L),s(At(V))}},[l,s]),Y=a.useMemo(()=>{let h=w.current,L={onKeyDown($){if(or($.nativeEvent,$.currentTarget)&&j($.currentTarget,O($))){ho(O($),$.key)&&$.preventDefault();let U=!0;!h.isPressed&&!$.repeat&&(h.target=$.currentTarget,h.isPressed=!0,h.pointerType="keyboard",U=T($,"keyboard"));let m=$.currentTarget,y=A=>{or(A,m)&&!A.repeat&&j(m,O(A))&&h.target&&z(Te(h.target,A),"keyboard")};k(Q($.currentTarget),"keyup",Oe(y,V),!0),U&&$.stopPropagation(),$.metaKey&&ue()&&h.metaKeyEvents?.set($.key,$.nativeEvent)}else $.key==="Meta"&&(h.metaKeyEvents=new Map)},onClick($){if(!($&&!j($.currentTarget,O($)))&&$&&$.button===0&&!h.isTriggeringEvent&&!ye.isOpening){let U=!0;if(l&&$.preventDefault(),!h.ignoreEmulatedMouseEvents&&!h.isPressed&&(h.pointerType==="virtual"||zt($.nativeEvent))){let m=T($,"virtual"),y=z($,"virtual"),A=q($,"virtual");Z($),U=m&&y&&A}else if(h.isPressed&&h.pointerType!=="keyboard"){let m=h.pointerType||$.nativeEvent.pointerType||"virtual",y=z(Te($.currentTarget,$),m),A=q(Te($.currentTarget,$),m,!0);U=y&&A,h.isOverTarget=!1,Z($),B($)}h.ignoreEmulatedMouseEvents=!1,U&&$.stopPropagation()}}},V=$=>{if(h.isPressed&&h.target&&or($,h.target)){ho(O($),$.key)&&$.preventDefault();let U=O($),m=j(h.target,U);q(Te(h.target,$),"keyboard",m),m&&X($,h.target),S(),$.key!=="Enter"&&nr(h.target)&&j(h.target,U)&&!$[lo]&&($[lo]=!0,ye(h.target,$,!1)),h.isPressed=!1,h.metaKeyEvents?.delete($.key)}else if($.key==="Meta"&&h.metaKeyEvents?.size){let U=h.metaKeyEvents;h.metaKeyEvents=void 0;for(let m of U.values())h.target?.dispatchEvent(new KeyboardEvent("keyup",m))}};if(typeof PointerEvent<"u"){L.onPointerDown=m=>{if(m.button!==0||!j(m.currentTarget,O(m)))return;if(nl(m.nativeEvent)){h.pointerType="virtual";return}h.pointerType=m.pointerType;let y=!0;if(!h.isPressed){h.isPressed=!0,h.isOverTarget=!0,h.activePointerId=m.pointerId,h.target=m.currentTarget,u||oo(h.target),y=T(m,h.pointerType);let A=O(m);"releasePointerCapture"in A&&("hasPointerCapture"in A?A.hasPointerCapture(m.pointerId)&&A.releasePointerCapture(m.pointerId):A.releasePointerCapture(m.pointerId)),k(Q(m.currentTarget),"pointerup",$,!1),k(Q(m.currentTarget),"pointercancel",U,!1)}y&&m.stopPropagation()},L.onMouseDown=m=>{if(j(m.currentTarget,O(m))&&m.button===0){if(d){let y=Sn(m.target);y&&h.disposables.push(y)}m.stopPropagation()}},L.onPointerUp=m=>{!j(m.currentTarget,O(m))||h.pointerType==="virtual"||m.button===0&&!h.isPressed&&z(m,h.pointerType||m.pointerType)},L.onPointerEnter=m=>{m.pointerId===h.activePointerId&&h.target&&!h.isOverTarget&&h.pointerType!=null&&(h.isOverTarget=!0,T(Te(h.target,m),h.pointerType))},L.onPointerLeave=m=>{m.pointerId===h.activePointerId&&h.target&&h.isOverTarget&&h.pointerType!=null&&(h.isOverTarget=!1,q(Te(h.target,m),h.pointerType,!1),J(m))};let $=m=>{if(m.pointerId===h.activePointerId&&h.isPressed&&m.button===0&&h.target){if(j(h.target,O(m))&&h.pointerType!=null){let y=!1,A=setTimeout(()=>{h.isPressed&&h.target instanceof HTMLElement&&(y?B(m):(ge(h.target),h.target.click()))},80);k(m.currentTarget,"click",()=>y=!0,!0),h.disposables.push(()=>clearTimeout(A))}else B(m);h.isOverTarget=!1}},U=m=>{B(m)};L.onDragStart=m=>{j(m.currentTarget,O(m))&&B(m)}}else if(process.env.NODE_ENV==="test"){L.onMouseDown=m=>{if(m.button!==0||!j(m.currentTarget,O(m)))return;if(h.ignoreEmulatedMouseEvents){m.stopPropagation();return}if(h.isPressed=!0,h.isOverTarget=!0,h.target=m.currentTarget,h.pointerType=zt(m.nativeEvent)?"virtual":"mouse",Ue.flushSync(()=>T(m,h.pointerType))&&m.stopPropagation(),d){let A=Sn(m.target);A&&h.disposables.push(A)}k(Q(m.currentTarget),"mouseup",$,!1)},L.onMouseEnter=m=>{if(!j(m.currentTarget,O(m)))return;let y=!0;h.isPressed&&!h.ignoreEmulatedMouseEvents&&h.pointerType!=null&&(h.isOverTarget=!0,y=T(m,h.pointerType)),y&&m.stopPropagation()},L.onMouseLeave=m=>{if(!j(m.currentTarget,O(m)))return;let y=!0;h.isPressed&&!h.ignoreEmulatedMouseEvents&&h.pointerType!=null&&(h.isOverTarget=!1,y=q(m,h.pointerType,!1),J(m)),y&&m.stopPropagation()},L.onMouseUp=m=>{j(m.currentTarget,O(m))&&!h.ignoreEmulatedMouseEvents&&m.button===0&&!h.isPressed&&z(m,h.pointerType||"mouse")};let $=m=>{if(m.button===0){if(h.ignoreEmulatedMouseEvents){h.ignoreEmulatedMouseEvents=!1;return}h.target&&j(h.target,O(m))&&h.pointerType!=null||B(m),h.isOverTarget=!1}};L.onTouchStart=m=>{if(!j(m.currentTarget,O(m)))return;let y=ua(m.nativeEvent);if(!y)return;h.activePointerId=y.identifier,h.ignoreEmulatedMouseEvents=!0,h.isOverTarget=!0,h.isPressed=!0,h.target=m.currentTarget,h.pointerType="touch",u||oo(h.target),T(Se(h.target,m),h.pointerType)&&m.stopPropagation(),k(le(m.currentTarget),"scroll",U,!0)},L.onTouchMove=m=>{if(!j(m.currentTarget,O(m)))return;if(!h.isPressed){m.stopPropagation();return}let y=fo(m.nativeEvent,h.activePointerId),A=!0;y&&po(y,m.currentTarget)?!h.isOverTarget&&h.pointerType!=null&&(h.isOverTarget=!0,A=T(Se(h.target,m),h.pointerType)):h.isOverTarget&&h.pointerType!=null&&(h.isOverTarget=!1,A=q(Se(h.target,m),h.pointerType,!1),J(Se(h.target,m))),A&&m.stopPropagation()},L.onTouchEnd=m=>{if(!j(m.currentTarget,O(m)))return;if(!h.isPressed){m.stopPropagation();return}let y=fo(m.nativeEvent,h.activePointerId),A=!0;y&&po(y,m.currentTarget)&&h.pointerType!=null?(z(Se(h.target,m),h.pointerType),A=q(Se(h.target,m),h.pointerType),X(m.nativeEvent,h.target)):h.isOverTarget&&h.pointerType!=null&&(A=q(Se(h.target,m),h.pointerType,!1)),A&&m.stopPropagation(),h.isPressed=!1,h.activePointerId=null,h.isOverTarget=!1,h.ignoreEmulatedMouseEvents=!0,h.target&&!u&&tr(h.target),S()},L.onTouchCancel=m=>{j(m.currentTarget,O(m))&&(m.stopPropagation(),h.isPressed&&B(Se(h.target,m)))};let U=m=>{h.isPressed&&j(O(m),h.target)&&B({currentTarget:h.target,shiftKey:!1,ctrlKey:!1,metaKey:!1,altKey:!1})};L.onDragStart=m=>{j(m.currentTarget,O(m))&&B(m)}}return L},[k,l,d,S,u,J,T,Z,X]);return a.useEffect(()=>{if(!g||process.env.NODE_ENV==="test")return;const h=Q(g.current);if(!h||!h.head||h.getElementById(ao))return;const L=h.createElement("style");L.id=ao;let V=ca(h);V&&(L.nonce=V),L.textContent=`
2
2
  @layer {
3
- [${ao}] {
3
+ [${co}] {
4
4
  touch-action: pan-x pan-y pinch-zoom;
5
5
  }
6
6
  }
7
- `.trim(),h.head.prepend(P)},[g]),a.useEffect(()=>{let h=w.current;return()=>{u||tr(h.target??void 0);for(let P of h.disposables)P();h.disposables=[]}},[u]),{isPressed:c||v,pressProps:oe(b,Y,{[ao]:!0})}}function nr(t){return t.tagName==="A"&&t.hasAttribute("href")}function or(t,e){const{key:r,code:n}=t,o=e,i=o.getAttribute("role");return(r==="Enter"||r===" "||r==="Spacebar"||n==="Space")&&!(o instanceof le(o).HTMLInputElement&&!ho(o,r)||o instanceof le(o).HTMLTextAreaElement||o.isContentEditable)&&!((i==="link"||!i&&nr(o))&&r!=="Enter")}function ca(t){const{targetTouches:e}=t;return e.length>0?e[0]:null}function uo(t,e){const r=t.changedTouches;for(let n=0;n<r.length;n++){const o=r[n];if(o.identifier===e)return o}return null}function Se(t,e){let r=0,n=0;return e.targetTouches&&e.targetTouches.length===1&&(r=e.targetTouches[0].clientX,n=e.targetTouches[0].clientY),{currentTarget:t,shiftKey:e.shiftKey,ctrlKey:e.ctrlKey,metaKey:e.metaKey,altKey:e.altKey,clientX:r,clientY:n}}function Te(t,e){let r=e.clientX,n=e.clientY;return{currentTarget:t,shiftKey:e.shiftKey,ctrlKey:e.ctrlKey,metaKey:e.metaKey,altKey:e.altKey,clientX:r,clientY:n,key:e.key}}function da(t){let e=0,r=0;return t.width!==void 0?e=t.width/2:t.radiusX!==void 0&&(e=t.radiusX),t.height!==void 0?r=t.height/2:t.radiusY!==void 0&&(r=t.radiusY),{top:t.clientY-r,right:t.clientX+e,bottom:t.clientY+r,left:t.clientX-e}}function ua(t,e){return!(t.left>e.right||e.left>t.right||t.top>e.bottom||e.top>t.bottom)}function fo(t,e){let r=e.getBoundingClientRect(),n=da(t);return ua(r,n)}function fa(t){return t instanceof HTMLInputElement?!1:t instanceof HTMLButtonElement?t.type!=="submit"&&t.type!=="reset":!nr(t)}function po(t,e){return ue()&&e==="Enter"?!1:t instanceof HTMLInputElement?e==="Enter"&&(t.type==="checkbox"||t.type==="radio")?!1:!ho(t,e):fa(t)}const pa=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function ho(t,e){return t.type==="checkbox"||t.type==="radio"?e===" ":pa.has(t.type)}function ha(t){let{isDisabled:e,onBlurWithin:r,onFocusWithin:n,onFocusWithinChange:o}=t,i=a.useRef({isFocusWithin:!1}),{addGlobalListener:s,removeAllGlobalListeners:l}=bt(),c=a.useCallback(u=>{j(u.currentTarget,O(u))&&i.current.isFocusWithin&&!j(u.currentTarget,u.relatedTarget)&&(i.current.isFocusWithin=!1,l(),r&&r(u),o&&o(!1))},[r,o,i,l]),d=wn(c),p=a.useCallback(u=>{if(!j(u.currentTarget,O(u)))return;let g=O(u);const b=Q(g),v=ce(b);if(!i.current.isFocusWithin&&v===g){n&&n(u),o&&o(!0),i.current.isFocusWithin=!0,d(u);let x=u.currentTarget;s(b,"focus",w=>{let k=O(w);if(i.current.isFocusWithin&&!j(x,k)){let S=new b.defaultView.FocusEvent("blur",{relatedTarget:k});vn(S,x);let T=At(S);c(T)}},{capture:!0})}},[n,o,d,s,c]);return e?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:p,onBlur:c}}}function bo(t={}){let{autoFocus:e=!1,isTextInput:r,within:n}=t,o=a.useRef({isFocused:!1,isFocusVisible:e||Gt()}),[i,s]=a.useState(!1),[l,c]=a.useState(()=>o.current.isFocused&&o.current.isFocusVisible),d=a.useCallback(()=>c(o.current.isFocused&&o.current.isFocusVisible),[]),p=a.useCallback(b=>{o.current.isFocused=b,o.current.isFocusVisible=Gt(),s(b),d()},[d]);ul(b=>{o.current.isFocusVisible=b,d()},[r,i],{enabled:i,isTextInput:r});let{focusProps:u}=Gn({isDisabled:n,onFocusChange:p}),{focusWithinProps:g}=ha({isDisabled:!n,onFocusWithinChange:p});return{isFocused:i,isFocusVisible:l,focusProps:n?g:u}}let gt=!1,yt=0;function ir(){gt=!0,setTimeout(()=>{gt=!1},500)}function mo(t){t.pointerType==="touch"&&ir()}function ba(){let t=Q(null);if(!(typeof t>"u"))return yt===0&&(typeof PointerEvent<"u"?t.addEventListener("pointerup",mo):process.env.NODE_ENV==="test"&&t.addEventListener("touchend",ir)),yt++,()=>{yt--,!(yt>0)&&(typeof PointerEvent<"u"?t.removeEventListener("pointerup",mo):process.env.NODE_ENV==="test"&&t.removeEventListener("touchend",ir))}}function ma(t){let{onHoverStart:e,onHoverChange:r,onHoverEnd:n,isDisabled:o}=t,[i,s]=a.useState(!1),l=a.useRef({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;a.useEffect(ba,[]);let{addGlobalListener:c,removeAllGlobalListeners:d}=bt(),{hoverProps:p,triggerHoverEnd:u}=a.useMemo(()=>{let g=(x,w)=>{if(l.pointerType=w,o||w==="touch"||l.isHovered||!j(x.currentTarget,O(x)))return;l.isHovered=!0;let k=x.currentTarget;l.target=k,c(Q(O(x)),"pointerover",S=>{l.isHovered&&l.target&&!j(l.target,O(S))&&b(S,S.pointerType)},{capture:!0}),e&&e({type:"hoverstart",target:k,pointerType:w}),r&&r(!0),s(!0)},b=(x,w)=>{let k=l.target;l.pointerType="",l.target=null,!(w==="touch"||!l.isHovered||!k)&&(l.isHovered=!1,d(),n&&n({type:"hoverend",target:k,pointerType:w}),r&&r(!1),s(!1))},v={};return typeof PointerEvent<"u"?(v.onPointerEnter=x=>{gt&&x.pointerType==="mouse"||g(x,x.pointerType)},v.onPointerLeave=x=>{!o&&j(x.currentTarget,O(x))&&b(x,x.pointerType)}):process.env.NODE_ENV==="test"&&(v.onTouchStart=()=>{l.ignoreEmulatedMouseEvents=!0},v.onMouseEnter=x=>{!l.ignoreEmulatedMouseEvents&&!gt&&g(x,"mouse"),l.ignoreEmulatedMouseEvents=!1},v.onMouseLeave=x=>{!o&&j(x.currentTarget,O(x))&&b(x,"mouse")}),{hoverProps:v,triggerHoverEnd:b}},[e,r,n,o,l,c,d]);return a.useEffect(()=>{o&&u({currentTarget:l.target},l.pointerType)},[o]),{hoverProps:p,isHovered:i}}function ga(t,e){if(!t)return!1;let r=window.getComputedStyle(t),n=document.scrollingElement||document.documentElement,o=/(auto|scroll)/.test(r.overflow+r.overflowX+r.overflowY);return t===n&&r.overflow!=="hidden"&&(o=!0),o&&e&&(o=t.scrollHeight!==t.clientHeight||t.scrollWidth!==t.clientWidth),o}function sr(t,e){let r=[],n=document.scrollingElement||document.documentElement;for(;t&&(ga(t,e)&&r.push(t),t!==n);)t=t.parentElement;return r}function xt(t,e,r={}){let{block:n="nearest",inline:o="nearest"}=r;if(t===e)return;let i=t.scrollTop,s=t.scrollLeft,l=e.getBoundingClientRect(),c=t.getBoundingClientRect(),d=window.getComputedStyle(e),p=window.getComputedStyle(t),u=document.scrollingElement||document.documentElement,g=t===u,b=t===u?0:c.top,v=t===u?t.clientHeight:c.bottom,x=t===u?0:c.left,w=t===u?t.clientWidth:c.right,k=parseFloat(d.scrollMarginTop)||0,S=parseFloat(d.scrollMarginBottom)||0,T=parseFloat(d.scrollMarginLeft)||0,F=parseFloat(d.scrollMarginRight)||0,q=parseFloat(p.scrollPaddingTop)||0,_=parseFloat(p.scrollPaddingBottom)||0,z=parseFloat(p.scrollPaddingLeft)||0,C=parseFloat(p.scrollPaddingRight)||0,B=parseFloat(p.borderTopWidth)||0,J=parseFloat(p.borderBottomWidth)||0,Z=parseFloat(p.borderLeftWidth)||0,X=parseFloat(p.borderRightWidth)||0,Y=l.top-k,h=l.bottom+S,P=l.left-T,V=l.right+F,$=t===u?0:Z+X,U=t===u?0:B+J,m=t===u?0:t.offsetWidth-t.clientWidth-$,y=t===u?0:t.offsetHeight-t.clientHeight-U,A=b+(g?0:B)+q,ie=v-(g?0:J)-_-y,ae=x+(g?0:Z)+z,se=w-(g?0:X)-C;_e()&&Pe()||p.direction==="ltr"?se-=m:p.direction==="rtl"&&(ae+=m);let E=Y<A||h>ie,W=P<ae||V>se;if(E&&n==="start")i+=Y-A;else if(E&&n==="center")i+=(Y+h)/2-(A+ie)/2;else if(E&&n==="end")i+=h-ie;else if(E&&n==="nearest"){let ne=Y-A,be=h-ie;i+=Math.abs(ne)<=Math.abs(be)?ne:be}if(W&&o==="start")s+=P-ae;else if(W&&o==="center")s+=(P+V)/2-(ae+se)/2;else if(W&&o==="end")s+=V-se;else if(W&&o==="nearest"){let ne=P-ae,be=V-se;s+=Math.abs(ne)<=Math.abs(be)?ne:be}if(process.env.NODE_ENV==="test"){t.scrollLeft=s,t.scrollTop=i;return}t.scrollTo({left:s,top:i})}function go(t,e={}){let{containingElement:r}=e;if(t&&t.isConnected){let n=document.scrollingElement||document.documentElement;if(window.getComputedStyle(n).overflow==="hidden"){let{left:i,top:s}=t.getBoundingClientRect(),l=sr(t,!0);for(let p of l)xt(p,t);let{left:c,top:d}=t.getBoundingClientRect();if(Math.abs(i-c)>1||Math.abs(s-d)>1){l=r?sr(r,!0):[];for(let p of l)xt(p,r,{block:"center",inline:"center"});for(let p of sr(t,!0))xt(p,t)}}else{let{left:i,top:s}=t.getBoundingClientRect();t?.scrollIntoView?.({block:"nearest"});let{left:l,top:c}=t.getBoundingClientRect();(Math.abs(i-l)>1||Math.abs(s-c)>1)&&(r?.scrollIntoView?.({block:"center",inline:"center"}),t.scrollIntoView?.({block:"nearest"}))}}}let ya=0;const lr=new Map;function xa(t){let[e,r]=a.useState();return we(()=>{if(!t)return;let n=lr.get(t);if(n)r(n.element.id);else{let o=`react-aria-description-${ya++}`;r(o);let i=document.createElement("div");i.id=o,i.style.display="none",i.textContent=t,document.body.appendChild(i),n={refCount:0,element:i},lr.set(t,n)}return n.refCount++,()=>{n&&--n.refCount===0&&(n.element.remove(),lr.delete(t))}},[t]),{"aria-describedby":t?e:void 0}}const va=a.createContext(null);function wa(t){let e=a.useRef({});return a.createElement(va.Provider,{value:e},t.children)}const Ea=a.createContext({isSelected:!1});class Sa{constructor(e,r,n,o){this._walkerStack=[],this._currentSetFor=new Set,this._acceptNode=s=>{if(s.nodeType===Node.ELEMENT_NODE){const l=s.shadowRoot;if(l){const c=this._doc.createTreeWalker(l,this.whatToShow,{acceptNode:this._acceptNode});return this._walkerStack.unshift(c),NodeFilter.FILTER_ACCEPT}else{if(typeof this.filter=="function")return this.filter(s);if(this.filter?.acceptNode)return this.filter.acceptNode(s);if(this.filter===null)return NodeFilter.FILTER_ACCEPT}}return NodeFilter.FILTER_SKIP},this._doc=e,this.root=r,this.filter=o??null,this.whatToShow=n??NodeFilter.SHOW_ALL,this._currentNode=r,this._walkerStack.unshift(e.createTreeWalker(r,n,this._acceptNode));const i=r.shadowRoot;if(i){const s=this._doc.createTreeWalker(i,this.whatToShow,{acceptNode:this._acceptNode});this._walkerStack.unshift(s)}}get currentNode(){return this._currentNode}set currentNode(e){if(!j(this.root,e))throw new Error("Cannot set currentNode to a node that is not contained by the root node.");const r=[];let n=e,o=e;for(this._currentNode=e;n&&n!==this.root;)if(n.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const s=n,l=this._doc.createTreeWalker(s,this.whatToShow,{acceptNode:this._acceptNode});r.push(l),l.currentNode=o,this._currentSetFor.add(l),n=o=s.host}else n=n.parentNode;const i=this._doc.createTreeWalker(this.root,this.whatToShow,{acceptNode:this._acceptNode});r.push(i),i.currentNode=o,this._currentSetFor.add(i),this._walkerStack=r}get doc(){return this._doc}firstChild(){let e=this.currentNode,r=this.nextNode();return j(e,r)?(r&&(this.currentNode=r),r):(this.currentNode=e,null)}lastChild(){let r=this._walkerStack[0].lastChild();return r&&(this.currentNode=r),r}nextNode(){const e=this._walkerStack[0].nextNode();if(e){if(e.shadowRoot){let n;if(typeof this.filter=="function"?n=this.filter(e):this.filter?.acceptNode&&(n=this.filter.acceptNode(e)),n===NodeFilter.FILTER_ACCEPT)return this.currentNode=e,e;let o=this.nextNode();return o&&(this.currentNode=o),o}return e&&(this.currentNode=e),e}else if(this._walkerStack.length>1){this._walkerStack.shift();let r=this.nextNode();return r&&(this.currentNode=r),r}else return null}previousNode(){const e=this._walkerStack[0];if(e.currentNode===e.root){if(this._currentSetFor.has(e))if(this._currentSetFor.delete(e),this._walkerStack.length>1){this._walkerStack.shift();let n=this.previousNode();return n&&(this.currentNode=n),n}else return null;return null}const r=e.previousNode();if(r){if(r.shadowRoot){let o;if(typeof this.filter=="function"?o=this.filter(r):this.filter?.acceptNode&&(o=this.filter.acceptNode(r)),o===NodeFilter.FILTER_ACCEPT)return r&&(this.currentNode=r),r;let i=this.lastChild();return i&&(this.currentNode=i),i}return r&&(this.currentNode=r),r}else if(this._walkerStack.length>1){this._walkerStack.shift();let n=this.previousNode();return n&&(this.currentNode=n),n}else return null}nextSibling(){return null}previousSibling(){return null}parentNode(){return null}}function ka(t,e,r,n){return nt()?new Sa(t,e,r,n):t.createTreeWalker(e,r,n)}function Ca(t){if(!t.form)return Array.from(Q(t).querySelectorAll(`input[type="radio"][name="${CSS.escape(t.name)}"]`)).filter(n=>!n.form);const e=t.form.elements.namedItem(t.name);let r=le(t);return e instanceof r.RadioNodeList?Array.from(e).filter(n=>n instanceof r.HTMLInputElement):e instanceof r.HTMLInputElement?[e]:[]}function $a(t){if(t.checked)return!0;const e=Ca(t);return e.length>0&&!e.some(r=>r.checked)}function yo(t,e){return!t||!e?!1:e.some(r=>j(r,t))}function Ta(t,e,r){let n=e?.tabbable?Ft:yn,o=t?.nodeType===Node.ELEMENT_NODE?t:null,i=Q(o),s=ka(i,t||i,NodeFilter.SHOW_ELEMENT,{acceptNode(l){return j(e?.from,l)||e?.tabbable&&l.tagName==="INPUT"&&l.getAttribute("type")==="radio"&&(!$a(l)||s.currentNode.tagName==="INPUT"&&s.currentNode.type==="radio"&&s.currentNode.name===l.name)?NodeFilter.FILTER_REJECT:n(l)&&(!r||yo(l,r))&&(!e?.accept||e.accept(l))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});return e?.from&&(s.currentNode=e.from),s}class ar{constructor(){this.fastMap=new Map,this.root=new xo({scopeRef:null}),this.fastMap.set(null,this.root)}get size(){return this.fastMap.size}getTreeNode(e){return this.fastMap.get(e)}addTreeNode(e,r,n){let o=this.fastMap.get(r??null);if(!o)return;let i=new xo({scopeRef:e});o.addChild(i),i.parent=o,this.fastMap.set(e,i),n&&(i.nodeToRestore=n)}addNode(e){this.fastMap.set(e.scopeRef,e)}removeTreeNode(e){if(e===null)return;let r=this.fastMap.get(e);if(!r)return;let n=r.parent;for(let i of this.traverse())i!==r&&r.nodeToRestore&&i.nodeToRestore&&r.scopeRef&&r.scopeRef.current&&yo(i.nodeToRestore,r.scopeRef.current)&&(i.nodeToRestore=r.nodeToRestore);let o=r.children;n&&(n.removeChild(r),o.size>0&&o.forEach(i=>n&&n.addChild(i))),this.fastMap.delete(r.scopeRef)}*traverse(e=this.root){if(e.scopeRef!=null&&(yield e),e.children.size>0)for(let r of e.children)yield*this.traverse(r)}clone(){let e=new ar;for(let r of this.traverse())e.addTreeNode(r.scopeRef,r.parent?.scopeRef??null,r.nodeToRestore);return e}}class xo{constructor(e){this.children=new Set,this.contain=!1,this.scopeRef=e.scopeRef}addChild(e){this.children.add(e),e.parent=this}removeChild(e){this.children.delete(e),e.parent=void 0}}new ar;function cr(t){return el()?t.altKey:t.ctrlKey}function dr(t,e){let r=`[data-key="${CSS.escape(String(e))}"]`,n=t.current?.dataset.collection;return n&&(r=`[data-collection="${CSS.escape(n)}"]${r}`),t.current?.querySelector(r)}const vo=new WeakMap;function Na(t){let e=tt();return vo.set(t,e),e}function Ka(t){return vo.get(t)}const wo=1e3;function Pa(t){let{keyboardDelegate:e,selectionManager:r,onTypeSelect:n}=t,o=a.useRef({search:"",timeout:void 0}),i=l=>{if(o.current.search.length>0&&l.key===" "){if(l.preventDefault(),(!("continuePropagation"in l)||"continuePropagation"in l&&!l.isPropagationStopped())&&l.stopPropagation(),o.current.search+=" ",e.getKeyForSearch!=null){let c=e.getKeyForSearch(o.current.search,r.focusedKey);c==null&&(c=e.getKeyForSearch(o.current.search)),c!=null&&(r.setFocusedKey(c),n&&n(c))}clearTimeout(o.current.timeout),o.current.timeout=setTimeout(()=>{o.current.search=""},wo)}},s=l=>{let c=La(l.key);if(!(!c||l.ctrlKey||l.metaKey||l.altKey||!j(l.currentTarget,O(l))||o.current.search.length===0&&c===" ")){if(o.current.search+=c,e.getKeyForSearch!=null){let d=e.getKeyForSearch(o.current.search,r.focusedKey);if(d==null&&(d=e.getKeyForSearch(o.current.search)),d!=null)r.setFocusedKey(d),n&&n(d),l.preventDefault(),"continuePropagation"in l||l.stopPropagation();else{o.current.search="",clearTimeout(o.current.timeout),o.current.timeout=void 0;return}}clearTimeout(o.current.timeout),o.current.timeout=setTimeout(()=>{o.current.search=""},wo)}};return a.useEffect(()=>{let l=o.current.timeout;return()=>{clearTimeout(l)}},[o]),{typeSelectProps:{onKeyDownCapture:e.getKeyForSearch?i:void 0,onKeyDown:e.getKeyForSearch?s:void 0}}}function La(t){return t.length===1||!/^[A-Z]/i.test(t)?t:""}function Eo(t,e){const r=a.useRef(!0),n=a.useRef(null);we(()=>(r.current=!0,()=>{r.current=!1}),[]),we(()=>{r.current?r.current=!1:(!n.current||e.some((o,i)=>!Object.is(o,n[i])))&&t(),n.current=e},e)}function Ia(t){let{selectionManager:e,keyboardDelegate:r,ref:n,autoFocus:o=!1,shouldFocusWrap:i=!1,disallowEmptySelection:s=!1,disallowSelectAll:l=!1,escapeKeyBehavior:c="clearSelection",selectOnFocus:d=e.selectionBehavior==="replace",disallowTypeAhead:p=!1,shouldUseVirtualFocus:u,allowsTabNavigation:g=!1,scrollRef:b=n,linkBehavior:v="action",UNSTABLE_focusOnEntry:x}=t,{direction:w}=Mn(),k=Bt();const S=(K,N,re)=>{if(N!=null){if(e.isLink(N)&&v==="selection"&&d&&!cr(K)){Ue.flushSync(()=>{e.setFocusedKey(N,re)});let R=dr(n,N),Zo=e.getItemProps(N);if(R){k.open(R,K,Zo.href,Zo.routerOptions);return}return!1}if(e.setFocusedKey(N,re),e.isLink(N)&&v==="override")return!1;if(K.shiftKey&&e.selectionMode==="multiple"){e.extendSelection(N);return}else if(d&&!cr(K)){e.replaceSelection(N);return}}return!1};let T=K=>{if(r.getKeyBelow){let N=e.focusedKey!=null?r.getKeyBelow?.(e.focusedKey):r.getFirstKey?.();if(N==null&&i&&(N=r.getFirstKey?.(e.focusedKey)),N!=null){S(K,N);return}}return!1},F=K=>{if(r.getKeyAbove){let N=e.focusedKey!=null?r.getKeyAbove?.(e.focusedKey):r.getLastKey?.();if(N==null&&i&&(N=r.getLastKey?.(e.focusedKey)),N!=null){S(K,N);return}}return!1},q=K=>{if(r.getFirstKey){if(e.focusedKey===null&&K.shiftKey)return!1;let N=r.getFirstKey(e.focusedKey,Be(K));if(e.setFocusedKey(N),N!=null){if(Be(K)&&K.shiftKey&&e.selectionMode==="multiple"){e.extendSelection(N);return}else if(d){e.replaceSelection(N);return}}}return!1},_=K=>{if(r.getKeyLeftOf){let N=e.focusedKey!=null?r.getKeyLeftOf?.(e.focusedKey):r.getFirstKey?.();if(N==null&&i&&(N=w==="rtl"?r.getFirstKey?.(e.focusedKey):r.getLastKey?.(e.focusedKey)),N!=null){S(K,N,w==="rtl"?"first":"last");return}}return!1},z=K=>{if(r.getKeyRightOf){let N=e.focusedKey!=null?r.getKeyRightOf?.(e.focusedKey):r.getFirstKey?.();if(N==null&&i&&(N=w==="rtl"?r.getLastKey?.(e.focusedKey):r.getFirstKey?.(e.focusedKey)),N!=null){S(K,N,w==="rtl"?"last":"first");return}}return!1},C=K=>{if(r.getLastKey){if(e.focusedKey===null&&K.shiftKey)return!1;let N=r.getLastKey(e.focusedKey,Be(K));if(e.setFocusedKey(N),N!=null){if(Be(K)&&K.shiftKey&&e.selectionMode==="multiple"){e.extendSelection(N);return}else if(d){e.replaceSelection(N);return}}}return!1},B=K=>{if(r.getKeyPageBelow&&e.focusedKey!=null){let N=r.getKeyPageBelow(e.focusedKey);if(N!=null)return S(K,N)}return!1},J=K=>{if(r.getKeyPageAbove&&e.focusedKey!=null){let N=r.getKeyPageAbove(e.focusedKey);if(N!=null)return S(K,N)}return!1},Z=()=>{if(e.selectionMode==="multiple"&&l!==!0){e.selectAll();return}return!1},X=()=>{if(c==="clearSelection"&&!s&&e.selectedKeys.size!==0){e.clearSelection();return}return!1},Y=()=>{if(!g&&n.current){let K=Ta(n.current,{tabbable:!0}),N,re;do re=K.lastChild(),re&&(N=re);while(re);let R=ce();N&&(!bn(N)||R&&!Ft(R))&&ge(N)}return{shouldContinuePropagation:!0,shouldPreventDefault:!1}},h=()=>(!g&&n.current&&n.current.focus(),{shouldContinuePropagation:!0,shouldPreventDefault:!1}),P=(K,N)=>({[ue()?K+"+Shift+Alt":K+"+Shift+Control"]:N,[K+"+Shift"]:N,[ue()?K+"+Alt":K+"+Control"]:N,[K]:N}),{keyboardProps:V}=Xt({shortcuts:{...P("ArrowDown",T),...P("ArrowUp",F),...P("ArrowLeft",_),...P("ArrowRight",z),...P("PageDown",B),...P("PageUp",J)},allowRepeats:!0}),{keyboardProps:$}=Xt({shortcuts:{...P("Home",q),...P("End",C),"Mod+A":Z,Escape:X,Tab:Y,"Tab+Shift":h}}),U=a.useRef({top:0,left:0});ct(b,"scroll",()=>{U.current={top:b.current?.scrollTop??0,left:b.current?.scrollLeft??0}});let m=K=>{if(e.isFocused){j(K.currentTarget,O(K))||e.setFocused(!1);return}if(!j(K.currentTarget,O(K)))return;let N=Ut();e.setFocused(!0);let re=R=>{R!=null&&(e.setFocusedKey(R),d&&!e.isSelected(R)&&e.replaceSelection(R))};if(x&&(N==="keyboard"||N==="virtual"))re(x==="first"?r.getFirstKey?.():r.getLastKey?.());else if(e.focusedKey==null){let R=K.relatedTarget;R&&K.currentTarget.compareDocumentPosition(R)&Node.DOCUMENT_POSITION_FOLLOWING?re(e.lastSelectedKey??r.getLastKey?.()):re(e.firstSelectedKey??r.getFirstKey?.())}else b.current&&(b.current.scrollTop=U.current.top,b.current.scrollLeft=U.current.left);if(e.focusedKey!=null&&b.current){let R=dr(n,e.focusedKey);R instanceof HTMLElement&&(!bn(R)&&!u&&ge(R),(N==="keyboard"||x&&N==="virtual")&&go(R,{containingElement:n.current}))}},y=K=>{j(K.currentTarget,K.relatedTarget)||e.setFocused(!1)},A=a.useRef(!1);ct(n,_s,u?K=>{let{detail:N}=K;K.stopPropagation(),e.setFocused(!0),N?.focusStrategy==="first"&&(A.current=!0)}:void 0);let ie=r.getFirstKey?.()??null;Eo(()=>{if(A.current)if(ie==null){let K=ce();mn(n.current),gn(K,null),e.collection.size>0&&(A.current=!1)}else e.setFocusedKey(ie),A.current=!1},[ie,e.collection.size]),Eo(()=>{e.collection.size>0&&(A.current=!1)},[e.focusedKey]),ct(n,Os,u?K=>{K.stopPropagation(),e.setFocused(!1),K.detail?.clearFocusKey&&e.setFocusedKey(null)}:void 0);const ae=a.useRef(o),se=a.useRef(!1);a.useEffect(()=>{if(ae.current){let K=null;o==="first"&&(K=r.getFirstKey?.()??null),o==="last"&&(K=r.getLastKey?.()??null);let N=e.selectedKeys;if(N.size){for(let re of N)if(e.canSelectItem(re)){K=re;break}}e.setFocused(!0),e.setFocusedKey(K),K==null&&!u&&n.current&&dt(n.current),e.collection.size>0&&(ae.current=!1,se.current=!0)}});let E=a.useRef(e.focusedKey),W=a.useRef(null);a.useEffect(()=>{if(e.isFocused&&e.focusedKey!=null&&(e.focusedKey!==E.current||se.current)&&b.current&&n.current){let K=Ut(),N=dr(n,e.focusedKey);if(!(N instanceof HTMLElement))return;(K==="keyboard"||se.current)&&(W.current&&cancelAnimationFrame(W.current),W.current=requestAnimationFrame(()=>{b.current&&(xt(b.current,N),K!=="virtual"&&go(N,{containingElement:n.current}))}))}!u&&e.isFocused&&e.focusedKey==null&&E.current!=null&&n.current&&dt(n.current),E.current=e.focusedKey,se.current=!1}),a.useEffect(()=>()=>{W.current&&cancelAnimationFrame(W.current)},[]),ct(n,"react-aria-focus-scope-restore",K=>{K.preventDefault(),e.setFocused(!0)});let ne={...oe($,V),onFocus:m,onBlur:y,onMouseDown(K){b.current===O(K)&&K.preventDefault()}},{typeSelectProps:be}=Pa({keyboardDelegate:r,selectionManager:e});p||(ne=oe(be,ne));let ee;u||(ee=e.focusedKey==null?0:-1);let wt=Na(e.collection);return{collectionProps:oe(ne,{tabIndex:ee,"data-collection":wt})}}const Ma=500;function Da(t){let{isDisabled:e,pointerType:r,onLongPressStart:n,onLongPressEnd:o,onLongPress:i,threshold:s=Ma,accessibilityDescription:l}=t;const c=a.useRef(void 0);let{addGlobalListener:d,removeAllGlobalListeners:p}=bt(),u=v=>r?v.pointerType===r:v.pointerType==="mouse"||v.pointerType==="touch",{pressProps:g}=co({isDisabled:e,onPressStart(v){if(v.continuePropagation(),u(v)){n&&n({...v,type:"longpressstart"}),c.current=setTimeout(()=>{v.target.dispatchEvent(new PointerEvent("pointercancel",{bubbles:!0})),d(v.target,"click",w=>w.preventDefault(),{once:!0}),Q(v.target).activeElement!==v.target&&ge(v.target),i&&i({...v,type:"longpress"}),c.current=void 0},s),v.pointerType==="touch"&&d(v.target,"contextmenu",w=>w.preventDefault(),{once:!0});let x=le(v.target);d(x,"pointerup",()=>{setTimeout(()=>{p()},100)},{once:!0})}},onPressEnd(v){c.current&&clearTimeout(c.current),o&&u(v)&&o({...v,type:"longpressend"})}}),b=xa(i&&!e?l:void 0);return{longPressProps:oe(g,b)}}function Fa(t){let{id:e,selectionManager:r,key:n,ref:o,shouldSelectOnPressUp:i,shouldUseVirtualFocus:s,focus:l,isDisabled:c,onAction:d,allowsDifferentPressOrigin:p,linkBehavior:u="action"}=t,g=Bt();e=tt(e);let b=E=>{if(E.pointerType==="keyboard"&&cr(E))r.toggleSelection(n);else{if(r.selectionMode==="none")return;if(r.isLink(n)){if(u==="selection"&&o.current){let W=r.getItemProps(n);g.open(o.current,E,W.href,W.routerOptions),r.setSelectedKeys(r.selectedKeys);return}else if(u==="override"||u==="none")return}r.selectionMode==="single"?r.isSelected(n)&&!r.disallowEmptySelection?r.toggleSelection(n):r.replaceSelection(n):E&&E.shiftKey?r.extendSelection(n):r.selectionBehavior==="toggle"||E&&(Be(E)||E.pointerType==="touch"||E.pointerType==="virtual")?r.toggleSelection(n):r.replaceSelection(n)}};a.useEffect(()=>{n===r.focusedKey&&r.isFocused&&(s?mn(o.current):l?l():ce()!==o.current&&o.current&&dt(o.current))},[o,n,r.focusedKey,r.childFocusStrategy,r.isFocused,s]),c=c||r.isDisabled(n);let v={};!s&&!c?v={tabIndex:n===r.focusedKey?0:-1,onFocus(E){O(E)===o.current&&r.setFocusedKey(n)}}:c&&(v.onMouseDown=E=>{E.preventDefault()}),a.useEffect(()=>{c&&r.focusedKey===n&&r.setFocusedKey(null)},[r,c,n]);let x=r.isLink(n)&&u==="override",w=d&&t.UNSTABLE_itemBehavior==="action",k=r.isLink(n)&&u!=="selection"&&u!=="none",S=!c&&r.canSelectItem(n)&&!x&&!w,T=(d||k)&&!c,F=T&&(r.selectionBehavior==="replace"?!S:!S||r.isEmpty),q=T&&S&&r.selectionBehavior==="replace",_=F||q,z=a.useRef(null),C=_&&S,B=a.useRef(!1),J=a.useRef(!1),Z=r.getItemProps(n),X=E=>{d&&(d(),o.current?.dispatchEvent(new CustomEvent("react-aria-item-action",{bubbles:!0}))),k&&o.current&&g.open(o.current,E,Z.href,Z.routerOptions)},Y={ref:o};i?(Y.onPressStart=E=>{z.current=E.pointerType,B.current=C,E.pointerType==="keyboard"&&(!_||ko(E.key))&&b(E)},p?(Y.onPressUp=F?void 0:E=>{E.pointerType==="mouse"&&S&&b(E)},Y.onPress=F?X:E=>{E.pointerType!=="keyboard"&&E.pointerType!=="mouse"&&S&&b(E)}):Y.onPress=E=>{if(F||q&&E.pointerType!=="mouse"){if(E.pointerType==="keyboard"&&!So(E.key))return;X(E)}else E.pointerType!=="keyboard"&&S&&b(E)}):(Y.onPressStart=E=>{z.current=E.pointerType,B.current=C,J.current=F,S&&(E.pointerType==="mouse"&&!F||E.pointerType==="keyboard"&&(!T||ko(E.key)))&&b(E)},Y.onPress=E=>{(E.pointerType==="touch"||E.pointerType==="pen"||E.pointerType==="virtual"||E.pointerType==="keyboard"&&_&&So(E.key)||E.pointerType==="mouse"&&J.current)&&(_?X(E):S&&b(E))});let h=Ka(r.collection);if(v["data-collection"]=h,v["data-key"]=n,Y.preventFocusOnPress=s,s&&(Y=oe(Y,{onPressStart(E){E.pointerType!=="touch"&&(r.setFocused(!0),r.setFocusedKey(n))},onPress(E){E.pointerType==="touch"&&(r.setFocused(!0),r.setFocusedKey(n))}})),Z)for(let E of["onPressStart","onPressEnd","onPressChange","onPress","onPressUp","onClick"])Z[E]&&(Y[E]=Oe(Y[E],Z[E]));let{pressProps:P,isPressed:V}=co(Y),$=q?E=>{z.current==="mouse"&&(E.stopPropagation(),E.preventDefault(),X(E))}:void 0,{longPressProps:U}=Da({isDisabled:!C,onLongPress(E){E.pointerType==="touch"&&(b(E),r.setSelectionBehavior("toggle"))}}),m=E=>{z.current==="touch"&&B.current&&E.preventDefault()},y=u!=="none"&&r.isLink(n)?E=>{ye.isOpening||E.preventDefault()}:void 0,A=oe(v,S||F||s&&!c?P:{},C?U:{},{onDoubleClick:$,onDragStartCapture:m,onClick:y,id:e},s?{onMouseDown:E=>E.preventDefault()}:void 0),ie=E=>{let W=E;for(;W&&W!==o.current;){let ne=W.getAttribute("data-collection");if(ne!=null)return ne!==h;W=W.parentElement}return Ft(E)},ae=A.onPointerDown;A.onPointerDown=E=>{let W=O(E);if(W&&W!==o.current&&ie(W)){E.stopPropagation();return}ae?.(E)};let se=A.onMouseDown;return A.onMouseDown=E=>{let W=O(E);if(W&&W!==o.current&&ie(W)){E.stopPropagation();return}se?.(E)},{itemProps:A,isPressed:V,isSelected:r.isSelected(n),isFocused:r.isFocused&&r.focusedKey===n,isDisabled:c,allowsSelection:S,hasAction:_}}function So(t){return t==="Enter"}function ko(t){return t===" "}function Aa(t,e){return typeof e.getChildren=="function"?e.getChildren(t.key):t.childNodes}function Oa(t){return _a(t)}function _a(t,e){for(let r of t)return r}function ur(t,e,r){if(e.parentKey===r.parentKey)return e.index-r.index;let n=[...Co(t,e),e],o=[...Co(t,r),r],i=n.slice(0,o.length).findIndex((s,l)=>s!==o[l]);return i!==-1?(e=n[i],r=o[i],e.index-r.index):n.findIndex(s=>s===r)>=0?1:(o.findIndex(s=>s===e)>=0,-1)}function Co(t,e){let r=[],n=e;for(;n?.parentKey!=null;)n=t.getItem(n.parentKey),n&&r.unshift(n);return r}class $o{constructor(e){this.keyMap=new Map,this.firstKey=null,this.lastKey=null,this.iterable=e;let r=s=>{if(this.keyMap.set(s.key,s),s.childNodes&&s.type==="section")for(let l of s.childNodes)r(l)};for(let s of e)r(s);let n=null,o=0,i=0;for(let[s,l]of this.keyMap)n?(n.nextKey=s,l.prevKey=n.key):(this.firstKey=s,l.prevKey=void 0),l.type==="item"&&(l.index=o++),(l.type==="section"||l.type==="item")&&i++,n=l,n.nextKey=void 0;this._size=i,this.lastKey=n?.key??null}*[Symbol.iterator](){yield*this.iterable}get size(){return this._size}getKeys(){return this.keyMap.keys()}getKeyBefore(e){let r=this.keyMap.get(e);return r?r.prevKey??null:null}getKeyAfter(e){let r=this.keyMap.get(e);return r?r.nextKey??null:null}getFirstKey(){return this.firstKey}getLastKey(){return this.lastKey}getItem(e){return this.keyMap.get(e)??null}at(e){const r=[...this.getKeys()];return this.getItem(r[e])}getChildren(e){return this.keyMap.get(e)?.childNodes||[]}}class fe extends Set{constructor(e,r,n){super(e),e instanceof fe?(this.anchorKey=r??e.anchorKey,this.currentKey=n??e.currentKey):(this.anchorKey=r??null,this.currentKey=n??null)}}function za(t,e){if(t.size!==e.size)return!1;for(let r of t)if(!e.has(r))return!1;return!0}function Ba(t){let{selectionMode:e="none",disallowEmptySelection:r=!1,allowDuplicateSelectionEvents:n,selectionBehavior:o="toggle",disabledBehavior:i="all"}=t,s=a.useRef(!1),[,l]=a.useState(!1),c=a.useRef(null),d=a.useRef(null),[,p]=a.useState(null),u=a.useMemo(()=>To(t.selectedKeys),[t.selectedKeys]),g=a.useMemo(()=>To(t.defaultSelectedKeys,new fe),[t.defaultSelectedKeys]),[b,v]=Dn(u,g,t.onSelectionChange),x=a.useMemo(()=>t.disabledKeys?new Set(t.disabledKeys):new Set,[t.disabledKeys]),[w,k]=a.useState(o);o==="replace"&&w==="toggle"&&typeof b=="object"&&b.size===0&&k("replace");let S=a.useRef(o);return a.useEffect(()=>{o!==S.current&&(k(o),S.current=o)},[o]),{selectionMode:e,disallowEmptySelection:r,selectionBehavior:w,setSelectionBehavior:k,get isFocused(){return s.current},setFocused(T){s.current=T,l(T)},get focusedKey(){return c.current},get childFocusStrategy(){return d.current},setFocusedKey(T,F="first"){c.current=T,d.current=F,p(T)},selectedKeys:b,setSelectedKeys(T){(n||!za(T,b))&&v(T)},disabledKeys:x,disabledBehavior:i}}function To(t,e){return t?t==="all"?"all":new fe(t):e}class fr{constructor(e,r,n){this.collection=e,this.state=r,this.allowsCellSelection=n?.allowsCellSelection??!1,this._isSelectAll=null,this.layoutDelegate=n?.layoutDelegate||null,this.fullCollection=n?.fullCollection||null}get selectionMode(){return this.state.selectionMode}get disallowEmptySelection(){return this.state.disallowEmptySelection}get selectionBehavior(){return this.state.selectionBehavior}setSelectionBehavior(e){this.state.setSelectionBehavior(e)}get isFocused(){return this.state.isFocused}setFocused(e){this.state.setFocused(e)}get focusedKey(){return this.state.focusedKey}get childFocusStrategy(){return this.state.childFocusStrategy}setFocusedKey(e,r){(e==null||this.collection.getItem(e))&&this.state.setFocusedKey(e,r)}get selectedKeys(){return this.state.selectedKeys==="all"?new Set(this.getSelectAllKeys()):this.state.selectedKeys}get rawSelection(){return this.state.selectedKeys}isSelected(e){if(this.state.selectionMode==="none")return!1;let r=this.getKey(e);return r==null?!1:this.state.selectedKeys==="all"?this.canSelectItem(r):this.state.selectedKeys.has(r)}get isEmpty(){return this.state.selectedKeys!=="all"&&this.state.selectedKeys.size===0}get isSelectAll(){if(this.isEmpty)return!1;if(this.state.selectedKeys==="all")return!0;if(this._isSelectAll!=null)return this._isSelectAll;let e=this.getSelectAllKeys(),r=this.state.selectedKeys;return this._isSelectAll=e.every(n=>r.has(n)),this._isSelectAll}get firstSelectedKey(){let e=null;for(let r of this.state.selectedKeys){let n=this.collection.getItem(r);(!e||n&&ur(this.collection,n,e)<0)&&(e=n)}return e?.key??null}get lastSelectedKey(){let e=null;for(let r of this.state.selectedKeys){let n=this.collection.getItem(r);(!e||n&&ur(this.collection,n,e)>0)&&(e=n)}return e?.key??null}get disabledKeys(){return this.state.disabledKeys}get disabledBehavior(){return this.state.disabledBehavior}extendSelection(e){if(this.selectionMode==="none")return;if(this.selectionMode==="single"){this.replaceSelection(e);return}let r=this.getKey(e);if(r==null)return;let n;if(this.state.selectedKeys==="all")n=new fe([r],r,r);else{let o=this.state.selectedKeys,i=o.anchorKey??r;n=new fe(o,i,r);for(let s of this.getKeyRange(i,o.currentKey??r))n.delete(s);for(let s of this.getKeyRange(r,i))this.canSelectItem(s)&&n.add(s)}this.state.setSelectedKeys(n)}getKeyRange(e,r){let n=this.collection.getItem(e),o=this.collection.getItem(r);return n&&o?ur(this.collection,n,o)<=0?this.getKeyRangeInternal(e,r):this.getKeyRangeInternal(r,e):[]}getKeyRangeInternal(e,r){if(this.layoutDelegate?.getKeyRange)return this.layoutDelegate.getKeyRange(e,r);let n=[],o=e;for(;o!=null;){let i=this.collection.getItem(o);if(i&&(i.type==="item"||i.type==="cell"&&this.allowsCellSelection)&&n.push(o),o===r)return n;o=this.collection.getKeyAfter(o)}return[]}getKey(e){let r=this.collection.getItem(e);if(!r||r.type==="cell"&&this.allowsCellSelection)return e;for(;r&&r.type!=="item"&&r.parentKey!=null;)r=this.collection.getItem(r.parentKey);return!r||r.type!=="item"?null:r.key}toggleSelection(e){if(this.selectionMode==="none")return;if(this.selectionMode==="single"&&!this.isSelected(e)){this.replaceSelection(e);return}let r=this.getKey(e);if(r==null)return;let n=new fe(this.state.selectedKeys==="all"?this.getSelectAllKeys():this.state.selectedKeys);n.has(r)?n.delete(r):this.canSelectItem(r)&&(n.add(r),n.anchorKey=r,n.currentKey=r),!(this.disallowEmptySelection&&n.size===0)&&this.state.setSelectedKeys(n)}replaceSelection(e){if(this.selectionMode==="none")return;let r=this.getKey(e);if(r==null)return;let n=this.canSelectItem(r)?new fe([r],r,r):new fe;this.state.setSelectedKeys(n)}setSelectedKeys(e){if(this.selectionMode==="none")return;let r=new fe;for(let n of e){let o=this.getKey(n);if(o!=null&&(r.add(o),this.selectionMode==="single"))break}this.state.setSelectedKeys(r)}getSelectAllKeys(){let e=this.fullCollection??this.collection,r=[],n=o=>{for(;o!=null;){if(this.canSelectItemIn(o,e)){let i=e.getItem(o);i?.type==="item"&&r.push(o),i?.hasChildNodes&&(this.allowsCellSelection||i.type!=="item")&&n(Oa(Aa(i,e))?.key??null)}o=e.getKeyAfter(o)}};return n(e.getFirstKey()),r}selectAll(){!this.isSelectAll&&this.selectionMode==="multiple"&&this.state.setSelectedKeys("all")}clearSelection(){!this.disallowEmptySelection&&(this.state.selectedKeys==="all"||this.state.selectedKeys.size>0)&&this.state.setSelectedKeys(new fe)}toggleSelectAll(){this.isSelectAll?this.clearSelection():this.selectAll()}select(e,r){this.selectionMode!=="none"&&(this.selectionMode==="single"?this.isSelected(e)&&!this.disallowEmptySelection?this.toggleSelection(e):this.replaceSelection(e):this.selectionBehavior==="toggle"||r&&(r.pointerType==="touch"||r.pointerType==="virtual")?this.toggleSelection(e):this.replaceSelection(e))}isSelectionEqual(e){if(e===this.state.selectedKeys)return!0;let r=this.selectedKeys;if(e.size!==r.size)return!1;for(let n of e)if(!r.has(n))return!1;for(let n of r)if(!e.has(n))return!1;return!0}canSelectItem(e){return this.canSelectItemIn(e,this.collection)}canSelectItemIn(e,r){if(this.state.selectionMode==="none"||this.state.disabledKeys.has(e))return!1;let n=r.getItem(e);return!(!n||n?.props?.isDisabled||n.type==="cell"&&!this.allowsCellSelection)}isDisabled(e){let r=this.collection.getItem(e);return this.state.disabledBehavior==="all"&&(this.state.disabledKeys.has(e)||!!r?.props?.isDisabled)&&r?.props?.disabledBehavior!=="selection"}isLink(e){return!!this.collection.getItem(e)?.props?.href}getItemProps(e){return this.collection.getItem(e)?.props}withCollection(e){return new fr(e,this.state,{allowsCellSelection:this.allowsCellSelection,layoutDelegate:this.layoutDelegate||void 0,fullCollection:this.fullCollection??this.collection})}}class Va{build(e,r){return this.context=r,No(()=>this.iterateCollection(e))}*iterateCollection(e){let{children:r,items:n}=e;if(a.isValidElement(r)&&r.type===a.Fragment)yield*this.iterateCollection({children:r.props.children,items:n});else if(typeof r=="function"){if(!n)throw new Error("props.children was a function but props.items is missing");let o=0;for(let i of n)yield*this.getFullNode({value:i,index:o},{renderer:r}),o++}else{let o=[];a.Children.forEach(r,s=>{s&&o.push(s)});let i=0;for(let s of o){let l=this.getFullNode({element:s,index:i},{});for(let c of l)i++,yield c}}}getKey(e,r,n,o){if(e.key!=null)return e.key;if(r.type==="cell"&&r.key!=null)return`${o}${r.key}`;let i=r.value;if(i!=null){let s=i.key??i.id;if(s==null)throw new Error("No key found for item");return s}return o?`${o}.${r.index}`:`$.${r.index}`}getChildState(e,r){return{renderer:r.renderer||e.renderer}}*getFullNode(e,r,n,o){if(a.isValidElement(e.element)&&e.element.type===a.Fragment){let c=[];a.Children.forEach(e.element.props.children,p=>{c.push(p)});let d=e.index??0;for(const p of c)yield*this.getFullNode({element:p,index:d++},r,n,o);return}let i=e.element;if(!i&&e.value&&r&&r.renderer){let c=this.cache.get(e.value);if(c&&(!c.shouldInvalidate||!c.shouldInvalidate(this.context))){c.index=e.index,c.parentKey=o?o.key:null,yield c;return}i=r.renderer(e.value)}if(a.isValidElement(i)){let c=i.type;if(typeof c!="function"&&typeof c.getCollectionNode!="function"){let g=i.type;throw new Error(`Unknown element <${g}> in collection.`)}let d=c.getCollectionNode(i.props,this.context),p=e.index??0,u=d.next();for(;!u.done&&u.value;){let g=u.value;e.index=p;let b=g.key??null;b==null&&(b=g.element?null:this.getKey(i,e,r,n));let x=[...this.getFullNode({...g,key:b,index:p,wrapper:Wa(e.wrapper,g.wrapper)},this.getChildState(r,g),n?`${n}${i.key}`:i.key,o)];for(let w of x){if(w.value=g.value??e.value??null,w.value&&this.cache.set(w.value,w),e.type&&w.type!==e.type)throw new Error(`Unsupported type <${pr(w.type)}> in <${pr(o?.type??"unknown parent type")}>. Only <${pr(e.type)}> is supported.`);p++,yield w}u=d.next(x)}return}if(e.key==null||e.type==null)return;let s=this,l={type:e.type,props:e.props,key:e.key,parentKey:o?o.key:null,value:e.value??null,level:(o?.level??0)+(o?.type==="item"?1:0),index:e.index,rendered:e.rendered,textValue:e.textValue??"","aria-label":e["aria-label"],wrapper:e.wrapper,shouldInvalidate:e.shouldInvalidate,hasChildNodes:e.hasChildNodes||!1,childNodes:No(function*(){if(!e.hasChildNodes||!e.childNodes)return;let c=0;for(let d of e.childNodes()){d.key!=null&&(d.key=`${l.key}${d.key}`);let p=s.getFullNode({...d,index:c},s.getChildState(r,d),l.key,l);for(let u of p)c++,yield u}})};yield l}constructor(){this.cache=new WeakMap}}function No(t){let e=[],r=null;return{*[Symbol.iterator](){for(let n of e)yield n;r||(r=t());for(let n of r)e.push(n),yield n}}}function Wa(t,e){if(t&&e)return r=>t(e(r));if(t)return t;if(e)return e}function pr(t){return t[0].toUpperCase()+t.slice(1)}function Ha(t,e,r){let n=a.useMemo(()=>new Va,[]),{children:o,items:i,collection:s}=t;return a.useMemo(()=>{if(s)return s;let c=n.build({children:o,items:i},r);return e(c)},[n,o,i,s,r,e])}function ja(t){let{filter:e,layoutDelegate:r}=t,n=Ba(t),o=a.useMemo(()=>t.disabledKeys?new Set(t.disabledKeys):new Set,[t.disabledKeys]),i=a.useCallback(d=>e?new $o(e(d)):new $o(d),[e]),s=a.useMemo(()=>({suppressTextValueWarning:t.suppressTextValueWarning}),[t.suppressTextValueWarning]),l=Ha(t,i,s),c=a.useMemo(()=>new fr(l,n,{layoutDelegate:r}),[l,n,r]);return Ga(l,c),{collection:l,disabledKeys:o,selectionManager:c}}function Ga(t,e){const r=a.useRef(null);a.useEffect(()=>{if(e.focusedKey!=null&&!t.getItem(e.focusedKey)&&r.current){let n=r.current.getKeyAfter(e.focusedKey),o=null;for(;n!=null;){let i=t.getItem(n);if(i&&i.type==="item"&&!e.isDisabled(n)){o=n;break}n=r.current.getKeyAfter(n)}if(o==null)for(n=r.current.getKeyBefore(e.focusedKey);n!=null;){let i=t.getItem(n);if(i&&i.type==="item"&&!e.isDisabled(n)){o=n;break}n=r.current.getKeyBefore(n)}e.setFocusedKey(o)}r.current=t},[t,e])}const Ko=new WeakMap;function Po(t,e,r){if(!t)return"";typeof e=="string"&&(e=e.replace(/\s+/g,""));let n=Ko.get(t);return process.env.NODE_ENV!=="production"&&!n&&console.error("There is no tab id, please check if you have rendered the tab panel before the tab list."),`${n}-${r}-${e}`}function Ua(t,e,r){let{key:n,isDisabled:o,shouldSelectOnPressUp:i}=t,{selectionManager:s,selectedKey:l}=e,c=n===l,d=o||e.isDisabled||e.selectionManager.isDisabled(n),p=e.collection.getItem(n),{itemProps:u,isPressed:g}=Fa({selectionManager:s,key:n,ref:r,isDisabled:d,shouldSelectOnPressUp:i??p?.props.href!=null,linkBehavior:"selection"}),b=Po(e,n,"tab"),v=Po(e,n,"tabpanel"),{tabIndex:x}=u,w=pt(p?.props,{labelable:!0});delete w.id;let k=il(p?.props),{focusableProps:S}=Fl({...p?.props,isDisabled:d},r);return{tabProps:oe(w,S,k,u,{id:b,"aria-selected":c,"aria-disabled":d||void 0,"aria-controls":c?v:void 0,tabIndex:d?void 0:x,role:"tab"}),isSelected:c,isDisabled:d,isPressed:g}}class qa{constructor(e,r,n,o=new Set){this.collection=e,this.flipDirection=r==="rtl"&&n==="horizontal",this.disabledKeys=o,this.tabDirection=n==="horizontal"}getKeyLeftOf(e){return this.flipDirection?this.getNextKey(e):this.getPreviousKey(e)}getKeyRightOf(e){return this.flipDirection?this.getPreviousKey(e):this.getNextKey(e)}isDisabled(e){return this.disabledKeys.has(e)||!!this.collection.getItem(e)?.props?.isDisabled}getFirstKey(){let e=this.collection.getFirstKey();return e!=null&&this.isDisabled(e)&&(e=this.getNextKey(e)),e}getLastKey(){let e=this.collection.getLastKey();return e!=null&&this.isDisabled(e)&&(e=this.getPreviousKey(e)),e}getKeyAbove(e){return this.tabDirection?null:this.getPreviousKey(e)}getKeyBelow(e){return this.tabDirection?null:this.getNextKey(e)}getNextKey(e){let r=e;do r=this.collection.getKeyAfter(r),r==null&&(r=this.collection.getFirstKey());while(r!=null&&this.isDisabled(r)&&r!==e);return r}getPreviousKey(e){let r=e;do r=this.collection.getKeyBefore(r),r==null&&(r=this.collection.getLastKey());while(r!=null&&this.isDisabled(r)&&r!==e);return r}}function Ya(t,e,r){let{orientation:n="horizontal",keyboardActivation:o="automatic"}=t,{collection:i,selectionManager:s,disabledKeys:l}=e,{direction:c}=Mn(),d=a.useMemo(()=>new qa(i,c,n,l),[i,l,n,c]),{collectionProps:p}=Ia({ref:r,selectionManager:s,keyboardDelegate:d,selectOnFocus:o==="automatic",disallowEmptySelection:!0,scrollRef:r,linkBehavior:"selection"}),u=tt();Ko.set(e,u);let g=pl({...t,id:u});return{tabListProps:{...oe(p,g),role:"tablist","aria-orientation":n,tabIndex:void 0}}}function Xa(t){let[e,r]=Dn(t.selectedKey,t.defaultSelectedKey??null,t.onSelectionChange),n=a.useMemo(()=>e!=null?[e]:[],[e]),{collection:o,disabledKeys:i,selectionManager:s}=ja({...t,selectionMode:"single",disallowEmptySelection:!0,allowDuplicateSelectionEvents:!0,selectedKeys:n,onSelectionChange:c=>{if(c==="all")return;let d=c.values().next().value??null;d===e&&t.onSelectionChange&&t.onSelectionChange(d),r(d)}}),l=e!=null?o.getItem(e):null;return{collection:o,disabledKeys:i,selectionManager:s,selectedKey:e,setSelectedKey:r,selectedItem:l}}function Za(t){let e=Xa({...t,onSelectionChange:t.onSelectionChange?s=>{s!=null&&t.onSelectionChange?.(s)}:void 0,suppressTextValueWarning:!0,defaultSelectedKey:t.defaultSelectedKey??Lo(t.collection,t.disabledKeys?new Set(t.disabledKeys):new Set)??void 0}),{selectionManager:r,collection:n,selectedKey:o}=e,i=a.useRef(o);return a.useEffect(()=>{let s=o;t.selectedKey==null&&(r.isEmpty||s==null||!n.getItem(s))&&(s=Lo(n,e.disabledKeys),s!=null&&r.setSelectedKeys([s])),(s!=null&&r.focusedKey==null||!r.isFocused&&s!==i.current)&&r.setFocusedKey(s),i.current=s}),{...e,isDisabled:t.isDisabled||!1}}function Lo(t,e){let r=null;if(t){for(r=t.getFirstKey();r!=null&&(e.has(r)||t.getItem(r)?.props?.isDisabled)&&r!==t.getLastKey();)r=t.getKeyAfter(r);r!=null&&(e.has(r)||t.getItem(r)?.props?.isDisabled)&&r===t.getLastKey()&&(r=t.getFirstKey())}return r}const hr=a.createContext(null),vt=a.createContext(null),Ja=a.forwardRef(function(e,r){[e,r]=Fs(e,r,hr);let{children:n,orientation:o="horizontal"}=e;return n=a.useMemo(()=>typeof n=="function"?n({orientation:o,defaultChildren:null}):n,[n,o]),a.createElement(Vl,{content:n},i=>a.createElement(Ra,{props:e,collection:i,tabsRef:r}))});function Ra({props:t,tabsRef:e,collection:r}){let{orientation:n="horizontal"}=t,o=Za({...t,collection:r,children:void 0}),{focusProps:i,isFocused:s,isFocusVisible:l}=bo({within:!0}),c=a.useMemo(()=>({orientation:n,isFocusWithin:s,isFocusVisible:l}),[n,s,l]),d=It({...t,defaultClassName:"react-aria-Tabs",values:c}),p=pt(t,{global:!0});return a.createElement(rt.div,{...oe(p,d,i),ref:e,slot:t.slot||void 0,"data-focused":s||void 0,"data-orientation":n,"data-focus-visible":l||void 0,"data-disabled":o.isDisabled||void 0},a.createElement(Ds,{values:[[hr,t],[vt,o]]},d.children))}const Qa=a.forwardRef(function(e,r){return a.useContext(vt)?a.createElement(ec,{props:e,forwardedRef:r}):a.createElement(Zl,e)});function ec({props:t,forwardedRef:e}){let r=a.useContext(vt),{CollectionRoot:n}=a.useContext(ea),{orientation:o="horizontal",keyboardActivation:i="automatic"}=fn(hr),s=Lt(e),{tabListProps:l}=Ya({...t,orientation:o,keyboardActivation:i},r,s),c=It({...t,children:null,defaultClassName:"react-aria-TabList",values:{orientation:o,state:r}}),d=pt(t,{global:!0});return delete d.id,a.createElement(rt.div,{...oe(d,c,l),ref:s,"data-orientation":o||void 0},a.createElement(wa,null,a.createElement(n,{collection:r.collection,persistedKeys:ta(r.selectionManager.focusedKey)})))}const Sr=class Sr extends We{};Sr.type="item";let br=Sr;const tc=Yl(br,(t,e,r)=>{let n=a.useContext(vt),o=Lt(e),{tabProps:i,isSelected:s,isDisabled:l,isPressed:c}=Ua({key:r.key,...t},n,o),{focusProps:d,isFocused:p,isFocusVisible:u}=bo(),{hoverProps:g,isHovered:b}=ma({isDisabled:l,onHoverStart:t.onHoverStart,onHoverEnd:t.onHoverEnd,onHoverChange:t.onHoverChange}),v=It({...t,id:void 0,children:r.rendered,defaultClassName:"react-aria-Tab",values:{isSelected:s,isDisabled:l,isFocused:p,isFocusVisible:u,isPressed:c,isHovered:b}}),x=r.props.href?rt.a:rt.div,w=pt(t,{global:!0});return delete w.id,delete w.onClick,a.createElement(x,{...oe(w,v,i,d,g),ref:o,"data-selected":s||void 0,"data-disabled":l||void 0,"data-focused":p||void 0,"data-focus-visible":u||void 0,"data-pressed":c||void 0,"data-hovered":b||void 0},a.createElement(Ea.Provider,{value:{isSelected:s}},v.children))}),rc={"button-gray":{sm:"h-9 px-3 py-2 text-sm gap-2",md:"h-11 px-3 py-2 text-base gap-2"},"button-white":{sm:"h-9 px-3 py-2 text-sm gap-2",md:"h-11 px-3 py-2 text-base gap-2"},"button-primary":{sm:"h-9 px-3 py-2 text-sm gap-2",md:"h-11 px-3 py-2 text-base gap-2"},underline:{sm:"h-8 px-1 pb-3 text-sm gap-2",md:"h-9 px-1 pb-3 text-base gap-2"},"underline-filled":{sm:"h-11 p-3 text-sm gap-2",md:"h-12 p-3 text-base gap-2"},line:{sm:"h-9 px-3 py-2 text-sm gap-2",md:"h-11 px-3.5 py-2.5 text-base gap-2"}},nc={"button-gray":"rounded-md","button-white":"rounded-md","button-primary":"rounded-md",underline:"rounded-none","underline-filled":"rounded-none",line:"rounded-none"},oc={"button-gray":{active:"bg-light-50 text-light-700",inactive:"bg-transparent text-light-500",hoverInactive:"hover:bg-light-50 hover:text-light-700",hasFocusRing:!0},"button-white":{active:"bg-white text-light-700 shadow-sm",inactive:"bg-transparent text-light-500",hoverInactive:"hover:bg-white hover:text-light-700 hover:shadow-sm",hasFocusRing:!0},"button-primary":{active:"bg-primary-50 text-primary-700",inactive:"bg-transparent text-light-500",hoverInactive:"hover:bg-primary-50 hover:text-primary-700",hasFocusRing:!0},underline:{active:"border-b-2 border-primary-500 text-primary-700",inactive:"border-b-2 border-transparent text-light-500",hoverInactive:"hover:border-primary-500 hover:text-primary-700",hasFocusRing:!1},"underline-filled":{active:"bg-primary-50 border-b-2 border-primary-500 text-primary-700",inactive:"bg-transparent border-b-2 border-transparent text-light-500",hoverInactive:"hover:bg-primary-50 hover:border-primary-500 hover:text-primary-700",hasFocusRing:!1},line:{active:"bg-transparent border-l-2 border-primary-500 text-primary-700",inactive:"bg-transparent border-l-2 border-transparent text-light-500",hoverInactive:"hover:border-primary-500 hover:text-primary-700",hasFocusRing:!0}},ic="inline-flex items-center justify-center rounded-full border border-light-200 bg-light-50 px-2 py-0.5 text-caption-sm font-medium text-light-700",sc={"button-gray":{gapClass:"gap-1",hasHairline:!1},"button-white":{gapClass:"gap-1",hasHairline:!1},"button-primary":{gapClass:"gap-1",hasHairline:!1},underline:{gapClass:"gap-3",hasHairline:!0},"underline-filled":{gapClass:"gap-3",hasHairline:!0},line:{gapClass:"gap-1",hasHairline:!1}},Io=({children:t,variant:e="button-primary",size:r="sm",fullWidth:n=!1,count:o,iconLeft:i,iconRight:s,disabled:l=!1,onClick:c,className:d,id:p,active:u})=>{const g=oc[e];return f.createElement(tc,{id:p,isDisabled:l,onPress:()=>c?.(),className:({isSelected:b})=>$t("inline-flex items-center justify-center font-semibold transition-colors duration-150",rc[e][r],nc[e],b?g.active:g.inactive,!b&&!l&&g.hoverInactive,g.hasFocusRing&&"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-400 focus-visible:ring-offset-2 focus-visible:ring-offset-white",n&&"w-full",l?"cursor-not-allowed opacity-60":"cursor-pointer",d)},i&&f.createElement("span",{className:"shrink-0"},i),f.createElement("span",{className:"whitespace-nowrap"},t),o!==void 0&&f.createElement("span",{className:ic},o),s&&f.createElement("span",{className:"shrink-0"},s))};Io.displayName="Tab";const Mo=({children:t,variant:e="button-primary",orientation:r="horizontal",boxed:n=!1,"aria-label":o="Tabs",keyboardActivation:i,disabledKeys:s,className:l})=>{const{gapClass:c,hasHairline:d}=sc[e],p=f.Children.toArray(t),u=p.map((x,w)=>String(w)),g=p.findIndex(x=>x.props.active),b=u[g>=0?g:0],v=x=>{const w=u.indexOf(String(x));w>=0&&p[w].props.onClick?.()};return f.createElement(Ja,{orientation:r,keyboardActivation:i,disabledKeys:s,selectedKey:p.length?b:void 0,onSelectionChange:v},f.createElement(Qa,{"aria-label":o,className:$t("inline-flex",r==="vertical"?"flex-col items-stretch":"flex-row items-center",c,n&&"rounded-lg border border-light-200 bg-light-50 p-1",d&&r==="horizontal"&&!n&&"border-b border-light-200",l)},p.map((x,w)=>f.cloneElement(x,{key:u[w],id:u[w]}))))};Mo.displayName="TabList";const Do=9,De=1,lc=30;function Fo(t){const e=Do,r=De-t,n=r?`calc(100% - ${r}px)`:"100%",o=`calc(100% - ${e+1}px)`,i=`calc(100% - ${e}px)`;return`shape(${[`from ${-t}px 100%`,...r?[`vline to ${n}`]:[],`curve to ${e}px ${o} with ${e}px ${n}`,`vline to ${e-t}px`,`curve to ${2*e-t}px 0 with ${e}px 0`,`hline to calc(100% - ${2*e-t}px)`,`curve to ${i} ${e-t}px with ${i} 0`,`vline to ${o}`,`curve to ${t?`calc(100% + ${t}px)`:"100%"} ${n} with ${i} ${n}`,...r?["vline to 100%"]:[]].join(", ")})`}const ac=Fo(0),cc=Fo(De),dc={default:{box:"h-12 shrink-0",padX:lc},"max-width":{box:"h-9 min-w-px flex-1",padX:Do}},uc={clipPath:ac,paddingInline:`${De}px`},fc={paddingInline:`${De}px`},Ao=f.forwardRef(({active:t=!1,type:e="default",disabled:r=!1,unstyled:n=!1,iconLeft:o,trailing:i,tooltip:s,children:l,className:c,style:d,contentClassName:p,contentStyle:u,...g},b)=>{const v=!r&&!t,{box:x,padX:w}=dc[e],k=t?{clipPath:cc,paddingInline:`${w-De}px`}:{paddingInline:`${w-De}px`};return f.createElement("button",{ref:b,title:s,...g,type:"button",role:"tab","aria-selected":t,disabled:r,className:L("group relative flex transition-colors duration-150 focus-visible:outline-none",!n&&"rounded-t-lg pt-px",!n&&x,r&&"cursor-not-allowed opacity-60",v&&"cursor-pointer",!n&&t&&"-mb-px bg-light-200 focus-visible:bg-primary-400",t&&"cursor-default",c),style:n?d:{...t?uc:fc,...d}},f.createElement("span",{className:L("flex h-full w-full items-center justify-center gap-1 whitespace-nowrap text-caption-sm",!n&&"rounded-t-lg",!n&&(t?"bg-white font-bold text-light-800":"font-medium leading-4 text-light-600"),!n&&v&&"group-hover:bg-light-100 group-hover:text-light-800",!n&&v&&"group-focus-visible:rounded-b-lg group-focus-visible:ring-2 group-focus-visible:ring-primary-400 group-focus-visible:ring-offset-2",p),style:n?u:{...k,...u}},o&&f.createElement("span",{className:"shrink-0"},o),f.createElement("span",{className:"overflow-hidden text-ellipsis"},l),i))});Ao.displayName="TabBrowser";const Oo=({children:t,separators:e=!1,trailingSlot:r,className:n})=>{const o=f.Children.toArray(t);return f.createElement("div",{className:L("flex items-end",n)},f.createElement("div",{role:"tablist",className:"flex min-w-0 flex-1 items-end"},o.map((i,s)=>f.createElement(f.Fragment,{key:s},i,e&&s<o.length-1&&f.createElement("span",{"aria-hidden":!0,className:"mb-3 h-5 w-px shrink-0 self-end bg-light-200"})))),r)};Oo.displayName="TabBrowserBar";const pc=I("flex flex-col gap-1 w-full",{variants:{size:{xs:"text-caption-sm",sm:"text-caption-lg",md:"text-sm"}},defaultVariants:{size:"md"}}),hc=I("flex items-center gap-1 font-bold text-sm",{variants:{error:{true:"",false:"text-light-800"}},defaultVariants:{error:!1}}),bc=I(["flex items-center w-full border","bg-white transition-[border-color,border-width]"],{variants:{size:{xs:"h-7 px-2 gap-1 rounded text-caption-sm",sm:"h-9 px-3 gap-2 rounded-lg",md:"h-11 px-3 gap-2 rounded-lg"},error:{true:["border-error-200","focus-within:border-2 focus-within:border-error-500"],false:["border-light-200","focus-within:border-2 focus-within:border-primary-500"]},disabled:{true:"bg-light-100 text-light-400 cursor-not-allowed",false:""}},defaultVariants:{size:"md",error:!1,disabled:!1}}),mc=I(["flex-1 bg-transparent outline-none text-light-900","placeholder:text-light-500","disabled:text-light-400 disabled:cursor-not-allowed"],{variants:{size:{xs:"text-caption-sm",sm:"text-caption-lg",md:"text-body-sm"},error:{true:"",false:"text-light-900"}},defaultVariants:{size:"md",error:!1}}),gc=I("text-caption-lg",{variants:{error:{true:"text-error-500",false:"text-light-700"}}}),yc=I("flex items-stretch w-full bg-white border overflow-hidden transition-[border-color,border-width]",{variants:{size:{xs:"rounded",sm:"rounded-lg",md:"rounded-lg"},error:{true:["border-error-200","focus-within:border-2 focus-within:border-error-500"],false:["border-light-200","focus-within:border-2 focus-within:border-primary-500"]},disabled:{true:"bg-light-100",false:""}},defaultVariants:{size:"md",error:!1,disabled:!1}}),xc=I("flex flex-1 items-center min-w-0",{variants:{size:{xs:"gap-1 px-2 py-1",sm:"gap-2 px-3 py-2",md:"gap-2 px-3 py-2"},disabled:{true:"text-light-400 cursor-not-allowed",false:""}},defaultVariants:{size:"md",disabled:!1}}),vc=I("flex items-center text-light-700 whitespace-nowrap border-r border-light-200",{variants:{size:{xs:"px-2 text-caption-sm",sm:"px-3 text-caption-lg",md:"px-3 text-body-sm"}},defaultVariants:{size:"md"}}),_o=I(["flex items-center gap-1 shrink-0 bg-transparent p-0 text-light-800 cursor-pointer","hover:bg-transparent hover:text-light-900","disabled:cursor-not-allowed disabled:text-light-400"],{variants:{size:{xs:"text-caption-sm",sm:"text-caption-lg",md:"text-body-sm"}},defaultVariants:{size:"md"}}),wc=I("flex shrink-0 items-center justify-center gap-1 w-[92px] border-l border-light-200 bg-white font-semibold text-light-800 hover:bg-light-50 disabled:cursor-not-allowed disabled:text-light-400",{variants:{size:{xs:"text-caption-sm",sm:"text-caption-lg",md:"text-body-sm"}},defaultVariants:{size:"md"}}),zo=({className:t})=>a.createElement("svg",{viewBox:"0 0 20 20",fill:"none",className:t},a.createElement("path",{d:"M5 7.5L10 12.5L15 7.5",stroke:"currentColor",strokeWidth:"1.67",strokeLinecap:"round",strokeLinejoin:"round"})),Ec={xs:"h-7",sm:"h-[30px]",md:"h-[34px]"},Sc=({size:t,error:e,disabled:r})=>L("flex items-center w-full gap-2 rounded-lg border bg-white px-2 transition-[border-color,border-width]",Ec[t],e?"border-error-200 focus-within:border-2 focus-within:border-error-500":"border-light-200 focus-within:border-2 focus-within:border-primary-500",r&&"bg-light-100 text-light-400 cursor-not-allowed"),kc=({error:t})=>L("flex items-center gap-1 text-caption-sm font-semibold",t?"":"text-light-800"),Cc="flex flex-col w-full max-w-[320px]",je=a.forwardRef(function({label:e,required:r,hint:n,rightIcon:o,size:i="md",error:s=!1,disabled:l=!1,compact:c=!1,hideCalendarIcon:d=!1,type:p,prefix:u,suffix:g,leadingAddon:b,leadingDropdown:v,trailingDropdown:x,trailingButton:w,maxLength:k,value:S,className:T,wrapperClassName:F,...q},_){const z=!!(b||w),C=a.createElement(a.Fragment,null,v&&a.createElement("button",{type:"button",onClick:v.onClick,disabled:v.disabled||l,className:_o({size:i})},a.createElement("span",null,v.value),a.createElement(zo,{className:"size-5 text-light-500"})),u&&a.createElement("div",{className:"flex items-center"},u),a.createElement("input",{...q,ref:_,type:p,disabled:l,maxLength:k,value:S,className:L(mc({size:i,error:s}),"h-full",d&&"[&::-webkit-calendar-picker-indicator]:hidden [&::-webkit-clear-button]:hidden",p==="date"&&"[&::-webkit-datetime-edit]:p-0 [&::-webkit-datetime-edit-fields-wrapper]:p-0",T)}),(o||g)&&a.createElement("div",{className:"flex h-full items-center gap-2"},o&&a.createElement("div",{className:"flex h-full items-center pb-0.5 text-light-400 hover:text-light-600"},o),g&&a.createElement("div",{className:"flex h-full items-center gap-1 leading-none text-light-700"},g)),x&&a.createElement("button",{type:"button",onClick:x.onClick,disabled:x.disabled||l,className:_o({size:i})},a.createElement("span",null,x.value),a.createElement(zo,{className:"size-5 text-light-500"})));return a.createElement("div",{className:L(c?Cc:pc({size:i}),F)},e&&a.createElement("label",{className:c?kc({error:s}):hc({error:s})},e,r&&a.createElement("span",{className:"text-error-400"},"*")),z?a.createElement("div",{className:yc({size:i,error:s,disabled:l})},b&&a.createElement("div",{className:vc({size:i})},b),a.createElement("div",{className:xc({size:i,disabled:l})},C),w&&a.createElement("button",{type:"button",onClick:w.onClick,disabled:w.disabled||l,className:wc({size:i})},w.icon,a.createElement("span",null,w.label))):a.createElement("div",{className:c?Sc({size:i,error:s,disabled:l}):bc({size:i,error:s,disabled:l})},C),k&&typeof S=="string"&&a.createElement("div",{className:"text-right text-xs text-light-400"},S.length,"/",k),n&&a.createElement("p",{className:gc({error:s})},n))});function $c({children:t}){return React.createElement("div",{className:"flex items-center text-light-500"},t)}function Tc({children:t}){return React.createElement("div",{className:"flex items-center text-light-500"},t)}var Nc={outline:{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},filled:{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"currentColor",stroke:"none"}};const Ge=(t,e,r,n)=>{const o=a.forwardRef(({color:i="currentColor",size:s=24,stroke:l=2,title:c,className:d,children:p,...u},g)=>a.createElement("svg",{ref:g,...Nc[t],width:s,height:s,className:["tabler-icon",`tabler-icon-${e}`,d].join(" "),strokeWidth:l,stroke:i,...u},[c&&a.createElement("title",{key:"svg-title"},c),...n.map(([b,v])=>a.createElement(b,v)),...Array.isArray(p)?p:[p]]));return o.displayName=`${r}`,o};const Bo=Ge("outline","alert-circle","AlertCircle",[["path",{d:"M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0",key:"svg-0"}],["path",{d:"M12 8v4",key:"svg-1"}],["path",{d:"M12 16h.01",key:"svg-2"}]]);const Vo=Ge("outline","chevron-down","ChevronDown",[["path",{d:"M6 9l6 6l6 -6",key:"svg-0"}]]);const Kc=Ge("outline","circle-check","CircleCheck",[["path",{d:"M3 12a9 9 0 1 0 18 0a9 9 0 1 0 -18 0",key:"svg-0"}],["path",{d:"M9 12l2 2l4 -4",key:"svg-1"}]]);const mr=Ge("outline","info-circle","InfoCircle",[["path",{d:"M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0",key:"svg-0"}],["path",{d:"M12 9h.01",key:"svg-1"}],["path",{d:"M11 12h1v4h1",key:"svg-2"}]]);const Pc=Ge("outline","x","X",[["path",{d:"M18 6l-12 12",key:"svg-0"}],["path",{d:"M6 6l12 12",key:"svg-1"}]]);function Lc({size:t="md",label:e,required:r,hint:n,error:o,disabled:i,placeholder:s="+1 (555) 000-0000",rightIcon:l,value:c,onChange:d,className:p,wrapperClassName:u}){return a.createElement(je,{size:t,label:e,required:r,hint:n,error:o,disabled:i,placeholder:s,rightIcon:l,value:c,onChange:d,className:p,wrapperClassName:u,prefix:a.createElement("div",{className:"flex items-center gap-1 pr-2 text-sm text-light-700"},a.createElement("span",null,"US"),a.createElement(Vo,{size:14}))})}function Ic({size:t="md",label:e,required:r,hint:n,error:o,disabled:i,value:s,placeholder:l="1,000.00",currency:c="USD",onCurrencyChange:d,rightIcon:p,onChange:u,className:g,wrapperClassName:b}){return a.createElement(je,{size:t,label:e,required:r,hint:n,error:o,disabled:i,value:s,placeholder:l,rightIcon:p,onChange:u,className:g,wrapperClassName:b,prefix:a.createElement("span",{className:"select-none text-sm text-light-700"},"$"),suffix:a.createElement("button",{type:"button",disabled:i,onClick:d,className:"flex items-center gap-1 text-sm text-light-700 hover:text-light-900 disabled:cursor-not-allowed"},c,a.createElement(Vo,{size:14}))})}function Mc({size:t="md",label:e,required:r,hint:n,disabled:o,error:i,className:s,wrapperClassName:l,value:c,maxLength:d,placeholder:p,onChange:u}){const g=c.length>d,b=i||g;return a.createElement(je,{size:t,label:e,required:r,disabled:o,error:b,value:c,placeholder:p,onChange:u,className:s,wrapperClassName:l,hint:n,suffix:a.createElement("span",{className:L("text-caption-lg",g?"text-error-600":"text-light-400")},c.length,"/",d)})}function Dc({size:t="md",label:e="Card number",required:r,hint:n,error:o,disabled:i,placeholder:s="Card number",value:l,onChange:c,rightIcon:d,prefix:p,className:u,wrapperClassName:g}){return a.createElement(je,{size:t,label:e,required:r,hint:n,error:o,disabled:i,placeholder:s,value:l,onChange:c,rightIcon:d,className:u,wrapperClassName:g,prefix:p??a.createElement("img",{src:"/stories/assets/mastercard.png",alt:"mastercard",className:"h-4 w-6 object-contain"}),inputMode:"numeric",autoComplete:"cc-number"})}const gr=je;gr.Prefix=$c,gr.Suffix=Tc;const Fc="flex flex-col gap-1 w-full",Ac=I("flex items-center gap-1 font-bold text-sm",{variants:{error:{true:"",false:"text-light-800"}},defaultVariants:{error:!1}}),Oc=I(["flex w-full gap-2 border rounded-lg p-3 bg-white","transition-[border-color,border-width]"],{variants:{error:{true:["border-error-200","focus-within:border-2 focus-within:border-error-500"],false:["border-light-200","focus-within:border-2 focus-within:border-primary-500"]},disabled:{true:"bg-light-100 cursor-not-allowed",false:""}},defaultVariants:{error:!1,disabled:!1}}),_c=I(["flex-1 min-h-[132px] bg-transparent outline-none text-caption-lg text-light-900","placeholder:text-light-500","disabled:text-light-400 disabled:cursor-not-allowed disabled:resize-none"],{variants:{resizable:{true:"resize-y",false:"resize-none"}},defaultVariants:{resizable:!0}}),zc=I("text-caption-lg",{variants:{error:{true:"text-error-500",false:"text-light-700"}},defaultVariants:{error:!1}}),Bc=({error:t,disabled:e})=>L("flex w-full gap-2 rounded-lg border bg-white p-2 transition-[border-color,border-width]",t?"border-error-200 focus-within:border-2 focus-within:border-error-500":"border-light-200 focus-within:border-2 focus-within:border-primary-500",e&&"bg-light-100 cursor-not-allowed"),Vc=({error:t})=>L("flex items-center gap-1 text-caption-sm font-semibold",t?"":"text-light-800"),Wc=t=>L("flex-1 min-h-[64px] bg-transparent outline-none text-sm text-light-900","placeholder:text-light-500",t?"resize-y":"resize-none"),Hc="flex flex-col w-full max-w-[320px]",Wo=f.forwardRef(({label:t,required:e,hint:r,helpIcon:n,error:o=!1,disabled:i=!1,resizable:s=!0,compact:l=!1,rows:c,style:d,className:p,wrapperClassName:u,...g},b)=>{const v=c?{minHeight:`${c*20}px`}:void 0;return f.createElement("div",{className:L(l?Hc:Fc,u)},t&&f.createElement("label",{className:l?Vc({error:o}):Ac({error:o})},t,e&&f.createElement("span",{className:"text-error-400"},"*"),n),f.createElement("div",{className:l?Bc({error:o,disabled:i}):Oc({error:o,disabled:i})},f.createElement("textarea",{ref:b,disabled:i,rows:c,style:{...v,...d},className:L(l?Wc(s&&!i):_c({resizable:s&&!i}),p),...g})),r&&f.createElement("p",{className:zc({error:o})},r))});Wo.displayName="Textarea";const jc=I("flex w-[320px] flex-col gap-1"),Gc=I("flex items-center gap-1 text-sm font-bold",{variants:{error:{true:"text-error-600",false:"text-light-800"}}}),Uc=I(["flex items-center","rounded-lg border bg-white","overflow-hidden","transition-colors"],{variants:{size:{sm:"h-9 px-2",md:"h-11 px-3"},error:{true:"border-error-300 focus-within:ring-2 focus-within:ring-error-500",false:"border-light-200 focus-within:ring-2 focus-within:ring-primary-500"},disabled:{true:"bg-light-100 cursor-not-allowed",false:""}},defaultVariants:{size:"md",error:!1,disabled:!1}}),qc=I(["flex items-center gap-1","overflow-x-auto overflow-y-hidden","whitespace-nowrap","scrollbar-hide","flex-1"]),Yc=I("flex shrink-0 items-center gap-1 rounded-md bg-white border border-light-200 px-2 py-1 text-caption-lg text-light-800"),Xc=I(["min-w-[120px]","bg-transparent outline-none","text-light-900 placeholder:text-light-500"],{variants:{disabled:{true:"cursor-not-allowed text-light-400",false:""}}}),Zc=I("text-caption-lg",{variants:{error:{true:"text-error-600",false:"text-light-700"}}});function Jc({size:t="md",label:e,required:r,hint:n,error:o=!1,disabled:i=!1,placeholder:s="Add items",rightIcon:l,className:c,wrapperClassName:d,options:p,value:u=[],onChange:g}){const b=a.useId(),[v,x]=a.useState(""),w=S=>{const T=p.find(F=>F.label===S);T&&(u.some(F=>F.id===T.id)||(g?.([...u,T]),x("")))},k=S=>{g?.(u.filter(T=>T.id!==S))};return a.createElement("div",{className:L(jc(),d)},e&&a.createElement("label",{className:Gc({error:o})},e,r&&a.createElement("span",{className:"text-error-400"},"*")),a.createElement("div",{className:Uc({size:t,error:o,disabled:i})},a.createElement("div",{className:qc()},u.map(S=>a.createElement("span",{key:S.id,className:Yc()},S.avatar&&a.createElement("img",{src:S.avatar,alt:S.label,className:"h-4 w-4 rounded-full"}),S.label,!i&&a.createElement("button",{type:"button",onClick:()=>k(S.id),className:"ml-1 text-light-500 hover:text-light-700"},"×"))),a.createElement("input",{list:b,value:v,onChange:S=>{x(S.target.value),w(S.target.value)},placeholder:u.length===0?s:"",disabled:i,className:L(Xc({disabled:i}),c)}),a.createElement("datalist",{id:b},p.map(S=>a.createElement("option",{key:S.id,value:S.label})))),l&&a.createElement("div",{className:"ml-2 flex shrink-0 items-center text-light-400"},l)),n&&a.createElement("p",{className:Zc({error:o})},n))}const Rc=I("flex w-[320px] flex-col gap-1"),Qc=I("flex items-center gap-1 font-bold text-sm",{variants:{error:{true:"",false:"text-light-800"}}}),ed=I("flex items-stretch rounded-lg border bg-white transition-colors",{variants:{error:{true:"",false:"border-light-200"},disabled:{true:"bg-light-100",false:""}}}),td=I("flex items-center px-3 text-sm text-light-500 rounded-l-lg select-none",{variants:{size:{sm:"h-9",md:"h-11"},disabled:{true:"bg-light-100",false:"bg-white"}}}),rd="w-px bg-light-200",nd=I(["flex flex-1 items-center gap-2 px-3 rounded-r-lg","transition-shadow","focus-within:ring-2 focus-within:ring-offset-0"],{variants:{size:{sm:"h-9",md:"h-11"},error:{true:"border border-error-200 focus-within:ring-error-500",false:"focus-within:ring-primary-500"},disabled:{true:"cursor-not-allowed",false:""}}}),od=I("flex-1 bg-transparent outline-none text-light-900 placeholder:text-light-500",{variants:{disabled:{true:"text-light-400 cursor-not-allowed",false:""}}}),id=I("text-caption-lg",{variants:{error:{true:"text-error-600",false:"text-light-700"}}});function sd({size:t="md",label:e,required:r,hint:n,error:o=!1,disabled:i=!1,placeholder:s="www.cekat.ai",value:l,rightIcon:c,onChange:d,className:p,wrapperClassName:u}){return a.createElement("div",{className:L(Rc(),u)},e&&a.createElement("label",{className:Qc({error:o})},e,r&&a.createElement("span",{className:"text-error-400"},"*")),a.createElement("div",{className:ed({error:o,disabled:i})},a.createElement("div",{className:td({size:t})},"http://"),a.createElement("div",{className:rd}),a.createElement("div",{className:nd({size:t,error:o,disabled:i})},a.createElement("input",{value:l,onChange:d,placeholder:s,disabled:i,className:L(od({disabled:i}),p)}),c&&a.createElement("div",{className:"flex items-center text-light-400"},c))),n&&a.createElement("p",{className:id({error:o})},n))}const ld=I("flex w-[320px] flex-col gap-1"),ad=I("flex items-center gap-1 font-bold text-sm",{variants:{error:{true:"text-error-600",false:"text-light-800"}}}),cd=I("flex items-stretch rounded-lg border border-light-200 bg-white transition-colors",{variants:{disabled:{true:"bg-light-100",false:""}}}),dd=I(["flex flex-1 items-center gap-2 px-3 rounded-l-lg","transition-shadow","focus-within:ring-2 focus-within:ring-offset-0"],{variants:{size:{sm:"h-9",md:"h-11"},error:{true:"border border-error-200 focus-within:ring-error-500",false:"focus-within:ring-primary-500"},disabled:{true:"cursor-not-allowed",false:""}}}),ud=I("w-px transition-colors",{variants:{error:{true:"focus:bg-error-200 group-focus-within:bg-error-500",false:"focus:bg-light-200 group-focus-within:bg-primary-500"}}}),fd=I("flex items-center gap-1 px-3 text-sm text-light-700 rounded-r-lg select-none",{variants:{size:{sm:"h-9",md:"h-11"},disabled:{true:"bg-white",false:"bg-white"}}}),pd=I("flex-1 bg-transparent outline-none text-light-900 placeholder:text-light-500",{variants:{disabled:{true:"text-light-400 cursor-not-allowed",false:""}}}),hd=I("text-caption-lg",{variants:{error:{true:"text-error-600",false:"text-light-700"}}});function bd({size:t="md",label:e,required:r,hint:n,error:o=!1,disabled:i=!1,placeholder:s="www.cekat.ai",value:l,rightIcon:c,suffix:d,onChange:p,className:u,wrapperClassName:g}){return a.createElement("div",{className:L(ld(),g)},e&&a.createElement("label",{className:ad({error:o})},e,r&&a.createElement("span",{className:"text-error-400"},"*")),a.createElement("div",{className:cd({disabled:i})},a.createElement("div",{className:dd({size:t,error:o,disabled:i})},a.createElement("input",{value:l,onChange:p,placeholder:s,disabled:i,className:L(pd({disabled:i}),u)}),c&&a.createElement("div",{className:"text-light-400"},c)),a.createElement("div",{className:ud({error:o})}),a.createElement("div",{className:fd({size:t,disabled:i})},d)),n&&a.createElement("p",{className:hd({error:o})},n))}const md=I("flex w-full flex-col gap-1"),gd=I("flex items-center gap-1 text-sm font-bold text-light-800"),Ho=I(["flex w-full items-center border bg-white text-left","transition-[border-color,border-width]"],{variants:{size:{xs:"h-7 gap-1 rounded px-2 text-caption-sm",sm:"h-9 gap-2 rounded-lg px-3 text-caption-lg",md:"h-11 gap-2 rounded-lg px-3 text-body-sm"},open:{true:"border-2 border-primary-500",false:"border-light-200 focus-within:border-2 focus-within:border-primary-500"},disabled:{true:"cursor-not-allowed bg-light-100",false:"cursor-pointer"}},defaultVariants:{size:"md",open:!1,disabled:!1}}),yd=I(["absolute left-0 top-full z-10 mt-2 w-full overflow-y-auto","rounded-lg border border-light-200 bg-white py-1","shadow-[0_12px_16px_-4px_rgba(16,24,40,0.08),0_4px_6px_-2px_rgba(16,24,40,0.03)]"],{variants:{size:{xs:"max-h-52",sm:"max-h-64",md:"max-h-80"}},defaultVariants:{size:"md"}}),jo=I("flex w-full items-center rounded-md text-left",{variants:{size:{xs:"gap-1 px-2 py-1 text-caption-sm",sm:"gap-2 px-3 py-1.5 text-caption-lg",md:"gap-2 py-2.5 pl-4 pr-2.5 text-body-sm"},disabled:{true:"cursor-not-allowed text-light-400",false:"cursor-pointer hover:bg-light-50"}},defaultVariants:{size:"md",disabled:!1}}),xd=I("text-caption-lg text-light-700"),vd=({className:t})=>f.createElement("svg",{viewBox:"0 0 20 20",fill:"none",className:t},f.createElement("path",{d:"M5 7.5L10 12.5L15 7.5",stroke:"currentColor",strokeWidth:"1.67",strokeLinecap:"round",strokeLinejoin:"round"})),wd=({className:t})=>f.createElement("svg",{viewBox:"0 0 20 20",fill:"none",className:t},f.createElement("path",{d:"M17.5 17.5L14.1 14.1M16 9.25C16 12.98 12.98 16 9.25 16C5.52 16 2.5 12.98 2.5 9.25C2.5 5.52 5.52 2.5 9.25 2.5C12.98 2.5 16 5.52 16 9.25Z",stroke:"currentColor",strokeWidth:"1.67",strokeLinecap:"round",strokeLinejoin:"round"})),Ed=({className:t})=>f.createElement("svg",{viewBox:"0 0 20 20",fill:"none",className:t},f.createElement("path",{d:"M16.67 5L7.5 14.17L3.33 10",stroke:"currentColor",strokeWidth:"1.67",strokeLinecap:"round",strokeLinejoin:"round"})),yr={xs:"size-4",sm:"size-5",md:"size-6"},Go={xs:"size-4",sm:"size-5",md:"size-5"},Sd={xs:"text-caption-sm",sm:"text-caption-lg",md:"text-body-sm"},kd={xs:"h-7",sm:"h-[30px]",md:"h-[34px]"},Uo=({size:t,open:e,disabled:r})=>L("flex w-full items-center gap-2 rounded-lg border bg-white px-2 text-left transition-[border-color,border-width]",Sd[t],kd[t],e?"border-2 border-primary-500":"border-light-200 focus-within:border-2 focus-within:border-primary-500",r?"cursor-not-allowed bg-light-100":"cursor-pointer"),Cd=()=>"flex items-center gap-1 text-caption-sm font-semibold text-light-800",$d="flex w-full max-w-[320px] flex-col";function Td({size:t="md",type:e="default",label:r,required:n,helpIcon:o,hint:i,placeholder:s="Select option",disabled:l=!1,compact:c=!1,leadingIcon:d,options:p,value:u=null,onChange:g,values:b=[],onValuesChange:v,className:x,wrapperClassName:w}){const[k,S]=f.useState(!1),[T,F]=f.useState(""),q=f.useRef(null),_=f.useRef(null),z=e==="tags",C=e==="search"||z,B=p.find(y=>y.id===u)??null,J=p.filter(y=>b.includes(y.id)),Z=T?p.filter(y=>`${y.label} ${y.supportingText??""}`.toLowerCase().includes(T.toLowerCase())):p,X=()=>{S(!1),F("")};f.useEffect(()=>{if(!k)return;const y=A=>{q.current?.contains(A.target)||X()};return document.addEventListener("mousedown",y),()=>document.removeEventListener("mousedown",y)},[k]),f.useEffect(()=>{k&&C&&_.current?.focus()},[k,C]);const Y=()=>{l||(k?X():S(!0))},h=y=>{y.disabled||(z?(v?.(b.includes(y.id)?b.filter(A=>A!==y.id):[...b,y.id]),F(""),_.current?.focus()):(g?.(y),X()))},P=y=>{if(y.key==="Enter"){y.preventDefault();const A=Z.find(ie=>!ie.disabled);k&&A&&h(A)}else y.key==="Backspace"&&z&&!T&&b.length?v?.(b.slice(0,-1)):k||S(!0)},V=y=>y.avatar?f.createElement("img",{src:y.avatar,alt:"",className:L(yr[t],"shrink-0 rounded-full object-cover")}):y.icon?f.createElement("span",{className:L(yr[t],"flex shrink-0 items-center justify-center",l?"text-light-400":"text-light-500")},y.icon):y.dot?f.createElement("span",{className:"size-2 shrink-0 rounded-full",style:{backgroundColor:l?"#d0d5dd":y.dot}}):null,$=B?V(B):d?f.createElement("span",{className:L(yr[t],"flex shrink-0 items-center justify-center",l?"text-light-400":"text-light-500")},d):null,U=B?f.createElement("span",{className:"flex min-w-0 items-center gap-2 whitespace-nowrap"},f.createElement("span",{className:L("truncate font-medium",l?"text-light-400":"text-light-800")},B.label),B.supportingText&&f.createElement("span",{className:l?"text-light-400":"text-light-700"},B.supportingText)):f.createElement("span",{className:l?"text-light-400":"text-light-500"},s),m=k&&f.createElement("div",{role:"listbox",className:yd({size:t})},Z.length===0&&f.createElement("div",{className:L(jo({size:t}),"mx-1 w-auto text-light-500 hover:bg-transparent")},"No options found"),Z.map(y=>{const A=z?b.includes(y.id):y.id===u;return f.createElement("div",{key:y.id,className:"px-1 py-0.5"},f.createElement("button",{type:"button",role:"option","aria-selected":A,disabled:y.disabled,onClick:()=>h(y),className:jo({size:t,disabled:y.disabled})},V(y),f.createElement("span",{className:"flex min-w-0 flex-1 items-center gap-2 whitespace-nowrap"},f.createElement("span",{className:L("truncate font-medium",y.disabled?"text-light-400":"text-light-900")},y.label),y.supportingText&&f.createElement("span",{className:y.disabled?"text-light-400":"text-light-700"},y.supportingText)),A&&f.createElement(Ed,{className:"ml-auto size-5 shrink-0 text-primary-500"})))}));return f.createElement("div",{ref:q,className:L(c?$d:md(),w)},r&&f.createElement("label",{className:c?Cd():gd()},r,n&&f.createElement("span",{className:"text-error-400"},"*"),o),f.createElement("div",{className:"relative",onKeyDown:y=>{y.key==="Escape"&&X()}},e==="default"?f.createElement("button",{type:"button","aria-haspopup":"listbox","aria-expanded":k,disabled:l,onClick:Y,className:L(c?Uo({size:t,open:k,disabled:l}):Ho({size:t,open:k,disabled:l}),x)},$,f.createElement("span",{className:"flex min-w-0 flex-1 items-center"},U),f.createElement(vd,{className:L(Go[t],"shrink-0 text-light-500")})):f.createElement("div",{role:"combobox","aria-haspopup":"listbox","aria-expanded":k,onClick:Y,className:L(c?Uo({size:t,open:k,disabled:l}):Ho({size:t,open:k,disabled:l}),x)},f.createElement(wd,{className:L(Go[t],"shrink-0",l?"text-light-400":"text-light-500")}),z&&J.length>0&&f.createElement("div",{className:"flex shrink items-center gap-1 overflow-x-auto whitespace-nowrap scrollbar-hide"},J.map(y=>f.createElement(Tt,{key:y.id,size:"sm",disabled:l,icon:y.avatar?f.createElement("img",{src:y.avatar,alt:"",className:"size-4 shrink-0 rounded-full object-cover"}):void 0,onClose:()=>h(y)},y.label))),!z&&!k&&B?f.createElement("span",{className:"flex min-w-0 flex-1 items-center"},U):f.createElement("input",{ref:_,value:T,disabled:l,placeholder:z&&J.length>0?"":s,onChange:y=>{F(y.target.value),k||S(!0)},onKeyDown:P,className:"min-w-8 flex-1 bg-transparent text-light-900 outline-none placeholder:text-light-500 disabled:cursor-not-allowed disabled:placeholder:text-light-400"})),m),i&&f.createElement("p",{className:xd()},i))}const Nd=I(["inline-flex items-center justify-center gap-1 shrink-0","rounded-md border border-light-200 bg-white px-2 py-1","font-bold text-caption-sm text-light-900","transition-shadow"],{variants:{open:{true:"shadow-[0px_0px_0px_2px_white,0px_0px_0px_4px_rgba(112,150,217,1)]",false:""},disabled:{true:"cursor-not-allowed opacity-50",false:"cursor-pointer"}},defaultVariants:{open:!1,disabled:!1}}),Kd=I("flex size-5 shrink-0 items-center justify-center text-light-500",{variants:{disabled:{true:"cursor-not-allowed opacity-50",false:"cursor-pointer hover:text-light-700"}},defaultVariants:{disabled:!1}}),Pd=I("rounded-full transition-shadow",{variants:{open:{true:"shadow-[0px_0px_0px_2px_white,0px_0px_0px_4px_rgba(112,150,217,1)]",false:""},disabled:{true:"cursor-not-allowed opacity-50",false:"cursor-pointer"}},defaultVariants:{open:!1,disabled:!1}}),Ld=I(["absolute top-full z-10 mt-2 flex w-60 flex-col overflow-clip","rounded-lg border border-light-200 bg-white","shadow-[0px_12px_16px_-4px_rgba(16,24,40,0.08),0px_4px_6px_-2px_rgba(16,24,40,0.03)]"]),Id=I("flex w-full flex-col items-start border-b border-light-200 px-4 py-3"),Md=I("flex w-full flex-col items-start overflow-y-auto py-1"),Dd=I(["mx-1 flex w-[calc(100%-8px)] items-center gap-3 rounded-md px-4 py-2.5","text-left font-bold text-caption-lg"],{variants:{disabled:{true:"cursor-not-allowed text-light-400",false:"cursor-pointer text-light-800 hover:bg-light-50"}},defaultVariants:{disabled:!1}}),Fd=I("ml-auto shrink-0 font-normal text-caption-sm text-light-500"),Ad=I("my-1 h-px w-full bg-light-200"),Od=({className:t})=>f.createElement("svg",{viewBox:"0 0 18 18",fill:"none",className:t},f.createElement("path",{d:"M4.5 6.75L9 11.25L13.5 6.75",stroke:"currentColor",strokeWidth:"1.67",strokeLinecap:"round",strokeLinejoin:"round"})),_d=({className:t})=>f.createElement("svg",{viewBox:"0 0 18 18",fill:"none",className:t},f.createElement("path",{d:"M13.5 11.25L9 6.75L4.5 11.25",stroke:"currentColor",strokeWidth:"1.67",strokeLinecap:"round",strokeLinejoin:"round"})),zd=({className:t})=>f.createElement("svg",{viewBox:"0 0 20 20",fill:"none",className:t},f.createElement("path",{d:"M10 10.83a.83.83 0 1 0 0-1.67.83.83 0 0 0 0 1.67ZM10 5a.83.83 0 1 0 0-1.67A.83.83 0 0 0 10 5ZM10 16.67a.83.83 0 1 0 0-1.67.83.83 0 0 0 0 1.67Z",stroke:"currentColor",strokeWidth:"1.67",strokeLinecap:"round",strokeLinejoin:"round"}));function Bd({trigger:t="button",label:e="Account",icon:r,avatarSrc:n,avatarInitials:o,header:i,items:s,open:l,defaultOpen:c=!1,onOpenChange:d,disabled:p=!1,align:u="end",className:g,menuClassName:b}){const[v,x]=f.useState(c),w=l!==void 0,k=w?l:v,S=f.useRef(null),T=_=>{w||x(_),d?.(_)};f.useEffect(()=>{if(!k)return;const _=C=>{S.current?.contains(C.target)||T(!1)},z=C=>{C.key==="Escape"&&T(!1)};return document.addEventListener("mousedown",_),document.addEventListener("keydown",z),()=>{document.removeEventListener("mousedown",_),document.removeEventListener("keydown",z)}},[k]);const F=()=>{p||T(!k)},q=_=>{_.disabled||(_.onClick?.(),T(!1))};return f.createElement("div",{ref:S,className:L("relative inline-block",g)},t==="button"&&f.createElement("button",{type:"button","aria-haspopup":"menu","aria-expanded":k,disabled:p,onClick:F,className:Nd({open:k,disabled:p})},f.createElement("span",null,e),k?f.createElement(_d,{className:"size-[18px]"}):f.createElement(Od,{className:"size-[18px]"})),t==="icon"&&f.createElement("button",{type:"button","aria-haspopup":"menu","aria-expanded":k,"aria-label":e,disabled:p,onClick:F,className:Kd({disabled:p})},r??f.createElement(zd,{className:"size-5"})),t==="avatar"&&f.createElement("button",{type:"button","aria-haspopup":"menu","aria-expanded":k,"aria-label":e,disabled:p,onClick:F,className:Pd({open:k,disabled:p})},f.createElement(Ae,{src:n,initials:o,size:"md",status:"online"})),k&&f.createElement("div",{role:"menu",className:L(Ld(),u==="end"?"right-0":"left-0",b)},i&&f.createElement("div",{className:Id()},f.createElement("div",{className:"flex w-full items-center gap-3"},f.createElement(Ae,{src:i.avatarSrc,initials:i.avatarInitials,size:"md",status:i.status??"online"}),f.createElement("div",{className:"flex min-w-0 flex-1 flex-col items-start text-left"},f.createElement("span",{className:"w-full truncate text-sm font-bold text-light-800"},i.name),i.subtitle&&f.createElement("span",{className:"w-full truncate text-caption-lg font-normal text-light-700"},i.subtitle)))),f.createElement("div",{className:Md()},s.map(_=>_.divider?f.createElement("div",{key:_.id,role:"separator",className:Ad()}):f.createElement("button",{key:_.id,type:"button",role:"menuitem",disabled:_.disabled,onClick:()=>q(_),className:Dd({disabled:_.disabled})},_.icon&&f.createElement("span",{className:"flex size-4 shrink-0 items-center justify-center"},_.icon),f.createElement("span",{className:"flex-1 truncate"},_.label),_.shortcut&&f.createElement("span",{className:Fd()},_.shortcut))))))}const qo=I("relative",{variants:{layout:{floating:["flex w-full flex-col gap-4 p-4","rounded-xl border shadow-xs","sm:flex-row sm:items-start"],"full-width":"w-full border-b"}},defaultVariants:{layout:"floating"}}),Vd={default:{surface:"bg-light-50",border:"border-light-300",iconSurface:"border border-light-200 bg-white shadow-xs",iconSurfaceOnLight:"border border-light-200 bg-white shadow-xs",iconText:"text-light-800"},brand:{surface:"bg-primary-50",border:"border-primary-300",iconSurface:"bg-primary-100",iconSurfaceOnLight:"bg-white",iconText:"text-primary-500"},gray:{surface:"bg-light-50",border:"border-light-300",iconSurface:"bg-light-100",iconSurfaceOnLight:"bg-white",iconText:"text-light-800"},error:{surface:"bg-error-50",border:"border-error-300",iconSurface:"bg-error-50",iconSurfaceOnLight:"bg-white",iconText:"text-error-500"},warning:{surface:"bg-warning-50",border:"border-warning-300",iconSurface:"bg-warning-100",iconSurfaceOnLight:"bg-white",iconText:"text-warning-500"},success:{surface:"bg-success-50",border:"border-success-300",iconSurface:"bg-success-50",iconSurfaceOnLight:"bg-white",iconText:"text-success-500"}},Wd="bg-white border-light-200",Hd="relative mx-auto flex w-full max-w-[1280px] flex-col gap-4 px-4 py-4 sm:flex-row sm:items-center sm:gap-3 sm:px-8 sm:py-3",jd=I("flex shrink-0 items-center justify-center",{variants:{layout:{floating:"","full-width":"hidden sm:flex"},shape:{square:"",circle:""},variant:{featured:"",plain:""}},compoundVariants:[{variant:"featured",layout:"floating",class:"size-8"},{variant:"featured",layout:"full-width",class:"size-10"},{variant:"featured",shape:"circle",class:"rounded-full"},{variant:"featured",shape:"square",layout:"floating",class:"rounded-md"},{variant:"featured",shape:"square",layout:"full-width",class:"rounded-lg"}],defaultVariants:{layout:"floating",shape:"square",variant:"featured"}}),Yo=I("flex min-w-0 flex-1",{variants:{layout:{floating:"flex-col gap-3","full-width":"items-center gap-4"}},defaultVariants:{layout:"floating"}}),Gd=I("flex min-w-0",{variants:{layout:{floating:"flex-col gap-1","full-width":"flex-col gap-0.5 sm:flex-row sm:flex-wrap sm:gap-x-1.5"},closable:{true:"",false:""}},compoundVariants:[{layout:"floating",closable:!0,class:"pr-8"},{layout:"full-width",closable:!0,class:"pr-8 sm:pr-0"}],defaultVariants:{layout:"floating",closable:!1}}),Ud="text-caption-lg font-bold text-light-800",qd="text-caption-lg text-light-600",Yd=I("flex gap-3",{variants:{layout:{floating:"flex-wrap items-center","full-width":""},actionVariant:{link:"flex-wrap items-center",button:""}},compoundVariants:[{layout:"full-width",actionVariant:"button",class:"flex-col-reverse sm:flex-row sm:items-center"}],defaultVariants:{layout:"floating",actionVariant:"link"}}),Xd=I(["inline-flex items-center justify-center gap-1 bg-transparent p-0","text-caption-lg font-bold transition-colors","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-400 focus-visible:ring-offset-2"],{variants:{emphasis:{primary:"text-primary-500 hover:text-primary-800",secondary:"text-light-800 hover:text-light-900"}},defaultVariants:{emphasis:"secondary"}}),Zd=I(["flex size-9 shrink-0 items-center justify-center rounded-lg","bg-transparent text-light-500 transition-colors","hover:bg-light-50 hover:text-light-700","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-400 focus-visible:ring-offset-2"],{variants:{layout:{floating:"absolute right-[7px] top-[7px]","full-width":"absolute right-2 top-2 sm:static"}},defaultVariants:{layout:"floating"}}),Jd={default:mr,brand:mr,gray:mr,error:Bo,warning:Bo,success:Kc},Xo=({title:t,description:e,color:r="default",layout:n="floating",background:o="white",icon:i,iconVariant:s="featured",showIcon:l=!0,primaryAction:c,secondaryAction:d,actionVariant:p,actions:u,onClose:g,closeLabel:b="Close",className:v,...x})=>{const w=Jd[r],k=n==="floating"?16:20,S=p??(n==="floating"?"link":"button"),T=Vd[r],F=o==="light",q=F?L(T.surface,T.border):Wd,_=(X,Y)=>X?S==="link"?a.createElement("button",{type:"button",onClick:X.onClick,className:Xd({emphasis:Y})},X.label):a.createElement(Ze,{size:"sm",variant:Y==="primary"?"solid":"outline",onClick:X.onClick,className:n==="full-width"?"w-full sm:w-auto":void 0},X.label):null,C=!!(u||c||d)?a.createElement("div",{className:Yd({layout:n,actionVariant:S})},u??a.createElement(a.Fragment,null,_(d,"secondary"),_(c,"primary"))):null,B=l&&(i||w)?a.createElement("div",{className:L(jd({layout:n,variant:s,shape:r==="default"?"square":"circle"}),T.iconText,s==="featured"&&(F?T.iconSurfaceOnLight:T.iconSurface))},i??a.createElement(w,{size:k,stroke:2})):null,J=g?a.createElement("button",{type:"button","aria-label":b,onClick:g,className:Zd({layout:n})},a.createElement(Pc,{size:16,stroke:2})):null,Z=a.createElement("div",{className:Gd({layout:n,closable:!!g})},a.createElement("p",{className:Ud},t),e&&a.createElement("p",{className:qd},e));return n==="full-width"?a.createElement("div",{role:"alert",className:L(qo({layout:n}),q,v),...x},a.createElement("div",{className:Hd},a.createElement("div",{className:Yo({layout:n})},B,Z),(C||J)&&a.createElement("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:gap-2"},C,J))):a.createElement("div",{role:"alert",className:L(qo({layout:n}),q,v),...x},B,a.createElement("div",{className:Yo({layout:n})},Z,C),J)};Xo.displayName="Alert",G.Alert=Xo,G.Avatar=Ae,G.AvatarGroup=ln,G.AvatarLabelGroup=an,G.AvatarProfilePhoto=cn,G.Badge=tn,G.BadgeGroup=rn,G.Button=Ze,G.CardNumberInput=Dc,G.Checkbox=Yr,G.Dropdown=Bd,G.Input=gr,G.InputCounter=Mc,G.InputDropdown=Td,G.Loading=nn,G.MultiSelectInput=Jc,G.PhoneInput=Lc,G.RadioGroup=qi,G.RadioGroupItem=Zr,G.SaleAmountInput=Ic,G.Tab=Io,G.TabBrowser=Ao,G.TabBrowserBar=Oo,G.TabList=Mo,G.Tag=Tt,G.Textarea=Wo,G.Toggle=Jr,G.Tooltip=Re,G.WebsiteCopyInput=bd,G.WebsiteInput=sd,Object.defineProperty(G,Symbol.toStringTag,{value:"Module"})}));
7
+ `.trim(),h.head.prepend(L)},[g]),a.useEffect(()=>{let h=w.current;return()=>{u||tr(h.target??void 0);for(let L of h.disposables)L();h.disposables=[]}},[u]),{isPressed:c||v,pressProps:oe(b,Y,{[co]:!0})}}function nr(t){return t.tagName==="A"&&t.hasAttribute("href")}function or(t,e){const{key:r,code:n}=t,o=e,i=o.getAttribute("role");return(r==="Enter"||r===" "||r==="Spacebar"||n==="Space")&&!(o instanceof le(o).HTMLInputElement&&!bo(o,r)||o instanceof le(o).HTMLTextAreaElement||o.isContentEditable)&&!((i==="link"||!i&&nr(o))&&r!=="Enter")}function ua(t){const{targetTouches:e}=t;return e.length>0?e[0]:null}function fo(t,e){const r=t.changedTouches;for(let n=0;n<r.length;n++){const o=r[n];if(o.identifier===e)return o}return null}function Se(t,e){let r=0,n=0;return e.targetTouches&&e.targetTouches.length===1&&(r=e.targetTouches[0].clientX,n=e.targetTouches[0].clientY),{currentTarget:t,shiftKey:e.shiftKey,ctrlKey:e.ctrlKey,metaKey:e.metaKey,altKey:e.altKey,clientX:r,clientY:n}}function Te(t,e){let r=e.clientX,n=e.clientY;return{currentTarget:t,shiftKey:e.shiftKey,ctrlKey:e.ctrlKey,metaKey:e.metaKey,altKey:e.altKey,clientX:r,clientY:n,key:e.key}}function fa(t){let e=0,r=0;return t.width!==void 0?e=t.width/2:t.radiusX!==void 0&&(e=t.radiusX),t.height!==void 0?r=t.height/2:t.radiusY!==void 0&&(r=t.radiusY),{top:t.clientY-r,right:t.clientX+e,bottom:t.clientY+r,left:t.clientX-e}}function pa(t,e){return!(t.left>e.right||e.left>t.right||t.top>e.bottom||e.top>t.bottom)}function po(t,e){let r=e.getBoundingClientRect(),n=fa(t);return pa(r,n)}function ha(t){return t instanceof HTMLInputElement?!1:t instanceof HTMLButtonElement?t.type!=="submit"&&t.type!=="reset":!nr(t)}function ho(t,e){return ue()&&e==="Enter"?!1:t instanceof HTMLInputElement?e==="Enter"&&(t.type==="checkbox"||t.type==="radio")?!1:!bo(t,e):ha(t)}const ba=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function bo(t,e){return t.type==="checkbox"||t.type==="radio"?e===" ":ba.has(t.type)}function ma(t){let{isDisabled:e,onBlurWithin:r,onFocusWithin:n,onFocusWithinChange:o}=t,i=a.useRef({isFocusWithin:!1}),{addGlobalListener:s,removeAllGlobalListeners:l}=bt(),c=a.useCallback(u=>{j(u.currentTarget,O(u))&&i.current.isFocusWithin&&!j(u.currentTarget,u.relatedTarget)&&(i.current.isFocusWithin=!1,l(),r&&r(u),o&&o(!1))},[r,o,i,l]),d=En(c),p=a.useCallback(u=>{if(!j(u.currentTarget,O(u)))return;let g=O(u);const b=Q(g),v=ce(b);if(!i.current.isFocusWithin&&v===g){n&&n(u),o&&o(!0),i.current.isFocusWithin=!0,d(u);let x=u.currentTarget;s(b,"focus",w=>{let k=O(w);if(i.current.isFocusWithin&&!j(x,k)){let S=new b.defaultView.FocusEvent("blur",{relatedTarget:k});wn(S,x);let T=At(S);c(T)}},{capture:!0})}},[n,o,d,s,c]);return e?{focusWithinProps:{onFocus:void 0,onBlur:void 0}}:{focusWithinProps:{onFocus:p,onBlur:c}}}function mo(t={}){let{autoFocus:e=!1,isTextInput:r,within:n}=t,o=a.useRef({isFocused:!1,isFocusVisible:e||Gt()}),[i,s]=a.useState(!1),[l,c]=a.useState(()=>o.current.isFocused&&o.current.isFocusVisible),d=a.useCallback(()=>c(o.current.isFocused&&o.current.isFocusVisible),[]),p=a.useCallback(b=>{o.current.isFocused=b,o.current.isFocusVisible=Gt(),s(b),d()},[d]);pl(b=>{o.current.isFocusVisible=b,d()},[r,i],{enabled:i,isTextInput:r});let{focusProps:u}=Un({isDisabled:n,onFocusChange:p}),{focusWithinProps:g}=ma({isDisabled:!n,onFocusWithinChange:p});return{isFocused:i,isFocusVisible:l,focusProps:n?g:u}}let gt=!1,yt=0;function ir(){gt=!0,setTimeout(()=>{gt=!1},500)}function go(t){t.pointerType==="touch"&&ir()}function ga(){let t=Q(null);if(!(typeof t>"u"))return yt===0&&(typeof PointerEvent<"u"?t.addEventListener("pointerup",go):process.env.NODE_ENV==="test"&&t.addEventListener("touchend",ir)),yt++,()=>{yt--,!(yt>0)&&(typeof PointerEvent<"u"?t.removeEventListener("pointerup",go):process.env.NODE_ENV==="test"&&t.removeEventListener("touchend",ir))}}function ya(t){let{onHoverStart:e,onHoverChange:r,onHoverEnd:n,isDisabled:o}=t,[i,s]=a.useState(!1),l=a.useRef({isHovered:!1,ignoreEmulatedMouseEvents:!1,pointerType:"",target:null}).current;a.useEffect(ga,[]);let{addGlobalListener:c,removeAllGlobalListeners:d}=bt(),{hoverProps:p,triggerHoverEnd:u}=a.useMemo(()=>{let g=(x,w)=>{if(l.pointerType=w,o||w==="touch"||l.isHovered||!j(x.currentTarget,O(x)))return;l.isHovered=!0;let k=x.currentTarget;l.target=k,c(Q(O(x)),"pointerover",S=>{l.isHovered&&l.target&&!j(l.target,O(S))&&b(S,S.pointerType)},{capture:!0}),e&&e({type:"hoverstart",target:k,pointerType:w}),r&&r(!0),s(!0)},b=(x,w)=>{let k=l.target;l.pointerType="",l.target=null,!(w==="touch"||!l.isHovered||!k)&&(l.isHovered=!1,d(),n&&n({type:"hoverend",target:k,pointerType:w}),r&&r(!1),s(!1))},v={};return typeof PointerEvent<"u"?(v.onPointerEnter=x=>{gt&&x.pointerType==="mouse"||g(x,x.pointerType)},v.onPointerLeave=x=>{!o&&j(x.currentTarget,O(x))&&b(x,x.pointerType)}):process.env.NODE_ENV==="test"&&(v.onTouchStart=()=>{l.ignoreEmulatedMouseEvents=!0},v.onMouseEnter=x=>{!l.ignoreEmulatedMouseEvents&&!gt&&g(x,"mouse"),l.ignoreEmulatedMouseEvents=!1},v.onMouseLeave=x=>{!o&&j(x.currentTarget,O(x))&&b(x,"mouse")}),{hoverProps:v,triggerHoverEnd:b}},[e,r,n,o,l,c,d]);return a.useEffect(()=>{o&&u({currentTarget:l.target},l.pointerType)},[o]),{hoverProps:p,isHovered:i}}function xa(t,e){if(!t)return!1;let r=window.getComputedStyle(t),n=document.scrollingElement||document.documentElement,o=/(auto|scroll)/.test(r.overflow+r.overflowX+r.overflowY);return t===n&&r.overflow!=="hidden"&&(o=!0),o&&e&&(o=t.scrollHeight!==t.clientHeight||t.scrollWidth!==t.clientWidth),o}function sr(t,e){let r=[],n=document.scrollingElement||document.documentElement;for(;t&&(xa(t,e)&&r.push(t),t!==n);)t=t.parentElement;return r}function xt(t,e,r={}){let{block:n="nearest",inline:o="nearest"}=r;if(t===e)return;let i=t.scrollTop,s=t.scrollLeft,l=e.getBoundingClientRect(),c=t.getBoundingClientRect(),d=window.getComputedStyle(e),p=window.getComputedStyle(t),u=document.scrollingElement||document.documentElement,g=t===u,b=t===u?0:c.top,v=t===u?t.clientHeight:c.bottom,x=t===u?0:c.left,w=t===u?t.clientWidth:c.right,k=parseFloat(d.scrollMarginTop)||0,S=parseFloat(d.scrollMarginBottom)||0,T=parseFloat(d.scrollMarginLeft)||0,F=parseFloat(d.scrollMarginRight)||0,q=parseFloat(p.scrollPaddingTop)||0,_=parseFloat(p.scrollPaddingBottom)||0,z=parseFloat(p.scrollPaddingLeft)||0,C=parseFloat(p.scrollPaddingRight)||0,B=parseFloat(p.borderTopWidth)||0,J=parseFloat(p.borderBottomWidth)||0,Z=parseFloat(p.borderLeftWidth)||0,X=parseFloat(p.borderRightWidth)||0,Y=l.top-k,h=l.bottom+S,L=l.left-T,V=l.right+F,$=t===u?0:Z+X,U=t===u?0:B+J,m=t===u?0:t.offsetWidth-t.clientWidth-$,y=t===u?0:t.offsetHeight-t.clientHeight-U,A=b+(g?0:B)+q,ie=v-(g?0:J)-_-y,ae=x+(g?0:Z)+z,se=w-(g?0:X)-C;_e()&&Pe()||p.direction==="ltr"?se-=m:p.direction==="rtl"&&(ae+=m);let E=Y<A||h>ie,W=L<ae||V>se;if(E&&n==="start")i+=Y-A;else if(E&&n==="center")i+=(Y+h)/2-(A+ie)/2;else if(E&&n==="end")i+=h-ie;else if(E&&n==="nearest"){let ne=Y-A,be=h-ie;i+=Math.abs(ne)<=Math.abs(be)?ne:be}if(W&&o==="start")s+=L-ae;else if(W&&o==="center")s+=(L+V)/2-(ae+se)/2;else if(W&&o==="end")s+=V-se;else if(W&&o==="nearest"){let ne=L-ae,be=V-se;s+=Math.abs(ne)<=Math.abs(be)?ne:be}if(process.env.NODE_ENV==="test"){t.scrollLeft=s,t.scrollTop=i;return}t.scrollTo({left:s,top:i})}function yo(t,e={}){let{containingElement:r}=e;if(t&&t.isConnected){let n=document.scrollingElement||document.documentElement;if(window.getComputedStyle(n).overflow==="hidden"){let{left:i,top:s}=t.getBoundingClientRect(),l=sr(t,!0);for(let p of l)xt(p,t);let{left:c,top:d}=t.getBoundingClientRect();if(Math.abs(i-c)>1||Math.abs(s-d)>1){l=r?sr(r,!0):[];for(let p of l)xt(p,r,{block:"center",inline:"center"});for(let p of sr(t,!0))xt(p,t)}}else{let{left:i,top:s}=t.getBoundingClientRect();t?.scrollIntoView?.({block:"nearest"});let{left:l,top:c}=t.getBoundingClientRect();(Math.abs(i-l)>1||Math.abs(s-c)>1)&&(r?.scrollIntoView?.({block:"center",inline:"center"}),t.scrollIntoView?.({block:"nearest"}))}}}let va=0;const lr=new Map;function wa(t){let[e,r]=a.useState();return we(()=>{if(!t)return;let n=lr.get(t);if(n)r(n.element.id);else{let o=`react-aria-description-${va++}`;r(o);let i=document.createElement("div");i.id=o,i.style.display="none",i.textContent=t,document.body.appendChild(i),n={refCount:0,element:i},lr.set(t,n)}return n.refCount++,()=>{n&&--n.refCount===0&&(n.element.remove(),lr.delete(t))}},[t]),{"aria-describedby":t?e:void 0}}const Ea=a.createContext(null);function Sa(t){let e=a.useRef({});return a.createElement(Ea.Provider,{value:e},t.children)}const ka=a.createContext({isSelected:!1});class Ca{constructor(e,r,n,o){this._walkerStack=[],this._currentSetFor=new Set,this._acceptNode=s=>{if(s.nodeType===Node.ELEMENT_NODE){const l=s.shadowRoot;if(l){const c=this._doc.createTreeWalker(l,this.whatToShow,{acceptNode:this._acceptNode});return this._walkerStack.unshift(c),NodeFilter.FILTER_ACCEPT}else{if(typeof this.filter=="function")return this.filter(s);if(this.filter?.acceptNode)return this.filter.acceptNode(s);if(this.filter===null)return NodeFilter.FILTER_ACCEPT}}return NodeFilter.FILTER_SKIP},this._doc=e,this.root=r,this.filter=o??null,this.whatToShow=n??NodeFilter.SHOW_ALL,this._currentNode=r,this._walkerStack.unshift(e.createTreeWalker(r,n,this._acceptNode));const i=r.shadowRoot;if(i){const s=this._doc.createTreeWalker(i,this.whatToShow,{acceptNode:this._acceptNode});this._walkerStack.unshift(s)}}get currentNode(){return this._currentNode}set currentNode(e){if(!j(this.root,e))throw new Error("Cannot set currentNode to a node that is not contained by the root node.");const r=[];let n=e,o=e;for(this._currentNode=e;n&&n!==this.root;)if(n.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const s=n,l=this._doc.createTreeWalker(s,this.whatToShow,{acceptNode:this._acceptNode});r.push(l),l.currentNode=o,this._currentSetFor.add(l),n=o=s.host}else n=n.parentNode;const i=this._doc.createTreeWalker(this.root,this.whatToShow,{acceptNode:this._acceptNode});r.push(i),i.currentNode=o,this._currentSetFor.add(i),this._walkerStack=r}get doc(){return this._doc}firstChild(){let e=this.currentNode,r=this.nextNode();return j(e,r)?(r&&(this.currentNode=r),r):(this.currentNode=e,null)}lastChild(){let r=this._walkerStack[0].lastChild();return r&&(this.currentNode=r),r}nextNode(){const e=this._walkerStack[0].nextNode();if(e){if(e.shadowRoot){let n;if(typeof this.filter=="function"?n=this.filter(e):this.filter?.acceptNode&&(n=this.filter.acceptNode(e)),n===NodeFilter.FILTER_ACCEPT)return this.currentNode=e,e;let o=this.nextNode();return o&&(this.currentNode=o),o}return e&&(this.currentNode=e),e}else if(this._walkerStack.length>1){this._walkerStack.shift();let r=this.nextNode();return r&&(this.currentNode=r),r}else return null}previousNode(){const e=this._walkerStack[0];if(e.currentNode===e.root){if(this._currentSetFor.has(e))if(this._currentSetFor.delete(e),this._walkerStack.length>1){this._walkerStack.shift();let n=this.previousNode();return n&&(this.currentNode=n),n}else return null;return null}const r=e.previousNode();if(r){if(r.shadowRoot){let o;if(typeof this.filter=="function"?o=this.filter(r):this.filter?.acceptNode&&(o=this.filter.acceptNode(r)),o===NodeFilter.FILTER_ACCEPT)return r&&(this.currentNode=r),r;let i=this.lastChild();return i&&(this.currentNode=i),i}return r&&(this.currentNode=r),r}else if(this._walkerStack.length>1){this._walkerStack.shift();let n=this.previousNode();return n&&(this.currentNode=n),n}else return null}nextSibling(){return null}previousSibling(){return null}parentNode(){return null}}function $a(t,e,r,n){return nt()?new Ca(t,e,r,n):t.createTreeWalker(e,r,n)}function Ta(t){if(!t.form)return Array.from(Q(t).querySelectorAll(`input[type="radio"][name="${CSS.escape(t.name)}"]`)).filter(n=>!n.form);const e=t.form.elements.namedItem(t.name);let r=le(t);return e instanceof r.RadioNodeList?Array.from(e).filter(n=>n instanceof r.HTMLInputElement):e instanceof r.HTMLInputElement?[e]:[]}function Na(t){if(t.checked)return!0;const e=Ta(t);return e.length>0&&!e.some(r=>r.checked)}function xo(t,e){return!t||!e?!1:e.some(r=>j(r,t))}function Ka(t,e,r){let n=e?.tabbable?Ft:xn,o=t?.nodeType===Node.ELEMENT_NODE?t:null,i=Q(o),s=$a(i,t||i,NodeFilter.SHOW_ELEMENT,{acceptNode(l){return j(e?.from,l)||e?.tabbable&&l.tagName==="INPUT"&&l.getAttribute("type")==="radio"&&(!Na(l)||s.currentNode.tagName==="INPUT"&&s.currentNode.type==="radio"&&s.currentNode.name===l.name)?NodeFilter.FILTER_REJECT:n(l)&&(!r||xo(l,r))&&(!e?.accept||e.accept(l))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});return e?.from&&(s.currentNode=e.from),s}class ar{constructor(){this.fastMap=new Map,this.root=new vo({scopeRef:null}),this.fastMap.set(null,this.root)}get size(){return this.fastMap.size}getTreeNode(e){return this.fastMap.get(e)}addTreeNode(e,r,n){let o=this.fastMap.get(r??null);if(!o)return;let i=new vo({scopeRef:e});o.addChild(i),i.parent=o,this.fastMap.set(e,i),n&&(i.nodeToRestore=n)}addNode(e){this.fastMap.set(e.scopeRef,e)}removeTreeNode(e){if(e===null)return;let r=this.fastMap.get(e);if(!r)return;let n=r.parent;for(let i of this.traverse())i!==r&&r.nodeToRestore&&i.nodeToRestore&&r.scopeRef&&r.scopeRef.current&&xo(i.nodeToRestore,r.scopeRef.current)&&(i.nodeToRestore=r.nodeToRestore);let o=r.children;n&&(n.removeChild(r),o.size>0&&o.forEach(i=>n&&n.addChild(i))),this.fastMap.delete(r.scopeRef)}*traverse(e=this.root){if(e.scopeRef!=null&&(yield e),e.children.size>0)for(let r of e.children)yield*this.traverse(r)}clone(){let e=new ar;for(let r of this.traverse())e.addTreeNode(r.scopeRef,r.parent?.scopeRef??null,r.nodeToRestore);return e}}class vo{constructor(e){this.children=new Set,this.contain=!1,this.scopeRef=e.scopeRef}addChild(e){this.children.add(e),e.parent=this}removeChild(e){this.children.delete(e),e.parent=void 0}}new ar;function cr(t){return rl()?t.altKey:t.ctrlKey}function dr(t,e){let r=`[data-key="${CSS.escape(String(e))}"]`,n=t.current?.dataset.collection;return n&&(r=`[data-collection="${CSS.escape(n)}"]${r}`),t.current?.querySelector(r)}const wo=new WeakMap;function Pa(t){let e=tt();return wo.set(t,e),e}function La(t){return wo.get(t)}const Eo=1e3;function Ia(t){let{keyboardDelegate:e,selectionManager:r,onTypeSelect:n}=t,o=a.useRef({search:"",timeout:void 0}),i=l=>{if(o.current.search.length>0&&l.key===" "){if(l.preventDefault(),(!("continuePropagation"in l)||"continuePropagation"in l&&!l.isPropagationStopped())&&l.stopPropagation(),o.current.search+=" ",e.getKeyForSearch!=null){let c=e.getKeyForSearch(o.current.search,r.focusedKey);c==null&&(c=e.getKeyForSearch(o.current.search)),c!=null&&(r.setFocusedKey(c),n&&n(c))}clearTimeout(o.current.timeout),o.current.timeout=setTimeout(()=>{o.current.search=""},Eo)}},s=l=>{let c=Ma(l.key);if(!(!c||l.ctrlKey||l.metaKey||l.altKey||!j(l.currentTarget,O(l))||o.current.search.length===0&&c===" ")){if(o.current.search+=c,e.getKeyForSearch!=null){let d=e.getKeyForSearch(o.current.search,r.focusedKey);if(d==null&&(d=e.getKeyForSearch(o.current.search)),d!=null)r.setFocusedKey(d),n&&n(d),l.preventDefault(),"continuePropagation"in l||l.stopPropagation();else{o.current.search="",clearTimeout(o.current.timeout),o.current.timeout=void 0;return}}clearTimeout(o.current.timeout),o.current.timeout=setTimeout(()=>{o.current.search=""},Eo)}};return a.useEffect(()=>{let l=o.current.timeout;return()=>{clearTimeout(l)}},[o]),{typeSelectProps:{onKeyDownCapture:e.getKeyForSearch?i:void 0,onKeyDown:e.getKeyForSearch?s:void 0}}}function Ma(t){return t.length===1||!/^[A-Z]/i.test(t)?t:""}function So(t,e){const r=a.useRef(!0),n=a.useRef(null);we(()=>(r.current=!0,()=>{r.current=!1}),[]),we(()=>{r.current?r.current=!1:(!n.current||e.some((o,i)=>!Object.is(o,n[i])))&&t(),n.current=e},e)}function Da(t){let{selectionManager:e,keyboardDelegate:r,ref:n,autoFocus:o=!1,shouldFocusWrap:i=!1,disallowEmptySelection:s=!1,disallowSelectAll:l=!1,escapeKeyBehavior:c="clearSelection",selectOnFocus:d=e.selectionBehavior==="replace",disallowTypeAhead:p=!1,shouldUseVirtualFocus:u,allowsTabNavigation:g=!1,scrollRef:b=n,linkBehavior:v="action",UNSTABLE_focusOnEntry:x}=t,{direction:w}=Dn(),k=Bt();const S=(K,N,re)=>{if(N!=null){if(e.isLink(N)&&v==="selection"&&d&&!cr(K)){Ue.flushSync(()=>{e.setFocusedKey(N,re)});let R=dr(n,N),Jo=e.getItemProps(N);if(R){k.open(R,K,Jo.href,Jo.routerOptions);return}return!1}if(e.setFocusedKey(N,re),e.isLink(N)&&v==="override")return!1;if(K.shiftKey&&e.selectionMode==="multiple"){e.extendSelection(N);return}else if(d&&!cr(K)){e.replaceSelection(N);return}}return!1};let T=K=>{if(r.getKeyBelow){let N=e.focusedKey!=null?r.getKeyBelow?.(e.focusedKey):r.getFirstKey?.();if(N==null&&i&&(N=r.getFirstKey?.(e.focusedKey)),N!=null){S(K,N);return}}return!1},F=K=>{if(r.getKeyAbove){let N=e.focusedKey!=null?r.getKeyAbove?.(e.focusedKey):r.getLastKey?.();if(N==null&&i&&(N=r.getLastKey?.(e.focusedKey)),N!=null){S(K,N);return}}return!1},q=K=>{if(r.getFirstKey){if(e.focusedKey===null&&K.shiftKey)return!1;let N=r.getFirstKey(e.focusedKey,Be(K));if(e.setFocusedKey(N),N!=null){if(Be(K)&&K.shiftKey&&e.selectionMode==="multiple"){e.extendSelection(N);return}else if(d){e.replaceSelection(N);return}}}return!1},_=K=>{if(r.getKeyLeftOf){let N=e.focusedKey!=null?r.getKeyLeftOf?.(e.focusedKey):r.getFirstKey?.();if(N==null&&i&&(N=w==="rtl"?r.getFirstKey?.(e.focusedKey):r.getLastKey?.(e.focusedKey)),N!=null){S(K,N,w==="rtl"?"first":"last");return}}return!1},z=K=>{if(r.getKeyRightOf){let N=e.focusedKey!=null?r.getKeyRightOf?.(e.focusedKey):r.getFirstKey?.();if(N==null&&i&&(N=w==="rtl"?r.getLastKey?.(e.focusedKey):r.getFirstKey?.(e.focusedKey)),N!=null){S(K,N,w==="rtl"?"last":"first");return}}return!1},C=K=>{if(r.getLastKey){if(e.focusedKey===null&&K.shiftKey)return!1;let N=r.getLastKey(e.focusedKey,Be(K));if(e.setFocusedKey(N),N!=null){if(Be(K)&&K.shiftKey&&e.selectionMode==="multiple"){e.extendSelection(N);return}else if(d){e.replaceSelection(N);return}}}return!1},B=K=>{if(r.getKeyPageBelow&&e.focusedKey!=null){let N=r.getKeyPageBelow(e.focusedKey);if(N!=null)return S(K,N)}return!1},J=K=>{if(r.getKeyPageAbove&&e.focusedKey!=null){let N=r.getKeyPageAbove(e.focusedKey);if(N!=null)return S(K,N)}return!1},Z=()=>{if(e.selectionMode==="multiple"&&l!==!0){e.selectAll();return}return!1},X=()=>{if(c==="clearSelection"&&!s&&e.selectedKeys.size!==0){e.clearSelection();return}return!1},Y=()=>{if(!g&&n.current){let K=Ka(n.current,{tabbable:!0}),N,re;do re=K.lastChild(),re&&(N=re);while(re);let R=ce();N&&(!mn(N)||R&&!Ft(R))&&ge(N)}return{shouldContinuePropagation:!0,shouldPreventDefault:!1}},h=()=>(!g&&n.current&&n.current.focus(),{shouldContinuePropagation:!0,shouldPreventDefault:!1}),L=(K,N)=>({[ue()?K+"+Shift+Alt":K+"+Shift+Control"]:N,[K+"+Shift"]:N,[ue()?K+"+Alt":K+"+Control"]:N,[K]:N}),{keyboardProps:V}=Xt({shortcuts:{...L("ArrowDown",T),...L("ArrowUp",F),...L("ArrowLeft",_),...L("ArrowRight",z),...L("PageDown",B),...L("PageUp",J)},allowRepeats:!0}),{keyboardProps:$}=Xt({shortcuts:{...L("Home",q),...L("End",C),"Mod+A":Z,Escape:X,Tab:Y,"Tab+Shift":h}}),U=a.useRef({top:0,left:0});ct(b,"scroll",()=>{U.current={top:b.current?.scrollTop??0,left:b.current?.scrollLeft??0}});let m=K=>{if(e.isFocused){j(K.currentTarget,O(K))||e.setFocused(!1);return}if(!j(K.currentTarget,O(K)))return;let N=Ut();e.setFocused(!0);let re=R=>{R!=null&&(e.setFocusedKey(R),d&&!e.isSelected(R)&&e.replaceSelection(R))};if(x&&(N==="keyboard"||N==="virtual"))re(x==="first"?r.getFirstKey?.():r.getLastKey?.());else if(e.focusedKey==null){let R=K.relatedTarget;R&&K.currentTarget.compareDocumentPosition(R)&Node.DOCUMENT_POSITION_FOLLOWING?re(e.lastSelectedKey??r.getLastKey?.()):re(e.firstSelectedKey??r.getFirstKey?.())}else b.current&&(b.current.scrollTop=U.current.top,b.current.scrollLeft=U.current.left);if(e.focusedKey!=null&&b.current){let R=dr(n,e.focusedKey);R instanceof HTMLElement&&(!mn(R)&&!u&&ge(R),(N==="keyboard"||x&&N==="virtual")&&yo(R,{containingElement:n.current}))}},y=K=>{j(K.currentTarget,K.relatedTarget)||e.setFocused(!1)},A=a.useRef(!1);ct(n,Bs,u?K=>{let{detail:N}=K;K.stopPropagation(),e.setFocused(!0),N?.focusStrategy==="first"&&(A.current=!0)}:void 0);let ie=r.getFirstKey?.()??null;So(()=>{if(A.current)if(ie==null){let K=ce();gn(n.current),yn(K,null),e.collection.size>0&&(A.current=!1)}else e.setFocusedKey(ie),A.current=!1},[ie,e.collection.size]),So(()=>{e.collection.size>0&&(A.current=!1)},[e.focusedKey]),ct(n,zs,u?K=>{K.stopPropagation(),e.setFocused(!1),K.detail?.clearFocusKey&&e.setFocusedKey(null)}:void 0);const ae=a.useRef(o),se=a.useRef(!1);a.useEffect(()=>{if(ae.current){let K=null;o==="first"&&(K=r.getFirstKey?.()??null),o==="last"&&(K=r.getLastKey?.()??null);let N=e.selectedKeys;if(N.size){for(let re of N)if(e.canSelectItem(re)){K=re;break}}e.setFocused(!0),e.setFocusedKey(K),K==null&&!u&&n.current&&dt(n.current),e.collection.size>0&&(ae.current=!1,se.current=!0)}});let E=a.useRef(e.focusedKey),W=a.useRef(null);a.useEffect(()=>{if(e.isFocused&&e.focusedKey!=null&&(e.focusedKey!==E.current||se.current)&&b.current&&n.current){let K=Ut(),N=dr(n,e.focusedKey);if(!(N instanceof HTMLElement))return;(K==="keyboard"||se.current)&&(W.current&&cancelAnimationFrame(W.current),W.current=requestAnimationFrame(()=>{b.current&&(xt(b.current,N),K!=="virtual"&&yo(N,{containingElement:n.current}))}))}!u&&e.isFocused&&e.focusedKey==null&&E.current!=null&&n.current&&dt(n.current),E.current=e.focusedKey,se.current=!1}),a.useEffect(()=>()=>{W.current&&cancelAnimationFrame(W.current)},[]),ct(n,"react-aria-focus-scope-restore",K=>{K.preventDefault(),e.setFocused(!0)});let ne={...oe($,V),onFocus:m,onBlur:y,onMouseDown(K){b.current===O(K)&&K.preventDefault()}},{typeSelectProps:be}=Ia({keyboardDelegate:r,selectionManager:e});p||(ne=oe(be,ne));let ee;u||(ee=e.focusedKey==null?0:-1);let wt=Pa(e.collection);return{collectionProps:oe(ne,{tabIndex:ee,"data-collection":wt})}}const Fa=500;function Aa(t){let{isDisabled:e,pointerType:r,onLongPressStart:n,onLongPressEnd:o,onLongPress:i,threshold:s=Fa,accessibilityDescription:l}=t;const c=a.useRef(void 0);let{addGlobalListener:d,removeAllGlobalListeners:p}=bt(),u=v=>r?v.pointerType===r:v.pointerType==="mouse"||v.pointerType==="touch",{pressProps:g}=uo({isDisabled:e,onPressStart(v){if(v.continuePropagation(),u(v)){n&&n({...v,type:"longpressstart"}),c.current=setTimeout(()=>{v.target.dispatchEvent(new PointerEvent("pointercancel",{bubbles:!0})),d(v.target,"click",w=>w.preventDefault(),{once:!0}),Q(v.target).activeElement!==v.target&&ge(v.target),i&&i({...v,type:"longpress"}),c.current=void 0},s),v.pointerType==="touch"&&d(v.target,"contextmenu",w=>w.preventDefault(),{once:!0});let x=le(v.target);d(x,"pointerup",()=>{setTimeout(()=>{p()},100)},{once:!0})}},onPressEnd(v){c.current&&clearTimeout(c.current),o&&u(v)&&o({...v,type:"longpressend"})}}),b=wa(i&&!e?l:void 0);return{longPressProps:oe(g,b)}}function Oa(t){let{id:e,selectionManager:r,key:n,ref:o,shouldSelectOnPressUp:i,shouldUseVirtualFocus:s,focus:l,isDisabled:c,onAction:d,allowsDifferentPressOrigin:p,linkBehavior:u="action"}=t,g=Bt();e=tt(e);let b=E=>{if(E.pointerType==="keyboard"&&cr(E))r.toggleSelection(n);else{if(r.selectionMode==="none")return;if(r.isLink(n)){if(u==="selection"&&o.current){let W=r.getItemProps(n);g.open(o.current,E,W.href,W.routerOptions),r.setSelectedKeys(r.selectedKeys);return}else if(u==="override"||u==="none")return}r.selectionMode==="single"?r.isSelected(n)&&!r.disallowEmptySelection?r.toggleSelection(n):r.replaceSelection(n):E&&E.shiftKey?r.extendSelection(n):r.selectionBehavior==="toggle"||E&&(Be(E)||E.pointerType==="touch"||E.pointerType==="virtual")?r.toggleSelection(n):r.replaceSelection(n)}};a.useEffect(()=>{n===r.focusedKey&&r.isFocused&&(s?gn(o.current):l?l():ce()!==o.current&&o.current&&dt(o.current))},[o,n,r.focusedKey,r.childFocusStrategy,r.isFocused,s]),c=c||r.isDisabled(n);let v={};!s&&!c?v={tabIndex:n===r.focusedKey?0:-1,onFocus(E){O(E)===o.current&&r.setFocusedKey(n)}}:c&&(v.onMouseDown=E=>{E.preventDefault()}),a.useEffect(()=>{c&&r.focusedKey===n&&r.setFocusedKey(null)},[r,c,n]);let x=r.isLink(n)&&u==="override",w=d&&t.UNSTABLE_itemBehavior==="action",k=r.isLink(n)&&u!=="selection"&&u!=="none",S=!c&&r.canSelectItem(n)&&!x&&!w,T=(d||k)&&!c,F=T&&(r.selectionBehavior==="replace"?!S:!S||r.isEmpty),q=T&&S&&r.selectionBehavior==="replace",_=F||q,z=a.useRef(null),C=_&&S,B=a.useRef(!1),J=a.useRef(!1),Z=r.getItemProps(n),X=E=>{d&&(d(),o.current?.dispatchEvent(new CustomEvent("react-aria-item-action",{bubbles:!0}))),k&&o.current&&g.open(o.current,E,Z.href,Z.routerOptions)},Y={ref:o};i?(Y.onPressStart=E=>{z.current=E.pointerType,B.current=C,E.pointerType==="keyboard"&&(!_||Co(E.key))&&b(E)},p?(Y.onPressUp=F?void 0:E=>{E.pointerType==="mouse"&&S&&b(E)},Y.onPress=F?X:E=>{E.pointerType!=="keyboard"&&E.pointerType!=="mouse"&&S&&b(E)}):Y.onPress=E=>{if(F||q&&E.pointerType!=="mouse"){if(E.pointerType==="keyboard"&&!ko(E.key))return;X(E)}else E.pointerType!=="keyboard"&&S&&b(E)}):(Y.onPressStart=E=>{z.current=E.pointerType,B.current=C,J.current=F,S&&(E.pointerType==="mouse"&&!F||E.pointerType==="keyboard"&&(!T||Co(E.key)))&&b(E)},Y.onPress=E=>{(E.pointerType==="touch"||E.pointerType==="pen"||E.pointerType==="virtual"||E.pointerType==="keyboard"&&_&&ko(E.key)||E.pointerType==="mouse"&&J.current)&&(_?X(E):S&&b(E))});let h=La(r.collection);if(v["data-collection"]=h,v["data-key"]=n,Y.preventFocusOnPress=s,s&&(Y=oe(Y,{onPressStart(E){E.pointerType!=="touch"&&(r.setFocused(!0),r.setFocusedKey(n))},onPress(E){E.pointerType==="touch"&&(r.setFocused(!0),r.setFocusedKey(n))}})),Z)for(let E of["onPressStart","onPressEnd","onPressChange","onPress","onPressUp","onClick"])Z[E]&&(Y[E]=Oe(Y[E],Z[E]));let{pressProps:L,isPressed:V}=uo(Y),$=q?E=>{z.current==="mouse"&&(E.stopPropagation(),E.preventDefault(),X(E))}:void 0,{longPressProps:U}=Aa({isDisabled:!C,onLongPress(E){E.pointerType==="touch"&&(b(E),r.setSelectionBehavior("toggle"))}}),m=E=>{z.current==="touch"&&B.current&&E.preventDefault()},y=u!=="none"&&r.isLink(n)?E=>{ye.isOpening||E.preventDefault()}:void 0,A=oe(v,S||F||s&&!c?L:{},C?U:{},{onDoubleClick:$,onDragStartCapture:m,onClick:y,id:e},s?{onMouseDown:E=>E.preventDefault()}:void 0),ie=E=>{let W=E;for(;W&&W!==o.current;){let ne=W.getAttribute("data-collection");if(ne!=null)return ne!==h;W=W.parentElement}return Ft(E)},ae=A.onPointerDown;A.onPointerDown=E=>{let W=O(E);if(W&&W!==o.current&&ie(W)){E.stopPropagation();return}ae?.(E)};let se=A.onMouseDown;return A.onMouseDown=E=>{let W=O(E);if(W&&W!==o.current&&ie(W)){E.stopPropagation();return}se?.(E)},{itemProps:A,isPressed:V,isSelected:r.isSelected(n),isFocused:r.isFocused&&r.focusedKey===n,isDisabled:c,allowsSelection:S,hasAction:_}}function ko(t){return t==="Enter"}function Co(t){return t===" "}function _a(t,e){return typeof e.getChildren=="function"?e.getChildren(t.key):t.childNodes}function za(t){return Ba(t)}function Ba(t,e){for(let r of t)return r}function ur(t,e,r){if(e.parentKey===r.parentKey)return e.index-r.index;let n=[...$o(t,e),e],o=[...$o(t,r),r],i=n.slice(0,o.length).findIndex((s,l)=>s!==o[l]);return i!==-1?(e=n[i],r=o[i],e.index-r.index):n.findIndex(s=>s===r)>=0?1:(o.findIndex(s=>s===e)>=0,-1)}function $o(t,e){let r=[],n=e;for(;n?.parentKey!=null;)n=t.getItem(n.parentKey),n&&r.unshift(n);return r}class To{constructor(e){this.keyMap=new Map,this.firstKey=null,this.lastKey=null,this.iterable=e;let r=s=>{if(this.keyMap.set(s.key,s),s.childNodes&&s.type==="section")for(let l of s.childNodes)r(l)};for(let s of e)r(s);let n=null,o=0,i=0;for(let[s,l]of this.keyMap)n?(n.nextKey=s,l.prevKey=n.key):(this.firstKey=s,l.prevKey=void 0),l.type==="item"&&(l.index=o++),(l.type==="section"||l.type==="item")&&i++,n=l,n.nextKey=void 0;this._size=i,this.lastKey=n?.key??null}*[Symbol.iterator](){yield*this.iterable}get size(){return this._size}getKeys(){return this.keyMap.keys()}getKeyBefore(e){let r=this.keyMap.get(e);return r?r.prevKey??null:null}getKeyAfter(e){let r=this.keyMap.get(e);return r?r.nextKey??null:null}getFirstKey(){return this.firstKey}getLastKey(){return this.lastKey}getItem(e){return this.keyMap.get(e)??null}at(e){const r=[...this.getKeys()];return this.getItem(r[e])}getChildren(e){return this.keyMap.get(e)?.childNodes||[]}}class fe extends Set{constructor(e,r,n){super(e),e instanceof fe?(this.anchorKey=r??e.anchorKey,this.currentKey=n??e.currentKey):(this.anchorKey=r??null,this.currentKey=n??null)}}function Va(t,e){if(t.size!==e.size)return!1;for(let r of t)if(!e.has(r))return!1;return!0}function Wa(t){let{selectionMode:e="none",disallowEmptySelection:r=!1,allowDuplicateSelectionEvents:n,selectionBehavior:o="toggle",disabledBehavior:i="all"}=t,s=a.useRef(!1),[,l]=a.useState(!1),c=a.useRef(null),d=a.useRef(null),[,p]=a.useState(null),u=a.useMemo(()=>No(t.selectedKeys),[t.selectedKeys]),g=a.useMemo(()=>No(t.defaultSelectedKeys,new fe),[t.defaultSelectedKeys]),[b,v]=Fn(u,g,t.onSelectionChange),x=a.useMemo(()=>t.disabledKeys?new Set(t.disabledKeys):new Set,[t.disabledKeys]),[w,k]=a.useState(o);o==="replace"&&w==="toggle"&&typeof b=="object"&&b.size===0&&k("replace");let S=a.useRef(o);return a.useEffect(()=>{o!==S.current&&(k(o),S.current=o)},[o]),{selectionMode:e,disallowEmptySelection:r,selectionBehavior:w,setSelectionBehavior:k,get isFocused(){return s.current},setFocused(T){s.current=T,l(T)},get focusedKey(){return c.current},get childFocusStrategy(){return d.current},setFocusedKey(T,F="first"){c.current=T,d.current=F,p(T)},selectedKeys:b,setSelectedKeys(T){(n||!Va(T,b))&&v(T)},disabledKeys:x,disabledBehavior:i}}function No(t,e){return t?t==="all"?"all":new fe(t):e}class fr{constructor(e,r,n){this.collection=e,this.state=r,this.allowsCellSelection=n?.allowsCellSelection??!1,this._isSelectAll=null,this.layoutDelegate=n?.layoutDelegate||null,this.fullCollection=n?.fullCollection||null}get selectionMode(){return this.state.selectionMode}get disallowEmptySelection(){return this.state.disallowEmptySelection}get selectionBehavior(){return this.state.selectionBehavior}setSelectionBehavior(e){this.state.setSelectionBehavior(e)}get isFocused(){return this.state.isFocused}setFocused(e){this.state.setFocused(e)}get focusedKey(){return this.state.focusedKey}get childFocusStrategy(){return this.state.childFocusStrategy}setFocusedKey(e,r){(e==null||this.collection.getItem(e))&&this.state.setFocusedKey(e,r)}get selectedKeys(){return this.state.selectedKeys==="all"?new Set(this.getSelectAllKeys()):this.state.selectedKeys}get rawSelection(){return this.state.selectedKeys}isSelected(e){if(this.state.selectionMode==="none")return!1;let r=this.getKey(e);return r==null?!1:this.state.selectedKeys==="all"?this.canSelectItem(r):this.state.selectedKeys.has(r)}get isEmpty(){return this.state.selectedKeys!=="all"&&this.state.selectedKeys.size===0}get isSelectAll(){if(this.isEmpty)return!1;if(this.state.selectedKeys==="all")return!0;if(this._isSelectAll!=null)return this._isSelectAll;let e=this.getSelectAllKeys(),r=this.state.selectedKeys;return this._isSelectAll=e.every(n=>r.has(n)),this._isSelectAll}get firstSelectedKey(){let e=null;for(let r of this.state.selectedKeys){let n=this.collection.getItem(r);(!e||n&&ur(this.collection,n,e)<0)&&(e=n)}return e?.key??null}get lastSelectedKey(){let e=null;for(let r of this.state.selectedKeys){let n=this.collection.getItem(r);(!e||n&&ur(this.collection,n,e)>0)&&(e=n)}return e?.key??null}get disabledKeys(){return this.state.disabledKeys}get disabledBehavior(){return this.state.disabledBehavior}extendSelection(e){if(this.selectionMode==="none")return;if(this.selectionMode==="single"){this.replaceSelection(e);return}let r=this.getKey(e);if(r==null)return;let n;if(this.state.selectedKeys==="all")n=new fe([r],r,r);else{let o=this.state.selectedKeys,i=o.anchorKey??r;n=new fe(o,i,r);for(let s of this.getKeyRange(i,o.currentKey??r))n.delete(s);for(let s of this.getKeyRange(r,i))this.canSelectItem(s)&&n.add(s)}this.state.setSelectedKeys(n)}getKeyRange(e,r){let n=this.collection.getItem(e),o=this.collection.getItem(r);return n&&o?ur(this.collection,n,o)<=0?this.getKeyRangeInternal(e,r):this.getKeyRangeInternal(r,e):[]}getKeyRangeInternal(e,r){if(this.layoutDelegate?.getKeyRange)return this.layoutDelegate.getKeyRange(e,r);let n=[],o=e;for(;o!=null;){let i=this.collection.getItem(o);if(i&&(i.type==="item"||i.type==="cell"&&this.allowsCellSelection)&&n.push(o),o===r)return n;o=this.collection.getKeyAfter(o)}return[]}getKey(e){let r=this.collection.getItem(e);if(!r||r.type==="cell"&&this.allowsCellSelection)return e;for(;r&&r.type!=="item"&&r.parentKey!=null;)r=this.collection.getItem(r.parentKey);return!r||r.type!=="item"?null:r.key}toggleSelection(e){if(this.selectionMode==="none")return;if(this.selectionMode==="single"&&!this.isSelected(e)){this.replaceSelection(e);return}let r=this.getKey(e);if(r==null)return;let n=new fe(this.state.selectedKeys==="all"?this.getSelectAllKeys():this.state.selectedKeys);n.has(r)?n.delete(r):this.canSelectItem(r)&&(n.add(r),n.anchorKey=r,n.currentKey=r),!(this.disallowEmptySelection&&n.size===0)&&this.state.setSelectedKeys(n)}replaceSelection(e){if(this.selectionMode==="none")return;let r=this.getKey(e);if(r==null)return;let n=this.canSelectItem(r)?new fe([r],r,r):new fe;this.state.setSelectedKeys(n)}setSelectedKeys(e){if(this.selectionMode==="none")return;let r=new fe;for(let n of e){let o=this.getKey(n);if(o!=null&&(r.add(o),this.selectionMode==="single"))break}this.state.setSelectedKeys(r)}getSelectAllKeys(){let e=this.fullCollection??this.collection,r=[],n=o=>{for(;o!=null;){if(this.canSelectItemIn(o,e)){let i=e.getItem(o);i?.type==="item"&&r.push(o),i?.hasChildNodes&&(this.allowsCellSelection||i.type!=="item")&&n(za(_a(i,e))?.key??null)}o=e.getKeyAfter(o)}};return n(e.getFirstKey()),r}selectAll(){!this.isSelectAll&&this.selectionMode==="multiple"&&this.state.setSelectedKeys("all")}clearSelection(){!this.disallowEmptySelection&&(this.state.selectedKeys==="all"||this.state.selectedKeys.size>0)&&this.state.setSelectedKeys(new fe)}toggleSelectAll(){this.isSelectAll?this.clearSelection():this.selectAll()}select(e,r){this.selectionMode!=="none"&&(this.selectionMode==="single"?this.isSelected(e)&&!this.disallowEmptySelection?this.toggleSelection(e):this.replaceSelection(e):this.selectionBehavior==="toggle"||r&&(r.pointerType==="touch"||r.pointerType==="virtual")?this.toggleSelection(e):this.replaceSelection(e))}isSelectionEqual(e){if(e===this.state.selectedKeys)return!0;let r=this.selectedKeys;if(e.size!==r.size)return!1;for(let n of e)if(!r.has(n))return!1;for(let n of r)if(!e.has(n))return!1;return!0}canSelectItem(e){return this.canSelectItemIn(e,this.collection)}canSelectItemIn(e,r){if(this.state.selectionMode==="none"||this.state.disabledKeys.has(e))return!1;let n=r.getItem(e);return!(!n||n?.props?.isDisabled||n.type==="cell"&&!this.allowsCellSelection)}isDisabled(e){let r=this.collection.getItem(e);return this.state.disabledBehavior==="all"&&(this.state.disabledKeys.has(e)||!!r?.props?.isDisabled)&&r?.props?.disabledBehavior!=="selection"}isLink(e){return!!this.collection.getItem(e)?.props?.href}getItemProps(e){return this.collection.getItem(e)?.props}withCollection(e){return new fr(e,this.state,{allowsCellSelection:this.allowsCellSelection,layoutDelegate:this.layoutDelegate||void 0,fullCollection:this.fullCollection??this.collection})}}class Ha{build(e,r){return this.context=r,Ko(()=>this.iterateCollection(e))}*iterateCollection(e){let{children:r,items:n}=e;if(a.isValidElement(r)&&r.type===a.Fragment)yield*this.iterateCollection({children:r.props.children,items:n});else if(typeof r=="function"){if(!n)throw new Error("props.children was a function but props.items is missing");let o=0;for(let i of n)yield*this.getFullNode({value:i,index:o},{renderer:r}),o++}else{let o=[];a.Children.forEach(r,s=>{s&&o.push(s)});let i=0;for(let s of o){let l=this.getFullNode({element:s,index:i},{});for(let c of l)i++,yield c}}}getKey(e,r,n,o){if(e.key!=null)return e.key;if(r.type==="cell"&&r.key!=null)return`${o}${r.key}`;let i=r.value;if(i!=null){let s=i.key??i.id;if(s==null)throw new Error("No key found for item");return s}return o?`${o}.${r.index}`:`$.${r.index}`}getChildState(e,r){return{renderer:r.renderer||e.renderer}}*getFullNode(e,r,n,o){if(a.isValidElement(e.element)&&e.element.type===a.Fragment){let c=[];a.Children.forEach(e.element.props.children,p=>{c.push(p)});let d=e.index??0;for(const p of c)yield*this.getFullNode({element:p,index:d++},r,n,o);return}let i=e.element;if(!i&&e.value&&r&&r.renderer){let c=this.cache.get(e.value);if(c&&(!c.shouldInvalidate||!c.shouldInvalidate(this.context))){c.index=e.index,c.parentKey=o?o.key:null,yield c;return}i=r.renderer(e.value)}if(a.isValidElement(i)){let c=i.type;if(typeof c!="function"&&typeof c.getCollectionNode!="function"){let g=i.type;throw new Error(`Unknown element <${g}> in collection.`)}let d=c.getCollectionNode(i.props,this.context),p=e.index??0,u=d.next();for(;!u.done&&u.value;){let g=u.value;e.index=p;let b=g.key??null;b==null&&(b=g.element?null:this.getKey(i,e,r,n));let x=[...this.getFullNode({...g,key:b,index:p,wrapper:ja(e.wrapper,g.wrapper)},this.getChildState(r,g),n?`${n}${i.key}`:i.key,o)];for(let w of x){if(w.value=g.value??e.value??null,w.value&&this.cache.set(w.value,w),e.type&&w.type!==e.type)throw new Error(`Unsupported type <${pr(w.type)}> in <${pr(o?.type??"unknown parent type")}>. Only <${pr(e.type)}> is supported.`);p++,yield w}u=d.next(x)}return}if(e.key==null||e.type==null)return;let s=this,l={type:e.type,props:e.props,key:e.key,parentKey:o?o.key:null,value:e.value??null,level:(o?.level??0)+(o?.type==="item"?1:0),index:e.index,rendered:e.rendered,textValue:e.textValue??"","aria-label":e["aria-label"],wrapper:e.wrapper,shouldInvalidate:e.shouldInvalidate,hasChildNodes:e.hasChildNodes||!1,childNodes:Ko(function*(){if(!e.hasChildNodes||!e.childNodes)return;let c=0;for(let d of e.childNodes()){d.key!=null&&(d.key=`${l.key}${d.key}`);let p=s.getFullNode({...d,index:c},s.getChildState(r,d),l.key,l);for(let u of p)c++,yield u}})};yield l}constructor(){this.cache=new WeakMap}}function Ko(t){let e=[],r=null;return{*[Symbol.iterator](){for(let n of e)yield n;r||(r=t());for(let n of r)e.push(n),yield n}}}function ja(t,e){if(t&&e)return r=>t(e(r));if(t)return t;if(e)return e}function pr(t){return t[0].toUpperCase()+t.slice(1)}function Ga(t,e,r){let n=a.useMemo(()=>new Ha,[]),{children:o,items:i,collection:s}=t;return a.useMemo(()=>{if(s)return s;let c=n.build({children:o,items:i},r);return e(c)},[n,o,i,s,r,e])}function Ua(t){let{filter:e,layoutDelegate:r}=t,n=Wa(t),o=a.useMemo(()=>t.disabledKeys?new Set(t.disabledKeys):new Set,[t.disabledKeys]),i=a.useCallback(d=>e?new To(e(d)):new To(d),[e]),s=a.useMemo(()=>({suppressTextValueWarning:t.suppressTextValueWarning}),[t.suppressTextValueWarning]),l=Ga(t,i,s),c=a.useMemo(()=>new fr(l,n,{layoutDelegate:r}),[l,n,r]);return qa(l,c),{collection:l,disabledKeys:o,selectionManager:c}}function qa(t,e){const r=a.useRef(null);a.useEffect(()=>{if(e.focusedKey!=null&&!t.getItem(e.focusedKey)&&r.current){let n=r.current.getKeyAfter(e.focusedKey),o=null;for(;n!=null;){let i=t.getItem(n);if(i&&i.type==="item"&&!e.isDisabled(n)){o=n;break}n=r.current.getKeyAfter(n)}if(o==null)for(n=r.current.getKeyBefore(e.focusedKey);n!=null;){let i=t.getItem(n);if(i&&i.type==="item"&&!e.isDisabled(n)){o=n;break}n=r.current.getKeyBefore(n)}e.setFocusedKey(o)}r.current=t},[t,e])}const Po=new WeakMap;function Lo(t,e,r){if(!t)return"";typeof e=="string"&&(e=e.replace(/\s+/g,""));let n=Po.get(t);return process.env.NODE_ENV!=="production"&&!n&&console.error("There is no tab id, please check if you have rendered the tab panel before the tab list."),`${n}-${r}-${e}`}function Ya(t,e,r){let{key:n,isDisabled:o,shouldSelectOnPressUp:i}=t,{selectionManager:s,selectedKey:l}=e,c=n===l,d=o||e.isDisabled||e.selectionManager.isDisabled(n),p=e.collection.getItem(n),{itemProps:u,isPressed:g}=Oa({selectionManager:s,key:n,ref:r,isDisabled:d,shouldSelectOnPressUp:i??p?.props.href!=null,linkBehavior:"selection"}),b=Lo(e,n,"tab"),v=Lo(e,n,"tabpanel"),{tabIndex:x}=u,w=pt(p?.props,{labelable:!0});delete w.id;let k=ll(p?.props),{focusableProps:S}=Ol({...p?.props,isDisabled:d},r);return{tabProps:oe(w,S,k,u,{id:b,"aria-selected":c,"aria-disabled":d||void 0,"aria-controls":c?v:void 0,tabIndex:d?void 0:x,role:"tab"}),isSelected:c,isDisabled:d,isPressed:g}}class Xa{constructor(e,r,n,o=new Set){this.collection=e,this.flipDirection=r==="rtl"&&n==="horizontal",this.disabledKeys=o,this.tabDirection=n==="horizontal"}getKeyLeftOf(e){return this.flipDirection?this.getNextKey(e):this.getPreviousKey(e)}getKeyRightOf(e){return this.flipDirection?this.getPreviousKey(e):this.getNextKey(e)}isDisabled(e){return this.disabledKeys.has(e)||!!this.collection.getItem(e)?.props?.isDisabled}getFirstKey(){let e=this.collection.getFirstKey();return e!=null&&this.isDisabled(e)&&(e=this.getNextKey(e)),e}getLastKey(){let e=this.collection.getLastKey();return e!=null&&this.isDisabled(e)&&(e=this.getPreviousKey(e)),e}getKeyAbove(e){return this.tabDirection?null:this.getPreviousKey(e)}getKeyBelow(e){return this.tabDirection?null:this.getNextKey(e)}getNextKey(e){let r=e;do r=this.collection.getKeyAfter(r),r==null&&(r=this.collection.getFirstKey());while(r!=null&&this.isDisabled(r)&&r!==e);return r}getPreviousKey(e){let r=e;do r=this.collection.getKeyBefore(r),r==null&&(r=this.collection.getLastKey());while(r!=null&&this.isDisabled(r)&&r!==e);return r}}function Za(t,e,r){let{orientation:n="horizontal",keyboardActivation:o="automatic"}=t,{collection:i,selectionManager:s,disabledKeys:l}=e,{direction:c}=Dn(),d=a.useMemo(()=>new Xa(i,c,n,l),[i,l,n,c]),{collectionProps:p}=Da({ref:r,selectionManager:s,keyboardDelegate:d,selectOnFocus:o==="automatic",disallowEmptySelection:!0,scrollRef:r,linkBehavior:"selection"}),u=tt();Po.set(e,u);let g=bl({...t,id:u});return{tabListProps:{...oe(p,g),role:"tablist","aria-orientation":n,tabIndex:void 0}}}function Ja(t){let[e,r]=Fn(t.selectedKey,t.defaultSelectedKey??null,t.onSelectionChange),n=a.useMemo(()=>e!=null?[e]:[],[e]),{collection:o,disabledKeys:i,selectionManager:s}=Ua({...t,selectionMode:"single",disallowEmptySelection:!0,allowDuplicateSelectionEvents:!0,selectedKeys:n,onSelectionChange:c=>{if(c==="all")return;let d=c.values().next().value??null;d===e&&t.onSelectionChange&&t.onSelectionChange(d),r(d)}}),l=e!=null?o.getItem(e):null;return{collection:o,disabledKeys:i,selectionManager:s,selectedKey:e,setSelectedKey:r,selectedItem:l}}function Ra(t){let e=Ja({...t,onSelectionChange:t.onSelectionChange?s=>{s!=null&&t.onSelectionChange?.(s)}:void 0,suppressTextValueWarning:!0,defaultSelectedKey:t.defaultSelectedKey??Io(t.collection,t.disabledKeys?new Set(t.disabledKeys):new Set)??void 0}),{selectionManager:r,collection:n,selectedKey:o}=e,i=a.useRef(o);return a.useEffect(()=>{let s=o;t.selectedKey==null&&(r.isEmpty||s==null||!n.getItem(s))&&(s=Io(n,e.disabledKeys),s!=null&&r.setSelectedKeys([s])),(s!=null&&r.focusedKey==null||!r.isFocused&&s!==i.current)&&r.setFocusedKey(s),i.current=s}),{...e,isDisabled:t.isDisabled||!1}}function Io(t,e){let r=null;if(t){for(r=t.getFirstKey();r!=null&&(e.has(r)||t.getItem(r)?.props?.isDisabled)&&r!==t.getLastKey();)r=t.getKeyAfter(r);r!=null&&(e.has(r)||t.getItem(r)?.props?.isDisabled)&&r===t.getLastKey()&&(r=t.getFirstKey())}return r}const hr=a.createContext(null),vt=a.createContext(null),Qa=a.forwardRef(function(e,r){[e,r]=Os(e,r,hr);let{children:n,orientation:o="horizontal"}=e;return n=a.useMemo(()=>typeof n=="function"?n({orientation:o,defaultChildren:null}):n,[n,o]),a.createElement(Hl,{content:n},i=>a.createElement(ec,{props:e,collection:i,tabsRef:r}))});function ec({props:t,tabsRef:e,collection:r}){let{orientation:n="horizontal"}=t,o=Ra({...t,collection:r,children:void 0}),{focusProps:i,isFocused:s,isFocusVisible:l}=mo({within:!0}),c=a.useMemo(()=>({orientation:n,isFocusWithin:s,isFocusVisible:l}),[n,s,l]),d=It({...t,defaultClassName:"react-aria-Tabs",values:c}),p=pt(t,{global:!0});return a.createElement(rt.div,{...oe(p,d,i),ref:e,slot:t.slot||void 0,"data-focused":s||void 0,"data-orientation":n,"data-focus-visible":l||void 0,"data-disabled":o.isDisabled||void 0},a.createElement(As,{values:[[hr,t],[vt,o]]},d.children))}const tc=a.forwardRef(function(e,r){return a.useContext(vt)?a.createElement(rc,{props:e,forwardedRef:r}):a.createElement(Rl,e)});function rc({props:t,forwardedRef:e}){let r=a.useContext(vt),{CollectionRoot:n}=a.useContext(ra),{orientation:o="horizontal",keyboardActivation:i="automatic"}=pn(hr),s=Lt(e),{tabListProps:l}=Za({...t,orientation:o,keyboardActivation:i},r,s),c=It({...t,children:null,defaultClassName:"react-aria-TabList",values:{orientation:o,state:r}}),d=pt(t,{global:!0});return delete d.id,a.createElement(rt.div,{...oe(d,c,l),ref:s,"data-orientation":o||void 0},a.createElement(Sa,null,a.createElement(n,{collection:r.collection,persistedKeys:na(r.selectionManager.focusedKey)})))}const Sr=class Sr extends We{};Sr.type="item";let br=Sr;const nc=Zl(br,(t,e,r)=>{let n=a.useContext(vt),o=Lt(e),{tabProps:i,isSelected:s,isDisabled:l,isPressed:c}=Ya({key:r.key,...t},n,o),{focusProps:d,isFocused:p,isFocusVisible:u}=mo(),{hoverProps:g,isHovered:b}=ya({isDisabled:l,onHoverStart:t.onHoverStart,onHoverEnd:t.onHoverEnd,onHoverChange:t.onHoverChange}),v=It({...t,id:void 0,children:r.rendered,defaultClassName:"react-aria-Tab",values:{isSelected:s,isDisabled:l,isFocused:p,isFocusVisible:u,isPressed:c,isHovered:b}}),x=r.props.href?rt.a:rt.div,w=pt(t,{global:!0});return delete w.id,delete w.onClick,a.createElement(x,{...oe(w,v,i,d,g),ref:o,"data-selected":s||void 0,"data-disabled":l||void 0,"data-focused":p||void 0,"data-focus-visible":u||void 0,"data-pressed":c||void 0,"data-hovered":b||void 0},a.createElement(ka.Provider,{value:{isSelected:s}},v.children))}),oc={"button-gray":{sm:"h-9 px-3 py-2 text-sm gap-2",md:"h-11 px-3 py-2 text-base gap-2"},"button-white":{sm:"h-9 px-3 py-2 text-sm gap-2",md:"h-11 px-3 py-2 text-base gap-2"},"button-primary":{sm:"h-9 px-3 py-2 text-sm gap-2",md:"h-11 px-3 py-2 text-base gap-2"},underline:{sm:"h-8 px-1 pb-3 text-sm gap-2",md:"h-9 px-1 pb-3 text-base gap-2"},"underline-filled":{sm:"h-11 p-3 text-sm gap-2",md:"h-12 p-3 text-base gap-2"},line:{sm:"h-9 px-3 py-2 text-sm gap-2",md:"h-11 px-3.5 py-2.5 text-base gap-2"}},ic={"button-gray":"rounded-md","button-white":"rounded-md","button-primary":"rounded-md",underline:"rounded-none","underline-filled":"rounded-none",line:"rounded-none"},sc={"button-gray":{active:"bg-light-50 text-light-700",inactive:"bg-transparent text-light-500",hoverInactive:"hover:bg-light-50 hover:text-light-700",hasFocusRing:!0},"button-white":{active:"bg-white text-light-700 shadow-sm",inactive:"bg-transparent text-light-500",hoverInactive:"hover:bg-white hover:text-light-700 hover:shadow-sm",hasFocusRing:!0},"button-primary":{active:"bg-primary-50 text-primary-700",inactive:"bg-transparent text-light-500",hoverInactive:"hover:bg-primary-50 hover:text-primary-700",hasFocusRing:!0},underline:{active:"border-b-2 border-primary-500 text-primary-700",inactive:"border-b-2 border-transparent text-light-500",hoverInactive:"hover:border-primary-500 hover:text-primary-700",hasFocusRing:!1},"underline-filled":{active:"bg-primary-50 border-b-2 border-primary-500 text-primary-700",inactive:"bg-transparent border-b-2 border-transparent text-light-500",hoverInactive:"hover:bg-primary-50 hover:border-primary-500 hover:text-primary-700",hasFocusRing:!1},line:{active:"bg-transparent border-l-2 border-primary-500 text-primary-700",inactive:"bg-transparent border-l-2 border-transparent text-light-500",hoverInactive:"hover:border-primary-500 hover:text-primary-700",hasFocusRing:!0}},lc="inline-flex items-center justify-center rounded-full border border-light-200 bg-light-50 px-2 py-0.5 text-caption-sm font-medium text-light-700",ac={"button-gray":{gapClass:"gap-1",hasHairline:!1},"button-white":{gapClass:"gap-1",hasHairline:!1},"button-primary":{gapClass:"gap-1",hasHairline:!1},underline:{gapClass:"gap-3",hasHairline:!0},"underline-filled":{gapClass:"gap-3",hasHairline:!0},line:{gapClass:"gap-1",hasHairline:!1}},Mo=({children:t,variant:e="button-primary",size:r="sm",fullWidth:n=!1,count:o,iconLeft:i,iconRight:s,disabled:l=!1,onClick:c,className:d,id:p,active:u})=>{const g=sc[e];return f.createElement(nc,{id:p,isDisabled:l,onPress:()=>c?.(),className:({isSelected:b})=>$t("inline-flex items-center justify-center font-semibold transition-colors duration-150",oc[e][r],ic[e],b?g.active:g.inactive,!b&&!l&&g.hoverInactive,g.hasFocusRing&&"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-400 focus-visible:ring-offset-2 focus-visible:ring-offset-white",n&&"w-full",l?"cursor-not-allowed opacity-60":"cursor-pointer",d)},i&&f.createElement("span",{className:"shrink-0"},i),f.createElement("span",{className:"whitespace-nowrap"},t),o!==void 0&&f.createElement("span",{className:lc},o),s&&f.createElement("span",{className:"shrink-0"},s))};Mo.displayName="Tab";const Do=({children:t,variant:e="button-primary",orientation:r="horizontal",boxed:n=!1,"aria-label":o="Tabs",keyboardActivation:i,disabledKeys:s,className:l})=>{const{gapClass:c,hasHairline:d}=ac[e],p=f.Children.toArray(t),u=p.map((x,w)=>String(w)),g=p.findIndex(x=>x.props.active),b=u[g>=0?g:0],v=x=>{const w=u.indexOf(String(x));w>=0&&p[w].props.onClick?.()};return f.createElement(Qa,{orientation:r,keyboardActivation:i,disabledKeys:s,selectedKey:p.length?b:void 0,onSelectionChange:v},f.createElement(tc,{"aria-label":o,className:$t("inline-flex",r==="vertical"?"flex-col items-stretch":"flex-row items-center",c,n&&"rounded-lg border border-light-200 bg-light-50 p-1",d&&r==="horizontal"&&!n&&"border-b border-light-200",l)},p.map((x,w)=>f.cloneElement(x,{key:u[w],id:u[w]}))))};Do.displayName="TabList";const Fo=9,De=1,cc=30;function Ao(t){const e=Fo,r=De-t,n=r?`calc(100% - ${r}px)`:"100%",o=`calc(100% - ${e+1}px)`,i=`calc(100% - ${e}px)`;return`shape(${[`from ${-t}px 100%`,...r?[`vline to ${n}`]:[],`curve to ${e}px ${o} with ${e}px ${n}`,`vline to ${e-t}px`,`curve to ${2*e-t}px 0 with ${e}px 0`,`hline to calc(100% - ${2*e-t}px)`,`curve to ${i} ${e-t}px with ${i} 0`,`vline to ${o}`,`curve to ${t?`calc(100% + ${t}px)`:"100%"} ${n} with ${i} ${n}`,...r?["vline to 100%"]:[]].join(", ")})`}const dc=Ao(0),uc=Ao(De),fc={default:{box:"h-12 shrink-0",padX:cc},"max-width":{box:"h-9 min-w-px flex-1",padX:Fo}},pc={clipPath:dc,paddingInline:`${De}px`},hc={paddingInline:`${De}px`},Oo=f.forwardRef(({active:t=!1,type:e="default",disabled:r=!1,unstyled:n=!1,iconLeft:o,trailing:i,tooltip:s,children:l,className:c,style:d,contentClassName:p,contentStyle:u,...g},b)=>{const v=!r&&!t,{box:x,padX:w}=fc[e],k=t?{clipPath:uc,paddingInline:`${w-De}px`}:{paddingInline:`${w-De}px`};return f.createElement("button",{ref:b,title:s,...g,type:"button",role:"tab","aria-selected":t,disabled:r,className:P("group relative flex transition-colors duration-150 focus-visible:outline-none",!n&&"rounded-t-lg pt-px",!n&&x,r&&"cursor-not-allowed opacity-60",v&&"cursor-pointer",!n&&t&&"-mb-px bg-light-200 focus-visible:bg-primary-400",t&&"cursor-default",c),style:n?d:{...t?pc:hc,...d}},f.createElement("span",{className:P("flex h-full w-full items-center justify-center gap-1 whitespace-nowrap text-caption-sm",!n&&"rounded-t-lg",!n&&(t?"bg-white font-bold text-light-800":"font-medium leading-4 text-light-600"),!n&&v&&"group-hover:bg-light-100 group-hover:text-light-800",!n&&v&&"group-focus-visible:rounded-b-lg group-focus-visible:ring-2 group-focus-visible:ring-primary-400 group-focus-visible:ring-offset-2",p),style:n?u:{...k,...u}},o&&f.createElement("span",{className:"shrink-0"},o),f.createElement("span",{className:"overflow-hidden text-ellipsis"},l),i))});Oo.displayName="TabBrowser";const _o=({children:t,separators:e=!1,trailingSlot:r,className:n})=>{const o=f.Children.toArray(t);return f.createElement("div",{className:P("flex items-end",n)},f.createElement("div",{role:"tablist",className:"flex min-w-0 flex-1 items-end"},o.map((i,s)=>f.createElement(f.Fragment,{key:s},i,e&&s<o.length-1&&f.createElement("span",{"aria-hidden":!0,className:"mb-3 h-5 w-px shrink-0 self-end bg-light-200"})))),r)};_o.displayName="TabBrowserBar";const bc=I("flex flex-col gap-1 w-full",{variants:{size:{xs:"text-caption-sm",sm:"text-caption-lg",md:"text-sm"}},defaultVariants:{size:"md"}}),mc=I("flex items-center gap-1 font-bold text-sm",{variants:{error:{true:"",false:"text-light-800"}},defaultVariants:{error:!1}}),gc=I(["flex items-center w-full border","bg-white transition-[border-color,border-width]"],{variants:{size:{xs:"h-7 px-2 gap-1 rounded text-caption-sm",sm:"h-9 px-3 gap-2 rounded-lg",md:"h-11 px-3 gap-2 rounded-lg"},error:{true:["border-error-200","focus-within:border-2 focus-within:border-error-500"],false:["border-light-200","focus-within:border-2 focus-within:border-primary-500"]},disabled:{true:"bg-light-100 text-light-400 cursor-not-allowed",false:""}},defaultVariants:{size:"md",error:!1,disabled:!1}}),yc=I(["flex-1 bg-transparent outline-none text-light-900","placeholder:text-light-500","disabled:text-light-400 disabled:cursor-not-allowed"],{variants:{size:{xs:"text-caption-sm",sm:"text-caption-lg",md:"text-body-sm"},error:{true:"",false:"text-light-900"}},defaultVariants:{size:"md",error:!1}}),xc=I("text-caption-lg",{variants:{error:{true:"text-error-500",false:"text-light-700"}}}),vc=I("flex items-stretch w-full bg-white border overflow-hidden transition-[border-color,border-width]",{variants:{size:{xs:"rounded",sm:"rounded-lg",md:"rounded-lg"},error:{true:["border-error-200","focus-within:border-2 focus-within:border-error-500"],false:["border-light-200","focus-within:border-2 focus-within:border-primary-500"]},disabled:{true:"bg-light-100",false:""}},defaultVariants:{size:"md",error:!1,disabled:!1}}),wc=I("flex flex-1 items-center min-w-0",{variants:{size:{xs:"gap-1 px-2 py-1",sm:"gap-2 px-3 py-2",md:"gap-2 px-3 py-2"},disabled:{true:"text-light-400 cursor-not-allowed",false:""}},defaultVariants:{size:"md",disabled:!1}}),Ec=I("flex items-center text-light-700 whitespace-nowrap border-r border-light-200",{variants:{size:{xs:"px-2 text-caption-sm",sm:"px-3 text-caption-lg",md:"px-3 text-body-sm"}},defaultVariants:{size:"md"}}),zo=I(["flex items-center gap-1 shrink-0 bg-transparent p-0 text-light-800 cursor-pointer","hover:bg-transparent hover:text-light-900","disabled:cursor-not-allowed disabled:text-light-400"],{variants:{size:{xs:"text-caption-sm",sm:"text-caption-lg",md:"text-body-sm"}},defaultVariants:{size:"md"}}),Sc=I("flex shrink-0 items-center justify-center gap-1 w-[92px] border-l border-light-200 bg-white font-semibold text-light-800 hover:bg-light-50 disabled:cursor-not-allowed disabled:text-light-400",{variants:{size:{xs:"text-caption-sm",sm:"text-caption-lg",md:"text-body-sm"}},defaultVariants:{size:"md"}}),Bo=({className:t})=>a.createElement("svg",{viewBox:"0 0 20 20",fill:"none",className:t},a.createElement("path",{d:"M5 7.5L10 12.5L15 7.5",stroke:"currentColor",strokeWidth:"1.67",strokeLinecap:"round",strokeLinejoin:"round"})),kc={xs:"h-7",sm:"h-[30px]",md:"h-[34px]"},Cc=({size:t,error:e,disabled:r})=>P("flex items-center w-full gap-2 rounded-lg border bg-white px-2 transition-[border-color,border-width]",kc[t],e?"border-error-200 focus-within:border-2 focus-within:border-error-500":"border-light-200 focus-within:border-2 focus-within:border-primary-500",r&&"bg-light-100 text-light-400 cursor-not-allowed"),$c=({error:t})=>P("flex items-center gap-1 text-caption-sm font-semibold",t?"":"text-light-800"),Tc="flex flex-col w-full max-w-[320px]",je=a.forwardRef(function({label:e,required:r,hint:n,rightIcon:o,size:i="md",error:s=!1,disabled:l=!1,compact:c=!1,hideCalendarIcon:d=!1,type:p,prefix:u,suffix:g,leadingAddon:b,leadingDropdown:v,trailingDropdown:x,trailingButton:w,maxLength:k,value:S,className:T,wrapperClassName:F,...q},_){const z=!!(b||w),C=a.createElement(a.Fragment,null,v&&a.createElement("button",{type:"button",onClick:v.onClick,disabled:v.disabled||l,className:zo({size:i})},a.createElement("span",null,v.value),a.createElement(Bo,{className:"size-5 text-light-500"})),u&&a.createElement("div",{className:"flex items-center"},u),a.createElement("input",{...q,ref:_,type:p,disabled:l,maxLength:k,value:S,className:P(yc({size:i,error:s}),"h-full",d&&"[&::-webkit-calendar-picker-indicator]:hidden [&::-webkit-clear-button]:hidden",p==="date"&&"[&::-webkit-datetime-edit]:p-0 [&::-webkit-datetime-edit-fields-wrapper]:p-0",T)}),(o||g)&&a.createElement("div",{className:"flex h-full items-center gap-2"},o&&a.createElement("div",{className:"flex h-full items-center pb-0.5 text-light-400 hover:text-light-600"},o),g&&a.createElement("div",{className:"flex h-full items-center gap-1 leading-none text-light-700"},g)),x&&a.createElement("button",{type:"button",onClick:x.onClick,disabled:x.disabled||l,className:zo({size:i})},a.createElement("span",null,x.value),a.createElement(Bo,{className:"size-5 text-light-500"})));return a.createElement("div",{className:P(c?Tc:bc({size:i}),F)},e&&a.createElement("label",{className:c?$c({error:s}):mc({error:s})},e,r&&a.createElement("span",{className:"text-error-400"},"*")),z?a.createElement("div",{className:vc({size:i,error:s,disabled:l})},b&&a.createElement("div",{className:Ec({size:i})},b),a.createElement("div",{className:wc({size:i,disabled:l})},C),w&&a.createElement("button",{type:"button",onClick:w.onClick,disabled:w.disabled||l,className:Sc({size:i})},w.icon,a.createElement("span",null,w.label))):a.createElement("div",{className:c?Cc({size:i,error:s,disabled:l}):gc({size:i,error:s,disabled:l})},C),k&&typeof S=="string"&&a.createElement("div",{className:"text-right text-xs text-light-400"},S.length,"/",k),n&&a.createElement("p",{className:xc({error:s})},n))});function Nc({children:t}){return React.createElement("div",{className:"flex items-center text-light-500"},t)}function Kc({children:t}){return React.createElement("div",{className:"flex items-center text-light-500"},t)}var Pc={outline:{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"},filled:{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"currentColor",stroke:"none"}};const Ge=(t,e,r,n)=>{const o=a.forwardRef(({color:i="currentColor",size:s=24,stroke:l=2,title:c,className:d,children:p,...u},g)=>a.createElement("svg",{ref:g,...Pc[t],width:s,height:s,className:["tabler-icon",`tabler-icon-${e}`,d].join(" "),strokeWidth:l,stroke:i,...u},[c&&a.createElement("title",{key:"svg-title"},c),...n.map(([b,v])=>a.createElement(b,v)),...Array.isArray(p)?p:[p]]));return o.displayName=`${r}`,o};const Vo=Ge("outline","alert-circle","AlertCircle",[["path",{d:"M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0",key:"svg-0"}],["path",{d:"M12 8v4",key:"svg-1"}],["path",{d:"M12 16h.01",key:"svg-2"}]]);const Wo=Ge("outline","chevron-down","ChevronDown",[["path",{d:"M6 9l6 6l6 -6",key:"svg-0"}]]);const Lc=Ge("outline","circle-check","CircleCheck",[["path",{d:"M3 12a9 9 0 1 0 18 0a9 9 0 1 0 -18 0",key:"svg-0"}],["path",{d:"M9 12l2 2l4 -4",key:"svg-1"}]]);const mr=Ge("outline","info-circle","InfoCircle",[["path",{d:"M3 12a9 9 0 1 0 18 0a9 9 0 0 0 -18 0",key:"svg-0"}],["path",{d:"M12 9h.01",key:"svg-1"}],["path",{d:"M11 12h1v4h1",key:"svg-2"}]]);const Ic=Ge("outline","x","X",[["path",{d:"M18 6l-12 12",key:"svg-0"}],["path",{d:"M6 6l12 12",key:"svg-1"}]]);function Mc({size:t="md",label:e,required:r,hint:n,error:o,disabled:i,placeholder:s="+1 (555) 000-0000",rightIcon:l,value:c,onChange:d,className:p,wrapperClassName:u}){return a.createElement(je,{size:t,label:e,required:r,hint:n,error:o,disabled:i,placeholder:s,rightIcon:l,value:c,onChange:d,className:p,wrapperClassName:u,prefix:a.createElement("div",{className:"flex items-center gap-1 pr-2 text-sm text-light-700"},a.createElement("span",null,"US"),a.createElement(Wo,{size:14}))})}function Dc({size:t="md",label:e,required:r,hint:n,error:o,disabled:i,value:s,placeholder:l="1,000.00",currency:c="USD",onCurrencyChange:d,rightIcon:p,onChange:u,className:g,wrapperClassName:b}){return a.createElement(je,{size:t,label:e,required:r,hint:n,error:o,disabled:i,value:s,placeholder:l,rightIcon:p,onChange:u,className:g,wrapperClassName:b,prefix:a.createElement("span",{className:"select-none text-sm text-light-700"},"$"),suffix:a.createElement("button",{type:"button",disabled:i,onClick:d,className:"flex items-center gap-1 text-sm text-light-700 hover:text-light-900 disabled:cursor-not-allowed"},c,a.createElement(Wo,{size:14}))})}function Fc({size:t="md",label:e,required:r,hint:n,disabled:o,error:i,className:s,wrapperClassName:l,value:c,maxLength:d,placeholder:p,onChange:u}){const g=c.length>d,b=i||g;return a.createElement(je,{size:t,label:e,required:r,disabled:o,error:b,value:c,placeholder:p,onChange:u,className:s,wrapperClassName:l,hint:n,suffix:a.createElement("span",{className:P("text-caption-lg",g?"text-error-600":"text-light-400")},c.length,"/",d)})}function Ac({size:t="md",label:e="Card number",required:r,hint:n,error:o,disabled:i,placeholder:s="Card number",value:l,onChange:c,rightIcon:d,prefix:p,className:u,wrapperClassName:g}){return a.createElement(je,{size:t,label:e,required:r,hint:n,error:o,disabled:i,placeholder:s,value:l,onChange:c,rightIcon:d,className:u,wrapperClassName:g,prefix:p??a.createElement("img",{src:"/stories/assets/mastercard.png",alt:"mastercard",className:"h-4 w-6 object-contain"}),inputMode:"numeric",autoComplete:"cc-number"})}const gr=je;gr.Prefix=Nc,gr.Suffix=Kc;const Oc="flex flex-col gap-1 w-full",_c=I("flex items-center gap-1 font-bold text-sm",{variants:{error:{true:"",false:"text-light-800"}},defaultVariants:{error:!1}}),zc=I(["flex w-full gap-2 border rounded-lg p-3 bg-white","transition-[border-color,border-width]"],{variants:{error:{true:["border-error-200","focus-within:border-2 focus-within:border-error-500"],false:["border-light-200","focus-within:border-2 focus-within:border-primary-500"]},disabled:{true:"bg-light-100 cursor-not-allowed",false:""}},defaultVariants:{error:!1,disabled:!1}}),Bc=I(["flex-1 min-h-[132px] bg-transparent outline-none text-caption-lg text-light-900","placeholder:text-light-500","disabled:text-light-400 disabled:cursor-not-allowed disabled:resize-none"],{variants:{resizable:{true:"resize-y",false:"resize-none"}},defaultVariants:{resizable:!0}}),Vc=I("text-caption-lg",{variants:{error:{true:"text-error-500",false:"text-light-700"}},defaultVariants:{error:!1}}),Wc=({error:t,disabled:e})=>P("flex w-full gap-2 rounded-lg border bg-white p-2 transition-[border-color,border-width]",t?"border-error-200 focus-within:border-2 focus-within:border-error-500":"border-light-200 focus-within:border-2 focus-within:border-primary-500",e&&"bg-light-100 cursor-not-allowed"),Hc=({error:t})=>P("flex items-center gap-1 text-caption-sm font-semibold",t?"":"text-light-800"),jc=t=>P("flex-1 min-h-[64px] bg-transparent outline-none text-sm text-light-900","placeholder:text-light-500",t?"resize-y":"resize-none"),Gc="flex flex-col w-full max-w-[320px]",Ho=f.forwardRef(({label:t,required:e,hint:r,helpIcon:n,error:o=!1,disabled:i=!1,resizable:s=!0,compact:l=!1,rows:c,style:d,className:p,wrapperClassName:u,...g},b)=>{const v=c?{minHeight:`${c*20}px`}:void 0;return f.createElement("div",{className:P(l?Gc:Oc,u)},t&&f.createElement("label",{className:l?Hc({error:o}):_c({error:o})},t,e&&f.createElement("span",{className:"text-error-400"},"*"),n),f.createElement("div",{className:l?Wc({error:o,disabled:i}):zc({error:o,disabled:i})},f.createElement("textarea",{ref:b,disabled:i,rows:c,style:{...v,...d},className:P(l?jc(s&&!i):Bc({resizable:s&&!i}),p),...g})),r&&f.createElement("p",{className:Vc({error:o})},r))});Ho.displayName="Textarea";const Uc=I("flex w-[320px] flex-col gap-1"),qc=I("flex items-center gap-1 text-sm font-bold",{variants:{error:{true:"text-error-600",false:"text-light-800"}}}),Yc=I(["flex items-center","rounded-lg border bg-white","overflow-hidden","transition-colors"],{variants:{size:{sm:"h-9 px-2",md:"h-11 px-3"},error:{true:"border-error-300 focus-within:ring-2 focus-within:ring-error-500",false:"border-light-200 focus-within:ring-2 focus-within:ring-primary-500"},disabled:{true:"bg-light-100 cursor-not-allowed",false:""}},defaultVariants:{size:"md",error:!1,disabled:!1}}),Xc=I(["flex items-center gap-1","overflow-x-auto overflow-y-hidden","whitespace-nowrap","scrollbar-hide","flex-1"]),Zc=I("flex shrink-0 items-center gap-1 rounded-md bg-white border border-light-200 px-2 py-1 text-caption-lg text-light-800"),Jc=I(["min-w-[120px]","bg-transparent outline-none","text-light-900 placeholder:text-light-500"],{variants:{disabled:{true:"cursor-not-allowed text-light-400",false:""}}}),Rc=I("text-caption-lg",{variants:{error:{true:"text-error-600",false:"text-light-700"}}});function Qc({size:t="md",label:e,required:r,hint:n,error:o=!1,disabled:i=!1,placeholder:s="Add items",rightIcon:l,className:c,wrapperClassName:d,options:p,value:u=[],onChange:g}){const b=a.useId(),[v,x]=a.useState(""),w=S=>{const T=p.find(F=>F.label===S);T&&(u.some(F=>F.id===T.id)||(g?.([...u,T]),x("")))},k=S=>{g?.(u.filter(T=>T.id!==S))};return a.createElement("div",{className:P(Uc(),d)},e&&a.createElement("label",{className:qc({error:o})},e,r&&a.createElement("span",{className:"text-error-400"},"*")),a.createElement("div",{className:Yc({size:t,error:o,disabled:i})},a.createElement("div",{className:Xc()},u.map(S=>a.createElement("span",{key:S.id,className:Zc()},S.avatar&&a.createElement("img",{src:S.avatar,alt:S.label,className:"h-4 w-4 rounded-full"}),S.label,!i&&a.createElement("button",{type:"button",onClick:()=>k(S.id),className:"ml-1 text-light-500 hover:text-light-700"},"×"))),a.createElement("input",{list:b,value:v,onChange:S=>{x(S.target.value),w(S.target.value)},placeholder:u.length===0?s:"",disabled:i,className:P(Jc({disabled:i}),c)}),a.createElement("datalist",{id:b},p.map(S=>a.createElement("option",{key:S.id,value:S.label})))),l&&a.createElement("div",{className:"ml-2 flex shrink-0 items-center text-light-400"},l)),n&&a.createElement("p",{className:Rc({error:o})},n))}const ed=I("flex w-[320px] flex-col gap-1"),td=I("flex items-center gap-1 font-bold text-sm",{variants:{error:{true:"",false:"text-light-800"}}}),rd=I("flex items-stretch rounded-lg border bg-white transition-colors",{variants:{error:{true:"",false:"border-light-200"},disabled:{true:"bg-light-100",false:""}}}),nd=I("flex items-center px-3 text-sm text-light-500 rounded-l-lg select-none",{variants:{size:{sm:"h-9",md:"h-11"},disabled:{true:"bg-light-100",false:"bg-white"}}}),od="w-px bg-light-200",id=I(["flex flex-1 items-center gap-2 px-3 rounded-r-lg","transition-shadow","focus-within:ring-2 focus-within:ring-offset-0"],{variants:{size:{sm:"h-9",md:"h-11"},error:{true:"border border-error-200 focus-within:ring-error-500",false:"focus-within:ring-primary-500"},disabled:{true:"cursor-not-allowed",false:""}}}),sd=I("flex-1 bg-transparent outline-none text-light-900 placeholder:text-light-500",{variants:{disabled:{true:"text-light-400 cursor-not-allowed",false:""}}}),ld=I("text-caption-lg",{variants:{error:{true:"text-error-600",false:"text-light-700"}}});function ad({size:t="md",label:e,required:r,hint:n,error:o=!1,disabled:i=!1,placeholder:s="www.cekat.ai",value:l,rightIcon:c,onChange:d,className:p,wrapperClassName:u}){return a.createElement("div",{className:P(ed(),u)},e&&a.createElement("label",{className:td({error:o})},e,r&&a.createElement("span",{className:"text-error-400"},"*")),a.createElement("div",{className:rd({error:o,disabled:i})},a.createElement("div",{className:nd({size:t})},"http://"),a.createElement("div",{className:od}),a.createElement("div",{className:id({size:t,error:o,disabled:i})},a.createElement("input",{value:l,onChange:d,placeholder:s,disabled:i,className:P(sd({disabled:i}),p)}),c&&a.createElement("div",{className:"flex items-center text-light-400"},c))),n&&a.createElement("p",{className:ld({error:o})},n))}const cd=I("flex w-[320px] flex-col gap-1"),dd=I("flex items-center gap-1 font-bold text-sm",{variants:{error:{true:"text-error-600",false:"text-light-800"}}}),ud=I("flex items-stretch rounded-lg border border-light-200 bg-white transition-colors",{variants:{disabled:{true:"bg-light-100",false:""}}}),fd=I(["flex flex-1 items-center gap-2 px-3 rounded-l-lg","transition-shadow","focus-within:ring-2 focus-within:ring-offset-0"],{variants:{size:{sm:"h-9",md:"h-11"},error:{true:"border border-error-200 focus-within:ring-error-500",false:"focus-within:ring-primary-500"},disabled:{true:"cursor-not-allowed",false:""}}}),pd=I("w-px transition-colors",{variants:{error:{true:"focus:bg-error-200 group-focus-within:bg-error-500",false:"focus:bg-light-200 group-focus-within:bg-primary-500"}}}),hd=I("flex items-center gap-1 px-3 text-sm text-light-700 rounded-r-lg select-none",{variants:{size:{sm:"h-9",md:"h-11"},disabled:{true:"bg-white",false:"bg-white"}}}),bd=I("flex-1 bg-transparent outline-none text-light-900 placeholder:text-light-500",{variants:{disabled:{true:"text-light-400 cursor-not-allowed",false:""}}}),md=I("text-caption-lg",{variants:{error:{true:"text-error-600",false:"text-light-700"}}});function gd({size:t="md",label:e,required:r,hint:n,error:o=!1,disabled:i=!1,placeholder:s="www.cekat.ai",value:l,rightIcon:c,suffix:d,onChange:p,className:u,wrapperClassName:g}){return a.createElement("div",{className:P(cd(),g)},e&&a.createElement("label",{className:dd({error:o})},e,r&&a.createElement("span",{className:"text-error-400"},"*")),a.createElement("div",{className:ud({disabled:i})},a.createElement("div",{className:fd({size:t,error:o,disabled:i})},a.createElement("input",{value:l,onChange:p,placeholder:s,disabled:i,className:P(bd({disabled:i}),u)}),c&&a.createElement("div",{className:"text-light-400"},c)),a.createElement("div",{className:pd({error:o})}),a.createElement("div",{className:hd({size:t,disabled:i})},d)),n&&a.createElement("p",{className:md({error:o})},n))}const yd=I("flex w-full flex-col gap-1"),xd=I("flex items-center gap-1 text-sm font-bold text-light-800"),jo=I(["flex w-full items-center border bg-white text-left","transition-[border-color,border-width]"],{variants:{size:{xs:"h-7 gap-1 rounded px-2 text-caption-sm",sm:"h-9 gap-2 rounded-lg px-3 text-caption-lg",md:"h-11 gap-2 rounded-lg px-3 text-body-sm"},open:{true:"border-2 border-primary-500",false:"border-light-200 focus-within:border-2 focus-within:border-primary-500"},disabled:{true:"cursor-not-allowed bg-light-100",false:"cursor-pointer"}},defaultVariants:{size:"md",open:!1,disabled:!1}}),vd=I(["absolute left-0 top-full z-10 mt-2 w-full overflow-y-auto","rounded-lg border border-light-200 bg-white py-1","shadow-[0_12px_16px_-4px_rgba(16,24,40,0.08),0_4px_6px_-2px_rgba(16,24,40,0.03)]"],{variants:{size:{xs:"max-h-52",sm:"max-h-64",md:"max-h-80"}},defaultVariants:{size:"md"}}),Go=I("flex w-full items-center rounded-md text-left",{variants:{size:{xs:"gap-1 px-2 py-1 text-caption-sm",sm:"gap-2 px-3 py-1.5 text-caption-lg",md:"gap-2 py-2.5 pl-4 pr-2.5 text-body-sm"},disabled:{true:"cursor-not-allowed text-light-400",false:"cursor-pointer hover:bg-light-50"}},defaultVariants:{size:"md",disabled:!1}}),wd=I("text-caption-lg text-light-700"),Ed=({className:t})=>f.createElement("svg",{viewBox:"0 0 20 20",fill:"none",className:t},f.createElement("path",{d:"M5 7.5L10 12.5L15 7.5",stroke:"currentColor",strokeWidth:"1.67",strokeLinecap:"round",strokeLinejoin:"round"})),Sd=({className:t})=>f.createElement("svg",{viewBox:"0 0 20 20",fill:"none",className:t},f.createElement("path",{d:"M17.5 17.5L14.1 14.1M16 9.25C16 12.98 12.98 16 9.25 16C5.52 16 2.5 12.98 2.5 9.25C2.5 5.52 5.52 2.5 9.25 2.5C12.98 2.5 16 5.52 16 9.25Z",stroke:"currentColor",strokeWidth:"1.67",strokeLinecap:"round",strokeLinejoin:"round"})),kd=({className:t})=>f.createElement("svg",{viewBox:"0 0 20 20",fill:"none",className:t},f.createElement("path",{d:"M16.67 5L7.5 14.17L3.33 10",stroke:"currentColor",strokeWidth:"1.67",strokeLinecap:"round",strokeLinejoin:"round"})),yr={xs:"size-4",sm:"size-5",md:"size-6"},Uo={xs:"size-4",sm:"size-5",md:"size-5"},Cd={xs:"text-caption-sm",sm:"text-caption-lg",md:"text-body-sm"},$d={xs:"h-7",sm:"h-[30px]",md:"h-[34px]"},qo=({size:t,open:e,disabled:r})=>P("flex w-full items-center gap-2 rounded-lg border bg-white px-2 text-left transition-[border-color,border-width]",Cd[t],$d[t],e?"border-2 border-primary-500":"border-light-200 focus-within:border-2 focus-within:border-primary-500",r?"cursor-not-allowed bg-light-100":"cursor-pointer"),Td=()=>"flex items-center gap-1 text-caption-sm font-semibold text-light-800",Nd="flex w-full max-w-[320px] flex-col";function Kd({size:t="md",type:e="default",label:r,required:n,helpIcon:o,hint:i,placeholder:s="Select option",disabled:l=!1,compact:c=!1,leadingIcon:d,options:p,value:u=null,onChange:g,values:b=[],onValuesChange:v,className:x,wrapperClassName:w}){const[k,S]=f.useState(!1),[T,F]=f.useState(""),q=f.useRef(null),_=f.useRef(null),z=e==="tags",C=e==="search"||z,B=p.find(y=>y.id===u)??null,J=p.filter(y=>b.includes(y.id)),Z=T?p.filter(y=>`${y.label} ${y.supportingText??""}`.toLowerCase().includes(T.toLowerCase())):p,X=()=>{S(!1),F("")};f.useEffect(()=>{if(!k)return;const y=A=>{q.current?.contains(A.target)||X()};return document.addEventListener("mousedown",y),()=>document.removeEventListener("mousedown",y)},[k]),f.useEffect(()=>{k&&C&&_.current?.focus()},[k,C]);const Y=()=>{l||(k?X():S(!0))},h=y=>{y.disabled||(z?(v?.(b.includes(y.id)?b.filter(A=>A!==y.id):[...b,y.id]),F(""),_.current?.focus()):(g?.(y),X()))},L=y=>{if(y.key==="Enter"){y.preventDefault();const A=Z.find(ie=>!ie.disabled);k&&A&&h(A)}else y.key==="Backspace"&&z&&!T&&b.length?v?.(b.slice(0,-1)):k||S(!0)},V=y=>y.avatar?f.createElement("img",{src:y.avatar,alt:"",className:P(yr[t],"shrink-0 rounded-full object-cover")}):y.icon?f.createElement("span",{className:P(yr[t],"flex shrink-0 items-center justify-center",l?"text-light-400":"text-light-500")},y.icon):y.dot?f.createElement("span",{className:"size-2 shrink-0 rounded-full",style:{backgroundColor:l?"#d0d5dd":y.dot}}):null,$=B?V(B):d?f.createElement("span",{className:P(yr[t],"flex shrink-0 items-center justify-center",l?"text-light-400":"text-light-500")},d):null,U=B?f.createElement("span",{className:"flex min-w-0 items-center gap-2 whitespace-nowrap"},f.createElement("span",{className:P("truncate font-medium",l?"text-light-400":"text-light-800")},B.label),B.supportingText&&f.createElement("span",{className:l?"text-light-400":"text-light-700"},B.supportingText)):f.createElement("span",{className:l?"text-light-400":"text-light-500"},s),m=k&&f.createElement("div",{role:"listbox",className:vd({size:t})},Z.length===0&&f.createElement("div",{className:P(Go({size:t}),"mx-1 w-auto text-light-500 hover:bg-transparent")},"No options found"),Z.map(y=>{const A=z?b.includes(y.id):y.id===u;return f.createElement("div",{key:y.id,className:"px-1 py-0.5"},f.createElement("button",{type:"button",role:"option","aria-selected":A,disabled:y.disabled,onClick:()=>h(y),className:Go({size:t,disabled:y.disabled})},V(y),f.createElement("span",{className:"flex min-w-0 flex-1 items-center gap-2 whitespace-nowrap"},f.createElement("span",{className:P("truncate font-medium",y.disabled?"text-light-400":"text-light-900")},y.label),y.supportingText&&f.createElement("span",{className:y.disabled?"text-light-400":"text-light-700"},y.supportingText)),A&&f.createElement(kd,{className:"ml-auto size-5 shrink-0 text-primary-500"})))}));return f.createElement("div",{ref:q,className:P(c?Nd:yd(),w)},r&&f.createElement("label",{className:c?Td():xd()},r,n&&f.createElement("span",{className:"text-error-400"},"*"),o),f.createElement("div",{className:"relative",onKeyDown:y=>{y.key==="Escape"&&X()}},e==="default"?f.createElement("button",{type:"button","aria-haspopup":"listbox","aria-expanded":k,disabled:l,onClick:Y,className:P(c?qo({size:t,open:k,disabled:l}):jo({size:t,open:k,disabled:l}),x)},$,f.createElement("span",{className:"flex min-w-0 flex-1 items-center"},U),f.createElement(Ed,{className:P(Uo[t],"shrink-0 text-light-500")})):f.createElement("div",{role:"combobox","aria-haspopup":"listbox","aria-expanded":k,onClick:Y,className:P(c?qo({size:t,open:k,disabled:l}):jo({size:t,open:k,disabled:l}),x)},f.createElement(Sd,{className:P(Uo[t],"shrink-0",l?"text-light-400":"text-light-500")}),z&&J.length>0&&f.createElement("div",{className:"flex shrink items-center gap-1 overflow-x-auto whitespace-nowrap scrollbar-hide"},J.map(y=>f.createElement(Tt,{key:y.id,size:"sm",disabled:l,icon:y.avatar?f.createElement("img",{src:y.avatar,alt:"",className:"size-4 shrink-0 rounded-full object-cover"}):void 0,onClose:()=>h(y)},y.label))),!z&&!k&&B?f.createElement("span",{className:"flex min-w-0 flex-1 items-center"},U):f.createElement("input",{ref:_,value:T,disabled:l,placeholder:z&&J.length>0?"":s,onChange:y=>{F(y.target.value),k||S(!0)},onKeyDown:L,className:"min-w-8 flex-1 bg-transparent text-light-900 outline-none placeholder:text-light-500 disabled:cursor-not-allowed disabled:placeholder:text-light-400"})),m),i&&f.createElement("p",{className:wd()},i))}const Pd=I(["inline-flex items-center justify-center gap-1 shrink-0","rounded-md border border-light-200 bg-white px-2 py-1","font-bold text-caption-sm text-light-900","transition-shadow"],{variants:{open:{true:"shadow-[0px_0px_0px_2px_white,0px_0px_0px_4px_rgba(112,150,217,1)]",false:""},disabled:{true:"cursor-not-allowed opacity-50",false:"cursor-pointer"}},defaultVariants:{open:!1,disabled:!1}}),Ld=I("flex size-5 shrink-0 items-center justify-center text-light-500",{variants:{disabled:{true:"cursor-not-allowed opacity-50",false:"cursor-pointer hover:text-light-700"}},defaultVariants:{disabled:!1}}),Id=I("rounded-full transition-shadow",{variants:{open:{true:"shadow-[0px_0px_0px_2px_white,0px_0px_0px_4px_rgba(112,150,217,1)]",false:""},disabled:{true:"cursor-not-allowed opacity-50",false:"cursor-pointer"}},defaultVariants:{open:!1,disabled:!1}}),Md=I(["absolute top-full z-10 mt-2 flex w-60 flex-col overflow-clip","rounded-lg border border-light-200 bg-white","shadow-[0px_12px_16px_-4px_rgba(16,24,40,0.08),0px_4px_6px_-2px_rgba(16,24,40,0.03)]"]),Dd=I("flex w-full flex-col items-start border-b border-light-200 px-4 py-3"),Fd=I("flex w-full flex-col items-start overflow-y-auto py-1"),Ad=I(["mx-1 flex w-[calc(100%-8px)] items-center gap-3 rounded-md px-4 py-2.5","text-left font-bold text-caption-lg"],{variants:{disabled:{true:"cursor-not-allowed text-light-400",false:"cursor-pointer text-light-800 hover:bg-light-50"}},defaultVariants:{disabled:!1}}),Od=I("ml-auto shrink-0 font-normal text-caption-sm text-light-500"),_d=I("my-1 h-px w-full bg-light-200"),zd=({className:t})=>f.createElement("svg",{viewBox:"0 0 18 18",fill:"none",className:t},f.createElement("path",{d:"M4.5 6.75L9 11.25L13.5 6.75",stroke:"currentColor",strokeWidth:"1.67",strokeLinecap:"round",strokeLinejoin:"round"})),Bd=({className:t})=>f.createElement("svg",{viewBox:"0 0 18 18",fill:"none",className:t},f.createElement("path",{d:"M13.5 11.25L9 6.75L4.5 11.25",stroke:"currentColor",strokeWidth:"1.67",strokeLinecap:"round",strokeLinejoin:"round"})),Vd=({className:t})=>f.createElement("svg",{viewBox:"0 0 20 20",fill:"none",className:t},f.createElement("path",{d:"M10 10.83a.83.83 0 1 0 0-1.67.83.83 0 0 0 0 1.67ZM10 5a.83.83 0 1 0 0-1.67A.83.83 0 0 0 10 5ZM10 16.67a.83.83 0 1 0 0-1.67.83.83 0 0 0 0 1.67Z",stroke:"currentColor",strokeWidth:"1.67",strokeLinecap:"round",strokeLinejoin:"round"}));function Wd({trigger:t="button",label:e="Account",icon:r,avatarSrc:n,avatarInitials:o,header:i,items:s,open:l,defaultOpen:c=!1,onOpenChange:d,disabled:p=!1,align:u="end",className:g,menuClassName:b}){const[v,x]=f.useState(c),w=l!==void 0,k=w?l:v,S=f.useRef(null),T=_=>{w||x(_),d?.(_)};f.useEffect(()=>{if(!k)return;const _=C=>{S.current?.contains(C.target)||T(!1)},z=C=>{C.key==="Escape"&&T(!1)};return document.addEventListener("mousedown",_),document.addEventListener("keydown",z),()=>{document.removeEventListener("mousedown",_),document.removeEventListener("keydown",z)}},[k]);const F=()=>{p||T(!k)},q=_=>{_.disabled||(_.onClick?.(),T(!1))};return f.createElement("div",{ref:S,className:P("relative inline-block",g)},t==="button"&&f.createElement("button",{type:"button","aria-haspopup":"menu","aria-expanded":k,disabled:p,onClick:F,className:Pd({open:k,disabled:p})},f.createElement("span",null,e),k?f.createElement(Bd,{className:"size-[18px]"}):f.createElement(zd,{className:"size-[18px]"})),t==="icon"&&f.createElement("button",{type:"button","aria-haspopup":"menu","aria-expanded":k,"aria-label":e,disabled:p,onClick:F,className:Ld({disabled:p})},r??f.createElement(Vd,{className:"size-5"})),t==="avatar"&&f.createElement("button",{type:"button","aria-haspopup":"menu","aria-expanded":k,"aria-label":e,disabled:p,onClick:F,className:Id({open:k,disabled:p})},f.createElement(Ae,{src:n,initials:o,size:"md",status:"online"})),k&&f.createElement("div",{role:"menu",className:P(Md(),u==="end"?"right-0":"left-0",b)},i&&f.createElement("div",{className:Dd()},f.createElement("div",{className:"flex w-full items-center gap-3"},f.createElement(Ae,{src:i.avatarSrc,initials:i.avatarInitials,size:"md",status:i.status??"online"}),f.createElement("div",{className:"flex min-w-0 flex-1 flex-col items-start text-left"},f.createElement("span",{className:"w-full truncate text-sm font-bold text-light-800"},i.name),i.subtitle&&f.createElement("span",{className:"w-full truncate text-caption-lg font-normal text-light-700"},i.subtitle)))),f.createElement("div",{className:Fd()},s.map(_=>_.divider?f.createElement("div",{key:_.id,role:"separator",className:_d()}):f.createElement("button",{key:_.id,type:"button",role:"menuitem",disabled:_.disabled,onClick:()=>q(_),className:Ad({disabled:_.disabled})},_.icon&&f.createElement("span",{className:"flex size-4 shrink-0 items-center justify-center"},_.icon),f.createElement("span",{className:"flex-1 truncate"},_.label),_.shortcut&&f.createElement("span",{className:Od()},_.shortcut))))))}const Yo=I("relative",{variants:{layout:{floating:["flex w-full flex-col gap-4 p-4","rounded-xl border shadow-xs","sm:flex-row sm:items-start"],"full-width":"w-full border-b"}},defaultVariants:{layout:"floating"}}),Hd={default:{surface:"bg-light-50",border:"border-light-300",iconSurface:"border border-light-200 bg-white shadow-xs",iconSurfaceOnLight:"border border-light-200 bg-white shadow-xs",iconText:"text-light-800"},brand:{surface:"bg-primary-50",border:"border-primary-300",iconSurface:"bg-primary-100",iconSurfaceOnLight:"bg-white",iconText:"text-primary-500"},gray:{surface:"bg-light-50",border:"border-light-300",iconSurface:"bg-light-100",iconSurfaceOnLight:"bg-white",iconText:"text-light-800"},error:{surface:"bg-error-50",border:"border-error-300",iconSurface:"bg-error-50",iconSurfaceOnLight:"bg-white",iconText:"text-error-500"},warning:{surface:"bg-warning-50",border:"border-warning-300",iconSurface:"bg-warning-100",iconSurfaceOnLight:"bg-white",iconText:"text-warning-500"},success:{surface:"bg-success-50",border:"border-success-300",iconSurface:"bg-success-50",iconSurfaceOnLight:"bg-white",iconText:"text-success-500"}},jd="bg-white border-light-200",Gd="relative mx-auto flex w-full max-w-[1280px] flex-col gap-4 px-4 py-4 sm:flex-row sm:items-center sm:gap-3 sm:px-8 sm:py-3",Ud=I("flex shrink-0 items-center justify-center",{variants:{layout:{floating:"","full-width":"hidden sm:flex"},shape:{square:"",circle:""},variant:{featured:"",plain:""}},compoundVariants:[{variant:"featured",layout:"floating",class:"size-8"},{variant:"featured",layout:"full-width",class:"size-10"},{variant:"featured",shape:"circle",class:"rounded-full"},{variant:"featured",shape:"square",layout:"floating",class:"rounded-md"},{variant:"featured",shape:"square",layout:"full-width",class:"rounded-lg"}],defaultVariants:{layout:"floating",shape:"square",variant:"featured"}}),Xo=I("flex min-w-0 flex-1",{variants:{layout:{floating:"flex-col gap-3","full-width":"items-center gap-4"}},defaultVariants:{layout:"floating"}}),qd=I("flex min-w-0",{variants:{layout:{floating:"flex-col gap-1","full-width":"flex-col gap-0.5 sm:flex-row sm:flex-wrap sm:gap-x-1.5"},closable:{true:"",false:""}},compoundVariants:[{layout:"floating",closable:!0,class:"pr-8"},{layout:"full-width",closable:!0,class:"pr-8 sm:pr-0"}],defaultVariants:{layout:"floating",closable:!1}}),Yd="text-caption-lg font-bold text-light-800",Xd="text-caption-lg text-light-600",Zd=I("flex gap-3",{variants:{layout:{floating:"flex-wrap items-center","full-width":""},actionVariant:{link:"flex-wrap items-center",button:""}},compoundVariants:[{layout:"full-width",actionVariant:"button",class:"flex-col-reverse sm:flex-row sm:items-center"}],defaultVariants:{layout:"floating",actionVariant:"link"}}),Jd=I(["inline-flex items-center justify-center gap-1 bg-transparent p-0","text-caption-lg font-bold transition-colors","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-400 focus-visible:ring-offset-2"],{variants:{emphasis:{primary:"text-primary-500 hover:text-primary-800",secondary:"text-light-800 hover:text-light-900"}},defaultVariants:{emphasis:"secondary"}}),Rd=I(["flex size-9 shrink-0 items-center justify-center rounded-lg","bg-transparent text-light-500 transition-colors","hover:bg-light-50 hover:text-light-700","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary-400 focus-visible:ring-offset-2"],{variants:{layout:{floating:"absolute right-[7px] top-[7px]","full-width":"absolute right-2 top-2 sm:static"}},defaultVariants:{layout:"floating"}}),Qd={default:mr,brand:mr,gray:mr,error:Vo,warning:Vo,success:Lc},Zo=({title:t,description:e,color:r="default",layout:n="floating",background:o="white",icon:i,iconVariant:s="featured",showIcon:l=!0,primaryAction:c,secondaryAction:d,actionVariant:p,actions:u,onClose:g,closeLabel:b="Close",className:v,...x})=>{const w=Qd[r],k=n==="floating"?16:20,S=p??(n==="floating"?"link":"button"),T=Hd[r],F=o==="light",q=F?P(T.surface,T.border):jd,_=(X,Y)=>X?S==="link"?a.createElement("button",{type:"button",onClick:X.onClick,className:Jd({emphasis:Y})},X.label):a.createElement(Ze,{size:"sm",variant:Y==="primary"?"solid":"outline",onClick:X.onClick,className:n==="full-width"?"w-full sm:w-auto":void 0},X.label):null,C=!!(u||c||d)?a.createElement("div",{className:Zd({layout:n,actionVariant:S})},u??a.createElement(a.Fragment,null,_(d,"secondary"),_(c,"primary"))):null,B=l&&(i||w)?a.createElement("div",{className:P(Ud({layout:n,variant:s,shape:r==="default"?"square":"circle"}),T.iconText,s==="featured"&&(F?T.iconSurfaceOnLight:T.iconSurface))},i??a.createElement(w,{size:k,stroke:2})):null,J=g?a.createElement("button",{type:"button","aria-label":b,onClick:g,className:Rd({layout:n})},a.createElement(Ic,{size:16,stroke:2})):null,Z=a.createElement("div",{className:qd({layout:n,closable:!!g})},a.createElement("p",{className:Yd},t),e&&a.createElement("p",{className:Xd},e));return n==="full-width"?a.createElement("div",{role:"alert",className:P(Yo({layout:n}),q,v),...x},a.createElement("div",{className:Gd},a.createElement("div",{className:Xo({layout:n})},B,Z),(C||J)&&a.createElement("div",{className:"flex flex-col gap-3 sm:flex-row sm:items-center sm:gap-2"},C,J))):a.createElement("div",{role:"alert",className:P(Yo({layout:n}),q,v),...x},B,a.createElement("div",{className:Xo({layout:n})},Z,C),J)};Zo.displayName="Alert",G.Alert=Zo,G.Avatar=Ae,G.AvatarGroup=an,G.AvatarLabelGroup=cn,G.AvatarProfilePhoto=dn,G.Badge=tn,G.BadgeGroup=rn,G.Button=Ze,G.CardNumberInput=Ac,G.Checkbox=Yr,G.Dropdown=Wd,G.Input=gr,G.InputCounter=Fc,G.InputDropdown=Kd,G.Loading=nn,G.MultiSelectInput=Qc,G.PhoneInput=Mc,G.RadioGroup=Yi,G.RadioGroupItem=Zr,G.SaleAmountInput=Dc,G.Tab=Mo,G.TabBrowser=Oo,G.TabBrowserBar=_o,G.TabList=Do,G.Tag=Tt,G.Textarea=Ho,G.Toggle=Jr,G.Tooltip=Re,G.WebsiteCopyInput=gd,G.WebsiteInput=ad,Object.defineProperty(G,Symbol.toStringTag,{value:"Module"})}));