@capitaltg/vero 1.10.3 → 1.10.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +53 -55
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +2677 -2668
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1,106 +1,106 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("react/jsx-runtime"),E=require("react"),Vs=require("react-dom");function Ys(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 l=Ys(E),En=Ys(Vs);function Hs(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=Hs(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Gs(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Hs(e))&&(r&&(r+=" "),r+=t);return r}const Vo="-",vm=e=>{const t=bm(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:i=>{const s=i.split(Vo);return s[0]===""&&s.length!==1&&s.shift(),Us(s,t)||ym(i)},getConflictingClassGroupIds:(i,s)=>{const c=n[i]||[];return s&&r[i]?[...c,...r[i]]:c}}},Us=(e,t)=>{var i;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?Us(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const a=e.join(Vo);return(i=t.validators.find(({validator:s})=>s(a)))==null?void 0:i.classGroupId},za=/^\[(.+)\]$/,ym=e=>{if(za.test(e)){const t=za.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},bm=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return wm(Object.entries(e.classGroups),n).forEach(([a,i])=>{yo(i,r,a,t)}),r},yo=(e,t,n,r)=>{e.forEach(o=>{if(typeof o=="string"){const a=o===""?t:Ka(t,o);a.classGroupId=n;return}if(typeof o=="function"){if(xm(o)){yo(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([a,i])=>{yo(i,Ka(t,a),n,r)})})},Ka=(e,t)=>{let n=e;return t.split(Vo).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},xm=e=>e.isThemeGetter,wm=(e,t)=>t?e.map(([n,r])=>{const o=r.map(a=>typeof a=="string"?t+a:typeof a=="object"?Object.fromEntries(Object.entries(a).map(([i,s])=>[t+i,s])):a);return[n,o]}):e,Cm=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)}}},zs="!",Sm=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,o=t[0],a=t.length,i=s=>{const c=[];let u=0,f=0,m;for(let v=0;v<s.length;v++){let w=s[v];if(u===0){if(w===o&&(r||s.slice(v,v+a)===t)){c.push(s.slice(f,v)),f=v+a;continue}if(w==="/"){m=v;continue}}w==="["?u++:w==="]"&&u--}const p=c.length===0?s:s.substring(f),h=p.startsWith(zs),y=h?p.substring(1):p,g=m&&m>f?m-f:void 0;return{modifiers:c,hasImportantModifier:h,baseClassName:y,maybePostfixModifierPosition:g}};return n?s=>n({className:s,parseClassName:i}):i},Nm=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t},Em=e=>({cache:Cm(e.cacheSize),parseClassName:Sm(e),...vm(e)}),Mm=/\s+/,Rm=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o}=t,a=[],i=e.trim().split(Mm);let s="";for(let c=i.length-1;c>=0;c-=1){const u=i[c],{modifiers:f,hasImportantModifier:m,baseClassName:p,maybePostfixModifierPosition:h}=n(u);let y=!!h,g=r(y?p.substring(0,h):p);if(!g){if(!y){s=u+(s.length>0?" "+s:s);continue}if(g=r(p),!g){s=u+(s.length>0?" "+s:s);continue}y=!1}const v=Nm(f).join(":"),w=m?v+zs:v,x=w+g;if(a.includes(x))continue;a.push(x);const b=o(g,y);for(let S=0;S<b.length;++S){const C=b[S];a.push(w+C)}s=u+(s.length>0?" "+s:s)}return s};function Pm(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=Ks(t))&&(r&&(r+=" "),r+=n);return r}const Ks=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Ks(e[r]))&&(n&&(n+=" "),n+=t);return n};function km(e,...t){let n,r,o,a=i;function i(c){const u=t.reduce((f,m)=>m(f),e());return n=Em(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=Rm(c,n);return o(c,f),f}return function(){return a(Pm.apply(null,arguments))}}const de=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},qs=/^\[(?:([a-z-]+):)?(.+)\]$/i,Om=/^\d+\/\d+$/,Im=new Set(["px","full","screen"]),Dm=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Tm=/\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$/,Am=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,_m=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,jm=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,rt=e=>Vt(e)||Im.has(e)||Om.test(e),ut=e=>qt(e,"length",Hm),Vt=e=>!!e&&!Number.isNaN(Number(e)),Xr=e=>qt(e,"number",Vt),sn=e=>!!e&&Number.isInteger(Number(e)),Fm=e=>e.endsWith("%")&&Vt(e.slice(0,-1)),re=e=>qs.test(e),dt=e=>Dm.test(e),$m=new Set(["length","size","percentage"]),Lm=e=>qt(e,$m,Xs),Wm=e=>qt(e,"position",Xs),Bm=new Set(["image","url"]),Vm=e=>qt(e,Bm,Um),Ym=e=>qt(e,"",Gm),cn=()=>!0,qt=(e,t,n)=>{const r=qs.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},Hm=e=>Tm.test(e)&&!Am.test(e),Xs=()=>!1,Gm=e=>_m.test(e),Um=e=>jm.test(e),zm=()=>{const e=de("colors"),t=de("spacing"),n=de("blur"),r=de("brightness"),o=de("borderColor"),a=de("borderRadius"),i=de("borderSpacing"),s=de("borderWidth"),c=de("contrast"),u=de("grayscale"),f=de("hueRotate"),m=de("invert"),p=de("gap"),h=de("gradientColorStops"),y=de("gradientColorStopPositions"),g=de("inset"),v=de("margin"),w=de("opacity"),x=de("padding"),b=de("saturate"),S=de("scale"),C=de("sepia"),M=de("skew"),N=de("space"),R=de("translate"),_=()=>["auto","contain","none"],A=()=>["auto","hidden","clip","visible","scroll"],$=()=>["auto",re,t],D=()=>[re,t],Y=()=>["",rt,ut],H=()=>["auto",Vt,re],J=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],j=()=>["solid","dashed","dotted","double","none"],X=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],F=()=>["start","end","center","between","around","evenly","stretch"],O=()=>["","0",re],Z=()=>["auto","avoid","all","avoid-page","page","left","right","column"],te=()=>[Vt,re];return{cacheSize:500,separator:":",theme:{colors:[cn],spacing:[rt,ut],blur:["none","",dt,re],brightness:te(),borderColor:[e],borderRadius:["none","","full",dt,re],borderSpacing:D(),borderWidth:Y(),contrast:te(),grayscale:O(),hueRotate:te(),invert:O(),gap:D(),gradientColorStops:[e],gradientColorStopPositions:[Fm,ut],inset:$(),margin:$(),opacity:te(),padding:D(),saturate:te(),scale:te(),sepia:O(),skew:te(),space:D(),translate:D()},classGroups:{aspect:[{aspect:["auto","square","video",re]}],container:["container"],columns:[{columns:[dt]}],"break-after":[{"break-after":Z()}],"break-before":[{"break-before":Z()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...J(),re]}],overflow:[{overflow:A()}],"overflow-x":[{"overflow-x":A()}],"overflow-y":[{"overflow-y":A()}],overscroll:[{overscroll:_()}],"overscroll-x":[{"overscroll-x":_()}],"overscroll-y":[{"overscroll-y":_()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[g]}],"inset-x":[{"inset-x":[g]}],"inset-y":[{"inset-y":[g]}],start:[{start:[g]}],end:[{end:[g]}],top:[{top:[g]}],right:[{right:[g]}],bottom:[{bottom:[g]}],left:[{left:[g]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",sn,re]}],basis:[{basis:$()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",re]}],grow:[{grow:O()}],shrink:[{shrink:O()}],order:[{order:["first","last","none",sn,re]}],"grid-cols":[{"grid-cols":[cn]}],"col-start-end":[{col:["auto",{span:["full",sn,re]},re]}],"col-start":[{"col-start":H()}],"col-end":[{"col-end":H()}],"grid-rows":[{"grid-rows":[cn]}],"row-start-end":[{row:["auto",{span:[sn,re]},re]}],"row-start":[{"row-start":H()}],"row-end":[{"row-end":H()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",re]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",re]}],gap:[{gap:[p]}],"gap-x":[{"gap-x":[p]}],"gap-y":[{"gap-y":[p]}],"justify-content":[{justify:["normal",...F()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...F(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...F(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[x]}],px:[{px:[x]}],py:[{py:[x]}],ps:[{ps:[x]}],pe:[{pe:[x]}],pt:[{pt:[x]}],pr:[{pr:[x]}],pb:[{pb:[x]}],pl:[{pl:[x]}],m:[{m:[v]}],mx:[{mx:[v]}],my:[{my:[v]}],ms:[{ms:[v]}],me:[{me:[v]}],mt:[{mt:[v]}],mr:[{mr:[v]}],mb:[{mb:[v]}],ml:[{ml:[v]}],"space-x":[{"space-x":[N]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[N]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",re,t]}],"min-w":[{"min-w":[re,t,"min","max","fit"]}],"max-w":[{"max-w":[re,t,"none","full","min","max","fit","prose",{screen:[dt]},dt]}],h:[{h:[re,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[re,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[re,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[re,t,"auto","min","max","fit"]}],"font-size":[{text:["base",dt,ut]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Xr]}],"font-family":[{font:[cn]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",re]}],"line-clamp":[{"line-clamp":["none",Vt,Xr]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",rt,re]}],"list-image":[{"list-image":["none",re]}],"list-style-type":[{list:["none","disc","decimal",re]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[w]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[w]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...j(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",rt,ut]}],"underline-offset":[{"underline-offset":["auto",rt,re]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:D()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",re]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",re]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[w]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...J(),Wm]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Lm]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Vm]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[y]}],"gradient-via-pos":[{via:[y]}],"gradient-to-pos":[{to:[y]}],"gradient-from":[{from:[h]}],"gradient-via":[{via:[h]}],"gradient-to":[{to:[h]}],rounded:[{rounded:[a]}],"rounded-s":[{"rounded-s":[a]}],"rounded-e":[{"rounded-e":[a]}],"rounded-t":[{"rounded-t":[a]}],"rounded-r":[{"rounded-r":[a]}],"rounded-b":[{"rounded-b":[a]}],"rounded-l":[{"rounded-l":[a]}],"rounded-ss":[{"rounded-ss":[a]}],"rounded-se":[{"rounded-se":[a]}],"rounded-ee":[{"rounded-ee":[a]}],"rounded-es":[{"rounded-es":[a]}],"rounded-tl":[{"rounded-tl":[a]}],"rounded-tr":[{"rounded-tr":[a]}],"rounded-br":[{"rounded-br":[a]}],"rounded-bl":[{"rounded-bl":[a]}],"border-w":[{border:[s]}],"border-w-x":[{"border-x":[s]}],"border-w-y":[{"border-y":[s]}],"border-w-s":[{"border-s":[s]}],"border-w-e":[{"border-e":[s]}],"border-w-t":[{"border-t":[s]}],"border-w-r":[{"border-r":[s]}],"border-w-b":[{"border-b":[s]}],"border-w-l":[{"border-l":[s]}],"border-opacity":[{"border-opacity":[w]}],"border-style":[{border:[...j(),"hidden"]}],"divide-x":[{"divide-x":[s]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[s]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[w]}],"divide-style":[{divide:j()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-s":[{"border-s":[o]}],"border-color-e":[{"border-e":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["",...j()]}],"outline-offset":[{"outline-offset":[rt,re]}],"outline-w":[{outline:[rt,ut]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:Y()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[w]}],"ring-offset-w":[{"ring-offset":[rt,ut]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",dt,Ym]}],"shadow-color":[{shadow:[cn]}],opacity:[{opacity:[w]}],"mix-blend":[{"mix-blend":[...X(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":X()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[c]}],"drop-shadow":[{"drop-shadow":["","none",dt,re]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[f]}],invert:[{invert:[m]}],saturate:[{saturate:[b]}],sepia:[{sepia:[C]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[c]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[f]}],"backdrop-invert":[{"backdrop-invert":[m]}],"backdrop-opacity":[{"backdrop-opacity":[w]}],"backdrop-saturate":[{"backdrop-saturate":[b]}],"backdrop-sepia":[{"backdrop-sepia":[C]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[i]}],"border-spacing-x":[{"border-spacing-x":[i]}],"border-spacing-y":[{"border-spacing-y":[i]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",re]}],duration:[{duration:te()}],ease:[{ease:["linear","in","out","in-out",re]}],delay:[{delay:te()}],animate:[{animate:["none","spin","ping","pulse","bounce",re]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[S]}],"scale-x":[{"scale-x":[S]}],"scale-y":[{"scale-y":[S]}],rotate:[{rotate:[sn,re]}],"translate-x":[{"translate-x":[R]}],"translate-y":[{"translate-y":[R]}],"skew-x":[{"skew-x":[M]}],"skew-y":[{"skew-y":[M]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",re]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",re]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":D()}],"scroll-mx":[{"scroll-mx":D()}],"scroll-my":[{"scroll-my":D()}],"scroll-ms":[{"scroll-ms":D()}],"scroll-me":[{"scroll-me":D()}],"scroll-mt":[{"scroll-mt":D()}],"scroll-mr":[{"scroll-mr":D()}],"scroll-mb":[{"scroll-mb":D()}],"scroll-ml":[{"scroll-ml":D()}],"scroll-p":[{"scroll-p":D()}],"scroll-px":[{"scroll-px":D()}],"scroll-py":[{"scroll-py":D()}],"scroll-ps":[{"scroll-ps":D()}],"scroll-pe":[{"scroll-pe":D()}],"scroll-pt":[{"scroll-pt":D()}],"scroll-pr":[{"scroll-pr":D()}],"scroll-pb":[{"scroll-pb":D()}],"scroll-pl":[{"scroll-pl":D()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",re]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[rt,ut,Xr]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},Km=km(zm);function k(...e){return Km(Gs(e))}const ge=(e,...t)=>String.raw({raw:e},...t);function qm(e,t){const n=l.createContext(t),r=a=>{const{children:i,...s}=a,c=l.useMemo(()=>s,Object.values(s));return d.jsx(n.Provider,{value:c,children:i})};r.displayName=e+"Provider";function o(a){const i=l.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 ve(e,t=[]){let n=[];function r(a,i){const s=l.createContext(i),c=n.length;n=[...n,i];const u=m=>{var w;const{scope:p,children:h,...y}=m,g=((w=p==null?void 0:p[e])==null?void 0:w[c])||s,v=l.useMemo(()=>y,Object.values(y));return d.jsx(g.Provider,{value:v,children:h})};u.displayName=a+"Provider";function f(m,p){var g;const h=((g=p==null?void 0:p[e])==null?void 0:g[c])||s,y=l.useContext(h);if(y)return y;if(i!==void 0)return i;throw new Error(`\`${m}\` must be used within \`${a}\``)}return[u,f]}const o=()=>{const a=n.map(i=>l.createContext(i));return function(s){const c=(s==null?void 0:s[e])||a;return l.useMemo(()=>({[`__scope${e}`]:{...s,[e]:c}}),[s,c])}};return o.scopeName=e,[r,Xm(o,...t)]}function Xm(...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 m=c(a)[`__scope${u}`];return{...s,...m}},{});return l.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}function qa(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Xe(...e){return t=>{let n=!1;const r=e.map(o=>{const a=qa(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():qa(e[o],null)}}}}function q(...e){return l.useCallback(Xe(...e),e)}function ht(e){const t=Qm(e),n=l.forwardRef((r,o)=>{const{children:a,...i}=r,s=l.Children.toArray(a),c=s.find(ep);if(c){const u=c.props.children,f=s.map(m=>m===c?l.Children.count(u)>1?l.Children.only(null):l.isValidElement(u)?u.props.children:null:m);return d.jsx(t,{...i,ref:o,children:l.isValidElement(u)?l.cloneElement(u,void 0,f):null})}return d.jsx(t,{...i,ref:o,children:a})});return n.displayName=`${e}.Slot`,n}var Zm=ht("Slot");function Qm(e){const t=l.forwardRef((n,r)=>{const{children:o,...a}=n;if(l.isValidElement(o)){const i=np(o),s=tp(a,o.props);return o.type!==l.Fragment&&(s.ref=r?Xe(r,i):i),l.cloneElement(o,s)}return l.Children.count(o)>1?l.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Jm=Symbol("radix.slottable");function ep(e){return l.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Jm}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)=>{a(...s),o(...s)}:o&&(n[r]=o):r==="style"?n[r]={...o,...a}:r==="className"&&(n[r]=[o,a].filter(Boolean).join(" "))}return{...e,...n}}function np(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 Mn(e){const t=e+"CollectionProvider",[n,r]=ve(t),[o,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),i=g=>{const{scope:v,children:w}=g,x=E.useRef(null),b=E.useRef(new Map).current;return d.jsx(o,{scope:v,itemMap:b,collectionRef:x,children:w})};i.displayName=t;const s=e+"CollectionSlot",c=ht(s),u=E.forwardRef((g,v)=>{const{scope:w,children:x}=g,b=a(s,w),S=q(v,b.collectionRef);return d.jsx(c,{ref:S,children:x})});u.displayName=s;const f=e+"CollectionItemSlot",m="data-radix-collection-item",p=ht(f),h=E.forwardRef((g,v)=>{const{scope:w,children:x,...b}=g,S=E.useRef(null),C=q(v,S),M=a(f,w);return E.useEffect(()=>(M.itemMap.set(S,{ref:S,...b}),()=>void M.itemMap.delete(S))),d.jsx(p,{[m]:"",ref:C,children:x})});h.displayName=f;function y(g){const v=a(e+"CollectionConsumer",g);return E.useCallback(()=>{const x=v.collectionRef.current;if(!x)return[];const b=Array.from(x.querySelectorAll(`[${m}]`));return Array.from(v.itemMap.values()).sort((M,N)=>b.indexOf(M.ref.current)-b.indexOf(N.ref.current))},[v.collectionRef,v.itemMap])}return[{Provider:i,Slot:u,ItemSlot:h},y,r]}function I(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 fe=globalThis!=null&&globalThis.document?l.useLayoutEffect:()=>{},rp=l[" useInsertionEffect ".trim().toString()]||fe;function Ce({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,a,i]=op({defaultProp:t,onChange:n}),s=e!==void 0,c=s?e:o;{const f=l.useRef(e!==void 0);l.useEffect(()=>{const m=f.current;m!==s&&console.warn(`${r} is changing from ${m?"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=l.useCallback(f=>{var m;if(s){const p=ap(f)?f(e):f;p!==e&&((m=i.current)==null||m.call(i,p))}else a(f)},[s,e,a,i]);return[c,u]}function op({defaultProp:e,onChange:t}){const[n,r]=l.useState(e),o=l.useRef(n),a=l.useRef(t);return rp(()=>{a.current=t},[t]),l.useEffect(()=>{var i;o.current!==n&&((i=a.current)==null||i.call(a,n),o.current=n)},[n,o]),[n,r,a]}function ap(e){return typeof e=="function"}var sp=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],V=sp.reduce((e,t)=>{const n=ht(`Primitive.${t}`),r=l.forwardRef((o,a)=>{const{asChild:i,...s}=o,c=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),d.jsx(c,{...s,ref:a})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Zs(e,t){e&&En.flushSync(()=>e.dispatchEvent(t))}function ip(e,t){return l.useReducer((n,r)=>t[n][r]??n,e)}var Qs=e=>{const{present:t,children:n}=e,r=cp(t),o=typeof n=="function"?n({present:r.isPresent}):l.Children.only(n),a=q(r.ref,lp(o));return typeof n=="function"||r.isPresent?l.cloneElement(o,{ref:a}):null};Qs.displayName="Presence";function cp(e){const[t,n]=l.useState(),r=l.useRef(null),o=l.useRef(e),a=l.useRef("none"),i=e?"mounted":"unmounted",[s,c]=ip(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return l.useEffect(()=>{const u=Hn(r.current);a.current=s==="mounted"?u:"none"},[s]),fe(()=>{const u=r.current,f=o.current;if(f!==e){const p=a.current,h=Hn(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]),fe(()=>{if(t){let u;const f=t.ownerDocument.defaultView??window,m=h=>{const g=Hn(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=Hn(r.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",m),t.addEventListener("animationend",m),()=>{f.clearTimeout(u),t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",m),t.removeEventListener("animationend",m)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:l.useCallback(u=>{r.current=u?getComputedStyle(u):null,n(u)},[])}}function Hn(e){return(e==null?void 0:e.animationName)||"none"}function lp(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 up=l[" useId ".trim().toString()]||(()=>{}),dp=0;function he(e){const[t,n]=l.useState(up());return fe(()=>{n(r=>r??String(dp++))},[e]),e||(t?`radix-${t}`:"")}var dr="Collapsible",[fp,Js]=ve(dr),[mp,Yo]=fp(dr),ei=l.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:o,disabled:a,onOpenChange:i,...s}=e,[c,u]=Ce({prop:r,defaultProp:o??!1,onChange:i,caller:dr});return d.jsx(mp,{scope:n,disabled:a,contentId:he(),open:c,onOpenToggle:l.useCallback(()=>u(f=>!f),[u]),children:d.jsx(V.div,{"data-state":Go(c),"data-disabled":a?"":void 0,...s,ref:t})})});ei.displayName=dr;var ti="CollapsibleTrigger",ni=l.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,o=Yo(ti,n);return d.jsx(V.button,{type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":Go(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled,...r,ref:t,onClick:I(e.onClick,o.onOpenToggle)})});ni.displayName=ti;var Ho="CollapsibleContent",ri=l.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=Yo(Ho,e.__scopeCollapsible);return d.jsx(Qs,{present:n||o.open,children:({present:a})=>d.jsx(pp,{...r,ref:t,present:a})})});ri.displayName=Ho;var pp=l.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:o,...a}=e,i=Yo(Ho,n),[s,c]=l.useState(r),u=l.useRef(null),f=q(t,u),m=l.useRef(0),p=m.current,h=l.useRef(0),y=h.current,g=i.open||s,v=l.useRef(g),w=l.useRef(void 0);return l.useEffect(()=>{const x=requestAnimationFrame(()=>v.current=!1);return()=>cancelAnimationFrame(x)},[]),fe(()=>{const x=u.current;if(x){w.current=w.current||{transitionDuration:x.style.transitionDuration,animationName:x.style.animationName},x.style.transitionDuration="0s",x.style.animationName="none";const b=x.getBoundingClientRect();m.current=b.height,h.current=b.width,v.current||(x.style.transitionDuration=w.current.transitionDuration,x.style.animationName=w.current.animationName),c(r)}},[i.open,r]),d.jsx(V.div,{"data-state":Go(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":y?`${y}px`:void 0,...e.style},children:g&&o})});function Go(e){return e?"open":"closed"}var hp=ei,gp=ni,vp=ri,yp=l.createContext(void 0);function xt(e){const t=l.useContext(yp);return e||t||"ltr"}var Be="Accordion",bp=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[Uo,xp,wp]=Mn(Be),[fr,KN]=ve(Be,[wp,Js]),zo=Js(),oi=E.forwardRef((e,t)=>{const{type:n,...r}=e,o=r,a=r;return d.jsx(Uo.Provider,{scope:e.__scopeAccordion,children:n==="multiple"?d.jsx(Ep,{...a,ref:t}):d.jsx(Np,{...o,ref:t})})});oi.displayName=Be;var[ai,Cp]=fr(Be),[si,Sp]=fr(Be,{collapsible:!1}),Np=E.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},collapsible:a=!1,...i}=e,[s,c]=Ce({prop:n,defaultProp:r??"",onChange:o,caller:Be});return d.jsx(ai,{scope:e.__scopeAccordion,value:E.useMemo(()=>s?[s]:[],[s]),onItemOpen:c,onItemClose:E.useCallback(()=>a&&c(""),[a,c]),children:d.jsx(si,{scope:e.__scopeAccordion,collapsible:a,children:d.jsx(ii,{...i,ref:t})})})}),Ep=E.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},...a}=e,[i,s]=Ce({prop:n,defaultProp:r??[],onChange:o,caller:Be}),c=E.useCallback(f=>s((m=[])=>[...m,f]),[s]),u=E.useCallback(f=>s((m=[])=>m.filter(p=>p!==f)),[s]);return d.jsx(ai,{scope:e.__scopeAccordion,value:i,onItemOpen:c,onItemClose:u,children:d.jsx(si,{scope:e.__scopeAccordion,collapsible:!0,children:d.jsx(ii,{...a,ref:t})})})}),[Mp,mr]=fr(Be),ii=E.forwardRef((e,t)=>{const{__scopeAccordion:n,disabled:r,dir:o,orientation:a="vertical",...i}=e,s=E.useRef(null),c=q(s,t),u=xp(n),m=xt(o)==="ltr",p=I(e.onKeyDown,h=>{var R;if(!bp.includes(h.key))return;const y=h.target,g=u().filter(_=>{var A;return!((A=_.ref.current)!=null&&A.disabled)}),v=g.findIndex(_=>_.ref.current===y),w=g.length;if(v===-1)return;h.preventDefault();let x=v;const b=0,S=w-1,C=()=>{x=v+1,x>S&&(x=b)},M=()=>{x=v-1,x<b&&(x=S)};switch(h.key){case"Home":x=b;break;case"End":x=S;break;case"ArrowRight":a==="horizontal"&&(m?C():M());break;case"ArrowDown":a==="vertical"&&C();break;case"ArrowLeft":a==="horizontal"&&(m?M():C());break;case"ArrowUp":a==="vertical"&&M();break}const N=x%w;(R=g[N].ref.current)==null||R.focus()});return d.jsx(Mp,{scope:n,disabled:r,direction:o,orientation:a,children:d.jsx(Uo.Slot,{scope:n,children:d.jsx(V.div,{...i,"data-orientation":a,ref:c,onKeyDown:r?void 0:p})})})}),nr="AccordionItem",[Rp,Ko]=fr(nr),ci=E.forwardRef((e,t)=>{const{__scopeAccordion:n,value:r,...o}=e,a=mr(nr,n),i=Cp(nr,n),s=zo(n),c=he(),u=r&&i.value.includes(r)||!1,f=a.disabled||e.disabled;return d.jsx(Rp,{scope:n,open:u,disabled:f,triggerId:c,children:d.jsx(hp,{"data-orientation":a.orientation,"data-state":pi(u),...s,...o,ref:t,disabled:f,open:u,onOpenChange:m=>{m?i.onItemOpen(r):i.onItemClose(r)}})})});ci.displayName=nr;var li="AccordionHeader",ui=E.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=mr(Be,n),a=Ko(li,n);return d.jsx(V.h3,{"data-orientation":o.orientation,"data-state":pi(a.open),"data-disabled":a.disabled?"":void 0,...r,ref:t})});ui.displayName=li;var bo="AccordionTrigger",di=E.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=mr(Be,n),a=Ko(bo,n),i=Sp(bo,n),s=zo(n);return d.jsx(Uo.ItemSlot,{scope:n,children:d.jsx(gp,{"aria-disabled":a.open&&!i.collapsible||void 0,"data-orientation":o.orientation,id:a.triggerId,...s,...r,ref:t})})});di.displayName=bo;var fi="AccordionContent",mi=E.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=mr(Be,n),a=Ko(fi,n),i=zo(n);return d.jsx(vp,{role:"region","aria-labelledby":a.triggerId,"data-orientation":o.orientation,...i,...r,ref:t,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...e.style}})});mi.displayName=fi;function pi(e){return e?"open":"closed"}var Xa=oi,Pp=ci,kp=ui,Op=di,Ip=mi;/**
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("react/jsx-runtime"),E=require("react"),Vs=require("react-dom");function Ys(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 l=Ys(E),En=Ys(Vs);function Hs(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=Hs(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Gs(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Hs(e))&&(r&&(r+=" "),r+=t);return r}const Vo="-",ym=e=>{const t=xm(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:i=>{const s=i.split(Vo);return s[0]===""&&s.length!==1&&s.shift(),Us(s,t)||bm(i)},getConflictingClassGroupIds:(i,s)=>{const c=n[i]||[];return s&&r[i]?[...c,...r[i]]:c}}},Us=(e,t)=>{var i;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?Us(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const a=e.join(Vo);return(i=t.validators.find(({validator:s})=>s(a)))==null?void 0:i.classGroupId},za=/^\[(.+)\]$/,bm=e=>{if(za.test(e)){const t=za.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},xm=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return Cm(Object.entries(e.classGroups),n).forEach(([a,i])=>{yo(i,r,a,t)}),r},yo=(e,t,n,r)=>{e.forEach(o=>{if(typeof o=="string"){const a=o===""?t:Ka(t,o);a.classGroupId=n;return}if(typeof o=="function"){if(wm(o)){yo(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([a,i])=>{yo(i,Ka(t,a),n,r)})})},Ka=(e,t)=>{let n=e;return t.split(Vo).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},wm=e=>e.isThemeGetter,Cm=(e,t)=>t?e.map(([n,r])=>{const o=r.map(a=>typeof a=="string"?t+a:typeof a=="object"?Object.fromEntries(Object.entries(a).map(([i,s])=>[t+i,s])):a);return[n,o]}):e,Sm=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)}}},zs="!",Nm=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,o=t[0],a=t.length,i=s=>{const c=[];let u=0,f=0,m;for(let v=0;v<s.length;v++){let w=s[v];if(u===0){if(w===o&&(r||s.slice(v,v+a)===t)){c.push(s.slice(f,v)),f=v+a;continue}if(w==="/"){m=v;continue}}w==="["?u++:w==="]"&&u--}const p=c.length===0?s:s.substring(f),h=p.startsWith(zs),y=h?p.substring(1):p,g=m&&m>f?m-f:void 0;return{modifiers:c,hasImportantModifier:h,baseClassName:y,maybePostfixModifierPosition:g}};return n?s=>n({className:s,parseClassName:i}):i},Em=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach(r=>{r[0]==="["?(t.push(...n.sort(),r),n=[]):n.push(r)}),t.push(...n.sort()),t},Mm=e=>({cache:Sm(e.cacheSize),parseClassName:Nm(e),...ym(e)}),Rm=/\s+/,Pm=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o}=t,a=[],i=e.trim().split(Rm);let s="";for(let c=i.length-1;c>=0;c-=1){const u=i[c],{modifiers:f,hasImportantModifier:m,baseClassName:p,maybePostfixModifierPosition:h}=n(u);let y=!!h,g=r(y?p.substring(0,h):p);if(!g){if(!y){s=u+(s.length>0?" "+s:s);continue}if(g=r(p),!g){s=u+(s.length>0?" "+s:s);continue}y=!1}const v=Em(f).join(":"),w=m?v+zs:v,x=w+g;if(a.includes(x))continue;a.push(x);const b=o(g,y);for(let S=0;S<b.length;++S){const C=b[S];a.push(w+C)}s=u+(s.length>0?" "+s:s)}return s};function km(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=Ks(t))&&(r&&(r+=" "),r+=n);return r}const Ks=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Ks(e[r]))&&(n&&(n+=" "),n+=t);return n};function Om(e,...t){let n,r,o,a=i;function i(c){const u=t.reduce((f,m)=>m(f),e());return n=Mm(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=Pm(c,n);return o(c,f),f}return function(){return a(km.apply(null,arguments))}}const de=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},qs=/^\[(?:([a-z-]+):)?(.+)\]$/i,Im=/^\d+\/\d+$/,Dm=new Set(["px","full","screen"]),Tm=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Am=/\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$/,_m=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,jm=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Fm=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,rt=e=>Vt(e)||Dm.has(e)||Im.test(e),ut=e=>qt(e,"length",Gm),Vt=e=>!!e&&!Number.isNaN(Number(e)),Xr=e=>qt(e,"number",Vt),sn=e=>!!e&&Number.isInteger(Number(e)),$m=e=>e.endsWith("%")&&Vt(e.slice(0,-1)),re=e=>qs.test(e),dt=e=>Tm.test(e),Lm=new Set(["length","size","percentage"]),Wm=e=>qt(e,Lm,Xs),Bm=e=>qt(e,"position",Xs),Vm=new Set(["image","url"]),Ym=e=>qt(e,Vm,zm),Hm=e=>qt(e,"",Um),cn=()=>!0,qt=(e,t,n)=>{const r=qs.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},Gm=e=>Am.test(e)&&!_m.test(e),Xs=()=>!1,Um=e=>jm.test(e),zm=e=>Fm.test(e),Km=()=>{const e=de("colors"),t=de("spacing"),n=de("blur"),r=de("brightness"),o=de("borderColor"),a=de("borderRadius"),i=de("borderSpacing"),s=de("borderWidth"),c=de("contrast"),u=de("grayscale"),f=de("hueRotate"),m=de("invert"),p=de("gap"),h=de("gradientColorStops"),y=de("gradientColorStopPositions"),g=de("inset"),v=de("margin"),w=de("opacity"),x=de("padding"),b=de("saturate"),S=de("scale"),C=de("sepia"),M=de("skew"),N=de("space"),R=de("translate"),_=()=>["auto","contain","none"],A=()=>["auto","hidden","clip","visible","scroll"],$=()=>["auto",re,t],D=()=>[re,t],Y=()=>["",rt,ut],H=()=>["auto",Vt,re],J=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],j=()=>["solid","dashed","dotted","double","none"],X=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],F=()=>["start","end","center","between","around","evenly","stretch"],O=()=>["","0",re],Z=()=>["auto","avoid","all","avoid-page","page","left","right","column"],te=()=>[Vt,re];return{cacheSize:500,separator:":",theme:{colors:[cn],spacing:[rt,ut],blur:["none","",dt,re],brightness:te(),borderColor:[e],borderRadius:["none","","full",dt,re],borderSpacing:D(),borderWidth:Y(),contrast:te(),grayscale:O(),hueRotate:te(),invert:O(),gap:D(),gradientColorStops:[e],gradientColorStopPositions:[$m,ut],inset:$(),margin:$(),opacity:te(),padding:D(),saturate:te(),scale:te(),sepia:O(),skew:te(),space:D(),translate:D()},classGroups:{aspect:[{aspect:["auto","square","video",re]}],container:["container"],columns:[{columns:[dt]}],"break-after":[{"break-after":Z()}],"break-before":[{"break-before":Z()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:[...J(),re]}],overflow:[{overflow:A()}],"overflow-x":[{"overflow-x":A()}],"overflow-y":[{"overflow-y":A()}],overscroll:[{overscroll:_()}],"overscroll-x":[{"overscroll-x":_()}],"overscroll-y":[{"overscroll-y":_()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[g]}],"inset-x":[{"inset-x":[g]}],"inset-y":[{"inset-y":[g]}],start:[{start:[g]}],end:[{end:[g]}],top:[{top:[g]}],right:[{right:[g]}],bottom:[{bottom:[g]}],left:[{left:[g]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",sn,re]}],basis:[{basis:$()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",re]}],grow:[{grow:O()}],shrink:[{shrink:O()}],order:[{order:["first","last","none",sn,re]}],"grid-cols":[{"grid-cols":[cn]}],"col-start-end":[{col:["auto",{span:["full",sn,re]},re]}],"col-start":[{"col-start":H()}],"col-end":[{"col-end":H()}],"grid-rows":[{"grid-rows":[cn]}],"row-start-end":[{row:["auto",{span:[sn,re]},re]}],"row-start":[{"row-start":H()}],"row-end":[{"row-end":H()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",re]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",re]}],gap:[{gap:[p]}],"gap-x":[{"gap-x":[p]}],"gap-y":[{"gap-y":[p]}],"justify-content":[{justify:["normal",...F()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...F(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...F(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[x]}],px:[{px:[x]}],py:[{py:[x]}],ps:[{ps:[x]}],pe:[{pe:[x]}],pt:[{pt:[x]}],pr:[{pr:[x]}],pb:[{pb:[x]}],pl:[{pl:[x]}],m:[{m:[v]}],mx:[{mx:[v]}],my:[{my:[v]}],ms:[{ms:[v]}],me:[{me:[v]}],mt:[{mt:[v]}],mr:[{mr:[v]}],mb:[{mb:[v]}],ml:[{ml:[v]}],"space-x":[{"space-x":[N]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[N]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",re,t]}],"min-w":[{"min-w":[re,t,"min","max","fit"]}],"max-w":[{"max-w":[re,t,"none","full","min","max","fit","prose",{screen:[dt]},dt]}],h:[{h:[re,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[re,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[re,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[re,t,"auto","min","max","fit"]}],"font-size":[{text:["base",dt,ut]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Xr]}],"font-family":[{font:[cn]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:["tighter","tight","normal","wide","wider","widest",re]}],"line-clamp":[{"line-clamp":["none",Vt,Xr]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",rt,re]}],"list-image":[{"list-image":["none",re]}],"list-style-type":[{list:["none","disc","decimal",re]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[w]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[w]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...j(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",rt,ut]}],"underline-offset":[{"underline-offset":["auto",rt,re]}],"text-decoration-color":[{decoration:[e]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:D()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",re]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",re]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[w]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...J(),Bm]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Wm]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Ym]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[y]}],"gradient-via-pos":[{via:[y]}],"gradient-to-pos":[{to:[y]}],"gradient-from":[{from:[h]}],"gradient-via":[{via:[h]}],"gradient-to":[{to:[h]}],rounded:[{rounded:[a]}],"rounded-s":[{"rounded-s":[a]}],"rounded-e":[{"rounded-e":[a]}],"rounded-t":[{"rounded-t":[a]}],"rounded-r":[{"rounded-r":[a]}],"rounded-b":[{"rounded-b":[a]}],"rounded-l":[{"rounded-l":[a]}],"rounded-ss":[{"rounded-ss":[a]}],"rounded-se":[{"rounded-se":[a]}],"rounded-ee":[{"rounded-ee":[a]}],"rounded-es":[{"rounded-es":[a]}],"rounded-tl":[{"rounded-tl":[a]}],"rounded-tr":[{"rounded-tr":[a]}],"rounded-br":[{"rounded-br":[a]}],"rounded-bl":[{"rounded-bl":[a]}],"border-w":[{border:[s]}],"border-w-x":[{"border-x":[s]}],"border-w-y":[{"border-y":[s]}],"border-w-s":[{"border-s":[s]}],"border-w-e":[{"border-e":[s]}],"border-w-t":[{"border-t":[s]}],"border-w-r":[{"border-r":[s]}],"border-w-b":[{"border-b":[s]}],"border-w-l":[{"border-l":[s]}],"border-opacity":[{"border-opacity":[w]}],"border-style":[{border:[...j(),"hidden"]}],"divide-x":[{"divide-x":[s]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[s]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[w]}],"divide-style":[{divide:j()}],"border-color":[{border:[o]}],"border-color-x":[{"border-x":[o]}],"border-color-y":[{"border-y":[o]}],"border-color-s":[{"border-s":[o]}],"border-color-e":[{"border-e":[o]}],"border-color-t":[{"border-t":[o]}],"border-color-r":[{"border-r":[o]}],"border-color-b":[{"border-b":[o]}],"border-color-l":[{"border-l":[o]}],"divide-color":[{divide:[o]}],"outline-style":[{outline:["",...j()]}],"outline-offset":[{"outline-offset":[rt,re]}],"outline-w":[{outline:[rt,ut]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:Y()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[w]}],"ring-offset-w":[{"ring-offset":[rt,ut]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",dt,Hm]}],"shadow-color":[{shadow:[cn]}],opacity:[{opacity:[w]}],"mix-blend":[{"mix-blend":[...X(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":X()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[c]}],"drop-shadow":[{"drop-shadow":["","none",dt,re]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[f]}],invert:[{invert:[m]}],saturate:[{saturate:[b]}],sepia:[{sepia:[C]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[c]}],"backdrop-grayscale":[{"backdrop-grayscale":[u]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[f]}],"backdrop-invert":[{"backdrop-invert":[m]}],"backdrop-opacity":[{"backdrop-opacity":[w]}],"backdrop-saturate":[{"backdrop-saturate":[b]}],"backdrop-sepia":[{"backdrop-sepia":[C]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[i]}],"border-spacing-x":[{"border-spacing-x":[i]}],"border-spacing-y":[{"border-spacing-y":[i]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",re]}],duration:[{duration:te()}],ease:[{ease:["linear","in","out","in-out",re]}],delay:[{delay:te()}],animate:[{animate:["none","spin","ping","pulse","bounce",re]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[S]}],"scale-x":[{"scale-x":[S]}],"scale-y":[{"scale-y":[S]}],rotate:[{rotate:[sn,re]}],"translate-x":[{"translate-x":[R]}],"translate-y":[{"translate-y":[R]}],"skew-x":[{"skew-x":[M]}],"skew-y":[{"skew-y":[M]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",re]}],accent:[{accent:["auto",e]}],appearance:[{appearance:["none","auto"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",re]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":D()}],"scroll-mx":[{"scroll-mx":D()}],"scroll-my":[{"scroll-my":D()}],"scroll-ms":[{"scroll-ms":D()}],"scroll-me":[{"scroll-me":D()}],"scroll-mt":[{"scroll-mt":D()}],"scroll-mr":[{"scroll-mr":D()}],"scroll-mb":[{"scroll-mb":D()}],"scroll-ml":[{"scroll-ml":D()}],"scroll-p":[{"scroll-p":D()}],"scroll-px":[{"scroll-px":D()}],"scroll-py":[{"scroll-py":D()}],"scroll-ps":[{"scroll-ps":D()}],"scroll-pe":[{"scroll-pe":D()}],"scroll-pt":[{"scroll-pt":D()}],"scroll-pr":[{"scroll-pr":D()}],"scroll-pb":[{"scroll-pb":D()}],"scroll-pl":[{"scroll-pl":D()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",re]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[rt,ut,Xr]}],stroke:[{stroke:[e,"none"]}],sr:["sr-only","not-sr-only"],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]}}},qm=Om(Km);function k(...e){return qm(Gs(e))}const ge=(e,...t)=>String.raw({raw:e},...t);function Xm(e,t){const n=l.createContext(t),r=a=>{const{children:i,...s}=a,c=l.useMemo(()=>s,Object.values(s));return d.jsx(n.Provider,{value:c,children:i})};r.displayName=e+"Provider";function o(a){const i=l.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 ve(e,t=[]){let n=[];function r(a,i){const s=l.createContext(i),c=n.length;n=[...n,i];const u=m=>{var w;const{scope:p,children:h,...y}=m,g=((w=p==null?void 0:p[e])==null?void 0:w[c])||s,v=l.useMemo(()=>y,Object.values(y));return d.jsx(g.Provider,{value:v,children:h})};u.displayName=a+"Provider";function f(m,p){var g;const h=((g=p==null?void 0:p[e])==null?void 0:g[c])||s,y=l.useContext(h);if(y)return y;if(i!==void 0)return i;throw new Error(`\`${m}\` must be used within \`${a}\``)}return[u,f]}const o=()=>{const a=n.map(i=>l.createContext(i));return function(s){const c=(s==null?void 0:s[e])||a;return l.useMemo(()=>({[`__scope${e}`]:{...s,[e]:c}}),[s,c])}};return o.scopeName=e,[r,Zm(o,...t)]}function Zm(...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 m=c(a)[`__scope${u}`];return{...s,...m}},{});return l.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}function qa(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Xe(...e){return t=>{let n=!1;const r=e.map(o=>{const a=qa(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():qa(e[o],null)}}}}function q(...e){return l.useCallback(Xe(...e),e)}function ht(e){const t=Jm(e),n=l.forwardRef((r,o)=>{const{children:a,...i}=r,s=l.Children.toArray(a),c=s.find(tp);if(c){const u=c.props.children,f=s.map(m=>m===c?l.Children.count(u)>1?l.Children.only(null):l.isValidElement(u)?u.props.children:null:m);return d.jsx(t,{...i,ref:o,children:l.isValidElement(u)?l.cloneElement(u,void 0,f):null})}return d.jsx(t,{...i,ref:o,children:a})});return n.displayName=`${e}.Slot`,n}var Qm=ht("Slot");function Jm(e){const t=l.forwardRef((n,r)=>{const{children:o,...a}=n;if(l.isValidElement(o)){const i=rp(o),s=np(a,o.props);return o.type!==l.Fragment&&(s.ref=r?Xe(r,i):i),l.cloneElement(o,s)}return l.Children.count(o)>1?l.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var ep=Symbol("radix.slottable");function tp(e){return l.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===ep}function np(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)=>{a(...s),o(...s)}:o&&(n[r]=o):r==="style"?n[r]={...o,...a}:r==="className"&&(n[r]=[o,a].filter(Boolean).join(" "))}return{...e,...n}}function rp(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 Mn(e){const t=e+"CollectionProvider",[n,r]=ve(t),[o,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),i=g=>{const{scope:v,children:w}=g,x=E.useRef(null),b=E.useRef(new Map).current;return d.jsx(o,{scope:v,itemMap:b,collectionRef:x,children:w})};i.displayName=t;const s=e+"CollectionSlot",c=ht(s),u=E.forwardRef((g,v)=>{const{scope:w,children:x}=g,b=a(s,w),S=q(v,b.collectionRef);return d.jsx(c,{ref:S,children:x})});u.displayName=s;const f=e+"CollectionItemSlot",m="data-radix-collection-item",p=ht(f),h=E.forwardRef((g,v)=>{const{scope:w,children:x,...b}=g,S=E.useRef(null),C=q(v,S),M=a(f,w);return E.useEffect(()=>(M.itemMap.set(S,{ref:S,...b}),()=>void M.itemMap.delete(S))),d.jsx(p,{[m]:"",ref:C,children:x})});h.displayName=f;function y(g){const v=a(e+"CollectionConsumer",g);return E.useCallback(()=>{const x=v.collectionRef.current;if(!x)return[];const b=Array.from(x.querySelectorAll(`[${m}]`));return Array.from(v.itemMap.values()).sort((M,N)=>b.indexOf(M.ref.current)-b.indexOf(N.ref.current))},[v.collectionRef,v.itemMap])}return[{Provider:i,Slot:u,ItemSlot:h},y,r]}function I(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 fe=globalThis!=null&&globalThis.document?l.useLayoutEffect:()=>{},op=l[" useInsertionEffect ".trim().toString()]||fe;function Ce({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,a,i]=ap({defaultProp:t,onChange:n}),s=e!==void 0,c=s?e:o;{const f=l.useRef(e!==void 0);l.useEffect(()=>{const m=f.current;m!==s&&console.warn(`${r} is changing from ${m?"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=l.useCallback(f=>{var m;if(s){const p=sp(f)?f(e):f;p!==e&&((m=i.current)==null||m.call(i,p))}else a(f)},[s,e,a,i]);return[c,u]}function ap({defaultProp:e,onChange:t}){const[n,r]=l.useState(e),o=l.useRef(n),a=l.useRef(t);return op(()=>{a.current=t},[t]),l.useEffect(()=>{var i;o.current!==n&&((i=a.current)==null||i.call(a,n),o.current=n)},[n,o]),[n,r,a]}function sp(e){return typeof e=="function"}var ip=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],V=ip.reduce((e,t)=>{const n=ht(`Primitive.${t}`),r=l.forwardRef((o,a)=>{const{asChild:i,...s}=o,c=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),d.jsx(c,{...s,ref:a})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Zs(e,t){e&&En.flushSync(()=>e.dispatchEvent(t))}function cp(e,t){return l.useReducer((n,r)=>t[n][r]??n,e)}var Qs=e=>{const{present:t,children:n}=e,r=lp(t),o=typeof n=="function"?n({present:r.isPresent}):l.Children.only(n),a=q(r.ref,up(o));return typeof n=="function"||r.isPresent?l.cloneElement(o,{ref:a}):null};Qs.displayName="Presence";function lp(e){const[t,n]=l.useState(),r=l.useRef(null),o=l.useRef(e),a=l.useRef("none"),i=e?"mounted":"unmounted",[s,c]=cp(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return l.useEffect(()=>{const u=Hn(r.current);a.current=s==="mounted"?u:"none"},[s]),fe(()=>{const u=r.current,f=o.current;if(f!==e){const p=a.current,h=Hn(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]),fe(()=>{if(t){let u;const f=t.ownerDocument.defaultView??window,m=h=>{const g=Hn(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=Hn(r.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",m),t.addEventListener("animationend",m),()=>{f.clearTimeout(u),t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",m),t.removeEventListener("animationend",m)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:l.useCallback(u=>{r.current=u?getComputedStyle(u):null,n(u)},[])}}function Hn(e){return(e==null?void 0:e.animationName)||"none"}function up(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 dp=l[" useId ".trim().toString()]||(()=>{}),fp=0;function he(e){const[t,n]=l.useState(dp());return fe(()=>{n(r=>r??String(fp++))},[e]),e||(t?`radix-${t}`:"")}var dr="Collapsible",[mp,Js]=ve(dr),[pp,Yo]=mp(dr),ei=l.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:o,disabled:a,onOpenChange:i,...s}=e,[c,u]=Ce({prop:r,defaultProp:o??!1,onChange:i,caller:dr});return d.jsx(pp,{scope:n,disabled:a,contentId:he(),open:c,onOpenToggle:l.useCallback(()=>u(f=>!f),[u]),children:d.jsx(V.div,{"data-state":Go(c),"data-disabled":a?"":void 0,...s,ref:t})})});ei.displayName=dr;var ti="CollapsibleTrigger",ni=l.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,o=Yo(ti,n);return d.jsx(V.button,{type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":Go(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled,...r,ref:t,onClick:I(e.onClick,o.onOpenToggle)})});ni.displayName=ti;var Ho="CollapsibleContent",ri=l.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=Yo(Ho,e.__scopeCollapsible);return d.jsx(Qs,{present:n||o.open,children:({present:a})=>d.jsx(hp,{...r,ref:t,present:a})})});ri.displayName=Ho;var hp=l.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:o,...a}=e,i=Yo(Ho,n),[s,c]=l.useState(r),u=l.useRef(null),f=q(t,u),m=l.useRef(0),p=m.current,h=l.useRef(0),y=h.current,g=i.open||s,v=l.useRef(g),w=l.useRef(void 0);return l.useEffect(()=>{const x=requestAnimationFrame(()=>v.current=!1);return()=>cancelAnimationFrame(x)},[]),fe(()=>{const x=u.current;if(x){w.current=w.current||{transitionDuration:x.style.transitionDuration,animationName:x.style.animationName},x.style.transitionDuration="0s",x.style.animationName="none";const b=x.getBoundingClientRect();m.current=b.height,h.current=b.width,v.current||(x.style.transitionDuration=w.current.transitionDuration,x.style.animationName=w.current.animationName),c(r)}},[i.open,r]),d.jsx(V.div,{"data-state":Go(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":y?`${y}px`:void 0,...e.style},children:g&&o})});function Go(e){return e?"open":"closed"}var gp=ei,vp=ni,yp=ri,bp=l.createContext(void 0);function xt(e){const t=l.useContext(bp);return e||t||"ltr"}var Be="Accordion",xp=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[Uo,wp,Cp]=Mn(Be),[fr,qN]=ve(Be,[Cp,Js]),zo=Js(),oi=E.forwardRef((e,t)=>{const{type:n,...r}=e,o=r,a=r;return d.jsx(Uo.Provider,{scope:e.__scopeAccordion,children:n==="multiple"?d.jsx(Mp,{...a,ref:t}):d.jsx(Ep,{...o,ref:t})})});oi.displayName=Be;var[ai,Sp]=fr(Be),[si,Np]=fr(Be,{collapsible:!1}),Ep=E.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},collapsible:a=!1,...i}=e,[s,c]=Ce({prop:n,defaultProp:r??"",onChange:o,caller:Be});return d.jsx(ai,{scope:e.__scopeAccordion,value:E.useMemo(()=>s?[s]:[],[s]),onItemOpen:c,onItemClose:E.useCallback(()=>a&&c(""),[a,c]),children:d.jsx(si,{scope:e.__scopeAccordion,collapsible:a,children:d.jsx(ii,{...i,ref:t})})})}),Mp=E.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},...a}=e,[i,s]=Ce({prop:n,defaultProp:r??[],onChange:o,caller:Be}),c=E.useCallback(f=>s((m=[])=>[...m,f]),[s]),u=E.useCallback(f=>s((m=[])=>m.filter(p=>p!==f)),[s]);return d.jsx(ai,{scope:e.__scopeAccordion,value:i,onItemOpen:c,onItemClose:u,children:d.jsx(si,{scope:e.__scopeAccordion,collapsible:!0,children:d.jsx(ii,{...a,ref:t})})})}),[Rp,mr]=fr(Be),ii=E.forwardRef((e,t)=>{const{__scopeAccordion:n,disabled:r,dir:o,orientation:a="vertical",...i}=e,s=E.useRef(null),c=q(s,t),u=wp(n),m=xt(o)==="ltr",p=I(e.onKeyDown,h=>{var R;if(!xp.includes(h.key))return;const y=h.target,g=u().filter(_=>{var A;return!((A=_.ref.current)!=null&&A.disabled)}),v=g.findIndex(_=>_.ref.current===y),w=g.length;if(v===-1)return;h.preventDefault();let x=v;const b=0,S=w-1,C=()=>{x=v+1,x>S&&(x=b)},M=()=>{x=v-1,x<b&&(x=S)};switch(h.key){case"Home":x=b;break;case"End":x=S;break;case"ArrowRight":a==="horizontal"&&(m?C():M());break;case"ArrowDown":a==="vertical"&&C();break;case"ArrowLeft":a==="horizontal"&&(m?M():C());break;case"ArrowUp":a==="vertical"&&M();break}const N=x%w;(R=g[N].ref.current)==null||R.focus()});return d.jsx(Rp,{scope:n,disabled:r,direction:o,orientation:a,children:d.jsx(Uo.Slot,{scope:n,children:d.jsx(V.div,{...i,"data-orientation":a,ref:c,onKeyDown:r?void 0:p})})})}),nr="AccordionItem",[Pp,Ko]=fr(nr),ci=E.forwardRef((e,t)=>{const{__scopeAccordion:n,value:r,...o}=e,a=mr(nr,n),i=Sp(nr,n),s=zo(n),c=he(),u=r&&i.value.includes(r)||!1,f=a.disabled||e.disabled;return d.jsx(Pp,{scope:n,open:u,disabled:f,triggerId:c,children:d.jsx(gp,{"data-orientation":a.orientation,"data-state":pi(u),...s,...o,ref:t,disabled:f,open:u,onOpenChange:m=>{m?i.onItemOpen(r):i.onItemClose(r)}})})});ci.displayName=nr;var li="AccordionHeader",ui=E.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=mr(Be,n),a=Ko(li,n);return d.jsx(V.h3,{"data-orientation":o.orientation,"data-state":pi(a.open),"data-disabled":a.disabled?"":void 0,...r,ref:t})});ui.displayName=li;var bo="AccordionTrigger",di=E.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=mr(Be,n),a=Ko(bo,n),i=Np(bo,n),s=zo(n);return d.jsx(Uo.ItemSlot,{scope:n,children:d.jsx(vp,{"aria-disabled":a.open&&!i.collapsible||void 0,"data-orientation":o.orientation,id:a.triggerId,...s,...r,ref:t})})});di.displayName=bo;var fi="AccordionContent",mi=E.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=mr(Be,n),a=Ko(fi,n),i=zo(n);return d.jsx(yp,{role:"region","aria-labelledby":a.triggerId,"data-orientation":o.orientation,...i,...r,ref:t,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...e.style}})});mi.displayName=fi;function pi(e){return e?"open":"closed"}var Xa=oi,kp=ci,Op=ui,Ip=di,Dp=mi;/**
|
|
2
2
|
* @license lucide-react v0.525.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
|
|
6
|
+
*/const Tp=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Ap=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase()),Za=e=>{const t=Ap(e);return t.charAt(0).toUpperCase()+t.slice(1)},hi=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim(),_p=e=>{for(const t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0};/**
|
|
7
7
|
* @license lucide-react v0.525.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
|
|
11
|
+
*/var jp={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.525.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
|
|
16
|
+
*/const Fp=E.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:a,iconNode:i,...s},c)=>E.createElement("svg",{ref:c,...jp,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:hi("lucide",o),...!a&&!_p(s)&&{"aria-hidden":"true"},...s},[...i.map(([u,f])=>E.createElement(u,f)),...Array.isArray(a)?a:[a]]));/**
|
|
17
17
|
* @license lucide-react v0.525.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 Me=(e,t)=>{const n=E.forwardRef(({className:r,...o},a)=>E.createElement(
|
|
21
|
+
*/const Me=(e,t)=>{const n=E.forwardRef(({className:r,...o},a)=>E.createElement(Fp,{ref:a,iconNode:t,className:hi(`lucide-${Tp(Za(e))}`,`lucide-${e}`,r),...o}));return n.displayName=Za(e),n};/**
|
|
22
22
|
* @license lucide-react v0.525.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
|
|
26
|
+
*/const $p=[["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"}]],gi=Me("calendar",$p);/**
|
|
27
27
|
* @license lucide-react v0.525.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
|
|
31
|
+
*/const Lp=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Ot=Me("check",Lp);/**
|
|
32
32
|
* @license lucide-react v0.525.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
|
|
36
|
+
*/const Wp=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],qo=Me("chevron-down",Wp);/**
|
|
37
37
|
* @license lucide-react v0.525.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
|
|
41
|
+
*/const Bp=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],Vp=Me("chevron-left",Bp);/**
|
|
42
42
|
* @license lucide-react v0.525.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
|
|
46
|
+
*/const Yp=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Xo=Me("chevron-right",Yp);/**
|
|
47
47
|
* @license lucide-react v0.525.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
|
|
51
|
+
*/const Hp=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],Zo=Me("chevrons-up-down",Hp);/**
|
|
52
52
|
* @license lucide-react v0.525.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
|
|
56
|
+
*/const Gp=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],Up=Me("circle-alert",Gp);/**
|
|
57
57
|
* @license lucide-react v0.525.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
|
|
61
|
+
*/const zp=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],Kp=Me("circle-check",zp);/**
|
|
62
62
|
* @license lucide-react v0.525.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
|
|
66
|
+
*/const qp=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],vi=Me("circle",qp);/**
|
|
67
67
|
* @license lucide-react v0.525.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
|
|
71
|
+
*/const Xp=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],Zp=Me("info",Xp);/**
|
|
72
72
|
* @license lucide-react v0.525.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
|
|
76
|
+
*/const Qp=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],yi=Me("loader-circle",Qp);/**
|
|
77
77
|
* @license lucide-react v0.525.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
|
|
81
|
+
*/const Jp=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],eh=Me("search",Jp);/**
|
|
82
82
|
* @license lucide-react v0.525.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
|
|
86
|
+
*/const th=[["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"}]],nh=Me("triangle-alert",th);/**
|
|
87
87
|
* @license lucide-react v0.525.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
|
|
92
|
-
focus-visible:ring-ring focus-visible:ring-offset-[3px] focus-visible:ring-offset-background`,
|
|
93
|
-
focus-within:ring-offset-[3px] focus-within:ring-offset-background`;ge`focus-within:ring-offset-[2px]`;const
|
|
91
|
+
*/const rh=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],pr=Me("x",rh),Qa=ge`focus:outline-none focus:ring-[3px] focus:ring-ring focus:ring-offset-[3px]`,oh=ge`focus:ring-offset-2`,Ja=ge`focus-visible:outline-none focus-visible:ring-[3px]
|
|
92
|
+
focus-visible:ring-ring focus-visible:ring-offset-[3px] focus-visible:ring-offset-background`,ah=ge`focus-visible:ring-offset-[2px]`;ge`focus-within:outline-none focus-within:ring-[3px] focus-within:ring-ring
|
|
93
|
+
focus-within:ring-offset-[3px] focus-within:ring-offset-background`;ge`focus-within:ring-offset-[2px]`;const sh=ge`flex h-10 w-full rounded-sm border border-input bg-background px-3 py-2 text-sm
|
|
94
94
|
ring-offset-background placeholder:text-muted-foreground disabled:cursor-not-allowed
|
|
95
|
-
disabled:opacity-50 aria-disabled:cursor-not-allowed aria-disabled:opacity-50`,
|
|
95
|
+
disabled:opacity-50 aria-disabled:cursor-not-allowed aria-disabled:opacity-50`,ih=ge`inline-flex cursor-pointer items-center justify-center whitespace-nowrap
|
|
96
96
|
rounded-sm bg-transparent text-sm font-bold ring-offset-background transition-colors
|
|
97
97
|
disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50
|
|
98
|
-
aria-disabled:pointer-events-none aria-disabled:cursor-not-allowed aria-disabled:opacity-50`,ae={focusRing:Qa,focusRingSm:
|
|
99
|
-
data-[state=open]:animate-accordion-down`,{variants:{variant:{default:"border-base-200",primary:"border-primary-400",success:"border-success-400",danger:"border-danger-400",warning:"border-yellow-300"},isBordered:{true:"border-b-4 border-l-4 border-r-4",false:""}},defaultVariants:{variant:"default",isBordered:!1}}),ns=({items:e,variant:t,caretPosition:n,isBordered:r,triggerClassName:o,contentClassName:a})=>d.jsx(d.Fragment,{children:e.map(i=>d.jsxs(
|
|
98
|
+
aria-disabled:pointer-events-none aria-disabled:cursor-not-allowed aria-disabled:opacity-50`,ae={focusRing:Qa,focusRingSm:oh,focusRingVisible:Ja,focusRingVisibleSm:ah,link:ge`text-link underline transition-colors visited:text-link-visited hover:text-link-hover hover:no-underline`,linkNoUnderline:ge`no-underline hover:underline`,input:ge`${sh} ${Ja}`,text:{title:ge`text-3xl font-bold`,subtitle:ge`mt-2 text-base-400`,hint:ge`text-sm text-base-400`,error:ge`text-sm font-medium text-destructive`,label:ge`text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70 peer-aria-disabled:cursor-not-allowed peer-aria-disabled:opacity-70`},button:ge`${ih} ${Qa}`,popover:ge`relative w-72 rounded-md border border-muted bg-popover px-4 py-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 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`,tooltip:ge`overflow-hidden rounded-sm bg-base-700 px-2 py-1.5 text-xs text-white fade-in-0 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 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`},es=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,ts=Gs,Se=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return ts(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:a}=t,i=Object.keys(o).map(u=>{const f=n==null?void 0:n[u],m=a==null?void 0:a[u];if(f===null)return null;const p=es(f)||es(m);return o[u][p]}),s=n&&Object.entries(n).reduce((u,f)=>{let[m,p]=f;return p===void 0||(u[m]=p),u},{}),c=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,f)=>{let{class:m,className:p,...h}=f;return Object.entries(h).every(y=>{let[g,v]=y;return Array.isArray(v)?v.includes({...a,...s}[g]):{...a,...s}[g]===v})?[...u,m,p]:u},[]);return ts(e,i,c,n==null?void 0:n.class,n==null?void 0:n.className)},ch=Se(k(ae.focusRingVisible,"flex w-full flex-1 items-center px-4 py-[0.875rem] font-bold transition-all"),{variants:{variant:{default:"bg-base-200 text-black hover:brightness-90",primary:"bg-primary-400 text-white hover:bg-primary-500",success:"bg-success-500 text-white hover:bg-success-600",danger:"bg-danger-400 text-white hover:bg-danger-500",warning:"bg-warning-300 text-black hover:bg-warning-400"},caretPosition:{left:"[&[data-state=open]>svg]:rotate-90",right:"[&[data-state=open]>svg]:rotate-180"}},defaultVariants:{variant:"default",caretPosition:"right"}}),lh=Se(`overflow-hidden px-4 text-sm data-[state=closed]:animate-accordion-up
|
|
99
|
+
data-[state=open]:animate-accordion-down`,{variants:{variant:{default:"border-base-200",primary:"border-primary-400",success:"border-success-400",danger:"border-danger-400",warning:"border-yellow-300"},isBordered:{true:"border-b-4 border-l-4 border-r-4",false:""}},defaultVariants:{variant:"default",isBordered:!1}}),ns=({items:e,variant:t,caretPosition:n,isBordered:r,triggerClassName:o,contentClassName:a})=>d.jsx(d.Fragment,{children:e.map(i=>d.jsxs(kp,{value:i.id,children:[d.jsx(Op,{className:"flex",children:d.jsxs(Ip,{className:k(ch({variant:t,caretPosition:n}),o),children:[n==="left"?d.jsx(Xo,{className:"mr-2 h-5 w-5 shrink-0 text-inherit transition-transform duration-200"}):null,d.jsx("span",{className:"flex-1 text-left",children:i.title}),n==="right"?d.jsx(qo,{className:"ml-2 h-5 w-5 shrink-0 text-inherit transition-transform duration-200"}):null]})}),d.jsx(Dp,{className:k(lh({variant:t,isBordered:r}),a),children:d.jsx("div",{className:"py-4",children:i.content})})]},i.id))}),bi=l.forwardRef(({className:e,triggerClassName:t,contentClassName:n,items:r,mode:o,value:a,defaultValue:i,variant:s="default",isBordered:c=!1,isCollapsible:u=!0,caretPosition:f="right",onValueChange:m,...p},h)=>{const y={ref:h,className:k("space-y-2",e),...p},g={items:r,variant:s,caretPosition:f,isBordered:c,triggerClassName:t,contentClassName:n};return o==="multiple"?d.jsx(Xa,{defaultValue:i,type:"multiple",value:a,onValueChange:m,...y,children:d.jsx(ns,{...g})}):d.jsx(Xa,{collapsible:u,defaultValue:i,type:"single",value:a,onValueChange:m,...y,children:d.jsx(ns,{...g})})});bi.displayName="Accordion";const uh=Se("relative flex w-full items-start border-l-8 text-gray-900 dark:text-gray-100",{variants:{variant:{success:"border-success-400 bg-success-100 dark:bg-success-700",warning:"border-warning-400 bg-warning-100 dark:bg-warning-700",danger:"border-danger-400 bg-danger-100 dark:bg-danger-700",info:"border-info-400 bg-info-100 dark:bg-info-700"},size:{sm:"gap-2 px-4 py-2.5 text-sm",default:"gap-3 px-4 py-4 text-base"}},defaultVariants:{size:"default"}}),dh=Se("",{variants:{size:{sm:"[&>svg]:h-5 [&>svg]:w-5",default:"[&>svg]:h-8 [&>svg]:w-8"},variant:{success:"text-success-400",warning:"text-warning-400",danger:"text-danger-400",info:"text-info-400"},hasHeading:{true:"",false:""}},compoundVariants:[{size:"default",hasHeading:!0,class:"-mt-0.5"}],defaultVariants:{size:"default"}}),fh=Se("flex flex-1",{variants:{size:{sm:"flex-row items-start gap-2",default:"flex-col gap-1"},hasIcon:{true:"",false:""},hasHeading:{true:"",false:""}},compoundVariants:[{size:"default",hasIcon:!0,hasHeading:!1,class:"pt-1"}]}),mh=Se("mb-0 mt-0 font-bold text-base-700 dark:text-base-100",{variants:{size:{sm:"text-base/5",default:"text-lg"}},defaultVariants:{size:"default"}}),xi=l.forwardRef(({className:e,variant:t,size:n="default",heading:r,headingLevel:o="h2",hasIcon:a=!0,isClosable:i=!1,onClose:s,children:c,...u},f)=>{const m=o,p={success:d.jsx(Kp,{}),warning:d.jsx(nh,{}),danger:d.jsx(Up,{}),info:d.jsx(Zp,{})};return d.jsxs("div",{ref:f,className:k(uh({variant:t,size:n}),e),...u,children:[a?d.jsx("span",{className:k(dh({variant:t,size:n,hasHeading:!!r})),children:p[t]}):null,d.jsxs("div",{className:k(fh({size:n,hasIcon:a,hasHeading:!!r})),children:[r?d.jsx(m,{className:k(mh({size:n})),children:r}):null,c]}),i?d.jsxs("button",{className:k(ae.focusRing,ae.focusRingSm,`-mt-0.5 shrink-0 rounded-full bg-transparent px-1.5 py-1.5 opacity-70 transition
|
|
100
100
|
hover:bg-black/10 hover:opacity-100 focus:bg-black/10 focus:opacity-100`),type:"button",onClick:s,children:[d.jsx(pr,{className:"h-5 w-5",strokeWidth:3}),d.jsx("span",{className:"sr-only",children:"Close"})]}):null]})});xi.displayName="Alert";function Oe({isDisabled:e=!1}={}){const t=E.useCallback(s=>{e&&(s.preventDefault(),s.stopPropagation())},[e]),n=E.useCallback(s=>{e&&(s.preventDefault(),s.stopPropagation())},[e]),r=E.useCallback(s=>{if(e){if(s.key==="Tab"||s.key==="Escape")return;s.preventDefault(),s.stopPropagation()}},[e]),o=E.useCallback(s=>{e&&(s.preventDefault(),s.stopPropagation())},[e]),a=E.useCallback(s=>{e&&(s.preventDefault(),s.stopPropagation())},[e]),i=E.useCallback(s=>{e&&(s.preventDefault(),s.stopPropagation())},[e]);return e?{"aria-disabled":!0,onMouseDown:t,onMouseUp:t,onClick:t,onTouchStart:n,onTouchEnd:n,onKeyDown:r,onKeyUp:r,onKeyPress:r,onInput:o,onSubmit:o,onReset:o,onCopy:a,onCut:a,onPaste:a,onDrag:i,onDragStart:i,onDragEnd:i,onDrop:i}:{}}function It({label:e,description:t,"aria-label":n}={}){const r=E.useId(),o=E.useId();return{ariaProps:n?{"aria-label":n}:{...e&&{"aria-labelledby":r},...t&&{"aria-describedby":o}},labelId:r,descriptionId:o}}function Qo({variant:e="default",orientation:t="vertical",columns:n=2}={}){return k(e==="default"&&t==="horizontal"&&"flex flex-row gap-5",e==="default"&&t==="vertical"&&"grid gap-3",e==="default"&&t==="vertical"&&n===1&&"grid-cols-1",e==="default"&&t==="vertical"&&n===2&&"grid-cols-2",e==="default"&&t==="vertical"&&n===3&&"grid-cols-3",e==="default"&&t==="vertical"&&n===4&&"grid-cols-4",e==="tile"&&"grid grid-cols-1 gap-3 md:grid-cols-2 lg:grid-cols-3",e==="button"&&t==="horizontal"&&`flex flex-row gap-0 [&>*:first-child]:ml-0 [&>*:first-child]:rounded-l-sm
|
|
101
101
|
[&>*:last-child]:rounded-r-sm [&>*]:-ml-[1px] [&>*]:rounded-none`,e==="button"&&t==="vertical"&&`flex flex-col gap-0 [&>*:first-child]:mt-0 [&>*:first-child]:rounded-t-sm
|
|
102
|
-
[&>*:last-child]:rounded-b-sm [&>*]:-mt-[1px] [&>*]:rounded-none`)}const Ke=Se(ae.button,{variants:{variant:{default:"border border-primary-400 text-primary-400 hover:underline",primary:"border border-primary-400 bg-primary-400 text-white hover:bg-primary-500 hover:underline",danger:"border border-danger-400 bg-danger-400 text-white hover:bg-danger-500 hover:underline",link:"text-link underline-offset-4 hover:underline",input:"border border-input bg-background font-normal hover:bg-accent hover:text-accent-foreground",ghost:"hover:bg-black hover:bg-opacity-10 hover:text-black"},size:{default:"h-10 px-4 py-2",sm:"h-8 px-3 text-sm",lg:"h-12 rounded-md px-8 text-lg"}},defaultVariants:{variant:"default",size:"default"}}),$e=l.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,isDisabled:o=!1,isLoading:a=!1,children:i,...s},c)=>{const u=r?Zm:"button",f=Oe({isDisabled:o||a});return r?d.jsx(u,{ref:c,className:k(Ke({variant:t,size:n}),e),...s,...f,children:i}):d.jsx(u,{ref:c,"aria-busy":a,className:k(Ke({variant:t,size:n}),"relative",e),...s,...f,children:a?d.jsxs(d.Fragment,{children:[d.jsx("span",{className:"invisible",children:i}),d.jsx("span",{"aria-hidden":"true",className:"absolute inset-0 flex items-center justify-center",children:d.jsx(yi,{className:"h-4 w-4 animate-spin"})})]}):i})});$e.displayName="Button";var rs=1,mh=.9,ph=.8,hh=.17,Zr=.1,Qr=.999,gh=.9999,vh=.99,yh=/[\\\/_+.#"@\[\(\{&]/,bh=/[\\\/_+.#"@\[\(\{&]/g,xh=/[\s-]/,wi=/[\s-]/g;function xo(e,t,n,r,o,a,i){if(a===t.length)return o===e.length?rs:vh;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,m,p,h,y;u>=0;)m=xo(e,t,n,r,u+1,a+1,i),m>f&&(u===o?m*=rs:yh.test(e.charAt(u-1))?(m*=ph,h=e.slice(o,u-1).match(bh),h&&o>0&&(m*=Math.pow(Qr,h.length))):xh.test(e.charAt(u-1))?(m*=mh,y=e.slice(o,u-1).match(wi),y&&o>0&&(m*=Math.pow(Qr,y.length))):(m*=hh,o>0&&(m*=Math.pow(Qr,u-o))),e.charAt(u)!==t.charAt(a)&&(m*=gh)),(m<Zr&&n.charAt(u-1)===r.charAt(a+1)||r.charAt(a+1)===r.charAt(a)&&n.charAt(u-1)!==r.charAt(a))&&(p=xo(e,t,n,r,u+1,a+2,i),p*Zr>m&&(m=p*Zr)),m>f&&(f=m),u=n.indexOf(c,u+1);return i[s]=f,f}function os(e){return e.toLowerCase().replace(wi," ")}function wh(e,t,n){return e=n&&n.length>0?`${e+" "+n.join(" ")}`:e,xo(e,t,os(e),os(t),0,0,{})}function Ne(e){const t=l.useRef(e);return l.useEffect(()=>{t.current=e}),l.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function Ci(e,t=globalThis==null?void 0:globalThis.document){const n=Ne(e);l.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 Ch="DismissableLayer",wo="dismissableLayer.update",Sh="dismissableLayer.pointerDownOutside",Nh="dismissableLayer.focusOutside",as,Si=l.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Rn=l.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:i,onDismiss:s,...c}=e,u=l.useContext(Si),[f,m]=l.useState(null),p=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,h]=l.useState({}),y=q(t,N=>m(N)),g=Array.from(u.layers),[v]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),w=g.indexOf(v),x=f?g.indexOf(f):-1,b=u.layersWithOutsidePointerEventsDisabled.size>0,S=x>=w,C=Rh(N=>{const R=N.target,_=[...u.branches].some(A=>A.contains(R));!S||_||(o==null||o(N),i==null||i(N),N.defaultPrevented||s==null||s())},p),M=Ph(N=>{const R=N.target;[...u.branches].some(A=>A.contains(R))||(a==null||a(N),i==null||i(N),N.defaultPrevented||s==null||s())},p);return Ci(N=>{x===u.layers.size-1&&(r==null||r(N),!N.defaultPrevented&&s&&(N.preventDefault(),s()))},p),l.useEffect(()=>{if(f)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(as=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(f)),u.layers.add(f),ss(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=as)}},[f,p,n,u]),l.useEffect(()=>()=>{f&&(u.layers.delete(f),u.layersWithOutsidePointerEventsDisabled.delete(f),ss())},[f,u]),l.useEffect(()=>{const N=()=>h({});return document.addEventListener(wo,N),()=>document.removeEventListener(wo,N)},[]),d.jsx(V.div,{...c,ref:y,style:{pointerEvents:b?S?"auto":"none":void 0,...e.style},onFocusCapture:I(e.onFocusCapture,M.onFocusCapture),onBlurCapture:I(e.onBlurCapture,M.onBlurCapture),onPointerDownCapture:I(e.onPointerDownCapture,C.onPointerDownCapture)})});Rn.displayName=Ch;var Eh="DismissableLayerBranch",Mh=l.forwardRef((e,t)=>{const n=l.useContext(Si),r=l.useRef(null),o=q(t,r);return l.useEffect(()=>{const a=r.current;if(a)return n.branches.add(a),()=>{n.branches.delete(a)}},[n.branches]),d.jsx(V.div,{...e,ref:o})});Mh.displayName=Eh;function Rh(e,t=globalThis==null?void 0:globalThis.document){const n=Ne(e),r=l.useRef(!1),o=l.useRef(()=>{});return l.useEffect(()=>{const a=s=>{if(s.target&&!r.current){let c=function(){Ni(Sh,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 Ph(e,t=globalThis==null?void 0:globalThis.document){const n=Ne(e),r=l.useRef(!1);return l.useEffect(()=>{const o=a=>{a.target&&!r.current&&Ni(Nh,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 ss(){const e=new CustomEvent(wo);document.dispatchEvent(e)}function Ni(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?Zs(o,a):o.dispatchEvent(a)}var Jr="focusScope.autoFocusOnMount",eo="focusScope.autoFocusOnUnmount",is={bubbles:!1,cancelable:!0},kh="FocusScope",Pn=l.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:a,...i}=e,[s,c]=l.useState(null),u=Ne(o),f=Ne(a),m=l.useRef(null),p=q(t,g=>c(g)),h=l.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;l.useEffect(()=>{if(r){let g=function(b){if(h.paused||!s)return;const S=b.target;s.contains(S)?m.current=S:mt(m.current,{select:!0})},v=function(b){if(h.paused||!s)return;const S=b.relatedTarget;S!==null&&(s.contains(S)||mt(m.current,{select:!0}))},w=function(b){if(document.activeElement===document.body)for(const C of b)C.removedNodes.length>0&&mt(s)};document.addEventListener("focusin",g),document.addEventListener("focusout",v);const x=new MutationObserver(w);return s&&x.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",g),document.removeEventListener("focusout",v),x.disconnect()}}},[r,s,h.paused]),l.useEffect(()=>{if(s){ls.add(h);const g=document.activeElement;if(!s.contains(g)){const w=new CustomEvent(Jr,is);s.addEventListener(Jr,u),s.dispatchEvent(w),w.defaultPrevented||(Oh(_h(Ei(s)),{select:!0}),document.activeElement===g&&mt(s))}return()=>{s.removeEventListener(Jr,u),setTimeout(()=>{const w=new CustomEvent(eo,is);s.addEventListener(eo,f),s.dispatchEvent(w),w.defaultPrevented||mt(g??document.body,{select:!0}),s.removeEventListener(eo,f),ls.remove(h)},0)}}},[s,u,f,h]);const y=l.useCallback(g=>{if(!n&&!r||h.paused)return;const v=g.key==="Tab"&&!g.altKey&&!g.ctrlKey&&!g.metaKey,w=document.activeElement;if(v&&w){const x=g.currentTarget,[b,S]=Ih(x);b&&S?!g.shiftKey&&w===S?(g.preventDefault(),n&&mt(b,{select:!0})):g.shiftKey&&w===b&&(g.preventDefault(),n&&mt(S,{select:!0})):w===x&&g.preventDefault()}},[n,r,h.paused]);return d.jsx(V.div,{tabIndex:-1,...i,ref:p,onKeyDown:y})});Pn.displayName=kh;function Oh(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(mt(r,{select:t}),document.activeElement!==n)return}function Ih(e){const t=Ei(e),n=cs(t,e),r=cs(t.reverse(),e);return[n,r]}function Ei(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 cs(e,t){for(const n of e)if(!Dh(n,{upTo:t}))return n}function Dh(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 Th(e){return e instanceof HTMLInputElement&&"select"in e}function mt(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Th(e)&&t&&e.select()}}var ls=Ah();function Ah(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=us(e,t),e.unshift(t)},remove(t){var n;e=us(e,t),(n=e[0])==null||n.resume()}}}function us(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function _h(e){return e.filter(t=>t.tagName!=="A")}var jh="Portal",kn=l.forwardRef((e,t)=>{var s;const{container:n,...r}=e,[o,a]=l.useState(!1);fe(()=>a(!0),[]);const i=n||o&&((s=globalThis==null?void 0:globalThis.document)==null?void 0:s.body);return i?Vs.createPortal(d.jsx(V.div,{...r,ref:t}),i):null});kn.displayName=jh;function Fh(e,t){return l.useReducer((n,r)=>t[n][r]??n,e)}var De=e=>{const{present:t,children:n}=e,r=$h(t),o=typeof n=="function"?n({present:r.isPresent}):l.Children.only(n),a=q(r.ref,Lh(o));return typeof n=="function"||r.isPresent?l.cloneElement(o,{ref:a}):null};De.displayName="Presence";function $h(e){const[t,n]=l.useState(),r=l.useRef({}),o=l.useRef(e),a=l.useRef("none"),i=e?"mounted":"unmounted",[s,c]=Fh(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return l.useEffect(()=>{const u=Gn(r.current);a.current=s==="mounted"?u:"none"},[s]),fe(()=>{const u=r.current,f=o.current;if(f!==e){const p=a.current,h=Gn(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]),fe(()=>{if(t){let u;const f=t.ownerDocument.defaultView??window,m=h=>{const g=Gn(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=Gn(r.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",m),t.addEventListener("animationend",m),()=>{f.clearTimeout(u),t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",m),t.removeEventListener("animationend",m)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:l.useCallback(u=>{u&&(r.current=getComputedStyle(u)),n(u)},[])}}function Gn(e){return(e==null?void 0:e.animationName)||"none"}function Lh(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 to=0;function hr(){l.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??ds()),document.body.insertAdjacentElement("beforeend",e[1]??ds()),to++,()=>{to===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),to--}},[])}function ds(){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 Ue=function(){return Ue=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},Ue.apply(this,arguments)};function Mi(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 Wh(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 Jn="right-scroll-bar-position",er="width-before-scroll-bar",Bh="with-scroll-bars-hidden",Vh="--removed-body-scroll-bar-size";function no(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Yh(e,t){var n=E.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 Hh=typeof window<"u"?l.useLayoutEffect:l.useEffect,fs=new WeakMap;function Gh(e,t){var n=Yh(null,function(r){return e.forEach(function(o){return no(o,r)})});return Hh(function(){var r=fs.get(n);if(r){var o=new Set(r),a=new Set(e),i=n.current;o.forEach(function(s){a.has(s)||no(s,null)}),a.forEach(function(s){o.has(s)||no(s,i)})}fs.set(n,e)},[e]),n}function Uh(e){return e}function zh(e,t){t===void 0&&(t=Uh);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 Kh(e){e===void 0&&(e={});var t=zh(null);return t.options=Ue({async:!0,ssr:!1},e),t}var Ri=function(e){var t=e.sideCar,n=Mi(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 l.createElement(r,Ue({},n))};Ri.isSideCarExport=!0;function qh(e,t){return e.useMedium(t),Ri}var Pi=Kh(),ro=function(){},gr=l.forwardRef(function(e,t){var n=l.useRef(null),r=l.useState({onScrollCapture:ro,onWheelCapture:ro,onTouchMoveCapture:ro}),o=r[0],a=r[1],i=e.forwardProps,s=e.children,c=e.className,u=e.removeScrollBar,f=e.enabled,m=e.shards,p=e.sideCar,h=e.noIsolation,y=e.inert,g=e.allowPinchZoom,v=e.as,w=v===void 0?"div":v,x=e.gapMode,b=Mi(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),S=p,C=Gh([n,t]),M=Ue(Ue({},b),o);return l.createElement(l.Fragment,null,f&&l.createElement(S,{sideCar:Pi,removeScrollBar:u,shards:m,noIsolation:h,inert:y,setCallbacks:a,allowPinchZoom:!!g,lockRef:n,gapMode:x}),i?l.cloneElement(l.Children.only(s),Ue(Ue({},M),{ref:C})):l.createElement(w,Ue({},M,{className:c,ref:C}),s))});gr.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};gr.classNames={fullWidth:er,zeroRight:Jn};var Xh=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Zh(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Xh();return t&&e.setAttribute("nonce",t),e}function Qh(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Jh(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var eg=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Zh())&&(Qh(t,n),Jh(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},tg=function(){var e=eg();return function(t,n){l.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},ki=function(){var e=tg(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},ng={left:0,top:0,right:0,gap:0},oo=function(e){return parseInt(e||"",10)||0},rg=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[oo(n),oo(r),oo(o)]},og=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return ng;var t=rg(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])}},ag=ki(),Yt="data-scroll-locked",sg=function(e,t,n,r){var o=e.left,a=e.top,i=e.right,s=e.gap;return n===void 0&&(n="margin"),`
|
|
103
|
-
.`.concat(
|
|
102
|
+
[&>*:last-child]:rounded-b-sm [&>*]:-mt-[1px] [&>*]:rounded-none`)}const Ke=Se(ae.button,{variants:{variant:{default:"border border-primary-400 text-primary-400 hover:underline",primary:"border border-primary-400 bg-primary-400 text-white hover:bg-primary-500 hover:underline",danger:"border border-danger-400 bg-danger-400 text-white hover:bg-danger-500 hover:underline",link:"text-link underline-offset-4 hover:underline",input:"border border-input bg-background font-normal hover:bg-accent hover:text-accent-foreground",ghost:"hover:bg-black hover:bg-opacity-10 hover:text-black"},size:{default:"h-10 px-4 py-2",sm:"h-8 px-3 text-sm",lg:"h-12 rounded-md px-8 text-lg"}},defaultVariants:{variant:"default",size:"default"}}),$e=l.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,isDisabled:o=!1,isLoading:a=!1,children:i,...s},c)=>{const u=r?Qm:"button",f=Oe({isDisabled:o||a});return r?d.jsx(u,{ref:c,className:k(Ke({variant:t,size:n}),e),...s,...f,children:i}):d.jsx(u,{ref:c,"aria-busy":a,className:k(Ke({variant:t,size:n}),"relative",e),...s,...f,children:a?d.jsxs(d.Fragment,{children:[d.jsx("span",{className:"invisible",children:i}),d.jsx("span",{"aria-hidden":"true",className:"absolute inset-0 flex items-center justify-center",children:d.jsx(yi,{className:"h-4 w-4 animate-spin"})})]}):i})});$e.displayName="Button";var rs=1,ph=.9,hh=.8,gh=.17,Zr=.1,Qr=.999,vh=.9999,yh=.99,bh=/[\\\/_+.#"@\[\(\{&]/,xh=/[\\\/_+.#"@\[\(\{&]/g,wh=/[\s-]/,wi=/[\s-]/g;function xo(e,t,n,r,o,a,i){if(a===t.length)return o===e.length?rs:yh;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,m,p,h,y;u>=0;)m=xo(e,t,n,r,u+1,a+1,i),m>f&&(u===o?m*=rs:bh.test(e.charAt(u-1))?(m*=hh,h=e.slice(o,u-1).match(xh),h&&o>0&&(m*=Math.pow(Qr,h.length))):wh.test(e.charAt(u-1))?(m*=ph,y=e.slice(o,u-1).match(wi),y&&o>0&&(m*=Math.pow(Qr,y.length))):(m*=gh,o>0&&(m*=Math.pow(Qr,u-o))),e.charAt(u)!==t.charAt(a)&&(m*=vh)),(m<Zr&&n.charAt(u-1)===r.charAt(a+1)||r.charAt(a+1)===r.charAt(a)&&n.charAt(u-1)!==r.charAt(a))&&(p=xo(e,t,n,r,u+1,a+2,i),p*Zr>m&&(m=p*Zr)),m>f&&(f=m),u=n.indexOf(c,u+1);return i[s]=f,f}function os(e){return e.toLowerCase().replace(wi," ")}function Ch(e,t,n){return e=n&&n.length>0?`${e+" "+n.join(" ")}`:e,xo(e,t,os(e),os(t),0,0,{})}function Ne(e){const t=l.useRef(e);return l.useEffect(()=>{t.current=e}),l.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function Ci(e,t=globalThis==null?void 0:globalThis.document){const n=Ne(e);l.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 Sh="DismissableLayer",wo="dismissableLayer.update",Nh="dismissableLayer.pointerDownOutside",Eh="dismissableLayer.focusOutside",as,Si=l.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Rn=l.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:i,onDismiss:s,...c}=e,u=l.useContext(Si),[f,m]=l.useState(null),p=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,h]=l.useState({}),y=q(t,N=>m(N)),g=Array.from(u.layers),[v]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),w=g.indexOf(v),x=f?g.indexOf(f):-1,b=u.layersWithOutsidePointerEventsDisabled.size>0,S=x>=w,C=Ph(N=>{const R=N.target,_=[...u.branches].some(A=>A.contains(R));!S||_||(o==null||o(N),i==null||i(N),N.defaultPrevented||s==null||s())},p),M=kh(N=>{const R=N.target;[...u.branches].some(A=>A.contains(R))||(a==null||a(N),i==null||i(N),N.defaultPrevented||s==null||s())},p);return Ci(N=>{x===u.layers.size-1&&(r==null||r(N),!N.defaultPrevented&&s&&(N.preventDefault(),s()))},p),l.useEffect(()=>{if(f)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(as=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(f)),u.layers.add(f),ss(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=as)}},[f,p,n,u]),l.useEffect(()=>()=>{f&&(u.layers.delete(f),u.layersWithOutsidePointerEventsDisabled.delete(f),ss())},[f,u]),l.useEffect(()=>{const N=()=>h({});return document.addEventListener(wo,N),()=>document.removeEventListener(wo,N)},[]),d.jsx(V.div,{...c,ref:y,style:{pointerEvents:b?S?"auto":"none":void 0,...e.style},onFocusCapture:I(e.onFocusCapture,M.onFocusCapture),onBlurCapture:I(e.onBlurCapture,M.onBlurCapture),onPointerDownCapture:I(e.onPointerDownCapture,C.onPointerDownCapture)})});Rn.displayName=Sh;var Mh="DismissableLayerBranch",Rh=l.forwardRef((e,t)=>{const n=l.useContext(Si),r=l.useRef(null),o=q(t,r);return l.useEffect(()=>{const a=r.current;if(a)return n.branches.add(a),()=>{n.branches.delete(a)}},[n.branches]),d.jsx(V.div,{...e,ref:o})});Rh.displayName=Mh;function Ph(e,t=globalThis==null?void 0:globalThis.document){const n=Ne(e),r=l.useRef(!1),o=l.useRef(()=>{});return l.useEffect(()=>{const a=s=>{if(s.target&&!r.current){let c=function(){Ni(Nh,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 kh(e,t=globalThis==null?void 0:globalThis.document){const n=Ne(e),r=l.useRef(!1);return l.useEffect(()=>{const o=a=>{a.target&&!r.current&&Ni(Eh,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 ss(){const e=new CustomEvent(wo);document.dispatchEvent(e)}function Ni(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?Zs(o,a):o.dispatchEvent(a)}var Jr="focusScope.autoFocusOnMount",eo="focusScope.autoFocusOnUnmount",is={bubbles:!1,cancelable:!0},Oh="FocusScope",Pn=l.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:a,...i}=e,[s,c]=l.useState(null),u=Ne(o),f=Ne(a),m=l.useRef(null),p=q(t,g=>c(g)),h=l.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;l.useEffect(()=>{if(r){let g=function(b){if(h.paused||!s)return;const S=b.target;s.contains(S)?m.current=S:mt(m.current,{select:!0})},v=function(b){if(h.paused||!s)return;const S=b.relatedTarget;S!==null&&(s.contains(S)||mt(m.current,{select:!0}))},w=function(b){if(document.activeElement===document.body)for(const C of b)C.removedNodes.length>0&&mt(s)};document.addEventListener("focusin",g),document.addEventListener("focusout",v);const x=new MutationObserver(w);return s&&x.observe(s,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",g),document.removeEventListener("focusout",v),x.disconnect()}}},[r,s,h.paused]),l.useEffect(()=>{if(s){ls.add(h);const g=document.activeElement;if(!s.contains(g)){const w=new CustomEvent(Jr,is);s.addEventListener(Jr,u),s.dispatchEvent(w),w.defaultPrevented||(Ih(jh(Ei(s)),{select:!0}),document.activeElement===g&&mt(s))}return()=>{s.removeEventListener(Jr,u),setTimeout(()=>{const w=new CustomEvent(eo,is);s.addEventListener(eo,f),s.dispatchEvent(w),w.defaultPrevented||mt(g??document.body,{select:!0}),s.removeEventListener(eo,f),ls.remove(h)},0)}}},[s,u,f,h]);const y=l.useCallback(g=>{if(!n&&!r||h.paused)return;const v=g.key==="Tab"&&!g.altKey&&!g.ctrlKey&&!g.metaKey,w=document.activeElement;if(v&&w){const x=g.currentTarget,[b,S]=Dh(x);b&&S?!g.shiftKey&&w===S?(g.preventDefault(),n&&mt(b,{select:!0})):g.shiftKey&&w===b&&(g.preventDefault(),n&&mt(S,{select:!0})):w===x&&g.preventDefault()}},[n,r,h.paused]);return d.jsx(V.div,{tabIndex:-1,...i,ref:p,onKeyDown:y})});Pn.displayName=Oh;function Ih(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(mt(r,{select:t}),document.activeElement!==n)return}function Dh(e){const t=Ei(e),n=cs(t,e),r=cs(t.reverse(),e);return[n,r]}function Ei(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 cs(e,t){for(const n of e)if(!Th(n,{upTo:t}))return n}function Th(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 Ah(e){return e instanceof HTMLInputElement&&"select"in e}function mt(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Ah(e)&&t&&e.select()}}var ls=_h();function _h(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=us(e,t),e.unshift(t)},remove(t){var n;e=us(e,t),(n=e[0])==null||n.resume()}}}function us(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function jh(e){return e.filter(t=>t.tagName!=="A")}var Fh="Portal",kn=l.forwardRef((e,t)=>{var s;const{container:n,...r}=e,[o,a]=l.useState(!1);fe(()=>a(!0),[]);const i=n||o&&((s=globalThis==null?void 0:globalThis.document)==null?void 0:s.body);return i?Vs.createPortal(d.jsx(V.div,{...r,ref:t}),i):null});kn.displayName=Fh;function $h(e,t){return l.useReducer((n,r)=>t[n][r]??n,e)}var De=e=>{const{present:t,children:n}=e,r=Lh(t),o=typeof n=="function"?n({present:r.isPresent}):l.Children.only(n),a=q(r.ref,Wh(o));return typeof n=="function"||r.isPresent?l.cloneElement(o,{ref:a}):null};De.displayName="Presence";function Lh(e){const[t,n]=l.useState(),r=l.useRef({}),o=l.useRef(e),a=l.useRef("none"),i=e?"mounted":"unmounted",[s,c]=$h(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return l.useEffect(()=>{const u=Gn(r.current);a.current=s==="mounted"?u:"none"},[s]),fe(()=>{const u=r.current,f=o.current;if(f!==e){const p=a.current,h=Gn(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]),fe(()=>{if(t){let u;const f=t.ownerDocument.defaultView??window,m=h=>{const g=Gn(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=Gn(r.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",m),t.addEventListener("animationend",m),()=>{f.clearTimeout(u),t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",m),t.removeEventListener("animationend",m)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:l.useCallback(u=>{u&&(r.current=getComputedStyle(u)),n(u)},[])}}function Gn(e){return(e==null?void 0:e.animationName)||"none"}function Wh(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 to=0;function hr(){l.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??ds()),document.body.insertAdjacentElement("beforeend",e[1]??ds()),to++,()=>{to===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),to--}},[])}function ds(){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 Ue=function(){return Ue=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},Ue.apply(this,arguments)};function Mi(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 Bh(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 Jn="right-scroll-bar-position",er="width-before-scroll-bar",Vh="with-scroll-bars-hidden",Yh="--removed-body-scroll-bar-size";function no(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Hh(e,t){var n=E.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 Gh=typeof window<"u"?l.useLayoutEffect:l.useEffect,fs=new WeakMap;function Uh(e,t){var n=Hh(null,function(r){return e.forEach(function(o){return no(o,r)})});return Gh(function(){var r=fs.get(n);if(r){var o=new Set(r),a=new Set(e),i=n.current;o.forEach(function(s){a.has(s)||no(s,null)}),a.forEach(function(s){o.has(s)||no(s,i)})}fs.set(n,e)},[e]),n}function zh(e){return e}function Kh(e,t){t===void 0&&(t=zh);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 qh(e){e===void 0&&(e={});var t=Kh(null);return t.options=Ue({async:!0,ssr:!1},e),t}var Ri=function(e){var t=e.sideCar,n=Mi(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 l.createElement(r,Ue({},n))};Ri.isSideCarExport=!0;function Xh(e,t){return e.useMedium(t),Ri}var Pi=qh(),ro=function(){},gr=l.forwardRef(function(e,t){var n=l.useRef(null),r=l.useState({onScrollCapture:ro,onWheelCapture:ro,onTouchMoveCapture:ro}),o=r[0],a=r[1],i=e.forwardProps,s=e.children,c=e.className,u=e.removeScrollBar,f=e.enabled,m=e.shards,p=e.sideCar,h=e.noIsolation,y=e.inert,g=e.allowPinchZoom,v=e.as,w=v===void 0?"div":v,x=e.gapMode,b=Mi(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),S=p,C=Uh([n,t]),M=Ue(Ue({},b),o);return l.createElement(l.Fragment,null,f&&l.createElement(S,{sideCar:Pi,removeScrollBar:u,shards:m,noIsolation:h,inert:y,setCallbacks:a,allowPinchZoom:!!g,lockRef:n,gapMode:x}),i?l.cloneElement(l.Children.only(s),Ue(Ue({},M),{ref:C})):l.createElement(w,Ue({},M,{className:c,ref:C}),s))});gr.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};gr.classNames={fullWidth:er,zeroRight:Jn};var Zh=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Qh(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Zh();return t&&e.setAttribute("nonce",t),e}function Jh(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function eg(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var tg=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Qh())&&(Jh(t,n),eg(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},ng=function(){var e=tg();return function(t,n){l.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},ki=function(){var e=ng(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},rg={left:0,top:0,right:0,gap:0},oo=function(e){return parseInt(e||"",10)||0},og=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[oo(n),oo(r),oo(o)]},ag=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return rg;var t=og(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])}},sg=ki(),Yt="data-scroll-locked",ig=function(e,t,n,r){var o=e.left,a=e.top,i=e.right,s=e.gap;return n===void 0&&(n="margin"),`
|
|
103
|
+
.`.concat(Vh,` {
|
|
104
104
|
overflow: hidden `).concat(r,`;
|
|
105
105
|
padding-right: `).concat(s,"px ").concat(r,`;
|
|
106
106
|
}
|
|
@@ -134,16 +134,16 @@ aria-disabled:pointer-events-none aria-disabled:cursor-not-allowed aria-disabled
|
|
|
134
134
|
}
|
|
135
135
|
|
|
136
136
|
body[`).concat(Yt,`] {
|
|
137
|
-
`).concat(
|
|
137
|
+
`).concat(Yh,": ").concat(s,`px;
|
|
138
138
|
}
|
|
139
|
-
`)},ms=function(){var e=parseInt(document.body.getAttribute(Yt)||"0",10);return isFinite(e)?e:0},
|
|
139
|
+
`)},ms=function(){var e=parseInt(document.body.getAttribute(Yt)||"0",10);return isFinite(e)?e:0},cg=function(){l.useEffect(function(){return document.body.setAttribute(Yt,(ms()+1).toString()),function(){var e=ms()-1;e<=0?document.body.removeAttribute(Yt):document.body.setAttribute(Yt,e.toString())}},[])},lg=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;cg();var a=l.useMemo(function(){return ag(o)},[o]);return l.createElement(sg,{styles:ig(a,!t,o,n?"":"!important")})},Co=!1;if(typeof window<"u")try{var Un=Object.defineProperty({},"passive",{get:function(){return Co=!0,!0}});window.addEventListener("test",Un,Un),window.removeEventListener("test",Un,Un)}catch{Co=!1}var jt=Co?{passive:!1}:!1,ug=function(e){return e.tagName==="TEXTAREA"},Oi=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!ug(e)&&n[t]==="visible")},dg=function(e){return Oi(e,"overflowY")},fg=function(e){return Oi(e,"overflowX")},ps=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=Ii(e,r);if(o){var a=Di(e,r),i=a[1],s=a[2];if(i>s)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},mg=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},pg=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},Ii=function(e,t){return e==="v"?dg(t):fg(t)},Di=function(e,t){return e==="v"?mg(t):pg(t)},hg=function(e,t){return e==="h"&&t==="rtl"?-1:1},gg=function(e,t,n,r,o){var a=hg(e,window.getComputedStyle(t).direction),i=a*r,s=n.target,c=t.contains(s),u=!1,f=i>0,m=0,p=0;do{var h=Di(e,s),y=h[0],g=h[1],v=h[2],w=g-v-a*y;(y||w)&&Ii(e,s)&&(m+=w,p+=y),s instanceof ShadowRoot?s=s.host:s=s.parentNode}while(!c&&s!==document.body||c&&(t.contains(s)||t===s));return(f&&Math.abs(m)<1||!f&&Math.abs(p)<1)&&(u=!0),u},zn=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},hs=function(e){return[e.deltaX,e.deltaY]},gs=function(e){return e&&"current"in e?e.current:e},vg=function(e,t){return e[0]===t[0]&&e[1]===t[1]},yg=function(e){return`
|
|
140
140
|
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
141
141
|
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
142
|
-
`)},
|
|
142
|
+
`)},bg=0,Ft=[];function xg(e){var t=l.useRef([]),n=l.useRef([0,0]),r=l.useRef(),o=l.useState(bg++)[0],a=l.useState(ki)[0],i=l.useRef(e);l.useEffect(function(){i.current=e},[e]),l.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var g=Bh([e.lockRef.current],(e.shards||[]).map(gs),!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=l.useCallback(function(g,v){if("touches"in g&&g.touches.length===2||g.type==="wheel"&&g.ctrlKey)return!i.current.allowPinchZoom;var w=zn(g),x=n.current,b="deltaX"in g?g.deltaX:x[0]-w[0],S="deltaY"in g?g.deltaY:x[1]-w[1],C,M=g.target,N=Math.abs(b)>Math.abs(S)?"h":"v";if("touches"in g&&N==="h"&&M.type==="range")return!1;var R=ps(N,M);if(!R)return!0;if(R?C=N:(C=N==="v"?"h":"v",R=ps(N,M)),!R)return!1;if(!r.current&&"changedTouches"in g&&(b||S)&&(r.current=C),!C)return!0;var _=r.current||C;return gg(_,v,g,_==="h"?b:S)},[]),c=l.useCallback(function(g){var v=g;if(!(!Ft.length||Ft[Ft.length-1]!==a)){var w="deltaY"in v?hs(v):zn(v),x=t.current.filter(function(C){return C.name===v.type&&(C.target===v.target||v.target===C.shadowParent)&&vg(C.delta,w)})[0];if(x&&x.should){v.cancelable&&v.preventDefault();return}if(!x){var b=(i.current.shards||[]).map(gs).filter(Boolean).filter(function(C){return C.contains(v.target)}),S=b.length>0?s(v,b[0]):!i.current.noIsolation;S&&v.cancelable&&v.preventDefault()}}},[]),u=l.useCallback(function(g,v,w,x){var b={name:g,delta:v,target:w,should:x,shadowParent:wg(w)};t.current.push(b),setTimeout(function(){t.current=t.current.filter(function(S){return S!==b})},1)},[]),f=l.useCallback(function(g){n.current=zn(g),r.current=void 0},[]),m=l.useCallback(function(g){u(g.type,hs(g),g.target,s(g,e.lockRef.current))},[]),p=l.useCallback(function(g){u(g.type,zn(g),g.target,s(g,e.lockRef.current))},[]);l.useEffect(function(){return Ft.push(a),e.setCallbacks({onScrollCapture:m,onWheelCapture:m,onTouchMoveCapture:p}),document.addEventListener("wheel",c,jt),document.addEventListener("touchmove",c,jt),document.addEventListener("touchstart",f,jt),function(){Ft=Ft.filter(function(g){return g!==a}),document.removeEventListener("wheel",c,jt),document.removeEventListener("touchmove",c,jt),document.removeEventListener("touchstart",f,jt)}},[]);var h=e.removeScrollBar,y=e.inert;return l.createElement(l.Fragment,null,y?l.createElement(a,{styles:yg(o)}):null,h?l.createElement(lg,{gapMode:e.gapMode}):null)}function wg(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Cg=Xh(Pi,xg);var On=l.forwardRef(function(e,t){return l.createElement(gr,Ue({},e,{ref:t,sideCar:Cg}))});On.classNames=gr.classNames;var Sg=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},$t=new WeakMap,Kn=new WeakMap,qn={},ao=0,Ti=function(e){return e&&(e.host||Ti(e.parentNode))},Ng=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=Ti(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})},Eg=function(e,t,n,r){var o=Ng(t,Array.isArray(e)?e:[e]);qn[n]||(qn[n]=new WeakMap);var a=qn[n],i=[],s=new Set,c=new Set(o),u=function(m){!m||s.has(m)||(s.add(m),u(m.parentNode))};o.forEach(u);var f=function(m){!m||c.has(m)||Array.prototype.forEach.call(m.children,function(p){if(s.has(p))f(p);else try{var h=p.getAttribute(r),y=h!==null&&h!=="false",g=($t.get(p)||0)+1,v=(a.get(p)||0)+1;$t.set(p,g),a.set(p,v),i.push(p),g===1&&y&&Kn.set(p,!0),v===1&&p.setAttribute(n,"true"),y||p.setAttribute(r,"true")}catch(w){console.error("aria-hidden: cannot operate on ",p,w)}})};return f(t),s.clear(),ao++,function(){i.forEach(function(m){var p=$t.get(m)-1,h=a.get(m)-1;$t.set(m,p),a.set(m,h),p||(Kn.has(m)||m.removeAttribute(r),Kn.delete(m)),h||m.removeAttribute(n)}),ao--,ao||($t=new WeakMap,$t=new WeakMap,Kn=new WeakMap,qn={})}},vr=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=Sg(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live]"))),Eg(r,o,n,"aria-hidden")):function(){return null}},yr="Dialog",[Ai,XN]=ve(yr),[Mg,Ve]=Ai(yr),_i=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:a,modal:i=!0}=e,s=l.useRef(null),c=l.useRef(null),[u,f]=Ce({prop:r,defaultProp:o??!1,onChange:a,caller:yr});return d.jsx(Mg,{scope:t,triggerRef:s,contentRef:c,contentId:he(),titleId:he(),descriptionId:he(),open:u,onOpenChange:f,onOpenToggle:l.useCallback(()=>f(m=>!m),[f]),modal:i,children:n})};_i.displayName=yr;var ji="DialogTrigger",Fi=l.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Ve(ji,n),a=q(t,o.triggerRef);return d.jsx(V.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":ta(o.open),...r,ref:a,onClick:I(e.onClick,o.onOpenToggle)})});Fi.displayName=ji;var Jo="DialogPortal",[Rg,$i]=Ai(Jo,{forceMount:void 0}),Li=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,a=Ve(Jo,t);return d.jsx(Rg,{scope:t,forceMount:n,children:l.Children.map(r,i=>d.jsx(De,{present:n||a.open,children:d.jsx(kn,{asChild:!0,container:o,children:i})}))})};Li.displayName=Jo;var rr="DialogOverlay",Wi=l.forwardRef((e,t)=>{const n=$i(rr,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,a=Ve(rr,e.__scopeDialog);return a.modal?d.jsx(De,{present:r||a.open,children:d.jsx(kg,{...o,ref:t})}):null});Wi.displayName=rr;var Pg=ht("DialogOverlay.RemoveScroll"),kg=l.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Ve(rr,n);return d.jsx(On,{as:Pg,allowPinchZoom:!0,shards:[o.contentRef],children:d.jsx(V.div,{"data-state":ta(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),Et="DialogContent",Bi=l.forwardRef((e,t)=>{const n=$i(Et,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,a=Ve(Et,e.__scopeDialog);return d.jsx(De,{present:r||a.open,children:a.modal?d.jsx(Og,{...o,ref:t}):d.jsx(Ig,{...o,ref:t})})});Bi.displayName=Et;var Og=l.forwardRef((e,t)=>{const n=Ve(Et,e.__scopeDialog),r=l.useRef(null),o=q(t,n.contentRef,r);return l.useEffect(()=>{const a=r.current;if(a)return vr(a)},[]),d.jsx(Vi,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:I(e.onCloseAutoFocus,a=>{var i;a.preventDefault(),(i=n.triggerRef.current)==null||i.focus()}),onPointerDownOutside:I(e.onPointerDownOutside,a=>{const i=a.detail.originalEvent,s=i.button===0&&i.ctrlKey===!0;(i.button===2||s)&&a.preventDefault()}),onFocusOutside:I(e.onFocusOutside,a=>a.preventDefault())})}),Ig=l.forwardRef((e,t)=>{const n=Ve(Et,e.__scopeDialog),r=l.useRef(!1),o=l.useRef(!1);return d.jsx(Vi,{...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()}})}),Vi=l.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:a,...i}=e,s=Ve(Et,n),c=l.useRef(null),u=q(t,c);return hr(),d.jsxs(d.Fragment,{children:[d.jsx(Pn,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:a,children:d.jsx(Rn,{role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":ta(s.open),...i,ref:u,onDismiss:()=>s.onOpenChange(!1)})}),d.jsxs(d.Fragment,{children:[d.jsx(Dg,{titleId:s.titleId}),d.jsx(Ag,{contentRef:c,descriptionId:s.descriptionId})]})]})}),ea="DialogTitle",Yi=l.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Ve(ea,n);return d.jsx(V.h2,{id:o.titleId,...r,ref:t})});Yi.displayName=ea;var Hi="DialogDescription",Gi=l.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Ve(Hi,n);return d.jsx(V.p,{id:o.descriptionId,...r,ref:t})});Gi.displayName=Hi;var Ui="DialogClose",zi=l.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Ve(Ui,n);return d.jsx(V.button,{type:"button",...r,ref:t,onClick:I(e.onClick,()=>o.onOpenChange(!1))})});zi.displayName=Ui;function ta(e){return e?"open":"closed"}var Ki="DialogTitleWarning",[ZN,qi]=Xm(Ki,{contentName:Et,titleName:ea,docsSlug:"dialog"}),Dg=({titleId:e})=>{const t=qi(Ki),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
143
143
|
|
|
144
144
|
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
145
145
|
|
|
146
|
-
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return l.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},Dg="DialogDescriptionWarning",Tg=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${qi(Dg).contentName}}.`;return l.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},Xi=_i,Ag=Fi,Zi=Li,na=Wi,ra=Bi,Qi=Yi,Ji=Gi,ec=zi,ln='[cmdk-group=""]',so='[cmdk-group-items=""]',_g='[cmdk-group-heading=""]',tc='[cmdk-item=""]',vs=`${tc}:not([aria-disabled="true"])`,So="cmdk-item-select",Wt="data-value",jg=(e,t,n)=>wh(e,t,n),nc=l.createContext(void 0),In=()=>l.useContext(nc),rc=l.createContext(void 0),oa=()=>l.useContext(rc),oc=l.createContext(void 0),ac=l.forwardRef((e,t)=>{let n=Bt(()=>{var P,W;return{search:"",value:(W=(P=e.value)!=null?P:e.defaultValue)!=null?W:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),r=Bt(()=>new Set),o=Bt(()=>new Map),a=Bt(()=>new Map),i=Bt(()=>new Set),s=sc(e),{label:c,children:u,value:f,onValueChange:m,filter:p,shouldFilter:h,loop:y,disablePointerSelection:g=!1,vimBindings:v=!0,...w}=e,x=he(),b=he(),S=he(),C=l.useRef(null),M=zg();Mt(()=>{if(f!==void 0){let P=f.trim();n.current.value=P,N.emit()}},[f]),Mt(()=>{M(6,Y)},[]);let N=l.useMemo(()=>({subscribe:P=>(i.current.add(P),()=>i.current.delete(P)),snapshot:()=>n.current,setState:(P,W,G)=>{var L,z,T,Q;if(!Object.is(n.current[P],W)){if(n.current[P]=W,P==="search")D(),A(),M(1,$);else if(P==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let K=document.getElementById(S);K?K.focus():(L=document.getElementById(x))==null||L.focus()}if(M(7,()=>{var K;n.current.selectedItemId=(K=H())==null?void 0:K.id,N.emit()}),G||M(5,Y),((z=s.current)==null?void 0:z.value)!==void 0){let K=W??"";(Q=(T=s.current).onValueChange)==null||Q.call(T,K);return}}N.emit()}},emit:()=>{i.current.forEach(P=>P())}}),[]),R=l.useMemo(()=>({value:(P,W,G)=>{var L;W!==((L=a.current.get(P))==null?void 0:L.value)&&(a.current.set(P,{value:W,keywords:G}),n.current.filtered.items.set(P,_(W,G)),M(2,()=>{A(),N.emit()}))},item:(P,W)=>(r.current.add(P),W&&(o.current.has(W)?o.current.get(W).add(P):o.current.set(W,new Set([P]))),M(3,()=>{D(),A(),n.current.value||$(),N.emit()}),()=>{a.current.delete(P),r.current.delete(P),n.current.filtered.items.delete(P);let G=H();M(4,()=>{D(),(G==null?void 0:G.getAttribute("id"))===P&&$(),N.emit()})}),group:P=>(o.current.has(P)||o.current.set(P,new Set),()=>{a.current.delete(P),o.current.delete(P)}),filter:()=>s.current.shouldFilter,label:c||e["aria-label"],getDisablePointerSelection:()=>s.current.disablePointerSelection,listId:x,inputId:S,labelId:b,listInnerRef:C}),[]);function _(P,W){var G,L;let z=(L=(G=s.current)==null?void 0:G.filter)!=null?L:jg;return P?z(P,n.current.search,W):0}function A(){if(!n.current.search||s.current.shouldFilter===!1)return;let P=n.current.filtered.items,W=[];n.current.filtered.groups.forEach(L=>{let z=o.current.get(L),T=0;z.forEach(Q=>{let K=P.get(Q);T=Math.max(K,T)}),W.push([L,T])});let G=C.current;J().sort((L,z)=>{var T,Q;let K=L.getAttribute("id"),B=z.getAttribute("id");return((T=P.get(B))!=null?T:0)-((Q=P.get(K))!=null?Q:0)}).forEach(L=>{let z=L.closest(so);z?z.appendChild(L.parentElement===z?L:L.closest(`${so} > *`)):G.appendChild(L.parentElement===G?L:L.closest(`${so} > *`))}),W.sort((L,z)=>z[1]-L[1]).forEach(L=>{var z;let T=(z=C.current)==null?void 0:z.querySelector(`${ln}[${Wt}="${encodeURIComponent(L[0])}"]`);T==null||T.parentElement.appendChild(T)})}function $(){let P=J().find(G=>G.getAttribute("aria-disabled")!=="true"),W=P==null?void 0:P.getAttribute(Wt);N.setState("value",W||void 0)}function D(){var P,W,G,L;if(!n.current.search||s.current.shouldFilter===!1){n.current.filtered.count=r.current.size;return}n.current.filtered.groups=new Set;let z=0;for(let T of r.current){let Q=(W=(P=a.current.get(T))==null?void 0:P.value)!=null?W:"",K=(L=(G=a.current.get(T))==null?void 0:G.keywords)!=null?L:[],B=_(Q,K);n.current.filtered.items.set(T,B),B>0&&z++}for(let[T,Q]of o.current)for(let K of Q)if(n.current.filtered.items.get(K)>0){n.current.filtered.groups.add(T);break}n.current.filtered.count=z}function Y(){var P,W,G;let L=H();L&&(((P=L.parentElement)==null?void 0:P.firstChild)===L&&((G=(W=L.closest(ln))==null?void 0:W.querySelector(_g))==null||G.scrollIntoView({block:"nearest"})),L.scrollIntoView({block:"nearest"}))}function H(){var P;return(P=C.current)==null?void 0:P.querySelector(`${tc}[aria-selected="true"]`)}function J(){var P;return Array.from(((P=C.current)==null?void 0:P.querySelectorAll(vs))||[])}function j(P){let W=J()[P];W&&N.setState("value",W.getAttribute(Wt))}function X(P){var W;let G=H(),L=J(),z=L.findIndex(Q=>Q===G),T=L[z+P];(W=s.current)!=null&&W.loop&&(T=z+P<0?L[L.length-1]:z+P===L.length?L[0]:L[z+P]),T&&N.setState("value",T.getAttribute(Wt))}function F(P){let W=H(),G=W==null?void 0:W.closest(ln),L;for(;G&&!L;)G=P>0?Gg(G,ln):Ug(G,ln),L=G==null?void 0:G.querySelector(vs);L?N.setState("value",L.getAttribute(Wt)):X(P)}let O=()=>j(J().length-1),Z=P=>{P.preventDefault(),P.metaKey?O():P.altKey?F(1):X(1)},te=P=>{P.preventDefault(),P.metaKey?j(0):P.altKey?F(-1):X(-1)};return l.createElement(V.div,{ref:t,tabIndex:-1,...w,"cmdk-root":"",onKeyDown:P=>{var W;(W=w.onKeyDown)==null||W.call(w,P);let G=P.nativeEvent.isComposing||P.keyCode===229;if(!(P.defaultPrevented||G))switch(P.key){case"n":case"j":{v&&P.ctrlKey&&Z(P);break}case"ArrowDown":{Z(P);break}case"p":case"k":{v&&P.ctrlKey&&te(P);break}case"ArrowUp":{te(P);break}case"Home":{P.preventDefault(),j(0);break}case"End":{P.preventDefault(),O();break}case"Enter":{P.preventDefault();let L=H();if(L){let z=new Event(So);L.dispatchEvent(z)}}}}},l.createElement("label",{"cmdk-label":"",htmlFor:R.inputId,id:R.labelId,style:qg},c),br(e,P=>l.createElement(rc.Provider,{value:N},l.createElement(nc.Provider,{value:R},P))))}),Fg=l.forwardRef((e,t)=>{var n,r;let o=he(),a=l.useRef(null),i=l.useContext(oc),s=In(),c=sc(e),u=(r=(n=c.current)==null?void 0:n.forceMount)!=null?r:i==null?void 0:i.forceMount;Mt(()=>{if(!u)return s.item(o,i==null?void 0:i.id)},[u]);let f=ic(o,a,[e.value,e.children,a],e.keywords),m=oa(),p=gt(M=>M.value&&M.value===f.current),h=gt(M=>u||s.filter()===!1?!0:M.search?M.filtered.items.get(o)>0:!0);l.useEffect(()=>{let M=a.current;if(!(!M||e.disabled))return M.addEventListener(So,y),()=>M.removeEventListener(So,y)},[h,e.onSelect,e.disabled]);function y(){var M,N;g(),(N=(M=c.current).onSelect)==null||N.call(M,f.current)}function g(){m.setState("value",f.current,!0)}if(!h)return null;let{disabled:v,value:w,onSelect:x,forceMount:b,keywords:S,...C}=e;return l.createElement(V.div,{ref:Xe(a,t),...C,id:o,"cmdk-item":"",role:"option","aria-disabled":!!v,"aria-selected":!!p,"data-disabled":!!v,"data-selected":!!p,onPointerMove:v||s.getDisablePointerSelection()?void 0:g,onClick:v?void 0:y},e.children)}),$g=l.forwardRef((e,t)=>{let{heading:n,children:r,forceMount:o,...a}=e,i=he(),s=l.useRef(null),c=l.useRef(null),u=he(),f=In(),m=gt(h=>o||f.filter()===!1?!0:h.search?h.filtered.groups.has(i):!0);Mt(()=>f.group(i),[]),ic(i,s,[e.value,e.heading,c]);let p=l.useMemo(()=>({id:i,forceMount:o}),[o]);return l.createElement(V.div,{ref:Xe(s,t),...a,"cmdk-group":"",role:"presentation",hidden:m?void 0:!0},n&&l.createElement("div",{ref:c,"cmdk-group-heading":"","aria-hidden":!0,id:u},n),br(e,h=>l.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?u:void 0},l.createElement(oc.Provider,{value:p},h))))}),Lg=l.forwardRef((e,t)=>{let{alwaysRender:n,...r}=e,o=l.useRef(null),a=gt(i=>!i.search);return!n&&!a?null:l.createElement(V.div,{ref:Xe(o,t),...r,"cmdk-separator":"",role:"separator"})}),Wg=l.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,o=e.value!=null,a=oa(),i=gt(u=>u.search),s=gt(u=>u.selectedItemId),c=In();return l.useEffect(()=>{e.value!=null&&a.setState("search",e.value)},[e.value]),l.createElement(V.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)}})}),Bg=l.forwardRef((e,t)=>{let{children:n,label:r="Suggestions",...o}=e,a=l.useRef(null),i=l.useRef(null),s=gt(u=>u.selectedItemId),c=In();return l.useEffect(()=>{if(i.current&&a.current){let u=i.current,f=a.current,m,p=new ResizeObserver(()=>{m=requestAnimationFrame(()=>{let h=u.offsetHeight;f.style.setProperty("--cmdk-list-height",h.toFixed(1)+"px")})});return p.observe(u),()=>{cancelAnimationFrame(m),p.unobserve(u)}}},[]),l.createElement(V.div,{ref:Xe(a,t),...o,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":s,"aria-label":r,id:c.listId},br(e,u=>l.createElement("div",{ref:Xe(i,c.listInnerRef),"cmdk-list-sizer":""},u)))}),Vg=l.forwardRef((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:o,contentClassName:a,container:i,...s}=e;return l.createElement(Xi,{open:n,onOpenChange:r},l.createElement(Zi,{container:i},l.createElement(na,{"cmdk-overlay":"",className:o}),l.createElement(ra,{"aria-label":e.label,"cmdk-dialog":"",className:a},l.createElement(ac,{ref:t,...s}))))}),Yg=l.forwardRef((e,t)=>gt(n=>n.filtered.count===0)?l.createElement(V.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),Hg=l.forwardRef((e,t)=>{let{progress:n,children:r,label:o="Loading...",...a}=e;return l.createElement(V.div,{ref:t,...a,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":o},br(e,i=>l.createElement("div",{"aria-hidden":!0},i)))}),Te=Object.assign(ac,{List:Bg,Item:Fg,Input:Wg,Group:$g,Separator:Lg,Dialog:Vg,Empty:Yg,Loading:Hg});function Gg(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function Ug(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function sc(e){let t=l.useRef(e);return Mt(()=>{t.current=e}),t}var Mt=typeof window>"u"?l.useEffect:l.useLayoutEffect;function Bt(e){let t=l.useRef();return t.current===void 0&&(t.current=e()),t}function gt(e){let t=oa(),n=()=>e(t.snapshot());return l.useSyncExternalStore(t.subscribe,n,n)}function ic(e,t,n,r=[]){let o=l.useRef(),a=In();return Mt(()=>{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(Wt,s),o.current=s}),o}var zg=()=>{let[e,t]=l.useState(),n=Bt(()=>new Map);return Mt(()=>{n.current.forEach(r=>r()),n.current=new Map},[e]),(r,o)=>{n.current.set(r,o),t({})}};function Kg(e){let t=e.type;return typeof t=="function"?t(e.props):"render"in t?t.render(e.props):e}function br({asChild:e,children:t},n){return e&&l.isValidElement(t)?l.cloneElement(Kg(t),{ref:t.ref},n(t.props.children)):n(t)}var qg={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};const xr=l.forwardRef(({className:e,...t},n)=>d.jsx(Te,{ref:n,className:k("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...t}));xr.displayName=Te.displayName;const cc={popover:50,tooltip:50,overlay:50,dialog:50,dropdown:50};let vn={...cc};function Xg(e){vn={...vn,...e}}function Zg(){return{...vn}}function Qg(){vn={...cc}}function Ye(e,t){return t??vn[e]}const aa=l.forwardRef(({className:e,zIndex:t,...n},r)=>{const o=Ye("overlay",t);return d.jsx(na,{ref:r,className:k(`fixed inset-0 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out
|
|
146
|
+
For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return l.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},Tg="DialogDescriptionWarning",Ag=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${qi(Tg).contentName}}.`;return l.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},Xi=_i,_g=Fi,Zi=Li,na=Wi,ra=Bi,Qi=Yi,Ji=Gi,ec=zi,ln='[cmdk-group=""]',so='[cmdk-group-items=""]',jg='[cmdk-group-heading=""]',tc='[cmdk-item=""]',vs=`${tc}:not([aria-disabled="true"])`,So="cmdk-item-select",Wt="data-value",Fg=(e,t,n)=>Ch(e,t,n),nc=l.createContext(void 0),In=()=>l.useContext(nc),rc=l.createContext(void 0),oa=()=>l.useContext(rc),oc=l.createContext(void 0),ac=l.forwardRef((e,t)=>{let n=Bt(()=>{var P,W;return{search:"",value:(W=(P=e.value)!=null?P:e.defaultValue)!=null?W:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),r=Bt(()=>new Set),o=Bt(()=>new Map),a=Bt(()=>new Map),i=Bt(()=>new Set),s=sc(e),{label:c,children:u,value:f,onValueChange:m,filter:p,shouldFilter:h,loop:y,disablePointerSelection:g=!1,vimBindings:v=!0,...w}=e,x=he(),b=he(),S=he(),C=l.useRef(null),M=Kg();Mt(()=>{if(f!==void 0){let P=f.trim();n.current.value=P,N.emit()}},[f]),Mt(()=>{M(6,Y)},[]);let N=l.useMemo(()=>({subscribe:P=>(i.current.add(P),()=>i.current.delete(P)),snapshot:()=>n.current,setState:(P,W,G)=>{var L,z,T,Q;if(!Object.is(n.current[P],W)){if(n.current[P]=W,P==="search")D(),A(),M(1,$);else if(P==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let K=document.getElementById(S);K?K.focus():(L=document.getElementById(x))==null||L.focus()}if(M(7,()=>{var K;n.current.selectedItemId=(K=H())==null?void 0:K.id,N.emit()}),G||M(5,Y),((z=s.current)==null?void 0:z.value)!==void 0){let K=W??"";(Q=(T=s.current).onValueChange)==null||Q.call(T,K);return}}N.emit()}},emit:()=>{i.current.forEach(P=>P())}}),[]),R=l.useMemo(()=>({value:(P,W,G)=>{var L;W!==((L=a.current.get(P))==null?void 0:L.value)&&(a.current.set(P,{value:W,keywords:G}),n.current.filtered.items.set(P,_(W,G)),M(2,()=>{A(),N.emit()}))},item:(P,W)=>(r.current.add(P),W&&(o.current.has(W)?o.current.get(W).add(P):o.current.set(W,new Set([P]))),M(3,()=>{D(),A(),n.current.value||$(),N.emit()}),()=>{a.current.delete(P),r.current.delete(P),n.current.filtered.items.delete(P);let G=H();M(4,()=>{D(),(G==null?void 0:G.getAttribute("id"))===P&&$(),N.emit()})}),group:P=>(o.current.has(P)||o.current.set(P,new Set),()=>{a.current.delete(P),o.current.delete(P)}),filter:()=>s.current.shouldFilter,label:c||e["aria-label"],getDisablePointerSelection:()=>s.current.disablePointerSelection,listId:x,inputId:S,labelId:b,listInnerRef:C}),[]);function _(P,W){var G,L;let z=(L=(G=s.current)==null?void 0:G.filter)!=null?L:Fg;return P?z(P,n.current.search,W):0}function A(){if(!n.current.search||s.current.shouldFilter===!1)return;let P=n.current.filtered.items,W=[];n.current.filtered.groups.forEach(L=>{let z=o.current.get(L),T=0;z.forEach(Q=>{let K=P.get(Q);T=Math.max(K,T)}),W.push([L,T])});let G=C.current;J().sort((L,z)=>{var T,Q;let K=L.getAttribute("id"),B=z.getAttribute("id");return((T=P.get(B))!=null?T:0)-((Q=P.get(K))!=null?Q:0)}).forEach(L=>{let z=L.closest(so);z?z.appendChild(L.parentElement===z?L:L.closest(`${so} > *`)):G.appendChild(L.parentElement===G?L:L.closest(`${so} > *`))}),W.sort((L,z)=>z[1]-L[1]).forEach(L=>{var z;let T=(z=C.current)==null?void 0:z.querySelector(`${ln}[${Wt}="${encodeURIComponent(L[0])}"]`);T==null||T.parentElement.appendChild(T)})}function $(){let P=J().find(G=>G.getAttribute("aria-disabled")!=="true"),W=P==null?void 0:P.getAttribute(Wt);N.setState("value",W||void 0)}function D(){var P,W,G,L;if(!n.current.search||s.current.shouldFilter===!1){n.current.filtered.count=r.current.size;return}n.current.filtered.groups=new Set;let z=0;for(let T of r.current){let Q=(W=(P=a.current.get(T))==null?void 0:P.value)!=null?W:"",K=(L=(G=a.current.get(T))==null?void 0:G.keywords)!=null?L:[],B=_(Q,K);n.current.filtered.items.set(T,B),B>0&&z++}for(let[T,Q]of o.current)for(let K of Q)if(n.current.filtered.items.get(K)>0){n.current.filtered.groups.add(T);break}n.current.filtered.count=z}function Y(){var P,W,G;let L=H();L&&(((P=L.parentElement)==null?void 0:P.firstChild)===L&&((G=(W=L.closest(ln))==null?void 0:W.querySelector(jg))==null||G.scrollIntoView({block:"nearest"})),L.scrollIntoView({block:"nearest"}))}function H(){var P;return(P=C.current)==null?void 0:P.querySelector(`${tc}[aria-selected="true"]`)}function J(){var P;return Array.from(((P=C.current)==null?void 0:P.querySelectorAll(vs))||[])}function j(P){let W=J()[P];W&&N.setState("value",W.getAttribute(Wt))}function X(P){var W;let G=H(),L=J(),z=L.findIndex(Q=>Q===G),T=L[z+P];(W=s.current)!=null&&W.loop&&(T=z+P<0?L[L.length-1]:z+P===L.length?L[0]:L[z+P]),T&&N.setState("value",T.getAttribute(Wt))}function F(P){let W=H(),G=W==null?void 0:W.closest(ln),L;for(;G&&!L;)G=P>0?Ug(G,ln):zg(G,ln),L=G==null?void 0:G.querySelector(vs);L?N.setState("value",L.getAttribute(Wt)):X(P)}let O=()=>j(J().length-1),Z=P=>{P.preventDefault(),P.metaKey?O():P.altKey?F(1):X(1)},te=P=>{P.preventDefault(),P.metaKey?j(0):P.altKey?F(-1):X(-1)};return l.createElement(V.div,{ref:t,tabIndex:-1,...w,"cmdk-root":"",onKeyDown:P=>{var W;(W=w.onKeyDown)==null||W.call(w,P);let G=P.nativeEvent.isComposing||P.keyCode===229;if(!(P.defaultPrevented||G))switch(P.key){case"n":case"j":{v&&P.ctrlKey&&Z(P);break}case"ArrowDown":{Z(P);break}case"p":case"k":{v&&P.ctrlKey&&te(P);break}case"ArrowUp":{te(P);break}case"Home":{P.preventDefault(),j(0);break}case"End":{P.preventDefault(),O();break}case"Enter":{P.preventDefault();let L=H();if(L){let z=new Event(So);L.dispatchEvent(z)}}}}},l.createElement("label",{"cmdk-label":"",htmlFor:R.inputId,id:R.labelId,style:Xg},c),br(e,P=>l.createElement(rc.Provider,{value:N},l.createElement(nc.Provider,{value:R},P))))}),$g=l.forwardRef((e,t)=>{var n,r;let o=he(),a=l.useRef(null),i=l.useContext(oc),s=In(),c=sc(e),u=(r=(n=c.current)==null?void 0:n.forceMount)!=null?r:i==null?void 0:i.forceMount;Mt(()=>{if(!u)return s.item(o,i==null?void 0:i.id)},[u]);let f=ic(o,a,[e.value,e.children,a],e.keywords),m=oa(),p=gt(M=>M.value&&M.value===f.current),h=gt(M=>u||s.filter()===!1?!0:M.search?M.filtered.items.get(o)>0:!0);l.useEffect(()=>{let M=a.current;if(!(!M||e.disabled))return M.addEventListener(So,y),()=>M.removeEventListener(So,y)},[h,e.onSelect,e.disabled]);function y(){var M,N;g(),(N=(M=c.current).onSelect)==null||N.call(M,f.current)}function g(){m.setState("value",f.current,!0)}if(!h)return null;let{disabled:v,value:w,onSelect:x,forceMount:b,keywords:S,...C}=e;return l.createElement(V.div,{ref:Xe(a,t),...C,id:o,"cmdk-item":"",role:"option","aria-disabled":!!v,"aria-selected":!!p,"data-disabled":!!v,"data-selected":!!p,onPointerMove:v||s.getDisablePointerSelection()?void 0:g,onClick:v?void 0:y},e.children)}),Lg=l.forwardRef((e,t)=>{let{heading:n,children:r,forceMount:o,...a}=e,i=he(),s=l.useRef(null),c=l.useRef(null),u=he(),f=In(),m=gt(h=>o||f.filter()===!1?!0:h.search?h.filtered.groups.has(i):!0);Mt(()=>f.group(i),[]),ic(i,s,[e.value,e.heading,c]);let p=l.useMemo(()=>({id:i,forceMount:o}),[o]);return l.createElement(V.div,{ref:Xe(s,t),...a,"cmdk-group":"",role:"presentation",hidden:m?void 0:!0},n&&l.createElement("div",{ref:c,"cmdk-group-heading":"","aria-hidden":!0,id:u},n),br(e,h=>l.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?u:void 0},l.createElement(oc.Provider,{value:p},h))))}),Wg=l.forwardRef((e,t)=>{let{alwaysRender:n,...r}=e,o=l.useRef(null),a=gt(i=>!i.search);return!n&&!a?null:l.createElement(V.div,{ref:Xe(o,t),...r,"cmdk-separator":"",role:"separator"})}),Bg=l.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,o=e.value!=null,a=oa(),i=gt(u=>u.search),s=gt(u=>u.selectedItemId),c=In();return l.useEffect(()=>{e.value!=null&&a.setState("search",e.value)},[e.value]),l.createElement(V.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)}})}),Vg=l.forwardRef((e,t)=>{let{children:n,label:r="Suggestions",...o}=e,a=l.useRef(null),i=l.useRef(null),s=gt(u=>u.selectedItemId),c=In();return l.useEffect(()=>{if(i.current&&a.current){let u=i.current,f=a.current,m,p=new ResizeObserver(()=>{m=requestAnimationFrame(()=>{let h=u.offsetHeight;f.style.setProperty("--cmdk-list-height",h.toFixed(1)+"px")})});return p.observe(u),()=>{cancelAnimationFrame(m),p.unobserve(u)}}},[]),l.createElement(V.div,{ref:Xe(a,t),...o,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":s,"aria-label":r,id:c.listId},br(e,u=>l.createElement("div",{ref:Xe(i,c.listInnerRef),"cmdk-list-sizer":""},u)))}),Yg=l.forwardRef((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:o,contentClassName:a,container:i,...s}=e;return l.createElement(Xi,{open:n,onOpenChange:r},l.createElement(Zi,{container:i},l.createElement(na,{"cmdk-overlay":"",className:o}),l.createElement(ra,{"aria-label":e.label,"cmdk-dialog":"",className:a},l.createElement(ac,{ref:t,...s}))))}),Hg=l.forwardRef((e,t)=>gt(n=>n.filtered.count===0)?l.createElement(V.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),Gg=l.forwardRef((e,t)=>{let{progress:n,children:r,label:o="Loading...",...a}=e;return l.createElement(V.div,{ref:t,...a,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":o},br(e,i=>l.createElement("div",{"aria-hidden":!0},i)))}),Te=Object.assign(ac,{List:Vg,Item:$g,Input:Bg,Group:Lg,Separator:Wg,Dialog:Yg,Empty:Hg,Loading:Gg});function Ug(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function zg(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function sc(e){let t=l.useRef(e);return Mt(()=>{t.current=e}),t}var Mt=typeof window>"u"?l.useEffect:l.useLayoutEffect;function Bt(e){let t=l.useRef();return t.current===void 0&&(t.current=e()),t}function gt(e){let t=oa(),n=()=>e(t.snapshot());return l.useSyncExternalStore(t.subscribe,n,n)}function ic(e,t,n,r=[]){let o=l.useRef(),a=In();return Mt(()=>{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(Wt,s),o.current=s}),o}var Kg=()=>{let[e,t]=l.useState(),n=Bt(()=>new Map);return Mt(()=>{n.current.forEach(r=>r()),n.current=new Map},[e]),(r,o)=>{n.current.set(r,o),t({})}};function qg(e){let t=e.type;return typeof t=="function"?t(e.props):"render"in t?t.render(e.props):e}function br({asChild:e,children:t},n){return e&&l.isValidElement(t)?l.cloneElement(qg(t),{ref:t.ref},n(t.props.children)):n(t)}var Xg={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};const xr=l.forwardRef(({className:e,...t},n)=>d.jsx(Te,{ref:n,className:k("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...t}));xr.displayName=Te.displayName;const cc={popover:50,tooltip:50,overlay:50,dialog:50,dropdown:50};let vn={...cc};function Zg(e){vn={...vn,...e}}function Qg(){return{...vn}}function Jg(){vn={...cc}}function Ye(e,t){return t??vn[e]}const aa=l.forwardRef(({className:e,zIndex:t,...n},r)=>{const o=Ye("overlay",t);return d.jsx(na,{ref:r,className:k(`fixed inset-0 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out
|
|
147
147
|
data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0`,e),style:{zIndex:o,...n.style},...n})});aa.displayName=na.displayName;const lc=l.forwardRef(({className:e,children:t,zIndex:n,...r},o)=>{const a=Ye("dialog",n);return d.jsxs(uc,{children:[d.jsx(aa,{}),d.jsxs(ra,{ref:o,className:k(`fixed left-[50%] top-[50%] grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%]
|
|
148
148
|
gap-4 border bg-background px-6 py-6 shadow-lg duration-200 data-[state=open]:animate-in
|
|
149
149
|
data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0
|
|
@@ -151,51 +151,49 @@ For more information, see https://radix-ui.com/primitives/docs/components/${t.do
|
|
|
151
151
|
data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%]
|
|
152
152
|
data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%]
|
|
153
153
|
sm:rounded-lg`,e),style:{zIndex:a,...r.style},...r,children:[t,d.jsxs(ec,{className:k(ae.focusRing,ae.focusRingSm,`absolute right-4 top-4 shrink-0 rounded-full bg-transparent px-1.5 py-1.5 opacity-70
|
|
154
|
-
transition hover:bg-black/10 hover:opacity-100 focus:bg-black/10 focus:opacity-100`),children:[d.jsx(pr,{className:"h-5 w-5",strokeWidth:3}),d.jsx("span",{className:"sr-only",children:"Close"})]})]})]})});lc.displayName=ra.displayName;const
|
|
154
|
+
transition hover:bg-black/10 hover:opacity-100 focus:bg-black/10 focus:opacity-100`),children:[d.jsx(pr,{className:"h-5 w-5",strokeWidth:3}),d.jsx("span",{className:"sr-only",children:"Close"})]})]})]})});lc.displayName=ra.displayName;const ev=Xi,tv=_g,uc=Zi,nv=ec,rv=V.div,dc="px-3 py-2.5 text-sm",sa=l.forwardRef((e,t)=>d.jsx(Te.Empty,{ref:t,className:dc,...e}));sa.displayName=Te.Empty.displayName;const No=l.forwardRef((e,t)=>d.jsx(rv,{ref:t,className:dc,...e,"cmdk-empty":"",role:"presentation"}));No.displayName="CommandForceEmpty";const wr=l.forwardRef(({className:e,...t},n)=>d.jsx(Te.Group,{ref:n,className:k(`overflow-hidden px-1 py-1 text-foreground [&_[cmdk-group-heading]]:px-2
|
|
155
155
|
[&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs
|
|
156
|
-
[&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground`,e),...t}));wr.displayName=Te.Group.displayName;const Cr=l.forwardRef(({className:e,...t},n)=>d.jsxs("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[d.jsx(
|
|
156
|
+
[&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground`,e),...t}));wr.displayName=Te.Group.displayName;const Cr=l.forwardRef(({className:e,...t},n)=>d.jsxs("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[d.jsx(eh,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),d.jsx(Te.Input,{ref:n,className:k(`flex h-11 w-full rounded-sm bg-transparent py-3 text-sm outline-none
|
|
157
157
|
placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50`,e),...t})]}));Cr.displayName=Te.Input.displayName;const Sr=l.forwardRef(({className:e,...t},n)=>d.jsx(Te.Item,{ref:n,className:k(`relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm
|
|
158
158
|
outline-none aria-disabled:pointer-events-none aria-disabled:opacity-50
|
|
159
|
-
aria-selected:bg-accent aria-selected:text-accent-foreground`,e),...t}));Sr.displayName=Te.Item.displayName;const Nr=l.forwardRef(({className:e,...t},n)=>d.jsx(Te.List,{ref:n,className:k("max-h-[20rem] overflow-y-auto overflow-x-hidden",e),...t}));Nr.displayName=Te.List.displayName;const fc=({children:e="Loading...",...t})=>d.jsxs("div",{className:"flex items-center gap-2 px-3 py-2.5 text-sm text-muted-foreground",...t,children:[d.jsx(yi,{className:"h-4 w-4 animate-spin"}),e]});fc.displayName="CommandLoading";const rv=["top","right","bottom","left"],vt=Math.min,Pe=Math.max,or=Math.round,Xn=Math.floor,qe=e=>({x:e,y:e}),ov={left:"right",right:"left",bottom:"top",top:"bottom"},av={start:"end",end:"start"};function Eo(e,t,n){return Pe(e,vt(t,n))}function st(e,t){return typeof e=="function"?e(t):e}function it(e){return e.split("-")[0]}function Xt(e){return e.split("-")[1]}function ia(e){return e==="x"?"y":"x"}function ca(e){return e==="y"?"height":"width"}function yt(e){return["top","bottom"].includes(it(e))?"y":"x"}function la(e){return ia(yt(e))}function sv(e,t,n){n===void 0&&(n=!1);const r=Xt(e),o=la(e),a=ca(o);let i=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(i=ar(i)),[i,ar(i)]}function iv(e){const t=ar(e);return[Mo(e),t,Mo(t)]}function Mo(e){return e.replace(/start|end/g,t=>av[t])}function cv(e,t,n){const r=["left","right"],o=["right","left"],a=["top","bottom"],i=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?a:i;default:return[]}}function lv(e,t,n,r){const o=Xt(e);let a=cv(it(e),n==="start",r);return o&&(a=a.map(i=>i+"-"+o),t&&(a=a.concat(a.map(Mo)))),a}function ar(e){return e.replace(/left|right|bottom|top/g,t=>ov[t])}function uv(e){return{top:0,right:0,bottom:0,left:0,...e}}function mc(e){return typeof e!="number"?uv(e):{top:e,right:e,bottom:e,left:e}}function sr(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 ys(e,t,n){let{reference:r,floating:o}=e;const a=yt(t),i=la(t),s=ca(i),c=it(t),u=a==="y",f=r.x+r.width/2-o.width/2,m=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:m};break;case"left":h={x:r.x-o.width,y:m};break;default:h={x:r.x,y:r.y}}switch(Xt(t)){case"start":h[i]-=p*(n&&u?-1:1);break;case"end":h[i]+=p*(n&&u?-1:1);break}return h}const dv=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:m}=ys(u,r,c),p=r,h={},y=0;for(let g=0;g<s.length;g++){const{name:v,fn:w}=s[g],{x,y:b,data:S,reset:C}=await w({x:f,y:m,initialPlacement:r,placement:p,strategy:o,middlewareData:h,rects:u,platform:i,elements:{reference:e,floating:t}});f=x??f,m=b??m,h={...h,[v]:{...h[v],...S}},C&&y<=50&&(y++,typeof C=="object"&&(C.placement&&(p=C.placement),C.rects&&(u=C.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:o}):C.rects),{x:f,y:m}=ys(u,p,c)),g=-1)}return{x:f,y:m,placement:p,strategy:o,middlewareData:h}};async function yn(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:m="floating",altBoundary:p=!1,padding:h=0}=st(t,e),y=mc(h),v=s[p?m==="floating"?"reference":"floating":m],w=sr(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})),x=m==="floating"?{x:r,y:o,width:i.floating.width,height:i.floating.height}:i.reference,b=await(a.getOffsetParent==null?void 0:a.getOffsetParent(s.floating)),S=await(a.isElement==null?void 0:a.isElement(b))?await(a.getScale==null?void 0:a.getScale(b))||{x:1,y:1}:{x:1,y:1},C=sr(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:x,offsetParent:b,strategy:c}):x);return{top:(w.top-C.top+y.top)/S.y,bottom:(C.bottom-w.bottom+y.bottom)/S.y,left:(w.left-C.left+y.left)/S.x,right:(C.right-w.right+y.right)/S.x}}const fv=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}=st(e,t)||{};if(u==null)return{};const m=mc(f),p={x:n,y:r},h=la(o),y=ca(h),g=await i.getDimensions(u),v=h==="y",w=v?"top":"left",x=v?"bottom":"right",b=v?"clientHeight":"clientWidth",S=a.reference[y]+a.reference[h]-p[h]-a.floating[y],C=p[h]-a.reference[h],M=await(i.getOffsetParent==null?void 0:i.getOffsetParent(u));let N=M?M[b]:0;(!N||!await(i.isElement==null?void 0:i.isElement(M)))&&(N=s.floating[b]||a.floating[y]);const R=S/2-C/2,_=N/2-g[y]/2-1,A=vt(m[w],_),$=vt(m[x],_),D=A,Y=N-g[y]-$,H=N/2-g[y]/2+R,J=Eo(D,H,Y),j=!c.arrow&&Xt(o)!=null&&H!==J&&a.reference[y]/2-(H<D?A:$)-g[y]/2<0,X=j?H<D?H-D:H-Y:0;return{[h]:p[h]+X,data:{[h]:J,centerOffset:H-J-X,...j&&{alignmentOffset:X}},reset:j}}}),mv=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:m=!0,fallbackPlacements:p,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:y="none",flipAlignment:g=!0,...v}=st(e,t);if((n=a.arrow)!=null&&n.alignmentOffset)return{};const w=it(o),x=yt(s),b=it(s)===s,S=await(c.isRTL==null?void 0:c.isRTL(u.floating)),C=p||(b||!g?[ar(s)]:iv(s)),M=y!=="none";!p&&M&&C.push(...lv(s,g,y,S));const N=[s,...C],R=await yn(t,v),_=[];let A=((r=a.flip)==null?void 0:r.overflows)||[];if(f&&_.push(R[w]),m){const H=sv(o,i,S);_.push(R[H[0]],R[H[1]])}if(A=[...A,{placement:o,overflows:_}],!_.every(H=>H<=0)){var $,D;const H=((($=a.flip)==null?void 0:$.index)||0)+1,J=N[H];if(J)return{data:{index:H,overflows:A},reset:{placement:J}};let j=(D=A.filter(X=>X.overflows[0]<=0).sort((X,F)=>X.overflows[1]-F.overflows[1])[0])==null?void 0:D.placement;if(!j)switch(h){case"bestFit":{var Y;const X=(Y=A.filter(F=>{if(M){const O=yt(F.placement);return O===x||O==="y"}return!0}).map(F=>[F.placement,F.overflows.filter(O=>O>0).reduce((O,Z)=>O+Z,0)]).sort((F,O)=>F[1]-O[1])[0])==null?void 0:Y[0];X&&(j=X);break}case"initialPlacement":j=s;break}if(o!==j)return{reset:{placement:j}}}return{}}}};function bs(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function xs(e){return rv.some(t=>e[t]>=0)}const pv=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=st(e,t);switch(r){case"referenceHidden":{const a=await yn(t,{...o,elementContext:"reference"}),i=bs(a,n.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:xs(i)}}}case"escaped":{const a=await yn(t,{...o,altBoundary:!0}),i=bs(a,n.floating);return{data:{escapedOffsets:i,escaped:xs(i)}}}default:return{}}}}};async function hv(e,t){const{placement:n,platform:r,elements:o}=e,a=await(r.isRTL==null?void 0:r.isRTL(o.floating)),i=it(n),s=Xt(n),c=yt(n)==="y",u=["left","top"].includes(i)?-1:1,f=a&&c?-1:1,m=st(t,e);let{mainAxis:p,crossAxis:h,alignmentAxis:y}=typeof m=="number"?{mainAxis:m,crossAxis:0,alignmentAxis:null}:{mainAxis:m.mainAxis||0,crossAxis:m.crossAxis||0,alignmentAxis:m.alignmentAxis};return s&&typeof y=="number"&&(h=s==="end"?y*-1:y),c?{x:h*f,y:p*u}:{x:p*u,y:h*f}}const gv=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 hv(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}}}}},vv=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:a=!0,crossAxis:i=!1,limiter:s={fn:v=>{let{x:w,y:x}=v;return{x:w,y:x}}},...c}=st(e,t),u={x:n,y:r},f=await yn(t,c),m=yt(it(o)),p=ia(m);let h=u[p],y=u[m];if(a){const v=p==="y"?"top":"left",w=p==="y"?"bottom":"right",x=h+f[v],b=h-f[w];h=Eo(x,h,b)}if(i){const v=m==="y"?"top":"left",w=m==="y"?"bottom":"right",x=y+f[v],b=y-f[w];y=Eo(x,y,b)}const g=s.fn({...t,[p]:h,[m]:y});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[p]:a,[m]:i}}}}}},yv=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}=st(e,t),f={x:n,y:r},m=yt(o),p=ia(m);let h=f[p],y=f[m];const g=st(s,t),v=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(c){const b=p==="y"?"height":"width",S=a.reference[p]-a.floating[b]+v.mainAxis,C=a.reference[p]+a.reference[b]-v.mainAxis;h<S?h=S:h>C&&(h=C)}if(u){var w,x;const b=p==="y"?"width":"height",S=["top","left"].includes(it(o)),C=a.reference[m]-a.floating[b]+(S&&((w=i.offset)==null?void 0:w[m])||0)+(S?0:v.crossAxis),M=a.reference[m]+a.reference[b]+(S?0:((x=i.offset)==null?void 0:x[m])||0)-(S?v.crossAxis:0);y<C?y=C:y>M&&(y=M)}return{[p]:h,[m]:y}}}},bv=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}=st(e,t),f=await yn(t,u),m=it(o),p=Xt(o),h=yt(o)==="y",{width:y,height:g}=a.floating;let v,w;m==="top"||m==="bottom"?(v=m,w=p===(await(i.isRTL==null?void 0:i.isRTL(s.floating))?"start":"end")?"left":"right"):(w=m,v=p==="end"?"top":"bottom");const x=g-f.top-f.bottom,b=y-f.left-f.right,S=vt(g-f[v],x),C=vt(y-f[w],b),M=!t.middlewareData.shift;let N=S,R=C;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(R=b),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(N=x),M&&!p){const A=Pe(f.left,0),$=Pe(f.right,0),D=Pe(f.top,0),Y=Pe(f.bottom,0);h?R=y-2*(A!==0||$!==0?A+$:Pe(f.left,f.right)):N=g-2*(D!==0||Y!==0?D+Y:Pe(f.top,f.bottom))}await c({...t,availableWidth:R,availableHeight:N});const _=await i.getDimensions(s.floating);return y!==_.width||g!==_.height?{reset:{rects:!0}}:{}}}};function Er(){return typeof window<"u"}function Zt(e){return pc(e)?(e.nodeName||"").toLowerCase():"#document"}function ke(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Qe(e){var t;return(t=(pc(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function pc(e){return Er()?e instanceof Node||e instanceof ke(e).Node:!1}function Le(e){return Er()?e instanceof Element||e instanceof ke(e).Element:!1}function Ze(e){return Er()?e instanceof HTMLElement||e instanceof ke(e).HTMLElement:!1}function ws(e){return!Er()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ke(e).ShadowRoot}function Dn(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=We(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function xv(e){return["table","td","th"].includes(Zt(e))}function Mr(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function ua(e){const t=da(),n=Le(e)?We(e):e;return["transform","translate","scale","rotate","perspective"].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)||["transform","translate","scale","rotate","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function wv(e){let t=bt(e);for(;Ze(t)&&!Gt(t);){if(ua(t))return t;if(Mr(t))return null;t=bt(t)}return null}function da(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Gt(e){return["html","body","#document"].includes(Zt(e))}function We(e){return ke(e).getComputedStyle(e)}function Rr(e){return Le(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function bt(e){if(Zt(e)==="html")return e;const t=e.assignedSlot||e.parentNode||ws(e)&&e.host||Qe(e);return ws(t)?t.host:t}function hc(e){const t=bt(e);return Gt(t)?e.ownerDocument?e.ownerDocument.body:e.body:Ze(t)&&Dn(t)?t:hc(t)}function bn(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=hc(e),a=o===((r=e.ownerDocument)==null?void 0:r.body),i=ke(o);if(a){const s=Ro(i);return t.concat(i,i.visualViewport||[],Dn(o)?o:[],s&&n?bn(s):[])}return t.concat(o,bn(o,[],n))}function Ro(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function gc(e){const t=We(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Ze(e),a=o?e.offsetWidth:n,i=o?e.offsetHeight:r,s=or(n)!==a||or(r)!==i;return s&&(n=a,r=i),{width:n,height:r,$:s}}function fa(e){return Le(e)?e:e.contextElement}function Ht(e){const t=fa(e);if(!Ze(t))return qe(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:a}=gc(t);let i=(a?or(n.width):n.width)/r,s=(a?or(n.height):n.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!s||!Number.isFinite(s))&&(s=1),{x:i,y:s}}const Cv=qe(0);function vc(e){const t=ke(e);return!da()||!t.visualViewport?Cv:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Sv(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==ke(e)?!1:t}function Rt(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),a=fa(e);let i=qe(1);t&&(r?Le(r)&&(i=Ht(r)):i=Ht(e));const s=Sv(a,n,r)?vc(a):qe(0);let c=(o.left+s.x)/i.x,u=(o.top+s.y)/i.y,f=o.width/i.x,m=o.height/i.y;if(a){const p=ke(a),h=r&&Le(r)?ke(r):r;let y=p,g=Ro(y);for(;g&&r&&h!==y;){const v=Ht(g),w=g.getBoundingClientRect(),x=We(g),b=w.left+(g.clientLeft+parseFloat(x.paddingLeft))*v.x,S=w.top+(g.clientTop+parseFloat(x.paddingTop))*v.y;c*=v.x,u*=v.y,f*=v.x,m*=v.y,c+=b,u+=S,y=ke(g),g=Ro(y)}}return sr({width:f,height:m,x:c,y:u})}function ma(e,t){const n=Rr(e).scrollLeft;return t?t.left+n:Rt(Qe(e)).left+n}function yc(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),o=r.left+t.scrollLeft-(n?0:ma(e,r)),a=r.top+t.scrollTop;return{x:o,y:a}}function Nv(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const a=o==="fixed",i=Qe(r),s=t?Mr(t.floating):!1;if(r===i||s&&a)return n;let c={scrollLeft:0,scrollTop:0},u=qe(1);const f=qe(0),m=Ze(r);if((m||!m&&!a)&&((Zt(r)!=="body"||Dn(i))&&(c=Rr(r)),Ze(r))){const h=Rt(r);u=Ht(r),f.x=h.x+r.clientLeft,f.y=h.y+r.clientTop}const p=i&&!m&&!a?yc(i,c,!0):qe(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 Mv(e){const t=Qe(e),n=Rr(e),r=e.ownerDocument.body,o=Pe(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=Pe(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+ma(e);const s=-n.scrollTop;return We(r).direction==="rtl"&&(i+=Pe(t.clientWidth,r.clientWidth)-o),{width:o,height:a,x:i,y:s}}function Rv(e,t){const n=ke(e),r=Qe(e),o=n.visualViewport;let a=r.clientWidth,i=r.clientHeight,s=0,c=0;if(o){a=o.width,i=o.height;const u=da();(!u||u&&t==="fixed")&&(s=o.offsetLeft,c=o.offsetTop)}return{width:a,height:i,x:s,y:c}}function Pv(e,t){const n=Rt(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,a=Ze(e)?Ht(e):qe(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 Cs(e,t,n){let r;if(t==="viewport")r=Rv(e,n);else if(t==="document")r=Mv(Qe(e));else if(Le(t))r=Pv(t,n);else{const o=vc(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return sr(r)}function bc(e,t){const n=bt(e);return n===t||!Le(n)||Gt(n)?!1:We(n).position==="fixed"||bc(n,t)}function kv(e,t){const n=t.get(e);if(n)return n;let r=bn(e,[],!1).filter(s=>Le(s)&&Zt(s)!=="body"),o=null;const a=We(e).position==="fixed";let i=a?bt(e):e;for(;Le(i)&&!Gt(i);){const s=We(i),c=ua(i);!c&&s.position==="fixed"&&(o=null),(a?!c&&!o:!c&&s.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||Dn(i)&&!c&&bc(e,i))?r=r.filter(f=>f!==i):o=s,i=bt(i)}return t.set(e,r),r}function Ov(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[...n==="clippingAncestors"?Mr(t)?[]:kv(t,this._c):[].concat(n),r],s=i[0],c=i.reduce((u,f)=>{const m=Cs(t,f,o);return u.top=Pe(m.top,u.top),u.right=vt(m.right,u.right),u.bottom=vt(m.bottom,u.bottom),u.left=Pe(m.left,u.left),u},Cs(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}=gc(e);return{width:t,height:n}}function Dv(e,t,n){const r=Ze(t),o=Qe(t),a=n==="fixed",i=Rt(e,!0,a,t);let s={scrollLeft:0,scrollTop:0};const c=qe(0);if(r||!r&&!a)if((Zt(t)!=="body"||Dn(o))&&(s=Rr(t)),r){const p=Rt(t,!0,a,t);c.x=p.x+t.clientLeft,c.y=p.y+t.clientTop}else o&&(c.x=ma(o));const u=o&&!r&&!a?yc(o,s):qe(0),f=i.left+s.scrollLeft-c.x-u.x,m=i.top+s.scrollTop-c.y-u.y;return{x:f,y:m,width:i.width,height:i.height}}function io(e){return We(e).position==="static"}function Ss(e,t){if(!Ze(e)||We(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Qe(e)===n&&(n=n.ownerDocument.body),n}function xc(e,t){const n=ke(e);if(Mr(e))return n;if(!Ze(e)){let o=bt(e);for(;o&&!Gt(o);){if(Le(o)&&!io(o))return o;o=bt(o)}return n}let r=Ss(e,t);for(;r&&xv(r)&&io(r);)r=Ss(r,t);return r&&Gt(r)&&io(r)&&!ua(r)?n:r||wv(e)||n}const Tv=async function(e){const t=this.getOffsetParent||xc,n=this.getDimensions,r=await n(e.floating);return{reference:Dv(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Av(e){return We(e).direction==="rtl"}const _v={convertOffsetParentRelativeRectToViewportRelativeRect:Nv,getDocumentElement:Qe,getClippingRect:Ov,getOffsetParent:xc,getElementRects:Tv,getClientRects:Ev,getDimensions:Iv,getScale:Ht,isElement:Le,isRTL:Av};function wc(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function jv(e,t){let n=null,r;const o=Qe(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:m,width:p,height:h}=u;if(s||t(),!p||!h)return;const y=Xn(m),g=Xn(o.clientWidth-(f+p)),v=Xn(o.clientHeight-(m+h)),w=Xn(f),b={rootMargin:-y+"px "+-g+"px "+-v+"px "+-w+"px",threshold:Pe(0,vt(1,c))||1};let S=!0;function C(M){const N=M[0].intersectionRatio;if(N!==c){if(!S)return i();N?i(!1,N):r=setTimeout(()=>{i(!1,1e-7)},1e3)}N===1&&!wc(u,e.getBoundingClientRect())&&i(),S=!1}try{n=new IntersectionObserver(C,{...b,root:o.ownerDocument})}catch{n=new IntersectionObserver(C,b)}n.observe(e)}return i(!0),a}function Cc(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=fa(e),f=o||a?[...u?bn(u):[],...bn(t)]:[];f.forEach(w=>{o&&w.addEventListener("scroll",n,{passive:!0}),a&&w.addEventListener("resize",n)});const m=u&&s?jv(u,n):null;let p=-1,h=null;i&&(h=new ResizeObserver(w=>{let[x]=w;x&&x.target===u&&h&&(h.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var b;(b=h)==null||b.observe(t)})),n()}),u&&!c&&h.observe(u),h.observe(t));let y,g=c?Rt(e):null;c&&v();function v(){const w=Rt(e);g&&!wc(g,w)&&n(),g=w,y=requestAnimationFrame(v)}return n(),()=>{var w;f.forEach(x=>{o&&x.removeEventListener("scroll",n),a&&x.removeEventListener("resize",n)}),m==null||m(),(w=h)==null||w.disconnect(),h=null,c&&cancelAnimationFrame(y)}}const Fv=gv,$v=vv,Lv=mv,Wv=bv,Bv=pv,Ns=fv,Vv=yv,Yv=(e,t,n)=>{const r=new Map,o={platform:_v,...n},a={...o.platform,_c:r};return dv(e,t,{...o,platform:a})};var tr=typeof document<"u"?E.useLayoutEffect:E.useEffect;function ir(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(!ir(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)&&!ir(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function Sc(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Es(e,t){const n=Sc(e);return Math.round(t*n)/n}function co(e){const t=l.useRef(e);return tr(()=>{t.current=e}),t}function Nc(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,m]=l.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,h]=l.useState(r);ir(p,r)||h(r);const[y,g]=l.useState(null),[v,w]=l.useState(null),x=l.useCallback(F=>{F!==M.current&&(M.current=F,g(F))},[]),b=l.useCallback(F=>{F!==N.current&&(N.current=F,w(F))},[]),S=a||y,C=i||v,M=l.useRef(null),N=l.useRef(null),R=l.useRef(f),_=c!=null,A=co(c),$=co(o),D=co(u),Y=l.useCallback(()=>{if(!M.current||!N.current)return;const F={placement:t,strategy:n,middleware:p};$.current&&(F.platform=$.current),Yv(M.current,N.current,F).then(O=>{const Z={...O,isPositioned:D.current!==!1};H.current&&!ir(R.current,Z)&&(R.current=Z,En.flushSync(()=>{m(Z)}))})},[p,t,n,$,D]);tr(()=>{u===!1&&R.current.isPositioned&&(R.current.isPositioned=!1,m(F=>({...F,isPositioned:!1})))},[u]);const H=l.useRef(!1);tr(()=>(H.current=!0,()=>{H.current=!1}),[]),tr(()=>{if(S&&(M.current=S),C&&(N.current=C),S&&C){if(A.current)return A.current(S,C,Y);Y()}},[S,C,Y,A,_]);const J=l.useMemo(()=>({reference:M,floating:N,setReference:x,setFloating:b}),[x,b]),j=l.useMemo(()=>({reference:S,floating:C}),[S,C]),X=l.useMemo(()=>{const F={position:n,left:0,top:0};if(!j.floating)return F;const O=Es(j.floating,f.x),Z=Es(j.floating,f.y);return s?{...F,transform:"translate("+O+"px, "+Z+"px)",...Sc(j.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:O,top:Z}},[n,s,j.floating,f.x,f.y]);return l.useMemo(()=>({...f,update:Y,refs:J,elements:j,floatingStyles:X}),[f,Y,J,j,X])}const Hv=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?Ns({element:r.current,padding:o}).fn(n):{}:r?Ns({element:r,padding:o}).fn(n):{}}}},Ec=(e,t)=>({...Fv(e),options:[e,t]}),Mc=(e,t)=>({...$v(e),options:[e,t]}),Rc=(e,t)=>({...Vv(e),options:[e,t]}),Pc=(e,t)=>({...Lv(e),options:[e,t]}),kc=(e,t)=>({...Wv(e),options:[e,t]}),Oc=(e,t)=>({...Bv(e),options:[e,t]}),Ic=(e,t)=>({...Hv(e),options:[e,t]});var Gv="Arrow",Dc=l.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...a}=e;return d.jsx(V.svg,{...a,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:d.jsx("polygon",{points:"0,0 30,0 15,10"})})});Dc.displayName=Gv;var Uv=Dc;function Tn(e){const[t,n]=l.useState(void 0);return fe(()=>{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 pa="Popper",[Tc,Qt]=ve(pa),[zv,Ac]=Tc(pa),_c=e=>{const{__scopePopper:t,children:n}=e,[r,o]=l.useState(null);return d.jsx(zv,{scope:t,anchor:r,onAnchorChange:o,children:n})};_c.displayName=pa;var jc="PopperAnchor",Fc=l.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,a=Ac(jc,n),i=l.useRef(null),s=q(t,i);return l.useEffect(()=>{a.onAnchorChange((r==null?void 0:r.current)||i.current)}),r?null:d.jsx(V.div,{...o,ref:s})});Fc.displayName=jc;var ha="PopperContent",[Kv,qv]=Tc(ha),$c=l.forwardRef((e,t)=>{var T,Q,K,B,ee,ne;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:m="partial",hideWhenDetached:p=!1,updatePositionStrategy:h="optimized",onPlaced:y,...g}=e,v=Ac(ha,n),[w,x]=l.useState(null),b=q(t,le=>x(le)),[S,C]=l.useState(null),M=Tn(S),N=(M==null?void 0:M.width)??0,R=(M==null?void 0:M.height)??0,_=r+(a!=="center"?"-"+a:""),A=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},$=Array.isArray(u)?u:[u],D=$.length>0,Y={padding:A,boundary:$.filter(Zv),altBoundary:D},{refs:H,floatingStyles:J,placement:j,isPositioned:X,middlewareData:F}=Nc({strategy:"fixed",placement:_,whileElementsMounted:(...le)=>Cc(...le,{animationFrame:h==="always"}),elements:{reference:v.anchor},middleware:[Ec({mainAxis:o+R,alignmentAxis:i}),c&&Mc({mainAxis:!0,crossAxis:!1,limiter:m==="partial"?Rc():void 0,...Y}),c&&Pc({...Y}),kc({...Y,apply:({elements:le,rects:ye,availableWidth:et,availableHeight:tt})=>{const{width:nt,height:an}=ye.reference,Ae=le.floating.style;Ae.setProperty("--radix-popper-available-width",`${et}px`),Ae.setProperty("--radix-popper-available-height",`${tt}px`),Ae.setProperty("--radix-popper-anchor-width",`${nt}px`),Ae.setProperty("--radix-popper-anchor-height",`${an}px`)}}),S&&Ic({element:S,padding:s}),Qv({arrowWidth:N,arrowHeight:R}),p&&Oc({strategy:"referenceHidden",...Y})]}),[O,Z]=Bc(j),te=Ne(y);fe(()=>{X&&(te==null||te())},[X,te]);const P=(T=F.arrow)==null?void 0:T.x,W=(Q=F.arrow)==null?void 0:Q.y,G=((K=F.arrow)==null?void 0:K.centerOffset)!==0,[L,z]=l.useState();return fe(()=>{w&&z(window.getComputedStyle(w).zIndex)},[w]),d.jsx("div",{ref:H.setFloating,"data-radix-popper-content-wrapper":"",style:{...J,transform:X?J.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:L,"--radix-popper-transform-origin":[(B=F.transformOrigin)==null?void 0:B.x,(ee=F.transformOrigin)==null?void 0:ee.y].join(" "),...((ne=F.hide)==null?void 0:ne.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:d.jsx(Kv,{scope:n,placedSide:O,onArrowChange:C,arrowX:P,arrowY:W,shouldHideArrow:G,children:d.jsx(V.div,{"data-side":O,"data-align":Z,...g,ref:b,style:{...g.style,animation:X?void 0:"none"}})})})});$c.displayName=ha;var Lc="PopperArrow",Xv={top:"bottom",right:"left",bottom:"top",left:"right"},Wc=l.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,a=qv(Lc,r),i=Xv[a.placedSide];return d.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:d.jsx(Uv,{...o,ref:n,style:{...o.style,display:"block"}})})});Wc.displayName=Lc;function Zv(e){return e!==null}var Qv=e=>({name:"transformOrigin",options:e,fn(t){var v,w,x;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]=Bc(n),m={start:"0%",center:"50%",end:"100%"}[f],p=(((w=o.arrow)==null?void 0:w.x)??0)+s/2,h=(((x=o.arrow)==null?void 0:x.y)??0)+c/2;let y="",g="";return u==="bottom"?(y=i?m:`${p}px`,g=`${-c}px`):u==="top"?(y=i?m:`${p}px`,g=`${r.floating.height+c}px`):u==="right"?(y=`${-c}px`,g=i?m:`${h}px`):u==="left"&&(y=`${r.floating.width+c}px`,g=i?m:`${h}px`),{data:{x:y,y:g}}}});function Bc(e){const[t,n="center"]=e.split("-");return[t,n]}var ga=_c,Pr=Fc,va=$c,ya=Wc,kr="Popover",[Vc,ZN]=ve(kr,[Qt]),An=Qt(),[Jv,wt]=Vc(kr),Yc=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:o,onOpenChange:a,modal:i=!1}=e,s=An(t),c=l.useRef(null),[u,f]=l.useState(!1),[m,p]=Ce({prop:r,defaultProp:o??!1,onChange:a,caller:kr});return d.jsx(ga,{...s,children:d.jsx(Jv,{scope:t,contentId:he(),triggerRef:c,open:m,onOpenChange:p,onOpenToggle:l.useCallback(()=>p(h=>!h),[p]),hasCustomAnchor:u,onCustomAnchorAdd:l.useCallback(()=>f(!0),[]),onCustomAnchorRemove:l.useCallback(()=>f(!1),[]),modal:i,children:n})})};Yc.displayName=kr;var Hc="PopoverAnchor",ey=l.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=wt(Hc,n),a=An(n),{onCustomAnchorAdd:i,onCustomAnchorRemove:s}=o;return l.useEffect(()=>(i(),()=>s()),[i,s]),d.jsx(Pr,{...a,...r,ref:t})});ey.displayName=Hc;var Gc="PopoverTrigger",Uc=l.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=wt(Gc,n),a=An(n),i=q(t,o.triggerRef),s=d.jsx(V.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Qc(o.open),...r,ref:i,onClick:I(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?s:d.jsx(Pr,{asChild:!0,...a,children:s})});Uc.displayName=Gc;var ba="PopoverPortal",[ty,ny]=Vc(ba,{forceMount:void 0}),zc=e=>{const{__scopePopover:t,forceMount:n,children:r,container:o}=e,a=wt(ba,t);return d.jsx(ty,{scope:t,forceMount:n,children:d.jsx(De,{present:n||a.open,children:d.jsx(kn,{asChild:!0,container:o,children:r})})})};zc.displayName=ba;var Ut="PopoverContent",Kc=l.forwardRef((e,t)=>{const n=ny(Ut,e.__scopePopover),{forceMount:r=n.forceMount,...o}=e,a=wt(Ut,e.__scopePopover);return d.jsx(De,{present:r||a.open,children:a.modal?d.jsx(oy,{...o,ref:t}):d.jsx(ay,{...o,ref:t})})});Kc.displayName=Ut;var ry=ht("PopoverContent.RemoveScroll"),oy=l.forwardRef((e,t)=>{const n=wt(Ut,e.__scopePopover),r=l.useRef(null),o=q(t,r),a=l.useRef(!1);return l.useEffect(()=>{const i=r.current;if(i)return vr(i)},[]),d.jsx(On,{as:ry,allowPinchZoom:!0,children:d.jsx(qc,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:I(e.onCloseAutoFocus,i=>{var s;i.preventDefault(),a.current||(s=n.triggerRef.current)==null||s.focus()}),onPointerDownOutside:I(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:I(e.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1})})})}),ay=l.forwardRef((e,t)=>{const n=wt(Ut,e.__scopePopover),r=l.useRef(!1),o=l.useRef(!1);return d.jsx(qc,{...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()}})}),qc=l.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:a,disableOutsidePointerEvents:i,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:u,onInteractOutside:f,...m}=e,p=wt(Ut,n),h=An(n);return hr(),d.jsx(Pn,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:a,children:d.jsx(Rn,{asChild:!0,disableOutsidePointerEvents:i,onInteractOutside:f,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:u,onDismiss:()=>p.onOpenChange(!1),children:d.jsx(va,{"data-state":Qc(p.open),role:"dialog",id:p.contentId,...h,...m,ref:t,style:{...m.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)"}})})})}),Xc="PopoverClose",sy=l.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=wt(Xc,n);return d.jsx(V.button,{type:"button",...r,ref:t,onClick:I(e.onClick,()=>o.onOpenChange(!1))})});sy.displayName=Xc;var iy="PopoverArrow",Zc=l.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=An(n);return d.jsx(ya,{...o,...r,ref:t})});Zc.displayName=iy;function Qc(e){return e?"open":"closed"}var cy=Yc,ly=Uc,uy=zc,Jc=Kc,dy=Zc;const Jt=cy,en=ly,fy=dy,Dt=l.forwardRef(({className:e,align:t="center",sideOffset:n=4,hasArrow:r,zIndex:o,children:a,...i},s)=>{const c=Ye("popover",o);return d.jsx(uy,{children:d.jsxs(Jc,{ref:s,align:t,className:k(ae.popover,e),sideOffset:n,style:{zIndex:c,...i.style},...i,children:[a,r?d.jsx(fy,{className:"fill-popover stroke-muted stroke-[1px]",height:7,width:15}):null]})})});Dt.displayName=Jc.displayName;function my(e,t,n){const r=e[t],o=e[n];let a="";return typeof o=="string"?a=o:(typeof o=="number"||typeof o=="boolean"||typeof o=="bigint")&&(a=String(o)),{value:String(r??""),label:a}}function py({loadOptions:e,options:t=[],value:n,onChange:r,placeholder:o="Select an option...",loadingMessage:a="Loading...",emptyMessage:i="No results found",errorMessage:s="Failed to load options",className:c,listClassName:u,maxSuggestions:f=10,debounceMs:m=300,minSearch:p=2,zIndex:h,isDisabled:y=!1,name:g,required:v,autoFocus:w,renderOption:x,valueKey:b,labelKey:S,...C},M){const[N,R]=E.useState(!1),_=Ye("dropdown",h),[A,$]=E.useState(""),[D,Y]=E.useState(!1),[H,J]=E.useState(!1),[j,X]=E.useState([]),[F,O]=E.useState(!1),Z=E.useRef();E.useEffect(()=>()=>{Z.current&&clearTimeout(Z.current)},[]);const te=E.useCallback(async B=>{if(e)try{Y(!0),J(!1);const ee=await e(B);X(ee.slice(0,f)),O(!0)}catch(ee){console.error("Error fetching options:",ee),J(!0),X([])}finally{Y(!1)}},[e,f]),P=E.useMemo(()=>{if(e)return[];const B=A.toLowerCase().trim();return B.length>0&&O(!0),t.filter(ee=>{const ne=ee,le=String(b),ye=String(S);return typeof ne[ye]=="string"&&String(ne[ye]).toLowerCase().includes(B)||typeof ne[le]=="string"&&String(ne[le]).toLowerCase().includes(B)}).slice(0,f)},[e,t,A,f,b,S]),W=e?j:P,G=E.useMemo(()=>n===""?"":String(n),[n]),L=String(b),z=E.useMemo(()=>W.find(B=>String(B[L])===G),[W,G,L]),T=E.useCallback(B=>{const ee=W.find(ne=>String(ne[L])===B);if(ee){const ne=ee[L];r(ne,ee)}R(!1),$(""),O(!1)},[r,W,L]),Q=E.useCallback(B=>{$(B),B.length===0&&O(!1),Z.current&&clearTimeout(Z.current),e&&B.length>=p?Z.current=setTimeout(()=>{te(B)},m):e&&B.length===0&&X([])},[e,p,m,te]),K=E.useCallback(()=>{r("",void 0),$(""),X([]),O(!1)},[r]);return d.jsxs(d.Fragment,{children:[g||v?d.jsx("input",{name:g,required:v,type:"hidden",value:n===""?"":String(n)}):null,d.jsxs(Jt,{open:N,onOpenChange:R,children:[d.jsx(en,{asChild:!0,children:d.jsxs($e,{ref:M,"aria-expanded":N,autoFocus:w,className:k("w-full justify-between px-3",!z&&!n&&"text-muted-foreground",c),isDisabled:y,role:"combobox",variant:"input",...C,children:[d.jsx("span",{className:"truncate",children:(()=>{if(z){const B=z[String(S)];return typeof B=="string"?B:n?String(n):o}return n?String(n):o})()}),d.jsxs("div",{className:"flex items-center gap-1",children:[n!==""&&n||A?d.jsx(pr,{className:"h-4 w-4 opacity-50 hover:opacity-100",onClick:B=>{B.stopPropagation(),K()}}):null,d.jsx(Zo,{className:"h-4 w-4 shrink-0 opacity-50"})]})]})}),d.jsx(Dt,{align:"start",className:"w-[--radix-popover-trigger-width] px-0 py-0",zIndex:_,children:d.jsxs(xr,{shouldFilter:!1,children:[d.jsx(Cr,{placeholder:o,value:A,onValueChange:Q}),D?d.jsx(fc,{children:a}):null,!D&&H?d.jsx(No,{children:s}):null,!D&&!H&&F&&W.length===0?d.jsx(No,{children:i}):null,!D&&!H&&W.length>0?d.jsx(Nr,{className:k("max-h-[16.5rem] overflow-y-auto",u),children:d.jsx(wr,{children:W.map(B=>{const{value:ee,label:ne}=my(B,b,S),le=!!(ee&&n!==""&&ee===G);return d.jsx(Sr,{className:"cursor-pointer",value:ee,onSelect:T,children:x?x(B,le):d.jsxs(d.Fragment,{children:[d.jsx(Ot,{className:k("mr-2 h-4 w-4",le?"opacity-100":"opacity-0")}),ne]})},ee)})})}):null]})})]})]})}const el=E.forwardRef(py);el.displayName="Autocomplete";const hy=el,gy=Se(`inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold
|
|
160
|
-
transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2`,{variants:{variant:{default:"border-transparent bg-base-200 text-black",primary:"border-transparent bg-primary-400 text-white",success:"border-transparent bg-success-500 text-white",danger:"border-transparent bg-danger-400 text-white",warning:"border-transparent bg-warning-300 text-black",outline:"text-foreground"}},defaultVariants:{variant:"default"}}),tl=l.forwardRef(({className:e,variant:t,...n},r)=>d.jsx("div",{ref:r,className:k(gy({variant:t,className:e})),...n}));tl.displayName="Badge";const nl=l.forwardRef(({items:e,separator:t=d.jsx(Xo,{className:"h-4 w-4"}),className:n,...r},o)=>d.jsx("nav",{ref:o,"aria-label":"Breadcrumb",className:k("flex",n),...r,children:d.jsx("ol",{className:"flex flex-wrap items-center gap-1 pl-0",children:e.map((a,i)=>d.jsxs("li",{className:"flex items-center gap-1",children:[a.href?d.jsx("a",{className:k(ae.link,ae.linkNoUnderline),href:a.href,children:a.label}):d.jsx("span",{className:"font-medium text-foreground",children:a.label}),i<e.length-1?d.jsx("span",{className:"text-muted-foreground",children:t}):null]},i))})}));nl.displayName="Breadcrumbs";const lo={},fn={};function hn(e,t){try{const r=(lo[e]||(lo[e]=new Intl.DateTimeFormat("en-GB",{timeZone:e,hour:"numeric",timeZoneName:"longOffset"}).format))(t).split("GMT")[1]||"";return r in fn?fn[r]:Ms(r,r.split(":"))}catch{if(e in fn)return fn[e];const n=e==null?void 0:e.match(vy);return n?Ms(e,n.slice(1)):NaN}}const vy=/([+-]\d\d):?(\d\d)?/;function Ms(e,t){const n=+t[0],r=+(t[1]||0);return fn[e]=n>0?n*60+r:n*60-r}class ze extends Date{constructor(...t){super(),t.length>1&&typeof t[t.length-1]=="string"&&(this.timeZone=t.pop()),this.internal=new Date,isNaN(hn(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)),rl(this),Po(this)):this.setTime(Date.now())}static tz(t,...n){return n.length?new ze(...n,t):new ze(Date.now(),t)}withTimeZone(t){return new ze(+this,t)}getTimezoneOffset(){return-hn(this.timeZone,this)}setTime(t){return Date.prototype.setTime.apply(this,arguments),Po(this),+this}[Symbol.for("constructDateFrom")](t){return new ze(+new Date(t),this.timeZone)}}const Rs=/^(get|set)(?!UTC)/;Object.getOwnPropertyNames(Date.prototype).forEach(e=>{if(!Rs.test(e))return;const t=e.replace(Rs,"$1UTC");ze.prototype[t]&&(e.startsWith("get")?ze.prototype[e]=function(){return this.internal[t]()}:(ze.prototype[e]=function(){return Date.prototype[t].apply(this.internal,arguments),yy(this),+this},ze.prototype[t]=function(){return Date.prototype[t].apply(this,arguments),Po(this),+this}))});function Po(e){e.internal.setTime(+e),e.internal.setUTCMinutes(e.internal.getUTCMinutes()-e.getTimezoneOffset())}function yy(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()),rl(e)}function rl(e){const t=hn(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=hn(e.timeZone,e),f=-new Date(+e).getTimezoneOffset()-c,m=c!==t,p=f-s;if(m&&p){Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+p);const h=hn(e.timeZone,e),y=c-h;y&&(e.internal.setUTCMinutes(e.internal.getUTCMinutes()+y),Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+y))}}class we extends ze{static tz(t,...n){return n.length?new we(...n,t):new we(Date.now(),t)}toISOString(){const[t,n,r]=this.tzComponents(),o=`${t}${n}:${r}`;return this.internal.toISOString().slice(0,-1)+o}toString(){return`${this.toDateString()} ${this.toTimeString()}`}toDateString(){const[t,n,r,o]=this.internal.toUTCString().split(" ");return`${t==null?void 0:t.slice(0,-1)} ${r} ${n} ${o}`}toTimeString(){const t=this.internal.toUTCString().split(" ")[4],[n,r,o]=this.tzComponents();return`${t} GMT${n}${r}${o} (${by(this.timeZone,this)})`}toLocaleString(t,n){return Date.prototype.toLocaleString.call(this,t,{...n,timeZone:(n==null?void 0:n.timeZone)||this.timeZone})}toLocaleDateString(t,n){return Date.prototype.toLocaleDateString.call(this,t,{...n,timeZone:(n==null?void 0:n.timeZone)||this.timeZone})}toLocaleTimeString(t,n){return Date.prototype.toLocaleTimeString.call(this,t,{...n,timeZone:(n==null?void 0:n.timeZone)||this.timeZone})}tzComponents(){const t=this.getTimezoneOffset(),n=t>0?"-":"+",r=String(Math.floor(Math.abs(t)/60)).padStart(2,"0"),o=String(Math.abs(t)%60).padStart(2,"0");return[n,r,o]}withTimeZone(t){return new we(+this,t)}[Symbol.for("constructDateFrom")](t){return new we(+new Date(t),this.timeZone)}}function by(e,t){return new Intl.DateTimeFormat("en-GB",{timeZone:e,timeZoneName:"long"}).format(t).slice(12)}var U;(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"})(U||(U={}));var pe;(function(e){e.disabled="disabled",e.hidden="hidden",e.outside="outside",e.focused="focused",e.today="today"})(pe||(pe={}));var Fe;(function(e){e.range_end="range_end",e.range_middle="range_middle",e.range_start="range_start",e.selected="selected"})(Fe||(Fe={}));var Re;(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"})(Re||(Re={}));const ol=6048e5,xy=864e5,Ps=Symbol.for("constructDateFrom");function be(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&Ps in e?e[Ps](t):e instanceof Date?new e.constructor(t):new Date(t)}function ce(e,t){return be(t||e,e)}function al(e,t,n){const r=ce(e,n==null?void 0:n.in);return isNaN(t)?be(e,NaN):(t&&r.setDate(r.getDate()+t),r)}function sl(e,t,n){const r=ce(e,n==null?void 0:n.in);if(isNaN(t))return be(e,NaN);if(!t)return r;const o=r.getDate(),a=be(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 wy={};function _n(){return wy}function zt(e,t){var s,c,u,f;const n=_n(),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=ce(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 xn(e,t){return zt(e,{...t,weekStartsOn:1})}function il(e,t){const n=ce(e,t==null?void 0:t.in),r=n.getFullYear(),o=be(n,0);o.setFullYear(r+1,0,4),o.setHours(0,0,0,0);const a=xn(o),i=be(n,0);i.setFullYear(r,0,4),i.setHours(0,0,0,0);const s=xn(i);return n.getTime()>=a.getTime()?r+1:n.getTime()>=s.getTime()?r:r-1}function ks(e){const t=ce(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function tn(e,...t){const n=be.bind(null,t.find(r=>typeof r=="object"));return t.map(n)}function wn(e,t){const n=ce(e,t==null?void 0:t.in);return n.setHours(0,0,0,0),n}function cl(e,t,n){const[r,o]=tn(n==null?void 0:n.in,e,t),a=wn(r),i=wn(o),s=+a-ks(a),c=+i-ks(i);return Math.round((s-c)/xy)}function Cy(e,t){const n=il(e,t),r=be(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),xn(r)}function Sy(e,t,n){return al(e,t*7,n)}function Ny(e,t,n){return sl(e,t*12,n)}function Ey(e,t){let n,r=t==null?void 0:t.in;return e.forEach(o=>{!r&&typeof o=="object"&&(r=be.bind(null,o));const a=ce(o,r);(!n||n<a||isNaN(+a))&&(n=a)}),be(r,n||NaN)}function My(e,t){let n,r=t==null?void 0:t.in;return e.forEach(o=>{!r&&typeof o=="object"&&(r=be.bind(null,o));const a=ce(o,r);(!n||n>a||isNaN(+a))&&(n=a)}),be(r,n||NaN)}function Ry(e,t,n){const[r,o]=tn(n==null?void 0:n.in,e,t);return+wn(r)==+wn(o)}function ll(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function Py(e){return!(!ll(e)&&typeof e!="number"||isNaN(+ce(e)))}function ky(e,t,n){const[r,o]=tn(n==null?void 0:n.in,e,t),a=r.getFullYear()-o.getFullYear(),i=r.getMonth()-o.getMonth();return a*12+i}function Oy(e,t){const n=ce(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 Iy(e,t){const[n,r]=tn(e,t.start,t.end);return{start:n,end:r}}function Dy(e,t){const{start:n,end:r}=Iy(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(be(n,i)),i.setMonth(i.getMonth()+s);return o?c.reverse():c}function Ty(e,t){const n=ce(e,t==null?void 0:t.in);return n.setDate(1),n.setHours(0,0,0,0),n}function Ay(e,t){const n=ce(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 ul(e,t){const n=ce(e,t==null?void 0:t.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function dl(e,t){var s,c,u,f;const n=_n(),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=ce(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 _y(e,t){return dl(e,{...t,weekStartsOn:1})}const jy={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"}},Fy=(e,t,n)=>{let r;const o=jy[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 uo(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const $y={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Ly={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Wy={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},By={date:uo({formats:$y,defaultWidth:"full"}),time:uo({formats:Ly,defaultWidth:"full"}),dateTime:uo({formats:Wy,defaultWidth:"full"})},Vy={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Yy=(e,t,n,r)=>Vy[e];function un(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 Hy={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Gy={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Uy={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"]},zy={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"]},Ky={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},qy={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},Xy=(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"},Zy={ordinalNumber:Xy,era:un({values:Hy,defaultWidth:"wide"}),quarter:un({values:Gy,defaultWidth:"wide",argumentCallback:e=>e-1}),month:un({values:Uy,defaultWidth:"wide"}),day:un({values:zy,defaultWidth:"wide"}),dayPeriod:un({values:Ky,defaultWidth:"wide",formattingValues:qy,defaultFormattingWidth:"wide"})};function dn(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)?Jy(s,m=>m.test(i)):Qy(s,m=>m.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 Qy(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function Jy(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function eb(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 tb=/^(\d+)(th|st|nd|rd)?/i,nb=/\d+/i,rb={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},ob={any:[/^b/i,/^(a|c)/i]},ab={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},sb={any:[/1/i,/2/i,/3/i,/4/i]},ib={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},cb={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]},lb={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},ub={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]},db={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},fb={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}},mb={ordinalNumber:eb({matchPattern:tb,parsePattern:nb,valueCallback:e=>parseInt(e,10)}),era:dn({matchPatterns:rb,defaultMatchWidth:"wide",parsePatterns:ob,defaultParseWidth:"any"}),quarter:dn({matchPatterns:ab,defaultMatchWidth:"wide",parsePatterns:sb,defaultParseWidth:"any",valueCallback:e=>e+1}),month:dn({matchPatterns:ib,defaultMatchWidth:"wide",parsePatterns:cb,defaultParseWidth:"any"}),day:dn({matchPatterns:lb,defaultMatchWidth:"wide",parsePatterns:ub,defaultParseWidth:"any"}),dayPeriod:dn({matchPatterns:db,defaultMatchWidth:"any",parsePatterns:fb,defaultParseWidth:"any"})},xa={code:"en-US",formatDistance:Fy,formatLong:By,formatRelative:Yy,localize:Zy,match:mb,options:{weekStartsOn:0,firstWeekContainsDate:1}};function pb(e,t){const n=ce(e,t==null?void 0:t.in);return cl(n,ul(n))+1}function fl(e,t){const n=ce(e,t==null?void 0:t.in),r=+xn(n)-+Cy(n);return Math.round(r/ol)+1}function ml(e,t){var f,m,p,h;const n=ce(e,t==null?void 0:t.in),r=n.getFullYear(),o=_n(),a=(t==null?void 0:t.firstWeekContainsDate)??((m=(f=t==null?void 0:t.locale)==null?void 0:f.options)==null?void 0:m.firstWeekContainsDate)??o.firstWeekContainsDate??((h=(p=o.locale)==null?void 0:p.options)==null?void 0:h.firstWeekContainsDate)??1,i=be((t==null?void 0:t.in)||e,0);i.setFullYear(r+1,0,a),i.setHours(0,0,0,0);const s=zt(i,t),c=be((t==null?void 0:t.in)||e,0);c.setFullYear(r,0,a),c.setHours(0,0,0,0);const u=zt(c,t);return+n>=+s?r+1:+n>=+u?r:r-1}function hb(e,t){var s,c,u,f;const n=_n(),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=ml(e,t),a=be((t==null?void 0:t.in)||e,0);return a.setFullYear(o,0,r),a.setHours(0,0,0,0),zt(a,t)}function pl(e,t){const n=ce(e,t==null?void 0:t.in),r=+zt(n,t)-+hb(n,t);return Math.round(r/ol)+1}function ie(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const ft={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return ie(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):ie(n+1,2)},d(e,t){return ie(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 ie(e.getHours()%12||12,t.length)},H(e,t){return ie(e.getHours(),t.length)},m(e,t){return ie(e.getMinutes(),t.length)},s(e,t){return ie(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),o=Math.trunc(r*Math.pow(10,n-3));return ie(o,t.length)}},Lt={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Os={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 ft.y(e,t)},Y:function(e,t,n,r){const o=ml(e,r),a=o>0?o:1-o;if(t==="YY"){const i=a%100;return ie(i,2)}return t==="Yo"?n.ordinalNumber(a,{unit:"year"}):ie(a,t.length)},R:function(e,t){const n=il(e);return ie(n,t.length)},u:function(e,t){const n=e.getFullYear();return ie(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 ie(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 ie(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 ft.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 ie(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=pl(e,r);return t==="wo"?n.ordinalNumber(o,{unit:"week"}):ie(o,t.length)},I:function(e,t,n){const r=fl(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):ie(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):ft.d(e,t)},D:function(e,t,n){const r=pb(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):ie(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 ie(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 ie(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 ie(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=Lt.noon:r===0?o=Lt.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=Lt.evening:r>=12?o=Lt.afternoon:r>=4?o=Lt.morning:o=Lt.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 ft.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):ft.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):ie(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):ie(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):ft.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):ft.s(e,t)},S:function(e,t){return ft.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return Ds(r);case"XXXX":case"XX":return Nt(r);case"XXXXX":case"XXX":default:return Nt(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return Ds(r);case"xxxx":case"xx":return Nt(r);case"xxxxx":case"xxx":default:return Nt(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Is(r,":");case"OOOO":default:return"GMT"+Nt(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Is(r,":");case"zzzz":default:return"GMT"+Nt(r,":")}},t:function(e,t,n){const r=Math.trunc(+e/1e3);return ie(r,t.length)},T:function(e,t,n){return ie(+e,t.length)}};function Is(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+ie(a,2)}function Ds(e,t){return e%60===0?(e>0?"-":"+")+ie(Math.abs(e)/60,2):Nt(e,t)}function Nt(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=ie(Math.trunc(r/60),2),a=ie(r%60,2);return n+o+t+a}const Ts=(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"})}},hl=(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"})}},gb=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return Ts(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}}",Ts(r,t)).replace("{{time}}",hl(o,t))},vb={p:hl,P:gb},yb=/^D+$/,bb=/^Y+$/,xb=["D","DD","YY","YYYY"];function wb(e){return yb.test(e)}function Cb(e){return bb.test(e)}function Sb(e,t,n){const r=Nb(e,t,n);if(console.warn(r),xb.includes(e))throw new RangeError(r)}function Nb(e,t,n){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const Eb=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Mb=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Rb=/^'([^]*?)'?$/,Pb=/''/g,kb=/[a-zA-Z]/;function gn(e,t,n){var f,m,p,h,y,g,v,w;const r=_n(),o=(n==null?void 0:n.locale)??r.locale??xa,a=(n==null?void 0:n.firstWeekContainsDate)??((m=(f=n==null?void 0:n.locale)==null?void 0:f.options)==null?void 0:m.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=(y=n==null?void 0:n.locale)==null?void 0:y.options)==null?void 0:g.weekStartsOn)??r.weekStartsOn??((w=(v=r.locale)==null?void 0:v.options)==null?void 0:w.weekStartsOn)??0,s=ce(e,n==null?void 0:n.in);if(!Py(s))throw new RangeError("Invalid time value");let c=t.match(Mb).map(x=>{const b=x[0];if(b==="p"||b==="P"){const S=vb[b];return S(x,o.formatLong)}return x}).join("").match(Eb).map(x=>{if(x==="''")return{isToken:!1,value:"'"};const b=x[0];if(b==="'")return{isToken:!1,value:Ob(x)};if(Os[b])return{isToken:!0,value:x};if(b.match(kb))throw new RangeError("Format string contains an unescaped latin alphabet character `"+b+"`");return{isToken:!1,value:x}});o.localize.preprocessor&&(c=o.localize.preprocessor(s,c));const u={firstWeekContainsDate:a,weekStartsOn:i,locale:o};return c.map(x=>{if(!x.isToken)return x.value;const b=x.value;(!(n!=null&&n.useAdditionalWeekYearTokens)&&Cb(b)||!(n!=null&&n.useAdditionalDayOfYearTokens)&&wb(b))&&Sb(b,t,String(e));const S=Os[b[0]];return S(s,b,o.localize,u)}).join("")}function Ob(e){const t=e.match(Rb);return t?t[1].replace(Pb,"'"):e}function Ib(e,t){const n=ce(e,t==null?void 0:t.in),r=n.getFullYear(),o=n.getMonth(),a=be(n,0);return a.setFullYear(r,o+1,0),a.setHours(0,0,0,0),a.getDate()}function Db(e,t){return ce(e,t==null?void 0:t.in).getMonth()}function Tb(e,t){return ce(e,t==null?void 0:t.in).getFullYear()}function Ab(e,t){return+ce(e)>+ce(t)}function _b(e,t){return+ce(e)<+ce(t)}function jb(e,t,n){const[r,o]=tn(n==null?void 0:n.in,e,t);return r.getFullYear()===o.getFullYear()&&r.getMonth()===o.getMonth()}function Fb(e,t,n){const[r,o]=tn(n==null?void 0:n.in,e,t);return r.getFullYear()===o.getFullYear()}function $b(e,t,n){const r=ce(e,n==null?void 0:n.in),o=r.getFullYear(),a=r.getDate(),i=be(e,0);i.setFullYear(o,t,15),i.setHours(0,0,0,0);const s=Ib(i);return r.setMonth(t,Math.min(a,s)),r}function Lb(e,t,n){const r=ce(e,n==null?void 0:n.in);return isNaN(+r)?be(e,NaN):(r.setFullYear(t),r)}const As=5,Wb=4;function Bb(e,t){const n=t.startOfMonth(e),r=n.getDay()>0?n.getDay():7,o=t.addDays(e,-r+1),a=t.addDays(o,As*7-1);return t.getMonth(e)===t.getMonth(a)?As:Wb}function gl(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 Vb(e,t){const n=gl(e,t),r=Bb(e,t);return t.addDays(n,r*7-1)}class ct{constructor(t,n){this.Date=Date,this.today=()=>{var r;return(r=this.overrides)!=null&&r.today?this.overrides.today():this.options.timeZone?we.tz(this.options.timeZone):new this.Date},this.newDate=(r,o,a)=>{var i;return(i=this.overrides)!=null&&i.newDate?this.overrides.newDate(r,o,a):this.options.timeZone?new we(r,o,a,this.options.timeZone):new Date(r,o,a)},this.addDays=(r,o)=>{var a;return(a=this.overrides)!=null&&a.addDays?this.overrides.addDays(r,o):al(r,o)},this.addMonths=(r,o)=>{var a;return(a=this.overrides)!=null&&a.addMonths?this.overrides.addMonths(r,o):sl(r,o)},this.addWeeks=(r,o)=>{var a;return(a=this.overrides)!=null&&a.addWeeks?this.overrides.addWeeks(r,o):Sy(r,o)},this.addYears=(r,o)=>{var a;return(a=this.overrides)!=null&&a.addYears?this.overrides.addYears(r,o):Ny(r,o)},this.differenceInCalendarDays=(r,o)=>{var a;return(a=this.overrides)!=null&&a.differenceInCalendarDays?this.overrides.differenceInCalendarDays(r,o):cl(r,o)},this.differenceInCalendarMonths=(r,o)=>{var a;return(a=this.overrides)!=null&&a.differenceInCalendarMonths?this.overrides.differenceInCalendarMonths(r,o):ky(r,o)},this.eachMonthOfInterval=r=>{var o;return(o=this.overrides)!=null&&o.eachMonthOfInterval?this.overrides.eachMonthOfInterval(r):Dy(r)},this.endOfBroadcastWeek=r=>{var o;return(o=this.overrides)!=null&&o.endOfBroadcastWeek?this.overrides.endOfBroadcastWeek(r):Vb(r,this)},this.endOfISOWeek=r=>{var o;return(o=this.overrides)!=null&&o.endOfISOWeek?this.overrides.endOfISOWeek(r):_y(r)},this.endOfMonth=r=>{var o;return(o=this.overrides)!=null&&o.endOfMonth?this.overrides.endOfMonth(r):Oy(r)},this.endOfWeek=(r,o)=>{var a;return(a=this.overrides)!=null&&a.endOfWeek?this.overrides.endOfWeek(r,o):dl(r,this.options)},this.endOfYear=r=>{var o;return(o=this.overrides)!=null&&o.endOfYear?this.overrides.endOfYear(r):Ay(r)},this.format=(r,o,a)=>{var s;const i=(s=this.overrides)!=null&&s.format?this.overrides.format(r,o,this.options):gn(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):fl(r)},this.getMonth=(r,o)=>{var a;return(a=this.overrides)!=null&&a.getMonth?this.overrides.getMonth(r,this.options):Db(r,this.options)},this.getYear=(r,o)=>{var a;return(a=this.overrides)!=null&&a.getYear?this.overrides.getYear(r,this.options):Tb(r,this.options)},this.getWeek=(r,o)=>{var a;return(a=this.overrides)!=null&&a.getWeek?this.overrides.getWeek(r,this.options):pl(r,this.options)},this.isAfter=(r,o)=>{var a;return(a=this.overrides)!=null&&a.isAfter?this.overrides.isAfter(r,o):Ab(r,o)},this.isBefore=(r,o)=>{var a;return(a=this.overrides)!=null&&a.isBefore?this.overrides.isBefore(r,o):_b(r,o)},this.isDate=r=>{var o;return(o=this.overrides)!=null&&o.isDate?this.overrides.isDate(r):ll(r)},this.isSameDay=(r,o)=>{var a;return(a=this.overrides)!=null&&a.isSameDay?this.overrides.isSameDay(r,o):Ry(r,o)},this.isSameMonth=(r,o)=>{var a;return(a=this.overrides)!=null&&a.isSameMonth?this.overrides.isSameMonth(r,o):jb(r,o)},this.isSameYear=(r,o)=>{var a;return(a=this.overrides)!=null&&a.isSameYear?this.overrides.isSameYear(r,o):Fb(r,o)},this.max=r=>{var o;return(o=this.overrides)!=null&&o.max?this.overrides.max(r):Ey(r)},this.min=r=>{var o;return(o=this.overrides)!=null&&o.min?this.overrides.min(r):My(r)},this.setMonth=(r,o)=>{var a;return(a=this.overrides)!=null&&a.setMonth?this.overrides.setMonth(r,o):$b(r,o)},this.setYear=(r,o)=>{var a;return(a=this.overrides)!=null&&a.setYear?this.overrides.setYear(r,o):Lb(r,o)},this.startOfBroadcastWeek=(r,o)=>{var a;return(a=this.overrides)!=null&&a.startOfBroadcastWeek?this.overrides.startOfBroadcastWeek(r,this):gl(r,this)},this.startOfDay=r=>{var o;return(o=this.overrides)!=null&&o.startOfDay?this.overrides.startOfDay(r):wn(r)},this.startOfISOWeek=r=>{var o;return(o=this.overrides)!=null&&o.startOfISOWeek?this.overrides.startOfISOWeek(r):xn(r)},this.startOfMonth=r=>{var o;return(o=this.overrides)!=null&&o.startOfMonth?this.overrides.startOfMonth(r):Ty(r)},this.startOfWeek=(r,o)=>{var a;return(a=this.overrides)!=null&&a.startOfWeek?this.overrides.startOfWeek(r,this.options):zt(r,this.options)},this.startOfYear=r=>{var o;return(o=this.overrides)!=null&&o.startOfYear?this.overrides.startOfYear(r):ul(r)},this.options={locale:xa,...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 Je=new ct;class vl{constructor(t,n,r=Je){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 Yb{constructor(t,n){this.date=t,this.weeks=n}}class Hb{constructor(t,n){this.days=n,this.weekNumber=t}}function ot(e,t,n=!1,r=Je){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 yl(e){return!!(e&&typeof e=="object"&&"before"in e&&"after"in e)}function wa(e){return!!(e&&typeof e=="object"&&"from"in e)}function bl(e){return!!(e&&typeof e=="object"&&"after"in e)}function xl(e){return!!(e&&typeof e=="object"&&"before"in e)}function wl(e){return!!(e&&typeof e=="object"&&"dayOfWeek"in e)}function Cl(e,t){return Array.isArray(e)&&e.every(t.isDate)}function at(e,t,n=Je){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(Cl(s,n))return s.includes(e);if(wa(s))return ot(s,e,!1,n);if(wl(s))return Array.isArray(s.dayOfWeek)?s.dayOfWeek.includes(e.getDay()):s.dayOfWeek===e.getDay();if(yl(s)){const c=a(s.before,e),u=a(s.after,e),f=c>0,m=u<0;return i(s.before,s.after)?m&&f:f||m}return bl(s)?a(e,s.after)>0:xl(s)?a(s.before,e)>0:typeof s=="function"?s(e):!1})}function Gb(e,t,n){const{disabled:r,hidden:o,modifiers:a,showOutsideDays:i,broadcastCalendar:s,today:c}=t,{isSameDay:u,isSameMonth:f,startOfMonth:m,isBefore:p,endOfMonth:h,isAfter:y}=n,g=t.startMonth&&m(t.startMonth),v=t.endMonth&&h(t.endMonth),w={[pe.focused]:[],[pe.outside]:[],[pe.disabled]:[],[pe.hidden]:[],[pe.today]:[]},x={};for(const b of e){const{date:S,displayMonth:C}=b,M=!!(C&&!f(S,C)),N=!!(g&&p(S,g)),R=!!(v&&y(S,v)),_=!!(r&&at(S,r,n)),A=!!(o&&at(S,o,n))||N||R||!s&&!i&&M||s&&i===!1&&M,$=u(S,c??n.today());M&&w.outside.push(b),_&&w.disabled.push(b),A&&w.hidden.push(b),$&&w.today.push(b),a&&Object.keys(a).forEach(D=>{const Y=a==null?void 0:a[D];Y&&at(S,Y,n)&&(x[D]?x[D].push(b):x[D]=[b])})}return b=>{const S={[pe.focused]:!1,[pe.disabled]:!1,[pe.hidden]:!1,[pe.outside]:!1,[pe.today]:!1},C={};for(const M in w){const N=w[M];S[M]=N.some(R=>R===b)}for(const M in x)C[M]=x[M].some(N=>N===b);return{...S,...C}}}function Ub(e,t,n={}){return Object.entries(e).filter(([,o])=>o===!0).reduce((o,[a])=>(n[a]?o.push(n[a]):t[pe[a]]?o.push(t[pe[a]]):t[Fe[a]]&&o.push(t[Fe[a]]),o),[t[U.Day]])}function zb(e){return E.createElement("button",{...e})}function Kb(e){return E.createElement("span",{...e})}function qb(e){const{size:t=24,orientation:n="left",className:r}=e;return E.createElement("svg",{className:r,width:t,height:t,viewBox:"0 0 24 24"},n==="up"&&E.createElement("polygon",{points:"6.77 17 12.5 11.43 18.24 17 20 15.28 12.5 8 5 15.28"}),n==="down"&&E.createElement("polygon",{points:"6.77 8 12.5 13.57 18.24 8 20 9.72 12.5 17 5 9.72"}),n==="left"&&E.createElement("polygon",{points:"16 18.112 9.81111111 12 16 5.87733333 14.0888889 4 6 12 14.0888889 20"}),n==="right"&&E.createElement("polygon",{points:"8 18.112 14.18888889 12 8 5.87733333 9.91111111 4 18 12 9.91111111 20"}))}function Xb(e){const{day:t,modifiers:n,...r}=e;return E.createElement("td",{...r})}function Zb(e){const{day:t,modifiers:n,...r}=e,o=E.useRef(null);return E.useEffect(()=>{var a;n.focused&&((a=o.current)==null||a.focus())},[n.focused]),E.createElement("button",{ref:o,...r})}function Qb(e){const{options:t,className:n,components:r,classNames:o,...a}=e,i=[o[U.Dropdown],n].join(" "),s=t==null?void 0:t.find(({value:c})=>c===a.value);return E.createElement("span",{"data-disabled":a.disabled,className:o[U.DropdownRoot]},E.createElement(r.Select,{className:i,...a},t==null?void 0:t.map(({value:c,label:u,disabled:f})=>E.createElement(r.Option,{key:c,value:c,disabled:f},u))),E.createElement("span",{className:o[U.CaptionLabel],"aria-hidden":!0},s==null?void 0:s.label,E.createElement(r.Chevron,{orientation:"down",size:18,className:o[U.Chevron]})))}function Jb(e){return E.createElement("div",{...e})}function ex(e){return E.createElement("div",{...e})}function tx(e){const{calendarMonth:t,displayIndex:n,...r}=e;return E.createElement("div",{...r},e.children)}function nx(e){const{calendarMonth:t,displayIndex:n,...r}=e;return E.createElement("div",{...r})}function rx(e){return E.createElement("table",{...e})}function ox(e){return E.createElement("div",{...e})}const Sl=E.createContext(void 0);function jn(){const e=E.useContext(Sl);if(e===void 0)throw new Error("useDayPicker() must be used within a custom component.");return e}function ax(e){const{components:t}=jn();return E.createElement(t.Dropdown,{...e})}function sx(e){const{onPreviousClick:t,onNextClick:n,previousMonth:r,nextMonth:o,...a}=e,{components:i,classNames:s,labels:{labelPrevious:c,labelNext:u}}=jn(),f=E.useCallback(p=>{o&&(n==null||n(p))},[o,n]),m=E.useCallback(p=>{r&&(t==null||t(p))},[r,t]);return E.createElement("nav",{...a},E.createElement(i.PreviousMonthButton,{type:"button",className:s[U.PreviousMonthButton],tabIndex:r?void 0:-1,"aria-disabled":r?void 0:!0,"aria-label":c(r),onClick:m},E.createElement(i.Chevron,{disabled:r?void 0:!0,className:s[U.Chevron],orientation:"left"})),E.createElement(i.NextMonthButton,{type:"button",className:s[U.NextMonthButton],tabIndex:o?void 0:-1,"aria-disabled":o?void 0:!0,"aria-label":u(o),onClick:f},E.createElement(i.Chevron,{disabled:o?void 0:!0,orientation:"right",className:s[U.Chevron]})))}function ix(e){const{components:t}=jn();return E.createElement(t.Button,{...e})}function cx(e){return E.createElement("option",{...e})}function lx(e){const{components:t}=jn();return E.createElement(t.Button,{...e})}function ux(e){const{rootRef:t,...n}=e;return E.createElement("div",{...n,ref:t})}function dx(e){return E.createElement("select",{...e})}function fx(e){const{week:t,...n}=e;return E.createElement("tr",{...n})}function mx(e){return E.createElement("th",{...e})}function px(e){return E.createElement("thead",{"aria-hidden":!0},E.createElement("tr",{...e}))}function hx(e){const{week:t,...n}=e;return E.createElement("th",{...n})}function gx(e){return E.createElement("th",{...e})}function vx(e){return E.createElement("tbody",{...e})}function yx(e){const{components:t}=jn();return E.createElement(t.Dropdown,{...e})}const bx=Object.freeze(Object.defineProperty({__proto__:null,Button:zb,CaptionLabel:Kb,Chevron:qb,Day:Xb,DayButton:Zb,Dropdown:Qb,DropdownNav:Jb,Footer:ex,Month:tx,MonthCaption:nx,MonthGrid:rx,Months:ox,MonthsDropdown:ax,Nav:sx,NextMonthButton:ix,Option:cx,PreviousMonthButton:lx,Root:ux,Select:dx,Week:fx,WeekNumber:hx,WeekNumberHeader:gx,Weekday:mx,Weekdays:px,Weeks:vx,YearsDropdown:yx},Symbol.toStringTag,{value:"Module"}));function xx(e){return{...bx,...e}}function wx(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 Cx(){const e={};for(const t in U)e[U[t]]=`rdp-${U[t]}`;for(const t in pe)e[pe[t]]=`rdp-${pe[t]}`;for(const t in Fe)e[Fe[t]]=`rdp-${Fe[t]}`;for(const t in Re)e[Re[t]]=`rdp-${Re[t]}`;return e}function Nl(e,t,n){return(n??new ct(t)).format(e,"LLLL y")}const Sx=Nl;function Nx(e,t,n){return(n??new ct(t)).format(e,"d")}function Ex(e,t=Je){return t.format(e,"LLLL")}function Mx(e,t=Je){return e<10?t.formatNumber(`0${e.toLocaleString()}`):t.formatNumber(`${e.toLocaleString()}`)}function Rx(){return""}function Px(e,t,n){return(n??new ct(t)).format(e,"cccccc")}function El(e,t=Je){return t.format(e,"yyyy")}const kx=El,Ox=Object.freeze(Object.defineProperty({__proto__:null,formatCaption:Nl,formatDay:Nx,formatMonthCaption:Sx,formatMonthDropdown:Ex,formatWeekNumber:Mx,formatWeekNumberHeader:Rx,formatWeekdayName:Px,formatYearCaption:kx,formatYearDropdown:El},Symbol.toStringTag,{value:"Module"}));function Ix(e){return e!=null&&e.formatMonthCaption&&!e.formatCaption&&(e.formatCaption=e.formatMonthCaption),e!=null&&e.formatYearCaption&&!e.formatYearDropdown&&(e.formatYearDropdown=e.formatYearCaption),{...Ox,...e}}function Dx(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),y=u(p),g=t&&p<a(t)||n&&p>a(n)||!1;return{value:y,label:h,disabled:g}})}function Tx(e,t={},n={}){let r={...t==null?void 0:t[U.Day]};return Object.entries(e).filter(([,o])=>o===!0).forEach(([o])=>{r={...r,...n==null?void 0:n[o]}}),r}function Ax(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 _x(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),m=a(t),p=[];let h=f;for(;c(h,m)||u(h,m);)p.push(h),h=i(h,1);return p.map(y=>{const g=n.formatYearDropdown(y,r);return{value:s(y),label:g,disabled:!1}})}function Ml(e,t,n){return(n??new ct(t)).format(e,"LLLL y")}const jx=Ml;function Fx(e,t,n,r){let o=(r??new ct(n)).format(e,"PPPP");return t!=null&&t.today&&(o=`Today, ${o}`),o}function Rl(e,t,n,r){let o=(r??new ct(n)).format(e,"PPPP");return t.today&&(o=`Today, ${o}`),t.selected&&(o=`${o}, selected`),o}const $x=Rl;function Lx(){return""}function Wx(e){return"Choose the Month"}function Bx(e){return"Go to the Next Month"}function Vx(e){return"Go to the Previous Month"}function Yx(e,t,n){return(n??new ct(t)).format(e,"cccc")}function Hx(e,t){return`Week ${e}`}function Gx(e){return"Week Number"}function Ux(e){return"Choose the Year"}const zx=Object.freeze(Object.defineProperty({__proto__:null,labelCaption:jx,labelDay:$x,labelDayButton:Rl,labelGrid:Ml,labelGridcell:Fx,labelMonthDropdown:Wx,labelNav:Lx,labelNext:Bx,labelPrevious:Vx,labelWeekNumber:Hx,labelWeekNumberHeader:Gx,labelWeekday:Yx,labelYearDropdown:Ux},Symbol.toStringTag,{value:"Module"})),Fn=e=>e instanceof HTMLElement?e:null,fo=e=>[...e.querySelectorAll("[data-animated-month]")??[]],Kx=e=>Fn(e.querySelector("[data-animated-month]")),mo=e=>Fn(e.querySelector("[data-animated-caption]")),po=e=>Fn(e.querySelector("[data-animated-weeks]")),qx=e=>Fn(e.querySelector("[data-animated-nav]")),Xx=e=>Fn(e.querySelector("[data-animated-weekdays]"));function Zx(e,t,{classNames:n,months:r,focused:o,dateLib:a}){const i=E.useRef(null),s=E.useRef(r),c=E.useRef(!1);E.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),m=a.isAfter(r[0].date,u[0].date),p=m?n[Re.caption_after_enter]:n[Re.caption_before_enter],h=m?n[Re.weeks_after_enter]:n[Re.weeks_before_enter],y=i.current,g=e.current.cloneNode(!0);if(g instanceof HTMLElement?(fo(g).forEach(b=>{if(!(b instanceof HTMLElement))return;const S=Kx(b);S&&b.contains(S)&&b.removeChild(S);const C=mo(b);C&&C.classList.remove(p);const M=po(b);M&&M.classList.remove(h)}),i.current=g):i.current=null,c.current||f||o)return;const v=y instanceof HTMLElement?fo(y):[],w=fo(e.current);if(w&&w.every(x=>x instanceof HTMLElement)&&v&&v.every(x=>x instanceof HTMLElement)){c.current=!0,e.current.style.isolation="isolate";const x=qx(e.current);x&&(x.style.zIndex="1"),w.forEach((b,S)=>{const C=v[S];if(!C)return;b.style.position="relative",b.style.overflow="hidden";const M=mo(b);M&&M.classList.add(p);const N=po(b);N&&N.classList.add(h);const R=()=>{c.current=!1,e.current&&(e.current.style.isolation=""),x&&(x.style.zIndex=""),M&&M.classList.remove(p),N&&N.classList.remove(h),b.style.position="",b.style.overflow="",b.contains(C)&&b.removeChild(C)};C.style.pointerEvents="none",C.style.position="absolute",C.style.overflow="hidden",C.setAttribute("aria-hidden","true");const _=Xx(C);_&&(_.style.opacity="0");const A=mo(C);A&&(A.classList.add(m?n[Re.caption_before_exit]:n[Re.caption_after_exit]),A.addEventListener("animationend",R));const $=po(C);$&&$.classList.add(m?n[Re.weeks_before_exit]:n[Re.weeks_after_exit]),b.insertBefore(C,b.firstChild)})}})}function Qx(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:m,endOfBroadcastWeek:p,endOfISOWeek:h,endOfMonth:y,endOfWeek:g,isAfter:v,startOfBroadcastWeek:w,startOfISOWeek:x,startOfWeek:b}=r,S=c?w(o,r):i?x(o):b(o),C=c?p(a):i?h(y(a)):g(y(a)),M=f(C,S),N=m(a,o)+1,R=[];for(let $=0;$<=M;$++){const D=u(S,$);if(t&&v(D,t))break;R.push(D)}const A=(c?35:42)*N;if(s&&R.length<A){const $=A-R.length;for(let D=0;D<$;D++){const Y=u(R[R.length-1],1);R.push(Y)}}return R}function Jx(e){const t=[];return e.reduce((n,r)=>{const o=r.weeks.reduce((a,i)=>[...a,...i.days],t);return[...n,...o]},t)}function ew(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 _s(e,t){const{month:n,defaultMonth:r,today:o=t.today(),numberOfMonths:a=1,endMonth:i,startMonth:s}=e;let c=n||r||o;const{differenceInCalendarMonths:u,addMonths:f,startOfMonth:m}=t;if(i&&u(i,c)<0){const p=-1*(a-1);c=f(i,p)}return s&&u(c,s)<0&&(c=s),m(c)}function tw(e,t,n,r){const{addDays:o,endOfBroadcastWeek:a,endOfISOWeek:i,endOfMonth:s,endOfWeek:c,getISOWeek:u,getWeek:f,startOfBroadcastWeek:m,startOfISOWeek:p,startOfWeek:h}=r,y=e.reduce((g,v)=>{const w=n.broadcastCalendar?m(v,r):n.ISOWeek?p(v):h(v),x=n.broadcastCalendar?a(v):n.ISOWeek?i(s(v)):c(s(v)),b=t.filter(N=>N>=w&&N<=x),S=n.broadcastCalendar?35:42;if(n.fixedWeeks&&b.length<S){const N=t.filter(R=>{const _=S-b.length;return R>x&&R<=o(x,_)});b.push(...N)}const C=b.reduce((N,R)=>{const _=n.ISOWeek?u(R):f(R),A=N.find(D=>D.weekNumber===_),$=new vl(R,v,r);return A?A.days.push($):N.push(new Hb(_,[$])),N},[]),M=new Yb(v,C);return g.push(M),g},[]);return n.reverseMonths?y.reverse():y}function nw(e,t){let{startMonth:n,endMonth:r}=e;const{startOfYear:o,startOfDay:a,startOfMonth:i,endOfMonth:s,addYears:c,endOfYear:u,newDate:f,today:m}=t,{fromYear:p,toYear:h,fromMonth:y,toMonth:g}=e;!n&&y&&(n=y),!n&&p&&(n=t.newDate(p,0,1)),!r&&g&&(r=g),!r&&h&&(r=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??m(),-100))),r?r=s(r):h?r=f(h,11,31):!r&&v&&(r=u(e.today??m())),[n&&a(n),r&&a(r)]}function rw(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 ow(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 aw(e){const t=[];return e.reduce((n,r)=>[...n,...r.weeks],t)}function Or(e,t){const[n,r]=E.useState(e);return[t===void 0?n:t,r]}function sw(e,t){const[n,r]=nw(e,t),{startOfMonth:o,endOfMonth:a}=t,i=_s(e,t),[s,c]=Or(i,e.month?i:void 0);E.useEffect(()=>{const M=_s(e,t);c(M)},[e.timeZone]);const u=ew(s,r,e,t),f=Qx(u,e.endMonth?a(e.endMonth):void 0,e,t),m=tw(u,f,e,t),p=aw(m),h=Jx(m),y=ow(s,n,e,t),g=rw(s,r,e,t),{disableNavigation:v,onMonthChange:w}=e,x=M=>p.some(N=>N.days.some(R=>R.isEqualTo(M))),b=M=>{if(v)return;let N=o(M);n&&N<o(n)&&(N=o(n)),r&&N>o(r)&&(N=o(r)),c(N),w==null||w(N)};return{months:m,weeks:p,days:h,navStart:n,navEnd:r,previousMonth:y,nextMonth:g,goToMonth:b,goToDay:M=>{x(M)||b(M.date)}}}var Ge;(function(e){e[e.Today=0]="Today",e[e.Selected=1]="Selected",e[e.LastFocused=2]="LastFocused",e[e.FocusedModifier=3]="FocusedModifier"})(Ge||(Ge={}));function js(e){return!e[pe.disabled]&&!e[pe.hidden]&&!e[pe.outside]}function iw(e,t,n,r){let o,a=-1;for(const i of e){const s=t(i);js(s)&&(s[pe.focused]&&a<Ge.FocusedModifier?(o=i,a=Ge.FocusedModifier):r!=null&&r.isEqualTo(i)&&a<Ge.LastFocused?(o=i,a=Ge.LastFocused):n(i.date)&&a<Ge.Selected?(o=i,a=Ge.Selected):s[pe.today]&&a<Ge.Today&&(o=i,a=Ge.Today))}return o||(o=e.find(i=>js(t(i)))),o}function cw(e,t,n,r,o,a,i){const{ISOWeek:s,broadcastCalendar:c}=a,{addDays:u,addMonths:f,addWeeks:m,addYears:p,endOfBroadcastWeek:h,endOfISOWeek:y,endOfWeek:g,max:v,min:w,startOfBroadcastWeek:x,startOfISOWeek:b,startOfWeek:S}=i;let M={day:u,week:m,month:f,year:p,startOfWeek:N=>c?x(N,i):s?b(N):S(N),endOfWeek:N=>c?h(N):s?y(N):g(N)}[e](n,t==="after"?1:-1);return t==="before"&&r?M=v([r,M]):t==="after"&&o&&(M=w([o,M])),M}function Pl(e,t,n,r,o,a,i,s=0){if(s>365)return;const c=cw(e,t,n.date,r,o,a,i),u=!!(a.disabled&&at(c,a.disabled,i)),f=!!(a.hidden&&at(c,a.hidden,i)),m=c,p=new vl(c,m,i);return!u&&!f?p:Pl(e,t,p,r,o,a,i,s+1)}function lw(e,t,n,r,o){const{autoFocus:a}=e,[i,s]=E.useState(),c=iw(t.days,n,r||(()=>!1),i),[u,f]=E.useState(a?c:void 0);return{isFocusTarget:g=>!!(c!=null&&c.isEqualTo(g)),setFocused:f,focused:u,blur:()=>{s(u),f(void 0)},moveFocus:(g,v)=>{if(!u)return;const w=Pl(g,v,u,t.navStart,t.navEnd,e,o);w&&(t.goToDay(w),f(w))}}}function uw(e,t){const{selected:n,required:r,onSelect:o}=e,[a,i]=Or(n,o?n:void 0),s=o?n:a,{isSameDay:c}=t,u=h=>(s==null?void 0:s.some(y=>c(y,h)))??!1,{min:f,max:m}=e;return{selected:s,select:(h,y,g)=>{let v=[...s??[]];if(u(h)){if((s==null?void 0:s.length)===f||r&&(s==null?void 0:s.length)===1)return;v=s==null?void 0:s.filter(w=>!c(w,h))}else(s==null?void 0:s.length)===m?v=[h]:v=[...v,h];return o||i(v),o==null||o(v,h,y,g),v},isSelected:u}}function dw(e,t,n=0,r=0,o=!1,a=Je){const{from:i,to:s}=t||{},{isSameDay:c,isAfter:u,isBefore:f}=a;let m;if(!i&&!s)m={from:e,to:n>0?void 0:e};else if(i&&!s)c(i,e)?o?m={from:i,to:void 0}:m=void 0:f(e,i)?m={from:e,to:i}:m={from:i,to:e};else if(i&&s)if(c(i,e)&&c(s,e))o?m={from:i,to:s}:m=void 0;else if(c(i,e))m={from:i,to:n>0?void 0:e};else if(c(s,e))m={from:e,to:n>0?void 0:e};else if(f(e,i))m={from:e,to:s};else if(u(e,i))m={from:i,to:e};else if(u(e,s))m={from:i,to:e};else throw new Error("Invalid range");if(m!=null&&m.from&&(m!=null&&m.to)){const p=a.differenceInCalendarDays(m.to,m.from);r>0&&p>r?m={from:e,to:void 0}:n>1&&p<n&&(m={from:e,to:void 0})}return m}function fw(e,t,n=Je){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 Fs(e,t,n=Je){return ot(e,t.from,!1,n)||ot(e,t.to,!1,n)||ot(t,e.from,!1,n)||ot(t,e.to,!1,n)}function mw(e,t,n=Je){const r=Array.isArray(t)?t:[t];if(r.filter(s=>typeof s!="function").some(s=>typeof s=="boolean"?s:n.isDate(s)?ot(e,s,!1,n):Cl(s,n)?s.some(c=>ot(e,c,!1,n)):wa(s)?s.from&&s.to?Fs(e,{from:s.from,to:s.to},n):!1:wl(s)?fw(e,s.dayOfWeek,n):yl(s)?n.isAfter(s.before,s.after)?Fs(e,{from:n.addDays(s.after,1),to:n.addDays(s.before,-1)},n):at(e.from,s,n)||at(e.to,s,n):bl(s)||xl(s)?at(e.from,s,n)||at(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 pw(e,t){const{disabled:n,excludeDisabled:r,selected:o,required:a,onSelect:i}=e,[s,c]=Or(o,i?o:void 0),u=i?o:s;return{selected:u,select:(p,h,y)=>{const{min:g,max:v}=e,w=p?dw(p,u,g,v,a,t):void 0;return r&&n&&(w!=null&&w.from)&&w.to&&mw({from:w.from,to:w.to},n,t)&&(w.from=p,w.to=void 0),i||c(w),i==null||i(w,p,h,y),w},isSelected:p=>u&&ot(u,p,!1,t)}}function hw(e,t){const{selected:n,required:r,onSelect:o}=e,[a,i]=Or(n,o?n:void 0),s=o?n:a,{isSameDay:c}=t;return{selected:s,select:(m,p,h)=>{let y=m;return!r&&s&&s&&c(m,s)&&(y=void 0),o||i(y),o==null||o(y,m,p,h),y},isSelected:m=>s?c(s,m):!1}}function gw(e,t){const n=hw(e,t),r=uw(e,t),o=pw(e,t);switch(e.mode){case"single":return n;case"multiple":return r;case"range":return o;default:return}}function vw(e){var Ua;let t=e;t.timeZone&&(t={...e},t.today&&(t.today=new we(t.today,t.timeZone)),t.month&&(t.month=new we(t.month,t.timeZone)),t.defaultMonth&&(t.defaultMonth=new we(t.defaultMonth,t.timeZone)),t.startMonth&&(t.startMonth=new we(t.startMonth,t.timeZone)),t.endMonth&&(t.endMonth=new we(t.endMonth,t.timeZone)),t.mode==="single"&&t.selected?t.selected=new we(t.selected,t.timeZone):t.mode==="multiple"&&t.selected?t.selected=(Ua=t.selected)==null?void 0:Ua.map(oe=>new we(oe,t.timeZone)):t.mode==="range"&&t.selected&&(t.selected={from:t.selected.from?new we(t.selected.from,t.timeZone):void 0,to:t.selected.to?new we(t.selected.to,t.timeZone):void 0}));const{components:n,formatters:r,labels:o,dateLib:a,locale:i,classNames:s}=E.useMemo(()=>{const oe={...xa,...t.locale};return{dateLib:new ct({locale:oe,weekStartsOn:t.broadcastCalendar?1:t.weekStartsOn,firstWeekContainsDate:t.firstWeekContainsDate,useAdditionalWeekYearTokens:t.useAdditionalWeekYearTokens,useAdditionalDayOfYearTokens:t.useAdditionalDayOfYearTokens,timeZone:t.timeZone,numerals:t.numerals},t.dateLib),components:xx(t.components),formatters:Ix(t.formatters),labels:{...zx,...t.labels},locale:oe,classNames:{...Cx(),...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:m=1,onDayBlur:p,onDayClick:h,onDayFocus:y,onDayKeyDown:g,onDayMouseEnter:v,onDayMouseLeave:w,onNextClick:x,onPrevClick:b,showWeekNumber:S,styles:C}=t,{formatCaption:M,formatDay:N,formatMonthDropdown:R,formatWeekNumber:_,formatWeekNumberHeader:A,formatWeekdayName:$,formatYearDropdown:D}=r,Y=sw(t,a),{days:H,months:J,navStart:j,navEnd:X,previousMonth:F,nextMonth:O,goToMonth:Z}=Y,te=Gb(H,t,a),{isSelected:P,select:W,selected:G}=gw(t,a)??{},{blur:L,focused:z,isFocusTarget:T,moveFocus:Q,setFocused:K}=lw(t,Y,te,P??(()=>!1),a),{labelDayButton:B,labelGridcell:ee,labelGrid:ne,labelMonthDropdown:le,labelNav:ye,labelPrevious:et,labelNext:tt,labelWeekday:nt,labelWeekNumber:an,labelWeekNumberHeader:Ae,labelYearDropdown:em}=o,tm=E.useMemo(()=>Ax(a,t.ISOWeek),[a,t.ISOWeek]),Ha=u!==void 0||h!==void 0,Ur=E.useCallback(()=>{F&&(Z(F),b==null||b(F))},[F,Z,b]),zr=E.useCallback(()=>{O&&(Z(O),x==null||x(O))},[Z,O,x]),nm=E.useCallback((oe,me)=>ue=>{ue.preventDefault(),ue.stopPropagation(),K(oe),W==null||W(oe.date,me,ue),h==null||h(oe.date,me,ue)},[W,h,K]),rm=E.useCallback((oe,me)=>ue=>{K(oe),y==null||y(oe.date,me,ue)},[y,K]),om=E.useCallback((oe,me)=>ue=>{L(),p==null||p(oe.date,me,ue)},[L,p]),am=E.useCallback((oe,me)=>ue=>{const lt={ArrowLeft:["day",t.dir==="rtl"?"after":"before"],ArrowRight:["day",t.dir==="rtl"?"before":"after"],ArrowDown:["week","after"],ArrowUp:["week","before"],PageUp:[ue.shiftKey?"year":"month","before"],PageDown:[ue.shiftKey?"year":"month","after"],Home:["startOfWeek","before"],End:["endOfWeek","after"]};if(lt[ue.key]){ue.preventDefault(),ue.stopPropagation();const[_e,Yn]=lt[ue.key];Q(_e,Yn)}g==null||g(oe.date,me,ue)},[Q,g,t.dir]),sm=E.useCallback((oe,me)=>ue=>{v==null||v(oe.date,me,ue)},[v]),im=E.useCallback((oe,me)=>ue=>{w==null||w(oe.date,me,ue)},[w]),cm=E.useCallback(oe=>me=>{const ue=Number(me.target.value),lt=a.setMonth(a.startOfMonth(oe),ue);Z(lt)},[a,Z]),lm=E.useCallback(oe=>me=>{const ue=Number(me.target.value),lt=a.setYear(a.startOfMonth(oe),ue);Z(lt)},[a,Z]),{className:um,style:dm}=E.useMemo(()=>({className:[s[U.Root],t.className].filter(Boolean).join(" "),style:{...C==null?void 0:C[U.Root],...t.style}}),[s,t.className,t.style,C]),fm=wx(t),Ga=E.useRef(null);Zx(Ga,!!t.animate,{classNames:s,months:J,focused:z,dateLib:a});const mm={dayPickerProps:t,selected:G,select:W,isSelected:P,months:J,nextMonth:O,previousMonth:F,goToMonth:Z,getModifiers:te,components:n,classNames:s,styles:C,labels:o,formatters:r};return E.createElement(Sl.Provider,{value:mm},E.createElement(n.Root,{rootRef:t.animate?Ga:void 0,className:um,style:dm,dir:t.dir,id:t.id,lang:t.lang,nonce:t.nonce,title:t.title,role:t.role,"aria-label":t["aria-label"],...fm},E.createElement(n.Months,{className:s[U.Months],style:C==null?void 0:C[U.Months]},!t.hideNavigation&&!f&&E.createElement(n.Nav,{"data-animated-nav":t.animate?"true":void 0,className:s[U.Nav],style:C==null?void 0:C[U.Nav],"aria-label":ye(),onPreviousClick:Ur,onNextClick:zr,previousMonth:F,nextMonth:O}),J.map((oe,me)=>{const ue=Dx(oe.date,j,X,r,a),lt=_x(j,X,r,a);return E.createElement(n.Month,{"data-animated-month":t.animate?"true":void 0,className:s[U.Month],style:C==null?void 0:C[U.Month],key:me,displayIndex:me,calendarMonth:oe},f==="around"&&!t.hideNavigation&&me===0&&E.createElement(n.PreviousMonthButton,{type:"button",className:s[U.PreviousMonthButton],tabIndex:F?void 0:-1,"aria-disabled":F?void 0:!0,"aria-label":et(F),onClick:Ur,"data-animated-button":t.animate?"true":void 0},E.createElement(n.Chevron,{disabled:F?void 0:!0,className:s[U.Chevron],orientation:t.dir==="rtl"?"right":"left"})),E.createElement(n.MonthCaption,{"data-animated-caption":t.animate?"true":void 0,className:s[U.MonthCaption],style:C==null?void 0:C[U.MonthCaption],calendarMonth:oe,displayIndex:me},c!=null&&c.startsWith("dropdown")?E.createElement(n.DropdownNav,{className:s[U.Dropdowns],style:C==null?void 0:C[U.Dropdowns]},c==="dropdown"||c==="dropdown-months"?E.createElement(n.MonthsDropdown,{className:s[U.MonthsDropdown],"aria-label":le(),classNames:s,components:n,disabled:!!t.disableNavigation,onChange:cm(oe.date),options:ue,style:C==null?void 0:C[U.Dropdown],value:a.getMonth(oe.date)}):E.createElement("span",null,R(oe.date,a)),c==="dropdown"||c==="dropdown-years"?E.createElement(n.YearsDropdown,{className:s[U.YearsDropdown],"aria-label":em(a.options),classNames:s,components:n,disabled:!!t.disableNavigation,onChange:lm(oe.date),options:lt,style:C==null?void 0:C[U.Dropdown],value:a.getYear(oe.date)}):E.createElement("span",null,D(oe.date,a)),E.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"}},M(oe.date,a.options,a))):E.createElement(n.CaptionLabel,{className:s[U.CaptionLabel],role:"status","aria-live":"polite"},M(oe.date,a.options,a))),f==="around"&&!t.hideNavigation&&me===m-1&&E.createElement(n.NextMonthButton,{type:"button",className:s[U.NextMonthButton],tabIndex:O?void 0:-1,"aria-disabled":O?void 0:!0,"aria-label":tt(O),onClick:zr,"data-animated-button":t.animate?"true":void 0},E.createElement(n.Chevron,{disabled:O?void 0:!0,className:s[U.Chevron],orientation:t.dir==="rtl"?"left":"right"})),me===m-1&&f==="after"&&!t.hideNavigation&&E.createElement(n.Nav,{"data-animated-nav":t.animate?"true":void 0,className:s[U.Nav],style:C==null?void 0:C[U.Nav],"aria-label":ye(),onPreviousClick:Ur,onNextClick:zr,previousMonth:F,nextMonth:O}),E.createElement(n.MonthGrid,{role:"grid","aria-multiselectable":u==="multiple"||u==="range","aria-label":ne(oe.date,a.options,a)||void 0,className:s[U.MonthGrid],style:C==null?void 0:C[U.MonthGrid]},!t.hideWeekdays&&E.createElement(n.Weekdays,{"data-animated-weekdays":t.animate?"true":void 0,className:s[U.Weekdays],style:C==null?void 0:C[U.Weekdays]},S&&E.createElement(n.WeekNumberHeader,{"aria-label":Ae(a.options),className:s[U.WeekNumberHeader],style:C==null?void 0:C[U.WeekNumberHeader],scope:"col"},A()),tm.map((_e,Yn)=>E.createElement(n.Weekday,{"aria-label":nt(_e,a.options,a),className:s[U.Weekday],key:Yn,style:C==null?void 0:C[U.Weekday],scope:"col"},$(_e,a.options,a)))),E.createElement(n.Weeks,{"data-animated-weeks":t.animate?"true":void 0,className:s[U.Weeks],style:C==null?void 0:C[U.Weeks]},oe.weeks.map((_e,Yn)=>E.createElement(n.Week,{className:s[U.Week],key:_e.weekNumber,style:C==null?void 0:C[U.Week],week:_e},S&&E.createElement(n.WeekNumber,{week:_e,style:C==null?void 0:C[U.WeekNumber],"aria-label":an(_e.weekNumber,{locale:i}),className:s[U.WeekNumber],scope:"row",role:"rowheader"},_(_e.weekNumber,a)),_e.days.map(xe=>{const{date:He}=xe,se=te(xe);if(se[pe.focused]=!se.hidden&&!!(z!=null&&z.isEqualTo(xe)),se[Fe.selected]=(P==null?void 0:P(He))||se.selected,wa(G)){const{from:Kr,to:qr}=G;se[Fe.range_start]=!!(Kr&&qr&&a.isSameDay(He,Kr)),se[Fe.range_end]=!!(Kr&&qr&&a.isSameDay(He,qr)),se[Fe.range_middle]=ot(G,He,!0,a)}const pm=Tx(se,C,t.modifiersStyles),hm=Ub(se,s,t.modifiersClassNames),gm=!Ha&&!se.hidden?ee(He,se,a.options,a):void 0;return E.createElement(n.Day,{key:`${a.format(He,"yyyy-MM-dd")}_${a.format(xe.displayMonth,"yyyy-MM")}`,day:xe,modifiers:se,className:hm.join(" "),style:pm,role:"gridcell","aria-selected":se.selected||void 0,"aria-label":gm,"data-day":a.format(He,"yyyy-MM-dd"),"data-month":xe.outside?a.format(He,"yyyy-MM"):void 0,"data-selected":se.selected||void 0,"data-disabled":se.disabled||void 0,"data-hidden":se.hidden||void 0,"data-outside":xe.outside||void 0,"data-focused":se.focused||void 0,"data-today":se.today||void 0},!se.hidden&&Ha?E.createElement(n.DayButton,{className:s[U.DayButton],style:C==null?void 0:C[U.DayButton],type:"button",day:xe,modifiers:se,disabled:se.disabled||void 0,tabIndex:T(xe)?0:-1,"aria-label":B(He,se,a.options,a),onClick:nm(xe,se),onBlur:om(xe,se),onFocus:rm(xe,se),onKeyDown:am(xe,se),onMouseEnter:sm(xe,se),onMouseLeave:im(xe,se)},N(He,a.options,a)):!se.hidden&&N(xe.date,a.options,a))}))))))})),t.footer&&E.createElement(n.Footer,{className:s[U.Footer],style:C==null?void 0:C[U.Footer],role:"status","aria-live":"polite"},t.footer)))}function kl(e,t,n){if(!t&&!n)throw new Error(`${e} must have either a label prop or an aria-label attribute`);if(t&&n)throw new Error(`${e} must have either a label prop or an aria-label attribute, but not both`)}const yw=()=>Array.from({length:12},(e,t)=>new Date(0,t).toLocaleString("en-US",{month:"long"})),bw=e=>{const{onSelect:t}=e,n=E.useRef(null);return E.useEffect(()=>{n.current&&n.current.focus()},[]),d.jsx("div",{className:`-mx-1 -my-1 grid max-h-72 min-w-80 grid-cols-1 gap-1 px-1 py-1 md:grid-cols-2
|
|
161
|
-
lg:grid-cols-3`,children:
|
|
162
|
-
focus-within:z-20 focus:opacity-100 focus:ring-2 focus:ring-offset-0`),size:"sm",variant:"ghost",onClick:()=>{t==null||t(o)},children:r},r))})},
|
|
163
|
-
lg:grid-cols-4`,children:
|
|
164
|
-
focus-within:z-20 focus:opacity-100 focus:ring-2 focus:ring-offset-0`),size:"sm",variant:"ghost",onClick:()=>{t==null||t(a)},children:a},a))})};function Ca({className:e,classNames:t,showOutsideDays:n=!0,...r}){const[o,a]=E.useState("default"),[i,s]=E.useState(void 0),c=E.useRef(null),u=E.useRef(null),f="h-7 md:h-9",m="w-7 px-0 py-0 focus:ring-2 focus:ring-offset-0 md:w-9",p="w-9 md:w-10 lg:w-11 px-0",h="h-9 md:h-10 lg:h-11 py-0",y=b=>{if(o==="month"||o==="year")return d.jsx(d.Fragment,{});const{orientation:S}=b;return S==="left"?d.jsx(
|
|
159
|
+
aria-selected:bg-accent aria-selected:text-accent-foreground`,e),...t}));Sr.displayName=Te.Item.displayName;const Nr=l.forwardRef(({className:e,...t},n)=>d.jsx(Te.List,{ref:n,className:k("max-h-[20rem] overflow-y-auto overflow-x-hidden",e),...t}));Nr.displayName=Te.List.displayName;const fc=({children:e="Loading...",...t})=>d.jsxs("div",{className:"flex items-center gap-2 px-3 py-2.5 text-sm text-muted-foreground",...t,children:[d.jsx(yi,{className:"h-4 w-4 animate-spin"}),e]});fc.displayName="CommandLoading";const ov=["top","right","bottom","left"],vt=Math.min,Pe=Math.max,or=Math.round,Xn=Math.floor,qe=e=>({x:e,y:e}),av={left:"right",right:"left",bottom:"top",top:"bottom"},sv={start:"end",end:"start"};function Eo(e,t,n){return Pe(e,vt(t,n))}function st(e,t){return typeof e=="function"?e(t):e}function it(e){return e.split("-")[0]}function Xt(e){return e.split("-")[1]}function ia(e){return e==="x"?"y":"x"}function ca(e){return e==="y"?"height":"width"}function yt(e){return["top","bottom"].includes(it(e))?"y":"x"}function la(e){return ia(yt(e))}function iv(e,t,n){n===void 0&&(n=!1);const r=Xt(e),o=la(e),a=ca(o);let i=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(i=ar(i)),[i,ar(i)]}function cv(e){const t=ar(e);return[Mo(e),t,Mo(t)]}function Mo(e){return e.replace(/start|end/g,t=>sv[t])}function lv(e,t,n){const r=["left","right"],o=["right","left"],a=["top","bottom"],i=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?a:i;default:return[]}}function uv(e,t,n,r){const o=Xt(e);let a=lv(it(e),n==="start",r);return o&&(a=a.map(i=>i+"-"+o),t&&(a=a.concat(a.map(Mo)))),a}function ar(e){return e.replace(/left|right|bottom|top/g,t=>av[t])}function dv(e){return{top:0,right:0,bottom:0,left:0,...e}}function mc(e){return typeof e!="number"?dv(e):{top:e,right:e,bottom:e,left:e}}function sr(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 ys(e,t,n){let{reference:r,floating:o}=e;const a=yt(t),i=la(t),s=ca(i),c=it(t),u=a==="y",f=r.x+r.width/2-o.width/2,m=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:m};break;case"left":h={x:r.x-o.width,y:m};break;default:h={x:r.x,y:r.y}}switch(Xt(t)){case"start":h[i]-=p*(n&&u?-1:1);break;case"end":h[i]+=p*(n&&u?-1:1);break}return h}const fv=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:m}=ys(u,r,c),p=r,h={},y=0;for(let g=0;g<s.length;g++){const{name:v,fn:w}=s[g],{x,y:b,data:S,reset:C}=await w({x:f,y:m,initialPlacement:r,placement:p,strategy:o,middlewareData:h,rects:u,platform:i,elements:{reference:e,floating:t}});f=x??f,m=b??m,h={...h,[v]:{...h[v],...S}},C&&y<=50&&(y++,typeof C=="object"&&(C.placement&&(p=C.placement),C.rects&&(u=C.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:o}):C.rects),{x:f,y:m}=ys(u,p,c)),g=-1)}return{x:f,y:m,placement:p,strategy:o,middlewareData:h}};async function yn(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:m="floating",altBoundary:p=!1,padding:h=0}=st(t,e),y=mc(h),v=s[p?m==="floating"?"reference":"floating":m],w=sr(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})),x=m==="floating"?{x:r,y:o,width:i.floating.width,height:i.floating.height}:i.reference,b=await(a.getOffsetParent==null?void 0:a.getOffsetParent(s.floating)),S=await(a.isElement==null?void 0:a.isElement(b))?await(a.getScale==null?void 0:a.getScale(b))||{x:1,y:1}:{x:1,y:1},C=sr(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:x,offsetParent:b,strategy:c}):x);return{top:(w.top-C.top+y.top)/S.y,bottom:(C.bottom-w.bottom+y.bottom)/S.y,left:(w.left-C.left+y.left)/S.x,right:(C.right-w.right+y.right)/S.x}}const mv=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}=st(e,t)||{};if(u==null)return{};const m=mc(f),p={x:n,y:r},h=la(o),y=ca(h),g=await i.getDimensions(u),v=h==="y",w=v?"top":"left",x=v?"bottom":"right",b=v?"clientHeight":"clientWidth",S=a.reference[y]+a.reference[h]-p[h]-a.floating[y],C=p[h]-a.reference[h],M=await(i.getOffsetParent==null?void 0:i.getOffsetParent(u));let N=M?M[b]:0;(!N||!await(i.isElement==null?void 0:i.isElement(M)))&&(N=s.floating[b]||a.floating[y]);const R=S/2-C/2,_=N/2-g[y]/2-1,A=vt(m[w],_),$=vt(m[x],_),D=A,Y=N-g[y]-$,H=N/2-g[y]/2+R,J=Eo(D,H,Y),j=!c.arrow&&Xt(o)!=null&&H!==J&&a.reference[y]/2-(H<D?A:$)-g[y]/2<0,X=j?H<D?H-D:H-Y:0;return{[h]:p[h]+X,data:{[h]:J,centerOffset:H-J-X,...j&&{alignmentOffset:X}},reset:j}}}),pv=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:m=!0,fallbackPlacements:p,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:y="none",flipAlignment:g=!0,...v}=st(e,t);if((n=a.arrow)!=null&&n.alignmentOffset)return{};const w=it(o),x=yt(s),b=it(s)===s,S=await(c.isRTL==null?void 0:c.isRTL(u.floating)),C=p||(b||!g?[ar(s)]:cv(s)),M=y!=="none";!p&&M&&C.push(...uv(s,g,y,S));const N=[s,...C],R=await yn(t,v),_=[];let A=((r=a.flip)==null?void 0:r.overflows)||[];if(f&&_.push(R[w]),m){const H=iv(o,i,S);_.push(R[H[0]],R[H[1]])}if(A=[...A,{placement:o,overflows:_}],!_.every(H=>H<=0)){var $,D;const H=((($=a.flip)==null?void 0:$.index)||0)+1,J=N[H];if(J)return{data:{index:H,overflows:A},reset:{placement:J}};let j=(D=A.filter(X=>X.overflows[0]<=0).sort((X,F)=>X.overflows[1]-F.overflows[1])[0])==null?void 0:D.placement;if(!j)switch(h){case"bestFit":{var Y;const X=(Y=A.filter(F=>{if(M){const O=yt(F.placement);return O===x||O==="y"}return!0}).map(F=>[F.placement,F.overflows.filter(O=>O>0).reduce((O,Z)=>O+Z,0)]).sort((F,O)=>F[1]-O[1])[0])==null?void 0:Y[0];X&&(j=X);break}case"initialPlacement":j=s;break}if(o!==j)return{reset:{placement:j}}}return{}}}};function bs(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function xs(e){return ov.some(t=>e[t]>=0)}const hv=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=st(e,t);switch(r){case"referenceHidden":{const a=await yn(t,{...o,elementContext:"reference"}),i=bs(a,n.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:xs(i)}}}case"escaped":{const a=await yn(t,{...o,altBoundary:!0}),i=bs(a,n.floating);return{data:{escapedOffsets:i,escaped:xs(i)}}}default:return{}}}}};async function gv(e,t){const{placement:n,platform:r,elements:o}=e,a=await(r.isRTL==null?void 0:r.isRTL(o.floating)),i=it(n),s=Xt(n),c=yt(n)==="y",u=["left","top"].includes(i)?-1:1,f=a&&c?-1:1,m=st(t,e);let{mainAxis:p,crossAxis:h,alignmentAxis:y}=typeof m=="number"?{mainAxis:m,crossAxis:0,alignmentAxis:null}:{mainAxis:m.mainAxis||0,crossAxis:m.crossAxis||0,alignmentAxis:m.alignmentAxis};return s&&typeof y=="number"&&(h=s==="end"?y*-1:y),c?{x:h*f,y:p*u}:{x:p*u,y:h*f}}const vv=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 gv(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}}}}},yv=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:a=!0,crossAxis:i=!1,limiter:s={fn:v=>{let{x:w,y:x}=v;return{x:w,y:x}}},...c}=st(e,t),u={x:n,y:r},f=await yn(t,c),m=yt(it(o)),p=ia(m);let h=u[p],y=u[m];if(a){const v=p==="y"?"top":"left",w=p==="y"?"bottom":"right",x=h+f[v],b=h-f[w];h=Eo(x,h,b)}if(i){const v=m==="y"?"top":"left",w=m==="y"?"bottom":"right",x=y+f[v],b=y-f[w];y=Eo(x,y,b)}const g=s.fn({...t,[p]:h,[m]:y});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[p]:a,[m]:i}}}}}},bv=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}=st(e,t),f={x:n,y:r},m=yt(o),p=ia(m);let h=f[p],y=f[m];const g=st(s,t),v=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(c){const b=p==="y"?"height":"width",S=a.reference[p]-a.floating[b]+v.mainAxis,C=a.reference[p]+a.reference[b]-v.mainAxis;h<S?h=S:h>C&&(h=C)}if(u){var w,x;const b=p==="y"?"width":"height",S=["top","left"].includes(it(o)),C=a.reference[m]-a.floating[b]+(S&&((w=i.offset)==null?void 0:w[m])||0)+(S?0:v.crossAxis),M=a.reference[m]+a.reference[b]+(S?0:((x=i.offset)==null?void 0:x[m])||0)-(S?v.crossAxis:0);y<C?y=C:y>M&&(y=M)}return{[p]:h,[m]:y}}}},xv=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}=st(e,t),f=await yn(t,u),m=it(o),p=Xt(o),h=yt(o)==="y",{width:y,height:g}=a.floating;let v,w;m==="top"||m==="bottom"?(v=m,w=p===(await(i.isRTL==null?void 0:i.isRTL(s.floating))?"start":"end")?"left":"right"):(w=m,v=p==="end"?"top":"bottom");const x=g-f.top-f.bottom,b=y-f.left-f.right,S=vt(g-f[v],x),C=vt(y-f[w],b),M=!t.middlewareData.shift;let N=S,R=C;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(R=b),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(N=x),M&&!p){const A=Pe(f.left,0),$=Pe(f.right,0),D=Pe(f.top,0),Y=Pe(f.bottom,0);h?R=y-2*(A!==0||$!==0?A+$:Pe(f.left,f.right)):N=g-2*(D!==0||Y!==0?D+Y:Pe(f.top,f.bottom))}await c({...t,availableWidth:R,availableHeight:N});const _=await i.getDimensions(s.floating);return y!==_.width||g!==_.height?{reset:{rects:!0}}:{}}}};function Er(){return typeof window<"u"}function Zt(e){return pc(e)?(e.nodeName||"").toLowerCase():"#document"}function ke(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Qe(e){var t;return(t=(pc(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function pc(e){return Er()?e instanceof Node||e instanceof ke(e).Node:!1}function Le(e){return Er()?e instanceof Element||e instanceof ke(e).Element:!1}function Ze(e){return Er()?e instanceof HTMLElement||e instanceof ke(e).HTMLElement:!1}function ws(e){return!Er()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ke(e).ShadowRoot}function Dn(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=We(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function wv(e){return["table","td","th"].includes(Zt(e))}function Mr(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function ua(e){const t=da(),n=Le(e)?We(e):e;return["transform","translate","scale","rotate","perspective"].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)||["transform","translate","scale","rotate","perspective","filter"].some(r=>(n.willChange||"").includes(r))||["paint","layout","strict","content"].some(r=>(n.contain||"").includes(r))}function Cv(e){let t=bt(e);for(;Ze(t)&&!Gt(t);){if(ua(t))return t;if(Mr(t))return null;t=bt(t)}return null}function da(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Gt(e){return["html","body","#document"].includes(Zt(e))}function We(e){return ke(e).getComputedStyle(e)}function Rr(e){return Le(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function bt(e){if(Zt(e)==="html")return e;const t=e.assignedSlot||e.parentNode||ws(e)&&e.host||Qe(e);return ws(t)?t.host:t}function hc(e){const t=bt(e);return Gt(t)?e.ownerDocument?e.ownerDocument.body:e.body:Ze(t)&&Dn(t)?t:hc(t)}function bn(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=hc(e),a=o===((r=e.ownerDocument)==null?void 0:r.body),i=ke(o);if(a){const s=Ro(i);return t.concat(i,i.visualViewport||[],Dn(o)?o:[],s&&n?bn(s):[])}return t.concat(o,bn(o,[],n))}function Ro(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function gc(e){const t=We(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Ze(e),a=o?e.offsetWidth:n,i=o?e.offsetHeight:r,s=or(n)!==a||or(r)!==i;return s&&(n=a,r=i),{width:n,height:r,$:s}}function fa(e){return Le(e)?e:e.contextElement}function Ht(e){const t=fa(e);if(!Ze(t))return qe(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:a}=gc(t);let i=(a?or(n.width):n.width)/r,s=(a?or(n.height):n.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!s||!Number.isFinite(s))&&(s=1),{x:i,y:s}}const Sv=qe(0);function vc(e){const t=ke(e);return!da()||!t.visualViewport?Sv:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function Nv(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==ke(e)?!1:t}function Rt(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),a=fa(e);let i=qe(1);t&&(r?Le(r)&&(i=Ht(r)):i=Ht(e));const s=Nv(a,n,r)?vc(a):qe(0);let c=(o.left+s.x)/i.x,u=(o.top+s.y)/i.y,f=o.width/i.x,m=o.height/i.y;if(a){const p=ke(a),h=r&&Le(r)?ke(r):r;let y=p,g=Ro(y);for(;g&&r&&h!==y;){const v=Ht(g),w=g.getBoundingClientRect(),x=We(g),b=w.left+(g.clientLeft+parseFloat(x.paddingLeft))*v.x,S=w.top+(g.clientTop+parseFloat(x.paddingTop))*v.y;c*=v.x,u*=v.y,f*=v.x,m*=v.y,c+=b,u+=S,y=ke(g),g=Ro(y)}}return sr({width:f,height:m,x:c,y:u})}function ma(e,t){const n=Rr(e).scrollLeft;return t?t.left+n:Rt(Qe(e)).left+n}function yc(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),o=r.left+t.scrollLeft-(n?0:ma(e,r)),a=r.top+t.scrollTop;return{x:o,y:a}}function Ev(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const a=o==="fixed",i=Qe(r),s=t?Mr(t.floating):!1;if(r===i||s&&a)return n;let c={scrollLeft:0,scrollTop:0},u=qe(1);const f=qe(0),m=Ze(r);if((m||!m&&!a)&&((Zt(r)!=="body"||Dn(i))&&(c=Rr(r)),Ze(r))){const h=Rt(r);u=Ht(r),f.x=h.x+r.clientLeft,f.y=h.y+r.clientTop}const p=i&&!m&&!a?yc(i,c,!0):qe(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 Mv(e){return Array.from(e.getClientRects())}function Rv(e){const t=Qe(e),n=Rr(e),r=e.ownerDocument.body,o=Pe(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=Pe(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+ma(e);const s=-n.scrollTop;return We(r).direction==="rtl"&&(i+=Pe(t.clientWidth,r.clientWidth)-o),{width:o,height:a,x:i,y:s}}function Pv(e,t){const n=ke(e),r=Qe(e),o=n.visualViewport;let a=r.clientWidth,i=r.clientHeight,s=0,c=0;if(o){a=o.width,i=o.height;const u=da();(!u||u&&t==="fixed")&&(s=o.offsetLeft,c=o.offsetTop)}return{width:a,height:i,x:s,y:c}}function kv(e,t){const n=Rt(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,a=Ze(e)?Ht(e):qe(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 Cs(e,t,n){let r;if(t==="viewport")r=Pv(e,n);else if(t==="document")r=Rv(Qe(e));else if(Le(t))r=kv(t,n);else{const o=vc(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return sr(r)}function bc(e,t){const n=bt(e);return n===t||!Le(n)||Gt(n)?!1:We(n).position==="fixed"||bc(n,t)}function Ov(e,t){const n=t.get(e);if(n)return n;let r=bn(e,[],!1).filter(s=>Le(s)&&Zt(s)!=="body"),o=null;const a=We(e).position==="fixed";let i=a?bt(e):e;for(;Le(i)&&!Gt(i);){const s=We(i),c=ua(i);!c&&s.position==="fixed"&&(o=null),(a?!c&&!o:!c&&s.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||Dn(i)&&!c&&bc(e,i))?r=r.filter(f=>f!==i):o=s,i=bt(i)}return t.set(e,r),r}function Iv(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[...n==="clippingAncestors"?Mr(t)?[]:Ov(t,this._c):[].concat(n),r],s=i[0],c=i.reduce((u,f)=>{const m=Cs(t,f,o);return u.top=Pe(m.top,u.top),u.right=vt(m.right,u.right),u.bottom=vt(m.bottom,u.bottom),u.left=Pe(m.left,u.left),u},Cs(t,s,o));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function Dv(e){const{width:t,height:n}=gc(e);return{width:t,height:n}}function Tv(e,t,n){const r=Ze(t),o=Qe(t),a=n==="fixed",i=Rt(e,!0,a,t);let s={scrollLeft:0,scrollTop:0};const c=qe(0);if(r||!r&&!a)if((Zt(t)!=="body"||Dn(o))&&(s=Rr(t)),r){const p=Rt(t,!0,a,t);c.x=p.x+t.clientLeft,c.y=p.y+t.clientTop}else o&&(c.x=ma(o));const u=o&&!r&&!a?yc(o,s):qe(0),f=i.left+s.scrollLeft-c.x-u.x,m=i.top+s.scrollTop-c.y-u.y;return{x:f,y:m,width:i.width,height:i.height}}function io(e){return We(e).position==="static"}function Ss(e,t){if(!Ze(e)||We(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Qe(e)===n&&(n=n.ownerDocument.body),n}function xc(e,t){const n=ke(e);if(Mr(e))return n;if(!Ze(e)){let o=bt(e);for(;o&&!Gt(o);){if(Le(o)&&!io(o))return o;o=bt(o)}return n}let r=Ss(e,t);for(;r&&wv(r)&&io(r);)r=Ss(r,t);return r&&Gt(r)&&io(r)&&!ua(r)?n:r||Cv(e)||n}const Av=async function(e){const t=this.getOffsetParent||xc,n=this.getDimensions,r=await n(e.floating);return{reference:Tv(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function _v(e){return We(e).direction==="rtl"}const jv={convertOffsetParentRelativeRectToViewportRelativeRect:Ev,getDocumentElement:Qe,getClippingRect:Iv,getOffsetParent:xc,getElementRects:Av,getClientRects:Mv,getDimensions:Dv,getScale:Ht,isElement:Le,isRTL:_v};function wc(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=Qe(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:m,width:p,height:h}=u;if(s||t(),!p||!h)return;const y=Xn(m),g=Xn(o.clientWidth-(f+p)),v=Xn(o.clientHeight-(m+h)),w=Xn(f),b={rootMargin:-y+"px "+-g+"px "+-v+"px "+-w+"px",threshold:Pe(0,vt(1,c))||1};let S=!0;function C(M){const N=M[0].intersectionRatio;if(N!==c){if(!S)return i();N?i(!1,N):r=setTimeout(()=>{i(!1,1e-7)},1e3)}N===1&&!wc(u,e.getBoundingClientRect())&&i(),S=!1}try{n=new IntersectionObserver(C,{...b,root:o.ownerDocument})}catch{n=new IntersectionObserver(C,b)}n.observe(e)}return i(!0),a}function Cc(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=fa(e),f=o||a?[...u?bn(u):[],...bn(t)]:[];f.forEach(w=>{o&&w.addEventListener("scroll",n,{passive:!0}),a&&w.addEventListener("resize",n)});const m=u&&s?Fv(u,n):null;let p=-1,h=null;i&&(h=new ResizeObserver(w=>{let[x]=w;x&&x.target===u&&h&&(h.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var b;(b=h)==null||b.observe(t)})),n()}),u&&!c&&h.observe(u),h.observe(t));let y,g=c?Rt(e):null;c&&v();function v(){const w=Rt(e);g&&!wc(g,w)&&n(),g=w,y=requestAnimationFrame(v)}return n(),()=>{var w;f.forEach(x=>{o&&x.removeEventListener("scroll",n),a&&x.removeEventListener("resize",n)}),m==null||m(),(w=h)==null||w.disconnect(),h=null,c&&cancelAnimationFrame(y)}}const $v=vv,Lv=yv,Wv=pv,Bv=xv,Vv=hv,Ns=mv,Yv=bv,Hv=(e,t,n)=>{const r=new Map,o={platform:jv,...n},a={...o.platform,_c:r};return fv(e,t,{...o,platform:a})};var tr=typeof document<"u"?E.useLayoutEffect:E.useEffect;function ir(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(!ir(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)&&!ir(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function Sc(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Es(e,t){const n=Sc(e);return Math.round(t*n)/n}function co(e){const t=l.useRef(e);return tr(()=>{t.current=e}),t}function Nc(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,m]=l.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,h]=l.useState(r);ir(p,r)||h(r);const[y,g]=l.useState(null),[v,w]=l.useState(null),x=l.useCallback(F=>{F!==M.current&&(M.current=F,g(F))},[]),b=l.useCallback(F=>{F!==N.current&&(N.current=F,w(F))},[]),S=a||y,C=i||v,M=l.useRef(null),N=l.useRef(null),R=l.useRef(f),_=c!=null,A=co(c),$=co(o),D=co(u),Y=l.useCallback(()=>{if(!M.current||!N.current)return;const F={placement:t,strategy:n,middleware:p};$.current&&(F.platform=$.current),Hv(M.current,N.current,F).then(O=>{const Z={...O,isPositioned:D.current!==!1};H.current&&!ir(R.current,Z)&&(R.current=Z,En.flushSync(()=>{m(Z)}))})},[p,t,n,$,D]);tr(()=>{u===!1&&R.current.isPositioned&&(R.current.isPositioned=!1,m(F=>({...F,isPositioned:!1})))},[u]);const H=l.useRef(!1);tr(()=>(H.current=!0,()=>{H.current=!1}),[]),tr(()=>{if(S&&(M.current=S),C&&(N.current=C),S&&C){if(A.current)return A.current(S,C,Y);Y()}},[S,C,Y,A,_]);const J=l.useMemo(()=>({reference:M,floating:N,setReference:x,setFloating:b}),[x,b]),j=l.useMemo(()=>({reference:S,floating:C}),[S,C]),X=l.useMemo(()=>{const F={position:n,left:0,top:0};if(!j.floating)return F;const O=Es(j.floating,f.x),Z=Es(j.floating,f.y);return s?{...F,transform:"translate("+O+"px, "+Z+"px)",...Sc(j.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:O,top:Z}},[n,s,j.floating,f.x,f.y]);return l.useMemo(()=>({...f,update:Y,refs:J,elements:j,floatingStyles:X}),[f,Y,J,j,X])}const Gv=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?Ns({element:r.current,padding:o}).fn(n):{}:r?Ns({element:r,padding:o}).fn(n):{}}}},Ec=(e,t)=>({...$v(e),options:[e,t]}),Mc=(e,t)=>({...Lv(e),options:[e,t]}),Rc=(e,t)=>({...Yv(e),options:[e,t]}),Pc=(e,t)=>({...Wv(e),options:[e,t]}),kc=(e,t)=>({...Bv(e),options:[e,t]}),Oc=(e,t)=>({...Vv(e),options:[e,t]}),Ic=(e,t)=>({...Gv(e),options:[e,t]});var Uv="Arrow",Dc=l.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...a}=e;return d.jsx(V.svg,{...a,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:d.jsx("polygon",{points:"0,0 30,0 15,10"})})});Dc.displayName=Uv;var zv=Dc;function Tn(e){const[t,n]=l.useState(void 0);return fe(()=>{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 pa="Popper",[Tc,Qt]=ve(pa),[Kv,Ac]=Tc(pa),_c=e=>{const{__scopePopper:t,children:n}=e,[r,o]=l.useState(null);return d.jsx(Kv,{scope:t,anchor:r,onAnchorChange:o,children:n})};_c.displayName=pa;var jc="PopperAnchor",Fc=l.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,a=Ac(jc,n),i=l.useRef(null),s=q(t,i);return l.useEffect(()=>{a.onAnchorChange((r==null?void 0:r.current)||i.current)}),r?null:d.jsx(V.div,{...o,ref:s})});Fc.displayName=jc;var ha="PopperContent",[qv,Xv]=Tc(ha),$c=l.forwardRef((e,t)=>{var T,Q,K,B,ee,ne;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:m="partial",hideWhenDetached:p=!1,updatePositionStrategy:h="optimized",onPlaced:y,...g}=e,v=Ac(ha,n),[w,x]=l.useState(null),b=q(t,le=>x(le)),[S,C]=l.useState(null),M=Tn(S),N=(M==null?void 0:M.width)??0,R=(M==null?void 0:M.height)??0,_=r+(a!=="center"?"-"+a:""),A=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},$=Array.isArray(u)?u:[u],D=$.length>0,Y={padding:A,boundary:$.filter(Qv),altBoundary:D},{refs:H,floatingStyles:J,placement:j,isPositioned:X,middlewareData:F}=Nc({strategy:"fixed",placement:_,whileElementsMounted:(...le)=>Cc(...le,{animationFrame:h==="always"}),elements:{reference:v.anchor},middleware:[Ec({mainAxis:o+R,alignmentAxis:i}),c&&Mc({mainAxis:!0,crossAxis:!1,limiter:m==="partial"?Rc():void 0,...Y}),c&&Pc({...Y}),kc({...Y,apply:({elements:le,rects:ye,availableWidth:et,availableHeight:tt})=>{const{width:nt,height:an}=ye.reference,Ae=le.floating.style;Ae.setProperty("--radix-popper-available-width",`${et}px`),Ae.setProperty("--radix-popper-available-height",`${tt}px`),Ae.setProperty("--radix-popper-anchor-width",`${nt}px`),Ae.setProperty("--radix-popper-anchor-height",`${an}px`)}}),S&&Ic({element:S,padding:s}),Jv({arrowWidth:N,arrowHeight:R}),p&&Oc({strategy:"referenceHidden",...Y})]}),[O,Z]=Bc(j),te=Ne(y);fe(()=>{X&&(te==null||te())},[X,te]);const P=(T=F.arrow)==null?void 0:T.x,W=(Q=F.arrow)==null?void 0:Q.y,G=((K=F.arrow)==null?void 0:K.centerOffset)!==0,[L,z]=l.useState();return fe(()=>{w&&z(window.getComputedStyle(w).zIndex)},[w]),d.jsx("div",{ref:H.setFloating,"data-radix-popper-content-wrapper":"",style:{...J,transform:X?J.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:L,"--radix-popper-transform-origin":[(B=F.transformOrigin)==null?void 0:B.x,(ee=F.transformOrigin)==null?void 0:ee.y].join(" "),...((ne=F.hide)==null?void 0:ne.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:d.jsx(qv,{scope:n,placedSide:O,onArrowChange:C,arrowX:P,arrowY:W,shouldHideArrow:G,children:d.jsx(V.div,{"data-side":O,"data-align":Z,...g,ref:b,style:{...g.style,animation:X?void 0:"none"}})})})});$c.displayName=ha;var Lc="PopperArrow",Zv={top:"bottom",right:"left",bottom:"top",left:"right"},Wc=l.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,a=Xv(Lc,r),i=Zv[a.placedSide];return d.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:d.jsx(zv,{...o,ref:n,style:{...o.style,display:"block"}})})});Wc.displayName=Lc;function Qv(e){return e!==null}var Jv=e=>({name:"transformOrigin",options:e,fn(t){var v,w,x;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]=Bc(n),m={start:"0%",center:"50%",end:"100%"}[f],p=(((w=o.arrow)==null?void 0:w.x)??0)+s/2,h=(((x=o.arrow)==null?void 0:x.y)??0)+c/2;let y="",g="";return u==="bottom"?(y=i?m:`${p}px`,g=`${-c}px`):u==="top"?(y=i?m:`${p}px`,g=`${r.floating.height+c}px`):u==="right"?(y=`${-c}px`,g=i?m:`${h}px`):u==="left"&&(y=`${r.floating.width+c}px`,g=i?m:`${h}px`),{data:{x:y,y:g}}}});function Bc(e){const[t,n="center"]=e.split("-");return[t,n]}var ga=_c,Pr=Fc,va=$c,ya=Wc,kr="Popover",[Vc,QN]=ve(kr,[Qt]),An=Qt(),[ey,wt]=Vc(kr),Yc=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:o,onOpenChange:a,modal:i=!1}=e,s=An(t),c=l.useRef(null),[u,f]=l.useState(!1),[m,p]=Ce({prop:r,defaultProp:o??!1,onChange:a,caller:kr});return d.jsx(ga,{...s,children:d.jsx(ey,{scope:t,contentId:he(),triggerRef:c,open:m,onOpenChange:p,onOpenToggle:l.useCallback(()=>p(h=>!h),[p]),hasCustomAnchor:u,onCustomAnchorAdd:l.useCallback(()=>f(!0),[]),onCustomAnchorRemove:l.useCallback(()=>f(!1),[]),modal:i,children:n})})};Yc.displayName=kr;var Hc="PopoverAnchor",ty=l.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=wt(Hc,n),a=An(n),{onCustomAnchorAdd:i,onCustomAnchorRemove:s}=o;return l.useEffect(()=>(i(),()=>s()),[i,s]),d.jsx(Pr,{...a,...r,ref:t})});ty.displayName=Hc;var Gc="PopoverTrigger",Uc=l.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=wt(Gc,n),a=An(n),i=q(t,o.triggerRef),s=d.jsx(V.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Qc(o.open),...r,ref:i,onClick:I(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?s:d.jsx(Pr,{asChild:!0,...a,children:s})});Uc.displayName=Gc;var ba="PopoverPortal",[ny,ry]=Vc(ba,{forceMount:void 0}),zc=e=>{const{__scopePopover:t,forceMount:n,children:r,container:o}=e,a=wt(ba,t);return d.jsx(ny,{scope:t,forceMount:n,children:d.jsx(De,{present:n||a.open,children:d.jsx(kn,{asChild:!0,container:o,children:r})})})};zc.displayName=ba;var Ut="PopoverContent",Kc=l.forwardRef((e,t)=>{const n=ry(Ut,e.__scopePopover),{forceMount:r=n.forceMount,...o}=e,a=wt(Ut,e.__scopePopover);return d.jsx(De,{present:r||a.open,children:a.modal?d.jsx(ay,{...o,ref:t}):d.jsx(sy,{...o,ref:t})})});Kc.displayName=Ut;var oy=ht("PopoverContent.RemoveScroll"),ay=l.forwardRef((e,t)=>{const n=wt(Ut,e.__scopePopover),r=l.useRef(null),o=q(t,r),a=l.useRef(!1);return l.useEffect(()=>{const i=r.current;if(i)return vr(i)},[]),d.jsx(On,{as:oy,allowPinchZoom:!0,children:d.jsx(qc,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:I(e.onCloseAutoFocus,i=>{var s;i.preventDefault(),a.current||(s=n.triggerRef.current)==null||s.focus()}),onPointerDownOutside:I(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:I(e.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1})})})}),sy=l.forwardRef((e,t)=>{const n=wt(Ut,e.__scopePopover),r=l.useRef(!1),o=l.useRef(!1);return d.jsx(qc,{...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()}})}),qc=l.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:a,disableOutsidePointerEvents:i,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:u,onInteractOutside:f,...m}=e,p=wt(Ut,n),h=An(n);return hr(),d.jsx(Pn,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:a,children:d.jsx(Rn,{asChild:!0,disableOutsidePointerEvents:i,onInteractOutside:f,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:u,onDismiss:()=>p.onOpenChange(!1),children:d.jsx(va,{"data-state":Qc(p.open),role:"dialog",id:p.contentId,...h,...m,ref:t,style:{...m.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)"}})})})}),Xc="PopoverClose",iy=l.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=wt(Xc,n);return d.jsx(V.button,{type:"button",...r,ref:t,onClick:I(e.onClick,()=>o.onOpenChange(!1))})});iy.displayName=Xc;var cy="PopoverArrow",Zc=l.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=An(n);return d.jsx(ya,{...o,...r,ref:t})});Zc.displayName=cy;function Qc(e){return e?"open":"closed"}var ly=Yc,uy=Uc,dy=zc,Jc=Kc,fy=Zc;const Jt=ly,en=uy,my=fy,Dt=l.forwardRef(({className:e,align:t="center",sideOffset:n=4,hasArrow:r,zIndex:o,children:a,...i},s)=>{const c=Ye("popover",o);return d.jsx(dy,{children:d.jsxs(Jc,{ref:s,align:t,className:k(ae.popover,e),sideOffset:n,style:{zIndex:c,...i.style},...i,children:[a,r?d.jsx(my,{className:"fill-popover stroke-muted stroke-[1px]",height:7,width:15}):null]})})});Dt.displayName=Jc.displayName;function py(e,t,n){const r=e[t],o=e[n];let a="";return typeof o=="string"?a=o:(typeof o=="number"||typeof o=="boolean"||typeof o=="bigint")&&(a=String(o)),{value:String(r??""),label:a}}function hy({loadOptions:e,options:t=[],value:n,onChange:r,placeholder:o="Select an option...",loadingMessage:a="Loading...",emptyMessage:i="No results found",errorMessage:s="Failed to load options",className:c,listClassName:u,maxSuggestions:f=10,debounceMs:m=300,minSearch:p=2,zIndex:h,isDisabled:y=!1,name:g,required:v,autoFocus:w,renderOption:x,valueKey:b,labelKey:S,...C},M){const[N,R]=E.useState(!1),_=Ye("dropdown",h),[A,$]=E.useState(""),[D,Y]=E.useState(!1),[H,J]=E.useState(!1),[j,X]=E.useState([]),[F,O]=E.useState(!1),Z=E.useRef();E.useEffect(()=>()=>{Z.current&&clearTimeout(Z.current)},[]);const te=E.useCallback(async B=>{if(e)try{Y(!0),J(!1);const ee=await e(B);X(ee.slice(0,f)),O(!0)}catch(ee){console.error("Error fetching options:",ee),J(!0),X([])}finally{Y(!1)}},[e,f]),P=E.useMemo(()=>{if(e)return[];const B=A.toLowerCase().trim();return B.length>0&&O(!0),t.filter(ee=>{const ne=ee,le=String(b),ye=String(S);return typeof ne[ye]=="string"&&String(ne[ye]).toLowerCase().includes(B)||typeof ne[le]=="string"&&String(ne[le]).toLowerCase().includes(B)}).slice(0,f)},[e,t,A,f,b,S]),W=e?j:P,G=E.useMemo(()=>n===""?"":String(n),[n]),L=String(b),z=E.useMemo(()=>W.find(B=>String(B[L])===G),[W,G,L]),T=E.useCallback(B=>{const ee=W.find(ne=>String(ne[L])===B);if(ee){const ne=ee[L];r(ne,ee)}R(!1),$(""),O(!1)},[r,W,L]),Q=E.useCallback(B=>{$(B),B.length===0&&O(!1),Z.current&&clearTimeout(Z.current),e&&B.length>=p?Z.current=setTimeout(()=>{te(B)},m):e&&B.length===0&&X([])},[e,p,m,te]),K=E.useCallback(()=>{r("",void 0),$(""),X([]),O(!1)},[r]);return d.jsxs(d.Fragment,{children:[g||v?d.jsx("input",{name:g,required:v,type:"hidden",value:n===""?"":String(n)}):null,d.jsxs(Jt,{open:N,onOpenChange:R,children:[d.jsx(en,{asChild:!0,children:d.jsxs($e,{ref:M,"aria-expanded":N,autoFocus:w,className:k("w-full justify-between px-3",!z&&!n&&"text-muted-foreground",c),isDisabled:y,role:"combobox",variant:"input",...C,children:[d.jsx("span",{className:"truncate",children:(()=>{if(z){const B=z[String(S)];return typeof B=="string"?B:n?String(n):o}return n?String(n):o})()}),d.jsxs("div",{className:"flex items-center gap-1",children:[n!==""&&n||A?d.jsx(pr,{className:"h-4 w-4 opacity-50 hover:opacity-100",onClick:B=>{B.stopPropagation(),K()}}):null,d.jsx(Zo,{className:"h-4 w-4 shrink-0 opacity-50"})]})]})}),d.jsx(Dt,{align:"start",className:"w-[--radix-popover-trigger-width] px-0 py-0",zIndex:_,children:d.jsxs(xr,{shouldFilter:!1,children:[d.jsx(Cr,{placeholder:o,value:A,onValueChange:Q}),D?d.jsx(fc,{children:a}):null,!D&&H?d.jsx(No,{children:s}):null,!D&&!H&&F&&W.length===0?d.jsx(No,{children:i}):null,!D&&!H&&W.length>0?d.jsx(Nr,{className:k("max-h-[16.5rem] overflow-y-auto",u),children:d.jsx(wr,{children:W.map(B=>{const{value:ee,label:ne}=py(B,b,S),le=!!(ee&&n!==""&&ee===G);return d.jsx(Sr,{className:"cursor-pointer",value:ee,onSelect:T,children:x?x(B,le):d.jsxs(d.Fragment,{children:[d.jsx(Ot,{className:k("mr-2 h-4 w-4",le?"opacity-100":"opacity-0")}),ne]})},ee)})})}):null]})})]})]})}const el=E.forwardRef(hy);el.displayName="Autocomplete";const gy=el,vy=Se(`inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold
|
|
160
|
+
transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2`,{variants:{variant:{default:"border-transparent bg-base-200 text-black",primary:"border-transparent bg-primary-400 text-white",success:"border-transparent bg-success-500 text-white",danger:"border-transparent bg-danger-400 text-white",warning:"border-transparent bg-warning-300 text-black",outline:"text-foreground"}},defaultVariants:{variant:"default"}}),tl=l.forwardRef(({className:e,variant:t,...n},r)=>d.jsx("div",{ref:r,className:k(vy({variant:t,className:e})),...n}));tl.displayName="Badge";const nl=l.forwardRef(({items:e,separator:t=d.jsx(Xo,{className:"h-4 w-4"}),className:n,...r},o)=>d.jsx("nav",{ref:o,"aria-label":"Breadcrumb",className:k("flex",n),...r,children:d.jsx("ol",{className:"flex flex-wrap items-center gap-1 pl-0",children:e.map((a,i)=>d.jsxs("li",{className:"flex items-center gap-1",children:[a.href?d.jsx("a",{className:k(ae.link,ae.linkNoUnderline),href:a.href,children:a.label}):d.jsx("span",{className:"font-medium text-foreground",children:a.label}),i<e.length-1?d.jsx("span",{className:"text-muted-foreground",children:t}):null]},i))})}));nl.displayName="Breadcrumbs";const lo={},fn={};function hn(e,t){try{const r=(lo[e]||(lo[e]=new Intl.DateTimeFormat("en-GB",{timeZone:e,hour:"numeric",timeZoneName:"longOffset"}).format))(t).split("GMT")[1]||"";return r in fn?fn[r]:Ms(r,r.split(":"))}catch{if(e in fn)return fn[e];const n=e==null?void 0:e.match(yy);return n?Ms(e,n.slice(1)):NaN}}const yy=/([+-]\d\d):?(\d\d)?/;function Ms(e,t){const n=+t[0],r=+(t[1]||0);return fn[e]=n>0?n*60+r:n*60-r}class ze extends Date{constructor(...t){super(),t.length>1&&typeof t[t.length-1]=="string"&&(this.timeZone=t.pop()),this.internal=new Date,isNaN(hn(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)),rl(this),Po(this)):this.setTime(Date.now())}static tz(t,...n){return n.length?new ze(...n,t):new ze(Date.now(),t)}withTimeZone(t){return new ze(+this,t)}getTimezoneOffset(){return-hn(this.timeZone,this)}setTime(t){return Date.prototype.setTime.apply(this,arguments),Po(this),+this}[Symbol.for("constructDateFrom")](t){return new ze(+new Date(t),this.timeZone)}}const Rs=/^(get|set)(?!UTC)/;Object.getOwnPropertyNames(Date.prototype).forEach(e=>{if(!Rs.test(e))return;const t=e.replace(Rs,"$1UTC");ze.prototype[t]&&(e.startsWith("get")?ze.prototype[e]=function(){return this.internal[t]()}:(ze.prototype[e]=function(){return Date.prototype[t].apply(this.internal,arguments),by(this),+this},ze.prototype[t]=function(){return Date.prototype[t].apply(this,arguments),Po(this),+this}))});function Po(e){e.internal.setTime(+e),e.internal.setUTCMinutes(e.internal.getUTCMinutes()-e.getTimezoneOffset())}function by(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()),rl(e)}function rl(e){const t=hn(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=hn(e.timeZone,e),f=-new Date(+e).getTimezoneOffset()-c,m=c!==t,p=f-s;if(m&&p){Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+p);const h=hn(e.timeZone,e),y=c-h;y&&(e.internal.setUTCMinutes(e.internal.getUTCMinutes()+y),Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+y))}}class we extends ze{static tz(t,...n){return n.length?new we(...n,t):new we(Date.now(),t)}toISOString(){const[t,n,r]=this.tzComponents(),o=`${t}${n}:${r}`;return this.internal.toISOString().slice(0,-1)+o}toString(){return`${this.toDateString()} ${this.toTimeString()}`}toDateString(){const[t,n,r,o]=this.internal.toUTCString().split(" ");return`${t==null?void 0:t.slice(0,-1)} ${r} ${n} ${o}`}toTimeString(){const t=this.internal.toUTCString().split(" ")[4],[n,r,o]=this.tzComponents();return`${t} GMT${n}${r}${o} (${xy(this.timeZone,this)})`}toLocaleString(t,n){return Date.prototype.toLocaleString.call(this,t,{...n,timeZone:(n==null?void 0:n.timeZone)||this.timeZone})}toLocaleDateString(t,n){return Date.prototype.toLocaleDateString.call(this,t,{...n,timeZone:(n==null?void 0:n.timeZone)||this.timeZone})}toLocaleTimeString(t,n){return Date.prototype.toLocaleTimeString.call(this,t,{...n,timeZone:(n==null?void 0:n.timeZone)||this.timeZone})}tzComponents(){const t=this.getTimezoneOffset(),n=t>0?"-":"+",r=String(Math.floor(Math.abs(t)/60)).padStart(2,"0"),o=String(Math.abs(t)%60).padStart(2,"0");return[n,r,o]}withTimeZone(t){return new we(+this,t)}[Symbol.for("constructDateFrom")](t){return new we(+new Date(t),this.timeZone)}}function xy(e,t){return new Intl.DateTimeFormat("en-GB",{timeZone:e,timeZoneName:"long"}).format(t).slice(12)}var U;(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"})(U||(U={}));var pe;(function(e){e.disabled="disabled",e.hidden="hidden",e.outside="outside",e.focused="focused",e.today="today"})(pe||(pe={}));var Fe;(function(e){e.range_end="range_end",e.range_middle="range_middle",e.range_start="range_start",e.selected="selected"})(Fe||(Fe={}));var Re;(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"})(Re||(Re={}));const ol=6048e5,wy=864e5,Ps=Symbol.for("constructDateFrom");function be(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&Ps in e?e[Ps](t):e instanceof Date?new e.constructor(t):new Date(t)}function ce(e,t){return be(t||e,e)}function al(e,t,n){const r=ce(e,n==null?void 0:n.in);return isNaN(t)?be(e,NaN):(t&&r.setDate(r.getDate()+t),r)}function sl(e,t,n){const r=ce(e,n==null?void 0:n.in);if(isNaN(t))return be(e,NaN);if(!t)return r;const o=r.getDate(),a=be(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 Cy={};function _n(){return Cy}function zt(e,t){var s,c,u,f;const n=_n(),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=ce(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 xn(e,t){return zt(e,{...t,weekStartsOn:1})}function il(e,t){const n=ce(e,t==null?void 0:t.in),r=n.getFullYear(),o=be(n,0);o.setFullYear(r+1,0,4),o.setHours(0,0,0,0);const a=xn(o),i=be(n,0);i.setFullYear(r,0,4),i.setHours(0,0,0,0);const s=xn(i);return n.getTime()>=a.getTime()?r+1:n.getTime()>=s.getTime()?r:r-1}function ks(e){const t=ce(e),n=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate(),t.getHours(),t.getMinutes(),t.getSeconds(),t.getMilliseconds()));return n.setUTCFullYear(t.getFullYear()),+e-+n}function tn(e,...t){const n=be.bind(null,t.find(r=>typeof r=="object"));return t.map(n)}function wn(e,t){const n=ce(e,t==null?void 0:t.in);return n.setHours(0,0,0,0),n}function cl(e,t,n){const[r,o]=tn(n==null?void 0:n.in,e,t),a=wn(r),i=wn(o),s=+a-ks(a),c=+i-ks(i);return Math.round((s-c)/wy)}function Sy(e,t){const n=il(e,t),r=be(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),xn(r)}function Ny(e,t,n){return al(e,t*7,n)}function Ey(e,t,n){return sl(e,t*12,n)}function My(e,t){let n,r=t==null?void 0:t.in;return e.forEach(o=>{!r&&typeof o=="object"&&(r=be.bind(null,o));const a=ce(o,r);(!n||n<a||isNaN(+a))&&(n=a)}),be(r,n||NaN)}function Ry(e,t){let n,r=t==null?void 0:t.in;return e.forEach(o=>{!r&&typeof o=="object"&&(r=be.bind(null,o));const a=ce(o,r);(!n||n>a||isNaN(+a))&&(n=a)}),be(r,n||NaN)}function Py(e,t,n){const[r,o]=tn(n==null?void 0:n.in,e,t);return+wn(r)==+wn(o)}function ll(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function ky(e){return!(!ll(e)&&typeof e!="number"||isNaN(+ce(e)))}function Oy(e,t,n){const[r,o]=tn(n==null?void 0:n.in,e,t),a=r.getFullYear()-o.getFullYear(),i=r.getMonth()-o.getMonth();return a*12+i}function Iy(e,t){const n=ce(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 Dy(e,t){const[n,r]=tn(e,t.start,t.end);return{start:n,end:r}}function Ty(e,t){const{start:n,end:r}=Dy(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(be(n,i)),i.setMonth(i.getMonth()+s);return o?c.reverse():c}function Ay(e,t){const n=ce(e,t==null?void 0:t.in);return n.setDate(1),n.setHours(0,0,0,0),n}function _y(e,t){const n=ce(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 ul(e,t){const n=ce(e,t==null?void 0:t.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function dl(e,t){var s,c,u,f;const n=_n(),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=ce(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 jy(e,t){return dl(e,{...t,weekStartsOn:1})}const Fy={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},$y=(e,t,n)=>{let r;const o=Fy[e];return typeof o=="string"?r=o:t===1?r=o.one:r=o.other.replace("{{count}}",t.toString()),n!=null&&n.addSuffix?n.comparison&&n.comparison>0?"in "+r:r+" ago":r};function uo(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const Ly={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Wy={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},By={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Vy={date:uo({formats:Ly,defaultWidth:"full"}),time:uo({formats:Wy,defaultWidth:"full"}),dateTime:uo({formats:By,defaultWidth:"full"})},Yy={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Hy=(e,t,n,r)=>Yy[e];function un(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 Gy={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Uy={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},zy={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"]},Ky={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"]},qy={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"}},Xy={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"}},Zy=(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"},Qy={ordinalNumber:Zy,era:un({values:Gy,defaultWidth:"wide"}),quarter:un({values:Uy,defaultWidth:"wide",argumentCallback:e=>e-1}),month:un({values:zy,defaultWidth:"wide"}),day:un({values:Ky,defaultWidth:"wide"}),dayPeriod:un({values:qy,defaultWidth:"wide",formattingValues:Xy,defaultFormattingWidth:"wide"})};function dn(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)?eb(s,m=>m.test(i)):Jy(s,m=>m.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 Jy(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function eb(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function tb(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 nb=/^(\d+)(th|st|nd|rd)?/i,rb=/\d+/i,ob={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},ab={any:[/^b/i,/^(a|c)/i]},sb={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},ib={any:[/1/i,/2/i,/3/i,/4/i]},cb={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},lb={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]},ub={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},db={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]},fb={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},mb={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}},pb={ordinalNumber:tb({matchPattern:nb,parsePattern:rb,valueCallback:e=>parseInt(e,10)}),era:dn({matchPatterns:ob,defaultMatchWidth:"wide",parsePatterns:ab,defaultParseWidth:"any"}),quarter:dn({matchPatterns:sb,defaultMatchWidth:"wide",parsePatterns:ib,defaultParseWidth:"any",valueCallback:e=>e+1}),month:dn({matchPatterns:cb,defaultMatchWidth:"wide",parsePatterns:lb,defaultParseWidth:"any"}),day:dn({matchPatterns:ub,defaultMatchWidth:"wide",parsePatterns:db,defaultParseWidth:"any"}),dayPeriod:dn({matchPatterns:fb,defaultMatchWidth:"any",parsePatterns:mb,defaultParseWidth:"any"})},xa={code:"en-US",formatDistance:$y,formatLong:Vy,formatRelative:Hy,localize:Qy,match:pb,options:{weekStartsOn:0,firstWeekContainsDate:1}};function hb(e,t){const n=ce(e,t==null?void 0:t.in);return cl(n,ul(n))+1}function fl(e,t){const n=ce(e,t==null?void 0:t.in),r=+xn(n)-+Sy(n);return Math.round(r/ol)+1}function ml(e,t){var f,m,p,h;const n=ce(e,t==null?void 0:t.in),r=n.getFullYear(),o=_n(),a=(t==null?void 0:t.firstWeekContainsDate)??((m=(f=t==null?void 0:t.locale)==null?void 0:f.options)==null?void 0:m.firstWeekContainsDate)??o.firstWeekContainsDate??((h=(p=o.locale)==null?void 0:p.options)==null?void 0:h.firstWeekContainsDate)??1,i=be((t==null?void 0:t.in)||e,0);i.setFullYear(r+1,0,a),i.setHours(0,0,0,0);const s=zt(i,t),c=be((t==null?void 0:t.in)||e,0);c.setFullYear(r,0,a),c.setHours(0,0,0,0);const u=zt(c,t);return+n>=+s?r+1:+n>=+u?r:r-1}function gb(e,t){var s,c,u,f;const n=_n(),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=ml(e,t),a=be((t==null?void 0:t.in)||e,0);return a.setFullYear(o,0,r),a.setHours(0,0,0,0),zt(a,t)}function pl(e,t){const n=ce(e,t==null?void 0:t.in),r=+zt(n,t)-+gb(n,t);return Math.round(r/ol)+1}function ie(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const ft={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return ie(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):ie(n+1,2)},d(e,t){return ie(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 ie(e.getHours()%12||12,t.length)},H(e,t){return ie(e.getHours(),t.length)},m(e,t){return ie(e.getMinutes(),t.length)},s(e,t){return ie(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),o=Math.trunc(r*Math.pow(10,n-3));return ie(o,t.length)}},Lt={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Os={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 ft.y(e,t)},Y:function(e,t,n,r){const o=ml(e,r),a=o>0?o:1-o;if(t==="YY"){const i=a%100;return ie(i,2)}return t==="Yo"?n.ordinalNumber(a,{unit:"year"}):ie(a,t.length)},R:function(e,t){const n=il(e);return ie(n,t.length)},u:function(e,t){const n=e.getFullYear();return ie(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 ie(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 ie(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 ft.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 ie(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=pl(e,r);return t==="wo"?n.ordinalNumber(o,{unit:"week"}):ie(o,t.length)},I:function(e,t,n){const r=fl(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):ie(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):ft.d(e,t)},D:function(e,t,n){const r=hb(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):ie(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 ie(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 ie(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 ie(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=Lt.noon:r===0?o=Lt.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=Lt.evening:r>=12?o=Lt.afternoon:r>=4?o=Lt.morning:o=Lt.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 ft.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):ft.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):ie(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):ie(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):ft.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):ft.s(e,t)},S:function(e,t){return ft.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return Ds(r);case"XXXX":case"XX":return Nt(r);case"XXXXX":case"XXX":default:return Nt(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return Ds(r);case"xxxx":case"xx":return Nt(r);case"xxxxx":case"xxx":default:return Nt(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Is(r,":");case"OOOO":default:return"GMT"+Nt(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Is(r,":");case"zzzz":default:return"GMT"+Nt(r,":")}},t:function(e,t,n){const r=Math.trunc(+e/1e3);return ie(r,t.length)},T:function(e,t,n){return ie(+e,t.length)}};function Is(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+ie(a,2)}function Ds(e,t){return e%60===0?(e>0?"-":"+")+ie(Math.abs(e)/60,2):Nt(e,t)}function Nt(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=ie(Math.trunc(r/60),2),a=ie(r%60,2);return n+o+t+a}const Ts=(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"})}},hl=(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"})}},vb=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return Ts(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}}",Ts(r,t)).replace("{{time}}",hl(o,t))},yb={p:hl,P:vb},bb=/^D+$/,xb=/^Y+$/,wb=["D","DD","YY","YYYY"];function Cb(e){return bb.test(e)}function Sb(e){return xb.test(e)}function Nb(e,t,n){const r=Eb(e,t,n);if(console.warn(r),wb.includes(e))throw new RangeError(r)}function Eb(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 Mb=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Rb=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Pb=/^'([^]*?)'?$/,kb=/''/g,Ob=/[a-zA-Z]/;function gn(e,t,n){var f,m,p,h,y,g,v,w;const r=_n(),o=(n==null?void 0:n.locale)??r.locale??xa,a=(n==null?void 0:n.firstWeekContainsDate)??((m=(f=n==null?void 0:n.locale)==null?void 0:f.options)==null?void 0:m.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=(y=n==null?void 0:n.locale)==null?void 0:y.options)==null?void 0:g.weekStartsOn)??r.weekStartsOn??((w=(v=r.locale)==null?void 0:v.options)==null?void 0:w.weekStartsOn)??0,s=ce(e,n==null?void 0:n.in);if(!ky(s))throw new RangeError("Invalid time value");let c=t.match(Rb).map(x=>{const b=x[0];if(b==="p"||b==="P"){const S=yb[b];return S(x,o.formatLong)}return x}).join("").match(Mb).map(x=>{if(x==="''")return{isToken:!1,value:"'"};const b=x[0];if(b==="'")return{isToken:!1,value:Ib(x)};if(Os[b])return{isToken:!0,value:x};if(b.match(Ob))throw new RangeError("Format string contains an unescaped latin alphabet character `"+b+"`");return{isToken:!1,value:x}});o.localize.preprocessor&&(c=o.localize.preprocessor(s,c));const u={firstWeekContainsDate:a,weekStartsOn:i,locale:o};return c.map(x=>{if(!x.isToken)return x.value;const b=x.value;(!(n!=null&&n.useAdditionalWeekYearTokens)&&Sb(b)||!(n!=null&&n.useAdditionalDayOfYearTokens)&&Cb(b))&&Nb(b,t,String(e));const S=Os[b[0]];return S(s,b,o.localize,u)}).join("")}function Ib(e){const t=e.match(Pb);return t?t[1].replace(kb,"'"):e}function Db(e,t){const n=ce(e,t==null?void 0:t.in),r=n.getFullYear(),o=n.getMonth(),a=be(n,0);return a.setFullYear(r,o+1,0),a.setHours(0,0,0,0),a.getDate()}function Tb(e,t){return ce(e,t==null?void 0:t.in).getMonth()}function Ab(e,t){return ce(e,t==null?void 0:t.in).getFullYear()}function _b(e,t){return+ce(e)>+ce(t)}function jb(e,t){return+ce(e)<+ce(t)}function Fb(e,t,n){const[r,o]=tn(n==null?void 0:n.in,e,t);return r.getFullYear()===o.getFullYear()&&r.getMonth()===o.getMonth()}function $b(e,t,n){const[r,o]=tn(n==null?void 0:n.in,e,t);return r.getFullYear()===o.getFullYear()}function Lb(e,t,n){const r=ce(e,n==null?void 0:n.in),o=r.getFullYear(),a=r.getDate(),i=be(e,0);i.setFullYear(o,t,15),i.setHours(0,0,0,0);const s=Db(i);return r.setMonth(t,Math.min(a,s)),r}function Wb(e,t,n){const r=ce(e,n==null?void 0:n.in);return isNaN(+r)?be(e,NaN):(r.setFullYear(t),r)}const As=5,Bb=4;function Vb(e,t){const n=t.startOfMonth(e),r=n.getDay()>0?n.getDay():7,o=t.addDays(e,-r+1),a=t.addDays(o,As*7-1);return t.getMonth(e)===t.getMonth(a)?As:Bb}function gl(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 Yb(e,t){const n=gl(e,t),r=Vb(e,t);return t.addDays(n,r*7-1)}class ct{constructor(t,n){this.Date=Date,this.today=()=>{var r;return(r=this.overrides)!=null&&r.today?this.overrides.today():this.options.timeZone?we.tz(this.options.timeZone):new this.Date},this.newDate=(r,o,a)=>{var i;return(i=this.overrides)!=null&&i.newDate?this.overrides.newDate(r,o,a):this.options.timeZone?new we(r,o,a,this.options.timeZone):new Date(r,o,a)},this.addDays=(r,o)=>{var a;return(a=this.overrides)!=null&&a.addDays?this.overrides.addDays(r,o):al(r,o)},this.addMonths=(r,o)=>{var a;return(a=this.overrides)!=null&&a.addMonths?this.overrides.addMonths(r,o):sl(r,o)},this.addWeeks=(r,o)=>{var a;return(a=this.overrides)!=null&&a.addWeeks?this.overrides.addWeeks(r,o):Ny(r,o)},this.addYears=(r,o)=>{var a;return(a=this.overrides)!=null&&a.addYears?this.overrides.addYears(r,o):Ey(r,o)},this.differenceInCalendarDays=(r,o)=>{var a;return(a=this.overrides)!=null&&a.differenceInCalendarDays?this.overrides.differenceInCalendarDays(r,o):cl(r,o)},this.differenceInCalendarMonths=(r,o)=>{var a;return(a=this.overrides)!=null&&a.differenceInCalendarMonths?this.overrides.differenceInCalendarMonths(r,o):Oy(r,o)},this.eachMonthOfInterval=r=>{var o;return(o=this.overrides)!=null&&o.eachMonthOfInterval?this.overrides.eachMonthOfInterval(r):Ty(r)},this.endOfBroadcastWeek=r=>{var o;return(o=this.overrides)!=null&&o.endOfBroadcastWeek?this.overrides.endOfBroadcastWeek(r):Yb(r,this)},this.endOfISOWeek=r=>{var o;return(o=this.overrides)!=null&&o.endOfISOWeek?this.overrides.endOfISOWeek(r):jy(r)},this.endOfMonth=r=>{var o;return(o=this.overrides)!=null&&o.endOfMonth?this.overrides.endOfMonth(r):Iy(r)},this.endOfWeek=(r,o)=>{var a;return(a=this.overrides)!=null&&a.endOfWeek?this.overrides.endOfWeek(r,o):dl(r,this.options)},this.endOfYear=r=>{var o;return(o=this.overrides)!=null&&o.endOfYear?this.overrides.endOfYear(r):_y(r)},this.format=(r,o,a)=>{var s;const i=(s=this.overrides)!=null&&s.format?this.overrides.format(r,o,this.options):gn(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):fl(r)},this.getMonth=(r,o)=>{var a;return(a=this.overrides)!=null&&a.getMonth?this.overrides.getMonth(r,this.options):Tb(r,this.options)},this.getYear=(r,o)=>{var a;return(a=this.overrides)!=null&&a.getYear?this.overrides.getYear(r,this.options):Ab(r,this.options)},this.getWeek=(r,o)=>{var a;return(a=this.overrides)!=null&&a.getWeek?this.overrides.getWeek(r,this.options):pl(r,this.options)},this.isAfter=(r,o)=>{var a;return(a=this.overrides)!=null&&a.isAfter?this.overrides.isAfter(r,o):_b(r,o)},this.isBefore=(r,o)=>{var a;return(a=this.overrides)!=null&&a.isBefore?this.overrides.isBefore(r,o):jb(r,o)},this.isDate=r=>{var o;return(o=this.overrides)!=null&&o.isDate?this.overrides.isDate(r):ll(r)},this.isSameDay=(r,o)=>{var a;return(a=this.overrides)!=null&&a.isSameDay?this.overrides.isSameDay(r,o):Py(r,o)},this.isSameMonth=(r,o)=>{var a;return(a=this.overrides)!=null&&a.isSameMonth?this.overrides.isSameMonth(r,o):Fb(r,o)},this.isSameYear=(r,o)=>{var a;return(a=this.overrides)!=null&&a.isSameYear?this.overrides.isSameYear(r,o):$b(r,o)},this.max=r=>{var o;return(o=this.overrides)!=null&&o.max?this.overrides.max(r):My(r)},this.min=r=>{var o;return(o=this.overrides)!=null&&o.min?this.overrides.min(r):Ry(r)},this.setMonth=(r,o)=>{var a;return(a=this.overrides)!=null&&a.setMonth?this.overrides.setMonth(r,o):Lb(r,o)},this.setYear=(r,o)=>{var a;return(a=this.overrides)!=null&&a.setYear?this.overrides.setYear(r,o):Wb(r,o)},this.startOfBroadcastWeek=(r,o)=>{var a;return(a=this.overrides)!=null&&a.startOfBroadcastWeek?this.overrides.startOfBroadcastWeek(r,this):gl(r,this)},this.startOfDay=r=>{var o;return(o=this.overrides)!=null&&o.startOfDay?this.overrides.startOfDay(r):wn(r)},this.startOfISOWeek=r=>{var o;return(o=this.overrides)!=null&&o.startOfISOWeek?this.overrides.startOfISOWeek(r):xn(r)},this.startOfMonth=r=>{var o;return(o=this.overrides)!=null&&o.startOfMonth?this.overrides.startOfMonth(r):Ay(r)},this.startOfWeek=(r,o)=>{var a;return(a=this.overrides)!=null&&a.startOfWeek?this.overrides.startOfWeek(r,this.options):zt(r,this.options)},this.startOfYear=r=>{var o;return(o=this.overrides)!=null&&o.startOfYear?this.overrides.startOfYear(r):ul(r)},this.options={locale:xa,...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 Je=new ct;class vl{constructor(t,n,r=Je){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 Hb{constructor(t,n){this.date=t,this.weeks=n}}class Gb{constructor(t,n){this.days=n,this.weekNumber=t}}function ot(e,t,n=!1,r=Je){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 yl(e){return!!(e&&typeof e=="object"&&"before"in e&&"after"in e)}function wa(e){return!!(e&&typeof e=="object"&&"from"in e)}function bl(e){return!!(e&&typeof e=="object"&&"after"in e)}function xl(e){return!!(e&&typeof e=="object"&&"before"in e)}function wl(e){return!!(e&&typeof e=="object"&&"dayOfWeek"in e)}function Cl(e,t){return Array.isArray(e)&&e.every(t.isDate)}function at(e,t,n=Je){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(Cl(s,n))return s.includes(e);if(wa(s))return ot(s,e,!1,n);if(wl(s))return Array.isArray(s.dayOfWeek)?s.dayOfWeek.includes(e.getDay()):s.dayOfWeek===e.getDay();if(yl(s)){const c=a(s.before,e),u=a(s.after,e),f=c>0,m=u<0;return i(s.before,s.after)?m&&f:f||m}return bl(s)?a(e,s.after)>0:xl(s)?a(s.before,e)>0:typeof s=="function"?s(e):!1})}function Ub(e,t,n){const{disabled:r,hidden:o,modifiers:a,showOutsideDays:i,broadcastCalendar:s,today:c}=t,{isSameDay:u,isSameMonth:f,startOfMonth:m,isBefore:p,endOfMonth:h,isAfter:y}=n,g=t.startMonth&&m(t.startMonth),v=t.endMonth&&h(t.endMonth),w={[pe.focused]:[],[pe.outside]:[],[pe.disabled]:[],[pe.hidden]:[],[pe.today]:[]},x={};for(const b of e){const{date:S,displayMonth:C}=b,M=!!(C&&!f(S,C)),N=!!(g&&p(S,g)),R=!!(v&&y(S,v)),_=!!(r&&at(S,r,n)),A=!!(o&&at(S,o,n))||N||R||!s&&!i&&M||s&&i===!1&&M,$=u(S,c??n.today());M&&w.outside.push(b),_&&w.disabled.push(b),A&&w.hidden.push(b),$&&w.today.push(b),a&&Object.keys(a).forEach(D=>{const Y=a==null?void 0:a[D];Y&&at(S,Y,n)&&(x[D]?x[D].push(b):x[D]=[b])})}return b=>{const S={[pe.focused]:!1,[pe.disabled]:!1,[pe.hidden]:!1,[pe.outside]:!1,[pe.today]:!1},C={};for(const M in w){const N=w[M];S[M]=N.some(R=>R===b)}for(const M in x)C[M]=x[M].some(N=>N===b);return{...S,...C}}}function zb(e,t,n={}){return Object.entries(e).filter(([,o])=>o===!0).reduce((o,[a])=>(n[a]?o.push(n[a]):t[pe[a]]?o.push(t[pe[a]]):t[Fe[a]]&&o.push(t[Fe[a]]),o),[t[U.Day]])}function Kb(e){return E.createElement("button",{...e})}function qb(e){return E.createElement("span",{...e})}function Xb(e){const{size:t=24,orientation:n="left",className:r}=e;return E.createElement("svg",{className:r,width:t,height:t,viewBox:"0 0 24 24"},n==="up"&&E.createElement("polygon",{points:"6.77 17 12.5 11.43 18.24 17 20 15.28 12.5 8 5 15.28"}),n==="down"&&E.createElement("polygon",{points:"6.77 8 12.5 13.57 18.24 8 20 9.72 12.5 17 5 9.72"}),n==="left"&&E.createElement("polygon",{points:"16 18.112 9.81111111 12 16 5.87733333 14.0888889 4 6 12 14.0888889 20"}),n==="right"&&E.createElement("polygon",{points:"8 18.112 14.18888889 12 8 5.87733333 9.91111111 4 18 12 9.91111111 20"}))}function Zb(e){const{day:t,modifiers:n,...r}=e;return E.createElement("td",{...r})}function Qb(e){const{day:t,modifiers:n,...r}=e,o=E.useRef(null);return E.useEffect(()=>{var a;n.focused&&((a=o.current)==null||a.focus())},[n.focused]),E.createElement("button",{ref:o,...r})}function Jb(e){const{options:t,className:n,components:r,classNames:o,...a}=e,i=[o[U.Dropdown],n].join(" "),s=t==null?void 0:t.find(({value:c})=>c===a.value);return E.createElement("span",{"data-disabled":a.disabled,className:o[U.DropdownRoot]},E.createElement(r.Select,{className:i,...a},t==null?void 0:t.map(({value:c,label:u,disabled:f})=>E.createElement(r.Option,{key:c,value:c,disabled:f},u))),E.createElement("span",{className:o[U.CaptionLabel],"aria-hidden":!0},s==null?void 0:s.label,E.createElement(r.Chevron,{orientation:"down",size:18,className:o[U.Chevron]})))}function ex(e){return E.createElement("div",{...e})}function tx(e){return E.createElement("div",{...e})}function nx(e){const{calendarMonth:t,displayIndex:n,...r}=e;return E.createElement("div",{...r},e.children)}function rx(e){const{calendarMonth:t,displayIndex:n,...r}=e;return E.createElement("div",{...r})}function ox(e){return E.createElement("table",{...e})}function ax(e){return E.createElement("div",{...e})}const Sl=E.createContext(void 0);function jn(){const e=E.useContext(Sl);if(e===void 0)throw new Error("useDayPicker() must be used within a custom component.");return e}function sx(e){const{components:t}=jn();return E.createElement(t.Dropdown,{...e})}function ix(e){const{onPreviousClick:t,onNextClick:n,previousMonth:r,nextMonth:o,...a}=e,{components:i,classNames:s,labels:{labelPrevious:c,labelNext:u}}=jn(),f=E.useCallback(p=>{o&&(n==null||n(p))},[o,n]),m=E.useCallback(p=>{r&&(t==null||t(p))},[r,t]);return E.createElement("nav",{...a},E.createElement(i.PreviousMonthButton,{type:"button",className:s[U.PreviousMonthButton],tabIndex:r?void 0:-1,"aria-disabled":r?void 0:!0,"aria-label":c(r),onClick:m},E.createElement(i.Chevron,{disabled:r?void 0:!0,className:s[U.Chevron],orientation:"left"})),E.createElement(i.NextMonthButton,{type:"button",className:s[U.NextMonthButton],tabIndex:o?void 0:-1,"aria-disabled":o?void 0:!0,"aria-label":u(o),onClick:f},E.createElement(i.Chevron,{disabled:o?void 0:!0,orientation:"right",className:s[U.Chevron]})))}function cx(e){const{components:t}=jn();return E.createElement(t.Button,{...e})}function lx(e){return E.createElement("option",{...e})}function ux(e){const{components:t}=jn();return E.createElement(t.Button,{...e})}function dx(e){const{rootRef:t,...n}=e;return E.createElement("div",{...n,ref:t})}function fx(e){return E.createElement("select",{...e})}function mx(e){const{week:t,...n}=e;return E.createElement("tr",{...n})}function px(e){return E.createElement("th",{...e})}function hx(e){return E.createElement("thead",{"aria-hidden":!0},E.createElement("tr",{...e}))}function gx(e){const{week:t,...n}=e;return E.createElement("th",{...n})}function vx(e){return E.createElement("th",{...e})}function yx(e){return E.createElement("tbody",{...e})}function bx(e){const{components:t}=jn();return E.createElement(t.Dropdown,{...e})}const xx=Object.freeze(Object.defineProperty({__proto__:null,Button:Kb,CaptionLabel:qb,Chevron:Xb,Day:Zb,DayButton:Qb,Dropdown:Jb,DropdownNav:ex,Footer:tx,Month:nx,MonthCaption:rx,MonthGrid:ox,Months:ax,MonthsDropdown:sx,Nav:ix,NextMonthButton:cx,Option:lx,PreviousMonthButton:ux,Root:dx,Select:fx,Week:mx,WeekNumber:gx,WeekNumberHeader:vx,Weekday:px,Weekdays:hx,Weeks:yx,YearsDropdown:bx},Symbol.toStringTag,{value:"Module"}));function wx(e){return{...xx,...e}}function Cx(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 Sx(){const e={};for(const t in U)e[U[t]]=`rdp-${U[t]}`;for(const t in pe)e[pe[t]]=`rdp-${pe[t]}`;for(const t in Fe)e[Fe[t]]=`rdp-${Fe[t]}`;for(const t in Re)e[Re[t]]=`rdp-${Re[t]}`;return e}function Nl(e,t,n){return(n??new ct(t)).format(e,"LLLL y")}const Nx=Nl;function Ex(e,t,n){return(n??new ct(t)).format(e,"d")}function Mx(e,t=Je){return t.format(e,"LLLL")}function Rx(e,t=Je){return e<10?t.formatNumber(`0${e.toLocaleString()}`):t.formatNumber(`${e.toLocaleString()}`)}function Px(){return""}function kx(e,t,n){return(n??new ct(t)).format(e,"cccccc")}function El(e,t=Je){return t.format(e,"yyyy")}const Ox=El,Ix=Object.freeze(Object.defineProperty({__proto__:null,formatCaption:Nl,formatDay:Ex,formatMonthCaption:Nx,formatMonthDropdown:Mx,formatWeekNumber:Rx,formatWeekNumberHeader:Px,formatWeekdayName:kx,formatYearCaption:Ox,formatYearDropdown:El},Symbol.toStringTag,{value:"Module"}));function Dx(e){return e!=null&&e.formatMonthCaption&&!e.formatCaption&&(e.formatCaption=e.formatMonthCaption),e!=null&&e.formatYearCaption&&!e.formatYearDropdown&&(e.formatYearDropdown=e.formatYearCaption),{...Ix,...e}}function Tx(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),y=u(p),g=t&&p<a(t)||n&&p>a(n)||!1;return{value:y,label:h,disabled:g}})}function Ax(e,t={},n={}){let r={...t==null?void 0:t[U.Day]};return Object.entries(e).filter(([,o])=>o===!0).forEach(([o])=>{r={...r,...n==null?void 0:n[o]}}),r}function _x(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 jx(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),m=a(t),p=[];let h=f;for(;c(h,m)||u(h,m);)p.push(h),h=i(h,1);return p.map(y=>{const g=n.formatYearDropdown(y,r);return{value:s(y),label:g,disabled:!1}})}function Ml(e,t,n){return(n??new ct(t)).format(e,"LLLL y")}const Fx=Ml;function $x(e,t,n,r){let o=(r??new ct(n)).format(e,"PPPP");return t!=null&&t.today&&(o=`Today, ${o}`),o}function Rl(e,t,n,r){let o=(r??new ct(n)).format(e,"PPPP");return t.today&&(o=`Today, ${o}`),t.selected&&(o=`${o}, selected`),o}const Lx=Rl;function Wx(){return""}function Bx(e){return"Choose the Month"}function Vx(e){return"Go to the Next Month"}function Yx(e){return"Go to the Previous Month"}function Hx(e,t,n){return(n??new ct(t)).format(e,"cccc")}function Gx(e,t){return`Week ${e}`}function Ux(e){return"Week Number"}function zx(e){return"Choose the Year"}const Kx=Object.freeze(Object.defineProperty({__proto__:null,labelCaption:Fx,labelDay:Lx,labelDayButton:Rl,labelGrid:Ml,labelGridcell:$x,labelMonthDropdown:Bx,labelNav:Wx,labelNext:Vx,labelPrevious:Yx,labelWeekNumber:Gx,labelWeekNumberHeader:Ux,labelWeekday:Hx,labelYearDropdown:zx},Symbol.toStringTag,{value:"Module"})),Fn=e=>e instanceof HTMLElement?e:null,fo=e=>[...e.querySelectorAll("[data-animated-month]")??[]],qx=e=>Fn(e.querySelector("[data-animated-month]")),mo=e=>Fn(e.querySelector("[data-animated-caption]")),po=e=>Fn(e.querySelector("[data-animated-weeks]")),Xx=e=>Fn(e.querySelector("[data-animated-nav]")),Zx=e=>Fn(e.querySelector("[data-animated-weekdays]"));function Qx(e,t,{classNames:n,months:r,focused:o,dateLib:a}){const i=E.useRef(null),s=E.useRef(r),c=E.useRef(!1);E.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),m=a.isAfter(r[0].date,u[0].date),p=m?n[Re.caption_after_enter]:n[Re.caption_before_enter],h=m?n[Re.weeks_after_enter]:n[Re.weeks_before_enter],y=i.current,g=e.current.cloneNode(!0);if(g instanceof HTMLElement?(fo(g).forEach(b=>{if(!(b instanceof HTMLElement))return;const S=qx(b);S&&b.contains(S)&&b.removeChild(S);const C=mo(b);C&&C.classList.remove(p);const M=po(b);M&&M.classList.remove(h)}),i.current=g):i.current=null,c.current||f||o)return;const v=y instanceof HTMLElement?fo(y):[],w=fo(e.current);if(w&&w.every(x=>x instanceof HTMLElement)&&v&&v.every(x=>x instanceof HTMLElement)){c.current=!0,e.current.style.isolation="isolate";const x=Xx(e.current);x&&(x.style.zIndex="1"),w.forEach((b,S)=>{const C=v[S];if(!C)return;b.style.position="relative",b.style.overflow="hidden";const M=mo(b);M&&M.classList.add(p);const N=po(b);N&&N.classList.add(h);const R=()=>{c.current=!1,e.current&&(e.current.style.isolation=""),x&&(x.style.zIndex=""),M&&M.classList.remove(p),N&&N.classList.remove(h),b.style.position="",b.style.overflow="",b.contains(C)&&b.removeChild(C)};C.style.pointerEvents="none",C.style.position="absolute",C.style.overflow="hidden",C.setAttribute("aria-hidden","true");const _=Zx(C);_&&(_.style.opacity="0");const A=mo(C);A&&(A.classList.add(m?n[Re.caption_before_exit]:n[Re.caption_after_exit]),A.addEventListener("animationend",R));const $=po(C);$&&$.classList.add(m?n[Re.weeks_before_exit]:n[Re.weeks_after_exit]),b.insertBefore(C,b.firstChild)})}})}function Jx(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:m,endOfBroadcastWeek:p,endOfISOWeek:h,endOfMonth:y,endOfWeek:g,isAfter:v,startOfBroadcastWeek:w,startOfISOWeek:x,startOfWeek:b}=r,S=c?w(o,r):i?x(o):b(o),C=c?p(a):i?h(y(a)):g(y(a)),M=f(C,S),N=m(a,o)+1,R=[];for(let $=0;$<=M;$++){const D=u(S,$);if(t&&v(D,t))break;R.push(D)}const A=(c?35:42)*N;if(s&&R.length<A){const $=A-R.length;for(let D=0;D<$;D++){const Y=u(R[R.length-1],1);R.push(Y)}}return R}function ew(e){const t=[];return e.reduce((n,r)=>{const o=r.weeks.reduce((a,i)=>[...a,...i.days],t);return[...n,...o]},t)}function tw(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 _s(e,t){const{month:n,defaultMonth:r,today:o=t.today(),numberOfMonths:a=1,endMonth:i,startMonth:s}=e;let c=n||r||o;const{differenceInCalendarMonths:u,addMonths:f,startOfMonth:m}=t;if(i&&u(i,c)<0){const p=-1*(a-1);c=f(i,p)}return s&&u(c,s)<0&&(c=s),m(c)}function nw(e,t,n,r){const{addDays:o,endOfBroadcastWeek:a,endOfISOWeek:i,endOfMonth:s,endOfWeek:c,getISOWeek:u,getWeek:f,startOfBroadcastWeek:m,startOfISOWeek:p,startOfWeek:h}=r,y=e.reduce((g,v)=>{const w=n.broadcastCalendar?m(v,r):n.ISOWeek?p(v):h(v),x=n.broadcastCalendar?a(v):n.ISOWeek?i(s(v)):c(s(v)),b=t.filter(N=>N>=w&&N<=x),S=n.broadcastCalendar?35:42;if(n.fixedWeeks&&b.length<S){const N=t.filter(R=>{const _=S-b.length;return R>x&&R<=o(x,_)});b.push(...N)}const C=b.reduce((N,R)=>{const _=n.ISOWeek?u(R):f(R),A=N.find(D=>D.weekNumber===_),$=new vl(R,v,r);return A?A.days.push($):N.push(new Gb(_,[$])),N},[]),M=new Hb(v,C);return g.push(M),g},[]);return n.reverseMonths?y.reverse():y}function rw(e,t){let{startMonth:n,endMonth:r}=e;const{startOfYear:o,startOfDay:a,startOfMonth:i,endOfMonth:s,addYears:c,endOfYear:u,newDate:f,today:m}=t,{fromYear:p,toYear:h,fromMonth:y,toMonth:g}=e;!n&&y&&(n=y),!n&&p&&(n=t.newDate(p,0,1)),!r&&g&&(r=g),!r&&h&&(r=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??m(),-100))),r?r=s(r):h?r=f(h,11,31):!r&&v&&(r=u(e.today??m())),[n&&a(n),r&&a(r)]}function ow(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 aw(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 sw(e){const t=[];return e.reduce((n,r)=>[...n,...r.weeks],t)}function Or(e,t){const[n,r]=E.useState(e);return[t===void 0?n:t,r]}function iw(e,t){const[n,r]=rw(e,t),{startOfMonth:o,endOfMonth:a}=t,i=_s(e,t),[s,c]=Or(i,e.month?i:void 0);E.useEffect(()=>{const M=_s(e,t);c(M)},[e.timeZone]);const u=tw(s,r,e,t),f=Jx(u,e.endMonth?a(e.endMonth):void 0,e,t),m=nw(u,f,e,t),p=sw(m),h=ew(m),y=aw(s,n,e,t),g=ow(s,r,e,t),{disableNavigation:v,onMonthChange:w}=e,x=M=>p.some(N=>N.days.some(R=>R.isEqualTo(M))),b=M=>{if(v)return;let N=o(M);n&&N<o(n)&&(N=o(n)),r&&N>o(r)&&(N=o(r)),c(N),w==null||w(N)};return{months:m,weeks:p,days:h,navStart:n,navEnd:r,previousMonth:y,nextMonth:g,goToMonth:b,goToDay:M=>{x(M)||b(M.date)}}}var Ge;(function(e){e[e.Today=0]="Today",e[e.Selected=1]="Selected",e[e.LastFocused=2]="LastFocused",e[e.FocusedModifier=3]="FocusedModifier"})(Ge||(Ge={}));function js(e){return!e[pe.disabled]&&!e[pe.hidden]&&!e[pe.outside]}function cw(e,t,n,r){let o,a=-1;for(const i of e){const s=t(i);js(s)&&(s[pe.focused]&&a<Ge.FocusedModifier?(o=i,a=Ge.FocusedModifier):r!=null&&r.isEqualTo(i)&&a<Ge.LastFocused?(o=i,a=Ge.LastFocused):n(i.date)&&a<Ge.Selected?(o=i,a=Ge.Selected):s[pe.today]&&a<Ge.Today&&(o=i,a=Ge.Today))}return o||(o=e.find(i=>js(t(i)))),o}function lw(e,t,n,r,o,a,i){const{ISOWeek:s,broadcastCalendar:c}=a,{addDays:u,addMonths:f,addWeeks:m,addYears:p,endOfBroadcastWeek:h,endOfISOWeek:y,endOfWeek:g,max:v,min:w,startOfBroadcastWeek:x,startOfISOWeek:b,startOfWeek:S}=i;let M={day:u,week:m,month:f,year:p,startOfWeek:N=>c?x(N,i):s?b(N):S(N),endOfWeek:N=>c?h(N):s?y(N):g(N)}[e](n,t==="after"?1:-1);return t==="before"&&r?M=v([r,M]):t==="after"&&o&&(M=w([o,M])),M}function Pl(e,t,n,r,o,a,i,s=0){if(s>365)return;const c=lw(e,t,n.date,r,o,a,i),u=!!(a.disabled&&at(c,a.disabled,i)),f=!!(a.hidden&&at(c,a.hidden,i)),m=c,p=new vl(c,m,i);return!u&&!f?p:Pl(e,t,p,r,o,a,i,s+1)}function uw(e,t,n,r,o){const{autoFocus:a}=e,[i,s]=E.useState(),c=cw(t.days,n,r||(()=>!1),i),[u,f]=E.useState(a?c:void 0);return{isFocusTarget:g=>!!(c!=null&&c.isEqualTo(g)),setFocused:f,focused:u,blur:()=>{s(u),f(void 0)},moveFocus:(g,v)=>{if(!u)return;const w=Pl(g,v,u,t.navStart,t.navEnd,e,o);w&&(t.goToDay(w),f(w))}}}function dw(e,t){const{selected:n,required:r,onSelect:o}=e,[a,i]=Or(n,o?n:void 0),s=o?n:a,{isSameDay:c}=t,u=h=>(s==null?void 0:s.some(y=>c(y,h)))??!1,{min:f,max:m}=e;return{selected:s,select:(h,y,g)=>{let v=[...s??[]];if(u(h)){if((s==null?void 0:s.length)===f||r&&(s==null?void 0:s.length)===1)return;v=s==null?void 0:s.filter(w=>!c(w,h))}else(s==null?void 0:s.length)===m?v=[h]:v=[...v,h];return o||i(v),o==null||o(v,h,y,g),v},isSelected:u}}function fw(e,t,n=0,r=0,o=!1,a=Je){const{from:i,to:s}=t||{},{isSameDay:c,isAfter:u,isBefore:f}=a;let m;if(!i&&!s)m={from:e,to:n>0?void 0:e};else if(i&&!s)c(i,e)?o?m={from:i,to:void 0}:m=void 0:f(e,i)?m={from:e,to:i}:m={from:i,to:e};else if(i&&s)if(c(i,e)&&c(s,e))o?m={from:i,to:s}:m=void 0;else if(c(i,e))m={from:i,to:n>0?void 0:e};else if(c(s,e))m={from:e,to:n>0?void 0:e};else if(f(e,i))m={from:e,to:s};else if(u(e,i))m={from:i,to:e};else if(u(e,s))m={from:i,to:e};else throw new Error("Invalid range");if(m!=null&&m.from&&(m!=null&&m.to)){const p=a.differenceInCalendarDays(m.to,m.from);r>0&&p>r?m={from:e,to:void 0}:n>1&&p<n&&(m={from:e,to:void 0})}return m}function mw(e,t,n=Je){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 Fs(e,t,n=Je){return ot(e,t.from,!1,n)||ot(e,t.to,!1,n)||ot(t,e.from,!1,n)||ot(t,e.to,!1,n)}function pw(e,t,n=Je){const r=Array.isArray(t)?t:[t];if(r.filter(s=>typeof s!="function").some(s=>typeof s=="boolean"?s:n.isDate(s)?ot(e,s,!1,n):Cl(s,n)?s.some(c=>ot(e,c,!1,n)):wa(s)?s.from&&s.to?Fs(e,{from:s.from,to:s.to},n):!1:wl(s)?mw(e,s.dayOfWeek,n):yl(s)?n.isAfter(s.before,s.after)?Fs(e,{from:n.addDays(s.after,1),to:n.addDays(s.before,-1)},n):at(e.from,s,n)||at(e.to,s,n):bl(s)||xl(s)?at(e.from,s,n)||at(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 hw(e,t){const{disabled:n,excludeDisabled:r,selected:o,required:a,onSelect:i}=e,[s,c]=Or(o,i?o:void 0),u=i?o:s;return{selected:u,select:(p,h,y)=>{const{min:g,max:v}=e,w=p?fw(p,u,g,v,a,t):void 0;return r&&n&&(w!=null&&w.from)&&w.to&&pw({from:w.from,to:w.to},n,t)&&(w.from=p,w.to=void 0),i||c(w),i==null||i(w,p,h,y),w},isSelected:p=>u&&ot(u,p,!1,t)}}function gw(e,t){const{selected:n,required:r,onSelect:o}=e,[a,i]=Or(n,o?n:void 0),s=o?n:a,{isSameDay:c}=t;return{selected:s,select:(m,p,h)=>{let y=m;return!r&&s&&s&&c(m,s)&&(y=void 0),o||i(y),o==null||o(y,m,p,h),y},isSelected:m=>s?c(s,m):!1}}function vw(e,t){const n=gw(e,t),r=dw(e,t),o=hw(e,t);switch(e.mode){case"single":return n;case"multiple":return r;case"range":return o;default:return}}function yw(e){var Ua;let t=e;t.timeZone&&(t={...e},t.today&&(t.today=new we(t.today,t.timeZone)),t.month&&(t.month=new we(t.month,t.timeZone)),t.defaultMonth&&(t.defaultMonth=new we(t.defaultMonth,t.timeZone)),t.startMonth&&(t.startMonth=new we(t.startMonth,t.timeZone)),t.endMonth&&(t.endMonth=new we(t.endMonth,t.timeZone)),t.mode==="single"&&t.selected?t.selected=new we(t.selected,t.timeZone):t.mode==="multiple"&&t.selected?t.selected=(Ua=t.selected)==null?void 0:Ua.map(oe=>new we(oe,t.timeZone)):t.mode==="range"&&t.selected&&(t.selected={from:t.selected.from?new we(t.selected.from,t.timeZone):void 0,to:t.selected.to?new we(t.selected.to,t.timeZone):void 0}));const{components:n,formatters:r,labels:o,dateLib:a,locale:i,classNames:s}=E.useMemo(()=>{const oe={...xa,...t.locale};return{dateLib:new ct({locale:oe,weekStartsOn:t.broadcastCalendar?1:t.weekStartsOn,firstWeekContainsDate:t.firstWeekContainsDate,useAdditionalWeekYearTokens:t.useAdditionalWeekYearTokens,useAdditionalDayOfYearTokens:t.useAdditionalDayOfYearTokens,timeZone:t.timeZone,numerals:t.numerals},t.dateLib),components:wx(t.components),formatters:Dx(t.formatters),labels:{...Kx,...t.labels},locale:oe,classNames:{...Sx(),...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:m=1,onDayBlur:p,onDayClick:h,onDayFocus:y,onDayKeyDown:g,onDayMouseEnter:v,onDayMouseLeave:w,onNextClick:x,onPrevClick:b,showWeekNumber:S,styles:C}=t,{formatCaption:M,formatDay:N,formatMonthDropdown:R,formatWeekNumber:_,formatWeekNumberHeader:A,formatWeekdayName:$,formatYearDropdown:D}=r,Y=iw(t,a),{days:H,months:J,navStart:j,navEnd:X,previousMonth:F,nextMonth:O,goToMonth:Z}=Y,te=Ub(H,t,a),{isSelected:P,select:W,selected:G}=vw(t,a)??{},{blur:L,focused:z,isFocusTarget:T,moveFocus:Q,setFocused:K}=uw(t,Y,te,P??(()=>!1),a),{labelDayButton:B,labelGridcell:ee,labelGrid:ne,labelMonthDropdown:le,labelNav:ye,labelPrevious:et,labelNext:tt,labelWeekday:nt,labelWeekNumber:an,labelWeekNumberHeader:Ae,labelYearDropdown:tm}=o,nm=E.useMemo(()=>_x(a,t.ISOWeek),[a,t.ISOWeek]),Ha=u!==void 0||h!==void 0,Ur=E.useCallback(()=>{F&&(Z(F),b==null||b(F))},[F,Z,b]),zr=E.useCallback(()=>{O&&(Z(O),x==null||x(O))},[Z,O,x]),rm=E.useCallback((oe,me)=>ue=>{ue.preventDefault(),ue.stopPropagation(),K(oe),W==null||W(oe.date,me,ue),h==null||h(oe.date,me,ue)},[W,h,K]),om=E.useCallback((oe,me)=>ue=>{K(oe),y==null||y(oe.date,me,ue)},[y,K]),am=E.useCallback((oe,me)=>ue=>{L(),p==null||p(oe.date,me,ue)},[L,p]),sm=E.useCallback((oe,me)=>ue=>{const lt={ArrowLeft:["day",t.dir==="rtl"?"after":"before"],ArrowRight:["day",t.dir==="rtl"?"before":"after"],ArrowDown:["week","after"],ArrowUp:["week","before"],PageUp:[ue.shiftKey?"year":"month","before"],PageDown:[ue.shiftKey?"year":"month","after"],Home:["startOfWeek","before"],End:["endOfWeek","after"]};if(lt[ue.key]){ue.preventDefault(),ue.stopPropagation();const[_e,Yn]=lt[ue.key];Q(_e,Yn)}g==null||g(oe.date,me,ue)},[Q,g,t.dir]),im=E.useCallback((oe,me)=>ue=>{v==null||v(oe.date,me,ue)},[v]),cm=E.useCallback((oe,me)=>ue=>{w==null||w(oe.date,me,ue)},[w]),lm=E.useCallback(oe=>me=>{const ue=Number(me.target.value),lt=a.setMonth(a.startOfMonth(oe),ue);Z(lt)},[a,Z]),um=E.useCallback(oe=>me=>{const ue=Number(me.target.value),lt=a.setYear(a.startOfMonth(oe),ue);Z(lt)},[a,Z]),{className:dm,style:fm}=E.useMemo(()=>({className:[s[U.Root],t.className].filter(Boolean).join(" "),style:{...C==null?void 0:C[U.Root],...t.style}}),[s,t.className,t.style,C]),mm=Cx(t),Ga=E.useRef(null);Qx(Ga,!!t.animate,{classNames:s,months:J,focused:z,dateLib:a});const pm={dayPickerProps:t,selected:G,select:W,isSelected:P,months:J,nextMonth:O,previousMonth:F,goToMonth:Z,getModifiers:te,components:n,classNames:s,styles:C,labels:o,formatters:r};return E.createElement(Sl.Provider,{value:pm},E.createElement(n.Root,{rootRef:t.animate?Ga:void 0,className:dm,style:fm,dir:t.dir,id:t.id,lang:t.lang,nonce:t.nonce,title:t.title,role:t.role,"aria-label":t["aria-label"],...mm},E.createElement(n.Months,{className:s[U.Months],style:C==null?void 0:C[U.Months]},!t.hideNavigation&&!f&&E.createElement(n.Nav,{"data-animated-nav":t.animate?"true":void 0,className:s[U.Nav],style:C==null?void 0:C[U.Nav],"aria-label":ye(),onPreviousClick:Ur,onNextClick:zr,previousMonth:F,nextMonth:O}),J.map((oe,me)=>{const ue=Tx(oe.date,j,X,r,a),lt=jx(j,X,r,a);return E.createElement(n.Month,{"data-animated-month":t.animate?"true":void 0,className:s[U.Month],style:C==null?void 0:C[U.Month],key:me,displayIndex:me,calendarMonth:oe},f==="around"&&!t.hideNavigation&&me===0&&E.createElement(n.PreviousMonthButton,{type:"button",className:s[U.PreviousMonthButton],tabIndex:F?void 0:-1,"aria-disabled":F?void 0:!0,"aria-label":et(F),onClick:Ur,"data-animated-button":t.animate?"true":void 0},E.createElement(n.Chevron,{disabled:F?void 0:!0,className:s[U.Chevron],orientation:t.dir==="rtl"?"right":"left"})),E.createElement(n.MonthCaption,{"data-animated-caption":t.animate?"true":void 0,className:s[U.MonthCaption],style:C==null?void 0:C[U.MonthCaption],calendarMonth:oe,displayIndex:me},c!=null&&c.startsWith("dropdown")?E.createElement(n.DropdownNav,{className:s[U.Dropdowns],style:C==null?void 0:C[U.Dropdowns]},c==="dropdown"||c==="dropdown-months"?E.createElement(n.MonthsDropdown,{className:s[U.MonthsDropdown],"aria-label":le(),classNames:s,components:n,disabled:!!t.disableNavigation,onChange:lm(oe.date),options:ue,style:C==null?void 0:C[U.Dropdown],value:a.getMonth(oe.date)}):E.createElement("span",null,R(oe.date,a)),c==="dropdown"||c==="dropdown-years"?E.createElement(n.YearsDropdown,{className:s[U.YearsDropdown],"aria-label":tm(a.options),classNames:s,components:n,disabled:!!t.disableNavigation,onChange:um(oe.date),options:lt,style:C==null?void 0:C[U.Dropdown],value:a.getYear(oe.date)}):E.createElement("span",null,D(oe.date,a)),E.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"}},M(oe.date,a.options,a))):E.createElement(n.CaptionLabel,{className:s[U.CaptionLabel],role:"status","aria-live":"polite"},M(oe.date,a.options,a))),f==="around"&&!t.hideNavigation&&me===m-1&&E.createElement(n.NextMonthButton,{type:"button",className:s[U.NextMonthButton],tabIndex:O?void 0:-1,"aria-disabled":O?void 0:!0,"aria-label":tt(O),onClick:zr,"data-animated-button":t.animate?"true":void 0},E.createElement(n.Chevron,{disabled:O?void 0:!0,className:s[U.Chevron],orientation:t.dir==="rtl"?"left":"right"})),me===m-1&&f==="after"&&!t.hideNavigation&&E.createElement(n.Nav,{"data-animated-nav":t.animate?"true":void 0,className:s[U.Nav],style:C==null?void 0:C[U.Nav],"aria-label":ye(),onPreviousClick:Ur,onNextClick:zr,previousMonth:F,nextMonth:O}),E.createElement(n.MonthGrid,{role:"grid","aria-multiselectable":u==="multiple"||u==="range","aria-label":ne(oe.date,a.options,a)||void 0,className:s[U.MonthGrid],style:C==null?void 0:C[U.MonthGrid]},!t.hideWeekdays&&E.createElement(n.Weekdays,{"data-animated-weekdays":t.animate?"true":void 0,className:s[U.Weekdays],style:C==null?void 0:C[U.Weekdays]},S&&E.createElement(n.WeekNumberHeader,{"aria-label":Ae(a.options),className:s[U.WeekNumberHeader],style:C==null?void 0:C[U.WeekNumberHeader],scope:"col"},A()),nm.map((_e,Yn)=>E.createElement(n.Weekday,{"aria-label":nt(_e,a.options,a),className:s[U.Weekday],key:Yn,style:C==null?void 0:C[U.Weekday],scope:"col"},$(_e,a.options,a)))),E.createElement(n.Weeks,{"data-animated-weeks":t.animate?"true":void 0,className:s[U.Weeks],style:C==null?void 0:C[U.Weeks]},oe.weeks.map((_e,Yn)=>E.createElement(n.Week,{className:s[U.Week],key:_e.weekNumber,style:C==null?void 0:C[U.Week],week:_e},S&&E.createElement(n.WeekNumber,{week:_e,style:C==null?void 0:C[U.WeekNumber],"aria-label":an(_e.weekNumber,{locale:i}),className:s[U.WeekNumber],scope:"row",role:"rowheader"},_(_e.weekNumber,a)),_e.days.map(xe=>{const{date:He}=xe,se=te(xe);if(se[pe.focused]=!se.hidden&&!!(z!=null&&z.isEqualTo(xe)),se[Fe.selected]=(P==null?void 0:P(He))||se.selected,wa(G)){const{from:Kr,to:qr}=G;se[Fe.range_start]=!!(Kr&&qr&&a.isSameDay(He,Kr)),se[Fe.range_end]=!!(Kr&&qr&&a.isSameDay(He,qr)),se[Fe.range_middle]=ot(G,He,!0,a)}const hm=Ax(se,C,t.modifiersStyles),gm=zb(se,s,t.modifiersClassNames),vm=!Ha&&!se.hidden?ee(He,se,a.options,a):void 0;return E.createElement(n.Day,{key:`${a.format(He,"yyyy-MM-dd")}_${a.format(xe.displayMonth,"yyyy-MM")}`,day:xe,modifiers:se,className:gm.join(" "),style:hm,role:"gridcell","aria-selected":se.selected||void 0,"aria-label":vm,"data-day":a.format(He,"yyyy-MM-dd"),"data-month":xe.outside?a.format(He,"yyyy-MM"):void 0,"data-selected":se.selected||void 0,"data-disabled":se.disabled||void 0,"data-hidden":se.hidden||void 0,"data-outside":xe.outside||void 0,"data-focused":se.focused||void 0,"data-today":se.today||void 0},!se.hidden&&Ha?E.createElement(n.DayButton,{className:s[U.DayButton],style:C==null?void 0:C[U.DayButton],type:"button",day:xe,modifiers:se,disabled:se.disabled||void 0,tabIndex:T(xe)?0:-1,"aria-label":B(He,se,a.options,a),onClick:rm(xe,se),onBlur:am(xe,se),onFocus:om(xe,se),onKeyDown:sm(xe,se),onMouseEnter:im(xe,se),onMouseLeave:cm(xe,se)},N(He,a.options,a)):!se.hidden&&N(xe.date,a.options,a))}))))))})),t.footer&&E.createElement(n.Footer,{className:s[U.Footer],style:C==null?void 0:C[U.Footer],role:"status","aria-live":"polite"},t.footer)))}function kl(e,t,n){if(!t&&!n)throw new Error(`${e} must have either a label prop or an aria-label attribute`);if(t&&n)throw new Error(`${e} must have either a label prop or an aria-label attribute, but not both`)}const bw=()=>Array.from({length:12},(e,t)=>new Date(0,t).toLocaleString("en-US",{month:"long"})),xw=e=>{const{onSelect:t}=e,n=E.useRef(null);return E.useEffect(()=>{n.current&&n.current.focus()},[]),d.jsx("div",{className:`-mx-1 -my-1 grid max-h-72 min-w-80 grid-cols-1 gap-1 px-1 py-1 md:grid-cols-2
|
|
161
|
+
lg:grid-cols-3`,children:bw().map((r,o)=>d.jsx($e,{ref:o===0?n:void 0,className:k(`relative min-h-10 w-full text-center text-sm font-normal focus-within:relative
|
|
162
|
+
focus-within:z-20 focus:opacity-100 focus:ring-2 focus:ring-offset-0`),size:"sm",variant:"ghost",onClick:()=>{t==null||t(o)},children:r},r))})},ww=(e,t)=>{const n=new Date().getFullYear(),r=e?e.getFullYear():n-23,o=t?t.getFullYear():n,a=[];for(let i=o;i>=r;i--)a.push(i);return a},Cw=e=>{const{onSelect:t,startMonth:n,endMonth:r}=e,o=E.useRef(null);return E.useEffect(()=>{o.current&&o.current.focus()},[]),d.jsx("div",{className:`-mx-1 -my-1 grid max-h-72 min-w-80 gap-1 overflow-y-auto px-1 py-1 md:grid-cols-3
|
|
163
|
+
lg:grid-cols-4`,children:ww(n,r).map((a,i)=>d.jsx($e,{ref:i===0?o:void 0,className:k(`relative min-h-10 w-full text-center text-sm font-normal focus-within:relative
|
|
164
|
+
focus-within:z-20 focus:opacity-100 focus:ring-2 focus:ring-offset-0`),size:"sm",variant:"ghost",onClick:()=>{t==null||t(a)},children:a},a))})};function Ca({className:e,classNames:t,showOutsideDays:n=!0,...r}){const[o,a]=E.useState("default"),[i,s]=E.useState(void 0),c=E.useRef(null),u=E.useRef(null),f="h-7 md:h-9",m="w-7 px-0 py-0 focus:ring-2 focus:ring-offset-0 md:w-9",p="w-9 md:w-10 lg:w-11 px-0",h="h-9 md:h-10 lg:h-11 py-0",y=b=>{if(o==="month"||o==="year")return d.jsx(d.Fragment,{});const{orientation:S}=b;return S==="left"?d.jsx(Vp,{...b}):d.jsx(Xo,{...b})},g=b=>{const{calendarMonth:S}=b;return d.jsxs("div",{className:k(f,"relative mx-12 flex items-center justify-center text-sm font-medium"),children:[d.jsx($e,{ref:c,"aria-label":"Select calendar month",className:"px-1.5 focus:ring-2 focus:ring-offset-0",size:"sm",variant:"ghost",onClick:()=>{if(o==="month"){a("default"),setTimeout(()=>{var C;(C=c.current)==null||C.focus()},0);return}a("month")},children:S.date.toLocaleString("default",{month:"long"})}),d.jsx($e,{ref:u,"aria-label":"Select calendar year",className:"px-1.5 focus:ring-2 focus:ring-offset-0",size:"sm",variant:"ghost",onClick:()=>{if(o==="year"){a("default"),setTimeout(()=>{var C;(C=u.current)==null||C.focus()},0);return}a("year")},children:S.date.getFullYear()})]})},v=()=>o==="month"?d.jsx(xw,{onSelect:b=>{const S=i?new Date(i):new Date;S.setMonth(b),s(S),a("default"),setTimeout(()=>{var C;(C=c.current)==null||C.focus()},0)}}):o==="year"?d.jsx(Cw,{endMonth:r.endMonth,startMonth:r.startMonth,onSelect:b=>{const S=i?new Date(i):new Date;S.setFullYear(b),s(S),a("default"),setTimeout(()=>{var C;(C=u.current)==null||C.focus()},0)}}):d.jsx(d.Fragment,{}),w=()=>o==="default"?{Chevron:y,MonthCaption:g}:{Chevron:y,MonthCaption:g,MonthGrid:v},x=r.defaultMonth??i??(r.mode==="single"?r.selected:new Date)??new Date;return d.jsx(yw,{className:k("min-w-80 px-3 py-3",e),classNames:{months:"flex flex-col gap-4 sm:flex-row",month:"w-full space-y-4",month_caption:k(f,"relative flex items-center justify-center text-sm font-medium"),nav:"absolute left-4 right-4 flex items-center justify-between",button_previous:k(Ke({variant:"ghost"}),f,m),button_next:k(Ke({variant:"ghost"}),f,m),month_grid:"w-full border-collapse space-y-1",weekdays:"mb-1 flex",weekday:k(p,"rounded-l-full rounded-r-full text-sm font-normal text-muted-foreground"),week:"mt-1 flex w-full",day:k(p,h),day_button:k(Ke({variant:"ghost"}),p,h,`relative rounded-l-full rounded-r-full text-center text-sm font-normal
|
|
165
165
|
focus-within:relative focus-within:z-20 focus:opacity-100 focus:ring-2
|
|
166
|
-
focus:ring-offset-0`),range_start:"rounded-l-full aria-selected:bg-accent [&>button]:bg-primary [&>button]:text-primary-foreground",range_end:"rounded-r-full aria-selected:bg-accent [&>button]:bg-primary [&>button]:text-primary-foreground",selected:(r==null?void 0:r.mode)!=="range"?"[&>button]:bg-primary [&>button]:text-primary-foreground":"",today:"[&>button]:rounded-l-full [&>button]:rounded-r-full [&>button]:bg-accent [&>button]:text-accent-foreground",outside:"day-outside text-muted-foreground opacity-50",disabled:"text-muted-foreground opacity-50",range_middle:"first:rounded-l-md last:rounded-r-md aria-selected:bg-accent aria-selected:text-accent-foreground",hidden:"invisible",...t},components:w(),defaultMonth:x,month:i,showOutsideDays:n,onMonthChange:s,...r,disableNavigation:o!=="default"})}function Ir(e){const t=l.useRef({value:e,previous:e});return l.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var Dr="Checkbox",[Cw,QN]=ve(Dr),[Sw,Nw]=Cw(Dr),Ol=l.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:r,checked:o,defaultChecked:a,required:i,disabled:s,value:c="on",onCheckedChange:u,form:f,...m}=e,[p,h]=l.useState(null),y=q(t,S=>h(S)),g=l.useRef(!1),v=p?f||!!p.closest("form"):!0,[w,x]=Ce({prop:o,defaultProp:a??!1,onChange:u,caller:Dr}),b=l.useRef(w);return l.useEffect(()=>{const S=p==null?void 0:p.form;if(S){const C=()=>x(b.current);return S.addEventListener("reset",C),()=>S.removeEventListener("reset",C)}},[p,x]),d.jsxs(Sw,{scope:n,state:w,disabled:s,children:[d.jsx(V.button,{type:"button",role:"checkbox","aria-checked":pt(w)?"mixed":w,"aria-required":i,"data-state":Al(w),"data-disabled":s?"":void 0,disabled:s,value:c,...m,ref:y,onKeyDown:I(e.onKeyDown,S=>{S.key==="Enter"&&S.preventDefault()}),onClick:I(e.onClick,S=>{x(C=>pt(C)?!0:!C),v&&(g.current=S.isPropagationStopped(),g.current||S.stopPropagation())})}),v&&d.jsx(Tl,{control:p,bubbles:!g.current,name:r,value:c,checked:w,required:i,disabled:s,form:f,style:{transform:"translateX(-100%)"},defaultChecked:pt(a)?!1:a})]})});Ol.displayName=Dr;var Il="CheckboxIndicator",Dl=l.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...o}=e,a=Nw(Il,n);return d.jsx(De,{present:r||pt(a.state)||a.state===!0,children:d.jsx(V.span,{"data-state":Al(a.state),"data-disabled":a.disabled?"":void 0,...o,ref:t,style:{pointerEvents:"none",...e.style}})})});Dl.displayName=Il;var Ew="CheckboxBubbleInput",Tl=l.forwardRef(({__scopeCheckbox:e,control:t,checked:n,bubbles:r=!0,defaultChecked:o,...a},i)=>{const s=l.useRef(null),c=q(s,i),u=Ir(n),f=Tn(t);l.useEffect(()=>{const p=s.current;if(!p)return;const h=window.HTMLInputElement.prototype,g=Object.getOwnPropertyDescriptor(h,"checked").set;if(u!==n&&g){const v=new Event("click",{bubbles:r});p.indeterminate=pt(n),g.call(p,pt(n)?!1:n),p.dispatchEvent(v)}},[u,n,r]);const m=l.useRef(pt(n)?!1:n);return d.jsx(V.input,{type:"checkbox","aria-hidden":!0,defaultChecked:o??m.current,...a,tabIndex:-1,ref:c,style:{...a.style,...f,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});Tl.displayName=Ew;function pt(e){return e==="indeterminate"}function Al(e){return pt(e)?"indeterminate":e?"checked":"unchecked"}var Tr=Ol,Mw=Dl;const _l=l.forwardRef(({id:e,label:t,description:n,isChecked:r,isDisabled:o,className:a,"aria-label":i,...s},c)=>{const u=Oe({isDisabled:o}),{ariaProps:f,labelId:m,descriptionId:p}=It({label:t,description:n,"aria-label":i}),h=()=>t?typeof t=="string"?d.jsx("span",{className:"font-medium",id:m,children:t}):d.jsx("span",{id:m,children:t}):null;return d.jsxs("div",{className:k("relative",r?k(ae.button,Ke({variant:"primary"})):k(ae.button,Ke({variant:"input"})),o&&"pointer-events-none cursor-not-allowed opacity-50",a),children:[d.jsx(Tr,{ref:c,checked:r,className:"absolute inset-0 opacity-0",id:e,...f,...s,...u}),d.jsxs("div",{className:"flex items-center gap-2",children:[h(),n?d.jsx("span",{className:"text-sm text-muted-foreground",id:p,children:n}):null]})]})});_l.displayName="CheckboxButton";var Rw="Label",jl=l.forwardRef((e,t)=>d.jsx(V.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())}}));jl.displayName=Rw;var Fl=jl;const nn=l.forwardRef(({className:e,...t},n)=>d.jsx(Fl,{ref:n,className:k(ae.text.label,e),...t}));nn.displayName=Fl.displayName;const $l="peer h-5 w-5 shrink-0 rounded-sm border-2 border-gray-500 ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:border-primary-400 data-[state=checked]:bg-primary-400 data-[state=checked]:text-white",Ll=l.forwardRef(({id:e,label:t,description:n,isChecked:r,isDisabled:o,className:a,"aria-label":i,...s},c)=>{const u=Oe({isDisabled:o}),{ariaProps:f,labelId:m,descriptionId:p}=It({label:t,description:n,"aria-label":i});return d.jsxs("div",{className:k("flex items-start gap-2",o&&"cursor-not-allowed opacity-50 [&>*]:cursor-not-allowed"),children:[d.jsx(Tr,{ref:c,checked:r,className:k(ae.focusRingVisible,ae.focusRingVisibleSm,$l,a),id:e,...s,...u,...f,children:d.jsx(Mw,{className:k("flex items-center justify-center text-current"),children:d.jsx(Ot,{className:"h-4 w-4",strokeWidth:3})})}),d.jsxs("div",{className:"mt-[3px] flex flex-col gap-1",children:[t?typeof t=="string"?d.jsx(nn,{htmlFor:e,id:m,children:t}):d.jsx("div",{id:m,children:t}):null,n?d.jsx("p",{className:"text-sm text-muted-foreground",id:p,children:n}):null]})]})});Ll.displayName="CheckboxDefault";const Wl=l.forwardRef(({id:e,label:t,description:n,isChecked:r,isDisabled:o,className:a,"aria-label":i,...s},c)=>{const u=Oe({isDisabled:o}),{ariaProps:f,labelId:m,descriptionId:p}=It({label:t,description:n,"aria-label":i}),h=()=>t?typeof t=="string"?d.jsx("div",{className:"font-medium",id:m,children:t}):d.jsx("div",{id:m,children:t}):null;return d.jsxs("div",{className:k("relative rounded-lg border-2 border-muted bg-popover px-4 py-4",r&&"border-primary-400",o?"cursor-not-allowed opacity-50 [&_*]:cursor-not-allowed":"cursor-pointer hover:bg-accent hover:text-accent-foreground",a),children:[d.jsx(Tr,{ref:c,checked:r,className:"absolute inset-0 opacity-0",id:e,...f,...s,...u}),d.jsxs("div",{className:"flex items-start gap-3",children:[d.jsx("div",{className:k($l,"pointer-events-none mt-1",r&&"border-primary-400 bg-primary-400"),children:r?d.jsx("div",{className:"flex h-full w-full items-center justify-center",children:d.jsx(Ot,{className:"h-4 w-4 text-white",strokeWidth:3})}):null}),d.jsxs("div",{className:"pointer-events-none space-y-1",children:[h(),n?d.jsx("p",{className:"text-sm text-muted-foreground",id:p,children:n}):null]})]})]})});Wl.displayName="CheckboxTile";const Sa=l.forwardRef(({className:e,label:t,description:n,id:r,"aria-label":o,isChecked:a=!1,isDisabled:i=!1,variant:s="default",...c},u)=>{kl("Checkbox",t,o);let f=Ll;return s==="button"?f=_l:s==="tile"&&(f=Wl),d.jsx(f,{ref:u,"aria-label":o,className:e,description:n,id:r,isChecked:a,isDisabled:i,label:t,...c})});Sa.displayName=Tr.displayName;const Bl=l.forwardRef(({options:e,value:t,onChange:n,className:r,columns:o=2,orientation:a="vertical",variant:i="default",...s},c)=>{const u=Qo({variant:i,orientation:a,columns:o});return d.jsx("div",{ref:c,className:k(u,r),...s,children:e.map(f=>d.jsx(Sa,{description:f.description,id:f.id,isChecked:t.includes(f.id),label:f.label,variant:i,onCheckedChange:m=>{n(m?[...t,f.id]:t.filter(p=>p!==f.id))}},f.id))})});Bl.displayName="CheckboxGroup";const Vl=E.forwardRef(({options:e,value:t,onChange:n,placeholder:r="Select an item...",searchPlaceholder:o="Search items...",emptyMessage:a="No items found",className:i,listClassName:s,zIndex:c,isDisabled:u=!1,name:f,required:m,autoFocus:p,...h},y)=>{var x;const[g,v]=E.useState(!1),w=Ye("dropdown",c);return d.jsxs(d.Fragment,{children:[f||m?d.jsx("input",{name:f,required:m,type:"hidden",value:t}):null,d.jsxs(Jt,{open:g,onOpenChange:v,children:[d.jsx(en,{asChild:!0,children:d.jsxs($e,{ref:y,"aria-expanded":g,autoFocus:p,className:k("w-full justify-between px-3",!t&&"text-muted-foreground",i),isDisabled:u,role:"combobox",variant:"input",...h,children:[t?(x=e.find(b=>b.value===t))==null?void 0:x.label:r,d.jsx(Zo,{className:"ml-2 h-4 w-4 shrink-0 opacity-50"})]})}),d.jsx(Dt,{align:"start",className:"w-[--radix-popover-trigger-width] px-0 py-0",zIndex:w,children:d.jsxs(xr,{children:[d.jsx(Cr,{placeholder:o}),d.jsxs(Nr,{className:k("max-h-[16.5rem] overflow-y-auto",s),children:[d.jsx(sa,{children:a}),d.jsx(wr,{children:e.map(b=>d.jsxs(Sr,{value:b.value,onSelect:S=>{n(S===t?"":S),v(!1)},children:[d.jsx(Ot,{className:k("mr-2 h-4 w-4",t===b.value?"opacity-100":"opacity-0")}),b.label]},b.value))})]})]})})]})]})});Vl.displayName="Combobox";const Yl=E.forwardRef(({value:e,startMonth:t,endMonth:n,onChange:r,placeholder:o="Pick a date",className:a,zIndex:i,isDisabled:s=!1,name:c,required:u,autoFocus:f,...m},p)=>{const[h,y]=E.useState(!1),g=Ye("popover",i),v=w=>{r(w),y(!1)};return d.jsxs(d.Fragment,{children:[c||u?d.jsx("input",{name:c,required:u,type:"hidden",value:e?e.toISOString().split("T")[0]:""}):null,d.jsxs(Jt,{open:h,onOpenChange:y,children:[d.jsx(en,{asChild:!0,children:d.jsxs($e,{ref:p,autoFocus:f,className:k("w-full justify-start px-3 text-left font-normal",!e&&"text-muted-foreground",a),"data-component":"date-picker",isDisabled:s,variant:"input",...m,children:[d.jsx(gi,{className:"mr-2 h-4 w-4"}),e?gn(e,"LLLL dd, y"):d.jsx("span",{children:o})]})}),d.jsx(Dt,{align:"start",className:"w-auto px-0 py-0",zIndex:g,children:d.jsx(Ca,{autoFocus:!0,endMonth:n,mode:"single",selected:e,startMonth:t,onSelect:v})})]})]})});Yl.displayName="DatePicker";const Hl=l.forwardRef(({value:e,onChange:t,placeholder:n={from:"Pick start date",to:"Pick end date"},className:r,zIndex:o,isDisabled:a=!1,name:i,required:s,autoFocus:c,...u},f)=>{const m=Ye("popover",o),p=y=>{const{from:g,to:v}=e;if(!g)return t({from:y,to:void 0});if(y<g)return t({from:y,to:void 0});if(g&&v)return t({from:y,to:void 0});if(y>g)return t({from:g,to:y});if(y.getTime()===g.getTime())return t({from:void 0,to:void 0})},h=y=>y.from?y.to?`${y.from.toISOString().split("T")[0]},${y.to.toISOString().split("T")[0]}`:y.from.toISOString().split("T")[0]:"";return d.jsxs("div",{className:k("grid gap-2",r),children:[i||s?d.jsx("input",{name:i,required:s,type:"hidden",value:h(e)}):null,d.jsxs(Jt,{children:[d.jsx(en,{asChild:!0,children:d.jsxs($e,{ref:f,autoFocus:c,className:k("w-full justify-start px-3 text-left font-normal",!e.from&&!e.to&&"text-muted-foreground"),"data-component":"date-range-picker",id:"date",isDisabled:a,variant:"input",...u,children:[d.jsx(gi,{className:"mr-2 h-4 w-4"}),e.from?e.to?d.jsxs(d.Fragment,{children:[gn(e.from,"LLLL dd, y")," - ",gn(e.to,"LLLL dd, y")]}):gn(e.from,"LLLL dd, y"):d.jsx("span",{children:n.from})]})}),d.jsx(Dt,{align:"start",className:"w-auto px-0 py-0",zIndex:m,children:d.jsx(Ca,{autoFocus:!0,defaultMonth:e.from,mode:"range",modifiers:{today:()=>!1},numberOfMonths:2,selected:{from:e.from,to:e.to},showOutsideDays:!1,onDayClick:p,onSelect:y=>{y&&t(y)}})})]})]})});Hl.displayName="DateRangePicker";const Gl=l.forwardRef(({className:e,...t},n)=>d.jsx(Ji,{ref:n,className:k(ae.text.hint,e),...t}));Gl.displayName=Ji.displayName;const Ul=({className:e,...t})=>d.jsx("div",{className:k("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Ul.displayName="DialogFooter";const zl=({className:e,...t})=>d.jsx("div",{className:k("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});zl.displayName="DialogHeader";const Kl=l.forwardRef(({className:e,...t},n)=>d.jsx(Qi,{ref:n,className:k(ae.text.title,"mr-8 leading-none tracking-tight",e),...t}));Kl.displayName=Qi.displayName;var ho="rovingFocusGroup.onEntryFocus",Pw={bubbles:!1,cancelable:!0},$n="RovingFocusGroup",[ko,ql,kw]=Mn($n),[Ow,Xl]=ve($n,[kw]),[Iw,Dw]=Ow($n),Zl=l.forwardRef((e,t)=>d.jsx(ko.Provider,{scope:e.__scopeRovingFocusGroup,children:d.jsx(ko.Slot,{scope:e.__scopeRovingFocusGroup,children:d.jsx(Tw,{...e,ref:t})})}));Zl.displayName=$n;var Tw=l.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:a,currentTabStopId:i,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:c,onEntryFocus:u,preventScrollOnEntryFocus:f=!1,...m}=e,p=l.useRef(null),h=q(t,p),y=xt(a),[g,v]=Ce({prop:i,defaultProp:s??null,onChange:c,caller:$n}),[w,x]=l.useState(!1),b=Ne(u),S=ql(n),C=l.useRef(!1),[M,N]=l.useState(0);return l.useEffect(()=>{const R=p.current;if(R)return R.addEventListener(ho,b),()=>R.removeEventListener(ho,b)},[b]),d.jsx(Iw,{scope:n,orientation:r,dir:y,loop:o,currentTabStopId:g,onItemFocus:l.useCallback(R=>v(R),[v]),onItemShiftTab:l.useCallback(()=>x(!0),[]),onFocusableItemAdd:l.useCallback(()=>N(R=>R+1),[]),onFocusableItemRemove:l.useCallback(()=>N(R=>R-1),[]),children:d.jsx(V.div,{tabIndex:w||M===0?-1:0,"data-orientation":r,...m,ref:h,style:{outline:"none",...e.style},onMouseDown:I(e.onMouseDown,()=>{C.current=!0}),onFocus:I(e.onFocus,R=>{const _=!C.current;if(R.target===R.currentTarget&&_&&!w){const A=new CustomEvent(ho,Pw);if(R.currentTarget.dispatchEvent(A),!A.defaultPrevented){const $=S().filter(j=>j.focusable),D=$.find(j=>j.active),Y=$.find(j=>j.id===g),J=[D,Y,...$].filter(Boolean).map(j=>j.ref.current);eu(J,f)}}C.current=!1}),onBlur:I(e.onBlur,()=>x(!1))})})}),Ql="RovingFocusGroupItem",Jl=l.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:a,children:i,...s}=e,c=he(),u=a||c,f=Dw(Ql,n),m=f.currentTabStopId===u,p=ql(n),{onFocusableItemAdd:h,onFocusableItemRemove:y,currentTabStopId:g}=f;return l.useEffect(()=>{if(r)return h(),()=>y()},[r,h,y]),d.jsx(ko.ItemSlot,{scope:n,id:u,focusable:r,active:o,children:d.jsx(V.span,{tabIndex:m?0:-1,"data-orientation":f.orientation,...s,ref:t,onMouseDown:I(e.onMouseDown,v=>{r?f.onItemFocus(u):v.preventDefault()}),onFocus:I(e.onFocus,()=>f.onItemFocus(u)),onKeyDown:I(e.onKeyDown,v=>{if(v.key==="Tab"&&v.shiftKey){f.onItemShiftTab();return}if(v.target!==v.currentTarget)return;const w=jw(v,f.orientation,f.dir);if(w!==void 0){if(v.metaKey||v.ctrlKey||v.altKey||v.shiftKey)return;v.preventDefault();let b=p().filter(S=>S.focusable).map(S=>S.ref.current);if(w==="last")b.reverse();else if(w==="prev"||w==="next"){w==="prev"&&b.reverse();const S=b.indexOf(v.currentTarget);b=f.loop?Fw(b,S+1):b.slice(S+1)}setTimeout(()=>eu(b))}}),children:typeof i=="function"?i({isCurrentTabStop:m,hasTabStop:g!=null}):i})})});Jl.displayName=Ql;var Aw={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function _w(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function jw(e,t,n){const r=_w(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return Aw[r]}function eu(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function Fw(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var $w=Zl,Lw=Jl,Oo=["Enter"," "],Ww=["ArrowDown","PageUp","Home"],tu=["ArrowUp","PageDown","End"],Bw=[...Ww,...tu],Vw={ltr:[...Oo,"ArrowRight"],rtl:[...Oo,"ArrowLeft"]},Yw={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Ln="Menu",[Cn,Hw,Gw]=Mn(Ln),[Tt,nu]=ve(Ln,[Gw,Qt,Xl]),Ar=Qt(),ru=Xl(),[Uw,At]=Tt(Ln),[zw,Wn]=Tt(Ln),ou=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:o,onOpenChange:a,modal:i=!0}=e,s=Ar(t),[c,u]=l.useState(null),f=l.useRef(!1),m=Ne(a),p=xt(o);return l.useEffect(()=>{const h=()=>{f.current=!0,document.addEventListener("pointerdown",y,{capture:!0,once:!0}),document.addEventListener("pointermove",y,{capture:!0,once:!0})},y=()=>f.current=!1;return document.addEventListener("keydown",h,{capture:!0}),()=>{document.removeEventListener("keydown",h,{capture:!0}),document.removeEventListener("pointerdown",y,{capture:!0}),document.removeEventListener("pointermove",y,{capture:!0})}},[]),d.jsx(ga,{...s,children:d.jsx(Uw,{scope:t,open:n,onOpenChange:m,content:c,onContentChange:u,children:d.jsx(zw,{scope:t,onClose:l.useCallback(()=>m(!1),[m]),isUsingKeyboardRef:f,dir:p,modal:i,children:r})})})};ou.displayName=Ln;var Kw="MenuAnchor",Na=l.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=Ar(n);return d.jsx(Pr,{...o,...r,ref:t})});Na.displayName=Kw;var Ea="MenuPortal",[qw,au]=Tt(Ea,{forceMount:void 0}),su=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:o}=e,a=At(Ea,t);return d.jsx(qw,{scope:t,forceMount:n,children:d.jsx(De,{present:n||a.open,children:d.jsx(kn,{asChild:!0,container:o,children:r})})})};su.displayName=Ea;var Ie="MenuContent",[Xw,Ma]=Tt(Ie),iu=l.forwardRef((e,t)=>{const n=au(Ie,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,a=At(Ie,e.__scopeMenu),i=Wn(Ie,e.__scopeMenu);return d.jsx(Cn.Provider,{scope:e.__scopeMenu,children:d.jsx(De,{present:r||a.open,children:d.jsx(Cn.Slot,{scope:e.__scopeMenu,children:i.modal?d.jsx(Zw,{...o,ref:t}):d.jsx(Qw,{...o,ref:t})})})})}),Zw=l.forwardRef((e,t)=>{const n=At(Ie,e.__scopeMenu),r=l.useRef(null),o=q(t,r);return l.useEffect(()=>{const a=r.current;if(a)return vr(a)},[]),d.jsx(Ra,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:I(e.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),Qw=l.forwardRef((e,t)=>{const n=At(Ie,e.__scopeMenu);return d.jsx(Ra,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),Jw=ht("MenuContent.ScrollLock"),Ra=l.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:o,onOpenAutoFocus:a,onCloseAutoFocus:i,disableOutsidePointerEvents:s,onEntryFocus:c,onEscapeKeyDown:u,onPointerDownOutside:f,onFocusOutside:m,onInteractOutside:p,onDismiss:h,disableOutsideScroll:y,...g}=e,v=At(Ie,n),w=Wn(Ie,n),x=Ar(n),b=ru(n),S=Hw(n),[C,M]=l.useState(null),N=l.useRef(null),R=q(t,N,v.onContentChange),_=l.useRef(0),A=l.useRef(""),$=l.useRef(0),D=l.useRef(null),Y=l.useRef("right"),H=l.useRef(0),J=y?On:l.Fragment,j=y?{as:Jw,allowPinchZoom:!0}:void 0,X=O=>{var T,Q;const Z=A.current+O,te=S().filter(K=>!K.disabled),P=document.activeElement,W=(T=te.find(K=>K.ref.current===P))==null?void 0:T.textValue,G=te.map(K=>K.textValue),L=dC(G,Z,W),z=(Q=te.find(K=>K.textValue===L))==null?void 0:Q.ref.current;(function K(B){A.current=B,window.clearTimeout(_.current),B!==""&&(_.current=window.setTimeout(()=>K(""),1e3))})(Z),z&&setTimeout(()=>z.focus())};l.useEffect(()=>()=>window.clearTimeout(_.current),[]),hr();const F=l.useCallback(O=>{var te,P;return Y.current===((te=D.current)==null?void 0:te.side)&&mC(O,(P=D.current)==null?void 0:P.area)},[]);return d.jsx(Xw,{scope:n,searchRef:A,onItemEnter:l.useCallback(O=>{F(O)&&O.preventDefault()},[F]),onItemLeave:l.useCallback(O=>{var Z;F(O)||((Z=N.current)==null||Z.focus(),M(null))},[F]),onTriggerLeave:l.useCallback(O=>{F(O)&&O.preventDefault()},[F]),pointerGraceTimerRef:$,onPointerGraceIntentChange:l.useCallback(O=>{D.current=O},[]),children:d.jsx(J,{...j,children:d.jsx(Pn,{asChild:!0,trapped:o,onMountAutoFocus:I(a,O=>{var Z;O.preventDefault(),(Z=N.current)==null||Z.focus({preventScroll:!0})}),onUnmountAutoFocus:i,children:d.jsx(Rn,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:u,onPointerDownOutside:f,onFocusOutside:m,onInteractOutside:p,onDismiss:h,children:d.jsx($w,{asChild:!0,...b,dir:w.dir,orientation:"vertical",loop:r,currentTabStopId:C,onCurrentTabStopIdChange:M,onEntryFocus:I(c,O=>{w.isUsingKeyboardRef.current||O.preventDefault()}),preventScrollOnEntryFocus:!0,children:d.jsx(va,{role:"menu","aria-orientation":"vertical","data-state":Su(v.open),"data-radix-menu-content":"",dir:w.dir,...x,...g,ref:R,style:{outline:"none",...g.style},onKeyDown:I(g.onKeyDown,O=>{const te=O.target.closest("[data-radix-menu-content]")===O.currentTarget,P=O.ctrlKey||O.altKey||O.metaKey,W=O.key.length===1;te&&(O.key==="Tab"&&O.preventDefault(),!P&&W&&X(O.key));const G=N.current;if(O.target!==G||!Bw.includes(O.key))return;O.preventDefault();const z=S().filter(T=>!T.disabled).map(T=>T.ref.current);tu.includes(O.key)&&z.reverse(),lC(z)}),onBlur:I(e.onBlur,O=>{O.currentTarget.contains(O.target)||(window.clearTimeout(_.current),A.current="")}),onPointerMove:I(e.onPointerMove,Sn(O=>{const Z=O.target,te=H.current!==O.clientX;if(O.currentTarget.contains(Z)&&te){const P=O.clientX>H.current?"right":"left";Y.current=P,H.current=O.clientX}}))})})})})})})});iu.displayName=Ie;var eC="MenuGroup",Pa=l.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return d.jsx(V.div,{role:"group",...r,ref:t})});Pa.displayName=eC;var tC="MenuLabel",cu=l.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return d.jsx(V.div,{...r,ref:t})});cu.displayName=tC;var cr="MenuItem",$s="menu.itemSelect",_r=l.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...o}=e,a=l.useRef(null),i=Wn(cr,e.__scopeMenu),s=Ma(cr,e.__scopeMenu),c=q(t,a),u=l.useRef(!1),f=()=>{const m=a.current;if(!n&&m){const p=new CustomEvent($s,{bubbles:!0,cancelable:!0});m.addEventListener($s,h=>r==null?void 0:r(h),{once:!0}),Zs(m,p),p.defaultPrevented?u.current=!1:i.onClose()}};return d.jsx(lu,{...o,ref:c,disabled:n,onClick:I(e.onClick,f),onPointerDown:m=>{var p;(p=e.onPointerDown)==null||p.call(e,m),u.current=!0},onPointerUp:I(e.onPointerUp,m=>{var p;u.current||(p=m.currentTarget)==null||p.click()}),onKeyDown:I(e.onKeyDown,m=>{const p=s.searchRef.current!=="";n||p&&m.key===" "||Oo.includes(m.key)&&(m.currentTarget.click(),m.preventDefault())})})});_r.displayName=cr;var lu=l.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:o,...a}=e,i=Ma(cr,n),s=ru(n),c=l.useRef(null),u=q(t,c),[f,m]=l.useState(!1),[p,h]=l.useState("");return l.useEffect(()=>{const y=c.current;y&&h((y.textContent??"").trim())},[a.children]),d.jsx(Cn.ItemSlot,{scope:n,disabled:r,textValue:o??p,children:d.jsx(Lw,{asChild:!0,...s,focusable:!r,children:d.jsx(V.div,{role:"menuitem","data-highlighted":f?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...a,ref:u,onPointerMove:I(e.onPointerMove,Sn(y=>{r?i.onItemLeave(y):(i.onItemEnter(y),y.defaultPrevented||y.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:I(e.onPointerLeave,Sn(y=>i.onItemLeave(y))),onFocus:I(e.onFocus,()=>m(!0)),onBlur:I(e.onBlur,()=>m(!1))})})})}),nC="MenuCheckboxItem",uu=l.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...o}=e;return d.jsx(hu,{scope:e.__scopeMenu,checked:n,children:d.jsx(_r,{role:"menuitemcheckbox","aria-checked":lr(n)?"mixed":n,...o,ref:t,"data-state":Oa(n),onSelect:I(o.onSelect,()=>r==null?void 0:r(lr(n)?!0:!n),{checkForDefaultPrevented:!1})})})});uu.displayName=nC;var du="MenuRadioGroup",[rC,oC]=Tt(du,{value:void 0,onValueChange:()=>{}}),fu=l.forwardRef((e,t)=>{const{value:n,onValueChange:r,...o}=e,a=Ne(r);return d.jsx(rC,{scope:e.__scopeMenu,value:n,onValueChange:a,children:d.jsx(Pa,{...o,ref:t})})});fu.displayName=du;var mu="MenuRadioItem",pu=l.forwardRef((e,t)=>{const{value:n,...r}=e,o=oC(mu,e.__scopeMenu),a=n===o.value;return d.jsx(hu,{scope:e.__scopeMenu,checked:a,children:d.jsx(_r,{role:"menuitemradio","aria-checked":a,...r,ref:t,"data-state":Oa(a),onSelect:I(r.onSelect,()=>{var i;return(i=o.onValueChange)==null?void 0:i.call(o,n)},{checkForDefaultPrevented:!1})})})});pu.displayName=mu;var ka="MenuItemIndicator",[hu,aC]=Tt(ka,{checked:!1}),gu=l.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...o}=e,a=aC(ka,n);return d.jsx(De,{present:r||lr(a.checked)||a.checked===!0,children:d.jsx(V.span,{...o,ref:t,"data-state":Oa(a.checked)})})});gu.displayName=ka;var sC="MenuSeparator",vu=l.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return d.jsx(V.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});vu.displayName=sC;var iC="MenuArrow",yu=l.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=Ar(n);return d.jsx(ya,{...o,...r,ref:t})});yu.displayName=iC;var cC="MenuSub",[JN,bu]=Tt(cC),mn="MenuSubTrigger",xu=l.forwardRef((e,t)=>{const n=At(mn,e.__scopeMenu),r=Wn(mn,e.__scopeMenu),o=bu(mn,e.__scopeMenu),a=Ma(mn,e.__scopeMenu),i=l.useRef(null),{pointerGraceTimerRef:s,onPointerGraceIntentChange:c}=a,u={__scopeMenu:e.__scopeMenu},f=l.useCallback(()=>{i.current&&window.clearTimeout(i.current),i.current=null},[]);return l.useEffect(()=>f,[f]),l.useEffect(()=>{const m=s.current;return()=>{window.clearTimeout(m),c(null)}},[s,c]),d.jsx(Na,{asChild:!0,...u,children:d.jsx(lu,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":o.contentId,"data-state":Su(n.open),...e,ref:Xe(t,o.onTriggerChange),onClick:m=>{var p;(p=e.onClick)==null||p.call(e,m),!(e.disabled||m.defaultPrevented)&&(m.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:I(e.onPointerMove,Sn(m=>{a.onItemEnter(m),!m.defaultPrevented&&!e.disabled&&!n.open&&!i.current&&(a.onPointerGraceIntentChange(null),i.current=window.setTimeout(()=>{n.onOpenChange(!0),f()},100))})),onPointerLeave:I(e.onPointerLeave,Sn(m=>{var h,y;f();const p=(h=n.content)==null?void 0:h.getBoundingClientRect();if(p){const g=(y=n.content)==null?void 0:y.dataset.side,v=g==="right",w=v?-5:5,x=p[v?"left":"right"],b=p[v?"right":"left"];a.onPointerGraceIntentChange({area:[{x:m.clientX+w,y:m.clientY},{x,y:p.top},{x:b,y:p.top},{x:b,y:p.bottom},{x,y:p.bottom}],side:g}),window.clearTimeout(s.current),s.current=window.setTimeout(()=>a.onPointerGraceIntentChange(null),300)}else{if(a.onTriggerLeave(m),m.defaultPrevented)return;a.onPointerGraceIntentChange(null)}})),onKeyDown:I(e.onKeyDown,m=>{var h;const p=a.searchRef.current!=="";e.disabled||p&&m.key===" "||Vw[r.dir].includes(m.key)&&(n.onOpenChange(!0),(h=n.content)==null||h.focus(),m.preventDefault())})})})});xu.displayName=mn;var wu="MenuSubContent",Cu=l.forwardRef((e,t)=>{const n=au(Ie,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,a=At(Ie,e.__scopeMenu),i=Wn(Ie,e.__scopeMenu),s=bu(wu,e.__scopeMenu),c=l.useRef(null),u=q(t,c);return d.jsx(Cn.Provider,{scope:e.__scopeMenu,children:d.jsx(De,{present:r||a.open,children:d.jsx(Cn.Slot,{scope:e.__scopeMenu,children:d.jsx(Ra,{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 m;i.isUsingKeyboardRef.current&&((m=c.current)==null||m.focus()),f.preventDefault()},onCloseAutoFocus:f=>f.preventDefault(),onFocusOutside:I(e.onFocusOutside,f=>{f.target!==s.trigger&&a.onOpenChange(!1)}),onEscapeKeyDown:I(e.onEscapeKeyDown,f=>{i.onClose(),f.preventDefault()}),onKeyDown:I(e.onKeyDown,f=>{var h;const m=f.currentTarget.contains(f.target),p=Yw[i.dir].includes(f.key);m&&p&&(a.onOpenChange(!1),(h=s.trigger)==null||h.focus(),f.preventDefault())})})})})})});Cu.displayName=wu;function Su(e){return e?"open":"closed"}function lr(e){return e==="indeterminate"}function Oa(e){return lr(e)?"indeterminate":e?"checked":"unchecked"}function lC(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function uC(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function dC(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=uC(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 fC(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,m=c.x,p=c.y;f>r!=p>r&&n<(m-u)*(r-f)/(p-f)+u&&(o=!o)}return o}function mC(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return fC(n,t)}function Sn(e){return t=>t.pointerType==="mouse"?e(t):void 0}var pC=ou,hC=Na,gC=su,vC=iu,yC=Pa,bC=cu,xC=_r,wC=uu,CC=fu,SC=pu,NC=gu,EC=vu,MC=yu,RC=xu,PC=Cu,jr="DropdownMenu",[kC,eE]=ve(jr,[nu]),Ee=nu(),[OC,Nu]=kC(jr),Eu=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:o,defaultOpen:a,onOpenChange:i,modal:s=!0}=e,c=Ee(t),u=l.useRef(null),[f,m]=Ce({prop:o,defaultProp:a??!1,onChange:i,caller:jr});return d.jsx(OC,{scope:t,triggerId:he(),triggerRef:u,contentId:he(),open:f,onOpenChange:m,onOpenToggle:l.useCallback(()=>m(p=>!p),[m]),modal:s,children:d.jsx(pC,{...c,open:f,onOpenChange:m,dir:r,modal:s,children:n})})};Eu.displayName=jr;var Mu="DropdownMenuTrigger",Ru=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...o}=e,a=Nu(Mu,n),i=Ee(n);return d.jsx(hC,{asChild:!0,...i,children:d.jsx(V.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:Xe(t,a.triggerRef),onPointerDown:I(e.onPointerDown,s=>{!r&&s.button===0&&s.ctrlKey===!1&&(a.onOpenToggle(),a.open||s.preventDefault())}),onKeyDown:I(e.onKeyDown,s=>{r||(["Enter"," "].includes(s.key)&&a.onOpenToggle(),s.key==="ArrowDown"&&a.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(s.key)&&s.preventDefault())})})})});Ru.displayName=Mu;var IC="DropdownMenuPortal",Pu=e=>{const{__scopeDropdownMenu:t,...n}=e,r=Ee(t);return d.jsx(gC,{...r,...n})};Pu.displayName=IC;var ku="DropdownMenuContent",Ou=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Nu(ku,n),a=Ee(n),i=l.useRef(!1);return d.jsx(vC,{id:o.contentId,"aria-labelledby":o.triggerId,...a,...r,ref:t,onCloseAutoFocus:I(e.onCloseAutoFocus,s=>{var c;i.current||(c=o.triggerRef.current)==null||c.focus(),i.current=!1,s.preventDefault()}),onInteractOutside:I(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)"}})});Ou.displayName=ku;var DC="DropdownMenuGroup",TC=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ee(n);return d.jsx(yC,{...o,...r,ref:t})});TC.displayName=DC;var AC="DropdownMenuLabel",_C=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ee(n);return d.jsx(bC,{...o,...r,ref:t})});_C.displayName=AC;var jC="DropdownMenuItem",Iu=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ee(n);return d.jsx(xC,{...o,...r,ref:t})});Iu.displayName=jC;var FC="DropdownMenuCheckboxItem",$C=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ee(n);return d.jsx(wC,{...o,...r,ref:t})});$C.displayName=FC;var LC="DropdownMenuRadioGroup",WC=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ee(n);return d.jsx(CC,{...o,...r,ref:t})});WC.displayName=LC;var BC="DropdownMenuRadioItem",VC=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ee(n);return d.jsx(SC,{...o,...r,ref:t})});VC.displayName=BC;var YC="DropdownMenuItemIndicator",HC=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ee(n);return d.jsx(NC,{...o,...r,ref:t})});HC.displayName=YC;var GC="DropdownMenuSeparator",Du=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ee(n);return d.jsx(EC,{...o,...r,ref:t})});Du.displayName=GC;var UC="DropdownMenuArrow",zC=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ee(n);return d.jsx(MC,{...o,...r,ref:t})});zC.displayName=UC;var KC="DropdownMenuSubTrigger",qC=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ee(n);return d.jsx(RC,{...o,...r,ref:t})});qC.displayName=KC;var XC="DropdownMenuSubContent",ZC=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ee(n);return d.jsx(PC,{...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)"}})});ZC.displayName=XC;var QC=Eu,JC=Ru,e0=Pu,t0=Ou,n0=Iu,r0=Du;const Tu=l.forwardRef(({className:e,children:t,items:n,align:r="start",variant:o="default",isDisabled:a=!1,...i},s)=>d.jsxs(QC,{children:[d.jsx(JC,{asChild:!0,children:d.jsxs($e,{ref:s,className:k("flex items-center gap-1",e),isDisabled:a,variant:o,...i,children:[t,d.jsx(qo,{className:"h-4 w-4"})]})}),d.jsx(e0,{children:d.jsx(t0,{align:r,className:`z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover px-1 py-1
|
|
166
|
+
focus:ring-offset-0`),range_start:"rounded-l-full aria-selected:bg-accent [&>button]:bg-primary [&>button]:text-primary-foreground",range_end:"rounded-r-full aria-selected:bg-accent [&>button]:bg-primary [&>button]:text-primary-foreground",selected:(r==null?void 0:r.mode)!=="range"?"[&>button]:bg-primary [&>button]:text-primary-foreground":"",today:"[&>button]:rounded-l-full [&>button]:rounded-r-full [&>button]:bg-accent [&>button]:text-accent-foreground",outside:"day-outside text-muted-foreground opacity-50",disabled:"text-muted-foreground opacity-50",range_middle:"first:rounded-l-md last:rounded-r-md aria-selected:bg-accent aria-selected:text-accent-foreground",hidden:"invisible",...t},components:w(),defaultMonth:x,month:i,showOutsideDays:n,onMonthChange:s,...r,disableNavigation:o!=="default"})}function Ir(e){const t=l.useRef({value:e,previous:e});return l.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}var Dr="Checkbox",[Sw,JN]=ve(Dr),[Nw,Ew]=Sw(Dr),Ol=l.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:r,checked:o,defaultChecked:a,required:i,disabled:s,value:c="on",onCheckedChange:u,form:f,...m}=e,[p,h]=l.useState(null),y=q(t,S=>h(S)),g=l.useRef(!1),v=p?f||!!p.closest("form"):!0,[w,x]=Ce({prop:o,defaultProp:a??!1,onChange:u,caller:Dr}),b=l.useRef(w);return l.useEffect(()=>{const S=p==null?void 0:p.form;if(S){const C=()=>x(b.current);return S.addEventListener("reset",C),()=>S.removeEventListener("reset",C)}},[p,x]),d.jsxs(Nw,{scope:n,state:w,disabled:s,children:[d.jsx(V.button,{type:"button",role:"checkbox","aria-checked":pt(w)?"mixed":w,"aria-required":i,"data-state":Al(w),"data-disabled":s?"":void 0,disabled:s,value:c,...m,ref:y,onKeyDown:I(e.onKeyDown,S=>{S.key==="Enter"&&S.preventDefault()}),onClick:I(e.onClick,S=>{x(C=>pt(C)?!0:!C),v&&(g.current=S.isPropagationStopped(),g.current||S.stopPropagation())})}),v&&d.jsx(Tl,{control:p,bubbles:!g.current,name:r,value:c,checked:w,required:i,disabled:s,form:f,style:{transform:"translateX(-100%)"},defaultChecked:pt(a)?!1:a})]})});Ol.displayName=Dr;var Il="CheckboxIndicator",Dl=l.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...o}=e,a=Ew(Il,n);return d.jsx(De,{present:r||pt(a.state)||a.state===!0,children:d.jsx(V.span,{"data-state":Al(a.state),"data-disabled":a.disabled?"":void 0,...o,ref:t,style:{pointerEvents:"none",...e.style}})})});Dl.displayName=Il;var Mw="CheckboxBubbleInput",Tl=l.forwardRef(({__scopeCheckbox:e,control:t,checked:n,bubbles:r=!0,defaultChecked:o,...a},i)=>{const s=l.useRef(null),c=q(s,i),u=Ir(n),f=Tn(t);l.useEffect(()=>{const p=s.current;if(!p)return;const h=window.HTMLInputElement.prototype,g=Object.getOwnPropertyDescriptor(h,"checked").set;if(u!==n&&g){const v=new Event("click",{bubbles:r});p.indeterminate=pt(n),g.call(p,pt(n)?!1:n),p.dispatchEvent(v)}},[u,n,r]);const m=l.useRef(pt(n)?!1:n);return d.jsx(V.input,{type:"checkbox","aria-hidden":!0,defaultChecked:o??m.current,...a,tabIndex:-1,ref:c,style:{...a.style,...f,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});Tl.displayName=Mw;function pt(e){return e==="indeterminate"}function Al(e){return pt(e)?"indeterminate":e?"checked":"unchecked"}var Tr=Ol,Rw=Dl;const _l=l.forwardRef(({id:e,label:t,description:n,isChecked:r,isDisabled:o,className:a,"aria-label":i,...s},c)=>{const u=Oe({isDisabled:o}),{ariaProps:f,labelId:m,descriptionId:p}=It({label:t,description:n,"aria-label":i}),h=()=>t?typeof t=="string"?d.jsx("span",{className:"font-medium",id:m,children:t}):d.jsx("span",{id:m,children:t}):null;return d.jsxs("div",{className:k("relative",r?k(ae.button,Ke({variant:"primary"})):k(ae.button,Ke({variant:"input"})),o&&"pointer-events-none cursor-not-allowed opacity-50",a),children:[d.jsx(Tr,{ref:c,checked:r,className:"absolute inset-0 opacity-0",id:e,...f,...s,...u}),d.jsxs("div",{className:"flex items-center gap-2",children:[h(),n?d.jsx("span",{className:"text-sm text-muted-foreground",id:p,children:n}):null]})]})});_l.displayName="CheckboxButton";var Pw="Label",jl=l.forwardRef((e,t)=>d.jsx(V.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())}}));jl.displayName=Pw;var Fl=jl;const nn=l.forwardRef(({className:e,...t},n)=>d.jsx(Fl,{ref:n,className:k(ae.text.label,e),...t}));nn.displayName=Fl.displayName;const $l="peer h-5 w-5 shrink-0 rounded-sm border-2 border-gray-500 ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:border-primary-400 data-[state=checked]:bg-primary-400 data-[state=checked]:text-white",Ll=l.forwardRef(({id:e,label:t,description:n,isChecked:r,isDisabled:o,className:a,"aria-label":i,...s},c)=>{const u=Oe({isDisabled:o}),{ariaProps:f,labelId:m,descriptionId:p}=It({label:t,description:n,"aria-label":i});return d.jsxs("div",{className:k("flex items-start gap-2",o&&"cursor-not-allowed opacity-50 [&>*]:cursor-not-allowed"),children:[d.jsx(Tr,{ref:c,checked:r,className:k(ae.focusRingVisible,ae.focusRingVisibleSm,$l,a),id:e,...s,...u,...f,children:d.jsx(Rw,{className:k("flex items-center justify-center text-current"),children:d.jsx(Ot,{className:"h-4 w-4",strokeWidth:3})})}),d.jsxs("div",{className:"mt-[3px] flex flex-col gap-1",children:[t?typeof t=="string"?d.jsx(nn,{htmlFor:e,id:m,children:t}):d.jsx("div",{id:m,children:t}):null,n?d.jsx("p",{className:"text-sm text-muted-foreground",id:p,children:n}):null]})]})});Ll.displayName="CheckboxDefault";const Wl=l.forwardRef(({id:e,label:t,description:n,isChecked:r,isDisabled:o,className:a,"aria-label":i,...s},c)=>{const u=Oe({isDisabled:o}),{ariaProps:f,labelId:m,descriptionId:p}=It({label:t,description:n,"aria-label":i}),h=()=>t?typeof t=="string"?d.jsx("div",{className:"font-medium",id:m,children:t}):d.jsx("div",{id:m,children:t}):null;return d.jsxs("div",{className:k("relative rounded-lg border-2 border-muted bg-popover px-4 py-4",r&&"border-primary-400",o?"cursor-not-allowed opacity-50 [&_*]:cursor-not-allowed":"cursor-pointer hover:bg-accent hover:text-accent-foreground",a),children:[d.jsx(Tr,{ref:c,checked:r,className:"absolute inset-0 opacity-0",id:e,...f,...s,...u}),d.jsxs("div",{className:"flex items-start gap-3",children:[d.jsx("div",{className:k($l,"pointer-events-none mt-1",r&&"border-primary-400 bg-primary-400"),children:r?d.jsx("div",{className:"flex h-full w-full items-center justify-center",children:d.jsx(Ot,{className:"h-4 w-4 text-white",strokeWidth:3})}):null}),d.jsxs("div",{className:"pointer-events-none space-y-1",children:[h(),n?d.jsx("p",{className:"text-sm text-muted-foreground",id:p,children:n}):null]})]})]})});Wl.displayName="CheckboxTile";const Sa=l.forwardRef(({className:e,label:t,description:n,id:r,"aria-label":o,isChecked:a=!1,isDisabled:i=!1,variant:s="default",...c},u)=>{kl("Checkbox",t,o);let f=Ll;return s==="button"?f=_l:s==="tile"&&(f=Wl),d.jsx(f,{ref:u,"aria-label":o,className:e,description:n,id:r,isChecked:a,isDisabled:i,label:t,...c})});Sa.displayName=Tr.displayName;const Bl=l.forwardRef(({options:e,value:t,onChange:n,className:r,columns:o=2,orientation:a="vertical",variant:i="default",...s},c)=>{const u=Qo({variant:i,orientation:a,columns:o});return d.jsx("div",{ref:c,className:k(u,r),...s,children:e.map(f=>d.jsx(Sa,{description:f.description,id:f.id,isChecked:t.includes(f.id),label:f.label,variant:i,onCheckedChange:m=>{n(m?[...t,f.id]:t.filter(p=>p!==f.id))}},f.id))})});Bl.displayName="CheckboxGroup";const Vl=E.forwardRef(({options:e,value:t,onChange:n,placeholder:r="Select an item...",searchPlaceholder:o="Search items...",emptyMessage:a="No items found",className:i,listClassName:s,zIndex:c,isDisabled:u=!1,name:f,required:m,autoFocus:p,...h},y)=>{var x;const[g,v]=E.useState(!1),w=Ye("dropdown",c);return d.jsxs(d.Fragment,{children:[f||m?d.jsx("input",{name:f,required:m,type:"hidden",value:t}):null,d.jsxs(Jt,{open:g,onOpenChange:v,children:[d.jsx(en,{asChild:!0,children:d.jsxs($e,{ref:y,"aria-expanded":g,autoFocus:p,className:k("w-full justify-between px-3",!t&&"text-muted-foreground",i),isDisabled:u,role:"combobox",variant:"input",...h,children:[t?(x=e.find(b=>b.value===t))==null?void 0:x.label:r,d.jsx(Zo,{className:"ml-2 h-4 w-4 shrink-0 opacity-50"})]})}),d.jsx(Dt,{align:"start",className:"w-[--radix-popover-trigger-width] px-0 py-0",zIndex:w,children:d.jsxs(xr,{children:[d.jsx(Cr,{placeholder:o}),d.jsxs(Nr,{className:k("max-h-[16.5rem] overflow-y-auto",s),children:[d.jsx(sa,{children:a}),d.jsx(wr,{children:e.map(b=>d.jsxs(Sr,{value:b.value,onSelect:S=>{n(S===t?"":S),v(!1)},children:[d.jsx(Ot,{className:k("mr-2 h-4 w-4",t===b.value?"opacity-100":"opacity-0")}),b.label]},b.value))})]})]})})]})]})});Vl.displayName="Combobox";const Yl=E.forwardRef(({value:e,startMonth:t,endMonth:n,onChange:r,placeholder:o="Pick a date",className:a,zIndex:i,isDisabled:s=!1,name:c,required:u,autoFocus:f,...m},p)=>{const[h,y]=E.useState(!1),g=Ye("popover",i),v=w=>{r(w),y(!1)};return d.jsxs(d.Fragment,{children:[c||u?d.jsx("input",{name:c,required:u,type:"hidden",value:e?e.toISOString().split("T")[0]:""}):null,d.jsxs(Jt,{open:h,onOpenChange:y,children:[d.jsx(en,{asChild:!0,children:d.jsxs($e,{ref:p,autoFocus:f,className:k("w-full justify-start px-3 text-left font-normal",!e&&"text-muted-foreground",a),"data-component":"date-picker",isDisabled:s,variant:"input",...m,children:[d.jsx(gi,{className:"mr-2 h-4 w-4"}),e?gn(e,"LLLL dd, y"):d.jsx("span",{children:o})]})}),d.jsx(Dt,{align:"start",className:"w-auto px-0 py-0",zIndex:g,children:d.jsx(Ca,{autoFocus:!0,endMonth:n,mode:"single",selected:e,startMonth:t,onSelect:v})})]})]})});Yl.displayName="DatePicker";const Hl=l.forwardRef(({value:e,onChange:t,placeholder:n={from:"Pick start date",to:"Pick end date"},className:r,zIndex:o,isDisabled:a=!1,name:i,required:s,autoFocus:c,...u},f)=>{const m=Ye("popover",o),p=y=>{const{from:g,to:v}=e;if(!g)return t({from:y,to:void 0});if(y<g)return t({from:y,to:void 0});if(g&&v)return t({from:y,to:void 0});if(y>g)return t({from:g,to:y});if(y.getTime()===g.getTime())return t({from:void 0,to:void 0})},h=y=>y.from?y.to?`${y.from.toISOString().split("T")[0]},${y.to.toISOString().split("T")[0]}`:y.from.toISOString().split("T")[0]:"";return d.jsxs("div",{className:k("grid gap-2",r),children:[i||s?d.jsx("input",{name:i,required:s,type:"hidden",value:h(e)}):null,d.jsxs(Jt,{children:[d.jsx(en,{asChild:!0,children:d.jsxs($e,{ref:f,autoFocus:c,className:k("w-full justify-start px-3 text-left font-normal",!e.from&&!e.to&&"text-muted-foreground"),"data-component":"date-range-picker",id:"date",isDisabled:a,variant:"input",...u,children:[d.jsx(gi,{className:"mr-2 h-4 w-4"}),e.from?e.to?d.jsxs(d.Fragment,{children:[gn(e.from,"LLLL dd, y")," - ",gn(e.to,"LLLL dd, y")]}):gn(e.from,"LLLL dd, y"):d.jsx("span",{children:n.from})]})}),d.jsx(Dt,{align:"start",className:"w-auto px-0 py-0",zIndex:m,children:d.jsx(Ca,{autoFocus:!0,defaultMonth:e.from,mode:"range",modifiers:{today:()=>!1},numberOfMonths:2,selected:{from:e.from,to:e.to},showOutsideDays:!1,onDayClick:p,onSelect:y=>{y&&t(y)}})})]})]})});Hl.displayName="DateRangePicker";const Gl=l.forwardRef(({className:e,...t},n)=>d.jsx(Ji,{ref:n,className:k(ae.text.hint,e),...t}));Gl.displayName=Ji.displayName;const Ul=({className:e,...t})=>d.jsx("div",{className:k("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Ul.displayName="DialogFooter";const zl=({className:e,...t})=>d.jsx("div",{className:k("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});zl.displayName="DialogHeader";const Kl=l.forwardRef(({className:e,...t},n)=>d.jsx(Qi,{ref:n,className:k(ae.text.title,"mr-8 leading-none tracking-tight",e),...t}));Kl.displayName=Qi.displayName;var ho="rovingFocusGroup.onEntryFocus",kw={bubbles:!1,cancelable:!0},$n="RovingFocusGroup",[ko,ql,Ow]=Mn($n),[Iw,Xl]=ve($n,[Ow]),[Dw,Tw]=Iw($n),Zl=l.forwardRef((e,t)=>d.jsx(ko.Provider,{scope:e.__scopeRovingFocusGroup,children:d.jsx(ko.Slot,{scope:e.__scopeRovingFocusGroup,children:d.jsx(Aw,{...e,ref:t})})}));Zl.displayName=$n;var Aw=l.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:a,currentTabStopId:i,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:c,onEntryFocus:u,preventScrollOnEntryFocus:f=!1,...m}=e,p=l.useRef(null),h=q(t,p),y=xt(a),[g,v]=Ce({prop:i,defaultProp:s??null,onChange:c,caller:$n}),[w,x]=l.useState(!1),b=Ne(u),S=ql(n),C=l.useRef(!1),[M,N]=l.useState(0);return l.useEffect(()=>{const R=p.current;if(R)return R.addEventListener(ho,b),()=>R.removeEventListener(ho,b)},[b]),d.jsx(Dw,{scope:n,orientation:r,dir:y,loop:o,currentTabStopId:g,onItemFocus:l.useCallback(R=>v(R),[v]),onItemShiftTab:l.useCallback(()=>x(!0),[]),onFocusableItemAdd:l.useCallback(()=>N(R=>R+1),[]),onFocusableItemRemove:l.useCallback(()=>N(R=>R-1),[]),children:d.jsx(V.div,{tabIndex:w||M===0?-1:0,"data-orientation":r,...m,ref:h,style:{outline:"none",...e.style},onMouseDown:I(e.onMouseDown,()=>{C.current=!0}),onFocus:I(e.onFocus,R=>{const _=!C.current;if(R.target===R.currentTarget&&_&&!w){const A=new CustomEvent(ho,kw);if(R.currentTarget.dispatchEvent(A),!A.defaultPrevented){const $=S().filter(j=>j.focusable),D=$.find(j=>j.active),Y=$.find(j=>j.id===g),J=[D,Y,...$].filter(Boolean).map(j=>j.ref.current);eu(J,f)}}C.current=!1}),onBlur:I(e.onBlur,()=>x(!1))})})}),Ql="RovingFocusGroupItem",Jl=l.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:a,children:i,...s}=e,c=he(),u=a||c,f=Tw(Ql,n),m=f.currentTabStopId===u,p=ql(n),{onFocusableItemAdd:h,onFocusableItemRemove:y,currentTabStopId:g}=f;return l.useEffect(()=>{if(r)return h(),()=>y()},[r,h,y]),d.jsx(ko.ItemSlot,{scope:n,id:u,focusable:r,active:o,children:d.jsx(V.span,{tabIndex:m?0:-1,"data-orientation":f.orientation,...s,ref:t,onMouseDown:I(e.onMouseDown,v=>{r?f.onItemFocus(u):v.preventDefault()}),onFocus:I(e.onFocus,()=>f.onItemFocus(u)),onKeyDown:I(e.onKeyDown,v=>{if(v.key==="Tab"&&v.shiftKey){f.onItemShiftTab();return}if(v.target!==v.currentTarget)return;const w=Fw(v,f.orientation,f.dir);if(w!==void 0){if(v.metaKey||v.ctrlKey||v.altKey||v.shiftKey)return;v.preventDefault();let b=p().filter(S=>S.focusable).map(S=>S.ref.current);if(w==="last")b.reverse();else if(w==="prev"||w==="next"){w==="prev"&&b.reverse();const S=b.indexOf(v.currentTarget);b=f.loop?$w(b,S+1):b.slice(S+1)}setTimeout(()=>eu(b))}}),children:typeof i=="function"?i({isCurrentTabStop:m,hasTabStop:g!=null}):i})})});Jl.displayName=Ql;var _w={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function jw(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Fw(e,t,n){const r=jw(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return _w[r]}function eu(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function $w(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var Lw=Zl,Ww=Jl,Oo=["Enter"," "],Bw=["ArrowDown","PageUp","Home"],tu=["ArrowUp","PageDown","End"],Vw=[...Bw,...tu],Yw={ltr:[...Oo,"ArrowRight"],rtl:[...Oo,"ArrowLeft"]},Hw={ltr:["ArrowLeft"],rtl:["ArrowRight"]},Ln="Menu",[Cn,Gw,Uw]=Mn(Ln),[Tt,nu]=ve(Ln,[Uw,Qt,Xl]),Ar=Qt(),ru=Xl(),[zw,At]=Tt(Ln),[Kw,Wn]=Tt(Ln),ou=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:o,onOpenChange:a,modal:i=!0}=e,s=Ar(t),[c,u]=l.useState(null),f=l.useRef(!1),m=Ne(a),p=xt(o);return l.useEffect(()=>{const h=()=>{f.current=!0,document.addEventListener("pointerdown",y,{capture:!0,once:!0}),document.addEventListener("pointermove",y,{capture:!0,once:!0})},y=()=>f.current=!1;return document.addEventListener("keydown",h,{capture:!0}),()=>{document.removeEventListener("keydown",h,{capture:!0}),document.removeEventListener("pointerdown",y,{capture:!0}),document.removeEventListener("pointermove",y,{capture:!0})}},[]),d.jsx(ga,{...s,children:d.jsx(zw,{scope:t,open:n,onOpenChange:m,content:c,onContentChange:u,children:d.jsx(Kw,{scope:t,onClose:l.useCallback(()=>m(!1),[m]),isUsingKeyboardRef:f,dir:p,modal:i,children:r})})})};ou.displayName=Ln;var qw="MenuAnchor",Na=l.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=Ar(n);return d.jsx(Pr,{...o,...r,ref:t})});Na.displayName=qw;var Ea="MenuPortal",[Xw,au]=Tt(Ea,{forceMount:void 0}),su=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:o}=e,a=At(Ea,t);return d.jsx(Xw,{scope:t,forceMount:n,children:d.jsx(De,{present:n||a.open,children:d.jsx(kn,{asChild:!0,container:o,children:r})})})};su.displayName=Ea;var Ie="MenuContent",[Zw,Ma]=Tt(Ie),iu=l.forwardRef((e,t)=>{const n=au(Ie,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,a=At(Ie,e.__scopeMenu),i=Wn(Ie,e.__scopeMenu);return d.jsx(Cn.Provider,{scope:e.__scopeMenu,children:d.jsx(De,{present:r||a.open,children:d.jsx(Cn.Slot,{scope:e.__scopeMenu,children:i.modal?d.jsx(Qw,{...o,ref:t}):d.jsx(Jw,{...o,ref:t})})})})}),Qw=l.forwardRef((e,t)=>{const n=At(Ie,e.__scopeMenu),r=l.useRef(null),o=q(t,r);return l.useEffect(()=>{const a=r.current;if(a)return vr(a)},[]),d.jsx(Ra,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:I(e.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),Jw=l.forwardRef((e,t)=>{const n=At(Ie,e.__scopeMenu);return d.jsx(Ra,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),eC=ht("MenuContent.ScrollLock"),Ra=l.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:o,onOpenAutoFocus:a,onCloseAutoFocus:i,disableOutsidePointerEvents:s,onEntryFocus:c,onEscapeKeyDown:u,onPointerDownOutside:f,onFocusOutside:m,onInteractOutside:p,onDismiss:h,disableOutsideScroll:y,...g}=e,v=At(Ie,n),w=Wn(Ie,n),x=Ar(n),b=ru(n),S=Gw(n),[C,M]=l.useState(null),N=l.useRef(null),R=q(t,N,v.onContentChange),_=l.useRef(0),A=l.useRef(""),$=l.useRef(0),D=l.useRef(null),Y=l.useRef("right"),H=l.useRef(0),J=y?On:l.Fragment,j=y?{as:eC,allowPinchZoom:!0}:void 0,X=O=>{var T,Q;const Z=A.current+O,te=S().filter(K=>!K.disabled),P=document.activeElement,W=(T=te.find(K=>K.ref.current===P))==null?void 0:T.textValue,G=te.map(K=>K.textValue),L=fC(G,Z,W),z=(Q=te.find(K=>K.textValue===L))==null?void 0:Q.ref.current;(function K(B){A.current=B,window.clearTimeout(_.current),B!==""&&(_.current=window.setTimeout(()=>K(""),1e3))})(Z),z&&setTimeout(()=>z.focus())};l.useEffect(()=>()=>window.clearTimeout(_.current),[]),hr();const F=l.useCallback(O=>{var te,P;return Y.current===((te=D.current)==null?void 0:te.side)&&pC(O,(P=D.current)==null?void 0:P.area)},[]);return d.jsx(Zw,{scope:n,searchRef:A,onItemEnter:l.useCallback(O=>{F(O)&&O.preventDefault()},[F]),onItemLeave:l.useCallback(O=>{var Z;F(O)||((Z=N.current)==null||Z.focus(),M(null))},[F]),onTriggerLeave:l.useCallback(O=>{F(O)&&O.preventDefault()},[F]),pointerGraceTimerRef:$,onPointerGraceIntentChange:l.useCallback(O=>{D.current=O},[]),children:d.jsx(J,{...j,children:d.jsx(Pn,{asChild:!0,trapped:o,onMountAutoFocus:I(a,O=>{var Z;O.preventDefault(),(Z=N.current)==null||Z.focus({preventScroll:!0})}),onUnmountAutoFocus:i,children:d.jsx(Rn,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:u,onPointerDownOutside:f,onFocusOutside:m,onInteractOutside:p,onDismiss:h,children:d.jsx(Lw,{asChild:!0,...b,dir:w.dir,orientation:"vertical",loop:r,currentTabStopId:C,onCurrentTabStopIdChange:M,onEntryFocus:I(c,O=>{w.isUsingKeyboardRef.current||O.preventDefault()}),preventScrollOnEntryFocus:!0,children:d.jsx(va,{role:"menu","aria-orientation":"vertical","data-state":Su(v.open),"data-radix-menu-content":"",dir:w.dir,...x,...g,ref:R,style:{outline:"none",...g.style},onKeyDown:I(g.onKeyDown,O=>{const te=O.target.closest("[data-radix-menu-content]")===O.currentTarget,P=O.ctrlKey||O.altKey||O.metaKey,W=O.key.length===1;te&&(O.key==="Tab"&&O.preventDefault(),!P&&W&&X(O.key));const G=N.current;if(O.target!==G||!Vw.includes(O.key))return;O.preventDefault();const z=S().filter(T=>!T.disabled).map(T=>T.ref.current);tu.includes(O.key)&&z.reverse(),uC(z)}),onBlur:I(e.onBlur,O=>{O.currentTarget.contains(O.target)||(window.clearTimeout(_.current),A.current="")}),onPointerMove:I(e.onPointerMove,Sn(O=>{const Z=O.target,te=H.current!==O.clientX;if(O.currentTarget.contains(Z)&&te){const P=O.clientX>H.current?"right":"left";Y.current=P,H.current=O.clientX}}))})})})})})})});iu.displayName=Ie;var tC="MenuGroup",Pa=l.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return d.jsx(V.div,{role:"group",...r,ref:t})});Pa.displayName=tC;var nC="MenuLabel",cu=l.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return d.jsx(V.div,{...r,ref:t})});cu.displayName=nC;var cr="MenuItem",$s="menu.itemSelect",_r=l.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...o}=e,a=l.useRef(null),i=Wn(cr,e.__scopeMenu),s=Ma(cr,e.__scopeMenu),c=q(t,a),u=l.useRef(!1),f=()=>{const m=a.current;if(!n&&m){const p=new CustomEvent($s,{bubbles:!0,cancelable:!0});m.addEventListener($s,h=>r==null?void 0:r(h),{once:!0}),Zs(m,p),p.defaultPrevented?u.current=!1:i.onClose()}};return d.jsx(lu,{...o,ref:c,disabled:n,onClick:I(e.onClick,f),onPointerDown:m=>{var p;(p=e.onPointerDown)==null||p.call(e,m),u.current=!0},onPointerUp:I(e.onPointerUp,m=>{var p;u.current||(p=m.currentTarget)==null||p.click()}),onKeyDown:I(e.onKeyDown,m=>{const p=s.searchRef.current!=="";n||p&&m.key===" "||Oo.includes(m.key)&&(m.currentTarget.click(),m.preventDefault())})})});_r.displayName=cr;var lu=l.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:o,...a}=e,i=Ma(cr,n),s=ru(n),c=l.useRef(null),u=q(t,c),[f,m]=l.useState(!1),[p,h]=l.useState("");return l.useEffect(()=>{const y=c.current;y&&h((y.textContent??"").trim())},[a.children]),d.jsx(Cn.ItemSlot,{scope:n,disabled:r,textValue:o??p,children:d.jsx(Ww,{asChild:!0,...s,focusable:!r,children:d.jsx(V.div,{role:"menuitem","data-highlighted":f?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...a,ref:u,onPointerMove:I(e.onPointerMove,Sn(y=>{r?i.onItemLeave(y):(i.onItemEnter(y),y.defaultPrevented||y.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:I(e.onPointerLeave,Sn(y=>i.onItemLeave(y))),onFocus:I(e.onFocus,()=>m(!0)),onBlur:I(e.onBlur,()=>m(!1))})})})}),rC="MenuCheckboxItem",uu=l.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...o}=e;return d.jsx(hu,{scope:e.__scopeMenu,checked:n,children:d.jsx(_r,{role:"menuitemcheckbox","aria-checked":lr(n)?"mixed":n,...o,ref:t,"data-state":Oa(n),onSelect:I(o.onSelect,()=>r==null?void 0:r(lr(n)?!0:!n),{checkForDefaultPrevented:!1})})})});uu.displayName=rC;var du="MenuRadioGroup",[oC,aC]=Tt(du,{value:void 0,onValueChange:()=>{}}),fu=l.forwardRef((e,t)=>{const{value:n,onValueChange:r,...o}=e,a=Ne(r);return d.jsx(oC,{scope:e.__scopeMenu,value:n,onValueChange:a,children:d.jsx(Pa,{...o,ref:t})})});fu.displayName=du;var mu="MenuRadioItem",pu=l.forwardRef((e,t)=>{const{value:n,...r}=e,o=aC(mu,e.__scopeMenu),a=n===o.value;return d.jsx(hu,{scope:e.__scopeMenu,checked:a,children:d.jsx(_r,{role:"menuitemradio","aria-checked":a,...r,ref:t,"data-state":Oa(a),onSelect:I(r.onSelect,()=>{var i;return(i=o.onValueChange)==null?void 0:i.call(o,n)},{checkForDefaultPrevented:!1})})})});pu.displayName=mu;var ka="MenuItemIndicator",[hu,sC]=Tt(ka,{checked:!1}),gu=l.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...o}=e,a=sC(ka,n);return d.jsx(De,{present:r||lr(a.checked)||a.checked===!0,children:d.jsx(V.span,{...o,ref:t,"data-state":Oa(a.checked)})})});gu.displayName=ka;var iC="MenuSeparator",vu=l.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return d.jsx(V.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});vu.displayName=iC;var cC="MenuArrow",yu=l.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=Ar(n);return d.jsx(ya,{...o,...r,ref:t})});yu.displayName=cC;var lC="MenuSub",[eE,bu]=Tt(lC),mn="MenuSubTrigger",xu=l.forwardRef((e,t)=>{const n=At(mn,e.__scopeMenu),r=Wn(mn,e.__scopeMenu),o=bu(mn,e.__scopeMenu),a=Ma(mn,e.__scopeMenu),i=l.useRef(null),{pointerGraceTimerRef:s,onPointerGraceIntentChange:c}=a,u={__scopeMenu:e.__scopeMenu},f=l.useCallback(()=>{i.current&&window.clearTimeout(i.current),i.current=null},[]);return l.useEffect(()=>f,[f]),l.useEffect(()=>{const m=s.current;return()=>{window.clearTimeout(m),c(null)}},[s,c]),d.jsx(Na,{asChild:!0,...u,children:d.jsx(lu,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":o.contentId,"data-state":Su(n.open),...e,ref:Xe(t,o.onTriggerChange),onClick:m=>{var p;(p=e.onClick)==null||p.call(e,m),!(e.disabled||m.defaultPrevented)&&(m.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:I(e.onPointerMove,Sn(m=>{a.onItemEnter(m),!m.defaultPrevented&&!e.disabled&&!n.open&&!i.current&&(a.onPointerGraceIntentChange(null),i.current=window.setTimeout(()=>{n.onOpenChange(!0),f()},100))})),onPointerLeave:I(e.onPointerLeave,Sn(m=>{var h,y;f();const p=(h=n.content)==null?void 0:h.getBoundingClientRect();if(p){const g=(y=n.content)==null?void 0:y.dataset.side,v=g==="right",w=v?-5:5,x=p[v?"left":"right"],b=p[v?"right":"left"];a.onPointerGraceIntentChange({area:[{x:m.clientX+w,y:m.clientY},{x,y:p.top},{x:b,y:p.top},{x:b,y:p.bottom},{x,y:p.bottom}],side:g}),window.clearTimeout(s.current),s.current=window.setTimeout(()=>a.onPointerGraceIntentChange(null),300)}else{if(a.onTriggerLeave(m),m.defaultPrevented)return;a.onPointerGraceIntentChange(null)}})),onKeyDown:I(e.onKeyDown,m=>{var h;const p=a.searchRef.current!=="";e.disabled||p&&m.key===" "||Yw[r.dir].includes(m.key)&&(n.onOpenChange(!0),(h=n.content)==null||h.focus(),m.preventDefault())})})})});xu.displayName=mn;var wu="MenuSubContent",Cu=l.forwardRef((e,t)=>{const n=au(Ie,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,a=At(Ie,e.__scopeMenu),i=Wn(Ie,e.__scopeMenu),s=bu(wu,e.__scopeMenu),c=l.useRef(null),u=q(t,c);return d.jsx(Cn.Provider,{scope:e.__scopeMenu,children:d.jsx(De,{present:r||a.open,children:d.jsx(Cn.Slot,{scope:e.__scopeMenu,children:d.jsx(Ra,{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 m;i.isUsingKeyboardRef.current&&((m=c.current)==null||m.focus()),f.preventDefault()},onCloseAutoFocus:f=>f.preventDefault(),onFocusOutside:I(e.onFocusOutside,f=>{f.target!==s.trigger&&a.onOpenChange(!1)}),onEscapeKeyDown:I(e.onEscapeKeyDown,f=>{i.onClose(),f.preventDefault()}),onKeyDown:I(e.onKeyDown,f=>{var h;const m=f.currentTarget.contains(f.target),p=Hw[i.dir].includes(f.key);m&&p&&(a.onOpenChange(!1),(h=s.trigger)==null||h.focus(),f.preventDefault())})})})})})});Cu.displayName=wu;function Su(e){return e?"open":"closed"}function lr(e){return e==="indeterminate"}function Oa(e){return lr(e)?"indeterminate":e?"checked":"unchecked"}function uC(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function dC(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function fC(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=dC(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 mC(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,m=c.x,p=c.y;f>r!=p>r&&n<(m-u)*(r-f)/(p-f)+u&&(o=!o)}return o}function pC(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return mC(n,t)}function Sn(e){return t=>t.pointerType==="mouse"?e(t):void 0}var hC=ou,gC=Na,vC=su,yC=iu,bC=Pa,xC=cu,wC=_r,CC=uu,SC=fu,NC=pu,EC=gu,MC=vu,RC=yu,PC=xu,kC=Cu,jr="DropdownMenu",[OC,tE]=ve(jr,[nu]),Ee=nu(),[IC,Nu]=OC(jr),Eu=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:o,defaultOpen:a,onOpenChange:i,modal:s=!0}=e,c=Ee(t),u=l.useRef(null),[f,m]=Ce({prop:o,defaultProp:a??!1,onChange:i,caller:jr});return d.jsx(IC,{scope:t,triggerId:he(),triggerRef:u,contentId:he(),open:f,onOpenChange:m,onOpenToggle:l.useCallback(()=>m(p=>!p),[m]),modal:s,children:d.jsx(hC,{...c,open:f,onOpenChange:m,dir:r,modal:s,children:n})})};Eu.displayName=jr;var Mu="DropdownMenuTrigger",Ru=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...o}=e,a=Nu(Mu,n),i=Ee(n);return d.jsx(gC,{asChild:!0,...i,children:d.jsx(V.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:Xe(t,a.triggerRef),onPointerDown:I(e.onPointerDown,s=>{!r&&s.button===0&&s.ctrlKey===!1&&(a.onOpenToggle(),a.open||s.preventDefault())}),onKeyDown:I(e.onKeyDown,s=>{r||(["Enter"," "].includes(s.key)&&a.onOpenToggle(),s.key==="ArrowDown"&&a.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(s.key)&&s.preventDefault())})})})});Ru.displayName=Mu;var DC="DropdownMenuPortal",Pu=e=>{const{__scopeDropdownMenu:t,...n}=e,r=Ee(t);return d.jsx(vC,{...r,...n})};Pu.displayName=DC;var ku="DropdownMenuContent",Ou=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Nu(ku,n),a=Ee(n),i=l.useRef(!1);return d.jsx(yC,{id:o.contentId,"aria-labelledby":o.triggerId,...a,...r,ref:t,onCloseAutoFocus:I(e.onCloseAutoFocus,s=>{var c;i.current||(c=o.triggerRef.current)==null||c.focus(),i.current=!1,s.preventDefault()}),onInteractOutside:I(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)"}})});Ou.displayName=ku;var TC="DropdownMenuGroup",AC=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ee(n);return d.jsx(bC,{...o,...r,ref:t})});AC.displayName=TC;var _C="DropdownMenuLabel",jC=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ee(n);return d.jsx(xC,{...o,...r,ref:t})});jC.displayName=_C;var FC="DropdownMenuItem",Iu=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ee(n);return d.jsx(wC,{...o,...r,ref:t})});Iu.displayName=FC;var $C="DropdownMenuCheckboxItem",LC=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ee(n);return d.jsx(CC,{...o,...r,ref:t})});LC.displayName=$C;var WC="DropdownMenuRadioGroup",BC=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ee(n);return d.jsx(SC,{...o,...r,ref:t})});BC.displayName=WC;var VC="DropdownMenuRadioItem",YC=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ee(n);return d.jsx(NC,{...o,...r,ref:t})});YC.displayName=VC;var HC="DropdownMenuItemIndicator",GC=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ee(n);return d.jsx(EC,{...o,...r,ref:t})});GC.displayName=HC;var UC="DropdownMenuSeparator",Du=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ee(n);return d.jsx(MC,{...o,...r,ref:t})});Du.displayName=UC;var zC="DropdownMenuArrow",KC=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ee(n);return d.jsx(RC,{...o,...r,ref:t})});KC.displayName=zC;var qC="DropdownMenuSubTrigger",XC=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ee(n);return d.jsx(PC,{...o,...r,ref:t})});XC.displayName=qC;var ZC="DropdownMenuSubContent",QC=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ee(n);return d.jsx(kC,{...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)"}})});QC.displayName=ZC;var JC=Eu,e0=Ru,t0=Pu,n0=Ou,r0=Iu,o0=Du;const Tu=E.memo(({item:e})=>{const{isDisabled:t,onClick:n,icon:r,label:o}=e,a=E.useCallback(i=>{t?(i.preventDefault(),i.stopPropagation()):n==null||n()},[t,n]);return d.jsxs(r0,{"aria-disabled":t,className:k(`relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm
|
|
167
|
+
outline-none transition-colors focus:bg-accent focus:text-accent-foreground`,n&&!t&&"cursor-pointer",t&&"cursor-not-allowed opacity-50"),onClick:a,children:[r?d.jsx("span",{className:"mr-2",children:r}):null,o]})});Tu.displayName="DropdownMenuItem";const Au=l.forwardRef(({className:e,children:t,items:n,align:r="start",variant:o="default",isDisabled:a=!1,...i},s)=>d.jsxs(JC,{children:[d.jsx(e0,{asChild:!0,children:d.jsxs($e,{ref:s,className:k("flex items-center gap-1",e),isDisabled:a,variant:o,...i,children:[t,d.jsx(qo,{className:"h-4 w-4"})]})}),d.jsx(t0,{children:d.jsx(n0,{align:r,className:`z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover px-1 py-1
|
|
167
168
|
text-popover-foreground shadow-md data-[state=open]:animate-in
|
|
168
169
|
data-[state=closed]:animate-out data-[state=closed]:fade-out-0
|
|
169
170
|
data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95
|
|
170
171
|
data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2
|
|
171
|
-
data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2`,sideOffset:4,children:n.map((c,u)=>c==="separator"?d.jsx(
|
|
172
|
-
text-sm outline-none transition-colors focus:bg-accent
|
|
173
|
-
focus:text-accent-foreground data-[disabled]:pointer-events-none
|
|
174
|
-
data-[disabled]:opacity-50`,c.onClick&&"cursor-pointer"),onClick:c.onClick,children:[c.icon?d.jsx("span",{className:"mr-2",children:c.icon}):null,c.label]},c.label))})})]}));Tu.displayName="DropdownButton";const Au=l.forwardRef(({label:e,labelSlot:t,hintText:n,errorText:r,className:o,children:a,elementId:i,isRequired:s=!1,...c},u)=>{var y;const f=i??((y=a.props)==null?void 0:y.id);if(!f)throw new Error("FormItem must have either an `elementId` prop or an `id` attribute specified on the child element");const m=`form-item-${f}-label`,p=`form-item-${f}-hint`,h=`form-item-${f}-error`;return d.jsxs("div",{ref:u,className:k("space-y-1",o),...c,"data-error":r?"true":void 0,children:[e?d.jsxs("div",{children:[d.jsxs("div",{className:"flex items-center",children:[typeof e=="string"?d.jsxs(nn,{className:"font-bold leading-5",htmlFor:f,id:m,children:[e,s?d.jsx("span",{className:"ml-0.5 text-destructive",children:"*"}):null]}):e,t?d.jsx("div",{className:"ml-2 inline-flex",children:t}):null]}),n?d.jsx("p",{className:k(ae.text.hint,"mb-0 mt-0"),id:p,children:n}):null]}):null,a,r?d.jsx("p",{className:k(ae.text.error,"mb-0 mt-0"),id:h,children:r}):null]})});Au.displayName="FormItem";const _u=E.forwardRef(({src:e,alt:t,fallback:n,isLazy:r=!0,shape:o="square",className:a,onError:i,...s},c)=>{const[u,f]=E.useState(!1),[m,p]=E.useState(!0),h=v=>{f(!0),i==null||i(v)},y=()=>{p(!1)},g={square:"",rounded:"rounded-lg",circle:"rounded-full"};return d.jsxs("div",{className:k("relative overflow-hidden",g[o],a),children:[m?d.jsx("div",{"aria-hidden":"true",className:"absolute inset-0 animate-pulse bg-muted",role:"presentation"}):null,d.jsx("img",{ref:c,alt:t,className:k("h-full w-full object-cover",m&&"invisible"),loading:r?"lazy":"eager",src:u&&n?n:e,onError:h,onLoad:y,...s})]})});_u.displayName="Image";const ju=l.forwardRef(({className:e,type:t,transform:n="none",isDisabled:r=!1,onChange:o,...a},i)=>{const s=Oe({isDisabled:r}),c=u=>{let f=u.target.value;(Array.isArray(n)?n:[n]).forEach(p=>{switch(p){case"uppercase":f=f.toUpperCase();break;case"lowercase":f=f.toLowerCase();break;case"trim":f=f.trim();break}}),u.target.value=f,o&&o(u)};return d.jsx("input",{ref:i,className:k(ae.input,e),type:t,onChange:c,...a,...s})});ju.displayName="Input";const Fu=E.forwardRef(({options:e,value:t,onChange:n,placeholder:r="Select items...",searchPlaceholder:o="Search items...",emptyMessage:a="No items found",className:i,listClassName:s,zIndex:c,isDisabled:u=!1,name:f,required:m,autoFocus:p,...h},y)=>{const[g,v]=E.useState(!1),w=Ye("dropdown",c),x=t.map(N=>{var R;return((R=e.find(_=>_.value===N))==null?void 0:R.label)||N}),b=Oe({isDisabled:u}),S=E.useRef(null);E.useEffect(()=>{p&&S.current&&S.current.focus()},[p]);const C=()=>t.length===0?d.jsx("span",{className:"self-center text-muted-foreground",children:r}):d.jsx("div",{className:"flex flex-1 flex-wrap gap-1",children:x.map((N,R)=>d.jsxs("div",{className:`flex items-center gap-1 rounded-sm bg-secondary px-2 py-0.5 text-sm
|
|
172
|
+
data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2`,sideOffset:4,children:n.map((c,u)=>c==="separator"?d.jsx(o0,{className:"my-1 h-px bg-muted"},`separator-${u}`):d.jsx(Tu,{item:c},c.label))})})]}));Au.displayName="DropdownButton";const _u=l.forwardRef(({label:e,labelSlot:t,hintText:n,errorText:r,className:o,children:a,elementId:i,isRequired:s=!1,...c},u)=>{var y;const f=i??((y=a.props)==null?void 0:y.id);if(!f)throw new Error("FormItem must have either an `elementId` prop or an `id` attribute specified on the child element");const m=`form-item-${f}-label`,p=`form-item-${f}-hint`,h=`form-item-${f}-error`;return d.jsxs("div",{ref:u,className:k("space-y-1",o),...c,"data-error":r?"true":void 0,children:[e?d.jsxs("div",{children:[d.jsxs("div",{className:"flex items-center",children:[typeof e=="string"?d.jsxs(nn,{className:"font-bold leading-5",htmlFor:f,id:m,children:[e,s?d.jsx("span",{className:"ml-0.5 text-destructive",children:"*"}):null]}):e,t?d.jsx("div",{className:"ml-2 inline-flex",children:t}):null]}),n?d.jsx("p",{className:k(ae.text.hint,"mb-0 mt-0"),id:p,children:n}):null]}):null,a,r?d.jsx("p",{className:k(ae.text.error,"mb-0 mt-0"),id:h,children:r}):null]})});_u.displayName="FormItem";const ju=E.forwardRef(({src:e,alt:t,fallback:n,isLazy:r=!0,shape:o="square",className:a,onError:i,...s},c)=>{const[u,f]=E.useState(!1),[m,p]=E.useState(!0),h=v=>{f(!0),i==null||i(v)},y=()=>{p(!1)},g={square:"",rounded:"rounded-lg",circle:"rounded-full"};return d.jsxs("div",{className:k("relative overflow-hidden",g[o],a),children:[m?d.jsx("div",{"aria-hidden":"true",className:"absolute inset-0 animate-pulse bg-muted",role:"presentation"}):null,d.jsx("img",{ref:c,alt:t,className:k("h-full w-full object-cover",m&&"invisible"),loading:r?"lazy":"eager",src:u&&n?n:e,onError:h,onLoad:y,...s})]})});ju.displayName="Image";const Fu=l.forwardRef(({className:e,type:t,transform:n="none",isDisabled:r=!1,onChange:o,...a},i)=>{const s=Oe({isDisabled:r}),c=u=>{let f=u.target.value;(Array.isArray(n)?n:[n]).forEach(p=>{switch(p){case"uppercase":f=f.toUpperCase();break;case"lowercase":f=f.toLowerCase();break;case"trim":f=f.trim();break}}),u.target.value=f,o&&o(u)};return d.jsx("input",{ref:i,className:k(ae.input,e),type:t,onChange:c,...a,...s})});Fu.displayName="Input";const $u=E.forwardRef(({options:e,value:t,onChange:n,placeholder:r="Select items...",searchPlaceholder:o="Search items...",emptyMessage:a="No items found",className:i,listClassName:s,zIndex:c,isDisabled:u=!1,name:f,required:m,autoFocus:p,...h},y)=>{const[g,v]=E.useState(!1),w=Ye("dropdown",c),x=t.map(N=>{var R;return((R=e.find(_=>_.value===N))==null?void 0:R.label)||N}),b=Oe({isDisabled:u}),S=E.useRef(null);E.useEffect(()=>{p&&S.current&&S.current.focus()},[p]);const C=()=>t.length===0?d.jsx("span",{className:"self-center text-muted-foreground",children:r}):d.jsx("div",{className:"flex flex-1 flex-wrap gap-1",children:x.map((N,R)=>d.jsxs("div",{className:`flex items-center gap-1 rounded-sm bg-secondary px-2 py-0.5 text-sm
|
|
175
173
|
text-secondary-foreground`,children:[N,d.jsx("button",{"aria-label":`Remove ${N}`,className:`ml-0.5 rounded-full opacity-50 transition-opacity hover:opacity-100
|
|
176
174
|
focus:opacity-100 focus:outline-none focus:ring-2 focus:ring-primary-400
|
|
177
175
|
focus:ring-offset-1`,type:"button",onClick:_=>{_.stopPropagation(),n(t.filter((A,$)=>$!==R))},onKeyDown:_=>{(_.key==="Enter"||_.key===" ")&&(_.preventDefault(),_.stopPropagation(),n(t.filter((A,$)=>$!==R)))},children:d.jsx(pr,{className:"h-3 w-3",strokeWidth:3})})]},t[R]))}),M=N=>{if(u){if(N.key==="Tab"||N.key==="Escape")return;N.preventDefault(),N.stopPropagation();return}N.key==="Enter"||N.key===" "?(N.preventDefault(),v(!g)):N.key==="Escape"&&g&&(N.preventDefault(),v(!1))};return d.jsxs(d.Fragment,{children:[f||m?d.jsx("input",{name:f,required:m,type:"hidden",value:t.join(",")}):null,d.jsxs(Jt,{open:g,onOpenChange:v,children:[d.jsx(en,{asChild:!0,children:d.jsxs("div",{ref:N=>{typeof y=="function"?y(N):y&&(y.current=N),S.current=N},"aria-expanded":g,"aria-haspopup":"listbox",className:k(ae.button,Ke({variant:"input"}),ae.focusRing,"flex h-auto min-h-[2.5rem] w-full items-stretch justify-between px-3 py-1.5",i),role:"button",tabIndex:0,onClick:N=>{N.stopPropagation(),u||v(!g)},onKeyDown:M,...b,...h,children:[d.jsx("div",{className:"flex flex-1 text-left",children:C()}),d.jsx(Zo,{className:"ml-2 h-4 w-4 shrink-0 self-center opacity-50"})]})}),d.jsx(Dt,{align:"start",className:"w-[--radix-popover-trigger-width] px-0 py-0",zIndex:w,children:d.jsxs(xr,{children:[d.jsx(Cr,{placeholder:o}),d.jsxs(Nr,{className:k("max-h-[16.5rem] overflow-y-auto",s),children:[d.jsx(sa,{children:a}),d.jsx(wr,{children:e.map(N=>d.jsx(Sr,{value:N.value,onSelect:()=>{n(t.includes(N.value)?t.filter(R=>R!==N.value):[...t,N.value])},children:d.jsxs("div",{className:"flex items-center",children:[d.jsx("div",{className:k(`mr-2 flex h-4 w-4 items-center justify-center rounded-sm border
|
|
178
|
-
border-primary-400`,t.includes(N.value)?"bg-primary-400 text-white":"opacity-50"),children:t.includes(N.value)?d.jsx(Ot,{className:"h-3 w-3",strokeWidth:3}):null}),N.label]})},N.value))})]})]})})]})]})});Fu.displayName="MultiSelect";var go="rovingFocusGroup.onEntryFocus",o0={bubbles:!1,cancelable:!0},Bn="RovingFocusGroup",[Io,$u,a0]=Mn(Bn),[s0,Lu]=ve(Bn,[a0]),[i0,c0]=s0(Bn),Wu=l.forwardRef((e,t)=>d.jsx(Io.Provider,{scope:e.__scopeRovingFocusGroup,children:d.jsx(Io.Slot,{scope:e.__scopeRovingFocusGroup,children:d.jsx(l0,{...e,ref:t})})}));Wu.displayName=Bn;var l0=l.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:a,currentTabStopId:i,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:c,onEntryFocus:u,preventScrollOnEntryFocus:f=!1,...m}=e,p=l.useRef(null),h=q(t,p),y=xt(a),[g,v]=Ce({prop:i,defaultProp:s??null,onChange:c,caller:Bn}),[w,x]=l.useState(!1),b=Ne(u),S=$u(n),C=l.useRef(!1),[M,N]=l.useState(0);return l.useEffect(()=>{const R=p.current;if(R)return R.addEventListener(go,b),()=>R.removeEventListener(go,b)},[b]),d.jsx(i0,{scope:n,orientation:r,dir:y,loop:o,currentTabStopId:g,onItemFocus:l.useCallback(R=>v(R),[v]),onItemShiftTab:l.useCallback(()=>x(!0),[]),onFocusableItemAdd:l.useCallback(()=>N(R=>R+1),[]),onFocusableItemRemove:l.useCallback(()=>N(R=>R-1),[]),children:d.jsx(V.div,{tabIndex:w||M===0?-1:0,"data-orientation":r,...m,ref:h,style:{outline:"none",...e.style},onMouseDown:I(e.onMouseDown,()=>{C.current=!0}),onFocus:I(e.onFocus,R=>{const _=!C.current;if(R.target===R.currentTarget&&_&&!w){const A=new CustomEvent(go,o0);if(R.currentTarget.dispatchEvent(A),!A.defaultPrevented){const $=S().filter(j=>j.focusable),D=$.find(j=>j.active),Y=$.find(j=>j.id===g),J=[D,Y,...$].filter(Boolean).map(j=>j.ref.current);Yu(J,f)}}C.current=!1}),onBlur:I(e.onBlur,()=>x(!1))})})}),Bu="RovingFocusGroupItem",Vu=l.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:a,children:i,...s}=e,c=he(),u=a||c,f=c0(Bu,n),m=f.currentTabStopId===u,p=$u(n),{onFocusableItemAdd:h,onFocusableItemRemove:y}=f;return l.useEffect(()=>{if(r)return h(),()=>y()},[r,h,y]),d.jsx(Io.ItemSlot,{scope:n,id:u,focusable:r,active:o,children:d.jsx(V.span,{tabIndex:m?0:-1,"data-orientation":f.orientation,...s,ref:t,onMouseDown:I(e.onMouseDown,g=>{r?f.onItemFocus(u):g.preventDefault()}),onFocus:I(e.onFocus,()=>f.onItemFocus(u)),onKeyDown:I(e.onKeyDown,g=>{if(g.key==="Tab"&&g.shiftKey){f.onItemShiftTab();return}if(g.target!==g.currentTarget)return;const v=f0(g,f.orientation,f.dir);if(v!==void 0){if(g.metaKey||g.ctrlKey||g.altKey||g.shiftKey)return;g.preventDefault();let x=p().filter(b=>b.focusable).map(b=>b.ref.current);if(v==="last")x.reverse();else if(v==="prev"||v==="next"){v==="prev"&&x.reverse();const b=x.indexOf(g.currentTarget);x=f.loop?m0(x,b+1):x.slice(b+1)}setTimeout(()=>Yu(x))}}),children:typeof i=="function"?i({isCurrentTabStop:m}):i})})});Vu.displayName=Bu;var u0={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function d0(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function f0(e,t,n){const r=d0(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return u0[r]}function Yu(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function m0(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var p0=Wu,h0=Vu,Ia="Radio",[g0,Hu]=ve(Ia),[v0,y0]=g0(Ia),Gu=l.forwardRef((e,t)=>{const{__scopeRadio:n,name:r,checked:o=!1,required:a,disabled:i,value:s="on",onCheck:c,form:u,...f}=e,[m,p]=l.useState(null),h=q(t,v=>p(v)),y=l.useRef(!1),g=m?u||!!m.closest("form"):!0;return d.jsxs(v0,{scope:n,checked:o,disabled:i,children:[d.jsx(V.button,{type:"button",role:"radio","aria-checked":o,"data-state":qu(o),"data-disabled":i?"":void 0,disabled:i,value:s,...f,ref:h,onClick:I(e.onClick,v=>{o||c==null||c(),g&&(y.current=v.isPropagationStopped(),y.current||v.stopPropagation())})}),g&&d.jsx(Ku,{control:m,bubbles:!y.current,name:r,value:s,checked:o,required:a,disabled:i,form:u,style:{transform:"translateX(-100%)"}})]})});Gu.displayName=Ia;var Uu="RadioIndicator",zu=l.forwardRef((e,t)=>{const{__scopeRadio:n,forceMount:r,...o}=e,a=y0(Uu,n);return d.jsx(De,{present:r||a.checked,children:d.jsx(V.span,{"data-state":qu(a.checked),"data-disabled":a.disabled?"":void 0,...o,ref:t})})});zu.displayName=Uu;var b0="RadioBubbleInput",Ku=l.forwardRef(({__scopeRadio:e,control:t,checked:n,bubbles:r=!0,...o},a)=>{const i=l.useRef(null),s=q(i,a),c=Ir(n),u=Tn(t);return l.useEffect(()=>{const f=i.current;if(!f)return;const m=window.HTMLInputElement.prototype,h=Object.getOwnPropertyDescriptor(m,"checked").set;if(c!==n&&h){const y=new Event("click",{bubbles:r});h.call(f,n),f.dispatchEvent(y)}},[c,n,r]),d.jsx(V.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}})});Ku.displayName=b0;function qu(e){return e?"checked":"unchecked"}var x0=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],Fr="RadioGroup",[w0,tE]=ve(Fr,[Lu,Hu]),Xu=Lu(),Zu=Hu(),[C0,S0]=w0(Fr),Qu=l.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:m,...p}=e,h=Xu(n),y=xt(u),[g,v]=Ce({prop:a,defaultProp:o??"",onChange:m,caller:Fr});return d.jsx(C0,{scope:n,name:r,required:i,disabled:s,value:g,onValueChange:v,children:d.jsx(p0,{asChild:!0,...h,orientation:c,dir:y,loop:f,children:d.jsx(V.div,{role:"radiogroup","aria-required":i,"aria-orientation":c,"data-disabled":s?"":void 0,dir:y,...p,ref:t})})})});Qu.displayName=Fr;var Ju="RadioGroupItem",ed=l.forwardRef((e,t)=>{const{__scopeRadioGroup:n,disabled:r,...o}=e,a=S0(Ju,n),i=a.disabled||r,s=Xu(n),c=Zu(n),u=l.useRef(null),f=q(t,u),m=a.value===o.value,p=l.useRef(!1);return l.useEffect(()=>{const h=g=>{x0.includes(g.key)&&(p.current=!0)},y=()=>p.current=!1;return document.addEventListener("keydown",h),document.addEventListener("keyup",y),()=>{document.removeEventListener("keydown",h),document.removeEventListener("keyup",y)}},[]),d.jsx(h0,{asChild:!0,...s,focusable:!i,active:m,children:d.jsx(Gu,{disabled:i,required:a.required,checked:m,...c,...o,name:a.name,ref:f,onCheck:()=>a.onValueChange(o.value),onKeyDown:I(h=>{h.key==="Enter"&&h.preventDefault()}),onFocus:I(o.onFocus,()=>{var h;p.current&&((h=u.current)==null||h.click())})})})});ed.displayName=Ju;var N0="RadioGroupIndicator",td=l.forwardRef((e,t)=>{const{__scopeRadioGroup:n,...r}=e,o=Zu(n);return d.jsx(zu,{...o,...r,ref:t})});td.displayName=N0;var E0=Qu,Da=ed,M0=td;const nd=l.forwardRef(({id:e,label:t,description:n,isChecked:r,isDisabled:o,className:a,"aria-label":i,...s},c)=>{const u=Oe({isDisabled:o}),{ariaProps:f,labelId:m,descriptionId:p}=It({label:t,description:n,"aria-label":i}),h=()=>t?typeof t=="string"?d.jsx("span",{className:"font-medium",id:m,children:t}):d.jsx("span",{id:m,children:t}):null;return d.jsxs("div",{className:k("relative",r?k(ae.button,Ke({variant:"primary"})):k(ae.button,Ke({variant:"input"})),o&&"pointer-events-none cursor-not-allowed opacity-50",a),children:[d.jsx(Da,{ref:c,checked:r,className:"absolute inset-0 opacity-0",id:e,...f,...s,...u}),d.jsxs("div",{className:"flex items-center gap-2",children:[h(),n?d.jsx("span",{className:"text-sm text-muted-foreground",id:p,children:n}):null]})]})});nd.displayName="RadioButton";const rd="aspect-square h-5 w-5 rounded-full border-2 border-gray-500 text-primary-400 ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 aria-disabled:cursor-not-allowed aria-disabled:opacity-50 data-[state=checked]:border-primary-400 ",od=l.forwardRef(({id:e,label:t,description:n,isChecked:r,isDisabled:o,className:a,"aria-label":i,...s},c)=>{const u=Oe({isDisabled:o}),{ariaProps:f,labelId:m,descriptionId:p}=It({label:t,description:n,"aria-label":i});return d.jsxs("div",{className:k("flex items-start gap-2",o&&"cursor-not-allowed opacity-50 [&>*]:cursor-not-allowed"),children:[d.jsx(Da,{ref:c,checked:r,className:k(ae.focusRingVisible,ae.focusRingVisibleSm,rd,a),id:e,...s,...u,...f,children:d.jsx(M0,{className:"flex items-center justify-center",children:d.jsx(vi,{className:"h-3 w-3 fill-current text-current"})})}),d.jsxs("div",{className:"mt-[3px] flex flex-col gap-1",children:[t?typeof t=="string"?d.jsx(nn,{htmlFor:e,id:m,children:t}):d.jsx("div",{id:m,children:t}):null,n?d.jsx("p",{className:"text-sm text-muted-foreground",id:p,children:n}):null]})]})});od.displayName="RadioDefault";const ad=l.forwardRef(({id:e,label:t,description:n,isChecked:r,isDisabled:o,className:a,"aria-label":i,...s},c)=>{const u=Oe({isDisabled:o}),{ariaProps:f,labelId:m,descriptionId:p}=It({label:t,description:n,"aria-label":i}),h=()=>t?typeof t=="string"?d.jsx("div",{className:"font-medium",id:m,children:t}):d.jsx("div",{id:m,children:t}):null;return d.jsxs("div",{className:k("relative rounded-lg border-2 border-muted bg-popover px-4 py-4",r&&"border-primary-400",o?"cursor-not-allowed opacity-50 [&_*]:cursor-not-allowed":"cursor-pointer hover:bg-accent hover:text-accent-foreground",a),children:[d.jsx(Da,{ref:c,checked:r,className:"absolute inset-0 opacity-0",id:e,...f,...s,...u}),d.jsxs("div",{className:"flex items-start gap-3",children:[d.jsx("div",{className:k(rd,"pointer-events-none mt-1",r&&"border-primary-400"),children:r?d.jsx("div",{className:"flex h-full w-full items-center justify-center",children:d.jsx(vi,{className:"h-3 w-3 fill-current text-primary-400"})}):null}),d.jsxs("div",{className:"pointer-events-none space-y-1",children:[h(),n?d.jsx("p",{className:"text-sm text-muted-foreground",id:p,children:n}):null]})]})]})});ad.displayName="RadioTile";const Ta=l.forwardRef(({className:e,label:t,description:n,id:r,"aria-label":o,isChecked:a=!1,isDisabled:i=!1,variant:s="default",...c},u)=>{kl("Radio",t,o);let f=od;return s==="button"?f=nd:s==="tile"&&(f=ad),d.jsx(f,{ref:u,"aria-label":o,className:e,description:n,id:r,isChecked:a,isDisabled:i,label:t,...c})});Ta.displayName="Radio";const sd=l.forwardRef(({options:e,value:t,onChange:n,className:r,columns:o=2,orientation:a="vertical",variant:i="default",...s},c)=>{const u=Qo({variant:i,orientation:a,columns:o});return d.jsx(E0,{ref:c,className:k(u,r),value:t,onValueChange:n,...s,children:e.map(f=>d.jsx(Ta,{description:f.description,id:f.value,isChecked:t===f.value,label:f.label,value:f.value,variant:i},f.value))})});sd.displayName="RadioGroup";function Ls(e,[t,n]){return Math.min(n,Math.max(t,e))}var id=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"}),R0="VisuallyHidden",P0=l.forwardRef((e,t)=>d.jsx(V.span,{...e,ref:t,style:{...id,...e.style}}));P0.displayName=R0;var k0=[" ","Enter","ArrowUp","ArrowDown"],O0=[" ","Enter"],Pt="Select",[$r,Lr,I0]=Mn(Pt),[rn,nE]=ve(Pt,[I0,Qt]),Wr=Qt(),[D0,Ct]=rn(Pt),[T0,A0]=rn(Pt),cd=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:a,value:i,defaultValue:s,onValueChange:c,dir:u,name:f,autoComplete:m,disabled:p,required:h,form:y}=e,g=Wr(t),[v,w]=l.useState(null),[x,b]=l.useState(null),[S,C]=l.useState(!1),M=xt(u),[N,R]=Ce({prop:r,defaultProp:o??!1,onChange:a,caller:Pt}),[_,A]=Ce({prop:i,defaultProp:s,onChange:c,caller:Pt}),$=l.useRef(null),D=v?y||!!v.closest("form"):!0,[Y,H]=l.useState(new Set),J=Array.from(Y).map(j=>j.props.value).join(";");return d.jsx(ga,{...g,children:d.jsxs(D0,{required:h,scope:t,trigger:v,onTriggerChange:w,valueNode:x,onValueNodeChange:b,valueNodeHasChildren:S,onValueNodeHasChildrenChange:C,contentId:he(),value:_,onValueChange:A,open:N,onOpenChange:R,dir:M,triggerPointerDownPosRef:$,disabled:p,children:[d.jsx($r.Provider,{scope:t,children:d.jsx(T0,{scope:e.__scopeSelect,onNativeOptionAdd:l.useCallback(j=>{H(X=>new Set(X).add(j))},[]),onNativeOptionRemove:l.useCallback(j=>{H(X=>{const F=new Set(X);return F.delete(j),F})},[]),children:n})}),D?d.jsxs(Id,{"aria-hidden":!0,required:h,tabIndex:-1,name:f,autoComplete:m,value:_,onChange:j=>A(j.target.value),disabled:p,form:y,children:[_===void 0?d.jsx("option",{value:""}):null,Array.from(Y)]},J):null]})})};cd.displayName=Pt;var ld="SelectTrigger",ud=l.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,a=Wr(n),i=Ct(ld,n),s=i.disabled||r,c=q(t,i.onTriggerChange),u=Lr(n),f=l.useRef("touch"),[m,p,h]=Td(g=>{const v=u().filter(b=>!b.disabled),w=v.find(b=>b.value===i.value),x=Ad(v,g,w);x!==void 0&&i.onValueChange(x.value)}),y=g=>{s||(i.onOpenChange(!0),h()),g&&(i.triggerPointerDownPosRef.current={x:Math.round(g.pageX),y:Math.round(g.pageY)})};return d.jsx(Pr,{asChild:!0,...a,children:d.jsx(V.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":Dd(i.value)?"":void 0,...o,ref:c,onClick:I(o.onClick,g=>{g.currentTarget.focus(),f.current!=="mouse"&&y(g)}),onPointerDown:I(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"&&(y(g),g.preventDefault())}),onKeyDown:I(o.onKeyDown,g=>{const v=m.current!=="";!(g.ctrlKey||g.altKey||g.metaKey)&&g.key.length===1&&p(g.key),!(v&&g.key===" ")&&k0.includes(g.key)&&(y(),g.preventDefault())})})})});ud.displayName=ld;var dd="SelectValue",fd=l.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:a,placeholder:i="",...s}=e,c=Ct(dd,n),{onValueNodeHasChildrenChange:u}=c,f=a!==void 0,m=q(t,c.onValueNodeChange);return fe(()=>{u(f)},[u,f]),d.jsx(V.span,{...s,ref:m,style:{pointerEvents:"none"},children:Dd(c.value)?d.jsx(d.Fragment,{children:i}):a})});fd.displayName=dd;var _0="SelectIcon",md=l.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return d.jsx(V.span,{"aria-hidden":!0,...o,ref:t,children:r||"▼"})});md.displayName=_0;var j0="SelectPortal",pd=e=>d.jsx(kn,{asChild:!0,...e});pd.displayName=j0;var kt="SelectContent",hd=l.forwardRef((e,t)=>{const n=Ct(kt,e.__scopeSelect),[r,o]=l.useState();if(fe(()=>{o(new DocumentFragment)},[]),!n.open){const a=r;return a?En.createPortal(d.jsx(gd,{scope:e.__scopeSelect,children:d.jsx($r.Slot,{scope:e.__scopeSelect,children:d.jsx("div",{children:e.children})})}),a):null}return d.jsx(vd,{...e,ref:t})});hd.displayName=kt;var je=10,[gd,St]=rn(kt),F0="SelectContentImpl",$0=ht("SelectContent.RemoveScroll"),vd=l.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:m,collisionBoundary:p,collisionPadding:h,sticky:y,hideWhenDetached:g,avoidCollisions:v,...w}=e,x=Ct(kt,n),[b,S]=l.useState(null),[C,M]=l.useState(null),N=q(t,T=>S(T)),[R,_]=l.useState(null),[A,$]=l.useState(null),D=Lr(n),[Y,H]=l.useState(!1),J=l.useRef(!1);l.useEffect(()=>{if(b)return vr(b)},[b]),hr();const j=l.useCallback(T=>{const[Q,...K]=D().map(ne=>ne.ref.current),[B]=K.slice(-1),ee=document.activeElement;for(const ne of T)if(ne===ee||(ne==null||ne.scrollIntoView({block:"nearest"}),ne===Q&&C&&(C.scrollTop=0),ne===B&&C&&(C.scrollTop=C.scrollHeight),ne==null||ne.focus(),document.activeElement!==ee))return},[D,C]),X=l.useCallback(()=>j([R,b]),[j,R,b]);l.useEffect(()=>{Y&&X()},[Y,X]);const{onOpenChange:F,triggerPointerDownPosRef:O}=x;l.useEffect(()=>{if(b){let T={x:0,y:0};const Q=B=>{var ee,ne;T={x:Math.abs(Math.round(B.pageX)-(((ee=O.current)==null?void 0:ee.x)??0)),y:Math.abs(Math.round(B.pageY)-(((ne=O.current)==null?void 0:ne.y)??0))}},K=B=>{T.x<=10&&T.y<=10?B.preventDefault():b.contains(B.target)||F(!1),document.removeEventListener("pointermove",Q),O.current=null};return O.current!==null&&(document.addEventListener("pointermove",Q),document.addEventListener("pointerup",K,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",Q),document.removeEventListener("pointerup",K,{capture:!0})}}},[b,F,O]),l.useEffect(()=>{const T=()=>F(!1);return window.addEventListener("blur",T),window.addEventListener("resize",T),()=>{window.removeEventListener("blur",T),window.removeEventListener("resize",T)}},[F]);const[Z,te]=Td(T=>{const Q=D().filter(ee=>!ee.disabled),K=Q.find(ee=>ee.ref.current===document.activeElement),B=Ad(Q,T,K);B&&setTimeout(()=>B.ref.current.focus())}),P=l.useCallback((T,Q,K)=>{const B=!J.current&&!K;(x.value!==void 0&&x.value===Q||B)&&(_(T),B&&(J.current=!0))},[x.value]),W=l.useCallback(()=>b==null?void 0:b.focus(),[b]),G=l.useCallback((T,Q,K)=>{const B=!J.current&&!K;(x.value!==void 0&&x.value===Q||B)&&$(T)},[x.value]),L=r==="popper"?Do:yd,z=L===Do?{side:s,sideOffset:c,align:u,alignOffset:f,arrowPadding:m,collisionBoundary:p,collisionPadding:h,sticky:y,hideWhenDetached:g,avoidCollisions:v}:{};return d.jsx(gd,{scope:n,content:b,viewport:C,onViewportChange:M,itemRefCallback:P,selectedItem:R,onItemLeave:W,itemTextRefCallback:G,focusSelectedItem:X,selectedItemText:A,position:r,isPositioned:Y,searchRef:Z,children:d.jsx(On,{as:$0,allowPinchZoom:!0,children:d.jsx(Pn,{asChild:!0,trapped:x.open,onMountAutoFocus:T=>{T.preventDefault()},onUnmountAutoFocus:I(o,T=>{var Q;(Q=x.trigger)==null||Q.focus({preventScroll:!0}),T.preventDefault()}),children:d.jsx(Rn,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:i,onFocusOutside:T=>T.preventDefault(),onDismiss:()=>x.onOpenChange(!1),children:d.jsx(L,{role:"listbox",id:x.contentId,"data-state":x.open?"open":"closed",dir:x.dir,onContextMenu:T=>T.preventDefault(),...w,...z,onPlaced:()=>H(!0),ref:N,style:{display:"flex",flexDirection:"column",outline:"none",...w.style},onKeyDown:I(w.onKeyDown,T=>{const Q=T.ctrlKey||T.altKey||T.metaKey;if(T.key==="Tab"&&T.preventDefault(),!Q&&T.key.length===1&&te(T.key),["ArrowUp","ArrowDown","Home","End"].includes(T.key)){let B=D().filter(ee=>!ee.disabled).map(ee=>ee.ref.current);if(["ArrowUp","End"].includes(T.key)&&(B=B.slice().reverse()),["ArrowUp","ArrowDown"].includes(T.key)){const ee=T.target,ne=B.indexOf(ee);B=B.slice(ne+1)}setTimeout(()=>j(B)),T.preventDefault()}})})})})})})});vd.displayName=F0;var L0="SelectItemAlignedPosition",yd=l.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,a=Ct(kt,n),i=St(kt,n),[s,c]=l.useState(null),[u,f]=l.useState(null),m=q(t,N=>f(N)),p=Lr(n),h=l.useRef(!1),y=l.useRef(!0),{viewport:g,selectedItem:v,selectedItemText:w,focusSelectedItem:x}=i,b=l.useCallback(()=>{if(a.trigger&&a.valueNode&&s&&u&&g&&v&&w){const N=a.trigger.getBoundingClientRect(),R=u.getBoundingClientRect(),_=a.valueNode.getBoundingClientRect(),A=w.getBoundingClientRect();if(a.dir!=="rtl"){const ee=A.left-R.left,ne=_.left-ee,le=N.left-ne,ye=N.width+le,et=Math.max(ye,R.width),tt=window.innerWidth-je,nt=Ls(ne,[je,Math.max(je,tt-et)]);s.style.minWidth=ye+"px",s.style.left=nt+"px"}else{const ee=R.right-A.right,ne=window.innerWidth-_.right-ee,le=window.innerWidth-N.right-ne,ye=N.width+le,et=Math.max(ye,R.width),tt=window.innerWidth-je,nt=Ls(ne,[je,Math.max(je,tt-et)]);s.style.minWidth=ye+"px",s.style.right=nt+"px"}const $=p(),D=window.innerHeight-je*2,Y=g.scrollHeight,H=window.getComputedStyle(u),J=parseInt(H.borderTopWidth,10),j=parseInt(H.paddingTop,10),X=parseInt(H.borderBottomWidth,10),F=parseInt(H.paddingBottom,10),O=J+j+Y+F+X,Z=Math.min(v.offsetHeight*5,O),te=window.getComputedStyle(g),P=parseInt(te.paddingTop,10),W=parseInt(te.paddingBottom,10),G=N.top+N.height/2-je,L=D-G,z=v.offsetHeight/2,T=v.offsetTop+z,Q=J+j+T,K=O-Q;if(Q<=G){const ee=$.length>0&&v===$[$.length-1].ref.current;s.style.bottom="0px";const ne=u.clientHeight-g.offsetTop-g.offsetHeight,le=Math.max(L,z+(ee?W:0)+ne+X),ye=Q+le;s.style.height=ye+"px"}else{const ee=$.length>0&&v===$[0].ref.current;s.style.top="0px";const le=Math.max(G,J+g.offsetTop+(ee?P:0)+z)+K;s.style.height=le+"px",g.scrollTop=Q-G+g.offsetTop}s.style.margin=`${je}px 0`,s.style.minHeight=Z+"px",s.style.maxHeight=D+"px",r==null||r(),requestAnimationFrame(()=>h.current=!0)}},[p,a.trigger,a.valueNode,s,u,g,v,w,a.dir,r]);fe(()=>b(),[b]);const[S,C]=l.useState();fe(()=>{u&&C(window.getComputedStyle(u).zIndex)},[u]);const M=l.useCallback(N=>{N&&y.current===!0&&(b(),x==null||x(),y.current=!1)},[b,x]);return d.jsx(B0,{scope:n,contentWrapper:s,shouldExpandOnScrollRef:h,onScrollButtonChange:M,children:d.jsx("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:S},children:d.jsx(V.div,{...o,ref:m,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});yd.displayName=L0;var W0="SelectPopperPosition",Do=l.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=je,...a}=e,i=Wr(n);return d.jsx(va,{...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)"}})});Do.displayName=W0;var[B0,Aa]=rn(kt,{}),To="SelectViewport",bd=l.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...o}=e,a=St(To,n),i=Aa(To,n),s=q(t,a.onViewportChange),c=l.useRef(0);return d.jsxs(d.Fragment,{children:[d.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),d.jsx($r.Slot,{scope:n,children:d.jsx(V.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:s,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:I(o.onScroll,u=>{const f=u.currentTarget,{contentWrapper:m,shouldExpandOnScrollRef:p}=i;if(p!=null&&p.current&&m){const h=Math.abs(c.current-f.scrollTop);if(h>0){const y=window.innerHeight-je*2,g=parseFloat(m.style.minHeight),v=parseFloat(m.style.height),w=Math.max(g,v);if(w<y){const x=w+h,b=Math.min(y,x),S=x-b;m.style.height=b+"px",m.style.bottom==="0px"&&(f.scrollTop=S>0?S:0,m.style.justifyContent="flex-end")}}}c.current=f.scrollTop})})})]})});bd.displayName=To;var xd="SelectGroup",[V0,Y0]=rn(xd),wd=l.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=he();return d.jsx(V0,{scope:n,id:o,children:d.jsx(V.div,{role:"group","aria-labelledby":o,...r,ref:t})})});wd.displayName=xd;var Cd="SelectLabel",Sd=l.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Y0(Cd,n);return d.jsx(V.div,{id:o.id,...r,ref:t})});Sd.displayName=Cd;var ur="SelectItem",[H0,Nd]=rn(ur),Ed=l.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:a,...i}=e,s=Ct(ur,n),c=St(ur,n),u=s.value===r,[f,m]=l.useState(a??""),[p,h]=l.useState(!1),y=q(t,x=>{var b;return(b=c.itemRefCallback)==null?void 0:b.call(c,x,r,o)}),g=he(),v=l.useRef("touch"),w=()=>{o||(s.onValueChange(r),s.onOpenChange(!1))};if(r==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return d.jsx(H0,{scope:n,value:r,disabled:o,textId:g,isSelected:u,onItemTextChange:l.useCallback(x=>{m(b=>b||((x==null?void 0:x.textContent)??"").trim())},[]),children:d.jsx($r.ItemSlot,{scope:n,value:r,disabled:o,textValue:f,children:d.jsx(V.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:y,onFocus:I(i.onFocus,()=>h(!0)),onBlur:I(i.onBlur,()=>h(!1)),onClick:I(i.onClick,()=>{v.current!=="mouse"&&w()}),onPointerUp:I(i.onPointerUp,()=>{v.current==="mouse"&&w()}),onPointerDown:I(i.onPointerDown,x=>{v.current=x.pointerType}),onPointerMove:I(i.onPointerMove,x=>{var b;v.current=x.pointerType,o?(b=c.onItemLeave)==null||b.call(c):v.current==="mouse"&&x.currentTarget.focus({preventScroll:!0})}),onPointerLeave:I(i.onPointerLeave,x=>{var b;x.currentTarget===document.activeElement&&((b=c.onItemLeave)==null||b.call(c))}),onKeyDown:I(i.onKeyDown,x=>{var S;((S=c.searchRef)==null?void 0:S.current)!==""&&x.key===" "||(O0.includes(x.key)&&w(),x.key===" "&&x.preventDefault())})})})})});Ed.displayName=ur;var pn="SelectItemText",Md=l.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,...a}=e,i=Ct(pn,n),s=St(pn,n),c=Nd(pn,n),u=A0(pn,n),[f,m]=l.useState(null),p=q(t,w=>m(w),c.onItemTextChange,w=>{var x;return(x=s.itemTextRefCallback)==null?void 0:x.call(s,w,c.value,c.disabled)}),h=f==null?void 0:f.textContent,y=l.useMemo(()=>d.jsx("option",{value:c.value,disabled:c.disabled,children:h},c.value),[c.disabled,c.value,h]),{onNativeOptionAdd:g,onNativeOptionRemove:v}=u;return fe(()=>(g(y),()=>v(y)),[g,v,y]),d.jsxs(d.Fragment,{children:[d.jsx(V.span,{id:c.textId,...a,ref:p}),c.isSelected&&i.valueNode&&!i.valueNodeHasChildren?En.createPortal(a.children,i.valueNode):null]})});Md.displayName=pn;var Rd="SelectItemIndicator",Pd=l.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return Nd(Rd,n).isSelected?d.jsx(V.span,{"aria-hidden":!0,...r,ref:t}):null});Pd.displayName=Rd;var Ao="SelectScrollUpButton",G0=l.forwardRef((e,t)=>{const n=St(Ao,e.__scopeSelect),r=Aa(Ao,e.__scopeSelect),[o,a]=l.useState(!1),i=q(t,r.onScrollButtonChange);return fe(()=>{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?d.jsx(kd,{...e,ref:i,onAutoScroll:()=>{const{viewport:s,selectedItem:c}=n;s&&c&&(s.scrollTop=s.scrollTop-c.offsetHeight)}}):null});G0.displayName=Ao;var _o="SelectScrollDownButton",U0=l.forwardRef((e,t)=>{const n=St(_o,e.__scopeSelect),r=Aa(_o,e.__scopeSelect),[o,a]=l.useState(!1),i=q(t,r.onScrollButtonChange);return fe(()=>{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?d.jsx(kd,{...e,ref:i,onAutoScroll:()=>{const{viewport:s,selectedItem:c}=n;s&&c&&(s.scrollTop=s.scrollTop+c.offsetHeight)}}):null});U0.displayName=_o;var kd=l.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,a=St("SelectScrollButton",n),i=l.useRef(null),s=Lr(n),c=l.useCallback(()=>{i.current!==null&&(window.clearInterval(i.current),i.current=null)},[]);return l.useEffect(()=>()=>c(),[c]),fe(()=>{var f;const u=s().find(m=>m.ref.current===document.activeElement);(f=u==null?void 0:u.ref.current)==null||f.scrollIntoView({block:"nearest"})},[s]),d.jsx(V.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:I(o.onPointerDown,()=>{i.current===null&&(i.current=window.setInterval(r,50))}),onPointerMove:I(o.onPointerMove,()=>{var u;(u=a.onItemLeave)==null||u.call(a),i.current===null&&(i.current=window.setInterval(r,50))}),onPointerLeave:I(o.onPointerLeave,()=>{c()})})}),z0="SelectSeparator",Od=l.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return d.jsx(V.div,{"aria-hidden":!0,...r,ref:t})});Od.displayName=z0;var jo="SelectArrow",K0=l.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Wr(n),a=Ct(jo,n),i=St(jo,n);return a.open&&i.position==="popper"?d.jsx(ya,{...o,...r,ref:t}):null});K0.displayName=jo;var q0="SelectBubbleInput",Id=l.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const o=l.useRef(null),a=q(r,o),i=Ir(t);return l.useEffect(()=>{const s=o.current;if(!s)return;const c=window.HTMLSelectElement.prototype,f=Object.getOwnPropertyDescriptor(c,"value").set;if(i!==t&&f){const m=new Event("change",{bubbles:!0});f.call(s,t),s.dispatchEvent(m)}},[i,t]),d.jsx(V.select,{...n,style:{...id,...n.style},ref:a,defaultValue:t})});Id.displayName=q0;function Dd(e){return e===""||e===void 0}function Td(e){const t=Ne(e),n=l.useRef(""),r=l.useRef(0),o=l.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=l.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return l.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,o,a]}function Ad(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=X0(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 X0(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var Z0=cd,_d=ud,Q0=fd,J0=md,eS=pd,jd=hd,tS=bd,nS=wd,Fd=Sd,$d=Ed,rS=Md,oS=Pd,Ld=Od;const _a=l.forwardRef(({className:e,children:t,position:n="popper",zIndex:r,style:o,...a},i)=>d.jsx(eS,{children:d.jsx(jd,{ref:i,className:k(`relative min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground
|
|
176
|
+
border-primary-400`,t.includes(N.value)?"bg-primary-400 text-white":"opacity-50"),children:t.includes(N.value)?d.jsx(Ot,{className:"h-3 w-3",strokeWidth:3}):null}),N.label]})},N.value))})]})]})})]})]})});$u.displayName="MultiSelect";var go="rovingFocusGroup.onEntryFocus",a0={bubbles:!1,cancelable:!0},Bn="RovingFocusGroup",[Io,Lu,s0]=Mn(Bn),[i0,Wu]=ve(Bn,[s0]),[c0,l0]=i0(Bn),Bu=l.forwardRef((e,t)=>d.jsx(Io.Provider,{scope:e.__scopeRovingFocusGroup,children:d.jsx(Io.Slot,{scope:e.__scopeRovingFocusGroup,children:d.jsx(u0,{...e,ref:t})})}));Bu.displayName=Bn;var u0=l.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:a,currentTabStopId:i,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:c,onEntryFocus:u,preventScrollOnEntryFocus:f=!1,...m}=e,p=l.useRef(null),h=q(t,p),y=xt(a),[g,v]=Ce({prop:i,defaultProp:s??null,onChange:c,caller:Bn}),[w,x]=l.useState(!1),b=Ne(u),S=Lu(n),C=l.useRef(!1),[M,N]=l.useState(0);return l.useEffect(()=>{const R=p.current;if(R)return R.addEventListener(go,b),()=>R.removeEventListener(go,b)},[b]),d.jsx(c0,{scope:n,orientation:r,dir:y,loop:o,currentTabStopId:g,onItemFocus:l.useCallback(R=>v(R),[v]),onItemShiftTab:l.useCallback(()=>x(!0),[]),onFocusableItemAdd:l.useCallback(()=>N(R=>R+1),[]),onFocusableItemRemove:l.useCallback(()=>N(R=>R-1),[]),children:d.jsx(V.div,{tabIndex:w||M===0?-1:0,"data-orientation":r,...m,ref:h,style:{outline:"none",...e.style},onMouseDown:I(e.onMouseDown,()=>{C.current=!0}),onFocus:I(e.onFocus,R=>{const _=!C.current;if(R.target===R.currentTarget&&_&&!w){const A=new CustomEvent(go,a0);if(R.currentTarget.dispatchEvent(A),!A.defaultPrevented){const $=S().filter(j=>j.focusable),D=$.find(j=>j.active),Y=$.find(j=>j.id===g),J=[D,Y,...$].filter(Boolean).map(j=>j.ref.current);Hu(J,f)}}C.current=!1}),onBlur:I(e.onBlur,()=>x(!1))})})}),Vu="RovingFocusGroupItem",Yu=l.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:a,children:i,...s}=e,c=he(),u=a||c,f=l0(Vu,n),m=f.currentTabStopId===u,p=Lu(n),{onFocusableItemAdd:h,onFocusableItemRemove:y}=f;return l.useEffect(()=>{if(r)return h(),()=>y()},[r,h,y]),d.jsx(Io.ItemSlot,{scope:n,id:u,focusable:r,active:o,children:d.jsx(V.span,{tabIndex:m?0:-1,"data-orientation":f.orientation,...s,ref:t,onMouseDown:I(e.onMouseDown,g=>{r?f.onItemFocus(u):g.preventDefault()}),onFocus:I(e.onFocus,()=>f.onItemFocus(u)),onKeyDown:I(e.onKeyDown,g=>{if(g.key==="Tab"&&g.shiftKey){f.onItemShiftTab();return}if(g.target!==g.currentTarget)return;const v=m0(g,f.orientation,f.dir);if(v!==void 0){if(g.metaKey||g.ctrlKey||g.altKey||g.shiftKey)return;g.preventDefault();let x=p().filter(b=>b.focusable).map(b=>b.ref.current);if(v==="last")x.reverse();else if(v==="prev"||v==="next"){v==="prev"&&x.reverse();const b=x.indexOf(g.currentTarget);x=f.loop?p0(x,b+1):x.slice(b+1)}setTimeout(()=>Hu(x))}}),children:typeof i=="function"?i({isCurrentTabStop:m}):i})})});Yu.displayName=Vu;var d0={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function f0(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function m0(e,t,n){const r=f0(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return d0[r]}function Hu(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function p0(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var h0=Bu,g0=Yu,Ia="Radio",[v0,Gu]=ve(Ia),[y0,b0]=v0(Ia),Uu=l.forwardRef((e,t)=>{const{__scopeRadio:n,name:r,checked:o=!1,required:a,disabled:i,value:s="on",onCheck:c,form:u,...f}=e,[m,p]=l.useState(null),h=q(t,v=>p(v)),y=l.useRef(!1),g=m?u||!!m.closest("form"):!0;return d.jsxs(y0,{scope:n,checked:o,disabled:i,children:[d.jsx(V.button,{type:"button",role:"radio","aria-checked":o,"data-state":Xu(o),"data-disabled":i?"":void 0,disabled:i,value:s,...f,ref:h,onClick:I(e.onClick,v=>{o||c==null||c(),g&&(y.current=v.isPropagationStopped(),y.current||v.stopPropagation())})}),g&&d.jsx(qu,{control:m,bubbles:!y.current,name:r,value:s,checked:o,required:a,disabled:i,form:u,style:{transform:"translateX(-100%)"}})]})});Uu.displayName=Ia;var zu="RadioIndicator",Ku=l.forwardRef((e,t)=>{const{__scopeRadio:n,forceMount:r,...o}=e,a=b0(zu,n);return d.jsx(De,{present:r||a.checked,children:d.jsx(V.span,{"data-state":Xu(a.checked),"data-disabled":a.disabled?"":void 0,...o,ref:t})})});Ku.displayName=zu;var x0="RadioBubbleInput",qu=l.forwardRef(({__scopeRadio:e,control:t,checked:n,bubbles:r=!0,...o},a)=>{const i=l.useRef(null),s=q(i,a),c=Ir(n),u=Tn(t);return l.useEffect(()=>{const f=i.current;if(!f)return;const m=window.HTMLInputElement.prototype,h=Object.getOwnPropertyDescriptor(m,"checked").set;if(c!==n&&h){const y=new Event("click",{bubbles:r});h.call(f,n),f.dispatchEvent(y)}},[c,n,r]),d.jsx(V.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}})});qu.displayName=x0;function Xu(e){return e?"checked":"unchecked"}var w0=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],Fr="RadioGroup",[C0,nE]=ve(Fr,[Wu,Gu]),Zu=Wu(),Qu=Gu(),[S0,N0]=C0(Fr),Ju=l.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:m,...p}=e,h=Zu(n),y=xt(u),[g,v]=Ce({prop:a,defaultProp:o??"",onChange:m,caller:Fr});return d.jsx(S0,{scope:n,name:r,required:i,disabled:s,value:g,onValueChange:v,children:d.jsx(h0,{asChild:!0,...h,orientation:c,dir:y,loop:f,children:d.jsx(V.div,{role:"radiogroup","aria-required":i,"aria-orientation":c,"data-disabled":s?"":void 0,dir:y,...p,ref:t})})})});Ju.displayName=Fr;var ed="RadioGroupItem",td=l.forwardRef((e,t)=>{const{__scopeRadioGroup:n,disabled:r,...o}=e,a=N0(ed,n),i=a.disabled||r,s=Zu(n),c=Qu(n),u=l.useRef(null),f=q(t,u),m=a.value===o.value,p=l.useRef(!1);return l.useEffect(()=>{const h=g=>{w0.includes(g.key)&&(p.current=!0)},y=()=>p.current=!1;return document.addEventListener("keydown",h),document.addEventListener("keyup",y),()=>{document.removeEventListener("keydown",h),document.removeEventListener("keyup",y)}},[]),d.jsx(g0,{asChild:!0,...s,focusable:!i,active:m,children:d.jsx(Uu,{disabled:i,required:a.required,checked:m,...c,...o,name:a.name,ref:f,onCheck:()=>a.onValueChange(o.value),onKeyDown:I(h=>{h.key==="Enter"&&h.preventDefault()}),onFocus:I(o.onFocus,()=>{var h;p.current&&((h=u.current)==null||h.click())})})})});td.displayName=ed;var E0="RadioGroupIndicator",nd=l.forwardRef((e,t)=>{const{__scopeRadioGroup:n,...r}=e,o=Qu(n);return d.jsx(Ku,{...o,...r,ref:t})});nd.displayName=E0;var M0=Ju,Da=td,R0=nd;const rd=l.forwardRef(({id:e,label:t,description:n,isChecked:r,isDisabled:o,className:a,"aria-label":i,...s},c)=>{const u=Oe({isDisabled:o}),{ariaProps:f,labelId:m,descriptionId:p}=It({label:t,description:n,"aria-label":i}),h=()=>t?typeof t=="string"?d.jsx("span",{className:"font-medium",id:m,children:t}):d.jsx("span",{id:m,children:t}):null;return d.jsxs("div",{className:k("relative",r?k(ae.button,Ke({variant:"primary"})):k(ae.button,Ke({variant:"input"})),o&&"pointer-events-none cursor-not-allowed opacity-50",a),children:[d.jsx(Da,{ref:c,checked:r,className:"absolute inset-0 opacity-0",id:e,...f,...s,...u}),d.jsxs("div",{className:"flex items-center gap-2",children:[h(),n?d.jsx("span",{className:"text-sm text-muted-foreground",id:p,children:n}):null]})]})});rd.displayName="RadioButton";const od="aspect-square h-5 w-5 rounded-full border-2 border-gray-500 text-primary-400 ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 aria-disabled:cursor-not-allowed aria-disabled:opacity-50 data-[state=checked]:border-primary-400 ",ad=l.forwardRef(({id:e,label:t,description:n,isChecked:r,isDisabled:o,className:a,"aria-label":i,...s},c)=>{const u=Oe({isDisabled:o}),{ariaProps:f,labelId:m,descriptionId:p}=It({label:t,description:n,"aria-label":i});return d.jsxs("div",{className:k("flex items-start gap-2",o&&"cursor-not-allowed opacity-50 [&>*]:cursor-not-allowed"),children:[d.jsx(Da,{ref:c,checked:r,className:k(ae.focusRingVisible,ae.focusRingVisibleSm,od,a),id:e,...s,...u,...f,children:d.jsx(R0,{className:"flex items-center justify-center",children:d.jsx(vi,{className:"h-3 w-3 fill-current text-current"})})}),d.jsxs("div",{className:"mt-[3px] flex flex-col gap-1",children:[t?typeof t=="string"?d.jsx(nn,{htmlFor:e,id:m,children:t}):d.jsx("div",{id:m,children:t}):null,n?d.jsx("p",{className:"text-sm text-muted-foreground",id:p,children:n}):null]})]})});ad.displayName="RadioDefault";const sd=l.forwardRef(({id:e,label:t,description:n,isChecked:r,isDisabled:o,className:a,"aria-label":i,...s},c)=>{const u=Oe({isDisabled:o}),{ariaProps:f,labelId:m,descriptionId:p}=It({label:t,description:n,"aria-label":i}),h=()=>t?typeof t=="string"?d.jsx("div",{className:"font-medium",id:m,children:t}):d.jsx("div",{id:m,children:t}):null;return d.jsxs("div",{className:k("relative rounded-lg border-2 border-muted bg-popover px-4 py-4",r&&"border-primary-400",o?"cursor-not-allowed opacity-50 [&_*]:cursor-not-allowed":"cursor-pointer hover:bg-accent hover:text-accent-foreground",a),children:[d.jsx(Da,{ref:c,checked:r,className:"absolute inset-0 opacity-0",id:e,...f,...s,...u}),d.jsxs("div",{className:"flex items-start gap-3",children:[d.jsx("div",{className:k(od,"pointer-events-none mt-1",r&&"border-primary-400"),children:r?d.jsx("div",{className:"flex h-full w-full items-center justify-center",children:d.jsx(vi,{className:"h-3 w-3 fill-current text-primary-400"})}):null}),d.jsxs("div",{className:"pointer-events-none space-y-1",children:[h(),n?d.jsx("p",{className:"text-sm text-muted-foreground",id:p,children:n}):null]})]})]})});sd.displayName="RadioTile";const Ta=l.forwardRef(({className:e,label:t,description:n,id:r,"aria-label":o,isChecked:a=!1,isDisabled:i=!1,variant:s="default",...c},u)=>{kl("Radio",t,o);let f=ad;return s==="button"?f=rd:s==="tile"&&(f=sd),d.jsx(f,{ref:u,"aria-label":o,className:e,description:n,id:r,isChecked:a,isDisabled:i,label:t,...c})});Ta.displayName="Radio";const id=l.forwardRef(({options:e,value:t,onChange:n,className:r,columns:o=2,orientation:a="vertical",variant:i="default",...s},c)=>{const u=Qo({variant:i,orientation:a,columns:o});return d.jsx(M0,{ref:c,className:k(u,r),value:t,onValueChange:n,...s,children:e.map(f=>d.jsx(Ta,{description:f.description,id:f.value,isChecked:t===f.value,label:f.label,value:f.value,variant:i},f.value))})});id.displayName="RadioGroup";function Ls(e,[t,n]){return Math.min(n,Math.max(t,e))}var cd=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"}),P0="VisuallyHidden",k0=l.forwardRef((e,t)=>d.jsx(V.span,{...e,ref:t,style:{...cd,...e.style}}));k0.displayName=P0;var O0=[" ","Enter","ArrowUp","ArrowDown"],I0=[" ","Enter"],Pt="Select",[$r,Lr,D0]=Mn(Pt),[rn,rE]=ve(Pt,[D0,Qt]),Wr=Qt(),[T0,Ct]=rn(Pt),[A0,_0]=rn(Pt),ld=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:a,value:i,defaultValue:s,onValueChange:c,dir:u,name:f,autoComplete:m,disabled:p,required:h,form:y}=e,g=Wr(t),[v,w]=l.useState(null),[x,b]=l.useState(null),[S,C]=l.useState(!1),M=xt(u),[N,R]=Ce({prop:r,defaultProp:o??!1,onChange:a,caller:Pt}),[_,A]=Ce({prop:i,defaultProp:s,onChange:c,caller:Pt}),$=l.useRef(null),D=v?y||!!v.closest("form"):!0,[Y,H]=l.useState(new Set),J=Array.from(Y).map(j=>j.props.value).join(";");return d.jsx(ga,{...g,children:d.jsxs(T0,{required:h,scope:t,trigger:v,onTriggerChange:w,valueNode:x,onValueNodeChange:b,valueNodeHasChildren:S,onValueNodeHasChildrenChange:C,contentId:he(),value:_,onValueChange:A,open:N,onOpenChange:R,dir:M,triggerPointerDownPosRef:$,disabled:p,children:[d.jsx($r.Provider,{scope:t,children:d.jsx(A0,{scope:e.__scopeSelect,onNativeOptionAdd:l.useCallback(j=>{H(X=>new Set(X).add(j))},[]),onNativeOptionRemove:l.useCallback(j=>{H(X=>{const F=new Set(X);return F.delete(j),F})},[]),children:n})}),D?d.jsxs(Dd,{"aria-hidden":!0,required:h,tabIndex:-1,name:f,autoComplete:m,value:_,onChange:j=>A(j.target.value),disabled:p,form:y,children:[_===void 0?d.jsx("option",{value:""}):null,Array.from(Y)]},J):null]})})};ld.displayName=Pt;var ud="SelectTrigger",dd=l.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,a=Wr(n),i=Ct(ud,n),s=i.disabled||r,c=q(t,i.onTriggerChange),u=Lr(n),f=l.useRef("touch"),[m,p,h]=Ad(g=>{const v=u().filter(b=>!b.disabled),w=v.find(b=>b.value===i.value),x=_d(v,g,w);x!==void 0&&i.onValueChange(x.value)}),y=g=>{s||(i.onOpenChange(!0),h()),g&&(i.triggerPointerDownPosRef.current={x:Math.round(g.pageX),y:Math.round(g.pageY)})};return d.jsx(Pr,{asChild:!0,...a,children:d.jsx(V.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":Td(i.value)?"":void 0,...o,ref:c,onClick:I(o.onClick,g=>{g.currentTarget.focus(),f.current!=="mouse"&&y(g)}),onPointerDown:I(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"&&(y(g),g.preventDefault())}),onKeyDown:I(o.onKeyDown,g=>{const v=m.current!=="";!(g.ctrlKey||g.altKey||g.metaKey)&&g.key.length===1&&p(g.key),!(v&&g.key===" ")&&O0.includes(g.key)&&(y(),g.preventDefault())})})})});dd.displayName=ud;var fd="SelectValue",md=l.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:a,placeholder:i="",...s}=e,c=Ct(fd,n),{onValueNodeHasChildrenChange:u}=c,f=a!==void 0,m=q(t,c.onValueNodeChange);return fe(()=>{u(f)},[u,f]),d.jsx(V.span,{...s,ref:m,style:{pointerEvents:"none"},children:Td(c.value)?d.jsx(d.Fragment,{children:i}):a})});md.displayName=fd;var j0="SelectIcon",pd=l.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return d.jsx(V.span,{"aria-hidden":!0,...o,ref:t,children:r||"▼"})});pd.displayName=j0;var F0="SelectPortal",hd=e=>d.jsx(kn,{asChild:!0,...e});hd.displayName=F0;var kt="SelectContent",gd=l.forwardRef((e,t)=>{const n=Ct(kt,e.__scopeSelect),[r,o]=l.useState();if(fe(()=>{o(new DocumentFragment)},[]),!n.open){const a=r;return a?En.createPortal(d.jsx(vd,{scope:e.__scopeSelect,children:d.jsx($r.Slot,{scope:e.__scopeSelect,children:d.jsx("div",{children:e.children})})}),a):null}return d.jsx(yd,{...e,ref:t})});gd.displayName=kt;var je=10,[vd,St]=rn(kt),$0="SelectContentImpl",L0=ht("SelectContent.RemoveScroll"),yd=l.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:m,collisionBoundary:p,collisionPadding:h,sticky:y,hideWhenDetached:g,avoidCollisions:v,...w}=e,x=Ct(kt,n),[b,S]=l.useState(null),[C,M]=l.useState(null),N=q(t,T=>S(T)),[R,_]=l.useState(null),[A,$]=l.useState(null),D=Lr(n),[Y,H]=l.useState(!1),J=l.useRef(!1);l.useEffect(()=>{if(b)return vr(b)},[b]),hr();const j=l.useCallback(T=>{const[Q,...K]=D().map(ne=>ne.ref.current),[B]=K.slice(-1),ee=document.activeElement;for(const ne of T)if(ne===ee||(ne==null||ne.scrollIntoView({block:"nearest"}),ne===Q&&C&&(C.scrollTop=0),ne===B&&C&&(C.scrollTop=C.scrollHeight),ne==null||ne.focus(),document.activeElement!==ee))return},[D,C]),X=l.useCallback(()=>j([R,b]),[j,R,b]);l.useEffect(()=>{Y&&X()},[Y,X]);const{onOpenChange:F,triggerPointerDownPosRef:O}=x;l.useEffect(()=>{if(b){let T={x:0,y:0};const Q=B=>{var ee,ne;T={x:Math.abs(Math.round(B.pageX)-(((ee=O.current)==null?void 0:ee.x)??0)),y:Math.abs(Math.round(B.pageY)-(((ne=O.current)==null?void 0:ne.y)??0))}},K=B=>{T.x<=10&&T.y<=10?B.preventDefault():b.contains(B.target)||F(!1),document.removeEventListener("pointermove",Q),O.current=null};return O.current!==null&&(document.addEventListener("pointermove",Q),document.addEventListener("pointerup",K,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",Q),document.removeEventListener("pointerup",K,{capture:!0})}}},[b,F,O]),l.useEffect(()=>{const T=()=>F(!1);return window.addEventListener("blur",T),window.addEventListener("resize",T),()=>{window.removeEventListener("blur",T),window.removeEventListener("resize",T)}},[F]);const[Z,te]=Ad(T=>{const Q=D().filter(ee=>!ee.disabled),K=Q.find(ee=>ee.ref.current===document.activeElement),B=_d(Q,T,K);B&&setTimeout(()=>B.ref.current.focus())}),P=l.useCallback((T,Q,K)=>{const B=!J.current&&!K;(x.value!==void 0&&x.value===Q||B)&&(_(T),B&&(J.current=!0))},[x.value]),W=l.useCallback(()=>b==null?void 0:b.focus(),[b]),G=l.useCallback((T,Q,K)=>{const B=!J.current&&!K;(x.value!==void 0&&x.value===Q||B)&&$(T)},[x.value]),L=r==="popper"?Do:bd,z=L===Do?{side:s,sideOffset:c,align:u,alignOffset:f,arrowPadding:m,collisionBoundary:p,collisionPadding:h,sticky:y,hideWhenDetached:g,avoidCollisions:v}:{};return d.jsx(vd,{scope:n,content:b,viewport:C,onViewportChange:M,itemRefCallback:P,selectedItem:R,onItemLeave:W,itemTextRefCallback:G,focusSelectedItem:X,selectedItemText:A,position:r,isPositioned:Y,searchRef:Z,children:d.jsx(On,{as:L0,allowPinchZoom:!0,children:d.jsx(Pn,{asChild:!0,trapped:x.open,onMountAutoFocus:T=>{T.preventDefault()},onUnmountAutoFocus:I(o,T=>{var Q;(Q=x.trigger)==null||Q.focus({preventScroll:!0}),T.preventDefault()}),children:d.jsx(Rn,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:i,onFocusOutside:T=>T.preventDefault(),onDismiss:()=>x.onOpenChange(!1),children:d.jsx(L,{role:"listbox",id:x.contentId,"data-state":x.open?"open":"closed",dir:x.dir,onContextMenu:T=>T.preventDefault(),...w,...z,onPlaced:()=>H(!0),ref:N,style:{display:"flex",flexDirection:"column",outline:"none",...w.style},onKeyDown:I(w.onKeyDown,T=>{const Q=T.ctrlKey||T.altKey||T.metaKey;if(T.key==="Tab"&&T.preventDefault(),!Q&&T.key.length===1&&te(T.key),["ArrowUp","ArrowDown","Home","End"].includes(T.key)){let B=D().filter(ee=>!ee.disabled).map(ee=>ee.ref.current);if(["ArrowUp","End"].includes(T.key)&&(B=B.slice().reverse()),["ArrowUp","ArrowDown"].includes(T.key)){const ee=T.target,ne=B.indexOf(ee);B=B.slice(ne+1)}setTimeout(()=>j(B)),T.preventDefault()}})})})})})})});yd.displayName=$0;var W0="SelectItemAlignedPosition",bd=l.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,a=Ct(kt,n),i=St(kt,n),[s,c]=l.useState(null),[u,f]=l.useState(null),m=q(t,N=>f(N)),p=Lr(n),h=l.useRef(!1),y=l.useRef(!0),{viewport:g,selectedItem:v,selectedItemText:w,focusSelectedItem:x}=i,b=l.useCallback(()=>{if(a.trigger&&a.valueNode&&s&&u&&g&&v&&w){const N=a.trigger.getBoundingClientRect(),R=u.getBoundingClientRect(),_=a.valueNode.getBoundingClientRect(),A=w.getBoundingClientRect();if(a.dir!=="rtl"){const ee=A.left-R.left,ne=_.left-ee,le=N.left-ne,ye=N.width+le,et=Math.max(ye,R.width),tt=window.innerWidth-je,nt=Ls(ne,[je,Math.max(je,tt-et)]);s.style.minWidth=ye+"px",s.style.left=nt+"px"}else{const ee=R.right-A.right,ne=window.innerWidth-_.right-ee,le=window.innerWidth-N.right-ne,ye=N.width+le,et=Math.max(ye,R.width),tt=window.innerWidth-je,nt=Ls(ne,[je,Math.max(je,tt-et)]);s.style.minWidth=ye+"px",s.style.right=nt+"px"}const $=p(),D=window.innerHeight-je*2,Y=g.scrollHeight,H=window.getComputedStyle(u),J=parseInt(H.borderTopWidth,10),j=parseInt(H.paddingTop,10),X=parseInt(H.borderBottomWidth,10),F=parseInt(H.paddingBottom,10),O=J+j+Y+F+X,Z=Math.min(v.offsetHeight*5,O),te=window.getComputedStyle(g),P=parseInt(te.paddingTop,10),W=parseInt(te.paddingBottom,10),G=N.top+N.height/2-je,L=D-G,z=v.offsetHeight/2,T=v.offsetTop+z,Q=J+j+T,K=O-Q;if(Q<=G){const ee=$.length>0&&v===$[$.length-1].ref.current;s.style.bottom="0px";const ne=u.clientHeight-g.offsetTop-g.offsetHeight,le=Math.max(L,z+(ee?W:0)+ne+X),ye=Q+le;s.style.height=ye+"px"}else{const ee=$.length>0&&v===$[0].ref.current;s.style.top="0px";const le=Math.max(G,J+g.offsetTop+(ee?P:0)+z)+K;s.style.height=le+"px",g.scrollTop=Q-G+g.offsetTop}s.style.margin=`${je}px 0`,s.style.minHeight=Z+"px",s.style.maxHeight=D+"px",r==null||r(),requestAnimationFrame(()=>h.current=!0)}},[p,a.trigger,a.valueNode,s,u,g,v,w,a.dir,r]);fe(()=>b(),[b]);const[S,C]=l.useState();fe(()=>{u&&C(window.getComputedStyle(u).zIndex)},[u]);const M=l.useCallback(N=>{N&&y.current===!0&&(b(),x==null||x(),y.current=!1)},[b,x]);return d.jsx(V0,{scope:n,contentWrapper:s,shouldExpandOnScrollRef:h,onScrollButtonChange:M,children:d.jsx("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:S},children:d.jsx(V.div,{...o,ref:m,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});bd.displayName=W0;var B0="SelectPopperPosition",Do=l.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=je,...a}=e,i=Wr(n);return d.jsx(va,{...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)"}})});Do.displayName=B0;var[V0,Aa]=rn(kt,{}),To="SelectViewport",xd=l.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...o}=e,a=St(To,n),i=Aa(To,n),s=q(t,a.onViewportChange),c=l.useRef(0);return d.jsxs(d.Fragment,{children:[d.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"},nonce:r}),d.jsx($r.Slot,{scope:n,children:d.jsx(V.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:s,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:I(o.onScroll,u=>{const f=u.currentTarget,{contentWrapper:m,shouldExpandOnScrollRef:p}=i;if(p!=null&&p.current&&m){const h=Math.abs(c.current-f.scrollTop);if(h>0){const y=window.innerHeight-je*2,g=parseFloat(m.style.minHeight),v=parseFloat(m.style.height),w=Math.max(g,v);if(w<y){const x=w+h,b=Math.min(y,x),S=x-b;m.style.height=b+"px",m.style.bottom==="0px"&&(f.scrollTop=S>0?S:0,m.style.justifyContent="flex-end")}}}c.current=f.scrollTop})})})]})});xd.displayName=To;var wd="SelectGroup",[Y0,H0]=rn(wd),Cd=l.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=he();return d.jsx(Y0,{scope:n,id:o,children:d.jsx(V.div,{role:"group","aria-labelledby":o,...r,ref:t})})});Cd.displayName=wd;var Sd="SelectLabel",Nd=l.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=H0(Sd,n);return d.jsx(V.div,{id:o.id,...r,ref:t})});Nd.displayName=Sd;var ur="SelectItem",[G0,Ed]=rn(ur),Md=l.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:a,...i}=e,s=Ct(ur,n),c=St(ur,n),u=s.value===r,[f,m]=l.useState(a??""),[p,h]=l.useState(!1),y=q(t,x=>{var b;return(b=c.itemRefCallback)==null?void 0:b.call(c,x,r,o)}),g=he(),v=l.useRef("touch"),w=()=>{o||(s.onValueChange(r),s.onOpenChange(!1))};if(r==="")throw new Error("A <Select.Item /> must have a value prop that is not an empty string. This is because the Select value can be set to an empty string to clear the selection and show the placeholder.");return d.jsx(G0,{scope:n,value:r,disabled:o,textId:g,isSelected:u,onItemTextChange:l.useCallback(x=>{m(b=>b||((x==null?void 0:x.textContent)??"").trim())},[]),children:d.jsx($r.ItemSlot,{scope:n,value:r,disabled:o,textValue:f,children:d.jsx(V.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:y,onFocus:I(i.onFocus,()=>h(!0)),onBlur:I(i.onBlur,()=>h(!1)),onClick:I(i.onClick,()=>{v.current!=="mouse"&&w()}),onPointerUp:I(i.onPointerUp,()=>{v.current==="mouse"&&w()}),onPointerDown:I(i.onPointerDown,x=>{v.current=x.pointerType}),onPointerMove:I(i.onPointerMove,x=>{var b;v.current=x.pointerType,o?(b=c.onItemLeave)==null||b.call(c):v.current==="mouse"&&x.currentTarget.focus({preventScroll:!0})}),onPointerLeave:I(i.onPointerLeave,x=>{var b;x.currentTarget===document.activeElement&&((b=c.onItemLeave)==null||b.call(c))}),onKeyDown:I(i.onKeyDown,x=>{var S;((S=c.searchRef)==null?void 0:S.current)!==""&&x.key===" "||(I0.includes(x.key)&&w(),x.key===" "&&x.preventDefault())})})})})});Md.displayName=ur;var pn="SelectItemText",Rd=l.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,...a}=e,i=Ct(pn,n),s=St(pn,n),c=Ed(pn,n),u=_0(pn,n),[f,m]=l.useState(null),p=q(t,w=>m(w),c.onItemTextChange,w=>{var x;return(x=s.itemTextRefCallback)==null?void 0:x.call(s,w,c.value,c.disabled)}),h=f==null?void 0:f.textContent,y=l.useMemo(()=>d.jsx("option",{value:c.value,disabled:c.disabled,children:h},c.value),[c.disabled,c.value,h]),{onNativeOptionAdd:g,onNativeOptionRemove:v}=u;return fe(()=>(g(y),()=>v(y)),[g,v,y]),d.jsxs(d.Fragment,{children:[d.jsx(V.span,{id:c.textId,...a,ref:p}),c.isSelected&&i.valueNode&&!i.valueNodeHasChildren?En.createPortal(a.children,i.valueNode):null]})});Rd.displayName=pn;var Pd="SelectItemIndicator",kd=l.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return Ed(Pd,n).isSelected?d.jsx(V.span,{"aria-hidden":!0,...r,ref:t}):null});kd.displayName=Pd;var Ao="SelectScrollUpButton",U0=l.forwardRef((e,t)=>{const n=St(Ao,e.__scopeSelect),r=Aa(Ao,e.__scopeSelect),[o,a]=l.useState(!1),i=q(t,r.onScrollButtonChange);return fe(()=>{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?d.jsx(Od,{...e,ref:i,onAutoScroll:()=>{const{viewport:s,selectedItem:c}=n;s&&c&&(s.scrollTop=s.scrollTop-c.offsetHeight)}}):null});U0.displayName=Ao;var _o="SelectScrollDownButton",z0=l.forwardRef((e,t)=>{const n=St(_o,e.__scopeSelect),r=Aa(_o,e.__scopeSelect),[o,a]=l.useState(!1),i=q(t,r.onScrollButtonChange);return fe(()=>{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?d.jsx(Od,{...e,ref:i,onAutoScroll:()=>{const{viewport:s,selectedItem:c}=n;s&&c&&(s.scrollTop=s.scrollTop+c.offsetHeight)}}):null});z0.displayName=_o;var Od=l.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,a=St("SelectScrollButton",n),i=l.useRef(null),s=Lr(n),c=l.useCallback(()=>{i.current!==null&&(window.clearInterval(i.current),i.current=null)},[]);return l.useEffect(()=>()=>c(),[c]),fe(()=>{var f;const u=s().find(m=>m.ref.current===document.activeElement);(f=u==null?void 0:u.ref.current)==null||f.scrollIntoView({block:"nearest"})},[s]),d.jsx(V.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:I(o.onPointerDown,()=>{i.current===null&&(i.current=window.setInterval(r,50))}),onPointerMove:I(o.onPointerMove,()=>{var u;(u=a.onItemLeave)==null||u.call(a),i.current===null&&(i.current=window.setInterval(r,50))}),onPointerLeave:I(o.onPointerLeave,()=>{c()})})}),K0="SelectSeparator",Id=l.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return d.jsx(V.div,{"aria-hidden":!0,...r,ref:t})});Id.displayName=K0;var jo="SelectArrow",q0=l.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Wr(n),a=Ct(jo,n),i=St(jo,n);return a.open&&i.position==="popper"?d.jsx(ya,{...o,...r,ref:t}):null});q0.displayName=jo;var X0="SelectBubbleInput",Dd=l.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const o=l.useRef(null),a=q(r,o),i=Ir(t);return l.useEffect(()=>{const s=o.current;if(!s)return;const c=window.HTMLSelectElement.prototype,f=Object.getOwnPropertyDescriptor(c,"value").set;if(i!==t&&f){const m=new Event("change",{bubbles:!0});f.call(s,t),s.dispatchEvent(m)}},[i,t]),d.jsx(V.select,{...n,style:{...cd,...n.style},ref:a,defaultValue:t})});Dd.displayName=X0;function Td(e){return e===""||e===void 0}function Ad(e){const t=Ne(e),n=l.useRef(""),r=l.useRef(0),o=l.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=l.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return l.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,o,a]}function _d(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=Z0(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 Z0(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var Q0=ld,jd=dd,J0=md,eS=pd,tS=hd,Fd=gd,nS=xd,rS=Cd,$d=Nd,Ld=Md,oS=Rd,aS=kd,Wd=Id;const _a=l.forwardRef(({className:e,children:t,position:n="popper",zIndex:r,style:o,...a},i)=>d.jsx(tS,{children:d.jsx(Fd,{ref:i,className:k(`relative min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground
|
|
179
177
|
shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out
|
|
180
178
|
data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95
|
|
181
179
|
data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2
|
|
182
180
|
data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2
|
|
183
181
|
data-[side=top]:slide-in-from-bottom-2`,n==="popper"&&`data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1
|
|
184
|
-
data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1`,e),position:n,style:{zIndex:r,...o},...a,children:d.jsx(
|
|
185
|
-
min-w-[var(--radix-select-trigger-width)]`),children:t})})}));_a.displayName=
|
|
182
|
+
data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1`,e),position:n,style:{zIndex:r,...o},...a,children:d.jsx(nS,{className:k("px-1 py-1",n==="popper"&&`h-[var(--radix-select-trigger-height)] w-full
|
|
183
|
+
min-w-[var(--radix-select-trigger-width)]`),children:t})})}));_a.displayName=Fd.displayName;const ja=l.forwardRef(({className:e,children:t,...n},r)=>d.jsxs(Ld,{ref:r,className:k(`relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2
|
|
186
184
|
text-sm outline-none focus:bg-accent focus:text-accent-foreground
|
|
187
|
-
data-[disabled]:pointer-events-none data-[disabled]:opacity-50`,e),...n,children:[d.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:d.jsx(
|
|
188
|
-
[&>span]:truncate [&>span]:text-muted-foreground [&>svg]:flex-shrink-0`,e),...r,...a,children:[t,d.jsx(
|
|
189
|
-
font-bold`,{variants:{status:{default:"border-muted text-muted-foreground",current:"border-primary-400 text-primary-400",completed:"border-primary-400 bg-primary-400 text-white"}},defaultVariants:{status:"default"}}),
|
|
190
|
-
bg-primary-400 text-white`,children:t}),d.jsx("span",{className:"text-primary-400",children:"of"}),d.jsx("span",{className:"text-primary-400",children:r})]}),d.jsx("span",{className:"font-bold",children:e})]})}function
|
|
185
|
+
data-[disabled]:pointer-events-none data-[disabled]:opacity-50`,e),...n,children:[d.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:d.jsx(aS,{children:d.jsx(Ot,{className:"h-4 w-4",strokeWidth:3})})}),d.jsx(oS,{children:t})]}));ja.displayName=Ld.displayName;const Fa=l.forwardRef(({className:e,children:t,isDisabled:n=!1,...r},o)=>{const a=Oe({isDisabled:n});return d.jsxs(jd,{ref:o,className:k(ae.input,ae.focusRing,`min-w-0 items-center justify-between text-left [&>span]:min-w-0 [&>span]:flex-1
|
|
186
|
+
[&>span]:truncate [&>span]:text-muted-foreground [&>svg]:flex-shrink-0`,e),...r,...a,children:[t,d.jsx(eS,{asChild:!0,children:d.jsx(qo,{className:"h-4 w-4 opacity-50"})})]})});Fa.displayName=jd.displayName;const Bd=Q0,sS=rS,Vd=J0,$a=l.forwardRef(({options:e,value:t,onChange:n,placeholder:r="Select an option",className:o,zIndex:a,isDisabled:i,required:s,name:c,autoFocus:u,...f},m)=>{const p=Ye("dropdown",a);return d.jsxs(Bd,{name:c,required:s,value:t,onValueChange:n,children:[d.jsx(Fa,{ref:m,autoFocus:u,className:k("w-full justify-between",!t&&"text-muted-foreground",o),isDisabled:i,...f,children:d.jsx(Vd,{placeholder:r})}),d.jsx(_a,{zIndex:p,children:e.map(h=>d.jsx(ja,{value:h.value,children:h.label},h.value))})]})});$a.displayName="Select";const Yd=l.forwardRef(({className:e,...t},n)=>d.jsx($d,{ref:n,className:k("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}));Yd.displayName=$d.displayName;const Hd=l.forwardRef(({className:e,...t},n)=>d.jsx(Wd,{ref:n,className:k("-mx-1 my-1 h-px bg-muted",e),...t}));Hd.displayName=Wd.displayName;const iS=Se("flex",{variants:{orientation:{horizontal:"flex-row gap-6",vertical:"flex-col gap-10"}},defaultVariants:{orientation:"horizontal"}}),cS=Se(`text-md relative z-10 flex h-9 w-9 items-center justify-center rounded-full border-4 bg-white
|
|
187
|
+
font-bold`,{variants:{status:{default:"border-muted text-muted-foreground",current:"border-primary-400 text-primary-400",completed:"border-primary-400 bg-primary-400 text-white"}},defaultVariants:{status:"default"}}),lS=Se("absolute",{variants:{status:{default:"bg-muted",current:"bg-muted",completed:"bg-primary-400"},orientation:{horizontal:"left-[calc(50%_+_1.5rem)] top-4 h-1 w-[calc(100%_-_1.5rem)]",vertical:"left-4 top-[calc(100%_-_0.125rem)] h-[calc(100%_-_0.25rem)] w-1"}},defaultVariants:{status:"default",orientation:"horizontal"}}),uS=Se("flex flex-col gap-8",{variants:{orientation:{horizontal:"",vertical:""}}}),dS=Se("mb-0 mt-0 flex gap-1 pl-0",{variants:{orientation:{horizontal:"flex-row",vertical:"flex-col"}},defaultVariants:{orientation:"horizontal"}}),fS=Se("relative",{variants:{status:{default:"bg-muted",current:"bg-primary-400",completed:"bg-primary-500"},orientation:{horizontal:"h-2 max-h-2 min-h-2 flex-1",vertical:"w-2 min-w-2 max-w-2 flex-1"}},defaultVariants:{status:"default",orientation:"horizontal"}}),mS=Se("text-base font-medium leading-tight",{variants:{status:{default:"text-muted-foreground",completed:"text-foreground",current:"font-bold text-primary-400"}},defaultVariants:{status:"default"}}),pS=Se("mt-0.5 text-sm text-muted-foreground",{variants:{status:{default:"",completed:"text-foreground",current:"font-medium text-primary-400"}},defaultVariants:{status:"default"}});function Gd({className:e,description:t,label:n,status:r}){return d.jsxs("div",{className:e,children:[d.jsx("span",{className:k(mS({status:r})),children:n}),t?d.jsx("span",{className:k(pS({status:r})),children:t}):null]})}function Ud(e,t){return t?"completed":e?"current":"default"}function zd(e){return e==="completed"?" completed":e==="current"?"":" not completed"}function hS({currentStep:e,currentStepIndex:t,orientation:n,showCurrentAsCompleted:r,showLabels:o,steps:a}){return d.jsx("ol",{"aria-label":"Steps",className:k(iS({orientation:n})),children:a.map((i,s)=>{const c=i.id===e,u=t!==-1&&(s<t||r&&c),f=Ud(c,u);return d.jsxs("li",{className:k("relative flex items-start",n==="horizontal"&&"flex-1 justify-center"),...c&&{"aria-current":"step"},children:[d.jsxs("span",{className:"sr-only",children:[i.label,zd(f)]}),d.jsxs("div",{className:k("relative flex",n==="vertical"?"flex-row items-start":"flex-col items-center"),children:[d.jsx("div",{className:k(cS({status:f})),children:f==="completed"?d.jsx(Ot,{className:"h-4 w-4",strokeWidth:3}):d.jsx("span",{children:(s+1).toString()})}),o?d.jsx(Gd,{className:k("flex flex-col",n==="vertical"?"ml-4":"mt-2 text-center"),description:i.description,label:i.label,status:f}):null]}),s<a.length-1?d.jsx("div",{className:k(lS({orientation:n,status:f}))}):null]},i.id)})})}function gS({currentStepLabel:e,currentStepNumber:t,headingLevel:n="h4",totalSteps:r}){const o=n;return d.jsxs(o,{className:"mb-0 mt-0 flex items-center gap-3 text-xl",children:[d.jsxs("span",{className:"inline-flex items-center gap-1",children:[d.jsx("span",{className:"sr-only",children:"Step"}),d.jsx("span",{className:`mr-0.5 inline-flex h-9 w-9 items-center justify-center rounded-full
|
|
188
|
+
bg-primary-400 text-white`,children:t}),d.jsx("span",{className:"text-primary-400",children:"of"}),d.jsx("span",{className:"text-primary-400",children:r})]}),d.jsx("span",{className:"font-bold",children:e})]})}function vS({currentStep:e,currentStepIndex:t,showCurrentAsCompleted:n,showLabels:r,steps:o}){return d.jsx("ol",{"aria-label":"Steps",className:k(dS({orientation:"horizontal"})),children:o.map((a,i)=>{const s=a.id===e,c=t!==-1&&(i<t||n&&s),u=Ud(s,c);return d.jsxs("li",{className:"flex flex-1 flex-col",...s&&{"aria-current":"step"},children:[d.jsx("div",{className:k(fS({status:u,orientation:"horizontal"})),children:d.jsxs("span",{className:"sr-only",children:[a.label,zd(u)]})}),r?d.jsx(Gd,{className:"mt-2 flex flex-col",description:a.description,label:a.label,status:u}):null]},a.id)})})}function yS({className:e,currentStep:t,headingLevel:n="h4",showCurrentAsCompleted:r=!1,showLabels:o=!0,variant:a="default",steps:i,...s},c){const u=i.findIndex(h=>h.id===t),f=i[u],m=u+1,p=i.length;return d.jsxs("section",{ref:c,"aria-label":"Step indicator",className:k(uS({orientation:"horizontal"}),e),...s,children:[a==="counter"?d.jsx(hS,{currentStep:t,currentStepIndex:u,orientation:"horizontal",showCurrentAsCompleted:r,showLabels:o,steps:i}):d.jsx(vS,{currentStep:t,currentStepIndex:u,showCurrentAsCompleted:r,showLabels:o,steps:i}),d.jsx(gS,{currentStepLabel:f==null?void 0:f.label,currentStepNumber:m,headingLevel:n,totalSteps:p})]})}const Kd=l.forwardRef(yS);Kd.displayName="StepIndicator";const bS=Kd;var Br="Switch",[xS,oE]=ve(Br),[wS,CS]=xS(Br),qd=l.forwardRef((e,t)=>{const{__scopeSwitch:n,name:r,checked:o,defaultChecked:a,required:i,disabled:s,value:c="on",onCheckedChange:u,form:f,...m}=e,[p,h]=l.useState(null),y=q(t,b=>h(b)),g=l.useRef(!1),v=p?f||!!p.closest("form"):!0,[w,x]=Ce({prop:o,defaultProp:a??!1,onChange:u,caller:Br});return d.jsxs(wS,{scope:n,checked:w,disabled:s,children:[d.jsx(V.button,{type:"button",role:"switch","aria-checked":w,"aria-required":i,"data-state":Jd(w),"data-disabled":s?"":void 0,disabled:s,value:c,...m,ref:y,onClick:I(e.onClick,b=>{x(S=>!S),v&&(g.current=b.isPropagationStopped(),g.current||b.stopPropagation())})}),v&&d.jsx(Qd,{control:p,bubbles:!g.current,name:r,value:c,checked:w,required:i,disabled:s,form:f,style:{transform:"translateX(-100%)"}})]})});qd.displayName=Br;var Xd="SwitchThumb",Zd=l.forwardRef((e,t)=>{const{__scopeSwitch:n,...r}=e,o=CS(Xd,n);return d.jsx(V.span,{"data-state":Jd(o.checked),"data-disabled":o.disabled?"":void 0,...r,ref:t})});Zd.displayName=Xd;var SS="SwitchBubbleInput",Qd=l.forwardRef(({__scopeSwitch:e,control:t,checked:n,bubbles:r=!0,...o},a)=>{const i=l.useRef(null),s=q(i,a),c=Ir(n),u=Tn(t);return l.useEffect(()=>{const f=i.current;if(!f)return;const m=window.HTMLInputElement.prototype,h=Object.getOwnPropertyDescriptor(m,"checked").set;if(c!==n&&h){const y=new Event("click",{bubbles:r});h.call(f,n),f.dispatchEvent(y)}},[c,n,r]),d.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...o,tabIndex:-1,ref:s,style:{...o.style,...u,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});Qd.displayName=SS;function Jd(e){return e?"checked":"unchecked"}var ef=qd,NS=Zd;const La=l.forwardRef(({className:e,label:t,id:n,"aria-label":r,isChecked:o=!1,isDisabled:a=!1,...i},s)=>{const c=Oe({isDisabled:a});if(!t&&!r)throw new Error("Switch must have either a label prop or an aria-label attribute");if(t&&r)throw new Error("Switch must have either a label prop or an aria-label attribute, but not both");return d.jsxs("div",{className:"flex items-center space-x-2",children:[d.jsx(ef,{"aria-label":r,checked:o,className:k(ae.focusRingVisible,`peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2
|
|
191
189
|
border-transparent transition-colors disabled:cursor-not-allowed disabled:opacity-50
|
|
192
|
-
data-[state=checked]:bg-primary-400 data-[state=unchecked]:bg-muted`,e),...i,...c,ref:s,id:n,children:d.jsx(
|
|
190
|
+
data-[state=checked]:bg-primary-400 data-[state=unchecked]:bg-muted`,e),...i,...c,ref:s,id:n,children:d.jsx(NS,{className:k(`pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0
|
|
193
191
|
transition-transform data-[state=checked]:translate-x-5
|
|
194
|
-
data-[state=unchecked]:translate-x-0`)})}),t?typeof t=="string"?d.jsx(nn,{htmlFor:n,children:t}):t:null]})});La.displayName=Jd.displayName;const ef=E.forwardRef(({options:e,value:t,onChange:n,className:r,columns:o=1,...a},i)=>{const s=E.useCallback((c,u)=>{u?(p=>n([...t,p]))(c):(p=>n(t.filter(h=>h!==p)))(c)},[n,t]);return d.jsx("div",{ref:i,className:k("",r),...a,children:d.jsx("div",{className:k("grid gap-3",`grid-cols-${o}`),children:e.map(c=>d.jsx(La,{id:c.id,isChecked:t.includes(c.id),isDisabled:c.isDisabled,label:c.label,onCheckedChange:u=>s(c.id,u)},c.id))})})});ef.displayName="SwitchGroup";function Fo(e){const t=NS(e),n=l.forwardRef((r,o)=>{const{children:a,...i}=r,s=l.Children.toArray(a),c=s.find(MS);if(c){const u=c.props.children,f=s.map(m=>m===c?l.Children.count(u)>1?l.Children.only(null):l.isValidElement(u)?u.props.children:null:m);return d.jsx(t,{...i,ref:o,children:l.isValidElement(u)?l.cloneElement(u,void 0,f):null})}return d.jsx(t,{...i,ref:o,children:a})});return n.displayName=`${e}.Slot`,n}function NS(e){const t=l.forwardRef((n,r)=>{const{children:o,...a}=n;if(l.isValidElement(o)){const i=PS(o),s=RS(a,o.props);return o.type!==l.Fragment&&(s.ref=r?Xe(r,i):i),l.cloneElement(o,s)}return l.Children.count(o)>1?l.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var ES=Symbol("radix.slottable");function MS(e){return l.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===ES}function RS(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 PS(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 kS(e){const t=e+"CollectionProvider",[n,r]=ve(t),[o,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),i=g=>{const{scope:v,children:w}=g,x=E.useRef(null),b=E.useRef(new Map).current;return d.jsx(o,{scope:v,itemMap:b,collectionRef:x,children:w})};i.displayName=t;const s=e+"CollectionSlot",c=Fo(s),u=E.forwardRef((g,v)=>{const{scope:w,children:x}=g,b=a(s,w),S=q(v,b.collectionRef);return d.jsx(c,{ref:S,children:x})});u.displayName=s;const f=e+"CollectionItemSlot",m="data-radix-collection-item",p=Fo(f),h=E.forwardRef((g,v)=>{const{scope:w,children:x,...b}=g,S=E.useRef(null),C=q(v,S),M=a(f,w);return E.useEffect(()=>(M.itemMap.set(S,{ref:S,...b}),()=>void M.itemMap.delete(S))),d.jsx(p,{[m]:"",ref:C,children:x})});h.displayName=f;function y(g){const v=a(e+"CollectionConsumer",g);return E.useCallback(()=>{const x=v.collectionRef.current;if(!x)return[];const b=Array.from(x.querySelectorAll(`[${m}]`));return Array.from(v.itemMap.values()).sort((M,N)=>b.indexOf(M.ref.current)-b.indexOf(N.ref.current))},[v.collectionRef,v.itemMap])}return[{Provider:i,Slot:u,ItemSlot:h},y,r]}var OS=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],on=OS.reduce((e,t)=>{const n=Fo(`Primitive.${t}`),r=l.forwardRef((o,a)=>{const{asChild:i,...s}=o,c=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),d.jsx(c,{...s,ref:a})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),vo="rovingFocusGroup.onEntryFocus",IS={bubbles:!1,cancelable:!0},Vn="RovingFocusGroup",[$o,tf,DS]=kS(Vn),[TS,nf]=ve(Vn,[DS]),[AS,_S]=TS(Vn),rf=l.forwardRef((e,t)=>d.jsx($o.Provider,{scope:e.__scopeRovingFocusGroup,children:d.jsx($o.Slot,{scope:e.__scopeRovingFocusGroup,children:d.jsx(jS,{...e,ref:t})})}));rf.displayName=Vn;var jS=l.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:a,currentTabStopId:i,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:c,onEntryFocus:u,preventScrollOnEntryFocus:f=!1,...m}=e,p=l.useRef(null),h=q(t,p),y=xt(a),[g,v]=Ce({prop:i,defaultProp:s??null,onChange:c,caller:Vn}),[w,x]=l.useState(!1),b=Ne(u),S=tf(n),C=l.useRef(!1),[M,N]=l.useState(0);return l.useEffect(()=>{const R=p.current;if(R)return R.addEventListener(vo,b),()=>R.removeEventListener(vo,b)},[b]),d.jsx(AS,{scope:n,orientation:r,dir:y,loop:o,currentTabStopId:g,onItemFocus:l.useCallback(R=>v(R),[v]),onItemShiftTab:l.useCallback(()=>x(!0),[]),onFocusableItemAdd:l.useCallback(()=>N(R=>R+1),[]),onFocusableItemRemove:l.useCallback(()=>N(R=>R-1),[]),children:d.jsx(on.div,{tabIndex:w||M===0?-1:0,"data-orientation":r,...m,ref:h,style:{outline:"none",...e.style},onMouseDown:I(e.onMouseDown,()=>{C.current=!0}),onFocus:I(e.onFocus,R=>{const _=!C.current;if(R.target===R.currentTarget&&_&&!w){const A=new CustomEvent(vo,IS);if(R.currentTarget.dispatchEvent(A),!A.defaultPrevented){const $=S().filter(j=>j.focusable),D=$.find(j=>j.active),Y=$.find(j=>j.id===g),J=[D,Y,...$].filter(Boolean).map(j=>j.ref.current);sf(J,f)}}C.current=!1}),onBlur:I(e.onBlur,()=>x(!1))})})}),of="RovingFocusGroupItem",af=l.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:a,children:i,...s}=e,c=he(),u=a||c,f=_S(of,n),m=f.currentTabStopId===u,p=tf(n),{onFocusableItemAdd:h,onFocusableItemRemove:y,currentTabStopId:g}=f;return l.useEffect(()=>{if(r)return h(),()=>y()},[r,h,y]),d.jsx($o.ItemSlot,{scope:n,id:u,focusable:r,active:o,children:d.jsx(on.span,{tabIndex:m?0:-1,"data-orientation":f.orientation,...s,ref:t,onMouseDown:I(e.onMouseDown,v=>{r?f.onItemFocus(u):v.preventDefault()}),onFocus:I(e.onFocus,()=>f.onItemFocus(u)),onKeyDown:I(e.onKeyDown,v=>{if(v.key==="Tab"&&v.shiftKey){f.onItemShiftTab();return}if(v.target!==v.currentTarget)return;const w=LS(v,f.orientation,f.dir);if(w!==void 0){if(v.metaKey||v.ctrlKey||v.altKey||v.shiftKey)return;v.preventDefault();let b=p().filter(S=>S.focusable).map(S=>S.ref.current);if(w==="last")b.reverse();else if(w==="prev"||w==="next"){w==="prev"&&b.reverse();const S=b.indexOf(v.currentTarget);b=f.loop?WS(b,S+1):b.slice(S+1)}setTimeout(()=>sf(b))}}),children:typeof i=="function"?i({isCurrentTabStop:m,hasTabStop:g!=null}):i})})});af.displayName=of;var FS={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function $S(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function LS(e,t,n){const r=$S(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return FS[r]}function sf(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function WS(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var BS=rf,VS=af;function YS(e,t){return l.useReducer((n,r)=>t[n][r]??n,e)}var cf=e=>{const{present:t,children:n}=e,r=HS(t),o=typeof n=="function"?n({present:r.isPresent}):l.Children.only(n),a=q(r.ref,GS(o));return typeof n=="function"||r.isPresent?l.cloneElement(o,{ref:a}):null};cf.displayName="Presence";function HS(e){const[t,n]=l.useState(),r=l.useRef(null),o=l.useRef(e),a=l.useRef("none"),i=e?"mounted":"unmounted",[s,c]=YS(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return l.useEffect(()=>{const u=Zn(r.current);a.current=s==="mounted"?u:"none"},[s]),fe(()=>{const u=r.current,f=o.current;if(f!==e){const p=a.current,h=Zn(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]),fe(()=>{if(t){let u;const f=t.ownerDocument.defaultView??window,m=h=>{const g=Zn(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=Zn(r.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",m),t.addEventListener("animationend",m),()=>{f.clearTimeout(u),t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",m),t.removeEventListener("animationend",m)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:l.useCallback(u=>{r.current=u?getComputedStyle(u):null,n(u)},[])}}function Zn(e){return(e==null?void 0:e.animationName)||"none"}function GS(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 Vr="Tabs",[US,oE]=ve(Vr,[nf]),lf=nf(),[zS,Wa]=US(Vr),uf=l.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:o,defaultValue:a,orientation:i="horizontal",dir:s,activationMode:c="automatic",...u}=e,f=xt(s),[m,p]=Ce({prop:r,onChange:o,defaultProp:a??"",caller:Vr});return d.jsx(zS,{scope:n,baseId:he(),value:m,onValueChange:p,orientation:i,dir:f,activationMode:c,children:d.jsx(on.div,{dir:f,"data-orientation":i,...u,ref:t})})});uf.displayName=Vr;var df="TabsList",ff=l.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...o}=e,a=Wa(df,n),i=lf(n);return d.jsx(BS,{asChild:!0,...i,orientation:a.orientation,dir:a.dir,loop:r,children:d.jsx(on.div,{role:"tablist","aria-orientation":a.orientation,...o,ref:t})})});ff.displayName=df;var mf="TabsTrigger",pf=l.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:o=!1,...a}=e,i=Wa(mf,n),s=lf(n),c=vf(i.baseId,r),u=yf(i.baseId,r),f=r===i.value;return d.jsx(VS,{asChild:!0,...s,focusable:!o,active:f,children:d.jsx(on.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:I(e.onMouseDown,m=>{!o&&m.button===0&&m.ctrlKey===!1?i.onValueChange(r):m.preventDefault()}),onKeyDown:I(e.onKeyDown,m=>{[" ","Enter"].includes(m.key)&&i.onValueChange(r)}),onFocus:I(e.onFocus,()=>{const m=i.activationMode!=="manual";!f&&!o&&m&&i.onValueChange(r)})})})});pf.displayName=mf;var hf="TabsContent",gf=l.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:o,children:a,...i}=e,s=Wa(hf,n),c=vf(s.baseId,r),u=yf(s.baseId,r),f=r===s.value,m=l.useRef(f);return l.useEffect(()=>{const p=requestAnimationFrame(()=>m.current=!1);return()=>cancelAnimationFrame(p)},[]),d.jsx(cf,{present:o||f,children:({present:p})=>d.jsx(on.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:m.current?"0s":void 0},children:p&&a})})});gf.displayName=hf;function vf(e,t){return`${e}-trigger-${t}`}function yf(e,t){return`${e}-content-${t}`}var bf=uf,xf=ff,wf=pf,Cf=gf;const Sf=l.forwardRef(({...e},t)=>d.jsx(bf,{ref:t,activationMode:"manual",...e}));Sf.displayName=bf.displayName;const Nf=l.forwardRef(({className:e,...t},n)=>d.jsx(xf,{ref:n,className:k(`inline-flex items-center justify-center gap-1 rounded border-[1px] border-base-300 bg-white
|
|
195
|
-
p-1 text-muted-foreground`,e),...t}));
|
|
192
|
+
data-[state=unchecked]:translate-x-0`)})}),t?typeof t=="string"?d.jsx(nn,{htmlFor:n,children:t}):t:null]})});La.displayName=ef.displayName;const tf=E.forwardRef(({options:e,value:t,onChange:n,className:r,columns:o=1,...a},i)=>{const s=E.useCallback((c,u)=>{u?(p=>n([...t,p]))(c):(p=>n(t.filter(h=>h!==p)))(c)},[n,t]);return d.jsx("div",{ref:i,className:k("",r),...a,children:d.jsx("div",{className:k("grid gap-3",`grid-cols-${o}`),children:e.map(c=>d.jsx(La,{id:c.id,isChecked:t.includes(c.id),isDisabled:c.isDisabled,label:c.label,onCheckedChange:u=>s(c.id,u)},c.id))})})});tf.displayName="SwitchGroup";function Fo(e){const t=ES(e),n=l.forwardRef((r,o)=>{const{children:a,...i}=r,s=l.Children.toArray(a),c=s.find(RS);if(c){const u=c.props.children,f=s.map(m=>m===c?l.Children.count(u)>1?l.Children.only(null):l.isValidElement(u)?u.props.children:null:m);return d.jsx(t,{...i,ref:o,children:l.isValidElement(u)?l.cloneElement(u,void 0,f):null})}return d.jsx(t,{...i,ref:o,children:a})});return n.displayName=`${e}.Slot`,n}function ES(e){const t=l.forwardRef((n,r)=>{const{children:o,...a}=n;if(l.isValidElement(o)){const i=kS(o),s=PS(a,o.props);return o.type!==l.Fragment&&(s.ref=r?Xe(r,i):i),l.cloneElement(o,s)}return l.Children.count(o)>1?l.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var MS=Symbol("radix.slottable");function RS(e){return l.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===MS}function PS(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 kS(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 OS(e){const t=e+"CollectionProvider",[n,r]=ve(t),[o,a]=n(t,{collectionRef:{current:null},itemMap:new Map}),i=g=>{const{scope:v,children:w}=g,x=E.useRef(null),b=E.useRef(new Map).current;return d.jsx(o,{scope:v,itemMap:b,collectionRef:x,children:w})};i.displayName=t;const s=e+"CollectionSlot",c=Fo(s),u=E.forwardRef((g,v)=>{const{scope:w,children:x}=g,b=a(s,w),S=q(v,b.collectionRef);return d.jsx(c,{ref:S,children:x})});u.displayName=s;const f=e+"CollectionItemSlot",m="data-radix-collection-item",p=Fo(f),h=E.forwardRef((g,v)=>{const{scope:w,children:x,...b}=g,S=E.useRef(null),C=q(v,S),M=a(f,w);return E.useEffect(()=>(M.itemMap.set(S,{ref:S,...b}),()=>void M.itemMap.delete(S))),d.jsx(p,{[m]:"",ref:C,children:x})});h.displayName=f;function y(g){const v=a(e+"CollectionConsumer",g);return E.useCallback(()=>{const x=v.collectionRef.current;if(!x)return[];const b=Array.from(x.querySelectorAll(`[${m}]`));return Array.from(v.itemMap.values()).sort((M,N)=>b.indexOf(M.ref.current)-b.indexOf(N.ref.current))},[v.collectionRef,v.itemMap])}return[{Provider:i,Slot:u,ItemSlot:h},y,r]}var IS=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],on=IS.reduce((e,t)=>{const n=Fo(`Primitive.${t}`),r=l.forwardRef((o,a)=>{const{asChild:i,...s}=o,c=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),d.jsx(c,{...s,ref:a})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),vo="rovingFocusGroup.onEntryFocus",DS={bubbles:!1,cancelable:!0},Vn="RovingFocusGroup",[$o,nf,TS]=OS(Vn),[AS,rf]=ve(Vn,[TS]),[_S,jS]=AS(Vn),of=l.forwardRef((e,t)=>d.jsx($o.Provider,{scope:e.__scopeRovingFocusGroup,children:d.jsx($o.Slot,{scope:e.__scopeRovingFocusGroup,children:d.jsx(FS,{...e,ref:t})})}));of.displayName=Vn;var FS=l.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:a,currentTabStopId:i,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:c,onEntryFocus:u,preventScrollOnEntryFocus:f=!1,...m}=e,p=l.useRef(null),h=q(t,p),y=xt(a),[g,v]=Ce({prop:i,defaultProp:s??null,onChange:c,caller:Vn}),[w,x]=l.useState(!1),b=Ne(u),S=nf(n),C=l.useRef(!1),[M,N]=l.useState(0);return l.useEffect(()=>{const R=p.current;if(R)return R.addEventListener(vo,b),()=>R.removeEventListener(vo,b)},[b]),d.jsx(_S,{scope:n,orientation:r,dir:y,loop:o,currentTabStopId:g,onItemFocus:l.useCallback(R=>v(R),[v]),onItemShiftTab:l.useCallback(()=>x(!0),[]),onFocusableItemAdd:l.useCallback(()=>N(R=>R+1),[]),onFocusableItemRemove:l.useCallback(()=>N(R=>R-1),[]),children:d.jsx(on.div,{tabIndex:w||M===0?-1:0,"data-orientation":r,...m,ref:h,style:{outline:"none",...e.style},onMouseDown:I(e.onMouseDown,()=>{C.current=!0}),onFocus:I(e.onFocus,R=>{const _=!C.current;if(R.target===R.currentTarget&&_&&!w){const A=new CustomEvent(vo,DS);if(R.currentTarget.dispatchEvent(A),!A.defaultPrevented){const $=S().filter(j=>j.focusable),D=$.find(j=>j.active),Y=$.find(j=>j.id===g),J=[D,Y,...$].filter(Boolean).map(j=>j.ref.current);cf(J,f)}}C.current=!1}),onBlur:I(e.onBlur,()=>x(!1))})})}),af="RovingFocusGroupItem",sf=l.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:a,children:i,...s}=e,c=he(),u=a||c,f=jS(af,n),m=f.currentTabStopId===u,p=nf(n),{onFocusableItemAdd:h,onFocusableItemRemove:y,currentTabStopId:g}=f;return l.useEffect(()=>{if(r)return h(),()=>y()},[r,h,y]),d.jsx($o.ItemSlot,{scope:n,id:u,focusable:r,active:o,children:d.jsx(on.span,{tabIndex:m?0:-1,"data-orientation":f.orientation,...s,ref:t,onMouseDown:I(e.onMouseDown,v=>{r?f.onItemFocus(u):v.preventDefault()}),onFocus:I(e.onFocus,()=>f.onItemFocus(u)),onKeyDown:I(e.onKeyDown,v=>{if(v.key==="Tab"&&v.shiftKey){f.onItemShiftTab();return}if(v.target!==v.currentTarget)return;const w=WS(v,f.orientation,f.dir);if(w!==void 0){if(v.metaKey||v.ctrlKey||v.altKey||v.shiftKey)return;v.preventDefault();let b=p().filter(S=>S.focusable).map(S=>S.ref.current);if(w==="last")b.reverse();else if(w==="prev"||w==="next"){w==="prev"&&b.reverse();const S=b.indexOf(v.currentTarget);b=f.loop?BS(b,S+1):b.slice(S+1)}setTimeout(()=>cf(b))}}),children:typeof i=="function"?i({isCurrentTabStop:m,hasTabStop:g!=null}):i})})});sf.displayName=af;var $S={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function LS(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function WS(e,t,n){const r=LS(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return $S[r]}function cf(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function BS(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var VS=of,YS=sf;function HS(e,t){return l.useReducer((n,r)=>t[n][r]??n,e)}var lf=e=>{const{present:t,children:n}=e,r=GS(t),o=typeof n=="function"?n({present:r.isPresent}):l.Children.only(n),a=q(r.ref,US(o));return typeof n=="function"||r.isPresent?l.cloneElement(o,{ref:a}):null};lf.displayName="Presence";function GS(e){const[t,n]=l.useState(),r=l.useRef(null),o=l.useRef(e),a=l.useRef("none"),i=e?"mounted":"unmounted",[s,c]=HS(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return l.useEffect(()=>{const u=Zn(r.current);a.current=s==="mounted"?u:"none"},[s]),fe(()=>{const u=r.current,f=o.current;if(f!==e){const p=a.current,h=Zn(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]),fe(()=>{if(t){let u;const f=t.ownerDocument.defaultView??window,m=h=>{const g=Zn(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=Zn(r.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",m),t.addEventListener("animationend",m),()=>{f.clearTimeout(u),t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",m),t.removeEventListener("animationend",m)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:l.useCallback(u=>{r.current=u?getComputedStyle(u):null,n(u)},[])}}function Zn(e){return(e==null?void 0:e.animationName)||"none"}function US(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 Vr="Tabs",[zS,aE]=ve(Vr,[rf]),uf=rf(),[KS,Wa]=zS(Vr),df=l.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:o,defaultValue:a,orientation:i="horizontal",dir:s,activationMode:c="automatic",...u}=e,f=xt(s),[m,p]=Ce({prop:r,onChange:o,defaultProp:a??"",caller:Vr});return d.jsx(KS,{scope:n,baseId:he(),value:m,onValueChange:p,orientation:i,dir:f,activationMode:c,children:d.jsx(on.div,{dir:f,"data-orientation":i,...u,ref:t})})});df.displayName=Vr;var ff="TabsList",mf=l.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...o}=e,a=Wa(ff,n),i=uf(n);return d.jsx(VS,{asChild:!0,...i,orientation:a.orientation,dir:a.dir,loop:r,children:d.jsx(on.div,{role:"tablist","aria-orientation":a.orientation,...o,ref:t})})});mf.displayName=ff;var pf="TabsTrigger",hf=l.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:o=!1,...a}=e,i=Wa(pf,n),s=uf(n),c=yf(i.baseId,r),u=bf(i.baseId,r),f=r===i.value;return d.jsx(YS,{asChild:!0,...s,focusable:!o,active:f,children:d.jsx(on.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:I(e.onMouseDown,m=>{!o&&m.button===0&&m.ctrlKey===!1?i.onValueChange(r):m.preventDefault()}),onKeyDown:I(e.onKeyDown,m=>{[" ","Enter"].includes(m.key)&&i.onValueChange(r)}),onFocus:I(e.onFocus,()=>{const m=i.activationMode!=="manual";!f&&!o&&m&&i.onValueChange(r)})})})});hf.displayName=pf;var gf="TabsContent",vf=l.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:o,children:a,...i}=e,s=Wa(gf,n),c=yf(s.baseId,r),u=bf(s.baseId,r),f=r===s.value,m=l.useRef(f);return l.useEffect(()=>{const p=requestAnimationFrame(()=>m.current=!1);return()=>cancelAnimationFrame(p)},[]),d.jsx(lf,{present:o||f,children:({present:p})=>d.jsx(on.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:m.current?"0s":void 0},children:p&&a})})});vf.displayName=gf;function yf(e,t){return`${e}-trigger-${t}`}function bf(e,t){return`${e}-content-${t}`}var xf=df,wf=mf,Cf=hf,Sf=vf;const Nf=l.forwardRef(({...e},t)=>d.jsx(xf,{ref:t,activationMode:"manual",...e}));Nf.displayName=xf.displayName;const Ef=l.forwardRef(({className:e,...t},n)=>d.jsx(wf,{ref:n,className:k(`inline-flex items-center justify-center gap-1 rounded border-[1px] border-base-300 bg-white
|
|
193
|
+
p-1 text-muted-foreground`,e),...t}));Ef.displayName=wf.displayName;const Mf=l.forwardRef(({className:e,...t},n)=>d.jsx(Cf,{ref:n,className:k(ae.focusRingVisible,`inline-flex items-center justify-center whitespace-nowrap rounded px-3 py-1.5 text-sm
|
|
196
194
|
font-bold ring-offset-background transition-all hover:bg-primary-200 hover:text-primary
|
|
197
195
|
disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50
|
|
198
196
|
aria-disabled:cursor-not-allowed aria-disabled:opacity-50 data-[state=active]:bg-primary
|
|
199
|
-
data-[state=active]:text-white`,e),...t}));
|
|
200
|
-
focus-visible:ring-ring focus-visible:ring-offset-2`,e),...t}));Mf.displayName=Cf.displayName;const Rf=E.forwardRef(({className:e,isDisabled:t=!1,isGrowable:n=!1,...r},o)=>{const a=E.useRef(null),i=Oe({isDisabled:t});return E.useEffect(()=>{if(n&&a.current){const s=a.current,c=()=>{s.style.height="auto",s.style.height=`${s.scrollHeight}px`};return s.addEventListener("input",c),c(),()=>s.removeEventListener("input",c)}},[n]),d.jsx("textarea",{ref:s=>{typeof o=="function"?o(s):o&&(o.current=s),a.current=s},className:k(ae.input,"min-h-[5rem]",n&&"resize-none overflow-hidden",e),...r,...i})});Rf.displayName="Textarea";function KS(e){const t=qS(e),n=l.forwardRef((r,o)=>{const{children:a,...i}=r,s=l.Children.toArray(a),c=s.find(ZS);if(c){const u=c.props.children,f=s.map(m=>m===c?l.Children.count(u)>1?l.Children.only(null):l.isValidElement(u)?u.props.children:null:m);return d.jsx(t,{...i,ref:o,children:l.isValidElement(u)?l.cloneElement(u,void 0,f):null})}return d.jsx(t,{...i,ref:o,children:a})});return n.displayName=`${e}.Slot`,n}function qS(e){const t=l.forwardRef((n,r)=>{const{children:o,...a}=n,i=l.isValidElement(o)?JS(o):void 0,s=q(i,r);if(l.isValidElement(o)){const c=QS(a,o.props);return o.type!==l.Fragment&&(c.ref=s),l.cloneElement(o,c)}return l.Children.count(o)>1?l.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Pf=Symbol("radix.slottable");function XS(e){const t=({children:n})=>d.jsx(d.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=Pf,t}function ZS(e){return l.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Pf}function QS(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 JS(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 eN=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],_t=eN.reduce((e,t)=>{const n=KS(`Primitive.${t}`),r=l.forwardRef((o,a)=>{const{asChild:i,...s}=o,c=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),d.jsx(c,{...s,ref:a})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function tN(e,t){e&&En.flushSync(()=>e.dispatchEvent(t))}var nN="DismissableLayer",Lo="dismissableLayer.update",rN="dismissableLayer.pointerDownOutside",oN="dismissableLayer.focusOutside",Ws,kf=l.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Of=l.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:i,onDismiss:s,...c}=e,u=l.useContext(kf),[f,m]=l.useState(null),p=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,h]=l.useState({}),y=q(t,N=>m(N)),g=Array.from(u.layers),[v]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),w=g.indexOf(v),x=f?g.indexOf(f):-1,b=u.layersWithOutsidePointerEventsDisabled.size>0,S=x>=w,C=iN(N=>{const R=N.target,_=[...u.branches].some(A=>A.contains(R));!S||_||(o==null||o(N),i==null||i(N),N.defaultPrevented||s==null||s())},p),M=cN(N=>{const R=N.target;[...u.branches].some(A=>A.contains(R))||(a==null||a(N),i==null||i(N),N.defaultPrevented||s==null||s())},p);return Ci(N=>{x===u.layers.size-1&&(r==null||r(N),!N.defaultPrevented&&s&&(N.preventDefault(),s()))},p),l.useEffect(()=>{if(f)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(Ws=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(f)),u.layers.add(f),Bs(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=Ws)}},[f,p,n,u]),l.useEffect(()=>()=>{f&&(u.layers.delete(f),u.layersWithOutsidePointerEventsDisabled.delete(f),Bs())},[f,u]),l.useEffect(()=>{const N=()=>h({});return document.addEventListener(Lo,N),()=>document.removeEventListener(Lo,N)},[]),d.jsx(_t.div,{...c,ref:y,style:{pointerEvents:b?S?"auto":"none":void 0,...e.style},onFocusCapture:I(e.onFocusCapture,M.onFocusCapture),onBlurCapture:I(e.onBlurCapture,M.onBlurCapture),onPointerDownCapture:I(e.onPointerDownCapture,C.onPointerDownCapture)})});Of.displayName=nN;var aN="DismissableLayerBranch",sN=l.forwardRef((e,t)=>{const n=l.useContext(kf),r=l.useRef(null),o=q(t,r);return l.useEffect(()=>{const a=r.current;if(a)return n.branches.add(a),()=>{n.branches.delete(a)}},[n.branches]),d.jsx(_t.div,{...e,ref:o})});sN.displayName=aN;function iN(e,t=globalThis==null?void 0:globalThis.document){const n=Ne(e),r=l.useRef(!1),o=l.useRef(()=>{});return l.useEffect(()=>{const a=s=>{if(s.target&&!r.current){let c=function(){If(rN,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 cN(e,t=globalThis==null?void 0:globalThis.document){const n=Ne(e),r=l.useRef(!1);return l.useEffect(()=>{const o=a=>{a.target&&!r.current&&If(oN,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 Bs(){const e=new CustomEvent(Lo);document.dispatchEvent(e)}function If(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?tN(o,a):o.dispatchEvent(a)}var lN="Arrow",Df=l.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...a}=e;return d.jsx(_t.svg,{...a,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:d.jsx("polygon",{points:"0,0 30,0 15,10"})})});Df.displayName=lN;var uN=Df,Ba="Popper",[Tf,Af]=ve(Ba),[dN,_f]=Tf(Ba),jf=e=>{const{__scopePopper:t,children:n}=e,[r,o]=l.useState(null);return d.jsx(dN,{scope:t,anchor:r,onAnchorChange:o,children:n})};jf.displayName=Ba;var Ff="PopperAnchor",$f=l.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,a=_f(Ff,n),i=l.useRef(null),s=q(t,i);return l.useEffect(()=>{a.onAnchorChange((r==null?void 0:r.current)||i.current)}),r?null:d.jsx(_t.div,{...o,ref:s})});$f.displayName=Ff;var Va="PopperContent",[fN,mN]=Tf(Va),Lf=l.forwardRef((e,t)=>{var T,Q,K,B,ee,ne;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:m="partial",hideWhenDetached:p=!1,updatePositionStrategy:h="optimized",onPlaced:y,...g}=e,v=_f(Va,n),[w,x]=l.useState(null),b=q(t,le=>x(le)),[S,C]=l.useState(null),M=Tn(S),N=(M==null?void 0:M.width)??0,R=(M==null?void 0:M.height)??0,_=r+(a!=="center"?"-"+a:""),A=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},$=Array.isArray(u)?u:[u],D=$.length>0,Y={padding:A,boundary:$.filter(hN),altBoundary:D},{refs:H,floatingStyles:J,placement:j,isPositioned:X,middlewareData:F}=Nc({strategy:"fixed",placement:_,whileElementsMounted:(...le)=>Cc(...le,{animationFrame:h==="always"}),elements:{reference:v.anchor},middleware:[Ec({mainAxis:o+R,alignmentAxis:i}),c&&Mc({mainAxis:!0,crossAxis:!1,limiter:m==="partial"?Rc():void 0,...Y}),c&&Pc({...Y}),kc({...Y,apply:({elements:le,rects:ye,availableWidth:et,availableHeight:tt})=>{const{width:nt,height:an}=ye.reference,Ae=le.floating.style;Ae.setProperty("--radix-popper-available-width",`${et}px`),Ae.setProperty("--radix-popper-available-height",`${tt}px`),Ae.setProperty("--radix-popper-anchor-width",`${nt}px`),Ae.setProperty("--radix-popper-anchor-height",`${an}px`)}}),S&&Ic({element:S,padding:s}),gN({arrowWidth:N,arrowHeight:R}),p&&Oc({strategy:"referenceHidden",...Y})]}),[O,Z]=Vf(j),te=Ne(y);fe(()=>{X&&(te==null||te())},[X,te]);const P=(T=F.arrow)==null?void 0:T.x,W=(Q=F.arrow)==null?void 0:Q.y,G=((K=F.arrow)==null?void 0:K.centerOffset)!==0,[L,z]=l.useState();return fe(()=>{w&&z(window.getComputedStyle(w).zIndex)},[w]),d.jsx("div",{ref:H.setFloating,"data-radix-popper-content-wrapper":"",style:{...J,transform:X?J.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:L,"--radix-popper-transform-origin":[(B=F.transformOrigin)==null?void 0:B.x,(ee=F.transformOrigin)==null?void 0:ee.y].join(" "),...((ne=F.hide)==null?void 0:ne.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:d.jsx(fN,{scope:n,placedSide:O,onArrowChange:C,arrowX:P,arrowY:W,shouldHideArrow:G,children:d.jsx(_t.div,{"data-side":O,"data-align":Z,...g,ref:b,style:{...g.style,animation:X?void 0:"none"}})})})});Lf.displayName=Va;var Wf="PopperArrow",pN={top:"bottom",right:"left",bottom:"top",left:"right"},Bf=l.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,a=mN(Wf,r),i=pN[a.placedSide];return d.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:d.jsx(uN,{...o,ref:n,style:{...o.style,display:"block"}})})});Bf.displayName=Wf;function hN(e){return e!==null}var gN=e=>({name:"transformOrigin",options:e,fn(t){var v,w,x;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]=Vf(n),m={start:"0%",center:"50%",end:"100%"}[f],p=(((w=o.arrow)==null?void 0:w.x)??0)+s/2,h=(((x=o.arrow)==null?void 0:x.y)??0)+c/2;let y="",g="";return u==="bottom"?(y=i?m:`${p}px`,g=`${-c}px`):u==="top"?(y=i?m:`${p}px`,g=`${r.floating.height+c}px`):u==="right"?(y=`${-c}px`,g=i?m:`${h}px`):u==="left"&&(y=`${r.floating.width+c}px`,g=i?m:`${h}px`),{data:{x:y,y:g}}}});function Vf(e){const[t,n="center"]=e.split("-");return[t,n]}var vN=jf,yN=$f,bN=Lf,xN=Bf;function wN(e,t){return l.useReducer((n,r)=>t[n][r]??n,e)}var Yf=e=>{const{present:t,children:n}=e,r=CN(t),o=typeof n=="function"?n({present:r.isPresent}):l.Children.only(n),a=q(r.ref,SN(o));return typeof n=="function"||r.isPresent?l.cloneElement(o,{ref:a}):null};Yf.displayName="Presence";function CN(e){const[t,n]=l.useState(),r=l.useRef(null),o=l.useRef(e),a=l.useRef("none"),i=e?"mounted":"unmounted",[s,c]=wN(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return l.useEffect(()=>{const u=Qn(r.current);a.current=s==="mounted"?u:"none"},[s]),fe(()=>{const u=r.current,f=o.current;if(f!==e){const p=a.current,h=Qn(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]),fe(()=>{if(t){let u;const f=t.ownerDocument.defaultView??window,m=h=>{const g=Qn(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=Qn(r.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",m),t.addEventListener("animationend",m),()=>{f.clearTimeout(u),t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",m),t.removeEventListener("animationend",m)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:l.useCallback(u=>{r.current=u?getComputedStyle(u):null,n(u)},[])}}function Qn(e){return(e==null?void 0:e.animationName)||"none"}function SN(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 NN=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"}),EN="VisuallyHidden",Hf=l.forwardRef((e,t)=>d.jsx(_t.span,{...e,ref:t,style:{...NN,...e.style}}));Hf.displayName=EN;var MN=Hf,[Yr,aE]=ve("Tooltip",[Af]),Hr=Af(),Gf="TooltipProvider",RN=700,Wo="tooltip.open",[PN,Ya]=Yr(Gf),Uf=e=>{const{__scopeTooltip:t,delayDuration:n=RN,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:a}=e,i=l.useRef(!0),s=l.useRef(!1),c=l.useRef(0);return l.useEffect(()=>{const u=c.current;return()=>window.clearTimeout(u)},[]),d.jsx(PN,{scope:t,isOpenDelayedRef:i,delayDuration:n,onOpen:l.useCallback(()=>{window.clearTimeout(c.current),i.current=!1},[]),onClose:l.useCallback(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>i.current=!0,r)},[r]),isPointerInTransitRef:s,onPointerInTransitChange:l.useCallback(u=>{s.current=u},[]),disableHoverableContent:o,children:a})};Uf.displayName=Gf;var Nn="Tooltip",[kN,Gr]=Yr(Nn),zf=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o,onOpenChange:a,disableHoverableContent:i,delayDuration:s}=e,c=Ya(Nn,e.__scopeTooltip),u=Hr(t),[f,m]=l.useState(null),p=he(),h=l.useRef(0),y=i??c.disableHoverableContent,g=s??c.delayDuration,v=l.useRef(!1),[w,x]=Ce({prop:r,defaultProp:o??!1,onChange:N=>{N?(c.onOpen(),document.dispatchEvent(new CustomEvent(Wo))):c.onClose(),a==null||a(N)},caller:Nn}),b=l.useMemo(()=>w?v.current?"delayed-open":"instant-open":"closed",[w]),S=l.useCallback(()=>{window.clearTimeout(h.current),h.current=0,v.current=!1,x(!0)},[x]),C=l.useCallback(()=>{window.clearTimeout(h.current),h.current=0,x(!1)},[x]),M=l.useCallback(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>{v.current=!0,x(!0),h.current=0},g)},[g,x]);return l.useEffect(()=>()=>{h.current&&(window.clearTimeout(h.current),h.current=0)},[]),d.jsx(vN,{...u,children:d.jsx(kN,{scope:t,contentId:p,open:w,stateAttribute:b,trigger:f,onTriggerChange:m,onTriggerEnter:l.useCallback(()=>{c.isOpenDelayedRef.current?M():S()},[c.isOpenDelayedRef,M,S]),onTriggerLeave:l.useCallback(()=>{y?C():(window.clearTimeout(h.current),h.current=0)},[C,y]),onOpen:S,onClose:C,disableHoverableContent:y,children:n})})};zf.displayName=Nn;var Bo="TooltipTrigger",Kf=l.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Gr(Bo,n),a=Ya(Bo,n),i=Hr(n),s=l.useRef(null),c=q(t,s,o.onTriggerChange),u=l.useRef(!1),f=l.useRef(!1),m=l.useCallback(()=>u.current=!1,[]);return l.useEffect(()=>()=>document.removeEventListener("pointerup",m),[m]),d.jsx(yN,{asChild:!0,...i,children:d.jsx(_t.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:c,onPointerMove:I(e.onPointerMove,p=>{p.pointerType!=="touch"&&!f.current&&!a.isPointerInTransitRef.current&&(o.onTriggerEnter(),f.current=!0)}),onPointerLeave:I(e.onPointerLeave,()=>{o.onTriggerLeave(),f.current=!1}),onPointerDown:I(e.onPointerDown,()=>{o.open&&o.onClose(),u.current=!0,document.addEventListener("pointerup",m,{once:!0})}),onFocus:I(e.onFocus,()=>{u.current||o.onOpen()}),onBlur:I(e.onBlur,o.onClose),onClick:I(e.onClick,o.onClose)})})});Kf.displayName=Bo;var ON="TooltipPortal",[sE,IN]=Yr(ON,{forceMount:void 0}),Kt="TooltipContent",qf=l.forwardRef((e,t)=>{const n=IN(Kt,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...a}=e,i=Gr(Kt,e.__scopeTooltip);return d.jsx(Yf,{present:r||i.open,children:i.disableHoverableContent?d.jsx(Xf,{side:o,...a,ref:t}):d.jsx(DN,{side:o,...a,ref:t})})}),DN=l.forwardRef((e,t)=>{const n=Gr(Kt,e.__scopeTooltip),r=Ya(Kt,e.__scopeTooltip),o=l.useRef(null),a=q(t,o),[i,s]=l.useState(null),{trigger:c,onClose:u}=n,f=o.current,{onPointerInTransitChange:m}=r,p=l.useCallback(()=>{s(null),m(!1)},[m]),h=l.useCallback((y,g)=>{const v=y.currentTarget,w={x:y.clientX,y:y.clientY},x=jN(w,v.getBoundingClientRect()),b=FN(w,x),S=$N(g.getBoundingClientRect()),C=WN([...b,...S]);s(C),m(!0)},[m]);return l.useEffect(()=>()=>p(),[p]),l.useEffect(()=>{if(c&&f){const y=v=>h(v,f),g=v=>h(v,c);return c.addEventListener("pointerleave",y),f.addEventListener("pointerleave",g),()=>{c.removeEventListener("pointerleave",y),f.removeEventListener("pointerleave",g)}}},[c,f,h,p]),l.useEffect(()=>{if(i){const y=g=>{const v=g.target,w={x:g.clientX,y:g.clientY},x=(c==null?void 0:c.contains(v))||(f==null?void 0:f.contains(v)),b=!LN(w,i);x?p():b&&(p(),u())};return document.addEventListener("pointermove",y),()=>document.removeEventListener("pointermove",y)}},[c,f,i,u,p]),d.jsx(Xf,{...e,ref:a})}),[TN,AN]=Yr(Nn,{isInside:!1}),_N=XS("TooltipContent"),Xf=l.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:a,onPointerDownOutside:i,...s}=e,c=Gr(Kt,n),u=Hr(n),{onClose:f}=c;return l.useEffect(()=>(document.addEventListener(Wo,f),()=>document.removeEventListener(Wo,f)),[f]),l.useEffect(()=>{if(c.trigger){const m=p=>{const h=p.target;h!=null&&h.contains(c.trigger)&&f()};return window.addEventListener("scroll",m,{capture:!0}),()=>window.removeEventListener("scroll",m,{capture:!0})}},[c.trigger,f]),d.jsx(Of,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:i,onFocusOutside:m=>m.preventDefault(),onDismiss:f,children:d.jsxs(bN,{"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:[d.jsx(_N,{children:r}),d.jsx(TN,{scope:n,isInside:!0,children:d.jsx(MN,{id:c.contentId,role:"tooltip",children:o||r})})]})})});qf.displayName=Kt;var Zf="TooltipArrow",Qf=l.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Hr(n);return AN(Zf,n).isInside?null:d.jsx(xN,{...o,...r,ref:t})});Qf.displayName=Zf;function jN(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 FN(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 $N(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 LN(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,m=c.x,p=c.y;f>r!=p>r&&n<(m-u)*(r-f)/(p-f)+u&&(o=!o)}return o}function WN(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),BN(t)}function BN(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 VN=Uf,YN=zf,HN=Kf,GN=qf,UN=Qf;const zN=VN,Jf=l.forwardRef(({children:e,content:t,side:n="top",align:r="center",offset:o=2,hasArrow:a=!0,className:i,zIndex:s,...c},u)=>{const f=Ye("tooltip",s);return d.jsxs(YN,{children:[d.jsx(HN,{asChild:!0,children:e}),d.jsxs(GN,{ref:u,align:r,className:k(ae.tooltip,i),side:n,sideOffset:o,style:{zIndex:f,...c.style},...c,children:[t,a?d.jsx(UN,{className:"fill-base-700 stroke-base-700",height:5,width:11}):null]})]})});Jf.displayName="Tooltip";exports.Accordion=bi;exports.Alert=xi;exports.Autocomplete=hy;exports.Badge=tl;exports.Breadcrumbs=nl;exports.Button=$e;exports.Calendar=Ca;exports.Checkbox=Sa;exports.CheckboxGroup=Bl;exports.Combobox=Vl;exports.DatePicker=Yl;exports.DateRangePicker=Hl;exports.Dialog=Jg;exports.DialogClose=tv;exports.DialogContent=lc;exports.DialogDescription=Gl;exports.DialogFooter=Ul;exports.DialogHeader=zl;exports.DialogOverlay=aa;exports.DialogPortal=uc;exports.DialogTitle=Kl;exports.DialogTrigger=ev;exports.DropdownButton=Tu;exports.FormItem=Au;exports.Image=_u;exports.Input=ju;exports.Label=nn;exports.MultiSelect=Fu;exports.Popover=Jt;exports.PopoverContent=Dt;exports.PopoverTrigger=en;exports.Radio=Ta;exports.RadioGroup=sd;exports.Select=$a;exports.SelectContent=_a;exports.SelectGroup=aS;exports.SelectItem=ja;exports.SelectLabel=Vd;exports.SelectRoot=Wd;exports.SelectSeparator=Yd;exports.SelectTrigger=Fa;exports.SelectValue=Bd;exports.SingleSelect=$a;exports.StepIndicator=yS;exports.Switch=La;exports.SwitchGroup=ef;exports.Tabs=Sf;exports.TabsContent=Mf;exports.TabsList=Nf;exports.TabsTrigger=Ef;exports.Textarea=Rf;exports.Tooltip=Jf;exports.TooltipProvider=zN;exports.cn=k;exports.configureZIndex=Xg;exports.getZIndex=Ye;exports.getZIndexConfig=Zg;exports.resetZIndexConfig=Qg;exports.tw=ge;exports.useAriaDisabled=Oe;exports.useAriaLabelled=It;exports.useFormGroupLayout=Qo;
|
|
197
|
+
data-[state=active]:text-white`,e),...t}));Mf.displayName=Cf.displayName;const Rf=l.forwardRef(({className:e,...t},n)=>d.jsx(Sf,{ref:n,className:k(ae.focusRingVisible,`mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2
|
|
198
|
+
focus-visible:ring-ring focus-visible:ring-offset-2`,e),...t}));Rf.displayName=Sf.displayName;const Pf=E.forwardRef(({className:e,isDisabled:t=!1,isGrowable:n=!1,...r},o)=>{const a=E.useRef(null),i=Oe({isDisabled:t});return E.useEffect(()=>{if(n&&a.current){const s=a.current,c=()=>{s.style.height="auto",s.style.height=`${s.scrollHeight}px`};return s.addEventListener("input",c),c(),()=>s.removeEventListener("input",c)}},[n]),d.jsx("textarea",{ref:s=>{typeof o=="function"?o(s):o&&(o.current=s),a.current=s},className:k(ae.input,"min-h-[5rem]",n&&"resize-none overflow-hidden",e),...r,...i})});Pf.displayName="Textarea";function qS(e){const t=XS(e),n=l.forwardRef((r,o)=>{const{children:a,...i}=r,s=l.Children.toArray(a),c=s.find(QS);if(c){const u=c.props.children,f=s.map(m=>m===c?l.Children.count(u)>1?l.Children.only(null):l.isValidElement(u)?u.props.children:null:m);return d.jsx(t,{...i,ref:o,children:l.isValidElement(u)?l.cloneElement(u,void 0,f):null})}return d.jsx(t,{...i,ref:o,children:a})});return n.displayName=`${e}.Slot`,n}function XS(e){const t=l.forwardRef((n,r)=>{const{children:o,...a}=n,i=l.isValidElement(o)?eN(o):void 0,s=q(i,r);if(l.isValidElement(o)){const c=JS(a,o.props);return o.type!==l.Fragment&&(c.ref=s),l.cloneElement(o,c)}return l.Children.count(o)>1?l.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var kf=Symbol("radix.slottable");function ZS(e){const t=({children:n})=>d.jsx(d.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=kf,t}function QS(e){return l.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===kf}function JS(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 eN(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 tN=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],_t=tN.reduce((e,t)=>{const n=qS(`Primitive.${t}`),r=l.forwardRef((o,a)=>{const{asChild:i,...s}=o,c=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),d.jsx(c,{...s,ref:a})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function nN(e,t){e&&En.flushSync(()=>e.dispatchEvent(t))}var rN="DismissableLayer",Lo="dismissableLayer.update",oN="dismissableLayer.pointerDownOutside",aN="dismissableLayer.focusOutside",Ws,Of=l.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),If=l.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:i,onDismiss:s,...c}=e,u=l.useContext(Of),[f,m]=l.useState(null),p=(f==null?void 0:f.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,h]=l.useState({}),y=q(t,N=>m(N)),g=Array.from(u.layers),[v]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),w=g.indexOf(v),x=f?g.indexOf(f):-1,b=u.layersWithOutsidePointerEventsDisabled.size>0,S=x>=w,C=cN(N=>{const R=N.target,_=[...u.branches].some(A=>A.contains(R));!S||_||(o==null||o(N),i==null||i(N),N.defaultPrevented||s==null||s())},p),M=lN(N=>{const R=N.target;[...u.branches].some(A=>A.contains(R))||(a==null||a(N),i==null||i(N),N.defaultPrevented||s==null||s())},p);return Ci(N=>{x===u.layers.size-1&&(r==null||r(N),!N.defaultPrevented&&s&&(N.preventDefault(),s()))},p),l.useEffect(()=>{if(f)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(Ws=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(f)),u.layers.add(f),Bs(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=Ws)}},[f,p,n,u]),l.useEffect(()=>()=>{f&&(u.layers.delete(f),u.layersWithOutsidePointerEventsDisabled.delete(f),Bs())},[f,u]),l.useEffect(()=>{const N=()=>h({});return document.addEventListener(Lo,N),()=>document.removeEventListener(Lo,N)},[]),d.jsx(_t.div,{...c,ref:y,style:{pointerEvents:b?S?"auto":"none":void 0,...e.style},onFocusCapture:I(e.onFocusCapture,M.onFocusCapture),onBlurCapture:I(e.onBlurCapture,M.onBlurCapture),onPointerDownCapture:I(e.onPointerDownCapture,C.onPointerDownCapture)})});If.displayName=rN;var sN="DismissableLayerBranch",iN=l.forwardRef((e,t)=>{const n=l.useContext(Of),r=l.useRef(null),o=q(t,r);return l.useEffect(()=>{const a=r.current;if(a)return n.branches.add(a),()=>{n.branches.delete(a)}},[n.branches]),d.jsx(_t.div,{...e,ref:o})});iN.displayName=sN;function cN(e,t=globalThis==null?void 0:globalThis.document){const n=Ne(e),r=l.useRef(!1),o=l.useRef(()=>{});return l.useEffect(()=>{const a=s=>{if(s.target&&!r.current){let c=function(){Df(oN,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 lN(e,t=globalThis==null?void 0:globalThis.document){const n=Ne(e),r=l.useRef(!1);return l.useEffect(()=>{const o=a=>{a.target&&!r.current&&Df(aN,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 Bs(){const e=new CustomEvent(Lo);document.dispatchEvent(e)}function Df(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 uN="Arrow",Tf=l.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...a}=e;return d.jsx(_t.svg,{...a,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:d.jsx("polygon",{points:"0,0 30,0 15,10"})})});Tf.displayName=uN;var dN=Tf,Ba="Popper",[Af,_f]=ve(Ba),[fN,jf]=Af(Ba),Ff=e=>{const{__scopePopper:t,children:n}=e,[r,o]=l.useState(null);return d.jsx(fN,{scope:t,anchor:r,onAnchorChange:o,children:n})};Ff.displayName=Ba;var $f="PopperAnchor",Lf=l.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,a=jf($f,n),i=l.useRef(null),s=q(t,i);return l.useEffect(()=>{a.onAnchorChange((r==null?void 0:r.current)||i.current)}),r?null:d.jsx(_t.div,{...o,ref:s})});Lf.displayName=$f;var Va="PopperContent",[mN,pN]=Af(Va),Wf=l.forwardRef((e,t)=>{var T,Q,K,B,ee,ne;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:m="partial",hideWhenDetached:p=!1,updatePositionStrategy:h="optimized",onPlaced:y,...g}=e,v=jf(Va,n),[w,x]=l.useState(null),b=q(t,le=>x(le)),[S,C]=l.useState(null),M=Tn(S),N=(M==null?void 0:M.width)??0,R=(M==null?void 0:M.height)??0,_=r+(a!=="center"?"-"+a:""),A=typeof f=="number"?f:{top:0,right:0,bottom:0,left:0,...f},$=Array.isArray(u)?u:[u],D=$.length>0,Y={padding:A,boundary:$.filter(gN),altBoundary:D},{refs:H,floatingStyles:J,placement:j,isPositioned:X,middlewareData:F}=Nc({strategy:"fixed",placement:_,whileElementsMounted:(...le)=>Cc(...le,{animationFrame:h==="always"}),elements:{reference:v.anchor},middleware:[Ec({mainAxis:o+R,alignmentAxis:i}),c&&Mc({mainAxis:!0,crossAxis:!1,limiter:m==="partial"?Rc():void 0,...Y}),c&&Pc({...Y}),kc({...Y,apply:({elements:le,rects:ye,availableWidth:et,availableHeight:tt})=>{const{width:nt,height:an}=ye.reference,Ae=le.floating.style;Ae.setProperty("--radix-popper-available-width",`${et}px`),Ae.setProperty("--radix-popper-available-height",`${tt}px`),Ae.setProperty("--radix-popper-anchor-width",`${nt}px`),Ae.setProperty("--radix-popper-anchor-height",`${an}px`)}}),S&&Ic({element:S,padding:s}),vN({arrowWidth:N,arrowHeight:R}),p&&Oc({strategy:"referenceHidden",...Y})]}),[O,Z]=Yf(j),te=Ne(y);fe(()=>{X&&(te==null||te())},[X,te]);const P=(T=F.arrow)==null?void 0:T.x,W=(Q=F.arrow)==null?void 0:Q.y,G=((K=F.arrow)==null?void 0:K.centerOffset)!==0,[L,z]=l.useState();return fe(()=>{w&&z(window.getComputedStyle(w).zIndex)},[w]),d.jsx("div",{ref:H.setFloating,"data-radix-popper-content-wrapper":"",style:{...J,transform:X?J.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:L,"--radix-popper-transform-origin":[(B=F.transformOrigin)==null?void 0:B.x,(ee=F.transformOrigin)==null?void 0:ee.y].join(" "),...((ne=F.hide)==null?void 0:ne.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:d.jsx(mN,{scope:n,placedSide:O,onArrowChange:C,arrowX:P,arrowY:W,shouldHideArrow:G,children:d.jsx(_t.div,{"data-side":O,"data-align":Z,...g,ref:b,style:{...g.style,animation:X?void 0:"none"}})})})});Wf.displayName=Va;var Bf="PopperArrow",hN={top:"bottom",right:"left",bottom:"top",left:"right"},Vf=l.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,a=pN(Bf,r),i=hN[a.placedSide];return d.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:d.jsx(dN,{...o,ref:n,style:{...o.style,display:"block"}})})});Vf.displayName=Bf;function gN(e){return e!==null}var vN=e=>({name:"transformOrigin",options:e,fn(t){var v,w,x;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]=Yf(n),m={start:"0%",center:"50%",end:"100%"}[f],p=(((w=o.arrow)==null?void 0:w.x)??0)+s/2,h=(((x=o.arrow)==null?void 0:x.y)??0)+c/2;let y="",g="";return u==="bottom"?(y=i?m:`${p}px`,g=`${-c}px`):u==="top"?(y=i?m:`${p}px`,g=`${r.floating.height+c}px`):u==="right"?(y=`${-c}px`,g=i?m:`${h}px`):u==="left"&&(y=`${r.floating.width+c}px`,g=i?m:`${h}px`),{data:{x:y,y:g}}}});function Yf(e){const[t,n="center"]=e.split("-");return[t,n]}var yN=Ff,bN=Lf,xN=Wf,wN=Vf;function CN(e,t){return l.useReducer((n,r)=>t[n][r]??n,e)}var Hf=e=>{const{present:t,children:n}=e,r=SN(t),o=typeof n=="function"?n({present:r.isPresent}):l.Children.only(n),a=q(r.ref,NN(o));return typeof n=="function"||r.isPresent?l.cloneElement(o,{ref:a}):null};Hf.displayName="Presence";function SN(e){const[t,n]=l.useState(),r=l.useRef(null),o=l.useRef(e),a=l.useRef("none"),i=e?"mounted":"unmounted",[s,c]=CN(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return l.useEffect(()=>{const u=Qn(r.current);a.current=s==="mounted"?u:"none"},[s]),fe(()=>{const u=r.current,f=o.current;if(f!==e){const p=a.current,h=Qn(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]),fe(()=>{if(t){let u;const f=t.ownerDocument.defaultView??window,m=h=>{const g=Qn(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=Qn(r.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",m),t.addEventListener("animationend",m),()=>{f.clearTimeout(u),t.removeEventListener("animationstart",p),t.removeEventListener("animationcancel",m),t.removeEventListener("animationend",m)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(s),ref:l.useCallback(u=>{r.current=u?getComputedStyle(u):null,n(u)},[])}}function Qn(e){return(e==null?void 0:e.animationName)||"none"}function NN(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 EN=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"}),MN="VisuallyHidden",Gf=l.forwardRef((e,t)=>d.jsx(_t.span,{...e,ref:t,style:{...EN,...e.style}}));Gf.displayName=MN;var RN=Gf,[Yr,sE]=ve("Tooltip",[_f]),Hr=_f(),Uf="TooltipProvider",PN=700,Wo="tooltip.open",[kN,Ya]=Yr(Uf),zf=e=>{const{__scopeTooltip:t,delayDuration:n=PN,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:a}=e,i=l.useRef(!0),s=l.useRef(!1),c=l.useRef(0);return l.useEffect(()=>{const u=c.current;return()=>window.clearTimeout(u)},[]),d.jsx(kN,{scope:t,isOpenDelayedRef:i,delayDuration:n,onOpen:l.useCallback(()=>{window.clearTimeout(c.current),i.current=!1},[]),onClose:l.useCallback(()=>{window.clearTimeout(c.current),c.current=window.setTimeout(()=>i.current=!0,r)},[r]),isPointerInTransitRef:s,onPointerInTransitChange:l.useCallback(u=>{s.current=u},[]),disableHoverableContent:o,children:a})};zf.displayName=Uf;var Nn="Tooltip",[ON,Gr]=Yr(Nn),Kf=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o,onOpenChange:a,disableHoverableContent:i,delayDuration:s}=e,c=Ya(Nn,e.__scopeTooltip),u=Hr(t),[f,m]=l.useState(null),p=he(),h=l.useRef(0),y=i??c.disableHoverableContent,g=s??c.delayDuration,v=l.useRef(!1),[w,x]=Ce({prop:r,defaultProp:o??!1,onChange:N=>{N?(c.onOpen(),document.dispatchEvent(new CustomEvent(Wo))):c.onClose(),a==null||a(N)},caller:Nn}),b=l.useMemo(()=>w?v.current?"delayed-open":"instant-open":"closed",[w]),S=l.useCallback(()=>{window.clearTimeout(h.current),h.current=0,v.current=!1,x(!0)},[x]),C=l.useCallback(()=>{window.clearTimeout(h.current),h.current=0,x(!1)},[x]),M=l.useCallback(()=>{window.clearTimeout(h.current),h.current=window.setTimeout(()=>{v.current=!0,x(!0),h.current=0},g)},[g,x]);return l.useEffect(()=>()=>{h.current&&(window.clearTimeout(h.current),h.current=0)},[]),d.jsx(yN,{...u,children:d.jsx(ON,{scope:t,contentId:p,open:w,stateAttribute:b,trigger:f,onTriggerChange:m,onTriggerEnter:l.useCallback(()=>{c.isOpenDelayedRef.current?M():S()},[c.isOpenDelayedRef,M,S]),onTriggerLeave:l.useCallback(()=>{y?C():(window.clearTimeout(h.current),h.current=0)},[C,y]),onOpen:S,onClose:C,disableHoverableContent:y,children:n})})};Kf.displayName=Nn;var Bo="TooltipTrigger",qf=l.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Gr(Bo,n),a=Ya(Bo,n),i=Hr(n),s=l.useRef(null),c=q(t,s,o.onTriggerChange),u=l.useRef(!1),f=l.useRef(!1),m=l.useCallback(()=>u.current=!1,[]);return l.useEffect(()=>()=>document.removeEventListener("pointerup",m),[m]),d.jsx(bN,{asChild:!0,...i,children:d.jsx(_t.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:c,onPointerMove:I(e.onPointerMove,p=>{p.pointerType!=="touch"&&!f.current&&!a.isPointerInTransitRef.current&&(o.onTriggerEnter(),f.current=!0)}),onPointerLeave:I(e.onPointerLeave,()=>{o.onTriggerLeave(),f.current=!1}),onPointerDown:I(e.onPointerDown,()=>{o.open&&o.onClose(),u.current=!0,document.addEventListener("pointerup",m,{once:!0})}),onFocus:I(e.onFocus,()=>{u.current||o.onOpen()}),onBlur:I(e.onBlur,o.onClose),onClick:I(e.onClick,o.onClose)})})});qf.displayName=Bo;var IN="TooltipPortal",[iE,DN]=Yr(IN,{forceMount:void 0}),Kt="TooltipContent",Xf=l.forwardRef((e,t)=>{const n=DN(Kt,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...a}=e,i=Gr(Kt,e.__scopeTooltip);return d.jsx(Hf,{present:r||i.open,children:i.disableHoverableContent?d.jsx(Zf,{side:o,...a,ref:t}):d.jsx(TN,{side:o,...a,ref:t})})}),TN=l.forwardRef((e,t)=>{const n=Gr(Kt,e.__scopeTooltip),r=Ya(Kt,e.__scopeTooltip),o=l.useRef(null),a=q(t,o),[i,s]=l.useState(null),{trigger:c,onClose:u}=n,f=o.current,{onPointerInTransitChange:m}=r,p=l.useCallback(()=>{s(null),m(!1)},[m]),h=l.useCallback((y,g)=>{const v=y.currentTarget,w={x:y.clientX,y:y.clientY},x=FN(w,v.getBoundingClientRect()),b=$N(w,x),S=LN(g.getBoundingClientRect()),C=BN([...b,...S]);s(C),m(!0)},[m]);return l.useEffect(()=>()=>p(),[p]),l.useEffect(()=>{if(c&&f){const y=v=>h(v,f),g=v=>h(v,c);return c.addEventListener("pointerleave",y),f.addEventListener("pointerleave",g),()=>{c.removeEventListener("pointerleave",y),f.removeEventListener("pointerleave",g)}}},[c,f,h,p]),l.useEffect(()=>{if(i){const y=g=>{const v=g.target,w={x:g.clientX,y:g.clientY},x=(c==null?void 0:c.contains(v))||(f==null?void 0:f.contains(v)),b=!WN(w,i);x?p():b&&(p(),u())};return document.addEventListener("pointermove",y),()=>document.removeEventListener("pointermove",y)}},[c,f,i,u,p]),d.jsx(Zf,{...e,ref:a})}),[AN,_N]=Yr(Nn,{isInside:!1}),jN=ZS("TooltipContent"),Zf=l.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:a,onPointerDownOutside:i,...s}=e,c=Gr(Kt,n),u=Hr(n),{onClose:f}=c;return l.useEffect(()=>(document.addEventListener(Wo,f),()=>document.removeEventListener(Wo,f)),[f]),l.useEffect(()=>{if(c.trigger){const m=p=>{const h=p.target;h!=null&&h.contains(c.trigger)&&f()};return window.addEventListener("scroll",m,{capture:!0}),()=>window.removeEventListener("scroll",m,{capture:!0})}},[c.trigger,f]),d.jsx(If,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:i,onFocusOutside:m=>m.preventDefault(),onDismiss:f,children:d.jsxs(xN,{"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:[d.jsx(jN,{children:r}),d.jsx(AN,{scope:n,isInside:!0,children:d.jsx(RN,{id:c.contentId,role:"tooltip",children:o||r})})]})})});Xf.displayName=Kt;var Qf="TooltipArrow",Jf=l.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Hr(n);return _N(Qf,n).isInside?null:d.jsx(wN,{...o,...r,ref:t})});Jf.displayName=Qf;function FN(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 $N(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 LN(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 WN(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,m=c.x,p=c.y;f>r!=p>r&&n<(m-u)*(r-f)/(p-f)+u&&(o=!o)}return o}function BN(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),VN(t)}function VN(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 YN=zf,HN=Kf,GN=qf,UN=Xf,zN=Jf;const KN=YN,em=l.forwardRef(({children:e,content:t,side:n="top",align:r="center",offset:o=2,hasArrow:a=!0,className:i,zIndex:s,...c},u)=>{const f=Ye("tooltip",s);return d.jsxs(HN,{children:[d.jsx(GN,{asChild:!0,children:e}),d.jsxs(UN,{ref:u,align:r,className:k(ae.tooltip,i),side:n,sideOffset:o,style:{zIndex:f,...c.style},...c,children:[t,a?d.jsx(zN,{className:"fill-base-700 stroke-base-700",height:5,width:11}):null]})]})});em.displayName="Tooltip";exports.Accordion=bi;exports.Alert=xi;exports.Autocomplete=gy;exports.Badge=tl;exports.Breadcrumbs=nl;exports.Button=$e;exports.Calendar=Ca;exports.Checkbox=Sa;exports.CheckboxGroup=Bl;exports.Combobox=Vl;exports.DatePicker=Yl;exports.DateRangePicker=Hl;exports.Dialog=ev;exports.DialogClose=nv;exports.DialogContent=lc;exports.DialogDescription=Gl;exports.DialogFooter=Ul;exports.DialogHeader=zl;exports.DialogOverlay=aa;exports.DialogPortal=uc;exports.DialogTitle=Kl;exports.DialogTrigger=tv;exports.DropdownButton=Au;exports.FormItem=_u;exports.Image=ju;exports.Input=Fu;exports.Label=nn;exports.MultiSelect=$u;exports.Popover=Jt;exports.PopoverContent=Dt;exports.PopoverTrigger=en;exports.Radio=Ta;exports.RadioGroup=id;exports.Select=$a;exports.SelectContent=_a;exports.SelectGroup=sS;exports.SelectItem=ja;exports.SelectLabel=Yd;exports.SelectRoot=Bd;exports.SelectSeparator=Hd;exports.SelectTrigger=Fa;exports.SelectValue=Vd;exports.SingleSelect=$a;exports.StepIndicator=bS;exports.Switch=La;exports.SwitchGroup=tf;exports.Tabs=Nf;exports.TabsContent=Rf;exports.TabsList=Ef;exports.TabsTrigger=Mf;exports.Textarea=Pf;exports.Tooltip=em;exports.TooltipProvider=KN;exports.cn=k;exports.configureZIndex=Zg;exports.getZIndex=Ye;exports.getZIndexConfig=Qg;exports.resetZIndexConfig=Jg;exports.tw=ge;exports.useAriaDisabled=Oe;exports.useAriaLabelled=It;exports.useFormGroupLayout=Qo;
|
|
201
199
|
//# sourceMappingURL=index.cjs.map
|