docthub-core-components 1.0.54 → 1.0.56

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.
Files changed (50) hide show
  1. package/dist/index.cjs.js +43 -43
  2. package/dist/index.esm.js +2222 -2205
  3. package/dist/logoAnimation.gif +0 -0
  4. package/dist/src/components/overrides/ui/auto-complete.d.ts +47 -0
  5. package/dist/src/components/overrides/ui/chips/doct-chip.d.ts +20 -0
  6. package/dist/src/components/overrides/ui/circular-progress.d.ts +8 -0
  7. package/dist/src/components/overrides/ui/composed/address-form-section.d.ts +10 -0
  8. package/dist/src/components/overrides/ui/composed/contact-form-section.d.ts +11 -0
  9. package/dist/src/components/overrides/ui/composed/search-filter-section.d.ts +24 -0
  10. package/dist/src/components/overrides/ui/composed/user-registration-section.d.ts +11 -0
  11. package/dist/src/components/overrides/ui/currencyInput/currency-input.d.ts +10 -0
  12. package/dist/src/components/overrides/ui/doct-animation-loader.d.ts +1 -0
  13. package/dist/src/components/overrides/ui/expandable-card.d.ts +12 -0
  14. package/dist/src/components/overrides/ui/inputs/labeled-input.d.ts +21 -0
  15. package/dist/src/components/overrides/ui/inputs/otp-input.d.ts +12 -0
  16. package/dist/src/components/overrides/ui/inputs/password-input.d.ts +14 -0
  17. package/dist/src/components/overrides/ui/pickers/date-picker-field.d.ts +30 -0
  18. package/dist/src/components/overrides/ui/pickers/manual-date-picker-field.d.ts +19 -0
  19. package/dist/src/components/overrides/ui/pickers/select-field.d.ts +21 -0
  20. package/dist/src/components/overrides/ui/search/auto-complete.d.ts +15 -0
  21. package/dist/src/components/overrides/ui/search/search-input.d.ts +11 -0
  22. package/dist/src/components/overrides/ui/showcase/component-section.d.ts +15 -0
  23. package/dist/src/components/ui/alert.d.ts +8 -0
  24. package/dist/src/components/ui/avatar.d.ts +6 -0
  25. package/dist/src/components/ui/badge.d.ts +9 -0
  26. package/dist/src/components/ui/button.d.ts +18 -0
  27. package/dist/src/components/ui/calendar.d.ts +8 -0
  28. package/dist/src/components/ui/checkbox.d.ts +7 -0
  29. package/dist/src/components/ui/command.d.ts +80 -0
  30. package/dist/src/components/ui/dialog.d.ts +19 -0
  31. package/dist/src/components/ui/drawer.d.ts +22 -0
  32. package/dist/src/components/ui/dropdown-menu.d.ts +27 -0
  33. package/dist/src/components/ui/input.d.ts +3 -0
  34. package/dist/src/components/ui/label.d.ts +5 -0
  35. package/dist/src/components/ui/popover.d.ts +7 -0
  36. package/dist/src/components/ui/progress.d.ts +4 -0
  37. package/dist/src/components/ui/radio-group.d.ts +5 -0
  38. package/dist/src/components/ui/select.d.ts +13 -0
  39. package/dist/src/components/ui/skeleton.d.ts +2 -0
  40. package/dist/src/components/ui/tabs.d.ts +7 -0
  41. package/dist/src/components/ui/textarea.d.ts +9 -0
  42. package/dist/src/components/ui/toast.d.ts +20 -0
  43. package/dist/src/components/ui/tooltip.d.ts +7 -0
  44. package/dist/src/components/ui/typography.d.ts +11 -0
  45. package/dist/src/index.d.ts +34 -0
  46. package/dist/src/lib/utils.d.ts +2 -0
  47. package/dist/src/util/getInputClasses.d.ts +5 -0
  48. package/dist/src/vite-env.d.ts +1 -0
  49. package/dist/vite.svg +1 -0
  50. package/package.json +4 -7
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"),Jr=require("react-dom");function rc(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=rc(x),eo=rc(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 Lt(e){const t=Mp(e),n=d.forwardRef((r,o)=>{const{children:a,...i}=r,s=d.Children.toArray(a),l=s.find(kp);if(l){const u=l.props.children,f=s.map(c=>c===l?d.Children.count(u)>1?d.Children.only(null):d.isValidElement(u)?u.props.children:null:c);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 Dp=Lt("Slot");function Mp(e){const t=d.forwardRef((n,r)=>{const{children:o,...a}=n;if(d.isValidElement(o)){const i=Op(o),s=Rp(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 oc=Symbol("radix.slottable");function Np(e){const t=({children:n})=>m.jsx(m.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=oc,t}function kp(e){return d.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===oc}function Rp(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 l=a(...s);return o(...s),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...a}:r==="className"&&(n[r]=[o,a].filter(Boolean).join(" "))}return{...e,...n}}function Op(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 ac(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=ac(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function sc(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=ac(e))&&(r&&(r+=" "),r+=t);return r}const Fs=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Ws=sc,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],c=a==null?void 0:a[u];if(f===null)return null;const p=Fs(f)||Fs(c);return o[u][p]}),s=n&&Object.entries(n).reduce((u,f)=>{let[c,p]=f;return p===void 0||(u[c]=p),u},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,f)=>{let{class:c,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,c,p]:u},[]);return Ws(e,i,l,n==null?void 0:n.class,n==null?void 0:n.className)},$a="-",Tp=e=>{const t=Pp(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:i=>{const s=i.split($a);return s[0]===""&&s.length!==1&&s.shift(),ic(s,t)||_p(i)},getConflictingClassGroupIds:(i,s)=>{const l=n[i]||[];return s&&r[i]?[...l,...r[i]]:l}}},ic=(e,t)=>{var i;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?ic(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=/^\[(.+)\]$/,_p=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}},Pp=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(Ap(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},Ap=e=>e.isThemeGetter,Ip=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=":",jp=ia.length,$p=e=>{const{prefix:t,experimentalParseClassName:n}=e;let r=o=>{const a=[];let i=0,s=0,l=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(l,b)),l=b+jp;continue}if(g==="/"){u=b;continue}}g==="["?i++:g==="]"?i--:g==="("?s++:g===")"&&s--}const f=a.length===0?o:o.substring(l),c=Lp(f),p=c!==f,h=u&&u>l?u-l:void 0;return{modifiers:a,hasImportantModifier:p,baseClassName:c,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},Lp=e=>e.endsWith(sa)?e.substring(0,e.length-1):e.startsWith(sa)?e.substring(1):e,Fp=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}},Wp=e=>({cache:Ip(e.cacheSize),parseClassName:$p(e),sortModifiers:Fp(e),...Tp(e)}),Bp=/\s+/,Yp=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:a}=t,i=[],s=e.trim().split(Bp);let l="";for(let u=s.length-1;u>=0;u-=1){const f=s[u],{isExternal:c,modifiers:p,hasImportantModifier:h,baseClassName:b,maybePostfixModifierPosition:g}=n(f);if(c){l=f+(l.length>0?" "+l:l);continue}let v=!!g,y=r(v?b.substring(0,g):b);if(!y){if(!v){l=f+(l.length>0?" "+l:l);continue}if(y=r(b),!y){l=f+(l.length>0?" "+l:l);continue}v=!1}const w=a(p).join(":"),C=h?w+sa:w,D=C+y;if(i.includes(D))continue;i.push(D);const E=o(y,v);for(let R=0;R<E.length;++R){const S=E[R];i.push(C+S)}l=f+(l.length>0?" "+l:l)}return l};function zp(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=cc(t))&&(r&&(r+=" "),r+=n);return r}const cc=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=cc(e[r]))&&(n&&(n+=" "),n+=t);return n};function Hp(e,...t){let n,r,o,a=i;function i(l){const u=t.reduce((f,c)=>c(f),e());return n=Wp(u),r=n.cache.get,o=n.cache.set,a=s,s(l)}function s(l){const u=r(l);if(u)return u;const f=Yp(l,n);return o(l,f),f}return function(){return a(zp.apply(null,arguments))}}const je=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},lc=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,uc=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Up=/^\d+\/\d+$/,Gp=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,qp=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Vp=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Kp=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Xp=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,dn=e=>Up.test(e),he=e=>!!e&&!Number.isNaN(Number(e)),At=e=>!!e&&Number.isInteger(Number(e)),To=e=>e.endsWith("%")&&he(e.slice(0,-1)),Ct=e=>Gp.test(e),Zp=()=>!0,Qp=e=>qp.test(e)&&!Vp.test(e),dc=()=>!1,Jp=e=>Kp.test(e),eh=e=>Xp.test(e),th=e=>!te(e)&&!ne(e),nh=e=>Dn(e,pc,dc),te=e=>lc.test(e),Xt=e=>Dn(e,hc,Qp),_o=e=>Dn(e,ih,he),zs=e=>Dn(e,fc,dc),rh=e=>Dn(e,mc,eh),wr=e=>Dn(e,gc,Jp),ne=e=>uc.test(e),jn=e=>Mn(e,hc),oh=e=>Mn(e,ch),Hs=e=>Mn(e,fc),ah=e=>Mn(e,pc),sh=e=>Mn(e,mc),xr=e=>Mn(e,gc,!0),Dn=(e,t,n)=>{const r=lc.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},Mn=(e,t,n=!1)=>{const r=uc.exec(e);return r?r[1]?t(r[1]):n:!1},fc=e=>e==="position"||e==="percentage",mc=e=>e==="image"||e==="url",pc=e=>e==="length"||e==="size"||e==="bg-size",hc=e=>e==="length",ih=e=>e==="number",ch=e=>e==="family-name",gc=e=>e==="shadow",lh=()=>{const e=je("color"),t=je("font"),n=je("text"),r=je("font-weight"),o=je("tracking"),a=je("leading"),i=je("breakpoint"),s=je("container"),l=je("spacing"),u=je("radius"),f=je("shadow"),c=je("inset-shadow"),p=je("text-shadow"),h=je("drop-shadow"),b=je("blur"),g=je("perspective"),v=je("aspect"),y=je("ease"),w=je("animate"),C=()=>["auto","avoid","all","avoid-page","page","left","right","column"],D=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],E=()=>[...D(),ne,te],R=()=>["auto","hidden","clip","visible","scroll"],S=()=>["auto","contain","none"],k=()=>[ne,te,l],I=()=>[dn,"full","auto",...k()],j=()=>[At,"none","subgrid",ne,te],L=()=>["auto",{span:["full",At,ne,te]},At,ne,te],V=()=>[At,"auto",ne,te],B=()=>["auto","min","max","fr",ne,te],P=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],O=()=>["start","end","center","stretch","center-safe","end-safe"],M=()=>["auto",...k()],A=()=>[dn,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...k()],N=()=>[e,ne,te],_=()=>[...D(),Hs,zs,{position:[ne,te]}],Y=()=>["no-repeat",{repeat:["","x","y","space","round"]}],H=()=>["auto","cover","contain",ah,nh,{size:[ne,te]}],T=()=>[To,jn,Xt],$=()=>["","none","full",u,ne,te],z=()=>["",he,jn,Xt],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],Q=()=>["","none",b,ne,te],K=()=>["none",he,ne,te],Z=()=>["none",he,ne,te],se=()=>[he,ne,te],ie=()=>[dn,"full",...k()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Ct],breakpoint:[Ct],color:[Zp],container:[Ct],"drop-shadow":[Ct],ease:["in","out","in-out"],font:[th],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Ct],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Ct],shadow:[Ct],spacing:["px",he],text:[Ct],"text-shadow":[Ct],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",dn,te,ne,v]}],container:["container"],columns:[{columns:[he,te,ne,s]}],"break-after":[{"break-after":C()}],"break-before":[{"break-before":C()}],"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:E()}],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:[At,"auto",ne,te]}],basis:[{basis:[dn,"full","auto",s,...k()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[he,dn,"auto","initial","none",te]}],grow:[{grow:["",he,ne,te]}],shrink:[{shrink:["",he,ne,te]}],order:[{order:[At,"first","last","none",ne,te]}],"grid-cols":[{"grid-cols":j()}],"col-start-end":[{col:L()}],"col-start":[{"col-start":V()}],"col-end":[{"col-end":V()}],"grid-rows":[{"grid-rows":j()}],"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:k()}],"gap-x":[{"gap-x":k()}],"gap-y":[{"gap-y":k()}],"justify-content":[{justify:[...P(),"normal"]}],"justify-items":[{"justify-items":[...O(),"normal"]}],"justify-self":[{"justify-self":["auto",...O()]}],"align-content":[{content:["normal",...P()]}],"align-items":[{items:[...O(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...O(),{baseline:["","last"]}]}],"place-content":[{"place-content":P()}],"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:M()}],mx:[{mx:M()}],my:[{my:M()}],ms:[{ms:M()}],me:[{me:M()}],mt:[{mt:M()}],mr:[{mr:M()}],mb:[{mb:M()}],ml:[{ml:M()}],"space-x":[{"space-x":k()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":k()}],"space-y-reverse":["space-y-reverse"],size:[{size:A()}],w:[{w:[s,"screen",...A()]}],"min-w":[{"min-w":[s,"screen","none",...A()]}],"max-w":[{"max-w":[s,"screen","none","prose",{screen:[i]},...A()]}],h:[{h:["screen","lh",...A()]}],"min-h":[{"min-h":["screen","lh","none",...A()]}],"max-h":[{"max-h":["screen","lh",...A()]}],"font-size":[{text:["base",n,jn,Xt]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,ne,_o]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",To,te]}],"font-family":[{font:[oh,te,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,ne,te]}],"line-clamp":[{"line-clamp":[he,"none",ne,_o]}],leading:[{leading:[a,...k()]}],"list-image":[{"list-image":["none",ne,te]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ne,te]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder: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",ne,Xt]}],"text-decoration-color":[{decoration:N()}],"underline-offset":[{"underline-offset":[he,"auto",ne,te]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:k()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ne,te]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ne,te]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:_()}],"bg-repeat":[{bg:Y()}],"bg-size":[{bg:H()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},At,ne,te],radial:["",ne,te],conic:[At,ne,te]},sh,rh]}],"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:$()}],"rounded-s":[{"rounded-s":$()}],"rounded-e":[{"rounded-e":$()}],"rounded-t":[{"rounded-t":$()}],"rounded-r":[{"rounded-r":$()}],"rounded-b":[{"rounded-b":$()}],"rounded-l":[{"rounded-l":$()}],"rounded-ss":[{"rounded-ss":$()}],"rounded-se":[{"rounded-se":$()}],"rounded-ee":[{"rounded-ee":$()}],"rounded-es":[{"rounded-es":$()}],"rounded-tl":[{"rounded-tl":$()}],"rounded-tr":[{"rounded-tr":$()}],"rounded-br":[{"rounded-br":$()}],"rounded-bl":[{"rounded-bl":$()}],"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,ne,te]}],"outline-w":[{outline:["",he,jn,Xt]}],"outline-color":[{outline:N()}],shadow:[{shadow:["","none",f,xr,wr]}],"shadow-color":[{shadow:N()}],"inset-shadow":[{"inset-shadow":["none",c,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,Xt]}],"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,ne,te]}],"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":N()}],"mask-image-linear-to-color":[{"mask-linear-to":N()}],"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":N()}],"mask-image-t-to-color":[{"mask-t-to":N()}],"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":N()}],"mask-image-r-to-color":[{"mask-r-to":N()}],"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":N()}],"mask-image-b-to-color":[{"mask-b-to":N()}],"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":N()}],"mask-image-l-to-color":[{"mask-l-to":N()}],"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":N()}],"mask-image-x-to-color":[{"mask-x-to":N()}],"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":N()}],"mask-image-y-to-color":[{"mask-y-to":N()}],"mask-image-radial":[{"mask-radial":[ne,te]}],"mask-image-radial-from-pos":[{"mask-radial-from":W()}],"mask-image-radial-to-pos":[{"mask-radial-to":W()}],"mask-image-radial-from-color":[{"mask-radial-from":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":D()}],"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":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:_()}],"mask-repeat":[{mask:Y()}],"mask-size":[{mask:H()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ne,te]}],filter:[{filter:["","none",ne,te]}],blur:[{blur:Q()}],brightness:[{brightness:[he,ne,te]}],contrast:[{contrast:[he,ne,te]}],"drop-shadow":[{"drop-shadow":["","none",h,xr,wr]}],"drop-shadow-color":[{"drop-shadow":N()}],grayscale:[{grayscale:["",he,ne,te]}],"hue-rotate":[{"hue-rotate":[he,ne,te]}],invert:[{invert:["",he,ne,te]}],saturate:[{saturate:[he,ne,te]}],sepia:[{sepia:["",he,ne,te]}],"backdrop-filter":[{"backdrop-filter":["","none",ne,te]}],"backdrop-blur":[{"backdrop-blur":Q()}],"backdrop-brightness":[{"backdrop-brightness":[he,ne,te]}],"backdrop-contrast":[{"backdrop-contrast":[he,ne,te]}],"backdrop-grayscale":[{"backdrop-grayscale":["",he,ne,te]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[he,ne,te]}],"backdrop-invert":[{"backdrop-invert":["",he,ne,te]}],"backdrop-opacity":[{"backdrop-opacity":[he,ne,te]}],"backdrop-saturate":[{"backdrop-saturate":[he,ne,te]}],"backdrop-sepia":[{"backdrop-sepia":["",he,ne,te]}],"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",ne,te]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[he,"initial",ne,te]}],ease:[{ease:["linear","initial",y,ne,te]}],delay:[{delay:[he,ne,te]}],animate:[{animate:["none",w,ne,te]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[g,ne,te]}],"perspective-origin":[{"perspective-origin":E()}],rotate:[{rotate:K()}],"rotate-x":[{"rotate-x":K()}],"rotate-y":[{"rotate-y":K()}],"rotate-z":[{"rotate-z":K()}],scale:[{scale:Z()}],"scale-x":[{"scale-x":Z()}],"scale-y":[{"scale-y":Z()}],"scale-z":[{"scale-z":Z()}],"scale-3d":["scale-3d"],skew:[{skew:se()}],"skew-x":[{"skew-x":se()}],"skew-y":[{"skew-y":se()}],transform:[{transform:[ne,te,"","none","gpu","cpu"]}],"transform-origin":[{origin:E()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:ie()}],"translate-x":[{"translate-x":ie()}],"translate-y":[{"translate-y":ie()}],"translate-z":[{"translate-z":ie()}],"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",ne,te]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":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",ne,te]}],fill:[{fill:["none",...N()]}],"stroke-w":[{stroke:[he,jn,Xt,_o]}],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"]}},uh=Hp(lh);function F(...e){return uh(sc(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:l,children:u,...f},c)=>{const p=i?Dp:"button";let h=n;if(l&&n)switch(n){case"large":h="icon.large";break;case"medium":h="icon.medium";break;case"small":h="icon.small";break}const 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:c,"aria-label":l&&!f["aria-label"]?"Icon button":f["aria-label"],...f,children:[s&&m.jsx("span",{"data-testid":"button-icon",children:s}),!l&&u]})});kt.displayName="DoctButton";const dh={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"}},fh={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=dh[e]??{fontSize:"16px",tag:"p"},{fontSize:s,tag:l}=i;return m.jsx(l,{className:a,style:{fontSize:s,fontWeight:fh[t]??"400",color:r,textAlign:o},children:n})};function mh(){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 vc=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"})]})});vc.displayName="CircularProgress";const on=d.forwardRef(({className:e,type:t,...n},r)=>m.jsx("input",{type:t,className:F("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder-gray-400 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:r,...n}));on.displayName="Input";var ph=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],J=ph.reduce((e,t)=>{const n=Lt(`Primitive.${t}`),r=d.forwardRef((o,a)=>{const{asChild:i,...s}=o,l=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),m.jsx(l,{...s,ref:a})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Nn(e,t){e&&eo.flushSync(()=>e.dispatchEvent(t))}var hh="Label",bc=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())}}));bc.displayName=hh;var yc=bc;const gh=to("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),an=d.forwardRef(({className:e,...t},n)=>m.jsx(yc,{ref:n,className:F(gh(),e),...t}));an.displayName=yc.displayName;const tt=({label:e,placeholder:t,helperText:n,error:r,required:o,type:a="text",leftIcon:i,rightIcon:s,className:l,inputClassName:u,onChange:f,showCharCount:c,maxLength:p,value:h,disabled:b,fridged:g,...v})=>{const[y,w]=x.useState((h==null?void 0:h.length)||0),C=R=>{f&&f(R),w(R.target.value.length)},D=c&&typeof p=="number",E=g||b;return m.jsxs("div",{className:F("space-y-1",l),children:[e&&m.jsxs(an,{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(on,{type:a,placeholder:t,disabled:b,value:h,maxLength:p,onChange:C,className:F(i&&"pl-10",s&&"pr-10",r&&"border-destructive focus-visible:ring-destructive",E&&"cursor-not-allowed bg-muted text-muted-foreground opacity-70",u),...v}),D&&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})]})},vh=({length:e=6,label:t,value:n,onChange:r,onComplete:o,className:a,error:i,inputClassName:s="h-8 w-8"})=>{const l=x.useRef([]),u=(c,p)=>{var b;if(p.length>1)return;const h=[...n];h[c]=p,r(h),p&&c<e-1&&((b=l.current[c+1])==null||b.focus()),h.every(g=>g!=="")&&o&&o(h.join(""))},f=(c,p)=>{var h;p.key==="Backspace"&&!n[c]&&c>0&&((h=l.current[c-1])==null||h.focus())};return m.jsxs("div",{className:F("space-y-2",a),children:[t&&m.jsx(an,{className:"text-sm font-medium text-gray-700",children:t}),m.jsx("div",{className:"flex gap-1",children:n.map((c,p)=>m.jsx(on,{ref:h=>l.current[p]=h,type:"text",inputMode:"numeric",maxLength:1,value:c,onChange:h=>u(p,h.target.value),onKeyDown:h=>f(p,h),className:F("text-center p-0 text-lg font-semibold",i&&"border-red-500 focus-visible:ring-red-500",s)},p))}),i&&m.jsx("p",{className:"text-xs text-red-500 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 rc(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=rc(x),eo=rc(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 Lt(e){const t=kp(e),n=d.forwardRef((r,o)=>{const{children:a,...i}=r,s=d.Children.toArray(a),c=s.find(Op);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 Np=Lt("Slot");function kp(e){const t=d.forwardRef((n,r)=>{const{children:o,...a}=n;if(d.isValidElement(o)){const i=_p(o),s=Tp(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 oc=Symbol("radix.slottable");function Rp(e){const t=({children:n})=>m.jsx(m.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=oc,t}function Op(e){return d.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===oc}function Tp(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 ac(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=ac(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function sc(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=ac(e))&&(r&&(r+=" "),r+=t);return r}const Fs=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Ws=sc,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="-",Pp=e=>{const t=Ip(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:i=>{const s=i.split($a);return s[0]===""&&s.length!==1&&s.shift(),ic(s,t)||Ap(i)},getConflictingClassGroupIds:(i,s)=>{const c=n[i]||[];return s&&r[i]?[...c,...r[i]]:c}}},ic=(e,t)=>{var i;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?ic(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=/^\[(.+)\]$/,Ap=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}},Ip=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(jp(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},jp=e=>e.isThemeGetter,$p=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=":",Lp=ia.length,Fp=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+Lp;continue}if(g==="/"){u=b;continue}}g==="["?i++:g==="]"?i--:g==="("?s++:g===")"&&s--}const f=a.length===0?o:o.substring(c),l=Wp(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},Wp=e=>e.endsWith(sa)?e.substring(0,e.length-1):e.startsWith(sa)?e.substring(1):e,Bp=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}},Yp=e=>({cache:$p(e.cacheSize),parseClassName:Fp(e),sortModifiers:Bp(e),...Pp(e)}),zp=/\s+/,Hp=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o,sortModifiers:a}=t,i=[],s=e.trim().split(zp);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(":"),C=h?w+sa:w,D=C+y;if(i.includes(D))continue;i.push(D);const E=o(y,v);for(let R=0;R<E.length;++R){const S=E[R];i.push(C+S)}c=f+(c.length>0?" "+c:c)}return c};function Up(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=cc(t))&&(r&&(r+=" "),r+=n);return r}const cc=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=cc(e[r]))&&(n&&(n+=" "),n+=t);return n};function Gp(e,...t){let n,r,o,a=i;function i(c){const u=t.reduce((f,l)=>l(f),e());return n=Yp(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=Hp(c,n);return o(c,f),f}return function(){return a(Up.apply(null,arguments))}}const je=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},lc=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,uc=/^\((?:(\w[\w-]*):)?(.+)\)$/i,qp=/^\d+\/\d+$/,Vp=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Kp=/\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$/,Xp=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Zp=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Qp=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,dn=e=>qp.test(e),he=e=>!!e&&!Number.isNaN(Number(e)),At=e=>!!e&&Number.isInteger(Number(e)),To=e=>e.endsWith("%")&&he(e.slice(0,-1)),Ct=e=>Vp.test(e),Jp=()=>!0,eh=e=>Kp.test(e)&&!Xp.test(e),dc=()=>!1,th=e=>Zp.test(e),nh=e=>Qp.test(e),rh=e=>!te(e)&&!ne(e),oh=e=>Dn(e,pc,dc),te=e=>lc.test(e),Xt=e=>Dn(e,hc,eh),_o=e=>Dn(e,lh,he),zs=e=>Dn(e,fc,dc),ah=e=>Dn(e,mc,nh),wr=e=>Dn(e,gc,th),ne=e=>uc.test(e),jn=e=>Mn(e,hc),sh=e=>Mn(e,uh),Hs=e=>Mn(e,fc),ih=e=>Mn(e,pc),ch=e=>Mn(e,mc),xr=e=>Mn(e,gc,!0),Dn=(e,t,n)=>{const r=lc.exec(e);return r?r[1]?t(r[1]):n(r[2]):!1},Mn=(e,t,n=!1)=>{const r=uc.exec(e);return r?r[1]?t(r[1]):n:!1},fc=e=>e==="position"||e==="percentage",mc=e=>e==="image"||e==="url",pc=e=>e==="length"||e==="size"||e==="bg-size",hc=e=>e==="length",lh=e=>e==="number",uh=e=>e==="family-name",gc=e=>e==="shadow",dh=()=>{const e=je("color"),t=je("font"),n=je("text"),r=je("font-weight"),o=je("tracking"),a=je("leading"),i=je("breakpoint"),s=je("container"),c=je("spacing"),u=je("radius"),f=je("shadow"),l=je("inset-shadow"),p=je("text-shadow"),h=je("drop-shadow"),b=je("blur"),g=je("perspective"),v=je("aspect"),y=je("ease"),w=je("animate"),C=()=>["auto","avoid","all","avoid-page","page","left","right","column"],D=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],E=()=>[...D(),ne,te],R=()=>["auto","hidden","clip","visible","scroll"],S=()=>["auto","contain","none"],k=()=>[ne,te,c],I=()=>[dn,"full","auto",...k()],j=()=>[At,"none","subgrid",ne,te],L=()=>["auto",{span:["full",At,ne,te]},At,ne,te],V=()=>[At,"auto",ne,te],B=()=>["auto","min","max","fr",ne,te],P=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],O=()=>["start","end","center","stretch","center-safe","end-safe"],M=()=>["auto",...k()],A=()=>[dn,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...k()],N=()=>[e,ne,te],_=()=>[...D(),Hs,zs,{position:[ne,te]}],Y=()=>["no-repeat",{repeat:["","x","y","space","round"]}],H=()=>["auto","cover","contain",ih,oh,{size:[ne,te]}],T=()=>[To,jn,Xt],$=()=>["","none","full",u,ne,te],z=()=>["",he,jn,Xt],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],Q=()=>["","none",b,ne,te],K=()=>["none",he,ne,te],Z=()=>["none",he,ne,te],se=()=>[he,ne,te],ie=()=>[dn,"full",...k()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Ct],breakpoint:[Ct],color:[Jp],container:[Ct],"drop-shadow":[Ct],ease:["in","out","in-out"],font:[rh],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Ct],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Ct],shadow:[Ct],spacing:["px",he],text:[Ct],"text-shadow":[Ct],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",dn,te,ne,v]}],container:["container"],columns:[{columns:[he,te,ne,s]}],"break-after":[{"break-after":C()}],"break-before":[{"break-before":C()}],"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:E()}],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:[At,"auto",ne,te]}],basis:[{basis:[dn,"full","auto",s,...k()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[he,dn,"auto","initial","none",te]}],grow:[{grow:["",he,ne,te]}],shrink:[{shrink:["",he,ne,te]}],order:[{order:[At,"first","last","none",ne,te]}],"grid-cols":[{"grid-cols":j()}],"col-start-end":[{col:L()}],"col-start":[{"col-start":V()}],"col-end":[{"col-end":V()}],"grid-rows":[{"grid-rows":j()}],"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:k()}],"gap-x":[{"gap-x":k()}],"gap-y":[{"gap-y":k()}],"justify-content":[{justify:[...P(),"normal"]}],"justify-items":[{"justify-items":[...O(),"normal"]}],"justify-self":[{"justify-self":["auto",...O()]}],"align-content":[{content:["normal",...P()]}],"align-items":[{items:[...O(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...O(),{baseline:["","last"]}]}],"place-content":[{"place-content":P()}],"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:M()}],mx:[{mx:M()}],my:[{my:M()}],ms:[{ms:M()}],me:[{me:M()}],mt:[{mt:M()}],mr:[{mr:M()}],mb:[{mb:M()}],ml:[{ml:M()}],"space-x":[{"space-x":k()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":k()}],"space-y-reverse":["space-y-reverse"],size:[{size:A()}],w:[{w:[s,"screen",...A()]}],"min-w":[{"min-w":[s,"screen","none",...A()]}],"max-w":[{"max-w":[s,"screen","none","prose",{screen:[i]},...A()]}],h:[{h:["screen","lh",...A()]}],"min-h":[{"min-h":["screen","lh","none",...A()]}],"max-h":[{"max-h":["screen","lh",...A()]}],"font-size":[{text:["base",n,jn,Xt]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,ne,_o]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",To,te]}],"font-family":[{font:[sh,te,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[o,ne,te]}],"line-clamp":[{"line-clamp":[he,"none",ne,_o]}],leading:[{leading:[a,...k()]}],"list-image":[{"list-image":["none",ne,te]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ne,te]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder: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",ne,Xt]}],"text-decoration-color":[{decoration:N()}],"underline-offset":[{"underline-offset":[he,"auto",ne,te]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:k()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ne,te]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ne,te]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:_()}],"bg-repeat":[{bg:Y()}],"bg-size":[{bg:H()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},At,ne,te],radial:["",ne,te],conic:[At,ne,te]},ch,ah]}],"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:$()}],"rounded-s":[{"rounded-s":$()}],"rounded-e":[{"rounded-e":$()}],"rounded-t":[{"rounded-t":$()}],"rounded-r":[{"rounded-r":$()}],"rounded-b":[{"rounded-b":$()}],"rounded-l":[{"rounded-l":$()}],"rounded-ss":[{"rounded-ss":$()}],"rounded-se":[{"rounded-se":$()}],"rounded-ee":[{"rounded-ee":$()}],"rounded-es":[{"rounded-es":$()}],"rounded-tl":[{"rounded-tl":$()}],"rounded-tr":[{"rounded-tr":$()}],"rounded-br":[{"rounded-br":$()}],"rounded-bl":[{"rounded-bl":$()}],"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,ne,te]}],"outline-w":[{outline:["",he,jn,Xt]}],"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,Xt]}],"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,ne,te]}],"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":N()}],"mask-image-linear-to-color":[{"mask-linear-to":N()}],"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":N()}],"mask-image-t-to-color":[{"mask-t-to":N()}],"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":N()}],"mask-image-r-to-color":[{"mask-r-to":N()}],"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":N()}],"mask-image-b-to-color":[{"mask-b-to":N()}],"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":N()}],"mask-image-l-to-color":[{"mask-l-to":N()}],"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":N()}],"mask-image-x-to-color":[{"mask-x-to":N()}],"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":N()}],"mask-image-y-to-color":[{"mask-y-to":N()}],"mask-image-radial":[{"mask-radial":[ne,te]}],"mask-image-radial-from-pos":[{"mask-radial-from":W()}],"mask-image-radial-to-pos":[{"mask-radial-to":W()}],"mask-image-radial-from-color":[{"mask-radial-from":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":D()}],"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":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:_()}],"mask-repeat":[{mask:Y()}],"mask-size":[{mask:H()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ne,te]}],filter:[{filter:["","none",ne,te]}],blur:[{blur:Q()}],brightness:[{brightness:[he,ne,te]}],contrast:[{contrast:[he,ne,te]}],"drop-shadow":[{"drop-shadow":["","none",h,xr,wr]}],"drop-shadow-color":[{"drop-shadow":N()}],grayscale:[{grayscale:["",he,ne,te]}],"hue-rotate":[{"hue-rotate":[he,ne,te]}],invert:[{invert:["",he,ne,te]}],saturate:[{saturate:[he,ne,te]}],sepia:[{sepia:["",he,ne,te]}],"backdrop-filter":[{"backdrop-filter":["","none",ne,te]}],"backdrop-blur":[{"backdrop-blur":Q()}],"backdrop-brightness":[{"backdrop-brightness":[he,ne,te]}],"backdrop-contrast":[{"backdrop-contrast":[he,ne,te]}],"backdrop-grayscale":[{"backdrop-grayscale":["",he,ne,te]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[he,ne,te]}],"backdrop-invert":[{"backdrop-invert":["",he,ne,te]}],"backdrop-opacity":[{"backdrop-opacity":[he,ne,te]}],"backdrop-saturate":[{"backdrop-saturate":[he,ne,te]}],"backdrop-sepia":[{"backdrop-sepia":["",he,ne,te]}],"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",ne,te]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[he,"initial",ne,te]}],ease:[{ease:["linear","initial",y,ne,te]}],delay:[{delay:[he,ne,te]}],animate:[{animate:["none",w,ne,te]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[g,ne,te]}],"perspective-origin":[{"perspective-origin":E()}],rotate:[{rotate:K()}],"rotate-x":[{"rotate-x":K()}],"rotate-y":[{"rotate-y":K()}],"rotate-z":[{"rotate-z":K()}],scale:[{scale:Z()}],"scale-x":[{"scale-x":Z()}],"scale-y":[{"scale-y":Z()}],"scale-z":[{"scale-z":Z()}],"scale-3d":["scale-3d"],skew:[{skew:se()}],"skew-x":[{"skew-x":se()}],"skew-y":[{"skew-y":se()}],transform:[{transform:[ne,te,"","none","gpu","cpu"]}],"transform-origin":[{origin:E()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:ie()}],"translate-x":[{"translate-x":ie()}],"translate-y":[{"translate-y":ie()}],"translate-z":[{"translate-z":ie()}],"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",ne,te]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":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",ne,te]}],fill:[{fill:["none",...N()]}],"stroke-w":[{stroke:[he,jn,Xt,_o]}],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"]}},fh=Gp(dh);function F(...e){return fh(sc(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?Np:"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 mh={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"}},ph={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=mh[e]??{fontSize:"16px",tag:"p"},{fontSize:s,tag:c}=i;return m.jsx(c,{className:a,style:{fontSize:s,fontWeight:ph[t]??"400",color:r,textAlign:o},children:n})};function hh(){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 vc=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"})]})});vc.displayName="CircularProgress";const on=d.forwardRef(({className:e,type:t,...n},r)=>m.jsx("input",{type:t,className:F("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder-gray-400 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",e),ref:r,...n}));on.displayName="Input";var gh=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],J=gh.reduce((e,t)=>{const n=Lt(`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 Nn(e,t){e&&eo.flushSync(()=>e.dispatchEvent(t))}var vh="Label",bc=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())}}));bc.displayName=vh;var yc=bc;const bh=to("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),an=d.forwardRef(({className:e,...t},n)=>m.jsx(yc,{ref:n,className:F(bh(),e),...t}));an.displayName=yc.displayName;const tt=({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),C=R=>{f&&f(R),w(R.target.value.length)},D=l&&typeof p=="number",E=g||b;return m.jsxs("div",{className:F("space-y-1",c),children:[e&&m.jsxs(an,{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(on,{type:a,placeholder:t,disabled:b,value:h,maxLength:p,onChange:C,className:F(i&&"pl-10",s&&"pr-10",r&&"border-destructive focus-visible:ring-destructive",E&&"cursor-not-allowed bg-muted text-muted-foreground opacity-70",u),...v}),D&&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})]})},yh=({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=(l,p)=>{var b;if(p.length>1)return;const h=[...n];h[l]=p,r(h),p&&l<e-1&&((b=c.current[l+1])==null||b.focus()),h.every(g=>g!=="")&&o&&o(h.join(""))},f=(l,p)=>{var h;p.key==="Backspace"&&!n[l]&&l>0&&((h=c.current[l-1])==null||h.focus())};return m.jsxs("div",{className:F("space-y-2",a),children:[t&&m.jsx(an,{className:"text-sm font-medium text-gray-700",children:t}),m.jsx("div",{className:"flex gap-1",children:n.map((l,p)=>m.jsx(on,{ref:h=>c.current[p]=h,type:"text",inputMode:"numeric",maxLength:1,value:l,onChange:h=>u(p,h.target.value),onKeyDown:h=>f(p,h),className:F("text-center p-0 text-lg font-semibold",i&&"border-red-500 focus-visible:ring-red-500",s)},p))}),i&&m.jsx("p",{className:"text-xs text-red-500 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 bh=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),wc=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim();/**
6
+ */const wh=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),wc=(...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 yh={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 xh={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 wh=x.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:a,iconNode:i,...s},l)=>x.createElement("svg",{ref:l,...yh,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:wc("lucide",o),...s},[...i.map(([u,f])=>x.createElement(u,f)),...Array.isArray(a)?a:[a]]));/**
16
+ */const Sh=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,...xh,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:wc("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 ke=(e,t)=>{const n=x.forwardRef(({className:r,...o},a)=>x.createElement(wh,{ref:a,iconNode:t,className:wc(`lucide-${bh(e)}`,r),...o}));return n.displayName=`${e}`,n};/**
21
+ */const ke=(e,t)=>{const n=x.forwardRef(({className:r,...o},a)=>x.createElement(Sh,{ref:a,iconNode:t,className:wc(`lucide-${wh(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 xh=[["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"}]],Sh=ke("Building",xh);/**
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"}]],Eh=ke("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 Ch=[["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"}]],xc=ke("CalendarDays",Ch);/**
31
+ */const Dh=[["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"}]],xc=ke("CalendarDays",Dh);/**
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 Eh=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],er=ke("Check",Eh);/**
36
+ */const Mh=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],er=ke("Check",Mh);/**
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 Dh=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],tr=ke("ChevronDown",Dh);/**
41
+ */const Nh=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],tr=ke("ChevronDown",Nh);/**
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 Mh=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],Sc=ke("ChevronLeft",Mh);/**
46
+ */const kh=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],Sc=ke("ChevronLeft",kh);/**
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 Nh=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],La=ke("ChevronRight",Nh);/**
51
+ */const Rh=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],La=ke("ChevronRight",Rh);/**
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 kh=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],Rh=ke("ChevronUp",kh);/**
56
+ */const Oh=[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]],Th=ke("ChevronUp",Oh);/**
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 Oh=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],Th=ke("CircleCheck",Oh);/**
61
+ */const _h=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],Ph=ke("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 _h=[["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"}]],Ph=ke("CircleX",_h);/**
66
+ */const Ah=[["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"}]],Ih=ke("CircleX",Ah);/**
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 Ah=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],Cc=ke("Circle",Ah);/**
71
+ */const jh=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],Cc=ke("Circle",jh);/**
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 Ih=[["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"}]],jh=ke("EyeOff",Ih);/**
76
+ */const $h=[["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"}]],Lh=ke("EyeOff",$h);/**
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 $h=[["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"}]],Lh=ke("Eye",$h);/**
81
+ */const Fh=[["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"}]],Wh=ke("Eye",Fh);/**
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 Fh=[["polygon",{points:"22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3",key:"1yg77f"}]],Wh=ke("Filter",Fh);/**
86
+ */const Bh=[["polygon",{points:"22 3 2 3 10 12.46 10 19 14 21 14 12.46 22 3",key:"1yg77f"}]],Yh=ke("Filter",Bh);/**
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 Bh=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],Yh=ke("Info",Bh);/**
91
+ */const zh=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],Hh=ke("Info",zh);/**
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 zh=[["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"}]],Ec=ke("Mail",zh);/**
96
+ */const Uh=[["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"}]],Ec=ke("Mail",Uh);/**
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 Hh=[["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"}]],Uh=ke("MapPin",Hh);/**
101
+ */const Gh=[["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"}]],qh=ke("MapPin",Gh);/**
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 Gh=[["path",{d:"M5 12h14",key:"1ays0h"}]],qh=ke("Minus",Gh);/**
106
+ */const Vh=[["path",{d:"M5 12h14",key:"1ays0h"}]],Kh=ke("Minus",Vh);/**
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 Vh=[["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"}]],Kh=ke("Phone",Vh);/**
111
+ */const Xh=[["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"}]],Zh=ke("Phone",Xh);/**
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 Xh=[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]],Dc=ke("Search",Xh);/**
116
+ */const Qh=[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]],Dc=ke("Search",Qh);/**
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 Zh=[["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"}]],Qh=ke("TriangleAlert",Zh);/**
121
+ */const Jh=[["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"}]],eg=ke("TriangleAlert",Jh);/**
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 Jh=[["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"}]],eg=ke("User",Jh);/**
126
+ */const tg=[["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"}]],ng=ke("User",tg);/**
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 tg=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],kn=ke("X",tg);function ua({label:e,placeholder:t="Enter password",helperText:n,error:r,required:o,className:a,showPassword:i=!1,onShowPasswordChange:s,value:l,onChange:u,...f}){return m.jsxs("div",{className:F("space-y-1",a),children:[e&&m.jsxs(an,{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(on,{type:i?"text":"password",placeholder:t,className:F("pr-10",r&&"border-red-500 focus-visible:ring-red-500"),value:l,onChange:c=>u==null?void 0:u(c.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(jh,{className:"h-4 w-4 text-gray-400 hover:text-gray-500"}):m.jsx(Lh,{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},l)=>{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:l,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 focus:ring-2 focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",u?"border-destructive focus:ring-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 X(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 ng(e,t){const n=d.createContext(t),r=a=>{const{children:i,...s}=a,l=d.useMemo(()=>s,Object.values(s));return m.jsx(n.Provider,{value:l,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 He(e,t=[]){let n=[];function r(a,i){const s=d.createContext(i),l=n.length;n=[...n,i];const u=c=>{var y;const{scope:p,children:h,...b}=c,g=((y=p==null?void 0:p[e])==null?void 0:y[l])||s,v=d.useMemo(()=>b,Object.values(b));return m.jsx(g.Provider,{value:v,children:h})};u.displayName=a+"Provider";function f(c,p){var g;const h=((g=p==null?void 0:p[e])==null?void 0:g[l])||s,b=d.useContext(h);if(b)return b;if(i!==void 0)return i;throw new Error(`\`${c}\` must be used within \`${a}\``)}return[u,f]}const o=()=>{const a=n.map(i=>d.createContext(i));return function(s){const l=(s==null?void 0:s[e])||a;return d.useMemo(()=>({[`__scope${e}`]:{...s,[e]:l}}),[s,l])}};return o.scopeName=e,[r,rg(o,...t)]}function rg(...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:l,scopeName:u})=>{const c=l(a)[`__scope${u}`];return{...s,...c}},{});return d.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}function Pe(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=Pe(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 og="DismissableLayer",da="dismissableLayer.update",ag="dismissableLayer.pointerDownOutside",sg="dismissableLayer.focusOutside",Us,Mc=d.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Nc=d.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:i,onDismiss:s,...l}=e,u=d.useContext(Mc),[f,c]=d.useState(null),p=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,h]=d.useState({}),b=fe(t,S=>c(S)),g=Array.from(u.layers),[v]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),y=g.indexOf(v),w=f?g.indexOf(f):-1,C=u.layersWithOutsidePointerEventsDisabled.size>0,D=w>=y,E=lg(S=>{const k=S.target,I=[...u.branches].some(j=>j.contains(k));!D||I||(o==null||o(S),i==null||i(S),S.defaultPrevented||s==null||s())},p),R=ug(S=>{const k=S.target;[...u.branches].some(j=>j.contains(k))||(a==null||a(S),i==null||i(S),S.defaultPrevented||s==null||s())},p);return nr(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,{...l,ref:b,style:{pointerEvents:C?D?"auto":"none":void 0,...e.style},onFocusCapture:X(e.onFocusCapture,R.onFocusCapture),onBlurCapture:X(e.onBlurCapture,R.onBlurCapture),onPointerDownCapture:X(e.onPointerDownCapture,E.onPointerDownCapture)})});Nc.displayName=og;var ig="DismissableLayerBranch",cg=d.forwardRef((e,t)=>{const n=d.useContext(Mc),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})});cg.displayName=ig;function lg(e,t=globalThis==null?void 0:globalThis.document){const n=Pe(e),r=d.useRef(!1),o=d.useRef(()=>{});return d.useEffect(()=>{const a=s=>{if(s.target&&!r.current){let l=function(){kc(ag,n,u,{discrete:!0})};const u={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=l,t.addEventListener("click",o.current,{once:!0})):l()}else t.removeEventListener("click",o.current);r.current=!1},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 ug(e,t=globalThis==null?void 0:globalThis.document){const n=Pe(e),r=d.useRef(!1);return d.useEffect(()=>{const o=a=>{a.target&&!r.current&&kc(sg,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 kc(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?Nn(o,a):o.dispatchEvent(a)}var Po=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()),Po++,()=>{Po===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Po--}},[])}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},dg="FocusScope",rr=d.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:a,...i}=e,[s,l]=d.useState(null),u=Pe(o),f=Pe(a),c=d.useRef(null),p=fe(t,g=>l(g)),h=d.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;d.useEffect(()=>{if(r){let g=function(C){if(h.paused||!s)return;const D=C.target;s.contains(D)?c.current=D:jt(c.current,{select:!0})},v=function(C){if(h.paused||!s)return;const D=C.relatedTarget;D!==null&&(s.contains(D)||jt(c.current,{select:!0}))},y=function(C){if(document.activeElement===document.body)for(const E of C)E.removedNodes.length>0&&jt(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||(fg(vg(Rc(s)),{select:!0}),document.activeElement===g&&jt(s))}return()=>{s.removeEventListener(Ao,u),setTimeout(()=>{const y=new CustomEvent(Io,Vs);s.addEventListener(Io,f),s.dispatchEvent(y),y.defaultPrevented||jt(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,[C,D]=mg(w);C&&D?!g.shiftKey&&y===D?(g.preventDefault(),n&&jt(C,{select:!0})):g.shiftKey&&y===C&&(g.preventDefault(),n&&jt(D,{select:!0})):y===w&&g.preventDefault()}},[n,r,h.paused]);return m.jsx(J.div,{tabIndex:-1,...i,ref:p,onKeyDown:b})});rr.displayName=dg;function fg(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(jt(r,{select:t}),document.activeElement!==n)return}function mg(e){const t=Rc(e),n=Ks(t,e),r=Ks(t.reverse(),e);return[n,r]}function Rc(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(!pg(n,{upTo:t}))return n}function pg(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 hg(e){return e instanceof HTMLInputElement&&"select"in e}function jt(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&hg(e)&&t&&e.select()}}var Xs=gg();function gg(){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 vg(e){return e.filter(t=>t.tagName!=="A")}var Ne=globalThis!=null&&globalThis.document?d.useLayoutEffect:()=>{},bg=d[" useId ".trim().toString()]||(()=>{}),yg=0;function Re(e){const[t,n]=d.useState(bg());return Ne(()=>{n(r=>r??String(yg++))},[e]),e||(t?`radix-${t}`:"")}const wg=["top","right","bottom","left"],Ft=Math.min,Je=Math.max,Wr=Math.round,Sr=Math.floor,yt=e=>({x:e,y:e}),xg={left:"right",right:"left",bottom:"top",top:"bottom"},Sg={start:"end",end:"start"};function fa(e,t,n){return Je(e,Ft(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 Cg=new Set(["top","bottom"]);function vt(e){return Cg.has(Ot(e))?"y":"x"}function za(e){return Ba(vt(e))}function Eg(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 Dg(e){const t=Br(e);return[ma(e),t,ma(t)]}function ma(e){return e.replace(/start|end/g,t=>Sg[t])}const Qs=["left","right"],Js=["right","left"],Mg=["top","bottom"],Ng=["bottom","top"];function kg(e,t,n){switch(e){case"top":case"bottom":return n?t?Js:Qs:t?Qs:Js;case"left":case"right":return t?Mg:Ng;default:return[]}}function Rg(e,t,n,r){const o=Rn(e);let a=kg(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=>xg[t])}function Og(e){return{top:0,right:0,bottom:0,left:0,...e}}function Oc(e){return typeof e!="number"?Og(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=vt(t),i=za(t),s=Ya(i),l=Ot(t),u=a==="y",f=r.x+r.width/2-o.width/2,c=r.y+r.height/2-o.height/2,p=r[s]/2-o[s]/2;let h;switch(l){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:c};break;case"left":h={x:r.x-o.width,y:c};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 Tg=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:a=[],platform:i}=n,s=a.filter(Boolean),l=await(i.isRTL==null?void 0:i.isRTL(t));let u=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:f,y:c}=ei(u,r,l),p=r,h={},b=0;for(let g=0;g<s.length;g++){const{name:v,fn:y}=s[g],{x:w,y:C,data:D,reset:E}=await y({x:f,y:c,initialPlacement:r,placement:p,strategy:o,middlewareData:h,rects:u,platform:i,elements:{reference:e,floating:t}});f=w??f,c=C??c,h={...h,[v]:{...h[v],...D}},E&&b<=50&&(b++,typeof E=="object"&&(E.placement&&(p=E.placement),E.rects&&(u=E.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:o}):E.rects),{x:f,y:c}=ei(u,p,l)),g=-1)}return{x:f,y:c,placement:p,strategy:o,middlewareData:h}};async function qn(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:a,rects:i,elements:s,strategy:l}=e,{boundary:u="clippingAncestors",rootBoundary:f="viewport",elementContext:c="floating",altBoundary:p=!1,padding:h=0}=Rt(t,e),b=Oc(h),v=s[p?c==="floating"?"reference":"floating":c],y=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:l})),w=c==="floating"?{x:r,y:o,width:i.floating.width,height:i.floating.height}:i.reference,C=await(a.getOffsetParent==null?void 0:a.getOffsetParent(s.floating)),D=await(a.isElement==null?void 0:a.isElement(C))?await(a.getScale==null?void 0:a.getScale(C))||{x:1,y:1}:{x:1,y:1},E=Yr(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:w,offsetParent:C,strategy:l}):w);return{top:(y.top-E.top+b.top)/D.y,bottom:(E.bottom-y.bottom+b.bottom)/D.y,left:(y.left-E.left+b.left)/D.x,right:(E.right-y.right+b.right)/D.x}}const _g=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:a,platform:i,elements:s,middlewareData:l}=t,{element:u,padding:f=0}=Rt(e,t)||{};if(u==null)return{};const c=Oc(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",C=v?"clientHeight":"clientWidth",D=a.reference[b]+a.reference[h]-p[h]-a.floating[b],E=p[h]-a.reference[h],R=await(i.getOffsetParent==null?void 0:i.getOffsetParent(u));let S=R?R[C]:0;(!S||!await(i.isElement==null?void 0:i.isElement(R)))&&(S=s.floating[C]||a.floating[b]);const k=D/2-E/2,I=S/2-g[b]/2-1,j=Ft(c[y],I),L=Ft(c[w],I),V=j,B=S-g[b]-L,P=S/2-g[b]/2+k,O=fa(V,P,B),M=!l.arrow&&Rn(o)!=null&&P!==O&&a.reference[b]/2-(P<V?j:L)-g[b]/2<0,A=M?P<V?P-V:P-B:0;return{[h]:p[h]+A,data:{[h]:O,centerOffset:P-O-A,...M&&{alignmentOffset:A}},reset:M}}}),Pg=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:l,elements:u}=t,{mainAxis:f=!0,crossAxis:c=!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=vt(s),C=Ot(s)===s,D=await(l.isRTL==null?void 0:l.isRTL(u.floating)),E=p||(C||!g?[Br(s)]:Dg(s)),R=b!=="none";!p&&R&&E.push(...Rg(s,g,b,D));const S=[s,...E],k=await qn(t,v),I=[];let j=((r=a.flip)==null?void 0:r.overflows)||[];if(f&&I.push(k[y]),c){const P=Eg(o,i,D);I.push(k[P[0]],k[P[1]])}if(j=[...j,{placement:o,overflows:I}],!I.every(P=>P<=0)){var L,V;const P=(((L=a.flip)==null?void 0:L.index)||0)+1,O=S[P];if(O&&(!(c==="alignment"?w!==vt(O):!1)||j.every(N=>vt(N.placement)===w?N.overflows[0]>0:!0)))return{data:{index:P,overflows:j},reset:{placement:O}};let M=(V=j.filter(A=>A.overflows[0]<=0).sort((A,N)=>A.overflows[1]-N.overflows[1])[0])==null?void 0:V.placement;if(!M)switch(h){case"bestFit":{var B;const A=(B=j.filter(N=>{if(R){const _=vt(N.placement);return _===w||_==="y"}return!0}).map(N=>[N.placement,N.overflows.filter(_=>_>0).reduce((_,Y)=>_+Y,0)]).sort((N,_)=>N[1]-_[1])[0])==null?void 0:B[0];A&&(M=A);break}case"initialPlacement":M=s;break}if(o!==M)return{reset:{placement:M}}}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 wg.some(t=>e[t]>=0)}const Ag=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{}}}}},Tc=new Set(["left","top"]);async function Ig(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),l=vt(n)==="y",u=Tc.has(i)?-1:1,f=a&&l?-1:1,c=Rt(t,e);let{mainAxis:p,crossAxis:h,alignmentAxis:b}=typeof c=="number"?{mainAxis:c,crossAxis:0,alignmentAxis:null}:{mainAxis:c.mainAxis||0,crossAxis:c.crossAxis||0,alignmentAxis:c.alignmentAxis};return s&&typeof b=="number"&&(h=s==="end"?b*-1:b),l?{x:h*f,y:p*u}:{x:p*u,y:h*f}}const jg=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,l=await Ig(t,e);return i===((n=s.offset)==null?void 0:n.placement)&&(r=s.arrow)!=null&&r.alignmentOffset?{}:{x:o+l.x,y:a+l.y,data:{...l,placement:i}}}}},$g=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}}},...l}=Rt(e,t),u={x:n,y:r},f=await qn(t,l),c=vt(Ot(o)),p=Ba(c);let h=u[p],b=u[c];if(a){const v=p==="y"?"top":"left",y=p==="y"?"bottom":"right",w=h+f[v],C=h-f[y];h=fa(w,h,C)}if(i){const v=c==="y"?"top":"left",y=c==="y"?"bottom":"right",w=b+f[v],C=b-f[y];b=fa(w,b,C)}const g=s.fn({...t,[p]:h,[c]:b});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[p]:a,[c]:i}}}}}},Lg=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:l=!0,crossAxis:u=!0}=Rt(e,t),f={x:n,y:r},c=vt(o),p=Ba(c);let h=f[p],b=f[c];const g=Rt(s,t),v=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(l){const C=p==="y"?"height":"width",D=a.reference[p]-a.floating[C]+v.mainAxis,E=a.reference[p]+a.reference[C]-v.mainAxis;h<D?h=D:h>E&&(h=E)}if(u){var y,w;const C=p==="y"?"width":"height",D=Tc.has(Ot(o)),E=a.reference[c]-a.floating[C]+(D&&((y=i.offset)==null?void 0:y[c])||0)+(D?0:v.crossAxis),R=a.reference[c]+a.reference[C]+(D?0:((w=i.offset)==null?void 0:w[c])||0)-(D?v.crossAxis:0);b<E?b=E:b>R&&(b=R)}return{[p]:h,[c]:b}}}},Fg=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:l=()=>{},...u}=Rt(e,t),f=await qn(t,u),c=Ot(o),p=Rn(o),h=vt(o)==="y",{width:b,height:g}=a.floating;let v,y;c==="top"||c==="bottom"?(v=c,y=p===(await(i.isRTL==null?void 0:i.isRTL(s.floating))?"start":"end")?"left":"right"):(y=c,v=p==="end"?"top":"bottom");const w=g-f.top-f.bottom,C=b-f.left-f.right,D=Ft(g-f[v],w),E=Ft(b-f[y],C),R=!t.middlewareData.shift;let S=D,k=E;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(k=C),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(S=w),R&&!p){const j=Je(f.left,0),L=Je(f.right,0),V=Je(f.top,0),B=Je(f.bottom,0);h?k=b-2*(j!==0||L!==0?j+L:Je(f.left,f.right)):S=g-2*(V!==0||B!==0?V+B:Je(f.top,f.bottom))}await l({...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 et(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function xt(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 et(e).Node:!1}function ut(e){return no()?e instanceof Element||e instanceof et(e).Element:!1}function wt(e){return no()?e instanceof HTMLElement||e instanceof et(e).HTMLElement:!1}function ri(e){return!no()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof et(e).ShadowRoot}const Wg=new Set(["inline","contents"]);function or(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=dt(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!Wg.has(o)}const Bg=new Set(["table","td","th"]);function Yg(e){return Bg.has(On(e))}const zg=[":popover-open",":modal"];function ro(e){return zg.some(t=>{try{return e.matches(t)}catch{return!1}})}const Hg=["transform","translate","scale","rotate","perspective"],Ug=["transform","translate","scale","rotate","perspective","filter"],Gg=["paint","layout","strict","content"];function Ha(e){const t=Ua(),n=ut(e)?dt(e):e;return Hg.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)||Ug.some(r=>(n.willChange||"").includes(r))||Gg.some(r=>(n.contain||"").includes(r))}function qg(e){let t=Wt(e);for(;wt(t)&&!wn(t);){if(Ha(t))return t;if(ro(t))return null;t=Wt(t)}return null}function Ua(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Vg=new Set(["html","body","#document"]);function wn(e){return Vg.has(On(e))}function dt(e){return et(e).getComputedStyle(e)}function oo(e){return ut(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Wt(e){if(On(e)==="html")return e;const t=e.assignedSlot||e.parentNode||ri(e)&&e.host||xt(e);return ri(t)?t.host:t}function Pc(e){const t=Wt(e);return wn(t)?e.ownerDocument?e.ownerDocument.body:e.body:wt(t)&&or(t)?t:Pc(t)}function Vn(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Pc(e),a=o===((r=e.ownerDocument)==null?void 0:r.body),i=et(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 Ac(e){const t=dt(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=wt(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 ut(e)?e:e.contextElement}function bn(e){const t=Ga(e);if(!wt(t))return yt(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:a}=Ac(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 Kg=yt(0);function Ic(e){const t=et(e);return!Ua()||!t.visualViewport?Kg:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Xg(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==et(e)?!1:t}function Jt(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),a=Ga(e);let i=yt(1);t&&(r?ut(r)&&(i=bn(r)):i=bn(e));const s=Xg(a,n,r)?Ic(a):yt(0);let l=(o.left+s.x)/i.x,u=(o.top+s.y)/i.y,f=o.width/i.x,c=o.height/i.y;if(a){const p=et(a),h=r&&ut(r)?et(r):r;let b=p,g=pa(b);for(;g&&r&&h!==b;){const v=bn(g),y=g.getBoundingClientRect(),w=dt(g),C=y.left+(g.clientLeft+parseFloat(w.paddingLeft))*v.x,D=y.top+(g.clientTop+parseFloat(w.paddingTop))*v.y;l*=v.x,u*=v.y,f*=v.x,c*=v.y,l+=C,u+=D,b=et(g),g=pa(b)}}return Yr({width:f,height:c,x:l,y:u})}function ao(e,t){const n=oo(e).scrollLeft;return t?t.left+n:Jt(xt(e)).left+n}function jc(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 Zg(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const a=o==="fixed",i=xt(r),s=t?ro(t.floating):!1;if(r===i||s&&a)return n;let l={scrollLeft:0,scrollTop:0},u=yt(1);const f=yt(0),c=wt(r);if((c||!c&&!a)&&((On(r)!=="body"||or(i))&&(l=oo(r)),wt(r))){const h=Jt(r);u=bn(r),f.x=h.x+r.clientLeft,f.y=h.y+r.clientTop}const p=i&&!c&&!a?jc(i,l):yt(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-l.scrollLeft*u.x+f.x+p.x,y:n.y*u.y-l.scrollTop*u.y+f.y+p.y}}function Qg(e){return Array.from(e.getClientRects())}function Jg(e){const t=xt(e),n=oo(e),r=e.ownerDocument.body,o=Je(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=Je(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+ao(e);const s=-n.scrollTop;return dt(r).direction==="rtl"&&(i+=Je(t.clientWidth,r.clientWidth)-o),{width:o,height:a,x:i,y:s}}const oi=25;function ev(e,t){const n=et(e),r=xt(e),o=n.visualViewport;let a=r.clientWidth,i=r.clientHeight,s=0,l=0;if(o){a=o.width,i=o.height;const f=Ua();(!f||f&&t==="fixed")&&(s=o.offsetLeft,l=o.offsetTop)}const u=ao(r);if(u<=0){const f=r.ownerDocument,c=f.body,p=getComputedStyle(c),h=f.compatMode==="CSS1Compat"&&parseFloat(p.marginLeft)+parseFloat(p.marginRight)||0,b=Math.abs(r.clientWidth-c.clientWidth-h);b<=oi&&(a-=b)}else u<=oi&&(a+=u);return{width:a,height:i,x:s,y:l}}const tv=new Set(["absolute","fixed"]);function nv(e,t){const n=Jt(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,a=wt(e)?bn(e):yt(1),i=e.clientWidth*a.x,s=e.clientHeight*a.y,l=o*a.x,u=r*a.y;return{width:i,height:s,x:l,y:u}}function ai(e,t,n){let r;if(t==="viewport")r=ev(e,n);else if(t==="document")r=Jg(xt(e));else if(ut(t))r=nv(t,n);else{const o=Ic(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Yr(r)}function $c(e,t){const n=Wt(e);return n===t||!ut(n)||wn(n)?!1:dt(n).position==="fixed"||$c(n,t)}function rv(e,t){const n=t.get(e);if(n)return n;let r=Vn(e,[],!1).filter(s=>ut(s)&&On(s)!=="body"),o=null;const a=dt(e).position==="fixed";let i=a?Wt(e):e;for(;ut(i)&&!wn(i);){const s=dt(i),l=Ha(i);!l&&s.position==="fixed"&&(o=null),(a?!l&&!o:!l&&s.position==="static"&&!!o&&tv.has(o.position)||or(i)&&!l&&$c(e,i))?r=r.filter(f=>f!==i):o=s,i=Wt(i)}return t.set(e,r),r}function ov(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[...n==="clippingAncestors"?ro(t)?[]:rv(t,this._c):[].concat(n),r],s=i[0],l=i.reduce((u,f)=>{const c=ai(t,f,o);return u.top=Je(c.top,u.top),u.right=Ft(c.right,u.right),u.bottom=Ft(c.bottom,u.bottom),u.left=Je(c.left,u.left),u},ai(t,s,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function av(e){const{width:t,height:n}=Ac(e);return{width:t,height:n}}function sv(e,t,n){const r=wt(t),o=xt(t),a=n==="fixed",i=Jt(e,!0,a,t);let s={scrollLeft:0,scrollTop:0};const l=yt(0);function u(){l.x=ao(o)}if(r||!r&&!a)if((On(t)!=="body"||or(o))&&(s=oo(t)),r){const h=Jt(t,!0,a,t);l.x=h.x+t.clientLeft,l.y=h.y+t.clientTop}else o&&u();a&&!r&&o&&u();const f=o&&!r&&!a?jc(o,s):yt(0),c=i.left+s.scrollLeft-l.x-f.x,p=i.top+s.scrollTop-l.y-f.y;return{x:c,y:p,width:i.width,height:i.height}}function jo(e){return dt(e).position==="static"}function si(e,t){if(!wt(e)||dt(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return xt(e)===n&&(n=n.ownerDocument.body),n}function Lc(e,t){const n=et(e);if(ro(e))return n;if(!wt(e)){let o=Wt(e);for(;o&&!wn(o);){if(ut(o)&&!jo(o))return o;o=Wt(o)}return n}let r=si(e,t);for(;r&&Yg(r)&&jo(r);)r=si(r,t);return r&&wn(r)&&jo(r)&&!Ha(r)?n:r||qg(e)||n}const iv=async function(e){const t=this.getOffsetParent||Lc,n=this.getDimensions,r=await n(e.floating);return{reference:sv(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function cv(e){return dt(e).direction==="rtl"}const lv={convertOffsetParentRelativeRectToViewportRelativeRect:Zg,getDocumentElement:xt,getClippingRect:ov,getOffsetParent:Lc,getElementRects:iv,getClientRects:Qg,getDimensions:av,getScale:bn,isElement:ut,isRTL:cv};function Fc(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function uv(e,t){let n=null,r;const o=xt(e);function a(){var s;clearTimeout(r),(s=n)==null||s.disconnect(),n=null}function i(s,l){s===void 0&&(s=!1),l===void 0&&(l=1),a();const u=e.getBoundingClientRect(),{left:f,top:c,width:p,height:h}=u;if(s||t(),!p||!h)return;const b=Sr(c),g=Sr(o.clientWidth-(f+p)),v=Sr(o.clientHeight-(c+h)),y=Sr(f),C={rootMargin:-b+"px "+-g+"px "+-v+"px "+-y+"px",threshold:Je(0,Ft(1,l))||1};let D=!0;function E(R){const S=R[0].intersectionRatio;if(S!==l){if(!D)return i();S?i(!1,S):r=setTimeout(()=>{i(!1,1e-7)},1e3)}S===1&&!Fc(u,e.getBoundingClientRect())&&i(),D=!1}try{n=new IntersectionObserver(E,{...C,root:o.ownerDocument})}catch{n=new IntersectionObserver(E,C)}n.observe(e)}return i(!0),a}function dv(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:l=!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 c=u&&s?uv(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 C;(C=h)==null||C.observe(t)})),n()}),u&&!l&&h.observe(u),h.observe(t));let b,g=l?Jt(e):null;l&&v();function v(){const y=Jt(e);g&&!Fc(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)}),c==null||c(),(y=h)==null||y.disconnect(),h=null,l&&cancelAnimationFrame(b)}}const fv=jg,mv=$g,pv=Pg,hv=Fg,gv=Ag,ii=_g,vv=Lg,bv=(e,t,n)=>{const r=new Map,o={platform:lv,...n},a={...o.platform,_c:r};return Tg(e,t,{...o,platform:a})};var yv=typeof document<"u",wv=function(){},Pr=yv?x.useLayoutEffect:wv;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 Wc(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function ci(e,t){const n=Wc(e);return Math.round(t*n)/n}function $o(e){const t=d.useRef(e);return Pr(()=>{t.current=e}),t}function xv(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:l,open:u}=e,[f,c]=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,y]=d.useState(null),w=d.useCallback(N=>{N!==R.current&&(R.current=N,g(N))},[]),C=d.useCallback(N=>{N!==S.current&&(S.current=N,y(N))},[]),D=a||b,E=i||v,R=d.useRef(null),S=d.useRef(null),k=d.useRef(f),I=l!=null,j=$o(l),L=$o(o),V=$o(u),B=d.useCallback(()=>{if(!R.current||!S.current)return;const N={placement:t,strategy:n,middleware:p};L.current&&(N.platform=L.current),bv(R.current,S.current,N).then(_=>{const Y={..._,isPositioned:V.current!==!1};P.current&&!zr(k.current,Y)&&(k.current=Y,eo.flushSync(()=>{c(Y)}))})},[p,t,n,L,V]);Pr(()=>{u===!1&&k.current.isPositioned&&(k.current.isPositioned=!1,c(N=>({...N,isPositioned:!1})))},[u]);const P=d.useRef(!1);Pr(()=>(P.current=!0,()=>{P.current=!1}),[]),Pr(()=>{if(D&&(R.current=D),E&&(S.current=E),D&&E){if(j.current)return j.current(D,E,B);B()}},[D,E,B,j,I]);const O=d.useMemo(()=>({reference:R,floating:S,setReference:w,setFloating:C}),[w,C]),M=d.useMemo(()=>({reference:D,floating:E}),[D,E]),A=d.useMemo(()=>{const N={position:n,left:0,top:0};if(!M.floating)return N;const _=ci(M.floating,f.x),Y=ci(M.floating,f.y);return s?{...N,transform:"translate("+_+"px, "+Y+"px)",...Wc(M.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:_,top:Y}},[n,s,M.floating,f.x,f.y]);return d.useMemo(()=>({...f,update:B,refs:O,elements:M,floatingStyles:A}),[f,B,O,M,A])}const Sv=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):{}}}},Cv=(e,t)=>({...fv(e),options:[e,t]}),Ev=(e,t)=>({...mv(e),options:[e,t]}),Dv=(e,t)=>({...vv(e),options:[e,t]}),Mv=(e,t)=>({...pv(e),options:[e,t]}),Nv=(e,t)=>({...hv(e),options:[e,t]}),kv=(e,t)=>({...gv(e),options:[e,t]}),Rv=(e,t)=>({...Sv(e),options:[e,t]});var Ov="Arrow",Bc=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"})})});Bc.displayName=Ov;var Tv=Bc;function qa(e){const[t,n]=d.useState(void 0);return Ne(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const a=o[0];let i,s;if("borderBoxSize"in a){const l=a.borderBoxSize,u=Array.isArray(l)?l[0]:l;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",[Yc,Yt]=He(Va),[_v,zc]=Yc(Va),Hc=e=>{const{__scopePopper:t,children:n}=e,[r,o]=d.useState(null);return m.jsx(_v,{scope:t,anchor:r,onAnchorChange:o,children:n})};Hc.displayName=Va;var Uc="PopperAnchor",Gc=d.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,a=zc(Uc,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})});Gc.displayName=Uc;var Ka="PopperContent",[Pv,Av]=Yc(Ka),qc=d.forwardRef((e,t)=>{var W,Q,K,Z,se,ie;const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:a="center",alignOffset:i=0,arrowPadding:s=0,avoidCollisions:l=!0,collisionBoundary:u=[],collisionPadding:f=0,sticky:c="partial",hideWhenDetached:p=!1,updatePositionStrategy:h="optimized",onPlaced:b,...g}=e,v=zc(Ka,n),[y,w]=d.useState(null),C=fe(t,be=>w(be)),[D,E]=d.useState(null),R=qa(D),S=(R==null?void 0:R.width)??0,k=(R==null?void 0:R.height)??0,I=r+(a!=="center"?"-"+a:""),j=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:j,boundary:L.filter(jv),altBoundary:V},{refs:P,floatingStyles:O,placement:M,isPositioned:A,middlewareData:N}=xv({strategy:"fixed",placement:I,whileElementsMounted:(...be)=>dv(...be,{animationFrame:h==="always"}),elements:{reference:v.anchor},middleware:[Cv({mainAxis:o+k,alignmentAxis:i}),l&&Ev({mainAxis:!0,crossAxis:!1,limiter:c==="partial"?Dv():void 0,...B}),l&&Mv({...B}),Nv({...B,apply:({elements:be,rects:ee,availableWidth:Ae,availableHeight:Ie})=>{const{width:Ee,height:Ge}=ee.reference,Ce=be.floating.style;Ce.setProperty("--radix-popper-available-width",`${Ae}px`),Ce.setProperty("--radix-popper-available-height",`${Ie}px`),Ce.setProperty("--radix-popper-anchor-width",`${Ee}px`),Ce.setProperty("--radix-popper-anchor-height",`${Ge}px`)}}),D&&Rv({element:D,padding:s}),$v({arrowWidth:S,arrowHeight:k}),p&&kv({strategy:"referenceHidden",...B})]}),[_,Y]=Xc(M),H=Pe(b);Ne(()=>{A&&(H==null||H())},[A,H]);const T=(W=N.arrow)==null?void 0:W.x,$=(Q=N.arrow)==null?void 0:Q.y,z=((K=N.arrow)==null?void 0:K.centerOffset)!==0,[U,G]=d.useState();return Ne(()=>{y&&G(window.getComputedStyle(y).zIndex)},[y]),m.jsx("div",{ref:P.setFloating,"data-radix-popper-content-wrapper":"",style:{...O,transform:A?O.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:U,"--radix-popper-transform-origin":[(Z=N.transformOrigin)==null?void 0:Z.x,(se=N.transformOrigin)==null?void 0:se.y].join(" "),...((ie=N.hide)==null?void 0:ie.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:m.jsx(Pv,{scope:n,placedSide:_,onArrowChange:E,arrowX:T,arrowY:$,shouldHideArrow:z,children:m.jsx(J.div,{"data-side":_,"data-align":Y,...g,ref:C,style:{...g.style,animation:A?void 0:"none"}})})})});qc.displayName=Ka;var Vc="PopperArrow",Iv={top:"bottom",right:"left",bottom:"top",left:"right"},Kc=d.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,a=Av(Vc,r),i=Iv[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(Tv,{...o,ref:n,style:{...o.style,display:"block"}})})});Kc.displayName=Vc;function jv(e){return e!==null}var $v=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,l=i?0:e.arrowHeight,[u,f]=Xc(n),c={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)+l/2;let b="",g="";return u==="bottom"?(b=i?c:`${p}px`,g=`${-l}px`):u==="top"?(b=i?c:`${p}px`,g=`${r.floating.height+l}px`):u==="right"?(b=`${-l}px`,g=i?c:`${h}px`):u==="left"&&(b=`${r.floating.width+l}px`,g=i?c:`${h}px`),{data:{x:b,y:g}}}});function Xc(e){const[t,n="center"]=e.split("-");return[t,n]}var ar=Hc,sr=Gc,so=qc,io=Kc,Lv="Portal",ir=d.forwardRef((e,t)=>{var s;const{container:n,...r}=e,[o,a]=d.useState(!1);Ne(()=>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=Lv;function Fv(e,t){return d.useReducer((n,r)=>t[n][r]??n,e)}var ot=e=>{const{present:t,children:n}=e,r=Wv(t),o=typeof n=="function"?n({present:r.isPresent}):d.Children.only(n),a=fe(r.ref,Bv(o));return typeof n=="function"||r.isPresent?d.cloneElement(o,{ref:a}):null};ot.displayName="Presence";function Wv(e){const[t,n]=d.useState(),r=d.useRef(null),o=d.useRef(e),a=d.useRef("none"),i=e?"mounted":"unmounted",[s,l]=Fv(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]),Ne(()=>{const u=r.current,f=o.current;if(f!==e){const p=a.current,h=Cr(u);e?l("MOUNT"):h==="none"||(u==null?void 0:u.display)==="none"?l("UNMOUNT"):l(f&&p!==h?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),Ne(()=>{if(t){let u;const f=t.ownerDocument.defaultView??window,c=h=>{const g=Cr(r.current).includes(h.animationName);if(h.target===t&&g&&(l("ANIMATION_END"),!o.current)){const v=t.style.animationFillMode;t.style.animationFillMode="forwards",u=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",c),t.addEventListener("animationend",c),()=>{f.clearTimeout(u),t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",c),t.removeEventListener("animationend",c)}}else l("ANIMATION_END")},[t,l]),{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 Bv(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 Yv=d[" useInsertionEffect ".trim().toString()]||Ne;function rt({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,a,i]=zv({defaultProp:t,onChange:n}),s=e!==void 0,l=s?e:o;{const f=d.useRef(e!==void 0);d.useEffect(()=>{const c=f.current;c!==s&&console.warn(`${r} is changing from ${c?"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 c;if(s){const p=Hv(f)?f(e):f;p!==e&&((c=i.current)==null||c.call(i,p))}else a(f)},[s,e,a,i]);return[l,u]}function zv({defaultProp:e,onChange:t}){const[n,r]=d.useState(e),o=d.useRef(n),a=d.useRef(t);return Yv(()=>{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 Hv(e){return typeof e=="function"}var Uv=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},fn=new WeakMap,Er=new WeakMap,Dr={},Lo=0,Zc=function(e){return e&&(e.host||Zc(e.parentNode))},Gv=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=Zc(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})},qv=function(e,t,n,r){var o=Gv(t,Array.isArray(e)?e:[e]);Dr[n]||(Dr[n]=new WeakMap);var a=Dr[n],i=[],s=new Set,l=new Set(o),u=function(c){!c||s.has(c)||(s.add(c),u(c.parentNode))};o.forEach(u);var f=function(c){!c||l.has(c)||Array.prototype.forEach.call(c.children,function(p){if(s.has(p))f(p);else try{var h=p.getAttribute(r),b=h!==null&&h!=="false",g=(fn.get(p)||0)+1,v=(a.get(p)||0)+1;fn.set(p,g),a.set(p,v),i.push(p),g===1&&b&&Er.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(c){var p=fn.get(c)-1,h=a.get(c)-1;fn.set(c,p),a.set(c,h),p||(Er.has(c)||c.removeAttribute(r),Er.delete(c)),h||c.removeAttribute(n)}),Lo--,Lo||(fn=new WeakMap,fn=new WeakMap,Er=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=Uv(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),qv(r,o,n,"aria-hidden")):function(){return null}},gt=function(){return gt=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},gt.apply(this,arguments)};function Qc(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 Vv(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",Kv="with-scroll-bars-hidden",Xv="--removed-body-scroll-bar-size";function Fo(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Zv(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 Qv=typeof window<"u"?d.useLayoutEffect:d.useEffect,li=new WeakMap;function Jv(e,t){var n=Zv(null,function(r){return e.forEach(function(o){return Fo(o,r)})});return Qv(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 eb(e){return e}function tb(e,t){t===void 0&&(t=eb);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 l=function(){var f=i;i=[],f.forEach(a)},u=function(){return Promise.resolve().then(l)};u(),n={push:function(f){i.push(f),u()},filter:function(f){return i=i.filter(f),n}}}};return o}function nb(e){e===void 0&&(e={});var t=tb(null);return t.options=gt({async:!0,ssr:!1},e),t}var Jc=function(e){var t=e.sideCar,n=Qc(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,gt({},n))};Jc.isSideCarExport=!0;function rb(e,t){return e.useMedium(t),Jc}var el=nb(),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,l=e.className,u=e.removeScrollBar,f=e.enabled,c=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,C=e.gapMode,D=Qc(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),E=p,R=Jv([n,t]),S=gt(gt({},D),o);return d.createElement(d.Fragment,null,f&&d.createElement(E,{sideCar:el,removeScrollBar:u,shards:c,noRelative:h,noIsolation:b,inert:g,setCallbacks:a,allowPinchZoom:!!v,lockRef:n,gapMode:C}),i?d.cloneElement(d.Children.only(s),gt(gt({},S),{ref:R})):d.createElement(w,gt({},S,{className:l,ref:R}),s))});lo.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};lo.classNames={fullWidth:Ir,zeroRight:Ar};var ob=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function ab(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=ob();return t&&e.setAttribute("nonce",t),e}function sb(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function ib(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var cb=function(){var e=0,t=null;return{add:function(n){e==0&&(t=ab())&&(sb(t,n),ib(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},lb=function(){var e=cb();return function(t,n){d.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},tl=function(){var e=lb(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},ub={left:0,top:0,right:0,gap:0},Bo=function(e){return parseInt(e||"",10)||0},db=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)]},fb=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return ub;var t=db(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])}},mb=tl(),yn="data-scroll-locked",pb=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(Kv,` {
131
+ */const rg=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],kn=ke("X",rg);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(an,{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(on,{type:i?"text":"password",placeholder:t,className:F("pr-10",r&&"border-red-500 focus-visible:ring-red-500"),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(Lh,{className:"h-4 w-4 text-gray-400 hover:text-gray-500"}):m.jsx(Wh,{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 focus:ring-2 focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm",u?"border-destructive focus:ring-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 X(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 og(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 He(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,ag(o,...t)]}function ag(...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 Pe(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=Pe(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 sg="DismissableLayer",da="dismissableLayer.update",ig="dismissableLayer.pointerDownOutside",cg="dismissableLayer.focusOutside",Us,Mc=d.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Nc=d.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:i,onDismiss:s,...c}=e,u=d.useContext(Mc),[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,C=u.layersWithOutsidePointerEventsDisabled.size>0,D=w>=y,E=dg(S=>{const k=S.target,I=[...u.branches].some(j=>j.contains(k));!D||I||(o==null||o(S),i==null||i(S),S.defaultPrevented||s==null||s())},p),R=fg(S=>{const k=S.target;[...u.branches].some(j=>j.contains(k))||(a==null||a(S),i==null||i(S),S.defaultPrevented||s==null||s())},p);return nr(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:C?D?"auto":"none":void 0,...e.style},onFocusCapture:X(e.onFocusCapture,R.onFocusCapture),onBlurCapture:X(e.onBlurCapture,R.onBlurCapture),onPointerDownCapture:X(e.onPointerDownCapture,E.onPointerDownCapture)})});Nc.displayName=sg;var lg="DismissableLayerBranch",ug=d.forwardRef((e,t)=>{const n=d.useContext(Mc),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})});ug.displayName=lg;function dg(e,t=globalThis==null?void 0:globalThis.document){const n=Pe(e),r=d.useRef(!1),o=d.useRef(()=>{});return d.useEffect(()=>{const a=s=>{if(s.target&&!r.current){let c=function(){kc(ig,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 fg(e,t=globalThis==null?void 0:globalThis.document){const n=Pe(e),r=d.useRef(!1);return d.useEffect(()=>{const o=a=>{a.target&&!r.current&&kc(cg,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 kc(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?Nn(o,a):o.dispatchEvent(a)}var Po=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()),Po++,()=>{Po===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Po--}},[])}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},mg="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=Pe(o),f=Pe(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(C){if(h.paused||!s)return;const D=C.target;s.contains(D)?l.current=D:jt(l.current,{select:!0})},v=function(C){if(h.paused||!s)return;const D=C.relatedTarget;D!==null&&(s.contains(D)||jt(l.current,{select:!0}))},y=function(C){if(document.activeElement===document.body)for(const E of C)E.removedNodes.length>0&&jt(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||(pg(yg(Rc(s)),{select:!0}),document.activeElement===g&&jt(s))}return()=>{s.removeEventListener(Ao,u),setTimeout(()=>{const y=new CustomEvent(Io,Vs);s.addEventListener(Io,f),s.dispatchEvent(y),y.defaultPrevented||jt(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,[C,D]=hg(w);C&&D?!g.shiftKey&&y===D?(g.preventDefault(),n&&jt(C,{select:!0})):g.shiftKey&&y===C&&(g.preventDefault(),n&&jt(D,{select:!0})):y===w&&g.preventDefault()}},[n,r,h.paused]);return m.jsx(J.div,{tabIndex:-1,...i,ref:p,onKeyDown:b})});rr.displayName=mg;function pg(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(jt(r,{select:t}),document.activeElement!==n)return}function hg(e){const t=Rc(e),n=Ks(t,e),r=Ks(t.reverse(),e);return[n,r]}function Rc(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(!gg(n,{upTo:t}))return n}function gg(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 vg(e){return e instanceof HTMLInputElement&&"select"in e}function jt(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&vg(e)&&t&&e.select()}}var Xs=bg();function bg(){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 yg(e){return e.filter(t=>t.tagName!=="A")}var Ne=globalThis!=null&&globalThis.document?d.useLayoutEffect:()=>{},wg=d[" useId ".trim().toString()]||(()=>{}),xg=0;function Re(e){const[t,n]=d.useState(wg());return Ne(()=>{n(r=>r??String(xg++))},[e]),e||(t?`radix-${t}`:"")}const Sg=["top","right","bottom","left"],Ft=Math.min,Je=Math.max,Wr=Math.round,Sr=Math.floor,yt=e=>({x:e,y:e}),Cg={left:"right",right:"left",bottom:"top",top:"bottom"},Eg={start:"end",end:"start"};function fa(e,t,n){return Je(e,Ft(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 Dg=new Set(["top","bottom"]);function vt(e){return Dg.has(Ot(e))?"y":"x"}function za(e){return Ba(vt(e))}function Mg(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 Ng(e){const t=Br(e);return[ma(e),t,ma(t)]}function ma(e){return e.replace(/start|end/g,t=>Eg[t])}const Qs=["left","right"],Js=["right","left"],kg=["top","bottom"],Rg=["bottom","top"];function Og(e,t,n){switch(e){case"top":case"bottom":return n?t?Js:Qs:t?Qs:Js;case"left":case"right":return t?kg:Rg;default:return[]}}function Tg(e,t,n,r){const o=Rn(e);let a=Og(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 Oc(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=vt(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 Pg=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:C,data:D,reset:E}=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=C??l,h={...h,[v]:{...h[v],...D}},E&&b<=50&&(b++,typeof E=="object"&&(E.placement&&(p=E.placement),E.rects&&(u=E.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:o}):E.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=Oc(h),v=s[p?l==="floating"?"reference":"floating":l],y=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})),w=l==="floating"?{x:r,y:o,width:i.floating.width,height:i.floating.height}:i.reference,C=await(a.getOffsetParent==null?void 0:a.getOffsetParent(s.floating)),D=await(a.isElement==null?void 0:a.isElement(C))?await(a.getScale==null?void 0:a.getScale(C))||{x:1,y:1}:{x:1,y:1},E=Yr(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:w,offsetParent:C,strategy:c}):w);return{top:(y.top-E.top+b.top)/D.y,bottom:(E.bottom-y.bottom+b.bottom)/D.y,left:(y.left-E.left+b.left)/D.x,right:(E.right-y.right+b.right)/D.x}}const Ag=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=Oc(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",C=v?"clientHeight":"clientWidth",D=a.reference[b]+a.reference[h]-p[h]-a.floating[b],E=p[h]-a.reference[h],R=await(i.getOffsetParent==null?void 0:i.getOffsetParent(u));let S=R?R[C]:0;(!S||!await(i.isElement==null?void 0:i.isElement(R)))&&(S=s.floating[C]||a.floating[b]);const k=D/2-E/2,I=S/2-g[b]/2-1,j=Ft(l[y],I),L=Ft(l[w],I),V=j,B=S-g[b]-L,P=S/2-g[b]/2+k,O=fa(V,P,B),M=!c.arrow&&Rn(o)!=null&&P!==O&&a.reference[b]/2-(P<V?j:L)-g[b]/2<0,A=M?P<V?P-V:P-B:0;return{[h]:p[h]+A,data:{[h]:O,centerOffset:P-O-A,...M&&{alignmentOffset:A}},reset:M}}}),Ig=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=vt(s),C=Ot(s)===s,D=await(c.isRTL==null?void 0:c.isRTL(u.floating)),E=p||(C||!g?[Br(s)]:Ng(s)),R=b!=="none";!p&&R&&E.push(...Tg(s,g,b,D));const S=[s,...E],k=await qn(t,v),I=[];let j=((r=a.flip)==null?void 0:r.overflows)||[];if(f&&I.push(k[y]),l){const P=Mg(o,i,D);I.push(k[P[0]],k[P[1]])}if(j=[...j,{placement:o,overflows:I}],!I.every(P=>P<=0)){var L,V;const P=(((L=a.flip)==null?void 0:L.index)||0)+1,O=S[P];if(O&&(!(l==="alignment"?w!==vt(O):!1)||j.every(N=>vt(N.placement)===w?N.overflows[0]>0:!0)))return{data:{index:P,overflows:j},reset:{placement:O}};let M=(V=j.filter(A=>A.overflows[0]<=0).sort((A,N)=>A.overflows[1]-N.overflows[1])[0])==null?void 0:V.placement;if(!M)switch(h){case"bestFit":{var B;const A=(B=j.filter(N=>{if(R){const _=vt(N.placement);return _===w||_==="y"}return!0}).map(N=>[N.placement,N.overflows.filter(_=>_>0).reduce((_,Y)=>_+Y,0)]).sort((N,_)=>N[1]-_[1])[0])==null?void 0:B[0];A&&(M=A);break}case"initialPlacement":M=s;break}if(o!==M)return{reset:{placement:M}}}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 Sg.some(t=>e[t]>=0)}const jg=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{}}}}},Tc=new Set(["left","top"]);async function $g(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=vt(n)==="y",u=Tc.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 Lg=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 $g(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}}}}},Fg=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=vt(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],C=h-f[y];h=fa(w,h,C)}if(i){const v=l==="y"?"top":"left",y=l==="y"?"bottom":"right",w=b+f[v],C=b-f[y];b=fa(w,b,C)}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}}}}}},Wg=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=vt(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 C=p==="y"?"height":"width",D=a.reference[p]-a.floating[C]+v.mainAxis,E=a.reference[p]+a.reference[C]-v.mainAxis;h<D?h=D:h>E&&(h=E)}if(u){var y,w;const C=p==="y"?"width":"height",D=Tc.has(Ot(o)),E=a.reference[l]-a.floating[C]+(D&&((y=i.offset)==null?void 0:y[l])||0)+(D?0:v.crossAxis),R=a.reference[l]+a.reference[C]+(D?0:((w=i.offset)==null?void 0:w[l])||0)-(D?v.crossAxis:0);b<E?b=E:b>R&&(b=R)}return{[p]:h,[l]:b}}}},Bg=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=vt(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,C=b-f.left-f.right,D=Ft(g-f[v],w),E=Ft(b-f[y],C),R=!t.middlewareData.shift;let S=D,k=E;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(k=C),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(S=w),R&&!p){const j=Je(f.left,0),L=Je(f.right,0),V=Je(f.top,0),B=Je(f.bottom,0);h?k=b-2*(j!==0||L!==0?j+L:Je(f.left,f.right)):S=g-2*(V!==0||B!==0?V+B:Je(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 et(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function xt(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 et(e).Node:!1}function ut(e){return no()?e instanceof Element||e instanceof et(e).Element:!1}function wt(e){return no()?e instanceof HTMLElement||e instanceof et(e).HTMLElement:!1}function ri(e){return!no()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof et(e).ShadowRoot}const Yg=new Set(["inline","contents"]);function or(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=dt(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!Yg.has(o)}const zg=new Set(["table","td","th"]);function Hg(e){return zg.has(On(e))}const Ug=[":popover-open",":modal"];function ro(e){return Ug.some(t=>{try{return e.matches(t)}catch{return!1}})}const Gg=["transform","translate","scale","rotate","perspective"],qg=["transform","translate","scale","rotate","perspective","filter"],Vg=["paint","layout","strict","content"];function Ha(e){const t=Ua(),n=ut(e)?dt(e):e;return Gg.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)||qg.some(r=>(n.willChange||"").includes(r))||Vg.some(r=>(n.contain||"").includes(r))}function Kg(e){let t=Wt(e);for(;wt(t)&&!wn(t);){if(Ha(t))return t;if(ro(t))return null;t=Wt(t)}return null}function Ua(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const Xg=new Set(["html","body","#document"]);function wn(e){return Xg.has(On(e))}function dt(e){return et(e).getComputedStyle(e)}function oo(e){return ut(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Wt(e){if(On(e)==="html")return e;const t=e.assignedSlot||e.parentNode||ri(e)&&e.host||xt(e);return ri(t)?t.host:t}function Pc(e){const t=Wt(e);return wn(t)?e.ownerDocument?e.ownerDocument.body:e.body:wt(t)&&or(t)?t:Pc(t)}function Vn(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Pc(e),a=o===((r=e.ownerDocument)==null?void 0:r.body),i=et(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 Ac(e){const t=dt(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=wt(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 ut(e)?e:e.contextElement}function bn(e){const t=Ga(e);if(!wt(t))return yt(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:a}=Ac(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 Zg=yt(0);function Ic(e){const t=et(e);return!Ua()||!t.visualViewport?Zg:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Qg(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==et(e)?!1:t}function Jt(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),a=Ga(e);let i=yt(1);t&&(r?ut(r)&&(i=bn(r)):i=bn(e));const s=Qg(a,n,r)?Ic(a):yt(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=et(a),h=r&&ut(r)?et(r):r;let b=p,g=pa(b);for(;g&&r&&h!==b;){const v=bn(g),y=g.getBoundingClientRect(),w=dt(g),C=y.left+(g.clientLeft+parseFloat(w.paddingLeft))*v.x,D=y.top+(g.clientTop+parseFloat(w.paddingTop))*v.y;c*=v.x,u*=v.y,f*=v.x,l*=v.y,c+=C,u+=D,b=et(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:Jt(xt(e)).left+n}function jc(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 Jg(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const a=o==="fixed",i=xt(r),s=t?ro(t.floating):!1;if(r===i||s&&a)return n;let c={scrollLeft:0,scrollTop:0},u=yt(1);const f=yt(0),l=wt(r);if((l||!l&&!a)&&((On(r)!=="body"||or(i))&&(c=oo(r)),wt(r))){const h=Jt(r);u=bn(r),f.x=h.x+r.clientLeft,f.y=h.y+r.clientTop}const p=i&&!l&&!a?jc(i,c):yt(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 ev(e){return Array.from(e.getClientRects())}function tv(e){const t=xt(e),n=oo(e),r=e.ownerDocument.body,o=Je(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=Je(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+ao(e);const s=-n.scrollTop;return dt(r).direction==="rtl"&&(i+=Je(t.clientWidth,r.clientWidth)-o),{width:o,height:a,x:i,y:s}}const oi=25;function nv(e,t){const n=et(e),r=xt(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 rv=new Set(["absolute","fixed"]);function ov(e,t){const n=Jt(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,a=wt(e)?bn(e):yt(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=nv(e,n);else if(t==="document")r=tv(xt(e));else if(ut(t))r=ov(t,n);else{const o=Ic(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Yr(r)}function $c(e,t){const n=Wt(e);return n===t||!ut(n)||wn(n)?!1:dt(n).position==="fixed"||$c(n,t)}function av(e,t){const n=t.get(e);if(n)return n;let r=Vn(e,[],!1).filter(s=>ut(s)&&On(s)!=="body"),o=null;const a=dt(e).position==="fixed";let i=a?Wt(e):e;for(;ut(i)&&!wn(i);){const s=dt(i),c=Ha(i);!c&&s.position==="fixed"&&(o=null),(a?!c&&!o:!c&&s.position==="static"&&!!o&&rv.has(o.position)||or(i)&&!c&&$c(e,i))?r=r.filter(f=>f!==i):o=s,i=Wt(i)}return t.set(e,r),r}function sv(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[...n==="clippingAncestors"?ro(t)?[]:av(t,this._c):[].concat(n),r],s=i[0],c=i.reduce((u,f)=>{const l=ai(t,f,o);return u.top=Je(l.top,u.top),u.right=Ft(l.right,u.right),u.bottom=Ft(l.bottom,u.bottom),u.left=Je(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 iv(e){const{width:t,height:n}=Ac(e);return{width:t,height:n}}function cv(e,t,n){const r=wt(t),o=xt(t),a=n==="fixed",i=Jt(e,!0,a,t);let s={scrollLeft:0,scrollTop:0};const c=yt(0);function u(){c.x=ao(o)}if(r||!r&&!a)if((On(t)!=="body"||or(o))&&(s=oo(t)),r){const h=Jt(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?jc(o,s):yt(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 dt(e).position==="static"}function si(e,t){if(!wt(e)||dt(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return xt(e)===n&&(n=n.ownerDocument.body),n}function Lc(e,t){const n=et(e);if(ro(e))return n;if(!wt(e)){let o=Wt(e);for(;o&&!wn(o);){if(ut(o)&&!jo(o))return o;o=Wt(o)}return n}let r=si(e,t);for(;r&&Hg(r)&&jo(r);)r=si(r,t);return r&&wn(r)&&jo(r)&&!Ha(r)?n:r||Kg(e)||n}const lv=async function(e){const t=this.getOffsetParent||Lc,n=this.getDimensions,r=await n(e.floating);return{reference:cv(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function uv(e){return dt(e).direction==="rtl"}const dv={convertOffsetParentRelativeRectToViewportRelativeRect:Jg,getDocumentElement:xt,getClippingRect:sv,getOffsetParent:Lc,getElementRects:lv,getClientRects:ev,getDimensions:iv,getScale:bn,isElement:ut,isRTL:uv};function Fc(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function fv(e,t){let n=null,r;const o=xt(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)),y=Sr(f),C={rootMargin:-b+"px "+-g+"px "+-v+"px "+-y+"px",threshold:Je(0,Ft(1,c))||1};let D=!0;function E(R){const S=R[0].intersectionRatio;if(S!==c){if(!D)return i();S?i(!1,S):r=setTimeout(()=>{i(!1,1e-7)},1e3)}S===1&&!Fc(u,e.getBoundingClientRect())&&i(),D=!1}try{n=new IntersectionObserver(E,{...C,root:o.ownerDocument})}catch{n=new IntersectionObserver(E,C)}n.observe(e)}return i(!0),a}function mv(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?fv(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 C;(C=h)==null||C.observe(t)})),n()}),u&&!c&&h.observe(u),h.observe(t));let b,g=c?Jt(e):null;c&&v();function v(){const y=Jt(e);g&&!Fc(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 pv=Lg,hv=Fg,gv=Ig,vv=Bg,bv=jg,ii=Ag,yv=Wg,wv=(e,t,n)=>{const r=new Map,o={platform:dv,...n},a={...o.platform,_c:r};return Pg(e,t,{...o,platform:a})};var xv=typeof document<"u",Sv=function(){},Pr=xv?x.useLayoutEffect:Sv;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 Wc(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function ci(e,t){const n=Wc(e);return Math.round(t*n)/n}function $o(e){const t=d.useRef(e);return Pr(()=>{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,y]=d.useState(null),w=d.useCallback(N=>{N!==R.current&&(R.current=N,g(N))},[]),C=d.useCallback(N=>{N!==S.current&&(S.current=N,y(N))},[]),D=a||b,E=i||v,R=d.useRef(null),S=d.useRef(null),k=d.useRef(f),I=c!=null,j=$o(c),L=$o(o),V=$o(u),B=d.useCallback(()=>{if(!R.current||!S.current)return;const N={placement:t,strategy:n,middleware:p};L.current&&(N.platform=L.current),wv(R.current,S.current,N).then(_=>{const Y={..._,isPositioned:V.current!==!1};P.current&&!zr(k.current,Y)&&(k.current=Y,eo.flushSync(()=>{l(Y)}))})},[p,t,n,L,V]);Pr(()=>{u===!1&&k.current.isPositioned&&(k.current.isPositioned=!1,l(N=>({...N,isPositioned:!1})))},[u]);const P=d.useRef(!1);Pr(()=>(P.current=!0,()=>{P.current=!1}),[]),Pr(()=>{if(D&&(R.current=D),E&&(S.current=E),D&&E){if(j.current)return j.current(D,E,B);B()}},[D,E,B,j,I]);const O=d.useMemo(()=>({reference:R,floating:S,setReference:w,setFloating:C}),[w,C]),M=d.useMemo(()=>({reference:D,floating:E}),[D,E]),A=d.useMemo(()=>{const N={position:n,left:0,top:0};if(!M.floating)return N;const _=ci(M.floating,f.x),Y=ci(M.floating,f.y);return s?{...N,transform:"translate("+_+"px, "+Y+"px)",...Wc(M.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:_,top:Y}},[n,s,M.floating,f.x,f.y]);return d.useMemo(()=>({...f,update:B,refs:O,elements:M,floatingStyles:A}),[f,B,O,M,A])}const Ev=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):{}}}},Dv=(e,t)=>({...pv(e),options:[e,t]}),Mv=(e,t)=>({...hv(e),options:[e,t]}),Nv=(e,t)=>({...yv(e),options:[e,t]}),kv=(e,t)=>({...gv(e),options:[e,t]}),Rv=(e,t)=>({...vv(e),options:[e,t]}),Ov=(e,t)=>({...bv(e),options:[e,t]}),Tv=(e,t)=>({...Ev(e),options:[e,t]});var _v="Arrow",Bc=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"})})});Bc.displayName=_v;var Pv=Bc;function qa(e){const[t,n]=d.useState(void 0);return Ne(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const a=o[0];let 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",[Yc,Yt]=He(Va),[Av,zc]=Yc(Va),Hc=e=>{const{__scopePopper:t,children:n}=e,[r,o]=d.useState(null);return m.jsx(Av,{scope:t,anchor:r,onAnchorChange:o,children:n})};Hc.displayName=Va;var Uc="PopperAnchor",Gc=d.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,a=zc(Uc,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})});Gc.displayName=Uc;var Ka="PopperContent",[Iv,jv]=Yc(Ka),qc=d.forwardRef((e,t)=>{var W,Q,K,Z,se,ie;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=zc(Ka,n),[y,w]=d.useState(null),C=fe(t,be=>w(be)),[D,E]=d.useState(null),R=qa(D),S=(R==null?void 0:R.width)??0,k=(R==null?void 0:R.height)??0,I=r+(a!=="center"?"-"+a:""),j=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:j,boundary:L.filter(Lv),altBoundary:V},{refs:P,floatingStyles:O,placement:M,isPositioned:A,middlewareData:N}=Cv({strategy:"fixed",placement:I,whileElementsMounted:(...be)=>mv(...be,{animationFrame:h==="always"}),elements:{reference:v.anchor},middleware:[Dv({mainAxis:o+k,alignmentAxis:i}),c&&Mv({mainAxis:!0,crossAxis:!1,limiter:l==="partial"?Nv():void 0,...B}),c&&kv({...B}),Rv({...B,apply:({elements:be,rects:ee,availableWidth:Ae,availableHeight:Ie})=>{const{width:Ee,height:Ge}=ee.reference,Ce=be.floating.style;Ce.setProperty("--radix-popper-available-width",`${Ae}px`),Ce.setProperty("--radix-popper-available-height",`${Ie}px`),Ce.setProperty("--radix-popper-anchor-width",`${Ee}px`),Ce.setProperty("--radix-popper-anchor-height",`${Ge}px`)}}),D&&Tv({element:D,padding:s}),Fv({arrowWidth:S,arrowHeight:k}),p&&Ov({strategy:"referenceHidden",...B})]}),[_,Y]=Xc(M),H=Pe(b);Ne(()=>{A&&(H==null||H())},[A,H]);const T=(W=N.arrow)==null?void 0:W.x,$=(Q=N.arrow)==null?void 0:Q.y,z=((K=N.arrow)==null?void 0:K.centerOffset)!==0,[U,G]=d.useState();return Ne(()=>{y&&G(window.getComputedStyle(y).zIndex)},[y]),m.jsx("div",{ref:P.setFloating,"data-radix-popper-content-wrapper":"",style:{...O,transform:A?O.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:U,"--radix-popper-transform-origin":[(Z=N.transformOrigin)==null?void 0:Z.x,(se=N.transformOrigin)==null?void 0:se.y].join(" "),...((ie=N.hide)==null?void 0:ie.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:m.jsx(Iv,{scope:n,placedSide:_,onArrowChange:E,arrowX:T,arrowY:$,shouldHideArrow:z,children:m.jsx(J.div,{"data-side":_,"data-align":Y,...g,ref:C,style:{...g.style,animation:A?void 0:"none"}})})})});qc.displayName=Ka;var Vc="PopperArrow",$v={top:"bottom",right:"left",bottom:"top",left:"right"},Kc=d.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,a=jv(Vc,r),i=$v[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(Pv,{...o,ref:n,style:{...o.style,display:"block"}})})});Kc.displayName=Vc;function Lv(e){return e!==null}var Fv=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]=Xc(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 Xc(e){const[t,n="center"]=e.split("-");return[t,n]}var ar=Hc,sr=Gc,so=qc,io=Kc,Wv="Portal",ir=d.forwardRef((e,t)=>{var s;const{container:n,...r}=e,[o,a]=d.useState(!1);Ne(()=>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=Wv;function Bv(e,t){return d.useReducer((n,r)=>t[n][r]??n,e)}var ot=e=>{const{present:t,children:n}=e,r=Yv(t),o=typeof n=="function"?n({present:r.isPresent}):d.Children.only(n),a=fe(r.ref,zv(o));return typeof n=="function"||r.isPresent?d.cloneElement(o,{ref:a}):null};ot.displayName="Presence";function Yv(e){const[t,n]=d.useState(),r=d.useRef(null),o=d.useRef(e),a=d.useRef("none"),i=e?"mounted":"unmounted",[s,c]=Bv(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]),Ne(()=>{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]),Ne(()=>{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 zv(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 Hv=d[" useInsertionEffect ".trim().toString()]||Ne;function rt({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,a,i]=Uv({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=Gv(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 Uv({defaultProp:e,onChange:t}){const[n,r]=d.useState(e),o=d.useRef(n),a=d.useRef(t);return Hv(()=>{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 Gv(e){return typeof e=="function"}var qv=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},fn=new WeakMap,Er=new WeakMap,Dr={},Lo=0,Zc=function(e){return e&&(e.host||Zc(e.parentNode))},Vv=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=Zc(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})},Kv=function(e,t,n,r){var o=Vv(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=(fn.get(p)||0)+1,v=(a.get(p)||0)+1;fn.set(p,g),a.set(p,v),i.push(p),g===1&&b&&Er.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=fn.get(l)-1,h=a.get(l)-1;fn.set(l,p),a.set(l,h),p||(Er.has(l)||l.removeAttribute(r),Er.delete(l)),h||l.removeAttribute(n)}),Lo--,Lo||(fn=new WeakMap,fn=new WeakMap,Er=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=qv(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),Kv(r,o,n,"aria-hidden")):function(){return null}},gt=function(){return gt=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},gt.apply(this,arguments)};function Qc(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 Xv(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",Zv="with-scroll-bars-hidden",Qv="--removed-body-scroll-bar-size";function Fo(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Jv(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 eb=typeof window<"u"?d.useLayoutEffect:d.useEffect,li=new WeakMap;function tb(e,t){var n=Jv(null,function(r){return e.forEach(function(o){return Fo(o,r)})});return eb(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 nb(e){return e}function rb(e,t){t===void 0&&(t=nb);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 ob(e){e===void 0&&(e={});var t=rb(null);return t.options=gt({async:!0,ssr:!1},e),t}var Jc=function(e){var t=e.sideCar,n=Qc(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,gt({},n))};Jc.isSideCarExport=!0;function ab(e,t){return e.useMedium(t),Jc}var el=ob(),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,C=e.gapMode,D=Qc(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),E=p,R=tb([n,t]),S=gt(gt({},D),o);return d.createElement(d.Fragment,null,f&&d.createElement(E,{sideCar:el,removeScrollBar:u,shards:l,noRelative:h,noIsolation:b,inert:g,setCallbacks:a,allowPinchZoom:!!v,lockRef:n,gapMode:C}),i?d.cloneElement(d.Children.only(s),gt(gt({},S),{ref:R})):d.createElement(w,gt({},S,{className:c,ref:R}),s))});lo.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};lo.classNames={fullWidth:Ir,zeroRight:Ar};var sb=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function ib(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=sb();return t&&e.setAttribute("nonce",t),e}function cb(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function lb(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var ub=function(){var e=0,t=null;return{add:function(n){e==0&&(t=ib())&&(cb(t,n),lb(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},db=function(){var e=ub();return function(t,n){d.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},tl=function(){var e=db(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},fb={left:0,top:0,right:0,gap:0},Bo=function(e){return parseInt(e||"",10)||0},mb=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)]},pb=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return fb;var t=mb(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])}},hb=tl(),yn="data-scroll-locked",gb=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(Zv,` {
133
133
  overflow: hidden `).concat(r,`;
134
134
  padding-right: `).concat(s,"px ").concat(r,`;
135
135
  }
@@ -163,41 +163,41 @@
163
163
  }
164
164
 
165
165
  body[`).concat(yn,`] {
166
- `).concat(Xv,": ").concat(s,`px;
166
+ `).concat(Qv,": ").concat(s,`px;
167
167
  }
168
- `)},ui=function(){var e=parseInt(document.body.getAttribute(yn)||"0",10);return isFinite(e)?e:0},hb=function(){d.useEffect(function(){return document.body.setAttribute(yn,(ui()+1).toString()),function(){var e=ui()-1;e<=0?document.body.removeAttribute(yn):document.body.setAttribute(yn,e.toString())}},[])},gb=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;hb();var a=d.useMemo(function(){return fb(o)},[o]);return d.createElement(mb,{styles:pb(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 mn=ha?{passive:!1}:!1,vb=function(e){return e.tagName==="TEXTAREA"},nl=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!vb(e)&&n[t]==="visible")},bb=function(e){return nl(e,"overflowY")},yb=function(e){return nl(e,"overflowX")},di=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=rl(e,r);if(o){var a=ol(e,r),i=a[1],s=a[2];if(i>s)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},wb=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},xb=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},rl=function(e,t){return e==="v"?bb(t):yb(t)},ol=function(e,t){return e==="v"?wb(t):xb(t)},Sb=function(e,t){return e==="h"&&t==="rtl"?-1:1},Cb=function(e,t,n,r,o){var a=Sb(e,window.getComputedStyle(t).direction),i=a*r,s=n.target,l=t.contains(s),u=!1,f=i>0,c=0,p=0;do{if(!s)break;var h=ol(e,s),b=h[0],g=h[1],v=h[2],y=g-v-a*b;(b||y)&&rl(e,s)&&(c+=y,p+=b);var w=s.parentNode;s=w&&w.nodeType===Node.DOCUMENT_FRAGMENT_NODE?w.host:w}while(!l&&s!==document.body||l&&(t.contains(s)||t===s));return(f&&Math.abs(c)<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},Eb=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Db=function(e){return`
168
+ `)},ui=function(){var e=parseInt(document.body.getAttribute(yn)||"0",10);return isFinite(e)?e:0},vb=function(){d.useEffect(function(){return document.body.setAttribute(yn,(ui()+1).toString()),function(){var e=ui()-1;e<=0?document.body.removeAttribute(yn):document.body.setAttribute(yn,e.toString())}},[])},bb=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;vb();var a=d.useMemo(function(){return pb(o)},[o]);return d.createElement(hb,{styles:gb(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 mn=ha?{passive:!1}:!1,yb=function(e){return e.tagName==="TEXTAREA"},nl=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!yb(e)&&n[t]==="visible")},wb=function(e){return nl(e,"overflowY")},xb=function(e){return nl(e,"overflowX")},di=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=rl(e,r);if(o){var a=ol(e,r),i=a[1],s=a[2];if(i>s)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},Sb=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]},rl=function(e,t){return e==="v"?wb(t):xb(t)},ol=function(e,t){return e==="v"?Sb(t):Cb(t)},Eb=function(e,t){return e==="h"&&t==="rtl"?-1:1},Db=function(e,t,n,r,o){var a=Eb(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=ol(e,s),b=h[0],g=h[1],v=h[2],y=g-v-a*b;(b||y)&&rl(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},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},Mb=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Nb=function(e){return`
169
169
  .block-interactivity-`.concat(e,` {pointer-events: none;}
170
170
  .allow-interactivity-`).concat(e,` {pointer-events: all;}
171
- `)},Mb=0,pn=[];function Nb(e){var t=d.useRef([]),n=d.useRef([0,0]),r=d.useRef(),o=d.useState(Mb++)[0],a=d.useState(tl)[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=Vv([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=Nr(g),w=n.current,C="deltaX"in g?g.deltaX:w[0]-y[0],D="deltaY"in g?g.deltaY:w[1]-y[1],E,R=g.target,S=Math.abs(C)>Math.abs(D)?"h":"v";if("touches"in g&&S==="h"&&R.type==="range")return!1;var k=di(S,R);if(!k)return!0;if(k?E=S:(E=S==="v"?"h":"v",k=di(S,R)),!k)return!1;if(!r.current&&"changedTouches"in g&&(C||D)&&(r.current=E),!E)return!0;var I=r.current||E;return Cb(I,v,g,I==="h"?C:D)},[]),l=d.useCallback(function(g){var v=g;if(!(!pn.length||pn[pn.length-1]!==a)){var y="deltaY"in v?fi(v):Nr(v),w=t.current.filter(function(E){return E.name===v.type&&(E.target===v.target||v.target===E.shadowParent)&&Eb(E.delta,y)})[0];if(w&&w.should){v.cancelable&&v.preventDefault();return}if(!w){var C=(i.current.shards||[]).map(mi).filter(Boolean).filter(function(E){return E.contains(v.target)}),D=C.length>0?s(v,C[0]):!i.current.noIsolation;D&&v.cancelable&&v.preventDefault()}}},[]),u=d.useCallback(function(g,v,y,w){var C={name:g,delta:v,target:y,should:w,shadowParent:kb(y)};t.current.push(C),setTimeout(function(){t.current=t.current.filter(function(D){return D!==C})},1)},[]),f=d.useCallback(function(g){n.current=Nr(g),r.current=void 0},[]),c=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 pn.push(a),e.setCallbacks({onScrollCapture:c,onWheelCapture:c,onTouchMoveCapture:p}),document.addEventListener("wheel",l,mn),document.addEventListener("touchmove",l,mn),document.addEventListener("touchstart",f,mn),function(){pn=pn.filter(function(g){return g!==a}),document.removeEventListener("wheel",l,mn),document.removeEventListener("touchmove",l,mn),document.removeEventListener("touchstart",f,mn)}},[]);var h=e.removeScrollBar,b=e.inert;return d.createElement(d.Fragment,null,b?d.createElement(a,{styles:Db(o)}):null,h?d.createElement(gb,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function kb(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Rb=rb(el,Nb);var cr=d.forwardRef(function(e,t){return d.createElement(lo,gt({},e,{ref:t,sideCar:Rb}))});cr.classNames=lo.classNames;var uo="Popover",[al,wM]=He(uo,[Yt]),lr=Yt(),[Ob,zt]=al(uo),sl=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:o,onOpenChange:a,modal:i=!1}=e,s=lr(t),l=d.useRef(null),[u,f]=d.useState(!1),[c,p]=rt({prop:r,defaultProp:o??!1,onChange:a,caller:uo});return m.jsx(ar,{...s,children:m.jsx(Ob,{scope:t,contentId:Re(),triggerRef:l,open:c,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})})};sl.displayName=uo;var il="PopoverAnchor",Tb=d.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=zt(il,n),a=lr(n),{onCustomAnchorAdd:i,onCustomAnchorRemove:s}=o;return d.useEffect(()=>(i(),()=>s()),[i,s]),m.jsx(sr,{...a,...r,ref:t})});Tb.displayName=il;var cl="PopoverTrigger",ll=d.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=zt(cl,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":pl(o.open),...r,ref:i,onClick:X(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?s:m.jsx(sr,{asChild:!0,...a,children:s})});ll.displayName=cl;var Xa="PopoverPortal",[_b,Pb]=al(Xa,{forceMount:void 0}),ul=e=>{const{__scopePopover:t,forceMount:n,children:r,container:o}=e,a=zt(Xa,t);return m.jsx(_b,{scope:t,forceMount:n,children:m.jsx(ot,{present:n||a.open,children:m.jsx(ir,{asChild:!0,container:o,children:r})})})};ul.displayName=Xa;var xn="PopoverContent",dl=d.forwardRef((e,t)=>{const n=Pb(xn,e.__scopePopover),{forceMount:r=n.forceMount,...o}=e,a=zt(xn,e.__scopePopover);return m.jsx(ot,{present:r||a.open,children:a.modal?m.jsx(Ib,{...o,ref:t}):m.jsx(jb,{...o,ref:t})})});dl.displayName=xn;var Ab=Lt("PopoverContent.RemoveScroll"),Ib=d.forwardRef((e,t)=>{const n=zt(xn,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:Ab,allowPinchZoom:!0,children:m.jsx(fl,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:X(e.onCloseAutoFocus,i=>{var s;i.preventDefault(),a.current||(s=n.triggerRef.current)==null||s.focus()}),onPointerDownOutside:X(e.onPointerDownOutside,i=>{const s=i.detail.originalEvent,l=s.button===0&&s.ctrlKey===!0,u=s.button===2||l;a.current=u},{checkForDefaultPrevented:!1}),onFocusOutside:X(e.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1})})})}),jb=d.forwardRef((e,t)=>{const n=zt(xn,e.__scopePopover),r=d.useRef(!1),o=d.useRef(!1);return m.jsx(fl,{...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 l,u;(l=e.onInteractOutside)==null||l.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()}})}),fl=d.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:a,disableOutsidePointerEvents:i,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:u,onInteractOutside:f,...c}=e,p=zt(xn,n),h=lr(n);return Wa(),m.jsx(rr,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:a,children:m.jsx(Nc,{asChild:!0,disableOutsidePointerEvents:i,onInteractOutside:f,onEscapeKeyDown:s,onPointerDownOutside:l,onFocusOutside:u,onDismiss:()=>p.onOpenChange(!1),children:m.jsx(so,{"data-state":pl(p.open),role:"dialog",id:p.contentId,...h,...c,ref:t,style:{...c.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}})})})}),ml="PopoverClose",$b=d.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=zt(ml,n);return m.jsx(J.button,{type:"button",...r,ref:t,onClick:X(e.onClick,()=>o.onOpenChange(!1))})});$b.displayName=ml;var Lb="PopoverArrow",Fb=d.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=lr(n);return m.jsx(io,{...o,...r,ref:t})});Fb.displayName=Lb;function pl(e){return e?"open":"closed"}var Wb=sl,Bb=ll,Yb=ul,hl=dl;const Za=Wb,Qa=Bb,fo=d.forwardRef(({className:e,sideOffset:t=4,...n},r)=>m.jsx(Yb,{children:m.jsx(hl,{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=hl.displayName;function pi(e,[t,n]){return Math.min(n,Math.max(t,e))}function Ja(e){const t=e+"CollectionProvider",[n,r]=He(t),[o,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),i=g=>{const{scope:v,children:y}=g,w=x.useRef(null),C=x.useRef(new Map).current;return m.jsx(o,{scope:v,itemMap:C,collectionRef:w,children:y})};i.displayName=t;const s=e+"CollectionSlot",l=Lt(s),u=x.forwardRef((g,v)=>{const{scope:y,children:w}=g,C=a(s,y),D=fe(v,C.collectionRef);return m.jsx(l,{ref:D,children:w})});u.displayName=s;const f=e+"CollectionItemSlot",c="data-radix-collection-item",p=Lt(f),h=x.forwardRef((g,v)=>{const{scope:y,children:w,...C}=g,D=x.useRef(null),E=fe(v,D),R=a(f,y);return x.useEffect(()=>(R.itemMap.set(D,{ref:D,...C}),()=>void R.itemMap.delete(D))),m.jsx(p,{[c]:"",ref:E,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 C=Array.from(w.querySelectorAll(`[${c}]`));return Array.from(v.itemMap.values()).sort((R,S)=>C.indexOf(R.ref.current)-C.indexOf(S.ref.current))},[v.collectionRef,v.itemMap])}return[{Provider:i,Slot:u,ItemSlot:h},b,r]}var zb=d.createContext(void 0);function ur(e){const t=d.useContext(zb);return e||t||"ltr"}var Hb="DismissableLayer",ga="dismissableLayer.update",Ub="dismissableLayer.pointerDownOutside",Gb="dismissableLayer.focusOutside",hi,gl=d.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),vl=d.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:i,onDismiss:s,...l}=e,u=d.useContext(gl),[f,c]=d.useState(null),p=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,h]=d.useState({}),b=fe(t,S=>c(S)),g=Array.from(u.layers),[v]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),y=g.indexOf(v),w=f?g.indexOf(f):-1,C=u.layersWithOutsidePointerEventsDisabled.size>0,D=w>=y,E=Kb(S=>{const k=S.target,I=[...u.branches].some(j=>j.contains(k));!D||I||(o==null||o(S),i==null||i(S),S.defaultPrevented||s==null||s())},p),R=Xb(S=>{const k=S.target;[...u.branches].some(j=>j.contains(k))||(a==null||a(S),i==null||i(S),S.defaultPrevented||s==null||s())},p);return nr(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,{...l,ref:b,style:{pointerEvents:C?D?"auto":"none":void 0,...e.style},onFocusCapture:X(e.onFocusCapture,R.onFocusCapture),onBlurCapture:X(e.onBlurCapture,R.onBlurCapture),onPointerDownCapture:X(e.onPointerDownCapture,E.onPointerDownCapture)})});vl.displayName=Hb;var qb="DismissableLayerBranch",Vb=d.forwardRef((e,t)=>{const n=d.useContext(gl),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})});Vb.displayName=qb;function Kb(e,t=globalThis==null?void 0:globalThis.document){const n=Pe(e),r=d.useRef(!1),o=d.useRef(()=>{});return d.useEffect(()=>{const a=s=>{if(s.target&&!r.current){let l=function(){bl(Ub,n,u,{discrete:!0})};const u={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=l,t.addEventListener("click",o.current,{once:!0})):l()}else t.removeEventListener("click",o.current);r.current=!1},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 Xb(e,t=globalThis==null?void 0:globalThis.document){const n=Pe(e),r=d.useRef(!1);return d.useEffect(()=>{const o=a=>{a.target&&!r.current&&bl(Gb,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 bl(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?Nn(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 yl=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"}),Zb="VisuallyHidden",wl=d.forwardRef((e,t)=>m.jsx(J.span,{...e,ref:t,style:{...yl,...e.style}}));wl.displayName=Zb;var Qb=wl,Jb=[" ","Enter","ArrowUp","ArrowDown"],ey=[" ","Enter"],en="Select",[mo,po,ty]=Ja(en),[Tn,xM]=He(en,[ty,Yt]),ho=Yt(),[ny,Ht]=Tn(en),[ry,oy]=Tn(en),xl=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:a,value:i,defaultValue:s,onValueChange:l,dir:u,name:f,autoComplete:c,disabled:p,required:h,form:b}=e,g=ho(t),[v,y]=d.useState(null),[w,C]=d.useState(null),[D,E]=d.useState(!1),R=ur(u),[S,k]=rt({prop:r,defaultProp:o??!1,onChange:a,caller:en}),[I,j]=rt({prop:i,defaultProp:s,onChange:l,caller:en}),L=d.useRef(null),V=v?b||!!v.closest("form"):!0,[B,P]=d.useState(new Set),O=Array.from(B).map(M=>M.props.value).join(";");return m.jsx(ar,{...g,children:m.jsxs(ny,{required:h,scope:t,trigger:v,onTriggerChange:y,valueNode:w,onValueNodeChange:C,valueNodeHasChildren:D,onValueNodeHasChildrenChange:E,contentId:Re(),value:I,onValueChange:j,open:S,onOpenChange:k,dir:R,triggerPointerDownPosRef:L,disabled:p,children:[m.jsx(mo.Provider,{scope:t,children:m.jsx(ry,{scope:e.__scopeSelect,onNativeOptionAdd:d.useCallback(M=>{P(A=>new Set(A).add(M))},[]),onNativeOptionRemove:d.useCallback(M=>{P(A=>{const N=new Set(A);return N.delete(M),N})},[]),children:n})}),V?m.jsxs(Ul,{"aria-hidden":!0,required:h,tabIndex:-1,name:f,autoComplete:c,value:I,onChange:M=>j(M.target.value),disabled:p,form:b,children:[I===void 0?m.jsx("option",{value:""}):null,Array.from(B)]},O):null]})})};xl.displayName=en;var Sl="SelectTrigger",Cl=d.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,a=ho(n),i=Ht(Sl,n),s=i.disabled||r,l=fe(t,i.onTriggerChange),u=po(n),f=d.useRef("touch"),[c,p,h]=ql(g=>{const v=u().filter(C=>!C.disabled),y=v.find(C=>C.value===i.value),w=Vl(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(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":Gl(i.value)?"":void 0,...o,ref:l,onClick:X(o.onClick,g=>{g.currentTarget.focus(),f.current!=="mouse"&&b(g)}),onPointerDown:X(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:X(o.onKeyDown,g=>{const v=c.current!=="";!(g.ctrlKey||g.altKey||g.metaKey)&&g.key.length===1&&p(g.key),!(v&&g.key===" ")&&Jb.includes(g.key)&&(b(),g.preventDefault())})})})});Cl.displayName=Sl;var El="SelectValue",Dl=d.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:a,placeholder:i="",...s}=e,l=Ht(El,n),{onValueNodeHasChildrenChange:u}=l,f=a!==void 0,c=fe(t,l.onValueNodeChange);return Ne(()=>{u(f)},[u,f]),m.jsx(J.span,{...s,ref:c,style:{pointerEvents:"none"},children:Gl(l.value)?m.jsx(m.Fragment,{children:i}):a})});Dl.displayName=El;var ay="SelectIcon",Ml=d.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return m.jsx(J.span,{"aria-hidden":!0,...o,ref:t,children:r||"▼"})});Ml.displayName=ay;var sy="SelectPortal",Nl=e=>m.jsx(ir,{asChild:!0,...e});Nl.displayName=sy;var tn="SelectContent",kl=d.forwardRef((e,t)=>{const n=Ht(tn,e.__scopeSelect),[r,o]=d.useState();if(Ne(()=>{o(new DocumentFragment)},[]),!n.open){const a=r;return a?eo.createPortal(m.jsx(Rl,{scope:e.__scopeSelect,children:m.jsx(mo.Slot,{scope:e.__scopeSelect,children:m.jsx("div",{children:e.children})})}),a):null}return m.jsx(Ol,{...e,ref:t})});kl.displayName=tn;var ct=10,[Rl,Ut]=Tn(tn),iy="SelectContentImpl",cy=Lt("SelectContent.RemoveScroll"),Ol=d.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:a,onPointerDownOutside:i,side:s,sideOffset:l,align:u,alignOffset:f,arrowPadding:c,collisionBoundary:p,collisionPadding:h,sticky:b,hideWhenDetached:g,avoidCollisions:v,...y}=e,w=Ht(tn,n),[C,D]=d.useState(null),[E,R]=d.useState(null),S=fe(t,W=>D(W)),[k,I]=d.useState(null),[j,L]=d.useState(null),V=po(n),[B,P]=d.useState(!1),O=d.useRef(!1);d.useEffect(()=>{if(C)return co(C)},[C]),Wa();const M=d.useCallback(W=>{const[Q,...K]=V().map(ie=>ie.ref.current),[Z]=K.slice(-1),se=document.activeElement;for(const ie of W)if(ie===se||(ie==null||ie.scrollIntoView({block:"nearest"}),ie===Q&&E&&(E.scrollTop=0),ie===Z&&E&&(E.scrollTop=E.scrollHeight),ie==null||ie.focus(),document.activeElement!==se))return},[V,E]),A=d.useCallback(()=>M([k,C]),[M,k,C]);d.useEffect(()=>{B&&A()},[B,A]);const{onOpenChange:N,triggerPointerDownPosRef:_}=w;d.useEffect(()=>{if(C){let W={x:0,y:0};const Q=Z=>{var se,ie;W={x:Math.abs(Math.round(Z.pageX)-(((se=_.current)==null?void 0:se.x)??0)),y:Math.abs(Math.round(Z.pageY)-(((ie=_.current)==null?void 0:ie.y)??0))}},K=Z=>{W.x<=10&&W.y<=10?Z.preventDefault():C.contains(Z.target)||N(!1),document.removeEventListener("pointermove",Q),_.current=null};return _.current!==null&&(document.addEventListener("pointermove",Q),document.addEventListener("pointerup",K,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",Q),document.removeEventListener("pointerup",K,{capture:!0})}}},[C,N,_]),d.useEffect(()=>{const W=()=>N(!1);return window.addEventListener("blur",W),window.addEventListener("resize",W),()=>{window.removeEventListener("blur",W),window.removeEventListener("resize",W)}},[N]);const[Y,H]=ql(W=>{const Q=V().filter(se=>!se.disabled),K=Q.find(se=>se.ref.current===document.activeElement),Z=Vl(Q,W,K);Z&&setTimeout(()=>Z.ref.current.focus())}),T=d.useCallback((W,Q,K)=>{const Z=!O.current&&!K;(w.value!==void 0&&w.value===Q||Z)&&(I(W),Z&&(O.current=!0))},[w.value]),$=d.useCallback(()=>C==null?void 0:C.focus(),[C]),z=d.useCallback((W,Q,K)=>{const Z=!O.current&&!K;(w.value!==void 0&&w.value===Q||Z)&&L(W)},[w.value]),U=r==="popper"?va:Tl,G=U===va?{side:s,sideOffset:l,align:u,alignOffset:f,arrowPadding:c,collisionBoundary:p,collisionPadding:h,sticky:b,hideWhenDetached:g,avoidCollisions:v}:{};return m.jsx(Rl,{scope:n,content:C,viewport:E,onViewportChange:R,itemRefCallback:T,selectedItem:k,onItemLeave:$,itemTextRefCallback:z,focusSelectedItem:A,selectedItemText:j,position:r,isPositioned:B,searchRef:Y,children:m.jsx(cr,{as:cy,allowPinchZoom:!0,children:m.jsx(rr,{asChild:!0,trapped:w.open,onMountAutoFocus:W=>{W.preventDefault()},onUnmountAutoFocus:X(o,W=>{var Q;(Q=w.trigger)==null||Q.focus({preventScroll:!0}),W.preventDefault()}),children:m.jsx(vl,{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:()=>P(!0),ref:S,style:{display:"flex",flexDirection:"column",outline:"none",...y.style},onKeyDown:X(y.onKeyDown,W=>{const Q=W.ctrlKey||W.altKey||W.metaKey;if(W.key==="Tab"&&W.preventDefault(),!Q&&W.key.length===1&&H(W.key),["ArrowUp","ArrowDown","Home","End"].includes(W.key)){let Z=V().filter(se=>!se.disabled).map(se=>se.ref.current);if(["ArrowUp","End"].includes(W.key)&&(Z=Z.slice().reverse()),["ArrowUp","ArrowDown"].includes(W.key)){const se=W.target,ie=Z.indexOf(se);Z=Z.slice(ie+1)}setTimeout(()=>M(Z)),W.preventDefault()}})})})})})})});Ol.displayName=iy;var ly="SelectItemAlignedPosition",Tl=d.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,a=Ht(tn,n),i=Ut(tn,n),[s,l]=d.useState(null),[u,f]=d.useState(null),c=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,C=d.useCallback(()=>{if(a.trigger&&a.valueNode&&s&&u&&g&&v&&y){const S=a.trigger.getBoundingClientRect(),k=u.getBoundingClientRect(),I=a.valueNode.getBoundingClientRect(),j=y.getBoundingClientRect();if(a.dir!=="rtl"){const se=j.left-k.left,ie=I.left-se,be=S.left-ie,ee=S.width+be,Ae=Math.max(ee,k.width),Ie=window.innerWidth-ct,Ee=pi(ie,[ct,Math.max(ct,Ie-Ae)]);s.style.minWidth=ee+"px",s.style.left=Ee+"px"}else{const se=k.right-j.right,ie=window.innerWidth-I.right-se,be=window.innerWidth-S.right-ie,ee=S.width+be,Ae=Math.max(ee,k.width),Ie=window.innerWidth-ct,Ee=pi(ie,[ct,Math.max(ct,Ie-Ae)]);s.style.minWidth=ee+"px",s.style.right=Ee+"px"}const L=p(),V=window.innerHeight-ct*2,B=g.scrollHeight,P=window.getComputedStyle(u),O=parseInt(P.borderTopWidth,10),M=parseInt(P.paddingTop,10),A=parseInt(P.borderBottomWidth,10),N=parseInt(P.paddingBottom,10),_=O+M+B+N+A,Y=Math.min(v.offsetHeight*5,_),H=window.getComputedStyle(g),T=parseInt(H.paddingTop,10),$=parseInt(H.paddingBottom,10),z=S.top+S.height/2-ct,U=V-z,G=v.offsetHeight/2,W=v.offsetTop+G,Q=O+M+W,K=_-Q;if(Q<=z){const se=L.length>0&&v===L[L.length-1].ref.current;s.style.bottom="0px";const ie=u.clientHeight-g.offsetTop-g.offsetHeight,be=Math.max(U,G+(se?$:0)+ie+A),ee=Q+be;s.style.height=ee+"px"}else{const se=L.length>0&&v===L[0].ref.current;s.style.top="0px";const be=Math.max(z,O+g.offsetTop+(se?T:0)+G)+K;s.style.height=be+"px",g.scrollTop=Q-z+g.offsetTop}s.style.margin=`${ct}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]);Ne(()=>C(),[C]);const[D,E]=d.useState();Ne(()=>{u&&E(window.getComputedStyle(u).zIndex)},[u]);const R=d.useCallback(S=>{S&&b.current===!0&&(C(),w==null||w(),b.current=!1)},[C,w]);return m.jsx(dy,{scope:n,contentWrapper:s,shouldExpandOnScrollRef:h,onScrollButtonChange:R,children:m.jsx("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:D},children:m.jsx(J.div,{...o,ref:c,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});Tl.displayName=ly;var uy="SelectPopperPosition",va=d.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=ct,...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=uy;var[dy,ts]=Tn(tn,{}),ba="SelectViewport",_l=d.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...o}=e,a=Ut(ba,n),i=ts(ba,n),s=fe(t,a.onViewportChange),l=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:X(o.onScroll,u=>{const f=u.currentTarget,{contentWrapper:c,shouldExpandOnScrollRef:p}=i;if(p!=null&&p.current&&c){const h=Math.abs(l.current-f.scrollTop);if(h>0){const b=window.innerHeight-ct*2,g=parseFloat(c.style.minHeight),v=parseFloat(c.style.height),y=Math.max(g,v);if(y<b){const w=y+h,C=Math.min(b,w),D=w-C;c.style.height=C+"px",c.style.bottom==="0px"&&(f.scrollTop=D>0?D:0,c.style.justifyContent="flex-end")}}}l.current=f.scrollTop})})})]})});_l.displayName=ba;var Pl="SelectGroup",[fy,my]=Tn(Pl),py=d.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Re();return m.jsx(fy,{scope:n,id:o,children:m.jsx(J.div,{role:"group","aria-labelledby":o,...r,ref:t})})});py.displayName=Pl;var Al="SelectLabel",Il=d.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=my(Al,n);return m.jsx(J.div,{id:o.id,...r,ref:t})});Il.displayName=Al;var Hr="SelectItem",[hy,jl]=Tn(Hr),$l=d.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:a,...i}=e,s=Ht(Hr,n),l=Ut(Hr,n),u=s.value===r,[f,c]=d.useState(a??""),[p,h]=d.useState(!1),b=fe(t,w=>{var C;return(C=l.itemRefCallback)==null?void 0:C.call(l,w,r,o)}),g=Re(),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(hy,{scope:n,value:r,disabled:o,textId:g,isSelected:u,onItemTextChange:d.useCallback(w=>{c(C=>C||((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:X(i.onFocus,()=>h(!0)),onBlur:X(i.onBlur,()=>h(!1)),onClick:X(i.onClick,()=>{v.current!=="mouse"&&y()}),onPointerUp:X(i.onPointerUp,()=>{v.current==="mouse"&&y()}),onPointerDown:X(i.onPointerDown,w=>{v.current=w.pointerType}),onPointerMove:X(i.onPointerMove,w=>{var C;v.current=w.pointerType,o?(C=l.onItemLeave)==null||C.call(l):v.current==="mouse"&&w.currentTarget.focus({preventScroll:!0})}),onPointerLeave:X(i.onPointerLeave,w=>{var C;w.currentTarget===document.activeElement&&((C=l.onItemLeave)==null||C.call(l))}),onKeyDown:X(i.onKeyDown,w=>{var D;((D=l.searchRef)==null?void 0:D.current)!==""&&w.key===" "||(ey.includes(w.key)&&y(),w.key===" "&&w.preventDefault())})})})})});$l.displayName=Hr;var Yn="SelectItemText",Ll=d.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,...a}=e,i=Ht(Yn,n),s=Ut(Yn,n),l=jl(Yn,n),u=oy(Yn,n),[f,c]=d.useState(null),p=fe(t,y=>c(y),l.onItemTextChange,y=>{var w;return(w=s.itemTextRefCallback)==null?void 0:w.call(s,y,l.value,l.disabled)}),h=f==null?void 0:f.textContent,b=d.useMemo(()=>m.jsx("option",{value:l.value,disabled:l.disabled,children:h},l.value),[l.disabled,l.value,h]),{onNativeOptionAdd:g,onNativeOptionRemove:v}=u;return Ne(()=>(g(b),()=>v(b)),[g,v,b]),m.jsxs(m.Fragment,{children:[m.jsx(J.span,{id:l.textId,...a,ref:p}),l.isSelected&&i.valueNode&&!i.valueNodeHasChildren?eo.createPortal(a.children,i.valueNode):null]})});Ll.displayName=Yn;var Fl="SelectItemIndicator",Wl=d.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return jl(Fl,n).isSelected?m.jsx(J.span,{"aria-hidden":!0,...r,ref:t}):null});Wl.displayName=Fl;var ya="SelectScrollUpButton",Bl=d.forwardRef((e,t)=>{const n=Ut(ya,e.__scopeSelect),r=ts(ya,e.__scopeSelect),[o,a]=d.useState(!1),i=fe(t,r.onScrollButtonChange);return Ne(()=>{if(n.viewport&&n.isPositioned){let s=function(){const u=l.scrollTop>0;a(u)};const l=n.viewport;return s(),l.addEventListener("scroll",s),()=>l.removeEventListener("scroll",s)}},[n.viewport,n.isPositioned]),o?m.jsx(zl,{...e,ref:i,onAutoScroll:()=>{const{viewport:s,selectedItem:l}=n;s&&l&&(s.scrollTop=s.scrollTop-l.offsetHeight)}}):null});Bl.displayName=ya;var wa="SelectScrollDownButton",Yl=d.forwardRef((e,t)=>{const n=Ut(wa,e.__scopeSelect),r=ts(wa,e.__scopeSelect),[o,a]=d.useState(!1),i=fe(t,r.onScrollButtonChange);return Ne(()=>{if(n.viewport&&n.isPositioned){let s=function(){const u=l.scrollHeight-l.clientHeight,f=Math.ceil(l.scrollTop)<u;a(f)};const l=n.viewport;return s(),l.addEventListener("scroll",s),()=>l.removeEventListener("scroll",s)}},[n.viewport,n.isPositioned]),o?m.jsx(zl,{...e,ref:i,onAutoScroll:()=>{const{viewport:s,selectedItem:l}=n;s&&l&&(s.scrollTop=s.scrollTop+l.offsetHeight)}}):null});Yl.displayName=wa;var zl=d.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,a=Ut("SelectScrollButton",n),i=d.useRef(null),s=po(n),l=d.useCallback(()=>{i.current!==null&&(window.clearInterval(i.current),i.current=null)},[]);return d.useEffect(()=>()=>l(),[l]),Ne(()=>{var f;const u=s().find(c=>c.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:X(o.onPointerDown,()=>{i.current===null&&(i.current=window.setInterval(r,50))}),onPointerMove:X(o.onPointerMove,()=>{var u;(u=a.onItemLeave)==null||u.call(a),i.current===null&&(i.current=window.setInterval(r,50))}),onPointerLeave:X(o.onPointerLeave,()=>{l()})})}),gy="SelectSeparator",Hl=d.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return m.jsx(J.div,{"aria-hidden":!0,...r,ref:t})});Hl.displayName=gy;var xa="SelectArrow",vy=d.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=ho(n),a=Ht(xa,n),i=Ut(xa,n);return a.open&&i.position==="popper"?m.jsx(io,{...o,...r,ref:t}):null});vy.displayName=xa;var by="SelectBubbleInput",Ul=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 l=window.HTMLSelectElement.prototype,f=Object.getOwnPropertyDescriptor(l,"value").set;if(i!==t&&f){const c=new Event("change",{bubbles:!0});f.call(s,t),s.dispatchEvent(c)}},[i,t]),m.jsx(J.select,{...n,style:{...yl,...n.style},ref:a,defaultValue:t})});Ul.displayName=by;function Gl(e){return e===""||e===void 0}function ql(e){const t=Pe(e),n=d.useRef(""),r=d.useRef(0),o=d.useCallback(i=>{const s=n.current+i;t(s),function l(u){n.current=u,window.clearTimeout(r.current),u!==""&&(r.current=window.setTimeout(()=>l(""),1e3))}(s)},[t]),a=d.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return d.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,o,a]}function Vl(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=yy(e,Math.max(a,0));o.length===1&&(i=i.filter(u=>u!==n));const l=i.find(u=>u.textValue.toLowerCase().startsWith(o.toLowerCase()));return l!==n?l:void 0}function yy(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var wy=xl,Kl=Cl,xy=Dl,Sy=Ml,Cy=Nl,Xl=kl,Ey=_l,Zl=Il,Ql=$l,Dy=Ll,My=Wl,Jl=Bl,eu=Yl,tu=Hl;const Sa=wy,Ca=xy,Ur=d.forwardRef(({className:e,children:t,...n},r)=>m.jsxs(Kl,{ref:r,className:F("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background data-[placeholder]:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...n,children:[t,m.jsx(Sy,{asChild:!0,children:m.jsx(tr,{strokeWidth:1.5,className:"h-4 w-4 text-foreground"})})]}));Ur.displayName=Kl.displayName;const nu=d.forwardRef(({className:e,...t},n)=>m.jsx(Jl,{ref:n,className:F("flex cursor-default items-center justify-center py-1",e),...t,children:m.jsx(Rh,{className:"h-4 w-4"})}));nu.displayName=Jl.displayName;const ru=d.forwardRef(({className:e,...t},n)=>m.jsx(eu,{ref:n,className:F("flex cursor-default items-center justify-center py-1",e),...t,children:m.jsx(tr,{className:"h-4 w-4"})}));ru.displayName=eu.displayName;const Gr=d.forwardRef(({className:e,children:t,position:n="popper",...r},o)=>m.jsx(Cy,{children:m.jsxs(Xl,{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(nu,{}),m.jsx(Ey,{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(ru,{})]})}));Gr.displayName=Xl.displayName;const Ny=d.forwardRef(({className:e,...t},n)=>m.jsx(Zl,{ref:n,className:F("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}));Ny.displayName=Zl.displayName;const qr=d.forwardRef(({className:e,children:t,...n},r)=>m.jsxs(Ql,{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(My,{children:m.jsx(er,{className:"h-4 w-4"})})}),m.jsx(Dy,{children:t})]}));qr.displayName=Ql.displayName;const ky=d.forwardRef(({className:e,...t},n)=>m.jsx(tu,{ref:n,className:F("-mx-1 my-1 h-px bg-muted",e),...t}));ky.displayName=tu.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(Ry);return n?vi(e,n.slice(1)):NaN}}const Ry=/([+-]\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 bt 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)),ou(this),Ea(this)):this.setTime(Date.now())}static tz(t,...n){return n.length?new bt(...n,t):new bt(Date.now(),t)}withTimeZone(t){return new bt(+this,t)}getTimezoneOffset(){return-Un(this.timeZone,this)}setTime(t){return Date.prototype.setTime.apply(this,arguments),Ea(this),+this}[Symbol.for("constructDateFrom")](t){return new bt(+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");bt.prototype[t]&&(e.startsWith("get")?bt.prototype[e]=function(){return this.internal[t]()}:(bt.prototype[e]=function(){return Date.prototype[t].apply(this.internal,arguments),Oy(this),+this},bt.prototype[t]=function(){return Date.prototype[t].apply(this,arguments),Ea(this),+this}))});function Ea(e){e.internal.setTime(+e),e.internal.setUTCMinutes(e.internal.getUTCMinutes()-e.getTimezoneOffset())}function Oy(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()),ou(e)}function ou(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 l=Un(e.timeZone,e),f=-new Date(+e).getTimezoneOffset()-l,c=l!==t,p=f-s;if(c&&p){Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+p);const h=Un(e.timeZone,e),b=l-h;b&&(e.internal.setUTCMinutes(e.internal.getUTCMinutes()+b),Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+b))}}class ze extends bt{static tz(t,...n){return n.length?new ze(...n,t):new ze(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} (${Ty(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 ze(+this,t)}[Symbol.for("constructDateFrom")](t){return new ze(+new Date(t),this.timeZone)}}function Ty(e,t){return new Intl.DateTimeFormat("en-GB",{timeZone:e,timeZoneName:"long"}).format(t).slice(12)}var le;(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"})(le||(le={}));var Me;(function(e){e.disabled="disabled",e.hidden="hidden",e.outside="outside",e.focused="focused",e.today="today"})(Me||(Me={}));var lt;(function(e){e.range_end="range_end",e.range_middle="range_middle",e.range_start="range_start",e.selected="selected"})(lt||(lt={}));var Qe;(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"})(Qe||(Qe={}));const au=6048e5,_y=864e5,yi=Symbol.for("constructDateFrom");function Le(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 xe(e,t){return Le(t||e,e)}function su(e,t,n){const r=xe(e,n==null?void 0:n.in);return isNaN(t)?Le(e,NaN):(t&&r.setDate(r.getDate()+t),r)}function iu(e,t,n){const r=xe(e,n==null?void 0:n.in);if(isNaN(t))return Le(e,NaN);if(!t)return r;const o=r.getDate(),a=Le(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 Py={};function dr(){return Py}function Sn(e,t){var s,l,u,f;const n=dr(),r=(t==null?void 0:t.weekStartsOn)??((l=(s=t==null?void 0:t.locale)==null?void 0:s.options)==null?void 0:l.weekStartsOn)??n.weekStartsOn??((f=(u=n.locale)==null?void 0:u.options)==null?void 0:f.weekStartsOn)??0,o=xe(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 Sn(e,{...t,weekStartsOn:1})}function cu(e,t){const n=xe(e,t==null?void 0:t.in),r=n.getFullYear(),o=Le(n,0);o.setFullYear(r+1,0,4),o.setHours(0,0,0,0);const a=Kn(o),i=Le(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=xe(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function _n(e,...t){const n=Le.bind(null,t.find(r=>typeof r=="object"));return t.map(n)}function Xn(e,t){const n=xe(e,t==null?void 0:t.in);return n.setHours(0,0,0,0),n}function lu(e,t,n){const[r,o]=_n(n==null?void 0:n.in,e,t),a=Xn(r),i=Xn(o),s=+a-wi(a),l=+i-wi(i);return Math.round((s-l)/_y)}function Ay(e,t){const n=cu(e,t),r=Le(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),Kn(r)}function Iy(e,t,n){return su(e,t*7,n)}function jy(e,t,n){return iu(e,t*12,n)}function $y(e,t){let n,r=t==null?void 0:t.in;return e.forEach(o=>{!r&&typeof o=="object"&&(r=Le.bind(null,o));const a=xe(o,r);(!n||n<a||isNaN(+a))&&(n=a)}),Le(r,n||NaN)}function Ly(e,t){let n,r=t==null?void 0:t.in;return e.forEach(o=>{!r&&typeof o=="object"&&(r=Le.bind(null,o));const a=xe(o,r);(!n||n>a||isNaN(+a))&&(n=a)}),Le(r,n||NaN)}function Fy(e,t,n){const[r,o]=_n(n==null?void 0:n.in,e,t);return+Xn(r)==+Xn(o)}function uu(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function Wy(e){return!(!uu(e)&&typeof e!="number"||isNaN(+xe(e)))}function By(e,t,n){const[r,o]=_n(n==null?void 0:n.in,e,t),a=r.getFullYear()-o.getFullYear(),i=r.getMonth()-o.getMonth();return a*12+i}function Yy(e,t){const n=xe(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 zy(e,t){const[n,r]=_n(e,t.start,t.end);return{start:n,end:r}}function Hy(e,t){const{start:n,end:r}=zy(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 l=[];for(;+i<=a;)l.push(Le(n,i)),i.setMonth(i.getMonth()+s);return o?l.reverse():l}function Uy(e,t){const n=xe(e,t==null?void 0:t.in);return n.setDate(1),n.setHours(0,0,0,0),n}function Gy(e,t){const n=xe(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 du(e,t){const n=xe(e,t==null?void 0:t.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function fu(e,t){var s,l,u,f;const n=dr(),r=(t==null?void 0:t.weekStartsOn)??((l=(s=t==null?void 0:t.locale)==null?void 0:s.options)==null?void 0:l.weekStartsOn)??n.weekStartsOn??((f=(u=n.locale)==null?void 0:u.options)==null?void 0:f.weekStartsOn)??0,o=xe(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 qy(e,t){return fu(e,{...t,weekStartsOn:1})}const Vy={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"}},Ky=(e,t,n)=>{let r;const o=Vy[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 Xy={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Zy={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Qy={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Jy={date:zo({formats:Xy,defaultWidth:"full"}),time:zo({formats:Zy,defaultWidth:"full"}),dateTime:zo({formats:Qy,defaultWidth:"full"})},ew={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},tw=(e,t,n,r)=>ew[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 nw={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},rw={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},ow={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"]},aw={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"]},sw={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"}},iw={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"}},cw=(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"},lw={ordinalNumber:cw,era:$n({values:nw,defaultWidth:"wide"}),quarter:$n({values:rw,defaultWidth:"wide",argumentCallback:e=>e-1}),month:$n({values:ow,defaultWidth:"wide"}),day:$n({values:aw,defaultWidth:"wide"}),dayPeriod:$n({values:sw,defaultWidth:"wide",formattingValues:iw,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],l=Array.isArray(s)?dw(s,c=>c.test(i)):uw(s,c=>c.test(i));let u;u=e.valueCallback?e.valueCallback(l):l,u=n.valueCallback?n.valueCallback(u):u;const f=t.slice(i.length);return{value:u,rest:f}}}function uw(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function dw(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function fw(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 mw=/^(\d+)(th|st|nd|rd)?/i,pw=/\d+/i,hw={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},gw={any:[/^b/i,/^(a|c)/i]},vw={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},bw={any:[/1/i,/2/i,/3/i,/4/i]},yw={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},ww={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]},xw={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},Sw={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]},Cw={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},Ew={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}},Dw={ordinalNumber:fw({matchPattern:mw,parsePattern:pw,valueCallback:e=>parseInt(e,10)}),era:Ln({matchPatterns:hw,defaultMatchWidth:"wide",parsePatterns:gw,defaultParseWidth:"any"}),quarter:Ln({matchPatterns:vw,defaultMatchWidth:"wide",parsePatterns:bw,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Ln({matchPatterns:yw,defaultMatchWidth:"wide",parsePatterns:ww,defaultParseWidth:"any"}),day:Ln({matchPatterns:xw,defaultMatchWidth:"wide",parsePatterns:Sw,defaultParseWidth:"any"}),dayPeriod:Ln({matchPatterns:Cw,defaultMatchWidth:"any",parsePatterns:Ew,defaultParseWidth:"any"})},ns={code:"en-US",formatDistance:Ky,formatLong:Jy,formatRelative:tw,localize:lw,match:Dw,options:{weekStartsOn:0,firstWeekContainsDate:1}};function Mw(e,t){const n=xe(e,t==null?void 0:t.in);return lu(n,du(n))+1}function mu(e,t){const n=xe(e,t==null?void 0:t.in),r=+Kn(n)-+Ay(n);return Math.round(r/au)+1}function pu(e,t){var f,c,p,h;const n=xe(e,t==null?void 0:t.in),r=n.getFullYear(),o=dr(),a=(t==null?void 0:t.firstWeekContainsDate)??((c=(f=t==null?void 0:t.locale)==null?void 0:f.options)==null?void 0:c.firstWeekContainsDate)??o.firstWeekContainsDate??((h=(p=o.locale)==null?void 0:p.options)==null?void 0:h.firstWeekContainsDate)??1,i=Le((t==null?void 0:t.in)||e,0);i.setFullYear(r+1,0,a),i.setHours(0,0,0,0);const s=Sn(i,t),l=Le((t==null?void 0:t.in)||e,0);l.setFullYear(r,0,a),l.setHours(0,0,0,0);const u=Sn(l,t);return+n>=+s?r+1:+n>=+u?r:r-1}function Nw(e,t){var s,l,u,f;const n=dr(),r=(t==null?void 0:t.firstWeekContainsDate)??((l=(s=t==null?void 0:t.locale)==null?void 0:s.options)==null?void 0:l.firstWeekContainsDate)??n.firstWeekContainsDate??((f=(u=n.locale)==null?void 0:u.options)==null?void 0:f.firstWeekContainsDate)??1,o=pu(e,t),a=Le((t==null?void 0:t.in)||e,0);return a.setFullYear(o,0,r),a.setHours(0,0,0,0),Sn(a,t)}function hu(e,t){const n=xe(e,t==null?void 0:t.in),r=+Sn(n,t)-+Nw(n,t);return Math.round(r/au)+1}function ye(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const It={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return ye(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):ye(n+1,2)},d(e,t){return ye(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(e,t){return ye(e.getHours()%12||12,t.length)},H(e,t){return ye(e.getHours(),t.length)},m(e,t){return ye(e.getMinutes(),t.length)},s(e,t){return ye(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),o=Math.trunc(r*Math.pow(10,n-3));return ye(o,t.length)}},hn={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 It.y(e,t)},Y:function(e,t,n,r){const o=pu(e,r),a=o>0?o:1-o;if(t==="YY"){const i=a%100;return ye(i,2)}return t==="Yo"?n.ordinalNumber(a,{unit:"year"}):ye(a,t.length)},R:function(e,t){const n=cu(e);return ye(n,t.length)},u:function(e,t){const n=e.getFullYear();return ye(n,t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return ye(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return ye(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return It.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return ye(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const o=hu(e,r);return t==="wo"?n.ordinalNumber(o,{unit:"week"}):ye(o,t.length)},I:function(e,t,n){const r=mu(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):ye(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):It.d(e,t)},D:function(e,t,n){const r=Mw(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):ye(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const o=e.getDay(),a=(o-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(a);case"ee":return ye(a,2);case"eo":return n.ordinalNumber(a,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});case"eeee":default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const o=e.getDay(),a=(o-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(a);case"cc":return ye(a,t.length);case"co":return n.ordinalNumber(a,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});case"cccc":default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),o=r===0?7:r;switch(t){case"i":return String(o);case"ii":return ye(o,t.length);case"io":return n.ordinalNumber(o,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const o=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let o;switch(r===12?o=hn.noon:r===0?o=hn.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=hn.evening:r>=12?o=hn.afternoon:r>=4?o=hn.morning:o=hn.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 It.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):It.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):ye(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):ye(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):It.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):It.s(e,t)},S:function(e,t){return It.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return Ci(r);case"XXXX":case"XX":return Qt(r);case"XXXXX":case"XXX":default:return Qt(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return Ci(r);case"xxxx":case"xx":return Qt(r);case"xxxxx":case"xxx":default:return Qt(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"+Qt(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"+Qt(r,":")}},t:function(e,t,n){const r=Math.trunc(+e/1e3);return ye(r,t.length)},T:function(e,t,n){return ye(+e,t.length)}};function 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+ye(a,2)}function Ci(e,t){return e%60===0?(e>0?"-":"+")+ye(Math.abs(e)/60,2):Qt(e,t)}function Qt(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=ye(Math.trunc(r/60),2),a=ye(r%60,2);return n+o+t+a}const Ei=(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"})}},gu=(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"})}},kw=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return Ei(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}}",Ei(r,t)).replace("{{time}}",gu(o,t))},Rw={p:gu,P:kw},Ow=/^D+$/,Tw=/^Y+$/,_w=["D","DD","YY","YYYY"];function Pw(e){return Ow.test(e)}function Aw(e){return Tw.test(e)}function Iw(e,t,n){const r=jw(e,t,n);if(console.warn(r),_w.includes(e))throw new RangeError(r)}function jw(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 $w=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Lw=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Fw=/^'([^]*?)'?$/,Ww=/''/g,Bw=/[a-zA-Z]/;function Yw(e,t,n){var f,c,p,h,b,g,v,y;const r=dr(),o=(n==null?void 0:n.locale)??r.locale??ns,a=(n==null?void 0:n.firstWeekContainsDate)??((c=(f=n==null?void 0:n.locale)==null?void 0:f.options)==null?void 0:c.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=xe(e,n==null?void 0:n.in);if(!Wy(s))throw new RangeError("Invalid time value");let l=t.match(Lw).map(w=>{const C=w[0];if(C==="p"||C==="P"){const D=Rw[C];return D(w,o.formatLong)}return w}).join("").match($w).map(w=>{if(w==="''")return{isToken:!1,value:"'"};const C=w[0];if(C==="'")return{isToken:!1,value:zw(w)};if(xi[C])return{isToken:!0,value:w};if(C.match(Bw))throw new RangeError("Format string contains an unescaped latin alphabet character `"+C+"`");return{isToken:!1,value:w}});o.localize.preprocessor&&(l=o.localize.preprocessor(s,l));const u={firstWeekContainsDate:a,weekStartsOn:i,locale:o};return l.map(w=>{if(!w.isToken)return w.value;const C=w.value;(!(n!=null&&n.useAdditionalWeekYearTokens)&&Aw(C)||!(n!=null&&n.useAdditionalDayOfYearTokens)&&Pw(C))&&Iw(C,t,String(e));const D=xi[C[0]];return D(s,C,o.localize,u)}).join("")}function zw(e){const t=e.match(Fw);return t?t[1].replace(Ww,"'"):e}function Hw(e,t){const n=xe(e,t==null?void 0:t.in),r=n.getFullYear(),o=n.getMonth(),a=Le(n,0);return a.setFullYear(r,o+1,0),a.setHours(0,0,0,0),a.getDate()}function Uw(e,t){return xe(e,t==null?void 0:t.in).getMonth()}function Gw(e,t){return xe(e,t==null?void 0:t.in).getFullYear()}function qw(e,t){return+xe(e)>+xe(t)}function Vw(e,t){return+xe(e)<+xe(t)}function Kw(e,t,n){const[r,o]=_n(n==null?void 0:n.in,e,t);return r.getFullYear()===o.getFullYear()&&r.getMonth()===o.getMonth()}function Xw(e,t,n){const[r,o]=_n(n==null?void 0:n.in,e,t);return r.getFullYear()===o.getFullYear()}function Zw(e,t,n){const r=xe(e,n==null?void 0:n.in),o=r.getFullYear(),a=r.getDate(),i=Le(e,0);i.setFullYear(o,t,15),i.setHours(0,0,0,0);const s=Hw(i);return r.setMonth(t,Math.min(a,s)),r}function Qw(e,t,n){const r=xe(e,n==null?void 0:n.in);return isNaN(+r)?Le(e,NaN):(r.setFullYear(t),r)}const Di=5,Jw=4;function ex(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:Jw}function vu(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 tx(e,t){const n=vu(e,t),r=ex(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?ze.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 ze(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):su(r,o)},this.addMonths=(r,o)=>{var a;return(a=this.overrides)!=null&&a.addMonths?this.overrides.addMonths(r,o):iu(r,o)},this.addWeeks=(r,o)=>{var a;return(a=this.overrides)!=null&&a.addWeeks?this.overrides.addWeeks(r,o):Iy(r,o)},this.addYears=(r,o)=>{var a;return(a=this.overrides)!=null&&a.addYears?this.overrides.addYears(r,o):jy(r,o)},this.differenceInCalendarDays=(r,o)=>{var a;return(a=this.overrides)!=null&&a.differenceInCalendarDays?this.overrides.differenceInCalendarDays(r,o):lu(r,o)},this.differenceInCalendarMonths=(r,o)=>{var a;return(a=this.overrides)!=null&&a.differenceInCalendarMonths?this.overrides.differenceInCalendarMonths(r,o):By(r,o)},this.eachMonthOfInterval=r=>{var o;return(o=this.overrides)!=null&&o.eachMonthOfInterval?this.overrides.eachMonthOfInterval(r):Hy(r)},this.endOfBroadcastWeek=r=>{var o;return(o=this.overrides)!=null&&o.endOfBroadcastWeek?this.overrides.endOfBroadcastWeek(r):tx(r,this)},this.endOfISOWeek=r=>{var o;return(o=this.overrides)!=null&&o.endOfISOWeek?this.overrides.endOfISOWeek(r):qy(r)},this.endOfMonth=r=>{var o;return(o=this.overrides)!=null&&o.endOfMonth?this.overrides.endOfMonth(r):Yy(r)},this.endOfWeek=(r,o)=>{var a;return(a=this.overrides)!=null&&a.endOfWeek?this.overrides.endOfWeek(r,o):fu(r,this.options)},this.endOfYear=r=>{var o;return(o=this.overrides)!=null&&o.endOfYear?this.overrides.endOfYear(r):Gy(r)},this.format=(r,o,a)=>{var s;const i=(s=this.overrides)!=null&&s.format?this.overrides.format(r,o,this.options):Yw(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):mu(r)},this.getMonth=(r,o)=>{var a;return(a=this.overrides)!=null&&a.getMonth?this.overrides.getMonth(r,this.options):Uw(r,this.options)},this.getYear=(r,o)=>{var a;return(a=this.overrides)!=null&&a.getYear?this.overrides.getYear(r,this.options):Gw(r,this.options)},this.getWeek=(r,o)=>{var a;return(a=this.overrides)!=null&&a.getWeek?this.overrides.getWeek(r,this.options):hu(r,this.options)},this.isAfter=(r,o)=>{var a;return(a=this.overrides)!=null&&a.isAfter?this.overrides.isAfter(r,o):qw(r,o)},this.isBefore=(r,o)=>{var a;return(a=this.overrides)!=null&&a.isBefore?this.overrides.isBefore(r,o):Vw(r,o)},this.isDate=r=>{var o;return(o=this.overrides)!=null&&o.isDate?this.overrides.isDate(r):uu(r)},this.isSameDay=(r,o)=>{var a;return(a=this.overrides)!=null&&a.isSameDay?this.overrides.isSameDay(r,o):Fy(r,o)},this.isSameMonth=(r,o)=>{var a;return(a=this.overrides)!=null&&a.isSameMonth?this.overrides.isSameMonth(r,o):Kw(r,o)},this.isSameYear=(r,o)=>{var a;return(a=this.overrides)!=null&&a.isSameYear?this.overrides.isSameYear(r,o):Xw(r,o)},this.max=r=>{var o;return(o=this.overrides)!=null&&o.max?this.overrides.max(r):$y(r)},this.min=r=>{var o;return(o=this.overrides)!=null&&o.min?this.overrides.min(r):Ly(r)},this.setMonth=(r,o)=>{var a;return(a=this.overrides)!=null&&a.setMonth?this.overrides.setMonth(r,o):Zw(r,o)},this.setYear=(r,o)=>{var a;return(a=this.overrides)!=null&&a.setYear?this.overrides.setYear(r,o):Qw(r,o)},this.startOfBroadcastWeek=(r,o)=>{var a;return(a=this.overrides)!=null&&a.startOfBroadcastWeek?this.overrides.startOfBroadcastWeek(r,this):vu(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):Uy(r)},this.startOfWeek=(r,o)=>{var a;return(a=this.overrides)!=null&&a.startOfWeek?this.overrides.startOfWeek(r,this.options):Sn(r,this.options)},this.startOfYear=r=>{var o;return(o=this.overrides)!=null&&o.startOfYear?this.overrides.startOfYear(r):du(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 St=new Tt;class bu{constructor(t,n,r=St){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 nx{constructor(t,n){this.date=t,this.weeks=n}}class rx{constructor(t,n){this.days=n,this.weekNumber=t}}function Et(e,t,n=!1,r=St){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 yu(e){return!!(e&&typeof e=="object"&&"before"in e&&"after"in e)}function rs(e){return!!(e&&typeof e=="object"&&"from"in e)}function wu(e){return!!(e&&typeof e=="object"&&"after"in e)}function xu(e){return!!(e&&typeof e=="object"&&"before"in e)}function Su(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=St){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 Et(s,e,!1,n);if(Su(s))return Array.isArray(s.dayOfWeek)?s.dayOfWeek.includes(e.getDay()):s.dayOfWeek===e.getDay();if(yu(s)){const l=a(s.before,e),u=a(s.after,e),f=l>0,c=u<0;return i(s.before,s.after)?c&&f:f||c}return wu(s)?a(e,s.after)>0:xu(s)?a(s.before,e)>0:typeof s=="function"?s(e):!1})}function ox(e,t,n,r,o){const{disabled:a,hidden:i,modifiers:s,showOutsideDays:l,broadcastCalendar:u,today:f}=t,{isSameDay:c,isSameMonth:p,startOfMonth:h,isBefore:b,endOfMonth:g,isAfter:v}=o,y=n&&h(n),w=r&&g(r),C={[Me.focused]:[],[Me.outside]:[],[Me.disabled]:[],[Me.hidden]:[],[Me.today]:[]},D={};for(const E of e){const{date:R,displayMonth:S}=E,k=!!(S&&!p(R,S)),I=!!(y&&b(R,y)),j=!!(w&&v(R,w)),L=!!(a&&Dt(R,a,o)),V=!!(i&&Dt(R,i,o))||I||j||!u&&!l&&k||u&&l===!1&&k,B=c(R,f??o.today());k&&C.outside.push(E),L&&C.disabled.push(E),V&&C.hidden.push(E),B&&C.today.push(E),s&&Object.keys(s).forEach(P=>{const O=s==null?void 0:s[P];O&&Dt(R,O,o)&&(D[P]?D[P].push(E):D[P]=[E])})}return E=>{const R={[Me.focused]:!1,[Me.disabled]:!1,[Me.hidden]:!1,[Me.outside]:!1,[Me.today]:!1},S={};for(const k in C){const I=C[k];R[k]=I.some(j=>j===E)}for(const k in D)S[k]=D[k].some(I=>I===E);return{...R,...S}}}function ax(e,t,n={}){return Object.entries(e).filter(([,o])=>o===!0).reduce((o,[a])=>(n[a]?o.push(n[a]):t[Me[a]]?o.push(t[Me[a]]):t[lt[a]]&&o.push(t[lt[a]]),o),[t[le.Day]])}function sx(e){return x.createElement("button",{...e})}function ix(e){return x.createElement("span",{...e})}function cx(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 lx(e){const{day:t,modifiers:n,...r}=e;return x.createElement("td",{...r})}function ux(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 dx(e){const{options:t,className:n,components:r,classNames:o,...a}=e,i=[o[le.Dropdown],n].join(" "),s=t==null?void 0:t.find(({value:l})=>l===a.value);return x.createElement("span",{"data-disabled":a.disabled,className:o[le.DropdownRoot]},x.createElement(r.Select,{className:i,...a},t==null?void 0:t.map(({value:l,label:u,disabled:f})=>x.createElement(r.Option,{key:l,value:l,disabled:f},u))),x.createElement("span",{className:o[le.CaptionLabel],"aria-hidden":!0},s==null?void 0:s.label,x.createElement(r.Chevron,{orientation:"down",size:18,className:o[le.Chevron]})))}function fx(e){return x.createElement("div",{...e})}function mx(e){return x.createElement("div",{...e})}function px(e){const{calendarMonth:t,displayIndex:n,...r}=e;return x.createElement("div",{...r},e.children)}function hx(e){const{calendarMonth:t,displayIndex:n,...r}=e;return x.createElement("div",{...r})}function gx(e){return x.createElement("table",{...e})}function vx(e){return x.createElement("div",{...e})}const Eu=x.createContext(void 0);function fr(){const e=x.useContext(Eu);if(e===void 0)throw new Error("useDayPicker() must be used within a custom component.");return e}function bx(e){const{components:t}=fr();return x.createElement(t.Dropdown,{...e})}function yx(e){const{onPreviousClick:t,onNextClick:n,previousMonth:r,nextMonth:o,...a}=e,{components:i,classNames:s,labels:{labelPrevious:l,labelNext:u}}=fr(),f=x.useCallback(p=>{o&&(n==null||n(p))},[o,n]),c=x.useCallback(p=>{r&&(t==null||t(p))},[r,t]);return x.createElement("nav",{...a},x.createElement(i.PreviousMonthButton,{type:"button",className:s[le.PreviousMonthButton],tabIndex:r?void 0:-1,"aria-disabled":r?void 0:!0,"aria-label":l(r),onClick:c},x.createElement(i.Chevron,{disabled:r?void 0:!0,className:s[le.Chevron],orientation:"left"})),x.createElement(i.NextMonthButton,{type:"button",className:s[le.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[le.Chevron]})))}function wx(e){const{components:t}=fr();return x.createElement(t.Button,{...e})}function xx(e){return x.createElement("option",{...e})}function Sx(e){const{components:t}=fr();return x.createElement(t.Button,{...e})}function Cx(e){const{rootRef:t,...n}=e;return x.createElement("div",{...n,ref:t})}function Ex(e){return x.createElement("select",{...e})}function Dx(e){const{week:t,...n}=e;return x.createElement("tr",{...n})}function Mx(e){return x.createElement("th",{...e})}function Nx(e){return x.createElement("thead",{"aria-hidden":!0},x.createElement("tr",{...e}))}function kx(e){const{week:t,...n}=e;return x.createElement("th",{...n})}function Rx(e){return x.createElement("th",{...e})}function Ox(e){return x.createElement("tbody",{...e})}function Tx(e){const{components:t}=fr();return x.createElement(t.Dropdown,{...e})}const _x=Object.freeze(Object.defineProperty({__proto__:null,Button:sx,CaptionLabel:ix,Chevron:cx,Day:lx,DayButton:ux,Dropdown:dx,DropdownNav:fx,Footer:mx,Month:px,MonthCaption:hx,MonthGrid:gx,Months:vx,MonthsDropdown:bx,Nav:yx,NextMonthButton:wx,Option:xx,PreviousMonthButton:Sx,Root:Cx,Select:Ex,Week:Dx,WeekNumber:kx,WeekNumberHeader:Rx,Weekday:Mx,Weekdays:Nx,Weeks:Ox,YearsDropdown:Tx},Symbol.toStringTag,{value:"Module"}));function Px(e){return{..._x,...e}}function Ax(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 le)e[le[t]]=`rdp-${le[t]}`;for(const t in Me)e[Me[t]]=`rdp-${Me[t]}`;for(const t in lt)e[lt[t]]=`rdp-${lt[t]}`;for(const t in Qe)e[Qe[t]]=`rdp-${Qe[t]}`;return e}function Du(e,t,n){return(n??new Tt(t)).format(e,"LLLL y")}const Ix=Du;function jx(e,t,n){return(n??new Tt(t)).format(e,"d")}function $x(e,t=St){return t.format(e,"LLLL")}function Lx(e,t=St){return e<10?t.formatNumber(`0${e.toLocaleString()}`):t.formatNumber(`${e.toLocaleString()}`)}function Fx(){return""}function Wx(e,t,n){return(n??new Tt(t)).format(e,"cccccc")}function Mu(e,t=St){return t.format(e,"yyyy")}const Bx=Mu,Yx=Object.freeze(Object.defineProperty({__proto__:null,formatCaption:Du,formatDay:jx,formatMonthCaption:Ix,formatMonthDropdown:$x,formatWeekNumber:Lx,formatWeekNumberHeader:Fx,formatWeekdayName:Wx,formatYearCaption:Bx,formatYearDropdown:Mu},Symbol.toStringTag,{value:"Module"}));function zx(e){return e!=null&&e.formatMonthCaption&&!e.formatCaption&&(e.formatCaption=e.formatMonthCaption),e!=null&&e.formatYearCaption&&!e.formatYearDropdown&&(e.formatYearDropdown=e.formatYearCaption),{...Yx,...e}}function Hx(e,t,n,r,o){const{startOfMonth:a,startOfYear:i,endOfYear:s,eachMonthOfInterval:l,getMonth:u}=o;return l({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 Ux(e,t={},n={}){let r={...t==null?void 0:t[le.Day]};return Object.entries(e).filter(([,o])=>o===!0).forEach(([o])=>{r={...r,...n==null?void 0:n[o]}}),r}function Gx(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 qx(e,t,n,r){if(!e||!t)return;const{startOfYear:o,endOfYear:a,addYears:i,getYear:s,isBefore:l,isSameYear:u}=r,f=o(e),c=a(t),p=[];let h=f;for(;l(h,c)||u(h,c);)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 Nu(e,t,n){return(n??new Tt(t)).format(e,"LLLL y")}const Vx=Nu;function Kx(e,t,n,r){let o=(r??new Tt(n)).format(e,"PPPP");return t!=null&&t.today&&(o=`Today, ${o}`),o}function ku(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 Xx=ku;function Zx(){return""}function Qx(e){return"Choose the Month"}function Jx(e){return"Go to the Next Month"}function e0(e){return"Go to the Previous Month"}function t0(e,t,n){return(n??new Tt(t)).format(e,"cccc")}function n0(e,t){return`Week ${e}`}function r0(e){return"Week Number"}function o0(e){return"Choose the Year"}const a0=Object.freeze(Object.defineProperty({__proto__:null,labelCaption:Vx,labelDay:Xx,labelDayButton:ku,labelGrid:Nu,labelGridcell:Kx,labelMonthDropdown:Qx,labelNav:Zx,labelNext:Jx,labelPrevious:e0,labelWeekNumber:n0,labelWeekNumberHeader:r0,labelWeekday:t0,labelYearDropdown:o0},Symbol.toStringTag,{value:"Module"})),mr=e=>e instanceof HTMLElement?e:null,Ho=e=>[...e.querySelectorAll("[data-animated-month]")??[]],s0=e=>mr(e.querySelector("[data-animated-month]")),Uo=e=>mr(e.querySelector("[data-animated-caption]")),Go=e=>mr(e.querySelector("[data-animated-weeks]")),i0=e=>mr(e.querySelector("[data-animated-nav]")),c0=e=>mr(e.querySelector("[data-animated-weekdays]"));function l0(e,t,{classNames:n,months:r,focused:o,dateLib:a}){const i=x.useRef(null),s=x.useRef(r),l=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),c=a.isAfter(r[0].date,u[0].date),p=c?n[Qe.caption_after_enter]:n[Qe.caption_before_enter],h=c?n[Qe.weeks_after_enter]:n[Qe.weeks_before_enter],b=i.current,g=e.current.cloneNode(!0);if(g instanceof HTMLElement?(Ho(g).forEach(C=>{if(!(C instanceof HTMLElement))return;const D=s0(C);D&&C.contains(D)&&C.removeChild(D);const E=Uo(C);E&&E.classList.remove(p);const R=Go(C);R&&R.classList.remove(h)}),i.current=g):i.current=null,l.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)){l.current=!0,e.current.style.isolation="isolate";const w=i0(e.current);w&&(w.style.zIndex="1"),y.forEach((C,D)=>{const E=v[D];if(!E)return;C.style.position="relative",C.style.overflow="hidden";const R=Uo(C);R&&R.classList.add(p);const S=Go(C);S&&S.classList.add(h);const k=()=>{l.current=!1,e.current&&(e.current.style.isolation=""),w&&(w.style.zIndex=""),R&&R.classList.remove(p),S&&S.classList.remove(h),C.style.position="",C.style.overflow="",C.contains(E)&&C.removeChild(E)};E.style.pointerEvents="none",E.style.position="absolute",E.style.overflow="hidden",E.setAttribute("aria-hidden","true");const I=c0(E);I&&(I.style.opacity="0");const j=Uo(E);j&&(j.classList.add(c?n[Qe.caption_before_exit]:n[Qe.caption_after_exit]),j.addEventListener("animationend",k));const L=Go(E);L&&L.classList.add(c?n[Qe.weeks_before_exit]:n[Qe.weeks_after_exit]),C.insertBefore(E,C.firstChild)})}})}function u0(e,t,n,r){const o=e[0],a=e[e.length-1],{ISOWeek:i,fixedWeeks:s,broadcastCalendar:l}=n??{},{addDays:u,differenceInCalendarDays:f,differenceInCalendarMonths:c,endOfBroadcastWeek:p,endOfISOWeek:h,endOfMonth:b,endOfWeek:g,isAfter:v,startOfBroadcastWeek:y,startOfISOWeek:w,startOfWeek:C}=r,D=l?y(o,r):i?w(o):C(o),E=l?p(a):i?h(b(a)):g(b(a)),R=f(E,D),S=c(a,o)+1,k=[];for(let L=0;L<=R;L++){const V=u(D,L);if(t&&v(V,t))break;k.push(V)}const j=(l?35:42)*S;if(s&&k.length<j){const L=j-k.length;for(let V=0;V<L;V++){const B=u(k[k.length-1],1);k.push(B)}}return k}function d0(e){const t=[];return e.reduce((n,r)=>{const o=r.weeks.reduce((a,i)=>[...a,...i.days],t);return[...n,...o]},t)}function f0(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 l=o||a||i;const{differenceInCalendarMonths:u,addMonths:f,startOfMonth:c}=r;if(n&&u(n,l)<s-1){const p=-1*(s-1);l=f(n,p)}return t&&u(l,t)<0&&(l=t),c(l)}function m0(e,t,n,r){const{addDays:o,endOfBroadcastWeek:a,endOfISOWeek:i,endOfMonth:s,endOfWeek:l,getISOWeek:u,getWeek:f,startOfBroadcastWeek:c,startOfISOWeek:p,startOfWeek:h}=r,b=e.reduce((g,v)=>{const y=n.broadcastCalendar?c(v,r):n.ISOWeek?p(v):h(v),w=n.broadcastCalendar?a(v):n.ISOWeek?i(s(v)):l(s(v)),C=t.filter(S=>S>=y&&S<=w),D=n.broadcastCalendar?35:42;if(n.fixedWeeks&&C.length<D){const S=t.filter(k=>{const I=D-C.length;return k>w&&k<=o(w,I)});C.push(...S)}const E=C.reduce((S,k)=>{const I=n.ISOWeek?u(k):f(k),j=S.find(V=>V.weekNumber===I),L=new bu(k,v,r);return j?j.days.push(L):S.push(new rx(I,[L])),S},[]),R=new nx(v,E);return g.push(R),g},[]);return n.reverseMonths?b.reverse():b}function p0(e,t){let{startMonth:n,endMonth:r}=e;const{startOfYear:o,startOfDay:a,startOfMonth:i,endOfMonth:s,addYears:l,endOfYear:u,newDate:f,today:c}=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(l(e.today??c(),-100))),r?r=s(r):h?r=f(h,11,31):!r&&v&&(r=u(e.today??c())),[n&&a(n),r&&a(r)]}function h0(e,t,n,r){if(n.disableNavigation)return;const{pagedNavigation:o,numberOfMonths:a=1}=n,{startOfMonth:i,addMonths:s,differenceInCalendarMonths:l}=r,u=o?a:1,f=i(e);if(!t)return s(f,u);if(!(l(t,e)<a))return s(f,u)}function g0(e,t,n,r){if(n.disableNavigation)return;const{pagedNavigation:o,numberOfMonths:a}=n,{startOfMonth:i,addMonths:s,differenceInCalendarMonths:l}=r,u=o?a??1:1,f=i(e);if(!t)return s(f,-u);if(!(l(f,t)<=0))return s(f,-u)}function v0(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 b0(e,t){const[n,r]=p0(e,t),{startOfMonth:o,endOfMonth:a}=t,i=Mi(e,n,r,t),[s,l]=go(i,e.month?i:void 0);x.useEffect(()=>{const R=Mi(e,n,r,t);l(R)},[e.timeZone]);const u=f0(s,r,e,t),f=u0(u,e.endMonth?a(e.endMonth):void 0,e,t),c=m0(u,f,e,t),p=v0(c),h=d0(c),b=g0(s,n,e,t),g=h0(s,r,e,t),{disableNavigation:v,onMonthChange:y}=e,w=R=>p.some(S=>S.days.some(k=>k.isEqualTo(R))),C=R=>{if(v)return;let S=o(R);n&&S<o(n)&&(S=o(n)),r&&S>o(r)&&(S=o(r)),l(S),y==null||y(S)};return{months:c,weeks:p,days:h,navStart:n,navEnd:r,previousMonth:b,nextMonth:g,goToMonth:C,goToDay:R=>{w(R)||C(R.date)}}}var ht;(function(e){e[e.Today=0]="Today",e[e.Selected=1]="Selected",e[e.LastFocused=2]="LastFocused",e[e.FocusedModifier=3]="FocusedModifier"})(ht||(ht={}));function Ni(e){return!e[Me.disabled]&&!e[Me.hidden]&&!e[Me.outside]}function y0(e,t,n,r){let o,a=-1;for(const i of e){const s=t(i);Ni(s)&&(s[Me.focused]&&a<ht.FocusedModifier?(o=i,a=ht.FocusedModifier):r!=null&&r.isEqualTo(i)&&a<ht.LastFocused?(o=i,a=ht.LastFocused):n(i.date)&&a<ht.Selected?(o=i,a=ht.Selected):s[Me.today]&&a<ht.Today&&(o=i,a=ht.Today))}return o||(o=e.find(i=>Ni(t(i)))),o}function w0(e,t,n,r,o,a,i){const{ISOWeek:s,broadcastCalendar:l}=a,{addDays:u,addMonths:f,addWeeks:c,addYears:p,endOfBroadcastWeek:h,endOfISOWeek:b,endOfWeek:g,max:v,min:y,startOfBroadcastWeek:w,startOfISOWeek:C,startOfWeek:D}=i;let R={day:u,week:c,month:f,year:p,startOfWeek:S=>l?w(S,i):s?C(S):D(S),endOfWeek:S=>l?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=y([o,R])),R}function Ru(e,t,n,r,o,a,i,s=0){if(s>365)return;const l=w0(e,t,n.date,r,o,a,i),u=!!(a.disabled&&Dt(l,a.disabled,i)),f=!!(a.hidden&&Dt(l,a.hidden,i)),c=l,p=new bu(l,c,i);return!u&&!f?p:Ru(e,t,p,r,o,a,i,s+1)}function x0(e,t,n,r,o){const{autoFocus:a}=e,[i,s]=x.useState(),l=y0(t.days,n,r||(()=>!1),i),[u,f]=x.useState(a?l:void 0);return{isFocusTarget:g=>!!(l!=null&&l.isEqualTo(g)),setFocused:f,focused:u,blur:()=>{s(u),f(void 0)},moveFocus:(g,v)=>{if(!u)return;const y=Ru(g,v,u,t.navStart,t.navEnd,e,o);y&&(t.goToDay(y),f(y))}}}function S0(e,t){const{selected:n,required:r,onSelect:o}=e,[a,i]=go(n,o?n:void 0),s=o?n:a,{isSameDay:l}=t,u=h=>(s==null?void 0:s.some(b=>l(b,h)))??!1,{min:f,max:c}=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=>!l(y,h))}else(s==null?void 0:s.length)===c?v=[h]:v=[...v,h];return o||i(v),o==null||o(v,h,b,g),v},isSelected:u}}function C0(e,t,n=0,r=0,o=!1,a=St){const{from:i,to:s}=t||{},{isSameDay:l,isAfter:u,isBefore:f}=a;let c;if(!i&&!s)c={from:e,to:n>0?void 0:e};else if(i&&!s)l(i,e)?o?c={from:i,to:void 0}:c=void 0:f(e,i)?c={from:e,to:i}:c={from:i,to:e};else if(i&&s)if(l(i,e)&&l(s,e))o?c={from:i,to:s}:c=void 0;else if(l(i,e))c={from:i,to:n>0?void 0:e};else if(l(s,e))c={from:e,to:n>0?void 0:e};else if(f(e,i))c={from:e,to:s};else if(u(e,i))c={from:i,to:e};else if(u(e,s))c={from:i,to:e};else throw new Error("Invalid range");if(c!=null&&c.from&&(c!=null&&c.to)){const p=a.differenceInCalendarDays(c.to,c.from);r>0&&p>r?c={from:e,to:void 0}:n>1&&p<n&&(c={from:e,to:void 0})}return c}function E0(e,t,n=St){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=St){return Et(e,t.from,!1,n)||Et(e,t.to,!1,n)||Et(t,e.from,!1,n)||Et(t,e.to,!1,n)}function D0(e,t,n=St){const r=Array.isArray(t)?t:[t];if(r.filter(s=>typeof s!="function").some(s=>typeof s=="boolean"?s:n.isDate(s)?Et(e,s,!1,n):Cu(s,n)?s.some(l=>Et(e,l,!1,n)):rs(s)?s.from&&s.to?ki(e,{from:s.from,to:s.to},n):!1:Su(s)?E0(e,s.dayOfWeek,n):yu(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):wu(s)||xu(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 l=n.differenceInCalendarDays(e.to,e.from);for(let u=0;u<=l;u++){if(i.some(f=>f(s)))return!0;s=n.addDays(s,1)}}return!1}function M0(e,t){const{disabled:n,excludeDisabled:r,selected:o,required:a,onSelect:i}=e,[s,l]=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?C0(p,u,g,v,a,t):void 0;return r&&n&&(y!=null&&y.from)&&y.to&&D0({from:y.from,to:y.to},n,t)&&(y.from=p,y.to=void 0),i||l(y),i==null||i(y,p,h,b),y},isSelected:p=>u&&Et(u,p,!1,t)}}function N0(e,t){const{selected:n,required:r,onSelect:o}=e,[a,i]=go(n,o?n:void 0),s=o?n:a,{isSameDay:l}=t;return{selected:s,select:(c,p,h)=>{let b=c;return!r&&s&&s&&l(c,s)&&(b=void 0),o||i(b),o==null||o(b,c,p,h),b},isSelected:c=>s?l(s,c):!1}}function k0(e,t){const n=N0(e,t),r=S0(e,t),o=M0(e,t);switch(e.mode){case"single":return n;case"multiple":return r;case"range":return o;default:return}}function Ou(e){var Pt;let t=e;t.timeZone&&(t={...e},t.today&&(t.today=new ze(t.today,t.timeZone)),t.month&&(t.month=new ze(t.month,t.timeZone)),t.defaultMonth&&(t.defaultMonth=new ze(t.defaultMonth,t.timeZone)),t.startMonth&&(t.startMonth=new ze(t.startMonth,t.timeZone)),t.endMonth&&(t.endMonth=new ze(t.endMonth,t.timeZone)),t.mode==="single"&&t.selected?t.selected=new ze(t.selected,t.timeZone):t.mode==="multiple"&&t.selected?t.selected=(Pt=t.selected)==null?void 0:Pt.map(q=>new ze(q,t.timeZone)):t.mode==="range"&&t.selected&&(t.selected={from:t.selected.from?new ze(t.selected.from,t.timeZone):void 0,to:t.selected.to?new ze(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:Px(t.components),formatters:zx(t.formatters),labels:{...a0,...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:l,mode:u,navLayout:f,numberOfMonths:c=1,onDayBlur:p,onDayClick:h,onDayFocus:b,onDayKeyDown:g,onDayMouseEnter:v,onDayMouseLeave:y,onNextClick:w,onPrevClick:C,showWeekNumber:D,styles:E}=t,{formatCaption:R,formatDay:S,formatMonthDropdown:k,formatWeekNumber:I,formatWeekNumberHeader:j,formatWeekdayName:L,formatYearDropdown:V}=r,B=b0(t,a),{days:P,months:O,navStart:M,navEnd:A,previousMonth:N,nextMonth:_,goToMonth:Y}=B,H=ox(P,t,M,A,a),{isSelected:T,select:$,selected:z}=k0(t,a)??{},{blur:U,focused:G,isFocusTarget:W,moveFocus:Q,setFocused:K}=x0(t,B,H,T??(()=>!1),a),{labelDayButton:Z,labelGridcell:se,labelGrid:ie,labelMonthDropdown:be,labelNav:ee,labelPrevious:Ae,labelNext:Ie,labelWeekday:Ee,labelWeekNumber:Ge,labelWeekNumberHeader:Ce,labelYearDropdown:Xe}=o,_t=x.useMemo(()=>Gx(a,t.ISOWeek),[a,t.ISOWeek]),Oe=u!==void 0||h!==void 0,re=x.useCallback(()=>{N&&(Y(N),C==null||C(N))},[N,Y,C]),pe=x.useCallback(()=>{_&&(Y(_),w==null||w(_))},[Y,_,w]),Te=x.useCallback((q,ce)=>ae=>{ae.preventDefault(),ae.stopPropagation(),K(q),$==null||$(q.date,ce,ae),h==null||h(q.date,ce,ae)},[$,h,K]),Fe=x.useCallback((q,ce)=>ae=>{K(q),b==null||b(q.date,ce,ae)},[b,K]),Ye=x.useCallback((q,ce)=>ae=>{U(),p==null||p(q.date,ce,ae)},[U,p]),at=x.useCallback((q,ce)=>ae=>{const me={ArrowLeft:[ae.shiftKey?"month":"day",t.dir==="rtl"?"after":"before"],ArrowRight:[ae.shiftKey?"month":"day",t.dir==="rtl"?"before":"after"],ArrowDown:[ae.shiftKey?"year":"week","after"],ArrowUp:[ae.shiftKey?"year":"week","before"],PageUp:[ae.shiftKey?"year":"month","before"],PageDown:[ae.shiftKey?"year":"month","after"],Home:["startOfWeek","before"],End:["endOfWeek","after"]};if(me[ae.key]){ae.preventDefault(),ae.stopPropagation();const[ge,oe]=me[ae.key];Q(ge,oe)}g==null||g(q.date,ce,ae)},[Q,g,t.dir]),qt=x.useCallback((q,ce)=>ae=>{v==null||v(q.date,ce,ae)},[v]),st=x.useCallback((q,ce)=>ae=>{y==null||y(q.date,ce,ae)},[y]),cn=x.useCallback(q=>ce=>{const ae=Number(ce.target.value),me=a.setMonth(a.startOfMonth(q),ae);Y(me)},[a,Y]),qe=x.useCallback(q=>ce=>{const ae=Number(ce.target.value),me=a.setYear(a.startOfMonth(q),ae);Y(me)},[a,Y]),{className:ln,style:An}=x.useMemo(()=>({className:[s[le.Root],t.className].filter(Boolean).join(" "),style:{...E==null?void 0:E[le.Root],...t.style}}),[s,t.className,t.style,E]),un=Ax(t),Vt=x.useRef(null);l0(Vt,!!t.animate,{classNames:s,months:O,focused:G,dateLib:a});const In={dayPickerProps:t,selected:z,select:$,isSelected:T,months:O,nextMonth:_,previousMonth:N,goToMonth:Y,getModifiers:H,components:n,classNames:s,styles:E,labels:o,formatters:r};return x.createElement(Eu.Provider,{value:In},x.createElement(n.Root,{rootRef:t.animate?Vt:void 0,className:ln,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"],...un},x.createElement(n.Months,{className:s[le.Months],style:E==null?void 0:E[le.Months]},!t.hideNavigation&&!f&&x.createElement(n.Nav,{"data-animated-nav":t.animate?"true":void 0,className:s[le.Nav],style:E==null?void 0:E[le.Nav],"aria-label":ee(),onPreviousClick:re,onNextClick:pe,previousMonth:N,nextMonth:_}),O.map((q,ce)=>{const ae=Hx(q.date,M,A,r,a),me=qx(M,A,r,a);return x.createElement(n.Month,{"data-animated-month":t.animate?"true":void 0,className:s[le.Month],style:E==null?void 0:E[le.Month],key:ce,displayIndex:ce,calendarMonth:q},f==="around"&&!t.hideNavigation&&ce===0&&x.createElement(n.PreviousMonthButton,{type:"button",className:s[le.PreviousMonthButton],tabIndex:N?void 0:-1,"aria-disabled":N?void 0:!0,"aria-label":Ae(N),onClick:re,"data-animated-button":t.animate?"true":void 0},x.createElement(n.Chevron,{disabled:N?void 0:!0,className:s[le.Chevron],orientation:t.dir==="rtl"?"right":"left"})),x.createElement(n.MonthCaption,{"data-animated-caption":t.animate?"true":void 0,className:s[le.MonthCaption],style:E==null?void 0:E[le.MonthCaption],calendarMonth:q,displayIndex:ce},l!=null&&l.startsWith("dropdown")?x.createElement(n.DropdownNav,{className:s[le.Dropdowns],style:E==null?void 0:E[le.Dropdowns]},l==="dropdown"||l==="dropdown-months"?x.createElement(n.MonthsDropdown,{className:s[le.MonthsDropdown],"aria-label":be(),classNames:s,components:n,disabled:!!t.disableNavigation,onChange:cn(q.date),options:ae,style:E==null?void 0:E[le.Dropdown],value:a.getMonth(q.date)}):x.createElement("span",null,k(q.date,a)),l==="dropdown"||l==="dropdown-years"?x.createElement(n.YearsDropdown,{className:s[le.YearsDropdown],"aria-label":Xe(a.options),classNames:s,components:n,disabled:!!t.disableNavigation,onChange:qe(q.date),options:me,style:E==null?void 0:E[le.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"}},R(q.date,a.options,a))):x.createElement(n.CaptionLabel,{className:s[le.CaptionLabel],role:"status","aria-live":"polite"},R(q.date,a.options,a))),f==="around"&&!t.hideNavigation&&ce===c-1&&x.createElement(n.NextMonthButton,{type:"button",className:s[le.NextMonthButton],tabIndex:_?void 0:-1,"aria-disabled":_?void 0:!0,"aria-label":Ie(_),onClick:pe,"data-animated-button":t.animate?"true":void 0},x.createElement(n.Chevron,{disabled:_?void 0:!0,className:s[le.Chevron],orientation:t.dir==="rtl"?"left":"right"})),ce===c-1&&f==="after"&&!t.hideNavigation&&x.createElement(n.Nav,{"data-animated-nav":t.animate?"true":void 0,className:s[le.Nav],style:E==null?void 0:E[le.Nav],"aria-label":ee(),onPreviousClick:re,onNextClick:pe,previousMonth:N,nextMonth:_}),x.createElement(n.MonthGrid,{role:"grid","aria-multiselectable":u==="multiple"||u==="range","aria-label":ie(q.date,a.options,a)||void 0,className:s[le.MonthGrid],style:E==null?void 0:E[le.MonthGrid]},!t.hideWeekdays&&x.createElement(n.Weekdays,{"data-animated-weekdays":t.animate?"true":void 0,className:s[le.Weekdays],style:E==null?void 0:E[le.Weekdays]},D&&x.createElement(n.WeekNumberHeader,{"aria-label":Ce(a.options),className:s[le.WeekNumberHeader],style:E==null?void 0:E[le.WeekNumberHeader],scope:"col"},j()),_t.map((ge,oe)=>x.createElement(n.Weekday,{"aria-label":Ee(ge,a.options,a),className:s[le.Weekday],key:oe,style:E==null?void 0:E[le.Weekday],scope:"col"},L(ge,a.options,a)))),x.createElement(n.Weeks,{"data-animated-weeks":t.animate?"true":void 0,className:s[le.Weeks],style:E==null?void 0:E[le.Weeks]},q.weeks.map((ge,oe)=>x.createElement(n.Week,{className:s[le.Week],key:ge.weekNumber,style:E==null?void 0:E[le.Week],week:ge},D&&x.createElement(n.WeekNumber,{week:ge,style:E==null?void 0:E[le.WeekNumber],"aria-label":Ge(ge.weekNumber,{locale:i}),className:s[le.WeekNumber],scope:"row",role:"rowheader"},I(ge.weekNumber,a)),ge.days.map(de=>{const{date:ve}=de,ue=H(de);if(ue[Me.focused]=!ue.hidden&&!!(G!=null&&G.isEqualTo(de)),ue[lt.selected]=(T==null?void 0:T(ve))||ue.selected,rs(z)){const{from:Ze,to:We}=z;ue[lt.range_start]=!!(Ze&&We&&a.isSameDay(ve,Ze)),ue[lt.range_end]=!!(Ze&&We&&a.isSameDay(ve,We)),ue[lt.range_middle]=Et(z,ve,!0,a)}const Ve=Ux(ue,E,t.modifiersStyles),we=ax(ue,s,t.modifiersClassNames),Se=!Oe&&!ue.hidden?se(ve,ue,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:ue,className:we.join(" "),style:Ve,role:"gridcell","aria-selected":ue.selected||void 0,"aria-label":Se,"data-day":a.format(ve,"yyyy-MM-dd"),"data-month":de.outside?a.format(ve,"yyyy-MM"):void 0,"data-selected":ue.selected||void 0,"data-disabled":ue.disabled||void 0,"data-hidden":ue.hidden||void 0,"data-outside":de.outside||void 0,"data-focused":ue.focused||void 0,"data-today":ue.today||void 0},!ue.hidden&&Oe?x.createElement(n.DayButton,{className:s[le.DayButton],style:E==null?void 0:E[le.DayButton],type:"button",day:de,modifiers:ue,disabled:ue.disabled||void 0,tabIndex:W(de)?0:-1,"aria-label":Z(ve,ue,a.options,a),onClick:Te(de,ue),onBlur:Ye(de,ue),onFocus:Fe(de,ue),onKeyDown:at(de,ue),onMouseEnter:qt(de,ue),onMouseLeave:st(de,ue)},S(ve,a.options,a)):!ue.hidden&&S(de.date,a.options,a))}))))))})),t.footer&&x.createElement(n.Footer,{className:s[le.Footer],style:E==null?void 0:E[le.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:{}},R0=jr.exports,Ri;function Tu(){return Ri||(Ri=1,function(e,t){(function(n,r){e.exports=r()})(R0,function(){var n=1e3,r=6e4,o=36e5,a="millisecond",i="second",s="minute",l="hour",u="day",f="week",c="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(P){var O=["th","st","nd","rd"],M=P%100;return"["+P+(O[(M-20)%10]||O[M]||O[0])+"]"}},C=function(P,O,M){var A=String(P);return!A||A.length>=O?P:""+Array(O+1-A.length).join(M)+P},D={s:C,z:function(P){var O=-P.utcOffset(),M=Math.abs(O),A=Math.floor(M/60),N=M%60;return(O<=0?"+":"-")+C(A,2,"0")+":"+C(N,2,"0")},m:function P(O,M){if(O.date()<M.date())return-P(M,O);var A=12*(M.year()-O.year())+(M.month()-O.month()),N=O.clone().add(A,c),_=M-N<0,Y=O.clone().add(A+(_?-1:1),c);return+(-(A+(M-N)/(_?N-Y:Y-N))||0)},a:function(P){return P<0?Math.ceil(P)||0:Math.floor(P)},p:function(P){return{M:c,y:h,w:f,d:u,D:b,h:l,m:s,s:i,ms:a,Q:p}[P]||String(P||"").toLowerCase().replace(/s$/,"")},u:function(P){return P===void 0}},E="en",R={};R[E]=w;var S="$isDayjsObject",k=function(P){return P instanceof V||!(!P||!P[S])},I=function P(O,M,A){var N;if(!O)return E;if(typeof O=="string"){var _=O.toLowerCase();R[_]&&(N=_),M&&(R[_]=M,N=_);var Y=O.split("-");if(!N&&Y.length>1)return P(Y[0])}else{var H=O.name;R[H]=O,N=H}return!A&&N&&(E=N),N||!A&&E},j=function(P,O){if(k(P))return P.clone();var M=typeof O=="object"?O:{};return M.date=P,M.args=arguments,new V(M)},L=D;L.l=I,L.i=k,L.w=function(P,O){return j(P,{locale:O.$L,utc:O.$u,x:O.$x,$offset:O.$offset})};var V=function(){function P(M){this.$L=I(M.locale,null,!0),this.parse(M),this.$x=this.$x||M.x||{},this[S]=!0}var O=P.prototype;return O.parse=function(M){this.$d=function(A){var N=A.date,_=A.utc;if(N===null)return new Date(NaN);if(L.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 _?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)}(M),this.init()},O.init=function(){var M=this.$d;this.$y=M.getFullYear(),this.$M=M.getMonth(),this.$D=M.getDate(),this.$W=M.getDay(),this.$H=M.getHours(),this.$m=M.getMinutes(),this.$s=M.getSeconds(),this.$ms=M.getMilliseconds()},O.$utils=function(){return L},O.isValid=function(){return this.$d.toString()!==g},O.isSame=function(M,A){var N=j(M);return this.startOf(A)<=N&&N<=this.endOf(A)},O.isAfter=function(M,A){return j(M)<this.startOf(A)},O.isBefore=function(M,A){return this.endOf(A)<j(M)},O.$g=function(M,A,N){return L.u(M)?this[A]:this.set(N,M)},O.unix=function(){return Math.floor(this.valueOf()/1e3)},O.valueOf=function(){return this.$d.getTime()},O.startOf=function(M,A){var N=this,_=!!L.u(A)||A,Y=L.p(M),H=function(K,Z){var se=L.w(N.$u?Date.UTC(N.$y,Z,K):new Date(N.$y,Z,K),N);return _?se:se.endOf(u)},T=function(K,Z){return L.w(N.toDate()[K].apply(N.toDate("s"),(_?[0,0,0,0]:[23,59,59,999]).slice(Z)),N)},$=this.$W,z=this.$M,U=this.$D,G="set"+(this.$u?"UTC":"");switch(Y){case h:return _?H(1,0):H(31,11);case c:return _?H(1,z):H(0,z+1);case f:var W=this.$locale().weekStart||0,Q=($<W?$+7:$)-W;return H(_?U-Q:U+(6-Q),z);case u:case b:return T(G+"Hours",0);case l:return T(G+"Minutes",1);case s:return T(G+"Seconds",2);case i:return T(G+"Milliseconds",3);default:return this.clone()}},O.endOf=function(M){return this.startOf(M,!1)},O.$set=function(M,A){var N,_=L.p(M),Y="set"+(this.$u?"UTC":""),H=(N={},N[u]=Y+"Date",N[b]=Y+"Date",N[c]=Y+"Month",N[h]=Y+"FullYear",N[l]=Y+"Hours",N[s]=Y+"Minutes",N[i]=Y+"Seconds",N[a]=Y+"Milliseconds",N)[_],T=_===u?this.$D+(A-this.$W):A;if(_===c||_===h){var $=this.clone().set(b,1);$.$d[H](T),$.init(),this.$d=$.set(b,Math.min(this.$D,$.daysInMonth())).$d}else H&&this.$d[H](T);return this.init(),this},O.set=function(M,A){return this.clone().$set(M,A)},O.get=function(M){return this[L.p(M)]()},O.add=function(M,A){var N,_=this;M=Number(M);var Y=L.p(A),H=function(z){var U=j(_);return L.w(U.date(U.date()+Math.round(z*M)),_)};if(Y===c)return this.set(c,this.$M+M);if(Y===h)return this.set(h,this.$y+M);if(Y===u)return H(1);if(Y===f)return H(7);var T=(N={},N[s]=r,N[l]=o,N[i]=n,N)[Y]||1,$=this.$d.getTime()+M*T;return L.w($,this)},O.subtract=function(M,A){return this.add(-1*M,A)},O.format=function(M){var A=this,N=this.$locale();if(!this.isValid())return N.invalidDate||g;var _=M||"YYYY-MM-DDTHH:mm:ssZ",Y=L.z(this),H=this.$H,T=this.$m,$=this.$M,z=N.weekdays,U=N.months,G=N.meridiem,W=function(Z,se,ie,be){return Z&&(Z[se]||Z(A,_))||ie[se].slice(0,be)},Q=function(Z){return L.s(H%12||12,Z,"0")},K=G||function(Z,se,ie){var be=Z<12?"AM":"PM";return ie?be.toLowerCase():be};return _.replace(y,function(Z,se){return se||function(ie){switch(ie){case"YY":return String(A.$y).slice(-2);case"YYYY":return L.s(A.$y,4,"0");case"M":return $+1;case"MM":return L.s($+1,2,"0");case"MMM":return W(N.monthsShort,$,U,3);case"MMMM":return W(U,$);case"D":return A.$D;case"DD":return L.s(A.$D,2,"0");case"d":return String(A.$W);case"dd":return W(N.weekdaysMin,A.$W,z,2);case"ddd":return W(N.weekdaysShort,A.$W,z,3);case"dddd":return z[A.$W];case"H":return String(H);case"HH":return L.s(H,2,"0");case"h":return Q(1);case"hh":return Q(2);case"a":return K(H,T,!0);case"A":return K(H,T,!1);case"m":return String(T);case"mm":return L.s(T,2,"0");case"s":return String(A.$s);case"ss":return L.s(A.$s,2,"0");case"SSS":return L.s(A.$ms,3,"0");case"Z":return Y}return null}(Z)||Y.replace(":","")})},O.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},O.diff=function(M,A,N){var _,Y=this,H=L.p(A),T=j(M),$=(T.utcOffset()-this.utcOffset())*r,z=this-T,U=function(){return L.m(Y,T)};switch(H){case h:_=U()/12;break;case c:_=U();break;case p:_=U()/3;break;case f:_=(z-$)/6048e5;break;case u:_=(z-$)/864e5;break;case l:_=z/o;break;case s:_=z/r;break;case i:_=z/n;break;default:_=z}return N?_:L.a(_)},O.daysInMonth=function(){return this.endOf(c).$D},O.$locale=function(){return R[this.$L]},O.locale=function(M,A){if(!M)return this.$L;var N=this.clone(),_=I(M,A,!0);return _&&(N.$L=_),N},O.clone=function(){return L.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()},P}(),B=V.prototype;return j.prototype=B,[["$ms",a],["$s",i],["$m",s],["$H",l],["$W",u],["$M",c],["$y",h],["$D",b]].forEach(function(P){B[P[1]]=function(O){return this.$g(O,P[0],P[1])}}),j.extend=function(P,O){return P.$i||(P(O,V,j),P.$i=!0),j},j.locale=I,j.isDayjs=k,j.unix=function(P){return j(1e3*P)},j.en=R[E],j.Ls=R,j.p={},j})}(jr)),jr.exports}var O0=Tu();const Mt=as(O0);var $r={exports:{}},T0=$r.exports,Oi;function _0(){return Oi||(Oi=1,function(e,t){(function(n,r){e.exports=r()})(T0,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(l){l===void 0&&(l="YYYY-MM-DDTHH:mm:ssZ");var u=this.$locale().formats,f=function(c,p){return c.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,C){return w||C.slice(1)})})}(l,u===void 0?{}:u);return s.call(this,f)}}})}($r)),$r.exports}var P0=_0();const _u=as(P0);var Lr={exports:{}},A0=Lr.exports,Ti;function I0(){return Ti||(Ti=1,function(e,t){(function(n,r){e.exports=r(Tu())})(A0,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}I0();function j0({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},(c,p)=>a-100+p),s=c=>{const p=new Date(e);p.setMonth(Number.parseInt(c)),t(p)},l=c=>{const p=new Date(e);p.setFullYear(Number.parseInt(c)),t(p)},u=()=>{const c=new Date(e);c.setMonth(c.getMonth()-1),t(c)},f=()=>{const c=new Date(e);c.setMonth(c.getMonth()+1),t(c)};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(Sc,{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(Ca,{})}),m.jsx(Gr,{children:o.map((c,p)=>m.jsx(qr,{value:p.toString(),children:c},c))})]}),m.jsxs(Sa,{value:n.toString(),onValueChange:l,children:[m.jsx(Ur,{className:"w-20 h-8 text-sm",children:m.jsx(Ca,{})}),m.jsx(Gr,{className:"max-h-[200px]",children:i.map(c=>m.jsx(qr,{value:c.toString(),children:c},c))})]})]}),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:l,maxDate:u,disabled:f,readOnly:c,locale:p="en",showOutsideDays:h,dayPickerProps:b,month:g,onMonthChange:v,open:y,onOpenChange:w,...C})=>{const[D,E]=x.useState(!1),R=y!==void 0?y:D,S=w||E,k=g??a??new Date,I=j=>{j&&(!a||j.getTime()!==a.getTime())&&(i==null||i(j),S(!1))};return Mt.locale(p),m.jsxs("div",{className:F("space-y-1",s),...C,children:[e&&m.jsxs(an,{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:F("w-full flex justify-between items-center font-normal",!a&&"text-muted-foreground",r&&"border border-red-500 focus:ring-red-500"),disabled:f,"aria-readonly":c,children:[m.jsx("span",{className:F("text-left",!a&&"text-muted-foreground"),children:a?Mt(a).locale(p).format("LL"):t}),m.jsx(xc,{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(j0,{month:k,onMonthChange:v??(()=>{})}),m.jsx("div",{className:"p-3",children:m.jsx(Ou,{mode:"single",selected:a,onSelect:I,month:k,onMonthChange:v,fromDate:l,toDate:u,showOutsideDays:h,className:"p-0",classNames:{months:"flex flex-col sm:flex-row space-y-4 sm:space-x-4 sm:space-y-0",month:"space-y-4",caption:"hidden",caption_label:"text-sm font-medium",nav:"hidden",nav_button:"h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100",nav_button_previous:"absolute left-1 top-1",nav_button_next:"absolute right-1 top-1",table:"w-full border-collapse space-y-1",head_row:"flex",head_cell:"text-muted-foreground rounded-md w-9 font-normal text-[0.8rem]",row:"flex w-full mt-2",cell:"h-9 w-9 text-center text-sm p-0 relative [&:has([aria-selected].day-range-end)]:rounded-r-md [&:has([aria-selected].day-outside)]:bg-accent/50 [&:has([aria-selected])]:bg-accent first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md focus-within:relative focus-within:z-20",day:"h-9 w-9 p-0 font-normal aria-selected:opacity-100 hover:bg-accent hover:text-accent-foreground rounded-md transition-colors",day_range_end:"day-range-end",day_selected:"bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground",day_today:"bg-accent text-accent-foreground",day_outside:"day-outside text-muted-foreground opacity-50 aria-selected:bg-accent/50 aria-selected:text-muted-foreground aria-selected:opacity-30",day_disabled:"text-muted-foreground opacity-50",day_range_middle:"aria-selected:bg-accent aria-selected:text-accent-foreground",day_hidden:"invisible"},...b})})]})})]}),(n||r)&&m.jsx("p",{className:F("text-xs",r?"text-red-500":"text-gray-500"),children:r||n})]})};function $0({className:e,classNames:t,showOutsideDays:n=!0,captionLayout:r="label",buttonVariant:o="ghost",formatters:a,components:i,...s}){const l=os();return m.jsx(Ou,{showOutsideDays:n,className:F("bg-background group/calendar p-3 [--cell-size:2rem] [[data-slot=card-content]_&]:bg-transparent [[data-slot=popover-content]_&]:bg-transparent",String.raw`rtl:**:[.rdp-button\_next>svg]:rotate-180`,String.raw`rtl:**:[.rdp-button\_previous>svg]:rotate-180`,e),captionLayout:r,formatters:{formatMonthDropdown:u=>u.toLocaleString("default",{month:"short"}),...a},classNames:{root:F("w-fit",l.root),months:F("relative flex flex-col gap-4 md:flex-row",l.months),month:F("flex w-full flex-col gap-4",l.month),nav:F("absolute inset-x-0 top-0 flex w-full items-center justify-between gap-1",l.nav),button_previous:F(ca({variant:o}),"h-[--cell-size] w-[--cell-size] select-none p-0 aria-disabled:opacity-50",l.button_previous),button_next:F(ca({variant:o}),"h-[--cell-size] w-[--cell-size] select-none p-0 aria-disabled:opacity-50",l.button_next),month_caption:F("flex h-[--cell-size] w-full items-center justify-center px-[--cell-size]",l.month_caption),dropdowns:F("flex h-[--cell-size] w-full items-center justify-center gap-1.5 text-sm font-medium",l.dropdowns),dropdown_root:F("has-focus:border-ring border-input shadow-xs has-focus:ring-ring/50 has-focus:ring-[3px] relative rounded-md border",l.dropdown_root),dropdown:F("absolute inset-0 opacity-0",l.dropdown),caption_label:F("select-none font-medium",r==="label"?"text-sm":"[&>svg]:text-muted-foreground flex h-8 items-center gap-1 rounded-md pl-2 pr-1 text-sm [&>svg]:size-3.5",l.caption_label),table:"w-full border-collapse",weekdays:F("flex",l.weekdays),weekday:F("text-muted-foreground flex-1 select-none rounded-md text-[0.8rem] font-normal",l.weekday),week:F("mt-2 flex w-full",l.week),week_number_header:F("w-[--cell-size] select-none",l.week_number_header),week_number:F("text-muted-foreground select-none text-[0.8rem]",l.week_number),day:F("group/day relative aspect-square h-full w-full select-none p-0 text-center [&:first-child[data-selected=true]_button]:rounded-l-md [&:last-child[data-selected=true]_button]:rounded-r-md",l.day),range_start:F("bg-accent rounded-l-md",l.range_start),range_middle:F("rounded-none",l.range_middle),range_end:F("bg-accent rounded-r-md",l.range_end),today:F("bg-accent text-accent-foreground rounded-md data-[selected=true]:rounded-none",l.today),outside:F("text-muted-foreground aria-selected:text-muted-foreground",l.outside),disabled:F("text-muted-foreground opacity-50",l.disabled),hidden:F("invisible",l.hidden),...t},components:{Root:({className:u,rootRef:f,...c})=>m.jsx("div",{"data-slot":"calendar",ref:f,className:F(u),...c}),Chevron:({className:u,orientation:f,...c})=>f==="left"?m.jsx(Sc,{className:F("size-4",u),...c}):f==="right"?m.jsx(La,{className:F("size-4",u),...c}):m.jsx(tr,{className:F("size-4",u),...c}),DayButton:L0,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 L0({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 Fr={exports:{}},F0=Fr.exports,_i;function W0(){return _i||(_i=1,function(e,t){(function(n,r){e.exports=r()})(F0,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]+/,l={},u=function(v){return(v=+v)+(v>68?1900:2e3)},f=function(v){return function(y){this[v]=+y}},c=[/[+-]\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),C=60*w[1]+(+w[2]||0);return C===0?0:w[0]==="+"?-C:C}(v)}],p=function(v){var y=l[v];return y&&(y.indexOf?y:y.s.concat(y.f))},h=function(v,y){var w,C=l.meridiem;if(C){for(var D=1;D<=24;D+=1)if(v.indexOf(C(D,0,y))>-1){w=D>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=l.ordinal,w=v.match(/\d+/);if(this.day=w[0],y)for(var C=1;C<=31;C+=1)y(C).replace(/\[|\]/g,"")===v&&(this.day=C)}],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(C){return C.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:c,ZZ:c};function g(v){var y,w;y=v,w=l&&l.formats;for(var C=(v=y.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(j,L,V){var B=V&&V.toUpperCase();return L||w[V]||n[V]||w[B].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(P,O,M){return O||M.slice(1)})})).match(r),D=C.length,E=0;E<D;E+=1){var R=C[E],S=b[R],k=S&&S[0],I=S&&S[1];C[E]=I?{regex:k,parser:I}:R.replace(/^\[|\]$/g,"")}return function(j){for(var L={},V=0,B=0;V<D;V+=1){var P=C[V];if(typeof P=="string")B+=P.length;else{var O=P.regex,M=P.parser,A=j.slice(B),N=O.exec(A)[0];M.call(L,N),j=j.replace(N,"")}}return function(_){var Y=_.afternoon;if(Y!==void 0){var H=_.hours;Y?H<12&&(_.hours+=12):H===12&&(_.hours=0),delete _.afternoon}}(L),L}}return function(v,y,w){w.p.customParseFormat=!0,v&&v.parseTwoDigitYear&&(u=v.parseTwoDigitYear);var C=y.prototype,D=C.parse;C.parse=function(E){var R=E.date,S=E.utc,k=E.args;this.$u=S;var I=k[1];if(typeof I=="string"){var j=k[2]===!0,L=k[3]===!0,V=j||L,B=k[2];L&&(B=k[2]),l=this.$locale(),!j&&B&&(l=w.Ls[B]),this.$d=function(A,N,_,Y){try{if(["x","X"].indexOf(N)>-1)return new Date((N==="X"?1e3:1)*A);var H=g(N)(A),T=H.year,$=H.month,z=H.day,U=H.hours,G=H.minutes,W=H.seconds,Q=H.milliseconds,K=H.zone,Z=H.week,se=new Date,ie=z||(T||$?1:se.getDate()),be=T||se.getFullYear(),ee=0;T&&!$||(ee=$>0?$-1:se.getMonth());var Ae,Ie=U||0,Ee=G||0,Ge=W||0,Ce=Q||0;return K?new Date(Date.UTC(be,ee,ie,Ie,Ee,Ge,Ce+60*K.offset*1e3)):_?new Date(Date.UTC(be,ee,ie,Ie,Ee,Ge,Ce)):(Ae=new Date(be,ee,ie,Ie,Ee,Ge,Ce),Z&&(Ae=Y(Ae).week(Z).toDate()),Ae)}catch{return new Date("")}}(R,I,S,w),this.init(),B&&B!==!0&&(this.$L=this.locale(B).$L),V&&R!=this.format(I)&&(this.$d=new Date("")),l={}}else if(I instanceof Array)for(var P=I.length,O=1;O<=P;O+=1){k[1]=I[O-1];var M=w.apply(this,k);if(M.isValid()){this.$d=M.$d,this.$L=M.$L,this.init();break}O===P&&(this.$d=new Date(""))}else D.call(this,E)}}})}(Fr)),Fr.exports}var B0=W0();const Y0=as(B0);Mt.extend(Y0);Mt.extend(_u);const z0={"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-]$/}},H0=({label:e,placeholder:t,helperText:n,required:r,value:o,onSelect:a,className:i,minDate:s,maxDate:l,disabled:u,readOnly:f,locale:c="en",inputClassName:p,dateFormat:h="DD/MM/YYYY"})=>{const[b,g]=d.useState(!1),[v,y]=d.useState(""),[w,C]=d.useState(o),D=d.useMemo(()=>h,[h]),E=d.useMemo(()=>z0[D],[D]),R=d.useMemo(()=>t||D.toLowerCase(),[t,D]),S=d.useCallback(P=>{const O=P.replace(/\D/g,""),{separator:M}=E;if(O.length<=2)return O;switch(D){case"MM/DD/YYYY":case"DD/MM/YYYY":return O.length<=4?`${O.substring(0,2)}${M}${O.substring(2)}`:`${O.substring(0,2)}${M}${O.substring(2,4)}${M}${O.substring(4,8)}`;case"YYYY-MM-DD":return O.length<=4?O:O.length<=6?`${O.substring(0,4)}${M}${O.substring(4)}`:`${O.substring(0,4)}${M}${O.substring(4,6)}${M}${O.substring(6,8)}`;case"DD-MM-YYYY":return O.length<=4?`${O.substring(0,2)}${M}${O.substring(2)}`:`${O.substring(0,2)}${M}${O.substring(2,4)}${M}${O.substring(4,8)}`;default:return P}},[D,E]),k=d.useMemo(()=>P=>{const O=P.trim();return O&&Mt(O,D,!0).isValid()?Mt(O,D):null},[D]),I=d.useCallback(P=>Mt(P).format(D),[D]);d.useEffect(()=>{y(o?I(o):""),C(o),Mt.locale(c)},[o,c,I]);const j=d.useCallback(P=>{let O=P.target.value;if(y(O),!O.trim()){C(void 0),a==null||a(void 0);return}const M=S(O);M!==O&&O.replace(/\D/g,"").length>1&&(y(M),O=M);const A=k(O);if(A!=null&&A.isValid()){const N=A.toDate();(!s||N>=s)&&(!l||N<=l)&&(C(N),a==null||a(N))}},[S,k,a,s,l]),L=d.useCallback(()=>{w&&y(I(w))},[w,I]),V=d.useCallback(P=>{P&&(y(I(P)),C(P),a==null||a(P),g(!1))},[a,I]),B=d.useCallback(P=>{if(!["Backspace","Delete","Tab","Enter","ArrowLeft","ArrowRight","ArrowUp","ArrowDown"].includes(P.key)&&!E.pattern.test(P.key)&&!P.ctrlKey&&!P.metaKey){P.preventDefault();return}P.key==="Enter"&&(P.preventDefault(),L())},[E.pattern,L]);return m.jsxs("div",{className:F("space-y-1",i),children:[e&&m.jsxs(an,{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:b,onOpenChange:g,children:[m.jsxs("div",{className:F("w-60 relative",p),children:[m.jsx(on,{type:"text",value:v,onChange:j,onBlur:L,onKeyDown:B,placeholder:R,disabled:u,readOnly:f,className:"w-full pr-12"}),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:()=>g(P=>!P),disabled:u||f,"aria-label":"Open calendar",children:m.jsx(xc,{strokeWidth:1,className:"h-5 w-5"})})})]}),m.jsx(fo,{className:"w-auto p-0",align:"start",children:m.jsx($0,{mode:"single",selected:w,onSelect:V,fromDate:s,toDate:l})})]}),n&&m.jsx("p",{className:"text-xs text-gray-500",children:n})]})};function Cn({label:e,placeholder:t="Select option",options:n,value:r,leadingIcon:o,helperText:a,error:i,required:s,onValueChange:l,className:u,variant:f="default",disabled:c=!1}){return m.jsxs("div",{className:F("space-y-1",u),children:[e&&m.jsxs(an,{className:F("text-sm font-medium",c?"text-gray-400":"text-gray-700"),children:[e,s&&m.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),m.jsxs(Sa,{value:r,onValueChange:l,disabled:c,children:[m.jsx(Ur,{className:F("border-input focus-within:ring-primary",i&&"border-red-500 focus-within:ring-red-500",f==="gray"&&"bg-gray-100 border-gray-300 text-gray-700",c&&"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(Ca,{placeholder:t})]})}),m.jsx(Gr,{children:n.map(p=>m.jsx(qr,{value:p.value,children:p.label},p.value))})]}),(a||i)&&m.jsx("p",{className:F("text-xs",i?"text-red-500":c?"text-gray-400":"text-gray-500"),children:i||a})]})}const U0=({label:e,variant:t="filled",color:n="default",size:r="medium",deletable:o=!1,onDelete:a,onClick:i,icon:s,avatar:l,disabled:u=!1,className:f="",...c})=>{const p="inline-flex items-center gap-1 font-medium transition-all duration-200 focus:outline-none focus:ring-2 focus:ring-offset-2",h={small:"px-2 py-0.5 text-xs rounded-full",medium:"px-3 py-1 text-sm rounded-full",large:"px-4 py-1.5 text-base rounded-full"},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-red-500 text-red-600 hover:bg-red-50"}},g=u?"opacity-50 cursor-not-allowed":"cursor-pointer",v=i&&!u?"hover:shadow-md":"",y=`
171
+ `)},kb=0,pn=[];function Rb(e){var t=d.useRef([]),n=d.useRef([0,0]),r=d.useRef(),o=d.useState(kb++)[0],a=d.useState(tl)[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=Xv([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=Nr(g),w=n.current,C="deltaX"in g?g.deltaX:w[0]-y[0],D="deltaY"in g?g.deltaY:w[1]-y[1],E,R=g.target,S=Math.abs(C)>Math.abs(D)?"h":"v";if("touches"in g&&S==="h"&&R.type==="range")return!1;var k=di(S,R);if(!k)return!0;if(k?E=S:(E=S==="v"?"h":"v",k=di(S,R)),!k)return!1;if(!r.current&&"changedTouches"in g&&(C||D)&&(r.current=E),!E)return!0;var I=r.current||E;return Db(I,v,g,I==="h"?C:D)},[]),c=d.useCallback(function(g){var v=g;if(!(!pn.length||pn[pn.length-1]!==a)){var y="deltaY"in v?fi(v):Nr(v),w=t.current.filter(function(E){return E.name===v.type&&(E.target===v.target||v.target===E.shadowParent)&&Mb(E.delta,y)})[0];if(w&&w.should){v.cancelable&&v.preventDefault();return}if(!w){var C=(i.current.shards||[]).map(mi).filter(Boolean).filter(function(E){return E.contains(v.target)}),D=C.length>0?s(v,C[0]):!i.current.noIsolation;D&&v.cancelable&&v.preventDefault()}}},[]),u=d.useCallback(function(g,v,y,w){var C={name:g,delta:v,target:y,should:w,shadowParent:Ob(y)};t.current.push(C),setTimeout(function(){t.current=t.current.filter(function(D){return D!==C})},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 pn.push(a),e.setCallbacks({onScrollCapture:l,onWheelCapture:l,onTouchMoveCapture:p}),document.addEventListener("wheel",c,mn),document.addEventListener("touchmove",c,mn),document.addEventListener("touchstart",f,mn),function(){pn=pn.filter(function(g){return g!==a}),document.removeEventListener("wheel",c,mn),document.removeEventListener("touchmove",c,mn),document.removeEventListener("touchstart",f,mn)}},[]);var h=e.removeScrollBar,b=e.inert;return d.createElement(d.Fragment,null,b?d.createElement(a,{styles:Nb(o)}):null,h?d.createElement(bb,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Ob(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Tb=ab(el,Rb);var cr=d.forwardRef(function(e,t){return d.createElement(lo,gt({},e,{ref:t,sideCar:Tb}))});cr.classNames=lo.classNames;var uo="Popover",[al,wM]=He(uo,[Yt]),lr=Yt(),[_b,zt]=al(uo),sl=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]=rt({prop:r,defaultProp:o??!1,onChange:a,caller:uo});return m.jsx(ar,{...s,children:m.jsx(_b,{scope:t,contentId:Re(),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})})};sl.displayName=uo;var il="PopoverAnchor",Pb=d.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=zt(il,n),a=lr(n),{onCustomAnchorAdd:i,onCustomAnchorRemove:s}=o;return d.useEffect(()=>(i(),()=>s()),[i,s]),m.jsx(sr,{...a,...r,ref:t})});Pb.displayName=il;var cl="PopoverTrigger",ll=d.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=zt(cl,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":pl(o.open),...r,ref:i,onClick:X(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?s:m.jsx(sr,{asChild:!0,...a,children:s})});ll.displayName=cl;var Xa="PopoverPortal",[Ab,Ib]=al(Xa,{forceMount:void 0}),ul=e=>{const{__scopePopover:t,forceMount:n,children:r,container:o}=e,a=zt(Xa,t);return m.jsx(Ab,{scope:t,forceMount:n,children:m.jsx(ot,{present:n||a.open,children:m.jsx(ir,{asChild:!0,container:o,children:r})})})};ul.displayName=Xa;var xn="PopoverContent",dl=d.forwardRef((e,t)=>{const n=Ib(xn,e.__scopePopover),{forceMount:r=n.forceMount,...o}=e,a=zt(xn,e.__scopePopover);return m.jsx(ot,{present:r||a.open,children:a.modal?m.jsx($b,{...o,ref:t}):m.jsx(Lb,{...o,ref:t})})});dl.displayName=xn;var jb=Lt("PopoverContent.RemoveScroll"),$b=d.forwardRef((e,t)=>{const n=zt(xn,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:jb,allowPinchZoom:!0,children:m.jsx(fl,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:X(e.onCloseAutoFocus,i=>{var s;i.preventDefault(),a.current||(s=n.triggerRef.current)==null||s.focus()}),onPointerDownOutside:X(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:X(e.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1})})})}),Lb=d.forwardRef((e,t)=>{const n=zt(xn,e.__scopePopover),r=d.useRef(!1),o=d.useRef(!1);return m.jsx(fl,{...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()}})}),fl=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=zt(xn,n),h=lr(n);return Wa(),m.jsx(rr,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:a,children:m.jsx(Nc,{asChild:!0,disableOutsidePointerEvents:i,onInteractOutside:f,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:u,onDismiss:()=>p.onOpenChange(!1),children:m.jsx(so,{"data-state":pl(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)"}})})})}),ml="PopoverClose",Fb=d.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=zt(ml,n);return m.jsx(J.button,{type:"button",...r,ref:t,onClick:X(e.onClick,()=>o.onOpenChange(!1))})});Fb.displayName=ml;var Wb="PopoverArrow",Bb=d.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=lr(n);return m.jsx(io,{...o,...r,ref:t})});Bb.displayName=Wb;function pl(e){return e?"open":"closed"}var Yb=sl,zb=ll,Hb=ul,hl=dl;const Za=Yb,Qa=zb,fo=d.forwardRef(({className:e,sideOffset:t=4,...n},r)=>m.jsx(Hb,{children:m.jsx(hl,{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=hl.displayName;function pi(e,[t,n]){return Math.min(n,Math.max(t,e))}function Ja(e){const t=e+"CollectionProvider",[n,r]=He(t),[o,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),i=g=>{const{scope:v,children:y}=g,w=x.useRef(null),C=x.useRef(new Map).current;return m.jsx(o,{scope:v,itemMap:C,collectionRef:w,children:y})};i.displayName=t;const s=e+"CollectionSlot",c=Lt(s),u=x.forwardRef((g,v)=>{const{scope:y,children:w}=g,C=a(s,y),D=fe(v,C.collectionRef);return m.jsx(c,{ref:D,children:w})});u.displayName=s;const f=e+"CollectionItemSlot",l="data-radix-collection-item",p=Lt(f),h=x.forwardRef((g,v)=>{const{scope:y,children:w,...C}=g,D=x.useRef(null),E=fe(v,D),R=a(f,y);return x.useEffect(()=>(R.itemMap.set(D,{ref:D,...C}),()=>void R.itemMap.delete(D))),m.jsx(p,{[l]:"",ref:E,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 C=Array.from(w.querySelectorAll(`[${l}]`));return Array.from(v.itemMap.values()).sort((R,S)=>C.indexOf(R.ref.current)-C.indexOf(S.ref.current))},[v.collectionRef,v.itemMap])}return[{Provider:i,Slot:u,ItemSlot:h},b,r]}var Ub=d.createContext(void 0);function ur(e){const t=d.useContext(Ub);return e||t||"ltr"}var Gb="DismissableLayer",ga="dismissableLayer.update",qb="dismissableLayer.pointerDownOutside",Vb="dismissableLayer.focusOutside",hi,gl=d.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),vl=d.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:i,onDismiss:s,...c}=e,u=d.useContext(gl),[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,C=u.layersWithOutsidePointerEventsDisabled.size>0,D=w>=y,E=Zb(S=>{const k=S.target,I=[...u.branches].some(j=>j.contains(k));!D||I||(o==null||o(S),i==null||i(S),S.defaultPrevented||s==null||s())},p),R=Qb(S=>{const k=S.target;[...u.branches].some(j=>j.contains(k))||(a==null||a(S),i==null||i(S),S.defaultPrevented||s==null||s())},p);return nr(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:C?D?"auto":"none":void 0,...e.style},onFocusCapture:X(e.onFocusCapture,R.onFocusCapture),onBlurCapture:X(e.onBlurCapture,R.onBlurCapture),onPointerDownCapture:X(e.onPointerDownCapture,E.onPointerDownCapture)})});vl.displayName=Gb;var Kb="DismissableLayerBranch",Xb=d.forwardRef((e,t)=>{const n=d.useContext(gl),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})});Xb.displayName=Kb;function Zb(e,t=globalThis==null?void 0:globalThis.document){const n=Pe(e),r=d.useRef(!1),o=d.useRef(()=>{});return d.useEffect(()=>{const a=s=>{if(s.target&&!r.current){let c=function(){bl(qb,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 Qb(e,t=globalThis==null?void 0:globalThis.document){const n=Pe(e),r=d.useRef(!1);return d.useEffect(()=>{const o=a=>{a.target&&!r.current&&bl(Vb,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 bl(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?Nn(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 yl=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"}),Jb="VisuallyHidden",wl=d.forwardRef((e,t)=>m.jsx(J.span,{...e,ref:t,style:{...yl,...e.style}}));wl.displayName=Jb;var ey=wl,ty=[" ","Enter","ArrowUp","ArrowDown"],ny=[" ","Enter"],en="Select",[mo,po,ry]=Ja(en),[Tn,xM]=He(en,[ry,Yt]),ho=Yt(),[oy,Ht]=Tn(en),[ay,sy]=Tn(en),xl=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,C]=d.useState(null),[D,E]=d.useState(!1),R=ur(u),[S,k]=rt({prop:r,defaultProp:o??!1,onChange:a,caller:en}),[I,j]=rt({prop:i,defaultProp:s,onChange:c,caller:en}),L=d.useRef(null),V=v?b||!!v.closest("form"):!0,[B,P]=d.useState(new Set),O=Array.from(B).map(M=>M.props.value).join(";");return m.jsx(ar,{...g,children:m.jsxs(oy,{required:h,scope:t,trigger:v,onTriggerChange:y,valueNode:w,onValueNodeChange:C,valueNodeHasChildren:D,onValueNodeHasChildrenChange:E,contentId:Re(),value:I,onValueChange:j,open:S,onOpenChange:k,dir:R,triggerPointerDownPosRef:L,disabled:p,children:[m.jsx(mo.Provider,{scope:t,children:m.jsx(ay,{scope:e.__scopeSelect,onNativeOptionAdd:d.useCallback(M=>{P(A=>new Set(A).add(M))},[]),onNativeOptionRemove:d.useCallback(M=>{P(A=>{const N=new Set(A);return N.delete(M),N})},[]),children:n})}),V?m.jsxs(Ul,{"aria-hidden":!0,required:h,tabIndex:-1,name:f,autoComplete:l,value:I,onChange:M=>j(M.target.value),disabled:p,form:b,children:[I===void 0?m.jsx("option",{value:""}):null,Array.from(B)]},O):null]})})};xl.displayName=en;var Sl="SelectTrigger",Cl=d.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,a=ho(n),i=Ht(Sl,n),s=i.disabled||r,c=fe(t,i.onTriggerChange),u=po(n),f=d.useRef("touch"),[l,p,h]=ql(g=>{const v=u().filter(C=>!C.disabled),y=v.find(C=>C.value===i.value),w=Vl(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(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":Gl(i.value)?"":void 0,...o,ref:c,onClick:X(o.onClick,g=>{g.currentTarget.focus(),f.current!=="mouse"&&b(g)}),onPointerDown:X(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:X(o.onKeyDown,g=>{const v=l.current!=="";!(g.ctrlKey||g.altKey||g.metaKey)&&g.key.length===1&&p(g.key),!(v&&g.key===" ")&&ty.includes(g.key)&&(b(),g.preventDefault())})})})});Cl.displayName=Sl;var El="SelectValue",Dl=d.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:a,placeholder:i="",...s}=e,c=Ht(El,n),{onValueNodeHasChildrenChange:u}=c,f=a!==void 0,l=fe(t,c.onValueNodeChange);return Ne(()=>{u(f)},[u,f]),m.jsx(J.span,{...s,ref:l,style:{pointerEvents:"none"},children:Gl(c.value)?m.jsx(m.Fragment,{children:i}):a})});Dl.displayName=El;var iy="SelectIcon",Ml=d.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return m.jsx(J.span,{"aria-hidden":!0,...o,ref:t,children:r||"▼"})});Ml.displayName=iy;var cy="SelectPortal",Nl=e=>m.jsx(ir,{asChild:!0,...e});Nl.displayName=cy;var tn="SelectContent",kl=d.forwardRef((e,t)=>{const n=Ht(tn,e.__scopeSelect),[r,o]=d.useState();if(Ne(()=>{o(new DocumentFragment)},[]),!n.open){const a=r;return a?eo.createPortal(m.jsx(Rl,{scope:e.__scopeSelect,children:m.jsx(mo.Slot,{scope:e.__scopeSelect,children:m.jsx("div",{children:e.children})})}),a):null}return m.jsx(Ol,{...e,ref:t})});kl.displayName=tn;var ct=10,[Rl,Ut]=Tn(tn),ly="SelectContentImpl",uy=Lt("SelectContent.RemoveScroll"),Ol=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=Ht(tn,n),[C,D]=d.useState(null),[E,R]=d.useState(null),S=fe(t,W=>D(W)),[k,I]=d.useState(null),[j,L]=d.useState(null),V=po(n),[B,P]=d.useState(!1),O=d.useRef(!1);d.useEffect(()=>{if(C)return co(C)},[C]),Wa();const M=d.useCallback(W=>{const[Q,...K]=V().map(ie=>ie.ref.current),[Z]=K.slice(-1),se=document.activeElement;for(const ie of W)if(ie===se||(ie==null||ie.scrollIntoView({block:"nearest"}),ie===Q&&E&&(E.scrollTop=0),ie===Z&&E&&(E.scrollTop=E.scrollHeight),ie==null||ie.focus(),document.activeElement!==se))return},[V,E]),A=d.useCallback(()=>M([k,C]),[M,k,C]);d.useEffect(()=>{B&&A()},[B,A]);const{onOpenChange:N,triggerPointerDownPosRef:_}=w;d.useEffect(()=>{if(C){let W={x:0,y:0};const Q=Z=>{var se,ie;W={x:Math.abs(Math.round(Z.pageX)-(((se=_.current)==null?void 0:se.x)??0)),y:Math.abs(Math.round(Z.pageY)-(((ie=_.current)==null?void 0:ie.y)??0))}},K=Z=>{W.x<=10&&W.y<=10?Z.preventDefault():C.contains(Z.target)||N(!1),document.removeEventListener("pointermove",Q),_.current=null};return _.current!==null&&(document.addEventListener("pointermove",Q),document.addEventListener("pointerup",K,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",Q),document.removeEventListener("pointerup",K,{capture:!0})}}},[C,N,_]),d.useEffect(()=>{const W=()=>N(!1);return window.addEventListener("blur",W),window.addEventListener("resize",W),()=>{window.removeEventListener("blur",W),window.removeEventListener("resize",W)}},[N]);const[Y,H]=ql(W=>{const Q=V().filter(se=>!se.disabled),K=Q.find(se=>se.ref.current===document.activeElement),Z=Vl(Q,W,K);Z&&setTimeout(()=>Z.ref.current.focus())}),T=d.useCallback((W,Q,K)=>{const Z=!O.current&&!K;(w.value!==void 0&&w.value===Q||Z)&&(I(W),Z&&(O.current=!0))},[w.value]),$=d.useCallback(()=>C==null?void 0:C.focus(),[C]),z=d.useCallback((W,Q,K)=>{const Z=!O.current&&!K;(w.value!==void 0&&w.value===Q||Z)&&L(W)},[w.value]),U=r==="popper"?va:Tl,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(Rl,{scope:n,content:C,viewport:E,onViewportChange:R,itemRefCallback:T,selectedItem:k,onItemLeave:$,itemTextRefCallback:z,focusSelectedItem:A,selectedItemText:j,position:r,isPositioned:B,searchRef:Y,children:m.jsx(cr,{as:uy,allowPinchZoom:!0,children:m.jsx(rr,{asChild:!0,trapped:w.open,onMountAutoFocus:W=>{W.preventDefault()},onUnmountAutoFocus:X(o,W=>{var Q;(Q=w.trigger)==null||Q.focus({preventScroll:!0}),W.preventDefault()}),children:m.jsx(vl,{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:()=>P(!0),ref:S,style:{display:"flex",flexDirection:"column",outline:"none",...y.style},onKeyDown:X(y.onKeyDown,W=>{const Q=W.ctrlKey||W.altKey||W.metaKey;if(W.key==="Tab"&&W.preventDefault(),!Q&&W.key.length===1&&H(W.key),["ArrowUp","ArrowDown","Home","End"].includes(W.key)){let Z=V().filter(se=>!se.disabled).map(se=>se.ref.current);if(["ArrowUp","End"].includes(W.key)&&(Z=Z.slice().reverse()),["ArrowUp","ArrowDown"].includes(W.key)){const se=W.target,ie=Z.indexOf(se);Z=Z.slice(ie+1)}setTimeout(()=>M(Z)),W.preventDefault()}})})})})})})});Ol.displayName=ly;var dy="SelectItemAlignedPosition",Tl=d.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,a=Ht(tn,n),i=Ut(tn,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,C=d.useCallback(()=>{if(a.trigger&&a.valueNode&&s&&u&&g&&v&&y){const S=a.trigger.getBoundingClientRect(),k=u.getBoundingClientRect(),I=a.valueNode.getBoundingClientRect(),j=y.getBoundingClientRect();if(a.dir!=="rtl"){const se=j.left-k.left,ie=I.left-se,be=S.left-ie,ee=S.width+be,Ae=Math.max(ee,k.width),Ie=window.innerWidth-ct,Ee=pi(ie,[ct,Math.max(ct,Ie-Ae)]);s.style.minWidth=ee+"px",s.style.left=Ee+"px"}else{const se=k.right-j.right,ie=window.innerWidth-I.right-se,be=window.innerWidth-S.right-ie,ee=S.width+be,Ae=Math.max(ee,k.width),Ie=window.innerWidth-ct,Ee=pi(ie,[ct,Math.max(ct,Ie-Ae)]);s.style.minWidth=ee+"px",s.style.right=Ee+"px"}const L=p(),V=window.innerHeight-ct*2,B=g.scrollHeight,P=window.getComputedStyle(u),O=parseInt(P.borderTopWidth,10),M=parseInt(P.paddingTop,10),A=parseInt(P.borderBottomWidth,10),N=parseInt(P.paddingBottom,10),_=O+M+B+N+A,Y=Math.min(v.offsetHeight*5,_),H=window.getComputedStyle(g),T=parseInt(H.paddingTop,10),$=parseInt(H.paddingBottom,10),z=S.top+S.height/2-ct,U=V-z,G=v.offsetHeight/2,W=v.offsetTop+G,Q=O+M+W,K=_-Q;if(Q<=z){const se=L.length>0&&v===L[L.length-1].ref.current;s.style.bottom="0px";const ie=u.clientHeight-g.offsetTop-g.offsetHeight,be=Math.max(U,G+(se?$:0)+ie+A),ee=Q+be;s.style.height=ee+"px"}else{const se=L.length>0&&v===L[0].ref.current;s.style.top="0px";const be=Math.max(z,O+g.offsetTop+(se?T:0)+G)+K;s.style.height=be+"px",g.scrollTop=Q-z+g.offsetTop}s.style.margin=`${ct}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]);Ne(()=>C(),[C]);const[D,E]=d.useState();Ne(()=>{u&&E(window.getComputedStyle(u).zIndex)},[u]);const R=d.useCallback(S=>{S&&b.current===!0&&(C(),w==null||w(),b.current=!1)},[C,w]);return m.jsx(my,{scope:n,contentWrapper:s,shouldExpandOnScrollRef:h,onScrollButtonChange:R,children:m.jsx("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:D},children:m.jsx(J.div,{...o,ref:l,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});Tl.displayName=dy;var fy="SelectPopperPosition",va=d.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=ct,...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=fy;var[my,ts]=Tn(tn,{}),ba="SelectViewport",_l=d.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...o}=e,a=Ut(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:X(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-ct*2,g=parseFloat(l.style.minHeight),v=parseFloat(l.style.height),y=Math.max(g,v);if(y<b){const w=y+h,C=Math.min(b,w),D=w-C;l.style.height=C+"px",l.style.bottom==="0px"&&(f.scrollTop=D>0?D:0,l.style.justifyContent="flex-end")}}}c.current=f.scrollTop})})})]})});_l.displayName=ba;var Pl="SelectGroup",[py,hy]=Tn(Pl),gy=d.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Re();return m.jsx(py,{scope:n,id:o,children:m.jsx(J.div,{role:"group","aria-labelledby":o,...r,ref:t})})});gy.displayName=Pl;var Al="SelectLabel",Il=d.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=hy(Al,n);return m.jsx(J.div,{id:o.id,...r,ref:t})});Il.displayName=Al;var Hr="SelectItem",[vy,jl]=Tn(Hr),$l=d.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:a,...i}=e,s=Ht(Hr,n),c=Ut(Hr,n),u=s.value===r,[f,l]=d.useState(a??""),[p,h]=d.useState(!1),b=fe(t,w=>{var C;return(C=c.itemRefCallback)==null?void 0:C.call(c,w,r,o)}),g=Re(),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(vy,{scope:n,value:r,disabled:o,textId:g,isSelected:u,onItemTextChange:d.useCallback(w=>{l(C=>C||((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:X(i.onFocus,()=>h(!0)),onBlur:X(i.onBlur,()=>h(!1)),onClick:X(i.onClick,()=>{v.current!=="mouse"&&y()}),onPointerUp:X(i.onPointerUp,()=>{v.current==="mouse"&&y()}),onPointerDown:X(i.onPointerDown,w=>{v.current=w.pointerType}),onPointerMove:X(i.onPointerMove,w=>{var C;v.current=w.pointerType,o?(C=c.onItemLeave)==null||C.call(c):v.current==="mouse"&&w.currentTarget.focus({preventScroll:!0})}),onPointerLeave:X(i.onPointerLeave,w=>{var C;w.currentTarget===document.activeElement&&((C=c.onItemLeave)==null||C.call(c))}),onKeyDown:X(i.onKeyDown,w=>{var D;((D=c.searchRef)==null?void 0:D.current)!==""&&w.key===" "||(ny.includes(w.key)&&y(),w.key===" "&&w.preventDefault())})})})})});$l.displayName=Hr;var Yn="SelectItemText",Ll=d.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,...a}=e,i=Ht(Yn,n),s=Ut(Yn,n),c=jl(Yn,n),u=sy(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 Ne(()=>(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]})});Ll.displayName=Yn;var Fl="SelectItemIndicator",Wl=d.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return jl(Fl,n).isSelected?m.jsx(J.span,{"aria-hidden":!0,...r,ref:t}):null});Wl.displayName=Fl;var ya="SelectScrollUpButton",Bl=d.forwardRef((e,t)=>{const n=Ut(ya,e.__scopeSelect),r=ts(ya,e.__scopeSelect),[o,a]=d.useState(!1),i=fe(t,r.onScrollButtonChange);return Ne(()=>{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(zl,{...e,ref:i,onAutoScroll:()=>{const{viewport:s,selectedItem:c}=n;s&&c&&(s.scrollTop=s.scrollTop-c.offsetHeight)}}):null});Bl.displayName=ya;var wa="SelectScrollDownButton",Yl=d.forwardRef((e,t)=>{const n=Ut(wa,e.__scopeSelect),r=ts(wa,e.__scopeSelect),[o,a]=d.useState(!1),i=fe(t,r.onScrollButtonChange);return Ne(()=>{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(zl,{...e,ref:i,onAutoScroll:()=>{const{viewport:s,selectedItem:c}=n;s&&c&&(s.scrollTop=s.scrollTop+c.offsetHeight)}}):null});Yl.displayName=wa;var zl=d.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,a=Ut("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]),Ne(()=>{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:X(o.onPointerDown,()=>{i.current===null&&(i.current=window.setInterval(r,50))}),onPointerMove:X(o.onPointerMove,()=>{var u;(u=a.onItemLeave)==null||u.call(a),i.current===null&&(i.current=window.setInterval(r,50))}),onPointerLeave:X(o.onPointerLeave,()=>{c()})})}),by="SelectSeparator",Hl=d.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return m.jsx(J.div,{"aria-hidden":!0,...r,ref:t})});Hl.displayName=by;var xa="SelectArrow",yy=d.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=ho(n),a=Ht(xa,n),i=Ut(xa,n);return a.open&&i.position==="popper"?m.jsx(io,{...o,...r,ref:t}):null});yy.displayName=xa;var wy="SelectBubbleInput",Ul=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:{...yl,...n.style},ref:a,defaultValue:t})});Ul.displayName=wy;function Gl(e){return e===""||e===void 0}function ql(e){const t=Pe(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 Vl(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=xy(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 xy(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var Sy=xl,Kl=Cl,Cy=Dl,Ey=Ml,Dy=Nl,Xl=kl,My=_l,Zl=Il,Ql=$l,Ny=Ll,ky=Wl,Jl=Bl,eu=Yl,tu=Hl;const Sa=Sy,Ca=Cy,Ur=d.forwardRef(({className:e,children:t,...n},r)=>m.jsxs(Kl,{ref:r,className:F("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background data-[placeholder]:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...n,children:[t,m.jsx(Ey,{asChild:!0,children:m.jsx(tr,{strokeWidth:1.5,className:"h-4 w-4 text-foreground"})})]}));Ur.displayName=Kl.displayName;const nu=d.forwardRef(({className:e,...t},n)=>m.jsx(Jl,{ref:n,className:F("flex cursor-default items-center justify-center py-1",e),...t,children:m.jsx(Th,{className:"h-4 w-4"})}));nu.displayName=Jl.displayName;const ru=d.forwardRef(({className:e,...t},n)=>m.jsx(eu,{ref:n,className:F("flex cursor-default items-center justify-center py-1",e),...t,children:m.jsx(tr,{className:"h-4 w-4"})}));ru.displayName=eu.displayName;const Gr=d.forwardRef(({className:e,children:t,position:n="popper",...r},o)=>m.jsx(Dy,{children:m.jsxs(Xl,{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(nu,{}),m.jsx(My,{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(ru,{})]})}));Gr.displayName=Xl.displayName;const Ry=d.forwardRef(({className:e,...t},n)=>m.jsx(Zl,{ref:n,className:F("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}));Ry.displayName=Zl.displayName;const qr=d.forwardRef(({className:e,children:t,...n},r)=>m.jsxs(Ql,{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(ky,{children:m.jsx(er,{className:"h-4 w-4"})})}),m.jsx(Ny,{children:t})]}));qr.displayName=Ql.displayName;const Oy=d.forwardRef(({className:e,...t},n)=>m.jsx(tu,{ref:n,className:F("-mx-1 my-1 h-px bg-muted",e),...t}));Oy.displayName=tu.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(Ty);return n?vi(e,n.slice(1)):NaN}}const Ty=/([+-]\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 bt 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)),ou(this),Ea(this)):this.setTime(Date.now())}static tz(t,...n){return n.length?new bt(...n,t):new bt(Date.now(),t)}withTimeZone(t){return new bt(+this,t)}getTimezoneOffset(){return-Un(this.timeZone,this)}setTime(t){return Date.prototype.setTime.apply(this,arguments),Ea(this),+this}[Symbol.for("constructDateFrom")](t){return new bt(+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");bt.prototype[t]&&(e.startsWith("get")?bt.prototype[e]=function(){return this.internal[t]()}:(bt.prototype[e]=function(){return Date.prototype[t].apply(this.internal,arguments),_y(this),+this},bt.prototype[t]=function(){return Date.prototype[t].apply(this,arguments),Ea(this),+this}))});function Ea(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()),ou(e)}function ou(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 ze extends bt{static tz(t,...n){return n.length?new ze(...n,t):new ze(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} (${Py(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 ze(+this,t)}[Symbol.for("constructDateFrom")](t){return new ze(+new Date(t),this.timeZone)}}function Py(e,t){return new Intl.DateTimeFormat("en-GB",{timeZone:e,timeZoneName:"long"}).format(t).slice(12)}var le;(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"})(le||(le={}));var Me;(function(e){e.disabled="disabled",e.hidden="hidden",e.outside="outside",e.focused="focused",e.today="today"})(Me||(Me={}));var lt;(function(e){e.range_end="range_end",e.range_middle="range_middle",e.range_start="range_start",e.selected="selected"})(lt||(lt={}));var Qe;(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"})(Qe||(Qe={}));const au=6048e5,Ay=864e5,yi=Symbol.for("constructDateFrom");function Le(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 xe(e,t){return Le(t||e,e)}function su(e,t,n){const r=xe(e,n==null?void 0:n.in);return isNaN(t)?Le(e,NaN):(t&&r.setDate(r.getDate()+t),r)}function iu(e,t,n){const r=xe(e,n==null?void 0:n.in);if(isNaN(t))return Le(e,NaN);if(!t)return r;const o=r.getDate(),a=Le(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 Iy={};function dr(){return Iy}function Sn(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=xe(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 Sn(e,{...t,weekStartsOn:1})}function cu(e,t){const n=xe(e,t==null?void 0:t.in),r=n.getFullYear(),o=Le(n,0);o.setFullYear(r+1,0,4),o.setHours(0,0,0,0);const a=Kn(o),i=Le(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=xe(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function _n(e,...t){const n=Le.bind(null,t.find(r=>typeof r=="object"));return t.map(n)}function Xn(e,t){const n=xe(e,t==null?void 0:t.in);return n.setHours(0,0,0,0),n}function lu(e,t,n){const[r,o]=_n(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)/Ay)}function jy(e,t){const n=cu(e,t),r=Le(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),Kn(r)}function $y(e,t,n){return su(e,t*7,n)}function Ly(e,t,n){return iu(e,t*12,n)}function Fy(e,t){let n,r=t==null?void 0:t.in;return e.forEach(o=>{!r&&typeof o=="object"&&(r=Le.bind(null,o));const a=xe(o,r);(!n||n<a||isNaN(+a))&&(n=a)}),Le(r,n||NaN)}function Wy(e,t){let n,r=t==null?void 0:t.in;return e.forEach(o=>{!r&&typeof o=="object"&&(r=Le.bind(null,o));const a=xe(o,r);(!n||n>a||isNaN(+a))&&(n=a)}),Le(r,n||NaN)}function By(e,t,n){const[r,o]=_n(n==null?void 0:n.in,e,t);return+Xn(r)==+Xn(o)}function uu(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function Yy(e){return!(!uu(e)&&typeof e!="number"||isNaN(+xe(e)))}function zy(e,t,n){const[r,o]=_n(n==null?void 0:n.in,e,t),a=r.getFullYear()-o.getFullYear(),i=r.getMonth()-o.getMonth();return a*12+i}function Hy(e,t){const n=xe(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 Uy(e,t){const[n,r]=_n(e,t.start,t.end);return{start:n,end:r}}function Gy(e,t){const{start:n,end:r}=Uy(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(Le(n,i)),i.setMonth(i.getMonth()+s);return o?c.reverse():c}function qy(e,t){const n=xe(e,t==null?void 0:t.in);return n.setDate(1),n.setHours(0,0,0,0),n}function Vy(e,t){const n=xe(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 du(e,t){const n=xe(e,t==null?void 0:t.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function fu(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=xe(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 Ky(e,t){return fu(e,{...t,weekStartsOn:1})}const Xy={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"}},Zy=(e,t,n)=>{let r;const o=Xy[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 Qy={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Jy={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},ew={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},tw={date:zo({formats:Qy,defaultWidth:"full"}),time:zo({formats:Jy,defaultWidth:"full"}),dateTime:zo({formats:ew,defaultWidth:"full"})},nw={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},rw=(e,t,n,r)=>nw[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 ow={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},aw={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},sw={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"]},iw={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"]},cw={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"}},lw={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"}},uw=(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"},dw={ordinalNumber:uw,era:$n({values:ow,defaultWidth:"wide"}),quarter:$n({values:aw,defaultWidth:"wide",argumentCallback:e=>e-1}),month:$n({values:sw,defaultWidth:"wide"}),day:$n({values:iw,defaultWidth:"wide"}),dayPeriod:$n({values:cw,defaultWidth:"wide",formattingValues:lw,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)?mw(s,l=>l.test(i)):fw(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 fw(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function mw(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function pw(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 hw=/^(\d+)(th|st|nd|rd)?/i,gw=/\d+/i,vw={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},bw={any:[/^b/i,/^(a|c)/i]},yw={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},ww={any:[/1/i,/2/i,/3/i,/4/i]},xw={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},Sw={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},Ew={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]},Dw={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},Mw={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}},Nw={ordinalNumber:pw({matchPattern:hw,parsePattern:gw,valueCallback:e=>parseInt(e,10)}),era:Ln({matchPatterns:vw,defaultMatchWidth:"wide",parsePatterns:bw,defaultParseWidth:"any"}),quarter:Ln({matchPatterns:yw,defaultMatchWidth:"wide",parsePatterns:ww,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Ln({matchPatterns:xw,defaultMatchWidth:"wide",parsePatterns:Sw,defaultParseWidth:"any"}),day:Ln({matchPatterns:Cw,defaultMatchWidth:"wide",parsePatterns:Ew,defaultParseWidth:"any"}),dayPeriod:Ln({matchPatterns:Dw,defaultMatchWidth:"any",parsePatterns:Mw,defaultParseWidth:"any"})},ns={code:"en-US",formatDistance:Zy,formatLong:tw,formatRelative:rw,localize:dw,match:Nw,options:{weekStartsOn:0,firstWeekContainsDate:1}};function kw(e,t){const n=xe(e,t==null?void 0:t.in);return lu(n,du(n))+1}function mu(e,t){const n=xe(e,t==null?void 0:t.in),r=+Kn(n)-+jy(n);return Math.round(r/au)+1}function pu(e,t){var f,l,p,h;const n=xe(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=Le((t==null?void 0:t.in)||e,0);i.setFullYear(r+1,0,a),i.setHours(0,0,0,0);const s=Sn(i,t),c=Le((t==null?void 0:t.in)||e,0);c.setFullYear(r,0,a),c.setHours(0,0,0,0);const u=Sn(c,t);return+n>=+s?r+1:+n>=+u?r:r-1}function Rw(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=pu(e,t),a=Le((t==null?void 0:t.in)||e,0);return a.setFullYear(o,0,r),a.setHours(0,0,0,0),Sn(a,t)}function hu(e,t){const n=xe(e,t==null?void 0:t.in),r=+Sn(n,t)-+Rw(n,t);return Math.round(r/au)+1}function ye(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const It={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return ye(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):ye(n+1,2)},d(e,t){return ye(e.getDate(),t.length)},a(e,t){const n=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];case"aaaa":default:return n==="am"?"a.m.":"p.m."}},h(e,t){return ye(e.getHours()%12||12,t.length)},H(e,t){return ye(e.getHours(),t.length)},m(e,t){return ye(e.getMinutes(),t.length)},s(e,t){return ye(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),o=Math.trunc(r*Math.pow(10,n-3));return ye(o,t.length)}},hn={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 It.y(e,t)},Y:function(e,t,n,r){const o=pu(e,r),a=o>0?o:1-o;if(t==="YY"){const i=a%100;return ye(i,2)}return t==="Yo"?n.ordinalNumber(a,{unit:"year"}):ye(a,t.length)},R:function(e,t){const n=cu(e);return ye(n,t.length)},u:function(e,t){const n=e.getFullYear();return ye(n,t.length)},Q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"Q":return String(r);case"QQ":return ye(r,2);case"Qo":return n.ordinalNumber(r,{unit:"quarter"});case"QQQ":return n.quarter(r,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(r,{width:"narrow",context:"formatting"});case"QQQQ":default:return n.quarter(r,{width:"wide",context:"formatting"})}},q:function(e,t,n){const r=Math.ceil((e.getMonth()+1)/3);switch(t){case"q":return String(r);case"qq":return ye(r,2);case"qo":return n.ordinalNumber(r,{unit:"quarter"});case"qqq":return n.quarter(r,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(r,{width:"narrow",context:"standalone"});case"qqqq":default:return n.quarter(r,{width:"wide",context:"standalone"})}},M:function(e,t,n){const r=e.getMonth();switch(t){case"M":case"MM":return It.M(e,t);case"Mo":return n.ordinalNumber(r+1,{unit:"month"});case"MMM":return n.month(r,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(r,{width:"narrow",context:"formatting"});case"MMMM":default:return n.month(r,{width:"wide",context:"formatting"})}},L:function(e,t,n){const r=e.getMonth();switch(t){case"L":return String(r+1);case"LL":return ye(r+1,2);case"Lo":return n.ordinalNumber(r+1,{unit:"month"});case"LLL":return n.month(r,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(r,{width:"narrow",context:"standalone"});case"LLLL":default:return n.month(r,{width:"wide",context:"standalone"})}},w:function(e,t,n,r){const o=hu(e,r);return t==="wo"?n.ordinalNumber(o,{unit:"week"}):ye(o,t.length)},I:function(e,t,n){const r=mu(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):ye(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):It.d(e,t)},D:function(e,t,n){const r=kw(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):ye(r,t.length)},E:function(e,t,n){const r=e.getDay();switch(t){case"E":case"EE":case"EEE":return n.day(r,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(r,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(r,{width:"short",context:"formatting"});case"EEEE":default:return n.day(r,{width:"wide",context:"formatting"})}},e:function(e,t,n,r){const o=e.getDay(),a=(o-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(a);case"ee":return ye(a,2);case"eo":return n.ordinalNumber(a,{unit:"day"});case"eee":return n.day(o,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(o,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(o,{width:"short",context:"formatting"});case"eeee":default:return n.day(o,{width:"wide",context:"formatting"})}},c:function(e,t,n,r){const o=e.getDay(),a=(o-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(a);case"cc":return ye(a,t.length);case"co":return n.ordinalNumber(a,{unit:"day"});case"ccc":return n.day(o,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(o,{width:"narrow",context:"standalone"});case"cccccc":return n.day(o,{width:"short",context:"standalone"});case"cccc":default:return n.day(o,{width:"wide",context:"standalone"})}},i:function(e,t,n){const r=e.getDay(),o=r===0?7:r;switch(t){case"i":return String(o);case"ii":return ye(o,t.length);case"io":return n.ordinalNumber(o,{unit:"day"});case"iii":return n.day(r,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(r,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(r,{width:"short",context:"formatting"});case"iiii":default:return n.day(r,{width:"wide",context:"formatting"})}},a:function(e,t,n){const o=e.getHours()/12>=1?"pm":"am";switch(t){case"a":case"aa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(o,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(o,{width:"narrow",context:"formatting"});case"aaaa":default:return n.dayPeriod(o,{width:"wide",context:"formatting"})}},b:function(e,t,n){const r=e.getHours();let o;switch(r===12?o=hn.noon:r===0?o=hn.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=hn.evening:r>=12?o=hn.afternoon:r>=4?o=hn.morning:o=hn.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 It.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):It.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):ye(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):ye(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):It.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):It.s(e,t)},S:function(e,t){return It.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return Ci(r);case"XXXX":case"XX":return Qt(r);case"XXXXX":case"XXX":default:return Qt(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return Ci(r);case"xxxx":case"xx":return Qt(r);case"xxxxx":case"xxx":default:return Qt(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"+Qt(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"+Qt(r,":")}},t:function(e,t,n){const r=Math.trunc(+e/1e3);return ye(r,t.length)},T:function(e,t,n){return ye(+e,t.length)}};function 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+ye(a,2)}function Ci(e,t){return e%60===0?(e>0?"-":"+")+ye(Math.abs(e)/60,2):Qt(e,t)}function Qt(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=ye(Math.trunc(r/60),2),a=ye(r%60,2);return n+o+t+a}const Ei=(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"})}},gu=(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"})}},Ow=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return Ei(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}}",Ei(r,t)).replace("{{time}}",gu(o,t))},Tw={p:gu,P:Ow},_w=/^D+$/,Pw=/^Y+$/,Aw=["D","DD","YY","YYYY"];function Iw(e){return _w.test(e)}function jw(e){return Pw.test(e)}function $w(e,t,n){const r=Lw(e,t,n);if(console.warn(r),Aw.includes(e))throw new RangeError(r)}function Lw(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 Fw=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Ww=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Bw=/^'([^]*?)'?$/,Yw=/''/g,zw=/[a-zA-Z]/;function Hw(e,t,n){var f,l,p,h,b,g,v,y;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??((y=(v=r.locale)==null?void 0:v.options)==null?void 0:y.weekStartsOn)??0,s=xe(e,n==null?void 0:n.in);if(!Yy(s))throw new RangeError("Invalid time value");let c=t.match(Ww).map(w=>{const C=w[0];if(C==="p"||C==="P"){const D=Tw[C];return D(w,o.formatLong)}return w}).join("").match(Fw).map(w=>{if(w==="''")return{isToken:!1,value:"'"};const C=w[0];if(C==="'")return{isToken:!1,value:Uw(w)};if(xi[C])return{isToken:!0,value:w};if(C.match(zw))throw new RangeError("Format string contains an unescaped latin alphabet character `"+C+"`");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 C=w.value;(!(n!=null&&n.useAdditionalWeekYearTokens)&&jw(C)||!(n!=null&&n.useAdditionalDayOfYearTokens)&&Iw(C))&&$w(C,t,String(e));const D=xi[C[0]];return D(s,C,o.localize,u)}).join("")}function Uw(e){const t=e.match(Bw);return t?t[1].replace(Yw,"'"):e}function Gw(e,t){const n=xe(e,t==null?void 0:t.in),r=n.getFullYear(),o=n.getMonth(),a=Le(n,0);return a.setFullYear(r,o+1,0),a.setHours(0,0,0,0),a.getDate()}function qw(e,t){return xe(e,t==null?void 0:t.in).getMonth()}function Vw(e,t){return xe(e,t==null?void 0:t.in).getFullYear()}function Kw(e,t){return+xe(e)>+xe(t)}function Xw(e,t){return+xe(e)<+xe(t)}function Zw(e,t,n){const[r,o]=_n(n==null?void 0:n.in,e,t);return r.getFullYear()===o.getFullYear()&&r.getMonth()===o.getMonth()}function Qw(e,t,n){const[r,o]=_n(n==null?void 0:n.in,e,t);return r.getFullYear()===o.getFullYear()}function Jw(e,t,n){const r=xe(e,n==null?void 0:n.in),o=r.getFullYear(),a=r.getDate(),i=Le(e,0);i.setFullYear(o,t,15),i.setHours(0,0,0,0);const s=Gw(i);return r.setMonth(t,Math.min(a,s)),r}function ex(e,t,n){const r=xe(e,n==null?void 0:n.in);return isNaN(+r)?Le(e,NaN):(r.setFullYear(t),r)}const Di=5,tx=4;function nx(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:tx}function vu(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 rx(e,t){const n=vu(e,t),r=nx(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?ze.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 ze(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):su(r,o)},this.addMonths=(r,o)=>{var a;return(a=this.overrides)!=null&&a.addMonths?this.overrides.addMonths(r,o):iu(r,o)},this.addWeeks=(r,o)=>{var a;return(a=this.overrides)!=null&&a.addWeeks?this.overrides.addWeeks(r,o):$y(r,o)},this.addYears=(r,o)=>{var a;return(a=this.overrides)!=null&&a.addYears?this.overrides.addYears(r,o):Ly(r,o)},this.differenceInCalendarDays=(r,o)=>{var a;return(a=this.overrides)!=null&&a.differenceInCalendarDays?this.overrides.differenceInCalendarDays(r,o):lu(r,o)},this.differenceInCalendarMonths=(r,o)=>{var a;return(a=this.overrides)!=null&&a.differenceInCalendarMonths?this.overrides.differenceInCalendarMonths(r,o):zy(r,o)},this.eachMonthOfInterval=r=>{var o;return(o=this.overrides)!=null&&o.eachMonthOfInterval?this.overrides.eachMonthOfInterval(r):Gy(r)},this.endOfBroadcastWeek=r=>{var o;return(o=this.overrides)!=null&&o.endOfBroadcastWeek?this.overrides.endOfBroadcastWeek(r):rx(r,this)},this.endOfISOWeek=r=>{var o;return(o=this.overrides)!=null&&o.endOfISOWeek?this.overrides.endOfISOWeek(r):Ky(r)},this.endOfMonth=r=>{var o;return(o=this.overrides)!=null&&o.endOfMonth?this.overrides.endOfMonth(r):Hy(r)},this.endOfWeek=(r,o)=>{var a;return(a=this.overrides)!=null&&a.endOfWeek?this.overrides.endOfWeek(r,o):fu(r,this.options)},this.endOfYear=r=>{var o;return(o=this.overrides)!=null&&o.endOfYear?this.overrides.endOfYear(r):Vy(r)},this.format=(r,o,a)=>{var s;const i=(s=this.overrides)!=null&&s.format?this.overrides.format(r,o,this.options):Hw(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):mu(r)},this.getMonth=(r,o)=>{var a;return(a=this.overrides)!=null&&a.getMonth?this.overrides.getMonth(r,this.options):qw(r,this.options)},this.getYear=(r,o)=>{var a;return(a=this.overrides)!=null&&a.getYear?this.overrides.getYear(r,this.options):Vw(r,this.options)},this.getWeek=(r,o)=>{var a;return(a=this.overrides)!=null&&a.getWeek?this.overrides.getWeek(r,this.options):hu(r,this.options)},this.isAfter=(r,o)=>{var a;return(a=this.overrides)!=null&&a.isAfter?this.overrides.isAfter(r,o):Kw(r,o)},this.isBefore=(r,o)=>{var a;return(a=this.overrides)!=null&&a.isBefore?this.overrides.isBefore(r,o):Xw(r,o)},this.isDate=r=>{var o;return(o=this.overrides)!=null&&o.isDate?this.overrides.isDate(r):uu(r)},this.isSameDay=(r,o)=>{var a;return(a=this.overrides)!=null&&a.isSameDay?this.overrides.isSameDay(r,o):By(r,o)},this.isSameMonth=(r,o)=>{var a;return(a=this.overrides)!=null&&a.isSameMonth?this.overrides.isSameMonth(r,o):Zw(r,o)},this.isSameYear=(r,o)=>{var a;return(a=this.overrides)!=null&&a.isSameYear?this.overrides.isSameYear(r,o):Qw(r,o)},this.max=r=>{var o;return(o=this.overrides)!=null&&o.max?this.overrides.max(r):Fy(r)},this.min=r=>{var o;return(o=this.overrides)!=null&&o.min?this.overrides.min(r):Wy(r)},this.setMonth=(r,o)=>{var a;return(a=this.overrides)!=null&&a.setMonth?this.overrides.setMonth(r,o):Jw(r,o)},this.setYear=(r,o)=>{var a;return(a=this.overrides)!=null&&a.setYear?this.overrides.setYear(r,o):ex(r,o)},this.startOfBroadcastWeek=(r,o)=>{var a;return(a=this.overrides)!=null&&a.startOfBroadcastWeek?this.overrides.startOfBroadcastWeek(r,this):vu(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):qy(r)},this.startOfWeek=(r,o)=>{var a;return(a=this.overrides)!=null&&a.startOfWeek?this.overrides.startOfWeek(r,this.options):Sn(r,this.options)},this.startOfYear=r=>{var o;return(o=this.overrides)!=null&&o.startOfYear?this.overrides.startOfYear(r):du(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 St=new Tt;class bu{constructor(t,n,r=St){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 ox{constructor(t,n){this.date=t,this.weeks=n}}class ax{constructor(t,n){this.days=n,this.weekNumber=t}}function Et(e,t,n=!1,r=St){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 yu(e){return!!(e&&typeof e=="object"&&"before"in e&&"after"in e)}function rs(e){return!!(e&&typeof e=="object"&&"from"in e)}function wu(e){return!!(e&&typeof e=="object"&&"after"in e)}function xu(e){return!!(e&&typeof e=="object"&&"before"in e)}function Su(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=St){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 Et(s,e,!1,n);if(Su(s))return Array.isArray(s.dayOfWeek)?s.dayOfWeek.includes(e.getDay()):s.dayOfWeek===e.getDay();if(yu(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 wu(s)?a(e,s.after)>0:xu(s)?a(s.before,e)>0:typeof s=="function"?s(e):!1})}function sx(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),C={[Me.focused]:[],[Me.outside]:[],[Me.disabled]:[],[Me.hidden]:[],[Me.today]:[]},D={};for(const E of e){const{date:R,displayMonth:S}=E,k=!!(S&&!p(R,S)),I=!!(y&&b(R,y)),j=!!(w&&v(R,w)),L=!!(a&&Dt(R,a,o)),V=!!(i&&Dt(R,i,o))||I||j||!u&&!c&&k||u&&c===!1&&k,B=l(R,f??o.today());k&&C.outside.push(E),L&&C.disabled.push(E),V&&C.hidden.push(E),B&&C.today.push(E),s&&Object.keys(s).forEach(P=>{const O=s==null?void 0:s[P];O&&Dt(R,O,o)&&(D[P]?D[P].push(E):D[P]=[E])})}return E=>{const R={[Me.focused]:!1,[Me.disabled]:!1,[Me.hidden]:!1,[Me.outside]:!1,[Me.today]:!1},S={};for(const k in C){const I=C[k];R[k]=I.some(j=>j===E)}for(const k in D)S[k]=D[k].some(I=>I===E);return{...R,...S}}}function ix(e,t,n={}){return Object.entries(e).filter(([,o])=>o===!0).reduce((o,[a])=>(n[a]?o.push(n[a]):t[Me[a]]?o.push(t[Me[a]]):t[lt[a]]&&o.push(t[lt[a]]),o),[t[le.Day]])}function cx(e){return x.createElement("button",{...e})}function lx(e){return x.createElement("span",{...e})}function ux(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 dx(e){const{day:t,modifiers:n,...r}=e;return x.createElement("td",{...r})}function fx(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 mx(e){const{options:t,className:n,components:r,classNames:o,...a}=e,i=[o[le.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[le.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[le.CaptionLabel],"aria-hidden":!0},s==null?void 0:s.label,x.createElement(r.Chevron,{orientation:"down",size:18,className:o[le.Chevron]})))}function px(e){return x.createElement("div",{...e})}function hx(e){return x.createElement("div",{...e})}function gx(e){const{calendarMonth:t,displayIndex:n,...r}=e;return x.createElement("div",{...r},e.children)}function vx(e){const{calendarMonth:t,displayIndex:n,...r}=e;return x.createElement("div",{...r})}function bx(e){return x.createElement("table",{...e})}function yx(e){return x.createElement("div",{...e})}const Eu=x.createContext(void 0);function fr(){const e=x.useContext(Eu);if(e===void 0)throw new Error("useDayPicker() must be used within a custom component.");return e}function wx(e){const{components:t}=fr();return x.createElement(t.Dropdown,{...e})}function xx(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[le.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[le.Chevron],orientation:"left"})),x.createElement(i.NextMonthButton,{type:"button",className:s[le.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[le.Chevron]})))}function Sx(e){const{components:t}=fr();return x.createElement(t.Button,{...e})}function Cx(e){return x.createElement("option",{...e})}function Ex(e){const{components:t}=fr();return x.createElement(t.Button,{...e})}function Dx(e){const{rootRef:t,...n}=e;return x.createElement("div",{...n,ref:t})}function Mx(e){return x.createElement("select",{...e})}function Nx(e){const{week:t,...n}=e;return x.createElement("tr",{...n})}function kx(e){return x.createElement("th",{...e})}function Rx(e){return x.createElement("thead",{"aria-hidden":!0},x.createElement("tr",{...e}))}function Ox(e){const{week:t,...n}=e;return x.createElement("th",{...n})}function Tx(e){return x.createElement("th",{...e})}function _x(e){return x.createElement("tbody",{...e})}function Px(e){const{components:t}=fr();return x.createElement(t.Dropdown,{...e})}const Ax=Object.freeze(Object.defineProperty({__proto__:null,Button:cx,CaptionLabel:lx,Chevron:ux,Day:dx,DayButton:fx,Dropdown:mx,DropdownNav:px,Footer:hx,Month:gx,MonthCaption:vx,MonthGrid:bx,Months:yx,MonthsDropdown:wx,Nav:xx,NextMonthButton:Sx,Option:Cx,PreviousMonthButton:Ex,Root:Dx,Select:Mx,Week:Nx,WeekNumber:Ox,WeekNumberHeader:Tx,Weekday:kx,Weekdays:Rx,Weeks:_x,YearsDropdown:Px},Symbol.toStringTag,{value:"Module"}));function Ix(e){return{...Ax,...e}}function jx(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 le)e[le[t]]=`rdp-${le[t]}`;for(const t in Me)e[Me[t]]=`rdp-${Me[t]}`;for(const t in lt)e[lt[t]]=`rdp-${lt[t]}`;for(const t in Qe)e[Qe[t]]=`rdp-${Qe[t]}`;return e}function Du(e,t,n){return(n??new Tt(t)).format(e,"LLLL y")}const $x=Du;function Lx(e,t,n){return(n??new Tt(t)).format(e,"d")}function Fx(e,t=St){return t.format(e,"LLLL")}function Wx(e,t=St){return e<10?t.formatNumber(`0${e.toLocaleString()}`):t.formatNumber(`${e.toLocaleString()}`)}function Bx(){return""}function Yx(e,t,n){return(n??new Tt(t)).format(e,"cccccc")}function Mu(e,t=St){return t.format(e,"yyyy")}const zx=Mu,Hx=Object.freeze(Object.defineProperty({__proto__:null,formatCaption:Du,formatDay:Lx,formatMonthCaption:$x,formatMonthDropdown:Fx,formatWeekNumber:Wx,formatWeekNumberHeader:Bx,formatWeekdayName:Yx,formatYearCaption:zx,formatYearDropdown:Mu},Symbol.toStringTag,{value:"Module"}));function Ux(e){return e!=null&&e.formatMonthCaption&&!e.formatCaption&&(e.formatCaption=e.formatMonthCaption),e!=null&&e.formatYearCaption&&!e.formatYearDropdown&&(e.formatYearDropdown=e.formatYearCaption),{...Hx,...e}}function Gx(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 qx(e,t={},n={}){let r={...t==null?void 0:t[le.Day]};return Object.entries(e).filter(([,o])=>o===!0).forEach(([o])=>{r={...r,...n==null?void 0:n[o]}}),r}function Vx(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 Kx(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 Nu(e,t,n){return(n??new Tt(t)).format(e,"LLLL y")}const Xx=Nu;function Zx(e,t,n,r){let o=(r??new Tt(n)).format(e,"PPPP");return t!=null&&t.today&&(o=`Today, ${o}`),o}function ku(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 Qx=ku;function Jx(){return""}function e0(e){return"Choose the Month"}function t0(e){return"Go to the Next Month"}function n0(e){return"Go to the Previous Month"}function r0(e,t,n){return(n??new Tt(t)).format(e,"cccc")}function o0(e,t){return`Week ${e}`}function a0(e){return"Week Number"}function s0(e){return"Choose the Year"}const i0=Object.freeze(Object.defineProperty({__proto__:null,labelCaption:Xx,labelDay:Qx,labelDayButton:ku,labelGrid:Nu,labelGridcell:Zx,labelMonthDropdown:e0,labelNav:Jx,labelNext:t0,labelPrevious:n0,labelWeekNumber:o0,labelWeekNumberHeader:a0,labelWeekday:r0,labelYearDropdown:s0},Symbol.toStringTag,{value:"Module"})),mr=e=>e instanceof HTMLElement?e:null,Ho=e=>[...e.querySelectorAll("[data-animated-month]")??[]],c0=e=>mr(e.querySelector("[data-animated-month]")),Uo=e=>mr(e.querySelector("[data-animated-caption]")),Go=e=>mr(e.querySelector("[data-animated-weeks]")),l0=e=>mr(e.querySelector("[data-animated-nav]")),u0=e=>mr(e.querySelector("[data-animated-weekdays]"));function d0(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[Qe.caption_after_enter]:n[Qe.caption_before_enter],h=l?n[Qe.weeks_after_enter]:n[Qe.weeks_before_enter],b=i.current,g=e.current.cloneNode(!0);if(g instanceof HTMLElement?(Ho(g).forEach(C=>{if(!(C instanceof HTMLElement))return;const D=c0(C);D&&C.contains(D)&&C.removeChild(D);const E=Uo(C);E&&E.classList.remove(p);const R=Go(C);R&&R.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=l0(e.current);w&&(w.style.zIndex="1"),y.forEach((C,D)=>{const E=v[D];if(!E)return;C.style.position="relative",C.style.overflow="hidden";const R=Uo(C);R&&R.classList.add(p);const S=Go(C);S&&S.classList.add(h);const k=()=>{c.current=!1,e.current&&(e.current.style.isolation=""),w&&(w.style.zIndex=""),R&&R.classList.remove(p),S&&S.classList.remove(h),C.style.position="",C.style.overflow="",C.contains(E)&&C.removeChild(E)};E.style.pointerEvents="none",E.style.position="absolute",E.style.overflow="hidden",E.setAttribute("aria-hidden","true");const I=u0(E);I&&(I.style.opacity="0");const j=Uo(E);j&&(j.classList.add(l?n[Qe.caption_before_exit]:n[Qe.caption_after_exit]),j.addEventListener("animationend",k));const L=Go(E);L&&L.classList.add(l?n[Qe.weeks_before_exit]:n[Qe.weeks_after_exit]),C.insertBefore(E,C.firstChild)})}})}function f0(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:C}=r,D=c?y(o,r):i?w(o):C(o),E=c?p(a):i?h(b(a)):g(b(a)),R=f(E,D),S=l(a,o)+1,k=[];for(let L=0;L<=R;L++){const V=u(D,L);if(t&&v(V,t))break;k.push(V)}const j=(c?35:42)*S;if(s&&k.length<j){const L=j-k.length;for(let V=0;V<L;V++){const B=u(k[k.length-1],1);k.push(B)}}return k}function m0(e){const t=[];return e.reduce((n,r)=>{const o=r.weeks.reduce((a,i)=>[...a,...i.days],t);return[...n,...o]},t)}function p0(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 h0(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)),C=t.filter(S=>S>=y&&S<=w),D=n.broadcastCalendar?35:42;if(n.fixedWeeks&&C.length<D){const S=t.filter(k=>{const I=D-C.length;return k>w&&k<=o(w,I)});C.push(...S)}const E=C.reduce((S,k)=>{const I=n.ISOWeek?u(k):f(k),j=S.find(V=>V.weekNumber===I),L=new bu(k,v,r);return j?j.days.push(L):S.push(new ax(I,[L])),S},[]),R=new ox(v,E);return g.push(R),g},[]);return n.reverseMonths?b.reverse():b}function g0(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 v0(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 b0(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 y0(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 w0(e,t){const[n,r]=g0(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=p0(s,r,e,t),f=f0(u,e.endMonth?a(e.endMonth):void 0,e,t),l=h0(u,f,e,t),p=y0(l),h=m0(l),b=b0(s,n,e,t),g=v0(s,r,e,t),{disableNavigation:v,onMonthChange:y}=e,w=R=>p.some(S=>S.days.some(k=>k.isEqualTo(R))),C=R=>{if(v)return;let S=o(R);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:C,goToDay:R=>{w(R)||C(R.date)}}}var ht;(function(e){e[e.Today=0]="Today",e[e.Selected=1]="Selected",e[e.LastFocused=2]="LastFocused",e[e.FocusedModifier=3]="FocusedModifier"})(ht||(ht={}));function Ni(e){return!e[Me.disabled]&&!e[Me.hidden]&&!e[Me.outside]}function x0(e,t,n,r){let o,a=-1;for(const i of e){const s=t(i);Ni(s)&&(s[Me.focused]&&a<ht.FocusedModifier?(o=i,a=ht.FocusedModifier):r!=null&&r.isEqualTo(i)&&a<ht.LastFocused?(o=i,a=ht.LastFocused):n(i.date)&&a<ht.Selected?(o=i,a=ht.Selected):s[Me.today]&&a<ht.Today&&(o=i,a=ht.Today))}return o||(o=e.find(i=>Ni(t(i)))),o}function S0(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:C,startOfWeek:D}=i;let R={day:u,week:l,month:f,year:p,startOfWeek:S=>c?w(S,i):s?C(S):D(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=y([o,R])),R}function Ru(e,t,n,r,o,a,i,s=0){if(s>365)return;const c=S0(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 bu(c,l,i);return!u&&!f?p:Ru(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=x0(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=Ru(g,v,u,t.navStart,t.navEnd,e,o);y&&(t.goToDay(y),f(y))}}}function E0(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 D0(e,t,n=0,r=0,o=!1,a=St){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 M0(e,t,n=St){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=St){return Et(e,t.from,!1,n)||Et(e,t.to,!1,n)||Et(t,e.from,!1,n)||Et(t,e.to,!1,n)}function N0(e,t,n=St){const r=Array.isArray(t)?t:[t];if(r.filter(s=>typeof s!="function").some(s=>typeof s=="boolean"?s:n.isDate(s)?Et(e,s,!1,n):Cu(s,n)?s.some(c=>Et(e,c,!1,n)):rs(s)?s.from&&s.to?ki(e,{from:s.from,to:s.to},n):!1:Su(s)?M0(e,s.dayOfWeek,n):yu(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):wu(s)||xu(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 k0(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?D0(p,u,g,v,a,t):void 0;return r&&n&&(y!=null&&y.from)&&y.to&&N0({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&&Et(u,p,!1,t)}}function R0(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 O0(e,t){const n=R0(e,t),r=E0(e,t),o=k0(e,t);switch(e.mode){case"single":return n;case"multiple":return r;case"range":return o;default:return}}function Ou(e){var Pt;let t=e;t.timeZone&&(t={...e},t.today&&(t.today=new ze(t.today,t.timeZone)),t.month&&(t.month=new ze(t.month,t.timeZone)),t.defaultMonth&&(t.defaultMonth=new ze(t.defaultMonth,t.timeZone)),t.startMonth&&(t.startMonth=new ze(t.startMonth,t.timeZone)),t.endMonth&&(t.endMonth=new ze(t.endMonth,t.timeZone)),t.mode==="single"&&t.selected?t.selected=new ze(t.selected,t.timeZone):t.mode==="multiple"&&t.selected?t.selected=(Pt=t.selected)==null?void 0:Pt.map(q=>new ze(q,t.timeZone)):t.mode==="range"&&t.selected&&(t.selected={from:t.selected.from?new ze(t.selected.from,t.timeZone):void 0,to:t.selected.to?new ze(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:Ix(t.components),formatters:Ux(t.formatters),labels:{...i0,...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:C,showWeekNumber:D,styles:E}=t,{formatCaption:R,formatDay:S,formatMonthDropdown:k,formatWeekNumber:I,formatWeekNumberHeader:j,formatWeekdayName:L,formatYearDropdown:V}=r,B=w0(t,a),{days:P,months:O,navStart:M,navEnd:A,previousMonth:N,nextMonth:_,goToMonth:Y}=B,H=sx(P,t,M,A,a),{isSelected:T,select:$,selected:z}=O0(t,a)??{},{blur:U,focused:G,isFocusTarget:W,moveFocus:Q,setFocused:K}=C0(t,B,H,T??(()=>!1),a),{labelDayButton:Z,labelGridcell:se,labelGrid:ie,labelMonthDropdown:be,labelNav:ee,labelPrevious:Ae,labelNext:Ie,labelWeekday:Ee,labelWeekNumber:Ge,labelWeekNumberHeader:Ce,labelYearDropdown:Xe}=o,_t=x.useMemo(()=>Vx(a,t.ISOWeek),[a,t.ISOWeek]),Oe=u!==void 0||h!==void 0,re=x.useCallback(()=>{N&&(Y(N),C==null||C(N))},[N,Y,C]),pe=x.useCallback(()=>{_&&(Y(_),w==null||w(_))},[Y,_,w]),Te=x.useCallback((q,ce)=>ae=>{ae.preventDefault(),ae.stopPropagation(),K(q),$==null||$(q.date,ce,ae),h==null||h(q.date,ce,ae)},[$,h,K]),Fe=x.useCallback((q,ce)=>ae=>{K(q),b==null||b(q.date,ce,ae)},[b,K]),Ye=x.useCallback((q,ce)=>ae=>{U(),p==null||p(q.date,ce,ae)},[U,p]),at=x.useCallback((q,ce)=>ae=>{const me={ArrowLeft:[ae.shiftKey?"month":"day",t.dir==="rtl"?"after":"before"],ArrowRight:[ae.shiftKey?"month":"day",t.dir==="rtl"?"before":"after"],ArrowDown:[ae.shiftKey?"year":"week","after"],ArrowUp:[ae.shiftKey?"year":"week","before"],PageUp:[ae.shiftKey?"year":"month","before"],PageDown:[ae.shiftKey?"year":"month","after"],Home:["startOfWeek","before"],End:["endOfWeek","after"]};if(me[ae.key]){ae.preventDefault(),ae.stopPropagation();const[ge,oe]=me[ae.key];Q(ge,oe)}g==null||g(q.date,ce,ae)},[Q,g,t.dir]),qt=x.useCallback((q,ce)=>ae=>{v==null||v(q.date,ce,ae)},[v]),st=x.useCallback((q,ce)=>ae=>{y==null||y(q.date,ce,ae)},[y]),cn=x.useCallback(q=>ce=>{const ae=Number(ce.target.value),me=a.setMonth(a.startOfMonth(q),ae);Y(me)},[a,Y]),qe=x.useCallback(q=>ce=>{const ae=Number(ce.target.value),me=a.setYear(a.startOfMonth(q),ae);Y(me)},[a,Y]),{className:ln,style:An}=x.useMemo(()=>({className:[s[le.Root],t.className].filter(Boolean).join(" "),style:{...E==null?void 0:E[le.Root],...t.style}}),[s,t.className,t.style,E]),un=jx(t),Vt=x.useRef(null);d0(Vt,!!t.animate,{classNames:s,months:O,focused:G,dateLib:a});const In={dayPickerProps:t,selected:z,select:$,isSelected:T,months:O,nextMonth:_,previousMonth:N,goToMonth:Y,getModifiers:H,components:n,classNames:s,styles:E,labels:o,formatters:r};return x.createElement(Eu.Provider,{value:In},x.createElement(n.Root,{rootRef:t.animate?Vt:void 0,className:ln,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"],...un},x.createElement(n.Months,{className:s[le.Months],style:E==null?void 0:E[le.Months]},!t.hideNavigation&&!f&&x.createElement(n.Nav,{"data-animated-nav":t.animate?"true":void 0,className:s[le.Nav],style:E==null?void 0:E[le.Nav],"aria-label":ee(),onPreviousClick:re,onNextClick:pe,previousMonth:N,nextMonth:_}),O.map((q,ce)=>{const ae=Gx(q.date,M,A,r,a),me=Kx(M,A,r,a);return x.createElement(n.Month,{"data-animated-month":t.animate?"true":void 0,className:s[le.Month],style:E==null?void 0:E[le.Month],key:ce,displayIndex:ce,calendarMonth:q},f==="around"&&!t.hideNavigation&&ce===0&&x.createElement(n.PreviousMonthButton,{type:"button",className:s[le.PreviousMonthButton],tabIndex:N?void 0:-1,"aria-disabled":N?void 0:!0,"aria-label":Ae(N),onClick:re,"data-animated-button":t.animate?"true":void 0},x.createElement(n.Chevron,{disabled:N?void 0:!0,className:s[le.Chevron],orientation:t.dir==="rtl"?"right":"left"})),x.createElement(n.MonthCaption,{"data-animated-caption":t.animate?"true":void 0,className:s[le.MonthCaption],style:E==null?void 0:E[le.MonthCaption],calendarMonth:q,displayIndex:ce},c!=null&&c.startsWith("dropdown")?x.createElement(n.DropdownNav,{className:s[le.Dropdowns],style:E==null?void 0:E[le.Dropdowns]},c==="dropdown"||c==="dropdown-months"?x.createElement(n.MonthsDropdown,{className:s[le.MonthsDropdown],"aria-label":be(),classNames:s,components:n,disabled:!!t.disableNavigation,onChange:cn(q.date),options:ae,style:E==null?void 0:E[le.Dropdown],value:a.getMonth(q.date)}):x.createElement("span",null,k(q.date,a)),c==="dropdown"||c==="dropdown-years"?x.createElement(n.YearsDropdown,{className:s[le.YearsDropdown],"aria-label":Xe(a.options),classNames:s,components:n,disabled:!!t.disableNavigation,onChange:qe(q.date),options:me,style:E==null?void 0:E[le.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"}},R(q.date,a.options,a))):x.createElement(n.CaptionLabel,{className:s[le.CaptionLabel],role:"status","aria-live":"polite"},R(q.date,a.options,a))),f==="around"&&!t.hideNavigation&&ce===l-1&&x.createElement(n.NextMonthButton,{type:"button",className:s[le.NextMonthButton],tabIndex:_?void 0:-1,"aria-disabled":_?void 0:!0,"aria-label":Ie(_),onClick:pe,"data-animated-button":t.animate?"true":void 0},x.createElement(n.Chevron,{disabled:_?void 0:!0,className:s[le.Chevron],orientation:t.dir==="rtl"?"left":"right"})),ce===l-1&&f==="after"&&!t.hideNavigation&&x.createElement(n.Nav,{"data-animated-nav":t.animate?"true":void 0,className:s[le.Nav],style:E==null?void 0:E[le.Nav],"aria-label":ee(),onPreviousClick:re,onNextClick:pe,previousMonth:N,nextMonth:_}),x.createElement(n.MonthGrid,{role:"grid","aria-multiselectable":u==="multiple"||u==="range","aria-label":ie(q.date,a.options,a)||void 0,className:s[le.MonthGrid],style:E==null?void 0:E[le.MonthGrid]},!t.hideWeekdays&&x.createElement(n.Weekdays,{"data-animated-weekdays":t.animate?"true":void 0,className:s[le.Weekdays],style:E==null?void 0:E[le.Weekdays]},D&&x.createElement(n.WeekNumberHeader,{"aria-label":Ce(a.options),className:s[le.WeekNumberHeader],style:E==null?void 0:E[le.WeekNumberHeader],scope:"col"},j()),_t.map((ge,oe)=>x.createElement(n.Weekday,{"aria-label":Ee(ge,a.options,a),className:s[le.Weekday],key:oe,style:E==null?void 0:E[le.Weekday],scope:"col"},L(ge,a.options,a)))),x.createElement(n.Weeks,{"data-animated-weeks":t.animate?"true":void 0,className:s[le.Weeks],style:E==null?void 0:E[le.Weeks]},q.weeks.map((ge,oe)=>x.createElement(n.Week,{className:s[le.Week],key:ge.weekNumber,style:E==null?void 0:E[le.Week],week:ge},D&&x.createElement(n.WeekNumber,{week:ge,style:E==null?void 0:E[le.WeekNumber],"aria-label":Ge(ge.weekNumber,{locale:i}),className:s[le.WeekNumber],scope:"row",role:"rowheader"},I(ge.weekNumber,a)),ge.days.map(de=>{const{date:ve}=de,ue=H(de);if(ue[Me.focused]=!ue.hidden&&!!(G!=null&&G.isEqualTo(de)),ue[lt.selected]=(T==null?void 0:T(ve))||ue.selected,rs(z)){const{from:Ze,to:We}=z;ue[lt.range_start]=!!(Ze&&We&&a.isSameDay(ve,Ze)),ue[lt.range_end]=!!(Ze&&We&&a.isSameDay(ve,We)),ue[lt.range_middle]=Et(z,ve,!0,a)}const Ve=qx(ue,E,t.modifiersStyles),we=ix(ue,s,t.modifiersClassNames),Se=!Oe&&!ue.hidden?se(ve,ue,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:ue,className:we.join(" "),style:Ve,role:"gridcell","aria-selected":ue.selected||void 0,"aria-label":Se,"data-day":a.format(ve,"yyyy-MM-dd"),"data-month":de.outside?a.format(ve,"yyyy-MM"):void 0,"data-selected":ue.selected||void 0,"data-disabled":ue.disabled||void 0,"data-hidden":ue.hidden||void 0,"data-outside":de.outside||void 0,"data-focused":ue.focused||void 0,"data-today":ue.today||void 0},!ue.hidden&&Oe?x.createElement(n.DayButton,{className:s[le.DayButton],style:E==null?void 0:E[le.DayButton],type:"button",day:de,modifiers:ue,disabled:ue.disabled||void 0,tabIndex:W(de)?0:-1,"aria-label":Z(ve,ue,a.options,a),onClick:Te(de,ue),onBlur:Ye(de,ue),onFocus:Fe(de,ue),onKeyDown:at(de,ue),onMouseEnter:qt(de,ue),onMouseLeave:st(de,ue)},S(ve,a.options,a)):!ue.hidden&&S(de.date,a.options,a))}))))))})),t.footer&&x.createElement(n.Footer,{className:s[le.Footer],style:E==null?void 0:E[le.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:{}},T0=jr.exports,Ri;function Tu(){return Ri||(Ri=1,function(e,t){(function(n,r){e.exports=r()})(T0,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(P){var O=["th","st","nd","rd"],M=P%100;return"["+P+(O[(M-20)%10]||O[M]||O[0])+"]"}},C=function(P,O,M){var A=String(P);return!A||A.length>=O?P:""+Array(O+1-A.length).join(M)+P},D={s:C,z:function(P){var O=-P.utcOffset(),M=Math.abs(O),A=Math.floor(M/60),N=M%60;return(O<=0?"+":"-")+C(A,2,"0")+":"+C(N,2,"0")},m:function P(O,M){if(O.date()<M.date())return-P(M,O);var A=12*(M.year()-O.year())+(M.month()-O.month()),N=O.clone().add(A,l),_=M-N<0,Y=O.clone().add(A+(_?-1:1),l);return+(-(A+(M-N)/(_?N-Y:Y-N))||0)},a:function(P){return P<0?Math.ceil(P)||0:Math.floor(P)},p:function(P){return{M:l,y:h,w:f,d:u,D:b,h:c,m:s,s:i,ms:a,Q:p}[P]||String(P||"").toLowerCase().replace(/s$/,"")},u:function(P){return P===void 0}},E="en",R={};R[E]=w;var S="$isDayjsObject",k=function(P){return P instanceof V||!(!P||!P[S])},I=function P(O,M,A){var N;if(!O)return E;if(typeof O=="string"){var _=O.toLowerCase();R[_]&&(N=_),M&&(R[_]=M,N=_);var Y=O.split("-");if(!N&&Y.length>1)return P(Y[0])}else{var H=O.name;R[H]=O,N=H}return!A&&N&&(E=N),N||!A&&E},j=function(P,O){if(k(P))return P.clone();var M=typeof O=="object"?O:{};return M.date=P,M.args=arguments,new V(M)},L=D;L.l=I,L.i=k,L.w=function(P,O){return j(P,{locale:O.$L,utc:O.$u,x:O.$x,$offset:O.$offset})};var V=function(){function P(M){this.$L=I(M.locale,null,!0),this.parse(M),this.$x=this.$x||M.x||{},this[S]=!0}var O=P.prototype;return O.parse=function(M){this.$d=function(A){var N=A.date,_=A.utc;if(N===null)return new Date(NaN);if(L.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 _?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)}(M),this.init()},O.init=function(){var M=this.$d;this.$y=M.getFullYear(),this.$M=M.getMonth(),this.$D=M.getDate(),this.$W=M.getDay(),this.$H=M.getHours(),this.$m=M.getMinutes(),this.$s=M.getSeconds(),this.$ms=M.getMilliseconds()},O.$utils=function(){return L},O.isValid=function(){return this.$d.toString()!==g},O.isSame=function(M,A){var N=j(M);return this.startOf(A)<=N&&N<=this.endOf(A)},O.isAfter=function(M,A){return j(M)<this.startOf(A)},O.isBefore=function(M,A){return this.endOf(A)<j(M)},O.$g=function(M,A,N){return L.u(M)?this[A]:this.set(N,M)},O.unix=function(){return Math.floor(this.valueOf()/1e3)},O.valueOf=function(){return this.$d.getTime()},O.startOf=function(M,A){var N=this,_=!!L.u(A)||A,Y=L.p(M),H=function(K,Z){var se=L.w(N.$u?Date.UTC(N.$y,Z,K):new Date(N.$y,Z,K),N);return _?se:se.endOf(u)},T=function(K,Z){return L.w(N.toDate()[K].apply(N.toDate("s"),(_?[0,0,0,0]:[23,59,59,999]).slice(Z)),N)},$=this.$W,z=this.$M,U=this.$D,G="set"+(this.$u?"UTC":"");switch(Y){case h:return _?H(1,0):H(31,11);case l:return _?H(1,z):H(0,z+1);case f:var W=this.$locale().weekStart||0,Q=($<W?$+7:$)-W;return H(_?U-Q:U+(6-Q),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()}},O.endOf=function(M){return this.startOf(M,!1)},O.$set=function(M,A){var N,_=L.p(M),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)[_],T=_===u?this.$D+(A-this.$W):A;if(_===l||_===h){var $=this.clone().set(b,1);$.$d[H](T),$.init(),this.$d=$.set(b,Math.min(this.$D,$.daysInMonth())).$d}else H&&this.$d[H](T);return this.init(),this},O.set=function(M,A){return this.clone().$set(M,A)},O.get=function(M){return this[L.p(M)]()},O.add=function(M,A){var N,_=this;M=Number(M);var Y=L.p(A),H=function(z){var U=j(_);return L.w(U.date(U.date()+Math.round(z*M)),_)};if(Y===l)return this.set(l,this.$M+M);if(Y===h)return this.set(h,this.$y+M);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,$=this.$d.getTime()+M*T;return L.w($,this)},O.subtract=function(M,A){return this.add(-1*M,A)},O.format=function(M){var A=this,N=this.$locale();if(!this.isValid())return N.invalidDate||g;var _=M||"YYYY-MM-DDTHH:mm:ssZ",Y=L.z(this),H=this.$H,T=this.$m,$=this.$M,z=N.weekdays,U=N.months,G=N.meridiem,W=function(Z,se,ie,be){return Z&&(Z[se]||Z(A,_))||ie[se].slice(0,be)},Q=function(Z){return L.s(H%12||12,Z,"0")},K=G||function(Z,se,ie){var be=Z<12?"AM":"PM";return ie?be.toLowerCase():be};return _.replace(y,function(Z,se){return se||function(ie){switch(ie){case"YY":return String(A.$y).slice(-2);case"YYYY":return L.s(A.$y,4,"0");case"M":return $+1;case"MM":return L.s($+1,2,"0");case"MMM":return W(N.monthsShort,$,U,3);case"MMMM":return W(U,$);case"D":return A.$D;case"DD":return L.s(A.$D,2,"0");case"d":return String(A.$W);case"dd":return W(N.weekdaysMin,A.$W,z,2);case"ddd":return W(N.weekdaysShort,A.$W,z,3);case"dddd":return z[A.$W];case"H":return String(H);case"HH":return L.s(H,2,"0");case"h":return Q(1);case"hh":return Q(2);case"a":return K(H,T,!0);case"A":return K(H,T,!1);case"m":return String(T);case"mm":return L.s(T,2,"0");case"s":return String(A.$s);case"ss":return L.s(A.$s,2,"0");case"SSS":return L.s(A.$ms,3,"0");case"Z":return Y}return null}(Z)||Y.replace(":","")})},O.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},O.diff=function(M,A,N){var _,Y=this,H=L.p(A),T=j(M),$=(T.utcOffset()-this.utcOffset())*r,z=this-T,U=function(){return L.m(Y,T)};switch(H){case h:_=U()/12;break;case l:_=U();break;case p:_=U()/3;break;case f:_=(z-$)/6048e5;break;case u:_=(z-$)/864e5;break;case c:_=z/o;break;case s:_=z/r;break;case i:_=z/n;break;default:_=z}return N?_:L.a(_)},O.daysInMonth=function(){return this.endOf(l).$D},O.$locale=function(){return R[this.$L]},O.locale=function(M,A){if(!M)return this.$L;var N=this.clone(),_=I(M,A,!0);return _&&(N.$L=_),N},O.clone=function(){return L.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()},P}(),B=V.prototype;return j.prototype=B,[["$ms",a],["$s",i],["$m",s],["$H",c],["$W",u],["$M",l],["$y",h],["$D",b]].forEach(function(P){B[P[1]]=function(O){return this.$g(O,P[0],P[1])}}),j.extend=function(P,O){return P.$i||(P(O,V,j),P.$i=!0),j},j.locale=I,j.isDayjs=k,j.unix=function(P){return j(1e3*P)},j.en=R[E],j.Ls=R,j.p={},j})}(jr)),jr.exports}var _0=Tu();const Mt=as(_0);var $r={exports:{}},P0=$r.exports,Oi;function A0(){return Oi||(Oi=1,function(e,t){(function(n,r){e.exports=r()})(P0,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,C){return w||C.slice(1)})})}(c,u===void 0?{}:u);return s.call(this,f)}}})}($r)),$r.exports}var I0=A0();const _u=as(I0);var Lr={exports:{}},j0=Lr.exports,Ti;function $0(){return Ti||(Ti=1,function(e,t){(function(n,r){e.exports=r(Tu())})(j0,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}$0();function L0({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(Sc,{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(Ca,{})}),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(Ca,{})}),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:y,onOpenChange:w,...C})=>{const[D,E]=x.useState(!1),R=y!==void 0?y:D,S=w||E,k=g??a??new Date,I=j=>{j&&(!a||j.getTime()!==a.getTime())&&(i==null||i(j),S(!1))};return Mt.locale(p),m.jsxs("div",{className:F("space-y-1",s),...C,children:[e&&m.jsxs(an,{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:F("w-full flex justify-between items-center font-normal",!a&&"text-muted-foreground",r&&"border border-red-500 focus:ring-red-500"),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(xc,{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(L0,{month:k,onMonthChange:v??(()=>{})}),m.jsx("div",{className:"p-3",children:m.jsx(Ou,{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:F("text-xs",r?"text-red-500":"text-gray-500"),children:r||n})]})};function F0({className:e,classNames:t,showOutsideDays:n=!0,captionLayout:r="label",buttonVariant:o="ghost",formatters:a,components:i,...s}){const c=os();return m.jsx(Ou,{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(Sc,{className:F("size-4",u),...l}):f==="right"?m.jsx(La,{className:F("size-4",u),...l}):m.jsx(tr,{className:F("size-4",u),...l}),DayButton:W0,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 W0({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 Fr={exports:{}},B0=Fr.exports,_i;function Y0(){return _i||(_i=1,function(e,t){(function(n,r){e.exports=r()})(B0,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),C=60*w[1]+(+w[2]||0);return C===0?0:w[0]==="+"?-C:C}(v)}],p=function(v){var y=c[v];return y&&(y.indexOf?y:y.s.concat(y.f))},h=function(v,y){var w,C=c.meridiem;if(C){for(var D=1;D<=24;D+=1)if(v.indexOf(C(D,0,y))>-1){w=D>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 C=1;C<=31;C+=1)y(C).replace(/\[|\]/g,"")===v&&(this.day=C)}],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(C){return C.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 C=(v=y.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(j,L,V){var B=V&&V.toUpperCase();return L||w[V]||n[V]||w[B].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(P,O,M){return O||M.slice(1)})})).match(r),D=C.length,E=0;E<D;E+=1){var R=C[E],S=b[R],k=S&&S[0],I=S&&S[1];C[E]=I?{regex:k,parser:I}:R.replace(/^\[|\]$/g,"")}return function(j){for(var L={},V=0,B=0;V<D;V+=1){var P=C[V];if(typeof P=="string")B+=P.length;else{var O=P.regex,M=P.parser,A=j.slice(B),N=O.exec(A)[0];M.call(L,N),j=j.replace(N,"")}}return function(_){var Y=_.afternoon;if(Y!==void 0){var H=_.hours;Y?H<12&&(_.hours+=12):H===12&&(_.hours=0),delete _.afternoon}}(L),L}}return function(v,y,w){w.p.customParseFormat=!0,v&&v.parseTwoDigitYear&&(u=v.parseTwoDigitYear);var C=y.prototype,D=C.parse;C.parse=function(E){var R=E.date,S=E.utc,k=E.args;this.$u=S;var I=k[1];if(typeof I=="string"){var j=k[2]===!0,L=k[3]===!0,V=j||L,B=k[2];L&&(B=k[2]),c=this.$locale(),!j&&B&&(c=w.Ls[B]),this.$d=function(A,N,_,Y){try{if(["x","X"].indexOf(N)>-1)return new Date((N==="X"?1e3:1)*A);var H=g(N)(A),T=H.year,$=H.month,z=H.day,U=H.hours,G=H.minutes,W=H.seconds,Q=H.milliseconds,K=H.zone,Z=H.week,se=new Date,ie=z||(T||$?1:se.getDate()),be=T||se.getFullYear(),ee=0;T&&!$||(ee=$>0?$-1:se.getMonth());var Ae,Ie=U||0,Ee=G||0,Ge=W||0,Ce=Q||0;return K?new Date(Date.UTC(be,ee,ie,Ie,Ee,Ge,Ce+60*K.offset*1e3)):_?new Date(Date.UTC(be,ee,ie,Ie,Ee,Ge,Ce)):(Ae=new Date(be,ee,ie,Ie,Ee,Ge,Ce),Z&&(Ae=Y(Ae).week(Z).toDate()),Ae)}catch{return new Date("")}}(R,I,S,w),this.init(),B&&B!==!0&&(this.$L=this.locale(B).$L),V&&R!=this.format(I)&&(this.$d=new Date("")),c={}}else if(I instanceof Array)for(var P=I.length,O=1;O<=P;O+=1){k[1]=I[O-1];var M=w.apply(this,k);if(M.isValid()){this.$d=M.$d,this.$L=M.$L,this.init();break}O===P&&(this.$d=new Date(""))}else D.call(this,E)}}})}(Fr)),Fr.exports}var z0=Y0();const H0=as(z0);Mt.extend(H0);Mt.extend(_u);const U0={"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-]$/}},G0=({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"})=>{const[b,g]=d.useState(!1),[v,y]=d.useState(""),[w,C]=d.useState(o),D=d.useMemo(()=>h,[h]),E=d.useMemo(()=>U0[D],[D]),R=d.useMemo(()=>t||D.toLowerCase(),[t,D]),S=d.useCallback(P=>{const O=P.replace(/\D/g,""),{separator:M}=E;if(O.length<=2)return O;switch(D){case"MM/DD/YYYY":case"DD/MM/YYYY":return O.length<=4?`${O.substring(0,2)}${M}${O.substring(2)}`:`${O.substring(0,2)}${M}${O.substring(2,4)}${M}${O.substring(4,8)}`;case"YYYY-MM-DD":return O.length<=4?O:O.length<=6?`${O.substring(0,4)}${M}${O.substring(4)}`:`${O.substring(0,4)}${M}${O.substring(4,6)}${M}${O.substring(6,8)}`;case"DD-MM-YYYY":return O.length<=4?`${O.substring(0,2)}${M}${O.substring(2)}`:`${O.substring(0,2)}${M}${O.substring(2,4)}${M}${O.substring(4,8)}`;default:return P}},[D,E]),k=d.useMemo(()=>P=>{const O=P.trim();return O&&Mt(O,D,!0).isValid()?Mt(O,D):null},[D]),I=d.useCallback(P=>Mt(P).format(D),[D]);d.useEffect(()=>{y(o?I(o):""),C(o),Mt.locale(l)},[o,l,I]);const j=d.useCallback(P=>{let O=P.target.value;if(y(O),!O.trim()){C(void 0),a==null||a(void 0);return}const M=S(O);M!==O&&O.replace(/\D/g,"").length>1&&(y(M),O=M);const A=k(O);if(A!=null&&A.isValid()){const N=A.toDate();(!s||N>=s)&&(!c||N<=c)&&(C(N),a==null||a(N))}},[S,k,a,s,c]),L=d.useCallback(()=>{w&&y(I(w))},[w,I]),V=d.useCallback(P=>{P&&(y(I(P)),C(P),a==null||a(P),g(!1))},[a,I]),B=d.useCallback(P=>{if(!["Backspace","Delete","Tab","Enter","ArrowLeft","ArrowRight","ArrowUp","ArrowDown"].includes(P.key)&&!E.pattern.test(P.key)&&!P.ctrlKey&&!P.metaKey){P.preventDefault();return}P.key==="Enter"&&(P.preventDefault(),L())},[E.pattern,L]);return m.jsxs("div",{className:F("space-y-1",i),children:[e&&m.jsxs(an,{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:b,onOpenChange:g,children:[m.jsxs("div",{className:F("w-60 relative",p),children:[m.jsx(on,{type:"text",value:v,onChange:j,onBlur:L,onKeyDown:B,placeholder:R,disabled:u,readOnly:f,className:"w-full pr-12"}),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:()=>g(P=>!P),disabled:u||f,"aria-label":"Open calendar",children:m.jsx(xc,{strokeWidth:1,className:"h-5 w-5"})})})]}),m.jsx(fo,{className:"w-auto p-0",align:"start",children:m.jsx(F0,{mode:"single",selected:w,onSelect:V,fromDate:s,toDate:c})})]}),n&&m.jsx("p",{className:"text-xs text-gray-500",children: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}){return m.jsxs("div",{className:F("space-y-1",u),children:[e&&m.jsxs(an,{className:F("text-sm font-medium",l?"text-gray-400":"text-gray-700"),children:[e,s&&m.jsx("span",{className:"text-red-500 ml-1",children:"*"})]}),m.jsxs(Sa,{value:r,onValueChange:c,disabled:l,children:[m.jsx(Ur,{className:F("border-input focus-within:ring-primary",i&&"border-red-500 focus-within:ring-red-500",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(Ca,{placeholder:t})]})}),m.jsx(Gr,{children:n.map(p=>m.jsx(qr,{value:p.value,children:p.label},p.value))})]}),(a||i)&&m.jsx("p",{className:F("text-xs",i?"text-red-500":l?"text-gray-400":"text-gray-500"),children:i||a})]})}const q0=({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-red-500 text-red-600 hover:bg-red-50"}},g=u?"opacity-50 cursor-not-allowed":"cursor-pointer",v=i&&!u?"hover:shadow-md":"",y=`
172
172
  ${p}
173
173
  ${h[r]}
174
174
  ${b[n][t]}
175
175
  ${g}
176
176
  ${v}
177
177
  ${f}
178
- `.trim(),w=E=>{!u&&i&&i(E)},C=E=>{E.stopPropagation(),!u&&a&&a(E)},D=r==="small"?12:r==="large"?18:14;return m.jsxs("div",{className:y,onClick:w,...c,children:[l&&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 l=="string"?m.jsx("img",{src:l,alt:`Avatar for ${e}`,className:"w-full h-full object-cover"}):l}),s&&!l&&m.jsx("div",{className:"flex items-center",children:x.isValidElement(s)?x.cloneElement(s,{size:D}):s}),m.jsx("span",{children:e}),o&&m.jsx("button",{onClick:C,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(kn,{size:D})})]})},G0={small:"h-8 text-sm",medium:"h-10",large:"h-12 text-base"},q0={white:"bg-white border-gray-300",grey:"bg-gray-100 border-gray-300"},Pu=({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(Dc,{strokeWidth:1.1,className:"absolute left-4 top-1/2 transform -translate-y-1/2 text-gray-900 h-5 w-5"}),m.jsx(on,{placeholder:n,className:F("pl-12 rounded-full",G0[e],q0[t],r),onChange:o,value:a,disabled:i})]}),V0=[{value:"all",label:"All Categories"},{value:"electronics",label:"Electronics"},{value:"clothing",label:"Clothing"},{value:"books",label:"Books"}],K0=[{value:"newest",label:"Newest First"},{value:"oldest",label:"Oldest First"},{value:"name-asc",label:"Name A-Z"},{value:"name-desc",label:"Name Z-A"}],X0=({className:e,searchPlaceholder:t="Search...",categories:n=V0,sortOptions:r=K0,showDateFilter:o=!1,onSearch:a,onFilter:i,onClear:s,defaultFilters:l})=>{const[u,f]=x.useState({category:(l==null?void 0:l.category)??"",sort:(l==null?void 0:l.sort)??"",dateFrom:l==null?void 0:l.dateFrom,dateTo:l==null?void 0:l.dateTo}),[c,p]=x.useState(!1),[h,b]=x.useState(!1),[g,v]=x.useState(u.dateFrom??new Date),[y,w]=x.useState(u.dateTo??new Date),C=(R,S)=>{const k={...u,[R]:S};f(k),i==null||i(k)},D=()=>{f({category:"",sort:"",dateFrom:void 0,dateTo:void 0}),s==null||s()},E=Object.values(u).some(R=>R!==""&&R!==void 0);return m.jsxs("div",{className:F("space-y-4",e),children:[m.jsx(Pu,{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(Wh,{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=>C("category",R),className:"min-w-[140px]"}),m.jsx(Cn,{placeholder:"Sort by",options:r,onValueChange:R=>C("sort",R),className:"min-w-[140px]"}),o&&m.jsxs(m.Fragment,{children:[m.jsx(Vr,{placeholder:"From date",value:u.dateFrom,onSelect:R=>{C("dateFrom",R),v(R??g)},className:"min-w-[140px]",open:c,onOpenChange:p,month:g,onMonthChange:v}),m.jsx(Vr,{placeholder:"To date",value:u.dateTo,onSelect:R=>{C("dateTo",R),w(R??y)},className:"min-w-[140px]",open:h,onOpenChange:b,month:y,onMonthChange:w})]}),E&&m.jsxs(kt,{variant:"outline",size:"small",onClick:D,className:"flex items-center gap-1",children:[m.jsx(kn,{className:"h-3 w-3"}),"Clear"]})]})]})},Z0=[{value:"personal",label:"Personal Account"},{value:"business",label:"Business Account"},{value:"developer",label:"Developer Account"}];function Q0({className:e,showDateOfBirth:t=!0,accountTypes:n=Z0,onValueChange:r}){const[o,a]=x.useState(),[i,s]=x.useState(!1),[l,u]=x.useState(!1),[f,c]=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(tt,{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(tt,{label:"Email Address",type:"email",placeholder:"Enter your email",icon:m.jsx(Ec,{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:l,onShowPasswordChange:u})]}),m.jsx(Cn,{label:"Account Type",placeholder:"Select account type",options:n,leadingIcon:m.jsx(eg,{className:"h-4 w-4"}),required:!0,onValueChange:w=>r==null?void 0:r("accountType",w)}),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:w=>{a(w),h(w??p),w&&(r==null||r("dateOfBirth",w))},open:f,onOpenChange:c,month:p,onMonthChange:h})]})}const J0=[{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 e1({className:e,countries:t=J0,onValueChange:n}){return m.jsxs("div",{className:F("space-y-4",e),children:[m.jsx(tt,{label:"Street Address",placeholder:"Enter street address",required:!0,onChange:r=>n==null?void 0:n("streetAddress",r.target.value)}),m.jsx(tt,{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(tt,{label:"City",placeholder:"Enter city",required:!0,onChange:r=>n==null?void 0:n("city",r.target.value)}),m.jsx(tt,{label:"State/Province",placeholder:"Enter state",required:!0,onChange:r=>n==null?void 0:n("state",r.target.value)}),m.jsx(tt,{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(Uh,{className:"h-4 w-4"}),required:!0,onValueChange:r=>n==null?void 0:n("country",r)})]})}const t1=[{value:"sales",label:"Sales"},{value:"support",label:"Support"},{value:"general",label:"General Inquiry"}];function n1({className:e,showDepartment:t=!0,departmentOptions:n=t1,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(tt,{label:"First Name",placeholder:"Enter first name",required:!0,onChange:o=>r==null?void 0:r("firstName",o.target.value)}),m.jsx(tt,{label:"Last Name",placeholder:"Enter last name",required:!0,onChange:o=>r==null?void 0:r("lastName",o.target.value)})]}),m.jsx(tt,{label:"Email Address",type:"email",placeholder:"Enter your email",icon:m.jsx(Ec,{className:"h-4 w-4"}),required:!0,onChange:o=>r==null?void 0:r("email",o.target.value)}),m.jsx(tt,{label:"Phone Number",type:"tel",placeholder:"+1 (555) 000-0000",icon:m.jsx(Kh,{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(Sh,{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 Pi=1,r1=.9,o1=.8,a1=.17,qo=.1,Vo=.999,s1=.9999,i1=.99,c1=/[\\\/_+.#"@\[\(\{&]/,l1=/[\\\/_+.#"@\[\(\{&]/g,u1=/[\s-]/,Au=/[\s-]/g;function Da(e,t,n,r,o,a,i){if(a===t.length)return o===e.length?Pi:i1;var s=`${o},${a}`;if(i[s]!==void 0)return i[s];for(var l=r.charAt(a),u=n.indexOf(l,o),f=0,c,p,h,b;u>=0;)c=Da(e,t,n,r,u+1,a+1,i),c>f&&(u===o?c*=Pi:c1.test(e.charAt(u-1))?(c*=o1,h=e.slice(o,u-1).match(l1),h&&o>0&&(c*=Math.pow(Vo,h.length))):u1.test(e.charAt(u-1))?(c*=r1,b=e.slice(o,u-1).match(Au),b&&o>0&&(c*=Math.pow(Vo,b.length))):(c*=a1,o>0&&(c*=Math.pow(Vo,u-o))),e.charAt(u)!==t.charAt(a)&&(c*=s1)),(c<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>c&&(c=p*qo)),c>f&&(f=c),u=n.indexOf(l,u+1);return i[s]=f,f}function Ai(e){return e.toLowerCase().replace(Au," ")}function d1(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 f1="DismissableLayer",Ma="dismissableLayer.update",m1="dismissableLayer.pointerDownOutside",p1="dismissableLayer.focusOutside",Ii,Iu=d.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),ju=d.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:i,onDismiss:s,...l}=e,u=d.useContext(Iu),[f,c]=d.useState(null),p=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,h]=d.useState({}),b=fe(t,S=>c(S)),g=Array.from(u.layers),[v]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),y=g.indexOf(v),w=f?g.indexOf(f):-1,C=u.layersWithOutsidePointerEventsDisabled.size>0,D=w>=y,E=v1(S=>{const k=S.target,I=[...u.branches].some(j=>j.contains(k));!D||I||(o==null||o(S),i==null||i(S),S.defaultPrevented||s==null||s())},p),R=b1(S=>{const k=S.target;[...u.branches].some(j=>j.contains(k))||(a==null||a(S),i==null||i(S),S.defaultPrevented||s==null||s())},p);return nr(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&&(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,{...l,ref:b,style:{pointerEvents:C?D?"auto":"none":void 0,...e.style},onFocusCapture:Ko(e.onFocusCapture,R.onFocusCapture),onBlurCapture:Ko(e.onBlurCapture,R.onBlurCapture),onPointerDownCapture:Ko(e.onPointerDownCapture,E.onPointerDownCapture)})});ju.displayName=f1;var h1="DismissableLayerBranch",g1=d.forwardRef((e,t)=>{const n=d.useContext(Iu),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})});g1.displayName=h1;function v1(e,t=globalThis==null?void 0:globalThis.document){const n=Pe(e),r=d.useRef(!1),o=d.useRef(()=>{});return d.useEffect(()=>{const a=s=>{if(s.target&&!r.current){let l=function(){$u(m1,n,u,{discrete:!0})};const u={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=l,t.addEventListener("click",o.current,{once:!0})):l()}else t.removeEventListener("click",o.current);r.current=!1},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 b1(e,t=globalThis==null?void 0:globalThis.document){const n=Pe(e),r=d.useRef(!1);return d.useEffect(()=>{const o=a=>{a.target&&!r.current&&$u(p1,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 $u(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?Nn(o,a):o.dispatchEvent(a)}function y1(e,t){return d.useReducer((n,r)=>t[n][r]??n,e)}var vo=e=>{const{present:t,children:n}=e,r=w1(t),o=typeof n=="function"?n({present:r.isPresent}):d.Children.only(n),a=fe(r.ref,x1(o));return typeof n=="function"||r.isPresent?d.cloneElement(o,{ref:a}):null};vo.displayName="Presence";function w1(e){const[t,n]=d.useState(),r=d.useRef(null),o=d.useRef(e),a=d.useRef("none"),i=e?"mounted":"unmounted",[s,l]=y1(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]),Ne(()=>{const u=r.current,f=o.current;if(f!==e){const p=a.current,h=kr(u);e?l("MOUNT"):h==="none"||(u==null?void 0:u.display)==="none"?l("UNMOUNT"):l(f&&p!==h?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),Ne(()=>{if(t){let u;const f=t.ownerDocument.defaultView??window,c=h=>{const g=kr(r.current).includes(CSS.escape(h.animationName));if(h.target===t&&g&&(l("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",c),t.addEventListener("animationend",c),()=>{f.clearTimeout(u),t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",c),t.removeEventListener("animationend",c)}}else l("ANIMATION_END")},[t,l]),{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 x1(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 S1(){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",[Lu,SM]=He(bo),[C1,ft]=Lu(bo),Fu=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:a,modal:i=!0}=e,s=d.useRef(null),l=d.useRef(null),[u,f]=rt({prop:r,defaultProp:o??!1,onChange:a,caller:bo});return m.jsx(C1,{scope:t,triggerRef:s,contentRef:l,contentId:Re(),titleId:Re(),descriptionId:Re(),open:u,onOpenChange:f,onOpenToggle:d.useCallback(()=>f(c=>!c),[f]),modal:i,children:n})};Fu.displayName=bo;var Wu="DialogTrigger",Bu=d.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=ft(Wu,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)})});Bu.displayName=Wu;var ss="DialogPortal",[E1,Yu]=Lu(ss,{forceMount:void 0}),zu=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,a=ft(ss,t);return m.jsx(E1,{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})}))})};zu.displayName=ss;var Kr="DialogOverlay",Hu=d.forwardRef((e,t)=>{const n=Yu(Kr,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,a=ft(Kr,e.__scopeDialog);return a.modal?m.jsx(vo,{present:r||a.open,children:m.jsx(M1,{...o,ref:t})}):null});Hu.displayName=Kr;var D1=Lt("DialogOverlay.RemoveScroll"),M1=d.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=ft(Kr,n);return m.jsx(cr,{as:D1,allowPinchZoom:!0,shards:[o.contentRef],children:m.jsx(J.div,{"data-state":cs(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),nn="DialogContent",Uu=d.forwardRef((e,t)=>{const n=Yu(nn,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,a=ft(nn,e.__scopeDialog);return m.jsx(vo,{present:r||a.open,children:a.modal?m.jsx(N1,{...o,ref:t}):m.jsx(k1,{...o,ref:t})})});Uu.displayName=nn;var N1=d.forwardRef((e,t)=>{const n=ft(nn,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(Gu,{...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())})}),k1=d.forwardRef((e,t)=>{const n=ft(nn,e.__scopeDialog),r=d.useRef(!1),o=d.useRef(!1);return m.jsx(Gu,{...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 l,u;(l=e.onInteractOutside)==null||l.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()}})}),Gu=d.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:a,...i}=e,s=ft(nn,n),l=d.useRef(null),u=fe(t,l);return S1(),m.jsxs(m.Fragment,{children:[m.jsx(rr,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:a,children:m.jsx(ju,{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(R1,{titleId:s.titleId}),m.jsx(T1,{contentRef:l,descriptionId:s.descriptionId})]})]})}),is="DialogTitle",qu=d.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=ft(is,n);return m.jsx(J.h2,{id:o.titleId,...r,ref:t})});qu.displayName=is;var Vu="DialogDescription",Ku=d.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=ft(Vu,n);return m.jsx(J.p,{id:o.descriptionId,...r,ref:t})});Ku.displayName=Vu;var Xu="DialogClose",Zu=d.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=ft(Xu,n);return m.jsx(J.button,{type:"button",...r,ref:t,onClick:Gn(e.onClick,()=>o.onOpenChange(!1))})});Zu.displayName=Xu;function cs(e){return e?"open":"closed"}var Qu="DialogTitleWarning",[CM,Ju]=ng(Qu,{contentName:nn,titleName:is,docsSlug:"dialog"}),R1=({titleId:e})=>{const t=Ju(Qu),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
178
+ `.trim(),w=E=>{!u&&i&&i(E)},C=E=>{E.stopPropagation(),!u&&a&&a(E)},D=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:D}):s}),m.jsx("span",{children:e}),o&&m.jsx("button",{onClick:C,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(kn,{size:D})})]})},V0={small:"h-8 text-sm",medium:"h-10",large:"h-12 text-base"},K0={white:"bg-white border-gray-300",grey:"bg-gray-100 border-gray-300"},Pu=({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(Dc,{strokeWidth:1.1,className:"absolute left-4 top-1/2 transform -translate-y-1/2 text-gray-900 h-5 w-5"}),m.jsx(on,{placeholder:n,className:F("pl-12 rounded-full",V0[e],K0[t],r),onChange:o,value:a,disabled:i})]}),X0=[{value:"all",label:"All Categories"},{value:"electronics",label:"Electronics"},{value:"clothing",label:"Clothing"},{value:"books",label:"Books"}],Z0=[{value:"newest",label:"Newest First"},{value:"oldest",label:"Oldest First"},{value:"name-asc",label:"Name A-Z"},{value:"name-desc",label:"Name Z-A"}],Q0=({className:e,searchPlaceholder:t="Search...",categories:n=X0,sortOptions:r=Z0,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),C=(R,S)=>{const k={...u,[R]:S};f(k),i==null||i(k)},D=()=>{f({category:"",sort:"",dateFrom:void 0,dateTo:void 0}),s==null||s()},E=Object.values(u).some(R=>R!==""&&R!==void 0);return m.jsxs("div",{className:F("space-y-4",e),children:[m.jsx(Pu,{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(Yh,{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=>C("category",R),className:"min-w-[140px]"}),m.jsx(Cn,{placeholder:"Sort by",options:r,onValueChange:R=>C("sort",R),className:"min-w-[140px]"}),o&&m.jsxs(m.Fragment,{children:[m.jsx(Vr,{placeholder:"From date",value:u.dateFrom,onSelect:R=>{C("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=>{C("dateTo",R),w(R??y)},className:"min-w-[140px]",open:h,onOpenChange:b,month:y,onMonthChange:w})]}),E&&m.jsxs(kt,{variant:"outline",size:"small",onClick:D,className:"flex items-center gap-1",children:[m.jsx(kn,{className:"h-3 w-3"}),"Clear"]})]})]})},J0=[{value:"personal",label:"Personal Account"},{value:"business",label:"Business Account"},{value:"developer",label:"Developer Account"}];function e1({className:e,showDateOfBirth:t=!0,accountTypes:n=J0,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(tt,{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(tt,{label:"Email Address",type:"email",placeholder:"Enter your email",icon:m.jsx(Ec,{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(ng,{className:"h-4 w-4"}),required:!0,onValueChange:w=>r==null?void 0:r("accountType",w)}),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:w=>{a(w),h(w??p),w&&(r==null||r("dateOfBirth",w))},open:f,onOpenChange:l,month:p,onMonthChange:h})]})}const t1=[{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 n1({className:e,countries:t=t1,onValueChange:n}){return m.jsxs("div",{className:F("space-y-4",e),children:[m.jsx(tt,{label:"Street Address",placeholder:"Enter street address",required:!0,onChange:r=>n==null?void 0:n("streetAddress",r.target.value)}),m.jsx(tt,{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(tt,{label:"City",placeholder:"Enter city",required:!0,onChange:r=>n==null?void 0:n("city",r.target.value)}),m.jsx(tt,{label:"State/Province",placeholder:"Enter state",required:!0,onChange:r=>n==null?void 0:n("state",r.target.value)}),m.jsx(tt,{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(qh,{className:"h-4 w-4"}),required:!0,onValueChange:r=>n==null?void 0:n("country",r)})]})}const r1=[{value:"sales",label:"Sales"},{value:"support",label:"Support"},{value:"general",label:"General Inquiry"}];function o1({className:e,showDepartment:t=!0,departmentOptions:n=r1,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(tt,{label:"First Name",placeholder:"Enter first name",required:!0,onChange:o=>r==null?void 0:r("firstName",o.target.value)}),m.jsx(tt,{label:"Last Name",placeholder:"Enter last name",required:!0,onChange:o=>r==null?void 0:r("lastName",o.target.value)})]}),m.jsx(tt,{label:"Email Address",type:"email",placeholder:"Enter your email",icon:m.jsx(Ec,{className:"h-4 w-4"}),required:!0,onChange:o=>r==null?void 0:r("email",o.target.value)}),m.jsx(tt,{label:"Phone Number",type:"tel",placeholder:"+1 (555) 000-0000",icon:m.jsx(Zh,{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(Eh,{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 Pi=1,a1=.9,s1=.8,i1=.17,qo=.1,Vo=.999,c1=.9999,l1=.99,u1=/[\\\/_+.#"@\[\(\{&]/,d1=/[\\\/_+.#"@\[\(\{&]/g,f1=/[\s-]/,Au=/[\s-]/g;function Da(e,t,n,r,o,a,i){if(a===t.length)return o===e.length?Pi:l1;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*=Pi:u1.test(e.charAt(u-1))?(l*=s1,h=e.slice(o,u-1).match(d1),h&&o>0&&(l*=Math.pow(Vo,h.length))):f1.test(e.charAt(u-1))?(l*=a1,b=e.slice(o,u-1).match(Au),b&&o>0&&(l*=Math.pow(Vo,b.length))):(l*=i1,o>0&&(l*=Math.pow(Vo,u-o))),e.charAt(u)!==t.charAt(a)&&(l*=c1)),(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(Au," ")}function m1(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 p1="DismissableLayer",Ma="dismissableLayer.update",h1="dismissableLayer.pointerDownOutside",g1="dismissableLayer.focusOutside",Ii,Iu=d.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),ju=d.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:i,onDismiss:s,...c}=e,u=d.useContext(Iu),[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,C=u.layersWithOutsidePointerEventsDisabled.size>0,D=w>=y,E=y1(S=>{const k=S.target,I=[...u.branches].some(j=>j.contains(k));!D||I||(o==null||o(S),i==null||i(S),S.defaultPrevented||s==null||s())},p),R=w1(S=>{const k=S.target;[...u.branches].some(j=>j.contains(k))||(a==null||a(S),i==null||i(S),S.defaultPrevented||s==null||s())},p);return nr(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&&(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:C?D?"auto":"none":void 0,...e.style},onFocusCapture:Ko(e.onFocusCapture,R.onFocusCapture),onBlurCapture:Ko(e.onBlurCapture,R.onBlurCapture),onPointerDownCapture:Ko(e.onPointerDownCapture,E.onPointerDownCapture)})});ju.displayName=p1;var v1="DismissableLayerBranch",b1=d.forwardRef((e,t)=>{const n=d.useContext(Iu),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})});b1.displayName=v1;function y1(e,t=globalThis==null?void 0:globalThis.document){const n=Pe(e),r=d.useRef(!1),o=d.useRef(()=>{});return d.useEffect(()=>{const a=s=>{if(s.target&&!r.current){let c=function(){$u(h1,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 w1(e,t=globalThis==null?void 0:globalThis.document){const n=Pe(e),r=d.useRef(!1);return d.useEffect(()=>{const o=a=>{a.target&&!r.current&&$u(g1,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 $u(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?Nn(o,a):o.dispatchEvent(a)}function x1(e,t){return d.useReducer((n,r)=>t[n][r]??n,e)}var vo=e=>{const{present:t,children:n}=e,r=S1(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 S1(e){const[t,n]=d.useState(),r=d.useRef(null),o=d.useRef(e),a=d.useRef("none"),i=e?"mounted":"unmounted",[s,c]=x1(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]),Ne(()=>{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]),Ne(()=>{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 E1(){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",[Lu,SM]=He(bo),[D1,ft]=Lu(bo),Fu=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]=rt({prop:r,defaultProp:o??!1,onChange:a,caller:bo});return m.jsx(D1,{scope:t,triggerRef:s,contentRef:c,contentId:Re(),titleId:Re(),descriptionId:Re(),open:u,onOpenChange:f,onOpenToggle:d.useCallback(()=>f(l=>!l),[f]),modal:i,children:n})};Fu.displayName=bo;var Wu="DialogTrigger",Bu=d.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=ft(Wu,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)})});Bu.displayName=Wu;var ss="DialogPortal",[M1,Yu]=Lu(ss,{forceMount:void 0}),zu=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,a=ft(ss,t);return m.jsx(M1,{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})}))})};zu.displayName=ss;var Kr="DialogOverlay",Hu=d.forwardRef((e,t)=>{const n=Yu(Kr,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,a=ft(Kr,e.__scopeDialog);return a.modal?m.jsx(vo,{present:r||a.open,children:m.jsx(k1,{...o,ref:t})}):null});Hu.displayName=Kr;var N1=Lt("DialogOverlay.RemoveScroll"),k1=d.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=ft(Kr,n);return m.jsx(cr,{as:N1,allowPinchZoom:!0,shards:[o.contentRef],children:m.jsx(J.div,{"data-state":cs(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),nn="DialogContent",Uu=d.forwardRef((e,t)=>{const n=Yu(nn,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,a=ft(nn,e.__scopeDialog);return m.jsx(vo,{present:r||a.open,children:a.modal?m.jsx(R1,{...o,ref:t}):m.jsx(O1,{...o,ref:t})})});Uu.displayName=nn;var R1=d.forwardRef((e,t)=>{const n=ft(nn,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(Gu,{...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())})}),O1=d.forwardRef((e,t)=>{const n=ft(nn,e.__scopeDialog),r=d.useRef(!1),o=d.useRef(!1);return m.jsx(Gu,{...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()}})}),Gu=d.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:a,...i}=e,s=ft(nn,n),c=d.useRef(null),u=fe(t,c);return E1(),m.jsxs(m.Fragment,{children:[m.jsx(rr,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:a,children:m.jsx(ju,{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(T1,{titleId:s.titleId}),m.jsx(P1,{contentRef:c,descriptionId:s.descriptionId})]})]})}),is="DialogTitle",qu=d.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=ft(is,n);return m.jsx(J.h2,{id:o.titleId,...r,ref:t})});qu.displayName=is;var Vu="DialogDescription",Ku=d.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=ft(Vu,n);return m.jsx(J.p,{id:o.descriptionId,...r,ref:t})});Ku.displayName=Vu;var Xu="DialogClose",Zu=d.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=ft(Xu,n);return m.jsx(J.button,{type:"button",...r,ref:t,onClick:Gn(e.onClick,()=>o.onOpenChange(!1))})});Zu.displayName=Xu;function cs(e){return e?"open":"closed"}var Qu="DialogTitleWarning",[CM,Ju]=og(Qu,{contentName:nn,titleName:is,docsSlug:"dialog"}),T1=({titleId:e})=>{const t=Ju(Qu),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},O1="DialogDescriptionWarning",T1=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Ju(O1).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=Fu,ed=Bu,us=zu,yo=Hu,wo=Uu,ds=qu,fs=Ku,ms=Zu,Fn='[cmdk-group=""]',Zo='[cmdk-group-items=""]',_1='[cmdk-group-heading=""]',td='[cmdk-item=""]',Li=`${td}:not([aria-disabled="true"])`,Na="cmdk-item-select",gn="data-value",P1=(e,t,n)=>d1(e,t,n),nd=d.createContext(void 0),pr=()=>d.useContext(nd),rd=d.createContext(void 0),ps=()=>d.useContext(rd),od=d.createContext(void 0),ad=d.forwardRef((e,t)=>{let n=vn(()=>{var T,$;return{search:"",value:($=(T=e.value)!=null?T:e.defaultValue)!=null?$:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),r=vn(()=>new Set),o=vn(()=>new Map),a=vn(()=>new Map),i=vn(()=>new Set),s=sd(e),{label:l,children:u,value:f,onValueChange:c,filter:p,shouldFilter:h,loop:b,disablePointerSelection:g=!1,vimBindings:v=!0,...y}=e,w=Re(),C=Re(),D=Re(),E=d.useRef(null),R=H1();rn(()=>{if(f!==void 0){let T=f.trim();n.current.value=T,S.emit()}},[f]),rn(()=>{R(6,B)},[]);let S=d.useMemo(()=>({subscribe:T=>(i.current.add(T),()=>i.current.delete(T)),snapshot:()=>n.current,setState:(T,$,z)=>{var U,G,W,Q;if(!Object.is(n.current[T],$)){if(n.current[T]=$,T==="search")V(),j(),R(1,L);else if(T==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let K=document.getElementById(D);K?K.focus():(U=document.getElementById(w))==null||U.focus()}if(R(7,()=>{var K;n.current.selectedItemId=(K=P())==null?void 0:K.id,S.emit()}),z||R(5,B),((G=s.current)==null?void 0:G.value)!==void 0){let K=$??"";(Q=(W=s.current).onValueChange)==null||Q.call(W,K);return}}S.emit()}},emit:()=>{i.current.forEach(T=>T())}}),[]),k=d.useMemo(()=>({value:(T,$,z)=>{var U;$!==((U=a.current.get(T))==null?void 0:U.value)&&(a.current.set(T,{value:$,keywords:z}),n.current.filtered.items.set(T,I($,z)),R(2,()=>{j(),S.emit()}))},item:(T,$)=>(r.current.add(T),$&&(o.current.has($)?o.current.get($).add(T):o.current.set($,new Set([T]))),R(3,()=>{V(),j(),n.current.value||L(),S.emit()}),()=>{a.current.delete(T),r.current.delete(T),n.current.filtered.items.delete(T);let z=P();R(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:l||e["aria-label"],getDisablePointerSelection:()=>s.current.disablePointerSelection,listId:w,inputId:D,labelId:C,listInnerRef:E}),[]);function I(T,$){var z,U;let G=(U=(z=s.current)==null?void 0:z.filter)!=null?U:P1;return T?G(T,n.current.search,$):0}function j(){if(!n.current.search||s.current.shouldFilter===!1)return;let T=n.current.filtered.items,$=[];n.current.filtered.groups.forEach(U=>{let G=o.current.get(U),W=0;G.forEach(Q=>{let K=T.get(Q);W=Math.max(K,W)}),$.push([U,W])});let z=E.current;O().sort((U,G)=>{var W,Q;let K=U.getAttribute("id"),Z=G.getAttribute("id");return((W=T.get(Z))!=null?W:0)-((Q=T.get(K))!=null?Q: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} > *`))}),$.sort((U,G)=>G[1]-U[1]).forEach(U=>{var G;let W=(G=E.current)==null?void 0:G.querySelector(`${Fn}[${gn}="${encodeURIComponent(U[0])}"]`);W==null||W.parentElement.appendChild(W)})}function L(){let T=O().find(z=>z.getAttribute("aria-disabled")!=="true"),$=T==null?void 0:T.getAttribute(gn);S.setState("value",$||void 0)}function V(){var T,$,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 Q=($=(T=a.current.get(W))==null?void 0:T.value)!=null?$:"",K=(U=(z=a.current.get(W))==null?void 0:z.keywords)!=null?U:[],Z=I(Q,K);n.current.filtered.items.set(W,Z),Z>0&&G++}for(let[W,Q]of o.current)for(let K of Q)if(n.current.filtered.items.get(K)>0){n.current.filtered.groups.add(W);break}n.current.filtered.count=G}function B(){var T,$,z;let U=P();U&&(((T=U.parentElement)==null?void 0:T.firstChild)===U&&((z=($=U.closest(Fn))==null?void 0:$.querySelector(_1))==null||z.scrollIntoView({block:"nearest"})),U.scrollIntoView({block:"nearest"}))}function P(){var T;return(T=E.current)==null?void 0:T.querySelector(`${td}[aria-selected="true"]`)}function O(){var T;return Array.from(((T=E.current)==null?void 0:T.querySelectorAll(Li))||[])}function M(T){let $=O()[T];$&&S.setState("value",$.getAttribute(gn))}function A(T){var $;let z=P(),U=O(),G=U.findIndex(Q=>Q===z),W=U[G+T];($=s.current)!=null&&$.loop&&(W=G+T<0?U[U.length-1]:G+T===U.length?U[0]:U[G+T]),W&&S.setState("value",W.getAttribute(gn))}function N(T){let $=P(),z=$==null?void 0:$.closest(Fn),U;for(;z&&!U;)z=T>0?Y1(z,Fn):z1(z,Fn),U=z==null?void 0:z.querySelector(Li);U?S.setState("value",U.getAttribute(gn)):A(T)}let _=()=>M(O().length-1),Y=T=>{T.preventDefault(),T.metaKey?_():T.altKey?N(1):A(1)},H=T=>{T.preventDefault(),T.metaKey?M(0):T.altKey?N(-1):A(-1)};return d.createElement(J.div,{ref:t,tabIndex:-1,...y,"cmdk-root":"",onKeyDown:T=>{var $;($=y.onKeyDown)==null||$.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(),M(0);break}case"End":{T.preventDefault(),_();break}case"Enter":{T.preventDefault();let U=P();if(U){let G=new Event(Na);U.dispatchEvent(G)}}}}},d.createElement("label",{"cmdk-label":"",htmlFor:k.inputId,id:k.labelId,style:G1},l),xo(e,T=>d.createElement(rd.Provider,{value:S},d.createElement(nd.Provider,{value:k},T))))}),A1=d.forwardRef((e,t)=>{var n,r;let o=Re(),a=d.useRef(null),i=d.useContext(od),s=pr(),l=sd(e),u=(r=(n=l.current)==null?void 0:n.forceMount)!=null?r:i==null?void 0:i.forceMount;rn(()=>{if(!u)return s.item(o,i==null?void 0:i.id)},[u]);let f=id(o,a,[e.value,e.children,a],e.keywords),c=ps(),p=Bt(R=>R.value&&R.value===f.current),h=Bt(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=l.current).onSelect)==null||S.call(R,f.current)}function g(){c.setState("value",f.current,!0)}if(!h)return null;let{disabled:v,value:y,onSelect:w,forceMount:C,keywords:D,...E}=e;return d.createElement(J.div,{ref:Nt(a,t),...E,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)}),I1=d.forwardRef((e,t)=>{let{heading:n,children:r,forceMount:o,...a}=e,i=Re(),s=d.useRef(null),l=d.useRef(null),u=Re(),f=pr(),c=Bt(h=>o||f.filter()===!1?!0:h.search?h.filtered.groups.has(i):!0);rn(()=>f.group(i),[]),id(i,s,[e.value,e.heading,l]);let p=d.useMemo(()=>({id:i,forceMount:o}),[o]);return d.createElement(J.div,{ref:Nt(s,t),...a,"cmdk-group":"",role:"presentation",hidden:c?void 0:!0},n&&d.createElement("div",{ref:l,"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(od.Provider,{value:p},h))))}),j1=d.forwardRef((e,t)=>{let{alwaysRender:n,...r}=e,o=d.useRef(null),a=Bt(i=>!i.search);return!n&&!a?null:d.createElement(J.div,{ref:Nt(o,t),...r,"cmdk-separator":"",role:"separator"})}),$1=d.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,o=e.value!=null,a=ps(),i=Bt(u=>u.search),s=Bt(u=>u.selectedItemId),l=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":l.listId,"aria-labelledby":l.labelId,"aria-activedescendant":s,id:l.inputId,type:"text",value:o?e.value:i,onChange:u=>{o||a.setState("search",u.target.value),n==null||n(u.target.value)}})}),L1=d.forwardRef((e,t)=>{let{children:n,label:r="Suggestions",...o}=e,a=d.useRef(null),i=d.useRef(null),s=Bt(u=>u.selectedItemId),l=pr();return d.useEffect(()=>{if(i.current&&a.current){let u=i.current,f=a.current,c,p=new ResizeObserver(()=>{c=requestAnimationFrame(()=>{let h=u.offsetHeight;f.style.setProperty("--cmdk-list-height",h.toFixed(1)+"px")})});return p.observe(u),()=>{cancelAnimationFrame(c),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:l.listId},xo(e,u=>d.createElement("div",{ref:Nt(i,l.listInnerRef),"cmdk-list-sizer":""},u)))}),F1=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(ad,{ref:t,...s}))))}),W1=d.forwardRef((e,t)=>Bt(n=>n.filtered.count===0)?d.createElement(J.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),B1=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)))}),Be=Object.assign(ad,{List:L1,Item:A1,Input:$1,Group:I1,Separator:j1,Dialog:F1,Empty:W1,Loading:B1});function Y1(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function z1(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function sd(e){let t=d.useRef(e);return rn(()=>{t.current=e}),t}var rn=typeof window>"u"?d.useEffect:d.useLayoutEffect;function vn(e){let t=d.useRef();return t.current===void 0&&(t.current=e()),t}function Bt(e){let t=ps(),n=()=>e(t.snapshot());return d.useSyncExternalStore(t.subscribe,n,n)}function id(e,t,n,r=[]){let o=d.useRef(),a=pr();return rn(()=>{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}})(),l=r.map(u=>u.trim());a.value(e,s,l),(i=t.current)==null||i.setAttribute(gn,s),o.current=s}),o}var H1=()=>{let[e,t]=d.useState(),n=vn(()=>new Map);return rn(()=>{n.current.forEach(r=>r()),n.current=new Map},[e]),(r,o)=>{n.current.set(r,o),t({})}};function U1(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(U1(t),{ref:t.ref},n(t.props.children)):n(t)}var G1={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};const q1=ls,V1=ed,K1=us,X1=ms,cd=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}));cd.displayName=yo.displayName;const ld=d.forwardRef(({className:e,children:t,...n},r)=>m.jsxs(K1,{children:[m.jsx(cd,{}),m.jsxs(wo,{ref:r,className:F("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...n,children:[t,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(kn,{className:"h-4 w-4"}),m.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));ld.displayName=wo.displayName;const ud=({className:e,...t})=>m.jsx("div",{className:F("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});ud.displayName="DialogHeader";const dd=({className:e,...t})=>m.jsx("div",{className:F("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});dd.displayName="DialogFooter";const fd=d.forwardRef(({className:e,...t},n)=>m.jsx(ds,{ref:n,className:F("text-lg font-semibold leading-none tracking-tight",e),...t}));fd.displayName=ds.displayName;const md=d.forwardRef(({className:e,...t},n)=>m.jsx(fs,{ref:n,className:F("text-sm text-muted-foreground",e),...t}));md.displayName=fs.displayName;const Z1=d.forwardRef(({className:e,...t},n)=>m.jsx(Be,{ref:n,className:F("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...t}));Z1.displayName=Be.displayName;const pd=d.forwardRef(({className:e,...t},n)=>m.jsxs("div",{className:"flex items-center h-auto px-3","cmdk-input-wrapper":"",children:[m.jsx(Dc,{strokeWidth:1.25,className:"mr-2 h-4 w-4 shrink-0"}),m.jsx(Be.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})]}));pd.displayName=Be.Input.displayName;const hd=d.forwardRef(({className:e,...t},n)=>m.jsx(Be.List,{ref:n,className:F("max-h-[300px] overflow-y-auto overflow-x-hidden",e),...t}));hd.displayName=Be.List.displayName;const Q1=d.forwardRef((e,t)=>m.jsx(Be.Empty,{ref:t,className:"py-6 text-center text-sm",...e}));Q1.displayName=Be.Empty.displayName;const gd=d.forwardRef(({className:e,...t},n)=>m.jsx(Be.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}));gd.displayName=Be.Group.displayName;const J1=d.forwardRef(({className:e,...t},n)=>m.jsx(Be.Separator,{ref:n,className:F("-mx-1 h-px bg-border",e),...t}));J1.displayName=Be.Separator.displayName;const vd=d.forwardRef(({className:e,...t},n)=>m.jsx(Be.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}));vd.displayName=Be.Item.displayName;function eS({className:e,...t}){return m.jsx("div",{className:F("animate-pulse rounded-md bg-muted",e),...t})}function tS(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 nS=({options:e,placeholder:t,emptyMessage:n,value:r,onValueChange:o,disabled:a,isLoading:i=!1,className:s,size:l,variant:u})=>{const{variantClasses:f,combined:c}=tS(l,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)||""),C=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]),D=x.useCallback(()=>{b(!1),w((g==null?void 0:g.label)||"")},[g]),E=x.useCallback(R=>{w(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(Be,{onKeyDown:C,children:[m.jsxs("div",{className:F("rounded-full border bg-gray-100",f,s),children:[" ",m.jsx(pd,{ref:p,value:y,onValueChange:i?void 0:w,onBlur:D,onFocus:()=>b(!0),placeholder:t,disabled:a,className:c})]}),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(hd,{className:"rounded-lg ring-1 ring-slate-200 dark:ring-gray-700",children:[i?m.jsx(Be.Loading,{children:m.jsx("div",{className:"p-1",children:m.jsx(eS,{className:"h-8 w-full"})})}):null,e.length>0&&!i?m.jsx(gd,{children:e.map(R=>{const S=(g==null?void 0:g.value)===R.value;return m.jsxs(vd,{value:R.label,onMouseDown:k=>{k.preventDefault(),k.stopPropagation()},onSelect:()=>E(R),className:F("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(Be.Empty,{className:"select-none rounded-sm px-2 py-3 text-center text-sm dark:text-gray-400",children:n})]})})})]})},rS=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 oS({className:e,variant:t,...n}){return m.jsx("div",{className:F(rS({variant:t}),e),...n})}function aS({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 sS({title:e,variant:t="primary",children:n,className:r}){return m.jsxs("div",{className:F("space-y-4",r),children:[m.jsx(oS,{variant:t==="primary"?"default":"secondary",className:F(t==="primary"&&"bg-black text-white hover:bg-black/90"),children:e}),n]})}const bd=x.forwardRef(({className:e,label:t,helperText:n,error:r,startAdornment:o,endAdornment:a,required:i,id:s,onInput:l,...u},f)=>{const c=!!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,l&&l(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",c?"border-red-500 focus-within:ring-red-500":"border-input focus-within:ring-primary",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 focus:ring-2 focus:ring-offset-2 disabled:opacity-50",c?"focus:ring-red-500":"focus:ring-primary"),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",c?"text-red-500":"text-muted-foreground"),children:r||n})]})});bd.displayName="CurrencyInput";const iS={small:"h-8 text-xs px-2",medium:"h-10 text-sm px-3",large:"h-12 text-base px-4"},cS={outlined:"border border-input",filled:"border-0 bg-accent",standard:"border-0 border-b border-input rounded-none"},lS=(e,t)=>t&&typeof e=="object"&&e!==null?e[t.text]:typeof e=="string"?e:(e==null?void 0:e.label)||"",uS=(e,t)=>t&&typeof e=="object"&&e!==null?e[t.value]:typeof e=="string"?e:(e==null?void 0:e.value)||e,dS=(e,t,n,r)=>n(e,r)===n(t,r),fS=(e,t,n,r)=>{if(!t)return e;const o=t.toLowerCase();return e.filter(a=>n(a,r).toLowerCase().includes(o))},yd=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})});yd.displayName="Badge";const wd=e=>{const{option:t,index:n,isSelected:r,isHighlighted:o,onSelect:a,getOptionLabel:i,renderOption:s}=e,l=x.useCallback(()=>{a(t)},[t,a]);return m.jsx("div",{onClick:l,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",P1=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Ju(_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=Fu,ed=Bu,us=zu,yo=Hu,wo=Uu,ds=qu,fs=Ku,ms=Zu,Fn='[cmdk-group=""]',Zo='[cmdk-group-items=""]',A1='[cmdk-group-heading=""]',td='[cmdk-item=""]',Li=`${td}:not([aria-disabled="true"])`,Na="cmdk-item-select",gn="data-value",I1=(e,t,n)=>m1(e,t,n),nd=d.createContext(void 0),pr=()=>d.useContext(nd),rd=d.createContext(void 0),ps=()=>d.useContext(rd),od=d.createContext(void 0),ad=d.forwardRef((e,t)=>{let n=vn(()=>{var T,$;return{search:"",value:($=(T=e.value)!=null?T:e.defaultValue)!=null?$:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),r=vn(()=>new Set),o=vn(()=>new Map),a=vn(()=>new Map),i=vn(()=>new Set),s=sd(e),{label:c,children:u,value:f,onValueChange:l,filter:p,shouldFilter:h,loop:b,disablePointerSelection:g=!1,vimBindings:v=!0,...y}=e,w=Re(),C=Re(),D=Re(),E=d.useRef(null),R=G1();rn(()=>{if(f!==void 0){let T=f.trim();n.current.value=T,S.emit()}},[f]),rn(()=>{R(6,B)},[]);let S=d.useMemo(()=>({subscribe:T=>(i.current.add(T),()=>i.current.delete(T)),snapshot:()=>n.current,setState:(T,$,z)=>{var U,G,W,Q;if(!Object.is(n.current[T],$)){if(n.current[T]=$,T==="search")V(),j(),R(1,L);else if(T==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let K=document.getElementById(D);K?K.focus():(U=document.getElementById(w))==null||U.focus()}if(R(7,()=>{var K;n.current.selectedItemId=(K=P())==null?void 0:K.id,S.emit()}),z||R(5,B),((G=s.current)==null?void 0:G.value)!==void 0){let K=$??"";(Q=(W=s.current).onValueChange)==null||Q.call(W,K);return}}S.emit()}},emit:()=>{i.current.forEach(T=>T())}}),[]),k=d.useMemo(()=>({value:(T,$,z)=>{var U;$!==((U=a.current.get(T))==null?void 0:U.value)&&(a.current.set(T,{value:$,keywords:z}),n.current.filtered.items.set(T,I($,z)),R(2,()=>{j(),S.emit()}))},item:(T,$)=>(r.current.add(T),$&&(o.current.has($)?o.current.get($).add(T):o.current.set($,new Set([T]))),R(3,()=>{V(),j(),n.current.value||L(),S.emit()}),()=>{a.current.delete(T),r.current.delete(T),n.current.filtered.items.delete(T);let z=P();R(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:D,labelId:C,listInnerRef:E}),[]);function I(T,$){var z,U;let G=(U=(z=s.current)==null?void 0:z.filter)!=null?U:I1;return T?G(T,n.current.search,$):0}function j(){if(!n.current.search||s.current.shouldFilter===!1)return;let T=n.current.filtered.items,$=[];n.current.filtered.groups.forEach(U=>{let G=o.current.get(U),W=0;G.forEach(Q=>{let K=T.get(Q);W=Math.max(K,W)}),$.push([U,W])});let z=E.current;O().sort((U,G)=>{var W,Q;let K=U.getAttribute("id"),Z=G.getAttribute("id");return((W=T.get(Z))!=null?W:0)-((Q=T.get(K))!=null?Q: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} > *`))}),$.sort((U,G)=>G[1]-U[1]).forEach(U=>{var G;let W=(G=E.current)==null?void 0:G.querySelector(`${Fn}[${gn}="${encodeURIComponent(U[0])}"]`);W==null||W.parentElement.appendChild(W)})}function L(){let T=O().find(z=>z.getAttribute("aria-disabled")!=="true"),$=T==null?void 0:T.getAttribute(gn);S.setState("value",$||void 0)}function V(){var T,$,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 Q=($=(T=a.current.get(W))==null?void 0:T.value)!=null?$:"",K=(U=(z=a.current.get(W))==null?void 0:z.keywords)!=null?U:[],Z=I(Q,K);n.current.filtered.items.set(W,Z),Z>0&&G++}for(let[W,Q]of o.current)for(let K of Q)if(n.current.filtered.items.get(K)>0){n.current.filtered.groups.add(W);break}n.current.filtered.count=G}function B(){var T,$,z;let U=P();U&&(((T=U.parentElement)==null?void 0:T.firstChild)===U&&((z=($=U.closest(Fn))==null?void 0:$.querySelector(A1))==null||z.scrollIntoView({block:"nearest"})),U.scrollIntoView({block:"nearest"}))}function P(){var T;return(T=E.current)==null?void 0:T.querySelector(`${td}[aria-selected="true"]`)}function O(){var T;return Array.from(((T=E.current)==null?void 0:T.querySelectorAll(Li))||[])}function M(T){let $=O()[T];$&&S.setState("value",$.getAttribute(gn))}function A(T){var $;let z=P(),U=O(),G=U.findIndex(Q=>Q===z),W=U[G+T];($=s.current)!=null&&$.loop&&(W=G+T<0?U[U.length-1]:G+T===U.length?U[0]:U[G+T]),W&&S.setState("value",W.getAttribute(gn))}function N(T){let $=P(),z=$==null?void 0:$.closest(Fn),U;for(;z&&!U;)z=T>0?H1(z,Fn):U1(z,Fn),U=z==null?void 0:z.querySelector(Li);U?S.setState("value",U.getAttribute(gn)):A(T)}let _=()=>M(O().length-1),Y=T=>{T.preventDefault(),T.metaKey?_():T.altKey?N(1):A(1)},H=T=>{T.preventDefault(),T.metaKey?M(0):T.altKey?N(-1):A(-1)};return d.createElement(J.div,{ref:t,tabIndex:-1,...y,"cmdk-root":"",onKeyDown:T=>{var $;($=y.onKeyDown)==null||$.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(),M(0);break}case"End":{T.preventDefault(),_();break}case"Enter":{T.preventDefault();let U=P();if(U){let G=new Event(Na);U.dispatchEvent(G)}}}}},d.createElement("label",{"cmdk-label":"",htmlFor:k.inputId,id:k.labelId,style:V1},c),xo(e,T=>d.createElement(rd.Provider,{value:S},d.createElement(nd.Provider,{value:k},T))))}),j1=d.forwardRef((e,t)=>{var n,r;let o=Re(),a=d.useRef(null),i=d.useContext(od),s=pr(),c=sd(e),u=(r=(n=c.current)==null?void 0:n.forceMount)!=null?r:i==null?void 0:i.forceMount;rn(()=>{if(!u)return s.item(o,i==null?void 0:i.id)},[u]);let f=id(o,a,[e.value,e.children,a],e.keywords),l=ps(),p=Bt(R=>R.value&&R.value===f.current),h=Bt(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:y,onSelect:w,forceMount:C,keywords:D,...E}=e;return d.createElement(J.div,{ref:Nt(a,t),...E,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)}),$1=d.forwardRef((e,t)=>{let{heading:n,children:r,forceMount:o,...a}=e,i=Re(),s=d.useRef(null),c=d.useRef(null),u=Re(),f=pr(),l=Bt(h=>o||f.filter()===!1?!0:h.search?h.filtered.groups.has(i):!0);rn(()=>f.group(i),[]),id(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(od.Provider,{value:p},h))))}),L1=d.forwardRef((e,t)=>{let{alwaysRender:n,...r}=e,o=d.useRef(null),a=Bt(i=>!i.search);return!n&&!a?null:d.createElement(J.div,{ref:Nt(o,t),...r,"cmdk-separator":"",role:"separator"})}),F1=d.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,o=e.value!=null,a=ps(),i=Bt(u=>u.search),s=Bt(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)}})}),W1=d.forwardRef((e,t)=>{let{children:n,label:r="Suggestions",...o}=e,a=d.useRef(null),i=d.useRef(null),s=Bt(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)))}),B1=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(ad,{ref:t,...s}))))}),Y1=d.forwardRef((e,t)=>Bt(n=>n.filtered.count===0)?d.createElement(J.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),z1=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)))}),Be=Object.assign(ad,{List:W1,Item:j1,Input:F1,Group:$1,Separator:L1,Dialog:B1,Empty:Y1,Loading:z1});function H1(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function U1(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function sd(e){let t=d.useRef(e);return rn(()=>{t.current=e}),t}var rn=typeof window>"u"?d.useEffect:d.useLayoutEffect;function vn(e){let t=d.useRef();return t.current===void 0&&(t.current=e()),t}function Bt(e){let t=ps(),n=()=>e(t.snapshot());return d.useSyncExternalStore(t.subscribe,n,n)}function id(e,t,n,r=[]){let o=d.useRef(),a=pr();return rn(()=>{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(gn,s),o.current=s}),o}var G1=()=>{let[e,t]=d.useState(),n=vn(()=>new Map);return rn(()=>{n.current.forEach(r=>r()),n.current=new Map},[e]),(r,o)=>{n.current.set(r,o),t({})}};function q1(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(q1(t),{ref:t.ref},n(t.props.children)):n(t)}var V1={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};const K1=ls,X1=ed,Z1=us,Q1=ms,cd=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}));cd.displayName=yo.displayName;const ld=d.forwardRef(({className:e,children:t,...n},r)=>m.jsxs(Z1,{children:[m.jsx(cd,{}),m.jsxs(wo,{ref:r,className:F("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...n,children:[t,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(kn,{className:"h-4 w-4"}),m.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));ld.displayName=wo.displayName;const ud=({className:e,...t})=>m.jsx("div",{className:F("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});ud.displayName="DialogHeader";const dd=({className:e,...t})=>m.jsx("div",{className:F("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});dd.displayName="DialogFooter";const fd=d.forwardRef(({className:e,...t},n)=>m.jsx(ds,{ref:n,className:F("text-lg font-semibold leading-none tracking-tight",e),...t}));fd.displayName=ds.displayName;const md=d.forwardRef(({className:e,...t},n)=>m.jsx(fs,{ref:n,className:F("text-sm text-muted-foreground",e),...t}));md.displayName=fs.displayName;const J1=d.forwardRef(({className:e,...t},n)=>m.jsx(Be,{ref:n,className:F("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...t}));J1.displayName=Be.displayName;const pd=d.forwardRef(({className:e,...t},n)=>m.jsxs("div",{className:"flex items-center h-auto px-3","cmdk-input-wrapper":"",children:[m.jsx(Dc,{strokeWidth:1.25,className:"mr-2 h-4 w-4 shrink-0"}),m.jsx(Be.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})]}));pd.displayName=Be.Input.displayName;const hd=d.forwardRef(({className:e,...t},n)=>m.jsx(Be.List,{ref:n,className:F("max-h-[300px] overflow-y-auto overflow-x-hidden",e),...t}));hd.displayName=Be.List.displayName;const eS=d.forwardRef((e,t)=>m.jsx(Be.Empty,{ref:t,className:"py-6 text-center text-sm",...e}));eS.displayName=Be.Empty.displayName;const gd=d.forwardRef(({className:e,...t},n)=>m.jsx(Be.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}));gd.displayName=Be.Group.displayName;const tS=d.forwardRef(({className:e,...t},n)=>m.jsx(Be.Separator,{ref:n,className:F("-mx-1 h-px bg-border",e),...t}));tS.displayName=Be.Separator.displayName;const vd=d.forwardRef(({className:e,...t},n)=>m.jsx(Be.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}));vd.displayName=Be.Item.displayName;function nS({className:e,...t}){return m.jsx("div",{className:F("animate-pulse rounded-md bg-muted",e),...t})}function rS(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 oS=({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}=rS(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)||""),C=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]),D=x.useCallback(()=>{b(!1),w((g==null?void 0:g.label)||"")},[g]),E=x.useCallback(R=>{w(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(Be,{onKeyDown:C,children:[m.jsxs("div",{className:F("rounded-full border bg-gray-100",f,s),children:[" ",m.jsx(pd,{ref:p,value:y,onValueChange:i?void 0:w,onBlur:D,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(hd,{className:"rounded-lg ring-1 ring-slate-200 dark:ring-gray-700",children:[i?m.jsx(Be.Loading,{children:m.jsx("div",{className:"p-1",children:m.jsx(nS,{className:"h-8 w-full"})})}):null,e.length>0&&!i?m.jsx(gd,{children:e.map(R=>{const S=(g==null?void 0:g.value)===R.value;return m.jsxs(vd,{value:R.label,onMouseDown:k=>{k.preventDefault(),k.stopPropagation()},onSelect:()=>E(R),className:F("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(Be.Empty,{className:"select-none rounded-sm px-2 py-3 text-center text-sm dark:text-gray-400",children:n})]})})})]})},aS=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 sS({className:e,variant:t,...n}){return m.jsx("div",{className:F(aS({variant:t}),e),...n})}function iS({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 cS({title:e,variant:t="primary",children:n,className:r}){return m.jsxs("div",{className:F("space-y-4",r),children:[m.jsx(sS,{variant:t==="primary"?"default":"secondary",className:F(t==="primary"&&"bg-black text-white hover:bg-black/90"),children:e}),n]})}const bd=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-red-500 focus-within:ring-red-500":"border-input focus-within:ring-primary",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 focus:ring-2 focus:ring-offset-2 disabled:opacity-50",l?"focus:ring-red-500":"focus:ring-primary"),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})]})});bd.displayName="CurrencyInput";const lS={small:"h-8 text-xs px-2",medium:"h-10 text-sm px-3",large:"h-12 text-base px-4"},uS={outlined:"border border-input",filled:"border-0 bg-accent",standard:"border-0 border-b border-input rounded-none"},dS=(e,t)=>t&&typeof e=="object"&&e!==null?e[t.text]:typeof e=="string"?e:(e==null?void 0:e.label)||"",fS=(e,t)=>t&&typeof e=="object"&&e!==null?e[t.value]:typeof e=="string"?e:(e==null?void 0:e.value)||e,mS=(e,t,n,r)=>n(e,r)===n(t,r),pS=(e,t,n,r)=>{if(!t)return e;const o=t.toLowerCase();return e.filter(a=>n(a,r).toLowerCase().includes(o))},yd=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})});yd.displayName="Badge";const wd=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(er,{className:"h-4 w-4 text-primary"})]})})};wd.displayName="AutocompleteOption";const xd=e=>{const{tag:t,index:n,getOptionLabel:r,onRemove:o}=e,a=x.useCallback(()=>{o(t)},[t,o]);return m.jsxs(yd,{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(kn,{className:"h-3 w-3"})})]},n)};xd.displayName="AutocompleteTag";const mS=({options:e=[],dataSource:t=[],value:n=null,onChange:r,change:o,onInputChange:a,placeholder:i="Search...",multiple:s=!1,freeSolo:l=!1,disabled:u=!1,loading:f=!1,size:c="medium",variant:p="outlined",label:h="",helperText:b="",error:g,required:v=!1,fullWidth:y=!0,clearable:w=!0,disableCloseOnSelect:C=!1,filterOptions:D,getOptionLabel:E=M=>lS(M,j),getOptionValue:R=M=>uS(M,j),isOptionEqualToValue:S,renderOption:k,renderTags:I,fields:j,noOptionsText:L="No options",emptyMessage:V,className:B="",inputClassName:P="",...O})=>{const[M,A]=x.useState(!1),[N,_]=x.useState(""),[Y,H]=x.useState(-1),[T,$]=x.useState({top:0,left:0,width:0}),z=x.useRef(null),U=x.useRef(null),G=x.useRef(null),W=x.useId(),Q=t.length>0?t:e,K=x.useMemo(()=>S||((re,pe)=>dS(re,pe,R,j)),[S,R,j]),Z=x.useMemo(()=>{let re=Q;return s&&Array.isArray(n)&&(re=Q.filter(pe=>!n.some(Te=>K(pe,Te)))),D?D(re,{inputValue:N}):fS(re,N,E,j)},[Q,n,N,D,E,s,K,j]),se=x.useCallback(re=>{const pe=re.target.value;_(pe),a==null||a(re,pe),!M&&pe&&A(!0)},[M,a]),ie=x.useCallback(re=>{if(s){const pe=Array.isArray(n)?n:[],Te=pe.some(Ye=>K(re,Ye));let Fe;Te?Fe=pe.filter(Ye=>!K(re,Ye)):Fe=[...pe,re],r==null||r(null,Fe),o==null||o({itemData:Fe}),_(""),C||A(!1),setTimeout(()=>{var Ye;(Ye=z.current)==null||Ye.focus()},0)}else r==null||r(null,re),o==null||o({itemData:re}),_(E(re)),C||A(!1);H(-1)},[s,n,K,r,o,C,E]),be=x.useCallback(re=>{if(s&&Array.isArray(n)){const pe=n.filter(Te=>!K(re,Te));r==null||r(null,pe),o==null||o({itemData:pe})}},[s,n,K,r,o]),ee=x.useCallback(re=>{re.stopPropagation(),r==null||r(null,s?[]:null),o==null||o({itemData:s?[]:null}),_(""),setTimeout(()=>{z.current&&(z.current.value="",z.current.focus())},0),A(!1)},[r,o,s]),Ae=x.useCallback(re=>{if(!M&&(re.key==="ArrowDown"||re.key==="ArrowUp")){A(!0);return}if(M)switch(re.key){case"ArrowDown":re.preventDefault(),H(pe=>pe<Z.length-1?pe+1:0);break;case"ArrowUp":re.preventDefault(),H(pe=>pe>0?pe-1:Z.length-1);break;case"Enter":re.preventDefault(),Y>=0&&Z[Y]?ie(Z[Y]):l&&N&&ie(N);break;case"Escape":A(!1),H(-1);break;case"Tab":A(!1);break}},[M,Z,Y,ie,l,N]),Ie=x.useCallback(()=>{if(A(!M),!M&&G.current){const re=G.current.getBoundingClientRect();$({top:re.bottom+window.scrollY,left:re.left+window.scrollX,width:re.width})}},[M]),Ee=x.useCallback(()=>{if(A(!0),G.current){const re=G.current.getBoundingClientRect();$({top:re.bottom+window.scrollY,left:re.left+window.scrollX,width:re.width})}},[]);x.useEffect(()=>{const re=Te=>{const Fe=Te.target,Ye=G.current&&!G.current.contains(Fe),at=U.current&&!U.current.contains(Fe);Ye&&at&&A(!1)},pe=()=>{if(M&&G.current){const Te=G.current.getBoundingClientRect();$({top:Te.bottom+window.scrollY,left:Te.left+window.scrollX,width:Te.width})}};return document.addEventListener("mousedown",re),window.addEventListener("resize",pe),window.addEventListener("scroll",pe),()=>{document.removeEventListener("mousedown",re),window.removeEventListener("resize",pe),window.removeEventListener("scroll",pe)}},[M]),x.useEffect(()=>{if(M&&Y>=0&&U.current){const re=U.current.children[Y];re&&re.scrollIntoView({block:"nearest"})}},[Y,M]);const Ge=x.useMemo(()=>!s||!Array.isArray(n)||n.length===0?null:I?I(n,be):m.jsx("div",{className:"flex flex-wrap gap-1 mb-1",children:n.map((re,pe)=>m.jsx(xd,{tag:re,index:pe,getOptionLabel:E,onRemove:be},pe))}),[s,n,I,be,E]),Ce=x.useMemo(()=>s?Array.isArray(n)&&n.length>0:n!=null,[s,n]),Xe=w&&Ce&&!u,_t=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"})]})})};wd.displayName="AutocompleteOption";const xd=e=>{const{tag:t,index:n,getOptionLabel:r,onRemove:o}=e,a=x.useCallback(()=>{o(t)},[t,o]);return m.jsxs(yd,{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(kn,{className:"h-3 w-3"})})]},n)};xd.displayName="AutocompleteTag";const hS=({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:C=!1,filterOptions:D,getOptionLabel:E=M=>dS(M,j),getOptionValue:R=M=>fS(M,j),isOptionEqualToValue:S,renderOption:k,renderTags:I,fields:j,noOptionsText:L="No options",emptyMessage:V,className:B="",inputClassName:P="",...O})=>{const[M,A]=x.useState(!1),[N,_]=x.useState(""),[Y,H]=x.useState(-1),[T,$]=x.useState({top:0,left:0,width:0}),z=x.useRef(null),U=x.useRef(null),G=x.useRef(null),W=x.useId(),Q=t.length>0?t:e,K=x.useMemo(()=>S||((re,pe)=>mS(re,pe,R,j)),[S,R,j]),Z=x.useMemo(()=>{let re=Q;return s&&Array.isArray(n)&&(re=Q.filter(pe=>!n.some(Te=>K(pe,Te)))),D?D(re,{inputValue:N}):pS(re,N,E,j)},[Q,n,N,D,E,s,K,j]),se=x.useCallback(re=>{const pe=re.target.value;_(pe),a==null||a(re,pe),!M&&pe&&A(!0)},[M,a]),ie=x.useCallback(re=>{if(s){const pe=Array.isArray(n)?n:[],Te=pe.some(Ye=>K(re,Ye));let Fe;Te?Fe=pe.filter(Ye=>!K(re,Ye)):Fe=[...pe,re],r==null||r(null,Fe),o==null||o({itemData:Fe}),_(""),C||A(!1),setTimeout(()=>{var Ye;(Ye=z.current)==null||Ye.focus()},0)}else r==null||r(null,re),o==null||o({itemData:re}),_(E(re)),C||A(!1);H(-1)},[s,n,K,r,o,C,E]),be=x.useCallback(re=>{if(s&&Array.isArray(n)){const pe=n.filter(Te=>!K(re,Te));r==null||r(null,pe),o==null||o({itemData:pe})}},[s,n,K,r,o]),ee=x.useCallback(re=>{re.stopPropagation(),r==null||r(null,s?[]:null),o==null||o({itemData:s?[]:null}),_(""),setTimeout(()=>{z.current&&(z.current.value="",z.current.focus())},0),A(!1)},[r,o,s]),Ae=x.useCallback(re=>{if(!M&&(re.key==="ArrowDown"||re.key==="ArrowUp")){A(!0);return}if(M)switch(re.key){case"ArrowDown":re.preventDefault(),H(pe=>pe<Z.length-1?pe+1:0);break;case"ArrowUp":re.preventDefault(),H(pe=>pe>0?pe-1:Z.length-1);break;case"Enter":re.preventDefault(),Y>=0&&Z[Y]?ie(Z[Y]):c&&N&&ie(N);break;case"Escape":A(!1),H(-1);break;case"Tab":A(!1);break}},[M,Z,Y,ie,c,N]),Ie=x.useCallback(()=>{if(A(!M),!M&&G.current){const re=G.current.getBoundingClientRect();$({top:re.bottom+window.scrollY,left:re.left+window.scrollX,width:re.width})}},[M]),Ee=x.useCallback(()=>{if(A(!0),G.current){const re=G.current.getBoundingClientRect();$({top:re.bottom+window.scrollY,left:re.left+window.scrollX,width:re.width})}},[]);x.useEffect(()=>{const re=Te=>{const Fe=Te.target,Ye=G.current&&!G.current.contains(Fe),at=U.current&&!U.current.contains(Fe);Ye&&at&&A(!1)},pe=()=>{if(M&&G.current){const Te=G.current.getBoundingClientRect();$({top:Te.bottom+window.scrollY,left:Te.left+window.scrollX,width:Te.width})}};return document.addEventListener("mousedown",re),window.addEventListener("resize",pe),window.addEventListener("scroll",pe),()=>{document.removeEventListener("mousedown",re),window.removeEventListener("resize",pe),window.removeEventListener("scroll",pe)}},[M]),x.useEffect(()=>{if(M&&Y>=0&&U.current){const re=U.current.children[Y];re&&re.scrollIntoView({block:"nearest"})}},[Y,M]);const Ge=x.useMemo(()=>!s||!Array.isArray(n)||n.length===0?null:I?I(n,be):m.jsx("div",{className:"flex flex-wrap gap-1 mb-1",children:n.map((re,pe)=>m.jsx(xd,{tag:re,index:pe,getOptionLabel:E,onRemove:be},pe))}),[s,n,I,be,E]),Ce=x.useMemo(()=>s?Array.isArray(n)&&n.length>0:n!=null,[s,n]),Xe=w&&Ce&&!u,_t=x.useMemo(()=>`
189
189
  relative flex items-center rounded-md
190
- ${cS[p]}
191
- ${iS[c]}
190
+ ${uS[p]}
191
+ ${lS[l]}
192
192
  ${g&&"border border-red-500 focus-visible:ring-red-500"}
193
193
  ${u?"opacity-50 cursor-not-allowed":"cursor-text"}
194
194
  focus-within:ring-1 focus-within:ring-ring focus-within:ring-offset-2
195
195
  transition-colors ${P}
196
- `,[p,c,g,u,P]),Oe=V??L;return m.jsxs("div",{className:`relative ${y?"w-full":"w-auto"} ${B}`,ref:G,children:[h&&m.jsxs("label",{htmlFor:W,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:[Ge,m.jsxs("div",{className:_t,children:[m.jsx(on,{id:W,ref:z,value:N,onChange:se,onKeyDown:Ae,onFocus:Ee,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"}),Xe&&m.jsx("button",{type:"button",onClick:ee,className:"p-1 hover:bg-accent rounded-sm transition-colors",tabIndex:-1,children:m.jsx(kn,{className:"h-4 w-4 text-muted-foreground"})}),m.jsx("button",{type:"button",disabled:u,onClick:Ie,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 ${M?"rotate-180":""}`})})]})]}),M&&Jr.createPortal(m.jsx("div",{className:`
196
+ `,[p,l,g,u,P]),Oe=V??L;return m.jsxs("div",{className:`relative ${y?"w-full":"w-auto"} ${B}`,ref:G,children:[h&&m.jsxs("label",{htmlFor:W,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:[Ge,m.jsxs("div",{className:_t,children:[m.jsx(on,{id:W,ref:z,value:N,onChange:se,onKeyDown:Ae,onFocus:Ee,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"}),Xe&&m.jsx("button",{type:"button",onClick:ee,className:"p-1 hover:bg-accent rounded-sm transition-colors",tabIndex:-1,children:m.jsx(kn,{className:"h-4 w-4 text-muted-foreground"})}),m.jsx("button",{type:"button",disabled:u,onClick:Ie,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 ${M?"rotate-180":""}`})})]})]}),M&&Jr.createPortal(m.jsx("div",{className:`
197
197
  absolute bg-popover border border-border rounded-md shadow-lg
198
198
  max-h-60 overflow-auto z-[9999]
199
199
  ${P}
200
- `,style:{top:T.top+4,left:T.left,width:T.width},ref:U,children:Z.length===0?m.jsx("div",{className:"p-3 text-sm text-muted-foreground text-center",children:Oe}):Z.map((re,pe)=>{const Te=s?Array.isArray(n)&&n.some(Ye=>K(re,Ye)):K(re,n),Fe=pe===Y;return m.jsx(wd,{option:re,index:pe,isSelected:Te,isHighlighted:Fe,onSelect:ie,getOptionLabel:E,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",[pS,EM]=He(So),[hS,hs]=pS(So),Sd=d.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:o,disabled:a,onOpenChange:i,...s}=e,[l,u]=rt({prop:r,defaultProp:o??!1,onChange:i,caller:So});return m.jsx(hS,{scope:n,disabled:a,contentId:Re(),open:l,onOpenToggle:d.useCallback(()=>u(f=>!f),[u]),children:m.jsx(J.div,{"data-state":vs(l),"data-disabled":a?"":void 0,...s,ref:t})})});Sd.displayName=So;var Cd="CollapsibleTrigger",Ed=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:X(e.onClick,o.onOpenToggle)})});Ed.displayName=Cd;var gs="CollapsibleContent",Dd=d.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=hs(gs,e.__scopeCollapsible);return m.jsx(ot,{present:n||o.open,children:({present:a})=>m.jsx(gS,{...r,ref:t,present:a})})});Dd.displayName=gs;var gS=d.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:o,...a}=e,i=hs(gs,n),[s,l]=d.useState(r),u=d.useRef(null),f=fe(t,u),c=d.useRef(0),p=c.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)},[]),Ne(()=>{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 C=w.getBoundingClientRect();c.current=C.height,h.current=C.width,v.current||(w.style.transitionDuration=y.current.transitionDuration,w.style.animationName=y.current.animationName),l(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 vS=Sd,bS=Ed,yS=Dd;function wS({title:e,content:t,defaultOpen:n=!1,className:r,titleTypographyProps:o,contentTypographyProps:a}){const[i,s]=d.useState(n),l=()=>s(u=>!u);return m.jsxs(vS,{open:i,onOpenChange:s,className:F("cursor-pointer",r),onClick:l,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(bS,{asChild:!0,children:m.jsx("button",{onClick:u=>u.stopPropagation(),className:F("transition-transform duration-200",i?"rotate-180":"rotate-0"),children:m.jsx(tr,{className:"h-5 w-5"})})})]}),m.jsx(yS,{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 xS=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"}}),Md=d.forwardRef(({className:e,variant:t,...n},r)=>m.jsx("div",{ref:r,role:"alert",className:F(xS({variant:t}),e),...n}));Md.displayName="Alert";const Nd=d.forwardRef(({className:e,...t},n)=>m.jsx("h5",{ref:n,className:F("mb-1 font-medium leading-none tracking-tight",e),...t}));Nd.displayName="AlertTitle";const kd=d.forwardRef(({className:e,...t},n)=>m.jsx("p",{ref:n,className:F("text-sm [&_p]:leading-relaxed",e),...t}));kd.displayName="AlertDescription";var Rr={exports:{}},Qo={};/**
200
+ `,style:{top:T.top+4,left:T.left,width:T.width},ref:U,children:Z.length===0?m.jsx("div",{className:"p-3 text-sm text-muted-foreground text-center",children:Oe}):Z.map((re,pe)=>{const Te=s?Array.isArray(n)&&n.some(Ye=>K(re,Ye)):K(re,n),Fe=pe===Y;return m.jsx(wd,{option:re,index:pe,isSelected:Te,isHighlighted:Fe,onSelect:ie,getOptionLabel:E,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",[gS,EM]=He(So),[vS,hs]=gS(So),Sd=d.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:o,disabled:a,onOpenChange:i,...s}=e,[c,u]=rt({prop:r,defaultProp:o??!1,onChange:i,caller:So});return m.jsx(vS,{scope:n,disabled:a,contentId:Re(),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})})});Sd.displayName=So;var Cd="CollapsibleTrigger",Ed=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:X(e.onClick,o.onOpenToggle)})});Ed.displayName=Cd;var gs="CollapsibleContent",Dd=d.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=hs(gs,e.__scopeCollapsible);return m.jsx(ot,{present:n||o.open,children:({present:a})=>m.jsx(bS,{...r,ref:t,present:a})})});Dd.displayName=gs;var bS=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)},[]),Ne(()=>{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 C=w.getBoundingClientRect();l.current=C.height,h.current=C.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 yS=Sd,wS=Ed,xS=Dd;function SS({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(yS,{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(wS,{asChild:!0,children:m.jsx("button",{onClick:u=>u.stopPropagation(),className:F("transition-transform duration-200",i?"rotate-180":"rotate-0"),children:m.jsx(tr,{className:"h-5 w-5"})})})]}),m.jsx(xS,{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"}}),Md=d.forwardRef(({className:e,variant:t,...n},r)=>m.jsx("div",{ref:r,role:"alert",className:F(CS({variant:t}),e),...n}));Md.displayName="Alert";const Nd=d.forwardRef(({className:e,...t},n)=>m.jsx("h5",{ref:n,className:F("mb-1 font-medium leading-none tracking-tight",e),...t}));Nd.displayName="AlertTitle";const kd=d.forwardRef(({className:e,...t},n)=>m.jsx("p",{ref:n,className:F("text-sm [&_p]:leading-relaxed",e),...t}));kd.displayName="AlertDescription";var Rr={exports:{}},Qo={};/**
201
201
  * @license React
202
202
  * use-sync-external-store-shim.production.js
203
203
  *
@@ -205,7 +205,7 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
205
205
  *
206
206
  * This source code is licensed under the MIT license found in the
207
207
  * LICENSE file in the root directory of this source tree.
208
- */var Fi;function SS(){if(Fi)return Qo;Fi=1;var e=x;function t(c,p){return c===p&&(c!==0||1/c===1/p)||c!==c&&p!==p}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,o=e.useEffect,a=e.useLayoutEffect,i=e.useDebugValue;function s(c,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,l(g)&&v({inst:g})},[c,h,p]),o(function(){return l(g)&&v({inst:g}),c(function(){l(g)&&v({inst:g})})},[c]),i(h),h}function l(c){var p=c.getSnapshot;c=c.value;try{var h=p();return!n(c,h)}catch{return!0}}function u(c,p){return p()}var 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={};/**
208
+ */var Fi;function ES(){if(Fi)return Qo;Fi=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={};/**
209
209
  * @license React
210
210
  * use-sync-external-store-shim.development.js
211
211
  *
@@ -213,15 +213,15 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
213
213
  *
214
214
  * This source code is licensed under the MIT license found in the
215
215
  * LICENSE file in the root directory of this source tree.
216
- */var Wi;function CS(){return Wi||(Wi=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(!c){var v=b();a(g,v)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),c=!0)}v=i({inst:{value:g,getSnapshot:b}});var y=v[0].inst,w=v[1];return l(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,l=o.useLayoutEffect,u=o.useDebugValue,f=!1,c=!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 Bi;function ES(){return Bi||(Bi=1,process.env.NODE_ENV==="production"?Rr.exports=SS():Rr.exports=CS()),Rr.exports}var DS=ES();function MS(){return DS.useSyncExternalStore(NS,()=>!0,()=>!1)}function NS(){return()=>{}}var bs="Avatar",[kS,DM]=He(bs),[RS,Rd]=kS(bs),Od=d.forwardRef((e,t)=>{const{__scopeAvatar:n,...r}=e,[o,a]=d.useState("idle");return m.jsx(RS,{scope:n,imageLoadingStatus:o,onImageLoadingStatusChange:a,children:m.jsx(J.span,{...r,ref:t})})});Od.displayName=bs;var Td="AvatarImage",_d=d.forwardRef((e,t)=>{const{__scopeAvatar:n,src:r,onLoadingStatusChange:o=()=>{},...a}=e,i=Rd(Td,n),s=OS(r,a),l=Pe(u=>{o(u),i.onImageLoadingStatusChange(u)});return Ne(()=>{s!=="idle"&&l(s)},[s,l]),s==="loaded"?m.jsx(J.img,{...a,ref:t,src:r}):null});_d.displayName=Td;var Pd="AvatarFallback",Ad=d.forwardRef((e,t)=>{const{__scopeAvatar:n,delayMs:r,...o}=e,a=Rd(Pd,n),[i,s]=d.useState(r===void 0);return d.useEffect(()=>{if(r!==void 0){const l=window.setTimeout(()=>s(!0),r);return()=>window.clearTimeout(l)}},[r]),i&&a.imageLoadingStatus!=="loaded"?m.jsx(J.span,{...o,ref:t}):null});Ad.displayName=Pd;function Yi(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}function OS(e,{referrerPolicy:t,crossOrigin:n}){const r=MS(),o=d.useRef(null),a=r?(o.current||(o.current=new window.Image),o.current):null,[i,s]=d.useState(()=>Yi(a,e));return Ne(()=>{s(Yi(a,e))},[a,e]),Ne(()=>{const l=c=>()=>{s(c)};if(!a)return;const u=l("loaded"),f=l("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 Id=Od,jd=_d,$d=Ad;const Ld=d.forwardRef(({className:e,...t},n)=>m.jsx(Id,{ref:n,className:F("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t}));Ld.displayName=Id.displayName;const Fd=d.forwardRef(({className:e,...t},n)=>m.jsx(jd,{ref:n,className:F("aspect-square h-full w-full",e),...t}));Fd.displayName=jd.displayName;const Wd=d.forwardRef(({className:e,...t},n)=>m.jsx($d,{ref:n,className:F("flex h-full w-full items-center justify-center rounded-full bg-muted",e),...t}));Wd.displayName=$d.displayName;var Co="Checkbox",[TS,MM]=He(Co),[_S,ys]=TS(Co);function PS(e){const{__scopeCheckbox:t,checked:n,children:r,defaultChecked:o,disabled:a,form:i,name:s,onCheckedChange:l,required:u,value:f="on",internal_do_not_use_render:c}=e,[p,h]=rt({prop:n,defaultProp:o??!1,onChange:l,caller:Co}),[b,g]=d.useState(null),[v,y]=d.useState(null),w=d.useRef(!1),C=b?!!i||!!b.closest("form"):!0,D={checked:p,disabled:a,setChecked:h,control:b,setControl:g,name:s,form:i,value:f,hasConsumerStoppedPropagationRef:w,required:u,defaultChecked:$t(o)?!1:o,isFormControl:C,bubbleInput:v,setBubbleInput:y};return m.jsx(_S,{scope:t,...D,children:AS(c)?c(D):r})}var Bd="CheckboxTrigger",Yd=d.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...r},o)=>{const{control:a,value:i,disabled:s,checked:l,required:u,setControl:f,setChecked:c,hasConsumerStoppedPropagationRef:p,isFormControl:h,bubbleInput:b}=ys(Bd,e),g=fe(o,f),v=d.useRef(l);return d.useEffect(()=>{const y=a==null?void 0:a.form;if(y){const w=()=>c(v.current);return y.addEventListener("reset",w),()=>y.removeEventListener("reset",w)}},[a,c]),m.jsx(J.button,{type:"button",role:"checkbox","aria-checked":$t(l)?"mixed":l,"aria-required":u,"data-state":qd(l),"data-disabled":s?"":void 0,disabled:s,value:i,...r,ref:g,onKeyDown:X(t,y=>{y.key==="Enter"&&y.preventDefault()}),onClick:X(n,y=>{c(w=>$t(w)?!0:!w),b&&h&&(p.current=y.isPropagationStopped(),p.current||y.stopPropagation())})})});Yd.displayName=Bd;var ws=d.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:r,checked:o,defaultChecked:a,required:i,disabled:s,value:l,onCheckedChange:u,form:f,...c}=e;return m.jsx(PS,{__scopeCheckbox:n,checked:o,defaultChecked:a,disabled:s,required:i,onCheckedChange:u,name:r,form:f,value:l,internal_do_not_use_render:({isFormControl:p})=>m.jsxs(m.Fragment,{children:[m.jsx(Yd,{...c,ref:t,__scopeCheckbox:n}),p&&m.jsx(Gd,{__scopeCheckbox:n})]})})});ws.displayName=Co;var zd="CheckboxIndicator",Hd=d.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...o}=e,a=ys(zd,n);return m.jsx(ot,{present:r||$t(a.checked)||a.checked===!0,children:m.jsx(J.span,{"data-state":qd(a.checked),"data-disabled":a.disabled?"":void 0,...o,ref:t,style:{pointerEvents:"none",...e.style}})})});Hd.displayName=zd;var Ud="CheckboxBubbleInput",Gd=d.forwardRef(({__scopeCheckbox:e,...t},n)=>{const{control:r,hasConsumerStoppedPropagationRef:o,checked:a,defaultChecked:i,required:s,disabled:l,name:u,value:f,form:c,bubbleInput:p,setBubbleInput:h}=ys(Ud,e),b=fe(n,h),g=es(a),v=qa(r);d.useEffect(()=>{const w=p;if(!w)return;const C=window.HTMLInputElement.prototype,E=Object.getOwnPropertyDescriptor(C,"checked").set,R=!o.current;if(g!==a&&E){const S=new Event("click",{bubbles:R});w.indeterminate=$t(a),E.call(w,$t(a)?!1:a),w.dispatchEvent(S)}},[p,g,a,o]);const y=d.useRef($t(a)?!1:a);return m.jsx(J.input,{type:"checkbox","aria-hidden":!0,defaultChecked:i??y.current,required:s,disabled:l,name:u,value:f,form:c,...t,tabIndex:-1,ref:b,style:{...t.style,...v,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});Gd.displayName=Ud;function AS(e){return typeof e=="function"}function $t(e){return e==="indeterminate"}function qd(e){return $t(e)?"indeterminate":e?"checked":"unchecked"}const Vd=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(Hd,{className:"flex items-center justify-center text-current",children:n.checked==="indeterminate"?m.jsx(qh,{className:"h-4 w-4 text-white"}):m.jsx(er,{className:"h-4 w-4"})})}));Vd.displayName=ws.displayName;function IS(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 Kd=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(Kd);if(!e)throw new Error("useDrawerContext must be used within a Drawer.Root");return e};IS(`[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(
216
+ */var Wi;function DS(){return Wi||(Wi=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 Bi;function MS(){return Bi||(Bi=1,process.env.NODE_ENV==="production"?Rr.exports=ES():Rr.exports=DS()),Rr.exports}var NS=MS();function kS(){return NS.useSyncExternalStore(RS,()=>!0,()=>!1)}function RS(){return()=>{}}var bs="Avatar",[OS,DM]=He(bs),[TS,Rd]=OS(bs),Od=d.forwardRef((e,t)=>{const{__scopeAvatar:n,...r}=e,[o,a]=d.useState("idle");return m.jsx(TS,{scope:n,imageLoadingStatus:o,onImageLoadingStatusChange:a,children:m.jsx(J.span,{...r,ref:t})})});Od.displayName=bs;var Td="AvatarImage",_d=d.forwardRef((e,t)=>{const{__scopeAvatar:n,src:r,onLoadingStatusChange:o=()=>{},...a}=e,i=Rd(Td,n),s=_S(r,a),c=Pe(u=>{o(u),i.onImageLoadingStatusChange(u)});return Ne(()=>{s!=="idle"&&c(s)},[s,c]),s==="loaded"?m.jsx(J.img,{...a,ref:t,src:r}):null});_d.displayName=Td;var Pd="AvatarFallback",Ad=d.forwardRef((e,t)=>{const{__scopeAvatar:n,delayMs:r,...o}=e,a=Rd(Pd,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});Ad.displayName=Pd;function Yi(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=kS(),o=d.useRef(null),a=r?(o.current||(o.current=new window.Image),o.current):null,[i,s]=d.useState(()=>Yi(a,e));return Ne(()=>{s(Yi(a,e))},[a,e]),Ne(()=>{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 Id=Od,jd=_d,$d=Ad;const Ld=d.forwardRef(({className:e,...t},n)=>m.jsx(Id,{ref:n,className:F("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t}));Ld.displayName=Id.displayName;const Fd=d.forwardRef(({className:e,...t},n)=>m.jsx(jd,{ref:n,className:F("aspect-square h-full w-full",e),...t}));Fd.displayName=jd.displayName;const Wd=d.forwardRef(({className:e,...t},n)=>m.jsx($d,{ref:n,className:F("flex h-full w-full items-center justify-center rounded-full bg-muted",e),...t}));Wd.displayName=$d.displayName;var Co="Checkbox",[PS,MM]=He(Co),[AS,ys]=PS(Co);function IS(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]=rt({prop:n,defaultProp:o??!1,onChange:c,caller:Co}),[b,g]=d.useState(null),[v,y]=d.useState(null),w=d.useRef(!1),C=b?!!i||!!b.closest("form"):!0,D={checked:p,disabled:a,setChecked:h,control:b,setControl:g,name:s,form:i,value:f,hasConsumerStoppedPropagationRef:w,required:u,defaultChecked:$t(o)?!1:o,isFormControl:C,bubbleInput:v,setBubbleInput:y};return m.jsx(AS,{scope:t,...D,children:jS(l)?l(D):r})}var Bd="CheckboxTrigger",Yd=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(Bd,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":$t(c)?"mixed":c,"aria-required":u,"data-state":qd(c),"data-disabled":s?"":void 0,disabled:s,value:i,...r,ref:g,onKeyDown:X(t,y=>{y.key==="Enter"&&y.preventDefault()}),onClick:X(n,y=>{l(w=>$t(w)?!0:!w),b&&h&&(p.current=y.isPropagationStopped(),p.current||y.stopPropagation())})})});Yd.displayName=Bd;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(IS,{__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(Yd,{...l,ref:t,__scopeCheckbox:n}),p&&m.jsx(Gd,{__scopeCheckbox:n})]})})});ws.displayName=Co;var zd="CheckboxIndicator",Hd=d.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...o}=e,a=ys(zd,n);return m.jsx(ot,{present:r||$t(a.checked)||a.checked===!0,children:m.jsx(J.span,{"data-state":qd(a.checked),"data-disabled":a.disabled?"":void 0,...o,ref:t,style:{pointerEvents:"none",...e.style}})})});Hd.displayName=zd;var Ud="CheckboxBubbleInput",Gd=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(Ud,e),b=fe(n,h),g=es(a),v=qa(r);d.useEffect(()=>{const w=p;if(!w)return;const C=window.HTMLInputElement.prototype,E=Object.getOwnPropertyDescriptor(C,"checked").set,R=!o.current;if(g!==a&&E){const S=new Event("click",{bubbles:R});w.indeterminate=$t(a),E.call(w,$t(a)?!1:a),w.dispatchEvent(S)}},[p,g,a,o]);const y=d.useRef($t(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%)"}})});Gd.displayName=Ud;function jS(e){return typeof e=="function"}function $t(e){return e==="indeterminate"}function qd(e){return $t(e)?"indeterminate":e?"checked":"unchecked"}const Vd=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(Hd,{className:"flex items-center justify-center text-current",children:n.checked==="indeterminate"?m.jsx(Kh,{className:"h-4 w-4 text-white"}):m.jsx(er,{className:"h-4 w-4"})})}));Vd.displayName=ws.displayName;function $S(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 Kd=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(Kd);if(!e)throw new Error("useDrawerContext must be used within a Drawer.Root");return e};$S(`[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(
217
217
  [data-state=closed]
218
- ){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 jS(){const e=navigator.userAgent;return typeof window<"u"&&(/Firefox/.test(e)&&/Mobile/.test(e)||/FxiOS/.test(e))}function $S(){return xs(/^Mac/)}function LS(){return xs(/^iPhone/)}function zi(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}function FS(){return xs(/^iPad/)||$S()&&navigator.maxTouchPoints>1}function Xd(){return LS()||FS()}function xs(e){return typeof window<"u"&&window.navigator!=null?e.test(window.navigator.platform):void 0}const WS=24,BS=typeof window<"u"?x.useLayoutEffect:x.useEffect;function Hi(...e){return(...t)=>{for(let n of e)typeof n=="function"&&n(...t)}}const ea=typeof document<"u"&&window.visualViewport;function Ui(e){let t=window.getComputedStyle(e);return/(auto|scroll)/.test(t.overflow+t.overflowX+t.overflowY)}function Zd(e){for(Ui(e)&&(e=e.parentElement);e&&!Ui(e);)e=e.parentElement;return e||document.scrollingElement||document.documentElement}const YS=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);let Or=0,ta;function zS(e={}){let{isDisabled:t}=e;BS(()=>{if(!t)return Or++,Or===1&&Xd()&&(ta=HS()),()=>{Or--,Or===0&&(ta==null||ta())}},[t])}function HS(){let e,t=0,n=c=>{e=Zd(c.target),!(e===document.documentElement&&e===document.body)&&(t=c.changedTouches[0].pageY)},r=c=>{if(!e||e===document.documentElement||e===document.body){c.preventDefault();return}let p=c.changedTouches[0].pageY,h=e.scrollTop,b=e.scrollHeight-e.clientHeight;b!==0&&((h<=0&&p>t||h>=b&&p<t)&&c.preventDefault(),t=p)},o=c=>{let p=c.target;ka(p)&&p!==document.activeElement&&(c.preventDefault(),p.style.transform="translateY(-2000px)",p.focus(),requestAnimationFrame(()=>{p.style.transform=""}))},a=c=>{let p=c.target;ka(p)&&(p.style.transform="translateY(-2000px)",requestAnimationFrame(()=>{p.style.transform="",ea&&(ea.height<window.innerHeight?requestAnimationFrame(()=>{Gi(p)}):ea.addEventListener("resize",()=>Gi(p),{once:!0}))}))},i=()=>{window.scrollTo(0,0)},s=window.pageXOffset,l=window.pageYOffset,u=Hi(US(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`));window.scrollTo(0,0);let f=Hi(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,l)}}function US(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 Gi(e){let t=document.scrollingElement||document.documentElement;for(;e&&e!==t;){let n=Zd(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+WS;a>i&&(n.scrollTop+=o-r)}e=n.parentElement}}function ka(e){return e instanceof HTMLInputElement&&!YS.has(e.type)||e instanceof HTMLTextAreaElement||e instanceof HTMLElement&&e.isContentEditable}function GS(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function qS(...e){return t=>e.forEach(n=>GS(n,t))}function Qd(...e){return d.useCallback(qS(...e),e)}const Jd=new WeakMap;function $e(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&&Jd.set(e,r)}function VS(e,t){if(!e||!(e instanceof HTMLElement))return;let n=Jd.get(e);n&&(e.style[t]=n[t])}const _e=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(", ")[_e(t)?13:12]):(o=r.match(/^matrix\((.+)\)$/),o?parseFloat(o[1].split(", ")[_e(t)?5:4]):null)}function KS(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 XS(...e){return(...t)=>{for(const n of e)typeof n=="function"&&n(...t)}}const De={DURATION:.5,EASE:[.32,.72,0,1]},ef=.4,ZS=.25,QS=100,tf=8,Zt=16,Ra=26,ra="vaul-dragging";function nf(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 JS({defaultProp:e,onChange:t}){const n=x.useState(e),[r]=n,o=x.useRef(r),a=nf(t);return x.useEffect(()=>{o.current!==r&&(a(r),o.current=r)},[r,o,a]),n}function rf({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=JS({defaultProp:t,onChange:n}),a=e!==void 0,i=a?e:r,s=nf(n),l=x.useCallback(u=>{if(a){const c=typeof u=="function"?u(e):u;c!==e&&s(c)}else o(u)},[a,e,o,s]);return[i,l]}function eC({activeSnapPointProp:e,setActiveSnapPointProp:t,snapPoints:n,drawerRef:r,overlayRef:o,fadeFromIndex:a,onSnapPointChange:i,direction:s="bottom",container:l,snapToSequentialPoint:u}){const[f,c]=rf({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,y=x.useMemo(()=>{const S=l?{width:l.getBoundingClientRect().width,height:l.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 j=typeof I=="string";let L=0;if(j&&(L=parseInt(I,10)),_e(s)){const B=j?L:p?I*S.height:0;return p?s==="bottom"?S.height-B:-S.height+B:B}const V=j?L:p?I*S.width:0;return p?s==="right"?S.width-V:-S.width+V:V}))!=null?k:[]},[n,p,l]),w=x.useMemo(()=>g!==null?y==null?void 0:y[g]:null,[y,g]),C=x.useCallback(S=>{var k;const I=(k=y==null?void 0:y.findIndex(j=>j===S))!=null?k:null;i(I),$e(r.current,{transition:`transform ${De.DURATION}s cubic-bezier(${De.EASE.join(",")})`,transform:_e(s)?`translate3d(0, ${S}px, 0)`:`translate3d(${S}px, 0, 0)`}),y&&I!==y.length-1&&a!==void 0&&I!==a&&I<a?$e(o.current,{transition:`opacity ${De.DURATION}s cubic-bezier(${De.EASE.join(",")})`,opacity:"0"}):$e(o.current,{transition:`opacity ${De.DURATION}s cubic-bezier(${De.EASE.join(",")})`,opacity:"1"}),c(n==null?void 0:n[Math.max(I,0)])},[r.current,n,y,a,o,c]);x.useEffect(()=>{if(f||e){var S;const k=(S=n==null?void 0:n.findIndex(I=>I===e||I===f))!=null?S:-1;y&&k!==-1&&typeof y[k]=="number"&&C(y[k])}},[f,e,n,y,C]);function D({draggedDistance:S,closeDrawer:k,velocity:I,dismissible:j}){if(a===void 0)return;const L=s==="bottom"||s==="right"?(w??0)-S:(w??0)+S,V=g===a-1,B=g===0,P=S>0;if(V&&$e(o.current,{transition:`opacity ${De.DURATION}s cubic-bezier(${De.EASE.join(",")})`}),!u&&I>2&&!P){j?k():C(y[0]);return}if(!u&&I>2&&P&&y&&n){C(y[n.length-1]);return}const O=y==null?void 0:y.reduce((A,N)=>typeof A!="number"||typeof N!="number"?A:Math.abs(N-L)<Math.abs(A-L)?N:A),M=_e(s)?window.innerHeight:window.innerWidth;if(I>ef&&Math.abs(S)<M*.4){const A=P?1:-1;if(A>0&&b&&n){C(y[n.length-1]);return}if(B&&A<0&&j&&k(),g===null)return;C(y[g+A]);return}C(O)}function E({draggedDistance:S}){if(w===null)return;const k=s==="bottom"||s==="right"?w-S:w+S;(s==="bottom"||s==="right")&&k<y[y.length-1]||(s==="top"||s==="left")&&k>y[y.length-1]||$e(r.current,{transform:_e(s)?`translate3d(0, ${k}px, 0)`:`translate3d(${k}px, 0, 0)`})}function R(S,k){if(!n||typeof g!="number"||!y||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 L=I?g+1:g-1,V=I?y[L]-y[L-1]:y[L+1]-y[L],B=S/Math.abs(V);return I?1-B:B}return{isLastSnapPoint:b,activeSnapPoint:f,shouldFade:v,getPercentageDragged:R,setActiveSnapPoint:c,activeSnapPointIndex:g,onRelease:D,onDrag:E,snapPointsOffset:y}}const tC=()=>()=>{};function nC(){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 l=document.querySelector("[data-vaul-drawer-wrapper]")||document.querySelector("[vaul-drawer-wrapper]");if(!l)return;XS(r&&!o?na(document.body,{background:"black"}):tC,na(l,{transformOrigin:_e(e)?"top":"left",transitionProperty:"transform, border-radius",transitionDuration:`${De.DURATION}s`,transitionTimingFunction:`cubic-bezier(${De.EASE.join(",")})`}));const u=na(l,{borderRadius:`${tf}px`,overflow:"hidden",..._e(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")},De.DURATION*1e3)}}},[t,n,i])}let Bn=null;function rC({isOpen:e,modal:t,nested:n,hasBeenOpened:r,preventScrollRestoration:o,noBodyStyles:a}){const[i,s]=x.useState(()=>typeof window<"u"?window.location.href:""),l=x.useRef(0),u=x.useCallback(()=>{if(zi()&&Bn===null&&e&&!a){Bn={position:document.body.style.position,top:document.body.style.top,left:document.body.style.left,height:document.body.style.height,right:"unset"};const{scrollX:c,innerHeight:p}=window;document.body.style.setProperty("position","fixed","important"),Object.assign(document.body.style,{top:`${-l.current}px`,left:`${-c}px`,right:"0px",height:"auto"}),window.setTimeout(()=>window.requestAnimationFrame(()=>{const h=p-window.innerHeight;h&&l.current>=p&&(document.body.style.top=`${-(l.current+h)}px`)}),300)}},[e]),f=x.useCallback(()=>{if(zi()&&Bn!==null&&!a){const c=-parseInt(document.body.style.top,10),p=-parseInt(document.body.style.left,10);Object.assign(document.body.style,Bn),window.requestAnimationFrame(()=>{if(o&&i!==window.location.href){s(window.location.href);return}window.scrollTo(p,c)}),Bn=null}},[i]);return x.useEffect(()=>{function c(){l.current=window.scrollY}return c(),window.addEventListener("scroll",c),()=>{window.removeEventListener("scroll",c)}},[]),x.useEffect(()=>{if(t)return()=>{typeof document>"u"||document.querySelector("[data-vaul-drawer]")||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 oC({open:e,onOpenChange:t,children:n,onDrag:r,onRelease:o,snapPoints:a,shouldScaleBackground:i=!1,setBackgroundColorOnScale:s=!0,closeThreshold:l=ZS,scrollLockTimeout:u=QS,dismissible:f=!0,handleOnly:c=!1,fadeFromIndex:p=a&&a.length-1,activeSnapPoint:h,setActiveSnapPoint:b,fixed:g,modal:v=!0,onClose:y,nested:w,noBodyStyles:C=!1,direction:D="bottom",defaultOpen:E=!1,disablePreventScroll:R=!0,snapToSequentialPoint:S=!1,preventScrollRestoration:k=!1,repositionInputs:I=!0,onAnimationEnd:j,container:L,autoFocus:V=!1}){var B,P;const[O=!1,M]=rf({defaultProp:E,prop:e,onChange:q=>{t==null||t(q),!q&&!w&&Ye(),setTimeout(()=>{j==null||j(q)},De.DURATION*1e3),q&&!v&&typeof window<"u"&&window.requestAnimationFrame(()=>{document.body.style.pointerEvents="auto"}),q||(document.body.style.pointerEvents="auto")}}),[A,N]=x.useState(!1),[_,Y]=x.useState(!1),[H,T]=x.useState(!1),$=x.useRef(null),z=x.useRef(null),U=x.useRef(null),G=x.useRef(null),W=x.useRef(null),Q=x.useRef(!1),K=x.useRef(null),Z=x.useRef(0),se=x.useRef(!1),ie=x.useRef(!E),be=x.useRef(0),ee=x.useRef(null),Ae=x.useRef(((B=ee.current)==null?void 0:B.getBoundingClientRect().height)||0),Ie=x.useRef(((P=ee.current)==null?void 0:P.getBoundingClientRect().width)||0),Ee=x.useRef(0),Ge=x.useCallback(q=>{a&&q===re.length-1&&(z.current=new Date)},[]),{activeSnapPoint:Ce,activeSnapPointIndex:Xe,setActiveSnapPoint:_t,onRelease:Oe,snapPointsOffset:re,onDrag:pe,shouldFade:Te,getPercentageDragged:Fe}=eC({snapPoints:a,activeSnapPointProp:h,setActiveSnapPointProp:b,drawerRef:ee,fadeFromIndex:p,overlayRef:$,onSnapPointChange:Ge,direction:D,container:L,snapToSequentialPoint:S});zS({isDisabled:!O||_||!v||H||!A||!I||!R});const{restorePositionSetting:Ye}=rC({isOpen:O,modal:v,nested:w??!1,hasBeenOpened:A,preventScrollRestoration:k,noBodyStyles:C});function at(){return(window.innerWidth-Ra)/window.innerWidth}function qt(q){var ce,ae;!f&&!a||ee.current&&!ee.current.contains(q.target)||(Ae.current=((ce=ee.current)==null?void 0:ce.getBoundingClientRect().height)||0,Ie.current=((ae=ee.current)==null?void 0:ae.getBoundingClientRect().width)||0,Y(!0),U.current=new Date,Xd()&&window.addEventListener("touchend",()=>Q.current=!1,{once:!0}),q.target.setPointerCapture(q.pointerId),Z.current=_e(D)?q.pageY:q.pageX)}function st(q,ce){var ae;let me=q;const ge=(ae=window.getSelection())==null?void 0:ae.toString(),oe=ee.current?Tr(ee.current,D):null,de=new Date;if(me.tagName==="SELECT"||me.hasAttribute("data-vaul-no-drag")||me.closest("[data-vaul-no-drag]"))return!1;if(D==="right"||D==="left")return!0;if(z.current&&de.getTime()-z.current.getTime()<500)return!1;if(oe!==null&&(D==="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||ce)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 cn(q){if(ee.current&&_){const ce=D==="bottom"||D==="right"?1:-1,ae=(Z.current-(_e(D)?q.pageY:q.pageX))*ce,me=ae>0,ge=a&&!f&&!me;if(ge&&Xe===0)return;const oe=Math.abs(ae),de=document.querySelector("[data-vaul-drawer-wrapper]"),ve=D==="bottom"||D==="top"?Ae.current:Ie.current;let ue=oe/ve;const Ve=Fe(oe,me);if(Ve!==null&&(ue=Ve),ge&&ue>=1||!Q.current&&!st(q.target,me))return;if(ee.current.classList.add(ra),Q.current=!0,$e(ee.current,{transition:"none"}),$e($.current,{transition:"none"}),a&&pe({draggedDistance:ae}),me&&!a){const Se=KS(ae),Ze=Math.min(Se*-1,0)*ce;$e(ee.current,{transform:_e(D)?`translate3d(0, ${Ze}px, 0)`:`translate3d(${Ze}px, 0, 0)`});return}const we=1-ue;if((Te||p&&Xe===p-1)&&(r==null||r(q,ue),$e($.current,{opacity:`${we}`,transition:"none"},!0)),de&&$.current&&i){const Se=Math.min(at()+ue*(1-at()),1),Ze=8-ue*8,We=Math.max(0,14-ue*14);$e(de,{borderRadius:`${Ze}px`,transform:_e(D)?`scale(${Se}) translate3d(0, ${We}px, 0)`:`scale(${Se}) translate3d(${We}px, 0, 0)`,transition:"none"},!0)}if(!a){const Se=oe*ce;$e(ee.current,{transform:_e(D)?`translate3d(0, ${Se}px, 0)`:`translate3d(${Se}px, 0, 0)`})}}}x.useEffect(()=>{window.requestAnimationFrame(()=>{ie.current=!0})},[]),x.useEffect(()=>{var q;function ce(){if(!ee.current||!I)return;const ae=document.activeElement;if(ka(ae)||se.current){var me;const ge=((me=window.visualViewport)==null?void 0:me.height)||0,oe=window.innerHeight;let de=oe-ge;const ve=ee.current.getBoundingClientRect().height||0,ue=ve>oe*.8;Ee.current||(Ee.current=ve);const Ve=ee.current.getBoundingClientRect().top;if(Math.abs(be.current-de)>60&&(se.current=!se.current),a&&a.length>0&&re&&Xe){const we=re[Xe]||0;de+=we}if(be.current=de,ve>ge||se.current){const we=ee.current.getBoundingClientRect().height;let Se=we;we>ge&&(Se=ge-(ue?Ve:Ra)),g?ee.current.style.height=`${we-Math.max(de,0)}px`:ee.current.style.height=`${Math.max(Se,ge-Ve)}px`}else jS()||(ee.current.style.height=`${Ee.current}px`);a&&a.length>0&&!se.current?ee.current.style.bottom="0px":ee.current.style.bottom=`${Math.max(de,0)}px`}}return(q=window.visualViewport)==null||q.addEventListener("resize",ce),()=>{var ae;return(ae=window.visualViewport)==null?void 0:ae.removeEventListener("resize",ce)}},[Xe,a,re]);function qe(q){An(),y==null||y(),q||M(!1),setTimeout(()=>{a&&_t(a[0])},De.DURATION*1e3)}function ln(){if(!ee.current)return;const q=document.querySelector("[data-vaul-drawer-wrapper]"),ce=Tr(ee.current,D);$e(ee.current,{transform:"translate3d(0, 0, 0)",transition:`transform ${De.DURATION}s cubic-bezier(${De.EASE.join(",")})`}),$e($.current,{transition:`opacity ${De.DURATION}s cubic-bezier(${De.EASE.join(",")})`,opacity:"1"}),i&&ce&&ce>0&&O&&$e(q,{borderRadius:`${tf}px`,overflow:"hidden",..._e(D)?{transform:`scale(${at()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`,transformOrigin:"top"}:{transform:`scale(${at()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`,transformOrigin:"left"},transitionProperty:"transform, border-radius",transitionDuration:`${De.DURATION}s`,transitionTimingFunction:`cubic-bezier(${De.EASE.join(",")})`},!0)}function An(){!_||!ee.current||(ee.current.classList.remove(ra),Q.current=!1,Y(!1),G.current=new Date)}function un(q){if(!_||!ee.current)return;ee.current.classList.remove(ra),Q.current=!1,Y(!1),G.current=new Date;const ce=Tr(ee.current,D);if(!q||!st(q.target,!1)||!ce||Number.isNaN(ce)||U.current===null)return;const ae=G.current.getTime()-U.current.getTime(),me=Z.current-(_e(D)?q.pageY:q.pageX),ge=Math.abs(me)/ae;if(ge>.05&&(T(!0),setTimeout(()=>{T(!1)},200)),a){Oe({draggedDistance:me*(D==="bottom"||D==="right"?1:-1),closeDrawer:qe,velocity:ge,dismissible:f}),o==null||o(q,!0);return}if(D==="bottom"||D==="right"?me>0:me<0){ln(),o==null||o(q,!0);return}if(ge>ef){qe(),o==null||o(q,!1);return}var oe;const de=Math.min((oe=ee.current.getBoundingClientRect().height)!=null?oe:0,window.innerHeight);var ve;const ue=Math.min((ve=ee.current.getBoundingClientRect().width)!=null?ve:0,window.innerWidth),Ve=D==="left"||D==="right";if(Math.abs(ce)>=(Ve?ue:de)*l){qe(),o==null||o(q,!1);return}o==null||o(q,!0),ln()}x.useEffect(()=>(O&&($e(document.documentElement,{scrollBehavior:"auto"}),z.current=new Date),()=>{VS(document.documentElement,"scrollBehavior")}),[O]);function Vt(q){const ce=q?(window.innerWidth-Zt)/window.innerWidth:1,ae=q?-Zt:0;K.current&&window.clearTimeout(K.current),$e(ee.current,{transition:`transform ${De.DURATION}s cubic-bezier(${De.EASE.join(",")})`,transform:_e(D)?`scale(${ce}) translate3d(0, ${ae}px, 0)`:`scale(${ce}) translate3d(${ae}px, 0, 0)`}),!q&&ee.current&&(K.current=setTimeout(()=>{const me=Tr(ee.current,D);$e(ee.current,{transition:"none",transform:_e(D)?`translate3d(0, ${me}px, 0)`:`translate3d(${me}px, 0, 0)`})},500))}function In(q,ce){if(ce<0)return;const ae=(window.innerWidth-Zt)/window.innerWidth,me=ae+ce*(1-ae),ge=-Zt+ce*Zt;$e(ee.current,{transform:_e(D)?`scale(${me}) translate3d(0, ${ge}px, 0)`:`scale(${me}) translate3d(${ge}px, 0, 0)`,transition:"none"})}function Pt(q,ce){const ae=_e(D)?window.innerHeight:window.innerWidth,me=ce?(ae-Zt)/ae:1,ge=ce?-Zt:0;ce&&$e(ee.current,{transition:`transform ${De.DURATION}s cubic-bezier(${De.EASE.join(",")})`,transform:_e(D)?`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:E,onOpenChange:q=>{!f&&!q||(q?N(!0):qe(!0),M(q))},open:O},x.createElement(Kd.Provider,{value:{activeSnapPoint:Ce,snapPoints:a,setActiveSnapPoint:_t,drawerRef:ee,overlayRef:$,onOpenChange:t,onPress:qt,onRelease:un,onDrag:cn,dismissible:f,shouldAnimate:ie,handleOnly:c,isOpen:O,isDragging:_,shouldFade:Te,closeDrawer:qe,onNestedDrag:In,onNestedOpenChange:Vt,onNestedRelease:Pt,keyboardIsOpen:se,modal:v,snapPointsOffset:re,activeSnapPointIndex:Xe,direction:D,shouldScaleBackground:i,setBackgroundColorOnScale:s,noBodyStyles:C,container:L,autoFocus:V}},n))}const of=x.forwardRef(function({...e},t){const{overlayRef:n,snapPoints:r,onRelease:o,shouldFade:a,isOpen:i,modal:s,shouldAnimate:l}=hr(),u=Qd(t,n),f=r&&r.length>0;if(!s)return null;const c=x.useCallback(p=>o(p),[o]);return x.createElement(yo,{onMouseUp:c,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":l!=null&&l.current?"true":"false",...e})});of.displayName="Drawer.Overlay";const af=x.forwardRef(function({onPointerDownOutside:e,style:t,onOpenAutoFocus:n,...r},o){const{drawerRef:a,onPress:i,onRelease:s,onDrag:l,keyboardIsOpen:u,snapPointsOffset:f,activeSnapPointIndex:c,modal:p,isOpen:h,direction:b,snapPoints:g,container:v,handleOnly:y,shouldAnimate:w,autoFocus:C}=hr(),[D,E]=x.useState(!1),R=Qd(o,a),S=x.useRef(null),k=x.useRef(null),I=x.useRef(!1),j=g&&g.length>0;nC();const L=(B,P,O=0)=>{if(I.current)return!0;const M=Math.abs(B.y),A=Math.abs(B.x),N=A>M,_=["bottom","right"].includes(P)?1:-1;if(P==="left"||P==="right"){if(!(B.x*_<0)&&A>=0&&A<=O)return N}else if(!(B.y*_<0)&&M>=0&&M<=O)return!N;return I.current=!0,!0};x.useEffect(()=>{j&&window.requestAnimationFrame(()=>{E(!0)})},[]);function V(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":D?"true":"false","data-vaul-snap-points":h&&j?"true":"false","data-vaul-custom-container":v?"true":"false","data-vaul-animate":w!=null&&w.current?"true":"false",...r,ref:R,style:f&&f.length>0?{"--snap-point-height":`${f[c??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),C||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,y||(r.onPointerMove==null||r.onPointerMove.call(r,B),!S.current))return;const P=B.pageY-S.current.y,O=B.pageX-S.current.x,M=B.pointerType==="touch"?10:2;L({x:O,y:P},b,M)?l(B):(Math.abs(O)>M||Math.abs(P)>M)&&(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),V(k.current)},onContextMenu:B=>{r.onContextMenu==null||r.onContextMenu.call(r,B),k.current&&V(k.current)}})});af.displayName="Drawer.Content";const aC=250,sC=120,iC=x.forwardRef(function({preventCycle:e=!1,children:t,...n},r){const{closeDrawer:o,isDragging:a,snapPoints:i,activeSnapPoint:s,setActiveSnapPoint:l,dismissible:u,handleOnly:f,isOpen:c,onPress:p,onDrag:h}=hr(),b=x.useRef(null),g=x.useRef(!1);function v(){if(g.current){C();return}window.setTimeout(()=>{y()},sC)}function y(){if(a||e||g.current){C();return}if(C(),!i||i.length===0){u||o();return}if(s===i[i.length-1]&&u){o();return}const E=i.findIndex(S=>S===s);if(E===-1)return;const R=i[E+1];l(R)}function w(){b.current=window.setTimeout(()=>{g.current=!0},aC)}function C(){b.current&&window.clearTimeout(b.current),g.current=!1}return x.createElement("div",{onClick:v,onPointerCancel:C,onPointerDown:D=>{f&&p(D),w()},onPointerMove:D=>{f&&h(D)},ref:r,"data-vaul-drawer-visible":c?"true":"false","data-vaul-handle":"","aria-hidden":"true",...n},x.createElement("span",{"data-vaul-handle-hitarea":"","aria-hidden":"true"},t))});iC.displayName="Drawer.Handle";function cC(e){const t=hr(),{container:n=t.container,...r}=e;return x.createElement(us,{container:n,...r})}const mt={Root:oC,Content:af,Overlay:of,Trigger:ed,Portal:cC,Close:ms,Title:ds,Description:fs},sf=({shouldScaleBackground:e=!0,...t})=>m.jsx(mt.Root,{shouldScaleBackground:e,...t});sf.displayName="Drawer";const lC=mt.Trigger,uC=mt.Portal,dC=mt.Close,cf=d.forwardRef(({className:e,...t},n)=>m.jsx(mt.Overlay,{ref:n,className:F("fixed inset-0 z-50 bg-black/80",e),...t}));cf.displayName=mt.Overlay.displayName;const lf=d.forwardRef(({className:e,children:t,...n},r)=>m.jsxs(uC,{children:[m.jsx(cf,{}),m.jsxs(mt.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]})]}));lf.displayName="DrawerContent";const uf=({className:e,...t})=>m.jsx("div",{className:F("grid gap-1.5 p-4 text-center sm:text-left",e),...t});uf.displayName="DrawerHeader";const df=({className:e,...t})=>m.jsx("div",{className:F("mt-auto flex flex-col gap-2 p-4",e),...t});df.displayName="DrawerFooter";const ff=d.forwardRef(({className:e,...t},n)=>m.jsx(mt.Title,{ref:n,className:F("text-lg font-semibold leading-none tracking-tight",e),...t}));ff.displayName=mt.Title.displayName;const mf=d.forwardRef(({className:e,...t},n)=>m.jsx(mt.Description,{ref:n,className:F("text-sm text-muted-foreground",e),...t}));mf.displayName=mt.Description.displayName;var fC="DismissableLayer",Oa="dismissableLayer.update",mC="dismissableLayer.pointerDownOutside",pC="dismissableLayer.focusOutside",qi,pf=d.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),hf=d.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:i,onDismiss:s,...l}=e,u=d.useContext(pf),[f,c]=d.useState(null),p=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,h]=d.useState({}),b=fe(t,S=>c(S)),g=Array.from(u.layers),[v]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),y=g.indexOf(v),w=f?g.indexOf(f):-1,C=u.layersWithOutsidePointerEventsDisabled.size>0,D=w>=y,E=vC(S=>{const k=S.target,I=[...u.branches].some(j=>j.contains(k));!D||I||(o==null||o(S),i==null||i(S),S.defaultPrevented||s==null||s())},p),R=bC(S=>{const k=S.target;[...u.branches].some(j=>j.contains(k))||(a==null||a(S),i==null||i(S),S.defaultPrevented||s==null||s())},p);return nr(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&&(qi=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(f)),u.layers.add(f),Vi(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=qi)}},[f,p,n,u]),d.useEffect(()=>()=>{f&&(u.layers.delete(f),u.layersWithOutsidePointerEventsDisabled.delete(f),Vi())},[f,u]),d.useEffect(()=>{const S=()=>h({});return document.addEventListener(Oa,S),()=>document.removeEventListener(Oa,S)},[]),m.jsx(J.div,{...l,ref:b,style:{pointerEvents:C?D?"auto":"none":void 0,...e.style},onFocusCapture:X(e.onFocusCapture,R.onFocusCapture),onBlurCapture:X(e.onBlurCapture,R.onBlurCapture),onPointerDownCapture:X(e.onPointerDownCapture,E.onPointerDownCapture)})});hf.displayName=fC;var hC="DismissableLayerBranch",gC=d.forwardRef((e,t)=>{const n=d.useContext(pf),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})});gC.displayName=hC;function vC(e,t=globalThis==null?void 0:globalThis.document){const n=Pe(e),r=d.useRef(!1),o=d.useRef(()=>{});return d.useEffect(()=>{const a=s=>{if(s.target&&!r.current){let l=function(){gf(mC,n,u,{discrete:!0})};const u={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=l,t.addEventListener("click",o.current,{once:!0})):l()}else t.removeEventListener("click",o.current);r.current=!1},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 bC(e,t=globalThis==null?void 0:globalThis.document){const n=Pe(e),r=d.useRef(!1);return d.useEffect(()=>{const o=a=>{a.target&&!r.current&&gf(pC,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 Vi(){const e=new CustomEvent(Oa);document.dispatchEvent(e)}function gf(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?Nn(o,a):o.dispatchEvent(a)}var oa="rovingFocusGroup.onEntryFocus",yC={bubbles:!1,cancelable:!0},gr="RovingFocusGroup",[Ta,vf,wC]=Ja(gr),[xC,Pn]=He(gr,[wC]),[SC,CC]=xC(gr),bf=d.forwardRef((e,t)=>m.jsx(Ta.Provider,{scope:e.__scopeRovingFocusGroup,children:m.jsx(Ta.Slot,{scope:e.__scopeRovingFocusGroup,children:m.jsx(EC,{...e,ref:t})})}));bf.displayName=gr;var EC=d.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:a,currentTabStopId:i,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:l,onEntryFocus:u,preventScrollOnEntryFocus:f=!1,...c}=e,p=d.useRef(null),h=fe(t,p),b=ur(a),[g,v]=rt({prop:i,defaultProp:s??null,onChange:l,caller:gr}),[y,w]=d.useState(!1),C=Pe(u),D=vf(n),E=d.useRef(!1),[R,S]=d.useState(0);return d.useEffect(()=>{const k=p.current;if(k)return k.addEventListener(oa,C),()=>k.removeEventListener(oa,C)},[C]),m.jsx(SC,{scope:n,orientation:r,dir:b,loop:o,currentTabStopId:g,onItemFocus:d.useCallback(k=>v(k),[v]),onItemShiftTab:d.useCallback(()=>w(!0),[]),onFocusableItemAdd:d.useCallback(()=>S(k=>k+1),[]),onFocusableItemRemove:d.useCallback(()=>S(k=>k-1),[]),children:m.jsx(J.div,{tabIndex:y||R===0?-1:0,"data-orientation":r,...c,ref:h,style:{outline:"none",...e.style},onMouseDown:X(e.onMouseDown,()=>{E.current=!0}),onFocus:X(e.onFocus,k=>{const I=!E.current;if(k.target===k.currentTarget&&I&&!y){const j=new CustomEvent(oa,yC);if(k.currentTarget.dispatchEvent(j),!j.defaultPrevented){const L=D().filter(M=>M.focusable),V=L.find(M=>M.active),B=L.find(M=>M.id===g),O=[V,B,...L].filter(Boolean).map(M=>M.ref.current);xf(O,f)}}E.current=!1}),onBlur:X(e.onBlur,()=>w(!1))})})}),yf="RovingFocusGroupItem",wf=d.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:a,children:i,...s}=e,l=Re(),u=a||l,f=CC(yf,n),c=f.currentTabStopId===u,p=vf(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:c?0:-1,"data-orientation":f.orientation,...s,ref:t,onMouseDown:X(e.onMouseDown,v=>{r?f.onItemFocus(u):v.preventDefault()}),onFocus:X(e.onFocus,()=>f.onItemFocus(u)),onKeyDown:X(e.onKeyDown,v=>{if(v.key==="Tab"&&v.shiftKey){f.onItemShiftTab();return}if(v.target!==v.currentTarget)return;const y=NC(v,f.orientation,f.dir);if(y!==void 0){if(v.metaKey||v.ctrlKey||v.altKey||v.shiftKey)return;v.preventDefault();let C=p().filter(D=>D.focusable).map(D=>D.ref.current);if(y==="last")C.reverse();else if(y==="prev"||y==="next"){y==="prev"&&C.reverse();const D=C.indexOf(v.currentTarget);C=f.loop?kC(C,D+1):C.slice(D+1)}setTimeout(()=>xf(C))}}),children:typeof i=="function"?i({isCurrentTabStop:c,hasTabStop:g!=null}):i})})});wf.displayName=yf;var DC={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function MC(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function NC(e,t,n){const r=MC(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return DC[r]}function xf(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function kC(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var Ss=bf,Cs=wf,_a=["Enter"," "],RC=["ArrowDown","PageUp","Home"],Sf=["ArrowUp","PageDown","End"],OC=[...RC,...Sf],TC={ltr:[..._a,"ArrowRight"],rtl:[..._a,"ArrowLeft"]},_C={ltr:["ArrowLeft"],rtl:["ArrowRight"]},vr="Menu",[Zn,PC,AC]=Ja(vr),[sn,Cf]=He(vr,[AC,Yt,Pn]),br=Yt(),Ef=Pn(),[Df,Gt]=sn(vr),[IC,yr]=sn(vr),Mf=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:o,onOpenChange:a,modal:i=!0}=e,s=br(t),[l,u]=d.useState(null),f=d.useRef(!1),c=Pe(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(Df,{scope:t,open:n,onOpenChange:c,content:l,onContentChange:u,children:m.jsx(IC,{scope:t,onClose:d.useCallback(()=>c(!1),[c]),isUsingKeyboardRef:f,dir:p,modal:i,children:r})})})};Mf.displayName=vr;var jC="MenuAnchor",Es=d.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=br(n);return m.jsx(sr,{...o,...r,ref:t})});Es.displayName=jC;var Ds="MenuPortal",[$C,Nf]=sn(Ds,{forceMount:void 0}),kf=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:o}=e,a=Gt(Ds,t);return m.jsx($C,{scope:t,forceMount:n,children:m.jsx(ot,{present:n||a.open,children:m.jsx(ir,{asChild:!0,container:o,children:r})})})};kf.displayName=Ds;var nt="MenuContent",[LC,Ms]=sn(nt),Rf=d.forwardRef((e,t)=>{const n=Nf(nt,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,a=Gt(nt,e.__scopeMenu),i=yr(nt,e.__scopeMenu);return m.jsx(Zn.Provider,{scope:e.__scopeMenu,children:m.jsx(ot,{present:r||a.open,children:m.jsx(Zn.Slot,{scope:e.__scopeMenu,children:i.modal?m.jsx(FC,{...o,ref:t}):m.jsx(WC,{...o,ref:t})})})})}),FC=d.forwardRef((e,t)=>{const n=Gt(nt,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:X(e.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),WC=d.forwardRef((e,t)=>{const n=Gt(nt,e.__scopeMenu);return m.jsx(Ns,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),BC=Lt("MenuContent.ScrollLock"),Ns=d.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:o,onOpenAutoFocus:a,onCloseAutoFocus:i,disableOutsidePointerEvents:s,onEntryFocus:l,onEscapeKeyDown:u,onPointerDownOutside:f,onFocusOutside:c,onInteractOutside:p,onDismiss:h,disableOutsideScroll:b,...g}=e,v=Gt(nt,n),y=yr(nt,n),w=br(n),C=Ef(n),D=PC(n),[E,R]=d.useState(null),S=d.useRef(null),k=fe(t,S,v.onContentChange),I=d.useRef(0),j=d.useRef(""),L=d.useRef(0),V=d.useRef(null),B=d.useRef("right"),P=d.useRef(0),O=b?cr:d.Fragment,M=b?{as:BC,allowPinchZoom:!0}:void 0,A=_=>{var W,Q;const Y=j.current+_,H=D().filter(K=>!K.disabled),T=document.activeElement,$=(W=H.find(K=>K.ref.current===T))==null?void 0:W.textValue,z=H.map(K=>K.textValue),U=JC(z,Y,$),G=(Q=H.find(K=>K.textValue===U))==null?void 0:Q.ref.current;(function K(Z){j.current=Z,window.clearTimeout(I.current),Z!==""&&(I.current=window.setTimeout(()=>K(""),1e3))})(Y),G&&setTimeout(()=>G.focus())};d.useEffect(()=>()=>window.clearTimeout(I.current),[]),Wa();const N=d.useCallback(_=>{var H,T;return B.current===((H=V.current)==null?void 0:H.side)&&tE(_,(T=V.current)==null?void 0:T.area)},[]);return m.jsx(LC,{scope:n,searchRef:j,onItemEnter:d.useCallback(_=>{N(_)&&_.preventDefault()},[N]),onItemLeave:d.useCallback(_=>{var Y;N(_)||((Y=S.current)==null||Y.focus(),R(null))},[N]),onTriggerLeave:d.useCallback(_=>{N(_)&&_.preventDefault()},[N]),pointerGraceTimerRef:L,onPointerGraceIntentChange:d.useCallback(_=>{V.current=_},[]),children:m.jsx(O,{...M,children:m.jsx(rr,{asChild:!0,trapped:o,onMountAutoFocus:X(a,_=>{var Y;_.preventDefault(),(Y=S.current)==null||Y.focus({preventScroll:!0})}),onUnmountAutoFocus:i,children:m.jsx(hf,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:u,onPointerDownOutside:f,onFocusOutside:c,onInteractOutside:p,onDismiss:h,children:m.jsx(Ss,{asChild:!0,...C,dir:y.dir,orientation:"vertical",loop:r,currentTabStopId:E,onCurrentTabStopIdChange:R,onEntryFocus:X(l,_=>{y.isUsingKeyboardRef.current||_.preventDefault()}),preventScrollOnEntryFocus:!0,children:m.jsx(so,{role:"menu","aria-orientation":"vertical","data-state":Gf(v.open),"data-radix-menu-content":"",dir:y.dir,...w,...g,ref:k,style:{outline:"none",...g.style},onKeyDown:X(g.onKeyDown,_=>{const H=_.target.closest("[data-radix-menu-content]")===_.currentTarget,T=_.ctrlKey||_.altKey||_.metaKey,$=_.key.length===1;H&&(_.key==="Tab"&&_.preventDefault(),!T&&$&&A(_.key));const z=S.current;if(_.target!==z||!OC.includes(_.key))return;_.preventDefault();const G=D().filter(W=>!W.disabled).map(W=>W.ref.current);Sf.includes(_.key)&&G.reverse(),ZC(G)}),onBlur:X(e.onBlur,_=>{_.currentTarget.contains(_.target)||(window.clearTimeout(I.current),j.current="")}),onPointerMove:X(e.onPointerMove,Qn(_=>{const Y=_.target,H=P.current!==_.clientX;if(_.currentTarget.contains(Y)&&H){const T=_.clientX>P.current?"right":"left";B.current=T,P.current=_.clientX}}))})})})})})})});Rf.displayName=nt;var YC="MenuGroup",ks=d.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return m.jsx(J.div,{role:"group",...r,ref:t})});ks.displayName=YC;var zC="MenuLabel",Of=d.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return m.jsx(J.div,{...r,ref:t})});Of.displayName=zC;var Xr="MenuItem",Ki="menu.itemSelect",Eo=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),l=fe(t,a),u=d.useRef(!1),f=()=>{const c=a.current;if(!n&&c){const p=new CustomEvent(Ki,{bubbles:!0,cancelable:!0});c.addEventListener(Ki,h=>r==null?void 0:r(h),{once:!0}),Nn(c,p),p.defaultPrevented?u.current=!1:i.onClose()}};return m.jsx(Tf,{...o,ref:l,disabled:n,onClick:X(e.onClick,f),onPointerDown:c=>{var p;(p=e.onPointerDown)==null||p.call(e,c),u.current=!0},onPointerUp:X(e.onPointerUp,c=>{var p;u.current||(p=c.currentTarget)==null||p.click()}),onKeyDown:X(e.onKeyDown,c=>{const p=s.searchRef.current!=="";n||p&&c.key===" "||_a.includes(c.key)&&(c.currentTarget.click(),c.preventDefault())})})});Eo.displayName=Xr;var Tf=d.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:o,...a}=e,i=Ms(Xr,n),s=Ef(n),l=d.useRef(null),u=fe(t,l),[f,c]=d.useState(!1),[p,h]=d.useState("");return d.useEffect(()=>{const b=l.current;b&&h((b.textContent??"").trim())},[a.children]),m.jsx(Zn.ItemSlot,{scope:n,disabled:r,textValue:o??p,children:m.jsx(Cs,{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:X(e.onPointerMove,Qn(b=>{r?i.onItemLeave(b):(i.onItemEnter(b),b.defaultPrevented||b.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:X(e.onPointerLeave,Qn(b=>i.onItemLeave(b))),onFocus:X(e.onFocus,()=>c(!0)),onBlur:X(e.onBlur,()=>c(!1))})})})}),HC="MenuCheckboxItem",_f=d.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...o}=e;return m.jsx($f,{scope:e.__scopeMenu,checked:n,children:m.jsx(Eo,{role:"menuitemcheckbox","aria-checked":Zr(n)?"mixed":n,...o,ref:t,"data-state":Ts(n),onSelect:X(o.onSelect,()=>r==null?void 0:r(Zr(n)?!0:!n),{checkForDefaultPrevented:!1})})})});_f.displayName=HC;var Pf="MenuRadioGroup",[UC,GC]=sn(Pf,{value:void 0,onValueChange:()=>{}}),Af=d.forwardRef((e,t)=>{const{value:n,onValueChange:r,...o}=e,a=Pe(r);return m.jsx(UC,{scope:e.__scopeMenu,value:n,onValueChange:a,children:m.jsx(ks,{...o,ref:t})})});Af.displayName=Pf;var If="MenuRadioItem",jf=d.forwardRef((e,t)=>{const{value:n,...r}=e,o=GC(If,e.__scopeMenu),a=n===o.value;return m.jsx($f,{scope:e.__scopeMenu,checked:a,children:m.jsx(Eo,{role:"menuitemradio","aria-checked":a,...r,ref:t,"data-state":Ts(a),onSelect:X(r.onSelect,()=>{var i;return(i=o.onValueChange)==null?void 0:i.call(o,n)},{checkForDefaultPrevented:!1})})})});jf.displayName=If;var Rs="MenuItemIndicator",[$f,qC]=sn(Rs,{checked:!1}),Lf=d.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...o}=e,a=qC(Rs,n);return m.jsx(ot,{present:r||Zr(a.checked)||a.checked===!0,children:m.jsx(J.span,{...o,ref:t,"data-state":Ts(a.checked)})})});Lf.displayName=Rs;var VC="MenuSeparator",Ff=d.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return m.jsx(J.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});Ff.displayName=VC;var KC="MenuArrow",Wf=d.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=br(n);return m.jsx(io,{...o,...r,ref:t})});Wf.displayName=KC;var Os="MenuSub",[XC,Bf]=sn(Os),Yf=e=>{const{__scopeMenu:t,children:n,open:r=!1,onOpenChange:o}=e,a=Gt(Os,t),i=br(t),[s,l]=d.useState(null),[u,f]=d.useState(null),c=Pe(o);return d.useEffect(()=>(a.open===!1&&c(!1),()=>c(!1)),[a.open,c]),m.jsx(ar,{...i,children:m.jsx(Df,{scope:t,open:r,onOpenChange:c,content:u,onContentChange:f,children:m.jsx(XC,{scope:t,contentId:Re(),triggerId:Re(),trigger:s,onTriggerChange:l,children:n})})})};Yf.displayName=Os;var Hn="MenuSubTrigger",zf=d.forwardRef((e,t)=>{const n=Gt(Hn,e.__scopeMenu),r=yr(Hn,e.__scopeMenu),o=Bf(Hn,e.__scopeMenu),a=Ms(Hn,e.__scopeMenu),i=d.useRef(null),{pointerGraceTimerRef:s,onPointerGraceIntentChange:l}=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 c=s.current;return()=>{window.clearTimeout(c),l(null)}},[s,l]),m.jsx(Es,{asChild:!0,...u,children:m.jsx(Tf,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":o.contentId,"data-state":Gf(n.open),...e,ref:Nt(t,o.onTriggerChange),onClick:c=>{var p;(p=e.onClick)==null||p.call(e,c),!(e.disabled||c.defaultPrevented)&&(c.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:X(e.onPointerMove,Qn(c=>{a.onItemEnter(c),!c.defaultPrevented&&!e.disabled&&!n.open&&!i.current&&(a.onPointerGraceIntentChange(null),i.current=window.setTimeout(()=>{n.onOpenChange(!0),f()},100))})),onPointerLeave:X(e.onPointerLeave,Qn(c=>{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"],C=p[v?"right":"left"];a.onPointerGraceIntentChange({area:[{x:c.clientX+y,y:c.clientY},{x:w,y:p.top},{x:C,y:p.top},{x:C,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(c),c.defaultPrevented)return;a.onPointerGraceIntentChange(null)}})),onKeyDown:X(e.onKeyDown,c=>{var h;const p=a.searchRef.current!=="";e.disabled||p&&c.key===" "||TC[r.dir].includes(c.key)&&(n.onOpenChange(!0),(h=n.content)==null||h.focus(),c.preventDefault())})})})});zf.displayName=Hn;var Hf="MenuSubContent",Uf=d.forwardRef((e,t)=>{const n=Nf(nt,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,a=Gt(nt,e.__scopeMenu),i=yr(nt,e.__scopeMenu),s=Bf(Hf,e.__scopeMenu),l=d.useRef(null),u=fe(t,l);return m.jsx(Zn.Provider,{scope:e.__scopeMenu,children:m.jsx(ot,{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 c;i.isUsingKeyboardRef.current&&((c=l.current)==null||c.focus()),f.preventDefault()},onCloseAutoFocus:f=>f.preventDefault(),onFocusOutside:X(e.onFocusOutside,f=>{f.target!==s.trigger&&a.onOpenChange(!1)}),onEscapeKeyDown:X(e.onEscapeKeyDown,f=>{i.onClose(),f.preventDefault()}),onKeyDown:X(e.onKeyDown,f=>{var h;const c=f.currentTarget.contains(f.target),p=_C[i.dir].includes(f.key);c&&p&&(a.onOpenChange(!1),(h=s.trigger)==null||h.focus(),f.preventDefault())})})})})})});Uf.displayName=Hf;function Gf(e){return e?"open":"closed"}function Zr(e){return e==="indeterminate"}function Ts(e){return Zr(e)?"indeterminate":e?"checked":"unchecked"}function ZC(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function QC(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function JC(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=QC(e,Math.max(a,0));o.length===1&&(i=i.filter(u=>u!==n));const l=i.find(u=>u.toLowerCase().startsWith(o.toLowerCase()));return l!==n?l:void 0}function eE(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],l=t[i],u=s.x,f=s.y,c=l.x,p=l.y;f>r!=p>r&&n<(c-u)*(r-f)/(p-f)+u&&(o=!o)}return o}function tE(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return eE(n,t)}function Qn(e){return t=>t.pointerType==="mouse"?e(t):void 0}var nE=Mf,rE=Es,oE=kf,aE=Rf,sE=ks,iE=Of,cE=Eo,lE=_f,uE=Af,dE=jf,fE=Lf,mE=Ff,pE=Wf,hE=Yf,gE=zf,vE=Uf,Do="DropdownMenu",[bE,NM]=He(Do,[Cf]),Ue=Cf(),[yE,qf]=bE(Do),Vf=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:o,defaultOpen:a,onOpenChange:i,modal:s=!0}=e,l=Ue(t),u=d.useRef(null),[f,c]=rt({prop:o,defaultProp:a??!1,onChange:i,caller:Do});return m.jsx(yE,{scope:t,triggerId:Re(),triggerRef:u,contentId:Re(),open:f,onOpenChange:c,onOpenToggle:d.useCallback(()=>c(p=>!p),[c]),modal:s,children:m.jsx(nE,{...l,open:f,onOpenChange:c,dir:r,modal:s,children:n})})};Vf.displayName=Do;var Kf="DropdownMenuTrigger",Xf=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...o}=e,a=qf(Kf,n),i=Ue(n);return m.jsx(rE,{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:X(e.onPointerDown,s=>{!r&&s.button===0&&s.ctrlKey===!1&&(a.onOpenToggle(),a.open||s.preventDefault())}),onKeyDown:X(e.onKeyDown,s=>{r||(["Enter"," "].includes(s.key)&&a.onOpenToggle(),s.key==="ArrowDown"&&a.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(s.key)&&s.preventDefault())})})})});Xf.displayName=Kf;var wE="DropdownMenuPortal",Zf=e=>{const{__scopeDropdownMenu:t,...n}=e,r=Ue(t);return m.jsx(oE,{...r,...n})};Zf.displayName=wE;var Qf="DropdownMenuContent",Jf=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=qf(Qf,n),a=Ue(n),i=d.useRef(!1);return m.jsx(aE,{id:o.contentId,"aria-labelledby":o.triggerId,...a,...r,ref:t,onCloseAutoFocus:X(e.onCloseAutoFocus,s=>{var l;i.current||(l=o.triggerRef.current)==null||l.focus(),i.current=!1,s.preventDefault()}),onInteractOutside:X(e.onInteractOutside,s=>{const l=s.detail.originalEvent,u=l.button===0&&l.ctrlKey===!0,f=l.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)"}})});Jf.displayName=Qf;var xE="DropdownMenuGroup",em=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ue(n);return m.jsx(sE,{...o,...r,ref:t})});em.displayName=xE;var SE="DropdownMenuLabel",tm=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ue(n);return m.jsx(iE,{...o,...r,ref:t})});tm.displayName=SE;var CE="DropdownMenuItem",nm=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ue(n);return m.jsx(cE,{...o,...r,ref:t})});nm.displayName=CE;var EE="DropdownMenuCheckboxItem",rm=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ue(n);return m.jsx(lE,{...o,...r,ref:t})});rm.displayName=EE;var DE="DropdownMenuRadioGroup",om=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ue(n);return m.jsx(uE,{...o,...r,ref:t})});om.displayName=DE;var ME="DropdownMenuRadioItem",am=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ue(n);return m.jsx(dE,{...o,...r,ref:t})});am.displayName=ME;var NE="DropdownMenuItemIndicator",sm=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ue(n);return m.jsx(fE,{...o,...r,ref:t})});sm.displayName=NE;var kE="DropdownMenuSeparator",im=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ue(n);return m.jsx(mE,{...o,...r,ref:t})});im.displayName=kE;var RE="DropdownMenuArrow",OE=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ue(n);return m.jsx(pE,{...o,...r,ref:t})});OE.displayName=RE;var TE=e=>{const{__scopeDropdownMenu:t,children:n,open:r,onOpenChange:o,defaultOpen:a}=e,i=Ue(t),[s,l]=rt({prop:r,defaultProp:a??!1,onChange:o,caller:"DropdownMenuSub"});return m.jsx(hE,{...i,open:s,onOpenChange:l,children:n})},_E="DropdownMenuSubTrigger",cm=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ue(n);return m.jsx(gE,{...o,...r,ref:t})});cm.displayName=_E;var PE="DropdownMenuSubContent",lm=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ue(n);return m.jsx(vE,{...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)"}})});lm.displayName=PE;var AE=Vf,IE=Xf,jE=Zf,um=Jf,$E=em,dm=tm,fm=nm,mm=rm,LE=om,pm=am,hm=sm,gm=im,FE=TE,vm=cm,bm=lm;const WE=AE,BE=IE,YE=$E,zE=FE,HE=LE,ym=d.forwardRef(({className:e,inset:t,children:n,...r},o)=>m.jsxs(vm,{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"})]}));ym.displayName=vm.displayName;const wm=d.forwardRef(({className:e,...t},n)=>m.jsx(bm,{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}));wm.displayName=bm.displayName;const xm=d.forwardRef(({className:e,sideOffset:t=4,...n},r)=>m.jsx(jE,{children:m.jsx(um,{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})}));xm.displayName=um.displayName;const Sm=d.forwardRef(({className:e,inset:t,...n},r)=>m.jsx(fm,{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}));Sm.displayName=fm.displayName;const Cm=d.forwardRef(({className:e,children:t,checked:n,...r},o)=>m.jsxs(mm,{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(hm,{children:m.jsx(er,{className:"h-4 w-4"})})}),t]}));Cm.displayName=mm.displayName;const Em=d.forwardRef(({className:e,children:t,...n},r)=>m.jsxs(pm,{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(hm,{children:m.jsx(Cc,{className:"h-2 w-2 fill-current"})})}),t]}));Em.displayName=pm.displayName;const Dm=d.forwardRef(({className:e,inset:t,...n},r)=>m.jsx(dm,{ref:r,className:F("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...n}));Dm.displayName=dm.displayName;const Mm=d.forwardRef(({className:e,...t},n)=>m.jsx(gm,{ref:n,className:F("-mx-1 my-1 h-px bg-muted",e),...t}));Mm.displayName=gm.displayName;const Nm=({className:e,...t})=>m.jsx("span",{className:F("ml-auto text-xs tracking-widest opacity-60",e),...t});Nm.displayName="DropdownMenuShortcut";var _s="Radio",[UE,km]=He(_s),[GE,qE]=UE(_s),Rm=d.forwardRef((e,t)=>{const{__scopeRadio:n,name:r,checked:o=!1,required:a,disabled:i,value:s="on",onCheck:l,form:u,...f}=e,[c,p]=d.useState(null),h=fe(t,v=>p(v)),b=d.useRef(!1),g=c?u||!!c.closest("form"):!0;return m.jsxs(GE,{scope:n,checked:o,disabled:i,children:[m.jsx(J.button,{type:"button",role:"radio","aria-checked":o,"data-state":Pm(o),"data-disabled":i?"":void 0,disabled:i,value:s,...f,ref:h,onClick:X(e.onClick,v=>{o||l==null||l(),g&&(b.current=v.isPropagationStopped(),b.current||v.stopPropagation())})}),g&&m.jsx(_m,{control:c,bubbles:!b.current,name:r,value:s,checked:o,required:a,disabled:i,form:u,style:{transform:"translateX(-100%)"}})]})});Rm.displayName=_s;var Om="RadioIndicator",Tm=d.forwardRef((e,t)=>{const{__scopeRadio:n,forceMount:r,...o}=e,a=qE(Om,n);return m.jsx(ot,{present:r||a.checked,children:m.jsx(J.span,{"data-state":Pm(a.checked),"data-disabled":a.disabled?"":void 0,...o,ref:t})})});Tm.displayName=Om;var VE="RadioBubbleInput",_m=d.forwardRef(({__scopeRadio:e,control:t,checked:n,bubbles:r=!0,...o},a)=>{const i=d.useRef(null),s=fe(i,a),l=es(n),u=qa(t);return d.useEffect(()=>{const f=i.current;if(!f)return;const c=window.HTMLInputElement.prototype,h=Object.getOwnPropertyDescriptor(c,"checked").set;if(l!==n&&h){const b=new Event("click",{bubbles:r});h.call(f,n),f.dispatchEvent(b)}},[l,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}})});_m.displayName=VE;function Pm(e){return e?"checked":"unchecked"}var KE=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],Mo="RadioGroup",[XE,kM]=He(Mo,[Pn,km]),Am=Pn(),Im=km(),[ZE,QE]=XE(Mo),jm=d.forwardRef((e,t)=>{const{__scopeRadioGroup:n,name:r,defaultValue:o,value:a,required:i=!1,disabled:s=!1,orientation:l,dir:u,loop:f=!0,onValueChange:c,...p}=e,h=Am(n),b=ur(u),[g,v]=rt({prop:a,defaultProp:o??null,onChange:c,caller:Mo});return m.jsx(ZE,{scope:n,name:r,required:i,disabled:s,value:g,onValueChange:v,children:m.jsx(Ss,{asChild:!0,...h,orientation:l,dir:b,loop:f,children:m.jsx(J.div,{role:"radiogroup","aria-required":i,"aria-orientation":l,"data-disabled":s?"":void 0,dir:b,...p,ref:t})})})});jm.displayName=Mo;var $m="RadioGroupItem",Lm=d.forwardRef((e,t)=>{const{__scopeRadioGroup:n,disabled:r,...o}=e,a=QE($m,n),i=a.disabled||r,s=Am(n),l=Im(n),u=d.useRef(null),f=fe(t,u),c=a.value===o.value,p=d.useRef(!1);return d.useEffect(()=>{const h=g=>{KE.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(Cs,{asChild:!0,...s,focusable:!i,active:c,children:m.jsx(Rm,{disabled:i,required:a.required,checked:c,...l,...o,name:a.name,ref:f,onCheck:()=>a.onValueChange(o.value),onKeyDown:X(h=>{h.key==="Enter"&&h.preventDefault()}),onFocus:X(o.onFocus,()=>{var h;p.current&&((h=u.current)==null||h.click())})})})});Lm.displayName=$m;var JE="RadioGroupIndicator",Fm=d.forwardRef((e,t)=>{const{__scopeRadioGroup:n,...r}=e,o=Im(n);return m.jsx(Tm,{...o,...r,ref:t})});Fm.displayName=JE;var Wm=jm,Bm=Lm,eD=Fm;const Ym=d.forwardRef(({className:e,...t},n)=>m.jsx(Wm,{ref:n,className:F("grid gap-2",e),...t}));Ym.displayName=Wm.displayName;const zm=d.forwardRef(({className:e,...t},n)=>m.jsx(Bm,{ref:n,className:F(`
218
+ ){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 LS(){const e=navigator.userAgent;return typeof window<"u"&&(/Firefox/.test(e)&&/Mobile/.test(e)||/FxiOS/.test(e))}function FS(){return xs(/^Mac/)}function WS(){return xs(/^iPhone/)}function zi(){return/^((?!chrome|android).)*safari/i.test(navigator.userAgent)}function BS(){return xs(/^iPad/)||FS()&&navigator.maxTouchPoints>1}function Xd(){return WS()||BS()}function xs(e){return typeof window<"u"&&window.navigator!=null?e.test(window.navigator.platform):void 0}const YS=24,zS=typeof window<"u"?x.useLayoutEffect:x.useEffect;function Hi(...e){return(...t)=>{for(let n of e)typeof n=="function"&&n(...t)}}const ea=typeof document<"u"&&window.visualViewport;function Ui(e){let t=window.getComputedStyle(e);return/(auto|scroll)/.test(t.overflow+t.overflowX+t.overflowY)}function Zd(e){for(Ui(e)&&(e=e.parentElement);e&&!Ui(e);)e=e.parentElement;return e||document.scrollingElement||document.documentElement}const HS=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);let Or=0,ta;function US(e={}){let{isDisabled:t}=e;zS(()=>{if(!t)return Or++,Or===1&&Xd()&&(ta=GS()),()=>{Or--,Or===0&&(ta==null||ta())}},[t])}function GS(){let e,t=0,n=l=>{e=Zd(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(()=>{Gi(p)}):ea.addEventListener("resize",()=>Gi(p),{once:!0}))}))},i=()=>{window.scrollTo(0,0)},s=window.pageXOffset,c=window.pageYOffset,u=Hi(qS(document.documentElement,"paddingRight",`${window.innerWidth-document.documentElement.clientWidth}px`));window.scrollTo(0,0);let f=Hi(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 qS(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 Gi(e){let t=document.scrollingElement||document.documentElement;for(;e&&e!==t;){let n=Zd(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+YS;a>i&&(n.scrollTop+=o-r)}e=n.parentElement}}function ka(e){return e instanceof HTMLInputElement&&!HS.has(e.type)||e instanceof HTMLTextAreaElement||e instanceof HTMLElement&&e.isContentEditable}function VS(e,t){typeof e=="function"?e(t):e!=null&&(e.current=t)}function KS(...e){return t=>e.forEach(n=>VS(n,t))}function Qd(...e){return d.useCallback(KS(...e),e)}const Jd=new WeakMap;function $e(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&&Jd.set(e,r)}function XS(e,t){if(!e||!(e instanceof HTMLElement))return;let n=Jd.get(e);n&&(e.style[t]=n[t])}const _e=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(", ")[_e(t)?13:12]):(o=r.match(/^matrix\((.+)\)$/),o?parseFloat(o[1].split(", ")[_e(t)?5:4]):null)}function ZS(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 QS(...e){return(...t)=>{for(const n of e)typeof n=="function"&&n(...t)}}const De={DURATION:.5,EASE:[.32,.72,0,1]},ef=.4,JS=.25,eC=100,tf=8,Zt=16,Ra=26,ra="vaul-dragging";function nf(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 tC({defaultProp:e,onChange:t}){const n=x.useState(e),[r]=n,o=x.useRef(r),a=nf(t);return x.useEffect(()=>{o.current!==r&&(a(r),o.current=r)},[r,o,a]),n}function rf({prop:e,defaultProp:t,onChange:n=()=>{}}){const[r,o]=tC({defaultProp:t,onChange:n}),a=e!==void 0,i=a?e:r,s=nf(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 nC({activeSnapPointProp:e,setActiveSnapPointProp:t,snapPoints:n,drawerRef:r,overlayRef:o,fadeFromIndex:a,onSnapPointChange:i,direction:s="bottom",container:c,snapToSequentialPoint:u}){const[f,l]=rf({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,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 k;return(k=n==null?void 0:n.map(I=>{const j=typeof I=="string";let L=0;if(j&&(L=parseInt(I,10)),_e(s)){const B=j?L:p?I*S.height:0;return p?s==="bottom"?S.height-B:-S.height+B:B}const V=j?L:p?I*S.width:0;return p?s==="right"?S.width-V:-S.width+V:V}))!=null?k:[]},[n,p,c]),w=x.useMemo(()=>g!==null?y==null?void 0:y[g]:null,[y,g]),C=x.useCallback(S=>{var k;const I=(k=y==null?void 0:y.findIndex(j=>j===S))!=null?k:null;i(I),$e(r.current,{transition:`transform ${De.DURATION}s cubic-bezier(${De.EASE.join(",")})`,transform:_e(s)?`translate3d(0, ${S}px, 0)`:`translate3d(${S}px, 0, 0)`}),y&&I!==y.length-1&&a!==void 0&&I!==a&&I<a?$e(o.current,{transition:`opacity ${De.DURATION}s cubic-bezier(${De.EASE.join(",")})`,opacity:"0"}):$e(o.current,{transition:`opacity ${De.DURATION}s cubic-bezier(${De.EASE.join(",")})`,opacity:"1"}),l(n==null?void 0:n[Math.max(I,0)])},[r.current,n,y,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;y&&k!==-1&&typeof y[k]=="number"&&C(y[k])}},[f,e,n,y,C]);function D({draggedDistance:S,closeDrawer:k,velocity:I,dismissible:j}){if(a===void 0)return;const L=s==="bottom"||s==="right"?(w??0)-S:(w??0)+S,V=g===a-1,B=g===0,P=S>0;if(V&&$e(o.current,{transition:`opacity ${De.DURATION}s cubic-bezier(${De.EASE.join(",")})`}),!u&&I>2&&!P){j?k():C(y[0]);return}if(!u&&I>2&&P&&y&&n){C(y[n.length-1]);return}const O=y==null?void 0:y.reduce((A,N)=>typeof A!="number"||typeof N!="number"?A:Math.abs(N-L)<Math.abs(A-L)?N:A),M=_e(s)?window.innerHeight:window.innerWidth;if(I>ef&&Math.abs(S)<M*.4){const A=P?1:-1;if(A>0&&b&&n){C(y[n.length-1]);return}if(B&&A<0&&j&&k(),g===null)return;C(y[g+A]);return}C(O)}function E({draggedDistance:S}){if(w===null)return;const k=s==="bottom"||s==="right"?w-S:w+S;(s==="bottom"||s==="right")&&k<y[y.length-1]||(s==="top"||s==="left")&&k>y[y.length-1]||$e(r.current,{transform:_e(s)?`translate3d(0, ${k}px, 0)`:`translate3d(${k}px, 0, 0)`})}function R(S,k){if(!n||typeof g!="number"||!y||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 L=I?g+1:g-1,V=I?y[L]-y[L-1]:y[L+1]-y[L],B=S/Math.abs(V);return I?1-B:B}return{isLastSnapPoint:b,activeSnapPoint:f,shouldFade:v,getPercentageDragged:R,setActiveSnapPoint:l,activeSnapPointIndex:g,onRelease:D,onDrag:E,snapPointsOffset:y}}const rC=()=>()=>{};function oC(){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;QS(r&&!o?na(document.body,{background:"black"}):rC,na(c,{transformOrigin:_e(e)?"top":"left",transitionProperty:"transform, border-radius",transitionDuration:`${De.DURATION}s`,transitionTimingFunction:`cubic-bezier(${De.EASE.join(",")})`}));const u=na(c,{borderRadius:`${tf}px`,overflow:"hidden",..._e(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")},De.DURATION*1e3)}}},[t,n,i])}let Bn=null;function aC({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(zi()&&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(zi()&&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 sC({open:e,onOpenChange:t,children:n,onDrag:r,onRelease:o,snapPoints:a,shouldScaleBackground:i=!1,setBackgroundColorOnScale:s=!0,closeThreshold:c=JS,scrollLockTimeout:u=eC,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:C=!1,direction:D="bottom",defaultOpen:E=!1,disablePreventScroll:R=!0,snapToSequentialPoint:S=!1,preventScrollRestoration:k=!1,repositionInputs:I=!0,onAnimationEnd:j,container:L,autoFocus:V=!1}){var B,P;const[O=!1,M]=rf({defaultProp:E,prop:e,onChange:q=>{t==null||t(q),!q&&!w&&Ye(),setTimeout(()=>{j==null||j(q)},De.DURATION*1e3),q&&!v&&typeof window<"u"&&window.requestAnimationFrame(()=>{document.body.style.pointerEvents="auto"}),q||(document.body.style.pointerEvents="auto")}}),[A,N]=x.useState(!1),[_,Y]=x.useState(!1),[H,T]=x.useState(!1),$=x.useRef(null),z=x.useRef(null),U=x.useRef(null),G=x.useRef(null),W=x.useRef(null),Q=x.useRef(!1),K=x.useRef(null),Z=x.useRef(0),se=x.useRef(!1),ie=x.useRef(!E),be=x.useRef(0),ee=x.useRef(null),Ae=x.useRef(((B=ee.current)==null?void 0:B.getBoundingClientRect().height)||0),Ie=x.useRef(((P=ee.current)==null?void 0:P.getBoundingClientRect().width)||0),Ee=x.useRef(0),Ge=x.useCallback(q=>{a&&q===re.length-1&&(z.current=new Date)},[]),{activeSnapPoint:Ce,activeSnapPointIndex:Xe,setActiveSnapPoint:_t,onRelease:Oe,snapPointsOffset:re,onDrag:pe,shouldFade:Te,getPercentageDragged:Fe}=nC({snapPoints:a,activeSnapPointProp:h,setActiveSnapPointProp:b,drawerRef:ee,fadeFromIndex:p,overlayRef:$,onSnapPointChange:Ge,direction:D,container:L,snapToSequentialPoint:S});US({isDisabled:!O||_||!v||H||!A||!I||!R});const{restorePositionSetting:Ye}=aC({isOpen:O,modal:v,nested:w??!1,hasBeenOpened:A,preventScrollRestoration:k,noBodyStyles:C});function at(){return(window.innerWidth-Ra)/window.innerWidth}function qt(q){var ce,ae;!f&&!a||ee.current&&!ee.current.contains(q.target)||(Ae.current=((ce=ee.current)==null?void 0:ce.getBoundingClientRect().height)||0,Ie.current=((ae=ee.current)==null?void 0:ae.getBoundingClientRect().width)||0,Y(!0),U.current=new Date,Xd()&&window.addEventListener("touchend",()=>Q.current=!1,{once:!0}),q.target.setPointerCapture(q.pointerId),Z.current=_e(D)?q.pageY:q.pageX)}function st(q,ce){var ae;let me=q;const ge=(ae=window.getSelection())==null?void 0:ae.toString(),oe=ee.current?Tr(ee.current,D):null,de=new Date;if(me.tagName==="SELECT"||me.hasAttribute("data-vaul-no-drag")||me.closest("[data-vaul-no-drag]"))return!1;if(D==="right"||D==="left")return!0;if(z.current&&de.getTime()-z.current.getTime()<500)return!1;if(oe!==null&&(D==="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||ce)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 cn(q){if(ee.current&&_){const ce=D==="bottom"||D==="right"?1:-1,ae=(Z.current-(_e(D)?q.pageY:q.pageX))*ce,me=ae>0,ge=a&&!f&&!me;if(ge&&Xe===0)return;const oe=Math.abs(ae),de=document.querySelector("[data-vaul-drawer-wrapper]"),ve=D==="bottom"||D==="top"?Ae.current:Ie.current;let ue=oe/ve;const Ve=Fe(oe,me);if(Ve!==null&&(ue=Ve),ge&&ue>=1||!Q.current&&!st(q.target,me))return;if(ee.current.classList.add(ra),Q.current=!0,$e(ee.current,{transition:"none"}),$e($.current,{transition:"none"}),a&&pe({draggedDistance:ae}),me&&!a){const Se=ZS(ae),Ze=Math.min(Se*-1,0)*ce;$e(ee.current,{transform:_e(D)?`translate3d(0, ${Ze}px, 0)`:`translate3d(${Ze}px, 0, 0)`});return}const we=1-ue;if((Te||p&&Xe===p-1)&&(r==null||r(q,ue),$e($.current,{opacity:`${we}`,transition:"none"},!0)),de&&$.current&&i){const Se=Math.min(at()+ue*(1-at()),1),Ze=8-ue*8,We=Math.max(0,14-ue*14);$e(de,{borderRadius:`${Ze}px`,transform:_e(D)?`scale(${Se}) translate3d(0, ${We}px, 0)`:`scale(${Se}) translate3d(${We}px, 0, 0)`,transition:"none"},!0)}if(!a){const Se=oe*ce;$e(ee.current,{transform:_e(D)?`translate3d(0, ${Se}px, 0)`:`translate3d(${Se}px, 0, 0)`})}}}x.useEffect(()=>{window.requestAnimationFrame(()=>{ie.current=!0})},[]),x.useEffect(()=>{var q;function ce(){if(!ee.current||!I)return;const ae=document.activeElement;if(ka(ae)||se.current){var me;const ge=((me=window.visualViewport)==null?void 0:me.height)||0,oe=window.innerHeight;let de=oe-ge;const ve=ee.current.getBoundingClientRect().height||0,ue=ve>oe*.8;Ee.current||(Ee.current=ve);const Ve=ee.current.getBoundingClientRect().top;if(Math.abs(be.current-de)>60&&(se.current=!se.current),a&&a.length>0&&re&&Xe){const we=re[Xe]||0;de+=we}if(be.current=de,ve>ge||se.current){const we=ee.current.getBoundingClientRect().height;let Se=we;we>ge&&(Se=ge-(ue?Ve:Ra)),g?ee.current.style.height=`${we-Math.max(de,0)}px`:ee.current.style.height=`${Math.max(Se,ge-Ve)}px`}else LS()||(ee.current.style.height=`${Ee.current}px`);a&&a.length>0&&!se.current?ee.current.style.bottom="0px":ee.current.style.bottom=`${Math.max(de,0)}px`}}return(q=window.visualViewport)==null||q.addEventListener("resize",ce),()=>{var ae;return(ae=window.visualViewport)==null?void 0:ae.removeEventListener("resize",ce)}},[Xe,a,re]);function qe(q){An(),y==null||y(),q||M(!1),setTimeout(()=>{a&&_t(a[0])},De.DURATION*1e3)}function ln(){if(!ee.current)return;const q=document.querySelector("[data-vaul-drawer-wrapper]"),ce=Tr(ee.current,D);$e(ee.current,{transform:"translate3d(0, 0, 0)",transition:`transform ${De.DURATION}s cubic-bezier(${De.EASE.join(",")})`}),$e($.current,{transition:`opacity ${De.DURATION}s cubic-bezier(${De.EASE.join(",")})`,opacity:"1"}),i&&ce&&ce>0&&O&&$e(q,{borderRadius:`${tf}px`,overflow:"hidden",..._e(D)?{transform:`scale(${at()}) translate3d(0, calc(env(safe-area-inset-top) + 14px), 0)`,transformOrigin:"top"}:{transform:`scale(${at()}) translate3d(calc(env(safe-area-inset-top) + 14px), 0, 0)`,transformOrigin:"left"},transitionProperty:"transform, border-radius",transitionDuration:`${De.DURATION}s`,transitionTimingFunction:`cubic-bezier(${De.EASE.join(",")})`},!0)}function An(){!_||!ee.current||(ee.current.classList.remove(ra),Q.current=!1,Y(!1),G.current=new Date)}function un(q){if(!_||!ee.current)return;ee.current.classList.remove(ra),Q.current=!1,Y(!1),G.current=new Date;const ce=Tr(ee.current,D);if(!q||!st(q.target,!1)||!ce||Number.isNaN(ce)||U.current===null)return;const ae=G.current.getTime()-U.current.getTime(),me=Z.current-(_e(D)?q.pageY:q.pageX),ge=Math.abs(me)/ae;if(ge>.05&&(T(!0),setTimeout(()=>{T(!1)},200)),a){Oe({draggedDistance:me*(D==="bottom"||D==="right"?1:-1),closeDrawer:qe,velocity:ge,dismissible:f}),o==null||o(q,!0);return}if(D==="bottom"||D==="right"?me>0:me<0){ln(),o==null||o(q,!0);return}if(ge>ef){qe(),o==null||o(q,!1);return}var oe;const de=Math.min((oe=ee.current.getBoundingClientRect().height)!=null?oe:0,window.innerHeight);var ve;const ue=Math.min((ve=ee.current.getBoundingClientRect().width)!=null?ve:0,window.innerWidth),Ve=D==="left"||D==="right";if(Math.abs(ce)>=(Ve?ue:de)*c){qe(),o==null||o(q,!1);return}o==null||o(q,!0),ln()}x.useEffect(()=>(O&&($e(document.documentElement,{scrollBehavior:"auto"}),z.current=new Date),()=>{XS(document.documentElement,"scrollBehavior")}),[O]);function Vt(q){const ce=q?(window.innerWidth-Zt)/window.innerWidth:1,ae=q?-Zt:0;K.current&&window.clearTimeout(K.current),$e(ee.current,{transition:`transform ${De.DURATION}s cubic-bezier(${De.EASE.join(",")})`,transform:_e(D)?`scale(${ce}) translate3d(0, ${ae}px, 0)`:`scale(${ce}) translate3d(${ae}px, 0, 0)`}),!q&&ee.current&&(K.current=setTimeout(()=>{const me=Tr(ee.current,D);$e(ee.current,{transition:"none",transform:_e(D)?`translate3d(0, ${me}px, 0)`:`translate3d(${me}px, 0, 0)`})},500))}function In(q,ce){if(ce<0)return;const ae=(window.innerWidth-Zt)/window.innerWidth,me=ae+ce*(1-ae),ge=-Zt+ce*Zt;$e(ee.current,{transform:_e(D)?`scale(${me}) translate3d(0, ${ge}px, 0)`:`scale(${me}) translate3d(${ge}px, 0, 0)`,transition:"none"})}function Pt(q,ce){const ae=_e(D)?window.innerHeight:window.innerWidth,me=ce?(ae-Zt)/ae:1,ge=ce?-Zt:0;ce&&$e(ee.current,{transition:`transform ${De.DURATION}s cubic-bezier(${De.EASE.join(",")})`,transform:_e(D)?`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:E,onOpenChange:q=>{!f&&!q||(q?N(!0):qe(!0),M(q))},open:O},x.createElement(Kd.Provider,{value:{activeSnapPoint:Ce,snapPoints:a,setActiveSnapPoint:_t,drawerRef:ee,overlayRef:$,onOpenChange:t,onPress:qt,onRelease:un,onDrag:cn,dismissible:f,shouldAnimate:ie,handleOnly:l,isOpen:O,isDragging:_,shouldFade:Te,closeDrawer:qe,onNestedDrag:In,onNestedOpenChange:Vt,onNestedRelease:Pt,keyboardIsOpen:se,modal:v,snapPointsOffset:re,activeSnapPointIndex:Xe,direction:D,shouldScaleBackground:i,setBackgroundColorOnScale:s,noBodyStyles:C,container:L,autoFocus:V}},n))}const of=x.forwardRef(function({...e},t){const{overlayRef:n,snapPoints:r,onRelease:o,shouldFade:a,isOpen:i,modal:s,shouldAnimate:c}=hr(),u=Qd(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})});of.displayName="Drawer.Overlay";const af=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:C}=hr(),[D,E]=x.useState(!1),R=Qd(o,a),S=x.useRef(null),k=x.useRef(null),I=x.useRef(!1),j=g&&g.length>0;oC();const L=(B,P,O=0)=>{if(I.current)return!0;const M=Math.abs(B.y),A=Math.abs(B.x),N=A>M,_=["bottom","right"].includes(P)?1:-1;if(P==="left"||P==="right"){if(!(B.x*_<0)&&A>=0&&A<=O)return N}else if(!(B.y*_<0)&&M>=0&&M<=O)return!N;return I.current=!0,!0};x.useEffect(()=>{j&&window.requestAnimationFrame(()=>{E(!0)})},[]);function V(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":D?"true":"false","data-vaul-snap-points":h&&j?"true":"false","data-vaul-custom-container":v?"true":"false","data-vaul-animate":w!=null&&w.current?"true":"false",...r,ref:R,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),C||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,y||(r.onPointerMove==null||r.onPointerMove.call(r,B),!S.current))return;const P=B.pageY-S.current.y,O=B.pageX-S.current.x,M=B.pointerType==="touch"?10:2;L({x:O,y:P},b,M)?c(B):(Math.abs(O)>M||Math.abs(P)>M)&&(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),V(k.current)},onContextMenu:B=>{r.onContextMenu==null||r.onContextMenu.call(r,B),k.current&&V(k.current)}})});af.displayName="Drawer.Content";const iC=250,cC=120,lC=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){C();return}window.setTimeout(()=>{y()},cC)}function y(){if(a||e||g.current){C();return}if(C(),!i||i.length===0){u||o();return}if(s===i[i.length-1]&&u){o();return}const E=i.findIndex(S=>S===s);if(E===-1)return;const R=i[E+1];c(R)}function w(){b.current=window.setTimeout(()=>{g.current=!0},iC)}function C(){b.current&&window.clearTimeout(b.current),g.current=!1}return x.createElement("div",{onClick:v,onPointerCancel:C,onPointerDown:D=>{f&&p(D),w()},onPointerMove:D=>{f&&h(D)},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))});lC.displayName="Drawer.Handle";function uC(e){const t=hr(),{container:n=t.container,...r}=e;return x.createElement(us,{container:n,...r})}const mt={Root:sC,Content:af,Overlay:of,Trigger:ed,Portal:uC,Close:ms,Title:ds,Description:fs},sf=({shouldScaleBackground:e=!0,...t})=>m.jsx(mt.Root,{shouldScaleBackground:e,...t});sf.displayName="Drawer";const dC=mt.Trigger,fC=mt.Portal,mC=mt.Close,cf=d.forwardRef(({className:e,...t},n)=>m.jsx(mt.Overlay,{ref:n,className:F("fixed inset-0 z-50 bg-black/80",e),...t}));cf.displayName=mt.Overlay.displayName;const lf=d.forwardRef(({className:e,children:t,...n},r)=>m.jsxs(fC,{children:[m.jsx(cf,{}),m.jsxs(mt.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]})]}));lf.displayName="DrawerContent";const uf=({className:e,...t})=>m.jsx("div",{className:F("grid gap-1.5 p-4 text-center sm:text-left",e),...t});uf.displayName="DrawerHeader";const df=({className:e,...t})=>m.jsx("div",{className:F("mt-auto flex flex-col gap-2 p-4",e),...t});df.displayName="DrawerFooter";const ff=d.forwardRef(({className:e,...t},n)=>m.jsx(mt.Title,{ref:n,className:F("text-lg font-semibold leading-none tracking-tight",e),...t}));ff.displayName=mt.Title.displayName;const mf=d.forwardRef(({className:e,...t},n)=>m.jsx(mt.Description,{ref:n,className:F("text-sm text-muted-foreground",e),...t}));mf.displayName=mt.Description.displayName;var pC="DismissableLayer",Oa="dismissableLayer.update",hC="dismissableLayer.pointerDownOutside",gC="dismissableLayer.focusOutside",qi,pf=d.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),hf=d.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:i,onDismiss:s,...c}=e,u=d.useContext(pf),[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,C=u.layersWithOutsidePointerEventsDisabled.size>0,D=w>=y,E=yC(S=>{const k=S.target,I=[...u.branches].some(j=>j.contains(k));!D||I||(o==null||o(S),i==null||i(S),S.defaultPrevented||s==null||s())},p),R=wC(S=>{const k=S.target;[...u.branches].some(j=>j.contains(k))||(a==null||a(S),i==null||i(S),S.defaultPrevented||s==null||s())},p);return nr(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&&(qi=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(f)),u.layers.add(f),Vi(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=qi)}},[f,p,n,u]),d.useEffect(()=>()=>{f&&(u.layers.delete(f),u.layersWithOutsidePointerEventsDisabled.delete(f),Vi())},[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:C?D?"auto":"none":void 0,...e.style},onFocusCapture:X(e.onFocusCapture,R.onFocusCapture),onBlurCapture:X(e.onBlurCapture,R.onBlurCapture),onPointerDownCapture:X(e.onPointerDownCapture,E.onPointerDownCapture)})});hf.displayName=pC;var vC="DismissableLayerBranch",bC=d.forwardRef((e,t)=>{const n=d.useContext(pf),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})});bC.displayName=vC;function yC(e,t=globalThis==null?void 0:globalThis.document){const n=Pe(e),r=d.useRef(!1),o=d.useRef(()=>{});return d.useEffect(()=>{const a=s=>{if(s.target&&!r.current){let c=function(){gf(hC,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 wC(e,t=globalThis==null?void 0:globalThis.document){const n=Pe(e),r=d.useRef(!1);return d.useEffect(()=>{const o=a=>{a.target&&!r.current&&gf(gC,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 Vi(){const e=new CustomEvent(Oa);document.dispatchEvent(e)}function gf(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?Nn(o,a):o.dispatchEvent(a)}var oa="rovingFocusGroup.onEntryFocus",xC={bubbles:!1,cancelable:!0},gr="RovingFocusGroup",[Ta,vf,SC]=Ja(gr),[CC,Pn]=He(gr,[SC]),[EC,DC]=CC(gr),bf=d.forwardRef((e,t)=>m.jsx(Ta.Provider,{scope:e.__scopeRovingFocusGroup,children:m.jsx(Ta.Slot,{scope:e.__scopeRovingFocusGroup,children:m.jsx(MC,{...e,ref:t})})}));bf.displayName=gr;var MC=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]=rt({prop:i,defaultProp:s??null,onChange:c,caller:gr}),[y,w]=d.useState(!1),C=Pe(u),D=vf(n),E=d.useRef(!1),[R,S]=d.useState(0);return d.useEffect(()=>{const k=p.current;if(k)return k.addEventListener(oa,C),()=>k.removeEventListener(oa,C)},[C]),m.jsx(EC,{scope:n,orientation:r,dir:b,loop:o,currentTabStopId:g,onItemFocus:d.useCallback(k=>v(k),[v]),onItemShiftTab:d.useCallback(()=>w(!0),[]),onFocusableItemAdd:d.useCallback(()=>S(k=>k+1),[]),onFocusableItemRemove:d.useCallback(()=>S(k=>k-1),[]),children:m.jsx(J.div,{tabIndex:y||R===0?-1:0,"data-orientation":r,...l,ref:h,style:{outline:"none",...e.style},onMouseDown:X(e.onMouseDown,()=>{E.current=!0}),onFocus:X(e.onFocus,k=>{const I=!E.current;if(k.target===k.currentTarget&&I&&!y){const j=new CustomEvent(oa,xC);if(k.currentTarget.dispatchEvent(j),!j.defaultPrevented){const L=D().filter(M=>M.focusable),V=L.find(M=>M.active),B=L.find(M=>M.id===g),O=[V,B,...L].filter(Boolean).map(M=>M.ref.current);xf(O,f)}}E.current=!1}),onBlur:X(e.onBlur,()=>w(!1))})})}),yf="RovingFocusGroupItem",wf=d.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:a,children:i,...s}=e,c=Re(),u=a||c,f=DC(yf,n),l=f.currentTabStopId===u,p=vf(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:X(e.onMouseDown,v=>{r?f.onItemFocus(u):v.preventDefault()}),onFocus:X(e.onFocus,()=>f.onItemFocus(u)),onKeyDown:X(e.onKeyDown,v=>{if(v.key==="Tab"&&v.shiftKey){f.onItemShiftTab();return}if(v.target!==v.currentTarget)return;const y=RC(v,f.orientation,f.dir);if(y!==void 0){if(v.metaKey||v.ctrlKey||v.altKey||v.shiftKey)return;v.preventDefault();let C=p().filter(D=>D.focusable).map(D=>D.ref.current);if(y==="last")C.reverse();else if(y==="prev"||y==="next"){y==="prev"&&C.reverse();const D=C.indexOf(v.currentTarget);C=f.loop?OC(C,D+1):C.slice(D+1)}setTimeout(()=>xf(C))}}),children:typeof i=="function"?i({isCurrentTabStop:l,hasTabStop:g!=null}):i})})});wf.displayName=yf;var NC={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function kC(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function RC(e,t,n){const r=kC(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return NC[r]}function xf(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function OC(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var Ss=bf,Cs=wf,_a=["Enter"," "],TC=["ArrowDown","PageUp","Home"],Sf=["ArrowUp","PageDown","End"],_C=[...TC,...Sf],PC={ltr:[..._a,"ArrowRight"],rtl:[..._a,"ArrowLeft"]},AC={ltr:["ArrowLeft"],rtl:["ArrowRight"]},vr="Menu",[Zn,IC,jC]=Ja(vr),[sn,Cf]=He(vr,[jC,Yt,Pn]),br=Yt(),Ef=Pn(),[Df,Gt]=sn(vr),[$C,yr]=sn(vr),Mf=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=Pe(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(Df,{scope:t,open:n,onOpenChange:l,content:c,onContentChange:u,children:m.jsx($C,{scope:t,onClose:d.useCallback(()=>l(!1),[l]),isUsingKeyboardRef:f,dir:p,modal:i,children:r})})})};Mf.displayName=vr;var LC="MenuAnchor",Es=d.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=br(n);return m.jsx(sr,{...o,...r,ref:t})});Es.displayName=LC;var Ds="MenuPortal",[FC,Nf]=sn(Ds,{forceMount:void 0}),kf=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:o}=e,a=Gt(Ds,t);return m.jsx(FC,{scope:t,forceMount:n,children:m.jsx(ot,{present:n||a.open,children:m.jsx(ir,{asChild:!0,container:o,children:r})})})};kf.displayName=Ds;var nt="MenuContent",[WC,Ms]=sn(nt),Rf=d.forwardRef((e,t)=>{const n=Nf(nt,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,a=Gt(nt,e.__scopeMenu),i=yr(nt,e.__scopeMenu);return m.jsx(Zn.Provider,{scope:e.__scopeMenu,children:m.jsx(ot,{present:r||a.open,children:m.jsx(Zn.Slot,{scope:e.__scopeMenu,children:i.modal?m.jsx(BC,{...o,ref:t}):m.jsx(YC,{...o,ref:t})})})})}),BC=d.forwardRef((e,t)=>{const n=Gt(nt,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:X(e.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),YC=d.forwardRef((e,t)=>{const n=Gt(nt,e.__scopeMenu);return m.jsx(Ns,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),zC=Lt("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=Gt(nt,n),y=yr(nt,n),w=br(n),C=Ef(n),D=IC(n),[E,R]=d.useState(null),S=d.useRef(null),k=fe(t,S,v.onContentChange),I=d.useRef(0),j=d.useRef(""),L=d.useRef(0),V=d.useRef(null),B=d.useRef("right"),P=d.useRef(0),O=b?cr:d.Fragment,M=b?{as:zC,allowPinchZoom:!0}:void 0,A=_=>{var W,Q;const Y=j.current+_,H=D().filter(K=>!K.disabled),T=document.activeElement,$=(W=H.find(K=>K.ref.current===T))==null?void 0:W.textValue,z=H.map(K=>K.textValue),U=tE(z,Y,$),G=(Q=H.find(K=>K.textValue===U))==null?void 0:Q.ref.current;(function K(Z){j.current=Z,window.clearTimeout(I.current),Z!==""&&(I.current=window.setTimeout(()=>K(""),1e3))})(Y),G&&setTimeout(()=>G.focus())};d.useEffect(()=>()=>window.clearTimeout(I.current),[]),Wa();const N=d.useCallback(_=>{var H,T;return B.current===((H=V.current)==null?void 0:H.side)&&rE(_,(T=V.current)==null?void 0:T.area)},[]);return m.jsx(WC,{scope:n,searchRef:j,onItemEnter:d.useCallback(_=>{N(_)&&_.preventDefault()},[N]),onItemLeave:d.useCallback(_=>{var Y;N(_)||((Y=S.current)==null||Y.focus(),R(null))},[N]),onTriggerLeave:d.useCallback(_=>{N(_)&&_.preventDefault()},[N]),pointerGraceTimerRef:L,onPointerGraceIntentChange:d.useCallback(_=>{V.current=_},[]),children:m.jsx(O,{...M,children:m.jsx(rr,{asChild:!0,trapped:o,onMountAutoFocus:X(a,_=>{var Y;_.preventDefault(),(Y=S.current)==null||Y.focus({preventScroll:!0})}),onUnmountAutoFocus:i,children:m.jsx(hf,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:u,onPointerDownOutside:f,onFocusOutside:l,onInteractOutside:p,onDismiss:h,children:m.jsx(Ss,{asChild:!0,...C,dir:y.dir,orientation:"vertical",loop:r,currentTabStopId:E,onCurrentTabStopIdChange:R,onEntryFocus:X(c,_=>{y.isUsingKeyboardRef.current||_.preventDefault()}),preventScrollOnEntryFocus:!0,children:m.jsx(so,{role:"menu","aria-orientation":"vertical","data-state":Gf(v.open),"data-radix-menu-content":"",dir:y.dir,...w,...g,ref:k,style:{outline:"none",...g.style},onKeyDown:X(g.onKeyDown,_=>{const H=_.target.closest("[data-radix-menu-content]")===_.currentTarget,T=_.ctrlKey||_.altKey||_.metaKey,$=_.key.length===1;H&&(_.key==="Tab"&&_.preventDefault(),!T&&$&&A(_.key));const z=S.current;if(_.target!==z||!_C.includes(_.key))return;_.preventDefault();const G=D().filter(W=>!W.disabled).map(W=>W.ref.current);Sf.includes(_.key)&&G.reverse(),JC(G)}),onBlur:X(e.onBlur,_=>{_.currentTarget.contains(_.target)||(window.clearTimeout(I.current),j.current="")}),onPointerMove:X(e.onPointerMove,Qn(_=>{const Y=_.target,H=P.current!==_.clientX;if(_.currentTarget.contains(Y)&&H){const T=_.clientX>P.current?"right":"left";B.current=T,P.current=_.clientX}}))})})})})})})});Rf.displayName=nt;var HC="MenuGroup",ks=d.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return m.jsx(J.div,{role:"group",...r,ref:t})});ks.displayName=HC;var UC="MenuLabel",Of=d.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return m.jsx(J.div,{...r,ref:t})});Of.displayName=UC;var Xr="MenuItem",Ki="menu.itemSelect",Eo=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(Ki,{bubbles:!0,cancelable:!0});l.addEventListener(Ki,h=>r==null?void 0:r(h),{once:!0}),Nn(l,p),p.defaultPrevented?u.current=!1:i.onClose()}};return m.jsx(Tf,{...o,ref:c,disabled:n,onClick:X(e.onClick,f),onPointerDown:l=>{var p;(p=e.onPointerDown)==null||p.call(e,l),u.current=!0},onPointerUp:X(e.onPointerUp,l=>{var p;u.current||(p=l.currentTarget)==null||p.click()}),onKeyDown:X(e.onKeyDown,l=>{const p=s.searchRef.current!=="";n||p&&l.key===" "||_a.includes(l.key)&&(l.currentTarget.click(),l.preventDefault())})})});Eo.displayName=Xr;var Tf=d.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:o,...a}=e,i=Ms(Xr,n),s=Ef(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(Cs,{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:X(e.onPointerMove,Qn(b=>{r?i.onItemLeave(b):(i.onItemEnter(b),b.defaultPrevented||b.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:X(e.onPointerLeave,Qn(b=>i.onItemLeave(b))),onFocus:X(e.onFocus,()=>l(!0)),onBlur:X(e.onBlur,()=>l(!1))})})})}),GC="MenuCheckboxItem",_f=d.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...o}=e;return m.jsx($f,{scope:e.__scopeMenu,checked:n,children:m.jsx(Eo,{role:"menuitemcheckbox","aria-checked":Zr(n)?"mixed":n,...o,ref:t,"data-state":Ts(n),onSelect:X(o.onSelect,()=>r==null?void 0:r(Zr(n)?!0:!n),{checkForDefaultPrevented:!1})})})});_f.displayName=GC;var Pf="MenuRadioGroup",[qC,VC]=sn(Pf,{value:void 0,onValueChange:()=>{}}),Af=d.forwardRef((e,t)=>{const{value:n,onValueChange:r,...o}=e,a=Pe(r);return m.jsx(qC,{scope:e.__scopeMenu,value:n,onValueChange:a,children:m.jsx(ks,{...o,ref:t})})});Af.displayName=Pf;var If="MenuRadioItem",jf=d.forwardRef((e,t)=>{const{value:n,...r}=e,o=VC(If,e.__scopeMenu),a=n===o.value;return m.jsx($f,{scope:e.__scopeMenu,checked:a,children:m.jsx(Eo,{role:"menuitemradio","aria-checked":a,...r,ref:t,"data-state":Ts(a),onSelect:X(r.onSelect,()=>{var i;return(i=o.onValueChange)==null?void 0:i.call(o,n)},{checkForDefaultPrevented:!1})})})});jf.displayName=If;var Rs="MenuItemIndicator",[$f,KC]=sn(Rs,{checked:!1}),Lf=d.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...o}=e,a=KC(Rs,n);return m.jsx(ot,{present:r||Zr(a.checked)||a.checked===!0,children:m.jsx(J.span,{...o,ref:t,"data-state":Ts(a.checked)})})});Lf.displayName=Rs;var XC="MenuSeparator",Ff=d.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return m.jsx(J.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});Ff.displayName=XC;var ZC="MenuArrow",Wf=d.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=br(n);return m.jsx(io,{...o,...r,ref:t})});Wf.displayName=ZC;var Os="MenuSub",[QC,Bf]=sn(Os),Yf=e=>{const{__scopeMenu:t,children:n,open:r=!1,onOpenChange:o}=e,a=Gt(Os,t),i=br(t),[s,c]=d.useState(null),[u,f]=d.useState(null),l=Pe(o);return d.useEffect(()=>(a.open===!1&&l(!1),()=>l(!1)),[a.open,l]),m.jsx(ar,{...i,children:m.jsx(Df,{scope:t,open:r,onOpenChange:l,content:u,onContentChange:f,children:m.jsx(QC,{scope:t,contentId:Re(),triggerId:Re(),trigger:s,onTriggerChange:c,children:n})})})};Yf.displayName=Os;var Hn="MenuSubTrigger",zf=d.forwardRef((e,t)=>{const n=Gt(Hn,e.__scopeMenu),r=yr(Hn,e.__scopeMenu),o=Bf(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(Es,{asChild:!0,...u,children:m.jsx(Tf,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":o.contentId,"data-state":Gf(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:X(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:X(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"],C=p[v?"right":"left"];a.onPointerGraceIntentChange({area:[{x:l.clientX+y,y:l.clientY},{x:w,y:p.top},{x:C,y:p.top},{x:C,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:X(e.onKeyDown,l=>{var h;const p=a.searchRef.current!=="";e.disabled||p&&l.key===" "||PC[r.dir].includes(l.key)&&(n.onOpenChange(!0),(h=n.content)==null||h.focus(),l.preventDefault())})})})});zf.displayName=Hn;var Hf="MenuSubContent",Uf=d.forwardRef((e,t)=>{const n=Nf(nt,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,a=Gt(nt,e.__scopeMenu),i=yr(nt,e.__scopeMenu),s=Bf(Hf,e.__scopeMenu),c=d.useRef(null),u=fe(t,c);return m.jsx(Zn.Provider,{scope:e.__scopeMenu,children:m.jsx(ot,{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:X(e.onFocusOutside,f=>{f.target!==s.trigger&&a.onOpenChange(!1)}),onEscapeKeyDown:X(e.onEscapeKeyDown,f=>{i.onClose(),f.preventDefault()}),onKeyDown:X(e.onKeyDown,f=>{var h;const l=f.currentTarget.contains(f.target),p=AC[i.dir].includes(f.key);l&&p&&(a.onOpenChange(!1),(h=s.trigger)==null||h.focus(),f.preventDefault())})})})})})});Uf.displayName=Hf;function Gf(e){return e?"open":"closed"}function Zr(e){return e==="indeterminate"}function Ts(e){return Zr(e)?"indeterminate":e?"checked":"unchecked"}function JC(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function eE(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function tE(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=eE(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 nE(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 rE(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return nE(n,t)}function Qn(e){return t=>t.pointerType==="mouse"?e(t):void 0}var oE=Mf,aE=Es,sE=kf,iE=Rf,cE=ks,lE=Of,uE=Eo,dE=_f,fE=Af,mE=jf,pE=Lf,hE=Ff,gE=Wf,vE=Yf,bE=zf,yE=Uf,Do="DropdownMenu",[wE,NM]=He(Do,[Cf]),Ue=Cf(),[xE,qf]=wE(Do),Vf=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:o,defaultOpen:a,onOpenChange:i,modal:s=!0}=e,c=Ue(t),u=d.useRef(null),[f,l]=rt({prop:o,defaultProp:a??!1,onChange:i,caller:Do});return m.jsx(xE,{scope:t,triggerId:Re(),triggerRef:u,contentId:Re(),open:f,onOpenChange:l,onOpenToggle:d.useCallback(()=>l(p=>!p),[l]),modal:s,children:m.jsx(oE,{...c,open:f,onOpenChange:l,dir:r,modal:s,children:n})})};Vf.displayName=Do;var Kf="DropdownMenuTrigger",Xf=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...o}=e,a=qf(Kf,n),i=Ue(n);return m.jsx(aE,{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:X(e.onPointerDown,s=>{!r&&s.button===0&&s.ctrlKey===!1&&(a.onOpenToggle(),a.open||s.preventDefault())}),onKeyDown:X(e.onKeyDown,s=>{r||(["Enter"," "].includes(s.key)&&a.onOpenToggle(),s.key==="ArrowDown"&&a.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(s.key)&&s.preventDefault())})})})});Xf.displayName=Kf;var SE="DropdownMenuPortal",Zf=e=>{const{__scopeDropdownMenu:t,...n}=e,r=Ue(t);return m.jsx(sE,{...r,...n})};Zf.displayName=SE;var Qf="DropdownMenuContent",Jf=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=qf(Qf,n),a=Ue(n),i=d.useRef(!1);return m.jsx(iE,{id:o.contentId,"aria-labelledby":o.triggerId,...a,...r,ref:t,onCloseAutoFocus:X(e.onCloseAutoFocus,s=>{var c;i.current||(c=o.triggerRef.current)==null||c.focus(),i.current=!1,s.preventDefault()}),onInteractOutside:X(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)"}})});Jf.displayName=Qf;var CE="DropdownMenuGroup",em=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ue(n);return m.jsx(cE,{...o,...r,ref:t})});em.displayName=CE;var EE="DropdownMenuLabel",tm=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ue(n);return m.jsx(lE,{...o,...r,ref:t})});tm.displayName=EE;var DE="DropdownMenuItem",nm=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ue(n);return m.jsx(uE,{...o,...r,ref:t})});nm.displayName=DE;var ME="DropdownMenuCheckboxItem",rm=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ue(n);return m.jsx(dE,{...o,...r,ref:t})});rm.displayName=ME;var NE="DropdownMenuRadioGroup",om=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ue(n);return m.jsx(fE,{...o,...r,ref:t})});om.displayName=NE;var kE="DropdownMenuRadioItem",am=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ue(n);return m.jsx(mE,{...o,...r,ref:t})});am.displayName=kE;var RE="DropdownMenuItemIndicator",sm=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ue(n);return m.jsx(pE,{...o,...r,ref:t})});sm.displayName=RE;var OE="DropdownMenuSeparator",im=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ue(n);return m.jsx(hE,{...o,...r,ref:t})});im.displayName=OE;var TE="DropdownMenuArrow",_E=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ue(n);return m.jsx(gE,{...o,...r,ref:t})});_E.displayName=TE;var PE=e=>{const{__scopeDropdownMenu:t,children:n,open:r,onOpenChange:o,defaultOpen:a}=e,i=Ue(t),[s,c]=rt({prop:r,defaultProp:a??!1,onChange:o,caller:"DropdownMenuSub"});return m.jsx(vE,{...i,open:s,onOpenChange:c,children:n})},AE="DropdownMenuSubTrigger",cm=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ue(n);return m.jsx(bE,{...o,...r,ref:t})});cm.displayName=AE;var IE="DropdownMenuSubContent",lm=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ue(n);return m.jsx(yE,{...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)"}})});lm.displayName=IE;var jE=Vf,um=Xf,$E=Zf,dm=Jf,LE=em,fm=tm,mm=nm,pm=rm,FE=om,hm=am,gm=sm,vm=im,WE=PE,bm=cm,ym=lm;const BE=jE,wm=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(um,{ref:o,onClick:a,onMouseDown:i,onPointerDown:s,...r})});wm.displayName=um.displayName;const YE=LE,zE=WE,HE=FE,xm=d.forwardRef(({className:e,inset:t,children:n,...r},o)=>m.jsxs(bm,{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"})]}));xm.displayName=bm.displayName;const Sm=d.forwardRef(({className:e,...t},n)=>m.jsx(ym,{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}));Sm.displayName=ym.displayName;const Cm=d.forwardRef(({className:e,sideOffset:t=4,...n},r)=>m.jsx($E,{children:m.jsx(dm,{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})}));Cm.displayName=dm.displayName;const Em=d.forwardRef(({className:e,inset:t,...n},r)=>m.jsx(mm,{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}));Em.displayName=mm.displayName;const Dm=d.forwardRef(({className:e,children:t,checked:n,...r},o)=>m.jsxs(pm,{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(gm,{children:m.jsx(er,{className:"h-4 w-4"})})}),t]}));Dm.displayName=pm.displayName;const Mm=d.forwardRef(({className:e,children:t,...n},r)=>m.jsxs(hm,{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(gm,{children:m.jsx(Cc,{className:"h-2 w-2 fill-current"})})}),t]}));Mm.displayName=hm.displayName;const Nm=d.forwardRef(({className:e,inset:t,...n},r)=>m.jsx(fm,{ref:r,className:F("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...n}));Nm.displayName=fm.displayName;const km=d.forwardRef(({className:e,...t},n)=>m.jsx(vm,{ref:n,className:F("-mx-1 my-1 h-px bg-muted",e),...t}));km.displayName=vm.displayName;const Rm=({className:e,...t})=>m.jsx("span",{className:F("ml-auto text-xs tracking-widest opacity-60",e),...t});Rm.displayName="DropdownMenuShortcut";var _s="Radio",[UE,Om]=He(_s),[GE,qE]=UE(_s),Tm=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(GE,{scope:n,checked:o,disabled:i,children:[m.jsx(J.button,{type:"button",role:"radio","aria-checked":o,"data-state":Im(o),"data-disabled":i?"":void 0,disabled:i,value:s,...f,ref:h,onClick:X(e.onClick,v=>{o||c==null||c(),g&&(b.current=v.isPropagationStopped(),b.current||v.stopPropagation())})}),g&&m.jsx(Am,{control:l,bubbles:!b.current,name:r,value:s,checked:o,required:a,disabled:i,form:u,style:{transform:"translateX(-100%)"}})]})});Tm.displayName=_s;var _m="RadioIndicator",Pm=d.forwardRef((e,t)=>{const{__scopeRadio:n,forceMount:r,...o}=e,a=qE(_m,n);return m.jsx(ot,{present:r||a.checked,children:m.jsx(J.span,{"data-state":Im(a.checked),"data-disabled":a.disabled?"":void 0,...o,ref:t})})});Pm.displayName=_m;var VE="RadioBubbleInput",Am=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}})});Am.displayName=VE;function Im(e){return e?"checked":"unchecked"}var KE=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],Mo="RadioGroup",[XE,kM]=He(Mo,[Pn,Om]),jm=Pn(),$m=Om(),[ZE,QE]=XE(Mo),Lm=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=jm(n),b=ur(u),[g,v]=rt({prop:a,defaultProp:o??null,onChange:l,caller:Mo});return m.jsx(ZE,{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})})})});Lm.displayName=Mo;var Fm="RadioGroupItem",Wm=d.forwardRef((e,t)=>{const{__scopeRadioGroup:n,disabled:r,...o}=e,a=QE(Fm,n),i=a.disabled||r,s=jm(n),c=$m(n),u=d.useRef(null),f=fe(t,u),l=a.value===o.value,p=d.useRef(!1);return d.useEffect(()=>{const h=g=>{KE.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(Cs,{asChild:!0,...s,focusable:!i,active:l,children:m.jsx(Tm,{disabled:i,required:a.required,checked:l,...c,...o,name:a.name,ref:f,onCheck:()=>a.onValueChange(o.value),onKeyDown:X(h=>{h.key==="Enter"&&h.preventDefault()}),onFocus:X(o.onFocus,()=>{var h;p.current&&((h=u.current)==null||h.click())})})})});Wm.displayName=Fm;var JE="RadioGroupIndicator",Bm=d.forwardRef((e,t)=>{const{__scopeRadioGroup:n,...r}=e,o=$m(n);return m.jsx(Pm,{...o,...r,ref:t})});Bm.displayName=JE;var Ym=Lm,zm=Wm,eD=Bm;const Hm=d.forwardRef(({className:e,...t},n)=>m.jsx(Ym,{ref:n,className:F("grid gap-2",e),...t}));Hm.displayName=Ym.displayName;const Um=d.forwardRef(({className:e,...t},n)=>m.jsx(zm,{ref:n,className:F(`
219
219
  aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background
220
220
  focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2
221
221
  disabled:cursor-not-allowed disabled:opacity-50
222
- `,e),...t,children:m.jsx(eD,{className:"flex items-center justify-center",children:m.jsx(Cc,{className:"h-2.5 w-2.5 fill-current text-current"})})}));zm.displayName=Bm.displayName;var No="Tabs",[tD,RM]=He(No,[Pn]),Hm=Pn(),[nD,Ps]=tD(No),Um=d.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:o,defaultValue:a,orientation:i="horizontal",dir:s,activationMode:l="automatic",...u}=e,f=ur(s),[c,p]=rt({prop:r,onChange:o,defaultProp:a??"",caller:No});return m.jsx(nD,{scope:n,baseId:Re(),value:c,onValueChange:p,orientation:i,dir:f,activationMode:l,children:m.jsx(J.div,{dir:f,"data-orientation":i,...u,ref:t})})});Um.displayName=No;var Gm="TabsList",qm=d.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...o}=e,a=Ps(Gm,n),i=Hm(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})})});qm.displayName=Gm;var Vm="TabsTrigger",Km=d.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:o=!1,...a}=e,i=Ps(Vm,n),s=Hm(n),l=Qm(i.baseId,r),u=Jm(i.baseId,r),f=r===i.value;return m.jsx(Cs,{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:l,...a,ref:t,onMouseDown:X(e.onMouseDown,c=>{!o&&c.button===0&&c.ctrlKey===!1?i.onValueChange(r):c.preventDefault()}),onKeyDown:X(e.onKeyDown,c=>{[" ","Enter"].includes(c.key)&&i.onValueChange(r)}),onFocus:X(e.onFocus,()=>{const c=i.activationMode!=="manual";!f&&!o&&c&&i.onValueChange(r)})})})});Km.displayName=Vm;var Xm="TabsContent",Zm=d.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:o,children:a,...i}=e,s=Ps(Xm,n),l=Qm(s.baseId,r),u=Jm(s.baseId,r),f=r===s.value,c=d.useRef(f);return d.useEffect(()=>{const p=requestAnimationFrame(()=>c.current=!1);return()=>cancelAnimationFrame(p)},[]),m.jsx(ot,{present:o||f,children:({present:p})=>m.jsx(J.div,{"data-state":f?"active":"inactive","data-orientation":s.orientation,role:"tabpanel","aria-labelledby":l,hidden:!p,id:u,tabIndex:0,...i,ref:t,style:{...e.style,animationDuration:c.current?"0s":void 0},children:p&&a})})});Zm.displayName=Xm;function Qm(e,t){return`${e}-trigger-${t}`}function Jm(e,t){return`${e}-content-${t}`}var rD=Um,ep=qm,tp=Km,np=Zm;const oD=rD,rp=d.forwardRef(({className:e,...t},n)=>m.jsx(ep,{ref:n,className:F("inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",e),...t}));rp.displayName=ep.displayName;const op=d.forwardRef(({className:e,...t},n)=>m.jsx(tp,{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}));op.displayName=tp.displayName;const ap=d.forwardRef(({className:e,...t},n)=>m.jsx(np,{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}));ap.displayName=np.displayName;var As="Progress",Is=100,[aD,OM]=He(As),[sD,iD]=aD(As),sp=d.forwardRef((e,t)=>{const{__scopeProgress:n,value:r=null,max:o,getValueLabel:a=cD,...i}=e;(o||o===0)&&!Xi(o)&&console.error(lD(`${o}`,"Progress"));const s=Xi(o)?o:Is;r!==null&&!Zi(r,s)&&console.error(uD(`${r}`,"Progress"));const l=Zi(r,s)?r:null,u=Qr(l)?a(l,s):void 0;return m.jsx(sD,{scope:n,value:l,max:s,children:m.jsx(J.div,{"aria-valuemax":s,"aria-valuemin":0,"aria-valuenow":Qr(l)?l:void 0,"aria-valuetext":u,role:"progressbar","data-state":lp(l,s),"data-value":l??void 0,"data-max":s,...i,ref:t})})});sp.displayName=As;var ip="ProgressIndicator",cp=d.forwardRef((e,t)=>{const{__scopeProgress:n,...r}=e,o=iD(ip,n);return m.jsx(J.div,{"data-state":lp(o.value,o.max),"data-value":o.value??void 0,"data-max":o.max,...r,ref:t})});cp.displayName=ip;function cD(e,t){return`${Math.round(e/t*100)}%`}function lp(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function Qr(e){return typeof e=="number"}function Xi(e){return Qr(e)&&!isNaN(e)&&e>0}function Zi(e,t){return Qr(e)&&!isNaN(e)&&e<=t&&e>=0}function lD(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 uD(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
222
+ `,e),...t,children:m.jsx(eD,{className:"flex items-center justify-center",children:m.jsx(Cc,{className:"h-2.5 w-2.5 fill-current text-current"})})}));Um.displayName=zm.displayName;var No="Tabs",[tD,RM]=He(No,[Pn]),Gm=Pn(),[nD,Ps]=tD(No),qm=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]=rt({prop:r,onChange:o,defaultProp:a??"",caller:No});return m.jsx(nD,{scope:n,baseId:Re(),value:l,onValueChange:p,orientation:i,dir:f,activationMode:c,children:m.jsx(J.div,{dir:f,"data-orientation":i,...u,ref:t})})});qm.displayName=No;var Vm="TabsList",Km=d.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...o}=e,a=Ps(Vm,n),i=Gm(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})})});Km.displayName=Vm;var Xm="TabsTrigger",Zm=d.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:o=!1,...a}=e,i=Ps(Xm,n),s=Gm(n),c=ep(i.baseId,r),u=tp(i.baseId,r),f=r===i.value;return m.jsx(Cs,{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:X(e.onMouseDown,l=>{!o&&l.button===0&&l.ctrlKey===!1?i.onValueChange(r):l.preventDefault()}),onKeyDown:X(e.onKeyDown,l=>{[" ","Enter"].includes(l.key)&&i.onValueChange(r)}),onFocus:X(e.onFocus,()=>{const l=i.activationMode!=="manual";!f&&!o&&l&&i.onValueChange(r)})})})});Zm.displayName=Xm;var Qm="TabsContent",Jm=d.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:o,children:a,...i}=e,s=Ps(Qm,n),c=ep(s.baseId,r),u=tp(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(ot,{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})})});Jm.displayName=Qm;function ep(e,t){return`${e}-trigger-${t}`}function tp(e,t){return`${e}-content-${t}`}var rD=qm,np=Km,rp=Zm,op=Jm;const oD=rD,ap=d.forwardRef(({className:e,...t},n)=>m.jsx(np,{ref:n,className:F("inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",e),...t}));ap.displayName=np.displayName;const sp=d.forwardRef(({className:e,...t},n)=>m.jsx(rp,{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}));sp.displayName=rp.displayName;const ip=d.forwardRef(({className:e,...t},n)=>m.jsx(op,{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}));ip.displayName=op.displayName;var As="Progress",Is=100,[aD,OM]=He(As),[sD,iD]=aD(As),cp=d.forwardRef((e,t)=>{const{__scopeProgress:n,value:r=null,max:o,getValueLabel:a=cD,...i}=e;(o||o===0)&&!Xi(o)&&console.error(lD(`${o}`,"Progress"));const s=Xi(o)?o:Is;r!==null&&!Zi(r,s)&&console.error(uD(`${r}`,"Progress"));const c=Zi(r,s)?r:null,u=Qr(c)?a(c,s):void 0;return m.jsx(sD,{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":dp(c,s),"data-value":c??void 0,"data-max":s,...i,ref:t})})});cp.displayName=As;var lp="ProgressIndicator",up=d.forwardRef((e,t)=>{const{__scopeProgress:n,...r}=e,o=iD(lp,n);return m.jsx(J.div,{"data-state":dp(o.value,o.max),"data-value":o.value??void 0,"data-max":o.max,...r,ref:t})});up.displayName=lp;function cD(e,t){return`${Math.round(e/t*100)}%`}function dp(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function Qr(e){return typeof e=="number"}function Xi(e){return Qr(e)&&!isNaN(e)&&e>0}function Zi(e,t){return Qr(e)&&!isNaN(e)&&e<=t&&e>=0}function lD(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 uD(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
223
223
  - a positive number
224
224
  - less than the value passed to \`max\` (or ${Is} if no \`max\` prop is set)
225
225
  - \`null\` or \`undefined\` if the progress is indeterminate.
226
226
 
227
- Defaulting to \`null\`.`}var up=sp,dD=cp;const dp=d.forwardRef(({className:e,value:t,...n},r)=>m.jsx(up,{ref:r,className:F("relative h-1.5 w-full overflow-hidden rounded-full bg-secondary",e),...n,children:m.jsx(dD,{className:"h-full w-full flex-1 bg-brandBlue transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})}));dp.displayName=up.displayName;function fD(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 mD=e=>{switch(e){case"success":return gD;case"info":return bD;case"warning":return vD;case"error":return yD;default:return null}},pD=Array(12).fill(0),hD=({visible:e,className:t})=>x.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},x.createElement("div",{className:"sonner-spinner"},pD.map((n,r)=>x.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),gD=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"})),vD=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"})),bD=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"})),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-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"})),wD=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"})),xD=()=>{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 Pa=1;class SD{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:Pa++,i=this.toasts.find(l=>l.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(l=>l.id===a?(this.publish({...l,...t,id:a,title:r}),{...l,...t,id:a,dismissible:s,title:r}):l):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(ED(u)&&!u.ok){a=!1;const c=typeof n.error=="function"?await n.error(`HTTP error! status: ${u.status}`):n.error,p=typeof n.description=="function"?await n.description(`HTTP error! status: ${u.status}`):n.description,b=typeof c=="object"&&!x.isValidElement(c)?c:{message:c};this.create({id:r,type:"error",description:p,...b})}else if(u instanceof Error){a=!1;const c=typeof n.error=="function"?await n.error(u):n.error,p=typeof n.description=="function"?await n.description(u):n.description,b=typeof c=="object"&&!x.isValidElement(c)?c:{message:c};this.create({id:r,type:"error",description:p,...b})}else if(n.success!==void 0){a=!1;const c=typeof n.success=="function"?await n.success(u):n.success,p=typeof n.description=="function"?await n.description(u):n.description,b=typeof c=="object"&&!x.isValidElement(c)?c:{message:c};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,c=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:c,...h})}}).finally(()=>{a&&(this.dismiss(r),r=void 0),n.finally==null||n.finally.call(n)}),l=()=>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:l}:Object.assign(r,{unwrap:l})},this.custom=(t,n)=>{const r=(n==null?void 0:n.id)||Pa++;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 Ke=new SD,CD=(e,t)=>{const n=(t==null?void 0:t.id)||Pa++;return Ke.addToast({title:e,...t,id:n}),n},ED=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",DD=CD,MD=()=>Ke.toasts,ND=()=>Ke.getActiveToasts(),Qi=Object.assign(DD,{success:Ke.success,info:Ke.info,warning:Ke.warning,error:Ke.error,custom:Ke.custom,message:Ke.message,promise:Ke.promise,dismiss:Ke.dismiss,loading:Ke.loading},{getHistory:MD,getToasts:ND});fD("[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 kD=3,RD="24px",OD="16px",Ji=4e3,TD=356,_D=14,PD=45,AD=200;function pt(...e){return e.filter(Boolean).join(" ")}function ID(e){const[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}const jD=e=>{var t,n,r,o,a,i,s,l,u;const{invert:f,toast:c,unstyled:p,interacting:h,setHeights:b,visibleToasts:g,heights:v,index:y,toasts:w,expanded:C,removeToast:D,defaultRichColors:E,closeButton:R,style:S,cancelButtonStyle:k,actionButtonStyle:I,className:j="",descriptionClassName:L="",duration:V,position:B,gap:P,expandByDefault:O,classNames:M,icons:A,closeButtonAriaLabel:N="Close toast"}=e,[_,Y]=x.useState(null),[H,T]=x.useState(null),[$,z]=x.useState(!1),[U,G]=x.useState(!1),[W,Q]=x.useState(!1),[K,Z]=x.useState(!1),[se,ie]=x.useState(!1),[be,ee]=x.useState(0),[Ae,Ie]=x.useState(0),Ee=x.useRef(c.duration||V||Ji),Ge=x.useRef(null),Ce=x.useRef(null),Xe=y===0,_t=y+1<=g,Oe=c.type,re=c.dismissible!==!1,pe=c.className||"",Te=c.descriptionClassName||"",Fe=x.useMemo(()=>v.findIndex(oe=>oe.toastId===c.id)||0,[v,c.id]),Ye=x.useMemo(()=>{var oe;return(oe=c.closeButton)!=null?oe:R},[c.closeButton,R]),at=x.useMemo(()=>c.duration||V||Ji,[c.duration,V]),qt=x.useRef(0),st=x.useRef(0),cn=x.useRef(0),qe=x.useRef(null),[ln,An]=B.split("-"),un=x.useMemo(()=>v.reduce((oe,de,ve)=>ve>=Fe?oe:oe+de.height,0),[v,Fe]),Vt=xD(),In=c.invert||f,Pt=Oe==="loading";st.current=x.useMemo(()=>Fe*P+un,[Fe,un]),x.useEffect(()=>{Ee.current=at},[at]),x.useEffect(()=>{z(!0)},[]),x.useEffect(()=>{const oe=Ce.current;if(oe){const de=oe.getBoundingClientRect().height;return Ie(de),b(ve=>[{toastId:c.id,height:de,position:c.position},...ve]),()=>b(ve=>ve.filter(ue=>ue.toastId!==c.id))}},[b,c.id]),x.useLayoutEffect(()=>{if(!$)return;const oe=Ce.current,de=oe.style.height;oe.style.height="auto";const ve=oe.getBoundingClientRect().height;oe.style.height=de,Ie(ve),b(ue=>ue.find(we=>we.toastId===c.id)?ue.map(we=>we.toastId===c.id?{...we,height:ve}:we):[{toastId:c.id,height:ve,position:c.position},...ue])},[$,c.title,c.description,b,c.id,c.jsx,c.action,c.cancel]);const q=x.useCallback(()=>{G(!0),ee(st.current),b(oe=>oe.filter(de=>de.toastId!==c.id)),setTimeout(()=>{D(c)},AD)},[c,D,b,st]);x.useEffect(()=>{if(c.promise&&Oe==="loading"||c.duration===1/0||c.type==="loading")return;let oe;return C||h||Vt?(()=>{if(cn.current<qt.current){const ue=new Date().getTime()-qt.current;Ee.current=Ee.current-ue}cn.current=new Date().getTime()})():(()=>{Ee.current!==1/0&&(qt.current=new Date().getTime(),oe=setTimeout(()=>{c.onAutoClose==null||c.onAutoClose.call(c,c),q()},Ee.current))})(),()=>clearTimeout(oe)},[C,h,c,Oe,Vt,q]),x.useEffect(()=>{c.delete&&(q(),c.onDismiss==null||c.onDismiss.call(c,c))},[q,c.delete]);function ce(){var oe;if(A!=null&&A.loading){var de;return x.createElement("div",{className:pt(M==null?void 0:M.loader,c==null||(de=c.classNames)==null?void 0:de.loader,"sonner-loader"),"data-visible":Oe==="loading"},A.loading)}return x.createElement(hD,{className:pt(M==null?void 0:M.loader,c==null||(oe=c.classNames)==null?void 0:oe.loader),visible:Oe==="loading"})}const ae=c.icon||(A==null?void 0:A[Oe])||mD(Oe);var me,ge;return x.createElement("li",{tabIndex:0,ref:Ce,className:pt(j,pe,M==null?void 0:M.toast,c==null||(t=c.classNames)==null?void 0:t.toast,M==null?void 0:M.default,M==null?void 0:M[Oe],c==null||(n=c.classNames)==null?void 0:n[Oe]),"data-sonner-toast":"","data-rich-colors":(me=c.richColors)!=null?me:E,"data-styled":!(c.jsx||c.unstyled||p),"data-mounted":$,"data-promise":!!c.promise,"data-swiped":se,"data-removed":U,"data-visible":_t,"data-y-position":ln,"data-x-position":An,"data-index":y,"data-front":Xe,"data-swiping":W,"data-dismissible":re,"data-type":Oe,"data-invert":In,"data-swipe-out":K,"data-swipe-direction":H,"data-expanded":!!(C||O&&$),style:{"--index":y,"--toasts-before":y,"--z-index":w.length-y,"--offset":`${U?be:st.current}px`,"--initial-height":O?"auto":`${Ae}px`,...S,...c.style},onDragEnd:()=>{Q(!1),Y(null),qe.current=null},onPointerDown:oe=>{oe.button!==2&&(Pt||!re||(Ge.current=new Date,ee(st.current),oe.target.setPointerCapture(oe.pointerId),oe.target.tagName!=="BUTTON"&&(Q(!0),qe.current={x:oe.clientX,y:oe.clientY})))},onPointerUp:()=>{var oe,de,ve;if(K||!re)return;qe.current=null;const ue=Number(((oe=Ce.current)==null?void 0:oe.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Ve=Number(((de=Ce.current)==null?void 0:de.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),we=new Date().getTime()-((ve=Ge.current)==null?void 0:ve.getTime()),Se=_==="x"?ue:Ve,Ze=Math.abs(Se)/we;if(Math.abs(Se)>=PD||Ze>.11){ee(st.current),c.onDismiss==null||c.onDismiss.call(c,c),T(_==="x"?ue>0?"right":"left":Ve>0?"down":"up"),q(),Z(!0);return}else{var We,it;(We=Ce.current)==null||We.style.setProperty("--swipe-amount-x","0px"),(it=Ce.current)==null||it.style.setProperty("--swipe-amount-y","0px")}ie(!1),Q(!1),Y(null)},onPointerMove:oe=>{var de,ve,ue;if(!qe.current||!re||((de=window.getSelection())==null?void 0:de.toString().length)>0)return;const we=oe.clientY-qe.current.y,Se=oe.clientX-qe.current.x;var Ze;const We=(Ze=e.swipeDirections)!=null?Ze:ID(B);!_&&(Math.abs(Se)>1||Math.abs(we)>1)&&Y(Math.abs(Se)>Math.abs(we)?"x":"y");let it={x:0,y:0};const $s=Kt=>1/(1.5+Math.abs(Kt)/20);if(_==="y"){if(We.includes("top")||We.includes("bottom"))if(We.includes("top")&&we<0||We.includes("bottom")&&we>0)it.y=we;else{const Kt=we*$s(we);it.y=Math.abs(Kt)<Math.abs(we)?Kt:we}}else if(_==="x"&&(We.includes("left")||We.includes("right")))if(We.includes("left")&&Se<0||We.includes("right")&&Se>0)it.x=Se;else{const Kt=Se*$s(Se);it.x=Math.abs(Kt)<Math.abs(Se)?Kt:Se}(Math.abs(it.x)>0||Math.abs(it.y)>0)&&ie(!0),(ve=Ce.current)==null||ve.style.setProperty("--swipe-amount-x",`${it.x}px`),(ue=Ce.current)==null||ue.style.setProperty("--swipe-amount-y",`${it.y}px`)}},Ye&&!c.jsx&&Oe!=="loading"?x.createElement("button",{"aria-label":N,"data-disabled":Pt,"data-close-button":!0,onClick:Pt||!re?()=>{}:()=>{q(),c.onDismiss==null||c.onDismiss.call(c,c)},className:pt(M==null?void 0:M.closeButton,c==null||(r=c.classNames)==null?void 0:r.closeButton)},(ge=A==null?void 0:A.close)!=null?ge:wD):null,(Oe||c.icon||c.promise)&&c.icon!==null&&((A==null?void 0:A[Oe])!==null||c.icon)?x.createElement("div",{"data-icon":"",className:pt(M==null?void 0:M.icon,c==null||(o=c.classNames)==null?void 0:o.icon)},c.promise||c.type==="loading"&&!c.icon?c.icon||ce():null,c.type!=="loading"?ae:null):null,x.createElement("div",{"data-content":"",className:pt(M==null?void 0:M.content,c==null||(a=c.classNames)==null?void 0:a.content)},x.createElement("div",{"data-title":"",className:pt(M==null?void 0:M.title,c==null||(i=c.classNames)==null?void 0:i.title)},c.jsx?c.jsx:typeof c.title=="function"?c.title():c.title),c.description?x.createElement("div",{"data-description":"",className:pt(L,Te,M==null?void 0:M.description,c==null||(s=c.classNames)==null?void 0:s.description)},typeof c.description=="function"?c.description():c.description):null),x.isValidElement(c.cancel)?c.cancel:c.cancel&&_r(c.cancel)?x.createElement("button",{"data-button":!0,"data-cancel":!0,style:c.cancelButtonStyle||k,onClick:oe=>{_r(c.cancel)&&re&&(c.cancel.onClick==null||c.cancel.onClick.call(c.cancel,oe),q())},className:pt(M==null?void 0:M.cancelButton,c==null||(l=c.classNames)==null?void 0:l.cancelButton)},c.cancel.label):null,x.isValidElement(c.action)?c.action:c.action&&_r(c.action)?x.createElement("button",{"data-button":!0,"data-action":!0,style:c.actionButtonStyle||I,onClick:oe=>{_r(c.action)&&(c.action.onClick==null||c.action.onClick.call(c.action,oe),!oe.defaultPrevented&&q())},className:pt(M==null?void 0:M.actionButton,c==null||(u=c.classNames)==null?void 0:u.actionButton)},c.action.label):null)};function ec(){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 $D(e,t){const n={};return[e,t].forEach((r,o)=>{const a=o===1,i=a?"--mobile-offset":"--offset",s=a?OD:RD;function l(u){["top","right","bottom","left"].forEach(f=>{n[`${i}-${f}`]=typeof u=="number"?`${u}px`:u})}typeof r=="number"||typeof r=="string"?l(r):typeof r=="object"?["top","right","bottom","left"].forEach(u=>{r[u]===void 0?n[`${i}-${u}`]=s:n[`${i}-${u}`]=typeof r[u]=="number"?`${r[u]}px`:r[u]}):l(s)}),n}const LD=x.forwardRef(function(t,n){const{invert:r,position:o="bottom-right",hotkey:a=["altKey","KeyT"],expand:i,closeButton:s,className:l,offset:u,mobileOffset:f,theme:c="light",richColors:p,duration:h,style:b,visibleToasts:g=kD,toastOptions:v,dir:y=ec(),gap:w=_D,icons:C,containerAriaLabel:D="Notifications"}=t,[E,R]=x.useState([]),S=x.useMemo(()=>Array.from(new Set([o].concat(E.filter(H=>H.position).map(H=>H.position)))),[E,o]),[k,I]=x.useState([]),[j,L]=x.useState(!1),[V,B]=x.useState(!1),[P,O]=x.useState(c!=="system"?c:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),M=x.useRef(null),A=a.join("+").replace(/Key/g,"").replace(/Digit/g,""),N=x.useRef(null),_=x.useRef(!1),Y=x.useCallback(H=>{R(T=>{var $;return($=T.find(z=>z.id===H.id))!=null&&$.delete||Ke.dismiss(H.id),T.filter(({id:z})=>z!==H.id)})},[]);return x.useEffect(()=>Ke.subscribe(H=>{if(H.dismiss){requestAnimationFrame(()=>{R(T=>T.map($=>$.id===H.id?{...$,delete:!0}:$))});return}setTimeout(()=>{Jr.flushSync(()=>{R(T=>{const $=T.findIndex(z=>z.id===H.id);return $!==-1?[...T.slice(0,$),{...T[$],...H},...T.slice($+1)]:[H,...T]})})})}),[E]),x.useEffect(()=>{if(c!=="system"){O(c);return}if(c==="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:$})=>{try{O($?"dark":"light")}catch(z){console.error(z)}})}},[c]),x.useEffect(()=>{E.length<=1&&L(!1)},[E]),x.useEffect(()=>{const H=T=>{var $;if(a.every(G=>T[G]||T.code===G)){var U;L(!0),(U=M.current)==null||U.focus()}T.code==="Escape"&&(document.activeElement===M.current||($=M.current)!=null&&$.contains(document.activeElement))&&L(!1)};return document.addEventListener("keydown",H),()=>document.removeEventListener("keydown",H)},[a]),x.useEffect(()=>{if(M.current)return()=>{N.current&&(N.current.focus({preventScroll:!0}),N.current=null,_.current=!1)}},[M.current]),x.createElement("section",{ref:n,"aria-label":`${D} ${A}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},S.map((H,T)=>{var $;const[z,U]=H.split("-");return E.length?x.createElement("ol",{key:H,dir:y==="auto"?ec():y,tabIndex:-1,ref:M,className:l,"data-sonner-toaster":!0,"data-sonner-theme":P,"data-y-position":z,"data-x-position":U,style:{"--front-toast-height":`${(($=k[0])==null?void 0:$.height)||0}px`,"--width":`${TD}px`,"--gap":`${w}px`,...b,...$D(u,f)},onBlur:G=>{_.current&&!G.currentTarget.contains(G.relatedTarget)&&(_.current=!1,N.current&&(N.current.focus({preventScroll:!0}),N.current=null))},onFocus:G=>{G.target instanceof HTMLElement&&G.target.dataset.dismissible==="false"||_.current||(_.current=!0,N.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)},E.filter(G=>!G.position&&T===0||G.position===H).map((G,W)=>{var Q,K;return x.createElement(jD,{key:G.id,icons:C,index:W,toast:G,defaultRichColors:p,duration:(Q=v==null?void 0:v.duration)!=null?Q:h,className:v==null?void 0:v.className,descriptionClassName:v==null?void 0:v.descriptionClassName,invert:r,visibleToasts:g,closeButton:(K=v==null?void 0:v.closeButton)!=null?K: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:E.filter(Z=>Z.position==G.position),heights:k.filter(Z=>Z.position==G.position),setHeights:I,expandByDefault:i,gap:w,expanded:j,swipeDirections:t.swipeDirections})})):null}))}),FD={error:"bg-red-500 text-white",info:"bg-blue-500 text-white",warning:"bg-amber-500 text-white",success:"bg-green-500 text-white"},WD={error:5e3,info:4e3,warning:5e3,success:4e3},BD={error:m.jsx(Ph,{className:"w-4 h-4 text-white"}),info:m.jsx(Yh,{className:"w-4 h-4 text-white"}),warning:m.jsx(Qh,{className:"w-4 h-4 text-white"}),success:m.jsx(Th,{className:"w-4 h-4 text-white"})},YD=(e,t)=>{const n=(t==null?void 0:t.variant)||"info",r=FD[n],o=(t==null?void 0:t.icon)??BD[n],a=(t==null?void 0:t.iconPosition)??"left",i=l=>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:()=>Qi.dismiss(l),children:m.jsx(kn,{className:"w-4 h-4",strokeWidth:2.5})})]})]}),s={unstyled:!0,duration:(t==null?void 0:t.duration)||WD[n],style:{padding:0,margin:0,border:"none",background:"none"}};return Qi.custom(i,s)};function zD(e){return m.jsx(LD,{...e})}var HD="DismissableLayer",Aa="dismissableLayer.update",UD="dismissableLayer.pointerDownOutside",GD="dismissableLayer.focusOutside",tc,fp=d.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),mp=d.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:i,onDismiss:s,...l}=e,u=d.useContext(fp),[f,c]=d.useState(null),p=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,h]=d.useState({}),b=fe(t,S=>c(S)),g=Array.from(u.layers),[v]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),y=g.indexOf(v),w=f?g.indexOf(f):-1,C=u.layersWithOutsidePointerEventsDisabled.size>0,D=w>=y,E=KD(S=>{const k=S.target,I=[...u.branches].some(j=>j.contains(k));!D||I||(o==null||o(S),i==null||i(S),S.defaultPrevented||s==null||s())},p),R=XD(S=>{const k=S.target;[...u.branches].some(j=>j.contains(k))||(a==null||a(S),i==null||i(S),S.defaultPrevented||s==null||s())},p);return nr(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&&(tc=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(f)),u.layers.add(f),nc(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=tc)}},[f,p,n,u]),d.useEffect(()=>()=>{f&&(u.layers.delete(f),u.layersWithOutsidePointerEventsDisabled.delete(f),nc())},[f,u]),d.useEffect(()=>{const S=()=>h({});return document.addEventListener(Aa,S),()=>document.removeEventListener(Aa,S)},[]),m.jsx(J.div,{...l,ref:b,style:{pointerEvents:C?D?"auto":"none":void 0,...e.style},onFocusCapture:X(e.onFocusCapture,R.onFocusCapture),onBlurCapture:X(e.onBlurCapture,R.onBlurCapture),onPointerDownCapture:X(e.onPointerDownCapture,E.onPointerDownCapture)})});mp.displayName=HD;var qD="DismissableLayerBranch",VD=d.forwardRef((e,t)=>{const n=d.useContext(fp),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})});VD.displayName=qD;function KD(e,t=globalThis==null?void 0:globalThis.document){const n=Pe(e),r=d.useRef(!1),o=d.useRef(()=>{});return d.useEffect(()=>{const a=s=>{if(s.target&&!r.current){let l=function(){pp(UD,n,u,{discrete:!0})};const u={originalEvent:s};s.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=l,t.addEventListener("click",o.current,{once:!0})):l()}else t.removeEventListener("click",o.current);r.current=!1},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 XD(e,t=globalThis==null?void 0:globalThis.document){const n=Pe(e),r=d.useRef(!1);return d.useEffect(()=>{const o=a=>{a.target&&!r.current&&pp(GD,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 nc(){const e=new CustomEvent(Aa);document.dispatchEvent(e)}function pp(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?Nn(o,a):o.dispatchEvent(a)}var[ko,TM]=He("Tooltip",[Yt]),Ro=Yt(),hp="TooltipProvider",ZD=700,Ia="tooltip.open",[QD,js]=ko(hp),gp=e=>{const{__scopeTooltip:t,delayDuration:n=ZD,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:a}=e,i=d.useRef(!0),s=d.useRef(!1),l=d.useRef(0);return d.useEffect(()=>{const u=l.current;return()=>window.clearTimeout(u)},[]),m.jsx(QD,{scope:t,isOpenDelayedRef:i,delayDuration:n,onOpen:d.useCallback(()=>{window.clearTimeout(l.current),i.current=!1},[]),onClose:d.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>i.current=!0,r)},[r]),isPointerInTransitRef:s,onPointerInTransitChange:d.useCallback(u=>{s.current=u},[]),disableHoverableContent:o,children:a})};gp.displayName=hp;var Jn="Tooltip",[JD,Oo]=ko(Jn),vp=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o,onOpenChange:a,disableHoverableContent:i,delayDuration:s}=e,l=js(Jn,e.__scopeTooltip),u=Ro(t),[f,c]=d.useState(null),p=Re(),h=d.useRef(0),b=i??l.disableHoverableContent,g=s??l.delayDuration,v=d.useRef(!1),[y,w]=rt({prop:r,defaultProp:o??!1,onChange:S=>{S?(l.onOpen(),document.dispatchEvent(new CustomEvent(Ia))):l.onClose(),a==null||a(S)},caller:Jn}),C=d.useMemo(()=>y?v.current?"delayed-open":"instant-open":"closed",[y]),D=d.useCallback(()=>{window.clearTimeout(h.current),h.current=0,v.current=!1,w(!0)},[w]),E=d.useCallback(()=>{window.clearTimeout(h.current),h.current=0,w(!1)},[w]),R=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(ar,{...u,children:m.jsx(JD,{scope:t,contentId:p,open:y,stateAttribute:C,trigger:f,onTriggerChange:c,onTriggerEnter:d.useCallback(()=>{l.isOpenDelayedRef.current?R():D()},[l.isOpenDelayedRef,R,D]),onTriggerLeave:d.useCallback(()=>{b?E():(window.clearTimeout(h.current),h.current=0)},[E,b]),onOpen:D,onClose:E,disableHoverableContent:b,children:n})})};vp.displayName=Jn;var ja="TooltipTrigger",bp=d.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Oo(ja,n),a=js(ja,n),i=Ro(n),s=d.useRef(null),l=fe(t,s,o.onTriggerChange),u=d.useRef(!1),f=d.useRef(!1),c=d.useCallback(()=>u.current=!1,[]);return d.useEffect(()=>()=>document.removeEventListener("pointerup",c),[c]),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:l,onPointerMove:X(e.onPointerMove,p=>{p.pointerType!=="touch"&&!f.current&&!a.isPointerInTransitRef.current&&(o.onTriggerEnter(),f.current=!0)}),onPointerLeave:X(e.onPointerLeave,()=>{o.onTriggerLeave(),f.current=!1}),onPointerDown:X(e.onPointerDown,()=>{o.open&&o.onClose(),u.current=!0,document.addEventListener("pointerup",c,{once:!0})}),onFocus:X(e.onFocus,()=>{u.current||o.onOpen()}),onBlur:X(e.onBlur,o.onClose),onClick:X(e.onClick,o.onClose)})})});bp.displayName=ja;var eM="TooltipPortal",[_M,tM]=ko(eM,{forceMount:void 0}),En="TooltipContent",yp=d.forwardRef((e,t)=>{const n=tM(En,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...a}=e,i=Oo(En,e.__scopeTooltip);return m.jsx(ot,{present:r||i.open,children:i.disableHoverableContent?m.jsx(wp,{side:o,...a,ref:t}):m.jsx(nM,{side:o,...a,ref:t})})}),nM=d.forwardRef((e,t)=>{const n=Oo(En,e.__scopeTooltip),r=js(En,e.__scopeTooltip),o=d.useRef(null),a=fe(t,o),[i,s]=d.useState(null),{trigger:l,onClose:u}=n,f=o.current,{onPointerInTransitChange:c}=r,p=d.useCallback(()=>{s(null),c(!1)},[c]),h=d.useCallback((b,g)=>{const v=b.currentTarget,y={x:b.clientX,y:b.clientY},w=sM(y,v.getBoundingClientRect()),C=iM(y,w),D=cM(g.getBoundingClientRect()),E=uM([...C,...D]);s(E),c(!0)},[c]);return d.useEffect(()=>()=>p(),[p]),d.useEffect(()=>{if(l&&f){const b=v=>h(v,f),g=v=>h(v,l);return l.addEventListener("pointerleave",b),f.addEventListener("pointerleave",g),()=>{l.removeEventListener("pointerleave",b),f.removeEventListener("pointerleave",g)}}},[l,f,h,p]),d.useEffect(()=>{if(i){const b=g=>{const v=g.target,y={x:g.clientX,y:g.clientY},w=(l==null?void 0:l.contains(v))||(f==null?void 0:f.contains(v)),C=!lM(y,i);w?p():C&&(p(),u())};return document.addEventListener("pointermove",b),()=>document.removeEventListener("pointermove",b)}},[l,f,i,u,p]),m.jsx(wp,{...e,ref:a})}),[rM,oM]=ko(Jn,{isInside:!1}),aM=Np("TooltipContent"),wp=d.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:a,onPointerDownOutside:i,...s}=e,l=Oo(En,n),u=Ro(n),{onClose:f}=l;return d.useEffect(()=>(document.addEventListener(Ia,f),()=>document.removeEventListener(Ia,f)),[f]),d.useEffect(()=>{if(l.trigger){const c=p=>{const h=p.target;h!=null&&h.contains(l.trigger)&&f()};return window.addEventListener("scroll",c,{capture:!0}),()=>window.removeEventListener("scroll",c,{capture:!0})}},[l.trigger,f]),m.jsx(mp,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:i,onFocusOutside:c=>c.preventDefault(),onDismiss:f,children:m.jsxs(so,{"data-state":l.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(aM,{children:r}),m.jsx(rM,{scope:n,isInside:!0,children:m.jsx(Qb,{id:l.contentId,role:"tooltip",children:o||r})})]})})});yp.displayName=En;var xp="TooltipArrow",Sp=d.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Ro(n);return oM(xp,n).isInside?null:m.jsx(io,{...o,...r,ref:t})});Sp.displayName=xp;function sM(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 iM(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 cM(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 lM(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],l=t[i],u=s.x,f=s.y,c=l.x,p=l.y;f>r!=p>r&&n<(c-u)*(r-f)/(p-f)+u&&(o=!o)}return o}function uM(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),dM(t)}function dM(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 fM=gp,mM=vp,pM=bp,Cp=yp,hM=Sp;const gM=fM,vM=mM,bM=pM,Ep=d.forwardRef(({className:e,sideOffset:t=4,children:n,...r},o)=>m.jsxs(Cp,{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(hM,{className:"fill-background stroke-border h-2 w-4"})]}));Ep.displayName=Cp.displayName;exports.ComponentVariant=sS;exports.DoctAddressFormSection=e1;exports.DoctAlert=Md;exports.DoctAlertDescription=kd;exports.DoctAlertTitle=Nd;exports.DoctAnimationLoader=mh;exports.DoctAutoComplete=nS;exports.DoctAutocomplete=mS;exports.DoctAvatar=Ld;exports.DoctAvatarFallback=Wd;exports.DoctAvatarImage=Fd;exports.DoctButton=kt;exports.DoctCheckbox=Vd;exports.DoctChip=U0;exports.DoctCircularProgress=vc;exports.DoctComponentSection=aS;exports.DoctContactFormSection=n1;exports.DoctCurrencyInput=bd;exports.DoctDatePickerField=Vr;exports.DoctDialog=q1;exports.DoctDialogClose=X1;exports.DoctDialogContent=ld;exports.DoctDialogDescription=md;exports.DoctDialogFooter=dd;exports.DoctDialogHeader=ud;exports.DoctDialogTitle=fd;exports.DoctDialogTrigger=V1;exports.DoctDrawer=sf;exports.DoctDrawerClose=dC;exports.DoctDrawerContent=lf;exports.DoctDrawerDescription=mf;exports.DoctDrawerFooter=df;exports.DoctDrawerHeader=uf;exports.DoctDrawerTitle=ff;exports.DoctDrawerTrigger=lC;exports.DoctDropdownMenu=WE;exports.DoctDropdownMenuCheckboxItem=Cm;exports.DoctDropdownMenuContent=xm;exports.DoctDropdownMenuGroup=YE;exports.DoctDropdownMenuItem=Sm;exports.DoctDropdownMenuLabel=Dm;exports.DoctDropdownMenuRadioGroup=HE;exports.DoctDropdownMenuRadioItem=Em;exports.DoctDropdownMenuSeparator=Mm;exports.DoctDropdownMenuShortcut=Nm;exports.DoctDropdownMenuSub=zE;exports.DoctDropdownMenuSubContent=wm;exports.DoctDropdownMenuSubTrigger=ym;exports.DoctDropdownMenuTrigger=BE;exports.DoctExpandableCard=wS;exports.DoctLabeledInput=tt;exports.DoctManualDatePickerField=H0;exports.DoctOtpInput=vh;exports.DoctPasswordInput=ua;exports.DoctPopover=Za;exports.DoctPopoverContent=fo;exports.DoctPopoverTrigger=Qa;exports.DoctProgress=dp;exports.DoctRadioGroup=Ym;exports.DoctRadioGroupItem=zm;exports.DoctSearchFilterSection=X0;exports.DoctSearchInput=Pu;exports.DoctSelectField=Cn;exports.DoctTabs=oD;exports.DoctTabsContent=ap;exports.DoctTabsList=rp;exports.DoctTabsTrigger=op;exports.DoctTextareaField=Fa;exports.DoctToaster=zD;exports.DoctTooltip=vM;exports.DoctTooltipContent=Ep;exports.DoctTooltipProvider=gM;exports.DoctTooltipTrigger=bM;exports.DoctTypography=la;exports.DoctUserRegistrationSection=Q0;exports.doctToast=YD;
227
+ Defaulting to \`null\`.`}var fp=cp,dD=up;const mp=d.forwardRef(({className:e,value:t,...n},r)=>m.jsx(fp,{ref:r,className:F("relative h-1.5 w-full overflow-hidden rounded-full bg-secondary",e),...n,children:m.jsx(dD,{className:"h-full w-full flex-1 bg-brandBlue transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})}));mp.displayName=fp.displayName;function fD(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 mD=e=>{switch(e){case"success":return gD;case"info":return bD;case"warning":return vD;case"error":return yD;default:return null}},pD=Array(12).fill(0),hD=({visible:e,className:t})=>x.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},x.createElement("div",{className:"sonner-spinner"},pD.map((n,r)=>x.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${r}`})))),gD=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"})),vD=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"})),bD=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"})),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-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"})),wD=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"})),xD=()=>{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 Pa=1;class SD{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:Pa++,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(ED(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)||Pa++;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 Ke=new SD,CD=(e,t)=>{const n=(t==null?void 0:t.id)||Pa++;return Ke.addToast({title:e,...t,id:n}),n},ED=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",DD=CD,MD=()=>Ke.toasts,ND=()=>Ke.getActiveToasts(),Qi=Object.assign(DD,{success:Ke.success,info:Ke.info,warning:Ke.warning,error:Ke.error,custom:Ke.custom,message:Ke.message,promise:Ke.promise,dismiss:Ke.dismiss,loading:Ke.loading},{getHistory:MD,getToasts:ND});fD("[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 kD=3,RD="24px",OD="16px",Ji=4e3,TD=356,_D=14,PD=45,AD=200;function pt(...e){return e.filter(Boolean).join(" ")}function ID(e){const[t,n]=e.split("-"),r=[];return t&&r.push(t),n&&r.push(n),r}const jD=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:C,removeToast:D,defaultRichColors:E,closeButton:R,style:S,cancelButtonStyle:k,actionButtonStyle:I,className:j="",descriptionClassName:L="",duration:V,position:B,gap:P,expandByDefault:O,classNames:M,icons:A,closeButtonAriaLabel:N="Close toast"}=e,[_,Y]=x.useState(null),[H,T]=x.useState(null),[$,z]=x.useState(!1),[U,G]=x.useState(!1),[W,Q]=x.useState(!1),[K,Z]=x.useState(!1),[se,ie]=x.useState(!1),[be,ee]=x.useState(0),[Ae,Ie]=x.useState(0),Ee=x.useRef(l.duration||V||Ji),Ge=x.useRef(null),Ce=x.useRef(null),Xe=y===0,_t=y+1<=g,Oe=l.type,re=l.dismissible!==!1,pe=l.className||"",Te=l.descriptionClassName||"",Fe=x.useMemo(()=>v.findIndex(oe=>oe.toastId===l.id)||0,[v,l.id]),Ye=x.useMemo(()=>{var oe;return(oe=l.closeButton)!=null?oe:R},[l.closeButton,R]),at=x.useMemo(()=>l.duration||V||Ji,[l.duration,V]),qt=x.useRef(0),st=x.useRef(0),cn=x.useRef(0),qe=x.useRef(null),[ln,An]=B.split("-"),un=x.useMemo(()=>v.reduce((oe,de,ve)=>ve>=Fe?oe:oe+de.height,0),[v,Fe]),Vt=xD(),In=l.invert||f,Pt=Oe==="loading";st.current=x.useMemo(()=>Fe*P+un,[Fe,un]),x.useEffect(()=>{Ee.current=at},[at]),x.useEffect(()=>{z(!0)},[]),x.useEffect(()=>{const oe=Ce.current;if(oe){const de=oe.getBoundingClientRect().height;return Ie(de),b(ve=>[{toastId:l.id,height:de,position:l.position},...ve]),()=>b(ve=>ve.filter(ue=>ue.toastId!==l.id))}},[b,l.id]),x.useLayoutEffect(()=>{if(!$)return;const oe=Ce.current,de=oe.style.height;oe.style.height="auto";const ve=oe.getBoundingClientRect().height;oe.style.height=de,Ie(ve),b(ue=>ue.find(we=>we.toastId===l.id)?ue.map(we=>we.toastId===l.id?{...we,height:ve}:we):[{toastId:l.id,height:ve,position:l.position},...ue])},[$,l.title,l.description,b,l.id,l.jsx,l.action,l.cancel]);const q=x.useCallback(()=>{G(!0),ee(st.current),b(oe=>oe.filter(de=>de.toastId!==l.id)),setTimeout(()=>{D(l)},AD)},[l,D,b,st]);x.useEffect(()=>{if(l.promise&&Oe==="loading"||l.duration===1/0||l.type==="loading")return;let oe;return C||h||Vt?(()=>{if(cn.current<qt.current){const ue=new Date().getTime()-qt.current;Ee.current=Ee.current-ue}cn.current=new Date().getTime()})():(()=>{Ee.current!==1/0&&(qt.current=new Date().getTime(),oe=setTimeout(()=>{l.onAutoClose==null||l.onAutoClose.call(l,l),q()},Ee.current))})(),()=>clearTimeout(oe)},[C,h,l,Oe,Vt,q]),x.useEffect(()=>{l.delete&&(q(),l.onDismiss==null||l.onDismiss.call(l,l))},[q,l.delete]);function ce(){var oe;if(A!=null&&A.loading){var de;return x.createElement("div",{className:pt(M==null?void 0:M.loader,l==null||(de=l.classNames)==null?void 0:de.loader,"sonner-loader"),"data-visible":Oe==="loading"},A.loading)}return x.createElement(hD,{className:pt(M==null?void 0:M.loader,l==null||(oe=l.classNames)==null?void 0:oe.loader),visible:Oe==="loading"})}const ae=l.icon||(A==null?void 0:A[Oe])||mD(Oe);var me,ge;return x.createElement("li",{tabIndex:0,ref:Ce,className:pt(j,pe,M==null?void 0:M.toast,l==null||(t=l.classNames)==null?void 0:t.toast,M==null?void 0:M.default,M==null?void 0:M[Oe],l==null||(n=l.classNames)==null?void 0:n[Oe]),"data-sonner-toast":"","data-rich-colors":(me=l.richColors)!=null?me:E,"data-styled":!(l.jsx||l.unstyled||p),"data-mounted":$,"data-promise":!!l.promise,"data-swiped":se,"data-removed":U,"data-visible":_t,"data-y-position":ln,"data-x-position":An,"data-index":y,"data-front":Xe,"data-swiping":W,"data-dismissible":re,"data-type":Oe,"data-invert":In,"data-swipe-out":K,"data-swipe-direction":H,"data-expanded":!!(C||O&&$),style:{"--index":y,"--toasts-before":y,"--z-index":w.length-y,"--offset":`${U?be:st.current}px`,"--initial-height":O?"auto":`${Ae}px`,...S,...l.style},onDragEnd:()=>{Q(!1),Y(null),qe.current=null},onPointerDown:oe=>{oe.button!==2&&(Pt||!re||(Ge.current=new Date,ee(st.current),oe.target.setPointerCapture(oe.pointerId),oe.target.tagName!=="BUTTON"&&(Q(!0),qe.current={x:oe.clientX,y:oe.clientY})))},onPointerUp:()=>{var oe,de,ve;if(K||!re)return;qe.current=null;const ue=Number(((oe=Ce.current)==null?void 0:oe.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),Ve=Number(((de=Ce.current)==null?void 0:de.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),we=new Date().getTime()-((ve=Ge.current)==null?void 0:ve.getTime()),Se=_==="x"?ue:Ve,Ze=Math.abs(Se)/we;if(Math.abs(Se)>=PD||Ze>.11){ee(st.current),l.onDismiss==null||l.onDismiss.call(l,l),T(_==="x"?ue>0?"right":"left":Ve>0?"down":"up"),q(),Z(!0);return}else{var We,it;(We=Ce.current)==null||We.style.setProperty("--swipe-amount-x","0px"),(it=Ce.current)==null||it.style.setProperty("--swipe-amount-y","0px")}ie(!1),Q(!1),Y(null)},onPointerMove:oe=>{var de,ve,ue;if(!qe.current||!re||((de=window.getSelection())==null?void 0:de.toString().length)>0)return;const we=oe.clientY-qe.current.y,Se=oe.clientX-qe.current.x;var Ze;const We=(Ze=e.swipeDirections)!=null?Ze:ID(B);!_&&(Math.abs(Se)>1||Math.abs(we)>1)&&Y(Math.abs(Se)>Math.abs(we)?"x":"y");let it={x:0,y:0};const $s=Kt=>1/(1.5+Math.abs(Kt)/20);if(_==="y"){if(We.includes("top")||We.includes("bottom"))if(We.includes("top")&&we<0||We.includes("bottom")&&we>0)it.y=we;else{const Kt=we*$s(we);it.y=Math.abs(Kt)<Math.abs(we)?Kt:we}}else if(_==="x"&&(We.includes("left")||We.includes("right")))if(We.includes("left")&&Se<0||We.includes("right")&&Se>0)it.x=Se;else{const Kt=Se*$s(Se);it.x=Math.abs(Kt)<Math.abs(Se)?Kt:Se}(Math.abs(it.x)>0||Math.abs(it.y)>0)&&ie(!0),(ve=Ce.current)==null||ve.style.setProperty("--swipe-amount-x",`${it.x}px`),(ue=Ce.current)==null||ue.style.setProperty("--swipe-amount-y",`${it.y}px`)}},Ye&&!l.jsx&&Oe!=="loading"?x.createElement("button",{"aria-label":N,"data-disabled":Pt,"data-close-button":!0,onClick:Pt||!re?()=>{}:()=>{q(),l.onDismiss==null||l.onDismiss.call(l,l)},className:pt(M==null?void 0:M.closeButton,l==null||(r=l.classNames)==null?void 0:r.closeButton)},(ge=A==null?void 0:A.close)!=null?ge:wD):null,(Oe||l.icon||l.promise)&&l.icon!==null&&((A==null?void 0:A[Oe])!==null||l.icon)?x.createElement("div",{"data-icon":"",className:pt(M==null?void 0:M.icon,l==null||(o=l.classNames)==null?void 0:o.icon)},l.promise||l.type==="loading"&&!l.icon?l.icon||ce():null,l.type!=="loading"?ae:null):null,x.createElement("div",{"data-content":"",className:pt(M==null?void 0:M.content,l==null||(a=l.classNames)==null?void 0:a.content)},x.createElement("div",{"data-title":"",className:pt(M==null?void 0:M.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:pt(L,Te,M==null?void 0:M.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||k,onClick:oe=>{_r(l.cancel)&&re&&(l.cancel.onClick==null||l.cancel.onClick.call(l.cancel,oe),q())},className:pt(M==null?void 0:M.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||I,onClick:oe=>{_r(l.action)&&(l.action.onClick==null||l.action.onClick.call(l.action,oe),!oe.defaultPrevented&&q())},className:pt(M==null?void 0:M.actionButton,l==null||(u=l.classNames)==null?void 0:u.actionButton)},l.action.label):null)};function ec(){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 $D(e,t){const n={};return[e,t].forEach((r,o)=>{const a=o===1,i=a?"--mobile-offset":"--offset",s=a?OD:RD;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 LD=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=kD,toastOptions:v,dir:y=ec(),gap:w=_D,icons:C,containerAriaLabel:D="Notifications"}=t,[E,R]=x.useState([]),S=x.useMemo(()=>Array.from(new Set([o].concat(E.filter(H=>H.position).map(H=>H.position)))),[E,o]),[k,I]=x.useState([]),[j,L]=x.useState(!1),[V,B]=x.useState(!1),[P,O]=x.useState(l!=="system"?l:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),M=x.useRef(null),A=a.join("+").replace(/Key/g,"").replace(/Digit/g,""),N=x.useRef(null),_=x.useRef(!1),Y=x.useCallback(H=>{R(T=>{var $;return($=T.find(z=>z.id===H.id))!=null&&$.delete||Ke.dismiss(H.id),T.filter(({id:z})=>z!==H.id)})},[]);return x.useEffect(()=>Ke.subscribe(H=>{if(H.dismiss){requestAnimationFrame(()=>{R(T=>T.map($=>$.id===H.id?{...$,delete:!0}:$))});return}setTimeout(()=>{Jr.flushSync(()=>{R(T=>{const $=T.findIndex(z=>z.id===H.id);return $!==-1?[...T.slice(0,$),{...T[$],...H},...T.slice($+1)]:[H,...T]})})})}),[E]),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:$})=>{try{O($?"dark":"light")}catch(z){console.error(z)}})}},[l]),x.useEffect(()=>{E.length<=1&&L(!1)},[E]),x.useEffect(()=>{const H=T=>{var $;if(a.every(G=>T[G]||T.code===G)){var U;L(!0),(U=M.current)==null||U.focus()}T.code==="Escape"&&(document.activeElement===M.current||($=M.current)!=null&&$.contains(document.activeElement))&&L(!1)};return document.addEventListener("keydown",H),()=>document.removeEventListener("keydown",H)},[a]),x.useEffect(()=>{if(M.current)return()=>{N.current&&(N.current.focus({preventScroll:!0}),N.current=null,_.current=!1)}},[M.current]),x.createElement("section",{ref:n,"aria-label":`${D} ${A}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},S.map((H,T)=>{var $;const[z,U]=H.split("-");return E.length?x.createElement("ol",{key:H,dir:y==="auto"?ec():y,tabIndex:-1,ref:M,className:c,"data-sonner-toaster":!0,"data-sonner-theme":P,"data-y-position":z,"data-x-position":U,style:{"--front-toast-height":`${(($=k[0])==null?void 0:$.height)||0}px`,"--width":`${TD}px`,"--gap":`${w}px`,...b,...$D(u,f)},onBlur:G=>{_.current&&!G.currentTarget.contains(G.relatedTarget)&&(_.current=!1,N.current&&(N.current.focus({preventScroll:!0}),N.current=null))},onFocus:G=>{G.target instanceof HTMLElement&&G.target.dataset.dismissible==="false"||_.current||(_.current=!0,N.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)},E.filter(G=>!G.position&&T===0||G.position===H).map((G,W)=>{var Q,K;return x.createElement(jD,{key:G.id,icons:C,index:W,toast:G,defaultRichColors:p,duration:(Q=v==null?void 0:v.duration)!=null?Q:h,className:v==null?void 0:v.className,descriptionClassName:v==null?void 0:v.descriptionClassName,invert:r,visibleToasts:g,closeButton:(K=v==null?void 0:v.closeButton)!=null?K: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:E.filter(Z=>Z.position==G.position),heights:k.filter(Z=>Z.position==G.position),setHeights:I,expandByDefault:i,gap:w,expanded:j,swipeDirections:t.swipeDirections})})):null}))}),FD={error:"bg-red-500 text-white",info:"bg-blue-500 text-white",warning:"bg-amber-500 text-white",success:"bg-green-500 text-white"},WD={error:5e3,info:4e3,warning:5e3,success:4e3},BD={error:m.jsx(Ih,{className:"w-4 h-4 text-white"}),info:m.jsx(Hh,{className:"w-4 h-4 text-white"}),warning:m.jsx(eg,{className:"w-4 h-4 text-white"}),success:m.jsx(Ph,{className:"w-4 h-4 text-white"})},YD=(e,t)=>{const n=(t==null?void 0:t.variant)||"info",r=FD[n],o=(t==null?void 0:t.icon)??BD[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:()=>Qi.dismiss(c),children:m.jsx(kn,{className:"w-4 h-4",strokeWidth:2.5})})]})]}),s={unstyled:!0,duration:(t==null?void 0:t.duration)||WD[n],style:{padding:0,margin:0,border:"none",background:"none"}};return Qi.custom(i,s)};function zD(e){return m.jsx(LD,{...e})}var HD="DismissableLayer",Aa="dismissableLayer.update",UD="dismissableLayer.pointerDownOutside",GD="dismissableLayer.focusOutside",tc,pp=d.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),hp=d.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:i,onDismiss:s,...c}=e,u=d.useContext(pp),[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,C=u.layersWithOutsidePointerEventsDisabled.size>0,D=w>=y,E=KD(S=>{const k=S.target,I=[...u.branches].some(j=>j.contains(k));!D||I||(o==null||o(S),i==null||i(S),S.defaultPrevented||s==null||s())},p),R=XD(S=>{const k=S.target;[...u.branches].some(j=>j.contains(k))||(a==null||a(S),i==null||i(S),S.defaultPrevented||s==null||s())},p);return nr(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&&(tc=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(f)),u.layers.add(f),nc(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=tc)}},[f,p,n,u]),d.useEffect(()=>()=>{f&&(u.layers.delete(f),u.layersWithOutsidePointerEventsDisabled.delete(f),nc())},[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:C?D?"auto":"none":void 0,...e.style},onFocusCapture:X(e.onFocusCapture,R.onFocusCapture),onBlurCapture:X(e.onBlurCapture,R.onBlurCapture),onPointerDownCapture:X(e.onPointerDownCapture,E.onPointerDownCapture)})});hp.displayName=HD;var qD="DismissableLayerBranch",VD=d.forwardRef((e,t)=>{const n=d.useContext(pp),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})});VD.displayName=qD;function KD(e,t=globalThis==null?void 0:globalThis.document){const n=Pe(e),r=d.useRef(!1),o=d.useRef(()=>{});return d.useEffect(()=>{const a=s=>{if(s.target&&!r.current){let c=function(){gp(UD,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 XD(e,t=globalThis==null?void 0:globalThis.document){const n=Pe(e),r=d.useRef(!1);return d.useEffect(()=>{const o=a=>{a.target&&!r.current&&gp(GD,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 nc(){const e=new CustomEvent(Aa);document.dispatchEvent(e)}function gp(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?Nn(o,a):o.dispatchEvent(a)}var[ko,TM]=He("Tooltip",[Yt]),Ro=Yt(),vp="TooltipProvider",ZD=700,Ia="tooltip.open",[QD,js]=ko(vp),bp=e=>{const{__scopeTooltip:t,delayDuration:n=ZD,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(QD,{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})};bp.displayName=vp;var Jn="Tooltip",[JD,Oo]=ko(Jn),yp=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=Re(),h=d.useRef(0),b=i??c.disableHoverableContent,g=s??c.delayDuration,v=d.useRef(!1),[y,w]=rt({prop:r,defaultProp:o??!1,onChange:S=>{S?(c.onOpen(),document.dispatchEvent(new CustomEvent(Ia))):c.onClose(),a==null||a(S)},caller:Jn}),C=d.useMemo(()=>y?v.current?"delayed-open":"instant-open":"closed",[y]),D=d.useCallback(()=>{window.clearTimeout(h.current),h.current=0,v.current=!1,w(!0)},[w]),E=d.useCallback(()=>{window.clearTimeout(h.current),h.current=0,w(!1)},[w]),R=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(ar,{...u,children:m.jsx(JD,{scope:t,contentId:p,open:y,stateAttribute:C,trigger:f,onTriggerChange:l,onTriggerEnter:d.useCallback(()=>{c.isOpenDelayedRef.current?R():D()},[c.isOpenDelayedRef,R,D]),onTriggerLeave:d.useCallback(()=>{b?E():(window.clearTimeout(h.current),h.current=0)},[E,b]),onOpen:D,onClose:E,disableHoverableContent:b,children:n})})};yp.displayName=Jn;var ja="TooltipTrigger",wp=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:X(e.onPointerMove,p=>{p.pointerType!=="touch"&&!f.current&&!a.isPointerInTransitRef.current&&(o.onTriggerEnter(),f.current=!0)}),onPointerLeave:X(e.onPointerLeave,()=>{o.onTriggerLeave(),f.current=!1}),onPointerDown:X(e.onPointerDown,()=>{o.open&&o.onClose(),u.current=!0,document.addEventListener("pointerup",l,{once:!0})}),onFocus:X(e.onFocus,()=>{u.current||o.onOpen()}),onBlur:X(e.onBlur,o.onClose),onClick:X(e.onClick,o.onClose)})})});wp.displayName=ja;var eM="TooltipPortal",[_M,tM]=ko(eM,{forceMount:void 0}),En="TooltipContent",xp=d.forwardRef((e,t)=>{const n=tM(En,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...a}=e,i=Oo(En,e.__scopeTooltip);return m.jsx(ot,{present:r||i.open,children:i.disableHoverableContent?m.jsx(Sp,{side:o,...a,ref:t}):m.jsx(nM,{side:o,...a,ref:t})})}),nM=d.forwardRef((e,t)=>{const n=Oo(En,e.__scopeTooltip),r=js(En,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=sM(y,v.getBoundingClientRect()),C=iM(y,w),D=cM(g.getBoundingClientRect()),E=uM([...C,...D]);s(E),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)),C=!lM(y,i);w?p():C&&(p(),u())};return document.addEventListener("pointermove",b),()=>document.removeEventListener("pointermove",b)}},[c,f,i,u,p]),m.jsx(Sp,{...e,ref:a})}),[rM,oM]=ko(Jn,{isInside:!1}),aM=Rp("TooltipContent"),Sp=d.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:a,onPointerDownOutside:i,...s}=e,c=Oo(En,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(hp,{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(aM,{children:r}),m.jsx(rM,{scope:n,isInside:!0,children:m.jsx(ey,{id:c.contentId,role:"tooltip",children:o||r})})]})})});xp.displayName=En;var Cp="TooltipArrow",Ep=d.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Ro(n);return oM(Cp,n).isInside?null:m.jsx(io,{...o,...r,ref:t})});Ep.displayName=Cp;function sM(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 iM(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 cM(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 lM(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 uM(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),dM(t)}function dM(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 fM=bp,mM=yp,pM=wp,Dp=xp,hM=Ep;const gM=fM,vM=mM,bM=pM,Mp=d.forwardRef(({className:e,sideOffset:t=4,children:n,...r},o)=>m.jsxs(Dp,{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(hM,{className:"fill-background stroke-border h-2 w-4"})]}));Mp.displayName=Dp.displayName;exports.ComponentVariant=cS;exports.DoctAddressFormSection=n1;exports.DoctAlert=Md;exports.DoctAlertDescription=kd;exports.DoctAlertTitle=Nd;exports.DoctAnimationLoader=hh;exports.DoctAutoComplete=oS;exports.DoctAutocomplete=hS;exports.DoctAvatar=Ld;exports.DoctAvatarFallback=Wd;exports.DoctAvatarImage=Fd;exports.DoctButton=kt;exports.DoctCheckbox=Vd;exports.DoctChip=q0;exports.DoctCircularProgress=vc;exports.DoctComponentSection=iS;exports.DoctContactFormSection=o1;exports.DoctCurrencyInput=bd;exports.DoctDatePickerField=Vr;exports.DoctDialog=K1;exports.DoctDialogClose=Q1;exports.DoctDialogContent=ld;exports.DoctDialogDescription=md;exports.DoctDialogFooter=dd;exports.DoctDialogHeader=ud;exports.DoctDialogTitle=fd;exports.DoctDialogTrigger=X1;exports.DoctDrawer=sf;exports.DoctDrawerClose=mC;exports.DoctDrawerContent=lf;exports.DoctDrawerDescription=mf;exports.DoctDrawerFooter=df;exports.DoctDrawerHeader=uf;exports.DoctDrawerTitle=ff;exports.DoctDrawerTrigger=dC;exports.DoctDropdownMenu=BE;exports.DoctDropdownMenuCheckboxItem=Dm;exports.DoctDropdownMenuContent=Cm;exports.DoctDropdownMenuGroup=YE;exports.DoctDropdownMenuItem=Em;exports.DoctDropdownMenuLabel=Nm;exports.DoctDropdownMenuRadioGroup=HE;exports.DoctDropdownMenuRadioItem=Mm;exports.DoctDropdownMenuSeparator=km;exports.DoctDropdownMenuShortcut=Rm;exports.DoctDropdownMenuSub=zE;exports.DoctDropdownMenuSubContent=Sm;exports.DoctDropdownMenuSubTrigger=xm;exports.DoctDropdownMenuTrigger=wm;exports.DoctExpandableCard=SS;exports.DoctLabeledInput=tt;exports.DoctManualDatePickerField=G0;exports.DoctOtpInput=yh;exports.DoctPasswordInput=ua;exports.DoctPopover=Za;exports.DoctPopoverContent=fo;exports.DoctPopoverTrigger=Qa;exports.DoctProgress=mp;exports.DoctRadioGroup=Hm;exports.DoctRadioGroupItem=Um;exports.DoctSearchFilterSection=Q0;exports.DoctSearchInput=Pu;exports.DoctSelectField=Cn;exports.DoctTabs=oD;exports.DoctTabsContent=ip;exports.DoctTabsList=ap;exports.DoctTabsTrigger=sp;exports.DoctTextareaField=Fa;exports.DoctToaster=zD;exports.DoctTooltip=vM;exports.DoctTooltipContent=Mp;exports.DoctTooltipProvider=gM;exports.DoctTooltipTrigger=bM;exports.DoctTypography=la;exports.DoctUserRegistrationSection=e1;exports.doctToast=YD;