docthub-core-components 1.0.77 → 1.0.78

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,135 +1,135 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("react/jsx-runtime"),x=require("react"),er=require("react-dom");function ac(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 d=ac(x),eo=ac(er);function Ls(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Nt(...e){return t=>{let n=!1;const r=e.map(o=>{const a=Ls(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():Ls(e[o],null)}}}}function fe(...e){return d.useCallback(Nt(...e),e)}function Wt(e){const t=Op(e),n=d.forwardRef((r,o)=>{const{children:a,...i}=r,s=d.Children.toArray(a),c=s.find(Pp);if(c){const u=c.props.children,f=s.map(l=>l===c?d.Children.count(u)>1?d.Children.only(null):d.isValidElement(u)?u.props.children:null:l);return m.jsx(t,{...i,ref:o,children:d.isValidElement(u)?d.cloneElement(u,void 0,f):null})}return m.jsx(t,{...i,ref:o,children:a})});return n.displayName=`${e}.Slot`,n}var Rp=Wt("Slot");function Op(e){const t=d.forwardRef((n,r)=>{const{children:o,...a}=n;if(d.isValidElement(o)){const i=Ap(o),s=_p(a,o.props);return o.type!==d.Fragment&&(s.ref=r?Nt(r,i):i),d.cloneElement(o,s)}return d.Children.count(o)>1?d.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var sc=Symbol("radix.slottable");function Tp(e){const t=({children:n})=>m.jsx(m.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=sc,t}function Pp(e){return d.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===sc}function _p(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]=(...s)=>{const c=a(...s);return o(...s),c}:o&&(n[r]=o):r==="style"?n[r]={...o,...a}:r==="className"&&(n[r]=[o,a].filter(Boolean).join(" "))}return{...e,...n}}function Ap(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 ic(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=ic(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function cc(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=ic(e))&&(r&&(r+=" "),r+=t);return r}const Fs=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Ws=cc,to=(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,i=Object.keys(o).map(u=>{const f=n==null?void 0:n[u],l=a==null?void 0:a[u];if(f===null)return null;const p=Fs(f)||Fs(l);return o[u][p]}),s=n&&Object.entries(n).reduce((u,f)=>{let[l,p]=f;return p===void 0||(u[l]=p),u},{}),c=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,f)=>{let{class:l,className:p,...h}=f;return Object.entries(h).every(b=>{let[g,v]=b;return Array.isArray(v)?v.includes({...a,...s}[g]):{...a,...s}[g]===v})?[...u,l,p]:u},[]);return Ws(e,i,c,n==null?void 0:n.class,n==null?void 0:n.className)},$a="-",Ip=e=>{const t=$p(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:i=>{const s=i.split($a);return s[0]===""&&s.length!==1&&s.shift(),lc(s,t)||jp(i)},getConflictingClassGroupIds:(i,s)=>{const c=n[i]||[];return s&&r[i]?[...c,...r[i]]:c}}},lc=(e,t)=>{var i;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?lc(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const a=e.join($a);return(i=t.validators.find(({validator:s})=>s(a)))==null?void 0:i.classGroupId},Bs=/^\[(.+)\]$/,jp=e=>{if(Bs.test(e)){const t=Bs.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},$p=e=>{const{theme:t,classGroups:n}=e,r={nextPart:new Map,validators:[]};for(const o in n)aa(n[o],r,o,t);return r},aa=(e,t,n,r)=>{e.forEach(o=>{if(typeof o=="string"){const a=o===""?t:Ys(t,o);a.classGroupId=n;return}if(typeof o=="function"){if(Lp(o)){aa(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([a,i])=>{aa(i,Ys(t,a),n,r)})})},Ys=(e,t)=>{let n=e;return t.split($a).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},Lp=e=>e.isThemeGetter,Fp=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const o=(a,i)=>{n.set(a,i),t++,t>e&&(t=0,r=n,n=new Map)};return{get(a){let i=n.get(a);if(i!==void 0)return i;if((i=r.get(a))!==void 0)return o(a,i),i},set(a,i){n.has(a)?n.set(a,i):o(a,i)}}},sa="!",ia=":",Wp=ia.length,Bp=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=o=>{const a=[];let i=0,s=0,c=0,u;for(let b=0;b<o.length;b++){let g=o[b];if(i===0&&s===0){if(g===ia){a.push(o.slice(c,b)),c=b+Wp;continue}if(g==="/"){u=b;continue}}g==="["?i++:g==="]"?i--:g==="("?s++:g===")"&&s--}const f=a.length===0?o:o.substring(c),l=Yp(f),p=l!==f,h=u&&u>c?u-c:void 0;return{modifiers:a,hasImportantModifier:p,baseClassName:l,maybePostfixModifierPosition:h}};if(t){const o=t+ia,a=r;r=i=>i.startsWith(o)?a(i.substring(o.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:i,maybePostfixModifierPosition:void 0}}if(n){const o=r;r=a=>n({className:a,parseClassName:o})}return r},Yp=e=>e.endsWith(sa)?e.substring(0,e.length-1):e.startsWith(sa)?e.substring(1):e,zp=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(i=>{i[0]==="["||t[i]?(o.push(...a.sort(),i),a=[]):a.push(i)}),o.push(...a.sort()),o}},Hp=e=>({cache:Fp(e.cacheSize),parseClassName:Bp(e),sortModifiers:zp(e),...Ip(e)}),Up=/\s+/,Gp=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:a}=t,i=[],s=e.trim().split(Up);let c="";for(let u=s.length-1;u>=0;u-=1){const f=s[u],{isExternal:l,modifiers:p,hasImportantModifier:h,baseClassName:b,maybePostfixModifierPosition:g}=n(f);if(l){c=f+(c.length>0?" "+c:c);continue}let v=!!g,y=r(v?b.substring(0,g):b);if(!y){if(!v){c=f+(c.length>0?" "+c:c);continue}if(y=r(b),!y){c=f+(c.length>0?" "+c:c);continue}v=!1}const w=a(p).join(":"),E=h?w+sa:w,M=E+y;if(i.includes(M))continue;i.push(M);const C=o(y,v);for(let k=0;k<C.length;++k){const S=C[k];i.push(E+S)}c=f+(c.length>0?" "+c:c)}return c};function qp(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=uc(t))&&(r&&(r+=" "),r+=n);return r}const uc=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=uc(e[r]))&&(n&&(n+=" "),n+=t);return n};function Vp(e,...t){let n,r,o,a=i;function i(c){const u=t.reduce((f,l)=>l(f),e());return n=Hp(u),r=n.cache.get,o=n.cache.set,a=s,s(c)}function s(c){const u=r(c);if(u)return u;const f=Gp(c,n);return o(c,f),f}return function(){return a(qp.apply(null,arguments))}}const Le=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},dc=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,fc=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Kp=/^\d+\/\d+$/,Xp=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Zp=/\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$/,Qp=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Jp=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,eh=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,fn=e=>Kp.test(e),he=e=>!!e&&!Number.isNaN(Number(e)),jt=e=>!!e&&Number.isInteger(Number(e)),To=e=>e.endsWith("%")&&he(e.slice(0,-1)),Et=e=>Xp.test(e),th=()=>!0,nh=e=>Zp.test(e)&&!Qp.test(e),mc=()=>!1,rh=e=>Jp.test(e),oh=e=>eh.test(e),ah=e=>!ne(e)&&!re(e),sh=e=>Mn(e,gc,mc),ne=e=>dc.test(e),Zt=e=>Mn(e,vc,nh),Po=e=>Mn(e,dh,he),zs=e=>Mn(e,pc,mc),ih=e=>Mn(e,hc,oh),xr=e=>Mn(e,bc,rh),re=e=>fc.test(e),jn=e=>Nn(e,vc),ch=e=>Nn(e,fh),Hs=e=>Nn(e,pc),lh=e=>Nn(e,gc),uh=e=>Nn(e,hc),Sr=e=>Nn(e,bc,!0),Mn=(e,t,n)=>{const r=dc.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},Nn=(e,t,n=!1)=>{const r=fc.exec(e);return r?r[1]?t(r[1]):n:!1},pc=e=>e==="position"||e==="percentage",hc=e=>e==="image"||e==="url",gc=e=>e==="length"||e==="size"||e==="bg-size",vc=e=>e==="length",dh=e=>e==="number",fh=e=>e==="family-name",bc=e=>e==="shadow",mh=()=>{const e=Le("color"),t=Le("font"),n=Le("text"),r=Le("font-weight"),o=Le("tracking"),a=Le("leading"),i=Le("breakpoint"),s=Le("container"),c=Le("spacing"),u=Le("radius"),f=Le("shadow"),l=Le("inset-shadow"),p=Le("text-shadow"),h=Le("drop-shadow"),b=Le("blur"),g=Le("perspective"),v=Le("aspect"),y=Le("ease"),w=Le("animate"),E=()=>["auto","avoid","all","avoid-page","page","left","right","column"],M=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],C=()=>[...M(),re,ne],k=()=>["auto","hidden","clip","visible","scroll"],S=()=>["auto","contain","none"],R=()=>[re,ne,c],A=()=>[fn,"full","auto",...R()],I=()=>[jt,"none","subgrid",re,ne],L=()=>["auto",{span:["full",jt,re,ne]},jt,re,ne],V=()=>[jt,"auto",re,ne],B=()=>["auto","min","max","fr",re,ne],$=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],_=()=>["start","end","center","stretch","center-safe","end-safe"],N=()=>["auto",...R()],O=()=>[fn,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...R()],D=()=>[e,re,ne],P=()=>[...M(),Hs,zs,{position:[re,ne]}],Y=()=>["no-repeat",{repeat:["","x","y","space","round"]}],H=()=>["auto","cover","contain",lh,sh,{size:[re,ne]}],T=()=>[To,jn,Zt],j=()=>["","none","full",u,re,ne],z=()=>["",he,jn,Zt],U=()=>["solid","dashed","dotted","double"],G=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],W=()=>[he,To,Hs,zs],X=()=>["","none",b,re,ne],Z=()=>["none",he,re,ne],Q=()=>["none",he,re,ne],ee=()=>[he,re,ne],ae=()=>[fn,"full",...R()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Et],breakpoint:[Et],color:[th],container:[Et],"drop-shadow":[Et],ease:["in","out","in-out"],font:[ah],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Et],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Et],shadow:[Et],spacing:["px",he],text:[Et],"text-shadow":[Et],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",fn,ne,re,v]}],container:["container"],columns:[{columns:[he,ne,re,s]}],"break-after":[{"break-after":E()}],"break-before":[{"break-before":E()}],"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:k()}],"overflow-x":[{"overflow-x":k()}],"overflow-y":[{"overflow-y":k()}],overscroll:[{overscroll:S()}],"overscroll-x":[{"overscroll-x":S()}],"overscroll-y":[{"overscroll-y":S()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:A()}],"inset-x":[{"inset-x":A()}],"inset-y":[{"inset-y":A()}],start:[{start:A()}],end:[{end:A()}],top:[{top:A()}],right:[{right:A()}],bottom:[{bottom:A()}],left:[{left:A()}],visibility:["visible","invisible","collapse"],z:[{z:[jt,"auto",re,ne]}],basis:[{basis:[fn,"full","auto",s,...R()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[he,fn,"auto","initial","none",ne]}],grow:[{grow:["",he,re,ne]}],shrink:[{shrink:["",he,re,ne]}],order:[{order:[jt,"first","last","none",re,ne]}],"grid-cols":[{"grid-cols":I()}],"col-start-end":[{col:L()}],"col-start":[{"col-start":V()}],"col-end":[{"col-end":V()}],"grid-rows":[{"grid-rows":I()}],"row-start-end":[{row:L()}],"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":B()}],"auto-rows":[{"auto-rows":B()}],gap:[{gap:R()}],"gap-x":[{"gap-x":R()}],"gap-y":[{"gap-y":R()}],"justify-content":[{justify:[...$(),"normal"]}],"justify-items":[{"justify-items":[..._(),"normal"]}],"justify-self":[{"justify-self":["auto",..._()]}],"align-content":[{content:["normal",...$()]}],"align-items":[{items:[..._(),{baseline:["","last"]}]}],"align-self":[{self:["auto",..._(),{baseline:["","last"]}]}],"place-content":[{"place-content":$()}],"place-items":[{"place-items":[..._(),"baseline"]}],"place-self":[{"place-self":["auto",..._()]}],p:[{p:R()}],px:[{px:R()}],py:[{py:R()}],ps:[{ps:R()}],pe:[{pe:R()}],pt:[{pt:R()}],pr:[{pr:R()}],pb:[{pb:R()}],pl:[{pl:R()}],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":R()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":R()}],"space-y-reverse":["space-y-reverse"],size:[{size:O()}],w:[{w:[s,"screen",...O()]}],"min-w":[{"min-w":[s,"screen","none",...O()]}],"max-w":[{"max-w":[s,"screen","none","prose",{screen:[i]},...O()]}],h:[{h:["screen","lh",...O()]}],"min-h":[{"min-h":["screen","lh","none",...O()]}],"max-h":[{"max-h":["screen","lh",...O()]}],"font-size":[{text:["base",n,jn,Zt]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,re,Po]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",To,ne]}],"font-family":[{font:[ch,ne,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,re,ne]}],"line-clamp":[{"line-clamp":[he,"none",re,Po]}],leading:[{leading:[a,...R()]}],"list-image":[{"list-image":["none",re,ne]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",re,ne]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:D()}],"text-color":[{text:D()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...U(),"wavy"]}],"text-decoration-thickness":[{decoration:[he,"from-font","auto",re,Zt]}],"text-decoration-color":[{decoration:D()}],"underline-offset":[{"underline-offset":[he,"auto",re,ne]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:R()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",re,ne]}],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",re,ne]}],"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:Y()}],"bg-size":[{bg:H()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},jt,re,ne],radial:["",re,ne],conic:[jt,re,ne]},uh,ih]}],"bg-color":[{bg:D()}],"gradient-from-pos":[{from:T()}],"gradient-via-pos":[{via:T()}],"gradient-to-pos":[{to:T()}],"gradient-from":[{from:D()}],"gradient-via":[{via:D()}],"gradient-to":[{to:D()}],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:z()}],"border-w-x":[{"border-x":z()}],"border-w-y":[{"border-y":z()}],"border-w-s":[{"border-s":z()}],"border-w-e":[{"border-e":z()}],"border-w-t":[{"border-t":z()}],"border-w-r":[{"border-r":z()}],"border-w-b":[{"border-b":z()}],"border-w-l":[{"border-l":z()}],"divide-x":[{"divide-x":z()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":z()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...U(),"hidden","none"]}],"divide-style":[{divide:[...U(),"hidden","none"]}],"border-color":[{border:D()}],"border-color-x":[{"border-x":D()}],"border-color-y":[{"border-y":D()}],"border-color-s":[{"border-s":D()}],"border-color-e":[{"border-e":D()}],"border-color-t":[{"border-t":D()}],"border-color-r":[{"border-r":D()}],"border-color-b":[{"border-b":D()}],"border-color-l":[{"border-l":D()}],"divide-color":[{divide:D()}],"outline-style":[{outline:[...U(),"none","hidden"]}],"outline-offset":[{"outline-offset":[he,re,ne]}],"outline-w":[{outline:["",he,jn,Zt]}],"outline-color":[{outline:D()}],shadow:[{shadow:["","none",f,Sr,xr]}],"shadow-color":[{shadow:D()}],"inset-shadow":[{"inset-shadow":["none",l,Sr,xr]}],"inset-shadow-color":[{"inset-shadow":D()}],"ring-w":[{ring:z()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:D()}],"ring-offset-w":[{"ring-offset":[he,Zt]}],"ring-offset-color":[{"ring-offset":D()}],"inset-ring-w":[{"inset-ring":z()}],"inset-ring-color":[{"inset-ring":D()}],"text-shadow":[{"text-shadow":["none",p,Sr,xr]}],"text-shadow-color":[{"text-shadow":D()}],opacity:[{opacity:[he,re,ne]}],"mix-blend":[{"mix-blend":[...G(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":G()}],"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":[he]}],"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":D()}],"mask-image-linear-to-color":[{"mask-linear-to":D()}],"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":D()}],"mask-image-t-to-color":[{"mask-t-to":D()}],"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":D()}],"mask-image-r-to-color":[{"mask-r-to":D()}],"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":D()}],"mask-image-b-to-color":[{"mask-b-to":D()}],"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":D()}],"mask-image-l-to-color":[{"mask-l-to":D()}],"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":D()}],"mask-image-x-to-color":[{"mask-x-to":D()}],"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":D()}],"mask-image-y-to-color":[{"mask-y-to":D()}],"mask-image-radial":[{"mask-radial":[re,ne]}],"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":D()}],"mask-image-radial-to-color":[{"mask-radial-to":D()}],"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":M()}],"mask-image-conic-pos":[{"mask-conic":[he]}],"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":D()}],"mask-image-conic-to-color":[{"mask-conic-to":D()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:P()}],"mask-repeat":[{mask:Y()}],"mask-size":[{mask:H()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",re,ne]}],filter:[{filter:["","none",re,ne]}],blur:[{blur:X()}],brightness:[{brightness:[he,re,ne]}],contrast:[{contrast:[he,re,ne]}],"drop-shadow":[{"drop-shadow":["","none",h,Sr,xr]}],"drop-shadow-color":[{"drop-shadow":D()}],grayscale:[{grayscale:["",he,re,ne]}],"hue-rotate":[{"hue-rotate":[he,re,ne]}],invert:[{invert:["",he,re,ne]}],saturate:[{saturate:[he,re,ne]}],sepia:[{sepia:["",he,re,ne]}],"backdrop-filter":[{"backdrop-filter":["","none",re,ne]}],"backdrop-blur":[{"backdrop-blur":X()}],"backdrop-brightness":[{"backdrop-brightness":[he,re,ne]}],"backdrop-contrast":[{"backdrop-contrast":[he,re,ne]}],"backdrop-grayscale":[{"backdrop-grayscale":["",he,re,ne]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[he,re,ne]}],"backdrop-invert":[{"backdrop-invert":["",he,re,ne]}],"backdrop-opacity":[{"backdrop-opacity":[he,re,ne]}],"backdrop-saturate":[{"backdrop-saturate":[he,re,ne]}],"backdrop-sepia":[{"backdrop-sepia":["",he,re,ne]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":R()}],"border-spacing-x":[{"border-spacing-x":R()}],"border-spacing-y":[{"border-spacing-y":R()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",re,ne]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[he,"initial",re,ne]}],ease:[{ease:["linear","initial",y,re,ne]}],delay:[{delay:[he,re,ne]}],animate:[{animate:["none",w,re,ne]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[g,re,ne]}],"perspective-origin":[{"perspective-origin":C()}],rotate:[{rotate:Z()}],"rotate-x":[{"rotate-x":Z()}],"rotate-y":[{"rotate-y":Z()}],"rotate-z":[{"rotate-z":Z()}],scale:[{scale:Q()}],"scale-x":[{"scale-x":Q()}],"scale-y":[{"scale-y":Q()}],"scale-z":[{"scale-z":Q()}],"scale-3d":["scale-3d"],skew:[{skew:ee()}],"skew-x":[{"skew-x":ee()}],"skew-y":[{"skew-y":ee()}],transform:[{transform:[re,ne,"","none","gpu","cpu"]}],"transform-origin":[{origin:C()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:ae()}],"translate-x":[{"translate-x":ae()}],"translate-y":[{"translate-y":ae()}],"translate-z":[{"translate-z":ae()}],"translate-none":["translate-none"],accent:[{accent:D()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:D()}],"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",re,ne]}],"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":R()}],"scroll-mx":[{"scroll-mx":R()}],"scroll-my":[{"scroll-my":R()}],"scroll-ms":[{"scroll-ms":R()}],"scroll-me":[{"scroll-me":R()}],"scroll-mt":[{"scroll-mt":R()}],"scroll-mr":[{"scroll-mr":R()}],"scroll-mb":[{"scroll-mb":R()}],"scroll-ml":[{"scroll-ml":R()}],"scroll-p":[{"scroll-p":R()}],"scroll-px":[{"scroll-px":R()}],"scroll-py":[{"scroll-py":R()}],"scroll-ps":[{"scroll-ps":R()}],"scroll-pe":[{"scroll-pe":R()}],"scroll-pt":[{"scroll-pt":R()}],"scroll-pr":[{"scroll-pr":R()}],"scroll-pb":[{"scroll-pb":R()}],"scroll-pl":[{"scroll-pl":R()}],"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",re,ne]}],fill:[{fill:["none",...D()]}],"stroke-w":[{stroke:[he,jn,Zt,Po]}],stroke:[{stroke:["none",...D()]}],"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"]}},ph=Vp(mh);function F(...e){return ph(cc(e))}const ca=to("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}}),kt=x.forwardRef(({className:e,variant:t,size:n,iconSize:r,iconPosition:o,fullWidth:a,asChild:i=!1,icon:s,iconOnly:c,children:u,...f},l)=>{const p=i?Rp:"button";let h=n;if(c&&n)switch(n){case"large":h="icon.large";break;case"medium":h="icon.medium";break;case"small":h="icon.small";break}const b=r||(n==="large"?"large":n==="small"?"small":"medium");return m.jsxs(p,{className:F(ca({variant:t,size:h,iconSize:b,iconPosition:o,fullWidth:a,className:e})),ref:l,"aria-label":c&&!f["aria-label"]?"Icon button":f["aria-label"],...f,children:[s&&m.jsx("span",{"data-testid":"button-icon",children:s}),!c&&u]})});kt.displayName="DoctButton";const hh={h1:{fontSize:"3.5rem",tag:"h1"},h2:{fontSize:"2.875rem",tag:"h2"},h3:{fontSize:"2.25rem",tag:"h3"},h4:{fontSize:"2rem",tag:"h4"},h5:{fontSize:"1.75rem",tag:"h5"},h6:{fontSize:"1.5rem",tag:"h6"},h7:{fontSize:"1.25rem",tag:"p"},h8:{fontSize:"1.125rem",tag:"p"},title1:{fontSize:"1.375rem",tag:"p"},title2:{fontSize:"1.125rem",tag:"p"},title3:{fontSize:"0.875rem",tag:"p"},title4:{fontSize:"0.75rem",tag:"p"},body1:{fontSize:"1rem",tag:"p"},body2:{fontSize:"0.875rem",tag:"p"},body3:{fontSize:"0.75rem",tag:"p"},body4:{fontSize:"0.625rem",tag:"p"},textLabel1:{fontSize:"1rem",tag:"span"},textLabel2:{fontSize:"0.875rem",tag:"span"},textLabel3:{fontSize:"0.75rem",tag:"span"},textLabel4:{fontSize:"0.6875rem",tag:"span"}},gh={regular:"400",medium:"500",semiBold:"600",bold:"700",extraBold:"800",light:"300"},la=({variant:e,weight:t="regular",children:n,color:r="#000",align:o="inherit",className:a=""})=>{const i=hh[e]??{fontSize:"16px",tag:"p"},{fontSize:s,tag:c}=i;return m.jsx(c,{className:a,style:{fontSize:s,fontWeight:gh[t]??"400",color:r,textAlign:o},children:n})};function vh(){return m.jsx("div",{className:"flex flex-col items-center justify-center h-screen w-full bg-white",children:m.jsx("img",{src:"/logoAnimation.gif",alt:"Loading animation",className:"w-32 h-32 object-contain"})})}const yc=d.forwardRef(({size:e=48,strokeWidth:t=4,className:n,colorClassName:r="text-current",...o},a)=>{const i=Math.max((e-t)/2,0),s=2*Math.PI*i;return m.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:[m.jsx("circle",{className:"opacity-25",cx:e/2,cy:e/2,r:i,stroke:"currentColor",strokeWidth:t,fill:"none"}),m.jsx("circle",{className:F(r),cx:e/2,cy:e/2,r:i,stroke:"currentColor",strokeWidth:t,strokeLinecap:"round",strokeDasharray:s,strokeDashoffset:s*.75,fill:"none"})]})});yc.displayName="CircularProgress";const an=d.forwardRef(({className:e,type:t,...n},r)=>m.jsx("input",{type:t,className:F("flex h-10 w-full rounded-md border border-gray-300 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 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:r,...n}));an.displayName="Input";var bh=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],J=bh.reduce((e,t)=>{const n=Wt(`Primitive.${t}`),r=d.forwardRef((o,a)=>{const{asChild:i,...s}=o,c=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),m.jsx(c,{...s,ref:a})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function kn(e,t){e&&eo.flushSync(()=>e.dispatchEvent(t))}var yh="Label",wc=d.forwardRef((e,t)=>m.jsx(J.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())}}));wc.displayName=yh;var xc=wc;const wh=to("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),sn=d.forwardRef(({className:e,...t},n)=>m.jsx(xc,{ref:n,className:F(wh(),e),...t}));sn.displayName=xc.displayName;const nt=({label:e,placeholder:t,helperText:n,error:r,required:o,type:a="text",leftIcon:i,rightIcon:s,className:c,inputClassName:u,onChange:f,showCharCount:l,maxLength:p,value:h,disabled:b,fridged:g,...v})=>{const[y,w]=x.useState((h==null?void 0:h.length)||0),E=k=>{f&&f(k),w(k.target.value.length)},M=l&&typeof p=="number",C=g||b;return m.jsxs("div",{className:F("space-y-1",c),children:[e&&m.jsxs(sn,{className:"text-sm font-medium text-foreground",children:[e,o&&m.jsx("span",{className:"text-destructive ml-1",children:"*"})]}),m.jsxs("div",{className:"relative",children:[i&&m.jsx("div",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground",children:i}),s&&m.jsx("div",{className:"absolute right-3 top-1/2 -translate-y-1/2 text-muted-foreground",children:s}),m.jsx(an,{type:a,placeholder:t,disabled:b,value:h,maxLength:p,onChange:E,className:F(i&&"pl-10",s&&"pr-10",r&&"border-destructive",C&&"cursor-not-allowed bg-muted text-muted-foreground opacity-70",u),...v}),M&&m.jsxs("span",{className:"absolute bottom-[-1.25rem] right-0 text-xs text-muted-foreground",children:[y," / ",p]})]}),(n||r)&&m.jsx("p",{className:F("text-xs",r?"text-destructive":"text-muted-foreground"),children:r||n})]})},xh=({length:e=6,label:t,value:n,onChange:r,onComplete:o,className:a,error:i,inputClassName:s="h-8 w-8"})=>{const c=x.useRef([]),u=(p,h)=>{var v;const b=h.replace(/\D/g,"").slice(0,1);if(h.length>1&&b.length<=1)return;const g=[...n];g[p]=b,r(g),h&&p<e-1&&((v=c.current[p+1])==null||v.focus()),g.every(y=>y!=="")&&o&&o(g.join(""))},f=(p,h)=>{var w;h.preventDefault();const g=(h.clipboardData.getData("text")||"").replace(/\D/g,"").slice(0,e-p).split("");if(g.length===0)return;const v=[...n];for(let E=0;E<g.length&&p+E<e;E++)v[p+E]=g[E];r(v);const y=Math.min(p+g.length,e-1);(w=c.current[y])==null||w.focus(),v.every(E=>E!=="")&&o&&o(v.join(""))},l=(p,h)=>{var b;h.key==="Backspace"&&!n[p]&&p>0&&((b=c.current[p-1])==null||b.focus())};return m.jsxs("div",{className:F("space-y-2",a),children:[t&&m.jsx(sn,{className:"text-sm font-medium text-gray-700",children:t}),m.jsx("div",{className:"flex gap-1",children:n.map((p,h)=>m.jsx(an,{ref:b=>c.current[h]=b,type:"text",inputMode:"numeric",maxLength:1,value:p,onChange:b=>u(h,b.target.value),onKeyDown:b=>l(h,b),onPaste:b=>f(h,b),className:F("text-center p-0 text-lg font-semibold",i&&"border-destructive",s)},h))}),i&&m.jsx("p",{className:"text-xs text-destructive mt-1",children:i})]})};/**
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const m=require("react/jsx-runtime"),x=require("react"),Jr=require("react-dom");function oc(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 d=oc(x),eo=oc(Jr);function Ls(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Nt(...e){return t=>{let n=!1;const r=e.map(o=>{const a=Ls(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():Ls(e[o],null)}}}}function fe(...e){return d.useCallback(Nt(...e),e)}function Wt(e){const t=Rp(e),n=d.forwardRef((r,o)=>{const{children:a,...i}=r,s=d.Children.toArray(a),c=s.find(Tp);if(c){const u=c.props.children,f=s.map(l=>l===c?d.Children.count(u)>1?d.Children.only(null):d.isValidElement(u)?u.props.children:null:l);return m.jsx(t,{...i,ref:o,children:d.isValidElement(u)?d.cloneElement(u,void 0,f):null})}return m.jsx(t,{...i,ref:o,children:a})});return n.displayName=`${e}.Slot`,n}var kp=Wt("Slot");function Rp(e){const t=d.forwardRef((n,r)=>{const{children:o,...a}=n;if(d.isValidElement(o)){const i=_p(o),s=Pp(a,o.props);return o.type!==d.Fragment&&(s.ref=r?Nt(r,i):i),d.cloneElement(o,s)}return d.Children.count(o)>1?d.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var ac=Symbol("radix.slottable");function Op(e){const t=({children:n})=>m.jsx(m.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=ac,t}function Tp(e){return d.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===ac}function Pp(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]=(...s)=>{const c=a(...s);return o(...s),c}:o&&(n[r]=o):r==="style"?n[r]={...o,...a}:r==="className"&&(n[r]=[o,a].filter(Boolean).join(" "))}return{...e,...n}}function _p(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 sc(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=sc(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function ic(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=sc(e))&&(r&&(r+=" "),r+=t);return r}const Fs=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Ws=ic,to=(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,i=Object.keys(o).map(u=>{const f=n==null?void 0:n[u],l=a==null?void 0:a[u];if(f===null)return null;const p=Fs(f)||Fs(l);return o[u][p]}),s=n&&Object.entries(n).reduce((u,f)=>{let[l,p]=f;return p===void 0||(u[l]=p),u},{}),c=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,f)=>{let{class:l,className:p,...h}=f;return Object.entries(h).every(b=>{let[g,v]=b;return Array.isArray(v)?v.includes({...a,...s}[g]):{...a,...s}[g]===v})?[...u,l,p]:u},[]);return Ws(e,i,c,n==null?void 0:n.class,n==null?void 0:n.className)},$a="-",Ap=e=>{const t=jp(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:i=>{const s=i.split($a);return s[0]===""&&s.length!==1&&s.shift(),cc(s,t)||Ip(i)},getConflictingClassGroupIds:(i,s)=>{const c=n[i]||[];return s&&r[i]?[...c,...r[i]]:c}}},cc=(e,t)=>{var i;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?cc(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const a=e.join($a);return(i=t.validators.find(({validator:s})=>s(a)))==null?void 0:i.classGroupId},Bs=/^\[(.+)\]$/,Ip=e=>{if(Bs.test(e)){const t=Bs.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},jp=e=>{const{theme:t,classGroups:n}=e,r={nextPart:new Map,validators:[]};for(const o in n)aa(n[o],r,o,t);return r},aa=(e,t,n,r)=>{e.forEach(o=>{if(typeof o=="string"){const a=o===""?t:Ys(t,o);a.classGroupId=n;return}if(typeof o=="function"){if($p(o)){aa(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([a,i])=>{aa(i,Ys(t,a),n,r)})})},Ys=(e,t)=>{let n=e;return t.split($a).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},$p=e=>e.isThemeGetter,Lp=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const o=(a,i)=>{n.set(a,i),t++,t>e&&(t=0,r=n,n=new Map)};return{get(a){let i=n.get(a);if(i!==void 0)return i;if((i=r.get(a))!==void 0)return o(a,i),i},set(a,i){n.has(a)?n.set(a,i):o(a,i)}}},sa="!",ia=":",Fp=ia.length,Wp=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=o=>{const a=[];let i=0,s=0,c=0,u;for(let b=0;b<o.length;b++){let g=o[b];if(i===0&&s===0){if(g===ia){a.push(o.slice(c,b)),c=b+Fp;continue}if(g==="/"){u=b;continue}}g==="["?i++:g==="]"?i--:g==="("?s++:g===")"&&s--}const f=a.length===0?o:o.substring(c),l=Bp(f),p=l!==f,h=u&&u>c?u-c:void 0;return{modifiers:a,hasImportantModifier:p,baseClassName:l,maybePostfixModifierPosition:h}};if(t){const o=t+ia,a=r;r=i=>i.startsWith(o)?a(i.substring(o.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:i,maybePostfixModifierPosition:void 0}}if(n){const o=r;r=a=>n({className:a,parseClassName:o})}return r},Bp=e=>e.endsWith(sa)?e.substring(0,e.length-1):e.startsWith(sa)?e.substring(1):e,Yp=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(i=>{i[0]==="["||t[i]?(o.push(...a.sort(),i),a=[]):a.push(i)}),o.push(...a.sort()),o}},zp=e=>({cache:Lp(e.cacheSize),parseClassName:Wp(e),sortModifiers:Yp(e),...Ap(e)}),Hp=/\s+/,Up=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:a}=t,i=[],s=e.trim().split(Hp);let c="";for(let u=s.length-1;u>=0;u-=1){const f=s[u],{isExternal:l,modifiers:p,hasImportantModifier:h,baseClassName:b,maybePostfixModifierPosition:g}=n(f);if(l){c=f+(c.length>0?" "+c:c);continue}let v=!!g,w=r(v?b.substring(0,g):b);if(!w){if(!v){c=f+(c.length>0?" "+c:c);continue}if(w=r(b),!w){c=f+(c.length>0?" "+c:c);continue}v=!1}const y=a(p).join(":"),E=h?y+sa:y,M=E+w;if(i.includes(M))continue;i.push(M);const C=o(w,v);for(let R=0;R<C.length;++R){const S=C[R];i.push(E+S)}c=f+(c.length>0?" "+c:c)}return c};function Gp(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=lc(t))&&(r&&(r+=" "),r+=n);return r}const lc=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=lc(e[r]))&&(n&&(n+=" "),n+=t);return n};function qp(e,...t){let n,r,o,a=i;function i(c){const u=t.reduce((f,l)=>l(f),e());return n=zp(u),r=n.cache.get,o=n.cache.set,a=s,s(c)}function s(c){const u=r(c);if(u)return u;const f=Up(c,n);return o(c,f),f}return function(){return a(Gp.apply(null,arguments))}}const Le=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},uc=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,dc=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Vp=/^\d+\/\d+$/,Kp=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Xp=/\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$/,Zp=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Qp=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Jp=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,fn=e=>Vp.test(e),he=e=>!!e&&!Number.isNaN(Number(e)),jt=e=>!!e&&Number.isInteger(Number(e)),To=e=>e.endsWith("%")&&he(e.slice(0,-1)),Et=e=>Kp.test(e),eh=()=>!0,th=e=>Xp.test(e)&&!Zp.test(e),fc=()=>!1,nh=e=>Qp.test(e),rh=e=>Jp.test(e),oh=e=>!ne(e)&&!re(e),ah=e=>Mn(e,hc,fc),ne=e=>uc.test(e),Zt=e=>Mn(e,gc,th),Po=e=>Mn(e,uh,he),zs=e=>Mn(e,mc,fc),sh=e=>Mn(e,pc,rh),wr=e=>Mn(e,vc,nh),re=e=>dc.test(e),jn=e=>Nn(e,gc),ih=e=>Nn(e,dh),Hs=e=>Nn(e,mc),ch=e=>Nn(e,hc),lh=e=>Nn(e,pc),xr=e=>Nn(e,vc,!0),Mn=(e,t,n)=>{const r=uc.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},Nn=(e,t,n=!1)=>{const r=dc.exec(e);return r?r[1]?t(r[1]):n:!1},mc=e=>e==="position"||e==="percentage",pc=e=>e==="image"||e==="url",hc=e=>e==="length"||e==="size"||e==="bg-size",gc=e=>e==="length",uh=e=>e==="number",dh=e=>e==="family-name",vc=e=>e==="shadow",fh=()=>{const e=Le("color"),t=Le("font"),n=Le("text"),r=Le("font-weight"),o=Le("tracking"),a=Le("leading"),i=Le("breakpoint"),s=Le("container"),c=Le("spacing"),u=Le("radius"),f=Le("shadow"),l=Le("inset-shadow"),p=Le("text-shadow"),h=Le("drop-shadow"),b=Le("blur"),g=Le("perspective"),v=Le("aspect"),w=Le("ease"),y=Le("animate"),E=()=>["auto","avoid","all","avoid-page","page","left","right","column"],M=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],C=()=>[...M(),re,ne],R=()=>["auto","hidden","clip","visible","scroll"],S=()=>["auto","contain","none"],k=()=>[re,ne,c],I=()=>[fn,"full","auto",...k()],A=()=>[jt,"none","subgrid",re,ne],W=()=>["auto",{span:["full",jt,re,ne]},jt,re,ne],G=()=>[jt,"auto",re,ne],B=()=>["auto","min","max","fr",re,ne],$=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],O=()=>["start","end","center","stretch","center-safe","end-safe"],D=()=>["auto",...k()],_=()=>[fn,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...k()],N=()=>[e,re,ne],P=()=>[...M(),Hs,zs,{position:[re,ne]}],Y=()=>["no-repeat",{repeat:["","x","y","space","round"]}],H=()=>["auto","cover","contain",ch,ah,{size:[re,ne]}],T=()=>[To,jn,Zt],j=()=>["","none","full",u,re,ne],z=()=>["",he,jn,Zt],U=()=>["solid","dashed","dotted","double"],q=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],F=()=>[he,To,Hs,zs],X=()=>["","none",b,re,ne],Z=()=>["none",he,re,ne],Q=()=>["none",he,re,ne],ee=()=>[he,re,ne],ae=()=>[fn,"full",...k()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Et],breakpoint:[Et],color:[eh],container:[Et],"drop-shadow":[Et],ease:["in","out","in-out"],font:[oh],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Et],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Et],shadow:[Et],spacing:["px",he],text:[Et],"text-shadow":[Et],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",fn,ne,re,v]}],container:["container"],columns:[{columns:[he,ne,re,s]}],"break-after":[{"break-after":E()}],"break-before":[{"break-before":E()}],"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:S()}],"overscroll-x":[{"overscroll-x":S()}],"overscroll-y":[{"overscroll-y":S()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:I()}],"inset-x":[{"inset-x":I()}],"inset-y":[{"inset-y":I()}],start:[{start:I()}],end:[{end:I()}],top:[{top:I()}],right:[{right:I()}],bottom:[{bottom:I()}],left:[{left:I()}],visibility:["visible","invisible","collapse"],z:[{z:[jt,"auto",re,ne]}],basis:[{basis:[fn,"full","auto",s,...k()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[he,fn,"auto","initial","none",ne]}],grow:[{grow:["",he,re,ne]}],shrink:[{shrink:["",he,re,ne]}],order:[{order:[jt,"first","last","none",re,ne]}],"grid-cols":[{"grid-cols":A()}],"col-start-end":[{col:W()}],"col-start":[{"col-start":G()}],"col-end":[{"col-end":G()}],"grid-rows":[{"grid-rows":A()}],"row-start-end":[{row:W()}],"row-start":[{"row-start":G()}],"row-end":[{"row-end":G()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":B()}],"auto-rows":[{"auto-rows":B()}],gap:[{gap:k()}],"gap-x":[{"gap-x":k()}],"gap-y":[{"gap-y":k()}],"justify-content":[{justify:[...$(),"normal"]}],"justify-items":[{"justify-items":[...O(),"normal"]}],"justify-self":[{"justify-self":["auto",...O()]}],"align-content":[{content:["normal",...$()]}],"align-items":[{items:[...O(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...O(),{baseline:["","last"]}]}],"place-content":[{"place-content":$()}],"place-items":[{"place-items":[...O(),"baseline"]}],"place-self":[{"place-self":["auto",...O()]}],p:[{p:k()}],px:[{px:k()}],py:[{py:k()}],ps:[{ps:k()}],pe:[{pe:k()}],pt:[{pt:k()}],pr:[{pr:k()}],pb:[{pb:k()}],pl:[{pl:k()}],m:[{m:D()}],mx:[{mx:D()}],my:[{my:D()}],ms:[{ms:D()}],me:[{me:D()}],mt:[{mt:D()}],mr:[{mr:D()}],mb:[{mb:D()}],ml:[{ml:D()}],"space-x":[{"space-x":k()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":k()}],"space-y-reverse":["space-y-reverse"],size:[{size:_()}],w:[{w:[s,"screen",..._()]}],"min-w":[{"min-w":[s,"screen","none",..._()]}],"max-w":[{"max-w":[s,"screen","none","prose",{screen:[i]},..._()]}],h:[{h:["screen","lh",..._()]}],"min-h":[{"min-h":["screen","lh","none",..._()]}],"max-h":[{"max-h":["screen","lh",..._()]}],"font-size":[{text:["base",n,jn,Zt]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,re,Po]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",To,ne]}],"font-family":[{font:[ih,ne,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,re,ne]}],"line-clamp":[{"line-clamp":[he,"none",re,Po]}],leading:[{leading:[a,...k()]}],"list-image":[{"list-image":["none",re,ne]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",re,ne]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:N()}],"text-color":[{text:N()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...U(),"wavy"]}],"text-decoration-thickness":[{decoration:[he,"from-font","auto",re,Zt]}],"text-decoration-color":[{decoration:N()}],"underline-offset":[{"underline-offset":[he,"auto",re,ne]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:k()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",re,ne]}],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",re,ne]}],"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:Y()}],"bg-size":[{bg:H()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},jt,re,ne],radial:["",re,ne],conic:[jt,re,ne]},lh,sh]}],"bg-color":[{bg:N()}],"gradient-from-pos":[{from:T()}],"gradient-via-pos":[{via:T()}],"gradient-to-pos":[{to:T()}],"gradient-from":[{from:N()}],"gradient-via":[{via:N()}],"gradient-to":[{to:N()}],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:z()}],"border-w-x":[{"border-x":z()}],"border-w-y":[{"border-y":z()}],"border-w-s":[{"border-s":z()}],"border-w-e":[{"border-e":z()}],"border-w-t":[{"border-t":z()}],"border-w-r":[{"border-r":z()}],"border-w-b":[{"border-b":z()}],"border-w-l":[{"border-l":z()}],"divide-x":[{"divide-x":z()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":z()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...U(),"hidden","none"]}],"divide-style":[{divide:[...U(),"hidden","none"]}],"border-color":[{border:N()}],"border-color-x":[{"border-x":N()}],"border-color-y":[{"border-y":N()}],"border-color-s":[{"border-s":N()}],"border-color-e":[{"border-e":N()}],"border-color-t":[{"border-t":N()}],"border-color-r":[{"border-r":N()}],"border-color-b":[{"border-b":N()}],"border-color-l":[{"border-l":N()}],"divide-color":[{divide:N()}],"outline-style":[{outline:[...U(),"none","hidden"]}],"outline-offset":[{"outline-offset":[he,re,ne]}],"outline-w":[{outline:["",he,jn,Zt]}],"outline-color":[{outline:N()}],shadow:[{shadow:["","none",f,xr,wr]}],"shadow-color":[{shadow:N()}],"inset-shadow":[{"inset-shadow":["none",l,xr,wr]}],"inset-shadow-color":[{"inset-shadow":N()}],"ring-w":[{ring:z()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:N()}],"ring-offset-w":[{"ring-offset":[he,Zt]}],"ring-offset-color":[{"ring-offset":N()}],"inset-ring-w":[{"inset-ring":z()}],"inset-ring-color":[{"inset-ring":N()}],"text-shadow":[{"text-shadow":["none",p,xr,wr]}],"text-shadow-color":[{"text-shadow":N()}],opacity:[{opacity:[he,re,ne]}],"mix-blend":[{"mix-blend":[...q(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":q()}],"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":[he]}],"mask-image-linear-from-pos":[{"mask-linear-from":F()}],"mask-image-linear-to-pos":[{"mask-linear-to":F()}],"mask-image-linear-from-color":[{"mask-linear-from":N()}],"mask-image-linear-to-color":[{"mask-linear-to":N()}],"mask-image-t-from-pos":[{"mask-t-from":F()}],"mask-image-t-to-pos":[{"mask-t-to":F()}],"mask-image-t-from-color":[{"mask-t-from":N()}],"mask-image-t-to-color":[{"mask-t-to":N()}],"mask-image-r-from-pos":[{"mask-r-from":F()}],"mask-image-r-to-pos":[{"mask-r-to":F()}],"mask-image-r-from-color":[{"mask-r-from":N()}],"mask-image-r-to-color":[{"mask-r-to":N()}],"mask-image-b-from-pos":[{"mask-b-from":F()}],"mask-image-b-to-pos":[{"mask-b-to":F()}],"mask-image-b-from-color":[{"mask-b-from":N()}],"mask-image-b-to-color":[{"mask-b-to":N()}],"mask-image-l-from-pos":[{"mask-l-from":F()}],"mask-image-l-to-pos":[{"mask-l-to":F()}],"mask-image-l-from-color":[{"mask-l-from":N()}],"mask-image-l-to-color":[{"mask-l-to":N()}],"mask-image-x-from-pos":[{"mask-x-from":F()}],"mask-image-x-to-pos":[{"mask-x-to":F()}],"mask-image-x-from-color":[{"mask-x-from":N()}],"mask-image-x-to-color":[{"mask-x-to":N()}],"mask-image-y-from-pos":[{"mask-y-from":F()}],"mask-image-y-to-pos":[{"mask-y-to":F()}],"mask-image-y-from-color":[{"mask-y-from":N()}],"mask-image-y-to-color":[{"mask-y-to":N()}],"mask-image-radial":[{"mask-radial":[re,ne]}],"mask-image-radial-from-pos":[{"mask-radial-from":F()}],"mask-image-radial-to-pos":[{"mask-radial-to":F()}],"mask-image-radial-from-color":[{"mask-radial-from":N()}],"mask-image-radial-to-color":[{"mask-radial-to":N()}],"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":M()}],"mask-image-conic-pos":[{"mask-conic":[he]}],"mask-image-conic-from-pos":[{"mask-conic-from":F()}],"mask-image-conic-to-pos":[{"mask-conic-to":F()}],"mask-image-conic-from-color":[{"mask-conic-from":N()}],"mask-image-conic-to-color":[{"mask-conic-to":N()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:P()}],"mask-repeat":[{mask:Y()}],"mask-size":[{mask:H()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",re,ne]}],filter:[{filter:["","none",re,ne]}],blur:[{blur:X()}],brightness:[{brightness:[he,re,ne]}],contrast:[{contrast:[he,re,ne]}],"drop-shadow":[{"drop-shadow":["","none",h,xr,wr]}],"drop-shadow-color":[{"drop-shadow":N()}],grayscale:[{grayscale:["",he,re,ne]}],"hue-rotate":[{"hue-rotate":[he,re,ne]}],invert:[{invert:["",he,re,ne]}],saturate:[{saturate:[he,re,ne]}],sepia:[{sepia:["",he,re,ne]}],"backdrop-filter":[{"backdrop-filter":["","none",re,ne]}],"backdrop-blur":[{"backdrop-blur":X()}],"backdrop-brightness":[{"backdrop-brightness":[he,re,ne]}],"backdrop-contrast":[{"backdrop-contrast":[he,re,ne]}],"backdrop-grayscale":[{"backdrop-grayscale":["",he,re,ne]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[he,re,ne]}],"backdrop-invert":[{"backdrop-invert":["",he,re,ne]}],"backdrop-opacity":[{"backdrop-opacity":[he,re,ne]}],"backdrop-saturate":[{"backdrop-saturate":[he,re,ne]}],"backdrop-sepia":[{"backdrop-sepia":["",he,re,ne]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":k()}],"border-spacing-x":[{"border-spacing-x":k()}],"border-spacing-y":[{"border-spacing-y":k()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",re,ne]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[he,"initial",re,ne]}],ease:[{ease:["linear","initial",w,re,ne]}],delay:[{delay:[he,re,ne]}],animate:[{animate:["none",y,re,ne]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[g,re,ne]}],"perspective-origin":[{"perspective-origin":C()}],rotate:[{rotate:Z()}],"rotate-x":[{"rotate-x":Z()}],"rotate-y":[{"rotate-y":Z()}],"rotate-z":[{"rotate-z":Z()}],scale:[{scale:Q()}],"scale-x":[{"scale-x":Q()}],"scale-y":[{"scale-y":Q()}],"scale-z":[{"scale-z":Q()}],"scale-3d":["scale-3d"],skew:[{skew:ee()}],"skew-x":[{"skew-x":ee()}],"skew-y":[{"skew-y":ee()}],transform:[{transform:[re,ne,"","none","gpu","cpu"]}],"transform-origin":[{origin:C()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:ae()}],"translate-x":[{"translate-x":ae()}],"translate-y":[{"translate-y":ae()}],"translate-z":[{"translate-z":ae()}],"translate-none":["translate-none"],accent:[{accent:N()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:N()}],"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",re,ne]}],"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":k()}],"scroll-mx":[{"scroll-mx":k()}],"scroll-my":[{"scroll-my":k()}],"scroll-ms":[{"scroll-ms":k()}],"scroll-me":[{"scroll-me":k()}],"scroll-mt":[{"scroll-mt":k()}],"scroll-mr":[{"scroll-mr":k()}],"scroll-mb":[{"scroll-mb":k()}],"scroll-ml":[{"scroll-ml":k()}],"scroll-p":[{"scroll-p":k()}],"scroll-px":[{"scroll-px":k()}],"scroll-py":[{"scroll-py":k()}],"scroll-ps":[{"scroll-ps":k()}],"scroll-pe":[{"scroll-pe":k()}],"scroll-pt":[{"scroll-pt":k()}],"scroll-pr":[{"scroll-pr":k()}],"scroll-pb":[{"scroll-pb":k()}],"scroll-pl":[{"scroll-pl":k()}],"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",re,ne]}],fill:[{fill:["none",...N()]}],"stroke-w":[{stroke:[he,jn,Zt,Po]}],stroke:[{stroke:["none",...N()]}],"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"]}},mh=qp(fh);function L(...e){return mh(ic(e))}const ca=to("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}}),kt=x.forwardRef(({className:e,variant:t,size:n,iconSize:r,iconPosition:o,fullWidth:a,asChild:i=!1,icon:s,iconOnly:c,children:u,...f},l)=>{const p=i?kp:"button";let h=n;if(c&&n)switch(n){case"large":h="icon.large";break;case"medium":h="icon.medium";break;case"small":h="icon.small";break}const b=r||(n==="large"?"large":n==="small"?"small":"medium");return m.jsxs(p,{className:L(ca({variant:t,size:h,iconSize:b,iconPosition:o,fullWidth:a,className:e})),ref:l,"aria-label":c&&!f["aria-label"]?"Icon button":f["aria-label"],...f,children:[s&&m.jsx("span",{"data-testid":"button-icon",children:s}),!c&&u]})});kt.displayName="DoctButton";const ph={h1:{fontSize:"3.5rem",tag:"h1"},h2:{fontSize:"2.875rem",tag:"h2"},h3:{fontSize:"2.25rem",tag:"h3"},h4:{fontSize:"2rem",tag:"h4"},h5:{fontSize:"1.75rem",tag:"h5"},h6:{fontSize:"1.5rem",tag:"h6"},h7:{fontSize:"1.25rem",tag:"p"},h8:{fontSize:"1.125rem",tag:"p"},title1:{fontSize:"1.375rem",tag:"p"},title2:{fontSize:"1.125rem",tag:"p"},title3:{fontSize:"0.875rem",tag:"p"},title4:{fontSize:"0.75rem",tag:"p"},body1:{fontSize:"1rem",tag:"p"},body2:{fontSize:"0.875rem",tag:"p"},body3:{fontSize:"0.75rem",tag:"p"},body4:{fontSize:"0.625rem",tag:"p"},textLabel1:{fontSize:"1rem",tag:"span"},textLabel2:{fontSize:"0.875rem",tag:"span"},textLabel3:{fontSize:"0.75rem",tag:"span"},textLabel4:{fontSize:"0.6875rem",tag:"span"}},hh={regular:"400",medium:"500",semiBold:"600",bold:"700",extraBold:"800",light:"300"},la=({variant:e,weight:t="regular",children:n,color:r="#000",align:o="inherit",className:a=""})=>{const i=ph[e]??{fontSize:"16px",tag:"p"},{fontSize:s,tag:c}=i;return m.jsx(c,{className:a,style:{fontSize:s,fontWeight:hh[t]??"400",color:r,textAlign:o},children:n})};function gh(){return m.jsx("div",{className:"flex flex-col items-center justify-center h-screen w-full bg-white",children:m.jsx("img",{src:"/logoAnimation.gif",alt:"Loading animation",className:"w-32 h-32 object-contain"})})}const bc=d.forwardRef(({size:e=48,strokeWidth:t=4,className:n,colorClassName:r="text-current",...o},a)=>{const i=Math.max((e-t)/2,0),s=2*Math.PI*i;return m.jsxs("svg",{ref:a,width:e,height:e,viewBox:`0 0 ${e} ${e}`,className:L("animate-spin text-muted-foreground",n),role:"progressbar","aria-label":"Loading","aria-valuemin":0,"aria-valuemax":100,...o,children:[m.jsx("circle",{className:"opacity-25",cx:e/2,cy:e/2,r:i,stroke:"currentColor",strokeWidth:t,fill:"none"}),m.jsx("circle",{className:L(r),cx:e/2,cy:e/2,r:i,stroke:"currentColor",strokeWidth:t,strokeLinecap:"round",strokeDasharray:s,strokeDashoffset:s*.75,fill:"none"})]})});bc.displayName="CircularProgress";const an=d.forwardRef(({className:e,type:t,...n},r)=>m.jsx("input",{type:t,className:L("flex h-10 w-full rounded-md border border-gray-300 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 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:r,...n}));an.displayName="Input";var vh=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],J=vh.reduce((e,t)=>{const n=Wt(`Primitive.${t}`),r=d.forwardRef((o,a)=>{const{asChild:i,...s}=o,c=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),m.jsx(c,{...s,ref:a})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function kn(e,t){e&&eo.flushSync(()=>e.dispatchEvent(t))}var bh="Label",yc=d.forwardRef((e,t)=>m.jsx(J.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())}}));yc.displayName=bh;var wc=yc;const yh=to("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),sn=d.forwardRef(({className:e,...t},n)=>m.jsx(wc,{ref:n,className:L(yh(),e),...t}));sn.displayName=wc.displayName;const nt=({label:e,placeholder:t,helperText:n,error:r,required:o,type:a="text",leftIcon:i,rightIcon:s,className:c,inputClassName:u,onChange:f,showCharCount:l,maxLength:p,value:h,disabled:b,fridged:g,...v})=>{const[w,y]=x.useState((h==null?void 0:h.length)||0),E=R=>{f&&f(R),y(R.target.value.length)},M=l&&typeof p=="number",C=g||b;return m.jsxs("div",{className:L("space-y-1",c),children:[e&&m.jsxs(sn,{className:"text-sm font-medium text-foreground",children:[e,o&&m.jsx("span",{className:"text-destructive ml-1",children:"*"})]}),m.jsxs("div",{className:"relative",children:[i&&m.jsx("div",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground",children:i}),s&&m.jsx("div",{className:"absolute right-3 top-1/2 -translate-y-1/2 text-muted-foreground",children:s}),m.jsx(an,{type:a,placeholder:t,disabled:b,value:h,maxLength:p,onChange:E,className:L(i&&"pl-10",s&&"pr-10",r&&"border-destructive",C&&"cursor-not-allowed bg-muted text-muted-foreground opacity-70",u),...v}),M&&m.jsxs("span",{className:"absolute bottom-[-1.25rem] right-0 text-xs text-muted-foreground",children:[w," / ",p]})]}),(n||r)&&m.jsx("p",{className:L("text-xs",r?"text-destructive":"text-muted-foreground"),children:r||n})]})},wh=({length:e=6,label:t,value:n,onChange:r,onComplete:o,className:a,error:i,inputClassName:s="h-8 w-8"})=>{const c=x.useRef([]),u=(p,h)=>{var v;const b=h.replace(/\D/g,"").slice(0,1);if(h.length>1&&b.length<=1)return;const g=[...n];g[p]=b,r(g),h&&p<e-1&&((v=c.current[p+1])==null||v.focus()),g.every(w=>w!=="")&&o&&o(g.join(""))},f=(p,h)=>{var y;h.preventDefault();const g=(h.clipboardData.getData("text")||"").replace(/\D/g,"").slice(0,e-p).split("");if(g.length===0)return;const v=[...n];for(let E=0;E<g.length&&p+E<e;E++)v[p+E]=g[E];r(v);const w=Math.min(p+g.length,e-1);(y=c.current[w])==null||y.focus(),v.every(E=>E!=="")&&o&&o(v.join(""))},l=(p,h)=>{var b;h.key==="Backspace"&&!n[p]&&p>0&&((b=c.current[p-1])==null||b.focus())};return m.jsxs("div",{className:L("space-y-2",a),children:[t&&m.jsx(sn,{className:"text-sm font-medium text-gray-700",children:t}),m.jsx("div",{className:"flex gap-1",children:n.map((p,h)=>m.jsx(an,{ref:b=>c.current[h]=b,type:"text",inputMode:"numeric",maxLength:1,value:p,onChange:b=>u(h,b.target.value),onKeyDown:b=>l(h,b),onPaste:b=>f(h,b),className:L("text-center p-0 text-lg font-semibold",i&&"border-destructive",s)},h))}),i&&m.jsx("p",{className:"text-xs text-destructive mt-1",children:i})]})};/**
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 Sh=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Sc=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();/**
6
+ */const xh=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),xc=(...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 Eh={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 Sh={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 Ch=x.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:a,iconNode:i,...s},c)=>x.createElement("svg",{ref:c,...Eh,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:Sc("lucide",o),...s},[...i.map(([u,f])=>x.createElement(u,f)),...Array.isArray(a)?a:[a]]));/**
16
+ */const Eh=x.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:a,iconNode:i,...s},c)=>x.createElement("svg",{ref:c,...Sh,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:xc("lucide",o),...s},[...i.map(([u,f])=>x.createElement(u,f)),...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 Oe=(e,t)=>{const n=x.forwardRef(({className:r,...o},a)=>x.createElement(Ch,{ref:a,iconNode:t,className:Sc(`lucide-${Sh(e)}`,r),...o}));return n.displayName=`${e}`,n};/**
21
+ */const Oe=(e,t)=>{const n=x.forwardRef(({className:r,...o},a)=>x.createElement(Eh,{ref:a,iconNode:t,className:xc(`lucide-${xh(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 Dh=[["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"}]],Mh=Oe("Building",Dh);/**
26
+ */const Ch=[["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"}]],Dh=Oe("Building",Ch);/**
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 Nh=[["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"}]],Ec=Oe("CalendarDays",Nh);/**
31
+ */const Mh=[["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"}]],Sc=Oe("CalendarDays",Mh);/**
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 kh=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],tr=Oe("Check",kh);/**
36
+ */const Nh=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],er=Oe("Check",Nh);/**
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 Rh=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],nr=Oe("ChevronDown",Rh);/**
41
+ */const kh=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],tr=Oe("ChevronDown",kh);/**
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 Oh=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],Cc=Oe("ChevronLeft",Oh);/**
46
+ */const Rh=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],Ec=Oe("ChevronLeft",Rh);/**
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 Th=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],La=Oe("ChevronRight",Th);/**
51
+ */const Oh=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],La=Oe("ChevronRight",Oh);/**
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 Ph=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],_h=Oe("ChevronUp",Ph);/**
56
+ */const Th=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],Ph=Oe("ChevronUp",Th);/**
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 Ah=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],Ih=Oe("CircleCheck",Ah);/**
61
+ */const _h=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],Ah=Oe("CircleCheck",_h);/**
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 jh=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],$h=Oe("CircleX",jh);/**
66
+ */const Ih=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m15 9-6 6",key:"1uzhvr"}],["path",{d:"m9 9 6 6",key:"z0biqf"}]],jh=Oe("CircleX",Ih);/**
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 Lh=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],Dc=Oe("Circle",Lh);/**
71
+ */const $h=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],Cc=Oe("Circle",$h);/**
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 Fh=[["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"}]],Wh=Oe("EyeOff",Fh);/**
76
+ */const Lh=[["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"}]],Fh=Oe("EyeOff",Lh);/**
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 Bh=[["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"}]],Yh=Oe("Eye",Bh);/**
81
+ */const Wh=[["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"}]],Bh=Oe("Eye",Wh);/**
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 zh=[["polygon",{points:"22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3",key:"1yg77f"}]],Hh=Oe("Filter",zh);/**
86
+ */const Yh=[["polygon",{points:"22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3",key:"1yg77f"}]],zh=Oe("Filter",Yh);/**
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 Uh=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],Gh=Oe("Info",Uh);/**
91
+ */const Hh=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],Uh=Oe("Info",Hh);/**
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 qh=[["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"}]],Mc=Oe("Mail",qh);/**
96
+ */const Gh=[["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"}]],Dc=Oe("Mail",Gh);/**
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 Vh=[["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"}]],Kh=Oe("MapPin",Vh);/**
101
+ */const qh=[["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"}]],Vh=Oe("MapPin",qh);/**
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 Xh=[["path",{d:"M5 12h14",key:"1ays0h"}]],Zh=Oe("Minus",Xh);/**
106
+ */const Kh=[["path",{d:"M5 12h14",key:"1ays0h"}]],Xh=Oe("Minus",Kh);/**
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 Qh=[["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"}]],Jh=Oe("Phone",Qh);/**
111
+ */const Zh=[["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"}]],Qh=Oe("Phone",Zh);/**
112
112
  * @license lucide-react v0.474.0 - ISC
113
113
  *
114
114
  * This source code is licensed under the ISC license.
115
115
  * See the LICENSE file in the root directory of this source tree.
116
- */const eg=[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]],Nc=Oe("Search",eg);/**
116
+ */const Jh=[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]],Mc=Oe("Search",Jh);/**
117
117
  * @license lucide-react v0.474.0 - ISC
118
118
  *
119
119
  * This source code is licensed under the ISC license.
120
120
  * See the LICENSE file in the root directory of this source tree.
121
- */const tg=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],ng=Oe("TriangleAlert",tg);/**
121
+ */const eg=[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]],tg=Oe("TriangleAlert",eg);/**
122
122
  * @license lucide-react v0.474.0 - ISC
123
123
  *
124
124
  * This source code is licensed under the ISC license.
125
125
  * See the LICENSE file in the root directory of this source tree.
126
- */const rg=[["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"}]],og=Oe("User",rg);/**
126
+ */const ng=[["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"}]],rg=Oe("User",ng);/**
127
127
  * @license lucide-react v0.474.0 - ISC
128
128
  *
129
129
  * This source code is licensed under the ISC license.
130
130
  * See the LICENSE file in the root directory of this source tree.
131
- */const ag=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],cn=Oe("X",ag);function ua({label:e,placeholder:t="Enter password",helperText:n,error:r,required:o,className:a,showPassword:i=!1,onShowPasswordChange:s,value:c,onChange:u,...f}){return m.jsxs("div",{className:F("space-y-1",a),children:[e&&m.jsxs(sn,{className:"text-sm font-medium text-gray-700",children:[e,o&&m.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),m.jsxs("div",{className:"relative",children:[m.jsx(an,{type:i?"text":"password",placeholder:t,className:F("pr-10",r&&"border-destructive"),value:c,onChange:l=>u==null?void 0:u(l.target.value),...f}),m.jsx("div",{className:"absolute right-3 top-1/2 -translate-y-1/2 text-muted-foreground cursor-pointer",onClick:()=>s==null?void 0:s(!i),"aria-label":i?"Hide password":"Show password",children:i?m.jsx(Wh,{className:"h-4 w-4 text-gray-400 hover:text-gray-500"}):m.jsx(Yh,{className:"h-4 w-4 text-gray-400 hover:text-gray-500"})})]}),r&&m.jsx("p",{className:"text-xs text-red-500",children:r}),n&&!r&&m.jsx("p",{className:"text-xs text-gray-500",children:n})]})}const Fa=d.forwardRef(({label:e,helperText:t,errorText:n,required:r,className:o,placeholder:a="Write here...",rows:i=4,...s},c)=>{const u=!!n;return m.jsxs("div",{className:F("space-y-1",o),children:[e&&m.jsxs("label",{className:"block text-sm font-medium text-foreground",children:[e,r&&m.jsx("span",{className:"text-destructive ml-1",children:"*"})]}),m.jsx("textarea",{ref:c,placeholder:a,rows:i,className:F("flex min-h-[80px] w-full rounded-md border bg-background px-3 py-2 text-base placeholder:text-muted-foreground focus:outline-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",u?"border border-destructive":"border-input focus:ring-ring"),...s}),(t||n)&&m.jsx("p",{className:F("text-xs",u?"text-destructive":"text-muted-foreground"),children:n||t})]})});Fa.displayName="Textarea";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 sg(e,t){const n=d.createContext(t),r=a=>{const{children:i,...s}=a,c=d.useMemo(()=>s,Object.values(s));return m.jsx(n.Provider,{value:c,children:i})};r.displayName=e+"Provider";function o(a){const i=d.useContext(n);if(i)return i;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return[r,o]}function Ge(e,t=[]){let n=[];function r(a,i){const s=d.createContext(i),c=n.length;n=[...n,i];const u=l=>{var y;const{scope:p,children:h,...b}=l,g=((y=p==null?void 0:p[e])==null?void 0:y[c])||s,v=d.useMemo(()=>b,Object.values(b));return m.jsx(g.Provider,{value:v,children:h})};u.displayName=a+"Provider";function f(l,p){var g;const h=((g=p==null?void 0:p[e])==null?void 0:g[c])||s,b=d.useContext(h);if(b)return b;if(i!==void 0)return i;throw new Error(`\`${l}\` must be used within \`${a}\``)}return[u,f]}const o=()=>{const a=n.map(i=>d.createContext(i));return function(s){const c=(s==null?void 0:s[e])||a;return d.useMemo(()=>({[`__scope${e}`]:{...s,[e]:c}}),[s,c])}};return o.scopeName=e,[r,ig(o,...t)]}function ig(...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 i=r.reduce((s,{useScope:c,scopeName:u})=>{const l=c(a)[`__scope${u}`];return{...s,...l}},{});return d.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}function je(e){const t=d.useRef(e);return d.useEffect(()=>{t.current=e}),d.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function rr(e,t=globalThis==null?void 0:globalThis.document){const n=je(e);d.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 cg="DismissableLayer",da="dismissableLayer.update",lg="dismissableLayer.pointerDownOutside",ug="dismissableLayer.focusOutside",Us,kc=d.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Rc=d.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:i,onDismiss:s,...c}=e,u=d.useContext(kc),[f,l]=d.useState(null),p=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,h]=d.useState({}),b=fe(t,S=>l(S)),g=Array.from(u.layers),[v]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),y=g.indexOf(v),w=f?g.indexOf(f):-1,E=u.layersWithOutsidePointerEventsDisabled.size>0,M=w>=y,C=mg(S=>{const R=S.target,A=[...u.branches].some(I=>I.contains(R));!M||A||(o==null||o(S),i==null||i(S),S.defaultPrevented||s==null||s())},p),k=pg(S=>{const R=S.target;[...u.branches].some(I=>I.contains(R))||(a==null||a(S),i==null||i(S),S.defaultPrevented||s==null||s())},p);return rr(S=>{w===u.layers.size-1&&(r==null||r(S),!S.defaultPrevented&&s&&(S.preventDefault(),s()))},p),d.useEffect(()=>{if(f)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(Us=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(f)),u.layers.add(f),Gs(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=Us)}},[f,p,n,u]),d.useEffect(()=>()=>{f&&(u.layers.delete(f),u.layersWithOutsidePointerEventsDisabled.delete(f),Gs())},[f,u]),d.useEffect(()=>{const S=()=>h({});return document.addEventListener(da,S),()=>document.removeEventListener(da,S)},[]),m.jsx(J.div,{...c,ref:b,style:{pointerEvents:E?M?"auto":"none":void 0,...e.style},onFocusCapture:K(e.onFocusCapture,k.onFocusCapture),onBlurCapture:K(e.onBlurCapture,k.onBlurCapture),onPointerDownCapture:K(e.onPointerDownCapture,C.onPointerDownCapture)})});Rc.displayName=cg;var dg="DismissableLayerBranch",fg=d.forwardRef((e,t)=>{const n=d.useContext(kc),r=d.useRef(null),o=fe(t,r);return d.useEffect(()=>{const a=r.current;if(a)return n.branches.add(a),()=>{n.branches.delete(a)}},[n.branches]),m.jsx(J.div,{...e,ref:o})});fg.displayName=dg;function mg(e,t=globalThis==null?void 0:globalThis.document){const n=je(e),r=d.useRef(!1),o=d.useRef(()=>{});return d.useEffect(()=>{const a=s=>{if(s.target&&!r.current){let c=function(){Oc(lg,n,u,{discrete:!0})};const u={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=c,t.addEventListener("click",o.current,{once:!0})):c()}else t.removeEventListener("click",o.current);r.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",a),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function pg(e,t=globalThis==null?void 0:globalThis.document){const n=je(e),r=d.useRef(!1);return d.useEffect(()=>{const o=a=>{a.target&&!r.current&&Oc(ug,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 Gs(){const e=new CustomEvent(da);document.dispatchEvent(e)}function Oc(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?kn(o,a):o.dispatchEvent(a)}var _o=0;function Wa(){d.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??qs()),document.body.insertAdjacentElement("beforeend",e[1]??qs()),_o++,()=>{_o===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),_o--}},[])}function qs(){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 Ao="focusScope.autoFocusOnMount",Io="focusScope.autoFocusOnUnmount",Vs={bubbles:!1,cancelable:!0},hg="FocusScope",or=d.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:a,...i}=e,[s,c]=d.useState(null),u=je(o),f=je(a),l=d.useRef(null),p=fe(t,g=>c(g)),h=d.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;d.useEffect(()=>{if(r){let g=function(E){if(h.paused||!s)return;const M=E.target;s.contains(M)?l.current=M:Lt(l.current,{select:!0})},v=function(E){if(h.paused||!s)return;const M=E.relatedTarget;M!==null&&(s.contains(M)||Lt(l.current,{select:!0}))},y=function(E){if(document.activeElement===document.body)for(const C of E)C.removedNodes.length>0&&Lt(s)};document.addEventListener("focusin",g),document.addEventListener("focusout",v);const w=new MutationObserver(y);return s&&w.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",g),document.removeEventListener("focusout",v),w.disconnect()}}},[r,s,h.paused]),d.useEffect(()=>{if(s){Xs.add(h);const g=document.activeElement;if(!s.contains(g)){const y=new CustomEvent(Ao,Vs);s.addEventListener(Ao,u),s.dispatchEvent(y),y.defaultPrevented||(gg(xg(Tc(s)),{select:!0}),document.activeElement===g&&Lt(s))}return()=>{s.removeEventListener(Ao,u),setTimeout(()=>{const y=new CustomEvent(Io,Vs);s.addEventListener(Io,f),s.dispatchEvent(y),y.defaultPrevented||Lt(g??document.body,{select:!0}),s.removeEventListener(Io,f),Xs.remove(h)},0)}}},[s,u,f,h]);const b=d.useCallback(g=>{if(!n&&!r||h.paused)return;const v=g.key==="Tab"&&!g.altKey&&!g.ctrlKey&&!g.metaKey,y=document.activeElement;if(v&&y){const w=g.currentTarget,[E,M]=vg(w);E&&M?!g.shiftKey&&y===M?(g.preventDefault(),n&&Lt(E,{select:!0})):g.shiftKey&&y===E&&(g.preventDefault(),n&&Lt(M,{select:!0})):y===w&&g.preventDefault()}},[n,r,h.paused]);return m.jsx(J.div,{tabIndex:-1,...i,ref:p,onKeyDown:b})});or.displayName=hg;function gg(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Lt(r,{select:t}),document.activeElement!==n)return}function vg(e){const t=Tc(e),n=Ks(t,e),r=Ks(t.reverse(),e);return[n,r]}function Tc(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 Ks(e,t){for(const n of e)if(!bg(n,{upTo:t}))return n}function bg(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 yg(e){return e instanceof HTMLInputElement&&"select"in e}function Lt(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&yg(e)&&t&&e.select()}}var Xs=wg();function wg(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=Zs(e,t),e.unshift(t)},remove(t){var n;e=Zs(e,t),(n=e[0])==null||n.resume()}}}function Zs(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function xg(e){return e.filter(t=>t.tagName!=="A")}var Re=globalThis!=null&&globalThis.document?d.useLayoutEffect:()=>{},Sg=d[" useId ".trim().toString()]||(()=>{}),Eg=0;function Pe(e){const[t,n]=d.useState(Sg());return Re(()=>{n(r=>r??String(Eg++))},[e]),e||(t?`radix-${t}`:"")}const Cg=["top","right","bottom","left"],Bt=Math.min,et=Math.max,Br=Math.round,Er=Math.floor,bt=e=>({x:e,y:e}),Dg={left:"right",right:"left",bottom:"top",top:"bottom"},Mg={start:"end",end:"start"};function fa(e,t,n){return et(e,Bt(t,n))}function Rt(e,t){return typeof e=="function"?e(t):e}function Ot(e){return e.split("-")[0]}function Rn(e){return e.split("-")[1]}function Ba(e){return e==="x"?"y":"x"}function Ya(e){return e==="y"?"height":"width"}const Ng=new Set(["top","bottom"]);function gt(e){return Ng.has(Ot(e))?"y":"x"}function za(e){return Ba(gt(e))}function kg(e,t,n){n===void 0&&(n=!1);const r=Rn(e),o=za(e),a=Ya(o);let i=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(i=Yr(i)),[i,Yr(i)]}function Rg(e){const t=Yr(e);return[ma(e),t,ma(t)]}function ma(e){return e.replace(/start|end/g,t=>Mg[t])}const Qs=["left","right"],Js=["right","left"],Og=["top","bottom"],Tg=["bottom","top"];function Pg(e,t,n){switch(e){case"top":case"bottom":return n?t?Js:Qs:t?Qs:Js;case"left":case"right":return t?Og:Tg;default:return[]}}function _g(e,t,n,r){const o=Rn(e);let a=Pg(Ot(e),n==="start",r);return o&&(a=a.map(i=>i+"-"+o),t&&(a=a.concat(a.map(ma)))),a}function Yr(e){return e.replace(/left|right|bottom|top/g,t=>Dg[t])}function Ag(e){return{top:0,right:0,bottom:0,left:0,...e}}function Pc(e){return typeof e!="number"?Ag(e):{top:e,right:e,bottom:e,left:e}}function zr(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 ei(e,t,n){let{reference:r,floating:o}=e;const a=gt(t),i=za(t),s=Ya(i),c=Ot(t),u=a==="y",f=r.x+r.width/2-o.width/2,l=r.y+r.height/2-o.height/2,p=r[s]/2-o[s]/2;let h;switch(c){case"top":h={x:f,y:r.y-o.height};break;case"bottom":h={x:f,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:l};break;case"left":h={x:r.x-o.width,y:l};break;default:h={x:r.x,y:r.y}}switch(Rn(t)){case"start":h[i]-=p*(n&&u?-1:1);break;case"end":h[i]+=p*(n&&u?-1:1);break}return h}const Ig=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:a=[],platform:i}=n,s=a.filter(Boolean),c=await(i.isRTL==null?void 0:i.isRTL(t));let u=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:f,y:l}=ei(u,r,c),p=r,h={},b=0;for(let g=0;g<s.length;g++){const{name:v,fn:y}=s[g],{x:w,y:E,data:M,reset:C}=await y({x:f,y:l,initialPlacement:r,placement:p,strategy:o,middlewareData:h,rects:u,platform:i,elements:{reference:e,floating:t}});f=w??f,l=E??l,h={...h,[v]:{...h[v],...M}},C&&b<=50&&(b++,typeof C=="object"&&(C.placement&&(p=C.placement),C.rects&&(u=C.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:o}):C.rects),{x:f,y:l}=ei(u,p,c)),g=-1)}return{x:f,y:l,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:i,elements:s,strategy:c}=e,{boundary:u="clippingAncestors",rootBoundary:f="viewport",elementContext:l="floating",altBoundary:p=!1,padding:h=0}=Rt(t,e),b=Pc(h),v=s[p?l==="floating"?"reference":"floating":l],y=zr(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(s.floating)),boundary:u,rootBoundary:f,strategy:c})),w=l==="floating"?{x:r,y:o,width:i.floating.width,height:i.floating.height}:i.reference,E=await(a.getOffsetParent==null?void 0:a.getOffsetParent(s.floating)),M=await(a.isElement==null?void 0:a.isElement(E))?await(a.getScale==null?void 0:a.getScale(E))||{x:1,y:1}:{x:1,y:1},C=zr(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:w,offsetParent:E,strategy:c}):w);return{top:(y.top-C.top+b.top)/M.y,bottom:(C.bottom-y.bottom+b.bottom)/M.y,left:(y.left-C.left+b.left)/M.x,right:(C.right-y.right+b.right)/M.x}}const jg=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:a,platform:i,elements:s,middlewareData:c}=t,{element:u,padding:f=0}=Rt(e,t)||{};if(u==null)return{};const l=Pc(f),p={x:n,y:r},h=za(o),b=Ya(h),g=await i.getDimensions(u),v=h==="y",y=v?"top":"left",w=v?"bottom":"right",E=v?"clientHeight":"clientWidth",M=a.reference[b]+a.reference[h]-p[h]-a.floating[b],C=p[h]-a.reference[h],k=await(i.getOffsetParent==null?void 0:i.getOffsetParent(u));let S=k?k[E]:0;(!S||!await(i.isElement==null?void 0:i.isElement(k)))&&(S=s.floating[E]||a.floating[b]);const R=M/2-C/2,A=S/2-g[b]/2-1,I=Bt(l[y],A),L=Bt(l[w],A),V=I,B=S-g[b]-L,$=S/2-g[b]/2+R,_=fa(V,$,B),N=!c.arrow&&Rn(o)!=null&&$!==_&&a.reference[b]/2-($<V?I:L)-g[b]/2<0,O=N?$<V?$-V:$-B:0;return{[h]:p[h]+O,data:{[h]:_,centerOffset:$-_-O,...N&&{alignmentOffset:O}},reset:N}}}),$g=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:a,rects:i,initialPlacement:s,platform:c,elements:u}=t,{mainAxis:f=!0,crossAxis:l=!0,fallbackPlacements:p,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:b="none",flipAlignment:g=!0,...v}=Rt(e,t);if((n=a.arrow)!=null&&n.alignmentOffset)return{};const y=Ot(o),w=gt(s),E=Ot(s)===s,M=await(c.isRTL==null?void 0:c.isRTL(u.floating)),C=p||(E||!g?[Yr(s)]:Rg(s)),k=b!=="none";!p&&k&&C.push(..._g(s,g,b,M));const S=[s,...C],R=await qn(t,v),A=[];let I=((r=a.flip)==null?void 0:r.overflows)||[];if(f&&A.push(R[y]),l){const $=kg(o,i,M);A.push(R[$[0]],R[$[1]])}if(I=[...I,{placement:o,overflows:A}],!A.every($=>$<=0)){var L,V;const $=(((L=a.flip)==null?void 0:L.index)||0)+1,_=S[$];if(_&&(!(l==="alignment"?w!==gt(_):!1)||I.every(D=>gt(D.placement)===w?D.overflows[0]>0:!0)))return{data:{index:$,overflows:I},reset:{placement:_}};let N=(V=I.filter(O=>O.overflows[0]<=0).sort((O,D)=>O.overflows[1]-D.overflows[1])[0])==null?void 0:V.placement;if(!N)switch(h){case"bestFit":{var B;const O=(B=I.filter(D=>{if(k){const P=gt(D.placement);return P===w||P==="y"}return!0}).map(D=>[D.placement,D.overflows.filter(P=>P>0).reduce((P,Y)=>P+Y,0)]).sort((D,P)=>D[1]-P[1])[0])==null?void 0:B[0];O&&(N=O);break}case"initialPlacement":N=s;break}if(o!==N)return{reset:{placement:N}}}return{}}}};function ti(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function ni(e){return Cg.some(t=>e[t]>=0)}const Lg=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=Rt(e,t);switch(r){case"referenceHidden":{const a=await qn(t,{...o,elementContext:"reference"}),i=ti(a,n.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:ni(i)}}}case"escaped":{const a=await qn(t,{...o,altBoundary:!0}),i=ti(a,n.floating);return{data:{escapedOffsets:i,escaped:ni(i)}}}default:return{}}}}},_c=new Set(["left","top"]);async function Fg(e,t){const{placement:n,platform:r,elements:o}=e,a=await(r.isRTL==null?void 0:r.isRTL(o.floating)),i=Ot(n),s=Rn(n),c=gt(n)==="y",u=_c.has(i)?-1:1,f=a&&c?-1:1,l=Rt(t,e);let{mainAxis:p,crossAxis:h,alignmentAxis:b}=typeof l=="number"?{mainAxis:l,crossAxis:0,alignmentAxis:null}:{mainAxis:l.mainAxis||0,crossAxis:l.crossAxis||0,alignmentAxis:l.alignmentAxis};return s&&typeof b=="number"&&(h=s==="end"?b*-1:b),c?{x:h*f,y:p*u}:{x:p*u,y:h*f}}const Wg=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:a,placement:i,middlewareData:s}=t,c=await Fg(t,e);return i===((n=s.offset)==null?void 0:n.placement)&&(r=s.arrow)!=null&&r.alignmentOffset?{}:{x:o+c.x,y:a+c.y,data:{...c,placement:i}}}}},Bg=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:i=!1,limiter:s={fn:v=>{let{x:y,y:w}=v;return{x:y,y:w}}},...c}=Rt(e,t),u={x:n,y:r},f=await qn(t,c),l=gt(Ot(o)),p=Ba(l);let h=u[p],b=u[l];if(a){const v=p==="y"?"top":"left",y=p==="y"?"bottom":"right",w=h+f[v],E=h-f[y];h=fa(w,h,E)}if(i){const v=l==="y"?"top":"left",y=l==="y"?"bottom":"right",w=b+f[v],E=b-f[y];b=fa(w,b,E)}const g=s.fn({...t,[p]:h,[l]:b});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[p]:a,[l]:i}}}}}},Yg=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:a,middlewareData:i}=t,{offset:s=0,mainAxis:c=!0,crossAxis:u=!0}=Rt(e,t),f={x:n,y:r},l=gt(o),p=Ba(l);let h=f[p],b=f[l];const g=Rt(s,t),v=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(c){const E=p==="y"?"height":"width",M=a.reference[p]-a.floating[E]+v.mainAxis,C=a.reference[p]+a.reference[E]-v.mainAxis;h<M?h=M:h>C&&(h=C)}if(u){var y,w;const E=p==="y"?"width":"height",M=_c.has(Ot(o)),C=a.reference[l]-a.floating[E]+(M&&((y=i.offset)==null?void 0:y[l])||0)+(M?0:v.crossAxis),k=a.reference[l]+a.reference[E]+(M?0:((w=i.offset)==null?void 0:w[l])||0)-(M?v.crossAxis:0);b<C?b=C:b>k&&(b=k)}return{[p]:h,[l]:b}}}},zg=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:a,platform:i,elements:s}=t,{apply:c=()=>{},...u}=Rt(e,t),f=await qn(t,u),l=Ot(o),p=Rn(o),h=gt(o)==="y",{width:b,height:g}=a.floating;let v,y;l==="top"||l==="bottom"?(v=l,y=p===(await(i.isRTL==null?void 0:i.isRTL(s.floating))?"start":"end")?"left":"right"):(y=l,v=p==="end"?"top":"bottom");const w=g-f.top-f.bottom,E=b-f.left-f.right,M=Bt(g-f[v],w),C=Bt(b-f[y],E),k=!t.middlewareData.shift;let S=M,R=C;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(R=E),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(S=w),k&&!p){const I=et(f.left,0),L=et(f.right,0),V=et(f.top,0),B=et(f.bottom,0);h?R=b-2*(I!==0||L!==0?I+L:et(f.left,f.right)):S=g-2*(V!==0||B!==0?V+B:et(f.top,f.bottom))}await c({...t,availableWidth:R,availableHeight:S});const A=await i.getDimensions(s.floating);return b!==A.width||g!==A.height?{reset:{rects:!0}}:{}}}};function no(){return typeof window<"u"}function On(e){return Ac(e)?(e.nodeName||"").toLowerCase():"#document"}function tt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function wt(e){var t;return(t=(Ac(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Ac(e){return no()?e instanceof Node||e instanceof tt(e).Node:!1}function lt(e){return no()?e instanceof Element||e instanceof tt(e).Element:!1}function yt(e){return no()?e instanceof HTMLElement||e instanceof tt(e).HTMLElement:!1}function ri(e){return!no()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof tt(e).ShadowRoot}const Hg=new Set(["inline","contents"]);function ar(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=ut(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!Hg.has(o)}const Ug=new Set(["table","td","th"]);function Gg(e){return Ug.has(On(e))}const qg=[":popover-open",":modal"];function ro(e){return qg.some(t=>{try{return e.matches(t)}catch{return!1}})}const Vg=["transform","translate","scale","rotate","perspective"],Kg=["transform","translate","scale","rotate","perspective","filter"],Xg=["paint","layout","strict","content"];function Ha(e){const t=Ua(),n=lt(e)?ut(e):e;return Vg.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)||Kg.some(r=>(n.willChange||"").includes(r))||Xg.some(r=>(n.contain||"").includes(r))}function Zg(e){let t=Yt(e);for(;yt(t)&&!xn(t);){if(Ha(t))return t;if(ro(t))return null;t=Yt(t)}return null}function Ua(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Qg=new Set(["html","body","#document"]);function xn(e){return Qg.has(On(e))}function ut(e){return tt(e).getComputedStyle(e)}function oo(e){return lt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Yt(e){if(On(e)==="html")return e;const t=e.assignedSlot||e.parentNode||ri(e)&&e.host||wt(e);return ri(t)?t.host:t}function Ic(e){const t=Yt(e);return xn(t)?e.ownerDocument?e.ownerDocument.body:e.body:yt(t)&&ar(t)?t:Ic(t)}function Vn(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Ic(e),a=o===((r=e.ownerDocument)==null?void 0:r.body),i=tt(o);if(a){const s=pa(i);return t.concat(i,i.visualViewport||[],ar(o)?o:[],s&&n?Vn(s):[])}return t.concat(o,Vn(o,[],n))}function pa(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function jc(e){const t=ut(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=yt(e),a=o?e.offsetWidth:n,i=o?e.offsetHeight:r,s=Br(n)!==a||Br(r)!==i;return s&&(n=a,r=i),{width:n,height:r,$:s}}function Ga(e){return lt(e)?e:e.contextElement}function yn(e){const t=Ga(e);if(!yt(t))return bt(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:a}=jc(t);let i=(a?Br(n.width):n.width)/r,s=(a?Br(n.height):n.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!s||!Number.isFinite(s))&&(s=1),{x:i,y:s}}const Jg=bt(0);function $c(e){const t=tt(e);return!Ua()||!t.visualViewport?Jg:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function ev(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==tt(e)?!1:t}function en(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),a=Ga(e);let i=bt(1);t&&(r?lt(r)&&(i=yn(r)):i=yn(e));const s=ev(a,n,r)?$c(a):bt(0);let c=(o.left+s.x)/i.x,u=(o.top+s.y)/i.y,f=o.width/i.x,l=o.height/i.y;if(a){const p=tt(a),h=r&&lt(r)?tt(r):r;let b=p,g=pa(b);for(;g&&r&&h!==b;){const v=yn(g),y=g.getBoundingClientRect(),w=ut(g),E=y.left+(g.clientLeft+parseFloat(w.paddingLeft))*v.x,M=y.top+(g.clientTop+parseFloat(w.paddingTop))*v.y;c*=v.x,u*=v.y,f*=v.x,l*=v.y,c+=E,u+=M,b=tt(g),g=pa(b)}}return zr({width:f,height:l,x:c,y:u})}function ao(e,t){const n=oo(e).scrollLeft;return t?t.left+n:en(wt(e)).left+n}function Lc(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-ao(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function tv(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const a=o==="fixed",i=wt(r),s=t?ro(t.floating):!1;if(r===i||s&&a)return n;let c={scrollLeft:0,scrollTop:0},u=bt(1);const f=bt(0),l=yt(r);if((l||!l&&!a)&&((On(r)!=="body"||ar(i))&&(c=oo(r)),yt(r))){const h=en(r);u=yn(r),f.x=h.x+r.clientLeft,f.y=h.y+r.clientTop}const p=i&&!l&&!a?Lc(i,c):bt(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-c.scrollLeft*u.x+f.x+p.x,y:n.y*u.y-c.scrollTop*u.y+f.y+p.y}}function nv(e){return Array.from(e.getClientRects())}function rv(e){const t=wt(e),n=oo(e),r=e.ownerDocument.body,o=et(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=et(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+ao(e);const s=-n.scrollTop;return ut(r).direction==="rtl"&&(i+=et(t.clientWidth,r.clientWidth)-o),{width:o,height:a,x:i,y:s}}const oi=25;function ov(e,t){const n=tt(e),r=wt(e),o=n.visualViewport;let a=r.clientWidth,i=r.clientHeight,s=0,c=0;if(o){a=o.width,i=o.height;const f=Ua();(!f||f&&t==="fixed")&&(s=o.offsetLeft,c=o.offsetTop)}const u=ao(r);if(u<=0){const f=r.ownerDocument,l=f.body,p=getComputedStyle(l),h=f.compatMode==="CSS1Compat"&&parseFloat(p.marginLeft)+parseFloat(p.marginRight)||0,b=Math.abs(r.clientWidth-l.clientWidth-h);b<=oi&&(a-=b)}else u<=oi&&(a+=u);return{width:a,height:i,x:s,y:c}}const av=new Set(["absolute","fixed"]);function sv(e,t){const n=en(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,a=yt(e)?yn(e):bt(1),i=e.clientWidth*a.x,s=e.clientHeight*a.y,c=o*a.x,u=r*a.y;return{width:i,height:s,x:c,y:u}}function ai(e,t,n){let r;if(t==="viewport")r=ov(e,n);else if(t==="document")r=rv(wt(e));else if(lt(t))r=sv(t,n);else{const o=$c(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return zr(r)}function Fc(e,t){const n=Yt(e);return n===t||!lt(n)||xn(n)?!1:ut(n).position==="fixed"||Fc(n,t)}function iv(e,t){const n=t.get(e);if(n)return n;let r=Vn(e,[],!1).filter(s=>lt(s)&&On(s)!=="body"),o=null;const a=ut(e).position==="fixed";let i=a?Yt(e):e;for(;lt(i)&&!xn(i);){const s=ut(i),c=Ha(i);!c&&s.position==="fixed"&&(o=null),(a?!c&&!o:!c&&s.position==="static"&&!!o&&av.has(o.position)||ar(i)&&!c&&Fc(e,i))?r=r.filter(f=>f!==i):o=s,i=Yt(i)}return t.set(e,r),r}function cv(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[...n==="clippingAncestors"?ro(t)?[]:iv(t,this._c):[].concat(n),r],s=i[0],c=i.reduce((u,f)=>{const l=ai(t,f,o);return u.top=et(l.top,u.top),u.right=Bt(l.right,u.right),u.bottom=Bt(l.bottom,u.bottom),u.left=et(l.left,u.left),u},ai(t,s,o));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function lv(e){const{width:t,height:n}=jc(e);return{width:t,height:n}}function uv(e,t,n){const r=yt(t),o=wt(t),a=n==="fixed",i=en(e,!0,a,t);let s={scrollLeft:0,scrollTop:0};const c=bt(0);function u(){c.x=ao(o)}if(r||!r&&!a)if((On(t)!=="body"||ar(o))&&(s=oo(t)),r){const h=en(t,!0,a,t);c.x=h.x+t.clientLeft,c.y=h.y+t.clientTop}else o&&u();a&&!r&&o&&u();const f=o&&!r&&!a?Lc(o,s):bt(0),l=i.left+s.scrollLeft-c.x-f.x,p=i.top+s.scrollTop-c.y-f.y;return{x:l,y:p,width:i.width,height:i.height}}function jo(e){return ut(e).position==="static"}function si(e,t){if(!yt(e)||ut(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return wt(e)===n&&(n=n.ownerDocument.body),n}function Wc(e,t){const n=tt(e);if(ro(e))return n;if(!yt(e)){let o=Yt(e);for(;o&&!xn(o);){if(lt(o)&&!jo(o))return o;o=Yt(o)}return n}let r=si(e,t);for(;r&&Gg(r)&&jo(r);)r=si(r,t);return r&&xn(r)&&jo(r)&&!Ha(r)?n:r||Zg(e)||n}const dv=async function(e){const t=this.getOffsetParent||Wc,n=this.getDimensions,r=await n(e.floating);return{reference:uv(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function fv(e){return ut(e).direction==="rtl"}const mv={convertOffsetParentRelativeRectToViewportRelativeRect:tv,getDocumentElement:wt,getClippingRect:cv,getOffsetParent:Wc,getElementRects:dv,getClientRects:nv,getDimensions:lv,getScale:yn,isElement:lt,isRTL:fv};function Bc(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function pv(e,t){let n=null,r;const o=wt(e);function a(){var s;clearTimeout(r),(s=n)==null||s.disconnect(),n=null}function i(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),a();const u=e.getBoundingClientRect(),{left:f,top:l,width:p,height:h}=u;if(s||t(),!p||!h)return;const b=Er(l),g=Er(o.clientWidth-(f+p)),v=Er(o.clientHeight-(l+h)),y=Er(f),E={rootMargin:-b+"px "+-g+"px "+-v+"px "+-y+"px",threshold:et(0,Bt(1,c))||1};let M=!0;function C(k){const S=k[0].intersectionRatio;if(S!==c){if(!M)return i();S?i(!1,S):r=setTimeout(()=>{i(!1,1e-7)},1e3)}S===1&&!Bc(u,e.getBoundingClientRect())&&i(),M=!1}try{n=new IntersectionObserver(C,{...E,root:o.ownerDocument})}catch{n=new IntersectionObserver(C,E)}n.observe(e)}return i(!0),a}function hv(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,u=Ga(e),f=o||a?[...u?Vn(u):[],...Vn(t)]:[];f.forEach(y=>{o&&y.addEventListener("scroll",n,{passive:!0}),a&&y.addEventListener("resize",n)});const l=u&&s?pv(u,n):null;let p=-1,h=null;i&&(h=new ResizeObserver(y=>{let[w]=y;w&&w.target===u&&h&&(h.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var E;(E=h)==null||E.observe(t)})),n()}),u&&!c&&h.observe(u),h.observe(t));let b,g=c?en(e):null;c&&v();function v(){const y=en(e);g&&!Bc(g,y)&&n(),g=y,b=requestAnimationFrame(v)}return n(),()=>{var y;f.forEach(w=>{o&&w.removeEventListener("scroll",n),a&&w.removeEventListener("resize",n)}),l==null||l(),(y=h)==null||y.disconnect(),h=null,c&&cancelAnimationFrame(b)}}const gv=Wg,vv=Bg,bv=$g,yv=zg,wv=Lg,ii=jg,xv=Yg,Sv=(e,t,n)=>{const r=new Map,o={platform:mv,...n},a={...o.platform,_c:r};return Ig(e,t,{...o,platform:a})};var Ev=typeof document<"u",Cv=function(){},Ar=Ev?x.useLayoutEffect:Cv;function Hr(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(!Hr(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)&&!Hr(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function Yc(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function ci(e,t){const n=Yc(e);return Math.round(t*n)/n}function $o(e){const t=d.useRef(e);return Ar(()=>{t.current=e}),t}function Dv(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:a,floating:i}={},transform:s=!0,whileElementsMounted:c,open:u}=e,[f,l]=d.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,h]=d.useState(r);Hr(p,r)||h(r);const[b,g]=d.useState(null),[v,y]=d.useState(null),w=d.useCallback(D=>{D!==k.current&&(k.current=D,g(D))},[]),E=d.useCallback(D=>{D!==S.current&&(S.current=D,y(D))},[]),M=a||b,C=i||v,k=d.useRef(null),S=d.useRef(null),R=d.useRef(f),A=c!=null,I=$o(c),L=$o(o),V=$o(u),B=d.useCallback(()=>{if(!k.current||!S.current)return;const D={placement:t,strategy:n,middleware:p};L.current&&(D.platform=L.current),Sv(k.current,S.current,D).then(P=>{const Y={...P,isPositioned:V.current!==!1};$.current&&!Hr(R.current,Y)&&(R.current=Y,eo.flushSync(()=>{l(Y)}))})},[p,t,n,L,V]);Ar(()=>{u===!1&&R.current.isPositioned&&(R.current.isPositioned=!1,l(D=>({...D,isPositioned:!1})))},[u]);const $=d.useRef(!1);Ar(()=>($.current=!0,()=>{$.current=!1}),[]),Ar(()=>{if(M&&(k.current=M),C&&(S.current=C),M&&C){if(I.current)return I.current(M,C,B);B()}},[M,C,B,I,A]);const _=d.useMemo(()=>({reference:k,floating:S,setReference:w,setFloating:E}),[w,E]),N=d.useMemo(()=>({reference:M,floating:C}),[M,C]),O=d.useMemo(()=>{const D={position:n,left:0,top:0};if(!N.floating)return D;const P=ci(N.floating,f.x),Y=ci(N.floating,f.y);return s?{...D,transform:"translate("+P+"px, "+Y+"px)",...Yc(N.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:P,top:Y}},[n,s,N.floating,f.x,f.y]);return d.useMemo(()=>({...f,update:B,refs:_,elements:N,floatingStyles:O}),[f,B,_,N,O])}const Mv=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?ii({element:r.current,padding:o}).fn(n):{}:r?ii({element:r,padding:o}).fn(n):{}}}},Nv=(e,t)=>({...gv(e),options:[e,t]}),kv=(e,t)=>({...vv(e),options:[e,t]}),Rv=(e,t)=>({...xv(e),options:[e,t]}),Ov=(e,t)=>({...bv(e),options:[e,t]}),Tv=(e,t)=>({...yv(e),options:[e,t]}),Pv=(e,t)=>({...wv(e),options:[e,t]}),_v=(e,t)=>({...Mv(e),options:[e,t]});var Av="Arrow",zc=d.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...a}=e;return m.jsx(J.svg,{...a,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:m.jsx("polygon",{points:"0,0 30,0 15,10"})})});zc.displayName=Av;var Iv=zc;function qa(e){const[t,n]=d.useState(void 0);return Re(()=>{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 i,s;if("borderBoxSize"in a){const c=a.borderBoxSize,u=Array.isArray(c)?c[0]:c;i=u.inlineSize,s=u.blockSize}else i=e.offsetWidth,s=e.offsetHeight;n({width:i,height:s})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var Va="Popper",[Hc,Ht]=Ge(Va),[jv,Uc]=Hc(Va),Gc=e=>{const{__scopePopper:t,children:n}=e,[r,o]=d.useState(null);return m.jsx(jv,{scope:t,anchor:r,onAnchorChange:o,children:n})};Gc.displayName=Va;var qc="PopperAnchor",Vc=d.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,a=Uc(qc,n),i=d.useRef(null),s=fe(t,i);return d.useEffect(()=>{a.onAnchorChange((r==null?void 0:r.current)||i.current)}),r?null:m.jsx(J.div,{...o,ref:s})});Vc.displayName=qc;var Ka="PopperContent",[$v,Lv]=Hc(Ka),Kc=d.forwardRef((e,t)=>{var W,X,Z,Q,ee,ae;const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:a="center",alignOffset:i=0,arrowPadding:s=0,avoidCollisions:c=!0,collisionBoundary:u=[],collisionPadding:f=0,sticky:l="partial",hideWhenDetached:p=!1,updatePositionStrategy:h="optimized",onPlaced:b,...g}=e,v=Uc(Ka,n),[y,w]=d.useState(null),E=fe(t,be=>w(be)),[M,C]=d.useState(null),k=qa(M),S=(k==null?void 0:k.width)??0,R=(k==null?void 0:k.height)??0,A=r+(a!=="center"?"-"+a:""),I=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},L=Array.isArray(u)?u:[u],V=L.length>0,B={padding:I,boundary:L.filter(Wv),altBoundary:V},{refs:$,floatingStyles:_,placement:N,isPositioned:O,middlewareData:D}=Dv({strategy:"fixed",placement:A,whileElementsMounted:(...be)=>hv(...be,{animationFrame:h==="always"}),elements:{reference:v.anchor},middleware:[Nv({mainAxis:o+R,alignmentAxis:i}),c&&kv({mainAxis:!0,crossAxis:!1,limiter:l==="partial"?Rv():void 0,...B}),c&&Ov({...B}),Tv({...B,apply:({elements:be,rects:te,availableWidth:Te,availableHeight:$e})=>{const{width:Ce,height:Ve}=te.reference,De=be.floating.style;De.setProperty("--radix-popper-available-width",`${Te}px`),De.setProperty("--radix-popper-available-height",`${$e}px`),De.setProperty("--radix-popper-anchor-width",`${Ce}px`),De.setProperty("--radix-popper-anchor-height",`${Ve}px`)}}),M&&_v({element:M,padding:s}),Bv({arrowWidth:S,arrowHeight:R}),p&&Pv({strategy:"referenceHidden",...B})]}),[P,Y]=Qc(N),H=je(b);Re(()=>{O&&(H==null||H())},[O,H]);const T=(W=D.arrow)==null?void 0:W.x,j=(X=D.arrow)==null?void 0:X.y,z=((Z=D.arrow)==null?void 0:Z.centerOffset)!==0,[U,G]=d.useState();return Re(()=>{y&&G(window.getComputedStyle(y).zIndex)},[y]),m.jsx("div",{ref:$.setFloating,"data-radix-popper-content-wrapper":"",style:{..._,transform:O?_.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:U,"--radix-popper-transform-origin":[(Q=D.transformOrigin)==null?void 0:Q.x,(ee=D.transformOrigin)==null?void 0:ee.y].join(" "),...((ae=D.hide)==null?void 0:ae.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:m.jsx($v,{scope:n,placedSide:P,onArrowChange:C,arrowX:T,arrowY:j,shouldHideArrow:z,children:m.jsx(J.div,{"data-side":P,"data-align":Y,...g,ref:E,style:{...g.style,animation:O?void 0:"none"}})})})});Kc.displayName=Ka;var Xc="PopperArrow",Fv={top:"bottom",right:"left",bottom:"top",left:"right"},Zc=d.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,a=Lv(Xc,r),i=Fv[a.placedSide];return m.jsx("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[i]: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:m.jsx(Iv,{...o,ref:n,style:{...o.style,display:"block"}})})});Zc.displayName=Xc;function Wv(e){return e!==null}var Bv=e=>({name:"transformOrigin",options:e,fn(t){var v,y,w;const{placement:n,rects:r,middlewareData:o}=t,i=((v=o.arrow)==null?void 0:v.centerOffset)!==0,s=i?0:e.arrowWidth,c=i?0:e.arrowHeight,[u,f]=Qc(n),l={start:"0%",center:"50%",end:"100%"}[f],p=(((y=o.arrow)==null?void 0:y.x)??0)+s/2,h=(((w=o.arrow)==null?void 0:w.y)??0)+c/2;let b="",g="";return u==="bottom"?(b=i?l:`${p}px`,g=`${-c}px`):u==="top"?(b=i?l:`${p}px`,g=`${r.floating.height+c}px`):u==="right"?(b=`${-c}px`,g=i?l:`${h}px`):u==="left"&&(b=`${r.floating.width+c}px`,g=i?l:`${h}px`),{data:{x:b,y:g}}}});function Qc(e){const[t,n="center"]=e.split("-");return[t,n]}var sr=Gc,ir=Vc,so=Kc,io=Zc,Yv="Portal",cr=d.forwardRef((e,t)=>{var s;const{container:n,...r}=e,[o,a]=d.useState(!1);Re(()=>a(!0),[]);const i=n||o&&((s=globalThis==null?void 0:globalThis.document)==null?void 0:s.body);return i?er.createPortal(m.jsx(J.div,{...r,ref:t}),i):null});cr.displayName=Yv;function zv(e,t){return d.useReducer((n,r)=>t[n][r]??n,e)}var at=e=>{const{present:t,children:n}=e,r=Hv(t),o=typeof n=="function"?n({present:r.isPresent}):d.Children.only(n),a=fe(r.ref,Uv(o));return typeof n=="function"||r.isPresent?d.cloneElement(o,{ref:a}):null};at.displayName="Presence";function Hv(e){const[t,n]=d.useState(),r=d.useRef(null),o=d.useRef(e),a=d.useRef("none"),i=e?"mounted":"unmounted",[s,c]=zv(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return d.useEffect(()=>{const u=Cr(r.current);a.current=s==="mounted"?u:"none"},[s]),Re(()=>{const u=r.current,f=o.current;if(f!==e){const p=a.current,h=Cr(u);e?c("MOUNT"):h==="none"||(u==null?void 0:u.display)==="none"?c("UNMOUNT"):c(f&&p!==h?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,c]),Re(()=>{if(t){let u;const f=t.ownerDocument.defaultView??window,l=h=>{const g=Cr(r.current).includes(h.animationName);if(h.target===t&&g&&(c("ANIMATION_END"),!o.current)){const v=t.style.animationFillMode;t.style.animationFillMode="forwards",u=f.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=v)})}},p=h=>{h.target===t&&(a.current=Cr(r.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",l),t.addEventListener("animationend",l),()=>{f.clearTimeout(u),t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",l),t.removeEventListener("animationend",l)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:d.useCallback(u=>{r.current=u?getComputedStyle(u):null,n(u)},[])}}function Cr(e){return(e==null?void 0:e.animationName)||"none"}function Uv(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 Gv=d[" useInsertionEffect ".trim().toString()]||Re;function ot({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,a,i]=qv({defaultProp:t,onChange:n}),s=e!==void 0,c=s?e:o;{const f=d.useRef(e!==void 0);d.useEffect(()=>{const l=f.current;l!==s&&console.warn(`${r} is changing from ${l?"controlled":"uncontrolled"} to ${s?"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.`),f.current=s},[s,r])}const u=d.useCallback(f=>{var l;if(s){const p=Vv(f)?f(e):f;p!==e&&((l=i.current)==null||l.call(i,p))}else a(f)},[s,e,a,i]);return[c,u]}function qv({defaultProp:e,onChange:t}){const[n,r]=d.useState(e),o=d.useRef(n),a=d.useRef(t);return Gv(()=>{a.current=t},[t]),d.useEffect(()=>{var i;o.current!==n&&((i=a.current)==null||i.call(a,n),o.current=n)},[n,o]),[n,r,a]}function Vv(e){return typeof e=="function"}var Kv=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},mn=new WeakMap,Dr=new WeakMap,Mr={},Lo=0,Jc=function(e){return e&&(e.host||Jc(e.parentNode))},Xv=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=Jc(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})},Zv=function(e,t,n,r){var o=Xv(t,Array.isArray(e)?e:[e]);Mr[n]||(Mr[n]=new WeakMap);var a=Mr[n],i=[],s=new Set,c=new Set(o),u=function(l){!l||s.has(l)||(s.add(l),u(l.parentNode))};o.forEach(u);var f=function(l){!l||c.has(l)||Array.prototype.forEach.call(l.children,function(p){if(s.has(p))f(p);else try{var h=p.getAttribute(r),b=h!==null&&h!=="false",g=(mn.get(p)||0)+1,v=(a.get(p)||0)+1;mn.set(p,g),a.set(p,v),i.push(p),g===1&&b&&Dr.set(p,!0),v===1&&p.setAttribute(n,"true"),b||p.setAttribute(r,"true")}catch(y){console.error("aria-hidden: cannot operate on ",p,y)}})};return f(t),s.clear(),Lo++,function(){i.forEach(function(l){var p=mn.get(l)-1,h=a.get(l)-1;mn.set(l,p),a.set(l,h),p||(Dr.has(l)||l.removeAttribute(r),Dr.delete(l)),h||l.removeAttribute(n)}),Lo--,Lo||(mn=new WeakMap,mn=new WeakMap,Dr=new WeakMap,Mr={})}},co=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=Kv(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),Zv(r,o,n,"aria-hidden")):function(){return null}},ht=function(){return ht=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},ht.apply(this,arguments)};function el(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 Qv(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 Ir="right-scroll-bar-position",jr="width-before-scroll-bar",Jv="with-scroll-bars-hidden",eb="--removed-body-scroll-bar-size";function Fo(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function tb(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 nb=typeof window<"u"?d.useLayoutEffect:d.useEffect,li=new WeakMap;function rb(e,t){var n=tb(null,function(r){return e.forEach(function(o){return Fo(o,r)})});return nb(function(){var r=li.get(n);if(r){var o=new Set(r),a=new Set(e),i=n.current;o.forEach(function(s){a.has(s)||Fo(s,null)}),a.forEach(function(s){o.has(s)||Fo(s,i)})}li.set(n,e)},[e]),n}function ob(e){return e}function ab(e,t){t===void 0&&(t=ob);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 i=t(a,r);return n.push(i),function(){n=n.filter(function(s){return s!==i})}},assignSyncMedium:function(a){for(r=!0;n.length;){var i=n;n=[],i.forEach(a)}n={push:function(s){return a(s)},filter:function(){return n}}},assignMedium:function(a){r=!0;var i=[];if(n.length){var s=n;n=[],s.forEach(a),i=n}var c=function(){var f=i;i=[],f.forEach(a)},u=function(){return Promise.resolve().then(c)};u(),n={push:function(f){i.push(f),u()},filter:function(f){return i=i.filter(f),n}}}};return o}function sb(e){e===void 0&&(e={});var t=ab(null);return t.options=ht({async:!0,ssr:!1},e),t}var tl=function(e){var t=e.sideCar,n=el(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 d.createElement(r,ht({},n))};tl.isSideCarExport=!0;function ib(e,t){return e.useMedium(t),tl}var nl=sb(),Wo=function(){},lo=d.forwardRef(function(e,t){var n=d.useRef(null),r=d.useState({onScrollCapture:Wo,onWheelCapture:Wo,onTouchMoveCapture:Wo}),o=r[0],a=r[1],i=e.forwardProps,s=e.children,c=e.className,u=e.removeScrollBar,f=e.enabled,l=e.shards,p=e.sideCar,h=e.noRelative,b=e.noIsolation,g=e.inert,v=e.allowPinchZoom,y=e.as,w=y===void 0?"div":y,E=e.gapMode,M=el(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),C=p,k=rb([n,t]),S=ht(ht({},M),o);return d.createElement(d.Fragment,null,f&&d.createElement(C,{sideCar:nl,removeScrollBar:u,shards:l,noRelative:h,noIsolation:b,inert:g,setCallbacks:a,allowPinchZoom:!!v,lockRef:n,gapMode:E}),i?d.cloneElement(d.Children.only(s),ht(ht({},S),{ref:k})):d.createElement(w,ht({},S,{className:c,ref:k}),s))});lo.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};lo.classNames={fullWidth:jr,zeroRight:Ir};var cb=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function lb(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=cb();return t&&e.setAttribute("nonce",t),e}function ub(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function db(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var fb=function(){var e=0,t=null;return{add:function(n){e==0&&(t=lb())&&(ub(t,n),db(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},mb=function(){var e=fb();return function(t,n){d.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},rl=function(){var e=mb(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},pb={left:0,top:0,right:0,gap:0},Bo=function(e){return parseInt(e||"",10)||0},hb=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[Bo(n),Bo(r),Bo(o)]},gb=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return pb;var t=hb(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])}},vb=rl(),wn="data-scroll-locked",bb=function(e,t,n,r){var o=e.left,a=e.top,i=e.right,s=e.gap;return n===void 0&&(n="margin"),`
132
- .`.concat(Jv,` {
131
+ */const og=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],cn=Oe("X",og);function ua({label:e,placeholder:t="Enter password",helperText:n,error:r,required:o,className:a,showPassword:i=!1,onShowPasswordChange:s,value:c,onChange:u,...f}){return m.jsxs("div",{className:L("space-y-1",a),children:[e&&m.jsxs(sn,{className:"text-sm font-medium text-gray-700",children:[e,o&&m.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),m.jsxs("div",{className:"relative",children:[m.jsx(an,{type:i?"text":"password",placeholder:t,className:L("pr-10",r&&"border-destructive"),value:c,onChange:l=>u==null?void 0:u(l.target.value),...f}),m.jsx("div",{className:"absolute right-3 top-1/2 -translate-y-1/2 text-muted-foreground cursor-pointer",onClick:()=>s==null?void 0:s(!i),"aria-label":i?"Hide password":"Show password",children:i?m.jsx(Fh,{className:"h-4 w-4 text-gray-400 hover:text-gray-500"}):m.jsx(Bh,{className:"h-4 w-4 text-gray-400 hover:text-gray-500"})})]}),r&&m.jsx("p",{className:"text-xs text-red-500",children:r}),n&&!r&&m.jsx("p",{className:"text-xs text-gray-500",children:n})]})}const Fa=d.forwardRef(({label:e,helperText:t,errorText:n,required:r,className:o,placeholder:a="Write here...",rows:i=4,...s},c)=>{const u=!!n;return m.jsxs("div",{className:L("space-y-1",o),children:[e&&m.jsxs("label",{className:"block text-sm font-medium text-foreground",children:[e,r&&m.jsx("span",{className:"text-destructive ml-1",children:"*"})]}),m.jsx("textarea",{ref:c,placeholder:a,rows:i,className:L("flex min-h-[80px] w-full rounded-md border bg-background px-3 py-2 text-base placeholder:text-muted-foreground focus:outline-none disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",u?"border border-destructive":"border-input focus:ring-ring"),...s}),(t||n)&&m.jsx("p",{className:L("text-xs",u?"text-destructive":"text-muted-foreground"),children:n||t})]})});Fa.displayName="Textarea";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 ag(e,t){const n=d.createContext(t),r=a=>{const{children:i,...s}=a,c=d.useMemo(()=>s,Object.values(s));return m.jsx(n.Provider,{value:c,children:i})};r.displayName=e+"Provider";function o(a){const i=d.useContext(n);if(i)return i;if(t!==void 0)return t;throw new Error(`\`${a}\` must be used within \`${e}\``)}return[r,o]}function Ge(e,t=[]){let n=[];function r(a,i){const s=d.createContext(i),c=n.length;n=[...n,i];const u=l=>{var w;const{scope:p,children:h,...b}=l,g=((w=p==null?void 0:p[e])==null?void 0:w[c])||s,v=d.useMemo(()=>b,Object.values(b));return m.jsx(g.Provider,{value:v,children:h})};u.displayName=a+"Provider";function f(l,p){var g;const h=((g=p==null?void 0:p[e])==null?void 0:g[c])||s,b=d.useContext(h);if(b)return b;if(i!==void 0)return i;throw new Error(`\`${l}\` must be used within \`${a}\``)}return[u,f]}const o=()=>{const a=n.map(i=>d.createContext(i));return function(s){const c=(s==null?void 0:s[e])||a;return d.useMemo(()=>({[`__scope${e}`]:{...s,[e]:c}}),[s,c])}};return o.scopeName=e,[r,sg(o,...t)]}function sg(...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 i=r.reduce((s,{useScope:c,scopeName:u})=>{const l=c(a)[`__scope${u}`];return{...s,...l}},{});return d.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}function je(e){const t=d.useRef(e);return d.useEffect(()=>{t.current=e}),d.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function nr(e,t=globalThis==null?void 0:globalThis.document){const n=je(e);d.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 ig="DismissableLayer",da="dismissableLayer.update",cg="dismissableLayer.pointerDownOutside",lg="dismissableLayer.focusOutside",Us,Nc=d.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),kc=d.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:i,onDismiss:s,...c}=e,u=d.useContext(Nc),[f,l]=d.useState(null),p=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,h]=d.useState({}),b=fe(t,S=>l(S)),g=Array.from(u.layers),[v]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),w=g.indexOf(v),y=f?g.indexOf(f):-1,E=u.layersWithOutsidePointerEventsDisabled.size>0,M=y>=w,C=fg(S=>{const k=S.target,I=[...u.branches].some(A=>A.contains(k));!M||I||(o==null||o(S),i==null||i(S),S.defaultPrevented||s==null||s())},p),R=mg(S=>{const k=S.target;[...u.branches].some(A=>A.contains(k))||(a==null||a(S),i==null||i(S),S.defaultPrevented||s==null||s())},p);return nr(S=>{y===u.layers.size-1&&(r==null||r(S),!S.defaultPrevented&&s&&(S.preventDefault(),s()))},p),d.useEffect(()=>{if(f)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(Us=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(f)),u.layers.add(f),Gs(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=Us)}},[f,p,n,u]),d.useEffect(()=>()=>{f&&(u.layers.delete(f),u.layersWithOutsidePointerEventsDisabled.delete(f),Gs())},[f,u]),d.useEffect(()=>{const S=()=>h({});return document.addEventListener(da,S),()=>document.removeEventListener(da,S)},[]),m.jsx(J.div,{...c,ref:b,style:{pointerEvents:E?M?"auto":"none":void 0,...e.style},onFocusCapture:K(e.onFocusCapture,R.onFocusCapture),onBlurCapture:K(e.onBlurCapture,R.onBlurCapture),onPointerDownCapture:K(e.onPointerDownCapture,C.onPointerDownCapture)})});kc.displayName=ig;var ug="DismissableLayerBranch",dg=d.forwardRef((e,t)=>{const n=d.useContext(Nc),r=d.useRef(null),o=fe(t,r);return d.useEffect(()=>{const a=r.current;if(a)return n.branches.add(a),()=>{n.branches.delete(a)}},[n.branches]),m.jsx(J.div,{...e,ref:o})});dg.displayName=ug;function fg(e,t=globalThis==null?void 0:globalThis.document){const n=je(e),r=d.useRef(!1),o=d.useRef(()=>{});return d.useEffect(()=>{const a=s=>{if(s.target&&!r.current){let c=function(){Rc(cg,n,u,{discrete:!0})};const u={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=c,t.addEventListener("click",o.current,{once:!0})):c()}else t.removeEventListener("click",o.current);r.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",a),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function mg(e,t=globalThis==null?void 0:globalThis.document){const n=je(e),r=d.useRef(!1);return d.useEffect(()=>{const o=a=>{a.target&&!r.current&&Rc(lg,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 Gs(){const e=new CustomEvent(da);document.dispatchEvent(e)}function Rc(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?kn(o,a):o.dispatchEvent(a)}var _o=0;function Wa(){d.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??qs()),document.body.insertAdjacentElement("beforeend",e[1]??qs()),_o++,()=>{_o===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),_o--}},[])}function qs(){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 Ao="focusScope.autoFocusOnMount",Io="focusScope.autoFocusOnUnmount",Vs={bubbles:!1,cancelable:!0},pg="FocusScope",rr=d.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:a,...i}=e,[s,c]=d.useState(null),u=je(o),f=je(a),l=d.useRef(null),p=fe(t,g=>c(g)),h=d.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;d.useEffect(()=>{if(r){let g=function(E){if(h.paused||!s)return;const M=E.target;s.contains(M)?l.current=M:Lt(l.current,{select:!0})},v=function(E){if(h.paused||!s)return;const M=E.relatedTarget;M!==null&&(s.contains(M)||Lt(l.current,{select:!0}))},w=function(E){if(document.activeElement===document.body)for(const C of E)C.removedNodes.length>0&&Lt(s)};document.addEventListener("focusin",g),document.addEventListener("focusout",v);const y=new MutationObserver(w);return s&&y.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",g),document.removeEventListener("focusout",v),y.disconnect()}}},[r,s,h.paused]),d.useEffect(()=>{if(s){Xs.add(h);const g=document.activeElement;if(!s.contains(g)){const w=new CustomEvent(Ao,Vs);s.addEventListener(Ao,u),s.dispatchEvent(w),w.defaultPrevented||(hg(wg(Oc(s)),{select:!0}),document.activeElement===g&&Lt(s))}return()=>{s.removeEventListener(Ao,u),setTimeout(()=>{const w=new CustomEvent(Io,Vs);s.addEventListener(Io,f),s.dispatchEvent(w),w.defaultPrevented||Lt(g??document.body,{select:!0}),s.removeEventListener(Io,f),Xs.remove(h)},0)}}},[s,u,f,h]);const b=d.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 y=g.currentTarget,[E,M]=gg(y);E&&M?!g.shiftKey&&w===M?(g.preventDefault(),n&&Lt(E,{select:!0})):g.shiftKey&&w===E&&(g.preventDefault(),n&&Lt(M,{select:!0})):w===y&&g.preventDefault()}},[n,r,h.paused]);return m.jsx(J.div,{tabIndex:-1,...i,ref:p,onKeyDown:b})});rr.displayName=pg;function hg(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Lt(r,{select:t}),document.activeElement!==n)return}function gg(e){const t=Oc(e),n=Ks(t,e),r=Ks(t.reverse(),e);return[n,r]}function Oc(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 Ks(e,t){for(const n of e)if(!vg(n,{upTo:t}))return n}function vg(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 bg(e){return e instanceof HTMLInputElement&&"select"in e}function Lt(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&bg(e)&&t&&e.select()}}var Xs=yg();function yg(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=Zs(e,t),e.unshift(t)},remove(t){var n;e=Zs(e,t),(n=e[0])==null||n.resume()}}}function Zs(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function wg(e){return e.filter(t=>t.tagName!=="A")}var Re=globalThis!=null&&globalThis.document?d.useLayoutEffect:()=>{},xg=d[" useId ".trim().toString()]||(()=>{}),Sg=0;function Pe(e){const[t,n]=d.useState(xg());return Re(()=>{n(r=>r??String(Sg++))},[e]),e||(t?`radix-${t}`:"")}const Eg=["top","right","bottom","left"],Bt=Math.min,et=Math.max,Wr=Math.round,Sr=Math.floor,bt=e=>({x:e,y:e}),Cg={left:"right",right:"left",bottom:"top",top:"bottom"},Dg={start:"end",end:"start"};function fa(e,t,n){return et(e,Bt(t,n))}function Rt(e,t){return typeof e=="function"?e(t):e}function Ot(e){return e.split("-")[0]}function Rn(e){return e.split("-")[1]}function Ba(e){return e==="x"?"y":"x"}function Ya(e){return e==="y"?"height":"width"}const Mg=new Set(["top","bottom"]);function gt(e){return Mg.has(Ot(e))?"y":"x"}function za(e){return Ba(gt(e))}function Ng(e,t,n){n===void 0&&(n=!1);const r=Rn(e),o=za(e),a=Ya(o);let i=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(i=Br(i)),[i,Br(i)]}function kg(e){const t=Br(e);return[ma(e),t,ma(t)]}function ma(e){return e.replace(/start|end/g,t=>Dg[t])}const Qs=["left","right"],Js=["right","left"],Rg=["top","bottom"],Og=["bottom","top"];function Tg(e,t,n){switch(e){case"top":case"bottom":return n?t?Js:Qs:t?Qs:Js;case"left":case"right":return t?Rg:Og;default:return[]}}function Pg(e,t,n,r){const o=Rn(e);let a=Tg(Ot(e),n==="start",r);return o&&(a=a.map(i=>i+"-"+o),t&&(a=a.concat(a.map(ma)))),a}function Br(e){return e.replace(/left|right|bottom|top/g,t=>Cg[t])}function _g(e){return{top:0,right:0,bottom:0,left:0,...e}}function Tc(e){return typeof e!="number"?_g(e):{top:e,right:e,bottom:e,left:e}}function Yr(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 ei(e,t,n){let{reference:r,floating:o}=e;const a=gt(t),i=za(t),s=Ya(i),c=Ot(t),u=a==="y",f=r.x+r.width/2-o.width/2,l=r.y+r.height/2-o.height/2,p=r[s]/2-o[s]/2;let h;switch(c){case"top":h={x:f,y:r.y-o.height};break;case"bottom":h={x:f,y:r.y+r.height};break;case"right":h={x:r.x+r.width,y:l};break;case"left":h={x:r.x-o.width,y:l};break;default:h={x:r.x,y:r.y}}switch(Rn(t)){case"start":h[i]-=p*(n&&u?-1:1);break;case"end":h[i]+=p*(n&&u?-1:1);break}return h}const Ag=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:a=[],platform:i}=n,s=a.filter(Boolean),c=await(i.isRTL==null?void 0:i.isRTL(t));let u=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:f,y:l}=ei(u,r,c),p=r,h={},b=0;for(let g=0;g<s.length;g++){const{name:v,fn:w}=s[g],{x:y,y:E,data:M,reset:C}=await w({x:f,y:l,initialPlacement:r,placement:p,strategy:o,middlewareData:h,rects:u,platform:i,elements:{reference:e,floating:t}});f=y??f,l=E??l,h={...h,[v]:{...h[v],...M}},C&&b<=50&&(b++,typeof C=="object"&&(C.placement&&(p=C.placement),C.rects&&(u=C.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:o}):C.rects),{x:f,y:l}=ei(u,p,c)),g=-1)}return{x:f,y:l,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:i,elements:s,strategy:c}=e,{boundary:u="clippingAncestors",rootBoundary:f="viewport",elementContext:l="floating",altBoundary:p=!1,padding:h=0}=Rt(t,e),b=Tc(h),v=s[p?l==="floating"?"reference":"floating":l],w=Yr(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(s.floating)),boundary:u,rootBoundary:f,strategy:c})),y=l==="floating"?{x:r,y:o,width:i.floating.width,height:i.floating.height}:i.reference,E=await(a.getOffsetParent==null?void 0:a.getOffsetParent(s.floating)),M=await(a.isElement==null?void 0:a.isElement(E))?await(a.getScale==null?void 0:a.getScale(E))||{x:1,y:1}:{x:1,y:1},C=Yr(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:y,offsetParent:E,strategy:c}):y);return{top:(w.top-C.top+b.top)/M.y,bottom:(C.bottom-w.bottom+b.bottom)/M.y,left:(w.left-C.left+b.left)/M.x,right:(C.right-w.right+b.right)/M.x}}const Ig=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:a,platform:i,elements:s,middlewareData:c}=t,{element:u,padding:f=0}=Rt(e,t)||{};if(u==null)return{};const l=Tc(f),p={x:n,y:r},h=za(o),b=Ya(h),g=await i.getDimensions(u),v=h==="y",w=v?"top":"left",y=v?"bottom":"right",E=v?"clientHeight":"clientWidth",M=a.reference[b]+a.reference[h]-p[h]-a.floating[b],C=p[h]-a.reference[h],R=await(i.getOffsetParent==null?void 0:i.getOffsetParent(u));let S=R?R[E]:0;(!S||!await(i.isElement==null?void 0:i.isElement(R)))&&(S=s.floating[E]||a.floating[b]);const k=M/2-C/2,I=S/2-g[b]/2-1,A=Bt(l[w],I),W=Bt(l[y],I),G=A,B=S-g[b]-W,$=S/2-g[b]/2+k,O=fa(G,$,B),D=!c.arrow&&Rn(o)!=null&&$!==O&&a.reference[b]/2-($<G?A:W)-g[b]/2<0,_=D?$<G?$-G:$-B:0;return{[h]:p[h]+_,data:{[h]:O,centerOffset:$-O-_,...D&&{alignmentOffset:_}},reset:D}}}),jg=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:a,rects:i,initialPlacement:s,platform:c,elements:u}=t,{mainAxis:f=!0,crossAxis:l=!0,fallbackPlacements:p,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:b="none",flipAlignment:g=!0,...v}=Rt(e,t);if((n=a.arrow)!=null&&n.alignmentOffset)return{};const w=Ot(o),y=gt(s),E=Ot(s)===s,M=await(c.isRTL==null?void 0:c.isRTL(u.floating)),C=p||(E||!g?[Br(s)]:kg(s)),R=b!=="none";!p&&R&&C.push(...Pg(s,g,b,M));const S=[s,...C],k=await qn(t,v),I=[];let A=((r=a.flip)==null?void 0:r.overflows)||[];if(f&&I.push(k[w]),l){const $=Ng(o,i,M);I.push(k[$[0]],k[$[1]])}if(A=[...A,{placement:o,overflows:I}],!I.every($=>$<=0)){var W,G;const $=(((W=a.flip)==null?void 0:W.index)||0)+1,O=S[$];if(O&&(!(l==="alignment"?y!==gt(O):!1)||A.every(N=>gt(N.placement)===y?N.overflows[0]>0:!0)))return{data:{index:$,overflows:A},reset:{placement:O}};let D=(G=A.filter(_=>_.overflows[0]<=0).sort((_,N)=>_.overflows[1]-N.overflows[1])[0])==null?void 0:G.placement;if(!D)switch(h){case"bestFit":{var B;const _=(B=A.filter(N=>{if(R){const P=gt(N.placement);return P===y||P==="y"}return!0}).map(N=>[N.placement,N.overflows.filter(P=>P>0).reduce((P,Y)=>P+Y,0)]).sort((N,P)=>N[1]-P[1])[0])==null?void 0:B[0];_&&(D=_);break}case"initialPlacement":D=s;break}if(o!==D)return{reset:{placement:D}}}return{}}}};function ti(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function ni(e){return Eg.some(t=>e[t]>=0)}const $g=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=Rt(e,t);switch(r){case"referenceHidden":{const a=await qn(t,{...o,elementContext:"reference"}),i=ti(a,n.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:ni(i)}}}case"escaped":{const a=await qn(t,{...o,altBoundary:!0}),i=ti(a,n.floating);return{data:{escapedOffsets:i,escaped:ni(i)}}}default:return{}}}}},Pc=new Set(["left","top"]);async function Lg(e,t){const{placement:n,platform:r,elements:o}=e,a=await(r.isRTL==null?void 0:r.isRTL(o.floating)),i=Ot(n),s=Rn(n),c=gt(n)==="y",u=Pc.has(i)?-1:1,f=a&&c?-1:1,l=Rt(t,e);let{mainAxis:p,crossAxis:h,alignmentAxis:b}=typeof l=="number"?{mainAxis:l,crossAxis:0,alignmentAxis:null}:{mainAxis:l.mainAxis||0,crossAxis:l.crossAxis||0,alignmentAxis:l.alignmentAxis};return s&&typeof b=="number"&&(h=s==="end"?b*-1:b),c?{x:h*f,y:p*u}:{x:p*u,y:h*f}}const Fg=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:a,placement:i,middlewareData:s}=t,c=await Lg(t,e);return i===((n=s.offset)==null?void 0:n.placement)&&(r=s.arrow)!=null&&r.alignmentOffset?{}:{x:o+c.x,y:a+c.y,data:{...c,placement:i}}}}},Wg=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:i=!1,limiter:s={fn:v=>{let{x:w,y}=v;return{x:w,y}}},...c}=Rt(e,t),u={x:n,y:r},f=await qn(t,c),l=gt(Ot(o)),p=Ba(l);let h=u[p],b=u[l];if(a){const v=p==="y"?"top":"left",w=p==="y"?"bottom":"right",y=h+f[v],E=h-f[w];h=fa(y,h,E)}if(i){const v=l==="y"?"top":"left",w=l==="y"?"bottom":"right",y=b+f[v],E=b-f[w];b=fa(y,b,E)}const g=s.fn({...t,[p]:h,[l]:b});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[p]:a,[l]:i}}}}}},Bg=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:a,middlewareData:i}=t,{offset:s=0,mainAxis:c=!0,crossAxis:u=!0}=Rt(e,t),f={x:n,y:r},l=gt(o),p=Ba(l);let h=f[p],b=f[l];const g=Rt(s,t),v=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(c){const E=p==="y"?"height":"width",M=a.reference[p]-a.floating[E]+v.mainAxis,C=a.reference[p]+a.reference[E]-v.mainAxis;h<M?h=M:h>C&&(h=C)}if(u){var w,y;const E=p==="y"?"width":"height",M=Pc.has(Ot(o)),C=a.reference[l]-a.floating[E]+(M&&((w=i.offset)==null?void 0:w[l])||0)+(M?0:v.crossAxis),R=a.reference[l]+a.reference[E]+(M?0:((y=i.offset)==null?void 0:y[l])||0)-(M?v.crossAxis:0);b<C?b=C:b>R&&(b=R)}return{[p]:h,[l]:b}}}},Yg=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:a,platform:i,elements:s}=t,{apply:c=()=>{},...u}=Rt(e,t),f=await qn(t,u),l=Ot(o),p=Rn(o),h=gt(o)==="y",{width:b,height:g}=a.floating;let v,w;l==="top"||l==="bottom"?(v=l,w=p===(await(i.isRTL==null?void 0:i.isRTL(s.floating))?"start":"end")?"left":"right"):(w=l,v=p==="end"?"top":"bottom");const y=g-f.top-f.bottom,E=b-f.left-f.right,M=Bt(g-f[v],y),C=Bt(b-f[w],E),R=!t.middlewareData.shift;let S=M,k=C;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(k=E),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(S=y),R&&!p){const A=et(f.left,0),W=et(f.right,0),G=et(f.top,0),B=et(f.bottom,0);h?k=b-2*(A!==0||W!==0?A+W:et(f.left,f.right)):S=g-2*(G!==0||B!==0?G+B:et(f.top,f.bottom))}await c({...t,availableWidth:k,availableHeight:S});const I=await i.getDimensions(s.floating);return b!==I.width||g!==I.height?{reset:{rects:!0}}:{}}}};function no(){return typeof window<"u"}function On(e){return _c(e)?(e.nodeName||"").toLowerCase():"#document"}function tt(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function wt(e){var t;return(t=(_c(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function _c(e){return no()?e instanceof Node||e instanceof tt(e).Node:!1}function lt(e){return no()?e instanceof Element||e instanceof tt(e).Element:!1}function yt(e){return no()?e instanceof HTMLElement||e instanceof tt(e).HTMLElement:!1}function ri(e){return!no()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof tt(e).ShadowRoot}const zg=new Set(["inline","contents"]);function or(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=ut(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!zg.has(o)}const Hg=new Set(["table","td","th"]);function Ug(e){return Hg.has(On(e))}const Gg=[":popover-open",":modal"];function ro(e){return Gg.some(t=>{try{return e.matches(t)}catch{return!1}})}const qg=["transform","translate","scale","rotate","perspective"],Vg=["transform","translate","scale","rotate","perspective","filter"],Kg=["paint","layout","strict","content"];function Ha(e){const t=Ua(),n=lt(e)?ut(e):e;return qg.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)||Vg.some(r=>(n.willChange||"").includes(r))||Kg.some(r=>(n.contain||"").includes(r))}function Xg(e){let t=Yt(e);for(;yt(t)&&!xn(t);){if(Ha(t))return t;if(ro(t))return null;t=Yt(t)}return null}function Ua(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Zg=new Set(["html","body","#document"]);function xn(e){return Zg.has(On(e))}function ut(e){return tt(e).getComputedStyle(e)}function oo(e){return lt(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Yt(e){if(On(e)==="html")return e;const t=e.assignedSlot||e.parentNode||ri(e)&&e.host||wt(e);return ri(t)?t.host:t}function Ac(e){const t=Yt(e);return xn(t)?e.ownerDocument?e.ownerDocument.body:e.body:yt(t)&&or(t)?t:Ac(t)}function Vn(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Ac(e),a=o===((r=e.ownerDocument)==null?void 0:r.body),i=tt(o);if(a){const s=pa(i);return t.concat(i,i.visualViewport||[],or(o)?o:[],s&&n?Vn(s):[])}return t.concat(o,Vn(o,[],n))}function pa(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function Ic(e){const t=ut(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=yt(e),a=o?e.offsetWidth:n,i=o?e.offsetHeight:r,s=Wr(n)!==a||Wr(r)!==i;return s&&(n=a,r=i),{width:n,height:r,$:s}}function Ga(e){return lt(e)?e:e.contextElement}function yn(e){const t=Ga(e);if(!yt(t))return bt(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:a}=Ic(t);let i=(a?Wr(n.width):n.width)/r,s=(a?Wr(n.height):n.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!s||!Number.isFinite(s))&&(s=1),{x:i,y:s}}const Qg=bt(0);function jc(e){const t=tt(e);return!Ua()||!t.visualViewport?Qg:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Jg(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==tt(e)?!1:t}function en(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),a=Ga(e);let i=bt(1);t&&(r?lt(r)&&(i=yn(r)):i=yn(e));const s=Jg(a,n,r)?jc(a):bt(0);let c=(o.left+s.x)/i.x,u=(o.top+s.y)/i.y,f=o.width/i.x,l=o.height/i.y;if(a){const p=tt(a),h=r&&lt(r)?tt(r):r;let b=p,g=pa(b);for(;g&&r&&h!==b;){const v=yn(g),w=g.getBoundingClientRect(),y=ut(g),E=w.left+(g.clientLeft+parseFloat(y.paddingLeft))*v.x,M=w.top+(g.clientTop+parseFloat(y.paddingTop))*v.y;c*=v.x,u*=v.y,f*=v.x,l*=v.y,c+=E,u+=M,b=tt(g),g=pa(b)}}return Yr({width:f,height:l,x:c,y:u})}function ao(e,t){const n=oo(e).scrollLeft;return t?t.left+n:en(wt(e)).left+n}function $c(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-ao(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function ev(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const a=o==="fixed",i=wt(r),s=t?ro(t.floating):!1;if(r===i||s&&a)return n;let c={scrollLeft:0,scrollTop:0},u=bt(1);const f=bt(0),l=yt(r);if((l||!l&&!a)&&((On(r)!=="body"||or(i))&&(c=oo(r)),yt(r))){const h=en(r);u=yn(r),f.x=h.x+r.clientLeft,f.y=h.y+r.clientTop}const p=i&&!l&&!a?$c(i,c):bt(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-c.scrollLeft*u.x+f.x+p.x,y:n.y*u.y-c.scrollTop*u.y+f.y+p.y}}function tv(e){return Array.from(e.getClientRects())}function nv(e){const t=wt(e),n=oo(e),r=e.ownerDocument.body,o=et(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=et(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+ao(e);const s=-n.scrollTop;return ut(r).direction==="rtl"&&(i+=et(t.clientWidth,r.clientWidth)-o),{width:o,height:a,x:i,y:s}}const oi=25;function rv(e,t){const n=tt(e),r=wt(e),o=n.visualViewport;let a=r.clientWidth,i=r.clientHeight,s=0,c=0;if(o){a=o.width,i=o.height;const f=Ua();(!f||f&&t==="fixed")&&(s=o.offsetLeft,c=o.offsetTop)}const u=ao(r);if(u<=0){const f=r.ownerDocument,l=f.body,p=getComputedStyle(l),h=f.compatMode==="CSS1Compat"&&parseFloat(p.marginLeft)+parseFloat(p.marginRight)||0,b=Math.abs(r.clientWidth-l.clientWidth-h);b<=oi&&(a-=b)}else u<=oi&&(a+=u);return{width:a,height:i,x:s,y:c}}const ov=new Set(["absolute","fixed"]);function av(e,t){const n=en(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,a=yt(e)?yn(e):bt(1),i=e.clientWidth*a.x,s=e.clientHeight*a.y,c=o*a.x,u=r*a.y;return{width:i,height:s,x:c,y:u}}function ai(e,t,n){let r;if(t==="viewport")r=rv(e,n);else if(t==="document")r=nv(wt(e));else if(lt(t))r=av(t,n);else{const o=jc(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Yr(r)}function Lc(e,t){const n=Yt(e);return n===t||!lt(n)||xn(n)?!1:ut(n).position==="fixed"||Lc(n,t)}function sv(e,t){const n=t.get(e);if(n)return n;let r=Vn(e,[],!1).filter(s=>lt(s)&&On(s)!=="body"),o=null;const a=ut(e).position==="fixed";let i=a?Yt(e):e;for(;lt(i)&&!xn(i);){const s=ut(i),c=Ha(i);!c&&s.position==="fixed"&&(o=null),(a?!c&&!o:!c&&s.position==="static"&&!!o&&ov.has(o.position)||or(i)&&!c&&Lc(e,i))?r=r.filter(f=>f!==i):o=s,i=Yt(i)}return t.set(e,r),r}function iv(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[...n==="clippingAncestors"?ro(t)?[]:sv(t,this._c):[].concat(n),r],s=i[0],c=i.reduce((u,f)=>{const l=ai(t,f,o);return u.top=et(l.top,u.top),u.right=Bt(l.right,u.right),u.bottom=Bt(l.bottom,u.bottom),u.left=et(l.left,u.left),u},ai(t,s,o));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function cv(e){const{width:t,height:n}=Ic(e);return{width:t,height:n}}function lv(e,t,n){const r=yt(t),o=wt(t),a=n==="fixed",i=en(e,!0,a,t);let s={scrollLeft:0,scrollTop:0};const c=bt(0);function u(){c.x=ao(o)}if(r||!r&&!a)if((On(t)!=="body"||or(o))&&(s=oo(t)),r){const h=en(t,!0,a,t);c.x=h.x+t.clientLeft,c.y=h.y+t.clientTop}else o&&u();a&&!r&&o&&u();const f=o&&!r&&!a?$c(o,s):bt(0),l=i.left+s.scrollLeft-c.x-f.x,p=i.top+s.scrollTop-c.y-f.y;return{x:l,y:p,width:i.width,height:i.height}}function jo(e){return ut(e).position==="static"}function si(e,t){if(!yt(e)||ut(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return wt(e)===n&&(n=n.ownerDocument.body),n}function Fc(e,t){const n=tt(e);if(ro(e))return n;if(!yt(e)){let o=Yt(e);for(;o&&!xn(o);){if(lt(o)&&!jo(o))return o;o=Yt(o)}return n}let r=si(e,t);for(;r&&Ug(r)&&jo(r);)r=si(r,t);return r&&xn(r)&&jo(r)&&!Ha(r)?n:r||Xg(e)||n}const uv=async function(e){const t=this.getOffsetParent||Fc,n=this.getDimensions,r=await n(e.floating);return{reference:lv(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function dv(e){return ut(e).direction==="rtl"}const fv={convertOffsetParentRelativeRectToViewportRelativeRect:ev,getDocumentElement:wt,getClippingRect:iv,getOffsetParent:Fc,getElementRects:uv,getClientRects:tv,getDimensions:cv,getScale:yn,isElement:lt,isRTL:dv};function Wc(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function mv(e,t){let n=null,r;const o=wt(e);function a(){var s;clearTimeout(r),(s=n)==null||s.disconnect(),n=null}function i(s,c){s===void 0&&(s=!1),c===void 0&&(c=1),a();const u=e.getBoundingClientRect(),{left:f,top:l,width:p,height:h}=u;if(s||t(),!p||!h)return;const b=Sr(l),g=Sr(o.clientWidth-(f+p)),v=Sr(o.clientHeight-(l+h)),w=Sr(f),E={rootMargin:-b+"px "+-g+"px "+-v+"px "+-w+"px",threshold:et(0,Bt(1,c))||1};let M=!0;function C(R){const S=R[0].intersectionRatio;if(S!==c){if(!M)return i();S?i(!1,S):r=setTimeout(()=>{i(!1,1e-7)},1e3)}S===1&&!Wc(u,e.getBoundingClientRect())&&i(),M=!1}try{n=new IntersectionObserver(C,{...E,root:o.ownerDocument})}catch{n=new IntersectionObserver(C,E)}n.observe(e)}return i(!0),a}function pv(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:s=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,u=Ga(e),f=o||a?[...u?Vn(u):[],...Vn(t)]:[];f.forEach(w=>{o&&w.addEventListener("scroll",n,{passive:!0}),a&&w.addEventListener("resize",n)});const l=u&&s?mv(u,n):null;let p=-1,h=null;i&&(h=new ResizeObserver(w=>{let[y]=w;y&&y.target===u&&h&&(h.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var E;(E=h)==null||E.observe(t)})),n()}),u&&!c&&h.observe(u),h.observe(t));let b,g=c?en(e):null;c&&v();function v(){const w=en(e);g&&!Wc(g,w)&&n(),g=w,b=requestAnimationFrame(v)}return n(),()=>{var w;f.forEach(y=>{o&&y.removeEventListener("scroll",n),a&&y.removeEventListener("resize",n)}),l==null||l(),(w=h)==null||w.disconnect(),h=null,c&&cancelAnimationFrame(b)}}const hv=Fg,gv=Wg,vv=jg,bv=Yg,yv=$g,ii=Ig,wv=Bg,xv=(e,t,n)=>{const r=new Map,o={platform:fv,...n},a={...o.platform,_c:r};return Ag(e,t,{...o,platform:a})};var Sv=typeof document<"u",Ev=function(){},_r=Sv?x.useLayoutEffect:Ev;function zr(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(!zr(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)&&!zr(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function Bc(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function ci(e,t){const n=Bc(e);return Math.round(t*n)/n}function $o(e){const t=d.useRef(e);return _r(()=>{t.current=e}),t}function Cv(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:a,floating:i}={},transform:s=!0,whileElementsMounted:c,open:u}=e,[f,l]=d.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,h]=d.useState(r);zr(p,r)||h(r);const[b,g]=d.useState(null),[v,w]=d.useState(null),y=d.useCallback(N=>{N!==R.current&&(R.current=N,g(N))},[]),E=d.useCallback(N=>{N!==S.current&&(S.current=N,w(N))},[]),M=a||b,C=i||v,R=d.useRef(null),S=d.useRef(null),k=d.useRef(f),I=c!=null,A=$o(c),W=$o(o),G=$o(u),B=d.useCallback(()=>{if(!R.current||!S.current)return;const N={placement:t,strategy:n,middleware:p};W.current&&(N.platform=W.current),xv(R.current,S.current,N).then(P=>{const Y={...P,isPositioned:G.current!==!1};$.current&&!zr(k.current,Y)&&(k.current=Y,eo.flushSync(()=>{l(Y)}))})},[p,t,n,W,G]);_r(()=>{u===!1&&k.current.isPositioned&&(k.current.isPositioned=!1,l(N=>({...N,isPositioned:!1})))},[u]);const $=d.useRef(!1);_r(()=>($.current=!0,()=>{$.current=!1}),[]),_r(()=>{if(M&&(R.current=M),C&&(S.current=C),M&&C){if(A.current)return A.current(M,C,B);B()}},[M,C,B,A,I]);const O=d.useMemo(()=>({reference:R,floating:S,setReference:y,setFloating:E}),[y,E]),D=d.useMemo(()=>({reference:M,floating:C}),[M,C]),_=d.useMemo(()=>{const N={position:n,left:0,top:0};if(!D.floating)return N;const P=ci(D.floating,f.x),Y=ci(D.floating,f.y);return s?{...N,transform:"translate("+P+"px, "+Y+"px)",...Bc(D.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:P,top:Y}},[n,s,D.floating,f.x,f.y]);return d.useMemo(()=>({...f,update:B,refs:O,elements:D,floatingStyles:_}),[f,B,O,D,_])}const Dv=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?ii({element:r.current,padding:o}).fn(n):{}:r?ii({element:r,padding:o}).fn(n):{}}}},Mv=(e,t)=>({...hv(e),options:[e,t]}),Nv=(e,t)=>({...gv(e),options:[e,t]}),kv=(e,t)=>({...wv(e),options:[e,t]}),Rv=(e,t)=>({...vv(e),options:[e,t]}),Ov=(e,t)=>({...bv(e),options:[e,t]}),Tv=(e,t)=>({...yv(e),options:[e,t]}),Pv=(e,t)=>({...Dv(e),options:[e,t]});var _v="Arrow",Yc=d.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...a}=e;return m.jsx(J.svg,{...a,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:m.jsx("polygon",{points:"0,0 30,0 15,10"})})});Yc.displayName=_v;var Av=Yc;function qa(e){const[t,n]=d.useState(void 0);return Re(()=>{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 i,s;if("borderBoxSize"in a){const c=a.borderBoxSize,u=Array.isArray(c)?c[0]:c;i=u.inlineSize,s=u.blockSize}else i=e.offsetWidth,s=e.offsetHeight;n({width:i,height:s})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}var Va="Popper",[zc,Ht]=Ge(Va),[Iv,Hc]=zc(Va),Uc=e=>{const{__scopePopper:t,children:n}=e,[r,o]=d.useState(null);return m.jsx(Iv,{scope:t,anchor:r,onAnchorChange:o,children:n})};Uc.displayName=Va;var Gc="PopperAnchor",qc=d.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,a=Hc(Gc,n),i=d.useRef(null),s=fe(t,i);return d.useEffect(()=>{a.onAnchorChange((r==null?void 0:r.current)||i.current)}),r?null:m.jsx(J.div,{...o,ref:s})});qc.displayName=Gc;var Ka="PopperContent",[jv,$v]=zc(Ka),Vc=d.forwardRef((e,t)=>{var F,X,Z,Q,ee,ae;const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:a="center",alignOffset:i=0,arrowPadding:s=0,avoidCollisions:c=!0,collisionBoundary:u=[],collisionPadding:f=0,sticky:l="partial",hideWhenDetached:p=!1,updatePositionStrategy:h="optimized",onPlaced:b,...g}=e,v=Hc(Ka,n),[w,y]=d.useState(null),E=fe(t,be=>y(be)),[M,C]=d.useState(null),R=qa(M),S=(R==null?void 0:R.width)??0,k=(R==null?void 0:R.height)??0,I=r+(a!=="center"?"-"+a:""),A=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},W=Array.isArray(u)?u:[u],G=W.length>0,B={padding:A,boundary:W.filter(Fv),altBoundary:G},{refs:$,floatingStyles:O,placement:D,isPositioned:_,middlewareData:N}=Cv({strategy:"fixed",placement:I,whileElementsMounted:(...be)=>pv(...be,{animationFrame:h==="always"}),elements:{reference:v.anchor},middleware:[Mv({mainAxis:o+k,alignmentAxis:i}),c&&Nv({mainAxis:!0,crossAxis:!1,limiter:l==="partial"?kv():void 0,...B}),c&&Rv({...B}),Ov({...B,apply:({elements:be,rects:te,availableWidth:Te,availableHeight:$e})=>{const{width:Ce,height:Ve}=te.reference,De=be.floating.style;De.setProperty("--radix-popper-available-width",`${Te}px`),De.setProperty("--radix-popper-available-height",`${$e}px`),De.setProperty("--radix-popper-anchor-width",`${Ce}px`),De.setProperty("--radix-popper-anchor-height",`${Ve}px`)}}),M&&Pv({element:M,padding:s}),Wv({arrowWidth:S,arrowHeight:k}),p&&Tv({strategy:"referenceHidden",...B})]}),[P,Y]=Zc(D),H=je(b);Re(()=>{_&&(H==null||H())},[_,H]);const T=(F=N.arrow)==null?void 0:F.x,j=(X=N.arrow)==null?void 0:X.y,z=((Z=N.arrow)==null?void 0:Z.centerOffset)!==0,[U,q]=d.useState();return Re(()=>{w&&q(window.getComputedStyle(w).zIndex)},[w]),m.jsx("div",{ref:$.setFloating,"data-radix-popper-content-wrapper":"",style:{...O,transform:_?O.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:U,"--radix-popper-transform-origin":[(Q=N.transformOrigin)==null?void 0:Q.x,(ee=N.transformOrigin)==null?void 0:ee.y].join(" "),...((ae=N.hide)==null?void 0:ae.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:m.jsx(jv,{scope:n,placedSide:P,onArrowChange:C,arrowX:T,arrowY:j,shouldHideArrow:z,children:m.jsx(J.div,{"data-side":P,"data-align":Y,...g,ref:E,style:{...g.style,animation:_?void 0:"none"}})})})});Vc.displayName=Ka;var Kc="PopperArrow",Lv={top:"bottom",right:"left",bottom:"top",left:"right"},Xc=d.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,a=$v(Kc,r),i=Lv[a.placedSide];return m.jsx("span",{ref:a.onArrowChange,style:{position:"absolute",left:a.arrowX,top:a.arrowY,[i]: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:m.jsx(Av,{...o,ref:n,style:{...o.style,display:"block"}})})});Xc.displayName=Kc;function Fv(e){return e!==null}var Wv=e=>({name:"transformOrigin",options:e,fn(t){var v,w,y;const{placement:n,rects:r,middlewareData:o}=t,i=((v=o.arrow)==null?void 0:v.centerOffset)!==0,s=i?0:e.arrowWidth,c=i?0:e.arrowHeight,[u,f]=Zc(n),l={start:"0%",center:"50%",end:"100%"}[f],p=(((w=o.arrow)==null?void 0:w.x)??0)+s/2,h=(((y=o.arrow)==null?void 0:y.y)??0)+c/2;let b="",g="";return u==="bottom"?(b=i?l:`${p}px`,g=`${-c}px`):u==="top"?(b=i?l:`${p}px`,g=`${r.floating.height+c}px`):u==="right"?(b=`${-c}px`,g=i?l:`${h}px`):u==="left"&&(b=`${r.floating.width+c}px`,g=i?l:`${h}px`),{data:{x:b,y:g}}}});function Zc(e){const[t,n="center"]=e.split("-");return[t,n]}var ar=Uc,sr=qc,so=Vc,io=Xc,Bv="Portal",ir=d.forwardRef((e,t)=>{var s;const{container:n,...r}=e,[o,a]=d.useState(!1);Re(()=>a(!0),[]);const i=n||o&&((s=globalThis==null?void 0:globalThis.document)==null?void 0:s.body);return i?Jr.createPortal(m.jsx(J.div,{...r,ref:t}),i):null});ir.displayName=Bv;function Yv(e,t){return d.useReducer((n,r)=>t[n][r]??n,e)}var at=e=>{const{present:t,children:n}=e,r=zv(t),o=typeof n=="function"?n({present:r.isPresent}):d.Children.only(n),a=fe(r.ref,Hv(o));return typeof n=="function"||r.isPresent?d.cloneElement(o,{ref:a}):null};at.displayName="Presence";function zv(e){const[t,n]=d.useState(),r=d.useRef(null),o=d.useRef(e),a=d.useRef("none"),i=e?"mounted":"unmounted",[s,c]=Yv(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return d.useEffect(()=>{const u=Er(r.current);a.current=s==="mounted"?u:"none"},[s]),Re(()=>{const u=r.current,f=o.current;if(f!==e){const p=a.current,h=Er(u);e?c("MOUNT"):h==="none"||(u==null?void 0:u.display)==="none"?c("UNMOUNT"):c(f&&p!==h?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,c]),Re(()=>{if(t){let u;const f=t.ownerDocument.defaultView??window,l=h=>{const g=Er(r.current).includes(h.animationName);if(h.target===t&&g&&(c("ANIMATION_END"),!o.current)){const v=t.style.animationFillMode;t.style.animationFillMode="forwards",u=f.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=v)})}},p=h=>{h.target===t&&(a.current=Er(r.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",l),t.addEventListener("animationend",l),()=>{f.clearTimeout(u),t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",l),t.removeEventListener("animationend",l)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:d.useCallback(u=>{r.current=u?getComputedStyle(u):null,n(u)},[])}}function Er(e){return(e==null?void 0:e.animationName)||"none"}function Hv(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 Uv=d[" useInsertionEffect ".trim().toString()]||Re;function ot({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,a,i]=Gv({defaultProp:t,onChange:n}),s=e!==void 0,c=s?e:o;{const f=d.useRef(e!==void 0);d.useEffect(()=>{const l=f.current;l!==s&&console.warn(`${r} is changing from ${l?"controlled":"uncontrolled"} to ${s?"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.`),f.current=s},[s,r])}const u=d.useCallback(f=>{var l;if(s){const p=qv(f)?f(e):f;p!==e&&((l=i.current)==null||l.call(i,p))}else a(f)},[s,e,a,i]);return[c,u]}function Gv({defaultProp:e,onChange:t}){const[n,r]=d.useState(e),o=d.useRef(n),a=d.useRef(t);return Uv(()=>{a.current=t},[t]),d.useEffect(()=>{var i;o.current!==n&&((i=a.current)==null||i.call(a,n),o.current=n)},[n,o]),[n,r,a]}function qv(e){return typeof e=="function"}var Vv=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},mn=new WeakMap,Cr=new WeakMap,Dr={},Lo=0,Qc=function(e){return e&&(e.host||Qc(e.parentNode))},Kv=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=Qc(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})},Xv=function(e,t,n,r){var o=Kv(t,Array.isArray(e)?e:[e]);Dr[n]||(Dr[n]=new WeakMap);var a=Dr[n],i=[],s=new Set,c=new Set(o),u=function(l){!l||s.has(l)||(s.add(l),u(l.parentNode))};o.forEach(u);var f=function(l){!l||c.has(l)||Array.prototype.forEach.call(l.children,function(p){if(s.has(p))f(p);else try{var h=p.getAttribute(r),b=h!==null&&h!=="false",g=(mn.get(p)||0)+1,v=(a.get(p)||0)+1;mn.set(p,g),a.set(p,v),i.push(p),g===1&&b&&Cr.set(p,!0),v===1&&p.setAttribute(n,"true"),b||p.setAttribute(r,"true")}catch(w){console.error("aria-hidden: cannot operate on ",p,w)}})};return f(t),s.clear(),Lo++,function(){i.forEach(function(l){var p=mn.get(l)-1,h=a.get(l)-1;mn.set(l,p),a.set(l,h),p||(Cr.has(l)||l.removeAttribute(r),Cr.delete(l)),h||l.removeAttribute(n)}),Lo--,Lo||(mn=new WeakMap,mn=new WeakMap,Cr=new WeakMap,Dr={})}},co=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=Vv(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),Xv(r,o,n,"aria-hidden")):function(){return null}},ht=function(){return ht=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},ht.apply(this,arguments)};function Jc(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 Zv(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 Ar="right-scroll-bar-position",Ir="width-before-scroll-bar",Qv="with-scroll-bars-hidden",Jv="--removed-body-scroll-bar-size";function Fo(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function eb(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 tb=typeof window<"u"?d.useLayoutEffect:d.useEffect,li=new WeakMap;function nb(e,t){var n=eb(null,function(r){return e.forEach(function(o){return Fo(o,r)})});return tb(function(){var r=li.get(n);if(r){var o=new Set(r),a=new Set(e),i=n.current;o.forEach(function(s){a.has(s)||Fo(s,null)}),a.forEach(function(s){o.has(s)||Fo(s,i)})}li.set(n,e)},[e]),n}function rb(e){return e}function ob(e,t){t===void 0&&(t=rb);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 i=t(a,r);return n.push(i),function(){n=n.filter(function(s){return s!==i})}},assignSyncMedium:function(a){for(r=!0;n.length;){var i=n;n=[],i.forEach(a)}n={push:function(s){return a(s)},filter:function(){return n}}},assignMedium:function(a){r=!0;var i=[];if(n.length){var s=n;n=[],s.forEach(a),i=n}var c=function(){var f=i;i=[],f.forEach(a)},u=function(){return Promise.resolve().then(c)};u(),n={push:function(f){i.push(f),u()},filter:function(f){return i=i.filter(f),n}}}};return o}function ab(e){e===void 0&&(e={});var t=ob(null);return t.options=ht({async:!0,ssr:!1},e),t}var el=function(e){var t=e.sideCar,n=Jc(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 d.createElement(r,ht({},n))};el.isSideCarExport=!0;function sb(e,t){return e.useMedium(t),el}var tl=ab(),Wo=function(){},lo=d.forwardRef(function(e,t){var n=d.useRef(null),r=d.useState({onScrollCapture:Wo,onWheelCapture:Wo,onTouchMoveCapture:Wo}),o=r[0],a=r[1],i=e.forwardProps,s=e.children,c=e.className,u=e.removeScrollBar,f=e.enabled,l=e.shards,p=e.sideCar,h=e.noRelative,b=e.noIsolation,g=e.inert,v=e.allowPinchZoom,w=e.as,y=w===void 0?"div":w,E=e.gapMode,M=Jc(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),C=p,R=nb([n,t]),S=ht(ht({},M),o);return d.createElement(d.Fragment,null,f&&d.createElement(C,{sideCar:tl,removeScrollBar:u,shards:l,noRelative:h,noIsolation:b,inert:g,setCallbacks:a,allowPinchZoom:!!v,lockRef:n,gapMode:E}),i?d.cloneElement(d.Children.only(s),ht(ht({},S),{ref:R})):d.createElement(y,ht({},S,{className:c,ref:R}),s))});lo.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};lo.classNames={fullWidth:Ir,zeroRight:Ar};var ib=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function cb(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=ib();return t&&e.setAttribute("nonce",t),e}function lb(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function ub(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var db=function(){var e=0,t=null;return{add:function(n){e==0&&(t=cb())&&(lb(t,n),ub(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},fb=function(){var e=db();return function(t,n){d.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},nl=function(){var e=fb(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},mb={left:0,top:0,right:0,gap:0},Bo=function(e){return parseInt(e||"",10)||0},pb=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[Bo(n),Bo(r),Bo(o)]},hb=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return mb;var t=pb(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])}},gb=nl(),wn="data-scroll-locked",vb=function(e,t,n,r){var o=e.left,a=e.top,i=e.right,s=e.gap;return n===void 0&&(n="margin"),`
132
+ .`.concat(Qv,` {
133
133
  overflow: hidden `).concat(r,`;
134
134
  padding-right: `).concat(s,"px ").concat(r,`;
135
135
  }
@@ -146,56 +146,56 @@
146
146
  `),n==="padding"&&"padding-right: ".concat(s,"px ").concat(r,";")].filter(Boolean).join(""),`
147
147
  }
148
148
 
149
- .`).concat(Ir,` {
149
+ .`).concat(Ar,` {
150
150
  right: `).concat(s,"px ").concat(r,`;
151
151
  }
152
152
 
153
- .`).concat(jr,` {
153
+ .`).concat(Ir,` {
154
154
  margin-right: `).concat(s,"px ").concat(r,`;
155
155
  }
156
156
 
157
- .`).concat(Ir," .").concat(Ir,` {
157
+ .`).concat(Ar," .").concat(Ar,` {
158
158
  right: 0 `).concat(r,`;
159
159
  }
160
160
 
161
- .`).concat(jr," .").concat(jr,` {
161
+ .`).concat(Ir," .").concat(Ir,` {
162
162
  margin-right: 0 `).concat(r,`;
163
163
  }
164
164
 
165
165
  body[`).concat(wn,`] {
166
- `).concat(eb,": ").concat(s,`px;
166
+ `).concat(Jv,": ").concat(s,`px;
167
167
  }
168
- `)},ui=function(){var e=parseInt(document.body.getAttribute(wn)||"0",10);return isFinite(e)?e:0},yb=function(){d.useEffect(function(){return document.body.setAttribute(wn,(ui()+1).toString()),function(){var e=ui()-1;e<=0?document.body.removeAttribute(wn):document.body.setAttribute(wn,e.toString())}},[])},wb=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;yb();var a=d.useMemo(function(){return gb(o)},[o]);return d.createElement(vb,{styles:bb(a,!t,o,n?"":"!important")})},ha=!1;if(typeof window<"u")try{var Nr=Object.defineProperty({},"passive",{get:function(){return ha=!0,!0}});window.addEventListener("test",Nr,Nr),window.removeEventListener("test",Nr,Nr)}catch{ha=!1}var pn=ha?{passive:!1}:!1,xb=function(e){return e.tagName==="TEXTAREA"},ol=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!xb(e)&&n[t]==="visible")},Sb=function(e){return ol(e,"overflowY")},Eb=function(e){return ol(e,"overflowX")},di=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=al(e,r);if(o){var a=sl(e,r),i=a[1],s=a[2];if(i>s)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},Cb=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},Db=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},al=function(e,t){return e==="v"?Sb(t):Eb(t)},sl=function(e,t){return e==="v"?Cb(t):Db(t)},Mb=function(e,t){return e==="h"&&t==="rtl"?-1:1},Nb=function(e,t,n,r,o){var a=Mb(e,window.getComputedStyle(t).direction),i=a*r,s=n.target,c=t.contains(s),u=!1,f=i>0,l=0,p=0;do{if(!s)break;var h=sl(e,s),b=h[0],g=h[1],v=h[2],y=g-v-a*b;(b||y)&&al(e,s)&&(l+=y,p+=b);var w=s.parentNode;s=w&&w.nodeType===Node.DOCUMENT_FRAGMENT_NODE?w.host:w}while(!c&&s!==document.body||c&&(t.contains(s)||t===s));return(f&&Math.abs(l)<1||!f&&Math.abs(p)<1)&&(u=!0),u},kr=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},fi=function(e){return[e.deltaX,e.deltaY]},mi=function(e){return e&&"current"in e?e.current:e},kb=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Rb=function(e){return`
168
+ `)},ui=function(){var e=parseInt(document.body.getAttribute(wn)||"0",10);return isFinite(e)?e:0},bb=function(){d.useEffect(function(){return document.body.setAttribute(wn,(ui()+1).toString()),function(){var e=ui()-1;e<=0?document.body.removeAttribute(wn):document.body.setAttribute(wn,e.toString())}},[])},yb=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;bb();var a=d.useMemo(function(){return hb(o)},[o]);return d.createElement(gb,{styles:vb(a,!t,o,n?"":"!important")})},ha=!1;if(typeof window<"u")try{var Mr=Object.defineProperty({},"passive",{get:function(){return ha=!0,!0}});window.addEventListener("test",Mr,Mr),window.removeEventListener("test",Mr,Mr)}catch{ha=!1}var pn=ha?{passive:!1}:!1,wb=function(e){return e.tagName==="TEXTAREA"},rl=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!wb(e)&&n[t]==="visible")},xb=function(e){return rl(e,"overflowY")},Sb=function(e){return rl(e,"overflowX")},di=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=ol(e,r);if(o){var a=al(e,r),i=a[1],s=a[2];if(i>s)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},Eb=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},Cb=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},ol=function(e,t){return e==="v"?xb(t):Sb(t)},al=function(e,t){return e==="v"?Eb(t):Cb(t)},Db=function(e,t){return e==="h"&&t==="rtl"?-1:1},Mb=function(e,t,n,r,o){var a=Db(e,window.getComputedStyle(t).direction),i=a*r,s=n.target,c=t.contains(s),u=!1,f=i>0,l=0,p=0;do{if(!s)break;var h=al(e,s),b=h[0],g=h[1],v=h[2],w=g-v-a*b;(b||w)&&ol(e,s)&&(l+=w,p+=b);var y=s.parentNode;s=y&&y.nodeType===Node.DOCUMENT_FRAGMENT_NODE?y.host:y}while(!c&&s!==document.body||c&&(t.contains(s)||t===s));return(f&&Math.abs(l)<1||!f&&Math.abs(p)<1)&&(u=!0),u},Nr=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},fi=function(e){return[e.deltaX,e.deltaY]},mi=function(e){return e&&"current"in e?e.current:e},Nb=function(e,t){return e[0]===t[0]&&e[1]===t[1]},kb=function(e){return`
169
169
  .block-interactivity-`.concat(e,` {pointer-events: none;}
170
170
  .allow-interactivity-`).concat(e,` {pointer-events: all;}
171
- `)},Ob=0,hn=[];function Tb(e){var t=d.useRef([]),n=d.useRef([0,0]),r=d.useRef(),o=d.useState(Ob++)[0],a=d.useState(rl)[0],i=d.useRef(e);d.useEffect(function(){i.current=e},[e]),d.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var g=Qv([e.lockRef.current],(e.shards||[]).map(mi),!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 s=d.useCallback(function(g,v){if("touches"in g&&g.touches.length===2||g.type==="wheel"&&g.ctrlKey)return!i.current.allowPinchZoom;var y=kr(g),w=n.current,E="deltaX"in g?g.deltaX:w[0]-y[0],M="deltaY"in g?g.deltaY:w[1]-y[1],C,k=g.target,S=Math.abs(E)>Math.abs(M)?"h":"v";if("touches"in g&&S==="h"&&k.type==="range")return!1;var R=di(S,k);if(!R)return!0;if(R?C=S:(C=S==="v"?"h":"v",R=di(S,k)),!R)return!1;if(!r.current&&"changedTouches"in g&&(E||M)&&(r.current=C),!C)return!0;var A=r.current||C;return Nb(A,v,g,A==="h"?E:M)},[]),c=d.useCallback(function(g){var v=g;if(!(!hn.length||hn[hn.length-1]!==a)){var y="deltaY"in v?fi(v):kr(v),w=t.current.filter(function(C){return C.name===v.type&&(C.target===v.target||v.target===C.shadowParent)&&kb(C.delta,y)})[0];if(w&&w.should){v.cancelable&&v.preventDefault();return}if(!w){var E=(i.current.shards||[]).map(mi).filter(Boolean).filter(function(C){return C.contains(v.target)}),M=E.length>0?s(v,E[0]):!i.current.noIsolation;M&&v.cancelable&&v.preventDefault()}}},[]),u=d.useCallback(function(g,v,y,w){var E={name:g,delta:v,target:y,should:w,shadowParent:Pb(y)};t.current.push(E),setTimeout(function(){t.current=t.current.filter(function(M){return M!==E})},1)},[]),f=d.useCallback(function(g){n.current=kr(g),r.current=void 0},[]),l=d.useCallback(function(g){u(g.type,fi(g),g.target,s(g,e.lockRef.current))},[]),p=d.useCallback(function(g){u(g.type,kr(g),g.target,s(g,e.lockRef.current))},[]);d.useEffect(function(){return hn.push(a),e.setCallbacks({onScrollCapture:l,onWheelCapture:l,onTouchMoveCapture:p}),document.addEventListener("wheel",c,pn),document.addEventListener("touchmove",c,pn),document.addEventListener("touchstart",f,pn),function(){hn=hn.filter(function(g){return g!==a}),document.removeEventListener("wheel",c,pn),document.removeEventListener("touchmove",c,pn),document.removeEventListener("touchstart",f,pn)}},[]);var h=e.removeScrollBar,b=e.inert;return d.createElement(d.Fragment,null,b?d.createElement(a,{styles:Rb(o)}):null,h?d.createElement(wb,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Pb(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const _b=ib(nl,Tb);var lr=d.forwardRef(function(e,t){return d.createElement(lo,ht({},e,{ref:t,sideCar:_b}))});lr.classNames=lo.classNames;var uo="Popover",[il,xM]=Ge(uo,[Ht]),ur=Ht(),[Ab,Ut]=il(uo),cl=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:o,onOpenChange:a,modal:i=!1}=e,s=ur(t),c=d.useRef(null),[u,f]=d.useState(!1),[l,p]=ot({prop:r,defaultProp:o??!1,onChange:a,caller:uo});return m.jsx(sr,{...s,children:m.jsx(Ab,{scope:t,contentId:Pe(),triggerRef:c,open:l,onOpenChange:p,onOpenToggle:d.useCallback(()=>p(h=>!h),[p]),hasCustomAnchor:u,onCustomAnchorAdd:d.useCallback(()=>f(!0),[]),onCustomAnchorRemove:d.useCallback(()=>f(!1),[]),modal:i,children:n})})};cl.displayName=uo;var ll="PopoverAnchor",Ib=d.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=Ut(ll,n),a=ur(n),{onCustomAnchorAdd:i,onCustomAnchorRemove:s}=o;return d.useEffect(()=>(i(),()=>s()),[i,s]),m.jsx(ir,{...a,...r,ref:t})});Ib.displayName=ll;var ul="PopoverTrigger",dl=d.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=Ut(ul,n),a=ur(n),i=fe(t,o.triggerRef),s=m.jsx(J.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":gl(o.open),...r,ref:i,onClick:K(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?s:m.jsx(ir,{asChild:!0,...a,children:s})});dl.displayName=ul;var Xa="PopoverPortal",[jb,$b]=il(Xa,{forceMount:void 0}),fl=e=>{const{__scopePopover:t,forceMount:n,children:r,container:o}=e,a=Ut(Xa,t);return m.jsx(jb,{scope:t,forceMount:n,children:m.jsx(at,{present:n||a.open,children:m.jsx(cr,{asChild:!0,container:o,children:r})})})};fl.displayName=Xa;var Sn="PopoverContent",ml=d.forwardRef((e,t)=>{const n=$b(Sn,e.__scopePopover),{forceMount:r=n.forceMount,...o}=e,a=Ut(Sn,e.__scopePopover);return m.jsx(at,{present:r||a.open,children:a.modal?m.jsx(Fb,{...o,ref:t}):m.jsx(Wb,{...o,ref:t})})});ml.displayName=Sn;var Lb=Wt("PopoverContent.RemoveScroll"),Fb=d.forwardRef((e,t)=>{const n=Ut(Sn,e.__scopePopover),r=d.useRef(null),o=fe(t,r),a=d.useRef(!1);return d.useEffect(()=>{const i=r.current;if(i)return co(i)},[]),m.jsx(lr,{as:Lb,allowPinchZoom:!0,children:m.jsx(pl,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:K(e.onCloseAutoFocus,i=>{var s;i.preventDefault(),a.current||(s=n.triggerRef.current)==null||s.focus()}),onPointerDownOutside:K(e.onPointerDownOutside,i=>{const s=i.detail.originalEvent,c=s.button===0&&s.ctrlKey===!0,u=s.button===2||c;a.current=u},{checkForDefaultPrevented:!1}),onFocusOutside:K(e.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1})})})}),Wb=d.forwardRef((e,t)=>{const n=Ut(Sn,e.__scopePopover),r=d.useRef(!1),o=d.useRef(!1);return m.jsx(pl,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var i,s;(i=e.onCloseAutoFocus)==null||i.call(e,a),a.defaultPrevented||(r.current||(s=n.triggerRef.current)==null||s.focus(),a.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:a=>{var c,u;(c=e.onInteractOutside)==null||c.call(e,a),a.defaultPrevented||(r.current=!0,a.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const i=a.target;((u=n.triggerRef.current)==null?void 0:u.contains(i))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&o.current&&a.preventDefault()}})}),pl=d.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:a,disableOutsidePointerEvents:i,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:u,onInteractOutside:f,...l}=e,p=Ut(Sn,n),h=ur(n);return Wa(),m.jsx(or,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:a,children:m.jsx(Rc,{asChild:!0,disableOutsidePointerEvents:i,onInteractOutside:f,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:u,onDismiss:()=>p.onOpenChange(!1),children:m.jsx(so,{"data-state":gl(p.open),role:"dialog",id:p.contentId,...h,...l,ref:t,style:{...l.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)"}})})})}),hl="PopoverClose",Bb=d.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=Ut(hl,n);return m.jsx(J.button,{type:"button",...r,ref:t,onClick:K(e.onClick,()=>o.onOpenChange(!1))})});Bb.displayName=hl;var Yb="PopoverArrow",zb=d.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=ur(n);return m.jsx(io,{...o,...r,ref:t})});zb.displayName=Yb;function gl(e){return e?"open":"closed"}var Hb=cl,Ub=dl,Gb=fl,vl=ml;const Za=Hb,Qa=Ub,fo=d.forwardRef(({className:e,sideOffset:t=4,...n},r)=>m.jsx(Gb,{children:m.jsx(vl,{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})}));fo.displayName=vl.displayName;function pi(e,[t,n]){return Math.min(n,Math.max(t,e))}function Ja(e){const t=e+"CollectionProvider",[n,r]=Ge(t),[o,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),i=g=>{const{scope:v,children:y}=g,w=x.useRef(null),E=x.useRef(new Map).current;return m.jsx(o,{scope:v,itemMap:E,collectionRef:w,children:y})};i.displayName=t;const s=e+"CollectionSlot",c=Wt(s),u=x.forwardRef((g,v)=>{const{scope:y,children:w}=g,E=a(s,y),M=fe(v,E.collectionRef);return m.jsx(c,{ref:M,children:w})});u.displayName=s;const f=e+"CollectionItemSlot",l="data-radix-collection-item",p=Wt(f),h=x.forwardRef((g,v)=>{const{scope:y,children:w,...E}=g,M=x.useRef(null),C=fe(v,M),k=a(f,y);return x.useEffect(()=>(k.itemMap.set(M,{ref:M,...E}),()=>void k.itemMap.delete(M))),m.jsx(p,{[l]:"",ref:C,children:w})});h.displayName=f;function b(g){const v=a(e+"CollectionConsumer",g);return x.useCallback(()=>{const w=v.collectionRef.current;if(!w)return[];const E=Array.from(w.querySelectorAll(`[${l}]`));return Array.from(v.itemMap.values()).sort((k,S)=>E.indexOf(k.ref.current)-E.indexOf(S.ref.current))},[v.collectionRef,v.itemMap])}return[{Provider:i,Slot:u,ItemSlot:h},b,r]}var qb=d.createContext(void 0);function dr(e){const t=d.useContext(qb);return e||t||"ltr"}var Vb="DismissableLayer",ga="dismissableLayer.update",Kb="dismissableLayer.pointerDownOutside",Xb="dismissableLayer.focusOutside",hi,bl=d.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),yl=d.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:i,onDismiss:s,...c}=e,u=d.useContext(bl),[f,l]=d.useState(null),p=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,h]=d.useState({}),b=fe(t,S=>l(S)),g=Array.from(u.layers),[v]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),y=g.indexOf(v),w=f?g.indexOf(f):-1,E=u.layersWithOutsidePointerEventsDisabled.size>0,M=w>=y,C=Jb(S=>{const R=S.target,A=[...u.branches].some(I=>I.contains(R));!M||A||(o==null||o(S),i==null||i(S),S.defaultPrevented||s==null||s())},p),k=ey(S=>{const R=S.target;[...u.branches].some(I=>I.contains(R))||(a==null||a(S),i==null||i(S),S.defaultPrevented||s==null||s())},p);return rr(S=>{w===u.layers.size-1&&(r==null||r(S),!S.defaultPrevented&&s&&(S.preventDefault(),s()))},p),d.useEffect(()=>{if(f)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(hi=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(f)),u.layers.add(f),gi(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=hi)}},[f,p,n,u]),d.useEffect(()=>()=>{f&&(u.layers.delete(f),u.layersWithOutsidePointerEventsDisabled.delete(f),gi())},[f,u]),d.useEffect(()=>{const S=()=>h({});return document.addEventListener(ga,S),()=>document.removeEventListener(ga,S)},[]),m.jsx(J.div,{...c,ref:b,style:{pointerEvents:E?M?"auto":"none":void 0,...e.style},onFocusCapture:K(e.onFocusCapture,k.onFocusCapture),onBlurCapture:K(e.onBlurCapture,k.onBlurCapture),onPointerDownCapture:K(e.onPointerDownCapture,C.onPointerDownCapture)})});yl.displayName=Vb;var Zb="DismissableLayerBranch",Qb=d.forwardRef((e,t)=>{const n=d.useContext(bl),r=d.useRef(null),o=fe(t,r);return d.useEffect(()=>{const a=r.current;if(a)return n.branches.add(a),()=>{n.branches.delete(a)}},[n.branches]),m.jsx(J.div,{...e,ref:o})});Qb.displayName=Zb;function Jb(e,t=globalThis==null?void 0:globalThis.document){const n=je(e),r=d.useRef(!1),o=d.useRef(()=>{});return d.useEffect(()=>{const a=s=>{if(s.target&&!r.current){let c=function(){wl(Kb,n,u,{discrete:!0})};const u={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=c,t.addEventListener("click",o.current,{once:!0})):c()}else t.removeEventListener("click",o.current);r.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",a),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function ey(e,t=globalThis==null?void 0:globalThis.document){const n=je(e),r=d.useRef(!1);return d.useEffect(()=>{const o=a=>{a.target&&!r.current&&wl(Xb,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 gi(){const e=new CustomEvent(ga);document.dispatchEvent(e)}function wl(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?kn(o,a):o.dispatchEvent(a)}function es(e){const t=d.useRef({value:e,previous:e});return d.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var xl=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"}),ty="VisuallyHidden",Sl=d.forwardRef((e,t)=>m.jsx(J.span,{...e,ref:t,style:{...xl,...e.style}}));Sl.displayName=ty;var ny=Sl,ry=[" ","Enter","ArrowUp","ArrowDown"],oy=[" ","Enter"],tn="Select",[mo,po,ay]=Ja(tn),[Tn,SM]=Ge(tn,[ay,Ht]),ho=Ht(),[sy,Gt]=Tn(tn),[iy,cy]=Tn(tn),El=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:a,value:i,defaultValue:s,onValueChange:c,dir:u,name:f,autoComplete:l,disabled:p,required:h,form:b}=e,g=ho(t),[v,y]=d.useState(null),[w,E]=d.useState(null),[M,C]=d.useState(!1),k=dr(u),[S,R]=ot({prop:r,defaultProp:o??!1,onChange:a,caller:tn}),[A,I]=ot({prop:i,defaultProp:s,onChange:c,caller:tn}),L=d.useRef(null),V=v?b||!!v.closest("form"):!0,[B,$]=d.useState(new Set),_=Array.from(B).map(N=>N.props.value).join(";");return m.jsx(sr,{...g,children:m.jsxs(sy,{required:h,scope:t,trigger:v,onTriggerChange:y,valueNode:w,onValueNodeChange:E,valueNodeHasChildren:M,onValueNodeHasChildrenChange:C,contentId:Pe(),value:A,onValueChange:I,open:S,onOpenChange:R,dir:k,triggerPointerDownPosRef:L,disabled:p,children:[m.jsx(mo.Provider,{scope:t,children:m.jsx(iy,{scope:e.__scopeSelect,onNativeOptionAdd:d.useCallback(N=>{$(O=>new Set(O).add(N))},[]),onNativeOptionRemove:d.useCallback(N=>{$(O=>{const D=new Set(O);return D.delete(N),D})},[]),children:n})}),V?m.jsxs(ql,{"aria-hidden":!0,required:h,tabIndex:-1,name:f,autoComplete:l,value:A,onChange:N=>I(N.target.value),disabled:p,form:b,children:[A===void 0?m.jsx("option",{value:""}):null,Array.from(B)]},_):null]})})};El.displayName=tn;var Cl="SelectTrigger",Dl=d.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,a=ho(n),i=Gt(Cl,n),s=i.disabled||r,c=fe(t,i.onTriggerChange),u=po(n),f=d.useRef("touch"),[l,p,h]=Kl(g=>{const v=u().filter(E=>!E.disabled),y=v.find(E=>E.value===i.value),w=Xl(v,g,y);w!==void 0&&i.onValueChange(w.value)}),b=g=>{s||(i.onOpenChange(!0),h()),g&&(i.triggerPointerDownPosRef.current={x:Math.round(g.pageX),y:Math.round(g.pageY)})};return m.jsx(ir,{asChild:!0,...a,children:m.jsx(J.button,{type:"button",role:"combobox","aria-controls":i.contentId,"aria-expanded":i.open,"aria-required":i.required,"aria-autocomplete":"none",dir:i.dir,"data-state":i.open?"open":"closed",disabled:s,"data-disabled":s?"":void 0,"data-placeholder":Vl(i.value)?"":void 0,...o,ref:c,onClick:K(o.onClick,g=>{g.currentTarget.focus(),f.current!=="mouse"&&b(g)}),onPointerDown:K(o.onPointerDown,g=>{f.current=g.pointerType;const v=g.target;v.hasPointerCapture(g.pointerId)&&v.releasePointerCapture(g.pointerId),g.button===0&&g.ctrlKey===!1&&g.pointerType==="mouse"&&(b(g),g.preventDefault())}),onKeyDown:K(o.onKeyDown,g=>{const v=l.current!=="";!(g.ctrlKey||g.altKey||g.metaKey)&&g.key.length===1&&p(g.key),!(v&&g.key===" ")&&ry.includes(g.key)&&(b(),g.preventDefault())})})})});Dl.displayName=Cl;var Ml="SelectValue",Nl=d.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:a,placeholder:i="",...s}=e,c=Gt(Ml,n),{onValueNodeHasChildrenChange:u}=c,f=a!==void 0,l=fe(t,c.onValueNodeChange);return Re(()=>{u(f)},[u,f]),m.jsx(J.span,{...s,ref:l,style:{pointerEvents:"none"},children:Vl(c.value)?m.jsx(m.Fragment,{children:i}):a})});Nl.displayName=Ml;var ly="SelectIcon",kl=d.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return m.jsx(J.span,{"aria-hidden":!0,...o,ref:t,children:r||"▼"})});kl.displayName=ly;var uy="SelectPortal",Rl=e=>m.jsx(cr,{asChild:!0,...e});Rl.displayName=uy;var nn="SelectContent",Ol=d.forwardRef((e,t)=>{const n=Gt(nn,e.__scopeSelect),[r,o]=d.useState();if(Re(()=>{o(new DocumentFragment)},[]),!n.open){const a=r;return a?eo.createPortal(m.jsx(Tl,{scope:e.__scopeSelect,children:m.jsx(mo.Slot,{scope:e.__scopeSelect,children:m.jsx("div",{children:e.children})})}),a):null}return m.jsx(Pl,{...e,ref:t})});Ol.displayName=nn;var it=10,[Tl,qt]=Tn(nn),dy="SelectContentImpl",fy=Wt("SelectContent.RemoveScroll"),Pl=d.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:a,onPointerDownOutside:i,side:s,sideOffset:c,align:u,alignOffset:f,arrowPadding:l,collisionBoundary:p,collisionPadding:h,sticky:b,hideWhenDetached:g,avoidCollisions:v,...y}=e,w=Gt(nn,n),[E,M]=d.useState(null),[C,k]=d.useState(null),S=fe(t,W=>M(W)),[R,A]=d.useState(null),[I,L]=d.useState(null),V=po(n),[B,$]=d.useState(!1),_=d.useRef(!1);d.useEffect(()=>{if(E)return co(E)},[E]),Wa();const N=d.useCallback(W=>{const[X,...Z]=V().map(ae=>ae.ref.current),[Q]=Z.slice(-1),ee=document.activeElement;for(const ae of W)if(ae===ee||(ae==null||ae.scrollIntoView({block:"nearest"}),ae===X&&C&&(C.scrollTop=0),ae===Q&&C&&(C.scrollTop=C.scrollHeight),ae==null||ae.focus(),document.activeElement!==ee))return},[V,C]),O=d.useCallback(()=>N([R,E]),[N,R,E]);d.useEffect(()=>{B&&O()},[B,O]);const{onOpenChange:D,triggerPointerDownPosRef:P}=w;d.useEffect(()=>{if(E){let W={x:0,y:0};const X=Q=>{var ee,ae;W={x:Math.abs(Math.round(Q.pageX)-(((ee=P.current)==null?void 0:ee.x)??0)),y:Math.abs(Math.round(Q.pageY)-(((ae=P.current)==null?void 0:ae.y)??0))}},Z=Q=>{W.x<=10&&W.y<=10?Q.preventDefault():E.contains(Q.target)||D(!1),document.removeEventListener("pointermove",X),P.current=null};return P.current!==null&&(document.addEventListener("pointermove",X),document.addEventListener("pointerup",Z,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",X),document.removeEventListener("pointerup",Z,{capture:!0})}}},[E,D,P]),d.useEffect(()=>{const W=()=>D(!1);return window.addEventListener("blur",W),window.addEventListener("resize",W),()=>{window.removeEventListener("blur",W),window.removeEventListener("resize",W)}},[D]);const[Y,H]=Kl(W=>{const X=V().filter(ee=>!ee.disabled),Z=X.find(ee=>ee.ref.current===document.activeElement),Q=Xl(X,W,Z);Q&&setTimeout(()=>Q.ref.current.focus())}),T=d.useCallback((W,X,Z)=>{const Q=!_.current&&!Z;(w.value!==void 0&&w.value===X||Q)&&(A(W),Q&&(_.current=!0))},[w.value]),j=d.useCallback(()=>E==null?void 0:E.focus(),[E]),z=d.useCallback((W,X,Z)=>{const Q=!_.current&&!Z;(w.value!==void 0&&w.value===X||Q)&&L(W)},[w.value]),U=r==="popper"?va:_l,G=U===va?{side:s,sideOffset:c,align:u,alignOffset:f,arrowPadding:l,collisionBoundary:p,collisionPadding:h,sticky:b,hideWhenDetached:g,avoidCollisions:v}:{};return m.jsx(Tl,{scope:n,content:E,viewport:C,onViewportChange:k,itemRefCallback:T,selectedItem:R,onItemLeave:j,itemTextRefCallback:z,focusSelectedItem:O,selectedItemText:I,position:r,isPositioned:B,searchRef:Y,children:m.jsx(lr,{as:fy,allowPinchZoom:!0,children:m.jsx(or,{asChild:!0,trapped:w.open,onMountAutoFocus:W=>{W.preventDefault()},onUnmountAutoFocus:K(o,W=>{var X;(X=w.trigger)==null||X.focus({preventScroll:!0}),W.preventDefault()}),children:m.jsx(yl,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:i,onFocusOutside:W=>W.preventDefault(),onDismiss:()=>w.onOpenChange(!1),children:m.jsx(U,{role:"listbox",id:w.contentId,"data-state":w.open?"open":"closed",dir:w.dir,onContextMenu:W=>W.preventDefault(),...y,...G,onPlaced:()=>$(!0),ref:S,style:{display:"flex",flexDirection:"column",outline:"none",...y.style},onKeyDown:K(y.onKeyDown,W=>{const X=W.ctrlKey||W.altKey||W.metaKey;if(W.key==="Tab"&&W.preventDefault(),!X&&W.key.length===1&&H(W.key),["ArrowUp","ArrowDown","Home","End"].includes(W.key)){let Q=V().filter(ee=>!ee.disabled).map(ee=>ee.ref.current);if(["ArrowUp","End"].includes(W.key)&&(Q=Q.slice().reverse()),["ArrowUp","ArrowDown"].includes(W.key)){const ee=W.target,ae=Q.indexOf(ee);Q=Q.slice(ae+1)}setTimeout(()=>N(Q)),W.preventDefault()}})})})})})})});Pl.displayName=dy;var my="SelectItemAlignedPosition",_l=d.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,a=Gt(nn,n),i=qt(nn,n),[s,c]=d.useState(null),[u,f]=d.useState(null),l=fe(t,S=>f(S)),p=po(n),h=d.useRef(!1),b=d.useRef(!0),{viewport:g,selectedItem:v,selectedItemText:y,focusSelectedItem:w}=i,E=d.useCallback(()=>{if(a.trigger&&a.valueNode&&s&&u&&g&&v&&y){const S=a.trigger.getBoundingClientRect(),R=u.getBoundingClientRect(),A=a.valueNode.getBoundingClientRect(),I=y.getBoundingClientRect();if(a.dir!=="rtl"){const ee=I.left-R.left,ae=A.left-ee,be=S.left-ae,te=S.width+be,Te=Math.max(te,R.width),$e=window.innerWidth-it,Ce=pi(ae,[it,Math.max(it,$e-Te)]);s.style.minWidth=te+"px",s.style.left=Ce+"px"}else{const ee=R.right-I.right,ae=window.innerWidth-A.right-ee,be=window.innerWidth-S.right-ae,te=S.width+be,Te=Math.max(te,R.width),$e=window.innerWidth-it,Ce=pi(ae,[it,Math.max(it,$e-Te)]);s.style.minWidth=te+"px",s.style.right=Ce+"px"}const L=p(),V=window.innerHeight-it*2,B=g.scrollHeight,$=window.getComputedStyle(u),_=parseInt($.borderTopWidth,10),N=parseInt($.paddingTop,10),O=parseInt($.borderBottomWidth,10),D=parseInt($.paddingBottom,10),P=_+N+B+D+O,Y=Math.min(v.offsetHeight*5,P),H=window.getComputedStyle(g),T=parseInt(H.paddingTop,10),j=parseInt(H.paddingBottom,10),z=S.top+S.height/2-it,U=V-z,G=v.offsetHeight/2,W=v.offsetTop+G,X=_+N+W,Z=P-X;if(X<=z){const ee=L.length>0&&v===L[L.length-1].ref.current;s.style.bottom="0px";const ae=u.clientHeight-g.offsetTop-g.offsetHeight,be=Math.max(U,G+(ee?j:0)+ae+O),te=X+be;s.style.height=te+"px"}else{const ee=L.length>0&&v===L[0].ref.current;s.style.top="0px";const be=Math.max(z,_+g.offsetTop+(ee?T:0)+G)+Z;s.style.height=be+"px",g.scrollTop=X-z+g.offsetTop}s.style.margin=`${it}px 0`,s.style.minHeight=Y+"px",s.style.maxHeight=V+"px",r==null||r(),requestAnimationFrame(()=>h.current=!0)}},[p,a.trigger,a.valueNode,s,u,g,v,y,a.dir,r]);Re(()=>E(),[E]);const[M,C]=d.useState();Re(()=>{u&&C(window.getComputedStyle(u).zIndex)},[u]);const k=d.useCallback(S=>{S&&b.current===!0&&(E(),w==null||w(),b.current=!1)},[E,w]);return m.jsx(hy,{scope:n,contentWrapper:s,shouldExpandOnScrollRef:h,onScrollButtonChange:k,children:m.jsx("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:M},children:m.jsx(J.div,{...o,ref:l,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});_l.displayName=my;var py="SelectPopperPosition",va=d.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=it,...a}=e,i=ho(n);return m.jsx(so,{...i,...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)"}})});va.displayName=py;var[hy,ts]=Tn(nn,{}),ba="SelectViewport",Al=d.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...o}=e,a=qt(ba,n),i=ts(ba,n),s=fe(t,a.onViewportChange),c=d.useRef(0);return m.jsxs(m.Fragment,{children:[m.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}),m.jsx(mo.Slot,{scope:n,children:m.jsx(J.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:s,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:K(o.onScroll,u=>{const f=u.currentTarget,{contentWrapper:l,shouldExpandOnScrollRef:p}=i;if(p!=null&&p.current&&l){const h=Math.abs(c.current-f.scrollTop);if(h>0){const b=window.innerHeight-it*2,g=parseFloat(l.style.minHeight),v=parseFloat(l.style.height),y=Math.max(g,v);if(y<b){const w=y+h,E=Math.min(b,w),M=w-E;l.style.height=E+"px",l.style.bottom==="0px"&&(f.scrollTop=M>0?M:0,l.style.justifyContent="flex-end")}}}c.current=f.scrollTop})})})]})});Al.displayName=ba;var Il="SelectGroup",[gy,vy]=Tn(Il),by=d.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Pe();return m.jsx(gy,{scope:n,id:o,children:m.jsx(J.div,{role:"group","aria-labelledby":o,...r,ref:t})})});by.displayName=Il;var jl="SelectLabel",$l=d.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=vy(jl,n);return m.jsx(J.div,{id:o.id,...r,ref:t})});$l.displayName=jl;var Ur="SelectItem",[yy,Ll]=Tn(Ur),Fl=d.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:a,...i}=e,s=Gt(Ur,n),c=qt(Ur,n),u=s.value===r,[f,l]=d.useState(a??""),[p,h]=d.useState(!1),b=fe(t,w=>{var E;return(E=c.itemRefCallback)==null?void 0:E.call(c,w,r,o)}),g=Pe(),v=d.useRef("touch"),y=()=>{o||(s.onValueChange(r),s.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 m.jsx(yy,{scope:n,value:r,disabled:o,textId:g,isSelected:u,onItemTextChange:d.useCallback(w=>{l(E=>E||((w==null?void 0:w.textContent)??"").trim())},[]),children:m.jsx(mo.ItemSlot,{scope:n,value:r,disabled:o,textValue:f,children:m.jsx(J.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,...i,ref:b,onFocus:K(i.onFocus,()=>h(!0)),onBlur:K(i.onBlur,()=>h(!1)),onClick:K(i.onClick,()=>{v.current!=="mouse"&&y()}),onPointerUp:K(i.onPointerUp,()=>{v.current==="mouse"&&y()}),onPointerDown:K(i.onPointerDown,w=>{v.current=w.pointerType}),onPointerMove:K(i.onPointerMove,w=>{var E;v.current=w.pointerType,o?(E=c.onItemLeave)==null||E.call(c):v.current==="mouse"&&w.currentTarget.focus({preventScroll:!0})}),onPointerLeave:K(i.onPointerLeave,w=>{var E;w.currentTarget===document.activeElement&&((E=c.onItemLeave)==null||E.call(c))}),onKeyDown:K(i.onKeyDown,w=>{var M;((M=c.searchRef)==null?void 0:M.current)!==""&&w.key===" "||(oy.includes(w.key)&&y(),w.key===" "&&w.preventDefault())})})})})});Fl.displayName=Ur;var Yn="SelectItemText",Wl=d.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,...a}=e,i=Gt(Yn,n),s=qt(Yn,n),c=Ll(Yn,n),u=cy(Yn,n),[f,l]=d.useState(null),p=fe(t,y=>l(y),c.onItemTextChange,y=>{var w;return(w=s.itemTextRefCallback)==null?void 0:w.call(s,y,c.value,c.disabled)}),h=f==null?void 0:f.textContent,b=d.useMemo(()=>m.jsx("option",{value:c.value,disabled:c.disabled,children:h},c.value),[c.disabled,c.value,h]),{onNativeOptionAdd:g,onNativeOptionRemove:v}=u;return Re(()=>(g(b),()=>v(b)),[g,v,b]),m.jsxs(m.Fragment,{children:[m.jsx(J.span,{id:c.textId,...a,ref:p}),c.isSelected&&i.valueNode&&!i.valueNodeHasChildren?eo.createPortal(a.children,i.valueNode):null]})});Wl.displayName=Yn;var Bl="SelectItemIndicator",Yl=d.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return Ll(Bl,n).isSelected?m.jsx(J.span,{"aria-hidden":!0,...r,ref:t}):null});Yl.displayName=Bl;var ya="SelectScrollUpButton",zl=d.forwardRef((e,t)=>{const n=qt(ya,e.__scopeSelect),r=ts(ya,e.__scopeSelect),[o,a]=d.useState(!1),i=fe(t,r.onScrollButtonChange);return Re(()=>{if(n.viewport&&n.isPositioned){let s=function(){const u=c.scrollTop>0;a(u)};const c=n.viewport;return s(),c.addEventListener("scroll",s),()=>c.removeEventListener("scroll",s)}},[n.viewport,n.isPositioned]),o?m.jsx(Ul,{...e,ref:i,onAutoScroll:()=>{const{viewport:s,selectedItem:c}=n;s&&c&&(s.scrollTop=s.scrollTop-c.offsetHeight)}}):null});zl.displayName=ya;var wa="SelectScrollDownButton",Hl=d.forwardRef((e,t)=>{const n=qt(wa,e.__scopeSelect),r=ts(wa,e.__scopeSelect),[o,a]=d.useState(!1),i=fe(t,r.onScrollButtonChange);return Re(()=>{if(n.viewport&&n.isPositioned){let s=function(){const u=c.scrollHeight-c.clientHeight,f=Math.ceil(c.scrollTop)<u;a(f)};const c=n.viewport;return s(),c.addEventListener("scroll",s),()=>c.removeEventListener("scroll",s)}},[n.viewport,n.isPositioned]),o?m.jsx(Ul,{...e,ref:i,onAutoScroll:()=>{const{viewport:s,selectedItem:c}=n;s&&c&&(s.scrollTop=s.scrollTop+c.offsetHeight)}}):null});Hl.displayName=wa;var Ul=d.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,a=qt("SelectScrollButton",n),i=d.useRef(null),s=po(n),c=d.useCallback(()=>{i.current!==null&&(window.clearInterval(i.current),i.current=null)},[]);return d.useEffect(()=>()=>c(),[c]),Re(()=>{var f;const u=s().find(l=>l.ref.current===document.activeElement);(f=u==null?void 0:u.ref.current)==null||f.scrollIntoView({block:"nearest"})},[s]),m.jsx(J.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:K(o.onPointerDown,()=>{i.current===null&&(i.current=window.setInterval(r,50))}),onPointerMove:K(o.onPointerMove,()=>{var u;(u=a.onItemLeave)==null||u.call(a),i.current===null&&(i.current=window.setInterval(r,50))}),onPointerLeave:K(o.onPointerLeave,()=>{c()})})}),wy="SelectSeparator",Gl=d.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return m.jsx(J.div,{"aria-hidden":!0,...r,ref:t})});Gl.displayName=wy;var xa="SelectArrow",xy=d.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=ho(n),a=Gt(xa,n),i=qt(xa,n);return a.open&&i.position==="popper"?m.jsx(io,{...o,...r,ref:t}):null});xy.displayName=xa;var Sy="SelectBubbleInput",ql=d.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const o=d.useRef(null),a=fe(r,o),i=es(t);return d.useEffect(()=>{const s=o.current;if(!s)return;const c=window.HTMLSelectElement.prototype,f=Object.getOwnPropertyDescriptor(c,"value").set;if(i!==t&&f){const l=new Event("change",{bubbles:!0});f.call(s,t),s.dispatchEvent(l)}},[i,t]),m.jsx(J.select,{...n,style:{...xl,...n.style},ref:a,defaultValue:t})});ql.displayName=Sy;function Vl(e){return e===""||e===void 0}function Kl(e){const t=je(e),n=d.useRef(""),r=d.useRef(0),o=d.useCallback(i=>{const s=n.current+i;t(s),function c(u){n.current=u,window.clearTimeout(r.current),u!==""&&(r.current=window.setTimeout(()=>c(""),1e3))}(s)},[t]),a=d.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return d.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,o,a]}function Xl(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 i=Ey(e,Math.max(a,0));o.length===1&&(i=i.filter(u=>u!==n));const c=i.find(u=>u.textValue.toLowerCase().startsWith(o.toLowerCase()));return c!==n?c:void 0}function Ey(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var Cy=El,Zl=Dl,Dy=Nl,My=kl,Ny=Rl,Ql=Ol,ky=Al,Jl=$l,eu=Fl,Ry=Wl,Oy=Yl,tu=zl,nu=Hl,ru=Gl;const Sa=Cy,Ea=Dy,Gr=d.forwardRef(({className:e,children:t,...n},r)=>m.jsxs(Zl,{ref:r,className:F("flex h-10 w-full items-center justify-between rounded-md border border-gray-300 bg-background px-3 py-2 text-sm ring-offset-background data-[placeholder]:text-muted-foreground focus:outline-none disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...n,children:[t,m.jsx(My,{asChild:!0,children:m.jsx(nr,{strokeWidth:1.5,className:"h-4 w-4 text-foreground"})})]}));Gr.displayName=Zl.displayName;const ou=d.forwardRef(({className:e,...t},n)=>m.jsx(tu,{ref:n,className:F("flex cursor-default items-center justify-center py-1",e),...t,children:m.jsx(_h,{className:"h-4 w-4"})}));ou.displayName=tu.displayName;const au=d.forwardRef(({className:e,...t},n)=>m.jsx(nu,{ref:n,className:F("flex cursor-default items-center justify-center py-1",e),...t,children:m.jsx(nr,{className:"h-4 w-4"})}));au.displayName=nu.displayName;const qr=d.forwardRef(({className:e,children:t,position:n="popper",...r},o)=>m.jsx(Ny,{children:m.jsxs(Ql,{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:[m.jsx(ou,{}),m.jsx(ky,{className:F("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),m.jsx(au,{})]})}));qr.displayName=Ql.displayName;const Ty=d.forwardRef(({className:e,...t},n)=>m.jsx(Jl,{ref:n,className:F("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}));Ty.displayName=Jl.displayName;const Vr=d.forwardRef(({className:e,children:t,...n},r)=>m.jsxs(eu,{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:[m.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:m.jsx(Oy,{children:m.jsx(tr,{className:"h-4 w-4"})})}),m.jsx(Ry,{children:t})]}));Vr.displayName=eu.displayName;const Py=d.forwardRef(({className:e,...t},n)=>m.jsx(ru,{ref:n,className:F("-mx-1 my-1 h-px bg-muted",e),...t}));Py.displayName=ru.displayName;const Yo={},zn={};function Un(e,t){try{const r=(Yo[e]||(Yo[e]=new Intl.DateTimeFormat("en-GB",{timeZone:e,hour:"numeric",timeZoneName:"longOffset"}).format))(t).split("GMT")[1]||"";return r in zn?zn[r]:vi(r,r.split(":"))}catch{if(e in zn)return zn[e];const n=e==null?void 0:e.match(_y);return n?vi(e,n.slice(1)):NaN}}const _y=/([+-]\d\d):?(\d\d)?/;function vi(e,t){const n=+t[0],r=+(t[1]||0);return zn[e]=n>0?n*60+r:n*60-r}class vt 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)),su(this),Ca(this)):this.setTime(Date.now())}static tz(t,...n){return n.length?new vt(...n,t):new vt(Date.now(),t)}withTimeZone(t){return new vt(+this,t)}getTimezoneOffset(){return-Un(this.timeZone,this)}setTime(t){return Date.prototype.setTime.apply(this,arguments),Ca(this),+this}[Symbol.for("constructDateFrom")](t){return new vt(+new Date(t),this.timeZone)}}const bi=/^(get|set)(?!UTC)/;Object.getOwnPropertyNames(Date.prototype).forEach(e=>{if(!bi.test(e))return;const t=e.replace(bi,"$1UTC");vt.prototype[t]&&(e.startsWith("get")?vt.prototype[e]=function(){return this.internal[t]()}:(vt.prototype[e]=function(){return Date.prototype[t].apply(this.internal,arguments),Ay(this),+this},vt.prototype[t]=function(){return Date.prototype[t].apply(this,arguments),Ca(this),+this}))});function Ca(e){e.internal.setTime(+e),e.internal.setUTCMinutes(e.internal.getUTCMinutes()-e.getTimezoneOffset())}function Ay(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()),su(e)}function su(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,i=Date.prototype.getHours.apply(e)!==e.internal.getUTCHours();a&&i&&e.internal.setUTCMinutes(e.internal.getUTCMinutes()+a);const s=r-t;s&&Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+s);const c=Un(e.timeZone,e),f=-new Date(+e).getTimezoneOffset()-c,l=c!==t,p=f-s;if(l&&p){Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+p);const h=Un(e.timeZone,e),b=c-h;b&&(e.internal.setUTCMinutes(e.internal.getUTCMinutes()+b),Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+b))}}class Ue extends vt{static tz(t,...n){return n.length?new Ue(...n,t):new Ue(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} (${Iy(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 Ue(+this,t)}[Symbol.for("constructDateFrom")](t){return new Ue(+new Date(t),this.timeZone)}}function Iy(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 ke;(function(e){e.disabled="disabled",e.hidden="hidden",e.outside="outside",e.focused="focused",e.today="today"})(ke||(ke={}));var ct;(function(e){e.range_end="range_end",e.range_middle="range_middle",e.range_start="range_start",e.selected="selected"})(ct||(ct={}));var Je;(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"})(Je||(Je={}));const iu=6048e5,jy=864e5,yi=Symbol.for("constructDateFrom");function We(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&yi in e?e[yi](t):e instanceof Date?new e.constructor(t):new Date(t)}function Se(e,t){return We(t||e,e)}function cu(e,t,n){const r=Se(e,n==null?void 0:n.in);return isNaN(t)?We(e,NaN):(t&&r.setDate(r.getDate()+t),r)}function lu(e,t,n){const r=Se(e,n==null?void 0:n.in);if(isNaN(t))return We(e,NaN);if(!t)return r;const o=r.getDate(),a=We(e,r.getTime());a.setMonth(r.getMonth()+t+1,0);const i=a.getDate();return o>=i?a:(r.setFullYear(a.getFullYear(),a.getMonth(),o),r)}let $y={};function fr(){return $y}function En(e,t){var s,c,u,f;const n=fr(),r=(t==null?void 0:t.weekStartsOn)??((c=(s=t==null?void 0:t.locale)==null?void 0:s.options)==null?void 0:c.weekStartsOn)??n.weekStartsOn??((f=(u=n.locale)==null?void 0:u.options)==null?void 0:f.weekStartsOn)??0,o=Se(e,t==null?void 0:t.in),a=o.getDay(),i=(a<r?7:0)+a-r;return o.setDate(o.getDate()-i),o.setHours(0,0,0,0),o}function Kn(e,t){return En(e,{...t,weekStartsOn:1})}function uu(e,t){const n=Se(e,t==null?void 0:t.in),r=n.getFullYear(),o=We(n,0);o.setFullYear(r+1,0,4),o.setHours(0,0,0,0);const a=Kn(o),i=We(n,0);i.setFullYear(r,0,4),i.setHours(0,0,0,0);const s=Kn(i);return n.getTime()>=a.getTime()?r+1:n.getTime()>=s.getTime()?r:r-1}function wi(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 Pn(e,...t){const n=We.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 du(e,t,n){const[r,o]=Pn(n==null?void 0:n.in,e,t),a=Xn(r),i=Xn(o),s=+a-wi(a),c=+i-wi(i);return Math.round((s-c)/jy)}function Ly(e,t){const n=uu(e,t),r=We(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),Kn(r)}function Fy(e,t,n){return cu(e,t*7,n)}function Wy(e,t,n){return lu(e,t*12,n)}function By(e,t){let n,r=t==null?void 0:t.in;return e.forEach(o=>{!r&&typeof o=="object"&&(r=We.bind(null,o));const a=Se(o,r);(!n||n<a||isNaN(+a))&&(n=a)}),We(r,n||NaN)}function Yy(e,t){let n,r=t==null?void 0:t.in;return e.forEach(o=>{!r&&typeof o=="object"&&(r=We.bind(null,o));const a=Se(o,r);(!n||n>a||isNaN(+a))&&(n=a)}),We(r,n||NaN)}function zy(e,t,n){const[r,o]=Pn(n==null?void 0:n.in,e,t);return+Xn(r)==+Xn(o)}function fu(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function Hy(e){return!(!fu(e)&&typeof e!="number"||isNaN(+Se(e)))}function Uy(e,t,n){const[r,o]=Pn(n==null?void 0:n.in,e,t),a=r.getFullYear()-o.getFullYear(),i=r.getMonth()-o.getMonth();return a*12+i}function Gy(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 qy(e,t){const[n,r]=Pn(e,t.start,t.end);return{start:n,end:r}}function Vy(e,t){const{start:n,end:r}=qy(t==null?void 0:t.in,e);let o=+n>+r;const a=o?+n:+r,i=o?r:n;i.setHours(0,0,0,0),i.setDate(1);let s=1;const c=[];for(;+i<=a;)c.push(We(n,i)),i.setMonth(i.getMonth()+s);return o?c.reverse():c}function Ky(e,t){const n=Se(e,t==null?void 0:t.in);return n.setDate(1),n.setHours(0,0,0,0),n}function Xy(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 mu(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 pu(e,t){var s,c,u,f;const n=fr(),r=(t==null?void 0:t.weekStartsOn)??((c=(s=t==null?void 0:t.locale)==null?void 0:s.options)==null?void 0:c.weekStartsOn)??n.weekStartsOn??((f=(u=n.locale)==null?void 0:u.options)==null?void 0:f.weekStartsOn)??0,o=Se(e,t==null?void 0:t.in),a=o.getDay(),i=(a<r?-7:0)+6-(a-r);return o.setDate(o.getDate()+i),o.setHours(23,59,59,999),o}function Zy(e,t){return pu(e,{...t,weekStartsOn:1})}const Qy={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"}},Jy=(e,t,n)=>{let r;const o=Qy[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 zo(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const ew={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},tw={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},nw={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},rw={date:zo({formats:ew,defaultWidth:"full"}),time:zo({formats:tw,defaultWidth:"full"}),dateTime:zo({formats:nw,defaultWidth:"full"})},ow={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},aw=(e,t,n,r)=>ow[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 i=e.defaultFormattingWidth||e.defaultWidth,s=n!=null&&n.width?String(n.width):i;o=e.formattingValues[s]||e.formattingValues[i]}else{const i=e.defaultWidth,s=n!=null&&n.width?String(n.width):e.defaultWidth;o=e.values[s]||e.values[i]}const a=e.argumentCallback?e.argumentCallback(t):t;return o[a]}}const sw={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},iw={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},cw={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"]},lw={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"]},uw={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"}},dw={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"}},fw=(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"},mw={ordinalNumber:fw,era:$n({values:sw,defaultWidth:"wide"}),quarter:$n({values:iw,defaultWidth:"wide",argumentCallback:e=>e-1}),month:$n({values:cw,defaultWidth:"wide"}),day:$n({values:lw,defaultWidth:"wide"}),dayPeriod:$n({values:uw,defaultWidth:"wide",formattingValues:dw,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 i=a[0],s=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(s)?hw(s,l=>l.test(i)):pw(s,l=>l.test(i));let u;u=e.valueCallback?e.valueCallback(c):c,u=n.valueCallback?n.valueCallback(u):u;const f=t.slice(i.length);return{value:u,rest:f}}}function pw(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function hw(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function gw(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 i=e.valueCallback?e.valueCallback(a[0]):a[0];i=n.valueCallback?n.valueCallback(i):i;const s=t.slice(o.length);return{value:i,rest:s}}}const vw=/^(\d+)(th|st|nd|rd)?/i,bw=/\d+/i,yw={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},ww={any:[/^b/i,/^(a|c)/i]},xw={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Sw={any:[/1/i,/2/i,/3/i,/4/i]},Ew={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},Cw={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]},Dw={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},Mw={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]},Nw={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},kw={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}},Rw={ordinalNumber:gw({matchPattern:vw,parsePattern:bw,valueCallback:e=>parseInt(e,10)}),era:Ln({matchPatterns:yw,defaultMatchWidth:"wide",parsePatterns:ww,defaultParseWidth:"any"}),quarter:Ln({matchPatterns:xw,defaultMatchWidth:"wide",parsePatterns:Sw,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Ln({matchPatterns:Ew,defaultMatchWidth:"wide",parsePatterns:Cw,defaultParseWidth:"any"}),day:Ln({matchPatterns:Dw,defaultMatchWidth:"wide",parsePatterns:Mw,defaultParseWidth:"any"}),dayPeriod:Ln({matchPatterns:Nw,defaultMatchWidth:"any",parsePatterns:kw,defaultParseWidth:"any"})},ns={code:"en-US",formatDistance:Jy,formatLong:rw,formatRelative:aw,localize:mw,match:Rw,options:{weekStartsOn:0,firstWeekContainsDate:1}};function Ow(e,t){const n=Se(e,t==null?void 0:t.in);return du(n,mu(n))+1}function hu(e,t){const n=Se(e,t==null?void 0:t.in),r=+Kn(n)-+Ly(n);return Math.round(r/iu)+1}function gu(e,t){var f,l,p,h;const n=Se(e,t==null?void 0:t.in),r=n.getFullYear(),o=fr(),a=(t==null?void 0:t.firstWeekContainsDate)??((l=(f=t==null?void 0:t.locale)==null?void 0:f.options)==null?void 0:l.firstWeekContainsDate)??o.firstWeekContainsDate??((h=(p=o.locale)==null?void 0:p.options)==null?void 0:h.firstWeekContainsDate)??1,i=We((t==null?void 0:t.in)||e,0);i.setFullYear(r+1,0,a),i.setHours(0,0,0,0);const s=En(i,t),c=We((t==null?void 0:t.in)||e,0);c.setFullYear(r,0,a),c.setHours(0,0,0,0);const u=En(c,t);return+n>=+s?r+1:+n>=+u?r:r-1}function Tw(e,t){var s,c,u,f;const n=fr(),r=(t==null?void 0:t.firstWeekContainsDate)??((c=(s=t==null?void 0:t.locale)==null?void 0:s.options)==null?void 0:c.firstWeekContainsDate)??n.firstWeekContainsDate??((f=(u=n.locale)==null?void 0:u.options)==null?void 0:f.firstWeekContainsDate)??1,o=gu(e,t),a=We((t==null?void 0:t.in)||e,0);return a.setFullYear(o,0,r),a.setHours(0,0,0,0),En(a,t)}function vu(e,t){const n=Se(e,t==null?void 0:t.in),r=+En(n,t)-+Tw(n,t);return Math.round(r/iu)+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)}},gn={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},xi={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=gu(e,r),a=o>0?o:1-o;if(t==="YY"){const i=a%100;return we(i,2)}return t==="Yo"?n.ordinalNumber(a,{unit:"year"}):we(a,t.length)},R:function(e,t){const n=uu(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=vu(e,r);return t==="wo"?n.ordinalNumber(o,{unit:"week"}):we(o,t.length)},I:function(e,t,n){const r=hu(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=Ow(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=gn.noon:r===0?o=gn.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=gn.evening:r>=12?o=gn.afternoon:r>=4?o=gn.morning:o=gn.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 Ei(r);case"XXXX":case"XX":return Jt(r);case"XXXXX":case"XXX":default:return Jt(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return Ei(r);case"xxxx":case"xx":return Jt(r);case"xxxxx":case"xxx":default:return Jt(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Si(r,":");case"OOOO":default:return"GMT"+Jt(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Si(r,":");case"zzzz":default:return"GMT"+Jt(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 Si(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 Ei(e,t){return e%60===0?(e>0?"-":"+")+we(Math.abs(e)/60,2):Jt(e,t)}function Jt(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 Ci=(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"})}},bu=(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"})}},Pw=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return Ci(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}}",Ci(r,t)).replace("{{time}}",bu(o,t))},_w={p:bu,P:Pw},Aw=/^D+$/,Iw=/^Y+$/,jw=["D","DD","YY","YYYY"];function $w(e){return Aw.test(e)}function Lw(e){return Iw.test(e)}function Fw(e,t,n){const r=Ww(e,t,n);if(console.warn(r),jw.includes(e))throw new RangeError(r)}function Ww(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 Bw=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Yw=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,zw=/^'([^]*?)'?$/,Hw=/''/g,Uw=/[a-zA-Z]/;function Gw(e,t,n){var f,l,p,h,b,g,v,y;const r=fr(),o=(n==null?void 0:n.locale)??r.locale??ns,a=(n==null?void 0:n.firstWeekContainsDate)??((l=(f=n==null?void 0:n.locale)==null?void 0:f.options)==null?void 0:l.firstWeekContainsDate)??r.firstWeekContainsDate??((h=(p=r.locale)==null?void 0:p.options)==null?void 0:h.firstWeekContainsDate)??1,i=(n==null?void 0:n.weekStartsOn)??((g=(b=n==null?void 0:n.locale)==null?void 0:b.options)==null?void 0:g.weekStartsOn)??r.weekStartsOn??((y=(v=r.locale)==null?void 0:v.options)==null?void 0:y.weekStartsOn)??0,s=Se(e,n==null?void 0:n.in);if(!Hy(s))throw new RangeError("Invalid time value");let c=t.match(Yw).map(w=>{const E=w[0];if(E==="p"||E==="P"){const M=_w[E];return M(w,o.formatLong)}return w}).join("").match(Bw).map(w=>{if(w==="''")return{isToken:!1,value:"'"};const E=w[0];if(E==="'")return{isToken:!1,value:qw(w)};if(xi[E])return{isToken:!0,value:w};if(E.match(Uw))throw new RangeError("Format string contains an unescaped latin alphabet character `"+E+"`");return{isToken:!1,value:w}});o.localize.preprocessor&&(c=o.localize.preprocessor(s,c));const u={firstWeekContainsDate:a,weekStartsOn:i,locale:o};return c.map(w=>{if(!w.isToken)return w.value;const E=w.value;(!(n!=null&&n.useAdditionalWeekYearTokens)&&Lw(E)||!(n!=null&&n.useAdditionalDayOfYearTokens)&&$w(E))&&Fw(E,t,String(e));const M=xi[E[0]];return M(s,E,o.localize,u)}).join("")}function qw(e){const t=e.match(zw);return t?t[1].replace(Hw,"'"):e}function Vw(e,t){const n=Se(e,t==null?void 0:t.in),r=n.getFullYear(),o=n.getMonth(),a=We(n,0);return a.setFullYear(r,o+1,0),a.setHours(0,0,0,0),a.getDate()}function Kw(e,t){return Se(e,t==null?void 0:t.in).getMonth()}function Xw(e,t){return Se(e,t==null?void 0:t.in).getFullYear()}function Zw(e,t){return+Se(e)>+Se(t)}function Qw(e,t){return+Se(e)<+Se(t)}function Jw(e,t,n){const[r,o]=Pn(n==null?void 0:n.in,e,t);return r.getFullYear()===o.getFullYear()&&r.getMonth()===o.getMonth()}function ex(e,t,n){const[r,o]=Pn(n==null?void 0:n.in,e,t);return r.getFullYear()===o.getFullYear()}function tx(e,t,n){const r=Se(e,n==null?void 0:n.in),o=r.getFullYear(),a=r.getDate(),i=We(e,0);i.setFullYear(o,t,15),i.setHours(0,0,0,0);const s=Vw(i);return r.setMonth(t,Math.min(a,s)),r}function nx(e,t,n){const r=Se(e,n==null?void 0:n.in);return isNaN(+r)?We(e,NaN):(r.setFullYear(t),r)}const Di=5,rx=4;function ox(e,t){const n=t.startOfMonth(e),r=n.getDay()>0?n.getDay():7,o=t.addDays(e,-r+1),a=t.addDays(o,Di*7-1);return t.getMonth(e)===t.getMonth(a)?Di:rx}function yu(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 ax(e,t){const n=yu(e,t),r=ox(e,t);return t.addDays(n,r*7-1)}class Tt{constructor(t,n){this.Date=Date,this.today=()=>{var r;return(r=this.overrides)!=null&&r.today?this.overrides.today():this.options.timeZone?Ue.tz(this.options.timeZone):new this.Date},this.newDate=(r,o,a)=>{var i;return(i=this.overrides)!=null&&i.newDate?this.overrides.newDate(r,o,a):this.options.timeZone?new Ue(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):cu(r,o)},this.addMonths=(r,o)=>{var a;return(a=this.overrides)!=null&&a.addMonths?this.overrides.addMonths(r,o):lu(r,o)},this.addWeeks=(r,o)=>{var a;return(a=this.overrides)!=null&&a.addWeeks?this.overrides.addWeeks(r,o):Fy(r,o)},this.addYears=(r,o)=>{var a;return(a=this.overrides)!=null&&a.addYears?this.overrides.addYears(r,o):Wy(r,o)},this.differenceInCalendarDays=(r,o)=>{var a;return(a=this.overrides)!=null&&a.differenceInCalendarDays?this.overrides.differenceInCalendarDays(r,o):du(r,o)},this.differenceInCalendarMonths=(r,o)=>{var a;return(a=this.overrides)!=null&&a.differenceInCalendarMonths?this.overrides.differenceInCalendarMonths(r,o):Uy(r,o)},this.eachMonthOfInterval=r=>{var o;return(o=this.overrides)!=null&&o.eachMonthOfInterval?this.overrides.eachMonthOfInterval(r):Vy(r)},this.endOfBroadcastWeek=r=>{var o;return(o=this.overrides)!=null&&o.endOfBroadcastWeek?this.overrides.endOfBroadcastWeek(r):ax(r,this)},this.endOfISOWeek=r=>{var o;return(o=this.overrides)!=null&&o.endOfISOWeek?this.overrides.endOfISOWeek(r):Zy(r)},this.endOfMonth=r=>{var o;return(o=this.overrides)!=null&&o.endOfMonth?this.overrides.endOfMonth(r):Gy(r)},this.endOfWeek=(r,o)=>{var a;return(a=this.overrides)!=null&&a.endOfWeek?this.overrides.endOfWeek(r,o):pu(r,this.options)},this.endOfYear=r=>{var o;return(o=this.overrides)!=null&&o.endOfYear?this.overrides.endOfYear(r):Xy(r)},this.format=(r,o,a)=>{var s;const i=(s=this.overrides)!=null&&s.format?this.overrides.format(r,o,this.options):Gw(r,o,this.options);return this.options.numerals&&this.options.numerals!=="latn"?this.replaceDigits(i):i},this.getISOWeek=r=>{var o;return(o=this.overrides)!=null&&o.getISOWeek?this.overrides.getISOWeek(r):hu(r)},this.getMonth=(r,o)=>{var a;return(a=this.overrides)!=null&&a.getMonth?this.overrides.getMonth(r,this.options):Kw(r,this.options)},this.getYear=(r,o)=>{var a;return(a=this.overrides)!=null&&a.getYear?this.overrides.getYear(r,this.options):Xw(r,this.options)},this.getWeek=(r,o)=>{var a;return(a=this.overrides)!=null&&a.getWeek?this.overrides.getWeek(r,this.options):vu(r,this.options)},this.isAfter=(r,o)=>{var a;return(a=this.overrides)!=null&&a.isAfter?this.overrides.isAfter(r,o):Zw(r,o)},this.isBefore=(r,o)=>{var a;return(a=this.overrides)!=null&&a.isBefore?this.overrides.isBefore(r,o):Qw(r,o)},this.isDate=r=>{var o;return(o=this.overrides)!=null&&o.isDate?this.overrides.isDate(r):fu(r)},this.isSameDay=(r,o)=>{var a;return(a=this.overrides)!=null&&a.isSameDay?this.overrides.isSameDay(r,o):zy(r,o)},this.isSameMonth=(r,o)=>{var a;return(a=this.overrides)!=null&&a.isSameMonth?this.overrides.isSameMonth(r,o):Jw(r,o)},this.isSameYear=(r,o)=>{var a;return(a=this.overrides)!=null&&a.isSameYear?this.overrides.isSameYear(r,o):ex(r,o)},this.max=r=>{var o;return(o=this.overrides)!=null&&o.max?this.overrides.max(r):By(r)},this.min=r=>{var o;return(o=this.overrides)!=null&&o.min?this.overrides.min(r):Yy(r)},this.setMonth=(r,o)=>{var a;return(a=this.overrides)!=null&&a.setMonth?this.overrides.setMonth(r,o):tx(r,o)},this.setYear=(r,o)=>{var a;return(a=this.overrides)!=null&&a.setYear?this.overrides.setYear(r,o):nx(r,o)},this.startOfBroadcastWeek=(r,o)=>{var a;return(a=this.overrides)!=null&&a.startOfBroadcastWeek?this.overrides.startOfBroadcastWeek(r,this):yu(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):Ky(r)},this.startOfWeek=(r,o)=>{var a;return(a=this.overrides)!=null&&a.startOfWeek?this.overrides.startOfWeek(r,this.options):En(r,this.options)},this.startOfYear=r=>{var o;return(o=this.overrides)!=null&&o.startOfYear?this.overrides.startOfYear(r):mu(r)},this.options={locale:ns,...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 xt=new Tt;class wu{constructor(t,n,r=xt){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 sx{constructor(t,n){this.date=t,this.weeks=n}}class ix{constructor(t,n){this.days=n,this.weekNumber=t}}function Ct(e,t,n=!1,r=xt){let{from:o,to:a}=e;const{differenceInCalendarDays:i,isSameDay:s}=r;return o&&a?(i(a,o)<0&&([o,a]=[a,o]),i(t,o)>=(n?1:0)&&i(a,t)>=(n?1:0)):!n&&a?s(a,t):!n&&o?s(o,t):!1}function xu(e){return!!(e&&typeof e=="object"&&"before"in e&&"after"in e)}function rs(e){return!!(e&&typeof e=="object"&&"from"in e)}function Su(e){return!!(e&&typeof e=="object"&&"after"in e)}function Eu(e){return!!(e&&typeof e=="object"&&"before"in e)}function Cu(e){return!!(e&&typeof e=="object"&&"dayOfWeek"in e)}function Du(e,t){return Array.isArray(e)&&e.every(t.isDate)}function Dt(e,t,n=xt){const r=Array.isArray(t)?t:[t],{isSameDay:o,differenceInCalendarDays:a,isAfter:i}=n;return r.some(s=>{if(typeof s=="boolean")return s;if(n.isDate(s))return o(e,s);if(Du(s,n))return s.includes(e);if(rs(s))return Ct(s,e,!1,n);if(Cu(s))return Array.isArray(s.dayOfWeek)?s.dayOfWeek.includes(e.getDay()):s.dayOfWeek===e.getDay();if(xu(s)){const c=a(s.before,e),u=a(s.after,e),f=c>0,l=u<0;return i(s.before,s.after)?l&&f:f||l}return Su(s)?a(e,s.after)>0:Eu(s)?a(s.before,e)>0:typeof s=="function"?s(e):!1})}function cx(e,t,n,r,o){const{disabled:a,hidden:i,modifiers:s,showOutsideDays:c,broadcastCalendar:u,today:f}=t,{isSameDay:l,isSameMonth:p,startOfMonth:h,isBefore:b,endOfMonth:g,isAfter:v}=o,y=n&&h(n),w=r&&g(r),E={[ke.focused]:[],[ke.outside]:[],[ke.disabled]:[],[ke.hidden]:[],[ke.today]:[]},M={};for(const C of e){const{date:k,displayMonth:S}=C,R=!!(S&&!p(k,S)),A=!!(y&&b(k,y)),I=!!(w&&v(k,w)),L=!!(a&&Dt(k,a,o)),V=!!(i&&Dt(k,i,o))||A||I||!u&&!c&&R||u&&c===!1&&R,B=l(k,f??o.today());R&&E.outside.push(C),L&&E.disabled.push(C),V&&E.hidden.push(C),B&&E.today.push(C),s&&Object.keys(s).forEach($=>{const _=s==null?void 0:s[$];_&&Dt(k,_,o)&&(M[$]?M[$].push(C):M[$]=[C])})}return C=>{const k={[ke.focused]:!1,[ke.disabled]:!1,[ke.hidden]:!1,[ke.outside]:!1,[ke.today]:!1},S={};for(const R in E){const A=E[R];k[R]=A.some(I=>I===C)}for(const R in M)S[R]=M[R].some(A=>A===C);return{...k,...S}}}function lx(e,t,n={}){return Object.entries(e).filter(([,o])=>o===!0).reduce((o,[a])=>(n[a]?o.push(n[a]):t[ke[a]]?o.push(t[ke[a]]):t[ct[a]]&&o.push(t[ct[a]]),o),[t[ce.Day]])}function ux(e){return x.createElement("button",{...e})}function dx(e){return x.createElement("span",{...e})}function fx(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 mx(e){const{day:t,modifiers:n,...r}=e;return x.createElement("td",{...r})}function px(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 hx(e){const{options:t,className:n,components:r,classNames:o,...a}=e,i=[o[ce.Dropdown],n].join(" "),s=t==null?void 0:t.find(({value:c})=>c===a.value);return x.createElement("span",{"data-disabled":a.disabled,className:o[ce.DropdownRoot]},x.createElement(r.Select,{className:i,...a},t==null?void 0:t.map(({value:c,label:u,disabled:f})=>x.createElement(r.Option,{key:c,value:c,disabled:f},u))),x.createElement("span",{className:o[ce.CaptionLabel],"aria-hidden":!0},s==null?void 0:s.label,x.createElement(r.Chevron,{orientation:"down",size:18,className:o[ce.Chevron]})))}function gx(e){return x.createElement("div",{...e})}function vx(e){return x.createElement("div",{...e})}function bx(e){const{calendarMonth:t,displayIndex:n,...r}=e;return x.createElement("div",{...r},e.children)}function yx(e){const{calendarMonth:t,displayIndex:n,...r}=e;return x.createElement("div",{...r})}function wx(e){return x.createElement("table",{...e})}function xx(e){return x.createElement("div",{...e})}const Mu=x.createContext(void 0);function mr(){const e=x.useContext(Mu);if(e===void 0)throw new Error("useDayPicker() must be used within a custom component.");return e}function Sx(e){const{components:t}=mr();return x.createElement(t.Dropdown,{...e})}function Ex(e){const{onPreviousClick:t,onNextClick:n,previousMonth:r,nextMonth:o,...a}=e,{components:i,classNames:s,labels:{labelPrevious:c,labelNext:u}}=mr(),f=x.useCallback(p=>{o&&(n==null||n(p))},[o,n]),l=x.useCallback(p=>{r&&(t==null||t(p))},[r,t]);return x.createElement("nav",{...a},x.createElement(i.PreviousMonthButton,{type:"button",className:s[ce.PreviousMonthButton],tabIndex:r?void 0:-1,"aria-disabled":r?void 0:!0,"aria-label":c(r),onClick:l},x.createElement(i.Chevron,{disabled:r?void 0:!0,className:s[ce.Chevron],orientation:"left"})),x.createElement(i.NextMonthButton,{type:"button",className:s[ce.NextMonthButton],tabIndex:o?void 0:-1,"aria-disabled":o?void 0:!0,"aria-label":u(o),onClick:f},x.createElement(i.Chevron,{disabled:o?void 0:!0,orientation:"right",className:s[ce.Chevron]})))}function Cx(e){const{components:t}=mr();return x.createElement(t.Button,{...e})}function Dx(e){return x.createElement("option",{...e})}function Mx(e){const{components:t}=mr();return x.createElement(t.Button,{...e})}function Nx(e){const{rootRef:t,...n}=e;return x.createElement("div",{...n,ref:t})}function kx(e){return x.createElement("select",{...e})}function Rx(e){const{week:t,...n}=e;return x.createElement("tr",{...n})}function Ox(e){return x.createElement("th",{...e})}function Tx(e){return x.createElement("thead",{"aria-hidden":!0},x.createElement("tr",{...e}))}function Px(e){const{week:t,...n}=e;return x.createElement("th",{...n})}function _x(e){return x.createElement("th",{...e})}function Ax(e){return x.createElement("tbody",{...e})}function Ix(e){const{components:t}=mr();return x.createElement(t.Dropdown,{...e})}const jx=Object.freeze(Object.defineProperty({__proto__:null,Button:ux,CaptionLabel:dx,Chevron:fx,Day:mx,DayButton:px,Dropdown:hx,DropdownNav:gx,Footer:vx,Month:bx,MonthCaption:yx,MonthGrid:wx,Months:xx,MonthsDropdown:Sx,Nav:Ex,NextMonthButton:Cx,Option:Dx,PreviousMonthButton:Mx,Root:Nx,Select:kx,Week:Rx,WeekNumber:Px,WeekNumberHeader:_x,Weekday:Ox,Weekdays:Tx,Weeks:Ax,YearsDropdown:Ix},Symbol.toStringTag,{value:"Module"}));function $x(e){return{...jx,...e}}function Lx(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 os(){const e={};for(const t in ce)e[ce[t]]=`rdp-${ce[t]}`;for(const t in ke)e[ke[t]]=`rdp-${ke[t]}`;for(const t in ct)e[ct[t]]=`rdp-${ct[t]}`;for(const t in Je)e[Je[t]]=`rdp-${Je[t]}`;return e}function Nu(e,t,n){return(n??new Tt(t)).format(e,"LLLL y")}const Fx=Nu;function Wx(e,t,n){return(n??new Tt(t)).format(e,"d")}function Bx(e,t=xt){return t.format(e,"LLLL")}function Yx(e,t=xt){return e<10?t.formatNumber(`0${e.toLocaleString()}`):t.formatNumber(`${e.toLocaleString()}`)}function zx(){return""}function Hx(e,t,n){return(n??new Tt(t)).format(e,"cccccc")}function ku(e,t=xt){return t.format(e,"yyyy")}const Ux=ku,Gx=Object.freeze(Object.defineProperty({__proto__:null,formatCaption:Nu,formatDay:Wx,formatMonthCaption:Fx,formatMonthDropdown:Bx,formatWeekNumber:Yx,formatWeekNumberHeader:zx,formatWeekdayName:Hx,formatYearCaption:Ux,formatYearDropdown:ku},Symbol.toStringTag,{value:"Module"}));function qx(e){return e!=null&&e.formatMonthCaption&&!e.formatCaption&&(e.formatCaption=e.formatMonthCaption),e!=null&&e.formatYearCaption&&!e.formatYearDropdown&&(e.formatYearDropdown=e.formatYearCaption),{...Gx,...e}}function Vx(e,t,n,r,o){const{startOfMonth:a,startOfYear:i,endOfYear:s,eachMonthOfInterval:c,getMonth:u}=o;return c({start:i(e),end:s(e)}).map(p=>{const h=r.formatMonthDropdown(p,o),b=u(p),g=t&&p<a(t)||n&&p>a(n)||!1;return{value:b,label:h,disabled:g}})}function Kx(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 Xx(e,t,n){const r=e.today(),o=t?e.startOfISOWeek(r):e.startOfWeek(r),a=[];for(let i=0;i<7;i++){const s=e.addDays(o,i);a.push(s)}return a}function Zx(e,t,n,r){if(!e||!t)return;const{startOfYear:o,endOfYear:a,addYears:i,getYear:s,isBefore:c,isSameYear:u}=r,f=o(e),l=a(t),p=[];let h=f;for(;c(h,l)||u(h,l);)p.push(h),h=i(h,1);return p.map(b=>{const g=n.formatYearDropdown(b,r);return{value:s(b),label:g,disabled:!1}})}function Ru(e,t,n){return(n??new Tt(t)).format(e,"LLLL y")}const Qx=Ru;function Jx(e,t,n,r){let o=(r??new Tt(n)).format(e,"PPPP");return t!=null&&t.today&&(o=`Today, ${o}`),o}function Ou(e,t,n,r){let o=(r??new Tt(n)).format(e,"PPPP");return t.today&&(o=`Today, ${o}`),t.selected&&(o=`${o}, selected`),o}const e0=Ou;function t0(){return""}function n0(e){return"Choose the Month"}function r0(e){return"Go to the Next Month"}function o0(e){return"Go to the Previous Month"}function a0(e,t,n){return(n??new Tt(t)).format(e,"cccc")}function s0(e,t){return`Week ${e}`}function i0(e){return"Week Number"}function c0(e){return"Choose the Year"}const l0=Object.freeze(Object.defineProperty({__proto__:null,labelCaption:Qx,labelDay:e0,labelDayButton:Ou,labelGrid:Ru,labelGridcell:Jx,labelMonthDropdown:n0,labelNav:t0,labelNext:r0,labelPrevious:o0,labelWeekNumber:s0,labelWeekNumberHeader:i0,labelWeekday:a0,labelYearDropdown:c0},Symbol.toStringTag,{value:"Module"})),pr=e=>e instanceof HTMLElement?e:null,Ho=e=>[...e.querySelectorAll("[data-animated-month]")??[]],u0=e=>pr(e.querySelector("[data-animated-month]")),Uo=e=>pr(e.querySelector("[data-animated-caption]")),Go=e=>pr(e.querySelector("[data-animated-weeks]")),d0=e=>pr(e.querySelector("[data-animated-nav]")),f0=e=>pr(e.querySelector("[data-animated-weekdays]"));function m0(e,t,{classNames:n,months:r,focused:o,dateLib:a}){const i=x.useRef(null),s=x.useRef(r),c=x.useRef(!1);x.useLayoutEffect(()=>{const u=s.current;if(s.current=r,!t||!e.current||!(e.current instanceof HTMLElement)||r.length===0||u.length===0||r.length!==u.length)return;const f=a.isSameMonth(r[0].date,u[0].date),l=a.isAfter(r[0].date,u[0].date),p=l?n[Je.caption_after_enter]:n[Je.caption_before_enter],h=l?n[Je.weeks_after_enter]:n[Je.weeks_before_enter],b=i.current,g=e.current.cloneNode(!0);if(g instanceof HTMLElement?(Ho(g).forEach(E=>{if(!(E instanceof HTMLElement))return;const M=u0(E);M&&E.contains(M)&&E.removeChild(M);const C=Uo(E);C&&C.classList.remove(p);const k=Go(E);k&&k.classList.remove(h)}),i.current=g):i.current=null,c.current||f||o)return;const v=b instanceof HTMLElement?Ho(b):[],y=Ho(e.current);if(y&&y.every(w=>w instanceof HTMLElement)&&v&&v.every(w=>w instanceof HTMLElement)){c.current=!0,e.current.style.isolation="isolate";const w=d0(e.current);w&&(w.style.zIndex="1"),y.forEach((E,M)=>{const C=v[M];if(!C)return;E.style.position="relative",E.style.overflow="hidden";const k=Uo(E);k&&k.classList.add(p);const S=Go(E);S&&S.classList.add(h);const R=()=>{c.current=!1,e.current&&(e.current.style.isolation=""),w&&(w.style.zIndex=""),k&&k.classList.remove(p),S&&S.classList.remove(h),E.style.position="",E.style.overflow="",E.contains(C)&&E.removeChild(C)};C.style.pointerEvents="none",C.style.position="absolute",C.style.overflow="hidden",C.setAttribute("aria-hidden","true");const A=f0(C);A&&(A.style.opacity="0");const I=Uo(C);I&&(I.classList.add(l?n[Je.caption_before_exit]:n[Je.caption_after_exit]),I.addEventListener("animationend",R));const L=Go(C);L&&L.classList.add(l?n[Je.weeks_before_exit]:n[Je.weeks_after_exit]),E.insertBefore(C,E.firstChild)})}})}function p0(e,t,n,r){const o=e[0],a=e[e.length-1],{ISOWeek:i,fixedWeeks:s,broadcastCalendar:c}=n??{},{addDays:u,differenceInCalendarDays:f,differenceInCalendarMonths:l,endOfBroadcastWeek:p,endOfISOWeek:h,endOfMonth:b,endOfWeek:g,isAfter:v,startOfBroadcastWeek:y,startOfISOWeek:w,startOfWeek:E}=r,M=c?y(o,r):i?w(o):E(o),C=c?p(a):i?h(b(a)):g(b(a)),k=f(C,M),S=l(a,o)+1,R=[];for(let L=0;L<=k;L++){const V=u(M,L);if(t&&v(V,t))break;R.push(V)}const I=(c?35:42)*S;if(s&&R.length<I){const L=I-R.length;for(let V=0;V<L;V++){const B=u(R[R.length-1],1);R.push(B)}}return R}function h0(e){const t=[];return e.reduce((n,r)=>{const o=r.weeks.reduce((a,i)=>[...a,...i.days],t);return[...n,...o]},t)}function g0(e,t,n,r){const{numberOfMonths:o=1}=n,a=[];for(let i=0;i<o;i++){const s=r.addMonths(e,i);if(t&&s>t)break;a.push(s)}return a}function Mi(e,t,n,r){const{month:o,defaultMonth:a,today:i=r.today(),numberOfMonths:s=1}=e;let c=o||a||i;const{differenceInCalendarMonths:u,addMonths:f,startOfMonth:l}=r;if(n&&u(n,c)<s-1){const p=-1*(s-1);c=f(n,p)}return t&&u(c,t)<0&&(c=t),l(c)}function v0(e,t,n,r){const{addDays:o,endOfBroadcastWeek:a,endOfISOWeek:i,endOfMonth:s,endOfWeek:c,getISOWeek:u,getWeek:f,startOfBroadcastWeek:l,startOfISOWeek:p,startOfWeek:h}=r,b=e.reduce((g,v)=>{const y=n.broadcastCalendar?l(v,r):n.ISOWeek?p(v):h(v),w=n.broadcastCalendar?a(v):n.ISOWeek?i(s(v)):c(s(v)),E=t.filter(S=>S>=y&&S<=w),M=n.broadcastCalendar?35:42;if(n.fixedWeeks&&E.length<M){const S=t.filter(R=>{const A=M-E.length;return R>w&&R<=o(w,A)});E.push(...S)}const C=E.reduce((S,R)=>{const A=n.ISOWeek?u(R):f(R),I=S.find(V=>V.weekNumber===A),L=new wu(R,v,r);return I?I.days.push(L):S.push(new ix(A,[L])),S},[]),k=new sx(v,C);return g.push(k),g},[]);return n.reverseMonths?b.reverse():b}function b0(e,t){let{startMonth:n,endMonth:r}=e;const{startOfYear:o,startOfDay:a,startOfMonth:i,endOfMonth:s,addYears:c,endOfYear:u,newDate:f,today:l}=t,{fromYear:p,toYear:h,fromMonth:b,toMonth:g}=e;!n&&b&&(n=b),!n&&p&&(n=t.newDate(p,0,1)),!r&&g&&(r=g),!r&&h&&(r=f(h,11,31));const v=e.captionLayout==="dropdown"||e.captionLayout==="dropdown-years";return n?n=i(n):p?n=f(p,0,1):!n&&v&&(n=o(c(e.today??l(),-100))),r?r=s(r):h?r=f(h,11,31):!r&&v&&(r=u(e.today??l())),[n&&a(n),r&&a(r)]}function y0(e,t,n,r){if(n.disableNavigation)return;const{pagedNavigation:o,numberOfMonths:a=1}=n,{startOfMonth:i,addMonths:s,differenceInCalendarMonths:c}=r,u=o?a:1,f=i(e);if(!t)return s(f,u);if(!(c(t,e)<a))return s(f,u)}function w0(e,t,n,r){if(n.disableNavigation)return;const{pagedNavigation:o,numberOfMonths:a}=n,{startOfMonth:i,addMonths:s,differenceInCalendarMonths:c}=r,u=o?a??1:1,f=i(e);if(!t)return s(f,-u);if(!(c(f,t)<=0))return s(f,-u)}function x0(e){const t=[];return e.reduce((n,r)=>[...n,...r.weeks],t)}function go(e,t){const[n,r]=x.useState(e);return[t===void 0?n:t,r]}function S0(e,t){const[n,r]=b0(e,t),{startOfMonth:o,endOfMonth:a}=t,i=Mi(e,n,r,t),[s,c]=go(i,e.month?i:void 0);x.useEffect(()=>{const k=Mi(e,n,r,t);c(k)},[e.timeZone]);const u=g0(s,r,e,t),f=p0(u,e.endMonth?a(e.endMonth):void 0,e,t),l=v0(u,f,e,t),p=x0(l),h=h0(l),b=w0(s,n,e,t),g=y0(s,r,e,t),{disableNavigation:v,onMonthChange:y}=e,w=k=>p.some(S=>S.days.some(R=>R.isEqualTo(k))),E=k=>{if(v)return;let S=o(k);n&&S<o(n)&&(S=o(n)),r&&S>o(r)&&(S=o(r)),c(S),y==null||y(S)};return{months:l,weeks:p,days:h,navStart:n,navEnd:r,previousMonth:b,nextMonth:g,goToMonth:E,goToDay:k=>{w(k)||E(k.date)}}}var pt;(function(e){e[e.Today=0]="Today",e[e.Selected=1]="Selected",e[e.LastFocused=2]="LastFocused",e[e.FocusedModifier=3]="FocusedModifier"})(pt||(pt={}));function Ni(e){return!e[ke.disabled]&&!e[ke.hidden]&&!e[ke.outside]}function E0(e,t,n,r){let o,a=-1;for(const i of e){const s=t(i);Ni(s)&&(s[ke.focused]&&a<pt.FocusedModifier?(o=i,a=pt.FocusedModifier):r!=null&&r.isEqualTo(i)&&a<pt.LastFocused?(o=i,a=pt.LastFocused):n(i.date)&&a<pt.Selected?(o=i,a=pt.Selected):s[ke.today]&&a<pt.Today&&(o=i,a=pt.Today))}return o||(o=e.find(i=>Ni(t(i)))),o}function C0(e,t,n,r,o,a,i){const{ISOWeek:s,broadcastCalendar:c}=a,{addDays:u,addMonths:f,addWeeks:l,addYears:p,endOfBroadcastWeek:h,endOfISOWeek:b,endOfWeek:g,max:v,min:y,startOfBroadcastWeek:w,startOfISOWeek:E,startOfWeek:M}=i;let k={day:u,week:l,month:f,year:p,startOfWeek:S=>c?w(S,i):s?E(S):M(S),endOfWeek:S=>c?h(S):s?b(S):g(S)}[e](n,t==="after"?1:-1);return t==="before"&&r?k=v([r,k]):t==="after"&&o&&(k=y([o,k])),k}function Tu(e,t,n,r,o,a,i,s=0){if(s>365)return;const c=C0(e,t,n.date,r,o,a,i),u=!!(a.disabled&&Dt(c,a.disabled,i)),f=!!(a.hidden&&Dt(c,a.hidden,i)),l=c,p=new wu(c,l,i);return!u&&!f?p:Tu(e,t,p,r,o,a,i,s+1)}function D0(e,t,n,r,o){const{autoFocus:a}=e,[i,s]=x.useState(),c=E0(t.days,n,r||(()=>!1),i),[u,f]=x.useState(a?c:void 0);return{isFocusTarget:g=>!!(c!=null&&c.isEqualTo(g)),setFocused:f,focused:u,blur:()=>{s(u),f(void 0)},moveFocus:(g,v)=>{if(!u)return;const y=Tu(g,v,u,t.navStart,t.navEnd,e,o);y&&(t.goToDay(y),f(y))}}}function M0(e,t){const{selected:n,required:r,onSelect:o}=e,[a,i]=go(n,o?n:void 0),s=o?n:a,{isSameDay:c}=t,u=h=>(s==null?void 0:s.some(b=>c(b,h)))??!1,{min:f,max:l}=e;return{selected:s,select:(h,b,g)=>{let v=[...s??[]];if(u(h)){if((s==null?void 0:s.length)===f||r&&(s==null?void 0:s.length)===1)return;v=s==null?void 0:s.filter(y=>!c(y,h))}else(s==null?void 0:s.length)===l?v=[h]:v=[...v,h];return o||i(v),o==null||o(v,h,b,g),v},isSelected:u}}function N0(e,t,n=0,r=0,o=!1,a=xt){const{from:i,to:s}=t||{},{isSameDay:c,isAfter:u,isBefore:f}=a;let l;if(!i&&!s)l={from:e,to:n>0?void 0:e};else if(i&&!s)c(i,e)?o?l={from:i,to:void 0}:l=void 0:f(e,i)?l={from:e,to:i}:l={from:i,to:e};else if(i&&s)if(c(i,e)&&c(s,e))o?l={from:i,to:s}:l=void 0;else if(c(i,e))l={from:i,to:n>0?void 0:e};else if(c(s,e))l={from:e,to:n>0?void 0:e};else if(f(e,i))l={from:e,to:s};else if(u(e,i))l={from:i,to:e};else if(u(e,s))l={from:i,to:e};else throw new Error("Invalid range");if(l!=null&&l.from&&(l!=null&&l.to)){const p=a.differenceInCalendarDays(l.to,l.from);r>0&&p>r?l={from:e,to:void 0}:n>1&&p<n&&(l={from:e,to:void 0})}return l}function k0(e,t,n=xt){const r=Array.isArray(t)?t:[t];let o=e.from;const a=n.differenceInCalendarDays(e.to,e.from),i=Math.min(a,6);for(let s=0;s<=i;s++){if(r.includes(o.getDay()))return!0;o=n.addDays(o,1)}return!1}function ki(e,t,n=xt){return Ct(e,t.from,!1,n)||Ct(e,t.to,!1,n)||Ct(t,e.from,!1,n)||Ct(t,e.to,!1,n)}function R0(e,t,n=xt){const r=Array.isArray(t)?t:[t];if(r.filter(s=>typeof s!="function").some(s=>typeof s=="boolean"?s:n.isDate(s)?Ct(e,s,!1,n):Du(s,n)?s.some(c=>Ct(e,c,!1,n)):rs(s)?s.from&&s.to?ki(e,{from:s.from,to:s.to},n):!1:Cu(s)?k0(e,s.dayOfWeek,n):xu(s)?n.isAfter(s.before,s.after)?ki(e,{from:n.addDays(s.after,1),to:n.addDays(s.before,-1)},n):Dt(e.from,s,n)||Dt(e.to,s,n):Su(s)||Eu(s)?Dt(e.from,s,n)||Dt(e.to,s,n):!1))return!0;const i=r.filter(s=>typeof s=="function");if(i.length){let s=e.from;const c=n.differenceInCalendarDays(e.to,e.from);for(let u=0;u<=c;u++){if(i.some(f=>f(s)))return!0;s=n.addDays(s,1)}}return!1}function O0(e,t){const{disabled:n,excludeDisabled:r,selected:o,required:a,onSelect:i}=e,[s,c]=go(o,i?o:void 0),u=i?o:s;return{selected:u,select:(p,h,b)=>{const{min:g,max:v}=e,y=p?N0(p,u,g,v,a,t):void 0;return r&&n&&(y!=null&&y.from)&&y.to&&R0({from:y.from,to:y.to},n,t)&&(y.from=p,y.to=void 0),i||c(y),i==null||i(y,p,h,b),y},isSelected:p=>u&&Ct(u,p,!1,t)}}function T0(e,t){const{selected:n,required:r,onSelect:o}=e,[a,i]=go(n,o?n:void 0),s=o?n:a,{isSameDay:c}=t;return{selected:s,select:(l,p,h)=>{let b=l;return!r&&s&&s&&c(l,s)&&(b=void 0),o||i(b),o==null||o(b,l,p,h),b},isSelected:l=>s?c(s,l):!1}}function P0(e,t){const n=T0(e,t),r=M0(e,t),o=O0(e,t);switch(e.mode){case"single":return n;case"multiple":return r;case"range":return o;default:return}}function Pu(e){var It;let t=e;t.timeZone&&(t={...e},t.today&&(t.today=new Ue(t.today,t.timeZone)),t.month&&(t.month=new Ue(t.month,t.timeZone)),t.defaultMonth&&(t.defaultMonth=new Ue(t.defaultMonth,t.timeZone)),t.startMonth&&(t.startMonth=new Ue(t.startMonth,t.timeZone)),t.endMonth&&(t.endMonth=new Ue(t.endMonth,t.timeZone)),t.mode==="single"&&t.selected?t.selected=new Ue(t.selected,t.timeZone):t.mode==="multiple"&&t.selected?t.selected=(It=t.selected)==null?void 0:It.map(q=>new Ue(q,t.timeZone)):t.mode==="range"&&t.selected&&(t.selected={from:t.selected.from?new Ue(t.selected.from,t.timeZone):void 0,to:t.selected.to?new Ue(t.selected.to,t.timeZone):void 0}));const{components:n,formatters:r,labels:o,dateLib:a,locale:i,classNames:s}=x.useMemo(()=>{const q={...ns,...t.locale};return{dateLib:new Tt({locale:q,weekStartsOn:t.broadcastCalendar?1:t.weekStartsOn,firstWeekContainsDate:t.firstWeekContainsDate,useAdditionalWeekYearTokens:t.useAdditionalWeekYearTokens,useAdditionalDayOfYearTokens:t.useAdditionalDayOfYearTokens,timeZone:t.timeZone,numerals:t.numerals},t.dateLib),components:$x(t.components),formatters:qx(t.formatters),labels:{...l0,...t.labels},locale:q,classNames:{...os(),...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:c,mode:u,navLayout:f,numberOfMonths:l=1,onDayBlur:p,onDayClick:h,onDayFocus:b,onDayKeyDown:g,onDayMouseEnter:v,onDayMouseLeave:y,onNextClick:w,onPrevClick:E,showWeekNumber:M,styles:C}=t,{formatCaption:k,formatDay:S,formatMonthDropdown:R,formatWeekNumber:A,formatWeekNumberHeader:I,formatWeekdayName:L,formatYearDropdown:V}=r,B=S0(t,a),{days:$,months:_,navStart:N,navEnd:O,previousMonth:D,nextMonth:P,goToMonth:Y}=B,H=cx($,t,N,O,a),{isSelected:T,select:j,selected:z}=P0(t,a)??{},{blur:U,focused:G,isFocusTarget:W,moveFocus:X,setFocused:Z}=D0(t,B,H,T??(()=>!1),a),{labelDayButton:Q,labelGridcell:ee,labelGrid:ae,labelMonthDropdown:be,labelNav:te,labelPrevious:Te,labelNext:$e,labelWeekday:Ce,labelWeekNumber:Ve,labelWeekNumberHeader:De,labelYearDropdown:Be}=o,Pt=x.useMemo(()=>Xx(a,t.ISOWeek),[a,t.ISOWeek]),_e=u!==void 0||h!==void 0,Ye=x.useCallback(()=>{D&&(Y(D),E==null||E(D))},[D,Y,E]),St=x.useCallback(()=>{P&&(Y(P),w==null||w(P))},[Y,P,w]),_t=x.useCallback((q,ie)=>se=>{se.preventDefault(),se.stopPropagation(),Z(q),j==null||j(q.date,ie,se),h==null||h(q.date,ie,se)},[j,h,Z]),ue=x.useCallback((q,ie)=>se=>{Z(q),b==null||b(q.date,ie,se)},[b,Z]),pe=x.useCallback((q,ie)=>se=>{U(),p==null||p(q.date,ie,se)},[U,p]),ye=x.useCallback((q,ie)=>se=>{const me={ArrowLeft:[se.shiftKey?"month":"day",t.dir==="rtl"?"after":"before"],ArrowRight:[se.shiftKey?"month":"day",t.dir==="rtl"?"before":"after"],ArrowDown:[se.shiftKey?"year":"week","after"],ArrowUp:[se.shiftKey?"year":"week","before"],PageUp:[se.shiftKey?"year":"month","before"],PageDown:[se.shiftKey?"year":"month","after"],Home:["startOfWeek","before"],End:["endOfWeek","after"]};if(me[se.key]){se.preventDefault(),se.stopPropagation();const[ge,oe]=me[se.key];X(ge,oe)}g==null||g(q.date,ie,se)},[X,g,t.dir]),Ae=x.useCallback((q,ie)=>se=>{v==null||v(q.date,ie,se)},[v]),Me=x.useCallback((q,ie)=>se=>{y==null||y(q.date,ie,se)},[y]),At=x.useCallback(q=>ie=>{const se=Number(ie.target.value),me=a.setMonth(a.startOfMonth(q),se);Y(me)},[a,Y]),Ke=x.useCallback(q=>ie=>{const se=Number(ie.target.value),me=a.setYear(a.startOfMonth(q),se);Y(me)},[a,Y]),{className:un,style:An}=x.useMemo(()=>({className:[s[ce.Root],t.className].filter(Boolean).join(" "),style:{...C==null?void 0:C[ce.Root],...t.style}}),[s,t.className,t.style,C]),dn=Lx(t),Kt=x.useRef(null);m0(Kt,!!t.animate,{classNames:s,months:_,focused:G,dateLib:a});const In={dayPickerProps:t,selected:z,select:j,isSelected:T,months:_,nextMonth:P,previousMonth:D,goToMonth:Y,getModifiers:H,components:n,classNames:s,styles:C,labels:o,formatters:r};return x.createElement(Mu.Provider,{value:In},x.createElement(n.Root,{rootRef:t.animate?Kt:void 0,className:un,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"],...dn},x.createElement(n.Months,{className:s[ce.Months],style:C==null?void 0:C[ce.Months]},!t.hideNavigation&&!f&&x.createElement(n.Nav,{"data-animated-nav":t.animate?"true":void 0,className:s[ce.Nav],style:C==null?void 0:C[ce.Nav],"aria-label":te(),onPreviousClick:Ye,onNextClick:St,previousMonth:D,nextMonth:P}),_.map((q,ie)=>{const se=Vx(q.date,N,O,r,a),me=Zx(N,O,r,a);return x.createElement(n.Month,{"data-animated-month":t.animate?"true":void 0,className:s[ce.Month],style:C==null?void 0:C[ce.Month],key:ie,displayIndex:ie,calendarMonth:q},f==="around"&&!t.hideNavigation&&ie===0&&x.createElement(n.PreviousMonthButton,{type:"button",className:s[ce.PreviousMonthButton],tabIndex:D?void 0:-1,"aria-disabled":D?void 0:!0,"aria-label":Te(D),onClick:Ye,"data-animated-button":t.animate?"true":void 0},x.createElement(n.Chevron,{disabled:D?void 0:!0,className:s[ce.Chevron],orientation:t.dir==="rtl"?"right":"left"})),x.createElement(n.MonthCaption,{"data-animated-caption":t.animate?"true":void 0,className:s[ce.MonthCaption],style:C==null?void 0:C[ce.MonthCaption],calendarMonth:q,displayIndex:ie},c!=null&&c.startsWith("dropdown")?x.createElement(n.DropdownNav,{className:s[ce.Dropdowns],style:C==null?void 0:C[ce.Dropdowns]},c==="dropdown"||c==="dropdown-months"?x.createElement(n.MonthsDropdown,{className:s[ce.MonthsDropdown],"aria-label":be(),classNames:s,components:n,disabled:!!t.disableNavigation,onChange:At(q.date),options:se,style:C==null?void 0:C[ce.Dropdown],value:a.getMonth(q.date)}):x.createElement("span",null,R(q.date,a)),c==="dropdown"||c==="dropdown-years"?x.createElement(n.YearsDropdown,{className:s[ce.YearsDropdown],"aria-label":Be(a.options),classNames:s,components:n,disabled:!!t.disableNavigation,onChange:Ke(q.date),options:me,style:C==null?void 0:C[ce.Dropdown],value:a.getYear(q.date)}):x.createElement("span",null,V(q.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"}},k(q.date,a.options,a))):x.createElement(n.CaptionLabel,{className:s[ce.CaptionLabel],role:"status","aria-live":"polite"},k(q.date,a.options,a))),f==="around"&&!t.hideNavigation&&ie===l-1&&x.createElement(n.NextMonthButton,{type:"button",className:s[ce.NextMonthButton],tabIndex:P?void 0:-1,"aria-disabled":P?void 0:!0,"aria-label":$e(P),onClick:St,"data-animated-button":t.animate?"true":void 0},x.createElement(n.Chevron,{disabled:P?void 0:!0,className:s[ce.Chevron],orientation:t.dir==="rtl"?"left":"right"})),ie===l-1&&f==="after"&&!t.hideNavigation&&x.createElement(n.Nav,{"data-animated-nav":t.animate?"true":void 0,className:s[ce.Nav],style:C==null?void 0:C[ce.Nav],"aria-label":te(),onPreviousClick:Ye,onNextClick:St,previousMonth:D,nextMonth:P}),x.createElement(n.MonthGrid,{role:"grid","aria-multiselectable":u==="multiple"||u==="range","aria-label":ae(q.date,a.options,a)||void 0,className:s[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:s[ce.Weekdays],style:C==null?void 0:C[ce.Weekdays]},M&&x.createElement(n.WeekNumberHeader,{"aria-label":De(a.options),className:s[ce.WeekNumberHeader],style:C==null?void 0:C[ce.WeekNumberHeader],scope:"col"},I()),Pt.map((ge,oe)=>x.createElement(n.Weekday,{"aria-label":Ce(ge,a.options,a),className:s[ce.Weekday],key:oe,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:s[ce.Weeks],style:C==null?void 0:C[ce.Weeks]},q.weeks.map((ge,oe)=>x.createElement(n.Week,{className:s[ce.Week],key:ge.weekNumber,style:C==null?void 0:C[ce.Week],week:ge},M&&x.createElement(n.WeekNumber,{week:ge,style:C==null?void 0:C[ce.WeekNumber],"aria-label":Ve(ge.weekNumber,{locale:i}),className:s[ce.WeekNumber],scope:"row",role:"rowheader"},A(ge.weekNumber,a)),ge.days.map(de=>{const{date:ve}=de,le=H(de);if(le[ke.focused]=!le.hidden&&!!(G!=null&&G.isEqualTo(de)),le[ct.selected]=(T==null?void 0:T(ve))||le.selected,rs(z)){const{from:Qe,to:ze}=z;le[ct.range_start]=!!(Qe&&ze&&a.isSameDay(ve,Qe)),le[ct.range_end]=!!(Qe&&ze&&a.isSameDay(ve,ze)),le[ct.range_middle]=Ct(z,ve,!0,a)}const Xe=Kx(le,C,t.modifiersStyles),xe=lx(le,s,t.modifiersClassNames),Ee=!_e&&!le.hidden?ee(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:Xe,role:"gridcell","aria-selected":le.selected||void 0,"aria-label":Ee,"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&&_e?x.createElement(n.DayButton,{className:s[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:_t(de,le),onBlur:pe(de,le),onFocus:ue(de,le),onKeyDown:ye(de,le),onMouseEnter:Ae(de,le),onMouseLeave:Me(de,le)},S(ve,a.options,a)):!le.hidden&&S(de.date,a.options,a))}))))))})),t.footer&&x.createElement(n.Footer,{className:s[ce.Footer],style:C==null?void 0:C[ce.Footer],role:"status","aria-live":"polite"},t.footer)))}function as(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var $r={exports:{}},_0=$r.exports,Ri;function _u(){return Ri||(Ri=1,function(e,t){(function(n,r){e.exports=r()})(_0,function(){var n=1e3,r=6e4,o=36e5,a="millisecond",i="second",s="minute",c="hour",u="day",f="week",l="month",p="quarter",h="year",b="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+)?$/,y=/\[([^\]]+)]|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($){var _=["th","st","nd","rd"],N=$%100;return"["+$+(_[(N-20)%10]||_[N]||_[0])+"]"}},E=function($,_,N){var O=String($);return!O||O.length>=_?$:""+Array(_+1-O.length).join(N)+$},M={s:E,z:function($){var _=-$.utcOffset(),N=Math.abs(_),O=Math.floor(N/60),D=N%60;return(_<=0?"+":"-")+E(O,2,"0")+":"+E(D,2,"0")},m:function $(_,N){if(_.date()<N.date())return-$(N,_);var O=12*(N.year()-_.year())+(N.month()-_.month()),D=_.clone().add(O,l),P=N-D<0,Y=_.clone().add(O+(P?-1:1),l);return+(-(O+(N-D)/(P?D-Y:Y-D))||0)},a:function($){return $<0?Math.ceil($)||0:Math.floor($)},p:function($){return{M:l,y:h,w:f,d:u,D:b,h:c,m:s,s:i,ms:a,Q:p}[$]||String($||"").toLowerCase().replace(/s$/,"")},u:function($){return $===void 0}},C="en",k={};k[C]=w;var S="$isDayjsObject",R=function($){return $ instanceof V||!(!$||!$[S])},A=function $(_,N,O){var D;if(!_)return C;if(typeof _=="string"){var P=_.toLowerCase();k[P]&&(D=P),N&&(k[P]=N,D=P);var Y=_.split("-");if(!D&&Y.length>1)return $(Y[0])}else{var H=_.name;k[H]=_,D=H}return!O&&D&&(C=D),D||!O&&C},I=function($,_){if(R($))return $.clone();var N=typeof _=="object"?_:{};return N.date=$,N.args=arguments,new V(N)},L=M;L.l=A,L.i=R,L.w=function($,_){return I($,{locale:_.$L,utc:_.$u,x:_.$x,$offset:_.$offset})};var V=function(){function $(N){this.$L=A(N.locale,null,!0),this.parse(N),this.$x=this.$x||N.x||{},this[S]=!0}var _=$.prototype;return _.parse=function(N){this.$d=function(O){var D=O.date,P=O.utc;if(D===null)return new Date(NaN);if(L.u(D))return new Date;if(D instanceof Date)return new Date(D);if(typeof D=="string"&&!/Z$/i.test(D)){var Y=D.match(v);if(Y){var H=Y[2]-1||0,T=(Y[7]||"0").substring(0,3);return P?new Date(Date.UTC(Y[1],H,Y[3]||1,Y[4]||0,Y[5]||0,Y[6]||0,T)):new Date(Y[1],H,Y[3]||1,Y[4]||0,Y[5]||0,Y[6]||0,T)}}return new Date(D)}(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()!==g},_.isSame=function(N,O){var D=I(N);return this.startOf(O)<=D&&D<=this.endOf(O)},_.isAfter=function(N,O){return I(N)<this.startOf(O)},_.isBefore=function(N,O){return this.endOf(O)<I(N)},_.$g=function(N,O,D){return L.u(N)?this[O]:this.set(D,N)},_.unix=function(){return Math.floor(this.valueOf()/1e3)},_.valueOf=function(){return this.$d.getTime()},_.startOf=function(N,O){var D=this,P=!!L.u(O)||O,Y=L.p(N),H=function(Z,Q){var ee=L.w(D.$u?Date.UTC(D.$y,Q,Z):new Date(D.$y,Q,Z),D);return P?ee:ee.endOf(u)},T=function(Z,Q){return L.w(D.toDate()[Z].apply(D.toDate("s"),(P?[0,0,0,0]:[23,59,59,999]).slice(Q)),D)},j=this.$W,z=this.$M,U=this.$D,G="set"+(this.$u?"UTC":"");switch(Y){case h:return P?H(1,0):H(31,11);case l:return P?H(1,z):H(0,z+1);case f:var W=this.$locale().weekStart||0,X=(j<W?j+7:j)-W;return H(P?U-X:U+(6-X),z);case u:case b:return T(G+"Hours",0);case c:return T(G+"Minutes",1);case s:return T(G+"Seconds",2);case i:return T(G+"Milliseconds",3);default:return this.clone()}},_.endOf=function(N){return this.startOf(N,!1)},_.$set=function(N,O){var D,P=L.p(N),Y="set"+(this.$u?"UTC":""),H=(D={},D[u]=Y+"Date",D[b]=Y+"Date",D[l]=Y+"Month",D[h]=Y+"FullYear",D[c]=Y+"Hours",D[s]=Y+"Minutes",D[i]=Y+"Seconds",D[a]=Y+"Milliseconds",D)[P],T=P===u?this.$D+(O-this.$W):O;if(P===l||P===h){var j=this.clone().set(b,1);j.$d[H](T),j.init(),this.$d=j.set(b,Math.min(this.$D,j.daysInMonth())).$d}else H&&this.$d[H](T);return this.init(),this},_.set=function(N,O){return this.clone().$set(N,O)},_.get=function(N){return this[L.p(N)]()},_.add=function(N,O){var D,P=this;N=Number(N);var Y=L.p(O),H=function(z){var U=I(P);return L.w(U.date(U.date()+Math.round(z*N)),P)};if(Y===l)return this.set(l,this.$M+N);if(Y===h)return this.set(h,this.$y+N);if(Y===u)return H(1);if(Y===f)return H(7);var T=(D={},D[s]=r,D[c]=o,D[i]=n,D)[Y]||1,j=this.$d.getTime()+N*T;return L.w(j,this)},_.subtract=function(N,O){return this.add(-1*N,O)},_.format=function(N){var O=this,D=this.$locale();if(!this.isValid())return D.invalidDate||g;var P=N||"YYYY-MM-DDTHH:mm:ssZ",Y=L.z(this),H=this.$H,T=this.$m,j=this.$M,z=D.weekdays,U=D.months,G=D.meridiem,W=function(Q,ee,ae,be){return Q&&(Q[ee]||Q(O,P))||ae[ee].slice(0,be)},X=function(Q){return L.s(H%12||12,Q,"0")},Z=G||function(Q,ee,ae){var be=Q<12?"AM":"PM";return ae?be.toLowerCase():be};return P.replace(y,function(Q,ee){return ee||function(ae){switch(ae){case"YY":return String(O.$y).slice(-2);case"YYYY":return L.s(O.$y,4,"0");case"M":return j+1;case"MM":return L.s(j+1,2,"0");case"MMM":return W(D.monthsShort,j,U,3);case"MMMM":return W(U,j);case"D":return O.$D;case"DD":return L.s(O.$D,2,"0");case"d":return String(O.$W);case"dd":return W(D.weekdaysMin,O.$W,z,2);case"ddd":return W(D.weekdaysShort,O.$W,z,3);case"dddd":return z[O.$W];case"H":return String(H);case"HH":return L.s(H,2,"0");case"h":return X(1);case"hh":return X(2);case"a":return Z(H,T,!0);case"A":return Z(H,T,!1);case"m":return String(T);case"mm":return L.s(T,2,"0");case"s":return String(O.$s);case"ss":return L.s(O.$s,2,"0");case"SSS":return L.s(O.$ms,3,"0");case"Z":return Y}return null}(Q)||Y.replace(":","")})},_.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},_.diff=function(N,O,D){var P,Y=this,H=L.p(O),T=I(N),j=(T.utcOffset()-this.utcOffset())*r,z=this-T,U=function(){return L.m(Y,T)};switch(H){case h:P=U()/12;break;case l:P=U();break;case p:P=U()/3;break;case f:P=(z-j)/6048e5;break;case u:P=(z-j)/864e5;break;case c:P=z/o;break;case s:P=z/r;break;case i:P=z/n;break;default:P=z}return D?P:L.a(P)},_.daysInMonth=function(){return this.endOf(l).$D},_.$locale=function(){return k[this.$L]},_.locale=function(N,O){if(!N)return this.$L;var D=this.clone(),P=A(N,O,!0);return P&&(D.$L=P),D},_.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()},$}(),B=V.prototype;return I.prototype=B,[["$ms",a],["$s",i],["$m",s],["$H",c],["$W",u],["$M",l],["$y",h],["$D",b]].forEach(function($){B[$[1]]=function(_){return this.$g(_,$[0],$[1])}}),I.extend=function($,_){return $.$i||($(_,V,I),$.$i=!0),I},I.locale=A,I.isDayjs=R,I.unix=function($){return I(1e3*$)},I.en=k[C],I.Ls=k,I.p={},I})}($r)),$r.exports}var A0=_u();const Mt=as(A0);var Lr={exports:{}},I0=Lr.exports,Oi;function j0(){return Oi||(Oi=1,function(e,t){(function(n,r){e.exports=r()})(I0,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 i=o.prototype,s=i.format;a.en.formats=n,i.format=function(c){c===void 0&&(c="YYYY-MM-DDTHH:mm:ssZ");var u=this.$locale().formats,f=function(l,p){return l.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(h,b,g){var v=g&&g.toUpperCase();return b||p[g]||n[g]||p[v].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(y,w,E){return w||E.slice(1)})})}(c,u===void 0?{}:u);return s.call(this,f)}}})}(Lr)),Lr.exports}var $0=j0();const Au=as($0);var Fr={exports:{}},L0=Fr.exports,Ti;function F0(){return Ti||(Ti=1,function(e,t){(function(n,r){e.exports=r(_u())})(L0,function(n){function r(i){return i&&typeof i=="object"&&"default"in i?i:{default:i}}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(i){return""+i+(i===1?"er":"")}};return o.default.locale(a,null,!0),a})}(Fr)),Fr.exports}F0();function W0({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(),i=Array.from({length:201},(l,p)=>a-100+p),s=l=>{const p=new Date(e);p.setMonth(Number.parseInt(l)),t(p)},c=l=>{const p=new Date(e);p.setFullYear(Number.parseInt(l)),t(p)},u=()=>{const l=new Date(e);l.setMonth(l.getMonth()-1),t(l)},f=()=>{const l=new Date(e);l.setMonth(l.getMonth()+1),t(l)};return m.jsxs("div",{className:"flex items-center justify-between p-2 border-b bg-muted",children:[m.jsx(kt,{variant:"outline",size:"small",onClick:u,className:"h-7 w-7 p-0",children:m.jsx(Cc,{className:"h-4 w-4"})}),m.jsxs("div",{className:"flex items-center gap-2",children:[m.jsxs(Sa,{value:r.toString(),onValueChange:s,children:[m.jsx(Gr,{className:"w-32 h-8 text-sm",children:m.jsx(Ea,{})}),m.jsx(qr,{children:o.map((l,p)=>m.jsx(Vr,{value:p.toString(),children:l},l))})]}),m.jsxs(Sa,{value:n.toString(),onValueChange:c,children:[m.jsx(Gr,{className:"w-20 h-8 text-sm",children:m.jsx(Ea,{})}),m.jsx(qr,{className:"max-h-[200px]",children:i.map(l=>m.jsx(Vr,{value:l.toString(),children:l},l))})]})]}),m.jsx(kt,{variant:"outline",size:"small",onClick:f,className:"h-7 w-7 p-0",children:m.jsx(La,{className:"h-4 w-4"})})]})}Mt.extend(Au);const Kr=({label:e,placeholder:t="Pick a date",helperText:n,error:r,required:o,value:a,onSelect:i,className:s,minDate:c,maxDate:u,disabled:f,readOnly:l,locale:p="en",showOutsideDays:h,dayPickerProps:b,month:g,onMonthChange:v,open:y,onOpenChange:w,...E})=>{const[M,C]=x.useState(!1),k=y!==void 0?y:M,S=w||C,R=g??a??new Date,A=I=>{I&&(!a||I.getTime()!==a.getTime())&&(i==null||i(I),S(!1))};return Mt.locale(p),m.jsxs("div",{className:F("space-y-1",s),...E,children:[e&&m.jsxs(sn,{className:"text-sm font-medium text-gray-700",children:[e,o&&m.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),m.jsxs(Za,{open:k,onOpenChange:S,children:[m.jsx(Qa,{asChild:!0,children:m.jsxs(kt,{variant:"outline",className:F("w-full flex justify-between items-center font-normal",!a&&"text-muted-foreground",r&&"border border-destructive"),disabled:f,"aria-readonly":l,children:[m.jsx("span",{className:F("text-left",!a&&"text-muted-foreground"),children:a?Mt(a).locale(p).format("LL"):t}),m.jsx(Ec,{strokeWidth:1.2,className:"ml-6 h-6 w-6 shrink-0 text-foreground"})]})}),m.jsx(fo,{className:"w-auto p-0",align:"start",children:m.jsxs("div",{className:"bg-white rounded-md border shadow-md",children:[m.jsx(W0,{month:R,onMonthChange:v??(()=>{})}),m.jsx("div",{className:"p-3",children:m.jsx(Pu,{mode:"single",selected:a,onSelect:A,month:R,onMonthChange:v,fromDate:c,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"},...b})})]})})]}),(n||r)&&m.jsx("p",{className:F("text-xs",r?"text-destructive":"text-gray-500"),children:r||n})]})};function Pi({className:e,classNames:t,showOutsideDays:n=!0,captionLayout:r="label",buttonVariant:o="ghost",formatters:a,components:i,...s}){const c=os();return m.jsx(Pu,{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",c.root),months:F("relative flex flex-col gap-4 md:flex-row",c.months),month:F("flex w-full flex-col gap-4",c.month),nav:F("absolute inset-x-0 top-0 flex w-full items-center justify-between gap-1",c.nav),button_previous:F(ca({variant:o}),"h-[--cell-size] w-[--cell-size] select-none p-0 aria-disabled:opacity-50",c.button_previous),button_next:F(ca({variant:o}),"h-[--cell-size] w-[--cell-size] select-none p-0 aria-disabled:opacity-50",c.button_next),month_caption:F("flex h-[--cell-size] w-full items-center justify-center px-[--cell-size]",c.month_caption),dropdowns:F("flex h-[--cell-size] w-full items-center justify-center gap-1.5 text-sm font-medium",c.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",c.dropdown_root),dropdown:F("absolute inset-0 opacity-0",c.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",c.caption_label),table:"w-full border-collapse",weekdays:F("flex",c.weekdays),weekday:F("text-muted-foreground flex-1 select-none rounded-md text-[0.8rem] font-normal",c.weekday),week:F("mt-2 flex w-full",c.week),week_number_header:F("w-[--cell-size] select-none",c.week_number_header),week_number:F("text-muted-foreground select-none text-[0.8rem]",c.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",c.day),range_start:F("bg-accent rounded-l-md",c.range_start),range_middle:F("rounded-none",c.range_middle),range_end:F("bg-accent rounded-r-md",c.range_end),today:F("bg-accent text-accent-foreground rounded-md data-[selected=true]:rounded-none",c.today),outside:F("text-muted-foreground aria-selected:text-muted-foreground",c.outside),disabled:F("text-muted-foreground opacity-50",c.disabled),hidden:F("invisible",c.hidden),...t},components:{Root:({className:u,rootRef:f,...l})=>m.jsx("div",{"data-slot":"calendar",ref:f,className:F(u),...l}),Chevron:({className:u,orientation:f,...l})=>f==="left"?m.jsx(Cc,{className:F("size-4",u),...l}):f==="right"?m.jsx(La,{className:F("size-4",u),...l}):m.jsx(nr,{className:F("size-4",u),...l}),DayButton:B0,WeekNumber:({children:u,...f})=>m.jsx("td",{...f,children:m.jsx("div",{className:"flex size-[--cell-size] items-center justify-center text-center",children:u})}),...i},...s})}function B0({className:e,day:t,modifiers:n,...r}){const o=os(),a=d.useRef(null);return d.useEffect(()=>{var p;n.focused&&((p=a.current)==null||p.focus())},[n.focused]),m.jsx(kt,{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 Wr={exports:{}},Y0=Wr.exports,_i;function z0(){return _i||(_i=1,function(e,t){(function(n,r){e.exports=r()})(Y0,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/,i=/\d\d?/,s=/\d*[^-_:/,()\s\d]+/,c={},u=function(v){return(v=+v)+(v>68?1900:2e3)},f=function(v){return function(y){this[v]=+y}},l=[/[+-]\d\d:?(\d\d)?|Z/,function(v){(this.zone||(this.zone={})).offset=function(y){if(!y||y==="Z")return 0;var w=y.match(/([+-]|\d\d)/g),E=60*w[1]+(+w[2]||0);return E===0?0:w[0]==="+"?-E:E}(v)}],p=function(v){var y=c[v];return y&&(y.indexOf?y:y.s.concat(y.f))},h=function(v,y){var w,E=c.meridiem;if(E){for(var M=1;M<=24;M+=1)if(v.indexOf(E(M,0,y))>-1){w=M>12;break}}else w=v===(y?"pm":"PM");return w},b={A:[s,function(v){this.afternoon=h(v,!1)}],a:[s,function(v){this.afternoon=h(v,!0)}],Q:[o,function(v){this.month=3*(v-1)+1}],S:[o,function(v){this.milliseconds=100*+v}],SS:[a,function(v){this.milliseconds=10*+v}],SSS:[/\d{3}/,function(v){this.milliseconds=+v}],s:[i,f("seconds")],ss:[i,f("seconds")],m:[i,f("minutes")],mm:[i,f("minutes")],H:[i,f("hours")],h:[i,f("hours")],HH:[i,f("hours")],hh:[i,f("hours")],D:[i,f("day")],DD:[a,f("day")],Do:[s,function(v){var y=c.ordinal,w=v.match(/\d+/);if(this.day=w[0],y)for(var E=1;E<=31;E+=1)y(E).replace(/\[|\]/g,"")===v&&(this.day=E)}],w:[i,f("week")],ww:[a,f("week")],M:[i,f("month")],MM:[a,f("month")],MMM:[s,function(v){var y=p("months"),w=(p("monthsShort")||y.map(function(E){return E.slice(0,3)})).indexOf(v)+1;if(w<1)throw new Error;this.month=w%12||w}],MMMM:[s,function(v){var y=p("months").indexOf(v)+1;if(y<1)throw new Error;this.month=y%12||y}],Y:[/[+-]?\d+/,f("year")],YY:[a,function(v){this.year=u(v)}],YYYY:[/\d{4}/,f("year")],Z:l,ZZ:l};function g(v){var y,w;y=v,w=c&&c.formats;for(var E=(v=y.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(I,L,V){var B=V&&V.toUpperCase();return L||w[V]||n[V]||w[B].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function($,_,N){return _||N.slice(1)})})).match(r),M=E.length,C=0;C<M;C+=1){var k=E[C],S=b[k],R=S&&S[0],A=S&&S[1];E[C]=A?{regex:R,parser:A}:k.replace(/^\[|\]$/g,"")}return function(I){for(var L={},V=0,B=0;V<M;V+=1){var $=E[V];if(typeof $=="string")B+=$.length;else{var _=$.regex,N=$.parser,O=I.slice(B),D=_.exec(O)[0];N.call(L,D),I=I.replace(D,"")}}return function(P){var Y=P.afternoon;if(Y!==void 0){var H=P.hours;Y?H<12&&(P.hours+=12):H===12&&(P.hours=0),delete P.afternoon}}(L),L}}return function(v,y,w){w.p.customParseFormat=!0,v&&v.parseTwoDigitYear&&(u=v.parseTwoDigitYear);var E=y.prototype,M=E.parse;E.parse=function(C){var k=C.date,S=C.utc,R=C.args;this.$u=S;var A=R[1];if(typeof A=="string"){var I=R[2]===!0,L=R[3]===!0,V=I||L,B=R[2];L&&(B=R[2]),c=this.$locale(),!I&&B&&(c=w.Ls[B]),this.$d=function(O,D,P,Y){try{if(["x","X"].indexOf(D)>-1)return new Date((D==="X"?1e3:1)*O);var H=g(D)(O),T=H.year,j=H.month,z=H.day,U=H.hours,G=H.minutes,W=H.seconds,X=H.milliseconds,Z=H.zone,Q=H.week,ee=new Date,ae=z||(T||j?1:ee.getDate()),be=T||ee.getFullYear(),te=0;T&&!j||(te=j>0?j-1:ee.getMonth());var Te,$e=U||0,Ce=G||0,Ve=W||0,De=X||0;return Z?new Date(Date.UTC(be,te,ae,$e,Ce,Ve,De+60*Z.offset*1e3)):P?new Date(Date.UTC(be,te,ae,$e,Ce,Ve,De)):(Te=new Date(be,te,ae,$e,Ce,Ve,De),Q&&(Te=Y(Te).week(Q).toDate()),Te)}catch{return new Date("")}}(k,A,S,w),this.init(),B&&B!==!0&&(this.$L=this.locale(B).$L),V&&k!=this.format(A)&&(this.$d=new Date("")),c={}}else if(A instanceof Array)for(var $=A.length,_=1;_<=$;_+=1){R[1]=A[_-1];var N=w.apply(this,R);if(N.isValid()){this.$d=N.$d,this.$L=N.$L,this.init();break}_===$&&(this.$d=new Date(""))}else M.call(this,C)}}})}(Wr)),Wr.exports}var H0=z0();const U0=as(H0);Mt.extend(U0);Mt.extend(Au);const G0={"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-]$/}},q0=({label:e,placeholder:t,helperText:n,required:r,value:o,onSelect:a,className:i,minDate:s,maxDate:c,disabled:u,readOnly:f,locale:l="en",inputClassName:p,dateFormat:h="DD/MM/YYYY",error:b,appendTo:g})=>{const[v,y]=d.useState(!1),[w,E]=d.useState(""),[M,C]=d.useState(o),k=d.useMemo(()=>h,[h]),S=d.useMemo(()=>G0[k],[k]),R=d.useMemo(()=>t||k.toLowerCase(),[t,k]),A=d.useCallback(N=>{const O=N.replace(/\D/g,""),{separator:D}=S;if(O.length<=2)return O;switch(k){case"MM/DD/YYYY":case"DD/MM/YYYY":return O.length<=4?`${O.substring(0,2)}${D}${O.substring(2)}`:`${O.substring(0,2)}${D}${O.substring(2,4)}${D}${O.substring(4,8)}`;case"YYYY-MM-DD":return O.length<=4?O:O.length<=6?`${O.substring(0,4)}${D}${O.substring(4)}`:`${O.substring(0,4)}${D}${O.substring(4,6)}${D}${O.substring(6,8)}`;case"DD-MM-YYYY":return O.length<=4?`${O.substring(0,2)}${D}${O.substring(2)}`:`${O.substring(0,2)}${D}${O.substring(2,4)}${D}${O.substring(4,8)}`;default:return N}},[k,S]),I=d.useMemo(()=>N=>{const O=N.trim();return O&&Mt(O,k,!0).isValid()?Mt(O,k):null},[k]),L=d.useCallback(N=>Mt(N).format(k),[k]);d.useEffect(()=>{E(o?L(o):""),C(o),Mt.locale(l)},[o,l,L]);const V=d.useCallback(N=>{let O=N.target.value;if(E(O),!O.trim()){C(void 0),a==null||a(void 0);return}const D=A(O);D!==O&&O.replace(/\D/g,"").length>1&&(E(D),O=D);const P=I(O);if(P!=null&&P.isValid()){const Y=P.toDate();(!s||Y>=s)&&(!c||Y<=c)&&(C(Y),a==null||a(Y))}},[A,I,a,s,c]),B=d.useCallback(()=>{M&&E(L(M))},[M,L]),$=d.useCallback(N=>{N&&(E(L(N)),C(N),a==null||a(N),y(!1))},[a,L]),_=d.useCallback(N=>{if(!["Backspace","Delete","Tab","Enter","ArrowLeft","ArrowRight","ArrowUp","ArrowDown"].includes(N.key)&&!S.pattern.test(N.key)&&!N.ctrlKey&&!N.metaKey){N.preventDefault();return}N.key==="Enter"&&(N.preventDefault(),B())},[S.pattern,B]);return m.jsxs("div",{className:F("space-y-1",i),children:[e&&m.jsxs(sn,{className:"text-sm font-medium text-gray-700",children:[e,r&&m.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),m.jsxs(Za,{open:v,onOpenChange:y,children:[m.jsxs("div",{className:F("w-60 relative",p),children:[m.jsx(an,{type:"text",value:w,onChange:V,onBlur:B,onKeyDown:_,placeholder:R,disabled:u,readOnly:f,className:F("w-full pr-12",b&&"border border-destructive focus-visible:ring-destructive")}),m.jsx(Qa,{asChild:!0,children:m.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(N=>!N),disabled:u||f,"aria-label":"Open calendar",children:m.jsx(Ec,{strokeWidth:1,className:"h-5 w-5"})})})]}),m.jsx(fo,{className:"w-auto p-0",align:"start",asChild:!0,children:g?er.createPortal(m.jsx(Pi,{mode:"single",selected:M,onSelect:$,fromDate:s,toDate:c}),g):m.jsx(Pi,{mode:"single",selected:M,onSelect:$,fromDate:s,toDate:c})})]}),(n||b)&&m.jsx("p",{className:F("text-xs",b?"text-destructive":"text-gray-500"),children:b||n})]})};function Cn({label:e,placeholder:t="Select option",options:n,value:r,leadingIcon:o,helperText:a,error:i,required:s,onValueChange:c,className:u,variant:f="default",disabled:l=!1,clearable:p}){const h=r!==void 0,[b,g]=x.useState(void 0),v=h?r:b,y=w=>{h||g(w),c==null||c(w)};return m.jsxs("div",{className:F("space-y-1",u),children:[e&&m.jsxs(sn,{className:F("text-sm font-medium",l?"text-gray-400":"text-gray-700"),children:[e,s&&m.jsx("span",{className:"text-destructive ml-1",children:"*"})]}),m.jsxs(Sa,{value:v??void 0,onValueChange:y,disabled:l,children:[m.jsx(Gr,{className:F("border-input",i&&"border-destructive",f==="gray"&&"bg-gray-100 border-gray-300 text-gray-700",l&&"opacity-50 cursor-not-allowed"),children:m.jsxs("div",{className:"flex items-center gap-2 w-full",children:[o&&m.jsx("div",{className:"text-gray-400",children:o}),m.jsx(Ea,{placeholder:t}),p&&!!v&&!l&&m.jsx("span",{role:"button","aria-label":"Clear selection",tabIndex:0,className:"ml-auto text-gray-400 hover:text-gray-600 relative z-10",onMouseDown:w=>{w.preventDefault(),w.stopPropagation()},onPointerDown:w=>{w.preventDefault(),w.stopPropagation()},onClick:w=>{w.preventDefault(),w.stopPropagation(),h||g(void 0),c==null||c("")},children:m.jsx(cn,{strokeWidth:1.5,color:"gray",className:"h-4 w-4 mr-3"})})]})}),m.jsx(qr,{children:n.map(w=>m.jsx(Vr,{value:w.value,children:w.label},w.value))})]},v??"__empty"),(a||i)&&m.jsx("p",{className:F("text-xs",i?"text-destructive":l?"text-gray-400":"text-gray-500"),children:i||a})]})}const V0=({label:e,variant:t="filled",color:n="default",size:r="medium",deletable:o=!1,onDelete:a,onClick:i,icon:s,avatar:c,disabled:u=!1,className:f="",...l})=>{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"},b={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-destructive text-red-600 hover:bg-red-50"}},g=u?"opacity-50 cursor-not-allowed":"cursor-pointer",v=i&&!u?"hover:shadow-md":"",y=`
171
+ `)},Rb=0,hn=[];function Ob(e){var t=d.useRef([]),n=d.useRef([0,0]),r=d.useRef(),o=d.useState(Rb++)[0],a=d.useState(nl)[0],i=d.useRef(e);d.useEffect(function(){i.current=e},[e]),d.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var g=Zv([e.lockRef.current],(e.shards||[]).map(mi),!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 s=d.useCallback(function(g,v){if("touches"in g&&g.touches.length===2||g.type==="wheel"&&g.ctrlKey)return!i.current.allowPinchZoom;var w=Nr(g),y=n.current,E="deltaX"in g?g.deltaX:y[0]-w[0],M="deltaY"in g?g.deltaY:y[1]-w[1],C,R=g.target,S=Math.abs(E)>Math.abs(M)?"h":"v";if("touches"in g&&S==="h"&&R.type==="range")return!1;var k=di(S,R);if(!k)return!0;if(k?C=S:(C=S==="v"?"h":"v",k=di(S,R)),!k)return!1;if(!r.current&&"changedTouches"in g&&(E||M)&&(r.current=C),!C)return!0;var I=r.current||C;return Mb(I,v,g,I==="h"?E:M)},[]),c=d.useCallback(function(g){var v=g;if(!(!hn.length||hn[hn.length-1]!==a)){var w="deltaY"in v?fi(v):Nr(v),y=t.current.filter(function(C){return C.name===v.type&&(C.target===v.target||v.target===C.shadowParent)&&Nb(C.delta,w)})[0];if(y&&y.should){v.cancelable&&v.preventDefault();return}if(!y){var E=(i.current.shards||[]).map(mi).filter(Boolean).filter(function(C){return C.contains(v.target)}),M=E.length>0?s(v,E[0]):!i.current.noIsolation;M&&v.cancelable&&v.preventDefault()}}},[]),u=d.useCallback(function(g,v,w,y){var E={name:g,delta:v,target:w,should:y,shadowParent:Tb(w)};t.current.push(E),setTimeout(function(){t.current=t.current.filter(function(M){return M!==E})},1)},[]),f=d.useCallback(function(g){n.current=Nr(g),r.current=void 0},[]),l=d.useCallback(function(g){u(g.type,fi(g),g.target,s(g,e.lockRef.current))},[]),p=d.useCallback(function(g){u(g.type,Nr(g),g.target,s(g,e.lockRef.current))},[]);d.useEffect(function(){return hn.push(a),e.setCallbacks({onScrollCapture:l,onWheelCapture:l,onTouchMoveCapture:p}),document.addEventListener("wheel",c,pn),document.addEventListener("touchmove",c,pn),document.addEventListener("touchstart",f,pn),function(){hn=hn.filter(function(g){return g!==a}),document.removeEventListener("wheel",c,pn),document.removeEventListener("touchmove",c,pn),document.removeEventListener("touchstart",f,pn)}},[]);var h=e.removeScrollBar,b=e.inert;return d.createElement(d.Fragment,null,b?d.createElement(a,{styles:kb(o)}):null,h?d.createElement(yb,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Tb(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Pb=sb(tl,Ob);var cr=d.forwardRef(function(e,t){return d.createElement(lo,ht({},e,{ref:t,sideCar:Pb}))});cr.classNames=lo.classNames;var uo="Popover",[sl,xM]=Ge(uo,[Ht]),lr=Ht(),[_b,Ut]=sl(uo),il=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:o,onOpenChange:a,modal:i=!1}=e,s=lr(t),c=d.useRef(null),[u,f]=d.useState(!1),[l,p]=ot({prop:r,defaultProp:o??!1,onChange:a,caller:uo});return m.jsx(ar,{...s,children:m.jsx(_b,{scope:t,contentId:Pe(),triggerRef:c,open:l,onOpenChange:p,onOpenToggle:d.useCallback(()=>p(h=>!h),[p]),hasCustomAnchor:u,onCustomAnchorAdd:d.useCallback(()=>f(!0),[]),onCustomAnchorRemove:d.useCallback(()=>f(!1),[]),modal:i,children:n})})};il.displayName=uo;var cl="PopoverAnchor",Ab=d.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=Ut(cl,n),a=lr(n),{onCustomAnchorAdd:i,onCustomAnchorRemove:s}=o;return d.useEffect(()=>(i(),()=>s()),[i,s]),m.jsx(sr,{...a,...r,ref:t})});Ab.displayName=cl;var ll="PopoverTrigger",ul=d.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=Ut(ll,n),a=lr(n),i=fe(t,o.triggerRef),s=m.jsx(J.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":hl(o.open),...r,ref:i,onClick:K(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?s:m.jsx(sr,{asChild:!0,...a,children:s})});ul.displayName=ll;var Xa="PopoverPortal",[Ib,jb]=sl(Xa,{forceMount:void 0}),dl=e=>{const{__scopePopover:t,forceMount:n,children:r,container:o}=e,a=Ut(Xa,t);return m.jsx(Ib,{scope:t,forceMount:n,children:m.jsx(at,{present:n||a.open,children:m.jsx(ir,{asChild:!0,container:o,children:r})})})};dl.displayName=Xa;var Sn="PopoverContent",fl=d.forwardRef((e,t)=>{const n=jb(Sn,e.__scopePopover),{forceMount:r=n.forceMount,...o}=e,a=Ut(Sn,e.__scopePopover);return m.jsx(at,{present:r||a.open,children:a.modal?m.jsx(Lb,{...o,ref:t}):m.jsx(Fb,{...o,ref:t})})});fl.displayName=Sn;var $b=Wt("PopoverContent.RemoveScroll"),Lb=d.forwardRef((e,t)=>{const n=Ut(Sn,e.__scopePopover),r=d.useRef(null),o=fe(t,r),a=d.useRef(!1);return d.useEffect(()=>{const i=r.current;if(i)return co(i)},[]),m.jsx(cr,{as:$b,allowPinchZoom:!0,children:m.jsx(ml,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:K(e.onCloseAutoFocus,i=>{var s;i.preventDefault(),a.current||(s=n.triggerRef.current)==null||s.focus()}),onPointerDownOutside:K(e.onPointerDownOutside,i=>{const s=i.detail.originalEvent,c=s.button===0&&s.ctrlKey===!0,u=s.button===2||c;a.current=u},{checkForDefaultPrevented:!1}),onFocusOutside:K(e.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1})})})}),Fb=d.forwardRef((e,t)=>{const n=Ut(Sn,e.__scopePopover),r=d.useRef(!1),o=d.useRef(!1);return m.jsx(ml,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var i,s;(i=e.onCloseAutoFocus)==null||i.call(e,a),a.defaultPrevented||(r.current||(s=n.triggerRef.current)==null||s.focus(),a.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:a=>{var c,u;(c=e.onInteractOutside)==null||c.call(e,a),a.defaultPrevented||(r.current=!0,a.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const i=a.target;((u=n.triggerRef.current)==null?void 0:u.contains(i))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&o.current&&a.preventDefault()}})}),ml=d.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:a,disableOutsidePointerEvents:i,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:u,onInteractOutside:f,...l}=e,p=Ut(Sn,n),h=lr(n);return Wa(),m.jsx(rr,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:a,children:m.jsx(kc,{asChild:!0,disableOutsidePointerEvents:i,onInteractOutside:f,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:u,onDismiss:()=>p.onOpenChange(!1),children:m.jsx(so,{"data-state":hl(p.open),role:"dialog",id:p.contentId,...h,...l,ref:t,style:{...l.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)"}})})})}),pl="PopoverClose",Wb=d.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=Ut(pl,n);return m.jsx(J.button,{type:"button",...r,ref:t,onClick:K(e.onClick,()=>o.onOpenChange(!1))})});Wb.displayName=pl;var Bb="PopoverArrow",Yb=d.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=lr(n);return m.jsx(io,{...o,...r,ref:t})});Yb.displayName=Bb;function hl(e){return e?"open":"closed"}var zb=il,Hb=ul,Ub=dl,gl=fl;const Za=zb,Qa=Hb,fo=d.forwardRef(({className:e,sideOffset:t=4,...n},r)=>m.jsx(Ub,{children:m.jsx(gl,{ref:r,sideOffset:t,className:L("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})}));fo.displayName=gl.displayName;function pi(e,[t,n]){return Math.min(n,Math.max(t,e))}function Ja(e){const t=e+"CollectionProvider",[n,r]=Ge(t),[o,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),i=g=>{const{scope:v,children:w}=g,y=x.useRef(null),E=x.useRef(new Map).current;return m.jsx(o,{scope:v,itemMap:E,collectionRef:y,children:w})};i.displayName=t;const s=e+"CollectionSlot",c=Wt(s),u=x.forwardRef((g,v)=>{const{scope:w,children:y}=g,E=a(s,w),M=fe(v,E.collectionRef);return m.jsx(c,{ref:M,children:y})});u.displayName=s;const f=e+"CollectionItemSlot",l="data-radix-collection-item",p=Wt(f),h=x.forwardRef((g,v)=>{const{scope:w,children:y,...E}=g,M=x.useRef(null),C=fe(v,M),R=a(f,w);return x.useEffect(()=>(R.itemMap.set(M,{ref:M,...E}),()=>void R.itemMap.delete(M))),m.jsx(p,{[l]:"",ref:C,children:y})});h.displayName=f;function b(g){const v=a(e+"CollectionConsumer",g);return x.useCallback(()=>{const y=v.collectionRef.current;if(!y)return[];const E=Array.from(y.querySelectorAll(`[${l}]`));return Array.from(v.itemMap.values()).sort((R,S)=>E.indexOf(R.ref.current)-E.indexOf(S.ref.current))},[v.collectionRef,v.itemMap])}return[{Provider:i,Slot:u,ItemSlot:h},b,r]}var Gb=d.createContext(void 0);function ur(e){const t=d.useContext(Gb);return e||t||"ltr"}var qb="DismissableLayer",ga="dismissableLayer.update",Vb="dismissableLayer.pointerDownOutside",Kb="dismissableLayer.focusOutside",hi,vl=d.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),bl=d.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:i,onDismiss:s,...c}=e,u=d.useContext(vl),[f,l]=d.useState(null),p=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,h]=d.useState({}),b=fe(t,S=>l(S)),g=Array.from(u.layers),[v]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),w=g.indexOf(v),y=f?g.indexOf(f):-1,E=u.layersWithOutsidePointerEventsDisabled.size>0,M=y>=w,C=Qb(S=>{const k=S.target,I=[...u.branches].some(A=>A.contains(k));!M||I||(o==null||o(S),i==null||i(S),S.defaultPrevented||s==null||s())},p),R=Jb(S=>{const k=S.target;[...u.branches].some(A=>A.contains(k))||(a==null||a(S),i==null||i(S),S.defaultPrevented||s==null||s())},p);return nr(S=>{y===u.layers.size-1&&(r==null||r(S),!S.defaultPrevented&&s&&(S.preventDefault(),s()))},p),d.useEffect(()=>{if(f)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(hi=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(f)),u.layers.add(f),gi(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=hi)}},[f,p,n,u]),d.useEffect(()=>()=>{f&&(u.layers.delete(f),u.layersWithOutsidePointerEventsDisabled.delete(f),gi())},[f,u]),d.useEffect(()=>{const S=()=>h({});return document.addEventListener(ga,S),()=>document.removeEventListener(ga,S)},[]),m.jsx(J.div,{...c,ref:b,style:{pointerEvents:E?M?"auto":"none":void 0,...e.style},onFocusCapture:K(e.onFocusCapture,R.onFocusCapture),onBlurCapture:K(e.onBlurCapture,R.onBlurCapture),onPointerDownCapture:K(e.onPointerDownCapture,C.onPointerDownCapture)})});bl.displayName=qb;var Xb="DismissableLayerBranch",Zb=d.forwardRef((e,t)=>{const n=d.useContext(vl),r=d.useRef(null),o=fe(t,r);return d.useEffect(()=>{const a=r.current;if(a)return n.branches.add(a),()=>{n.branches.delete(a)}},[n.branches]),m.jsx(J.div,{...e,ref:o})});Zb.displayName=Xb;function Qb(e,t=globalThis==null?void 0:globalThis.document){const n=je(e),r=d.useRef(!1),o=d.useRef(()=>{});return d.useEffect(()=>{const a=s=>{if(s.target&&!r.current){let c=function(){yl(Vb,n,u,{discrete:!0})};const u={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=c,t.addEventListener("click",o.current,{once:!0})):c()}else t.removeEventListener("click",o.current);r.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",a),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Jb(e,t=globalThis==null?void 0:globalThis.document){const n=je(e),r=d.useRef(!1);return d.useEffect(()=>{const o=a=>{a.target&&!r.current&&yl(Kb,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 gi(){const e=new CustomEvent(ga);document.dispatchEvent(e)}function yl(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?kn(o,a):o.dispatchEvent(a)}function es(e){const t=d.useRef({value:e,previous:e});return d.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var wl=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"}),ey="VisuallyHidden",xl=d.forwardRef((e,t)=>m.jsx(J.span,{...e,ref:t,style:{...wl,...e.style}}));xl.displayName=ey;var ty=xl,ny=[" ","Enter","ArrowUp","ArrowDown"],ry=[" ","Enter"],tn="Select",[mo,po,oy]=Ja(tn),[Tn,SM]=Ge(tn,[oy,Ht]),ho=Ht(),[ay,Gt]=Tn(tn),[sy,iy]=Tn(tn),Sl=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:a,value:i,defaultValue:s,onValueChange:c,dir:u,name:f,autoComplete:l,disabled:p,required:h,form:b}=e,g=ho(t),[v,w]=d.useState(null),[y,E]=d.useState(null),[M,C]=d.useState(!1),R=ur(u),[S,k]=ot({prop:r,defaultProp:o??!1,onChange:a,caller:tn}),[I,A]=ot({prop:i,defaultProp:s,onChange:c,caller:tn}),W=d.useRef(null),G=v?b||!!v.closest("form"):!0,[B,$]=d.useState(new Set),O=Array.from(B).map(D=>D.props.value).join(";");return m.jsx(ar,{...g,children:m.jsxs(ay,{required:h,scope:t,trigger:v,onTriggerChange:w,valueNode:y,onValueNodeChange:E,valueNodeHasChildren:M,onValueNodeHasChildrenChange:C,contentId:Pe(),value:I,onValueChange:A,open:S,onOpenChange:k,dir:R,triggerPointerDownPosRef:W,disabled:p,children:[m.jsx(mo.Provider,{scope:t,children:m.jsx(sy,{scope:e.__scopeSelect,onNativeOptionAdd:d.useCallback(D=>{$(_=>new Set(_).add(D))},[]),onNativeOptionRemove:d.useCallback(D=>{$(_=>{const N=new Set(_);return N.delete(D),N})},[]),children:n})}),G?m.jsxs(Gl,{"aria-hidden":!0,required:h,tabIndex:-1,name:f,autoComplete:l,value:I,onChange:D=>A(D.target.value),disabled:p,form:b,children:[I===void 0?m.jsx("option",{value:""}):null,Array.from(B)]},O):null]})})};Sl.displayName=tn;var El="SelectTrigger",Cl=d.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,a=ho(n),i=Gt(El,n),s=i.disabled||r,c=fe(t,i.onTriggerChange),u=po(n),f=d.useRef("touch"),[l,p,h]=Vl(g=>{const v=u().filter(E=>!E.disabled),w=v.find(E=>E.value===i.value),y=Kl(v,g,w);y!==void 0&&i.onValueChange(y.value)}),b=g=>{s||(i.onOpenChange(!0),h()),g&&(i.triggerPointerDownPosRef.current={x:Math.round(g.pageX),y:Math.round(g.pageY)})};return m.jsx(sr,{asChild:!0,...a,children:m.jsx(J.button,{type:"button",role:"combobox","aria-controls":i.contentId,"aria-expanded":i.open,"aria-required":i.required,"aria-autocomplete":"none",dir:i.dir,"data-state":i.open?"open":"closed",disabled:s,"data-disabled":s?"":void 0,"data-placeholder":ql(i.value)?"":void 0,...o,ref:c,onClick:K(o.onClick,g=>{g.currentTarget.focus(),f.current!=="mouse"&&b(g)}),onPointerDown:K(o.onPointerDown,g=>{f.current=g.pointerType;const v=g.target;v.hasPointerCapture(g.pointerId)&&v.releasePointerCapture(g.pointerId),g.button===0&&g.ctrlKey===!1&&g.pointerType==="mouse"&&(b(g),g.preventDefault())}),onKeyDown:K(o.onKeyDown,g=>{const v=l.current!=="";!(g.ctrlKey||g.altKey||g.metaKey)&&g.key.length===1&&p(g.key),!(v&&g.key===" ")&&ny.includes(g.key)&&(b(),g.preventDefault())})})})});Cl.displayName=El;var Dl="SelectValue",Ml=d.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:a,placeholder:i="",...s}=e,c=Gt(Dl,n),{onValueNodeHasChildrenChange:u}=c,f=a!==void 0,l=fe(t,c.onValueNodeChange);return Re(()=>{u(f)},[u,f]),m.jsx(J.span,{...s,ref:l,style:{pointerEvents:"none"},children:ql(c.value)?m.jsx(m.Fragment,{children:i}):a})});Ml.displayName=Dl;var cy="SelectIcon",Nl=d.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return m.jsx(J.span,{"aria-hidden":!0,...o,ref:t,children:r||"▼"})});Nl.displayName=cy;var ly="SelectPortal",kl=e=>m.jsx(ir,{asChild:!0,...e});kl.displayName=ly;var nn="SelectContent",Rl=d.forwardRef((e,t)=>{const n=Gt(nn,e.__scopeSelect),[r,o]=d.useState();if(Re(()=>{o(new DocumentFragment)},[]),!n.open){const a=r;return a?eo.createPortal(m.jsx(Ol,{scope:e.__scopeSelect,children:m.jsx(mo.Slot,{scope:e.__scopeSelect,children:m.jsx("div",{children:e.children})})}),a):null}return m.jsx(Tl,{...e,ref:t})});Rl.displayName=nn;var it=10,[Ol,qt]=Tn(nn),uy="SelectContentImpl",dy=Wt("SelectContent.RemoveScroll"),Tl=d.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:a,onPointerDownOutside:i,side:s,sideOffset:c,align:u,alignOffset:f,arrowPadding:l,collisionBoundary:p,collisionPadding:h,sticky:b,hideWhenDetached:g,avoidCollisions:v,...w}=e,y=Gt(nn,n),[E,M]=d.useState(null),[C,R]=d.useState(null),S=fe(t,F=>M(F)),[k,I]=d.useState(null),[A,W]=d.useState(null),G=po(n),[B,$]=d.useState(!1),O=d.useRef(!1);d.useEffect(()=>{if(E)return co(E)},[E]),Wa();const D=d.useCallback(F=>{const[X,...Z]=G().map(ae=>ae.ref.current),[Q]=Z.slice(-1),ee=document.activeElement;for(const ae of F)if(ae===ee||(ae==null||ae.scrollIntoView({block:"nearest"}),ae===X&&C&&(C.scrollTop=0),ae===Q&&C&&(C.scrollTop=C.scrollHeight),ae==null||ae.focus(),document.activeElement!==ee))return},[G,C]),_=d.useCallback(()=>D([k,E]),[D,k,E]);d.useEffect(()=>{B&&_()},[B,_]);const{onOpenChange:N,triggerPointerDownPosRef:P}=y;d.useEffect(()=>{if(E){let F={x:0,y:0};const X=Q=>{var ee,ae;F={x:Math.abs(Math.round(Q.pageX)-(((ee=P.current)==null?void 0:ee.x)??0)),y:Math.abs(Math.round(Q.pageY)-(((ae=P.current)==null?void 0:ae.y)??0))}},Z=Q=>{F.x<=10&&F.y<=10?Q.preventDefault():E.contains(Q.target)||N(!1),document.removeEventListener("pointermove",X),P.current=null};return P.current!==null&&(document.addEventListener("pointermove",X),document.addEventListener("pointerup",Z,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",X),document.removeEventListener("pointerup",Z,{capture:!0})}}},[E,N,P]),d.useEffect(()=>{const F=()=>N(!1);return window.addEventListener("blur",F),window.addEventListener("resize",F),()=>{window.removeEventListener("blur",F),window.removeEventListener("resize",F)}},[N]);const[Y,H]=Vl(F=>{const X=G().filter(ee=>!ee.disabled),Z=X.find(ee=>ee.ref.current===document.activeElement),Q=Kl(X,F,Z);Q&&setTimeout(()=>Q.ref.current.focus())}),T=d.useCallback((F,X,Z)=>{const Q=!O.current&&!Z;(y.value!==void 0&&y.value===X||Q)&&(I(F),Q&&(O.current=!0))},[y.value]),j=d.useCallback(()=>E==null?void 0:E.focus(),[E]),z=d.useCallback((F,X,Z)=>{const Q=!O.current&&!Z;(y.value!==void 0&&y.value===X||Q)&&W(F)},[y.value]),U=r==="popper"?va:Pl,q=U===va?{side:s,sideOffset:c,align:u,alignOffset:f,arrowPadding:l,collisionBoundary:p,collisionPadding:h,sticky:b,hideWhenDetached:g,avoidCollisions:v}:{};return m.jsx(Ol,{scope:n,content:E,viewport:C,onViewportChange:R,itemRefCallback:T,selectedItem:k,onItemLeave:j,itemTextRefCallback:z,focusSelectedItem:_,selectedItemText:A,position:r,isPositioned:B,searchRef:Y,children:m.jsx(cr,{as:dy,allowPinchZoom:!0,children:m.jsx(rr,{asChild:!0,trapped:y.open,onMountAutoFocus:F=>{F.preventDefault()},onUnmountAutoFocus:K(o,F=>{var X;(X=y.trigger)==null||X.focus({preventScroll:!0}),F.preventDefault()}),children:m.jsx(bl,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:i,onFocusOutside:F=>F.preventDefault(),onDismiss:()=>y.onOpenChange(!1),children:m.jsx(U,{role:"listbox",id:y.contentId,"data-state":y.open?"open":"closed",dir:y.dir,onContextMenu:F=>F.preventDefault(),...w,...q,onPlaced:()=>$(!0),ref:S,style:{display:"flex",flexDirection:"column",outline:"none",...w.style},onKeyDown:K(w.onKeyDown,F=>{const X=F.ctrlKey||F.altKey||F.metaKey;if(F.key==="Tab"&&F.preventDefault(),!X&&F.key.length===1&&H(F.key),["ArrowUp","ArrowDown","Home","End"].includes(F.key)){let Q=G().filter(ee=>!ee.disabled).map(ee=>ee.ref.current);if(["ArrowUp","End"].includes(F.key)&&(Q=Q.slice().reverse()),["ArrowUp","ArrowDown"].includes(F.key)){const ee=F.target,ae=Q.indexOf(ee);Q=Q.slice(ae+1)}setTimeout(()=>D(Q)),F.preventDefault()}})})})})})})});Tl.displayName=uy;var fy="SelectItemAlignedPosition",Pl=d.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,a=Gt(nn,n),i=qt(nn,n),[s,c]=d.useState(null),[u,f]=d.useState(null),l=fe(t,S=>f(S)),p=po(n),h=d.useRef(!1),b=d.useRef(!0),{viewport:g,selectedItem:v,selectedItemText:w,focusSelectedItem:y}=i,E=d.useCallback(()=>{if(a.trigger&&a.valueNode&&s&&u&&g&&v&&w){const S=a.trigger.getBoundingClientRect(),k=u.getBoundingClientRect(),I=a.valueNode.getBoundingClientRect(),A=w.getBoundingClientRect();if(a.dir!=="rtl"){const ee=A.left-k.left,ae=I.left-ee,be=S.left-ae,te=S.width+be,Te=Math.max(te,k.width),$e=window.innerWidth-it,Ce=pi(ae,[it,Math.max(it,$e-Te)]);s.style.minWidth=te+"px",s.style.left=Ce+"px"}else{const ee=k.right-A.right,ae=window.innerWidth-I.right-ee,be=window.innerWidth-S.right-ae,te=S.width+be,Te=Math.max(te,k.width),$e=window.innerWidth-it,Ce=pi(ae,[it,Math.max(it,$e-Te)]);s.style.minWidth=te+"px",s.style.right=Ce+"px"}const W=p(),G=window.innerHeight-it*2,B=g.scrollHeight,$=window.getComputedStyle(u),O=parseInt($.borderTopWidth,10),D=parseInt($.paddingTop,10),_=parseInt($.borderBottomWidth,10),N=parseInt($.paddingBottom,10),P=O+D+B+N+_,Y=Math.min(v.offsetHeight*5,P),H=window.getComputedStyle(g),T=parseInt(H.paddingTop,10),j=parseInt(H.paddingBottom,10),z=S.top+S.height/2-it,U=G-z,q=v.offsetHeight/2,F=v.offsetTop+q,X=O+D+F,Z=P-X;if(X<=z){const ee=W.length>0&&v===W[W.length-1].ref.current;s.style.bottom="0px";const ae=u.clientHeight-g.offsetTop-g.offsetHeight,be=Math.max(U,q+(ee?j:0)+ae+_),te=X+be;s.style.height=te+"px"}else{const ee=W.length>0&&v===W[0].ref.current;s.style.top="0px";const be=Math.max(z,O+g.offsetTop+(ee?T:0)+q)+Z;s.style.height=be+"px",g.scrollTop=X-z+g.offsetTop}s.style.margin=`${it}px 0`,s.style.minHeight=Y+"px",s.style.maxHeight=G+"px",r==null||r(),requestAnimationFrame(()=>h.current=!0)}},[p,a.trigger,a.valueNode,s,u,g,v,w,a.dir,r]);Re(()=>E(),[E]);const[M,C]=d.useState();Re(()=>{u&&C(window.getComputedStyle(u).zIndex)},[u]);const R=d.useCallback(S=>{S&&b.current===!0&&(E(),y==null||y(),b.current=!1)},[E,y]);return m.jsx(py,{scope:n,contentWrapper:s,shouldExpandOnScrollRef:h,onScrollButtonChange:R,children:m.jsx("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:M},children:m.jsx(J.div,{...o,ref:l,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});Pl.displayName=fy;var my="SelectPopperPosition",va=d.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=it,...a}=e,i=ho(n);return m.jsx(so,{...i,...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)"}})});va.displayName=my;var[py,ts]=Tn(nn,{}),ba="SelectViewport",_l=d.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...o}=e,a=qt(ba,n),i=ts(ba,n),s=fe(t,a.onViewportChange),c=d.useRef(0);return m.jsxs(m.Fragment,{children:[m.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}),m.jsx(mo.Slot,{scope:n,children:m.jsx(J.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:s,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:K(o.onScroll,u=>{const f=u.currentTarget,{contentWrapper:l,shouldExpandOnScrollRef:p}=i;if(p!=null&&p.current&&l){const h=Math.abs(c.current-f.scrollTop);if(h>0){const b=window.innerHeight-it*2,g=parseFloat(l.style.minHeight),v=parseFloat(l.style.height),w=Math.max(g,v);if(w<b){const y=w+h,E=Math.min(b,y),M=y-E;l.style.height=E+"px",l.style.bottom==="0px"&&(f.scrollTop=M>0?M:0,l.style.justifyContent="flex-end")}}}c.current=f.scrollTop})})})]})});_l.displayName=ba;var Al="SelectGroup",[hy,gy]=Tn(Al),vy=d.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Pe();return m.jsx(hy,{scope:n,id:o,children:m.jsx(J.div,{role:"group","aria-labelledby":o,...r,ref:t})})});vy.displayName=Al;var Il="SelectLabel",jl=d.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=gy(Il,n);return m.jsx(J.div,{id:o.id,...r,ref:t})});jl.displayName=Il;var Hr="SelectItem",[by,$l]=Tn(Hr),Ll=d.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:a,...i}=e,s=Gt(Hr,n),c=qt(Hr,n),u=s.value===r,[f,l]=d.useState(a??""),[p,h]=d.useState(!1),b=fe(t,y=>{var E;return(E=c.itemRefCallback)==null?void 0:E.call(c,y,r,o)}),g=Pe(),v=d.useRef("touch"),w=()=>{o||(s.onValueChange(r),s.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 m.jsx(by,{scope:n,value:r,disabled:o,textId:g,isSelected:u,onItemTextChange:d.useCallback(y=>{l(E=>E||((y==null?void 0:y.textContent)??"").trim())},[]),children:m.jsx(mo.ItemSlot,{scope:n,value:r,disabled:o,textValue:f,children:m.jsx(J.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,...i,ref:b,onFocus:K(i.onFocus,()=>h(!0)),onBlur:K(i.onBlur,()=>h(!1)),onClick:K(i.onClick,()=>{v.current!=="mouse"&&w()}),onPointerUp:K(i.onPointerUp,()=>{v.current==="mouse"&&w()}),onPointerDown:K(i.onPointerDown,y=>{v.current=y.pointerType}),onPointerMove:K(i.onPointerMove,y=>{var E;v.current=y.pointerType,o?(E=c.onItemLeave)==null||E.call(c):v.current==="mouse"&&y.currentTarget.focus({preventScroll:!0})}),onPointerLeave:K(i.onPointerLeave,y=>{var E;y.currentTarget===document.activeElement&&((E=c.onItemLeave)==null||E.call(c))}),onKeyDown:K(i.onKeyDown,y=>{var M;((M=c.searchRef)==null?void 0:M.current)!==""&&y.key===" "||(ry.includes(y.key)&&w(),y.key===" "&&y.preventDefault())})})})})});Ll.displayName=Hr;var Yn="SelectItemText",Fl=d.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,...a}=e,i=Gt(Yn,n),s=qt(Yn,n),c=$l(Yn,n),u=iy(Yn,n),[f,l]=d.useState(null),p=fe(t,w=>l(w),c.onItemTextChange,w=>{var y;return(y=s.itemTextRefCallback)==null?void 0:y.call(s,w,c.value,c.disabled)}),h=f==null?void 0:f.textContent,b=d.useMemo(()=>m.jsx("option",{value:c.value,disabled:c.disabled,children:h},c.value),[c.disabled,c.value,h]),{onNativeOptionAdd:g,onNativeOptionRemove:v}=u;return Re(()=>(g(b),()=>v(b)),[g,v,b]),m.jsxs(m.Fragment,{children:[m.jsx(J.span,{id:c.textId,...a,ref:p}),c.isSelected&&i.valueNode&&!i.valueNodeHasChildren?eo.createPortal(a.children,i.valueNode):null]})});Fl.displayName=Yn;var Wl="SelectItemIndicator",Bl=d.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return $l(Wl,n).isSelected?m.jsx(J.span,{"aria-hidden":!0,...r,ref:t}):null});Bl.displayName=Wl;var ya="SelectScrollUpButton",Yl=d.forwardRef((e,t)=>{const n=qt(ya,e.__scopeSelect),r=ts(ya,e.__scopeSelect),[o,a]=d.useState(!1),i=fe(t,r.onScrollButtonChange);return Re(()=>{if(n.viewport&&n.isPositioned){let s=function(){const u=c.scrollTop>0;a(u)};const c=n.viewport;return s(),c.addEventListener("scroll",s),()=>c.removeEventListener("scroll",s)}},[n.viewport,n.isPositioned]),o?m.jsx(Hl,{...e,ref:i,onAutoScroll:()=>{const{viewport:s,selectedItem:c}=n;s&&c&&(s.scrollTop=s.scrollTop-c.offsetHeight)}}):null});Yl.displayName=ya;var wa="SelectScrollDownButton",zl=d.forwardRef((e,t)=>{const n=qt(wa,e.__scopeSelect),r=ts(wa,e.__scopeSelect),[o,a]=d.useState(!1),i=fe(t,r.onScrollButtonChange);return Re(()=>{if(n.viewport&&n.isPositioned){let s=function(){const u=c.scrollHeight-c.clientHeight,f=Math.ceil(c.scrollTop)<u;a(f)};const c=n.viewport;return s(),c.addEventListener("scroll",s),()=>c.removeEventListener("scroll",s)}},[n.viewport,n.isPositioned]),o?m.jsx(Hl,{...e,ref:i,onAutoScroll:()=>{const{viewport:s,selectedItem:c}=n;s&&c&&(s.scrollTop=s.scrollTop+c.offsetHeight)}}):null});zl.displayName=wa;var Hl=d.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,a=qt("SelectScrollButton",n),i=d.useRef(null),s=po(n),c=d.useCallback(()=>{i.current!==null&&(window.clearInterval(i.current),i.current=null)},[]);return d.useEffect(()=>()=>c(),[c]),Re(()=>{var f;const u=s().find(l=>l.ref.current===document.activeElement);(f=u==null?void 0:u.ref.current)==null||f.scrollIntoView({block:"nearest"})},[s]),m.jsx(J.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:K(o.onPointerDown,()=>{i.current===null&&(i.current=window.setInterval(r,50))}),onPointerMove:K(o.onPointerMove,()=>{var u;(u=a.onItemLeave)==null||u.call(a),i.current===null&&(i.current=window.setInterval(r,50))}),onPointerLeave:K(o.onPointerLeave,()=>{c()})})}),yy="SelectSeparator",Ul=d.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return m.jsx(J.div,{"aria-hidden":!0,...r,ref:t})});Ul.displayName=yy;var xa="SelectArrow",wy=d.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=ho(n),a=Gt(xa,n),i=qt(xa,n);return a.open&&i.position==="popper"?m.jsx(io,{...o,...r,ref:t}):null});wy.displayName=xa;var xy="SelectBubbleInput",Gl=d.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const o=d.useRef(null),a=fe(r,o),i=es(t);return d.useEffect(()=>{const s=o.current;if(!s)return;const c=window.HTMLSelectElement.prototype,f=Object.getOwnPropertyDescriptor(c,"value").set;if(i!==t&&f){const l=new Event("change",{bubbles:!0});f.call(s,t),s.dispatchEvent(l)}},[i,t]),m.jsx(J.select,{...n,style:{...wl,...n.style},ref:a,defaultValue:t})});Gl.displayName=xy;function ql(e){return e===""||e===void 0}function Vl(e){const t=je(e),n=d.useRef(""),r=d.useRef(0),o=d.useCallback(i=>{const s=n.current+i;t(s),function c(u){n.current=u,window.clearTimeout(r.current),u!==""&&(r.current=window.setTimeout(()=>c(""),1e3))}(s)},[t]),a=d.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return d.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,o,a]}function Kl(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 i=Sy(e,Math.max(a,0));o.length===1&&(i=i.filter(u=>u!==n));const c=i.find(u=>u.textValue.toLowerCase().startsWith(o.toLowerCase()));return c!==n?c:void 0}function Sy(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var Ey=Sl,Xl=Cl,Cy=Ml,Dy=Nl,My=kl,Zl=Rl,Ny=_l,Ql=jl,Jl=Ll,ky=Fl,Ry=Bl,eu=Yl,tu=zl,nu=Ul;const Sa=Ey,Ea=Cy,Ur=d.forwardRef(({className:e,children:t,...n},r)=>m.jsxs(Xl,{ref:r,className:L("flex h-10 w-full items-center justify-between rounded-md border border-gray-300 bg-background px-3 py-2 text-sm ring-offset-background data-[placeholder]:text-muted-foreground focus:outline-none disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...n,children:[t,m.jsx(Dy,{asChild:!0,children:m.jsx(tr,{strokeWidth:1.5,className:"h-4 w-4 text-foreground"})})]}));Ur.displayName=Xl.displayName;const ru=d.forwardRef(({className:e,...t},n)=>m.jsx(eu,{ref:n,className:L("flex cursor-default items-center justify-center py-1",e),...t,children:m.jsx(Ph,{className:"h-4 w-4"})}));ru.displayName=eu.displayName;const ou=d.forwardRef(({className:e,...t},n)=>m.jsx(tu,{ref:n,className:L("flex cursor-default items-center justify-center py-1",e),...t,children:m.jsx(tr,{className:"h-4 w-4"})}));ou.displayName=tu.displayName;const Gr=d.forwardRef(({className:e,children:t,position:n="popper",...r},o)=>m.jsx(My,{children:m.jsxs(Zl,{ref:o,className:L("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:[m.jsx(ru,{}),m.jsx(Ny,{className:L("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),m.jsx(ou,{})]})}));Gr.displayName=Zl.displayName;const Oy=d.forwardRef(({className:e,...t},n)=>m.jsx(Ql,{ref:n,className:L("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}));Oy.displayName=Ql.displayName;const qr=d.forwardRef(({className:e,children:t,...n},r)=>m.jsxs(Jl,{ref:r,className:L("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:[m.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:m.jsx(Ry,{children:m.jsx(er,{className:"h-4 w-4"})})}),m.jsx(ky,{children:t})]}));qr.displayName=Jl.displayName;const Ty=d.forwardRef(({className:e,...t},n)=>m.jsx(nu,{ref:n,className:L("-mx-1 my-1 h-px bg-muted",e),...t}));Ty.displayName=nu.displayName;const Yo={},zn={};function Un(e,t){try{const r=(Yo[e]||(Yo[e]=new Intl.DateTimeFormat("en-GB",{timeZone:e,hour:"numeric",timeZoneName:"longOffset"}).format))(t).split("GMT")[1]||"";return r in zn?zn[r]:vi(r,r.split(":"))}catch{if(e in zn)return zn[e];const n=e==null?void 0:e.match(Py);return n?vi(e,n.slice(1)):NaN}}const Py=/([+-]\d\d):?(\d\d)?/;function vi(e,t){const n=+t[0],r=+(t[1]||0);return zn[e]=n>0?n*60+r:n*60-r}class vt 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)),au(this),Ca(this)):this.setTime(Date.now())}static tz(t,...n){return n.length?new vt(...n,t):new vt(Date.now(),t)}withTimeZone(t){return new vt(+this,t)}getTimezoneOffset(){return-Un(this.timeZone,this)}setTime(t){return Date.prototype.setTime.apply(this,arguments),Ca(this),+this}[Symbol.for("constructDateFrom")](t){return new vt(+new Date(t),this.timeZone)}}const bi=/^(get|set)(?!UTC)/;Object.getOwnPropertyNames(Date.prototype).forEach(e=>{if(!bi.test(e))return;const t=e.replace(bi,"$1UTC");vt.prototype[t]&&(e.startsWith("get")?vt.prototype[e]=function(){return this.internal[t]()}:(vt.prototype[e]=function(){return Date.prototype[t].apply(this.internal,arguments),_y(this),+this},vt.prototype[t]=function(){return Date.prototype[t].apply(this,arguments),Ca(this),+this}))});function Ca(e){e.internal.setTime(+e),e.internal.setUTCMinutes(e.internal.getUTCMinutes()-e.getTimezoneOffset())}function _y(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()),au(e)}function au(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,i=Date.prototype.getHours.apply(e)!==e.internal.getUTCHours();a&&i&&e.internal.setUTCMinutes(e.internal.getUTCMinutes()+a);const s=r-t;s&&Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+s);const c=Un(e.timeZone,e),f=-new Date(+e).getTimezoneOffset()-c,l=c!==t,p=f-s;if(l&&p){Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+p);const h=Un(e.timeZone,e),b=c-h;b&&(e.internal.setUTCMinutes(e.internal.getUTCMinutes()+b),Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+b))}}class Ue extends vt{static tz(t,...n){return n.length?new Ue(...n,t):new Ue(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} (${Ay(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 Ue(+this,t)}[Symbol.for("constructDateFrom")](t){return new Ue(+new Date(t),this.timeZone)}}function Ay(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 ke;(function(e){e.disabled="disabled",e.hidden="hidden",e.outside="outside",e.focused="focused",e.today="today"})(ke||(ke={}));var ct;(function(e){e.range_end="range_end",e.range_middle="range_middle",e.range_start="range_start",e.selected="selected"})(ct||(ct={}));var Je;(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"})(Je||(Je={}));const su=6048e5,Iy=864e5,yi=Symbol.for("constructDateFrom");function We(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&yi in e?e[yi](t):e instanceof Date?new e.constructor(t):new Date(t)}function Se(e,t){return We(t||e,e)}function iu(e,t,n){const r=Se(e,n==null?void 0:n.in);return isNaN(t)?We(e,NaN):(t&&r.setDate(r.getDate()+t),r)}function cu(e,t,n){const r=Se(e,n==null?void 0:n.in);if(isNaN(t))return We(e,NaN);if(!t)return r;const o=r.getDate(),a=We(e,r.getTime());a.setMonth(r.getMonth()+t+1,0);const i=a.getDate();return o>=i?a:(r.setFullYear(a.getFullYear(),a.getMonth(),o),r)}let jy={};function dr(){return jy}function En(e,t){var s,c,u,f;const n=dr(),r=(t==null?void 0:t.weekStartsOn)??((c=(s=t==null?void 0:t.locale)==null?void 0:s.options)==null?void 0:c.weekStartsOn)??n.weekStartsOn??((f=(u=n.locale)==null?void 0:u.options)==null?void 0:f.weekStartsOn)??0,o=Se(e,t==null?void 0:t.in),a=o.getDay(),i=(a<r?7:0)+a-r;return o.setDate(o.getDate()-i),o.setHours(0,0,0,0),o}function Kn(e,t){return En(e,{...t,weekStartsOn:1})}function lu(e,t){const n=Se(e,t==null?void 0:t.in),r=n.getFullYear(),o=We(n,0);o.setFullYear(r+1,0,4),o.setHours(0,0,0,0);const a=Kn(o),i=We(n,0);i.setFullYear(r,0,4),i.setHours(0,0,0,0);const s=Kn(i);return n.getTime()>=a.getTime()?r+1:n.getTime()>=s.getTime()?r:r-1}function wi(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 Pn(e,...t){const n=We.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 uu(e,t,n){const[r,o]=Pn(n==null?void 0:n.in,e,t),a=Xn(r),i=Xn(o),s=+a-wi(a),c=+i-wi(i);return Math.round((s-c)/Iy)}function $y(e,t){const n=lu(e,t),r=We(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),Kn(r)}function Ly(e,t,n){return iu(e,t*7,n)}function Fy(e,t,n){return cu(e,t*12,n)}function Wy(e,t){let n,r=t==null?void 0:t.in;return e.forEach(o=>{!r&&typeof o=="object"&&(r=We.bind(null,o));const a=Se(o,r);(!n||n<a||isNaN(+a))&&(n=a)}),We(r,n||NaN)}function By(e,t){let n,r=t==null?void 0:t.in;return e.forEach(o=>{!r&&typeof o=="object"&&(r=We.bind(null,o));const a=Se(o,r);(!n||n>a||isNaN(+a))&&(n=a)}),We(r,n||NaN)}function Yy(e,t,n){const[r,o]=Pn(n==null?void 0:n.in,e,t);return+Xn(r)==+Xn(o)}function du(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function zy(e){return!(!du(e)&&typeof e!="number"||isNaN(+Se(e)))}function Hy(e,t,n){const[r,o]=Pn(n==null?void 0:n.in,e,t),a=r.getFullYear()-o.getFullYear(),i=r.getMonth()-o.getMonth();return a*12+i}function Uy(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 Gy(e,t){const[n,r]=Pn(e,t.start,t.end);return{start:n,end:r}}function qy(e,t){const{start:n,end:r}=Gy(t==null?void 0:t.in,e);let o=+n>+r;const a=o?+n:+r,i=o?r:n;i.setHours(0,0,0,0),i.setDate(1);let s=1;const c=[];for(;+i<=a;)c.push(We(n,i)),i.setMonth(i.getMonth()+s);return o?c.reverse():c}function Vy(e,t){const n=Se(e,t==null?void 0:t.in);return n.setDate(1),n.setHours(0,0,0,0),n}function Ky(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 fu(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 mu(e,t){var s,c,u,f;const n=dr(),r=(t==null?void 0:t.weekStartsOn)??((c=(s=t==null?void 0:t.locale)==null?void 0:s.options)==null?void 0:c.weekStartsOn)??n.weekStartsOn??((f=(u=n.locale)==null?void 0:u.options)==null?void 0:f.weekStartsOn)??0,o=Se(e,t==null?void 0:t.in),a=o.getDay(),i=(a<r?-7:0)+6-(a-r);return o.setDate(o.getDate()+i),o.setHours(23,59,59,999),o}function Xy(e,t){return mu(e,{...t,weekStartsOn:1})}const Zy={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"}},Qy=(e,t,n)=>{let r;const o=Zy[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 zo(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const Jy={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},ew={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},tw={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},nw={date:zo({formats:Jy,defaultWidth:"full"}),time:zo({formats:ew,defaultWidth:"full"}),dateTime:zo({formats:tw,defaultWidth:"full"})},rw={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},ow=(e,t,n,r)=>rw[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 i=e.defaultFormattingWidth||e.defaultWidth,s=n!=null&&n.width?String(n.width):i;o=e.formattingValues[s]||e.formattingValues[i]}else{const i=e.defaultWidth,s=n!=null&&n.width?String(n.width):e.defaultWidth;o=e.values[s]||e.values[i]}const a=e.argumentCallback?e.argumentCallback(t):t;return o[a]}}const aw={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},sw={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},iw={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"]},cw={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"]},lw={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"}},uw={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"}},dw=(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"},fw={ordinalNumber:dw,era:$n({values:aw,defaultWidth:"wide"}),quarter:$n({values:sw,defaultWidth:"wide",argumentCallback:e=>e-1}),month:$n({values:iw,defaultWidth:"wide"}),day:$n({values:cw,defaultWidth:"wide"}),dayPeriod:$n({values:lw,defaultWidth:"wide",formattingValues:uw,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 i=a[0],s=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(s)?pw(s,l=>l.test(i)):mw(s,l=>l.test(i));let u;u=e.valueCallback?e.valueCallback(c):c,u=n.valueCallback?n.valueCallback(u):u;const f=t.slice(i.length);return{value:u,rest:f}}}function mw(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function pw(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function hw(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 i=e.valueCallback?e.valueCallback(a[0]):a[0];i=n.valueCallback?n.valueCallback(i):i;const s=t.slice(o.length);return{value:i,rest:s}}}const gw=/^(\d+)(th|st|nd|rd)?/i,vw=/\d+/i,bw={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},yw={any:[/^b/i,/^(a|c)/i]},ww={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},xw={any:[/1/i,/2/i,/3/i,/4/i]},Sw={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},Ew={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]},Cw={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},Dw={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]},Mw={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},Nw={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}},kw={ordinalNumber:hw({matchPattern:gw,parsePattern:vw,valueCallback:e=>parseInt(e,10)}),era:Ln({matchPatterns:bw,defaultMatchWidth:"wide",parsePatterns:yw,defaultParseWidth:"any"}),quarter:Ln({matchPatterns:ww,defaultMatchWidth:"wide",parsePatterns:xw,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Ln({matchPatterns:Sw,defaultMatchWidth:"wide",parsePatterns:Ew,defaultParseWidth:"any"}),day:Ln({matchPatterns:Cw,defaultMatchWidth:"wide",parsePatterns:Dw,defaultParseWidth:"any"}),dayPeriod:Ln({matchPatterns:Mw,defaultMatchWidth:"any",parsePatterns:Nw,defaultParseWidth:"any"})},ns={code:"en-US",formatDistance:Qy,formatLong:nw,formatRelative:ow,localize:fw,match:kw,options:{weekStartsOn:0,firstWeekContainsDate:1}};function Rw(e,t){const n=Se(e,t==null?void 0:t.in);return uu(n,fu(n))+1}function pu(e,t){const n=Se(e,t==null?void 0:t.in),r=+Kn(n)-+$y(n);return Math.round(r/su)+1}function hu(e,t){var f,l,p,h;const n=Se(e,t==null?void 0:t.in),r=n.getFullYear(),o=dr(),a=(t==null?void 0:t.firstWeekContainsDate)??((l=(f=t==null?void 0:t.locale)==null?void 0:f.options)==null?void 0:l.firstWeekContainsDate)??o.firstWeekContainsDate??((h=(p=o.locale)==null?void 0:p.options)==null?void 0:h.firstWeekContainsDate)??1,i=We((t==null?void 0:t.in)||e,0);i.setFullYear(r+1,0,a),i.setHours(0,0,0,0);const s=En(i,t),c=We((t==null?void 0:t.in)||e,0);c.setFullYear(r,0,a),c.setHours(0,0,0,0);const u=En(c,t);return+n>=+s?r+1:+n>=+u?r:r-1}function Ow(e,t){var s,c,u,f;const n=dr(),r=(t==null?void 0:t.firstWeekContainsDate)??((c=(s=t==null?void 0:t.locale)==null?void 0:s.options)==null?void 0:c.firstWeekContainsDate)??n.firstWeekContainsDate??((f=(u=n.locale)==null?void 0:u.options)==null?void 0:f.firstWeekContainsDate)??1,o=hu(e,t),a=We((t==null?void 0:t.in)||e,0);return a.setFullYear(o,0,r),a.setHours(0,0,0,0),En(a,t)}function gu(e,t){const n=Se(e,t==null?void 0:t.in),r=+En(n,t)-+Ow(n,t);return Math.round(r/su)+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)}},gn={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},xi={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=hu(e,r),a=o>0?o:1-o;if(t==="YY"){const i=a%100;return we(i,2)}return t==="Yo"?n.ordinalNumber(a,{unit:"year"}):we(a,t.length)},R:function(e,t){const n=lu(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=gu(e,r);return t==="wo"?n.ordinalNumber(o,{unit:"week"}):we(o,t.length)},I:function(e,t,n){const r=pu(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=Rw(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=gn.noon:r===0?o=gn.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=gn.evening:r>=12?o=gn.afternoon:r>=4?o=gn.morning:o=gn.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 Ei(r);case"XXXX":case"XX":return Jt(r);case"XXXXX":case"XXX":default:return Jt(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return Ei(r);case"xxxx":case"xx":return Jt(r);case"xxxxx":case"xxx":default:return Jt(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Si(r,":");case"OOOO":default:return"GMT"+Jt(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Si(r,":");case"zzzz":default:return"GMT"+Jt(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 Si(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 Ei(e,t){return e%60===0?(e>0?"-":"+")+we(Math.abs(e)/60,2):Jt(e,t)}function Jt(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 Ci=(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"})}},vu=(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"})}},Tw=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return Ci(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}}",Ci(r,t)).replace("{{time}}",vu(o,t))},Pw={p:vu,P:Tw},_w=/^D+$/,Aw=/^Y+$/,Iw=["D","DD","YY","YYYY"];function jw(e){return _w.test(e)}function $w(e){return Aw.test(e)}function Lw(e,t,n){const r=Fw(e,t,n);if(console.warn(r),Iw.includes(e))throw new RangeError(r)}function Fw(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 Ww=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Bw=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Yw=/^'([^]*?)'?$/,zw=/''/g,Hw=/[a-zA-Z]/;function Uw(e,t,n){var f,l,p,h,b,g,v,w;const r=dr(),o=(n==null?void 0:n.locale)??r.locale??ns,a=(n==null?void 0:n.firstWeekContainsDate)??((l=(f=n==null?void 0:n.locale)==null?void 0:f.options)==null?void 0:l.firstWeekContainsDate)??r.firstWeekContainsDate??((h=(p=r.locale)==null?void 0:p.options)==null?void 0:h.firstWeekContainsDate)??1,i=(n==null?void 0:n.weekStartsOn)??((g=(b=n==null?void 0:n.locale)==null?void 0:b.options)==null?void 0:g.weekStartsOn)??r.weekStartsOn??((w=(v=r.locale)==null?void 0:v.options)==null?void 0:w.weekStartsOn)??0,s=Se(e,n==null?void 0:n.in);if(!zy(s))throw new RangeError("Invalid time value");let c=t.match(Bw).map(y=>{const E=y[0];if(E==="p"||E==="P"){const M=Pw[E];return M(y,o.formatLong)}return y}).join("").match(Ww).map(y=>{if(y==="''")return{isToken:!1,value:"'"};const E=y[0];if(E==="'")return{isToken:!1,value:Gw(y)};if(xi[E])return{isToken:!0,value:y};if(E.match(Hw))throw new RangeError("Format string contains an unescaped latin alphabet character `"+E+"`");return{isToken:!1,value:y}});o.localize.preprocessor&&(c=o.localize.preprocessor(s,c));const u={firstWeekContainsDate:a,weekStartsOn:i,locale:o};return c.map(y=>{if(!y.isToken)return y.value;const E=y.value;(!(n!=null&&n.useAdditionalWeekYearTokens)&&$w(E)||!(n!=null&&n.useAdditionalDayOfYearTokens)&&jw(E))&&Lw(E,t,String(e));const M=xi[E[0]];return M(s,E,o.localize,u)}).join("")}function Gw(e){const t=e.match(Yw);return t?t[1].replace(zw,"'"):e}function qw(e,t){const n=Se(e,t==null?void 0:t.in),r=n.getFullYear(),o=n.getMonth(),a=We(n,0);return a.setFullYear(r,o+1,0),a.setHours(0,0,0,0),a.getDate()}function Vw(e,t){return Se(e,t==null?void 0:t.in).getMonth()}function Kw(e,t){return Se(e,t==null?void 0:t.in).getFullYear()}function Xw(e,t){return+Se(e)>+Se(t)}function Zw(e,t){return+Se(e)<+Se(t)}function Qw(e,t,n){const[r,o]=Pn(n==null?void 0:n.in,e,t);return r.getFullYear()===o.getFullYear()&&r.getMonth()===o.getMonth()}function Jw(e,t,n){const[r,o]=Pn(n==null?void 0:n.in,e,t);return r.getFullYear()===o.getFullYear()}function ex(e,t,n){const r=Se(e,n==null?void 0:n.in),o=r.getFullYear(),a=r.getDate(),i=We(e,0);i.setFullYear(o,t,15),i.setHours(0,0,0,0);const s=qw(i);return r.setMonth(t,Math.min(a,s)),r}function tx(e,t,n){const r=Se(e,n==null?void 0:n.in);return isNaN(+r)?We(e,NaN):(r.setFullYear(t),r)}const Di=5,nx=4;function rx(e,t){const n=t.startOfMonth(e),r=n.getDay()>0?n.getDay():7,o=t.addDays(e,-r+1),a=t.addDays(o,Di*7-1);return t.getMonth(e)===t.getMonth(a)?Di:nx}function bu(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 ox(e,t){const n=bu(e,t),r=rx(e,t);return t.addDays(n,r*7-1)}class Tt{constructor(t,n){this.Date=Date,this.today=()=>{var r;return(r=this.overrides)!=null&&r.today?this.overrides.today():this.options.timeZone?Ue.tz(this.options.timeZone):new this.Date},this.newDate=(r,o,a)=>{var i;return(i=this.overrides)!=null&&i.newDate?this.overrides.newDate(r,o,a):this.options.timeZone?new Ue(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):iu(r,o)},this.addMonths=(r,o)=>{var a;return(a=this.overrides)!=null&&a.addMonths?this.overrides.addMonths(r,o):cu(r,o)},this.addWeeks=(r,o)=>{var a;return(a=this.overrides)!=null&&a.addWeeks?this.overrides.addWeeks(r,o):Ly(r,o)},this.addYears=(r,o)=>{var a;return(a=this.overrides)!=null&&a.addYears?this.overrides.addYears(r,o):Fy(r,o)},this.differenceInCalendarDays=(r,o)=>{var a;return(a=this.overrides)!=null&&a.differenceInCalendarDays?this.overrides.differenceInCalendarDays(r,o):uu(r,o)},this.differenceInCalendarMonths=(r,o)=>{var a;return(a=this.overrides)!=null&&a.differenceInCalendarMonths?this.overrides.differenceInCalendarMonths(r,o):Hy(r,o)},this.eachMonthOfInterval=r=>{var o;return(o=this.overrides)!=null&&o.eachMonthOfInterval?this.overrides.eachMonthOfInterval(r):qy(r)},this.endOfBroadcastWeek=r=>{var o;return(o=this.overrides)!=null&&o.endOfBroadcastWeek?this.overrides.endOfBroadcastWeek(r):ox(r,this)},this.endOfISOWeek=r=>{var o;return(o=this.overrides)!=null&&o.endOfISOWeek?this.overrides.endOfISOWeek(r):Xy(r)},this.endOfMonth=r=>{var o;return(o=this.overrides)!=null&&o.endOfMonth?this.overrides.endOfMonth(r):Uy(r)},this.endOfWeek=(r,o)=>{var a;return(a=this.overrides)!=null&&a.endOfWeek?this.overrides.endOfWeek(r,o):mu(r,this.options)},this.endOfYear=r=>{var o;return(o=this.overrides)!=null&&o.endOfYear?this.overrides.endOfYear(r):Ky(r)},this.format=(r,o,a)=>{var s;const i=(s=this.overrides)!=null&&s.format?this.overrides.format(r,o,this.options):Uw(r,o,this.options);return this.options.numerals&&this.options.numerals!=="latn"?this.replaceDigits(i):i},this.getISOWeek=r=>{var o;return(o=this.overrides)!=null&&o.getISOWeek?this.overrides.getISOWeek(r):pu(r)},this.getMonth=(r,o)=>{var a;return(a=this.overrides)!=null&&a.getMonth?this.overrides.getMonth(r,this.options):Vw(r,this.options)},this.getYear=(r,o)=>{var a;return(a=this.overrides)!=null&&a.getYear?this.overrides.getYear(r,this.options):Kw(r,this.options)},this.getWeek=(r,o)=>{var a;return(a=this.overrides)!=null&&a.getWeek?this.overrides.getWeek(r,this.options):gu(r,this.options)},this.isAfter=(r,o)=>{var a;return(a=this.overrides)!=null&&a.isAfter?this.overrides.isAfter(r,o):Xw(r,o)},this.isBefore=(r,o)=>{var a;return(a=this.overrides)!=null&&a.isBefore?this.overrides.isBefore(r,o):Zw(r,o)},this.isDate=r=>{var o;return(o=this.overrides)!=null&&o.isDate?this.overrides.isDate(r):du(r)},this.isSameDay=(r,o)=>{var a;return(a=this.overrides)!=null&&a.isSameDay?this.overrides.isSameDay(r,o):Yy(r,o)},this.isSameMonth=(r,o)=>{var a;return(a=this.overrides)!=null&&a.isSameMonth?this.overrides.isSameMonth(r,o):Qw(r,o)},this.isSameYear=(r,o)=>{var a;return(a=this.overrides)!=null&&a.isSameYear?this.overrides.isSameYear(r,o):Jw(r,o)},this.max=r=>{var o;return(o=this.overrides)!=null&&o.max?this.overrides.max(r):Wy(r)},this.min=r=>{var o;return(o=this.overrides)!=null&&o.min?this.overrides.min(r):By(r)},this.setMonth=(r,o)=>{var a;return(a=this.overrides)!=null&&a.setMonth?this.overrides.setMonth(r,o):ex(r,o)},this.setYear=(r,o)=>{var a;return(a=this.overrides)!=null&&a.setYear?this.overrides.setYear(r,o):tx(r,o)},this.startOfBroadcastWeek=(r,o)=>{var a;return(a=this.overrides)!=null&&a.startOfBroadcastWeek?this.overrides.startOfBroadcastWeek(r,this):bu(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):Vy(r)},this.startOfWeek=(r,o)=>{var a;return(a=this.overrides)!=null&&a.startOfWeek?this.overrides.startOfWeek(r,this.options):En(r,this.options)},this.startOfYear=r=>{var o;return(o=this.overrides)!=null&&o.startOfYear?this.overrides.startOfYear(r):fu(r)},this.options={locale:ns,...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 xt=new Tt;class yu{constructor(t,n,r=xt){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 ax{constructor(t,n){this.date=t,this.weeks=n}}class sx{constructor(t,n){this.days=n,this.weekNumber=t}}function Ct(e,t,n=!1,r=xt){let{from:o,to:a}=e;const{differenceInCalendarDays:i,isSameDay:s}=r;return o&&a?(i(a,o)<0&&([o,a]=[a,o]),i(t,o)>=(n?1:0)&&i(a,t)>=(n?1:0)):!n&&a?s(a,t):!n&&o?s(o,t):!1}function wu(e){return!!(e&&typeof e=="object"&&"before"in e&&"after"in e)}function rs(e){return!!(e&&typeof e=="object"&&"from"in e)}function xu(e){return!!(e&&typeof e=="object"&&"after"in e)}function Su(e){return!!(e&&typeof e=="object"&&"before"in e)}function Eu(e){return!!(e&&typeof e=="object"&&"dayOfWeek"in e)}function Cu(e,t){return Array.isArray(e)&&e.every(t.isDate)}function Dt(e,t,n=xt){const r=Array.isArray(t)?t:[t],{isSameDay:o,differenceInCalendarDays:a,isAfter:i}=n;return r.some(s=>{if(typeof s=="boolean")return s;if(n.isDate(s))return o(e,s);if(Cu(s,n))return s.includes(e);if(rs(s))return Ct(s,e,!1,n);if(Eu(s))return Array.isArray(s.dayOfWeek)?s.dayOfWeek.includes(e.getDay()):s.dayOfWeek===e.getDay();if(wu(s)){const c=a(s.before,e),u=a(s.after,e),f=c>0,l=u<0;return i(s.before,s.after)?l&&f:f||l}return xu(s)?a(e,s.after)>0:Su(s)?a(s.before,e)>0:typeof s=="function"?s(e):!1})}function ix(e,t,n,r,o){const{disabled:a,hidden:i,modifiers:s,showOutsideDays:c,broadcastCalendar:u,today:f}=t,{isSameDay:l,isSameMonth:p,startOfMonth:h,isBefore:b,endOfMonth:g,isAfter:v}=o,w=n&&h(n),y=r&&g(r),E={[ke.focused]:[],[ke.outside]:[],[ke.disabled]:[],[ke.hidden]:[],[ke.today]:[]},M={};for(const C of e){const{date:R,displayMonth:S}=C,k=!!(S&&!p(R,S)),I=!!(w&&b(R,w)),A=!!(y&&v(R,y)),W=!!(a&&Dt(R,a,o)),G=!!(i&&Dt(R,i,o))||I||A||!u&&!c&&k||u&&c===!1&&k,B=l(R,f??o.today());k&&E.outside.push(C),W&&E.disabled.push(C),G&&E.hidden.push(C),B&&E.today.push(C),s&&Object.keys(s).forEach($=>{const O=s==null?void 0:s[$];O&&Dt(R,O,o)&&(M[$]?M[$].push(C):M[$]=[C])})}return C=>{const R={[ke.focused]:!1,[ke.disabled]:!1,[ke.hidden]:!1,[ke.outside]:!1,[ke.today]:!1},S={};for(const k in E){const I=E[k];R[k]=I.some(A=>A===C)}for(const k in M)S[k]=M[k].some(I=>I===C);return{...R,...S}}}function cx(e,t,n={}){return Object.entries(e).filter(([,o])=>o===!0).reduce((o,[a])=>(n[a]?o.push(n[a]):t[ke[a]]?o.push(t[ke[a]]):t[ct[a]]&&o.push(t[ct[a]]),o),[t[ce.Day]])}function lx(e){return x.createElement("button",{...e})}function ux(e){return x.createElement("span",{...e})}function dx(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 fx(e){const{day:t,modifiers:n,...r}=e;return x.createElement("td",{...r})}function mx(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 px(e){const{options:t,className:n,components:r,classNames:o,...a}=e,i=[o[ce.Dropdown],n].join(" "),s=t==null?void 0:t.find(({value:c})=>c===a.value);return x.createElement("span",{"data-disabled":a.disabled,className:o[ce.DropdownRoot]},x.createElement(r.Select,{className:i,...a},t==null?void 0:t.map(({value:c,label:u,disabled:f})=>x.createElement(r.Option,{key:c,value:c,disabled:f},u))),x.createElement("span",{className:o[ce.CaptionLabel],"aria-hidden":!0},s==null?void 0:s.label,x.createElement(r.Chevron,{orientation:"down",size:18,className:o[ce.Chevron]})))}function hx(e){return x.createElement("div",{...e})}function gx(e){return x.createElement("div",{...e})}function vx(e){const{calendarMonth:t,displayIndex:n,...r}=e;return x.createElement("div",{...r},e.children)}function bx(e){const{calendarMonth:t,displayIndex:n,...r}=e;return x.createElement("div",{...r})}function yx(e){return x.createElement("table",{...e})}function wx(e){return x.createElement("div",{...e})}const Du=x.createContext(void 0);function fr(){const e=x.useContext(Du);if(e===void 0)throw new Error("useDayPicker() must be used within a custom component.");return e}function xx(e){const{components:t}=fr();return x.createElement(t.Dropdown,{...e})}function Sx(e){const{onPreviousClick:t,onNextClick:n,previousMonth:r,nextMonth:o,...a}=e,{components:i,classNames:s,labels:{labelPrevious:c,labelNext:u}}=fr(),f=x.useCallback(p=>{o&&(n==null||n(p))},[o,n]),l=x.useCallback(p=>{r&&(t==null||t(p))},[r,t]);return x.createElement("nav",{...a},x.createElement(i.PreviousMonthButton,{type:"button",className:s[ce.PreviousMonthButton],tabIndex:r?void 0:-1,"aria-disabled":r?void 0:!0,"aria-label":c(r),onClick:l},x.createElement(i.Chevron,{disabled:r?void 0:!0,className:s[ce.Chevron],orientation:"left"})),x.createElement(i.NextMonthButton,{type:"button",className:s[ce.NextMonthButton],tabIndex:o?void 0:-1,"aria-disabled":o?void 0:!0,"aria-label":u(o),onClick:f},x.createElement(i.Chevron,{disabled:o?void 0:!0,orientation:"right",className:s[ce.Chevron]})))}function Ex(e){const{components:t}=fr();return x.createElement(t.Button,{...e})}function Cx(e){return x.createElement("option",{...e})}function Dx(e){const{components:t}=fr();return x.createElement(t.Button,{...e})}function Mx(e){const{rootRef:t,...n}=e;return x.createElement("div",{...n,ref:t})}function Nx(e){return x.createElement("select",{...e})}function kx(e){const{week:t,...n}=e;return x.createElement("tr",{...n})}function Rx(e){return x.createElement("th",{...e})}function Ox(e){return x.createElement("thead",{"aria-hidden":!0},x.createElement("tr",{...e}))}function Tx(e){const{week:t,...n}=e;return x.createElement("th",{...n})}function Px(e){return x.createElement("th",{...e})}function _x(e){return x.createElement("tbody",{...e})}function Ax(e){const{components:t}=fr();return x.createElement(t.Dropdown,{...e})}const Ix=Object.freeze(Object.defineProperty({__proto__:null,Button:lx,CaptionLabel:ux,Chevron:dx,Day:fx,DayButton:mx,Dropdown:px,DropdownNav:hx,Footer:gx,Month:vx,MonthCaption:bx,MonthGrid:yx,Months:wx,MonthsDropdown:xx,Nav:Sx,NextMonthButton:Ex,Option:Cx,PreviousMonthButton:Dx,Root:Mx,Select:Nx,Week:kx,WeekNumber:Tx,WeekNumberHeader:Px,Weekday:Rx,Weekdays:Ox,Weeks:_x,YearsDropdown:Ax},Symbol.toStringTag,{value:"Module"}));function jx(e){return{...Ix,...e}}function $x(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 os(){const e={};for(const t in ce)e[ce[t]]=`rdp-${ce[t]}`;for(const t in ke)e[ke[t]]=`rdp-${ke[t]}`;for(const t in ct)e[ct[t]]=`rdp-${ct[t]}`;for(const t in Je)e[Je[t]]=`rdp-${Je[t]}`;return e}function Mu(e,t,n){return(n??new Tt(t)).format(e,"LLLL y")}const Lx=Mu;function Fx(e,t,n){return(n??new Tt(t)).format(e,"d")}function Wx(e,t=xt){return t.format(e,"LLLL")}function Bx(e,t=xt){return e<10?t.formatNumber(`0${e.toLocaleString()}`):t.formatNumber(`${e.toLocaleString()}`)}function Yx(){return""}function zx(e,t,n){return(n??new Tt(t)).format(e,"cccccc")}function Nu(e,t=xt){return t.format(e,"yyyy")}const Hx=Nu,Ux=Object.freeze(Object.defineProperty({__proto__:null,formatCaption:Mu,formatDay:Fx,formatMonthCaption:Lx,formatMonthDropdown:Wx,formatWeekNumber:Bx,formatWeekNumberHeader:Yx,formatWeekdayName:zx,formatYearCaption:Hx,formatYearDropdown:Nu},Symbol.toStringTag,{value:"Module"}));function Gx(e){return e!=null&&e.formatMonthCaption&&!e.formatCaption&&(e.formatCaption=e.formatMonthCaption),e!=null&&e.formatYearCaption&&!e.formatYearDropdown&&(e.formatYearDropdown=e.formatYearCaption),{...Ux,...e}}function qx(e,t,n,r,o){const{startOfMonth:a,startOfYear:i,endOfYear:s,eachMonthOfInterval:c,getMonth:u}=o;return c({start:i(e),end:s(e)}).map(p=>{const h=r.formatMonthDropdown(p,o),b=u(p),g=t&&p<a(t)||n&&p>a(n)||!1;return{value:b,label:h,disabled:g}})}function Vx(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 Kx(e,t,n){const r=e.today(),o=t?e.startOfISOWeek(r):e.startOfWeek(r),a=[];for(let i=0;i<7;i++){const s=e.addDays(o,i);a.push(s)}return a}function Xx(e,t,n,r){if(!e||!t)return;const{startOfYear:o,endOfYear:a,addYears:i,getYear:s,isBefore:c,isSameYear:u}=r,f=o(e),l=a(t),p=[];let h=f;for(;c(h,l)||u(h,l);)p.push(h),h=i(h,1);return p.map(b=>{const g=n.formatYearDropdown(b,r);return{value:s(b),label:g,disabled:!1}})}function ku(e,t,n){return(n??new Tt(t)).format(e,"LLLL y")}const Zx=ku;function Qx(e,t,n,r){let o=(r??new Tt(n)).format(e,"PPPP");return t!=null&&t.today&&(o=`Today, ${o}`),o}function Ru(e,t,n,r){let o=(r??new Tt(n)).format(e,"PPPP");return t.today&&(o=`Today, ${o}`),t.selected&&(o=`${o}, selected`),o}const Jx=Ru;function e0(){return""}function t0(e){return"Choose the Month"}function n0(e){return"Go to the Next Month"}function r0(e){return"Go to the Previous Month"}function o0(e,t,n){return(n??new Tt(t)).format(e,"cccc")}function a0(e,t){return`Week ${e}`}function s0(e){return"Week Number"}function i0(e){return"Choose the Year"}const c0=Object.freeze(Object.defineProperty({__proto__:null,labelCaption:Zx,labelDay:Jx,labelDayButton:Ru,labelGrid:ku,labelGridcell:Qx,labelMonthDropdown:t0,labelNav:e0,labelNext:n0,labelPrevious:r0,labelWeekNumber:a0,labelWeekNumberHeader:s0,labelWeekday:o0,labelYearDropdown:i0},Symbol.toStringTag,{value:"Module"})),mr=e=>e instanceof HTMLElement?e:null,Ho=e=>[...e.querySelectorAll("[data-animated-month]")??[]],l0=e=>mr(e.querySelector("[data-animated-month]")),Uo=e=>mr(e.querySelector("[data-animated-caption]")),Go=e=>mr(e.querySelector("[data-animated-weeks]")),u0=e=>mr(e.querySelector("[data-animated-nav]")),d0=e=>mr(e.querySelector("[data-animated-weekdays]"));function f0(e,t,{classNames:n,months:r,focused:o,dateLib:a}){const i=x.useRef(null),s=x.useRef(r),c=x.useRef(!1);x.useLayoutEffect(()=>{const u=s.current;if(s.current=r,!t||!e.current||!(e.current instanceof HTMLElement)||r.length===0||u.length===0||r.length!==u.length)return;const f=a.isSameMonth(r[0].date,u[0].date),l=a.isAfter(r[0].date,u[0].date),p=l?n[Je.caption_after_enter]:n[Je.caption_before_enter],h=l?n[Je.weeks_after_enter]:n[Je.weeks_before_enter],b=i.current,g=e.current.cloneNode(!0);if(g instanceof HTMLElement?(Ho(g).forEach(E=>{if(!(E instanceof HTMLElement))return;const M=l0(E);M&&E.contains(M)&&E.removeChild(M);const C=Uo(E);C&&C.classList.remove(p);const R=Go(E);R&&R.classList.remove(h)}),i.current=g):i.current=null,c.current||f||o)return;const v=b instanceof HTMLElement?Ho(b):[],w=Ho(e.current);if(w&&w.every(y=>y instanceof HTMLElement)&&v&&v.every(y=>y instanceof HTMLElement)){c.current=!0,e.current.style.isolation="isolate";const y=u0(e.current);y&&(y.style.zIndex="1"),w.forEach((E,M)=>{const C=v[M];if(!C)return;E.style.position="relative",E.style.overflow="hidden";const R=Uo(E);R&&R.classList.add(p);const S=Go(E);S&&S.classList.add(h);const k=()=>{c.current=!1,e.current&&(e.current.style.isolation=""),y&&(y.style.zIndex=""),R&&R.classList.remove(p),S&&S.classList.remove(h),E.style.position="",E.style.overflow="",E.contains(C)&&E.removeChild(C)};C.style.pointerEvents="none",C.style.position="absolute",C.style.overflow="hidden",C.setAttribute("aria-hidden","true");const I=d0(C);I&&(I.style.opacity="0");const A=Uo(C);A&&(A.classList.add(l?n[Je.caption_before_exit]:n[Je.caption_after_exit]),A.addEventListener("animationend",k));const W=Go(C);W&&W.classList.add(l?n[Je.weeks_before_exit]:n[Je.weeks_after_exit]),E.insertBefore(C,E.firstChild)})}})}function m0(e,t,n,r){const o=e[0],a=e[e.length-1],{ISOWeek:i,fixedWeeks:s,broadcastCalendar:c}=n??{},{addDays:u,differenceInCalendarDays:f,differenceInCalendarMonths:l,endOfBroadcastWeek:p,endOfISOWeek:h,endOfMonth:b,endOfWeek:g,isAfter:v,startOfBroadcastWeek:w,startOfISOWeek:y,startOfWeek:E}=r,M=c?w(o,r):i?y(o):E(o),C=c?p(a):i?h(b(a)):g(b(a)),R=f(C,M),S=l(a,o)+1,k=[];for(let W=0;W<=R;W++){const G=u(M,W);if(t&&v(G,t))break;k.push(G)}const A=(c?35:42)*S;if(s&&k.length<A){const W=A-k.length;for(let G=0;G<W;G++){const B=u(k[k.length-1],1);k.push(B)}}return k}function p0(e){const t=[];return e.reduce((n,r)=>{const o=r.weeks.reduce((a,i)=>[...a,...i.days],t);return[...n,...o]},t)}function h0(e,t,n,r){const{numberOfMonths:o=1}=n,a=[];for(let i=0;i<o;i++){const s=r.addMonths(e,i);if(t&&s>t)break;a.push(s)}return a}function Mi(e,t,n,r){const{month:o,defaultMonth:a,today:i=r.today(),numberOfMonths:s=1}=e;let c=o||a||i;const{differenceInCalendarMonths:u,addMonths:f,startOfMonth:l}=r;if(n&&u(n,c)<s-1){const p=-1*(s-1);c=f(n,p)}return t&&u(c,t)<0&&(c=t),l(c)}function g0(e,t,n,r){const{addDays:o,endOfBroadcastWeek:a,endOfISOWeek:i,endOfMonth:s,endOfWeek:c,getISOWeek:u,getWeek:f,startOfBroadcastWeek:l,startOfISOWeek:p,startOfWeek:h}=r,b=e.reduce((g,v)=>{const w=n.broadcastCalendar?l(v,r):n.ISOWeek?p(v):h(v),y=n.broadcastCalendar?a(v):n.ISOWeek?i(s(v)):c(s(v)),E=t.filter(S=>S>=w&&S<=y),M=n.broadcastCalendar?35:42;if(n.fixedWeeks&&E.length<M){const S=t.filter(k=>{const I=M-E.length;return k>y&&k<=o(y,I)});E.push(...S)}const C=E.reduce((S,k)=>{const I=n.ISOWeek?u(k):f(k),A=S.find(G=>G.weekNumber===I),W=new yu(k,v,r);return A?A.days.push(W):S.push(new sx(I,[W])),S},[]),R=new ax(v,C);return g.push(R),g},[]);return n.reverseMonths?b.reverse():b}function v0(e,t){let{startMonth:n,endMonth:r}=e;const{startOfYear:o,startOfDay:a,startOfMonth:i,endOfMonth:s,addYears:c,endOfYear:u,newDate:f,today:l}=t,{fromYear:p,toYear:h,fromMonth:b,toMonth:g}=e;!n&&b&&(n=b),!n&&p&&(n=t.newDate(p,0,1)),!r&&g&&(r=g),!r&&h&&(r=f(h,11,31));const v=e.captionLayout==="dropdown"||e.captionLayout==="dropdown-years";return n?n=i(n):p?n=f(p,0,1):!n&&v&&(n=o(c(e.today??l(),-100))),r?r=s(r):h?r=f(h,11,31):!r&&v&&(r=u(e.today??l())),[n&&a(n),r&&a(r)]}function b0(e,t,n,r){if(n.disableNavigation)return;const{pagedNavigation:o,numberOfMonths:a=1}=n,{startOfMonth:i,addMonths:s,differenceInCalendarMonths:c}=r,u=o?a:1,f=i(e);if(!t)return s(f,u);if(!(c(t,e)<a))return s(f,u)}function y0(e,t,n,r){if(n.disableNavigation)return;const{pagedNavigation:o,numberOfMonths:a}=n,{startOfMonth:i,addMonths:s,differenceInCalendarMonths:c}=r,u=o?a??1:1,f=i(e);if(!t)return s(f,-u);if(!(c(f,t)<=0))return s(f,-u)}function w0(e){const t=[];return e.reduce((n,r)=>[...n,...r.weeks],t)}function go(e,t){const[n,r]=x.useState(e);return[t===void 0?n:t,r]}function x0(e,t){const[n,r]=v0(e,t),{startOfMonth:o,endOfMonth:a}=t,i=Mi(e,n,r,t),[s,c]=go(i,e.month?i:void 0);x.useEffect(()=>{const R=Mi(e,n,r,t);c(R)},[e.timeZone]);const u=h0(s,r,e,t),f=m0(u,e.endMonth?a(e.endMonth):void 0,e,t),l=g0(u,f,e,t),p=w0(l),h=p0(l),b=y0(s,n,e,t),g=b0(s,r,e,t),{disableNavigation:v,onMonthChange:w}=e,y=R=>p.some(S=>S.days.some(k=>k.isEqualTo(R))),E=R=>{if(v)return;let S=o(R);n&&S<o(n)&&(S=o(n)),r&&S>o(r)&&(S=o(r)),c(S),w==null||w(S)};return{months:l,weeks:p,days:h,navStart:n,navEnd:r,previousMonth:b,nextMonth:g,goToMonth:E,goToDay:R=>{y(R)||E(R.date)}}}var pt;(function(e){e[e.Today=0]="Today",e[e.Selected=1]="Selected",e[e.LastFocused=2]="LastFocused",e[e.FocusedModifier=3]="FocusedModifier"})(pt||(pt={}));function Ni(e){return!e[ke.disabled]&&!e[ke.hidden]&&!e[ke.outside]}function S0(e,t,n,r){let o,a=-1;for(const i of e){const s=t(i);Ni(s)&&(s[ke.focused]&&a<pt.FocusedModifier?(o=i,a=pt.FocusedModifier):r!=null&&r.isEqualTo(i)&&a<pt.LastFocused?(o=i,a=pt.LastFocused):n(i.date)&&a<pt.Selected?(o=i,a=pt.Selected):s[ke.today]&&a<pt.Today&&(o=i,a=pt.Today))}return o||(o=e.find(i=>Ni(t(i)))),o}function E0(e,t,n,r,o,a,i){const{ISOWeek:s,broadcastCalendar:c}=a,{addDays:u,addMonths:f,addWeeks:l,addYears:p,endOfBroadcastWeek:h,endOfISOWeek:b,endOfWeek:g,max:v,min:w,startOfBroadcastWeek:y,startOfISOWeek:E,startOfWeek:M}=i;let R={day:u,week:l,month:f,year:p,startOfWeek:S=>c?y(S,i):s?E(S):M(S),endOfWeek:S=>c?h(S):s?b(S):g(S)}[e](n,t==="after"?1:-1);return t==="before"&&r?R=v([r,R]):t==="after"&&o&&(R=w([o,R])),R}function Ou(e,t,n,r,o,a,i,s=0){if(s>365)return;const c=E0(e,t,n.date,r,o,a,i),u=!!(a.disabled&&Dt(c,a.disabled,i)),f=!!(a.hidden&&Dt(c,a.hidden,i)),l=c,p=new yu(c,l,i);return!u&&!f?p:Ou(e,t,p,r,o,a,i,s+1)}function C0(e,t,n,r,o){const{autoFocus:a}=e,[i,s]=x.useState(),c=S0(t.days,n,r||(()=>!1),i),[u,f]=x.useState(a?c:void 0);return{isFocusTarget:g=>!!(c!=null&&c.isEqualTo(g)),setFocused:f,focused:u,blur:()=>{s(u),f(void 0)},moveFocus:(g,v)=>{if(!u)return;const w=Ou(g,v,u,t.navStart,t.navEnd,e,o);w&&(t.goToDay(w),f(w))}}}function D0(e,t){const{selected:n,required:r,onSelect:o}=e,[a,i]=go(n,o?n:void 0),s=o?n:a,{isSameDay:c}=t,u=h=>(s==null?void 0:s.some(b=>c(b,h)))??!1,{min:f,max:l}=e;return{selected:s,select:(h,b,g)=>{let v=[...s??[]];if(u(h)){if((s==null?void 0:s.length)===f||r&&(s==null?void 0:s.length)===1)return;v=s==null?void 0:s.filter(w=>!c(w,h))}else(s==null?void 0:s.length)===l?v=[h]:v=[...v,h];return o||i(v),o==null||o(v,h,b,g),v},isSelected:u}}function M0(e,t,n=0,r=0,o=!1,a=xt){const{from:i,to:s}=t||{},{isSameDay:c,isAfter:u,isBefore:f}=a;let l;if(!i&&!s)l={from:e,to:n>0?void 0:e};else if(i&&!s)c(i,e)?o?l={from:i,to:void 0}:l=void 0:f(e,i)?l={from:e,to:i}:l={from:i,to:e};else if(i&&s)if(c(i,e)&&c(s,e))o?l={from:i,to:s}:l=void 0;else if(c(i,e))l={from:i,to:n>0?void 0:e};else if(c(s,e))l={from:e,to:n>0?void 0:e};else if(f(e,i))l={from:e,to:s};else if(u(e,i))l={from:i,to:e};else if(u(e,s))l={from:i,to:e};else throw new Error("Invalid range");if(l!=null&&l.from&&(l!=null&&l.to)){const p=a.differenceInCalendarDays(l.to,l.from);r>0&&p>r?l={from:e,to:void 0}:n>1&&p<n&&(l={from:e,to:void 0})}return l}function N0(e,t,n=xt){const r=Array.isArray(t)?t:[t];let o=e.from;const a=n.differenceInCalendarDays(e.to,e.from),i=Math.min(a,6);for(let s=0;s<=i;s++){if(r.includes(o.getDay()))return!0;o=n.addDays(o,1)}return!1}function ki(e,t,n=xt){return Ct(e,t.from,!1,n)||Ct(e,t.to,!1,n)||Ct(t,e.from,!1,n)||Ct(t,e.to,!1,n)}function k0(e,t,n=xt){const r=Array.isArray(t)?t:[t];if(r.filter(s=>typeof s!="function").some(s=>typeof s=="boolean"?s:n.isDate(s)?Ct(e,s,!1,n):Cu(s,n)?s.some(c=>Ct(e,c,!1,n)):rs(s)?s.from&&s.to?ki(e,{from:s.from,to:s.to},n):!1:Eu(s)?N0(e,s.dayOfWeek,n):wu(s)?n.isAfter(s.before,s.after)?ki(e,{from:n.addDays(s.after,1),to:n.addDays(s.before,-1)},n):Dt(e.from,s,n)||Dt(e.to,s,n):xu(s)||Su(s)?Dt(e.from,s,n)||Dt(e.to,s,n):!1))return!0;const i=r.filter(s=>typeof s=="function");if(i.length){let s=e.from;const c=n.differenceInCalendarDays(e.to,e.from);for(let u=0;u<=c;u++){if(i.some(f=>f(s)))return!0;s=n.addDays(s,1)}}return!1}function R0(e,t){const{disabled:n,excludeDisabled:r,selected:o,required:a,onSelect:i}=e,[s,c]=go(o,i?o:void 0),u=i?o:s;return{selected:u,select:(p,h,b)=>{const{min:g,max:v}=e,w=p?M0(p,u,g,v,a,t):void 0;return r&&n&&(w!=null&&w.from)&&w.to&&k0({from:w.from,to:w.to},n,t)&&(w.from=p,w.to=void 0),i||c(w),i==null||i(w,p,h,b),w},isSelected:p=>u&&Ct(u,p,!1,t)}}function O0(e,t){const{selected:n,required:r,onSelect:o}=e,[a,i]=go(n,o?n:void 0),s=o?n:a,{isSameDay:c}=t;return{selected:s,select:(l,p,h)=>{let b=l;return!r&&s&&s&&c(l,s)&&(b=void 0),o||i(b),o==null||o(b,l,p,h),b},isSelected:l=>s?c(s,l):!1}}function T0(e,t){const n=O0(e,t),r=D0(e,t),o=R0(e,t);switch(e.mode){case"single":return n;case"multiple":return r;case"range":return o;default:return}}function Tu(e){var It;let t=e;t.timeZone&&(t={...e},t.today&&(t.today=new Ue(t.today,t.timeZone)),t.month&&(t.month=new Ue(t.month,t.timeZone)),t.defaultMonth&&(t.defaultMonth=new Ue(t.defaultMonth,t.timeZone)),t.startMonth&&(t.startMonth=new Ue(t.startMonth,t.timeZone)),t.endMonth&&(t.endMonth=new Ue(t.endMonth,t.timeZone)),t.mode==="single"&&t.selected?t.selected=new Ue(t.selected,t.timeZone):t.mode==="multiple"&&t.selected?t.selected=(It=t.selected)==null?void 0:It.map(V=>new Ue(V,t.timeZone)):t.mode==="range"&&t.selected&&(t.selected={from:t.selected.from?new Ue(t.selected.from,t.timeZone):void 0,to:t.selected.to?new Ue(t.selected.to,t.timeZone):void 0}));const{components:n,formatters:r,labels:o,dateLib:a,locale:i,classNames:s}=x.useMemo(()=>{const V={...ns,...t.locale};return{dateLib:new Tt({locale:V,weekStartsOn:t.broadcastCalendar?1:t.weekStartsOn,firstWeekContainsDate:t.firstWeekContainsDate,useAdditionalWeekYearTokens:t.useAdditionalWeekYearTokens,useAdditionalDayOfYearTokens:t.useAdditionalDayOfYearTokens,timeZone:t.timeZone,numerals:t.numerals},t.dateLib),components:jx(t.components),formatters:Gx(t.formatters),labels:{...c0,...t.labels},locale:V,classNames:{...os(),...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:c,mode:u,navLayout:f,numberOfMonths:l=1,onDayBlur:p,onDayClick:h,onDayFocus:b,onDayKeyDown:g,onDayMouseEnter:v,onDayMouseLeave:w,onNextClick:y,onPrevClick:E,showWeekNumber:M,styles:C}=t,{formatCaption:R,formatDay:S,formatMonthDropdown:k,formatWeekNumber:I,formatWeekNumberHeader:A,formatWeekdayName:W,formatYearDropdown:G}=r,B=x0(t,a),{days:$,months:O,navStart:D,navEnd:_,previousMonth:N,nextMonth:P,goToMonth:Y}=B,H=ix($,t,D,_,a),{isSelected:T,select:j,selected:z}=T0(t,a)??{},{blur:U,focused:q,isFocusTarget:F,moveFocus:X,setFocused:Z}=C0(t,B,H,T??(()=>!1),a),{labelDayButton:Q,labelGridcell:ee,labelGrid:ae,labelMonthDropdown:be,labelNav:te,labelPrevious:Te,labelNext:$e,labelWeekday:Ce,labelWeekNumber:Ve,labelWeekNumberHeader:De,labelYearDropdown:Be}=o,Pt=x.useMemo(()=>Kx(a,t.ISOWeek),[a,t.ISOWeek]),_e=u!==void 0||h!==void 0,Ye=x.useCallback(()=>{N&&(Y(N),E==null||E(N))},[N,Y,E]),St=x.useCallback(()=>{P&&(Y(P),y==null||y(P))},[Y,P,y]),_t=x.useCallback((V,ie)=>se=>{se.preventDefault(),se.stopPropagation(),Z(V),j==null||j(V.date,ie,se),h==null||h(V.date,ie,se)},[j,h,Z]),ue=x.useCallback((V,ie)=>se=>{Z(V),b==null||b(V.date,ie,se)},[b,Z]),pe=x.useCallback((V,ie)=>se=>{U(),p==null||p(V.date,ie,se)},[U,p]),ye=x.useCallback((V,ie)=>se=>{const me={ArrowLeft:[se.shiftKey?"month":"day",t.dir==="rtl"?"after":"before"],ArrowRight:[se.shiftKey?"month":"day",t.dir==="rtl"?"before":"after"],ArrowDown:[se.shiftKey?"year":"week","after"],ArrowUp:[se.shiftKey?"year":"week","before"],PageUp:[se.shiftKey?"year":"month","before"],PageDown:[se.shiftKey?"year":"month","after"],Home:["startOfWeek","before"],End:["endOfWeek","after"]};if(me[se.key]){se.preventDefault(),se.stopPropagation();const[ge,oe]=me[se.key];X(ge,oe)}g==null||g(V.date,ie,se)},[X,g,t.dir]),Ae=x.useCallback((V,ie)=>se=>{v==null||v(V.date,ie,se)},[v]),Me=x.useCallback((V,ie)=>se=>{w==null||w(V.date,ie,se)},[w]),At=x.useCallback(V=>ie=>{const se=Number(ie.target.value),me=a.setMonth(a.startOfMonth(V),se);Y(me)},[a,Y]),Ke=x.useCallback(V=>ie=>{const se=Number(ie.target.value),me=a.setYear(a.startOfMonth(V),se);Y(me)},[a,Y]),{className:un,style:An}=x.useMemo(()=>({className:[s[ce.Root],t.className].filter(Boolean).join(" "),style:{...C==null?void 0:C[ce.Root],...t.style}}),[s,t.className,t.style,C]),dn=$x(t),Kt=x.useRef(null);f0(Kt,!!t.animate,{classNames:s,months:O,focused:q,dateLib:a});const In={dayPickerProps:t,selected:z,select:j,isSelected:T,months:O,nextMonth:P,previousMonth:N,goToMonth:Y,getModifiers:H,components:n,classNames:s,styles:C,labels:o,formatters:r};return x.createElement(Du.Provider,{value:In},x.createElement(n.Root,{rootRef:t.animate?Kt:void 0,className:un,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"],...dn},x.createElement(n.Months,{className:s[ce.Months],style:C==null?void 0:C[ce.Months]},!t.hideNavigation&&!f&&x.createElement(n.Nav,{"data-animated-nav":t.animate?"true":void 0,className:s[ce.Nav],style:C==null?void 0:C[ce.Nav],"aria-label":te(),onPreviousClick:Ye,onNextClick:St,previousMonth:N,nextMonth:P}),O.map((V,ie)=>{const se=qx(V.date,D,_,r,a),me=Xx(D,_,r,a);return x.createElement(n.Month,{"data-animated-month":t.animate?"true":void 0,className:s[ce.Month],style:C==null?void 0:C[ce.Month],key:ie,displayIndex:ie,calendarMonth:V},f==="around"&&!t.hideNavigation&&ie===0&&x.createElement(n.PreviousMonthButton,{type:"button",className:s[ce.PreviousMonthButton],tabIndex:N?void 0:-1,"aria-disabled":N?void 0:!0,"aria-label":Te(N),onClick:Ye,"data-animated-button":t.animate?"true":void 0},x.createElement(n.Chevron,{disabled:N?void 0:!0,className:s[ce.Chevron],orientation:t.dir==="rtl"?"right":"left"})),x.createElement(n.MonthCaption,{"data-animated-caption":t.animate?"true":void 0,className:s[ce.MonthCaption],style:C==null?void 0:C[ce.MonthCaption],calendarMonth:V,displayIndex:ie},c!=null&&c.startsWith("dropdown")?x.createElement(n.DropdownNav,{className:s[ce.Dropdowns],style:C==null?void 0:C[ce.Dropdowns]},c==="dropdown"||c==="dropdown-months"?x.createElement(n.MonthsDropdown,{className:s[ce.MonthsDropdown],"aria-label":be(),classNames:s,components:n,disabled:!!t.disableNavigation,onChange:At(V.date),options:se,style:C==null?void 0:C[ce.Dropdown],value:a.getMonth(V.date)}):x.createElement("span",null,k(V.date,a)),c==="dropdown"||c==="dropdown-years"?x.createElement(n.YearsDropdown,{className:s[ce.YearsDropdown],"aria-label":Be(a.options),classNames:s,components:n,disabled:!!t.disableNavigation,onChange:Ke(V.date),options:me,style:C==null?void 0:C[ce.Dropdown],value:a.getYear(V.date)}):x.createElement("span",null,G(V.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(V.date,a.options,a))):x.createElement(n.CaptionLabel,{className:s[ce.CaptionLabel],role:"status","aria-live":"polite"},R(V.date,a.options,a))),f==="around"&&!t.hideNavigation&&ie===l-1&&x.createElement(n.NextMonthButton,{type:"button",className:s[ce.NextMonthButton],tabIndex:P?void 0:-1,"aria-disabled":P?void 0:!0,"aria-label":$e(P),onClick:St,"data-animated-button":t.animate?"true":void 0},x.createElement(n.Chevron,{disabled:P?void 0:!0,className:s[ce.Chevron],orientation:t.dir==="rtl"?"left":"right"})),ie===l-1&&f==="after"&&!t.hideNavigation&&x.createElement(n.Nav,{"data-animated-nav":t.animate?"true":void 0,className:s[ce.Nav],style:C==null?void 0:C[ce.Nav],"aria-label":te(),onPreviousClick:Ye,onNextClick:St,previousMonth:N,nextMonth:P}),x.createElement(n.MonthGrid,{role:"grid","aria-multiselectable":u==="multiple"||u==="range","aria-label":ae(V.date,a.options,a)||void 0,className:s[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:s[ce.Weekdays],style:C==null?void 0:C[ce.Weekdays]},M&&x.createElement(n.WeekNumberHeader,{"aria-label":De(a.options),className:s[ce.WeekNumberHeader],style:C==null?void 0:C[ce.WeekNumberHeader],scope:"col"},A()),Pt.map((ge,oe)=>x.createElement(n.Weekday,{"aria-label":Ce(ge,a.options,a),className:s[ce.Weekday],key:oe,style:C==null?void 0:C[ce.Weekday],scope:"col"},W(ge,a.options,a)))),x.createElement(n.Weeks,{"data-animated-weeks":t.animate?"true":void 0,className:s[ce.Weeks],style:C==null?void 0:C[ce.Weeks]},V.weeks.map((ge,oe)=>x.createElement(n.Week,{className:s[ce.Week],key:ge.weekNumber,style:C==null?void 0:C[ce.Week],week:ge},M&&x.createElement(n.WeekNumber,{week:ge,style:C==null?void 0:C[ce.WeekNumber],"aria-label":Ve(ge.weekNumber,{locale:i}),className:s[ce.WeekNumber],scope:"row",role:"rowheader"},I(ge.weekNumber,a)),ge.days.map(de=>{const{date:ve}=de,le=H(de);if(le[ke.focused]=!le.hidden&&!!(q!=null&&q.isEqualTo(de)),le[ct.selected]=(T==null?void 0:T(ve))||le.selected,rs(z)){const{from:Qe,to:ze}=z;le[ct.range_start]=!!(Qe&&ze&&a.isSameDay(ve,Qe)),le[ct.range_end]=!!(Qe&&ze&&a.isSameDay(ve,ze)),le[ct.range_middle]=Ct(z,ve,!0,a)}const Xe=Vx(le,C,t.modifiersStyles),xe=cx(le,s,t.modifiersClassNames),Ee=!_e&&!le.hidden?ee(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:Xe,role:"gridcell","aria-selected":le.selected||void 0,"aria-label":Ee,"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&&_e?x.createElement(n.DayButton,{className:s[ce.DayButton],style:C==null?void 0:C[ce.DayButton],type:"button",day:de,modifiers:le,disabled:le.disabled||void 0,tabIndex:F(de)?0:-1,"aria-label":Q(ve,le,a.options,a),onClick:_t(de,le),onBlur:pe(de,le),onFocus:ue(de,le),onKeyDown:ye(de,le),onMouseEnter:Ae(de,le),onMouseLeave:Me(de,le)},S(ve,a.options,a)):!le.hidden&&S(de.date,a.options,a))}))))))})),t.footer&&x.createElement(n.Footer,{className:s[ce.Footer],style:C==null?void 0:C[ce.Footer],role:"status","aria-live":"polite"},t.footer)))}function as(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var jr={exports:{}},P0=jr.exports,Ri;function Pu(){return Ri||(Ri=1,function(e,t){(function(n,r){e.exports=r()})(P0,function(){var n=1e3,r=6e4,o=36e5,a="millisecond",i="second",s="minute",c="hour",u="day",f="week",l="month",p="quarter",h="year",b="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,y={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($){var O=["th","st","nd","rd"],D=$%100;return"["+$+(O[(D-20)%10]||O[D]||O[0])+"]"}},E=function($,O,D){var _=String($);return!_||_.length>=O?$:""+Array(O+1-_.length).join(D)+$},M={s:E,z:function($){var O=-$.utcOffset(),D=Math.abs(O),_=Math.floor(D/60),N=D%60;return(O<=0?"+":"-")+E(_,2,"0")+":"+E(N,2,"0")},m:function $(O,D){if(O.date()<D.date())return-$(D,O);var _=12*(D.year()-O.year())+(D.month()-O.month()),N=O.clone().add(_,l),P=D-N<0,Y=O.clone().add(_+(P?-1:1),l);return+(-(_+(D-N)/(P?N-Y:Y-N))||0)},a:function($){return $<0?Math.ceil($)||0:Math.floor($)},p:function($){return{M:l,y:h,w:f,d:u,D:b,h:c,m:s,s:i,ms:a,Q:p}[$]||String($||"").toLowerCase().replace(/s$/,"")},u:function($){return $===void 0}},C="en",R={};R[C]=y;var S="$isDayjsObject",k=function($){return $ instanceof G||!(!$||!$[S])},I=function $(O,D,_){var N;if(!O)return C;if(typeof O=="string"){var P=O.toLowerCase();R[P]&&(N=P),D&&(R[P]=D,N=P);var Y=O.split("-");if(!N&&Y.length>1)return $(Y[0])}else{var H=O.name;R[H]=O,N=H}return!_&&N&&(C=N),N||!_&&C},A=function($,O){if(k($))return $.clone();var D=typeof O=="object"?O:{};return D.date=$,D.args=arguments,new G(D)},W=M;W.l=I,W.i=k,W.w=function($,O){return A($,{locale:O.$L,utc:O.$u,x:O.$x,$offset:O.$offset})};var G=function(){function $(D){this.$L=I(D.locale,null,!0),this.parse(D),this.$x=this.$x||D.x||{},this[S]=!0}var O=$.prototype;return O.parse=function(D){this.$d=function(_){var N=_.date,P=_.utc;if(N===null)return new Date(NaN);if(W.u(N))return new Date;if(N instanceof Date)return new Date(N);if(typeof N=="string"&&!/Z$/i.test(N)){var Y=N.match(v);if(Y){var H=Y[2]-1||0,T=(Y[7]||"0").substring(0,3);return P?new Date(Date.UTC(Y[1],H,Y[3]||1,Y[4]||0,Y[5]||0,Y[6]||0,T)):new Date(Y[1],H,Y[3]||1,Y[4]||0,Y[5]||0,Y[6]||0,T)}}return new Date(N)}(D),this.init()},O.init=function(){var D=this.$d;this.$y=D.getFullYear(),this.$M=D.getMonth(),this.$D=D.getDate(),this.$W=D.getDay(),this.$H=D.getHours(),this.$m=D.getMinutes(),this.$s=D.getSeconds(),this.$ms=D.getMilliseconds()},O.$utils=function(){return W},O.isValid=function(){return this.$d.toString()!==g},O.isSame=function(D,_){var N=A(D);return this.startOf(_)<=N&&N<=this.endOf(_)},O.isAfter=function(D,_){return A(D)<this.startOf(_)},O.isBefore=function(D,_){return this.endOf(_)<A(D)},O.$g=function(D,_,N){return W.u(D)?this[_]:this.set(N,D)},O.unix=function(){return Math.floor(this.valueOf()/1e3)},O.valueOf=function(){return this.$d.getTime()},O.startOf=function(D,_){var N=this,P=!!W.u(_)||_,Y=W.p(D),H=function(Z,Q){var ee=W.w(N.$u?Date.UTC(N.$y,Q,Z):new Date(N.$y,Q,Z),N);return P?ee:ee.endOf(u)},T=function(Z,Q){return W.w(N.toDate()[Z].apply(N.toDate("s"),(P?[0,0,0,0]:[23,59,59,999]).slice(Q)),N)},j=this.$W,z=this.$M,U=this.$D,q="set"+(this.$u?"UTC":"");switch(Y){case h:return P?H(1,0):H(31,11);case l:return P?H(1,z):H(0,z+1);case f:var F=this.$locale().weekStart||0,X=(j<F?j+7:j)-F;return H(P?U-X:U+(6-X),z);case u:case b:return T(q+"Hours",0);case c:return T(q+"Minutes",1);case s:return T(q+"Seconds",2);case i:return T(q+"Milliseconds",3);default:return this.clone()}},O.endOf=function(D){return this.startOf(D,!1)},O.$set=function(D,_){var N,P=W.p(D),Y="set"+(this.$u?"UTC":""),H=(N={},N[u]=Y+"Date",N[b]=Y+"Date",N[l]=Y+"Month",N[h]=Y+"FullYear",N[c]=Y+"Hours",N[s]=Y+"Minutes",N[i]=Y+"Seconds",N[a]=Y+"Milliseconds",N)[P],T=P===u?this.$D+(_-this.$W):_;if(P===l||P===h){var j=this.clone().set(b,1);j.$d[H](T),j.init(),this.$d=j.set(b,Math.min(this.$D,j.daysInMonth())).$d}else H&&this.$d[H](T);return this.init(),this},O.set=function(D,_){return this.clone().$set(D,_)},O.get=function(D){return this[W.p(D)]()},O.add=function(D,_){var N,P=this;D=Number(D);var Y=W.p(_),H=function(z){var U=A(P);return W.w(U.date(U.date()+Math.round(z*D)),P)};if(Y===l)return this.set(l,this.$M+D);if(Y===h)return this.set(h,this.$y+D);if(Y===u)return H(1);if(Y===f)return H(7);var T=(N={},N[s]=r,N[c]=o,N[i]=n,N)[Y]||1,j=this.$d.getTime()+D*T;return W.w(j,this)},O.subtract=function(D,_){return this.add(-1*D,_)},O.format=function(D){var _=this,N=this.$locale();if(!this.isValid())return N.invalidDate||g;var P=D||"YYYY-MM-DDTHH:mm:ssZ",Y=W.z(this),H=this.$H,T=this.$m,j=this.$M,z=N.weekdays,U=N.months,q=N.meridiem,F=function(Q,ee,ae,be){return Q&&(Q[ee]||Q(_,P))||ae[ee].slice(0,be)},X=function(Q){return W.s(H%12||12,Q,"0")},Z=q||function(Q,ee,ae){var be=Q<12?"AM":"PM";return ae?be.toLowerCase():be};return P.replace(w,function(Q,ee){return ee||function(ae){switch(ae){case"YY":return String(_.$y).slice(-2);case"YYYY":return W.s(_.$y,4,"0");case"M":return j+1;case"MM":return W.s(j+1,2,"0");case"MMM":return F(N.monthsShort,j,U,3);case"MMMM":return F(U,j);case"D":return _.$D;case"DD":return W.s(_.$D,2,"0");case"d":return String(_.$W);case"dd":return F(N.weekdaysMin,_.$W,z,2);case"ddd":return F(N.weekdaysShort,_.$W,z,3);case"dddd":return z[_.$W];case"H":return String(H);case"HH":return W.s(H,2,"0");case"h":return X(1);case"hh":return X(2);case"a":return Z(H,T,!0);case"A":return Z(H,T,!1);case"m":return String(T);case"mm":return W.s(T,2,"0");case"s":return String(_.$s);case"ss":return W.s(_.$s,2,"0");case"SSS":return W.s(_.$ms,3,"0");case"Z":return Y}return null}(Q)||Y.replace(":","")})},O.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},O.diff=function(D,_,N){var P,Y=this,H=W.p(_),T=A(D),j=(T.utcOffset()-this.utcOffset())*r,z=this-T,U=function(){return W.m(Y,T)};switch(H){case h:P=U()/12;break;case l:P=U();break;case p:P=U()/3;break;case f:P=(z-j)/6048e5;break;case u:P=(z-j)/864e5;break;case c:P=z/o;break;case s:P=z/r;break;case i:P=z/n;break;default:P=z}return N?P:W.a(P)},O.daysInMonth=function(){return this.endOf(l).$D},O.$locale=function(){return R[this.$L]},O.locale=function(D,_){if(!D)return this.$L;var N=this.clone(),P=I(D,_,!0);return P&&(N.$L=P),N},O.clone=function(){return W.w(this.$d,this)},O.toDate=function(){return new Date(this.valueOf())},O.toJSON=function(){return this.isValid()?this.toISOString():null},O.toISOString=function(){return this.$d.toISOString()},O.toString=function(){return this.$d.toUTCString()},$}(),B=G.prototype;return A.prototype=B,[["$ms",a],["$s",i],["$m",s],["$H",c],["$W",u],["$M",l],["$y",h],["$D",b]].forEach(function($){B[$[1]]=function(O){return this.$g(O,$[0],$[1])}}),A.extend=function($,O){return $.$i||($(O,G,A),$.$i=!0),A},A.locale=I,A.isDayjs=k,A.unix=function($){return A(1e3*$)},A.en=R[C],A.Ls=R,A.p={},A})}(jr)),jr.exports}var _0=Pu();const Mt=as(_0);var $r={exports:{}},A0=$r.exports,Oi;function I0(){return Oi||(Oi=1,function(e,t){(function(n,r){e.exports=r()})(A0,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 i=o.prototype,s=i.format;a.en.formats=n,i.format=function(c){c===void 0&&(c="YYYY-MM-DDTHH:mm:ssZ");var u=this.$locale().formats,f=function(l,p){return l.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(h,b,g){var v=g&&g.toUpperCase();return b||p[g]||n[g]||p[v].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(w,y,E){return y||E.slice(1)})})}(c,u===void 0?{}:u);return s.call(this,f)}}})}($r)),$r.exports}var j0=I0();const _u=as(j0);var Lr={exports:{}},$0=Lr.exports,Ti;function L0(){return Ti||(Ti=1,function(e,t){(function(n,r){e.exports=r(Pu())})($0,function(n){function r(i){return i&&typeof i=="object"&&"default"in i?i:{default:i}}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(i){return""+i+(i===1?"er":"")}};return o.default.locale(a,null,!0),a})}(Lr)),Lr.exports}L0();function F0({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(),i=Array.from({length:201},(l,p)=>a-100+p),s=l=>{const p=new Date(e);p.setMonth(Number.parseInt(l)),t(p)},c=l=>{const p=new Date(e);p.setFullYear(Number.parseInt(l)),t(p)},u=()=>{const l=new Date(e);l.setMonth(l.getMonth()-1),t(l)},f=()=>{const l=new Date(e);l.setMonth(l.getMonth()+1),t(l)};return m.jsxs("div",{className:"flex items-center justify-between p-2 border-b bg-muted",children:[m.jsx(kt,{variant:"outline",size:"small",onClick:u,className:"h-7 w-7 p-0",children:m.jsx(Ec,{className:"h-4 w-4"})}),m.jsxs("div",{className:"flex items-center gap-2",children:[m.jsxs(Sa,{value:r.toString(),onValueChange:s,children:[m.jsx(Ur,{className:"w-32 h-8 text-sm",children:m.jsx(Ea,{})}),m.jsx(Gr,{children:o.map((l,p)=>m.jsx(qr,{value:p.toString(),children:l},l))})]}),m.jsxs(Sa,{value:n.toString(),onValueChange:c,children:[m.jsx(Ur,{className:"w-20 h-8 text-sm",children:m.jsx(Ea,{})}),m.jsx(Gr,{className:"max-h-[200px]",children:i.map(l=>m.jsx(qr,{value:l.toString(),children:l},l))})]})]}),m.jsx(kt,{variant:"outline",size:"small",onClick:f,className:"h-7 w-7 p-0",children:m.jsx(La,{className:"h-4 w-4"})})]})}Mt.extend(_u);const Vr=({label:e,placeholder:t="Pick a date",helperText:n,error:r,required:o,value:a,onSelect:i,className:s,minDate:c,maxDate:u,disabled:f,readOnly:l,locale:p="en",showOutsideDays:h,dayPickerProps:b,month:g,onMonthChange:v,open:w,onOpenChange:y,...E})=>{const[M,C]=x.useState(!1),R=w!==void 0?w:M,S=y||C,k=g??a??new Date,I=A=>{A&&(!a||A.getTime()!==a.getTime())&&(i==null||i(A),S(!1))};return Mt.locale(p),m.jsxs("div",{className:L("space-y-1",s),...E,children:[e&&m.jsxs(sn,{className:"text-sm font-medium text-gray-700",children:[e,o&&m.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),m.jsxs(Za,{open:R,onOpenChange:S,children:[m.jsx(Qa,{asChild:!0,children:m.jsxs(kt,{variant:"outline",className:L("w-full flex justify-between items-center font-normal",!a&&"text-muted-foreground",r&&"border border-destructive"),disabled:f,"aria-readonly":l,children:[m.jsx("span",{className:L("text-left",!a&&"text-muted-foreground"),children:a?Mt(a).locale(p).format("LL"):t}),m.jsx(Sc,{strokeWidth:1.2,className:"ml-6 h-6 w-6 shrink-0 text-foreground"})]})}),m.jsx(fo,{className:"w-auto p-0",align:"start",children:m.jsxs("div",{className:"bg-white rounded-md border shadow-md",children:[m.jsx(F0,{month:k,onMonthChange:v??(()=>{})}),m.jsx("div",{className:"p-3",children:m.jsx(Tu,{mode:"single",selected:a,onSelect:I,month:k,onMonthChange:v,fromDate:c,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"},...b})})]})})]}),(n||r)&&m.jsx("p",{className:L("text-xs",r?"text-destructive":"text-gray-500"),children:r||n})]})};function W0({className:e,classNames:t,showOutsideDays:n=!0,captionLayout:r="label",buttonVariant:o="ghost",formatters:a,components:i,...s}){const c=os();return m.jsx(Tu,{showOutsideDays:n,className:L("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:L("w-fit",c.root),months:L("relative flex flex-col gap-4 md:flex-row",c.months),month:L("flex w-full flex-col gap-4",c.month),nav:L("absolute inset-x-0 top-0 flex w-full items-center justify-between gap-1",c.nav),button_previous:L(ca({variant:o}),"h-[--cell-size] w-[--cell-size] select-none p-0 aria-disabled:opacity-50",c.button_previous),button_next:L(ca({variant:o}),"h-[--cell-size] w-[--cell-size] select-none p-0 aria-disabled:opacity-50",c.button_next),month_caption:L("flex h-[--cell-size] w-full items-center justify-center px-[--cell-size]",c.month_caption),dropdowns:L("flex h-[--cell-size] w-full items-center justify-center gap-1.5 text-sm font-medium",c.dropdowns),dropdown_root:L("has-focus:border-ring border-input shadow-xs has-focus:ring-ring/50 has-focus:ring-[3px] relative rounded-md border",c.dropdown_root),dropdown:L("absolute inset-0 opacity-0",c.dropdown),caption_label:L("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",c.caption_label),table:"w-full border-collapse",weekdays:L("flex",c.weekdays),weekday:L("text-muted-foreground flex-1 select-none rounded-md text-[0.8rem] font-normal",c.weekday),week:L("mt-2 flex w-full",c.week),week_number_header:L("w-[--cell-size] select-none",c.week_number_header),week_number:L("text-muted-foreground select-none text-[0.8rem]",c.week_number),day:L("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",c.day),range_start:L("bg-accent rounded-l-md",c.range_start),range_middle:L("rounded-none",c.range_middle),range_end:L("bg-accent rounded-r-md",c.range_end),today:L("bg-accent text-accent-foreground rounded-md data-[selected=true]:rounded-none",c.today),outside:L("text-muted-foreground aria-selected:text-muted-foreground",c.outside),disabled:L("text-muted-foreground opacity-50",c.disabled),hidden:L("invisible",c.hidden),...t},components:{Root:({className:u,rootRef:f,...l})=>m.jsx("div",{"data-slot":"calendar",ref:f,className:L(u),...l}),Chevron:({className:u,orientation:f,...l})=>f==="left"?m.jsx(Ec,{className:L("size-4",u),...l}):f==="right"?m.jsx(La,{className:L("size-4",u),...l}):m.jsx(tr,{className:L("size-4",u),...l}),DayButton:B0,WeekNumber:({children:u,...f})=>m.jsx("td",{...f,children:m.jsx("div",{className:"flex size-[--cell-size] items-center justify-center text-center",children:u})}),...i},...s})}function B0({className:e,day:t,modifiers:n,...r}){const o=os(),a=d.useRef(null);return d.useEffect(()=>{var p;n.focused&&((p=a.current)==null||p.focus())},[n.focused]),m.jsx(kt,{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:L("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 Fr={exports:{}},Y0=Fr.exports,Pi;function z0(){return Pi||(Pi=1,function(e,t){(function(n,r){e.exports=r()})(Y0,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/,i=/\d\d?/,s=/\d*[^-_:/,()\s\d]+/,c={},u=function(v){return(v=+v)+(v>68?1900:2e3)},f=function(v){return function(w){this[v]=+w}},l=[/[+-]\d\d:?(\d\d)?|Z/,function(v){(this.zone||(this.zone={})).offset=function(w){if(!w||w==="Z")return 0;var y=w.match(/([+-]|\d\d)/g),E=60*y[1]+(+y[2]||0);return E===0?0:y[0]==="+"?-E:E}(v)}],p=function(v){var w=c[v];return w&&(w.indexOf?w:w.s.concat(w.f))},h=function(v,w){var y,E=c.meridiem;if(E){for(var M=1;M<=24;M+=1)if(v.indexOf(E(M,0,w))>-1){y=M>12;break}}else y=v===(w?"pm":"PM");return y},b={A:[s,function(v){this.afternoon=h(v,!1)}],a:[s,function(v){this.afternoon=h(v,!0)}],Q:[o,function(v){this.month=3*(v-1)+1}],S:[o,function(v){this.milliseconds=100*+v}],SS:[a,function(v){this.milliseconds=10*+v}],SSS:[/\d{3}/,function(v){this.milliseconds=+v}],s:[i,f("seconds")],ss:[i,f("seconds")],m:[i,f("minutes")],mm:[i,f("minutes")],H:[i,f("hours")],h:[i,f("hours")],HH:[i,f("hours")],hh:[i,f("hours")],D:[i,f("day")],DD:[a,f("day")],Do:[s,function(v){var w=c.ordinal,y=v.match(/\d+/);if(this.day=y[0],w)for(var E=1;E<=31;E+=1)w(E).replace(/\[|\]/g,"")===v&&(this.day=E)}],w:[i,f("week")],ww:[a,f("week")],M:[i,f("month")],MM:[a,f("month")],MMM:[s,function(v){var w=p("months"),y=(p("monthsShort")||w.map(function(E){return E.slice(0,3)})).indexOf(v)+1;if(y<1)throw new Error;this.month=y%12||y}],MMMM:[s,function(v){var w=p("months").indexOf(v)+1;if(w<1)throw new Error;this.month=w%12||w}],Y:[/[+-]?\d+/,f("year")],YY:[a,function(v){this.year=u(v)}],YYYY:[/\d{4}/,f("year")],Z:l,ZZ:l};function g(v){var w,y;w=v,y=c&&c.formats;for(var E=(v=w.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(A,W,G){var B=G&&G.toUpperCase();return W||y[G]||n[G]||y[B].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function($,O,D){return O||D.slice(1)})})).match(r),M=E.length,C=0;C<M;C+=1){var R=E[C],S=b[R],k=S&&S[0],I=S&&S[1];E[C]=I?{regex:k,parser:I}:R.replace(/^\[|\]$/g,"")}return function(A){for(var W={},G=0,B=0;G<M;G+=1){var $=E[G];if(typeof $=="string")B+=$.length;else{var O=$.regex,D=$.parser,_=A.slice(B),N=O.exec(_)[0];D.call(W,N),A=A.replace(N,"")}}return function(P){var Y=P.afternoon;if(Y!==void 0){var H=P.hours;Y?H<12&&(P.hours+=12):H===12&&(P.hours=0),delete P.afternoon}}(W),W}}return function(v,w,y){y.p.customParseFormat=!0,v&&v.parseTwoDigitYear&&(u=v.parseTwoDigitYear);var E=w.prototype,M=E.parse;E.parse=function(C){var R=C.date,S=C.utc,k=C.args;this.$u=S;var I=k[1];if(typeof I=="string"){var A=k[2]===!0,W=k[3]===!0,G=A||W,B=k[2];W&&(B=k[2]),c=this.$locale(),!A&&B&&(c=y.Ls[B]),this.$d=function(_,N,P,Y){try{if(["x","X"].indexOf(N)>-1)return new Date((N==="X"?1e3:1)*_);var H=g(N)(_),T=H.year,j=H.month,z=H.day,U=H.hours,q=H.minutes,F=H.seconds,X=H.milliseconds,Z=H.zone,Q=H.week,ee=new Date,ae=z||(T||j?1:ee.getDate()),be=T||ee.getFullYear(),te=0;T&&!j||(te=j>0?j-1:ee.getMonth());var Te,$e=U||0,Ce=q||0,Ve=F||0,De=X||0;return Z?new Date(Date.UTC(be,te,ae,$e,Ce,Ve,De+60*Z.offset*1e3)):P?new Date(Date.UTC(be,te,ae,$e,Ce,Ve,De)):(Te=new Date(be,te,ae,$e,Ce,Ve,De),Q&&(Te=Y(Te).week(Q).toDate()),Te)}catch{return new Date("")}}(R,I,S,y),this.init(),B&&B!==!0&&(this.$L=this.locale(B).$L),G&&R!=this.format(I)&&(this.$d=new Date("")),c={}}else if(I instanceof Array)for(var $=I.length,O=1;O<=$;O+=1){k[1]=I[O-1];var D=y.apply(this,k);if(D.isValid()){this.$d=D.$d,this.$L=D.$L,this.init();break}O===$&&(this.$d=new Date(""))}else M.call(this,C)}}})}(Fr)),Fr.exports}var H0=z0();const U0=as(H0);Mt.extend(U0);Mt.extend(_u);const G0={"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-]$/}},q0=({label:e,placeholder:t,helperText:n,required:r,value:o,onSelect:a,className:i,minDate:s,maxDate:c,disabled:u,readOnly:f,locale:l="en",inputClassName:p,dateFormat:h="DD/MM/YYYY",error:b})=>{const[g,v]=d.useState(!1),[w,y]=d.useState(""),[E,M]=d.useState(o),C=d.useMemo(()=>h,[h]),R=d.useMemo(()=>G0[C],[C]),S=d.useMemo(()=>t||C.toLowerCase(),[t,C]),k=d.useCallback(O=>{const D=O.replace(/\D/g,""),{separator:_}=R;if(D.length<=2)return D;switch(C){case"MM/DD/YYYY":case"DD/MM/YYYY":return D.length<=4?`${D.substring(0,2)}${_}${D.substring(2)}`:`${D.substring(0,2)}${_}${D.substring(2,4)}${_}${D.substring(4,8)}`;case"YYYY-MM-DD":return D.length<=4?D:D.length<=6?`${D.substring(0,4)}${_}${D.substring(4)}`:`${D.substring(0,4)}${_}${D.substring(4,6)}${_}${D.substring(6,8)}`;case"DD-MM-YYYY":return D.length<=4?`${D.substring(0,2)}${_}${D.substring(2)}`:`${D.substring(0,2)}${_}${D.substring(2,4)}${_}${D.substring(4,8)}`;default:return O}},[C,R]),I=d.useMemo(()=>O=>{const D=O.trim();return D&&Mt(D,C,!0).isValid()?Mt(D,C):null},[C]),A=d.useCallback(O=>Mt(O).format(C),[C]);d.useEffect(()=>{y(o?A(o):""),M(o),Mt.locale(l)},[o,l,A]);const W=d.useCallback(O=>{let D=O.target.value;if(y(D),!D.trim()){M(void 0),a==null||a(void 0);return}const _=k(D);_!==D&&D.replace(/\D/g,"").length>1&&(y(_),D=_);const N=I(D);if(N!=null&&N.isValid()){const P=N.toDate();(!s||P>=s)&&(!c||P<=c)&&(M(P),a==null||a(P))}},[k,I,a,s,c]),G=d.useCallback(()=>{E&&y(A(E))},[E,A]),B=d.useCallback(O=>{O&&(y(A(O)),M(O),a==null||a(O),v(!1))},[a,A]),$=d.useCallback(O=>{if(!["Backspace","Delete","Tab","Enter","ArrowLeft","ArrowRight","ArrowUp","ArrowDown"].includes(O.key)&&!R.pattern.test(O.key)&&!O.ctrlKey&&!O.metaKey){O.preventDefault();return}O.key==="Enter"&&(O.preventDefault(),G())},[R.pattern,G]);return m.jsxs("div",{className:L("space-y-1",i),children:[e&&m.jsxs(sn,{className:"text-sm font-medium text-gray-700",children:[e,r&&m.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),m.jsxs(Za,{open:g,onOpenChange:v,children:[m.jsxs("div",{className:L("w-60 relative",p),children:[m.jsx(an,{type:"text",value:w,onChange:W,onBlur:G,onKeyDown:$,placeholder:S,disabled:u,readOnly:f,className:L("w-full pr-12",b&&"border border-destructive focus-visible:ring-destructive")}),m.jsx(Qa,{asChild:!0,children:m.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:()=>v(O=>!O),disabled:u||f,"aria-label":"Open calendar",children:m.jsx(Sc,{strokeWidth:1,className:"h-5 w-5"})})})]}),m.jsx(fo,{className:"w-auto p-0",align:"start",children:m.jsx(W0,{mode:"single",selected:E,onSelect:B,fromDate:s,toDate:c})})]}),(n||b)&&m.jsx("p",{className:L("text-xs",b?"text-destructive":"text-gray-500"),children:b||n})]})};function Cn({label:e,placeholder:t="Select option",options:n,value:r,leadingIcon:o,helperText:a,error:i,required:s,onValueChange:c,className:u,variant:f="default",disabled:l=!1,clearable:p}){const h=r!==void 0,[b,g]=x.useState(void 0),v=h?r:b,w=y=>{h||g(y),c==null||c(y)};return m.jsxs("div",{className:L("space-y-1",u),children:[e&&m.jsxs(sn,{className:L("text-sm font-medium",l?"text-gray-400":"text-gray-700"),children:[e,s&&m.jsx("span",{className:"text-destructive ml-1",children:"*"})]}),m.jsxs(Sa,{value:v??void 0,onValueChange:w,disabled:l,children:[m.jsx(Ur,{className:L("border-input",i&&"border-destructive",f==="gray"&&"bg-gray-100 border-gray-300 text-gray-700",l&&"opacity-50 cursor-not-allowed"),children:m.jsxs("div",{className:"flex items-center gap-2 w-full",children:[o&&m.jsx("div",{className:"text-gray-400",children:o}),m.jsx(Ea,{placeholder:t}),p&&!!v&&!l&&m.jsx("span",{role:"button","aria-label":"Clear selection",tabIndex:0,className:"ml-auto text-gray-400 hover:text-gray-600 relative z-10",onMouseDown:y=>{y.preventDefault(),y.stopPropagation()},onPointerDown:y=>{y.preventDefault(),y.stopPropagation()},onClick:y=>{y.preventDefault(),y.stopPropagation(),h||g(void 0),c==null||c("")},children:m.jsx(cn,{strokeWidth:1.5,color:"gray",className:"h-4 w-4 mr-3"})})]})}),m.jsx(Gr,{children:n.map(y=>m.jsx(qr,{value:y.value,children:y.label},y.value))})]},v??"__empty"),(a||i)&&m.jsx("p",{className:L("text-xs",i?"text-destructive":l?"text-gray-400":"text-gray-500"),children:i||a})]})}const V0=({label:e,variant:t="filled",color:n="default",size:r="medium",deletable:o=!1,onDelete:a,onClick:i,icon:s,avatar:c,disabled:u=!1,className:f="",...l})=>{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"},b={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-destructive text-red-600 hover:bg-red-50"}},g=u?"opacity-50 cursor-not-allowed":"cursor-pointer",v=i&&!u?"hover:shadow-md":"",w=`
172
172
  ${p}
173
173
  ${h[r]}
174
174
  ${b[n][t]}
175
175
  ${g}
176
176
  ${v}
177
177
  ${f}
178
- `.trim(),w=C=>{!u&&i&&i(C)},E=C=>{C.stopPropagation(),!u&&a&&a(C)},M=r==="small"?12:r==="large"?18:14;return m.jsxs("div",{className:y,onClick:w,...l,children:[c&&m.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 c=="string"?m.jsx("img",{src:c,alt:`Avatar for ${e}`,className:"w-full h-full object-cover"}):c}),s&&!c&&m.jsx("div",{className:"flex items-center",children:x.isValidElement(s)?x.cloneElement(s,{size:M}):s}),m.jsx("span",{children:e}),o&&m.jsx("button",{onClick:E,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:m.jsx(cn,{size:M})})]})},K0={small:"h-8 text-sm",medium:"h-10",large:"h-12 text-base"},X0={white:"bg-white border-gray-300",grey:"bg-gray-100 border-gray-300"},Iu=({size:e="medium",variant:t="white",placeholder:n="Search here",className:r,onChange:o,query:a="",disabled:i})=>m.jsxs("div",{className:"relative",children:[m.jsx(Nc,{strokeWidth:1.1,className:"absolute left-4 top-1/2 transform -translate-y-1/2 text-gray-900 h-5 w-5"}),m.jsx(an,{placeholder:n,className:F("pl-12 rounded-full",K0[e],X0[t],r),onChange:o,value:a,disabled:i})]}),Z0=[{value:"all",label:"All Categories"},{value:"electronics",label:"Electronics"},{value:"clothing",label:"Clothing"},{value:"books",label:"Books"}],Q0=[{value:"newest",label:"Newest First"},{value:"oldest",label:"Oldest First"},{value:"name-asc",label:"Name A-Z"},{value:"name-desc",label:"Name Z-A"}],J0=({className:e,searchPlaceholder:t="Search...",categories:n=Z0,sortOptions:r=Q0,showDateFilter:o=!1,onSearch:a,onFilter:i,onClear:s,defaultFilters:c})=>{const[u,f]=x.useState({category:(c==null?void 0:c.category)??"",sort:(c==null?void 0:c.sort)??"",dateFrom:c==null?void 0:c.dateFrom,dateTo:c==null?void 0:c.dateTo}),[l,p]=x.useState(!1),[h,b]=x.useState(!1),[g,v]=x.useState(u.dateFrom??new Date),[y,w]=x.useState(u.dateTo??new Date),E=(k,S)=>{const R={...u,[k]:S};f(R),i==null||i(R)},M=()=>{f({category:"",sort:"",dateFrom:void 0,dateTo:void 0}),s==null||s()},C=Object.values(u).some(k=>k!==""&&k!==void 0);return m.jsxs("div",{className:F("space-y-4",e),children:[m.jsx(Iu,{size:"medium",placeholder:t,onChange:k=>a==null?void 0:a(k.target.value)}),m.jsxs("div",{className:"flex flex-wrap items-center gap-4",children:[m.jsxs("div",{className:"flex items-center gap-2",children:[m.jsx(Hh,{className:"h-4 w-4 text-gray-500"}),m.jsx("span",{className:"text-sm font-medium text-gray-700",children:"Filters:"})]}),m.jsx(Cn,{placeholder:"Category",options:n,onValueChange:k=>E("category",k),className:"min-w-[140px]"}),m.jsx(Cn,{placeholder:"Sort by",options:r,onValueChange:k=>E("sort",k),className:"min-w-[140px]"}),o&&m.jsxs(m.Fragment,{children:[m.jsx(Kr,{placeholder:"From date",value:u.dateFrom,onSelect:k=>{E("dateFrom",k),v(k??g)},className:"min-w-[140px]",open:l,onOpenChange:p,month:g,onMonthChange:v}),m.jsx(Kr,{placeholder:"To date",value:u.dateTo,onSelect:k=>{E("dateTo",k),w(k??y)},className:"min-w-[140px]",open:h,onOpenChange:b,month:y,onMonthChange:w})]}),C&&m.jsxs(kt,{variant:"outline",size:"small",onClick:M,className:"flex items-center gap-1",children:[m.jsx(cn,{className:"h-3 w-3"}),"Clear"]})]})]})},e1=[{value:"personal",label:"Personal Account"},{value:"business",label:"Business Account"},{value:"developer",label:"Developer Account"}];function t1({className:e,showDateOfBirth:t=!0,accountTypes:n=e1,onValueChange:r}){const[o,a]=x.useState(),[i,s]=x.useState(!1),[c,u]=x.useState(!1),[f,l]=x.useState(!1),[p,h]=x.useState(o??new Date),[b,g]=x.useState(""),[v,y]=x.useState("");return m.jsxs("div",{className:F("space-y-4",e),children:[m.jsx(nt,{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)}),m.jsx(nt,{label:"Email Address",type:"email",placeholder:"Enter your email",icon:m.jsx(Mc,{className:"h-4 w-4"}),required:!0,onChange:w=>r==null?void 0:r("email",w.target.value)}),m.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[m.jsx(ua,{label:"Password",helperText:"Must be at least 8 characters",required:!0,value:b,onChange:w=>{g(w),r==null||r("password",w)},showPassword:i,onShowPasswordChange:s}),m.jsx(ua,{label:"Confirm Password",placeholder:"Confirm your password",required:!0,value:v,onChange:w=>{y(w),r==null||r("confirmPassword",w)},showPassword:c,onShowPasswordChange:u})]}),m.jsx(Cn,{label:"Account Type",placeholder:"Select account type",options:n,leadingIcon:m.jsx(og,{className:"h-4 w-4"}),required:!0,onValueChange:w=>r==null?void 0:r("accountType",w)}),t&&m.jsx(Kr,{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:f,onOpenChange:l,month:p,onMonthChange:h})]})}const n1=[{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 r1({className:e,countries:t=n1,onValueChange:n}){return m.jsxs("div",{className:F("space-y-4",e),children:[m.jsx(nt,{label:"Street Address",placeholder:"Enter street address",required:!0,onChange:r=>n==null?void 0:n("streetAddress",r.target.value)}),m.jsx(nt,{label:"Apartment, suite, etc.",placeholder:"Apartment, suite, etc. (optional)",onChange:r=>n==null?void 0:n("addressLine2",r.target.value)}),m.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[m.jsx(nt,{label:"City",placeholder:"Enter city",required:!0,onChange:r=>n==null?void 0:n("city",r.target.value)}),m.jsx(nt,{label:"State/Province",placeholder:"Enter state",required:!0,onChange:r=>n==null?void 0:n("state",r.target.value)}),m.jsx(nt,{label:"ZIP/Postal Code",placeholder:"Enter ZIP code",required:!0,onChange:r=>n==null?void 0:n("zipCode",r.target.value)})]}),m.jsx(Cn,{label:"Country",placeholder:"Select country",options:t,leadingIcon:m.jsx(Kh,{className:"h-4 w-4"}),required:!0,onValueChange:r=>n==null?void 0:n("country",r)})]})}const o1=[{value:"sales",label:"Sales"},{value:"support",label:"Support"},{value:"general",label:"General Inquiry"}];function a1({className:e,showDepartment:t=!0,departmentOptions:n=o1,onValueChange:r}){return m.jsxs("div",{className:F("space-y-4",e),children:[m.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[m.jsx(nt,{label:"First Name",placeholder:"Enter first name",required:!0,onChange:o=>r==null?void 0:r("firstName",o.target.value)}),m.jsx(nt,{label:"Last Name",placeholder:"Enter last name",required:!0,onChange:o=>r==null?void 0:r("lastName",o.target.value)})]}),m.jsx(nt,{label:"Email Address",type:"email",placeholder:"Enter your email",icon:m.jsx(Mc,{className:"h-4 w-4"}),required:!0,onChange:o=>r==null?void 0:r("email",o.target.value)}),m.jsx(nt,{label:"Phone Number",type:"tel",placeholder:"+1 (555) 000-0000",icon:m.jsx(Jh,{className:"h-4 w-4"}),onChange:o=>r==null?void 0:r("phone",o.target.value)}),t&&m.jsx(Cn,{label:"Department",placeholder:"Select department",options:n,leadingIcon:m.jsx(Mh,{className:"h-4 w-4"}),onValueChange:o=>r==null?void 0:r("department",o)}),m.jsx(Fa,{label:"Message",placeholder:"How can we help you?",required:!0,onChange:o=>r==null?void 0:r("message",o.target.value)})]})}var Ai=1,s1=.9,i1=.8,c1=.17,qo=.1,Vo=.999,l1=.9999,u1=.99,d1=/[\\\/_+.#"@\[\(\{&]/,f1=/[\\\/_+.#"@\[\(\{&]/g,m1=/[\s-]/,ju=/[\s-]/g;function Da(e,t,n,r,o,a,i){if(a===t.length)return o===e.length?Ai:u1;var s=`${o},${a}`;if(i[s]!==void 0)return i[s];for(var c=r.charAt(a),u=n.indexOf(c,o),f=0,l,p,h,b;u>=0;)l=Da(e,t,n,r,u+1,a+1,i),l>f&&(u===o?l*=Ai:d1.test(e.charAt(u-1))?(l*=i1,h=e.slice(o,u-1).match(f1),h&&o>0&&(l*=Math.pow(Vo,h.length))):m1.test(e.charAt(u-1))?(l*=s1,b=e.slice(o,u-1).match(ju),b&&o>0&&(l*=Math.pow(Vo,b.length))):(l*=c1,o>0&&(l*=Math.pow(Vo,u-o))),e.charAt(u)!==t.charAt(a)&&(l*=l1)),(l<qo&&n.charAt(u-1)===r.charAt(a+1)||r.charAt(a+1)===r.charAt(a)&&n.charAt(u-1)!==r.charAt(a))&&(p=Da(e,t,n,r,u+1,a+2,i),p*qo>l&&(l=p*qo)),l>f&&(f=l),u=n.indexOf(c,u+1);return i[s]=f,f}function Ii(e){return e.toLowerCase().replace(ju," ")}function p1(e,t,n){return e=n&&n.length>0?`${e+" "+n.join(" ")}`:e,Da(e,t,Ii(e),Ii(t),0,0,{})}function Gn(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 Ko(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}var h1="DismissableLayer",Ma="dismissableLayer.update",g1="dismissableLayer.pointerDownOutside",v1="dismissableLayer.focusOutside",ji,$u=d.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Lu=d.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:i,onDismiss:s,...c}=e,u=d.useContext($u),[f,l]=d.useState(null),p=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,h]=d.useState({}),b=fe(t,S=>l(S)),g=Array.from(u.layers),[v]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),y=g.indexOf(v),w=f?g.indexOf(f):-1,E=u.layersWithOutsidePointerEventsDisabled.size>0,M=w>=y,C=w1(S=>{const R=S.target,A=[...u.branches].some(I=>I.contains(R));!M||A||(o==null||o(S),i==null||i(S),S.defaultPrevented||s==null||s())},p),k=x1(S=>{const R=S.target;[...u.branches].some(I=>I.contains(R))||(a==null||a(S),i==null||i(S),S.defaultPrevented||s==null||s())},p);return rr(S=>{w===u.layers.size-1&&(r==null||r(S),!S.defaultPrevented&&s&&(S.preventDefault(),s()))},p),d.useEffect(()=>{if(f)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(ji=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(f)),u.layers.add(f),$i(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=ji)}},[f,p,n,u]),d.useEffect(()=>()=>{f&&(u.layers.delete(f),u.layersWithOutsidePointerEventsDisabled.delete(f),$i())},[f,u]),d.useEffect(()=>{const S=()=>h({});return document.addEventListener(Ma,S),()=>document.removeEventListener(Ma,S)},[]),m.jsx(J.div,{...c,ref:b,style:{pointerEvents:E?M?"auto":"none":void 0,...e.style},onFocusCapture:Ko(e.onFocusCapture,k.onFocusCapture),onBlurCapture:Ko(e.onBlurCapture,k.onBlurCapture),onPointerDownCapture:Ko(e.onPointerDownCapture,C.onPointerDownCapture)})});Lu.displayName=h1;var b1="DismissableLayerBranch",y1=d.forwardRef((e,t)=>{const n=d.useContext($u),r=d.useRef(null),o=fe(t,r);return d.useEffect(()=>{const a=r.current;if(a)return n.branches.add(a),()=>{n.branches.delete(a)}},[n.branches]),m.jsx(J.div,{...e,ref:o})});y1.displayName=b1;function w1(e,t=globalThis==null?void 0:globalThis.document){const n=je(e),r=d.useRef(!1),o=d.useRef(()=>{});return d.useEffect(()=>{const a=s=>{if(s.target&&!r.current){let c=function(){Fu(g1,n,u,{discrete:!0})};const u={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=c,t.addEventListener("click",o.current,{once:!0})):c()}else t.removeEventListener("click",o.current);r.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",a),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function x1(e,t=globalThis==null?void 0:globalThis.document){const n=je(e),r=d.useRef(!1);return d.useEffect(()=>{const o=a=>{a.target&&!r.current&&Fu(v1,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 $i(){const e=new CustomEvent(Ma);document.dispatchEvent(e)}function Fu(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?kn(o,a):o.dispatchEvent(a)}function S1(e,t){return d.useReducer((n,r)=>t[n][r]??n,e)}var vo=e=>{const{present:t,children:n}=e,r=E1(t),o=typeof n=="function"?n({present:r.isPresent}):d.Children.only(n),a=fe(r.ref,C1(o));return typeof n=="function"||r.isPresent?d.cloneElement(o,{ref:a}):null};vo.displayName="Presence";function E1(e){const[t,n]=d.useState(),r=d.useRef(null),o=d.useRef(e),a=d.useRef("none"),i=e?"mounted":"unmounted",[s,c]=S1(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return d.useEffect(()=>{const u=Rr(r.current);a.current=s==="mounted"?u:"none"},[s]),Re(()=>{const u=r.current,f=o.current;if(f!==e){const p=a.current,h=Rr(u);e?c("MOUNT"):h==="none"||(u==null?void 0:u.display)==="none"?c("UNMOUNT"):c(f&&p!==h?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,c]),Re(()=>{if(t){let u;const f=t.ownerDocument.defaultView??window,l=h=>{const g=Rr(r.current).includes(CSS.escape(h.animationName));if(h.target===t&&g&&(c("ANIMATION_END"),!o.current)){const v=t.style.animationFillMode;t.style.animationFillMode="forwards",u=f.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=v)})}},p=h=>{h.target===t&&(a.current=Rr(r.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",l),t.addEventListener("animationend",l),()=>{f.clearTimeout(u),t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",l),t.removeEventListener("animationend",l)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:d.useCallback(u=>{r.current=u?getComputedStyle(u):null,n(u)},[])}}function Rr(e){return(e==null?void 0:e.animationName)||"none"}function C1(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 Xo=0;function D1(){d.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Li()),document.body.insertAdjacentElement("beforeend",e[1]??Li()),Xo++,()=>{Xo===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Xo--}},[])}function Li(){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 bo="Dialog",[Wu,EM]=Ge(bo),[M1,dt]=Wu(bo),Bu=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:a,modal:i=!0}=e,s=d.useRef(null),c=d.useRef(null),[u,f]=ot({prop:r,defaultProp:o??!1,onChange:a,caller:bo});return m.jsx(M1,{scope:t,triggerRef:s,contentRef:c,contentId:Pe(),titleId:Pe(),descriptionId:Pe(),open:u,onOpenChange:f,onOpenToggle:d.useCallback(()=>f(l=>!l),[f]),modal:i,children:n})};Bu.displayName=bo;var Yu="DialogTrigger",zu=d.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=dt(Yu,n),a=fe(t,o.triggerRef);return m.jsx(J.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":cs(o.open),...r,ref:a,onClick:Gn(e.onClick,o.onOpenToggle)})});zu.displayName=Yu;var ss="DialogPortal",[N1,Hu]=Wu(ss,{forceMount:void 0}),Uu=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,a=dt(ss,t);return m.jsx(N1,{scope:t,forceMount:n,children:d.Children.map(r,i=>m.jsx(vo,{present:n||a.open,children:m.jsx(cr,{asChild:!0,container:o,children:i})}))})};Uu.displayName=ss;var Xr="DialogOverlay",Gu=d.forwardRef((e,t)=>{const n=Hu(Xr,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,a=dt(Xr,e.__scopeDialog);return a.modal?m.jsx(vo,{present:r||a.open,children:m.jsx(R1,{...o,ref:t})}):null});Gu.displayName=Xr;var k1=Wt("DialogOverlay.RemoveScroll"),R1=d.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=dt(Xr,n);return m.jsx(lr,{as:k1,allowPinchZoom:!0,shards:[o.contentRef],children:m.jsx(J.div,{"data-state":cs(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),rn="DialogContent",qu=d.forwardRef((e,t)=>{const n=Hu(rn,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,a=dt(rn,e.__scopeDialog);return m.jsx(vo,{present:r||a.open,children:a.modal?m.jsx(O1,{...o,ref:t}):m.jsx(T1,{...o,ref:t})})});qu.displayName=rn;var O1=d.forwardRef((e,t)=>{const n=dt(rn,e.__scopeDialog),r=d.useRef(null),o=fe(t,n.contentRef,r);return d.useEffect(()=>{const a=r.current;if(a)return co(a)},[]),m.jsx(Vu,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Gn(e.onCloseAutoFocus,a=>{var i;a.preventDefault(),(i=n.triggerRef.current)==null||i.focus()}),onPointerDownOutside:Gn(e.onPointerDownOutside,a=>{const i=a.detail.originalEvent,s=i.button===0&&i.ctrlKey===!0;(i.button===2||s)&&a.preventDefault()}),onFocusOutside:Gn(e.onFocusOutside,a=>a.preventDefault())})}),T1=d.forwardRef((e,t)=>{const n=dt(rn,e.__scopeDialog),r=d.useRef(!1),o=d.useRef(!1);return m.jsx(Vu,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var i,s;(i=e.onCloseAutoFocus)==null||i.call(e,a),a.defaultPrevented||(r.current||(s=n.triggerRef.current)==null||s.focus(),a.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:a=>{var c,u;(c=e.onInteractOutside)==null||c.call(e,a),a.defaultPrevented||(r.current=!0,a.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const i=a.target;((u=n.triggerRef.current)==null?void 0:u.contains(i))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&o.current&&a.preventDefault()}})}),Vu=d.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:a,...i}=e,s=dt(rn,n),c=d.useRef(null),u=fe(t,c);return D1(),m.jsxs(m.Fragment,{children:[m.jsx(or,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:a,children:m.jsx(Lu,{role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":cs(s.open),...i,ref:u,onDismiss:()=>s.onOpenChange(!1)})}),m.jsxs(m.Fragment,{children:[m.jsx(P1,{titleId:s.titleId}),m.jsx(A1,{contentRef:c,descriptionId:s.descriptionId})]})]})}),is="DialogTitle",Ku=d.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=dt(is,n);return m.jsx(J.h2,{id:o.titleId,...r,ref:t})});Ku.displayName=is;var Xu="DialogDescription",Zu=d.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=dt(Xu,n);return m.jsx(J.p,{id:o.descriptionId,...r,ref:t})});Zu.displayName=Xu;var Qu="DialogClose",Ju=d.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=dt(Qu,n);return m.jsx(J.button,{type:"button",...r,ref:t,onClick:Gn(e.onClick,()=>o.onOpenChange(!1))})});Ju.displayName=Qu;function cs(e){return e?"open":"closed"}var ed="DialogTitleWarning",[CM,td]=sg(ed,{contentName:rn,titleName:is,docsSlug:"dialog"}),P1=({titleId:e})=>{const t=td(ed),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
178
+ `.trim(),y=C=>{!u&&i&&i(C)},E=C=>{C.stopPropagation(),!u&&a&&a(C)},M=r==="small"?12:r==="large"?18:14;return m.jsxs("div",{className:w,onClick:y,...l,children:[c&&m.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 c=="string"?m.jsx("img",{src:c,alt:`Avatar for ${e}`,className:"w-full h-full object-cover"}):c}),s&&!c&&m.jsx("div",{className:"flex items-center",children:x.isValidElement(s)?x.cloneElement(s,{size:M}):s}),m.jsx("span",{children:e}),o&&m.jsx("button",{onClick:E,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:m.jsx(cn,{size:M})})]})},K0={small:"h-8 text-sm",medium:"h-10",large:"h-12 text-base"},X0={white:"bg-white border-gray-300",grey:"bg-gray-100 border-gray-300"},Au=({size:e="medium",variant:t="white",placeholder:n="Search here",className:r,onChange:o,query:a="",disabled:i})=>m.jsxs("div",{className:"relative",children:[m.jsx(Mc,{strokeWidth:1.1,className:"absolute left-4 top-1/2 transform -translate-y-1/2 text-gray-900 h-5 w-5"}),m.jsx(an,{placeholder:n,className:L("pl-12 rounded-full",K0[e],X0[t],r),onChange:o,value:a,disabled:i})]}),Z0=[{value:"all",label:"All Categories"},{value:"electronics",label:"Electronics"},{value:"clothing",label:"Clothing"},{value:"books",label:"Books"}],Q0=[{value:"newest",label:"Newest First"},{value:"oldest",label:"Oldest First"},{value:"name-asc",label:"Name A-Z"},{value:"name-desc",label:"Name Z-A"}],J0=({className:e,searchPlaceholder:t="Search...",categories:n=Z0,sortOptions:r=Q0,showDateFilter:o=!1,onSearch:a,onFilter:i,onClear:s,defaultFilters:c})=>{const[u,f]=x.useState({category:(c==null?void 0:c.category)??"",sort:(c==null?void 0:c.sort)??"",dateFrom:c==null?void 0:c.dateFrom,dateTo:c==null?void 0:c.dateTo}),[l,p]=x.useState(!1),[h,b]=x.useState(!1),[g,v]=x.useState(u.dateFrom??new Date),[w,y]=x.useState(u.dateTo??new Date),E=(R,S)=>{const k={...u,[R]:S};f(k),i==null||i(k)},M=()=>{f({category:"",sort:"",dateFrom:void 0,dateTo:void 0}),s==null||s()},C=Object.values(u).some(R=>R!==""&&R!==void 0);return m.jsxs("div",{className:L("space-y-4",e),children:[m.jsx(Au,{size:"medium",placeholder:t,onChange:R=>a==null?void 0:a(R.target.value)}),m.jsxs("div",{className:"flex flex-wrap items-center gap-4",children:[m.jsxs("div",{className:"flex items-center gap-2",children:[m.jsx(zh,{className:"h-4 w-4 text-gray-500"}),m.jsx("span",{className:"text-sm font-medium text-gray-700",children:"Filters:"})]}),m.jsx(Cn,{placeholder:"Category",options:n,onValueChange:R=>E("category",R),className:"min-w-[140px]"}),m.jsx(Cn,{placeholder:"Sort by",options:r,onValueChange:R=>E("sort",R),className:"min-w-[140px]"}),o&&m.jsxs(m.Fragment,{children:[m.jsx(Vr,{placeholder:"From date",value:u.dateFrom,onSelect:R=>{E("dateFrom",R),v(R??g)},className:"min-w-[140px]",open:l,onOpenChange:p,month:g,onMonthChange:v}),m.jsx(Vr,{placeholder:"To date",value:u.dateTo,onSelect:R=>{E("dateTo",R),y(R??w)},className:"min-w-[140px]",open:h,onOpenChange:b,month:w,onMonthChange:y})]}),C&&m.jsxs(kt,{variant:"outline",size:"small",onClick:M,className:"flex items-center gap-1",children:[m.jsx(cn,{className:"h-3 w-3"}),"Clear"]})]})]})},e1=[{value:"personal",label:"Personal Account"},{value:"business",label:"Business Account"},{value:"developer",label:"Developer Account"}];function t1({className:e,showDateOfBirth:t=!0,accountTypes:n=e1,onValueChange:r}){const[o,a]=x.useState(),[i,s]=x.useState(!1),[c,u]=x.useState(!1),[f,l]=x.useState(!1),[p,h]=x.useState(o??new Date),[b,g]=x.useState(""),[v,w]=x.useState("");return m.jsxs("div",{className:L("space-y-4",e),children:[m.jsx(nt,{label:"Username",placeholder:"Choose a username",helperText:"Must be at least 3 characters long",required:!0,onChange:y=>r==null?void 0:r("username",y.target.value)}),m.jsx(nt,{label:"Email Address",type:"email",placeholder:"Enter your email",icon:m.jsx(Dc,{className:"h-4 w-4"}),required:!0,onChange:y=>r==null?void 0:r("email",y.target.value)}),m.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[m.jsx(ua,{label:"Password",helperText:"Must be at least 8 characters",required:!0,value:b,onChange:y=>{g(y),r==null||r("password",y)},showPassword:i,onShowPasswordChange:s}),m.jsx(ua,{label:"Confirm Password",placeholder:"Confirm your password",required:!0,value:v,onChange:y=>{w(y),r==null||r("confirmPassword",y)},showPassword:c,onShowPasswordChange:u})]}),m.jsx(Cn,{label:"Account Type",placeholder:"Select account type",options:n,leadingIcon:m.jsx(rg,{className:"h-4 w-4"}),required:!0,onValueChange:y=>r==null?void 0:r("accountType",y)}),t&&m.jsx(Vr,{label:"Date of Birth",placeholder:"Select your birth date",helperText:"Must be 18 or older",value:o,maxDate:new Date,onSelect:y=>{a(y),h(y??p),y&&(r==null||r("dateOfBirth",y))},open:f,onOpenChange:l,month:p,onMonthChange:h})]})}const n1=[{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 r1({className:e,countries:t=n1,onValueChange:n}){return m.jsxs("div",{className:L("space-y-4",e),children:[m.jsx(nt,{label:"Street Address",placeholder:"Enter street address",required:!0,onChange:r=>n==null?void 0:n("streetAddress",r.target.value)}),m.jsx(nt,{label:"Apartment, suite, etc.",placeholder:"Apartment, suite, etc. (optional)",onChange:r=>n==null?void 0:n("addressLine2",r.target.value)}),m.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-3 gap-4",children:[m.jsx(nt,{label:"City",placeholder:"Enter city",required:!0,onChange:r=>n==null?void 0:n("city",r.target.value)}),m.jsx(nt,{label:"State/Province",placeholder:"Enter state",required:!0,onChange:r=>n==null?void 0:n("state",r.target.value)}),m.jsx(nt,{label:"ZIP/Postal Code",placeholder:"Enter ZIP code",required:!0,onChange:r=>n==null?void 0:n("zipCode",r.target.value)})]}),m.jsx(Cn,{label:"Country",placeholder:"Select country",options:t,leadingIcon:m.jsx(Vh,{className:"h-4 w-4"}),required:!0,onValueChange:r=>n==null?void 0:n("country",r)})]})}const o1=[{value:"sales",label:"Sales"},{value:"support",label:"Support"},{value:"general",label:"General Inquiry"}];function a1({className:e,showDepartment:t=!0,departmentOptions:n=o1,onValueChange:r}){return m.jsxs("div",{className:L("space-y-4",e),children:[m.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[m.jsx(nt,{label:"First Name",placeholder:"Enter first name",required:!0,onChange:o=>r==null?void 0:r("firstName",o.target.value)}),m.jsx(nt,{label:"Last Name",placeholder:"Enter last name",required:!0,onChange:o=>r==null?void 0:r("lastName",o.target.value)})]}),m.jsx(nt,{label:"Email Address",type:"email",placeholder:"Enter your email",icon:m.jsx(Dc,{className:"h-4 w-4"}),required:!0,onChange:o=>r==null?void 0:r("email",o.target.value)}),m.jsx(nt,{label:"Phone Number",type:"tel",placeholder:"+1 (555) 000-0000",icon:m.jsx(Qh,{className:"h-4 w-4"}),onChange:o=>r==null?void 0:r("phone",o.target.value)}),t&&m.jsx(Cn,{label:"Department",placeholder:"Select department",options:n,leadingIcon:m.jsx(Dh,{className:"h-4 w-4"}),onValueChange:o=>r==null?void 0:r("department",o)}),m.jsx(Fa,{label:"Message",placeholder:"How can we help you?",required:!0,onChange:o=>r==null?void 0:r("message",o.target.value)})]})}var _i=1,s1=.9,i1=.8,c1=.17,qo=.1,Vo=.999,l1=.9999,u1=.99,d1=/[\\\/_+.#"@\[\(\{&]/,f1=/[\\\/_+.#"@\[\(\{&]/g,m1=/[\s-]/,Iu=/[\s-]/g;function Da(e,t,n,r,o,a,i){if(a===t.length)return o===e.length?_i:u1;var s=`${o},${a}`;if(i[s]!==void 0)return i[s];for(var c=r.charAt(a),u=n.indexOf(c,o),f=0,l,p,h,b;u>=0;)l=Da(e,t,n,r,u+1,a+1,i),l>f&&(u===o?l*=_i:d1.test(e.charAt(u-1))?(l*=i1,h=e.slice(o,u-1).match(f1),h&&o>0&&(l*=Math.pow(Vo,h.length))):m1.test(e.charAt(u-1))?(l*=s1,b=e.slice(o,u-1).match(Iu),b&&o>0&&(l*=Math.pow(Vo,b.length))):(l*=c1,o>0&&(l*=Math.pow(Vo,u-o))),e.charAt(u)!==t.charAt(a)&&(l*=l1)),(l<qo&&n.charAt(u-1)===r.charAt(a+1)||r.charAt(a+1)===r.charAt(a)&&n.charAt(u-1)!==r.charAt(a))&&(p=Da(e,t,n,r,u+1,a+2,i),p*qo>l&&(l=p*qo)),l>f&&(f=l),u=n.indexOf(c,u+1);return i[s]=f,f}function Ai(e){return e.toLowerCase().replace(Iu," ")}function p1(e,t,n){return e=n&&n.length>0?`${e+" "+n.join(" ")}`:e,Da(e,t,Ai(e),Ai(t),0,0,{})}function Gn(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 Ko(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}var h1="DismissableLayer",Ma="dismissableLayer.update",g1="dismissableLayer.pointerDownOutside",v1="dismissableLayer.focusOutside",Ii,ju=d.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),$u=d.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:i,onDismiss:s,...c}=e,u=d.useContext(ju),[f,l]=d.useState(null),p=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,h]=d.useState({}),b=fe(t,S=>l(S)),g=Array.from(u.layers),[v]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),w=g.indexOf(v),y=f?g.indexOf(f):-1,E=u.layersWithOutsidePointerEventsDisabled.size>0,M=y>=w,C=w1(S=>{const k=S.target,I=[...u.branches].some(A=>A.contains(k));!M||I||(o==null||o(S),i==null||i(S),S.defaultPrevented||s==null||s())},p),R=x1(S=>{const k=S.target;[...u.branches].some(A=>A.contains(k))||(a==null||a(S),i==null||i(S),S.defaultPrevented||s==null||s())},p);return nr(S=>{y===u.layers.size-1&&(r==null||r(S),!S.defaultPrevented&&s&&(S.preventDefault(),s()))},p),d.useEffect(()=>{if(f)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(Ii=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(f)),u.layers.add(f),ji(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=Ii)}},[f,p,n,u]),d.useEffect(()=>()=>{f&&(u.layers.delete(f),u.layersWithOutsidePointerEventsDisabled.delete(f),ji())},[f,u]),d.useEffect(()=>{const S=()=>h({});return document.addEventListener(Ma,S),()=>document.removeEventListener(Ma,S)},[]),m.jsx(J.div,{...c,ref:b,style:{pointerEvents:E?M?"auto":"none":void 0,...e.style},onFocusCapture:Ko(e.onFocusCapture,R.onFocusCapture),onBlurCapture:Ko(e.onBlurCapture,R.onBlurCapture),onPointerDownCapture:Ko(e.onPointerDownCapture,C.onPointerDownCapture)})});$u.displayName=h1;var b1="DismissableLayerBranch",y1=d.forwardRef((e,t)=>{const n=d.useContext(ju),r=d.useRef(null),o=fe(t,r);return d.useEffect(()=>{const a=r.current;if(a)return n.branches.add(a),()=>{n.branches.delete(a)}},[n.branches]),m.jsx(J.div,{...e,ref:o})});y1.displayName=b1;function w1(e,t=globalThis==null?void 0:globalThis.document){const n=je(e),r=d.useRef(!1),o=d.useRef(()=>{});return d.useEffect(()=>{const a=s=>{if(s.target&&!r.current){let c=function(){Lu(g1,n,u,{discrete:!0})};const u={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=c,t.addEventListener("click",o.current,{once:!0})):c()}else t.removeEventListener("click",o.current);r.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",a),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function x1(e,t=globalThis==null?void 0:globalThis.document){const n=je(e),r=d.useRef(!1);return d.useEffect(()=>{const o=a=>{a.target&&!r.current&&Lu(v1,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 ji(){const e=new CustomEvent(Ma);document.dispatchEvent(e)}function Lu(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?kn(o,a):o.dispatchEvent(a)}function S1(e,t){return d.useReducer((n,r)=>t[n][r]??n,e)}var vo=e=>{const{present:t,children:n}=e,r=E1(t),o=typeof n=="function"?n({present:r.isPresent}):d.Children.only(n),a=fe(r.ref,C1(o));return typeof n=="function"||r.isPresent?d.cloneElement(o,{ref:a}):null};vo.displayName="Presence";function E1(e){const[t,n]=d.useState(),r=d.useRef(null),o=d.useRef(e),a=d.useRef("none"),i=e?"mounted":"unmounted",[s,c]=S1(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return d.useEffect(()=>{const u=kr(r.current);a.current=s==="mounted"?u:"none"},[s]),Re(()=>{const u=r.current,f=o.current;if(f!==e){const p=a.current,h=kr(u);e?c("MOUNT"):h==="none"||(u==null?void 0:u.display)==="none"?c("UNMOUNT"):c(f&&p!==h?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,c]),Re(()=>{if(t){let u;const f=t.ownerDocument.defaultView??window,l=h=>{const g=kr(r.current).includes(CSS.escape(h.animationName));if(h.target===t&&g&&(c("ANIMATION_END"),!o.current)){const v=t.style.animationFillMode;t.style.animationFillMode="forwards",u=f.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=v)})}},p=h=>{h.target===t&&(a.current=kr(r.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",l),t.addEventListener("animationend",l),()=>{f.clearTimeout(u),t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",l),t.removeEventListener("animationend",l)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:d.useCallback(u=>{r.current=u?getComputedStyle(u):null,n(u)},[])}}function kr(e){return(e==null?void 0:e.animationName)||"none"}function C1(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 Xo=0;function D1(){d.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??$i()),document.body.insertAdjacentElement("beforeend",e[1]??$i()),Xo++,()=>{Xo===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Xo--}},[])}function $i(){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 bo="Dialog",[Fu,EM]=Ge(bo),[M1,dt]=Fu(bo),Wu=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:a,modal:i=!0}=e,s=d.useRef(null),c=d.useRef(null),[u,f]=ot({prop:r,defaultProp:o??!1,onChange:a,caller:bo});return m.jsx(M1,{scope:t,triggerRef:s,contentRef:c,contentId:Pe(),titleId:Pe(),descriptionId:Pe(),open:u,onOpenChange:f,onOpenToggle:d.useCallback(()=>f(l=>!l),[f]),modal:i,children:n})};Wu.displayName=bo;var Bu="DialogTrigger",Yu=d.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=dt(Bu,n),a=fe(t,o.triggerRef);return m.jsx(J.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":cs(o.open),...r,ref:a,onClick:Gn(e.onClick,o.onOpenToggle)})});Yu.displayName=Bu;var ss="DialogPortal",[N1,zu]=Fu(ss,{forceMount:void 0}),Hu=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,a=dt(ss,t);return m.jsx(N1,{scope:t,forceMount:n,children:d.Children.map(r,i=>m.jsx(vo,{present:n||a.open,children:m.jsx(ir,{asChild:!0,container:o,children:i})}))})};Hu.displayName=ss;var Kr="DialogOverlay",Uu=d.forwardRef((e,t)=>{const n=zu(Kr,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,a=dt(Kr,e.__scopeDialog);return a.modal?m.jsx(vo,{present:r||a.open,children:m.jsx(R1,{...o,ref:t})}):null});Uu.displayName=Kr;var k1=Wt("DialogOverlay.RemoveScroll"),R1=d.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=dt(Kr,n);return m.jsx(cr,{as:k1,allowPinchZoom:!0,shards:[o.contentRef],children:m.jsx(J.div,{"data-state":cs(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),rn="DialogContent",Gu=d.forwardRef((e,t)=>{const n=zu(rn,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,a=dt(rn,e.__scopeDialog);return m.jsx(vo,{present:r||a.open,children:a.modal?m.jsx(O1,{...o,ref:t}):m.jsx(T1,{...o,ref:t})})});Gu.displayName=rn;var O1=d.forwardRef((e,t)=>{const n=dt(rn,e.__scopeDialog),r=d.useRef(null),o=fe(t,n.contentRef,r);return d.useEffect(()=>{const a=r.current;if(a)return co(a)},[]),m.jsx(qu,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Gn(e.onCloseAutoFocus,a=>{var i;a.preventDefault(),(i=n.triggerRef.current)==null||i.focus()}),onPointerDownOutside:Gn(e.onPointerDownOutside,a=>{const i=a.detail.originalEvent,s=i.button===0&&i.ctrlKey===!0;(i.button===2||s)&&a.preventDefault()}),onFocusOutside:Gn(e.onFocusOutside,a=>a.preventDefault())})}),T1=d.forwardRef((e,t)=>{const n=dt(rn,e.__scopeDialog),r=d.useRef(!1),o=d.useRef(!1);return m.jsx(qu,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:a=>{var i,s;(i=e.onCloseAutoFocus)==null||i.call(e,a),a.defaultPrevented||(r.current||(s=n.triggerRef.current)==null||s.focus(),a.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:a=>{var c,u;(c=e.onInteractOutside)==null||c.call(e,a),a.defaultPrevented||(r.current=!0,a.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const i=a.target;((u=n.triggerRef.current)==null?void 0:u.contains(i))&&a.preventDefault(),a.detail.originalEvent.type==="focusin"&&o.current&&a.preventDefault()}})}),qu=d.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:a,...i}=e,s=dt(rn,n),c=d.useRef(null),u=fe(t,c);return D1(),m.jsxs(m.Fragment,{children:[m.jsx(rr,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:a,children:m.jsx($u,{role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":cs(s.open),...i,ref:u,onDismiss:()=>s.onOpenChange(!1)})}),m.jsxs(m.Fragment,{children:[m.jsx(P1,{titleId:s.titleId}),m.jsx(A1,{contentRef:c,descriptionId:s.descriptionId})]})]})}),is="DialogTitle",Vu=d.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=dt(is,n);return m.jsx(J.h2,{id:o.titleId,...r,ref:t})});Vu.displayName=is;var Ku="DialogDescription",Xu=d.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=dt(Ku,n);return m.jsx(J.p,{id:o.descriptionId,...r,ref:t})});Xu.displayName=Ku;var Zu="DialogClose",Qu=d.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=dt(Zu,n);return m.jsx(J.button,{type:"button",...r,ref:t,onClick:Gn(e.onClick,()=>o.onOpenChange(!1))})});Qu.displayName=Zu;function cs(e){return e?"open":"closed"}var Ju="DialogTitleWarning",[CM,ed]=ag(Ju,{contentName:rn,titleName:is,docsSlug:"dialog"}),P1=({titleId:e})=>{const t=ed(Ju),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
179
179
 
180
180
  If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
181
181
 
182
- For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return d.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},_1="DialogDescriptionWarning",A1=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${td(_1).contentName}}.`;return d.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},ls=Bu,nd=zu,us=Uu,yo=Gu,wo=qu,ds=Ku,fs=Zu,ms=Ju,Fn='[cmdk-group=""]',Zo='[cmdk-group-items=""]',I1='[cmdk-group-heading=""]',rd='[cmdk-item=""]',Fi=`${rd}:not([aria-disabled="true"])`,Na="cmdk-item-select",vn="data-value",j1=(e,t,n)=>p1(e,t,n),od=d.createContext(void 0),hr=()=>d.useContext(od),ad=d.createContext(void 0),ps=()=>d.useContext(ad),sd=d.createContext(void 0),id=d.forwardRef((e,t)=>{let n=bn(()=>{var T,j;return{search:"",value:(j=(T=e.value)!=null?T:e.defaultValue)!=null?j:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),r=bn(()=>new Set),o=bn(()=>new Map),a=bn(()=>new Map),i=bn(()=>new Set),s=cd(e),{label:c,children:u,value:f,onValueChange:l,filter:p,shouldFilter:h,loop:b,disablePointerSelection:g=!1,vimBindings:v=!0,...y}=e,w=Pe(),E=Pe(),M=Pe(),C=d.useRef(null),k=q1();on(()=>{if(f!==void 0){let T=f.trim();n.current.value=T,S.emit()}},[f]),on(()=>{k(6,B)},[]);let S=d.useMemo(()=>({subscribe:T=>(i.current.add(T),()=>i.current.delete(T)),snapshot:()=>n.current,setState:(T,j,z)=>{var U,G,W,X;if(!Object.is(n.current[T],j)){if(n.current[T]=j,T==="search")V(),I(),k(1,L);else if(T==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let Z=document.getElementById(M);Z?Z.focus():(U=document.getElementById(w))==null||U.focus()}if(k(7,()=>{var Z;n.current.selectedItemId=(Z=$())==null?void 0:Z.id,S.emit()}),z||k(5,B),((G=s.current)==null?void 0:G.value)!==void 0){let Z=j??"";(X=(W=s.current).onValueChange)==null||X.call(W,Z);return}}S.emit()}},emit:()=>{i.current.forEach(T=>T())}}),[]),R=d.useMemo(()=>({value:(T,j,z)=>{var U;j!==((U=a.current.get(T))==null?void 0:U.value)&&(a.current.set(T,{value:j,keywords:z}),n.current.filtered.items.set(T,A(j,z)),k(2,()=>{I(),S.emit()}))},item:(T,j)=>(r.current.add(T),j&&(o.current.has(j)?o.current.get(j).add(T):o.current.set(j,new Set([T]))),k(3,()=>{V(),I(),n.current.value||L(),S.emit()}),()=>{a.current.delete(T),r.current.delete(T),n.current.filtered.items.delete(T);let z=$();k(4,()=>{V(),(z==null?void 0:z.getAttribute("id"))===T&&L(),S.emit()})}),group:T=>(o.current.has(T)||o.current.set(T,new Set),()=>{a.current.delete(T),o.current.delete(T)}),filter:()=>s.current.shouldFilter,label:c||e["aria-label"],getDisablePointerSelection:()=>s.current.disablePointerSelection,listId:w,inputId:M,labelId:E,listInnerRef:C}),[]);function A(T,j){var z,U;let G=(U=(z=s.current)==null?void 0:z.filter)!=null?U:j1;return T?G(T,n.current.search,j):0}function I(){if(!n.current.search||s.current.shouldFilter===!1)return;let T=n.current.filtered.items,j=[];n.current.filtered.groups.forEach(U=>{let G=o.current.get(U),W=0;G.forEach(X=>{let Z=T.get(X);W=Math.max(Z,W)}),j.push([U,W])});let z=C.current;_().sort((U,G)=>{var W,X;let Z=U.getAttribute("id"),Q=G.getAttribute("id");return((W=T.get(Q))!=null?W:0)-((X=T.get(Z))!=null?X:0)}).forEach(U=>{let G=U.closest(Zo);G?G.appendChild(U.parentElement===G?U:U.closest(`${Zo} > *`)):z.appendChild(U.parentElement===z?U:U.closest(`${Zo} > *`))}),j.sort((U,G)=>G[1]-U[1]).forEach(U=>{var G;let W=(G=C.current)==null?void 0:G.querySelector(`${Fn}[${vn}="${encodeURIComponent(U[0])}"]`);W==null||W.parentElement.appendChild(W)})}function L(){let T=_().find(z=>z.getAttribute("aria-disabled")!=="true"),j=T==null?void 0:T.getAttribute(vn);S.setState("value",j||void 0)}function V(){var T,j,z,U;if(!n.current.search||s.current.shouldFilter===!1){n.current.filtered.count=r.current.size;return}n.current.filtered.groups=new Set;let G=0;for(let W of r.current){let X=(j=(T=a.current.get(W))==null?void 0:T.value)!=null?j:"",Z=(U=(z=a.current.get(W))==null?void 0:z.keywords)!=null?U:[],Q=A(X,Z);n.current.filtered.items.set(W,Q),Q>0&&G++}for(let[W,X]of o.current)for(let Z of X)if(n.current.filtered.items.get(Z)>0){n.current.filtered.groups.add(W);break}n.current.filtered.count=G}function B(){var T,j,z;let U=$();U&&(((T=U.parentElement)==null?void 0:T.firstChild)===U&&((z=(j=U.closest(Fn))==null?void 0:j.querySelector(I1))==null||z.scrollIntoView({block:"nearest"})),U.scrollIntoView({block:"nearest"}))}function $(){var T;return(T=C.current)==null?void 0:T.querySelector(`${rd}[aria-selected="true"]`)}function _(){var T;return Array.from(((T=C.current)==null?void 0:T.querySelectorAll(Fi))||[])}function N(T){let j=_()[T];j&&S.setState("value",j.getAttribute(vn))}function O(T){var j;let z=$(),U=_(),G=U.findIndex(X=>X===z),W=U[G+T];(j=s.current)!=null&&j.loop&&(W=G+T<0?U[U.length-1]:G+T===U.length?U[0]:U[G+T]),W&&S.setState("value",W.getAttribute(vn))}function D(T){let j=$(),z=j==null?void 0:j.closest(Fn),U;for(;z&&!U;)z=T>0?U1(z,Fn):G1(z,Fn),U=z==null?void 0:z.querySelector(Fi);U?S.setState("value",U.getAttribute(vn)):O(T)}let P=()=>N(_().length-1),Y=T=>{T.preventDefault(),T.metaKey?P():T.altKey?D(1):O(1)},H=T=>{T.preventDefault(),T.metaKey?N(0):T.altKey?D(-1):O(-1)};return d.createElement(J.div,{ref:t,tabIndex:-1,...y,"cmdk-root":"",onKeyDown:T=>{var j;(j=y.onKeyDown)==null||j.call(y,T);let z=T.nativeEvent.isComposing||T.keyCode===229;if(!(T.defaultPrevented||z))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&&H(T);break}case"ArrowUp":{H(T);break}case"Home":{T.preventDefault(),N(0);break}case"End":{T.preventDefault(),P();break}case"Enter":{T.preventDefault();let U=$();if(U){let G=new Event(Na);U.dispatchEvent(G)}}}}},d.createElement("label",{"cmdk-label":"",htmlFor:R.inputId,id:R.labelId,style:K1},c),xo(e,T=>d.createElement(ad.Provider,{value:S},d.createElement(od.Provider,{value:R},T))))}),$1=d.forwardRef((e,t)=>{var n,r;let o=Pe(),a=d.useRef(null),i=d.useContext(sd),s=hr(),c=cd(e),u=(r=(n=c.current)==null?void 0:n.forceMount)!=null?r:i==null?void 0:i.forceMount;on(()=>{if(!u)return s.item(o,i==null?void 0:i.id)},[u]);let f=ld(o,a,[e.value,e.children,a],e.keywords),l=ps(),p=zt(k=>k.value&&k.value===f.current),h=zt(k=>u||s.filter()===!1?!0:k.search?k.filtered.items.get(o)>0:!0);d.useEffect(()=>{let k=a.current;if(!(!k||e.disabled))return k.addEventListener(Na,b),()=>k.removeEventListener(Na,b)},[h,e.onSelect,e.disabled]);function b(){var k,S;g(),(S=(k=c.current).onSelect)==null||S.call(k,f.current)}function g(){l.setState("value",f.current,!0)}if(!h)return null;let{disabled:v,value:y,onSelect:w,forceMount:E,keywords:M,...C}=e;return d.createElement(J.div,{ref:Nt(a,t),...C,id:o,"cmdk-item":"",role:"option","aria-disabled":!!v,"aria-selected":!!p,"data-disabled":!!v,"data-selected":!!p,onPointerMove:v||s.getDisablePointerSelection()?void 0:g,onClick:v?void 0:b},e.children)}),L1=d.forwardRef((e,t)=>{let{heading:n,children:r,forceMount:o,...a}=e,i=Pe(),s=d.useRef(null),c=d.useRef(null),u=Pe(),f=hr(),l=zt(h=>o||f.filter()===!1?!0:h.search?h.filtered.groups.has(i):!0);on(()=>f.group(i),[]),ld(i,s,[e.value,e.heading,c]);let p=d.useMemo(()=>({id:i,forceMount:o}),[o]);return d.createElement(J.div,{ref:Nt(s,t),...a,"cmdk-group":"",role:"presentation",hidden:l?void 0:!0},n&&d.createElement("div",{ref:c,"cmdk-group-heading":"","aria-hidden":!0,id:u},n),xo(e,h=>d.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?u:void 0},d.createElement(sd.Provider,{value:p},h))))}),F1=d.forwardRef((e,t)=>{let{alwaysRender:n,...r}=e,o=d.useRef(null),a=zt(i=>!i.search);return!n&&!a?null:d.createElement(J.div,{ref:Nt(o,t),...r,"cmdk-separator":"",role:"separator"})}),W1=d.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,o=e.value!=null,a=ps(),i=zt(u=>u.search),s=zt(u=>u.selectedItemId),c=hr();return d.useEffect(()=>{e.value!=null&&a.setState("search",e.value)},[e.value]),d.createElement(J.input,{ref:t,...r,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":c.listId,"aria-labelledby":c.labelId,"aria-activedescendant":s,id:c.inputId,type:"text",value:o?e.value:i,onChange:u=>{o||a.setState("search",u.target.value),n==null||n(u.target.value)}})}),B1=d.forwardRef((e,t)=>{let{children:n,label:r="Suggestions",...o}=e,a=d.useRef(null),i=d.useRef(null),s=zt(u=>u.selectedItemId),c=hr();return d.useEffect(()=>{if(i.current&&a.current){let u=i.current,f=a.current,l,p=new ResizeObserver(()=>{l=requestAnimationFrame(()=>{let h=u.offsetHeight;f.style.setProperty("--cmdk-list-height",h.toFixed(1)+"px")})});return p.observe(u),()=>{cancelAnimationFrame(l),p.unobserve(u)}}},[]),d.createElement(J.div,{ref:Nt(a,t),...o,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":s,"aria-label":r,id:c.listId},xo(e,u=>d.createElement("div",{ref:Nt(i,c.listInnerRef),"cmdk-list-sizer":""},u)))}),Y1=d.forwardRef((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:o,contentClassName:a,container:i,...s}=e;return d.createElement(ls,{open:n,onOpenChange:r},d.createElement(us,{container:i},d.createElement(yo,{"cmdk-overlay":"",className:o}),d.createElement(wo,{"aria-label":e.label,"cmdk-dialog":"",className:a},d.createElement(id,{ref:t,...s}))))}),z1=d.forwardRef((e,t)=>zt(n=>n.filtered.count===0)?d.createElement(J.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),H1=d.forwardRef((e,t)=>{let{progress:n,children:r,label:o="Loading...",...a}=e;return d.createElement(J.div,{ref:t,...a,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":o},xo(e,i=>d.createElement("div",{"aria-hidden":!0},i)))}),He=Object.assign(id,{List:B1,Item:$1,Input:W1,Group:L1,Separator:F1,Dialog:Y1,Empty:z1,Loading:H1});function U1(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function G1(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function cd(e){let t=d.useRef(e);return on(()=>{t.current=e}),t}var on=typeof window>"u"?d.useEffect:d.useLayoutEffect;function bn(e){let t=d.useRef();return t.current===void 0&&(t.current=e()),t}function zt(e){let t=ps(),n=()=>e(t.snapshot());return d.useSyncExternalStore(t.subscribe,n,n)}function ld(e,t,n,r=[]){let o=d.useRef(),a=hr();return on(()=>{var i;let s=(()=>{var u;for(let f of n){if(typeof f=="string")return f.trim();if(typeof f=="object"&&"current"in f)return f.current?(u=f.current.textContent)==null?void 0:u.trim():o.current}})(),c=r.map(u=>u.trim());a.value(e,s,c),(i=t.current)==null||i.setAttribute(vn,s),o.current=s}),o}var q1=()=>{let[e,t]=d.useState(),n=bn(()=>new Map);return on(()=>{n.current.forEach(r=>r()),n.current=new Map},[e]),(r,o)=>{n.current.set(r,o),t({})}};function V1(e){let t=e.type;return typeof t=="function"?t(e.props):"render"in t?t.render(e.props):e}function xo({asChild:e,children:t},n){return e&&d.isValidElement(t)?d.cloneElement(V1(t),{ref:t.ref},n(t.props.children)):n(t)}var K1={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};const X1=ls,Z1=nd,Q1=us,J1=ms,ud=d.forwardRef(({className:e,...t},n)=>m.jsx(yo,{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}));ud.displayName=yo.displayName;const dd=d.forwardRef(({className:e,children:t,closeOnOutsideClick:n=!0,...r},o)=>m.jsxs(Q1,{children:[m.jsx(ud,{}),m.jsx("div",{className:"fixed inset-0 z-40 bg-black/50"}),m.jsxs(wo,{ref:o,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),onInteractOutside:n?void 0:a=>a.preventDefault(),...r,children:[t,m.jsxs(ms,{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:[m.jsx(cn,{className:"h-4 w-4"}),m.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));dd.displayName=wo.displayName;const fd=({className:e,...t})=>m.jsx("div",{className:F("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});fd.displayName="DialogHeader";const md=({className:e,...t})=>m.jsx("div",{className:F("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});md.displayName="DialogFooter";const pd=d.forwardRef(({className:e,...t},n)=>m.jsx(ds,{ref:n,className:F("text-lg font-semibold leading-none tracking-tight",e),...t}));pd.displayName=ds.displayName;const hd=d.forwardRef(({className:e,...t},n)=>m.jsx(fs,{ref:n,className:F("text-sm text-muted-foreground",e),...t}));hd.displayName=fs.displayName;const eS=d.forwardRef(({className:e,...t},n)=>m.jsx(He,{ref:n,className:F("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...t}));eS.displayName=He.displayName;const gd=d.forwardRef(({className:e,...t},n)=>m.jsxs("div",{className:"flex items-center h-auto px-3","cmdk-input-wrapper":"",children:[m.jsx(Nc,{strokeWidth:1.25,className:"mr-2 h-4 w-4 shrink-0"}),m.jsx(He.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})]}));gd.displayName=He.Input.displayName;const vd=d.forwardRef(({className:e,...t},n)=>m.jsx(He.List,{ref:n,className:F("max-h-[300px] overflow-y-auto overflow-x-hidden",e),...t}));vd.displayName=He.List.displayName;const tS=d.forwardRef((e,t)=>m.jsx(He.Empty,{ref:t,className:"py-6 text-center text-sm",...e}));tS.displayName=He.Empty.displayName;const bd=d.forwardRef(({className:e,...t},n)=>m.jsx(He.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}));bd.displayName=He.Group.displayName;const nS=d.forwardRef(({className:e,...t},n)=>m.jsx(He.Separator,{ref:n,className:F("-mx-1 h-px bg-border",e),...t}));nS.displayName=He.Separator.displayName;const yd=d.forwardRef(({className:e,...t},n)=>m.jsx(He.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}));yd.displayName=He.Item.displayName;function rS({className:e,...t}){return m.jsx("div",{className:F("animate-pulse rounded-md bg-muted",e),...t})}function oS(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 aS=({options:e,placeholder:t,emptyMessage:n,value:r,onValueChange:o,disabled:a,isLoading:i=!1,className:s,size:c,variant:u})=>{const{variantClasses:f,combined:l}=oS(c,u),p=x.useRef(null),[h,b]=x.useState(!1),[g,v]=x.useState(r),[y,w]=x.useState((r==null?void 0:r.label)||""),E=x.useCallback(k=>{const S=p.current;if(S){if(h||b(!0),k.key==="Enter"&&S.value!==""){const R=e.find(A=>A.label===S.value);R&&(v(R),o==null||o(R))}k.key==="Escape"&&S.blur()}},[h,e,o]),M=x.useCallback(()=>{b(!1),w((g==null?void 0:g.label)||"")},[g]),C=x.useCallback(k=>{w(k.label),v(k),o==null||o(k),setTimeout(()=>{var S;(S=p==null?void 0:p.current)==null||S.blur()},0)},[o]);return m.jsxs(He,{onKeyDown:E,children:[m.jsxs("div",{className:F("rounded-full border bg-gray-100",f,s),children:[" ",m.jsx(gd,{ref:p,value:y,onValueChange:i?void 0:w,onBlur:M,onFocus:()=>b(!0),placeholder:t,disabled:a,className:l})]}),m.jsx("div",{className:"relative mt-1",children:m.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",s),children:m.jsxs(vd,{className:"rounded-lg ring-1 ring-slate-200 dark:ring-gray-700",children:[i?m.jsx(He.Loading,{children:m.jsx("div",{className:"p-1",children:m.jsx(rS,{className:"h-8 w-full"})})}):null,e.length>0&&!i?m.jsx(bd,{children:e.map(k=>{const S=(g==null?void 0:g.value)===k.value;return m.jsxs(yd,{value:k.label,onMouseDown:R=>{R.preventDefault(),R.stopPropagation()},onSelect:()=>C(k),className:F("flex w-full items-center gap-2 dark:text-white",S?null:"pl-8"),children:[S?m.jsx(tr,{className:"w-4"}):null,k.label]},k.value)})}):null,i?null:m.jsx(He.Empty,{className:"select-none rounded-sm px-2 py-3 text-center text-sm dark:text-gray-400",children:n})]})})})]})},sS=to("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 iS({className:e,variant:t,...n}){return m.jsx("div",{className:F(sS({variant:t}),e),...n})}function cS({title:e,children:t,className:n}){return m.jsxs("section",{className:F("space-y-6",n),children:[m.jsx("div",{className:"border-b border-gray-200 pb-3",children:m.jsx("h2",{className:"text-sm font-semibold text-gray-900 tracking-wide uppercase",children:e})}),t]})}function lS({title:e,variant:t="primary",children:n,className:r}){return m.jsxs("div",{className:F("space-y-4",r),children:[m.jsx(iS,{variant:t==="primary"?"default":"secondary",className:F(t==="primary"&&"bg-black text-white hover:bg-black/90"),children:e}),n]})}const wd=x.forwardRef(({className:e,label:t,helperText:n,error:r,startAdornment:o,endAdornment:a,required:i,id:s,onInput:c,...u},f)=>{const l=!!r,p=s||`currency-input-${Math.random().toString(36).substr(2,9)}`,h=b=>{var w;const g=b.currentTarget;let v=g.value;v=v.replace(/[^0-9.]/g,"");const y=v.split(".");y.length>2&&(v=y[0]+"."+y.slice(1).join("")),((w=y[1])==null?void 0:w.length)>2&&(v=y[0]+"."+y[1].substring(0,2)),g.value=v,c&&c(b)};return m.jsxs("div",{className:"flex flex-col space-y-1",children:[t&&m.jsxs("label",{htmlFor:p,className:"text-sm font-medium text-gray-700",children:[t,i&&m.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),m.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",l?"border-destructive":"border-input",e),children:[o&&m.jsx("span",{className:"px-3 text-sm text-muted-foreground",children:o}),m.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 disabled:opacity-50"),ref:f,onInput:h,...u}),a&&m.jsx("span",{className:"px-3 text-sm text-muted-foreground",children:a})]}),(n||r)&&m.jsx("span",{className:F("text-xs",l?"text-red-500":"text-muted-foreground"),children:r||n})]})});wd.displayName="CurrencyInput";const uS={small:"h-8 text-xs px-2",medium:"h-10 text-sm px-3",large:"h-12 text-base px-4"},dS={outlined:"border border-input",filled:"border-0 bg-accent",standard:"border-0 border-b border-input rounded-none"},fS=(e,t)=>t&&typeof e=="object"&&e!==null?e[t.text]:typeof e=="string"?e:(e==null?void 0:e.label)||"",mS=(e,t)=>t&&typeof e=="object"&&e!==null?e[t.value]:typeof e=="string"?e:(e==null?void 0:e.value)||e,pS=(e,t,n,r)=>n(e,r)===n(t,r),Wi=e=>{if(e==null)return"";try{return String(e).toLowerCase().replace(/[^a-z0-9]/g,"")}catch{return""}},hS=(e,t,n,r)=>{if(!t)return e;const o=Wi(t);return e.filter(a=>{const i=n(a,r);return Wi(i).includes(o)})},xd=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 m.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})});xd.displayName="Badge";const Sd=e=>{const{option:t,index:n,isSelected:r,isHighlighted:o,onSelect:a,getOptionLabel:i,renderOption:s}=e,c=x.useCallback(()=>{a(t)},[t,a]);return m.jsx("div",{onClick:c,className:`
182
+ For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return d.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},_1="DialogDescriptionWarning",A1=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${ed(_1).contentName}}.`;return d.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},ls=Wu,td=Yu,us=Hu,yo=Uu,wo=Gu,ds=Vu,fs=Xu,ms=Qu,Fn='[cmdk-group=""]',Zo='[cmdk-group-items=""]',I1='[cmdk-group-heading=""]',nd='[cmdk-item=""]',Li=`${nd}:not([aria-disabled="true"])`,Na="cmdk-item-select",vn="data-value",j1=(e,t,n)=>p1(e,t,n),rd=d.createContext(void 0),pr=()=>d.useContext(rd),od=d.createContext(void 0),ps=()=>d.useContext(od),ad=d.createContext(void 0),sd=d.forwardRef((e,t)=>{let n=bn(()=>{var T,j;return{search:"",value:(j=(T=e.value)!=null?T:e.defaultValue)!=null?j:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),r=bn(()=>new Set),o=bn(()=>new Map),a=bn(()=>new Map),i=bn(()=>new Set),s=id(e),{label:c,children:u,value:f,onValueChange:l,filter:p,shouldFilter:h,loop:b,disablePointerSelection:g=!1,vimBindings:v=!0,...w}=e,y=Pe(),E=Pe(),M=Pe(),C=d.useRef(null),R=q1();on(()=>{if(f!==void 0){let T=f.trim();n.current.value=T,S.emit()}},[f]),on(()=>{R(6,B)},[]);let S=d.useMemo(()=>({subscribe:T=>(i.current.add(T),()=>i.current.delete(T)),snapshot:()=>n.current,setState:(T,j,z)=>{var U,q,F,X;if(!Object.is(n.current[T],j)){if(n.current[T]=j,T==="search")G(),A(),R(1,W);else if(T==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let Z=document.getElementById(M);Z?Z.focus():(U=document.getElementById(y))==null||U.focus()}if(R(7,()=>{var Z;n.current.selectedItemId=(Z=$())==null?void 0:Z.id,S.emit()}),z||R(5,B),((q=s.current)==null?void 0:q.value)!==void 0){let Z=j??"";(X=(F=s.current).onValueChange)==null||X.call(F,Z);return}}S.emit()}},emit:()=>{i.current.forEach(T=>T())}}),[]),k=d.useMemo(()=>({value:(T,j,z)=>{var U;j!==((U=a.current.get(T))==null?void 0:U.value)&&(a.current.set(T,{value:j,keywords:z}),n.current.filtered.items.set(T,I(j,z)),R(2,()=>{A(),S.emit()}))},item:(T,j)=>(r.current.add(T),j&&(o.current.has(j)?o.current.get(j).add(T):o.current.set(j,new Set([T]))),R(3,()=>{G(),A(),n.current.value||W(),S.emit()}),()=>{a.current.delete(T),r.current.delete(T),n.current.filtered.items.delete(T);let z=$();R(4,()=>{G(),(z==null?void 0:z.getAttribute("id"))===T&&W(),S.emit()})}),group:T=>(o.current.has(T)||o.current.set(T,new Set),()=>{a.current.delete(T),o.current.delete(T)}),filter:()=>s.current.shouldFilter,label:c||e["aria-label"],getDisablePointerSelection:()=>s.current.disablePointerSelection,listId:y,inputId:M,labelId:E,listInnerRef:C}),[]);function I(T,j){var z,U;let q=(U=(z=s.current)==null?void 0:z.filter)!=null?U:j1;return T?q(T,n.current.search,j):0}function A(){if(!n.current.search||s.current.shouldFilter===!1)return;let T=n.current.filtered.items,j=[];n.current.filtered.groups.forEach(U=>{let q=o.current.get(U),F=0;q.forEach(X=>{let Z=T.get(X);F=Math.max(Z,F)}),j.push([U,F])});let z=C.current;O().sort((U,q)=>{var F,X;let Z=U.getAttribute("id"),Q=q.getAttribute("id");return((F=T.get(Q))!=null?F:0)-((X=T.get(Z))!=null?X:0)}).forEach(U=>{let q=U.closest(Zo);q?q.appendChild(U.parentElement===q?U:U.closest(`${Zo} > *`)):z.appendChild(U.parentElement===z?U:U.closest(`${Zo} > *`))}),j.sort((U,q)=>q[1]-U[1]).forEach(U=>{var q;let F=(q=C.current)==null?void 0:q.querySelector(`${Fn}[${vn}="${encodeURIComponent(U[0])}"]`);F==null||F.parentElement.appendChild(F)})}function W(){let T=O().find(z=>z.getAttribute("aria-disabled")!=="true"),j=T==null?void 0:T.getAttribute(vn);S.setState("value",j||void 0)}function G(){var T,j,z,U;if(!n.current.search||s.current.shouldFilter===!1){n.current.filtered.count=r.current.size;return}n.current.filtered.groups=new Set;let q=0;for(let F of r.current){let X=(j=(T=a.current.get(F))==null?void 0:T.value)!=null?j:"",Z=(U=(z=a.current.get(F))==null?void 0:z.keywords)!=null?U:[],Q=I(X,Z);n.current.filtered.items.set(F,Q),Q>0&&q++}for(let[F,X]of o.current)for(let Z of X)if(n.current.filtered.items.get(Z)>0){n.current.filtered.groups.add(F);break}n.current.filtered.count=q}function B(){var T,j,z;let U=$();U&&(((T=U.parentElement)==null?void 0:T.firstChild)===U&&((z=(j=U.closest(Fn))==null?void 0:j.querySelector(I1))==null||z.scrollIntoView({block:"nearest"})),U.scrollIntoView({block:"nearest"}))}function $(){var T;return(T=C.current)==null?void 0:T.querySelector(`${nd}[aria-selected="true"]`)}function O(){var T;return Array.from(((T=C.current)==null?void 0:T.querySelectorAll(Li))||[])}function D(T){let j=O()[T];j&&S.setState("value",j.getAttribute(vn))}function _(T){var j;let z=$(),U=O(),q=U.findIndex(X=>X===z),F=U[q+T];(j=s.current)!=null&&j.loop&&(F=q+T<0?U[U.length-1]:q+T===U.length?U[0]:U[q+T]),F&&S.setState("value",F.getAttribute(vn))}function N(T){let j=$(),z=j==null?void 0:j.closest(Fn),U;for(;z&&!U;)z=T>0?U1(z,Fn):G1(z,Fn),U=z==null?void 0:z.querySelector(Li);U?S.setState("value",U.getAttribute(vn)):_(T)}let P=()=>D(O().length-1),Y=T=>{T.preventDefault(),T.metaKey?P():T.altKey?N(1):_(1)},H=T=>{T.preventDefault(),T.metaKey?D(0):T.altKey?N(-1):_(-1)};return d.createElement(J.div,{ref:t,tabIndex:-1,...w,"cmdk-root":"",onKeyDown:T=>{var j;(j=w.onKeyDown)==null||j.call(w,T);let z=T.nativeEvent.isComposing||T.keyCode===229;if(!(T.defaultPrevented||z))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&&H(T);break}case"ArrowUp":{H(T);break}case"Home":{T.preventDefault(),D(0);break}case"End":{T.preventDefault(),P();break}case"Enter":{T.preventDefault();let U=$();if(U){let q=new Event(Na);U.dispatchEvent(q)}}}}},d.createElement("label",{"cmdk-label":"",htmlFor:k.inputId,id:k.labelId,style:K1},c),xo(e,T=>d.createElement(od.Provider,{value:S},d.createElement(rd.Provider,{value:k},T))))}),$1=d.forwardRef((e,t)=>{var n,r;let o=Pe(),a=d.useRef(null),i=d.useContext(ad),s=pr(),c=id(e),u=(r=(n=c.current)==null?void 0:n.forceMount)!=null?r:i==null?void 0:i.forceMount;on(()=>{if(!u)return s.item(o,i==null?void 0:i.id)},[u]);let f=cd(o,a,[e.value,e.children,a],e.keywords),l=ps(),p=zt(R=>R.value&&R.value===f.current),h=zt(R=>u||s.filter()===!1?!0:R.search?R.filtered.items.get(o)>0:!0);d.useEffect(()=>{let R=a.current;if(!(!R||e.disabled))return R.addEventListener(Na,b),()=>R.removeEventListener(Na,b)},[h,e.onSelect,e.disabled]);function b(){var R,S;g(),(S=(R=c.current).onSelect)==null||S.call(R,f.current)}function g(){l.setState("value",f.current,!0)}if(!h)return null;let{disabled:v,value:w,onSelect:y,forceMount:E,keywords:M,...C}=e;return d.createElement(J.div,{ref:Nt(a,t),...C,id:o,"cmdk-item":"",role:"option","aria-disabled":!!v,"aria-selected":!!p,"data-disabled":!!v,"data-selected":!!p,onPointerMove:v||s.getDisablePointerSelection()?void 0:g,onClick:v?void 0:b},e.children)}),L1=d.forwardRef((e,t)=>{let{heading:n,children:r,forceMount:o,...a}=e,i=Pe(),s=d.useRef(null),c=d.useRef(null),u=Pe(),f=pr(),l=zt(h=>o||f.filter()===!1?!0:h.search?h.filtered.groups.has(i):!0);on(()=>f.group(i),[]),cd(i,s,[e.value,e.heading,c]);let p=d.useMemo(()=>({id:i,forceMount:o}),[o]);return d.createElement(J.div,{ref:Nt(s,t),...a,"cmdk-group":"",role:"presentation",hidden:l?void 0:!0},n&&d.createElement("div",{ref:c,"cmdk-group-heading":"","aria-hidden":!0,id:u},n),xo(e,h=>d.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?u:void 0},d.createElement(ad.Provider,{value:p},h))))}),F1=d.forwardRef((e,t)=>{let{alwaysRender:n,...r}=e,o=d.useRef(null),a=zt(i=>!i.search);return!n&&!a?null:d.createElement(J.div,{ref:Nt(o,t),...r,"cmdk-separator":"",role:"separator"})}),W1=d.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,o=e.value!=null,a=ps(),i=zt(u=>u.search),s=zt(u=>u.selectedItemId),c=pr();return d.useEffect(()=>{e.value!=null&&a.setState("search",e.value)},[e.value]),d.createElement(J.input,{ref:t,...r,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":c.listId,"aria-labelledby":c.labelId,"aria-activedescendant":s,id:c.inputId,type:"text",value:o?e.value:i,onChange:u=>{o||a.setState("search",u.target.value),n==null||n(u.target.value)}})}),B1=d.forwardRef((e,t)=>{let{children:n,label:r="Suggestions",...o}=e,a=d.useRef(null),i=d.useRef(null),s=zt(u=>u.selectedItemId),c=pr();return d.useEffect(()=>{if(i.current&&a.current){let u=i.current,f=a.current,l,p=new ResizeObserver(()=>{l=requestAnimationFrame(()=>{let h=u.offsetHeight;f.style.setProperty("--cmdk-list-height",h.toFixed(1)+"px")})});return p.observe(u),()=>{cancelAnimationFrame(l),p.unobserve(u)}}},[]),d.createElement(J.div,{ref:Nt(a,t),...o,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":s,"aria-label":r,id:c.listId},xo(e,u=>d.createElement("div",{ref:Nt(i,c.listInnerRef),"cmdk-list-sizer":""},u)))}),Y1=d.forwardRef((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:o,contentClassName:a,container:i,...s}=e;return d.createElement(ls,{open:n,onOpenChange:r},d.createElement(us,{container:i},d.createElement(yo,{"cmdk-overlay":"",className:o}),d.createElement(wo,{"aria-label":e.label,"cmdk-dialog":"",className:a},d.createElement(sd,{ref:t,...s}))))}),z1=d.forwardRef((e,t)=>zt(n=>n.filtered.count===0)?d.createElement(J.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),H1=d.forwardRef((e,t)=>{let{progress:n,children:r,label:o="Loading...",...a}=e;return d.createElement(J.div,{ref:t,...a,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":o},xo(e,i=>d.createElement("div",{"aria-hidden":!0},i)))}),He=Object.assign(sd,{List:B1,Item:$1,Input:W1,Group:L1,Separator:F1,Dialog:Y1,Empty:z1,Loading:H1});function U1(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function G1(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function id(e){let t=d.useRef(e);return on(()=>{t.current=e}),t}var on=typeof window>"u"?d.useEffect:d.useLayoutEffect;function bn(e){let t=d.useRef();return t.current===void 0&&(t.current=e()),t}function zt(e){let t=ps(),n=()=>e(t.snapshot());return d.useSyncExternalStore(t.subscribe,n,n)}function cd(e,t,n,r=[]){let o=d.useRef(),a=pr();return on(()=>{var i;let s=(()=>{var u;for(let f of n){if(typeof f=="string")return f.trim();if(typeof f=="object"&&"current"in f)return f.current?(u=f.current.textContent)==null?void 0:u.trim():o.current}})(),c=r.map(u=>u.trim());a.value(e,s,c),(i=t.current)==null||i.setAttribute(vn,s),o.current=s}),o}var q1=()=>{let[e,t]=d.useState(),n=bn(()=>new Map);return on(()=>{n.current.forEach(r=>r()),n.current=new Map},[e]),(r,o)=>{n.current.set(r,o),t({})}};function V1(e){let t=e.type;return typeof t=="function"?t(e.props):"render"in t?t.render(e.props):e}function xo({asChild:e,children:t},n){return e&&d.isValidElement(t)?d.cloneElement(V1(t),{ref:t.ref},n(t.props.children)):n(t)}var K1={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};const X1=ls,Z1=td,Q1=us,J1=ms,ld=d.forwardRef(({className:e,...t},n)=>m.jsx(yo,{ref:n,className:L("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}));ld.displayName=yo.displayName;const ud=d.forwardRef(({className:e,children:t,closeOnOutsideClick:n=!0,...r},o)=>m.jsxs(Q1,{children:[m.jsx(ld,{}),m.jsx("div",{className:"fixed inset-0 z-40 bg-black/50"}),m.jsxs(wo,{ref:o,className:L("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),onInteractOutside:n?void 0:a=>a.preventDefault(),...r,children:[t,m.jsxs(ms,{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:[m.jsx(cn,{className:"h-4 w-4"}),m.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));ud.displayName=wo.displayName;const dd=({className:e,...t})=>m.jsx("div",{className:L("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});dd.displayName="DialogHeader";const fd=({className:e,...t})=>m.jsx("div",{className:L("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});fd.displayName="DialogFooter";const md=d.forwardRef(({className:e,...t},n)=>m.jsx(ds,{ref:n,className:L("text-lg font-semibold leading-none tracking-tight",e),...t}));md.displayName=ds.displayName;const pd=d.forwardRef(({className:e,...t},n)=>m.jsx(fs,{ref:n,className:L("text-sm text-muted-foreground",e),...t}));pd.displayName=fs.displayName;const eS=d.forwardRef(({className:e,...t},n)=>m.jsx(He,{ref:n,className:L("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...t}));eS.displayName=He.displayName;const hd=d.forwardRef(({className:e,...t},n)=>m.jsxs("div",{className:"flex items-center h-auto px-3","cmdk-input-wrapper":"",children:[m.jsx(Mc,{strokeWidth:1.25,className:"mr-2 h-4 w-4 shrink-0"}),m.jsx(He.Input,{ref:n,className:L("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})]}));hd.displayName=He.Input.displayName;const gd=d.forwardRef(({className:e,...t},n)=>m.jsx(He.List,{ref:n,className:L("max-h-[300px] overflow-y-auto overflow-x-hidden",e),...t}));gd.displayName=He.List.displayName;const tS=d.forwardRef((e,t)=>m.jsx(He.Empty,{ref:t,className:"py-6 text-center text-sm",...e}));tS.displayName=He.Empty.displayName;const vd=d.forwardRef(({className:e,...t},n)=>m.jsx(He.Group,{ref:n,className:L("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}));vd.displayName=He.Group.displayName;const nS=d.forwardRef(({className:e,...t},n)=>m.jsx(He.Separator,{ref:n,className:L("-mx-1 h-px bg-border",e),...t}));nS.displayName=He.Separator.displayName;const bd=d.forwardRef(({className:e,...t},n)=>m.jsx(He.Item,{ref:n,className:L("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}));bd.displayName=He.Item.displayName;function rS({className:e,...t}){return m.jsx("div",{className:L("animate-pulse rounded-md bg-muted",e),...t})}function oS(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 aS=({options:e,placeholder:t,emptyMessage:n,value:r,onValueChange:o,disabled:a,isLoading:i=!1,className:s,size:c,variant:u})=>{const{variantClasses:f,combined:l}=oS(c,u),p=x.useRef(null),[h,b]=x.useState(!1),[g,v]=x.useState(r),[w,y]=x.useState((r==null?void 0:r.label)||""),E=x.useCallback(R=>{const S=p.current;if(S){if(h||b(!0),R.key==="Enter"&&S.value!==""){const k=e.find(I=>I.label===S.value);k&&(v(k),o==null||o(k))}R.key==="Escape"&&S.blur()}},[h,e,o]),M=x.useCallback(()=>{b(!1),y((g==null?void 0:g.label)||"")},[g]),C=x.useCallback(R=>{y(R.label),v(R),o==null||o(R),setTimeout(()=>{var S;(S=p==null?void 0:p.current)==null||S.blur()},0)},[o]);return m.jsxs(He,{onKeyDown:E,children:[m.jsxs("div",{className:L("rounded-full border bg-gray-100",f,s),children:[" ",m.jsx(hd,{ref:p,value:w,onValueChange:i?void 0:y,onBlur:M,onFocus:()=>b(!0),placeholder:t,disabled:a,className:l})]}),m.jsx("div",{className:"relative mt-1",children:m.jsx("div",{className:L("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",s),children:m.jsxs(gd,{className:"rounded-lg ring-1 ring-slate-200 dark:ring-gray-700",children:[i?m.jsx(He.Loading,{children:m.jsx("div",{className:"p-1",children:m.jsx(rS,{className:"h-8 w-full"})})}):null,e.length>0&&!i?m.jsx(vd,{children:e.map(R=>{const S=(g==null?void 0:g.value)===R.value;return m.jsxs(bd,{value:R.label,onMouseDown:k=>{k.preventDefault(),k.stopPropagation()},onSelect:()=>C(R),className:L("flex w-full items-center gap-2 dark:text-white",S?null:"pl-8"),children:[S?m.jsx(er,{className:"w-4"}):null,R.label]},R.value)})}):null,i?null:m.jsx(He.Empty,{className:"select-none rounded-sm px-2 py-3 text-center text-sm dark:text-gray-400",children:n})]})})})]})},sS=to("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 iS({className:e,variant:t,...n}){return m.jsx("div",{className:L(sS({variant:t}),e),...n})}function cS({title:e,children:t,className:n}){return m.jsxs("section",{className:L("space-y-6",n),children:[m.jsx("div",{className:"border-b border-gray-200 pb-3",children:m.jsx("h2",{className:"text-sm font-semibold text-gray-900 tracking-wide uppercase",children:e})}),t]})}function lS({title:e,variant:t="primary",children:n,className:r}){return m.jsxs("div",{className:L("space-y-4",r),children:[m.jsx(iS,{variant:t==="primary"?"default":"secondary",className:L(t==="primary"&&"bg-black text-white hover:bg-black/90"),children:e}),n]})}const yd=x.forwardRef(({className:e,label:t,helperText:n,error:r,startAdornment:o,endAdornment:a,required:i,id:s,onInput:c,...u},f)=>{const l=!!r,p=s||`currency-input-${Math.random().toString(36).substr(2,9)}`,h=b=>{var y;const g=b.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("")),((y=w[1])==null?void 0:y.length)>2&&(v=w[0]+"."+w[1].substring(0,2)),g.value=v,c&&c(b)};return m.jsxs("div",{className:"flex flex-col space-y-1",children:[t&&m.jsxs("label",{htmlFor:p,className:"text-sm font-medium text-gray-700",children:[t,i&&m.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),m.jsxs("div",{className:L("flex items-center h-10 w-full rounded-md border bg-background text-sm ring-offset-background disabled:cursor-not-allowed disabled:opacity-50",l?"border-destructive":"border-input",e),children:[o&&m.jsx("span",{className:"px-3 text-sm text-muted-foreground",children:o}),m.jsx("input",{id:p,type:"text",inputMode:"decimal",pattern:"^\\d+(\\.\\d{0,2})?$",className:L("flex-1 px-3 py-2 rounded-md placeholder:text-muted-foreground focus:outline-none disabled:opacity-50"),ref:f,onInput:h,...u}),a&&m.jsx("span",{className:"px-3 text-sm text-muted-foreground",children:a})]}),(n||r)&&m.jsx("span",{className:L("text-xs",l?"text-red-500":"text-muted-foreground"),children:r||n})]})});yd.displayName="CurrencyInput";const uS={small:"h-8 text-xs px-2",medium:"h-10 text-sm px-3",large:"h-12 text-base px-4"},dS={outlined:"border border-input",filled:"border-0 bg-accent",standard:"border-0 border-b border-input rounded-none"},fS=(e,t)=>t&&typeof e=="object"&&e!==null?e[t.text]:typeof e=="string"?e:(e==null?void 0:e.label)||"",mS=(e,t)=>t&&typeof e=="object"&&e!==null?e[t.value]:typeof e=="string"?e:(e==null?void 0:e.value)||e,pS=(e,t,n,r)=>n(e,r)===n(t,r),Fi=e=>{if(e==null)return"";try{return String(e).toLowerCase().replace(/[^a-z0-9]/g,"")}catch{return""}},hS=(e,t,n,r)=>{if(!t)return e;const o=Fi(t);return e.filter(a=>{const i=n(a,r);return Fi(i).includes(o)})},wd=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 m.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})});wd.displayName="Badge";const xd=e=>{const{option:t,index:n,isSelected:r,isHighlighted:o,onSelect:a,getOptionLabel:i,renderOption:s}=e,c=x.useCallback(()=>{a(t)},[t,a]);return m.jsx("div",{onClick:c,className:`
183
183
  px-3 py-2 cursor-pointer flex items-center justify-between
184
184
  text-sm transition-colors mb-[0.4vh]
185
185
  ${o?"bg-accent text-accent-foreground":""}
186
186
  ${r?"bg-primary/10":""}
187
187
  hover:bg-accent hover:text-accent-foreground
188
- `,children:s?s(t,n):m.jsxs(m.Fragment,{children:[m.jsx("span",{children:i(t)}),r&&m.jsx(tr,{className:"h-4 w-4 text-primary"})]})})};Sd.displayName="AutocompleteOption";const Ed=e=>{const{tag:t,index:n,getOptionLabel:r,onRemove:o}=e,a=x.useCallback(()=>{o(t)},[t,o]);return m.jsxs(xd,{variant:"secondary",className:"text-xs",children:[r(t),m.jsx("button",{type:"button",onClick:a,className:"ml-1 hover:bg-secondary-foreground/20 rounded-full p-0.5",children:m.jsx(cn,{className:"h-3 w-3"})})]},n)};Ed.displayName="AutocompleteTag";const gS=({options:e=[],dataSource:t=[],value:n=null,onChange:r,change:o,onInputChange:a,placeholder:i="Search...",multiple:s=!1,freeSolo:c=!1,disabled:u=!1,loading:f=!1,size:l="medium",variant:p="outlined",label:h="",helperText:b="",error:g,required:v=!1,fullWidth:y=!0,clearable:w=!0,disableCloseOnSelect:E=!1,filterOptions:M,getOptionLabel:C=N=>fS(N,I),getOptionValue:k=N=>mS(N,I),isOptionEqualToValue:S,renderOption:R,renderTags:A,fields:I,noOptionsText:L="No options",emptyMessage:V,className:B="",inputClassName:$="",..._})=>{const[N,O]=x.useState(!1),[D,P]=x.useState(""),[Y,H]=x.useState(-1),[T,j]=x.useState(!1),[z,U]=x.useState({top:0,left:0,width:0}),G=x.useRef(null),W=x.useRef(null),X=x.useRef(null),Z=x.useId(),Q=t.length>0?t:e,ee=x.useMemo(()=>S||((ue,pe)=>pS(ue,pe,k,I)),[S,k,I]),ae=x.useMemo(()=>{let ue=Q;return s&&Array.isArray(n)&&(ue=Q.filter(pe=>!n.some(ye=>ee(pe,ye)))),!s&&!T&&n&&D===C(n)?ue:M?M(ue,{inputValue:D}):hS(ue,D,C,I)},[Q,n,D,M,C,s,ee,I,T]),be=x.useCallback(ue=>{const pe=ue.target.value;j(!0),P(pe),a==null||a(ue,pe),!N&&pe&&O(!0)},[N,a]);x.useEffect(()=>{if(s||T)return;const pe=(ye=>{if(ye==null)return"";if(typeof ye=="object")return C(ye);const Ae=Q.find(Me=>ee(Me,ye));if(Ae)return C(Ae);try{return String(ye)}catch{return""}})(n);P(pe)},[n,s,T,Q,C,ee]);const te=x.useCallback(ue=>{if(s){const pe=Array.isArray(n)?n:[],ye=pe.some(Me=>ee(ue,Me));let Ae;ye?Ae=pe.filter(Me=>!ee(ue,Me)):Ae=[...pe,ue],r==null||r(null,Ae),o==null||o({itemData:Ae}),P(""),j(!1),E||O(!1),setTimeout(()=>{var Me;(Me=G.current)==null||Me.focus()},0)}else r==null||r(null,ue),o==null||o({itemData:ue}),P(C(ue)),j(!1),E||O(!1);H(-1)},[s,n,ee,r,o,E,C]),Te=x.useCallback(ue=>{if(s&&Array.isArray(n)){const pe=n.filter(ye=>!ee(ue,ye));r==null||r(null,pe),o==null||o({itemData:pe})}},[s,n,ee,r,o]),$e=x.useCallback(ue=>{ue.stopPropagation(),s?(P(""),j(!1),a==null||a({target:{value:""}},""),setTimeout(()=>{G.current&&(G.current.value="",G.current.focus())},0),O(!1)):(r==null||r(null,null),o==null||o({itemData:null}),P(""),j(!1),a==null||a({target:{value:""}},""),setTimeout(()=>{G.current&&(G.current.value="",G.current.focus())},0),O(!1))},[r,o,s,a]),Ce=x.useMemo(()=>s?Array.isArray(n)&&n.length>0:n!=null,[s,n]),Ve=x.useMemo(()=>!w||u?!1:s?D!=="":Ce,[w,u,s,D,Ce]),De=x.useCallback(ue=>{if(!N&&(ue.key==="ArrowDown"||ue.key==="ArrowUp")){O(!0);return}if(N)switch(ue.key){case"ArrowDown":ue.preventDefault(),H(pe=>pe<ae.length-1?pe+1:0);break;case"ArrowUp":ue.preventDefault(),H(pe=>pe>0?pe-1:ae.length-1);break;case"Enter":ue.preventDefault(),Y>=0&&ae[Y]?te(ae[Y]):c&&D&&te(D);break;case"Escape":O(!1),H(-1);break;case"Tab":O(!1);break}},[N,ae,Y,te,c,D]),Be=x.useCallback(()=>{if(X.current){const ue=X.current.getBoundingClientRect(),pe=X.current.querySelector(".relative.overflow-visible"),ye=pe?pe.getBoundingClientRect():ue;U({top:ye.bottom+window.scrollY,left:ye.left+window.scrollX,width:ye.width})}},[]),Pt=x.useCallback(()=>{N||(Be(),D===""&&(a==null||a({target:{value:""}},""))),O(!N)},[N,Be,D,a]),_e=x.useCallback(()=>{Be(),O(!0),j(!1)},[Be]);x.useEffect(()=>{const ue=ye=>{const Ae=ye.target,Me=X.current&&!X.current.contains(Ae),At=W.current&&!W.current.contains(Ae);Me&&At&&O(!1)},pe=()=>{N&&Be()};return document.addEventListener("mousedown",ue),window.addEventListener("resize",pe),window.addEventListener("scroll",pe),()=>{document.removeEventListener("mousedown",ue),window.removeEventListener("resize",pe),window.removeEventListener("scroll",pe)}},[N,Be]),x.useEffect(()=>{if(N&&Y>=0&&W.current){const ue=W.current.children[Y];ue&&ue.scrollIntoView({block:"nearest"})}},[Y,N]);const Ye=x.useMemo(()=>!s||!Array.isArray(n)||n.length===0?null:A?A(n,Te):m.jsx("div",{className:"flex flex-wrap gap-1 mb-1",children:n.map((ue,pe)=>m.jsx(Ed,{tag:ue,index:pe,getOptionLabel:C,onRemove:Te},pe))}),[s,n,A,Te,C]),St=x.useMemo(()=>`
188
+ `,children:s?s(t,n):m.jsxs(m.Fragment,{children:[m.jsx("span",{children:i(t)}),r&&m.jsx(er,{className:"h-4 w-4 text-primary"})]})})};xd.displayName="AutocompleteOption";const Sd=e=>{const{tag:t,index:n,getOptionLabel:r,onRemove:o}=e,a=x.useCallback(()=>{o(t)},[t,o]);return m.jsxs(wd,{variant:"secondary",className:"text-xs",children:[r(t),m.jsx("button",{type:"button",onClick:a,className:"ml-1 hover:bg-secondary-foreground/20 rounded-full p-0.5",children:m.jsx(cn,{className:"h-3 w-3"})})]},n)};Sd.displayName="AutocompleteTag";const gS=({options:e=[],dataSource:t=[],value:n=null,onChange:r,change:o,onInputChange:a,placeholder:i="Search...",multiple:s=!1,freeSolo:c=!1,disabled:u=!1,loading:f=!1,size:l="medium",variant:p="outlined",label:h="",helperText:b="",error:g,required:v=!1,fullWidth:w=!0,clearable:y=!0,disableCloseOnSelect:E=!1,filterOptions:M,getOptionLabel:C=D=>fS(D,A),getOptionValue:R=D=>mS(D,A),isOptionEqualToValue:S,renderOption:k,renderTags:I,fields:A,noOptionsText:W="No options",emptyMessage:G,className:B="",inputClassName:$="",...O})=>{const[D,_]=x.useState(!1),[N,P]=x.useState(""),[Y,H]=x.useState(-1),[T,j]=x.useState(!1),[z,U]=x.useState({top:0,left:0,width:0}),q=x.useRef(null),F=x.useRef(null),X=x.useRef(null),Z=x.useId(),Q=t.length>0?t:e,ee=x.useMemo(()=>S||((ue,pe)=>pS(ue,pe,R,A)),[S,R,A]),ae=x.useMemo(()=>{let ue=Q;return s&&Array.isArray(n)&&(ue=Q.filter(pe=>!n.some(ye=>ee(pe,ye)))),!s&&!T&&n&&N===C(n)?ue:M?M(ue,{inputValue:N}):hS(ue,N,C,A)},[Q,n,N,M,C,s,ee,A,T]),be=x.useCallback(ue=>{const pe=ue.target.value;j(!0),P(pe),a==null||a(ue,pe),!D&&pe&&_(!0)},[D,a]);x.useEffect(()=>{if(s||T)return;const pe=(ye=>{if(ye==null)return"";if(typeof ye=="object")return C(ye);const Ae=Q.find(Me=>ee(Me,ye));if(Ae)return C(Ae);try{return String(ye)}catch{return""}})(n);P(pe)},[n,s,T,Q,C,ee]);const te=x.useCallback(ue=>{if(s){const pe=Array.isArray(n)?n:[],ye=pe.some(Me=>ee(ue,Me));let Ae;ye?Ae=pe.filter(Me=>!ee(ue,Me)):Ae=[...pe,ue],r==null||r(null,Ae),o==null||o({itemData:Ae}),P(""),j(!1),E||_(!1),setTimeout(()=>{var Me;(Me=q.current)==null||Me.focus()},0)}else r==null||r(null,ue),o==null||o({itemData:ue}),P(C(ue)),j(!1),E||_(!1);H(-1)},[s,n,ee,r,o,E,C]),Te=x.useCallback(ue=>{if(s&&Array.isArray(n)){const pe=n.filter(ye=>!ee(ue,ye));r==null||r(null,pe),o==null||o({itemData:pe})}},[s,n,ee,r,o]),$e=x.useCallback(ue=>{ue.stopPropagation(),s?(P(""),j(!1),a==null||a({target:{value:""}},""),setTimeout(()=>{q.current&&(q.current.value="",q.current.focus())},0),_(!1)):(r==null||r(null,null),o==null||o({itemData:null}),P(""),j(!1),a==null||a({target:{value:""}},""),setTimeout(()=>{q.current&&(q.current.value="",q.current.focus())},0),_(!1))},[r,o,s,a]),Ce=x.useMemo(()=>s?Array.isArray(n)&&n.length>0:n!=null,[s,n]),Ve=x.useMemo(()=>!y||u?!1:s?N!=="":Ce,[y,u,s,N,Ce]),De=x.useCallback(ue=>{if(!D&&(ue.key==="ArrowDown"||ue.key==="ArrowUp")){_(!0);return}if(D)switch(ue.key){case"ArrowDown":ue.preventDefault(),H(pe=>pe<ae.length-1?pe+1:0);break;case"ArrowUp":ue.preventDefault(),H(pe=>pe>0?pe-1:ae.length-1);break;case"Enter":ue.preventDefault(),Y>=0&&ae[Y]?te(ae[Y]):c&&N&&te(N);break;case"Escape":_(!1),H(-1);break;case"Tab":_(!1);break}},[D,ae,Y,te,c,N]),Be=x.useCallback(()=>{if(X.current){const ue=X.current.getBoundingClientRect(),pe=X.current.querySelector(".relative.overflow-visible"),ye=pe?pe.getBoundingClientRect():ue;U({top:ye.bottom+window.scrollY,left:ye.left+window.scrollX,width:ye.width})}},[]),Pt=x.useCallback(()=>{D||(Be(),N===""&&(a==null||a({target:{value:""}},""))),_(!D)},[D,Be,N,a]),_e=x.useCallback(()=>{Be(),_(!0),j(!1)},[Be]);x.useEffect(()=>{const ue=ye=>{const Ae=ye.target,Me=X.current&&!X.current.contains(Ae),At=F.current&&!F.current.contains(Ae);Me&&At&&_(!1)},pe=()=>{D&&Be()};return document.addEventListener("mousedown",ue),window.addEventListener("resize",pe),window.addEventListener("scroll",pe),()=>{document.removeEventListener("mousedown",ue),window.removeEventListener("resize",pe),window.removeEventListener("scroll",pe)}},[D,Be]),x.useEffect(()=>{if(D&&Y>=0&&F.current){const ue=F.current.children[Y];ue&&ue.scrollIntoView({block:"nearest"})}},[Y,D]);const Ye=x.useMemo(()=>!s||!Array.isArray(n)||n.length===0?null:I?I(n,Te):m.jsx("div",{className:"flex flex-wrap gap-1 mb-1",children:n.map((ue,pe)=>m.jsx(Sd,{tag:ue,index:pe,getOptionLabel:C,onRemove:Te},pe))}),[s,n,I,Te,C]),St=x.useMemo(()=>`
189
189
  relative flex items-center rounded-md
190
190
  ${g?"border border-destructive":dS[p]}
191
191
  ${uS[l]}
192
192
  ${u?"opacity-50 cursor-not-allowed":"cursor-text"}
193
193
  transition-colors ${$}
194
- `,[p,l,g,u,$]),_t=V??L;return m.jsxs("div",{className:`relative ${y?"w-full":"w-auto"} ${B}`,ref:X,children:[h&&m.jsxs("label",{htmlFor:Z,className:"block text-sm font-medium mb-1",children:[h,v&&m.jsx("span",{className:"text-destructive ml-1",children:"*"})]}),m.jsxs("div",{className:"relative overflow-visible",children:[Ye,m.jsxs("div",{className:St,children:[m.jsx(an,{id:Z,ref:G,value:D,onChange:be,onKeyDown:De,onFocus:_e,placeholder:i,disabled:u,className:"px-0 border-0 shadow-none focus-visible:ring-0 focus-visible:ring-offset-0 bg-transparent rounded-md",..._}),m.jsxs("div",{className:"flex items-center gap-1 ml-auto",children:[f&&m.jsx("div",{className:"animate-spin rounded-full h-4 w-4 border-2 border-muted-foreground border-t-transparent"}),Ve&&m.jsx("button",{type:"button",onClick:$e,className:"p-1 hover:bg-accent rounded-sm transition-colors",tabIndex:-1,children:m.jsx(cn,{className:"h-4 w-4 text-muted-foreground"})}),m.jsx("button",{type:"button",disabled:u,onClick:Pt,className:`p-1 hover:bg-accent rounded-sm transition-colors ${u?"opacity-50 cursor-not-allowed":"cursor-pointer"}`,tabIndex:-1,children:m.jsx(nr,{className:`h-4 w-4 text-muted-foreground transition-transform ${N?"rotate-180":""}`})})]})]}),N&&er.createPortal(m.jsx("div",{className:`
194
+ `,[p,l,g,u,$]),_t=G??W;return m.jsxs("div",{className:`relative ${w?"w-full":"w-auto"} ${B}`,ref:X,children:[h&&m.jsxs("label",{htmlFor:Z,className:"block text-sm font-medium mb-1",children:[h,v&&m.jsx("span",{className:"text-destructive ml-1",children:"*"})]}),m.jsxs("div",{className:"relative overflow-visible",children:[Ye,m.jsxs("div",{className:St,children:[m.jsx(an,{id:Z,ref:q,value:N,onChange:be,onKeyDown:De,onFocus:_e,placeholder:i,disabled:u,className:"px-0 border-0 shadow-none focus-visible:ring-0 focus-visible:ring-offset-0 bg-transparent rounded-md",...O}),m.jsxs("div",{className:"flex items-center gap-1 ml-auto",children:[f&&m.jsx("div",{className:"animate-spin rounded-full h-4 w-4 border-2 border-muted-foreground border-t-transparent"}),Ve&&m.jsx("button",{type:"button",onClick:$e,className:"p-1 hover:bg-accent rounded-sm transition-colors",tabIndex:-1,children:m.jsx(cn,{className:"h-4 w-4 text-muted-foreground"})}),m.jsx("button",{type:"button",disabled:u,onClick:Pt,className:`p-1 hover:bg-accent rounded-sm transition-colors ${u?"opacity-50 cursor-not-allowed":"cursor-pointer"}`,tabIndex:-1,children:m.jsx(tr,{className:`h-4 w-4 text-muted-foreground transition-transform ${D?"rotate-180":""}`})})]})]}),D&&Jr.createPortal(m.jsx("div",{className:`
195
195
  absolute bg-popover border border-border rounded-md shadow-lg
196
196
  max-h-60 overflow-auto z-[9999]
197
197
  ${$}
198
- `,style:{top:z.top+4,left:z.left,width:z.width},ref:W,children:ae.length===0?m.jsx("div",{className:"p-3 text-sm text-muted-foreground text-center",children:_t}):ae.map((ue,pe)=>{const ye=s?Array.isArray(n)&&n.some(Me=>ee(ue,Me)):ee(ue,n),Ae=pe===Y;return m.jsx(Sd,{option:ue,index:pe,isSelected:ye,isHighlighted:Ae,onSelect:te,getOptionLabel:C,renderOption:R},pe)})}),document.body)]}),(b||g)&&m.jsx("p",{className:`mt-1 text-xs ${g?"text-destructive":"text-muted-foreground"}`,children:g||b})]})};var So="Collapsible",[vS,DM]=Ge(So),[bS,hs]=vS(So),Cd=d.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:o,disabled:a,onOpenChange:i,...s}=e,[c,u]=ot({prop:r,defaultProp:o??!1,onChange:i,caller:So});return m.jsx(bS,{scope:n,disabled:a,contentId:Pe(),open:c,onOpenToggle:d.useCallback(()=>u(f=>!f),[u]),children:m.jsx(J.div,{"data-state":vs(c),"data-disabled":a?"":void 0,...s,ref:t})})});Cd.displayName=So;var Dd="CollapsibleTrigger",Md=d.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,o=hs(Dd,n);return m.jsx(J.button,{type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":vs(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled,...r,ref:t,onClick:K(e.onClick,o.onOpenToggle)})});Md.displayName=Dd;var gs="CollapsibleContent",Nd=d.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=hs(gs,e.__scopeCollapsible);return m.jsx(at,{present:n||o.open,children:({present:a})=>m.jsx(yS,{...r,ref:t,present:a})})});Nd.displayName=gs;var yS=d.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:o,...a}=e,i=hs(gs,n),[s,c]=d.useState(r),u=d.useRef(null),f=fe(t,u),l=d.useRef(0),p=l.current,h=d.useRef(0),b=h.current,g=i.open||s,v=d.useRef(g),y=d.useRef(void 0);return d.useEffect(()=>{const w=requestAnimationFrame(()=>v.current=!1);return()=>cancelAnimationFrame(w)},[]),Re(()=>{const w=u.current;if(w){y.current=y.current||{transitionDuration:w.style.transitionDuration,animationName:w.style.animationName},w.style.transitionDuration="0s",w.style.animationName="none";const E=w.getBoundingClientRect();l.current=E.height,h.current=E.width,v.current||(w.style.transitionDuration=y.current.transitionDuration,w.style.animationName=y.current.animationName),c(r)}},[i.open,r]),m.jsx(J.div,{"data-state":vs(i.open),"data-disabled":i.disabled?"":void 0,id:i.contentId,hidden:!g,...a,ref:f,style:{"--radix-collapsible-content-height":p?`${p}px`:void 0,"--radix-collapsible-content-width":b?`${b}px`:void 0,...e.style},children:g&&o})});function vs(e){return e?"open":"closed"}var wS=Cd,xS=Md,SS=Nd;function ES({title:e,content:t,defaultOpen:n=!1,className:r,titleTypographyProps:o,contentTypographyProps:a}){const[i,s]=d.useState(n),c=()=>s(u=>!u);return m.jsxs(wS,{open:i,onOpenChange:s,className:F("cursor-pointer",r),onClick:c,children:[m.jsxs("div",{className:"flex items-center justify-between",children:[d.isValidElement(e)?e:m.jsx(la,{variant:(o==null?void 0:o.variant)??"h6",weight:(o==null?void 0:o.weight)??"semiBold",align:o==null?void 0:o.align,color:o==null?void 0:o.color,className:o==null?void 0:o.className,children:e}),m.jsx(xS,{asChild:!0,children:m.jsx("button",{onClick:u=>u.stopPropagation(),className:F("transition-transform duration-200",i?"rotate-180":"rotate-0"),children:m.jsx(nr,{className:"h-5 w-5"})})})]}),m.jsx(SS,{className:"mt-4 CollapsibleContent data-[state=closed]:animate-collapsible-up data-[state=open]:animate-collapsible-down",children:d.isValidElement(t)?t:m.jsx(la,{variant:(a==null?void 0:a.variant)??"body2",weight:(a==null?void 0:a.weight)??"regular",align:a==null?void 0:a.align,color:a==null?void 0:a.color,className:F("text-muted-foreground",a==null?void 0:a.className),children:t})})]})}const CS=to("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"}}),kd=d.forwardRef(({className:e,variant:t,...n},r)=>m.jsx("div",{ref:r,role:"alert",className:F(CS({variant:t}),e),...n}));kd.displayName="Alert";const Rd=d.forwardRef(({className:e,...t},n)=>m.jsx("h5",{ref:n,className:F("mb-1 font-medium leading-none tracking-tight",e),...t}));Rd.displayName="AlertTitle";const Od=d.forwardRef(({className:e,...t},n)=>m.jsx("p",{ref:n,className:F("text-sm [&_p]:leading-relaxed",e),...t}));Od.displayName="AlertDescription";var Or={exports:{}},Qo={};/**
198
+ `,style:{top:z.top+4,left:z.left,width:z.width},ref:F,children:ae.length===0?m.jsx("div",{className:"p-3 text-sm text-muted-foreground text-center",children:_t}):ae.map((ue,pe)=>{const ye=s?Array.isArray(n)&&n.some(Me=>ee(ue,Me)):ee(ue,n),Ae=pe===Y;return m.jsx(xd,{option:ue,index:pe,isSelected:ye,isHighlighted:Ae,onSelect:te,getOptionLabel:C,renderOption:k},pe)})}),document.body)]}),(b||g)&&m.jsx("p",{className:`mt-1 text-xs ${g?"text-destructive":"text-muted-foreground"}`,children:g||b})]})};var So="Collapsible",[vS,DM]=Ge(So),[bS,hs]=vS(So),Ed=d.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:o,disabled:a,onOpenChange:i,...s}=e,[c,u]=ot({prop:r,defaultProp:o??!1,onChange:i,caller:So});return m.jsx(bS,{scope:n,disabled:a,contentId:Pe(),open:c,onOpenToggle:d.useCallback(()=>u(f=>!f),[u]),children:m.jsx(J.div,{"data-state":vs(c),"data-disabled":a?"":void 0,...s,ref:t})})});Ed.displayName=So;var Cd="CollapsibleTrigger",Dd=d.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,o=hs(Cd,n);return m.jsx(J.button,{type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":vs(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled,...r,ref:t,onClick:K(e.onClick,o.onOpenToggle)})});Dd.displayName=Cd;var gs="CollapsibleContent",Md=d.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=hs(gs,e.__scopeCollapsible);return m.jsx(at,{present:n||o.open,children:({present:a})=>m.jsx(yS,{...r,ref:t,present:a})})});Md.displayName=gs;var yS=d.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:o,...a}=e,i=hs(gs,n),[s,c]=d.useState(r),u=d.useRef(null),f=fe(t,u),l=d.useRef(0),p=l.current,h=d.useRef(0),b=h.current,g=i.open||s,v=d.useRef(g),w=d.useRef(void 0);return d.useEffect(()=>{const y=requestAnimationFrame(()=>v.current=!1);return()=>cancelAnimationFrame(y)},[]),Re(()=>{const y=u.current;if(y){w.current=w.current||{transitionDuration:y.style.transitionDuration,animationName:y.style.animationName},y.style.transitionDuration="0s",y.style.animationName="none";const E=y.getBoundingClientRect();l.current=E.height,h.current=E.width,v.current||(y.style.transitionDuration=w.current.transitionDuration,y.style.animationName=w.current.animationName),c(r)}},[i.open,r]),m.jsx(J.div,{"data-state":vs(i.open),"data-disabled":i.disabled?"":void 0,id:i.contentId,hidden:!g,...a,ref:f,style:{"--radix-collapsible-content-height":p?`${p}px`:void 0,"--radix-collapsible-content-width":b?`${b}px`:void 0,...e.style},children:g&&o})});function vs(e){return e?"open":"closed"}var wS=Ed,xS=Dd,SS=Md;function ES({title:e,content:t,defaultOpen:n=!1,className:r,titleTypographyProps:o,contentTypographyProps:a}){const[i,s]=d.useState(n),c=()=>s(u=>!u);return m.jsxs(wS,{open:i,onOpenChange:s,className:L("cursor-pointer",r),onClick:c,children:[m.jsxs("div",{className:"flex items-center justify-between",children:[d.isValidElement(e)?e:m.jsx(la,{variant:(o==null?void 0:o.variant)??"h6",weight:(o==null?void 0:o.weight)??"semiBold",align:o==null?void 0:o.align,color:o==null?void 0:o.color,className:o==null?void 0:o.className,children:e}),m.jsx(xS,{asChild:!0,children:m.jsx("button",{onClick:u=>u.stopPropagation(),className:L("transition-transform duration-200",i?"rotate-180":"rotate-0"),children:m.jsx(tr,{className:"h-5 w-5"})})})]}),m.jsx(SS,{className:"mt-4 CollapsibleContent data-[state=closed]:animate-collapsible-up data-[state=open]:animate-collapsible-down",children:d.isValidElement(t)?t:m.jsx(la,{variant:(a==null?void 0:a.variant)??"body2",weight:(a==null?void 0:a.weight)??"regular",align:a==null?void 0:a.align,color:a==null?void 0:a.color,className:L("text-muted-foreground",a==null?void 0:a.className),children:t})})]})}const CS=to("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=d.forwardRef(({className:e,variant:t,...n},r)=>m.jsx("div",{ref:r,role:"alert",className:L(CS({variant:t}),e),...n}));Nd.displayName="Alert";const kd=d.forwardRef(({className:e,...t},n)=>m.jsx("h5",{ref:n,className:L("mb-1 font-medium leading-none tracking-tight",e),...t}));kd.displayName="AlertTitle";const Rd=d.forwardRef(({className:e,...t},n)=>m.jsx("p",{ref:n,className:L("text-sm [&_p]:leading-relaxed",e),...t}));Rd.displayName="AlertDescription";var Rr={exports:{}},Qo={};/**
199
199
  * @license React
200
200
  * use-sync-external-store-shim.production.js
201
201
  *
@@ -203,7 +203,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
203
203
  *
204
204
  * This source code is licensed under the MIT license found in the
205
205
  * LICENSE file in the root directory of this source tree.
206
- */var Bi;function DS(){if(Bi)return Qo;Bi=1;var e=x;function t(l,p){return l===p&&(l!==0||1/l===1/p)||l!==l&&p!==p}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,o=e.useEffect,a=e.useLayoutEffect,i=e.useDebugValue;function s(l,p){var h=p(),b=r({inst:{value:h,getSnapshot:p}}),g=b[0].inst,v=b[1];return a(function(){g.value=h,g.getSnapshot=p,c(g)&&v({inst:g})},[l,h,p]),o(function(){return c(g)&&v({inst:g}),l(function(){c(g)&&v({inst:g})})},[l]),i(h),h}function c(l){var p=l.getSnapshot;l=l.value;try{var h=p();return!n(l,h)}catch{return!0}}function u(l,p){return p()}var f=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?u:s;return Qo.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:f,Qo}var Jo={};/**
206
+ */var Wi;function DS(){if(Wi)return Qo;Wi=1;var e=x;function t(l,p){return l===p&&(l!==0||1/l===1/p)||l!==l&&p!==p}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,o=e.useEffect,a=e.useLayoutEffect,i=e.useDebugValue;function s(l,p){var h=p(),b=r({inst:{value:h,getSnapshot:p}}),g=b[0].inst,v=b[1];return a(function(){g.value=h,g.getSnapshot=p,c(g)&&v({inst:g})},[l,h,p]),o(function(){return c(g)&&v({inst:g}),l(function(){c(g)&&v({inst:g})})},[l]),i(h),h}function c(l){var p=l.getSnapshot;l=l.value;try{var h=p();return!n(l,h)}catch{return!0}}function u(l,p){return p()}var f=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?u:s;return Qo.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:f,Qo}var Jo={};/**
207
207
  * @license React
208
208
  * use-sync-external-store-shim.development.js
209
209
  *
@@ -211,15 +211,15 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
211
211
  *
212
212
  * This source code is licensed under the MIT license found in the
213
213
  * LICENSE file in the root directory of this source tree.
214
- */var Yi;function MS(){return Yi||(Yi=1,process.env.NODE_ENV!=="production"&&function(){function e(h,b){return h===b&&(h!==0||1/h===1/b)||h!==h&&b!==b}function t(h,b){f||o.startTransition===void 0||(f=!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=b();if(!l){var v=b();a(g,v)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),l=!0)}v=i({inst:{value:g,getSnapshot:b}});var y=v[0].inst,w=v[1];return c(function(){y.value=g,y.getSnapshot=b,n(y)&&w({inst:y})},[h,g,b]),s(function(){return n(y)&&w({inst:y}),h(function(){n(y)&&w({inst:y})})},[h]),u(g),g}function n(h){var b=h.getSnapshot;h=h.value;try{var g=b();return!a(h,g)}catch{return!0}}function r(h,b){return b()}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,i=o.useState,s=o.useEffect,c=o.useLayoutEffect,u=o.useDebugValue,f=!1,l=!1,p=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?r:t;Jo.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())}()),Jo}var zi;function NS(){return zi||(zi=1,process.env.NODE_ENV==="production"?Or.exports=DS():Or.exports=MS()),Or.exports}var kS=NS();function RS(){return kS.useSyncExternalStore(OS,()=>!0,()=>!1)}function OS(){return()=>{}}var bs="Avatar",[TS,MM]=Ge(bs),[PS,Td]=TS(bs),Pd=d.forwardRef((e,t)=>{const{__scopeAvatar:n,...r}=e,[o,a]=d.useState("idle");return m.jsx(PS,{scope:n,imageLoadingStatus:o,onImageLoadingStatusChange:a,children:m.jsx(J.span,{...r,ref:t})})});Pd.displayName=bs;var _d="AvatarImage",Ad=d.forwardRef((e,t)=>{const{__scopeAvatar:n,src:r,onLoadingStatusChange:o=()=>{},...a}=e,i=Td(_d,n),s=_S(r,a),c=je(u=>{o(u),i.onImageLoadingStatusChange(u)});return Re(()=>{s!=="idle"&&c(s)},[s,c]),s==="loaded"?m.jsx(J.img,{...a,ref:t,src:r}):null});Ad.displayName=_d;var Id="AvatarFallback",jd=d.forwardRef((e,t)=>{const{__scopeAvatar:n,delayMs:r,...o}=e,a=Td(Id,n),[i,s]=d.useState(r===void 0);return d.useEffect(()=>{if(r!==void 0){const c=window.setTimeout(()=>s(!0),r);return()=>window.clearTimeout(c)}},[r]),i&&a.imageLoadingStatus!=="loaded"?m.jsx(J.span,{...o,ref:t}):null});jd.displayName=Id;function Hi(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}function _S(e,{referrerPolicy:t,crossOrigin:n}){const r=RS(),o=d.useRef(null),a=r?(o.current||(o.current=new window.Image),o.current):null,[i,s]=d.useState(()=>Hi(a,e));return Re(()=>{s(Hi(a,e))},[a,e]),Re(()=>{const c=l=>()=>{s(l)};if(!a)return;const u=c("loaded"),f=c("error");return a.addEventListener("load",u),a.addEventListener("error",f),t&&(a.referrerPolicy=t),typeof n=="string"&&(a.crossOrigin=n),()=>{a.removeEventListener("load",u),a.removeEventListener("error",f)}},[a,n,t]),i}var $d=Pd,Ld=Ad,Fd=jd;const Wd=d.forwardRef(({className:e,...t},n)=>m.jsx($d,{ref:n,className:F("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t}));Wd.displayName=$d.displayName;const Bd=d.forwardRef(({className:e,...t},n)=>m.jsx(Ld,{ref:n,className:F("aspect-square h-full w-full",e),...t}));Bd.displayName=Ld.displayName;const Yd=d.forwardRef(({className:e,...t},n)=>m.jsx(Fd,{ref:n,className:F("flex h-full w-full items-center justify-center rounded-full bg-muted",e),...t}));Yd.displayName=Fd.displayName;var Eo="Checkbox",[AS,NM]=Ge(Eo),[IS,ys]=AS(Eo);function jS(e){const{__scopeCheckbox:t,checked:n,children:r,defaultChecked:o,disabled:a,form:i,name:s,onCheckedChange:c,required:u,value:f="on",internal_do_not_use_render:l}=e,[p,h]=ot({prop:n,defaultProp:o??!1,onChange:c,caller:Eo}),[b,g]=d.useState(null),[v,y]=d.useState(null),w=d.useRef(!1),E=b?!!i||!!b.closest("form"):!0,M={checked:p,disabled:a,setChecked:h,control:b,setControl:g,name:s,form:i,value:f,hasConsumerStoppedPropagationRef:w,required:u,defaultChecked:Ft(o)?!1:o,isFormControl:E,bubbleInput:v,setBubbleInput:y};return m.jsx(IS,{scope:t,...M,children:$S(l)?l(M):r})}var zd="CheckboxTrigger",Hd=d.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...r},o)=>{const{control:a,value:i,disabled:s,checked:c,required:u,setControl:f,setChecked:l,hasConsumerStoppedPropagationRef:p,isFormControl:h,bubbleInput:b}=ys(zd,e),g=fe(o,f),v=d.useRef(c);return d.useEffect(()=>{const y=a==null?void 0:a.form;if(y){const w=()=>l(v.current);return y.addEventListener("reset",w),()=>y.removeEventListener("reset",w)}},[a,l]),m.jsx(J.button,{type:"button",role:"checkbox","aria-checked":Ft(c)?"mixed":c,"aria-required":u,"data-state":Kd(c),"data-disabled":s?"":void 0,disabled:s,value:i,...r,ref:g,onKeyDown:K(t,y=>{y.key==="Enter"&&y.preventDefault()}),onClick:K(n,y=>{l(w=>Ft(w)?!0:!w),b&&h&&(p.current=y.isPropagationStopped(),p.current||y.stopPropagation())})})});Hd.displayName=zd;var ws=d.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:r,checked:o,defaultChecked:a,required:i,disabled:s,value:c,onCheckedChange:u,form:f,...l}=e;return m.jsx(jS,{__scopeCheckbox:n,checked:o,defaultChecked:a,disabled:s,required:i,onCheckedChange:u,name:r,form:f,value:c,internal_do_not_use_render:({isFormControl:p})=>m.jsxs(m.Fragment,{children:[m.jsx(Hd,{...l,ref:t,__scopeCheckbox:n}),p&&m.jsx(Vd,{__scopeCheckbox:n})]})})});ws.displayName=Eo;var Ud="CheckboxIndicator",Gd=d.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...o}=e,a=ys(Ud,n);return m.jsx(at,{present:r||Ft(a.checked)||a.checked===!0,children:m.jsx(J.span,{"data-state":Kd(a.checked),"data-disabled":a.disabled?"":void 0,...o,ref:t,style:{pointerEvents:"none",...e.style}})})});Gd.displayName=Ud;var qd="CheckboxBubbleInput",Vd=d.forwardRef(({__scopeCheckbox:e,...t},n)=>{const{control:r,hasConsumerStoppedPropagationRef:o,checked:a,defaultChecked:i,required:s,disabled:c,name:u,value:f,form:l,bubbleInput:p,setBubbleInput:h}=ys(qd,e),b=fe(n,h),g=es(a),v=qa(r);d.useEffect(()=>{const w=p;if(!w)return;const E=window.HTMLInputElement.prototype,C=Object.getOwnPropertyDescriptor(E,"checked").set,k=!o.current;if(g!==a&&C){const S=new Event("click",{bubbles:k});w.indeterminate=Ft(a),C.call(w,Ft(a)?!1:a),w.dispatchEvent(S)}},[p,g,a,o]);const y=d.useRef(Ft(a)?!1:a);return m.jsx(J.input,{type:"checkbox","aria-hidden":!0,defaultChecked:i??y.current,required:s,disabled:c,name:u,value:f,form:l,...t,tabIndex:-1,ref:b,style:{...t.style,...v,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});Vd.displayName=qd;function $S(e){return typeof e=="function"}function Ft(e){return e==="indeterminate"}function Kd(e){return Ft(e)?"indeterminate":e?"checked":"unchecked"}const Xd=d.forwardRef(({className:e,color:t="#029cfd",...n},r)=>m.jsx(ws,{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:m.jsx(Gd,{className:"flex items-center justify-center text-current",children:n.checked==="indeterminate"?m.jsx(Zh,{className:"h-4 w-4 text-white"}):m.jsx(tr,{className:"h-4 w-4"})})}));Xd.displayName=ws.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 Zd=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}),gr=()=>{const e=x.useContext(Zd);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(
214
+ */var Bi;function MS(){return Bi||(Bi=1,process.env.NODE_ENV!=="production"&&function(){function e(h,b){return h===b&&(h!==0||1/h===1/b)||h!==h&&b!==b}function t(h,b){f||o.startTransition===void 0||(f=!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=b();if(!l){var v=b();a(g,v)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),l=!0)}v=i({inst:{value:g,getSnapshot:b}});var w=v[0].inst,y=v[1];return c(function(){w.value=g,w.getSnapshot=b,n(w)&&y({inst:w})},[h,g,b]),s(function(){return n(w)&&y({inst:w}),h(function(){n(w)&&y({inst:w})})},[h]),u(g),g}function n(h){var b=h.getSnapshot;h=h.value;try{var g=b();return!a(h,g)}catch{return!0}}function r(h,b){return b()}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,i=o.useState,s=o.useEffect,c=o.useLayoutEffect,u=o.useDebugValue,f=!1,l=!1,p=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?r:t;Jo.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())}()),Jo}var Yi;function NS(){return Yi||(Yi=1,process.env.NODE_ENV==="production"?Rr.exports=DS():Rr.exports=MS()),Rr.exports}var kS=NS();function RS(){return kS.useSyncExternalStore(OS,()=>!0,()=>!1)}function OS(){return()=>{}}var bs="Avatar",[TS,MM]=Ge(bs),[PS,Od]=TS(bs),Td=d.forwardRef((e,t)=>{const{__scopeAvatar:n,...r}=e,[o,a]=d.useState("idle");return m.jsx(PS,{scope:n,imageLoadingStatus:o,onImageLoadingStatusChange:a,children:m.jsx(J.span,{...r,ref:t})})});Td.displayName=bs;var Pd="AvatarImage",_d=d.forwardRef((e,t)=>{const{__scopeAvatar:n,src:r,onLoadingStatusChange:o=()=>{},...a}=e,i=Od(Pd,n),s=_S(r,a),c=je(u=>{o(u),i.onImageLoadingStatusChange(u)});return Re(()=>{s!=="idle"&&c(s)},[s,c]),s==="loaded"?m.jsx(J.img,{...a,ref:t,src:r}):null});_d.displayName=Pd;var Ad="AvatarFallback",Id=d.forwardRef((e,t)=>{const{__scopeAvatar:n,delayMs:r,...o}=e,a=Od(Ad,n),[i,s]=d.useState(r===void 0);return d.useEffect(()=>{if(r!==void 0){const c=window.setTimeout(()=>s(!0),r);return()=>window.clearTimeout(c)}},[r]),i&&a.imageLoadingStatus!=="loaded"?m.jsx(J.span,{...o,ref:t}):null});Id.displayName=Ad;function zi(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}function _S(e,{referrerPolicy:t,crossOrigin:n}){const r=RS(),o=d.useRef(null),a=r?(o.current||(o.current=new window.Image),o.current):null,[i,s]=d.useState(()=>zi(a,e));return Re(()=>{s(zi(a,e))},[a,e]),Re(()=>{const c=l=>()=>{s(l)};if(!a)return;const u=c("loaded"),f=c("error");return a.addEventListener("load",u),a.addEventListener("error",f),t&&(a.referrerPolicy=t),typeof n=="string"&&(a.crossOrigin=n),()=>{a.removeEventListener("load",u),a.removeEventListener("error",f)}},[a,n,t]),i}var jd=Td,$d=_d,Ld=Id;const Fd=d.forwardRef(({className:e,...t},n)=>m.jsx(jd,{ref:n,className:L("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t}));Fd.displayName=jd.displayName;const Wd=d.forwardRef(({className:e,...t},n)=>m.jsx($d,{ref:n,className:L("aspect-square h-full w-full",e),...t}));Wd.displayName=$d.displayName;const Bd=d.forwardRef(({className:e,...t},n)=>m.jsx(Ld,{ref:n,className:L("flex h-full w-full items-center justify-center rounded-full bg-muted",e),...t}));Bd.displayName=Ld.displayName;var Eo="Checkbox",[AS,NM]=Ge(Eo),[IS,ys]=AS(Eo);function jS(e){const{__scopeCheckbox:t,checked:n,children:r,defaultChecked:o,disabled:a,form:i,name:s,onCheckedChange:c,required:u,value:f="on",internal_do_not_use_render:l}=e,[p,h]=ot({prop:n,defaultProp:o??!1,onChange:c,caller:Eo}),[b,g]=d.useState(null),[v,w]=d.useState(null),y=d.useRef(!1),E=b?!!i||!!b.closest("form"):!0,M={checked:p,disabled:a,setChecked:h,control:b,setControl:g,name:s,form:i,value:f,hasConsumerStoppedPropagationRef:y,required:u,defaultChecked:Ft(o)?!1:o,isFormControl:E,bubbleInput:v,setBubbleInput:w};return m.jsx(IS,{scope:t,...M,children:$S(l)?l(M):r})}var Yd="CheckboxTrigger",zd=d.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...r},o)=>{const{control:a,value:i,disabled:s,checked:c,required:u,setControl:f,setChecked:l,hasConsumerStoppedPropagationRef:p,isFormControl:h,bubbleInput:b}=ys(Yd,e),g=fe(o,f),v=d.useRef(c);return d.useEffect(()=>{const w=a==null?void 0:a.form;if(w){const y=()=>l(v.current);return w.addEventListener("reset",y),()=>w.removeEventListener("reset",y)}},[a,l]),m.jsx(J.button,{type:"button",role:"checkbox","aria-checked":Ft(c)?"mixed":c,"aria-required":u,"data-state":Vd(c),"data-disabled":s?"":void 0,disabled:s,value:i,...r,ref:g,onKeyDown:K(t,w=>{w.key==="Enter"&&w.preventDefault()}),onClick:K(n,w=>{l(y=>Ft(y)?!0:!y),b&&h&&(p.current=w.isPropagationStopped(),p.current||w.stopPropagation())})})});zd.displayName=Yd;var ws=d.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:r,checked:o,defaultChecked:a,required:i,disabled:s,value:c,onCheckedChange:u,form:f,...l}=e;return m.jsx(jS,{__scopeCheckbox:n,checked:o,defaultChecked:a,disabled:s,required:i,onCheckedChange:u,name:r,form:f,value:c,internal_do_not_use_render:({isFormControl:p})=>m.jsxs(m.Fragment,{children:[m.jsx(zd,{...l,ref:t,__scopeCheckbox:n}),p&&m.jsx(qd,{__scopeCheckbox:n})]})})});ws.displayName=Eo;var Hd="CheckboxIndicator",Ud=d.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...o}=e,a=ys(Hd,n);return m.jsx(at,{present:r||Ft(a.checked)||a.checked===!0,children:m.jsx(J.span,{"data-state":Vd(a.checked),"data-disabled":a.disabled?"":void 0,...o,ref:t,style:{pointerEvents:"none",...e.style}})})});Ud.displayName=Hd;var Gd="CheckboxBubbleInput",qd=d.forwardRef(({__scopeCheckbox:e,...t},n)=>{const{control:r,hasConsumerStoppedPropagationRef:o,checked:a,defaultChecked:i,required:s,disabled:c,name:u,value:f,form:l,bubbleInput:p,setBubbleInput:h}=ys(Gd,e),b=fe(n,h),g=es(a),v=qa(r);d.useEffect(()=>{const y=p;if(!y)return;const E=window.HTMLInputElement.prototype,C=Object.getOwnPropertyDescriptor(E,"checked").set,R=!o.current;if(g!==a&&C){const S=new Event("click",{bubbles:R});y.indeterminate=Ft(a),C.call(y,Ft(a)?!1:a),y.dispatchEvent(S)}},[p,g,a,o]);const w=d.useRef(Ft(a)?!1:a);return m.jsx(J.input,{type:"checkbox","aria-hidden":!0,defaultChecked:i??w.current,required:s,disabled:c,name:u,value:f,form:l,...t,tabIndex:-1,ref:b,style:{...t.style,...v,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});qd.displayName=Gd;function $S(e){return typeof e=="function"}function Ft(e){return e==="indeterminate"}function Vd(e){return Ft(e)?"indeterminate":e?"checked":"unchecked"}const Kd=d.forwardRef(({className:e,color:t="#029cfd",...n},r)=>m.jsx(ws,{ref:r,className:L("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:m.jsx(Ud,{className:"flex items-center justify-center text-current",children:n.checked==="indeterminate"?m.jsx(Xh,{className:"h-4 w-4 text-white"}):m.jsx(er,{className:"h-4 w-4"})})}));Kd.displayName=ws.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 Xd=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(Xd);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(
215
215
  [data-state=closed]
216
- ){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 FS(){const e=navigator.userAgent;return typeof window<"u"&&(/Firefox/.test(e)&&/Mobile/.test(e)||/FxiOS/.test(e))}function WS(){return xs(/^Mac/)}function BS(){return xs(/^iPhone/)}function Ui(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}function YS(){return xs(/^iPad/)||WS()&&navigator.maxTouchPoints>1}function Qd(){return BS()||YS()}function xs(e){return typeof window<"u"&&window.navigator!=null?e.test(window.navigator.platform):void 0}const zS=24,HS=typeof window<"u"?x.useLayoutEffect:x.useEffect;function Gi(...e){return(...t)=>{for(let n of e)typeof n=="function"&&n(...t)}}const ea=typeof document<"u"&&window.visualViewport;function qi(e){let t=window.getComputedStyle(e);return/(auto|scroll)/.test(t.overflow+t.overflowX+t.overflowY)}function Jd(e){for(qi(e)&&(e=e.parentElement);e&&!qi(e);)e=e.parentElement;return e||document.scrollingElement||document.documentElement}const US=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);let Tr=0,ta;function GS(e={}){let{isDisabled:t}=e;HS(()=>{if(!t)return Tr++,Tr===1&&Qd()&&(ta=qS()),()=>{Tr--,Tr===0&&(ta==null||ta())}},[t])}function qS(){let e,t=0,n=l=>{e=Jd(l.target),!(e===document.documentElement&&e===document.body)&&(t=l.changedTouches[0].pageY)},r=l=>{if(!e||e===document.documentElement||e===document.body){l.preventDefault();return}let p=l.changedTouches[0].pageY,h=e.scrollTop,b=e.scrollHeight-e.clientHeight;b!==0&&((h<=0&&p>t||h>=b&&p<t)&&l.preventDefault(),t=p)},o=l=>{let p=l.target;ka(p)&&p!==document.activeElement&&(l.preventDefault(),p.style.transform="translateY(-2000px)",p.focus(),requestAnimationFrame(()=>{p.style.transform=""}))},a=l=>{let p=l.target;ka(p)&&(p.style.transform="translateY(-2000px)",requestAnimationFrame(()=>{p.style.transform="",ea&&(ea.height<window.innerHeight?requestAnimationFrame(()=>{Vi(p)}):ea.addEventListener("resize",()=>Vi(p),{once:!0}))}))},i=()=>{window.scrollTo(0,0)},s=window.pageXOffset,c=window.pageYOffset,u=Gi(VS(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`));window.scrollTo(0,0);let f=Gi(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",i));return()=>{u(),f(),window.scrollTo(s,c)}}function VS(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 Vi(e){let t=document.scrollingElement||document.documentElement;for(;e&&e!==t;){let n=Jd(e);if(n!==document.documentElement&&n!==document.body&&n!==e){let r=n.getBoundingClientRect().top,o=e.getBoundingClientRect().top,a=e.getBoundingClientRect().bottom;const i=n.getBoundingClientRect().bottom+zS;a>i&&(n.scrollTop+=o-r)}e=n.parentElement}}function ka(e){return e instanceof HTMLInputElement&&!US.has(e.type)||e instanceof HTMLTextAreaElement||e instanceof HTMLElement&&e.isContentEditable}function KS(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function XS(...e){return t=>e.forEach(n=>KS(n,t))}function ef(...e){return d.useCallback(XS(...e),e)}const tf=new WeakMap;function Fe(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&&tf.set(e,r)}function ZS(e,t){if(!e||!(e instanceof HTMLElement))return;let n=tf.get(e);n&&(e.style[t]=n[t])}const Ie=e=>{switch(e){case"top":case"bottom":return!0;case"left":case"right":return!1;default:return e}};function Pr(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(", ")[Ie(t)?13:12]):(o=r.match(/^matrix\((.+)\)$/),o?parseFloat(o[1].split(", ")[Ie(t)?5:4]):null)}function QS(e){return 8*(Math.log(e+1)-2)}function na(e,t){if(!e)return()=>{};const n=e.style.cssText;return Object.assign(e.style,t),()=>{e.style.cssText=n}}function JS(...e){return(...t)=>{for(const n of e)typeof n=="function"&&n(...t)}}const Ne={DURATION:.5,EASE:[.32,.72,0,1]},nf=.4,eE=.25,tE=100,rf=8,Qt=16,Ra=26,ra="vaul-dragging";function of(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 nE({defaultProp:e,onChange:t}){const n=x.useState(e),[r]=n,o=x.useRef(r),a=of(t);return x.useEffect(()=>{o.current!==r&&(a(r),o.current=r)},[r,o,a]),n}function af({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=nE({defaultProp:t,onChange:n}),a=e!==void 0,i=a?e:r,s=of(n),c=x.useCallback(u=>{if(a){const l=typeof u=="function"?u(e):u;l!==e&&s(l)}else o(u)},[a,e,o,s]);return[i,c]}function rE({activeSnapPointProp:e,setActiveSnapPointProp:t,snapPoints:n,drawerRef:r,overlayRef:o,fadeFromIndex:a,onSnapPointChange:i,direction:s="bottom",container:c,snapToSequentialPoint:u}){const[f,l]=af({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 S(){h({innerWidth:window.innerWidth,innerHeight:window.innerHeight})}return window.addEventListener("resize",S),()=>window.removeEventListener("resize",S)},[]);const b=x.useMemo(()=>f===(n==null?void 0:n[n.length-1])||null,[n,f]),g=x.useMemo(()=>{var S;return(S=n==null?void 0:n.findIndex(R=>R===f))!=null?S:null},[n,f]),v=n&&n.length>0&&(a||a===0)&&!Number.isNaN(a)&&n[a]===f||!n,y=x.useMemo(()=>{const S=c?{width:c.getBoundingClientRect().width,height:c.getBoundingClientRect().height}:typeof window<"u"?{width:window.innerWidth,height:window.innerHeight}:{width:0,height:0};var R;return(R=n==null?void 0:n.map(A=>{const I=typeof A=="string";let L=0;if(I&&(L=parseInt(A,10)),Ie(s)){const B=I?L:p?A*S.height:0;return p?s==="bottom"?S.height-B:-S.height+B:B}const V=I?L:p?A*S.width:0;return p?s==="right"?S.width-V:-S.width+V:V}))!=null?R:[]},[n,p,c]),w=x.useMemo(()=>g!==null?y==null?void 0:y[g]:null,[y,g]),E=x.useCallback(S=>{var R;const A=(R=y==null?void 0:y.findIndex(I=>I===S))!=null?R:null;i(A),Fe(r.current,{transition:`transform ${Ne.DURATION}s cubic-bezier(${Ne.EASE.join(",")})`,transform:Ie(s)?`translate3d(0, ${S}px, 0)`:`translate3d(${S}px, 0, 0)`}),y&&A!==y.length-1&&a!==void 0&&A!==a&&A<a?Fe(o.current,{transition:`opacity ${Ne.DURATION}s cubic-bezier(${Ne.EASE.join(",")})`,opacity:"0"}):Fe(o.current,{transition:`opacity ${Ne.DURATION}s cubic-bezier(${Ne.EASE.join(",")})`,opacity:"1"}),l(n==null?void 0:n[Math.max(A,0)])},[r.current,n,y,a,o,l]);x.useEffect(()=>{if(f||e){var S;const R=(S=n==null?void 0:n.findIndex(A=>A===e||A===f))!=null?S:-1;y&&R!==-1&&typeof y[R]=="number"&&E(y[R])}},[f,e,n,y,E]);function M({draggedDistance:S,closeDrawer:R,velocity:A,dismissible:I}){if(a===void 0)return;const L=s==="bottom"||s==="right"?(w??0)-S:(w??0)+S,V=g===a-1,B=g===0,$=S>0;if(V&&Fe(o.current,{transition:`opacity ${Ne.DURATION}s cubic-bezier(${Ne.EASE.join(",")})`}),!u&&A>2&&!$){I?R():E(y[0]);return}if(!u&&A>2&&$&&y&&n){E(y[n.length-1]);return}const _=y==null?void 0:y.reduce((O,D)=>typeof O!="number"||typeof D!="number"?O:Math.abs(D-L)<Math.abs(O-L)?D:O),N=Ie(s)?window.innerHeight:window.innerWidth;if(A>nf&&Math.abs(S)<N*.4){const O=$?1:-1;if(O>0&&b&&n){E(y[n.length-1]);return}if(B&&O<0&&I&&R(),g===null)return;E(y[g+O]);return}E(_)}function C({draggedDistance:S}){if(w===null)return;const R=s==="bottom"||s==="right"?w-S:w+S;(s==="bottom"||s==="right")&&R<y[y.length-1]||(s==="top"||s==="left")&&R>y[y.length-1]||Fe(r.current,{transform:Ie(s)?`translate3d(0, ${R}px, 0)`:`translate3d(${R}px, 0, 0)`})}function k(S,R){if(!n||typeof g!="number"||!y||a===void 0)return null;const A=g===a-1;if(g>=a&&R)return 0;if(A&&!R)return 1;if(!v&&!A)return null;const L=A?g+1:g-1,V=A?y[L]-y[L-1]:y[L+1]-y[L],B=S/Math.abs(V);return A?1-B:B}return{isLastSnapPoint:b,activeSnapPoint:f,shouldFade:v,getPercentageDragged:k,setActiveSnapPoint:l,activeSnapPointIndex:g,onRelease:M,onDrag:C,snapPointsOffset:y}}const oE=()=>()=>{};function aE(){const{direction:e,isOpen:t,shouldScaleBackground:n,setBackgroundColorOnScale:r,noBodyStyles:o}=gr(),a=x.useRef(null),i=x.useMemo(()=>document.body.style.backgroundColor,[]);function s(){return(window.innerWidth-Ra)/window.innerWidth}x.useEffect(()=>{if(t&&n){a.current&&clearTimeout(a.current);const c=document.querySelector("[data-vaul-drawer-wrapper]")||document.querySelector("[vaul-drawer-wrapper]");if(!c)return;JS(r&&!o?na(document.body,{background:"black"}):oE,na(c,{transformOrigin:Ie(e)?"top":"left",transitionProperty:"transform, border-radius",transitionDuration:`${Ne.DURATION}s`,transitionTimingFunction:`cubic-bezier(${Ne.EASE.join(",")})`}));const u=na(c,{borderRadius:`${rf}px`,overflow:"hidden",...Ie(e)?{transform:`scale(${s()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`}:{transform:`scale(${s()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`}});return()=>{u(),a.current=window.setTimeout(()=>{i?document.body.style.background=i:document.body.style.removeProperty("background")},Ne.DURATION*1e3)}}},[t,n,i])}let Bn=null;function sE({isOpen:e,modal:t,nested:n,hasBeenOpened:r,preventScrollRestoration:o,noBodyStyles:a}){const[i,s]=x.useState(()=>typeof window<"u"?window.location.href:""),c=x.useRef(0),u=x.useCallback(()=>{if(Ui()&&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:l,innerHeight:p}=window;document.body.style.setProperty("position","fixed","important"),Object.assign(document.body.style,{top:`${-c.current}px`,left:`${-l}px`,right:"0px",height:"auto"}),window.setTimeout(()=>window.requestAnimationFrame(()=>{const h=p-window.innerHeight;h&&c.current>=p&&(document.body.style.top=`${-(c.current+h)}px`)}),300)}},[e]),f=x.useCallback(()=>{if(Ui()&&Bn!==null&&!a){const l=-parseInt(document.body.style.top,10),p=-parseInt(document.body.style.left,10);Object.assign(document.body.style,Bn),window.requestAnimationFrame(()=>{if(o&&i!==window.location.href){s(window.location.href);return}window.scrollTo(p,l)}),Bn=null}},[i]);return x.useEffect(()=>{function l(){c.current=window.scrollY}return l(),window.addEventListener("scroll",l),()=>{window.removeEventListener("scroll",l)}},[]),x.useEffect(()=>{if(t)return()=>{typeof document>"u"||document.querySelector("[data-vaul-drawer]")||f()}},[t,f]),x.useEffect(()=>{n||!r||(e?(!window.matchMedia("(display-mode: standalone)").matches&&u(),t||window.setTimeout(()=>{f()},500)):f())},[e,r,i,t,n,u,f]),{restorePositionSetting:f}}function iE({open:e,onOpenChange:t,children:n,onDrag:r,onRelease:o,snapPoints:a,shouldScaleBackground:i=!1,setBackgroundColorOnScale:s=!0,closeThreshold:c=eE,scrollLockTimeout:u=tE,dismissible:f=!0,handleOnly:l=!1,fadeFromIndex:p=a&&a.length-1,activeSnapPoint:h,setActiveSnapPoint:b,fixed:g,modal:v=!0,onClose:y,nested:w,noBodyStyles:E=!1,direction:M="bottom",defaultOpen:C=!1,disablePreventScroll:k=!0,snapToSequentialPoint:S=!1,preventScrollRestoration:R=!1,repositionInputs:A=!0,onAnimationEnd:I,container:L,autoFocus:V=!1}){var B,$;const[_=!1,N]=af({defaultProp:C,prop:e,onChange:q=>{t==null||t(q),!q&&!w&&pe(),setTimeout(()=>{I==null||I(q)},Ne.DURATION*1e3),q&&!v&&typeof window<"u"&&window.requestAnimationFrame(()=>{document.body.style.pointerEvents="auto"}),q||(document.body.style.pointerEvents="auto")}}),[O,D]=x.useState(!1),[P,Y]=x.useState(!1),[H,T]=x.useState(!1),j=x.useRef(null),z=x.useRef(null),U=x.useRef(null),G=x.useRef(null),W=x.useRef(null),X=x.useRef(!1),Z=x.useRef(null),Q=x.useRef(0),ee=x.useRef(!1),ae=x.useRef(!C),be=x.useRef(0),te=x.useRef(null),Te=x.useRef(((B=te.current)==null?void 0:B.getBoundingClientRect().height)||0),$e=x.useRef((($=te.current)==null?void 0:$.getBoundingClientRect().width)||0),Ce=x.useRef(0),Ve=x.useCallback(q=>{a&&q===Ye.length-1&&(z.current=new Date)},[]),{activeSnapPoint:De,activeSnapPointIndex:Be,setActiveSnapPoint:Pt,onRelease:_e,snapPointsOffset:Ye,onDrag:St,shouldFade:_t,getPercentageDragged:ue}=rE({snapPoints:a,activeSnapPointProp:h,setActiveSnapPointProp:b,drawerRef:te,fadeFromIndex:p,overlayRef:j,onSnapPointChange:Ve,direction:M,container:L,snapToSequentialPoint:S});GS({isDisabled:!_||P||!v||H||!O||!A||!k});const{restorePositionSetting:pe}=sE({isOpen:_,modal:v,nested:w??!1,hasBeenOpened:O,preventScrollRestoration:R,noBodyStyles:E});function ye(){return(window.innerWidth-Ra)/window.innerWidth}function Ae(q){var ie,se;!f&&!a||te.current&&!te.current.contains(q.target)||(Te.current=((ie=te.current)==null?void 0:ie.getBoundingClientRect().height)||0,$e.current=((se=te.current)==null?void 0:se.getBoundingClientRect().width)||0,Y(!0),U.current=new Date,Qd()&&window.addEventListener("touchend",()=>X.current=!1,{once:!0}),q.target.setPointerCapture(q.pointerId),Q.current=Ie(M)?q.pageY:q.pageX)}function Me(q,ie){var se;let me=q;const ge=(se=window.getSelection())==null?void 0:se.toString(),oe=te.current?Pr(te.current,M):null,de=new Date;if(me.tagName==="SELECT"||me.hasAttribute("data-vaul-no-drag")||me.closest("[data-vaul-no-drag]"))return!1;if(M==="right"||M==="left")return!0;if(z.current&&de.getTime()-z.current.getTime()<500)return!1;if(oe!==null&&(M==="bottom"?oe>0:oe<0))return!0;if(ge&&ge.length>0)return!1;if(W.current&&de.getTime()-W.current.getTime()<u&&oe===0||ie)return W.current=de,!1;for(;me;){if(me.scrollHeight>me.clientHeight){if(me.scrollTop!==0)return W.current=new Date,!1;if(me.getAttribute("role")==="dialog")return!0}me=me.parentNode}return!0}function At(q){if(te.current&&P){const ie=M==="bottom"||M==="right"?1:-1,se=(Q.current-(Ie(M)?q.pageY:q.pageX))*ie,me=se>0,ge=a&&!f&&!me;if(ge&&Be===0)return;const oe=Math.abs(se),de=document.querySelector("[data-vaul-drawer-wrapper]"),ve=M==="bottom"||M==="top"?Te.current:$e.current;let le=oe/ve;const Xe=ue(oe,me);if(Xe!==null&&(le=Xe),ge&&le>=1||!X.current&&!Me(q.target,me))return;if(te.current.classList.add(ra),X.current=!0,Fe(te.current,{transition:"none"}),Fe(j.current,{transition:"none"}),a&&St({draggedDistance:se}),me&&!a){const Ee=QS(se),Qe=Math.min(Ee*-1,0)*ie;Fe(te.current,{transform:Ie(M)?`translate3d(0, ${Qe}px, 0)`:`translate3d(${Qe}px, 0, 0)`});return}const xe=1-le;if((_t||p&&Be===p-1)&&(r==null||r(q,le),Fe(j.current,{opacity:`${xe}`,transition:"none"},!0)),de&&j.current&&i){const Ee=Math.min(ye()+le*(1-ye()),1),Qe=8-le*8,ze=Math.max(0,14-le*14);Fe(de,{borderRadius:`${Qe}px`,transform:Ie(M)?`scale(${Ee}) translate3d(0, ${ze}px, 0)`:`scale(${Ee}) translate3d(${ze}px, 0, 0)`,transition:"none"},!0)}if(!a){const Ee=oe*ie;Fe(te.current,{transform:Ie(M)?`translate3d(0, ${Ee}px, 0)`:`translate3d(${Ee}px, 0, 0)`})}}}x.useEffect(()=>{window.requestAnimationFrame(()=>{ae.current=!0})},[]),x.useEffect(()=>{var q;function ie(){if(!te.current||!A)return;const se=document.activeElement;if(ka(se)||ee.current){var me;const ge=((me=window.visualViewport)==null?void 0:me.height)||0,oe=window.innerHeight;let de=oe-ge;const ve=te.current.getBoundingClientRect().height||0,le=ve>oe*.8;Ce.current||(Ce.current=ve);const Xe=te.current.getBoundingClientRect().top;if(Math.abs(be.current-de)>60&&(ee.current=!ee.current),a&&a.length>0&&Ye&&Be){const xe=Ye[Be]||0;de+=xe}if(be.current=de,ve>ge||ee.current){const xe=te.current.getBoundingClientRect().height;let Ee=xe;xe>ge&&(Ee=ge-(le?Xe:Ra)),g?te.current.style.height=`${xe-Math.max(de,0)}px`:te.current.style.height=`${Math.max(Ee,ge-Xe)}px`}else FS()||(te.current.style.height=`${Ce.current}px`);a&&a.length>0&&!ee.current?te.current.style.bottom="0px":te.current.style.bottom=`${Math.max(de,0)}px`}}return(q=window.visualViewport)==null||q.addEventListener("resize",ie),()=>{var se;return(se=window.visualViewport)==null?void 0:se.removeEventListener("resize",ie)}},[Be,a,Ye]);function Ke(q){An(),y==null||y(),q||N(!1),setTimeout(()=>{a&&Pt(a[0])},Ne.DURATION*1e3)}function un(){if(!te.current)return;const q=document.querySelector("[data-vaul-drawer-wrapper]"),ie=Pr(te.current,M);Fe(te.current,{transform:"translate3d(0, 0, 0)",transition:`transform ${Ne.DURATION}s cubic-bezier(${Ne.EASE.join(",")})`}),Fe(j.current,{transition:`opacity ${Ne.DURATION}s cubic-bezier(${Ne.EASE.join(",")})`,opacity:"1"}),i&&ie&&ie>0&&_&&Fe(q,{borderRadius:`${rf}px`,overflow:"hidden",...Ie(M)?{transform:`scale(${ye()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`,transformOrigin:"top"}:{transform:`scale(${ye()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`,transformOrigin:"left"},transitionProperty:"transform, border-radius",transitionDuration:`${Ne.DURATION}s`,transitionTimingFunction:`cubic-bezier(${Ne.EASE.join(",")})`},!0)}function An(){!P||!te.current||(te.current.classList.remove(ra),X.current=!1,Y(!1),G.current=new Date)}function dn(q){if(!P||!te.current)return;te.current.classList.remove(ra),X.current=!1,Y(!1),G.current=new Date;const ie=Pr(te.current,M);if(!q||!Me(q.target,!1)||!ie||Number.isNaN(ie)||U.current===null)return;const se=G.current.getTime()-U.current.getTime(),me=Q.current-(Ie(M)?q.pageY:q.pageX),ge=Math.abs(me)/se;if(ge>.05&&(T(!0),setTimeout(()=>{T(!1)},200)),a){_e({draggedDistance:me*(M==="bottom"||M==="right"?1:-1),closeDrawer:Ke,velocity:ge,dismissible:f}),o==null||o(q,!0);return}if(M==="bottom"||M==="right"?me>0:me<0){un(),o==null||o(q,!0);return}if(ge>nf){Ke(),o==null||o(q,!1);return}var oe;const de=Math.min((oe=te.current.getBoundingClientRect().height)!=null?oe:0,window.innerHeight);var ve;const le=Math.min((ve=te.current.getBoundingClientRect().width)!=null?ve:0,window.innerWidth),Xe=M==="left"||M==="right";if(Math.abs(ie)>=(Xe?le:de)*c){Ke(),o==null||o(q,!1);return}o==null||o(q,!0),un()}x.useEffect(()=>(_&&(Fe(document.documentElement,{scrollBehavior:"auto"}),z.current=new Date),()=>{ZS(document.documentElement,"scrollBehavior")}),[_]);function Kt(q){const ie=q?(window.innerWidth-Qt)/window.innerWidth:1,se=q?-Qt:0;Z.current&&window.clearTimeout(Z.current),Fe(te.current,{transition:`transform ${Ne.DURATION}s cubic-bezier(${Ne.EASE.join(",")})`,transform:Ie(M)?`scale(${ie}) translate3d(0, ${se}px, 0)`:`scale(${ie}) translate3d(${se}px, 0, 0)`}),!q&&te.current&&(Z.current=setTimeout(()=>{const me=Pr(te.current,M);Fe(te.current,{transition:"none",transform:Ie(M)?`translate3d(0, ${me}px, 0)`:`translate3d(${me}px, 0, 0)`})},500))}function In(q,ie){if(ie<0)return;const se=(window.innerWidth-Qt)/window.innerWidth,me=se+ie*(1-se),ge=-Qt+ie*Qt;Fe(te.current,{transform:Ie(M)?`scale(${me}) translate3d(0, ${ge}px, 0)`:`scale(${me}) translate3d(${ge}px, 0, 0)`,transition:"none"})}function It(q,ie){const se=Ie(M)?window.innerHeight:window.innerWidth,me=ie?(se-Qt)/se:1,ge=ie?-Qt:0;ie&&Fe(te.current,{transition:`transform ${Ne.DURATION}s cubic-bezier(${Ne.EASE.join(",")})`,transform:Ie(M)?`scale(${me}) translate3d(0, ${ge}px, 0)`:`scale(${me}) translate3d(${ge}px, 0, 0)`})}return x.useEffect(()=>{v||window.requestAnimationFrame(()=>{document.body.style.pointerEvents="auto"})},[v]),x.createElement(ls,{defaultOpen:C,onOpenChange:q=>{!f&&!q||(q?D(!0):Ke(!0),N(q))},open:_},x.createElement(Zd.Provider,{value:{activeSnapPoint:De,snapPoints:a,setActiveSnapPoint:Pt,drawerRef:te,overlayRef:j,onOpenChange:t,onPress:Ae,onRelease:dn,onDrag:At,dismissible:f,shouldAnimate:ae,handleOnly:l,isOpen:_,isDragging:P,shouldFade:_t,closeDrawer:Ke,onNestedDrag:In,onNestedOpenChange:Kt,onNestedRelease:It,keyboardIsOpen:ee,modal:v,snapPointsOffset:Ye,activeSnapPointIndex:Be,direction:M,shouldScaleBackground:i,setBackgroundColorOnScale:s,noBodyStyles:E,container:L,autoFocus:V}},n))}const sf=x.forwardRef(function({...e},t){const{overlayRef:n,snapPoints:r,onRelease:o,shouldFade:a,isOpen:i,modal:s,shouldAnimate:c}=gr(),u=ef(t,n),f=r&&r.length>0;if(!s)return null;const l=x.useCallback(p=>o(p),[o]);return x.createElement(yo,{onMouseUp:l,ref:u,"data-vaul-overlay":"","data-vaul-snap-points":i&&f?"true":"false","data-vaul-snap-points-overlay":i&&a?"true":"false","data-vaul-animate":c!=null&&c.current?"true":"false",...e})});sf.displayName="Drawer.Overlay";const cf=x.forwardRef(function({onPointerDownOutside:e,style:t,onOpenAutoFocus:n,...r},o){const{drawerRef:a,onPress:i,onRelease:s,onDrag:c,keyboardIsOpen:u,snapPointsOffset:f,activeSnapPointIndex:l,modal:p,isOpen:h,direction:b,snapPoints:g,container:v,handleOnly:y,shouldAnimate:w,autoFocus:E}=gr(),[M,C]=x.useState(!1),k=ef(o,a),S=x.useRef(null),R=x.useRef(null),A=x.useRef(!1),I=g&&g.length>0;aE();const L=(B,$,_=0)=>{if(A.current)return!0;const N=Math.abs(B.y),O=Math.abs(B.x),D=O>N,P=["bottom","right"].includes($)?1:-1;if($==="left"||$==="right"){if(!(B.x*P<0)&&O>=0&&O<=_)return D}else if(!(B.y*P<0)&&N>=0&&N<=_)return!D;return A.current=!0,!0};x.useEffect(()=>{I&&window.requestAnimationFrame(()=>{C(!0)})},[]);function V(B){S.current=null,A.current=!1,s(B)}return x.createElement(wo,{"data-vaul-drawer-direction":b,"data-vaul-drawer":"","data-vaul-delayed-snap-points":M?"true":"false","data-vaul-snap-points":h&&I?"true":"false","data-vaul-custom-container":v?"true":"false","data-vaul-animate":w!=null&&w.current?"true":"false",...r,ref:k,style:f&&f.length>0?{"--snap-point-height":`${f[l??0]}px`,...t}:t,onPointerDown:B=>{y||(r.onPointerDown==null||r.onPointerDown.call(r,B),S.current={x:B.pageX,y:B.pageY},i(B))},onOpenAutoFocus:B=>{n==null||n(B),E||B.preventDefault()},onPointerDownOutside:B=>{if(e==null||e(B),!p||B.defaultPrevented){B.preventDefault();return}u.current&&(u.current=!1)},onFocusOutside:B=>{if(!p){B.preventDefault();return}},onPointerMove:B=>{if(R.current=B,y||(r.onPointerMove==null||r.onPointerMove.call(r,B),!S.current))return;const $=B.pageY-S.current.y,_=B.pageX-S.current.x,N=B.pointerType==="touch"?10:2;L({x:_,y:$},b,N)?c(B):(Math.abs(_)>N||Math.abs($)>N)&&(S.current=null)},onPointerUp:B=>{r.onPointerUp==null||r.onPointerUp.call(r,B),S.current=null,A.current=!1,s(B)},onPointerOut:B=>{r.onPointerOut==null||r.onPointerOut.call(r,B),V(R.current)},onContextMenu:B=>{r.onContextMenu==null||r.onContextMenu.call(r,B),R.current&&V(R.current)}})});cf.displayName="Drawer.Content";const cE=250,lE=120,uE=x.forwardRef(function({preventCycle:e=!1,children:t,...n},r){const{closeDrawer:o,isDragging:a,snapPoints:i,activeSnapPoint:s,setActiveSnapPoint:c,dismissible:u,handleOnly:f,isOpen:l,onPress:p,onDrag:h}=gr(),b=x.useRef(null),g=x.useRef(!1);function v(){if(g.current){E();return}window.setTimeout(()=>{y()},lE)}function y(){if(a||e||g.current){E();return}if(E(),!i||i.length===0){u||o();return}if(s===i[i.length-1]&&u){o();return}const C=i.findIndex(S=>S===s);if(C===-1)return;const k=i[C+1];c(k)}function w(){b.current=window.setTimeout(()=>{g.current=!0},cE)}function E(){b.current&&window.clearTimeout(b.current),g.current=!1}return x.createElement("div",{onClick:v,onPointerCancel:E,onPointerDown:M=>{f&&p(M),w()},onPointerMove:M=>{f&&h(M)},ref:r,"data-vaul-drawer-visible":l?"true":"false","data-vaul-handle":"","aria-hidden":"true",...n},x.createElement("span",{"data-vaul-handle-hitarea":"","aria-hidden":"true"},t))});uE.displayName="Drawer.Handle";function dE(e){const t=gr(),{container:n=t.container,...r}=e;return x.createElement(us,{container:n,...r})}const ft={Root:iE,Content:cf,Overlay:sf,Trigger:nd,Portal:dE,Close:ms,Title:ds,Description:fs},lf=({shouldScaleBackground:e=!0,...t})=>m.jsx(ft.Root,{shouldScaleBackground:e,...t});lf.displayName="Drawer";const fE=ft.Trigger,mE=ft.Portal,pE=ft.Close,uf=d.forwardRef(({className:e,...t},n)=>m.jsx(ft.Overlay,{ref:n,className:F("fixed inset-0 z-50 bg-black/80",e),...t}));uf.displayName=ft.Overlay.displayName;const df=d.forwardRef(({className:e,children:t,...n},r)=>m.jsxs(mE,{children:[m.jsx(uf,{}),m.jsxs(ft.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:[m.jsx("div",{className:"mx-auto mt-4 h-2 w-[100px] rounded-full bg-muted"}),t]})]}));df.displayName="DrawerContent";const ff=({className:e,...t})=>m.jsx("div",{className:F("grid gap-1.5 p-4 text-center sm:text-left",e),...t});ff.displayName="DrawerHeader";const mf=({className:e,...t})=>m.jsx("div",{className:F("mt-auto flex flex-col gap-2 p-4",e),...t});mf.displayName="DrawerFooter";const pf=d.forwardRef(({className:e,...t},n)=>m.jsx(ft.Title,{ref:n,className:F("text-lg font-semibold leading-none tracking-tight",e),...t}));pf.displayName=ft.Title.displayName;const hf=d.forwardRef(({className:e,...t},n)=>m.jsx(ft.Description,{ref:n,className:F("text-sm text-muted-foreground",e),...t}));hf.displayName=ft.Description.displayName;var hE="DismissableLayer",Oa="dismissableLayer.update",gE="dismissableLayer.pointerDownOutside",vE="dismissableLayer.focusOutside",Ki,gf=d.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),vf=d.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:i,onDismiss:s,...c}=e,u=d.useContext(gf),[f,l]=d.useState(null),p=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,h]=d.useState({}),b=fe(t,S=>l(S)),g=Array.from(u.layers),[v]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),y=g.indexOf(v),w=f?g.indexOf(f):-1,E=u.layersWithOutsidePointerEventsDisabled.size>0,M=w>=y,C=wE(S=>{const R=S.target,A=[...u.branches].some(I=>I.contains(R));!M||A||(o==null||o(S),i==null||i(S),S.defaultPrevented||s==null||s())},p),k=xE(S=>{const R=S.target;[...u.branches].some(I=>I.contains(R))||(a==null||a(S),i==null||i(S),S.defaultPrevented||s==null||s())},p);return rr(S=>{w===u.layers.size-1&&(r==null||r(S),!S.defaultPrevented&&s&&(S.preventDefault(),s()))},p),d.useEffect(()=>{if(f)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(Ki=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(f)),u.layers.add(f),Xi(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=Ki)}},[f,p,n,u]),d.useEffect(()=>()=>{f&&(u.layers.delete(f),u.layersWithOutsidePointerEventsDisabled.delete(f),Xi())},[f,u]),d.useEffect(()=>{const S=()=>h({});return document.addEventListener(Oa,S),()=>document.removeEventListener(Oa,S)},[]),m.jsx(J.div,{...c,ref:b,style:{pointerEvents:E?M?"auto":"none":void 0,...e.style},onFocusCapture:K(e.onFocusCapture,k.onFocusCapture),onBlurCapture:K(e.onBlurCapture,k.onBlurCapture),onPointerDownCapture:K(e.onPointerDownCapture,C.onPointerDownCapture)})});vf.displayName=hE;var bE="DismissableLayerBranch",yE=d.forwardRef((e,t)=>{const n=d.useContext(gf),r=d.useRef(null),o=fe(t,r);return d.useEffect(()=>{const a=r.current;if(a)return n.branches.add(a),()=>{n.branches.delete(a)}},[n.branches]),m.jsx(J.div,{...e,ref:o})});yE.displayName=bE;function wE(e,t=globalThis==null?void 0:globalThis.document){const n=je(e),r=d.useRef(!1),o=d.useRef(()=>{});return d.useEffect(()=>{const a=s=>{if(s.target&&!r.current){let c=function(){bf(gE,n,u,{discrete:!0})};const u={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=c,t.addEventListener("click",o.current,{once:!0})):c()}else t.removeEventListener("click",o.current);r.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",a),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function xE(e,t=globalThis==null?void 0:globalThis.document){const n=je(e),r=d.useRef(!1);return d.useEffect(()=>{const o=a=>{a.target&&!r.current&&bf(vE,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 Xi(){const e=new CustomEvent(Oa);document.dispatchEvent(e)}function bf(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?kn(o,a):o.dispatchEvent(a)}var oa="rovingFocusGroup.onEntryFocus",SE={bubbles:!1,cancelable:!0},vr="RovingFocusGroup",[Ta,yf,EE]=Ja(vr),[CE,_n]=Ge(vr,[EE]),[DE,ME]=CE(vr),wf=d.forwardRef((e,t)=>m.jsx(Ta.Provider,{scope:e.__scopeRovingFocusGroup,children:m.jsx(Ta.Slot,{scope:e.__scopeRovingFocusGroup,children:m.jsx(NE,{...e,ref:t})})}));wf.displayName=vr;var NE=d.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:a,currentTabStopId:i,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:c,onEntryFocus:u,preventScrollOnEntryFocus:f=!1,...l}=e,p=d.useRef(null),h=fe(t,p),b=dr(a),[g,v]=ot({prop:i,defaultProp:s??null,onChange:c,caller:vr}),[y,w]=d.useState(!1),E=je(u),M=yf(n),C=d.useRef(!1),[k,S]=d.useState(0);return d.useEffect(()=>{const R=p.current;if(R)return R.addEventListener(oa,E),()=>R.removeEventListener(oa,E)},[E]),m.jsx(DE,{scope:n,orientation:r,dir:b,loop:o,currentTabStopId:g,onItemFocus:d.useCallback(R=>v(R),[v]),onItemShiftTab:d.useCallback(()=>w(!0),[]),onFocusableItemAdd:d.useCallback(()=>S(R=>R+1),[]),onFocusableItemRemove:d.useCallback(()=>S(R=>R-1),[]),children:m.jsx(J.div,{tabIndex:y||k===0?-1:0,"data-orientation":r,...l,ref:h,style:{outline:"none",...e.style},onMouseDown:K(e.onMouseDown,()=>{C.current=!0}),onFocus:K(e.onFocus,R=>{const A=!C.current;if(R.target===R.currentTarget&&A&&!y){const I=new CustomEvent(oa,SE);if(R.currentTarget.dispatchEvent(I),!I.defaultPrevented){const L=M().filter(N=>N.focusable),V=L.find(N=>N.active),B=L.find(N=>N.id===g),_=[V,B,...L].filter(Boolean).map(N=>N.ref.current);Ef(_,f)}}C.current=!1}),onBlur:K(e.onBlur,()=>w(!1))})})}),xf="RovingFocusGroupItem",Sf=d.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:a,children:i,...s}=e,c=Pe(),u=a||c,f=ME(xf,n),l=f.currentTabStopId===u,p=yf(n),{onFocusableItemAdd:h,onFocusableItemRemove:b,currentTabStopId:g}=f;return d.useEffect(()=>{if(r)return h(),()=>b()},[r,h,b]),m.jsx(Ta.ItemSlot,{scope:n,id:u,focusable:r,active:o,children:m.jsx(J.span,{tabIndex:l?0:-1,"data-orientation":f.orientation,...s,ref:t,onMouseDown:K(e.onMouseDown,v=>{r?f.onItemFocus(u):v.preventDefault()}),onFocus:K(e.onFocus,()=>f.onItemFocus(u)),onKeyDown:K(e.onKeyDown,v=>{if(v.key==="Tab"&&v.shiftKey){f.onItemShiftTab();return}if(v.target!==v.currentTarget)return;const y=OE(v,f.orientation,f.dir);if(y!==void 0){if(v.metaKey||v.ctrlKey||v.altKey||v.shiftKey)return;v.preventDefault();let E=p().filter(M=>M.focusable).map(M=>M.ref.current);if(y==="last")E.reverse();else if(y==="prev"||y==="next"){y==="prev"&&E.reverse();const M=E.indexOf(v.currentTarget);E=f.loop?TE(E,M+1):E.slice(M+1)}setTimeout(()=>Ef(E))}}),children:typeof i=="function"?i({isCurrentTabStop:l,hasTabStop:g!=null}):i})})});Sf.displayName=xf;var kE={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function RE(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function OE(e,t,n){const r=RE(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return kE[r]}function Ef(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function TE(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var Ss=wf,Es=Sf,Pa=["Enter"," "],PE=["ArrowDown","PageUp","Home"],Cf=["ArrowUp","PageDown","End"],_E=[...PE,...Cf],AE={ltr:[...Pa,"ArrowRight"],rtl:[...Pa,"ArrowLeft"]},IE={ltr:["ArrowLeft"],rtl:["ArrowRight"]},br="Menu",[Zn,jE,$E]=Ja(br),[ln,Df]=Ge(br,[$E,Ht,_n]),yr=Ht(),Mf=_n(),[Nf,Vt]=ln(br),[LE,wr]=ln(br),kf=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:o,onOpenChange:a,modal:i=!0}=e,s=yr(t),[c,u]=d.useState(null),f=d.useRef(!1),l=je(a),p=dr(o);return d.useEffect(()=>{const h=()=>{f.current=!0,document.addEventListener("pointerdown",b,{capture:!0,once:!0}),document.addEventListener("pointermove",b,{capture:!0,once:!0})},b=()=>f.current=!1;return document.addEventListener("keydown",h,{capture:!0}),()=>{document.removeEventListener("keydown",h,{capture:!0}),document.removeEventListener("pointerdown",b,{capture:!0}),document.removeEventListener("pointermove",b,{capture:!0})}},[]),m.jsx(sr,{...s,children:m.jsx(Nf,{scope:t,open:n,onOpenChange:l,content:c,onContentChange:u,children:m.jsx(LE,{scope:t,onClose:d.useCallback(()=>l(!1),[l]),isUsingKeyboardRef:f,dir:p,modal:i,children:r})})})};kf.displayName=br;var FE="MenuAnchor",Cs=d.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=yr(n);return m.jsx(ir,{...o,...r,ref:t})});Cs.displayName=FE;var Ds="MenuPortal",[WE,Rf]=ln(Ds,{forceMount:void 0}),Of=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:o}=e,a=Vt(Ds,t);return m.jsx(WE,{scope:t,forceMount:n,children:m.jsx(at,{present:n||a.open,children:m.jsx(cr,{asChild:!0,container:o,children:r})})})};Of.displayName=Ds;var rt="MenuContent",[BE,Ms]=ln(rt),Tf=d.forwardRef((e,t)=>{const n=Rf(rt,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,a=Vt(rt,e.__scopeMenu),i=wr(rt,e.__scopeMenu);return m.jsx(Zn.Provider,{scope:e.__scopeMenu,children:m.jsx(at,{present:r||a.open,children:m.jsx(Zn.Slot,{scope:e.__scopeMenu,children:i.modal?m.jsx(YE,{...o,ref:t}):m.jsx(zE,{...o,ref:t})})})})}),YE=d.forwardRef((e,t)=>{const n=Vt(rt,e.__scopeMenu),r=d.useRef(null),o=fe(t,r);return d.useEffect(()=>{const a=r.current;if(a)return co(a)},[]),m.jsx(Ns,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:K(e.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),zE=d.forwardRef((e,t)=>{const n=Vt(rt,e.__scopeMenu);return m.jsx(Ns,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),HE=Wt("MenuContent.ScrollLock"),Ns=d.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:o,onOpenAutoFocus:a,onCloseAutoFocus:i,disableOutsidePointerEvents:s,onEntryFocus:c,onEscapeKeyDown:u,onPointerDownOutside:f,onFocusOutside:l,onInteractOutside:p,onDismiss:h,disableOutsideScroll:b,...g}=e,v=Vt(rt,n),y=wr(rt,n),w=yr(n),E=Mf(n),M=jE(n),[C,k]=d.useState(null),S=d.useRef(null),R=fe(t,S,v.onContentChange),A=d.useRef(0),I=d.useRef(""),L=d.useRef(0),V=d.useRef(null),B=d.useRef("right"),$=d.useRef(0),_=b?lr:d.Fragment,N=b?{as:HE,allowPinchZoom:!0}:void 0,O=P=>{var W,X;const Y=I.current+P,H=M().filter(Z=>!Z.disabled),T=document.activeElement,j=(W=H.find(Z=>Z.ref.current===T))==null?void 0:W.textValue,z=H.map(Z=>Z.textValue),U=nC(z,Y,j),G=(X=H.find(Z=>Z.textValue===U))==null?void 0:X.ref.current;(function Z(Q){I.current=Q,window.clearTimeout(A.current),Q!==""&&(A.current=window.setTimeout(()=>Z(""),1e3))})(Y),G&&setTimeout(()=>G.focus())};d.useEffect(()=>()=>window.clearTimeout(A.current),[]),Wa();const D=d.useCallback(P=>{var H,T;return B.current===((H=V.current)==null?void 0:H.side)&&oC(P,(T=V.current)==null?void 0:T.area)},[]);return m.jsx(BE,{scope:n,searchRef:I,onItemEnter:d.useCallback(P=>{D(P)&&P.preventDefault()},[D]),onItemLeave:d.useCallback(P=>{var Y;D(P)||((Y=S.current)==null||Y.focus(),k(null))},[D]),onTriggerLeave:d.useCallback(P=>{D(P)&&P.preventDefault()},[D]),pointerGraceTimerRef:L,onPointerGraceIntentChange:d.useCallback(P=>{V.current=P},[]),children:m.jsx(_,{...N,children:m.jsx(or,{asChild:!0,trapped:o,onMountAutoFocus:K(a,P=>{var Y;P.preventDefault(),(Y=S.current)==null||Y.focus({preventScroll:!0})}),onUnmountAutoFocus:i,children:m.jsx(vf,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:u,onPointerDownOutside:f,onFocusOutside:l,onInteractOutside:p,onDismiss:h,children:m.jsx(Ss,{asChild:!0,...E,dir:y.dir,orientation:"vertical",loop:r,currentTabStopId:C,onCurrentTabStopIdChange:k,onEntryFocus:K(c,P=>{y.isUsingKeyboardRef.current||P.preventDefault()}),preventScrollOnEntryFocus:!0,children:m.jsx(so,{role:"menu","aria-orientation":"vertical","data-state":Vf(v.open),"data-radix-menu-content":"",dir:y.dir,...w,...g,ref:R,style:{outline:"none",...g.style},onKeyDown:K(g.onKeyDown,P=>{const H=P.target.closest("[data-radix-menu-content]")===P.currentTarget,T=P.ctrlKey||P.altKey||P.metaKey,j=P.key.length===1;H&&(P.key==="Tab"&&P.preventDefault(),!T&&j&&O(P.key));const z=S.current;if(P.target!==z||!_E.includes(P.key))return;P.preventDefault();const G=M().filter(W=>!W.disabled).map(W=>W.ref.current);Cf.includes(P.key)&&G.reverse(),eC(G)}),onBlur:K(e.onBlur,P=>{P.currentTarget.contains(P.target)||(window.clearTimeout(A.current),I.current="")}),onPointerMove:K(e.onPointerMove,Qn(P=>{const Y=P.target,H=$.current!==P.clientX;if(P.currentTarget.contains(Y)&&H){const T=P.clientX>$.current?"right":"left";B.current=T,$.current=P.clientX}}))})})})})})})});Tf.displayName=rt;var UE="MenuGroup",ks=d.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return m.jsx(J.div,{role:"group",...r,ref:t})});ks.displayName=UE;var GE="MenuLabel",Pf=d.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return m.jsx(J.div,{...r,ref:t})});Pf.displayName=GE;var Zr="MenuItem",Zi="menu.itemSelect",Co=d.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...o}=e,a=d.useRef(null),i=wr(Zr,e.__scopeMenu),s=Ms(Zr,e.__scopeMenu),c=fe(t,a),u=d.useRef(!1),f=()=>{const l=a.current;if(!n&&l){const p=new CustomEvent(Zi,{bubbles:!0,cancelable:!0});l.addEventListener(Zi,h=>r==null?void 0:r(h),{once:!0}),kn(l,p),p.defaultPrevented?u.current=!1:i.onClose()}};return m.jsx(_f,{...o,ref:c,disabled:n,onClick:K(e.onClick,f),onPointerDown:l=>{var p;(p=e.onPointerDown)==null||p.call(e,l),u.current=!0},onPointerUp:K(e.onPointerUp,l=>{var p;u.current||(p=l.currentTarget)==null||p.click()}),onKeyDown:K(e.onKeyDown,l=>{const p=s.searchRef.current!=="";n||p&&l.key===" "||Pa.includes(l.key)&&(l.currentTarget.click(),l.preventDefault())})})});Co.displayName=Zr;var _f=d.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:o,...a}=e,i=Ms(Zr,n),s=Mf(n),c=d.useRef(null),u=fe(t,c),[f,l]=d.useState(!1),[p,h]=d.useState("");return d.useEffect(()=>{const b=c.current;b&&h((b.textContent??"").trim())},[a.children]),m.jsx(Zn.ItemSlot,{scope:n,disabled:r,textValue:o??p,children:m.jsx(Es,{asChild:!0,...s,focusable:!r,children:m.jsx(J.div,{role:"menuitem","data-highlighted":f?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...a,ref:u,onPointerMove:K(e.onPointerMove,Qn(b=>{r?i.onItemLeave(b):(i.onItemEnter(b),b.defaultPrevented||b.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:K(e.onPointerLeave,Qn(b=>i.onItemLeave(b))),onFocus:K(e.onFocus,()=>l(!0)),onBlur:K(e.onBlur,()=>l(!1))})})})}),qE="MenuCheckboxItem",Af=d.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...o}=e;return m.jsx(Ff,{scope:e.__scopeMenu,checked:n,children:m.jsx(Co,{role:"menuitemcheckbox","aria-checked":Qr(n)?"mixed":n,...o,ref:t,"data-state":Ts(n),onSelect:K(o.onSelect,()=>r==null?void 0:r(Qr(n)?!0:!n),{checkForDefaultPrevented:!1})})})});Af.displayName=qE;var If="MenuRadioGroup",[VE,KE]=ln(If,{value:void 0,onValueChange:()=>{}}),jf=d.forwardRef((e,t)=>{const{value:n,onValueChange:r,...o}=e,a=je(r);return m.jsx(VE,{scope:e.__scopeMenu,value:n,onValueChange:a,children:m.jsx(ks,{...o,ref:t})})});jf.displayName=If;var $f="MenuRadioItem",Lf=d.forwardRef((e,t)=>{const{value:n,...r}=e,o=KE($f,e.__scopeMenu),a=n===o.value;return m.jsx(Ff,{scope:e.__scopeMenu,checked:a,children:m.jsx(Co,{role:"menuitemradio","aria-checked":a,...r,ref:t,"data-state":Ts(a),onSelect:K(r.onSelect,()=>{var i;return(i=o.onValueChange)==null?void 0:i.call(o,n)},{checkForDefaultPrevented:!1})})})});Lf.displayName=$f;var Rs="MenuItemIndicator",[Ff,XE]=ln(Rs,{checked:!1}),Wf=d.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...o}=e,a=XE(Rs,n);return m.jsx(at,{present:r||Qr(a.checked)||a.checked===!0,children:m.jsx(J.span,{...o,ref:t,"data-state":Ts(a.checked)})})});Wf.displayName=Rs;var ZE="MenuSeparator",Bf=d.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return m.jsx(J.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});Bf.displayName=ZE;var QE="MenuArrow",Yf=d.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=yr(n);return m.jsx(io,{...o,...r,ref:t})});Yf.displayName=QE;var Os="MenuSub",[JE,zf]=ln(Os),Hf=e=>{const{__scopeMenu:t,children:n,open:r=!1,onOpenChange:o}=e,a=Vt(Os,t),i=yr(t),[s,c]=d.useState(null),[u,f]=d.useState(null),l=je(o);return d.useEffect(()=>(a.open===!1&&l(!1),()=>l(!1)),[a.open,l]),m.jsx(sr,{...i,children:m.jsx(Nf,{scope:t,open:r,onOpenChange:l,content:u,onContentChange:f,children:m.jsx(JE,{scope:t,contentId:Pe(),triggerId:Pe(),trigger:s,onTriggerChange:c,children:n})})})};Hf.displayName=Os;var Hn="MenuSubTrigger",Uf=d.forwardRef((e,t)=>{const n=Vt(Hn,e.__scopeMenu),r=wr(Hn,e.__scopeMenu),o=zf(Hn,e.__scopeMenu),a=Ms(Hn,e.__scopeMenu),i=d.useRef(null),{pointerGraceTimerRef:s,onPointerGraceIntentChange:c}=a,u={__scopeMenu:e.__scopeMenu},f=d.useCallback(()=>{i.current&&window.clearTimeout(i.current),i.current=null},[]);return d.useEffect(()=>f,[f]),d.useEffect(()=>{const l=s.current;return()=>{window.clearTimeout(l),c(null)}},[s,c]),m.jsx(Cs,{asChild:!0,...u,children:m.jsx(_f,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":o.contentId,"data-state":Vf(n.open),...e,ref:Nt(t,o.onTriggerChange),onClick:l=>{var p;(p=e.onClick)==null||p.call(e,l),!(e.disabled||l.defaultPrevented)&&(l.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:K(e.onPointerMove,Qn(l=>{a.onItemEnter(l),!l.defaultPrevented&&!e.disabled&&!n.open&&!i.current&&(a.onPointerGraceIntentChange(null),i.current=window.setTimeout(()=>{n.onOpenChange(!0),f()},100))})),onPointerLeave:K(e.onPointerLeave,Qn(l=>{var h,b;f();const p=(h=n.content)==null?void 0:h.getBoundingClientRect();if(p){const g=(b=n.content)==null?void 0:b.dataset.side,v=g==="right",y=v?-5:5,w=p[v?"left":"right"],E=p[v?"right":"left"];a.onPointerGraceIntentChange({area:[{x:l.clientX+y,y:l.clientY},{x:w,y:p.top},{x:E,y:p.top},{x:E,y:p.bottom},{x:w,y:p.bottom}],side:g}),window.clearTimeout(s.current),s.current=window.setTimeout(()=>a.onPointerGraceIntentChange(null),300)}else{if(a.onTriggerLeave(l),l.defaultPrevented)return;a.onPointerGraceIntentChange(null)}})),onKeyDown:K(e.onKeyDown,l=>{var h;const p=a.searchRef.current!=="";e.disabled||p&&l.key===" "||AE[r.dir].includes(l.key)&&(n.onOpenChange(!0),(h=n.content)==null||h.focus(),l.preventDefault())})})})});Uf.displayName=Hn;var Gf="MenuSubContent",qf=d.forwardRef((e,t)=>{const n=Rf(rt,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,a=Vt(rt,e.__scopeMenu),i=wr(rt,e.__scopeMenu),s=zf(Gf,e.__scopeMenu),c=d.useRef(null),u=fe(t,c);return m.jsx(Zn.Provider,{scope:e.__scopeMenu,children:m.jsx(at,{present:r||a.open,children:m.jsx(Zn.Slot,{scope:e.__scopeMenu,children:m.jsx(Ns,{id:s.contentId,"aria-labelledby":s.triggerId,...o,ref:u,align:"start",side:i.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:f=>{var l;i.isUsingKeyboardRef.current&&((l=c.current)==null||l.focus()),f.preventDefault()},onCloseAutoFocus:f=>f.preventDefault(),onFocusOutside:K(e.onFocusOutside,f=>{f.target!==s.trigger&&a.onOpenChange(!1)}),onEscapeKeyDown:K(e.onEscapeKeyDown,f=>{i.onClose(),f.preventDefault()}),onKeyDown:K(e.onKeyDown,f=>{var h;const l=f.currentTarget.contains(f.target),p=IE[i.dir].includes(f.key);l&&p&&(a.onOpenChange(!1),(h=s.trigger)==null||h.focus(),f.preventDefault())})})})})})});qf.displayName=Gf;function Vf(e){return e?"open":"closed"}function Qr(e){return e==="indeterminate"}function Ts(e){return Qr(e)?"indeterminate":e?"checked":"unchecked"}function eC(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function tC(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function nC(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 i=tC(e,Math.max(a,0));o.length===1&&(i=i.filter(u=>u!==n));const c=i.find(u=>u.toLowerCase().startsWith(o.toLowerCase()));return c!==n?c:void 0}function rC(e,t){const{x:n,y:r}=e;let o=!1;for(let a=0,i=t.length-1;a<t.length;i=a++){const s=t[a],c=t[i],u=s.x,f=s.y,l=c.x,p=c.y;f>r!=p>r&&n<(l-u)*(r-f)/(p-f)+u&&(o=!o)}return o}function oC(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return rC(n,t)}function Qn(e){return t=>t.pointerType==="mouse"?e(t):void 0}var aC=kf,sC=Cs,iC=Of,cC=Tf,lC=ks,uC=Pf,dC=Co,fC=Af,mC=jf,pC=Lf,hC=Wf,gC=Bf,vC=Yf,bC=Hf,yC=Uf,wC=qf,Do="DropdownMenu",[xC,kM]=Ge(Do,[Df]),qe=Df(),[SC,Kf]=xC(Do),Xf=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:o,defaultOpen:a,onOpenChange:i,modal:s=!0}=e,c=qe(t),u=d.useRef(null),[f,l]=ot({prop:o,defaultProp:a??!1,onChange:i,caller:Do});return m.jsx(SC,{scope:t,triggerId:Pe(),triggerRef:u,contentId:Pe(),open:f,onOpenChange:l,onOpenToggle:d.useCallback(()=>l(p=>!p),[l]),modal:s,children:m.jsx(aC,{...c,open:f,onOpenChange:l,dir:r,modal:s,children:n})})};Xf.displayName=Do;var Zf="DropdownMenuTrigger",Qf=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...o}=e,a=Kf(Zf,n),i=qe(n);return m.jsx(sC,{asChild:!0,...i,children:m.jsx(J.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:Nt(t,a.triggerRef),onPointerDown:K(e.onPointerDown,s=>{!r&&s.button===0&&s.ctrlKey===!1&&(a.onOpenToggle(),a.open||s.preventDefault())}),onKeyDown:K(e.onKeyDown,s=>{r||(["Enter"," "].includes(s.key)&&a.onOpenToggle(),s.key==="ArrowDown"&&a.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(s.key)&&s.preventDefault())})})})});Qf.displayName=Zf;var EC="DropdownMenuPortal",Jf=e=>{const{__scopeDropdownMenu:t,...n}=e,r=qe(t);return m.jsx(iC,{...r,...n})};Jf.displayName=EC;var em="DropdownMenuContent",tm=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Kf(em,n),a=qe(n),i=d.useRef(!1);return m.jsx(cC,{id:o.contentId,"aria-labelledby":o.triggerId,...a,...r,ref:t,onCloseAutoFocus:K(e.onCloseAutoFocus,s=>{var c;i.current||(c=o.triggerRef.current)==null||c.focus(),i.current=!1,s.preventDefault()}),onInteractOutside:K(e.onInteractOutside,s=>{const c=s.detail.originalEvent,u=c.button===0&&c.ctrlKey===!0,f=c.button===2||u;(!o.modal||f)&&(i.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)"}})});tm.displayName=em;var CC="DropdownMenuGroup",nm=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=qe(n);return m.jsx(lC,{...o,...r,ref:t})});nm.displayName=CC;var DC="DropdownMenuLabel",rm=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=qe(n);return m.jsx(uC,{...o,...r,ref:t})});rm.displayName=DC;var MC="DropdownMenuItem",om=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=qe(n);return m.jsx(dC,{...o,...r,ref:t})});om.displayName=MC;var NC="DropdownMenuCheckboxItem",am=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=qe(n);return m.jsx(fC,{...o,...r,ref:t})});am.displayName=NC;var kC="DropdownMenuRadioGroup",sm=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=qe(n);return m.jsx(mC,{...o,...r,ref:t})});sm.displayName=kC;var RC="DropdownMenuRadioItem",im=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=qe(n);return m.jsx(pC,{...o,...r,ref:t})});im.displayName=RC;var OC="DropdownMenuItemIndicator",cm=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=qe(n);return m.jsx(hC,{...o,...r,ref:t})});cm.displayName=OC;var TC="DropdownMenuSeparator",lm=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=qe(n);return m.jsx(gC,{...o,...r,ref:t})});lm.displayName=TC;var PC="DropdownMenuArrow",_C=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=qe(n);return m.jsx(vC,{...o,...r,ref:t})});_C.displayName=PC;var AC=e=>{const{__scopeDropdownMenu:t,children:n,open:r,onOpenChange:o,defaultOpen:a}=e,i=qe(t),[s,c]=ot({prop:r,defaultProp:a??!1,onChange:o,caller:"DropdownMenuSub"});return m.jsx(bC,{...i,open:s,onOpenChange:c,children:n})},IC="DropdownMenuSubTrigger",um=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=qe(n);return m.jsx(yC,{...o,...r,ref:t})});um.displayName=IC;var jC="DropdownMenuSubContent",dm=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=qe(n);return m.jsx(wC,{...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)"}})});dm.displayName=jC;var $C=Xf,fm=Qf,LC=Jf,mm=tm,FC=nm,pm=rm,hm=om,gm=am,WC=sm,vm=im,bm=cm,ym=lm,BC=AC,wm=um,xm=dm;const YC=$C,Sm=d.forwardRef(({onClick:e,onMouseDown:t,onPointerDown:n,...r},o)=>{const a=c=>{c.stopPropagation(),e==null||e(c)},i=c=>{c.stopPropagation(),t==null||t(c)},s=c=>{c.stopPropagation(),n==null||n(c)};return m.jsx(fm,{ref:o,onClick:a,onMouseDown:i,onPointerDown:s,...r})});Sm.displayName=fm.displayName;const zC=FC,HC=BC,UC=WC,Em=d.forwardRef(({className:e,inset:t,children:n,...r},o)=>m.jsxs(wm,{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,m.jsx(La,{className:"ml-auto"})]}));Em.displayName=wm.displayName;const Cm=d.forwardRef(({className:e,...t},n)=>m.jsx(xm,{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}));Cm.displayName=xm.displayName;const Dm=d.forwardRef(({className:e,sideOffset:t=4,...n},r)=>m.jsx(LC,{children:m.jsx(mm,{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})}));Dm.displayName=mm.displayName;const Mm=d.forwardRef(({className:e,inset:t,...n},r)=>m.jsx(hm,{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}));Mm.displayName=hm.displayName;const Nm=d.forwardRef(({className:e,children:t,checked:n,...r},o)=>m.jsxs(gm,{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:[m.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:m.jsx(bm,{children:m.jsx(tr,{className:"h-4 w-4"})})}),t]}));Nm.displayName=gm.displayName;const km=d.forwardRef(({className:e,children:t,...n},r)=>m.jsxs(vm,{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:[m.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:m.jsx(bm,{children:m.jsx(Dc,{className:"h-2 w-2 fill-current"})})}),t]}));km.displayName=vm.displayName;const Rm=d.forwardRef(({className:e,inset:t,...n},r)=>m.jsx(pm,{ref:r,className:F("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...n}));Rm.displayName=pm.displayName;const Om=d.forwardRef(({className:e,...t},n)=>m.jsx(ym,{ref:n,className:F("-mx-1 my-1 h-px bg-muted",e),...t}));Om.displayName=ym.displayName;const Tm=({className:e,...t})=>m.jsx("span",{className:F("ml-auto text-xs tracking-widest opacity-60",e),...t});Tm.displayName="DropdownMenuShortcut";var Ps="Radio",[GC,Pm]=Ge(Ps),[qC,VC]=GC(Ps),_m=d.forwardRef((e,t)=>{const{__scopeRadio:n,name:r,checked:o=!1,required:a,disabled:i,value:s="on",onCheck:c,form:u,...f}=e,[l,p]=d.useState(null),h=fe(t,v=>p(v)),b=d.useRef(!1),g=l?u||!!l.closest("form"):!0;return m.jsxs(qC,{scope:n,checked:o,disabled:i,children:[m.jsx(J.button,{type:"button",role:"radio","aria-checked":o,"data-state":$m(o),"data-disabled":i?"":void 0,disabled:i,value:s,...f,ref:h,onClick:K(e.onClick,v=>{o||c==null||c(),g&&(b.current=v.isPropagationStopped(),b.current||v.stopPropagation())})}),g&&m.jsx(jm,{control:l,bubbles:!b.current,name:r,value:s,checked:o,required:a,disabled:i,form:u,style:{transform:"translateX(-100%)"}})]})});_m.displayName=Ps;var Am="RadioIndicator",Im=d.forwardRef((e,t)=>{const{__scopeRadio:n,forceMount:r,...o}=e,a=VC(Am,n);return m.jsx(at,{present:r||a.checked,children:m.jsx(J.span,{"data-state":$m(a.checked),"data-disabled":a.disabled?"":void 0,...o,ref:t})})});Im.displayName=Am;var KC="RadioBubbleInput",jm=d.forwardRef(({__scopeRadio:e,control:t,checked:n,bubbles:r=!0,...o},a)=>{const i=d.useRef(null),s=fe(i,a),c=es(n),u=qa(t);return d.useEffect(()=>{const f=i.current;if(!f)return;const l=window.HTMLInputElement.prototype,h=Object.getOwnPropertyDescriptor(l,"checked").set;if(c!==n&&h){const b=new Event("click",{bubbles:r});h.call(f,n),f.dispatchEvent(b)}},[c,n,r]),m.jsx(J.input,{type:"radio","aria-hidden":!0,defaultChecked:n,...o,tabIndex:-1,ref:s,style:{...o.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});jm.displayName=KC;function $m(e){return e?"checked":"unchecked"}var XC=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],Mo="RadioGroup",[ZC,RM]=Ge(Mo,[_n,Pm]),Lm=_n(),Fm=Pm(),[QC,JC]=ZC(Mo),Wm=d.forwardRef((e,t)=>{const{__scopeRadioGroup:n,name:r,defaultValue:o,value:a,required:i=!1,disabled:s=!1,orientation:c,dir:u,loop:f=!0,onValueChange:l,...p}=e,h=Lm(n),b=dr(u),[g,v]=ot({prop:a,defaultProp:o??null,onChange:l,caller:Mo});return m.jsx(QC,{scope:n,name:r,required:i,disabled:s,value:g,onValueChange:v,children:m.jsx(Ss,{asChild:!0,...h,orientation:c,dir:b,loop:f,children:m.jsx(J.div,{role:"radiogroup","aria-required":i,"aria-orientation":c,"data-disabled":s?"":void 0,dir:b,...p,ref:t})})})});Wm.displayName=Mo;var Bm="RadioGroupItem",Ym=d.forwardRef((e,t)=>{const{__scopeRadioGroup:n,disabled:r,...o}=e,a=JC(Bm,n),i=a.disabled||r,s=Lm(n),c=Fm(n),u=d.useRef(null),f=fe(t,u),l=a.value===o.value,p=d.useRef(!1);return d.useEffect(()=>{const h=g=>{XC.includes(g.key)&&(p.current=!0)},b=()=>p.current=!1;return document.addEventListener("keydown",h),document.addEventListener("keyup",b),()=>{document.removeEventListener("keydown",h),document.removeEventListener("keyup",b)}},[]),m.jsx(Es,{asChild:!0,...s,focusable:!i,active:l,children:m.jsx(_m,{disabled:i,required:a.required,checked:l,...c,...o,name:a.name,ref:f,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())})})})});Ym.displayName=Bm;var eD="RadioGroupIndicator",zm=d.forwardRef((e,t)=>{const{__scopeRadioGroup:n,...r}=e,o=Fm(n);return m.jsx(Im,{...o,...r,ref:t})});zm.displayName=eD;var Hm=Wm,Um=Ym,tD=zm;const Gm=d.forwardRef(({className:e,...t},n)=>m.jsx(Hm,{ref:n,className:F("grid gap-2",e),...t}));Gm.displayName=Hm.displayName;const qm=d.forwardRef(({className:e,...t},n)=>m.jsx(Um,{ref:n,className:F(`
216
+ ){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 FS(){const e=navigator.userAgent;return typeof window<"u"&&(/Firefox/.test(e)&&/Mobile/.test(e)||/FxiOS/.test(e))}function WS(){return xs(/^Mac/)}function BS(){return xs(/^iPhone/)}function Hi(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}function YS(){return xs(/^iPad/)||WS()&&navigator.maxTouchPoints>1}function Zd(){return BS()||YS()}function xs(e){return typeof window<"u"&&window.navigator!=null?e.test(window.navigator.platform):void 0}const zS=24,HS=typeof window<"u"?x.useLayoutEffect:x.useEffect;function Ui(...e){return(...t)=>{for(let n of e)typeof n=="function"&&n(...t)}}const ea=typeof document<"u"&&window.visualViewport;function Gi(e){let t=window.getComputedStyle(e);return/(auto|scroll)/.test(t.overflow+t.overflowX+t.overflowY)}function Qd(e){for(Gi(e)&&(e=e.parentElement);e&&!Gi(e);)e=e.parentElement;return e||document.scrollingElement||document.documentElement}const US=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);let Or=0,ta;function GS(e={}){let{isDisabled:t}=e;HS(()=>{if(!t)return Or++,Or===1&&Zd()&&(ta=qS()),()=>{Or--,Or===0&&(ta==null||ta())}},[t])}function qS(){let e,t=0,n=l=>{e=Qd(l.target),!(e===document.documentElement&&e===document.body)&&(t=l.changedTouches[0].pageY)},r=l=>{if(!e||e===document.documentElement||e===document.body){l.preventDefault();return}let p=l.changedTouches[0].pageY,h=e.scrollTop,b=e.scrollHeight-e.clientHeight;b!==0&&((h<=0&&p>t||h>=b&&p<t)&&l.preventDefault(),t=p)},o=l=>{let p=l.target;ka(p)&&p!==document.activeElement&&(l.preventDefault(),p.style.transform="translateY(-2000px)",p.focus(),requestAnimationFrame(()=>{p.style.transform=""}))},a=l=>{let p=l.target;ka(p)&&(p.style.transform="translateY(-2000px)",requestAnimationFrame(()=>{p.style.transform="",ea&&(ea.height<window.innerHeight?requestAnimationFrame(()=>{qi(p)}):ea.addEventListener("resize",()=>qi(p),{once:!0}))}))},i=()=>{window.scrollTo(0,0)},s=window.pageXOffset,c=window.pageYOffset,u=Ui(VS(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`));window.scrollTo(0,0);let f=Ui(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",i));return()=>{u(),f(),window.scrollTo(s,c)}}function VS(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 qi(e){let t=document.scrollingElement||document.documentElement;for(;e&&e!==t;){let n=Qd(e);if(n!==document.documentElement&&n!==document.body&&n!==e){let r=n.getBoundingClientRect().top,o=e.getBoundingClientRect().top,a=e.getBoundingClientRect().bottom;const i=n.getBoundingClientRect().bottom+zS;a>i&&(n.scrollTop+=o-r)}e=n.parentElement}}function ka(e){return e instanceof HTMLInputElement&&!US.has(e.type)||e instanceof HTMLTextAreaElement||e instanceof HTMLElement&&e.isContentEditable}function KS(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function XS(...e){return t=>e.forEach(n=>KS(n,t))}function Jd(...e){return d.useCallback(XS(...e),e)}const ef=new WeakMap;function Fe(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&&ef.set(e,r)}function ZS(e,t){if(!e||!(e instanceof HTMLElement))return;let n=ef.get(e);n&&(e.style[t]=n[t])}const Ie=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(", ")[Ie(t)?13:12]):(o=r.match(/^matrix\((.+)\)$/),o?parseFloat(o[1].split(", ")[Ie(t)?5:4]):null)}function QS(e){return 8*(Math.log(e+1)-2)}function na(e,t){if(!e)return()=>{};const n=e.style.cssText;return Object.assign(e.style,t),()=>{e.style.cssText=n}}function JS(...e){return(...t)=>{for(const n of e)typeof n=="function"&&n(...t)}}const Ne={DURATION:.5,EASE:[.32,.72,0,1]},tf=.4,eE=.25,tE=100,nf=8,Qt=16,Ra=26,ra="vaul-dragging";function rf(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 nE({defaultProp:e,onChange:t}){const n=x.useState(e),[r]=n,o=x.useRef(r),a=rf(t);return x.useEffect(()=>{o.current!==r&&(a(r),o.current=r)},[r,o,a]),n}function of({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=nE({defaultProp:t,onChange:n}),a=e!==void 0,i=a?e:r,s=rf(n),c=x.useCallback(u=>{if(a){const l=typeof u=="function"?u(e):u;l!==e&&s(l)}else o(u)},[a,e,o,s]);return[i,c]}function rE({activeSnapPointProp:e,setActiveSnapPointProp:t,snapPoints:n,drawerRef:r,overlayRef:o,fadeFromIndex:a,onSnapPointChange:i,direction:s="bottom",container:c,snapToSequentialPoint:u}){const[f,l]=of({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 S(){h({innerWidth:window.innerWidth,innerHeight:window.innerHeight})}return window.addEventListener("resize",S),()=>window.removeEventListener("resize",S)},[]);const b=x.useMemo(()=>f===(n==null?void 0:n[n.length-1])||null,[n,f]),g=x.useMemo(()=>{var S;return(S=n==null?void 0:n.findIndex(k=>k===f))!=null?S:null},[n,f]),v=n&&n.length>0&&(a||a===0)&&!Number.isNaN(a)&&n[a]===f||!n,w=x.useMemo(()=>{const S=c?{width:c.getBoundingClientRect().width,height:c.getBoundingClientRect().height}:typeof window<"u"?{width:window.innerWidth,height:window.innerHeight}:{width:0,height:0};var k;return(k=n==null?void 0:n.map(I=>{const A=typeof I=="string";let W=0;if(A&&(W=parseInt(I,10)),Ie(s)){const B=A?W:p?I*S.height:0;return p?s==="bottom"?S.height-B:-S.height+B:B}const G=A?W:p?I*S.width:0;return p?s==="right"?S.width-G:-S.width+G:G}))!=null?k:[]},[n,p,c]),y=x.useMemo(()=>g!==null?w==null?void 0:w[g]:null,[w,g]),E=x.useCallback(S=>{var k;const I=(k=w==null?void 0:w.findIndex(A=>A===S))!=null?k:null;i(I),Fe(r.current,{transition:`transform ${Ne.DURATION}s cubic-bezier(${Ne.EASE.join(",")})`,transform:Ie(s)?`translate3d(0, ${S}px, 0)`:`translate3d(${S}px, 0, 0)`}),w&&I!==w.length-1&&a!==void 0&&I!==a&&I<a?Fe(o.current,{transition:`opacity ${Ne.DURATION}s cubic-bezier(${Ne.EASE.join(",")})`,opacity:"0"}):Fe(o.current,{transition:`opacity ${Ne.DURATION}s cubic-bezier(${Ne.EASE.join(",")})`,opacity:"1"}),l(n==null?void 0:n[Math.max(I,0)])},[r.current,n,w,a,o,l]);x.useEffect(()=>{if(f||e){var S;const k=(S=n==null?void 0:n.findIndex(I=>I===e||I===f))!=null?S:-1;w&&k!==-1&&typeof w[k]=="number"&&E(w[k])}},[f,e,n,w,E]);function M({draggedDistance:S,closeDrawer:k,velocity:I,dismissible:A}){if(a===void 0)return;const W=s==="bottom"||s==="right"?(y??0)-S:(y??0)+S,G=g===a-1,B=g===0,$=S>0;if(G&&Fe(o.current,{transition:`opacity ${Ne.DURATION}s cubic-bezier(${Ne.EASE.join(",")})`}),!u&&I>2&&!$){A?k():E(w[0]);return}if(!u&&I>2&&$&&w&&n){E(w[n.length-1]);return}const O=w==null?void 0:w.reduce((_,N)=>typeof _!="number"||typeof N!="number"?_:Math.abs(N-W)<Math.abs(_-W)?N:_),D=Ie(s)?window.innerHeight:window.innerWidth;if(I>tf&&Math.abs(S)<D*.4){const _=$?1:-1;if(_>0&&b&&n){E(w[n.length-1]);return}if(B&&_<0&&A&&k(),g===null)return;E(w[g+_]);return}E(O)}function C({draggedDistance:S}){if(y===null)return;const k=s==="bottom"||s==="right"?y-S:y+S;(s==="bottom"||s==="right")&&k<w[w.length-1]||(s==="top"||s==="left")&&k>w[w.length-1]||Fe(r.current,{transform:Ie(s)?`translate3d(0, ${k}px, 0)`:`translate3d(${k}px, 0, 0)`})}function R(S,k){if(!n||typeof g!="number"||!w||a===void 0)return null;const I=g===a-1;if(g>=a&&k)return 0;if(I&&!k)return 1;if(!v&&!I)return null;const W=I?g+1:g-1,G=I?w[W]-w[W-1]:w[W+1]-w[W],B=S/Math.abs(G);return I?1-B:B}return{isLastSnapPoint:b,activeSnapPoint:f,shouldFade:v,getPercentageDragged:R,setActiveSnapPoint:l,activeSnapPointIndex:g,onRelease:M,onDrag:C,snapPointsOffset:w}}const oE=()=>()=>{};function aE(){const{direction:e,isOpen:t,shouldScaleBackground:n,setBackgroundColorOnScale:r,noBodyStyles:o}=hr(),a=x.useRef(null),i=x.useMemo(()=>document.body.style.backgroundColor,[]);function s(){return(window.innerWidth-Ra)/window.innerWidth}x.useEffect(()=>{if(t&&n){a.current&&clearTimeout(a.current);const c=document.querySelector("[data-vaul-drawer-wrapper]")||document.querySelector("[vaul-drawer-wrapper]");if(!c)return;JS(r&&!o?na(document.body,{background:"black"}):oE,na(c,{transformOrigin:Ie(e)?"top":"left",transitionProperty:"transform, border-radius",transitionDuration:`${Ne.DURATION}s`,transitionTimingFunction:`cubic-bezier(${Ne.EASE.join(",")})`}));const u=na(c,{borderRadius:`${nf}px`,overflow:"hidden",...Ie(e)?{transform:`scale(${s()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`}:{transform:`scale(${s()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`}});return()=>{u(),a.current=window.setTimeout(()=>{i?document.body.style.background=i:document.body.style.removeProperty("background")},Ne.DURATION*1e3)}}},[t,n,i])}let Bn=null;function sE({isOpen:e,modal:t,nested:n,hasBeenOpened:r,preventScrollRestoration:o,noBodyStyles:a}){const[i,s]=x.useState(()=>typeof window<"u"?window.location.href:""),c=x.useRef(0),u=x.useCallback(()=>{if(Hi()&&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:l,innerHeight:p}=window;document.body.style.setProperty("position","fixed","important"),Object.assign(document.body.style,{top:`${-c.current}px`,left:`${-l}px`,right:"0px",height:"auto"}),window.setTimeout(()=>window.requestAnimationFrame(()=>{const h=p-window.innerHeight;h&&c.current>=p&&(document.body.style.top=`${-(c.current+h)}px`)}),300)}},[e]),f=x.useCallback(()=>{if(Hi()&&Bn!==null&&!a){const l=-parseInt(document.body.style.top,10),p=-parseInt(document.body.style.left,10);Object.assign(document.body.style,Bn),window.requestAnimationFrame(()=>{if(o&&i!==window.location.href){s(window.location.href);return}window.scrollTo(p,l)}),Bn=null}},[i]);return x.useEffect(()=>{function l(){c.current=window.scrollY}return l(),window.addEventListener("scroll",l),()=>{window.removeEventListener("scroll",l)}},[]),x.useEffect(()=>{if(t)return()=>{typeof document>"u"||document.querySelector("[data-vaul-drawer]")||f()}},[t,f]),x.useEffect(()=>{n||!r||(e?(!window.matchMedia("(display-mode: standalone)").matches&&u(),t||window.setTimeout(()=>{f()},500)):f())},[e,r,i,t,n,u,f]),{restorePositionSetting:f}}function iE({open:e,onOpenChange:t,children:n,onDrag:r,onRelease:o,snapPoints:a,shouldScaleBackground:i=!1,setBackgroundColorOnScale:s=!0,closeThreshold:c=eE,scrollLockTimeout:u=tE,dismissible:f=!0,handleOnly:l=!1,fadeFromIndex:p=a&&a.length-1,activeSnapPoint:h,setActiveSnapPoint:b,fixed:g,modal:v=!0,onClose:w,nested:y,noBodyStyles:E=!1,direction:M="bottom",defaultOpen:C=!1,disablePreventScroll:R=!0,snapToSequentialPoint:S=!1,preventScrollRestoration:k=!1,repositionInputs:I=!0,onAnimationEnd:A,container:W,autoFocus:G=!1}){var B,$;const[O=!1,D]=of({defaultProp:C,prop:e,onChange:V=>{t==null||t(V),!V&&!y&&pe(),setTimeout(()=>{A==null||A(V)},Ne.DURATION*1e3),V&&!v&&typeof window<"u"&&window.requestAnimationFrame(()=>{document.body.style.pointerEvents="auto"}),V||(document.body.style.pointerEvents="auto")}}),[_,N]=x.useState(!1),[P,Y]=x.useState(!1),[H,T]=x.useState(!1),j=x.useRef(null),z=x.useRef(null),U=x.useRef(null),q=x.useRef(null),F=x.useRef(null),X=x.useRef(!1),Z=x.useRef(null),Q=x.useRef(0),ee=x.useRef(!1),ae=x.useRef(!C),be=x.useRef(0),te=x.useRef(null),Te=x.useRef(((B=te.current)==null?void 0:B.getBoundingClientRect().height)||0),$e=x.useRef((($=te.current)==null?void 0:$.getBoundingClientRect().width)||0),Ce=x.useRef(0),Ve=x.useCallback(V=>{a&&V===Ye.length-1&&(z.current=new Date)},[]),{activeSnapPoint:De,activeSnapPointIndex:Be,setActiveSnapPoint:Pt,onRelease:_e,snapPointsOffset:Ye,onDrag:St,shouldFade:_t,getPercentageDragged:ue}=rE({snapPoints:a,activeSnapPointProp:h,setActiveSnapPointProp:b,drawerRef:te,fadeFromIndex:p,overlayRef:j,onSnapPointChange:Ve,direction:M,container:W,snapToSequentialPoint:S});GS({isDisabled:!O||P||!v||H||!_||!I||!R});const{restorePositionSetting:pe}=sE({isOpen:O,modal:v,nested:y??!1,hasBeenOpened:_,preventScrollRestoration:k,noBodyStyles:E});function ye(){return(window.innerWidth-Ra)/window.innerWidth}function Ae(V){var ie,se;!f&&!a||te.current&&!te.current.contains(V.target)||(Te.current=((ie=te.current)==null?void 0:ie.getBoundingClientRect().height)||0,$e.current=((se=te.current)==null?void 0:se.getBoundingClientRect().width)||0,Y(!0),U.current=new Date,Zd()&&window.addEventListener("touchend",()=>X.current=!1,{once:!0}),V.target.setPointerCapture(V.pointerId),Q.current=Ie(M)?V.pageY:V.pageX)}function Me(V,ie){var se;let me=V;const ge=(se=window.getSelection())==null?void 0:se.toString(),oe=te.current?Tr(te.current,M):null,de=new Date;if(me.tagName==="SELECT"||me.hasAttribute("data-vaul-no-drag")||me.closest("[data-vaul-no-drag]"))return!1;if(M==="right"||M==="left")return!0;if(z.current&&de.getTime()-z.current.getTime()<500)return!1;if(oe!==null&&(M==="bottom"?oe>0:oe<0))return!0;if(ge&&ge.length>0)return!1;if(F.current&&de.getTime()-F.current.getTime()<u&&oe===0||ie)return F.current=de,!1;for(;me;){if(me.scrollHeight>me.clientHeight){if(me.scrollTop!==0)return F.current=new Date,!1;if(me.getAttribute("role")==="dialog")return!0}me=me.parentNode}return!0}function At(V){if(te.current&&P){const ie=M==="bottom"||M==="right"?1:-1,se=(Q.current-(Ie(M)?V.pageY:V.pageX))*ie,me=se>0,ge=a&&!f&&!me;if(ge&&Be===0)return;const oe=Math.abs(se),de=document.querySelector("[data-vaul-drawer-wrapper]"),ve=M==="bottom"||M==="top"?Te.current:$e.current;let le=oe/ve;const Xe=ue(oe,me);if(Xe!==null&&(le=Xe),ge&&le>=1||!X.current&&!Me(V.target,me))return;if(te.current.classList.add(ra),X.current=!0,Fe(te.current,{transition:"none"}),Fe(j.current,{transition:"none"}),a&&St({draggedDistance:se}),me&&!a){const Ee=QS(se),Qe=Math.min(Ee*-1,0)*ie;Fe(te.current,{transform:Ie(M)?`translate3d(0, ${Qe}px, 0)`:`translate3d(${Qe}px, 0, 0)`});return}const xe=1-le;if((_t||p&&Be===p-1)&&(r==null||r(V,le),Fe(j.current,{opacity:`${xe}`,transition:"none"},!0)),de&&j.current&&i){const Ee=Math.min(ye()+le*(1-ye()),1),Qe=8-le*8,ze=Math.max(0,14-le*14);Fe(de,{borderRadius:`${Qe}px`,transform:Ie(M)?`scale(${Ee}) translate3d(0, ${ze}px, 0)`:`scale(${Ee}) translate3d(${ze}px, 0, 0)`,transition:"none"},!0)}if(!a){const Ee=oe*ie;Fe(te.current,{transform:Ie(M)?`translate3d(0, ${Ee}px, 0)`:`translate3d(${Ee}px, 0, 0)`})}}}x.useEffect(()=>{window.requestAnimationFrame(()=>{ae.current=!0})},[]),x.useEffect(()=>{var V;function ie(){if(!te.current||!I)return;const se=document.activeElement;if(ka(se)||ee.current){var me;const ge=((me=window.visualViewport)==null?void 0:me.height)||0,oe=window.innerHeight;let de=oe-ge;const ve=te.current.getBoundingClientRect().height||0,le=ve>oe*.8;Ce.current||(Ce.current=ve);const Xe=te.current.getBoundingClientRect().top;if(Math.abs(be.current-de)>60&&(ee.current=!ee.current),a&&a.length>0&&Ye&&Be){const xe=Ye[Be]||0;de+=xe}if(be.current=de,ve>ge||ee.current){const xe=te.current.getBoundingClientRect().height;let Ee=xe;xe>ge&&(Ee=ge-(le?Xe:Ra)),g?te.current.style.height=`${xe-Math.max(de,0)}px`:te.current.style.height=`${Math.max(Ee,ge-Xe)}px`}else FS()||(te.current.style.height=`${Ce.current}px`);a&&a.length>0&&!ee.current?te.current.style.bottom="0px":te.current.style.bottom=`${Math.max(de,0)}px`}}return(V=window.visualViewport)==null||V.addEventListener("resize",ie),()=>{var se;return(se=window.visualViewport)==null?void 0:se.removeEventListener("resize",ie)}},[Be,a,Ye]);function Ke(V){An(),w==null||w(),V||D(!1),setTimeout(()=>{a&&Pt(a[0])},Ne.DURATION*1e3)}function un(){if(!te.current)return;const V=document.querySelector("[data-vaul-drawer-wrapper]"),ie=Tr(te.current,M);Fe(te.current,{transform:"translate3d(0, 0, 0)",transition:`transform ${Ne.DURATION}s cubic-bezier(${Ne.EASE.join(",")})`}),Fe(j.current,{transition:`opacity ${Ne.DURATION}s cubic-bezier(${Ne.EASE.join(",")})`,opacity:"1"}),i&&ie&&ie>0&&O&&Fe(V,{borderRadius:`${nf}px`,overflow:"hidden",...Ie(M)?{transform:`scale(${ye()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`,transformOrigin:"top"}:{transform:`scale(${ye()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`,transformOrigin:"left"},transitionProperty:"transform, border-radius",transitionDuration:`${Ne.DURATION}s`,transitionTimingFunction:`cubic-bezier(${Ne.EASE.join(",")})`},!0)}function An(){!P||!te.current||(te.current.classList.remove(ra),X.current=!1,Y(!1),q.current=new Date)}function dn(V){if(!P||!te.current)return;te.current.classList.remove(ra),X.current=!1,Y(!1),q.current=new Date;const ie=Tr(te.current,M);if(!V||!Me(V.target,!1)||!ie||Number.isNaN(ie)||U.current===null)return;const se=q.current.getTime()-U.current.getTime(),me=Q.current-(Ie(M)?V.pageY:V.pageX),ge=Math.abs(me)/se;if(ge>.05&&(T(!0),setTimeout(()=>{T(!1)},200)),a){_e({draggedDistance:me*(M==="bottom"||M==="right"?1:-1),closeDrawer:Ke,velocity:ge,dismissible:f}),o==null||o(V,!0);return}if(M==="bottom"||M==="right"?me>0:me<0){un(),o==null||o(V,!0);return}if(ge>tf){Ke(),o==null||o(V,!1);return}var oe;const de=Math.min((oe=te.current.getBoundingClientRect().height)!=null?oe:0,window.innerHeight);var ve;const le=Math.min((ve=te.current.getBoundingClientRect().width)!=null?ve:0,window.innerWidth),Xe=M==="left"||M==="right";if(Math.abs(ie)>=(Xe?le:de)*c){Ke(),o==null||o(V,!1);return}o==null||o(V,!0),un()}x.useEffect(()=>(O&&(Fe(document.documentElement,{scrollBehavior:"auto"}),z.current=new Date),()=>{ZS(document.documentElement,"scrollBehavior")}),[O]);function Kt(V){const ie=V?(window.innerWidth-Qt)/window.innerWidth:1,se=V?-Qt:0;Z.current&&window.clearTimeout(Z.current),Fe(te.current,{transition:`transform ${Ne.DURATION}s cubic-bezier(${Ne.EASE.join(",")})`,transform:Ie(M)?`scale(${ie}) translate3d(0, ${se}px, 0)`:`scale(${ie}) translate3d(${se}px, 0, 0)`}),!V&&te.current&&(Z.current=setTimeout(()=>{const me=Tr(te.current,M);Fe(te.current,{transition:"none",transform:Ie(M)?`translate3d(0, ${me}px, 0)`:`translate3d(${me}px, 0, 0)`})},500))}function In(V,ie){if(ie<0)return;const se=(window.innerWidth-Qt)/window.innerWidth,me=se+ie*(1-se),ge=-Qt+ie*Qt;Fe(te.current,{transform:Ie(M)?`scale(${me}) translate3d(0, ${ge}px, 0)`:`scale(${me}) translate3d(${ge}px, 0, 0)`,transition:"none"})}function It(V,ie){const se=Ie(M)?window.innerHeight:window.innerWidth,me=ie?(se-Qt)/se:1,ge=ie?-Qt:0;ie&&Fe(te.current,{transition:`transform ${Ne.DURATION}s cubic-bezier(${Ne.EASE.join(",")})`,transform:Ie(M)?`scale(${me}) translate3d(0, ${ge}px, 0)`:`scale(${me}) translate3d(${ge}px, 0, 0)`})}return x.useEffect(()=>{v||window.requestAnimationFrame(()=>{document.body.style.pointerEvents="auto"})},[v]),x.createElement(ls,{defaultOpen:C,onOpenChange:V=>{!f&&!V||(V?N(!0):Ke(!0),D(V))},open:O},x.createElement(Xd.Provider,{value:{activeSnapPoint:De,snapPoints:a,setActiveSnapPoint:Pt,drawerRef:te,overlayRef:j,onOpenChange:t,onPress:Ae,onRelease:dn,onDrag:At,dismissible:f,shouldAnimate:ae,handleOnly:l,isOpen:O,isDragging:P,shouldFade:_t,closeDrawer:Ke,onNestedDrag:In,onNestedOpenChange:Kt,onNestedRelease:It,keyboardIsOpen:ee,modal:v,snapPointsOffset:Ye,activeSnapPointIndex:Be,direction:M,shouldScaleBackground:i,setBackgroundColorOnScale:s,noBodyStyles:E,container:W,autoFocus:G}},n))}const af=x.forwardRef(function({...e},t){const{overlayRef:n,snapPoints:r,onRelease:o,shouldFade:a,isOpen:i,modal:s,shouldAnimate:c}=hr(),u=Jd(t,n),f=r&&r.length>0;if(!s)return null;const l=x.useCallback(p=>o(p),[o]);return x.createElement(yo,{onMouseUp:l,ref:u,"data-vaul-overlay":"","data-vaul-snap-points":i&&f?"true":"false","data-vaul-snap-points-overlay":i&&a?"true":"false","data-vaul-animate":c!=null&&c.current?"true":"false",...e})});af.displayName="Drawer.Overlay";const sf=x.forwardRef(function({onPointerDownOutside:e,style:t,onOpenAutoFocus:n,...r},o){const{drawerRef:a,onPress:i,onRelease:s,onDrag:c,keyboardIsOpen:u,snapPointsOffset:f,activeSnapPointIndex:l,modal:p,isOpen:h,direction:b,snapPoints:g,container:v,handleOnly:w,shouldAnimate:y,autoFocus:E}=hr(),[M,C]=x.useState(!1),R=Jd(o,a),S=x.useRef(null),k=x.useRef(null),I=x.useRef(!1),A=g&&g.length>0;aE();const W=(B,$,O=0)=>{if(I.current)return!0;const D=Math.abs(B.y),_=Math.abs(B.x),N=_>D,P=["bottom","right"].includes($)?1:-1;if($==="left"||$==="right"){if(!(B.x*P<0)&&_>=0&&_<=O)return N}else if(!(B.y*P<0)&&D>=0&&D<=O)return!N;return I.current=!0,!0};x.useEffect(()=>{A&&window.requestAnimationFrame(()=>{C(!0)})},[]);function G(B){S.current=null,I.current=!1,s(B)}return x.createElement(wo,{"data-vaul-drawer-direction":b,"data-vaul-drawer":"","data-vaul-delayed-snap-points":M?"true":"false","data-vaul-snap-points":h&&A?"true":"false","data-vaul-custom-container":v?"true":"false","data-vaul-animate":y!=null&&y.current?"true":"false",...r,ref:R,style:f&&f.length>0?{"--snap-point-height":`${f[l??0]}px`,...t}:t,onPointerDown:B=>{w||(r.onPointerDown==null||r.onPointerDown.call(r,B),S.current={x:B.pageX,y:B.pageY},i(B))},onOpenAutoFocus:B=>{n==null||n(B),E||B.preventDefault()},onPointerDownOutside:B=>{if(e==null||e(B),!p||B.defaultPrevented){B.preventDefault();return}u.current&&(u.current=!1)},onFocusOutside:B=>{if(!p){B.preventDefault();return}},onPointerMove:B=>{if(k.current=B,w||(r.onPointerMove==null||r.onPointerMove.call(r,B),!S.current))return;const $=B.pageY-S.current.y,O=B.pageX-S.current.x,D=B.pointerType==="touch"?10:2;W({x:O,y:$},b,D)?c(B):(Math.abs(O)>D||Math.abs($)>D)&&(S.current=null)},onPointerUp:B=>{r.onPointerUp==null||r.onPointerUp.call(r,B),S.current=null,I.current=!1,s(B)},onPointerOut:B=>{r.onPointerOut==null||r.onPointerOut.call(r,B),G(k.current)},onContextMenu:B=>{r.onContextMenu==null||r.onContextMenu.call(r,B),k.current&&G(k.current)}})});sf.displayName="Drawer.Content";const cE=250,lE=120,uE=x.forwardRef(function({preventCycle:e=!1,children:t,...n},r){const{closeDrawer:o,isDragging:a,snapPoints:i,activeSnapPoint:s,setActiveSnapPoint:c,dismissible:u,handleOnly:f,isOpen:l,onPress:p,onDrag:h}=hr(),b=x.useRef(null),g=x.useRef(!1);function v(){if(g.current){E();return}window.setTimeout(()=>{w()},lE)}function w(){if(a||e||g.current){E();return}if(E(),!i||i.length===0){u||o();return}if(s===i[i.length-1]&&u){o();return}const C=i.findIndex(S=>S===s);if(C===-1)return;const R=i[C+1];c(R)}function y(){b.current=window.setTimeout(()=>{g.current=!0},cE)}function E(){b.current&&window.clearTimeout(b.current),g.current=!1}return x.createElement("div",{onClick:v,onPointerCancel:E,onPointerDown:M=>{f&&p(M),y()},onPointerMove:M=>{f&&h(M)},ref:r,"data-vaul-drawer-visible":l?"true":"false","data-vaul-handle":"","aria-hidden":"true",...n},x.createElement("span",{"data-vaul-handle-hitarea":"","aria-hidden":"true"},t))});uE.displayName="Drawer.Handle";function dE(e){const t=hr(),{container:n=t.container,...r}=e;return x.createElement(us,{container:n,...r})}const ft={Root:iE,Content:sf,Overlay:af,Trigger:td,Portal:dE,Close:ms,Title:ds,Description:fs},cf=({shouldScaleBackground:e=!0,...t})=>m.jsx(ft.Root,{shouldScaleBackground:e,...t});cf.displayName="Drawer";const fE=ft.Trigger,mE=ft.Portal,pE=ft.Close,lf=d.forwardRef(({className:e,...t},n)=>m.jsx(ft.Overlay,{ref:n,className:L("fixed inset-0 z-50 bg-black/80",e),...t}));lf.displayName=ft.Overlay.displayName;const uf=d.forwardRef(({className:e,children:t,...n},r)=>m.jsxs(mE,{children:[m.jsx(lf,{}),m.jsxs(ft.Content,{ref:r,className:L("fixed inset-x-0 bottom-0 z-50 mt-24 flex h-auto flex-col rounded-t-[10px] border bg-background",e),...n,children:[m.jsx("div",{className:"mx-auto mt-4 h-2 w-[100px] rounded-full bg-muted"}),t]})]}));uf.displayName="DrawerContent";const df=({className:e,...t})=>m.jsx("div",{className:L("grid gap-1.5 p-4 text-center sm:text-left",e),...t});df.displayName="DrawerHeader";const ff=({className:e,...t})=>m.jsx("div",{className:L("mt-auto flex flex-col gap-2 p-4",e),...t});ff.displayName="DrawerFooter";const mf=d.forwardRef(({className:e,...t},n)=>m.jsx(ft.Title,{ref:n,className:L("text-lg font-semibold leading-none tracking-tight",e),...t}));mf.displayName=ft.Title.displayName;const pf=d.forwardRef(({className:e,...t},n)=>m.jsx(ft.Description,{ref:n,className:L("text-sm text-muted-foreground",e),...t}));pf.displayName=ft.Description.displayName;var hE="DismissableLayer",Oa="dismissableLayer.update",gE="dismissableLayer.pointerDownOutside",vE="dismissableLayer.focusOutside",Vi,hf=d.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),gf=d.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:i,onDismiss:s,...c}=e,u=d.useContext(hf),[f,l]=d.useState(null),p=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,h]=d.useState({}),b=fe(t,S=>l(S)),g=Array.from(u.layers),[v]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),w=g.indexOf(v),y=f?g.indexOf(f):-1,E=u.layersWithOutsidePointerEventsDisabled.size>0,M=y>=w,C=wE(S=>{const k=S.target,I=[...u.branches].some(A=>A.contains(k));!M||I||(o==null||o(S),i==null||i(S),S.defaultPrevented||s==null||s())},p),R=xE(S=>{const k=S.target;[...u.branches].some(A=>A.contains(k))||(a==null||a(S),i==null||i(S),S.defaultPrevented||s==null||s())},p);return nr(S=>{y===u.layers.size-1&&(r==null||r(S),!S.defaultPrevented&&s&&(S.preventDefault(),s()))},p),d.useEffect(()=>{if(f)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(Vi=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(f)),u.layers.add(f),Ki(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=Vi)}},[f,p,n,u]),d.useEffect(()=>()=>{f&&(u.layers.delete(f),u.layersWithOutsidePointerEventsDisabled.delete(f),Ki())},[f,u]),d.useEffect(()=>{const S=()=>h({});return document.addEventListener(Oa,S),()=>document.removeEventListener(Oa,S)},[]),m.jsx(J.div,{...c,ref:b,style:{pointerEvents:E?M?"auto":"none":void 0,...e.style},onFocusCapture:K(e.onFocusCapture,R.onFocusCapture),onBlurCapture:K(e.onBlurCapture,R.onBlurCapture),onPointerDownCapture:K(e.onPointerDownCapture,C.onPointerDownCapture)})});gf.displayName=hE;var bE="DismissableLayerBranch",yE=d.forwardRef((e,t)=>{const n=d.useContext(hf),r=d.useRef(null),o=fe(t,r);return d.useEffect(()=>{const a=r.current;if(a)return n.branches.add(a),()=>{n.branches.delete(a)}},[n.branches]),m.jsx(J.div,{...e,ref:o})});yE.displayName=bE;function wE(e,t=globalThis==null?void 0:globalThis.document){const n=je(e),r=d.useRef(!1),o=d.useRef(()=>{});return d.useEffect(()=>{const a=s=>{if(s.target&&!r.current){let c=function(){vf(gE,n,u,{discrete:!0})};const u={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=c,t.addEventListener("click",o.current,{once:!0})):c()}else t.removeEventListener("click",o.current);r.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",a),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function xE(e,t=globalThis==null?void 0:globalThis.document){const n=je(e),r=d.useRef(!1);return d.useEffect(()=>{const o=a=>{a.target&&!r.current&&vf(vE,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 Ki(){const e=new CustomEvent(Oa);document.dispatchEvent(e)}function vf(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?kn(o,a):o.dispatchEvent(a)}var oa="rovingFocusGroup.onEntryFocus",SE={bubbles:!1,cancelable:!0},gr="RovingFocusGroup",[Ta,bf,EE]=Ja(gr),[CE,_n]=Ge(gr,[EE]),[DE,ME]=CE(gr),yf=d.forwardRef((e,t)=>m.jsx(Ta.Provider,{scope:e.__scopeRovingFocusGroup,children:m.jsx(Ta.Slot,{scope:e.__scopeRovingFocusGroup,children:m.jsx(NE,{...e,ref:t})})}));yf.displayName=gr;var NE=d.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:a,currentTabStopId:i,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:c,onEntryFocus:u,preventScrollOnEntryFocus:f=!1,...l}=e,p=d.useRef(null),h=fe(t,p),b=ur(a),[g,v]=ot({prop:i,defaultProp:s??null,onChange:c,caller:gr}),[w,y]=d.useState(!1),E=je(u),M=bf(n),C=d.useRef(!1),[R,S]=d.useState(0);return d.useEffect(()=>{const k=p.current;if(k)return k.addEventListener(oa,E),()=>k.removeEventListener(oa,E)},[E]),m.jsx(DE,{scope:n,orientation:r,dir:b,loop:o,currentTabStopId:g,onItemFocus:d.useCallback(k=>v(k),[v]),onItemShiftTab:d.useCallback(()=>y(!0),[]),onFocusableItemAdd:d.useCallback(()=>S(k=>k+1),[]),onFocusableItemRemove:d.useCallback(()=>S(k=>k-1),[]),children:m.jsx(J.div,{tabIndex:w||R===0?-1:0,"data-orientation":r,...l,ref:h,style:{outline:"none",...e.style},onMouseDown:K(e.onMouseDown,()=>{C.current=!0}),onFocus:K(e.onFocus,k=>{const I=!C.current;if(k.target===k.currentTarget&&I&&!w){const A=new CustomEvent(oa,SE);if(k.currentTarget.dispatchEvent(A),!A.defaultPrevented){const W=M().filter(D=>D.focusable),G=W.find(D=>D.active),B=W.find(D=>D.id===g),O=[G,B,...W].filter(Boolean).map(D=>D.ref.current);Sf(O,f)}}C.current=!1}),onBlur:K(e.onBlur,()=>y(!1))})})}),wf="RovingFocusGroupItem",xf=d.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:a,children:i,...s}=e,c=Pe(),u=a||c,f=ME(wf,n),l=f.currentTabStopId===u,p=bf(n),{onFocusableItemAdd:h,onFocusableItemRemove:b,currentTabStopId:g}=f;return d.useEffect(()=>{if(r)return h(),()=>b()},[r,h,b]),m.jsx(Ta.ItemSlot,{scope:n,id:u,focusable:r,active:o,children:m.jsx(J.span,{tabIndex:l?0:-1,"data-orientation":f.orientation,...s,ref:t,onMouseDown:K(e.onMouseDown,v=>{r?f.onItemFocus(u):v.preventDefault()}),onFocus:K(e.onFocus,()=>f.onItemFocus(u)),onKeyDown:K(e.onKeyDown,v=>{if(v.key==="Tab"&&v.shiftKey){f.onItemShiftTab();return}if(v.target!==v.currentTarget)return;const w=OE(v,f.orientation,f.dir);if(w!==void 0){if(v.metaKey||v.ctrlKey||v.altKey||v.shiftKey)return;v.preventDefault();let E=p().filter(M=>M.focusable).map(M=>M.ref.current);if(w==="last")E.reverse();else if(w==="prev"||w==="next"){w==="prev"&&E.reverse();const M=E.indexOf(v.currentTarget);E=f.loop?TE(E,M+1):E.slice(M+1)}setTimeout(()=>Sf(E))}}),children:typeof i=="function"?i({isCurrentTabStop:l,hasTabStop:g!=null}):i})})});xf.displayName=wf;var kE={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function RE(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function OE(e,t,n){const r=RE(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return kE[r]}function Sf(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function TE(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var Ss=yf,Es=xf,Pa=["Enter"," "],PE=["ArrowDown","PageUp","Home"],Ef=["ArrowUp","PageDown","End"],_E=[...PE,...Ef],AE={ltr:[...Pa,"ArrowRight"],rtl:[...Pa,"ArrowLeft"]},IE={ltr:["ArrowLeft"],rtl:["ArrowRight"]},vr="Menu",[Zn,jE,$E]=Ja(vr),[ln,Cf]=Ge(vr,[$E,Ht,_n]),br=Ht(),Df=_n(),[Mf,Vt]=ln(vr),[LE,yr]=ln(vr),Nf=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:o,onOpenChange:a,modal:i=!0}=e,s=br(t),[c,u]=d.useState(null),f=d.useRef(!1),l=je(a),p=ur(o);return d.useEffect(()=>{const h=()=>{f.current=!0,document.addEventListener("pointerdown",b,{capture:!0,once:!0}),document.addEventListener("pointermove",b,{capture:!0,once:!0})},b=()=>f.current=!1;return document.addEventListener("keydown",h,{capture:!0}),()=>{document.removeEventListener("keydown",h,{capture:!0}),document.removeEventListener("pointerdown",b,{capture:!0}),document.removeEventListener("pointermove",b,{capture:!0})}},[]),m.jsx(ar,{...s,children:m.jsx(Mf,{scope:t,open:n,onOpenChange:l,content:c,onContentChange:u,children:m.jsx(LE,{scope:t,onClose:d.useCallback(()=>l(!1),[l]),isUsingKeyboardRef:f,dir:p,modal:i,children:r})})})};Nf.displayName=vr;var FE="MenuAnchor",Cs=d.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=br(n);return m.jsx(sr,{...o,...r,ref:t})});Cs.displayName=FE;var Ds="MenuPortal",[WE,kf]=ln(Ds,{forceMount:void 0}),Rf=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:o}=e,a=Vt(Ds,t);return m.jsx(WE,{scope:t,forceMount:n,children:m.jsx(at,{present:n||a.open,children:m.jsx(ir,{asChild:!0,container:o,children:r})})})};Rf.displayName=Ds;var rt="MenuContent",[BE,Ms]=ln(rt),Of=d.forwardRef((e,t)=>{const n=kf(rt,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,a=Vt(rt,e.__scopeMenu),i=yr(rt,e.__scopeMenu);return m.jsx(Zn.Provider,{scope:e.__scopeMenu,children:m.jsx(at,{present:r||a.open,children:m.jsx(Zn.Slot,{scope:e.__scopeMenu,children:i.modal?m.jsx(YE,{...o,ref:t}):m.jsx(zE,{...o,ref:t})})})})}),YE=d.forwardRef((e,t)=>{const n=Vt(rt,e.__scopeMenu),r=d.useRef(null),o=fe(t,r);return d.useEffect(()=>{const a=r.current;if(a)return co(a)},[]),m.jsx(Ns,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:K(e.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),zE=d.forwardRef((e,t)=>{const n=Vt(rt,e.__scopeMenu);return m.jsx(Ns,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),HE=Wt("MenuContent.ScrollLock"),Ns=d.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:o,onOpenAutoFocus:a,onCloseAutoFocus:i,disableOutsidePointerEvents:s,onEntryFocus:c,onEscapeKeyDown:u,onPointerDownOutside:f,onFocusOutside:l,onInteractOutside:p,onDismiss:h,disableOutsideScroll:b,...g}=e,v=Vt(rt,n),w=yr(rt,n),y=br(n),E=Df(n),M=jE(n),[C,R]=d.useState(null),S=d.useRef(null),k=fe(t,S,v.onContentChange),I=d.useRef(0),A=d.useRef(""),W=d.useRef(0),G=d.useRef(null),B=d.useRef("right"),$=d.useRef(0),O=b?cr:d.Fragment,D=b?{as:HE,allowPinchZoom:!0}:void 0,_=P=>{var F,X;const Y=A.current+P,H=M().filter(Z=>!Z.disabled),T=document.activeElement,j=(F=H.find(Z=>Z.ref.current===T))==null?void 0:F.textValue,z=H.map(Z=>Z.textValue),U=nC(z,Y,j),q=(X=H.find(Z=>Z.textValue===U))==null?void 0:X.ref.current;(function Z(Q){A.current=Q,window.clearTimeout(I.current),Q!==""&&(I.current=window.setTimeout(()=>Z(""),1e3))})(Y),q&&setTimeout(()=>q.focus())};d.useEffect(()=>()=>window.clearTimeout(I.current),[]),Wa();const N=d.useCallback(P=>{var H,T;return B.current===((H=G.current)==null?void 0:H.side)&&oC(P,(T=G.current)==null?void 0:T.area)},[]);return m.jsx(BE,{scope:n,searchRef:A,onItemEnter:d.useCallback(P=>{N(P)&&P.preventDefault()},[N]),onItemLeave:d.useCallback(P=>{var Y;N(P)||((Y=S.current)==null||Y.focus(),R(null))},[N]),onTriggerLeave:d.useCallback(P=>{N(P)&&P.preventDefault()},[N]),pointerGraceTimerRef:W,onPointerGraceIntentChange:d.useCallback(P=>{G.current=P},[]),children:m.jsx(O,{...D,children:m.jsx(rr,{asChild:!0,trapped:o,onMountAutoFocus:K(a,P=>{var Y;P.preventDefault(),(Y=S.current)==null||Y.focus({preventScroll:!0})}),onUnmountAutoFocus:i,children:m.jsx(gf,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:u,onPointerDownOutside:f,onFocusOutside:l,onInteractOutside:p,onDismiss:h,children:m.jsx(Ss,{asChild:!0,...E,dir:w.dir,orientation:"vertical",loop:r,currentTabStopId:C,onCurrentTabStopIdChange:R,onEntryFocus:K(c,P=>{w.isUsingKeyboardRef.current||P.preventDefault()}),preventScrollOnEntryFocus:!0,children:m.jsx(so,{role:"menu","aria-orientation":"vertical","data-state":qf(v.open),"data-radix-menu-content":"",dir:w.dir,...y,...g,ref:k,style:{outline:"none",...g.style},onKeyDown:K(g.onKeyDown,P=>{const H=P.target.closest("[data-radix-menu-content]")===P.currentTarget,T=P.ctrlKey||P.altKey||P.metaKey,j=P.key.length===1;H&&(P.key==="Tab"&&P.preventDefault(),!T&&j&&_(P.key));const z=S.current;if(P.target!==z||!_E.includes(P.key))return;P.preventDefault();const q=M().filter(F=>!F.disabled).map(F=>F.ref.current);Ef.includes(P.key)&&q.reverse(),eC(q)}),onBlur:K(e.onBlur,P=>{P.currentTarget.contains(P.target)||(window.clearTimeout(I.current),A.current="")}),onPointerMove:K(e.onPointerMove,Qn(P=>{const Y=P.target,H=$.current!==P.clientX;if(P.currentTarget.contains(Y)&&H){const T=P.clientX>$.current?"right":"left";B.current=T,$.current=P.clientX}}))})})})})})})});Of.displayName=rt;var UE="MenuGroup",ks=d.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return m.jsx(J.div,{role:"group",...r,ref:t})});ks.displayName=UE;var GE="MenuLabel",Tf=d.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return m.jsx(J.div,{...r,ref:t})});Tf.displayName=GE;var Xr="MenuItem",Xi="menu.itemSelect",Co=d.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...o}=e,a=d.useRef(null),i=yr(Xr,e.__scopeMenu),s=Ms(Xr,e.__scopeMenu),c=fe(t,a),u=d.useRef(!1),f=()=>{const l=a.current;if(!n&&l){const p=new CustomEvent(Xi,{bubbles:!0,cancelable:!0});l.addEventListener(Xi,h=>r==null?void 0:r(h),{once:!0}),kn(l,p),p.defaultPrevented?u.current=!1:i.onClose()}};return m.jsx(Pf,{...o,ref:c,disabled:n,onClick:K(e.onClick,f),onPointerDown:l=>{var p;(p=e.onPointerDown)==null||p.call(e,l),u.current=!0},onPointerUp:K(e.onPointerUp,l=>{var p;u.current||(p=l.currentTarget)==null||p.click()}),onKeyDown:K(e.onKeyDown,l=>{const p=s.searchRef.current!=="";n||p&&l.key===" "||Pa.includes(l.key)&&(l.currentTarget.click(),l.preventDefault())})})});Co.displayName=Xr;var Pf=d.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:o,...a}=e,i=Ms(Xr,n),s=Df(n),c=d.useRef(null),u=fe(t,c),[f,l]=d.useState(!1),[p,h]=d.useState("");return d.useEffect(()=>{const b=c.current;b&&h((b.textContent??"").trim())},[a.children]),m.jsx(Zn.ItemSlot,{scope:n,disabled:r,textValue:o??p,children:m.jsx(Es,{asChild:!0,...s,focusable:!r,children:m.jsx(J.div,{role:"menuitem","data-highlighted":f?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...a,ref:u,onPointerMove:K(e.onPointerMove,Qn(b=>{r?i.onItemLeave(b):(i.onItemEnter(b),b.defaultPrevented||b.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:K(e.onPointerLeave,Qn(b=>i.onItemLeave(b))),onFocus:K(e.onFocus,()=>l(!0)),onBlur:K(e.onBlur,()=>l(!1))})})})}),qE="MenuCheckboxItem",_f=d.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...o}=e;return m.jsx(Lf,{scope:e.__scopeMenu,checked:n,children:m.jsx(Co,{role:"menuitemcheckbox","aria-checked":Zr(n)?"mixed":n,...o,ref:t,"data-state":Ts(n),onSelect:K(o.onSelect,()=>r==null?void 0:r(Zr(n)?!0:!n),{checkForDefaultPrevented:!1})})})});_f.displayName=qE;var Af="MenuRadioGroup",[VE,KE]=ln(Af,{value:void 0,onValueChange:()=>{}}),If=d.forwardRef((e,t)=>{const{value:n,onValueChange:r,...o}=e,a=je(r);return m.jsx(VE,{scope:e.__scopeMenu,value:n,onValueChange:a,children:m.jsx(ks,{...o,ref:t})})});If.displayName=Af;var jf="MenuRadioItem",$f=d.forwardRef((e,t)=>{const{value:n,...r}=e,o=KE(jf,e.__scopeMenu),a=n===o.value;return m.jsx(Lf,{scope:e.__scopeMenu,checked:a,children:m.jsx(Co,{role:"menuitemradio","aria-checked":a,...r,ref:t,"data-state":Ts(a),onSelect:K(r.onSelect,()=>{var i;return(i=o.onValueChange)==null?void 0:i.call(o,n)},{checkForDefaultPrevented:!1})})})});$f.displayName=jf;var Rs="MenuItemIndicator",[Lf,XE]=ln(Rs,{checked:!1}),Ff=d.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...o}=e,a=XE(Rs,n);return m.jsx(at,{present:r||Zr(a.checked)||a.checked===!0,children:m.jsx(J.span,{...o,ref:t,"data-state":Ts(a.checked)})})});Ff.displayName=Rs;var ZE="MenuSeparator",Wf=d.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return m.jsx(J.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});Wf.displayName=ZE;var QE="MenuArrow",Bf=d.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=br(n);return m.jsx(io,{...o,...r,ref:t})});Bf.displayName=QE;var Os="MenuSub",[JE,Yf]=ln(Os),zf=e=>{const{__scopeMenu:t,children:n,open:r=!1,onOpenChange:o}=e,a=Vt(Os,t),i=br(t),[s,c]=d.useState(null),[u,f]=d.useState(null),l=je(o);return d.useEffect(()=>(a.open===!1&&l(!1),()=>l(!1)),[a.open,l]),m.jsx(ar,{...i,children:m.jsx(Mf,{scope:t,open:r,onOpenChange:l,content:u,onContentChange:f,children:m.jsx(JE,{scope:t,contentId:Pe(),triggerId:Pe(),trigger:s,onTriggerChange:c,children:n})})})};zf.displayName=Os;var Hn="MenuSubTrigger",Hf=d.forwardRef((e,t)=>{const n=Vt(Hn,e.__scopeMenu),r=yr(Hn,e.__scopeMenu),o=Yf(Hn,e.__scopeMenu),a=Ms(Hn,e.__scopeMenu),i=d.useRef(null),{pointerGraceTimerRef:s,onPointerGraceIntentChange:c}=a,u={__scopeMenu:e.__scopeMenu},f=d.useCallback(()=>{i.current&&window.clearTimeout(i.current),i.current=null},[]);return d.useEffect(()=>f,[f]),d.useEffect(()=>{const l=s.current;return()=>{window.clearTimeout(l),c(null)}},[s,c]),m.jsx(Cs,{asChild:!0,...u,children:m.jsx(Pf,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":o.contentId,"data-state":qf(n.open),...e,ref:Nt(t,o.onTriggerChange),onClick:l=>{var p;(p=e.onClick)==null||p.call(e,l),!(e.disabled||l.defaultPrevented)&&(l.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:K(e.onPointerMove,Qn(l=>{a.onItemEnter(l),!l.defaultPrevented&&!e.disabled&&!n.open&&!i.current&&(a.onPointerGraceIntentChange(null),i.current=window.setTimeout(()=>{n.onOpenChange(!0),f()},100))})),onPointerLeave:K(e.onPointerLeave,Qn(l=>{var h,b;f();const p=(h=n.content)==null?void 0:h.getBoundingClientRect();if(p){const g=(b=n.content)==null?void 0:b.dataset.side,v=g==="right",w=v?-5:5,y=p[v?"left":"right"],E=p[v?"right":"left"];a.onPointerGraceIntentChange({area:[{x:l.clientX+w,y:l.clientY},{x:y,y:p.top},{x:E,y:p.top},{x:E,y:p.bottom},{x:y,y:p.bottom}],side:g}),window.clearTimeout(s.current),s.current=window.setTimeout(()=>a.onPointerGraceIntentChange(null),300)}else{if(a.onTriggerLeave(l),l.defaultPrevented)return;a.onPointerGraceIntentChange(null)}})),onKeyDown:K(e.onKeyDown,l=>{var h;const p=a.searchRef.current!=="";e.disabled||p&&l.key===" "||AE[r.dir].includes(l.key)&&(n.onOpenChange(!0),(h=n.content)==null||h.focus(),l.preventDefault())})})})});Hf.displayName=Hn;var Uf="MenuSubContent",Gf=d.forwardRef((e,t)=>{const n=kf(rt,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,a=Vt(rt,e.__scopeMenu),i=yr(rt,e.__scopeMenu),s=Yf(Uf,e.__scopeMenu),c=d.useRef(null),u=fe(t,c);return m.jsx(Zn.Provider,{scope:e.__scopeMenu,children:m.jsx(at,{present:r||a.open,children:m.jsx(Zn.Slot,{scope:e.__scopeMenu,children:m.jsx(Ns,{id:s.contentId,"aria-labelledby":s.triggerId,...o,ref:u,align:"start",side:i.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:f=>{var l;i.isUsingKeyboardRef.current&&((l=c.current)==null||l.focus()),f.preventDefault()},onCloseAutoFocus:f=>f.preventDefault(),onFocusOutside:K(e.onFocusOutside,f=>{f.target!==s.trigger&&a.onOpenChange(!1)}),onEscapeKeyDown:K(e.onEscapeKeyDown,f=>{i.onClose(),f.preventDefault()}),onKeyDown:K(e.onKeyDown,f=>{var h;const l=f.currentTarget.contains(f.target),p=IE[i.dir].includes(f.key);l&&p&&(a.onOpenChange(!1),(h=s.trigger)==null||h.focus(),f.preventDefault())})})})})})});Gf.displayName=Uf;function qf(e){return e?"open":"closed"}function Zr(e){return e==="indeterminate"}function Ts(e){return Zr(e)?"indeterminate":e?"checked":"unchecked"}function eC(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function tC(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function nC(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 i=tC(e,Math.max(a,0));o.length===1&&(i=i.filter(u=>u!==n));const c=i.find(u=>u.toLowerCase().startsWith(o.toLowerCase()));return c!==n?c:void 0}function rC(e,t){const{x:n,y:r}=e;let o=!1;for(let a=0,i=t.length-1;a<t.length;i=a++){const s=t[a],c=t[i],u=s.x,f=s.y,l=c.x,p=c.y;f>r!=p>r&&n<(l-u)*(r-f)/(p-f)+u&&(o=!o)}return o}function oC(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return rC(n,t)}function Qn(e){return t=>t.pointerType==="mouse"?e(t):void 0}var aC=Nf,sC=Cs,iC=Rf,cC=Of,lC=ks,uC=Tf,dC=Co,fC=_f,mC=If,pC=$f,hC=Ff,gC=Wf,vC=Bf,bC=zf,yC=Hf,wC=Gf,Do="DropdownMenu",[xC,kM]=Ge(Do,[Cf]),qe=Cf(),[SC,Vf]=xC(Do),Kf=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:o,defaultOpen:a,onOpenChange:i,modal:s=!0}=e,c=qe(t),u=d.useRef(null),[f,l]=ot({prop:o,defaultProp:a??!1,onChange:i,caller:Do});return m.jsx(SC,{scope:t,triggerId:Pe(),triggerRef:u,contentId:Pe(),open:f,onOpenChange:l,onOpenToggle:d.useCallback(()=>l(p=>!p),[l]),modal:s,children:m.jsx(aC,{...c,open:f,onOpenChange:l,dir:r,modal:s,children:n})})};Kf.displayName=Do;var Xf="DropdownMenuTrigger",Zf=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...o}=e,a=Vf(Xf,n),i=qe(n);return m.jsx(sC,{asChild:!0,...i,children:m.jsx(J.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:Nt(t,a.triggerRef),onPointerDown:K(e.onPointerDown,s=>{!r&&s.button===0&&s.ctrlKey===!1&&(a.onOpenToggle(),a.open||s.preventDefault())}),onKeyDown:K(e.onKeyDown,s=>{r||(["Enter"," "].includes(s.key)&&a.onOpenToggle(),s.key==="ArrowDown"&&a.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(s.key)&&s.preventDefault())})})})});Zf.displayName=Xf;var EC="DropdownMenuPortal",Qf=e=>{const{__scopeDropdownMenu:t,...n}=e,r=qe(t);return m.jsx(iC,{...r,...n})};Qf.displayName=EC;var Jf="DropdownMenuContent",em=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Vf(Jf,n),a=qe(n),i=d.useRef(!1);return m.jsx(cC,{id:o.contentId,"aria-labelledby":o.triggerId,...a,...r,ref:t,onCloseAutoFocus:K(e.onCloseAutoFocus,s=>{var c;i.current||(c=o.triggerRef.current)==null||c.focus(),i.current=!1,s.preventDefault()}),onInteractOutside:K(e.onInteractOutside,s=>{const c=s.detail.originalEvent,u=c.button===0&&c.ctrlKey===!0,f=c.button===2||u;(!o.modal||f)&&(i.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)"}})});em.displayName=Jf;var CC="DropdownMenuGroup",tm=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=qe(n);return m.jsx(lC,{...o,...r,ref:t})});tm.displayName=CC;var DC="DropdownMenuLabel",nm=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=qe(n);return m.jsx(uC,{...o,...r,ref:t})});nm.displayName=DC;var MC="DropdownMenuItem",rm=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=qe(n);return m.jsx(dC,{...o,...r,ref:t})});rm.displayName=MC;var NC="DropdownMenuCheckboxItem",om=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=qe(n);return m.jsx(fC,{...o,...r,ref:t})});om.displayName=NC;var kC="DropdownMenuRadioGroup",am=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=qe(n);return m.jsx(mC,{...o,...r,ref:t})});am.displayName=kC;var RC="DropdownMenuRadioItem",sm=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=qe(n);return m.jsx(pC,{...o,...r,ref:t})});sm.displayName=RC;var OC="DropdownMenuItemIndicator",im=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=qe(n);return m.jsx(hC,{...o,...r,ref:t})});im.displayName=OC;var TC="DropdownMenuSeparator",cm=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=qe(n);return m.jsx(gC,{...o,...r,ref:t})});cm.displayName=TC;var PC="DropdownMenuArrow",_C=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=qe(n);return m.jsx(vC,{...o,...r,ref:t})});_C.displayName=PC;var AC=e=>{const{__scopeDropdownMenu:t,children:n,open:r,onOpenChange:o,defaultOpen:a}=e,i=qe(t),[s,c]=ot({prop:r,defaultProp:a??!1,onChange:o,caller:"DropdownMenuSub"});return m.jsx(bC,{...i,open:s,onOpenChange:c,children:n})},IC="DropdownMenuSubTrigger",lm=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=qe(n);return m.jsx(yC,{...o,...r,ref:t})});lm.displayName=IC;var jC="DropdownMenuSubContent",um=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=qe(n);return m.jsx(wC,{...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)"}})});um.displayName=jC;var $C=Kf,dm=Zf,LC=Qf,fm=em,FC=tm,mm=nm,pm=rm,hm=om,WC=am,gm=sm,vm=im,bm=cm,BC=AC,ym=lm,wm=um;const YC=$C,xm=d.forwardRef(({onClick:e,onMouseDown:t,onPointerDown:n,...r},o)=>{const a=c=>{c.stopPropagation(),e==null||e(c)},i=c=>{c.stopPropagation(),t==null||t(c)},s=c=>{c.stopPropagation(),n==null||n(c)};return m.jsx(dm,{ref:o,onClick:a,onMouseDown:i,onPointerDown:s,...r})});xm.displayName=dm.displayName;const zC=FC,HC=BC,UC=WC,Sm=d.forwardRef(({className:e,inset:t,children:n,...r},o)=>m.jsxs(ym,{ref:o,className:L("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,m.jsx(La,{className:"ml-auto"})]}));Sm.displayName=ym.displayName;const Em=d.forwardRef(({className:e,...t},n)=>m.jsx(wm,{ref:n,className:L("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}));Em.displayName=wm.displayName;const Cm=d.forwardRef(({className:e,sideOffset:t=4,...n},r)=>m.jsx(LC,{children:m.jsx(fm,{ref:r,sideOffset:t,className:L("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})}));Cm.displayName=fm.displayName;const Dm=d.forwardRef(({className:e,inset:t,...n},r)=>m.jsx(pm,{ref:r,className:L("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}));Dm.displayName=pm.displayName;const Mm=d.forwardRef(({className:e,children:t,checked:n,...r},o)=>m.jsxs(hm,{ref:o,className:L("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:[m.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:m.jsx(vm,{children:m.jsx(er,{className:"h-4 w-4"})})}),t]}));Mm.displayName=hm.displayName;const Nm=d.forwardRef(({className:e,children:t,...n},r)=>m.jsxs(gm,{ref:r,className:L("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:[m.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:m.jsx(vm,{children:m.jsx(Cc,{className:"h-2 w-2 fill-current"})})}),t]}));Nm.displayName=gm.displayName;const km=d.forwardRef(({className:e,inset:t,...n},r)=>m.jsx(mm,{ref:r,className:L("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...n}));km.displayName=mm.displayName;const Rm=d.forwardRef(({className:e,...t},n)=>m.jsx(bm,{ref:n,className:L("-mx-1 my-1 h-px bg-muted",e),...t}));Rm.displayName=bm.displayName;const Om=({className:e,...t})=>m.jsx("span",{className:L("ml-auto text-xs tracking-widest opacity-60",e),...t});Om.displayName="DropdownMenuShortcut";var Ps="Radio",[GC,Tm]=Ge(Ps),[qC,VC]=GC(Ps),Pm=d.forwardRef((e,t)=>{const{__scopeRadio:n,name:r,checked:o=!1,required:a,disabled:i,value:s="on",onCheck:c,form:u,...f}=e,[l,p]=d.useState(null),h=fe(t,v=>p(v)),b=d.useRef(!1),g=l?u||!!l.closest("form"):!0;return m.jsxs(qC,{scope:n,checked:o,disabled:i,children:[m.jsx(J.button,{type:"button",role:"radio","aria-checked":o,"data-state":jm(o),"data-disabled":i?"":void 0,disabled:i,value:s,...f,ref:h,onClick:K(e.onClick,v=>{o||c==null||c(),g&&(b.current=v.isPropagationStopped(),b.current||v.stopPropagation())})}),g&&m.jsx(Im,{control:l,bubbles:!b.current,name:r,value:s,checked:o,required:a,disabled:i,form:u,style:{transform:"translateX(-100%)"}})]})});Pm.displayName=Ps;var _m="RadioIndicator",Am=d.forwardRef((e,t)=>{const{__scopeRadio:n,forceMount:r,...o}=e,a=VC(_m,n);return m.jsx(at,{present:r||a.checked,children:m.jsx(J.span,{"data-state":jm(a.checked),"data-disabled":a.disabled?"":void 0,...o,ref:t})})});Am.displayName=_m;var KC="RadioBubbleInput",Im=d.forwardRef(({__scopeRadio:e,control:t,checked:n,bubbles:r=!0,...o},a)=>{const i=d.useRef(null),s=fe(i,a),c=es(n),u=qa(t);return d.useEffect(()=>{const f=i.current;if(!f)return;const l=window.HTMLInputElement.prototype,h=Object.getOwnPropertyDescriptor(l,"checked").set;if(c!==n&&h){const b=new Event("click",{bubbles:r});h.call(f,n),f.dispatchEvent(b)}},[c,n,r]),m.jsx(J.input,{type:"radio","aria-hidden":!0,defaultChecked:n,...o,tabIndex:-1,ref:s,style:{...o.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});Im.displayName=KC;function jm(e){return e?"checked":"unchecked"}var XC=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],Mo="RadioGroup",[ZC,RM]=Ge(Mo,[_n,Tm]),$m=_n(),Lm=Tm(),[QC,JC]=ZC(Mo),Fm=d.forwardRef((e,t)=>{const{__scopeRadioGroup:n,name:r,defaultValue:o,value:a,required:i=!1,disabled:s=!1,orientation:c,dir:u,loop:f=!0,onValueChange:l,...p}=e,h=$m(n),b=ur(u),[g,v]=ot({prop:a,defaultProp:o??null,onChange:l,caller:Mo});return m.jsx(QC,{scope:n,name:r,required:i,disabled:s,value:g,onValueChange:v,children:m.jsx(Ss,{asChild:!0,...h,orientation:c,dir:b,loop:f,children:m.jsx(J.div,{role:"radiogroup","aria-required":i,"aria-orientation":c,"data-disabled":s?"":void 0,dir:b,...p,ref:t})})})});Fm.displayName=Mo;var Wm="RadioGroupItem",Bm=d.forwardRef((e,t)=>{const{__scopeRadioGroup:n,disabled:r,...o}=e,a=JC(Wm,n),i=a.disabled||r,s=$m(n),c=Lm(n),u=d.useRef(null),f=fe(t,u),l=a.value===o.value,p=d.useRef(!1);return d.useEffect(()=>{const h=g=>{XC.includes(g.key)&&(p.current=!0)},b=()=>p.current=!1;return document.addEventListener("keydown",h),document.addEventListener("keyup",b),()=>{document.removeEventListener("keydown",h),document.removeEventListener("keyup",b)}},[]),m.jsx(Es,{asChild:!0,...s,focusable:!i,active:l,children:m.jsx(Pm,{disabled:i,required:a.required,checked:l,...c,...o,name:a.name,ref:f,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())})})})});Bm.displayName=Wm;var eD="RadioGroupIndicator",Ym=d.forwardRef((e,t)=>{const{__scopeRadioGroup:n,...r}=e,o=Lm(n);return m.jsx(Am,{...o,...r,ref:t})});Ym.displayName=eD;var zm=Fm,Hm=Bm,tD=Ym;const Um=d.forwardRef(({className:e,...t},n)=>m.jsx(zm,{ref:n,className:L("grid gap-2",e),...t}));Um.displayName=zm.displayName;const Gm=d.forwardRef(({className:e,...t},n)=>m.jsx(Hm,{ref:n,className:L(`
217
217
  aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background
218
218
  focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2
219
219
  disabled:cursor-not-allowed disabled:opacity-50
220
- `,e),...t,children:m.jsx(tD,{className:"flex items-center justify-center",children:m.jsx(Dc,{className:"h-2.5 w-2.5 fill-current text-current"})})}));qm.displayName=Um.displayName;var No="Tabs",[nD,OM]=Ge(No,[_n]),Vm=_n(),[rD,_s]=nD(No),Km=d.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:o,defaultValue:a,orientation:i="horizontal",dir:s,activationMode:c="automatic",...u}=e,f=dr(s),[l,p]=ot({prop:r,onChange:o,defaultProp:a??"",caller:No});return m.jsx(rD,{scope:n,baseId:Pe(),value:l,onValueChange:p,orientation:i,dir:f,activationMode:c,children:m.jsx(J.div,{dir:f,"data-orientation":i,...u,ref:t})})});Km.displayName=No;var Xm="TabsList",Zm=d.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...o}=e,a=_s(Xm,n),i=Vm(n);return m.jsx(Ss,{asChild:!0,...i,orientation:a.orientation,dir:a.dir,loop:r,children:m.jsx(J.div,{role:"tablist","aria-orientation":a.orientation,...o,ref:t})})});Zm.displayName=Xm;var Qm="TabsTrigger",Jm=d.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:o=!1,...a}=e,i=_s(Qm,n),s=Vm(n),c=np(i.baseId,r),u=rp(i.baseId,r),f=r===i.value;return m.jsx(Es,{asChild:!0,...s,focusable:!o,active:f,children:m.jsx(J.button,{type:"button",role:"tab","aria-selected":f,"aria-controls":u,"data-state":f?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:c,...a,ref:t,onMouseDown:K(e.onMouseDown,l=>{!o&&l.button===0&&l.ctrlKey===!1?i.onValueChange(r):l.preventDefault()}),onKeyDown:K(e.onKeyDown,l=>{[" ","Enter"].includes(l.key)&&i.onValueChange(r)}),onFocus:K(e.onFocus,()=>{const l=i.activationMode!=="manual";!f&&!o&&l&&i.onValueChange(r)})})})});Jm.displayName=Qm;var ep="TabsContent",tp=d.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:o,children:a,...i}=e,s=_s(ep,n),c=np(s.baseId,r),u=rp(s.baseId,r),f=r===s.value,l=d.useRef(f);return d.useEffect(()=>{const p=requestAnimationFrame(()=>l.current=!1);return()=>cancelAnimationFrame(p)},[]),m.jsx(at,{present:o||f,children:({present:p})=>m.jsx(J.div,{"data-state":f?"active":"inactive","data-orientation":s.orientation,role:"tabpanel","aria-labelledby":c,hidden:!p,id:u,tabIndex:0,...i,ref:t,style:{...e.style,animationDuration:l.current?"0s":void 0},children:p&&a})})});tp.displayName=ep;function np(e,t){return`${e}-trigger-${t}`}function rp(e,t){return`${e}-content-${t}`}var oD=Km,op=Zm,ap=Jm,sp=tp;const aD=oD,ip=d.forwardRef(({className:e,...t},n)=>m.jsx(op,{ref:n,className:F("inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",e),...t}));ip.displayName=op.displayName;const cp=d.forwardRef(({className:e,...t},n)=>m.jsx(ap,{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}));cp.displayName=ap.displayName;const lp=d.forwardRef(({className:e,...t},n)=>m.jsx(sp,{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}));lp.displayName=sp.displayName;var As="Progress",Is=100,[sD,TM]=Ge(As),[iD,cD]=sD(As),up=d.forwardRef((e,t)=>{const{__scopeProgress:n,value:r=null,max:o,getValueLabel:a=lD,...i}=e;(o||o===0)&&!Qi(o)&&console.error(uD(`${o}`,"Progress"));const s=Qi(o)?o:Is;r!==null&&!Ji(r,s)&&console.error(dD(`${r}`,"Progress"));const c=Ji(r,s)?r:null,u=Jr(c)?a(c,s):void 0;return m.jsx(iD,{scope:n,value:c,max:s,children:m.jsx(J.div,{"aria-valuemax":s,"aria-valuemin":0,"aria-valuenow":Jr(c)?c:void 0,"aria-valuetext":u,role:"progressbar","data-state":mp(c,s),"data-value":c??void 0,"data-max":s,...i,ref:t})})});up.displayName=As;var dp="ProgressIndicator",fp=d.forwardRef((e,t)=>{const{__scopeProgress:n,...r}=e,o=cD(dp,n);return m.jsx(J.div,{"data-state":mp(o.value,o.max),"data-value":o.value??void 0,"data-max":o.max,...r,ref:t})});fp.displayName=dp;function lD(e,t){return`${Math.round(e/t*100)}%`}function mp(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function Jr(e){return typeof e=="number"}function Qi(e){return Jr(e)&&!isNaN(e)&&e>0}function Ji(e,t){return Jr(e)&&!isNaN(e)&&e<=t&&e>=0}function uD(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${Is}\`.`}function dD(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
220
+ `,e),...t,children:m.jsx(tD,{className:"flex items-center justify-center",children:m.jsx(Cc,{className:"h-2.5 w-2.5 fill-current text-current"})})}));Gm.displayName=Hm.displayName;var No="Tabs",[nD,OM]=Ge(No,[_n]),qm=_n(),[rD,_s]=nD(No),Vm=d.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:o,defaultValue:a,orientation:i="horizontal",dir:s,activationMode:c="automatic",...u}=e,f=ur(s),[l,p]=ot({prop:r,onChange:o,defaultProp:a??"",caller:No});return m.jsx(rD,{scope:n,baseId:Pe(),value:l,onValueChange:p,orientation:i,dir:f,activationMode:c,children:m.jsx(J.div,{dir:f,"data-orientation":i,...u,ref:t})})});Vm.displayName=No;var Km="TabsList",Xm=d.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...o}=e,a=_s(Km,n),i=qm(n);return m.jsx(Ss,{asChild:!0,...i,orientation:a.orientation,dir:a.dir,loop:r,children:m.jsx(J.div,{role:"tablist","aria-orientation":a.orientation,...o,ref:t})})});Xm.displayName=Km;var Zm="TabsTrigger",Qm=d.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:o=!1,...a}=e,i=_s(Zm,n),s=qm(n),c=tp(i.baseId,r),u=np(i.baseId,r),f=r===i.value;return m.jsx(Es,{asChild:!0,...s,focusable:!o,active:f,children:m.jsx(J.button,{type:"button",role:"tab","aria-selected":f,"aria-controls":u,"data-state":f?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:c,...a,ref:t,onMouseDown:K(e.onMouseDown,l=>{!o&&l.button===0&&l.ctrlKey===!1?i.onValueChange(r):l.preventDefault()}),onKeyDown:K(e.onKeyDown,l=>{[" ","Enter"].includes(l.key)&&i.onValueChange(r)}),onFocus:K(e.onFocus,()=>{const l=i.activationMode!=="manual";!f&&!o&&l&&i.onValueChange(r)})})})});Qm.displayName=Zm;var Jm="TabsContent",ep=d.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:o,children:a,...i}=e,s=_s(Jm,n),c=tp(s.baseId,r),u=np(s.baseId,r),f=r===s.value,l=d.useRef(f);return d.useEffect(()=>{const p=requestAnimationFrame(()=>l.current=!1);return()=>cancelAnimationFrame(p)},[]),m.jsx(at,{present:o||f,children:({present:p})=>m.jsx(J.div,{"data-state":f?"active":"inactive","data-orientation":s.orientation,role:"tabpanel","aria-labelledby":c,hidden:!p,id:u,tabIndex:0,...i,ref:t,style:{...e.style,animationDuration:l.current?"0s":void 0},children:p&&a})})});ep.displayName=Jm;function tp(e,t){return`${e}-trigger-${t}`}function np(e,t){return`${e}-content-${t}`}var oD=Vm,rp=Xm,op=Qm,ap=ep;const aD=oD,sp=d.forwardRef(({className:e,...t},n)=>m.jsx(rp,{ref:n,className:L("inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",e),...t}));sp.displayName=rp.displayName;const ip=d.forwardRef(({className:e,...t},n)=>m.jsx(op,{ref:n,className:L("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}));ip.displayName=op.displayName;const cp=d.forwardRef(({className:e,...t},n)=>m.jsx(ap,{ref:n,className:L("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));cp.displayName=ap.displayName;var As="Progress",Is=100,[sD,TM]=Ge(As),[iD,cD]=sD(As),lp=d.forwardRef((e,t)=>{const{__scopeProgress:n,value:r=null,max:o,getValueLabel:a=lD,...i}=e;(o||o===0)&&!Zi(o)&&console.error(uD(`${o}`,"Progress"));const s=Zi(o)?o:Is;r!==null&&!Qi(r,s)&&console.error(dD(`${r}`,"Progress"));const c=Qi(r,s)?r:null,u=Qr(c)?a(c,s):void 0;return m.jsx(iD,{scope:n,value:c,max:s,children:m.jsx(J.div,{"aria-valuemax":s,"aria-valuemin":0,"aria-valuenow":Qr(c)?c:void 0,"aria-valuetext":u,role:"progressbar","data-state":fp(c,s),"data-value":c??void 0,"data-max":s,...i,ref:t})})});lp.displayName=As;var up="ProgressIndicator",dp=d.forwardRef((e,t)=>{const{__scopeProgress:n,...r}=e,o=cD(up,n);return m.jsx(J.div,{"data-state":fp(o.value,o.max),"data-value":o.value??void 0,"data-max":o.max,...r,ref:t})});dp.displayName=up;function lD(e,t){return`${Math.round(e/t*100)}%`}function fp(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function Qr(e){return typeof e=="number"}function Zi(e){return Qr(e)&&!isNaN(e)&&e>0}function Qi(e,t){return Qr(e)&&!isNaN(e)&&e<=t&&e>=0}function uD(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${Is}\`.`}function dD(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
221
221
  - a positive number
222
222
  - less than the value passed to \`max\` (or ${Is} if no \`max\` prop is set)
223
223
  - \`null\` or \`undefined\` if the progress is indeterminate.
224
224
 
225
- Defaulting to \`null\`.`}var pp=up,fD=fp;const hp=d.forwardRef(({className:e,value:t,...n},r)=>m.jsx(pp,{ref:r,className:F("relative h-1.5 w-full overflow-hidden rounded-full bg-secondary",e),...n,children:m.jsx(fD,{className:"h-full w-full flex-1 bg-brandBlue transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})}));hp.displayName=pp.displayName;function mD(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 pD=e=>{switch(e){case"success":return vD;case"info":return yD;case"warning":return bD;case"error":return wD;default:return null}},hD=Array(12).fill(0),gD=({visible:e,className:t})=>x.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},x.createElement("div",{className:"sonner-spinner"},hD.map((n,r)=>x.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),vD=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"})),bD=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"})),yD=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"})),wD=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"})),xD=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"})),SD=()=>{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 _a=1;class ED{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:_a++,i=this.toasts.find(c=>c.id===a),s=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(a)&&this.dismissedToasts.delete(a),i?this.toasts=this.toasts.map(c=>c.id===a?(this.publish({...c,...t,id:a,title:r}),{...c,...t,id:a,dismissible:s,title:r}):c):this.addToast({title:r,...o,dismissible:s,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,i;const s=o.then(async u=>{if(i=["resolve",u],x.isValidElement(u))a=!1,this.create({id:r,type:"default",message:u});else if(DD(u)&&!u.ok){a=!1;const l=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,b=typeof l=="object"&&!x.isValidElement(l)?l:{message:l};this.create({id:r,type:"error",description:p,...b})}else if(u instanceof Error){a=!1;const l=typeof n.error=="function"?await n.error(u):n.error,p=typeof n.description=="function"?await n.description(u):n.description,b=typeof l=="object"&&!x.isValidElement(l)?l:{message:l};this.create({id:r,type:"error",description:p,...b})}else if(n.success!==void 0){a=!1;const l=typeof n.success=="function"?await n.success(u):n.success,p=typeof n.description=="function"?await n.description(u):n.description,b=typeof l=="object"&&!x.isValidElement(l)?l:{message:l};this.create({id:r,type:"success",description:p,...b})}}).catch(async u=>{if(i=["reject",u],n.error!==void 0){a=!1;const f=typeof n.error=="function"?await n.error(u):n.error,l=typeof n.description=="function"?await n.description(u):n.description,h=typeof f=="object"&&!x.isValidElement(f)?f:{message:f};this.create({id:r,type:"error",description:l,...h})}}).finally(()=>{a&&(this.dismiss(r),r=void 0),n.finally==null||n.finally.call(n)}),c=()=>new Promise((u,f)=>s.then(()=>i[0]==="reject"?f(i[1]):u(i[1])).catch(f));return typeof r!="string"&&typeof r!="number"?{unwrap:c}:Object.assign(r,{unwrap:c})},this.custom=(t,n)=>{const r=(n==null?void 0:n.id)||_a++;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 Ze=new ED,CD=(e,t)=>{const n=(t==null?void 0:t.id)||_a++;return Ze.addToast({title:e,...t,id:n}),n},DD=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",MD=CD,ND=()=>Ze.toasts,kD=()=>Ze.getActiveToasts(),ec=Object.assign(MD,{success:Ze.success,info:Ze.info,warning:Ze.warning,error:Ze.error,custom:Ze.custom,message:Ze.message,promise:Ze.promise,dismiss:Ze.dismiss,loading:Ze.loading},{getHistory:ND,getToasts:kD});mD("[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 RD=3,OD="24px",TD="16px",tc=4e3,PD=356,_D=14,AD=45,ID=200;function mt(...e){return e.filter(Boolean).join(" ")}function jD(e){const[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}const $D=e=>{var t,n,r,o,a,i,s,c,u;const{invert:f,toast:l,unstyled:p,interacting:h,setHeights:b,visibleToasts:g,heights:v,index:y,toasts:w,expanded:E,removeToast:M,defaultRichColors:C,closeButton:k,style:S,cancelButtonStyle:R,actionButtonStyle:A,className:I="",descriptionClassName:L="",duration:V,position:B,gap:$,expandByDefault:_,classNames:N,icons:O,closeButtonAriaLabel:D="Close toast"}=e,[P,Y]=x.useState(null),[H,T]=x.useState(null),[j,z]=x.useState(!1),[U,G]=x.useState(!1),[W,X]=x.useState(!1),[Z,Q]=x.useState(!1),[ee,ae]=x.useState(!1),[be,te]=x.useState(0),[Te,$e]=x.useState(0),Ce=x.useRef(l.duration||V||tc),Ve=x.useRef(null),De=x.useRef(null),Be=y===0,Pt=y+1<=g,_e=l.type,Ye=l.dismissible!==!1,St=l.className||"",_t=l.descriptionClassName||"",ue=x.useMemo(()=>v.findIndex(oe=>oe.toastId===l.id)||0,[v,l.id]),pe=x.useMemo(()=>{var oe;return(oe=l.closeButton)!=null?oe:k},[l.closeButton,k]),ye=x.useMemo(()=>l.duration||V||tc,[l.duration,V]),Ae=x.useRef(0),Me=x.useRef(0),At=x.useRef(0),Ke=x.useRef(null),[un,An]=B.split("-"),dn=x.useMemo(()=>v.reduce((oe,de,ve)=>ve>=ue?oe:oe+de.height,0),[v,ue]),Kt=SD(),In=l.invert||f,It=_e==="loading";Me.current=x.useMemo(()=>ue*$+dn,[ue,dn]),x.useEffect(()=>{Ce.current=ye},[ye]),x.useEffect(()=>{z(!0)},[]),x.useEffect(()=>{const oe=De.current;if(oe){const de=oe.getBoundingClientRect().height;return $e(de),b(ve=>[{toastId:l.id,height:de,position:l.position},...ve]),()=>b(ve=>ve.filter(le=>le.toastId!==l.id))}},[b,l.id]),x.useLayoutEffect(()=>{if(!j)return;const oe=De.current,de=oe.style.height;oe.style.height="auto";const ve=oe.getBoundingClientRect().height;oe.style.height=de,$e(ve),b(le=>le.find(xe=>xe.toastId===l.id)?le.map(xe=>xe.toastId===l.id?{...xe,height:ve}:xe):[{toastId:l.id,height:ve,position:l.position},...le])},[j,l.title,l.description,b,l.id,l.jsx,l.action,l.cancel]);const q=x.useCallback(()=>{G(!0),te(Me.current),b(oe=>oe.filter(de=>de.toastId!==l.id)),setTimeout(()=>{M(l)},ID)},[l,M,b,Me]);x.useEffect(()=>{if(l.promise&&_e==="loading"||l.duration===1/0||l.type==="loading")return;let oe;return E||h||Kt?(()=>{if(At.current<Ae.current){const le=new Date().getTime()-Ae.current;Ce.current=Ce.current-le}At.current=new Date().getTime()})():(()=>{Ce.current!==1/0&&(Ae.current=new Date().getTime(),oe=setTimeout(()=>{l.onAutoClose==null||l.onAutoClose.call(l,l),q()},Ce.current))})(),()=>clearTimeout(oe)},[E,h,l,_e,Kt,q]),x.useEffect(()=>{l.delete&&(q(),l.onDismiss==null||l.onDismiss.call(l,l))},[q,l.delete]);function ie(){var oe;if(O!=null&&O.loading){var de;return x.createElement("div",{className:mt(N==null?void 0:N.loader,l==null||(de=l.classNames)==null?void 0:de.loader,"sonner-loader"),"data-visible":_e==="loading"},O.loading)}return x.createElement(gD,{className:mt(N==null?void 0:N.loader,l==null||(oe=l.classNames)==null?void 0:oe.loader),visible:_e==="loading"})}const se=l.icon||(O==null?void 0:O[_e])||pD(_e);var me,ge;return x.createElement("li",{tabIndex:0,ref:De,className:mt(I,St,N==null?void 0:N.toast,l==null||(t=l.classNames)==null?void 0:t.toast,N==null?void 0:N.default,N==null?void 0:N[_e],l==null||(n=l.classNames)==null?void 0:n[_e]),"data-sonner-toast":"","data-rich-colors":(me=l.richColors)!=null?me:C,"data-styled":!(l.jsx||l.unstyled||p),"data-mounted":j,"data-promise":!!l.promise,"data-swiped":ee,"data-removed":U,"data-visible":Pt,"data-y-position":un,"data-x-position":An,"data-index":y,"data-front":Be,"data-swiping":W,"data-dismissible":Ye,"data-type":_e,"data-invert":In,"data-swipe-out":Z,"data-swipe-direction":H,"data-expanded":!!(E||_&&j),style:{"--index":y,"--toasts-before":y,"--z-index":w.length-y,"--offset":`${U?be:Me.current}px`,"--initial-height":_?"auto":`${Te}px`,...S,...l.style},onDragEnd:()=>{X(!1),Y(null),Ke.current=null},onPointerDown:oe=>{oe.button!==2&&(It||!Ye||(Ve.current=new Date,te(Me.current),oe.target.setPointerCapture(oe.pointerId),oe.target.tagName!=="BUTTON"&&(X(!0),Ke.current={x:oe.clientX,y:oe.clientY})))},onPointerUp:()=>{var oe,de,ve;if(Z||!Ye)return;Ke.current=null;const le=Number(((oe=De.current)==null?void 0:oe.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Xe=Number(((de=De.current)==null?void 0:de.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),xe=new Date().getTime()-((ve=Ve.current)==null?void 0:ve.getTime()),Ee=P==="x"?le:Xe,Qe=Math.abs(Ee)/xe;if(Math.abs(Ee)>=AD||Qe>.11){te(Me.current),l.onDismiss==null||l.onDismiss.call(l,l),T(P==="x"?le>0?"right":"left":Xe>0?"down":"up"),q(),Q(!0);return}else{var ze,st;(ze=De.current)==null||ze.style.setProperty("--swipe-amount-x","0px"),(st=De.current)==null||st.style.setProperty("--swipe-amount-y","0px")}ae(!1),X(!1),Y(null)},onPointerMove:oe=>{var de,ve,le;if(!Ke.current||!Ye||((de=window.getSelection())==null?void 0:de.toString().length)>0)return;const xe=oe.clientY-Ke.current.y,Ee=oe.clientX-Ke.current.x;var Qe;const ze=(Qe=e.swipeDirections)!=null?Qe:jD(B);!P&&(Math.abs(Ee)>1||Math.abs(xe)>1)&&Y(Math.abs(Ee)>Math.abs(xe)?"x":"y");let st={x:0,y:0};const $s=Xt=>1/(1.5+Math.abs(Xt)/20);if(P==="y"){if(ze.includes("top")||ze.includes("bottom"))if(ze.includes("top")&&xe<0||ze.includes("bottom")&&xe>0)st.y=xe;else{const Xt=xe*$s(xe);st.y=Math.abs(Xt)<Math.abs(xe)?Xt:xe}}else if(P==="x"&&(ze.includes("left")||ze.includes("right")))if(ze.includes("left")&&Ee<0||ze.includes("right")&&Ee>0)st.x=Ee;else{const Xt=Ee*$s(Ee);st.x=Math.abs(Xt)<Math.abs(Ee)?Xt:Ee}(Math.abs(st.x)>0||Math.abs(st.y)>0)&&ae(!0),(ve=De.current)==null||ve.style.setProperty("--swipe-amount-x",`${st.x}px`),(le=De.current)==null||le.style.setProperty("--swipe-amount-y",`${st.y}px`)}},pe&&!l.jsx&&_e!=="loading"?x.createElement("button",{"aria-label":D,"data-disabled":It,"data-close-button":!0,onClick:It||!Ye?()=>{}:()=>{q(),l.onDismiss==null||l.onDismiss.call(l,l)},className:mt(N==null?void 0:N.closeButton,l==null||(r=l.classNames)==null?void 0:r.closeButton)},(ge=O==null?void 0:O.close)!=null?ge:xD):null,(_e||l.icon||l.promise)&&l.icon!==null&&((O==null?void 0:O[_e])!==null||l.icon)?x.createElement("div",{"data-icon":"",className:mt(N==null?void 0:N.icon,l==null||(o=l.classNames)==null?void 0:o.icon)},l.promise||l.type==="loading"&&!l.icon?l.icon||ie():null,l.type!=="loading"?se:null):null,x.createElement("div",{"data-content":"",className:mt(N==null?void 0:N.content,l==null||(a=l.classNames)==null?void 0:a.content)},x.createElement("div",{"data-title":"",className:mt(N==null?void 0:N.title,l==null||(i=l.classNames)==null?void 0:i.title)},l.jsx?l.jsx:typeof l.title=="function"?l.title():l.title),l.description?x.createElement("div",{"data-description":"",className:mt(L,_t,N==null?void 0:N.description,l==null||(s=l.classNames)==null?void 0:s.description)},typeof l.description=="function"?l.description():l.description):null),x.isValidElement(l.cancel)?l.cancel:l.cancel&&_r(l.cancel)?x.createElement("button",{"data-button":!0,"data-cancel":!0,style:l.cancelButtonStyle||R,onClick:oe=>{_r(l.cancel)&&Ye&&(l.cancel.onClick==null||l.cancel.onClick.call(l.cancel,oe),q())},className:mt(N==null?void 0:N.cancelButton,l==null||(c=l.classNames)==null?void 0:c.cancelButton)},l.cancel.label):null,x.isValidElement(l.action)?l.action:l.action&&_r(l.action)?x.createElement("button",{"data-button":!0,"data-action":!0,style:l.actionButtonStyle||A,onClick:oe=>{_r(l.action)&&(l.action.onClick==null||l.action.onClick.call(l.action,oe),!oe.defaultPrevented&&q())},className:mt(N==null?void 0:N.actionButton,l==null||(u=l.classNames)==null?void 0:u.actionButton)},l.action.label):null)};function nc(){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 LD(e,t){const n={};return[e,t].forEach((r,o)=>{const a=o===1,i=a?"--mobile-offset":"--offset",s=a?TD:OD;function c(u){["top","right","bottom","left"].forEach(f=>{n[`${i}-${f}`]=typeof u=="number"?`${u}px`:u})}typeof r=="number"||typeof r=="string"?c(r):typeof r=="object"?["top","right","bottom","left"].forEach(u=>{r[u]===void 0?n[`${i}-${u}`]=s:n[`${i}-${u}`]=typeof r[u]=="number"?`${r[u]}px`:r[u]}):c(s)}),n}const FD=x.forwardRef(function(t,n){const{invert:r,position:o="bottom-right",hotkey:a=["altKey","KeyT"],expand:i,closeButton:s,className:c,offset:u,mobileOffset:f,theme:l="light",richColors:p,duration:h,style:b,visibleToasts:g=RD,toastOptions:v,dir:y=nc(),gap:w=_D,icons:E,containerAriaLabel:M="Notifications"}=t,[C,k]=x.useState([]),S=x.useMemo(()=>Array.from(new Set([o].concat(C.filter(H=>H.position).map(H=>H.position)))),[C,o]),[R,A]=x.useState([]),[I,L]=x.useState(!1),[V,B]=x.useState(!1),[$,_]=x.useState(l!=="system"?l:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),N=x.useRef(null),O=a.join("+").replace(/Key/g,"").replace(/Digit/g,""),D=x.useRef(null),P=x.useRef(!1),Y=x.useCallback(H=>{k(T=>{var j;return(j=T.find(z=>z.id===H.id))!=null&&j.delete||Ze.dismiss(H.id),T.filter(({id:z})=>z!==H.id)})},[]);return x.useEffect(()=>Ze.subscribe(H=>{if(H.dismiss){requestAnimationFrame(()=>{k(T=>T.map(j=>j.id===H.id?{...j,delete:!0}:j))});return}setTimeout(()=>{er.flushSync(()=>{k(T=>{const j=T.findIndex(z=>z.id===H.id);return j!==-1?[...T.slice(0,j),{...T[j],...H},...T.slice(j+1)]:[H,...T]})})})}),[C]),x.useEffect(()=>{if(l!=="system"){_(l);return}if(l==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?_("dark"):_("light")),typeof window>"u")return;const H=window.matchMedia("(prefers-color-scheme: dark)");try{H.addEventListener("change",({matches:T})=>{_(T?"dark":"light")})}catch{H.addListener(({matches:j})=>{try{_(j?"dark":"light")}catch(z){console.error(z)}})}},[l]),x.useEffect(()=>{C.length<=1&&L(!1)},[C]),x.useEffect(()=>{const H=T=>{var j;if(a.every(G=>T[G]||T.code===G)){var U;L(!0),(U=N.current)==null||U.focus()}T.code==="Escape"&&(document.activeElement===N.current||(j=N.current)!=null&&j.contains(document.activeElement))&&L(!1)};return document.addEventListener("keydown",H),()=>document.removeEventListener("keydown",H)},[a]),x.useEffect(()=>{if(N.current)return()=>{D.current&&(D.current.focus({preventScroll:!0}),D.current=null,P.current=!1)}},[N.current]),x.createElement("section",{ref:n,"aria-label":`${M} ${O}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},S.map((H,T)=>{var j;const[z,U]=H.split("-");return C.length?x.createElement("ol",{key:H,dir:y==="auto"?nc():y,tabIndex:-1,ref:N,className:c,"data-sonner-toaster":!0,"data-sonner-theme":$,"data-y-position":z,"data-x-position":U,style:{"--front-toast-height":`${((j=R[0])==null?void 0:j.height)||0}px`,"--width":`${PD}px`,"--gap":`${w}px`,...b,...LD(u,f)},onBlur:G=>{P.current&&!G.currentTarget.contains(G.relatedTarget)&&(P.current=!1,D.current&&(D.current.focus({preventScroll:!0}),D.current=null))},onFocus:G=>{G.target instanceof HTMLElement&&G.target.dataset.dismissible==="false"||P.current||(P.current=!0,D.current=G.relatedTarget)},onMouseEnter:()=>L(!0),onMouseMove:()=>L(!0),onMouseLeave:()=>{V||L(!1)},onDragEnd:()=>L(!1),onPointerDown:G=>{G.target instanceof HTMLElement&&G.target.dataset.dismissible==="false"||B(!0)},onPointerUp:()=>B(!1)},C.filter(G=>!G.position&&T===0||G.position===H).map((G,W)=>{var X,Z;return x.createElement($D,{key:G.id,icons:E,index:W,toast:G,defaultRichColors:p,duration:(X=v==null?void 0:v.duration)!=null?X:h,className:v==null?void 0:v.className,descriptionClassName:v==null?void 0:v.descriptionClassName,invert:r,visibleToasts:g,closeButton:(Z=v==null?void 0:v.closeButton)!=null?Z:s,interacting:V,position:H,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==G.position),heights:R.filter(Q=>Q.position==G.position),setHeights:A,expandByDefault:i,gap:w,expanded:I,swipeDirections:t.swipeDirections})})):null}))}),WD={error:"bg-red-500 text-white",info:"bg-blue-500 text-white",warning:"bg-amber-500 text-white",success:"bg-green-500 text-white"},BD={error:5e3,info:4e3,warning:5e3,success:4e3},YD={error:m.jsx($h,{className:"w-4 h-4 text-white"}),info:m.jsx(Gh,{className:"w-4 h-4 text-white"}),warning:m.jsx(ng,{className:"w-4 h-4 text-white"}),success:m.jsx(Ih,{className:"w-4 h-4 text-white"})},zD=(e,t)=>{const n=(t==null?void 0:t.variant)||"info",r=WD[n],o=(t==null?void 0:t.icon)??YD[n],a=(t==null?void 0:t.iconPosition)??"left",i=c=>m.jsxs("div",{className:`flex items-center justify-between w-full p-3 rounded-md shadow-md ${r}`,children:[m.jsxs("div",{className:"flex items-center",children:[o&&a==="left"&&m.jsx("div",{className:"mr-3",children:o}),m.jsxs("div",{children:[m.jsx("p",{className:"text-sm font-semibold",children:e}),(t==null?void 0:t.description)&&m.jsx("p",{className:"text-sm text-white/90",children:t.description})]})]}),m.jsxs("div",{className:"flex items-center",children:[o&&a==="right"&&m.jsx("div",{className:"ml-3",children:o}),(t==null?void 0:t.action)&&m.jsx(kt,{variant:"ghost",size:"small",className:"ml-3 text-white hover:text-black/80",onClick:t.action.onClick,children:t.action.label}),m.jsx(kt,{variant:"ghost",size:"icon.large",className:"ml-3 text-white hover:text-black/80",onClick:()=>ec.dismiss(c),children:m.jsx(cn,{className:"w-4 h-4",strokeWidth:2.5})})]})]}),s={unstyled:!0,duration:(t==null?void 0:t.duration)||BD[n],style:{padding:0,margin:0,border:"none",background:"none"}};return ec.custom(i,s)};function HD(e){return m.jsx(FD,{...e})}var UD="DismissableLayer",Aa="dismissableLayer.update",GD="dismissableLayer.pointerDownOutside",qD="dismissableLayer.focusOutside",rc,gp=d.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),vp=d.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:i,onDismiss:s,...c}=e,u=d.useContext(gp),[f,l]=d.useState(null),p=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,h]=d.useState({}),b=fe(t,S=>l(S)),g=Array.from(u.layers),[v]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),y=g.indexOf(v),w=f?g.indexOf(f):-1,E=u.layersWithOutsidePointerEventsDisabled.size>0,M=w>=y,C=XD(S=>{const R=S.target,A=[...u.branches].some(I=>I.contains(R));!M||A||(o==null||o(S),i==null||i(S),S.defaultPrevented||s==null||s())},p),k=ZD(S=>{const R=S.target;[...u.branches].some(I=>I.contains(R))||(a==null||a(S),i==null||i(S),S.defaultPrevented||s==null||s())},p);return rr(S=>{w===u.layers.size-1&&(r==null||r(S),!S.defaultPrevented&&s&&(S.preventDefault(),s()))},p),d.useEffect(()=>{if(f)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(rc=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(f)),u.layers.add(f),oc(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=rc)}},[f,p,n,u]),d.useEffect(()=>()=>{f&&(u.layers.delete(f),u.layersWithOutsidePointerEventsDisabled.delete(f),oc())},[f,u]),d.useEffect(()=>{const S=()=>h({});return document.addEventListener(Aa,S),()=>document.removeEventListener(Aa,S)},[]),m.jsx(J.div,{...c,ref:b,style:{pointerEvents:E?M?"auto":"none":void 0,...e.style},onFocusCapture:K(e.onFocusCapture,k.onFocusCapture),onBlurCapture:K(e.onBlurCapture,k.onBlurCapture),onPointerDownCapture:K(e.onPointerDownCapture,C.onPointerDownCapture)})});vp.displayName=UD;var VD="DismissableLayerBranch",KD=d.forwardRef((e,t)=>{const n=d.useContext(gp),r=d.useRef(null),o=fe(t,r);return d.useEffect(()=>{const a=r.current;if(a)return n.branches.add(a),()=>{n.branches.delete(a)}},[n.branches]),m.jsx(J.div,{...e,ref:o})});KD.displayName=VD;function XD(e,t=globalThis==null?void 0:globalThis.document){const n=je(e),r=d.useRef(!1),o=d.useRef(()=>{});return d.useEffect(()=>{const a=s=>{if(s.target&&!r.current){let c=function(){bp(GD,n,u,{discrete:!0})};const u={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=c,t.addEventListener("click",o.current,{once:!0})):c()}else t.removeEventListener("click",o.current);r.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",a),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function ZD(e,t=globalThis==null?void 0:globalThis.document){const n=je(e),r=d.useRef(!1);return d.useEffect(()=>{const o=a=>{a.target&&!r.current&&bp(qD,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 oc(){const e=new CustomEvent(Aa);document.dispatchEvent(e)}function bp(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?kn(o,a):o.dispatchEvent(a)}var[ko,PM]=Ge("Tooltip",[Ht]),Ro=Ht(),yp="TooltipProvider",QD=700,Ia="tooltip.open",[JD,js]=ko(yp),wp=e=>{const{__scopeTooltip:t,delayDuration:n=QD,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:a}=e,i=d.useRef(!0),s=d.useRef(!1),c=d.useRef(0);return d.useEffect(()=>{const u=c.current;return()=>window.clearTimeout(u)},[]),m.jsx(JD,{scope:t,isOpenDelayedRef:i,delayDuration:n,onOpen:d.useCallback(()=>{window.clearTimeout(c.current),i.current=!1},[]),onClose:d.useCallback(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>i.current=!0,r)},[r]),isPointerInTransitRef:s,onPointerInTransitChange:d.useCallback(u=>{s.current=u},[]),disableHoverableContent:o,children:a})};wp.displayName=yp;var Jn="Tooltip",[eM,Oo]=ko(Jn),xp=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o,onOpenChange:a,disableHoverableContent:i,delayDuration:s}=e,c=js(Jn,e.__scopeTooltip),u=Ro(t),[f,l]=d.useState(null),p=Pe(),h=d.useRef(0),b=i??c.disableHoverableContent,g=s??c.delayDuration,v=d.useRef(!1),[y,w]=ot({prop:r,defaultProp:o??!1,onChange:S=>{S?(c.onOpen(),document.dispatchEvent(new CustomEvent(Ia))):c.onClose(),a==null||a(S)},caller:Jn}),E=d.useMemo(()=>y?v.current?"delayed-open":"instant-open":"closed",[y]),M=d.useCallback(()=>{window.clearTimeout(h.current),h.current=0,v.current=!1,w(!0)},[w]),C=d.useCallback(()=>{window.clearTimeout(h.current),h.current=0,w(!1)},[w]),k=d.useCallback(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>{v.current=!0,w(!0),h.current=0},g)},[g,w]);return d.useEffect(()=>()=>{h.current&&(window.clearTimeout(h.current),h.current=0)},[]),m.jsx(sr,{...u,children:m.jsx(eM,{scope:t,contentId:p,open:y,stateAttribute:E,trigger:f,onTriggerChange:l,onTriggerEnter:d.useCallback(()=>{c.isOpenDelayedRef.current?k():M()},[c.isOpenDelayedRef,k,M]),onTriggerLeave:d.useCallback(()=>{b?C():(window.clearTimeout(h.current),h.current=0)},[C,b]),onOpen:M,onClose:C,disableHoverableContent:b,children:n})})};xp.displayName=Jn;var ja="TooltipTrigger",Sp=d.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Oo(ja,n),a=js(ja,n),i=Ro(n),s=d.useRef(null),c=fe(t,s,o.onTriggerChange),u=d.useRef(!1),f=d.useRef(!1),l=d.useCallback(()=>u.current=!1,[]);return d.useEffect(()=>()=>document.removeEventListener("pointerup",l),[l]),m.jsx(ir,{asChild:!0,...i,children:m.jsx(J.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:c,onPointerMove:K(e.onPointerMove,p=>{p.pointerType!=="touch"&&!f.current&&!a.isPointerInTransitRef.current&&(o.onTriggerEnter(),f.current=!0)}),onPointerLeave:K(e.onPointerLeave,()=>{o.onTriggerLeave(),f.current=!1}),onPointerDown:K(e.onPointerDown,()=>{o.open&&o.onClose(),u.current=!0,document.addEventListener("pointerup",l,{once:!0})}),onFocus:K(e.onFocus,()=>{u.current||o.onOpen()}),onBlur:K(e.onBlur,o.onClose),onClick:K(e.onClick,o.onClose)})})});Sp.displayName=ja;var tM="TooltipPortal",[_M,nM]=ko(tM,{forceMount:void 0}),Dn="TooltipContent",Ep=d.forwardRef((e,t)=>{const n=nM(Dn,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...a}=e,i=Oo(Dn,e.__scopeTooltip);return m.jsx(at,{present:r||i.open,children:i.disableHoverableContent?m.jsx(Cp,{side:o,...a,ref:t}):m.jsx(rM,{side:o,...a,ref:t})})}),rM=d.forwardRef((e,t)=>{const n=Oo(Dn,e.__scopeTooltip),r=js(Dn,e.__scopeTooltip),o=d.useRef(null),a=fe(t,o),[i,s]=d.useState(null),{trigger:c,onClose:u}=n,f=o.current,{onPointerInTransitChange:l}=r,p=d.useCallback(()=>{s(null),l(!1)},[l]),h=d.useCallback((b,g)=>{const v=b.currentTarget,y={x:b.clientX,y:b.clientY},w=iM(y,v.getBoundingClientRect()),E=cM(y,w),M=lM(g.getBoundingClientRect()),C=dM([...E,...M]);s(C),l(!0)},[l]);return d.useEffect(()=>()=>p(),[p]),d.useEffect(()=>{if(c&&f){const b=v=>h(v,f),g=v=>h(v,c);return c.addEventListener("pointerleave",b),f.addEventListener("pointerleave",g),()=>{c.removeEventListener("pointerleave",b),f.removeEventListener("pointerleave",g)}}},[c,f,h,p]),d.useEffect(()=>{if(i){const b=g=>{const v=g.target,y={x:g.clientX,y:g.clientY},w=(c==null?void 0:c.contains(v))||(f==null?void 0:f.contains(v)),E=!uM(y,i);w?p():E&&(p(),u())};return document.addEventListener("pointermove",b),()=>document.removeEventListener("pointermove",b)}},[c,f,i,u,p]),m.jsx(Cp,{...e,ref:a})}),[oM,aM]=ko(Jn,{isInside:!1}),sM=Tp("TooltipContent"),Cp=d.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:a,onPointerDownOutside:i,...s}=e,c=Oo(Dn,n),u=Ro(n),{onClose:f}=c;return d.useEffect(()=>(document.addEventListener(Ia,f),()=>document.removeEventListener(Ia,f)),[f]),d.useEffect(()=>{if(c.trigger){const l=p=>{const h=p.target;h!=null&&h.contains(c.trigger)&&f()};return window.addEventListener("scroll",l,{capture:!0}),()=>window.removeEventListener("scroll",l,{capture:!0})}},[c.trigger,f]),m.jsx(vp,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:i,onFocusOutside:l=>l.preventDefault(),onDismiss:f,children:m.jsxs(so,{"data-state":c.stateAttribute,...u,...s,ref:t,style:{...s.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:[m.jsx(sM,{children:r}),m.jsx(oM,{scope:n,isInside:!0,children:m.jsx(ny,{id:c.contentId,role:"tooltip",children:o||r})})]})})});Ep.displayName=Dn;var Dp="TooltipArrow",Mp=d.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Ro(n);return aM(Dp,n).isInside?null:m.jsx(io,{...o,...r,ref:t})});Mp.displayName=Dp;function iM(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 cM(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 lM(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 uM(e,t){const{x:n,y:r}=e;let o=!1;for(let a=0,i=t.length-1;a<t.length;i=a++){const s=t[a],c=t[i],u=s.x,f=s.y,l=c.x,p=c.y;f>r!=p>r&&n<(l-u)*(r-f)/(p-f)+u&&(o=!o)}return o}function dM(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),fM(t)}function fM(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],i=t[t.length-2];if((a.x-i.x)*(o.y-i.y)>=(a.y-i.y)*(o.x-i.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],i=n[n.length-2];if((a.x-i.x)*(o.y-i.y)>=(a.y-i.y)*(o.x-i.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 mM=wp,pM=xp,hM=Sp,Np=Ep,gM=Mp;const vM=mM,bM=pM,yM=hM,kp=d.forwardRef(({className:e,sideOffset:t=4,children:n,...r},o)=>m.jsxs(Np,{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,m.jsx(gM,{className:"fill-background stroke-border h-2 w-4"})]}));kp.displayName=Np.displayName;exports.ComponentVariant=lS;exports.DoctAddressFormSection=r1;exports.DoctAlert=kd;exports.DoctAlertDescription=Od;exports.DoctAlertTitle=Rd;exports.DoctAnimationLoader=vh;exports.DoctAutoComplete=aS;exports.DoctAutocomplete=gS;exports.DoctAvatar=Wd;exports.DoctAvatarFallback=Yd;exports.DoctAvatarImage=Bd;exports.DoctButton=kt;exports.DoctCheckbox=Xd;exports.DoctChip=V0;exports.DoctCircularProgress=yc;exports.DoctComponentSection=cS;exports.DoctContactFormSection=a1;exports.DoctCurrencyInput=wd;exports.DoctDatePickerField=Kr;exports.DoctDialog=X1;exports.DoctDialogClose=J1;exports.DoctDialogContent=dd;exports.DoctDialogDescription=hd;exports.DoctDialogFooter=md;exports.DoctDialogHeader=fd;exports.DoctDialogTitle=pd;exports.DoctDialogTrigger=Z1;exports.DoctDrawer=lf;exports.DoctDrawerClose=pE;exports.DoctDrawerContent=df;exports.DoctDrawerDescription=hf;exports.DoctDrawerFooter=mf;exports.DoctDrawerHeader=ff;exports.DoctDrawerTitle=pf;exports.DoctDrawerTrigger=fE;exports.DoctDropdownMenu=YC;exports.DoctDropdownMenuCheckboxItem=Nm;exports.DoctDropdownMenuContent=Dm;exports.DoctDropdownMenuGroup=zC;exports.DoctDropdownMenuItem=Mm;exports.DoctDropdownMenuLabel=Rm;exports.DoctDropdownMenuRadioGroup=UC;exports.DoctDropdownMenuRadioItem=km;exports.DoctDropdownMenuSeparator=Om;exports.DoctDropdownMenuShortcut=Tm;exports.DoctDropdownMenuSub=HC;exports.DoctDropdownMenuSubContent=Cm;exports.DoctDropdownMenuSubTrigger=Em;exports.DoctDropdownMenuTrigger=Sm;exports.DoctExpandableCard=ES;exports.DoctLabeledInput=nt;exports.DoctManualDatePickerField=q0;exports.DoctOtpInput=xh;exports.DoctPasswordInput=ua;exports.DoctPopover=Za;exports.DoctPopoverContent=fo;exports.DoctPopoverTrigger=Qa;exports.DoctProgress=hp;exports.DoctRadioGroup=Gm;exports.DoctRadioGroupItem=qm;exports.DoctSearchFilterSection=J0;exports.DoctSearchInput=Iu;exports.DoctSelectField=Cn;exports.DoctTabs=aD;exports.DoctTabsContent=lp;exports.DoctTabsList=ip;exports.DoctTabsTrigger=cp;exports.DoctTextareaField=Fa;exports.DoctToaster=HD;exports.DoctTooltip=bM;exports.DoctTooltipContent=kp;exports.DoctTooltipProvider=vM;exports.DoctTooltipTrigger=yM;exports.DoctTypography=la;exports.DoctUserRegistrationSection=t1;exports.doctToast=zD;
225
+ Defaulting to \`null\`.`}var mp=lp,fD=dp;const pp=d.forwardRef(({className:e,value:t,...n},r)=>m.jsx(mp,{ref:r,className:L("relative h-1.5 w-full overflow-hidden rounded-full bg-secondary",e),...n,children:m.jsx(fD,{className:"h-full w-full flex-1 bg-brandBlue transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})}));pp.displayName=mp.displayName;function mD(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 pD=e=>{switch(e){case"success":return vD;case"info":return yD;case"warning":return bD;case"error":return wD;default:return null}},hD=Array(12).fill(0),gD=({visible:e,className:t})=>x.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},x.createElement("div",{className:"sonner-spinner"},hD.map((n,r)=>x.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),vD=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"})),bD=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"})),yD=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"})),wD=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"})),xD=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"})),SD=()=>{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 _a=1;class ED{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:_a++,i=this.toasts.find(c=>c.id===a),s=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(a)&&this.dismissedToasts.delete(a),i?this.toasts=this.toasts.map(c=>c.id===a?(this.publish({...c,...t,id:a,title:r}),{...c,...t,id:a,dismissible:s,title:r}):c):this.addToast({title:r,...o,dismissible:s,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,i;const s=o.then(async u=>{if(i=["resolve",u],x.isValidElement(u))a=!1,this.create({id:r,type:"default",message:u});else if(DD(u)&&!u.ok){a=!1;const l=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,b=typeof l=="object"&&!x.isValidElement(l)?l:{message:l};this.create({id:r,type:"error",description:p,...b})}else if(u instanceof Error){a=!1;const l=typeof n.error=="function"?await n.error(u):n.error,p=typeof n.description=="function"?await n.description(u):n.description,b=typeof l=="object"&&!x.isValidElement(l)?l:{message:l};this.create({id:r,type:"error",description:p,...b})}else if(n.success!==void 0){a=!1;const l=typeof n.success=="function"?await n.success(u):n.success,p=typeof n.description=="function"?await n.description(u):n.description,b=typeof l=="object"&&!x.isValidElement(l)?l:{message:l};this.create({id:r,type:"success",description:p,...b})}}).catch(async u=>{if(i=["reject",u],n.error!==void 0){a=!1;const f=typeof n.error=="function"?await n.error(u):n.error,l=typeof n.description=="function"?await n.description(u):n.description,h=typeof f=="object"&&!x.isValidElement(f)?f:{message:f};this.create({id:r,type:"error",description:l,...h})}}).finally(()=>{a&&(this.dismiss(r),r=void 0),n.finally==null||n.finally.call(n)}),c=()=>new Promise((u,f)=>s.then(()=>i[0]==="reject"?f(i[1]):u(i[1])).catch(f));return typeof r!="string"&&typeof r!="number"?{unwrap:c}:Object.assign(r,{unwrap:c})},this.custom=(t,n)=>{const r=(n==null?void 0:n.id)||_a++;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 Ze=new ED,CD=(e,t)=>{const n=(t==null?void 0:t.id)||_a++;return Ze.addToast({title:e,...t,id:n}),n},DD=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",MD=CD,ND=()=>Ze.toasts,kD=()=>Ze.getActiveToasts(),Ji=Object.assign(MD,{success:Ze.success,info:Ze.info,warning:Ze.warning,error:Ze.error,custom:Ze.custom,message:Ze.message,promise:Ze.promise,dismiss:Ze.dismiss,loading:Ze.loading},{getHistory:ND,getToasts:kD});mD("[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 Pr(e){return e.label!==void 0}const RD=3,OD="24px",TD="16px",ec=4e3,PD=356,_D=14,AD=45,ID=200;function mt(...e){return e.filter(Boolean).join(" ")}function jD(e){const[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}const $D=e=>{var t,n,r,o,a,i,s,c,u;const{invert:f,toast:l,unstyled:p,interacting:h,setHeights:b,visibleToasts:g,heights:v,index:w,toasts:y,expanded:E,removeToast:M,defaultRichColors:C,closeButton:R,style:S,cancelButtonStyle:k,actionButtonStyle:I,className:A="",descriptionClassName:W="",duration:G,position:B,gap:$,expandByDefault:O,classNames:D,icons:_,closeButtonAriaLabel:N="Close toast"}=e,[P,Y]=x.useState(null),[H,T]=x.useState(null),[j,z]=x.useState(!1),[U,q]=x.useState(!1),[F,X]=x.useState(!1),[Z,Q]=x.useState(!1),[ee,ae]=x.useState(!1),[be,te]=x.useState(0),[Te,$e]=x.useState(0),Ce=x.useRef(l.duration||G||ec),Ve=x.useRef(null),De=x.useRef(null),Be=w===0,Pt=w+1<=g,_e=l.type,Ye=l.dismissible!==!1,St=l.className||"",_t=l.descriptionClassName||"",ue=x.useMemo(()=>v.findIndex(oe=>oe.toastId===l.id)||0,[v,l.id]),pe=x.useMemo(()=>{var oe;return(oe=l.closeButton)!=null?oe:R},[l.closeButton,R]),ye=x.useMemo(()=>l.duration||G||ec,[l.duration,G]),Ae=x.useRef(0),Me=x.useRef(0),At=x.useRef(0),Ke=x.useRef(null),[un,An]=B.split("-"),dn=x.useMemo(()=>v.reduce((oe,de,ve)=>ve>=ue?oe:oe+de.height,0),[v,ue]),Kt=SD(),In=l.invert||f,It=_e==="loading";Me.current=x.useMemo(()=>ue*$+dn,[ue,dn]),x.useEffect(()=>{Ce.current=ye},[ye]),x.useEffect(()=>{z(!0)},[]),x.useEffect(()=>{const oe=De.current;if(oe){const de=oe.getBoundingClientRect().height;return $e(de),b(ve=>[{toastId:l.id,height:de,position:l.position},...ve]),()=>b(ve=>ve.filter(le=>le.toastId!==l.id))}},[b,l.id]),x.useLayoutEffect(()=>{if(!j)return;const oe=De.current,de=oe.style.height;oe.style.height="auto";const ve=oe.getBoundingClientRect().height;oe.style.height=de,$e(ve),b(le=>le.find(xe=>xe.toastId===l.id)?le.map(xe=>xe.toastId===l.id?{...xe,height:ve}:xe):[{toastId:l.id,height:ve,position:l.position},...le])},[j,l.title,l.description,b,l.id,l.jsx,l.action,l.cancel]);const V=x.useCallback(()=>{q(!0),te(Me.current),b(oe=>oe.filter(de=>de.toastId!==l.id)),setTimeout(()=>{M(l)},ID)},[l,M,b,Me]);x.useEffect(()=>{if(l.promise&&_e==="loading"||l.duration===1/0||l.type==="loading")return;let oe;return E||h||Kt?(()=>{if(At.current<Ae.current){const le=new Date().getTime()-Ae.current;Ce.current=Ce.current-le}At.current=new Date().getTime()})():(()=>{Ce.current!==1/0&&(Ae.current=new Date().getTime(),oe=setTimeout(()=>{l.onAutoClose==null||l.onAutoClose.call(l,l),V()},Ce.current))})(),()=>clearTimeout(oe)},[E,h,l,_e,Kt,V]),x.useEffect(()=>{l.delete&&(V(),l.onDismiss==null||l.onDismiss.call(l,l))},[V,l.delete]);function ie(){var oe;if(_!=null&&_.loading){var de;return x.createElement("div",{className:mt(D==null?void 0:D.loader,l==null||(de=l.classNames)==null?void 0:de.loader,"sonner-loader"),"data-visible":_e==="loading"},_.loading)}return x.createElement(gD,{className:mt(D==null?void 0:D.loader,l==null||(oe=l.classNames)==null?void 0:oe.loader),visible:_e==="loading"})}const se=l.icon||(_==null?void 0:_[_e])||pD(_e);var me,ge;return x.createElement("li",{tabIndex:0,ref:De,className:mt(A,St,D==null?void 0:D.toast,l==null||(t=l.classNames)==null?void 0:t.toast,D==null?void 0:D.default,D==null?void 0:D[_e],l==null||(n=l.classNames)==null?void 0:n[_e]),"data-sonner-toast":"","data-rich-colors":(me=l.richColors)!=null?me:C,"data-styled":!(l.jsx||l.unstyled||p),"data-mounted":j,"data-promise":!!l.promise,"data-swiped":ee,"data-removed":U,"data-visible":Pt,"data-y-position":un,"data-x-position":An,"data-index":w,"data-front":Be,"data-swiping":F,"data-dismissible":Ye,"data-type":_e,"data-invert":In,"data-swipe-out":Z,"data-swipe-direction":H,"data-expanded":!!(E||O&&j),style:{"--index":w,"--toasts-before":w,"--z-index":y.length-w,"--offset":`${U?be:Me.current}px`,"--initial-height":O?"auto":`${Te}px`,...S,...l.style},onDragEnd:()=>{X(!1),Y(null),Ke.current=null},onPointerDown:oe=>{oe.button!==2&&(It||!Ye||(Ve.current=new Date,te(Me.current),oe.target.setPointerCapture(oe.pointerId),oe.target.tagName!=="BUTTON"&&(X(!0),Ke.current={x:oe.clientX,y:oe.clientY})))},onPointerUp:()=>{var oe,de,ve;if(Z||!Ye)return;Ke.current=null;const le=Number(((oe=De.current)==null?void 0:oe.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Xe=Number(((de=De.current)==null?void 0:de.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),xe=new Date().getTime()-((ve=Ve.current)==null?void 0:ve.getTime()),Ee=P==="x"?le:Xe,Qe=Math.abs(Ee)/xe;if(Math.abs(Ee)>=AD||Qe>.11){te(Me.current),l.onDismiss==null||l.onDismiss.call(l,l),T(P==="x"?le>0?"right":"left":Xe>0?"down":"up"),V(),Q(!0);return}else{var ze,st;(ze=De.current)==null||ze.style.setProperty("--swipe-amount-x","0px"),(st=De.current)==null||st.style.setProperty("--swipe-amount-y","0px")}ae(!1),X(!1),Y(null)},onPointerMove:oe=>{var de,ve,le;if(!Ke.current||!Ye||((de=window.getSelection())==null?void 0:de.toString().length)>0)return;const xe=oe.clientY-Ke.current.y,Ee=oe.clientX-Ke.current.x;var Qe;const ze=(Qe=e.swipeDirections)!=null?Qe:jD(B);!P&&(Math.abs(Ee)>1||Math.abs(xe)>1)&&Y(Math.abs(Ee)>Math.abs(xe)?"x":"y");let st={x:0,y:0};const $s=Xt=>1/(1.5+Math.abs(Xt)/20);if(P==="y"){if(ze.includes("top")||ze.includes("bottom"))if(ze.includes("top")&&xe<0||ze.includes("bottom")&&xe>0)st.y=xe;else{const Xt=xe*$s(xe);st.y=Math.abs(Xt)<Math.abs(xe)?Xt:xe}}else if(P==="x"&&(ze.includes("left")||ze.includes("right")))if(ze.includes("left")&&Ee<0||ze.includes("right")&&Ee>0)st.x=Ee;else{const Xt=Ee*$s(Ee);st.x=Math.abs(Xt)<Math.abs(Ee)?Xt:Ee}(Math.abs(st.x)>0||Math.abs(st.y)>0)&&ae(!0),(ve=De.current)==null||ve.style.setProperty("--swipe-amount-x",`${st.x}px`),(le=De.current)==null||le.style.setProperty("--swipe-amount-y",`${st.y}px`)}},pe&&!l.jsx&&_e!=="loading"?x.createElement("button",{"aria-label":N,"data-disabled":It,"data-close-button":!0,onClick:It||!Ye?()=>{}:()=>{V(),l.onDismiss==null||l.onDismiss.call(l,l)},className:mt(D==null?void 0:D.closeButton,l==null||(r=l.classNames)==null?void 0:r.closeButton)},(ge=_==null?void 0:_.close)!=null?ge:xD):null,(_e||l.icon||l.promise)&&l.icon!==null&&((_==null?void 0:_[_e])!==null||l.icon)?x.createElement("div",{"data-icon":"",className:mt(D==null?void 0:D.icon,l==null||(o=l.classNames)==null?void 0:o.icon)},l.promise||l.type==="loading"&&!l.icon?l.icon||ie():null,l.type!=="loading"?se:null):null,x.createElement("div",{"data-content":"",className:mt(D==null?void 0:D.content,l==null||(a=l.classNames)==null?void 0:a.content)},x.createElement("div",{"data-title":"",className:mt(D==null?void 0:D.title,l==null||(i=l.classNames)==null?void 0:i.title)},l.jsx?l.jsx:typeof l.title=="function"?l.title():l.title),l.description?x.createElement("div",{"data-description":"",className:mt(W,_t,D==null?void 0:D.description,l==null||(s=l.classNames)==null?void 0:s.description)},typeof l.description=="function"?l.description():l.description):null),x.isValidElement(l.cancel)?l.cancel:l.cancel&&Pr(l.cancel)?x.createElement("button",{"data-button":!0,"data-cancel":!0,style:l.cancelButtonStyle||k,onClick:oe=>{Pr(l.cancel)&&Ye&&(l.cancel.onClick==null||l.cancel.onClick.call(l.cancel,oe),V())},className:mt(D==null?void 0:D.cancelButton,l==null||(c=l.classNames)==null?void 0:c.cancelButton)},l.cancel.label):null,x.isValidElement(l.action)?l.action:l.action&&Pr(l.action)?x.createElement("button",{"data-button":!0,"data-action":!0,style:l.actionButtonStyle||I,onClick:oe=>{Pr(l.action)&&(l.action.onClick==null||l.action.onClick.call(l.action,oe),!oe.defaultPrevented&&V())},className:mt(D==null?void 0:D.actionButton,l==null||(u=l.classNames)==null?void 0:u.actionButton)},l.action.label):null)};function tc(){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 LD(e,t){const n={};return[e,t].forEach((r,o)=>{const a=o===1,i=a?"--mobile-offset":"--offset",s=a?TD:OD;function c(u){["top","right","bottom","left"].forEach(f=>{n[`${i}-${f}`]=typeof u=="number"?`${u}px`:u})}typeof r=="number"||typeof r=="string"?c(r):typeof r=="object"?["top","right","bottom","left"].forEach(u=>{r[u]===void 0?n[`${i}-${u}`]=s:n[`${i}-${u}`]=typeof r[u]=="number"?`${r[u]}px`:r[u]}):c(s)}),n}const FD=x.forwardRef(function(t,n){const{invert:r,position:o="bottom-right",hotkey:a=["altKey","KeyT"],expand:i,closeButton:s,className:c,offset:u,mobileOffset:f,theme:l="light",richColors:p,duration:h,style:b,visibleToasts:g=RD,toastOptions:v,dir:w=tc(),gap:y=_D,icons:E,containerAriaLabel:M="Notifications"}=t,[C,R]=x.useState([]),S=x.useMemo(()=>Array.from(new Set([o].concat(C.filter(H=>H.position).map(H=>H.position)))),[C,o]),[k,I]=x.useState([]),[A,W]=x.useState(!1),[G,B]=x.useState(!1),[$,O]=x.useState(l!=="system"?l:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),D=x.useRef(null),_=a.join("+").replace(/Key/g,"").replace(/Digit/g,""),N=x.useRef(null),P=x.useRef(!1),Y=x.useCallback(H=>{R(T=>{var j;return(j=T.find(z=>z.id===H.id))!=null&&j.delete||Ze.dismiss(H.id),T.filter(({id:z})=>z!==H.id)})},[]);return x.useEffect(()=>Ze.subscribe(H=>{if(H.dismiss){requestAnimationFrame(()=>{R(T=>T.map(j=>j.id===H.id?{...j,delete:!0}:j))});return}setTimeout(()=>{Jr.flushSync(()=>{R(T=>{const j=T.findIndex(z=>z.id===H.id);return j!==-1?[...T.slice(0,j),{...T[j],...H},...T.slice(j+1)]:[H,...T]})})})}),[C]),x.useEffect(()=>{if(l!=="system"){O(l);return}if(l==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?O("dark"):O("light")),typeof window>"u")return;const H=window.matchMedia("(prefers-color-scheme: dark)");try{H.addEventListener("change",({matches:T})=>{O(T?"dark":"light")})}catch{H.addListener(({matches:j})=>{try{O(j?"dark":"light")}catch(z){console.error(z)}})}},[l]),x.useEffect(()=>{C.length<=1&&W(!1)},[C]),x.useEffect(()=>{const H=T=>{var j;if(a.every(q=>T[q]||T.code===q)){var U;W(!0),(U=D.current)==null||U.focus()}T.code==="Escape"&&(document.activeElement===D.current||(j=D.current)!=null&&j.contains(document.activeElement))&&W(!1)};return document.addEventListener("keydown",H),()=>document.removeEventListener("keydown",H)},[a]),x.useEffect(()=>{if(D.current)return()=>{N.current&&(N.current.focus({preventScroll:!0}),N.current=null,P.current=!1)}},[D.current]),x.createElement("section",{ref:n,"aria-label":`${M} ${_}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},S.map((H,T)=>{var j;const[z,U]=H.split("-");return C.length?x.createElement("ol",{key:H,dir:w==="auto"?tc():w,tabIndex:-1,ref:D,className:c,"data-sonner-toaster":!0,"data-sonner-theme":$,"data-y-position":z,"data-x-position":U,style:{"--front-toast-height":`${((j=k[0])==null?void 0:j.height)||0}px`,"--width":`${PD}px`,"--gap":`${y}px`,...b,...LD(u,f)},onBlur:q=>{P.current&&!q.currentTarget.contains(q.relatedTarget)&&(P.current=!1,N.current&&(N.current.focus({preventScroll:!0}),N.current=null))},onFocus:q=>{q.target instanceof HTMLElement&&q.target.dataset.dismissible==="false"||P.current||(P.current=!0,N.current=q.relatedTarget)},onMouseEnter:()=>W(!0),onMouseMove:()=>W(!0),onMouseLeave:()=>{G||W(!1)},onDragEnd:()=>W(!1),onPointerDown:q=>{q.target instanceof HTMLElement&&q.target.dataset.dismissible==="false"||B(!0)},onPointerUp:()=>B(!1)},C.filter(q=>!q.position&&T===0||q.position===H).map((q,F)=>{var X,Z;return x.createElement($D,{key:q.id,icons:E,index:F,toast:q,defaultRichColors:p,duration:(X=v==null?void 0:v.duration)!=null?X:h,className:v==null?void 0:v.className,descriptionClassName:v==null?void 0:v.descriptionClassName,invert:r,visibleToasts:g,closeButton:(Z=v==null?void 0:v.closeButton)!=null?Z:s,interacting:G,position:H,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==q.position),heights:k.filter(Q=>Q.position==q.position),setHeights:I,expandByDefault:i,gap:y,expanded:A,swipeDirections:t.swipeDirections})})):null}))}),WD={error:"bg-red-500 text-white",info:"bg-blue-500 text-white",warning:"bg-amber-500 text-white",success:"bg-green-500 text-white"},BD={error:5e3,info:4e3,warning:5e3,success:4e3},YD={error:m.jsx(jh,{className:"w-4 h-4 text-white"}),info:m.jsx(Uh,{className:"w-4 h-4 text-white"}),warning:m.jsx(tg,{className:"w-4 h-4 text-white"}),success:m.jsx(Ah,{className:"w-4 h-4 text-white"})},zD=(e,t)=>{const n=(t==null?void 0:t.variant)||"info",r=WD[n],o=(t==null?void 0:t.icon)??YD[n],a=(t==null?void 0:t.iconPosition)??"left",i=c=>m.jsxs("div",{className:`flex items-center justify-between w-full p-3 rounded-md shadow-md ${r}`,children:[m.jsxs("div",{className:"flex items-center",children:[o&&a==="left"&&m.jsx("div",{className:"mr-3",children:o}),m.jsxs("div",{children:[m.jsx("p",{className:"text-sm font-semibold",children:e}),(t==null?void 0:t.description)&&m.jsx("p",{className:"text-sm text-white/90",children:t.description})]})]}),m.jsxs("div",{className:"flex items-center",children:[o&&a==="right"&&m.jsx("div",{className:"ml-3",children:o}),(t==null?void 0:t.action)&&m.jsx(kt,{variant:"ghost",size:"small",className:"ml-3 text-white hover:text-black/80",onClick:t.action.onClick,children:t.action.label}),m.jsx(kt,{variant:"ghost",size:"icon.large",className:"ml-3 text-white hover:text-black/80",onClick:()=>Ji.dismiss(c),children:m.jsx(cn,{className:"w-4 h-4",strokeWidth:2.5})})]})]}),s={unstyled:!0,duration:(t==null?void 0:t.duration)||BD[n],style:{padding:0,margin:0,border:"none",background:"none"}};return Ji.custom(i,s)};function HD(e){return m.jsx(FD,{...e})}var UD="DismissableLayer",Aa="dismissableLayer.update",GD="dismissableLayer.pointerDownOutside",qD="dismissableLayer.focusOutside",nc,hp=d.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),gp=d.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:i,onDismiss:s,...c}=e,u=d.useContext(hp),[f,l]=d.useState(null),p=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,h]=d.useState({}),b=fe(t,S=>l(S)),g=Array.from(u.layers),[v]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),w=g.indexOf(v),y=f?g.indexOf(f):-1,E=u.layersWithOutsidePointerEventsDisabled.size>0,M=y>=w,C=XD(S=>{const k=S.target,I=[...u.branches].some(A=>A.contains(k));!M||I||(o==null||o(S),i==null||i(S),S.defaultPrevented||s==null||s())},p),R=ZD(S=>{const k=S.target;[...u.branches].some(A=>A.contains(k))||(a==null||a(S),i==null||i(S),S.defaultPrevented||s==null||s())},p);return nr(S=>{y===u.layers.size-1&&(r==null||r(S),!S.defaultPrevented&&s&&(S.preventDefault(),s()))},p),d.useEffect(()=>{if(f)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(nc=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(f)),u.layers.add(f),rc(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=nc)}},[f,p,n,u]),d.useEffect(()=>()=>{f&&(u.layers.delete(f),u.layersWithOutsidePointerEventsDisabled.delete(f),rc())},[f,u]),d.useEffect(()=>{const S=()=>h({});return document.addEventListener(Aa,S),()=>document.removeEventListener(Aa,S)},[]),m.jsx(J.div,{...c,ref:b,style:{pointerEvents:E?M?"auto":"none":void 0,...e.style},onFocusCapture:K(e.onFocusCapture,R.onFocusCapture),onBlurCapture:K(e.onBlurCapture,R.onBlurCapture),onPointerDownCapture:K(e.onPointerDownCapture,C.onPointerDownCapture)})});gp.displayName=UD;var VD="DismissableLayerBranch",KD=d.forwardRef((e,t)=>{const n=d.useContext(hp),r=d.useRef(null),o=fe(t,r);return d.useEffect(()=>{const a=r.current;if(a)return n.branches.add(a),()=>{n.branches.delete(a)}},[n.branches]),m.jsx(J.div,{...e,ref:o})});KD.displayName=VD;function XD(e,t=globalThis==null?void 0:globalThis.document){const n=je(e),r=d.useRef(!1),o=d.useRef(()=>{});return d.useEffect(()=>{const a=s=>{if(s.target&&!r.current){let c=function(){vp(GD,n,u,{discrete:!0})};const u={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=c,t.addEventListener("click",o.current,{once:!0})):c()}else t.removeEventListener("click",o.current);r.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",a)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",a),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function ZD(e,t=globalThis==null?void 0:globalThis.document){const n=je(e),r=d.useRef(!1);return d.useEffect(()=>{const o=a=>{a.target&&!r.current&&vp(qD,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 rc(){const e=new CustomEvent(Aa);document.dispatchEvent(e)}function vp(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?kn(o,a):o.dispatchEvent(a)}var[ko,PM]=Ge("Tooltip",[Ht]),Ro=Ht(),bp="TooltipProvider",QD=700,Ia="tooltip.open",[JD,js]=ko(bp),yp=e=>{const{__scopeTooltip:t,delayDuration:n=QD,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:a}=e,i=d.useRef(!0),s=d.useRef(!1),c=d.useRef(0);return d.useEffect(()=>{const u=c.current;return()=>window.clearTimeout(u)},[]),m.jsx(JD,{scope:t,isOpenDelayedRef:i,delayDuration:n,onOpen:d.useCallback(()=>{window.clearTimeout(c.current),i.current=!1},[]),onClose:d.useCallback(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>i.current=!0,r)},[r]),isPointerInTransitRef:s,onPointerInTransitChange:d.useCallback(u=>{s.current=u},[]),disableHoverableContent:o,children:a})};yp.displayName=bp;var Jn="Tooltip",[eM,Oo]=ko(Jn),wp=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o,onOpenChange:a,disableHoverableContent:i,delayDuration:s}=e,c=js(Jn,e.__scopeTooltip),u=Ro(t),[f,l]=d.useState(null),p=Pe(),h=d.useRef(0),b=i??c.disableHoverableContent,g=s??c.delayDuration,v=d.useRef(!1),[w,y]=ot({prop:r,defaultProp:o??!1,onChange:S=>{S?(c.onOpen(),document.dispatchEvent(new CustomEvent(Ia))):c.onClose(),a==null||a(S)},caller:Jn}),E=d.useMemo(()=>w?v.current?"delayed-open":"instant-open":"closed",[w]),M=d.useCallback(()=>{window.clearTimeout(h.current),h.current=0,v.current=!1,y(!0)},[y]),C=d.useCallback(()=>{window.clearTimeout(h.current),h.current=0,y(!1)},[y]),R=d.useCallback(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>{v.current=!0,y(!0),h.current=0},g)},[g,y]);return d.useEffect(()=>()=>{h.current&&(window.clearTimeout(h.current),h.current=0)},[]),m.jsx(ar,{...u,children:m.jsx(eM,{scope:t,contentId:p,open:w,stateAttribute:E,trigger:f,onTriggerChange:l,onTriggerEnter:d.useCallback(()=>{c.isOpenDelayedRef.current?R():M()},[c.isOpenDelayedRef,R,M]),onTriggerLeave:d.useCallback(()=>{b?C():(window.clearTimeout(h.current),h.current=0)},[C,b]),onOpen:M,onClose:C,disableHoverableContent:b,children:n})})};wp.displayName=Jn;var ja="TooltipTrigger",xp=d.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Oo(ja,n),a=js(ja,n),i=Ro(n),s=d.useRef(null),c=fe(t,s,o.onTriggerChange),u=d.useRef(!1),f=d.useRef(!1),l=d.useCallback(()=>u.current=!1,[]);return d.useEffect(()=>()=>document.removeEventListener("pointerup",l),[l]),m.jsx(sr,{asChild:!0,...i,children:m.jsx(J.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:c,onPointerMove:K(e.onPointerMove,p=>{p.pointerType!=="touch"&&!f.current&&!a.isPointerInTransitRef.current&&(o.onTriggerEnter(),f.current=!0)}),onPointerLeave:K(e.onPointerLeave,()=>{o.onTriggerLeave(),f.current=!1}),onPointerDown:K(e.onPointerDown,()=>{o.open&&o.onClose(),u.current=!0,document.addEventListener("pointerup",l,{once:!0})}),onFocus:K(e.onFocus,()=>{u.current||o.onOpen()}),onBlur:K(e.onBlur,o.onClose),onClick:K(e.onClick,o.onClose)})})});xp.displayName=ja;var tM="TooltipPortal",[_M,nM]=ko(tM,{forceMount:void 0}),Dn="TooltipContent",Sp=d.forwardRef((e,t)=>{const n=nM(Dn,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...a}=e,i=Oo(Dn,e.__scopeTooltip);return m.jsx(at,{present:r||i.open,children:i.disableHoverableContent?m.jsx(Ep,{side:o,...a,ref:t}):m.jsx(rM,{side:o,...a,ref:t})})}),rM=d.forwardRef((e,t)=>{const n=Oo(Dn,e.__scopeTooltip),r=js(Dn,e.__scopeTooltip),o=d.useRef(null),a=fe(t,o),[i,s]=d.useState(null),{trigger:c,onClose:u}=n,f=o.current,{onPointerInTransitChange:l}=r,p=d.useCallback(()=>{s(null),l(!1)},[l]),h=d.useCallback((b,g)=>{const v=b.currentTarget,w={x:b.clientX,y:b.clientY},y=iM(w,v.getBoundingClientRect()),E=cM(w,y),M=lM(g.getBoundingClientRect()),C=dM([...E,...M]);s(C),l(!0)},[l]);return d.useEffect(()=>()=>p(),[p]),d.useEffect(()=>{if(c&&f){const b=v=>h(v,f),g=v=>h(v,c);return c.addEventListener("pointerleave",b),f.addEventListener("pointerleave",g),()=>{c.removeEventListener("pointerleave",b),f.removeEventListener("pointerleave",g)}}},[c,f,h,p]),d.useEffect(()=>{if(i){const b=g=>{const v=g.target,w={x:g.clientX,y:g.clientY},y=(c==null?void 0:c.contains(v))||(f==null?void 0:f.contains(v)),E=!uM(w,i);y?p():E&&(p(),u())};return document.addEventListener("pointermove",b),()=>document.removeEventListener("pointermove",b)}},[c,f,i,u,p]),m.jsx(Ep,{...e,ref:a})}),[oM,aM]=ko(Jn,{isInside:!1}),sM=Op("TooltipContent"),Ep=d.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:a,onPointerDownOutside:i,...s}=e,c=Oo(Dn,n),u=Ro(n),{onClose:f}=c;return d.useEffect(()=>(document.addEventListener(Ia,f),()=>document.removeEventListener(Ia,f)),[f]),d.useEffect(()=>{if(c.trigger){const l=p=>{const h=p.target;h!=null&&h.contains(c.trigger)&&f()};return window.addEventListener("scroll",l,{capture:!0}),()=>window.removeEventListener("scroll",l,{capture:!0})}},[c.trigger,f]),m.jsx(gp,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:i,onFocusOutside:l=>l.preventDefault(),onDismiss:f,children:m.jsxs(so,{"data-state":c.stateAttribute,...u,...s,ref:t,style:{...s.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:[m.jsx(sM,{children:r}),m.jsx(oM,{scope:n,isInside:!0,children:m.jsx(ty,{id:c.contentId,role:"tooltip",children:o||r})})]})})});Sp.displayName=Dn;var Cp="TooltipArrow",Dp=d.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Ro(n);return aM(Cp,n).isInside?null:m.jsx(io,{...o,...r,ref:t})});Dp.displayName=Cp;function iM(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 cM(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 lM(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 uM(e,t){const{x:n,y:r}=e;let o=!1;for(let a=0,i=t.length-1;a<t.length;i=a++){const s=t[a],c=t[i],u=s.x,f=s.y,l=c.x,p=c.y;f>r!=p>r&&n<(l-u)*(r-f)/(p-f)+u&&(o=!o)}return o}function dM(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),fM(t)}function fM(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],i=t[t.length-2];if((a.x-i.x)*(o.y-i.y)>=(a.y-i.y)*(o.x-i.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],i=n[n.length-2];if((a.x-i.x)*(o.y-i.y)>=(a.y-i.y)*(o.x-i.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 mM=yp,pM=wp,hM=xp,Mp=Sp,gM=Dp;const vM=mM,bM=pM,yM=hM,Np=d.forwardRef(({className:e,sideOffset:t=4,children:n,...r},o)=>m.jsxs(Mp,{ref:o,sideOffset:t,className:L("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,m.jsx(gM,{className:"fill-background stroke-border h-2 w-4"})]}));Np.displayName=Mp.displayName;exports.ComponentVariant=lS;exports.DoctAddressFormSection=r1;exports.DoctAlert=Nd;exports.DoctAlertDescription=Rd;exports.DoctAlertTitle=kd;exports.DoctAnimationLoader=gh;exports.DoctAutoComplete=aS;exports.DoctAutocomplete=gS;exports.DoctAvatar=Fd;exports.DoctAvatarFallback=Bd;exports.DoctAvatarImage=Wd;exports.DoctButton=kt;exports.DoctCheckbox=Kd;exports.DoctChip=V0;exports.DoctCircularProgress=bc;exports.DoctComponentSection=cS;exports.DoctContactFormSection=a1;exports.DoctCurrencyInput=yd;exports.DoctDatePickerField=Vr;exports.DoctDialog=X1;exports.DoctDialogClose=J1;exports.DoctDialogContent=ud;exports.DoctDialogDescription=pd;exports.DoctDialogFooter=fd;exports.DoctDialogHeader=dd;exports.DoctDialogTitle=md;exports.DoctDialogTrigger=Z1;exports.DoctDrawer=cf;exports.DoctDrawerClose=pE;exports.DoctDrawerContent=uf;exports.DoctDrawerDescription=pf;exports.DoctDrawerFooter=ff;exports.DoctDrawerHeader=df;exports.DoctDrawerTitle=mf;exports.DoctDrawerTrigger=fE;exports.DoctDropdownMenu=YC;exports.DoctDropdownMenuCheckboxItem=Mm;exports.DoctDropdownMenuContent=Cm;exports.DoctDropdownMenuGroup=zC;exports.DoctDropdownMenuItem=Dm;exports.DoctDropdownMenuLabel=km;exports.DoctDropdownMenuRadioGroup=UC;exports.DoctDropdownMenuRadioItem=Nm;exports.DoctDropdownMenuSeparator=Rm;exports.DoctDropdownMenuShortcut=Om;exports.DoctDropdownMenuSub=HC;exports.DoctDropdownMenuSubContent=Em;exports.DoctDropdownMenuSubTrigger=Sm;exports.DoctDropdownMenuTrigger=xm;exports.DoctExpandableCard=ES;exports.DoctLabeledInput=nt;exports.DoctManualDatePickerField=q0;exports.DoctOtpInput=wh;exports.DoctPasswordInput=ua;exports.DoctPopover=Za;exports.DoctPopoverContent=fo;exports.DoctPopoverTrigger=Qa;exports.DoctProgress=pp;exports.DoctRadioGroup=Um;exports.DoctRadioGroupItem=Gm;exports.DoctSearchFilterSection=J0;exports.DoctSearchInput=Au;exports.DoctSelectField=Cn;exports.DoctTabs=aD;exports.DoctTabsContent=cp;exports.DoctTabsList=sp;exports.DoctTabsTrigger=ip;exports.DoctTextareaField=Fa;exports.DoctToaster=HD;exports.DoctTooltip=bM;exports.DoctTooltipContent=Np;exports.DoctTooltipProvider=vM;exports.DoctTooltipTrigger=yM;exports.DoctTypography=la;exports.DoctUserRegistrationSection=t1;exports.doctToast=zD;