docthub-core-components 1.0.19 → 1.0.21

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.cjs.js CHANGED
@@ -1,119 +1,119 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("react/jsx-runtime"),b=require("react"),Ca=require("react-dom");function Ci(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const f=Ci(b),qr=Ci(Ca);function ys(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Ct(...e){return t=>{let n=!1;const r=e.map(o=>{const a=ys(o,t);return!n&&typeof a=="function"&&(n=!0),a});if(n)return()=>{for(let o=0;o<r.length;o++){const a=r[o];typeof a=="function"?a():ys(e[o],null)}}}}function he(...e){return f.useCallback(Ct(...e),e)}function Pt(e){const t=Dm(e),n=f.forwardRef((r,o)=>{const{children:a,...s}=r,i=f.Children.toArray(a),l=i.find(Tm);if(l){const u=l.props.children,m=i.map(c=>c===l?f.Children.count(u)>1?f.Children.only(null):f.isValidElement(u)?u.props.children:null:c);return d.jsx(t,{...s,ref:o,children:f.isValidElement(u)?f.cloneElement(u,void 0,m):null})}return d.jsx(t,{...s,ref:o,children:a})});return n.displayName=`${e}.Slot`,n}var Mi=Pt("Slot");function Dm(e){const t=f.forwardRef((n,r)=>{const{children:o,...a}=n;if(f.isValidElement(o)){const s=_m(o),i=Om(a,o.props);return o.type!==f.Fragment&&(i.ref=r?Ct(r,s):s),f.cloneElement(o,i)}return f.Children.count(o)>1?f.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Ei=Symbol("radix.slottable");function Rm(e){const t=({children:n})=>d.jsx(d.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=Ei,t}function Tm(e){return f.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Ei}function Om(e,t){const n={...t};for(const r in t){const o=e[r],a=t[r];/^on[A-Z]/.test(r)?o&&a?n[r]=(...i)=>{const l=a(...i);return o(...i),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...a}:r==="className"&&(n[r]=[o,a].filter(Boolean).join(" "))}return{...e,...n}}function _m(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function ki(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=ki(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Ni(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=ki(e))&&(r&&(r+=" "),r+=t);return r}const bs=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,ws=Ni,Vr=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return ws(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:a}=t,s=Object.keys(o).map(u=>{const m=n==null?void 0:n[u],c=a==null?void 0:a[u];if(m===null)return null;const p=bs(m)||bs(c);return o[u][p]}),i=n&&Object.entries(n).reduce((u,m)=>{let[c,p]=m;return p===void 0||(u[c]=p),u},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,m)=>{let{class:c,className:p,...h}=m;return Object.entries(h).every(y=>{let[g,v]=y;return Array.isArray(v)?v.includes({...a,...i}[g]):{...a,...i}[g]===v})?[...u,c,p]:u},[]);return ws(e,s,l,n==null?void 0:n.class,n==null?void 0:n.className)},Ma="-",Pm=e=>{const t=Im(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:s=>{const i=s.split(Ma);return i[0]===""&&i.length!==1&&i.shift(),Di(i,t)||Am(s)},getConflictingClassGroupIds:(s,i)=>{const l=n[s]||[];return i&&r[s]?[...l,...r[s]]:l}}},Di=(e,t)=>{var s;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?Di(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const a=e.join(Ma);return(s=t.validators.find(({validator:i})=>i(a)))==null?void 0:s.classGroupId},xs=/^\[(.+)\]$/,Am=e=>{if(xs.test(e)){const t=xs.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},Im=e=>{const{theme:t,classGroups:n}=e,r={nextPart:new Map,validators:[]};for(const o in n)Ko(n[o],r,o,t);return r},Ko=(e,t,n,r)=>{e.forEach(o=>{if(typeof o=="string"){const a=o===""?t:Ss(t,o);a.classGroupId=n;return}if(typeof o=="function"){if(jm(o)){Ko(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([a,s])=>{Ko(s,Ss(t,a),n,r)})})},Ss=(e,t)=>{let n=e;return t.split(Ma).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},jm=e=>e.isThemeGetter,$m=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const o=(a,s)=>{n.set(a,s),t++,t>e&&(t=0,r=n,n=new Map)};return{get(a){let s=n.get(a);if(s!==void 0)return s;if((s=r.get(a))!==void 0)return o(a,s),s},set(a,s){n.has(a)?n.set(a,s):o(a,s)}}},Xo="!",Zo=":",Lm=Zo.length,Fm=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=o=>{const a=[];let s=0,i=0,l=0,u;for(let y=0;y<o.length;y++){let g=o[y];if(s===0&&i===0){if(g===Zo){a.push(o.slice(l,y)),l=y+Lm;continue}if(g==="/"){u=y;continue}}g==="["?s++:g==="]"?s--:g==="("?i++:g===")"&&i--}const m=a.length===0?o:o.substring(l),c=Wm(m),p=c!==m,h=u&&u>l?u-l:void 0;return{modifiers:a,hasImportantModifier:p,baseClassName:c,maybePostfixModifierPosition:h}};if(t){const o=t+Zo,a=r;r=s=>s.startsWith(o)?a(s.substring(o.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:s,maybePostfixModifierPosition:void 0}}if(n){const o=r;r=a=>n({className:a,parseClassName:o})}return r},Wm=e=>e.endsWith(Xo)?e.substring(0,e.length-1):e.startsWith(Xo)?e.substring(1):e,Bm=e=>{const t=Object.fromEntries(e.orderSensitiveModifiers.map(r=>[r,!0]));return r=>{if(r.length<=1)return r;const o=[];let a=[];return r.forEach(s=>{s[0]==="["||t[s]?(o.push(...a.sort(),s),a=[]):a.push(s)}),o.push(...a.sort()),o}},Ym=e=>({cache:$m(e.cacheSize),parseClassName:Fm(e),sortModifiers:Bm(e),...Pm(e)}),Hm=/\s+/,zm=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:a}=t,s=[],i=e.trim().split(Hm);let l="";for(let u=i.length-1;u>=0;u-=1){const m=i[u],{isExternal:c,modifiers:p,hasImportantModifier:h,baseClassName:y,maybePostfixModifierPosition:g}=n(m);if(c){l=m+(l.length>0?" "+l:l);continue}let v=!!g,w=r(v?y.substring(0,g):y);if(!w){if(!v){l=m+(l.length>0?" "+l:l);continue}if(w=r(y),!w){l=m+(l.length>0?" "+l:l);continue}v=!1}const x=a(p).join(":"),S=h?x+Xo:x,k=S+w;if(s.includes(k))continue;s.push(k);const C=o(w,v);for(let N=0;N<C.length;++N){const M=C[N];s.push(S+M)}l=m+(l.length>0?" "+l:l)}return l};function Gm(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=Ri(t))&&(r&&(r+=" "),r+=n);return r}const Ri=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Ri(e[r]))&&(n&&(n+=" "),n+=t);return n};function Um(e,...t){let n,r,o,a=s;function s(l){const u=t.reduce((m,c)=>c(m),e());return n=Ym(u),r=n.cache.get,o=n.cache.set,a=i,i(l)}function i(l){const u=r(l);if(u)return u;const m=zm(l,n);return o(l,m),m}return function(){return a(Gm.apply(null,arguments))}}const Re=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},Ti=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,Oi=/^\((?:(\w[\w-]*):)?(.+)\)$/i,qm=/^\d+\/\d+$/,Vm=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Km=/\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$/,Xm=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Zm=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Qm=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,sn=e=>qm.test(e),me=e=>!!e&&!Number.isNaN(Number(e)),Rt=e=>!!e&&Number.isInteger(Number(e)),Co=e=>e.endsWith("%")&&me(e.slice(0,-1)),wt=e=>Vm.test(e),Jm=()=>!0,ep=e=>Km.test(e)&&!Xm.test(e),_i=()=>!1,tp=e=>Zm.test(e),np=e=>Qm.test(e),rp=e=>!J(e)&&!ee(e),op=e=>Sn(e,Ii,_i),J=e=>Ti.test(e),Ut=e=>Sn(e,ji,ep),Mo=e=>Sn(e,lp,me),Cs=e=>Sn(e,Pi,_i),ap=e=>Sn(e,Ai,np),vr=e=>Sn(e,$i,tp),ee=e=>Oi.test(e),In=e=>Cn(e,ji),sp=e=>Cn(e,up),Ms=e=>Cn(e,Pi),ip=e=>Cn(e,Ii),cp=e=>Cn(e,Ai),yr=e=>Cn(e,$i,!0),Sn=(e,t,n)=>{const r=Ti.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},Cn=(e,t,n=!1)=>{const r=Oi.exec(e);return r?r[1]?t(r[1]):n:!1},Pi=e=>e==="position"||e==="percentage",Ai=e=>e==="image"||e==="url",Ii=e=>e==="length"||e==="size"||e==="bg-size",ji=e=>e==="length",lp=e=>e==="number",up=e=>e==="family-name",$i=e=>e==="shadow",dp=()=>{const e=Re("color"),t=Re("font"),n=Re("text"),r=Re("font-weight"),o=Re("tracking"),a=Re("leading"),s=Re("breakpoint"),i=Re("container"),l=Re("spacing"),u=Re("radius"),m=Re("shadow"),c=Re("inset-shadow"),p=Re("text-shadow"),h=Re("drop-shadow"),y=Re("blur"),g=Re("perspective"),v=Re("aspect"),w=Re("ease"),x=Re("animate"),S=()=>["auto","avoid","all","avoid-page","page","left","right","column"],k=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],C=()=>[...k(),ee,J],N=()=>["auto","hidden","clip","visible","scroll"],M=()=>["auto","contain","none"],D=()=>[ee,J,l],L=()=>[sn,"full","auto",...D()],B=()=>[Rt,"none","subgrid",ee,J],F=()=>["auto",{span:["full",Rt,ee,J]},Rt,ee,J],V=()=>[Rt,"auto",ee,J],$=()=>["auto","min","max","fr",ee,J],I=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],_=()=>["start","end","center","stretch","center-safe","end-safe"],R=()=>["auto",...D()],P=()=>[sn,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...D()],E=()=>[e,ee,J],O=()=>[...k(),Ms,Cs,{position:[ee,J]}],Y=()=>["no-repeat",{repeat:["","x","y","space","round"]}],G=()=>["auto","cover","contain",ip,op,{size:[ee,J]}],T=()=>[Co,In,Ut],A=()=>["","none","full",u,ee,J],W=()=>["",me,In,Ut],H=()=>["solid","dashed","dotted","double"],U=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],j=()=>[me,Co,Ms,Cs],Z=()=>["","none",y,ee,J],X=()=>["none",me,ee,J],Q=()=>["none",me,ee,J],le=()=>[me,ee,J],de=()=>[sn,"full",...D()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[wt],breakpoint:[wt],color:[Jm],container:[wt],"drop-shadow":[wt],ease:["in","out","in-out"],font:[rp],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[wt],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[wt],shadow:[wt],spacing:["px",me],text:[wt],"text-shadow":[wt],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",sn,J,ee,v]}],container:["container"],columns:[{columns:[me,J,ee,i]}],"break-after":[{"break-after":S()}],"break-before":[{"break-before":S()}],"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:C()}],overflow:[{overflow:N()}],"overflow-x":[{"overflow-x":N()}],"overflow-y":[{"overflow-y":N()}],overscroll:[{overscroll:M()}],"overscroll-x":[{"overscroll-x":M()}],"overscroll-y":[{"overscroll-y":M()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:L()}],"inset-x":[{"inset-x":L()}],"inset-y":[{"inset-y":L()}],start:[{start:L()}],end:[{end:L()}],top:[{top:L()}],right:[{right:L()}],bottom:[{bottom:L()}],left:[{left:L()}],visibility:["visible","invisible","collapse"],z:[{z:[Rt,"auto",ee,J]}],basis:[{basis:[sn,"full","auto",i,...D()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[me,sn,"auto","initial","none",J]}],grow:[{grow:["",me,ee,J]}],shrink:[{shrink:["",me,ee,J]}],order:[{order:[Rt,"first","last","none",ee,J]}],"grid-cols":[{"grid-cols":B()}],"col-start-end":[{col:F()}],"col-start":[{"col-start":V()}],"col-end":[{"col-end":V()}],"grid-rows":[{"grid-rows":B()}],"row-start-end":[{row:F()}],"row-start":[{"row-start":V()}],"row-end":[{"row-end":V()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":$()}],"auto-rows":[{"auto-rows":$()}],gap:[{gap:D()}],"gap-x":[{"gap-x":D()}],"gap-y":[{"gap-y":D()}],"justify-content":[{justify:[...I(),"normal"]}],"justify-items":[{"justify-items":[..._(),"normal"]}],"justify-self":[{"justify-self":["auto",..._()]}],"align-content":[{content:["normal",...I()]}],"align-items":[{items:[..._(),{baseline:["","last"]}]}],"align-self":[{self:["auto",..._(),{baseline:["","last"]}]}],"place-content":[{"place-content":I()}],"place-items":[{"place-items":[..._(),"baseline"]}],"place-self":[{"place-self":["auto",..._()]}],p:[{p:D()}],px:[{px:D()}],py:[{py:D()}],ps:[{ps:D()}],pe:[{pe:D()}],pt:[{pt:D()}],pr:[{pr:D()}],pb:[{pb:D()}],pl:[{pl:D()}],m:[{m:R()}],mx:[{mx:R()}],my:[{my:R()}],ms:[{ms:R()}],me:[{me:R()}],mt:[{mt:R()}],mr:[{mr:R()}],mb:[{mb:R()}],ml:[{ml:R()}],"space-x":[{"space-x":D()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":D()}],"space-y-reverse":["space-y-reverse"],size:[{size:P()}],w:[{w:[i,"screen",...P()]}],"min-w":[{"min-w":[i,"screen","none",...P()]}],"max-w":[{"max-w":[i,"screen","none","prose",{screen:[s]},...P()]}],h:[{h:["screen","lh",...P()]}],"min-h":[{"min-h":["screen","lh","none",...P()]}],"max-h":[{"max-h":["screen","lh",...P()]}],"font-size":[{text:["base",n,In,Ut]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,ee,Mo]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Co,J]}],"font-family":[{font:[sp,J,t]}],"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,ee,J]}],"line-clamp":[{"line-clamp":[me,"none",ee,Mo]}],leading:[{leading:[a,...D()]}],"list-image":[{"list-image":["none",ee,J]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ee,J]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:E()}],"text-color":[{text:E()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...H(),"wavy"]}],"text-decoration-thickness":[{decoration:[me,"from-font","auto",ee,Ut]}],"text-decoration-color":[{decoration:E()}],"underline-offset":[{"underline-offset":[me,"auto",ee,J]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:D()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ee,J]}],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",ee,J]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:O()}],"bg-repeat":[{bg:Y()}],"bg-size":[{bg:G()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Rt,ee,J],radial:["",ee,J],conic:[Rt,ee,J]},cp,ap]}],"bg-color":[{bg:E()}],"gradient-from-pos":[{from:T()}],"gradient-via-pos":[{via:T()}],"gradient-to-pos":[{to:T()}],"gradient-from":[{from:E()}],"gradient-via":[{via:E()}],"gradient-to":[{to:E()}],rounded:[{rounded:A()}],"rounded-s":[{"rounded-s":A()}],"rounded-e":[{"rounded-e":A()}],"rounded-t":[{"rounded-t":A()}],"rounded-r":[{"rounded-r":A()}],"rounded-b":[{"rounded-b":A()}],"rounded-l":[{"rounded-l":A()}],"rounded-ss":[{"rounded-ss":A()}],"rounded-se":[{"rounded-se":A()}],"rounded-ee":[{"rounded-ee":A()}],"rounded-es":[{"rounded-es":A()}],"rounded-tl":[{"rounded-tl":A()}],"rounded-tr":[{"rounded-tr":A()}],"rounded-br":[{"rounded-br":A()}],"rounded-bl":[{"rounded-bl":A()}],"border-w":[{border: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-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:[...H(),"hidden","none"]}],"divide-style":[{divide:[...H(),"hidden","none"]}],"border-color":[{border:E()}],"border-color-x":[{"border-x":E()}],"border-color-y":[{"border-y":E()}],"border-color-s":[{"border-s":E()}],"border-color-e":[{"border-e":E()}],"border-color-t":[{"border-t":E()}],"border-color-r":[{"border-r":E()}],"border-color-b":[{"border-b":E()}],"border-color-l":[{"border-l":E()}],"divide-color":[{divide:E()}],"outline-style":[{outline:[...H(),"none","hidden"]}],"outline-offset":[{"outline-offset":[me,ee,J]}],"outline-w":[{outline:["",me,In,Ut]}],"outline-color":[{outline:E()}],shadow:[{shadow:["","none",m,yr,vr]}],"shadow-color":[{shadow:E()}],"inset-shadow":[{"inset-shadow":["none",c,yr,vr]}],"inset-shadow-color":[{"inset-shadow":E()}],"ring-w":[{ring:W()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:E()}],"ring-offset-w":[{"ring-offset":[me,Ut]}],"ring-offset-color":[{"ring-offset":E()}],"inset-ring-w":[{"inset-ring":W()}],"inset-ring-color":[{"inset-ring":E()}],"text-shadow":[{"text-shadow":["none",p,yr,vr]}],"text-shadow-color":[{"text-shadow":E()}],opacity:[{opacity:[me,ee,J]}],"mix-blend":[{"mix-blend":[...U(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":U()}],"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":[me]}],"mask-image-linear-from-pos":[{"mask-linear-from":j()}],"mask-image-linear-to-pos":[{"mask-linear-to":j()}],"mask-image-linear-from-color":[{"mask-linear-from":E()}],"mask-image-linear-to-color":[{"mask-linear-to":E()}],"mask-image-t-from-pos":[{"mask-t-from":j()}],"mask-image-t-to-pos":[{"mask-t-to":j()}],"mask-image-t-from-color":[{"mask-t-from":E()}],"mask-image-t-to-color":[{"mask-t-to":E()}],"mask-image-r-from-pos":[{"mask-r-from":j()}],"mask-image-r-to-pos":[{"mask-r-to":j()}],"mask-image-r-from-color":[{"mask-r-from":E()}],"mask-image-r-to-color":[{"mask-r-to":E()}],"mask-image-b-from-pos":[{"mask-b-from":j()}],"mask-image-b-to-pos":[{"mask-b-to":j()}],"mask-image-b-from-color":[{"mask-b-from":E()}],"mask-image-b-to-color":[{"mask-b-to":E()}],"mask-image-l-from-pos":[{"mask-l-from":j()}],"mask-image-l-to-pos":[{"mask-l-to":j()}],"mask-image-l-from-color":[{"mask-l-from":E()}],"mask-image-l-to-color":[{"mask-l-to":E()}],"mask-image-x-from-pos":[{"mask-x-from":j()}],"mask-image-x-to-pos":[{"mask-x-to":j()}],"mask-image-x-from-color":[{"mask-x-from":E()}],"mask-image-x-to-color":[{"mask-x-to":E()}],"mask-image-y-from-pos":[{"mask-y-from":j()}],"mask-image-y-to-pos":[{"mask-y-to":j()}],"mask-image-y-from-color":[{"mask-y-from":E()}],"mask-image-y-to-color":[{"mask-y-to":E()}],"mask-image-radial":[{"mask-radial":[ee,J]}],"mask-image-radial-from-pos":[{"mask-radial-from":j()}],"mask-image-radial-to-pos":[{"mask-radial-to":j()}],"mask-image-radial-from-color":[{"mask-radial-from":E()}],"mask-image-radial-to-color":[{"mask-radial-to":E()}],"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":k()}],"mask-image-conic-pos":[{"mask-conic":[me]}],"mask-image-conic-from-pos":[{"mask-conic-from":j()}],"mask-image-conic-to-pos":[{"mask-conic-to":j()}],"mask-image-conic-from-color":[{"mask-conic-from":E()}],"mask-image-conic-to-color":[{"mask-conic-to":E()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:O()}],"mask-repeat":[{mask:Y()}],"mask-size":[{mask:G()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ee,J]}],filter:[{filter:["","none",ee,J]}],blur:[{blur:Z()}],brightness:[{brightness:[me,ee,J]}],contrast:[{contrast:[me,ee,J]}],"drop-shadow":[{"drop-shadow":["","none",h,yr,vr]}],"drop-shadow-color":[{"drop-shadow":E()}],grayscale:[{grayscale:["",me,ee,J]}],"hue-rotate":[{"hue-rotate":[me,ee,J]}],invert:[{invert:["",me,ee,J]}],saturate:[{saturate:[me,ee,J]}],sepia:[{sepia:["",me,ee,J]}],"backdrop-filter":[{"backdrop-filter":["","none",ee,J]}],"backdrop-blur":[{"backdrop-blur":Z()}],"backdrop-brightness":[{"backdrop-brightness":[me,ee,J]}],"backdrop-contrast":[{"backdrop-contrast":[me,ee,J]}],"backdrop-grayscale":[{"backdrop-grayscale":["",me,ee,J]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[me,ee,J]}],"backdrop-invert":[{"backdrop-invert":["",me,ee,J]}],"backdrop-opacity":[{"backdrop-opacity":[me,ee,J]}],"backdrop-saturate":[{"backdrop-saturate":[me,ee,J]}],"backdrop-sepia":[{"backdrop-sepia":["",me,ee,J]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":D()}],"border-spacing-x":[{"border-spacing-x":D()}],"border-spacing-y":[{"border-spacing-y":D()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ee,J]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[me,"initial",ee,J]}],ease:[{ease:["linear","initial",w,ee,J]}],delay:[{delay:[me,ee,J]}],animate:[{animate:["none",x,ee,J]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[g,ee,J]}],"perspective-origin":[{"perspective-origin":C()}],rotate:[{rotate:X()}],"rotate-x":[{"rotate-x":X()}],"rotate-y":[{"rotate-y":X()}],"rotate-z":[{"rotate-z":X()}],scale:[{scale:Q()}],"scale-x":[{"scale-x":Q()}],"scale-y":[{"scale-y":Q()}],"scale-z":[{"scale-z":Q()}],"scale-3d":["scale-3d"],skew:[{skew:le()}],"skew-x":[{"skew-x":le()}],"skew-y":[{"skew-y":le()}],transform:[{transform:[ee,J,"","none","gpu","cpu"]}],"transform-origin":[{origin:C()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:de()}],"translate-x":[{"translate-x":de()}],"translate-y":[{"translate-y":de()}],"translate-z":[{"translate-z":de()}],"translate-none":["translate-none"],accent:[{accent:E()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:E()}],"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",ee,J]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":D()}],"scroll-mx":[{"scroll-mx":D()}],"scroll-my":[{"scroll-my":D()}],"scroll-ms":[{"scroll-ms":D()}],"scroll-me":[{"scroll-me":D()}],"scroll-mt":[{"scroll-mt":D()}],"scroll-mr":[{"scroll-mr":D()}],"scroll-mb":[{"scroll-mb":D()}],"scroll-ml":[{"scroll-ml":D()}],"scroll-p":[{"scroll-p":D()}],"scroll-px":[{"scroll-px":D()}],"scroll-py":[{"scroll-py":D()}],"scroll-ps":[{"scroll-ps":D()}],"scroll-pe":[{"scroll-pe":D()}],"scroll-pt":[{"scroll-pt":D()}],"scroll-pr":[{"scroll-pr":D()}],"scroll-pb":[{"scroll-pb":D()}],"scroll-pl":[{"scroll-pl":D()}],"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",ee,J]}],fill:[{fill:["none",...E()]}],"stroke-w":[{stroke:[me,In,Ut,Mo]}],stroke:[{stroke:["none",...E()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],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-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},fp=Um(dp);function q(...e){return fp(Ni(e))}const Li=Vr("inline-flex items-center justify-center transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-black text-white hover:bg-black/90",outline:"border border-gray-300 bg-white text-gray-700 hover:bg-gray-100",ghost:"text-gray-700 hover:bg-gray-100",error:"bg-red-500 text-white hover:bg-red-600",success:"bg-green-500 text-white hover:bg-green-600",warning:"bg-yellow-500 text-white hover:bg-yellow-600",blue:"bg-blue-500 text-white hover:bg-blue-600",disabled:"bg-gray-200 text-gray-400 cursor-not-allowed hover:bg-gray-200",primary:"bg-customBlue text-white hover:bg-customBlue/90"},size:{large:"rounded-xl text-base py-2.5 px-5 leading-snug font-semibold gap-2",medium:"rounded-xl text-sm py-2 px-4 leading-tight font-semibold gap-2",small:"rounded-full text-xs py-2 px-3 leading-4 font-semibold gap-1","icon.large":"rounded-[12px] p-2.5","icon.medium":"rounded-[10px] p-2","icon.small":"rounded-[14px] p-1.5"},iconSize:{large:"[&_svg]:w-6 [&_svg]:h-6",medium:"[&_svg]:w-5 [&_svg]:h-5",small:"[&_svg]:w-4 [&_svg]:h-4"},iconPosition:{left:"flex-row",right:"flex-row-reverse"},fullWidth:{true:"w-full",false:"w-auto"}},defaultVariants:{variant:"default",size:"medium",iconPosition:"left",fullWidth:!1}}),gn=b.forwardRef(({className:e,variant:t,size:n,iconSize:r,iconPosition:o,fullWidth:a,asChild:s=!1,icon:i,iconOnly:l,children:u,...m},c)=>{const p=s?Mi:"button";let h=n;if(l&&n)switch(n){case"large":h="icon.large";break;case"medium":h="icon.medium";break;case"small":h="icon.small";break}const y=r||(n==="large"?"large":n==="small"?"small":"medium");return d.jsxs(p,{className:q(Li({variant:t,size:h,iconSize:y,iconPosition:o,fullWidth:a,className:e})),ref:c,...m,children:[i&&d.jsx("span",{"data-testid":"button-icon",children:i}),!l&&u]})});gn.displayName="DoctButton";const mp={h1:{fontSize:"56px",tag:"h1"},h2:{fontSize:"46px",tag:"h2"},h3:{fontSize:"36px",tag:"h3"},h4:{fontSize:"32px",tag:"h4"},h5:{fontSize:"28px",tag:"h5"},h6:{fontSize:"24px",tag:"h6"},h7:{fontSize:"20px",tag:"p"},h8:{fontSize:"18px",tag:"p"},title1:{fontSize:"22px",tag:"p"},title2:{fontSize:"18px",tag:"p"},title3:{fontSize:"14px",tag:"p"},title4:{fontSize:"12px",tag:"p"},body1:{fontSize:"16px",tag:"p"},body2:{fontSize:"14px",tag:"p"},body3:{fontSize:"12px",tag:"p"},body4:{fontSize:"10px",tag:"p"},textLabel1:{fontSize:"16px",tag:"span"},textLabel2:{fontSize:"14px",tag:"span"},textLabel3:{fontSize:"12px",tag:"span"},textLabel4:{fontSize:"11px",tag:"span"}},pp={regular:"400",medium:"500",semiBold:"600",bold:"700",extraBold:"800",light:"300"},hp=({variant:e,weight:t="regular",children:n,color:r="#000",align:o="inherit",className:a=""})=>{const s=mp[e]??{fontSize:"16px",tag:"p"},{fontSize:i,tag:l}=s;return d.jsx(l,{className:a,style:{fontSize:i,fontWeight:pp[t]??"400",color:r,textAlign:o,margin:0},children:n})};function gp(){return d.jsx("div",{className:"flex flex-col items-center justify-center h-screen w-full bg-white",children:d.jsx("img",{src:"/logoAnimation.gif",alt:"Loading animation",className:"w-32 h-32 object-contain"})})}const Mn=f.forwardRef(({className:e,type:t,...n},r)=>d.jsx("input",{type:t,className:q("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder-gray-400 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:r,...n}));Mn.displayName="Input";var vp=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],te=vp.reduce((e,t)=>{const n=Pt(`Primitive.${t}`),r=f.forwardRef((o,a)=>{const{asChild:s,...i}=o,l=s?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),d.jsx(l,{...i,ref:a})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Fi(e,t){e&&qr.flushSync(()=>e.dispatchEvent(t))}var yp="Label",Wi=f.forwardRef((e,t)=>d.jsx(te.label,{...e,ref:t,onMouseDown:n=>{var o;n.target.closest("button, input, select, textarea")||((o=e.onMouseDown)==null||o.call(e,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));Wi.displayName=yp;var Bi=Wi;const bp=Vr("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),en=f.forwardRef(({className:e,...t},n)=>d.jsx(Bi,{ref:n,className:q(bp(),e),...t}));en.displayName=Bi.displayName;const Qe=({label:e,placeholder:t,helperText:n,error:r,required:o,type:a="text",leftIcon:s,rightIcon:i,className:l,inputClassName:u,onChange:m,showCharCount:c,maxLength:p,value:h,disabled:y,fridged:g})=>{const[v,w]=b.useState((h==null?void 0:h.length)||0),x=C=>{m&&m(C),w(C.target.value.length)},S=c&&typeof p=="number",k=g||y;return d.jsxs("div",{className:q("space-y-1",l),children:[e&&d.jsxs(en,{className:"text-sm font-medium text-foreground",children:[e,o&&d.jsx("span",{className:"text-destructive ml-1",children:"*"})]}),d.jsxs("div",{className:"relative",children:[s&&d.jsx("div",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground",children:s}),i&&d.jsx("div",{className:"absolute right-3 top-1/2 -translate-y-1/2 text-muted-foreground",children:i}),d.jsx(Mn,{type:a,placeholder:t,disabled:y,value:h,maxLength:p,onChange:x,className:q(s&&"pl-10",i&&"pr-10",r&&"border-destructive focus-visible:ring-destructive",k&&"cursor-not-allowed bg-muted text-muted-foreground opacity-70",u)}),S&&d.jsxs("span",{className:"absolute bottom-[-1.25rem] right-0 text-xs text-muted-foreground",children:[v," / ",p]})]}),(n||r)&&d.jsx("p",{className:q("text-xs",r?"text-destructive":"text-muted-foreground"),children:r||n})]})},wp=({length:e=6,label:t,value:n,onChange:r,onComplete:o,className:a})=>{const s=b.useRef([]),i=(u,m)=>{var p;if(m.length>1)return;const c=[...n];c[u]=m,r(c),m&&u<e-1&&((p=s.current[u+1])==null||p.focus()),c.every(h=>h!=="")&&o&&o(c.join(""))},l=(u,m)=>{var c;m.key==="Backspace"&&!n[u]&&u>0&&((c=s.current[u-1])==null||c.focus())};return d.jsxs("div",{className:q("space-y-2",a),children:[t&&d.jsx(en,{className:"text-sm font-medium text-gray-700",children:t}),d.jsx("div",{className:"flex gap-2",children:n.map((u,m)=>d.jsx(Mn,{ref:c=>s.current[m]=c,type:"text",inputMode:"numeric",maxLength:1,value:u,onChange:c=>i(m,c.target.value),onKeyDown:c=>l(m,c),className:"w-12 h-12 text-center p-0 text-lg font-semibold"},m))})]})};/**
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("react/jsx-runtime"),x=require("react"),Ea=require("react-dom");function ji(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const f=ji(x),Qr=ji(Ea);function Ns(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Mt(...e){return t=>{let n=!1;const r=e.map(o=>{const a=Ns(o,t);return!n&&typeof a=="function"&&(n=!0),a});if(n)return()=>{for(let o=0;o<r.length;o++){const a=r[o];typeof a=="function"?a():Ns(e[o],null)}}}}function he(...e){return f.useCallback(Mt(...e),e)}function At(e){const t=Km(e),n=f.forwardRef((r,o)=>{const{children:a,...s}=r,i=f.Children.toArray(a),l=i.find(Zm);if(l){const u=l.props.children,m=i.map(c=>c===l?f.Children.count(u)>1?f.Children.only(null):f.isValidElement(u)?u.props.children:null:c);return d.jsx(t,{...s,ref:o,children:f.isValidElement(u)?f.cloneElement(u,void 0,m):null})}return d.jsx(t,{...s,ref:o,children:a})});return n.displayName=`${e}.Slot`,n}var $i=At("Slot");function Km(e){const t=f.forwardRef((n,r)=>{const{children:o,...a}=n;if(f.isValidElement(o)){const s=Jm(o),i=Qm(a,o.props);return o.type!==f.Fragment&&(i.ref=r?Mt(r,s):s),f.cloneElement(o,i)}return f.Children.count(o)>1?f.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Li=Symbol("radix.slottable");function Xm(e){const t=({children:n})=>d.jsx(d.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=Li,t}function Zm(e){return f.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Li}function Qm(e,t){const n={...t};for(const r in t){const o=e[r],a=t[r];/^on[A-Z]/.test(r)?o&&a?n[r]=(...i)=>{const l=a(...i);return o(...i),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...a}:r==="className"&&(n[r]=[o,a].filter(Boolean).join(" "))}return{...e,...n}}function Jm(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function Fi(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=Fi(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Wi(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Fi(e))&&(r&&(r+=" "),r+=t);return r}const Rs=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Ts=Wi,er=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return Ts(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:a}=t,s=Object.keys(o).map(u=>{const m=n==null?void 0:n[u],c=a==null?void 0:a[u];if(m===null)return null;const p=Rs(m)||Rs(c);return o[u][p]}),i=n&&Object.entries(n).reduce((u,m)=>{let[c,p]=m;return p===void 0||(u[c]=p),u},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,m)=>{let{class:c,className:p,...h}=m;return Object.entries(h).every(y=>{let[v,g]=y;return Array.isArray(g)?g.includes({...a,...i}[v]):{...a,...i}[v]===g})?[...u,c,p]:u},[]);return Ts(e,s,l,n==null?void 0:n.class,n==null?void 0:n.className)},Na="-",ep=e=>{const t=np(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:s=>{const i=s.split(Na);return i[0]===""&&i.length!==1&&i.shift(),Bi(i,t)||tp(s)},getConflictingClassGroupIds:(s,i)=>{const l=n[s]||[];return i&&r[s]?[...l,...r[s]]:l}}},Bi=(e,t)=>{var s;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?Bi(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const a=e.join(Na);return(s=t.validators.find(({validator:i})=>i(a)))==null?void 0:s.classGroupId},_s=/^\[(.+)\]$/,tp=e=>{if(_s.test(e)){const t=_s.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},np=e=>{const{theme:t,classGroups:n}=e,r={nextPart:new Map,validators:[]};for(const o in n)Jo(n[o],r,o,t);return r},Jo=(e,t,n,r)=>{e.forEach(o=>{if(typeof o=="string"){const a=o===""?t:Os(t,o);a.classGroupId=n;return}if(typeof o=="function"){if(rp(o)){Jo(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([a,s])=>{Jo(s,Os(t,a),n,r)})})},Os=(e,t)=>{let n=e;return t.split(Na).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},rp=e=>e.isThemeGetter,op=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const o=(a,s)=>{n.set(a,s),t++,t>e&&(t=0,r=n,n=new Map)};return{get(a){let s=n.get(a);if(s!==void 0)return s;if((s=r.get(a))!==void 0)return o(a,s),s},set(a,s){n.has(a)?n.set(a,s):o(a,s)}}},ea="!",ta=":",ap=ta.length,sp=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=o=>{const a=[];let s=0,i=0,l=0,u;for(let y=0;y<o.length;y++){let v=o[y];if(s===0&&i===0){if(v===ta){a.push(o.slice(l,y)),l=y+ap;continue}if(v==="/"){u=y;continue}}v==="["?s++:v==="]"?s--:v==="("?i++:v===")"&&i--}const m=a.length===0?o:o.substring(l),c=ip(m),p=c!==m,h=u&&u>l?u-l:void 0;return{modifiers:a,hasImportantModifier:p,baseClassName:c,maybePostfixModifierPosition:h}};if(t){const o=t+ta,a=r;r=s=>s.startsWith(o)?a(s.substring(o.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:s,maybePostfixModifierPosition:void 0}}if(n){const o=r;r=a=>n({className:a,parseClassName:o})}return r},ip=e=>e.endsWith(ea)?e.substring(0,e.length-1):e.startsWith(ea)?e.substring(1):e,cp=e=>{const t=Object.fromEntries(e.orderSensitiveModifiers.map(r=>[r,!0]));return r=>{if(r.length<=1)return r;const o=[];let a=[];return r.forEach(s=>{s[0]==="["||t[s]?(o.push(...a.sort(),s),a=[]):a.push(s)}),o.push(...a.sort()),o}},lp=e=>({cache:op(e.cacheSize),parseClassName:sp(e),sortModifiers:cp(e),...ep(e)}),up=/\s+/,dp=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:a}=t,s=[],i=e.trim().split(up);let l="";for(let u=i.length-1;u>=0;u-=1){const m=i[u],{isExternal:c,modifiers:p,hasImportantModifier:h,baseClassName:y,maybePostfixModifierPosition:v}=n(m);if(c){l=m+(l.length>0?" "+l:l);continue}let g=!!v,b=r(g?y.substring(0,v):y);if(!b){if(!g){l=m+(l.length>0?" "+l:l);continue}if(b=r(y),!b){l=m+(l.length>0?" "+l:l);continue}g=!1}const w=a(p).join(":"),S=h?w+ea:w,D=S+b;if(s.includes(D))continue;s.push(D);const C=o(b,g);for(let R=0;R<C.length;++R){const M=C[R];s.push(S+M)}l=m+(l.length>0?" "+l:l)}return l};function fp(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=Yi(t))&&(r&&(r+=" "),r+=n);return r}const Yi=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Yi(e[r]))&&(n&&(n+=" "),n+=t);return n};function mp(e,...t){let n,r,o,a=s;function s(l){const u=t.reduce((m,c)=>c(m),e());return n=lp(u),r=n.cache.get,o=n.cache.set,a=i,i(l)}function i(l){const u=r(l);if(u)return u;const m=dp(l,n);return o(l,m),m}return function(){return a(fp.apply(null,arguments))}}const _e=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},Hi=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,zi=/^\((?:(\w[\w-]*):)?(.+)\)$/i,pp=/^\d+\/\d+$/,hp=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,gp=/\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$/,vp=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,yp=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,bp=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,un=e=>pp.test(e),pe=e=>!!e&&!Number.isNaN(Number(e)),Tt=e=>!!e&&Number.isInteger(Number(e)),Eo=e=>e.endsWith("%")&&pe(e.slice(0,-1)),wt=e=>hp.test(e),wp=()=>!0,xp=e=>gp.test(e)&&!vp.test(e),Gi=()=>!1,Sp=e=>yp.test(e),Cp=e=>bp.test(e),Mp=e=>!te(e)&&!ne(e),Dp=e=>Mn(e,Vi,Gi),te=e=>Hi.test(e),Vt=e=>Mn(e,Ki,xp),No=e=>Mn(e,Tp,pe),Ps=e=>Mn(e,Ui,Gi),kp=e=>Mn(e,qi,Cp),wr=e=>Mn(e,Xi,Sp),ne=e=>zi.test(e),jn=e=>Dn(e,Ki),Ep=e=>Dn(e,_p),As=e=>Dn(e,Ui),Np=e=>Dn(e,Vi),Rp=e=>Dn(e,qi),xr=e=>Dn(e,Xi,!0),Mn=(e,t,n)=>{const r=Hi.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},Dn=(e,t,n=!1)=>{const r=zi.exec(e);return r?r[1]?t(r[1]):n:!1},Ui=e=>e==="position"||e==="percentage",qi=e=>e==="image"||e==="url",Vi=e=>e==="length"||e==="size"||e==="bg-size",Ki=e=>e==="length",Tp=e=>e==="number",_p=e=>e==="family-name",Xi=e=>e==="shadow",Op=()=>{const e=_e("color"),t=_e("font"),n=_e("text"),r=_e("font-weight"),o=_e("tracking"),a=_e("leading"),s=_e("breakpoint"),i=_e("container"),l=_e("spacing"),u=_e("radius"),m=_e("shadow"),c=_e("inset-shadow"),p=_e("text-shadow"),h=_e("drop-shadow"),y=_e("blur"),v=_e("perspective"),g=_e("aspect"),b=_e("ease"),w=_e("animate"),S=()=>["auto","avoid","all","avoid-page","page","left","right","column"],D=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],C=()=>[...D(),ne,te],R=()=>["auto","hidden","clip","visible","scroll"],M=()=>["auto","contain","none"],E=()=>[ne,te,l],$=()=>[un,"full","auto",...E()],B=()=>[Tt,"none","subgrid",ne,te],L=()=>["auto",{span:["full",Tt,ne,te]},Tt,ne,te],q=()=>[Tt,"auto",ne,te],A=()=>["auto","min","max","fr",ne,te],T=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],_=()=>["start","end","center","stretch","center-safe","end-safe"],N=()=>["auto",...E()],I=()=>[un,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...E()],k=()=>[e,ne,te],P=()=>[...D(),As,Ps,{position:[ne,te]}],H=()=>["no-repeat",{repeat:["","x","y","space","round"]}],z=()=>["auto","cover","contain",Np,Dp,{size:[ne,te]}],O=()=>[Eo,jn,Vt],j=()=>["","none","full",u,ne,te],Y=()=>["",pe,jn,Vt],G=()=>["solid","dashed","dotted","double"],V=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],W=()=>[pe,Eo,As,Ps],Z=()=>["","none",y,ne,te],X=()=>["none",pe,ne,te],Q=()=>["none",pe,ne,te],se=()=>[pe,ne,te],ue=()=>[un,"full",...E()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[wt],breakpoint:[wt],color:[wp],container:[wt],"drop-shadow":[wt],ease:["in","out","in-out"],font:[Mp],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[wt],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[wt],shadow:[wt],spacing:["px",pe],text:[wt],"text-shadow":[wt],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",un,te,ne,g]}],container:["container"],columns:[{columns:[pe,te,ne,i]}],"break-after":[{"break-after":S()}],"break-before":[{"break-before":S()}],"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:C()}],overflow:[{overflow:R()}],"overflow-x":[{"overflow-x":R()}],"overflow-y":[{"overflow-y":R()}],overscroll:[{overscroll:M()}],"overscroll-x":[{"overscroll-x":M()}],"overscroll-y":[{"overscroll-y":M()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:$()}],"inset-x":[{"inset-x":$()}],"inset-y":[{"inset-y":$()}],start:[{start:$()}],end:[{end:$()}],top:[{top:$()}],right:[{right:$()}],bottom:[{bottom:$()}],left:[{left:$()}],visibility:["visible","invisible","collapse"],z:[{z:[Tt,"auto",ne,te]}],basis:[{basis:[un,"full","auto",i,...E()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[pe,un,"auto","initial","none",te]}],grow:[{grow:["",pe,ne,te]}],shrink:[{shrink:["",pe,ne,te]}],order:[{order:[Tt,"first","last","none",ne,te]}],"grid-cols":[{"grid-cols":B()}],"col-start-end":[{col:L()}],"col-start":[{"col-start":q()}],"col-end":[{"col-end":q()}],"grid-rows":[{"grid-rows":B()}],"row-start-end":[{row:L()}],"row-start":[{"row-start":q()}],"row-end":[{"row-end":q()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":A()}],"auto-rows":[{"auto-rows":A()}],gap:[{gap:E()}],"gap-x":[{"gap-x":E()}],"gap-y":[{"gap-y":E()}],"justify-content":[{justify:[...T(),"normal"]}],"justify-items":[{"justify-items":[..._(),"normal"]}],"justify-self":[{"justify-self":["auto",..._()]}],"align-content":[{content:["normal",...T()]}],"align-items":[{items:[..._(),{baseline:["","last"]}]}],"align-self":[{self:["auto",..._(),{baseline:["","last"]}]}],"place-content":[{"place-content":T()}],"place-items":[{"place-items":[..._(),"baseline"]}],"place-self":[{"place-self":["auto",..._()]}],p:[{p:E()}],px:[{px:E()}],py:[{py:E()}],ps:[{ps:E()}],pe:[{pe:E()}],pt:[{pt:E()}],pr:[{pr:E()}],pb:[{pb:E()}],pl:[{pl:E()}],m:[{m:N()}],mx:[{mx:N()}],my:[{my:N()}],ms:[{ms:N()}],me:[{me:N()}],mt:[{mt:N()}],mr:[{mr:N()}],mb:[{mb:N()}],ml:[{ml:N()}],"space-x":[{"space-x":E()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":E()}],"space-y-reverse":["space-y-reverse"],size:[{size:I()}],w:[{w:[i,"screen",...I()]}],"min-w":[{"min-w":[i,"screen","none",...I()]}],"max-w":[{"max-w":[i,"screen","none","prose",{screen:[s]},...I()]}],h:[{h:["screen","lh",...I()]}],"min-h":[{"min-h":["screen","lh","none",...I()]}],"max-h":[{"max-h":["screen","lh",...I()]}],"font-size":[{text:["base",n,jn,Vt]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,ne,No]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",Eo,te]}],"font-family":[{font:[Ep,te,t]}],"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,ne,te]}],"line-clamp":[{"line-clamp":[pe,"none",ne,No]}],leading:[{leading:[a,...E()]}],"list-image":[{"list-image":["none",ne,te]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ne,te]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:k()}],"text-color":[{text:k()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...G(),"wavy"]}],"text-decoration-thickness":[{decoration:[pe,"from-font","auto",ne,Vt]}],"text-decoration-color":[{decoration:k()}],"underline-offset":[{"underline-offset":[pe,"auto",ne,te]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:E()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ne,te]}],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",ne,te]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:P()}],"bg-repeat":[{bg:H()}],"bg-size":[{bg:z()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Tt,ne,te],radial:["",ne,te],conic:[Tt,ne,te]},Rp,kp]}],"bg-color":[{bg:k()}],"gradient-from-pos":[{from:O()}],"gradient-via-pos":[{via:O()}],"gradient-to-pos":[{to:O()}],"gradient-from":[{from:k()}],"gradient-via":[{via:k()}],"gradient-to":[{to:k()}],rounded:[{rounded:j()}],"rounded-s":[{"rounded-s":j()}],"rounded-e":[{"rounded-e":j()}],"rounded-t":[{"rounded-t":j()}],"rounded-r":[{"rounded-r":j()}],"rounded-b":[{"rounded-b":j()}],"rounded-l":[{"rounded-l":j()}],"rounded-ss":[{"rounded-ss":j()}],"rounded-se":[{"rounded-se":j()}],"rounded-ee":[{"rounded-ee":j()}],"rounded-es":[{"rounded-es":j()}],"rounded-tl":[{"rounded-tl":j()}],"rounded-tr":[{"rounded-tr":j()}],"rounded-br":[{"rounded-br":j()}],"rounded-bl":[{"rounded-bl":j()}],"border-w":[{border:Y()}],"border-w-x":[{"border-x":Y()}],"border-w-y":[{"border-y":Y()}],"border-w-s":[{"border-s":Y()}],"border-w-e":[{"border-e":Y()}],"border-w-t":[{"border-t":Y()}],"border-w-r":[{"border-r":Y()}],"border-w-b":[{"border-b":Y()}],"border-w-l":[{"border-l":Y()}],"divide-x":[{"divide-x":Y()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":Y()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...G(),"hidden","none"]}],"divide-style":[{divide:[...G(),"hidden","none"]}],"border-color":[{border:k()}],"border-color-x":[{"border-x":k()}],"border-color-y":[{"border-y":k()}],"border-color-s":[{"border-s":k()}],"border-color-e":[{"border-e":k()}],"border-color-t":[{"border-t":k()}],"border-color-r":[{"border-r":k()}],"border-color-b":[{"border-b":k()}],"border-color-l":[{"border-l":k()}],"divide-color":[{divide:k()}],"outline-style":[{outline:[...G(),"none","hidden"]}],"outline-offset":[{"outline-offset":[pe,ne,te]}],"outline-w":[{outline:["",pe,jn,Vt]}],"outline-color":[{outline:k()}],shadow:[{shadow:["","none",m,xr,wr]}],"shadow-color":[{shadow:k()}],"inset-shadow":[{"inset-shadow":["none",c,xr,wr]}],"inset-shadow-color":[{"inset-shadow":k()}],"ring-w":[{ring:Y()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:k()}],"ring-offset-w":[{"ring-offset":[pe,Vt]}],"ring-offset-color":[{"ring-offset":k()}],"inset-ring-w":[{"inset-ring":Y()}],"inset-ring-color":[{"inset-ring":k()}],"text-shadow":[{"text-shadow":["none",p,xr,wr]}],"text-shadow-color":[{"text-shadow":k()}],opacity:[{opacity:[pe,ne,te]}],"mix-blend":[{"mix-blend":[...V(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":V()}],"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":[pe]}],"mask-image-linear-from-pos":[{"mask-linear-from":W()}],"mask-image-linear-to-pos":[{"mask-linear-to":W()}],"mask-image-linear-from-color":[{"mask-linear-from":k()}],"mask-image-linear-to-color":[{"mask-linear-to":k()}],"mask-image-t-from-pos":[{"mask-t-from":W()}],"mask-image-t-to-pos":[{"mask-t-to":W()}],"mask-image-t-from-color":[{"mask-t-from":k()}],"mask-image-t-to-color":[{"mask-t-to":k()}],"mask-image-r-from-pos":[{"mask-r-from":W()}],"mask-image-r-to-pos":[{"mask-r-to":W()}],"mask-image-r-from-color":[{"mask-r-from":k()}],"mask-image-r-to-color":[{"mask-r-to":k()}],"mask-image-b-from-pos":[{"mask-b-from":W()}],"mask-image-b-to-pos":[{"mask-b-to":W()}],"mask-image-b-from-color":[{"mask-b-from":k()}],"mask-image-b-to-color":[{"mask-b-to":k()}],"mask-image-l-from-pos":[{"mask-l-from":W()}],"mask-image-l-to-pos":[{"mask-l-to":W()}],"mask-image-l-from-color":[{"mask-l-from":k()}],"mask-image-l-to-color":[{"mask-l-to":k()}],"mask-image-x-from-pos":[{"mask-x-from":W()}],"mask-image-x-to-pos":[{"mask-x-to":W()}],"mask-image-x-from-color":[{"mask-x-from":k()}],"mask-image-x-to-color":[{"mask-x-to":k()}],"mask-image-y-from-pos":[{"mask-y-from":W()}],"mask-image-y-to-pos":[{"mask-y-to":W()}],"mask-image-y-from-color":[{"mask-y-from":k()}],"mask-image-y-to-color":[{"mask-y-to":k()}],"mask-image-radial":[{"mask-radial":[ne,te]}],"mask-image-radial-from-pos":[{"mask-radial-from":W()}],"mask-image-radial-to-pos":[{"mask-radial-to":W()}],"mask-image-radial-from-color":[{"mask-radial-from":k()}],"mask-image-radial-to-color":[{"mask-radial-to":k()}],"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":D()}],"mask-image-conic-pos":[{"mask-conic":[pe]}],"mask-image-conic-from-pos":[{"mask-conic-from":W()}],"mask-image-conic-to-pos":[{"mask-conic-to":W()}],"mask-image-conic-from-color":[{"mask-conic-from":k()}],"mask-image-conic-to-color":[{"mask-conic-to":k()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:P()}],"mask-repeat":[{mask:H()}],"mask-size":[{mask:z()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ne,te]}],filter:[{filter:["","none",ne,te]}],blur:[{blur:Z()}],brightness:[{brightness:[pe,ne,te]}],contrast:[{contrast:[pe,ne,te]}],"drop-shadow":[{"drop-shadow":["","none",h,xr,wr]}],"drop-shadow-color":[{"drop-shadow":k()}],grayscale:[{grayscale:["",pe,ne,te]}],"hue-rotate":[{"hue-rotate":[pe,ne,te]}],invert:[{invert:["",pe,ne,te]}],saturate:[{saturate:[pe,ne,te]}],sepia:[{sepia:["",pe,ne,te]}],"backdrop-filter":[{"backdrop-filter":["","none",ne,te]}],"backdrop-blur":[{"backdrop-blur":Z()}],"backdrop-brightness":[{"backdrop-brightness":[pe,ne,te]}],"backdrop-contrast":[{"backdrop-contrast":[pe,ne,te]}],"backdrop-grayscale":[{"backdrop-grayscale":["",pe,ne,te]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[pe,ne,te]}],"backdrop-invert":[{"backdrop-invert":["",pe,ne,te]}],"backdrop-opacity":[{"backdrop-opacity":[pe,ne,te]}],"backdrop-saturate":[{"backdrop-saturate":[pe,ne,te]}],"backdrop-sepia":[{"backdrop-sepia":["",pe,ne,te]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":E()}],"border-spacing-x":[{"border-spacing-x":E()}],"border-spacing-y":[{"border-spacing-y":E()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ne,te]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[pe,"initial",ne,te]}],ease:[{ease:["linear","initial",b,ne,te]}],delay:[{delay:[pe,ne,te]}],animate:[{animate:["none",w,ne,te]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[v,ne,te]}],"perspective-origin":[{"perspective-origin":C()}],rotate:[{rotate:X()}],"rotate-x":[{"rotate-x":X()}],"rotate-y":[{"rotate-y":X()}],"rotate-z":[{"rotate-z":X()}],scale:[{scale:Q()}],"scale-x":[{"scale-x":Q()}],"scale-y":[{"scale-y":Q()}],"scale-z":[{"scale-z":Q()}],"scale-3d":["scale-3d"],skew:[{skew:se()}],"skew-x":[{"skew-x":se()}],"skew-y":[{"skew-y":se()}],transform:[{transform:[ne,te,"","none","gpu","cpu"]}],"transform-origin":[{origin:C()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:ue()}],"translate-x":[{"translate-x":ue()}],"translate-y":[{"translate-y":ue()}],"translate-z":[{"translate-z":ue()}],"translate-none":["translate-none"],accent:[{accent:k()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:k()}],"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",ne,te]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":E()}],"scroll-mx":[{"scroll-mx":E()}],"scroll-my":[{"scroll-my":E()}],"scroll-ms":[{"scroll-ms":E()}],"scroll-me":[{"scroll-me":E()}],"scroll-mt":[{"scroll-mt":E()}],"scroll-mr":[{"scroll-mr":E()}],"scroll-mb":[{"scroll-mb":E()}],"scroll-ml":[{"scroll-ml":E()}],"scroll-p":[{"scroll-p":E()}],"scroll-px":[{"scroll-px":E()}],"scroll-py":[{"scroll-py":E()}],"scroll-ps":[{"scroll-ps":E()}],"scroll-pe":[{"scroll-pe":E()}],"scroll-pt":[{"scroll-pt":E()}],"scroll-pr":[{"scroll-pr":E()}],"scroll-pb":[{"scroll-pb":E()}],"scroll-pl":[{"scroll-pl":E()}],"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",ne,te]}],fill:[{fill:["none",...k()]}],"stroke-w":[{stroke:[pe,jn,Vt,No]}],stroke:[{stroke:["none",...k()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],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-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},Pp=mp(Op);function F(...e){return Pp(Wi(e))}const na=er("inline-flex items-center justify-center transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-black text-white hover:bg-black/90",outline:"border border-gray-300 bg-white text-gray-700 hover:bg-gray-100",ghost:"text-gray-700 hover:bg-gray-100",error:"bg-red-500 text-white hover:bg-red-600",success:"bg-green-500 text-white hover:bg-green-600",warning:"bg-yellow-500 text-white hover:bg-yellow-600",blue:"bg-blue-500 text-white hover:bg-blue-600",disabled:"bg-gray-200 text-gray-400 cursor-not-allowed hover:bg-gray-200",brandBlue:"bg-brandBlue text-white hover:bg-brandBlue/90",primary:"bg-primary text-white hover:bg-primary/90"},size:{large:"rounded-xl text-base py-2.5 px-5 leading-snug font-semibold gap-2",medium:"rounded-xl text-sm py-2 px-4 leading-tight font-semibold gap-2",small:"rounded-full text-xs py-2 px-3 leading-4 font-semibold gap-1","icon.large":"rounded-[12px] p-2.5","icon.medium":"rounded-[10px] p-2","icon.small":"rounded-[14px] p-1.5"},iconSize:{large:"[&_svg]:w-6 [&_svg]:h-6",medium:"[&_svg]:w-5 [&_svg]:h-5",small:"[&_svg]:w-4 [&_svg]:h-4"},iconPosition:{left:"flex-row",right:"flex-row-reverse"},fullWidth:{true:"w-full",false:"w-auto"}},defaultVariants:{variant:"default",size:"medium",iconPosition:"left",fullWidth:!1}}),Zt=x.forwardRef(({className:e,variant:t,size:n,iconSize:r,iconPosition:o,fullWidth:a,asChild:s=!1,icon:i,iconOnly:l,children:u,...m},c)=>{const p=s?$i:"button";let h=n;if(l&&n)switch(n){case"large":h="icon.large";break;case"medium":h="icon.medium";break;case"small":h="icon.small";break}const y=r||(n==="large"?"large":n==="small"?"small":"medium");return d.jsxs(p,{className:F(na({variant:t,size:h,iconSize:y,iconPosition:o,fullWidth:a,className:e})),ref:c,...m,children:[i&&d.jsx("span",{"data-testid":"button-icon",children:i}),!l&&u]})});Zt.displayName="DoctButton";const Ap={h1:{fontSize:"56px",tag:"h1"},h2:{fontSize:"46px",tag:"h2"},h3:{fontSize:"36px",tag:"h3"},h4:{fontSize:"32px",tag:"h4"},h5:{fontSize:"28px",tag:"h5"},h6:{fontSize:"24px",tag:"h6"},h7:{fontSize:"20px",tag:"p"},h8:{fontSize:"18px",tag:"p"},title1:{fontSize:"22px",tag:"p"},title2:{fontSize:"18px",tag:"p"},title3:{fontSize:"14px",tag:"p"},title4:{fontSize:"12px",tag:"p"},body1:{fontSize:"16px",tag:"p"},body2:{fontSize:"14px",tag:"p"},body3:{fontSize:"12px",tag:"p"},body4:{fontSize:"10px",tag:"p"},textLabel1:{fontSize:"16px",tag:"span"},textLabel2:{fontSize:"14px",tag:"span"},textLabel3:{fontSize:"12px",tag:"span"},textLabel4:{fontSize:"11px",tag:"span"}},Ip={regular:"400",medium:"500",semiBold:"600",bold:"700",extraBold:"800",light:"300"},jp=({variant:e,weight:t="regular",children:n,color:r="#000",align:o="inherit",className:a=""})=>{const s=Ap[e]??{fontSize:"16px",tag:"p"},{fontSize:i,tag:l}=s;return d.jsx(l,{className:a,style:{fontSize:i,fontWeight:Ip[t]??"400",color:r,textAlign:o,margin:0},children:n})};function $p(){return d.jsx("div",{className:"flex flex-col items-center justify-center h-screen w-full bg-white",children:d.jsx("img",{src:"/logoAnimation.gif",alt:"Loading animation",className:"w-32 h-32 object-contain"})})}const Zi=f.forwardRef(({size:e=48,strokeWidth:t=4,className:n,colorClassName:r="text-current",...o},a)=>{const s=Math.max((e-t)/2,0),i=2*Math.PI*s;return d.jsxs("svg",{ref:a,width:e,height:e,viewBox:`0 0 ${e} ${e}`,className:F("animate-spin text-muted-foreground",n),role:"progressbar","aria-label":"Loading","aria-valuemin":0,"aria-valuemax":100,...o,children:[d.jsx("circle",{className:"opacity-25",cx:e/2,cy:e/2,r:s,stroke:"currentColor",strokeWidth:t,fill:"none"}),d.jsx("circle",{className:F(r),cx:e/2,cy:e/2,r:s,stroke:"currentColor",strokeWidth:t,strokeLinecap:"round",strokeDasharray:i,strokeDashoffset:i*.75,fill:"none"})]})});Zi.displayName="CircularProgress";const rn=f.forwardRef(({className:e,type:t,...n},r)=>d.jsx("input",{type:t,className:F("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder-gray-400 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:r,...n}));rn.displayName="Input";var Lp=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],ee=Lp.reduce((e,t)=>{const n=At(`Primitive.${t}`),r=f.forwardRef((o,a)=>{const{asChild:s,...i}=o,l=s?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),d.jsx(l,{...i,ref:a})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Qi(e,t){e&&Qr.flushSync(()=>e.dispatchEvent(t))}var Fp="Label",Ji=f.forwardRef((e,t)=>d.jsx(ee.label,{...e,ref:t,onMouseDown:n=>{var o;n.target.closest("button, input, select, textarea")||((o=e.onMouseDown)==null||o.call(e,n),!n.defaultPrevented&&n.detail>1&&n.preventDefault())}}));Ji.displayName=Fp;var ec=Ji;const Wp=er("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Lt=f.forwardRef(({className:e,...t},n)=>d.jsx(ec,{ref:n,className:F(Wp(),e),...t}));Lt.displayName=ec.displayName;const Qe=({label:e,placeholder:t,helperText:n,error:r,required:o,type:a="text",leftIcon:s,rightIcon:i,className:l,inputClassName:u,onChange:m,showCharCount:c,maxLength:p,value:h,disabled:y,fridged:v})=>{const[g,b]=x.useState((h==null?void 0:h.length)||0),w=C=>{m&&m(C),b(C.target.value.length)},S=c&&typeof p=="number",D=v||y;return d.jsxs("div",{className:F("space-y-1",l),children:[e&&d.jsxs(Lt,{className:"text-sm font-medium text-foreground",children:[e,o&&d.jsx("span",{className:"text-destructive ml-1",children:"*"})]}),d.jsxs("div",{className:"relative",children:[s&&d.jsx("div",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground",children:s}),i&&d.jsx("div",{className:"absolute right-3 top-1/2 -translate-y-1/2 text-muted-foreground",children:i}),d.jsx(rn,{type:a,placeholder:t,disabled:y,value:h,maxLength:p,onChange:w,className:F(s&&"pl-10",i&&"pr-10",r&&"border-destructive focus-visible:ring-destructive",D&&"cursor-not-allowed bg-muted text-muted-foreground opacity-70",u)}),S&&d.jsxs("span",{className:"absolute bottom-[-1.25rem] right-0 text-xs text-muted-foreground",children:[g," / ",p]})]}),(n||r)&&d.jsx("p",{className:F("text-xs",r?"text-destructive":"text-muted-foreground"),children:r||n})]})},Bp=({length:e=6,label:t,value:n,onChange:r,onComplete:o,className:a,error:s})=>{const i=x.useRef([]),l=(m,c)=>{var h;if(c.length>1)return;const p=[...n];p[m]=c,r(p),c&&m<e-1&&((h=i.current[m+1])==null||h.focus()),p.every(y=>y!=="")&&o&&o(p.join(""))},u=(m,c)=>{var p;c.key==="Backspace"&&!n[m]&&m>0&&((p=i.current[m-1])==null||p.focus())};return d.jsxs("div",{className:F("space-y-2",a),children:[t&&d.jsx(Lt,{className:"text-sm font-medium text-gray-700",children:t}),d.jsx("div",{className:"flex gap-2",children:n.map((m,c)=>d.jsx(rn,{ref:p=>i.current[c]=p,type:"text",inputMode:"numeric",maxLength:1,value:m,onChange:p=>l(c,p.target.value),onKeyDown:p=>u(c,p),className:F("w-12 h-12 text-center p-0 text-lg font-semibold",s&&"border-red-500 focus-visible:ring-red-500")},c))}),s&&d.jsx("p",{className:"text-xs text-red-500 mt-1",children:s})]})};/**
2
2
  * @license lucide-react v0.474.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.
5
5
  * See the LICENSE file in the root directory of this source tree.
6
- */const xp=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Yi=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();/**
6
+ */const Yp=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),tc=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();/**
7
7
  * @license lucide-react v0.474.0 - ISC
8
8
  *
9
9
  * This source code is licensed under the ISC license.
10
10
  * See the LICENSE file in the root directory of this source tree.
11
- */var Sp={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"};/**
11
+ */var Hp={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"};/**
12
12
  * @license lucide-react v0.474.0 - ISC
13
13
  *
14
14
  * This source code is licensed under the ISC license.
15
15
  * See the LICENSE file in the root directory of this source tree.
16
- */const Cp=b.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:a,iconNode:s,...i},l)=>b.createElement("svg",{ref:l,...Sp,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:Yi("lucide",o),...i},[...s.map(([u,m])=>b.createElement(u,m)),...Array.isArray(a)?a:[a]]));/**
16
+ */const zp=x.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:a,iconNode:s,...i},l)=>x.createElement("svg",{ref:l,...Hp,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:tc("lucide",o),...i},[...s.map(([u,m])=>x.createElement(u,m)),...Array.isArray(a)?a:[a]]));/**
17
17
  * @license lucide-react v0.474.0 - ISC
18
18
  *
19
19
  * This source code is licensed under the ISC license.
20
20
  * See the LICENSE file in the root directory of this source tree.
21
- */const Ae=(e,t)=>{const n=b.forwardRef(({className:r,...o},a)=>b.createElement(Cp,{ref:a,iconNode:t,className:Yi(`lucide-${xp(e)}`,r),...o}));return n.displayName=`${e}`,n};/**
21
+ */const je=(e,t)=>{const n=x.forwardRef(({className:r,...o},a)=>x.createElement(zp,{ref:a,iconNode:t,className:tc(`lucide-${Yp(e)}`,r),...o}));return n.displayName=`${e}`,n};/**
22
22
  * @license lucide-react v0.474.0 - ISC
23
23
  *
24
24
  * This source code is licensed under the ISC license.
25
25
  * See the LICENSE file in the root directory of this source tree.
26
- */const Mp=[["rect",{width:"16",height:"20",x:"4",y:"2",rx:"2",ry:"2",key:"76otgf"}],["path",{d:"M9 22v-4h6v4",key:"r93iot"}],["path",{d:"M8 6h.01",key:"1dz90k"}],["path",{d:"M16 6h.01",key:"1x0f13"}],["path",{d:"M12 6h.01",key:"1vi96p"}],["path",{d:"M12 10h.01",key:"1nrarc"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M16 10h.01",key:"1m94wz"}],["path",{d:"M16 14h.01",key:"1gbofw"}],["path",{d:"M8 10h.01",key:"19clt8"}],["path",{d:"M8 14h.01",key:"6423bh"}]],Ep=Ae("Building",Mp);/**
26
+ */const Gp=[["rect",{width:"16",height:"20",x:"4",y:"2",rx:"2",ry:"2",key:"76otgf"}],["path",{d:"M9 22v-4h6v4",key:"r93iot"}],["path",{d:"M8 6h.01",key:"1dz90k"}],["path",{d:"M16 6h.01",key:"1x0f13"}],["path",{d:"M12 6h.01",key:"1vi96p"}],["path",{d:"M12 10h.01",key:"1nrarc"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M16 10h.01",key:"1m94wz"}],["path",{d:"M16 14h.01",key:"1gbofw"}],["path",{d:"M8 10h.01",key:"19clt8"}],["path",{d:"M8 14h.01",key:"6423bh"}]],Up=je("Building",Gp);/**
27
27
  * @license lucide-react v0.474.0 - ISC
28
28
  *
29
29
  * This source code is licensed under the ISC license.
30
30
  * See the LICENSE file in the root directory of this source tree.
31
- */const kp=[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}],["path",{d:"M8 14h.01",key:"6423bh"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M16 14h.01",key:"1gbofw"}],["path",{d:"M8 18h.01",key:"lrp35t"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M16 18h.01",key:"kzsmim"}]],Np=Ae("CalendarDays",kp);/**
31
+ */const qp=[["path",{d:"M8 2v4",key:"1cmpym"}],["path",{d:"M16 2v4",key:"4m81vk"}],["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",key:"1hopcy"}],["path",{d:"M3 10h18",key:"8toen8"}],["path",{d:"M8 14h.01",key:"6423bh"}],["path",{d:"M12 14h.01",key:"1etili"}],["path",{d:"M16 14h.01",key:"1gbofw"}],["path",{d:"M8 18h.01",key:"lrp35t"}],["path",{d:"M12 18h.01",key:"mhygvu"}],["path",{d:"M16 18h.01",key:"kzsmim"}]],nc=je("CalendarDays",qp);/**
32
32
  * @license lucide-react v0.474.0 - ISC
33
33
  *
34
34
  * This source code is licensed under the ISC license.
35
35
  * See the LICENSE file in the root directory of this source tree.
36
- */const Dp=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Jn=Ae("Check",Dp);/**
36
+ */const Vp=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],tr=je("Check",Vp);/**
37
37
  * @license lucide-react v0.474.0 - ISC
38
38
  *
39
39
  * This source code is licensed under the ISC license.
40
40
  * See the LICENSE file in the root directory of this source tree.
41
- */const Rp=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Kr=Ae("ChevronDown",Rp);/**
41
+ */const Kp=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],nr=je("ChevronDown",Kp);/**
42
42
  * @license lucide-react v0.474.0 - ISC
43
43
  *
44
44
  * This source code is licensed under the ISC license.
45
45
  * See the LICENSE file in the root directory of this source tree.
46
- */const Tp=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],Op=Ae("ChevronLeft",Tp);/**
46
+ */const Xp=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],rc=je("ChevronLeft",Xp);/**
47
47
  * @license lucide-react v0.474.0 - ISC
48
48
  *
49
49
  * This source code is licensed under the ISC license.
50
50
  * See the LICENSE file in the root directory of this source tree.
51
- */const _p=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Hi=Ae("ChevronRight",_p);/**
51
+ */const Zp=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Ra=je("ChevronRight",Zp);/**
52
52
  * @license lucide-react v0.474.0 - ISC
53
53
  *
54
54
  * This source code is licensed under the ISC license.
55
55
  * See the LICENSE file in the root directory of this source tree.
56
- */const Pp=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],Ap=Ae("ChevronUp",Pp);/**
56
+ */const Qp=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],Jp=je("ChevronUp",Qp);/**
57
57
  * @license lucide-react v0.474.0 - ISC
58
58
  *
59
59
  * This source code is licensed under the ISC license.
60
60
  * See the LICENSE file in the root directory of this source tree.
61
- */const Ip=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],zi=Ae("Circle",Ip);/**
61
+ */const eh=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],oc=je("Circle",eh);/**
62
62
  * @license lucide-react v0.474.0 - ISC
63
63
  *
64
64
  * This source code is licensed under the ISC license.
65
65
  * See the LICENSE file in the root directory of this source tree.
66
- */const jp=[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],$p=Ae("EyeOff",jp);/**
66
+ */const th=[["path",{d:"M10.733 5.076a10.744 10.744 0 0 1 11.205 6.575 1 1 0 0 1 0 .696 10.747 10.747 0 0 1-1.444 2.49",key:"ct8e1f"}],["path",{d:"M14.084 14.158a3 3 0 0 1-4.242-4.242",key:"151rxh"}],["path",{d:"M17.479 17.499a10.75 10.75 0 0 1-15.417-5.151 1 1 0 0 1 0-.696 10.75 10.75 0 0 1 4.446-5.143",key:"13bj9a"}],["path",{d:"m2 2 20 20",key:"1ooewy"}]],nh=je("EyeOff",th);/**
67
67
  * @license lucide-react v0.474.0 - ISC
68
68
  *
69
69
  * This source code is licensed under the ISC license.
70
70
  * See the LICENSE file in the root directory of this source tree.
71
- */const Lp=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],Fp=Ae("Eye",Lp);/**
71
+ */const rh=[["path",{d:"M2.062 12.348a1 1 0 0 1 0-.696 10.75 10.75 0 0 1 19.876 0 1 1 0 0 1 0 .696 10.75 10.75 0 0 1-19.876 0",key:"1nclc0"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],oh=je("Eye",rh);/**
72
72
  * @license lucide-react v0.474.0 - ISC
73
73
  *
74
74
  * This source code is licensed under the ISC license.
75
75
  * See the LICENSE file in the root directory of this source tree.
76
- */const Wp=[["polygon",{points:"22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3",key:"1yg77f"}]],Bp=Ae("Filter",Wp);/**
76
+ */const ah=[["polygon",{points:"22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3",key:"1yg77f"}]],sh=je("Filter",ah);/**
77
77
  * @license lucide-react v0.474.0 - ISC
78
78
  *
79
79
  * This source code is licensed under the ISC license.
80
80
  * See the LICENSE file in the root directory of this source tree.
81
- */const Yp=[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}]],Gi=Ae("Mail",Yp);/**
81
+ */const ih=[["rect",{width:"20",height:"16",x:"2",y:"4",rx:"2",key:"18n3k1"}],["path",{d:"m22 7-8.97 5.7a1.94 1.94 0 0 1-2.06 0L2 7",key:"1ocrg3"}]],ac=je("Mail",ih);/**
82
82
  * @license lucide-react v0.474.0 - ISC
83
83
  *
84
84
  * This source code is licensed under the ISC license.
85
85
  * See the LICENSE file in the root directory of this source tree.
86
- */const Hp=[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]],zp=Ae("MapPin",Hp);/**
86
+ */const ch=[["path",{d:"M20 10c0 4.993-5.539 10.193-7.399 11.799a1 1 0 0 1-1.202 0C9.539 20.193 4 14.993 4 10a8 8 0 0 1 16 0",key:"1r0f0z"}],["circle",{cx:"12",cy:"10",r:"3",key:"ilqhr7"}]],lh=je("MapPin",ch);/**
87
87
  * @license lucide-react v0.474.0 - ISC
88
88
  *
89
89
  * This source code is licensed under the ISC license.
90
90
  * See the LICENSE file in the root directory of this source tree.
91
- */const Gp=[["path",{d:"M5 12h14",key:"1ays0h"}]],Up=Ae("Minus",Gp);/**
91
+ */const uh=[["path",{d:"M5 12h14",key:"1ays0h"}]],dh=je("Minus",uh);/**
92
92
  * @license lucide-react v0.474.0 - ISC
93
93
  *
94
94
  * This source code is licensed under the ISC license.
95
95
  * See the LICENSE file in the root directory of this source tree.
96
- */const qp=[["path",{d:"M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z",key:"foiqr5"}]],Vp=Ae("Phone",qp);/**
96
+ */const fh=[["path",{d:"M22 16.92v3a2 2 0 0 1-2.18 2 19.79 19.79 0 0 1-8.63-3.07 19.5 19.5 0 0 1-6-6 19.79 19.79 0 0 1-3.07-8.67A2 2 0 0 1 4.11 2h3a2 2 0 0 1 2 1.72 12.84 12.84 0 0 0 .7 2.81 2 2 0 0 1-.45 2.11L8.09 9.91a16 16 0 0 0 6 6l1.27-1.27a2 2 0 0 1 2.11-.45 12.84 12.84 0 0 0 2.81.7A2 2 0 0 1 22 16.92z",key:"foiqr5"}]],mh=je("Phone",fh);/**
97
97
  * @license lucide-react v0.474.0 - ISC
98
98
  *
99
99
  * This source code is licensed under the ISC license.
100
100
  * See the LICENSE file in the root directory of this source tree.
101
- */const Kp=[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]],Ui=Ae("Search",Kp);/**
101
+ */const ph=[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]],sc=je("Search",ph);/**
102
102
  * @license lucide-react v0.474.0 - ISC
103
103
  *
104
104
  * This source code is licensed under the ISC license.
105
105
  * See the LICENSE file in the root directory of this source tree.
106
- */const Xp=[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]],Zp=Ae("User",Xp);/**
106
+ */const hh=[["path",{d:"M19 21v-2a4 4 0 0 0-4-4H9a4 4 0 0 0-4 4v2",key:"975kel"}],["circle",{cx:"12",cy:"7",r:"4",key:"17ys0d"}]],gh=je("User",hh);/**
107
107
  * @license lucide-react v0.474.0 - ISC
108
108
  *
109
109
  * This source code is licensed under the ISC license.
110
110
  * See the LICENSE file in the root directory of this source tree.
111
- */const Qp=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],En=Ae("X",Qp);function Qo({label:e,placeholder:t="Enter password",helperText:n,error:r,required:o,className:a,showPassword:s=!1,onShowPasswordChange:i,value:l,onChange:u}){return d.jsxs("div",{className:q("space-y-1",a),children:[e&&d.jsxs(en,{className:"text-sm font-medium text-gray-700",children:[e,o&&d.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),d.jsxs("div",{className:"relative",children:[d.jsx(Mn,{type:s?"text":"password",placeholder:t,className:q("pr-10",r&&"border-red-500 focus-visible:ring-red-500"),value:l,onChange:m=>u==null?void 0:u(m.target.value)}),d.jsx("div",{className:"absolute right-3 top-1/2 -translate-y-1/2 text-muted-foreground cursor-pointer",onClick:()=>i==null?void 0:i(!s),"aria-label":s?"Hide password":"Show password",children:s?d.jsx($p,{className:"h-4 w-4 text-gray-400 hover:text-gray-500"}):d.jsx(Fp,{className:"h-4 w-4 text-gray-400 hover:text-gray-500"})})]}),r&&d.jsx("p",{className:"text-xs text-red-500",children:r}),n&&!r&&d.jsx("p",{className:"text-xs text-gray-500",children:n})]})}const qi=f.forwardRef(({className:e,...t},n)=>d.jsx("textarea",{className:q("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:n,...t}));qi.displayName="Textarea";const Vi=({label:e,placeholder:t="Write here...",helperText:n,error:r,required:o,rows:a=4,className:s,onChange:i})=>d.jsxs("div",{className:q("space-y-1",s),children:[e&&d.jsxs(en,{className:"text-sm font-medium text-foreground",children:[e,o&&d.jsx("span",{className:"text-destructive ml-1",children:"*"})]}),d.jsx(qi,{placeholder:t,rows:a,className:q("resize-none",r&&"border-destructive focus-visible:ring-destructive"),onChange:i}),(n||r)&&d.jsx("p",{className:q("text-xs",r?"text-destructive":"text-muted-foreground"),children:r||n})]});function K(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function Jp(e,t){const n=f.createContext(t),r=a=>{const{children:s,...i}=a,l=f.useMemo(()=>i,Object.values(i));return d.jsx(n.Provider,{value:l,children:s})};r.displayName=e+"Provider";function o(a){const s=f.useContext(n);if(s)return s;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return[r,o]}function Ye(e,t=[]){let n=[];function r(a,s){const i=f.createContext(s),l=n.length;n=[...n,s];const u=c=>{var w;const{scope:p,children:h,...y}=c,g=((w=p==null?void 0:p[e])==null?void 0:w[l])||i,v=f.useMemo(()=>y,Object.values(y));return d.jsx(g.Provider,{value:v,children:h})};u.displayName=a+"Provider";function m(c,p){var g;const h=((g=p==null?void 0:p[e])==null?void 0:g[l])||i,y=f.useContext(h);if(y)return y;if(s!==void 0)return s;throw new Error(`\`${c}\` must be used within \`${a}\``)}return[u,m]}const o=()=>{const a=n.map(s=>f.createContext(s));return function(i){const l=(i==null?void 0:i[e])||a;return f.useMemo(()=>({[`__scope${e}`]:{...i,[e]:l}}),[i,l])}};return o.scopeName=e,[r,eh(o,...t)]}function eh(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(a){const s=r.reduce((i,{useScope:l,scopeName:u})=>{const c=l(a)[`__scope${u}`];return{...i,...c}},{});return f.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}function et(e){const t=f.useRef(e);return f.useEffect(()=>{t.current=e}),f.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function th(e,t=globalThis==null?void 0:globalThis.document){const n=et(e);f.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var nh="DismissableLayer",Jo="dismissableLayer.update",rh="dismissableLayer.pointerDownOutside",oh="dismissableLayer.focusOutside",Es,Ki=f.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),kn=f.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:s,onDismiss:i,...l}=e,u=f.useContext(Ki),[m,c]=f.useState(null),p=(m==null?void 0:m.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,h]=f.useState({}),y=he(t,M=>c(M)),g=Array.from(u.layers),[v]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),w=g.indexOf(v),x=m?g.indexOf(m):-1,S=u.layersWithOutsidePointerEventsDisabled.size>0,k=x>=w,C=ih(M=>{const D=M.target,L=[...u.branches].some(B=>B.contains(D));!k||L||(o==null||o(M),s==null||s(M),M.defaultPrevented||i==null||i())},p),N=ch(M=>{const D=M.target;[...u.branches].some(B=>B.contains(D))||(a==null||a(M),s==null||s(M),M.defaultPrevented||i==null||i())},p);return th(M=>{x===u.layers.size-1&&(r==null||r(M),!M.defaultPrevented&&i&&(M.preventDefault(),i()))},p),f.useEffect(()=>{if(m)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(Es=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(m)),u.layers.add(m),ks(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=Es)}},[m,p,n,u]),f.useEffect(()=>()=>{m&&(u.layers.delete(m),u.layersWithOutsidePointerEventsDisabled.delete(m),ks())},[m,u]),f.useEffect(()=>{const M=()=>h({});return document.addEventListener(Jo,M),()=>document.removeEventListener(Jo,M)},[]),d.jsx(te.div,{...l,ref:y,style:{pointerEvents:S?k?"auto":"none":void 0,...e.style},onFocusCapture:K(e.onFocusCapture,N.onFocusCapture),onBlurCapture:K(e.onBlurCapture,N.onBlurCapture),onPointerDownCapture:K(e.onPointerDownCapture,C.onPointerDownCapture)})});kn.displayName=nh;var ah="DismissableLayerBranch",sh=f.forwardRef((e,t)=>{const n=f.useContext(Ki),r=f.useRef(null),o=he(t,r);return f.useEffect(()=>{const a=r.current;if(a)return n.branches.add(a),()=>{n.branches.delete(a)}},[n.branches]),d.jsx(te.div,{...e,ref:o})});sh.displayName=ah;function ih(e,t=globalThis==null?void 0:globalThis.document){const n=et(e),r=f.useRef(!1),o=f.useRef(()=>{});return f.useEffect(()=>{const a=i=>{if(i.target&&!r.current){let l=function(){Xi(rh,n,u,{discrete:!0})};const u={originalEvent:i};i.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=l,t.addEventListener("click",o.current,{once:!0})):l()}else t.removeEventListener("click",o.current);r.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",a),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function ch(e,t=globalThis==null?void 0:globalThis.document){const n=et(e),r=f.useRef(!1);return f.useEffect(()=>{const o=a=>{a.target&&!r.current&&Xi(oh,n,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function ks(){const e=new CustomEvent(Jo);document.dispatchEvent(e)}function Xi(e,t,n,{discrete:r}){const o=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?Fi(o,a):o.dispatchEvent(a)}var Eo=0;function Xr(){f.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Ns()),document.body.insertAdjacentElement("beforeend",e[1]??Ns()),Eo++,()=>{Eo===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Eo--}},[])}function Ns(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var ko="focusScope.autoFocusOnMount",No="focusScope.autoFocusOnUnmount",Ds={bubbles:!1,cancelable:!0},lh="FocusScope",er=f.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:a,...s}=e,[i,l]=f.useState(null),u=et(o),m=et(a),c=f.useRef(null),p=he(t,g=>l(g)),h=f.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;f.useEffect(()=>{if(r){let g=function(S){if(h.paused||!i)return;const k=S.target;i.contains(k)?c.current=k:Ot(c.current,{select:!0})},v=function(S){if(h.paused||!i)return;const k=S.relatedTarget;k!==null&&(i.contains(k)||Ot(c.current,{select:!0}))},w=function(S){if(document.activeElement===document.body)for(const C of S)C.removedNodes.length>0&&Ot(i)};document.addEventListener("focusin",g),document.addEventListener("focusout",v);const x=new MutationObserver(w);return i&&x.observe(i,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",g),document.removeEventListener("focusout",v),x.disconnect()}}},[r,i,h.paused]),f.useEffect(()=>{if(i){Ts.add(h);const g=document.activeElement;if(!i.contains(g)){const w=new CustomEvent(ko,Ds);i.addEventListener(ko,u),i.dispatchEvent(w),w.defaultPrevented||(uh(hh(Zi(i)),{select:!0}),document.activeElement===g&&Ot(i))}return()=>{i.removeEventListener(ko,u),setTimeout(()=>{const w=new CustomEvent(No,Ds);i.addEventListener(No,m),i.dispatchEvent(w),w.defaultPrevented||Ot(g??document.body,{select:!0}),i.removeEventListener(No,m),Ts.remove(h)},0)}}},[i,u,m,h]);const y=f.useCallback(g=>{if(!n&&!r||h.paused)return;const v=g.key==="Tab"&&!g.altKey&&!g.ctrlKey&&!g.metaKey,w=document.activeElement;if(v&&w){const x=g.currentTarget,[S,k]=dh(x);S&&k?!g.shiftKey&&w===k?(g.preventDefault(),n&&Ot(S,{select:!0})):g.shiftKey&&w===S&&(g.preventDefault(),n&&Ot(k,{select:!0})):w===x&&g.preventDefault()}},[n,r,h.paused]);return d.jsx(te.div,{tabIndex:-1,...s,ref:p,onKeyDown:y})});er.displayName=lh;function uh(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Ot(r,{select:t}),document.activeElement!==n)return}function dh(e){const t=Zi(e),n=Rs(t,e),r=Rs(t.reverse(),e);return[n,r]}function Zi(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Rs(e,t){for(const n of e)if(!fh(n,{upTo:t}))return n}function fh(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function mh(e){return e instanceof HTMLInputElement&&"select"in e}function Ot(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&mh(e)&&t&&e.select()}}var Ts=ph();function ph(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=Os(e,t),e.unshift(t)},remove(t){var n;e=Os(e,t),(n=e[0])==null||n.resume()}}}function Os(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function hh(e){return e.filter(t=>t.tagName!=="A")}var De=globalThis!=null&&globalThis.document?f.useLayoutEffect:()=>{},gh=f[" useId ".trim().toString()]||(()=>{}),vh=0;function ke(e){const[t,n]=f.useState(gh());return De(()=>{n(r=>r??String(vh++))},[e]),e||(t?`radix-${t}`:"")}const yh=["top","right","bottom","left"],At=Math.min,Xe=Math.max,Ir=Math.round,br=Math.floor,ht=e=>({x:e,y:e}),bh={left:"right",right:"left",bottom:"top",top:"bottom"},wh={start:"end",end:"start"};function ea(e,t,n){return Xe(e,At(t,n))}function Mt(e,t){return typeof e=="function"?e(t):e}function Et(e){return e.split("-")[0]}function Nn(e){return e.split("-")[1]}function Ea(e){return e==="x"?"y":"x"}function ka(e){return e==="y"?"height":"width"}const xh=new Set(["top","bottom"]);function mt(e){return xh.has(Et(e))?"y":"x"}function Na(e){return Ea(mt(e))}function Sh(e,t,n){n===void 0&&(n=!1);const r=Nn(e),o=Na(e),a=ka(o);let s=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(s=jr(s)),[s,jr(s)]}function Ch(e){const t=jr(e);return[ta(e),t,ta(t)]}function ta(e){return e.replace(/start|end/g,t=>wh[t])}const _s=["left","right"],Ps=["right","left"],Mh=["top","bottom"],Eh=["bottom","top"];function kh(e,t,n){switch(e){case"top":case"bottom":return n?t?Ps:_s:t?_s:Ps;case"left":case"right":return t?Mh:Eh;default:return[]}}function Nh(e,t,n,r){const o=Nn(e);let a=kh(Et(e),n==="start",r);return o&&(a=a.map(s=>s+"-"+o),t&&(a=a.concat(a.map(ta)))),a}function jr(e){return e.replace(/left|right|bottom|top/g,t=>bh[t])}function Dh(e){return{top:0,right:0,bottom:0,left:0,...e}}function Qi(e){return typeof e!="number"?Dh(e):{top:e,right:e,bottom:e,left:e}}function $r(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function As(e,t,n){let{reference:r,floating:o}=e;const a=mt(t),s=Na(t),i=ka(s),l=Et(t),u=a==="y",m=r.x+r.width/2-o.width/2,c=r.y+r.height/2-o.height/2,p=r[i]/2-o[i]/2;let h;switch(l){case"top":h={x:m,y:r.y-o.height};break;case"bottom":h={x:m,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:c};break;case"left":h={x:r.x-o.width,y:c};break;default:h={x:r.x,y:r.y}}switch(Nn(t)){case"start":h[s]-=p*(n&&u?-1:1);break;case"end":h[s]+=p*(n&&u?-1:1);break}return h}const Rh=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:a=[],platform:s}=n,i=a.filter(Boolean),l=await(s.isRTL==null?void 0:s.isRTL(t));let u=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:m,y:c}=As(u,r,l),p=r,h={},y=0;for(let g=0;g<i.length;g++){const{name:v,fn:w}=i[g],{x,y:S,data:k,reset:C}=await w({x:m,y:c,initialPlacement:r,placement:p,strategy:o,middlewareData:h,rects:u,platform:s,elements:{reference:e,floating:t}});m=x??m,c=S??c,h={...h,[v]:{...h[v],...k}},C&&y<=50&&(y++,typeof C=="object"&&(C.placement&&(p=C.placement),C.rects&&(u=C.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:o}):C.rects),{x:m,y:c}=As(u,p,l)),g=-1)}return{x:m,y:c,placement:p,strategy:o,middlewareData:h}};async function Un(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:a,rects:s,elements:i,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:m="viewport",elementContext:c="floating",altBoundary:p=!1,padding:h=0}=Mt(t,e),y=Qi(h),v=i[p?c==="floating"?"reference":"floating":c],w=$r(await a.getClippingRect({element:(n=await(a.isElement==null?void 0:a.isElement(v)))==null||n?v:v.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(i.floating)),boundary:u,rootBoundary:m,strategy:l})),x=c==="floating"?{x:r,y:o,width:s.floating.width,height:s.floating.height}:s.reference,S=await(a.getOffsetParent==null?void 0:a.getOffsetParent(i.floating)),k=await(a.isElement==null?void 0:a.isElement(S))?await(a.getScale==null?void 0:a.getScale(S))||{x:1,y:1}:{x:1,y:1},C=$r(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:i,rect:x,offsetParent:S,strategy:l}):x);return{top:(w.top-C.top+y.top)/k.y,bottom:(C.bottom-w.bottom+y.bottom)/k.y,left:(w.left-C.left+y.left)/k.x,right:(C.right-w.right+y.right)/k.x}}const Th=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:a,platform:s,elements:i,middlewareData:l}=t,{element:u,padding:m=0}=Mt(e,t)||{};if(u==null)return{};const c=Qi(m),p={x:n,y:r},h=Na(o),y=ka(h),g=await s.getDimensions(u),v=h==="y",w=v?"top":"left",x=v?"bottom":"right",S=v?"clientHeight":"clientWidth",k=a.reference[y]+a.reference[h]-p[h]-a.floating[y],C=p[h]-a.reference[h],N=await(s.getOffsetParent==null?void 0:s.getOffsetParent(u));let M=N?N[S]:0;(!M||!await(s.isElement==null?void 0:s.isElement(N)))&&(M=i.floating[S]||a.floating[y]);const D=k/2-C/2,L=M/2-g[y]/2-1,B=At(c[w],L),F=At(c[x],L),V=B,$=M-g[y]-F,I=M/2-g[y]/2+D,_=ea(V,I,$),R=!l.arrow&&Nn(o)!=null&&I!==_&&a.reference[y]/2-(I<V?B:F)-g[y]/2<0,P=R?I<V?I-V:I-$:0;return{[h]:p[h]+P,data:{[h]:_,centerOffset:I-_-P,...R&&{alignmentOffset:P}},reset:R}}}),Oh=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:a,rects:s,initialPlacement:i,platform:l,elements:u}=t,{mainAxis:m=!0,crossAxis:c=!0,fallbackPlacements:p,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:y="none",flipAlignment:g=!0,...v}=Mt(e,t);if((n=a.arrow)!=null&&n.alignmentOffset)return{};const w=Et(o),x=mt(i),S=Et(i)===i,k=await(l.isRTL==null?void 0:l.isRTL(u.floating)),C=p||(S||!g?[jr(i)]:Ch(i)),N=y!=="none";!p&&N&&C.push(...Nh(i,g,y,k));const M=[i,...C],D=await Un(t,v),L=[];let B=((r=a.flip)==null?void 0:r.overflows)||[];if(m&&L.push(D[w]),c){const I=Sh(o,s,k);L.push(D[I[0]],D[I[1]])}if(B=[...B,{placement:o,overflows:L}],!L.every(I=>I<=0)){var F,V;const I=(((F=a.flip)==null?void 0:F.index)||0)+1,_=M[I];if(_&&(!(c==="alignment"?x!==mt(_):!1)||B.every(E=>E.overflows[0]>0&&mt(E.placement)===x)))return{data:{index:I,overflows:B},reset:{placement:_}};let R=(V=B.filter(P=>P.overflows[0]<=0).sort((P,E)=>P.overflows[1]-E.overflows[1])[0])==null?void 0:V.placement;if(!R)switch(h){case"bestFit":{var $;const P=($=B.filter(E=>{if(N){const O=mt(E.placement);return O===x||O==="y"}return!0}).map(E=>[E.placement,E.overflows.filter(O=>O>0).reduce((O,Y)=>O+Y,0)]).sort((E,O)=>E[1]-O[1])[0])==null?void 0:$[0];P&&(R=P);break}case"initialPlacement":R=i;break}if(o!==R)return{reset:{placement:R}}}return{}}}};function Is(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function js(e){return yh.some(t=>e[t]>=0)}const _h=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=Mt(e,t);switch(r){case"referenceHidden":{const a=await Un(t,{...o,elementContext:"reference"}),s=Is(a,n.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:js(s)}}}case"escaped":{const a=await Un(t,{...o,altBoundary:!0}),s=Is(a,n.floating);return{data:{escapedOffsets:s,escaped:js(s)}}}default:return{}}}}},Ji=new Set(["left","top"]);async function Ph(e,t){const{placement:n,platform:r,elements:o}=e,a=await(r.isRTL==null?void 0:r.isRTL(o.floating)),s=Et(n),i=Nn(n),l=mt(n)==="y",u=Ji.has(s)?-1:1,m=a&&l?-1:1,c=Mt(t,e);let{mainAxis:p,crossAxis:h,alignmentAxis:y}=typeof c=="number"?{mainAxis:c,crossAxis:0,alignmentAxis:null}:{mainAxis:c.mainAxis||0,crossAxis:c.crossAxis||0,alignmentAxis:c.alignmentAxis};return i&&typeof y=="number"&&(h=i==="end"?y*-1:y),l?{x:h*m,y:p*u}:{x:p*u,y:h*m}}const Ah=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:a,placement:s,middlewareData:i}=t,l=await Ph(t,e);return s===((n=i.offset)==null?void 0:n.placement)&&(r=i.arrow)!=null&&r.alignmentOffset?{}:{x:o+l.x,y:a+l.y,data:{...l,placement:s}}}}},Ih=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:a=!0,crossAxis:s=!1,limiter:i={fn:v=>{let{x:w,y:x}=v;return{x:w,y:x}}},...l}=Mt(e,t),u={x:n,y:r},m=await Un(t,l),c=mt(Et(o)),p=Ea(c);let h=u[p],y=u[c];if(a){const v=p==="y"?"top":"left",w=p==="y"?"bottom":"right",x=h+m[v],S=h-m[w];h=ea(x,h,S)}if(s){const v=c==="y"?"top":"left",w=c==="y"?"bottom":"right",x=y+m[v],S=y-m[w];y=ea(x,y,S)}const g=i.fn({...t,[p]:h,[c]:y});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[p]:a,[c]:s}}}}}},jh=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:a,middlewareData:s}=t,{offset:i=0,mainAxis:l=!0,crossAxis:u=!0}=Mt(e,t),m={x:n,y:r},c=mt(o),p=Ea(c);let h=m[p],y=m[c];const g=Mt(i,t),v=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(l){const S=p==="y"?"height":"width",k=a.reference[p]-a.floating[S]+v.mainAxis,C=a.reference[p]+a.reference[S]-v.mainAxis;h<k?h=k:h>C&&(h=C)}if(u){var w,x;const S=p==="y"?"width":"height",k=Ji.has(Et(o)),C=a.reference[c]-a.floating[S]+(k&&((w=s.offset)==null?void 0:w[c])||0)+(k?0:v.crossAxis),N=a.reference[c]+a.reference[S]+(k?0:((x=s.offset)==null?void 0:x[c])||0)-(k?v.crossAxis:0);y<C?y=C:y>N&&(y=N)}return{[p]:h,[c]:y}}}},$h=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:a,platform:s,elements:i}=t,{apply:l=()=>{},...u}=Mt(e,t),m=await Un(t,u),c=Et(o),p=Nn(o),h=mt(o)==="y",{width:y,height:g}=a.floating;let v,w;c==="top"||c==="bottom"?(v=c,w=p===(await(s.isRTL==null?void 0:s.isRTL(i.floating))?"start":"end")?"left":"right"):(w=c,v=p==="end"?"top":"bottom");const x=g-m.top-m.bottom,S=y-m.left-m.right,k=At(g-m[v],x),C=At(y-m[w],S),N=!t.middlewareData.shift;let M=k,D=C;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(D=S),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(M=x),N&&!p){const B=Xe(m.left,0),F=Xe(m.right,0),V=Xe(m.top,0),$=Xe(m.bottom,0);h?D=y-2*(B!==0||F!==0?B+F:Xe(m.left,m.right)):M=g-2*(V!==0||$!==0?V+$:Xe(m.top,m.bottom))}await l({...t,availableWidth:D,availableHeight:M});const L=await s.getDimensions(i.floating);return y!==L.width||g!==L.height?{reset:{rects:!0}}:{}}}};function Zr(){return typeof window<"u"}function Dn(e){return ec(e)?(e.nodeName||"").toLowerCase():"#document"}function Ze(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function vt(e){var t;return(t=(ec(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function ec(e){return Zr()?e instanceof Node||e instanceof Ze(e).Node:!1}function st(e){return Zr()?e instanceof Element||e instanceof Ze(e).Element:!1}function gt(e){return Zr()?e instanceof HTMLElement||e instanceof Ze(e).HTMLElement:!1}function $s(e){return!Zr()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Ze(e).ShadowRoot}const Lh=new Set(["inline","contents"]);function tr(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=it(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!Lh.has(o)}const Fh=new Set(["table","td","th"]);function Wh(e){return Fh.has(Dn(e))}const Bh=[":popover-open",":modal"];function Qr(e){return Bh.some(t=>{try{return e.matches(t)}catch{return!1}})}const Yh=["transform","translate","scale","rotate","perspective"],Hh=["transform","translate","scale","rotate","perspective","filter"],zh=["paint","layout","strict","content"];function Da(e){const t=Ra(),n=st(e)?it(e):e;return Yh.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||Hh.some(r=>(n.willChange||"").includes(r))||zh.some(r=>(n.contain||"").includes(r))}function Gh(e){let t=It(e);for(;gt(t)&&!vn(t);){if(Da(t))return t;if(Qr(t))return null;t=It(t)}return null}function Ra(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Uh=new Set(["html","body","#document"]);function vn(e){return Uh.has(Dn(e))}function it(e){return Ze(e).getComputedStyle(e)}function Jr(e){return st(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function It(e){if(Dn(e)==="html")return e;const t=e.assignedSlot||e.parentNode||$s(e)&&e.host||vt(e);return $s(t)?t.host:t}function tc(e){const t=It(e);return vn(t)?e.ownerDocument?e.ownerDocument.body:e.body:gt(t)&&tr(t)?t:tc(t)}function qn(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=tc(e),a=o===((r=e.ownerDocument)==null?void 0:r.body),s=Ze(o);if(a){const i=na(s);return t.concat(s,s.visualViewport||[],tr(o)?o:[],i&&n?qn(i):[])}return t.concat(o,qn(o,[],n))}function na(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function nc(e){const t=it(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=gt(e),a=o?e.offsetWidth:n,s=o?e.offsetHeight:r,i=Ir(n)!==a||Ir(r)!==s;return i&&(n=a,r=s),{width:n,height:r,$:i}}function Ta(e){return st(e)?e:e.contextElement}function pn(e){const t=Ta(e);if(!gt(t))return ht(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:a}=nc(t);let s=(a?Ir(n.width):n.width)/r,i=(a?Ir(n.height):n.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!i||!Number.isFinite(i))&&(i=1),{x:s,y:i}}const qh=ht(0);function rc(e){const t=Ze(e);return!Ra()||!t.visualViewport?qh:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Vh(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Ze(e)?!1:t}function Kt(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),a=Ta(e);let s=ht(1);t&&(r?st(r)&&(s=pn(r)):s=pn(e));const i=Vh(a,n,r)?rc(a):ht(0);let l=(o.left+i.x)/s.x,u=(o.top+i.y)/s.y,m=o.width/s.x,c=o.height/s.y;if(a){const p=Ze(a),h=r&&st(r)?Ze(r):r;let y=p,g=na(y);for(;g&&r&&h!==y;){const v=pn(g),w=g.getBoundingClientRect(),x=it(g),S=w.left+(g.clientLeft+parseFloat(x.paddingLeft))*v.x,k=w.top+(g.clientTop+parseFloat(x.paddingTop))*v.y;l*=v.x,u*=v.y,m*=v.x,c*=v.y,l+=S,u+=k,y=Ze(g),g=na(y)}}return $r({width:m,height:c,x:l,y:u})}function Oa(e,t){const n=Jr(e).scrollLeft;return t?t.left+n:Kt(vt(e)).left+n}function oc(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),o=r.left+t.scrollLeft-(n?0:Oa(e,r)),a=r.top+t.scrollTop;return{x:o,y:a}}function Kh(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const a=o==="fixed",s=vt(r),i=t?Qr(t.floating):!1;if(r===s||i&&a)return n;let l={scrollLeft:0,scrollTop:0},u=ht(1);const m=ht(0),c=gt(r);if((c||!c&&!a)&&((Dn(r)!=="body"||tr(s))&&(l=Jr(r)),gt(r))){const h=Kt(r);u=pn(r),m.x=h.x+r.clientLeft,m.y=h.y+r.clientTop}const p=s&&!c&&!a?oc(s,l,!0):ht(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+m.x+p.x,y:n.y*u.y-l.scrollTop*u.y+m.y+p.y}}function Xh(e){return Array.from(e.getClientRects())}function Zh(e){const t=vt(e),n=Jr(e),r=e.ownerDocument.body,o=Xe(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=Xe(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+Oa(e);const i=-n.scrollTop;return it(r).direction==="rtl"&&(s+=Xe(t.clientWidth,r.clientWidth)-o),{width:o,height:a,x:s,y:i}}function Qh(e,t){const n=Ze(e),r=vt(e),o=n.visualViewport;let a=r.clientWidth,s=r.clientHeight,i=0,l=0;if(o){a=o.width,s=o.height;const u=Ra();(!u||u&&t==="fixed")&&(i=o.offsetLeft,l=o.offsetTop)}return{width:a,height:s,x:i,y:l}}const Jh=new Set(["absolute","fixed"]);function eg(e,t){const n=Kt(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,a=gt(e)?pn(e):ht(1),s=e.clientWidth*a.x,i=e.clientHeight*a.y,l=o*a.x,u=r*a.y;return{width:s,height:i,x:l,y:u}}function Ls(e,t,n){let r;if(t==="viewport")r=Qh(e,n);else if(t==="document")r=Zh(vt(e));else if(st(t))r=eg(t,n);else{const o=rc(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return $r(r)}function ac(e,t){const n=It(e);return n===t||!st(n)||vn(n)?!1:it(n).position==="fixed"||ac(n,t)}function tg(e,t){const n=t.get(e);if(n)return n;let r=qn(e,[],!1).filter(i=>st(i)&&Dn(i)!=="body"),o=null;const a=it(e).position==="fixed";let s=a?It(e):e;for(;st(s)&&!vn(s);){const i=it(s),l=Da(s);!l&&i.position==="fixed"&&(o=null),(a?!l&&!o:!l&&i.position==="static"&&!!o&&Jh.has(o.position)||tr(s)&&!l&&ac(e,s))?r=r.filter(m=>m!==s):o=i,s=It(s)}return t.set(e,r),r}function ng(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const s=[...n==="clippingAncestors"?Qr(t)?[]:tg(t,this._c):[].concat(n),r],i=s[0],l=s.reduce((u,m)=>{const c=Ls(t,m,o);return u.top=Xe(c.top,u.top),u.right=At(c.right,u.right),u.bottom=At(c.bottom,u.bottom),u.left=Xe(c.left,u.left),u},Ls(t,i,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function rg(e){const{width:t,height:n}=nc(e);return{width:t,height:n}}function og(e,t,n){const r=gt(t),o=vt(t),a=n==="fixed",s=Kt(e,!0,a,t);let i={scrollLeft:0,scrollTop:0};const l=ht(0);function u(){l.x=Oa(o)}if(r||!r&&!a)if((Dn(t)!=="body"||tr(o))&&(i=Jr(t)),r){const h=Kt(t,!0,a,t);l.x=h.x+t.clientLeft,l.y=h.y+t.clientTop}else o&&u();a&&!r&&o&&u();const m=o&&!r&&!a?oc(o,i):ht(0),c=s.left+i.scrollLeft-l.x-m.x,p=s.top+i.scrollTop-l.y-m.y;return{x:c,y:p,width:s.width,height:s.height}}function Do(e){return it(e).position==="static"}function Fs(e,t){if(!gt(e)||it(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return vt(e)===n&&(n=n.ownerDocument.body),n}function sc(e,t){const n=Ze(e);if(Qr(e))return n;if(!gt(e)){let o=It(e);for(;o&&!vn(o);){if(st(o)&&!Do(o))return o;o=It(o)}return n}let r=Fs(e,t);for(;r&&Wh(r)&&Do(r);)r=Fs(r,t);return r&&vn(r)&&Do(r)&&!Da(r)?n:r||Gh(e)||n}const ag=async function(e){const t=this.getOffsetParent||sc,n=this.getDimensions,r=await n(e.floating);return{reference:og(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function sg(e){return it(e).direction==="rtl"}const ig={convertOffsetParentRelativeRectToViewportRelativeRect:Kh,getDocumentElement:vt,getClippingRect:ng,getOffsetParent:sc,getElementRects:ag,getClientRects:Xh,getDimensions:rg,getScale:pn,isElement:st,isRTL:sg};function ic(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function cg(e,t){let n=null,r;const o=vt(e);function a(){var i;clearTimeout(r),(i=n)==null||i.disconnect(),n=null}function s(i,l){i===void 0&&(i=!1),l===void 0&&(l=1),a();const u=e.getBoundingClientRect(),{left:m,top:c,width:p,height:h}=u;if(i||t(),!p||!h)return;const y=br(c),g=br(o.clientWidth-(m+p)),v=br(o.clientHeight-(c+h)),w=br(m),S={rootMargin:-y+"px "+-g+"px "+-v+"px "+-w+"px",threshold:Xe(0,At(1,l))||1};let k=!0;function C(N){const M=N[0].intersectionRatio;if(M!==l){if(!k)return s();M?s(!1,M):r=setTimeout(()=>{s(!1,1e-7)},1e3)}M===1&&!ic(u,e.getBoundingClientRect())&&s(),k=!1}try{n=new IntersectionObserver(C,{...S,root:o.ownerDocument})}catch{n=new IntersectionObserver(C,S)}n.observe(e)}return s(!0),a}function lg(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:i=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,u=Ta(e),m=o||a?[...u?qn(u):[],...qn(t)]:[];m.forEach(w=>{o&&w.addEventListener("scroll",n,{passive:!0}),a&&w.addEventListener("resize",n)});const c=u&&i?cg(u,n):null;let p=-1,h=null;s&&(h=new ResizeObserver(w=>{let[x]=w;x&&x.target===u&&h&&(h.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var S;(S=h)==null||S.observe(t)})),n()}),u&&!l&&h.observe(u),h.observe(t));let y,g=l?Kt(e):null;l&&v();function v(){const w=Kt(e);g&&!ic(g,w)&&n(),g=w,y=requestAnimationFrame(v)}return n(),()=>{var w;m.forEach(x=>{o&&x.removeEventListener("scroll",n),a&&x.removeEventListener("resize",n)}),c==null||c(),(w=h)==null||w.disconnect(),h=null,l&&cancelAnimationFrame(y)}}const ug=Ah,dg=Ih,fg=Oh,mg=$h,pg=_h,Ws=Th,hg=jh,gg=(e,t,n)=>{const r=new Map,o={platform:ig,...n},a={...o.platform,_c:r};return Rh(e,t,{...o,platform:a})};var vg=typeof document<"u",yg=function(){},Rr=vg?b.useLayoutEffect:yg;function Lr(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Lr(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const a=o[r];if(!(a==="_owner"&&e.$$typeof)&&!Lr(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function cc(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Bs(e,t){const n=cc(e);return Math.round(t*n)/n}function Ro(e){const t=f.useRef(e);return Rr(()=>{t.current=e}),t}function bg(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:a,floating:s}={},transform:i=!0,whileElementsMounted:l,open:u}=e,[m,c]=f.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,h]=f.useState(r);Lr(p,r)||h(r);const[y,g]=f.useState(null),[v,w]=f.useState(null),x=f.useCallback(E=>{E!==N.current&&(N.current=E,g(E))},[]),S=f.useCallback(E=>{E!==M.current&&(M.current=E,w(E))},[]),k=a||y,C=s||v,N=f.useRef(null),M=f.useRef(null),D=f.useRef(m),L=l!=null,B=Ro(l),F=Ro(o),V=Ro(u),$=f.useCallback(()=>{if(!N.current||!M.current)return;const E={placement:t,strategy:n,middleware:p};F.current&&(E.platform=F.current),gg(N.current,M.current,E).then(O=>{const Y={...O,isPositioned:V.current!==!1};I.current&&!Lr(D.current,Y)&&(D.current=Y,qr.flushSync(()=>{c(Y)}))})},[p,t,n,F,V]);Rr(()=>{u===!1&&D.current.isPositioned&&(D.current.isPositioned=!1,c(E=>({...E,isPositioned:!1})))},[u]);const I=f.useRef(!1);Rr(()=>(I.current=!0,()=>{I.current=!1}),[]),Rr(()=>{if(k&&(N.current=k),C&&(M.current=C),k&&C){if(B.current)return B.current(k,C,$);$()}},[k,C,$,B,L]);const _=f.useMemo(()=>({reference:N,floating:M,setReference:x,setFloating:S}),[x,S]),R=f.useMemo(()=>({reference:k,floating:C}),[k,C]),P=f.useMemo(()=>{const E={position:n,left:0,top:0};if(!R.floating)return E;const O=Bs(R.floating,m.x),Y=Bs(R.floating,m.y);return i?{...E,transform:"translate("+O+"px, "+Y+"px)",...cc(R.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:O,top:Y}},[n,i,R.floating,m.x,m.y]);return f.useMemo(()=>({...m,update:$,refs:_,elements:R,floatingStyles:P}),[m,$,_,R,P])}const wg=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?Ws({element:r.current,padding:o}).fn(n):{}:r?Ws({element:r,padding:o}).fn(n):{}}}},xg=(e,t)=>({...ug(e),options:[e,t]}),Sg=(e,t)=>({...dg(e),options:[e,t]}),Cg=(e,t)=>({...hg(e),options:[e,t]}),Mg=(e,t)=>({...fg(e),options:[e,t]}),Eg=(e,t)=>({...mg(e),options:[e,t]}),kg=(e,t)=>({...pg(e),options:[e,t]}),Ng=(e,t)=>({...wg(e),options:[e,t]});var Dg="Arrow",lc=f.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...a}=e;return d.jsx(te.svg,{...a,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:d.jsx("polygon",{points:"0,0 30,0 15,10"})})});lc.displayName=Dg;var Rg=lc;function _a(e){const[t,n]=f.useState(void 0);return De(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const a=o[0];let s,i;if("borderBoxSize"in a){const l=a.borderBoxSize,u=Array.isArray(l)?l[0]:l;s=u.inlineSize,i=u.blockSize}else s=e.offsetWidth,i=e.offsetHeight;n({width:s,height:i})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var Pa="Popper",[uc,$t]=Ye(Pa),[Tg,dc]=uc(Pa),fc=e=>{const{__scopePopper:t,children:n}=e,[r,o]=f.useState(null);return d.jsx(Tg,{scope:t,anchor:r,onAnchorChange:o,children:n})};fc.displayName=Pa;var mc="PopperAnchor",pc=f.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,a=dc(mc,n),s=f.useRef(null),i=he(t,s);return f.useEffect(()=>{a.onAnchorChange((r==null?void 0:r.current)||s.current)}),r?null:d.jsx(te.div,{...o,ref:i})});pc.displayName=mc;var Aa="PopperContent",[Og,_g]=uc(Aa),hc=f.forwardRef((e,t)=>{var j,Z,X,Q,le,de;const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:a="center",alignOffset:s=0,arrowPadding:i=0,avoidCollisions:l=!0,collisionBoundary:u=[],collisionPadding:m=0,sticky:c="partial",hideWhenDetached:p=!1,updatePositionStrategy:h="optimized",onPlaced:y,...g}=e,v=dc(Aa,n),[w,x]=f.useState(null),S=he(t,xe=>x(xe)),[k,C]=f.useState(null),N=_a(k),M=(N==null?void 0:N.width)??0,D=(N==null?void 0:N.height)??0,L=r+(a!=="center"?"-"+a:""),B=typeof m=="number"?m:{top:0,right:0,bottom:0,left:0,...m},F=Array.isArray(u)?u:[u],V=F.length>0,$={padding:B,boundary:F.filter(Ag),altBoundary:V},{refs:I,floatingStyles:_,placement:R,isPositioned:P,middlewareData:E}=bg({strategy:"fixed",placement:L,whileElementsMounted:(...xe)=>lg(...xe,{animationFrame:h==="always"}),elements:{reference:v.anchor},middleware:[xg({mainAxis:o+D,alignmentAxis:s}),l&&Sg({mainAxis:!0,crossAxis:!1,limiter:c==="partial"?Cg():void 0,...$}),l&&Mg({...$}),Eg({...$,apply:({elements:xe,rects:re,availableWidth:ze,availableHeight:We})=>{const{width:ie,height:pe}=re.reference,Se=xe.floating.style;Se.setProperty("--radix-popper-available-width",`${ze}px`),Se.setProperty("--radix-popper-available-height",`${We}px`),Se.setProperty("--radix-popper-anchor-width",`${ie}px`),Se.setProperty("--radix-popper-anchor-height",`${pe}px`)}}),k&&Ng({element:k,padding:i}),Ig({arrowWidth:M,arrowHeight:D}),p&&kg({strategy:"referenceHidden",...$})]}),[O,Y]=yc(R),G=et(y);De(()=>{P&&(G==null||G())},[P,G]);const T=(j=E.arrow)==null?void 0:j.x,A=(Z=E.arrow)==null?void 0:Z.y,W=((X=E.arrow)==null?void 0:X.centerOffset)!==0,[H,U]=f.useState();return De(()=>{w&&U(window.getComputedStyle(w).zIndex)},[w]),d.jsx("div",{ref:I.setFloating,"data-radix-popper-content-wrapper":"",style:{..._,transform:P?_.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:H,"--radix-popper-transform-origin":[(Q=E.transformOrigin)==null?void 0:Q.x,(le=E.transformOrigin)==null?void 0:le.y].join(" "),...((de=E.hide)==null?void 0:de.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:d.jsx(Og,{scope:n,placedSide:O,onArrowChange:C,arrowX:T,arrowY:A,shouldHideArrow:W,children:d.jsx(te.div,{"data-side":O,"data-align":Y,...g,ref:S,style:{...g.style,animation:P?void 0:"none"}})})})});hc.displayName=Aa;var gc="PopperArrow",Pg={top:"bottom",right:"left",bottom:"top",left:"right"},vc=f.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,a=_g(gc,r),s=Pg[a.placedSide];return d.jsx("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:d.jsx(Rg,{...o,ref:n,style:{...o.style,display:"block"}})})});vc.displayName=gc;function Ag(e){return e!==null}var Ig=e=>({name:"transformOrigin",options:e,fn(t){var v,w,x;const{placement:n,rects:r,middlewareData:o}=t,s=((v=o.arrow)==null?void 0:v.centerOffset)!==0,i=s?0:e.arrowWidth,l=s?0:e.arrowHeight,[u,m]=yc(n),c={start:"0%",center:"50%",end:"100%"}[m],p=(((w=o.arrow)==null?void 0:w.x)??0)+i/2,h=(((x=o.arrow)==null?void 0:x.y)??0)+l/2;let y="",g="";return u==="bottom"?(y=s?c:`${p}px`,g=`${-l}px`):u==="top"?(y=s?c:`${p}px`,g=`${r.floating.height+l}px`):u==="right"?(y=`${-l}px`,g=s?c:`${h}px`):u==="left"&&(y=`${r.floating.width+l}px`,g=s?c:`${h}px`),{data:{x:y,y:g}}}});function yc(e){const[t,n="center"]=e.split("-");return[t,n]}var nr=fc,rr=pc,eo=hc,to=vc,jg="Portal",or=f.forwardRef((e,t)=>{var i;const{container:n,...r}=e,[o,a]=f.useState(!1);De(()=>a(!0),[]);const s=n||o&&((i=globalThis==null?void 0:globalThis.document)==null?void 0:i.body);return s?Ca.createPortal(d.jsx(te.div,{...r,ref:t}),s):null});or.displayName=jg;function $g(e,t){return f.useReducer((n,r)=>t[n][r]??n,e)}var He=e=>{const{present:t,children:n}=e,r=Lg(t),o=typeof n=="function"?n({present:r.isPresent}):f.Children.only(n),a=he(r.ref,Fg(o));return typeof n=="function"||r.isPresent?f.cloneElement(o,{ref:a}):null};He.displayName="Presence";function Lg(e){const[t,n]=f.useState(),r=f.useRef(null),o=f.useRef(e),a=f.useRef("none"),s=e?"mounted":"unmounted",[i,l]=$g(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return f.useEffect(()=>{const u=wr(r.current);a.current=i==="mounted"?u:"none"},[i]),De(()=>{const u=r.current,m=o.current;if(m!==e){const p=a.current,h=wr(u);e?l("MOUNT"):h==="none"||(u==null?void 0:u.display)==="none"?l("UNMOUNT"):l(m&&p!==h?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),De(()=>{if(t){let u;const m=t.ownerDocument.defaultView??window,c=h=>{const g=wr(r.current).includes(h.animationName);if(h.target===t&&g&&(l("ANIMATION_END"),!o.current)){const v=t.style.animationFillMode;t.style.animationFillMode="forwards",u=m.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=v)})}},p=h=>{h.target===t&&(a.current=wr(r.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",c),t.addEventListener("animationend",c),()=>{m.clearTimeout(u),t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",c),t.removeEventListener("animationend",c)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(i),ref:f.useCallback(u=>{r.current=u?getComputedStyle(u):null,n(u)},[])}}function wr(e){return(e==null?void 0:e.animationName)||"none"}function Fg(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var Wg=f[" useInsertionEffect ".trim().toString()]||De;function tt({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,a,s]=Bg({defaultProp:t,onChange:n}),i=e!==void 0,l=i?e:o;{const m=f.useRef(e!==void 0);f.useEffect(()=>{const c=m.current;c!==i&&console.warn(`${r} is changing from ${c?"controlled":"uncontrolled"} to ${i?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),m.current=i},[i,r])}const u=f.useCallback(m=>{var c;if(i){const p=Yg(m)?m(e):m;p!==e&&((c=s.current)==null||c.call(s,p))}else a(m)},[i,e,a,s]);return[l,u]}function Bg({defaultProp:e,onChange:t}){const[n,r]=f.useState(e),o=f.useRef(n),a=f.useRef(t);return Wg(()=>{a.current=t},[t]),f.useEffect(()=>{var s;o.current!==n&&((s=a.current)==null||s.call(a,n),o.current=n)},[n,o]),[n,r,a]}function Yg(e){return typeof e=="function"}var Hg=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},cn=new WeakMap,xr=new WeakMap,Sr={},To=0,bc=function(e){return e&&(e.host||bc(e.parentNode))},zg=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=bc(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},Gg=function(e,t,n,r){var o=zg(t,Array.isArray(e)?e:[e]);Sr[n]||(Sr[n]=new WeakMap);var a=Sr[n],s=[],i=new Set,l=new Set(o),u=function(c){!c||i.has(c)||(i.add(c),u(c.parentNode))};o.forEach(u);var m=function(c){!c||l.has(c)||Array.prototype.forEach.call(c.children,function(p){if(i.has(p))m(p);else try{var h=p.getAttribute(r),y=h!==null&&h!=="false",g=(cn.get(p)||0)+1,v=(a.get(p)||0)+1;cn.set(p,g),a.set(p,v),s.push(p),g===1&&y&&xr.set(p,!0),v===1&&p.setAttribute(n,"true"),y||p.setAttribute(r,"true")}catch(w){console.error("aria-hidden: cannot operate on ",p,w)}})};return m(t),i.clear(),To++,function(){s.forEach(function(c){var p=cn.get(c)-1,h=a.get(c)-1;cn.set(c,p),a.set(c,h),p||(xr.has(c)||c.removeAttribute(r),xr.delete(c)),h||c.removeAttribute(n)}),To--,To||(cn=new WeakMap,cn=new WeakMap,xr=new WeakMap,Sr={})}},no=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=Hg(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),Gg(r,o,n,"aria-hidden")):function(){return null}},ft=function(){return ft=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},ft.apply(this,arguments)};function wc(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function Ug(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,a;r<o;r++)(a||!(r in t))&&(a||(a=Array.prototype.slice.call(t,0,r)),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var Tr="right-scroll-bar-position",Or="width-before-scroll-bar",qg="with-scroll-bars-hidden",Vg="--removed-body-scroll-bar-size";function Oo(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Kg(e,t){var n=b.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var Xg=typeof window<"u"?f.useLayoutEffect:f.useEffect,Ys=new WeakMap;function Zg(e,t){var n=Kg(null,function(r){return e.forEach(function(o){return Oo(o,r)})});return Xg(function(){var r=Ys.get(n);if(r){var o=new Set(r),a=new Set(e),s=n.current;o.forEach(function(i){a.has(i)||Oo(i,null)}),a.forEach(function(i){o.has(i)||Oo(i,s)})}Ys.set(n,e)},[e]),n}function Qg(e){return e}function Jg(e,t){t===void 0&&(t=Qg);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(a){var s=t(a,r);return n.push(s),function(){n=n.filter(function(i){return i!==s})}},assignSyncMedium:function(a){for(r=!0;n.length;){var s=n;n=[],s.forEach(a)}n={push:function(i){return a(i)},filter:function(){return n}}},assignMedium:function(a){r=!0;var s=[];if(n.length){var i=n;n=[],i.forEach(a),s=n}var l=function(){var m=s;s=[],m.forEach(a)},u=function(){return Promise.resolve().then(l)};u(),n={push:function(m){s.push(m),u()},filter:function(m){return s=s.filter(m),n}}}};return o}function ev(e){e===void 0&&(e={});var t=Jg(null);return t.options=ft({async:!0,ssr:!1},e),t}var xc=function(e){var t=e.sideCar,n=wc(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return f.createElement(r,ft({},n))};xc.isSideCarExport=!0;function tv(e,t){return e.useMedium(t),xc}var Sc=ev(),_o=function(){},ro=f.forwardRef(function(e,t){var n=f.useRef(null),r=f.useState({onScrollCapture:_o,onWheelCapture:_o,onTouchMoveCapture:_o}),o=r[0],a=r[1],s=e.forwardProps,i=e.children,l=e.className,u=e.removeScrollBar,m=e.enabled,c=e.shards,p=e.sideCar,h=e.noRelative,y=e.noIsolation,g=e.inert,v=e.allowPinchZoom,w=e.as,x=w===void 0?"div":w,S=e.gapMode,k=wc(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),C=p,N=Zg([n,t]),M=ft(ft({},k),o);return f.createElement(f.Fragment,null,m&&f.createElement(C,{sideCar:Sc,removeScrollBar:u,shards:c,noRelative:h,noIsolation:y,inert:g,setCallbacks:a,allowPinchZoom:!!v,lockRef:n,gapMode:S}),s?f.cloneElement(f.Children.only(i),ft(ft({},M),{ref:N})):f.createElement(x,ft({},M,{className:l,ref:N}),i))});ro.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};ro.classNames={fullWidth:Or,zeroRight:Tr};var nv=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function rv(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=nv();return t&&e.setAttribute("nonce",t),e}function ov(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function av(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var sv=function(){var e=0,t=null;return{add:function(n){e==0&&(t=rv())&&(ov(t,n),av(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},iv=function(){var e=sv();return function(t,n){f.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Cc=function(){var e=iv(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},cv={left:0,top:0,right:0,gap:0},Po=function(e){return parseInt(e||"",10)||0},lv=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[Po(n),Po(r),Po(o)]},uv=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return cv;var t=lv(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},dv=Cc(),hn="data-scroll-locked",fv=function(e,t,n,r){var o=e.left,a=e.top,s=e.right,i=e.gap;return n===void 0&&(n="margin"),`
112
- .`.concat(qg,` {
111
+ */const vh=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],kn=je("X",vh);function ra({label:e,placeholder:t="Enter password",helperText:n,error:r,required:o,className:a,showPassword:s=!1,onShowPasswordChange:i,value:l,onChange:u}){return d.jsxs("div",{className:F("space-y-1",a),children:[e&&d.jsxs(Lt,{className:"text-sm font-medium text-gray-700",children:[e,o&&d.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),d.jsxs("div",{className:"relative",children:[d.jsx(rn,{type:s?"text":"password",placeholder:t,className:F("pr-10",r&&"border-red-500 focus-visible:ring-red-500"),value:l,onChange:m=>u==null?void 0:u(m.target.value)}),d.jsx("div",{className:"absolute right-3 top-1/2 -translate-y-1/2 text-muted-foreground cursor-pointer",onClick:()=>i==null?void 0:i(!s),"aria-label":s?"Hide password":"Show password",children:s?d.jsx(nh,{className:"h-4 w-4 text-gray-400 hover:text-gray-500"}):d.jsx(oh,{className:"h-4 w-4 text-gray-400 hover:text-gray-500"})})]}),r&&d.jsx("p",{className:"text-xs text-red-500",children:r}),n&&!r&&d.jsx("p",{className:"text-xs text-gray-500",children:n})]})}const ic=f.forwardRef(({className:e,...t},n)=>d.jsx("textarea",{className:F("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:n,...t}));ic.displayName="Textarea";const cc=({label:e,placeholder:t="Write here...",helperText:n,error:r,required:o,rows:a=4,className:s,onChange:i})=>d.jsxs("div",{className:F("space-y-1",s),children:[e&&d.jsxs(Lt,{className:"text-sm font-medium text-foreground",children:[e,o&&d.jsx("span",{className:"text-destructive ml-1",children:"*"})]}),d.jsx(ic,{placeholder:t,rows:a,className:F("resize-none",r&&"border-destructive focus-visible:ring-destructive"),onChange:i}),(n||r)&&d.jsx("p",{className:F("text-xs",r?"text-destructive":"text-muted-foreground"),children:r||n})]});function K(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function yh(e,t){const n=f.createContext(t),r=a=>{const{children:s,...i}=a,l=f.useMemo(()=>i,Object.values(i));return d.jsx(n.Provider,{value:l,children:s})};r.displayName=e+"Provider";function o(a){const s=f.useContext(n);if(s)return s;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return[r,o]}function Be(e,t=[]){let n=[];function r(a,s){const i=f.createContext(s),l=n.length;n=[...n,s];const u=c=>{var b;const{scope:p,children:h,...y}=c,v=((b=p==null?void 0:p[e])==null?void 0:b[l])||i,g=f.useMemo(()=>y,Object.values(y));return d.jsx(v.Provider,{value:g,children:h})};u.displayName=a+"Provider";function m(c,p){var v;const h=((v=p==null?void 0:p[e])==null?void 0:v[l])||i,y=f.useContext(h);if(y)return y;if(s!==void 0)return s;throw new Error(`\`${c}\` must be used within \`${a}\``)}return[u,m]}const o=()=>{const a=n.map(s=>f.createContext(s));return function(i){const l=(i==null?void 0:i[e])||a;return f.useMemo(()=>({[`__scope${e}`]:{...i,[e]:l}}),[i,l])}};return o.scopeName=e,[r,bh(o,...t)]}function bh(...e){const t=e[0];if(e.length===1)return t;const n=()=>{const r=e.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(a){const s=r.reduce((i,{useScope:l,scopeName:u})=>{const c=l(a)[`__scope${u}`];return{...i,...c}},{});return f.useMemo(()=>({[`__scope${t.scopeName}`]:s}),[s])}};return n.scopeName=t.scopeName,n}function et(e){const t=f.useRef(e);return f.useEffect(()=>{t.current=e}),f.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function wh(e,t=globalThis==null?void 0:globalThis.document){const n=et(e);f.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var xh="DismissableLayer",oa="dismissableLayer.update",Sh="dismissableLayer.pointerDownOutside",Ch="dismissableLayer.focusOutside",Is,lc=f.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),En=f.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:s,onDismiss:i,...l}=e,u=f.useContext(lc),[m,c]=f.useState(null),p=(m==null?void 0:m.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,h]=f.useState({}),y=he(t,M=>c(M)),v=Array.from(u.layers),[g]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),b=v.indexOf(g),w=m?v.indexOf(m):-1,S=u.layersWithOutsidePointerEventsDisabled.size>0,D=w>=b,C=kh(M=>{const E=M.target,$=[...u.branches].some(B=>B.contains(E));!D||$||(o==null||o(M),s==null||s(M),M.defaultPrevented||i==null||i())},p),R=Eh(M=>{const E=M.target;[...u.branches].some(B=>B.contains(E))||(a==null||a(M),s==null||s(M),M.defaultPrevented||i==null||i())},p);return wh(M=>{w===u.layers.size-1&&(r==null||r(M),!M.defaultPrevented&&i&&(M.preventDefault(),i()))},p),f.useEffect(()=>{if(m)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(Is=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(m)),u.layers.add(m),js(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=Is)}},[m,p,n,u]),f.useEffect(()=>()=>{m&&(u.layers.delete(m),u.layersWithOutsidePointerEventsDisabled.delete(m),js())},[m,u]),f.useEffect(()=>{const M=()=>h({});return document.addEventListener(oa,M),()=>document.removeEventListener(oa,M)},[]),d.jsx(ee.div,{...l,ref:y,style:{pointerEvents:S?D?"auto":"none":void 0,...e.style},onFocusCapture:K(e.onFocusCapture,R.onFocusCapture),onBlurCapture:K(e.onBlurCapture,R.onBlurCapture),onPointerDownCapture:K(e.onPointerDownCapture,C.onPointerDownCapture)})});En.displayName=xh;var Mh="DismissableLayerBranch",Dh=f.forwardRef((e,t)=>{const n=f.useContext(lc),r=f.useRef(null),o=he(t,r);return f.useEffect(()=>{const a=r.current;if(a)return n.branches.add(a),()=>{n.branches.delete(a)}},[n.branches]),d.jsx(ee.div,{...e,ref:o})});Dh.displayName=Mh;function kh(e,t=globalThis==null?void 0:globalThis.document){const n=et(e),r=f.useRef(!1),o=f.useRef(()=>{});return f.useEffect(()=>{const a=i=>{if(i.target&&!r.current){let l=function(){uc(Sh,n,u,{discrete:!0})};const u={originalEvent:i};i.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=l,t.addEventListener("click",o.current,{once:!0})):l()}else t.removeEventListener("click",o.current);r.current=!1},s=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(s),t.removeEventListener("pointerdown",a),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Eh(e,t=globalThis==null?void 0:globalThis.document){const n=et(e),r=f.useRef(!1);return f.useEffect(()=>{const o=a=>{a.target&&!r.current&&uc(Ch,n,{originalEvent:a},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function js(){const e=new CustomEvent(oa);document.dispatchEvent(e)}function uc(e,t,n,{discrete:r}){const o=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?Qi(o,a):o.dispatchEvent(a)}var Ro=0;function Jr(){f.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??$s()),document.body.insertAdjacentElement("beforeend",e[1]??$s()),Ro++,()=>{Ro===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Ro--}},[])}function $s(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.outline="none",e.style.opacity="0",e.style.position="fixed",e.style.pointerEvents="none",e}var To="focusScope.autoFocusOnMount",_o="focusScope.autoFocusOnUnmount",Ls={bubbles:!1,cancelable:!0},Nh="FocusScope",rr=f.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:a,...s}=e,[i,l]=f.useState(null),u=et(o),m=et(a),c=f.useRef(null),p=he(t,v=>l(v)),h=f.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;f.useEffect(()=>{if(r){let v=function(S){if(h.paused||!i)return;const D=S.target;i.contains(D)?c.current=D:Ot(c.current,{select:!0})},g=function(S){if(h.paused||!i)return;const D=S.relatedTarget;D!==null&&(i.contains(D)||Ot(c.current,{select:!0}))},b=function(S){if(document.activeElement===document.body)for(const C of S)C.removedNodes.length>0&&Ot(i)};document.addEventListener("focusin",v),document.addEventListener("focusout",g);const w=new MutationObserver(b);return i&&w.observe(i,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",v),document.removeEventListener("focusout",g),w.disconnect()}}},[r,i,h.paused]),f.useEffect(()=>{if(i){Ws.add(h);const v=document.activeElement;if(!i.contains(v)){const b=new CustomEvent(To,Ls);i.addEventListener(To,u),i.dispatchEvent(b),b.defaultPrevented||(Rh(Ah(dc(i)),{select:!0}),document.activeElement===v&&Ot(i))}return()=>{i.removeEventListener(To,u),setTimeout(()=>{const b=new CustomEvent(_o,Ls);i.addEventListener(_o,m),i.dispatchEvent(b),b.defaultPrevented||Ot(v??document.body,{select:!0}),i.removeEventListener(_o,m),Ws.remove(h)},0)}}},[i,u,m,h]);const y=f.useCallback(v=>{if(!n&&!r||h.paused)return;const g=v.key==="Tab"&&!v.altKey&&!v.ctrlKey&&!v.metaKey,b=document.activeElement;if(g&&b){const w=v.currentTarget,[S,D]=Th(w);S&&D?!v.shiftKey&&b===D?(v.preventDefault(),n&&Ot(S,{select:!0})):v.shiftKey&&b===S&&(v.preventDefault(),n&&Ot(D,{select:!0})):b===w&&v.preventDefault()}},[n,r,h.paused]);return d.jsx(ee.div,{tabIndex:-1,...s,ref:p,onKeyDown:y})});rr.displayName=Nh;function Rh(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Ot(r,{select:t}),document.activeElement!==n)return}function Th(e){const t=dc(e),n=Fs(t,e),r=Fs(t.reverse(),e);return[n,r]}function dc(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>{const o=r.tagName==="INPUT"&&r.type==="hidden";return r.disabled||r.hidden||o?NodeFilter.FILTER_SKIP:r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;n.nextNode();)t.push(n.currentNode);return t}function Fs(e,t){for(const n of e)if(!_h(n,{upTo:t}))return n}function _h(e,{upTo:t}){if(getComputedStyle(e).visibility==="hidden")return!0;for(;e;){if(t!==void 0&&e===t)return!1;if(getComputedStyle(e).display==="none")return!0;e=e.parentElement}return!1}function Oh(e){return e instanceof HTMLInputElement&&"select"in e}function Ot(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Oh(e)&&t&&e.select()}}var Ws=Ph();function Ph(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=Bs(e,t),e.unshift(t)},remove(t){var n;e=Bs(e,t),(n=e[0])==null||n.resume()}}}function Bs(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Ah(e){return e.filter(t=>t.tagName!=="A")}var Ne=globalThis!=null&&globalThis.document?f.useLayoutEffect:()=>{},Ih=f[" useId ".trim().toString()]||(()=>{}),jh=0;function ke(e){const[t,n]=f.useState(Ih());return Ne(()=>{n(r=>r??String(jh++))},[e]),e||(t?`radix-${t}`:"")}const $h=["top","right","bottom","left"],It=Math.min,Xe=Math.max,Fr=Math.round,Sr=Math.floor,ht=e=>({x:e,y:e}),Lh={left:"right",right:"left",bottom:"top",top:"bottom"},Fh={start:"end",end:"start"};function aa(e,t,n){return Xe(e,It(t,n))}function Dt(e,t){return typeof e=="function"?e(t):e}function kt(e){return e.split("-")[0]}function Nn(e){return e.split("-")[1]}function Ta(e){return e==="x"?"y":"x"}function _a(e){return e==="y"?"height":"width"}const Wh=new Set(["top","bottom"]);function mt(e){return Wh.has(kt(e))?"y":"x"}function Oa(e){return Ta(mt(e))}function Bh(e,t,n){n===void 0&&(n=!1);const r=Nn(e),o=Oa(e),a=_a(o);let s=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(s=Wr(s)),[s,Wr(s)]}function Yh(e){const t=Wr(e);return[sa(e),t,sa(t)]}function sa(e){return e.replace(/start|end/g,t=>Fh[t])}const Ys=["left","right"],Hs=["right","left"],Hh=["top","bottom"],zh=["bottom","top"];function Gh(e,t,n){switch(e){case"top":case"bottom":return n?t?Hs:Ys:t?Ys:Hs;case"left":case"right":return t?Hh:zh;default:return[]}}function Uh(e,t,n,r){const o=Nn(e);let a=Gh(kt(e),n==="start",r);return o&&(a=a.map(s=>s+"-"+o),t&&(a=a.concat(a.map(sa)))),a}function Wr(e){return e.replace(/left|right|bottom|top/g,t=>Lh[t])}function qh(e){return{top:0,right:0,bottom:0,left:0,...e}}function fc(e){return typeof e!="number"?qh(e):{top:e,right:e,bottom:e,left:e}}function Br(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function zs(e,t,n){let{reference:r,floating:o}=e;const a=mt(t),s=Oa(t),i=_a(s),l=kt(t),u=a==="y",m=r.x+r.width/2-o.width/2,c=r.y+r.height/2-o.height/2,p=r[i]/2-o[i]/2;let h;switch(l){case"top":h={x:m,y:r.y-o.height};break;case"bottom":h={x:m,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:c};break;case"left":h={x:r.x-o.width,y:c};break;default:h={x:r.x,y:r.y}}switch(Nn(t)){case"start":h[s]-=p*(n&&u?-1:1);break;case"end":h[s]+=p*(n&&u?-1:1);break}return h}const Vh=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:a=[],platform:s}=n,i=a.filter(Boolean),l=await(s.isRTL==null?void 0:s.isRTL(t));let u=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:m,y:c}=zs(u,r,l),p=r,h={},y=0;for(let v=0;v<i.length;v++){const{name:g,fn:b}=i[v],{x:w,y:S,data:D,reset:C}=await b({x:m,y:c,initialPlacement:r,placement:p,strategy:o,middlewareData:h,rects:u,platform:s,elements:{reference:e,floating:t}});m=w??m,c=S??c,h={...h,[g]:{...h[g],...D}},C&&y<=50&&(y++,typeof C=="object"&&(C.placement&&(p=C.placement),C.rects&&(u=C.rects===!0?await s.getElementRects({reference:e,floating:t,strategy:o}):C.rects),{x:m,y:c}=zs(u,p,l)),v=-1)}return{x:m,y:c,placement:p,strategy:o,middlewareData:h}};async function qn(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:a,rects:s,elements:i,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:m="viewport",elementContext:c="floating",altBoundary:p=!1,padding:h=0}=Dt(t,e),y=fc(h),g=i[p?c==="floating"?"reference":"floating":c],b=Br(await a.getClippingRect({element:(n=await(a.isElement==null?void 0:a.isElement(g)))==null||n?g:g.contextElement||await(a.getDocumentElement==null?void 0:a.getDocumentElement(i.floating)),boundary:u,rootBoundary:m,strategy:l})),w=c==="floating"?{x:r,y:o,width:s.floating.width,height:s.floating.height}:s.reference,S=await(a.getOffsetParent==null?void 0:a.getOffsetParent(i.floating)),D=await(a.isElement==null?void 0:a.isElement(S))?await(a.getScale==null?void 0:a.getScale(S))||{x:1,y:1}:{x:1,y:1},C=Br(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:i,rect:w,offsetParent:S,strategy:l}):w);return{top:(b.top-C.top+y.top)/D.y,bottom:(C.bottom-b.bottom+y.bottom)/D.y,left:(b.left-C.left+y.left)/D.x,right:(C.right-b.right+y.right)/D.x}}const Kh=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:a,platform:s,elements:i,middlewareData:l}=t,{element:u,padding:m=0}=Dt(e,t)||{};if(u==null)return{};const c=fc(m),p={x:n,y:r},h=Oa(o),y=_a(h),v=await s.getDimensions(u),g=h==="y",b=g?"top":"left",w=g?"bottom":"right",S=g?"clientHeight":"clientWidth",D=a.reference[y]+a.reference[h]-p[h]-a.floating[y],C=p[h]-a.reference[h],R=await(s.getOffsetParent==null?void 0:s.getOffsetParent(u));let M=R?R[S]:0;(!M||!await(s.isElement==null?void 0:s.isElement(R)))&&(M=i.floating[S]||a.floating[y]);const E=D/2-C/2,$=M/2-v[y]/2-1,B=It(c[b],$),L=It(c[w],$),q=B,A=M-v[y]-L,T=M/2-v[y]/2+E,_=aa(q,T,A),N=!l.arrow&&Nn(o)!=null&&T!==_&&a.reference[y]/2-(T<q?B:L)-v[y]/2<0,I=N?T<q?T-q:T-A:0;return{[h]:p[h]+I,data:{[h]:_,centerOffset:T-_-I,...N&&{alignmentOffset:I}},reset:N}}}),Xh=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:a,rects:s,initialPlacement:i,platform:l,elements:u}=t,{mainAxis:m=!0,crossAxis:c=!0,fallbackPlacements:p,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:y="none",flipAlignment:v=!0,...g}=Dt(e,t);if((n=a.arrow)!=null&&n.alignmentOffset)return{};const b=kt(o),w=mt(i),S=kt(i)===i,D=await(l.isRTL==null?void 0:l.isRTL(u.floating)),C=p||(S||!v?[Wr(i)]:Yh(i)),R=y!=="none";!p&&R&&C.push(...Uh(i,v,y,D));const M=[i,...C],E=await qn(t,g),$=[];let B=((r=a.flip)==null?void 0:r.overflows)||[];if(m&&$.push(E[b]),c){const T=Bh(o,s,D);$.push(E[T[0]],E[T[1]])}if(B=[...B,{placement:o,overflows:$}],!$.every(T=>T<=0)){var L,q;const T=(((L=a.flip)==null?void 0:L.index)||0)+1,_=M[T];if(_&&(!(c==="alignment"?w!==mt(_):!1)||B.every(k=>k.overflows[0]>0&&mt(k.placement)===w)))return{data:{index:T,overflows:B},reset:{placement:_}};let N=(q=B.filter(I=>I.overflows[0]<=0).sort((I,k)=>I.overflows[1]-k.overflows[1])[0])==null?void 0:q.placement;if(!N)switch(h){case"bestFit":{var A;const I=(A=B.filter(k=>{if(R){const P=mt(k.placement);return P===w||P==="y"}return!0}).map(k=>[k.placement,k.overflows.filter(P=>P>0).reduce((P,H)=>P+H,0)]).sort((k,P)=>k[1]-P[1])[0])==null?void 0:A[0];I&&(N=I);break}case"initialPlacement":N=i;break}if(o!==N)return{reset:{placement:N}}}return{}}}};function Gs(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Us(e){return $h.some(t=>e[t]>=0)}const Zh=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=Dt(e,t);switch(r){case"referenceHidden":{const a=await qn(t,{...o,elementContext:"reference"}),s=Gs(a,n.reference);return{data:{referenceHiddenOffsets:s,referenceHidden:Us(s)}}}case"escaped":{const a=await qn(t,{...o,altBoundary:!0}),s=Gs(a,n.floating);return{data:{escapedOffsets:s,escaped:Us(s)}}}default:return{}}}}},mc=new Set(["left","top"]);async function Qh(e,t){const{placement:n,platform:r,elements:o}=e,a=await(r.isRTL==null?void 0:r.isRTL(o.floating)),s=kt(n),i=Nn(n),l=mt(n)==="y",u=mc.has(s)?-1:1,m=a&&l?-1:1,c=Dt(t,e);let{mainAxis:p,crossAxis:h,alignmentAxis:y}=typeof c=="number"?{mainAxis:c,crossAxis:0,alignmentAxis:null}:{mainAxis:c.mainAxis||0,crossAxis:c.crossAxis||0,alignmentAxis:c.alignmentAxis};return i&&typeof y=="number"&&(h=i==="end"?y*-1:y),l?{x:h*m,y:p*u}:{x:p*u,y:h*m}}const Jh=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:a,placement:s,middlewareData:i}=t,l=await Qh(t,e);return s===((n=i.offset)==null?void 0:n.placement)&&(r=i.arrow)!=null&&r.alignmentOffset?{}:{x:o+l.x,y:a+l.y,data:{...l,placement:s}}}}},eg=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:a=!0,crossAxis:s=!1,limiter:i={fn:g=>{let{x:b,y:w}=g;return{x:b,y:w}}},...l}=Dt(e,t),u={x:n,y:r},m=await qn(t,l),c=mt(kt(o)),p=Ta(c);let h=u[p],y=u[c];if(a){const g=p==="y"?"top":"left",b=p==="y"?"bottom":"right",w=h+m[g],S=h-m[b];h=aa(w,h,S)}if(s){const g=c==="y"?"top":"left",b=c==="y"?"bottom":"right",w=y+m[g],S=y-m[b];y=aa(w,y,S)}const v=i.fn({...t,[p]:h,[c]:y});return{...v,data:{x:v.x-n,y:v.y-r,enabled:{[p]:a,[c]:s}}}}}},tg=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:a,middlewareData:s}=t,{offset:i=0,mainAxis:l=!0,crossAxis:u=!0}=Dt(e,t),m={x:n,y:r},c=mt(o),p=Ta(c);let h=m[p],y=m[c];const v=Dt(i,t),g=typeof v=="number"?{mainAxis:v,crossAxis:0}:{mainAxis:0,crossAxis:0,...v};if(l){const S=p==="y"?"height":"width",D=a.reference[p]-a.floating[S]+g.mainAxis,C=a.reference[p]+a.reference[S]-g.mainAxis;h<D?h=D:h>C&&(h=C)}if(u){var b,w;const S=p==="y"?"width":"height",D=mc.has(kt(o)),C=a.reference[c]-a.floating[S]+(D&&((b=s.offset)==null?void 0:b[c])||0)+(D?0:g.crossAxis),R=a.reference[c]+a.reference[S]+(D?0:((w=s.offset)==null?void 0:w[c])||0)-(D?g.crossAxis:0);y<C?y=C:y>R&&(y=R)}return{[p]:h,[c]:y}}}},ng=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:a,platform:s,elements:i}=t,{apply:l=()=>{},...u}=Dt(e,t),m=await qn(t,u),c=kt(o),p=Nn(o),h=mt(o)==="y",{width:y,height:v}=a.floating;let g,b;c==="top"||c==="bottom"?(g=c,b=p===(await(s.isRTL==null?void 0:s.isRTL(i.floating))?"start":"end")?"left":"right"):(b=c,g=p==="end"?"top":"bottom");const w=v-m.top-m.bottom,S=y-m.left-m.right,D=It(v-m[g],w),C=It(y-m[b],S),R=!t.middlewareData.shift;let M=D,E=C;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(E=S),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(M=w),R&&!p){const B=Xe(m.left,0),L=Xe(m.right,0),q=Xe(m.top,0),A=Xe(m.bottom,0);h?E=y-2*(B!==0||L!==0?B+L:Xe(m.left,m.right)):M=v-2*(q!==0||A!==0?q+A:Xe(m.top,m.bottom))}await l({...t,availableWidth:E,availableHeight:M});const $=await s.getDimensions(i.floating);return y!==$.width||v!==$.height?{reset:{rects:!0}}:{}}}};function eo(){return typeof window<"u"}function Rn(e){return pc(e)?(e.nodeName||"").toLowerCase():"#document"}function Ze(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function vt(e){var t;return(t=(pc(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function pc(e){return eo()?e instanceof Node||e instanceof Ze(e).Node:!1}function st(e){return eo()?e instanceof Element||e instanceof Ze(e).Element:!1}function gt(e){return eo()?e instanceof HTMLElement||e instanceof Ze(e).HTMLElement:!1}function qs(e){return!eo()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Ze(e).ShadowRoot}const rg=new Set(["inline","contents"]);function or(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=it(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!rg.has(o)}const og=new Set(["table","td","th"]);function ag(e){return og.has(Rn(e))}const sg=[":popover-open",":modal"];function to(e){return sg.some(t=>{try{return e.matches(t)}catch{return!1}})}const ig=["transform","translate","scale","rotate","perspective"],cg=["transform","translate","scale","rotate","perspective","filter"],lg=["paint","layout","strict","content"];function Pa(e){const t=Aa(),n=st(e)?it(e):e;return ig.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||cg.some(r=>(n.willChange||"").includes(r))||lg.some(r=>(n.contain||"").includes(r))}function ug(e){let t=jt(e);for(;gt(t)&&!bn(t);){if(Pa(t))return t;if(to(t))return null;t=jt(t)}return null}function Aa(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const dg=new Set(["html","body","#document"]);function bn(e){return dg.has(Rn(e))}function it(e){return Ze(e).getComputedStyle(e)}function no(e){return st(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function jt(e){if(Rn(e)==="html")return e;const t=e.assignedSlot||e.parentNode||qs(e)&&e.host||vt(e);return qs(t)?t.host:t}function hc(e){const t=jt(e);return bn(t)?e.ownerDocument?e.ownerDocument.body:e.body:gt(t)&&or(t)?t:hc(t)}function Vn(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=hc(e),a=o===((r=e.ownerDocument)==null?void 0:r.body),s=Ze(o);if(a){const i=ia(s);return t.concat(s,s.visualViewport||[],or(o)?o:[],i&&n?Vn(i):[])}return t.concat(o,Vn(o,[],n))}function ia(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function gc(e){const t=it(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=gt(e),a=o?e.offsetWidth:n,s=o?e.offsetHeight:r,i=Fr(n)!==a||Fr(r)!==s;return i&&(n=a,r=s),{width:n,height:r,$:i}}function Ia(e){return st(e)?e:e.contextElement}function vn(e){const t=Ia(e);if(!gt(t))return ht(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:a}=gc(t);let s=(a?Fr(n.width):n.width)/r,i=(a?Fr(n.height):n.height)/o;return(!s||!Number.isFinite(s))&&(s=1),(!i||!Number.isFinite(i))&&(i=1),{x:s,y:i}}const fg=ht(0);function vc(e){const t=Ze(e);return!Aa()||!t.visualViewport?fg:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function mg(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Ze(e)?!1:t}function Qt(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),a=Ia(e);let s=ht(1);t&&(r?st(r)&&(s=vn(r)):s=vn(e));const i=mg(a,n,r)?vc(a):ht(0);let l=(o.left+i.x)/s.x,u=(o.top+i.y)/s.y,m=o.width/s.x,c=o.height/s.y;if(a){const p=Ze(a),h=r&&st(r)?Ze(r):r;let y=p,v=ia(y);for(;v&&r&&h!==y;){const g=vn(v),b=v.getBoundingClientRect(),w=it(v),S=b.left+(v.clientLeft+parseFloat(w.paddingLeft))*g.x,D=b.top+(v.clientTop+parseFloat(w.paddingTop))*g.y;l*=g.x,u*=g.y,m*=g.x,c*=g.y,l+=S,u+=D,y=Ze(v),v=ia(y)}}return Br({width:m,height:c,x:l,y:u})}function ja(e,t){const n=no(e).scrollLeft;return t?t.left+n:Qt(vt(e)).left+n}function yc(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),o=r.left+t.scrollLeft-(n?0:ja(e,r)),a=r.top+t.scrollTop;return{x:o,y:a}}function pg(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const a=o==="fixed",s=vt(r),i=t?to(t.floating):!1;if(r===s||i&&a)return n;let l={scrollLeft:0,scrollTop:0},u=ht(1);const m=ht(0),c=gt(r);if((c||!c&&!a)&&((Rn(r)!=="body"||or(s))&&(l=no(r)),gt(r))){const h=Qt(r);u=vn(r),m.x=h.x+r.clientLeft,m.y=h.y+r.clientTop}const p=s&&!c&&!a?yc(s,l,!0):ht(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+m.x+p.x,y:n.y*u.y-l.scrollTop*u.y+m.y+p.y}}function hg(e){return Array.from(e.getClientRects())}function gg(e){const t=vt(e),n=no(e),r=e.ownerDocument.body,o=Xe(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=Xe(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+ja(e);const i=-n.scrollTop;return it(r).direction==="rtl"&&(s+=Xe(t.clientWidth,r.clientWidth)-o),{width:o,height:a,x:s,y:i}}function vg(e,t){const n=Ze(e),r=vt(e),o=n.visualViewport;let a=r.clientWidth,s=r.clientHeight,i=0,l=0;if(o){a=o.width,s=o.height;const u=Aa();(!u||u&&t==="fixed")&&(i=o.offsetLeft,l=o.offsetTop)}return{width:a,height:s,x:i,y:l}}const yg=new Set(["absolute","fixed"]);function bg(e,t){const n=Qt(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,a=gt(e)?vn(e):ht(1),s=e.clientWidth*a.x,i=e.clientHeight*a.y,l=o*a.x,u=r*a.y;return{width:s,height:i,x:l,y:u}}function Vs(e,t,n){let r;if(t==="viewport")r=vg(e,n);else if(t==="document")r=gg(vt(e));else if(st(t))r=bg(t,n);else{const o=vc(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Br(r)}function bc(e,t){const n=jt(e);return n===t||!st(n)||bn(n)?!1:it(n).position==="fixed"||bc(n,t)}function wg(e,t){const n=t.get(e);if(n)return n;let r=Vn(e,[],!1).filter(i=>st(i)&&Rn(i)!=="body"),o=null;const a=it(e).position==="fixed";let s=a?jt(e):e;for(;st(s)&&!bn(s);){const i=it(s),l=Pa(s);!l&&i.position==="fixed"&&(o=null),(a?!l&&!o:!l&&i.position==="static"&&!!o&&yg.has(o.position)||or(s)&&!l&&bc(e,s))?r=r.filter(m=>m!==s):o=i,s=jt(s)}return t.set(e,r),r}function xg(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const s=[...n==="clippingAncestors"?to(t)?[]:wg(t,this._c):[].concat(n),r],i=s[0],l=s.reduce((u,m)=>{const c=Vs(t,m,o);return u.top=Xe(c.top,u.top),u.right=It(c.right,u.right),u.bottom=It(c.bottom,u.bottom),u.left=Xe(c.left,u.left),u},Vs(t,i,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function Sg(e){const{width:t,height:n}=gc(e);return{width:t,height:n}}function Cg(e,t,n){const r=gt(t),o=vt(t),a=n==="fixed",s=Qt(e,!0,a,t);let i={scrollLeft:0,scrollTop:0};const l=ht(0);function u(){l.x=ja(o)}if(r||!r&&!a)if((Rn(t)!=="body"||or(o))&&(i=no(t)),r){const h=Qt(t,!0,a,t);l.x=h.x+t.clientLeft,l.y=h.y+t.clientTop}else o&&u();a&&!r&&o&&u();const m=o&&!r&&!a?yc(o,i):ht(0),c=s.left+i.scrollLeft-l.x-m.x,p=s.top+i.scrollTop-l.y-m.y;return{x:c,y:p,width:s.width,height:s.height}}function Oo(e){return it(e).position==="static"}function Ks(e,t){if(!gt(e)||it(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return vt(e)===n&&(n=n.ownerDocument.body),n}function wc(e,t){const n=Ze(e);if(to(e))return n;if(!gt(e)){let o=jt(e);for(;o&&!bn(o);){if(st(o)&&!Oo(o))return o;o=jt(o)}return n}let r=Ks(e,t);for(;r&&ag(r)&&Oo(r);)r=Ks(r,t);return r&&bn(r)&&Oo(r)&&!Pa(r)?n:r||ug(e)||n}const Mg=async function(e){const t=this.getOffsetParent||wc,n=this.getDimensions,r=await n(e.floating);return{reference:Cg(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Dg(e){return it(e).direction==="rtl"}const kg={convertOffsetParentRelativeRectToViewportRelativeRect:pg,getDocumentElement:vt,getClippingRect:xg,getOffsetParent:wc,getElementRects:Mg,getClientRects:hg,getDimensions:Sg,getScale:vn,isElement:st,isRTL:Dg};function xc(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Eg(e,t){let n=null,r;const o=vt(e);function a(){var i;clearTimeout(r),(i=n)==null||i.disconnect(),n=null}function s(i,l){i===void 0&&(i=!1),l===void 0&&(l=1),a();const u=e.getBoundingClientRect(),{left:m,top:c,width:p,height:h}=u;if(i||t(),!p||!h)return;const y=Sr(c),v=Sr(o.clientWidth-(m+p)),g=Sr(o.clientHeight-(c+h)),b=Sr(m),S={rootMargin:-y+"px "+-v+"px "+-g+"px "+-b+"px",threshold:Xe(0,It(1,l))||1};let D=!0;function C(R){const M=R[0].intersectionRatio;if(M!==l){if(!D)return s();M?s(!1,M):r=setTimeout(()=>{s(!1,1e-7)},1e3)}M===1&&!xc(u,e.getBoundingClientRect())&&s(),D=!1}try{n=new IntersectionObserver(C,{...S,root:o.ownerDocument})}catch{n=new IntersectionObserver(C,S)}n.observe(e)}return s(!0),a}function Ng(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:s=typeof ResizeObserver=="function",layoutShift:i=typeof IntersectionObserver=="function",animationFrame:l=!1}=r,u=Ia(e),m=o||a?[...u?Vn(u):[],...Vn(t)]:[];m.forEach(b=>{o&&b.addEventListener("scroll",n,{passive:!0}),a&&b.addEventListener("resize",n)});const c=u&&i?Eg(u,n):null;let p=-1,h=null;s&&(h=new ResizeObserver(b=>{let[w]=b;w&&w.target===u&&h&&(h.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var S;(S=h)==null||S.observe(t)})),n()}),u&&!l&&h.observe(u),h.observe(t));let y,v=l?Qt(e):null;l&&g();function g(){const b=Qt(e);v&&!xc(v,b)&&n(),v=b,y=requestAnimationFrame(g)}return n(),()=>{var b;m.forEach(w=>{o&&w.removeEventListener("scroll",n),a&&w.removeEventListener("resize",n)}),c==null||c(),(b=h)==null||b.disconnect(),h=null,l&&cancelAnimationFrame(y)}}const Rg=Jh,Tg=eg,_g=Xh,Og=ng,Pg=Zh,Xs=Kh,Ag=tg,Ig=(e,t,n)=>{const r=new Map,o={platform:kg,...n},a={...o.platform,_c:r};return Vh(e,t,{...o,platform:a})};var jg=typeof document<"u",$g=function(){},Or=jg?x.useLayoutEffect:$g;function Yr(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Yr(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const a=o[r];if(!(a==="_owner"&&e.$$typeof)&&!Yr(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function Sc(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Zs(e,t){const n=Sc(e);return Math.round(t*n)/n}function Po(e){const t=f.useRef(e);return Or(()=>{t.current=e}),t}function Lg(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:a,floating:s}={},transform:i=!0,whileElementsMounted:l,open:u}=e,[m,c]=f.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,h]=f.useState(r);Yr(p,r)||h(r);const[y,v]=f.useState(null),[g,b]=f.useState(null),w=f.useCallback(k=>{k!==R.current&&(R.current=k,v(k))},[]),S=f.useCallback(k=>{k!==M.current&&(M.current=k,b(k))},[]),D=a||y,C=s||g,R=f.useRef(null),M=f.useRef(null),E=f.useRef(m),$=l!=null,B=Po(l),L=Po(o),q=Po(u),A=f.useCallback(()=>{if(!R.current||!M.current)return;const k={placement:t,strategy:n,middleware:p};L.current&&(k.platform=L.current),Ig(R.current,M.current,k).then(P=>{const H={...P,isPositioned:q.current!==!1};T.current&&!Yr(E.current,H)&&(E.current=H,Qr.flushSync(()=>{c(H)}))})},[p,t,n,L,q]);Or(()=>{u===!1&&E.current.isPositioned&&(E.current.isPositioned=!1,c(k=>({...k,isPositioned:!1})))},[u]);const T=f.useRef(!1);Or(()=>(T.current=!0,()=>{T.current=!1}),[]),Or(()=>{if(D&&(R.current=D),C&&(M.current=C),D&&C){if(B.current)return B.current(D,C,A);A()}},[D,C,A,B,$]);const _=f.useMemo(()=>({reference:R,floating:M,setReference:w,setFloating:S}),[w,S]),N=f.useMemo(()=>({reference:D,floating:C}),[D,C]),I=f.useMemo(()=>{const k={position:n,left:0,top:0};if(!N.floating)return k;const P=Zs(N.floating,m.x),H=Zs(N.floating,m.y);return i?{...k,transform:"translate("+P+"px, "+H+"px)",...Sc(N.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:P,top:H}},[n,i,N.floating,m.x,m.y]);return f.useMemo(()=>({...m,update:A,refs:_,elements:N,floatingStyles:I}),[m,A,_,N,I])}const Fg=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?Xs({element:r.current,padding:o}).fn(n):{}:r?Xs({element:r,padding:o}).fn(n):{}}}},Wg=(e,t)=>({...Rg(e),options:[e,t]}),Bg=(e,t)=>({...Tg(e),options:[e,t]}),Yg=(e,t)=>({...Ag(e),options:[e,t]}),Hg=(e,t)=>({..._g(e),options:[e,t]}),zg=(e,t)=>({...Og(e),options:[e,t]}),Gg=(e,t)=>({...Pg(e),options:[e,t]}),Ug=(e,t)=>({...Fg(e),options:[e,t]});var qg="Arrow",Cc=f.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...a}=e;return d.jsx(ee.svg,{...a,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:d.jsx("polygon",{points:"0,0 30,0 15,10"})})});Cc.displayName=qg;var Vg=Cc;function $a(e){const[t,n]=f.useState(void 0);return Ne(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const a=o[0];let s,i;if("borderBoxSize"in a){const l=a.borderBoxSize,u=Array.isArray(l)?l[0]:l;s=u.inlineSize,i=u.blockSize}else s=e.offsetWidth,i=e.offsetHeight;n({width:s,height:i})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var La="Popper",[Mc,Ft]=Be(La),[Kg,Dc]=Mc(La),kc=e=>{const{__scopePopper:t,children:n}=e,[r,o]=f.useState(null);return d.jsx(Kg,{scope:t,anchor:r,onAnchorChange:o,children:n})};kc.displayName=La;var Ec="PopperAnchor",Nc=f.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,a=Dc(Ec,n),s=f.useRef(null),i=he(t,s);return f.useEffect(()=>{a.onAnchorChange((r==null?void 0:r.current)||s.current)}),r?null:d.jsx(ee.div,{...o,ref:i})});Nc.displayName=Ec;var Fa="PopperContent",[Xg,Zg]=Mc(Fa),Rc=f.forwardRef((e,t)=>{var W,Z,X,Q,se,ue;const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:a="center",alignOffset:s=0,arrowPadding:i=0,avoidCollisions:l=!0,collisionBoundary:u=[],collisionPadding:m=0,sticky:c="partial",hideWhenDetached:p=!1,updatePositionStrategy:h="optimized",onPlaced:y,...v}=e,g=Dc(Fa,n),[b,w]=f.useState(null),S=he(t,ye=>w(ye)),[D,C]=f.useState(null),R=$a(D),M=(R==null?void 0:R.width)??0,E=(R==null?void 0:R.height)??0,$=r+(a!=="center"?"-"+a:""),B=typeof m=="number"?m:{top:0,right:0,bottom:0,left:0,...m},L=Array.isArray(u)?u:[u],q=L.length>0,A={padding:B,boundary:L.filter(Jg),altBoundary:q},{refs:T,floatingStyles:_,placement:N,isPositioned:I,middlewareData:k}=Lg({strategy:"fixed",placement:$,whileElementsMounted:(...ye)=>Ng(...ye,{animationFrame:h==="always"}),elements:{reference:g.anchor},middleware:[Wg({mainAxis:o+E,alignmentAxis:s}),l&&Bg({mainAxis:!0,crossAxis:!1,limiter:c==="partial"?Yg():void 0,...A}),l&&Hg({...A}),zg({...A,apply:({elements:ye,rects:J,availableWidth:Re,availableHeight:Te})=>{const{width:oe,height:me}=J.reference,be=ye.floating.style;be.setProperty("--radix-popper-available-width",`${Re}px`),be.setProperty("--radix-popper-available-height",`${Te}px`),be.setProperty("--radix-popper-anchor-width",`${oe}px`),be.setProperty("--radix-popper-anchor-height",`${me}px`)}}),D&&Ug({element:D,padding:i}),ev({arrowWidth:M,arrowHeight:E}),p&&Gg({strategy:"referenceHidden",...A})]}),[P,H]=Oc(N),z=et(y);Ne(()=>{I&&(z==null||z())},[I,z]);const O=(W=k.arrow)==null?void 0:W.x,j=(Z=k.arrow)==null?void 0:Z.y,Y=((X=k.arrow)==null?void 0:X.centerOffset)!==0,[G,V]=f.useState();return Ne(()=>{b&&V(window.getComputedStyle(b).zIndex)},[b]),d.jsx("div",{ref:T.setFloating,"data-radix-popper-content-wrapper":"",style:{..._,transform:I?_.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:G,"--radix-popper-transform-origin":[(Q=k.transformOrigin)==null?void 0:Q.x,(se=k.transformOrigin)==null?void 0:se.y].join(" "),...((ue=k.hide)==null?void 0:ue.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:d.jsx(Xg,{scope:n,placedSide:P,onArrowChange:C,arrowX:O,arrowY:j,shouldHideArrow:Y,children:d.jsx(ee.div,{"data-side":P,"data-align":H,...v,ref:S,style:{...v.style,animation:I?void 0:"none"}})})})});Rc.displayName=Fa;var Tc="PopperArrow",Qg={top:"bottom",right:"left",bottom:"top",left:"right"},_c=f.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,a=Zg(Tc,r),s=Qg[a.placedSide];return d.jsx("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[s]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[a.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[a.placedSide],visibility:a.shouldHideArrow?"hidden":void 0},children:d.jsx(Vg,{...o,ref:n,style:{...o.style,display:"block"}})})});_c.displayName=Tc;function Jg(e){return e!==null}var ev=e=>({name:"transformOrigin",options:e,fn(t){var g,b,w;const{placement:n,rects:r,middlewareData:o}=t,s=((g=o.arrow)==null?void 0:g.centerOffset)!==0,i=s?0:e.arrowWidth,l=s?0:e.arrowHeight,[u,m]=Oc(n),c={start:"0%",center:"50%",end:"100%"}[m],p=(((b=o.arrow)==null?void 0:b.x)??0)+i/2,h=(((w=o.arrow)==null?void 0:w.y)??0)+l/2;let y="",v="";return u==="bottom"?(y=s?c:`${p}px`,v=`${-l}px`):u==="top"?(y=s?c:`${p}px`,v=`${r.floating.height+l}px`):u==="right"?(y=`${-l}px`,v=s?c:`${h}px`):u==="left"&&(y=`${r.floating.width+l}px`,v=s?c:`${h}px`),{data:{x:y,y:v}}}});function Oc(e){const[t,n="center"]=e.split("-");return[t,n]}var ar=kc,sr=Nc,ro=Rc,oo=_c,tv="Portal",ir=f.forwardRef((e,t)=>{var i;const{container:n,...r}=e,[o,a]=f.useState(!1);Ne(()=>a(!0),[]);const s=n||o&&((i=globalThis==null?void 0:globalThis.document)==null?void 0:i.body);return s?Ea.createPortal(d.jsx(ee.div,{...r,ref:t}),s):null});ir.displayName=tv;function nv(e,t){return f.useReducer((n,r)=>t[n][r]??n,e)}var ze=e=>{const{present:t,children:n}=e,r=rv(t),o=typeof n=="function"?n({present:r.isPresent}):f.Children.only(n),a=he(r.ref,ov(o));return typeof n=="function"||r.isPresent?f.cloneElement(o,{ref:a}):null};ze.displayName="Presence";function rv(e){const[t,n]=f.useState(),r=f.useRef(null),o=f.useRef(e),a=f.useRef("none"),s=e?"mounted":"unmounted",[i,l]=nv(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return f.useEffect(()=>{const u=Cr(r.current);a.current=i==="mounted"?u:"none"},[i]),Ne(()=>{const u=r.current,m=o.current;if(m!==e){const p=a.current,h=Cr(u);e?l("MOUNT"):h==="none"||(u==null?void 0:u.display)==="none"?l("UNMOUNT"):l(m&&p!==h?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),Ne(()=>{if(t){let u;const m=t.ownerDocument.defaultView??window,c=h=>{const v=Cr(r.current).includes(h.animationName);if(h.target===t&&v&&(l("ANIMATION_END"),!o.current)){const g=t.style.animationFillMode;t.style.animationFillMode="forwards",u=m.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=g)})}},p=h=>{h.target===t&&(a.current=Cr(r.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",c),t.addEventListener("animationend",c),()=>{m.clearTimeout(u),t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",c),t.removeEventListener("animationend",c)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(i),ref:f.useCallback(u=>{r.current=u?getComputedStyle(u):null,n(u)},[])}}function Cr(e){return(e==null?void 0:e.animationName)||"none"}function ov(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}var av=f[" useInsertionEffect ".trim().toString()]||Ne;function tt({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,a,s]=sv({defaultProp:t,onChange:n}),i=e!==void 0,l=i?e:o;{const m=f.useRef(e!==void 0);f.useEffect(()=>{const c=m.current;c!==i&&console.warn(`${r} is changing from ${c?"controlled":"uncontrolled"} to ${i?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),m.current=i},[i,r])}const u=f.useCallback(m=>{var c;if(i){const p=iv(m)?m(e):m;p!==e&&((c=s.current)==null||c.call(s,p))}else a(m)},[i,e,a,s]);return[l,u]}function sv({defaultProp:e,onChange:t}){const[n,r]=f.useState(e),o=f.useRef(n),a=f.useRef(t);return av(()=>{a.current=t},[t]),f.useEffect(()=>{var s;o.current!==n&&((s=a.current)==null||s.call(a,n),o.current=n)},[n,o]),[n,r,a]}function iv(e){return typeof e=="function"}var cv=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},dn=new WeakMap,Mr=new WeakMap,Dr={},Ao=0,Pc=function(e){return e&&(e.host||Pc(e.parentNode))},lv=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=Pc(n);return r&&e.contains(r)?r:(console.error("aria-hidden",n,"in not contained inside",e,". Doing nothing"),null)}).filter(function(n){return!!n})},uv=function(e,t,n,r){var o=lv(t,Array.isArray(e)?e:[e]);Dr[n]||(Dr[n]=new WeakMap);var a=Dr[n],s=[],i=new Set,l=new Set(o),u=function(c){!c||i.has(c)||(i.add(c),u(c.parentNode))};o.forEach(u);var m=function(c){!c||l.has(c)||Array.prototype.forEach.call(c.children,function(p){if(i.has(p))m(p);else try{var h=p.getAttribute(r),y=h!==null&&h!=="false",v=(dn.get(p)||0)+1,g=(a.get(p)||0)+1;dn.set(p,v),a.set(p,g),s.push(p),v===1&&y&&Mr.set(p,!0),g===1&&p.setAttribute(n,"true"),y||p.setAttribute(r,"true")}catch(b){console.error("aria-hidden: cannot operate on ",p,b)}})};return m(t),i.clear(),Ao++,function(){s.forEach(function(c){var p=dn.get(c)-1,h=a.get(c)-1;dn.set(c,p),a.set(c,h),p||(Mr.has(c)||c.removeAttribute(r),Mr.delete(c)),h||c.removeAttribute(n)}),Ao--,Ao||(dn=new WeakMap,dn=new WeakMap,Mr=new WeakMap,Dr={})}},ao=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=cv(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),uv(r,o,n,"aria-hidden")):function(){return null}},ft=function(){return ft=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},ft.apply(this,arguments)};function Ac(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,r=Object.getOwnPropertySymbols(e);o<r.length;o++)t.indexOf(r[o])<0&&Object.prototype.propertyIsEnumerable.call(e,r[o])&&(n[r[o]]=e[r[o]]);return n}function dv(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,a;r<o;r++)(a||!(r in t))&&(a||(a=Array.prototype.slice.call(t,0,r)),a[r]=t[r]);return e.concat(a||Array.prototype.slice.call(t))}var Pr="right-scroll-bar-position",Ar="width-before-scroll-bar",fv="with-scroll-bars-hidden",mv="--removed-body-scroll-bar-size";function Io(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function pv(e,t){var n=x.useState(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(r){var o=n.value;o!==r&&(n.value=r,n.callback(r,o))}}}})[0];return n.callback=t,n.facade}var hv=typeof window<"u"?f.useLayoutEffect:f.useEffect,Qs=new WeakMap;function gv(e,t){var n=pv(null,function(r){return e.forEach(function(o){return Io(o,r)})});return hv(function(){var r=Qs.get(n);if(r){var o=new Set(r),a=new Set(e),s=n.current;o.forEach(function(i){a.has(i)||Io(i,null)}),a.forEach(function(i){o.has(i)||Io(i,s)})}Qs.set(n,e)},[e]),n}function vv(e){return e}function yv(e,t){t===void 0&&(t=vv);var n=[],r=!1,o={read:function(){if(r)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(a){var s=t(a,r);return n.push(s),function(){n=n.filter(function(i){return i!==s})}},assignSyncMedium:function(a){for(r=!0;n.length;){var s=n;n=[],s.forEach(a)}n={push:function(i){return a(i)},filter:function(){return n}}},assignMedium:function(a){r=!0;var s=[];if(n.length){var i=n;n=[],i.forEach(a),s=n}var l=function(){var m=s;s=[],m.forEach(a)},u=function(){return Promise.resolve().then(l)};u(),n={push:function(m){s.push(m),u()},filter:function(m){return s=s.filter(m),n}}}};return o}function bv(e){e===void 0&&(e={});var t=yv(null);return t.options=ft({async:!0,ssr:!1},e),t}var Ic=function(e){var t=e.sideCar,n=Ac(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return f.createElement(r,ft({},n))};Ic.isSideCarExport=!0;function wv(e,t){return e.useMedium(t),Ic}var jc=bv(),jo=function(){},so=f.forwardRef(function(e,t){var n=f.useRef(null),r=f.useState({onScrollCapture:jo,onWheelCapture:jo,onTouchMoveCapture:jo}),o=r[0],a=r[1],s=e.forwardProps,i=e.children,l=e.className,u=e.removeScrollBar,m=e.enabled,c=e.shards,p=e.sideCar,h=e.noRelative,y=e.noIsolation,v=e.inert,g=e.allowPinchZoom,b=e.as,w=b===void 0?"div":b,S=e.gapMode,D=Ac(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),C=p,R=gv([n,t]),M=ft(ft({},D),o);return f.createElement(f.Fragment,null,m&&f.createElement(C,{sideCar:jc,removeScrollBar:u,shards:c,noRelative:h,noIsolation:y,inert:v,setCallbacks:a,allowPinchZoom:!!g,lockRef:n,gapMode:S}),s?f.cloneElement(f.Children.only(i),ft(ft({},M),{ref:R})):f.createElement(w,ft({},M,{className:l,ref:R}),i))});so.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};so.classNames={fullWidth:Ar,zeroRight:Pr};var xv=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Sv(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=xv();return t&&e.setAttribute("nonce",t),e}function Cv(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Mv(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Dv=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Sv())&&(Cv(t,n),Mv(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},kv=function(){var e=Dv();return function(t,n){f.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},$c=function(){var e=kv(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},Ev={left:0,top:0,right:0,gap:0},$o=function(e){return parseInt(e||"",10)||0},Nv=function(e){var t=window.getComputedStyle(document.body),n=t[e==="padding"?"paddingLeft":"marginLeft"],r=t[e==="padding"?"paddingTop":"marginTop"],o=t[e==="padding"?"paddingRight":"marginRight"];return[$o(n),$o(r),$o(o)]},Rv=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Ev;var t=Nv(e),n=document.documentElement.clientWidth,r=window.innerWidth;return{left:t[0],top:t[1],right:t[2],gap:Math.max(0,r-n+t[2]-t[0])}},Tv=$c(),yn="data-scroll-locked",_v=function(e,t,n,r){var o=e.left,a=e.top,s=e.right,i=e.gap;return n===void 0&&(n="margin"),`
112
+ .`.concat(fv,` {
113
113
  overflow: hidden `).concat(r,`;
114
114
  padding-right: `).concat(i,"px ").concat(r,`;
115
115
  }
116
- body[`).concat(hn,`] {
116
+ body[`).concat(yn,`] {
117
117
  overflow: hidden `).concat(r,`;
118
118
  overscroll-behavior: contain;
119
119
  `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
@@ -126,59 +126,59 @@
126
126
  `),n==="padding"&&"padding-right: ".concat(i,"px ").concat(r,";")].filter(Boolean).join(""),`
127
127
  }
128
128
 
129
- .`).concat(Tr,` {
129
+ .`).concat(Pr,` {
130
130
  right: `).concat(i,"px ").concat(r,`;
131
131
  }
132
132
 
133
- .`).concat(Or,` {
133
+ .`).concat(Ar,` {
134
134
  margin-right: `).concat(i,"px ").concat(r,`;
135
135
  }
136
136
 
137
- .`).concat(Tr," .").concat(Tr,` {
137
+ .`).concat(Pr," .").concat(Pr,` {
138
138
  right: 0 `).concat(r,`;
139
139
  }
140
140
 
141
- .`).concat(Or," .").concat(Or,` {
141
+ .`).concat(Ar," .").concat(Ar,` {
142
142
  margin-right: 0 `).concat(r,`;
143
143
  }
144
144
 
145
- body[`).concat(hn,`] {
146
- `).concat(Vg,": ").concat(i,`px;
145
+ body[`).concat(yn,`] {
146
+ `).concat(mv,": ").concat(i,`px;
147
147
  }
148
- `)},Hs=function(){var e=parseInt(document.body.getAttribute(hn)||"0",10);return isFinite(e)?e:0},mv=function(){f.useEffect(function(){return document.body.setAttribute(hn,(Hs()+1).toString()),function(){var e=Hs()-1;e<=0?document.body.removeAttribute(hn):document.body.setAttribute(hn,e.toString())}},[])},pv=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;mv();var a=f.useMemo(function(){return uv(o)},[o]);return f.createElement(dv,{styles:fv(a,!t,o,n?"":"!important")})},ra=!1;if(typeof window<"u")try{var Cr=Object.defineProperty({},"passive",{get:function(){return ra=!0,!0}});window.addEventListener("test",Cr,Cr),window.removeEventListener("test",Cr,Cr)}catch{ra=!1}var ln=ra?{passive:!1}:!1,hv=function(e){return e.tagName==="TEXTAREA"},Mc=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!hv(e)&&n[t]==="visible")},gv=function(e){return Mc(e,"overflowY")},vv=function(e){return Mc(e,"overflowX")},zs=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=Ec(e,r);if(o){var a=kc(e,r),s=a[1],i=a[2];if(s>i)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},yv=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},bv=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},Ec=function(e,t){return e==="v"?gv(t):vv(t)},kc=function(e,t){return e==="v"?yv(t):bv(t)},wv=function(e,t){return e==="h"&&t==="rtl"?-1:1},xv=function(e,t,n,r,o){var a=wv(e,window.getComputedStyle(t).direction),s=a*r,i=n.target,l=t.contains(i),u=!1,m=s>0,c=0,p=0;do{if(!i)break;var h=kc(e,i),y=h[0],g=h[1],v=h[2],w=g-v-a*y;(y||w)&&Ec(e,i)&&(c+=w,p+=y);var x=i.parentNode;i=x&&x.nodeType===Node.DOCUMENT_FRAGMENT_NODE?x.host:x}while(!l&&i!==document.body||l&&(t.contains(i)||t===i));return(m&&Math.abs(c)<1||!m&&Math.abs(p)<1)&&(u=!0),u},Mr=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Gs=function(e){return[e.deltaX,e.deltaY]},Us=function(e){return e&&"current"in e?e.current:e},Sv=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Cv=function(e){return`
148
+ `)},Js=function(){var e=parseInt(document.body.getAttribute(yn)||"0",10);return isFinite(e)?e:0},Ov=function(){f.useEffect(function(){return document.body.setAttribute(yn,(Js()+1).toString()),function(){var e=Js()-1;e<=0?document.body.removeAttribute(yn):document.body.setAttribute(yn,e.toString())}},[])},Pv=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;Ov();var a=f.useMemo(function(){return Rv(o)},[o]);return f.createElement(Tv,{styles:_v(a,!t,o,n?"":"!important")})},ca=!1;if(typeof window<"u")try{var kr=Object.defineProperty({},"passive",{get:function(){return ca=!0,!0}});window.addEventListener("test",kr,kr),window.removeEventListener("test",kr,kr)}catch{ca=!1}var fn=ca?{passive:!1}:!1,Av=function(e){return e.tagName==="TEXTAREA"},Lc=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!Av(e)&&n[t]==="visible")},Iv=function(e){return Lc(e,"overflowY")},jv=function(e){return Lc(e,"overflowX")},ei=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=Fc(e,r);if(o){var a=Wc(e,r),s=a[1],i=a[2];if(s>i)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},$v=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},Lv=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},Fc=function(e,t){return e==="v"?Iv(t):jv(t)},Wc=function(e,t){return e==="v"?$v(t):Lv(t)},Fv=function(e,t){return e==="h"&&t==="rtl"?-1:1},Wv=function(e,t,n,r,o){var a=Fv(e,window.getComputedStyle(t).direction),s=a*r,i=n.target,l=t.contains(i),u=!1,m=s>0,c=0,p=0;do{if(!i)break;var h=Wc(e,i),y=h[0],v=h[1],g=h[2],b=v-g-a*y;(y||b)&&Fc(e,i)&&(c+=b,p+=y);var w=i.parentNode;i=w&&w.nodeType===Node.DOCUMENT_FRAGMENT_NODE?w.host:w}while(!l&&i!==document.body||l&&(t.contains(i)||t===i));return(m&&Math.abs(c)<1||!m&&Math.abs(p)<1)&&(u=!0),u},Er=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},ti=function(e){return[e.deltaX,e.deltaY]},ni=function(e){return e&&"current"in e?e.current:e},Bv=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Yv=function(e){return`
149
149
  .block-interactivity-`.concat(e,` {pointer-events: none;}
150
150
  .allow-interactivity-`).concat(e,` {pointer-events: all;}
151
- `)},Mv=0,un=[];function Ev(e){var t=f.useRef([]),n=f.useRef([0,0]),r=f.useRef(),o=f.useState(Mv++)[0],a=f.useState(Cc)[0],s=f.useRef(e);f.useEffect(function(){s.current=e},[e]),f.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var g=Ug([e.lockRef.current],(e.shards||[]).map(Us),!0).filter(Boolean);return g.forEach(function(v){return v.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),g.forEach(function(v){return v.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var i=f.useCallback(function(g,v){if("touches"in g&&g.touches.length===2||g.type==="wheel"&&g.ctrlKey)return!s.current.allowPinchZoom;var w=Mr(g),x=n.current,S="deltaX"in g?g.deltaX:x[0]-w[0],k="deltaY"in g?g.deltaY:x[1]-w[1],C,N=g.target,M=Math.abs(S)>Math.abs(k)?"h":"v";if("touches"in g&&M==="h"&&N.type==="range")return!1;var D=zs(M,N);if(!D)return!0;if(D?C=M:(C=M==="v"?"h":"v",D=zs(M,N)),!D)return!1;if(!r.current&&"changedTouches"in g&&(S||k)&&(r.current=C),!C)return!0;var L=r.current||C;return xv(L,v,g,L==="h"?S:k)},[]),l=f.useCallback(function(g){var v=g;if(!(!un.length||un[un.length-1]!==a)){var w="deltaY"in v?Gs(v):Mr(v),x=t.current.filter(function(C){return C.name===v.type&&(C.target===v.target||v.target===C.shadowParent)&&Sv(C.delta,w)})[0];if(x&&x.should){v.cancelable&&v.preventDefault();return}if(!x){var S=(s.current.shards||[]).map(Us).filter(Boolean).filter(function(C){return C.contains(v.target)}),k=S.length>0?i(v,S[0]):!s.current.noIsolation;k&&v.cancelable&&v.preventDefault()}}},[]),u=f.useCallback(function(g,v,w,x){var S={name:g,delta:v,target:w,should:x,shadowParent:kv(w)};t.current.push(S),setTimeout(function(){t.current=t.current.filter(function(k){return k!==S})},1)},[]),m=f.useCallback(function(g){n.current=Mr(g),r.current=void 0},[]),c=f.useCallback(function(g){u(g.type,Gs(g),g.target,i(g,e.lockRef.current))},[]),p=f.useCallback(function(g){u(g.type,Mr(g),g.target,i(g,e.lockRef.current))},[]);f.useEffect(function(){return un.push(a),e.setCallbacks({onScrollCapture:c,onWheelCapture:c,onTouchMoveCapture:p}),document.addEventListener("wheel",l,ln),document.addEventListener("touchmove",l,ln),document.addEventListener("touchstart",m,ln),function(){un=un.filter(function(g){return g!==a}),document.removeEventListener("wheel",l,ln),document.removeEventListener("touchmove",l,ln),document.removeEventListener("touchstart",m,ln)}},[]);var h=e.removeScrollBar,y=e.inert;return f.createElement(f.Fragment,null,y?f.createElement(a,{styles:Cv(o)}):null,h?f.createElement(pv,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function kv(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Nv=tv(Sc,Ev);var ar=f.forwardRef(function(e,t){return f.createElement(ro,ft({},e,{ref:t,sideCar:Nv}))});ar.classNames=ro.classNames;var oo="Popover",[Nc,NM]=Ye(oo,[$t]),sr=$t(),[Dv,Lt]=Nc(oo),Dc=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:o,onOpenChange:a,modal:s=!1}=e,i=sr(t),l=f.useRef(null),[u,m]=f.useState(!1),[c,p]=tt({prop:r,defaultProp:o??!1,onChange:a,caller:oo});return d.jsx(nr,{...i,children:d.jsx(Dv,{scope:t,contentId:ke(),triggerRef:l,open:c,onOpenChange:p,onOpenToggle:f.useCallback(()=>p(h=>!h),[p]),hasCustomAnchor:u,onCustomAnchorAdd:f.useCallback(()=>m(!0),[]),onCustomAnchorRemove:f.useCallback(()=>m(!1),[]),modal:s,children:n})})};Dc.displayName=oo;var Rc="PopoverAnchor",Rv=f.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=Lt(Rc,n),a=sr(n),{onCustomAnchorAdd:s,onCustomAnchorRemove:i}=o;return f.useEffect(()=>(s(),()=>i()),[s,i]),d.jsx(rr,{...a,...r,ref:t})});Rv.displayName=Rc;var Tc="PopoverTrigger",Oc=f.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=Lt(Tc,n),a=sr(n),s=he(t,o.triggerRef),i=d.jsx(te.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":jc(o.open),...r,ref:s,onClick:K(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?i:d.jsx(rr,{asChild:!0,...a,children:i})});Oc.displayName=Tc;var Ia="PopoverPortal",[Tv,Ov]=Nc(Ia,{forceMount:void 0}),_c=e=>{const{__scopePopover:t,forceMount:n,children:r,container:o}=e,a=Lt(Ia,t);return d.jsx(Tv,{scope:t,forceMount:n,children:d.jsx(He,{present:n||a.open,children:d.jsx(or,{asChild:!0,container:o,children:r})})})};_c.displayName=Ia;var yn="PopoverContent",Pc=f.forwardRef((e,t)=>{const n=Ov(yn,e.__scopePopover),{forceMount:r=n.forceMount,...o}=e,a=Lt(yn,e.__scopePopover);return d.jsx(He,{present:r||a.open,children:a.modal?d.jsx(Pv,{...o,ref:t}):d.jsx(Av,{...o,ref:t})})});Pc.displayName=yn;var _v=Pt("PopoverContent.RemoveScroll"),Pv=f.forwardRef((e,t)=>{const n=Lt(yn,e.__scopePopover),r=f.useRef(null),o=he(t,r),a=f.useRef(!1);return f.useEffect(()=>{const s=r.current;if(s)return no(s)},[]),d.jsx(ar,{as:_v,allowPinchZoom:!0,children:d.jsx(Ac,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:K(e.onCloseAutoFocus,s=>{var i;s.preventDefault(),a.current||(i=n.triggerRef.current)==null||i.focus()}),onPointerDownOutside:K(e.onPointerDownOutside,s=>{const i=s.detail.originalEvent,l=i.button===0&&i.ctrlKey===!0,u=i.button===2||l;a.current=u},{checkForDefaultPrevented:!1}),onFocusOutside:K(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1})})})}),Av=f.forwardRef((e,t)=>{const n=Lt(yn,e.__scopePopover),r=f.useRef(!1),o=f.useRef(!1);return d.jsx(Ac,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var s,i;(s=e.onCloseAutoFocus)==null||s.call(e,a),a.defaultPrevented||(r.current||(i=n.triggerRef.current)==null||i.focus(),a.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:a=>{var l,u;(l=e.onInteractOutside)==null||l.call(e,a),a.defaultPrevented||(r.current=!0,a.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const s=a.target;((u=n.triggerRef.current)==null?void 0:u.contains(s))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&o.current&&a.preventDefault()}})}),Ac=f.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:a,disableOutsidePointerEvents:s,onEscapeKeyDown:i,onPointerDownOutside:l,onFocusOutside:u,onInteractOutside:m,...c}=e,p=Lt(yn,n),h=sr(n);return Xr(),d.jsx(er,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:a,children:d.jsx(kn,{asChild:!0,disableOutsidePointerEvents:s,onInteractOutside:m,onEscapeKeyDown:i,onPointerDownOutside:l,onFocusOutside:u,onDismiss:()=>p.onOpenChange(!1),children:d.jsx(eo,{"data-state":jc(p.open),role:"dialog",id:p.contentId,...h,...c,ref:t,style:{...c.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),Ic="PopoverClose",Iv=f.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=Lt(Ic,n);return d.jsx(te.button,{type:"button",...r,ref:t,onClick:K(e.onClick,()=>o.onOpenChange(!1))})});Iv.displayName=Ic;var jv="PopoverArrow",$v=f.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=sr(n);return d.jsx(to,{...o,...r,ref:t})});$v.displayName=jv;function jc(e){return e?"open":"closed"}var Lv=Dc,Fv=Oc,Wv=_c,$c=Pc;const Lc=Lv,Fc=Fv,ja=f.forwardRef(({className:e,sideOffset:t=4,...n},r)=>d.jsx(Wv,{children:d.jsx($c,{ref:r,sideOffset:t,className:q("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...n})}));ja.displayName=$c.displayName;function qs(e,[t,n]){return Math.min(n,Math.max(t,e))}function $a(e){const t=e+"CollectionProvider",[n,r]=Ye(t),[o,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),s=g=>{const{scope:v,children:w}=g,x=b.useRef(null),S=b.useRef(new Map).current;return d.jsx(o,{scope:v,itemMap:S,collectionRef:x,children:w})};s.displayName=t;const i=e+"CollectionSlot",l=Pt(i),u=b.forwardRef((g,v)=>{const{scope:w,children:x}=g,S=a(i,w),k=he(v,S.collectionRef);return d.jsx(l,{ref:k,children:x})});u.displayName=i;const m=e+"CollectionItemSlot",c="data-radix-collection-item",p=Pt(m),h=b.forwardRef((g,v)=>{const{scope:w,children:x,...S}=g,k=b.useRef(null),C=he(v,k),N=a(m,w);return b.useEffect(()=>(N.itemMap.set(k,{ref:k,...S}),()=>void N.itemMap.delete(k))),d.jsx(p,{[c]:"",ref:C,children:x})});h.displayName=m;function y(g){const v=a(e+"CollectionConsumer",g);return b.useCallback(()=>{const x=v.collectionRef.current;if(!x)return[];const S=Array.from(x.querySelectorAll(`[${c}]`));return Array.from(v.itemMap.values()).sort((N,M)=>S.indexOf(N.ref.current)-S.indexOf(M.ref.current))},[v.collectionRef,v.itemMap])}return[{Provider:s,Slot:u,ItemSlot:h},y,r]}var Bv=f.createContext(void 0);function ir(e){const t=f.useContext(Bv);return e||t||"ltr"}function La(e){const t=f.useRef({value:e,previous:e});return f.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var Wc=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),Yv="VisuallyHidden",Bc=f.forwardRef((e,t)=>d.jsx(te.span,{...e,ref:t,style:{...Wc,...e.style}}));Bc.displayName=Yv;var Hv=Bc,zv=[" ","Enter","ArrowUp","ArrowDown"],Gv=[" ","Enter"],Xt="Select",[ao,so,Uv]=$a(Xt),[Rn,DM]=Ye(Xt,[Uv,$t]),io=$t(),[qv,Ft]=Rn(Xt),[Vv,Kv]=Rn(Xt),Yc=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:a,value:s,defaultValue:i,onValueChange:l,dir:u,name:m,autoComplete:c,disabled:p,required:h,form:y}=e,g=io(t),[v,w]=f.useState(null),[x,S]=f.useState(null),[k,C]=f.useState(!1),N=ir(u),[M,D]=tt({prop:r,defaultProp:o??!1,onChange:a,caller:Xt}),[L,B]=tt({prop:s,defaultProp:i,onChange:l,caller:Xt}),F=f.useRef(null),V=v?y||!!v.closest("form"):!0,[$,I]=f.useState(new Set),_=Array.from($).map(R=>R.props.value).join(";");return d.jsx(nr,{...g,children:d.jsxs(qv,{required:h,scope:t,trigger:v,onTriggerChange:w,valueNode:x,onValueNodeChange:S,valueNodeHasChildren:k,onValueNodeHasChildrenChange:C,contentId:ke(),value:L,onValueChange:B,open:M,onOpenChange:D,dir:N,triggerPointerDownPosRef:F,disabled:p,children:[d.jsx(ao.Provider,{scope:t,children:d.jsx(Vv,{scope:e.__scopeSelect,onNativeOptionAdd:f.useCallback(R=>{I(P=>new Set(P).add(R))},[]),onNativeOptionRemove:f.useCallback(R=>{I(P=>{const E=new Set(P);return E.delete(R),E})},[]),children:n})}),V?d.jsxs(fl,{"aria-hidden":!0,required:h,tabIndex:-1,name:m,autoComplete:c,value:L,onChange:R=>B(R.target.value),disabled:p,form:y,children:[L===void 0?d.jsx("option",{value:""}):null,Array.from($)]},_):null]})})};Yc.displayName=Xt;var Hc="SelectTrigger",zc=f.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,a=io(n),s=Ft(Hc,n),i=s.disabled||r,l=he(t,s.onTriggerChange),u=so(n),m=f.useRef("touch"),[c,p,h]=pl(g=>{const v=u().filter(S=>!S.disabled),w=v.find(S=>S.value===s.value),x=hl(v,g,w);x!==void 0&&s.onValueChange(x.value)}),y=g=>{i||(s.onOpenChange(!0),h()),g&&(s.triggerPointerDownPosRef.current={x:Math.round(g.pageX),y:Math.round(g.pageY)})};return d.jsx(rr,{asChild:!0,...a,children:d.jsx(te.button,{type:"button",role:"combobox","aria-controls":s.contentId,"aria-expanded":s.open,"aria-required":s.required,"aria-autocomplete":"none",dir:s.dir,"data-state":s.open?"open":"closed",disabled:i,"data-disabled":i?"":void 0,"data-placeholder":ml(s.value)?"":void 0,...o,ref:l,onClick:K(o.onClick,g=>{g.currentTarget.focus(),m.current!=="mouse"&&y(g)}),onPointerDown:K(o.onPointerDown,g=>{m.current=g.pointerType;const v=g.target;v.hasPointerCapture(g.pointerId)&&v.releasePointerCapture(g.pointerId),g.button===0&&g.ctrlKey===!1&&g.pointerType==="mouse"&&(y(g),g.preventDefault())}),onKeyDown:K(o.onKeyDown,g=>{const v=c.current!=="";!(g.ctrlKey||g.altKey||g.metaKey)&&g.key.length===1&&p(g.key),!(v&&g.key===" ")&&zv.includes(g.key)&&(y(),g.preventDefault())})})})});zc.displayName=Hc;var Gc="SelectValue",Uc=f.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:a,placeholder:s="",...i}=e,l=Ft(Gc,n),{onValueNodeHasChildrenChange:u}=l,m=a!==void 0,c=he(t,l.onValueNodeChange);return De(()=>{u(m)},[u,m]),d.jsx(te.span,{...i,ref:c,style:{pointerEvents:"none"},children:ml(l.value)?d.jsx(d.Fragment,{children:s}):a})});Uc.displayName=Gc;var Xv="SelectIcon",qc=f.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return d.jsx(te.span,{"aria-hidden":!0,...o,ref:t,children:r||"▼"})});qc.displayName=Xv;var Zv="SelectPortal",Vc=e=>d.jsx(or,{asChild:!0,...e});Vc.displayName=Zv;var Zt="SelectContent",Kc=f.forwardRef((e,t)=>{const n=Ft(Zt,e.__scopeSelect),[r,o]=f.useState();if(De(()=>{o(new DocumentFragment)},[]),!n.open){const a=r;return a?qr.createPortal(d.jsx(Xc,{scope:e.__scopeSelect,children:d.jsx(ao.Slot,{scope:e.__scopeSelect,children:d.jsx("div",{children:e.children})})}),a):null}return d.jsx(Zc,{...e,ref:t})});Kc.displayName=Zt;var ot=10,[Xc,Wt]=Rn(Zt),Qv="SelectContentImpl",Jv=Pt("SelectContent.RemoveScroll"),Zc=f.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:a,onPointerDownOutside:s,side:i,sideOffset:l,align:u,alignOffset:m,arrowPadding:c,collisionBoundary:p,collisionPadding:h,sticky:y,hideWhenDetached:g,avoidCollisions:v,...w}=e,x=Ft(Zt,n),[S,k]=f.useState(null),[C,N]=f.useState(null),M=he(t,j=>k(j)),[D,L]=f.useState(null),[B,F]=f.useState(null),V=so(n),[$,I]=f.useState(!1),_=f.useRef(!1);f.useEffect(()=>{if(S)return no(S)},[S]),Xr();const R=f.useCallback(j=>{const[Z,...X]=V().map(de=>de.ref.current),[Q]=X.slice(-1),le=document.activeElement;for(const de of j)if(de===le||(de==null||de.scrollIntoView({block:"nearest"}),de===Z&&C&&(C.scrollTop=0),de===Q&&C&&(C.scrollTop=C.scrollHeight),de==null||de.focus(),document.activeElement!==le))return},[V,C]),P=f.useCallback(()=>R([D,S]),[R,D,S]);f.useEffect(()=>{$&&P()},[$,P]);const{onOpenChange:E,triggerPointerDownPosRef:O}=x;f.useEffect(()=>{if(S){let j={x:0,y:0};const Z=Q=>{var le,de;j={x:Math.abs(Math.round(Q.pageX)-(((le=O.current)==null?void 0:le.x)??0)),y:Math.abs(Math.round(Q.pageY)-(((de=O.current)==null?void 0:de.y)??0))}},X=Q=>{j.x<=10&&j.y<=10?Q.preventDefault():S.contains(Q.target)||E(!1),document.removeEventListener("pointermove",Z),O.current=null};return O.current!==null&&(document.addEventListener("pointermove",Z),document.addEventListener("pointerup",X,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",Z),document.removeEventListener("pointerup",X,{capture:!0})}}},[S,E,O]),f.useEffect(()=>{const j=()=>E(!1);return window.addEventListener("blur",j),window.addEventListener("resize",j),()=>{window.removeEventListener("blur",j),window.removeEventListener("resize",j)}},[E]);const[Y,G]=pl(j=>{const Z=V().filter(le=>!le.disabled),X=Z.find(le=>le.ref.current===document.activeElement),Q=hl(Z,j,X);Q&&setTimeout(()=>Q.ref.current.focus())}),T=f.useCallback((j,Z,X)=>{const Q=!_.current&&!X;(x.value!==void 0&&x.value===Z||Q)&&(L(j),Q&&(_.current=!0))},[x.value]),A=f.useCallback(()=>S==null?void 0:S.focus(),[S]),W=f.useCallback((j,Z,X)=>{const Q=!_.current&&!X;(x.value!==void 0&&x.value===Z||Q)&&F(j)},[x.value]),H=r==="popper"?oa:Qc,U=H===oa?{side:i,sideOffset:l,align:u,alignOffset:m,arrowPadding:c,collisionBoundary:p,collisionPadding:h,sticky:y,hideWhenDetached:g,avoidCollisions:v}:{};return d.jsx(Xc,{scope:n,content:S,viewport:C,onViewportChange:N,itemRefCallback:T,selectedItem:D,onItemLeave:A,itemTextRefCallback:W,focusSelectedItem:P,selectedItemText:B,position:r,isPositioned:$,searchRef:Y,children:d.jsx(ar,{as:Jv,allowPinchZoom:!0,children:d.jsx(er,{asChild:!0,trapped:x.open,onMountAutoFocus:j=>{j.preventDefault()},onUnmountAutoFocus:K(o,j=>{var Z;(Z=x.trigger)==null||Z.focus({preventScroll:!0}),j.preventDefault()}),children:d.jsx(kn,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:s,onFocusOutside:j=>j.preventDefault(),onDismiss:()=>x.onOpenChange(!1),children:d.jsx(H,{role:"listbox",id:x.contentId,"data-state":x.open?"open":"closed",dir:x.dir,onContextMenu:j=>j.preventDefault(),...w,...U,onPlaced:()=>I(!0),ref:M,style:{display:"flex",flexDirection:"column",outline:"none",...w.style},onKeyDown:K(w.onKeyDown,j=>{const Z=j.ctrlKey||j.altKey||j.metaKey;if(j.key==="Tab"&&j.preventDefault(),!Z&&j.key.length===1&&G(j.key),["ArrowUp","ArrowDown","Home","End"].includes(j.key)){let Q=V().filter(le=>!le.disabled).map(le=>le.ref.current);if(["ArrowUp","End"].includes(j.key)&&(Q=Q.slice().reverse()),["ArrowUp","ArrowDown"].includes(j.key)){const le=j.target,de=Q.indexOf(le);Q=Q.slice(de+1)}setTimeout(()=>R(Q)),j.preventDefault()}})})})})})})});Zc.displayName=Qv;var ey="SelectItemAlignedPosition",Qc=f.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,a=Ft(Zt,n),s=Wt(Zt,n),[i,l]=f.useState(null),[u,m]=f.useState(null),c=he(t,M=>m(M)),p=so(n),h=f.useRef(!1),y=f.useRef(!0),{viewport:g,selectedItem:v,selectedItemText:w,focusSelectedItem:x}=s,S=f.useCallback(()=>{if(a.trigger&&a.valueNode&&i&&u&&g&&v&&w){const M=a.trigger.getBoundingClientRect(),D=u.getBoundingClientRect(),L=a.valueNode.getBoundingClientRect(),B=w.getBoundingClientRect();if(a.dir!=="rtl"){const le=B.left-D.left,de=L.left-le,xe=M.left-de,re=M.width+xe,ze=Math.max(re,D.width),We=window.innerWidth-ot,ie=qs(de,[ot,Math.max(ot,We-ze)]);i.style.minWidth=re+"px",i.style.left=ie+"px"}else{const le=D.right-B.right,de=window.innerWidth-L.right-le,xe=window.innerWidth-M.right-de,re=M.width+xe,ze=Math.max(re,D.width),We=window.innerWidth-ot,ie=qs(de,[ot,Math.max(ot,We-ze)]);i.style.minWidth=re+"px",i.style.right=ie+"px"}const F=p(),V=window.innerHeight-ot*2,$=g.scrollHeight,I=window.getComputedStyle(u),_=parseInt(I.borderTopWidth,10),R=parseInt(I.paddingTop,10),P=parseInt(I.borderBottomWidth,10),E=parseInt(I.paddingBottom,10),O=_+R+$+E+P,Y=Math.min(v.offsetHeight*5,O),G=window.getComputedStyle(g),T=parseInt(G.paddingTop,10),A=parseInt(G.paddingBottom,10),W=M.top+M.height/2-ot,H=V-W,U=v.offsetHeight/2,j=v.offsetTop+U,Z=_+R+j,X=O-Z;if(Z<=W){const le=F.length>0&&v===F[F.length-1].ref.current;i.style.bottom="0px";const de=u.clientHeight-g.offsetTop-g.offsetHeight,xe=Math.max(H,U+(le?A:0)+de+P),re=Z+xe;i.style.height=re+"px"}else{const le=F.length>0&&v===F[0].ref.current;i.style.top="0px";const xe=Math.max(W,_+g.offsetTop+(le?T:0)+U)+X;i.style.height=xe+"px",g.scrollTop=Z-W+g.offsetTop}i.style.margin=`${ot}px 0`,i.style.minHeight=Y+"px",i.style.maxHeight=V+"px",r==null||r(),requestAnimationFrame(()=>h.current=!0)}},[p,a.trigger,a.valueNode,i,u,g,v,w,a.dir,r]);De(()=>S(),[S]);const[k,C]=f.useState();De(()=>{u&&C(window.getComputedStyle(u).zIndex)},[u]);const N=f.useCallback(M=>{M&&y.current===!0&&(S(),x==null||x(),y.current=!1)},[S,x]);return d.jsx(ny,{scope:n,contentWrapper:i,shouldExpandOnScrollRef:h,onScrollButtonChange:N,children:d.jsx("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:k},children:d.jsx(te.div,{...o,ref:c,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});Qc.displayName=ey;var ty="SelectPopperPosition",oa=f.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=ot,...a}=e,s=io(n);return d.jsx(eo,{...s,...a,ref:t,align:r,collisionPadding:o,style:{boxSizing:"border-box",...a.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});oa.displayName=ty;var[ny,Fa]=Rn(Zt,{}),aa="SelectViewport",Jc=f.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...o}=e,a=Wt(aa,n),s=Fa(aa,n),i=he(t,a.onViewportChange),l=f.useRef(0);return d.jsxs(d.Fragment,{children:[d.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),d.jsx(ao.Slot,{scope:n,children:d.jsx(te.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:i,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:K(o.onScroll,u=>{const m=u.currentTarget,{contentWrapper:c,shouldExpandOnScrollRef:p}=s;if(p!=null&&p.current&&c){const h=Math.abs(l.current-m.scrollTop);if(h>0){const y=window.innerHeight-ot*2,g=parseFloat(c.style.minHeight),v=parseFloat(c.style.height),w=Math.max(g,v);if(w<y){const x=w+h,S=Math.min(y,x),k=x-S;c.style.height=S+"px",c.style.bottom==="0px"&&(m.scrollTop=k>0?k:0,c.style.justifyContent="flex-end")}}}l.current=m.scrollTop})})})]})});Jc.displayName=aa;var el="SelectGroup",[ry,oy]=Rn(el),ay=f.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=ke();return d.jsx(ry,{scope:n,id:o,children:d.jsx(te.div,{role:"group","aria-labelledby":o,...r,ref:t})})});ay.displayName=el;var tl="SelectLabel",nl=f.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=oy(tl,n);return d.jsx(te.div,{id:o.id,...r,ref:t})});nl.displayName=tl;var Fr="SelectItem",[sy,rl]=Rn(Fr),ol=f.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:a,...s}=e,i=Ft(Fr,n),l=Wt(Fr,n),u=i.value===r,[m,c]=f.useState(a??""),[p,h]=f.useState(!1),y=he(t,x=>{var S;return(S=l.itemRefCallback)==null?void 0:S.call(l,x,r,o)}),g=ke(),v=f.useRef("touch"),w=()=>{o||(i.onValueChange(r),i.onOpenChange(!1))};if(r==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return d.jsx(sy,{scope:n,value:r,disabled:o,textId:g,isSelected:u,onItemTextChange:f.useCallback(x=>{c(S=>S||((x==null?void 0:x.textContent)??"").trim())},[]),children:d.jsx(ao.ItemSlot,{scope:n,value:r,disabled:o,textValue:m,children:d.jsx(te.div,{role:"option","aria-labelledby":g,"data-highlighted":p?"":void 0,"aria-selected":u&&p,"data-state":u?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...s,ref:y,onFocus:K(s.onFocus,()=>h(!0)),onBlur:K(s.onBlur,()=>h(!1)),onClick:K(s.onClick,()=>{v.current!=="mouse"&&w()}),onPointerUp:K(s.onPointerUp,()=>{v.current==="mouse"&&w()}),onPointerDown:K(s.onPointerDown,x=>{v.current=x.pointerType}),onPointerMove:K(s.onPointerMove,x=>{var S;v.current=x.pointerType,o?(S=l.onItemLeave)==null||S.call(l):v.current==="mouse"&&x.currentTarget.focus({preventScroll:!0})}),onPointerLeave:K(s.onPointerLeave,x=>{var S;x.currentTarget===document.activeElement&&((S=l.onItemLeave)==null||S.call(l))}),onKeyDown:K(s.onKeyDown,x=>{var k;((k=l.searchRef)==null?void 0:k.current)!==""&&x.key===" "||(Gv.includes(x.key)&&w(),x.key===" "&&x.preventDefault())})})})})});ol.displayName=Fr;var Yn="SelectItemText",al=f.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,...a}=e,s=Ft(Yn,n),i=Wt(Yn,n),l=rl(Yn,n),u=Kv(Yn,n),[m,c]=f.useState(null),p=he(t,w=>c(w),l.onItemTextChange,w=>{var x;return(x=i.itemTextRefCallback)==null?void 0:x.call(i,w,l.value,l.disabled)}),h=m==null?void 0:m.textContent,y=f.useMemo(()=>d.jsx("option",{value:l.value,disabled:l.disabled,children:h},l.value),[l.disabled,l.value,h]),{onNativeOptionAdd:g,onNativeOptionRemove:v}=u;return De(()=>(g(y),()=>v(y)),[g,v,y]),d.jsxs(d.Fragment,{children:[d.jsx(te.span,{id:l.textId,...a,ref:p}),l.isSelected&&s.valueNode&&!s.valueNodeHasChildren?qr.createPortal(a.children,s.valueNode):null]})});al.displayName=Yn;var sl="SelectItemIndicator",il=f.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return rl(sl,n).isSelected?d.jsx(te.span,{"aria-hidden":!0,...r,ref:t}):null});il.displayName=sl;var sa="SelectScrollUpButton",cl=f.forwardRef((e,t)=>{const n=Wt(sa,e.__scopeSelect),r=Fa(sa,e.__scopeSelect),[o,a]=f.useState(!1),s=he(t,r.onScrollButtonChange);return De(()=>{if(n.viewport&&n.isPositioned){let i=function(){const u=l.scrollTop>0;a(u)};const l=n.viewport;return i(),l.addEventListener("scroll",i),()=>l.removeEventListener("scroll",i)}},[n.viewport,n.isPositioned]),o?d.jsx(ul,{...e,ref:s,onAutoScroll:()=>{const{viewport:i,selectedItem:l}=n;i&&l&&(i.scrollTop=i.scrollTop-l.offsetHeight)}}):null});cl.displayName=sa;var ia="SelectScrollDownButton",ll=f.forwardRef((e,t)=>{const n=Wt(ia,e.__scopeSelect),r=Fa(ia,e.__scopeSelect),[o,a]=f.useState(!1),s=he(t,r.onScrollButtonChange);return De(()=>{if(n.viewport&&n.isPositioned){let i=function(){const u=l.scrollHeight-l.clientHeight,m=Math.ceil(l.scrollTop)<u;a(m)};const l=n.viewport;return i(),l.addEventListener("scroll",i),()=>l.removeEventListener("scroll",i)}},[n.viewport,n.isPositioned]),o?d.jsx(ul,{...e,ref:s,onAutoScroll:()=>{const{viewport:i,selectedItem:l}=n;i&&l&&(i.scrollTop=i.scrollTop+l.offsetHeight)}}):null});ll.displayName=ia;var ul=f.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,a=Wt("SelectScrollButton",n),s=f.useRef(null),i=so(n),l=f.useCallback(()=>{s.current!==null&&(window.clearInterval(s.current),s.current=null)},[]);return f.useEffect(()=>()=>l(),[l]),De(()=>{var m;const u=i().find(c=>c.ref.current===document.activeElement);(m=u==null?void 0:u.ref.current)==null||m.scrollIntoView({block:"nearest"})},[i]),d.jsx(te.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:K(o.onPointerDown,()=>{s.current===null&&(s.current=window.setInterval(r,50))}),onPointerMove:K(o.onPointerMove,()=>{var u;(u=a.onItemLeave)==null||u.call(a),s.current===null&&(s.current=window.setInterval(r,50))}),onPointerLeave:K(o.onPointerLeave,()=>{l()})})}),iy="SelectSeparator",dl=f.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return d.jsx(te.div,{"aria-hidden":!0,...r,ref:t})});dl.displayName=iy;var ca="SelectArrow",cy=f.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=io(n),a=Ft(ca,n),s=Wt(ca,n);return a.open&&s.position==="popper"?d.jsx(to,{...o,...r,ref:t}):null});cy.displayName=ca;var ly="SelectBubbleInput",fl=f.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const o=f.useRef(null),a=he(r,o),s=La(t);return f.useEffect(()=>{const i=o.current;if(!i)return;const l=window.HTMLSelectElement.prototype,m=Object.getOwnPropertyDescriptor(l,"value").set;if(s!==t&&m){const c=new Event("change",{bubbles:!0});m.call(i,t),i.dispatchEvent(c)}},[s,t]),d.jsx(te.select,{...n,style:{...Wc,...n.style},ref:a,defaultValue:t})});fl.displayName=ly;function ml(e){return e===""||e===void 0}function pl(e){const t=et(e),n=f.useRef(""),r=f.useRef(0),o=f.useCallback(s=>{const i=n.current+s;t(i),function l(u){n.current=u,window.clearTimeout(r.current),u!==""&&(r.current=window.setTimeout(()=>l(""),1e3))}(i)},[t]),a=f.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return f.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,o,a]}function hl(e,t,n){const o=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,a=n?e.indexOf(n):-1;let s=uy(e,Math.max(a,0));o.length===1&&(s=s.filter(u=>u!==n));const l=s.find(u=>u.textValue.toLowerCase().startsWith(o.toLowerCase()));return l!==n?l:void 0}function uy(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var dy=Yc,gl=zc,fy=Uc,my=qc,py=Vc,vl=Kc,hy=Jc,yl=nl,bl=ol,gy=al,vy=il,wl=cl,xl=ll,Sl=dl;const la=dy,ua=fy,Wr=f.forwardRef(({className:e,children:t,...n},r)=>d.jsxs(gl,{ref:r,className:q("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background data-[placeholder]:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...n,children:[t,d.jsx(my,{asChild:!0,children:d.jsx(Kr,{strokeWidth:1.5,className:"h-4 w-4 text-foreground"})})]}));Wr.displayName=gl.displayName;const Cl=f.forwardRef(({className:e,...t},n)=>d.jsx(wl,{ref:n,className:q("flex cursor-default items-center justify-center py-1",e),...t,children:d.jsx(Ap,{className:"h-4 w-4"})}));Cl.displayName=wl.displayName;const Ml=f.forwardRef(({className:e,...t},n)=>d.jsx(xl,{ref:n,className:q("flex cursor-default items-center justify-center py-1",e),...t,children:d.jsx(Kr,{className:"h-4 w-4"})}));Ml.displayName=xl.displayName;const Br=f.forwardRef(({className:e,children:t,position:n="popper",...r},o)=>d.jsx(py,{children:d.jsxs(vl,{ref:o,className:q("relative z-50 max-h-[--radix-select-content-available-height] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-select-content-transform-origin]",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,...r,children:[d.jsx(Cl,{}),d.jsx(hy,{className:q("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),d.jsx(Ml,{})]})}));Br.displayName=vl.displayName;const yy=f.forwardRef(({className:e,...t},n)=>d.jsx(yl,{ref:n,className:q("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}));yy.displayName=yl.displayName;const Yr=f.forwardRef(({className:e,children:t,...n},r)=>d.jsxs(bl,{ref:r,className:q("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[d.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:d.jsx(vy,{children:d.jsx(Jn,{className:"h-4 w-4"})})}),d.jsx(gy,{children:t})]}));Yr.displayName=bl.displayName;const by=f.forwardRef(({className:e,...t},n)=>d.jsx(Sl,{ref:n,className:q("-mx-1 my-1 h-px bg-muted",e),...t}));by.displayName=Sl.displayName;const Ao={},Hn={};function Gn(e,t){try{const r=(Ao[e]||(Ao[e]=new Intl.DateTimeFormat("en-GB",{timeZone:e,hour:"numeric",timeZoneName:"longOffset"}).format))(t).split("GMT")[1]||"";return r in Hn?Hn[r]:Vs(r,r.split(":"))}catch{if(e in Hn)return Hn[e];const n=e==null?void 0:e.match(wy);return n?Vs(e,n.slice(1)):NaN}}const wy=/([+-]\d\d):?(\d\d)?/;function Vs(e,t){const n=+t[0],r=+(t[1]||0);return Hn[e]=n>0?n*60+r:n*60-r}class pt extends Date{constructor(...t){super(),t.length>1&&typeof t[t.length-1]=="string"&&(this.timeZone=t.pop()),this.internal=new Date,isNaN(Gn(this.timeZone,this))?this.setTime(NaN):t.length?typeof t[0]=="number"&&(t.length===1||t.length===2&&typeof t[1]!="number")?this.setTime(t[0]):typeof t[0]=="string"?this.setTime(+new Date(t[0])):t[0]instanceof Date?this.setTime(+t[0]):(this.setTime(+new Date(...t)),El(this),da(this)):this.setTime(Date.now())}static tz(t,...n){return n.length?new pt(...n,t):new pt(Date.now(),t)}withTimeZone(t){return new pt(+this,t)}getTimezoneOffset(){return-Gn(this.timeZone,this)}setTime(t){return Date.prototype.setTime.apply(this,arguments),da(this),+this}[Symbol.for("constructDateFrom")](t){return new pt(+new Date(t),this.timeZone)}}const Ks=/^(get|set)(?!UTC)/;Object.getOwnPropertyNames(Date.prototype).forEach(e=>{if(!Ks.test(e))return;const t=e.replace(Ks,"$1UTC");pt.prototype[t]&&(e.startsWith("get")?pt.prototype[e]=function(){return this.internal[t]()}:(pt.prototype[e]=function(){return Date.prototype[t].apply(this.internal,arguments),xy(this),+this},pt.prototype[t]=function(){return Date.prototype[t].apply(this,arguments),da(this),+this}))});function da(e){e.internal.setTime(+e),e.internal.setUTCMinutes(e.internal.getUTCMinutes()-e.getTimezoneOffset())}function xy(e){Date.prototype.setFullYear.call(e,e.internal.getUTCFullYear(),e.internal.getUTCMonth(),e.internal.getUTCDate()),Date.prototype.setHours.call(e,e.internal.getUTCHours(),e.internal.getUTCMinutes(),e.internal.getUTCSeconds(),e.internal.getUTCMilliseconds()),El(e)}function El(e){const t=Gn(e.timeZone,e),n=new Date(+e);n.setUTCHours(n.getUTCHours()-1);const r=-new Date(+e).getTimezoneOffset(),o=-new Date(+n).getTimezoneOffset(),a=r-o,s=Date.prototype.getHours.apply(e)!==e.internal.getUTCHours();a&&s&&e.internal.setUTCMinutes(e.internal.getUTCMinutes()+a);const i=r-t;i&&Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+i);const l=Gn(e.timeZone,e),m=-new Date(+e).getTimezoneOffset()-l,c=l!==t,p=m-i;if(c&&p){Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+p);const h=Gn(e.timeZone,e),y=l-h;y&&(e.internal.setUTCMinutes(e.internal.getUTCMinutes()+y),Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+y))}}class Le extends pt{static tz(t,...n){return n.length?new Le(...n,t):new Le(Date.now(),t)}toISOString(){const[t,n,r]=this.tzComponents(),o=`${t}${n}:${r}`;return this.internal.toISOString().slice(0,-1)+o}toString(){return`${this.toDateString()} ${this.toTimeString()}`}toDateString(){const[t,n,r,o]=this.internal.toUTCString().split(" ");return`${t==null?void 0:t.slice(0,-1)} ${r} ${n} ${o}`}toTimeString(){const t=this.internal.toUTCString().split(" ")[4],[n,r,o]=this.tzComponents();return`${t} GMT${n}${r}${o} (${Sy(this.timeZone,this)})`}toLocaleString(t,n){return Date.prototype.toLocaleString.call(this,t,{...n,timeZone:(n==null?void 0:n.timeZone)||this.timeZone})}toLocaleDateString(t,n){return Date.prototype.toLocaleDateString.call(this,t,{...n,timeZone:(n==null?void 0:n.timeZone)||this.timeZone})}toLocaleTimeString(t,n){return Date.prototype.toLocaleTimeString.call(this,t,{...n,timeZone:(n==null?void 0:n.timeZone)||this.timeZone})}tzComponents(){const t=this.getTimezoneOffset(),n=t>0?"-":"+",r=String(Math.floor(Math.abs(t)/60)).padStart(2,"0"),o=String(Math.abs(t)%60).padStart(2,"0");return[n,r,o]}withTimeZone(t){return new Le(+this,t)}[Symbol.for("constructDateFrom")](t){return new Le(+new Date(t),this.timeZone)}}function Sy(e,t){return new Intl.DateTimeFormat("en-GB",{timeZone:e,timeZoneName:"long"}).format(t).slice(12)}var se;(function(e){e.Root="root",e.Chevron="chevron",e.Day="day",e.DayButton="day_button",e.CaptionLabel="caption_label",e.Dropdowns="dropdowns",e.Dropdown="dropdown",e.DropdownRoot="dropdown_root",e.Footer="footer",e.MonthGrid="month_grid",e.MonthCaption="month_caption",e.MonthsDropdown="months_dropdown",e.Month="month",e.Months="months",e.Nav="nav",e.NextMonthButton="button_next",e.PreviousMonthButton="button_previous",e.Week="week",e.Weeks="weeks",e.Weekday="weekday",e.Weekdays="weekdays",e.WeekNumber="week_number",e.WeekNumberHeader="week_number_header",e.YearsDropdown="years_dropdown"})(se||(se={}));var Ee;(function(e){e.disabled="disabled",e.hidden="hidden",e.outside="outside",e.focused="focused",e.today="today"})(Ee||(Ee={}));var at;(function(e){e.range_end="range_end",e.range_middle="range_middle",e.range_start="range_start",e.selected="selected"})(at||(at={}));var Ke;(function(e){e.weeks_before_enter="weeks_before_enter",e.weeks_before_exit="weeks_before_exit",e.weeks_after_enter="weeks_after_enter",e.weeks_after_exit="weeks_after_exit",e.caption_after_enter="caption_after_enter",e.caption_after_exit="caption_after_exit",e.caption_before_enter="caption_before_enter",e.caption_before_exit="caption_before_exit"})(Ke||(Ke={}));const kl=6048e5,Cy=864e5,Xs=Symbol.for("constructDateFrom");function Oe(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&Xs in e?e[Xs](t):e instanceof Date?new e.constructor(t):new Date(t)}function we(e,t){return Oe(t||e,e)}function Nl(e,t,n){const r=we(e,n==null?void 0:n.in);return isNaN(t)?Oe(e,NaN):(t&&r.setDate(r.getDate()+t),r)}function Dl(e,t,n){const r=we(e,n==null?void 0:n.in);if(isNaN(t))return Oe(e,NaN);if(!t)return r;const o=r.getDate(),a=Oe(e,r.getTime());a.setMonth(r.getMonth()+t+1,0);const s=a.getDate();return o>=s?a:(r.setFullYear(a.getFullYear(),a.getMonth(),o),r)}let My={};function cr(){return My}function bn(e,t){var i,l,u,m;const n=cr(),r=(t==null?void 0:t.weekStartsOn)??((l=(i=t==null?void 0:t.locale)==null?void 0:i.options)==null?void 0:l.weekStartsOn)??n.weekStartsOn??((m=(u=n.locale)==null?void 0:u.options)==null?void 0:m.weekStartsOn)??0,o=we(e,t==null?void 0:t.in),a=o.getDay(),s=(a<r?7:0)+a-r;return o.setDate(o.getDate()-s),o.setHours(0,0,0,0),o}function Vn(e,t){return bn(e,{...t,weekStartsOn:1})}function Rl(e,t){const n=we(e,t==null?void 0:t.in),r=n.getFullYear(),o=Oe(n,0);o.setFullYear(r+1,0,4),o.setHours(0,0,0,0);const a=Vn(o),s=Oe(n,0);s.setFullYear(r,0,4),s.setHours(0,0,0,0);const i=Vn(s);return n.getTime()>=a.getTime()?r+1:n.getTime()>=i.getTime()?r:r-1}function Zs(e){const t=we(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function Tn(e,...t){const n=Oe.bind(null,t.find(r=>typeof r=="object"));return t.map(n)}function Kn(e,t){const n=we(e,t==null?void 0:t.in);return n.setHours(0,0,0,0),n}function Tl(e,t,n){const[r,o]=Tn(n==null?void 0:n.in,e,t),a=Kn(r),s=Kn(o),i=+a-Zs(a),l=+s-Zs(s);return Math.round((i-l)/Cy)}function Ey(e,t){const n=Rl(e,t),r=Oe(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),Vn(r)}function ky(e,t,n){return Nl(e,t*7,n)}function Ny(e,t,n){return Dl(e,t*12,n)}function Dy(e,t){let n,r=t==null?void 0:t.in;return e.forEach(o=>{!r&&typeof o=="object"&&(r=Oe.bind(null,o));const a=we(o,r);(!n||n<a||isNaN(+a))&&(n=a)}),Oe(r,n||NaN)}function Ry(e,t){let n,r=t==null?void 0:t.in;return e.forEach(o=>{!r&&typeof o=="object"&&(r=Oe.bind(null,o));const a=we(o,r);(!n||n>a||isNaN(+a))&&(n=a)}),Oe(r,n||NaN)}function Ty(e,t,n){const[r,o]=Tn(n==null?void 0:n.in,e,t);return+Kn(r)==+Kn(o)}function Ol(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function Oy(e){return!(!Ol(e)&&typeof e!="number"||isNaN(+we(e)))}function _y(e,t,n){const[r,o]=Tn(n==null?void 0:n.in,e,t),a=r.getFullYear()-o.getFullYear(),s=r.getMonth()-o.getMonth();return a*12+s}function Py(e,t){const n=we(e,t==null?void 0:t.in),r=n.getMonth();return n.setFullYear(n.getFullYear(),r+1,0),n.setHours(23,59,59,999),n}function Ay(e,t){const[n,r]=Tn(e,t.start,t.end);return{start:n,end:r}}function Iy(e,t){const{start:n,end:r}=Ay(t==null?void 0:t.in,e);let o=+n>+r;const a=o?+n:+r,s=o?r:n;s.setHours(0,0,0,0),s.setDate(1);let i=1;const l=[];for(;+s<=a;)l.push(Oe(n,s)),s.setMonth(s.getMonth()+i);return o?l.reverse():l}function jy(e,t){const n=we(e,t==null?void 0:t.in);return n.setDate(1),n.setHours(0,0,0,0),n}function $y(e,t){const n=we(e,t==null?void 0:t.in),r=n.getFullYear();return n.setFullYear(r+1,0,0),n.setHours(23,59,59,999),n}function _l(e,t){const n=we(e,t==null?void 0:t.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function Pl(e,t){var i,l,u,m;const n=cr(),r=(t==null?void 0:t.weekStartsOn)??((l=(i=t==null?void 0:t.locale)==null?void 0:i.options)==null?void 0:l.weekStartsOn)??n.weekStartsOn??((m=(u=n.locale)==null?void 0:u.options)==null?void 0:m.weekStartsOn)??0,o=we(e,t==null?void 0:t.in),a=o.getDay(),s=(a<r?-7:0)+6-(a-r);return o.setDate(o.getDate()+s),o.setHours(23,59,59,999),o}function Ly(e,t){return Pl(e,{...t,weekStartsOn:1})}const Fy={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},Wy=(e,t,n)=>{let r;const o=Fy[e];return typeof o=="string"?r=o:t===1?r=o.one:r=o.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function Io(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const By={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Yy={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Hy={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},zy={date:Io({formats:By,defaultWidth:"full"}),time:Io({formats:Yy,defaultWidth:"full"}),dateTime:Io({formats:Hy,defaultWidth:"full"})},Gy={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Uy=(e,t,n,r)=>Gy[e];function jn(e){return(t,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let o;if(r==="formatting"&&e.formattingValues){const s=e.defaultFormattingWidth||e.defaultWidth,i=n!=null&&n.width?String(n.width):s;o=e.formattingValues[i]||e.formattingValues[s]}else{const s=e.defaultWidth,i=n!=null&&n.width?String(n.width):e.defaultWidth;o=e.values[i]||e.values[s]}const a=e.argumentCallback?e.argumentCallback(t):t;return o[a]}}const qy={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Vy={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Ky={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},Xy={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},Zy={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},Qy={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},Jy=(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},eb={ordinalNumber:Jy,era:jn({values:qy,defaultWidth:"wide"}),quarter:jn({values:Vy,defaultWidth:"wide",argumentCallback:e=>e-1}),month:jn({values:Ky,defaultWidth:"wide"}),day:jn({values:Xy,defaultWidth:"wide"}),dayPeriod:jn({values:Zy,defaultWidth:"wide",formattingValues:Qy,defaultFormattingWidth:"wide"})};function $n(e){return(t,n={})=>{const r=n.width,o=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],a=t.match(o);if(!a)return null;const s=a[0],i=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(i)?nb(i,c=>c.test(s)):tb(i,c=>c.test(s));let u;u=e.valueCallback?e.valueCallback(l):l,u=n.valueCallback?n.valueCallback(u):u;const m=t.slice(s.length);return{value:u,rest:m}}}function tb(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function nb(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function rb(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const o=r[0],a=t.match(e.parsePattern);if(!a)return null;let s=e.valueCallback?e.valueCallback(a[0]):a[0];s=n.valueCallback?n.valueCallback(s):s;const i=t.slice(o.length);return{value:s,rest:i}}}const ob=/^(\d+)(th|st|nd|rd)?/i,ab=/\d+/i,sb={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},ib={any:[/^b/i,/^(a|c)/i]},cb={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},lb={any:[/1/i,/2/i,/3/i,/4/i]},ub={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},db={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},fb={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},mb={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},pb={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},hb={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},gb={ordinalNumber:rb({matchPattern:ob,parsePattern:ab,valueCallback:e=>parseInt(e,10)}),era:$n({matchPatterns:sb,defaultMatchWidth:"wide",parsePatterns:ib,defaultParseWidth:"any"}),quarter:$n({matchPatterns:cb,defaultMatchWidth:"wide",parsePatterns:lb,defaultParseWidth:"any",valueCallback:e=>e+1}),month:$n({matchPatterns:ub,defaultMatchWidth:"wide",parsePatterns:db,defaultParseWidth:"any"}),day:$n({matchPatterns:fb,defaultMatchWidth:"wide",parsePatterns:mb,defaultParseWidth:"any"}),dayPeriod:$n({matchPatterns:pb,defaultMatchWidth:"any",parsePatterns:hb,defaultParseWidth:"any"})},Wa={code:"en-US",formatDistance:Wy,formatLong:zy,formatRelative:Uy,localize:eb,match:gb,options:{weekStartsOn:0,firstWeekContainsDate:1}};function vb(e,t){const n=we(e,t==null?void 0:t.in);return Tl(n,_l(n))+1}function Al(e,t){const n=we(e,t==null?void 0:t.in),r=+Vn(n)-+Ey(n);return Math.round(r/kl)+1}function Il(e,t){var m,c,p,h;const n=we(e,t==null?void 0:t.in),r=n.getFullYear(),o=cr(),a=(t==null?void 0:t.firstWeekContainsDate)??((c=(m=t==null?void 0:t.locale)==null?void 0:m.options)==null?void 0:c.firstWeekContainsDate)??o.firstWeekContainsDate??((h=(p=o.locale)==null?void 0:p.options)==null?void 0:h.firstWeekContainsDate)??1,s=Oe((t==null?void 0:t.in)||e,0);s.setFullYear(r+1,0,a),s.setHours(0,0,0,0);const i=bn(s,t),l=Oe((t==null?void 0:t.in)||e,0);l.setFullYear(r,0,a),l.setHours(0,0,0,0);const u=bn(l,t);return+n>=+i?r+1:+n>=+u?r:r-1}function yb(e,t){var i,l,u,m;const n=cr(),r=(t==null?void 0:t.firstWeekContainsDate)??((l=(i=t==null?void 0:t.locale)==null?void 0:i.options)==null?void 0:l.firstWeekContainsDate)??n.firstWeekContainsDate??((m=(u=n.locale)==null?void 0:u.options)==null?void 0:m.firstWeekContainsDate)??1,o=Il(e,t),a=Oe((t==null?void 0:t.in)||e,0);return a.setFullYear(o,0,r),a.setHours(0,0,0,0),bn(a,t)}function jl(e,t){const n=we(e,t==null?void 0:t.in),r=+bn(n,t)-+yb(n,t);return Math.round(r/kl)+1}function ye(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const Tt={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return ye(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):ye(n+1,2)},d(e,t){return ye(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(e,t){return ye(e.getHours()%12||12,t.length)},H(e,t){return ye(e.getHours(),t.length)},m(e,t){return ye(e.getMinutes(),t.length)},s(e,t){return ye(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),o=Math.trunc(r*Math.pow(10,n-3));return ye(o,t.length)}},dn={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Qs={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),o=r>0?r:1-r;return n.ordinalNumber(o,{unit:"year"})}return Tt.y(e,t)},Y:function(e,t,n,r){const o=Il(e,r),a=o>0?o:1-o;if(t==="YY"){const s=a%100;return ye(s,2)}return t==="Yo"?n.ordinalNumber(a,{unit:"year"}):ye(a,t.length)},R:function(e,t){const n=Rl(e);return ye(n,t.length)},u:function(e,t){const n=e.getFullYear();return ye(n,t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return ye(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return ye(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return Tt.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return ye(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const o=jl(e,r);return t==="wo"?n.ordinalNumber(o,{unit:"week"}):ye(o,t.length)},I:function(e,t,n){const r=Al(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):ye(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):Tt.d(e,t)},D:function(e,t,n){const r=vb(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):ye(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const o=e.getDay(),a=(o-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(a);case"ee":return ye(a,2);case"eo":return n.ordinalNumber(a,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});case"eeee":default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const o=e.getDay(),a=(o-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(a);case"cc":return ye(a,t.length);case"co":return n.ordinalNumber(a,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});case"cccc":default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),o=r===0?7:r;switch(t){case"i":return String(o);case"ii":return ye(o,t.length);case"io":return n.ordinalNumber(o,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const o=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let o;switch(r===12?o=dn.noon:r===0?o=dn.midnight:o=r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let o;switch(r>=17?o=dn.evening:r>=12?o=dn.afternoon:r>=4?o=dn.morning:o=dn.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return Tt.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):Tt.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):ye(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):ye(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):Tt.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):Tt.s(e,t)},S:function(e,t){return Tt.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return ei(r);case"XXXX":case"XX":return Vt(r);case"XXXXX":case"XXX":default:return Vt(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return ei(r);case"xxxx":case"xx":return Vt(r);case"xxxxx":case"xxx":default:return Vt(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Js(r,":");case"OOOO":default:return"GMT"+Vt(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Js(r,":");case"zzzz":default:return"GMT"+Vt(r,":")}},t:function(e,t,n){const r=Math.trunc(+e/1e3);return ye(r,t.length)},T:function(e,t,n){return ye(+e,t.length)}};function Js(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Math.trunc(r/60),a=r%60;return a===0?n+String(o):n+String(o)+t+ye(a,2)}function ei(e,t){return e%60===0?(e>0?"-":"+")+ye(Math.abs(e)/60,2):Vt(e,t)}function Vt(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=ye(Math.trunc(r/60),2),a=ye(r%60,2);return n+o+t+a}const ti=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},$l=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},bb=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return ti(e,t);let a;switch(r){case"P":a=t.dateTime({width:"short"});break;case"PP":a=t.dateTime({width:"medium"});break;case"PPP":a=t.dateTime({width:"long"});break;case"PPPP":default:a=t.dateTime({width:"full"});break}return a.replace("{{date}}",ti(r,t)).replace("{{time}}",$l(o,t))},wb={p:$l,P:bb},xb=/^D+$/,Sb=/^Y+$/,Cb=["D","DD","YY","YYYY"];function Mb(e){return xb.test(e)}function Eb(e){return Sb.test(e)}function kb(e,t,n){const r=Nb(e,t,n);if(console.warn(r),Cb.includes(e))throw new RangeError(r)}function Nb(e,t,n){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const Db=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Rb=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Tb=/^'([^]*?)'?$/,Ob=/''/g,_b=/[a-zA-Z]/;function Pb(e,t,n){var m,c,p,h,y,g,v,w;const r=cr(),o=(n==null?void 0:n.locale)??r.locale??Wa,a=(n==null?void 0:n.firstWeekContainsDate)??((c=(m=n==null?void 0:n.locale)==null?void 0:m.options)==null?void 0:c.firstWeekContainsDate)??r.firstWeekContainsDate??((h=(p=r.locale)==null?void 0:p.options)==null?void 0:h.firstWeekContainsDate)??1,s=(n==null?void 0:n.weekStartsOn)??((g=(y=n==null?void 0:n.locale)==null?void 0:y.options)==null?void 0:g.weekStartsOn)??r.weekStartsOn??((w=(v=r.locale)==null?void 0:v.options)==null?void 0:w.weekStartsOn)??0,i=we(e,n==null?void 0:n.in);if(!Oy(i))throw new RangeError("Invalid time value");let l=t.match(Rb).map(x=>{const S=x[0];if(S==="p"||S==="P"){const k=wb[S];return k(x,o.formatLong)}return x}).join("").match(Db).map(x=>{if(x==="''")return{isToken:!1,value:"'"};const S=x[0];if(S==="'")return{isToken:!1,value:Ab(x)};if(Qs[S])return{isToken:!0,value:x};if(S.match(_b))throw new RangeError("Format string contains an unescaped latin alphabet character `"+S+"`");return{isToken:!1,value:x}});o.localize.preprocessor&&(l=o.localize.preprocessor(i,l));const u={firstWeekContainsDate:a,weekStartsOn:s,locale:o};return l.map(x=>{if(!x.isToken)return x.value;const S=x.value;(!(n!=null&&n.useAdditionalWeekYearTokens)&&Eb(S)||!(n!=null&&n.useAdditionalDayOfYearTokens)&&Mb(S))&&kb(S,t,String(e));const k=Qs[S[0]];return k(i,S,o.localize,u)}).join("")}function Ab(e){const t=e.match(Tb);return t?t[1].replace(Ob,"'"):e}function Ib(e,t){const n=we(e,t==null?void 0:t.in),r=n.getFullYear(),o=n.getMonth(),a=Oe(n,0);return a.setFullYear(r,o+1,0),a.setHours(0,0,0,0),a.getDate()}function jb(e,t){return we(e,t==null?void 0:t.in).getMonth()}function $b(e,t){return we(e,t==null?void 0:t.in).getFullYear()}function Lb(e,t){return+we(e)>+we(t)}function Fb(e,t){return+we(e)<+we(t)}function Wb(e,t,n){const[r,o]=Tn(n==null?void 0:n.in,e,t);return r.getFullYear()===o.getFullYear()&&r.getMonth()===o.getMonth()}function Bb(e,t,n){const[r,o]=Tn(n==null?void 0:n.in,e,t);return r.getFullYear()===o.getFullYear()}function Yb(e,t,n){const r=we(e,n==null?void 0:n.in),o=r.getFullYear(),a=r.getDate(),s=Oe(e,0);s.setFullYear(o,t,15),s.setHours(0,0,0,0);const i=Ib(s);return r.setMonth(t,Math.min(a,i)),r}function Hb(e,t,n){const r=we(e,n==null?void 0:n.in);return isNaN(+r)?Oe(e,NaN):(r.setFullYear(t),r)}const ni=5,zb=4;function Gb(e,t){const n=t.startOfMonth(e),r=n.getDay()>0?n.getDay():7,o=t.addDays(e,-r+1),a=t.addDays(o,ni*7-1);return t.getMonth(e)===t.getMonth(a)?ni:zb}function Ll(e,t){const n=t.startOfMonth(e),r=n.getDay();return r===1?n:r===0?t.addDays(n,-1*6):t.addDays(n,-1*(r-1))}function Ub(e,t){const n=Ll(e,t),r=Gb(e,t);return t.addDays(n,r*7-1)}class kt{constructor(t,n){this.Date=Date,this.today=()=>{var r;return(r=this.overrides)!=null&&r.today?this.overrides.today():this.options.timeZone?Le.tz(this.options.timeZone):new this.Date},this.newDate=(r,o,a)=>{var s;return(s=this.overrides)!=null&&s.newDate?this.overrides.newDate(r,o,a):this.options.timeZone?new Le(r,o,a,this.options.timeZone):new Date(r,o,a)},this.addDays=(r,o)=>{var a;return(a=this.overrides)!=null&&a.addDays?this.overrides.addDays(r,o):Nl(r,o)},this.addMonths=(r,o)=>{var a;return(a=this.overrides)!=null&&a.addMonths?this.overrides.addMonths(r,o):Dl(r,o)},this.addWeeks=(r,o)=>{var a;return(a=this.overrides)!=null&&a.addWeeks?this.overrides.addWeeks(r,o):ky(r,o)},this.addYears=(r,o)=>{var a;return(a=this.overrides)!=null&&a.addYears?this.overrides.addYears(r,o):Ny(r,o)},this.differenceInCalendarDays=(r,o)=>{var a;return(a=this.overrides)!=null&&a.differenceInCalendarDays?this.overrides.differenceInCalendarDays(r,o):Tl(r,o)},this.differenceInCalendarMonths=(r,o)=>{var a;return(a=this.overrides)!=null&&a.differenceInCalendarMonths?this.overrides.differenceInCalendarMonths(r,o):_y(r,o)},this.eachMonthOfInterval=r=>{var o;return(o=this.overrides)!=null&&o.eachMonthOfInterval?this.overrides.eachMonthOfInterval(r):Iy(r)},this.endOfBroadcastWeek=r=>{var o;return(o=this.overrides)!=null&&o.endOfBroadcastWeek?this.overrides.endOfBroadcastWeek(r):Ub(r,this)},this.endOfISOWeek=r=>{var o;return(o=this.overrides)!=null&&o.endOfISOWeek?this.overrides.endOfISOWeek(r):Ly(r)},this.endOfMonth=r=>{var o;return(o=this.overrides)!=null&&o.endOfMonth?this.overrides.endOfMonth(r):Py(r)},this.endOfWeek=(r,o)=>{var a;return(a=this.overrides)!=null&&a.endOfWeek?this.overrides.endOfWeek(r,o):Pl(r,this.options)},this.endOfYear=r=>{var o;return(o=this.overrides)!=null&&o.endOfYear?this.overrides.endOfYear(r):$y(r)},this.format=(r,o,a)=>{var i;const s=(i=this.overrides)!=null&&i.format?this.overrides.format(r,o,this.options):Pb(r,o,this.options);return this.options.numerals&&this.options.numerals!=="latn"?this.replaceDigits(s):s},this.getISOWeek=r=>{var o;return(o=this.overrides)!=null&&o.getISOWeek?this.overrides.getISOWeek(r):Al(r)},this.getMonth=(r,o)=>{var a;return(a=this.overrides)!=null&&a.getMonth?this.overrides.getMonth(r,this.options):jb(r,this.options)},this.getYear=(r,o)=>{var a;return(a=this.overrides)!=null&&a.getYear?this.overrides.getYear(r,this.options):$b(r,this.options)},this.getWeek=(r,o)=>{var a;return(a=this.overrides)!=null&&a.getWeek?this.overrides.getWeek(r,this.options):jl(r,this.options)},this.isAfter=(r,o)=>{var a;return(a=this.overrides)!=null&&a.isAfter?this.overrides.isAfter(r,o):Lb(r,o)},this.isBefore=(r,o)=>{var a;return(a=this.overrides)!=null&&a.isBefore?this.overrides.isBefore(r,o):Fb(r,o)},this.isDate=r=>{var o;return(o=this.overrides)!=null&&o.isDate?this.overrides.isDate(r):Ol(r)},this.isSameDay=(r,o)=>{var a;return(a=this.overrides)!=null&&a.isSameDay?this.overrides.isSameDay(r,o):Ty(r,o)},this.isSameMonth=(r,o)=>{var a;return(a=this.overrides)!=null&&a.isSameMonth?this.overrides.isSameMonth(r,o):Wb(r,o)},this.isSameYear=(r,o)=>{var a;return(a=this.overrides)!=null&&a.isSameYear?this.overrides.isSameYear(r,o):Bb(r,o)},this.max=r=>{var o;return(o=this.overrides)!=null&&o.max?this.overrides.max(r):Dy(r)},this.min=r=>{var o;return(o=this.overrides)!=null&&o.min?this.overrides.min(r):Ry(r)},this.setMonth=(r,o)=>{var a;return(a=this.overrides)!=null&&a.setMonth?this.overrides.setMonth(r,o):Yb(r,o)},this.setYear=(r,o)=>{var a;return(a=this.overrides)!=null&&a.setYear?this.overrides.setYear(r,o):Hb(r,o)},this.startOfBroadcastWeek=(r,o)=>{var a;return(a=this.overrides)!=null&&a.startOfBroadcastWeek?this.overrides.startOfBroadcastWeek(r,this):Ll(r,this)},this.startOfDay=r=>{var o;return(o=this.overrides)!=null&&o.startOfDay?this.overrides.startOfDay(r):Kn(r)},this.startOfISOWeek=r=>{var o;return(o=this.overrides)!=null&&o.startOfISOWeek?this.overrides.startOfISOWeek(r):Vn(r)},this.startOfMonth=r=>{var o;return(o=this.overrides)!=null&&o.startOfMonth?this.overrides.startOfMonth(r):jy(r)},this.startOfWeek=(r,o)=>{var a;return(a=this.overrides)!=null&&a.startOfWeek?this.overrides.startOfWeek(r,this.options):bn(r,this.options)},this.startOfYear=r=>{var o;return(o=this.overrides)!=null&&o.startOfYear?this.overrides.startOfYear(r):_l(r)},this.options={locale:Wa,...t},this.overrides=n}getDigitMap(){const{numerals:t="latn"}=this.options,n=new Intl.NumberFormat("en-US",{numberingSystem:t}),r={};for(let o=0;o<10;o++)r[o.toString()]=n.format(o);return r}replaceDigits(t){const n=this.getDigitMap();return t.replace(/\d/g,r=>n[r]||r)}formatNumber(t){return this.replaceDigits(t.toString())}}const yt=new kt;class Fl{constructor(t,n,r=yt){this.date=t,this.displayMonth=n,this.outside=!!(n&&!r.isSameMonth(t,n)),this.dateLib=r}isEqualTo(t){return this.dateLib.isSameDay(t.date,this.date)&&this.dateLib.isSameMonth(t.displayMonth,this.displayMonth)}}class qb{constructor(t,n){this.date=t,this.weeks=n}}class Vb{constructor(t,n){this.days=n,this.weekNumber=t}}function xt(e,t,n=!1,r=yt){let{from:o,to:a}=e;const{differenceInCalendarDays:s,isSameDay:i}=r;return o&&a?(s(a,o)<0&&([o,a]=[a,o]),s(t,o)>=(n?1:0)&&s(a,t)>=(n?1:0)):!n&&a?i(a,t):!n&&o?i(o,t):!1}function Wl(e){return!!(e&&typeof e=="object"&&"before"in e&&"after"in e)}function Ba(e){return!!(e&&typeof e=="object"&&"from"in e)}function Bl(e){return!!(e&&typeof e=="object"&&"after"in e)}function Yl(e){return!!(e&&typeof e=="object"&&"before"in e)}function Hl(e){return!!(e&&typeof e=="object"&&"dayOfWeek"in e)}function zl(e,t){return Array.isArray(e)&&e.every(t.isDate)}function St(e,t,n=yt){const r=Array.isArray(t)?t:[t],{isSameDay:o,differenceInCalendarDays:a,isAfter:s}=n;return r.some(i=>{if(typeof i=="boolean")return i;if(n.isDate(i))return o(e,i);if(zl(i,n))return i.includes(e);if(Ba(i))return xt(i,e,!1,n);if(Hl(i))return Array.isArray(i.dayOfWeek)?i.dayOfWeek.includes(e.getDay()):i.dayOfWeek===e.getDay();if(Wl(i)){const l=a(i.before,e),u=a(i.after,e),m=l>0,c=u<0;return s(i.before,i.after)?c&&m:m||c}return Bl(i)?a(e,i.after)>0:Yl(i)?a(i.before,e)>0:typeof i=="function"?i(e):!1})}function Kb(e,t,n,r,o){const{disabled:a,hidden:s,modifiers:i,showOutsideDays:l,broadcastCalendar:u,today:m}=t,{isSameDay:c,isSameMonth:p,startOfMonth:h,isBefore:y,endOfMonth:g,isAfter:v}=o,w=n&&h(n),x=r&&g(r),S={[Ee.focused]:[],[Ee.outside]:[],[Ee.disabled]:[],[Ee.hidden]:[],[Ee.today]:[]},k={};for(const C of e){const{date:N,displayMonth:M}=C,D=!!(M&&!p(N,M)),L=!!(w&&y(N,w)),B=!!(x&&v(N,x)),F=!!(a&&St(N,a,o)),V=!!(s&&St(N,s,o))||L||B||!u&&!l&&D||u&&l===!1&&D,$=c(N,m??o.today());D&&S.outside.push(C),F&&S.disabled.push(C),V&&S.hidden.push(C),$&&S.today.push(C),i&&Object.keys(i).forEach(I=>{const _=i==null?void 0:i[I];_&&St(N,_,o)&&(k[I]?k[I].push(C):k[I]=[C])})}return C=>{const N={[Ee.focused]:!1,[Ee.disabled]:!1,[Ee.hidden]:!1,[Ee.outside]:!1,[Ee.today]:!1},M={};for(const D in S){const L=S[D];N[D]=L.some(B=>B===C)}for(const D in k)M[D]=k[D].some(L=>L===C);return{...N,...M}}}function Xb(e,t,n={}){return Object.entries(e).filter(([,o])=>o===!0).reduce((o,[a])=>(n[a]?o.push(n[a]):t[Ee[a]]?o.push(t[Ee[a]]):t[at[a]]&&o.push(t[at[a]]),o),[t[se.Day]])}function Zb(e){return b.createElement("button",{...e})}function Qb(e){return b.createElement("span",{...e})}function Jb(e){const{size:t=24,orientation:n="left",className:r}=e;return b.createElement("svg",{className:r,width:t,height:t,viewBox:"0 0 24 24"},n==="up"&&b.createElement("polygon",{points:"6.77 17 12.5 11.43 18.24 17 20 15.28 12.5 8 5 15.28"}),n==="down"&&b.createElement("polygon",{points:"6.77 8 12.5 13.57 18.24 8 20 9.72 12.5 17 5 9.72"}),n==="left"&&b.createElement("polygon",{points:"16 18.112 9.81111111 12 16 5.87733333 14.0888889 4 6 12 14.0888889 20"}),n==="right"&&b.createElement("polygon",{points:"8 18.112 14.18888889 12 8 5.87733333 9.91111111 4 18 12 9.91111111 20"}))}function ew(e){const{day:t,modifiers:n,...r}=e;return b.createElement("td",{...r})}function tw(e){const{day:t,modifiers:n,...r}=e,o=b.useRef(null);return b.useEffect(()=>{var a;n.focused&&((a=o.current)==null||a.focus())},[n.focused]),b.createElement("button",{ref:o,...r})}function nw(e){const{options:t,className:n,components:r,classNames:o,...a}=e,s=[o[se.Dropdown],n].join(" "),i=t==null?void 0:t.find(({value:l})=>l===a.value);return b.createElement("span",{"data-disabled":a.disabled,className:o[se.DropdownRoot]},b.createElement(r.Select,{className:s,...a},t==null?void 0:t.map(({value:l,label:u,disabled:m})=>b.createElement(r.Option,{key:l,value:l,disabled:m},u))),b.createElement("span",{className:o[se.CaptionLabel],"aria-hidden":!0},i==null?void 0:i.label,b.createElement(r.Chevron,{orientation:"down",size:18,className:o[se.Chevron]})))}function rw(e){return b.createElement("div",{...e})}function ow(e){return b.createElement("div",{...e})}function aw(e){const{calendarMonth:t,displayIndex:n,...r}=e;return b.createElement("div",{...r},e.children)}function sw(e){const{calendarMonth:t,displayIndex:n,...r}=e;return b.createElement("div",{...r})}function iw(e){return b.createElement("table",{...e})}function cw(e){return b.createElement("div",{...e})}const Gl=b.createContext(void 0);function lr(){const e=b.useContext(Gl);if(e===void 0)throw new Error("useDayPicker() must be used within a custom component.");return e}function lw(e){const{components:t}=lr();return b.createElement(t.Dropdown,{...e})}function uw(e){const{onPreviousClick:t,onNextClick:n,previousMonth:r,nextMonth:o,...a}=e,{components:s,classNames:i,labels:{labelPrevious:l,labelNext:u}}=lr(),m=b.useCallback(p=>{o&&(n==null||n(p))},[o,n]),c=b.useCallback(p=>{r&&(t==null||t(p))},[r,t]);return b.createElement("nav",{...a},b.createElement(s.PreviousMonthButton,{type:"button",className:i[se.PreviousMonthButton],tabIndex:r?void 0:-1,"aria-disabled":r?void 0:!0,"aria-label":l(r),onClick:c},b.createElement(s.Chevron,{disabled:r?void 0:!0,className:i[se.Chevron],orientation:"left"})),b.createElement(s.NextMonthButton,{type:"button",className:i[se.NextMonthButton],tabIndex:o?void 0:-1,"aria-disabled":o?void 0:!0,"aria-label":u(o),onClick:m},b.createElement(s.Chevron,{disabled:o?void 0:!0,orientation:"right",className:i[se.Chevron]})))}function dw(e){const{components:t}=lr();return b.createElement(t.Button,{...e})}function fw(e){return b.createElement("option",{...e})}function mw(e){const{components:t}=lr();return b.createElement(t.Button,{...e})}function pw(e){const{rootRef:t,...n}=e;return b.createElement("div",{...n,ref:t})}function hw(e){return b.createElement("select",{...e})}function gw(e){const{week:t,...n}=e;return b.createElement("tr",{...n})}function vw(e){return b.createElement("th",{...e})}function yw(e){return b.createElement("thead",{"aria-hidden":!0},b.createElement("tr",{...e}))}function bw(e){const{week:t,...n}=e;return b.createElement("th",{...n})}function ww(e){return b.createElement("th",{...e})}function xw(e){return b.createElement("tbody",{...e})}function Sw(e){const{components:t}=lr();return b.createElement(t.Dropdown,{...e})}const Cw=Object.freeze(Object.defineProperty({__proto__:null,Button:Zb,CaptionLabel:Qb,Chevron:Jb,Day:ew,DayButton:tw,Dropdown:nw,DropdownNav:rw,Footer:ow,Month:aw,MonthCaption:sw,MonthGrid:iw,Months:cw,MonthsDropdown:lw,Nav:uw,NextMonthButton:dw,Option:fw,PreviousMonthButton:mw,Root:pw,Select:hw,Week:gw,WeekNumber:bw,WeekNumberHeader:ww,Weekday:vw,Weekdays:yw,Weeks:xw,YearsDropdown:Sw},Symbol.toStringTag,{value:"Module"}));function Mw(e){return{...Cw,...e}}function Ew(e){const t={"data-mode":e.mode??void 0,"data-required":"required"in e?e.required:void 0,"data-multiple-months":e.numberOfMonths&&e.numberOfMonths>1||void 0,"data-week-numbers":e.showWeekNumber||void 0,"data-broadcast-calendar":e.broadcastCalendar||void 0,"data-nav-layout":e.navLayout||void 0};return Object.entries(e).forEach(([n,r])=>{n.startsWith("data-")&&(t[n]=r)}),t}function kw(){const e={};for(const t in se)e[se[t]]=`rdp-${se[t]}`;for(const t in Ee)e[Ee[t]]=`rdp-${Ee[t]}`;for(const t in at)e[at[t]]=`rdp-${at[t]}`;for(const t in Ke)e[Ke[t]]=`rdp-${Ke[t]}`;return e}function Ul(e,t,n){return(n??new kt(t)).format(e,"LLLL y")}const Nw=Ul;function Dw(e,t,n){return(n??new kt(t)).format(e,"d")}function Rw(e,t=yt){return t.format(e,"LLLL")}function Tw(e,t=yt){return e<10?t.formatNumber(`0${e.toLocaleString()}`):t.formatNumber(`${e.toLocaleString()}`)}function Ow(){return""}function _w(e,t,n){return(n??new kt(t)).format(e,"cccccc")}function ql(e,t=yt){return t.format(e,"yyyy")}const Pw=ql,Aw=Object.freeze(Object.defineProperty({__proto__:null,formatCaption:Ul,formatDay:Dw,formatMonthCaption:Nw,formatMonthDropdown:Rw,formatWeekNumber:Tw,formatWeekNumberHeader:Ow,formatWeekdayName:_w,formatYearCaption:Pw,formatYearDropdown:ql},Symbol.toStringTag,{value:"Module"}));function Iw(e){return e!=null&&e.formatMonthCaption&&!e.formatCaption&&(e.formatCaption=e.formatMonthCaption),e!=null&&e.formatYearCaption&&!e.formatYearDropdown&&(e.formatYearDropdown=e.formatYearCaption),{...Aw,...e}}function jw(e,t,n,r,o){const{startOfMonth:a,startOfYear:s,endOfYear:i,eachMonthOfInterval:l,getMonth:u}=o;return l({start:s(e),end:i(e)}).map(p=>{const h=r.formatMonthDropdown(p,o),y=u(p),g=t&&p<a(t)||n&&p>a(n)||!1;return{value:y,label:h,disabled:g}})}function $w(e,t={},n={}){let r={...t==null?void 0:t[se.Day]};return Object.entries(e).filter(([,o])=>o===!0).forEach(([o])=>{r={...r,...n==null?void 0:n[o]}}),r}function Lw(e,t,n){const r=e.today(),o=t?e.startOfISOWeek(r):e.startOfWeek(r),a=[];for(let s=0;s<7;s++){const i=e.addDays(o,s);a.push(i)}return a}function Fw(e,t,n,r){if(!e||!t)return;const{startOfYear:o,endOfYear:a,addYears:s,getYear:i,isBefore:l,isSameYear:u}=r,m=o(e),c=a(t),p=[];let h=m;for(;l(h,c)||u(h,c);)p.push(h),h=s(h,1);return p.map(y=>{const g=n.formatYearDropdown(y,r);return{value:i(y),label:g,disabled:!1}})}function Vl(e,t,n){return(n??new kt(t)).format(e,"LLLL y")}const Ww=Vl;function Bw(e,t,n,r){let o=(r??new kt(n)).format(e,"PPPP");return t!=null&&t.today&&(o=`Today, ${o}`),o}function Kl(e,t,n,r){let o=(r??new kt(n)).format(e,"PPPP");return t.today&&(o=`Today, ${o}`),t.selected&&(o=`${o}, selected`),o}const Yw=Kl;function Hw(){return""}function zw(e){return"Choose the Month"}function Gw(e){return"Go to the Next Month"}function Uw(e){return"Go to the Previous Month"}function qw(e,t,n){return(n??new kt(t)).format(e,"cccc")}function Vw(e,t){return`Week ${e}`}function Kw(e){return"Week Number"}function Xw(e){return"Choose the Year"}const Zw=Object.freeze(Object.defineProperty({__proto__:null,labelCaption:Ww,labelDay:Yw,labelDayButton:Kl,labelGrid:Vl,labelGridcell:Bw,labelMonthDropdown:zw,labelNav:Hw,labelNext:Gw,labelPrevious:Uw,labelWeekNumber:Vw,labelWeekNumberHeader:Kw,labelWeekday:qw,labelYearDropdown:Xw},Symbol.toStringTag,{value:"Module"})),ur=e=>e instanceof HTMLElement?e:null,jo=e=>[...e.querySelectorAll("[data-animated-month]")??[]],Qw=e=>ur(e.querySelector("[data-animated-month]")),$o=e=>ur(e.querySelector("[data-animated-caption]")),Lo=e=>ur(e.querySelector("[data-animated-weeks]")),Jw=e=>ur(e.querySelector("[data-animated-nav]")),ex=e=>ur(e.querySelector("[data-animated-weekdays]"));function tx(e,t,{classNames:n,months:r,focused:o,dateLib:a}){const s=b.useRef(null),i=b.useRef(r),l=b.useRef(!1);b.useLayoutEffect(()=>{const u=i.current;if(i.current=r,!t||!e.current||!(e.current instanceof HTMLElement)||r.length===0||u.length===0||r.length!==u.length)return;const m=a.isSameMonth(r[0].date,u[0].date),c=a.isAfter(r[0].date,u[0].date),p=c?n[Ke.caption_after_enter]:n[Ke.caption_before_enter],h=c?n[Ke.weeks_after_enter]:n[Ke.weeks_before_enter],y=s.current,g=e.current.cloneNode(!0);if(g instanceof HTMLElement?(jo(g).forEach(S=>{if(!(S instanceof HTMLElement))return;const k=Qw(S);k&&S.contains(k)&&S.removeChild(k);const C=$o(S);C&&C.classList.remove(p);const N=Lo(S);N&&N.classList.remove(h)}),s.current=g):s.current=null,l.current||m||o)return;const v=y instanceof HTMLElement?jo(y):[],w=jo(e.current);if(w&&w.every(x=>x instanceof HTMLElement)&&v&&v.every(x=>x instanceof HTMLElement)){l.current=!0,e.current.style.isolation="isolate";const x=Jw(e.current);x&&(x.style.zIndex="1"),w.forEach((S,k)=>{const C=v[k];if(!C)return;S.style.position="relative",S.style.overflow="hidden";const N=$o(S);N&&N.classList.add(p);const M=Lo(S);M&&M.classList.add(h);const D=()=>{l.current=!1,e.current&&(e.current.style.isolation=""),x&&(x.style.zIndex=""),N&&N.classList.remove(p),M&&M.classList.remove(h),S.style.position="",S.style.overflow="",S.contains(C)&&S.removeChild(C)};C.style.pointerEvents="none",C.style.position="absolute",C.style.overflow="hidden",C.setAttribute("aria-hidden","true");const L=ex(C);L&&(L.style.opacity="0");const B=$o(C);B&&(B.classList.add(c?n[Ke.caption_before_exit]:n[Ke.caption_after_exit]),B.addEventListener("animationend",D));const F=Lo(C);F&&F.classList.add(c?n[Ke.weeks_before_exit]:n[Ke.weeks_after_exit]),S.insertBefore(C,S.firstChild)})}})}function nx(e,t,n,r){const o=e[0],a=e[e.length-1],{ISOWeek:s,fixedWeeks:i,broadcastCalendar:l}=n??{},{addDays:u,differenceInCalendarDays:m,differenceInCalendarMonths:c,endOfBroadcastWeek:p,endOfISOWeek:h,endOfMonth:y,endOfWeek:g,isAfter:v,startOfBroadcastWeek:w,startOfISOWeek:x,startOfWeek:S}=r,k=l?w(o,r):s?x(o):S(o),C=l?p(a):s?h(y(a)):g(y(a)),N=m(C,k),M=c(a,o)+1,D=[];for(let F=0;F<=N;F++){const V=u(k,F);if(t&&v(V,t))break;D.push(V)}const B=(l?35:42)*M;if(i&&D.length<B){const F=B-D.length;for(let V=0;V<F;V++){const $=u(D[D.length-1],1);D.push($)}}return D}function rx(e){const t=[];return e.reduce((n,r)=>{const o=r.weeks.reduce((a,s)=>[...a,...s.days],t);return[...n,...o]},t)}function ox(e,t,n,r){const{numberOfMonths:o=1}=n,a=[];for(let s=0;s<o;s++){const i=r.addMonths(e,s);if(t&&i>t)break;a.push(i)}return a}function ri(e,t,n,r){const{month:o,defaultMonth:a,today:s=r.today(),numberOfMonths:i=1}=e;let l=o||a||s;const{differenceInCalendarMonths:u,addMonths:m,startOfMonth:c}=r;if(n&&u(n,l)<i-1){const p=-1*(i-1);l=m(n,p)}return t&&u(l,t)<0&&(l=t),c(l)}function ax(e,t,n,r){const{addDays:o,endOfBroadcastWeek:a,endOfISOWeek:s,endOfMonth:i,endOfWeek:l,getISOWeek:u,getWeek:m,startOfBroadcastWeek:c,startOfISOWeek:p,startOfWeek:h}=r,y=e.reduce((g,v)=>{const w=n.broadcastCalendar?c(v,r):n.ISOWeek?p(v):h(v),x=n.broadcastCalendar?a(v):n.ISOWeek?s(i(v)):l(i(v)),S=t.filter(M=>M>=w&&M<=x),k=n.broadcastCalendar?35:42;if(n.fixedWeeks&&S.length<k){const M=t.filter(D=>{const L=k-S.length;return D>x&&D<=o(x,L)});S.push(...M)}const C=S.reduce((M,D)=>{const L=n.ISOWeek?u(D):m(D),B=M.find(V=>V.weekNumber===L),F=new Fl(D,v,r);return B?B.days.push(F):M.push(new Vb(L,[F])),M},[]),N=new qb(v,C);return g.push(N),g},[]);return n.reverseMonths?y.reverse():y}function sx(e,t){let{startMonth:n,endMonth:r}=e;const{startOfYear:o,startOfDay:a,startOfMonth:s,endOfMonth:i,addYears:l,endOfYear:u,newDate:m,today:c}=t,{fromYear:p,toYear:h,fromMonth:y,toMonth:g}=e;!n&&y&&(n=y),!n&&p&&(n=t.newDate(p,0,1)),!r&&g&&(r=g),!r&&h&&(r=m(h,11,31));const v=e.captionLayout==="dropdown"||e.captionLayout==="dropdown-years";return n?n=s(n):p?n=m(p,0,1):!n&&v&&(n=o(l(e.today??c(),-100))),r?r=i(r):h?r=m(h,11,31):!r&&v&&(r=u(e.today??c())),[n&&a(n),r&&a(r)]}function ix(e,t,n,r){if(n.disableNavigation)return;const{pagedNavigation:o,numberOfMonths:a=1}=n,{startOfMonth:s,addMonths:i,differenceInCalendarMonths:l}=r,u=o?a:1,m=s(e);if(!t)return i(m,u);if(!(l(t,e)<a))return i(m,u)}function cx(e,t,n,r){if(n.disableNavigation)return;const{pagedNavigation:o,numberOfMonths:a}=n,{startOfMonth:s,addMonths:i,differenceInCalendarMonths:l}=r,u=o?a??1:1,m=s(e);if(!t)return i(m,-u);if(!(l(m,t)<=0))return i(m,-u)}function lx(e){const t=[];return e.reduce((n,r)=>[...n,...r.weeks],t)}function co(e,t){const[n,r]=b.useState(e);return[t===void 0?n:t,r]}function ux(e,t){const[n,r]=sx(e,t),{startOfMonth:o,endOfMonth:a}=t,s=ri(e,n,r,t),[i,l]=co(s,e.month?s:void 0);b.useEffect(()=>{const N=ri(e,n,r,t);l(N)},[e.timeZone]);const u=ox(i,r,e,t),m=nx(u,e.endMonth?a(e.endMonth):void 0,e,t),c=ax(u,m,e,t),p=lx(c),h=rx(c),y=cx(i,n,e,t),g=ix(i,r,e,t),{disableNavigation:v,onMonthChange:w}=e,x=N=>p.some(M=>M.days.some(D=>D.isEqualTo(N))),S=N=>{if(v)return;let M=o(N);n&&M<o(n)&&(M=o(n)),r&&M>o(r)&&(M=o(r)),l(M),w==null||w(M)};return{months:c,weeks:p,days:h,navStart:n,navEnd:r,previousMonth:y,nextMonth:g,goToMonth:S,goToDay:N=>{x(N)||S(N.date)}}}var dt;(function(e){e[e.Today=0]="Today",e[e.Selected=1]="Selected",e[e.LastFocused=2]="LastFocused",e[e.FocusedModifier=3]="FocusedModifier"})(dt||(dt={}));function oi(e){return!e[Ee.disabled]&&!e[Ee.hidden]&&!e[Ee.outside]}function dx(e,t,n,r){let o,a=-1;for(const s of e){const i=t(s);oi(i)&&(i[Ee.focused]&&a<dt.FocusedModifier?(o=s,a=dt.FocusedModifier):r!=null&&r.isEqualTo(s)&&a<dt.LastFocused?(o=s,a=dt.LastFocused):n(s.date)&&a<dt.Selected?(o=s,a=dt.Selected):i[Ee.today]&&a<dt.Today&&(o=s,a=dt.Today))}return o||(o=e.find(s=>oi(t(s)))),o}function fx(e,t,n,r,o,a,s){const{ISOWeek:i,broadcastCalendar:l}=a,{addDays:u,addMonths:m,addWeeks:c,addYears:p,endOfBroadcastWeek:h,endOfISOWeek:y,endOfWeek:g,max:v,min:w,startOfBroadcastWeek:x,startOfISOWeek:S,startOfWeek:k}=s;let N={day:u,week:c,month:m,year:p,startOfWeek:M=>l?x(M,s):i?S(M):k(M),endOfWeek:M=>l?h(M):i?y(M):g(M)}[e](n,t==="after"?1:-1);return t==="before"&&r?N=v([r,N]):t==="after"&&o&&(N=w([o,N])),N}function Xl(e,t,n,r,o,a,s,i=0){if(i>365)return;const l=fx(e,t,n.date,r,o,a,s),u=!!(a.disabled&&St(l,a.disabled,s)),m=!!(a.hidden&&St(l,a.hidden,s)),c=l,p=new Fl(l,c,s);return!u&&!m?p:Xl(e,t,p,r,o,a,s,i+1)}function mx(e,t,n,r,o){const{autoFocus:a}=e,[s,i]=b.useState(),l=dx(t.days,n,r||(()=>!1),s),[u,m]=b.useState(a?l:void 0);return{isFocusTarget:g=>!!(l!=null&&l.isEqualTo(g)),setFocused:m,focused:u,blur:()=>{i(u),m(void 0)},moveFocus:(g,v)=>{if(!u)return;const w=Xl(g,v,u,t.navStart,t.navEnd,e,o);w&&(t.goToDay(w),m(w))}}}function px(e,t){const{selected:n,required:r,onSelect:o}=e,[a,s]=co(n,o?n:void 0),i=o?n:a,{isSameDay:l}=t,u=h=>(i==null?void 0:i.some(y=>l(y,h)))??!1,{min:m,max:c}=e;return{selected:i,select:(h,y,g)=>{let v=[...i??[]];if(u(h)){if((i==null?void 0:i.length)===m||r&&(i==null?void 0:i.length)===1)return;v=i==null?void 0:i.filter(w=>!l(w,h))}else(i==null?void 0:i.length)===c?v=[h]:v=[...v,h];return o||s(v),o==null||o(v,h,y,g),v},isSelected:u}}function hx(e,t,n=0,r=0,o=!1,a=yt){const{from:s,to:i}=t||{},{isSameDay:l,isAfter:u,isBefore:m}=a;let c;if(!s&&!i)c={from:e,to:n>0?void 0:e};else if(s&&!i)l(s,e)?o?c={from:s,to:void 0}:c=void 0:m(e,s)?c={from:e,to:s}:c={from:s,to:e};else if(s&&i)if(l(s,e)&&l(i,e))o?c={from:s,to:i}:c=void 0;else if(l(s,e))c={from:s,to:n>0?void 0:e};else if(l(i,e))c={from:e,to:n>0?void 0:e};else if(m(e,s))c={from:e,to:i};else if(u(e,s))c={from:s,to:e};else if(u(e,i))c={from:s,to:e};else throw new Error("Invalid range");if(c!=null&&c.from&&(c!=null&&c.to)){const p=a.differenceInCalendarDays(c.to,c.from);r>0&&p>r?c={from:e,to:void 0}:n>1&&p<n&&(c={from:e,to:void 0})}return c}function gx(e,t,n=yt){const r=Array.isArray(t)?t:[t];let o=e.from;const a=n.differenceInCalendarDays(e.to,e.from),s=Math.min(a,6);for(let i=0;i<=s;i++){if(r.includes(o.getDay()))return!0;o=n.addDays(o,1)}return!1}function ai(e,t,n=yt){return xt(e,t.from,!1,n)||xt(e,t.to,!1,n)||xt(t,e.from,!1,n)||xt(t,e.to,!1,n)}function vx(e,t,n=yt){const r=Array.isArray(t)?t:[t];if(r.filter(i=>typeof i!="function").some(i=>typeof i=="boolean"?i:n.isDate(i)?xt(e,i,!1,n):zl(i,n)?i.some(l=>xt(e,l,!1,n)):Ba(i)?i.from&&i.to?ai(e,{from:i.from,to:i.to},n):!1:Hl(i)?gx(e,i.dayOfWeek,n):Wl(i)?n.isAfter(i.before,i.after)?ai(e,{from:n.addDays(i.after,1),to:n.addDays(i.before,-1)},n):St(e.from,i,n)||St(e.to,i,n):Bl(i)||Yl(i)?St(e.from,i,n)||St(e.to,i,n):!1))return!0;const s=r.filter(i=>typeof i=="function");if(s.length){let i=e.from;const l=n.differenceInCalendarDays(e.to,e.from);for(let u=0;u<=l;u++){if(s.some(m=>m(i)))return!0;i=n.addDays(i,1)}}return!1}function yx(e,t){const{disabled:n,excludeDisabled:r,selected:o,required:a,onSelect:s}=e,[i,l]=co(o,s?o:void 0),u=s?o:i;return{selected:u,select:(p,h,y)=>{const{min:g,max:v}=e,w=p?hx(p,u,g,v,a,t):void 0;return r&&n&&(w!=null&&w.from)&&w.to&&vx({from:w.from,to:w.to},n,t)&&(w.from=p,w.to=void 0),s||l(w),s==null||s(w,p,h,y),w},isSelected:p=>u&&xt(u,p,!1,t)}}function bx(e,t){const{selected:n,required:r,onSelect:o}=e,[a,s]=co(n,o?n:void 0),i=o?n:a,{isSameDay:l}=t;return{selected:i,select:(c,p,h)=>{let y=c;return!r&&i&&i&&l(c,i)&&(y=void 0),o||s(y),o==null||o(y,c,p,h),y},isSelected:c=>i?l(i,c):!1}}function wx(e,t){const n=bx(e,t),r=px(e,t),o=yx(e,t);switch(e.mode){case"single":return n;case"multiple":return r;case"range":return o;default:return}}function xx(e){var Dt;let t=e;t.timeZone&&(t={...e},t.today&&(t.today=new Le(t.today,t.timeZone)),t.month&&(t.month=new Le(t.month,t.timeZone)),t.defaultMonth&&(t.defaultMonth=new Le(t.defaultMonth,t.timeZone)),t.startMonth&&(t.startMonth=new Le(t.startMonth,t.timeZone)),t.endMonth&&(t.endMonth=new Le(t.endMonth,t.timeZone)),t.mode==="single"&&t.selected?t.selected=new Le(t.selected,t.timeZone):t.mode==="multiple"&&t.selected?t.selected=(Dt=t.selected)==null?void 0:Dt.map(z=>new Le(z,t.timeZone)):t.mode==="range"&&t.selected&&(t.selected={from:t.selected.from?new Le(t.selected.from,t.timeZone):void 0,to:t.selected.to?new Le(t.selected.to,t.timeZone):void 0}));const{components:n,formatters:r,labels:o,dateLib:a,locale:s,classNames:i}=b.useMemo(()=>{const z={...Wa,...t.locale};return{dateLib:new kt({locale:z,weekStartsOn:t.broadcastCalendar?1:t.weekStartsOn,firstWeekContainsDate:t.firstWeekContainsDate,useAdditionalWeekYearTokens:t.useAdditionalWeekYearTokens,useAdditionalDayOfYearTokens:t.useAdditionalDayOfYearTokens,timeZone:t.timeZone,numerals:t.numerals},t.dateLib),components:Mw(t.components),formatters:Iw(t.formatters),labels:{...Zw,...t.labels},locale:z,classNames:{...kw(),...t.classNames}}},[t.locale,t.broadcastCalendar,t.weekStartsOn,t.firstWeekContainsDate,t.useAdditionalWeekYearTokens,t.useAdditionalDayOfYearTokens,t.timeZone,t.numerals,t.dateLib,t.components,t.formatters,t.labels,t.classNames]),{captionLayout:l,mode:u,navLayout:m,numberOfMonths:c=1,onDayBlur:p,onDayClick:h,onDayFocus:y,onDayKeyDown:g,onDayMouseEnter:v,onDayMouseLeave:w,onNextClick:x,onPrevClick:S,showWeekNumber:k,styles:C}=t,{formatCaption:N,formatDay:M,formatMonthDropdown:D,formatWeekNumber:L,formatWeekNumberHeader:B,formatWeekdayName:F,formatYearDropdown:V}=r,$=ux(t,a),{days:I,months:_,navStart:R,navEnd:P,previousMonth:E,nextMonth:O,goToMonth:Y}=$,G=Kb(I,t,R,P,a),{isSelected:T,select:A,selected:W}=wx(t,a)??{},{blur:H,focused:U,isFocusTarget:j,moveFocus:Z,setFocused:X}=mx(t,$,G,T??(()=>!1),a),{labelDayButton:Q,labelGridcell:le,labelGrid:de,labelMonthDropdown:xe,labelNav:re,labelPrevious:ze,labelNext:We,labelWeekday:ie,labelWeekNumber:pe,labelWeekNumberHeader:Se,labelYearDropdown:je}=o,Be=b.useMemo(()=>Lw(a,t.ISOWeek),[a,t.ISOWeek]),_e=u!==void 0||h!==void 0,$e=b.useCallback(()=>{E&&(Y(E),S==null||S(E))},[E,Y,S]),Yt=b.useCallback(()=>{O&&(Y(O),x==null||x(O))},[Y,O,x]),nn=b.useCallback((z,ae)=>oe=>{oe.preventDefault(),oe.stopPropagation(),X(z),A==null||A(z.date,ae,oe),h==null||h(z.date,ae,oe)},[A,h,X]),Nt=b.useCallback((z,ae)=>oe=>{X(z),y==null||y(z.date,ae,oe)},[y,X]),_n=b.useCallback((z,ae)=>oe=>{H(),p==null||p(z.date,ae,oe)},[H,p]),bt=b.useCallback((z,ae)=>oe=>{const fe={ArrowLeft:[oe.shiftKey?"month":"day",t.dir==="rtl"?"after":"before"],ArrowRight:[oe.shiftKey?"month":"day",t.dir==="rtl"?"before":"after"],ArrowDown:[oe.shiftKey?"year":"week","after"],ArrowUp:[oe.shiftKey?"year":"week","before"],PageUp:[oe.shiftKey?"year":"month","before"],PageDown:[oe.shiftKey?"year":"month","after"],Home:["startOfWeek","before"],End:["endOfWeek","after"]};if(fe[oe.key]){oe.preventDefault(),oe.stopPropagation();const[ge,ne]=fe[oe.key];Z(ge,ne)}g==null||g(z.date,ae,oe)},[Z,g,t.dir]),Ht=b.useCallback((z,ae)=>oe=>{v==null||v(z.date,ae,oe)},[v]),nt=b.useCallback((z,ae)=>oe=>{w==null||w(z.date,ae,oe)},[w]),rn=b.useCallback(z=>ae=>{const oe=Number(ae.target.value),fe=a.setMonth(a.startOfMonth(z),oe);Y(fe)},[a,Y]),Ge=b.useCallback(z=>ae=>{const oe=Number(ae.target.value),fe=a.setYear(a.startOfMonth(z),oe);Y(fe)},[a,Y]),{className:on,style:Pn}=b.useMemo(()=>({className:[i[se.Root],t.className].filter(Boolean).join(" "),style:{...C==null?void 0:C[se.Root],...t.style}}),[i,t.className,t.style,C]),an=Ew(t),zt=b.useRef(null);tx(zt,!!t.animate,{classNames:i,months:_,focused:U,dateLib:a});const An={dayPickerProps:t,selected:W,select:A,isSelected:T,months:_,nextMonth:O,previousMonth:E,goToMonth:Y,getModifiers:G,components:n,classNames:i,styles:C,labels:o,formatters:r};return b.createElement(Gl.Provider,{value:An},b.createElement(n.Root,{rootRef:t.animate?zt:void 0,className:on,style:Pn,dir:t.dir,id:t.id,lang:t.lang,nonce:t.nonce,title:t.title,role:t.role,"aria-label":t["aria-label"],...an},b.createElement(n.Months,{className:i[se.Months],style:C==null?void 0:C[se.Months]},!t.hideNavigation&&!m&&b.createElement(n.Nav,{"data-animated-nav":t.animate?"true":void 0,className:i[se.Nav],style:C==null?void 0:C[se.Nav],"aria-label":re(),onPreviousClick:$e,onNextClick:Yt,previousMonth:E,nextMonth:O}),_.map((z,ae)=>{const oe=jw(z.date,R,P,r,a),fe=Fw(R,P,r,a);return b.createElement(n.Month,{"data-animated-month":t.animate?"true":void 0,className:i[se.Month],style:C==null?void 0:C[se.Month],key:ae,displayIndex:ae,calendarMonth:z},m==="around"&&!t.hideNavigation&&ae===0&&b.createElement(n.PreviousMonthButton,{type:"button",className:i[se.PreviousMonthButton],tabIndex:E?void 0:-1,"aria-disabled":E?void 0:!0,"aria-label":ze(E),onClick:$e,"data-animated-button":t.animate?"true":void 0},b.createElement(n.Chevron,{disabled:E?void 0:!0,className:i[se.Chevron],orientation:t.dir==="rtl"?"right":"left"})),b.createElement(n.MonthCaption,{"data-animated-caption":t.animate?"true":void 0,className:i[se.MonthCaption],style:C==null?void 0:C[se.MonthCaption],calendarMonth:z,displayIndex:ae},l!=null&&l.startsWith("dropdown")?b.createElement(n.DropdownNav,{className:i[se.Dropdowns],style:C==null?void 0:C[se.Dropdowns]},l==="dropdown"||l==="dropdown-months"?b.createElement(n.MonthsDropdown,{className:i[se.MonthsDropdown],"aria-label":xe(),classNames:i,components:n,disabled:!!t.disableNavigation,onChange:rn(z.date),options:oe,style:C==null?void 0:C[se.Dropdown],value:a.getMonth(z.date)}):b.createElement("span",null,D(z.date,a)),l==="dropdown"||l==="dropdown-years"?b.createElement(n.YearsDropdown,{className:i[se.YearsDropdown],"aria-label":je(a.options),classNames:i,components:n,disabled:!!t.disableNavigation,onChange:Ge(z.date),options:fe,style:C==null?void 0:C[se.Dropdown],value:a.getYear(z.date)}):b.createElement("span",null,V(z.date,a)),b.createElement("span",{role:"status","aria-live":"polite",style:{border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap",wordWrap:"normal"}},N(z.date,a.options,a))):b.createElement(n.CaptionLabel,{className:i[se.CaptionLabel],role:"status","aria-live":"polite"},N(z.date,a.options,a))),m==="around"&&!t.hideNavigation&&ae===c-1&&b.createElement(n.NextMonthButton,{type:"button",className:i[se.NextMonthButton],tabIndex:O?void 0:-1,"aria-disabled":O?void 0:!0,"aria-label":We(O),onClick:Yt,"data-animated-button":t.animate?"true":void 0},b.createElement(n.Chevron,{disabled:O?void 0:!0,className:i[se.Chevron],orientation:t.dir==="rtl"?"left":"right"})),ae===c-1&&m==="after"&&!t.hideNavigation&&b.createElement(n.Nav,{"data-animated-nav":t.animate?"true":void 0,className:i[se.Nav],style:C==null?void 0:C[se.Nav],"aria-label":re(),onPreviousClick:$e,onNextClick:Yt,previousMonth:E,nextMonth:O}),b.createElement(n.MonthGrid,{role:"grid","aria-multiselectable":u==="multiple"||u==="range","aria-label":de(z.date,a.options,a)||void 0,className:i[se.MonthGrid],style:C==null?void 0:C[se.MonthGrid]},!t.hideWeekdays&&b.createElement(n.Weekdays,{"data-animated-weekdays":t.animate?"true":void 0,className:i[se.Weekdays],style:C==null?void 0:C[se.Weekdays]},k&&b.createElement(n.WeekNumberHeader,{"aria-label":Se(a.options),className:i[se.WeekNumberHeader],style:C==null?void 0:C[se.WeekNumberHeader],scope:"col"},B()),Be.map((ge,ne)=>b.createElement(n.Weekday,{"aria-label":ie(ge,a.options,a),className:i[se.Weekday],key:ne,style:C==null?void 0:C[se.Weekday],scope:"col"},F(ge,a.options,a)))),b.createElement(n.Weeks,{"data-animated-weeks":t.animate?"true":void 0,className:i[se.Weeks],style:C==null?void 0:C[se.Weeks]},z.weeks.map((ge,ne)=>b.createElement(n.Week,{className:i[se.Week],key:ge.weekNumber,style:C==null?void 0:C[se.Week],week:ge},k&&b.createElement(n.WeekNumber,{week:ge,style:C==null?void 0:C[se.WeekNumber],"aria-label":pe(ge.weekNumber,{locale:s}),className:i[se.WeekNumber],scope:"row",role:"rowheader"},L(ge.weekNumber,a)),ge.days.map(ue=>{const{date:ve}=ue,ce=G(ue);if(ce[Ee.focused]=!ce.hidden&&!!(U!=null&&U.isEqualTo(ue)),ce[at.selected]=(T==null?void 0:T(ve))||ce.selected,Ba(W)){const{from:Ve,to:Pe}=W;ce[at.range_start]=!!(Ve&&Pe&&a.isSameDay(ve,Ve)),ce[at.range_end]=!!(Ve&&Pe&&a.isSameDay(ve,Pe)),ce[at.range_middle]=xt(W,ve,!0,a)}const Ue=$w(ce,C,t.modifiersStyles),be=Xb(ce,i,t.modifiersClassNames),Ce=!_e&&!ce.hidden?le(ve,ce,a.options,a):void 0;return b.createElement(n.Day,{key:`${a.format(ve,"yyyy-MM-dd")}_${a.format(ue.displayMonth,"yyyy-MM")}`,day:ue,modifiers:ce,className:be.join(" "),style:Ue,role:"gridcell","aria-selected":ce.selected||void 0,"aria-label":Ce,"data-day":a.format(ve,"yyyy-MM-dd"),"data-month":ue.outside?a.format(ve,"yyyy-MM"):void 0,"data-selected":ce.selected||void 0,"data-disabled":ce.disabled||void 0,"data-hidden":ce.hidden||void 0,"data-outside":ue.outside||void 0,"data-focused":ce.focused||void 0,"data-today":ce.today||void 0},!ce.hidden&&_e?b.createElement(n.DayButton,{className:i[se.DayButton],style:C==null?void 0:C[se.DayButton],type:"button",day:ue,modifiers:ce,disabled:ce.disabled||void 0,tabIndex:j(ue)?0:-1,"aria-label":Q(ve,ce,a.options,a),onClick:nn(ue,ce),onBlur:_n(ue,ce),onFocus:Nt(ue,ce),onKeyDown:bt(ue,ce),onMouseEnter:Ht(ue,ce),onMouseLeave:nt(ue,ce)},M(ve,a.options,a)):!ce.hidden&&M(ue.date,a.options,a))}))))))})),t.footer&&b.createElement(n.Footer,{className:i[se.Footer],style:C==null?void 0:C[se.Footer],role:"status","aria-live":"polite"},t.footer)))}function Zl(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var _r={exports:{}},Sx=_r.exports,si;function Ql(){return si||(si=1,function(e,t){(function(n,r){e.exports=r()})(Sx,function(){var n=1e3,r=6e4,o=36e5,a="millisecond",s="second",i="minute",l="hour",u="day",m="week",c="month",p="quarter",h="year",y="date",g="Invalid Date",v=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,w=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,x={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(I){var _=["th","st","nd","rd"],R=I%100;return"["+I+(_[(R-20)%10]||_[R]||_[0])+"]"}},S=function(I,_,R){var P=String(I);return!P||P.length>=_?I:""+Array(_+1-P.length).join(R)+I},k={s:S,z:function(I){var _=-I.utcOffset(),R=Math.abs(_),P=Math.floor(R/60),E=R%60;return(_<=0?"+":"-")+S(P,2,"0")+":"+S(E,2,"0")},m:function I(_,R){if(_.date()<R.date())return-I(R,_);var P=12*(R.year()-_.year())+(R.month()-_.month()),E=_.clone().add(P,c),O=R-E<0,Y=_.clone().add(P+(O?-1:1),c);return+(-(P+(R-E)/(O?E-Y:Y-E))||0)},a:function(I){return I<0?Math.ceil(I)||0:Math.floor(I)},p:function(I){return{M:c,y:h,w:m,d:u,D:y,h:l,m:i,s,ms:a,Q:p}[I]||String(I||"").toLowerCase().replace(/s$/,"")},u:function(I){return I===void 0}},C="en",N={};N[C]=x;var M="$isDayjsObject",D=function(I){return I instanceof V||!(!I||!I[M])},L=function I(_,R,P){var E;if(!_)return C;if(typeof _=="string"){var O=_.toLowerCase();N[O]&&(E=O),R&&(N[O]=R,E=O);var Y=_.split("-");if(!E&&Y.length>1)return I(Y[0])}else{var G=_.name;N[G]=_,E=G}return!P&&E&&(C=E),E||!P&&C},B=function(I,_){if(D(I))return I.clone();var R=typeof _=="object"?_:{};return R.date=I,R.args=arguments,new V(R)},F=k;F.l=L,F.i=D,F.w=function(I,_){return B(I,{locale:_.$L,utc:_.$u,x:_.$x,$offset:_.$offset})};var V=function(){function I(R){this.$L=L(R.locale,null,!0),this.parse(R),this.$x=this.$x||R.x||{},this[M]=!0}var _=I.prototype;return _.parse=function(R){this.$d=function(P){var E=P.date,O=P.utc;if(E===null)return new Date(NaN);if(F.u(E))return new Date;if(E instanceof Date)return new Date(E);if(typeof E=="string"&&!/Z$/i.test(E)){var Y=E.match(v);if(Y){var G=Y[2]-1||0,T=(Y[7]||"0").substring(0,3);return O?new Date(Date.UTC(Y[1],G,Y[3]||1,Y[4]||0,Y[5]||0,Y[6]||0,T)):new Date(Y[1],G,Y[3]||1,Y[4]||0,Y[5]||0,Y[6]||0,T)}}return new Date(E)}(R),this.init()},_.init=function(){var R=this.$d;this.$y=R.getFullYear(),this.$M=R.getMonth(),this.$D=R.getDate(),this.$W=R.getDay(),this.$H=R.getHours(),this.$m=R.getMinutes(),this.$s=R.getSeconds(),this.$ms=R.getMilliseconds()},_.$utils=function(){return F},_.isValid=function(){return this.$d.toString()!==g},_.isSame=function(R,P){var E=B(R);return this.startOf(P)<=E&&E<=this.endOf(P)},_.isAfter=function(R,P){return B(R)<this.startOf(P)},_.isBefore=function(R,P){return this.endOf(P)<B(R)},_.$g=function(R,P,E){return F.u(R)?this[P]:this.set(E,R)},_.unix=function(){return Math.floor(this.valueOf()/1e3)},_.valueOf=function(){return this.$d.getTime()},_.startOf=function(R,P){var E=this,O=!!F.u(P)||P,Y=F.p(R),G=function(X,Q){var le=F.w(E.$u?Date.UTC(E.$y,Q,X):new Date(E.$y,Q,X),E);return O?le:le.endOf(u)},T=function(X,Q){return F.w(E.toDate()[X].apply(E.toDate("s"),(O?[0,0,0,0]:[23,59,59,999]).slice(Q)),E)},A=this.$W,W=this.$M,H=this.$D,U="set"+(this.$u?"UTC":"");switch(Y){case h:return O?G(1,0):G(31,11);case c:return O?G(1,W):G(0,W+1);case m:var j=this.$locale().weekStart||0,Z=(A<j?A+7:A)-j;return G(O?H-Z:H+(6-Z),W);case u:case y:return T(U+"Hours",0);case l:return T(U+"Minutes",1);case i:return T(U+"Seconds",2);case s:return T(U+"Milliseconds",3);default:return this.clone()}},_.endOf=function(R){return this.startOf(R,!1)},_.$set=function(R,P){var E,O=F.p(R),Y="set"+(this.$u?"UTC":""),G=(E={},E[u]=Y+"Date",E[y]=Y+"Date",E[c]=Y+"Month",E[h]=Y+"FullYear",E[l]=Y+"Hours",E[i]=Y+"Minutes",E[s]=Y+"Seconds",E[a]=Y+"Milliseconds",E)[O],T=O===u?this.$D+(P-this.$W):P;if(O===c||O===h){var A=this.clone().set(y,1);A.$d[G](T),A.init(),this.$d=A.set(y,Math.min(this.$D,A.daysInMonth())).$d}else G&&this.$d[G](T);return this.init(),this},_.set=function(R,P){return this.clone().$set(R,P)},_.get=function(R){return this[F.p(R)]()},_.add=function(R,P){var E,O=this;R=Number(R);var Y=F.p(P),G=function(W){var H=B(O);return F.w(H.date(H.date()+Math.round(W*R)),O)};if(Y===c)return this.set(c,this.$M+R);if(Y===h)return this.set(h,this.$y+R);if(Y===u)return G(1);if(Y===m)return G(7);var T=(E={},E[i]=r,E[l]=o,E[s]=n,E)[Y]||1,A=this.$d.getTime()+R*T;return F.w(A,this)},_.subtract=function(R,P){return this.add(-1*R,P)},_.format=function(R){var P=this,E=this.$locale();if(!this.isValid())return E.invalidDate||g;var O=R||"YYYY-MM-DDTHH:mm:ssZ",Y=F.z(this),G=this.$H,T=this.$m,A=this.$M,W=E.weekdays,H=E.months,U=E.meridiem,j=function(Q,le,de,xe){return Q&&(Q[le]||Q(P,O))||de[le].slice(0,xe)},Z=function(Q){return F.s(G%12||12,Q,"0")},X=U||function(Q,le,de){var xe=Q<12?"AM":"PM";return de?xe.toLowerCase():xe};return O.replace(w,function(Q,le){return le||function(de){switch(de){case"YY":return String(P.$y).slice(-2);case"YYYY":return F.s(P.$y,4,"0");case"M":return A+1;case"MM":return F.s(A+1,2,"0");case"MMM":return j(E.monthsShort,A,H,3);case"MMMM":return j(H,A);case"D":return P.$D;case"DD":return F.s(P.$D,2,"0");case"d":return String(P.$W);case"dd":return j(E.weekdaysMin,P.$W,W,2);case"ddd":return j(E.weekdaysShort,P.$W,W,3);case"dddd":return W[P.$W];case"H":return String(G);case"HH":return F.s(G,2,"0");case"h":return Z(1);case"hh":return Z(2);case"a":return X(G,T,!0);case"A":return X(G,T,!1);case"m":return String(T);case"mm":return F.s(T,2,"0");case"s":return String(P.$s);case"ss":return F.s(P.$s,2,"0");case"SSS":return F.s(P.$ms,3,"0");case"Z":return Y}return null}(Q)||Y.replace(":","")})},_.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},_.diff=function(R,P,E){var O,Y=this,G=F.p(P),T=B(R),A=(T.utcOffset()-this.utcOffset())*r,W=this-T,H=function(){return F.m(Y,T)};switch(G){case h:O=H()/12;break;case c:O=H();break;case p:O=H()/3;break;case m:O=(W-A)/6048e5;break;case u:O=(W-A)/864e5;break;case l:O=W/o;break;case i:O=W/r;break;case s:O=W/n;break;default:O=W}return E?O:F.a(O)},_.daysInMonth=function(){return this.endOf(c).$D},_.$locale=function(){return N[this.$L]},_.locale=function(R,P){if(!R)return this.$L;var E=this.clone(),O=L(R,P,!0);return O&&(E.$L=O),E},_.clone=function(){return F.w(this.$d,this)},_.toDate=function(){return new Date(this.valueOf())},_.toJSON=function(){return this.isValid()?this.toISOString():null},_.toISOString=function(){return this.$d.toISOString()},_.toString=function(){return this.$d.toUTCString()},I}(),$=V.prototype;return B.prototype=$,[["$ms",a],["$s",s],["$m",i],["$H",l],["$W",u],["$M",c],["$y",h],["$D",y]].forEach(function(I){$[I[1]]=function(_){return this.$g(_,I[0],I[1])}}),B.extend=function(I,_){return I.$i||(I(_,V,B),I.$i=!0),B},B.locale=L,B.isDayjs=D,B.unix=function(I){return B(1e3*I)},B.en=N[C],B.Ls=N,B.p={},B})}(_r)),_r.exports}var Cx=Ql();const fa=Zl(Cx);var Pr={exports:{}},Mx=Pr.exports,ii;function Ex(){return ii||(ii=1,function(e,t){(function(n,r){e.exports=r()})(Mx,function(){var n={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};return function(r,o,a){var s=o.prototype,i=s.format;a.en.formats=n,s.format=function(l){l===void 0&&(l="YYYY-MM-DDTHH:mm:ssZ");var u=this.$locale().formats,m=function(c,p){return c.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(h,y,g){var v=g&&g.toUpperCase();return y||p[g]||n[g]||p[v].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(w,x,S){return x||S.slice(1)})})}(l,u===void 0?{}:u);return i.call(this,m)}}})}(Pr)),Pr.exports}var kx=Ex();const Nx=Zl(kx);var Ar={exports:{}},Dx=Ar.exports,ci;function Rx(){return ci||(ci=1,function(e,t){(function(n,r){e.exports=r(Ql())})(Dx,function(n){function r(s){return s&&typeof s=="object"&&"default"in s?s:{default:s}}var o=r(n),a={name:"fr",weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"di_lu_ma_me_je_ve_sa".split("_"),months:"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),monthsShort:"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),weekStart:1,yearStart:4,formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},ordinal:function(s){return""+s+(s===1?"er":"")}};return o.default.locale(a,null,!0),a})}(Ar)),Ar.exports}Rx();function Tx({month:e,onMonthChange:t}){const n=e.getFullYear(),r=e.getMonth(),o=["January","February","March","April","May","June","July","August","September","October","November","December"],a=new Date().getFullYear(),s=Array.from({length:201},(c,p)=>a-100+p),i=c=>{const p=new Date(e);p.setMonth(Number.parseInt(c)),t(p)},l=c=>{const p=new Date(e);p.setFullYear(Number.parseInt(c)),t(p)},u=()=>{const c=new Date(e);c.setMonth(c.getMonth()-1),t(c)},m=()=>{const c=new Date(e);c.setMonth(c.getMonth()+1),t(c)};return d.jsxs("div",{className:"flex items-center justify-between p-2 border-b bg-muted",children:[d.jsx(gn,{variant:"outline",size:"small",onClick:u,className:"h-7 w-7 p-0",children:d.jsx(Op,{className:"h-4 w-4"})}),d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsxs(la,{value:r.toString(),onValueChange:i,children:[d.jsx(Wr,{className:"w-32 h-8 text-sm",children:d.jsx(ua,{})}),d.jsx(Br,{children:o.map((c,p)=>d.jsx(Yr,{value:p.toString(),children:c},c))})]}),d.jsxs(la,{value:n.toString(),onValueChange:l,children:[d.jsx(Wr,{className:"w-20 h-8 text-sm",children:d.jsx(ua,{})}),d.jsx(Br,{className:"max-h-[200px]",children:s.map(c=>d.jsx(Yr,{value:c.toString(),children:c},c))})]})]}),d.jsx(gn,{variant:"outline",size:"small",onClick:m,className:"h-7 w-7 p-0",children:d.jsx(Hi,{className:"h-4 w-4"})})]})}fa.extend(Nx);const Hr=({label:e,placeholder:t="Pick a date",helperText:n,error:r,required:o,value:a,onSelect:s,className:i,minDate:l,maxDate:u,disabled:m,readOnly:c,locale:p="en",showOutsideDays:h,dayPickerProps:y,month:g,onMonthChange:v,open:w,onOpenChange:x,...S})=>{const[k,C]=b.useState(!1),N=w!==void 0?w:k,M=x||C,D=g??a??new Date,L=B=>{B&&(!a||B.getTime()!==a.getTime())&&(s==null||s(B),M(!1))};return fa.locale(p),d.jsxs("div",{className:q("space-y-1",i),...S,children:[e&&d.jsxs(en,{className:"text-sm font-medium text-gray-700",children:[e,o&&d.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),d.jsxs(Lc,{open:N,onOpenChange:M,children:[d.jsx(Fc,{asChild:!0,children:d.jsxs(gn,{variant:"outline",className:q("w-full flex justify-between items-center font-normal",!a&&"text-muted-foreground",r&&"border border-red-500 focus:ring-red-500"),disabled:m,"aria-readonly":c,children:[d.jsx("span",{className:q("text-left",!a&&"text-muted-foreground"),children:a?fa(a).locale(p).format("LL"):t}),d.jsx(Np,{strokeWidth:1.2,className:"ml-6 h-6 w-6 shrink-0 text-foreground"})]})}),d.jsx(ja,{className:"w-auto p-0",align:"start",children:d.jsxs("div",{className:"bg-white rounded-md border shadow-md",children:[d.jsx(Tx,{month:D,onMonthChange:v??(()=>{})}),d.jsx("div",{className:"p-3",children:d.jsx(xx,{mode:"single",selected:a,onSelect:L,month:D,onMonthChange:v,fromDate:l,toDate:u,showOutsideDays:h,className:"p-0",classNames:{months:"flex flex-col sm:flex-row space-y-4 sm:space-x-4 sm:space-y-0",month:"space-y-4",caption:"hidden",caption_label:"text-sm font-medium",nav:"hidden",nav_button:"h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100",nav_button_previous:"absolute left-1 top-1",nav_button_next:"absolute right-1 top-1",table:"w-full border-collapse space-y-1",head_row:"flex",head_cell:"text-muted-foreground rounded-md w-9 font-normal text-[0.8rem]",row:"flex w-full mt-2",cell:"h-9 w-9 text-center text-sm p-0 relative [&:has([aria-selected].day-range-end)]:rounded-r-md [&:has([aria-selected].day-outside)]:bg-accent/50 [&:has([aria-selected])]:bg-accent first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md focus-within:relative focus-within:z-20",day:"h-9 w-9 p-0 font-normal aria-selected:opacity-100 hover:bg-accent hover:text-accent-foreground rounded-md transition-colors",day_range_end:"day-range-end",day_selected:"bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground",day_today:"bg-accent text-accent-foreground",day_outside:"day-outside text-muted-foreground opacity-50 aria-selected:bg-accent/50 aria-selected:text-muted-foreground aria-selected:opacity-30",day_disabled:"text-muted-foreground opacity-50",day_range_middle:"aria-selected:bg-accent aria-selected:text-accent-foreground",day_hidden:"invisible"},...y})})]})})]}),(n||r)&&d.jsx("p",{className:q("text-xs",r?"text-red-500":"text-gray-500"),children:r||n})]})};function wn({label:e,placeholder:t="Select option",options:n,leadingIcon:r,helperText:o,error:a,required:s,onValueChange:i,className:l,variant:u="default",disabled:m=!1}){return d.jsxs("div",{className:q("space-y-1",l),children:[e&&d.jsxs(en,{className:q("text-sm font-medium",m?"text-gray-400":"text-gray-700"),children:[e,s&&d.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),d.jsxs(la,{onValueChange:i,disabled:m,children:[d.jsx(Wr,{className:q("border-input focus-within:ring-primary",a&&"border-red-500 focus-within:ring-red-500",u==="gray"&&"bg-gray-100 border-gray-300 text-gray-700",m&&"opacity-50 cursor-not-allowed"),children:d.jsxs("div",{className:"flex items-center gap-2 w-full",children:[r&&d.jsx("div",{className:"text-gray-400",children:r}),d.jsx(ua,{placeholder:t})]})}),d.jsx(Br,{children:n.map(c=>d.jsx(Yr,{value:c.value,children:c.label},c.value))})]}),(o||a)&&d.jsx("p",{className:q("text-xs",a?"text-red-500":m?"text-gray-400":"text-gray-500"),children:a||o})]})}const Ox=({label:e,variant:t="filled",color:n="default",size:r="medium",deletable:o=!1,onDelete:a,onClick:s,icon:i,avatar:l,disabled:u=!1,className:m="",...c})=>{const p="inline-flex items-center gap-1 font-medium transition-all duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2",h={small:"px-2 py-0.5 text-xs rounded-full",medium:"px-3 py-1 text-sm rounded-full",large:"px-4 py-1.5 text-base rounded-full"},y={default:{filled:"bg-gray-200 text-gray-800 hover:bg-gray-300",outlined:"border border-gray-300 text-gray-700 hover:bg-gray-50"},primary:{filled:"bg-blue-500 text-white hover:bg-blue-600",outlined:"border border-blue-500 text-blue-600 hover:bg-blue-50"},secondary:{filled:"bg-purple-500 text-white hover:bg-purple-600",outlined:"border border-purple-500 text-purple-600 hover:bg-purple-50"},success:{filled:"bg-green-500 text-white hover:bg-green-600",outlined:"border border-green-500 text-green-600 hover:bg-green-50"},warning:{filled:"bg-yellow-500 text-white hover:bg-yellow-600",outlined:"border border-yellow-500 text-yellow-600 hover:bg-yellow-50"},error:{filled:"bg-red-500 text-white hover:bg-red-600",outlined:"border border-red-500 text-red-600 hover:bg-red-50"}},g=u?"opacity-50 cursor-not-allowed":"cursor-pointer",v=s&&!u?"hover:shadow-md":"",w=`
151
+ `)},Hv=0,mn=[];function zv(e){var t=f.useRef([]),n=f.useRef([0,0]),r=f.useRef(),o=f.useState(Hv++)[0],a=f.useState($c)[0],s=f.useRef(e);f.useEffect(function(){s.current=e},[e]),f.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var v=dv([e.lockRef.current],(e.shards||[]).map(ni),!0).filter(Boolean);return v.forEach(function(g){return g.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),v.forEach(function(g){return g.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var i=f.useCallback(function(v,g){if("touches"in v&&v.touches.length===2||v.type==="wheel"&&v.ctrlKey)return!s.current.allowPinchZoom;var b=Er(v),w=n.current,S="deltaX"in v?v.deltaX:w[0]-b[0],D="deltaY"in v?v.deltaY:w[1]-b[1],C,R=v.target,M=Math.abs(S)>Math.abs(D)?"h":"v";if("touches"in v&&M==="h"&&R.type==="range")return!1;var E=ei(M,R);if(!E)return!0;if(E?C=M:(C=M==="v"?"h":"v",E=ei(M,R)),!E)return!1;if(!r.current&&"changedTouches"in v&&(S||D)&&(r.current=C),!C)return!0;var $=r.current||C;return Wv($,g,v,$==="h"?S:D)},[]),l=f.useCallback(function(v){var g=v;if(!(!mn.length||mn[mn.length-1]!==a)){var b="deltaY"in g?ti(g):Er(g),w=t.current.filter(function(C){return C.name===g.type&&(C.target===g.target||g.target===C.shadowParent)&&Bv(C.delta,b)})[0];if(w&&w.should){g.cancelable&&g.preventDefault();return}if(!w){var S=(s.current.shards||[]).map(ni).filter(Boolean).filter(function(C){return C.contains(g.target)}),D=S.length>0?i(g,S[0]):!s.current.noIsolation;D&&g.cancelable&&g.preventDefault()}}},[]),u=f.useCallback(function(v,g,b,w){var S={name:v,delta:g,target:b,should:w,shadowParent:Gv(b)};t.current.push(S),setTimeout(function(){t.current=t.current.filter(function(D){return D!==S})},1)},[]),m=f.useCallback(function(v){n.current=Er(v),r.current=void 0},[]),c=f.useCallback(function(v){u(v.type,ti(v),v.target,i(v,e.lockRef.current))},[]),p=f.useCallback(function(v){u(v.type,Er(v),v.target,i(v,e.lockRef.current))},[]);f.useEffect(function(){return mn.push(a),e.setCallbacks({onScrollCapture:c,onWheelCapture:c,onTouchMoveCapture:p}),document.addEventListener("wheel",l,fn),document.addEventListener("touchmove",l,fn),document.addEventListener("touchstart",m,fn),function(){mn=mn.filter(function(v){return v!==a}),document.removeEventListener("wheel",l,fn),document.removeEventListener("touchmove",l,fn),document.removeEventListener("touchstart",m,fn)}},[]);var h=e.removeScrollBar,y=e.inert;return f.createElement(f.Fragment,null,y?f.createElement(a,{styles:Yv(o)}):null,h?f.createElement(Pv,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Gv(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Uv=wv(jc,zv);var cr=f.forwardRef(function(e,t){return f.createElement(so,ft({},e,{ref:t,sideCar:Uv}))});cr.classNames=so.classNames;var io="Popover",[Bc,aD]=Be(io,[Ft]),lr=Ft(),[qv,Wt]=Bc(io),Yc=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:o,onOpenChange:a,modal:s=!1}=e,i=lr(t),l=f.useRef(null),[u,m]=f.useState(!1),[c,p]=tt({prop:r,defaultProp:o??!1,onChange:a,caller:io});return d.jsx(ar,{...i,children:d.jsx(qv,{scope:t,contentId:ke(),triggerRef:l,open:c,onOpenChange:p,onOpenToggle:f.useCallback(()=>p(h=>!h),[p]),hasCustomAnchor:u,onCustomAnchorAdd:f.useCallback(()=>m(!0),[]),onCustomAnchorRemove:f.useCallback(()=>m(!1),[]),modal:s,children:n})})};Yc.displayName=io;var Hc="PopoverAnchor",Vv=f.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=Wt(Hc,n),a=lr(n),{onCustomAnchorAdd:s,onCustomAnchorRemove:i}=o;return f.useEffect(()=>(s(),()=>i()),[s,i]),d.jsx(sr,{...a,...r,ref:t})});Vv.displayName=Hc;var zc="PopoverTrigger",Gc=f.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=Wt(zc,n),a=lr(n),s=he(t,o.triggerRef),i=d.jsx(ee.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Xc(o.open),...r,ref:s,onClick:K(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?i:d.jsx(sr,{asChild:!0,...a,children:i})});Gc.displayName=zc;var Wa="PopoverPortal",[Kv,Xv]=Bc(Wa,{forceMount:void 0}),Uc=e=>{const{__scopePopover:t,forceMount:n,children:r,container:o}=e,a=Wt(Wa,t);return d.jsx(Kv,{scope:t,forceMount:n,children:d.jsx(ze,{present:n||a.open,children:d.jsx(ir,{asChild:!0,container:o,children:r})})})};Uc.displayName=Wa;var wn="PopoverContent",qc=f.forwardRef((e,t)=>{const n=Xv(wn,e.__scopePopover),{forceMount:r=n.forceMount,...o}=e,a=Wt(wn,e.__scopePopover);return d.jsx(ze,{present:r||a.open,children:a.modal?d.jsx(Qv,{...o,ref:t}):d.jsx(Jv,{...o,ref:t})})});qc.displayName=wn;var Zv=At("PopoverContent.RemoveScroll"),Qv=f.forwardRef((e,t)=>{const n=Wt(wn,e.__scopePopover),r=f.useRef(null),o=he(t,r),a=f.useRef(!1);return f.useEffect(()=>{const s=r.current;if(s)return ao(s)},[]),d.jsx(cr,{as:Zv,allowPinchZoom:!0,children:d.jsx(Vc,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:K(e.onCloseAutoFocus,s=>{var i;s.preventDefault(),a.current||(i=n.triggerRef.current)==null||i.focus()}),onPointerDownOutside:K(e.onPointerDownOutside,s=>{const i=s.detail.originalEvent,l=i.button===0&&i.ctrlKey===!0,u=i.button===2||l;a.current=u},{checkForDefaultPrevented:!1}),onFocusOutside:K(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1})})})}),Jv=f.forwardRef((e,t)=>{const n=Wt(wn,e.__scopePopover),r=f.useRef(!1),o=f.useRef(!1);return d.jsx(Vc,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var s,i;(s=e.onCloseAutoFocus)==null||s.call(e,a),a.defaultPrevented||(r.current||(i=n.triggerRef.current)==null||i.focus(),a.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:a=>{var l,u;(l=e.onInteractOutside)==null||l.call(e,a),a.defaultPrevented||(r.current=!0,a.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const s=a.target;((u=n.triggerRef.current)==null?void 0:u.contains(s))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&o.current&&a.preventDefault()}})}),Vc=f.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:a,disableOutsidePointerEvents:s,onEscapeKeyDown:i,onPointerDownOutside:l,onFocusOutside:u,onInteractOutside:m,...c}=e,p=Wt(wn,n),h=lr(n);return Jr(),d.jsx(rr,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:a,children:d.jsx(En,{asChild:!0,disableOutsidePointerEvents:s,onInteractOutside:m,onEscapeKeyDown:i,onPointerDownOutside:l,onFocusOutside:u,onDismiss:()=>p.onOpenChange(!1),children:d.jsx(ro,{"data-state":Xc(p.open),role:"dialog",id:p.contentId,...h,...c,ref:t,style:{...c.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),Kc="PopoverClose",ey=f.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=Wt(Kc,n);return d.jsx(ee.button,{type:"button",...r,ref:t,onClick:K(e.onClick,()=>o.onOpenChange(!1))})});ey.displayName=Kc;var ty="PopoverArrow",ny=f.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=lr(n);return d.jsx(oo,{...o,...r,ref:t})});ny.displayName=ty;function Xc(e){return e?"open":"closed"}var ry=Yc,oy=Gc,ay=Uc,Zc=qc;const Ba=ry,Ya=oy,co=f.forwardRef(({className:e,sideOffset:t=4,...n},r)=>d.jsx(ay,{children:d.jsx(Zc,{ref:r,sideOffset:t,className:F("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...n})}));co.displayName=Zc.displayName;function ri(e,[t,n]){return Math.min(n,Math.max(t,e))}function Ha(e){const t=e+"CollectionProvider",[n,r]=Be(t),[o,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),s=v=>{const{scope:g,children:b}=v,w=x.useRef(null),S=x.useRef(new Map).current;return d.jsx(o,{scope:g,itemMap:S,collectionRef:w,children:b})};s.displayName=t;const i=e+"CollectionSlot",l=At(i),u=x.forwardRef((v,g)=>{const{scope:b,children:w}=v,S=a(i,b),D=he(g,S.collectionRef);return d.jsx(l,{ref:D,children:w})});u.displayName=i;const m=e+"CollectionItemSlot",c="data-radix-collection-item",p=At(m),h=x.forwardRef((v,g)=>{const{scope:b,children:w,...S}=v,D=x.useRef(null),C=he(g,D),R=a(m,b);return x.useEffect(()=>(R.itemMap.set(D,{ref:D,...S}),()=>void R.itemMap.delete(D))),d.jsx(p,{[c]:"",ref:C,children:w})});h.displayName=m;function y(v){const g=a(e+"CollectionConsumer",v);return x.useCallback(()=>{const w=g.collectionRef.current;if(!w)return[];const S=Array.from(w.querySelectorAll(`[${c}]`));return Array.from(g.itemMap.values()).sort((R,M)=>S.indexOf(R.ref.current)-S.indexOf(M.ref.current))},[g.collectionRef,g.itemMap])}return[{Provider:s,Slot:u,ItemSlot:h},y,r]}var sy=f.createContext(void 0);function ur(e){const t=f.useContext(sy);return e||t||"ltr"}function za(e){const t=f.useRef({value:e,previous:e});return f.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var Qc=Object.freeze({position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}),iy="VisuallyHidden",Jc=f.forwardRef((e,t)=>d.jsx(ee.span,{...e,ref:t,style:{...Qc,...e.style}}));Jc.displayName=iy;var cy=Jc,ly=[" ","Enter","ArrowUp","ArrowDown"],uy=[" ","Enter"],Jt="Select",[lo,uo,dy]=Ha(Jt),[Tn,sD]=Be(Jt,[dy,Ft]),fo=Ft(),[fy,Bt]=Tn(Jt),[my,py]=Tn(Jt),el=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:a,value:s,defaultValue:i,onValueChange:l,dir:u,name:m,autoComplete:c,disabled:p,required:h,form:y}=e,v=fo(t),[g,b]=f.useState(null),[w,S]=f.useState(null),[D,C]=f.useState(!1),R=ur(u),[M,E]=tt({prop:r,defaultProp:o??!1,onChange:a,caller:Jt}),[$,B]=tt({prop:s,defaultProp:i,onChange:l,caller:Jt}),L=f.useRef(null),q=g?y||!!g.closest("form"):!0,[A,T]=f.useState(new Set),_=Array.from(A).map(N=>N.props.value).join(";");return d.jsx(ar,{...v,children:d.jsxs(fy,{required:h,scope:t,trigger:g,onTriggerChange:b,valueNode:w,onValueNodeChange:S,valueNodeHasChildren:D,onValueNodeHasChildrenChange:C,contentId:ke(),value:$,onValueChange:B,open:M,onOpenChange:E,dir:R,triggerPointerDownPosRef:L,disabled:p,children:[d.jsx(lo.Provider,{scope:t,children:d.jsx(my,{scope:e.__scopeSelect,onNativeOptionAdd:f.useCallback(N=>{T(I=>new Set(I).add(N))},[]),onNativeOptionRemove:f.useCallback(N=>{T(I=>{const k=new Set(I);return k.delete(N),k})},[]),children:n})}),q?d.jsxs(Ml,{"aria-hidden":!0,required:h,tabIndex:-1,name:m,autoComplete:c,value:$,onChange:N=>B(N.target.value),disabled:p,form:y,children:[$===void 0?d.jsx("option",{value:""}):null,Array.from(A)]},_):null]})})};el.displayName=Jt;var tl="SelectTrigger",nl=f.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,a=fo(n),s=Bt(tl,n),i=s.disabled||r,l=he(t,s.onTriggerChange),u=uo(n),m=f.useRef("touch"),[c,p,h]=kl(v=>{const g=u().filter(S=>!S.disabled),b=g.find(S=>S.value===s.value),w=El(g,v,b);w!==void 0&&s.onValueChange(w.value)}),y=v=>{i||(s.onOpenChange(!0),h()),v&&(s.triggerPointerDownPosRef.current={x:Math.round(v.pageX),y:Math.round(v.pageY)})};return d.jsx(sr,{asChild:!0,...a,children:d.jsx(ee.button,{type:"button",role:"combobox","aria-controls":s.contentId,"aria-expanded":s.open,"aria-required":s.required,"aria-autocomplete":"none",dir:s.dir,"data-state":s.open?"open":"closed",disabled:i,"data-disabled":i?"":void 0,"data-placeholder":Dl(s.value)?"":void 0,...o,ref:l,onClick:K(o.onClick,v=>{v.currentTarget.focus(),m.current!=="mouse"&&y(v)}),onPointerDown:K(o.onPointerDown,v=>{m.current=v.pointerType;const g=v.target;g.hasPointerCapture(v.pointerId)&&g.releasePointerCapture(v.pointerId),v.button===0&&v.ctrlKey===!1&&v.pointerType==="mouse"&&(y(v),v.preventDefault())}),onKeyDown:K(o.onKeyDown,v=>{const g=c.current!=="";!(v.ctrlKey||v.altKey||v.metaKey)&&v.key.length===1&&p(v.key),!(g&&v.key===" ")&&ly.includes(v.key)&&(y(),v.preventDefault())})})})});nl.displayName=tl;var rl="SelectValue",ol=f.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:a,placeholder:s="",...i}=e,l=Bt(rl,n),{onValueNodeHasChildrenChange:u}=l,m=a!==void 0,c=he(t,l.onValueNodeChange);return Ne(()=>{u(m)},[u,m]),d.jsx(ee.span,{...i,ref:c,style:{pointerEvents:"none"},children:Dl(l.value)?d.jsx(d.Fragment,{children:s}):a})});ol.displayName=rl;var hy="SelectIcon",al=f.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return d.jsx(ee.span,{"aria-hidden":!0,...o,ref:t,children:r||"▼"})});al.displayName=hy;var gy="SelectPortal",sl=e=>d.jsx(ir,{asChild:!0,...e});sl.displayName=gy;var en="SelectContent",il=f.forwardRef((e,t)=>{const n=Bt(en,e.__scopeSelect),[r,o]=f.useState();if(Ne(()=>{o(new DocumentFragment)},[]),!n.open){const a=r;return a?Qr.createPortal(d.jsx(cl,{scope:e.__scopeSelect,children:d.jsx(lo.Slot,{scope:e.__scopeSelect,children:d.jsx("div",{children:e.children})})}),a):null}return d.jsx(ll,{...e,ref:t})});il.displayName=en;var ot=10,[cl,Yt]=Tn(en),vy="SelectContentImpl",yy=At("SelectContent.RemoveScroll"),ll=f.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:a,onPointerDownOutside:s,side:i,sideOffset:l,align:u,alignOffset:m,arrowPadding:c,collisionBoundary:p,collisionPadding:h,sticky:y,hideWhenDetached:v,avoidCollisions:g,...b}=e,w=Bt(en,n),[S,D]=f.useState(null),[C,R]=f.useState(null),M=he(t,W=>D(W)),[E,$]=f.useState(null),[B,L]=f.useState(null),q=uo(n),[A,T]=f.useState(!1),_=f.useRef(!1);f.useEffect(()=>{if(S)return ao(S)},[S]),Jr();const N=f.useCallback(W=>{const[Z,...X]=q().map(ue=>ue.ref.current),[Q]=X.slice(-1),se=document.activeElement;for(const ue of W)if(ue===se||(ue==null||ue.scrollIntoView({block:"nearest"}),ue===Z&&C&&(C.scrollTop=0),ue===Q&&C&&(C.scrollTop=C.scrollHeight),ue==null||ue.focus(),document.activeElement!==se))return},[q,C]),I=f.useCallback(()=>N([E,S]),[N,E,S]);f.useEffect(()=>{A&&I()},[A,I]);const{onOpenChange:k,triggerPointerDownPosRef:P}=w;f.useEffect(()=>{if(S){let W={x:0,y:0};const Z=Q=>{var se,ue;W={x:Math.abs(Math.round(Q.pageX)-(((se=P.current)==null?void 0:se.x)??0)),y:Math.abs(Math.round(Q.pageY)-(((ue=P.current)==null?void 0:ue.y)??0))}},X=Q=>{W.x<=10&&W.y<=10?Q.preventDefault():S.contains(Q.target)||k(!1),document.removeEventListener("pointermove",Z),P.current=null};return P.current!==null&&(document.addEventListener("pointermove",Z),document.addEventListener("pointerup",X,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",Z),document.removeEventListener("pointerup",X,{capture:!0})}}},[S,k,P]),f.useEffect(()=>{const W=()=>k(!1);return window.addEventListener("blur",W),window.addEventListener("resize",W),()=>{window.removeEventListener("blur",W),window.removeEventListener("resize",W)}},[k]);const[H,z]=kl(W=>{const Z=q().filter(se=>!se.disabled),X=Z.find(se=>se.ref.current===document.activeElement),Q=El(Z,W,X);Q&&setTimeout(()=>Q.ref.current.focus())}),O=f.useCallback((W,Z,X)=>{const Q=!_.current&&!X;(w.value!==void 0&&w.value===Z||Q)&&($(W),Q&&(_.current=!0))},[w.value]),j=f.useCallback(()=>S==null?void 0:S.focus(),[S]),Y=f.useCallback((W,Z,X)=>{const Q=!_.current&&!X;(w.value!==void 0&&w.value===Z||Q)&&L(W)},[w.value]),G=r==="popper"?la:ul,V=G===la?{side:i,sideOffset:l,align:u,alignOffset:m,arrowPadding:c,collisionBoundary:p,collisionPadding:h,sticky:y,hideWhenDetached:v,avoidCollisions:g}:{};return d.jsx(cl,{scope:n,content:S,viewport:C,onViewportChange:R,itemRefCallback:O,selectedItem:E,onItemLeave:j,itemTextRefCallback:Y,focusSelectedItem:I,selectedItemText:B,position:r,isPositioned:A,searchRef:H,children:d.jsx(cr,{as:yy,allowPinchZoom:!0,children:d.jsx(rr,{asChild:!0,trapped:w.open,onMountAutoFocus:W=>{W.preventDefault()},onUnmountAutoFocus:K(o,W=>{var Z;(Z=w.trigger)==null||Z.focus({preventScroll:!0}),W.preventDefault()}),children:d.jsx(En,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:s,onFocusOutside:W=>W.preventDefault(),onDismiss:()=>w.onOpenChange(!1),children:d.jsx(G,{role:"listbox",id:w.contentId,"data-state":w.open?"open":"closed",dir:w.dir,onContextMenu:W=>W.preventDefault(),...b,...V,onPlaced:()=>T(!0),ref:M,style:{display:"flex",flexDirection:"column",outline:"none",...b.style},onKeyDown:K(b.onKeyDown,W=>{const Z=W.ctrlKey||W.altKey||W.metaKey;if(W.key==="Tab"&&W.preventDefault(),!Z&&W.key.length===1&&z(W.key),["ArrowUp","ArrowDown","Home","End"].includes(W.key)){let Q=q().filter(se=>!se.disabled).map(se=>se.ref.current);if(["ArrowUp","End"].includes(W.key)&&(Q=Q.slice().reverse()),["ArrowUp","ArrowDown"].includes(W.key)){const se=W.target,ue=Q.indexOf(se);Q=Q.slice(ue+1)}setTimeout(()=>N(Q)),W.preventDefault()}})})})})})})});ll.displayName=vy;var by="SelectItemAlignedPosition",ul=f.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,a=Bt(en,n),s=Yt(en,n),[i,l]=f.useState(null),[u,m]=f.useState(null),c=he(t,M=>m(M)),p=uo(n),h=f.useRef(!1),y=f.useRef(!0),{viewport:v,selectedItem:g,selectedItemText:b,focusSelectedItem:w}=s,S=f.useCallback(()=>{if(a.trigger&&a.valueNode&&i&&u&&v&&g&&b){const M=a.trigger.getBoundingClientRect(),E=u.getBoundingClientRect(),$=a.valueNode.getBoundingClientRect(),B=b.getBoundingClientRect();if(a.dir!=="rtl"){const se=B.left-E.left,ue=$.left-se,ye=M.left-ue,J=M.width+ye,Re=Math.max(J,E.width),Te=window.innerWidth-ot,oe=ri(ue,[ot,Math.max(ot,Te-Re)]);i.style.minWidth=J+"px",i.style.left=oe+"px"}else{const se=E.right-B.right,ue=window.innerWidth-$.right-se,ye=window.innerWidth-M.right-ue,J=M.width+ye,Re=Math.max(J,E.width),Te=window.innerWidth-ot,oe=ri(ue,[ot,Math.max(ot,Te-Re)]);i.style.minWidth=J+"px",i.style.right=oe+"px"}const L=p(),q=window.innerHeight-ot*2,A=v.scrollHeight,T=window.getComputedStyle(u),_=parseInt(T.borderTopWidth,10),N=parseInt(T.paddingTop,10),I=parseInt(T.borderBottomWidth,10),k=parseInt(T.paddingBottom,10),P=_+N+A+k+I,H=Math.min(g.offsetHeight*5,P),z=window.getComputedStyle(v),O=parseInt(z.paddingTop,10),j=parseInt(z.paddingBottom,10),Y=M.top+M.height/2-ot,G=q-Y,V=g.offsetHeight/2,W=g.offsetTop+V,Z=_+N+W,X=P-Z;if(Z<=Y){const se=L.length>0&&g===L[L.length-1].ref.current;i.style.bottom="0px";const ue=u.clientHeight-v.offsetTop-v.offsetHeight,ye=Math.max(G,V+(se?j:0)+ue+I),J=Z+ye;i.style.height=J+"px"}else{const se=L.length>0&&g===L[0].ref.current;i.style.top="0px";const ye=Math.max(Y,_+v.offsetTop+(se?O:0)+V)+X;i.style.height=ye+"px",v.scrollTop=Z-Y+v.offsetTop}i.style.margin=`${ot}px 0`,i.style.minHeight=H+"px",i.style.maxHeight=q+"px",r==null||r(),requestAnimationFrame(()=>h.current=!0)}},[p,a.trigger,a.valueNode,i,u,v,g,b,a.dir,r]);Ne(()=>S(),[S]);const[D,C]=f.useState();Ne(()=>{u&&C(window.getComputedStyle(u).zIndex)},[u]);const R=f.useCallback(M=>{M&&y.current===!0&&(S(),w==null||w(),y.current=!1)},[S,w]);return d.jsx(xy,{scope:n,contentWrapper:i,shouldExpandOnScrollRef:h,onScrollButtonChange:R,children:d.jsx("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:D},children:d.jsx(ee.div,{...o,ref:c,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});ul.displayName=by;var wy="SelectPopperPosition",la=f.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=ot,...a}=e,s=fo(n);return d.jsx(ro,{...s,...a,ref:t,align:r,collisionPadding:o,style:{boxSizing:"border-box",...a.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}})});la.displayName=wy;var[xy,Ga]=Tn(en,{}),ua="SelectViewport",dl=f.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...o}=e,a=Yt(ua,n),s=Ga(ua,n),i=he(t,a.onViewportChange),l=f.useRef(0);return d.jsxs(d.Fragment,{children:[d.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),d.jsx(lo.Slot,{scope:n,children:d.jsx(ee.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:i,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:K(o.onScroll,u=>{const m=u.currentTarget,{contentWrapper:c,shouldExpandOnScrollRef:p}=s;if(p!=null&&p.current&&c){const h=Math.abs(l.current-m.scrollTop);if(h>0){const y=window.innerHeight-ot*2,v=parseFloat(c.style.minHeight),g=parseFloat(c.style.height),b=Math.max(v,g);if(b<y){const w=b+h,S=Math.min(y,w),D=w-S;c.style.height=S+"px",c.style.bottom==="0px"&&(m.scrollTop=D>0?D:0,c.style.justifyContent="flex-end")}}}l.current=m.scrollTop})})})]})});dl.displayName=ua;var fl="SelectGroup",[Sy,Cy]=Tn(fl),My=f.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=ke();return d.jsx(Sy,{scope:n,id:o,children:d.jsx(ee.div,{role:"group","aria-labelledby":o,...r,ref:t})})});My.displayName=fl;var ml="SelectLabel",pl=f.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Cy(ml,n);return d.jsx(ee.div,{id:o.id,...r,ref:t})});pl.displayName=ml;var Hr="SelectItem",[Dy,hl]=Tn(Hr),gl=f.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:a,...s}=e,i=Bt(Hr,n),l=Yt(Hr,n),u=i.value===r,[m,c]=f.useState(a??""),[p,h]=f.useState(!1),y=he(t,w=>{var S;return(S=l.itemRefCallback)==null?void 0:S.call(l,w,r,o)}),v=ke(),g=f.useRef("touch"),b=()=>{o||(i.onValueChange(r),i.onOpenChange(!1))};if(r==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return d.jsx(Dy,{scope:n,value:r,disabled:o,textId:v,isSelected:u,onItemTextChange:f.useCallback(w=>{c(S=>S||((w==null?void 0:w.textContent)??"").trim())},[]),children:d.jsx(lo.ItemSlot,{scope:n,value:r,disabled:o,textValue:m,children:d.jsx(ee.div,{role:"option","aria-labelledby":v,"data-highlighted":p?"":void 0,"aria-selected":u&&p,"data-state":u?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...s,ref:y,onFocus:K(s.onFocus,()=>h(!0)),onBlur:K(s.onBlur,()=>h(!1)),onClick:K(s.onClick,()=>{g.current!=="mouse"&&b()}),onPointerUp:K(s.onPointerUp,()=>{g.current==="mouse"&&b()}),onPointerDown:K(s.onPointerDown,w=>{g.current=w.pointerType}),onPointerMove:K(s.onPointerMove,w=>{var S;g.current=w.pointerType,o?(S=l.onItemLeave)==null||S.call(l):g.current==="mouse"&&w.currentTarget.focus({preventScroll:!0})}),onPointerLeave:K(s.onPointerLeave,w=>{var S;w.currentTarget===document.activeElement&&((S=l.onItemLeave)==null||S.call(l))}),onKeyDown:K(s.onKeyDown,w=>{var D;((D=l.searchRef)==null?void 0:D.current)!==""&&w.key===" "||(uy.includes(w.key)&&b(),w.key===" "&&w.preventDefault())})})})})});gl.displayName=Hr;var Hn="SelectItemText",vl=f.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,...a}=e,s=Bt(Hn,n),i=Yt(Hn,n),l=hl(Hn,n),u=py(Hn,n),[m,c]=f.useState(null),p=he(t,b=>c(b),l.onItemTextChange,b=>{var w;return(w=i.itemTextRefCallback)==null?void 0:w.call(i,b,l.value,l.disabled)}),h=m==null?void 0:m.textContent,y=f.useMemo(()=>d.jsx("option",{value:l.value,disabled:l.disabled,children:h},l.value),[l.disabled,l.value,h]),{onNativeOptionAdd:v,onNativeOptionRemove:g}=u;return Ne(()=>(v(y),()=>g(y)),[v,g,y]),d.jsxs(d.Fragment,{children:[d.jsx(ee.span,{id:l.textId,...a,ref:p}),l.isSelected&&s.valueNode&&!s.valueNodeHasChildren?Qr.createPortal(a.children,s.valueNode):null]})});vl.displayName=Hn;var yl="SelectItemIndicator",bl=f.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return hl(yl,n).isSelected?d.jsx(ee.span,{"aria-hidden":!0,...r,ref:t}):null});bl.displayName=yl;var da="SelectScrollUpButton",wl=f.forwardRef((e,t)=>{const n=Yt(da,e.__scopeSelect),r=Ga(da,e.__scopeSelect),[o,a]=f.useState(!1),s=he(t,r.onScrollButtonChange);return Ne(()=>{if(n.viewport&&n.isPositioned){let i=function(){const u=l.scrollTop>0;a(u)};const l=n.viewport;return i(),l.addEventListener("scroll",i),()=>l.removeEventListener("scroll",i)}},[n.viewport,n.isPositioned]),o?d.jsx(Sl,{...e,ref:s,onAutoScroll:()=>{const{viewport:i,selectedItem:l}=n;i&&l&&(i.scrollTop=i.scrollTop-l.offsetHeight)}}):null});wl.displayName=da;var fa="SelectScrollDownButton",xl=f.forwardRef((e,t)=>{const n=Yt(fa,e.__scopeSelect),r=Ga(fa,e.__scopeSelect),[o,a]=f.useState(!1),s=he(t,r.onScrollButtonChange);return Ne(()=>{if(n.viewport&&n.isPositioned){let i=function(){const u=l.scrollHeight-l.clientHeight,m=Math.ceil(l.scrollTop)<u;a(m)};const l=n.viewport;return i(),l.addEventListener("scroll",i),()=>l.removeEventListener("scroll",i)}},[n.viewport,n.isPositioned]),o?d.jsx(Sl,{...e,ref:s,onAutoScroll:()=>{const{viewport:i,selectedItem:l}=n;i&&l&&(i.scrollTop=i.scrollTop+l.offsetHeight)}}):null});xl.displayName=fa;var Sl=f.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,a=Yt("SelectScrollButton",n),s=f.useRef(null),i=uo(n),l=f.useCallback(()=>{s.current!==null&&(window.clearInterval(s.current),s.current=null)},[]);return f.useEffect(()=>()=>l(),[l]),Ne(()=>{var m;const u=i().find(c=>c.ref.current===document.activeElement);(m=u==null?void 0:u.ref.current)==null||m.scrollIntoView({block:"nearest"})},[i]),d.jsx(ee.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:K(o.onPointerDown,()=>{s.current===null&&(s.current=window.setInterval(r,50))}),onPointerMove:K(o.onPointerMove,()=>{var u;(u=a.onItemLeave)==null||u.call(a),s.current===null&&(s.current=window.setInterval(r,50))}),onPointerLeave:K(o.onPointerLeave,()=>{l()})})}),ky="SelectSeparator",Cl=f.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return d.jsx(ee.div,{"aria-hidden":!0,...r,ref:t})});Cl.displayName=ky;var ma="SelectArrow",Ey=f.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=fo(n),a=Bt(ma,n),s=Yt(ma,n);return a.open&&s.position==="popper"?d.jsx(oo,{...o,...r,ref:t}):null});Ey.displayName=ma;var Ny="SelectBubbleInput",Ml=f.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const o=f.useRef(null),a=he(r,o),s=za(t);return f.useEffect(()=>{const i=o.current;if(!i)return;const l=window.HTMLSelectElement.prototype,m=Object.getOwnPropertyDescriptor(l,"value").set;if(s!==t&&m){const c=new Event("change",{bubbles:!0});m.call(i,t),i.dispatchEvent(c)}},[s,t]),d.jsx(ee.select,{...n,style:{...Qc,...n.style},ref:a,defaultValue:t})});Ml.displayName=Ny;function Dl(e){return e===""||e===void 0}function kl(e){const t=et(e),n=f.useRef(""),r=f.useRef(0),o=f.useCallback(s=>{const i=n.current+s;t(i),function l(u){n.current=u,window.clearTimeout(r.current),u!==""&&(r.current=window.setTimeout(()=>l(""),1e3))}(i)},[t]),a=f.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return f.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,o,a]}function El(e,t,n){const o=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,a=n?e.indexOf(n):-1;let s=Ry(e,Math.max(a,0));o.length===1&&(s=s.filter(u=>u!==n));const l=s.find(u=>u.textValue.toLowerCase().startsWith(o.toLowerCase()));return l!==n?l:void 0}function Ry(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var Ty=el,Nl=nl,_y=ol,Oy=al,Py=sl,Rl=il,Ay=dl,Tl=pl,_l=gl,Iy=vl,jy=bl,Ol=wl,Pl=xl,Al=Cl;const pa=Ty,ha=_y,zr=f.forwardRef(({className:e,children:t,...n},r)=>d.jsxs(Nl,{ref:r,className:F("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background data-[placeholder]:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...n,children:[t,d.jsx(Oy,{asChild:!0,children:d.jsx(nr,{strokeWidth:1.5,className:"h-4 w-4 text-foreground"})})]}));zr.displayName=Nl.displayName;const Il=f.forwardRef(({className:e,...t},n)=>d.jsx(Ol,{ref:n,className:F("flex cursor-default items-center justify-center py-1",e),...t,children:d.jsx(Jp,{className:"h-4 w-4"})}));Il.displayName=Ol.displayName;const jl=f.forwardRef(({className:e,...t},n)=>d.jsx(Pl,{ref:n,className:F("flex cursor-default items-center justify-center py-1",e),...t,children:d.jsx(nr,{className:"h-4 w-4"})}));jl.displayName=Pl.displayName;const Gr=f.forwardRef(({className:e,children:t,position:n="popper",...r},o)=>d.jsx(Py,{children:d.jsxs(Rl,{ref:o,className:F("relative z-50 max-h-[--radix-select-content-available-height] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-select-content-transform-origin]",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,...r,children:[d.jsx(Il,{}),d.jsx(Ay,{className:F("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),d.jsx(jl,{})]})}));Gr.displayName=Rl.displayName;const $y=f.forwardRef(({className:e,...t},n)=>d.jsx(Tl,{ref:n,className:F("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}));$y.displayName=Tl.displayName;const Ur=f.forwardRef(({className:e,children:t,...n},r)=>d.jsxs(_l,{ref:r,className:F("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[d.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:d.jsx(jy,{children:d.jsx(tr,{className:"h-4 w-4"})})}),d.jsx(Iy,{children:t})]}));Ur.displayName=_l.displayName;const Ly=f.forwardRef(({className:e,...t},n)=>d.jsx(Al,{ref:n,className:F("-mx-1 my-1 h-px bg-muted",e),...t}));Ly.displayName=Al.displayName;const Lo={},zn={};function Un(e,t){try{const r=(Lo[e]||(Lo[e]=new Intl.DateTimeFormat("en-GB",{timeZone:e,hour:"numeric",timeZoneName:"longOffset"}).format))(t).split("GMT")[1]||"";return r in zn?zn[r]:oi(r,r.split(":"))}catch{if(e in zn)return zn[e];const n=e==null?void 0:e.match(Fy);return n?oi(e,n.slice(1)):NaN}}const Fy=/([+-]\d\d):?(\d\d)?/;function oi(e,t){const n=+t[0],r=+(t[1]||0);return zn[e]=n>0?n*60+r:n*60-r}class pt extends Date{constructor(...t){super(),t.length>1&&typeof t[t.length-1]=="string"&&(this.timeZone=t.pop()),this.internal=new Date,isNaN(Un(this.timeZone,this))?this.setTime(NaN):t.length?typeof t[0]=="number"&&(t.length===1||t.length===2&&typeof t[1]!="number")?this.setTime(t[0]):typeof t[0]=="string"?this.setTime(+new Date(t[0])):t[0]instanceof Date?this.setTime(+t[0]):(this.setTime(+new Date(...t)),$l(this),ga(this)):this.setTime(Date.now())}static tz(t,...n){return n.length?new pt(...n,t):new pt(Date.now(),t)}withTimeZone(t){return new pt(+this,t)}getTimezoneOffset(){return-Un(this.timeZone,this)}setTime(t){return Date.prototype.setTime.apply(this,arguments),ga(this),+this}[Symbol.for("constructDateFrom")](t){return new pt(+new Date(t),this.timeZone)}}const ai=/^(get|set)(?!UTC)/;Object.getOwnPropertyNames(Date.prototype).forEach(e=>{if(!ai.test(e))return;const t=e.replace(ai,"$1UTC");pt.prototype[t]&&(e.startsWith("get")?pt.prototype[e]=function(){return this.internal[t]()}:(pt.prototype[e]=function(){return Date.prototype[t].apply(this.internal,arguments),Wy(this),+this},pt.prototype[t]=function(){return Date.prototype[t].apply(this,arguments),ga(this),+this}))});function ga(e){e.internal.setTime(+e),e.internal.setUTCMinutes(e.internal.getUTCMinutes()-e.getTimezoneOffset())}function Wy(e){Date.prototype.setFullYear.call(e,e.internal.getUTCFullYear(),e.internal.getUTCMonth(),e.internal.getUTCDate()),Date.prototype.setHours.call(e,e.internal.getUTCHours(),e.internal.getUTCMinutes(),e.internal.getUTCSeconds(),e.internal.getUTCMilliseconds()),$l(e)}function $l(e){const t=Un(e.timeZone,e),n=new Date(+e);n.setUTCHours(n.getUTCHours()-1);const r=-new Date(+e).getTimezoneOffset(),o=-new Date(+n).getTimezoneOffset(),a=r-o,s=Date.prototype.getHours.apply(e)!==e.internal.getUTCHours();a&&s&&e.internal.setUTCMinutes(e.internal.getUTCMinutes()+a);const i=r-t;i&&Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+i);const l=Un(e.timeZone,e),m=-new Date(+e).getTimezoneOffset()-l,c=l!==t,p=m-i;if(c&&p){Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+p);const h=Un(e.timeZone,e),y=l-h;y&&(e.internal.setUTCMinutes(e.internal.getUTCMinutes()+y),Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+y))}}class We extends pt{static tz(t,...n){return n.length?new We(...n,t):new We(Date.now(),t)}toISOString(){const[t,n,r]=this.tzComponents(),o=`${t}${n}:${r}`;return this.internal.toISOString().slice(0,-1)+o}toString(){return`${this.toDateString()} ${this.toTimeString()}`}toDateString(){const[t,n,r,o]=this.internal.toUTCString().split(" ");return`${t==null?void 0:t.slice(0,-1)} ${r} ${n} ${o}`}toTimeString(){const t=this.internal.toUTCString().split(" ")[4],[n,r,o]=this.tzComponents();return`${t} GMT${n}${r}${o} (${By(this.timeZone,this)})`}toLocaleString(t,n){return Date.prototype.toLocaleString.call(this,t,{...n,timeZone:(n==null?void 0:n.timeZone)||this.timeZone})}toLocaleDateString(t,n){return Date.prototype.toLocaleDateString.call(this,t,{...n,timeZone:(n==null?void 0:n.timeZone)||this.timeZone})}toLocaleTimeString(t,n){return Date.prototype.toLocaleTimeString.call(this,t,{...n,timeZone:(n==null?void 0:n.timeZone)||this.timeZone})}tzComponents(){const t=this.getTimezoneOffset(),n=t>0?"-":"+",r=String(Math.floor(Math.abs(t)/60)).padStart(2,"0"),o=String(Math.abs(t)%60).padStart(2,"0");return[n,r,o]}withTimeZone(t){return new We(+this,t)}[Symbol.for("constructDateFrom")](t){return new We(+new Date(t),this.timeZone)}}function By(e,t){return new Intl.DateTimeFormat("en-GB",{timeZone:e,timeZoneName:"long"}).format(t).slice(12)}var ce;(function(e){e.Root="root",e.Chevron="chevron",e.Day="day",e.DayButton="day_button",e.CaptionLabel="caption_label",e.Dropdowns="dropdowns",e.Dropdown="dropdown",e.DropdownRoot="dropdown_root",e.Footer="footer",e.MonthGrid="month_grid",e.MonthCaption="month_caption",e.MonthsDropdown="months_dropdown",e.Month="month",e.Months="months",e.Nav="nav",e.NextMonthButton="button_next",e.PreviousMonthButton="button_previous",e.Week="week",e.Weeks="weeks",e.Weekday="weekday",e.Weekdays="weekdays",e.WeekNumber="week_number",e.WeekNumberHeader="week_number_header",e.YearsDropdown="years_dropdown"})(ce||(ce={}));var De;(function(e){e.disabled="disabled",e.hidden="hidden",e.outside="outside",e.focused="focused",e.today="today"})(De||(De={}));var at;(function(e){e.range_end="range_end",e.range_middle="range_middle",e.range_start="range_start",e.selected="selected"})(at||(at={}));var Ke;(function(e){e.weeks_before_enter="weeks_before_enter",e.weeks_before_exit="weeks_before_exit",e.weeks_after_enter="weeks_after_enter",e.weeks_after_exit="weeks_after_exit",e.caption_after_enter="caption_after_enter",e.caption_after_exit="caption_after_exit",e.caption_before_enter="caption_before_enter",e.caption_before_exit="caption_before_exit"})(Ke||(Ke={}));const Ll=6048e5,Yy=864e5,si=Symbol.for("constructDateFrom");function Pe(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&si in e?e[si](t):e instanceof Date?new e.constructor(t):new Date(t)}function Se(e,t){return Pe(t||e,e)}function Fl(e,t,n){const r=Se(e,n==null?void 0:n.in);return isNaN(t)?Pe(e,NaN):(t&&r.setDate(r.getDate()+t),r)}function Wl(e,t,n){const r=Se(e,n==null?void 0:n.in);if(isNaN(t))return Pe(e,NaN);if(!t)return r;const o=r.getDate(),a=Pe(e,r.getTime());a.setMonth(r.getMonth()+t+1,0);const s=a.getDate();return o>=s?a:(r.setFullYear(a.getFullYear(),a.getMonth(),o),r)}let Hy={};function dr(){return Hy}function xn(e,t){var i,l,u,m;const n=dr(),r=(t==null?void 0:t.weekStartsOn)??((l=(i=t==null?void 0:t.locale)==null?void 0:i.options)==null?void 0:l.weekStartsOn)??n.weekStartsOn??((m=(u=n.locale)==null?void 0:u.options)==null?void 0:m.weekStartsOn)??0,o=Se(e,t==null?void 0:t.in),a=o.getDay(),s=(a<r?7:0)+a-r;return o.setDate(o.getDate()-s),o.setHours(0,0,0,0),o}function Kn(e,t){return xn(e,{...t,weekStartsOn:1})}function Bl(e,t){const n=Se(e,t==null?void 0:t.in),r=n.getFullYear(),o=Pe(n,0);o.setFullYear(r+1,0,4),o.setHours(0,0,0,0);const a=Kn(o),s=Pe(n,0);s.setFullYear(r,0,4),s.setHours(0,0,0,0);const i=Kn(s);return n.getTime()>=a.getTime()?r+1:n.getTime()>=i.getTime()?r:r-1}function ii(e){const t=Se(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function _n(e,...t){const n=Pe.bind(null,t.find(r=>typeof r=="object"));return t.map(n)}function Xn(e,t){const n=Se(e,t==null?void 0:t.in);return n.setHours(0,0,0,0),n}function Yl(e,t,n){const[r,o]=_n(n==null?void 0:n.in,e,t),a=Xn(r),s=Xn(o),i=+a-ii(a),l=+s-ii(s);return Math.round((i-l)/Yy)}function zy(e,t){const n=Bl(e,t),r=Pe(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),Kn(r)}function Gy(e,t,n){return Fl(e,t*7,n)}function Uy(e,t,n){return Wl(e,t*12,n)}function qy(e,t){let n,r=t==null?void 0:t.in;return e.forEach(o=>{!r&&typeof o=="object"&&(r=Pe.bind(null,o));const a=Se(o,r);(!n||n<a||isNaN(+a))&&(n=a)}),Pe(r,n||NaN)}function Vy(e,t){let n,r=t==null?void 0:t.in;return e.forEach(o=>{!r&&typeof o=="object"&&(r=Pe.bind(null,o));const a=Se(o,r);(!n||n>a||isNaN(+a))&&(n=a)}),Pe(r,n||NaN)}function Ky(e,t,n){const[r,o]=_n(n==null?void 0:n.in,e,t);return+Xn(r)==+Xn(o)}function Hl(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function Xy(e){return!(!Hl(e)&&typeof e!="number"||isNaN(+Se(e)))}function Zy(e,t,n){const[r,o]=_n(n==null?void 0:n.in,e,t),a=r.getFullYear()-o.getFullYear(),s=r.getMonth()-o.getMonth();return a*12+s}function Qy(e,t){const n=Se(e,t==null?void 0:t.in),r=n.getMonth();return n.setFullYear(n.getFullYear(),r+1,0),n.setHours(23,59,59,999),n}function Jy(e,t){const[n,r]=_n(e,t.start,t.end);return{start:n,end:r}}function eb(e,t){const{start:n,end:r}=Jy(t==null?void 0:t.in,e);let o=+n>+r;const a=o?+n:+r,s=o?r:n;s.setHours(0,0,0,0),s.setDate(1);let i=1;const l=[];for(;+s<=a;)l.push(Pe(n,s)),s.setMonth(s.getMonth()+i);return o?l.reverse():l}function tb(e,t){const n=Se(e,t==null?void 0:t.in);return n.setDate(1),n.setHours(0,0,0,0),n}function nb(e,t){const n=Se(e,t==null?void 0:t.in),r=n.getFullYear();return n.setFullYear(r+1,0,0),n.setHours(23,59,59,999),n}function zl(e,t){const n=Se(e,t==null?void 0:t.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function Gl(e,t){var i,l,u,m;const n=dr(),r=(t==null?void 0:t.weekStartsOn)??((l=(i=t==null?void 0:t.locale)==null?void 0:i.options)==null?void 0:l.weekStartsOn)??n.weekStartsOn??((m=(u=n.locale)==null?void 0:u.options)==null?void 0:m.weekStartsOn)??0,o=Se(e,t==null?void 0:t.in),a=o.getDay(),s=(a<r?-7:0)+6-(a-r);return o.setDate(o.getDate()+s),o.setHours(23,59,59,999),o}function rb(e,t){return Gl(e,{...t,weekStartsOn:1})}const ob={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},ab=(e,t,n)=>{let r;const o=ob[e];return typeof o=="string"?r=o:t===1?r=o.one:r=o.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function Fo(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const sb={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},ib={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},cb={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},lb={date:Fo({formats:sb,defaultWidth:"full"}),time:Fo({formats:ib,defaultWidth:"full"}),dateTime:Fo({formats:cb,defaultWidth:"full"})},ub={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},db=(e,t,n,r)=>ub[e];function $n(e){return(t,n)=>{const r=n!=null&&n.context?String(n.context):"standalone";let o;if(r==="formatting"&&e.formattingValues){const s=e.defaultFormattingWidth||e.defaultWidth,i=n!=null&&n.width?String(n.width):s;o=e.formattingValues[i]||e.formattingValues[s]}else{const s=e.defaultWidth,i=n!=null&&n.width?String(n.width):e.defaultWidth;o=e.values[i]||e.values[s]}const a=e.argumentCallback?e.argumentCallback(t):t;return o[a]}}const fb={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},mb={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},pb={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},hb={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},gb={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},vb={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},yb=(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},bb={ordinalNumber:yb,era:$n({values:fb,defaultWidth:"wide"}),quarter:$n({values:mb,defaultWidth:"wide",argumentCallback:e=>e-1}),month:$n({values:pb,defaultWidth:"wide"}),day:$n({values:hb,defaultWidth:"wide"}),dayPeriod:$n({values:gb,defaultWidth:"wide",formattingValues:vb,defaultFormattingWidth:"wide"})};function Ln(e){return(t,n={})=>{const r=n.width,o=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],a=t.match(o);if(!a)return null;const s=a[0],i=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],l=Array.isArray(i)?xb(i,c=>c.test(s)):wb(i,c=>c.test(s));let u;u=e.valueCallback?e.valueCallback(l):l,u=n.valueCallback?n.valueCallback(u):u;const m=t.slice(s.length);return{value:u,rest:m}}}function wb(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function xb(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function Sb(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const o=r[0],a=t.match(e.parsePattern);if(!a)return null;let s=e.valueCallback?e.valueCallback(a[0]):a[0];s=n.valueCallback?n.valueCallback(s):s;const i=t.slice(o.length);return{value:s,rest:i}}}const Cb=/^(\d+)(th|st|nd|rd)?/i,Mb=/\d+/i,Db={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},kb={any:[/^b/i,/^(a|c)/i]},Eb={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Nb={any:[/1/i,/2/i,/3/i,/4/i]},Rb={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},Tb={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},_b={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},Ob={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},Pb={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},Ab={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},Ib={ordinalNumber:Sb({matchPattern:Cb,parsePattern:Mb,valueCallback:e=>parseInt(e,10)}),era:Ln({matchPatterns:Db,defaultMatchWidth:"wide",parsePatterns:kb,defaultParseWidth:"any"}),quarter:Ln({matchPatterns:Eb,defaultMatchWidth:"wide",parsePatterns:Nb,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Ln({matchPatterns:Rb,defaultMatchWidth:"wide",parsePatterns:Tb,defaultParseWidth:"any"}),day:Ln({matchPatterns:_b,defaultMatchWidth:"wide",parsePatterns:Ob,defaultParseWidth:"any"}),dayPeriod:Ln({matchPatterns:Pb,defaultMatchWidth:"any",parsePatterns:Ab,defaultParseWidth:"any"})},Ua={code:"en-US",formatDistance:ab,formatLong:lb,formatRelative:db,localize:bb,match:Ib,options:{weekStartsOn:0,firstWeekContainsDate:1}};function jb(e,t){const n=Se(e,t==null?void 0:t.in);return Yl(n,zl(n))+1}function Ul(e,t){const n=Se(e,t==null?void 0:t.in),r=+Kn(n)-+zy(n);return Math.round(r/Ll)+1}function ql(e,t){var m,c,p,h;const n=Se(e,t==null?void 0:t.in),r=n.getFullYear(),o=dr(),a=(t==null?void 0:t.firstWeekContainsDate)??((c=(m=t==null?void 0:t.locale)==null?void 0:m.options)==null?void 0:c.firstWeekContainsDate)??o.firstWeekContainsDate??((h=(p=o.locale)==null?void 0:p.options)==null?void 0:h.firstWeekContainsDate)??1,s=Pe((t==null?void 0:t.in)||e,0);s.setFullYear(r+1,0,a),s.setHours(0,0,0,0);const i=xn(s,t),l=Pe((t==null?void 0:t.in)||e,0);l.setFullYear(r,0,a),l.setHours(0,0,0,0);const u=xn(l,t);return+n>=+i?r+1:+n>=+u?r:r-1}function $b(e,t){var i,l,u,m;const n=dr(),r=(t==null?void 0:t.firstWeekContainsDate)??((l=(i=t==null?void 0:t.locale)==null?void 0:i.options)==null?void 0:l.firstWeekContainsDate)??n.firstWeekContainsDate??((m=(u=n.locale)==null?void 0:u.options)==null?void 0:m.firstWeekContainsDate)??1,o=ql(e,t),a=Pe((t==null?void 0:t.in)||e,0);return a.setFullYear(o,0,r),a.setHours(0,0,0,0),xn(a,t)}function Vl(e,t){const n=Se(e,t==null?void 0:t.in),r=+xn(n,t)-+$b(n,t);return Math.round(r/Ll)+1}function we(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const _t={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return we(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):we(n+1,2)},d(e,t){return we(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(e,t){return we(e.getHours()%12||12,t.length)},H(e,t){return we(e.getHours(),t.length)},m(e,t){return we(e.getMinutes(),t.length)},s(e,t){return we(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),o=Math.trunc(r*Math.pow(10,n-3));return we(o,t.length)}},pn={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},ci={G:function(e,t,n){const r=e.getFullYear()>0?1:0;switch(t){case"G":case"GG":case"GGG":return n.era(r,{width:"abbreviated"});case"GGGGG":return n.era(r,{width:"narrow"});case"GGGG":default:return n.era(r,{width:"wide"})}},y:function(e,t,n){if(t==="yo"){const r=e.getFullYear(),o=r>0?r:1-r;return n.ordinalNumber(o,{unit:"year"})}return _t.y(e,t)},Y:function(e,t,n,r){const o=ql(e,r),a=o>0?o:1-o;if(t==="YY"){const s=a%100;return we(s,2)}return t==="Yo"?n.ordinalNumber(a,{unit:"year"}):we(a,t.length)},R:function(e,t){const n=Bl(e);return we(n,t.length)},u:function(e,t){const n=e.getFullYear();return we(n,t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return we(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return we(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return _t.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return we(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const o=Vl(e,r);return t==="wo"?n.ordinalNumber(o,{unit:"week"}):we(o,t.length)},I:function(e,t,n){const r=Ul(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):we(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):_t.d(e,t)},D:function(e,t,n){const r=jb(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):we(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const o=e.getDay(),a=(o-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(a);case"ee":return we(a,2);case"eo":return n.ordinalNumber(a,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});case"eeee":default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const o=e.getDay(),a=(o-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(a);case"cc":return we(a,t.length);case"co":return n.ordinalNumber(a,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});case"cccc":default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),o=r===0?7:r;switch(t){case"i":return String(o);case"ii":return we(o,t.length);case"io":return n.ordinalNumber(o,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const o=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let o;switch(r===12?o=pn.noon:r===0?o=pn.midnight:o=r/12>=1?"pm":"am",t){case"b":case"bb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"bbbb":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},B:function(e,t,n){const r=e.getHours();let o;switch(r>=17?o=pn.evening:r>=12?o=pn.afternoon:r>=4?o=pn.morning:o=pn.night,t){case"B":case"BB":case"BBB":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"BBBB":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},h:function(e,t,n){if(t==="ho"){let r=e.getHours()%12;return r===0&&(r=12),n.ordinalNumber(r,{unit:"hour"})}return _t.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):_t.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):we(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):we(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):_t.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):_t.s(e,t)},S:function(e,t){return _t.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return ui(r);case"XXXX":case"XX":return Xt(r);case"XXXXX":case"XXX":default:return Xt(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return ui(r);case"xxxx":case"xx":return Xt(r);case"xxxxx":case"xxx":default:return Xt(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+li(r,":");case"OOOO":default:return"GMT"+Xt(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+li(r,":");case"zzzz":default:return"GMT"+Xt(r,":")}},t:function(e,t,n){const r=Math.trunc(+e/1e3);return we(r,t.length)},T:function(e,t,n){return we(+e,t.length)}};function li(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Math.trunc(r/60),a=r%60;return a===0?n+String(o):n+String(o)+t+we(a,2)}function ui(e,t){return e%60===0?(e>0?"-":"+")+we(Math.abs(e)/60,2):Xt(e,t)}function Xt(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=we(Math.trunc(r/60),2),a=we(r%60,2);return n+o+t+a}const di=(e,t)=>{switch(e){case"P":return t.date({width:"short"});case"PP":return t.date({width:"medium"});case"PPP":return t.date({width:"long"});case"PPPP":default:return t.date({width:"full"})}},Kl=(e,t)=>{switch(e){case"p":return t.time({width:"short"});case"pp":return t.time({width:"medium"});case"ppp":return t.time({width:"long"});case"pppp":default:return t.time({width:"full"})}},Lb=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return di(e,t);let a;switch(r){case"P":a=t.dateTime({width:"short"});break;case"PP":a=t.dateTime({width:"medium"});break;case"PPP":a=t.dateTime({width:"long"});break;case"PPPP":default:a=t.dateTime({width:"full"});break}return a.replace("{{date}}",di(r,t)).replace("{{time}}",Kl(o,t))},Fb={p:Kl,P:Lb},Wb=/^D+$/,Bb=/^Y+$/,Yb=["D","DD","YY","YYYY"];function Hb(e){return Wb.test(e)}function zb(e){return Bb.test(e)}function Gb(e,t,n){const r=Ub(e,t,n);if(console.warn(r),Yb.includes(e))throw new RangeError(r)}function Ub(e,t,n){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const qb=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Vb=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Kb=/^'([^]*?)'?$/,Xb=/''/g,Zb=/[a-zA-Z]/;function Qb(e,t,n){var m,c,p,h,y,v,g,b;const r=dr(),o=(n==null?void 0:n.locale)??r.locale??Ua,a=(n==null?void 0:n.firstWeekContainsDate)??((c=(m=n==null?void 0:n.locale)==null?void 0:m.options)==null?void 0:c.firstWeekContainsDate)??r.firstWeekContainsDate??((h=(p=r.locale)==null?void 0:p.options)==null?void 0:h.firstWeekContainsDate)??1,s=(n==null?void 0:n.weekStartsOn)??((v=(y=n==null?void 0:n.locale)==null?void 0:y.options)==null?void 0:v.weekStartsOn)??r.weekStartsOn??((b=(g=r.locale)==null?void 0:g.options)==null?void 0:b.weekStartsOn)??0,i=Se(e,n==null?void 0:n.in);if(!Xy(i))throw new RangeError("Invalid time value");let l=t.match(Vb).map(w=>{const S=w[0];if(S==="p"||S==="P"){const D=Fb[S];return D(w,o.formatLong)}return w}).join("").match(qb).map(w=>{if(w==="''")return{isToken:!1,value:"'"};const S=w[0];if(S==="'")return{isToken:!1,value:Jb(w)};if(ci[S])return{isToken:!0,value:w};if(S.match(Zb))throw new RangeError("Format string contains an unescaped latin alphabet character `"+S+"`");return{isToken:!1,value:w}});o.localize.preprocessor&&(l=o.localize.preprocessor(i,l));const u={firstWeekContainsDate:a,weekStartsOn:s,locale:o};return l.map(w=>{if(!w.isToken)return w.value;const S=w.value;(!(n!=null&&n.useAdditionalWeekYearTokens)&&zb(S)||!(n!=null&&n.useAdditionalDayOfYearTokens)&&Hb(S))&&Gb(S,t,String(e));const D=ci[S[0]];return D(i,S,o.localize,u)}).join("")}function Jb(e){const t=e.match(Kb);return t?t[1].replace(Xb,"'"):e}function ew(e,t){const n=Se(e,t==null?void 0:t.in),r=n.getFullYear(),o=n.getMonth(),a=Pe(n,0);return a.setFullYear(r,o+1,0),a.setHours(0,0,0,0),a.getDate()}function tw(e,t){return Se(e,t==null?void 0:t.in).getMonth()}function nw(e,t){return Se(e,t==null?void 0:t.in).getFullYear()}function rw(e,t){return+Se(e)>+Se(t)}function ow(e,t){return+Se(e)<+Se(t)}function aw(e,t,n){const[r,o]=_n(n==null?void 0:n.in,e,t);return r.getFullYear()===o.getFullYear()&&r.getMonth()===o.getMonth()}function sw(e,t,n){const[r,o]=_n(n==null?void 0:n.in,e,t);return r.getFullYear()===o.getFullYear()}function iw(e,t,n){const r=Se(e,n==null?void 0:n.in),o=r.getFullYear(),a=r.getDate(),s=Pe(e,0);s.setFullYear(o,t,15),s.setHours(0,0,0,0);const i=ew(s);return r.setMonth(t,Math.min(a,i)),r}function cw(e,t,n){const r=Se(e,n==null?void 0:n.in);return isNaN(+r)?Pe(e,NaN):(r.setFullYear(t),r)}const fi=5,lw=4;function uw(e,t){const n=t.startOfMonth(e),r=n.getDay()>0?n.getDay():7,o=t.addDays(e,-r+1),a=t.addDays(o,fi*7-1);return t.getMonth(e)===t.getMonth(a)?fi:lw}function Xl(e,t){const n=t.startOfMonth(e),r=n.getDay();return r===1?n:r===0?t.addDays(n,-1*6):t.addDays(n,-1*(r-1))}function dw(e,t){const n=Xl(e,t),r=uw(e,t);return t.addDays(n,r*7-1)}class Et{constructor(t,n){this.Date=Date,this.today=()=>{var r;return(r=this.overrides)!=null&&r.today?this.overrides.today():this.options.timeZone?We.tz(this.options.timeZone):new this.Date},this.newDate=(r,o,a)=>{var s;return(s=this.overrides)!=null&&s.newDate?this.overrides.newDate(r,o,a):this.options.timeZone?new We(r,o,a,this.options.timeZone):new Date(r,o,a)},this.addDays=(r,o)=>{var a;return(a=this.overrides)!=null&&a.addDays?this.overrides.addDays(r,o):Fl(r,o)},this.addMonths=(r,o)=>{var a;return(a=this.overrides)!=null&&a.addMonths?this.overrides.addMonths(r,o):Wl(r,o)},this.addWeeks=(r,o)=>{var a;return(a=this.overrides)!=null&&a.addWeeks?this.overrides.addWeeks(r,o):Gy(r,o)},this.addYears=(r,o)=>{var a;return(a=this.overrides)!=null&&a.addYears?this.overrides.addYears(r,o):Uy(r,o)},this.differenceInCalendarDays=(r,o)=>{var a;return(a=this.overrides)!=null&&a.differenceInCalendarDays?this.overrides.differenceInCalendarDays(r,o):Yl(r,o)},this.differenceInCalendarMonths=(r,o)=>{var a;return(a=this.overrides)!=null&&a.differenceInCalendarMonths?this.overrides.differenceInCalendarMonths(r,o):Zy(r,o)},this.eachMonthOfInterval=r=>{var o;return(o=this.overrides)!=null&&o.eachMonthOfInterval?this.overrides.eachMonthOfInterval(r):eb(r)},this.endOfBroadcastWeek=r=>{var o;return(o=this.overrides)!=null&&o.endOfBroadcastWeek?this.overrides.endOfBroadcastWeek(r):dw(r,this)},this.endOfISOWeek=r=>{var o;return(o=this.overrides)!=null&&o.endOfISOWeek?this.overrides.endOfISOWeek(r):rb(r)},this.endOfMonth=r=>{var o;return(o=this.overrides)!=null&&o.endOfMonth?this.overrides.endOfMonth(r):Qy(r)},this.endOfWeek=(r,o)=>{var a;return(a=this.overrides)!=null&&a.endOfWeek?this.overrides.endOfWeek(r,o):Gl(r,this.options)},this.endOfYear=r=>{var o;return(o=this.overrides)!=null&&o.endOfYear?this.overrides.endOfYear(r):nb(r)},this.format=(r,o,a)=>{var i;const s=(i=this.overrides)!=null&&i.format?this.overrides.format(r,o,this.options):Qb(r,o,this.options);return this.options.numerals&&this.options.numerals!=="latn"?this.replaceDigits(s):s},this.getISOWeek=r=>{var o;return(o=this.overrides)!=null&&o.getISOWeek?this.overrides.getISOWeek(r):Ul(r)},this.getMonth=(r,o)=>{var a;return(a=this.overrides)!=null&&a.getMonth?this.overrides.getMonth(r,this.options):tw(r,this.options)},this.getYear=(r,o)=>{var a;return(a=this.overrides)!=null&&a.getYear?this.overrides.getYear(r,this.options):nw(r,this.options)},this.getWeek=(r,o)=>{var a;return(a=this.overrides)!=null&&a.getWeek?this.overrides.getWeek(r,this.options):Vl(r,this.options)},this.isAfter=(r,o)=>{var a;return(a=this.overrides)!=null&&a.isAfter?this.overrides.isAfter(r,o):rw(r,o)},this.isBefore=(r,o)=>{var a;return(a=this.overrides)!=null&&a.isBefore?this.overrides.isBefore(r,o):ow(r,o)},this.isDate=r=>{var o;return(o=this.overrides)!=null&&o.isDate?this.overrides.isDate(r):Hl(r)},this.isSameDay=(r,o)=>{var a;return(a=this.overrides)!=null&&a.isSameDay?this.overrides.isSameDay(r,o):Ky(r,o)},this.isSameMonth=(r,o)=>{var a;return(a=this.overrides)!=null&&a.isSameMonth?this.overrides.isSameMonth(r,o):aw(r,o)},this.isSameYear=(r,o)=>{var a;return(a=this.overrides)!=null&&a.isSameYear?this.overrides.isSameYear(r,o):sw(r,o)},this.max=r=>{var o;return(o=this.overrides)!=null&&o.max?this.overrides.max(r):qy(r)},this.min=r=>{var o;return(o=this.overrides)!=null&&o.min?this.overrides.min(r):Vy(r)},this.setMonth=(r,o)=>{var a;return(a=this.overrides)!=null&&a.setMonth?this.overrides.setMonth(r,o):iw(r,o)},this.setYear=(r,o)=>{var a;return(a=this.overrides)!=null&&a.setYear?this.overrides.setYear(r,o):cw(r,o)},this.startOfBroadcastWeek=(r,o)=>{var a;return(a=this.overrides)!=null&&a.startOfBroadcastWeek?this.overrides.startOfBroadcastWeek(r,this):Xl(r,this)},this.startOfDay=r=>{var o;return(o=this.overrides)!=null&&o.startOfDay?this.overrides.startOfDay(r):Xn(r)},this.startOfISOWeek=r=>{var o;return(o=this.overrides)!=null&&o.startOfISOWeek?this.overrides.startOfISOWeek(r):Kn(r)},this.startOfMonth=r=>{var o;return(o=this.overrides)!=null&&o.startOfMonth?this.overrides.startOfMonth(r):tb(r)},this.startOfWeek=(r,o)=>{var a;return(a=this.overrides)!=null&&a.startOfWeek?this.overrides.startOfWeek(r,this.options):xn(r,this.options)},this.startOfYear=r=>{var o;return(o=this.overrides)!=null&&o.startOfYear?this.overrides.startOfYear(r):zl(r)},this.options={locale:Ua,...t},this.overrides=n}getDigitMap(){const{numerals:t="latn"}=this.options,n=new Intl.NumberFormat("en-US",{numberingSystem:t}),r={};for(let o=0;o<10;o++)r[o.toString()]=n.format(o);return r}replaceDigits(t){const n=this.getDigitMap();return t.replace(/\d/g,r=>n[r]||r)}formatNumber(t){return this.replaceDigits(t.toString())}}const yt=new Et;class Zl{constructor(t,n,r=yt){this.date=t,this.displayMonth=n,this.outside=!!(n&&!r.isSameMonth(t,n)),this.dateLib=r}isEqualTo(t){return this.dateLib.isSameDay(t.date,this.date)&&this.dateLib.isSameMonth(t.displayMonth,this.displayMonth)}}class fw{constructor(t,n){this.date=t,this.weeks=n}}class mw{constructor(t,n){this.days=n,this.weekNumber=t}}function xt(e,t,n=!1,r=yt){let{from:o,to:a}=e;const{differenceInCalendarDays:s,isSameDay:i}=r;return o&&a?(s(a,o)<0&&([o,a]=[a,o]),s(t,o)>=(n?1:0)&&s(a,t)>=(n?1:0)):!n&&a?i(a,t):!n&&o?i(o,t):!1}function Ql(e){return!!(e&&typeof e=="object"&&"before"in e&&"after"in e)}function qa(e){return!!(e&&typeof e=="object"&&"from"in e)}function Jl(e){return!!(e&&typeof e=="object"&&"after"in e)}function eu(e){return!!(e&&typeof e=="object"&&"before"in e)}function tu(e){return!!(e&&typeof e=="object"&&"dayOfWeek"in e)}function nu(e,t){return Array.isArray(e)&&e.every(t.isDate)}function St(e,t,n=yt){const r=Array.isArray(t)?t:[t],{isSameDay:o,differenceInCalendarDays:a,isAfter:s}=n;return r.some(i=>{if(typeof i=="boolean")return i;if(n.isDate(i))return o(e,i);if(nu(i,n))return i.includes(e);if(qa(i))return xt(i,e,!1,n);if(tu(i))return Array.isArray(i.dayOfWeek)?i.dayOfWeek.includes(e.getDay()):i.dayOfWeek===e.getDay();if(Ql(i)){const l=a(i.before,e),u=a(i.after,e),m=l>0,c=u<0;return s(i.before,i.after)?c&&m:m||c}return Jl(i)?a(e,i.after)>0:eu(i)?a(i.before,e)>0:typeof i=="function"?i(e):!1})}function pw(e,t,n,r,o){const{disabled:a,hidden:s,modifiers:i,showOutsideDays:l,broadcastCalendar:u,today:m}=t,{isSameDay:c,isSameMonth:p,startOfMonth:h,isBefore:y,endOfMonth:v,isAfter:g}=o,b=n&&h(n),w=r&&v(r),S={[De.focused]:[],[De.outside]:[],[De.disabled]:[],[De.hidden]:[],[De.today]:[]},D={};for(const C of e){const{date:R,displayMonth:M}=C,E=!!(M&&!p(R,M)),$=!!(b&&y(R,b)),B=!!(w&&g(R,w)),L=!!(a&&St(R,a,o)),q=!!(s&&St(R,s,o))||$||B||!u&&!l&&E||u&&l===!1&&E,A=c(R,m??o.today());E&&S.outside.push(C),L&&S.disabled.push(C),q&&S.hidden.push(C),A&&S.today.push(C),i&&Object.keys(i).forEach(T=>{const _=i==null?void 0:i[T];_&&St(R,_,o)&&(D[T]?D[T].push(C):D[T]=[C])})}return C=>{const R={[De.focused]:!1,[De.disabled]:!1,[De.hidden]:!1,[De.outside]:!1,[De.today]:!1},M={};for(const E in S){const $=S[E];R[E]=$.some(B=>B===C)}for(const E in D)M[E]=D[E].some($=>$===C);return{...R,...M}}}function hw(e,t,n={}){return Object.entries(e).filter(([,o])=>o===!0).reduce((o,[a])=>(n[a]?o.push(n[a]):t[De[a]]?o.push(t[De[a]]):t[at[a]]&&o.push(t[at[a]]),o),[t[ce.Day]])}function gw(e){return x.createElement("button",{...e})}function vw(e){return x.createElement("span",{...e})}function yw(e){const{size:t=24,orientation:n="left",className:r}=e;return x.createElement("svg",{className:r,width:t,height:t,viewBox:"0 0 24 24"},n==="up"&&x.createElement("polygon",{points:"6.77 17 12.5 11.43 18.24 17 20 15.28 12.5 8 5 15.28"}),n==="down"&&x.createElement("polygon",{points:"6.77 8 12.5 13.57 18.24 8 20 9.72 12.5 17 5 9.72"}),n==="left"&&x.createElement("polygon",{points:"16 18.112 9.81111111 12 16 5.87733333 14.0888889 4 6 12 14.0888889 20"}),n==="right"&&x.createElement("polygon",{points:"8 18.112 14.18888889 12 8 5.87733333 9.91111111 4 18 12 9.91111111 20"}))}function bw(e){const{day:t,modifiers:n,...r}=e;return x.createElement("td",{...r})}function ww(e){const{day:t,modifiers:n,...r}=e,o=x.useRef(null);return x.useEffect(()=>{var a;n.focused&&((a=o.current)==null||a.focus())},[n.focused]),x.createElement("button",{ref:o,...r})}function xw(e){const{options:t,className:n,components:r,classNames:o,...a}=e,s=[o[ce.Dropdown],n].join(" "),i=t==null?void 0:t.find(({value:l})=>l===a.value);return x.createElement("span",{"data-disabled":a.disabled,className:o[ce.DropdownRoot]},x.createElement(r.Select,{className:s,...a},t==null?void 0:t.map(({value:l,label:u,disabled:m})=>x.createElement(r.Option,{key:l,value:l,disabled:m},u))),x.createElement("span",{className:o[ce.CaptionLabel],"aria-hidden":!0},i==null?void 0:i.label,x.createElement(r.Chevron,{orientation:"down",size:18,className:o[ce.Chevron]})))}function Sw(e){return x.createElement("div",{...e})}function Cw(e){return x.createElement("div",{...e})}function Mw(e){const{calendarMonth:t,displayIndex:n,...r}=e;return x.createElement("div",{...r},e.children)}function Dw(e){const{calendarMonth:t,displayIndex:n,...r}=e;return x.createElement("div",{...r})}function kw(e){return x.createElement("table",{...e})}function Ew(e){return x.createElement("div",{...e})}const ru=x.createContext(void 0);function fr(){const e=x.useContext(ru);if(e===void 0)throw new Error("useDayPicker() must be used within a custom component.");return e}function Nw(e){const{components:t}=fr();return x.createElement(t.Dropdown,{...e})}function Rw(e){const{onPreviousClick:t,onNextClick:n,previousMonth:r,nextMonth:o,...a}=e,{components:s,classNames:i,labels:{labelPrevious:l,labelNext:u}}=fr(),m=x.useCallback(p=>{o&&(n==null||n(p))},[o,n]),c=x.useCallback(p=>{r&&(t==null||t(p))},[r,t]);return x.createElement("nav",{...a},x.createElement(s.PreviousMonthButton,{type:"button",className:i[ce.PreviousMonthButton],tabIndex:r?void 0:-1,"aria-disabled":r?void 0:!0,"aria-label":l(r),onClick:c},x.createElement(s.Chevron,{disabled:r?void 0:!0,className:i[ce.Chevron],orientation:"left"})),x.createElement(s.NextMonthButton,{type:"button",className:i[ce.NextMonthButton],tabIndex:o?void 0:-1,"aria-disabled":o?void 0:!0,"aria-label":u(o),onClick:m},x.createElement(s.Chevron,{disabled:o?void 0:!0,orientation:"right",className:i[ce.Chevron]})))}function Tw(e){const{components:t}=fr();return x.createElement(t.Button,{...e})}function _w(e){return x.createElement("option",{...e})}function Ow(e){const{components:t}=fr();return x.createElement(t.Button,{...e})}function Pw(e){const{rootRef:t,...n}=e;return x.createElement("div",{...n,ref:t})}function Aw(e){return x.createElement("select",{...e})}function Iw(e){const{week:t,...n}=e;return x.createElement("tr",{...n})}function jw(e){return x.createElement("th",{...e})}function $w(e){return x.createElement("thead",{"aria-hidden":!0},x.createElement("tr",{...e}))}function Lw(e){const{week:t,...n}=e;return x.createElement("th",{...n})}function Fw(e){return x.createElement("th",{...e})}function Ww(e){return x.createElement("tbody",{...e})}function Bw(e){const{components:t}=fr();return x.createElement(t.Dropdown,{...e})}const Yw=Object.freeze(Object.defineProperty({__proto__:null,Button:gw,CaptionLabel:vw,Chevron:yw,Day:bw,DayButton:ww,Dropdown:xw,DropdownNav:Sw,Footer:Cw,Month:Mw,MonthCaption:Dw,MonthGrid:kw,Months:Ew,MonthsDropdown:Nw,Nav:Rw,NextMonthButton:Tw,Option:_w,PreviousMonthButton:Ow,Root:Pw,Select:Aw,Week:Iw,WeekNumber:Lw,WeekNumberHeader:Fw,Weekday:jw,Weekdays:$w,Weeks:Ww,YearsDropdown:Bw},Symbol.toStringTag,{value:"Module"}));function Hw(e){return{...Yw,...e}}function zw(e){const t={"data-mode":e.mode??void 0,"data-required":"required"in e?e.required:void 0,"data-multiple-months":e.numberOfMonths&&e.numberOfMonths>1||void 0,"data-week-numbers":e.showWeekNumber||void 0,"data-broadcast-calendar":e.broadcastCalendar||void 0,"data-nav-layout":e.navLayout||void 0};return Object.entries(e).forEach(([n,r])=>{n.startsWith("data-")&&(t[n]=r)}),t}function Va(){const e={};for(const t in ce)e[ce[t]]=`rdp-${ce[t]}`;for(const t in De)e[De[t]]=`rdp-${De[t]}`;for(const t in at)e[at[t]]=`rdp-${at[t]}`;for(const t in Ke)e[Ke[t]]=`rdp-${Ke[t]}`;return e}function ou(e,t,n){return(n??new Et(t)).format(e,"LLLL y")}const Gw=ou;function Uw(e,t,n){return(n??new Et(t)).format(e,"d")}function qw(e,t=yt){return t.format(e,"LLLL")}function Vw(e,t=yt){return e<10?t.formatNumber(`0${e.toLocaleString()}`):t.formatNumber(`${e.toLocaleString()}`)}function Kw(){return""}function Xw(e,t,n){return(n??new Et(t)).format(e,"cccccc")}function au(e,t=yt){return t.format(e,"yyyy")}const Zw=au,Qw=Object.freeze(Object.defineProperty({__proto__:null,formatCaption:ou,formatDay:Uw,formatMonthCaption:Gw,formatMonthDropdown:qw,formatWeekNumber:Vw,formatWeekNumberHeader:Kw,formatWeekdayName:Xw,formatYearCaption:Zw,formatYearDropdown:au},Symbol.toStringTag,{value:"Module"}));function Jw(e){return e!=null&&e.formatMonthCaption&&!e.formatCaption&&(e.formatCaption=e.formatMonthCaption),e!=null&&e.formatYearCaption&&!e.formatYearDropdown&&(e.formatYearDropdown=e.formatYearCaption),{...Qw,...e}}function ex(e,t,n,r,o){const{startOfMonth:a,startOfYear:s,endOfYear:i,eachMonthOfInterval:l,getMonth:u}=o;return l({start:s(e),end:i(e)}).map(p=>{const h=r.formatMonthDropdown(p,o),y=u(p),v=t&&p<a(t)||n&&p>a(n)||!1;return{value:y,label:h,disabled:v}})}function tx(e,t={},n={}){let r={...t==null?void 0:t[ce.Day]};return Object.entries(e).filter(([,o])=>o===!0).forEach(([o])=>{r={...r,...n==null?void 0:n[o]}}),r}function nx(e,t,n){const r=e.today(),o=t?e.startOfISOWeek(r):e.startOfWeek(r),a=[];for(let s=0;s<7;s++){const i=e.addDays(o,s);a.push(i)}return a}function rx(e,t,n,r){if(!e||!t)return;const{startOfYear:o,endOfYear:a,addYears:s,getYear:i,isBefore:l,isSameYear:u}=r,m=o(e),c=a(t),p=[];let h=m;for(;l(h,c)||u(h,c);)p.push(h),h=s(h,1);return p.map(y=>{const v=n.formatYearDropdown(y,r);return{value:i(y),label:v,disabled:!1}})}function su(e,t,n){return(n??new Et(t)).format(e,"LLLL y")}const ox=su;function ax(e,t,n,r){let o=(r??new Et(n)).format(e,"PPPP");return t!=null&&t.today&&(o=`Today, ${o}`),o}function iu(e,t,n,r){let o=(r??new Et(n)).format(e,"PPPP");return t.today&&(o=`Today, ${o}`),t.selected&&(o=`${o}, selected`),o}const sx=iu;function ix(){return""}function cx(e){return"Choose the Month"}function lx(e){return"Go to the Next Month"}function ux(e){return"Go to the Previous Month"}function dx(e,t,n){return(n??new Et(t)).format(e,"cccc")}function fx(e,t){return`Week ${e}`}function mx(e){return"Week Number"}function px(e){return"Choose the Year"}const hx=Object.freeze(Object.defineProperty({__proto__:null,labelCaption:ox,labelDay:sx,labelDayButton:iu,labelGrid:su,labelGridcell:ax,labelMonthDropdown:cx,labelNav:ix,labelNext:lx,labelPrevious:ux,labelWeekNumber:fx,labelWeekNumberHeader:mx,labelWeekday:dx,labelYearDropdown:px},Symbol.toStringTag,{value:"Module"})),mr=e=>e instanceof HTMLElement?e:null,Wo=e=>[...e.querySelectorAll("[data-animated-month]")??[]],gx=e=>mr(e.querySelector("[data-animated-month]")),Bo=e=>mr(e.querySelector("[data-animated-caption]")),Yo=e=>mr(e.querySelector("[data-animated-weeks]")),vx=e=>mr(e.querySelector("[data-animated-nav]")),yx=e=>mr(e.querySelector("[data-animated-weekdays]"));function bx(e,t,{classNames:n,months:r,focused:o,dateLib:a}){const s=x.useRef(null),i=x.useRef(r),l=x.useRef(!1);x.useLayoutEffect(()=>{const u=i.current;if(i.current=r,!t||!e.current||!(e.current instanceof HTMLElement)||r.length===0||u.length===0||r.length!==u.length)return;const m=a.isSameMonth(r[0].date,u[0].date),c=a.isAfter(r[0].date,u[0].date),p=c?n[Ke.caption_after_enter]:n[Ke.caption_before_enter],h=c?n[Ke.weeks_after_enter]:n[Ke.weeks_before_enter],y=s.current,v=e.current.cloneNode(!0);if(v instanceof HTMLElement?(Wo(v).forEach(S=>{if(!(S instanceof HTMLElement))return;const D=gx(S);D&&S.contains(D)&&S.removeChild(D);const C=Bo(S);C&&C.classList.remove(p);const R=Yo(S);R&&R.classList.remove(h)}),s.current=v):s.current=null,l.current||m||o)return;const g=y instanceof HTMLElement?Wo(y):[],b=Wo(e.current);if(b&&b.every(w=>w instanceof HTMLElement)&&g&&g.every(w=>w instanceof HTMLElement)){l.current=!0,e.current.style.isolation="isolate";const w=vx(e.current);w&&(w.style.zIndex="1"),b.forEach((S,D)=>{const C=g[D];if(!C)return;S.style.position="relative",S.style.overflow="hidden";const R=Bo(S);R&&R.classList.add(p);const M=Yo(S);M&&M.classList.add(h);const E=()=>{l.current=!1,e.current&&(e.current.style.isolation=""),w&&(w.style.zIndex=""),R&&R.classList.remove(p),M&&M.classList.remove(h),S.style.position="",S.style.overflow="",S.contains(C)&&S.removeChild(C)};C.style.pointerEvents="none",C.style.position="absolute",C.style.overflow="hidden",C.setAttribute("aria-hidden","true");const $=yx(C);$&&($.style.opacity="0");const B=Bo(C);B&&(B.classList.add(c?n[Ke.caption_before_exit]:n[Ke.caption_after_exit]),B.addEventListener("animationend",E));const L=Yo(C);L&&L.classList.add(c?n[Ke.weeks_before_exit]:n[Ke.weeks_after_exit]),S.insertBefore(C,S.firstChild)})}})}function wx(e,t,n,r){const o=e[0],a=e[e.length-1],{ISOWeek:s,fixedWeeks:i,broadcastCalendar:l}=n??{},{addDays:u,differenceInCalendarDays:m,differenceInCalendarMonths:c,endOfBroadcastWeek:p,endOfISOWeek:h,endOfMonth:y,endOfWeek:v,isAfter:g,startOfBroadcastWeek:b,startOfISOWeek:w,startOfWeek:S}=r,D=l?b(o,r):s?w(o):S(o),C=l?p(a):s?h(y(a)):v(y(a)),R=m(C,D),M=c(a,o)+1,E=[];for(let L=0;L<=R;L++){const q=u(D,L);if(t&&g(q,t))break;E.push(q)}const B=(l?35:42)*M;if(i&&E.length<B){const L=B-E.length;for(let q=0;q<L;q++){const A=u(E[E.length-1],1);E.push(A)}}return E}function xx(e){const t=[];return e.reduce((n,r)=>{const o=r.weeks.reduce((a,s)=>[...a,...s.days],t);return[...n,...o]},t)}function Sx(e,t,n,r){const{numberOfMonths:o=1}=n,a=[];for(let s=0;s<o;s++){const i=r.addMonths(e,s);if(t&&i>t)break;a.push(i)}return a}function mi(e,t,n,r){const{month:o,defaultMonth:a,today:s=r.today(),numberOfMonths:i=1}=e;let l=o||a||s;const{differenceInCalendarMonths:u,addMonths:m,startOfMonth:c}=r;if(n&&u(n,l)<i-1){const p=-1*(i-1);l=m(n,p)}return t&&u(l,t)<0&&(l=t),c(l)}function Cx(e,t,n,r){const{addDays:o,endOfBroadcastWeek:a,endOfISOWeek:s,endOfMonth:i,endOfWeek:l,getISOWeek:u,getWeek:m,startOfBroadcastWeek:c,startOfISOWeek:p,startOfWeek:h}=r,y=e.reduce((v,g)=>{const b=n.broadcastCalendar?c(g,r):n.ISOWeek?p(g):h(g),w=n.broadcastCalendar?a(g):n.ISOWeek?s(i(g)):l(i(g)),S=t.filter(M=>M>=b&&M<=w),D=n.broadcastCalendar?35:42;if(n.fixedWeeks&&S.length<D){const M=t.filter(E=>{const $=D-S.length;return E>w&&E<=o(w,$)});S.push(...M)}const C=S.reduce((M,E)=>{const $=n.ISOWeek?u(E):m(E),B=M.find(q=>q.weekNumber===$),L=new Zl(E,g,r);return B?B.days.push(L):M.push(new mw($,[L])),M},[]),R=new fw(g,C);return v.push(R),v},[]);return n.reverseMonths?y.reverse():y}function Mx(e,t){let{startMonth:n,endMonth:r}=e;const{startOfYear:o,startOfDay:a,startOfMonth:s,endOfMonth:i,addYears:l,endOfYear:u,newDate:m,today:c}=t,{fromYear:p,toYear:h,fromMonth:y,toMonth:v}=e;!n&&y&&(n=y),!n&&p&&(n=t.newDate(p,0,1)),!r&&v&&(r=v),!r&&h&&(r=m(h,11,31));const g=e.captionLayout==="dropdown"||e.captionLayout==="dropdown-years";return n?n=s(n):p?n=m(p,0,1):!n&&g&&(n=o(l(e.today??c(),-100))),r?r=i(r):h?r=m(h,11,31):!r&&g&&(r=u(e.today??c())),[n&&a(n),r&&a(r)]}function Dx(e,t,n,r){if(n.disableNavigation)return;const{pagedNavigation:o,numberOfMonths:a=1}=n,{startOfMonth:s,addMonths:i,differenceInCalendarMonths:l}=r,u=o?a:1,m=s(e);if(!t)return i(m,u);if(!(l(t,e)<a))return i(m,u)}function kx(e,t,n,r){if(n.disableNavigation)return;const{pagedNavigation:o,numberOfMonths:a}=n,{startOfMonth:s,addMonths:i,differenceInCalendarMonths:l}=r,u=o?a??1:1,m=s(e);if(!t)return i(m,-u);if(!(l(m,t)<=0))return i(m,-u)}function Ex(e){const t=[];return e.reduce((n,r)=>[...n,...r.weeks],t)}function mo(e,t){const[n,r]=x.useState(e);return[t===void 0?n:t,r]}function Nx(e,t){const[n,r]=Mx(e,t),{startOfMonth:o,endOfMonth:a}=t,s=mi(e,n,r,t),[i,l]=mo(s,e.month?s:void 0);x.useEffect(()=>{const R=mi(e,n,r,t);l(R)},[e.timeZone]);const u=Sx(i,r,e,t),m=wx(u,e.endMonth?a(e.endMonth):void 0,e,t),c=Cx(u,m,e,t),p=Ex(c),h=xx(c),y=kx(i,n,e,t),v=Dx(i,r,e,t),{disableNavigation:g,onMonthChange:b}=e,w=R=>p.some(M=>M.days.some(E=>E.isEqualTo(R))),S=R=>{if(g)return;let M=o(R);n&&M<o(n)&&(M=o(n)),r&&M>o(r)&&(M=o(r)),l(M),b==null||b(M)};return{months:c,weeks:p,days:h,navStart:n,navEnd:r,previousMonth:y,nextMonth:v,goToMonth:S,goToDay:R=>{w(R)||S(R.date)}}}var dt;(function(e){e[e.Today=0]="Today",e[e.Selected=1]="Selected",e[e.LastFocused=2]="LastFocused",e[e.FocusedModifier=3]="FocusedModifier"})(dt||(dt={}));function pi(e){return!e[De.disabled]&&!e[De.hidden]&&!e[De.outside]}function Rx(e,t,n,r){let o,a=-1;for(const s of e){const i=t(s);pi(i)&&(i[De.focused]&&a<dt.FocusedModifier?(o=s,a=dt.FocusedModifier):r!=null&&r.isEqualTo(s)&&a<dt.LastFocused?(o=s,a=dt.LastFocused):n(s.date)&&a<dt.Selected?(o=s,a=dt.Selected):i[De.today]&&a<dt.Today&&(o=s,a=dt.Today))}return o||(o=e.find(s=>pi(t(s)))),o}function Tx(e,t,n,r,o,a,s){const{ISOWeek:i,broadcastCalendar:l}=a,{addDays:u,addMonths:m,addWeeks:c,addYears:p,endOfBroadcastWeek:h,endOfISOWeek:y,endOfWeek:v,max:g,min:b,startOfBroadcastWeek:w,startOfISOWeek:S,startOfWeek:D}=s;let R={day:u,week:c,month:m,year:p,startOfWeek:M=>l?w(M,s):i?S(M):D(M),endOfWeek:M=>l?h(M):i?y(M):v(M)}[e](n,t==="after"?1:-1);return t==="before"&&r?R=g([r,R]):t==="after"&&o&&(R=b([o,R])),R}function cu(e,t,n,r,o,a,s,i=0){if(i>365)return;const l=Tx(e,t,n.date,r,o,a,s),u=!!(a.disabled&&St(l,a.disabled,s)),m=!!(a.hidden&&St(l,a.hidden,s)),c=l,p=new Zl(l,c,s);return!u&&!m?p:cu(e,t,p,r,o,a,s,i+1)}function _x(e,t,n,r,o){const{autoFocus:a}=e,[s,i]=x.useState(),l=Rx(t.days,n,r||(()=>!1),s),[u,m]=x.useState(a?l:void 0);return{isFocusTarget:v=>!!(l!=null&&l.isEqualTo(v)),setFocused:m,focused:u,blur:()=>{i(u),m(void 0)},moveFocus:(v,g)=>{if(!u)return;const b=cu(v,g,u,t.navStart,t.navEnd,e,o);b&&(t.goToDay(b),m(b))}}}function Ox(e,t){const{selected:n,required:r,onSelect:o}=e,[a,s]=mo(n,o?n:void 0),i=o?n:a,{isSameDay:l}=t,u=h=>(i==null?void 0:i.some(y=>l(y,h)))??!1,{min:m,max:c}=e;return{selected:i,select:(h,y,v)=>{let g=[...i??[]];if(u(h)){if((i==null?void 0:i.length)===m||r&&(i==null?void 0:i.length)===1)return;g=i==null?void 0:i.filter(b=>!l(b,h))}else(i==null?void 0:i.length)===c?g=[h]:g=[...g,h];return o||s(g),o==null||o(g,h,y,v),g},isSelected:u}}function Px(e,t,n=0,r=0,o=!1,a=yt){const{from:s,to:i}=t||{},{isSameDay:l,isAfter:u,isBefore:m}=a;let c;if(!s&&!i)c={from:e,to:n>0?void 0:e};else if(s&&!i)l(s,e)?o?c={from:s,to:void 0}:c=void 0:m(e,s)?c={from:e,to:s}:c={from:s,to:e};else if(s&&i)if(l(s,e)&&l(i,e))o?c={from:s,to:i}:c=void 0;else if(l(s,e))c={from:s,to:n>0?void 0:e};else if(l(i,e))c={from:e,to:n>0?void 0:e};else if(m(e,s))c={from:e,to:i};else if(u(e,s))c={from:s,to:e};else if(u(e,i))c={from:s,to:e};else throw new Error("Invalid range");if(c!=null&&c.from&&(c!=null&&c.to)){const p=a.differenceInCalendarDays(c.to,c.from);r>0&&p>r?c={from:e,to:void 0}:n>1&&p<n&&(c={from:e,to:void 0})}return c}function Ax(e,t,n=yt){const r=Array.isArray(t)?t:[t];let o=e.from;const a=n.differenceInCalendarDays(e.to,e.from),s=Math.min(a,6);for(let i=0;i<=s;i++){if(r.includes(o.getDay()))return!0;o=n.addDays(o,1)}return!1}function hi(e,t,n=yt){return xt(e,t.from,!1,n)||xt(e,t.to,!1,n)||xt(t,e.from,!1,n)||xt(t,e.to,!1,n)}function Ix(e,t,n=yt){const r=Array.isArray(t)?t:[t];if(r.filter(i=>typeof i!="function").some(i=>typeof i=="boolean"?i:n.isDate(i)?xt(e,i,!1,n):nu(i,n)?i.some(l=>xt(e,l,!1,n)):qa(i)?i.from&&i.to?hi(e,{from:i.from,to:i.to},n):!1:tu(i)?Ax(e,i.dayOfWeek,n):Ql(i)?n.isAfter(i.before,i.after)?hi(e,{from:n.addDays(i.after,1),to:n.addDays(i.before,-1)},n):St(e.from,i,n)||St(e.to,i,n):Jl(i)||eu(i)?St(e.from,i,n)||St(e.to,i,n):!1))return!0;const s=r.filter(i=>typeof i=="function");if(s.length){let i=e.from;const l=n.differenceInCalendarDays(e.to,e.from);for(let u=0;u<=l;u++){if(s.some(m=>m(i)))return!0;i=n.addDays(i,1)}}return!1}function jx(e,t){const{disabled:n,excludeDisabled:r,selected:o,required:a,onSelect:s}=e,[i,l]=mo(o,s?o:void 0),u=s?o:i;return{selected:u,select:(p,h,y)=>{const{min:v,max:g}=e,b=p?Px(p,u,v,g,a,t):void 0;return r&&n&&(b!=null&&b.from)&&b.to&&Ix({from:b.from,to:b.to},n,t)&&(b.from=p,b.to=void 0),s||l(b),s==null||s(b,p,h,y),b},isSelected:p=>u&&xt(u,p,!1,t)}}function $x(e,t){const{selected:n,required:r,onSelect:o}=e,[a,s]=mo(n,o?n:void 0),i=o?n:a,{isSameDay:l}=t;return{selected:i,select:(c,p,h)=>{let y=c;return!r&&i&&i&&l(c,i)&&(y=void 0),o||s(y),o==null||o(y,c,p,h),y},isSelected:c=>i?l(i,c):!1}}function Lx(e,t){const n=$x(e,t),r=Ox(e,t),o=jx(e,t);switch(e.mode){case"single":return n;case"multiple":return r;case"range":return o;default:return}}function lu(e){var Rt;let t=e;t.timeZone&&(t={...e},t.today&&(t.today=new We(t.today,t.timeZone)),t.month&&(t.month=new We(t.month,t.timeZone)),t.defaultMonth&&(t.defaultMonth=new We(t.defaultMonth,t.timeZone)),t.startMonth&&(t.startMonth=new We(t.startMonth,t.timeZone)),t.endMonth&&(t.endMonth=new We(t.endMonth,t.timeZone)),t.mode==="single"&&t.selected?t.selected=new We(t.selected,t.timeZone):t.mode==="multiple"&&t.selected?t.selected=(Rt=t.selected)==null?void 0:Rt.map(U=>new We(U,t.timeZone)):t.mode==="range"&&t.selected&&(t.selected={from:t.selected.from?new We(t.selected.from,t.timeZone):void 0,to:t.selected.to?new We(t.selected.to,t.timeZone):void 0}));const{components:n,formatters:r,labels:o,dateLib:a,locale:s,classNames:i}=x.useMemo(()=>{const U={...Ua,...t.locale};return{dateLib:new Et({locale:U,weekStartsOn:t.broadcastCalendar?1:t.weekStartsOn,firstWeekContainsDate:t.firstWeekContainsDate,useAdditionalWeekYearTokens:t.useAdditionalWeekYearTokens,useAdditionalDayOfYearTokens:t.useAdditionalDayOfYearTokens,timeZone:t.timeZone,numerals:t.numerals},t.dateLib),components:Hw(t.components),formatters:Jw(t.formatters),labels:{...hx,...t.labels},locale:U,classNames:{...Va(),...t.classNames}}},[t.locale,t.broadcastCalendar,t.weekStartsOn,t.firstWeekContainsDate,t.useAdditionalWeekYearTokens,t.useAdditionalDayOfYearTokens,t.timeZone,t.numerals,t.dateLib,t.components,t.formatters,t.labels,t.classNames]),{captionLayout:l,mode:u,navLayout:m,numberOfMonths:c=1,onDayBlur:p,onDayClick:h,onDayFocus:y,onDayKeyDown:v,onDayMouseEnter:g,onDayMouseLeave:b,onNextClick:w,onPrevClick:S,showWeekNumber:D,styles:C}=t,{formatCaption:R,formatDay:M,formatMonthDropdown:E,formatWeekNumber:$,formatWeekNumberHeader:B,formatWeekdayName:L,formatYearDropdown:q}=r,A=Nx(t,a),{days:T,months:_,navStart:N,navEnd:I,previousMonth:k,nextMonth:P,goToMonth:H}=A,z=pw(T,t,N,I,a),{isSelected:O,select:j,selected:Y}=Lx(t,a)??{},{blur:G,focused:V,isFocusTarget:W,moveFocus:Z,setFocused:X}=_x(t,A,z,O??(()=>!1),a),{labelDayButton:Q,labelGridcell:se,labelGrid:ue,labelMonthDropdown:ye,labelNav:J,labelPrevious:Re,labelNext:Te,labelWeekday:oe,labelWeekNumber:me,labelWeekNumberHeader:be,labelYearDropdown:$e}=o,He=x.useMemo(()=>nx(a,t.ISOWeek),[a,t.ISOWeek]),Ae=u!==void 0||h!==void 0,Fe=x.useCallback(()=>{k&&(H(k),S==null||S(k))},[k,H,S]),zt=x.useCallback(()=>{P&&(H(P),w==null||w(P))},[H,P,w]),an=x.useCallback((U,ie)=>ae=>{ae.preventDefault(),ae.stopPropagation(),X(U),j==null||j(U.date,ie,ae),h==null||h(U.date,ie,ae)},[j,h,X]),Nt=x.useCallback((U,ie)=>ae=>{X(U),y==null||y(U.date,ie,ae)},[y,X]),Pn=x.useCallback((U,ie)=>ae=>{G(),p==null||p(U.date,ie,ae)},[G,p]),bt=x.useCallback((U,ie)=>ae=>{const fe={ArrowLeft:[ae.shiftKey?"month":"day",t.dir==="rtl"?"after":"before"],ArrowRight:[ae.shiftKey?"month":"day",t.dir==="rtl"?"before":"after"],ArrowDown:[ae.shiftKey?"year":"week","after"],ArrowUp:[ae.shiftKey?"year":"week","before"],PageUp:[ae.shiftKey?"year":"month","before"],PageDown:[ae.shiftKey?"year":"month","after"],Home:["startOfWeek","before"],End:["endOfWeek","after"]};if(fe[ae.key]){ae.preventDefault(),ae.stopPropagation();const[ge,re]=fe[ae.key];Z(ge,re)}v==null||v(U.date,ie,ae)},[Z,v,t.dir]),Gt=x.useCallback((U,ie)=>ae=>{g==null||g(U.date,ie,ae)},[g]),nt=x.useCallback((U,ie)=>ae=>{b==null||b(U.date,ie,ae)},[b]),sn=x.useCallback(U=>ie=>{const ae=Number(ie.target.value),fe=a.setMonth(a.startOfMonth(U),ae);H(fe)},[a,H]),Ge=x.useCallback(U=>ie=>{const ae=Number(ie.target.value),fe=a.setYear(a.startOfMonth(U),ae);H(fe)},[a,H]),{className:cn,style:An}=x.useMemo(()=>({className:[i[ce.Root],t.className].filter(Boolean).join(" "),style:{...C==null?void 0:C[ce.Root],...t.style}}),[i,t.className,t.style,C]),ln=zw(t),Ut=x.useRef(null);bx(Ut,!!t.animate,{classNames:i,months:_,focused:V,dateLib:a});const In={dayPickerProps:t,selected:Y,select:j,isSelected:O,months:_,nextMonth:P,previousMonth:k,goToMonth:H,getModifiers:z,components:n,classNames:i,styles:C,labels:o,formatters:r};return x.createElement(ru.Provider,{value:In},x.createElement(n.Root,{rootRef:t.animate?Ut:void 0,className:cn,style:An,dir:t.dir,id:t.id,lang:t.lang,nonce:t.nonce,title:t.title,role:t.role,"aria-label":t["aria-label"],...ln},x.createElement(n.Months,{className:i[ce.Months],style:C==null?void 0:C[ce.Months]},!t.hideNavigation&&!m&&x.createElement(n.Nav,{"data-animated-nav":t.animate?"true":void 0,className:i[ce.Nav],style:C==null?void 0:C[ce.Nav],"aria-label":J(),onPreviousClick:Fe,onNextClick:zt,previousMonth:k,nextMonth:P}),_.map((U,ie)=>{const ae=ex(U.date,N,I,r,a),fe=rx(N,I,r,a);return x.createElement(n.Month,{"data-animated-month":t.animate?"true":void 0,className:i[ce.Month],style:C==null?void 0:C[ce.Month],key:ie,displayIndex:ie,calendarMonth:U},m==="around"&&!t.hideNavigation&&ie===0&&x.createElement(n.PreviousMonthButton,{type:"button",className:i[ce.PreviousMonthButton],tabIndex:k?void 0:-1,"aria-disabled":k?void 0:!0,"aria-label":Re(k),onClick:Fe,"data-animated-button":t.animate?"true":void 0},x.createElement(n.Chevron,{disabled:k?void 0:!0,className:i[ce.Chevron],orientation:t.dir==="rtl"?"right":"left"})),x.createElement(n.MonthCaption,{"data-animated-caption":t.animate?"true":void 0,className:i[ce.MonthCaption],style:C==null?void 0:C[ce.MonthCaption],calendarMonth:U,displayIndex:ie},l!=null&&l.startsWith("dropdown")?x.createElement(n.DropdownNav,{className:i[ce.Dropdowns],style:C==null?void 0:C[ce.Dropdowns]},l==="dropdown"||l==="dropdown-months"?x.createElement(n.MonthsDropdown,{className:i[ce.MonthsDropdown],"aria-label":ye(),classNames:i,components:n,disabled:!!t.disableNavigation,onChange:sn(U.date),options:ae,style:C==null?void 0:C[ce.Dropdown],value:a.getMonth(U.date)}):x.createElement("span",null,E(U.date,a)),l==="dropdown"||l==="dropdown-years"?x.createElement(n.YearsDropdown,{className:i[ce.YearsDropdown],"aria-label":$e(a.options),classNames:i,components:n,disabled:!!t.disableNavigation,onChange:Ge(U.date),options:fe,style:C==null?void 0:C[ce.Dropdown],value:a.getYear(U.date)}):x.createElement("span",null,q(U.date,a)),x.createElement("span",{role:"status","aria-live":"polite",style:{border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap",wordWrap:"normal"}},R(U.date,a.options,a))):x.createElement(n.CaptionLabel,{className:i[ce.CaptionLabel],role:"status","aria-live":"polite"},R(U.date,a.options,a))),m==="around"&&!t.hideNavigation&&ie===c-1&&x.createElement(n.NextMonthButton,{type:"button",className:i[ce.NextMonthButton],tabIndex:P?void 0:-1,"aria-disabled":P?void 0:!0,"aria-label":Te(P),onClick:zt,"data-animated-button":t.animate?"true":void 0},x.createElement(n.Chevron,{disabled:P?void 0:!0,className:i[ce.Chevron],orientation:t.dir==="rtl"?"left":"right"})),ie===c-1&&m==="after"&&!t.hideNavigation&&x.createElement(n.Nav,{"data-animated-nav":t.animate?"true":void 0,className:i[ce.Nav],style:C==null?void 0:C[ce.Nav],"aria-label":J(),onPreviousClick:Fe,onNextClick:zt,previousMonth:k,nextMonth:P}),x.createElement(n.MonthGrid,{role:"grid","aria-multiselectable":u==="multiple"||u==="range","aria-label":ue(U.date,a.options,a)||void 0,className:i[ce.MonthGrid],style:C==null?void 0:C[ce.MonthGrid]},!t.hideWeekdays&&x.createElement(n.Weekdays,{"data-animated-weekdays":t.animate?"true":void 0,className:i[ce.Weekdays],style:C==null?void 0:C[ce.Weekdays]},D&&x.createElement(n.WeekNumberHeader,{"aria-label":be(a.options),className:i[ce.WeekNumberHeader],style:C==null?void 0:C[ce.WeekNumberHeader],scope:"col"},B()),He.map((ge,re)=>x.createElement(n.Weekday,{"aria-label":oe(ge,a.options,a),className:i[ce.Weekday],key:re,style:C==null?void 0:C[ce.Weekday],scope:"col"},L(ge,a.options,a)))),x.createElement(n.Weeks,{"data-animated-weeks":t.animate?"true":void 0,className:i[ce.Weeks],style:C==null?void 0:C[ce.Weeks]},U.weeks.map((ge,re)=>x.createElement(n.Week,{className:i[ce.Week],key:ge.weekNumber,style:C==null?void 0:C[ce.Week],week:ge},D&&x.createElement(n.WeekNumber,{week:ge,style:C==null?void 0:C[ce.WeekNumber],"aria-label":me(ge.weekNumber,{locale:s}),className:i[ce.WeekNumber],scope:"row",role:"rowheader"},$(ge.weekNumber,a)),ge.days.map(de=>{const{date:ve}=de,le=z(de);if(le[De.focused]=!le.hidden&&!!(V!=null&&V.isEqualTo(de)),le[at.selected]=(O==null?void 0:O(ve))||le.selected,qa(Y)){const{from:Ve,to:Ie}=Y;le[at.range_start]=!!(Ve&&Ie&&a.isSameDay(ve,Ve)),le[at.range_end]=!!(Ve&&Ie&&a.isSameDay(ve,Ie)),le[at.range_middle]=xt(Y,ve,!0,a)}const Ue=tx(le,C,t.modifiersStyles),xe=hw(le,i,t.modifiersClassNames),Ce=!Ae&&!le.hidden?se(ve,le,a.options,a):void 0;return x.createElement(n.Day,{key:`${a.format(ve,"yyyy-MM-dd")}_${a.format(de.displayMonth,"yyyy-MM")}`,day:de,modifiers:le,className:xe.join(" "),style:Ue,role:"gridcell","aria-selected":le.selected||void 0,"aria-label":Ce,"data-day":a.format(ve,"yyyy-MM-dd"),"data-month":de.outside?a.format(ve,"yyyy-MM"):void 0,"data-selected":le.selected||void 0,"data-disabled":le.disabled||void 0,"data-hidden":le.hidden||void 0,"data-outside":de.outside||void 0,"data-focused":le.focused||void 0,"data-today":le.today||void 0},!le.hidden&&Ae?x.createElement(n.DayButton,{className:i[ce.DayButton],style:C==null?void 0:C[ce.DayButton],type:"button",day:de,modifiers:le,disabled:le.disabled||void 0,tabIndex:W(de)?0:-1,"aria-label":Q(ve,le,a.options,a),onClick:an(de,le),onBlur:Pn(de,le),onFocus:Nt(de,le),onKeyDown:bt(de,le),onMouseEnter:Gt(de,le),onMouseLeave:nt(de,le)},M(ve,a.options,a)):!le.hidden&&M(de.date,a.options,a))}))))))})),t.footer&&x.createElement(n.Footer,{className:i[ce.Footer],style:C==null?void 0:C[ce.Footer],role:"status","aria-live":"polite"},t.footer)))}function Ka(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ir={exports:{}},Fx=Ir.exports,gi;function uu(){return gi||(gi=1,function(e,t){(function(n,r){e.exports=r()})(Fx,function(){var n=1e3,r=6e4,o=36e5,a="millisecond",s="second",i="minute",l="hour",u="day",m="week",c="month",p="quarter",h="year",y="date",v="Invalid Date",g=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,b=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,w={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(T){var _=["th","st","nd","rd"],N=T%100;return"["+T+(_[(N-20)%10]||_[N]||_[0])+"]"}},S=function(T,_,N){var I=String(T);return!I||I.length>=_?T:""+Array(_+1-I.length).join(N)+T},D={s:S,z:function(T){var _=-T.utcOffset(),N=Math.abs(_),I=Math.floor(N/60),k=N%60;return(_<=0?"+":"-")+S(I,2,"0")+":"+S(k,2,"0")},m:function T(_,N){if(_.date()<N.date())return-T(N,_);var I=12*(N.year()-_.year())+(N.month()-_.month()),k=_.clone().add(I,c),P=N-k<0,H=_.clone().add(I+(P?-1:1),c);return+(-(I+(N-k)/(P?k-H:H-k))||0)},a:function(T){return T<0?Math.ceil(T)||0:Math.floor(T)},p:function(T){return{M:c,y:h,w:m,d:u,D:y,h:l,m:i,s,ms:a,Q:p}[T]||String(T||"").toLowerCase().replace(/s$/,"")},u:function(T){return T===void 0}},C="en",R={};R[C]=w;var M="$isDayjsObject",E=function(T){return T instanceof q||!(!T||!T[M])},$=function T(_,N,I){var k;if(!_)return C;if(typeof _=="string"){var P=_.toLowerCase();R[P]&&(k=P),N&&(R[P]=N,k=P);var H=_.split("-");if(!k&&H.length>1)return T(H[0])}else{var z=_.name;R[z]=_,k=z}return!I&&k&&(C=k),k||!I&&C},B=function(T,_){if(E(T))return T.clone();var N=typeof _=="object"?_:{};return N.date=T,N.args=arguments,new q(N)},L=D;L.l=$,L.i=E,L.w=function(T,_){return B(T,{locale:_.$L,utc:_.$u,x:_.$x,$offset:_.$offset})};var q=function(){function T(N){this.$L=$(N.locale,null,!0),this.parse(N),this.$x=this.$x||N.x||{},this[M]=!0}var _=T.prototype;return _.parse=function(N){this.$d=function(I){var k=I.date,P=I.utc;if(k===null)return new Date(NaN);if(L.u(k))return new Date;if(k instanceof Date)return new Date(k);if(typeof k=="string"&&!/Z$/i.test(k)){var H=k.match(g);if(H){var z=H[2]-1||0,O=(H[7]||"0").substring(0,3);return P?new Date(Date.UTC(H[1],z,H[3]||1,H[4]||0,H[5]||0,H[6]||0,O)):new Date(H[1],z,H[3]||1,H[4]||0,H[5]||0,H[6]||0,O)}}return new Date(k)}(N),this.init()},_.init=function(){var N=this.$d;this.$y=N.getFullYear(),this.$M=N.getMonth(),this.$D=N.getDate(),this.$W=N.getDay(),this.$H=N.getHours(),this.$m=N.getMinutes(),this.$s=N.getSeconds(),this.$ms=N.getMilliseconds()},_.$utils=function(){return L},_.isValid=function(){return this.$d.toString()!==v},_.isSame=function(N,I){var k=B(N);return this.startOf(I)<=k&&k<=this.endOf(I)},_.isAfter=function(N,I){return B(N)<this.startOf(I)},_.isBefore=function(N,I){return this.endOf(I)<B(N)},_.$g=function(N,I,k){return L.u(N)?this[I]:this.set(k,N)},_.unix=function(){return Math.floor(this.valueOf()/1e3)},_.valueOf=function(){return this.$d.getTime()},_.startOf=function(N,I){var k=this,P=!!L.u(I)||I,H=L.p(N),z=function(X,Q){var se=L.w(k.$u?Date.UTC(k.$y,Q,X):new Date(k.$y,Q,X),k);return P?se:se.endOf(u)},O=function(X,Q){return L.w(k.toDate()[X].apply(k.toDate("s"),(P?[0,0,0,0]:[23,59,59,999]).slice(Q)),k)},j=this.$W,Y=this.$M,G=this.$D,V="set"+(this.$u?"UTC":"");switch(H){case h:return P?z(1,0):z(31,11);case c:return P?z(1,Y):z(0,Y+1);case m:var W=this.$locale().weekStart||0,Z=(j<W?j+7:j)-W;return z(P?G-Z:G+(6-Z),Y);case u:case y:return O(V+"Hours",0);case l:return O(V+"Minutes",1);case i:return O(V+"Seconds",2);case s:return O(V+"Milliseconds",3);default:return this.clone()}},_.endOf=function(N){return this.startOf(N,!1)},_.$set=function(N,I){var k,P=L.p(N),H="set"+(this.$u?"UTC":""),z=(k={},k[u]=H+"Date",k[y]=H+"Date",k[c]=H+"Month",k[h]=H+"FullYear",k[l]=H+"Hours",k[i]=H+"Minutes",k[s]=H+"Seconds",k[a]=H+"Milliseconds",k)[P],O=P===u?this.$D+(I-this.$W):I;if(P===c||P===h){var j=this.clone().set(y,1);j.$d[z](O),j.init(),this.$d=j.set(y,Math.min(this.$D,j.daysInMonth())).$d}else z&&this.$d[z](O);return this.init(),this},_.set=function(N,I){return this.clone().$set(N,I)},_.get=function(N){return this[L.p(N)]()},_.add=function(N,I){var k,P=this;N=Number(N);var H=L.p(I),z=function(Y){var G=B(P);return L.w(G.date(G.date()+Math.round(Y*N)),P)};if(H===c)return this.set(c,this.$M+N);if(H===h)return this.set(h,this.$y+N);if(H===u)return z(1);if(H===m)return z(7);var O=(k={},k[i]=r,k[l]=o,k[s]=n,k)[H]||1,j=this.$d.getTime()+N*O;return L.w(j,this)},_.subtract=function(N,I){return this.add(-1*N,I)},_.format=function(N){var I=this,k=this.$locale();if(!this.isValid())return k.invalidDate||v;var P=N||"YYYY-MM-DDTHH:mm:ssZ",H=L.z(this),z=this.$H,O=this.$m,j=this.$M,Y=k.weekdays,G=k.months,V=k.meridiem,W=function(Q,se,ue,ye){return Q&&(Q[se]||Q(I,P))||ue[se].slice(0,ye)},Z=function(Q){return L.s(z%12||12,Q,"0")},X=V||function(Q,se,ue){var ye=Q<12?"AM":"PM";return ue?ye.toLowerCase():ye};return P.replace(b,function(Q,se){return se||function(ue){switch(ue){case"YY":return String(I.$y).slice(-2);case"YYYY":return L.s(I.$y,4,"0");case"M":return j+1;case"MM":return L.s(j+1,2,"0");case"MMM":return W(k.monthsShort,j,G,3);case"MMMM":return W(G,j);case"D":return I.$D;case"DD":return L.s(I.$D,2,"0");case"d":return String(I.$W);case"dd":return W(k.weekdaysMin,I.$W,Y,2);case"ddd":return W(k.weekdaysShort,I.$W,Y,3);case"dddd":return Y[I.$W];case"H":return String(z);case"HH":return L.s(z,2,"0");case"h":return Z(1);case"hh":return Z(2);case"a":return X(z,O,!0);case"A":return X(z,O,!1);case"m":return String(O);case"mm":return L.s(O,2,"0");case"s":return String(I.$s);case"ss":return L.s(I.$s,2,"0");case"SSS":return L.s(I.$ms,3,"0");case"Z":return H}return null}(Q)||H.replace(":","")})},_.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},_.diff=function(N,I,k){var P,H=this,z=L.p(I),O=B(N),j=(O.utcOffset()-this.utcOffset())*r,Y=this-O,G=function(){return L.m(H,O)};switch(z){case h:P=G()/12;break;case c:P=G();break;case p:P=G()/3;break;case m:P=(Y-j)/6048e5;break;case u:P=(Y-j)/864e5;break;case l:P=Y/o;break;case i:P=Y/r;break;case s:P=Y/n;break;default:P=Y}return k?P:L.a(P)},_.daysInMonth=function(){return this.endOf(c).$D},_.$locale=function(){return R[this.$L]},_.locale=function(N,I){if(!N)return this.$L;var k=this.clone(),P=$(N,I,!0);return P&&(k.$L=P),k},_.clone=function(){return L.w(this.$d,this)},_.toDate=function(){return new Date(this.valueOf())},_.toJSON=function(){return this.isValid()?this.toISOString():null},_.toISOString=function(){return this.$d.toISOString()},_.toString=function(){return this.$d.toUTCString()},T}(),A=q.prototype;return B.prototype=A,[["$ms",a],["$s",s],["$m",i],["$H",l],["$W",u],["$M",c],["$y",h],["$D",y]].forEach(function(T){A[T[1]]=function(_){return this.$g(_,T[0],T[1])}}),B.extend=function(T,_){return T.$i||(T(_,q,B),T.$i=!0),B},B.locale=$,B.isDayjs=E,B.unix=function(T){return B(1e3*T)},B.en=R[C],B.Ls=R,B.p={},B})}(Ir)),Ir.exports}var Wx=uu();const Ct=Ka(Wx);var jr={exports:{}},Bx=jr.exports,vi;function Yx(){return vi||(vi=1,function(e,t){(function(n,r){e.exports=r()})(Bx,function(){var n={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};return function(r,o,a){var s=o.prototype,i=s.format;a.en.formats=n,s.format=function(l){l===void 0&&(l="YYYY-MM-DDTHH:mm:ssZ");var u=this.$locale().formats,m=function(c,p){return c.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(h,y,v){var g=v&&v.toUpperCase();return y||p[v]||n[v]||p[g].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(b,w,S){return w||S.slice(1)})})}(l,u===void 0?{}:u);return i.call(this,m)}}})}(jr)),jr.exports}var Hx=Yx();const du=Ka(Hx);var $r={exports:{}},zx=$r.exports,yi;function Gx(){return yi||(yi=1,function(e,t){(function(n,r){e.exports=r(uu())})(zx,function(n){function r(s){return s&&typeof s=="object"&&"default"in s?s:{default:s}}var o=r(n),a={name:"fr",weekdays:"dimanche_lundi_mardi_mercredi_jeudi_vendredi_samedi".split("_"),weekdaysShort:"dim._lun._mar._mer._jeu._ven._sam.".split("_"),weekdaysMin:"di_lu_ma_me_je_ve_sa".split("_"),months:"janvier_février_mars_avril_mai_juin_juillet_août_septembre_octobre_novembre_décembre".split("_"),monthsShort:"janv._févr._mars_avr._mai_juin_juil._août_sept._oct._nov._déc.".split("_"),weekStart:1,yearStart:4,formats:{LT:"HH:mm",LTS:"HH:mm:ss",L:"DD/MM/YYYY",LL:"D MMMM YYYY",LLL:"D MMMM YYYY HH:mm",LLLL:"dddd D MMMM YYYY HH:mm"},relativeTime:{future:"dans %s",past:"il y a %s",s:"quelques secondes",m:"une minute",mm:"%d minutes",h:"une heure",hh:"%d heures",d:"un jour",dd:"%d jours",M:"un mois",MM:"%d mois",y:"un an",yy:"%d ans"},ordinal:function(s){return""+s+(s===1?"er":"")}};return o.default.locale(a,null,!0),a})}($r)),$r.exports}Gx();function Ux({month:e,onMonthChange:t}){const n=e.getFullYear(),r=e.getMonth(),o=["January","February","March","April","May","June","July","August","September","October","November","December"],a=new Date().getFullYear(),s=Array.from({length:201},(c,p)=>a-100+p),i=c=>{const p=new Date(e);p.setMonth(Number.parseInt(c)),t(p)},l=c=>{const p=new Date(e);p.setFullYear(Number.parseInt(c)),t(p)},u=()=>{const c=new Date(e);c.setMonth(c.getMonth()-1),t(c)},m=()=>{const c=new Date(e);c.setMonth(c.getMonth()+1),t(c)};return d.jsxs("div",{className:"flex items-center justify-between p-2 border-b bg-muted",children:[d.jsx(Zt,{variant:"outline",size:"small",onClick:u,className:"h-7 w-7 p-0",children:d.jsx(rc,{className:"h-4 w-4"})}),d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsxs(pa,{value:r.toString(),onValueChange:i,children:[d.jsx(zr,{className:"w-32 h-8 text-sm",children:d.jsx(ha,{})}),d.jsx(Gr,{children:o.map((c,p)=>d.jsx(Ur,{value:p.toString(),children:c},c))})]}),d.jsxs(pa,{value:n.toString(),onValueChange:l,children:[d.jsx(zr,{className:"w-20 h-8 text-sm",children:d.jsx(ha,{})}),d.jsx(Gr,{className:"max-h-[200px]",children:s.map(c=>d.jsx(Ur,{value:c.toString(),children:c},c))})]})]}),d.jsx(Zt,{variant:"outline",size:"small",onClick:m,className:"h-7 w-7 p-0",children:d.jsx(Ra,{className:"h-4 w-4"})})]})}Ct.extend(du);const qr=({label:e,placeholder:t="Pick a date",helperText:n,error:r,required:o,value:a,onSelect:s,className:i,minDate:l,maxDate:u,disabled:m,readOnly:c,locale:p="en",showOutsideDays:h,dayPickerProps:y,month:v,onMonthChange:g,open:b,onOpenChange:w,...S})=>{const[D,C]=x.useState(!1),R=b!==void 0?b:D,M=w||C,E=v??a??new Date,$=B=>{B&&(!a||B.getTime()!==a.getTime())&&(s==null||s(B),M(!1))};return Ct.locale(p),d.jsxs("div",{className:F("space-y-1",i),...S,children:[e&&d.jsxs(Lt,{className:"text-sm font-medium text-gray-700",children:[e,o&&d.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),d.jsxs(Ba,{open:R,onOpenChange:M,children:[d.jsx(Ya,{asChild:!0,children:d.jsxs(Zt,{variant:"outline",className:F("w-full flex justify-between items-center font-normal",!a&&"text-muted-foreground",r&&"border border-red-500 focus:ring-red-500"),disabled:m,"aria-readonly":c,children:[d.jsx("span",{className:F("text-left",!a&&"text-muted-foreground"),children:a?Ct(a).locale(p).format("LL"):t}),d.jsx(nc,{strokeWidth:1.2,className:"ml-6 h-6 w-6 shrink-0 text-foreground"})]})}),d.jsx(co,{className:"w-auto p-0",align:"start",children:d.jsxs("div",{className:"bg-white rounded-md border shadow-md",children:[d.jsx(Ux,{month:E,onMonthChange:g??(()=>{})}),d.jsx("div",{className:"p-3",children:d.jsx(lu,{mode:"single",selected:a,onSelect:$,month:E,onMonthChange:g,fromDate:l,toDate:u,showOutsideDays:h,className:"p-0",classNames:{months:"flex flex-col sm:flex-row space-y-4 sm:space-x-4 sm:space-y-0",month:"space-y-4",caption:"hidden",caption_label:"text-sm font-medium",nav:"hidden",nav_button:"h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100",nav_button_previous:"absolute left-1 top-1",nav_button_next:"absolute right-1 top-1",table:"w-full border-collapse space-y-1",head_row:"flex",head_cell:"text-muted-foreground rounded-md w-9 font-normal text-[0.8rem]",row:"flex w-full mt-2",cell:"h-9 w-9 text-center text-sm p-0 relative [&:has([aria-selected].day-range-end)]:rounded-r-md [&:has([aria-selected].day-outside)]:bg-accent/50 [&:has([aria-selected])]:bg-accent first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md focus-within:relative focus-within:z-20",day:"h-9 w-9 p-0 font-normal aria-selected:opacity-100 hover:bg-accent hover:text-accent-foreground rounded-md transition-colors",day_range_end:"day-range-end",day_selected:"bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground",day_today:"bg-accent text-accent-foreground",day_outside:"day-outside text-muted-foreground opacity-50 aria-selected:bg-accent/50 aria-selected:text-muted-foreground aria-selected:opacity-30",day_disabled:"text-muted-foreground opacity-50",day_range_middle:"aria-selected:bg-accent aria-selected:text-accent-foreground",day_hidden:"invisible"},...y})})]})})]}),(n||r)&&d.jsx("p",{className:F("text-xs",r?"text-red-500":"text-gray-500"),children:r||n})]})};function qx({className:e,classNames:t,showOutsideDays:n=!0,captionLayout:r="label",buttonVariant:o="ghost",formatters:a,components:s,...i}){const l=Va();return d.jsx(lu,{showOutsideDays:n,className:F("bg-background group/calendar p-3 [--cell-size:2rem] [[data-slot=card-content]_&]:bg-transparent [[data-slot=popover-content]_&]:bg-transparent",String.raw`rtl:**:[.rdp-button\_next>svg]:rotate-180`,String.raw`rtl:**:[.rdp-button\_previous>svg]:rotate-180`,e),captionLayout:r,formatters:{formatMonthDropdown:u=>u.toLocaleString("default",{month:"short"}),...a},classNames:{root:F("w-fit",l.root),months:F("relative flex flex-col gap-4 md:flex-row",l.months),month:F("flex w-full flex-col gap-4",l.month),nav:F("absolute inset-x-0 top-0 flex w-full items-center justify-between gap-1",l.nav),button_previous:F(na({variant:o}),"h-[--cell-size] w-[--cell-size] select-none p-0 aria-disabled:opacity-50",l.button_previous),button_next:F(na({variant:o}),"h-[--cell-size] w-[--cell-size] select-none p-0 aria-disabled:opacity-50",l.button_next),month_caption:F("flex h-[--cell-size] w-full items-center justify-center px-[--cell-size]",l.month_caption),dropdowns:F("flex h-[--cell-size] w-full items-center justify-center gap-1.5 text-sm font-medium",l.dropdowns),dropdown_root:F("has-focus:border-ring border-input shadow-xs has-focus:ring-ring/50 has-focus:ring-[3px] relative rounded-md border",l.dropdown_root),dropdown:F("absolute inset-0 opacity-0",l.dropdown),caption_label:F("select-none font-medium",r==="label"?"text-sm":"[&>svg]:text-muted-foreground flex h-8 items-center gap-1 rounded-md pl-2 pr-1 text-sm [&>svg]:size-3.5",l.caption_label),table:"w-full border-collapse",weekdays:F("flex",l.weekdays),weekday:F("text-muted-foreground flex-1 select-none rounded-md text-[0.8rem] font-normal",l.weekday),week:F("mt-2 flex w-full",l.week),week_number_header:F("w-[--cell-size] select-none",l.week_number_header),week_number:F("text-muted-foreground select-none text-[0.8rem]",l.week_number),day:F("group/day relative aspect-square h-full w-full select-none p-0 text-center [&:first-child[data-selected=true]_button]:rounded-l-md [&:last-child[data-selected=true]_button]:rounded-r-md",l.day),range_start:F("bg-accent rounded-l-md",l.range_start),range_middle:F("rounded-none",l.range_middle),range_end:F("bg-accent rounded-r-md",l.range_end),today:F("bg-accent text-accent-foreground rounded-md data-[selected=true]:rounded-none",l.today),outside:F("text-muted-foreground aria-selected:text-muted-foreground",l.outside),disabled:F("text-muted-foreground opacity-50",l.disabled),hidden:F("invisible",l.hidden),...t},components:{Root:({className:u,rootRef:m,...c})=>d.jsx("div",{"data-slot":"calendar",ref:m,className:F(u),...c}),Chevron:({className:u,orientation:m,...c})=>m==="left"?d.jsx(rc,{className:F("size-4",u),...c}):m==="right"?d.jsx(Ra,{className:F("size-4",u),...c}):d.jsx(nr,{className:F("size-4",u),...c}),DayButton:Vx,WeekNumber:({children:u,...m})=>d.jsx("td",{...m,children:d.jsx("div",{className:"flex size-[--cell-size] items-center justify-center text-center",children:u})}),...s},...i})}function Vx({className:e,day:t,modifiers:n,...r}){const o=Va(),a=f.useRef(null);return f.useEffect(()=>{var p;n.focused&&((p=a.current)==null||p.focus())},[n.focused]),d.jsx(Zt,{ref:a,variant:"ghost",size:"icon.small","data-day":t.date.toLocaleDateString(),"data-selected-single":n.selected&&!n.range_start&&!n.range_end&&!n.range_middle,"data-range-start":n.range_start,"data-range-end":n.range_end,"data-range-middle":n.range_middle,className:F("flex aspect-square h-auto w-full min-w-[--cell-size] flex-col gap-1 font-normal leading-none","data-[selected-single=true]:bg-primary data-[selected-single=true]:text-primary-foreground","data-[range-middle=true]:bg-accent data-[range-middle=true]:text-accent-foreground data-[range-start=true]:bg-primary data-[range-start=true]:text-primary-foreground data-[range-end=true]:bg-primary data-[range-end=true]:text-primary-foreground","data-[range-end=true]:rounded-md data-[range-middle=true]:rounded-none data-[range-start=true]:rounded-md","group-data-[focused=true]/day:relative group-data-[focused=true]/day:z-10 group-data-[focused=true]/day:border-ring group-data-[focused=true]/day:ring-ring/50 group-data-[focused=true]/day:ring-[3px]","[&>span]:text-xs [&>span]:opacity-70",o.day,e),...r})}var Lr={exports:{}},Kx=Lr.exports,bi;function Xx(){return bi||(bi=1,function(e,t){(function(n,r){e.exports=r()})(Kx,function(){var n={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},r=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,o=/\d/,a=/\d\d/,s=/\d\d?/,i=/\d*[^-_:/,()\s\d]+/,l={},u=function(g){return(g=+g)+(g>68?1900:2e3)},m=function(g){return function(b){this[g]=+b}},c=[/[+-]\d\d:?(\d\d)?|Z/,function(g){(this.zone||(this.zone={})).offset=function(b){if(!b||b==="Z")return 0;var w=b.match(/([+-]|\d\d)/g),S=60*w[1]+(+w[2]||0);return S===0?0:w[0]==="+"?-S:S}(g)}],p=function(g){var b=l[g];return b&&(b.indexOf?b:b.s.concat(b.f))},h=function(g,b){var w,S=l.meridiem;if(S){for(var D=1;D<=24;D+=1)if(g.indexOf(S(D,0,b))>-1){w=D>12;break}}else w=g===(b?"pm":"PM");return w},y={A:[i,function(g){this.afternoon=h(g,!1)}],a:[i,function(g){this.afternoon=h(g,!0)}],Q:[o,function(g){this.month=3*(g-1)+1}],S:[o,function(g){this.milliseconds=100*+g}],SS:[a,function(g){this.milliseconds=10*+g}],SSS:[/\d{3}/,function(g){this.milliseconds=+g}],s:[s,m("seconds")],ss:[s,m("seconds")],m:[s,m("minutes")],mm:[s,m("minutes")],H:[s,m("hours")],h:[s,m("hours")],HH:[s,m("hours")],hh:[s,m("hours")],D:[s,m("day")],DD:[a,m("day")],Do:[i,function(g){var b=l.ordinal,w=g.match(/\d+/);if(this.day=w[0],b)for(var S=1;S<=31;S+=1)b(S).replace(/\[|\]/g,"")===g&&(this.day=S)}],w:[s,m("week")],ww:[a,m("week")],M:[s,m("month")],MM:[a,m("month")],MMM:[i,function(g){var b=p("months"),w=(p("monthsShort")||b.map(function(S){return S.slice(0,3)})).indexOf(g)+1;if(w<1)throw new Error;this.month=w%12||w}],MMMM:[i,function(g){var b=p("months").indexOf(g)+1;if(b<1)throw new Error;this.month=b%12||b}],Y:[/[+-]?\d+/,m("year")],YY:[a,function(g){this.year=u(g)}],YYYY:[/\d{4}/,m("year")],Z:c,ZZ:c};function v(g){var b,w;b=g,w=l&&l.formats;for(var S=(g=b.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(B,L,q){var A=q&&q.toUpperCase();return L||w[q]||n[q]||w[A].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(T,_,N){return _||N.slice(1)})})).match(r),D=S.length,C=0;C<D;C+=1){var R=S[C],M=y[R],E=M&&M[0],$=M&&M[1];S[C]=$?{regex:E,parser:$}:R.replace(/^\[|\]$/g,"")}return function(B){for(var L={},q=0,A=0;q<D;q+=1){var T=S[q];if(typeof T=="string")A+=T.length;else{var _=T.regex,N=T.parser,I=B.slice(A),k=_.exec(I)[0];N.call(L,k),B=B.replace(k,"")}}return function(P){var H=P.afternoon;if(H!==void 0){var z=P.hours;H?z<12&&(P.hours+=12):z===12&&(P.hours=0),delete P.afternoon}}(L),L}}return function(g,b,w){w.p.customParseFormat=!0,g&&g.parseTwoDigitYear&&(u=g.parseTwoDigitYear);var S=b.prototype,D=S.parse;S.parse=function(C){var R=C.date,M=C.utc,E=C.args;this.$u=M;var $=E[1];if(typeof $=="string"){var B=E[2]===!0,L=E[3]===!0,q=B||L,A=E[2];L&&(A=E[2]),l=this.$locale(),!B&&A&&(l=w.Ls[A]),this.$d=function(I,k,P,H){try{if(["x","X"].indexOf(k)>-1)return new Date((k==="X"?1e3:1)*I);var z=v(k)(I),O=z.year,j=z.month,Y=z.day,G=z.hours,V=z.minutes,W=z.seconds,Z=z.milliseconds,X=z.zone,Q=z.week,se=new Date,ue=Y||(O||j?1:se.getDate()),ye=O||se.getFullYear(),J=0;O&&!j||(J=j>0?j-1:se.getMonth());var Re,Te=G||0,oe=V||0,me=W||0,be=Z||0;return X?new Date(Date.UTC(ye,J,ue,Te,oe,me,be+60*X.offset*1e3)):P?new Date(Date.UTC(ye,J,ue,Te,oe,me,be)):(Re=new Date(ye,J,ue,Te,oe,me,be),Q&&(Re=H(Re).week(Q).toDate()),Re)}catch{return new Date("")}}(R,$,M,w),this.init(),A&&A!==!0&&(this.$L=this.locale(A).$L),q&&R!=this.format($)&&(this.$d=new Date("")),l={}}else if($ instanceof Array)for(var T=$.length,_=1;_<=T;_+=1){E[1]=$[_-1];var N=w.apply(this,E);if(N.isValid()){this.$d=N.$d,this.$L=N.$L,this.init();break}_===T&&(this.$d=new Date(""))}else D.call(this,C)}}})}(Lr)),Lr.exports}var Zx=Xx();const Qx=Ka(Zx);Ct.extend(Qx);Ct.extend(du);const Jx={"MM/DD/YYYY":{separator:"/",pattern:/^[0-9/]$/},"DD/MM/YYYY":{separator:"/",pattern:/^[0-9/]$/},"YYYY-MM-DD":{separator:"-",pattern:/^[0-9-]$/},"DD-MM-YYYY":{separator:"-",pattern:/^[0-9-]$/}},e0=({label:e,placeholder:t,helperText:n,required:r,value:o,onSelect:a,className:s,minDate:i,maxDate:l,disabled:u,readOnly:m,locale:c="en",dateFormat:p="DD/MM/YYYY"})=>{const[h,y]=f.useState(!1),[v,g]=f.useState(""),[b,w]=f.useState(o),S=f.useMemo(()=>p,[p]),D=f.useMemo(()=>Jx[S],[S]),C=f.useMemo(()=>t||S.toLowerCase(),[t,S]),R=f.useCallback(A=>{const T=A.replace(/\D/g,""),{separator:_}=D;if(T.length<=2)return T;switch(S){case"MM/DD/YYYY":case"DD/MM/YYYY":return T.length<=4?`${T.substring(0,2)}${_}${T.substring(2)}`:`${T.substring(0,2)}${_}${T.substring(2,4)}${_}${T.substring(4,8)}`;case"YYYY-MM-DD":return T.length<=4?T:T.length<=6?`${T.substring(0,4)}${_}${T.substring(4)}`:`${T.substring(0,4)}${_}${T.substring(4,6)}${_}${T.substring(6,8)}`;case"DD-MM-YYYY":return T.length<=4?`${T.substring(0,2)}${_}${T.substring(2)}`:`${T.substring(0,2)}${_}${T.substring(2,4)}${_}${T.substring(4,8)}`;default:return A}},[S,D]),M=f.useMemo(()=>A=>{const T=A.trim();return T&&Ct(T,S,!0).isValid()?Ct(T,S):null},[S]),E=f.useCallback(A=>Ct(A).format(S),[S]);f.useEffect(()=>{g(o?E(o):""),w(o),Ct.locale(c)},[o,c,E]);const $=f.useCallback(A=>{let T=A.target.value;if(g(T),!T.trim()){w(void 0),a==null||a(void 0);return}const _=R(T);_!==T&&T.replace(/\D/g,"").length>1&&(g(_),T=_);const N=M(T);if(N!=null&&N.isValid()){const I=N.toDate();(!i||I>=i)&&(!l||I<=l)&&(w(I),a==null||a(I))}},[R,M,a,i,l]),B=f.useCallback(()=>{b&&g(E(b))},[b,E]),L=f.useCallback(A=>{A&&(g(E(A)),w(A),a==null||a(A),y(!1))},[a,E]),q=f.useCallback(A=>{if(!["Backspace","Delete","Tab","Enter","ArrowLeft","ArrowRight","ArrowUp","ArrowDown"].includes(A.key)&&!D.pattern.test(A.key)&&!A.ctrlKey&&!A.metaKey){A.preventDefault();return}A.key==="Enter"&&(A.preventDefault(),B())},[D.pattern,B]);return d.jsxs("div",{className:F("space-y-1",s),children:[e&&d.jsxs(Lt,{className:"text-sm font-medium text-gray-700",children:[e,r&&d.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),d.jsxs(Ba,{open:h,onOpenChange:y,children:[d.jsxs("div",{className:"w-60 relative",children:[d.jsx(rn,{type:"text",value:v,onChange:$,onBlur:B,onKeyDown:q,placeholder:C,disabled:u,readOnly:m,className:"w-full pr-12"}),d.jsx(Ya,{asChild:!0,children:d.jsx("button",{type:"button",className:"absolute right-1 top-1/2 -translate-y-1/2 bg-transparent border-0 outline-none text-black hover:text-black focus:ring-2 focus:ring-ring",style:{height:"1.75rem",width:"1.75rem"},onClick:()=>y(A=>!A),disabled:u||m,"aria-label":"Open calendar",children:d.jsx(nc,{strokeWidth:1,className:"h-5 w-5"})})})]}),d.jsx(co,{className:"w-auto p-0",align:"start",children:d.jsx(qx,{mode:"single",selected:b,onSelect:L,fromDate:i,toDate:l})})]}),n&&d.jsx("p",{className:"text-xs text-gray-500",children:n})]})};function Sn({label:e,placeholder:t="Select option",options:n,leadingIcon:r,helperText:o,error:a,required:s,onValueChange:i,className:l,variant:u="default",disabled:m=!1}){return d.jsxs("div",{className:F("space-y-1",l),children:[e&&d.jsxs(Lt,{className:F("text-sm font-medium",m?"text-gray-400":"text-gray-700"),children:[e,s&&d.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),d.jsxs(pa,{onValueChange:i,disabled:m,children:[d.jsx(zr,{className:F("border-input focus-within:ring-primary",a&&"border-red-500 focus-within:ring-red-500",u==="gray"&&"bg-gray-100 border-gray-300 text-gray-700",m&&"opacity-50 cursor-not-allowed"),children:d.jsxs("div",{className:"flex items-center gap-2 w-full",children:[r&&d.jsx("div",{className:"text-gray-400",children:r}),d.jsx(ha,{placeholder:t})]})}),d.jsx(Gr,{children:n.map(c=>d.jsx(Ur,{value:c.value,children:c.label},c.value))})]}),(o||a)&&d.jsx("p",{className:F("text-xs",a?"text-red-500":m?"text-gray-400":"text-gray-500"),children:a||o})]})}const t0=({label:e,variant:t="filled",color:n="default",size:r="medium",deletable:o=!1,onDelete:a,onClick:s,icon:i,avatar:l,disabled:u=!1,className:m="",...c})=>{const p="inline-flex items-center gap-1 font-medium transition-all duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2",h={small:"px-2 py-0.5 text-xs rounded-full",medium:"px-3 py-1 text-sm rounded-full",large:"px-4 py-1.5 text-base rounded-full"},y={default:{filled:"bg-gray-200 text-gray-800 hover:bg-gray-300",outlined:"border border-gray-300 text-gray-700 hover:bg-gray-50"},primary:{filled:"bg-blue-500 text-white hover:bg-blue-600",outlined:"border border-blue-500 text-blue-600 hover:bg-blue-50"},secondary:{filled:"bg-purple-500 text-white hover:bg-purple-600",outlined:"border border-purple-500 text-purple-600 hover:bg-purple-50"},success:{filled:"bg-green-500 text-white hover:bg-green-600",outlined:"border border-green-500 text-green-600 hover:bg-green-50"},warning:{filled:"bg-yellow-500 text-white hover:bg-yellow-600",outlined:"border border-yellow-500 text-yellow-600 hover:bg-yellow-50"},error:{filled:"bg-red-500 text-white hover:bg-red-600",outlined:"border border-red-500 text-red-600 hover:bg-red-50"}},v=u?"opacity-50 cursor-not-allowed":"cursor-pointer",g=s&&!u?"hover:shadow-md":"",b=`
152
152
  ${p}
153
153
  ${h[r]}
154
154
  ${y[n][t]}
155
- ${g}
156
155
  ${v}
156
+ ${g}
157
157
  ${m}
158
- `.trim(),x=C=>{!u&&s&&s(C)},S=C=>{C.stopPropagation(),!u&&a&&a(C)},k=r==="small"?12:r==="large"?18:14;return d.jsxs("div",{className:w,onClick:x,...c,children:[l&&d.jsx("div",{className:`rounded-full overflow-hidden ${r==="small"?"w-4 h-4":r==="large"?"w-6 h-6":"w-5 h-5"}`,children:typeof l=="string"?d.jsx("img",{src:l,alt:`Avatar for ${e}`,className:"w-full h-full object-cover"}):l}),i&&!l&&d.jsx("div",{className:"flex items-center",children:b.isValidElement(i)?b.cloneElement(i,{size:k}):i}),d.jsx("span",{children:e}),o&&d.jsx("button",{onClick:S,className:`ml-1 rounded-full p-0.5 hover:bg-black hover:bg-opacity-10 transition-colors ${u?"cursor-not-allowed":"cursor-pointer"}`,disabled:u,children:d.jsx(En,{size:k})})]})},_x={small:"h-8 text-sm",medium:"h-10",large:"h-12 text-base"},Px={white:"bg-white border-gray-300",grey:"bg-gray-100 border-gray-300"},Jl=({size:e="medium",variant:t="white",placeholder:n="Search here",className:r,onChange:o,query:a=""})=>d.jsxs("div",{className:"relative",children:[d.jsx(Ui,{strokeWidth:1.1,className:"absolute left-4 top-1/2 transform -translate-y-1/2 text-gray-900 h-5 w-5"}),d.jsx(Mn,{placeholder:n,className:q("pl-12 rounded-full",_x[e],Px[t],r),onChange:o,value:a})]}),Ax=[{value:"all",label:"All Categories"},{value:"electronics",label:"Electronics"},{value:"clothing",label:"Clothing"},{value:"books",label:"Books"}],Ix=[{value:"newest",label:"Newest First"},{value:"oldest",label:"Oldest First"},{value:"name-asc",label:"Name A-Z"},{value:"name-desc",label:"Name Z-A"}],jx=({className:e,searchPlaceholder:t="Search...",categories:n=Ax,sortOptions:r=Ix,showDateFilter:o=!1,onSearch:a,onFilter:s,onClear:i,defaultFilters:l})=>{const[u,m]=b.useState({category:(l==null?void 0:l.category)??"",sort:(l==null?void 0:l.sort)??"",dateFrom:l==null?void 0:l.dateFrom,dateTo:l==null?void 0:l.dateTo}),[c,p]=b.useState(!1),[h,y]=b.useState(!1),[g,v]=b.useState(u.dateFrom??new Date),[w,x]=b.useState(u.dateTo??new Date),S=(N,M)=>{const D={...u,[N]:M};m(D),s==null||s(D)},k=()=>{m({category:"",sort:"",dateFrom:void 0,dateTo:void 0}),i==null||i()},C=Object.values(u).some(N=>N!==""&&N!==void 0);return d.jsxs("div",{className:q("space-y-4",e),children:[d.jsx(Jl,{size:"medium",placeholder:t,onChange:N=>a==null?void 0:a(N.target.value)}),d.jsxs("div",{className:"flex flex-wrap items-center gap-4",children:[d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx(Bp,{className:"h-4 w-4 text-gray-500"}),d.jsx("span",{className:"text-sm font-medium text-gray-700",children:"Filters:"})]}),d.jsx(wn,{placeholder:"Category",options:n,onValueChange:N=>S("category",N),className:"min-w-[140px]"}),d.jsx(wn,{placeholder:"Sort by",options:r,onValueChange:N=>S("sort",N),className:"min-w-[140px]"}),o&&d.jsxs(d.Fragment,{children:[d.jsx(Hr,{placeholder:"From date",value:u.dateFrom,onSelect:N=>{S("dateFrom",N),v(N??g)},className:"min-w-[140px]",open:c,onOpenChange:p,month:g,onMonthChange:v}),d.jsx(Hr,{placeholder:"To date",value:u.dateTo,onSelect:N=>{S("dateTo",N),x(N??w)},className:"min-w-[140px]",open:h,onOpenChange:y,month:w,onMonthChange:x})]}),C&&d.jsxs(gn,{variant:"outline",size:"small",onClick:k,className:"flex items-center gap-1",children:[d.jsx(En,{className:"h-3 w-3"}),"Clear"]})]})]})},$x=[{value:"personal",label:"Personal Account"},{value:"business",label:"Business Account"},{value:"developer",label:"Developer Account"}];function Lx({className:e,showDateOfBirth:t=!0,accountTypes:n=$x,onValueChange:r}){const[o,a]=b.useState(),[s,i]=b.useState(!1),[l,u]=b.useState(!1),[m,c]=b.useState(!1),[p,h]=b.useState(o??new Date),[y,g]=b.useState(""),[v,w]=b.useState("");return d.jsxs("div",{className:q("space-y-4",e),children:[d.jsx(Qe,{label:"Username",placeholder:"Choose a username",helperText:"Must be at least 3 characters long",required:!0,onChange:x=>r==null?void 0:r("username",x.target.value)}),d.jsx(Qe,{label:"Email Address",type:"email",placeholder:"Enter your email",icon:d.jsx(Gi,{className:"h-4 w-4"}),required:!0,onChange:x=>r==null?void 0:r("email",x.target.value)}),d.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[d.jsx(Qo,{label:"Password",helperText:"Must be at least 8 characters",required:!0,value:y,onChange:x=>{g(x),r==null||r("password",x)},showPassword:s,onShowPasswordChange:i}),d.jsx(Qo,{label:"Confirm Password",placeholder:"Confirm your password",required:!0,value:v,onChange:x=>{w(x),r==null||r("confirmPassword",x)},showPassword:l,onShowPasswordChange:u})]}),d.jsx(wn,{label:"Account Type",placeholder:"Select account type",options:n,leadingIcon:d.jsx(Zp,{className:"h-4 w-4"}),required:!0,onValueChange:x=>r==null?void 0:r("accountType",x)}),t&&d.jsx(Hr,{label:"Date of Birth",placeholder:"Select your birth date",helperText:"Must be 18 or older",value:o,maxDate:new Date,onSelect:x=>{a(x),h(x??p),x&&(r==null||r("dateOfBirth",x))},open:m,onOpenChange:c,month:p,onMonthChange:h})]})}const Fx=[{value:"us",label:"United States"},{value:"ca",label:"Canada"},{value:"uk",label:"United Kingdom"},{value:"au",label:"Australia"},{value:"de",label:"Germany"},{value:"fr",label:"France"}];function Wx({className:e,countries:t=Fx,onValueChange:n}){return d.jsxs("div",{className:q("space-y-4",e),children:[d.jsx(Qe,{label:"Street Address",placeholder:"Enter street address",required:!0,onChange:r=>n==null?void 0:n("streetAddress",r.target.value)}),d.jsx(Qe,{label:"Apartment, suite, etc.",placeholder:"Apartment, suite, etc. (optional)",onChange:r=>n==null?void 0:n("addressLine2",r.target.value)}),d.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[d.jsx(Qe,{label:"City",placeholder:"Enter city",required:!0,onChange:r=>n==null?void 0:n("city",r.target.value)}),d.jsx(Qe,{label:"State/Province",placeholder:"Enter state",required:!0,onChange:r=>n==null?void 0:n("state",r.target.value)}),d.jsx(Qe,{label:"ZIP/Postal Code",placeholder:"Enter ZIP code",required:!0,onChange:r=>n==null?void 0:n("zipCode",r.target.value)})]}),d.jsx(wn,{label:"Country",placeholder:"Select country",options:t,leadingIcon:d.jsx(zp,{className:"h-4 w-4"}),required:!0,onValueChange:r=>n==null?void 0:n("country",r)})]})}const Bx=[{value:"sales",label:"Sales"},{value:"support",label:"Support"},{value:"general",label:"General Inquiry"}];function Yx({className:e,showDepartment:t=!0,departmentOptions:n=Bx,onValueChange:r}){return d.jsxs("div",{className:q("space-y-4",e),children:[d.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[d.jsx(Qe,{label:"First Name",placeholder:"Enter first name",required:!0,onChange:o=>r==null?void 0:r("firstName",o.target.value)}),d.jsx(Qe,{label:"Last Name",placeholder:"Enter last name",required:!0,onChange:o=>r==null?void 0:r("lastName",o.target.value)})]}),d.jsx(Qe,{label:"Email Address",type:"email",placeholder:"Enter your email",icon:d.jsx(Gi,{className:"h-4 w-4"}),required:!0,onChange:o=>r==null?void 0:r("email",o.target.value)}),d.jsx(Qe,{label:"Phone Number",type:"tel",placeholder:"+1 (555) 000-0000",icon:d.jsx(Vp,{className:"h-4 w-4"}),onChange:o=>r==null?void 0:r("phone",o.target.value)}),t&&d.jsx(wn,{label:"Department",placeholder:"Select department",options:n,leadingIcon:d.jsx(Ep,{className:"h-4 w-4"}),onValueChange:o=>r==null?void 0:r("department",o)}),d.jsx(Vi,{label:"Message",placeholder:"How can we help you?",required:!0,onChange:o=>r==null?void 0:r("message",o.target.value)})]})}var li=1,Hx=.9,zx=.8,Gx=.17,Fo=.1,Wo=.999,Ux=.9999,qx=.99,Vx=/[\\\/_+.#"@\[\(\{&]/,Kx=/[\\\/_+.#"@\[\(\{&]/g,Xx=/[\s-]/,eu=/[\s-]/g;function ma(e,t,n,r,o,a,s){if(a===t.length)return o===e.length?li:qx;var i=`${o},${a}`;if(s[i]!==void 0)return s[i];for(var l=r.charAt(a),u=n.indexOf(l,o),m=0,c,p,h,y;u>=0;)c=ma(e,t,n,r,u+1,a+1,s),c>m&&(u===o?c*=li:Vx.test(e.charAt(u-1))?(c*=zx,h=e.slice(o,u-1).match(Kx),h&&o>0&&(c*=Math.pow(Wo,h.length))):Xx.test(e.charAt(u-1))?(c*=Hx,y=e.slice(o,u-1).match(eu),y&&o>0&&(c*=Math.pow(Wo,y.length))):(c*=Gx,o>0&&(c*=Math.pow(Wo,u-o))),e.charAt(u)!==t.charAt(a)&&(c*=Ux)),(c<Fo&&n.charAt(u-1)===r.charAt(a+1)||r.charAt(a+1)===r.charAt(a)&&n.charAt(u-1)!==r.charAt(a))&&(p=ma(e,t,n,r,u+1,a+2,s),p*Fo>c&&(c=p*Fo)),c>m&&(m=c),u=n.indexOf(l,u+1);return s[i]=m,m}function ui(e){return e.toLowerCase().replace(eu," ")}function Zx(e,t,n){return e=n&&n.length>0?`${e+" "+n.join(" ")}`:e,ma(e,t,ui(e),ui(t),0,0,{})}var lo="Dialog",[tu,RM]=Ye(lo),[Qx,ct]=tu(lo),nu=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:a,modal:s=!0}=e,i=f.useRef(null),l=f.useRef(null),[u,m]=tt({prop:r,defaultProp:o??!1,onChange:a,caller:lo});return d.jsx(Qx,{scope:t,triggerRef:i,contentRef:l,contentId:ke(),titleId:ke(),descriptionId:ke(),open:u,onOpenChange:m,onOpenToggle:f.useCallback(()=>m(c=>!c),[m]),modal:s,children:n})};nu.displayName=lo;var ru="DialogTrigger",ou=f.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=ct(ru,n),a=he(t,o.triggerRef);return d.jsx(te.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":za(o.open),...r,ref:a,onClick:K(e.onClick,o.onOpenToggle)})});ou.displayName=ru;var Ya="DialogPortal",[Jx,au]=tu(Ya,{forceMount:void 0}),su=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,a=ct(Ya,t);return d.jsx(Jx,{scope:t,forceMount:n,children:f.Children.map(r,s=>d.jsx(He,{present:n||a.open,children:d.jsx(or,{asChild:!0,container:o,children:s})}))})};su.displayName=Ya;var zr="DialogOverlay",iu=f.forwardRef((e,t)=>{const n=au(zr,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,a=ct(zr,e.__scopeDialog);return a.modal?d.jsx(He,{present:r||a.open,children:d.jsx(t0,{...o,ref:t})}):null});iu.displayName=zr;var e0=Pt("DialogOverlay.RemoveScroll"),t0=f.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=ct(zr,n);return d.jsx(ar,{as:e0,allowPinchZoom:!0,shards:[o.contentRef],children:d.jsx(te.div,{"data-state":za(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),Qt="DialogContent",cu=f.forwardRef((e,t)=>{const n=au(Qt,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,a=ct(Qt,e.__scopeDialog);return d.jsx(He,{present:r||a.open,children:a.modal?d.jsx(n0,{...o,ref:t}):d.jsx(r0,{...o,ref:t})})});cu.displayName=Qt;var n0=f.forwardRef((e,t)=>{const n=ct(Qt,e.__scopeDialog),r=f.useRef(null),o=he(t,n.contentRef,r);return f.useEffect(()=>{const a=r.current;if(a)return no(a)},[]),d.jsx(lu,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:K(e.onCloseAutoFocus,a=>{var s;a.preventDefault(),(s=n.triggerRef.current)==null||s.focus()}),onPointerDownOutside:K(e.onPointerDownOutside,a=>{const s=a.detail.originalEvent,i=s.button===0&&s.ctrlKey===!0;(s.button===2||i)&&a.preventDefault()}),onFocusOutside:K(e.onFocusOutside,a=>a.preventDefault())})}),r0=f.forwardRef((e,t)=>{const n=ct(Qt,e.__scopeDialog),r=f.useRef(!1),o=f.useRef(!1);return d.jsx(lu,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var s,i;(s=e.onCloseAutoFocus)==null||s.call(e,a),a.defaultPrevented||(r.current||(i=n.triggerRef.current)==null||i.focus(),a.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:a=>{var l,u;(l=e.onInteractOutside)==null||l.call(e,a),a.defaultPrevented||(r.current=!0,a.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const s=a.target;((u=n.triggerRef.current)==null?void 0:u.contains(s))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&o.current&&a.preventDefault()}})}),lu=f.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:a,...s}=e,i=ct(Qt,n),l=f.useRef(null),u=he(t,l);return Xr(),d.jsxs(d.Fragment,{children:[d.jsx(er,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:a,children:d.jsx(kn,{role:"dialog",id:i.contentId,"aria-describedby":i.descriptionId,"aria-labelledby":i.titleId,"data-state":za(i.open),...s,ref:u,onDismiss:()=>i.onOpenChange(!1)})}),d.jsxs(d.Fragment,{children:[d.jsx(o0,{titleId:i.titleId}),d.jsx(s0,{contentRef:l,descriptionId:i.descriptionId})]})]})}),Ha="DialogTitle",uu=f.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=ct(Ha,n);return d.jsx(te.h2,{id:o.titleId,...r,ref:t})});uu.displayName=Ha;var du="DialogDescription",fu=f.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=ct(du,n);return d.jsx(te.p,{id:o.descriptionId,...r,ref:t})});fu.displayName=du;var mu="DialogClose",pu=f.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=ct(mu,n);return d.jsx(te.button,{type:"button",...r,ref:t,onClick:K(e.onClick,()=>o.onOpenChange(!1))})});pu.displayName=mu;function za(e){return e?"open":"closed"}var hu="DialogTitleWarning",[TM,gu]=Jp(hu,{contentName:Qt,titleName:Ha,docsSlug:"dialog"}),o0=({titleId:e})=>{const t=gu(hu),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
158
+ `.trim(),w=C=>{!u&&s&&s(C)},S=C=>{C.stopPropagation(),!u&&a&&a(C)},D=r==="small"?12:r==="large"?18:14;return d.jsxs("div",{className:b,onClick:w,...c,children:[l&&d.jsx("div",{className:`rounded-full overflow-hidden ${r==="small"?"w-4 h-4":r==="large"?"w-6 h-6":"w-5 h-5"}`,children:typeof l=="string"?d.jsx("img",{src:l,alt:`Avatar for ${e}`,className:"w-full h-full object-cover"}):l}),i&&!l&&d.jsx("div",{className:"flex items-center",children:x.isValidElement(i)?x.cloneElement(i,{size:D}):i}),d.jsx("span",{children:e}),o&&d.jsx("button",{onClick:S,className:`ml-1 rounded-full p-0.5 hover:bg-black hover:bg-opacity-10 transition-colors ${u?"cursor-not-allowed":"cursor-pointer"}`,disabled:u,children:d.jsx(kn,{size:D})})]})},n0={small:"h-8 text-sm",medium:"h-10",large:"h-12 text-base"},r0={white:"bg-white border-gray-300",grey:"bg-gray-100 border-gray-300"},fu=({size:e="medium",variant:t="white",placeholder:n="Search here",className:r,onChange:o,query:a=""})=>d.jsxs("div",{className:"relative",children:[d.jsx(sc,{strokeWidth:1.1,className:"absolute left-4 top-1/2 transform -translate-y-1/2 text-gray-900 h-5 w-5"}),d.jsx(rn,{placeholder:n,className:F("pl-12 rounded-full",n0[e],r0[t],r),onChange:o,value:a})]}),o0=[{value:"all",label:"All Categories"},{value:"electronics",label:"Electronics"},{value:"clothing",label:"Clothing"},{value:"books",label:"Books"}],a0=[{value:"newest",label:"Newest First"},{value:"oldest",label:"Oldest First"},{value:"name-asc",label:"Name A-Z"},{value:"name-desc",label:"Name Z-A"}],s0=({className:e,searchPlaceholder:t="Search...",categories:n=o0,sortOptions:r=a0,showDateFilter:o=!1,onSearch:a,onFilter:s,onClear:i,defaultFilters:l})=>{const[u,m]=x.useState({category:(l==null?void 0:l.category)??"",sort:(l==null?void 0:l.sort)??"",dateFrom:l==null?void 0:l.dateFrom,dateTo:l==null?void 0:l.dateTo}),[c,p]=x.useState(!1),[h,y]=x.useState(!1),[v,g]=x.useState(u.dateFrom??new Date),[b,w]=x.useState(u.dateTo??new Date),S=(R,M)=>{const E={...u,[R]:M};m(E),s==null||s(E)},D=()=>{m({category:"",sort:"",dateFrom:void 0,dateTo:void 0}),i==null||i()},C=Object.values(u).some(R=>R!==""&&R!==void 0);return d.jsxs("div",{className:F("space-y-4",e),children:[d.jsx(fu,{size:"medium",placeholder:t,onChange:R=>a==null?void 0:a(R.target.value)}),d.jsxs("div",{className:"flex flex-wrap items-center gap-4",children:[d.jsxs("div",{className:"flex items-center gap-2",children:[d.jsx(sh,{className:"h-4 w-4 text-gray-500"}),d.jsx("span",{className:"text-sm font-medium text-gray-700",children:"Filters:"})]}),d.jsx(Sn,{placeholder:"Category",options:n,onValueChange:R=>S("category",R),className:"min-w-[140px]"}),d.jsx(Sn,{placeholder:"Sort by",options:r,onValueChange:R=>S("sort",R),className:"min-w-[140px]"}),o&&d.jsxs(d.Fragment,{children:[d.jsx(qr,{placeholder:"From date",value:u.dateFrom,onSelect:R=>{S("dateFrom",R),g(R??v)},className:"min-w-[140px]",open:c,onOpenChange:p,month:v,onMonthChange:g}),d.jsx(qr,{placeholder:"To date",value:u.dateTo,onSelect:R=>{S("dateTo",R),w(R??b)},className:"min-w-[140px]",open:h,onOpenChange:y,month:b,onMonthChange:w})]}),C&&d.jsxs(Zt,{variant:"outline",size:"small",onClick:D,className:"flex items-center gap-1",children:[d.jsx(kn,{className:"h-3 w-3"}),"Clear"]})]})]})},i0=[{value:"personal",label:"Personal Account"},{value:"business",label:"Business Account"},{value:"developer",label:"Developer Account"}];function c0({className:e,showDateOfBirth:t=!0,accountTypes:n=i0,onValueChange:r}){const[o,a]=x.useState(),[s,i]=x.useState(!1),[l,u]=x.useState(!1),[m,c]=x.useState(!1),[p,h]=x.useState(o??new Date),[y,v]=x.useState(""),[g,b]=x.useState("");return d.jsxs("div",{className:F("space-y-4",e),children:[d.jsx(Qe,{label:"Username",placeholder:"Choose a username",helperText:"Must be at least 3 characters long",required:!0,onChange:w=>r==null?void 0:r("username",w.target.value)}),d.jsx(Qe,{label:"Email Address",type:"email",placeholder:"Enter your email",icon:d.jsx(ac,{className:"h-4 w-4"}),required:!0,onChange:w=>r==null?void 0:r("email",w.target.value)}),d.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[d.jsx(ra,{label:"Password",helperText:"Must be at least 8 characters",required:!0,value:y,onChange:w=>{v(w),r==null||r("password",w)},showPassword:s,onShowPasswordChange:i}),d.jsx(ra,{label:"Confirm Password",placeholder:"Confirm your password",required:!0,value:g,onChange:w=>{b(w),r==null||r("confirmPassword",w)},showPassword:l,onShowPasswordChange:u})]}),d.jsx(Sn,{label:"Account Type",placeholder:"Select account type",options:n,leadingIcon:d.jsx(gh,{className:"h-4 w-4"}),required:!0,onValueChange:w=>r==null?void 0:r("accountType",w)}),t&&d.jsx(qr,{label:"Date of Birth",placeholder:"Select your birth date",helperText:"Must be 18 or older",value:o,maxDate:new Date,onSelect:w=>{a(w),h(w??p),w&&(r==null||r("dateOfBirth",w))},open:m,onOpenChange:c,month:p,onMonthChange:h})]})}const l0=[{value:"us",label:"United States"},{value:"ca",label:"Canada"},{value:"uk",label:"United Kingdom"},{value:"au",label:"Australia"},{value:"de",label:"Germany"},{value:"fr",label:"France"}];function u0({className:e,countries:t=l0,onValueChange:n}){return d.jsxs("div",{className:F("space-y-4",e),children:[d.jsx(Qe,{label:"Street Address",placeholder:"Enter street address",required:!0,onChange:r=>n==null?void 0:n("streetAddress",r.target.value)}),d.jsx(Qe,{label:"Apartment, suite, etc.",placeholder:"Apartment, suite, etc. (optional)",onChange:r=>n==null?void 0:n("addressLine2",r.target.value)}),d.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[d.jsx(Qe,{label:"City",placeholder:"Enter city",required:!0,onChange:r=>n==null?void 0:n("city",r.target.value)}),d.jsx(Qe,{label:"State/Province",placeholder:"Enter state",required:!0,onChange:r=>n==null?void 0:n("state",r.target.value)}),d.jsx(Qe,{label:"ZIP/Postal Code",placeholder:"Enter ZIP code",required:!0,onChange:r=>n==null?void 0:n("zipCode",r.target.value)})]}),d.jsx(Sn,{label:"Country",placeholder:"Select country",options:t,leadingIcon:d.jsx(lh,{className:"h-4 w-4"}),required:!0,onValueChange:r=>n==null?void 0:n("country",r)})]})}const d0=[{value:"sales",label:"Sales"},{value:"support",label:"Support"},{value:"general",label:"General Inquiry"}];function f0({className:e,showDepartment:t=!0,departmentOptions:n=d0,onValueChange:r}){return d.jsxs("div",{className:F("space-y-4",e),children:[d.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[d.jsx(Qe,{label:"First Name",placeholder:"Enter first name",required:!0,onChange:o=>r==null?void 0:r("firstName",o.target.value)}),d.jsx(Qe,{label:"Last Name",placeholder:"Enter last name",required:!0,onChange:o=>r==null?void 0:r("lastName",o.target.value)})]}),d.jsx(Qe,{label:"Email Address",type:"email",placeholder:"Enter your email",icon:d.jsx(ac,{className:"h-4 w-4"}),required:!0,onChange:o=>r==null?void 0:r("email",o.target.value)}),d.jsx(Qe,{label:"Phone Number",type:"tel",placeholder:"+1 (555) 000-0000",icon:d.jsx(mh,{className:"h-4 w-4"}),onChange:o=>r==null?void 0:r("phone",o.target.value)}),t&&d.jsx(Sn,{label:"Department",placeholder:"Select department",options:n,leadingIcon:d.jsx(Up,{className:"h-4 w-4"}),onValueChange:o=>r==null?void 0:r("department",o)}),d.jsx(cc,{label:"Message",placeholder:"How can we help you?",required:!0,onChange:o=>r==null?void 0:r("message",o.target.value)})]})}var wi=1,m0=.9,p0=.8,h0=.17,Ho=.1,zo=.999,g0=.9999,v0=.99,y0=/[\\\/_+.#"@\[\(\{&]/,b0=/[\\\/_+.#"@\[\(\{&]/g,w0=/[\s-]/,mu=/[\s-]/g;function va(e,t,n,r,o,a,s){if(a===t.length)return o===e.length?wi:v0;var i=`${o},${a}`;if(s[i]!==void 0)return s[i];for(var l=r.charAt(a),u=n.indexOf(l,o),m=0,c,p,h,y;u>=0;)c=va(e,t,n,r,u+1,a+1,s),c>m&&(u===o?c*=wi:y0.test(e.charAt(u-1))?(c*=p0,h=e.slice(o,u-1).match(b0),h&&o>0&&(c*=Math.pow(zo,h.length))):w0.test(e.charAt(u-1))?(c*=m0,y=e.slice(o,u-1).match(mu),y&&o>0&&(c*=Math.pow(zo,y.length))):(c*=h0,o>0&&(c*=Math.pow(zo,u-o))),e.charAt(u)!==t.charAt(a)&&(c*=g0)),(c<Ho&&n.charAt(u-1)===r.charAt(a+1)||r.charAt(a+1)===r.charAt(a)&&n.charAt(u-1)!==r.charAt(a))&&(p=va(e,t,n,r,u+1,a+2,s),p*Ho>c&&(c=p*Ho)),c>m&&(m=c),u=n.indexOf(l,u+1);return s[i]=m,m}function xi(e){return e.toLowerCase().replace(mu," ")}function x0(e,t,n){return e=n&&n.length>0?`${e+" "+n.join(" ")}`:e,va(e,t,xi(e),xi(t),0,0,{})}var po="Dialog",[pu,iD]=Be(po),[S0,ct]=pu(po),hu=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:a,modal:s=!0}=e,i=f.useRef(null),l=f.useRef(null),[u,m]=tt({prop:r,defaultProp:o??!1,onChange:a,caller:po});return d.jsx(S0,{scope:t,triggerRef:i,contentRef:l,contentId:ke(),titleId:ke(),descriptionId:ke(),open:u,onOpenChange:m,onOpenToggle:f.useCallback(()=>m(c=>!c),[m]),modal:s,children:n})};hu.displayName=po;var gu="DialogTrigger",vu=f.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=ct(gu,n),a=he(t,o.triggerRef);return d.jsx(ee.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Qa(o.open),...r,ref:a,onClick:K(e.onClick,o.onOpenToggle)})});vu.displayName=gu;var Xa="DialogPortal",[C0,yu]=pu(Xa,{forceMount:void 0}),bu=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,a=ct(Xa,t);return d.jsx(C0,{scope:t,forceMount:n,children:f.Children.map(r,s=>d.jsx(ze,{present:n||a.open,children:d.jsx(ir,{asChild:!0,container:o,children:s})}))})};bu.displayName=Xa;var Vr="DialogOverlay",wu=f.forwardRef((e,t)=>{const n=yu(Vr,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,a=ct(Vr,e.__scopeDialog);return a.modal?d.jsx(ze,{present:r||a.open,children:d.jsx(D0,{...o,ref:t})}):null});wu.displayName=Vr;var M0=At("DialogOverlay.RemoveScroll"),D0=f.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=ct(Vr,n);return d.jsx(cr,{as:M0,allowPinchZoom:!0,shards:[o.contentRef],children:d.jsx(ee.div,{"data-state":Qa(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),tn="DialogContent",xu=f.forwardRef((e,t)=>{const n=yu(tn,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,a=ct(tn,e.__scopeDialog);return d.jsx(ze,{present:r||a.open,children:a.modal?d.jsx(k0,{...o,ref:t}):d.jsx(E0,{...o,ref:t})})});xu.displayName=tn;var k0=f.forwardRef((e,t)=>{const n=ct(tn,e.__scopeDialog),r=f.useRef(null),o=he(t,n.contentRef,r);return f.useEffect(()=>{const a=r.current;if(a)return ao(a)},[]),d.jsx(Su,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:K(e.onCloseAutoFocus,a=>{var s;a.preventDefault(),(s=n.triggerRef.current)==null||s.focus()}),onPointerDownOutside:K(e.onPointerDownOutside,a=>{const s=a.detail.originalEvent,i=s.button===0&&s.ctrlKey===!0;(s.button===2||i)&&a.preventDefault()}),onFocusOutside:K(e.onFocusOutside,a=>a.preventDefault())})}),E0=f.forwardRef((e,t)=>{const n=ct(tn,e.__scopeDialog),r=f.useRef(!1),o=f.useRef(!1);return d.jsx(Su,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var s,i;(s=e.onCloseAutoFocus)==null||s.call(e,a),a.defaultPrevented||(r.current||(i=n.triggerRef.current)==null||i.focus(),a.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:a=>{var l,u;(l=e.onInteractOutside)==null||l.call(e,a),a.defaultPrevented||(r.current=!0,a.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const s=a.target;((u=n.triggerRef.current)==null?void 0:u.contains(s))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&o.current&&a.preventDefault()}})}),Su=f.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:a,...s}=e,i=ct(tn,n),l=f.useRef(null),u=he(t,l);return Jr(),d.jsxs(d.Fragment,{children:[d.jsx(rr,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:a,children:d.jsx(En,{role:"dialog",id:i.contentId,"aria-describedby":i.descriptionId,"aria-labelledby":i.titleId,"data-state":Qa(i.open),...s,ref:u,onDismiss:()=>i.onOpenChange(!1)})}),d.jsxs(d.Fragment,{children:[d.jsx(N0,{titleId:i.titleId}),d.jsx(T0,{contentRef:l,descriptionId:i.descriptionId})]})]})}),Za="DialogTitle",Cu=f.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=ct(Za,n);return d.jsx(ee.h2,{id:o.titleId,...r,ref:t})});Cu.displayName=Za;var Mu="DialogDescription",Du=f.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=ct(Mu,n);return d.jsx(ee.p,{id:o.descriptionId,...r,ref:t})});Du.displayName=Mu;var ku="DialogClose",Eu=f.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=ct(ku,n);return d.jsx(ee.button,{type:"button",...r,ref:t,onClick:K(e.onClick,()=>o.onOpenChange(!1))})});Eu.displayName=ku;function Qa(e){return e?"open":"closed"}var Nu="DialogTitleWarning",[cD,Ru]=yh(Nu,{contentName:tn,titleName:Za,docsSlug:"dialog"}),N0=({titleId:e})=>{const t=Ru(Nu),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
159
159
 
160
160
  If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
161
161
 
162
- For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return f.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},a0="DialogDescriptionWarning",s0=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${gu(a0).contentName}}.`;return f.useEffect(()=>{var a;const o=(a=e.current)==null?void 0:a.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},Ga=nu,vu=ou,Ua=su,uo=iu,fo=cu,qa=uu,Va=fu,Ka=pu,Ln='[cmdk-group=""]',Bo='[cmdk-group-items=""]',i0='[cmdk-group-heading=""]',yu='[cmdk-item=""]',di=`${yu}:not([aria-disabled="true"])`,pa="cmdk-item-select",fn="data-value",c0=(e,t,n)=>Zx(e,t,n),bu=f.createContext(void 0),dr=()=>f.useContext(bu),wu=f.createContext(void 0),Xa=()=>f.useContext(wu),xu=f.createContext(void 0),Su=f.forwardRef((e,t)=>{let n=mn(()=>{var T,A;return{search:"",value:(A=(T=e.value)!=null?T:e.defaultValue)!=null?A:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),r=mn(()=>new Set),o=mn(()=>new Map),a=mn(()=>new Map),s=mn(()=>new Set),i=Cu(e),{label:l,children:u,value:m,onValueChange:c,filter:p,shouldFilter:h,loop:y,disablePointerSelection:g=!1,vimBindings:v=!0,...w}=e,x=ke(),S=ke(),k=ke(),C=f.useRef(null),N=b0();Jt(()=>{if(m!==void 0){let T=m.trim();n.current.value=T,M.emit()}},[m]),Jt(()=>{N(6,$)},[]);let M=f.useMemo(()=>({subscribe:T=>(s.current.add(T),()=>s.current.delete(T)),snapshot:()=>n.current,setState:(T,A,W)=>{var H,U,j,Z;if(!Object.is(n.current[T],A)){if(n.current[T]=A,T==="search")V(),B(),N(1,F);else if(T==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let X=document.getElementById(k);X?X.focus():(H=document.getElementById(x))==null||H.focus()}if(N(7,()=>{var X;n.current.selectedItemId=(X=I())==null?void 0:X.id,M.emit()}),W||N(5,$),((U=i.current)==null?void 0:U.value)!==void 0){let X=A??"";(Z=(j=i.current).onValueChange)==null||Z.call(j,X);return}}M.emit()}},emit:()=>{s.current.forEach(T=>T())}}),[]),D=f.useMemo(()=>({value:(T,A,W)=>{var H;A!==((H=a.current.get(T))==null?void 0:H.value)&&(a.current.set(T,{value:A,keywords:W}),n.current.filtered.items.set(T,L(A,W)),N(2,()=>{B(),M.emit()}))},item:(T,A)=>(r.current.add(T),A&&(o.current.has(A)?o.current.get(A).add(T):o.current.set(A,new Set([T]))),N(3,()=>{V(),B(),n.current.value||F(),M.emit()}),()=>{a.current.delete(T),r.current.delete(T),n.current.filtered.items.delete(T);let W=I();N(4,()=>{V(),(W==null?void 0:W.getAttribute("id"))===T&&F(),M.emit()})}),group:T=>(o.current.has(T)||o.current.set(T,new Set),()=>{a.current.delete(T),o.current.delete(T)}),filter:()=>i.current.shouldFilter,label:l||e["aria-label"],getDisablePointerSelection:()=>i.current.disablePointerSelection,listId:x,inputId:k,labelId:S,listInnerRef:C}),[]);function L(T,A){var W,H;let U=(H=(W=i.current)==null?void 0:W.filter)!=null?H:c0;return T?U(T,n.current.search,A):0}function B(){if(!n.current.search||i.current.shouldFilter===!1)return;let T=n.current.filtered.items,A=[];n.current.filtered.groups.forEach(H=>{let U=o.current.get(H),j=0;U.forEach(Z=>{let X=T.get(Z);j=Math.max(X,j)}),A.push([H,j])});let W=C.current;_().sort((H,U)=>{var j,Z;let X=H.getAttribute("id"),Q=U.getAttribute("id");return((j=T.get(Q))!=null?j:0)-((Z=T.get(X))!=null?Z:0)}).forEach(H=>{let U=H.closest(Bo);U?U.appendChild(H.parentElement===U?H:H.closest(`${Bo} > *`)):W.appendChild(H.parentElement===W?H:H.closest(`${Bo} > *`))}),A.sort((H,U)=>U[1]-H[1]).forEach(H=>{var U;let j=(U=C.current)==null?void 0:U.querySelector(`${Ln}[${fn}="${encodeURIComponent(H[0])}"]`);j==null||j.parentElement.appendChild(j)})}function F(){let T=_().find(W=>W.getAttribute("aria-disabled")!=="true"),A=T==null?void 0:T.getAttribute(fn);M.setState("value",A||void 0)}function V(){var T,A,W,H;if(!n.current.search||i.current.shouldFilter===!1){n.current.filtered.count=r.current.size;return}n.current.filtered.groups=new Set;let U=0;for(let j of r.current){let Z=(A=(T=a.current.get(j))==null?void 0:T.value)!=null?A:"",X=(H=(W=a.current.get(j))==null?void 0:W.keywords)!=null?H:[],Q=L(Z,X);n.current.filtered.items.set(j,Q),Q>0&&U++}for(let[j,Z]of o.current)for(let X of Z)if(n.current.filtered.items.get(X)>0){n.current.filtered.groups.add(j);break}n.current.filtered.count=U}function $(){var T,A,W;let H=I();H&&(((T=H.parentElement)==null?void 0:T.firstChild)===H&&((W=(A=H.closest(Ln))==null?void 0:A.querySelector(i0))==null||W.scrollIntoView({block:"nearest"})),H.scrollIntoView({block:"nearest"}))}function I(){var T;return(T=C.current)==null?void 0:T.querySelector(`${yu}[aria-selected="true"]`)}function _(){var T;return Array.from(((T=C.current)==null?void 0:T.querySelectorAll(di))||[])}function R(T){let A=_()[T];A&&M.setState("value",A.getAttribute(fn))}function P(T){var A;let W=I(),H=_(),U=H.findIndex(Z=>Z===W),j=H[U+T];(A=i.current)!=null&&A.loop&&(j=U+T<0?H[H.length-1]:U+T===H.length?H[0]:H[U+T]),j&&M.setState("value",j.getAttribute(fn))}function E(T){let A=I(),W=A==null?void 0:A.closest(Ln),H;for(;W&&!H;)W=T>0?v0(W,Ln):y0(W,Ln),H=W==null?void 0:W.querySelector(di);H?M.setState("value",H.getAttribute(fn)):P(T)}let O=()=>R(_().length-1),Y=T=>{T.preventDefault(),T.metaKey?O():T.altKey?E(1):P(1)},G=T=>{T.preventDefault(),T.metaKey?R(0):T.altKey?E(-1):P(-1)};return f.createElement(te.div,{ref:t,tabIndex:-1,...w,"cmdk-root":"",onKeyDown:T=>{var A;(A=w.onKeyDown)==null||A.call(w,T);let W=T.nativeEvent.isComposing||T.keyCode===229;if(!(T.defaultPrevented||W))switch(T.key){case"n":case"j":{v&&T.ctrlKey&&Y(T);break}case"ArrowDown":{Y(T);break}case"p":case"k":{v&&T.ctrlKey&&G(T);break}case"ArrowUp":{G(T);break}case"Home":{T.preventDefault(),R(0);break}case"End":{T.preventDefault(),O();break}case"Enter":{T.preventDefault();let H=I();if(H){let U=new Event(pa);H.dispatchEvent(U)}}}}},f.createElement("label",{"cmdk-label":"",htmlFor:D.inputId,id:D.labelId,style:x0},l),mo(e,T=>f.createElement(wu.Provider,{value:M},f.createElement(bu.Provider,{value:D},T))))}),l0=f.forwardRef((e,t)=>{var n,r;let o=ke(),a=f.useRef(null),s=f.useContext(xu),i=dr(),l=Cu(e),u=(r=(n=l.current)==null?void 0:n.forceMount)!=null?r:s==null?void 0:s.forceMount;Jt(()=>{if(!u)return i.item(o,s==null?void 0:s.id)},[u]);let m=Mu(o,a,[e.value,e.children,a],e.keywords),c=Xa(),p=jt(N=>N.value&&N.value===m.current),h=jt(N=>u||i.filter()===!1?!0:N.search?N.filtered.items.get(o)>0:!0);f.useEffect(()=>{let N=a.current;if(!(!N||e.disabled))return N.addEventListener(pa,y),()=>N.removeEventListener(pa,y)},[h,e.onSelect,e.disabled]);function y(){var N,M;g(),(M=(N=l.current).onSelect)==null||M.call(N,m.current)}function g(){c.setState("value",m.current,!0)}if(!h)return null;let{disabled:v,value:w,onSelect:x,forceMount:S,keywords:k,...C}=e;return f.createElement(te.div,{ref:Ct(a,t),...C,id:o,"cmdk-item":"",role:"option","aria-disabled":!!v,"aria-selected":!!p,"data-disabled":!!v,"data-selected":!!p,onPointerMove:v||i.getDisablePointerSelection()?void 0:g,onClick:v?void 0:y},e.children)}),u0=f.forwardRef((e,t)=>{let{heading:n,children:r,forceMount:o,...a}=e,s=ke(),i=f.useRef(null),l=f.useRef(null),u=ke(),m=dr(),c=jt(h=>o||m.filter()===!1?!0:h.search?h.filtered.groups.has(s):!0);Jt(()=>m.group(s),[]),Mu(s,i,[e.value,e.heading,l]);let p=f.useMemo(()=>({id:s,forceMount:o}),[o]);return f.createElement(te.div,{ref:Ct(i,t),...a,"cmdk-group":"",role:"presentation",hidden:c?void 0:!0},n&&f.createElement("div",{ref:l,"cmdk-group-heading":"","aria-hidden":!0,id:u},n),mo(e,h=>f.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?u:void 0},f.createElement(xu.Provider,{value:p},h))))}),d0=f.forwardRef((e,t)=>{let{alwaysRender:n,...r}=e,o=f.useRef(null),a=jt(s=>!s.search);return!n&&!a?null:f.createElement(te.div,{ref:Ct(o,t),...r,"cmdk-separator":"",role:"separator"})}),f0=f.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,o=e.value!=null,a=Xa(),s=jt(u=>u.search),i=jt(u=>u.selectedItemId),l=dr();return f.useEffect(()=>{e.value!=null&&a.setState("search",e.value)},[e.value]),f.createElement(te.input,{ref:t,...r,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":l.listId,"aria-labelledby":l.labelId,"aria-activedescendant":i,id:l.inputId,type:"text",value:o?e.value:s,onChange:u=>{o||a.setState("search",u.target.value),n==null||n(u.target.value)}})}),m0=f.forwardRef((e,t)=>{let{children:n,label:r="Suggestions",...o}=e,a=f.useRef(null),s=f.useRef(null),i=jt(u=>u.selectedItemId),l=dr();return f.useEffect(()=>{if(s.current&&a.current){let u=s.current,m=a.current,c,p=new ResizeObserver(()=>{c=requestAnimationFrame(()=>{let h=u.offsetHeight;m.style.setProperty("--cmdk-list-height",h.toFixed(1)+"px")})});return p.observe(u),()=>{cancelAnimationFrame(c),p.unobserve(u)}}},[]),f.createElement(te.div,{ref:Ct(a,t),...o,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":i,"aria-label":r,id:l.listId},mo(e,u=>f.createElement("div",{ref:Ct(s,l.listInnerRef),"cmdk-list-sizer":""},u)))}),p0=f.forwardRef((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:o,contentClassName:a,container:s,...i}=e;return f.createElement(Ga,{open:n,onOpenChange:r},f.createElement(Ua,{container:s},f.createElement(uo,{"cmdk-overlay":"",className:o}),f.createElement(fo,{"aria-label":e.label,"cmdk-dialog":"",className:a},f.createElement(Su,{ref:t,...i}))))}),h0=f.forwardRef((e,t)=>jt(n=>n.filtered.count===0)?f.createElement(te.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),g0=f.forwardRef((e,t)=>{let{progress:n,children:r,label:o="Loading...",...a}=e;return f.createElement(te.div,{ref:t,...a,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":o},mo(e,s=>f.createElement("div",{"aria-hidden":!0},s)))}),Ie=Object.assign(Su,{List:m0,Item:l0,Input:f0,Group:u0,Separator:d0,Dialog:p0,Empty:h0,Loading:g0});function v0(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function y0(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function Cu(e){let t=f.useRef(e);return Jt(()=>{t.current=e}),t}var Jt=typeof window>"u"?f.useEffect:f.useLayoutEffect;function mn(e){let t=f.useRef();return t.current===void 0&&(t.current=e()),t}function jt(e){let t=Xa(),n=()=>e(t.snapshot());return f.useSyncExternalStore(t.subscribe,n,n)}function Mu(e,t,n,r=[]){let o=f.useRef(),a=dr();return Jt(()=>{var s;let i=(()=>{var u;for(let m of n){if(typeof m=="string")return m.trim();if(typeof m=="object"&&"current"in m)return m.current?(u=m.current.textContent)==null?void 0:u.trim():o.current}})(),l=r.map(u=>u.trim());a.value(e,i,l),(s=t.current)==null||s.setAttribute(fn,i),o.current=i}),o}var b0=()=>{let[e,t]=f.useState(),n=mn(()=>new Map);return Jt(()=>{n.current.forEach(r=>r()),n.current=new Map},[e]),(r,o)=>{n.current.set(r,o),t({})}};function w0(e){let t=e.type;return typeof t=="function"?t(e.props):"render"in t?t.render(e.props):e}function mo({asChild:e,children:t},n){return e&&f.isValidElement(t)?f.cloneElement(w0(t),{ref:t.ref},n(t.props.children)):n(t)}var x0={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};const S0=Ga,C0=vu,M0=Ua,E0=Ka,Eu=f.forwardRef(({className:e,...t},n)=>d.jsx(uo,{ref:n,className:q("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));Eu.displayName=uo.displayName;const ku=f.forwardRef(({className:e,children:t,...n},r)=>d.jsxs(M0,{children:[d.jsx(Eu,{}),d.jsxs(fo,{ref:r,className:q("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...n,children:[t,d.jsxs(Ka,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[d.jsx(En,{className:"h-4 w-4"}),d.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));ku.displayName=fo.displayName;const Nu=({className:e,...t})=>d.jsx("div",{className:q("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});Nu.displayName="DialogHeader";const Du=({className:e,...t})=>d.jsx("div",{className:q("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Du.displayName="DialogFooter";const Ru=f.forwardRef(({className:e,...t},n)=>d.jsx(qa,{ref:n,className:q("text-lg font-semibold leading-none tracking-tight",e),...t}));Ru.displayName=qa.displayName;const Tu=f.forwardRef(({className:e,...t},n)=>d.jsx(Va,{ref:n,className:q("text-sm text-muted-foreground",e),...t}));Tu.displayName=Va.displayName;const k0=f.forwardRef(({className:e,...t},n)=>d.jsx(Ie,{ref:n,className:q("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...t}));k0.displayName=Ie.displayName;const Ou=f.forwardRef(({className:e,...t},n)=>d.jsxs("div",{className:"flex items-center h-auto px-3","cmdk-input-wrapper":"",children:[d.jsx(Ui,{strokeWidth:1.25,className:"mr-2 h-4 w-4 shrink-0"}),d.jsx(Ie.Input,{ref:n,className:q("flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-gray-400 disabled:cursor-not-allowed disabled:opacity-50",e),...t})]}));Ou.displayName=Ie.Input.displayName;const _u=f.forwardRef(({className:e,...t},n)=>d.jsx(Ie.List,{ref:n,className:q("max-h-[300px] overflow-y-auto overflow-x-hidden",e),...t}));_u.displayName=Ie.List.displayName;const N0=f.forwardRef((e,t)=>d.jsx(Ie.Empty,{ref:t,className:"py-6 text-center text-sm",...e}));N0.displayName=Ie.Empty.displayName;const Pu=f.forwardRef(({className:e,...t},n)=>d.jsx(Ie.Group,{ref:n,className:q("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",e),...t}));Pu.displayName=Ie.Group.displayName;const D0=f.forwardRef(({className:e,...t},n)=>d.jsx(Ie.Separator,{ref:n,className:q("-mx-1 h-px bg-border",e),...t}));D0.displayName=Ie.Separator.displayName;const Au=f.forwardRef(({className:e,...t},n)=>d.jsx(Ie.Item,{ref:n,className:q("relative flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected='true']:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",e),...t}));Au.displayName=Ie.Item.displayName;function R0({className:e,...t}){return d.jsx("div",{className:q("animate-pulse rounded-md bg-muted",e),...t})}function T0(e="medium",t="white"){const n={small:"text-sm py-1 px-2 h-8",medium:"text-base py-2 px-3 h-10",large:"text-lg py-3 px-4 h-12"},r={white:"bg-background text-foreground border-border",grey:"bg-muted text-muted-foreground border-border"};return{sizeClasses:n[e],variantClasses:r[t],combined:`${n[e]} ${r[t]}`}}const O0=({options:e,placeholder:t,emptyMessage:n,value:r,onValueChange:o,disabled:a,isLoading:s=!1,className:i,size:l,variant:u})=>{const{variantClasses:m,combined:c}=T0(l,u),p=b.useRef(null),[h,y]=b.useState(!1),[g,v]=b.useState(r),[w,x]=b.useState((r==null?void 0:r.label)||""),S=b.useCallback(N=>{const M=p.current;if(M){if(h||y(!0),N.key==="Enter"&&M.value!==""){const D=e.find(L=>L.label===M.value);D&&(v(D),o==null||o(D))}N.key==="Escape"&&M.blur()}},[h,e,o]),k=b.useCallback(()=>{y(!1),x((g==null?void 0:g.label)||"")},[g]),C=b.useCallback(N=>{x(N.label),v(N),o==null||o(N),setTimeout(()=>{var M;(M=p==null?void 0:p.current)==null||M.blur()},0)},[o]);return d.jsxs(Ie,{onKeyDown:S,children:[d.jsxs("div",{className:q("rounded-full border bg-gray-100",m,i),children:[" ",d.jsx(Ou,{ref:p,value:w,onValueChange:s?void 0:x,onBlur:k,onFocus:()=>y(!0),placeholder:t,disabled:a,className:c})]}),d.jsx("div",{className:"relative mt-1",children:d.jsx("div",{className:q("animate-in fade-in-0 zoom-in-95 absolute top-0 z-10 w-full rounded-xl bg-white dark:bg-gray-800 outline-none",h?"block":"hidden",i),children:d.jsxs(_u,{className:"rounded-lg ring-1 ring-slate-200 dark:ring-gray-700",children:[s?d.jsx(Ie.Loading,{children:d.jsx("div",{className:"p-1",children:d.jsx(R0,{className:"h-8 w-full"})})}):null,e.length>0&&!s?d.jsx(Pu,{children:e.map(N=>{const M=(g==null?void 0:g.value)===N.value;return d.jsxs(Au,{value:N.label,onMouseDown:D=>{D.preventDefault(),D.stopPropagation()},onSelect:()=>C(N),className:q("flex w-full items-center gap-2 dark:text-white",M?null:"pl-8"),children:[M?d.jsx(Jn,{className:"w-4"}):null,N.label]},N.value)})}):null,s?null:d.jsx(Ie.Empty,{className:"select-none rounded-sm px-2 py-3 text-center text-sm dark:text-gray-400",children:n})]})})})]})};function _0({title:e,children:t,className:n}){return d.jsxs("section",{className:q("space-y-6",n),children:[d.jsx("div",{className:"border-b border-gray-200 pb-3",children:d.jsx("h2",{className:"text-sm font-semibold text-gray-900 tracking-wide uppercase",children:e})}),t]})}const Iu=b.forwardRef(({className:e,label:t,helperText:n,error:r,startAdornment:o,endAdornment:a,required:s,id:i,onInput:l,...u},m)=>{const c=!!r,p=i||`currency-input-${Math.random().toString(36).substr(2,9)}`,h=y=>{var x;const g=y.currentTarget;let v=g.value;v=v.replace(/[^0-9.]/g,"");const w=v.split(".");w.length>2&&(v=w[0]+"."+w.slice(1).join("")),((x=w[1])==null?void 0:x.length)>2&&(v=w[0]+"."+w[1].substring(0,2)),g.value=v,l&&l(y)};return d.jsxs("div",{className:"flex flex-col space-y-1",children:[t&&d.jsxs("label",{htmlFor:p,className:"text-sm font-medium text-gray-700",children:[t,s&&d.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),d.jsxs("div",{className:q("flex items-center h-10 w-full rounded-md border bg-background text-sm ring-offset-background disabled:cursor-not-allowed disabled:opacity-50",c?"border-red-500 focus-within:ring-red-500":"border-input focus-within:ring-primary",e),children:[o&&d.jsx("span",{className:"px-3 text-sm text-muted-foreground",children:o}),d.jsx("input",{id:p,type:"text",inputMode:"decimal",pattern:"^\\d+(\\.\\d{0,2})?$",className:q("flex-1 px-3 py-2 rounded-md placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-offset-2 disabled:opacity-50",c?"focus:ring-red-500":"focus:ring-primary"),ref:m,onInput:h,...u}),a&&d.jsx("span",{className:"px-3 text-sm text-muted-foreground",children:a})]}),(n||r)&&d.jsx("span",{className:q("text-xs",c?"text-red-500":"text-muted-foreground"),children:r||n})]})});Iu.displayName="CurrencyInput";const ju=b.memo(({className:e="",variant:t="default",children:n,...r})=>{const o={default:"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"text-foreground border-border bg-background hover:bg-accent hover:text-accent-foreground"};return d.jsx("div",{className:`inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 ${o[t]} ${e}`,...r,children:n})});ju.displayName="Badge";const P0={small:"h-8 text-xs px-2",medium:"h-10 text-sm px-3",large:"h-12 text-base px-4"},A0={outlined:"border border-input",filled:"border-0 bg-accent",standard:"border-0 border-b border-input rounded-none"},I0=e=>typeof e=="string"?e:(e==null?void 0:e.label)||"",j0=e=>typeof e=="string"?e:(e==null?void 0:e.value)||e,$0=(e,t,n)=>n(e)===n(t),L0=(e,t,n)=>{if(!t)return e;const r=t.toLowerCase();return e.filter(o=>n(o).toLowerCase().includes(r))},$u=e=>{const{option:t,index:n,isSelected:r,isHighlighted:o,onSelect:a,getOptionLabel:s,renderOption:i}=e,l=b.useCallback(()=>{a(t)},[t,a]);return d.jsx("div",{onClick:l,className:`
162
+ For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return f.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},R0="DialogDescriptionWarning",T0=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Ru(R0).contentName}}.`;return f.useEffect(()=>{var a;const o=(a=e.current)==null?void 0:a.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},Ja=hu,Tu=vu,es=bu,ho=wu,go=xu,ts=Cu,ns=Du,rs=Eu,Fn='[cmdk-group=""]',Go='[cmdk-group-items=""]',_0='[cmdk-group-heading=""]',_u='[cmdk-item=""]',Si=`${_u}:not([aria-disabled="true"])`,ya="cmdk-item-select",hn="data-value",O0=(e,t,n)=>x0(e,t,n),Ou=f.createContext(void 0),pr=()=>f.useContext(Ou),Pu=f.createContext(void 0),os=()=>f.useContext(Pu),Au=f.createContext(void 0),Iu=f.forwardRef((e,t)=>{let n=gn(()=>{var O,j;return{search:"",value:(j=(O=e.value)!=null?O:e.defaultValue)!=null?j:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),r=gn(()=>new Set),o=gn(()=>new Map),a=gn(()=>new Map),s=gn(()=>new Set),i=ju(e),{label:l,children:u,value:m,onValueChange:c,filter:p,shouldFilter:h,loop:y,disablePointerSelection:v=!1,vimBindings:g=!0,...b}=e,w=ke(),S=ke(),D=ke(),C=f.useRef(null),R=H0();nn(()=>{if(m!==void 0){let O=m.trim();n.current.value=O,M.emit()}},[m]),nn(()=>{R(6,A)},[]);let M=f.useMemo(()=>({subscribe:O=>(s.current.add(O),()=>s.current.delete(O)),snapshot:()=>n.current,setState:(O,j,Y)=>{var G,V,W,Z;if(!Object.is(n.current[O],j)){if(n.current[O]=j,O==="search")q(),B(),R(1,L);else if(O==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let X=document.getElementById(D);X?X.focus():(G=document.getElementById(w))==null||G.focus()}if(R(7,()=>{var X;n.current.selectedItemId=(X=T())==null?void 0:X.id,M.emit()}),Y||R(5,A),((V=i.current)==null?void 0:V.value)!==void 0){let X=j??"";(Z=(W=i.current).onValueChange)==null||Z.call(W,X);return}}M.emit()}},emit:()=>{s.current.forEach(O=>O())}}),[]),E=f.useMemo(()=>({value:(O,j,Y)=>{var G;j!==((G=a.current.get(O))==null?void 0:G.value)&&(a.current.set(O,{value:j,keywords:Y}),n.current.filtered.items.set(O,$(j,Y)),R(2,()=>{B(),M.emit()}))},item:(O,j)=>(r.current.add(O),j&&(o.current.has(j)?o.current.get(j).add(O):o.current.set(j,new Set([O]))),R(3,()=>{q(),B(),n.current.value||L(),M.emit()}),()=>{a.current.delete(O),r.current.delete(O),n.current.filtered.items.delete(O);let Y=T();R(4,()=>{q(),(Y==null?void 0:Y.getAttribute("id"))===O&&L(),M.emit()})}),group:O=>(o.current.has(O)||o.current.set(O,new Set),()=>{a.current.delete(O),o.current.delete(O)}),filter:()=>i.current.shouldFilter,label:l||e["aria-label"],getDisablePointerSelection:()=>i.current.disablePointerSelection,listId:w,inputId:D,labelId:S,listInnerRef:C}),[]);function $(O,j){var Y,G;let V=(G=(Y=i.current)==null?void 0:Y.filter)!=null?G:O0;return O?V(O,n.current.search,j):0}function B(){if(!n.current.search||i.current.shouldFilter===!1)return;let O=n.current.filtered.items,j=[];n.current.filtered.groups.forEach(G=>{let V=o.current.get(G),W=0;V.forEach(Z=>{let X=O.get(Z);W=Math.max(X,W)}),j.push([G,W])});let Y=C.current;_().sort((G,V)=>{var W,Z;let X=G.getAttribute("id"),Q=V.getAttribute("id");return((W=O.get(Q))!=null?W:0)-((Z=O.get(X))!=null?Z:0)}).forEach(G=>{let V=G.closest(Go);V?V.appendChild(G.parentElement===V?G:G.closest(`${Go} > *`)):Y.appendChild(G.parentElement===Y?G:G.closest(`${Go} > *`))}),j.sort((G,V)=>V[1]-G[1]).forEach(G=>{var V;let W=(V=C.current)==null?void 0:V.querySelector(`${Fn}[${hn}="${encodeURIComponent(G[0])}"]`);W==null||W.parentElement.appendChild(W)})}function L(){let O=_().find(Y=>Y.getAttribute("aria-disabled")!=="true"),j=O==null?void 0:O.getAttribute(hn);M.setState("value",j||void 0)}function q(){var O,j,Y,G;if(!n.current.search||i.current.shouldFilter===!1){n.current.filtered.count=r.current.size;return}n.current.filtered.groups=new Set;let V=0;for(let W of r.current){let Z=(j=(O=a.current.get(W))==null?void 0:O.value)!=null?j:"",X=(G=(Y=a.current.get(W))==null?void 0:Y.keywords)!=null?G:[],Q=$(Z,X);n.current.filtered.items.set(W,Q),Q>0&&V++}for(let[W,Z]of o.current)for(let X of Z)if(n.current.filtered.items.get(X)>0){n.current.filtered.groups.add(W);break}n.current.filtered.count=V}function A(){var O,j,Y;let G=T();G&&(((O=G.parentElement)==null?void 0:O.firstChild)===G&&((Y=(j=G.closest(Fn))==null?void 0:j.querySelector(_0))==null||Y.scrollIntoView({block:"nearest"})),G.scrollIntoView({block:"nearest"}))}function T(){var O;return(O=C.current)==null?void 0:O.querySelector(`${_u}[aria-selected="true"]`)}function _(){var O;return Array.from(((O=C.current)==null?void 0:O.querySelectorAll(Si))||[])}function N(O){let j=_()[O];j&&M.setState("value",j.getAttribute(hn))}function I(O){var j;let Y=T(),G=_(),V=G.findIndex(Z=>Z===Y),W=G[V+O];(j=i.current)!=null&&j.loop&&(W=V+O<0?G[G.length-1]:V+O===G.length?G[0]:G[V+O]),W&&M.setState("value",W.getAttribute(hn))}function k(O){let j=T(),Y=j==null?void 0:j.closest(Fn),G;for(;Y&&!G;)Y=O>0?B0(Y,Fn):Y0(Y,Fn),G=Y==null?void 0:Y.querySelector(Si);G?M.setState("value",G.getAttribute(hn)):I(O)}let P=()=>N(_().length-1),H=O=>{O.preventDefault(),O.metaKey?P():O.altKey?k(1):I(1)},z=O=>{O.preventDefault(),O.metaKey?N(0):O.altKey?k(-1):I(-1)};return f.createElement(ee.div,{ref:t,tabIndex:-1,...b,"cmdk-root":"",onKeyDown:O=>{var j;(j=b.onKeyDown)==null||j.call(b,O);let Y=O.nativeEvent.isComposing||O.keyCode===229;if(!(O.defaultPrevented||Y))switch(O.key){case"n":case"j":{g&&O.ctrlKey&&H(O);break}case"ArrowDown":{H(O);break}case"p":case"k":{g&&O.ctrlKey&&z(O);break}case"ArrowUp":{z(O);break}case"Home":{O.preventDefault(),N(0);break}case"End":{O.preventDefault(),P();break}case"Enter":{O.preventDefault();let G=T();if(G){let V=new Event(ya);G.dispatchEvent(V)}}}}},f.createElement("label",{"cmdk-label":"",htmlFor:E.inputId,id:E.labelId,style:G0},l),vo(e,O=>f.createElement(Pu.Provider,{value:M},f.createElement(Ou.Provider,{value:E},O))))}),P0=f.forwardRef((e,t)=>{var n,r;let o=ke(),a=f.useRef(null),s=f.useContext(Au),i=pr(),l=ju(e),u=(r=(n=l.current)==null?void 0:n.forceMount)!=null?r:s==null?void 0:s.forceMount;nn(()=>{if(!u)return i.item(o,s==null?void 0:s.id)},[u]);let m=$u(o,a,[e.value,e.children,a],e.keywords),c=os(),p=$t(R=>R.value&&R.value===m.current),h=$t(R=>u||i.filter()===!1?!0:R.search?R.filtered.items.get(o)>0:!0);f.useEffect(()=>{let R=a.current;if(!(!R||e.disabled))return R.addEventListener(ya,y),()=>R.removeEventListener(ya,y)},[h,e.onSelect,e.disabled]);function y(){var R,M;v(),(M=(R=l.current).onSelect)==null||M.call(R,m.current)}function v(){c.setState("value",m.current,!0)}if(!h)return null;let{disabled:g,value:b,onSelect:w,forceMount:S,keywords:D,...C}=e;return f.createElement(ee.div,{ref:Mt(a,t),...C,id:o,"cmdk-item":"",role:"option","aria-disabled":!!g,"aria-selected":!!p,"data-disabled":!!g,"data-selected":!!p,onPointerMove:g||i.getDisablePointerSelection()?void 0:v,onClick:g?void 0:y},e.children)}),A0=f.forwardRef((e,t)=>{let{heading:n,children:r,forceMount:o,...a}=e,s=ke(),i=f.useRef(null),l=f.useRef(null),u=ke(),m=pr(),c=$t(h=>o||m.filter()===!1?!0:h.search?h.filtered.groups.has(s):!0);nn(()=>m.group(s),[]),$u(s,i,[e.value,e.heading,l]);let p=f.useMemo(()=>({id:s,forceMount:o}),[o]);return f.createElement(ee.div,{ref:Mt(i,t),...a,"cmdk-group":"",role:"presentation",hidden:c?void 0:!0},n&&f.createElement("div",{ref:l,"cmdk-group-heading":"","aria-hidden":!0,id:u},n),vo(e,h=>f.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?u:void 0},f.createElement(Au.Provider,{value:p},h))))}),I0=f.forwardRef((e,t)=>{let{alwaysRender:n,...r}=e,o=f.useRef(null),a=$t(s=>!s.search);return!n&&!a?null:f.createElement(ee.div,{ref:Mt(o,t),...r,"cmdk-separator":"",role:"separator"})}),j0=f.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,o=e.value!=null,a=os(),s=$t(u=>u.search),i=$t(u=>u.selectedItemId),l=pr();return f.useEffect(()=>{e.value!=null&&a.setState("search",e.value)},[e.value]),f.createElement(ee.input,{ref:t,...r,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":l.listId,"aria-labelledby":l.labelId,"aria-activedescendant":i,id:l.inputId,type:"text",value:o?e.value:s,onChange:u=>{o||a.setState("search",u.target.value),n==null||n(u.target.value)}})}),$0=f.forwardRef((e,t)=>{let{children:n,label:r="Suggestions",...o}=e,a=f.useRef(null),s=f.useRef(null),i=$t(u=>u.selectedItemId),l=pr();return f.useEffect(()=>{if(s.current&&a.current){let u=s.current,m=a.current,c,p=new ResizeObserver(()=>{c=requestAnimationFrame(()=>{let h=u.offsetHeight;m.style.setProperty("--cmdk-list-height",h.toFixed(1)+"px")})});return p.observe(u),()=>{cancelAnimationFrame(c),p.unobserve(u)}}},[]),f.createElement(ee.div,{ref:Mt(a,t),...o,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":i,"aria-label":r,id:l.listId},vo(e,u=>f.createElement("div",{ref:Mt(s,l.listInnerRef),"cmdk-list-sizer":""},u)))}),L0=f.forwardRef((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:o,contentClassName:a,container:s,...i}=e;return f.createElement(Ja,{open:n,onOpenChange:r},f.createElement(es,{container:s},f.createElement(ho,{"cmdk-overlay":"",className:o}),f.createElement(go,{"aria-label":e.label,"cmdk-dialog":"",className:a},f.createElement(Iu,{ref:t,...i}))))}),F0=f.forwardRef((e,t)=>$t(n=>n.filtered.count===0)?f.createElement(ee.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),W0=f.forwardRef((e,t)=>{let{progress:n,children:r,label:o="Loading...",...a}=e;return f.createElement(ee.div,{ref:t,...a,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":o},vo(e,s=>f.createElement("div",{"aria-hidden":!0},s)))}),Le=Object.assign(Iu,{List:$0,Item:P0,Input:j0,Group:A0,Separator:I0,Dialog:L0,Empty:F0,Loading:W0});function B0(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function Y0(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function ju(e){let t=f.useRef(e);return nn(()=>{t.current=e}),t}var nn=typeof window>"u"?f.useEffect:f.useLayoutEffect;function gn(e){let t=f.useRef();return t.current===void 0&&(t.current=e()),t}function $t(e){let t=os(),n=()=>e(t.snapshot());return f.useSyncExternalStore(t.subscribe,n,n)}function $u(e,t,n,r=[]){let o=f.useRef(),a=pr();return nn(()=>{var s;let i=(()=>{var u;for(let m of n){if(typeof m=="string")return m.trim();if(typeof m=="object"&&"current"in m)return m.current?(u=m.current.textContent)==null?void 0:u.trim():o.current}})(),l=r.map(u=>u.trim());a.value(e,i,l),(s=t.current)==null||s.setAttribute(hn,i),o.current=i}),o}var H0=()=>{let[e,t]=f.useState(),n=gn(()=>new Map);return nn(()=>{n.current.forEach(r=>r()),n.current=new Map},[e]),(r,o)=>{n.current.set(r,o),t({})}};function z0(e){let t=e.type;return typeof t=="function"?t(e.props):"render"in t?t.render(e.props):e}function vo({asChild:e,children:t},n){return e&&f.isValidElement(t)?f.cloneElement(z0(t),{ref:t.ref},n(t.props.children)):n(t)}var G0={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};const U0=Ja,q0=Tu,V0=es,K0=rs,Lu=f.forwardRef(({className:e,...t},n)=>d.jsx(ho,{ref:n,className:F("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));Lu.displayName=ho.displayName;const Fu=f.forwardRef(({className:e,children:t,...n},r)=>d.jsxs(V0,{children:[d.jsx(Lu,{}),d.jsxs(go,{ref:r,className:F("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...n,children:[t,d.jsxs(rs,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[d.jsx(kn,{className:"h-4 w-4"}),d.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Fu.displayName=go.displayName;const Wu=({className:e,...t})=>d.jsx("div",{className:F("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});Wu.displayName="DialogHeader";const Bu=({className:e,...t})=>d.jsx("div",{className:F("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Bu.displayName="DialogFooter";const Yu=f.forwardRef(({className:e,...t},n)=>d.jsx(ts,{ref:n,className:F("text-lg font-semibold leading-none tracking-tight",e),...t}));Yu.displayName=ts.displayName;const Hu=f.forwardRef(({className:e,...t},n)=>d.jsx(ns,{ref:n,className:F("text-sm text-muted-foreground",e),...t}));Hu.displayName=ns.displayName;const X0=f.forwardRef(({className:e,...t},n)=>d.jsx(Le,{ref:n,className:F("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...t}));X0.displayName=Le.displayName;const zu=f.forwardRef(({className:e,...t},n)=>d.jsxs("div",{className:"flex items-center h-auto px-3","cmdk-input-wrapper":"",children:[d.jsx(sc,{strokeWidth:1.25,className:"mr-2 h-4 w-4 shrink-0"}),d.jsx(Le.Input,{ref:n,className:F("flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-gray-400 disabled:cursor-not-allowed disabled:opacity-50",e),...t})]}));zu.displayName=Le.Input.displayName;const Gu=f.forwardRef(({className:e,...t},n)=>d.jsx(Le.List,{ref:n,className:F("max-h-[300px] overflow-y-auto overflow-x-hidden",e),...t}));Gu.displayName=Le.List.displayName;const Z0=f.forwardRef((e,t)=>d.jsx(Le.Empty,{ref:t,className:"py-6 text-center text-sm",...e}));Z0.displayName=Le.Empty.displayName;const Uu=f.forwardRef(({className:e,...t},n)=>d.jsx(Le.Group,{ref:n,className:F("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",e),...t}));Uu.displayName=Le.Group.displayName;const Q0=f.forwardRef(({className:e,...t},n)=>d.jsx(Le.Separator,{ref:n,className:F("-mx-1 h-px bg-border",e),...t}));Q0.displayName=Le.Separator.displayName;const qu=f.forwardRef(({className:e,...t},n)=>d.jsx(Le.Item,{ref:n,className:F("relative flex cursor-default gap-2 select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none data-[disabled=true]:pointer-events-none data-[selected='true']:bg-accent data-[selected=true]:text-accent-foreground data-[disabled=true]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",e),...t}));qu.displayName=Le.Item.displayName;function J0({className:e,...t}){return d.jsx("div",{className:F("animate-pulse rounded-md bg-muted",e),...t})}function e1(e="medium",t="white"){const n={small:"text-sm py-1 px-2 h-8",medium:"text-base py-2 px-3 h-10",large:"text-lg py-3 px-4 h-12"},r={white:"bg-background text-foreground border-border",grey:"bg-muted text-muted-foreground border-border"};return{sizeClasses:n[e],variantClasses:r[t],combined:`${n[e]} ${r[t]}`}}const t1=({options:e,placeholder:t,emptyMessage:n,value:r,onValueChange:o,disabled:a,isLoading:s=!1,className:i,size:l,variant:u})=>{const{variantClasses:m,combined:c}=e1(l,u),p=x.useRef(null),[h,y]=x.useState(!1),[v,g]=x.useState(r),[b,w]=x.useState((r==null?void 0:r.label)||""),S=x.useCallback(R=>{const M=p.current;if(M){if(h||y(!0),R.key==="Enter"&&M.value!==""){const E=e.find($=>$.label===M.value);E&&(g(E),o==null||o(E))}R.key==="Escape"&&M.blur()}},[h,e,o]),D=x.useCallback(()=>{y(!1),w((v==null?void 0:v.label)||"")},[v]),C=x.useCallback(R=>{w(R.label),g(R),o==null||o(R),setTimeout(()=>{var M;(M=p==null?void 0:p.current)==null||M.blur()},0)},[o]);return d.jsxs(Le,{onKeyDown:S,children:[d.jsxs("div",{className:F("rounded-full border bg-gray-100",m,i),children:[" ",d.jsx(zu,{ref:p,value:b,onValueChange:s?void 0:w,onBlur:D,onFocus:()=>y(!0),placeholder:t,disabled:a,className:c})]}),d.jsx("div",{className:"relative mt-1",children:d.jsx("div",{className:F("animate-in fade-in-0 zoom-in-95 absolute top-0 z-10 w-full rounded-xl bg-white dark:bg-gray-800 outline-none",h?"block":"hidden",i),children:d.jsxs(Gu,{className:"rounded-lg ring-1 ring-slate-200 dark:ring-gray-700",children:[s?d.jsx(Le.Loading,{children:d.jsx("div",{className:"p-1",children:d.jsx(J0,{className:"h-8 w-full"})})}):null,e.length>0&&!s?d.jsx(Uu,{children:e.map(R=>{const M=(v==null?void 0:v.value)===R.value;return d.jsxs(qu,{value:R.label,onMouseDown:E=>{E.preventDefault(),E.stopPropagation()},onSelect:()=>C(R),className:F("flex w-full items-center gap-2 dark:text-white",M?null:"pl-8"),children:[M?d.jsx(tr,{className:"w-4"}):null,R.label]},R.value)})}):null,s?null:d.jsx(Le.Empty,{className:"select-none rounded-sm px-2 py-3 text-center text-sm dark:text-gray-400",children:n})]})})})]})},n1=er("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function r1({className:e,variant:t,...n}){return d.jsx("div",{className:F(n1({variant:t}),e),...n})}function o1({title:e,children:t,className:n}){return d.jsxs("section",{className:F("space-y-6",n),children:[d.jsx("div",{className:"border-b border-gray-200 pb-3",children:d.jsx("h2",{className:"text-sm font-semibold text-gray-900 tracking-wide uppercase",children:e})}),t]})}function a1({title:e,variant:t="primary",children:n,className:r}){return d.jsxs("div",{className:F("space-y-4",r),children:[d.jsx(r1,{variant:t==="primary"?"default":"secondary",className:F(t==="primary"&&"bg-black text-white hover:bg-black/90"),children:e}),n]})}const Vu=x.forwardRef(({className:e,label:t,helperText:n,error:r,startAdornment:o,endAdornment:a,required:s,id:i,onInput:l,...u},m)=>{const c=!!r,p=i||`currency-input-${Math.random().toString(36).substr(2,9)}`,h=y=>{var w;const v=y.currentTarget;let g=v.value;g=g.replace(/[^0-9.]/g,"");const b=g.split(".");b.length>2&&(g=b[0]+"."+b.slice(1).join("")),((w=b[1])==null?void 0:w.length)>2&&(g=b[0]+"."+b[1].substring(0,2)),v.value=g,l&&l(y)};return d.jsxs("div",{className:"flex flex-col space-y-1",children:[t&&d.jsxs("label",{htmlFor:p,className:"text-sm font-medium text-gray-700",children:[t,s&&d.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),d.jsxs("div",{className:F("flex items-center h-10 w-full rounded-md border bg-background text-sm ring-offset-background disabled:cursor-not-allowed disabled:opacity-50",c?"border-red-500 focus-within:ring-red-500":"border-input focus-within:ring-primary",e),children:[o&&d.jsx("span",{className:"px-3 text-sm text-muted-foreground",children:o}),d.jsx("input",{id:p,type:"text",inputMode:"decimal",pattern:"^\\d+(\\.\\d{0,2})?$",className:F("flex-1 px-3 py-2 rounded-md placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-offset-2 disabled:opacity-50",c?"focus:ring-red-500":"focus:ring-primary"),ref:m,onInput:h,...u}),a&&d.jsx("span",{className:"px-3 text-sm text-muted-foreground",children:a})]}),(n||r)&&d.jsx("span",{className:F("text-xs",c?"text-red-500":"text-muted-foreground"),children:r||n})]})});Vu.displayName="CurrencyInput";const Ku=x.memo(({className:e="",variant:t="default",children:n,...r})=>{const o={default:"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"text-foreground border-border bg-background hover:bg-accent hover:text-accent-foreground"};return d.jsx("div",{className:`inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 ${o[t]} ${e}`,...r,children:n})});Ku.displayName="Badge";const s1={small:"h-8 text-xs px-2",medium:"h-10 text-sm px-3",large:"h-12 text-base px-4"},i1={outlined:"border border-input",filled:"border-0 bg-accent",standard:"border-0 border-b border-input rounded-none"},c1=e=>typeof e=="string"?e:(e==null?void 0:e.label)||"",l1=e=>typeof e=="string"?e:(e==null?void 0:e.value)||e,u1=(e,t,n)=>n(e)===n(t),d1=(e,t,n)=>{if(!t)return e;const r=t.toLowerCase();return e.filter(o=>n(o).toLowerCase().includes(r))},Xu=e=>{const{option:t,index:n,isSelected:r,isHighlighted:o,onSelect:a,getOptionLabel:s,renderOption:i}=e,l=x.useCallback(()=>{a(t)},[t,a]);return d.jsx("div",{onClick:l,className:`
163
163
  px-3 py-2 cursor-pointer flex items-center justify-between
164
164
  text-sm transition-colors mb-[0.4vh]
165
165
  ${o?"bg-accent text-accent-foreground":""}
166
166
  ${r?"bg-primary/10":""}
167
167
  hover:bg-accent hover:text-accent-foreground
168
- `,children:i?i(t,n):d.jsxs(d.Fragment,{children:[d.jsx("span",{children:s(t)}),r&&d.jsx(Jn,{className:"h-4 w-4 text-primary"})]})})};$u.displayName="AutocompleteOption";const Lu=e=>{const{tag:t,index:n,getOptionLabel:r,onRemove:o}=e,a=b.useCallback(()=>{o(t)},[t,o]);return d.jsxs(ju,{variant:"secondary",className:"text-xs",children:[r(t),d.jsx("button",{type:"button",onClick:a,className:"ml-1 hover:bg-secondary-foreground/20 rounded-full p-0.5",children:d.jsx(En,{className:"h-3 w-3"})})]},n)};Lu.displayName="AutocompleteTag";const F0=({options:e=[],value:t=null,onChange:n,onInputChange:r,placeholder:o="Search...",multiple:a=!1,freeSolo:s=!1,disabled:i=!1,loading:l=!1,size:u="medium",variant:m="outlined",label:c="",helperText:p="",error:h,required:y=!1,fullWidth:g=!0,clearable:v=!0,disableCloseOnSelect:w=!1,filterOptions:x,getOptionLabel:S=I0,getOptionValue:k=j0,isOptionEqualToValue:C,renderOption:N,renderTags:M,noOptionsText:D="No options",emptyMessage:L,className:B="",popupClassName:F="",...V})=>{const[$,I]=b.useState(!1),[_,R]=b.useState(""),[P,E]=b.useState(-1),O=b.useRef(null),Y=b.useRef(null),G=b.useRef(null),T=b.useId(),A=b.useMemo(()=>C||((ie,pe)=>$0(ie,pe,k)),[C,k]),W=b.useMemo(()=>{let ie=e;return a&&Array.isArray(t)&&(ie=e.filter(pe=>!t.some(Se=>A(pe,Se)))),x?x(ie,{inputValue:_}):L0(ie,_,S)},[e,t,_,x,S,a,A]),H=b.useCallback(ie=>{const pe=ie.target.value;R(pe),r==null||r(ie,pe),!$&&pe&&I(!0)},[$,r]),U=b.useCallback(ie=>{if(a){const pe=Array.isArray(t)?t:[],Se=pe.some(Be=>A(ie,Be));let je;Se?je=pe.filter(Be=>!A(ie,Be)):je=[...pe,ie],n==null||n(null,je),R(""),setTimeout(()=>{var Be;(Be=O.current)==null||Be.focus(),I(!0)},0)}else n==null||n(null,ie),R(S(ie)),I(!1);E(-1)},[a,t,A,n,w,S]),j=b.useCallback(ie=>{if(a&&Array.isArray(t)){const pe=t.filter(Se=>!A(ie,Se));n==null||n(null,pe)}},[a,t,A,n]),Z=b.useCallback(ie=>{ie.stopPropagation(),n==null||n(null,a?[]:null),R(""),setTimeout(()=>{O.current&&(O.current.value="",O.current.focus())},0),I(!1)},[n,a]),X=b.useCallback(ie=>{if(!$&&(ie.key==="ArrowDown"||ie.key==="ArrowUp")){I(!0);return}if($)switch(ie.key){case"ArrowDown":ie.preventDefault(),E(pe=>pe<W.length-1?pe+1:0);break;case"ArrowUp":ie.preventDefault(),E(pe=>pe>0?pe-1:W.length-1);break;case"Enter":ie.preventDefault(),P>=0&&W[P]?U(W[P]):s&&_&&U(_);break;case"Escape":I(!1),E(-1);break;case"Tab":I(!1);break}},[$,W,P,U,s,_]),Q=b.useCallback(()=>{I(!$)},[$]),le=b.useCallback(()=>{I(!0)},[]);b.useEffect(()=>{const ie=pe=>{G.current&&!G.current.contains(pe.target)&&I(!1)};return document.addEventListener("mousedown",ie),()=>document.removeEventListener("mousedown",ie)},[]),b.useEffect(()=>{if($&&P>=0&&Y.current){const ie=Y.current.children[P];ie&&ie.scrollIntoView({block:"nearest"})}},[P,$]);const de=b.useMemo(()=>!a||!Array.isArray(t)||t.length===0?null:M?M(t,j):d.jsx("div",{className:"flex flex-wrap gap-1 mb-1",children:t.map((ie,pe)=>d.jsx(Lu,{tag:ie,index:pe,getOptionLabel:S,onRemove:j},pe))}),[a,t,M,j,S]),xe=b.useMemo(()=>a?Array.isArray(t)&&t.length>0:t!=null,[a,t]),re=v&&xe&&!i,ze=b.useMemo(()=>`
168
+ `,children:i?i(t,n):d.jsxs(d.Fragment,{children:[d.jsx("span",{children:s(t)}),r&&d.jsx(tr,{className:"h-4 w-4 text-primary"})]})})};Xu.displayName="AutocompleteOption";const Zu=e=>{const{tag:t,index:n,getOptionLabel:r,onRemove:o}=e,a=x.useCallback(()=>{o(t)},[t,o]);return d.jsxs(Ku,{variant:"secondary",className:"text-xs",children:[r(t),d.jsx("button",{type:"button",onClick:a,className:"ml-1 hover:bg-secondary-foreground/20 rounded-full p-0.5",children:d.jsx(kn,{className:"h-3 w-3"})})]},n)};Zu.displayName="AutocompleteTag";const f1=({options:e=[],value:t=null,onChange:n,onInputChange:r,placeholder:o="Search...",multiple:a=!1,freeSolo:s=!1,disabled:i=!1,loading:l=!1,size:u="medium",variant:m="outlined",label:c="",helperText:p="",error:h,required:y=!1,fullWidth:v=!0,clearable:g=!0,disableCloseOnSelect:b=!1,filterOptions:w,getOptionLabel:S=c1,getOptionValue:D=l1,isOptionEqualToValue:C,renderOption:R,renderTags:M,noOptionsText:E="No options",emptyMessage:$,className:B="",popupClassName:L="",...q})=>{const[A,T]=x.useState(!1),[_,N]=x.useState(""),[I,k]=x.useState(-1),P=x.useRef(null),H=x.useRef(null),z=x.useRef(null),O=x.useId(),j=x.useMemo(()=>C||((oe,me)=>u1(oe,me,D)),[C,D]),Y=x.useMemo(()=>{let oe=e;return a&&Array.isArray(t)&&(oe=e.filter(me=>!t.some(be=>j(me,be)))),w?w(oe,{inputValue:_}):d1(oe,_,S)},[e,t,_,w,S,a,j]),G=x.useCallback(oe=>{const me=oe.target.value;N(me),r==null||r(oe,me),!A&&me&&T(!0)},[A,r]),V=x.useCallback(oe=>{if(a){const me=Array.isArray(t)?t:[],be=me.some(He=>j(oe,He));let $e;be?$e=me.filter(He=>!j(oe,He)):$e=[...me,oe],n==null||n(null,$e),N(""),setTimeout(()=>{var He;(He=P.current)==null||He.focus(),T(!0)},0)}else n==null||n(null,oe),N(S(oe)),T(!1);k(-1)},[a,t,j,n,b,S]),W=x.useCallback(oe=>{if(a&&Array.isArray(t)){const me=t.filter(be=>!j(oe,be));n==null||n(null,me)}},[a,t,j,n]),Z=x.useCallback(oe=>{oe.stopPropagation(),n==null||n(null,a?[]:null),N(""),setTimeout(()=>{P.current&&(P.current.value="",P.current.focus())},0),T(!1)},[n,a]),X=x.useCallback(oe=>{if(!A&&(oe.key==="ArrowDown"||oe.key==="ArrowUp")){T(!0);return}if(A)switch(oe.key){case"ArrowDown":oe.preventDefault(),k(me=>me<Y.length-1?me+1:0);break;case"ArrowUp":oe.preventDefault(),k(me=>me>0?me-1:Y.length-1);break;case"Enter":oe.preventDefault(),I>=0&&Y[I]?V(Y[I]):s&&_&&V(_);break;case"Escape":T(!1),k(-1);break;case"Tab":T(!1);break}},[A,Y,I,V,s,_]),Q=x.useCallback(()=>{T(!A)},[A]),se=x.useCallback(()=>{T(!0)},[]);x.useEffect(()=>{const oe=me=>{z.current&&!z.current.contains(me.target)&&T(!1)};return document.addEventListener("mousedown",oe),()=>document.removeEventListener("mousedown",oe)},[]),x.useEffect(()=>{if(A&&I>=0&&H.current){const oe=H.current.children[I];oe&&oe.scrollIntoView({block:"nearest"})}},[I,A]);const ue=x.useMemo(()=>!a||!Array.isArray(t)||t.length===0?null:M?M(t,W):d.jsx("div",{className:"flex flex-wrap gap-1 mb-1",children:t.map((oe,me)=>d.jsx(Zu,{tag:oe,index:me,getOptionLabel:S,onRemove:W},me))}),[a,t,M,W,S]),ye=x.useMemo(()=>a?Array.isArray(t)&&t.length>0:t!=null,[a,t]),J=g&&ye&&!i,Re=x.useMemo(()=>`
169
169
  relative flex items-center rounded-md
170
- ${A0[m]}
171
- ${P0[u]}
170
+ ${i1[m]}
171
+ ${s1[u]}
172
172
  ${h&&"border border-red-500 focus-visible:ring-red-500"}
173
173
  ${i?"opacity-50 cursor-not-allowed":"cursor-text"}
174
174
  focus-within:ring-1 focus-within:ring-ring focus-within:ring-offset-2
175
175
  transition-colors
176
- `,[m,u,h,i]),We=L??D;return d.jsxs("div",{className:`relative ${g?"w-full":"w-auto"} ${B}`,ref:G,children:[c&&d.jsxs("label",{htmlFor:T,className:"block text-sm font-medium mb-1",children:[c,y&&d.jsx("span",{className:"text-destructive ml-1",children:"*"})]}),d.jsxs("div",{className:"relative",children:[de,d.jsxs("div",{className:ze,children:[d.jsx(Mn,{id:T,ref:O,value:_,onChange:H,onKeyDown:X,onFocus:le,placeholder:o,disabled:i,className:"border-0 shadow-none focus-visible:ring-0 focus-visible:ring-offset-0 bg-transparent rounded-md",...V}),d.jsxs("div",{className:"flex items-center gap-1 ml-auto",children:[l&&d.jsx("div",{className:"animate-spin rounded-full h-4 w-4 border-2 border-muted-foreground border-t-transparent"}),re&&d.jsx("button",{type:"button",onClick:Z,className:"p-1 hover:bg-accent rounded-sm transition-colors",tabIndex:-1,children:d.jsx(En,{className:"h-4 w-4 text-muted-foreground"})}),d.jsx("button",{type:"button",onClick:Q,className:"p-1 hover:bg-accent rounded-sm transition-colors",tabIndex:-1,children:d.jsx(Kr,{className:`h-4 w-4 text-muted-foreground transition-transform ${$?"rotate-180":""}`})})]})]}),$&&d.jsx("div",{className:`
176
+ `,[m,u,h,i]),Te=$??E;return d.jsxs("div",{className:`relative ${v?"w-full":"w-auto"} ${B}`,ref:z,children:[c&&d.jsxs("label",{htmlFor:O,className:"block text-sm font-medium mb-1",children:[c,y&&d.jsx("span",{className:"text-destructive ml-1",children:"*"})]}),d.jsxs("div",{className:"relative",children:[ue,d.jsxs("div",{className:Re,children:[d.jsx(rn,{id:O,ref:P,value:_,onChange:G,onKeyDown:X,onFocus:se,placeholder:o,disabled:i,className:"border-0 shadow-none focus-visible:ring-0 focus-visible:ring-offset-0 bg-transparent rounded-md",...q}),d.jsxs("div",{className:"flex items-center gap-1 ml-auto",children:[l&&d.jsx("div",{className:"animate-spin rounded-full h-4 w-4 border-2 border-muted-foreground border-t-transparent"}),J&&d.jsx("button",{type:"button",onClick:Z,className:"p-1 hover:bg-accent rounded-sm transition-colors",tabIndex:-1,children:d.jsx(kn,{className:"h-4 w-4 text-muted-foreground"})}),d.jsx("button",{type:"button",onClick:Q,className:"p-1 hover:bg-accent rounded-sm transition-colors",tabIndex:-1,children:d.jsx(nr,{className:`h-4 w-4 text-muted-foreground transition-transform ${A?"rotate-180":""}`})})]})]}),A&&d.jsx("div",{className:`
177
177
  absolute top-full left-0 right-0 z-50 mt-1
178
178
  bg-popover border border-border rounded-md shadow-lg
179
179
  max-h-60 overflow-auto
180
- ${F}
181
- `,ref:Y,children:W.length===0?d.jsx("div",{className:"p-3 text-sm text-muted-foreground text-center",children:We}):W.map((ie,pe)=>{const Se=a?Array.isArray(t)&&t.some(Be=>A(ie,Be)):A(ie,t),je=pe===P;return d.jsx($u,{option:ie,index:pe,isSelected:Se,isHighlighted:je,onSelect:U,getOptionLabel:S,renderOption:N},pe)})})]}),(p||h)&&d.jsx("p",{className:`mt-1 text-xs ${h?"text-destructive":"text-muted-foreground"}`,children:h||p})]})};var po="Collapsible",[W0,OM]=Ye(po),[B0,Za]=W0(po),Fu=f.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:o,disabled:a,onOpenChange:s,...i}=e,[l,u]=tt({prop:r,defaultProp:o??!1,onChange:s,caller:po});return d.jsx(B0,{scope:n,disabled:a,contentId:ke(),open:l,onOpenToggle:f.useCallback(()=>u(m=>!m),[u]),children:d.jsx(te.div,{"data-state":Ja(l),"data-disabled":a?"":void 0,...i,ref:t})})});Fu.displayName=po;var Wu="CollapsibleTrigger",Bu=f.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,o=Za(Wu,n);return d.jsx(te.button,{type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":Ja(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled,...r,ref:t,onClick:K(e.onClick,o.onOpenToggle)})});Bu.displayName=Wu;var Qa="CollapsibleContent",Yu=f.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=Za(Qa,e.__scopeCollapsible);return d.jsx(He,{present:n||o.open,children:({present:a})=>d.jsx(Y0,{...r,ref:t,present:a})})});Yu.displayName=Qa;var Y0=f.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:o,...a}=e,s=Za(Qa,n),[i,l]=f.useState(r),u=f.useRef(null),m=he(t,u),c=f.useRef(0),p=c.current,h=f.useRef(0),y=h.current,g=s.open||i,v=f.useRef(g),w=f.useRef(void 0);return f.useEffect(()=>{const x=requestAnimationFrame(()=>v.current=!1);return()=>cancelAnimationFrame(x)},[]),De(()=>{const x=u.current;if(x){w.current=w.current||{transitionDuration:x.style.transitionDuration,animationName:x.style.animationName},x.style.transitionDuration="0s",x.style.animationName="none";const S=x.getBoundingClientRect();c.current=S.height,h.current=S.width,v.current||(x.style.transitionDuration=w.current.transitionDuration,x.style.animationName=w.current.animationName),l(r)}},[s.open,r]),d.jsx(te.div,{"data-state":Ja(s.open),"data-disabled":s.disabled?"":void 0,id:s.contentId,hidden:!g,...a,ref:m,style:{"--radix-collapsible-content-height":p?`${p}px`:void 0,"--radix-collapsible-content-width":y?`${y}px`:void 0,...e.style},children:g&&o})});function Ja(e){return e?"open":"closed"}var H0=Fu,z0=Bu,G0=Yu;function U0({title:e,content:t,defaultOpen:n=!1}){const[r,o]=f.useState(n),a=()=>o(s=>!s);return d.jsxs(H0,{open:r,onOpenChange:o,className:"rounded-md border p-4 shadow-sm w-full min-w-[40vw] max-w-lg cursor-pointer",onClick:a,children:[d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsx("h3",{className:"text-lg font-medium",children:e}),d.jsx(z0,{asChild:!0,children:d.jsx("button",{onClick:s=>s.stopPropagation(),className:q("transition-transform duration-200",r?"rotate-180":"rotate-0"),children:d.jsx(Kr,{className:"h-5 w-5"})})})]}),d.jsx(G0,{className:"mt-4 CollapsibleContent data-[state=closed]:animate-collapsible-up data-[state=open]:animate-collapsible-down",children:d.jsx("div",{className:"text-sm text-muted-foreground",children:t})})]})}const q0=Vr("relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"}},defaultVariants:{variant:"default"}}),Hu=f.forwardRef(({className:e,variant:t,...n},r)=>d.jsx("div",{ref:r,role:"alert",className:q(q0({variant:t}),e),...n}));Hu.displayName="Alert";const V0=f.forwardRef(({className:e,...t},n)=>d.jsx("h5",{ref:n,className:q("mb-1 font-medium leading-none tracking-tight",e),...t}));V0.displayName="AlertTitle";const K0=f.forwardRef(({className:e,...t},n)=>d.jsx("p",{ref:n,className:q("text-sm [&_p]:leading-relaxed",e),...t}));K0.displayName="AlertDescription";var Er={exports:{}},Yo={};/**
180
+ ${L}
181
+ `,ref:H,children:Y.length===0?d.jsx("div",{className:"p-3 text-sm text-muted-foreground text-center",children:Te}):Y.map((oe,me)=>{const be=a?Array.isArray(t)&&t.some(He=>j(oe,He)):j(oe,t),$e=me===I;return d.jsx(Xu,{option:oe,index:me,isSelected:be,isHighlighted:$e,onSelect:V,getOptionLabel:S,renderOption:R},me)})})]}),(p||h)&&d.jsx("p",{className:`mt-1 text-xs ${h?"text-destructive":"text-muted-foreground"}`,children:h||p})]})};var yo="Collapsible",[m1,lD]=Be(yo),[p1,as]=m1(yo),Qu=f.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:o,disabled:a,onOpenChange:s,...i}=e,[l,u]=tt({prop:r,defaultProp:o??!1,onChange:s,caller:yo});return d.jsx(p1,{scope:n,disabled:a,contentId:ke(),open:l,onOpenToggle:f.useCallback(()=>u(m=>!m),[u]),children:d.jsx(ee.div,{"data-state":is(l),"data-disabled":a?"":void 0,...i,ref:t})})});Qu.displayName=yo;var Ju="CollapsibleTrigger",ed=f.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,o=as(Ju,n);return d.jsx(ee.button,{type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":is(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled,...r,ref:t,onClick:K(e.onClick,o.onOpenToggle)})});ed.displayName=Ju;var ss="CollapsibleContent",td=f.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=as(ss,e.__scopeCollapsible);return d.jsx(ze,{present:n||o.open,children:({present:a})=>d.jsx(h1,{...r,ref:t,present:a})})});td.displayName=ss;var h1=f.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:o,...a}=e,s=as(ss,n),[i,l]=f.useState(r),u=f.useRef(null),m=he(t,u),c=f.useRef(0),p=c.current,h=f.useRef(0),y=h.current,v=s.open||i,g=f.useRef(v),b=f.useRef(void 0);return f.useEffect(()=>{const w=requestAnimationFrame(()=>g.current=!1);return()=>cancelAnimationFrame(w)},[]),Ne(()=>{const w=u.current;if(w){b.current=b.current||{transitionDuration:w.style.transitionDuration,animationName:w.style.animationName},w.style.transitionDuration="0s",w.style.animationName="none";const S=w.getBoundingClientRect();c.current=S.height,h.current=S.width,g.current||(w.style.transitionDuration=b.current.transitionDuration,w.style.animationName=b.current.animationName),l(r)}},[s.open,r]),d.jsx(ee.div,{"data-state":is(s.open),"data-disabled":s.disabled?"":void 0,id:s.contentId,hidden:!v,...a,ref:m,style:{"--radix-collapsible-content-height":p?`${p}px`:void 0,"--radix-collapsible-content-width":y?`${y}px`:void 0,...e.style},children:v&&o})});function is(e){return e?"open":"closed"}var g1=Qu,v1=ed,y1=td;function b1({title:e,content:t,defaultOpen:n=!1}){const[r,o]=f.useState(n),a=()=>o(s=>!s);return d.jsxs(g1,{open:r,onOpenChange:o,className:"rounded-md border p-4 shadow-sm w-full min-w-[40vw] max-w-lg cursor-pointer",onClick:a,children:[d.jsxs("div",{className:"flex items-center justify-between",children:[d.jsx("h3",{className:"text-lg font-medium",children:e}),d.jsx(v1,{asChild:!0,children:d.jsx("button",{onClick:s=>s.stopPropagation(),className:F("transition-transform duration-200",r?"rotate-180":"rotate-0"),children:d.jsx(nr,{className:"h-5 w-5"})})})]}),d.jsx(y1,{className:"mt-4 CollapsibleContent data-[state=closed]:animate-collapsible-up data-[state=open]:animate-collapsible-down",children:d.jsx("div",{className:"text-sm text-muted-foreground",children:t})})]})}const w1=er("relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"}},defaultVariants:{variant:"default"}}),nd=f.forwardRef(({className:e,variant:t,...n},r)=>d.jsx("div",{ref:r,role:"alert",className:F(w1({variant:t}),e),...n}));nd.displayName="Alert";const rd=f.forwardRef(({className:e,...t},n)=>d.jsx("h5",{ref:n,className:F("mb-1 font-medium leading-none tracking-tight",e),...t}));rd.displayName="AlertTitle";const od=f.forwardRef(({className:e,...t},n)=>d.jsx("p",{ref:n,className:F("text-sm [&_p]:leading-relaxed",e),...t}));od.displayName="AlertDescription";var Nr={exports:{}},Uo={};/**
182
182
  * @license React
183
183
  * use-sync-external-store-shim.production.js
184
184
  *
@@ -186,7 +186,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
186
186
  *
187
187
  * This source code is licensed under the MIT license found in the
188
188
  * LICENSE file in the root directory of this source tree.
189
- */var fi;function X0(){if(fi)return Yo;fi=1;var e=b;function t(c,p){return c===p&&(c!==0||1/c===1/p)||c!==c&&p!==p}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,o=e.useEffect,a=e.useLayoutEffect,s=e.useDebugValue;function i(c,p){var h=p(),y=r({inst:{value:h,getSnapshot:p}}),g=y[0].inst,v=y[1];return a(function(){g.value=h,g.getSnapshot=p,l(g)&&v({inst:g})},[c,h,p]),o(function(){return l(g)&&v({inst:g}),c(function(){l(g)&&v({inst:g})})},[c]),s(h),h}function l(c){var p=c.getSnapshot;c=c.value;try{var h=p();return!n(c,h)}catch{return!0}}function u(c,p){return p()}var m=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?u:i;return Yo.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:m,Yo}var Ho={};/**
189
+ */var Ci;function x1(){if(Ci)return Uo;Ci=1;var e=x;function t(c,p){return c===p&&(c!==0||1/c===1/p)||c!==c&&p!==p}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,o=e.useEffect,a=e.useLayoutEffect,s=e.useDebugValue;function i(c,p){var h=p(),y=r({inst:{value:h,getSnapshot:p}}),v=y[0].inst,g=y[1];return a(function(){v.value=h,v.getSnapshot=p,l(v)&&g({inst:v})},[c,h,p]),o(function(){return l(v)&&g({inst:v}),c(function(){l(v)&&g({inst:v})})},[c]),s(h),h}function l(c){var p=c.getSnapshot;c=c.value;try{var h=p();return!n(c,h)}catch{return!0}}function u(c,p){return p()}var m=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?u:i;return Uo.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:m,Uo}var qo={};/**
190
190
  * @license React
191
191
  * use-sync-external-store-shim.development.js
192
192
  *
@@ -194,10 +194,15 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
194
194
  *
195
195
  * This source code is licensed under the MIT license found in the
196
196
  * LICENSE file in the root directory of this source tree.
197
- */var mi;function Z0(){return mi||(mi=1,process.env.NODE_ENV!=="production"&&function(){function e(h,y){return h===y&&(h!==0||1/h===1/y)||h!==h&&y!==y}function t(h,y){m||o.startTransition===void 0||(m=!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 g=y();if(!c){var v=y();a(g,v)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),c=!0)}v=s({inst:{value:g,getSnapshot:y}});var w=v[0].inst,x=v[1];return l(function(){w.value=g,w.getSnapshot=y,n(w)&&x({inst:w})},[h,g,y]),i(function(){return n(w)&&x({inst:w}),h(function(){n(w)&&x({inst:w})})},[h]),u(g),g}function n(h){var y=h.getSnapshot;h=h.value;try{var g=y();return!a(h,g)}catch{return!0}}function r(h,y){return y()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var o=b,a=typeof Object.is=="function"?Object.is:e,s=o.useState,i=o.useEffect,l=o.useLayoutEffect,u=o.useDebugValue,m=!1,c=!1,p=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?r:t;Ho.useSyncExternalStore=o.useSyncExternalStore!==void 0?o.useSyncExternalStore:p,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),Ho}var pi;function Q0(){return pi||(pi=1,process.env.NODE_ENV==="production"?Er.exports=X0():Er.exports=Z0()),Er.exports}var J0=Q0();function eS(){return J0.useSyncExternalStore(tS,()=>!0,()=>!1)}function tS(){return()=>{}}var es="Avatar",[nS,_M]=Ye(es),[rS,zu]=nS(es),Gu=f.forwardRef((e,t)=>{const{__scopeAvatar:n,...r}=e,[o,a]=f.useState("idle");return d.jsx(rS,{scope:n,imageLoadingStatus:o,onImageLoadingStatusChange:a,children:d.jsx(te.span,{...r,ref:t})})});Gu.displayName=es;var Uu="AvatarImage",qu=f.forwardRef((e,t)=>{const{__scopeAvatar:n,src:r,onLoadingStatusChange:o=()=>{},...a}=e,s=zu(Uu,n),i=oS(r,a),l=et(u=>{o(u),s.onImageLoadingStatusChange(u)});return De(()=>{i!=="idle"&&l(i)},[i,l]),i==="loaded"?d.jsx(te.img,{...a,ref:t,src:r}):null});qu.displayName=Uu;var Vu="AvatarFallback",Ku=f.forwardRef((e,t)=>{const{__scopeAvatar:n,delayMs:r,...o}=e,a=zu(Vu,n),[s,i]=f.useState(r===void 0);return f.useEffect(()=>{if(r!==void 0){const l=window.setTimeout(()=>i(!0),r);return()=>window.clearTimeout(l)}},[r]),s&&a.imageLoadingStatus!=="loaded"?d.jsx(te.span,{...o,ref:t}):null});Ku.displayName=Vu;function hi(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}function oS(e,{referrerPolicy:t,crossOrigin:n}){const r=eS(),o=f.useRef(null),a=r?(o.current||(o.current=new window.Image),o.current):null,[s,i]=f.useState(()=>hi(a,e));return De(()=>{i(hi(a,e))},[a,e]),De(()=>{const l=c=>()=>{i(c)};if(!a)return;const u=l("loaded"),m=l("error");return a.addEventListener("load",u),a.addEventListener("error",m),t&&(a.referrerPolicy=t),typeof n=="string"&&(a.crossOrigin=n),()=>{a.removeEventListener("load",u),a.removeEventListener("error",m)}},[a,n,t]),s}var Xu=Gu,Zu=qu,Qu=Ku;const Ju=f.forwardRef(({className:e,...t},n)=>d.jsx(Xu,{ref:n,className:q("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t}));Ju.displayName=Xu.displayName;const ed=f.forwardRef(({className:e,...t},n)=>d.jsx(Zu,{ref:n,className:q("aspect-square h-full w-full",e),...t}));ed.displayName=Zu.displayName;const td=f.forwardRef(({className:e,...t},n)=>d.jsx(Qu,{ref:n,className:q("flex h-full w-full items-center justify-center rounded-full bg-muted",e),...t}));td.displayName=Qu.displayName;var ho="Checkbox",[aS,PM]=Ye(ho),[sS,ts]=aS(ho);function iS(e){const{__scopeCheckbox:t,checked:n,children:r,defaultChecked:o,disabled:a,form:s,name:i,onCheckedChange:l,required:u,value:m="on",internal_do_not_use_render:c}=e,[p,h]=tt({prop:n,defaultProp:o??!1,onChange:l,caller:ho}),[y,g]=f.useState(null),[v,w]=f.useState(null),x=f.useRef(!1),S=y?!!s||!!y.closest("form"):!0,k={checked:p,disabled:a,setChecked:h,control:y,setControl:g,name:i,form:s,value:m,hasConsumerStoppedPropagationRef:x,required:u,defaultChecked:_t(o)?!1:o,isFormControl:S,bubbleInput:v,setBubbleInput:w};return d.jsx(sS,{scope:t,...k,children:cS(c)?c(k):r})}var nd="CheckboxTrigger",rd=f.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...r},o)=>{const{control:a,value:s,disabled:i,checked:l,required:u,setControl:m,setChecked:c,hasConsumerStoppedPropagationRef:p,isFormControl:h,bubbleInput:y}=ts(nd,e),g=he(o,m),v=f.useRef(l);return f.useEffect(()=>{const w=a==null?void 0:a.form;if(w){const x=()=>c(v.current);return w.addEventListener("reset",x),()=>w.removeEventListener("reset",x)}},[a,c]),d.jsx(te.button,{type:"button",role:"checkbox","aria-checked":_t(l)?"mixed":l,"aria-required":u,"data-state":cd(l),"data-disabled":i?"":void 0,disabled:i,value:s,...r,ref:g,onKeyDown:K(t,w=>{w.key==="Enter"&&w.preventDefault()}),onClick:K(n,w=>{c(x=>_t(x)?!0:!x),y&&h&&(p.current=w.isPropagationStopped(),p.current||w.stopPropagation())})})});rd.displayName=nd;var ns=f.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:r,checked:o,defaultChecked:a,required:s,disabled:i,value:l,onCheckedChange:u,form:m,...c}=e;return d.jsx(iS,{__scopeCheckbox:n,checked:o,defaultChecked:a,disabled:i,required:s,onCheckedChange:u,name:r,form:m,value:l,internal_do_not_use_render:({isFormControl:p})=>d.jsxs(d.Fragment,{children:[d.jsx(rd,{...c,ref:t,__scopeCheckbox:n}),p&&d.jsx(id,{__scopeCheckbox:n})]})})});ns.displayName=ho;var od="CheckboxIndicator",ad=f.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...o}=e,a=ts(od,n);return d.jsx(He,{present:r||_t(a.checked)||a.checked===!0,children:d.jsx(te.span,{"data-state":cd(a.checked),"data-disabled":a.disabled?"":void 0,...o,ref:t,style:{pointerEvents:"none",...e.style}})})});ad.displayName=od;var sd="CheckboxBubbleInput",id=f.forwardRef(({__scopeCheckbox:e,...t},n)=>{const{control:r,hasConsumerStoppedPropagationRef:o,checked:a,defaultChecked:s,required:i,disabled:l,name:u,value:m,form:c,bubbleInput:p,setBubbleInput:h}=ts(sd,e),y=he(n,h),g=La(a),v=_a(r);f.useEffect(()=>{const x=p;if(!x)return;const S=window.HTMLInputElement.prototype,C=Object.getOwnPropertyDescriptor(S,"checked").set,N=!o.current;if(g!==a&&C){const M=new Event("click",{bubbles:N});x.indeterminate=_t(a),C.call(x,_t(a)?!1:a),x.dispatchEvent(M)}},[p,g,a,o]);const w=f.useRef(_t(a)?!1:a);return d.jsx(te.input,{type:"checkbox","aria-hidden":!0,defaultChecked:s??w.current,required:i,disabled:l,name:u,value:m,form:c,...t,tabIndex:-1,ref:y,style:{...t.style,...v,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});id.displayName=sd;function cS(e){return typeof e=="function"}function _t(e){return e==="indeterminate"}function cd(e){return _t(e)?"indeterminate":e?"checked":"unchecked"}const ld=f.forwardRef(({className:e,color:t="#029cfd",...n},r)=>d.jsx(ns,{ref:r,className:q("peer h-4 w-4 shrink-0 rounded-sm border ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50","data-[state=checked]:text-white",e),style:{borderColor:t,backgroundColor:n.checked?t:"transparent"},...n,children:d.jsx(ad,{className:"flex items-center justify-center text-current",children:n.checked==="indeterminate"?d.jsx(Up,{className:"h-4 w-4"}):d.jsx(Jn,{className:"h-4 w-4"})})}));ld.displayName=ns.displayName;function lS(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}const ud=b.createContext({drawerRef:{current:null},overlayRef:{current:null},onPress:()=>{},onRelease:()=>{},onDrag:()=>{},onNestedDrag:()=>{},onNestedOpenChange:()=>{},onNestedRelease:()=>{},openProp:void 0,dismissible:!1,isOpen:!1,isDragging:!1,keyboardIsOpen:{current:!1},snapPointsOffset:null,snapPoints:null,handleOnly:!1,modal:!1,shouldFade:!1,activeSnapPoint:null,onOpenChange:()=>{},setActiveSnapPoint:()=>{},closeDrawer:()=>{},direction:"bottom",shouldAnimate:{current:!0},shouldScaleBackground:!1,setBackgroundColorOnScale:!0,noBodyStyles:!1,container:null,autoFocus:!1}),fr=()=>{const e=b.useContext(ud);if(!e)throw new Error("useDrawerContext must be used within a Drawer.Root");return e};lS(`[data-vaul-drawer]{touch-action:none;will-change:transform;transition:transform .5s cubic-bezier(.32, .72, 0, 1);animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=open]{animation-name:slideFromBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=closed]{animation-name:slideToBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=open]{animation-name:slideFromTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=closed]{animation-name:slideToTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=open]{animation-name:slideFromLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=closed]{animation-name:slideToLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=open]{animation-name:slideFromRight}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=closed]{animation-name:slideToRight}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--initial-transform,100%),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--initial-transform,100%),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-overlay][data-vaul-snap-points=false]{animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-overlay][data-vaul-snap-points=false][data-state=open]{animation-name:fadeIn}[data-vaul-overlay][data-state=closed]{animation-name:fadeOut}[data-vaul-animate=false]{animation:none!important}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:0;transition:opacity .5s cubic-bezier(.32, .72, 0, 1)}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:1}[data-vaul-drawer]:not([data-vaul-custom-container=true])::after{content:'';position:absolute;background:inherit;background-color:inherit}[data-vaul-drawer][data-vaul-drawer-direction=top]::after{top:initial;bottom:100%;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=bottom]::after{top:100%;bottom:initial;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=left]::after{left:initial;right:100%;top:0;bottom:0;width:200%}[data-vaul-drawer][data-vaul-drawer-direction=right]::after{left:100%;right:initial;top:0;bottom:0;width:200%}[data-vaul-overlay][data-vaul-snap-points=true]:not([data-vaul-snap-points-overlay=true]):not(
197
+ */var Mi;function S1(){return Mi||(Mi=1,process.env.NODE_ENV!=="production"&&function(){function e(h,y){return h===y&&(h!==0||1/h===1/y)||h!==h&&y!==y}function t(h,y){m||o.startTransition===void 0||(m=!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 v=y();if(!c){var g=y();a(v,g)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),c=!0)}g=s({inst:{value:v,getSnapshot:y}});var b=g[0].inst,w=g[1];return l(function(){b.value=v,b.getSnapshot=y,n(b)&&w({inst:b})},[h,v,y]),i(function(){return n(b)&&w({inst:b}),h(function(){n(b)&&w({inst:b})})},[h]),u(v),v}function n(h){var y=h.getSnapshot;h=h.value;try{var v=y();return!a(h,v)}catch{return!0}}function r(h,y){return y()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var o=x,a=typeof Object.is=="function"?Object.is:e,s=o.useState,i=o.useEffect,l=o.useLayoutEffect,u=o.useDebugValue,m=!1,c=!1,p=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?r:t;qo.useSyncExternalStore=o.useSyncExternalStore!==void 0?o.useSyncExternalStore:p,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),qo}var Di;function C1(){return Di||(Di=1,process.env.NODE_ENV==="production"?Nr.exports=x1():Nr.exports=S1()),Nr.exports}var M1=C1();function D1(){return M1.useSyncExternalStore(k1,()=>!0,()=>!1)}function k1(){return()=>{}}var cs="Avatar",[E1,uD]=Be(cs),[N1,ad]=E1(cs),sd=f.forwardRef((e,t)=>{const{__scopeAvatar:n,...r}=e,[o,a]=f.useState("idle");return d.jsx(N1,{scope:n,imageLoadingStatus:o,onImageLoadingStatusChange:a,children:d.jsx(ee.span,{...r,ref:t})})});sd.displayName=cs;var id="AvatarImage",cd=f.forwardRef((e,t)=>{const{__scopeAvatar:n,src:r,onLoadingStatusChange:o=()=>{},...a}=e,s=ad(id,n),i=R1(r,a),l=et(u=>{o(u),s.onImageLoadingStatusChange(u)});return Ne(()=>{i!=="idle"&&l(i)},[i,l]),i==="loaded"?d.jsx(ee.img,{...a,ref:t,src:r}):null});cd.displayName=id;var ld="AvatarFallback",ud=f.forwardRef((e,t)=>{const{__scopeAvatar:n,delayMs:r,...o}=e,a=ad(ld,n),[s,i]=f.useState(r===void 0);return f.useEffect(()=>{if(r!==void 0){const l=window.setTimeout(()=>i(!0),r);return()=>window.clearTimeout(l)}},[r]),s&&a.imageLoadingStatus!=="loaded"?d.jsx(ee.span,{...o,ref:t}):null});ud.displayName=ld;function ki(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}function R1(e,{referrerPolicy:t,crossOrigin:n}){const r=D1(),o=f.useRef(null),a=r?(o.current||(o.current=new window.Image),o.current):null,[s,i]=f.useState(()=>ki(a,e));return Ne(()=>{i(ki(a,e))},[a,e]),Ne(()=>{const l=c=>()=>{i(c)};if(!a)return;const u=l("loaded"),m=l("error");return a.addEventListener("load",u),a.addEventListener("error",m),t&&(a.referrerPolicy=t),typeof n=="string"&&(a.crossOrigin=n),()=>{a.removeEventListener("load",u),a.removeEventListener("error",m)}},[a,n,t]),s}var dd=sd,fd=cd,md=ud;const pd=f.forwardRef(({className:e,...t},n)=>d.jsx(dd,{ref:n,className:F("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t}));pd.displayName=dd.displayName;const hd=f.forwardRef(({className:e,...t},n)=>d.jsx(fd,{ref:n,className:F("aspect-square h-full w-full",e),...t}));hd.displayName=fd.displayName;const gd=f.forwardRef(({className:e,...t},n)=>d.jsx(md,{ref:n,className:F("flex h-full w-full items-center justify-center rounded-full bg-muted",e),...t}));gd.displayName=md.displayName;var bo="Checkbox",[T1,dD]=Be(bo),[_1,ls]=T1(bo);function O1(e){const{__scopeCheckbox:t,checked:n,children:r,defaultChecked:o,disabled:a,form:s,name:i,onCheckedChange:l,required:u,value:m="on",internal_do_not_use_render:c}=e,[p,h]=tt({prop:n,defaultProp:o??!1,onChange:l,caller:bo}),[y,v]=f.useState(null),[g,b]=f.useState(null),w=f.useRef(!1),S=y?!!s||!!y.closest("form"):!0,D={checked:p,disabled:a,setChecked:h,control:y,setControl:v,name:i,form:s,value:m,hasConsumerStoppedPropagationRef:w,required:u,defaultChecked:Pt(o)?!1:o,isFormControl:S,bubbleInput:g,setBubbleInput:b};return d.jsx(_1,{scope:t,...D,children:P1(c)?c(D):r})}var vd="CheckboxTrigger",yd=f.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...r},o)=>{const{control:a,value:s,disabled:i,checked:l,required:u,setControl:m,setChecked:c,hasConsumerStoppedPropagationRef:p,isFormControl:h,bubbleInput:y}=ls(vd,e),v=he(o,m),g=f.useRef(l);return f.useEffect(()=>{const b=a==null?void 0:a.form;if(b){const w=()=>c(g.current);return b.addEventListener("reset",w),()=>b.removeEventListener("reset",w)}},[a,c]),d.jsx(ee.button,{type:"button",role:"checkbox","aria-checked":Pt(l)?"mixed":l,"aria-required":u,"data-state":Cd(l),"data-disabled":i?"":void 0,disabled:i,value:s,...r,ref:v,onKeyDown:K(t,b=>{b.key==="Enter"&&b.preventDefault()}),onClick:K(n,b=>{c(w=>Pt(w)?!0:!w),y&&h&&(p.current=b.isPropagationStopped(),p.current||b.stopPropagation())})})});yd.displayName=vd;var us=f.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:r,checked:o,defaultChecked:a,required:s,disabled:i,value:l,onCheckedChange:u,form:m,...c}=e;return d.jsx(O1,{__scopeCheckbox:n,checked:o,defaultChecked:a,disabled:i,required:s,onCheckedChange:u,name:r,form:m,value:l,internal_do_not_use_render:({isFormControl:p})=>d.jsxs(d.Fragment,{children:[d.jsx(yd,{...c,ref:t,__scopeCheckbox:n}),p&&d.jsx(Sd,{__scopeCheckbox:n})]})})});us.displayName=bo;var bd="CheckboxIndicator",wd=f.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...o}=e,a=ls(bd,n);return d.jsx(ze,{present:r||Pt(a.checked)||a.checked===!0,children:d.jsx(ee.span,{"data-state":Cd(a.checked),"data-disabled":a.disabled?"":void 0,...o,ref:t,style:{pointerEvents:"none",...e.style}})})});wd.displayName=bd;var xd="CheckboxBubbleInput",Sd=f.forwardRef(({__scopeCheckbox:e,...t},n)=>{const{control:r,hasConsumerStoppedPropagationRef:o,checked:a,defaultChecked:s,required:i,disabled:l,name:u,value:m,form:c,bubbleInput:p,setBubbleInput:h}=ls(xd,e),y=he(n,h),v=za(a),g=$a(r);f.useEffect(()=>{const w=p;if(!w)return;const S=window.HTMLInputElement.prototype,C=Object.getOwnPropertyDescriptor(S,"checked").set,R=!o.current;if(v!==a&&C){const M=new Event("click",{bubbles:R});w.indeterminate=Pt(a),C.call(w,Pt(a)?!1:a),w.dispatchEvent(M)}},[p,v,a,o]);const b=f.useRef(Pt(a)?!1:a);return d.jsx(ee.input,{type:"checkbox","aria-hidden":!0,defaultChecked:s??b.current,required:i,disabled:l,name:u,value:m,form:c,...t,tabIndex:-1,ref:y,style:{...t.style,...g,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});Sd.displayName=xd;function P1(e){return typeof e=="function"}function Pt(e){return e==="indeterminate"}function Cd(e){return Pt(e)?"indeterminate":e?"checked":"unchecked"}const Md=f.forwardRef(({className:e,color:t="#029cfd",...n},r)=>d.jsx(us,{ref:r,className:F("peer h-4 w-4 shrink-0 rounded-sm border ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50","data-[state=checked]:text-white",e),style:{borderColor:t,backgroundColor:n.checked?t:"transparent"},...n,children:d.jsx(wd,{className:"flex items-center justify-center text-current",children:n.checked==="indeterminate"?d.jsx(dh,{className:"h-4 w-4 text-white"}):d.jsx(tr,{className:"h-4 w-4"})})}));Md.displayName=us.displayName;function A1(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}const Dd=x.createContext({drawerRef:{current:null},overlayRef:{current:null},onPress:()=>{},onRelease:()=>{},onDrag:()=>{},onNestedDrag:()=>{},onNestedOpenChange:()=>{},onNestedRelease:()=>{},openProp:void 0,dismissible:!1,isOpen:!1,isDragging:!1,keyboardIsOpen:{current:!1},snapPointsOffset:null,snapPoints:null,handleOnly:!1,modal:!1,shouldFade:!1,activeSnapPoint:null,onOpenChange:()=>{},setActiveSnapPoint:()=>{},closeDrawer:()=>{},direction:"bottom",shouldAnimate:{current:!0},shouldScaleBackground:!1,setBackgroundColorOnScale:!0,noBodyStyles:!1,container:null,autoFocus:!1}),hr=()=>{const e=x.useContext(Dd);if(!e)throw new Error("useDrawerContext must be used within a Drawer.Root");return e};A1(`[data-vaul-drawer]{touch-action:none;will-change:transform;transition:transform .5s cubic-bezier(.32, .72, 0, 1);animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=open]{animation-name:slideFromBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=bottom][data-state=closed]{animation-name:slideToBottom}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=open]{animation-name:slideFromTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=top][data-state=closed]{animation-name:slideToTop}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=open]{animation-name:slideFromLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=left][data-state=closed]{animation-name:slideToLeft}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=open]{animation-name:slideFromRight}[data-vaul-drawer][data-vaul-snap-points=false][data-vaul-drawer-direction=right][data-state=closed]{animation-name:slideToRight}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--initial-transform,100%),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}[data-vaul-drawer][data-vaul-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--initial-transform,100%),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=top]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=bottom]{transform:translate3d(0,var(--snap-point-height,0),0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=left]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-drawer][data-vaul-delayed-snap-points=true][data-vaul-drawer-direction=right]{transform:translate3d(var(--snap-point-height,0),0,0)}[data-vaul-overlay][data-vaul-snap-points=false]{animation-duration:.5s;animation-timing-function:cubic-bezier(0.32,0.72,0,1)}[data-vaul-overlay][data-vaul-snap-points=false][data-state=open]{animation-name:fadeIn}[data-vaul-overlay][data-state=closed]{animation-name:fadeOut}[data-vaul-animate=false]{animation:none!important}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:0;transition:opacity .5s cubic-bezier(.32, .72, 0, 1)}[data-vaul-overlay][data-vaul-snap-points=true]{opacity:1}[data-vaul-drawer]:not([data-vaul-custom-container=true])::after{content:'';position:absolute;background:inherit;background-color:inherit}[data-vaul-drawer][data-vaul-drawer-direction=top]::after{top:initial;bottom:100%;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=bottom]::after{top:100%;bottom:initial;left:0;right:0;height:200%}[data-vaul-drawer][data-vaul-drawer-direction=left]::after{left:initial;right:100%;top:0;bottom:0;width:200%}[data-vaul-drawer][data-vaul-drawer-direction=right]::after{left:100%;right:initial;top:0;bottom:0;width:200%}[data-vaul-overlay][data-vaul-snap-points=true]:not([data-vaul-snap-points-overlay=true]):not(
198
198
  [data-state=closed]
199
- ){opacity:0}[data-vaul-overlay][data-vaul-snap-points-overlay=true]{opacity:1}[data-vaul-handle]{display:block;position:relative;opacity:.7;background:#e2e2e4;margin-left:auto;margin-right:auto;height:5px;width:32px;border-radius:1rem;touch-action:pan-y}[data-vaul-handle]:active,[data-vaul-handle]:hover{opacity:1}[data-vaul-handle-hitarea]{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:max(100%,2.75rem);height:max(100%,2.75rem);touch-action:inherit}@media (hover:hover) and (pointer:fine){[data-vaul-drawer]{user-select:none}}@media (pointer:fine){[data-vaul-handle-hitarea]:{width:100%;height:100%}}@keyframes fadeIn{from{opacity:0}to{opacity:1}}@keyframes fadeOut{to{opacity:0}}@keyframes slideFromBottom{from{transform:translate3d(0,var(--initial-transform,100%),0)}to{transform:translate3d(0,0,0)}}@keyframes slideToBottom{to{transform:translate3d(0,var(--initial-transform,100%),0)}}@keyframes slideFromTop{from{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}to{transform:translate3d(0,0,0)}}@keyframes slideToTop{to{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}}@keyframes slideFromLeft{from{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToLeft{to{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}}@keyframes slideFromRight{from{transform:translate3d(var(--initial-transform,100%),0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToRight{to{transform:translate3d(var(--initial-transform,100%),0,0)}}`);function uS(){const e=navigator.userAgent;return typeof window<"u"&&(/Firefox/.test(e)&&/Mobile/.test(e)||/FxiOS/.test(e))}function dS(){return rs(/^Mac/)}function fS(){return rs(/^iPhone/)}function gi(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}function mS(){return rs(/^iPad/)||dS()&&navigator.maxTouchPoints>1}function dd(){return fS()||mS()}function rs(e){return typeof window<"u"&&window.navigator!=null?e.test(window.navigator.platform):void 0}const pS=24,hS=typeof window<"u"?b.useLayoutEffect:b.useEffect;function vi(...e){return(...t)=>{for(let n of e)typeof n=="function"&&n(...t)}}const zo=typeof document<"u"&&window.visualViewport;function yi(e){let t=window.getComputedStyle(e);return/(auto|scroll)/.test(t.overflow+t.overflowX+t.overflowY)}function fd(e){for(yi(e)&&(e=e.parentElement);e&&!yi(e);)e=e.parentElement;return e||document.scrollingElement||document.documentElement}const gS=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);let kr=0,Go;function vS(e={}){let{isDisabled:t}=e;hS(()=>{if(!t)return kr++,kr===1&&dd()&&(Go=yS()),()=>{kr--,kr===0&&(Go==null||Go())}},[t])}function yS(){let e,t=0,n=c=>{e=fd(c.target),!(e===document.documentElement&&e===document.body)&&(t=c.changedTouches[0].pageY)},r=c=>{if(!e||e===document.documentElement||e===document.body){c.preventDefault();return}let p=c.changedTouches[0].pageY,h=e.scrollTop,y=e.scrollHeight-e.clientHeight;y!==0&&((h<=0&&p>t||h>=y&&p<t)&&c.preventDefault(),t=p)},o=c=>{let p=c.target;ha(p)&&p!==document.activeElement&&(c.preventDefault(),p.style.transform="translateY(-2000px)",p.focus(),requestAnimationFrame(()=>{p.style.transform=""}))},a=c=>{let p=c.target;ha(p)&&(p.style.transform="translateY(-2000px)",requestAnimationFrame(()=>{p.style.transform="",zo&&(zo.height<window.innerHeight?requestAnimationFrame(()=>{bi(p)}):zo.addEventListener("resize",()=>bi(p),{once:!0}))}))},s=()=>{window.scrollTo(0,0)},i=window.pageXOffset,l=window.pageYOffset,u=vi(bS(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`));window.scrollTo(0,0);let m=vi(Fn(document,"touchstart",n,{passive:!1,capture:!0}),Fn(document,"touchmove",r,{passive:!1,capture:!0}),Fn(document,"touchend",o,{passive:!1,capture:!0}),Fn(document,"focus",a,!0),Fn(window,"scroll",s));return()=>{u(),m(),window.scrollTo(i,l)}}function bS(e,t,n){let r=e.style[t];return e.style[t]=n,()=>{e.style[t]=r}}function Fn(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function bi(e){let t=document.scrollingElement||document.documentElement;for(;e&&e!==t;){let n=fd(e);if(n!==document.documentElement&&n!==document.body&&n!==e){let r=n.getBoundingClientRect().top,o=e.getBoundingClientRect().top,a=e.getBoundingClientRect().bottom;const s=n.getBoundingClientRect().bottom+pS;a>s&&(n.scrollTop+=o-r)}e=n.parentElement}}function ha(e){return e instanceof HTMLInputElement&&!gS.has(e.type)||e instanceof HTMLTextAreaElement||e instanceof HTMLElement&&e.isContentEditable}function wS(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function xS(...e){return t=>e.forEach(n=>wS(n,t))}function md(...e){return f.useCallback(xS(...e),e)}const pd=new WeakMap;function Te(e,t,n=!1){if(!e||!(e instanceof HTMLElement))return;let r={};Object.entries(t).forEach(([o,a])=>{if(o.startsWith("--")){e.style.setProperty(o,a);return}r[o]=e.style[o],e.style[o]=a}),!n&&pd.set(e,r)}function SS(e,t){if(!e||!(e instanceof HTMLElement))return;let n=pd.get(e);n&&(e.style[t]=n[t])}const Ne=e=>{switch(e){case"top":case"bottom":return!0;case"left":case"right":return!1;default:return e}};function Nr(e,t){if(!e)return null;const n=window.getComputedStyle(e),r=n.transform||n.webkitTransform||n.mozTransform;let o=r.match(/^matrix3d\((.+)\)$/);return o?parseFloat(o[1].split(", ")[Ne(t)?13:12]):(o=r.match(/^matrix\((.+)\)$/),o?parseFloat(o[1].split(", ")[Ne(t)?5:4]):null)}function CS(e){return 8*(Math.log(e+1)-2)}function Uo(e,t){if(!e)return()=>{};const n=e.style.cssText;return Object.assign(e.style,t),()=>{e.style.cssText=n}}function MS(...e){return(...t)=>{for(const n of e)typeof n=="function"&&n(...t)}}const Me={DURATION:.5,EASE:[.32,.72,0,1]},hd=.4,ES=.25,kS=100,gd=8,qt=16,ga=26,qo="vaul-dragging";function vd(e){const t=b.useRef(e);return b.useEffect(()=>{t.current=e}),b.useMemo(()=>(...n)=>t.current==null?void 0:t.current.call(t,...n),[])}function NS({defaultProp:e,onChange:t}){const n=b.useState(e),[r]=n,o=b.useRef(r),a=vd(t);return b.useEffect(()=>{o.current!==r&&(a(r),o.current=r)},[r,o,a]),n}function yd({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=NS({defaultProp:t,onChange:n}),a=e!==void 0,s=a?e:r,i=vd(n),l=b.useCallback(u=>{if(a){const c=typeof u=="function"?u(e):u;c!==e&&i(c)}else o(u)},[a,e,o,i]);return[s,l]}function DS({activeSnapPointProp:e,setActiveSnapPointProp:t,snapPoints:n,drawerRef:r,overlayRef:o,fadeFromIndex:a,onSnapPointChange:s,direction:i="bottom",container:l,snapToSequentialPoint:u}){const[m,c]=yd({prop:e,defaultProp:n==null?void 0:n[0],onChange:t}),[p,h]=b.useState(typeof window<"u"?{innerWidth:window.innerWidth,innerHeight:window.innerHeight}:void 0);b.useEffect(()=>{function M(){h({innerWidth:window.innerWidth,innerHeight:window.innerHeight})}return window.addEventListener("resize",M),()=>window.removeEventListener("resize",M)},[]);const y=b.useMemo(()=>m===(n==null?void 0:n[n.length-1])||null,[n,m]),g=b.useMemo(()=>{var M;return(M=n==null?void 0:n.findIndex(D=>D===m))!=null?M:null},[n,m]),v=n&&n.length>0&&(a||a===0)&&!Number.isNaN(a)&&n[a]===m||!n,w=b.useMemo(()=>{const M=l?{width:l.getBoundingClientRect().width,height:l.getBoundingClientRect().height}:typeof window<"u"?{width:window.innerWidth,height:window.innerHeight}:{width:0,height:0};var D;return(D=n==null?void 0:n.map(L=>{const B=typeof L=="string";let F=0;if(B&&(F=parseInt(L,10)),Ne(i)){const $=B?F:p?L*M.height:0;return p?i==="bottom"?M.height-$:-M.height+$:$}const V=B?F:p?L*M.width:0;return p?i==="right"?M.width-V:-M.width+V:V}))!=null?D:[]},[n,p,l]),x=b.useMemo(()=>g!==null?w==null?void 0:w[g]:null,[w,g]),S=b.useCallback(M=>{var D;const L=(D=w==null?void 0:w.findIndex(B=>B===M))!=null?D:null;s(L),Te(r.current,{transition:`transform ${Me.DURATION}s cubic-bezier(${Me.EASE.join(",")})`,transform:Ne(i)?`translate3d(0, ${M}px, 0)`:`translate3d(${M}px, 0, 0)`}),w&&L!==w.length-1&&a!==void 0&&L!==a&&L<a?Te(o.current,{transition:`opacity ${Me.DURATION}s cubic-bezier(${Me.EASE.join(",")})`,opacity:"0"}):Te(o.current,{transition:`opacity ${Me.DURATION}s cubic-bezier(${Me.EASE.join(",")})`,opacity:"1"}),c(n==null?void 0:n[Math.max(L,0)])},[r.current,n,w,a,o,c]);b.useEffect(()=>{if(m||e){var M;const D=(M=n==null?void 0:n.findIndex(L=>L===e||L===m))!=null?M:-1;w&&D!==-1&&typeof w[D]=="number"&&S(w[D])}},[m,e,n,w,S]);function k({draggedDistance:M,closeDrawer:D,velocity:L,dismissible:B}){if(a===void 0)return;const F=i==="bottom"||i==="right"?(x??0)-M:(x??0)+M,V=g===a-1,$=g===0,I=M>0;if(V&&Te(o.current,{transition:`opacity ${Me.DURATION}s cubic-bezier(${Me.EASE.join(",")})`}),!u&&L>2&&!I){B?D():S(w[0]);return}if(!u&&L>2&&I&&w&&n){S(w[n.length-1]);return}const _=w==null?void 0:w.reduce((P,E)=>typeof P!="number"||typeof E!="number"?P:Math.abs(E-F)<Math.abs(P-F)?E:P),R=Ne(i)?window.innerHeight:window.innerWidth;if(L>hd&&Math.abs(M)<R*.4){const P=I?1:-1;if(P>0&&y&&n){S(w[n.length-1]);return}if($&&P<0&&B&&D(),g===null)return;S(w[g+P]);return}S(_)}function C({draggedDistance:M}){if(x===null)return;const D=i==="bottom"||i==="right"?x-M:x+M;(i==="bottom"||i==="right")&&D<w[w.length-1]||(i==="top"||i==="left")&&D>w[w.length-1]||Te(r.current,{transform:Ne(i)?`translate3d(0, ${D}px, 0)`:`translate3d(${D}px, 0, 0)`})}function N(M,D){if(!n||typeof g!="number"||!w||a===void 0)return null;const L=g===a-1;if(g>=a&&D)return 0;if(L&&!D)return 1;if(!v&&!L)return null;const F=L?g+1:g-1,V=L?w[F]-w[F-1]:w[F+1]-w[F],$=M/Math.abs(V);return L?1-$:$}return{isLastSnapPoint:y,activeSnapPoint:m,shouldFade:v,getPercentageDragged:N,setActiveSnapPoint:c,activeSnapPointIndex:g,onRelease:k,onDrag:C,snapPointsOffset:w}}const RS=()=>()=>{};function TS(){const{direction:e,isOpen:t,shouldScaleBackground:n,setBackgroundColorOnScale:r,noBodyStyles:o}=fr(),a=b.useRef(null),s=b.useMemo(()=>document.body.style.backgroundColor,[]);function i(){return(window.innerWidth-ga)/window.innerWidth}b.useEffect(()=>{if(t&&n){a.current&&clearTimeout(a.current);const l=document.querySelector("[data-vaul-drawer-wrapper]")||document.querySelector("[vaul-drawer-wrapper]");if(!l)return;MS(r&&!o?Uo(document.body,{background:"black"}):RS,Uo(l,{transformOrigin:Ne(e)?"top":"left",transitionProperty:"transform, border-radius",transitionDuration:`${Me.DURATION}s`,transitionTimingFunction:`cubic-bezier(${Me.EASE.join(",")})`}));const u=Uo(l,{borderRadius:`${gd}px`,overflow:"hidden",...Ne(e)?{transform:`scale(${i()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`}:{transform:`scale(${i()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`}});return()=>{u(),a.current=window.setTimeout(()=>{s?document.body.style.background=s:document.body.style.removeProperty("background")},Me.DURATION*1e3)}}},[t,n,s])}let Wn=null;function OS({isOpen:e,modal:t,nested:n,hasBeenOpened:r,preventScrollRestoration:o,noBodyStyles:a}){const[s,i]=b.useState(()=>typeof window<"u"?window.location.href:""),l=b.useRef(0),u=b.useCallback(()=>{if(gi()&&Wn===null&&e&&!a){Wn={position:document.body.style.position,top:document.body.style.top,left:document.body.style.left,height:document.body.style.height,right:"unset"};const{scrollX:c,innerHeight:p}=window;document.body.style.setProperty("position","fixed","important"),Object.assign(document.body.style,{top:`${-l.current}px`,left:`${-c}px`,right:"0px",height:"auto"}),window.setTimeout(()=>window.requestAnimationFrame(()=>{const h=p-window.innerHeight;h&&l.current>=p&&(document.body.style.top=`${-(l.current+h)}px`)}),300)}},[e]),m=b.useCallback(()=>{if(gi()&&Wn!==null&&!a){const c=-parseInt(document.body.style.top,10),p=-parseInt(document.body.style.left,10);Object.assign(document.body.style,Wn),window.requestAnimationFrame(()=>{if(o&&s!==window.location.href){i(window.location.href);return}window.scrollTo(p,c)}),Wn=null}},[s]);return b.useEffect(()=>{function c(){l.current=window.scrollY}return c(),window.addEventListener("scroll",c),()=>{window.removeEventListener("scroll",c)}},[]),b.useEffect(()=>{if(t)return()=>{typeof document>"u"||document.querySelector("[data-vaul-drawer]")||m()}},[t,m]),b.useEffect(()=>{n||!r||(e?(!window.matchMedia("(display-mode: standalone)").matches&&u(),t||window.setTimeout(()=>{m()},500)):m())},[e,r,s,t,n,u,m]),{restorePositionSetting:m}}function _S({open:e,onOpenChange:t,children:n,onDrag:r,onRelease:o,snapPoints:a,shouldScaleBackground:s=!1,setBackgroundColorOnScale:i=!0,closeThreshold:l=ES,scrollLockTimeout:u=kS,dismissible:m=!0,handleOnly:c=!1,fadeFromIndex:p=a&&a.length-1,activeSnapPoint:h,setActiveSnapPoint:y,fixed:g,modal:v=!0,onClose:w,nested:x,noBodyStyles:S=!1,direction:k="bottom",defaultOpen:C=!1,disablePreventScroll:N=!0,snapToSequentialPoint:M=!1,preventScrollRestoration:D=!1,repositionInputs:L=!0,onAnimationEnd:B,container:F,autoFocus:V=!1}){var $,I;const[_=!1,R]=yd({defaultProp:C,prop:e,onChange:z=>{t==null||t(z),!z&&!x&&_n(),setTimeout(()=>{B==null||B(z)},Me.DURATION*1e3),z&&!v&&typeof window<"u"&&window.requestAnimationFrame(()=>{document.body.style.pointerEvents="auto"}),z||(document.body.style.pointerEvents="auto")}}),[P,E]=b.useState(!1),[O,Y]=b.useState(!1),[G,T]=b.useState(!1),A=b.useRef(null),W=b.useRef(null),H=b.useRef(null),U=b.useRef(null),j=b.useRef(null),Z=b.useRef(!1),X=b.useRef(null),Q=b.useRef(0),le=b.useRef(!1),de=b.useRef(!C),xe=b.useRef(0),re=b.useRef(null),ze=b.useRef((($=re.current)==null?void 0:$.getBoundingClientRect().height)||0),We=b.useRef(((I=re.current)==null?void 0:I.getBoundingClientRect().width)||0),ie=b.useRef(0),pe=b.useCallback(z=>{a&&z===$e.length-1&&(W.current=new Date)},[]),{activeSnapPoint:Se,activeSnapPointIndex:je,setActiveSnapPoint:Be,onRelease:_e,snapPointsOffset:$e,onDrag:Yt,shouldFade:nn,getPercentageDragged:Nt}=DS({snapPoints:a,activeSnapPointProp:h,setActiveSnapPointProp:y,drawerRef:re,fadeFromIndex:p,overlayRef:A,onSnapPointChange:pe,direction:k,container:F,snapToSequentialPoint:M});vS({isDisabled:!_||O||!v||G||!P||!L||!N});const{restorePositionSetting:_n}=OS({isOpen:_,modal:v,nested:x??!1,hasBeenOpened:P,preventScrollRestoration:D,noBodyStyles:S});function bt(){return(window.innerWidth-ga)/window.innerWidth}function Ht(z){var ae,oe;!m&&!a||re.current&&!re.current.contains(z.target)||(ze.current=((ae=re.current)==null?void 0:ae.getBoundingClientRect().height)||0,We.current=((oe=re.current)==null?void 0:oe.getBoundingClientRect().width)||0,Y(!0),H.current=new Date,dd()&&window.addEventListener("touchend",()=>Z.current=!1,{once:!0}),z.target.setPointerCapture(z.pointerId),Q.current=Ne(k)?z.pageY:z.pageX)}function nt(z,ae){var oe;let fe=z;const ge=(oe=window.getSelection())==null?void 0:oe.toString(),ne=re.current?Nr(re.current,k):null,ue=new Date;if(fe.tagName==="SELECT"||fe.hasAttribute("data-vaul-no-drag")||fe.closest("[data-vaul-no-drag]"))return!1;if(k==="right"||k==="left")return!0;if(W.current&&ue.getTime()-W.current.getTime()<500)return!1;if(ne!==null&&(k==="bottom"?ne>0:ne<0))return!0;if(ge&&ge.length>0)return!1;if(j.current&&ue.getTime()-j.current.getTime()<u&&ne===0||ae)return j.current=ue,!1;for(;fe;){if(fe.scrollHeight>fe.clientHeight){if(fe.scrollTop!==0)return j.current=new Date,!1;if(fe.getAttribute("role")==="dialog")return!0}fe=fe.parentNode}return!0}function rn(z){if(re.current&&O){const ae=k==="bottom"||k==="right"?1:-1,oe=(Q.current-(Ne(k)?z.pageY:z.pageX))*ae,fe=oe>0,ge=a&&!m&&!fe;if(ge&&je===0)return;const ne=Math.abs(oe),ue=document.querySelector("[data-vaul-drawer-wrapper]"),ve=k==="bottom"||k==="top"?ze.current:We.current;let ce=ne/ve;const Ue=Nt(ne,fe);if(Ue!==null&&(ce=Ue),ge&&ce>=1||!Z.current&&!nt(z.target,fe))return;if(re.current.classList.add(qo),Z.current=!0,Te(re.current,{transition:"none"}),Te(A.current,{transition:"none"}),a&&Yt({draggedDistance:oe}),fe&&!a){const Ce=CS(oe),Ve=Math.min(Ce*-1,0)*ae;Te(re.current,{transform:Ne(k)?`translate3d(0, ${Ve}px, 0)`:`translate3d(${Ve}px, 0, 0)`});return}const be=1-ce;if((nn||p&&je===p-1)&&(r==null||r(z,ce),Te(A.current,{opacity:`${be}`,transition:"none"},!0)),ue&&A.current&&s){const Ce=Math.min(bt()+ce*(1-bt()),1),Ve=8-ce*8,Pe=Math.max(0,14-ce*14);Te(ue,{borderRadius:`${Ve}px`,transform:Ne(k)?`scale(${Ce}) translate3d(0, ${Pe}px, 0)`:`scale(${Ce}) translate3d(${Pe}px, 0, 0)`,transition:"none"},!0)}if(!a){const Ce=ne*ae;Te(re.current,{transform:Ne(k)?`translate3d(0, ${Ce}px, 0)`:`translate3d(${Ce}px, 0, 0)`})}}}b.useEffect(()=>{window.requestAnimationFrame(()=>{de.current=!0})},[]),b.useEffect(()=>{var z;function ae(){if(!re.current||!L)return;const oe=document.activeElement;if(ha(oe)||le.current){var fe;const ge=((fe=window.visualViewport)==null?void 0:fe.height)||0,ne=window.innerHeight;let ue=ne-ge;const ve=re.current.getBoundingClientRect().height||0,ce=ve>ne*.8;ie.current||(ie.current=ve);const Ue=re.current.getBoundingClientRect().top;if(Math.abs(xe.current-ue)>60&&(le.current=!le.current),a&&a.length>0&&$e&&je){const be=$e[je]||0;ue+=be}if(xe.current=ue,ve>ge||le.current){const be=re.current.getBoundingClientRect().height;let Ce=be;be>ge&&(Ce=ge-(ce?Ue:ga)),g?re.current.style.height=`${be-Math.max(ue,0)}px`:re.current.style.height=`${Math.max(Ce,ge-Ue)}px`}else uS()||(re.current.style.height=`${ie.current}px`);a&&a.length>0&&!le.current?re.current.style.bottom="0px":re.current.style.bottom=`${Math.max(ue,0)}px`}}return(z=window.visualViewport)==null||z.addEventListener("resize",ae),()=>{var oe;return(oe=window.visualViewport)==null?void 0:oe.removeEventListener("resize",ae)}},[je,a,$e]);function Ge(z){Pn(),w==null||w(),z||R(!1),setTimeout(()=>{a&&Be(a[0])},Me.DURATION*1e3)}function on(){if(!re.current)return;const z=document.querySelector("[data-vaul-drawer-wrapper]"),ae=Nr(re.current,k);Te(re.current,{transform:"translate3d(0, 0, 0)",transition:`transform ${Me.DURATION}s cubic-bezier(${Me.EASE.join(",")})`}),Te(A.current,{transition:`opacity ${Me.DURATION}s cubic-bezier(${Me.EASE.join(",")})`,opacity:"1"}),s&&ae&&ae>0&&_&&Te(z,{borderRadius:`${gd}px`,overflow:"hidden",...Ne(k)?{transform:`scale(${bt()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`,transformOrigin:"top"}:{transform:`scale(${bt()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`,transformOrigin:"left"},transitionProperty:"transform, border-radius",transitionDuration:`${Me.DURATION}s`,transitionTimingFunction:`cubic-bezier(${Me.EASE.join(",")})`},!0)}function Pn(){!O||!re.current||(re.current.classList.remove(qo),Z.current=!1,Y(!1),U.current=new Date)}function an(z){if(!O||!re.current)return;re.current.classList.remove(qo),Z.current=!1,Y(!1),U.current=new Date;const ae=Nr(re.current,k);if(!z||!nt(z.target,!1)||!ae||Number.isNaN(ae)||H.current===null)return;const oe=U.current.getTime()-H.current.getTime(),fe=Q.current-(Ne(k)?z.pageY:z.pageX),ge=Math.abs(fe)/oe;if(ge>.05&&(T(!0),setTimeout(()=>{T(!1)},200)),a){_e({draggedDistance:fe*(k==="bottom"||k==="right"?1:-1),closeDrawer:Ge,velocity:ge,dismissible:m}),o==null||o(z,!0);return}if(k==="bottom"||k==="right"?fe>0:fe<0){on(),o==null||o(z,!0);return}if(ge>hd){Ge(),o==null||o(z,!1);return}var ne;const ue=Math.min((ne=re.current.getBoundingClientRect().height)!=null?ne:0,window.innerHeight);var ve;const ce=Math.min((ve=re.current.getBoundingClientRect().width)!=null?ve:0,window.innerWidth),Ue=k==="left"||k==="right";if(Math.abs(ae)>=(Ue?ce:ue)*l){Ge(),o==null||o(z,!1);return}o==null||o(z,!0),on()}b.useEffect(()=>(_&&(Te(document.documentElement,{scrollBehavior:"auto"}),W.current=new Date),()=>{SS(document.documentElement,"scrollBehavior")}),[_]);function zt(z){const ae=z?(window.innerWidth-qt)/window.innerWidth:1,oe=z?-qt:0;X.current&&window.clearTimeout(X.current),Te(re.current,{transition:`transform ${Me.DURATION}s cubic-bezier(${Me.EASE.join(",")})`,transform:Ne(k)?`scale(${ae}) translate3d(0, ${oe}px, 0)`:`scale(${ae}) translate3d(${oe}px, 0, 0)`}),!z&&re.current&&(X.current=setTimeout(()=>{const fe=Nr(re.current,k);Te(re.current,{transition:"none",transform:Ne(k)?`translate3d(0, ${fe}px, 0)`:`translate3d(${fe}px, 0, 0)`})},500))}function An(z,ae){if(ae<0)return;const oe=(window.innerWidth-qt)/window.innerWidth,fe=oe+ae*(1-oe),ge=-qt+ae*qt;Te(re.current,{transform:Ne(k)?`scale(${fe}) translate3d(0, ${ge}px, 0)`:`scale(${fe}) translate3d(${ge}px, 0, 0)`,transition:"none"})}function Dt(z,ae){const oe=Ne(k)?window.innerHeight:window.innerWidth,fe=ae?(oe-qt)/oe:1,ge=ae?-qt:0;ae&&Te(re.current,{transition:`transform ${Me.DURATION}s cubic-bezier(${Me.EASE.join(",")})`,transform:Ne(k)?`scale(${fe}) translate3d(0, ${ge}px, 0)`:`scale(${fe}) translate3d(${ge}px, 0, 0)`})}return b.useEffect(()=>{v||window.requestAnimationFrame(()=>{document.body.style.pointerEvents="auto"})},[v]),b.createElement(Ga,{defaultOpen:C,onOpenChange:z=>{!m&&!z||(z?E(!0):Ge(!0),R(z))},open:_},b.createElement(ud.Provider,{value:{activeSnapPoint:Se,snapPoints:a,setActiveSnapPoint:Be,drawerRef:re,overlayRef:A,onOpenChange:t,onPress:Ht,onRelease:an,onDrag:rn,dismissible:m,shouldAnimate:de,handleOnly:c,isOpen:_,isDragging:O,shouldFade:nn,closeDrawer:Ge,onNestedDrag:An,onNestedOpenChange:zt,onNestedRelease:Dt,keyboardIsOpen:le,modal:v,snapPointsOffset:$e,activeSnapPointIndex:je,direction:k,shouldScaleBackground:s,setBackgroundColorOnScale:i,noBodyStyles:S,container:F,autoFocus:V}},n))}const bd=b.forwardRef(function({...e},t){const{overlayRef:n,snapPoints:r,onRelease:o,shouldFade:a,isOpen:s,modal:i,shouldAnimate:l}=fr(),u=md(t,n),m=r&&r.length>0;if(!i)return null;const c=b.useCallback(p=>o(p),[o]);return b.createElement(uo,{onMouseUp:c,ref:u,"data-vaul-overlay":"","data-vaul-snap-points":s&&m?"true":"false","data-vaul-snap-points-overlay":s&&a?"true":"false","data-vaul-animate":l!=null&&l.current?"true":"false",...e})});bd.displayName="Drawer.Overlay";const wd=b.forwardRef(function({onPointerDownOutside:e,style:t,onOpenAutoFocus:n,...r},o){const{drawerRef:a,onPress:s,onRelease:i,onDrag:l,keyboardIsOpen:u,snapPointsOffset:m,activeSnapPointIndex:c,modal:p,isOpen:h,direction:y,snapPoints:g,container:v,handleOnly:w,shouldAnimate:x,autoFocus:S}=fr(),[k,C]=b.useState(!1),N=md(o,a),M=b.useRef(null),D=b.useRef(null),L=b.useRef(!1),B=g&&g.length>0;TS();const F=($,I,_=0)=>{if(L.current)return!0;const R=Math.abs($.y),P=Math.abs($.x),E=P>R,O=["bottom","right"].includes(I)?1:-1;if(I==="left"||I==="right"){if(!($.x*O<0)&&P>=0&&P<=_)return E}else if(!($.y*O<0)&&R>=0&&R<=_)return!E;return L.current=!0,!0};b.useEffect(()=>{B&&window.requestAnimationFrame(()=>{C(!0)})},[]);function V($){M.current=null,L.current=!1,i($)}return b.createElement(fo,{"data-vaul-drawer-direction":y,"data-vaul-drawer":"","data-vaul-delayed-snap-points":k?"true":"false","data-vaul-snap-points":h&&B?"true":"false","data-vaul-custom-container":v?"true":"false","data-vaul-animate":x!=null&&x.current?"true":"false",...r,ref:N,style:m&&m.length>0?{"--snap-point-height":`${m[c??0]}px`,...t}:t,onPointerDown:$=>{w||(r.onPointerDown==null||r.onPointerDown.call(r,$),M.current={x:$.pageX,y:$.pageY},s($))},onOpenAutoFocus:$=>{n==null||n($),S||$.preventDefault()},onPointerDownOutside:$=>{if(e==null||e($),!p||$.defaultPrevented){$.preventDefault();return}u.current&&(u.current=!1)},onFocusOutside:$=>{if(!p){$.preventDefault();return}},onPointerMove:$=>{if(D.current=$,w||(r.onPointerMove==null||r.onPointerMove.call(r,$),!M.current))return;const I=$.pageY-M.current.y,_=$.pageX-M.current.x,R=$.pointerType==="touch"?10:2;F({x:_,y:I},y,R)?l($):(Math.abs(_)>R||Math.abs(I)>R)&&(M.current=null)},onPointerUp:$=>{r.onPointerUp==null||r.onPointerUp.call(r,$),M.current=null,L.current=!1,i($)},onPointerOut:$=>{r.onPointerOut==null||r.onPointerOut.call(r,$),V(D.current)},onContextMenu:$=>{r.onContextMenu==null||r.onContextMenu.call(r,$),D.current&&V(D.current)}})});wd.displayName="Drawer.Content";const PS=250,AS=120,IS=b.forwardRef(function({preventCycle:e=!1,children:t,...n},r){const{closeDrawer:o,isDragging:a,snapPoints:s,activeSnapPoint:i,setActiveSnapPoint:l,dismissible:u,handleOnly:m,isOpen:c,onPress:p,onDrag:h}=fr(),y=b.useRef(null),g=b.useRef(!1);function v(){if(g.current){S();return}window.setTimeout(()=>{w()},AS)}function w(){if(a||e||g.current){S();return}if(S(),!s||s.length===0){u||o();return}if(i===s[s.length-1]&&u){o();return}const C=s.findIndex(M=>M===i);if(C===-1)return;const N=s[C+1];l(N)}function x(){y.current=window.setTimeout(()=>{g.current=!0},PS)}function S(){y.current&&window.clearTimeout(y.current),g.current=!1}return b.createElement("div",{onClick:v,onPointerCancel:S,onPointerDown:k=>{m&&p(k),x()},onPointerMove:k=>{m&&h(k)},ref:r,"data-vaul-drawer-visible":c?"true":"false","data-vaul-handle":"","aria-hidden":"true",...n},b.createElement("span",{"data-vaul-handle-hitarea":"","aria-hidden":"true"},t))});IS.displayName="Drawer.Handle";function jS(e){const t=fr(),{container:n=t.container,...r}=e;return b.createElement(Ua,{container:n,...r})}const lt={Root:_S,Content:wd,Overlay:bd,Trigger:vu,Portal:jS,Close:Ka,Title:qa,Description:Va},xd=({shouldScaleBackground:e=!0,...t})=>d.jsx(lt.Root,{shouldScaleBackground:e,...t});xd.displayName="Drawer";const $S=lt.Trigger,LS=lt.Portal,FS=lt.Close,Sd=f.forwardRef(({className:e,...t},n)=>d.jsx(lt.Overlay,{ref:n,className:q("fixed inset-0 z-50 bg-black/80",e),...t}));Sd.displayName=lt.Overlay.displayName;const Cd=f.forwardRef(({className:e,children:t,...n},r)=>d.jsxs(LS,{children:[d.jsx(Sd,{}),d.jsxs(lt.Content,{ref:r,className:q("fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-[10px] border bg-background",e),...n,children:[d.jsx("div",{className:"mx-auto mt-4 h-2 w-[100px] rounded-full bg-muted"}),t]})]}));Cd.displayName="DrawerContent";const Md=({className:e,...t})=>d.jsx("div",{className:q("grid gap-1.5 p-4 text-center sm:text-left",e),...t});Md.displayName="DrawerHeader";const Ed=({className:e,...t})=>d.jsx("div",{className:q("mt-auto flex flex-col gap-2 p-4",e),...t});Ed.displayName="DrawerFooter";const kd=f.forwardRef(({className:e,...t},n)=>d.jsx(lt.Title,{ref:n,className:q("text-lg font-semibold leading-none tracking-tight",e),...t}));kd.displayName=lt.Title.displayName;const Nd=f.forwardRef(({className:e,...t},n)=>d.jsx(lt.Description,{ref:n,className:q("text-sm text-muted-foreground",e),...t}));Nd.displayName=lt.Description.displayName;var Vo="rovingFocusGroup.onEntryFocus",WS={bubbles:!1,cancelable:!0},mr="RovingFocusGroup",[va,Dd,BS]=$a(mr),[YS,On]=Ye(mr,[BS]),[HS,zS]=YS(mr),Rd=f.forwardRef((e,t)=>d.jsx(va.Provider,{scope:e.__scopeRovingFocusGroup,children:d.jsx(va.Slot,{scope:e.__scopeRovingFocusGroup,children:d.jsx(GS,{...e,ref:t})})}));Rd.displayName=mr;var GS=f.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:a,currentTabStopId:s,defaultCurrentTabStopId:i,onCurrentTabStopIdChange:l,onEntryFocus:u,preventScrollOnEntryFocus:m=!1,...c}=e,p=f.useRef(null),h=he(t,p),y=ir(a),[g,v]=tt({prop:s,defaultProp:i??null,onChange:l,caller:mr}),[w,x]=f.useState(!1),S=et(u),k=Dd(n),C=f.useRef(!1),[N,M]=f.useState(0);return f.useEffect(()=>{const D=p.current;if(D)return D.addEventListener(Vo,S),()=>D.removeEventListener(Vo,S)},[S]),d.jsx(HS,{scope:n,orientation:r,dir:y,loop:o,currentTabStopId:g,onItemFocus:f.useCallback(D=>v(D),[v]),onItemShiftTab:f.useCallback(()=>x(!0),[]),onFocusableItemAdd:f.useCallback(()=>M(D=>D+1),[]),onFocusableItemRemove:f.useCallback(()=>M(D=>D-1),[]),children:d.jsx(te.div,{tabIndex:w||N===0?-1:0,"data-orientation":r,...c,ref:h,style:{outline:"none",...e.style},onMouseDown:K(e.onMouseDown,()=>{C.current=!0}),onFocus:K(e.onFocus,D=>{const L=!C.current;if(D.target===D.currentTarget&&L&&!w){const B=new CustomEvent(Vo,WS);if(D.currentTarget.dispatchEvent(B),!B.defaultPrevented){const F=k().filter(R=>R.focusable),V=F.find(R=>R.active),$=F.find(R=>R.id===g),_=[V,$,...F].filter(Boolean).map(R=>R.ref.current);_d(_,m)}}C.current=!1}),onBlur:K(e.onBlur,()=>x(!1))})})}),Td="RovingFocusGroupItem",Od=f.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:a,children:s,...i}=e,l=ke(),u=a||l,m=zS(Td,n),c=m.currentTabStopId===u,p=Dd(n),{onFocusableItemAdd:h,onFocusableItemRemove:y,currentTabStopId:g}=m;return f.useEffect(()=>{if(r)return h(),()=>y()},[r,h,y]),d.jsx(va.ItemSlot,{scope:n,id:u,focusable:r,active:o,children:d.jsx(te.span,{tabIndex:c?0:-1,"data-orientation":m.orientation,...i,ref:t,onMouseDown:K(e.onMouseDown,v=>{r?m.onItemFocus(u):v.preventDefault()}),onFocus:K(e.onFocus,()=>m.onItemFocus(u)),onKeyDown:K(e.onKeyDown,v=>{if(v.key==="Tab"&&v.shiftKey){m.onItemShiftTab();return}if(v.target!==v.currentTarget)return;const w=VS(v,m.orientation,m.dir);if(w!==void 0){if(v.metaKey||v.ctrlKey||v.altKey||v.shiftKey)return;v.preventDefault();let S=p().filter(k=>k.focusable).map(k=>k.ref.current);if(w==="last")S.reverse();else if(w==="prev"||w==="next"){w==="prev"&&S.reverse();const k=S.indexOf(v.currentTarget);S=m.loop?KS(S,k+1):S.slice(k+1)}setTimeout(()=>_d(S))}}),children:typeof s=="function"?s({isCurrentTabStop:c,hasTabStop:g!=null}):s})})});Od.displayName=Td;var US={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function qS(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function VS(e,t,n){const r=qS(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return US[r]}function _d(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function KS(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var os=Rd,as=Od,ya=["Enter"," "],XS=["ArrowDown","PageUp","Home"],Pd=["ArrowUp","PageDown","End"],ZS=[...XS,...Pd],QS={ltr:[...ya,"ArrowRight"],rtl:[...ya,"ArrowLeft"]},JS={ltr:["ArrowLeft"],rtl:["ArrowRight"]},pr="Menu",[Xn,e1,t1]=$a(pr),[tn,Ad]=Ye(pr,[t1,$t,On]),hr=$t(),Id=On(),[jd,Bt]=tn(pr),[n1,gr]=tn(pr),$d=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:o,onOpenChange:a,modal:s=!0}=e,i=hr(t),[l,u]=f.useState(null),m=f.useRef(!1),c=et(a),p=ir(o);return f.useEffect(()=>{const h=()=>{m.current=!0,document.addEventListener("pointerdown",y,{capture:!0,once:!0}),document.addEventListener("pointermove",y,{capture:!0,once:!0})},y=()=>m.current=!1;return document.addEventListener("keydown",h,{capture:!0}),()=>{document.removeEventListener("keydown",h,{capture:!0}),document.removeEventListener("pointerdown",y,{capture:!0}),document.removeEventListener("pointermove",y,{capture:!0})}},[]),d.jsx(nr,{...i,children:d.jsx(jd,{scope:t,open:n,onOpenChange:c,content:l,onContentChange:u,children:d.jsx(n1,{scope:t,onClose:f.useCallback(()=>c(!1),[c]),isUsingKeyboardRef:m,dir:p,modal:s,children:r})})})};$d.displayName=pr;var r1="MenuAnchor",ss=f.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=hr(n);return d.jsx(rr,{...o,...r,ref:t})});ss.displayName=r1;var is="MenuPortal",[o1,Ld]=tn(is,{forceMount:void 0}),Fd=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:o}=e,a=Bt(is,t);return d.jsx(o1,{scope:t,forceMount:n,children:d.jsx(He,{present:n||a.open,children:d.jsx(or,{asChild:!0,container:o,children:r})})})};Fd.displayName=is;var Je="MenuContent",[a1,cs]=tn(Je),Wd=f.forwardRef((e,t)=>{const n=Ld(Je,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,a=Bt(Je,e.__scopeMenu),s=gr(Je,e.__scopeMenu);return d.jsx(Xn.Provider,{scope:e.__scopeMenu,children:d.jsx(He,{present:r||a.open,children:d.jsx(Xn.Slot,{scope:e.__scopeMenu,children:s.modal?d.jsx(s1,{...o,ref:t}):d.jsx(i1,{...o,ref:t})})})})}),s1=f.forwardRef((e,t)=>{const n=Bt(Je,e.__scopeMenu),r=f.useRef(null),o=he(t,r);return f.useEffect(()=>{const a=r.current;if(a)return no(a)},[]),d.jsx(ls,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:K(e.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),i1=f.forwardRef((e,t)=>{const n=Bt(Je,e.__scopeMenu);return d.jsx(ls,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),c1=Pt("MenuContent.ScrollLock"),ls=f.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:o,onOpenAutoFocus:a,onCloseAutoFocus:s,disableOutsidePointerEvents:i,onEntryFocus:l,onEscapeKeyDown:u,onPointerDownOutside:m,onFocusOutside:c,onInteractOutside:p,onDismiss:h,disableOutsideScroll:y,...g}=e,v=Bt(Je,n),w=gr(Je,n),x=hr(n),S=Id(n),k=e1(n),[C,N]=f.useState(null),M=f.useRef(null),D=he(t,M,v.onContentChange),L=f.useRef(0),B=f.useRef(""),F=f.useRef(0),V=f.useRef(null),$=f.useRef("right"),I=f.useRef(0),_=y?ar:f.Fragment,R=y?{as:c1,allowPinchZoom:!0}:void 0,P=O=>{var j,Z;const Y=B.current+O,G=k().filter(X=>!X.disabled),T=document.activeElement,A=(j=G.find(X=>X.ref.current===T))==null?void 0:j.textValue,W=G.map(X=>X.textValue),H=w1(W,Y,A),U=(Z=G.find(X=>X.textValue===H))==null?void 0:Z.ref.current;(function X(Q){B.current=Q,window.clearTimeout(L.current),Q!==""&&(L.current=window.setTimeout(()=>X(""),1e3))})(Y),U&&setTimeout(()=>U.focus())};f.useEffect(()=>()=>window.clearTimeout(L.current),[]),Xr();const E=f.useCallback(O=>{var G,T;return $.current===((G=V.current)==null?void 0:G.side)&&S1(O,(T=V.current)==null?void 0:T.area)},[]);return d.jsx(a1,{scope:n,searchRef:B,onItemEnter:f.useCallback(O=>{E(O)&&O.preventDefault()},[E]),onItemLeave:f.useCallback(O=>{var Y;E(O)||((Y=M.current)==null||Y.focus(),N(null))},[E]),onTriggerLeave:f.useCallback(O=>{E(O)&&O.preventDefault()},[E]),pointerGraceTimerRef:F,onPointerGraceIntentChange:f.useCallback(O=>{V.current=O},[]),children:d.jsx(_,{...R,children:d.jsx(er,{asChild:!0,trapped:o,onMountAutoFocus:K(a,O=>{var Y;O.preventDefault(),(Y=M.current)==null||Y.focus({preventScroll:!0})}),onUnmountAutoFocus:s,children:d.jsx(kn,{asChild:!0,disableOutsidePointerEvents:i,onEscapeKeyDown:u,onPointerDownOutside:m,onFocusOutside:c,onInteractOutside:p,onDismiss:h,children:d.jsx(os,{asChild:!0,...S,dir:w.dir,orientation:"vertical",loop:r,currentTabStopId:C,onCurrentTabStopIdChange:N,onEntryFocus:K(l,O=>{w.isUsingKeyboardRef.current||O.preventDefault()}),preventScrollOnEntryFocus:!0,children:d.jsx(eo,{role:"menu","aria-orientation":"vertical","data-state":rf(v.open),"data-radix-menu-content":"",dir:w.dir,...x,...g,ref:D,style:{outline:"none",...g.style},onKeyDown:K(g.onKeyDown,O=>{const G=O.target.closest("[data-radix-menu-content]")===O.currentTarget,T=O.ctrlKey||O.altKey||O.metaKey,A=O.key.length===1;G&&(O.key==="Tab"&&O.preventDefault(),!T&&A&&P(O.key));const W=M.current;if(O.target!==W||!ZS.includes(O.key))return;O.preventDefault();const U=k().filter(j=>!j.disabled).map(j=>j.ref.current);Pd.includes(O.key)&&U.reverse(),y1(U)}),onBlur:K(e.onBlur,O=>{O.currentTarget.contains(O.target)||(window.clearTimeout(L.current),B.current="")}),onPointerMove:K(e.onPointerMove,Zn(O=>{const Y=O.target,G=I.current!==O.clientX;if(O.currentTarget.contains(Y)&&G){const T=O.clientX>I.current?"right":"left";$.current=T,I.current=O.clientX}}))})})})})})})});Wd.displayName=Je;var l1="MenuGroup",us=f.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return d.jsx(te.div,{role:"group",...r,ref:t})});us.displayName=l1;var u1="MenuLabel",Bd=f.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return d.jsx(te.div,{...r,ref:t})});Bd.displayName=u1;var Gr="MenuItem",wi="menu.itemSelect",go=f.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...o}=e,a=f.useRef(null),s=gr(Gr,e.__scopeMenu),i=cs(Gr,e.__scopeMenu),l=he(t,a),u=f.useRef(!1),m=()=>{const c=a.current;if(!n&&c){const p=new CustomEvent(wi,{bubbles:!0,cancelable:!0});c.addEventListener(wi,h=>r==null?void 0:r(h),{once:!0}),Fi(c,p),p.defaultPrevented?u.current=!1:s.onClose()}};return d.jsx(Yd,{...o,ref:l,disabled:n,onClick:K(e.onClick,m),onPointerDown:c=>{var p;(p=e.onPointerDown)==null||p.call(e,c),u.current=!0},onPointerUp:K(e.onPointerUp,c=>{var p;u.current||(p=c.currentTarget)==null||p.click()}),onKeyDown:K(e.onKeyDown,c=>{const p=i.searchRef.current!=="";n||p&&c.key===" "||ya.includes(c.key)&&(c.currentTarget.click(),c.preventDefault())})})});go.displayName=Gr;var Yd=f.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:o,...a}=e,s=cs(Gr,n),i=Id(n),l=f.useRef(null),u=he(t,l),[m,c]=f.useState(!1),[p,h]=f.useState("");return f.useEffect(()=>{const y=l.current;y&&h((y.textContent??"").trim())},[a.children]),d.jsx(Xn.ItemSlot,{scope:n,disabled:r,textValue:o??p,children:d.jsx(as,{asChild:!0,...i,focusable:!r,children:d.jsx(te.div,{role:"menuitem","data-highlighted":m?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...a,ref:u,onPointerMove:K(e.onPointerMove,Zn(y=>{r?s.onItemLeave(y):(s.onItemEnter(y),y.defaultPrevented||y.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:K(e.onPointerLeave,Zn(y=>s.onItemLeave(y))),onFocus:K(e.onFocus,()=>c(!0)),onBlur:K(e.onBlur,()=>c(!1))})})})}),d1="MenuCheckboxItem",Hd=f.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...o}=e;return d.jsx(Vd,{scope:e.__scopeMenu,checked:n,children:d.jsx(go,{role:"menuitemcheckbox","aria-checked":Ur(n)?"mixed":n,...o,ref:t,"data-state":ms(n),onSelect:K(o.onSelect,()=>r==null?void 0:r(Ur(n)?!0:!n),{checkForDefaultPrevented:!1})})})});Hd.displayName=d1;var zd="MenuRadioGroup",[f1,m1]=tn(zd,{value:void 0,onValueChange:()=>{}}),Gd=f.forwardRef((e,t)=>{const{value:n,onValueChange:r,...o}=e,a=et(r);return d.jsx(f1,{scope:e.__scopeMenu,value:n,onValueChange:a,children:d.jsx(us,{...o,ref:t})})});Gd.displayName=zd;var Ud="MenuRadioItem",qd=f.forwardRef((e,t)=>{const{value:n,...r}=e,o=m1(Ud,e.__scopeMenu),a=n===o.value;return d.jsx(Vd,{scope:e.__scopeMenu,checked:a,children:d.jsx(go,{role:"menuitemradio","aria-checked":a,...r,ref:t,"data-state":ms(a),onSelect:K(r.onSelect,()=>{var s;return(s=o.onValueChange)==null?void 0:s.call(o,n)},{checkForDefaultPrevented:!1})})})});qd.displayName=Ud;var ds="MenuItemIndicator",[Vd,p1]=tn(ds,{checked:!1}),Kd=f.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...o}=e,a=p1(ds,n);return d.jsx(He,{present:r||Ur(a.checked)||a.checked===!0,children:d.jsx(te.span,{...o,ref:t,"data-state":ms(a.checked)})})});Kd.displayName=ds;var h1="MenuSeparator",Xd=f.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return d.jsx(te.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});Xd.displayName=h1;var g1="MenuArrow",Zd=f.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=hr(n);return d.jsx(to,{...o,...r,ref:t})});Zd.displayName=g1;var fs="MenuSub",[v1,Qd]=tn(fs),Jd=e=>{const{__scopeMenu:t,children:n,open:r=!1,onOpenChange:o}=e,a=Bt(fs,t),s=hr(t),[i,l]=f.useState(null),[u,m]=f.useState(null),c=et(o);return f.useEffect(()=>(a.open===!1&&c(!1),()=>c(!1)),[a.open,c]),d.jsx(nr,{...s,children:d.jsx(jd,{scope:t,open:r,onOpenChange:c,content:u,onContentChange:m,children:d.jsx(v1,{scope:t,contentId:ke(),triggerId:ke(),trigger:i,onTriggerChange:l,children:n})})})};Jd.displayName=fs;var zn="MenuSubTrigger",ef=f.forwardRef((e,t)=>{const n=Bt(zn,e.__scopeMenu),r=gr(zn,e.__scopeMenu),o=Qd(zn,e.__scopeMenu),a=cs(zn,e.__scopeMenu),s=f.useRef(null),{pointerGraceTimerRef:i,onPointerGraceIntentChange:l}=a,u={__scopeMenu:e.__scopeMenu},m=f.useCallback(()=>{s.current&&window.clearTimeout(s.current),s.current=null},[]);return f.useEffect(()=>m,[m]),f.useEffect(()=>{const c=i.current;return()=>{window.clearTimeout(c),l(null)}},[i,l]),d.jsx(ss,{asChild:!0,...u,children:d.jsx(Yd,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":o.contentId,"data-state":rf(n.open),...e,ref:Ct(t,o.onTriggerChange),onClick:c=>{var p;(p=e.onClick)==null||p.call(e,c),!(e.disabled||c.defaultPrevented)&&(c.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:K(e.onPointerMove,Zn(c=>{a.onItemEnter(c),!c.defaultPrevented&&!e.disabled&&!n.open&&!s.current&&(a.onPointerGraceIntentChange(null),s.current=window.setTimeout(()=>{n.onOpenChange(!0),m()},100))})),onPointerLeave:K(e.onPointerLeave,Zn(c=>{var h,y;m();const p=(h=n.content)==null?void 0:h.getBoundingClientRect();if(p){const g=(y=n.content)==null?void 0:y.dataset.side,v=g==="right",w=v?-5:5,x=p[v?"left":"right"],S=p[v?"right":"left"];a.onPointerGraceIntentChange({area:[{x:c.clientX+w,y:c.clientY},{x,y:p.top},{x:S,y:p.top},{x:S,y:p.bottom},{x,y:p.bottom}],side:g}),window.clearTimeout(i.current),i.current=window.setTimeout(()=>a.onPointerGraceIntentChange(null),300)}else{if(a.onTriggerLeave(c),c.defaultPrevented)return;a.onPointerGraceIntentChange(null)}})),onKeyDown:K(e.onKeyDown,c=>{var h;const p=a.searchRef.current!=="";e.disabled||p&&c.key===" "||QS[r.dir].includes(c.key)&&(n.onOpenChange(!0),(h=n.content)==null||h.focus(),c.preventDefault())})})})});ef.displayName=zn;var tf="MenuSubContent",nf=f.forwardRef((e,t)=>{const n=Ld(Je,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,a=Bt(Je,e.__scopeMenu),s=gr(Je,e.__scopeMenu),i=Qd(tf,e.__scopeMenu),l=f.useRef(null),u=he(t,l);return d.jsx(Xn.Provider,{scope:e.__scopeMenu,children:d.jsx(He,{present:r||a.open,children:d.jsx(Xn.Slot,{scope:e.__scopeMenu,children:d.jsx(ls,{id:i.contentId,"aria-labelledby":i.triggerId,...o,ref:u,align:"start",side:s.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:m=>{var c;s.isUsingKeyboardRef.current&&((c=l.current)==null||c.focus()),m.preventDefault()},onCloseAutoFocus:m=>m.preventDefault(),onFocusOutside:K(e.onFocusOutside,m=>{m.target!==i.trigger&&a.onOpenChange(!1)}),onEscapeKeyDown:K(e.onEscapeKeyDown,m=>{s.onClose(),m.preventDefault()}),onKeyDown:K(e.onKeyDown,m=>{var h;const c=m.currentTarget.contains(m.target),p=JS[s.dir].includes(m.key);c&&p&&(a.onOpenChange(!1),(h=i.trigger)==null||h.focus(),m.preventDefault())})})})})})});nf.displayName=tf;function rf(e){return e?"open":"closed"}function Ur(e){return e==="indeterminate"}function ms(e){return Ur(e)?"indeterminate":e?"checked":"unchecked"}function y1(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function b1(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function w1(e,t,n){const o=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,a=n?e.indexOf(n):-1;let s=b1(e,Math.max(a,0));o.length===1&&(s=s.filter(u=>u!==n));const l=s.find(u=>u.toLowerCase().startsWith(o.toLowerCase()));return l!==n?l:void 0}function x1(e,t){const{x:n,y:r}=e;let o=!1;for(let a=0,s=t.length-1;a<t.length;s=a++){const i=t[a],l=t[s],u=i.x,m=i.y,c=l.x,p=l.y;m>r!=p>r&&n<(c-u)*(r-m)/(p-m)+u&&(o=!o)}return o}function S1(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return x1(n,t)}function Zn(e){return t=>t.pointerType==="mouse"?e(t):void 0}var C1=$d,M1=ss,E1=Fd,k1=Wd,N1=us,D1=Bd,R1=go,T1=Hd,O1=Gd,_1=qd,P1=Kd,A1=Xd,I1=Zd,j1=Jd,$1=ef,L1=nf,vo="DropdownMenu",[F1,AM]=Ye(vo,[Ad]),Fe=Ad(),[W1,of]=F1(vo),af=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:o,defaultOpen:a,onOpenChange:s,modal:i=!0}=e,l=Fe(t),u=f.useRef(null),[m,c]=tt({prop:o,defaultProp:a??!1,onChange:s,caller:vo});return d.jsx(W1,{scope:t,triggerId:ke(),triggerRef:u,contentId:ke(),open:m,onOpenChange:c,onOpenToggle:f.useCallback(()=>c(p=>!p),[c]),modal:i,children:d.jsx(C1,{...l,open:m,onOpenChange:c,dir:r,modal:i,children:n})})};af.displayName=vo;var sf="DropdownMenuTrigger",cf=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...o}=e,a=of(sf,n),s=Fe(n);return d.jsx(M1,{asChild:!0,...s,children:d.jsx(te.button,{type:"button",id:a.triggerId,"aria-haspopup":"menu","aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":a.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...o,ref:Ct(t,a.triggerRef),onPointerDown:K(e.onPointerDown,i=>{!r&&i.button===0&&i.ctrlKey===!1&&(a.onOpenToggle(),a.open||i.preventDefault())}),onKeyDown:K(e.onKeyDown,i=>{r||(["Enter"," "].includes(i.key)&&a.onOpenToggle(),i.key==="ArrowDown"&&a.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(i.key)&&i.preventDefault())})})})});cf.displayName=sf;var B1="DropdownMenuPortal",lf=e=>{const{__scopeDropdownMenu:t,...n}=e,r=Fe(t);return d.jsx(E1,{...r,...n})};lf.displayName=B1;var uf="DropdownMenuContent",df=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=of(uf,n),a=Fe(n),s=f.useRef(!1);return d.jsx(k1,{id:o.contentId,"aria-labelledby":o.triggerId,...a,...r,ref:t,onCloseAutoFocus:K(e.onCloseAutoFocus,i=>{var l;s.current||(l=o.triggerRef.current)==null||l.focus(),s.current=!1,i.preventDefault()}),onInteractOutside:K(e.onInteractOutside,i=>{const l=i.detail.originalEvent,u=l.button===0&&l.ctrlKey===!0,m=l.button===2||u;(!o.modal||m)&&(s.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});df.displayName=uf;var Y1="DropdownMenuGroup",ff=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Fe(n);return d.jsx(N1,{...o,...r,ref:t})});ff.displayName=Y1;var H1="DropdownMenuLabel",mf=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Fe(n);return d.jsx(D1,{...o,...r,ref:t})});mf.displayName=H1;var z1="DropdownMenuItem",pf=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Fe(n);return d.jsx(R1,{...o,...r,ref:t})});pf.displayName=z1;var G1="DropdownMenuCheckboxItem",hf=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Fe(n);return d.jsx(T1,{...o,...r,ref:t})});hf.displayName=G1;var U1="DropdownMenuRadioGroup",gf=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Fe(n);return d.jsx(O1,{...o,...r,ref:t})});gf.displayName=U1;var q1="DropdownMenuRadioItem",vf=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Fe(n);return d.jsx(_1,{...o,...r,ref:t})});vf.displayName=q1;var V1="DropdownMenuItemIndicator",yf=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Fe(n);return d.jsx(P1,{...o,...r,ref:t})});yf.displayName=V1;var K1="DropdownMenuSeparator",bf=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Fe(n);return d.jsx(A1,{...o,...r,ref:t})});bf.displayName=K1;var X1="DropdownMenuArrow",Z1=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Fe(n);return d.jsx(I1,{...o,...r,ref:t})});Z1.displayName=X1;var Q1=e=>{const{__scopeDropdownMenu:t,children:n,open:r,onOpenChange:o,defaultOpen:a}=e,s=Fe(t),[i,l]=tt({prop:r,defaultProp:a??!1,onChange:o,caller:"DropdownMenuSub"});return d.jsx(j1,{...s,open:i,onOpenChange:l,children:n})},J1="DropdownMenuSubTrigger",wf=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Fe(n);return d.jsx($1,{...o,...r,ref:t})});wf.displayName=J1;var eC="DropdownMenuSubContent",xf=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Fe(n);return d.jsx(L1,{...o,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});xf.displayName=eC;var tC=af,nC=cf,rC=lf,Sf=df,oC=ff,Cf=mf,Mf=pf,Ef=hf,aC=gf,kf=vf,Nf=yf,Df=bf,sC=Q1,Rf=wf,Tf=xf;const iC=tC,cC=nC,lC=oC,uC=sC,dC=aC,Of=f.forwardRef(({className:e,inset:t,children:n,...r},o)=>d.jsxs(Rf,{ref:o,className:q("flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",t&&"pl-8",e),...r,children:[n,d.jsx(Hi,{className:"ml-auto"})]}));Of.displayName=Rf.displayName;const _f=f.forwardRef(({className:e,...t},n)=>d.jsx(Tf,{ref:n,className:q("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-dropdown-menu-content-transform-origin]",e),...t}));_f.displayName=Tf.displayName;const Pf=f.forwardRef(({className:e,sideOffset:t=4,...n},r)=>d.jsx(rC,{children:d.jsx(Sf,{ref:r,sideOffset:t,className:q("z-50 max-h-[var(--radix-dropdown-menu-content-available-height)] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-dropdown-menu-content-transform-origin]",e),...n})}));Pf.displayName=Sf.displayName;const Af=f.forwardRef(({className:e,inset:t,...n},r)=>d.jsx(Mf,{ref:r,className:q("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",t&&"pl-8",e),...n}));Af.displayName=Mf.displayName;const If=f.forwardRef(({className:e,children:t,checked:n,...r},o)=>d.jsxs(Ef,{ref:o,className:q("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:n,...r,children:[d.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:d.jsx(Nf,{children:d.jsx(Jn,{className:"h-4 w-4"})})}),t]}));If.displayName=Ef.displayName;const jf=f.forwardRef(({className:e,children:t,...n},r)=>d.jsxs(kf,{ref:r,className:q("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[d.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:d.jsx(Nf,{children:d.jsx(zi,{className:"h-2 w-2 fill-current"})})}),t]}));jf.displayName=kf.displayName;const $f=f.forwardRef(({className:e,inset:t,...n},r)=>d.jsx(Cf,{ref:r,className:q("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...n}));$f.displayName=Cf.displayName;const Lf=f.forwardRef(({className:e,...t},n)=>d.jsx(Df,{ref:n,className:q("-mx-1 my-1 h-px bg-muted",e),...t}));Lf.displayName=Df.displayName;const Ff=({className:e,...t})=>d.jsx("span",{className:q("ml-auto text-xs tracking-widest opacity-60",e),...t});Ff.displayName="DropdownMenuShortcut";var ps="Radio",[fC,Wf]=Ye(ps),[mC,pC]=fC(ps),Bf=f.forwardRef((e,t)=>{const{__scopeRadio:n,name:r,checked:o=!1,required:a,disabled:s,value:i="on",onCheck:l,form:u,...m}=e,[c,p]=f.useState(null),h=he(t,v=>p(v)),y=f.useRef(!1),g=c?u||!!c.closest("form"):!0;return d.jsxs(mC,{scope:n,checked:o,disabled:s,children:[d.jsx(te.button,{type:"button",role:"radio","aria-checked":o,"data-state":Gf(o),"data-disabled":s?"":void 0,disabled:s,value:i,...m,ref:h,onClick:K(e.onClick,v=>{o||l==null||l(),g&&(y.current=v.isPropagationStopped(),y.current||v.stopPropagation())})}),g&&d.jsx(zf,{control:c,bubbles:!y.current,name:r,value:i,checked:o,required:a,disabled:s,form:u,style:{transform:"translateX(-100%)"}})]})});Bf.displayName=ps;var Yf="RadioIndicator",Hf=f.forwardRef((e,t)=>{const{__scopeRadio:n,forceMount:r,...o}=e,a=pC(Yf,n);return d.jsx(He,{present:r||a.checked,children:d.jsx(te.span,{"data-state":Gf(a.checked),"data-disabled":a.disabled?"":void 0,...o,ref:t})})});Hf.displayName=Yf;var hC="RadioBubbleInput",zf=f.forwardRef(({__scopeRadio:e,control:t,checked:n,bubbles:r=!0,...o},a)=>{const s=f.useRef(null),i=he(s,a),l=La(n),u=_a(t);return f.useEffect(()=>{const m=s.current;if(!m)return;const c=window.HTMLInputElement.prototype,h=Object.getOwnPropertyDescriptor(c,"checked").set;if(l!==n&&h){const y=new Event("click",{bubbles:r});h.call(m,n),m.dispatchEvent(y)}},[l,n,r]),d.jsx(te.input,{type:"radio","aria-hidden":!0,defaultChecked:n,...o,tabIndex:-1,ref:i,style:{...o.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});zf.displayName=hC;function Gf(e){return e?"checked":"unchecked"}var gC=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],yo="RadioGroup",[vC,IM]=Ye(yo,[On,Wf]),Uf=On(),qf=Wf(),[yC,bC]=vC(yo),Vf=f.forwardRef((e,t)=>{const{__scopeRadioGroup:n,name:r,defaultValue:o,value:a,required:s=!1,disabled:i=!1,orientation:l,dir:u,loop:m=!0,onValueChange:c,...p}=e,h=Uf(n),y=ir(u),[g,v]=tt({prop:a,defaultProp:o??null,onChange:c,caller:yo});return d.jsx(yC,{scope:n,name:r,required:s,disabled:i,value:g,onValueChange:v,children:d.jsx(os,{asChild:!0,...h,orientation:l,dir:y,loop:m,children:d.jsx(te.div,{role:"radiogroup","aria-required":s,"aria-orientation":l,"data-disabled":i?"":void 0,dir:y,...p,ref:t})})})});Vf.displayName=yo;var Kf="RadioGroupItem",Xf=f.forwardRef((e,t)=>{const{__scopeRadioGroup:n,disabled:r,...o}=e,a=bC(Kf,n),s=a.disabled||r,i=Uf(n),l=qf(n),u=f.useRef(null),m=he(t,u),c=a.value===o.value,p=f.useRef(!1);return f.useEffect(()=>{const h=g=>{gC.includes(g.key)&&(p.current=!0)},y=()=>p.current=!1;return document.addEventListener("keydown",h),document.addEventListener("keyup",y),()=>{document.removeEventListener("keydown",h),document.removeEventListener("keyup",y)}},[]),d.jsx(as,{asChild:!0,...i,focusable:!s,active:c,children:d.jsx(Bf,{disabled:s,required:a.required,checked:c,...l,...o,name:a.name,ref:m,onCheck:()=>a.onValueChange(o.value),onKeyDown:K(h=>{h.key==="Enter"&&h.preventDefault()}),onFocus:K(o.onFocus,()=>{var h;p.current&&((h=u.current)==null||h.click())})})})});Xf.displayName=Kf;var wC="RadioGroupIndicator",Zf=f.forwardRef((e,t)=>{const{__scopeRadioGroup:n,...r}=e,o=qf(n);return d.jsx(Hf,{...o,...r,ref:t})});Zf.displayName=wC;var Qf=Vf,Jf=Xf,xC=Zf;const em=f.forwardRef(({className:e,...t},n)=>d.jsx(Qf,{ref:n,className:q("grid gap-2",e),...t}));em.displayName=Qf.displayName;const tm=f.forwardRef(({className:e,...t},n)=>d.jsx(Jf,{ref:n,className:q(`
199
+ ){opacity:0}[data-vaul-overlay][data-vaul-snap-points-overlay=true]{opacity:1}[data-vaul-handle]{display:block;position:relative;opacity:.7;background:#e2e2e4;margin-left:auto;margin-right:auto;height:5px;width:32px;border-radius:1rem;touch-action:pan-y}[data-vaul-handle]:active,[data-vaul-handle]:hover{opacity:1}[data-vaul-handle-hitarea]{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);width:max(100%,2.75rem);height:max(100%,2.75rem);touch-action:inherit}@media (hover:hover) and (pointer:fine){[data-vaul-drawer]{user-select:none}}@media (pointer:fine){[data-vaul-handle-hitarea]:{width:100%;height:100%}}@keyframes fadeIn{from{opacity:0}to{opacity:1}}@keyframes fadeOut{to{opacity:0}}@keyframes slideFromBottom{from{transform:translate3d(0,var(--initial-transform,100%),0)}to{transform:translate3d(0,0,0)}}@keyframes slideToBottom{to{transform:translate3d(0,var(--initial-transform,100%),0)}}@keyframes slideFromTop{from{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}to{transform:translate3d(0,0,0)}}@keyframes slideToTop{to{transform:translate3d(0,calc(var(--initial-transform,100%) * -1),0)}}@keyframes slideFromLeft{from{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToLeft{to{transform:translate3d(calc(var(--initial-transform,100%) * -1),0,0)}}@keyframes slideFromRight{from{transform:translate3d(var(--initial-transform,100%),0,0)}to{transform:translate3d(0,0,0)}}@keyframes slideToRight{to{transform:translate3d(var(--initial-transform,100%),0,0)}}`);function I1(){const e=navigator.userAgent;return typeof window<"u"&&(/Firefox/.test(e)&&/Mobile/.test(e)||/FxiOS/.test(e))}function j1(){return ds(/^Mac/)}function $1(){return ds(/^iPhone/)}function Ei(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}function L1(){return ds(/^iPad/)||j1()&&navigator.maxTouchPoints>1}function kd(){return $1()||L1()}function ds(e){return typeof window<"u"&&window.navigator!=null?e.test(window.navigator.platform):void 0}const F1=24,W1=typeof window<"u"?x.useLayoutEffect:x.useEffect;function Ni(...e){return(...t)=>{for(let n of e)typeof n=="function"&&n(...t)}}const Vo=typeof document<"u"&&window.visualViewport;function Ri(e){let t=window.getComputedStyle(e);return/(auto|scroll)/.test(t.overflow+t.overflowX+t.overflowY)}function Ed(e){for(Ri(e)&&(e=e.parentElement);e&&!Ri(e);)e=e.parentElement;return e||document.scrollingElement||document.documentElement}const B1=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);let Rr=0,Ko;function Y1(e={}){let{isDisabled:t}=e;W1(()=>{if(!t)return Rr++,Rr===1&&kd()&&(Ko=H1()),()=>{Rr--,Rr===0&&(Ko==null||Ko())}},[t])}function H1(){let e,t=0,n=c=>{e=Ed(c.target),!(e===document.documentElement&&e===document.body)&&(t=c.changedTouches[0].pageY)},r=c=>{if(!e||e===document.documentElement||e===document.body){c.preventDefault();return}let p=c.changedTouches[0].pageY,h=e.scrollTop,y=e.scrollHeight-e.clientHeight;y!==0&&((h<=0&&p>t||h>=y&&p<t)&&c.preventDefault(),t=p)},o=c=>{let p=c.target;ba(p)&&p!==document.activeElement&&(c.preventDefault(),p.style.transform="translateY(-2000px)",p.focus(),requestAnimationFrame(()=>{p.style.transform=""}))},a=c=>{let p=c.target;ba(p)&&(p.style.transform="translateY(-2000px)",requestAnimationFrame(()=>{p.style.transform="",Vo&&(Vo.height<window.innerHeight?requestAnimationFrame(()=>{Ti(p)}):Vo.addEventListener("resize",()=>Ti(p),{once:!0}))}))},s=()=>{window.scrollTo(0,0)},i=window.pageXOffset,l=window.pageYOffset,u=Ni(z1(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`));window.scrollTo(0,0);let m=Ni(Wn(document,"touchstart",n,{passive:!1,capture:!0}),Wn(document,"touchmove",r,{passive:!1,capture:!0}),Wn(document,"touchend",o,{passive:!1,capture:!0}),Wn(document,"focus",a,!0),Wn(window,"scroll",s));return()=>{u(),m(),window.scrollTo(i,l)}}function z1(e,t,n){let r=e.style[t];return e.style[t]=n,()=>{e.style[t]=r}}function Wn(e,t,n,r){return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}}function Ti(e){let t=document.scrollingElement||document.documentElement;for(;e&&e!==t;){let n=Ed(e);if(n!==document.documentElement&&n!==document.body&&n!==e){let r=n.getBoundingClientRect().top,o=e.getBoundingClientRect().top,a=e.getBoundingClientRect().bottom;const s=n.getBoundingClientRect().bottom+F1;a>s&&(n.scrollTop+=o-r)}e=n.parentElement}}function ba(e){return e instanceof HTMLInputElement&&!B1.has(e.type)||e instanceof HTMLTextAreaElement||e instanceof HTMLElement&&e.isContentEditable}function G1(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function U1(...e){return t=>e.forEach(n=>G1(n,t))}function Nd(...e){return f.useCallback(U1(...e),e)}const Rd=new WeakMap;function Oe(e,t,n=!1){if(!e||!(e instanceof HTMLElement))return;let r={};Object.entries(t).forEach(([o,a])=>{if(o.startsWith("--")){e.style.setProperty(o,a);return}r[o]=e.style[o],e.style[o]=a}),!n&&Rd.set(e,r)}function q1(e,t){if(!e||!(e instanceof HTMLElement))return;let n=Rd.get(e);n&&(e.style[t]=n[t])}const Ee=e=>{switch(e){case"top":case"bottom":return!0;case"left":case"right":return!1;default:return e}};function Tr(e,t){if(!e)return null;const n=window.getComputedStyle(e),r=n.transform||n.webkitTransform||n.mozTransform;let o=r.match(/^matrix3d\((.+)\)$/);return o?parseFloat(o[1].split(", ")[Ee(t)?13:12]):(o=r.match(/^matrix\((.+)\)$/),o?parseFloat(o[1].split(", ")[Ee(t)?5:4]):null)}function V1(e){return 8*(Math.log(e+1)-2)}function Xo(e,t){if(!e)return()=>{};const n=e.style.cssText;return Object.assign(e.style,t),()=>{e.style.cssText=n}}function K1(...e){return(...t)=>{for(const n of e)typeof n=="function"&&n(...t)}}const Me={DURATION:.5,EASE:[.32,.72,0,1]},Td=.4,X1=.25,Z1=100,_d=8,Kt=16,wa=26,Zo="vaul-dragging";function Od(e){const t=x.useRef(e);return x.useEffect(()=>{t.current=e}),x.useMemo(()=>(...n)=>t.current==null?void 0:t.current.call(t,...n),[])}function Q1({defaultProp:e,onChange:t}){const n=x.useState(e),[r]=n,o=x.useRef(r),a=Od(t);return x.useEffect(()=>{o.current!==r&&(a(r),o.current=r)},[r,o,a]),n}function Pd({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=Q1({defaultProp:t,onChange:n}),a=e!==void 0,s=a?e:r,i=Od(n),l=x.useCallback(u=>{if(a){const c=typeof u=="function"?u(e):u;c!==e&&i(c)}else o(u)},[a,e,o,i]);return[s,l]}function J1({activeSnapPointProp:e,setActiveSnapPointProp:t,snapPoints:n,drawerRef:r,overlayRef:o,fadeFromIndex:a,onSnapPointChange:s,direction:i="bottom",container:l,snapToSequentialPoint:u}){const[m,c]=Pd({prop:e,defaultProp:n==null?void 0:n[0],onChange:t}),[p,h]=x.useState(typeof window<"u"?{innerWidth:window.innerWidth,innerHeight:window.innerHeight}:void 0);x.useEffect(()=>{function M(){h({innerWidth:window.innerWidth,innerHeight:window.innerHeight})}return window.addEventListener("resize",M),()=>window.removeEventListener("resize",M)},[]);const y=x.useMemo(()=>m===(n==null?void 0:n[n.length-1])||null,[n,m]),v=x.useMemo(()=>{var M;return(M=n==null?void 0:n.findIndex(E=>E===m))!=null?M:null},[n,m]),g=n&&n.length>0&&(a||a===0)&&!Number.isNaN(a)&&n[a]===m||!n,b=x.useMemo(()=>{const M=l?{width:l.getBoundingClientRect().width,height:l.getBoundingClientRect().height}:typeof window<"u"?{width:window.innerWidth,height:window.innerHeight}:{width:0,height:0};var E;return(E=n==null?void 0:n.map($=>{const B=typeof $=="string";let L=0;if(B&&(L=parseInt($,10)),Ee(i)){const A=B?L:p?$*M.height:0;return p?i==="bottom"?M.height-A:-M.height+A:A}const q=B?L:p?$*M.width:0;return p?i==="right"?M.width-q:-M.width+q:q}))!=null?E:[]},[n,p,l]),w=x.useMemo(()=>v!==null?b==null?void 0:b[v]:null,[b,v]),S=x.useCallback(M=>{var E;const $=(E=b==null?void 0:b.findIndex(B=>B===M))!=null?E:null;s($),Oe(r.current,{transition:`transform ${Me.DURATION}s cubic-bezier(${Me.EASE.join(",")})`,transform:Ee(i)?`translate3d(0, ${M}px, 0)`:`translate3d(${M}px, 0, 0)`}),b&&$!==b.length-1&&a!==void 0&&$!==a&&$<a?Oe(o.current,{transition:`opacity ${Me.DURATION}s cubic-bezier(${Me.EASE.join(",")})`,opacity:"0"}):Oe(o.current,{transition:`opacity ${Me.DURATION}s cubic-bezier(${Me.EASE.join(",")})`,opacity:"1"}),c(n==null?void 0:n[Math.max($,0)])},[r.current,n,b,a,o,c]);x.useEffect(()=>{if(m||e){var M;const E=(M=n==null?void 0:n.findIndex($=>$===e||$===m))!=null?M:-1;b&&E!==-1&&typeof b[E]=="number"&&S(b[E])}},[m,e,n,b,S]);function D({draggedDistance:M,closeDrawer:E,velocity:$,dismissible:B}){if(a===void 0)return;const L=i==="bottom"||i==="right"?(w??0)-M:(w??0)+M,q=v===a-1,A=v===0,T=M>0;if(q&&Oe(o.current,{transition:`opacity ${Me.DURATION}s cubic-bezier(${Me.EASE.join(",")})`}),!u&&$>2&&!T){B?E():S(b[0]);return}if(!u&&$>2&&T&&b&&n){S(b[n.length-1]);return}const _=b==null?void 0:b.reduce((I,k)=>typeof I!="number"||typeof k!="number"?I:Math.abs(k-L)<Math.abs(I-L)?k:I),N=Ee(i)?window.innerHeight:window.innerWidth;if($>Td&&Math.abs(M)<N*.4){const I=T?1:-1;if(I>0&&y&&n){S(b[n.length-1]);return}if(A&&I<0&&B&&E(),v===null)return;S(b[v+I]);return}S(_)}function C({draggedDistance:M}){if(w===null)return;const E=i==="bottom"||i==="right"?w-M:w+M;(i==="bottom"||i==="right")&&E<b[b.length-1]||(i==="top"||i==="left")&&E>b[b.length-1]||Oe(r.current,{transform:Ee(i)?`translate3d(0, ${E}px, 0)`:`translate3d(${E}px, 0, 0)`})}function R(M,E){if(!n||typeof v!="number"||!b||a===void 0)return null;const $=v===a-1;if(v>=a&&E)return 0;if($&&!E)return 1;if(!g&&!$)return null;const L=$?v+1:v-1,q=$?b[L]-b[L-1]:b[L+1]-b[L],A=M/Math.abs(q);return $?1-A:A}return{isLastSnapPoint:y,activeSnapPoint:m,shouldFade:g,getPercentageDragged:R,setActiveSnapPoint:c,activeSnapPointIndex:v,onRelease:D,onDrag:C,snapPointsOffset:b}}const eS=()=>()=>{};function tS(){const{direction:e,isOpen:t,shouldScaleBackground:n,setBackgroundColorOnScale:r,noBodyStyles:o}=hr(),a=x.useRef(null),s=x.useMemo(()=>document.body.style.backgroundColor,[]);function i(){return(window.innerWidth-wa)/window.innerWidth}x.useEffect(()=>{if(t&&n){a.current&&clearTimeout(a.current);const l=document.querySelector("[data-vaul-drawer-wrapper]")||document.querySelector("[vaul-drawer-wrapper]");if(!l)return;K1(r&&!o?Xo(document.body,{background:"black"}):eS,Xo(l,{transformOrigin:Ee(e)?"top":"left",transitionProperty:"transform, border-radius",transitionDuration:`${Me.DURATION}s`,transitionTimingFunction:`cubic-bezier(${Me.EASE.join(",")})`}));const u=Xo(l,{borderRadius:`${_d}px`,overflow:"hidden",...Ee(e)?{transform:`scale(${i()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`}:{transform:`scale(${i()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`}});return()=>{u(),a.current=window.setTimeout(()=>{s?document.body.style.background=s:document.body.style.removeProperty("background")},Me.DURATION*1e3)}}},[t,n,s])}let Bn=null;function nS({isOpen:e,modal:t,nested:n,hasBeenOpened:r,preventScrollRestoration:o,noBodyStyles:a}){const[s,i]=x.useState(()=>typeof window<"u"?window.location.href:""),l=x.useRef(0),u=x.useCallback(()=>{if(Ei()&&Bn===null&&e&&!a){Bn={position:document.body.style.position,top:document.body.style.top,left:document.body.style.left,height:document.body.style.height,right:"unset"};const{scrollX:c,innerHeight:p}=window;document.body.style.setProperty("position","fixed","important"),Object.assign(document.body.style,{top:`${-l.current}px`,left:`${-c}px`,right:"0px",height:"auto"}),window.setTimeout(()=>window.requestAnimationFrame(()=>{const h=p-window.innerHeight;h&&l.current>=p&&(document.body.style.top=`${-(l.current+h)}px`)}),300)}},[e]),m=x.useCallback(()=>{if(Ei()&&Bn!==null&&!a){const c=-parseInt(document.body.style.top,10),p=-parseInt(document.body.style.left,10);Object.assign(document.body.style,Bn),window.requestAnimationFrame(()=>{if(o&&s!==window.location.href){i(window.location.href);return}window.scrollTo(p,c)}),Bn=null}},[s]);return x.useEffect(()=>{function c(){l.current=window.scrollY}return c(),window.addEventListener("scroll",c),()=>{window.removeEventListener("scroll",c)}},[]),x.useEffect(()=>{if(t)return()=>{typeof document>"u"||document.querySelector("[data-vaul-drawer]")||m()}},[t,m]),x.useEffect(()=>{n||!r||(e?(!window.matchMedia("(display-mode: standalone)").matches&&u(),t||window.setTimeout(()=>{m()},500)):m())},[e,r,s,t,n,u,m]),{restorePositionSetting:m}}function rS({open:e,onOpenChange:t,children:n,onDrag:r,onRelease:o,snapPoints:a,shouldScaleBackground:s=!1,setBackgroundColorOnScale:i=!0,closeThreshold:l=X1,scrollLockTimeout:u=Z1,dismissible:m=!0,handleOnly:c=!1,fadeFromIndex:p=a&&a.length-1,activeSnapPoint:h,setActiveSnapPoint:y,fixed:v,modal:g=!0,onClose:b,nested:w,noBodyStyles:S=!1,direction:D="bottom",defaultOpen:C=!1,disablePreventScroll:R=!0,snapToSequentialPoint:M=!1,preventScrollRestoration:E=!1,repositionInputs:$=!0,onAnimationEnd:B,container:L,autoFocus:q=!1}){var A,T;const[_=!1,N]=Pd({defaultProp:C,prop:e,onChange:U=>{t==null||t(U),!U&&!w&&Pn(),setTimeout(()=>{B==null||B(U)},Me.DURATION*1e3),U&&!g&&typeof window<"u"&&window.requestAnimationFrame(()=>{document.body.style.pointerEvents="auto"}),U||(document.body.style.pointerEvents="auto")}}),[I,k]=x.useState(!1),[P,H]=x.useState(!1),[z,O]=x.useState(!1),j=x.useRef(null),Y=x.useRef(null),G=x.useRef(null),V=x.useRef(null),W=x.useRef(null),Z=x.useRef(!1),X=x.useRef(null),Q=x.useRef(0),se=x.useRef(!1),ue=x.useRef(!C),ye=x.useRef(0),J=x.useRef(null),Re=x.useRef(((A=J.current)==null?void 0:A.getBoundingClientRect().height)||0),Te=x.useRef(((T=J.current)==null?void 0:T.getBoundingClientRect().width)||0),oe=x.useRef(0),me=x.useCallback(U=>{a&&U===Fe.length-1&&(Y.current=new Date)},[]),{activeSnapPoint:be,activeSnapPointIndex:$e,setActiveSnapPoint:He,onRelease:Ae,snapPointsOffset:Fe,onDrag:zt,shouldFade:an,getPercentageDragged:Nt}=J1({snapPoints:a,activeSnapPointProp:h,setActiveSnapPointProp:y,drawerRef:J,fadeFromIndex:p,overlayRef:j,onSnapPointChange:me,direction:D,container:L,snapToSequentialPoint:M});Y1({isDisabled:!_||P||!g||z||!I||!$||!R});const{restorePositionSetting:Pn}=nS({isOpen:_,modal:g,nested:w??!1,hasBeenOpened:I,preventScrollRestoration:E,noBodyStyles:S});function bt(){return(window.innerWidth-wa)/window.innerWidth}function Gt(U){var ie,ae;!m&&!a||J.current&&!J.current.contains(U.target)||(Re.current=((ie=J.current)==null?void 0:ie.getBoundingClientRect().height)||0,Te.current=((ae=J.current)==null?void 0:ae.getBoundingClientRect().width)||0,H(!0),G.current=new Date,kd()&&window.addEventListener("touchend",()=>Z.current=!1,{once:!0}),U.target.setPointerCapture(U.pointerId),Q.current=Ee(D)?U.pageY:U.pageX)}function nt(U,ie){var ae;let fe=U;const ge=(ae=window.getSelection())==null?void 0:ae.toString(),re=J.current?Tr(J.current,D):null,de=new Date;if(fe.tagName==="SELECT"||fe.hasAttribute("data-vaul-no-drag")||fe.closest("[data-vaul-no-drag]"))return!1;if(D==="right"||D==="left")return!0;if(Y.current&&de.getTime()-Y.current.getTime()<500)return!1;if(re!==null&&(D==="bottom"?re>0:re<0))return!0;if(ge&&ge.length>0)return!1;if(W.current&&de.getTime()-W.current.getTime()<u&&re===0||ie)return W.current=de,!1;for(;fe;){if(fe.scrollHeight>fe.clientHeight){if(fe.scrollTop!==0)return W.current=new Date,!1;if(fe.getAttribute("role")==="dialog")return!0}fe=fe.parentNode}return!0}function sn(U){if(J.current&&P){const ie=D==="bottom"||D==="right"?1:-1,ae=(Q.current-(Ee(D)?U.pageY:U.pageX))*ie,fe=ae>0,ge=a&&!m&&!fe;if(ge&&$e===0)return;const re=Math.abs(ae),de=document.querySelector("[data-vaul-drawer-wrapper]"),ve=D==="bottom"||D==="top"?Re.current:Te.current;let le=re/ve;const Ue=Nt(re,fe);if(Ue!==null&&(le=Ue),ge&&le>=1||!Z.current&&!nt(U.target,fe))return;if(J.current.classList.add(Zo),Z.current=!0,Oe(J.current,{transition:"none"}),Oe(j.current,{transition:"none"}),a&&zt({draggedDistance:ae}),fe&&!a){const Ce=V1(ae),Ve=Math.min(Ce*-1,0)*ie;Oe(J.current,{transform:Ee(D)?`translate3d(0, ${Ve}px, 0)`:`translate3d(${Ve}px, 0, 0)`});return}const xe=1-le;if((an||p&&$e===p-1)&&(r==null||r(U,le),Oe(j.current,{opacity:`${xe}`,transition:"none"},!0)),de&&j.current&&s){const Ce=Math.min(bt()+le*(1-bt()),1),Ve=8-le*8,Ie=Math.max(0,14-le*14);Oe(de,{borderRadius:`${Ve}px`,transform:Ee(D)?`scale(${Ce}) translate3d(0, ${Ie}px, 0)`:`scale(${Ce}) translate3d(${Ie}px, 0, 0)`,transition:"none"},!0)}if(!a){const Ce=re*ie;Oe(J.current,{transform:Ee(D)?`translate3d(0, ${Ce}px, 0)`:`translate3d(${Ce}px, 0, 0)`})}}}x.useEffect(()=>{window.requestAnimationFrame(()=>{ue.current=!0})},[]),x.useEffect(()=>{var U;function ie(){if(!J.current||!$)return;const ae=document.activeElement;if(ba(ae)||se.current){var fe;const ge=((fe=window.visualViewport)==null?void 0:fe.height)||0,re=window.innerHeight;let de=re-ge;const ve=J.current.getBoundingClientRect().height||0,le=ve>re*.8;oe.current||(oe.current=ve);const Ue=J.current.getBoundingClientRect().top;if(Math.abs(ye.current-de)>60&&(se.current=!se.current),a&&a.length>0&&Fe&&$e){const xe=Fe[$e]||0;de+=xe}if(ye.current=de,ve>ge||se.current){const xe=J.current.getBoundingClientRect().height;let Ce=xe;xe>ge&&(Ce=ge-(le?Ue:wa)),v?J.current.style.height=`${xe-Math.max(de,0)}px`:J.current.style.height=`${Math.max(Ce,ge-Ue)}px`}else I1()||(J.current.style.height=`${oe.current}px`);a&&a.length>0&&!se.current?J.current.style.bottom="0px":J.current.style.bottom=`${Math.max(de,0)}px`}}return(U=window.visualViewport)==null||U.addEventListener("resize",ie),()=>{var ae;return(ae=window.visualViewport)==null?void 0:ae.removeEventListener("resize",ie)}},[$e,a,Fe]);function Ge(U){An(),b==null||b(),U||N(!1),setTimeout(()=>{a&&He(a[0])},Me.DURATION*1e3)}function cn(){if(!J.current)return;const U=document.querySelector("[data-vaul-drawer-wrapper]"),ie=Tr(J.current,D);Oe(J.current,{transform:"translate3d(0, 0, 0)",transition:`transform ${Me.DURATION}s cubic-bezier(${Me.EASE.join(",")})`}),Oe(j.current,{transition:`opacity ${Me.DURATION}s cubic-bezier(${Me.EASE.join(",")})`,opacity:"1"}),s&&ie&&ie>0&&_&&Oe(U,{borderRadius:`${_d}px`,overflow:"hidden",...Ee(D)?{transform:`scale(${bt()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`,transformOrigin:"top"}:{transform:`scale(${bt()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`,transformOrigin:"left"},transitionProperty:"transform, border-radius",transitionDuration:`${Me.DURATION}s`,transitionTimingFunction:`cubic-bezier(${Me.EASE.join(",")})`},!0)}function An(){!P||!J.current||(J.current.classList.remove(Zo),Z.current=!1,H(!1),V.current=new Date)}function ln(U){if(!P||!J.current)return;J.current.classList.remove(Zo),Z.current=!1,H(!1),V.current=new Date;const ie=Tr(J.current,D);if(!U||!nt(U.target,!1)||!ie||Number.isNaN(ie)||G.current===null)return;const ae=V.current.getTime()-G.current.getTime(),fe=Q.current-(Ee(D)?U.pageY:U.pageX),ge=Math.abs(fe)/ae;if(ge>.05&&(O(!0),setTimeout(()=>{O(!1)},200)),a){Ae({draggedDistance:fe*(D==="bottom"||D==="right"?1:-1),closeDrawer:Ge,velocity:ge,dismissible:m}),o==null||o(U,!0);return}if(D==="bottom"||D==="right"?fe>0:fe<0){cn(),o==null||o(U,!0);return}if(ge>Td){Ge(),o==null||o(U,!1);return}var re;const de=Math.min((re=J.current.getBoundingClientRect().height)!=null?re:0,window.innerHeight);var ve;const le=Math.min((ve=J.current.getBoundingClientRect().width)!=null?ve:0,window.innerWidth),Ue=D==="left"||D==="right";if(Math.abs(ie)>=(Ue?le:de)*l){Ge(),o==null||o(U,!1);return}o==null||o(U,!0),cn()}x.useEffect(()=>(_&&(Oe(document.documentElement,{scrollBehavior:"auto"}),Y.current=new Date),()=>{q1(document.documentElement,"scrollBehavior")}),[_]);function Ut(U){const ie=U?(window.innerWidth-Kt)/window.innerWidth:1,ae=U?-Kt:0;X.current&&window.clearTimeout(X.current),Oe(J.current,{transition:`transform ${Me.DURATION}s cubic-bezier(${Me.EASE.join(",")})`,transform:Ee(D)?`scale(${ie}) translate3d(0, ${ae}px, 0)`:`scale(${ie}) translate3d(${ae}px, 0, 0)`}),!U&&J.current&&(X.current=setTimeout(()=>{const fe=Tr(J.current,D);Oe(J.current,{transition:"none",transform:Ee(D)?`translate3d(0, ${fe}px, 0)`:`translate3d(${fe}px, 0, 0)`})},500))}function In(U,ie){if(ie<0)return;const ae=(window.innerWidth-Kt)/window.innerWidth,fe=ae+ie*(1-ae),ge=-Kt+ie*Kt;Oe(J.current,{transform:Ee(D)?`scale(${fe}) translate3d(0, ${ge}px, 0)`:`scale(${fe}) translate3d(${ge}px, 0, 0)`,transition:"none"})}function Rt(U,ie){const ae=Ee(D)?window.innerHeight:window.innerWidth,fe=ie?(ae-Kt)/ae:1,ge=ie?-Kt:0;ie&&Oe(J.current,{transition:`transform ${Me.DURATION}s cubic-bezier(${Me.EASE.join(",")})`,transform:Ee(D)?`scale(${fe}) translate3d(0, ${ge}px, 0)`:`scale(${fe}) translate3d(${ge}px, 0, 0)`})}return x.useEffect(()=>{g||window.requestAnimationFrame(()=>{document.body.style.pointerEvents="auto"})},[g]),x.createElement(Ja,{defaultOpen:C,onOpenChange:U=>{!m&&!U||(U?k(!0):Ge(!0),N(U))},open:_},x.createElement(Dd.Provider,{value:{activeSnapPoint:be,snapPoints:a,setActiveSnapPoint:He,drawerRef:J,overlayRef:j,onOpenChange:t,onPress:Gt,onRelease:ln,onDrag:sn,dismissible:m,shouldAnimate:ue,handleOnly:c,isOpen:_,isDragging:P,shouldFade:an,closeDrawer:Ge,onNestedDrag:In,onNestedOpenChange:Ut,onNestedRelease:Rt,keyboardIsOpen:se,modal:g,snapPointsOffset:Fe,activeSnapPointIndex:$e,direction:D,shouldScaleBackground:s,setBackgroundColorOnScale:i,noBodyStyles:S,container:L,autoFocus:q}},n))}const Ad=x.forwardRef(function({...e},t){const{overlayRef:n,snapPoints:r,onRelease:o,shouldFade:a,isOpen:s,modal:i,shouldAnimate:l}=hr(),u=Nd(t,n),m=r&&r.length>0;if(!i)return null;const c=x.useCallback(p=>o(p),[o]);return x.createElement(ho,{onMouseUp:c,ref:u,"data-vaul-overlay":"","data-vaul-snap-points":s&&m?"true":"false","data-vaul-snap-points-overlay":s&&a?"true":"false","data-vaul-animate":l!=null&&l.current?"true":"false",...e})});Ad.displayName="Drawer.Overlay";const Id=x.forwardRef(function({onPointerDownOutside:e,style:t,onOpenAutoFocus:n,...r},o){const{drawerRef:a,onPress:s,onRelease:i,onDrag:l,keyboardIsOpen:u,snapPointsOffset:m,activeSnapPointIndex:c,modal:p,isOpen:h,direction:y,snapPoints:v,container:g,handleOnly:b,shouldAnimate:w,autoFocus:S}=hr(),[D,C]=x.useState(!1),R=Nd(o,a),M=x.useRef(null),E=x.useRef(null),$=x.useRef(!1),B=v&&v.length>0;tS();const L=(A,T,_=0)=>{if($.current)return!0;const N=Math.abs(A.y),I=Math.abs(A.x),k=I>N,P=["bottom","right"].includes(T)?1:-1;if(T==="left"||T==="right"){if(!(A.x*P<0)&&I>=0&&I<=_)return k}else if(!(A.y*P<0)&&N>=0&&N<=_)return!k;return $.current=!0,!0};x.useEffect(()=>{B&&window.requestAnimationFrame(()=>{C(!0)})},[]);function q(A){M.current=null,$.current=!1,i(A)}return x.createElement(go,{"data-vaul-drawer-direction":y,"data-vaul-drawer":"","data-vaul-delayed-snap-points":D?"true":"false","data-vaul-snap-points":h&&B?"true":"false","data-vaul-custom-container":g?"true":"false","data-vaul-animate":w!=null&&w.current?"true":"false",...r,ref:R,style:m&&m.length>0?{"--snap-point-height":`${m[c??0]}px`,...t}:t,onPointerDown:A=>{b||(r.onPointerDown==null||r.onPointerDown.call(r,A),M.current={x:A.pageX,y:A.pageY},s(A))},onOpenAutoFocus:A=>{n==null||n(A),S||A.preventDefault()},onPointerDownOutside:A=>{if(e==null||e(A),!p||A.defaultPrevented){A.preventDefault();return}u.current&&(u.current=!1)},onFocusOutside:A=>{if(!p){A.preventDefault();return}},onPointerMove:A=>{if(E.current=A,b||(r.onPointerMove==null||r.onPointerMove.call(r,A),!M.current))return;const T=A.pageY-M.current.y,_=A.pageX-M.current.x,N=A.pointerType==="touch"?10:2;L({x:_,y:T},y,N)?l(A):(Math.abs(_)>N||Math.abs(T)>N)&&(M.current=null)},onPointerUp:A=>{r.onPointerUp==null||r.onPointerUp.call(r,A),M.current=null,$.current=!1,i(A)},onPointerOut:A=>{r.onPointerOut==null||r.onPointerOut.call(r,A),q(E.current)},onContextMenu:A=>{r.onContextMenu==null||r.onContextMenu.call(r,A),E.current&&q(E.current)}})});Id.displayName="Drawer.Content";const oS=250,aS=120,sS=x.forwardRef(function({preventCycle:e=!1,children:t,...n},r){const{closeDrawer:o,isDragging:a,snapPoints:s,activeSnapPoint:i,setActiveSnapPoint:l,dismissible:u,handleOnly:m,isOpen:c,onPress:p,onDrag:h}=hr(),y=x.useRef(null),v=x.useRef(!1);function g(){if(v.current){S();return}window.setTimeout(()=>{b()},aS)}function b(){if(a||e||v.current){S();return}if(S(),!s||s.length===0){u||o();return}if(i===s[s.length-1]&&u){o();return}const C=s.findIndex(M=>M===i);if(C===-1)return;const R=s[C+1];l(R)}function w(){y.current=window.setTimeout(()=>{v.current=!0},oS)}function S(){y.current&&window.clearTimeout(y.current),v.current=!1}return x.createElement("div",{onClick:g,onPointerCancel:S,onPointerDown:D=>{m&&p(D),w()},onPointerMove:D=>{m&&h(D)},ref:r,"data-vaul-drawer-visible":c?"true":"false","data-vaul-handle":"","aria-hidden":"true",...n},x.createElement("span",{"data-vaul-handle-hitarea":"","aria-hidden":"true"},t))});sS.displayName="Drawer.Handle";function iS(e){const t=hr(),{container:n=t.container,...r}=e;return x.createElement(es,{container:n,...r})}const lt={Root:rS,Content:Id,Overlay:Ad,Trigger:Tu,Portal:iS,Close:rs,Title:ts,Description:ns},jd=({shouldScaleBackground:e=!0,...t})=>d.jsx(lt.Root,{shouldScaleBackground:e,...t});jd.displayName="Drawer";const cS=lt.Trigger,lS=lt.Portal,uS=lt.Close,$d=f.forwardRef(({className:e,...t},n)=>d.jsx(lt.Overlay,{ref:n,className:F("fixed inset-0 z-50 bg-black/80",e),...t}));$d.displayName=lt.Overlay.displayName;const Ld=f.forwardRef(({className:e,children:t,...n},r)=>d.jsxs(lS,{children:[d.jsx($d,{}),d.jsxs(lt.Content,{ref:r,className:F("fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-[10px] border bg-background",e),...n,children:[d.jsx("div",{className:"mx-auto mt-4 h-2 w-[100px] rounded-full bg-muted"}),t]})]}));Ld.displayName="DrawerContent";const Fd=({className:e,...t})=>d.jsx("div",{className:F("grid gap-1.5 p-4 text-center sm:text-left",e),...t});Fd.displayName="DrawerHeader";const Wd=({className:e,...t})=>d.jsx("div",{className:F("mt-auto flex flex-col gap-2 p-4",e),...t});Wd.displayName="DrawerFooter";const Bd=f.forwardRef(({className:e,...t},n)=>d.jsx(lt.Title,{ref:n,className:F("text-lg font-semibold leading-none tracking-tight",e),...t}));Bd.displayName=lt.Title.displayName;const Yd=f.forwardRef(({className:e,...t},n)=>d.jsx(lt.Description,{ref:n,className:F("text-sm text-muted-foreground",e),...t}));Yd.displayName=lt.Description.displayName;var Qo="rovingFocusGroup.onEntryFocus",dS={bubbles:!1,cancelable:!0},gr="RovingFocusGroup",[xa,Hd,fS]=Ha(gr),[mS,On]=Be(gr,[fS]),[pS,hS]=mS(gr),zd=f.forwardRef((e,t)=>d.jsx(xa.Provider,{scope:e.__scopeRovingFocusGroup,children:d.jsx(xa.Slot,{scope:e.__scopeRovingFocusGroup,children:d.jsx(gS,{...e,ref:t})})}));zd.displayName=gr;var gS=f.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:a,currentTabStopId:s,defaultCurrentTabStopId:i,onCurrentTabStopIdChange:l,onEntryFocus:u,preventScrollOnEntryFocus:m=!1,...c}=e,p=f.useRef(null),h=he(t,p),y=ur(a),[v,g]=tt({prop:s,defaultProp:i??null,onChange:l,caller:gr}),[b,w]=f.useState(!1),S=et(u),D=Hd(n),C=f.useRef(!1),[R,M]=f.useState(0);return f.useEffect(()=>{const E=p.current;if(E)return E.addEventListener(Qo,S),()=>E.removeEventListener(Qo,S)},[S]),d.jsx(pS,{scope:n,orientation:r,dir:y,loop:o,currentTabStopId:v,onItemFocus:f.useCallback(E=>g(E),[g]),onItemShiftTab:f.useCallback(()=>w(!0),[]),onFocusableItemAdd:f.useCallback(()=>M(E=>E+1),[]),onFocusableItemRemove:f.useCallback(()=>M(E=>E-1),[]),children:d.jsx(ee.div,{tabIndex:b||R===0?-1:0,"data-orientation":r,...c,ref:h,style:{outline:"none",...e.style},onMouseDown:K(e.onMouseDown,()=>{C.current=!0}),onFocus:K(e.onFocus,E=>{const $=!C.current;if(E.target===E.currentTarget&&$&&!b){const B=new CustomEvent(Qo,dS);if(E.currentTarget.dispatchEvent(B),!B.defaultPrevented){const L=D().filter(N=>N.focusable),q=L.find(N=>N.active),A=L.find(N=>N.id===v),_=[q,A,...L].filter(Boolean).map(N=>N.ref.current);qd(_,m)}}C.current=!1}),onBlur:K(e.onBlur,()=>w(!1))})})}),Gd="RovingFocusGroupItem",Ud=f.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:a,children:s,...i}=e,l=ke(),u=a||l,m=hS(Gd,n),c=m.currentTabStopId===u,p=Hd(n),{onFocusableItemAdd:h,onFocusableItemRemove:y,currentTabStopId:v}=m;return f.useEffect(()=>{if(r)return h(),()=>y()},[r,h,y]),d.jsx(xa.ItemSlot,{scope:n,id:u,focusable:r,active:o,children:d.jsx(ee.span,{tabIndex:c?0:-1,"data-orientation":m.orientation,...i,ref:t,onMouseDown:K(e.onMouseDown,g=>{r?m.onItemFocus(u):g.preventDefault()}),onFocus:K(e.onFocus,()=>m.onItemFocus(u)),onKeyDown:K(e.onKeyDown,g=>{if(g.key==="Tab"&&g.shiftKey){m.onItemShiftTab();return}if(g.target!==g.currentTarget)return;const b=bS(g,m.orientation,m.dir);if(b!==void 0){if(g.metaKey||g.ctrlKey||g.altKey||g.shiftKey)return;g.preventDefault();let S=p().filter(D=>D.focusable).map(D=>D.ref.current);if(b==="last")S.reverse();else if(b==="prev"||b==="next"){b==="prev"&&S.reverse();const D=S.indexOf(g.currentTarget);S=m.loop?wS(S,D+1):S.slice(D+1)}setTimeout(()=>qd(S))}}),children:typeof s=="function"?s({isCurrentTabStop:c,hasTabStop:v!=null}):s})})});Ud.displayName=Gd;var vS={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function yS(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function bS(e,t,n){const r=yS(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return vS[r]}function qd(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function wS(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var fs=zd,ms=Ud,Sa=["Enter"," "],xS=["ArrowDown","PageUp","Home"],Vd=["ArrowUp","PageDown","End"],SS=[...xS,...Vd],CS={ltr:[...Sa,"ArrowRight"],rtl:[...Sa,"ArrowLeft"]},MS={ltr:["ArrowLeft"],rtl:["ArrowRight"]},vr="Menu",[Zn,DS,kS]=Ha(vr),[on,Kd]=Be(vr,[kS,Ft,On]),yr=Ft(),Xd=On(),[Zd,Ht]=on(vr),[ES,br]=on(vr),Qd=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:o,onOpenChange:a,modal:s=!0}=e,i=yr(t),[l,u]=f.useState(null),m=f.useRef(!1),c=et(a),p=ur(o);return f.useEffect(()=>{const h=()=>{m.current=!0,document.addEventListener("pointerdown",y,{capture:!0,once:!0}),document.addEventListener("pointermove",y,{capture:!0,once:!0})},y=()=>m.current=!1;return document.addEventListener("keydown",h,{capture:!0}),()=>{document.removeEventListener("keydown",h,{capture:!0}),document.removeEventListener("pointerdown",y,{capture:!0}),document.removeEventListener("pointermove",y,{capture:!0})}},[]),d.jsx(ar,{...i,children:d.jsx(Zd,{scope:t,open:n,onOpenChange:c,content:l,onContentChange:u,children:d.jsx(ES,{scope:t,onClose:f.useCallback(()=>c(!1),[c]),isUsingKeyboardRef:m,dir:p,modal:s,children:r})})})};Qd.displayName=vr;var NS="MenuAnchor",ps=f.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=yr(n);return d.jsx(sr,{...o,...r,ref:t})});ps.displayName=NS;var hs="MenuPortal",[RS,Jd]=on(hs,{forceMount:void 0}),ef=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:o}=e,a=Ht(hs,t);return d.jsx(RS,{scope:t,forceMount:n,children:d.jsx(ze,{present:n||a.open,children:d.jsx(ir,{asChild:!0,container:o,children:r})})})};ef.displayName=hs;var Je="MenuContent",[TS,gs]=on(Je),tf=f.forwardRef((e,t)=>{const n=Jd(Je,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,a=Ht(Je,e.__scopeMenu),s=br(Je,e.__scopeMenu);return d.jsx(Zn.Provider,{scope:e.__scopeMenu,children:d.jsx(ze,{present:r||a.open,children:d.jsx(Zn.Slot,{scope:e.__scopeMenu,children:s.modal?d.jsx(_S,{...o,ref:t}):d.jsx(OS,{...o,ref:t})})})})}),_S=f.forwardRef((e,t)=>{const n=Ht(Je,e.__scopeMenu),r=f.useRef(null),o=he(t,r);return f.useEffect(()=>{const a=r.current;if(a)return ao(a)},[]),d.jsx(vs,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:K(e.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),OS=f.forwardRef((e,t)=>{const n=Ht(Je,e.__scopeMenu);return d.jsx(vs,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),PS=At("MenuContent.ScrollLock"),vs=f.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:o,onOpenAutoFocus:a,onCloseAutoFocus:s,disableOutsidePointerEvents:i,onEntryFocus:l,onEscapeKeyDown:u,onPointerDownOutside:m,onFocusOutside:c,onInteractOutside:p,onDismiss:h,disableOutsideScroll:y,...v}=e,g=Ht(Je,n),b=br(Je,n),w=yr(n),S=Xd(n),D=DS(n),[C,R]=f.useState(null),M=f.useRef(null),E=he(t,M,g.onContentChange),$=f.useRef(0),B=f.useRef(""),L=f.useRef(0),q=f.useRef(null),A=f.useRef("right"),T=f.useRef(0),_=y?cr:f.Fragment,N=y?{as:PS,allowPinchZoom:!0}:void 0,I=P=>{var W,Z;const H=B.current+P,z=D().filter(X=>!X.disabled),O=document.activeElement,j=(W=z.find(X=>X.ref.current===O))==null?void 0:W.textValue,Y=z.map(X=>X.textValue),G=GS(Y,H,j),V=(Z=z.find(X=>X.textValue===G))==null?void 0:Z.ref.current;(function X(Q){B.current=Q,window.clearTimeout($.current),Q!==""&&($.current=window.setTimeout(()=>X(""),1e3))})(H),V&&setTimeout(()=>V.focus())};f.useEffect(()=>()=>window.clearTimeout($.current),[]),Jr();const k=f.useCallback(P=>{var z,O;return A.current===((z=q.current)==null?void 0:z.side)&&qS(P,(O=q.current)==null?void 0:O.area)},[]);return d.jsx(TS,{scope:n,searchRef:B,onItemEnter:f.useCallback(P=>{k(P)&&P.preventDefault()},[k]),onItemLeave:f.useCallback(P=>{var H;k(P)||((H=M.current)==null||H.focus(),R(null))},[k]),onTriggerLeave:f.useCallback(P=>{k(P)&&P.preventDefault()},[k]),pointerGraceTimerRef:L,onPointerGraceIntentChange:f.useCallback(P=>{q.current=P},[]),children:d.jsx(_,{...N,children:d.jsx(rr,{asChild:!0,trapped:o,onMountAutoFocus:K(a,P=>{var H;P.preventDefault(),(H=M.current)==null||H.focus({preventScroll:!0})}),onUnmountAutoFocus:s,children:d.jsx(En,{asChild:!0,disableOutsidePointerEvents:i,onEscapeKeyDown:u,onPointerDownOutside:m,onFocusOutside:c,onInteractOutside:p,onDismiss:h,children:d.jsx(fs,{asChild:!0,...S,dir:b.dir,orientation:"vertical",loop:r,currentTabStopId:C,onCurrentTabStopIdChange:R,onEntryFocus:K(l,P=>{b.isUsingKeyboardRef.current||P.preventDefault()}),preventScrollOnEntryFocus:!0,children:d.jsx(ro,{role:"menu","aria-orientation":"vertical","data-state":bf(g.open),"data-radix-menu-content":"",dir:b.dir,...w,...v,ref:E,style:{outline:"none",...v.style},onKeyDown:K(v.onKeyDown,P=>{const z=P.target.closest("[data-radix-menu-content]")===P.currentTarget,O=P.ctrlKey||P.altKey||P.metaKey,j=P.key.length===1;z&&(P.key==="Tab"&&P.preventDefault(),!O&&j&&I(P.key));const Y=M.current;if(P.target!==Y||!SS.includes(P.key))return;P.preventDefault();const V=D().filter(W=>!W.disabled).map(W=>W.ref.current);Vd.includes(P.key)&&V.reverse(),HS(V)}),onBlur:K(e.onBlur,P=>{P.currentTarget.contains(P.target)||(window.clearTimeout($.current),B.current="")}),onPointerMove:K(e.onPointerMove,Qn(P=>{const H=P.target,z=T.current!==P.clientX;if(P.currentTarget.contains(H)&&z){const O=P.clientX>T.current?"right":"left";A.current=O,T.current=P.clientX}}))})})})})})})});tf.displayName=Je;var AS="MenuGroup",ys=f.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return d.jsx(ee.div,{role:"group",...r,ref:t})});ys.displayName=AS;var IS="MenuLabel",nf=f.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return d.jsx(ee.div,{...r,ref:t})});nf.displayName=IS;var Kr="MenuItem",_i="menu.itemSelect",wo=f.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...o}=e,a=f.useRef(null),s=br(Kr,e.__scopeMenu),i=gs(Kr,e.__scopeMenu),l=he(t,a),u=f.useRef(!1),m=()=>{const c=a.current;if(!n&&c){const p=new CustomEvent(_i,{bubbles:!0,cancelable:!0});c.addEventListener(_i,h=>r==null?void 0:r(h),{once:!0}),Qi(c,p),p.defaultPrevented?u.current=!1:s.onClose()}};return d.jsx(rf,{...o,ref:l,disabled:n,onClick:K(e.onClick,m),onPointerDown:c=>{var p;(p=e.onPointerDown)==null||p.call(e,c),u.current=!0},onPointerUp:K(e.onPointerUp,c=>{var p;u.current||(p=c.currentTarget)==null||p.click()}),onKeyDown:K(e.onKeyDown,c=>{const p=i.searchRef.current!=="";n||p&&c.key===" "||Sa.includes(c.key)&&(c.currentTarget.click(),c.preventDefault())})})});wo.displayName=Kr;var rf=f.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:o,...a}=e,s=gs(Kr,n),i=Xd(n),l=f.useRef(null),u=he(t,l),[m,c]=f.useState(!1),[p,h]=f.useState("");return f.useEffect(()=>{const y=l.current;y&&h((y.textContent??"").trim())},[a.children]),d.jsx(Zn.ItemSlot,{scope:n,disabled:r,textValue:o??p,children:d.jsx(ms,{asChild:!0,...i,focusable:!r,children:d.jsx(ee.div,{role:"menuitem","data-highlighted":m?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...a,ref:u,onPointerMove:K(e.onPointerMove,Qn(y=>{r?s.onItemLeave(y):(s.onItemEnter(y),y.defaultPrevented||y.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:K(e.onPointerLeave,Qn(y=>s.onItemLeave(y))),onFocus:K(e.onFocus,()=>c(!0)),onBlur:K(e.onBlur,()=>c(!1))})})})}),jS="MenuCheckboxItem",of=f.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...o}=e;return d.jsx(uf,{scope:e.__scopeMenu,checked:n,children:d.jsx(wo,{role:"menuitemcheckbox","aria-checked":Xr(n)?"mixed":n,...o,ref:t,"data-state":xs(n),onSelect:K(o.onSelect,()=>r==null?void 0:r(Xr(n)?!0:!n),{checkForDefaultPrevented:!1})})})});of.displayName=jS;var af="MenuRadioGroup",[$S,LS]=on(af,{value:void 0,onValueChange:()=>{}}),sf=f.forwardRef((e,t)=>{const{value:n,onValueChange:r,...o}=e,a=et(r);return d.jsx($S,{scope:e.__scopeMenu,value:n,onValueChange:a,children:d.jsx(ys,{...o,ref:t})})});sf.displayName=af;var cf="MenuRadioItem",lf=f.forwardRef((e,t)=>{const{value:n,...r}=e,o=LS(cf,e.__scopeMenu),a=n===o.value;return d.jsx(uf,{scope:e.__scopeMenu,checked:a,children:d.jsx(wo,{role:"menuitemradio","aria-checked":a,...r,ref:t,"data-state":xs(a),onSelect:K(r.onSelect,()=>{var s;return(s=o.onValueChange)==null?void 0:s.call(o,n)},{checkForDefaultPrevented:!1})})})});lf.displayName=cf;var bs="MenuItemIndicator",[uf,FS]=on(bs,{checked:!1}),df=f.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...o}=e,a=FS(bs,n);return d.jsx(ze,{present:r||Xr(a.checked)||a.checked===!0,children:d.jsx(ee.span,{...o,ref:t,"data-state":xs(a.checked)})})});df.displayName=bs;var WS="MenuSeparator",ff=f.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return d.jsx(ee.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});ff.displayName=WS;var BS="MenuArrow",mf=f.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=yr(n);return d.jsx(oo,{...o,...r,ref:t})});mf.displayName=BS;var ws="MenuSub",[YS,pf]=on(ws),hf=e=>{const{__scopeMenu:t,children:n,open:r=!1,onOpenChange:o}=e,a=Ht(ws,t),s=yr(t),[i,l]=f.useState(null),[u,m]=f.useState(null),c=et(o);return f.useEffect(()=>(a.open===!1&&c(!1),()=>c(!1)),[a.open,c]),d.jsx(ar,{...s,children:d.jsx(Zd,{scope:t,open:r,onOpenChange:c,content:u,onContentChange:m,children:d.jsx(YS,{scope:t,contentId:ke(),triggerId:ke(),trigger:i,onTriggerChange:l,children:n})})})};hf.displayName=ws;var Gn="MenuSubTrigger",gf=f.forwardRef((e,t)=>{const n=Ht(Gn,e.__scopeMenu),r=br(Gn,e.__scopeMenu),o=pf(Gn,e.__scopeMenu),a=gs(Gn,e.__scopeMenu),s=f.useRef(null),{pointerGraceTimerRef:i,onPointerGraceIntentChange:l}=a,u={__scopeMenu:e.__scopeMenu},m=f.useCallback(()=>{s.current&&window.clearTimeout(s.current),s.current=null},[]);return f.useEffect(()=>m,[m]),f.useEffect(()=>{const c=i.current;return()=>{window.clearTimeout(c),l(null)}},[i,l]),d.jsx(ps,{asChild:!0,...u,children:d.jsx(rf,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":o.contentId,"data-state":bf(n.open),...e,ref:Mt(t,o.onTriggerChange),onClick:c=>{var p;(p=e.onClick)==null||p.call(e,c),!(e.disabled||c.defaultPrevented)&&(c.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:K(e.onPointerMove,Qn(c=>{a.onItemEnter(c),!c.defaultPrevented&&!e.disabled&&!n.open&&!s.current&&(a.onPointerGraceIntentChange(null),s.current=window.setTimeout(()=>{n.onOpenChange(!0),m()},100))})),onPointerLeave:K(e.onPointerLeave,Qn(c=>{var h,y;m();const p=(h=n.content)==null?void 0:h.getBoundingClientRect();if(p){const v=(y=n.content)==null?void 0:y.dataset.side,g=v==="right",b=g?-5:5,w=p[g?"left":"right"],S=p[g?"right":"left"];a.onPointerGraceIntentChange({area:[{x:c.clientX+b,y:c.clientY},{x:w,y:p.top},{x:S,y:p.top},{x:S,y:p.bottom},{x:w,y:p.bottom}],side:v}),window.clearTimeout(i.current),i.current=window.setTimeout(()=>a.onPointerGraceIntentChange(null),300)}else{if(a.onTriggerLeave(c),c.defaultPrevented)return;a.onPointerGraceIntentChange(null)}})),onKeyDown:K(e.onKeyDown,c=>{var h;const p=a.searchRef.current!=="";e.disabled||p&&c.key===" "||CS[r.dir].includes(c.key)&&(n.onOpenChange(!0),(h=n.content)==null||h.focus(),c.preventDefault())})})})});gf.displayName=Gn;var vf="MenuSubContent",yf=f.forwardRef((e,t)=>{const n=Jd(Je,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,a=Ht(Je,e.__scopeMenu),s=br(Je,e.__scopeMenu),i=pf(vf,e.__scopeMenu),l=f.useRef(null),u=he(t,l);return d.jsx(Zn.Provider,{scope:e.__scopeMenu,children:d.jsx(ze,{present:r||a.open,children:d.jsx(Zn.Slot,{scope:e.__scopeMenu,children:d.jsx(vs,{id:i.contentId,"aria-labelledby":i.triggerId,...o,ref:u,align:"start",side:s.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:m=>{var c;s.isUsingKeyboardRef.current&&((c=l.current)==null||c.focus()),m.preventDefault()},onCloseAutoFocus:m=>m.preventDefault(),onFocusOutside:K(e.onFocusOutside,m=>{m.target!==i.trigger&&a.onOpenChange(!1)}),onEscapeKeyDown:K(e.onEscapeKeyDown,m=>{s.onClose(),m.preventDefault()}),onKeyDown:K(e.onKeyDown,m=>{var h;const c=m.currentTarget.contains(m.target),p=MS[s.dir].includes(m.key);c&&p&&(a.onOpenChange(!1),(h=i.trigger)==null||h.focus(),m.preventDefault())})})})})})});yf.displayName=vf;function bf(e){return e?"open":"closed"}function Xr(e){return e==="indeterminate"}function xs(e){return Xr(e)?"indeterminate":e?"checked":"unchecked"}function HS(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function zS(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function GS(e,t,n){const o=t.length>1&&Array.from(t).every(u=>u===t[0])?t[0]:t,a=n?e.indexOf(n):-1;let s=zS(e,Math.max(a,0));o.length===1&&(s=s.filter(u=>u!==n));const l=s.find(u=>u.toLowerCase().startsWith(o.toLowerCase()));return l!==n?l:void 0}function US(e,t){const{x:n,y:r}=e;let o=!1;for(let a=0,s=t.length-1;a<t.length;s=a++){const i=t[a],l=t[s],u=i.x,m=i.y,c=l.x,p=l.y;m>r!=p>r&&n<(c-u)*(r-m)/(p-m)+u&&(o=!o)}return o}function qS(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return US(n,t)}function Qn(e){return t=>t.pointerType==="mouse"?e(t):void 0}var VS=Qd,KS=ps,XS=ef,ZS=tf,QS=ys,JS=nf,eC=wo,tC=of,nC=sf,rC=lf,oC=df,aC=ff,sC=mf,iC=hf,cC=gf,lC=yf,xo="DropdownMenu",[uC,fD]=Be(xo,[Kd]),Ye=Kd(),[dC,wf]=uC(xo),xf=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:o,defaultOpen:a,onOpenChange:s,modal:i=!0}=e,l=Ye(t),u=f.useRef(null),[m,c]=tt({prop:o,defaultProp:a??!1,onChange:s,caller:xo});return d.jsx(dC,{scope:t,triggerId:ke(),triggerRef:u,contentId:ke(),open:m,onOpenChange:c,onOpenToggle:f.useCallback(()=>c(p=>!p),[c]),modal:i,children:d.jsx(VS,{...l,open:m,onOpenChange:c,dir:r,modal:i,children:n})})};xf.displayName=xo;var Sf="DropdownMenuTrigger",Cf=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...o}=e,a=wf(Sf,n),s=Ye(n);return d.jsx(KS,{asChild:!0,...s,children:d.jsx(ee.button,{type:"button",id:a.triggerId,"aria-haspopup":"menu","aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":a.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...o,ref:Mt(t,a.triggerRef),onPointerDown:K(e.onPointerDown,i=>{!r&&i.button===0&&i.ctrlKey===!1&&(a.onOpenToggle(),a.open||i.preventDefault())}),onKeyDown:K(e.onKeyDown,i=>{r||(["Enter"," "].includes(i.key)&&a.onOpenToggle(),i.key==="ArrowDown"&&a.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(i.key)&&i.preventDefault())})})})});Cf.displayName=Sf;var fC="DropdownMenuPortal",Mf=e=>{const{__scopeDropdownMenu:t,...n}=e,r=Ye(t);return d.jsx(XS,{...r,...n})};Mf.displayName=fC;var Df="DropdownMenuContent",kf=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=wf(Df,n),a=Ye(n),s=f.useRef(!1);return d.jsx(ZS,{id:o.contentId,"aria-labelledby":o.triggerId,...a,...r,ref:t,onCloseAutoFocus:K(e.onCloseAutoFocus,i=>{var l;s.current||(l=o.triggerRef.current)==null||l.focus(),s.current=!1,i.preventDefault()}),onInteractOutside:K(e.onInteractOutside,i=>{const l=i.detail.originalEvent,u=l.button===0&&l.ctrlKey===!0,m=l.button===2||u;(!o.modal||m)&&(s.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});kf.displayName=Df;var mC="DropdownMenuGroup",Ef=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ye(n);return d.jsx(QS,{...o,...r,ref:t})});Ef.displayName=mC;var pC="DropdownMenuLabel",Nf=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ye(n);return d.jsx(JS,{...o,...r,ref:t})});Nf.displayName=pC;var hC="DropdownMenuItem",Rf=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ye(n);return d.jsx(eC,{...o,...r,ref:t})});Rf.displayName=hC;var gC="DropdownMenuCheckboxItem",Tf=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ye(n);return d.jsx(tC,{...o,...r,ref:t})});Tf.displayName=gC;var vC="DropdownMenuRadioGroup",_f=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ye(n);return d.jsx(nC,{...o,...r,ref:t})});_f.displayName=vC;var yC="DropdownMenuRadioItem",Of=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ye(n);return d.jsx(rC,{...o,...r,ref:t})});Of.displayName=yC;var bC="DropdownMenuItemIndicator",Pf=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ye(n);return d.jsx(oC,{...o,...r,ref:t})});Pf.displayName=bC;var wC="DropdownMenuSeparator",Af=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ye(n);return d.jsx(aC,{...o,...r,ref:t})});Af.displayName=wC;var xC="DropdownMenuArrow",SC=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ye(n);return d.jsx(sC,{...o,...r,ref:t})});SC.displayName=xC;var CC=e=>{const{__scopeDropdownMenu:t,children:n,open:r,onOpenChange:o,defaultOpen:a}=e,s=Ye(t),[i,l]=tt({prop:r,defaultProp:a??!1,onChange:o,caller:"DropdownMenuSub"});return d.jsx(iC,{...s,open:i,onOpenChange:l,children:n})},MC="DropdownMenuSubTrigger",If=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ye(n);return d.jsx(cC,{...o,...r,ref:t})});If.displayName=MC;var DC="DropdownMenuSubContent",jf=f.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ye(n);return d.jsx(lC,{...o,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});jf.displayName=DC;var kC=xf,EC=Cf,NC=Mf,$f=kf,RC=Ef,Lf=Nf,Ff=Rf,Wf=Tf,TC=_f,Bf=Of,Yf=Pf,Hf=Af,_C=CC,zf=If,Gf=jf;const OC=kC,PC=EC,AC=RC,IC=_C,jC=TC,Uf=f.forwardRef(({className:e,inset:t,children:n,...r},o)=>d.jsxs(zf,{ref:o,className:F("flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",t&&"pl-8",e),...r,children:[n,d.jsx(Ra,{className:"ml-auto"})]}));Uf.displayName=zf.displayName;const qf=f.forwardRef(({className:e,...t},n)=>d.jsx(Gf,{ref:n,className:F("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-dropdown-menu-content-transform-origin]",e),...t}));qf.displayName=Gf.displayName;const Vf=f.forwardRef(({className:e,sideOffset:t=4,...n},r)=>d.jsx(NC,{children:d.jsx($f,{ref:r,sideOffset:t,className:F("z-50 max-h-[var(--radix-dropdown-menu-content-available-height)] min-w-[8rem] overflow-y-auto overflow-x-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 origin-[--radix-dropdown-menu-content-transform-origin]",e),...n})}));Vf.displayName=$f.displayName;const Kf=f.forwardRef(({className:e,inset:t,...n},r)=>d.jsx(Ff,{ref:r,className:F("relative flex cursor-default select-none items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",t&&"pl-8",e),...n}));Kf.displayName=Ff.displayName;const Xf=f.forwardRef(({className:e,children:t,checked:n,...r},o)=>d.jsxs(Wf,{ref:o,className:F("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:n,...r,children:[d.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:d.jsx(Yf,{children:d.jsx(tr,{className:"h-4 w-4"})})}),t]}));Xf.displayName=Wf.displayName;const Zf=f.forwardRef(({className:e,children:t,...n},r)=>d.jsxs(Bf,{ref:r,className:F("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[d.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:d.jsx(Yf,{children:d.jsx(oc,{className:"h-2 w-2 fill-current"})})}),t]}));Zf.displayName=Bf.displayName;const Qf=f.forwardRef(({className:e,inset:t,...n},r)=>d.jsx(Lf,{ref:r,className:F("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...n}));Qf.displayName=Lf.displayName;const Jf=f.forwardRef(({className:e,...t},n)=>d.jsx(Hf,{ref:n,className:F("-mx-1 my-1 h-px bg-muted",e),...t}));Jf.displayName=Hf.displayName;const em=({className:e,...t})=>d.jsx("span",{className:F("ml-auto text-xs tracking-widest opacity-60",e),...t});em.displayName="DropdownMenuShortcut";var Ss="Radio",[$C,tm]=Be(Ss),[LC,FC]=$C(Ss),nm=f.forwardRef((e,t)=>{const{__scopeRadio:n,name:r,checked:o=!1,required:a,disabled:s,value:i="on",onCheck:l,form:u,...m}=e,[c,p]=f.useState(null),h=he(t,g=>p(g)),y=f.useRef(!1),v=c?u||!!c.closest("form"):!0;return d.jsxs(LC,{scope:n,checked:o,disabled:s,children:[d.jsx(ee.button,{type:"button",role:"radio","aria-checked":o,"data-state":sm(o),"data-disabled":s?"":void 0,disabled:s,value:i,...m,ref:h,onClick:K(e.onClick,g=>{o||l==null||l(),v&&(y.current=g.isPropagationStopped(),y.current||g.stopPropagation())})}),v&&d.jsx(am,{control:c,bubbles:!y.current,name:r,value:i,checked:o,required:a,disabled:s,form:u,style:{transform:"translateX(-100%)"}})]})});nm.displayName=Ss;var rm="RadioIndicator",om=f.forwardRef((e,t)=>{const{__scopeRadio:n,forceMount:r,...o}=e,a=FC(rm,n);return d.jsx(ze,{present:r||a.checked,children:d.jsx(ee.span,{"data-state":sm(a.checked),"data-disabled":a.disabled?"":void 0,...o,ref:t})})});om.displayName=rm;var WC="RadioBubbleInput",am=f.forwardRef(({__scopeRadio:e,control:t,checked:n,bubbles:r=!0,...o},a)=>{const s=f.useRef(null),i=he(s,a),l=za(n),u=$a(t);return f.useEffect(()=>{const m=s.current;if(!m)return;const c=window.HTMLInputElement.prototype,h=Object.getOwnPropertyDescriptor(c,"checked").set;if(l!==n&&h){const y=new Event("click",{bubbles:r});h.call(m,n),m.dispatchEvent(y)}},[l,n,r]),d.jsx(ee.input,{type:"radio","aria-hidden":!0,defaultChecked:n,...o,tabIndex:-1,ref:i,style:{...o.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});am.displayName=WC;function sm(e){return e?"checked":"unchecked"}var BC=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],So="RadioGroup",[YC,mD]=Be(So,[On,tm]),im=On(),cm=tm(),[HC,zC]=YC(So),lm=f.forwardRef((e,t)=>{const{__scopeRadioGroup:n,name:r,defaultValue:o,value:a,required:s=!1,disabled:i=!1,orientation:l,dir:u,loop:m=!0,onValueChange:c,...p}=e,h=im(n),y=ur(u),[v,g]=tt({prop:a,defaultProp:o??null,onChange:c,caller:So});return d.jsx(HC,{scope:n,name:r,required:s,disabled:i,value:v,onValueChange:g,children:d.jsx(fs,{asChild:!0,...h,orientation:l,dir:y,loop:m,children:d.jsx(ee.div,{role:"radiogroup","aria-required":s,"aria-orientation":l,"data-disabled":i?"":void 0,dir:y,...p,ref:t})})})});lm.displayName=So;var um="RadioGroupItem",dm=f.forwardRef((e,t)=>{const{__scopeRadioGroup:n,disabled:r,...o}=e,a=zC(um,n),s=a.disabled||r,i=im(n),l=cm(n),u=f.useRef(null),m=he(t,u),c=a.value===o.value,p=f.useRef(!1);return f.useEffect(()=>{const h=v=>{BC.includes(v.key)&&(p.current=!0)},y=()=>p.current=!1;return document.addEventListener("keydown",h),document.addEventListener("keyup",y),()=>{document.removeEventListener("keydown",h),document.removeEventListener("keyup",y)}},[]),d.jsx(ms,{asChild:!0,...i,focusable:!s,active:c,children:d.jsx(nm,{disabled:s,required:a.required,checked:c,...l,...o,name:a.name,ref:m,onCheck:()=>a.onValueChange(o.value),onKeyDown:K(h=>{h.key==="Enter"&&h.preventDefault()}),onFocus:K(o.onFocus,()=>{var h;p.current&&((h=u.current)==null||h.click())})})})});dm.displayName=um;var GC="RadioGroupIndicator",fm=f.forwardRef((e,t)=>{const{__scopeRadioGroup:n,...r}=e,o=cm(n);return d.jsx(om,{...o,...r,ref:t})});fm.displayName=GC;var mm=lm,pm=dm,UC=fm;const hm=f.forwardRef(({className:e,...t},n)=>d.jsx(mm,{ref:n,className:F("grid gap-2",e),...t}));hm.displayName=mm.displayName;const gm=f.forwardRef(({className:e,...t},n)=>d.jsx(pm,{ref:n,className:F(`
200
200
  aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background
201
201
  focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2
202
202
  disabled:cursor-not-allowed disabled:opacity-50
203
- `,e),...t,children:d.jsx(xC,{className:"flex items-center justify-center",children:d.jsx(zi,{className:"h-2.5 w-2.5 fill-current text-current"})})}));tm.displayName=Jf.displayName;var bo="Tabs",[SC,jM]=Ye(bo,[On]),nm=On(),[CC,hs]=SC(bo),rm=f.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:o,defaultValue:a,orientation:s="horizontal",dir:i,activationMode:l="automatic",...u}=e,m=ir(i),[c,p]=tt({prop:r,onChange:o,defaultProp:a??"",caller:bo});return d.jsx(CC,{scope:n,baseId:ke(),value:c,onValueChange:p,orientation:s,dir:m,activationMode:l,children:d.jsx(te.div,{dir:m,"data-orientation":s,...u,ref:t})})});rm.displayName=bo;var om="TabsList",am=f.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...o}=e,a=hs(om,n),s=nm(n);return d.jsx(os,{asChild:!0,...s,orientation:a.orientation,dir:a.dir,loop:r,children:d.jsx(te.div,{role:"tablist","aria-orientation":a.orientation,...o,ref:t})})});am.displayName=om;var sm="TabsTrigger",im=f.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:o=!1,...a}=e,s=hs(sm,n),i=nm(n),l=um(s.baseId,r),u=dm(s.baseId,r),m=r===s.value;return d.jsx(as,{asChild:!0,...i,focusable:!o,active:m,children:d.jsx(te.button,{type:"button",role:"tab","aria-selected":m,"aria-controls":u,"data-state":m?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:l,...a,ref:t,onMouseDown:K(e.onMouseDown,c=>{!o&&c.button===0&&c.ctrlKey===!1?s.onValueChange(r):c.preventDefault()}),onKeyDown:K(e.onKeyDown,c=>{[" ","Enter"].includes(c.key)&&s.onValueChange(r)}),onFocus:K(e.onFocus,()=>{const c=s.activationMode!=="manual";!m&&!o&&c&&s.onValueChange(r)})})})});im.displayName=sm;var cm="TabsContent",lm=f.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:o,children:a,...s}=e,i=hs(cm,n),l=um(i.baseId,r),u=dm(i.baseId,r),m=r===i.value,c=f.useRef(m);return f.useEffect(()=>{const p=requestAnimationFrame(()=>c.current=!1);return()=>cancelAnimationFrame(p)},[]),d.jsx(He,{present:o||m,children:({present:p})=>d.jsx(te.div,{"data-state":m?"active":"inactive","data-orientation":i.orientation,role:"tabpanel","aria-labelledby":l,hidden:!p,id:u,tabIndex:0,...s,ref:t,style:{...e.style,animationDuration:c.current?"0s":void 0},children:p&&a})})});lm.displayName=cm;function um(e,t){return`${e}-trigger-${t}`}function dm(e,t){return`${e}-content-${t}`}var MC=rm,fm=am,mm=im,pm=lm;const EC=MC,hm=f.forwardRef(({className:e,...t},n)=>d.jsx(fm,{ref:n,className:q("inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",e),...t}));hm.displayName=fm.displayName;const gm=f.forwardRef(({className:e,...t},n)=>d.jsx(mm,{ref:n,className:q("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm",e),...t}));gm.displayName=mm.displayName;const vm=f.forwardRef(({className:e,...t},n)=>d.jsx(pm,{ref:n,className:q("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));vm.displayName=pm.displayName;function kC(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}const NC=e=>{switch(e){case"success":return TC;case"info":return _C;case"warning":return OC;case"error":return PC;default:return null}},DC=Array(12).fill(0),RC=({visible:e,className:t})=>b.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},b.createElement("div",{className:"sonner-spinner"},DC.map((n,r)=>b.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),TC=b.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},b.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),OC=b.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},b.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),_C=b.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},b.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),PC=b.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},b.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),AC=b.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},b.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),b.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),IC=()=>{const[e,t]=b.useState(document.hidden);return b.useEffect(()=>{const n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e};let ba=1;class jC{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{const n=this.subscribers.indexOf(t);this.subscribers.splice(n,1)}),this.publish=t=>{this.subscribers.forEach(n=>n(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var n;const{message:r,...o}=t,a=typeof(t==null?void 0:t.id)=="number"||((n=t.id)==null?void 0:n.length)>0?t.id:ba++,s=this.toasts.find(l=>l.id===a),i=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(a)&&this.dismissedToasts.delete(a),s?this.toasts=this.toasts.map(l=>l.id===a?(this.publish({...l,...t,id:a,title:r}),{...l,...t,id:a,dismissible:i,title:r}):l):this.addToast({title:r,...o,dismissible:i,id:a}),a},this.dismiss=t=>(t?(this.dismissedToasts.add(t),requestAnimationFrame(()=>this.subscribers.forEach(n=>n({id:t,dismiss:!0})))):this.toasts.forEach(n=>{this.subscribers.forEach(r=>r({id:n.id,dismiss:!0}))}),t),this.message=(t,n)=>this.create({...n,message:t}),this.error=(t,n)=>this.create({...n,message:t,type:"error"}),this.success=(t,n)=>this.create({...n,type:"success",message:t}),this.info=(t,n)=>this.create({...n,type:"info",message:t}),this.warning=(t,n)=>this.create({...n,type:"warning",message:t}),this.loading=(t,n)=>this.create({...n,type:"loading",message:t}),this.promise=(t,n)=>{if(!n)return;let r;n.loading!==void 0&&(r=this.create({...n,promise:t,type:"loading",message:n.loading,description:typeof n.description!="function"?n.description:void 0}));const o=Promise.resolve(t instanceof Function?t():t);let a=r!==void 0,s;const i=o.then(async u=>{if(s=["resolve",u],b.isValidElement(u))a=!1,this.create({id:r,type:"default",message:u});else if(LC(u)&&!u.ok){a=!1;const c=typeof n.error=="function"?await n.error(`HTTP error! status: ${u.status}`):n.error,p=typeof n.description=="function"?await n.description(`HTTP error! status: ${u.status}`):n.description,y=typeof c=="object"&&!b.isValidElement(c)?c:{message:c};this.create({id:r,type:"error",description:p,...y})}else if(u instanceof Error){a=!1;const c=typeof n.error=="function"?await n.error(u):n.error,p=typeof n.description=="function"?await n.description(u):n.description,y=typeof c=="object"&&!b.isValidElement(c)?c:{message:c};this.create({id:r,type:"error",description:p,...y})}else if(n.success!==void 0){a=!1;const c=typeof n.success=="function"?await n.success(u):n.success,p=typeof n.description=="function"?await n.description(u):n.description,y=typeof c=="object"&&!b.isValidElement(c)?c:{message:c};this.create({id:r,type:"success",description:p,...y})}}).catch(async u=>{if(s=["reject",u],n.error!==void 0){a=!1;const m=typeof n.error=="function"?await n.error(u):n.error,c=typeof n.description=="function"?await n.description(u):n.description,h=typeof m=="object"&&!b.isValidElement(m)?m:{message:m};this.create({id:r,type:"error",description:c,...h})}}).finally(()=>{a&&(this.dismiss(r),r=void 0),n.finally==null||n.finally.call(n)}),l=()=>new Promise((u,m)=>i.then(()=>s[0]==="reject"?m(s[1]):u(s[1])).catch(m));return typeof r!="string"&&typeof r!="number"?{unwrap:l}:Object.assign(r,{unwrap:l})},this.custom=(t,n)=>{const r=(n==null?void 0:n.id)||ba++;return this.create({jsx:t(r),id:r,...n}),r},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const qe=new jC,$C=(e,t)=>{const n=(t==null?void 0:t.id)||ba++;return qe.addToast({title:e,...t,id:n}),n},LC=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",FC=$C,WC=()=>qe.toasts,BC=()=>qe.getActiveToasts(),Bn=Object.assign(FC,{success:qe.success,info:qe.info,warning:qe.warning,error:qe.error,custom:qe.custom,message:qe.message,promise:qe.promise,dismiss:qe.dismiss,loading:qe.loading},{getHistory:WC,getToasts:BC});kC("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function Dr(e){return e.label!==void 0}const YC=3,HC="24px",zC="16px",xi=4e3,GC=356,UC=14,qC=45,VC=200;function ut(...e){return e.filter(Boolean).join(" ")}function KC(e){const[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}const XC=e=>{var t,n,r,o,a,s,i,l,u;const{invert:m,toast:c,unstyled:p,interacting:h,setHeights:y,visibleToasts:g,heights:v,index:w,toasts:x,expanded:S,removeToast:k,defaultRichColors:C,closeButton:N,style:M,cancelButtonStyle:D,actionButtonStyle:L,className:B="",descriptionClassName:F="",duration:V,position:$,gap:I,expandByDefault:_,classNames:R,icons:P,closeButtonAriaLabel:E="Close toast"}=e,[O,Y]=b.useState(null),[G,T]=b.useState(null),[A,W]=b.useState(!1),[H,U]=b.useState(!1),[j,Z]=b.useState(!1),[X,Q]=b.useState(!1),[le,de]=b.useState(!1),[xe,re]=b.useState(0),[ze,We]=b.useState(0),ie=b.useRef(c.duration||V||xi),pe=b.useRef(null),Se=b.useRef(null),je=w===0,Be=w+1<=g,_e=c.type,$e=c.dismissible!==!1,Yt=c.className||"",nn=c.descriptionClassName||"",Nt=b.useMemo(()=>v.findIndex(ne=>ne.toastId===c.id)||0,[v,c.id]),_n=b.useMemo(()=>{var ne;return(ne=c.closeButton)!=null?ne:N},[c.closeButton,N]),bt=b.useMemo(()=>c.duration||V||xi,[c.duration,V]),Ht=b.useRef(0),nt=b.useRef(0),rn=b.useRef(0),Ge=b.useRef(null),[on,Pn]=$.split("-"),an=b.useMemo(()=>v.reduce((ne,ue,ve)=>ve>=Nt?ne:ne+ue.height,0),[v,Nt]),zt=IC(),An=c.invert||m,Dt=_e==="loading";nt.current=b.useMemo(()=>Nt*I+an,[Nt,an]),b.useEffect(()=>{ie.current=bt},[bt]),b.useEffect(()=>{W(!0)},[]),b.useEffect(()=>{const ne=Se.current;if(ne){const ue=ne.getBoundingClientRect().height;return We(ue),y(ve=>[{toastId:c.id,height:ue,position:c.position},...ve]),()=>y(ve=>ve.filter(ce=>ce.toastId!==c.id))}},[y,c.id]),b.useLayoutEffect(()=>{if(!A)return;const ne=Se.current,ue=ne.style.height;ne.style.height="auto";const ve=ne.getBoundingClientRect().height;ne.style.height=ue,We(ve),y(ce=>ce.find(be=>be.toastId===c.id)?ce.map(be=>be.toastId===c.id?{...be,height:ve}:be):[{toastId:c.id,height:ve,position:c.position},...ce])},[A,c.title,c.description,y,c.id,c.jsx,c.action,c.cancel]);const z=b.useCallback(()=>{U(!0),re(nt.current),y(ne=>ne.filter(ue=>ue.toastId!==c.id)),setTimeout(()=>{k(c)},VC)},[c,k,y,nt]);b.useEffect(()=>{if(c.promise&&_e==="loading"||c.duration===1/0||c.type==="loading")return;let ne;return S||h||zt?(()=>{if(rn.current<Ht.current){const ce=new Date().getTime()-Ht.current;ie.current=ie.current-ce}rn.current=new Date().getTime()})():(()=>{ie.current!==1/0&&(Ht.current=new Date().getTime(),ne=setTimeout(()=>{c.onAutoClose==null||c.onAutoClose.call(c,c),z()},ie.current))})(),()=>clearTimeout(ne)},[S,h,c,_e,zt,z]),b.useEffect(()=>{c.delete&&(z(),c.onDismiss==null||c.onDismiss.call(c,c))},[z,c.delete]);function ae(){var ne;if(P!=null&&P.loading){var ue;return b.createElement("div",{className:ut(R==null?void 0:R.loader,c==null||(ue=c.classNames)==null?void 0:ue.loader,"sonner-loader"),"data-visible":_e==="loading"},P.loading)}return b.createElement(RC,{className:ut(R==null?void 0:R.loader,c==null||(ne=c.classNames)==null?void 0:ne.loader),visible:_e==="loading"})}const oe=c.icon||(P==null?void 0:P[_e])||NC(_e);var fe,ge;return b.createElement("li",{tabIndex:0,ref:Se,className:ut(B,Yt,R==null?void 0:R.toast,c==null||(t=c.classNames)==null?void 0:t.toast,R==null?void 0:R.default,R==null?void 0:R[_e],c==null||(n=c.classNames)==null?void 0:n[_e]),"data-sonner-toast":"","data-rich-colors":(fe=c.richColors)!=null?fe:C,"data-styled":!(c.jsx||c.unstyled||p),"data-mounted":A,"data-promise":!!c.promise,"data-swiped":le,"data-removed":H,"data-visible":Be,"data-y-position":on,"data-x-position":Pn,"data-index":w,"data-front":je,"data-swiping":j,"data-dismissible":$e,"data-type":_e,"data-invert":An,"data-swipe-out":X,"data-swipe-direction":G,"data-expanded":!!(S||_&&A),style:{"--index":w,"--toasts-before":w,"--z-index":x.length-w,"--offset":`${H?xe:nt.current}px`,"--initial-height":_?"auto":`${ze}px`,...M,...c.style},onDragEnd:()=>{Z(!1),Y(null),Ge.current=null},onPointerDown:ne=>{ne.button!==2&&(Dt||!$e||(pe.current=new Date,re(nt.current),ne.target.setPointerCapture(ne.pointerId),ne.target.tagName!=="BUTTON"&&(Z(!0),Ge.current={x:ne.clientX,y:ne.clientY})))},onPointerUp:()=>{var ne,ue,ve;if(X||!$e)return;Ge.current=null;const ce=Number(((ne=Se.current)==null?void 0:ne.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Ue=Number(((ue=Se.current)==null?void 0:ue.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),be=new Date().getTime()-((ve=pe.current)==null?void 0:ve.getTime()),Ce=O==="x"?ce:Ue,Ve=Math.abs(Ce)/be;if(Math.abs(Ce)>=qC||Ve>.11){re(nt.current),c.onDismiss==null||c.onDismiss.call(c,c),T(O==="x"?ce>0?"right":"left":Ue>0?"down":"up"),z(),Q(!0);return}else{var Pe,rt;(Pe=Se.current)==null||Pe.style.setProperty("--swipe-amount-x","0px"),(rt=Se.current)==null||rt.style.setProperty("--swipe-amount-y","0px")}de(!1),Z(!1),Y(null)},onPointerMove:ne=>{var ue,ve,ce;if(!Ge.current||!$e||((ue=window.getSelection())==null?void 0:ue.toString().length)>0)return;const be=ne.clientY-Ge.current.y,Ce=ne.clientX-Ge.current.x;var Ve;const Pe=(Ve=e.swipeDirections)!=null?Ve:KC($);!O&&(Math.abs(Ce)>1||Math.abs(be)>1)&&Y(Math.abs(Ce)>Math.abs(be)?"x":"y");let rt={x:0,y:0};const vs=Gt=>1/(1.5+Math.abs(Gt)/20);if(O==="y"){if(Pe.includes("top")||Pe.includes("bottom"))if(Pe.includes("top")&&be<0||Pe.includes("bottom")&&be>0)rt.y=be;else{const Gt=be*vs(be);rt.y=Math.abs(Gt)<Math.abs(be)?Gt:be}}else if(O==="x"&&(Pe.includes("left")||Pe.includes("right")))if(Pe.includes("left")&&Ce<0||Pe.includes("right")&&Ce>0)rt.x=Ce;else{const Gt=Ce*vs(Ce);rt.x=Math.abs(Gt)<Math.abs(Ce)?Gt:Ce}(Math.abs(rt.x)>0||Math.abs(rt.y)>0)&&de(!0),(ve=Se.current)==null||ve.style.setProperty("--swipe-amount-x",`${rt.x}px`),(ce=Se.current)==null||ce.style.setProperty("--swipe-amount-y",`${rt.y}px`)}},_n&&!c.jsx&&_e!=="loading"?b.createElement("button",{"aria-label":E,"data-disabled":Dt,"data-close-button":!0,onClick:Dt||!$e?()=>{}:()=>{z(),c.onDismiss==null||c.onDismiss.call(c,c)},className:ut(R==null?void 0:R.closeButton,c==null||(r=c.classNames)==null?void 0:r.closeButton)},(ge=P==null?void 0:P.close)!=null?ge:AC):null,(_e||c.icon||c.promise)&&c.icon!==null&&((P==null?void 0:P[_e])!==null||c.icon)?b.createElement("div",{"data-icon":"",className:ut(R==null?void 0:R.icon,c==null||(o=c.classNames)==null?void 0:o.icon)},c.promise||c.type==="loading"&&!c.icon?c.icon||ae():null,c.type!=="loading"?oe:null):null,b.createElement("div",{"data-content":"",className:ut(R==null?void 0:R.content,c==null||(a=c.classNames)==null?void 0:a.content)},b.createElement("div",{"data-title":"",className:ut(R==null?void 0:R.title,c==null||(s=c.classNames)==null?void 0:s.title)},c.jsx?c.jsx:typeof c.title=="function"?c.title():c.title),c.description?b.createElement("div",{"data-description":"",className:ut(F,nn,R==null?void 0:R.description,c==null||(i=c.classNames)==null?void 0:i.description)},typeof c.description=="function"?c.description():c.description):null),b.isValidElement(c.cancel)?c.cancel:c.cancel&&Dr(c.cancel)?b.createElement("button",{"data-button":!0,"data-cancel":!0,style:c.cancelButtonStyle||D,onClick:ne=>{Dr(c.cancel)&&$e&&(c.cancel.onClick==null||c.cancel.onClick.call(c.cancel,ne),z())},className:ut(R==null?void 0:R.cancelButton,c==null||(l=c.classNames)==null?void 0:l.cancelButton)},c.cancel.label):null,b.isValidElement(c.action)?c.action:c.action&&Dr(c.action)?b.createElement("button",{"data-button":!0,"data-action":!0,style:c.actionButtonStyle||L,onClick:ne=>{Dr(c.action)&&(c.action.onClick==null||c.action.onClick.call(c.action,ne),!ne.defaultPrevented&&z())},className:ut(R==null?void 0:R.actionButton,c==null||(u=c.classNames)==null?void 0:u.actionButton)},c.action.label):null)};function Si(){if(typeof window>"u"||typeof document>"u")return"ltr";const e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function ZC(e,t){const n={};return[e,t].forEach((r,o)=>{const a=o===1,s=a?"--mobile-offset":"--offset",i=a?zC:HC;function l(u){["top","right","bottom","left"].forEach(m=>{n[`${s}-${m}`]=typeof u=="number"?`${u}px`:u})}typeof r=="number"||typeof r=="string"?l(r):typeof r=="object"?["top","right","bottom","left"].forEach(u=>{r[u]===void 0?n[`${s}-${u}`]=i:n[`${s}-${u}`]=typeof r[u]=="number"?`${r[u]}px`:r[u]}):l(i)}),n}const QC=b.forwardRef(function(t,n){const{invert:r,position:o="bottom-right",hotkey:a=["altKey","KeyT"],expand:s,closeButton:i,className:l,offset:u,mobileOffset:m,theme:c="light",richColors:p,duration:h,style:y,visibleToasts:g=YC,toastOptions:v,dir:w=Si(),gap:x=UC,icons:S,containerAriaLabel:k="Notifications"}=t,[C,N]=b.useState([]),M=b.useMemo(()=>Array.from(new Set([o].concat(C.filter(G=>G.position).map(G=>G.position)))),[C,o]),[D,L]=b.useState([]),[B,F]=b.useState(!1),[V,$]=b.useState(!1),[I,_]=b.useState(c!=="system"?c:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),R=b.useRef(null),P=a.join("+").replace(/Key/g,"").replace(/Digit/g,""),E=b.useRef(null),O=b.useRef(!1),Y=b.useCallback(G=>{N(T=>{var A;return(A=T.find(W=>W.id===G.id))!=null&&A.delete||qe.dismiss(G.id),T.filter(({id:W})=>W!==G.id)})},[]);return b.useEffect(()=>qe.subscribe(G=>{if(G.dismiss){requestAnimationFrame(()=>{N(T=>T.map(A=>A.id===G.id?{...A,delete:!0}:A))});return}setTimeout(()=>{Ca.flushSync(()=>{N(T=>{const A=T.findIndex(W=>W.id===G.id);return A!==-1?[...T.slice(0,A),{...T[A],...G},...T.slice(A+1)]:[G,...T]})})})}),[C]),b.useEffect(()=>{if(c!=="system"){_(c);return}if(c==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?_("dark"):_("light")),typeof window>"u")return;const G=window.matchMedia("(prefers-color-scheme: dark)");try{G.addEventListener("change",({matches:T})=>{_(T?"dark":"light")})}catch{G.addListener(({matches:A})=>{try{_(A?"dark":"light")}catch(W){console.error(W)}})}},[c]),b.useEffect(()=>{C.length<=1&&F(!1)},[C]),b.useEffect(()=>{const G=T=>{var A;if(a.every(U=>T[U]||T.code===U)){var H;F(!0),(H=R.current)==null||H.focus()}T.code==="Escape"&&(document.activeElement===R.current||(A=R.current)!=null&&A.contains(document.activeElement))&&F(!1)};return document.addEventListener("keydown",G),()=>document.removeEventListener("keydown",G)},[a]),b.useEffect(()=>{if(R.current)return()=>{E.current&&(E.current.focus({preventScroll:!0}),E.current=null,O.current=!1)}},[R.current]),b.createElement("section",{ref:n,"aria-label":`${k} ${P}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},M.map((G,T)=>{var A;const[W,H]=G.split("-");return C.length?b.createElement("ol",{key:G,dir:w==="auto"?Si():w,tabIndex:-1,ref:R,className:l,"data-sonner-toaster":!0,"data-sonner-theme":I,"data-y-position":W,"data-x-position":H,style:{"--front-toast-height":`${((A=D[0])==null?void 0:A.height)||0}px`,"--width":`${GC}px`,"--gap":`${x}px`,...y,...ZC(u,m)},onBlur:U=>{O.current&&!U.currentTarget.contains(U.relatedTarget)&&(O.current=!1,E.current&&(E.current.focus({preventScroll:!0}),E.current=null))},onFocus:U=>{U.target instanceof HTMLElement&&U.target.dataset.dismissible==="false"||O.current||(O.current=!0,E.current=U.relatedTarget)},onMouseEnter:()=>F(!0),onMouseMove:()=>F(!0),onMouseLeave:()=>{V||F(!1)},onDragEnd:()=>F(!1),onPointerDown:U=>{U.target instanceof HTMLElement&&U.target.dataset.dismissible==="false"||$(!0)},onPointerUp:()=>$(!1)},C.filter(U=>!U.position&&T===0||U.position===G).map((U,j)=>{var Z,X;return b.createElement(XC,{key:U.id,icons:S,index:j,toast:U,defaultRichColors:p,duration:(Z=v==null?void 0:v.duration)!=null?Z:h,className:v==null?void 0:v.className,descriptionClassName:v==null?void 0:v.descriptionClassName,invert:r,visibleToasts:g,closeButton:(X=v==null?void 0:v.closeButton)!=null?X:i,interacting:V,position:G,style:v==null?void 0:v.style,unstyled:v==null?void 0:v.unstyled,classNames:v==null?void 0:v.classNames,cancelButtonStyle:v==null?void 0:v.cancelButtonStyle,actionButtonStyle:v==null?void 0:v.actionButtonStyle,closeButtonAriaLabel:v==null?void 0:v.closeButtonAriaLabel,removeToast:Y,toasts:C.filter(Q=>Q.position==U.position),heights:D.filter(Q=>Q.position==U.position),setHeights:L,expandByDefault:s,gap:x,expanded:B,swipeDirections:t.swipeDirections})})):null}))}),JC=Vr("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),wa=f.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...o},a)=>{const s=r?Mi:"button";return d.jsx(s,{className:q(JC({variant:t,size:n,className:e})),ref:a,...o})});wa.displayName="Button";const eM={error:"bg-red-500 text-white",info:"bg-blue-500 text-white",warning:"bg-amber-500 text-white",success:"bg-green-500 text-white"},tM={error:5e3,info:4e3,warning:5e3,success:4e3},nM=(e,t)=>{const n=(t==null?void 0:t.variant)||"info",r=eM[n],o=d.jsxs("div",{className:`flex items-center w-full p-3 rounded-md shadow-md ${r}`,children:[(t==null?void 0:t.icon)&&t.iconPosition!=="right"&&d.jsx("div",{className:"mr-3",children:t.icon}),d.jsxs("div",{className:"flex-1",children:[d.jsx("p",{className:"text-sm font-semibold",children:e}),(t==null?void 0:t.description)&&d.jsx("p",{className:"text-sm text-white/90",children:t.description})]}),(t==null?void 0:t.icon)&&t.iconPosition==="right"&&d.jsx("div",{className:"ml-3",children:t.icon}),d.jsx("div",{className:"ml-4",children:t!=null&&t.action?d.jsx(wa,{variant:"ghost",size:"sm",className:"text-white",onClick:t.action.onClick,children:t.action.label}):d.jsx(wa,{variant:"ghost",size:"icon",className:"text-white",onClick:()=>Bn.dismiss(),children:d.jsx(En,{className:"w-4 h-4",strokeWidth:2.5})})})]}),a={unstyled:!0,duration:(t==null?void 0:t.duration)||tM[n],icon:t==null?void 0:t.icon,iconPosition:t==null?void 0:t.iconPosition,action:t==null?void 0:t.action,variant:t==null?void 0:t.variant};switch(n){case"success":return Bn.success(o,a);case"error":return Bn.error(o,a);case"warning":return Bn.warning(o,a);default:return Bn(o,a)}};function rM(e){return d.jsx(QC,{...e})}var[wo,$M]=Ye("Tooltip",[$t]),xo=$t(),ym="TooltipProvider",oM=700,xa="tooltip.open",[aM,gs]=wo(ym),bm=e=>{const{__scopeTooltip:t,delayDuration:n=oM,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:a}=e,s=f.useRef(!0),i=f.useRef(!1),l=f.useRef(0);return f.useEffect(()=>{const u=l.current;return()=>window.clearTimeout(u)},[]),d.jsx(aM,{scope:t,isOpenDelayedRef:s,delayDuration:n,onOpen:f.useCallback(()=>{window.clearTimeout(l.current),s.current=!1},[]),onClose:f.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>s.current=!0,r)},[r]),isPointerInTransitRef:i,onPointerInTransitChange:f.useCallback(u=>{i.current=u},[]),disableHoverableContent:o,children:a})};bm.displayName=ym;var Qn="Tooltip",[sM,So]=wo(Qn),wm=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o,onOpenChange:a,disableHoverableContent:s,delayDuration:i}=e,l=gs(Qn,e.__scopeTooltip),u=xo(t),[m,c]=f.useState(null),p=ke(),h=f.useRef(0),y=s??l.disableHoverableContent,g=i??l.delayDuration,v=f.useRef(!1),[w,x]=tt({prop:r,defaultProp:o??!1,onChange:M=>{M?(l.onOpen(),document.dispatchEvent(new CustomEvent(xa))):l.onClose(),a==null||a(M)},caller:Qn}),S=f.useMemo(()=>w?v.current?"delayed-open":"instant-open":"closed",[w]),k=f.useCallback(()=>{window.clearTimeout(h.current),h.current=0,v.current=!1,x(!0)},[x]),C=f.useCallback(()=>{window.clearTimeout(h.current),h.current=0,x(!1)},[x]),N=f.useCallback(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>{v.current=!0,x(!0),h.current=0},g)},[g,x]);return f.useEffect(()=>()=>{h.current&&(window.clearTimeout(h.current),h.current=0)},[]),d.jsx(nr,{...u,children:d.jsx(sM,{scope:t,contentId:p,open:w,stateAttribute:S,trigger:m,onTriggerChange:c,onTriggerEnter:f.useCallback(()=>{l.isOpenDelayedRef.current?N():k()},[l.isOpenDelayedRef,N,k]),onTriggerLeave:f.useCallback(()=>{y?C():(window.clearTimeout(h.current),h.current=0)},[C,y]),onOpen:k,onClose:C,disableHoverableContent:y,children:n})})};wm.displayName=Qn;var Sa="TooltipTrigger",xm=f.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=So(Sa,n),a=gs(Sa,n),s=xo(n),i=f.useRef(null),l=he(t,i,o.onTriggerChange),u=f.useRef(!1),m=f.useRef(!1),c=f.useCallback(()=>u.current=!1,[]);return f.useEffect(()=>()=>document.removeEventListener("pointerup",c),[c]),d.jsx(rr,{asChild:!0,...s,children:d.jsx(te.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:l,onPointerMove:K(e.onPointerMove,p=>{p.pointerType!=="touch"&&!m.current&&!a.isPointerInTransitRef.current&&(o.onTriggerEnter(),m.current=!0)}),onPointerLeave:K(e.onPointerLeave,()=>{o.onTriggerLeave(),m.current=!1}),onPointerDown:K(e.onPointerDown,()=>{o.open&&o.onClose(),u.current=!0,document.addEventListener("pointerup",c,{once:!0})}),onFocus:K(e.onFocus,()=>{u.current||o.onOpen()}),onBlur:K(e.onBlur,o.onClose),onClick:K(e.onClick,o.onClose)})})});xm.displayName=Sa;var iM="TooltipPortal",[LM,cM]=wo(iM,{forceMount:void 0}),xn="TooltipContent",Sm=f.forwardRef((e,t)=>{const n=cM(xn,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...a}=e,s=So(xn,e.__scopeTooltip);return d.jsx(He,{present:r||s.open,children:s.disableHoverableContent?d.jsx(Cm,{side:o,...a,ref:t}):d.jsx(lM,{side:o,...a,ref:t})})}),lM=f.forwardRef((e,t)=>{const n=So(xn,e.__scopeTooltip),r=gs(xn,e.__scopeTooltip),o=f.useRef(null),a=he(t,o),[s,i]=f.useState(null),{trigger:l,onClose:u}=n,m=o.current,{onPointerInTransitChange:c}=r,p=f.useCallback(()=>{i(null),c(!1)},[c]),h=f.useCallback((y,g)=>{const v=y.currentTarget,w={x:y.clientX,y:y.clientY},x=mM(w,v.getBoundingClientRect()),S=pM(w,x),k=hM(g.getBoundingClientRect()),C=vM([...S,...k]);i(C),c(!0)},[c]);return f.useEffect(()=>()=>p(),[p]),f.useEffect(()=>{if(l&&m){const y=v=>h(v,m),g=v=>h(v,l);return l.addEventListener("pointerleave",y),m.addEventListener("pointerleave",g),()=>{l.removeEventListener("pointerleave",y),m.removeEventListener("pointerleave",g)}}},[l,m,h,p]),f.useEffect(()=>{if(s){const y=g=>{const v=g.target,w={x:g.clientX,y:g.clientY},x=(l==null?void 0:l.contains(v))||(m==null?void 0:m.contains(v)),S=!gM(w,s);x?p():S&&(p(),u())};return document.addEventListener("pointermove",y),()=>document.removeEventListener("pointermove",y)}},[l,m,s,u,p]),d.jsx(Cm,{...e,ref:a})}),[uM,dM]=wo(Qn,{isInside:!1}),fM=Rm("TooltipContent"),Cm=f.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:a,onPointerDownOutside:s,...i}=e,l=So(xn,n),u=xo(n),{onClose:m}=l;return f.useEffect(()=>(document.addEventListener(xa,m),()=>document.removeEventListener(xa,m)),[m]),f.useEffect(()=>{if(l.trigger){const c=p=>{const h=p.target;h!=null&&h.contains(l.trigger)&&m()};return window.addEventListener("scroll",c,{capture:!0}),()=>window.removeEventListener("scroll",c,{capture:!0})}},[l.trigger,m]),d.jsx(kn,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:s,onFocusOutside:c=>c.preventDefault(),onDismiss:m,children:d.jsxs(eo,{"data-state":l.stateAttribute,...u,...i,ref:t,style:{...i.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[d.jsx(fM,{children:r}),d.jsx(uM,{scope:n,isInside:!0,children:d.jsx(Hv,{id:l.contentId,role:"tooltip",children:o||r})})]})})});Sm.displayName=xn;var Mm="TooltipArrow",Em=f.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=xo(n);return dM(Mm,n).isInside?null:d.jsx(to,{...o,...r,ref:t})});Em.displayName=Mm;function mM(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,r,o,a)){case a:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function pM(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function hM(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}function gM(e,t){const{x:n,y:r}=e;let o=!1;for(let a=0,s=t.length-1;a<t.length;s=a++){const i=t[a],l=t[s],u=i.x,m=i.y,c=l.x,p=l.y;m>r!=p>r&&n<(c-u)*(r-m)/(p-m)+u&&(o=!o)}return o}function vM(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),yM(t)}function yM(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const o=e[r];for(;t.length>=2;){const a=t[t.length-1],s=t[t.length-2];if((a.x-s.x)*(o.y-s.y)>=(a.y-s.y)*(o.x-s.x))t.pop();else break}t.push(o)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const o=e[r];for(;n.length>=2;){const a=n[n.length-1],s=n[n.length-2];if((a.x-s.x)*(o.y-s.y)>=(a.y-s.y)*(o.x-s.x))n.pop();else break}n.push(o)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var bM=bm,wM=wm,xM=xm,km=Sm,SM=Em;const CM=bM,MM=wM,EM=xM,Nm=f.forwardRef(({className:e,sideOffset:t=4,children:n,...r},o)=>d.jsxs(km,{ref:o,sideOffset:t,className:q("z-50 rounded-xl border border-border bg-background px-3 py-1.5 text-sm text-foreground shadow-xl transition-all","animate-in fade-in zoom-in-95","data-[state=closed]:animate-out data-[state=closed]:fade-out data-[state=closed]:zoom-out-95","data-[side=bottom]:slide-in-from-top-2","data-[side=left]:slide-in-from-right-2","data-[side=right]:slide-in-from-left-2","data-[side=top]:slide-in-from-bottom-2","origin-[--radix-tooltip-content-transform-origin]",e),...r,children:[n,d.jsx(SM,{className:"fill-background stroke-border h-2 w-4"})]}));Nm.displayName=km.displayName;exports.AddressFormSection=Wx;exports.Alert=Hu;exports.AutoComplete=O0;exports.Avatar=Ju;exports.AvatarFallback=td;exports.AvatarImage=ed;exports.Checkbox=ld;exports.ComponentSection=_0;exports.ContactFormSection=Yx;exports.CurrencyInput=Iu;exports.DatePickerField=Hr;exports.Dialog=S0;exports.DialogClose=E0;exports.DialogContent=ku;exports.DialogDescription=Tu;exports.DialogFooter=Du;exports.DialogHeader=Nu;exports.DialogTitle=Ru;exports.DialogTrigger=C0;exports.DoctAnimationLoader=gp;exports.DoctAutocomplete=F0;exports.DoctButton=gn;exports.DoctButtonVariants=Li;exports.DoctChip=Ox;exports.DoctTypography=hp;exports.Drawer=xd;exports.DrawerClose=FS;exports.DrawerContent=Cd;exports.DrawerDescription=Nd;exports.DrawerFooter=Ed;exports.DrawerHeader=Md;exports.DrawerTitle=kd;exports.DrawerTrigger=$S;exports.DropdownMenu=iC;exports.DropdownMenuCheckboxItem=If;exports.DropdownMenuContent=Pf;exports.DropdownMenuGroup=lC;exports.DropdownMenuItem=Af;exports.DropdownMenuLabel=$f;exports.DropdownMenuRadioGroup=dC;exports.DropdownMenuRadioItem=jf;exports.DropdownMenuSeparator=Lf;exports.DropdownMenuShortcut=Ff;exports.DropdownMenuSub=uC;exports.DropdownMenuSubContent=_f;exports.DropdownMenuSubTrigger=Of;exports.DropdownMenuTrigger=cC;exports.ExpandableCard=U0;exports.LabeledInput=Qe;exports.OtpInput=wp;exports.PasswordInput=Qo;exports.Popover=Lc;exports.PopoverContent=ja;exports.PopoverTrigger=Fc;exports.RadioGroup=em;exports.RadioGroupItem=tm;exports.SearchFilterSection=jx;exports.SearchInput=Jl;exports.SelectField=wn;exports.Tabs=EC;exports.TabsContent=vm;exports.TabsList=hm;exports.TabsTrigger=gm;exports.TextareaField=Vi;exports.Toaster=rM;exports.Tooltip=MM;exports.TooltipContent=Nm;exports.TooltipProvider=CM;exports.TooltipTrigger=EM;exports.UserRegistrationSection=Lx;exports.toast=nM;
203
+ `,e),...t,children:d.jsx(UC,{className:"flex items-center justify-center",children:d.jsx(oc,{className:"h-2.5 w-2.5 fill-current text-current"})})}));gm.displayName=pm.displayName;var Co="Tabs",[qC,pD]=Be(Co,[On]),vm=On(),[VC,Cs]=qC(Co),ym=f.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:o,defaultValue:a,orientation:s="horizontal",dir:i,activationMode:l="automatic",...u}=e,m=ur(i),[c,p]=tt({prop:r,onChange:o,defaultProp:a??"",caller:Co});return d.jsx(VC,{scope:n,baseId:ke(),value:c,onValueChange:p,orientation:s,dir:m,activationMode:l,children:d.jsx(ee.div,{dir:m,"data-orientation":s,...u,ref:t})})});ym.displayName=Co;var bm="TabsList",wm=f.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...o}=e,a=Cs(bm,n),s=vm(n);return d.jsx(fs,{asChild:!0,...s,orientation:a.orientation,dir:a.dir,loop:r,children:d.jsx(ee.div,{role:"tablist","aria-orientation":a.orientation,...o,ref:t})})});wm.displayName=bm;var xm="TabsTrigger",Sm=f.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:o=!1,...a}=e,s=Cs(xm,n),i=vm(n),l=Dm(s.baseId,r),u=km(s.baseId,r),m=r===s.value;return d.jsx(ms,{asChild:!0,...i,focusable:!o,active:m,children:d.jsx(ee.button,{type:"button",role:"tab","aria-selected":m,"aria-controls":u,"data-state":m?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:l,...a,ref:t,onMouseDown:K(e.onMouseDown,c=>{!o&&c.button===0&&c.ctrlKey===!1?s.onValueChange(r):c.preventDefault()}),onKeyDown:K(e.onKeyDown,c=>{[" ","Enter"].includes(c.key)&&s.onValueChange(r)}),onFocus:K(e.onFocus,()=>{const c=s.activationMode!=="manual";!m&&!o&&c&&s.onValueChange(r)})})})});Sm.displayName=xm;var Cm="TabsContent",Mm=f.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:o,children:a,...s}=e,i=Cs(Cm,n),l=Dm(i.baseId,r),u=km(i.baseId,r),m=r===i.value,c=f.useRef(m);return f.useEffect(()=>{const p=requestAnimationFrame(()=>c.current=!1);return()=>cancelAnimationFrame(p)},[]),d.jsx(ze,{present:o||m,children:({present:p})=>d.jsx(ee.div,{"data-state":m?"active":"inactive","data-orientation":i.orientation,role:"tabpanel","aria-labelledby":l,hidden:!p,id:u,tabIndex:0,...s,ref:t,style:{...e.style,animationDuration:c.current?"0s":void 0},children:p&&a})})});Mm.displayName=Cm;function Dm(e,t){return`${e}-trigger-${t}`}function km(e,t){return`${e}-content-${t}`}var KC=ym,Em=wm,Nm=Sm,Rm=Mm;const XC=KC,Tm=f.forwardRef(({className:e,...t},n)=>d.jsx(Em,{ref:n,className:F("inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",e),...t}));Tm.displayName=Em.displayName;const _m=f.forwardRef(({className:e,...t},n)=>d.jsx(Nm,{ref:n,className:F("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm",e),...t}));_m.displayName=Nm.displayName;const Om=f.forwardRef(({className:e,...t},n)=>d.jsx(Rm,{ref:n,className:F("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));Om.displayName=Rm.displayName;var Ms="Progress",Ds=100,[ZC,hD]=Be(Ms),[QC,JC]=ZC(Ms),Pm=f.forwardRef((e,t)=>{const{__scopeProgress:n,value:r=null,max:o,getValueLabel:a=eM,...s}=e;(o||o===0)&&!Oi(o)&&console.error(tM(`${o}`,"Progress"));const i=Oi(o)?o:Ds;r!==null&&!Pi(r,i)&&console.error(nM(`${r}`,"Progress"));const l=Pi(r,i)?r:null,u=Zr(l)?a(l,i):void 0;return d.jsx(QC,{scope:n,value:l,max:i,children:d.jsx(ee.div,{"aria-valuemax":i,"aria-valuemin":0,"aria-valuenow":Zr(l)?l:void 0,"aria-valuetext":u,role:"progressbar","data-state":jm(l,i),"data-value":l??void 0,"data-max":i,...s,ref:t})})});Pm.displayName=Ms;var Am="ProgressIndicator",Im=f.forwardRef((e,t)=>{const{__scopeProgress:n,...r}=e,o=JC(Am,n);return d.jsx(ee.div,{"data-state":jm(o.value,o.max),"data-value":o.value??void 0,"data-max":o.max,...r,ref:t})});Im.displayName=Am;function eM(e,t){return`${Math.round(e/t*100)}%`}function jm(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function Zr(e){return typeof e=="number"}function Oi(e){return Zr(e)&&!isNaN(e)&&e>0}function Pi(e,t){return Zr(e)&&!isNaN(e)&&e<=t&&e>=0}function tM(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${Ds}\`.`}function nM(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
204
+ - a positive number
205
+ - less than the value passed to \`max\` (or ${Ds} if no \`max\` prop is set)
206
+ - \`null\` or \`undefined\` if the progress is indeterminate.
207
+
208
+ Defaulting to \`null\`.`}var $m=Pm,rM=Im;const Lm=f.forwardRef(({className:e,value:t,...n},r)=>d.jsx($m,{ref:r,className:F("relative h-1.5 w-full overflow-hidden rounded-full bg-secondary",e),...n,children:d.jsx(rM,{className:"h-full w-full flex-1 bg-brandBlue transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})}));Lm.displayName=$m.displayName;function oM(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],n=document.createElement("style");n.type="text/css",t.appendChild(n),n.styleSheet?n.styleSheet.cssText=e:n.appendChild(document.createTextNode(e))}const aM=e=>{switch(e){case"success":return cM;case"info":return uM;case"warning":return lM;case"error":return dM;default:return null}},sM=Array(12).fill(0),iM=({visible:e,className:t})=>x.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},x.createElement("div",{className:"sonner-spinner"},sM.map((n,r)=>x.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),cM=x.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},x.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),lM=x.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},x.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),uM=x.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},x.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),dM=x.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},x.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),fM=x.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},x.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),x.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),mM=()=>{const[e,t]=x.useState(document.hidden);return x.useEffect(()=>{const n=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",n),()=>window.removeEventListener("visibilitychange",n)},[]),e};let Ca=1;class pM{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{const n=this.subscribers.indexOf(t);this.subscribers.splice(n,1)}),this.publish=t=>{this.subscribers.forEach(n=>n(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var n;const{message:r,...o}=t,a=typeof(t==null?void 0:t.id)=="number"||((n=t.id)==null?void 0:n.length)>0?t.id:Ca++,s=this.toasts.find(l=>l.id===a),i=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(a)&&this.dismissedToasts.delete(a),s?this.toasts=this.toasts.map(l=>l.id===a?(this.publish({...l,...t,id:a,title:r}),{...l,...t,id:a,dismissible:i,title:r}):l):this.addToast({title:r,...o,dismissible:i,id:a}),a},this.dismiss=t=>(t?(this.dismissedToasts.add(t),requestAnimationFrame(()=>this.subscribers.forEach(n=>n({id:t,dismiss:!0})))):this.toasts.forEach(n=>{this.subscribers.forEach(r=>r({id:n.id,dismiss:!0}))}),t),this.message=(t,n)=>this.create({...n,message:t}),this.error=(t,n)=>this.create({...n,message:t,type:"error"}),this.success=(t,n)=>this.create({...n,type:"success",message:t}),this.info=(t,n)=>this.create({...n,type:"info",message:t}),this.warning=(t,n)=>this.create({...n,type:"warning",message:t}),this.loading=(t,n)=>this.create({...n,type:"loading",message:t}),this.promise=(t,n)=>{if(!n)return;let r;n.loading!==void 0&&(r=this.create({...n,promise:t,type:"loading",message:n.loading,description:typeof n.description!="function"?n.description:void 0}));const o=Promise.resolve(t instanceof Function?t():t);let a=r!==void 0,s;const i=o.then(async u=>{if(s=["resolve",u],x.isValidElement(u))a=!1,this.create({id:r,type:"default",message:u});else if(gM(u)&&!u.ok){a=!1;const c=typeof n.error=="function"?await n.error(`HTTP error! status: ${u.status}`):n.error,p=typeof n.description=="function"?await n.description(`HTTP error! status: ${u.status}`):n.description,y=typeof c=="object"&&!x.isValidElement(c)?c:{message:c};this.create({id:r,type:"error",description:p,...y})}else if(u instanceof Error){a=!1;const c=typeof n.error=="function"?await n.error(u):n.error,p=typeof n.description=="function"?await n.description(u):n.description,y=typeof c=="object"&&!x.isValidElement(c)?c:{message:c};this.create({id:r,type:"error",description:p,...y})}else if(n.success!==void 0){a=!1;const c=typeof n.success=="function"?await n.success(u):n.success,p=typeof n.description=="function"?await n.description(u):n.description,y=typeof c=="object"&&!x.isValidElement(c)?c:{message:c};this.create({id:r,type:"success",description:p,...y})}}).catch(async u=>{if(s=["reject",u],n.error!==void 0){a=!1;const m=typeof n.error=="function"?await n.error(u):n.error,c=typeof n.description=="function"?await n.description(u):n.description,h=typeof m=="object"&&!x.isValidElement(m)?m:{message:m};this.create({id:r,type:"error",description:c,...h})}}).finally(()=>{a&&(this.dismiss(r),r=void 0),n.finally==null||n.finally.call(n)}),l=()=>new Promise((u,m)=>i.then(()=>s[0]==="reject"?m(s[1]):u(s[1])).catch(m));return typeof r!="string"&&typeof r!="number"?{unwrap:l}:Object.assign(r,{unwrap:l})},this.custom=(t,n)=>{const r=(n==null?void 0:n.id)||Ca++;return this.create({jsx:t(r),id:r,...n}),r},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const qe=new pM,hM=(e,t)=>{const n=(t==null?void 0:t.id)||Ca++;return qe.addToast({title:e,...t,id:n}),n},gM=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",vM=hM,yM=()=>qe.toasts,bM=()=>qe.getActiveToasts(),Yn=Object.assign(vM,{success:qe.success,info:qe.info,warning:qe.warning,error:qe.error,custom:qe.custom,message:qe.message,promise:qe.promise,dismiss:qe.dismiss,loading:qe.loading},{getHistory:yM,getToasts:bM});oM("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function _r(e){return e.label!==void 0}const wM=3,xM="24px",SM="16px",Ai=4e3,CM=356,MM=14,DM=45,kM=200;function ut(...e){return e.filter(Boolean).join(" ")}function EM(e){const[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}const NM=e=>{var t,n,r,o,a,s,i,l,u;const{invert:m,toast:c,unstyled:p,interacting:h,setHeights:y,visibleToasts:v,heights:g,index:b,toasts:w,expanded:S,removeToast:D,defaultRichColors:C,closeButton:R,style:M,cancelButtonStyle:E,actionButtonStyle:$,className:B="",descriptionClassName:L="",duration:q,position:A,gap:T,expandByDefault:_,classNames:N,icons:I,closeButtonAriaLabel:k="Close toast"}=e,[P,H]=x.useState(null),[z,O]=x.useState(null),[j,Y]=x.useState(!1),[G,V]=x.useState(!1),[W,Z]=x.useState(!1),[X,Q]=x.useState(!1),[se,ue]=x.useState(!1),[ye,J]=x.useState(0),[Re,Te]=x.useState(0),oe=x.useRef(c.duration||q||Ai),me=x.useRef(null),be=x.useRef(null),$e=b===0,He=b+1<=v,Ae=c.type,Fe=c.dismissible!==!1,zt=c.className||"",an=c.descriptionClassName||"",Nt=x.useMemo(()=>g.findIndex(re=>re.toastId===c.id)||0,[g,c.id]),Pn=x.useMemo(()=>{var re;return(re=c.closeButton)!=null?re:R},[c.closeButton,R]),bt=x.useMemo(()=>c.duration||q||Ai,[c.duration,q]),Gt=x.useRef(0),nt=x.useRef(0),sn=x.useRef(0),Ge=x.useRef(null),[cn,An]=A.split("-"),ln=x.useMemo(()=>g.reduce((re,de,ve)=>ve>=Nt?re:re+de.height,0),[g,Nt]),Ut=mM(),In=c.invert||m,Rt=Ae==="loading";nt.current=x.useMemo(()=>Nt*T+ln,[Nt,ln]),x.useEffect(()=>{oe.current=bt},[bt]),x.useEffect(()=>{Y(!0)},[]),x.useEffect(()=>{const re=be.current;if(re){const de=re.getBoundingClientRect().height;return Te(de),y(ve=>[{toastId:c.id,height:de,position:c.position},...ve]),()=>y(ve=>ve.filter(le=>le.toastId!==c.id))}},[y,c.id]),x.useLayoutEffect(()=>{if(!j)return;const re=be.current,de=re.style.height;re.style.height="auto";const ve=re.getBoundingClientRect().height;re.style.height=de,Te(ve),y(le=>le.find(xe=>xe.toastId===c.id)?le.map(xe=>xe.toastId===c.id?{...xe,height:ve}:xe):[{toastId:c.id,height:ve,position:c.position},...le])},[j,c.title,c.description,y,c.id,c.jsx,c.action,c.cancel]);const U=x.useCallback(()=>{V(!0),J(nt.current),y(re=>re.filter(de=>de.toastId!==c.id)),setTimeout(()=>{D(c)},kM)},[c,D,y,nt]);x.useEffect(()=>{if(c.promise&&Ae==="loading"||c.duration===1/0||c.type==="loading")return;let re;return S||h||Ut?(()=>{if(sn.current<Gt.current){const le=new Date().getTime()-Gt.current;oe.current=oe.current-le}sn.current=new Date().getTime()})():(()=>{oe.current!==1/0&&(Gt.current=new Date().getTime(),re=setTimeout(()=>{c.onAutoClose==null||c.onAutoClose.call(c,c),U()},oe.current))})(),()=>clearTimeout(re)},[S,h,c,Ae,Ut,U]),x.useEffect(()=>{c.delete&&(U(),c.onDismiss==null||c.onDismiss.call(c,c))},[U,c.delete]);function ie(){var re;if(I!=null&&I.loading){var de;return x.createElement("div",{className:ut(N==null?void 0:N.loader,c==null||(de=c.classNames)==null?void 0:de.loader,"sonner-loader"),"data-visible":Ae==="loading"},I.loading)}return x.createElement(iM,{className:ut(N==null?void 0:N.loader,c==null||(re=c.classNames)==null?void 0:re.loader),visible:Ae==="loading"})}const ae=c.icon||(I==null?void 0:I[Ae])||aM(Ae);var fe,ge;return x.createElement("li",{tabIndex:0,ref:be,className:ut(B,zt,N==null?void 0:N.toast,c==null||(t=c.classNames)==null?void 0:t.toast,N==null?void 0:N.default,N==null?void 0:N[Ae],c==null||(n=c.classNames)==null?void 0:n[Ae]),"data-sonner-toast":"","data-rich-colors":(fe=c.richColors)!=null?fe:C,"data-styled":!(c.jsx||c.unstyled||p),"data-mounted":j,"data-promise":!!c.promise,"data-swiped":se,"data-removed":G,"data-visible":He,"data-y-position":cn,"data-x-position":An,"data-index":b,"data-front":$e,"data-swiping":W,"data-dismissible":Fe,"data-type":Ae,"data-invert":In,"data-swipe-out":X,"data-swipe-direction":z,"data-expanded":!!(S||_&&j),style:{"--index":b,"--toasts-before":b,"--z-index":w.length-b,"--offset":`${G?ye:nt.current}px`,"--initial-height":_?"auto":`${Re}px`,...M,...c.style},onDragEnd:()=>{Z(!1),H(null),Ge.current=null},onPointerDown:re=>{re.button!==2&&(Rt||!Fe||(me.current=new Date,J(nt.current),re.target.setPointerCapture(re.pointerId),re.target.tagName!=="BUTTON"&&(Z(!0),Ge.current={x:re.clientX,y:re.clientY})))},onPointerUp:()=>{var re,de,ve;if(X||!Fe)return;Ge.current=null;const le=Number(((re=be.current)==null?void 0:re.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Ue=Number(((de=be.current)==null?void 0:de.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),xe=new Date().getTime()-((ve=me.current)==null?void 0:ve.getTime()),Ce=P==="x"?le:Ue,Ve=Math.abs(Ce)/xe;if(Math.abs(Ce)>=DM||Ve>.11){J(nt.current),c.onDismiss==null||c.onDismiss.call(c,c),O(P==="x"?le>0?"right":"left":Ue>0?"down":"up"),U(),Q(!0);return}else{var Ie,rt;(Ie=be.current)==null||Ie.style.setProperty("--swipe-amount-x","0px"),(rt=be.current)==null||rt.style.setProperty("--swipe-amount-y","0px")}ue(!1),Z(!1),H(null)},onPointerMove:re=>{var de,ve,le;if(!Ge.current||!Fe||((de=window.getSelection())==null?void 0:de.toString().length)>0)return;const xe=re.clientY-Ge.current.y,Ce=re.clientX-Ge.current.x;var Ve;const Ie=(Ve=e.swipeDirections)!=null?Ve:EM(A);!P&&(Math.abs(Ce)>1||Math.abs(xe)>1)&&H(Math.abs(Ce)>Math.abs(xe)?"x":"y");let rt={x:0,y:0};const Es=qt=>1/(1.5+Math.abs(qt)/20);if(P==="y"){if(Ie.includes("top")||Ie.includes("bottom"))if(Ie.includes("top")&&xe<0||Ie.includes("bottom")&&xe>0)rt.y=xe;else{const qt=xe*Es(xe);rt.y=Math.abs(qt)<Math.abs(xe)?qt:xe}}else if(P==="x"&&(Ie.includes("left")||Ie.includes("right")))if(Ie.includes("left")&&Ce<0||Ie.includes("right")&&Ce>0)rt.x=Ce;else{const qt=Ce*Es(Ce);rt.x=Math.abs(qt)<Math.abs(Ce)?qt:Ce}(Math.abs(rt.x)>0||Math.abs(rt.y)>0)&&ue(!0),(ve=be.current)==null||ve.style.setProperty("--swipe-amount-x",`${rt.x}px`),(le=be.current)==null||le.style.setProperty("--swipe-amount-y",`${rt.y}px`)}},Pn&&!c.jsx&&Ae!=="loading"?x.createElement("button",{"aria-label":k,"data-disabled":Rt,"data-close-button":!0,onClick:Rt||!Fe?()=>{}:()=>{U(),c.onDismiss==null||c.onDismiss.call(c,c)},className:ut(N==null?void 0:N.closeButton,c==null||(r=c.classNames)==null?void 0:r.closeButton)},(ge=I==null?void 0:I.close)!=null?ge:fM):null,(Ae||c.icon||c.promise)&&c.icon!==null&&((I==null?void 0:I[Ae])!==null||c.icon)?x.createElement("div",{"data-icon":"",className:ut(N==null?void 0:N.icon,c==null||(o=c.classNames)==null?void 0:o.icon)},c.promise||c.type==="loading"&&!c.icon?c.icon||ie():null,c.type!=="loading"?ae:null):null,x.createElement("div",{"data-content":"",className:ut(N==null?void 0:N.content,c==null||(a=c.classNames)==null?void 0:a.content)},x.createElement("div",{"data-title":"",className:ut(N==null?void 0:N.title,c==null||(s=c.classNames)==null?void 0:s.title)},c.jsx?c.jsx:typeof c.title=="function"?c.title():c.title),c.description?x.createElement("div",{"data-description":"",className:ut(L,an,N==null?void 0:N.description,c==null||(i=c.classNames)==null?void 0:i.description)},typeof c.description=="function"?c.description():c.description):null),x.isValidElement(c.cancel)?c.cancel:c.cancel&&_r(c.cancel)?x.createElement("button",{"data-button":!0,"data-cancel":!0,style:c.cancelButtonStyle||E,onClick:re=>{_r(c.cancel)&&Fe&&(c.cancel.onClick==null||c.cancel.onClick.call(c.cancel,re),U())},className:ut(N==null?void 0:N.cancelButton,c==null||(l=c.classNames)==null?void 0:l.cancelButton)},c.cancel.label):null,x.isValidElement(c.action)?c.action:c.action&&_r(c.action)?x.createElement("button",{"data-button":!0,"data-action":!0,style:c.actionButtonStyle||$,onClick:re=>{_r(c.action)&&(c.action.onClick==null||c.action.onClick.call(c.action,re),!re.defaultPrevented&&U())},className:ut(N==null?void 0:N.actionButton,c==null||(u=c.classNames)==null?void 0:u.actionButton)},c.action.label):null)};function Ii(){if(typeof window>"u"||typeof document>"u")return"ltr";const e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function RM(e,t){const n={};return[e,t].forEach((r,o)=>{const a=o===1,s=a?"--mobile-offset":"--offset",i=a?SM:xM;function l(u){["top","right","bottom","left"].forEach(m=>{n[`${s}-${m}`]=typeof u=="number"?`${u}px`:u})}typeof r=="number"||typeof r=="string"?l(r):typeof r=="object"?["top","right","bottom","left"].forEach(u=>{r[u]===void 0?n[`${s}-${u}`]=i:n[`${s}-${u}`]=typeof r[u]=="number"?`${r[u]}px`:r[u]}):l(i)}),n}const TM=x.forwardRef(function(t,n){const{invert:r,position:o="bottom-right",hotkey:a=["altKey","KeyT"],expand:s,closeButton:i,className:l,offset:u,mobileOffset:m,theme:c="light",richColors:p,duration:h,style:y,visibleToasts:v=wM,toastOptions:g,dir:b=Ii(),gap:w=MM,icons:S,containerAriaLabel:D="Notifications"}=t,[C,R]=x.useState([]),M=x.useMemo(()=>Array.from(new Set([o].concat(C.filter(z=>z.position).map(z=>z.position)))),[C,o]),[E,$]=x.useState([]),[B,L]=x.useState(!1),[q,A]=x.useState(!1),[T,_]=x.useState(c!=="system"?c:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),N=x.useRef(null),I=a.join("+").replace(/Key/g,"").replace(/Digit/g,""),k=x.useRef(null),P=x.useRef(!1),H=x.useCallback(z=>{R(O=>{var j;return(j=O.find(Y=>Y.id===z.id))!=null&&j.delete||qe.dismiss(z.id),O.filter(({id:Y})=>Y!==z.id)})},[]);return x.useEffect(()=>qe.subscribe(z=>{if(z.dismiss){requestAnimationFrame(()=>{R(O=>O.map(j=>j.id===z.id?{...j,delete:!0}:j))});return}setTimeout(()=>{Ea.flushSync(()=>{R(O=>{const j=O.findIndex(Y=>Y.id===z.id);return j!==-1?[...O.slice(0,j),{...O[j],...z},...O.slice(j+1)]:[z,...O]})})})}),[C]),x.useEffect(()=>{if(c!=="system"){_(c);return}if(c==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?_("dark"):_("light")),typeof window>"u")return;const z=window.matchMedia("(prefers-color-scheme: dark)");try{z.addEventListener("change",({matches:O})=>{_(O?"dark":"light")})}catch{z.addListener(({matches:j})=>{try{_(j?"dark":"light")}catch(Y){console.error(Y)}})}},[c]),x.useEffect(()=>{C.length<=1&&L(!1)},[C]),x.useEffect(()=>{const z=O=>{var j;if(a.every(V=>O[V]||O.code===V)){var G;L(!0),(G=N.current)==null||G.focus()}O.code==="Escape"&&(document.activeElement===N.current||(j=N.current)!=null&&j.contains(document.activeElement))&&L(!1)};return document.addEventListener("keydown",z),()=>document.removeEventListener("keydown",z)},[a]),x.useEffect(()=>{if(N.current)return()=>{k.current&&(k.current.focus({preventScroll:!0}),k.current=null,P.current=!1)}},[N.current]),x.createElement("section",{ref:n,"aria-label":`${D} ${I}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},M.map((z,O)=>{var j;const[Y,G]=z.split("-");return C.length?x.createElement("ol",{key:z,dir:b==="auto"?Ii():b,tabIndex:-1,ref:N,className:l,"data-sonner-toaster":!0,"data-sonner-theme":T,"data-y-position":Y,"data-x-position":G,style:{"--front-toast-height":`${((j=E[0])==null?void 0:j.height)||0}px`,"--width":`${CM}px`,"--gap":`${w}px`,...y,...RM(u,m)},onBlur:V=>{P.current&&!V.currentTarget.contains(V.relatedTarget)&&(P.current=!1,k.current&&(k.current.focus({preventScroll:!0}),k.current=null))},onFocus:V=>{V.target instanceof HTMLElement&&V.target.dataset.dismissible==="false"||P.current||(P.current=!0,k.current=V.relatedTarget)},onMouseEnter:()=>L(!0),onMouseMove:()=>L(!0),onMouseLeave:()=>{q||L(!1)},onDragEnd:()=>L(!1),onPointerDown:V=>{V.target instanceof HTMLElement&&V.target.dataset.dismissible==="false"||A(!0)},onPointerUp:()=>A(!1)},C.filter(V=>!V.position&&O===0||V.position===z).map((V,W)=>{var Z,X;return x.createElement(NM,{key:V.id,icons:S,index:W,toast:V,defaultRichColors:p,duration:(Z=g==null?void 0:g.duration)!=null?Z:h,className:g==null?void 0:g.className,descriptionClassName:g==null?void 0:g.descriptionClassName,invert:r,visibleToasts:v,closeButton:(X=g==null?void 0:g.closeButton)!=null?X:i,interacting:q,position:z,style:g==null?void 0:g.style,unstyled:g==null?void 0:g.unstyled,classNames:g==null?void 0:g.classNames,cancelButtonStyle:g==null?void 0:g.cancelButtonStyle,actionButtonStyle:g==null?void 0:g.actionButtonStyle,closeButtonAriaLabel:g==null?void 0:g.closeButtonAriaLabel,removeToast:H,toasts:C.filter(Q=>Q.position==V.position),heights:E.filter(Q=>Q.position==V.position),setHeights:$,expandByDefault:s,gap:w,expanded:B,swipeDirections:t.swipeDirections})})):null}))}),_M=er("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg]:size-4 [&_svg]:shrink-0",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),Ma=f.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...o},a)=>{const s=r?$i:"button";return d.jsx(s,{className:F(_M({variant:t,size:n,className:e})),ref:a,...o})});Ma.displayName="Button";const OM={error:"bg-red-500 text-white",info:"bg-blue-500 text-white",warning:"bg-amber-500 text-white",success:"bg-green-500 text-white"},PM={error:5e3,info:4e3,warning:5e3,success:4e3},AM=(e,t)=>{const n=(t==null?void 0:t.variant)||"info",r=OM[n],o=d.jsxs("div",{className:`flex items-center w-full p-3 rounded-md shadow-md ${r}`,children:[(t==null?void 0:t.icon)&&t.iconPosition!=="right"&&d.jsx("div",{className:"mr-3",children:t.icon}),d.jsxs("div",{className:"flex-1",children:[d.jsx("p",{className:"text-sm font-semibold",children:e}),(t==null?void 0:t.description)&&d.jsx("p",{className:"text-sm text-white/90",children:t.description})]}),(t==null?void 0:t.icon)&&t.iconPosition==="right"&&d.jsx("div",{className:"ml-3",children:t.icon}),d.jsx("div",{className:"ml-4",children:t!=null&&t.action?d.jsx(Ma,{variant:"ghost",size:"sm",className:"text-white",onClick:t.action.onClick,children:t.action.label}):d.jsx(Ma,{variant:"ghost",size:"icon",className:"text-white",onClick:()=>Yn.dismiss(),children:d.jsx(kn,{className:"w-4 h-4",strokeWidth:2.5})})})]}),a={unstyled:!0,duration:(t==null?void 0:t.duration)||PM[n],icon:t==null?void 0:t.icon,iconPosition:t==null?void 0:t.iconPosition,action:t==null?void 0:t.action,variant:t==null?void 0:t.variant};switch(n){case"success":return Yn.success(o,a);case"error":return Yn.error(o,a);case"warning":return Yn.warning(o,a);default:return Yn(o,a)}};function IM(e){return d.jsx(TM,{...e})}var[Mo,gD]=Be("Tooltip",[Ft]),Do=Ft(),Fm="TooltipProvider",jM=700,Da="tooltip.open",[$M,ks]=Mo(Fm),Wm=e=>{const{__scopeTooltip:t,delayDuration:n=jM,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:a}=e,s=f.useRef(!0),i=f.useRef(!1),l=f.useRef(0);return f.useEffect(()=>{const u=l.current;return()=>window.clearTimeout(u)},[]),d.jsx($M,{scope:t,isOpenDelayedRef:s,delayDuration:n,onOpen:f.useCallback(()=>{window.clearTimeout(l.current),s.current=!1},[]),onClose:f.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>s.current=!0,r)},[r]),isPointerInTransitRef:i,onPointerInTransitChange:f.useCallback(u=>{i.current=u},[]),disableHoverableContent:o,children:a})};Wm.displayName=Fm;var Jn="Tooltip",[LM,ko]=Mo(Jn),Bm=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o,onOpenChange:a,disableHoverableContent:s,delayDuration:i}=e,l=ks(Jn,e.__scopeTooltip),u=Do(t),[m,c]=f.useState(null),p=ke(),h=f.useRef(0),y=s??l.disableHoverableContent,v=i??l.delayDuration,g=f.useRef(!1),[b,w]=tt({prop:r,defaultProp:o??!1,onChange:M=>{M?(l.onOpen(),document.dispatchEvent(new CustomEvent(Da))):l.onClose(),a==null||a(M)},caller:Jn}),S=f.useMemo(()=>b?g.current?"delayed-open":"instant-open":"closed",[b]),D=f.useCallback(()=>{window.clearTimeout(h.current),h.current=0,g.current=!1,w(!0)},[w]),C=f.useCallback(()=>{window.clearTimeout(h.current),h.current=0,w(!1)},[w]),R=f.useCallback(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>{g.current=!0,w(!0),h.current=0},v)},[v,w]);return f.useEffect(()=>()=>{h.current&&(window.clearTimeout(h.current),h.current=0)},[]),d.jsx(ar,{...u,children:d.jsx(LM,{scope:t,contentId:p,open:b,stateAttribute:S,trigger:m,onTriggerChange:c,onTriggerEnter:f.useCallback(()=>{l.isOpenDelayedRef.current?R():D()},[l.isOpenDelayedRef,R,D]),onTriggerLeave:f.useCallback(()=>{y?C():(window.clearTimeout(h.current),h.current=0)},[C,y]),onOpen:D,onClose:C,disableHoverableContent:y,children:n})})};Bm.displayName=Jn;var ka="TooltipTrigger",Ym=f.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=ko(ka,n),a=ks(ka,n),s=Do(n),i=f.useRef(null),l=he(t,i,o.onTriggerChange),u=f.useRef(!1),m=f.useRef(!1),c=f.useCallback(()=>u.current=!1,[]);return f.useEffect(()=>()=>document.removeEventListener("pointerup",c),[c]),d.jsx(sr,{asChild:!0,...s,children:d.jsx(ee.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:l,onPointerMove:K(e.onPointerMove,p=>{p.pointerType!=="touch"&&!m.current&&!a.isPointerInTransitRef.current&&(o.onTriggerEnter(),m.current=!0)}),onPointerLeave:K(e.onPointerLeave,()=>{o.onTriggerLeave(),m.current=!1}),onPointerDown:K(e.onPointerDown,()=>{o.open&&o.onClose(),u.current=!0,document.addEventListener("pointerup",c,{once:!0})}),onFocus:K(e.onFocus,()=>{u.current||o.onOpen()}),onBlur:K(e.onBlur,o.onClose),onClick:K(e.onClick,o.onClose)})})});Ym.displayName=ka;var FM="TooltipPortal",[vD,WM]=Mo(FM,{forceMount:void 0}),Cn="TooltipContent",Hm=f.forwardRef((e,t)=>{const n=WM(Cn,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...a}=e,s=ko(Cn,e.__scopeTooltip);return d.jsx(ze,{present:r||s.open,children:s.disableHoverableContent?d.jsx(zm,{side:o,...a,ref:t}):d.jsx(BM,{side:o,...a,ref:t})})}),BM=f.forwardRef((e,t)=>{const n=ko(Cn,e.__scopeTooltip),r=ks(Cn,e.__scopeTooltip),o=f.useRef(null),a=he(t,o),[s,i]=f.useState(null),{trigger:l,onClose:u}=n,m=o.current,{onPointerInTransitChange:c}=r,p=f.useCallback(()=>{i(null),c(!1)},[c]),h=f.useCallback((y,v)=>{const g=y.currentTarget,b={x:y.clientX,y:y.clientY},w=GM(b,g.getBoundingClientRect()),S=UM(b,w),D=qM(v.getBoundingClientRect()),C=KM([...S,...D]);i(C),c(!0)},[c]);return f.useEffect(()=>()=>p(),[p]),f.useEffect(()=>{if(l&&m){const y=g=>h(g,m),v=g=>h(g,l);return l.addEventListener("pointerleave",y),m.addEventListener("pointerleave",v),()=>{l.removeEventListener("pointerleave",y),m.removeEventListener("pointerleave",v)}}},[l,m,h,p]),f.useEffect(()=>{if(s){const y=v=>{const g=v.target,b={x:v.clientX,y:v.clientY},w=(l==null?void 0:l.contains(g))||(m==null?void 0:m.contains(g)),S=!VM(b,s);w?p():S&&(p(),u())};return document.addEventListener("pointermove",y),()=>document.removeEventListener("pointermove",y)}},[l,m,s,u,p]),d.jsx(zm,{...e,ref:a})}),[YM,HM]=Mo(Jn,{isInside:!1}),zM=Xm("TooltipContent"),zm=f.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:a,onPointerDownOutside:s,...i}=e,l=ko(Cn,n),u=Do(n),{onClose:m}=l;return f.useEffect(()=>(document.addEventListener(Da,m),()=>document.removeEventListener(Da,m)),[m]),f.useEffect(()=>{if(l.trigger){const c=p=>{const h=p.target;h!=null&&h.contains(l.trigger)&&m()};return window.addEventListener("scroll",c,{capture:!0}),()=>window.removeEventListener("scroll",c,{capture:!0})}},[l.trigger,m]),d.jsx(En,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:s,onFocusOutside:c=>c.preventDefault(),onDismiss:m,children:d.jsxs(ro,{"data-state":l.stateAttribute,...u,...i,ref:t,style:{...i.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[d.jsx(zM,{children:r}),d.jsx(YM,{scope:n,isInside:!0,children:d.jsx(cy,{id:l.contentId,role:"tooltip",children:o||r})})]})})});Hm.displayName=Cn;var Gm="TooltipArrow",Um=f.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Do(n);return HM(Gm,n).isInside?null:d.jsx(oo,{...o,...r,ref:t})});Um.displayName=Gm;function GM(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),a=Math.abs(t.left-e.x);switch(Math.min(n,r,o,a)){case a:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function UM(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function qM(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}function VM(e,t){const{x:n,y:r}=e;let o=!1;for(let a=0,s=t.length-1;a<t.length;s=a++){const i=t[a],l=t[s],u=i.x,m=i.y,c=l.x,p=l.y;m>r!=p>r&&n<(c-u)*(r-m)/(p-m)+u&&(o=!o)}return o}function KM(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),XM(t)}function XM(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const o=e[r];for(;t.length>=2;){const a=t[t.length-1],s=t[t.length-2];if((a.x-s.x)*(o.y-s.y)>=(a.y-s.y)*(o.x-s.x))t.pop();else break}t.push(o)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const o=e[r];for(;n.length>=2;){const a=n[n.length-1],s=n[n.length-2];if((a.x-s.x)*(o.y-s.y)>=(a.y-s.y)*(o.x-s.x))n.pop();else break}n.push(o)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var ZM=Wm,QM=Bm,JM=Ym,qm=Hm,eD=Um;const tD=ZM,nD=QM,rD=JM,Vm=f.forwardRef(({className:e,sideOffset:t=4,children:n,...r},o)=>d.jsxs(qm,{ref:o,sideOffset:t,className:F("z-50 rounded-xl border border-border bg-background px-3 py-1.5 text-sm text-foreground shadow-xl transition-all","animate-in fade-in zoom-in-95","data-[state=closed]:animate-out data-[state=closed]:fade-out data-[state=closed]:zoom-out-95","data-[side=bottom]:slide-in-from-top-2","data-[side=left]:slide-in-from-right-2","data-[side=right]:slide-in-from-left-2","data-[side=top]:slide-in-from-bottom-2","origin-[--radix-tooltip-content-transform-origin]",e),...r,children:[n,d.jsx(eD,{className:"fill-background stroke-border h-2 w-4"})]}));Vm.displayName=qm.displayName;exports.ComponentVariant=a1;exports.DoctAddressFormSection=u0;exports.DoctAlert=nd;exports.DoctAlertDescription=od;exports.DoctAlertTitle=rd;exports.DoctAnimationLoader=$p;exports.DoctAutoComplete=t1;exports.DoctAutocomplete=f1;exports.DoctAvatar=pd;exports.DoctAvatarFallback=gd;exports.DoctAvatarImage=hd;exports.DoctButton=Zt;exports.DoctCheckbox=Md;exports.DoctChip=t0;exports.DoctCircularProgress=Zi;exports.DoctComponentSection=o1;exports.DoctContactFormSection=f0;exports.DoctCurrencyInput=Vu;exports.DoctDatePickerField=qr;exports.DoctDialog=U0;exports.DoctDialogClose=K0;exports.DoctDialogContent=Fu;exports.DoctDialogDescription=Hu;exports.DoctDialogFooter=Bu;exports.DoctDialogHeader=Wu;exports.DoctDialogTitle=Yu;exports.DoctDialogTrigger=q0;exports.DoctDrawer=jd;exports.DoctDrawerClose=uS;exports.DoctDrawerContent=Ld;exports.DoctDrawerDescription=Yd;exports.DoctDrawerFooter=Wd;exports.DoctDrawerHeader=Fd;exports.DoctDrawerTitle=Bd;exports.DoctDrawerTrigger=cS;exports.DoctDropdownMenu=OC;exports.DoctDropdownMenuCheckboxItem=Xf;exports.DoctDropdownMenuContent=Vf;exports.DoctDropdownMenuGroup=AC;exports.DoctDropdownMenuItem=Kf;exports.DoctDropdownMenuLabel=Qf;exports.DoctDropdownMenuRadioGroup=jC;exports.DoctDropdownMenuRadioItem=Zf;exports.DoctDropdownMenuSeparator=Jf;exports.DoctDropdownMenuShortcut=em;exports.DoctDropdownMenuSub=IC;exports.DoctDropdownMenuSubContent=qf;exports.DoctDropdownMenuSubTrigger=Uf;exports.DoctDropdownMenuTrigger=PC;exports.DoctExpandableCard=b1;exports.DoctLabeledInput=Qe;exports.DoctManualDatePickerField=e0;exports.DoctOtpInput=Bp;exports.DoctPasswordInput=ra;exports.DoctPopover=Ba;exports.DoctPopoverContent=co;exports.DoctPopoverTrigger=Ya;exports.DoctProgress=Lm;exports.DoctRadioGroup=hm;exports.DoctRadioGroupItem=gm;exports.DoctSearchFilterSection=s0;exports.DoctSearchInput=fu;exports.DoctSelectField=Sn;exports.DoctTabs=XC;exports.DoctTabsContent=Om;exports.DoctTabsList=Tm;exports.DoctTabsTrigger=_m;exports.DoctTextareaField=cc;exports.DoctToaster=IM;exports.DoctTooltip=nD;exports.DoctTooltipContent=Vm;exports.DoctTooltipProvider=tD;exports.DoctTooltipTrigger=rD;exports.DoctTypography=jp;exports.DoctUserRegistrationSection=c0;exports.doctToast=AM;