@capitaltg/vero 1.7.3 → 1.7.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 +57 -57
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +2212 -2207
- package/dist/index.js.map +1 -1
- package/dist/types/index.d.ts +28 -0
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1,104 +1,104 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("react/jsx-runtime"),E=require("react"),Ls=require("react-dom");function Ws(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=Ws(E),En=Ws(Ls);function Bs(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=Bs(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Vs(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Bs(e))&&(r&&(r+=" "),r+=t);return r}const Wo="-",nm=e=>{const t=om(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:i=>{const s=i.split(Wo);return s[0]===""&&s.length!==1&&s.shift(),Ys(s,t)||rm(i)},getConflictingClassGroupIds:(i,s)=>{const c=n[i]||[];return s&&r[i]?[...c,...r[i]]:c}}},Ys=(e,t)=>{var i;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?Ys(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const a=e.join(Wo);return(i=t.validators.find(({validator:s})=>s(a)))==null?void 0:i.classGroupId},Ha=/^\[(.+)\]$/,rm=e=>{if(Ha.test(e)){const t=Ha.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},om=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return sm(Object.entries(e.classGroups),n).forEach(([a,i])=>{go(i,r,a,t)}),r},go=(e,t,n,r)=>{e.forEach(o=>{if(typeof o=="string"){const a=o===""?t:Ga(t,o);a.classGroupId=n;return}if(typeof o=="function"){if(am(o)){go(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([a,i])=>{go(i,Ga(t,a),n,r)})})},Ga=(e,t)=>{let n=e;return t.split(Wo).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},am=e=>e.isThemeGetter,sm=(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,im=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)}}},Hs="!",cm=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,o=t[0],a=t.length,i=s=>{const c=[];let u=0,d=0,m;for(let v=0;v<s.length;v++){let b=s[v];if(u===0){if(b===o&&(r||s.slice(v,v+a)===t)){c.push(s.slice(d,v)),d=v+a;continue}if(b==="/"){m=v;continue}}b==="["?u++:b==="]"&&u--}const p=c.length===0?s:s.substring(d),h=p.startsWith(Hs),y=h?p.substring(1):p,g=m&&m>d?m-d:void 0;return{modifiers:c,hasImportantModifier:h,baseClassName:y,maybePostfixModifierPosition:g}};return n?s=>n({className:s,parseClassName:i}):i},lm=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},um=e=>({cache:im(e.cacheSize),parseClassName:cm(e),...nm(e)}),dm=/\s+/,fm=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o}=t,a=[],i=e.trim().split(dm);let s="";for(let c=i.length-1;c>=0;c-=1){const u=i[c],{modifiers:d,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=lm(d).join(":"),b=m?v+Hs:v,x=b+g;if(a.includes(x))continue;a.push(x);const w=o(g,y);for(let S=0;S<w.length;++S){const C=w[S];a.push(b+C)}s=u+(s.length>0?" "+s:s)}return s};function mm(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=Gs(t))&&(r&&(r+=" "),r+=n);return r}const Gs=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Gs(e[r]))&&(n&&(n+=" "),n+=t);return n};function pm(e,...t){let n,r,o,a=i;function i(c){const u=t.reduce((d,m)=>m(d),e());return n=um(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 d=fm(c,n);return o(c,d),d}return function(){return a(mm.apply(null,arguments))}}const ue=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},zs=/^\[(?:([a-z-]+):)?(.+)\]$/i,hm=/^\d+\/\d+$/,gm=new Set(["px","full","screen"]),vm=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,ym=/\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$/,bm=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,xm=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,wm=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,nt=e=>Wt(e)||gm.has(e)||hm.test(e),lt=e=>Ut(e,"length",km),Wt=e=>!!e&&!Number.isNaN(Number(e)),Kr=e=>Ut(e,"number",Wt),an=e=>!!e&&Number.isInteger(Number(e)),Cm=e=>e.endsWith("%")&&Wt(e.slice(0,-1)),ee=e=>zs.test(e),ut=e=>vm.test(e),Sm=new Set(["length","size","percentage"]),Em=e=>Ut(e,Sm,Us),Nm=e=>Ut(e,"position",Us),Mm=new Set(["image","url"]),Rm=e=>Ut(e,Mm,Dm),Pm=e=>Ut(e,"",Om),sn=()=>!0,Ut=(e,t,n)=>{const r=zs.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},km=e=>ym.test(e)&&!bm.test(e),Us=()=>!1,Om=e=>xm.test(e),Dm=e=>wm.test(e),Am=()=>{const e=ue("colors"),t=ue("spacing"),n=ue("blur"),r=ue("brightness"),o=ue("borderColor"),a=ue("borderRadius"),i=ue("borderSpacing"),s=ue("borderWidth"),c=ue("contrast"),u=ue("grayscale"),d=ue("hueRotate"),m=ue("invert"),p=ue("gap"),h=ue("gradientColorStops"),y=ue("gradientColorStopPositions"),g=ue("inset"),v=ue("margin"),b=ue("opacity"),x=ue("padding"),w=ue("saturate"),S=ue("scale"),C=ue("sepia"),M=ue("skew"),N=ue("space"),P=ue("translate"),F=()=>["auto","contain","none"],_=()=>["auto","hidden","clip","visible","scroll"],$=()=>["auto",ee,t],A=()=>[ee,t],B=()=>["",nt,lt],Y=()=>["auto",Wt,ee],q=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],j=()=>["solid","dashed","dotted","double","none"],G=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],I=()=>["start","end","center","between","around","evenly","stretch"],D=()=>["","0",ee],Q=()=>["auto","avoid","all","avoid-page","page","left","right","column"],J=()=>[Wt,ee];return{cacheSize:500,separator:":",theme:{colors:[sn],spacing:[nt,lt],blur:["none","",ut,ee],brightness:J(),borderColor:[e],borderRadius:["none","","full",ut,ee],borderSpacing:A(),borderWidth:B(),contrast:J(),grayscale:D(),hueRotate:J(),invert:D(),gap:A(),gradientColorStops:[e],gradientColorStopPositions:[Cm,lt],inset:$(),margin:$(),opacity:J(),padding:A(),saturate:J(),scale:J(),sepia:D(),skew:J(),space:A(),translate:A()},classGroups:{aspect:[{aspect:["auto","square","video",ee]}],container:["container"],columns:[{columns:[ut]}],"break-after":[{"break-after":Q()}],"break-before":[{"break-before":Q()}],"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:[...q(),ee]}],overflow:[{overflow:_()}],"overflow-x":[{"overflow-x":_()}],"overflow-y":[{"overflow-y":_()}],overscroll:[{overscroll:F()}],"overscroll-x":[{"overscroll-x":F()}],"overscroll-y":[{"overscroll-y":F()}],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",an,ee]}],basis:[{basis:$()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",ee]}],grow:[{grow:D()}],shrink:[{shrink:D()}],order:[{order:["first","last","none",an,ee]}],"grid-cols":[{"grid-cols":[sn]}],"col-start-end":[{col:["auto",{span:["full",an,ee]},ee]}],"col-start":[{"col-start":Y()}],"col-end":[{"col-end":Y()}],"grid-rows":[{"grid-rows":[sn]}],"row-start-end":[{row:["auto",{span:[an,ee]},ee]}],"row-start":[{"row-start":Y()}],"row-end":[{"row-end":Y()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",ee]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",ee]}],gap:[{gap:[p]}],"gap-x":[{"gap-x":[p]}],"gap-y":[{"gap-y":[p]}],"justify-content":[{justify:["normal",...I()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...I(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...I(),"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",ee,t]}],"min-w":[{"min-w":[ee,t,"min","max","fit"]}],"max-w":[{"max-w":[ee,t,"none","full","min","max","fit","prose",{screen:[ut]},ut]}],h:[{h:[ee,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[ee,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[ee,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[ee,t,"auto","min","max","fit"]}],"font-size":[{text:["base",ut,lt]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Kr]}],"font-family":[{font:[sn]}],"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",ee]}],"line-clamp":[{"line-clamp":["none",Wt,Kr]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",nt,ee]}],"list-image":[{"list-image":["none",ee]}],"list-style-type":[{list:["none","disc","decimal",ee]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[b]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[b]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...j(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",nt,lt]}],"underline-offset":[{"underline-offset":["auto",nt,ee]}],"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:A()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ee]}],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",ee]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[b]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...q(),Nm]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Em]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Rm]}],"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":[b]}],"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":[b]}],"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":[nt,ee]}],"outline-w":[{outline:[nt,lt]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:B()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[b]}],"ring-offset-w":[{"ring-offset":[nt,lt]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",ut,Pm]}],"shadow-color":[{shadow:[sn]}],opacity:[{opacity:[b]}],"mix-blend":[{"mix-blend":[...G(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":G()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[c]}],"drop-shadow":[{"drop-shadow":["","none",ut,ee]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[d]}],invert:[{invert:[m]}],saturate:[{saturate:[w]}],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":[d]}],"backdrop-invert":[{"backdrop-invert":[m]}],"backdrop-opacity":[{"backdrop-opacity":[b]}],"backdrop-saturate":[{"backdrop-saturate":[w]}],"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",ee]}],duration:[{duration:J()}],ease:[{ease:["linear","in","out","in-out",ee]}],delay:[{delay:J()}],animate:[{animate:["none","spin","ping","pulse","bounce",ee]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[S]}],"scale-x":[{"scale-x":[S]}],"scale-y":[{"scale-y":[S]}],rotate:[{rotate:[an,ee]}],"translate-x":[{"translate-x":[P]}],"translate-y":[{"translate-y":[P]}],"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",ee]}],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",ee]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":A()}],"scroll-mx":[{"scroll-mx":A()}],"scroll-my":[{"scroll-my":A()}],"scroll-ms":[{"scroll-ms":A()}],"scroll-me":[{"scroll-me":A()}],"scroll-mt":[{"scroll-mt":A()}],"scroll-mr":[{"scroll-mr":A()}],"scroll-mb":[{"scroll-mb":A()}],"scroll-ml":[{"scroll-ml":A()}],"scroll-p":[{"scroll-p":A()}],"scroll-px":[{"scroll-px":A()}],"scroll-py":[{"scroll-py":A()}],"scroll-ps":[{"scroll-ps":A()}],"scroll-pe":[{"scroll-pe":A()}],"scroll-pt":[{"scroll-pt":A()}],"scroll-pr":[{"scroll-pr":A()}],"scroll-pb":[{"scroll-pb":A()}],"scroll-pl":[{"scroll-pl":A()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ee]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[nt,lt,Kr]}],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"]}}},Tm=pm(Am);function k(...e){return Tm(Vs(e))}const ge=(e,...t)=>String.raw({raw:e},...t);function Im(e,t){const n=l.createContext(t),r=a=>{const{children:i,...s}=a,c=l.useMemo(()=>s,Object.values(s));return f.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 b;const{scope:p,children:h,...y}=m,g=((b=p==null?void 0:p[e])==null?void 0:b[c])||s,v=l.useMemo(()=>y,Object.values(y));return f.jsx(g.Provider,{value:v,children:h})};u.displayName=a+"Provider";function d(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,d]}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,_m(o,...t)]}function _m(...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 za(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Ke(...e){return t=>{let n=!1;const r=e.map(o=>{const a=za(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():za(e[o],null)}}}}function U(...e){return l.useCallback(Ke(...e),e)}function pt(e){const t=Fm(e),n=l.forwardRef((r,o)=>{const{children:a,...i}=r,s=l.Children.toArray(a),c=s.find(Lm);if(c){const u=c.props.children,d=s.map(m=>m===c?l.Children.count(u)>1?l.Children.only(null):l.isValidElement(u)?u.props.children:null:m);return f.jsx(t,{...i,ref:o,children:l.isValidElement(u)?l.cloneElement(u,void 0,d):null})}return f.jsx(t,{...i,ref:o,children:a})});return n.displayName=`${e}.Slot`,n}var jm=pt("Slot");function Fm(e){const t=l.forwardRef((n,r)=>{const{children:o,...a}=n;if(l.isValidElement(o)){const i=Bm(o),s=Wm(a,o.props);return o.type!==l.Fragment&&(s.ref=r?Ke(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 $m=Symbol("radix.slottable");function Lm(e){return l.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===$m}function Wm(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 Bm(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 Nn(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:b}=g,x=E.useRef(null),w=E.useRef(new Map).current;return f.jsx(o,{scope:v,itemMap:w,collectionRef:x,children:b})};i.displayName=t;const s=e+"CollectionSlot",c=pt(s),u=E.forwardRef((g,v)=>{const{scope:b,children:x}=g,w=a(s,b),S=U(v,w.collectionRef);return f.jsx(c,{ref:S,children:x})});u.displayName=s;const d=e+"CollectionItemSlot",m="data-radix-collection-item",p=pt(d),h=E.forwardRef((g,v)=>{const{scope:b,children:x,...w}=g,S=E.useRef(null),C=U(v,S),M=a(d,b);return E.useEffect(()=>(M.itemMap.set(S,{ref:S,...w}),()=>void M.itemMap.delete(S))),f.jsx(p,{[m]:"",ref:C,children:x})});h.displayName=d;function y(g){const v=a(e+"CollectionConsumer",g);return E.useCallback(()=>{const x=v.collectionRef.current;if(!x)return[];const w=Array.from(x.querySelectorAll(`[${m}]`));return Array.from(v.itemMap.values()).sort((M,N)=>w.indexOf(M.ref.current)-w.indexOf(N.ref.current))},[v.collectionRef,v.itemMap])}return[{Provider:i,Slot:u,ItemSlot:h},y,r]}function O(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 de=globalThis!=null&&globalThis.document?l.useLayoutEffect:()=>{},Vm=l[" useInsertionEffect ".trim().toString()]||de;function Ce({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,a,i]=Ym({defaultProp:t,onChange:n}),s=e!==void 0,c=s?e:o;{const d=l.useRef(e!==void 0);l.useEffect(()=>{const m=d.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.`),d.current=s},[s,r])}const u=l.useCallback(d=>{var m;if(s){const p=Hm(d)?d(e):d;p!==e&&((m=i.current)==null||m.call(i,p))}else a(d)},[s,e,a,i]);return[c,u]}function Ym({defaultProp:e,onChange:t}){const[n,r]=l.useState(e),o=l.useRef(n),a=l.useRef(t);return Vm(()=>{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 Hm(e){return typeof e=="function"}var Gm=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],V=Gm.reduce((e,t)=>{const n=pt(`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),f.jsx(c,{...s,ref:a})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Ks(e,t){e&&En.flushSync(()=>e.dispatchEvent(t))}function zm(e,t){return l.useReducer((n,r)=>t[n][r]??n,e)}var qs=e=>{const{present:t,children:n}=e,r=Um(t),o=typeof n=="function"?n({present:r.isPresent}):l.Children.only(n),a=U(r.ref,Km(o));return typeof n=="function"||r.isPresent?l.cloneElement(o,{ref:a}):null};qs.displayName="Presence";function Um(e){const[t,n]=l.useState(),r=l.useRef(null),o=l.useRef(e),a=l.useRef("none"),i=e?"mounted":"unmounted",[s,c]=zm(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return l.useEffect(()=>{const u=Yn(r.current);a.current=s==="mounted"?u:"none"},[s]),de(()=>{const u=r.current,d=o.current;if(d!==e){const p=a.current,h=Yn(u);e?c("MOUNT"):h==="none"||(u==null?void 0:u.display)==="none"?c("UNMOUNT"):c(d&&p!==h?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,c]),de(()=>{if(t){let u;const d=t.ownerDocument.defaultView??window,m=h=>{const g=Yn(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=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=v)})}},p=h=>{h.target===t&&(a.current=Yn(r.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",m),t.addEventListener("animationend",m),()=>{d.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 Yn(e){return(e==null?void 0:e.animationName)||"none"}function Km(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 qm=l[" useId ".trim().toString()]||(()=>{}),Xm=0;function pe(e){const[t,n]=l.useState(qm());return de(()=>{n(r=>r??String(Xm++))},[e]),e||(t?`radix-${t}`:"")}var ur="Collapsible",[Zm,Xs]=ve(ur),[Qm,Bo]=Zm(ur),Zs=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:ur});return f.jsx(Qm,{scope:n,disabled:a,contentId:pe(),open:c,onOpenToggle:l.useCallback(()=>u(d=>!d),[u]),children:f.jsx(V.div,{"data-state":Yo(c),"data-disabled":a?"":void 0,...s,ref:t})})});Zs.displayName=ur;var Qs="CollapsibleTrigger",Js=l.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,o=Bo(Qs,n);return f.jsx(V.button,{type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":Yo(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled,...r,ref:t,onClick:O(e.onClick,o.onOpenToggle)})});Js.displayName=Qs;var Vo="CollapsibleContent",ei=l.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=Bo(Vo,e.__scopeCollapsible);return f.jsx(qs,{present:n||o.open,children:({present:a})=>f.jsx(Jm,{...r,ref:t,present:a})})});ei.displayName=Vo;var Jm=l.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:o,...a}=e,i=Bo(Vo,n),[s,c]=l.useState(r),u=l.useRef(null),d=U(t,u),m=l.useRef(0),p=m.current,h=l.useRef(0),y=h.current,g=i.open||s,v=l.useRef(g),b=l.useRef(void 0);return l.useEffect(()=>{const x=requestAnimationFrame(()=>v.current=!1);return()=>cancelAnimationFrame(x)},[]),de(()=>{const x=u.current;if(x){b.current=b.current||{transitionDuration:x.style.transitionDuration,animationName:x.style.animationName},x.style.transitionDuration="0s",x.style.animationName="none";const w=x.getBoundingClientRect();m.current=w.height,h.current=w.width,v.current||(x.style.transitionDuration=b.current.transitionDuration,x.style.animationName=b.current.animationName),c(r)}},[i.open,r]),f.jsx(V.div,{"data-state":Yo(i.open),"data-disabled":i.disabled?"":void 0,id:i.contentId,hidden:!g,...a,ref:d,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 Yo(e){return e?"open":"closed"}var ep=Zs,tp=Js,np=ei,rp=l.createContext(void 0);function bt(e){const t=l.useContext(rp);return e||t||"ltr"}var We="Accordion",op=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[Ho,ap,sp]=Nn(We),[dr,OE]=ve(We,[sp,Xs]),Go=Xs(),ti=E.forwardRef((e,t)=>{const{type:n,...r}=e,o=r,a=r;return f.jsx(Ho.Provider,{scope:e.__scopeAccordion,children:n==="multiple"?f.jsx(up,{...a,ref:t}):f.jsx(lp,{...o,ref:t})})});ti.displayName=We;var[ni,ip]=dr(We),[ri,cp]=dr(We,{collapsible:!1}),lp=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:We});return f.jsx(ni,{scope:e.__scopeAccordion,value:E.useMemo(()=>s?[s]:[],[s]),onItemOpen:c,onItemClose:E.useCallback(()=>a&&c(""),[a,c]),children:f.jsx(ri,{scope:e.__scopeAccordion,collapsible:a,children:f.jsx(oi,{...i,ref:t})})})}),up=E.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},...a}=e,[i,s]=Ce({prop:n,defaultProp:r??[],onChange:o,caller:We}),c=E.useCallback(d=>s((m=[])=>[...m,d]),[s]),u=E.useCallback(d=>s((m=[])=>m.filter(p=>p!==d)),[s]);return f.jsx(ni,{scope:e.__scopeAccordion,value:i,onItemOpen:c,onItemClose:u,children:f.jsx(ri,{scope:e.__scopeAccordion,collapsible:!0,children:f.jsx(oi,{...a,ref:t})})})}),[dp,fr]=dr(We),oi=E.forwardRef((e,t)=>{const{__scopeAccordion:n,disabled:r,dir:o,orientation:a="vertical",...i}=e,s=E.useRef(null),c=U(s,t),u=ap(n),m=bt(o)==="ltr",p=O(e.onKeyDown,h=>{var P;if(!op.includes(h.key))return;const y=h.target,g=u().filter(F=>{var _;return!((_=F.ref.current)!=null&&_.disabled)}),v=g.findIndex(F=>F.ref.current===y),b=g.length;if(v===-1)return;h.preventDefault();let x=v;const w=0,S=b-1,C=()=>{x=v+1,x>S&&(x=w)},M=()=>{x=v-1,x<w&&(x=S)};switch(h.key){case"Home":x=w;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%b;(P=g[N].ref.current)==null||P.focus()});return f.jsx(dp,{scope:n,disabled:r,direction:o,orientation:a,children:f.jsx(Ho.Slot,{scope:n,children:f.jsx(V.div,{...i,"data-orientation":a,ref:c,onKeyDown:r?void 0:p})})})}),tr="AccordionItem",[fp,zo]=dr(tr),ai=E.forwardRef((e,t)=>{const{__scopeAccordion:n,value:r,...o}=e,a=fr(tr,n),i=ip(tr,n),s=Go(n),c=pe(),u=r&&i.value.includes(r)||!1,d=a.disabled||e.disabled;return f.jsx(fp,{scope:n,open:u,disabled:d,triggerId:c,children:f.jsx(ep,{"data-orientation":a.orientation,"data-state":di(u),...s,...o,ref:t,disabled:d,open:u,onOpenChange:m=>{m?i.onItemOpen(r):i.onItemClose(r)}})})});ai.displayName=tr;var si="AccordionHeader",ii=E.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=fr(We,n),a=zo(si,n);return f.jsx(V.h3,{"data-orientation":o.orientation,"data-state":di(a.open),"data-disabled":a.disabled?"":void 0,...r,ref:t})});ii.displayName=si;var vo="AccordionTrigger",ci=E.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=fr(We,n),a=zo(vo,n),i=cp(vo,n),s=Go(n);return f.jsx(Ho.ItemSlot,{scope:n,children:f.jsx(tp,{"aria-disabled":a.open&&!i.collapsible||void 0,"data-orientation":o.orientation,id:a.triggerId,...s,...r,ref:t})})});ci.displayName=vo;var li="AccordionContent",ui=E.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=fr(We,n),a=zo(li,n),i=Go(n);return f.jsx(np,{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}})});ui.displayName=li;function di(e){return e?"open":"closed"}var Ua=ti,mp=ai,pp=ii,hp=ci,gp=ui;/**
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const f=require("react/jsx-runtime"),E=require("react"),Ws=require("react-dom");function Bs(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=Bs(E),En=Bs(Ws);function Vs(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=Vs(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Ys(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Vs(e))&&(r&&(r+=" "),r+=t);return r}const Wo="-",sm=e=>{const t=cm(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:i=>{const s=i.split(Wo);return s[0]===""&&s.length!==1&&s.shift(),Hs(s,t)||im(i)},getConflictingClassGroupIds:(i,s)=>{const c=n[i]||[];return s&&r[i]?[...c,...r[i]]:c}}},Hs=(e,t)=>{var i;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?Hs(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const a=e.join(Wo);return(i=t.validators.find(({validator:s})=>s(a)))==null?void 0:i.classGroupId},Ga=/^\[(.+)\]$/,im=e=>{if(Ga.test(e)){const t=Ga.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},cm=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return um(Object.entries(e.classGroups),n).forEach(([a,i])=>{go(i,r,a,t)}),r},go=(e,t,n,r)=>{e.forEach(o=>{if(typeof o=="string"){const a=o===""?t:za(t,o);a.classGroupId=n;return}if(typeof o=="function"){if(lm(o)){go(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([a,i])=>{go(i,za(t,a),n,r)})})},za=(e,t)=>{let n=e;return t.split(Wo).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},lm=e=>e.isThemeGetter,um=(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,dm=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)}}},Gs="!",fm=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,o=t[0],a=t.length,i=s=>{const c=[];let u=0,d=0,m;for(let v=0;v<s.length;v++){let b=s[v];if(u===0){if(b===o&&(r||s.slice(v,v+a)===t)){c.push(s.slice(d,v)),d=v+a;continue}if(b==="/"){m=v;continue}}b==="["?u++:b==="]"&&u--}const p=c.length===0?s:s.substring(d),h=p.startsWith(Gs),y=h?p.substring(1):p,g=m&&m>d?m-d:void 0;return{modifiers:c,hasImportantModifier:h,baseClassName:y,maybePostfixModifierPosition:g}};return n?s=>n({className:s,parseClassName:i}):i},mm=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},pm=e=>({cache:dm(e.cacheSize),parseClassName:fm(e),...sm(e)}),hm=/\s+/,gm=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o}=t,a=[],i=e.trim().split(hm);let s="";for(let c=i.length-1;c>=0;c-=1){const u=i[c],{modifiers:d,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=mm(d).join(":"),b=m?v+Gs:v,x=b+g;if(a.includes(x))continue;a.push(x);const w=o(g,y);for(let S=0;S<w.length;++S){const C=w[S];a.push(b+C)}s=u+(s.length>0?" "+s:s)}return s};function vm(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=zs(t))&&(r&&(r+=" "),r+=n);return r}const zs=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=zs(e[r]))&&(n&&(n+=" "),n+=t);return n};function ym(e,...t){let n,r,o,a=i;function i(c){const u=t.reduce((d,m)=>m(d),e());return n=pm(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 d=gm(c,n);return o(c,d),d}return function(){return a(vm.apply(null,arguments))}}const ue=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},Us=/^\[(?:([a-z-]+):)?(.+)\]$/i,bm=/^\d+\/\d+$/,xm=new Set(["px","full","screen"]),wm=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Cm=/\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$/,Sm=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Em=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Nm=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,nt=e=>Wt(e)||xm.has(e)||bm.test(e),lt=e=>Ut(e,"length",Am),Wt=e=>!!e&&!Number.isNaN(Number(e)),Kr=e=>Ut(e,"number",Wt),an=e=>!!e&&Number.isInteger(Number(e)),Mm=e=>e.endsWith("%")&&Wt(e.slice(0,-1)),ee=e=>Us.test(e),ut=e=>wm.test(e),Rm=new Set(["length","size","percentage"]),Pm=e=>Ut(e,Rm,Ks),km=e=>Ut(e,"position",Ks),Om=new Set(["image","url"]),Dm=e=>Ut(e,Om,_m),Im=e=>Ut(e,"",Tm),sn=()=>!0,Ut=(e,t,n)=>{const r=Us.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},Am=e=>Cm.test(e)&&!Sm.test(e),Ks=()=>!1,Tm=e=>Em.test(e),_m=e=>Nm.test(e),jm=()=>{const e=ue("colors"),t=ue("spacing"),n=ue("blur"),r=ue("brightness"),o=ue("borderColor"),a=ue("borderRadius"),i=ue("borderSpacing"),s=ue("borderWidth"),c=ue("contrast"),u=ue("grayscale"),d=ue("hueRotate"),m=ue("invert"),p=ue("gap"),h=ue("gradientColorStops"),y=ue("gradientColorStopPositions"),g=ue("inset"),v=ue("margin"),b=ue("opacity"),x=ue("padding"),w=ue("saturate"),S=ue("scale"),C=ue("sepia"),M=ue("skew"),N=ue("space"),P=ue("translate"),F=()=>["auto","contain","none"],_=()=>["auto","hidden","clip","visible","scroll"],$=()=>["auto",ee,t],I=()=>[ee,t],B=()=>["",nt,lt],Y=()=>["auto",Wt,ee],q=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],j=()=>["solid","dashed","dotted","double","none"],G=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],T=()=>["start","end","center","between","around","evenly","stretch"],D=()=>["","0",ee],Q=()=>["auto","avoid","all","avoid-page","page","left","right","column"],J=()=>[Wt,ee];return{cacheSize:500,separator:":",theme:{colors:[sn],spacing:[nt,lt],blur:["none","",ut,ee],brightness:J(),borderColor:[e],borderRadius:["none","","full",ut,ee],borderSpacing:I(),borderWidth:B(),contrast:J(),grayscale:D(),hueRotate:J(),invert:D(),gap:I(),gradientColorStops:[e],gradientColorStopPositions:[Mm,lt],inset:$(),margin:$(),opacity:J(),padding:I(),saturate:J(),scale:J(),sepia:D(),skew:J(),space:I(),translate:I()},classGroups:{aspect:[{aspect:["auto","square","video",ee]}],container:["container"],columns:[{columns:[ut]}],"break-after":[{"break-after":Q()}],"break-before":[{"break-before":Q()}],"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:[...q(),ee]}],overflow:[{overflow:_()}],"overflow-x":[{"overflow-x":_()}],"overflow-y":[{"overflow-y":_()}],overscroll:[{overscroll:F()}],"overscroll-x":[{"overscroll-x":F()}],"overscroll-y":[{"overscroll-y":F()}],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",an,ee]}],basis:[{basis:$()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",ee]}],grow:[{grow:D()}],shrink:[{shrink:D()}],order:[{order:["first","last","none",an,ee]}],"grid-cols":[{"grid-cols":[sn]}],"col-start-end":[{col:["auto",{span:["full",an,ee]},ee]}],"col-start":[{"col-start":Y()}],"col-end":[{"col-end":Y()}],"grid-rows":[{"grid-rows":[sn]}],"row-start-end":[{row:["auto",{span:[an,ee]},ee]}],"row-start":[{"row-start":Y()}],"row-end":[{"row-end":Y()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",ee]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",ee]}],gap:[{gap:[p]}],"gap-x":[{"gap-x":[p]}],"gap-y":[{"gap-y":[p]}],"justify-content":[{justify:["normal",...T()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...T(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...T(),"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",ee,t]}],"min-w":[{"min-w":[ee,t,"min","max","fit"]}],"max-w":[{"max-w":[ee,t,"none","full","min","max","fit","prose",{screen:[ut]},ut]}],h:[{h:[ee,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[ee,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[ee,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[ee,t,"auto","min","max","fit"]}],"font-size":[{text:["base",ut,lt]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Kr]}],"font-family":[{font:[sn]}],"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",ee]}],"line-clamp":[{"line-clamp":["none",Wt,Kr]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",nt,ee]}],"list-image":[{"list-image":["none",ee]}],"list-style-type":[{list:["none","disc","decimal",ee]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[b]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[b]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...j(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",nt,lt]}],"underline-offset":[{"underline-offset":["auto",nt,ee]}],"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:I()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ee]}],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",ee]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[b]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...q(),km]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Pm]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Dm]}],"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":[b]}],"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":[b]}],"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":[nt,ee]}],"outline-w":[{outline:[nt,lt]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:B()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[b]}],"ring-offset-w":[{"ring-offset":[nt,lt]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",ut,Im]}],"shadow-color":[{shadow:[sn]}],opacity:[{opacity:[b]}],"mix-blend":[{"mix-blend":[...G(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":G()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[c]}],"drop-shadow":[{"drop-shadow":["","none",ut,ee]}],grayscale:[{grayscale:[u]}],"hue-rotate":[{"hue-rotate":[d]}],invert:[{invert:[m]}],saturate:[{saturate:[w]}],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":[d]}],"backdrop-invert":[{"backdrop-invert":[m]}],"backdrop-opacity":[{"backdrop-opacity":[b]}],"backdrop-saturate":[{"backdrop-saturate":[w]}],"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",ee]}],duration:[{duration:J()}],ease:[{ease:["linear","in","out","in-out",ee]}],delay:[{delay:J()}],animate:[{animate:["none","spin","ping","pulse","bounce",ee]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[S]}],"scale-x":[{"scale-x":[S]}],"scale-y":[{"scale-y":[S]}],rotate:[{rotate:[an,ee]}],"translate-x":[{"translate-x":[P]}],"translate-y":[{"translate-y":[P]}],"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",ee]}],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",ee]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":I()}],"scroll-mx":[{"scroll-mx":I()}],"scroll-my":[{"scroll-my":I()}],"scroll-ms":[{"scroll-ms":I()}],"scroll-me":[{"scroll-me":I()}],"scroll-mt":[{"scroll-mt":I()}],"scroll-mr":[{"scroll-mr":I()}],"scroll-mb":[{"scroll-mb":I()}],"scroll-ml":[{"scroll-ml":I()}],"scroll-p":[{"scroll-p":I()}],"scroll-px":[{"scroll-px":I()}],"scroll-py":[{"scroll-py":I()}],"scroll-ps":[{"scroll-ps":I()}],"scroll-pe":[{"scroll-pe":I()}],"scroll-pt":[{"scroll-pt":I()}],"scroll-pr":[{"scroll-pr":I()}],"scroll-pb":[{"scroll-pb":I()}],"scroll-pl":[{"scroll-pl":I()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ee]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[nt,lt,Kr]}],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"]}}},Fm=ym(jm);function k(...e){return Fm(Ys(e))}const ge=(e,...t)=>String.raw({raw:e},...t);function $m(e,t){const n=l.createContext(t),r=a=>{const{children:i,...s}=a,c=l.useMemo(()=>s,Object.values(s));return f.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 b;const{scope:p,children:h,...y}=m,g=((b=p==null?void 0:p[e])==null?void 0:b[c])||s,v=l.useMemo(()=>y,Object.values(y));return f.jsx(g.Provider,{value:v,children:h})};u.displayName=a+"Provider";function d(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,d]}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,Lm(o,...t)]}function Lm(...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 Ua(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Ke(...e){return t=>{let n=!1;const r=e.map(o=>{const a=Ua(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():Ua(e[o],null)}}}}function U(...e){return l.useCallback(Ke(...e),e)}function pt(e){const t=Bm(e),n=l.forwardRef((r,o)=>{const{children:a,...i}=r,s=l.Children.toArray(a),c=s.find(Ym);if(c){const u=c.props.children,d=s.map(m=>m===c?l.Children.count(u)>1?l.Children.only(null):l.isValidElement(u)?u.props.children:null:m);return f.jsx(t,{...i,ref:o,children:l.isValidElement(u)?l.cloneElement(u,void 0,d):null})}return f.jsx(t,{...i,ref:o,children:a})});return n.displayName=`${e}.Slot`,n}var Wm=pt("Slot");function Bm(e){const t=l.forwardRef((n,r)=>{const{children:o,...a}=n;if(l.isValidElement(o)){const i=Gm(o),s=Hm(a,o.props);return o.type!==l.Fragment&&(s.ref=r?Ke(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 Vm=Symbol("radix.slottable");function Ym(e){return l.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Vm}function Hm(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 Gm(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 Nn(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:b}=g,x=E.useRef(null),w=E.useRef(new Map).current;return f.jsx(o,{scope:v,itemMap:w,collectionRef:x,children:b})};i.displayName=t;const s=e+"CollectionSlot",c=pt(s),u=E.forwardRef((g,v)=>{const{scope:b,children:x}=g,w=a(s,b),S=U(v,w.collectionRef);return f.jsx(c,{ref:S,children:x})});u.displayName=s;const d=e+"CollectionItemSlot",m="data-radix-collection-item",p=pt(d),h=E.forwardRef((g,v)=>{const{scope:b,children:x,...w}=g,S=E.useRef(null),C=U(v,S),M=a(d,b);return E.useEffect(()=>(M.itemMap.set(S,{ref:S,...w}),()=>void M.itemMap.delete(S))),f.jsx(p,{[m]:"",ref:C,children:x})});h.displayName=d;function y(g){const v=a(e+"CollectionConsumer",g);return E.useCallback(()=>{const x=v.collectionRef.current;if(!x)return[];const w=Array.from(x.querySelectorAll(`[${m}]`));return Array.from(v.itemMap.values()).sort((M,N)=>w.indexOf(M.ref.current)-w.indexOf(N.ref.current))},[v.collectionRef,v.itemMap])}return[{Provider:i,Slot:u,ItemSlot:h},y,r]}function O(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 de=globalThis!=null&&globalThis.document?l.useLayoutEffect:()=>{},zm=l[" useInsertionEffect ".trim().toString()]||de;function Ce({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,a,i]=Um({defaultProp:t,onChange:n}),s=e!==void 0,c=s?e:o;{const d=l.useRef(e!==void 0);l.useEffect(()=>{const m=d.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.`),d.current=s},[s,r])}const u=l.useCallback(d=>{var m;if(s){const p=Km(d)?d(e):d;p!==e&&((m=i.current)==null||m.call(i,p))}else a(d)},[s,e,a,i]);return[c,u]}function Um({defaultProp:e,onChange:t}){const[n,r]=l.useState(e),o=l.useRef(n),a=l.useRef(t);return zm(()=>{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 Km(e){return typeof e=="function"}var qm=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],V=qm.reduce((e,t)=>{const n=pt(`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),f.jsx(c,{...s,ref:a})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function qs(e,t){e&&En.flushSync(()=>e.dispatchEvent(t))}function Xm(e,t){return l.useReducer((n,r)=>t[n][r]??n,e)}var Xs=e=>{const{present:t,children:n}=e,r=Zm(t),o=typeof n=="function"?n({present:r.isPresent}):l.Children.only(n),a=U(r.ref,Qm(o));return typeof n=="function"||r.isPresent?l.cloneElement(o,{ref:a}):null};Xs.displayName="Presence";function Zm(e){const[t,n]=l.useState(),r=l.useRef(null),o=l.useRef(e),a=l.useRef("none"),i=e?"mounted":"unmounted",[s,c]=Xm(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return l.useEffect(()=>{const u=Yn(r.current);a.current=s==="mounted"?u:"none"},[s]),de(()=>{const u=r.current,d=o.current;if(d!==e){const p=a.current,h=Yn(u);e?c("MOUNT"):h==="none"||(u==null?void 0:u.display)==="none"?c("UNMOUNT"):c(d&&p!==h?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,c]),de(()=>{if(t){let u;const d=t.ownerDocument.defaultView??window,m=h=>{const g=Yn(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=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=v)})}},p=h=>{h.target===t&&(a.current=Yn(r.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",m),t.addEventListener("animationend",m),()=>{d.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 Yn(e){return(e==null?void 0:e.animationName)||"none"}function Qm(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 Jm=l[" useId ".trim().toString()]||(()=>{}),ep=0;function pe(e){const[t,n]=l.useState(Jm());return de(()=>{n(r=>r??String(ep++))},[e]),e||(t?`radix-${t}`:"")}var ur="Collapsible",[tp,Zs]=ve(ur),[np,Bo]=tp(ur),Qs=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:ur});return f.jsx(np,{scope:n,disabled:a,contentId:pe(),open:c,onOpenToggle:l.useCallback(()=>u(d=>!d),[u]),children:f.jsx(V.div,{"data-state":Yo(c),"data-disabled":a?"":void 0,...s,ref:t})})});Qs.displayName=ur;var Js="CollapsibleTrigger",ei=l.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,o=Bo(Js,n);return f.jsx(V.button,{type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":Yo(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled,...r,ref:t,onClick:O(e.onClick,o.onOpenToggle)})});ei.displayName=Js;var Vo="CollapsibleContent",ti=l.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=Bo(Vo,e.__scopeCollapsible);return f.jsx(Xs,{present:n||o.open,children:({present:a})=>f.jsx(rp,{...r,ref:t,present:a})})});ti.displayName=Vo;var rp=l.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:o,...a}=e,i=Bo(Vo,n),[s,c]=l.useState(r),u=l.useRef(null),d=U(t,u),m=l.useRef(0),p=m.current,h=l.useRef(0),y=h.current,g=i.open||s,v=l.useRef(g),b=l.useRef(void 0);return l.useEffect(()=>{const x=requestAnimationFrame(()=>v.current=!1);return()=>cancelAnimationFrame(x)},[]),de(()=>{const x=u.current;if(x){b.current=b.current||{transitionDuration:x.style.transitionDuration,animationName:x.style.animationName},x.style.transitionDuration="0s",x.style.animationName="none";const w=x.getBoundingClientRect();m.current=w.height,h.current=w.width,v.current||(x.style.transitionDuration=b.current.transitionDuration,x.style.animationName=b.current.animationName),c(r)}},[i.open,r]),f.jsx(V.div,{"data-state":Yo(i.open),"data-disabled":i.disabled?"":void 0,id:i.contentId,hidden:!g,...a,ref:d,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 Yo(e){return e?"open":"closed"}var op=Qs,ap=ei,sp=ti,ip=l.createContext(void 0);function bt(e){const t=l.useContext(ip);return e||t||"ltr"}var We="Accordion",cp=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[Ho,lp,up]=Nn(We),[dr,DE]=ve(We,[up,Zs]),Go=Zs(),ni=E.forwardRef((e,t)=>{const{type:n,...r}=e,o=r,a=r;return f.jsx(Ho.Provider,{scope:e.__scopeAccordion,children:n==="multiple"?f.jsx(pp,{...a,ref:t}):f.jsx(mp,{...o,ref:t})})});ni.displayName=We;var[ri,dp]=dr(We),[oi,fp]=dr(We,{collapsible:!1}),mp=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:We});return f.jsx(ri,{scope:e.__scopeAccordion,value:E.useMemo(()=>s?[s]:[],[s]),onItemOpen:c,onItemClose:E.useCallback(()=>a&&c(""),[a,c]),children:f.jsx(oi,{scope:e.__scopeAccordion,collapsible:a,children:f.jsx(ai,{...i,ref:t})})})}),pp=E.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},...a}=e,[i,s]=Ce({prop:n,defaultProp:r??[],onChange:o,caller:We}),c=E.useCallback(d=>s((m=[])=>[...m,d]),[s]),u=E.useCallback(d=>s((m=[])=>m.filter(p=>p!==d)),[s]);return f.jsx(ri,{scope:e.__scopeAccordion,value:i,onItemOpen:c,onItemClose:u,children:f.jsx(oi,{scope:e.__scopeAccordion,collapsible:!0,children:f.jsx(ai,{...a,ref:t})})})}),[hp,fr]=dr(We),ai=E.forwardRef((e,t)=>{const{__scopeAccordion:n,disabled:r,dir:o,orientation:a="vertical",...i}=e,s=E.useRef(null),c=U(s,t),u=lp(n),m=bt(o)==="ltr",p=O(e.onKeyDown,h=>{var P;if(!cp.includes(h.key))return;const y=h.target,g=u().filter(F=>{var _;return!((_=F.ref.current)!=null&&_.disabled)}),v=g.findIndex(F=>F.ref.current===y),b=g.length;if(v===-1)return;h.preventDefault();let x=v;const w=0,S=b-1,C=()=>{x=v+1,x>S&&(x=w)},M=()=>{x=v-1,x<w&&(x=S)};switch(h.key){case"Home":x=w;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%b;(P=g[N].ref.current)==null||P.focus()});return f.jsx(hp,{scope:n,disabled:r,direction:o,orientation:a,children:f.jsx(Ho.Slot,{scope:n,children:f.jsx(V.div,{...i,"data-orientation":a,ref:c,onKeyDown:r?void 0:p})})})}),tr="AccordionItem",[gp,zo]=dr(tr),si=E.forwardRef((e,t)=>{const{__scopeAccordion:n,value:r,...o}=e,a=fr(tr,n),i=dp(tr,n),s=Go(n),c=pe(),u=r&&i.value.includes(r)||!1,d=a.disabled||e.disabled;return f.jsx(gp,{scope:n,open:u,disabled:d,triggerId:c,children:f.jsx(op,{"data-orientation":a.orientation,"data-state":fi(u),...s,...o,ref:t,disabled:d,open:u,onOpenChange:m=>{m?i.onItemOpen(r):i.onItemClose(r)}})})});si.displayName=tr;var ii="AccordionHeader",ci=E.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=fr(We,n),a=zo(ii,n);return f.jsx(V.h3,{"data-orientation":o.orientation,"data-state":fi(a.open),"data-disabled":a.disabled?"":void 0,...r,ref:t})});ci.displayName=ii;var vo="AccordionTrigger",li=E.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=fr(We,n),a=zo(vo,n),i=fp(vo,n),s=Go(n);return f.jsx(Ho.ItemSlot,{scope:n,children:f.jsx(ap,{"aria-disabled":a.open&&!i.collapsible||void 0,"data-orientation":o.orientation,id:a.triggerId,...s,...r,ref:t})})});li.displayName=vo;var ui="AccordionContent",di=E.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=fr(We,n),a=zo(ui,n),i=Go(n);return f.jsx(sp,{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}})});di.displayName=ui;function fi(e){return e?"open":"closed"}var Ka=ni,vp=si,yp=ci,bp=li,xp=di;/**
|
|
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 wp=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Cp=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,n,r)=>r?r.toUpperCase():n.toLowerCase()),qa=e=>{const t=Cp(e);return t.charAt(0).toUpperCase()+t.slice(1)},mi=(...e)=>e.filter((t,n,r)=>!!t&&t.trim()!==""&&r.indexOf(t)===n).join(" ").trim(),Sp=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 Ep={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 Np=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,...Ep,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:mi("lucide",o),...!a&&!Sp(s)&&{"aria-hidden":"true"},...s},[...i.map(([u,d])=>E.createElement(u,d)),...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 Ne=(e,t)=>{const n=E.forwardRef(({className:r,...o},a)=>E.createElement(
|
|
21
|
+
*/const Ne=(e,t)=>{const n=E.forwardRef(({className:r,...o},a)=>E.createElement(Np,{ref:a,iconNode:t,className:mi(`lucide-${wp(qa(e))}`,`lucide-${e}`,r),...o}));return n.displayName=qa(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 Mp=[["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"}]],pi=Ne("calendar",Mp);/**
|
|
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 Rp=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],Kt=Ne("check",Rp);/**
|
|
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 Pp=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],Uo=Ne("chevron-down",Pp);/**
|
|
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 kp=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],Op=Ne("chevron-left",kp);/**
|
|
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 Dp=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Ko=Ne("chevron-right",Dp);/**
|
|
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 Ip=[["path",{d:"m7 15 5 5 5-5",key:"1hf1tw"}],["path",{d:"m7 9 5-5 5 5",key:"sgt6xg"}]],qo=Ne("chevrons-up-down",Ip);/**
|
|
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 Ap=[["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"}]],Tp=Ne("circle-alert",Ap);/**
|
|
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 _p=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],jp=Ne("circle-check",_p);/**
|
|
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 Fp=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]],hi=Ne("circle",Fp);/**
|
|
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 $p=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],Lp=Ne("info",$p);/**
|
|
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 Wp=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],gi=Ne("loader-circle",Wp);/**
|
|
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 Bp=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],Vp=Ne("search",Bp);/**
|
|
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 Yp=[["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"}]],Hp=Ne("triangle-alert",Yp);/**
|
|
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 Gp=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],mr=Ne("x",Gp),Xa=ge`focus:outline-none focus:ring-[3px] focus:ring-ring focus:ring-offset-[3px]`,zp=ge`focus:ring-offset-2`,Za=ge`focus-visible:outline-none focus-visible:ring-[3px]
|
|
92
|
+
focus-visible:ring-ring focus-visible:ring-offset-[3px] focus-visible:ring-offset-background`,Up=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 Kp=ge`flex h-10 w-full rounded-sm border border-input bg-background px-3 py-2 text-sm
|
|
94
94
|
ring-offset-background disabled:cursor-not-allowed disabled:opacity-50
|
|
95
|
-
aria-disabled:cursor-not-allowed aria-disabled:opacity-50`,
|
|
95
|
+
aria-disabled:cursor-not-allowed aria-disabled:opacity-50`,qp=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`,le={focusRing:
|
|
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}}),
|
|
100
|
-
hover:bg-black/10 hover:opacity-100 focus:bg-black/10 focus:opacity-100`),type:"button",onClick:s,children:[f.jsx(mr,{className:"h-5 w-5",strokeWidth:3}),f.jsx("span",{className:"sr-only",children:"Close"})]}):null]})});vi.displayName="Alert";function Xe({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}:{}}const Et=De(le.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"}}),Oe=l.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,isDisabled:o=!1,isLoading:a=!1,children:i,...s},c)=>{const u=r?jm:"button",d=Xe({isDisabled:o||a});return r?f.jsx(u,{ref:c,className:k(Et({variant:t,size:n}),e),...s,...d,children:i}):f.jsx(u,{ref:c,"aria-busy":a,className:k(Et({variant:t,size:n}),"relative",e),...s,...d,children:a?f.jsxs(f.Fragment,{children:[f.jsx("span",{className:"invisible",children:i}),f.jsx("span",{"aria-hidden":"true",className:"absolute inset-0 flex items-center justify-center",children:f.jsx(hi,{className:"h-4 w-4 animate-spin"})})]}):i})});Oe.displayName="Button";var es=1,Qp=.9,Jp=.8,eh=.17,qr=.1,Xr=.999,th=.9999,nh=.99,rh=/[\\\/_+.#"@\[\(\{&]/,oh=/[\\\/_+.#"@\[\(\{&]/g,ah=/[\s-]/,yi=/[\s-]/g;function yo(e,t,n,r,o,a,i){if(a===t.length)return o===e.length?es:nh;var s=`${o},${a}`;if(i[s]!==void 0)return i[s];for(var c=r.charAt(a),u=n.indexOf(c,o),d=0,m,p,h,y;u>=0;)m=yo(e,t,n,r,u+1,a+1,i),m>d&&(u===o?m*=es:rh.test(e.charAt(u-1))?(m*=Jp,h=e.slice(o,u-1).match(oh),h&&o>0&&(m*=Math.pow(Xr,h.length))):ah.test(e.charAt(u-1))?(m*=Qp,y=e.slice(o,u-1).match(yi),y&&o>0&&(m*=Math.pow(Xr,y.length))):(m*=eh,o>0&&(m*=Math.pow(Xr,u-o))),e.charAt(u)!==t.charAt(a)&&(m*=th)),(m<qr&&n.charAt(u-1)===r.charAt(a+1)||r.charAt(a+1)===r.charAt(a)&&n.charAt(u-1)!==r.charAt(a))&&(p=yo(e,t,n,r,u+1,a+2,i),p*qr>m&&(m=p*qr)),m>d&&(d=m),u=n.indexOf(c,u+1);return i[s]=d,d}function ts(e){return e.toLowerCase().replace(yi," ")}function sh(e,t,n){return e=n&&n.length>0?`${e+" "+n.join(" ")}`:e,yo(e,t,ts(e),ts(t),0,0,{})}function Se(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 bi(e,t=globalThis==null?void 0:globalThis.document){const n=Se(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 ih="DismissableLayer",bo="dismissableLayer.update",ch="dismissableLayer.pointerDownOutside",lh="dismissableLayer.focusOutside",ns,xi=l.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Mn=l.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:i,onDismiss:s,...c}=e,u=l.useContext(xi),[d,m]=l.useState(null),p=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,h]=l.useState({}),y=U(t,N=>m(N)),g=Array.from(u.layers),[v]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),b=g.indexOf(v),x=d?g.indexOf(d):-1,w=u.layersWithOutsidePointerEventsDisabled.size>0,S=x>=b,C=fh(N=>{const P=N.target,F=[...u.branches].some(_=>_.contains(P));!S||F||(o==null||o(N),i==null||i(N),N.defaultPrevented||s==null||s())},p),M=mh(N=>{const P=N.target;[...u.branches].some(_=>_.contains(P))||(a==null||a(N),i==null||i(N),N.defaultPrevented||s==null||s())},p);return bi(N=>{x===u.layers.size-1&&(r==null||r(N),!N.defaultPrevented&&s&&(N.preventDefault(),s()))},p),l.useEffect(()=>{if(d)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(ns=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),rs(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=ns)}},[d,p,n,u]),l.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),rs())},[d,u]),l.useEffect(()=>{const N=()=>h({});return document.addEventListener(bo,N),()=>document.removeEventListener(bo,N)},[]),f.jsx(V.div,{...c,ref:y,style:{pointerEvents:w?S?"auto":"none":void 0,...e.style},onFocusCapture:O(e.onFocusCapture,M.onFocusCapture),onBlurCapture:O(e.onBlurCapture,M.onBlurCapture),onPointerDownCapture:O(e.onPointerDownCapture,C.onPointerDownCapture)})});Mn.displayName=ih;var uh="DismissableLayerBranch",dh=l.forwardRef((e,t)=>{const n=l.useContext(xi),r=l.useRef(null),o=U(t,r);return l.useEffect(()=>{const a=r.current;if(a)return n.branches.add(a),()=>{n.branches.delete(a)}},[n.branches]),f.jsx(V.div,{...e,ref:o})});dh.displayName=uh;function fh(e,t=globalThis==null?void 0:globalThis.document){const n=Se(e),r=l.useRef(!1),o=l.useRef(()=>{});return l.useEffect(()=>{const a=s=>{if(s.target&&!r.current){let c=function(){wi(ch,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 mh(e,t=globalThis==null?void 0:globalThis.document){const n=Se(e),r=l.useRef(!1);return l.useEffect(()=>{const o=a=>{a.target&&!r.current&&wi(lh,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 rs(){const e=new CustomEvent(bo);document.dispatchEvent(e)}function wi(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?Ks(o,a):o.dispatchEvent(a)}var Zr="focusScope.autoFocusOnMount",Qr="focusScope.autoFocusOnUnmount",os={bubbles:!1,cancelable:!0},ph="FocusScope",Rn=l.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:a,...i}=e,[s,c]=l.useState(null),u=Se(o),d=Se(a),m=l.useRef(null),p=U(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(w){if(h.paused||!s)return;const S=w.target;s.contains(S)?m.current=S:ft(m.current,{select:!0})},v=function(w){if(h.paused||!s)return;const S=w.relatedTarget;S!==null&&(s.contains(S)||ft(m.current,{select:!0}))},b=function(w){if(document.activeElement===document.body)for(const C of w)C.removedNodes.length>0&&ft(s)};document.addEventListener("focusin",g),document.addEventListener("focusout",v);const x=new MutationObserver(b);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){ss.add(h);const g=document.activeElement;if(!s.contains(g)){const b=new CustomEvent(Zr,os);s.addEventListener(Zr,u),s.dispatchEvent(b),b.defaultPrevented||(hh(xh(Ci(s)),{select:!0}),document.activeElement===g&&ft(s))}return()=>{s.removeEventListener(Zr,u),setTimeout(()=>{const b=new CustomEvent(Qr,os);s.addEventListener(Qr,d),s.dispatchEvent(b),b.defaultPrevented||ft(g??document.body,{select:!0}),s.removeEventListener(Qr,d),ss.remove(h)},0)}}},[s,u,d,h]);const y=l.useCallback(g=>{if(!n&&!r||h.paused)return;const v=g.key==="Tab"&&!g.altKey&&!g.ctrlKey&&!g.metaKey,b=document.activeElement;if(v&&b){const x=g.currentTarget,[w,S]=gh(x);w&&S?!g.shiftKey&&b===S?(g.preventDefault(),n&&ft(w,{select:!0})):g.shiftKey&&b===w&&(g.preventDefault(),n&&ft(S,{select:!0})):b===x&&g.preventDefault()}},[n,r,h.paused]);return f.jsx(V.div,{tabIndex:-1,...i,ref:p,onKeyDown:y})});Rn.displayName=ph;function hh(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(ft(r,{select:t}),document.activeElement!==n)return}function gh(e){const t=Ci(e),n=as(t,e),r=as(t.reverse(),e);return[n,r]}function Ci(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 as(e,t){for(const n of e)if(!vh(n,{upTo:t}))return n}function vh(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 yh(e){return e instanceof HTMLInputElement&&"select"in e}function ft(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&yh(e)&&t&&e.select()}}var ss=bh();function bh(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=is(e,t),e.unshift(t)},remove(t){var n;e=is(e,t),(n=e[0])==null||n.resume()}}}function is(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function xh(e){return e.filter(t=>t.tagName!=="A")}var wh="Portal",Pn=l.forwardRef((e,t)=>{var s;const{container:n,...r}=e,[o,a]=l.useState(!1);de(()=>a(!0),[]);const i=n||o&&((s=globalThis==null?void 0:globalThis.document)==null?void 0:s.body);return i?Ls.createPortal(f.jsx(V.div,{...r,ref:t}),i):null});Pn.displayName=wh;function Ch(e,t){return l.useReducer((n,r)=>t[n][r]??n,e)}var Ae=e=>{const{present:t,children:n}=e,r=Sh(t),o=typeof n=="function"?n({present:r.isPresent}):l.Children.only(n),a=U(r.ref,Eh(o));return typeof n=="function"||r.isPresent?l.cloneElement(o,{ref:a}):null};Ae.displayName="Presence";function Sh(e){const[t,n]=l.useState(),r=l.useRef({}),o=l.useRef(e),a=l.useRef("none"),i=e?"mounted":"unmounted",[s,c]=Ch(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]),de(()=>{const u=r.current,d=o.current;if(d!==e){const p=a.current,h=Hn(u);e?c("MOUNT"):h==="none"||(u==null?void 0:u.display)==="none"?c("UNMOUNT"):c(d&&p!==h?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,c]),de(()=>{if(t){let u;const d=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=d.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),()=>{d.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 Hn(e){return(e==null?void 0:e.animationName)||"none"}function Eh(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 Jr=0;function pr(){l.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??cs()),document.body.insertAdjacentElement("beforeend",e[1]??cs()),Jr++,()=>{Jr===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Jr--}},[])}function cs(){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 Ge=function(){return Ge=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},Ge.apply(this,arguments)};function Si(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 Nh(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 Qn="right-scroll-bar-position",Jn="width-before-scroll-bar",Mh="with-scroll-bars-hidden",Rh="--removed-body-scroll-bar-size";function eo(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Ph(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 kh=typeof window<"u"?l.useLayoutEffect:l.useEffect,ls=new WeakMap;function Oh(e,t){var n=Ph(null,function(r){return e.forEach(function(o){return eo(o,r)})});return kh(function(){var r=ls.get(n);if(r){var o=new Set(r),a=new Set(e),i=n.current;o.forEach(function(s){a.has(s)||eo(s,null)}),a.forEach(function(s){o.has(s)||eo(s,i)})}ls.set(n,e)},[e]),n}function Dh(e){return e}function Ah(e,t){t===void 0&&(t=Dh);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 d=i;i=[],d.forEach(a)},u=function(){return Promise.resolve().then(c)};u(),n={push:function(d){i.push(d),u()},filter:function(d){return i=i.filter(d),n}}}};return o}function Th(e){e===void 0&&(e={});var t=Ah(null);return t.options=Ge({async:!0,ssr:!1},e),t}var Ei=function(e){var t=e.sideCar,n=Si(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,Ge({},n))};Ei.isSideCarExport=!0;function Ih(e,t){return e.useMedium(t),Ei}var Ni=Th(),to=function(){},hr=l.forwardRef(function(e,t){var n=l.useRef(null),r=l.useState({onScrollCapture:to,onWheelCapture:to,onTouchMoveCapture:to}),o=r[0],a=r[1],i=e.forwardProps,s=e.children,c=e.className,u=e.removeScrollBar,d=e.enabled,m=e.shards,p=e.sideCar,h=e.noIsolation,y=e.inert,g=e.allowPinchZoom,v=e.as,b=v===void 0?"div":v,x=e.gapMode,w=Si(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),S=p,C=Oh([n,t]),M=Ge(Ge({},w),o);return l.createElement(l.Fragment,null,d&&l.createElement(S,{sideCar:Ni,removeScrollBar:u,shards:m,noIsolation:h,inert:y,setCallbacks:a,allowPinchZoom:!!g,lockRef:n,gapMode:x}),i?l.cloneElement(l.Children.only(s),Ge(Ge({},M),{ref:C})):l.createElement(b,Ge({},M,{className:c,ref:C}),s))});hr.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};hr.classNames={fullWidth:Jn,zeroRight:Qn};var _h=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function jh(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=_h();return t&&e.setAttribute("nonce",t),e}function Fh(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function $h(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Lh=function(){var e=0,t=null;return{add:function(n){e==0&&(t=jh())&&(Fh(t,n),$h(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Wh=function(){var e=Lh();return function(t,n){l.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Mi=function(){var e=Wh(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},Bh={left:0,top:0,right:0,gap:0},no=function(e){return parseInt(e||"",10)||0},Vh=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[no(n),no(r),no(o)]},Yh=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Bh;var t=Vh(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])}},Hh=Mi(),Bt="data-scroll-locked",Gh=function(e,t,n,r){var o=e.left,a=e.top,i=e.right,s=e.gap;return n===void 0&&(n="margin"),`
|
|
101
|
-
.`.concat(
|
|
98
|
+
aria-disabled:pointer-events-none aria-disabled:cursor-not-allowed aria-disabled:opacity-50`,le={focusRing:Xa,focusRingSm:zp,focusRingVisible:Za,focusRingVisibleSm:Up,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`${Kp} ${Za}`,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`${qp} ${Xa}`,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`},Qa=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Ja=Ys,De=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return Ja(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 d=n==null?void 0:n[u],m=a==null?void 0:a[u];if(d===null)return null;const p=Qa(d)||Qa(m);return o[u][p]}),s=n&&Object.entries(n).reduce((u,d)=>{let[m,p]=d;return p===void 0||(u[m]=p),u},{}),c=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((u,d)=>{let{class:m,className:p,...h}=d;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 Ja(e,i,c,n==null?void 0:n.class,n==null?void 0:n.className)},Xp=De(k(le.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"}}),Zp=De(`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}}),es=({items:e,variant:t,caretPosition:n,isBordered:r,triggerClassName:o,contentClassName:a})=>f.jsx(f.Fragment,{children:e.map(i=>f.jsxs(vp,{value:i.id,children:[f.jsx(yp,{className:"flex",children:f.jsxs(bp,{className:k(Xp({variant:t,caretPosition:n}),o),children:[n==="left"?f.jsx(Ko,{className:"mr-2 h-5 w-5 shrink-0 text-inherit transition-transform duration-200"}):null,f.jsx("span",{className:"flex-1 text-left",children:i.title}),n==="right"?f.jsx(Uo,{className:"ml-2 h-5 w-5 shrink-0 text-inherit transition-transform duration-200"}):null]})}),f.jsx(xp,{className:k(Zp({variant:t,isBordered:r}),a),children:f.jsx("div",{className:"py-4",children:i.content})})]},i.id))}),vi=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:d="right",onValueChange:m,...p},h)=>{const y={ref:h,className:k("space-y-2",e),...p},g={items:r,variant:s,caretPosition:d,isBordered:c,triggerClassName:t,contentClassName:n};return o==="multiple"?f.jsx(Ka,{defaultValue:i,type:"multiple",value:a,onValueChange:m,...y,children:f.jsx(es,{...g})}):f.jsx(Ka,{collapsible:u,defaultValue:i,type:"single",value:a,onValueChange:m,...y,children:f.jsx(es,{...g})})});vi.displayName="Accordion";const Qp=De("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"}}),Jp=De("",{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"}}),eh=De("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"}]}),th=De("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"}}),yi=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},d)=>{const m=o,p={success:f.jsx(jp,{}),warning:f.jsx(Hp,{}),danger:f.jsx(Tp,{}),info:f.jsx(Lp,{})};return f.jsxs("div",{ref:d,className:k(Qp({variant:t,size:n}),e),...u,children:[a?f.jsx("span",{className:k(Jp({variant:t,size:n,hasHeading:!!r})),children:p[t]}):null,f.jsxs("div",{className:k(eh({size:n,hasIcon:a,hasHeading:!!r})),children:[r?f.jsx(m,{className:k(th({size:n})),children:r}):null,c]}),i?f.jsxs("button",{className:k(le.focusRing,le.focusRingSm,`-mt-0.5 shrink-0 rounded-full bg-transparent px-1.5 py-1.5 opacity-70 transition
|
|
100
|
+
hover:bg-black/10 hover:opacity-100 focus:bg-black/10 focus:opacity-100`),type:"button",onClick:s,children:[f.jsx(mr,{className:"h-5 w-5",strokeWidth:3}),f.jsx("span",{className:"sr-only",children:"Close"})]}):null]})});yi.displayName="Alert";function Xe({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 Xo({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}}const Et=De(le.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"}}),Oe=l.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,isDisabled:o=!1,isLoading:a=!1,children:i,...s},c)=>{const u=r?Wm:"button",d=Xe({isDisabled:o||a});return r?f.jsx(u,{ref:c,className:k(Et({variant:t,size:n}),e),...s,...d,children:i}):f.jsx(u,{ref:c,"aria-busy":a,className:k(Et({variant:t,size:n}),"relative",e),...s,...d,children:a?f.jsxs(f.Fragment,{children:[f.jsx("span",{className:"invisible",children:i}),f.jsx("span",{"aria-hidden":"true",className:"absolute inset-0 flex items-center justify-center",children:f.jsx(gi,{className:"h-4 w-4 animate-spin"})})]}):i})});Oe.displayName="Button";var ts=1,nh=.9,rh=.8,oh=.17,qr=.1,Xr=.999,ah=.9999,sh=.99,ih=/[\\\/_+.#"@\[\(\{&]/,ch=/[\\\/_+.#"@\[\(\{&]/g,lh=/[\s-]/,bi=/[\s-]/g;function yo(e,t,n,r,o,a,i){if(a===t.length)return o===e.length?ts:sh;var s=`${o},${a}`;if(i[s]!==void 0)return i[s];for(var c=r.charAt(a),u=n.indexOf(c,o),d=0,m,p,h,y;u>=0;)m=yo(e,t,n,r,u+1,a+1,i),m>d&&(u===o?m*=ts:ih.test(e.charAt(u-1))?(m*=rh,h=e.slice(o,u-1).match(ch),h&&o>0&&(m*=Math.pow(Xr,h.length))):lh.test(e.charAt(u-1))?(m*=nh,y=e.slice(o,u-1).match(bi),y&&o>0&&(m*=Math.pow(Xr,y.length))):(m*=oh,o>0&&(m*=Math.pow(Xr,u-o))),e.charAt(u)!==t.charAt(a)&&(m*=ah)),(m<qr&&n.charAt(u-1)===r.charAt(a+1)||r.charAt(a+1)===r.charAt(a)&&n.charAt(u-1)!==r.charAt(a))&&(p=yo(e,t,n,r,u+1,a+2,i),p*qr>m&&(m=p*qr)),m>d&&(d=m),u=n.indexOf(c,u+1);return i[s]=d,d}function ns(e){return e.toLowerCase().replace(bi," ")}function uh(e,t,n){return e=n&&n.length>0?`${e+" "+n.join(" ")}`:e,yo(e,t,ns(e),ns(t),0,0,{})}function Se(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 xi(e,t=globalThis==null?void 0:globalThis.document){const n=Se(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 dh="DismissableLayer",bo="dismissableLayer.update",fh="dismissableLayer.pointerDownOutside",mh="dismissableLayer.focusOutside",rs,wi=l.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Mn=l.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:i,onDismiss:s,...c}=e,u=l.useContext(wi),[d,m]=l.useState(null),p=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,h]=l.useState({}),y=U(t,N=>m(N)),g=Array.from(u.layers),[v]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),b=g.indexOf(v),x=d?g.indexOf(d):-1,w=u.layersWithOutsidePointerEventsDisabled.size>0,S=x>=b,C=gh(N=>{const P=N.target,F=[...u.branches].some(_=>_.contains(P));!S||F||(o==null||o(N),i==null||i(N),N.defaultPrevented||s==null||s())},p),M=vh(N=>{const P=N.target;[...u.branches].some(_=>_.contains(P))||(a==null||a(N),i==null||i(N),N.defaultPrevented||s==null||s())},p);return xi(N=>{x===u.layers.size-1&&(r==null||r(N),!N.defaultPrevented&&s&&(N.preventDefault(),s()))},p),l.useEffect(()=>{if(d)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(rs=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),os(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=rs)}},[d,p,n,u]),l.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),os())},[d,u]),l.useEffect(()=>{const N=()=>h({});return document.addEventListener(bo,N),()=>document.removeEventListener(bo,N)},[]),f.jsx(V.div,{...c,ref:y,style:{pointerEvents:w?S?"auto":"none":void 0,...e.style},onFocusCapture:O(e.onFocusCapture,M.onFocusCapture),onBlurCapture:O(e.onBlurCapture,M.onBlurCapture),onPointerDownCapture:O(e.onPointerDownCapture,C.onPointerDownCapture)})});Mn.displayName=dh;var ph="DismissableLayerBranch",hh=l.forwardRef((e,t)=>{const n=l.useContext(wi),r=l.useRef(null),o=U(t,r);return l.useEffect(()=>{const a=r.current;if(a)return n.branches.add(a),()=>{n.branches.delete(a)}},[n.branches]),f.jsx(V.div,{...e,ref:o})});hh.displayName=ph;function gh(e,t=globalThis==null?void 0:globalThis.document){const n=Se(e),r=l.useRef(!1),o=l.useRef(()=>{});return l.useEffect(()=>{const a=s=>{if(s.target&&!r.current){let c=function(){Ci(fh,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 vh(e,t=globalThis==null?void 0:globalThis.document){const n=Se(e),r=l.useRef(!1);return l.useEffect(()=>{const o=a=>{a.target&&!r.current&&Ci(mh,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 os(){const e=new CustomEvent(bo);document.dispatchEvent(e)}function Ci(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?qs(o,a):o.dispatchEvent(a)}var Zr="focusScope.autoFocusOnMount",Qr="focusScope.autoFocusOnUnmount",as={bubbles:!1,cancelable:!0},yh="FocusScope",Rn=l.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:a,...i}=e,[s,c]=l.useState(null),u=Se(o),d=Se(a),m=l.useRef(null),p=U(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(w){if(h.paused||!s)return;const S=w.target;s.contains(S)?m.current=S:ft(m.current,{select:!0})},v=function(w){if(h.paused||!s)return;const S=w.relatedTarget;S!==null&&(s.contains(S)||ft(m.current,{select:!0}))},b=function(w){if(document.activeElement===document.body)for(const C of w)C.removedNodes.length>0&&ft(s)};document.addEventListener("focusin",g),document.addEventListener("focusout",v);const x=new MutationObserver(b);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){is.add(h);const g=document.activeElement;if(!s.contains(g)){const b=new CustomEvent(Zr,as);s.addEventListener(Zr,u),s.dispatchEvent(b),b.defaultPrevented||(bh(Eh(Si(s)),{select:!0}),document.activeElement===g&&ft(s))}return()=>{s.removeEventListener(Zr,u),setTimeout(()=>{const b=new CustomEvent(Qr,as);s.addEventListener(Qr,d),s.dispatchEvent(b),b.defaultPrevented||ft(g??document.body,{select:!0}),s.removeEventListener(Qr,d),is.remove(h)},0)}}},[s,u,d,h]);const y=l.useCallback(g=>{if(!n&&!r||h.paused)return;const v=g.key==="Tab"&&!g.altKey&&!g.ctrlKey&&!g.metaKey,b=document.activeElement;if(v&&b){const x=g.currentTarget,[w,S]=xh(x);w&&S?!g.shiftKey&&b===S?(g.preventDefault(),n&&ft(w,{select:!0})):g.shiftKey&&b===w&&(g.preventDefault(),n&&ft(S,{select:!0})):b===x&&g.preventDefault()}},[n,r,h.paused]);return f.jsx(V.div,{tabIndex:-1,...i,ref:p,onKeyDown:y})});Rn.displayName=yh;function bh(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(ft(r,{select:t}),document.activeElement!==n)return}function xh(e){const t=Si(e),n=ss(t,e),r=ss(t.reverse(),e);return[n,r]}function Si(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 ss(e,t){for(const n of e)if(!wh(n,{upTo:t}))return n}function wh(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 Ch(e){return e instanceof HTMLInputElement&&"select"in e}function ft(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&Ch(e)&&t&&e.select()}}var is=Sh();function Sh(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=cs(e,t),e.unshift(t)},remove(t){var n;e=cs(e,t),(n=e[0])==null||n.resume()}}}function cs(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Eh(e){return e.filter(t=>t.tagName!=="A")}var Nh="Portal",Pn=l.forwardRef((e,t)=>{var s;const{container:n,...r}=e,[o,a]=l.useState(!1);de(()=>a(!0),[]);const i=n||o&&((s=globalThis==null?void 0:globalThis.document)==null?void 0:s.body);return i?Ws.createPortal(f.jsx(V.div,{...r,ref:t}),i):null});Pn.displayName=Nh;function Mh(e,t){return l.useReducer((n,r)=>t[n][r]??n,e)}var Ie=e=>{const{present:t,children:n}=e,r=Rh(t),o=typeof n=="function"?n({present:r.isPresent}):l.Children.only(n),a=U(r.ref,Ph(o));return typeof n=="function"||r.isPresent?l.cloneElement(o,{ref:a}):null};Ie.displayName="Presence";function Rh(e){const[t,n]=l.useState(),r=l.useRef({}),o=l.useRef(e),a=l.useRef("none"),i=e?"mounted":"unmounted",[s,c]=Mh(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]),de(()=>{const u=r.current,d=o.current;if(d!==e){const p=a.current,h=Hn(u);e?c("MOUNT"):h==="none"||(u==null?void 0:u.display)==="none"?c("UNMOUNT"):c(d&&p!==h?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,c]),de(()=>{if(t){let u;const d=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=d.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),()=>{d.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 Hn(e){return(e==null?void 0:e.animationName)||"none"}function Ph(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 Jr=0;function pr(){l.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??ls()),document.body.insertAdjacentElement("beforeend",e[1]??ls()),Jr++,()=>{Jr===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Jr--}},[])}function ls(){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 Ge=function(){return Ge=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},Ge.apply(this,arguments)};function Ei(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 kh(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 Qn="right-scroll-bar-position",Jn="width-before-scroll-bar",Oh="with-scroll-bars-hidden",Dh="--removed-body-scroll-bar-size";function eo(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Ih(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 Ah=typeof window<"u"?l.useLayoutEffect:l.useEffect,us=new WeakMap;function Th(e,t){var n=Ih(null,function(r){return e.forEach(function(o){return eo(o,r)})});return Ah(function(){var r=us.get(n);if(r){var o=new Set(r),a=new Set(e),i=n.current;o.forEach(function(s){a.has(s)||eo(s,null)}),a.forEach(function(s){o.has(s)||eo(s,i)})}us.set(n,e)},[e]),n}function _h(e){return e}function jh(e,t){t===void 0&&(t=_h);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 d=i;i=[],d.forEach(a)},u=function(){return Promise.resolve().then(c)};u(),n={push:function(d){i.push(d),u()},filter:function(d){return i=i.filter(d),n}}}};return o}function Fh(e){e===void 0&&(e={});var t=jh(null);return t.options=Ge({async:!0,ssr:!1},e),t}var Ni=function(e){var t=e.sideCar,n=Ei(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,Ge({},n))};Ni.isSideCarExport=!0;function $h(e,t){return e.useMedium(t),Ni}var Mi=Fh(),to=function(){},hr=l.forwardRef(function(e,t){var n=l.useRef(null),r=l.useState({onScrollCapture:to,onWheelCapture:to,onTouchMoveCapture:to}),o=r[0],a=r[1],i=e.forwardProps,s=e.children,c=e.className,u=e.removeScrollBar,d=e.enabled,m=e.shards,p=e.sideCar,h=e.noIsolation,y=e.inert,g=e.allowPinchZoom,v=e.as,b=v===void 0?"div":v,x=e.gapMode,w=Ei(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noIsolation","inert","allowPinchZoom","as","gapMode"]),S=p,C=Th([n,t]),M=Ge(Ge({},w),o);return l.createElement(l.Fragment,null,d&&l.createElement(S,{sideCar:Mi,removeScrollBar:u,shards:m,noIsolation:h,inert:y,setCallbacks:a,allowPinchZoom:!!g,lockRef:n,gapMode:x}),i?l.cloneElement(l.Children.only(s),Ge(Ge({},M),{ref:C})):l.createElement(b,Ge({},M,{className:c,ref:C}),s))});hr.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};hr.classNames={fullWidth:Jn,zeroRight:Qn};var Lh=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function Wh(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=Lh();return t&&e.setAttribute("nonce",t),e}function Bh(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function Vh(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var Yh=function(){var e=0,t=null;return{add:function(n){e==0&&(t=Wh())&&(Bh(t,n),Vh(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},Hh=function(){var e=Yh();return function(t,n){l.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Ri=function(){var e=Hh(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},Gh={left:0,top:0,right:0,gap:0},no=function(e){return parseInt(e||"",10)||0},zh=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[no(n),no(r),no(o)]},Uh=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return Gh;var t=zh(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])}},Kh=Ri(),Bt="data-scroll-locked",qh=function(e,t,n,r){var o=e.left,a=e.top,i=e.right,s=e.gap;return n===void 0&&(n="margin"),`
|
|
101
|
+
.`.concat(Oh,` {
|
|
102
102
|
overflow: hidden `).concat(r,`;
|
|
103
103
|
padding-right: `).concat(s,"px ").concat(r,`;
|
|
104
104
|
}
|
|
@@ -132,71 +132,71 @@ aria-disabled:pointer-events-none aria-disabled:cursor-not-allowed aria-disabled
|
|
|
132
132
|
}
|
|
133
133
|
|
|
134
134
|
body[`).concat(Bt,`] {
|
|
135
|
-
`).concat(
|
|
135
|
+
`).concat(Dh,": ").concat(s,`px;
|
|
136
136
|
}
|
|
137
|
-
`)},
|
|
137
|
+
`)},ds=function(){var e=parseInt(document.body.getAttribute(Bt)||"0",10);return isFinite(e)?e:0},Xh=function(){l.useEffect(function(){return document.body.setAttribute(Bt,(ds()+1).toString()),function(){var e=ds()-1;e<=0?document.body.removeAttribute(Bt):document.body.setAttribute(Bt,e.toString())}},[])},Zh=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;Xh();var a=l.useMemo(function(){return Uh(o)},[o]);return l.createElement(Kh,{styles:qh(a,!t,o,n?"":"!important")})},xo=!1;if(typeof window<"u")try{var Gn=Object.defineProperty({},"passive",{get:function(){return xo=!0,!0}});window.addEventListener("test",Gn,Gn),window.removeEventListener("test",Gn,Gn)}catch{xo=!1}var Tt=xo?{passive:!1}:!1,Qh=function(e){return e.tagName==="TEXTAREA"},Pi=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!Qh(e)&&n[t]==="visible")},Jh=function(e){return Pi(e,"overflowY")},eg=function(e){return Pi(e,"overflowX")},fs=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=ki(e,r);if(o){var a=Oi(e,r),i=a[1],s=a[2];if(i>s)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},tg=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},ng=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},ki=function(e,t){return e==="v"?Jh(t):eg(t)},Oi=function(e,t){return e==="v"?tg(t):ng(t)},rg=function(e,t){return e==="h"&&t==="rtl"?-1:1},og=function(e,t,n,r,o){var a=rg(e,window.getComputedStyle(t).direction),i=a*r,s=n.target,c=t.contains(s),u=!1,d=i>0,m=0,p=0;do{var h=Oi(e,s),y=h[0],g=h[1],v=h[2],b=g-v-a*y;(y||b)&&ki(e,s)&&(m+=b,p+=y),s instanceof ShadowRoot?s=s.host:s=s.parentNode}while(!c&&s!==document.body||c&&(t.contains(s)||t===s));return(d&&Math.abs(m)<1||!d&&Math.abs(p)<1)&&(u=!0),u},zn=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},ms=function(e){return[e.deltaX,e.deltaY]},ps=function(e){return e&&"current"in e?e.current:e},ag=function(e,t){return e[0]===t[0]&&e[1]===t[1]},sg=function(e){return`
|
|
138
138
|
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
139
139
|
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
140
|
-
`)},
|
|
140
|
+
`)},ig=0,_t=[];function cg(e){var t=l.useRef([]),n=l.useRef([0,0]),r=l.useRef(),o=l.useState(ig++)[0],a=l.useState(Ri)[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=kh([e.lockRef.current],(e.shards||[]).map(ps),!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 b=zn(g),x=n.current,w="deltaX"in g?g.deltaX:x[0]-b[0],S="deltaY"in g?g.deltaY:x[1]-b[1],C,M=g.target,N=Math.abs(w)>Math.abs(S)?"h":"v";if("touches"in g&&N==="h"&&M.type==="range")return!1;var P=fs(N,M);if(!P)return!0;if(P?C=N:(C=N==="v"?"h":"v",P=fs(N,M)),!P)return!1;if(!r.current&&"changedTouches"in g&&(w||S)&&(r.current=C),!C)return!0;var F=r.current||C;return og(F,v,g,F==="h"?w:S)},[]),c=l.useCallback(function(g){var v=g;if(!(!_t.length||_t[_t.length-1]!==a)){var b="deltaY"in v?ms(v):zn(v),x=t.current.filter(function(C){return C.name===v.type&&(C.target===v.target||v.target===C.shadowParent)&&ag(C.delta,b)})[0];if(x&&x.should){v.cancelable&&v.preventDefault();return}if(!x){var w=(i.current.shards||[]).map(ps).filter(Boolean).filter(function(C){return C.contains(v.target)}),S=w.length>0?s(v,w[0]):!i.current.noIsolation;S&&v.cancelable&&v.preventDefault()}}},[]),u=l.useCallback(function(g,v,b,x){var w={name:g,delta:v,target:b,should:x,shadowParent:lg(b)};t.current.push(w),setTimeout(function(){t.current=t.current.filter(function(S){return S!==w})},1)},[]),d=l.useCallback(function(g){n.current=zn(g),r.current=void 0},[]),m=l.useCallback(function(g){u(g.type,ms(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 _t.push(a),e.setCallbacks({onScrollCapture:m,onWheelCapture:m,onTouchMoveCapture:p}),document.addEventListener("wheel",c,Tt),document.addEventListener("touchmove",c,Tt),document.addEventListener("touchstart",d,Tt),function(){_t=_t.filter(function(g){return g!==a}),document.removeEventListener("wheel",c,Tt),document.removeEventListener("touchmove",c,Tt),document.removeEventListener("touchstart",d,Tt)}},[]);var h=e.removeScrollBar,y=e.inert;return l.createElement(l.Fragment,null,y?l.createElement(a,{styles:sg(o)}):null,h?l.createElement(Zh,{gapMode:e.gapMode}):null)}function lg(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const ug=$h(Mi,cg);var kn=l.forwardRef(function(e,t){return l.createElement(hr,Ge({},e,{ref:t,sideCar:ug}))});kn.classNames=hr.classNames;var dg=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},jt=new WeakMap,Un=new WeakMap,Kn={},ro=0,Di=function(e){return e&&(e.host||Di(e.parentNode))},fg=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=Di(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})},mg=function(e,t,n,r){var o=fg(t,Array.isArray(e)?e:[e]);Kn[n]||(Kn[n]=new WeakMap);var a=Kn[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 d=function(m){!m||c.has(m)||Array.prototype.forEach.call(m.children,function(p){if(s.has(p))d(p);else try{var h=p.getAttribute(r),y=h!==null&&h!=="false",g=(jt.get(p)||0)+1,v=(a.get(p)||0)+1;jt.set(p,g),a.set(p,v),i.push(p),g===1&&y&&Un.set(p,!0),v===1&&p.setAttribute(n,"true"),y||p.setAttribute(r,"true")}catch(b){console.error("aria-hidden: cannot operate on ",p,b)}})};return d(t),s.clear(),ro++,function(){i.forEach(function(m){var p=jt.get(m)-1,h=a.get(m)-1;jt.set(m,p),a.set(m,h),p||(Un.has(m)||m.removeAttribute(r),Un.delete(m)),h||m.removeAttribute(n)}),ro--,ro||(jt=new WeakMap,jt=new WeakMap,Un=new WeakMap,Kn={})}},gr=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=dg(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live]"))),mg(r,o,n,"aria-hidden")):function(){return null}},vr="Dialog",[Ii,IE]=ve(vr),[pg,Be]=Ii(vr),Ai=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,d]=Ce({prop:r,defaultProp:o??!1,onChange:a,caller:vr});return f.jsx(pg,{scope:t,triggerRef:s,contentRef:c,contentId:pe(),titleId:pe(),descriptionId:pe(),open:u,onOpenChange:d,onOpenToggle:l.useCallback(()=>d(m=>!m),[d]),modal:i,children:n})};Ai.displayName=vr;var Ti="DialogTrigger",_i=l.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Be(Ti,n),a=U(t,o.triggerRef);return f.jsx(V.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Jo(o.open),...r,ref:a,onClick:O(e.onClick,o.onOpenToggle)})});_i.displayName=Ti;var Zo="DialogPortal",[hg,ji]=Ii(Zo,{forceMount:void 0}),Fi=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,a=Be(Zo,t);return f.jsx(hg,{scope:t,forceMount:n,children:l.Children.map(r,i=>f.jsx(Ie,{present:n||a.open,children:f.jsx(Pn,{asChild:!0,container:o,children:i})}))})};Fi.displayName=Zo;var nr="DialogOverlay",$i=l.forwardRef((e,t)=>{const n=ji(nr,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,a=Be(nr,e.__scopeDialog);return a.modal?f.jsx(Ie,{present:r||a.open,children:f.jsx(vg,{...o,ref:t})}):null});$i.displayName=nr;var gg=pt("DialogOverlay.RemoveScroll"),vg=l.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Be(nr,n);return f.jsx(kn,{as:gg,allowPinchZoom:!0,shards:[o.contentRef],children:f.jsx(V.div,{"data-state":Jo(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),Nt="DialogContent",Li=l.forwardRef((e,t)=>{const n=ji(Nt,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,a=Be(Nt,e.__scopeDialog);return f.jsx(Ie,{present:r||a.open,children:a.modal?f.jsx(yg,{...o,ref:t}):f.jsx(bg,{...o,ref:t})})});Li.displayName=Nt;var yg=l.forwardRef((e,t)=>{const n=Be(Nt,e.__scopeDialog),r=l.useRef(null),o=U(t,n.contentRef,r);return l.useEffect(()=>{const a=r.current;if(a)return gr(a)},[]),f.jsx(Wi,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:O(e.onCloseAutoFocus,a=>{var i;a.preventDefault(),(i=n.triggerRef.current)==null||i.focus()}),onPointerDownOutside:O(e.onPointerDownOutside,a=>{const i=a.detail.originalEvent,s=i.button===0&&i.ctrlKey===!0;(i.button===2||s)&&a.preventDefault()}),onFocusOutside:O(e.onFocusOutside,a=>a.preventDefault())})}),bg=l.forwardRef((e,t)=>{const n=Be(Nt,e.__scopeDialog),r=l.useRef(!1),o=l.useRef(!1);return f.jsx(Wi,{...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()}})}),Wi=l.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:a,...i}=e,s=Be(Nt,n),c=l.useRef(null),u=U(t,c);return pr(),f.jsxs(f.Fragment,{children:[f.jsx(Rn,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:a,children:f.jsx(Mn,{role:"dialog",id:s.contentId,"aria-describedby":s.descriptionId,"aria-labelledby":s.titleId,"data-state":Jo(s.open),...i,ref:u,onDismiss:()=>s.onOpenChange(!1)})}),f.jsxs(f.Fragment,{children:[f.jsx(xg,{titleId:s.titleId}),f.jsx(Cg,{contentRef:c,descriptionId:s.descriptionId})]})]})}),Qo="DialogTitle",Bi=l.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Be(Qo,n);return f.jsx(V.h2,{id:o.titleId,...r,ref:t})});Bi.displayName=Qo;var Vi="DialogDescription",Yi=l.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Be(Vi,n);return f.jsx(V.p,{id:o.descriptionId,...r,ref:t})});Yi.displayName=Vi;var Hi="DialogClose",Gi=l.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=Be(Hi,n);return f.jsx(V.button,{type:"button",...r,ref:t,onClick:O(e.onClick,()=>o.onOpenChange(!1))})});Gi.displayName=Hi;function Jo(e){return e?"open":"closed"}var zi="DialogTitleWarning",[AE,Ui]=$m(zi,{contentName:Nt,titleName:Qo,docsSlug:"dialog"}),xg=({titleId:e})=>{const t=Ui(zi),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
141
141
|
|
|
142
142
|
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
143
143
|
|
|
144
|
-
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},vg="DialogDescriptionWarning",yg=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${zi(vg).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},Ui=Ai,bg=Ii,Ki=ji,Jo=Fi,ea=$i,qi=Wi,Xi=Vi,Zi=Hi,cn='[cmdk-group=""]',oo='[cmdk-group-items=""]',xg='[cmdk-group-heading=""]',Qi='[cmdk-item=""]',ps=`${Qi}:not([aria-disabled="true"])`,wo="cmdk-item-select",$t="data-value",wg=(e,t,n)=>sh(e,t,n),Ji=l.createContext(void 0),On=()=>l.useContext(Ji),ec=l.createContext(void 0),ta=()=>l.useContext(ec),tc=l.createContext(void 0),nc=l.forwardRef((e,t)=>{let n=Lt(()=>{var R,L;return{search:"",value:(L=(R=e.value)!=null?R:e.defaultValue)!=null?L:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),r=Lt(()=>new Set),o=Lt(()=>new Map),a=Lt(()=>new Map),i=Lt(()=>new Set),s=rc(e),{label:c,children:u,value:d,onValueChange:m,filter:p,shouldFilter:h,loop:y,disablePointerSelection:g=!1,vimBindings:v=!0,...b}=e,x=pe(),w=pe(),S=pe(),C=l.useRef(null),M=Ag();Mt(()=>{if(d!==void 0){let R=d.trim();n.current.value=R,N.emit()}},[d]),Mt(()=>{M(6,B)},[]);let N=l.useMemo(()=>({subscribe:R=>(i.current.add(R),()=>i.current.delete(R)),snapshot:()=>n.current,setState:(R,L,z)=>{var W,X,T,Z;if(!Object.is(n.current[R],L)){if(n.current[R]=L,R==="search")A(),_(),M(1,$);else if(R==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let K=document.getElementById(S);K?K.focus():(W=document.getElementById(x))==null||W.focus()}if(M(7,()=>{var K;n.current.selectedItemId=(K=Y())==null?void 0:K.id,N.emit()}),z||M(5,B),((X=s.current)==null?void 0:X.value)!==void 0){let K=L??"";(Z=(T=s.current).onValueChange)==null||Z.call(T,K);return}}N.emit()}},emit:()=>{i.current.forEach(R=>R())}}),[]),P=l.useMemo(()=>({value:(R,L,z)=>{var W;L!==((W=a.current.get(R))==null?void 0:W.value)&&(a.current.set(R,{value:L,keywords:z}),n.current.filtered.items.set(R,F(L,z)),M(2,()=>{_(),N.emit()}))},item:(R,L)=>(r.current.add(R),L&&(o.current.has(L)?o.current.get(L).add(R):o.current.set(L,new Set([R]))),M(3,()=>{A(),_(),n.current.value||$(),N.emit()}),()=>{a.current.delete(R),r.current.delete(R),n.current.filtered.items.delete(R);let z=Y();M(4,()=>{A(),(z==null?void 0:z.getAttribute("id"))===R&&$(),N.emit()})}),group:R=>(o.current.has(R)||o.current.set(R,new Set),()=>{a.current.delete(R),o.current.delete(R)}),filter:()=>s.current.shouldFilter,label:c||e["aria-label"],getDisablePointerSelection:()=>s.current.disablePointerSelection,listId:x,inputId:S,labelId:w,listInnerRef:C}),[]);function F(R,L){var z,W;let X=(W=(z=s.current)==null?void 0:z.filter)!=null?W:wg;return R?X(R,n.current.search,L):0}function _(){if(!n.current.search||s.current.shouldFilter===!1)return;let R=n.current.filtered.items,L=[];n.current.filtered.groups.forEach(W=>{let X=o.current.get(W),T=0;X.forEach(Z=>{let K=R.get(Z);T=Math.max(K,T)}),L.push([W,T])});let z=C.current;q().sort((W,X)=>{var T,Z;let K=W.getAttribute("id"),te=X.getAttribute("id");return((T=R.get(te))!=null?T:0)-((Z=R.get(K))!=null?Z:0)}).forEach(W=>{let X=W.closest(oo);X?X.appendChild(W.parentElement===X?W:W.closest(`${oo} > *`)):z.appendChild(W.parentElement===z?W:W.closest(`${oo} > *`))}),L.sort((W,X)=>X[1]-W[1]).forEach(W=>{var X;let T=(X=C.current)==null?void 0:X.querySelector(`${cn}[${$t}="${encodeURIComponent(W[0])}"]`);T==null||T.parentElement.appendChild(T)})}function $(){let R=q().find(z=>z.getAttribute("aria-disabled")!=="true"),L=R==null?void 0:R.getAttribute($t);N.setState("value",L||void 0)}function A(){var R,L,z,W;if(!n.current.search||s.current.shouldFilter===!1){n.current.filtered.count=r.current.size;return}n.current.filtered.groups=new Set;let X=0;for(let T of r.current){let Z=(L=(R=a.current.get(T))==null?void 0:R.value)!=null?L:"",K=(W=(z=a.current.get(T))==null?void 0:z.keywords)!=null?W:[],te=F(Z,K);n.current.filtered.items.set(T,te),te>0&&X++}for(let[T,Z]of o.current)for(let K of Z)if(n.current.filtered.items.get(K)>0){n.current.filtered.groups.add(T);break}n.current.filtered.count=X}function B(){var R,L,z;let W=Y();W&&(((R=W.parentElement)==null?void 0:R.firstChild)===W&&((z=(L=W.closest(cn))==null?void 0:L.querySelector(xg))==null||z.scrollIntoView({block:"nearest"})),W.scrollIntoView({block:"nearest"}))}function Y(){var R;return(R=C.current)==null?void 0:R.querySelector(`${Qi}[aria-selected="true"]`)}function q(){var R;return Array.from(((R=C.current)==null?void 0:R.querySelectorAll(ps))||[])}function j(R){let L=q()[R];L&&N.setState("value",L.getAttribute($t))}function G(R){var L;let z=Y(),W=q(),X=W.findIndex(Z=>Z===z),T=W[X+R];(L=s.current)!=null&&L.loop&&(T=X+R<0?W[W.length-1]:X+R===W.length?W[0]:W[X+R]),T&&N.setState("value",T.getAttribute($t))}function I(R){let L=Y(),z=L==null?void 0:L.closest(cn),W;for(;z&&!W;)z=R>0?Og(z,cn):Dg(z,cn),W=z==null?void 0:z.querySelector(ps);W?N.setState("value",W.getAttribute($t)):G(R)}let D=()=>j(q().length-1),Q=R=>{R.preventDefault(),R.metaKey?D():R.altKey?I(1):G(1)},J=R=>{R.preventDefault(),R.metaKey?j(0):R.altKey?I(-1):G(-1)};return l.createElement(V.div,{ref:t,tabIndex:-1,...b,"cmdk-root":"",onKeyDown:R=>{var L;(L=b.onKeyDown)==null||L.call(b,R);let z=R.nativeEvent.isComposing||R.keyCode===229;if(!(R.defaultPrevented||z))switch(R.key){case"n":case"j":{v&&R.ctrlKey&&Q(R);break}case"ArrowDown":{Q(R);break}case"p":case"k":{v&&R.ctrlKey&&J(R);break}case"ArrowUp":{J(R);break}case"Home":{R.preventDefault(),j(0);break}case"End":{R.preventDefault(),D();break}case"Enter":{R.preventDefault();let W=Y();if(W){let X=new Event(wo);W.dispatchEvent(X)}}}}},l.createElement("label",{"cmdk-label":"",htmlFor:P.inputId,id:P.labelId,style:Ig},c),yr(e,R=>l.createElement(ec.Provider,{value:N},l.createElement(Ji.Provider,{value:P},R))))}),Cg=l.forwardRef((e,t)=>{var n,r;let o=pe(),a=l.useRef(null),i=l.useContext(tc),s=On(),c=rc(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 d=oc(o,a,[e.value,e.children,a],e.keywords),m=ta(),p=ht(M=>M.value&&M.value===d.current),h=ht(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(wo,y),()=>M.removeEventListener(wo,y)},[h,e.onSelect,e.disabled]);function y(){var M,N;g(),(N=(M=c.current).onSelect)==null||N.call(M,d.current)}function g(){m.setState("value",d.current,!0)}if(!h)return null;let{disabled:v,value:b,onSelect:x,forceMount:w,keywords:S,...C}=e;return l.createElement(V.div,{ref:Ke(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)}),Sg=l.forwardRef((e,t)=>{let{heading:n,children:r,forceMount:o,...a}=e,i=pe(),s=l.useRef(null),c=l.useRef(null),u=pe(),d=On(),m=ht(h=>o||d.filter()===!1?!0:h.search?h.filtered.groups.has(i):!0);Mt(()=>d.group(i),[]),oc(i,s,[e.value,e.heading,c]);let p=l.useMemo(()=>({id:i,forceMount:o}),[o]);return l.createElement(V.div,{ref:Ke(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),yr(e,h=>l.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?u:void 0},l.createElement(tc.Provider,{value:p},h))))}),Eg=l.forwardRef((e,t)=>{let{alwaysRender:n,...r}=e,o=l.useRef(null),a=ht(i=>!i.search);return!n&&!a?null:l.createElement(V.div,{ref:Ke(o,t),...r,"cmdk-separator":"",role:"separator"})}),Ng=l.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,o=e.value!=null,a=ta(),i=ht(u=>u.search),s=ht(u=>u.selectedItemId),c=On();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)}})}),Mg=l.forwardRef((e,t)=>{let{children:n,label:r="Suggestions",...o}=e,a=l.useRef(null),i=l.useRef(null),s=ht(u=>u.selectedItemId),c=On();return l.useEffect(()=>{if(i.current&&a.current){let u=i.current,d=a.current,m,p=new ResizeObserver(()=>{m=requestAnimationFrame(()=>{let h=u.offsetHeight;d.style.setProperty("--cmdk-list-height",h.toFixed(1)+"px")})});return p.observe(u),()=>{cancelAnimationFrame(m),p.unobserve(u)}}},[]),l.createElement(V.div,{ref:Ke(a,t),...o,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":s,"aria-label":r,id:c.listId},yr(e,u=>l.createElement("div",{ref:Ke(i,c.listInnerRef),"cmdk-list-sizer":""},u)))}),Rg=l.forwardRef((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:o,contentClassName:a,container:i,...s}=e;return l.createElement(Ui,{open:n,onOpenChange:r},l.createElement(Ki,{container:i},l.createElement(Jo,{"cmdk-overlay":"",className:o}),l.createElement(ea,{"aria-label":e.label,"cmdk-dialog":"",className:a},l.createElement(nc,{ref:t,...s}))))}),Pg=l.forwardRef((e,t)=>ht(n=>n.filtered.count===0)?l.createElement(V.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),kg=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},yr(e,i=>l.createElement("div",{"aria-hidden":!0},i)))}),Te=Object.assign(nc,{List:Mg,Item:Cg,Input:Ng,Group:Sg,Separator:Eg,Dialog:Rg,Empty:Pg,Loading:kg});function Og(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function Dg(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function rc(e){let t=l.useRef(e);return Mt(()=>{t.current=e}),t}var Mt=typeof window>"u"?l.useEffect:l.useLayoutEffect;function Lt(e){let t=l.useRef();return t.current===void 0&&(t.current=e()),t}function ht(e){let t=ta(),n=()=>e(t.snapshot());return l.useSyncExternalStore(t.subscribe,n,n)}function oc(e,t,n,r=[]){let o=l.useRef(),a=On();return Mt(()=>{var i;let s=(()=>{var u;for(let d of n){if(typeof d=="string")return d.trim();if(typeof d=="object"&&"current"in d)return d.current?(u=d.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($t,s),o.current=s}),o}var Ag=()=>{let[e,t]=l.useState(),n=Lt(()=>new Map);return Mt(()=>{n.current.forEach(r=>r()),n.current=new Map},[e]),(r,o)=>{n.current.set(r,o),t({})}};function Tg(e){let t=e.type;return typeof t=="function"?t(e.props):"render"in t?t.render(e.props):e}function yr({asChild:e,children:t},n){return e&&l.isValidElement(t)?l.cloneElement(Tg(t),{ref:t.ref},n(t.props.children)):n(t)}var Ig={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};const br=l.forwardRef(({className:e,...t},n)=>f.jsx(Te,{ref:n,className:k("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...t}));br.displayName=Te.displayName;const ac={popover:50,tooltip:50,overlay:50,dialog:50,dropdown:50};let gn={...ac};function _g(e){gn={...gn,...e}}function jg(){return{...gn}}function Fg(){gn={...ac}}function Ve(e,t){return t??gn[e]}const na=l.forwardRef(({className:e,zIndex:t,...n},r)=>{const o=Ve("overlay",t);return f.jsx(Jo,{ref:r,className:k(`fixed inset-0 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out
|
|
145
|
-
data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0`,e),style:{zIndex:o,...n.style},...n})});
|
|
144
|
+
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},wg="DialogDescriptionWarning",Cg=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${Ui(wg).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},Ki=Ai,Sg=_i,qi=Fi,ea=$i,ta=Li,Xi=Bi,Zi=Yi,Qi=Gi,cn='[cmdk-group=""]',oo='[cmdk-group-items=""]',Eg='[cmdk-group-heading=""]',Ji='[cmdk-item=""]',hs=`${Ji}:not([aria-disabled="true"])`,wo="cmdk-item-select",$t="data-value",Ng=(e,t,n)=>uh(e,t,n),ec=l.createContext(void 0),On=()=>l.useContext(ec),tc=l.createContext(void 0),na=()=>l.useContext(tc),nc=l.createContext(void 0),rc=l.forwardRef((e,t)=>{let n=Lt(()=>{var R,L;return{search:"",value:(L=(R=e.value)!=null?R:e.defaultValue)!=null?L:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),r=Lt(()=>new Set),o=Lt(()=>new Map),a=Lt(()=>new Map),i=Lt(()=>new Set),s=oc(e),{label:c,children:u,value:d,onValueChange:m,filter:p,shouldFilter:h,loop:y,disablePointerSelection:g=!1,vimBindings:v=!0,...b}=e,x=pe(),w=pe(),S=pe(),C=l.useRef(null),M=jg();Mt(()=>{if(d!==void 0){let R=d.trim();n.current.value=R,N.emit()}},[d]),Mt(()=>{M(6,B)},[]);let N=l.useMemo(()=>({subscribe:R=>(i.current.add(R),()=>i.current.delete(R)),snapshot:()=>n.current,setState:(R,L,z)=>{var W,X,A,Z;if(!Object.is(n.current[R],L)){if(n.current[R]=L,R==="search")I(),_(),M(1,$);else if(R==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let K=document.getElementById(S);K?K.focus():(W=document.getElementById(x))==null||W.focus()}if(M(7,()=>{var K;n.current.selectedItemId=(K=Y())==null?void 0:K.id,N.emit()}),z||M(5,B),((X=s.current)==null?void 0:X.value)!==void 0){let K=L??"";(Z=(A=s.current).onValueChange)==null||Z.call(A,K);return}}N.emit()}},emit:()=>{i.current.forEach(R=>R())}}),[]),P=l.useMemo(()=>({value:(R,L,z)=>{var W;L!==((W=a.current.get(R))==null?void 0:W.value)&&(a.current.set(R,{value:L,keywords:z}),n.current.filtered.items.set(R,F(L,z)),M(2,()=>{_(),N.emit()}))},item:(R,L)=>(r.current.add(R),L&&(o.current.has(L)?o.current.get(L).add(R):o.current.set(L,new Set([R]))),M(3,()=>{I(),_(),n.current.value||$(),N.emit()}),()=>{a.current.delete(R),r.current.delete(R),n.current.filtered.items.delete(R);let z=Y();M(4,()=>{I(),(z==null?void 0:z.getAttribute("id"))===R&&$(),N.emit()})}),group:R=>(o.current.has(R)||o.current.set(R,new Set),()=>{a.current.delete(R),o.current.delete(R)}),filter:()=>s.current.shouldFilter,label:c||e["aria-label"],getDisablePointerSelection:()=>s.current.disablePointerSelection,listId:x,inputId:S,labelId:w,listInnerRef:C}),[]);function F(R,L){var z,W;let X=(W=(z=s.current)==null?void 0:z.filter)!=null?W:Ng;return R?X(R,n.current.search,L):0}function _(){if(!n.current.search||s.current.shouldFilter===!1)return;let R=n.current.filtered.items,L=[];n.current.filtered.groups.forEach(W=>{let X=o.current.get(W),A=0;X.forEach(Z=>{let K=R.get(Z);A=Math.max(K,A)}),L.push([W,A])});let z=C.current;q().sort((W,X)=>{var A,Z;let K=W.getAttribute("id"),te=X.getAttribute("id");return((A=R.get(te))!=null?A:0)-((Z=R.get(K))!=null?Z:0)}).forEach(W=>{let X=W.closest(oo);X?X.appendChild(W.parentElement===X?W:W.closest(`${oo} > *`)):z.appendChild(W.parentElement===z?W:W.closest(`${oo} > *`))}),L.sort((W,X)=>X[1]-W[1]).forEach(W=>{var X;let A=(X=C.current)==null?void 0:X.querySelector(`${cn}[${$t}="${encodeURIComponent(W[0])}"]`);A==null||A.parentElement.appendChild(A)})}function $(){let R=q().find(z=>z.getAttribute("aria-disabled")!=="true"),L=R==null?void 0:R.getAttribute($t);N.setState("value",L||void 0)}function I(){var R,L,z,W;if(!n.current.search||s.current.shouldFilter===!1){n.current.filtered.count=r.current.size;return}n.current.filtered.groups=new Set;let X=0;for(let A of r.current){let Z=(L=(R=a.current.get(A))==null?void 0:R.value)!=null?L:"",K=(W=(z=a.current.get(A))==null?void 0:z.keywords)!=null?W:[],te=F(Z,K);n.current.filtered.items.set(A,te),te>0&&X++}for(let[A,Z]of o.current)for(let K of Z)if(n.current.filtered.items.get(K)>0){n.current.filtered.groups.add(A);break}n.current.filtered.count=X}function B(){var R,L,z;let W=Y();W&&(((R=W.parentElement)==null?void 0:R.firstChild)===W&&((z=(L=W.closest(cn))==null?void 0:L.querySelector(Eg))==null||z.scrollIntoView({block:"nearest"})),W.scrollIntoView({block:"nearest"}))}function Y(){var R;return(R=C.current)==null?void 0:R.querySelector(`${Ji}[aria-selected="true"]`)}function q(){var R;return Array.from(((R=C.current)==null?void 0:R.querySelectorAll(hs))||[])}function j(R){let L=q()[R];L&&N.setState("value",L.getAttribute($t))}function G(R){var L;let z=Y(),W=q(),X=W.findIndex(Z=>Z===z),A=W[X+R];(L=s.current)!=null&&L.loop&&(A=X+R<0?W[W.length-1]:X+R===W.length?W[0]:W[X+R]),A&&N.setState("value",A.getAttribute($t))}function T(R){let L=Y(),z=L==null?void 0:L.closest(cn),W;for(;z&&!W;)z=R>0?Tg(z,cn):_g(z,cn),W=z==null?void 0:z.querySelector(hs);W?N.setState("value",W.getAttribute($t)):G(R)}let D=()=>j(q().length-1),Q=R=>{R.preventDefault(),R.metaKey?D():R.altKey?T(1):G(1)},J=R=>{R.preventDefault(),R.metaKey?j(0):R.altKey?T(-1):G(-1)};return l.createElement(V.div,{ref:t,tabIndex:-1,...b,"cmdk-root":"",onKeyDown:R=>{var L;(L=b.onKeyDown)==null||L.call(b,R);let z=R.nativeEvent.isComposing||R.keyCode===229;if(!(R.defaultPrevented||z))switch(R.key){case"n":case"j":{v&&R.ctrlKey&&Q(R);break}case"ArrowDown":{Q(R);break}case"p":case"k":{v&&R.ctrlKey&&J(R);break}case"ArrowUp":{J(R);break}case"Home":{R.preventDefault(),j(0);break}case"End":{R.preventDefault(),D();break}case"Enter":{R.preventDefault();let W=Y();if(W){let X=new Event(wo);W.dispatchEvent(X)}}}}},l.createElement("label",{"cmdk-label":"",htmlFor:P.inputId,id:P.labelId,style:$g},c),yr(e,R=>l.createElement(tc.Provider,{value:N},l.createElement(ec.Provider,{value:P},R))))}),Mg=l.forwardRef((e,t)=>{var n,r;let o=pe(),a=l.useRef(null),i=l.useContext(nc),s=On(),c=oc(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 d=ac(o,a,[e.value,e.children,a],e.keywords),m=na(),p=ht(M=>M.value&&M.value===d.current),h=ht(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(wo,y),()=>M.removeEventListener(wo,y)},[h,e.onSelect,e.disabled]);function y(){var M,N;g(),(N=(M=c.current).onSelect)==null||N.call(M,d.current)}function g(){m.setState("value",d.current,!0)}if(!h)return null;let{disabled:v,value:b,onSelect:x,forceMount:w,keywords:S,...C}=e;return l.createElement(V.div,{ref:Ke(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)}),Rg=l.forwardRef((e,t)=>{let{heading:n,children:r,forceMount:o,...a}=e,i=pe(),s=l.useRef(null),c=l.useRef(null),u=pe(),d=On(),m=ht(h=>o||d.filter()===!1?!0:h.search?h.filtered.groups.has(i):!0);Mt(()=>d.group(i),[]),ac(i,s,[e.value,e.heading,c]);let p=l.useMemo(()=>({id:i,forceMount:o}),[o]);return l.createElement(V.div,{ref:Ke(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),yr(e,h=>l.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?u:void 0},l.createElement(nc.Provider,{value:p},h))))}),Pg=l.forwardRef((e,t)=>{let{alwaysRender:n,...r}=e,o=l.useRef(null),a=ht(i=>!i.search);return!n&&!a?null:l.createElement(V.div,{ref:Ke(o,t),...r,"cmdk-separator":"",role:"separator"})}),kg=l.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,o=e.value!=null,a=na(),i=ht(u=>u.search),s=ht(u=>u.selectedItemId),c=On();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)}})}),Og=l.forwardRef((e,t)=>{let{children:n,label:r="Suggestions",...o}=e,a=l.useRef(null),i=l.useRef(null),s=ht(u=>u.selectedItemId),c=On();return l.useEffect(()=>{if(i.current&&a.current){let u=i.current,d=a.current,m,p=new ResizeObserver(()=>{m=requestAnimationFrame(()=>{let h=u.offsetHeight;d.style.setProperty("--cmdk-list-height",h.toFixed(1)+"px")})});return p.observe(u),()=>{cancelAnimationFrame(m),p.unobserve(u)}}},[]),l.createElement(V.div,{ref:Ke(a,t),...o,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":s,"aria-label":r,id:c.listId},yr(e,u=>l.createElement("div",{ref:Ke(i,c.listInnerRef),"cmdk-list-sizer":""},u)))}),Dg=l.forwardRef((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:o,contentClassName:a,container:i,...s}=e;return l.createElement(Ki,{open:n,onOpenChange:r},l.createElement(qi,{container:i},l.createElement(ea,{"cmdk-overlay":"",className:o}),l.createElement(ta,{"aria-label":e.label,"cmdk-dialog":"",className:a},l.createElement(rc,{ref:t,...s}))))}),Ig=l.forwardRef((e,t)=>ht(n=>n.filtered.count===0)?l.createElement(V.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),Ag=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},yr(e,i=>l.createElement("div",{"aria-hidden":!0},i)))}),Ae=Object.assign(rc,{List:Og,Item:Mg,Input:kg,Group:Rg,Separator:Pg,Dialog:Dg,Empty:Ig,Loading:Ag});function Tg(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function _g(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function oc(e){let t=l.useRef(e);return Mt(()=>{t.current=e}),t}var Mt=typeof window>"u"?l.useEffect:l.useLayoutEffect;function Lt(e){let t=l.useRef();return t.current===void 0&&(t.current=e()),t}function ht(e){let t=na(),n=()=>e(t.snapshot());return l.useSyncExternalStore(t.subscribe,n,n)}function ac(e,t,n,r=[]){let o=l.useRef(),a=On();return Mt(()=>{var i;let s=(()=>{var u;for(let d of n){if(typeof d=="string")return d.trim();if(typeof d=="object"&&"current"in d)return d.current?(u=d.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($t,s),o.current=s}),o}var jg=()=>{let[e,t]=l.useState(),n=Lt(()=>new Map);return Mt(()=>{n.current.forEach(r=>r()),n.current=new Map},[e]),(r,o)=>{n.current.set(r,o),t({})}};function Fg(e){let t=e.type;return typeof t=="function"?t(e.props):"render"in t?t.render(e.props):e}function yr({asChild:e,children:t},n){return e&&l.isValidElement(t)?l.cloneElement(Fg(t),{ref:t.ref},n(t.props.children)):n(t)}var $g={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};const br=l.forwardRef(({className:e,...t},n)=>f.jsx(Ae,{ref:n,className:k("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...t}));br.displayName=Ae.displayName;const sc={popover:50,tooltip:50,overlay:50,dialog:50,dropdown:50};let gn={...sc};function Lg(e){gn={...gn,...e}}function Wg(){return{...gn}}function Bg(){gn={...sc}}function Ve(e,t){return t??gn[e]}const ra=l.forwardRef(({className:e,zIndex:t,...n},r)=>{const o=Ve("overlay",t);return f.jsx(ea,{ref:r,className:k(`fixed inset-0 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out
|
|
145
|
+
data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0`,e),style:{zIndex:o,...n.style},...n})});ra.displayName=ea.displayName;const ic=l.forwardRef(({className:e,children:t,zIndex:n,...r},o)=>{const a=Ve("dialog",n);return f.jsxs(cc,{children:[f.jsx(ra,{}),f.jsxs(ta,{ref:o,className:k(`fixed left-[50%] top-[50%] grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%]
|
|
146
146
|
gap-4 border bg-background px-6 py-6 shadow-lg duration-200 data-[state=open]:animate-in
|
|
147
147
|
data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0
|
|
148
148
|
data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95
|
|
149
149
|
data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%]
|
|
150
150
|
data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%]
|
|
151
|
-
sm:rounded-lg`,e),style:{zIndex:a,...r.style},...r,children:[t,f.jsxs(
|
|
151
|
+
sm:rounded-lg`,e),style:{zIndex:a,...r.style},...r,children:[t,f.jsxs(Qi,{className:k(le.focusRing,`absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity
|
|
152
152
|
hover:opacity-100 disabled:pointer-events-none data-[state=open]:bg-accent
|
|
153
|
-
data-[state=open]:text-muted-foreground`),children:[f.jsx(mr,{className:"h-4 w-4"}),f.jsx("span",{className:"sr-only",children:"Close"})]})]})]})});
|
|
153
|
+
data-[state=open]:text-muted-foreground`),children:[f.jsx(mr,{className:"h-4 w-4"}),f.jsx("span",{className:"sr-only",children:"Close"})]})]})]})});ic.displayName=ta.displayName;const Vg=Ki,Yg=Sg,cc=qi,Hg=Qi,Gg=V.div,lc="px-3 py-2.5 text-sm",oa=l.forwardRef((e,t)=>f.jsx(Ae.Empty,{ref:t,className:lc,...e}));oa.displayName=Ae.Empty.displayName;const Co=l.forwardRef((e,t)=>f.jsx(Gg,{ref:t,className:lc,...e,"cmdk-empty":"",role:"presentation"}));Co.displayName="CommandForceEmpty";const xr=l.forwardRef(({className:e,...t},n)=>f.jsx(Ae.Group,{ref:n,className:k(`overflow-hidden px-1 py-1 text-foreground [&_[cmdk-group-heading]]:px-2
|
|
154
154
|
[&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs
|
|
155
|
-
[&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground`,e),...t}));xr.displayName=
|
|
156
|
-
placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50`,e),...t})]}));wr.displayName=
|
|
155
|
+
[&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground`,e),...t}));xr.displayName=Ae.Group.displayName;const wr=l.forwardRef(({className:e,...t},n)=>f.jsxs("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[f.jsx(Vp,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),f.jsx(Ae.Input,{ref:n,className:k(`flex h-11 w-full rounded-sm bg-transparent py-3 text-sm outline-none
|
|
156
|
+
placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50`,e),...t})]}));wr.displayName=Ae.Input.displayName;const Cr=l.forwardRef(({className:e,...t},n)=>f.jsx(Ae.Item,{ref:n,className:k(`relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm
|
|
157
157
|
outline-none aria-disabled:pointer-events-none aria-disabled:opacity-50
|
|
158
|
-
aria-selected:bg-accent aria-selected:text-accent-foreground`,e),...t}));Cr.displayName=Te.Item.displayName;const Sr=l.forwardRef(({className:e,...t},n)=>f.jsx(Te.List,{ref:n,className:k("max-h-[20rem] overflow-y-auto overflow-x-hidden",e),...t}));Sr.displayName=Te.List.displayName;const lc=({children:e="Loading...",...t})=>f.jsxs("div",{className:"flex items-center gap-2 px-3 py-2.5 text-sm text-muted-foreground",...t,children:[f.jsx(hi,{className:"h-4 w-4 animate-spin"}),e]});lc.displayName="CommandLoading";const Vg=["top","right","bottom","left"],gt=Math.min,Re=Math.max,rr=Math.round,qn=Math.floor,Ue=e=>({x:e,y:e}),Yg={left:"right",right:"left",bottom:"top",top:"bottom"},Hg={start:"end",end:"start"};function So(e,t,n){return Re(e,gt(t,n))}function at(e,t){return typeof e=="function"?e(t):e}function st(e){return e.split("-")[0]}function qt(e){return e.split("-")[1]}function oa(e){return e==="x"?"y":"x"}function aa(e){return e==="y"?"height":"width"}function vt(e){return["top","bottom"].includes(st(e))?"y":"x"}function sa(e){return oa(vt(e))}function Gg(e,t,n){n===void 0&&(n=!1);const r=qt(e),o=sa(e),a=aa(o);let i=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(i=or(i)),[i,or(i)]}function zg(e){const t=or(e);return[Eo(e),t,Eo(t)]}function Eo(e){return e.replace(/start|end/g,t=>Hg[t])}function Ug(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 Kg(e,t,n,r){const o=qt(e);let a=Ug(st(e),n==="start",r);return o&&(a=a.map(i=>i+"-"+o),t&&(a=a.concat(a.map(Eo)))),a}function or(e){return e.replace(/left|right|bottom|top/g,t=>Yg[t])}function qg(e){return{top:0,right:0,bottom:0,left:0,...e}}function uc(e){return typeof e!="number"?qg(e):{top:e,right:e,bottom:e,left:e}}function ar(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 hs(e,t,n){let{reference:r,floating:o}=e;const a=vt(t),i=sa(t),s=aa(i),c=st(t),u=a==="y",d=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:d,y:r.y-o.height};break;case"bottom":h={x:d,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(qt(t)){case"start":h[i]-=p*(n&&u?-1:1);break;case"end":h[i]+=p*(n&&u?-1:1);break}return h}const Xg=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:d,y:m}=hs(u,r,c),p=r,h={},y=0;for(let g=0;g<s.length;g++){const{name:v,fn:b}=s[g],{x,y:w,data:S,reset:C}=await b({x:d,y:m,initialPlacement:r,placement:p,strategy:o,middlewareData:h,rects:u,platform:i,elements:{reference:e,floating:t}});d=x??d,m=w??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:d,y:m}=hs(u,p,c)),g=-1)}return{x:d,y:m,placement:p,strategy:o,middlewareData:h}};async function vn(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:d="viewport",elementContext:m="floating",altBoundary:p=!1,padding:h=0}=at(t,e),y=uc(h),v=s[p?m==="floating"?"reference":"floating":m],b=ar(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:d,strategy:c})),x=m==="floating"?{x:r,y:o,width:i.floating.width,height:i.floating.height}:i.reference,w=await(a.getOffsetParent==null?void 0:a.getOffsetParent(s.floating)),S=await(a.isElement==null?void 0:a.isElement(w))?await(a.getScale==null?void 0:a.getScale(w))||{x:1,y:1}:{x:1,y:1},C=ar(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:x,offsetParent:w,strategy:c}):x);return{top:(b.top-C.top+y.top)/S.y,bottom:(C.bottom-b.bottom+y.bottom)/S.y,left:(b.left-C.left+y.left)/S.x,right:(C.right-b.right+y.right)/S.x}}const Zg=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:d=0}=at(e,t)||{};if(u==null)return{};const m=uc(d),p={x:n,y:r},h=sa(o),y=aa(h),g=await i.getDimensions(u),v=h==="y",b=v?"top":"left",x=v?"bottom":"right",w=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[w]:0;(!N||!await(i.isElement==null?void 0:i.isElement(M)))&&(N=s.floating[w]||a.floating[y]);const P=S/2-C/2,F=N/2-g[y]/2-1,_=gt(m[b],F),$=gt(m[x],F),A=_,B=N-g[y]-$,Y=N/2-g[y]/2+P,q=So(A,Y,B),j=!c.arrow&&qt(o)!=null&&Y!==q&&a.reference[y]/2-(Y<A?_:$)-g[y]/2<0,G=j?Y<A?Y-A:Y-B:0;return{[h]:p[h]+G,data:{[h]:q,centerOffset:Y-q-G,...j&&{alignmentOffset:G}},reset:j}}}),Qg=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:d=!0,crossAxis:m=!0,fallbackPlacements:p,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:y="none",flipAlignment:g=!0,...v}=at(e,t);if((n=a.arrow)!=null&&n.alignmentOffset)return{};const b=st(o),x=vt(s),w=st(s)===s,S=await(c.isRTL==null?void 0:c.isRTL(u.floating)),C=p||(w||!g?[or(s)]:zg(s)),M=y!=="none";!p&&M&&C.push(...Kg(s,g,y,S));const N=[s,...C],P=await vn(t,v),F=[];let _=((r=a.flip)==null?void 0:r.overflows)||[];if(d&&F.push(P[b]),m){const Y=Gg(o,i,S);F.push(P[Y[0]],P[Y[1]])}if(_=[..._,{placement:o,overflows:F}],!F.every(Y=>Y<=0)){var $,A;const Y=((($=a.flip)==null?void 0:$.index)||0)+1,q=N[Y];if(q)return{data:{index:Y,overflows:_},reset:{placement:q}};let j=(A=_.filter(G=>G.overflows[0]<=0).sort((G,I)=>G.overflows[1]-I.overflows[1])[0])==null?void 0:A.placement;if(!j)switch(h){case"bestFit":{var B;const G=(B=_.filter(I=>{if(M){const D=vt(I.placement);return D===x||D==="y"}return!0}).map(I=>[I.placement,I.overflows.filter(D=>D>0).reduce((D,Q)=>D+Q,0)]).sort((I,D)=>I[1]-D[1])[0])==null?void 0:B[0];G&&(j=G);break}case"initialPlacement":j=s;break}if(o!==j)return{reset:{placement:j}}}return{}}}};function gs(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function vs(e){return Vg.some(t=>e[t]>=0)}const Jg=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=at(e,t);switch(r){case"referenceHidden":{const a=await vn(t,{...o,elementContext:"reference"}),i=gs(a,n.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:vs(i)}}}case"escaped":{const a=await vn(t,{...o,altBoundary:!0}),i=gs(a,n.floating);return{data:{escapedOffsets:i,escaped:vs(i)}}}default:return{}}}}};async function ev(e,t){const{placement:n,platform:r,elements:o}=e,a=await(r.isRTL==null?void 0:r.isRTL(o.floating)),i=st(n),s=qt(n),c=vt(n)==="y",u=["left","top"].includes(i)?-1:1,d=a&&c?-1:1,m=at(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*d,y:p*u}:{x:p*u,y:h*d}}const tv=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 ev(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}}}}},nv=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:b,y:x}=v;return{x:b,y:x}}},...c}=at(e,t),u={x:n,y:r},d=await vn(t,c),m=vt(st(o)),p=oa(m);let h=u[p],y=u[m];if(a){const v=p==="y"?"top":"left",b=p==="y"?"bottom":"right",x=h+d[v],w=h-d[b];h=So(x,h,w)}if(i){const v=m==="y"?"top":"left",b=m==="y"?"bottom":"right",x=y+d[v],w=y-d[b];y=So(x,y,w)}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}}}}}},rv=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}=at(e,t),d={x:n,y:r},m=vt(o),p=oa(m);let h=d[p],y=d[m];const g=at(s,t),v=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(c){const w=p==="y"?"height":"width",S=a.reference[p]-a.floating[w]+v.mainAxis,C=a.reference[p]+a.reference[w]-v.mainAxis;h<S?h=S:h>C&&(h=C)}if(u){var b,x;const w=p==="y"?"width":"height",S=["top","left"].includes(st(o)),C=a.reference[m]-a.floating[w]+(S&&((b=i.offset)==null?void 0:b[m])||0)+(S?0:v.crossAxis),M=a.reference[m]+a.reference[w]+(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}}}},ov=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}=at(e,t),d=await vn(t,u),m=st(o),p=qt(o),h=vt(o)==="y",{width:y,height:g}=a.floating;let v,b;m==="top"||m==="bottom"?(v=m,b=p===(await(i.isRTL==null?void 0:i.isRTL(s.floating))?"start":"end")?"left":"right"):(b=m,v=p==="end"?"top":"bottom");const x=g-d.top-d.bottom,w=y-d.left-d.right,S=gt(g-d[v],x),C=gt(y-d[b],w),M=!t.middlewareData.shift;let N=S,P=C;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(P=w),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(N=x),M&&!p){const _=Re(d.left,0),$=Re(d.right,0),A=Re(d.top,0),B=Re(d.bottom,0);h?P=y-2*(_!==0||$!==0?_+$:Re(d.left,d.right)):N=g-2*(A!==0||B!==0?A+B:Re(d.top,d.bottom))}await c({...t,availableWidth:P,availableHeight:N});const F=await i.getDimensions(s.floating);return y!==F.width||g!==F.height?{reset:{rects:!0}}:{}}}};function Er(){return typeof window<"u"}function Xt(e){return dc(e)?(e.nodeName||"").toLowerCase():"#document"}function Pe(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ze(e){var t;return(t=(dc(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function dc(e){return Er()?e instanceof Node||e instanceof Pe(e).Node:!1}function $e(e){return Er()?e instanceof Element||e instanceof Pe(e).Element:!1}function qe(e){return Er()?e instanceof HTMLElement||e instanceof Pe(e).HTMLElement:!1}function ys(e){return!Er()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Pe(e).ShadowRoot}function Dn(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Le(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function av(e){return["table","td","th"].includes(Xt(e))}function Nr(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function ia(e){const t=ca(),n=$e(e)?Le(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 sv(e){let t=yt(e);for(;qe(t)&&!Yt(t);){if(ia(t))return t;if(Nr(t))return null;t=yt(t)}return null}function ca(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Yt(e){return["html","body","#document"].includes(Xt(e))}function Le(e){return Pe(e).getComputedStyle(e)}function Mr(e){return $e(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function yt(e){if(Xt(e)==="html")return e;const t=e.assignedSlot||e.parentNode||ys(e)&&e.host||Ze(e);return ys(t)?t.host:t}function fc(e){const t=yt(e);return Yt(t)?e.ownerDocument?e.ownerDocument.body:e.body:qe(t)&&Dn(t)?t:fc(t)}function yn(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=fc(e),a=o===((r=e.ownerDocument)==null?void 0:r.body),i=Pe(o);if(a){const s=No(i);return t.concat(i,i.visualViewport||[],Dn(o)?o:[],s&&n?yn(s):[])}return t.concat(o,yn(o,[],n))}function No(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function mc(e){const t=Le(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=qe(e),a=o?e.offsetWidth:n,i=o?e.offsetHeight:r,s=rr(n)!==a||rr(r)!==i;return s&&(n=a,r=i),{width:n,height:r,$:s}}function la(e){return $e(e)?e:e.contextElement}function Vt(e){const t=la(e);if(!qe(t))return Ue(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:a}=mc(t);let i=(a?rr(n.width):n.width)/r,s=(a?rr(n.height):n.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!s||!Number.isFinite(s))&&(s=1),{x:i,y:s}}const iv=Ue(0);function pc(e){const t=Pe(e);return!ca()||!t.visualViewport?iv:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function cv(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Pe(e)?!1:t}function Rt(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),a=la(e);let i=Ue(1);t&&(r?$e(r)&&(i=Vt(r)):i=Vt(e));const s=cv(a,n,r)?pc(a):Ue(0);let c=(o.left+s.x)/i.x,u=(o.top+s.y)/i.y,d=o.width/i.x,m=o.height/i.y;if(a){const p=Pe(a),h=r&&$e(r)?Pe(r):r;let y=p,g=No(y);for(;g&&r&&h!==y;){const v=Vt(g),b=g.getBoundingClientRect(),x=Le(g),w=b.left+(g.clientLeft+parseFloat(x.paddingLeft))*v.x,S=b.top+(g.clientTop+parseFloat(x.paddingTop))*v.y;c*=v.x,u*=v.y,d*=v.x,m*=v.y,c+=w,u+=S,y=Pe(g),g=No(y)}}return ar({width:d,height:m,x:c,y:u})}function ua(e,t){const n=Mr(e).scrollLeft;return t?t.left+n:Rt(Ze(e)).left+n}function hc(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),o=r.left+t.scrollLeft-(n?0:ua(e,r)),a=r.top+t.scrollTop;return{x:o,y:a}}function lv(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const a=o==="fixed",i=Ze(r),s=t?Nr(t.floating):!1;if(r===i||s&&a)return n;let c={scrollLeft:0,scrollTop:0},u=Ue(1);const d=Ue(0),m=qe(r);if((m||!m&&!a)&&((Xt(r)!=="body"||Dn(i))&&(c=Mr(r)),qe(r))){const h=Rt(r);u=Vt(r),d.x=h.x+r.clientLeft,d.y=h.y+r.clientTop}const p=i&&!m&&!a?hc(i,c,!0):Ue(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-c.scrollLeft*u.x+d.x+p.x,y:n.y*u.y-c.scrollTop*u.y+d.y+p.y}}function uv(e){return Array.from(e.getClientRects())}function dv(e){const t=Ze(e),n=Mr(e),r=e.ownerDocument.body,o=Re(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=Re(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+ua(e);const s=-n.scrollTop;return Le(r).direction==="rtl"&&(i+=Re(t.clientWidth,r.clientWidth)-o),{width:o,height:a,x:i,y:s}}function fv(e,t){const n=Pe(e),r=Ze(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=ca();(!u||u&&t==="fixed")&&(s=o.offsetLeft,c=o.offsetTop)}return{width:a,height:i,x:s,y:c}}function mv(e,t){const n=Rt(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,a=qe(e)?Vt(e):Ue(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 bs(e,t,n){let r;if(t==="viewport")r=fv(e,n);else if(t==="document")r=dv(Ze(e));else if($e(t))r=mv(t,n);else{const o=pc(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return ar(r)}function gc(e,t){const n=yt(e);return n===t||!$e(n)||Yt(n)?!1:Le(n).position==="fixed"||gc(n,t)}function pv(e,t){const n=t.get(e);if(n)return n;let r=yn(e,[],!1).filter(s=>$e(s)&&Xt(s)!=="body"),o=null;const a=Le(e).position==="fixed";let i=a?yt(e):e;for(;$e(i)&&!Yt(i);){const s=Le(i),c=ia(i);!c&&s.position==="fixed"&&(o=null),(a?!c&&!o:!c&&s.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||Dn(i)&&!c&&gc(e,i))?r=r.filter(d=>d!==i):o=s,i=yt(i)}return t.set(e,r),r}function hv(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[...n==="clippingAncestors"?Nr(t)?[]:pv(t,this._c):[].concat(n),r],s=i[0],c=i.reduce((u,d)=>{const m=bs(t,d,o);return u.top=Re(m.top,u.top),u.right=gt(m.right,u.right),u.bottom=gt(m.bottom,u.bottom),u.left=Re(m.left,u.left),u},bs(t,s,o));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function gv(e){const{width:t,height:n}=mc(e);return{width:t,height:n}}function vv(e,t,n){const r=qe(t),o=Ze(t),a=n==="fixed",i=Rt(e,!0,a,t);let s={scrollLeft:0,scrollTop:0};const c=Ue(0);if(r||!r&&!a)if((Xt(t)!=="body"||Dn(o))&&(s=Mr(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=ua(o));const u=o&&!r&&!a?hc(o,s):Ue(0),d=i.left+s.scrollLeft-c.x-u.x,m=i.top+s.scrollTop-c.y-u.y;return{x:d,y:m,width:i.width,height:i.height}}function ao(e){return Le(e).position==="static"}function xs(e,t){if(!qe(e)||Le(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Ze(e)===n&&(n=n.ownerDocument.body),n}function vc(e,t){const n=Pe(e);if(Nr(e))return n;if(!qe(e)){let o=yt(e);for(;o&&!Yt(o);){if($e(o)&&!ao(o))return o;o=yt(o)}return n}let r=xs(e,t);for(;r&&av(r)&&ao(r);)r=xs(r,t);return r&&Yt(r)&&ao(r)&&!ia(r)?n:r||sv(e)||n}const yv=async function(e){const t=this.getOffsetParent||vc,n=this.getDimensions,r=await n(e.floating);return{reference:vv(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function bv(e){return Le(e).direction==="rtl"}const xv={convertOffsetParentRelativeRectToViewportRelativeRect:lv,getDocumentElement:Ze,getClippingRect:hv,getOffsetParent:vc,getElementRects:yv,getClientRects:uv,getDimensions:gv,getScale:Vt,isElement:$e,isRTL:bv};function yc(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function wv(e,t){let n=null,r;const o=Ze(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:d,top:m,width:p,height:h}=u;if(s||t(),!p||!h)return;const y=qn(m),g=qn(o.clientWidth-(d+p)),v=qn(o.clientHeight-(m+h)),b=qn(d),w={rootMargin:-y+"px "+-g+"px "+-v+"px "+-b+"px",threshold:Re(0,gt(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&&!yc(u,e.getBoundingClientRect())&&i(),S=!1}try{n=new IntersectionObserver(C,{...w,root:o.ownerDocument})}catch{n=new IntersectionObserver(C,w)}n.observe(e)}return i(!0),a}function bc(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=la(e),d=o||a?[...u?yn(u):[],...yn(t)]:[];d.forEach(b=>{o&&b.addEventListener("scroll",n,{passive:!0}),a&&b.addEventListener("resize",n)});const m=u&&s?wv(u,n):null;let p=-1,h=null;i&&(h=new ResizeObserver(b=>{let[x]=b;x&&x.target===u&&h&&(h.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var w;(w=h)==null||w.observe(t)})),n()}),u&&!c&&h.observe(u),h.observe(t));let y,g=c?Rt(e):null;c&&v();function v(){const b=Rt(e);g&&!yc(g,b)&&n(),g=b,y=requestAnimationFrame(v)}return n(),()=>{var b;d.forEach(x=>{o&&x.removeEventListener("scroll",n),a&&x.removeEventListener("resize",n)}),m==null||m(),(b=h)==null||b.disconnect(),h=null,c&&cancelAnimationFrame(y)}}const Cv=tv,Sv=nv,Ev=Qg,Nv=ov,Mv=Jg,ws=Zg,Rv=rv,Pv=(e,t,n)=>{const r=new Map,o={platform:xv,...n},a={...o.platform,_c:r};return Xg(e,t,{...o,platform:a})};var er=typeof document<"u"?E.useLayoutEffect:E.useEffect;function sr(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(!sr(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)&&!sr(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function xc(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Cs(e,t){const n=xc(e);return Math.round(t*n)/n}function so(e){const t=l.useRef(e);return er(()=>{t.current=e}),t}function wc(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,[d,m]=l.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,h]=l.useState(r);sr(p,r)||h(r);const[y,g]=l.useState(null),[v,b]=l.useState(null),x=l.useCallback(I=>{I!==M.current&&(M.current=I,g(I))},[]),w=l.useCallback(I=>{I!==N.current&&(N.current=I,b(I))},[]),S=a||y,C=i||v,M=l.useRef(null),N=l.useRef(null),P=l.useRef(d),F=c!=null,_=so(c),$=so(o),A=so(u),B=l.useCallback(()=>{if(!M.current||!N.current)return;const I={placement:t,strategy:n,middleware:p};$.current&&(I.platform=$.current),Pv(M.current,N.current,I).then(D=>{const Q={...D,isPositioned:A.current!==!1};Y.current&&!sr(P.current,Q)&&(P.current=Q,En.flushSync(()=>{m(Q)}))})},[p,t,n,$,A]);er(()=>{u===!1&&P.current.isPositioned&&(P.current.isPositioned=!1,m(I=>({...I,isPositioned:!1})))},[u]);const Y=l.useRef(!1);er(()=>(Y.current=!0,()=>{Y.current=!1}),[]),er(()=>{if(S&&(M.current=S),C&&(N.current=C),S&&C){if(_.current)return _.current(S,C,B);B()}},[S,C,B,_,F]);const q=l.useMemo(()=>({reference:M,floating:N,setReference:x,setFloating:w}),[x,w]),j=l.useMemo(()=>({reference:S,floating:C}),[S,C]),G=l.useMemo(()=>{const I={position:n,left:0,top:0};if(!j.floating)return I;const D=Cs(j.floating,d.x),Q=Cs(j.floating,d.y);return s?{...I,transform:"translate("+D+"px, "+Q+"px)",...xc(j.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:D,top:Q}},[n,s,j.floating,d.x,d.y]);return l.useMemo(()=>({...d,update:B,refs:q,elements:j,floatingStyles:G}),[d,B,q,j,G])}const kv=e=>{function t(n){return{}.hasOwnProperty.call(n,"current")}return{name:"arrow",options:e,fn(n){const{element:r,padding:o}=typeof e=="function"?e(n):e;return r&&t(r)?r.current!=null?ws({element:r.current,padding:o}).fn(n):{}:r?ws({element:r,padding:o}).fn(n):{}}}},Cc=(e,t)=>({...Cv(e),options:[e,t]}),Sc=(e,t)=>({...Sv(e),options:[e,t]}),Ec=(e,t)=>({...Rv(e),options:[e,t]}),Nc=(e,t)=>({...Ev(e),options:[e,t]}),Mc=(e,t)=>({...Nv(e),options:[e,t]}),Rc=(e,t)=>({...Mv(e),options:[e,t]}),Pc=(e,t)=>({...kv(e),options:[e,t]});var Ov="Arrow",kc=l.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...a}=e;return f.jsx(V.svg,{...a,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:f.jsx("polygon",{points:"0,0 30,0 15,10"})})});kc.displayName=Ov;var Dv=kc;function An(e){const[t,n]=l.useState(void 0);return de(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const a=o[0];let 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 da="Popper",[Oc,Zt]=ve(da),[Av,Dc]=Oc(da),Ac=e=>{const{__scopePopper:t,children:n}=e,[r,o]=l.useState(null);return f.jsx(Av,{scope:t,anchor:r,onAnchorChange:o,children:n})};Ac.displayName=da;var Tc="PopperAnchor",Ic=l.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,a=Dc(Tc,n),i=l.useRef(null),s=U(t,i);return l.useEffect(()=>{a.onAnchorChange((r==null?void 0:r.current)||i.current)}),r?null:f.jsx(V.div,{...o,ref:s})});Ic.displayName=Tc;var fa="PopperContent",[Tv,Iv]=Oc(fa),_c=l.forwardRef((e,t)=>{var T,Z,K,te,re,oe;const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:a="center",alignOffset:i=0,arrowPadding:s=0,avoidCollisions:c=!0,collisionBoundary:u=[],collisionPadding:d=0,sticky:m="partial",hideWhenDetached:p=!1,updatePositionStrategy:h="optimized",onPlaced:y,...g}=e,v=Dc(fa,n),[b,x]=l.useState(null),w=U(t,he=>x(he)),[S,C]=l.useState(null),M=An(S),N=(M==null?void 0:M.width)??0,P=(M==null?void 0:M.height)??0,F=r+(a!=="center"?"-"+a:""),_=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},$=Array.isArray(u)?u:[u],A=$.length>0,B={padding:_,boundary:$.filter(jv),altBoundary:A},{refs:Y,floatingStyles:q,placement:j,isPositioned:G,middlewareData:I}=wc({strategy:"fixed",placement:F,whileElementsMounted:(...he)=>bc(...he,{animationFrame:h==="always"}),elements:{reference:v.anchor},middleware:[Cc({mainAxis:o+P,alignmentAxis:i}),c&&Sc({mainAxis:!0,crossAxis:!1,limiter:m==="partial"?Ec():void 0,...B}),c&&Nc({...B}),Mc({...B,apply:({elements:he,rects:be,availableWidth:Je,availableHeight:et})=>{const{width:tt,height:on}=be.reference,Ie=he.floating.style;Ie.setProperty("--radix-popper-available-width",`${Je}px`),Ie.setProperty("--radix-popper-available-height",`${et}px`),Ie.setProperty("--radix-popper-anchor-width",`${tt}px`),Ie.setProperty("--radix-popper-anchor-height",`${on}px`)}}),S&&Pc({element:S,padding:s}),Fv({arrowWidth:N,arrowHeight:P}),p&&Rc({strategy:"referenceHidden",...B})]}),[D,Q]=$c(j),J=Se(y);de(()=>{G&&(J==null||J())},[G,J]);const R=(T=I.arrow)==null?void 0:T.x,L=(Z=I.arrow)==null?void 0:Z.y,z=((K=I.arrow)==null?void 0:K.centerOffset)!==0,[W,X]=l.useState();return de(()=>{b&&X(window.getComputedStyle(b).zIndex)},[b]),f.jsx("div",{ref:Y.setFloating,"data-radix-popper-content-wrapper":"",style:{...q,transform:G?q.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:W,"--radix-popper-transform-origin":[(te=I.transformOrigin)==null?void 0:te.x,(re=I.transformOrigin)==null?void 0:re.y].join(" "),...((oe=I.hide)==null?void 0:oe.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:f.jsx(Tv,{scope:n,placedSide:D,onArrowChange:C,arrowX:R,arrowY:L,shouldHideArrow:z,children:f.jsx(V.div,{"data-side":D,"data-align":Q,...g,ref:w,style:{...g.style,animation:G?void 0:"none"}})})})});_c.displayName=fa;var jc="PopperArrow",_v={top:"bottom",right:"left",bottom:"top",left:"right"},Fc=l.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,a=Iv(jc,r),i=_v[a.placedSide];return f.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:f.jsx(Dv,{...o,ref:n,style:{...o.style,display:"block"}})})});Fc.displayName=jc;function jv(e){return e!==null}var Fv=e=>({name:"transformOrigin",options:e,fn(t){var v,b,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,d]=$c(n),m={start:"0%",center:"50%",end:"100%"}[d],p=(((b=o.arrow)==null?void 0:b.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 $c(e){const[t,n="center"]=e.split("-");return[t,n]}var ma=Ac,Rr=Ic,pa=_c,ha=Fc,Pr="Popover",[Lc,TE]=ve(Pr,[Zt]),Tn=Zt(),[$v,xt]=Lc(Pr),Wc=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:o,onOpenChange:a,modal:i=!1}=e,s=Tn(t),c=l.useRef(null),[u,d]=l.useState(!1),[m,p]=Ce({prop:r,defaultProp:o??!1,onChange:a,caller:Pr});return f.jsx(ma,{...s,children:f.jsx($v,{scope:t,contentId:pe(),triggerRef:c,open:m,onOpenChange:p,onOpenToggle:l.useCallback(()=>p(h=>!h),[p]),hasCustomAnchor:u,onCustomAnchorAdd:l.useCallback(()=>d(!0),[]),onCustomAnchorRemove:l.useCallback(()=>d(!1),[]),modal:i,children:n})})};Wc.displayName=Pr;var Bc="PopoverAnchor",Lv=l.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=xt(Bc,n),a=Tn(n),{onCustomAnchorAdd:i,onCustomAnchorRemove:s}=o;return l.useEffect(()=>(i(),()=>s()),[i,s]),f.jsx(Rr,{...a,...r,ref:t})});Lv.displayName=Bc;var Vc="PopoverTrigger",Yc=l.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=xt(Vc,n),a=Tn(n),i=U(t,o.triggerRef),s=f.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:O(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?s:f.jsx(Rr,{asChild:!0,...a,children:s})});Yc.displayName=Vc;var ga="PopoverPortal",[Wv,Bv]=Lc(ga,{forceMount:void 0}),Hc=e=>{const{__scopePopover:t,forceMount:n,children:r,container:o}=e,a=xt(ga,t);return f.jsx(Wv,{scope:t,forceMount:n,children:f.jsx(Ae,{present:n||a.open,children:f.jsx(Pn,{asChild:!0,container:o,children:r})})})};Hc.displayName=ga;var Ht="PopoverContent",Gc=l.forwardRef((e,t)=>{const n=Bv(Ht,e.__scopePopover),{forceMount:r=n.forceMount,...o}=e,a=xt(Ht,e.__scopePopover);return f.jsx(Ae,{present:r||a.open,children:a.modal?f.jsx(Yv,{...o,ref:t}):f.jsx(Hv,{...o,ref:t})})});Gc.displayName=Ht;var Vv=pt("PopoverContent.RemoveScroll"),Yv=l.forwardRef((e,t)=>{const n=xt(Ht,e.__scopePopover),r=l.useRef(null),o=U(t,r),a=l.useRef(!1);return l.useEffect(()=>{const i=r.current;if(i)return gr(i)},[]),f.jsx(kn,{as:Vv,allowPinchZoom:!0,children:f.jsx(zc,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:O(e.onCloseAutoFocus,i=>{var s;i.preventDefault(),a.current||(s=n.triggerRef.current)==null||s.focus()}),onPointerDownOutside:O(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:O(e.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1})})})}),Hv=l.forwardRef((e,t)=>{const n=xt(Ht,e.__scopePopover),r=l.useRef(!1),o=l.useRef(!1);return f.jsx(zc,{...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()}})}),zc=l.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:a,disableOutsidePointerEvents:i,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:u,onInteractOutside:d,...m}=e,p=xt(Ht,n),h=Tn(n);return pr(),f.jsx(Rn,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:a,children:f.jsx(Mn,{asChild:!0,disableOutsidePointerEvents:i,onInteractOutside:d,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:u,onDismiss:()=>p.onOpenChange(!1),children:f.jsx(pa,{"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)"}})})})}),Uc="PopoverClose",Gv=l.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=xt(Uc,n);return f.jsx(V.button,{type:"button",...r,ref:t,onClick:O(e.onClick,()=>o.onOpenChange(!1))})});Gv.displayName=Uc;var zv="PopoverArrow",Kc=l.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=Tn(n);return f.jsx(ha,{...o,...r,ref:t})});Kc.displayName=zv;function qc(e){return e?"open":"closed"}var Uv=Wc,Kv=Yc,qv=Hc,Xc=Gc,Xv=Kc;const Qt=Uv,Jt=Kv,Zv=Xv,Ot=l.forwardRef(({className:e,align:t="center",sideOffset:n=4,hasArrow:r,zIndex:o,children:a,...i},s)=>{const c=Ve("popover",o);return f.jsx(qv,{children:f.jsxs(Xc,{ref:s,align:t,className:k(le.popover,e),sideOffset:n,style:{zIndex:c,...i.style},...i,children:[a,r?f.jsx(Zv,{className:"fill-popover stroke-muted stroke-[1px]",height:7,width:15}):null]})})});Ot.displayName=Xc.displayName;const Zc=E.forwardRef(({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:d=10,debounceMs:m=300,minSearch:p=2,zIndex:h,isDisabled:y=!1,...g},v)=>{const[b,x]=E.useState(!1),w=Ve("dropdown",h),[S,C]=E.useState(""),[M,N]=E.useState(!1),[P,F]=E.useState(!1),[_,$]=E.useState([]),[A,B]=E.useState(!1),Y=E.useRef();E.useEffect(()=>()=>{Y.current&&clearTimeout(Y.current)},[]);const q=E.useCallback(async R=>{if(e)try{N(!0),F(!1);const L=await e(R);$(L.slice(0,d)),B(!0)}catch(L){console.error("Error fetching options:",L),F(!0),$([])}finally{N(!1)}},[e,d]),j=E.useMemo(()=>{if(e)return[];const R=S.toLowerCase().trim();return R.length>0&&B(!0),t.filter(L=>L.label.toLowerCase().includes(R)||L.value.toLowerCase().includes(R)).slice(0,d)},[e,t,S,d]),G=e?_:j,I=E.useMemo(()=>G.find(R=>R.value===n),[G,n]),D=E.useCallback(R=>{r(R),x(!1),C(""),B(!1)},[r]),Q=E.useCallback(R=>{C(R),R.length===0&&B(!1),Y.current&&clearTimeout(Y.current),e&&R.length>=p?Y.current=setTimeout(()=>{q(R)},m):e&&R.length===0&&$([])},[e,p,m,q]),J=E.useCallback(()=>{r(""),C(""),$([]),B(!1)},[r]);return f.jsxs(Qt,{open:b,onOpenChange:x,children:[f.jsx(Jt,{asChild:!0,children:f.jsxs(Oe,{ref:v,"aria-expanded":b,className:k("w-full justify-between px-3",!I&&!n&&"text-muted-foreground",c),isDisabled:y,role:"combobox",variant:"input",...g,children:[f.jsx("span",{className:"truncate",children:I?I.label:n||o}),f.jsxs("div",{className:"flex items-center gap-1",children:[n||S?f.jsx(mr,{className:"h-4 w-4 opacity-50 hover:opacity-100",onClick:R=>{R.stopPropagation(),J()}}):null,f.jsx(qo,{className:"h-4 w-4 shrink-0 opacity-50"})]})]})}),f.jsx(Ot,{align:"start",className:"w-[--radix-popover-trigger-width] px-0 py-0",zIndex:w,children:f.jsxs(br,{shouldFilter:!1,children:[f.jsx(wr,{placeholder:o,value:S,onValueChange:Q}),M?f.jsx(lc,{children:a}):null,!M&&P?f.jsx(Co,{children:s}):null,!M&&!P&&A&&G.length===0?f.jsx(Co,{children:i}):null,!M&&!P&&G.length>0?f.jsx(Sr,{className:k("max-h-[16.5rem] overflow-y-auto",u),children:f.jsx(xr,{children:G.map(R=>f.jsxs(Cr,{className:"cursor-pointer",value:R.value,onSelect:D,children:[f.jsx(Kt,{className:k("mr-2 h-4 w-4",R.value===n?"opacity-100":"opacity-0")}),R.label]},R.value))})}):null]})})]})});Zc.displayName="Autocomplete";const Qv=De(`inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold
|
|
159
|
-
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"}}),Qc=l.forwardRef(({className:e,variant:t,...n},r)=>f.jsx("div",{ref:r,className:k(Qv({variant:t,className:e})),...n}));Qc.displayName="Badge";const Jc=l.forwardRef(({items:e,separator:t=f.jsx(Ko,{className:"h-4 w-4"}),className:n,...r},o)=>f.jsx("nav",{ref:o,"aria-label":"Breadcrumb",className:k("flex",n),...r,children:f.jsx("ol",{className:"flex flex-wrap items-center gap-1 pl-0",children:e.map((a,i)=>f.jsxs("li",{className:"flex items-center gap-1",children:[a.href?f.jsx("a",{className:k(le.link,le.linkNoUnderline),href:a.href,children:a.label}):f.jsx("span",{className:"font-medium text-foreground",children:a.label}),i<e.length-1?f.jsx("span",{className:"text-muted-foreground",children:t}):null]},i))})}));Jc.displayName="Breadcrumbs";const io={},dn={};function pn(e,t){try{const r=(io[e]||(io[e]=new Intl.DateTimeFormat("en-GB",{timeZone:e,hour:"numeric",timeZoneName:"longOffset"}).format))(t).split("GMT")[1]||"";return r in dn?dn[r]:Ss(r,r.split(":"))}catch{if(e in dn)return dn[e];const n=e==null?void 0:e.match(Jv);return n?Ss(e,n.slice(1)):NaN}}const Jv=/([+-]\d\d):?(\d\d)?/;function Ss(e,t){const n=+t[0],r=+(t[1]||0);return dn[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(pn(this.timeZone,this))?this.setTime(NaN):t.length?typeof t[0]=="number"&&(t.length===1||t.length===2&&typeof t[1]!="number")?this.setTime(t[0]):typeof t[0]=="string"?this.setTime(+new Date(t[0])):t[0]instanceof Date?this.setTime(+t[0]):(this.setTime(+new Date(...t)),el(this),Mo(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-pn(this.timeZone,this)}setTime(t){return Date.prototype.setTime.apply(this,arguments),Mo(this),+this}[Symbol.for("constructDateFrom")](t){return new ze(+new Date(t),this.timeZone)}}const Es=/^(get|set)(?!UTC)/;Object.getOwnPropertyNames(Date.prototype).forEach(e=>{if(!Es.test(e))return;const t=e.replace(Es,"$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),ey(this),+this},ze.prototype[t]=function(){return Date.prototype[t].apply(this,arguments),Mo(this),+this}))});function Mo(e){e.internal.setTime(+e),e.internal.setUTCMinutes(e.internal.getUTCMinutes()-e.getTimezoneOffset())}function ey(e){Date.prototype.setFullYear.call(e,e.internal.getUTCFullYear(),e.internal.getUTCMonth(),e.internal.getUTCDate()),Date.prototype.setHours.call(e,e.internal.getUTCHours(),e.internal.getUTCMinutes(),e.internal.getUTCSeconds(),e.internal.getUTCMilliseconds()),el(e)}function el(e){const t=pn(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=pn(e.timeZone,e),d=-new Date(+e).getTimezoneOffset()-c,m=c!==t,p=d-s;if(m&&p){Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+p);const h=pn(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} (${ty(this.timeZone,this)})`}toLocaleString(t,n){return Date.prototype.toLocaleString.call(this,t,{...n,timeZone:(n==null?void 0:n.timeZone)||this.timeZone})}toLocaleDateString(t,n){return Date.prototype.toLocaleDateString.call(this,t,{...n,timeZone:(n==null?void 0:n.timeZone)||this.timeZone})}toLocaleTimeString(t,n){return Date.prototype.toLocaleTimeString.call(this,t,{...n,timeZone:(n==null?void 0:n.timeZone)||this.timeZone})}tzComponents(){const t=this.getTimezoneOffset(),n=t>0?"-":"+",r=String(Math.floor(Math.abs(t)/60)).padStart(2,"0"),o=String(Math.abs(t)%60).padStart(2,"0");return[n,r,o]}withTimeZone(t){return new we(+this,t)}[Symbol.for("constructDateFrom")](t){return new we(+new Date(t),this.timeZone)}}function ty(e,t){return new Intl.DateTimeFormat("en-GB",{timeZone:e,timeZoneName:"long"}).format(t).slice(12)}var H;(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"})(H||(H={}));var me;(function(e){e.disabled="disabled",e.hidden="hidden",e.outside="outside",e.focused="focused",e.today="today"})(me||(me={}));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 Me;(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"})(Me||(Me={}));const tl=6048e5,ny=864e5,Ns=Symbol.for("constructDateFrom");function ye(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&Ns in e?e[Ns](t):e instanceof Date?new e.constructor(t):new Date(t)}function ie(e,t){return ye(t||e,e)}function nl(e,t,n){const r=ie(e,n==null?void 0:n.in);return isNaN(t)?ye(e,NaN):(t&&r.setDate(r.getDate()+t),r)}function rl(e,t,n){const r=ie(e,n==null?void 0:n.in);if(isNaN(t))return ye(e,NaN);if(!t)return r;const o=r.getDate(),a=ye(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 ry={};function In(){return ry}function Gt(e,t){var s,c,u,d;const n=In(),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??((d=(u=n.locale)==null?void 0:u.options)==null?void 0:d.weekStartsOn)??0,o=ie(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 bn(e,t){return Gt(e,{...t,weekStartsOn:1})}function ol(e,t){const n=ie(e,t==null?void 0:t.in),r=n.getFullYear(),o=ye(n,0);o.setFullYear(r+1,0,4),o.setHours(0,0,0,0);const a=bn(o),i=ye(n,0);i.setFullYear(r,0,4),i.setHours(0,0,0,0);const s=bn(i);return n.getTime()>=a.getTime()?r+1:n.getTime()>=s.getTime()?r:r-1}function Ms(e){const t=ie(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 en(e,...t){const n=ye.bind(null,t.find(r=>typeof r=="object"));return t.map(n)}function xn(e,t){const n=ie(e,t==null?void 0:t.in);return n.setHours(0,0,0,0),n}function al(e,t,n){const[r,o]=en(n==null?void 0:n.in,e,t),a=xn(r),i=xn(o),s=+a-Ms(a),c=+i-Ms(i);return Math.round((s-c)/ny)}function oy(e,t){const n=ol(e,t),r=ye(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),bn(r)}function ay(e,t,n){return nl(e,t*7,n)}function sy(e,t,n){return rl(e,t*12,n)}function iy(e,t){let n,r=t==null?void 0:t.in;return e.forEach(o=>{!r&&typeof o=="object"&&(r=ye.bind(null,o));const a=ie(o,r);(!n||n<a||isNaN(+a))&&(n=a)}),ye(r,n||NaN)}function cy(e,t){let n,r=t==null?void 0:t.in;return e.forEach(o=>{!r&&typeof o=="object"&&(r=ye.bind(null,o));const a=ie(o,r);(!n||n>a||isNaN(+a))&&(n=a)}),ye(r,n||NaN)}function ly(e,t,n){const[r,o]=en(n==null?void 0:n.in,e,t);return+xn(r)==+xn(o)}function sl(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function uy(e){return!(!sl(e)&&typeof e!="number"||isNaN(+ie(e)))}function dy(e,t,n){const[r,o]=en(n==null?void 0:n.in,e,t),a=r.getFullYear()-o.getFullYear(),i=r.getMonth()-o.getMonth();return a*12+i}function fy(e,t){const n=ie(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 my(e,t){const[n,r]=en(e,t.start,t.end);return{start:n,end:r}}function py(e,t){const{start:n,end:r}=my(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(ye(n,i)),i.setMonth(i.getMonth()+s);return o?c.reverse():c}function hy(e,t){const n=ie(e,t==null?void 0:t.in);return n.setDate(1),n.setHours(0,0,0,0),n}function gy(e,t){const n=ie(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 il(e,t){const n=ie(e,t==null?void 0:t.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function cl(e,t){var s,c,u,d;const n=In(),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??((d=(u=n.locale)==null?void 0:u.options)==null?void 0:d.weekStartsOn)??0,o=ie(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 vy(e,t){return cl(e,{...t,weekStartsOn:1})}const yy={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"}},by=(e,t,n)=>{let r;const o=yy[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 co(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const xy={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},wy={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Cy={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Sy={date:co({formats:xy,defaultWidth:"full"}),time:co({formats:wy,defaultWidth:"full"}),dateTime:co({formats:Cy,defaultWidth:"full"})},Ey={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Ny=(e,t,n,r)=>Ey[e];function ln(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 My={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Ry={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Py={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"]},Oy={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"}},Dy={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"}},Ay=(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"},Ty={ordinalNumber:Ay,era:ln({values:My,defaultWidth:"wide"}),quarter:ln({values:Ry,defaultWidth:"wide",argumentCallback:e=>e-1}),month:ln({values:Py,defaultWidth:"wide"}),day:ln({values:ky,defaultWidth:"wide"}),dayPeriod:ln({values:Oy,defaultWidth:"wide",formattingValues:Dy,defaultFormattingWidth:"wide"})};function un(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)?_y(s,m=>m.test(i)):Iy(s,m=>m.test(i));let u;u=e.valueCallback?e.valueCallback(c):c,u=n.valueCallback?n.valueCallback(u):u;const d=t.slice(i.length);return{value:u,rest:d}}}function Iy(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function _y(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function jy(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 Fy=/^(\d+)(th|st|nd|rd)?/i,$y=/\d+/i,Ly={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},Wy={any:[/^b/i,/^(a|c)/i]},By={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Vy={any:[/1/i,/2/i,/3/i,/4/i]},Yy={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},Hy={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]},Gy={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},zy={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]},Uy={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},Ky={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}},qy={ordinalNumber:jy({matchPattern:Fy,parsePattern:$y,valueCallback:e=>parseInt(e,10)}),era:un({matchPatterns:Ly,defaultMatchWidth:"wide",parsePatterns:Wy,defaultParseWidth:"any"}),quarter:un({matchPatterns:By,defaultMatchWidth:"wide",parsePatterns:Vy,defaultParseWidth:"any",valueCallback:e=>e+1}),month:un({matchPatterns:Yy,defaultMatchWidth:"wide",parsePatterns:Hy,defaultParseWidth:"any"}),day:un({matchPatterns:Gy,defaultMatchWidth:"wide",parsePatterns:zy,defaultParseWidth:"any"}),dayPeriod:un({matchPatterns:Uy,defaultMatchWidth:"any",parsePatterns:Ky,defaultParseWidth:"any"})},va={code:"en-US",formatDistance:by,formatLong:Sy,formatRelative:Ny,localize:Ty,match:qy,options:{weekStartsOn:0,firstWeekContainsDate:1}};function Xy(e,t){const n=ie(e,t==null?void 0:t.in);return al(n,il(n))+1}function ll(e,t){const n=ie(e,t==null?void 0:t.in),r=+bn(n)-+oy(n);return Math.round(r/tl)+1}function ul(e,t){var d,m,p,h;const n=ie(e,t==null?void 0:t.in),r=n.getFullYear(),o=In(),a=(t==null?void 0:t.firstWeekContainsDate)??((m=(d=t==null?void 0:t.locale)==null?void 0:d.options)==null?void 0:m.firstWeekContainsDate)??o.firstWeekContainsDate??((h=(p=o.locale)==null?void 0:p.options)==null?void 0:h.firstWeekContainsDate)??1,i=ye((t==null?void 0:t.in)||e,0);i.setFullYear(r+1,0,a),i.setHours(0,0,0,0);const s=Gt(i,t),c=ye((t==null?void 0:t.in)||e,0);c.setFullYear(r,0,a),c.setHours(0,0,0,0);const u=Gt(c,t);return+n>=+s?r+1:+n>=+u?r:r-1}function Zy(e,t){var s,c,u,d;const n=In(),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??((d=(u=n.locale)==null?void 0:u.options)==null?void 0:d.firstWeekContainsDate)??1,o=ul(e,t),a=ye((t==null?void 0:t.in)||e,0);return a.setFullYear(o,0,r),a.setHours(0,0,0,0),Gt(a,t)}function dl(e,t){const n=ie(e,t==null?void 0:t.in),r=+Gt(n,t)-+Zy(n,t);return Math.round(r/tl)+1}function se(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const dt={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return se(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):se(n+1,2)},d(e,t){return se(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 se(e.getHours()%12||12,t.length)},H(e,t){return se(e.getHours(),t.length)},m(e,t){return se(e.getMinutes(),t.length)},s(e,t){return se(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),o=Math.trunc(r*Math.pow(10,n-3));return se(o,t.length)}},Ft={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Rs={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 dt.y(e,t)},Y:function(e,t,n,r){const o=ul(e,r),a=o>0?o:1-o;if(t==="YY"){const i=a%100;return se(i,2)}return t==="Yo"?n.ordinalNumber(a,{unit:"year"}):se(a,t.length)},R:function(e,t){const n=ol(e);return se(n,t.length)},u:function(e,t){const n=e.getFullYear();return se(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 se(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 se(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 dt.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 se(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=dl(e,r);return t==="wo"?n.ordinalNumber(o,{unit:"week"}):se(o,t.length)},I:function(e,t,n){const r=ll(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):se(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):dt.d(e,t)},D:function(e,t,n){const r=Xy(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):se(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 se(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 se(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 se(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=Ft.noon:r===0?o=Ft.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=Ft.evening:r>=12?o=Ft.afternoon:r>=4?o=Ft.morning:o=Ft.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 dt.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):dt.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):se(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):se(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):dt.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):dt.s(e,t)},S:function(e,t){return dt.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return ks(r);case"XXXX":case"XX":return St(r);case"XXXXX":case"XXX":default:return St(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return ks(r);case"xxxx":case"xx":return St(r);case"xxxxx":case"xxx":default:return St(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+Ps(r,":");case"OOOO":default:return"GMT"+St(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+Ps(r,":");case"zzzz":default:return"GMT"+St(r,":")}},t:function(e,t,n){const r=Math.trunc(+e/1e3);return se(r,t.length)},T:function(e,t,n){return se(+e,t.length)}};function Ps(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+se(a,2)}function ks(e,t){return e%60===0?(e>0?"-":"+")+se(Math.abs(e)/60,2):St(e,t)}function St(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=se(Math.trunc(r/60),2),a=se(r%60,2);return n+o+t+a}const Os=(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"})}},fl=(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"})}},Qy=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return Os(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}}",Os(r,t)).replace("{{time}}",fl(o,t))},Jy={p:fl,P:Qy},eb=/^D+$/,tb=/^Y+$/,nb=["D","DD","YY","YYYY"];function rb(e){return eb.test(e)}function ob(e){return tb.test(e)}function ab(e,t,n){const r=sb(e,t,n);if(console.warn(r),nb.includes(e))throw new RangeError(r)}function sb(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 ib=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,cb=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,lb=/^'([^]*?)'?$/,ub=/''/g,db=/[a-zA-Z]/;function hn(e,t,n){var d,m,p,h,y,g,v,b;const r=In(),o=(n==null?void 0:n.locale)??r.locale??va,a=(n==null?void 0:n.firstWeekContainsDate)??((m=(d=n==null?void 0:n.locale)==null?void 0:d.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??((b=(v=r.locale)==null?void 0:v.options)==null?void 0:b.weekStartsOn)??0,s=ie(e,n==null?void 0:n.in);if(!uy(s))throw new RangeError("Invalid time value");let c=t.match(cb).map(x=>{const w=x[0];if(w==="p"||w==="P"){const S=Jy[w];return S(x,o.formatLong)}return x}).join("").match(ib).map(x=>{if(x==="''")return{isToken:!1,value:"'"};const w=x[0];if(w==="'")return{isToken:!1,value:fb(x)};if(Rs[w])return{isToken:!0,value:x};if(w.match(db))throw new RangeError("Format string contains an unescaped latin alphabet character `"+w+"`");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 w=x.value;(!(n!=null&&n.useAdditionalWeekYearTokens)&&ob(w)||!(n!=null&&n.useAdditionalDayOfYearTokens)&&rb(w))&&ab(w,t,String(e));const S=Rs[w[0]];return S(s,w,o.localize,u)}).join("")}function fb(e){const t=e.match(lb);return t?t[1].replace(ub,"'"):e}function mb(e,t){const n=ie(e,t==null?void 0:t.in),r=n.getFullYear(),o=n.getMonth(),a=ye(n,0);return a.setFullYear(r,o+1,0),a.setHours(0,0,0,0),a.getDate()}function pb(e,t){return ie(e,t==null?void 0:t.in).getMonth()}function hb(e,t){return ie(e,t==null?void 0:t.in).getFullYear()}function gb(e,t){return+ie(e)>+ie(t)}function vb(e,t){return+ie(e)<+ie(t)}function yb(e,t,n){const[r,o]=en(n==null?void 0:n.in,e,t);return r.getFullYear()===o.getFullYear()&&r.getMonth()===o.getMonth()}function bb(e,t,n){const[r,o]=en(n==null?void 0:n.in,e,t);return r.getFullYear()===o.getFullYear()}function xb(e,t,n){const r=ie(e,n==null?void 0:n.in),o=r.getFullYear(),a=r.getDate(),i=ye(e,0);i.setFullYear(o,t,15),i.setHours(0,0,0,0);const s=mb(i);return r.setMonth(t,Math.min(a,s)),r}function wb(e,t,n){const r=ie(e,n==null?void 0:n.in);return isNaN(+r)?ye(e,NaN):(r.setFullYear(t),r)}const Ds=5,Cb=4;function Sb(e,t){const n=t.startOfMonth(e),r=n.getDay()>0?n.getDay():7,o=t.addDays(e,-r+1),a=t.addDays(o,Ds*7-1);return t.getMonth(e)===t.getMonth(a)?Ds:Cb}function ml(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 Eb(e,t){const n=ml(e,t),r=Sb(e,t);return t.addDays(n,r*7-1)}class it{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):nl(r,o)},this.addMonths=(r,o)=>{var a;return(a=this.overrides)!=null&&a.addMonths?this.overrides.addMonths(r,o):rl(r,o)},this.addWeeks=(r,o)=>{var a;return(a=this.overrides)!=null&&a.addWeeks?this.overrides.addWeeks(r,o):ay(r,o)},this.addYears=(r,o)=>{var a;return(a=this.overrides)!=null&&a.addYears?this.overrides.addYears(r,o):sy(r,o)},this.differenceInCalendarDays=(r,o)=>{var a;return(a=this.overrides)!=null&&a.differenceInCalendarDays?this.overrides.differenceInCalendarDays(r,o):al(r,o)},this.differenceInCalendarMonths=(r,o)=>{var a;return(a=this.overrides)!=null&&a.differenceInCalendarMonths?this.overrides.differenceInCalendarMonths(r,o):dy(r,o)},this.eachMonthOfInterval=r=>{var o;return(o=this.overrides)!=null&&o.eachMonthOfInterval?this.overrides.eachMonthOfInterval(r):py(r)},this.endOfBroadcastWeek=r=>{var o;return(o=this.overrides)!=null&&o.endOfBroadcastWeek?this.overrides.endOfBroadcastWeek(r):Eb(r,this)},this.endOfISOWeek=r=>{var o;return(o=this.overrides)!=null&&o.endOfISOWeek?this.overrides.endOfISOWeek(r):vy(r)},this.endOfMonth=r=>{var o;return(o=this.overrides)!=null&&o.endOfMonth?this.overrides.endOfMonth(r):fy(r)},this.endOfWeek=(r,o)=>{var a;return(a=this.overrides)!=null&&a.endOfWeek?this.overrides.endOfWeek(r,o):cl(r,this.options)},this.endOfYear=r=>{var o;return(o=this.overrides)!=null&&o.endOfYear?this.overrides.endOfYear(r):gy(r)},this.format=(r,o,a)=>{var s;const i=(s=this.overrides)!=null&&s.format?this.overrides.format(r,o,this.options):hn(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):ll(r)},this.getMonth=(r,o)=>{var a;return(a=this.overrides)!=null&&a.getMonth?this.overrides.getMonth(r,this.options):pb(r,this.options)},this.getYear=(r,o)=>{var a;return(a=this.overrides)!=null&&a.getYear?this.overrides.getYear(r,this.options):hb(r,this.options)},this.getWeek=(r,o)=>{var a;return(a=this.overrides)!=null&&a.getWeek?this.overrides.getWeek(r,this.options):dl(r,this.options)},this.isAfter=(r,o)=>{var a;return(a=this.overrides)!=null&&a.isAfter?this.overrides.isAfter(r,o):gb(r,o)},this.isBefore=(r,o)=>{var a;return(a=this.overrides)!=null&&a.isBefore?this.overrides.isBefore(r,o):vb(r,o)},this.isDate=r=>{var o;return(o=this.overrides)!=null&&o.isDate?this.overrides.isDate(r):sl(r)},this.isSameDay=(r,o)=>{var a;return(a=this.overrides)!=null&&a.isSameDay?this.overrides.isSameDay(r,o):ly(r,o)},this.isSameMonth=(r,o)=>{var a;return(a=this.overrides)!=null&&a.isSameMonth?this.overrides.isSameMonth(r,o):yb(r,o)},this.isSameYear=(r,o)=>{var a;return(a=this.overrides)!=null&&a.isSameYear?this.overrides.isSameYear(r,o):bb(r,o)},this.max=r=>{var o;return(o=this.overrides)!=null&&o.max?this.overrides.max(r):iy(r)},this.min=r=>{var o;return(o=this.overrides)!=null&&o.min?this.overrides.min(r):cy(r)},this.setMonth=(r,o)=>{var a;return(a=this.overrides)!=null&&a.setMonth?this.overrides.setMonth(r,o):xb(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):ml(r,this)},this.startOfDay=r=>{var o;return(o=this.overrides)!=null&&o.startOfDay?this.overrides.startOfDay(r):xn(r)},this.startOfISOWeek=r=>{var o;return(o=this.overrides)!=null&&o.startOfISOWeek?this.overrides.startOfISOWeek(r):bn(r)},this.startOfMonth=r=>{var o;return(o=this.overrides)!=null&&o.startOfMonth?this.overrides.startOfMonth(r):hy(r)},this.startOfWeek=(r,o)=>{var a;return(a=this.overrides)!=null&&a.startOfWeek?this.overrides.startOfWeek(r,this.options):Gt(r,this.options)},this.startOfYear=r=>{var o;return(o=this.overrides)!=null&&o.startOfYear?this.overrides.startOfYear(r):il(r)},this.options={locale:va,...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 Qe=new it;class pl{constructor(t,n,r=Qe){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 Nb{constructor(t,n){this.date=t,this.weeks=n}}class Mb{constructor(t,n){this.days=n,this.weekNumber=t}}function rt(e,t,n=!1,r=Qe){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 hl(e){return!!(e&&typeof e=="object"&&"before"in e&&"after"in e)}function ya(e){return!!(e&&typeof e=="object"&&"from"in e)}function gl(e){return!!(e&&typeof e=="object"&&"after"in e)}function vl(e){return!!(e&&typeof e=="object"&&"before"in e)}function yl(e){return!!(e&&typeof e=="object"&&"dayOfWeek"in e)}function bl(e,t){return Array.isArray(e)&&e.every(t.isDate)}function ot(e,t,n=Qe){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(bl(s,n))return s.includes(e);if(ya(s))return rt(s,e,!1,n);if(yl(s))return Array.isArray(s.dayOfWeek)?s.dayOfWeek.includes(e.getDay()):s.dayOfWeek===e.getDay();if(hl(s)){const c=a(s.before,e),u=a(s.after,e),d=c>0,m=u<0;return i(s.before,s.after)?m&&d:d||m}return gl(s)?a(e,s.after)>0:vl(s)?a(s.before,e)>0:typeof s=="function"?s(e):!1})}function Rb(e,t,n){const{disabled:r,hidden:o,modifiers:a,showOutsideDays:i,broadcastCalendar:s,today:c}=t,{isSameDay:u,isSameMonth:d,startOfMonth:m,isBefore:p,endOfMonth:h,isAfter:y}=n,g=t.startMonth&&m(t.startMonth),v=t.endMonth&&h(t.endMonth),b={[me.focused]:[],[me.outside]:[],[me.disabled]:[],[me.hidden]:[],[me.today]:[]},x={};for(const w of e){const{date:S,displayMonth:C}=w,M=!!(C&&!d(S,C)),N=!!(g&&p(S,g)),P=!!(v&&y(S,v)),F=!!(r&&ot(S,r,n)),_=!!(o&&ot(S,o,n))||N||P||!s&&!i&&M||s&&i===!1&&M,$=u(S,c??n.today());M&&b.outside.push(w),F&&b.disabled.push(w),_&&b.hidden.push(w),$&&b.today.push(w),a&&Object.keys(a).forEach(A=>{const B=a==null?void 0:a[A];B&&ot(S,B,n)&&(x[A]?x[A].push(w):x[A]=[w])})}return w=>{const S={[me.focused]:!1,[me.disabled]:!1,[me.hidden]:!1,[me.outside]:!1,[me.today]:!1},C={};for(const M in b){const N=b[M];S[M]=N.some(P=>P===w)}for(const M in x)C[M]=x[M].some(N=>N===w);return{...S,...C}}}function Pb(e,t,n={}){return Object.entries(e).filter(([,o])=>o===!0).reduce((o,[a])=>(n[a]?o.push(n[a]):t[me[a]]?o.push(t[me[a]]):t[Fe[a]]&&o.push(t[Fe[a]]),o),[t[H.Day]])}function kb(e){return E.createElement("button",{...e})}function Ob(e){return E.createElement("span",{...e})}function Db(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 Ab(e){const{day:t,modifiers:n,...r}=e;return E.createElement("td",{...r})}function Tb(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 Ib(e){const{options:t,className:n,components:r,classNames:o,...a}=e,i=[o[H.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[H.DropdownRoot]},E.createElement(r.Select,{className:i,...a},t==null?void 0:t.map(({value:c,label:u,disabled:d})=>E.createElement(r.Option,{key:c,value:c,disabled:d},u))),E.createElement("span",{className:o[H.CaptionLabel],"aria-hidden":!0},s==null?void 0:s.label,E.createElement(r.Chevron,{orientation:"down",size:18,className:o[H.Chevron]})))}function _b(e){return E.createElement("div",{...e})}function jb(e){return E.createElement("div",{...e})}function Fb(e){const{calendarMonth:t,displayIndex:n,...r}=e;return E.createElement("div",{...r},e.children)}function $b(e){const{calendarMonth:t,displayIndex:n,...r}=e;return E.createElement("div",{...r})}function Lb(e){return E.createElement("table",{...e})}function Wb(e){return E.createElement("div",{...e})}const xl=E.createContext(void 0);function _n(){const e=E.useContext(xl);if(e===void 0)throw new Error("useDayPicker() must be used within a custom component.");return e}function Bb(e){const{components:t}=_n();return E.createElement(t.Dropdown,{...e})}function Vb(e){const{onPreviousClick:t,onNextClick:n,previousMonth:r,nextMonth:o,...a}=e,{components:i,classNames:s,labels:{labelPrevious:c,labelNext:u}}=_n(),d=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[H.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[H.Chevron],orientation:"left"})),E.createElement(i.NextMonthButton,{type:"button",className:s[H.NextMonthButton],tabIndex:o?void 0:-1,"aria-disabled":o?void 0:!0,"aria-label":u(o),onClick:d},E.createElement(i.Chevron,{disabled:o?void 0:!0,orientation:"right",className:s[H.Chevron]})))}function Yb(e){const{components:t}=_n();return E.createElement(t.Button,{...e})}function Hb(e){return E.createElement("option",{...e})}function Gb(e){const{components:t}=_n();return E.createElement(t.Button,{...e})}function zb(e){const{rootRef:t,...n}=e;return E.createElement("div",{...n,ref:t})}function Ub(e){return E.createElement("select",{...e})}function Kb(e){const{week:t,...n}=e;return E.createElement("tr",{...n})}function qb(e){return E.createElement("th",{...e})}function Xb(e){return E.createElement("thead",{"aria-hidden":!0},E.createElement("tr",{...e}))}function Zb(e){const{week:t,...n}=e;return E.createElement("th",{...n})}function Qb(e){return E.createElement("th",{...e})}function Jb(e){return E.createElement("tbody",{...e})}function ex(e){const{components:t}=_n();return E.createElement(t.Dropdown,{...e})}const tx=Object.freeze(Object.defineProperty({__proto__:null,Button:kb,CaptionLabel:Ob,Chevron:Db,Day:Ab,DayButton:Tb,Dropdown:Ib,DropdownNav:_b,Footer:jb,Month:Fb,MonthCaption:$b,MonthGrid:Lb,Months:Wb,MonthsDropdown:Bb,Nav:Vb,NextMonthButton:Yb,Option:Hb,PreviousMonthButton:Gb,Root:zb,Select:Ub,Week:Kb,WeekNumber:Zb,WeekNumberHeader:Qb,Weekday:qb,Weekdays:Xb,Weeks:Jb,YearsDropdown:ex},Symbol.toStringTag,{value:"Module"}));function nx(e){return{...tx,...e}}function rx(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 ox(){const e={};for(const t in H)e[H[t]]=`rdp-${H[t]}`;for(const t in me)e[me[t]]=`rdp-${me[t]}`;for(const t in Fe)e[Fe[t]]=`rdp-${Fe[t]}`;for(const t in Me)e[Me[t]]=`rdp-${Me[t]}`;return e}function wl(e,t,n){return(n??new it(t)).format(e,"LLLL y")}const ax=wl;function sx(e,t,n){return(n??new it(t)).format(e,"d")}function ix(e,t=Qe){return t.format(e,"LLLL")}function cx(e,t=Qe){return e<10?t.formatNumber(`0${e.toLocaleString()}`):t.formatNumber(`${e.toLocaleString()}`)}function lx(){return""}function ux(e,t,n){return(n??new it(t)).format(e,"cccccc")}function Cl(e,t=Qe){return t.format(e,"yyyy")}const dx=Cl,fx=Object.freeze(Object.defineProperty({__proto__:null,formatCaption:wl,formatDay:sx,formatMonthCaption:ax,formatMonthDropdown:ix,formatWeekNumber:cx,formatWeekNumberHeader:lx,formatWeekdayName:ux,formatYearCaption:dx,formatYearDropdown:Cl},Symbol.toStringTag,{value:"Module"}));function mx(e){return e!=null&&e.formatMonthCaption&&!e.formatCaption&&(e.formatCaption=e.formatMonthCaption),e!=null&&e.formatYearCaption&&!e.formatYearDropdown&&(e.formatYearDropdown=e.formatYearCaption),{...fx,...e}}function px(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 hx(e,t={},n={}){let r={...t==null?void 0:t[H.Day]};return Object.entries(e).filter(([,o])=>o===!0).forEach(([o])=>{r={...r,...n==null?void 0:n[o]}}),r}function gx(e,t,n){const r=e.today(),o=t?e.startOfISOWeek(r):e.startOfWeek(r),a=[];for(let i=0;i<7;i++){const s=e.addDays(o,i);a.push(s)}return a}function vx(e,t,n,r){if(!e||!t)return;const{startOfYear:o,endOfYear:a,addYears:i,getYear:s,isBefore:c,isSameYear:u}=r,d=o(e),m=a(t),p=[];let h=d;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 Sl(e,t,n){return(n??new it(t)).format(e,"LLLL y")}const yx=Sl;function bx(e,t,n,r){let o=(r??new it(n)).format(e,"PPPP");return t!=null&&t.today&&(o=`Today, ${o}`),o}function El(e,t,n,r){let o=(r??new it(n)).format(e,"PPPP");return t.today&&(o=`Today, ${o}`),t.selected&&(o=`${o}, selected`),o}const xx=El;function wx(){return""}function Cx(e){return"Choose the Month"}function Sx(e){return"Go to the Next Month"}function Ex(e){return"Go to the Previous Month"}function Nx(e,t,n){return(n??new it(t)).format(e,"cccc")}function Mx(e,t){return`Week ${e}`}function Rx(e){return"Week Number"}function Px(e){return"Choose the Year"}const kx=Object.freeze(Object.defineProperty({__proto__:null,labelCaption:yx,labelDay:xx,labelDayButton:El,labelGrid:Sl,labelGridcell:bx,labelMonthDropdown:Cx,labelNav:wx,labelNext:Sx,labelPrevious:Ex,labelWeekNumber:Mx,labelWeekNumberHeader:Rx,labelWeekday:Nx,labelYearDropdown:Px},Symbol.toStringTag,{value:"Module"})),jn=e=>e instanceof HTMLElement?e:null,lo=e=>[...e.querySelectorAll("[data-animated-month]")??[]],Ox=e=>jn(e.querySelector("[data-animated-month]")),uo=e=>jn(e.querySelector("[data-animated-caption]")),fo=e=>jn(e.querySelector("[data-animated-weeks]")),Dx=e=>jn(e.querySelector("[data-animated-nav]")),Ax=e=>jn(e.querySelector("[data-animated-weekdays]"));function Tx(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 d=a.isSameMonth(r[0].date,u[0].date),m=a.isAfter(r[0].date,u[0].date),p=m?n[Me.caption_after_enter]:n[Me.caption_before_enter],h=m?n[Me.weeks_after_enter]:n[Me.weeks_before_enter],y=i.current,g=e.current.cloneNode(!0);if(g instanceof HTMLElement?(lo(g).forEach(w=>{if(!(w instanceof HTMLElement))return;const S=Ox(w);S&&w.contains(S)&&w.removeChild(S);const C=uo(w);C&&C.classList.remove(p);const M=fo(w);M&&M.classList.remove(h)}),i.current=g):i.current=null,c.current||d||o)return;const v=y instanceof HTMLElement?lo(y):[],b=lo(e.current);if(b&&b.every(x=>x instanceof HTMLElement)&&v&&v.every(x=>x instanceof HTMLElement)){c.current=!0,e.current.style.isolation="isolate";const x=Dx(e.current);x&&(x.style.zIndex="1"),b.forEach((w,S)=>{const C=v[S];if(!C)return;w.style.position="relative",w.style.overflow="hidden";const M=uo(w);M&&M.classList.add(p);const N=fo(w);N&&N.classList.add(h);const P=()=>{c.current=!1,e.current&&(e.current.style.isolation=""),x&&(x.style.zIndex=""),M&&M.classList.remove(p),N&&N.classList.remove(h),w.style.position="",w.style.overflow="",w.contains(C)&&w.removeChild(C)};C.style.pointerEvents="none",C.style.position="absolute",C.style.overflow="hidden",C.setAttribute("aria-hidden","true");const F=Ax(C);F&&(F.style.opacity="0");const _=uo(C);_&&(_.classList.add(m?n[Me.caption_before_exit]:n[Me.caption_after_exit]),_.addEventListener("animationend",P));const $=fo(C);$&&$.classList.add(m?n[Me.weeks_before_exit]:n[Me.weeks_after_exit]),w.insertBefore(C,w.firstChild)})}})}function Ix(e,t,n,r){const o=e[0],a=e[e.length-1],{ISOWeek:i,fixedWeeks:s,broadcastCalendar:c}=n??{},{addDays:u,differenceInCalendarDays:d,differenceInCalendarMonths:m,endOfBroadcastWeek:p,endOfISOWeek:h,endOfMonth:y,endOfWeek:g,isAfter:v,startOfBroadcastWeek:b,startOfISOWeek:x,startOfWeek:w}=r,S=c?b(o,r):i?x(o):w(o),C=c?p(a):i?h(y(a)):g(y(a)),M=d(C,S),N=m(a,o)+1,P=[];for(let $=0;$<=M;$++){const A=u(S,$);if(t&&v(A,t))break;P.push(A)}const _=(c?35:42)*N;if(s&&P.length<_){const $=_-P.length;for(let A=0;A<$;A++){const B=u(P[P.length-1],1);P.push(B)}}return P}function _x(e){const t=[];return e.reduce((n,r)=>{const o=r.weeks.reduce((a,i)=>[...a,...i.days],t);return[...n,...o]},t)}function jx(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 As(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:d,startOfMonth:m}=t;if(i&&u(i,c)<0){const p=-1*(a-1);c=d(i,p)}return s&&u(c,s)<0&&(c=s),m(c)}function Fx(e,t,n,r){const{addDays:o,endOfBroadcastWeek:a,endOfISOWeek:i,endOfMonth:s,endOfWeek:c,getISOWeek:u,getWeek:d,startOfBroadcastWeek:m,startOfISOWeek:p,startOfWeek:h}=r,y=e.reduce((g,v)=>{const b=n.broadcastCalendar?m(v,r):n.ISOWeek?p(v):h(v),x=n.broadcastCalendar?a(v):n.ISOWeek?i(s(v)):c(s(v)),w=t.filter(N=>N>=b&&N<=x),S=n.broadcastCalendar?35:42;if(n.fixedWeeks&&w.length<S){const N=t.filter(P=>{const F=S-w.length;return P>x&&P<=o(x,F)});w.push(...N)}const C=w.reduce((N,P)=>{const F=n.ISOWeek?u(P):d(P),_=N.find(A=>A.weekNumber===F),$=new pl(P,v,r);return _?_.days.push($):N.push(new Mb(F,[$])),N},[]),M=new Nb(v,C);return g.push(M),g},[]);return n.reverseMonths?y.reverse():y}function $x(e,t){let{startMonth:n,endMonth:r}=e;const{startOfYear:o,startOfDay:a,startOfMonth:i,endOfMonth:s,addYears:c,endOfYear:u,newDate:d,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=d(h,11,31));const v=e.captionLayout==="dropdown"||e.captionLayout==="dropdown-years";return n?n=i(n):p?n=d(p,0,1):!n&&v&&(n=o(c(e.today??m(),-100))),r?r=s(r):h?r=d(h,11,31):!r&&v&&(r=u(e.today??m())),[n&&a(n),r&&a(r)]}function Lx(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,d=i(e);if(!t)return s(d,u);if(!(c(t,e)<a))return s(d,u)}function Wx(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,d=i(e);if(!t)return s(d,-u);if(!(c(d,t)<=0))return s(d,-u)}function Bx(e){const t=[];return e.reduce((n,r)=>[...n,...r.weeks],t)}function kr(e,t){const[n,r]=E.useState(e);return[t===void 0?n:t,r]}function Vx(e,t){const[n,r]=$x(e,t),{startOfMonth:o,endOfMonth:a}=t,i=As(e,t),[s,c]=kr(i,e.month?i:void 0);E.useEffect(()=>{const M=As(e,t);c(M)},[e.timeZone]);const u=jx(s,r,e,t),d=Ix(u,e.endMonth?a(e.endMonth):void 0,e,t),m=Fx(u,d,e,t),p=Bx(m),h=_x(m),y=Wx(s,n,e,t),g=Lx(s,r,e,t),{disableNavigation:v,onMonthChange:b}=e,x=M=>p.some(N=>N.days.some(P=>P.isEqualTo(M))),w=M=>{if(v)return;let N=o(M);n&&N<o(n)&&(N=o(n)),r&&N>o(r)&&(N=o(r)),c(N),b==null||b(N)};return{months:m,weeks:p,days:h,navStart:n,navEnd:r,previousMonth:y,nextMonth:g,goToMonth:w,goToDay:M=>{x(M)||w(M.date)}}}var He;(function(e){e[e.Today=0]="Today",e[e.Selected=1]="Selected",e[e.LastFocused=2]="LastFocused",e[e.FocusedModifier=3]="FocusedModifier"})(He||(He={}));function Ts(e){return!e[me.disabled]&&!e[me.hidden]&&!e[me.outside]}function Yx(e,t,n,r){let o,a=-1;for(const i of e){const s=t(i);Ts(s)&&(s[me.focused]&&a<He.FocusedModifier?(o=i,a=He.FocusedModifier):r!=null&&r.isEqualTo(i)&&a<He.LastFocused?(o=i,a=He.LastFocused):n(i.date)&&a<He.Selected?(o=i,a=He.Selected):s[me.today]&&a<He.Today&&(o=i,a=He.Today))}return o||(o=e.find(i=>Ts(t(i)))),o}function Hx(e,t,n,r,o,a,i){const{ISOWeek:s,broadcastCalendar:c}=a,{addDays:u,addMonths:d,addWeeks:m,addYears:p,endOfBroadcastWeek:h,endOfISOWeek:y,endOfWeek:g,max:v,min:b,startOfBroadcastWeek:x,startOfISOWeek:w,startOfWeek:S}=i;let M={day:u,week:m,month:d,year:p,startOfWeek:N=>c?x(N,i):s?w(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=b([o,M])),M}function Nl(e,t,n,r,o,a,i,s=0){if(s>365)return;const c=Hx(e,t,n.date,r,o,a,i),u=!!(a.disabled&&ot(c,a.disabled,i)),d=!!(a.hidden&&ot(c,a.hidden,i)),m=c,p=new pl(c,m,i);return!u&&!d?p:Nl(e,t,p,r,o,a,i,s+1)}function Gx(e,t,n,r,o){const{autoFocus:a}=e,[i,s]=E.useState(),c=Yx(t.days,n,r||(()=>!1),i),[u,d]=E.useState(a?c:void 0);return{isFocusTarget:g=>!!(c!=null&&c.isEqualTo(g)),setFocused:d,focused:u,blur:()=>{s(u),d(void 0)},moveFocus:(g,v)=>{if(!u)return;const b=Nl(g,v,u,t.navStart,t.navEnd,e,o);b&&(t.goToDay(b),d(b))}}}function zx(e,t){const{selected:n,required:r,onSelect:o}=e,[a,i]=kr(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:d,max:m}=e;return{selected:s,select:(h,y,g)=>{let v=[...s??[]];if(u(h)){if((s==null?void 0:s.length)===d||r&&(s==null?void 0:s.length)===1)return;v=s==null?void 0:s.filter(b=>!c(b,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 Ux(e,t,n=0,r=0,o=!1,a=Qe){const{from:i,to:s}=t||{},{isSameDay:c,isAfter:u,isBefore:d}=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:d(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(d(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 Kx(e,t,n=Qe){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 Is(e,t,n=Qe){return rt(e,t.from,!1,n)||rt(e,t.to,!1,n)||rt(t,e.from,!1,n)||rt(t,e.to,!1,n)}function qx(e,t,n=Qe){const r=Array.isArray(t)?t:[t];if(r.filter(s=>typeof s!="function").some(s=>typeof s=="boolean"?s:n.isDate(s)?rt(e,s,!1,n):bl(s,n)?s.some(c=>rt(e,c,!1,n)):ya(s)?s.from&&s.to?Is(e,{from:s.from,to:s.to},n):!1:yl(s)?Kx(e,s.dayOfWeek,n):hl(s)?n.isAfter(s.before,s.after)?Is(e,{from:n.addDays(s.after,1),to:n.addDays(s.before,-1)},n):ot(e.from,s,n)||ot(e.to,s,n):gl(s)||vl(s)?ot(e.from,s,n)||ot(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(d=>d(s)))return!0;s=n.addDays(s,1)}}return!1}function Xx(e,t){const{disabled:n,excludeDisabled:r,selected:o,required:a,onSelect:i}=e,[s,c]=kr(o,i?o:void 0),u=i?o:s;return{selected:u,select:(p,h,y)=>{const{min:g,max:v}=e,b=p?Ux(p,u,g,v,a,t):void 0;return r&&n&&(b!=null&&b.from)&&b.to&&qx({from:b.from,to:b.to},n,t)&&(b.from=p,b.to=void 0),i||c(b),i==null||i(b,p,h,y),b},isSelected:p=>u&&rt(u,p,!1,t)}}function Zx(e,t){const{selected:n,required:r,onSelect:o}=e,[a,i]=kr(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 Qx(e,t){const n=Zx(e,t),r=zx(e,t),o=Xx(e,t);switch(e.mode){case"single":return n;case"multiple":return r;case"range":return o;default:return}}function Jx(e){var Ya;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=(Ya=t.selected)==null?void 0:Ya.map(ne=>new we(ne,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 ne={...va,...t.locale};return{dateLib:new it({locale:ne,weekStartsOn:t.broadcastCalendar?1:t.weekStartsOn,firstWeekContainsDate:t.firstWeekContainsDate,useAdditionalWeekYearTokens:t.useAdditionalWeekYearTokens,useAdditionalDayOfYearTokens:t.useAdditionalDayOfYearTokens,timeZone:t.timeZone,numerals:t.numerals},t.dateLib),components:nx(t.components),formatters:mx(t.formatters),labels:{...kx,...t.labels},locale:ne,classNames:{...ox(),...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:d,numberOfMonths:m=1,onDayBlur:p,onDayClick:h,onDayFocus:y,onDayKeyDown:g,onDayMouseEnter:v,onDayMouseLeave:b,onNextClick:x,onPrevClick:w,showWeekNumber:S,styles:C}=t,{formatCaption:M,formatDay:N,formatMonthDropdown:P,formatWeekNumber:F,formatWeekNumberHeader:_,formatWeekdayName:$,formatYearDropdown:A}=r,B=Vx(t,a),{days:Y,months:q,navStart:j,navEnd:G,previousMonth:I,nextMonth:D,goToMonth:Q}=B,J=Rb(Y,t,a),{isSelected:R,select:L,selected:z}=Qx(t,a)??{},{blur:W,focused:X,isFocusTarget:T,moveFocus:Z,setFocused:K}=Gx(t,B,J,R??(()=>!1),a),{labelDayButton:te,labelGridcell:re,labelGrid:oe,labelMonthDropdown:he,labelNav:be,labelPrevious:Je,labelNext:et,labelWeekday:tt,labelWeekNumber:on,labelWeekNumberHeader:Ie,labelYearDropdown:Lf}=o,Wf=E.useMemo(()=>gx(a,t.ISOWeek),[a,t.ISOWeek]),Ba=u!==void 0||h!==void 0,Hr=E.useCallback(()=>{I&&(Q(I),w==null||w(I))},[I,Q,w]),Gr=E.useCallback(()=>{D&&(Q(D),x==null||x(D))},[Q,D,x]),Bf=E.useCallback((ne,fe)=>ce=>{ce.preventDefault(),ce.stopPropagation(),K(ne),L==null||L(ne.date,fe,ce),h==null||h(ne.date,fe,ce)},[L,h,K]),Vf=E.useCallback((ne,fe)=>ce=>{K(ne),y==null||y(ne.date,fe,ce)},[y,K]),Yf=E.useCallback((ne,fe)=>ce=>{W(),p==null||p(ne.date,fe,ce)},[W,p]),Hf=E.useCallback((ne,fe)=>ce=>{const ct={ArrowLeft:["day",t.dir==="rtl"?"after":"before"],ArrowRight:["day",t.dir==="rtl"?"before":"after"],ArrowDown:["week","after"],ArrowUp:["week","before"],PageUp:[ce.shiftKey?"year":"month","before"],PageDown:[ce.shiftKey?"year":"month","after"],Home:["startOfWeek","before"],End:["endOfWeek","after"]};if(ct[ce.key]){ce.preventDefault(),ce.stopPropagation();const[_e,Vn]=ct[ce.key];Z(_e,Vn)}g==null||g(ne.date,fe,ce)},[Z,g,t.dir]),Gf=E.useCallback((ne,fe)=>ce=>{v==null||v(ne.date,fe,ce)},[v]),zf=E.useCallback((ne,fe)=>ce=>{b==null||b(ne.date,fe,ce)},[b]),Uf=E.useCallback(ne=>fe=>{const ce=Number(fe.target.value),ct=a.setMonth(a.startOfMonth(ne),ce);Q(ct)},[a,Q]),Kf=E.useCallback(ne=>fe=>{const ce=Number(fe.target.value),ct=a.setYear(a.startOfMonth(ne),ce);Q(ct)},[a,Q]),{className:qf,style:Xf}=E.useMemo(()=>({className:[s[H.Root],t.className].filter(Boolean).join(" "),style:{...C==null?void 0:C[H.Root],...t.style}}),[s,t.className,t.style,C]),Zf=rx(t),Va=E.useRef(null);Tx(Va,!!t.animate,{classNames:s,months:q,focused:X,dateLib:a});const Qf={dayPickerProps:t,selected:z,select:L,isSelected:R,months:q,nextMonth:D,previousMonth:I,goToMonth:Q,getModifiers:J,components:n,classNames:s,styles:C,labels:o,formatters:r};return E.createElement(xl.Provider,{value:Qf},E.createElement(n.Root,{rootRef:t.animate?Va:void 0,className:qf,style:Xf,dir:t.dir,id:t.id,lang:t.lang,nonce:t.nonce,title:t.title,role:t.role,"aria-label":t["aria-label"],...Zf},E.createElement(n.Months,{className:s[H.Months],style:C==null?void 0:C[H.Months]},!t.hideNavigation&&!d&&E.createElement(n.Nav,{"data-animated-nav":t.animate?"true":void 0,className:s[H.Nav],style:C==null?void 0:C[H.Nav],"aria-label":be(),onPreviousClick:Hr,onNextClick:Gr,previousMonth:I,nextMonth:D}),q.map((ne,fe)=>{const ce=px(ne.date,j,G,r,a),ct=vx(j,G,r,a);return E.createElement(n.Month,{"data-animated-month":t.animate?"true":void 0,className:s[H.Month],style:C==null?void 0:C[H.Month],key:fe,displayIndex:fe,calendarMonth:ne},d==="around"&&!t.hideNavigation&&fe===0&&E.createElement(n.PreviousMonthButton,{type:"button",className:s[H.PreviousMonthButton],tabIndex:I?void 0:-1,"aria-disabled":I?void 0:!0,"aria-label":Je(I),onClick:Hr,"data-animated-button":t.animate?"true":void 0},E.createElement(n.Chevron,{disabled:I?void 0:!0,className:s[H.Chevron],orientation:t.dir==="rtl"?"right":"left"})),E.createElement(n.MonthCaption,{"data-animated-caption":t.animate?"true":void 0,className:s[H.MonthCaption],style:C==null?void 0:C[H.MonthCaption],calendarMonth:ne,displayIndex:fe},c!=null&&c.startsWith("dropdown")?E.createElement(n.DropdownNav,{className:s[H.Dropdowns],style:C==null?void 0:C[H.Dropdowns]},c==="dropdown"||c==="dropdown-months"?E.createElement(n.MonthsDropdown,{className:s[H.MonthsDropdown],"aria-label":he(),classNames:s,components:n,disabled:!!t.disableNavigation,onChange:Uf(ne.date),options:ce,style:C==null?void 0:C[H.Dropdown],value:a.getMonth(ne.date)}):E.createElement("span",null,P(ne.date,a)),c==="dropdown"||c==="dropdown-years"?E.createElement(n.YearsDropdown,{className:s[H.YearsDropdown],"aria-label":Lf(a.options),classNames:s,components:n,disabled:!!t.disableNavigation,onChange:Kf(ne.date),options:ct,style:C==null?void 0:C[H.Dropdown],value:a.getYear(ne.date)}):E.createElement("span",null,A(ne.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(ne.date,a.options,a))):E.createElement(n.CaptionLabel,{className:s[H.CaptionLabel],role:"status","aria-live":"polite"},M(ne.date,a.options,a))),d==="around"&&!t.hideNavigation&&fe===m-1&&E.createElement(n.NextMonthButton,{type:"button",className:s[H.NextMonthButton],tabIndex:D?void 0:-1,"aria-disabled":D?void 0:!0,"aria-label":et(D),onClick:Gr,"data-animated-button":t.animate?"true":void 0},E.createElement(n.Chevron,{disabled:D?void 0:!0,className:s[H.Chevron],orientation:t.dir==="rtl"?"left":"right"})),fe===m-1&&d==="after"&&!t.hideNavigation&&E.createElement(n.Nav,{"data-animated-nav":t.animate?"true":void 0,className:s[H.Nav],style:C==null?void 0:C[H.Nav],"aria-label":be(),onPreviousClick:Hr,onNextClick:Gr,previousMonth:I,nextMonth:D}),E.createElement(n.MonthGrid,{role:"grid","aria-multiselectable":u==="multiple"||u==="range","aria-label":oe(ne.date,a.options,a)||void 0,className:s[H.MonthGrid],style:C==null?void 0:C[H.MonthGrid]},!t.hideWeekdays&&E.createElement(n.Weekdays,{"data-animated-weekdays":t.animate?"true":void 0,className:s[H.Weekdays],style:C==null?void 0:C[H.Weekdays]},S&&E.createElement(n.WeekNumberHeader,{"aria-label":Ie(a.options),className:s[H.WeekNumberHeader],style:C==null?void 0:C[H.WeekNumberHeader],scope:"col"},_()),Wf.map((_e,Vn)=>E.createElement(n.Weekday,{"aria-label":tt(_e,a.options,a),className:s[H.Weekday],key:Vn,style:C==null?void 0:C[H.Weekday],scope:"col"},$(_e,a.options,a)))),E.createElement(n.Weeks,{"data-animated-weeks":t.animate?"true":void 0,className:s[H.Weeks],style:C==null?void 0:C[H.Weeks]},ne.weeks.map((_e,Vn)=>E.createElement(n.Week,{className:s[H.Week],key:_e.weekNumber,style:C==null?void 0:C[H.Week],week:_e},S&&E.createElement(n.WeekNumber,{week:_e,style:C==null?void 0:C[H.WeekNumber],"aria-label":on(_e.weekNumber,{locale:i}),className:s[H.WeekNumber],scope:"row",role:"rowheader"},F(_e.weekNumber,a)),_e.days.map(xe=>{const{date:Ye}=xe,ae=J(xe);if(ae[me.focused]=!ae.hidden&&!!(X!=null&&X.isEqualTo(xe)),ae[Fe.selected]=(R==null?void 0:R(Ye))||ae.selected,ya(z)){const{from:zr,to:Ur}=z;ae[Fe.range_start]=!!(zr&&Ur&&a.isSameDay(Ye,zr)),ae[Fe.range_end]=!!(zr&&Ur&&a.isSameDay(Ye,Ur)),ae[Fe.range_middle]=rt(z,Ye,!0,a)}const Jf=hx(ae,C,t.modifiersStyles),em=Pb(ae,s,t.modifiersClassNames),tm=!Ba&&!ae.hidden?re(Ye,ae,a.options,a):void 0;return E.createElement(n.Day,{key:`${a.format(Ye,"yyyy-MM-dd")}_${a.format(xe.displayMonth,"yyyy-MM")}`,day:xe,modifiers:ae,className:em.join(" "),style:Jf,role:"gridcell","aria-selected":ae.selected||void 0,"aria-label":tm,"data-day":a.format(Ye,"yyyy-MM-dd"),"data-month":xe.outside?a.format(Ye,"yyyy-MM"):void 0,"data-selected":ae.selected||void 0,"data-disabled":ae.disabled||void 0,"data-hidden":ae.hidden||void 0,"data-outside":xe.outside||void 0,"data-focused":ae.focused||void 0,"data-today":ae.today||void 0},!ae.hidden&&Ba?E.createElement(n.DayButton,{className:s[H.DayButton],style:C==null?void 0:C[H.DayButton],type:"button",day:xe,modifiers:ae,disabled:ae.disabled||void 0,tabIndex:T(xe)?0:-1,"aria-label":te(Ye,ae,a.options,a),onClick:Bf(xe,ae),onBlur:Yf(xe,ae),onFocus:Vf(xe,ae),onKeyDown:Hf(xe,ae),onMouseEnter:Gf(xe,ae),onMouseLeave:zf(xe,ae)},N(Ye,a.options,a)):!ae.hidden&&N(xe.date,a.options,a))}))))))})),t.footer&&E.createElement(n.Footer,{className:s[H.Footer],style:C==null?void 0:C[H.Footer],role:"status","aria-live":"polite"},t.footer)))}const ew=()=>Array.from({length:12},(e,t)=>new Date(0,t).toLocaleString("en-US",{month:"long"})),tw=e=>{const{onSelect:t}=e,n=E.useRef(null);return E.useEffect(()=>{n.current&&n.current.focus()},[]),f.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
|
|
160
|
-
lg:grid-cols-3`,children:
|
|
161
|
-
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))})},
|
|
162
|
-
lg:grid-cols-4`,children:
|
|
163
|
-
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
|
|
158
|
+
aria-selected:bg-accent aria-selected:text-accent-foreground`,e),...t}));Cr.displayName=Ae.Item.displayName;const Sr=l.forwardRef(({className:e,...t},n)=>f.jsx(Ae.List,{ref:n,className:k("max-h-[20rem] overflow-y-auto overflow-x-hidden",e),...t}));Sr.displayName=Ae.List.displayName;const uc=({children:e="Loading...",...t})=>f.jsxs("div",{className:"flex items-center gap-2 px-3 py-2.5 text-sm text-muted-foreground",...t,children:[f.jsx(gi,{className:"h-4 w-4 animate-spin"}),e]});uc.displayName="CommandLoading";const zg=["top","right","bottom","left"],gt=Math.min,Re=Math.max,rr=Math.round,qn=Math.floor,Ue=e=>({x:e,y:e}),Ug={left:"right",right:"left",bottom:"top",top:"bottom"},Kg={start:"end",end:"start"};function So(e,t,n){return Re(e,gt(t,n))}function at(e,t){return typeof e=="function"?e(t):e}function st(e){return e.split("-")[0]}function qt(e){return e.split("-")[1]}function aa(e){return e==="x"?"y":"x"}function sa(e){return e==="y"?"height":"width"}function vt(e){return["top","bottom"].includes(st(e))?"y":"x"}function ia(e){return aa(vt(e))}function qg(e,t,n){n===void 0&&(n=!1);const r=qt(e),o=ia(e),a=sa(o);let i=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(i=or(i)),[i,or(i)]}function Xg(e){const t=or(e);return[Eo(e),t,Eo(t)]}function Eo(e){return e.replace(/start|end/g,t=>Kg[t])}function Zg(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 Qg(e,t,n,r){const o=qt(e);let a=Zg(st(e),n==="start",r);return o&&(a=a.map(i=>i+"-"+o),t&&(a=a.concat(a.map(Eo)))),a}function or(e){return e.replace(/left|right|bottom|top/g,t=>Ug[t])}function Jg(e){return{top:0,right:0,bottom:0,left:0,...e}}function dc(e){return typeof e!="number"?Jg(e):{top:e,right:e,bottom:e,left:e}}function ar(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 gs(e,t,n){let{reference:r,floating:o}=e;const a=vt(t),i=ia(t),s=sa(i),c=st(t),u=a==="y",d=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:d,y:r.y-o.height};break;case"bottom":h={x:d,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(qt(t)){case"start":h[i]-=p*(n&&u?-1:1);break;case"end":h[i]+=p*(n&&u?-1:1);break}return h}const ev=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:d,y:m}=gs(u,r,c),p=r,h={},y=0;for(let g=0;g<s.length;g++){const{name:v,fn:b}=s[g],{x,y:w,data:S,reset:C}=await b({x:d,y:m,initialPlacement:r,placement:p,strategy:o,middlewareData:h,rects:u,platform:i,elements:{reference:e,floating:t}});d=x??d,m=w??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:d,y:m}=gs(u,p,c)),g=-1)}return{x:d,y:m,placement:p,strategy:o,middlewareData:h}};async function vn(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:d="viewport",elementContext:m="floating",altBoundary:p=!1,padding:h=0}=at(t,e),y=dc(h),v=s[p?m==="floating"?"reference":"floating":m],b=ar(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:d,strategy:c})),x=m==="floating"?{x:r,y:o,width:i.floating.width,height:i.floating.height}:i.reference,w=await(a.getOffsetParent==null?void 0:a.getOffsetParent(s.floating)),S=await(a.isElement==null?void 0:a.isElement(w))?await(a.getScale==null?void 0:a.getScale(w))||{x:1,y:1}:{x:1,y:1},C=ar(a.convertOffsetParentRelativeRectToViewportRelativeRect?await a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:x,offsetParent:w,strategy:c}):x);return{top:(b.top-C.top+y.top)/S.y,bottom:(C.bottom-b.bottom+y.bottom)/S.y,left:(b.left-C.left+y.left)/S.x,right:(C.right-b.right+y.right)/S.x}}const tv=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:d=0}=at(e,t)||{};if(u==null)return{};const m=dc(d),p={x:n,y:r},h=ia(o),y=sa(h),g=await i.getDimensions(u),v=h==="y",b=v?"top":"left",x=v?"bottom":"right",w=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[w]:0;(!N||!await(i.isElement==null?void 0:i.isElement(M)))&&(N=s.floating[w]||a.floating[y]);const P=S/2-C/2,F=N/2-g[y]/2-1,_=gt(m[b],F),$=gt(m[x],F),I=_,B=N-g[y]-$,Y=N/2-g[y]/2+P,q=So(I,Y,B),j=!c.arrow&&qt(o)!=null&&Y!==q&&a.reference[y]/2-(Y<I?_:$)-g[y]/2<0,G=j?Y<I?Y-I:Y-B:0;return{[h]:p[h]+G,data:{[h]:q,centerOffset:Y-q-G,...j&&{alignmentOffset:G}},reset:j}}}),nv=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:d=!0,crossAxis:m=!0,fallbackPlacements:p,fallbackStrategy:h="bestFit",fallbackAxisSideDirection:y="none",flipAlignment:g=!0,...v}=at(e,t);if((n=a.arrow)!=null&&n.alignmentOffset)return{};const b=st(o),x=vt(s),w=st(s)===s,S=await(c.isRTL==null?void 0:c.isRTL(u.floating)),C=p||(w||!g?[or(s)]:Xg(s)),M=y!=="none";!p&&M&&C.push(...Qg(s,g,y,S));const N=[s,...C],P=await vn(t,v),F=[];let _=((r=a.flip)==null?void 0:r.overflows)||[];if(d&&F.push(P[b]),m){const Y=qg(o,i,S);F.push(P[Y[0]],P[Y[1]])}if(_=[..._,{placement:o,overflows:F}],!F.every(Y=>Y<=0)){var $,I;const Y=((($=a.flip)==null?void 0:$.index)||0)+1,q=N[Y];if(q)return{data:{index:Y,overflows:_},reset:{placement:q}};let j=(I=_.filter(G=>G.overflows[0]<=0).sort((G,T)=>G.overflows[1]-T.overflows[1])[0])==null?void 0:I.placement;if(!j)switch(h){case"bestFit":{var B;const G=(B=_.filter(T=>{if(M){const D=vt(T.placement);return D===x||D==="y"}return!0}).map(T=>[T.placement,T.overflows.filter(D=>D>0).reduce((D,Q)=>D+Q,0)]).sort((T,D)=>T[1]-D[1])[0])==null?void 0:B[0];G&&(j=G);break}case"initialPlacement":j=s;break}if(o!==j)return{reset:{placement:j}}}return{}}}};function vs(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function ys(e){return zg.some(t=>e[t]>=0)}const rv=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=at(e,t);switch(r){case"referenceHidden":{const a=await vn(t,{...o,elementContext:"reference"}),i=vs(a,n.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:ys(i)}}}case"escaped":{const a=await vn(t,{...o,altBoundary:!0}),i=vs(a,n.floating);return{data:{escapedOffsets:i,escaped:ys(i)}}}default:return{}}}}};async function ov(e,t){const{placement:n,platform:r,elements:o}=e,a=await(r.isRTL==null?void 0:r.isRTL(o.floating)),i=st(n),s=qt(n),c=vt(n)==="y",u=["left","top"].includes(i)?-1:1,d=a&&c?-1:1,m=at(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*d,y:p*u}:{x:p*u,y:h*d}}const av=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 ov(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}}}}},sv=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:b,y:x}=v;return{x:b,y:x}}},...c}=at(e,t),u={x:n,y:r},d=await vn(t,c),m=vt(st(o)),p=aa(m);let h=u[p],y=u[m];if(a){const v=p==="y"?"top":"left",b=p==="y"?"bottom":"right",x=h+d[v],w=h-d[b];h=So(x,h,w)}if(i){const v=m==="y"?"top":"left",b=m==="y"?"bottom":"right",x=y+d[v],w=y-d[b];y=So(x,y,w)}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}}}}}},iv=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}=at(e,t),d={x:n,y:r},m=vt(o),p=aa(m);let h=d[p],y=d[m];const g=at(s,t),v=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(c){const w=p==="y"?"height":"width",S=a.reference[p]-a.floating[w]+v.mainAxis,C=a.reference[p]+a.reference[w]-v.mainAxis;h<S?h=S:h>C&&(h=C)}if(u){var b,x;const w=p==="y"?"width":"height",S=["top","left"].includes(st(o)),C=a.reference[m]-a.floating[w]+(S&&((b=i.offset)==null?void 0:b[m])||0)+(S?0:v.crossAxis),M=a.reference[m]+a.reference[w]+(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}}}},cv=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}=at(e,t),d=await vn(t,u),m=st(o),p=qt(o),h=vt(o)==="y",{width:y,height:g}=a.floating;let v,b;m==="top"||m==="bottom"?(v=m,b=p===(await(i.isRTL==null?void 0:i.isRTL(s.floating))?"start":"end")?"left":"right"):(b=m,v=p==="end"?"top":"bottom");const x=g-d.top-d.bottom,w=y-d.left-d.right,S=gt(g-d[v],x),C=gt(y-d[b],w),M=!t.middlewareData.shift;let N=S,P=C;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(P=w),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(N=x),M&&!p){const _=Re(d.left,0),$=Re(d.right,0),I=Re(d.top,0),B=Re(d.bottom,0);h?P=y-2*(_!==0||$!==0?_+$:Re(d.left,d.right)):N=g-2*(I!==0||B!==0?I+B:Re(d.top,d.bottom))}await c({...t,availableWidth:P,availableHeight:N});const F=await i.getDimensions(s.floating);return y!==F.width||g!==F.height?{reset:{rects:!0}}:{}}}};function Er(){return typeof window<"u"}function Xt(e){return fc(e)?(e.nodeName||"").toLowerCase():"#document"}function Pe(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ze(e){var t;return(t=(fc(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function fc(e){return Er()?e instanceof Node||e instanceof Pe(e).Node:!1}function $e(e){return Er()?e instanceof Element||e instanceof Pe(e).Element:!1}function qe(e){return Er()?e instanceof HTMLElement||e instanceof Pe(e).HTMLElement:!1}function bs(e){return!Er()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Pe(e).ShadowRoot}function Dn(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Le(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function lv(e){return["table","td","th"].includes(Xt(e))}function Nr(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function ca(e){const t=la(),n=$e(e)?Le(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 uv(e){let t=yt(e);for(;qe(t)&&!Yt(t);){if(ca(t))return t;if(Nr(t))return null;t=yt(t)}return null}function la(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function Yt(e){return["html","body","#document"].includes(Xt(e))}function Le(e){return Pe(e).getComputedStyle(e)}function Mr(e){return $e(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function yt(e){if(Xt(e)==="html")return e;const t=e.assignedSlot||e.parentNode||bs(e)&&e.host||Ze(e);return bs(t)?t.host:t}function mc(e){const t=yt(e);return Yt(t)?e.ownerDocument?e.ownerDocument.body:e.body:qe(t)&&Dn(t)?t:mc(t)}function yn(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=mc(e),a=o===((r=e.ownerDocument)==null?void 0:r.body),i=Pe(o);if(a){const s=No(i);return t.concat(i,i.visualViewport||[],Dn(o)?o:[],s&&n?yn(s):[])}return t.concat(o,yn(o,[],n))}function No(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function pc(e){const t=Le(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=qe(e),a=o?e.offsetWidth:n,i=o?e.offsetHeight:r,s=rr(n)!==a||rr(r)!==i;return s&&(n=a,r=i),{width:n,height:r,$:s}}function ua(e){return $e(e)?e:e.contextElement}function Vt(e){const t=ua(e);if(!qe(t))return Ue(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:a}=pc(t);let i=(a?rr(n.width):n.width)/r,s=(a?rr(n.height):n.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!s||!Number.isFinite(s))&&(s=1),{x:i,y:s}}const dv=Ue(0);function hc(e){const t=Pe(e);return!la()||!t.visualViewport?dv:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function fv(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Pe(e)?!1:t}function Rt(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),a=ua(e);let i=Ue(1);t&&(r?$e(r)&&(i=Vt(r)):i=Vt(e));const s=fv(a,n,r)?hc(a):Ue(0);let c=(o.left+s.x)/i.x,u=(o.top+s.y)/i.y,d=o.width/i.x,m=o.height/i.y;if(a){const p=Pe(a),h=r&&$e(r)?Pe(r):r;let y=p,g=No(y);for(;g&&r&&h!==y;){const v=Vt(g),b=g.getBoundingClientRect(),x=Le(g),w=b.left+(g.clientLeft+parseFloat(x.paddingLeft))*v.x,S=b.top+(g.clientTop+parseFloat(x.paddingTop))*v.y;c*=v.x,u*=v.y,d*=v.x,m*=v.y,c+=w,u+=S,y=Pe(g),g=No(y)}}return ar({width:d,height:m,x:c,y:u})}function da(e,t){const n=Mr(e).scrollLeft;return t?t.left+n:Rt(Ze(e)).left+n}function gc(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),o=r.left+t.scrollLeft-(n?0:da(e,r)),a=r.top+t.scrollTop;return{x:o,y:a}}function mv(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const a=o==="fixed",i=Ze(r),s=t?Nr(t.floating):!1;if(r===i||s&&a)return n;let c={scrollLeft:0,scrollTop:0},u=Ue(1);const d=Ue(0),m=qe(r);if((m||!m&&!a)&&((Xt(r)!=="body"||Dn(i))&&(c=Mr(r)),qe(r))){const h=Rt(r);u=Vt(r),d.x=h.x+r.clientLeft,d.y=h.y+r.clientTop}const p=i&&!m&&!a?gc(i,c,!0):Ue(0);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-c.scrollLeft*u.x+d.x+p.x,y:n.y*u.y-c.scrollTop*u.y+d.y+p.y}}function pv(e){return Array.from(e.getClientRects())}function hv(e){const t=Ze(e),n=Mr(e),r=e.ownerDocument.body,o=Re(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=Re(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+da(e);const s=-n.scrollTop;return Le(r).direction==="rtl"&&(i+=Re(t.clientWidth,r.clientWidth)-o),{width:o,height:a,x:i,y:s}}function gv(e,t){const n=Pe(e),r=Ze(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=la();(!u||u&&t==="fixed")&&(s=o.offsetLeft,c=o.offsetTop)}return{width:a,height:i,x:s,y:c}}function vv(e,t){const n=Rt(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,a=qe(e)?Vt(e):Ue(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 xs(e,t,n){let r;if(t==="viewport")r=gv(e,n);else if(t==="document")r=hv(Ze(e));else if($e(t))r=vv(t,n);else{const o=hc(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return ar(r)}function vc(e,t){const n=yt(e);return n===t||!$e(n)||Yt(n)?!1:Le(n).position==="fixed"||vc(n,t)}function yv(e,t){const n=t.get(e);if(n)return n;let r=yn(e,[],!1).filter(s=>$e(s)&&Xt(s)!=="body"),o=null;const a=Le(e).position==="fixed";let i=a?yt(e):e;for(;$e(i)&&!Yt(i);){const s=Le(i),c=ca(i);!c&&s.position==="fixed"&&(o=null),(a?!c&&!o:!c&&s.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||Dn(i)&&!c&&vc(e,i))?r=r.filter(d=>d!==i):o=s,i=yt(i)}return t.set(e,r),r}function bv(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[...n==="clippingAncestors"?Nr(t)?[]:yv(t,this._c):[].concat(n),r],s=i[0],c=i.reduce((u,d)=>{const m=xs(t,d,o);return u.top=Re(m.top,u.top),u.right=gt(m.right,u.right),u.bottom=gt(m.bottom,u.bottom),u.left=Re(m.left,u.left),u},xs(t,s,o));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function xv(e){const{width:t,height:n}=pc(e);return{width:t,height:n}}function wv(e,t,n){const r=qe(t),o=Ze(t),a=n==="fixed",i=Rt(e,!0,a,t);let s={scrollLeft:0,scrollTop:0};const c=Ue(0);if(r||!r&&!a)if((Xt(t)!=="body"||Dn(o))&&(s=Mr(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=da(o));const u=o&&!r&&!a?gc(o,s):Ue(0),d=i.left+s.scrollLeft-c.x-u.x,m=i.top+s.scrollTop-c.y-u.y;return{x:d,y:m,width:i.width,height:i.height}}function ao(e){return Le(e).position==="static"}function ws(e,t){if(!qe(e)||Le(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Ze(e)===n&&(n=n.ownerDocument.body),n}function yc(e,t){const n=Pe(e);if(Nr(e))return n;if(!qe(e)){let o=yt(e);for(;o&&!Yt(o);){if($e(o)&&!ao(o))return o;o=yt(o)}return n}let r=ws(e,t);for(;r&&lv(r)&&ao(r);)r=ws(r,t);return r&&Yt(r)&&ao(r)&&!ca(r)?n:r||uv(e)||n}const Cv=async function(e){const t=this.getOffsetParent||yc,n=this.getDimensions,r=await n(e.floating);return{reference:wv(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function Sv(e){return Le(e).direction==="rtl"}const Ev={convertOffsetParentRelativeRectToViewportRelativeRect:mv,getDocumentElement:Ze,getClippingRect:bv,getOffsetParent:yc,getElementRects:Cv,getClientRects:pv,getDimensions:xv,getScale:Vt,isElement:$e,isRTL:Sv};function bc(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Nv(e,t){let n=null,r;const o=Ze(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:d,top:m,width:p,height:h}=u;if(s||t(),!p||!h)return;const y=qn(m),g=qn(o.clientWidth-(d+p)),v=qn(o.clientHeight-(m+h)),b=qn(d),w={rootMargin:-y+"px "+-g+"px "+-v+"px "+-b+"px",threshold:Re(0,gt(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&&!bc(u,e.getBoundingClientRect())&&i(),S=!1}try{n=new IntersectionObserver(C,{...w,root:o.ownerDocument})}catch{n=new IntersectionObserver(C,w)}n.observe(e)}return i(!0),a}function xc(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=ua(e),d=o||a?[...u?yn(u):[],...yn(t)]:[];d.forEach(b=>{o&&b.addEventListener("scroll",n,{passive:!0}),a&&b.addEventListener("resize",n)});const m=u&&s?Nv(u,n):null;let p=-1,h=null;i&&(h=new ResizeObserver(b=>{let[x]=b;x&&x.target===u&&h&&(h.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var w;(w=h)==null||w.observe(t)})),n()}),u&&!c&&h.observe(u),h.observe(t));let y,g=c?Rt(e):null;c&&v();function v(){const b=Rt(e);g&&!bc(g,b)&&n(),g=b,y=requestAnimationFrame(v)}return n(),()=>{var b;d.forEach(x=>{o&&x.removeEventListener("scroll",n),a&&x.removeEventListener("resize",n)}),m==null||m(),(b=h)==null||b.disconnect(),h=null,c&&cancelAnimationFrame(y)}}const Mv=av,Rv=sv,Pv=nv,kv=cv,Ov=rv,Cs=tv,Dv=iv,Iv=(e,t,n)=>{const r=new Map,o={platform:Ev,...n},a={...o.platform,_c:r};return ev(e,t,{...o,platform:a})};var er=typeof document<"u"?E.useLayoutEffect:E.useEffect;function sr(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(!sr(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)&&!sr(e[a],t[a]))return!1}return!0}return e!==e&&t!==t}function wc(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Ss(e,t){const n=wc(e);return Math.round(t*n)/n}function so(e){const t=l.useRef(e);return er(()=>{t.current=e}),t}function Cc(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,[d,m]=l.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,h]=l.useState(r);sr(p,r)||h(r);const[y,g]=l.useState(null),[v,b]=l.useState(null),x=l.useCallback(T=>{T!==M.current&&(M.current=T,g(T))},[]),w=l.useCallback(T=>{T!==N.current&&(N.current=T,b(T))},[]),S=a||y,C=i||v,M=l.useRef(null),N=l.useRef(null),P=l.useRef(d),F=c!=null,_=so(c),$=so(o),I=so(u),B=l.useCallback(()=>{if(!M.current||!N.current)return;const T={placement:t,strategy:n,middleware:p};$.current&&(T.platform=$.current),Iv(M.current,N.current,T).then(D=>{const Q={...D,isPositioned:I.current!==!1};Y.current&&!sr(P.current,Q)&&(P.current=Q,En.flushSync(()=>{m(Q)}))})},[p,t,n,$,I]);er(()=>{u===!1&&P.current.isPositioned&&(P.current.isPositioned=!1,m(T=>({...T,isPositioned:!1})))},[u]);const Y=l.useRef(!1);er(()=>(Y.current=!0,()=>{Y.current=!1}),[]),er(()=>{if(S&&(M.current=S),C&&(N.current=C),S&&C){if(_.current)return _.current(S,C,B);B()}},[S,C,B,_,F]);const q=l.useMemo(()=>({reference:M,floating:N,setReference:x,setFloating:w}),[x,w]),j=l.useMemo(()=>({reference:S,floating:C}),[S,C]),G=l.useMemo(()=>{const T={position:n,left:0,top:0};if(!j.floating)return T;const D=Ss(j.floating,d.x),Q=Ss(j.floating,d.y);return s?{...T,transform:"translate("+D+"px, "+Q+"px)",...wc(j.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:D,top:Q}},[n,s,j.floating,d.x,d.y]);return l.useMemo(()=>({...d,update:B,refs:q,elements:j,floatingStyles:G}),[d,B,q,j,G])}const Av=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?Cs({element:r.current,padding:o}).fn(n):{}:r?Cs({element:r,padding:o}).fn(n):{}}}},Sc=(e,t)=>({...Mv(e),options:[e,t]}),Ec=(e,t)=>({...Rv(e),options:[e,t]}),Nc=(e,t)=>({...Dv(e),options:[e,t]}),Mc=(e,t)=>({...Pv(e),options:[e,t]}),Rc=(e,t)=>({...kv(e),options:[e,t]}),Pc=(e,t)=>({...Ov(e),options:[e,t]}),kc=(e,t)=>({...Av(e),options:[e,t]});var Tv="Arrow",Oc=l.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...a}=e;return f.jsx(V.svg,{...a,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:f.jsx("polygon",{points:"0,0 30,0 15,10"})})});Oc.displayName=Tv;var _v=Oc;function In(e){const[t,n]=l.useState(void 0);return de(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const a=o[0];let 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 fa="Popper",[Dc,Zt]=ve(fa),[jv,Ic]=Dc(fa),Ac=e=>{const{__scopePopper:t,children:n}=e,[r,o]=l.useState(null);return f.jsx(jv,{scope:t,anchor:r,onAnchorChange:o,children:n})};Ac.displayName=fa;var Tc="PopperAnchor",_c=l.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,a=Ic(Tc,n),i=l.useRef(null),s=U(t,i);return l.useEffect(()=>{a.onAnchorChange((r==null?void 0:r.current)||i.current)}),r?null:f.jsx(V.div,{...o,ref:s})});_c.displayName=Tc;var ma="PopperContent",[Fv,$v]=Dc(ma),jc=l.forwardRef((e,t)=>{var A,Z,K,te,re,oe;const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:a="center",alignOffset:i=0,arrowPadding:s=0,avoidCollisions:c=!0,collisionBoundary:u=[],collisionPadding:d=0,sticky:m="partial",hideWhenDetached:p=!1,updatePositionStrategy:h="optimized",onPlaced:y,...g}=e,v=Ic(ma,n),[b,x]=l.useState(null),w=U(t,he=>x(he)),[S,C]=l.useState(null),M=In(S),N=(M==null?void 0:M.width)??0,P=(M==null?void 0:M.height)??0,F=r+(a!=="center"?"-"+a:""),_=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},$=Array.isArray(u)?u:[u],I=$.length>0,B={padding:_,boundary:$.filter(Wv),altBoundary:I},{refs:Y,floatingStyles:q,placement:j,isPositioned:G,middlewareData:T}=Cc({strategy:"fixed",placement:F,whileElementsMounted:(...he)=>xc(...he,{animationFrame:h==="always"}),elements:{reference:v.anchor},middleware:[Sc({mainAxis:o+P,alignmentAxis:i}),c&&Ec({mainAxis:!0,crossAxis:!1,limiter:m==="partial"?Nc():void 0,...B}),c&&Mc({...B}),Rc({...B,apply:({elements:he,rects:be,availableWidth:Je,availableHeight:et})=>{const{width:tt,height:on}=be.reference,Te=he.floating.style;Te.setProperty("--radix-popper-available-width",`${Je}px`),Te.setProperty("--radix-popper-available-height",`${et}px`),Te.setProperty("--radix-popper-anchor-width",`${tt}px`),Te.setProperty("--radix-popper-anchor-height",`${on}px`)}}),S&&kc({element:S,padding:s}),Bv({arrowWidth:N,arrowHeight:P}),p&&Pc({strategy:"referenceHidden",...B})]}),[D,Q]=Lc(j),J=Se(y);de(()=>{G&&(J==null||J())},[G,J]);const R=(A=T.arrow)==null?void 0:A.x,L=(Z=T.arrow)==null?void 0:Z.y,z=((K=T.arrow)==null?void 0:K.centerOffset)!==0,[W,X]=l.useState();return de(()=>{b&&X(window.getComputedStyle(b).zIndex)},[b]),f.jsx("div",{ref:Y.setFloating,"data-radix-popper-content-wrapper":"",style:{...q,transform:G?q.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:W,"--radix-popper-transform-origin":[(te=T.transformOrigin)==null?void 0:te.x,(re=T.transformOrigin)==null?void 0:re.y].join(" "),...((oe=T.hide)==null?void 0:oe.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:f.jsx(Fv,{scope:n,placedSide:D,onArrowChange:C,arrowX:R,arrowY:L,shouldHideArrow:z,children:f.jsx(V.div,{"data-side":D,"data-align":Q,...g,ref:w,style:{...g.style,animation:G?void 0:"none"}})})})});jc.displayName=ma;var Fc="PopperArrow",Lv={top:"bottom",right:"left",bottom:"top",left:"right"},$c=l.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,a=$v(Fc,r),i=Lv[a.placedSide];return f.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:f.jsx(_v,{...o,ref:n,style:{...o.style,display:"block"}})})});$c.displayName=Fc;function Wv(e){return e!==null}var Bv=e=>({name:"transformOrigin",options:e,fn(t){var v,b,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,d]=Lc(n),m={start:"0%",center:"50%",end:"100%"}[d],p=(((b=o.arrow)==null?void 0:b.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 Lc(e){const[t,n="center"]=e.split("-");return[t,n]}var pa=Ac,Rr=_c,ha=jc,ga=$c,Pr="Popover",[Wc,TE]=ve(Pr,[Zt]),An=Zt(),[Vv,xt]=Wc(Pr),Bc=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:o,onOpenChange:a,modal:i=!1}=e,s=An(t),c=l.useRef(null),[u,d]=l.useState(!1),[m,p]=Ce({prop:r,defaultProp:o??!1,onChange:a,caller:Pr});return f.jsx(pa,{...s,children:f.jsx(Vv,{scope:t,contentId:pe(),triggerRef:c,open:m,onOpenChange:p,onOpenToggle:l.useCallback(()=>p(h=>!h),[p]),hasCustomAnchor:u,onCustomAnchorAdd:l.useCallback(()=>d(!0),[]),onCustomAnchorRemove:l.useCallback(()=>d(!1),[]),modal:i,children:n})})};Bc.displayName=Pr;var Vc="PopoverAnchor",Yv=l.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=xt(Vc,n),a=An(n),{onCustomAnchorAdd:i,onCustomAnchorRemove:s}=o;return l.useEffect(()=>(i(),()=>s()),[i,s]),f.jsx(Rr,{...a,...r,ref:t})});Yv.displayName=Vc;var Yc="PopoverTrigger",Hc=l.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=xt(Yc,n),a=An(n),i=U(t,o.triggerRef),s=f.jsx(V.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":Xc(o.open),...r,ref:i,onClick:O(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?s:f.jsx(Rr,{asChild:!0,...a,children:s})});Hc.displayName=Yc;var va="PopoverPortal",[Hv,Gv]=Wc(va,{forceMount:void 0}),Gc=e=>{const{__scopePopover:t,forceMount:n,children:r,container:o}=e,a=xt(va,t);return f.jsx(Hv,{scope:t,forceMount:n,children:f.jsx(Ie,{present:n||a.open,children:f.jsx(Pn,{asChild:!0,container:o,children:r})})})};Gc.displayName=va;var Ht="PopoverContent",zc=l.forwardRef((e,t)=>{const n=Gv(Ht,e.__scopePopover),{forceMount:r=n.forceMount,...o}=e,a=xt(Ht,e.__scopePopover);return f.jsx(Ie,{present:r||a.open,children:a.modal?f.jsx(Uv,{...o,ref:t}):f.jsx(Kv,{...o,ref:t})})});zc.displayName=Ht;var zv=pt("PopoverContent.RemoveScroll"),Uv=l.forwardRef((e,t)=>{const n=xt(Ht,e.__scopePopover),r=l.useRef(null),o=U(t,r),a=l.useRef(!1);return l.useEffect(()=>{const i=r.current;if(i)return gr(i)},[]),f.jsx(kn,{as:zv,allowPinchZoom:!0,children:f.jsx(Uc,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:O(e.onCloseAutoFocus,i=>{var s;i.preventDefault(),a.current||(s=n.triggerRef.current)==null||s.focus()}),onPointerDownOutside:O(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:O(e.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1})})})}),Kv=l.forwardRef((e,t)=>{const n=xt(Ht,e.__scopePopover),r=l.useRef(!1),o=l.useRef(!1);return f.jsx(Uc,{...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()}})}),Uc=l.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:a,disableOutsidePointerEvents:i,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:u,onInteractOutside:d,...m}=e,p=xt(Ht,n),h=An(n);return pr(),f.jsx(Rn,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:a,children:f.jsx(Mn,{asChild:!0,disableOutsidePointerEvents:i,onInteractOutside:d,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:u,onDismiss:()=>p.onOpenChange(!1),children:f.jsx(ha,{"data-state":Xc(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)"}})})})}),Kc="PopoverClose",qv=l.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=xt(Kc,n);return f.jsx(V.button,{type:"button",...r,ref:t,onClick:O(e.onClick,()=>o.onOpenChange(!1))})});qv.displayName=Kc;var Xv="PopoverArrow",qc=l.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=An(n);return f.jsx(ga,{...o,...r,ref:t})});qc.displayName=Xv;function Xc(e){return e?"open":"closed"}var Zv=Bc,Qv=Hc,Jv=Gc,Zc=zc,ey=qc;const Qt=Zv,Jt=Qv,ty=ey,Ot=l.forwardRef(({className:e,align:t="center",sideOffset:n=4,hasArrow:r,zIndex:o,children:a,...i},s)=>{const c=Ve("popover",o);return f.jsx(Jv,{children:f.jsxs(Zc,{ref:s,align:t,className:k(le.popover,e),sideOffset:n,style:{zIndex:c,...i.style},...i,children:[a,r?f.jsx(ty,{className:"fill-popover stroke-muted stroke-[1px]",height:7,width:15}):null]})})});Ot.displayName=Zc.displayName;const Qc=E.forwardRef(({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:d=10,debounceMs:m=300,minSearch:p=2,zIndex:h,isDisabled:y=!1,...g},v)=>{const[b,x]=E.useState(!1),w=Ve("dropdown",h),[S,C]=E.useState(""),[M,N]=E.useState(!1),[P,F]=E.useState(!1),[_,$]=E.useState([]),[I,B]=E.useState(!1),Y=E.useRef();E.useEffect(()=>()=>{Y.current&&clearTimeout(Y.current)},[]);const q=E.useCallback(async R=>{if(e)try{N(!0),F(!1);const L=await e(R);$(L.slice(0,d)),B(!0)}catch(L){console.error("Error fetching options:",L),F(!0),$([])}finally{N(!1)}},[e,d]),j=E.useMemo(()=>{if(e)return[];const R=S.toLowerCase().trim();return R.length>0&&B(!0),t.filter(L=>L.label.toLowerCase().includes(R)||L.value.toLowerCase().includes(R)).slice(0,d)},[e,t,S,d]),G=e?_:j,T=E.useMemo(()=>G.find(R=>R.value===n),[G,n]),D=E.useCallback(R=>{r(R),x(!1),C(""),B(!1)},[r]),Q=E.useCallback(R=>{C(R),R.length===0&&B(!1),Y.current&&clearTimeout(Y.current),e&&R.length>=p?Y.current=setTimeout(()=>{q(R)},m):e&&R.length===0&&$([])},[e,p,m,q]),J=E.useCallback(()=>{r(""),C(""),$([]),B(!1)},[r]);return f.jsxs(Qt,{open:b,onOpenChange:x,children:[f.jsx(Jt,{asChild:!0,children:f.jsxs(Oe,{ref:v,"aria-expanded":b,className:k("w-full justify-between px-3",!T&&!n&&"text-muted-foreground",c),isDisabled:y,role:"combobox",variant:"input",...g,children:[f.jsx("span",{className:"truncate",children:T?T.label:n||o}),f.jsxs("div",{className:"flex items-center gap-1",children:[n||S?f.jsx(mr,{className:"h-4 w-4 opacity-50 hover:opacity-100",onClick:R=>{R.stopPropagation(),J()}}):null,f.jsx(qo,{className:"h-4 w-4 shrink-0 opacity-50"})]})]})}),f.jsx(Ot,{align:"start",className:"w-[--radix-popover-trigger-width] px-0 py-0",zIndex:w,children:f.jsxs(br,{shouldFilter:!1,children:[f.jsx(wr,{placeholder:o,value:S,onValueChange:Q}),M?f.jsx(uc,{children:a}):null,!M&&P?f.jsx(Co,{children:s}):null,!M&&!P&&I&&G.length===0?f.jsx(Co,{children:i}):null,!M&&!P&&G.length>0?f.jsx(Sr,{className:k("max-h-[16.5rem] overflow-y-auto",u),children:f.jsx(xr,{children:G.map(R=>f.jsxs(Cr,{className:"cursor-pointer",value:R.value,onSelect:D,children:[f.jsx(Kt,{className:k("mr-2 h-4 w-4",R.value===n?"opacity-100":"opacity-0")}),R.label]},R.value))})}):null]})})]})});Qc.displayName="Autocomplete";const ny=De(`inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold
|
|
159
|
+
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"}}),Jc=l.forwardRef(({className:e,variant:t,...n},r)=>f.jsx("div",{ref:r,className:k(ny({variant:t,className:e})),...n}));Jc.displayName="Badge";const el=l.forwardRef(({items:e,separator:t=f.jsx(Ko,{className:"h-4 w-4"}),className:n,...r},o)=>f.jsx("nav",{ref:o,"aria-label":"Breadcrumb",className:k("flex",n),...r,children:f.jsx("ol",{className:"flex flex-wrap items-center gap-1 pl-0",children:e.map((a,i)=>f.jsxs("li",{className:"flex items-center gap-1",children:[a.href?f.jsx("a",{className:k(le.link,le.linkNoUnderline),href:a.href,children:a.label}):f.jsx("span",{className:"font-medium text-foreground",children:a.label}),i<e.length-1?f.jsx("span",{className:"text-muted-foreground",children:t}):null]},i))})}));el.displayName="Breadcrumbs";const io={},dn={};function pn(e,t){try{const r=(io[e]||(io[e]=new Intl.DateTimeFormat("en-GB",{timeZone:e,hour:"numeric",timeZoneName:"longOffset"}).format))(t).split("GMT")[1]||"";return r in dn?dn[r]:Es(r,r.split(":"))}catch{if(e in dn)return dn[e];const n=e==null?void 0:e.match(ry);return n?Es(e,n.slice(1)):NaN}}const ry=/([+-]\d\d):?(\d\d)?/;function Es(e,t){const n=+t[0],r=+(t[1]||0);return dn[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(pn(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)),tl(this),Mo(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-pn(this.timeZone,this)}setTime(t){return Date.prototype.setTime.apply(this,arguments),Mo(this),+this}[Symbol.for("constructDateFrom")](t){return new ze(+new Date(t),this.timeZone)}}const Ns=/^(get|set)(?!UTC)/;Object.getOwnPropertyNames(Date.prototype).forEach(e=>{if(!Ns.test(e))return;const t=e.replace(Ns,"$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),oy(this),+this},ze.prototype[t]=function(){return Date.prototype[t].apply(this,arguments),Mo(this),+this}))});function Mo(e){e.internal.setTime(+e),e.internal.setUTCMinutes(e.internal.getUTCMinutes()-e.getTimezoneOffset())}function oy(e){Date.prototype.setFullYear.call(e,e.internal.getUTCFullYear(),e.internal.getUTCMonth(),e.internal.getUTCDate()),Date.prototype.setHours.call(e,e.internal.getUTCHours(),e.internal.getUTCMinutes(),e.internal.getUTCSeconds(),e.internal.getUTCMilliseconds()),tl(e)}function tl(e){const t=pn(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=pn(e.timeZone,e),d=-new Date(+e).getTimezoneOffset()-c,m=c!==t,p=d-s;if(m&&p){Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+p);const h=pn(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} (${ay(this.timeZone,this)})`}toLocaleString(t,n){return Date.prototype.toLocaleString.call(this,t,{...n,timeZone:(n==null?void 0:n.timeZone)||this.timeZone})}toLocaleDateString(t,n){return Date.prototype.toLocaleDateString.call(this,t,{...n,timeZone:(n==null?void 0:n.timeZone)||this.timeZone})}toLocaleTimeString(t,n){return Date.prototype.toLocaleTimeString.call(this,t,{...n,timeZone:(n==null?void 0:n.timeZone)||this.timeZone})}tzComponents(){const t=this.getTimezoneOffset(),n=t>0?"-":"+",r=String(Math.floor(Math.abs(t)/60)).padStart(2,"0"),o=String(Math.abs(t)%60).padStart(2,"0");return[n,r,o]}withTimeZone(t){return new we(+this,t)}[Symbol.for("constructDateFrom")](t){return new we(+new Date(t),this.timeZone)}}function ay(e,t){return new Intl.DateTimeFormat("en-GB",{timeZone:e,timeZoneName:"long"}).format(t).slice(12)}var H;(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"})(H||(H={}));var me;(function(e){e.disabled="disabled",e.hidden="hidden",e.outside="outside",e.focused="focused",e.today="today"})(me||(me={}));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 Me;(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"})(Me||(Me={}));const nl=6048e5,sy=864e5,Ms=Symbol.for("constructDateFrom");function ye(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&Ms in e?e[Ms](t):e instanceof Date?new e.constructor(t):new Date(t)}function ie(e,t){return ye(t||e,e)}function rl(e,t,n){const r=ie(e,n==null?void 0:n.in);return isNaN(t)?ye(e,NaN):(t&&r.setDate(r.getDate()+t),r)}function ol(e,t,n){const r=ie(e,n==null?void 0:n.in);if(isNaN(t))return ye(e,NaN);if(!t)return r;const o=r.getDate(),a=ye(e,r.getTime());a.setMonth(r.getMonth()+t+1,0);const i=a.getDate();return o>=i?a:(r.setFullYear(a.getFullYear(),a.getMonth(),o),r)}let iy={};function Tn(){return iy}function Gt(e,t){var s,c,u,d;const n=Tn(),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??((d=(u=n.locale)==null?void 0:u.options)==null?void 0:d.weekStartsOn)??0,o=ie(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 bn(e,t){return Gt(e,{...t,weekStartsOn:1})}function al(e,t){const n=ie(e,t==null?void 0:t.in),r=n.getFullYear(),o=ye(n,0);o.setFullYear(r+1,0,4),o.setHours(0,0,0,0);const a=bn(o),i=ye(n,0);i.setFullYear(r,0,4),i.setHours(0,0,0,0);const s=bn(i);return n.getTime()>=a.getTime()?r+1:n.getTime()>=s.getTime()?r:r-1}function Rs(e){const t=ie(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 en(e,...t){const n=ye.bind(null,t.find(r=>typeof r=="object"));return t.map(n)}function xn(e,t){const n=ie(e,t==null?void 0:t.in);return n.setHours(0,0,0,0),n}function sl(e,t,n){const[r,o]=en(n==null?void 0:n.in,e,t),a=xn(r),i=xn(o),s=+a-Rs(a),c=+i-Rs(i);return Math.round((s-c)/sy)}function cy(e,t){const n=al(e,t),r=ye(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),bn(r)}function ly(e,t,n){return rl(e,t*7,n)}function uy(e,t,n){return ol(e,t*12,n)}function dy(e,t){let n,r=t==null?void 0:t.in;return e.forEach(o=>{!r&&typeof o=="object"&&(r=ye.bind(null,o));const a=ie(o,r);(!n||n<a||isNaN(+a))&&(n=a)}),ye(r,n||NaN)}function fy(e,t){let n,r=t==null?void 0:t.in;return e.forEach(o=>{!r&&typeof o=="object"&&(r=ye.bind(null,o));const a=ie(o,r);(!n||n>a||isNaN(+a))&&(n=a)}),ye(r,n||NaN)}function my(e,t,n){const[r,o]=en(n==null?void 0:n.in,e,t);return+xn(r)==+xn(o)}function il(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function py(e){return!(!il(e)&&typeof e!="number"||isNaN(+ie(e)))}function hy(e,t,n){const[r,o]=en(n==null?void 0:n.in,e,t),a=r.getFullYear()-o.getFullYear(),i=r.getMonth()-o.getMonth();return a*12+i}function gy(e,t){const n=ie(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 vy(e,t){const[n,r]=en(e,t.start,t.end);return{start:n,end:r}}function yy(e,t){const{start:n,end:r}=vy(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(ye(n,i)),i.setMonth(i.getMonth()+s);return o?c.reverse():c}function by(e,t){const n=ie(e,t==null?void 0:t.in);return n.setDate(1),n.setHours(0,0,0,0),n}function xy(e,t){const n=ie(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 cl(e,t){const n=ie(e,t==null?void 0:t.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function ll(e,t){var s,c,u,d;const n=Tn(),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??((d=(u=n.locale)==null?void 0:u.options)==null?void 0:d.weekStartsOn)??0,o=ie(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 wy(e,t){return ll(e,{...t,weekStartsOn:1})}const Cy={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"}},Sy=(e,t,n)=>{let r;const o=Cy[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 co(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const Ey={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Ny={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},My={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},Ry={date:co({formats:Ey,defaultWidth:"full"}),time:co({formats:Ny,defaultWidth:"full"}),dateTime:co({formats:My,defaultWidth:"full"})},Py={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},ky=(e,t,n,r)=>Py[e];function ln(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 Oy={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},Dy={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Iy={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"]},Ay={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"]},Ty={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"}},_y={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},jy=(e,t)=>{const n=Number(e),r=n%100;if(r>20||r<10)switch(r%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},Fy={ordinalNumber:jy,era:ln({values:Oy,defaultWidth:"wide"}),quarter:ln({values:Dy,defaultWidth:"wide",argumentCallback:e=>e-1}),month:ln({values:Iy,defaultWidth:"wide"}),day:ln({values:Ay,defaultWidth:"wide"}),dayPeriod:ln({values:Ty,defaultWidth:"wide",formattingValues:_y,defaultFormattingWidth:"wide"})};function un(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)?Ly(s,m=>m.test(i)):$y(s,m=>m.test(i));let u;u=e.valueCallback?e.valueCallback(c):c,u=n.valueCallback?n.valueCallback(u):u;const d=t.slice(i.length);return{value:u,rest:d}}}function $y(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function Ly(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function Wy(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 By=/^(\d+)(th|st|nd|rd)?/i,Vy=/\d+/i,Yy={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},Hy={any:[/^b/i,/^(a|c)/i]},Gy={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},zy={any:[/1/i,/2/i,/3/i,/4/i]},Uy={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},Ky={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]},qy={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},Xy={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]},Zy={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},Qy={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}},Jy={ordinalNumber:Wy({matchPattern:By,parsePattern:Vy,valueCallback:e=>parseInt(e,10)}),era:un({matchPatterns:Yy,defaultMatchWidth:"wide",parsePatterns:Hy,defaultParseWidth:"any"}),quarter:un({matchPatterns:Gy,defaultMatchWidth:"wide",parsePatterns:zy,defaultParseWidth:"any",valueCallback:e=>e+1}),month:un({matchPatterns:Uy,defaultMatchWidth:"wide",parsePatterns:Ky,defaultParseWidth:"any"}),day:un({matchPatterns:qy,defaultMatchWidth:"wide",parsePatterns:Xy,defaultParseWidth:"any"}),dayPeriod:un({matchPatterns:Zy,defaultMatchWidth:"any",parsePatterns:Qy,defaultParseWidth:"any"})},ya={code:"en-US",formatDistance:Sy,formatLong:Ry,formatRelative:ky,localize:Fy,match:Jy,options:{weekStartsOn:0,firstWeekContainsDate:1}};function eb(e,t){const n=ie(e,t==null?void 0:t.in);return sl(n,cl(n))+1}function ul(e,t){const n=ie(e,t==null?void 0:t.in),r=+bn(n)-+cy(n);return Math.round(r/nl)+1}function dl(e,t){var d,m,p,h;const n=ie(e,t==null?void 0:t.in),r=n.getFullYear(),o=Tn(),a=(t==null?void 0:t.firstWeekContainsDate)??((m=(d=t==null?void 0:t.locale)==null?void 0:d.options)==null?void 0:m.firstWeekContainsDate)??o.firstWeekContainsDate??((h=(p=o.locale)==null?void 0:p.options)==null?void 0:h.firstWeekContainsDate)??1,i=ye((t==null?void 0:t.in)||e,0);i.setFullYear(r+1,0,a),i.setHours(0,0,0,0);const s=Gt(i,t),c=ye((t==null?void 0:t.in)||e,0);c.setFullYear(r,0,a),c.setHours(0,0,0,0);const u=Gt(c,t);return+n>=+s?r+1:+n>=+u?r:r-1}function tb(e,t){var s,c,u,d;const n=Tn(),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??((d=(u=n.locale)==null?void 0:u.options)==null?void 0:d.firstWeekContainsDate)??1,o=dl(e,t),a=ye((t==null?void 0:t.in)||e,0);return a.setFullYear(o,0,r),a.setHours(0,0,0,0),Gt(a,t)}function fl(e,t){const n=ie(e,t==null?void 0:t.in),r=+Gt(n,t)-+tb(n,t);return Math.round(r/nl)+1}function se(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const dt={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return se(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):se(n+1,2)},d(e,t){return se(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 se(e.getHours()%12||12,t.length)},H(e,t){return se(e.getHours(),t.length)},m(e,t){return se(e.getMinutes(),t.length)},s(e,t){return se(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),o=Math.trunc(r*Math.pow(10,n-3));return se(o,t.length)}},Ft={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Ps={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 dt.y(e,t)},Y:function(e,t,n,r){const o=dl(e,r),a=o>0?o:1-o;if(t==="YY"){const i=a%100;return se(i,2)}return t==="Yo"?n.ordinalNumber(a,{unit:"year"}):se(a,t.length)},R:function(e,t){const n=al(e);return se(n,t.length)},u:function(e,t){const n=e.getFullYear();return se(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 se(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 se(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 dt.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 se(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=fl(e,r);return t==="wo"?n.ordinalNumber(o,{unit:"week"}):se(o,t.length)},I:function(e,t,n){const r=ul(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):se(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):dt.d(e,t)},D:function(e,t,n){const r=eb(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):se(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 se(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 se(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 se(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=Ft.noon:r===0?o=Ft.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=Ft.evening:r>=12?o=Ft.afternoon:r>=4?o=Ft.morning:o=Ft.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 dt.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):dt.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):se(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):se(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):dt.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):dt.s(e,t)},S:function(e,t){return dt.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return Os(r);case"XXXX":case"XX":return St(r);case"XXXXX":case"XXX":default:return St(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return Os(r);case"xxxx":case"xx":return St(r);case"xxxxx":case"xxx":default:return St(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+ks(r,":");case"OOOO":default:return"GMT"+St(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+ks(r,":");case"zzzz":default:return"GMT"+St(r,":")}},t:function(e,t,n){const r=Math.trunc(+e/1e3);return se(r,t.length)},T:function(e,t,n){return se(+e,t.length)}};function ks(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+se(a,2)}function Os(e,t){return e%60===0?(e>0?"-":"+")+se(Math.abs(e)/60,2):St(e,t)}function St(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=se(Math.trunc(r/60),2),a=se(r%60,2);return n+o+t+a}const Ds=(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"})}},ml=(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"})}},nb=(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return Ds(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}}",Ds(r,t)).replace("{{time}}",ml(o,t))},rb={p:ml,P:nb},ob=/^D+$/,ab=/^Y+$/,sb=["D","DD","YY","YYYY"];function ib(e){return ob.test(e)}function cb(e){return ab.test(e)}function lb(e,t,n){const r=ub(e,t,n);if(console.warn(r),sb.includes(e))throw new RangeError(r)}function ub(e,t,n){const r=e[0]==="Y"?"years":"days of the month";return`Use \`${e.toLowerCase()}\` instead of \`${e}\` (in \`${t}\`) for formatting ${r} to the input \`${n}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`}const db=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,fb=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,mb=/^'([^]*?)'?$/,pb=/''/g,hb=/[a-zA-Z]/;function hn(e,t,n){var d,m,p,h,y,g,v,b;const r=Tn(),o=(n==null?void 0:n.locale)??r.locale??ya,a=(n==null?void 0:n.firstWeekContainsDate)??((m=(d=n==null?void 0:n.locale)==null?void 0:d.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??((b=(v=r.locale)==null?void 0:v.options)==null?void 0:b.weekStartsOn)??0,s=ie(e,n==null?void 0:n.in);if(!py(s))throw new RangeError("Invalid time value");let c=t.match(fb).map(x=>{const w=x[0];if(w==="p"||w==="P"){const S=rb[w];return S(x,o.formatLong)}return x}).join("").match(db).map(x=>{if(x==="''")return{isToken:!1,value:"'"};const w=x[0];if(w==="'")return{isToken:!1,value:gb(x)};if(Ps[w])return{isToken:!0,value:x};if(w.match(hb))throw new RangeError("Format string contains an unescaped latin alphabet character `"+w+"`");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 w=x.value;(!(n!=null&&n.useAdditionalWeekYearTokens)&&cb(w)||!(n!=null&&n.useAdditionalDayOfYearTokens)&&ib(w))&&lb(w,t,String(e));const S=Ps[w[0]];return S(s,w,o.localize,u)}).join("")}function gb(e){const t=e.match(mb);return t?t[1].replace(pb,"'"):e}function vb(e,t){const n=ie(e,t==null?void 0:t.in),r=n.getFullYear(),o=n.getMonth(),a=ye(n,0);return a.setFullYear(r,o+1,0),a.setHours(0,0,0,0),a.getDate()}function yb(e,t){return ie(e,t==null?void 0:t.in).getMonth()}function bb(e,t){return ie(e,t==null?void 0:t.in).getFullYear()}function xb(e,t){return+ie(e)>+ie(t)}function wb(e,t){return+ie(e)<+ie(t)}function Cb(e,t,n){const[r,o]=en(n==null?void 0:n.in,e,t);return r.getFullYear()===o.getFullYear()&&r.getMonth()===o.getMonth()}function Sb(e,t,n){const[r,o]=en(n==null?void 0:n.in,e,t);return r.getFullYear()===o.getFullYear()}function Eb(e,t,n){const r=ie(e,n==null?void 0:n.in),o=r.getFullYear(),a=r.getDate(),i=ye(e,0);i.setFullYear(o,t,15),i.setHours(0,0,0,0);const s=vb(i);return r.setMonth(t,Math.min(a,s)),r}function Nb(e,t,n){const r=ie(e,n==null?void 0:n.in);return isNaN(+r)?ye(e,NaN):(r.setFullYear(t),r)}const Is=5,Mb=4;function Rb(e,t){const n=t.startOfMonth(e),r=n.getDay()>0?n.getDay():7,o=t.addDays(e,-r+1),a=t.addDays(o,Is*7-1);return t.getMonth(e)===t.getMonth(a)?Is:Mb}function pl(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 Pb(e,t){const n=pl(e,t),r=Rb(e,t);return t.addDays(n,r*7-1)}class it{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):rl(r,o)},this.addMonths=(r,o)=>{var a;return(a=this.overrides)!=null&&a.addMonths?this.overrides.addMonths(r,o):ol(r,o)},this.addWeeks=(r,o)=>{var a;return(a=this.overrides)!=null&&a.addWeeks?this.overrides.addWeeks(r,o):ly(r,o)},this.addYears=(r,o)=>{var a;return(a=this.overrides)!=null&&a.addYears?this.overrides.addYears(r,o):uy(r,o)},this.differenceInCalendarDays=(r,o)=>{var a;return(a=this.overrides)!=null&&a.differenceInCalendarDays?this.overrides.differenceInCalendarDays(r,o):sl(r,o)},this.differenceInCalendarMonths=(r,o)=>{var a;return(a=this.overrides)!=null&&a.differenceInCalendarMonths?this.overrides.differenceInCalendarMonths(r,o):hy(r,o)},this.eachMonthOfInterval=r=>{var o;return(o=this.overrides)!=null&&o.eachMonthOfInterval?this.overrides.eachMonthOfInterval(r):yy(r)},this.endOfBroadcastWeek=r=>{var o;return(o=this.overrides)!=null&&o.endOfBroadcastWeek?this.overrides.endOfBroadcastWeek(r):Pb(r,this)},this.endOfISOWeek=r=>{var o;return(o=this.overrides)!=null&&o.endOfISOWeek?this.overrides.endOfISOWeek(r):wy(r)},this.endOfMonth=r=>{var o;return(o=this.overrides)!=null&&o.endOfMonth?this.overrides.endOfMonth(r):gy(r)},this.endOfWeek=(r,o)=>{var a;return(a=this.overrides)!=null&&a.endOfWeek?this.overrides.endOfWeek(r,o):ll(r,this.options)},this.endOfYear=r=>{var o;return(o=this.overrides)!=null&&o.endOfYear?this.overrides.endOfYear(r):xy(r)},this.format=(r,o,a)=>{var s;const i=(s=this.overrides)!=null&&s.format?this.overrides.format(r,o,this.options):hn(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):ul(r)},this.getMonth=(r,o)=>{var a;return(a=this.overrides)!=null&&a.getMonth?this.overrides.getMonth(r,this.options):yb(r,this.options)},this.getYear=(r,o)=>{var a;return(a=this.overrides)!=null&&a.getYear?this.overrides.getYear(r,this.options):bb(r,this.options)},this.getWeek=(r,o)=>{var a;return(a=this.overrides)!=null&&a.getWeek?this.overrides.getWeek(r,this.options):fl(r,this.options)},this.isAfter=(r,o)=>{var a;return(a=this.overrides)!=null&&a.isAfter?this.overrides.isAfter(r,o):xb(r,o)},this.isBefore=(r,o)=>{var a;return(a=this.overrides)!=null&&a.isBefore?this.overrides.isBefore(r,o):wb(r,o)},this.isDate=r=>{var o;return(o=this.overrides)!=null&&o.isDate?this.overrides.isDate(r):il(r)},this.isSameDay=(r,o)=>{var a;return(a=this.overrides)!=null&&a.isSameDay?this.overrides.isSameDay(r,o):my(r,o)},this.isSameMonth=(r,o)=>{var a;return(a=this.overrides)!=null&&a.isSameMonth?this.overrides.isSameMonth(r,o):Cb(r,o)},this.isSameYear=(r,o)=>{var a;return(a=this.overrides)!=null&&a.isSameYear?this.overrides.isSameYear(r,o):Sb(r,o)},this.max=r=>{var o;return(o=this.overrides)!=null&&o.max?this.overrides.max(r):dy(r)},this.min=r=>{var o;return(o=this.overrides)!=null&&o.min?this.overrides.min(r):fy(r)},this.setMonth=(r,o)=>{var a;return(a=this.overrides)!=null&&a.setMonth?this.overrides.setMonth(r,o):Eb(r,o)},this.setYear=(r,o)=>{var a;return(a=this.overrides)!=null&&a.setYear?this.overrides.setYear(r,o):Nb(r,o)},this.startOfBroadcastWeek=(r,o)=>{var a;return(a=this.overrides)!=null&&a.startOfBroadcastWeek?this.overrides.startOfBroadcastWeek(r,this):pl(r,this)},this.startOfDay=r=>{var o;return(o=this.overrides)!=null&&o.startOfDay?this.overrides.startOfDay(r):xn(r)},this.startOfISOWeek=r=>{var o;return(o=this.overrides)!=null&&o.startOfISOWeek?this.overrides.startOfISOWeek(r):bn(r)},this.startOfMonth=r=>{var o;return(o=this.overrides)!=null&&o.startOfMonth?this.overrides.startOfMonth(r):by(r)},this.startOfWeek=(r,o)=>{var a;return(a=this.overrides)!=null&&a.startOfWeek?this.overrides.startOfWeek(r,this.options):Gt(r,this.options)},this.startOfYear=r=>{var o;return(o=this.overrides)!=null&&o.startOfYear?this.overrides.startOfYear(r):cl(r)},this.options={locale:ya,...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 Qe=new it;class hl{constructor(t,n,r=Qe){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 kb{constructor(t,n){this.date=t,this.weeks=n}}class Ob{constructor(t,n){this.days=n,this.weekNumber=t}}function rt(e,t,n=!1,r=Qe){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 gl(e){return!!(e&&typeof e=="object"&&"before"in e&&"after"in e)}function ba(e){return!!(e&&typeof e=="object"&&"from"in e)}function vl(e){return!!(e&&typeof e=="object"&&"after"in e)}function yl(e){return!!(e&&typeof e=="object"&&"before"in e)}function bl(e){return!!(e&&typeof e=="object"&&"dayOfWeek"in e)}function xl(e,t){return Array.isArray(e)&&e.every(t.isDate)}function ot(e,t,n=Qe){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(xl(s,n))return s.includes(e);if(ba(s))return rt(s,e,!1,n);if(bl(s))return Array.isArray(s.dayOfWeek)?s.dayOfWeek.includes(e.getDay()):s.dayOfWeek===e.getDay();if(gl(s)){const c=a(s.before,e),u=a(s.after,e),d=c>0,m=u<0;return i(s.before,s.after)?m&&d:d||m}return vl(s)?a(e,s.after)>0:yl(s)?a(s.before,e)>0:typeof s=="function"?s(e):!1})}function Db(e,t,n){const{disabled:r,hidden:o,modifiers:a,showOutsideDays:i,broadcastCalendar:s,today:c}=t,{isSameDay:u,isSameMonth:d,startOfMonth:m,isBefore:p,endOfMonth:h,isAfter:y}=n,g=t.startMonth&&m(t.startMonth),v=t.endMonth&&h(t.endMonth),b={[me.focused]:[],[me.outside]:[],[me.disabled]:[],[me.hidden]:[],[me.today]:[]},x={};for(const w of e){const{date:S,displayMonth:C}=w,M=!!(C&&!d(S,C)),N=!!(g&&p(S,g)),P=!!(v&&y(S,v)),F=!!(r&&ot(S,r,n)),_=!!(o&&ot(S,o,n))||N||P||!s&&!i&&M||s&&i===!1&&M,$=u(S,c??n.today());M&&b.outside.push(w),F&&b.disabled.push(w),_&&b.hidden.push(w),$&&b.today.push(w),a&&Object.keys(a).forEach(I=>{const B=a==null?void 0:a[I];B&&ot(S,B,n)&&(x[I]?x[I].push(w):x[I]=[w])})}return w=>{const S={[me.focused]:!1,[me.disabled]:!1,[me.hidden]:!1,[me.outside]:!1,[me.today]:!1},C={};for(const M in b){const N=b[M];S[M]=N.some(P=>P===w)}for(const M in x)C[M]=x[M].some(N=>N===w);return{...S,...C}}}function Ib(e,t,n={}){return Object.entries(e).filter(([,o])=>o===!0).reduce((o,[a])=>(n[a]?o.push(n[a]):t[me[a]]?o.push(t[me[a]]):t[Fe[a]]&&o.push(t[Fe[a]]),o),[t[H.Day]])}function Ab(e){return E.createElement("button",{...e})}function Tb(e){return E.createElement("span",{...e})}function _b(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 jb(e){const{day:t,modifiers:n,...r}=e;return E.createElement("td",{...r})}function Fb(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 $b(e){const{options:t,className:n,components:r,classNames:o,...a}=e,i=[o[H.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[H.DropdownRoot]},E.createElement(r.Select,{className:i,...a},t==null?void 0:t.map(({value:c,label:u,disabled:d})=>E.createElement(r.Option,{key:c,value:c,disabled:d},u))),E.createElement("span",{className:o[H.CaptionLabel],"aria-hidden":!0},s==null?void 0:s.label,E.createElement(r.Chevron,{orientation:"down",size:18,className:o[H.Chevron]})))}function Lb(e){return E.createElement("div",{...e})}function Wb(e){return E.createElement("div",{...e})}function Bb(e){const{calendarMonth:t,displayIndex:n,...r}=e;return E.createElement("div",{...r},e.children)}function Vb(e){const{calendarMonth:t,displayIndex:n,...r}=e;return E.createElement("div",{...r})}function Yb(e){return E.createElement("table",{...e})}function Hb(e){return E.createElement("div",{...e})}const wl=E.createContext(void 0);function _n(){const e=E.useContext(wl);if(e===void 0)throw new Error("useDayPicker() must be used within a custom component.");return e}function Gb(e){const{components:t}=_n();return E.createElement(t.Dropdown,{...e})}function zb(e){const{onPreviousClick:t,onNextClick:n,previousMonth:r,nextMonth:o,...a}=e,{components:i,classNames:s,labels:{labelPrevious:c,labelNext:u}}=_n(),d=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[H.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[H.Chevron],orientation:"left"})),E.createElement(i.NextMonthButton,{type:"button",className:s[H.NextMonthButton],tabIndex:o?void 0:-1,"aria-disabled":o?void 0:!0,"aria-label":u(o),onClick:d},E.createElement(i.Chevron,{disabled:o?void 0:!0,orientation:"right",className:s[H.Chevron]})))}function Ub(e){const{components:t}=_n();return E.createElement(t.Button,{...e})}function Kb(e){return E.createElement("option",{...e})}function qb(e){const{components:t}=_n();return E.createElement(t.Button,{...e})}function Xb(e){const{rootRef:t,...n}=e;return E.createElement("div",{...n,ref:t})}function Zb(e){return E.createElement("select",{...e})}function Qb(e){const{week:t,...n}=e;return E.createElement("tr",{...n})}function Jb(e){return E.createElement("th",{...e})}function ex(e){return E.createElement("thead",{"aria-hidden":!0},E.createElement("tr",{...e}))}function tx(e){const{week:t,...n}=e;return E.createElement("th",{...n})}function nx(e){return E.createElement("th",{...e})}function rx(e){return E.createElement("tbody",{...e})}function ox(e){const{components:t}=_n();return E.createElement(t.Dropdown,{...e})}const ax=Object.freeze(Object.defineProperty({__proto__:null,Button:Ab,CaptionLabel:Tb,Chevron:_b,Day:jb,DayButton:Fb,Dropdown:$b,DropdownNav:Lb,Footer:Wb,Month:Bb,MonthCaption:Vb,MonthGrid:Yb,Months:Hb,MonthsDropdown:Gb,Nav:zb,NextMonthButton:Ub,Option:Kb,PreviousMonthButton:qb,Root:Xb,Select:Zb,Week:Qb,WeekNumber:tx,WeekNumberHeader:nx,Weekday:Jb,Weekdays:ex,Weeks:rx,YearsDropdown:ox},Symbol.toStringTag,{value:"Module"}));function sx(e){return{...ax,...e}}function ix(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 H)e[H[t]]=`rdp-${H[t]}`;for(const t in me)e[me[t]]=`rdp-${me[t]}`;for(const t in Fe)e[Fe[t]]=`rdp-${Fe[t]}`;for(const t in Me)e[Me[t]]=`rdp-${Me[t]}`;return e}function Cl(e,t,n){return(n??new it(t)).format(e,"LLLL y")}const lx=Cl;function ux(e,t,n){return(n??new it(t)).format(e,"d")}function dx(e,t=Qe){return t.format(e,"LLLL")}function fx(e,t=Qe){return e<10?t.formatNumber(`0${e.toLocaleString()}`):t.formatNumber(`${e.toLocaleString()}`)}function mx(){return""}function px(e,t,n){return(n??new it(t)).format(e,"cccccc")}function Sl(e,t=Qe){return t.format(e,"yyyy")}const hx=Sl,gx=Object.freeze(Object.defineProperty({__proto__:null,formatCaption:Cl,formatDay:ux,formatMonthCaption:lx,formatMonthDropdown:dx,formatWeekNumber:fx,formatWeekNumberHeader:mx,formatWeekdayName:px,formatYearCaption:hx,formatYearDropdown:Sl},Symbol.toStringTag,{value:"Module"}));function vx(e){return e!=null&&e.formatMonthCaption&&!e.formatCaption&&(e.formatCaption=e.formatMonthCaption),e!=null&&e.formatYearCaption&&!e.formatYearDropdown&&(e.formatYearDropdown=e.formatYearCaption),{...gx,...e}}function yx(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 bx(e,t={},n={}){let r={...t==null?void 0:t[H.Day]};return Object.entries(e).filter(([,o])=>o===!0).forEach(([o])=>{r={...r,...n==null?void 0:n[o]}}),r}function xx(e,t,n){const r=e.today(),o=t?e.startOfISOWeek(r):e.startOfWeek(r),a=[];for(let i=0;i<7;i++){const s=e.addDays(o,i);a.push(s)}return a}function wx(e,t,n,r){if(!e||!t)return;const{startOfYear:o,endOfYear:a,addYears:i,getYear:s,isBefore:c,isSameYear:u}=r,d=o(e),m=a(t),p=[];let h=d;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 El(e,t,n){return(n??new it(t)).format(e,"LLLL y")}const Cx=El;function Sx(e,t,n,r){let o=(r??new it(n)).format(e,"PPPP");return t!=null&&t.today&&(o=`Today, ${o}`),o}function Nl(e,t,n,r){let o=(r??new it(n)).format(e,"PPPP");return t.today&&(o=`Today, ${o}`),t.selected&&(o=`${o}, selected`),o}const Ex=Nl;function Nx(){return""}function Mx(e){return"Choose the Month"}function Rx(e){return"Go to the Next Month"}function Px(e){return"Go to the Previous Month"}function kx(e,t,n){return(n??new it(t)).format(e,"cccc")}function Ox(e,t){return`Week ${e}`}function Dx(e){return"Week Number"}function Ix(e){return"Choose the Year"}const Ax=Object.freeze(Object.defineProperty({__proto__:null,labelCaption:Cx,labelDay:Ex,labelDayButton:Nl,labelGrid:El,labelGridcell:Sx,labelMonthDropdown:Mx,labelNav:Nx,labelNext:Rx,labelPrevious:Px,labelWeekNumber:Ox,labelWeekNumberHeader:Dx,labelWeekday:kx,labelYearDropdown:Ix},Symbol.toStringTag,{value:"Module"})),jn=e=>e instanceof HTMLElement?e:null,lo=e=>[...e.querySelectorAll("[data-animated-month]")??[]],Tx=e=>jn(e.querySelector("[data-animated-month]")),uo=e=>jn(e.querySelector("[data-animated-caption]")),fo=e=>jn(e.querySelector("[data-animated-weeks]")),_x=e=>jn(e.querySelector("[data-animated-nav]")),jx=e=>jn(e.querySelector("[data-animated-weekdays]"));function Fx(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 d=a.isSameMonth(r[0].date,u[0].date),m=a.isAfter(r[0].date,u[0].date),p=m?n[Me.caption_after_enter]:n[Me.caption_before_enter],h=m?n[Me.weeks_after_enter]:n[Me.weeks_before_enter],y=i.current,g=e.current.cloneNode(!0);if(g instanceof HTMLElement?(lo(g).forEach(w=>{if(!(w instanceof HTMLElement))return;const S=Tx(w);S&&w.contains(S)&&w.removeChild(S);const C=uo(w);C&&C.classList.remove(p);const M=fo(w);M&&M.classList.remove(h)}),i.current=g):i.current=null,c.current||d||o)return;const v=y instanceof HTMLElement?lo(y):[],b=lo(e.current);if(b&&b.every(x=>x instanceof HTMLElement)&&v&&v.every(x=>x instanceof HTMLElement)){c.current=!0,e.current.style.isolation="isolate";const x=_x(e.current);x&&(x.style.zIndex="1"),b.forEach((w,S)=>{const C=v[S];if(!C)return;w.style.position="relative",w.style.overflow="hidden";const M=uo(w);M&&M.classList.add(p);const N=fo(w);N&&N.classList.add(h);const P=()=>{c.current=!1,e.current&&(e.current.style.isolation=""),x&&(x.style.zIndex=""),M&&M.classList.remove(p),N&&N.classList.remove(h),w.style.position="",w.style.overflow="",w.contains(C)&&w.removeChild(C)};C.style.pointerEvents="none",C.style.position="absolute",C.style.overflow="hidden",C.setAttribute("aria-hidden","true");const F=jx(C);F&&(F.style.opacity="0");const _=uo(C);_&&(_.classList.add(m?n[Me.caption_before_exit]:n[Me.caption_after_exit]),_.addEventListener("animationend",P));const $=fo(C);$&&$.classList.add(m?n[Me.weeks_before_exit]:n[Me.weeks_after_exit]),w.insertBefore(C,w.firstChild)})}})}function $x(e,t,n,r){const o=e[0],a=e[e.length-1],{ISOWeek:i,fixedWeeks:s,broadcastCalendar:c}=n??{},{addDays:u,differenceInCalendarDays:d,differenceInCalendarMonths:m,endOfBroadcastWeek:p,endOfISOWeek:h,endOfMonth:y,endOfWeek:g,isAfter:v,startOfBroadcastWeek:b,startOfISOWeek:x,startOfWeek:w}=r,S=c?b(o,r):i?x(o):w(o),C=c?p(a):i?h(y(a)):g(y(a)),M=d(C,S),N=m(a,o)+1,P=[];for(let $=0;$<=M;$++){const I=u(S,$);if(t&&v(I,t))break;P.push(I)}const _=(c?35:42)*N;if(s&&P.length<_){const $=_-P.length;for(let I=0;I<$;I++){const B=u(P[P.length-1],1);P.push(B)}}return P}function Lx(e){const t=[];return e.reduce((n,r)=>{const o=r.weeks.reduce((a,i)=>[...a,...i.days],t);return[...n,...o]},t)}function Wx(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 As(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:d,startOfMonth:m}=t;if(i&&u(i,c)<0){const p=-1*(a-1);c=d(i,p)}return s&&u(c,s)<0&&(c=s),m(c)}function Bx(e,t,n,r){const{addDays:o,endOfBroadcastWeek:a,endOfISOWeek:i,endOfMonth:s,endOfWeek:c,getISOWeek:u,getWeek:d,startOfBroadcastWeek:m,startOfISOWeek:p,startOfWeek:h}=r,y=e.reduce((g,v)=>{const b=n.broadcastCalendar?m(v,r):n.ISOWeek?p(v):h(v),x=n.broadcastCalendar?a(v):n.ISOWeek?i(s(v)):c(s(v)),w=t.filter(N=>N>=b&&N<=x),S=n.broadcastCalendar?35:42;if(n.fixedWeeks&&w.length<S){const N=t.filter(P=>{const F=S-w.length;return P>x&&P<=o(x,F)});w.push(...N)}const C=w.reduce((N,P)=>{const F=n.ISOWeek?u(P):d(P),_=N.find(I=>I.weekNumber===F),$=new hl(P,v,r);return _?_.days.push($):N.push(new Ob(F,[$])),N},[]),M=new kb(v,C);return g.push(M),g},[]);return n.reverseMonths?y.reverse():y}function Vx(e,t){let{startMonth:n,endMonth:r}=e;const{startOfYear:o,startOfDay:a,startOfMonth:i,endOfMonth:s,addYears:c,endOfYear:u,newDate:d,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=d(h,11,31));const v=e.captionLayout==="dropdown"||e.captionLayout==="dropdown-years";return n?n=i(n):p?n=d(p,0,1):!n&&v&&(n=o(c(e.today??m(),-100))),r?r=s(r):h?r=d(h,11,31):!r&&v&&(r=u(e.today??m())),[n&&a(n),r&&a(r)]}function Yx(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,d=i(e);if(!t)return s(d,u);if(!(c(t,e)<a))return s(d,u)}function Hx(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,d=i(e);if(!t)return s(d,-u);if(!(c(d,t)<=0))return s(d,-u)}function Gx(e){const t=[];return e.reduce((n,r)=>[...n,...r.weeks],t)}function kr(e,t){const[n,r]=E.useState(e);return[t===void 0?n:t,r]}function zx(e,t){const[n,r]=Vx(e,t),{startOfMonth:o,endOfMonth:a}=t,i=As(e,t),[s,c]=kr(i,e.month?i:void 0);E.useEffect(()=>{const M=As(e,t);c(M)},[e.timeZone]);const u=Wx(s,r,e,t),d=$x(u,e.endMonth?a(e.endMonth):void 0,e,t),m=Bx(u,d,e,t),p=Gx(m),h=Lx(m),y=Hx(s,n,e,t),g=Yx(s,r,e,t),{disableNavigation:v,onMonthChange:b}=e,x=M=>p.some(N=>N.days.some(P=>P.isEqualTo(M))),w=M=>{if(v)return;let N=o(M);n&&N<o(n)&&(N=o(n)),r&&N>o(r)&&(N=o(r)),c(N),b==null||b(N)};return{months:m,weeks:p,days:h,navStart:n,navEnd:r,previousMonth:y,nextMonth:g,goToMonth:w,goToDay:M=>{x(M)||w(M.date)}}}var He;(function(e){e[e.Today=0]="Today",e[e.Selected=1]="Selected",e[e.LastFocused=2]="LastFocused",e[e.FocusedModifier=3]="FocusedModifier"})(He||(He={}));function Ts(e){return!e[me.disabled]&&!e[me.hidden]&&!e[me.outside]}function Ux(e,t,n,r){let o,a=-1;for(const i of e){const s=t(i);Ts(s)&&(s[me.focused]&&a<He.FocusedModifier?(o=i,a=He.FocusedModifier):r!=null&&r.isEqualTo(i)&&a<He.LastFocused?(o=i,a=He.LastFocused):n(i.date)&&a<He.Selected?(o=i,a=He.Selected):s[me.today]&&a<He.Today&&(o=i,a=He.Today))}return o||(o=e.find(i=>Ts(t(i)))),o}function Kx(e,t,n,r,o,a,i){const{ISOWeek:s,broadcastCalendar:c}=a,{addDays:u,addMonths:d,addWeeks:m,addYears:p,endOfBroadcastWeek:h,endOfISOWeek:y,endOfWeek:g,max:v,min:b,startOfBroadcastWeek:x,startOfISOWeek:w,startOfWeek:S}=i;let M={day:u,week:m,month:d,year:p,startOfWeek:N=>c?x(N,i):s?w(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=b([o,M])),M}function Ml(e,t,n,r,o,a,i,s=0){if(s>365)return;const c=Kx(e,t,n.date,r,o,a,i),u=!!(a.disabled&&ot(c,a.disabled,i)),d=!!(a.hidden&&ot(c,a.hidden,i)),m=c,p=new hl(c,m,i);return!u&&!d?p:Ml(e,t,p,r,o,a,i,s+1)}function qx(e,t,n,r,o){const{autoFocus:a}=e,[i,s]=E.useState(),c=Ux(t.days,n,r||(()=>!1),i),[u,d]=E.useState(a?c:void 0);return{isFocusTarget:g=>!!(c!=null&&c.isEqualTo(g)),setFocused:d,focused:u,blur:()=>{s(u),d(void 0)},moveFocus:(g,v)=>{if(!u)return;const b=Ml(g,v,u,t.navStart,t.navEnd,e,o);b&&(t.goToDay(b),d(b))}}}function Xx(e,t){const{selected:n,required:r,onSelect:o}=e,[a,i]=kr(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:d,max:m}=e;return{selected:s,select:(h,y,g)=>{let v=[...s??[]];if(u(h)){if((s==null?void 0:s.length)===d||r&&(s==null?void 0:s.length)===1)return;v=s==null?void 0:s.filter(b=>!c(b,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 Zx(e,t,n=0,r=0,o=!1,a=Qe){const{from:i,to:s}=t||{},{isSameDay:c,isAfter:u,isBefore:d}=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:d(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(d(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 Qx(e,t,n=Qe){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 _s(e,t,n=Qe){return rt(e,t.from,!1,n)||rt(e,t.to,!1,n)||rt(t,e.from,!1,n)||rt(t,e.to,!1,n)}function Jx(e,t,n=Qe){const r=Array.isArray(t)?t:[t];if(r.filter(s=>typeof s!="function").some(s=>typeof s=="boolean"?s:n.isDate(s)?rt(e,s,!1,n):xl(s,n)?s.some(c=>rt(e,c,!1,n)):ba(s)?s.from&&s.to?_s(e,{from:s.from,to:s.to},n):!1:bl(s)?Qx(e,s.dayOfWeek,n):gl(s)?n.isAfter(s.before,s.after)?_s(e,{from:n.addDays(s.after,1),to:n.addDays(s.before,-1)},n):ot(e.from,s,n)||ot(e.to,s,n):vl(s)||yl(s)?ot(e.from,s,n)||ot(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(d=>d(s)))return!0;s=n.addDays(s,1)}}return!1}function ew(e,t){const{disabled:n,excludeDisabled:r,selected:o,required:a,onSelect:i}=e,[s,c]=kr(o,i?o:void 0),u=i?o:s;return{selected:u,select:(p,h,y)=>{const{min:g,max:v}=e,b=p?Zx(p,u,g,v,a,t):void 0;return r&&n&&(b!=null&&b.from)&&b.to&&Jx({from:b.from,to:b.to},n,t)&&(b.from=p,b.to=void 0),i||c(b),i==null||i(b,p,h,y),b},isSelected:p=>u&&rt(u,p,!1,t)}}function tw(e,t){const{selected:n,required:r,onSelect:o}=e,[a,i]=kr(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 nw(e,t){const n=tw(e,t),r=Xx(e,t),o=ew(e,t);switch(e.mode){case"single":return n;case"multiple":return r;case"range":return o;default:return}}function rw(e){var Ha;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=(Ha=t.selected)==null?void 0:Ha.map(ne=>new we(ne,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 ne={...ya,...t.locale};return{dateLib:new it({locale:ne,weekStartsOn:t.broadcastCalendar?1:t.weekStartsOn,firstWeekContainsDate:t.firstWeekContainsDate,useAdditionalWeekYearTokens:t.useAdditionalWeekYearTokens,useAdditionalDayOfYearTokens:t.useAdditionalDayOfYearTokens,timeZone:t.timeZone,numerals:t.numerals},t.dateLib),components:sx(t.components),formatters:vx(t.formatters),labels:{...Ax,...t.labels},locale:ne,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:d,numberOfMonths:m=1,onDayBlur:p,onDayClick:h,onDayFocus:y,onDayKeyDown:g,onDayMouseEnter:v,onDayMouseLeave:b,onNextClick:x,onPrevClick:w,showWeekNumber:S,styles:C}=t,{formatCaption:M,formatDay:N,formatMonthDropdown:P,formatWeekNumber:F,formatWeekNumberHeader:_,formatWeekdayName:$,formatYearDropdown:I}=r,B=zx(t,a),{days:Y,months:q,navStart:j,navEnd:G,previousMonth:T,nextMonth:D,goToMonth:Q}=B,J=Db(Y,t,a),{isSelected:R,select:L,selected:z}=nw(t,a)??{},{blur:W,focused:X,isFocusTarget:A,moveFocus:Z,setFocused:K}=qx(t,B,J,R??(()=>!1),a),{labelDayButton:te,labelGridcell:re,labelGrid:oe,labelMonthDropdown:he,labelNav:be,labelPrevious:Je,labelNext:et,labelWeekday:tt,labelWeekNumber:on,labelWeekNumberHeader:Te,labelYearDropdown:Yf}=o,Hf=E.useMemo(()=>xx(a,t.ISOWeek),[a,t.ISOWeek]),Va=u!==void 0||h!==void 0,Hr=E.useCallback(()=>{T&&(Q(T),w==null||w(T))},[T,Q,w]),Gr=E.useCallback(()=>{D&&(Q(D),x==null||x(D))},[Q,D,x]),Gf=E.useCallback((ne,fe)=>ce=>{ce.preventDefault(),ce.stopPropagation(),K(ne),L==null||L(ne.date,fe,ce),h==null||h(ne.date,fe,ce)},[L,h,K]),zf=E.useCallback((ne,fe)=>ce=>{K(ne),y==null||y(ne.date,fe,ce)},[y,K]),Uf=E.useCallback((ne,fe)=>ce=>{W(),p==null||p(ne.date,fe,ce)},[W,p]),Kf=E.useCallback((ne,fe)=>ce=>{const ct={ArrowLeft:["day",t.dir==="rtl"?"after":"before"],ArrowRight:["day",t.dir==="rtl"?"before":"after"],ArrowDown:["week","after"],ArrowUp:["week","before"],PageUp:[ce.shiftKey?"year":"month","before"],PageDown:[ce.shiftKey?"year":"month","after"],Home:["startOfWeek","before"],End:["endOfWeek","after"]};if(ct[ce.key]){ce.preventDefault(),ce.stopPropagation();const[_e,Vn]=ct[ce.key];Z(_e,Vn)}g==null||g(ne.date,fe,ce)},[Z,g,t.dir]),qf=E.useCallback((ne,fe)=>ce=>{v==null||v(ne.date,fe,ce)},[v]),Xf=E.useCallback((ne,fe)=>ce=>{b==null||b(ne.date,fe,ce)},[b]),Zf=E.useCallback(ne=>fe=>{const ce=Number(fe.target.value),ct=a.setMonth(a.startOfMonth(ne),ce);Q(ct)},[a,Q]),Qf=E.useCallback(ne=>fe=>{const ce=Number(fe.target.value),ct=a.setYear(a.startOfMonth(ne),ce);Q(ct)},[a,Q]),{className:Jf,style:em}=E.useMemo(()=>({className:[s[H.Root],t.className].filter(Boolean).join(" "),style:{...C==null?void 0:C[H.Root],...t.style}}),[s,t.className,t.style,C]),tm=ix(t),Ya=E.useRef(null);Fx(Ya,!!t.animate,{classNames:s,months:q,focused:X,dateLib:a});const nm={dayPickerProps:t,selected:z,select:L,isSelected:R,months:q,nextMonth:D,previousMonth:T,goToMonth:Q,getModifiers:J,components:n,classNames:s,styles:C,labels:o,formatters:r};return E.createElement(wl.Provider,{value:nm},E.createElement(n.Root,{rootRef:t.animate?Ya:void 0,className:Jf,style:em,dir:t.dir,id:t.id,lang:t.lang,nonce:t.nonce,title:t.title,role:t.role,"aria-label":t["aria-label"],...tm},E.createElement(n.Months,{className:s[H.Months],style:C==null?void 0:C[H.Months]},!t.hideNavigation&&!d&&E.createElement(n.Nav,{"data-animated-nav":t.animate?"true":void 0,className:s[H.Nav],style:C==null?void 0:C[H.Nav],"aria-label":be(),onPreviousClick:Hr,onNextClick:Gr,previousMonth:T,nextMonth:D}),q.map((ne,fe)=>{const ce=yx(ne.date,j,G,r,a),ct=wx(j,G,r,a);return E.createElement(n.Month,{"data-animated-month":t.animate?"true":void 0,className:s[H.Month],style:C==null?void 0:C[H.Month],key:fe,displayIndex:fe,calendarMonth:ne},d==="around"&&!t.hideNavigation&&fe===0&&E.createElement(n.PreviousMonthButton,{type:"button",className:s[H.PreviousMonthButton],tabIndex:T?void 0:-1,"aria-disabled":T?void 0:!0,"aria-label":Je(T),onClick:Hr,"data-animated-button":t.animate?"true":void 0},E.createElement(n.Chevron,{disabled:T?void 0:!0,className:s[H.Chevron],orientation:t.dir==="rtl"?"right":"left"})),E.createElement(n.MonthCaption,{"data-animated-caption":t.animate?"true":void 0,className:s[H.MonthCaption],style:C==null?void 0:C[H.MonthCaption],calendarMonth:ne,displayIndex:fe},c!=null&&c.startsWith("dropdown")?E.createElement(n.DropdownNav,{className:s[H.Dropdowns],style:C==null?void 0:C[H.Dropdowns]},c==="dropdown"||c==="dropdown-months"?E.createElement(n.MonthsDropdown,{className:s[H.MonthsDropdown],"aria-label":he(),classNames:s,components:n,disabled:!!t.disableNavigation,onChange:Zf(ne.date),options:ce,style:C==null?void 0:C[H.Dropdown],value:a.getMonth(ne.date)}):E.createElement("span",null,P(ne.date,a)),c==="dropdown"||c==="dropdown-years"?E.createElement(n.YearsDropdown,{className:s[H.YearsDropdown],"aria-label":Yf(a.options),classNames:s,components:n,disabled:!!t.disableNavigation,onChange:Qf(ne.date),options:ct,style:C==null?void 0:C[H.Dropdown],value:a.getYear(ne.date)}):E.createElement("span",null,I(ne.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(ne.date,a.options,a))):E.createElement(n.CaptionLabel,{className:s[H.CaptionLabel],role:"status","aria-live":"polite"},M(ne.date,a.options,a))),d==="around"&&!t.hideNavigation&&fe===m-1&&E.createElement(n.NextMonthButton,{type:"button",className:s[H.NextMonthButton],tabIndex:D?void 0:-1,"aria-disabled":D?void 0:!0,"aria-label":et(D),onClick:Gr,"data-animated-button":t.animate?"true":void 0},E.createElement(n.Chevron,{disabled:D?void 0:!0,className:s[H.Chevron],orientation:t.dir==="rtl"?"left":"right"})),fe===m-1&&d==="after"&&!t.hideNavigation&&E.createElement(n.Nav,{"data-animated-nav":t.animate?"true":void 0,className:s[H.Nav],style:C==null?void 0:C[H.Nav],"aria-label":be(),onPreviousClick:Hr,onNextClick:Gr,previousMonth:T,nextMonth:D}),E.createElement(n.MonthGrid,{role:"grid","aria-multiselectable":u==="multiple"||u==="range","aria-label":oe(ne.date,a.options,a)||void 0,className:s[H.MonthGrid],style:C==null?void 0:C[H.MonthGrid]},!t.hideWeekdays&&E.createElement(n.Weekdays,{"data-animated-weekdays":t.animate?"true":void 0,className:s[H.Weekdays],style:C==null?void 0:C[H.Weekdays]},S&&E.createElement(n.WeekNumberHeader,{"aria-label":Te(a.options),className:s[H.WeekNumberHeader],style:C==null?void 0:C[H.WeekNumberHeader],scope:"col"},_()),Hf.map((_e,Vn)=>E.createElement(n.Weekday,{"aria-label":tt(_e,a.options,a),className:s[H.Weekday],key:Vn,style:C==null?void 0:C[H.Weekday],scope:"col"},$(_e,a.options,a)))),E.createElement(n.Weeks,{"data-animated-weeks":t.animate?"true":void 0,className:s[H.Weeks],style:C==null?void 0:C[H.Weeks]},ne.weeks.map((_e,Vn)=>E.createElement(n.Week,{className:s[H.Week],key:_e.weekNumber,style:C==null?void 0:C[H.Week],week:_e},S&&E.createElement(n.WeekNumber,{week:_e,style:C==null?void 0:C[H.WeekNumber],"aria-label":on(_e.weekNumber,{locale:i}),className:s[H.WeekNumber],scope:"row",role:"rowheader"},F(_e.weekNumber,a)),_e.days.map(xe=>{const{date:Ye}=xe,ae=J(xe);if(ae[me.focused]=!ae.hidden&&!!(X!=null&&X.isEqualTo(xe)),ae[Fe.selected]=(R==null?void 0:R(Ye))||ae.selected,ba(z)){const{from:zr,to:Ur}=z;ae[Fe.range_start]=!!(zr&&Ur&&a.isSameDay(Ye,zr)),ae[Fe.range_end]=!!(zr&&Ur&&a.isSameDay(Ye,Ur)),ae[Fe.range_middle]=rt(z,Ye,!0,a)}const rm=bx(ae,C,t.modifiersStyles),om=Ib(ae,s,t.modifiersClassNames),am=!Va&&!ae.hidden?re(Ye,ae,a.options,a):void 0;return E.createElement(n.Day,{key:`${a.format(Ye,"yyyy-MM-dd")}_${a.format(xe.displayMonth,"yyyy-MM")}`,day:xe,modifiers:ae,className:om.join(" "),style:rm,role:"gridcell","aria-selected":ae.selected||void 0,"aria-label":am,"data-day":a.format(Ye,"yyyy-MM-dd"),"data-month":xe.outside?a.format(Ye,"yyyy-MM"):void 0,"data-selected":ae.selected||void 0,"data-disabled":ae.disabled||void 0,"data-hidden":ae.hidden||void 0,"data-outside":xe.outside||void 0,"data-focused":ae.focused||void 0,"data-today":ae.today||void 0},!ae.hidden&&Va?E.createElement(n.DayButton,{className:s[H.DayButton],style:C==null?void 0:C[H.DayButton],type:"button",day:xe,modifiers:ae,disabled:ae.disabled||void 0,tabIndex:A(xe)?0:-1,"aria-label":te(Ye,ae,a.options,a),onClick:Gf(xe,ae),onBlur:Uf(xe,ae),onFocus:zf(xe,ae),onKeyDown:Kf(xe,ae),onMouseEnter:qf(xe,ae),onMouseLeave:Xf(xe,ae)},N(Ye,a.options,a)):!ae.hidden&&N(xe.date,a.options,a))}))))))})),t.footer&&E.createElement(n.Footer,{className:s[H.Footer],style:C==null?void 0:C[H.Footer],role:"status","aria-live":"polite"},t.footer)))}const ow=()=>Array.from({length:12},(e,t)=>new Date(0,t).toLocaleString("en-US",{month:"long"})),aw=e=>{const{onSelect:t}=e,n=E.useRef(null);return E.useEffect(()=>{n.current&&n.current.focus()},[]),f.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
|
|
160
|
+
lg:grid-cols-3`,children:ow().map((r,o)=>f.jsx(Oe,{ref:o===0?n:void 0,className:k(`relative min-h-10 w-full text-center text-sm font-normal focus-within:relative
|
|
161
|
+
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))})},sw=(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},iw=e=>{const{onSelect:t,startMonth:n,endMonth:r}=e,o=E.useRef(null);return E.useEffect(()=>{o.current&&o.current.focus()},[]),f.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
|
|
162
|
+
lg:grid-cols-4`,children:sw(n,r).map((a,i)=>f.jsx(Oe,{ref:i===0?o:void 0,className:k(`relative min-h-10 w-full text-center text-sm font-normal focus-within:relative
|
|
163
|
+
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 xa({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),d="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=w=>{if(o==="month"||o==="year")return f.jsx(f.Fragment,{});const{orientation:S}=w;return S==="left"?f.jsx(Op,{...w}):f.jsx(Ko,{...w})},g=w=>{const{calendarMonth:S}=w;return f.jsxs("div",{className:k(d,"relative mx-12 flex items-center justify-center text-sm font-medium"),children:[f.jsx(Oe,{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"})}),f.jsx(Oe,{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"?f.jsx(aw,{onSelect:w=>{const S=i?new Date(i):new Date;S.setMonth(w),s(S),a("default"),setTimeout(()=>{var C;(C=c.current)==null||C.focus()},0)}}):o==="year"?f.jsx(iw,{endMonth:r.endMonth,startMonth:r.startMonth,onSelect:w=>{const S=i?new Date(i):new Date;S.setFullYear(w),s(S),a("default"),setTimeout(()=>{var C;(C=u.current)==null||C.focus()},0)}}):f.jsx(f.Fragment,{}),b=()=>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 f.jsx(rw,{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(d,"relative flex items-center justify-center text-sm font-medium"),nav:"absolute left-4 right-4 flex items-center justify-between",button_previous:k(Et({variant:"ghost"}),d,m),button_next:k(Et({variant:"ghost"}),d,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(Et({variant:"ghost"}),p,h,`relative rounded-l-full rounded-r-full text-center text-sm font-normal
|
|
164
164
|
focus-within:relative focus-within:z-20 focus:opacity-100 focus:ring-2
|
|
165
|
-
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:b(),defaultMonth:x,month:i,showOutsideDays:n,onMonthChange:s,...r,disableNavigation:o!=="default"})}var
|
|
165
|
+
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:b(),defaultMonth:x,month:i,showOutsideDays:n,onMonthChange:s,...r,disableNavigation:o!=="default"})}var cw="Label",Rl=l.forwardRef((e,t)=>f.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())}}));Rl.displayName=cw;var Pl=Rl;const tn=l.forwardRef(({className:e,...t},n)=>f.jsx(Pl,{ref:n,className:k(le.text.label,e),...t}));tn.displayName=Pl.displayName;function Or(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",[lw,_E]=ve(Dr),[uw,dw]=lw(Dr),kl=l.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:r,checked:o,defaultChecked:a,required:i,disabled:s,value:c="on",onCheckedChange:u,form:d,...m}=e,[p,h]=l.useState(null),y=U(t,S=>h(S)),g=l.useRef(!1),v=p?d||!!p.closest("form"):!0,[b,x]=Ce({prop:o,defaultProp:a??!1,onChange:u,caller:Dr}),w=l.useRef(b);return l.useEffect(()=>{const S=p==null?void 0:p.form;if(S){const C=()=>x(w.current);return S.addEventListener("reset",C),()=>S.removeEventListener("reset",C)}},[p,x]),f.jsxs(uw,{scope:n,state:b,disabled:s,children:[f.jsx(V.button,{type:"button",role:"checkbox","aria-checked":mt(b)?"mixed":b,"aria-required":i,"data-state":Al(b),"data-disabled":s?"":void 0,disabled:s,value:c,...m,ref:y,onKeyDown:O(e.onKeyDown,S=>{S.key==="Enter"&&S.preventDefault()}),onClick:O(e.onClick,S=>{x(C=>mt(C)?!0:!C),v&&(g.current=S.isPropagationStopped(),g.current||S.stopPropagation())})}),v&&f.jsx(Il,{control:p,bubbles:!g.current,name:r,value:c,checked:b,required:i,disabled:s,form:d,style:{transform:"translateX(-100%)"},defaultChecked:mt(a)?!1:a})]})});kl.displayName=Dr;var Ol="CheckboxIndicator",Dl=l.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...o}=e,a=dw(Ol,n);return f.jsx(Ie,{present:r||mt(a.state)||a.state===!0,children:f.jsx(V.span,{"data-state":Al(a.state),"data-disabled":a.disabled?"":void 0,...o,ref:t,style:{pointerEvents:"none",...e.style}})})});Dl.displayName=Ol;var fw="CheckboxBubbleInput",Il=l.forwardRef(({__scopeCheckbox:e,control:t,checked:n,bubbles:r=!0,defaultChecked:o,...a},i)=>{const s=l.useRef(null),c=U(s,i),u=Or(n),d=In(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=mt(n),g.call(p,mt(n)?!1:n),p.dispatchEvent(v)}},[u,n,r]);const m=l.useRef(mt(n)?!1:n);return f.jsx(V.input,{type:"checkbox","aria-hidden":!0,defaultChecked:o??m.current,...a,tabIndex:-1,ref:c,style:{...a.style,...d,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});Il.displayName=fw;function mt(e){return e==="indeterminate"}function Al(e){return mt(e)?"indeterminate":e?"checked":"unchecked"}var Tl=kl,mw=Dl;const wa=l.forwardRef(({className:e,label:t,id:n,"aria-label":r,isChecked:o=!1,isDisabled:a=!1,...i},s)=>{const c=Xe({isDisabled:a});if(!t&&!r)throw new Error("Checkbox must have either a label prop or an aria-label attribute");if(t&&r)throw new Error("Checkbox must have either a label prop or an aria-label attribute, but not both");return f.jsxs("div",{className:"flex items-center space-x-2",children:[f.jsx(Tl,{ref:s,"aria-label":r,checked:o,className:k(le.focusRingVisible,le.focusRingVisibleSm,`peer h-5 w-5 shrink-0 rounded-sm border-2 border-gray-500 ring-offset-background
|
|
166
166
|
disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:border-primary-400
|
|
167
|
-
data-[state=checked]:bg-primary-400 data-[state=checked]:text-white`,e),id:n,...i,...c,children:f.jsx(lw,{className:k("flex items-center justify-center text-current"),children:f.jsx(Kt,{className:"h-4 w-4",strokeWidth:3})})}),t?typeof t=="string"?f.jsx(tn,{htmlFor:n,children:t}):t:null]})});xa.displayName=Tl.displayName;const Il=l.forwardRef(({options:e,value:t,onChange:n,className:r,columns:o=2,...a},i)=>f.jsx("div",{ref:i,className:k("",r),...a,children:f.jsx("div",{className:k("grid gap-3",o===1&&"grid-cols-1",o===2&&"grid-cols-2",o===3&&"grid-cols-3",o===4&&"grid-cols-4"),children:e.map(s=>f.jsx("div",{className:"flex items-center space-x-2",children:f.jsx(xa,{id:s.id,isChecked:t.includes(s.id),label:s.label,onCheckedChange:c=>{n(c?[...t,s.id]:t.filter(u=>u!==s.id))}})},s.id))})}));Il.displayName="CheckboxGroup";const _l=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,...d},m)=>{var g;const[p,h]=E.useState(!1),y=Ve("dropdown",c);return f.jsxs(Qt,{open:p,onOpenChange:h,children:[f.jsx(Jt,{asChild:!0,children:f.jsxs(Oe,{ref:m,"aria-expanded":p,className:k("w-full justify-between px-3",!t&&"text-muted-foreground",i),isDisabled:u,role:"combobox",variant:"input",...d,children:[t?(g=e.find(v=>v.value===t))==null?void 0:g.label:r,f.jsx(qo,{className:"ml-2 h-4 w-4 shrink-0 opacity-50"})]})}),f.jsx(Ot,{align:"start",className:"w-[--radix-popover-trigger-width] px-0 py-0",zIndex:y,children:f.jsxs(br,{children:[f.jsx(wr,{placeholder:o}),f.jsxs(Sr,{className:k("max-h-[16.5rem] overflow-y-auto",s),children:[f.jsx(ra,{children:a}),f.jsx(xr,{children:e.map(v=>f.jsxs(Cr,{value:v.value,onSelect:b=>{n(b===t?"":b),h(!1)},children:[f.jsx(Kt,{className:k("mr-2 h-4 w-4",t===v.value?"opacity-100":"opacity-0")}),v.label]},v.value))})]})]})})]})});_l.displayName="Combobox";const jl=E.forwardRef(({value:e,startMonth:t,endMonth:n,onChange:r,placeholder:o="Pick a date",className:a,zIndex:i,isDisabled:s=!1,...c},u)=>{const[d,m]=E.useState(!1),p=Ve("popover",i),h=y=>{r(y),m(!1)};return f.jsxs(Qt,{open:d,onOpenChange:m,children:[f.jsx(Jt,{asChild:!0,children:f.jsxs(Oe,{ref:u,className:k("w-full justify-start px-3 text-left font-normal",!e&&"text-muted-foreground",a),isDisabled:s,variant:"input",...c,"data-component":"date-picker",children:[f.jsx(mi,{className:"mr-2 h-4 w-4"}),e?hn(e,"LLLL dd, y"):f.jsx("span",{children:o})]})}),f.jsx(Ot,{align:"start",className:"w-auto px-0 py-0",zIndex:p,children:f.jsx(ba,{autoFocus:!0,endMonth:n,mode:"single",selected:e,startMonth:t,onSelect:h})})]})});jl.displayName="DatePicker";const Fl=l.forwardRef(({value:e,onChange:t,placeholder:n={from:"Pick start date",to:"Pick end date"},className:r,zIndex:o,isDisabled:a=!1,...i},s)=>{const c=Ve("popover",o),u=d=>{const{from:m,to:p}=e;if(!m)return t({from:d,to:void 0});if(d<m)return t({from:d,to:void 0});if(m&&p)return t({from:d,to:void 0});if(d>m)return t({from:m,to:d});if(d.getTime()===m.getTime())return t({from:void 0,to:void 0})};return f.jsx("div",{className:k("grid gap-2",r),children:f.jsxs(Qt,{children:[f.jsx(Jt,{asChild:!0,children:f.jsxs(Oe,{ref:s,className:k("w-full justify-start px-3 text-left font-normal",!e.from&&!e.to&&"text-muted-foreground"),id:"date",isDisabled:a,variant:"input",...i,"data-component":"date-range-picker",children:[f.jsx(mi,{className:"mr-2 h-4 w-4"}),e.from?e.to?f.jsxs(f.Fragment,{children:[hn(e.from,"LLLL dd, y")," - ",hn(e.to,"LLLL dd, y")]}):hn(e.from,"LLLL dd, y"):f.jsx("span",{children:n.from})]})}),f.jsx(Ot,{align:"start",className:"w-auto px-0 py-0",zIndex:c,children:f.jsx(ba,{autoFocus:!0,defaultMonth:e.from,mode:"range",modifiers:{today:()=>!1},numberOfMonths:2,selected:{from:e.from,to:e.to},showOutsideDays:!1,onDayClick:u,onSelect:d=>{d&&t(d)}})})]})})});Fl.displayName="DateRangePicker";const $l=l.forwardRef(({className:e,...t},n)=>f.jsx(Xi,{ref:n,className:k(le.text.hint,e),...t}));$l.displayName=Xi.displayName;const Ll=({className:e,...t})=>f.jsx("div",{className:k("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Ll.displayName="DialogFooter";const Wl=({className:e,...t})=>f.jsx("div",{className:k("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});Wl.displayName="DialogHeader";const Bl=l.forwardRef(({className:e,...t},n)=>f.jsx(qi,{ref:n,className:k(le.text.title,"leading-none tracking-tight",e),...t}));Bl.displayName=qi.displayName;var mo="rovingFocusGroup.onEntryFocus",uw={bubbles:!1,cancelable:!0},Fn="RovingFocusGroup",[Ro,Vl,dw]=Nn(Fn),[fw,Yl]=ve(Fn,[dw]),[mw,pw]=fw(Fn),Hl=l.forwardRef((e,t)=>f.jsx(Ro.Provider,{scope:e.__scopeRovingFocusGroup,children:f.jsx(Ro.Slot,{scope:e.__scopeRovingFocusGroup,children:f.jsx(hw,{...e,ref:t})})}));Hl.displayName=Fn;var hw=l.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:a,currentTabStopId:i,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:c,onEntryFocus:u,preventScrollOnEntryFocus:d=!1,...m}=e,p=l.useRef(null),h=U(t,p),y=bt(a),[g,v]=Ce({prop:i,defaultProp:s??null,onChange:c,caller:Fn}),[b,x]=l.useState(!1),w=Se(u),S=Vl(n),C=l.useRef(!1),[M,N]=l.useState(0);return l.useEffect(()=>{const P=p.current;if(P)return P.addEventListener(mo,w),()=>P.removeEventListener(mo,w)},[w]),f.jsx(mw,{scope:n,orientation:r,dir:y,loop:o,currentTabStopId:g,onItemFocus:l.useCallback(P=>v(P),[v]),onItemShiftTab:l.useCallback(()=>x(!0),[]),onFocusableItemAdd:l.useCallback(()=>N(P=>P+1),[]),onFocusableItemRemove:l.useCallback(()=>N(P=>P-1),[]),children:f.jsx(V.div,{tabIndex:b||M===0?-1:0,"data-orientation":r,...m,ref:h,style:{outline:"none",...e.style},onMouseDown:O(e.onMouseDown,()=>{C.current=!0}),onFocus:O(e.onFocus,P=>{const F=!C.current;if(P.target===P.currentTarget&&F&&!b){const _=new CustomEvent(mo,uw);if(P.currentTarget.dispatchEvent(_),!_.defaultPrevented){const $=S().filter(j=>j.focusable),A=$.find(j=>j.active),B=$.find(j=>j.id===g),q=[A,B,...$].filter(Boolean).map(j=>j.ref.current);Ul(q,d)}}C.current=!1}),onBlur:O(e.onBlur,()=>x(!1))})})}),Gl="RovingFocusGroupItem",zl=l.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:a,children:i,...s}=e,c=pe(),u=a||c,d=pw(Gl,n),m=d.currentTabStopId===u,p=Vl(n),{onFocusableItemAdd:h,onFocusableItemRemove:y,currentTabStopId:g}=d;return l.useEffect(()=>{if(r)return h(),()=>y()},[r,h,y]),f.jsx(Ro.ItemSlot,{scope:n,id:u,focusable:r,active:o,children:f.jsx(V.span,{tabIndex:m?0:-1,"data-orientation":d.orientation,...s,ref:t,onMouseDown:O(e.onMouseDown,v=>{r?d.onItemFocus(u):v.preventDefault()}),onFocus:O(e.onFocus,()=>d.onItemFocus(u)),onKeyDown:O(e.onKeyDown,v=>{if(v.key==="Tab"&&v.shiftKey){d.onItemShiftTab();return}if(v.target!==v.currentTarget)return;const b=yw(v,d.orientation,d.dir);if(b!==void 0){if(v.metaKey||v.ctrlKey||v.altKey||v.shiftKey)return;v.preventDefault();let w=p().filter(S=>S.focusable).map(S=>S.ref.current);if(b==="last")w.reverse();else if(b==="prev"||b==="next"){b==="prev"&&w.reverse();const S=w.indexOf(v.currentTarget);w=d.loop?bw(w,S+1):w.slice(S+1)}setTimeout(()=>Ul(w))}}),children:typeof i=="function"?i({isCurrentTabStop:m,hasTabStop:g!=null}):i})})});zl.displayName=Gl;var gw={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function vw(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function yw(e,t,n){const r=vw(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return gw[r]}function Ul(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function bw(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var xw=Hl,ww=zl,Po=["Enter"," "],Cw=["ArrowDown","PageUp","Home"],Kl=["ArrowUp","PageDown","End"],Sw=[...Cw,...Kl],Ew={ltr:[...Po,"ArrowRight"],rtl:[...Po,"ArrowLeft"]},Nw={ltr:["ArrowLeft"],rtl:["ArrowRight"]},$n="Menu",[wn,Mw,Rw]=Nn($n),[Dt,ql]=ve($n,[Rw,Zt,Yl]),Ar=Zt(),Xl=Yl(),[Pw,At]=Dt($n),[kw,Ln]=Dt($n),Zl=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),d=l.useRef(!1),m=Se(a),p=bt(o);return l.useEffect(()=>{const h=()=>{d.current=!0,document.addEventListener("pointerdown",y,{capture:!0,once:!0}),document.addEventListener("pointermove",y,{capture:!0,once:!0})},y=()=>d.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})}},[]),f.jsx(ma,{...s,children:f.jsx(Pw,{scope:t,open:n,onOpenChange:m,content:c,onContentChange:u,children:f.jsx(kw,{scope:t,onClose:l.useCallback(()=>m(!1),[m]),isUsingKeyboardRef:d,dir:p,modal:i,children:r})})})};Zl.displayName=$n;var Ow="MenuAnchor",wa=l.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=Ar(n);return f.jsx(Rr,{...o,...r,ref:t})});wa.displayName=Ow;var Ca="MenuPortal",[Dw,Ql]=Dt(Ca,{forceMount:void 0}),Jl=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:o}=e,a=At(Ca,t);return f.jsx(Dw,{scope:t,forceMount:n,children:f.jsx(Ae,{present:n||a.open,children:f.jsx(Pn,{asChild:!0,container:o,children:r})})})};Jl.displayName=Ca;var ke="MenuContent",[Aw,Sa]=Dt(ke),eu=l.forwardRef((e,t)=>{const n=Ql(ke,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,a=At(ke,e.__scopeMenu),i=Ln(ke,e.__scopeMenu);return f.jsx(wn.Provider,{scope:e.__scopeMenu,children:f.jsx(Ae,{present:r||a.open,children:f.jsx(wn.Slot,{scope:e.__scopeMenu,children:i.modal?f.jsx(Tw,{...o,ref:t}):f.jsx(Iw,{...o,ref:t})})})})}),Tw=l.forwardRef((e,t)=>{const n=At(ke,e.__scopeMenu),r=l.useRef(null),o=U(t,r);return l.useEffect(()=>{const a=r.current;if(a)return gr(a)},[]),f.jsx(Ea,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:O(e.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),Iw=l.forwardRef((e,t)=>{const n=At(ke,e.__scopeMenu);return f.jsx(Ea,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),_w=pt("MenuContent.ScrollLock"),Ea=l.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:o,onOpenAutoFocus:a,onCloseAutoFocus:i,disableOutsidePointerEvents:s,onEntryFocus:c,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:m,onInteractOutside:p,onDismiss:h,disableOutsideScroll:y,...g}=e,v=At(ke,n),b=Ln(ke,n),x=Ar(n),w=Xl(n),S=Mw(n),[C,M]=l.useState(null),N=l.useRef(null),P=U(t,N,v.onContentChange),F=l.useRef(0),_=l.useRef(""),$=l.useRef(0),A=l.useRef(null),B=l.useRef("right"),Y=l.useRef(0),q=y?kn:l.Fragment,j=y?{as:_w,allowPinchZoom:!0}:void 0,G=D=>{var T,Z;const Q=_.current+D,J=S().filter(K=>!K.disabled),R=document.activeElement,L=(T=J.find(K=>K.ref.current===R))==null?void 0:T.textValue,z=J.map(K=>K.textValue),W=Uw(z,Q,L),X=(Z=J.find(K=>K.textValue===W))==null?void 0:Z.ref.current;(function K(te){_.current=te,window.clearTimeout(F.current),te!==""&&(F.current=window.setTimeout(()=>K(""),1e3))})(Q),X&&setTimeout(()=>X.focus())};l.useEffect(()=>()=>window.clearTimeout(F.current),[]),pr();const I=l.useCallback(D=>{var J,R;return B.current===((J=A.current)==null?void 0:J.side)&&qw(D,(R=A.current)==null?void 0:R.area)},[]);return f.jsx(Aw,{scope:n,searchRef:_,onItemEnter:l.useCallback(D=>{I(D)&&D.preventDefault()},[I]),onItemLeave:l.useCallback(D=>{var Q;I(D)||((Q=N.current)==null||Q.focus(),M(null))},[I]),onTriggerLeave:l.useCallback(D=>{I(D)&&D.preventDefault()},[I]),pointerGraceTimerRef:$,onPointerGraceIntentChange:l.useCallback(D=>{A.current=D},[]),children:f.jsx(q,{...j,children:f.jsx(Rn,{asChild:!0,trapped:o,onMountAutoFocus:O(a,D=>{var Q;D.preventDefault(),(Q=N.current)==null||Q.focus({preventScroll:!0})}),onUnmountAutoFocus:i,children:f.jsx(Mn,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:m,onInteractOutside:p,onDismiss:h,children:f.jsx(xw,{asChild:!0,...w,dir:b.dir,orientation:"vertical",loop:r,currentTabStopId:C,onCurrentTabStopIdChange:M,onEntryFocus:O(c,D=>{b.isUsingKeyboardRef.current||D.preventDefault()}),preventScrollOnEntryFocus:!0,children:f.jsx(pa,{role:"menu","aria-orientation":"vertical","data-state":gu(v.open),"data-radix-menu-content":"",dir:b.dir,...x,...g,ref:P,style:{outline:"none",...g.style},onKeyDown:O(g.onKeyDown,D=>{const J=D.target.closest("[data-radix-menu-content]")===D.currentTarget,R=D.ctrlKey||D.altKey||D.metaKey,L=D.key.length===1;J&&(D.key==="Tab"&&D.preventDefault(),!R&&L&&G(D.key));const z=N.current;if(D.target!==z||!Sw.includes(D.key))return;D.preventDefault();const X=S().filter(T=>!T.disabled).map(T=>T.ref.current);Kl.includes(D.key)&&X.reverse(),Gw(X)}),onBlur:O(e.onBlur,D=>{D.currentTarget.contains(D.target)||(window.clearTimeout(F.current),_.current="")}),onPointerMove:O(e.onPointerMove,Cn(D=>{const Q=D.target,J=Y.current!==D.clientX;if(D.currentTarget.contains(Q)&&J){const R=D.clientX>Y.current?"right":"left";B.current=R,Y.current=D.clientX}}))})})})})})})});eu.displayName=ke;var jw="MenuGroup",Na=l.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return f.jsx(V.div,{role:"group",...r,ref:t})});Na.displayName=jw;var Fw="MenuLabel",tu=l.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return f.jsx(V.div,{...r,ref:t})});tu.displayName=Fw;var ir="MenuItem",_s="menu.itemSelect",Tr=l.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...o}=e,a=l.useRef(null),i=Ln(ir,e.__scopeMenu),s=Sa(ir,e.__scopeMenu),c=U(t,a),u=l.useRef(!1),d=()=>{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}),Ks(m,p),p.defaultPrevented?u.current=!1:i.onClose()}};return f.jsx(nu,{...o,ref:c,disabled:n,onClick:O(e.onClick,d),onPointerDown:m=>{var p;(p=e.onPointerDown)==null||p.call(e,m),u.current=!0},onPointerUp:O(e.onPointerUp,m=>{var p;u.current||(p=m.currentTarget)==null||p.click()}),onKeyDown:O(e.onKeyDown,m=>{const p=s.searchRef.current!=="";n||p&&m.key===" "||Po.includes(m.key)&&(m.currentTarget.click(),m.preventDefault())})})});Tr.displayName=ir;var nu=l.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:o,...a}=e,i=Sa(ir,n),s=Xl(n),c=l.useRef(null),u=U(t,c),[d,m]=l.useState(!1),[p,h]=l.useState("");return l.useEffect(()=>{const y=c.current;y&&h((y.textContent??"").trim())},[a.children]),f.jsx(wn.ItemSlot,{scope:n,disabled:r,textValue:o??p,children:f.jsx(ww,{asChild:!0,...s,focusable:!r,children:f.jsx(V.div,{role:"menuitem","data-highlighted":d?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...a,ref:u,onPointerMove:O(e.onPointerMove,Cn(y=>{r?i.onItemLeave(y):(i.onItemEnter(y),y.defaultPrevented||y.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:O(e.onPointerLeave,Cn(y=>i.onItemLeave(y))),onFocus:O(e.onFocus,()=>m(!0)),onBlur:O(e.onBlur,()=>m(!1))})})})}),$w="MenuCheckboxItem",ru=l.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...o}=e;return f.jsx(cu,{scope:e.__scopeMenu,checked:n,children:f.jsx(Tr,{role:"menuitemcheckbox","aria-checked":cr(n)?"mixed":n,...o,ref:t,"data-state":Ra(n),onSelect:O(o.onSelect,()=>r==null?void 0:r(cr(n)?!0:!n),{checkForDefaultPrevented:!1})})})});ru.displayName=$w;var ou="MenuRadioGroup",[Lw,Ww]=Dt(ou,{value:void 0,onValueChange:()=>{}}),au=l.forwardRef((e,t)=>{const{value:n,onValueChange:r,...o}=e,a=Se(r);return f.jsx(Lw,{scope:e.__scopeMenu,value:n,onValueChange:a,children:f.jsx(Na,{...o,ref:t})})});au.displayName=ou;var su="MenuRadioItem",iu=l.forwardRef((e,t)=>{const{value:n,...r}=e,o=Ww(su,e.__scopeMenu),a=n===o.value;return f.jsx(cu,{scope:e.__scopeMenu,checked:a,children:f.jsx(Tr,{role:"menuitemradio","aria-checked":a,...r,ref:t,"data-state":Ra(a),onSelect:O(r.onSelect,()=>{var i;return(i=o.onValueChange)==null?void 0:i.call(o,n)},{checkForDefaultPrevented:!1})})})});iu.displayName=su;var Ma="MenuItemIndicator",[cu,Bw]=Dt(Ma,{checked:!1}),lu=l.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...o}=e,a=Bw(Ma,n);return f.jsx(Ae,{present:r||cr(a.checked)||a.checked===!0,children:f.jsx(V.span,{...o,ref:t,"data-state":Ra(a.checked)})})});lu.displayName=Ma;var Vw="MenuSeparator",uu=l.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return f.jsx(V.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});uu.displayName=Vw;var Yw="MenuArrow",du=l.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=Ar(n);return f.jsx(ha,{...o,...r,ref:t})});du.displayName=Yw;var Hw="MenuSub",[_E,fu]=Dt(Hw),fn="MenuSubTrigger",mu=l.forwardRef((e,t)=>{const n=At(fn,e.__scopeMenu),r=Ln(fn,e.__scopeMenu),o=fu(fn,e.__scopeMenu),a=Sa(fn,e.__scopeMenu),i=l.useRef(null),{pointerGraceTimerRef:s,onPointerGraceIntentChange:c}=a,u={__scopeMenu:e.__scopeMenu},d=l.useCallback(()=>{i.current&&window.clearTimeout(i.current),i.current=null},[]);return l.useEffect(()=>d,[d]),l.useEffect(()=>{const m=s.current;return()=>{window.clearTimeout(m),c(null)}},[s,c]),f.jsx(wa,{asChild:!0,...u,children:f.jsx(nu,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":o.contentId,"data-state":gu(n.open),...e,ref:Ke(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:O(e.onPointerMove,Cn(m=>{a.onItemEnter(m),!m.defaultPrevented&&!e.disabled&&!n.open&&!i.current&&(a.onPointerGraceIntentChange(null),i.current=window.setTimeout(()=>{n.onOpenChange(!0),d()},100))})),onPointerLeave:O(e.onPointerLeave,Cn(m=>{var h,y;d();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",b=v?-5:5,x=p[v?"left":"right"],w=p[v?"right":"left"];a.onPointerGraceIntentChange({area:[{x:m.clientX+b,y:m.clientY},{x,y:p.top},{x:w,y:p.top},{x:w,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:O(e.onKeyDown,m=>{var h;const p=a.searchRef.current!=="";e.disabled||p&&m.key===" "||Ew[r.dir].includes(m.key)&&(n.onOpenChange(!0),(h=n.content)==null||h.focus(),m.preventDefault())})})})});mu.displayName=fn;var pu="MenuSubContent",hu=l.forwardRef((e,t)=>{const n=Ql(ke,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,a=At(ke,e.__scopeMenu),i=Ln(ke,e.__scopeMenu),s=fu(pu,e.__scopeMenu),c=l.useRef(null),u=U(t,c);return f.jsx(wn.Provider,{scope:e.__scopeMenu,children:f.jsx(Ae,{present:r||a.open,children:f.jsx(wn.Slot,{scope:e.__scopeMenu,children:f.jsx(Ea,{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:d=>{var m;i.isUsingKeyboardRef.current&&((m=c.current)==null||m.focus()),d.preventDefault()},onCloseAutoFocus:d=>d.preventDefault(),onFocusOutside:O(e.onFocusOutside,d=>{d.target!==s.trigger&&a.onOpenChange(!1)}),onEscapeKeyDown:O(e.onEscapeKeyDown,d=>{i.onClose(),d.preventDefault()}),onKeyDown:O(e.onKeyDown,d=>{var h;const m=d.currentTarget.contains(d.target),p=Nw[i.dir].includes(d.key);m&&p&&(a.onOpenChange(!1),(h=s.trigger)==null||h.focus(),d.preventDefault())})})})})})});hu.displayName=pu;function gu(e){return e?"open":"closed"}function cr(e){return e==="indeterminate"}function Ra(e){return cr(e)?"indeterminate":e?"checked":"unchecked"}function Gw(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function zw(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function Uw(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=zw(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 Kw(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,d=s.y,m=c.x,p=c.y;d>r!=p>r&&n<(m-u)*(r-d)/(p-d)+u&&(o=!o)}return o}function qw(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return Kw(n,t)}function Cn(e){return t=>t.pointerType==="mouse"?e(t):void 0}var Xw=Zl,Zw=wa,Qw=Jl,Jw=eu,eC=Na,tC=tu,nC=Tr,rC=ru,oC=au,aC=iu,sC=lu,iC=uu,cC=du,lC=mu,uC=hu,Ir="DropdownMenu",[dC,jE]=ve(Ir,[ql]),Ee=ql(),[fC,vu]=dC(Ir),yu=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),[d,m]=Ce({prop:o,defaultProp:a??!1,onChange:i,caller:Ir});return f.jsx(fC,{scope:t,triggerId:pe(),triggerRef:u,contentId:pe(),open:d,onOpenChange:m,onOpenToggle:l.useCallback(()=>m(p=>!p),[m]),modal:s,children:f.jsx(Xw,{...c,open:d,onOpenChange:m,dir:r,modal:s,children:n})})};yu.displayName=Ir;var bu="DropdownMenuTrigger",xu=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...o}=e,a=vu(bu,n),i=Ee(n);return f.jsx(Zw,{asChild:!0,...i,children:f.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:Ke(t,a.triggerRef),onPointerDown:O(e.onPointerDown,s=>{!r&&s.button===0&&s.ctrlKey===!1&&(a.onOpenToggle(),a.open||s.preventDefault())}),onKeyDown:O(e.onKeyDown,s=>{r||(["Enter"," "].includes(s.key)&&a.onOpenToggle(),s.key==="ArrowDown"&&a.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(s.key)&&s.preventDefault())})})})});xu.displayName=bu;var mC="DropdownMenuPortal",wu=e=>{const{__scopeDropdownMenu:t,...n}=e,r=Ee(t);return f.jsx(Qw,{...r,...n})};wu.displayName=mC;var Cu="DropdownMenuContent",Su=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=vu(Cu,n),a=Ee(n),i=l.useRef(!1);return f.jsx(Jw,{id:o.contentId,"aria-labelledby":o.triggerId,...a,...r,ref:t,onCloseAutoFocus:O(e.onCloseAutoFocus,s=>{var c;i.current||(c=o.triggerRef.current)==null||c.focus(),i.current=!1,s.preventDefault()}),onInteractOutside:O(e.onInteractOutside,s=>{const c=s.detail.originalEvent,u=c.button===0&&c.ctrlKey===!0,d=c.button===2||u;(!o.modal||d)&&(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)"}})});Su.displayName=Cu;var pC="DropdownMenuGroup",hC=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ee(n);return f.jsx(eC,{...o,...r,ref:t})});hC.displayName=pC;var gC="DropdownMenuLabel",vC=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ee(n);return f.jsx(tC,{...o,...r,ref:t})});vC.displayName=gC;var yC="DropdownMenuItem",Eu=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ee(n);return f.jsx(nC,{...o,...r,ref:t})});Eu.displayName=yC;var bC="DropdownMenuCheckboxItem",xC=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ee(n);return f.jsx(rC,{...o,...r,ref:t})});xC.displayName=bC;var wC="DropdownMenuRadioGroup",CC=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ee(n);return f.jsx(oC,{...o,...r,ref:t})});CC.displayName=wC;var SC="DropdownMenuRadioItem",EC=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ee(n);return f.jsx(aC,{...o,...r,ref:t})});EC.displayName=SC;var NC="DropdownMenuItemIndicator",MC=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ee(n);return f.jsx(sC,{...o,...r,ref:t})});MC.displayName=NC;var RC="DropdownMenuSeparator",Nu=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ee(n);return f.jsx(iC,{...o,...r,ref:t})});Nu.displayName=RC;var PC="DropdownMenuArrow",kC=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ee(n);return f.jsx(cC,{...o,...r,ref:t})});kC.displayName=PC;var OC="DropdownMenuSubTrigger",DC=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ee(n);return f.jsx(lC,{...o,...r,ref:t})});DC.displayName=OC;var AC="DropdownMenuSubContent",TC=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ee(n);return f.jsx(uC,{...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)"}})});TC.displayName=AC;var IC=yu,_C=xu,jC=wu,FC=Su,$C=Eu,LC=Nu;const Mu=l.forwardRef(({className:e,children:t,items:n,align:r="start",variant:o="default",isDisabled:a=!1,...i},s)=>f.jsxs(IC,{children:[f.jsx(_C,{asChild:!0,children:f.jsxs(Oe,{ref:s,className:k("flex items-center gap-1",e),isDisabled:a,variant:o,...i,children:[t,f.jsx(Uo,{className:"h-4 w-4"})]})}),f.jsx(jC,{children:f.jsx(FC,{align:r,className:`z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover px-1 py-1
|
|
167
|
+
data-[state=checked]:bg-primary-400 data-[state=checked]:text-white`,e),id:n,...i,...c,children:f.jsx(mw,{className:k("flex items-center justify-center text-current"),children:f.jsx(Kt,{className:"h-4 w-4",strokeWidth:3})})}),t?typeof t=="string"?f.jsx(tn,{htmlFor:n,children:t}):t:null]})});wa.displayName=Tl.displayName;const _l=l.forwardRef(({options:e,value:t,onChange:n,className:r,columns:o=2,...a},i)=>f.jsx("div",{ref:i,className:k("",r),...a,children:f.jsx("div",{className:k("grid gap-3",o===1&&"grid-cols-1",o===2&&"grid-cols-2",o===3&&"grid-cols-3",o===4&&"grid-cols-4"),children:e.map(s=>f.jsx("div",{className:"flex items-center space-x-2",children:f.jsx(wa,{id:s.id,isChecked:t.includes(s.id),label:s.label,onCheckedChange:c=>{n(c?[...t,s.id]:t.filter(u=>u!==s.id))}})},s.id))})}));_l.displayName="CheckboxGroup";const jl=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,...d},m)=>{var g;const[p,h]=E.useState(!1),y=Ve("dropdown",c);return f.jsxs(Qt,{open:p,onOpenChange:h,children:[f.jsx(Jt,{asChild:!0,children:f.jsxs(Oe,{ref:m,"aria-expanded":p,className:k("w-full justify-between px-3",!t&&"text-muted-foreground",i),isDisabled:u,role:"combobox",variant:"input",...d,children:[t?(g=e.find(v=>v.value===t))==null?void 0:g.label:r,f.jsx(qo,{className:"ml-2 h-4 w-4 shrink-0 opacity-50"})]})}),f.jsx(Ot,{align:"start",className:"w-[--radix-popover-trigger-width] px-0 py-0",zIndex:y,children:f.jsxs(br,{children:[f.jsx(wr,{placeholder:o}),f.jsxs(Sr,{className:k("max-h-[16.5rem] overflow-y-auto",s),children:[f.jsx(oa,{children:a}),f.jsx(xr,{children:e.map(v=>f.jsxs(Cr,{value:v.value,onSelect:b=>{n(b===t?"":b),h(!1)},children:[f.jsx(Kt,{className:k("mr-2 h-4 w-4",t===v.value?"opacity-100":"opacity-0")}),v.label]},v.value))})]})]})})]})});jl.displayName="Combobox";const Fl=E.forwardRef(({value:e,startMonth:t,endMonth:n,onChange:r,placeholder:o="Pick a date",className:a,zIndex:i,isDisabled:s=!1,...c},u)=>{const[d,m]=E.useState(!1),p=Ve("popover",i),h=y=>{r(y),m(!1)};return f.jsxs(Qt,{open:d,onOpenChange:m,children:[f.jsx(Jt,{asChild:!0,children:f.jsxs(Oe,{ref:u,className:k("w-full justify-start px-3 text-left font-normal",!e&&"text-muted-foreground",a),isDisabled:s,variant:"input",...c,"data-component":"date-picker",children:[f.jsx(pi,{className:"mr-2 h-4 w-4"}),e?hn(e,"LLLL dd, y"):f.jsx("span",{children:o})]})}),f.jsx(Ot,{align:"start",className:"w-auto px-0 py-0",zIndex:p,children:f.jsx(xa,{autoFocus:!0,endMonth:n,mode:"single",selected:e,startMonth:t,onSelect:h})})]})});Fl.displayName="DatePicker";const $l=l.forwardRef(({value:e,onChange:t,placeholder:n={from:"Pick start date",to:"Pick end date"},className:r,zIndex:o,isDisabled:a=!1,...i},s)=>{const c=Ve("popover",o),u=d=>{const{from:m,to:p}=e;if(!m)return t({from:d,to:void 0});if(d<m)return t({from:d,to:void 0});if(m&&p)return t({from:d,to:void 0});if(d>m)return t({from:m,to:d});if(d.getTime()===m.getTime())return t({from:void 0,to:void 0})};return f.jsx("div",{className:k("grid gap-2",r),children:f.jsxs(Qt,{children:[f.jsx(Jt,{asChild:!0,children:f.jsxs(Oe,{ref:s,className:k("w-full justify-start px-3 text-left font-normal",!e.from&&!e.to&&"text-muted-foreground"),id:"date",isDisabled:a,variant:"input",...i,"data-component":"date-range-picker",children:[f.jsx(pi,{className:"mr-2 h-4 w-4"}),e.from?e.to?f.jsxs(f.Fragment,{children:[hn(e.from,"LLLL dd, y")," - ",hn(e.to,"LLLL dd, y")]}):hn(e.from,"LLLL dd, y"):f.jsx("span",{children:n.from})]})}),f.jsx(Ot,{align:"start",className:"w-auto px-0 py-0",zIndex:c,children:f.jsx(xa,{autoFocus:!0,defaultMonth:e.from,mode:"range",modifiers:{today:()=>!1},numberOfMonths:2,selected:{from:e.from,to:e.to},showOutsideDays:!1,onDayClick:u,onSelect:d=>{d&&t(d)}})})]})})});$l.displayName="DateRangePicker";const Ll=l.forwardRef(({className:e,...t},n)=>f.jsx(Zi,{ref:n,className:k(le.text.hint,e),...t}));Ll.displayName=Zi.displayName;const Wl=({className:e,...t})=>f.jsx("div",{className:k("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Wl.displayName="DialogFooter";const Bl=({className:e,...t})=>f.jsx("div",{className:k("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});Bl.displayName="DialogHeader";const Vl=l.forwardRef(({className:e,...t},n)=>f.jsx(Xi,{ref:n,className:k(le.text.title,"leading-none tracking-tight",e),...t}));Vl.displayName=Xi.displayName;var mo="rovingFocusGroup.onEntryFocus",pw={bubbles:!1,cancelable:!0},Fn="RovingFocusGroup",[Ro,Yl,hw]=Nn(Fn),[gw,Hl]=ve(Fn,[hw]),[vw,yw]=gw(Fn),Gl=l.forwardRef((e,t)=>f.jsx(Ro.Provider,{scope:e.__scopeRovingFocusGroup,children:f.jsx(Ro.Slot,{scope:e.__scopeRovingFocusGroup,children:f.jsx(bw,{...e,ref:t})})}));Gl.displayName=Fn;var bw=l.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:a,currentTabStopId:i,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:c,onEntryFocus:u,preventScrollOnEntryFocus:d=!1,...m}=e,p=l.useRef(null),h=U(t,p),y=bt(a),[g,v]=Ce({prop:i,defaultProp:s??null,onChange:c,caller:Fn}),[b,x]=l.useState(!1),w=Se(u),S=Yl(n),C=l.useRef(!1),[M,N]=l.useState(0);return l.useEffect(()=>{const P=p.current;if(P)return P.addEventListener(mo,w),()=>P.removeEventListener(mo,w)},[w]),f.jsx(vw,{scope:n,orientation:r,dir:y,loop:o,currentTabStopId:g,onItemFocus:l.useCallback(P=>v(P),[v]),onItemShiftTab:l.useCallback(()=>x(!0),[]),onFocusableItemAdd:l.useCallback(()=>N(P=>P+1),[]),onFocusableItemRemove:l.useCallback(()=>N(P=>P-1),[]),children:f.jsx(V.div,{tabIndex:b||M===0?-1:0,"data-orientation":r,...m,ref:h,style:{outline:"none",...e.style},onMouseDown:O(e.onMouseDown,()=>{C.current=!0}),onFocus:O(e.onFocus,P=>{const F=!C.current;if(P.target===P.currentTarget&&F&&!b){const _=new CustomEvent(mo,pw);if(P.currentTarget.dispatchEvent(_),!_.defaultPrevented){const $=S().filter(j=>j.focusable),I=$.find(j=>j.active),B=$.find(j=>j.id===g),q=[I,B,...$].filter(Boolean).map(j=>j.ref.current);Kl(q,d)}}C.current=!1}),onBlur:O(e.onBlur,()=>x(!1))})})}),zl="RovingFocusGroupItem",Ul=l.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:a,children:i,...s}=e,c=pe(),u=a||c,d=yw(zl,n),m=d.currentTabStopId===u,p=Yl(n),{onFocusableItemAdd:h,onFocusableItemRemove:y,currentTabStopId:g}=d;return l.useEffect(()=>{if(r)return h(),()=>y()},[r,h,y]),f.jsx(Ro.ItemSlot,{scope:n,id:u,focusable:r,active:o,children:f.jsx(V.span,{tabIndex:m?0:-1,"data-orientation":d.orientation,...s,ref:t,onMouseDown:O(e.onMouseDown,v=>{r?d.onItemFocus(u):v.preventDefault()}),onFocus:O(e.onFocus,()=>d.onItemFocus(u)),onKeyDown:O(e.onKeyDown,v=>{if(v.key==="Tab"&&v.shiftKey){d.onItemShiftTab();return}if(v.target!==v.currentTarget)return;const b=Cw(v,d.orientation,d.dir);if(b!==void 0){if(v.metaKey||v.ctrlKey||v.altKey||v.shiftKey)return;v.preventDefault();let w=p().filter(S=>S.focusable).map(S=>S.ref.current);if(b==="last")w.reverse();else if(b==="prev"||b==="next"){b==="prev"&&w.reverse();const S=w.indexOf(v.currentTarget);w=d.loop?Sw(w,S+1):w.slice(S+1)}setTimeout(()=>Kl(w))}}),children:typeof i=="function"?i({isCurrentTabStop:m,hasTabStop:g!=null}):i})})});Ul.displayName=zl;var xw={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function ww(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function Cw(e,t,n){const r=ww(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return xw[r]}function Kl(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function Sw(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var Ew=Gl,Nw=Ul,Po=["Enter"," "],Mw=["ArrowDown","PageUp","Home"],ql=["ArrowUp","PageDown","End"],Rw=[...Mw,...ql],Pw={ltr:[...Po,"ArrowRight"],rtl:[...Po,"ArrowLeft"]},kw={ltr:["ArrowLeft"],rtl:["ArrowRight"]},$n="Menu",[wn,Ow,Dw]=Nn($n),[Dt,Xl]=ve($n,[Dw,Zt,Hl]),Ir=Zt(),Zl=Hl(),[Iw,It]=Dt($n),[Aw,Ln]=Dt($n),Ql=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:o,onOpenChange:a,modal:i=!0}=e,s=Ir(t),[c,u]=l.useState(null),d=l.useRef(!1),m=Se(a),p=bt(o);return l.useEffect(()=>{const h=()=>{d.current=!0,document.addEventListener("pointerdown",y,{capture:!0,once:!0}),document.addEventListener("pointermove",y,{capture:!0,once:!0})},y=()=>d.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})}},[]),f.jsx(pa,{...s,children:f.jsx(Iw,{scope:t,open:n,onOpenChange:m,content:c,onContentChange:u,children:f.jsx(Aw,{scope:t,onClose:l.useCallback(()=>m(!1),[m]),isUsingKeyboardRef:d,dir:p,modal:i,children:r})})})};Ql.displayName=$n;var Tw="MenuAnchor",Ca=l.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=Ir(n);return f.jsx(Rr,{...o,...r,ref:t})});Ca.displayName=Tw;var Sa="MenuPortal",[_w,Jl]=Dt(Sa,{forceMount:void 0}),eu=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:o}=e,a=It(Sa,t);return f.jsx(_w,{scope:t,forceMount:n,children:f.jsx(Ie,{present:n||a.open,children:f.jsx(Pn,{asChild:!0,container:o,children:r})})})};eu.displayName=Sa;var ke="MenuContent",[jw,Ea]=Dt(ke),tu=l.forwardRef((e,t)=>{const n=Jl(ke,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,a=It(ke,e.__scopeMenu),i=Ln(ke,e.__scopeMenu);return f.jsx(wn.Provider,{scope:e.__scopeMenu,children:f.jsx(Ie,{present:r||a.open,children:f.jsx(wn.Slot,{scope:e.__scopeMenu,children:i.modal?f.jsx(Fw,{...o,ref:t}):f.jsx($w,{...o,ref:t})})})})}),Fw=l.forwardRef((e,t)=>{const n=It(ke,e.__scopeMenu),r=l.useRef(null),o=U(t,r);return l.useEffect(()=>{const a=r.current;if(a)return gr(a)},[]),f.jsx(Na,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:O(e.onFocusOutside,a=>a.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),$w=l.forwardRef((e,t)=>{const n=It(ke,e.__scopeMenu);return f.jsx(Na,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),Lw=pt("MenuContent.ScrollLock"),Na=l.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:o,onOpenAutoFocus:a,onCloseAutoFocus:i,disableOutsidePointerEvents:s,onEntryFocus:c,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:m,onInteractOutside:p,onDismiss:h,disableOutsideScroll:y,...g}=e,v=It(ke,n),b=Ln(ke,n),x=Ir(n),w=Zl(n),S=Ow(n),[C,M]=l.useState(null),N=l.useRef(null),P=U(t,N,v.onContentChange),F=l.useRef(0),_=l.useRef(""),$=l.useRef(0),I=l.useRef(null),B=l.useRef("right"),Y=l.useRef(0),q=y?kn:l.Fragment,j=y?{as:Lw,allowPinchZoom:!0}:void 0,G=D=>{var A,Z;const Q=_.current+D,J=S().filter(K=>!K.disabled),R=document.activeElement,L=(A=J.find(K=>K.ref.current===R))==null?void 0:A.textValue,z=J.map(K=>K.textValue),W=Zw(z,Q,L),X=(Z=J.find(K=>K.textValue===W))==null?void 0:Z.ref.current;(function K(te){_.current=te,window.clearTimeout(F.current),te!==""&&(F.current=window.setTimeout(()=>K(""),1e3))})(Q),X&&setTimeout(()=>X.focus())};l.useEffect(()=>()=>window.clearTimeout(F.current),[]),pr();const T=l.useCallback(D=>{var J,R;return B.current===((J=I.current)==null?void 0:J.side)&&Jw(D,(R=I.current)==null?void 0:R.area)},[]);return f.jsx(jw,{scope:n,searchRef:_,onItemEnter:l.useCallback(D=>{T(D)&&D.preventDefault()},[T]),onItemLeave:l.useCallback(D=>{var Q;T(D)||((Q=N.current)==null||Q.focus(),M(null))},[T]),onTriggerLeave:l.useCallback(D=>{T(D)&&D.preventDefault()},[T]),pointerGraceTimerRef:$,onPointerGraceIntentChange:l.useCallback(D=>{I.current=D},[]),children:f.jsx(q,{...j,children:f.jsx(Rn,{asChild:!0,trapped:o,onMountAutoFocus:O(a,D=>{var Q;D.preventDefault(),(Q=N.current)==null||Q.focus({preventScroll:!0})}),onUnmountAutoFocus:i,children:f.jsx(Mn,{asChild:!0,disableOutsidePointerEvents:s,onEscapeKeyDown:u,onPointerDownOutside:d,onFocusOutside:m,onInteractOutside:p,onDismiss:h,children:f.jsx(Ew,{asChild:!0,...w,dir:b.dir,orientation:"vertical",loop:r,currentTabStopId:C,onCurrentTabStopIdChange:M,onEntryFocus:O(c,D=>{b.isUsingKeyboardRef.current||D.preventDefault()}),preventScrollOnEntryFocus:!0,children:f.jsx(ha,{role:"menu","aria-orientation":"vertical","data-state":vu(v.open),"data-radix-menu-content":"",dir:b.dir,...x,...g,ref:P,style:{outline:"none",...g.style},onKeyDown:O(g.onKeyDown,D=>{const J=D.target.closest("[data-radix-menu-content]")===D.currentTarget,R=D.ctrlKey||D.altKey||D.metaKey,L=D.key.length===1;J&&(D.key==="Tab"&&D.preventDefault(),!R&&L&&G(D.key));const z=N.current;if(D.target!==z||!Rw.includes(D.key))return;D.preventDefault();const X=S().filter(A=>!A.disabled).map(A=>A.ref.current);ql.includes(D.key)&&X.reverse(),qw(X)}),onBlur:O(e.onBlur,D=>{D.currentTarget.contains(D.target)||(window.clearTimeout(F.current),_.current="")}),onPointerMove:O(e.onPointerMove,Cn(D=>{const Q=D.target,J=Y.current!==D.clientX;if(D.currentTarget.contains(Q)&&J){const R=D.clientX>Y.current?"right":"left";B.current=R,Y.current=D.clientX}}))})})})})})})});tu.displayName=ke;var Ww="MenuGroup",Ma=l.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return f.jsx(V.div,{role:"group",...r,ref:t})});Ma.displayName=Ww;var Bw="MenuLabel",nu=l.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return f.jsx(V.div,{...r,ref:t})});nu.displayName=Bw;var ir="MenuItem",js="menu.itemSelect",Ar=l.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...o}=e,a=l.useRef(null),i=Ln(ir,e.__scopeMenu),s=Ea(ir,e.__scopeMenu),c=U(t,a),u=l.useRef(!1),d=()=>{const m=a.current;if(!n&&m){const p=new CustomEvent(js,{bubbles:!0,cancelable:!0});m.addEventListener(js,h=>r==null?void 0:r(h),{once:!0}),qs(m,p),p.defaultPrevented?u.current=!1:i.onClose()}};return f.jsx(ru,{...o,ref:c,disabled:n,onClick:O(e.onClick,d),onPointerDown:m=>{var p;(p=e.onPointerDown)==null||p.call(e,m),u.current=!0},onPointerUp:O(e.onPointerUp,m=>{var p;u.current||(p=m.currentTarget)==null||p.click()}),onKeyDown:O(e.onKeyDown,m=>{const p=s.searchRef.current!=="";n||p&&m.key===" "||Po.includes(m.key)&&(m.currentTarget.click(),m.preventDefault())})})});Ar.displayName=ir;var ru=l.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:o,...a}=e,i=Ea(ir,n),s=Zl(n),c=l.useRef(null),u=U(t,c),[d,m]=l.useState(!1),[p,h]=l.useState("");return l.useEffect(()=>{const y=c.current;y&&h((y.textContent??"").trim())},[a.children]),f.jsx(wn.ItemSlot,{scope:n,disabled:r,textValue:o??p,children:f.jsx(Nw,{asChild:!0,...s,focusable:!r,children:f.jsx(V.div,{role:"menuitem","data-highlighted":d?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...a,ref:u,onPointerMove:O(e.onPointerMove,Cn(y=>{r?i.onItemLeave(y):(i.onItemEnter(y),y.defaultPrevented||y.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:O(e.onPointerLeave,Cn(y=>i.onItemLeave(y))),onFocus:O(e.onFocus,()=>m(!0)),onBlur:O(e.onBlur,()=>m(!1))})})})}),Vw="MenuCheckboxItem",ou=l.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...o}=e;return f.jsx(lu,{scope:e.__scopeMenu,checked:n,children:f.jsx(Ar,{role:"menuitemcheckbox","aria-checked":cr(n)?"mixed":n,...o,ref:t,"data-state":Pa(n),onSelect:O(o.onSelect,()=>r==null?void 0:r(cr(n)?!0:!n),{checkForDefaultPrevented:!1})})})});ou.displayName=Vw;var au="MenuRadioGroup",[Yw,Hw]=Dt(au,{value:void 0,onValueChange:()=>{}}),su=l.forwardRef((e,t)=>{const{value:n,onValueChange:r,...o}=e,a=Se(r);return f.jsx(Yw,{scope:e.__scopeMenu,value:n,onValueChange:a,children:f.jsx(Ma,{...o,ref:t})})});su.displayName=au;var iu="MenuRadioItem",cu=l.forwardRef((e,t)=>{const{value:n,...r}=e,o=Hw(iu,e.__scopeMenu),a=n===o.value;return f.jsx(lu,{scope:e.__scopeMenu,checked:a,children:f.jsx(Ar,{role:"menuitemradio","aria-checked":a,...r,ref:t,"data-state":Pa(a),onSelect:O(r.onSelect,()=>{var i;return(i=o.onValueChange)==null?void 0:i.call(o,n)},{checkForDefaultPrevented:!1})})})});cu.displayName=iu;var Ra="MenuItemIndicator",[lu,Gw]=Dt(Ra,{checked:!1}),uu=l.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...o}=e,a=Gw(Ra,n);return f.jsx(Ie,{present:r||cr(a.checked)||a.checked===!0,children:f.jsx(V.span,{...o,ref:t,"data-state":Pa(a.checked)})})});uu.displayName=Ra;var zw="MenuSeparator",du=l.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return f.jsx(V.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});du.displayName=zw;var Uw="MenuArrow",fu=l.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=Ir(n);return f.jsx(ga,{...o,...r,ref:t})});fu.displayName=Uw;var Kw="MenuSub",[jE,mu]=Dt(Kw),fn="MenuSubTrigger",pu=l.forwardRef((e,t)=>{const n=It(fn,e.__scopeMenu),r=Ln(fn,e.__scopeMenu),o=mu(fn,e.__scopeMenu),a=Ea(fn,e.__scopeMenu),i=l.useRef(null),{pointerGraceTimerRef:s,onPointerGraceIntentChange:c}=a,u={__scopeMenu:e.__scopeMenu},d=l.useCallback(()=>{i.current&&window.clearTimeout(i.current),i.current=null},[]);return l.useEffect(()=>d,[d]),l.useEffect(()=>{const m=s.current;return()=>{window.clearTimeout(m),c(null)}},[s,c]),f.jsx(Ca,{asChild:!0,...u,children:f.jsx(ru,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":o.contentId,"data-state":vu(n.open),...e,ref:Ke(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:O(e.onPointerMove,Cn(m=>{a.onItemEnter(m),!m.defaultPrevented&&!e.disabled&&!n.open&&!i.current&&(a.onPointerGraceIntentChange(null),i.current=window.setTimeout(()=>{n.onOpenChange(!0),d()},100))})),onPointerLeave:O(e.onPointerLeave,Cn(m=>{var h,y;d();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",b=v?-5:5,x=p[v?"left":"right"],w=p[v?"right":"left"];a.onPointerGraceIntentChange({area:[{x:m.clientX+b,y:m.clientY},{x,y:p.top},{x:w,y:p.top},{x:w,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:O(e.onKeyDown,m=>{var h;const p=a.searchRef.current!=="";e.disabled||p&&m.key===" "||Pw[r.dir].includes(m.key)&&(n.onOpenChange(!0),(h=n.content)==null||h.focus(),m.preventDefault())})})})});pu.displayName=fn;var hu="MenuSubContent",gu=l.forwardRef((e,t)=>{const n=Jl(ke,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,a=It(ke,e.__scopeMenu),i=Ln(ke,e.__scopeMenu),s=mu(hu,e.__scopeMenu),c=l.useRef(null),u=U(t,c);return f.jsx(wn.Provider,{scope:e.__scopeMenu,children:f.jsx(Ie,{present:r||a.open,children:f.jsx(wn.Slot,{scope:e.__scopeMenu,children:f.jsx(Na,{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:d=>{var m;i.isUsingKeyboardRef.current&&((m=c.current)==null||m.focus()),d.preventDefault()},onCloseAutoFocus:d=>d.preventDefault(),onFocusOutside:O(e.onFocusOutside,d=>{d.target!==s.trigger&&a.onOpenChange(!1)}),onEscapeKeyDown:O(e.onEscapeKeyDown,d=>{i.onClose(),d.preventDefault()}),onKeyDown:O(e.onKeyDown,d=>{var h;const m=d.currentTarget.contains(d.target),p=kw[i.dir].includes(d.key);m&&p&&(a.onOpenChange(!1),(h=s.trigger)==null||h.focus(),d.preventDefault())})})})})})});gu.displayName=hu;function vu(e){return e?"open":"closed"}function cr(e){return e==="indeterminate"}function Pa(e){return cr(e)?"indeterminate":e?"checked":"unchecked"}function qw(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function Xw(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function Zw(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=Xw(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 Qw(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,d=s.y,m=c.x,p=c.y;d>r!=p>r&&n<(m-u)*(r-d)/(p-d)+u&&(o=!o)}return o}function Jw(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return Qw(n,t)}function Cn(e){return t=>t.pointerType==="mouse"?e(t):void 0}var eC=Ql,tC=Ca,nC=eu,rC=tu,oC=Ma,aC=nu,sC=Ar,iC=ou,cC=su,lC=cu,uC=uu,dC=du,fC=fu,mC=pu,pC=gu,Tr="DropdownMenu",[hC,FE]=ve(Tr,[Xl]),Ee=Xl(),[gC,yu]=hC(Tr),bu=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),[d,m]=Ce({prop:o,defaultProp:a??!1,onChange:i,caller:Tr});return f.jsx(gC,{scope:t,triggerId:pe(),triggerRef:u,contentId:pe(),open:d,onOpenChange:m,onOpenToggle:l.useCallback(()=>m(p=>!p),[m]),modal:s,children:f.jsx(eC,{...c,open:d,onOpenChange:m,dir:r,modal:s,children:n})})};bu.displayName=Tr;var xu="DropdownMenuTrigger",wu=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...o}=e,a=yu(xu,n),i=Ee(n);return f.jsx(tC,{asChild:!0,...i,children:f.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:Ke(t,a.triggerRef),onPointerDown:O(e.onPointerDown,s=>{!r&&s.button===0&&s.ctrlKey===!1&&(a.onOpenToggle(),a.open||s.preventDefault())}),onKeyDown:O(e.onKeyDown,s=>{r||(["Enter"," "].includes(s.key)&&a.onOpenToggle(),s.key==="ArrowDown"&&a.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(s.key)&&s.preventDefault())})})})});wu.displayName=xu;var vC="DropdownMenuPortal",Cu=e=>{const{__scopeDropdownMenu:t,...n}=e,r=Ee(t);return f.jsx(nC,{...r,...n})};Cu.displayName=vC;var Su="DropdownMenuContent",Eu=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=yu(Su,n),a=Ee(n),i=l.useRef(!1);return f.jsx(rC,{id:o.contentId,"aria-labelledby":o.triggerId,...a,...r,ref:t,onCloseAutoFocus:O(e.onCloseAutoFocus,s=>{var c;i.current||(c=o.triggerRef.current)==null||c.focus(),i.current=!1,s.preventDefault()}),onInteractOutside:O(e.onInteractOutside,s=>{const c=s.detail.originalEvent,u=c.button===0&&c.ctrlKey===!0,d=c.button===2||u;(!o.modal||d)&&(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)"}})});Eu.displayName=Su;var yC="DropdownMenuGroup",bC=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ee(n);return f.jsx(oC,{...o,...r,ref:t})});bC.displayName=yC;var xC="DropdownMenuLabel",wC=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ee(n);return f.jsx(aC,{...o,...r,ref:t})});wC.displayName=xC;var CC="DropdownMenuItem",Nu=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ee(n);return f.jsx(sC,{...o,...r,ref:t})});Nu.displayName=CC;var SC="DropdownMenuCheckboxItem",EC=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ee(n);return f.jsx(iC,{...o,...r,ref:t})});EC.displayName=SC;var NC="DropdownMenuRadioGroup",MC=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ee(n);return f.jsx(cC,{...o,...r,ref:t})});MC.displayName=NC;var RC="DropdownMenuRadioItem",PC=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ee(n);return f.jsx(lC,{...o,...r,ref:t})});PC.displayName=RC;var kC="DropdownMenuItemIndicator",OC=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ee(n);return f.jsx(uC,{...o,...r,ref:t})});OC.displayName=kC;var DC="DropdownMenuSeparator",Mu=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ee(n);return f.jsx(dC,{...o,...r,ref:t})});Mu.displayName=DC;var IC="DropdownMenuArrow",AC=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ee(n);return f.jsx(fC,{...o,...r,ref:t})});AC.displayName=IC;var TC="DropdownMenuSubTrigger",_C=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ee(n);return f.jsx(mC,{...o,...r,ref:t})});_C.displayName=TC;var jC="DropdownMenuSubContent",FC=l.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Ee(n);return f.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)"}})});FC.displayName=jC;var $C=bu,LC=wu,WC=Cu,BC=Eu,VC=Nu,YC=Mu;const Ru=l.forwardRef(({className:e,children:t,items:n,align:r="start",variant:o="default",isDisabled:a=!1,...i},s)=>f.jsxs($C,{children:[f.jsx(LC,{asChild:!0,children:f.jsxs(Oe,{ref:s,className:k("flex items-center gap-1",e),isDisabled:a,variant:o,...i,children:[t,f.jsx(Uo,{className:"h-4 w-4"})]})}),f.jsx(WC,{children:f.jsx(BC,{align:r,className:`z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover px-1 py-1
|
|
168
168
|
text-popover-foreground shadow-md data-[state=open]:animate-in
|
|
169
169
|
data-[state=closed]:animate-out data-[state=closed]:fade-out-0
|
|
170
170
|
data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95
|
|
171
171
|
data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2
|
|
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"?f.jsx(
|
|
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"?f.jsx(YC,{className:"my-1 h-px bg-muted"},`separator-${u}`):f.jsxs(VC,{className:k(`relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5
|
|
173
173
|
text-sm outline-none transition-colors focus:bg-accent
|
|
174
174
|
focus:text-accent-foreground data-[disabled]:pointer-events-none
|
|
175
|
-
data-[disabled]:opacity-50`,c.onClick&&"cursor-pointer"),onClick:c.onClick,children:[c.icon?f.jsx("span",{className:"mr-2",children:c.icon}):null,c.label]},c.label))})})]}));
|
|
176
|
-
text-secondary-foreground`,children:[b,f.jsx(mr,{"aria-label":`Remove ${b}`,className:"h-3 w-3 cursor-pointer opacity-50 hover:opacity-100",role:"button",strokeWidth:3,onClick:w=>{w.stopPropagation(),n(t.filter((S,C)=>C!==x))}})]},t[x]))});return f.jsxs(Qt,{open:p,onOpenChange:h,children:[f.jsx(Jt,{asChild:!0,children:f.jsxs(Oe,{ref:m,"aria-expanded":p,className:k("flex h-auto min-h-[2.5rem] w-full items-stretch justify-between px-3 py-1.5",i),isDisabled:u,role:"combobox",variant:"input",...d,children:[f.jsx("div",{className:"flex flex-1 text-left",children:v()}),f.jsx(qo,{className:"ml-2 h-4 w-4 shrink-0 self-center opacity-50"})]})}),f.jsx(Ot,{align:"start",className:"w-[--radix-popover-trigger-width] px-0 py-0",zIndex:y,children:f.jsxs(br,{children:[f.jsx(wr,{placeholder:o}),f.jsxs(Sr,{className:k("max-h-[16.5rem] overflow-y-auto",s),children:[f.jsx(
|
|
177
|
-
border-primary-400`,t.includes(b.value)?"bg-primary-400 text-white":"opacity-50"),children:t.includes(b.value)?f.jsx(Kt,{className:"h-3 w-3",strokeWidth:3}):null}),b.label]})},b.value))})]})]})})]})});Ou.displayName="MultiSelect";var po="rovingFocusGroup.onEntryFocus",WC={bubbles:!1,cancelable:!0},Wn="RovingFocusGroup",[ko,Du,BC]=Nn(Wn),[VC,Au]=ve(Wn,[BC]),[YC,HC]=VC(Wn),Tu=l.forwardRef((e,t)=>f.jsx(ko.Provider,{scope:e.__scopeRovingFocusGroup,children:f.jsx(ko.Slot,{scope:e.__scopeRovingFocusGroup,children:f.jsx(GC,{...e,ref:t})})}));Tu.displayName=Wn;var GC=l.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:a,currentTabStopId:i,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:c,onEntryFocus:u,preventScrollOnEntryFocus:d=!1,...m}=e,p=l.useRef(null),h=U(t,p),y=bt(a),[g,v]=Ce({prop:i,defaultProp:s??null,onChange:c,caller:Wn}),[b,x]=l.useState(!1),w=Se(u),S=Du(n),C=l.useRef(!1),[M,N]=l.useState(0);return l.useEffect(()=>{const P=p.current;if(P)return P.addEventListener(po,w),()=>P.removeEventListener(po,w)},[w]),f.jsx(YC,{scope:n,orientation:r,dir:y,loop:o,currentTabStopId:g,onItemFocus:l.useCallback(P=>v(P),[v]),onItemShiftTab:l.useCallback(()=>x(!0),[]),onFocusableItemAdd:l.useCallback(()=>N(P=>P+1),[]),onFocusableItemRemove:l.useCallback(()=>N(P=>P-1),[]),children:f.jsx(V.div,{tabIndex:b||M===0?-1:0,"data-orientation":r,...m,ref:h,style:{outline:"none",...e.style},onMouseDown:O(e.onMouseDown,()=>{C.current=!0}),onFocus:O(e.onFocus,P=>{const F=!C.current;if(P.target===P.currentTarget&&F&&!b){const _=new CustomEvent(po,WC);if(P.currentTarget.dispatchEvent(_),!_.defaultPrevented){const $=S().filter(j=>j.focusable),A=$.find(j=>j.active),B=$.find(j=>j.id===g),q=[A,B,...$].filter(Boolean).map(j=>j.ref.current);ju(q,d)}}C.current=!1}),onBlur:O(e.onBlur,()=>x(!1))})})}),Iu="RovingFocusGroupItem",_u=l.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:a,children:i,...s}=e,c=pe(),u=a||c,d=HC(Iu,n),m=d.currentTabStopId===u,p=Du(n),{onFocusableItemAdd:h,onFocusableItemRemove:y}=d;return l.useEffect(()=>{if(r)return h(),()=>y()},[r,h,y]),f.jsx(ko.ItemSlot,{scope:n,id:u,focusable:r,active:o,children:f.jsx(V.span,{tabIndex:m?0:-1,"data-orientation":d.orientation,...s,ref:t,onMouseDown:O(e.onMouseDown,g=>{r?d.onItemFocus(u):g.preventDefault()}),onFocus:O(e.onFocus,()=>d.onItemFocus(u)),onKeyDown:O(e.onKeyDown,g=>{if(g.key==="Tab"&&g.shiftKey){d.onItemShiftTab();return}if(g.target!==g.currentTarget)return;const v=KC(g,d.orientation,d.dir);if(v!==void 0){if(g.metaKey||g.ctrlKey||g.altKey||g.shiftKey)return;g.preventDefault();let x=p().filter(w=>w.focusable).map(w=>w.ref.current);if(v==="last")x.reverse();else if(v==="prev"||v==="next"){v==="prev"&&x.reverse();const w=x.indexOf(g.currentTarget);x=d.loop?qC(x,w+1):x.slice(w+1)}setTimeout(()=>ju(x))}}),children:typeof i=="function"?i({isCurrentTabStop:m}):i})})});_u.displayName=Iu;var zC={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function UC(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function KC(e,t,n){const r=UC(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return zC[r]}function ju(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function qC(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var XC=Tu,ZC=_u,Pa="Radio",[QC,Fu]=ve(Pa),[JC,e0]=QC(Pa),$u=l.forwardRef((e,t)=>{const{__scopeRadio:n,name:r,checked:o=!1,required:a,disabled:i,value:s="on",onCheck:c,form:u,...d}=e,[m,p]=l.useState(null),h=U(t,v=>p(v)),y=l.useRef(!1),g=m?u||!!m.closest("form"):!0;return f.jsxs(JC,{scope:n,checked:o,disabled:i,children:[f.jsx(V.button,{type:"button",role:"radio","aria-checked":o,"data-state":Vu(o),"data-disabled":i?"":void 0,disabled:i,value:s,...d,ref:h,onClick:O(e.onClick,v=>{o||c==null||c(),g&&(y.current=v.isPropagationStopped(),y.current||v.stopPropagation())})}),g&&f.jsx(Bu,{control:m,bubbles:!y.current,name:r,value:s,checked:o,required:a,disabled:i,form:u,style:{transform:"translateX(-100%)"}})]})});$u.displayName=Pa;var Lu="RadioIndicator",Wu=l.forwardRef((e,t)=>{const{__scopeRadio:n,forceMount:r,...o}=e,a=e0(Lu,n);return f.jsx(Ae,{present:r||a.checked,children:f.jsx(V.span,{"data-state":Vu(a.checked),"data-disabled":a.disabled?"":void 0,...o,ref:t})})});Wu.displayName=Lu;var t0="RadioBubbleInput",Bu=l.forwardRef(({__scopeRadio:e,control:t,checked:n,bubbles:r=!0,...o},a)=>{const i=l.useRef(null),s=U(i,a),c=Or(n),u=An(t);return l.useEffect(()=>{const d=i.current;if(!d)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(d,n),d.dispatchEvent(y)}},[c,n,r]),f.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}})});Bu.displayName=t0;function Vu(e){return e?"checked":"unchecked"}var n0=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],_r="RadioGroup",[r0,FE]=ve(_r,[Au,Fu]),Yu=Au(),Hu=Fu(),[o0,a0]=r0(_r),Gu=l.forwardRef((e,t)=>{const{__scopeRadioGroup:n,name:r,defaultValue:o,value:a,required:i=!1,disabled:s=!1,orientation:c,dir:u,loop:d=!0,onValueChange:m,...p}=e,h=Yu(n),y=bt(u),[g,v]=Ce({prop:a,defaultProp:o??"",onChange:m,caller:_r});return f.jsx(o0,{scope:n,name:r,required:i,disabled:s,value:g,onValueChange:v,children:f.jsx(XC,{asChild:!0,...h,orientation:c,dir:y,loop:d,children:f.jsx(V.div,{role:"radiogroup","aria-required":i,"aria-orientation":c,"data-disabled":s?"":void 0,dir:y,...p,ref:t})})})});Gu.displayName=_r;var zu="RadioGroupItem",Uu=l.forwardRef((e,t)=>{const{__scopeRadioGroup:n,disabled:r,...o}=e,a=a0(zu,n),i=a.disabled||r,s=Yu(n),c=Hu(n),u=l.useRef(null),d=U(t,u),m=a.value===o.value,p=l.useRef(!1);return l.useEffect(()=>{const h=g=>{n0.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)}},[]),f.jsx(ZC,{asChild:!0,...s,focusable:!i,active:m,children:f.jsx($u,{disabled:i,required:a.required,checked:m,...c,...o,name:a.name,ref:d,onCheck:()=>a.onValueChange(o.value),onKeyDown:O(h=>{h.key==="Enter"&&h.preventDefault()}),onFocus:O(o.onFocus,()=>{var h;p.current&&((h=u.current)==null||h.click())})})})});Uu.displayName=zu;var s0="RadioGroupIndicator",Ku=l.forwardRef((e,t)=>{const{__scopeRadioGroup:n,...r}=e,o=Hu(n);return f.jsx(Wu,{...o,...r,ref:t})});Ku.displayName=s0;var i0=Gu,ka=Uu,c0=Ku;const l0=(e,t)=>{if(!e&&!t)throw new Error("Radio must have either a label prop or an aria-label attribute");if(e&&t)throw new Error("Radio must have either a label prop or an aria-label attribute, but not both")},qu="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 ",u0=({id:e,label:t})=>t?typeof t=="string"?f.jsx(tn,{htmlFor:e,children:t}):t:null,d0=({ref:e,id:t,label:n,isChecked:r,isDisabled:o,className:a,"aria-label":i,...s})=>{const c=Xe({isDisabled:o});return f.jsxs("div",{className:k("flex items-center gap-2",o&&"cursor-not-allowed opacity-50 [&>*]:cursor-not-allowed"),children:[f.jsx(ka,{ref:e,"aria-label":i,checked:r,className:k(le.focusRingVisible,le.focusRingVisibleSm,qu,a),id:t,...s,...c,children:f.jsx(c0,{className:"flex items-center justify-center",children:f.jsx(pi,{className:"h-3 w-3 fill-current text-current"})})}),f.jsx(u0,{id:t,label:n})]})},f0=({ref:e,id:t,label:n,description:r,isChecked:o,isDisabled:a,className:i,"aria-label":s,...c})=>{const u=Xe({isDisabled:a});return f.jsxs("div",{className:k("relative rounded-lg border-2 border-muted bg-popover px-4 py-4",o&&"border-primary-400",a?"cursor-not-allowed opacity-50 [&_*]:cursor-not-allowed":"cursor-pointer hover:bg-accent hover:text-accent-foreground",i),children:[f.jsx(ka,{ref:e,"aria-label":s,checked:o,className:"absolute inset-0 opacity-0",id:t,...c,...u}),f.jsxs("div",{className:"flex items-start gap-3",children:[f.jsx("div",{className:k(qu,"pointer-events-none mt-1",o&&"border-primary-400"),children:o?f.jsx("div",{className:"flex h-full w-full items-center justify-center",children:f.jsx(pi,{className:"h-3 w-3 fill-current text-primary-400"})}):null}),f.jsxs("div",{className:"pointer-events-none space-y-1",children:[n&&typeof n=="string"?f.jsx("div",{className:"font-medium",children:n}):n,r?f.jsx("p",{className:"text-sm text-muted-foreground",children:r}):null]})]})]})},m0=({ref:e,id:t,label:n,description:r,isChecked:o,isDisabled:a,className:i,"aria-label":s,...c})=>{const u=Xe({isDisabled:a});return f.jsxs("div",{className:k("relative",o?k(le.button,Et({variant:"primary"})):k(le.button,Et({variant:"input"})),a&&"pointer-events-none cursor-not-allowed opacity-50",i),children:[f.jsx(ka,{ref:e,"aria-label":s,checked:o,className:"absolute inset-0 opacity-0",id:t,...c,...u}),f.jsxs("div",{className:"flex items-center gap-2",children:[n?f.jsx("span",{className:"font-medium",children:n}):null,r?f.jsx("span",{className:"text-sm text-muted-foreground",children:r}):null]})]})},Oa=l.forwardRef(({className:e,label:t,description:n,id:r,"aria-label":o,isChecked:a=!1,isDisabled:i=!1,variant:s="default",...c},u)=>(l0(t,o),s==="button"?f.jsx(m0,{ref:u,"aria-label":o,className:e,description:n,id:r,isChecked:a,isDisabled:i,label:t,...c}):s==="tile"?f.jsx(f0,{ref:u,"aria-label":o,className:e,description:n,id:r,isChecked:a,isDisabled:i,label:t,...c}):f.jsx(d0,{ref:u,"aria-label":o,className:e,description:n,id:r,isChecked:a,isDisabled:i,label:t,...c})));Oa.displayName="Radio";const Xu=l.forwardRef(({options:e,value:t,onChange:n,className:r,orientation:o="vertical",variant:a="default",...i},s)=>f.jsx(i0,{ref:s,className:k("grid gap-3",o==="horizontal"&&a==="default"&&"flex flex-row gap-5",o==="vertical"&&a==="default"&&"flex flex-col gap-2 space-y-1",a==="tile"&&"grid-cols-1 md:grid-cols-2 lg:grid-cols-3",a==="button"&&o==="horizontal"&&`flex flex-row gap-0 [&>*:first-child]:ml-0 [&>*:first-child]:rounded-l-sm
|
|
175
|
+
data-[disabled]:opacity-50`,c.onClick&&"cursor-pointer"),onClick:c.onClick,children:[c.icon?f.jsx("span",{className:"mr-2",children:c.icon}):null,c.label]},c.label))})})]}));Ru.displayName="DropdownButton";const Pu=l.forwardRef(({label:e,labelSlot:t,hintText:n,errorText:r,className:o,children:a,elementId:i,isRequired:s=!1,...c},u)=>{var y;const d=i??((y=a.props)==null?void 0:y.id);if(!d)throw new Error("FormItem must have either an `elementId` prop or an `id` attribute specified on the child element");const m=`form-item-${d}-label`,p=`form-item-${d}-hint`,h=`form-item-${d}-error`;return f.jsxs("div",{ref:u,className:k("space-y-1",o),...c,"data-error":r?"true":void 0,children:[f.jsxs("div",{className:"space-y-1",children:[e?f.jsxs("div",{className:"flex items-center",children:[typeof e=="string"?f.jsxs(tn,{className:"font-bold",htmlFor:d,id:m,children:[e,s?f.jsx("span",{className:"ml-0.5 text-destructive",children:"*"}):null]}):e,t?f.jsx("div",{className:"ml-2",children:t}):null]}):null,n?f.jsx("p",{className:le.text.hint,id:p,children:n}):null]}),a,r?f.jsx("p",{className:le.text.error,id:h,children:r}):null]})});Pu.displayName="FormItem";const ku=E.forwardRef(({src:e,alt:t,fallback:n,isLazy:r=!0,shape:o="square",className:a,onError:i,...s},c)=>{const[u,d]=E.useState(!1),[m,p]=E.useState(!0),h=v=>{d(!0),i==null||i(v)},y=()=>{p(!1)},g={square:"",rounded:"rounded-lg",circle:"rounded-full"};return f.jsxs("div",{className:k("relative overflow-hidden",g[o],a),children:[m?f.jsx("div",{"aria-hidden":"true",className:"absolute inset-0 animate-pulse bg-muted",role:"presentation"}):null,f.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})]})});ku.displayName="Image";const Ou=l.forwardRef(({className:e,type:t,transform:n="none",isDisabled:r=!1,onChange:o,...a},i)=>{const s=Xe({isDisabled:r}),c=u=>{if(!o)return;let d=u.target.value;(Array.isArray(n)?n:[n]).forEach(p=>{switch(p){case"uppercase":d=d.toUpperCase();break;case"lowercase":d=d.toLowerCase();break;case"trim":d=d.trim();break}}),u.target.value=d,o(u)};return f.jsx("input",{ref:i,className:k(le.input,e),type:t,onChange:c,...a,...s})});Ou.displayName="Input";const Du=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,...d},m)=>{const[p,h]=E.useState(!1),y=Ve("dropdown",c),g=t.map(b=>{var x;return((x=e.find(w=>w.value===b))==null?void 0:x.label)||b}),v=()=>t.length===0?f.jsx("span",{className:"self-center text-muted-foreground",children:r}):f.jsx("div",{className:"flex flex-1 flex-wrap gap-1",children:g.map((b,x)=>f.jsxs("div",{className:`flex items-center gap-1 rounded-sm bg-secondary px-2 py-0.5 text-sm
|
|
176
|
+
text-secondary-foreground`,children:[b,f.jsx(mr,{"aria-label":`Remove ${b}`,className:"h-3 w-3 cursor-pointer opacity-50 hover:opacity-100",role:"button",strokeWidth:3,onClick:w=>{w.stopPropagation(),n(t.filter((S,C)=>C!==x))}})]},t[x]))});return f.jsxs(Qt,{open:p,onOpenChange:h,children:[f.jsx(Jt,{asChild:!0,children:f.jsxs(Oe,{ref:m,"aria-expanded":p,className:k("flex h-auto min-h-[2.5rem] w-full items-stretch justify-between px-3 py-1.5",i),isDisabled:u,role:"combobox",variant:"input",...d,children:[f.jsx("div",{className:"flex flex-1 text-left",children:v()}),f.jsx(qo,{className:"ml-2 h-4 w-4 shrink-0 self-center opacity-50"})]})}),f.jsx(Ot,{align:"start",className:"w-[--radix-popover-trigger-width] px-0 py-0",zIndex:y,children:f.jsxs(br,{children:[f.jsx(wr,{placeholder:o}),f.jsxs(Sr,{className:k("max-h-[16.5rem] overflow-y-auto",s),children:[f.jsx(oa,{children:a}),f.jsx(xr,{children:e.map(b=>f.jsx(Cr,{value:b.value,onSelect:()=>{n(t.includes(b.value)?t.filter(x=>x!==b.value):[...t,b.value])},children:f.jsxs("div",{className:"flex items-center",children:[f.jsx("div",{className:k(`mr-2 flex h-4 w-4 items-center justify-center rounded-sm border
|
|
177
|
+
border-primary-400`,t.includes(b.value)?"bg-primary-400 text-white":"opacity-50"),children:t.includes(b.value)?f.jsx(Kt,{className:"h-3 w-3",strokeWidth:3}):null}),b.label]})},b.value))})]})]})})]})});Du.displayName="MultiSelect";var po="rovingFocusGroup.onEntryFocus",HC={bubbles:!1,cancelable:!0},Wn="RovingFocusGroup",[ko,Iu,GC]=Nn(Wn),[zC,Au]=ve(Wn,[GC]),[UC,KC]=zC(Wn),Tu=l.forwardRef((e,t)=>f.jsx(ko.Provider,{scope:e.__scopeRovingFocusGroup,children:f.jsx(ko.Slot,{scope:e.__scopeRovingFocusGroup,children:f.jsx(qC,{...e,ref:t})})}));Tu.displayName=Wn;var qC=l.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:a,currentTabStopId:i,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:c,onEntryFocus:u,preventScrollOnEntryFocus:d=!1,...m}=e,p=l.useRef(null),h=U(t,p),y=bt(a),[g,v]=Ce({prop:i,defaultProp:s??null,onChange:c,caller:Wn}),[b,x]=l.useState(!1),w=Se(u),S=Iu(n),C=l.useRef(!1),[M,N]=l.useState(0);return l.useEffect(()=>{const P=p.current;if(P)return P.addEventListener(po,w),()=>P.removeEventListener(po,w)},[w]),f.jsx(UC,{scope:n,orientation:r,dir:y,loop:o,currentTabStopId:g,onItemFocus:l.useCallback(P=>v(P),[v]),onItemShiftTab:l.useCallback(()=>x(!0),[]),onFocusableItemAdd:l.useCallback(()=>N(P=>P+1),[]),onFocusableItemRemove:l.useCallback(()=>N(P=>P-1),[]),children:f.jsx(V.div,{tabIndex:b||M===0?-1:0,"data-orientation":r,...m,ref:h,style:{outline:"none",...e.style},onMouseDown:O(e.onMouseDown,()=>{C.current=!0}),onFocus:O(e.onFocus,P=>{const F=!C.current;if(P.target===P.currentTarget&&F&&!b){const _=new CustomEvent(po,HC);if(P.currentTarget.dispatchEvent(_),!_.defaultPrevented){const $=S().filter(j=>j.focusable),I=$.find(j=>j.active),B=$.find(j=>j.id===g),q=[I,B,...$].filter(Boolean).map(j=>j.ref.current);Fu(q,d)}}C.current=!1}),onBlur:O(e.onBlur,()=>x(!1))})})}),_u="RovingFocusGroupItem",ju=l.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:a,children:i,...s}=e,c=pe(),u=a||c,d=KC(_u,n),m=d.currentTabStopId===u,p=Iu(n),{onFocusableItemAdd:h,onFocusableItemRemove:y}=d;return l.useEffect(()=>{if(r)return h(),()=>y()},[r,h,y]),f.jsx(ko.ItemSlot,{scope:n,id:u,focusable:r,active:o,children:f.jsx(V.span,{tabIndex:m?0:-1,"data-orientation":d.orientation,...s,ref:t,onMouseDown:O(e.onMouseDown,g=>{r?d.onItemFocus(u):g.preventDefault()}),onFocus:O(e.onFocus,()=>d.onItemFocus(u)),onKeyDown:O(e.onKeyDown,g=>{if(g.key==="Tab"&&g.shiftKey){d.onItemShiftTab();return}if(g.target!==g.currentTarget)return;const v=QC(g,d.orientation,d.dir);if(v!==void 0){if(g.metaKey||g.ctrlKey||g.altKey||g.shiftKey)return;g.preventDefault();let x=p().filter(w=>w.focusable).map(w=>w.ref.current);if(v==="last")x.reverse();else if(v==="prev"||v==="next"){v==="prev"&&x.reverse();const w=x.indexOf(g.currentTarget);x=d.loop?JC(x,w+1):x.slice(w+1)}setTimeout(()=>Fu(x))}}),children:typeof i=="function"?i({isCurrentTabStop:m}):i})})});ju.displayName=_u;var XC={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function ZC(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function QC(e,t,n){const r=ZC(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return XC[r]}function Fu(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function JC(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var e0=Tu,t0=ju,ka="Radio",[n0,$u]=ve(ka),[r0,o0]=n0(ka),Lu=l.forwardRef((e,t)=>{const{__scopeRadio:n,name:r,checked:o=!1,required:a,disabled:i,value:s="on",onCheck:c,form:u,...d}=e,[m,p]=l.useState(null),h=U(t,v=>p(v)),y=l.useRef(!1),g=m?u||!!m.closest("form"):!0;return f.jsxs(r0,{scope:n,checked:o,disabled:i,children:[f.jsx(V.button,{type:"button",role:"radio","aria-checked":o,"data-state":Yu(o),"data-disabled":i?"":void 0,disabled:i,value:s,...d,ref:h,onClick:O(e.onClick,v=>{o||c==null||c(),g&&(y.current=v.isPropagationStopped(),y.current||v.stopPropagation())})}),g&&f.jsx(Vu,{control:m,bubbles:!y.current,name:r,value:s,checked:o,required:a,disabled:i,form:u,style:{transform:"translateX(-100%)"}})]})});Lu.displayName=ka;var Wu="RadioIndicator",Bu=l.forwardRef((e,t)=>{const{__scopeRadio:n,forceMount:r,...o}=e,a=o0(Wu,n);return f.jsx(Ie,{present:r||a.checked,children:f.jsx(V.span,{"data-state":Yu(a.checked),"data-disabled":a.disabled?"":void 0,...o,ref:t})})});Bu.displayName=Wu;var a0="RadioBubbleInput",Vu=l.forwardRef(({__scopeRadio:e,control:t,checked:n,bubbles:r=!0,...o},a)=>{const i=l.useRef(null),s=U(i,a),c=Or(n),u=In(t);return l.useEffect(()=>{const d=i.current;if(!d)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(d,n),d.dispatchEvent(y)}},[c,n,r]),f.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}})});Vu.displayName=a0;function Yu(e){return e?"checked":"unchecked"}var s0=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],_r="RadioGroup",[i0,$E]=ve(_r,[Au,$u]),Hu=Au(),Gu=$u(),[c0,l0]=i0(_r),zu=l.forwardRef((e,t)=>{const{__scopeRadioGroup:n,name:r,defaultValue:o,value:a,required:i=!1,disabled:s=!1,orientation:c,dir:u,loop:d=!0,onValueChange:m,...p}=e,h=Hu(n),y=bt(u),[g,v]=Ce({prop:a,defaultProp:o??"",onChange:m,caller:_r});return f.jsx(c0,{scope:n,name:r,required:i,disabled:s,value:g,onValueChange:v,children:f.jsx(e0,{asChild:!0,...h,orientation:c,dir:y,loop:d,children:f.jsx(V.div,{role:"radiogroup","aria-required":i,"aria-orientation":c,"data-disabled":s?"":void 0,dir:y,...p,ref:t})})})});zu.displayName=_r;var Uu="RadioGroupItem",Ku=l.forwardRef((e,t)=>{const{__scopeRadioGroup:n,disabled:r,...o}=e,a=l0(Uu,n),i=a.disabled||r,s=Hu(n),c=Gu(n),u=l.useRef(null),d=U(t,u),m=a.value===o.value,p=l.useRef(!1);return l.useEffect(()=>{const h=g=>{s0.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)}},[]),f.jsx(t0,{asChild:!0,...s,focusable:!i,active:m,children:f.jsx(Lu,{disabled:i,required:a.required,checked:m,...c,...o,name:a.name,ref:d,onCheck:()=>a.onValueChange(o.value),onKeyDown:O(h=>{h.key==="Enter"&&h.preventDefault()}),onFocus:O(o.onFocus,()=>{var h;p.current&&((h=u.current)==null||h.click())})})})});Ku.displayName=Uu;var u0="RadioGroupIndicator",qu=l.forwardRef((e,t)=>{const{__scopeRadioGroup:n,...r}=e,o=Gu(n);return f.jsx(Bu,{...o,...r,ref:t})});qu.displayName=u0;var d0=zu,Oa=Ku,f0=qu;const Xu=l.forwardRef(({id:e,label:t,description:n,isChecked:r,isDisabled:o,className:a,"aria-label":i,...s},c)=>{const u=Xe({isDisabled:o}),{ariaProps:d,labelId:m,descriptionId:p}=Xo({label:t,description:n,"aria-label":i}),h=()=>t?typeof t=="string"?f.jsx("span",{className:"font-medium",id:m,children:t}):f.jsx("span",{id:m,children:t}):null;return f.jsxs("div",{className:k("relative",r?k(le.button,Et({variant:"primary"})):k(le.button,Et({variant:"input"})),o&&"pointer-events-none cursor-not-allowed opacity-50",a),children:[f.jsx(Oa,{ref:c,checked:r,className:"absolute inset-0 opacity-0",id:e,...d,...s,...u}),f.jsxs("div",{className:"flex items-center gap-2",children:[h(),n?f.jsx("span",{className:"text-sm text-muted-foreground",id:p,children:n}):null]})]})});Xu.displayName="RadioButton";const Zu="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 ",m0=({id:e,label:t})=>t?typeof t=="string"?f.jsx(tn,{htmlFor:e,children:t}):t:null,Qu=l.forwardRef(({id:e,label:t,isChecked:n,isDisabled:r,className:o,"aria-label":a,...i},s)=>{const c=Xe({isDisabled:r});return f.jsxs("div",{className:k("flex items-center gap-2",r&&"cursor-not-allowed opacity-50 [&>*]:cursor-not-allowed"),children:[f.jsx(Oa,{ref:s,"aria-label":a,checked:n,className:k(le.focusRingVisible,le.focusRingVisibleSm,Zu,o),id:e,...i,...c,children:f.jsx(f0,{className:"flex items-center justify-center",children:f.jsx(hi,{className:"h-3 w-3 fill-current text-current"})})}),f.jsx(m0,{id:e,label:t})]})});Qu.displayName="RadioDefault";const Ju=l.forwardRef(({id:e,label:t,description:n,isChecked:r,isDisabled:o,className:a,"aria-label":i,...s},c)=>{const u=Xe({isDisabled:o}),{ariaProps:d,labelId:m,descriptionId:p}=Xo({label:t,description:n,"aria-label":i}),h=()=>t?typeof t=="string"?f.jsx("div",{className:"font-medium",id:m,children:t}):f.jsx("div",{id:m,children:t}):null;return f.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:[f.jsx(Oa,{ref:c,checked:r,className:"absolute inset-0 opacity-0",id:e,...d,...s,...u}),f.jsxs("div",{className:"flex items-start gap-3",children:[f.jsx("div",{className:k(Zu,"pointer-events-none mt-1",r&&"border-primary-400"),children:r?f.jsx("div",{className:"flex h-full w-full items-center justify-center",children:f.jsx(hi,{className:"h-3 w-3 fill-current text-primary-400"})}):null}),f.jsxs("div",{className:"pointer-events-none space-y-1",children:[h(),n?f.jsx("p",{className:"text-sm text-muted-foreground",id:p,children:n}):null]})]})]})});Ju.displayName="RadioTile";const p0=(e,t)=>{if(!e&&!t)throw new Error("Radio must have either a label prop or an aria-label attribute");if(e&&t)throw new Error("Radio must have either a label prop or an aria-label attribute, but not both")},Da=l.forwardRef(({className:e,label:t,description:n,id:r,"aria-label":o,isChecked:a=!1,isDisabled:i=!1,variant:s="default",...c},u)=>(p0(t,o),s==="button"?f.jsx(Xu,{ref:u,"aria-label":o,className:e,description:n,id:r,isChecked:a,isDisabled:i,label:t,...c}):s==="tile"?f.jsx(Ju,{ref:u,"aria-label":o,className:e,description:n,id:r,isChecked:a,isDisabled:i,label:t,...c}):f.jsx(Qu,{ref:u,"aria-label":o,className:e,description:n,id:r,isChecked:a,isDisabled:i,label:t,...c})));Da.displayName="Radio";const ed=l.forwardRef(({options:e,value:t,onChange:n,className:r,orientation:o="vertical",variant:a="default",...i},s)=>f.jsx(d0,{ref:s,className:k("grid gap-3",o==="horizontal"&&a==="default"&&"flex flex-row gap-5",o==="vertical"&&a==="default"&&"flex flex-col gap-2 space-y-1",a==="tile"&&"grid-cols-1 md:grid-cols-2 lg:grid-cols-3",a==="button"&&o==="horizontal"&&`flex flex-row gap-0 [&>*:first-child]:ml-0 [&>*:first-child]:rounded-l-sm
|
|
178
178
|
[&>*:last-child]:rounded-r-sm [&>*]:-ml-[1px] [&>*]:rounded-none`,a==="button"&&o==="vertical"&&`flex flex-col gap-0 [&>*:first-child]:mt-0 [&>*:first-child]:rounded-t-sm
|
|
179
|
-
[&>*:last-child]:rounded-b-sm [&>*]:-mt-[1px] [&>*]:rounded-none`,r),value:t,onValueChange:n,...i,children:e.map(c=>f.jsx(Oa,{description:c.description,id:c.value,isChecked:t===c.value,label:c.label,value:c.value,variant:a},c.value))}));Xu.displayName="RadioGroup";function js(e,[t,n]){return Math.min(n,Math.max(t,e))}var Zu=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",h0=l.forwardRef((e,t)=>f.jsx(V.span,{...e,ref:t,style:{...Zu,...e.style}}));h0.displayName=p0;var g0=[" ","Enter","ArrowUp","ArrowDown"],v0=[" ","Enter"],Pt="Select",[jr,Fr,y0]=Nn(Pt),[nn,$E]=ve(Pt,[y0,Zt]),$r=Zt(),[b0,wt]=nn(Pt),[x0,w0]=nn(Pt),Qu=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:a,value:i,defaultValue:s,onValueChange:c,dir:u,name:d,autoComplete:m,disabled:p,required:h,form:y}=e,g=$r(t),[v,b]=l.useState(null),[x,w]=l.useState(null),[S,C]=l.useState(!1),M=bt(u),[N,P]=Ce({prop:r,defaultProp:o??!1,onChange:a,caller:Pt}),[F,_]=Ce({prop:i,defaultProp:s,onChange:c,caller:Pt}),$=l.useRef(null),A=v?y||!!v.closest("form"):!0,[B,Y]=l.useState(new Set),q=Array.from(B).map(j=>j.props.value).join(";");return f.jsx(ma,{...g,children:f.jsxs(b0,{required:h,scope:t,trigger:v,onTriggerChange:b,valueNode:x,onValueNodeChange:w,valueNodeHasChildren:S,onValueNodeHasChildrenChange:C,contentId:pe(),value:F,onValueChange:_,open:N,onOpenChange:P,dir:M,triggerPointerDownPosRef:$,disabled:p,children:[f.jsx(jr.Provider,{scope:t,children:f.jsx(x0,{scope:e.__scopeSelect,onNativeOptionAdd:l.useCallback(j=>{Y(G=>new Set(G).add(j))},[]),onNativeOptionRemove:l.useCallback(j=>{Y(G=>{const I=new Set(G);return I.delete(j),I})},[]),children:n})}),A?f.jsxs(wd,{"aria-hidden":!0,required:h,tabIndex:-1,name:d,autoComplete:m,value:F,onChange:j=>_(j.target.value),disabled:p,form:y,children:[F===void 0?f.jsx("option",{value:""}):null,Array.from(B)]},q):null]})})};Qu.displayName=Pt;var Ju="SelectTrigger",ed=l.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,a=$r(n),i=wt(Ju,n),s=i.disabled||r,c=U(t,i.onTriggerChange),u=Fr(n),d=l.useRef("touch"),[m,p,h]=Sd(g=>{const v=u().filter(w=>!w.disabled),b=v.find(w=>w.value===i.value),x=Ed(v,g,b);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 f.jsx(Rr,{asChild:!0,...a,children:f.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":Cd(i.value)?"":void 0,...o,ref:c,onClick:O(o.onClick,g=>{g.currentTarget.focus(),d.current!=="mouse"&&y(g)}),onPointerDown:O(o.onPointerDown,g=>{d.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:O(o.onKeyDown,g=>{const v=m.current!=="";!(g.ctrlKey||g.altKey||g.metaKey)&&g.key.length===1&&p(g.key),!(v&&g.key===" ")&&g0.includes(g.key)&&(y(),g.preventDefault())})})})});ed.displayName=Ju;var td="SelectValue",nd=l.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:a,placeholder:i="",...s}=e,c=wt(td,n),{onValueNodeHasChildrenChange:u}=c,d=a!==void 0,m=U(t,c.onValueNodeChange);return de(()=>{u(d)},[u,d]),f.jsx(V.span,{...s,ref:m,style:{pointerEvents:"none"},children:Cd(c.value)?f.jsx(f.Fragment,{children:i}):a})});nd.displayName=td;var C0="SelectIcon",rd=l.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return f.jsx(V.span,{"aria-hidden":!0,...o,ref:t,children:r||"▼"})});rd.displayName=C0;var S0="SelectPortal",od=e=>f.jsx(Pn,{asChild:!0,...e});od.displayName=S0;var kt="SelectContent",ad=l.forwardRef((e,t)=>{const n=wt(kt,e.__scopeSelect),[r,o]=l.useState();if(de(()=>{o(new DocumentFragment)},[]),!n.open){const a=r;return a?En.createPortal(f.jsx(sd,{scope:e.__scopeSelect,children:f.jsx(jr.Slot,{scope:e.__scopeSelect,children:f.jsx("div",{children:e.children})})}),a):null}return f.jsx(id,{...e,ref:t})});ad.displayName=kt;var je=10,[sd,Ct]=nn(kt),E0="SelectContentImpl",N0=pt("SelectContent.RemoveScroll"),id=l.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:a,onPointerDownOutside:i,side:s,sideOffset:c,align:u,alignOffset:d,arrowPadding:m,collisionBoundary:p,collisionPadding:h,sticky:y,hideWhenDetached:g,avoidCollisions:v,...b}=e,x=wt(kt,n),[w,S]=l.useState(null),[C,M]=l.useState(null),N=U(t,T=>S(T)),[P,F]=l.useState(null),[_,$]=l.useState(null),A=Fr(n),[B,Y]=l.useState(!1),q=l.useRef(!1);l.useEffect(()=>{if(w)return gr(w)},[w]),pr();const j=l.useCallback(T=>{const[Z,...K]=A().map(oe=>oe.ref.current),[te]=K.slice(-1),re=document.activeElement;for(const oe of T)if(oe===re||(oe==null||oe.scrollIntoView({block:"nearest"}),oe===Z&&C&&(C.scrollTop=0),oe===te&&C&&(C.scrollTop=C.scrollHeight),oe==null||oe.focus(),document.activeElement!==re))return},[A,C]),G=l.useCallback(()=>j([P,w]),[j,P,w]);l.useEffect(()=>{B&&G()},[B,G]);const{onOpenChange:I,triggerPointerDownPosRef:D}=x;l.useEffect(()=>{if(w){let T={x:0,y:0};const Z=te=>{var re,oe;T={x:Math.abs(Math.round(te.pageX)-(((re=D.current)==null?void 0:re.x)??0)),y:Math.abs(Math.round(te.pageY)-(((oe=D.current)==null?void 0:oe.y)??0))}},K=te=>{T.x<=10&&T.y<=10?te.preventDefault():w.contains(te.target)||I(!1),document.removeEventListener("pointermove",Z),D.current=null};return D.current!==null&&(document.addEventListener("pointermove",Z),document.addEventListener("pointerup",K,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",Z),document.removeEventListener("pointerup",K,{capture:!0})}}},[w,I,D]),l.useEffect(()=>{const T=()=>I(!1);return window.addEventListener("blur",T),window.addEventListener("resize",T),()=>{window.removeEventListener("blur",T),window.removeEventListener("resize",T)}},[I]);const[Q,J]=Sd(T=>{const Z=A().filter(re=>!re.disabled),K=Z.find(re=>re.ref.current===document.activeElement),te=Ed(Z,T,K);te&&setTimeout(()=>te.ref.current.focus())}),R=l.useCallback((T,Z,K)=>{const te=!q.current&&!K;(x.value!==void 0&&x.value===Z||te)&&(F(T),te&&(q.current=!0))},[x.value]),L=l.useCallback(()=>w==null?void 0:w.focus(),[w]),z=l.useCallback((T,Z,K)=>{const te=!q.current&&!K;(x.value!==void 0&&x.value===Z||te)&&$(T)},[x.value]),W=r==="popper"?Oo:cd,X=W===Oo?{side:s,sideOffset:c,align:u,alignOffset:d,arrowPadding:m,collisionBoundary:p,collisionPadding:h,sticky:y,hideWhenDetached:g,avoidCollisions:v}:{};return f.jsx(sd,{scope:n,content:w,viewport:C,onViewportChange:M,itemRefCallback:R,selectedItem:P,onItemLeave:L,itemTextRefCallback:z,focusSelectedItem:G,selectedItemText:_,position:r,isPositioned:B,searchRef:Q,children:f.jsx(kn,{as:N0,allowPinchZoom:!0,children:f.jsx(Rn,{asChild:!0,trapped:x.open,onMountAutoFocus:T=>{T.preventDefault()},onUnmountAutoFocus:O(o,T=>{var Z;(Z=x.trigger)==null||Z.focus({preventScroll:!0}),T.preventDefault()}),children:f.jsx(Mn,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:i,onFocusOutside:T=>T.preventDefault(),onDismiss:()=>x.onOpenChange(!1),children:f.jsx(W,{role:"listbox",id:x.contentId,"data-state":x.open?"open":"closed",dir:x.dir,onContextMenu:T=>T.preventDefault(),...b,...X,onPlaced:()=>Y(!0),ref:N,style:{display:"flex",flexDirection:"column",outline:"none",...b.style},onKeyDown:O(b.onKeyDown,T=>{const Z=T.ctrlKey||T.altKey||T.metaKey;if(T.key==="Tab"&&T.preventDefault(),!Z&&T.key.length===1&&J(T.key),["ArrowUp","ArrowDown","Home","End"].includes(T.key)){let te=A().filter(re=>!re.disabled).map(re=>re.ref.current);if(["ArrowUp","End"].includes(T.key)&&(te=te.slice().reverse()),["ArrowUp","ArrowDown"].includes(T.key)){const re=T.target,oe=te.indexOf(re);te=te.slice(oe+1)}setTimeout(()=>j(te)),T.preventDefault()}})})})})})})});id.displayName=E0;var M0="SelectItemAlignedPosition",cd=l.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,a=wt(kt,n),i=Ct(kt,n),[s,c]=l.useState(null),[u,d]=l.useState(null),m=U(t,N=>d(N)),p=Fr(n),h=l.useRef(!1),y=l.useRef(!0),{viewport:g,selectedItem:v,selectedItemText:b,focusSelectedItem:x}=i,w=l.useCallback(()=>{if(a.trigger&&a.valueNode&&s&&u&&g&&v&&b){const N=a.trigger.getBoundingClientRect(),P=u.getBoundingClientRect(),F=a.valueNode.getBoundingClientRect(),_=b.getBoundingClientRect();if(a.dir!=="rtl"){const re=_.left-P.left,oe=F.left-re,he=N.left-oe,be=N.width+he,Je=Math.max(be,P.width),et=window.innerWidth-je,tt=js(oe,[je,Math.max(je,et-Je)]);s.style.minWidth=be+"px",s.style.left=tt+"px"}else{const re=P.right-_.right,oe=window.innerWidth-F.right-re,he=window.innerWidth-N.right-oe,be=N.width+he,Je=Math.max(be,P.width),et=window.innerWidth-je,tt=js(oe,[je,Math.max(je,et-Je)]);s.style.minWidth=be+"px",s.style.right=tt+"px"}const $=p(),A=window.innerHeight-je*2,B=g.scrollHeight,Y=window.getComputedStyle(u),q=parseInt(Y.borderTopWidth,10),j=parseInt(Y.paddingTop,10),G=parseInt(Y.borderBottomWidth,10),I=parseInt(Y.paddingBottom,10),D=q+j+B+I+G,Q=Math.min(v.offsetHeight*5,D),J=window.getComputedStyle(g),R=parseInt(J.paddingTop,10),L=parseInt(J.paddingBottom,10),z=N.top+N.height/2-je,W=A-z,X=v.offsetHeight/2,T=v.offsetTop+X,Z=q+j+T,K=D-Z;if(Z<=z){const re=$.length>0&&v===$[$.length-1].ref.current;s.style.bottom="0px";const oe=u.clientHeight-g.offsetTop-g.offsetHeight,he=Math.max(W,X+(re?L:0)+oe+G),be=Z+he;s.style.height=be+"px"}else{const re=$.length>0&&v===$[0].ref.current;s.style.top="0px";const he=Math.max(z,q+g.offsetTop+(re?R:0)+X)+K;s.style.height=he+"px",g.scrollTop=Z-z+g.offsetTop}s.style.margin=`${je}px 0`,s.style.minHeight=Q+"px",s.style.maxHeight=A+"px",r==null||r(),requestAnimationFrame(()=>h.current=!0)}},[p,a.trigger,a.valueNode,s,u,g,v,b,a.dir,r]);de(()=>w(),[w]);const[S,C]=l.useState();de(()=>{u&&C(window.getComputedStyle(u).zIndex)},[u]);const M=l.useCallback(N=>{N&&y.current===!0&&(w(),x==null||x(),y.current=!1)},[w,x]);return f.jsx(P0,{scope:n,contentWrapper:s,shouldExpandOnScrollRef:h,onScrollButtonChange:M,children:f.jsx("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:S},children:f.jsx(V.div,{...o,ref:m,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});cd.displayName=M0;var R0="SelectPopperPosition",Oo=l.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=je,...a}=e,i=$r(n);return f.jsx(pa,{...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)"}})});Oo.displayName=R0;var[P0,Da]=nn(kt,{}),Do="SelectViewport",ld=l.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...o}=e,a=Ct(Do,n),i=Da(Do,n),s=U(t,a.onViewportChange),c=l.useRef(0);return f.jsxs(f.Fragment,{children:[f.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}),f.jsx(jr.Slot,{scope:n,children:f.jsx(V.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:s,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:O(o.onScroll,u=>{const d=u.currentTarget,{contentWrapper:m,shouldExpandOnScrollRef:p}=i;if(p!=null&&p.current&&m){const h=Math.abs(c.current-d.scrollTop);if(h>0){const y=window.innerHeight-je*2,g=parseFloat(m.style.minHeight),v=parseFloat(m.style.height),b=Math.max(g,v);if(b<y){const x=b+h,w=Math.min(y,x),S=x-w;m.style.height=w+"px",m.style.bottom==="0px"&&(d.scrollTop=S>0?S:0,m.style.justifyContent="flex-end")}}}c.current=d.scrollTop})})})]})});ld.displayName=Do;var ud="SelectGroup",[k0,O0]=nn(ud),dd=l.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=pe();return f.jsx(k0,{scope:n,id:o,children:f.jsx(V.div,{role:"group","aria-labelledby":o,...r,ref:t})})});dd.displayName=ud;var fd="SelectLabel",md=l.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=O0(fd,n);return f.jsx(V.div,{id:o.id,...r,ref:t})});md.displayName=fd;var lr="SelectItem",[D0,pd]=nn(lr),hd=l.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:a,...i}=e,s=wt(lr,n),c=Ct(lr,n),u=s.value===r,[d,m]=l.useState(a??""),[p,h]=l.useState(!1),y=U(t,x=>{var w;return(w=c.itemRefCallback)==null?void 0:w.call(c,x,r,o)}),g=pe(),v=l.useRef("touch"),b=()=>{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 f.jsx(D0,{scope:n,value:r,disabled:o,textId:g,isSelected:u,onItemTextChange:l.useCallback(x=>{m(w=>w||((x==null?void 0:x.textContent)??"").trim())},[]),children:f.jsx(jr.ItemSlot,{scope:n,value:r,disabled:o,textValue:d,children:f.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:O(i.onFocus,()=>h(!0)),onBlur:O(i.onBlur,()=>h(!1)),onClick:O(i.onClick,()=>{v.current!=="mouse"&&b()}),onPointerUp:O(i.onPointerUp,()=>{v.current==="mouse"&&b()}),onPointerDown:O(i.onPointerDown,x=>{v.current=x.pointerType}),onPointerMove:O(i.onPointerMove,x=>{var w;v.current=x.pointerType,o?(w=c.onItemLeave)==null||w.call(c):v.current==="mouse"&&x.currentTarget.focus({preventScroll:!0})}),onPointerLeave:O(i.onPointerLeave,x=>{var w;x.currentTarget===document.activeElement&&((w=c.onItemLeave)==null||w.call(c))}),onKeyDown:O(i.onKeyDown,x=>{var S;((S=c.searchRef)==null?void 0:S.current)!==""&&x.key===" "||(v0.includes(x.key)&&b(),x.key===" "&&x.preventDefault())})})})})});hd.displayName=lr;var mn="SelectItemText",gd=l.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,...a}=e,i=wt(mn,n),s=Ct(mn,n),c=pd(mn,n),u=w0(mn,n),[d,m]=l.useState(null),p=U(t,b=>m(b),c.onItemTextChange,b=>{var x;return(x=s.itemTextRefCallback)==null?void 0:x.call(s,b,c.value,c.disabled)}),h=d==null?void 0:d.textContent,y=l.useMemo(()=>f.jsx("option",{value:c.value,disabled:c.disabled,children:h},c.value),[c.disabled,c.value,h]),{onNativeOptionAdd:g,onNativeOptionRemove:v}=u;return de(()=>(g(y),()=>v(y)),[g,v,y]),f.jsxs(f.Fragment,{children:[f.jsx(V.span,{id:c.textId,...a,ref:p}),c.isSelected&&i.valueNode&&!i.valueNodeHasChildren?En.createPortal(a.children,i.valueNode):null]})});gd.displayName=mn;var vd="SelectItemIndicator",yd=l.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return pd(vd,n).isSelected?f.jsx(V.span,{"aria-hidden":!0,...r,ref:t}):null});yd.displayName=vd;var Ao="SelectScrollUpButton",A0=l.forwardRef((e,t)=>{const n=Ct(Ao,e.__scopeSelect),r=Da(Ao,e.__scopeSelect),[o,a]=l.useState(!1),i=U(t,r.onScrollButtonChange);return de(()=>{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?f.jsx(bd,{...e,ref:i,onAutoScroll:()=>{const{viewport:s,selectedItem:c}=n;s&&c&&(s.scrollTop=s.scrollTop-c.offsetHeight)}}):null});A0.displayName=Ao;var To="SelectScrollDownButton",T0=l.forwardRef((e,t)=>{const n=Ct(To,e.__scopeSelect),r=Da(To,e.__scopeSelect),[o,a]=l.useState(!1),i=U(t,r.onScrollButtonChange);return de(()=>{if(n.viewport&&n.isPositioned){let s=function(){const u=c.scrollHeight-c.clientHeight,d=Math.ceil(c.scrollTop)<u;a(d)};const c=n.viewport;return s(),c.addEventListener("scroll",s),()=>c.removeEventListener("scroll",s)}},[n.viewport,n.isPositioned]),o?f.jsx(bd,{...e,ref:i,onAutoScroll:()=>{const{viewport:s,selectedItem:c}=n;s&&c&&(s.scrollTop=s.scrollTop+c.offsetHeight)}}):null});T0.displayName=To;var bd=l.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,a=Ct("SelectScrollButton",n),i=l.useRef(null),s=Fr(n),c=l.useCallback(()=>{i.current!==null&&(window.clearInterval(i.current),i.current=null)},[]);return l.useEffect(()=>()=>c(),[c]),de(()=>{var d;const u=s().find(m=>m.ref.current===document.activeElement);(d=u==null?void 0:u.ref.current)==null||d.scrollIntoView({block:"nearest"})},[s]),f.jsx(V.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:O(o.onPointerDown,()=>{i.current===null&&(i.current=window.setInterval(r,50))}),onPointerMove:O(o.onPointerMove,()=>{var u;(u=a.onItemLeave)==null||u.call(a),i.current===null&&(i.current=window.setInterval(r,50))}),onPointerLeave:O(o.onPointerLeave,()=>{c()})})}),I0="SelectSeparator",xd=l.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return f.jsx(V.div,{"aria-hidden":!0,...r,ref:t})});xd.displayName=I0;var Io="SelectArrow",_0=l.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=$r(n),a=wt(Io,n),i=Ct(Io,n);return a.open&&i.position==="popper"?f.jsx(ha,{...o,...r,ref:t}):null});_0.displayName=Io;var j0="SelectBubbleInput",wd=l.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const o=l.useRef(null),a=U(r,o),i=Or(t);return l.useEffect(()=>{const s=o.current;if(!s)return;const c=window.HTMLSelectElement.prototype,d=Object.getOwnPropertyDescriptor(c,"value").set;if(i!==t&&d){const m=new Event("change",{bubbles:!0});d.call(s,t),s.dispatchEvent(m)}},[i,t]),f.jsx(V.select,{...n,style:{...Zu,...n.style},ref:a,defaultValue:t})});wd.displayName=j0;function Cd(e){return e===""||e===void 0}function Sd(e){const t=Se(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 Ed(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=F0(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 F0(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var $0=Qu,Nd=ed,L0=nd,W0=rd,B0=od,Md=ad,V0=ld,Y0=dd,Rd=md,Pd=hd,H0=gd,G0=yd,kd=xd;const Aa=l.forwardRef(({className:e,children:t,position:n="popper",zIndex:r,style:o,...a},i)=>f.jsx(B0,{children:f.jsx(Md,{ref:i,className:k(`relative min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground
|
|
179
|
+
[&>*:last-child]:rounded-b-sm [&>*]:-mt-[1px] [&>*]:rounded-none`,r),value:t,onValueChange:n,...i,children:e.map(c=>f.jsx(Da,{description:c.description,id:c.value,isChecked:t===c.value,label:c.label,value:c.value,variant:a},c.value))}));ed.displayName="RadioGroup";function Fs(e,[t,n]){return Math.min(n,Math.max(t,e))}var td=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"}),h0="VisuallyHidden",g0=l.forwardRef((e,t)=>f.jsx(V.span,{...e,ref:t,style:{...td,...e.style}}));g0.displayName=h0;var v0=[" ","Enter","ArrowUp","ArrowDown"],y0=[" ","Enter"],Pt="Select",[jr,Fr,b0]=Nn(Pt),[nn,LE]=ve(Pt,[b0,Zt]),$r=Zt(),[x0,wt]=nn(Pt),[w0,C0]=nn(Pt),nd=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:a,value:i,defaultValue:s,onValueChange:c,dir:u,name:d,autoComplete:m,disabled:p,required:h,form:y}=e,g=$r(t),[v,b]=l.useState(null),[x,w]=l.useState(null),[S,C]=l.useState(!1),M=bt(u),[N,P]=Ce({prop:r,defaultProp:o??!1,onChange:a,caller:Pt}),[F,_]=Ce({prop:i,defaultProp:s,onChange:c,caller:Pt}),$=l.useRef(null),I=v?y||!!v.closest("form"):!0,[B,Y]=l.useState(new Set),q=Array.from(B).map(j=>j.props.value).join(";");return f.jsx(pa,{...g,children:f.jsxs(x0,{required:h,scope:t,trigger:v,onTriggerChange:b,valueNode:x,onValueNodeChange:w,valueNodeHasChildren:S,onValueNodeHasChildrenChange:C,contentId:pe(),value:F,onValueChange:_,open:N,onOpenChange:P,dir:M,triggerPointerDownPosRef:$,disabled:p,children:[f.jsx(jr.Provider,{scope:t,children:f.jsx(w0,{scope:e.__scopeSelect,onNativeOptionAdd:l.useCallback(j=>{Y(G=>new Set(G).add(j))},[]),onNativeOptionRemove:l.useCallback(j=>{Y(G=>{const T=new Set(G);return T.delete(j),T})},[]),children:n})}),I?f.jsxs(Nd,{"aria-hidden":!0,required:h,tabIndex:-1,name:d,autoComplete:m,value:F,onChange:j=>_(j.target.value),disabled:p,form:y,children:[F===void 0?f.jsx("option",{value:""}):null,Array.from(B)]},q):null]})})};nd.displayName=Pt;var rd="SelectTrigger",od=l.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,a=$r(n),i=wt(rd,n),s=i.disabled||r,c=U(t,i.onTriggerChange),u=Fr(n),d=l.useRef("touch"),[m,p,h]=Rd(g=>{const v=u().filter(w=>!w.disabled),b=v.find(w=>w.value===i.value),x=Pd(v,g,b);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 f.jsx(Rr,{asChild:!0,...a,children:f.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":Md(i.value)?"":void 0,...o,ref:c,onClick:O(o.onClick,g=>{g.currentTarget.focus(),d.current!=="mouse"&&y(g)}),onPointerDown:O(o.onPointerDown,g=>{d.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:O(o.onKeyDown,g=>{const v=m.current!=="";!(g.ctrlKey||g.altKey||g.metaKey)&&g.key.length===1&&p(g.key),!(v&&g.key===" ")&&v0.includes(g.key)&&(y(),g.preventDefault())})})})});od.displayName=rd;var ad="SelectValue",sd=l.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:a,placeholder:i="",...s}=e,c=wt(ad,n),{onValueNodeHasChildrenChange:u}=c,d=a!==void 0,m=U(t,c.onValueNodeChange);return de(()=>{u(d)},[u,d]),f.jsx(V.span,{...s,ref:m,style:{pointerEvents:"none"},children:Md(c.value)?f.jsx(f.Fragment,{children:i}):a})});sd.displayName=ad;var S0="SelectIcon",id=l.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return f.jsx(V.span,{"aria-hidden":!0,...o,ref:t,children:r||"▼"})});id.displayName=S0;var E0="SelectPortal",cd=e=>f.jsx(Pn,{asChild:!0,...e});cd.displayName=E0;var kt="SelectContent",ld=l.forwardRef((e,t)=>{const n=wt(kt,e.__scopeSelect),[r,o]=l.useState();if(de(()=>{o(new DocumentFragment)},[]),!n.open){const a=r;return a?En.createPortal(f.jsx(ud,{scope:e.__scopeSelect,children:f.jsx(jr.Slot,{scope:e.__scopeSelect,children:f.jsx("div",{children:e.children})})}),a):null}return f.jsx(dd,{...e,ref:t})});ld.displayName=kt;var je=10,[ud,Ct]=nn(kt),N0="SelectContentImpl",M0=pt("SelectContent.RemoveScroll"),dd=l.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:a,onPointerDownOutside:i,side:s,sideOffset:c,align:u,alignOffset:d,arrowPadding:m,collisionBoundary:p,collisionPadding:h,sticky:y,hideWhenDetached:g,avoidCollisions:v,...b}=e,x=wt(kt,n),[w,S]=l.useState(null),[C,M]=l.useState(null),N=U(t,A=>S(A)),[P,F]=l.useState(null),[_,$]=l.useState(null),I=Fr(n),[B,Y]=l.useState(!1),q=l.useRef(!1);l.useEffect(()=>{if(w)return gr(w)},[w]),pr();const j=l.useCallback(A=>{const[Z,...K]=I().map(oe=>oe.ref.current),[te]=K.slice(-1),re=document.activeElement;for(const oe of A)if(oe===re||(oe==null||oe.scrollIntoView({block:"nearest"}),oe===Z&&C&&(C.scrollTop=0),oe===te&&C&&(C.scrollTop=C.scrollHeight),oe==null||oe.focus(),document.activeElement!==re))return},[I,C]),G=l.useCallback(()=>j([P,w]),[j,P,w]);l.useEffect(()=>{B&&G()},[B,G]);const{onOpenChange:T,triggerPointerDownPosRef:D}=x;l.useEffect(()=>{if(w){let A={x:0,y:0};const Z=te=>{var re,oe;A={x:Math.abs(Math.round(te.pageX)-(((re=D.current)==null?void 0:re.x)??0)),y:Math.abs(Math.round(te.pageY)-(((oe=D.current)==null?void 0:oe.y)??0))}},K=te=>{A.x<=10&&A.y<=10?te.preventDefault():w.contains(te.target)||T(!1),document.removeEventListener("pointermove",Z),D.current=null};return D.current!==null&&(document.addEventListener("pointermove",Z),document.addEventListener("pointerup",K,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",Z),document.removeEventListener("pointerup",K,{capture:!0})}}},[w,T,D]),l.useEffect(()=>{const A=()=>T(!1);return window.addEventListener("blur",A),window.addEventListener("resize",A),()=>{window.removeEventListener("blur",A),window.removeEventListener("resize",A)}},[T]);const[Q,J]=Rd(A=>{const Z=I().filter(re=>!re.disabled),K=Z.find(re=>re.ref.current===document.activeElement),te=Pd(Z,A,K);te&&setTimeout(()=>te.ref.current.focus())}),R=l.useCallback((A,Z,K)=>{const te=!q.current&&!K;(x.value!==void 0&&x.value===Z||te)&&(F(A),te&&(q.current=!0))},[x.value]),L=l.useCallback(()=>w==null?void 0:w.focus(),[w]),z=l.useCallback((A,Z,K)=>{const te=!q.current&&!K;(x.value!==void 0&&x.value===Z||te)&&$(A)},[x.value]),W=r==="popper"?Oo:fd,X=W===Oo?{side:s,sideOffset:c,align:u,alignOffset:d,arrowPadding:m,collisionBoundary:p,collisionPadding:h,sticky:y,hideWhenDetached:g,avoidCollisions:v}:{};return f.jsx(ud,{scope:n,content:w,viewport:C,onViewportChange:M,itemRefCallback:R,selectedItem:P,onItemLeave:L,itemTextRefCallback:z,focusSelectedItem:G,selectedItemText:_,position:r,isPositioned:B,searchRef:Q,children:f.jsx(kn,{as:M0,allowPinchZoom:!0,children:f.jsx(Rn,{asChild:!0,trapped:x.open,onMountAutoFocus:A=>{A.preventDefault()},onUnmountAutoFocus:O(o,A=>{var Z;(Z=x.trigger)==null||Z.focus({preventScroll:!0}),A.preventDefault()}),children:f.jsx(Mn,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:a,onPointerDownOutside:i,onFocusOutside:A=>A.preventDefault(),onDismiss:()=>x.onOpenChange(!1),children:f.jsx(W,{role:"listbox",id:x.contentId,"data-state":x.open?"open":"closed",dir:x.dir,onContextMenu:A=>A.preventDefault(),...b,...X,onPlaced:()=>Y(!0),ref:N,style:{display:"flex",flexDirection:"column",outline:"none",...b.style},onKeyDown:O(b.onKeyDown,A=>{const Z=A.ctrlKey||A.altKey||A.metaKey;if(A.key==="Tab"&&A.preventDefault(),!Z&&A.key.length===1&&J(A.key),["ArrowUp","ArrowDown","Home","End"].includes(A.key)){let te=I().filter(re=>!re.disabled).map(re=>re.ref.current);if(["ArrowUp","End"].includes(A.key)&&(te=te.slice().reverse()),["ArrowUp","ArrowDown"].includes(A.key)){const re=A.target,oe=te.indexOf(re);te=te.slice(oe+1)}setTimeout(()=>j(te)),A.preventDefault()}})})})})})})});dd.displayName=N0;var R0="SelectItemAlignedPosition",fd=l.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,a=wt(kt,n),i=Ct(kt,n),[s,c]=l.useState(null),[u,d]=l.useState(null),m=U(t,N=>d(N)),p=Fr(n),h=l.useRef(!1),y=l.useRef(!0),{viewport:g,selectedItem:v,selectedItemText:b,focusSelectedItem:x}=i,w=l.useCallback(()=>{if(a.trigger&&a.valueNode&&s&&u&&g&&v&&b){const N=a.trigger.getBoundingClientRect(),P=u.getBoundingClientRect(),F=a.valueNode.getBoundingClientRect(),_=b.getBoundingClientRect();if(a.dir!=="rtl"){const re=_.left-P.left,oe=F.left-re,he=N.left-oe,be=N.width+he,Je=Math.max(be,P.width),et=window.innerWidth-je,tt=Fs(oe,[je,Math.max(je,et-Je)]);s.style.minWidth=be+"px",s.style.left=tt+"px"}else{const re=P.right-_.right,oe=window.innerWidth-F.right-re,he=window.innerWidth-N.right-oe,be=N.width+he,Je=Math.max(be,P.width),et=window.innerWidth-je,tt=Fs(oe,[je,Math.max(je,et-Je)]);s.style.minWidth=be+"px",s.style.right=tt+"px"}const $=p(),I=window.innerHeight-je*2,B=g.scrollHeight,Y=window.getComputedStyle(u),q=parseInt(Y.borderTopWidth,10),j=parseInt(Y.paddingTop,10),G=parseInt(Y.borderBottomWidth,10),T=parseInt(Y.paddingBottom,10),D=q+j+B+T+G,Q=Math.min(v.offsetHeight*5,D),J=window.getComputedStyle(g),R=parseInt(J.paddingTop,10),L=parseInt(J.paddingBottom,10),z=N.top+N.height/2-je,W=I-z,X=v.offsetHeight/2,A=v.offsetTop+X,Z=q+j+A,K=D-Z;if(Z<=z){const re=$.length>0&&v===$[$.length-1].ref.current;s.style.bottom="0px";const oe=u.clientHeight-g.offsetTop-g.offsetHeight,he=Math.max(W,X+(re?L:0)+oe+G),be=Z+he;s.style.height=be+"px"}else{const re=$.length>0&&v===$[0].ref.current;s.style.top="0px";const he=Math.max(z,q+g.offsetTop+(re?R:0)+X)+K;s.style.height=he+"px",g.scrollTop=Z-z+g.offsetTop}s.style.margin=`${je}px 0`,s.style.minHeight=Q+"px",s.style.maxHeight=I+"px",r==null||r(),requestAnimationFrame(()=>h.current=!0)}},[p,a.trigger,a.valueNode,s,u,g,v,b,a.dir,r]);de(()=>w(),[w]);const[S,C]=l.useState();de(()=>{u&&C(window.getComputedStyle(u).zIndex)},[u]);const M=l.useCallback(N=>{N&&y.current===!0&&(w(),x==null||x(),y.current=!1)},[w,x]);return f.jsx(k0,{scope:n,contentWrapper:s,shouldExpandOnScrollRef:h,onScrollButtonChange:M,children:f.jsx("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:S},children:f.jsx(V.div,{...o,ref:m,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});fd.displayName=R0;var P0="SelectPopperPosition",Oo=l.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=je,...a}=e,i=$r(n);return f.jsx(ha,{...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)"}})});Oo.displayName=P0;var[k0,Ia]=nn(kt,{}),Do="SelectViewport",md=l.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...o}=e,a=Ct(Do,n),i=Ia(Do,n),s=U(t,a.onViewportChange),c=l.useRef(0);return f.jsxs(f.Fragment,{children:[f.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}),f.jsx(jr.Slot,{scope:n,children:f.jsx(V.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:s,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:O(o.onScroll,u=>{const d=u.currentTarget,{contentWrapper:m,shouldExpandOnScrollRef:p}=i;if(p!=null&&p.current&&m){const h=Math.abs(c.current-d.scrollTop);if(h>0){const y=window.innerHeight-je*2,g=parseFloat(m.style.minHeight),v=parseFloat(m.style.height),b=Math.max(g,v);if(b<y){const x=b+h,w=Math.min(y,x),S=x-w;m.style.height=w+"px",m.style.bottom==="0px"&&(d.scrollTop=S>0?S:0,m.style.justifyContent="flex-end")}}}c.current=d.scrollTop})})})]})});md.displayName=Do;var pd="SelectGroup",[O0,D0]=nn(pd),hd=l.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=pe();return f.jsx(O0,{scope:n,id:o,children:f.jsx(V.div,{role:"group","aria-labelledby":o,...r,ref:t})})});hd.displayName=pd;var gd="SelectLabel",vd=l.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=D0(gd,n);return f.jsx(V.div,{id:o.id,...r,ref:t})});vd.displayName=gd;var lr="SelectItem",[I0,yd]=nn(lr),bd=l.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:a,...i}=e,s=wt(lr,n),c=Ct(lr,n),u=s.value===r,[d,m]=l.useState(a??""),[p,h]=l.useState(!1),y=U(t,x=>{var w;return(w=c.itemRefCallback)==null?void 0:w.call(c,x,r,o)}),g=pe(),v=l.useRef("touch"),b=()=>{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 f.jsx(I0,{scope:n,value:r,disabled:o,textId:g,isSelected:u,onItemTextChange:l.useCallback(x=>{m(w=>w||((x==null?void 0:x.textContent)??"").trim())},[]),children:f.jsx(jr.ItemSlot,{scope:n,value:r,disabled:o,textValue:d,children:f.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:O(i.onFocus,()=>h(!0)),onBlur:O(i.onBlur,()=>h(!1)),onClick:O(i.onClick,()=>{v.current!=="mouse"&&b()}),onPointerUp:O(i.onPointerUp,()=>{v.current==="mouse"&&b()}),onPointerDown:O(i.onPointerDown,x=>{v.current=x.pointerType}),onPointerMove:O(i.onPointerMove,x=>{var w;v.current=x.pointerType,o?(w=c.onItemLeave)==null||w.call(c):v.current==="mouse"&&x.currentTarget.focus({preventScroll:!0})}),onPointerLeave:O(i.onPointerLeave,x=>{var w;x.currentTarget===document.activeElement&&((w=c.onItemLeave)==null||w.call(c))}),onKeyDown:O(i.onKeyDown,x=>{var S;((S=c.searchRef)==null?void 0:S.current)!==""&&x.key===" "||(y0.includes(x.key)&&b(),x.key===" "&&x.preventDefault())})})})})});bd.displayName=lr;var mn="SelectItemText",xd=l.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,...a}=e,i=wt(mn,n),s=Ct(mn,n),c=yd(mn,n),u=C0(mn,n),[d,m]=l.useState(null),p=U(t,b=>m(b),c.onItemTextChange,b=>{var x;return(x=s.itemTextRefCallback)==null?void 0:x.call(s,b,c.value,c.disabled)}),h=d==null?void 0:d.textContent,y=l.useMemo(()=>f.jsx("option",{value:c.value,disabled:c.disabled,children:h},c.value),[c.disabled,c.value,h]),{onNativeOptionAdd:g,onNativeOptionRemove:v}=u;return de(()=>(g(y),()=>v(y)),[g,v,y]),f.jsxs(f.Fragment,{children:[f.jsx(V.span,{id:c.textId,...a,ref:p}),c.isSelected&&i.valueNode&&!i.valueNodeHasChildren?En.createPortal(a.children,i.valueNode):null]})});xd.displayName=mn;var wd="SelectItemIndicator",Cd=l.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return yd(wd,n).isSelected?f.jsx(V.span,{"aria-hidden":!0,...r,ref:t}):null});Cd.displayName=wd;var Io="SelectScrollUpButton",A0=l.forwardRef((e,t)=>{const n=Ct(Io,e.__scopeSelect),r=Ia(Io,e.__scopeSelect),[o,a]=l.useState(!1),i=U(t,r.onScrollButtonChange);return de(()=>{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?f.jsx(Sd,{...e,ref:i,onAutoScroll:()=>{const{viewport:s,selectedItem:c}=n;s&&c&&(s.scrollTop=s.scrollTop-c.offsetHeight)}}):null});A0.displayName=Io;var Ao="SelectScrollDownButton",T0=l.forwardRef((e,t)=>{const n=Ct(Ao,e.__scopeSelect),r=Ia(Ao,e.__scopeSelect),[o,a]=l.useState(!1),i=U(t,r.onScrollButtonChange);return de(()=>{if(n.viewport&&n.isPositioned){let s=function(){const u=c.scrollHeight-c.clientHeight,d=Math.ceil(c.scrollTop)<u;a(d)};const c=n.viewport;return s(),c.addEventListener("scroll",s),()=>c.removeEventListener("scroll",s)}},[n.viewport,n.isPositioned]),o?f.jsx(Sd,{...e,ref:i,onAutoScroll:()=>{const{viewport:s,selectedItem:c}=n;s&&c&&(s.scrollTop=s.scrollTop+c.offsetHeight)}}):null});T0.displayName=Ao;var Sd=l.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,a=Ct("SelectScrollButton",n),i=l.useRef(null),s=Fr(n),c=l.useCallback(()=>{i.current!==null&&(window.clearInterval(i.current),i.current=null)},[]);return l.useEffect(()=>()=>c(),[c]),de(()=>{var d;const u=s().find(m=>m.ref.current===document.activeElement);(d=u==null?void 0:u.ref.current)==null||d.scrollIntoView({block:"nearest"})},[s]),f.jsx(V.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:O(o.onPointerDown,()=>{i.current===null&&(i.current=window.setInterval(r,50))}),onPointerMove:O(o.onPointerMove,()=>{var u;(u=a.onItemLeave)==null||u.call(a),i.current===null&&(i.current=window.setInterval(r,50))}),onPointerLeave:O(o.onPointerLeave,()=>{c()})})}),_0="SelectSeparator",Ed=l.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return f.jsx(V.div,{"aria-hidden":!0,...r,ref:t})});Ed.displayName=_0;var To="SelectArrow",j0=l.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=$r(n),a=wt(To,n),i=Ct(To,n);return a.open&&i.position==="popper"?f.jsx(ga,{...o,...r,ref:t}):null});j0.displayName=To;var F0="SelectBubbleInput",Nd=l.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const o=l.useRef(null),a=U(r,o),i=Or(t);return l.useEffect(()=>{const s=o.current;if(!s)return;const c=window.HTMLSelectElement.prototype,d=Object.getOwnPropertyDescriptor(c,"value").set;if(i!==t&&d){const m=new Event("change",{bubbles:!0});d.call(s,t),s.dispatchEvent(m)}},[i,t]),f.jsx(V.select,{...n,style:{...td,...n.style},ref:a,defaultValue:t})});Nd.displayName=F0;function Md(e){return e===""||e===void 0}function Rd(e){const t=Se(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 Pd(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=$0(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 $0(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var L0=nd,kd=od,W0=sd,B0=id,V0=cd,Od=ld,Y0=md,H0=hd,Dd=vd,Id=bd,G0=xd,z0=Cd,Ad=Ed;const Aa=l.forwardRef(({className:e,children:t,position:n="popper",zIndex:r,style:o,...a},i)=>f.jsx(V0,{children:f.jsx(Od,{ref:i,className:k(`relative min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground
|
|
180
180
|
shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out
|
|
181
181
|
data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95
|
|
182
182
|
data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2
|
|
183
183
|
data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2
|
|
184
184
|
data-[side=top]:slide-in-from-bottom-2`,n==="popper"&&`data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1
|
|
185
|
-
data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1`,e),position:n,style:{zIndex:r,...o},...a,children:f.jsx(
|
|
186
|
-
min-w-[var(--radix-select-trigger-width)]`),children:t})})}));Aa.displayName=
|
|
185
|
+
data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1`,e),position:n,style:{zIndex:r,...o},...a,children:f.jsx(Y0,{className:k("px-1 py-1",n==="popper"&&`h-[var(--radix-select-trigger-height)] w-full
|
|
186
|
+
min-w-[var(--radix-select-trigger-width)]`),children:t})})}));Aa.displayName=Od.displayName;const Ta=l.forwardRef(({className:e,children:t,...n},r)=>f.jsxs(Id,{ref:r,className:k(`relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2
|
|
187
187
|
text-sm outline-none focus:bg-accent focus:text-accent-foreground
|
|
188
|
-
data-[disabled]:pointer-events-none data-[disabled]:opacity-50`,e),...n,children:[f.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:f.jsx(
|
|
188
|
+
data-[disabled]:pointer-events-none data-[disabled]:opacity-50`,e),...n,children:[f.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:f.jsx(z0,{children:f.jsx(Kt,{className:"h-4 w-4",strokeWidth:3})})}),f.jsx(G0,{children:t})]}));Ta.displayName=Id.displayName;const _a=l.forwardRef(({className:e,children:t,isDisabled:n=!1,...r},o)=>{const a=Xe({isDisabled:n});return f.jsxs(kd,{ref:o,className:k(le.focusRing,`flex h-10 w-full items-center justify-between rounded-sm border border-input bg-background
|
|
189
189
|
px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground
|
|
190
190
|
disabled:cursor-not-allowed disabled:opacity-50 aria-disabled:cursor-not-allowed
|
|
191
|
-
aria-disabled:opacity-50 [&>span]:text-muted-foreground`,e),...r,...a,children:[t,f.jsx(
|
|
191
|
+
aria-disabled:opacity-50 [&>span]:text-muted-foreground`,e),...r,...a,children:[t,f.jsx(B0,{asChild:!0,children:f.jsx(Uo,{className:"h-4 w-4 opacity-50"})})]})});_a.displayName=kd.displayName;const Td=L0,U0=H0,_d=W0,ja=l.forwardRef(({options:e,value:t,onChange:n,placeholder:r="Select an option",className:o,zIndex:a,isDisabled:i,...s},c)=>{const u=Ve("dropdown",a);return f.jsxs(Td,{value:t,onValueChange:n,children:[f.jsx(_a,{ref:c,className:k("w-full justify-between",!t&&"text-muted-foreground",o),isDisabled:i,...s,children:f.jsx(_d,{placeholder:r})}),f.jsx(Aa,{zIndex:u,children:e.map(d=>f.jsx(Ta,{value:d.value,children:d.label},d.value))})]})});ja.displayName="Select";const jd=l.forwardRef(({className:e,...t},n)=>f.jsx(Dd,{ref:n,className:k("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}));jd.displayName=Dd.displayName;const Fd=l.forwardRef(({className:e,...t},n)=>f.jsx(Ad,{ref:n,className:k("-mx-1 my-1 h-px bg-muted",e),...t}));Fd.displayName=Ad.displayName;const K0=De("flex",{variants:{orientation:{horizontal:"flex-row",vertical:"flex-col"},size:{sm:"gap-4",default:"gap-6",lg:"gap-8"}},defaultVariants:{orientation:"horizontal",size:"default"}}),q0=De("relative z-10 flex items-center justify-center rounded-full border-[3px] bg-white font-bold",{variants:{size:{sm:"h-6 w-6 text-xs",default:"h-8 w-8 text-sm",lg:"h-10 w-10 text-base"},status:{default:"border-muted text-muted-foreground",current:"border-primary-400 text-primary-400",completed:"border-primary-400 bg-primary-400 text-white"}},defaultVariants:{size:"default",status:"default"}}),X0=De("absolute bg-muted",{variants:{size:{sm:"",default:"",lg:""},orientation:{horizontal:"w-[calc(100%_-_1.5rem)]",vertical:"h-full"}},compoundVariants:[{size:"sm",orientation:"horizontal",class:"left-[calc(50%_+_1.25rem)] top-3 h-[2px]"},{size:"default",orientation:"horizontal",class:"left-[calc(50%_+_1.5rem)] top-[calc(1rem_-_1px)] h-[3px]"},{size:"lg",orientation:"horizontal",class:"left-[calc(50%_+_1.75rem)] top-[calc(1.25rem_-_1px)] h-[4px]"},{size:"sm",orientation:"vertical",class:"left-[0.6875rem] top-[1.25rem] w-0.5"},{size:"default",orientation:"vertical",class:"left-[0.9375rem] top-[1.75rem] w-[3px]"},{size:"lg",orientation:"vertical",class:"left-[1.125rem] top-[2.25rem] w-[4px]"}],defaultVariants:{orientation:"horizontal",size:"default"}}),Z0=De("font-medium",{variants:{size:{sm:"text-sm",default:"text-base",lg:"text-lg"}},defaultVariants:{size:"default"}});function Q0({steps:e,currentStep:t,orientation:n="horizontal",size:r="default",className:o,showCurrentAsCompleted:a=!1,...i},s){return f.jsx("div",{ref:s,className:k(K0({orientation:n,size:r}),o),...i,children:e.map((c,u)=>{const d=e.findIndex(y=>y.id===t),m=c.id===t,p=d!==-1&&(u<d||a&&m);let h="default";return p?h="completed":m&&(h="current"),f.jsxs("div",{className:k("relative flex items-start",n==="horizontal"&&"flex-1 justify-center"),children:[f.jsxs("div",{className:k("relative flex",n==="vertical"?"flex-row items-start":"flex-col items-center"),children:[f.jsx("div",{className:k(q0({size:r,status:h})),children:p?f.jsx(Kt,{className:"h-4 w-4",strokeWidth:3}):f.jsx("span",{children:(u+1).toString()})}),f.jsxs("div",{className:k("flex flex-col",n==="vertical"?"ml-4":"mt-2 text-center"),children:[f.jsx("span",{className:k(Z0({size:r}),m||p?"text-foreground":"text-muted-foreground"),children:c.label}),c.description?f.jsx("span",{className:k("text-sm text-muted-foreground",n==="horizontal"&&"text-center"),children:c.description}):null]})]}),u<e.length-1?f.jsx("div",{className:k(X0({size:r,orientation:n}),p&&"bg-primary-400")}):null]},c.id)})})}const $d=l.forwardRef(Q0);$d.displayName="StepIndicator";const J0=$d;var Lr="Switch",[eS,WE]=ve(Lr),[tS,nS]=eS(Lr),Ld=l.forwardRef((e,t)=>{const{__scopeSwitch:n,name:r,checked:o,defaultChecked:a,required:i,disabled:s,value:c="on",onCheckedChange:u,form:d,...m}=e,[p,h]=l.useState(null),y=U(t,w=>h(w)),g=l.useRef(!1),v=p?d||!!p.closest("form"):!0,[b,x]=Ce({prop:o,defaultProp:a??!1,onChange:u,caller:Lr});return f.jsxs(tS,{scope:n,checked:b,disabled:s,children:[f.jsx(V.button,{type:"button",role:"switch","aria-checked":b,"aria-required":i,"data-state":Yd(b),"data-disabled":s?"":void 0,disabled:s,value:c,...m,ref:y,onClick:O(e.onClick,w=>{x(S=>!S),v&&(g.current=w.isPropagationStopped(),g.current||w.stopPropagation())})}),v&&f.jsx(Vd,{control:p,bubbles:!g.current,name:r,value:c,checked:b,required:i,disabled:s,form:d,style:{transform:"translateX(-100%)"}})]})});Ld.displayName=Lr;var Wd="SwitchThumb",Bd=l.forwardRef((e,t)=>{const{__scopeSwitch:n,...r}=e,o=nS(Wd,n);return f.jsx(V.span,{"data-state":Yd(o.checked),"data-disabled":o.disabled?"":void 0,...r,ref:t})});Bd.displayName=Wd;var rS="SwitchBubbleInput",Vd=l.forwardRef(({__scopeSwitch:e,control:t,checked:n,bubbles:r=!0,...o},a)=>{const i=l.useRef(null),s=U(i,a),c=Or(n),u=In(t);return l.useEffect(()=>{const d=i.current;if(!d)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(d,n),d.dispatchEvent(y)}},[c,n,r]),f.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}})});Vd.displayName=rS;function Yd(e){return e?"checked":"unchecked"}var Hd=Ld,oS=Bd;const Fa=l.forwardRef(({className:e,label:t,id:n,"aria-label":r,isChecked:o=!1,isDisabled:a=!1,...i},s)=>{const c=Xe({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 f.jsxs("div",{className:"flex items-center space-x-2",children:[f.jsx(Hd,{"aria-label":r,checked:o,className:k(le.focusRingVisible,`peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2
|
|
192
192
|
border-transparent transition-colors disabled:cursor-not-allowed disabled:opacity-50
|
|
193
|
-
data-[state=checked]:bg-primary-400 data-[state=unchecked]:bg-muted`,e),...i,...c,ref:s,id:n,children:f.jsx(
|
|
193
|
+
data-[state=checked]:bg-primary-400 data-[state=unchecked]:bg-muted`,e),...i,...c,ref:s,id:n,children:f.jsx(oS,{className:k(`pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0
|
|
194
194
|
transition-transform data-[state=checked]:translate-x-5
|
|
195
|
-
data-[state=unchecked]:translate-x-0`)})}),t?typeof t=="string"?f.jsx(tn,{htmlFor:n,children:t}):t:null]})});ja.displayName=Wd.displayName;const Bd=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 f.jsx("div",{ref:i,className:k("",r),...a,children:f.jsx("div",{className:k("grid gap-3",`grid-cols-${o}`),children:e.map(c=>f.jsx(ja,{id:c.id,isChecked:t.includes(c.id),isDisabled:c.isDisabled,label:c.label,onCheckedChange:u=>s(c.id,u)},c.id))})})});Bd.displayName="SwitchGroup";function _o(e){const t=oS(e),n=l.forwardRef((r,o)=>{const{children:a,...i}=r,s=l.Children.toArray(a),c=s.find(sS);if(c){const u=c.props.children,d=s.map(m=>m===c?l.Children.count(u)>1?l.Children.only(null):l.isValidElement(u)?u.props.children:null:m);return f.jsx(t,{...i,ref:o,children:l.isValidElement(u)?l.cloneElement(u,void 0,d):null})}return f.jsx(t,{...i,ref:o,children:a})});return n.displayName=`${e}.Slot`,n}function oS(e){const t=l.forwardRef((n,r)=>{const{children:o,...a}=n;if(l.isValidElement(o)){const i=cS(o),s=iS(a,o.props);return o.type!==l.Fragment&&(s.ref=r?Ke(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 aS=Symbol("radix.slottable");function sS(e){return l.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===aS}function iS(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 cS(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 lS(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:b}=g,x=E.useRef(null),w=E.useRef(new Map).current;return f.jsx(o,{scope:v,itemMap:w,collectionRef:x,children:b})};i.displayName=t;const s=e+"CollectionSlot",c=_o(s),u=E.forwardRef((g,v)=>{const{scope:b,children:x}=g,w=a(s,b),S=U(v,w.collectionRef);return f.jsx(c,{ref:S,children:x})});u.displayName=s;const d=e+"CollectionItemSlot",m="data-radix-collection-item",p=_o(d),h=E.forwardRef((g,v)=>{const{scope:b,children:x,...w}=g,S=E.useRef(null),C=U(v,S),M=a(d,b);return E.useEffect(()=>(M.itemMap.set(S,{ref:S,...w}),()=>void M.itemMap.delete(S))),f.jsx(p,{[m]:"",ref:C,children:x})});h.displayName=d;function y(g){const v=a(e+"CollectionConsumer",g);return E.useCallback(()=>{const x=v.collectionRef.current;if(!x)return[];const w=Array.from(x.querySelectorAll(`[${m}]`));return Array.from(v.itemMap.values()).sort((M,N)=>w.indexOf(M.ref.current)-w.indexOf(N.ref.current))},[v.collectionRef,v.itemMap])}return[{Provider:i,Slot:u,ItemSlot:h},y,r]}var uS=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],rn=uS.reduce((e,t)=>{const n=_o(`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),f.jsx(c,{...s,ref:a})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),ho="rovingFocusGroup.onEntryFocus",dS={bubbles:!1,cancelable:!0},Bn="RovingFocusGroup",[jo,Vd,fS]=lS(Bn),[mS,Yd]=ve(Bn,[fS]),[pS,hS]=mS(Bn),Hd=l.forwardRef((e,t)=>f.jsx(jo.Provider,{scope:e.__scopeRovingFocusGroup,children:f.jsx(jo.Slot,{scope:e.__scopeRovingFocusGroup,children:f.jsx(gS,{...e,ref:t})})}));Hd.displayName=Bn;var gS=l.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:a,currentTabStopId:i,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:c,onEntryFocus:u,preventScrollOnEntryFocus:d=!1,...m}=e,p=l.useRef(null),h=U(t,p),y=bt(a),[g,v]=Ce({prop:i,defaultProp:s??null,onChange:c,caller:Bn}),[b,x]=l.useState(!1),w=Se(u),S=Vd(n),C=l.useRef(!1),[M,N]=l.useState(0);return l.useEffect(()=>{const P=p.current;if(P)return P.addEventListener(ho,w),()=>P.removeEventListener(ho,w)},[w]),f.jsx(pS,{scope:n,orientation:r,dir:y,loop:o,currentTabStopId:g,onItemFocus:l.useCallback(P=>v(P),[v]),onItemShiftTab:l.useCallback(()=>x(!0),[]),onFocusableItemAdd:l.useCallback(()=>N(P=>P+1),[]),onFocusableItemRemove:l.useCallback(()=>N(P=>P-1),[]),children:f.jsx(rn.div,{tabIndex:b||M===0?-1:0,"data-orientation":r,...m,ref:h,style:{outline:"none",...e.style},onMouseDown:O(e.onMouseDown,()=>{C.current=!0}),onFocus:O(e.onFocus,P=>{const F=!C.current;if(P.target===P.currentTarget&&F&&!b){const _=new CustomEvent(ho,dS);if(P.currentTarget.dispatchEvent(_),!_.defaultPrevented){const $=S().filter(j=>j.focusable),A=$.find(j=>j.active),B=$.find(j=>j.id===g),q=[A,B,...$].filter(Boolean).map(j=>j.ref.current);Ud(q,d)}}C.current=!1}),onBlur:O(e.onBlur,()=>x(!1))})})}),Gd="RovingFocusGroupItem",zd=l.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:a,children:i,...s}=e,c=pe(),u=a||c,d=hS(Gd,n),m=d.currentTabStopId===u,p=Vd(n),{onFocusableItemAdd:h,onFocusableItemRemove:y,currentTabStopId:g}=d;return l.useEffect(()=>{if(r)return h(),()=>y()},[r,h,y]),f.jsx(jo.ItemSlot,{scope:n,id:u,focusable:r,active:o,children:f.jsx(rn.span,{tabIndex:m?0:-1,"data-orientation":d.orientation,...s,ref:t,onMouseDown:O(e.onMouseDown,v=>{r?d.onItemFocus(u):v.preventDefault()}),onFocus:O(e.onFocus,()=>d.onItemFocus(u)),onKeyDown:O(e.onKeyDown,v=>{if(v.key==="Tab"&&v.shiftKey){d.onItemShiftTab();return}if(v.target!==v.currentTarget)return;const b=bS(v,d.orientation,d.dir);if(b!==void 0){if(v.metaKey||v.ctrlKey||v.altKey||v.shiftKey)return;v.preventDefault();let w=p().filter(S=>S.focusable).map(S=>S.ref.current);if(b==="last")w.reverse();else if(b==="prev"||b==="next"){b==="prev"&&w.reverse();const S=w.indexOf(v.currentTarget);w=d.loop?xS(w,S+1):w.slice(S+1)}setTimeout(()=>Ud(w))}}),children:typeof i=="function"?i({isCurrentTabStop:m,hasTabStop:g!=null}):i})})});zd.displayName=Gd;var vS={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function yS(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function bS(e,t,n){const r=yS(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return vS[r]}function Ud(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function xS(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var wS=Hd,CS=zd;function SS(e,t){return l.useReducer((n,r)=>t[n][r]??n,e)}var Kd=e=>{const{present:t,children:n}=e,r=ES(t),o=typeof n=="function"?n({present:r.isPresent}):l.Children.only(n),a=U(r.ref,NS(o));return typeof n=="function"||r.isPresent?l.cloneElement(o,{ref:a}):null};Kd.displayName="Presence";function ES(e){const[t,n]=l.useState(),r=l.useRef(null),o=l.useRef(e),a=l.useRef("none"),i=e?"mounted":"unmounted",[s,c]=SS(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return l.useEffect(()=>{const u=Xn(r.current);a.current=s==="mounted"?u:"none"},[s]),de(()=>{const u=r.current,d=o.current;if(d!==e){const p=a.current,h=Xn(u);e?c("MOUNT"):h==="none"||(u==null?void 0:u.display)==="none"?c("UNMOUNT"):c(d&&p!==h?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,c]),de(()=>{if(t){let u;const d=t.ownerDocument.defaultView??window,m=h=>{const g=Xn(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=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=v)})}},p=h=>{h.target===t&&(a.current=Xn(r.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",m),t.addEventListener("animationend",m),()=>{d.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 Xn(e){return(e==null?void 0:e.animationName)||"none"}function NS(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 Wr="Tabs",[MS,WE]=ve(Wr,[Yd]),qd=Yd(),[RS,Fa]=MS(Wr),Xd=l.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:o,defaultValue:a,orientation:i="horizontal",dir:s,activationMode:c="automatic",...u}=e,d=bt(s),[m,p]=Ce({prop:r,onChange:o,defaultProp:a??"",caller:Wr});return f.jsx(RS,{scope:n,baseId:pe(),value:m,onValueChange:p,orientation:i,dir:d,activationMode:c,children:f.jsx(rn.div,{dir:d,"data-orientation":i,...u,ref:t})})});Xd.displayName=Wr;var Zd="TabsList",Qd=l.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...o}=e,a=Fa(Zd,n),i=qd(n);return f.jsx(wS,{asChild:!0,...i,orientation:a.orientation,dir:a.dir,loop:r,children:f.jsx(rn.div,{role:"tablist","aria-orientation":a.orientation,...o,ref:t})})});Qd.displayName=Zd;var Jd="TabsTrigger",ef=l.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:o=!1,...a}=e,i=Fa(Jd,n),s=qd(n),c=rf(i.baseId,r),u=of(i.baseId,r),d=r===i.value;return f.jsx(CS,{asChild:!0,...s,focusable:!o,active:d,children:f.jsx(rn.button,{type:"button",role:"tab","aria-selected":d,"aria-controls":u,"data-state":d?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:c,...a,ref:t,onMouseDown:O(e.onMouseDown,m=>{!o&&m.button===0&&m.ctrlKey===!1?i.onValueChange(r):m.preventDefault()}),onKeyDown:O(e.onKeyDown,m=>{[" ","Enter"].includes(m.key)&&i.onValueChange(r)}),onFocus:O(e.onFocus,()=>{const m=i.activationMode!=="manual";!d&&!o&&m&&i.onValueChange(r)})})})});ef.displayName=Jd;var tf="TabsContent",nf=l.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:o,children:a,...i}=e,s=Fa(tf,n),c=rf(s.baseId,r),u=of(s.baseId,r),d=r===s.value,m=l.useRef(d);return l.useEffect(()=>{const p=requestAnimationFrame(()=>m.current=!1);return()=>cancelAnimationFrame(p)},[]),f.jsx(Kd,{present:o||d,children:({present:p})=>f.jsx(rn.div,{"data-state":d?"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})})});nf.displayName=tf;function rf(e,t){return`${e}-trigger-${t}`}function of(e,t){return`${e}-content-${t}`}var PS=Xd,af=Qd,sf=ef,cf=nf;const kS=PS,lf=l.forwardRef(({className:e,...t},n)=>f.jsx(af,{ref:n,className:k(`inline-flex items-center justify-center gap-1 rounded border-[1px] border-base-300 bg-white
|
|
196
|
-
p-1 text-muted-foreground`,e),...t}));
|
|
195
|
+
data-[state=unchecked]:translate-x-0`)})}),t?typeof t=="string"?f.jsx(tn,{htmlFor:n,children:t}):t:null]})});Fa.displayName=Hd.displayName;const Gd=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 f.jsx("div",{ref:i,className:k("",r),...a,children:f.jsx("div",{className:k("grid gap-3",`grid-cols-${o}`),children:e.map(c=>f.jsx(Fa,{id:c.id,isChecked:t.includes(c.id),isDisabled:c.isDisabled,label:c.label,onCheckedChange:u=>s(c.id,u)},c.id))})})});Gd.displayName="SwitchGroup";function _o(e){const t=aS(e),n=l.forwardRef((r,o)=>{const{children:a,...i}=r,s=l.Children.toArray(a),c=s.find(iS);if(c){const u=c.props.children,d=s.map(m=>m===c?l.Children.count(u)>1?l.Children.only(null):l.isValidElement(u)?u.props.children:null:m);return f.jsx(t,{...i,ref:o,children:l.isValidElement(u)?l.cloneElement(u,void 0,d):null})}return f.jsx(t,{...i,ref:o,children:a})});return n.displayName=`${e}.Slot`,n}function aS(e){const t=l.forwardRef((n,r)=>{const{children:o,...a}=n;if(l.isValidElement(o)){const i=lS(o),s=cS(a,o.props);return o.type!==l.Fragment&&(s.ref=r?Ke(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 sS=Symbol("radix.slottable");function iS(e){return l.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===sS}function cS(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 lS(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 uS(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:b}=g,x=E.useRef(null),w=E.useRef(new Map).current;return f.jsx(o,{scope:v,itemMap:w,collectionRef:x,children:b})};i.displayName=t;const s=e+"CollectionSlot",c=_o(s),u=E.forwardRef((g,v)=>{const{scope:b,children:x}=g,w=a(s,b),S=U(v,w.collectionRef);return f.jsx(c,{ref:S,children:x})});u.displayName=s;const d=e+"CollectionItemSlot",m="data-radix-collection-item",p=_o(d),h=E.forwardRef((g,v)=>{const{scope:b,children:x,...w}=g,S=E.useRef(null),C=U(v,S),M=a(d,b);return E.useEffect(()=>(M.itemMap.set(S,{ref:S,...w}),()=>void M.itemMap.delete(S))),f.jsx(p,{[m]:"",ref:C,children:x})});h.displayName=d;function y(g){const v=a(e+"CollectionConsumer",g);return E.useCallback(()=>{const x=v.collectionRef.current;if(!x)return[];const w=Array.from(x.querySelectorAll(`[${m}]`));return Array.from(v.itemMap.values()).sort((M,N)=>w.indexOf(M.ref.current)-w.indexOf(N.ref.current))},[v.collectionRef,v.itemMap])}return[{Provider:i,Slot:u,ItemSlot:h},y,r]}var dS=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],rn=dS.reduce((e,t)=>{const n=_o(`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),f.jsx(c,{...s,ref:a})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),ho="rovingFocusGroup.onEntryFocus",fS={bubbles:!1,cancelable:!0},Bn="RovingFocusGroup",[jo,zd,mS]=uS(Bn),[pS,Ud]=ve(Bn,[mS]),[hS,gS]=pS(Bn),Kd=l.forwardRef((e,t)=>f.jsx(jo.Provider,{scope:e.__scopeRovingFocusGroup,children:f.jsx(jo.Slot,{scope:e.__scopeRovingFocusGroup,children:f.jsx(vS,{...e,ref:t})})}));Kd.displayName=Bn;var vS=l.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:a,currentTabStopId:i,defaultCurrentTabStopId:s,onCurrentTabStopIdChange:c,onEntryFocus:u,preventScrollOnEntryFocus:d=!1,...m}=e,p=l.useRef(null),h=U(t,p),y=bt(a),[g,v]=Ce({prop:i,defaultProp:s??null,onChange:c,caller:Bn}),[b,x]=l.useState(!1),w=Se(u),S=zd(n),C=l.useRef(!1),[M,N]=l.useState(0);return l.useEffect(()=>{const P=p.current;if(P)return P.addEventListener(ho,w),()=>P.removeEventListener(ho,w)},[w]),f.jsx(hS,{scope:n,orientation:r,dir:y,loop:o,currentTabStopId:g,onItemFocus:l.useCallback(P=>v(P),[v]),onItemShiftTab:l.useCallback(()=>x(!0),[]),onFocusableItemAdd:l.useCallback(()=>N(P=>P+1),[]),onFocusableItemRemove:l.useCallback(()=>N(P=>P-1),[]),children:f.jsx(rn.div,{tabIndex:b||M===0?-1:0,"data-orientation":r,...m,ref:h,style:{outline:"none",...e.style},onMouseDown:O(e.onMouseDown,()=>{C.current=!0}),onFocus:O(e.onFocus,P=>{const F=!C.current;if(P.target===P.currentTarget&&F&&!b){const _=new CustomEvent(ho,fS);if(P.currentTarget.dispatchEvent(_),!_.defaultPrevented){const $=S().filter(j=>j.focusable),I=$.find(j=>j.active),B=$.find(j=>j.id===g),q=[I,B,...$].filter(Boolean).map(j=>j.ref.current);Zd(q,d)}}C.current=!1}),onBlur:O(e.onBlur,()=>x(!1))})})}),qd="RovingFocusGroupItem",Xd=l.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:a,children:i,...s}=e,c=pe(),u=a||c,d=gS(qd,n),m=d.currentTabStopId===u,p=zd(n),{onFocusableItemAdd:h,onFocusableItemRemove:y,currentTabStopId:g}=d;return l.useEffect(()=>{if(r)return h(),()=>y()},[r,h,y]),f.jsx(jo.ItemSlot,{scope:n,id:u,focusable:r,active:o,children:f.jsx(rn.span,{tabIndex:m?0:-1,"data-orientation":d.orientation,...s,ref:t,onMouseDown:O(e.onMouseDown,v=>{r?d.onItemFocus(u):v.preventDefault()}),onFocus:O(e.onFocus,()=>d.onItemFocus(u)),onKeyDown:O(e.onKeyDown,v=>{if(v.key==="Tab"&&v.shiftKey){d.onItemShiftTab();return}if(v.target!==v.currentTarget)return;const b=xS(v,d.orientation,d.dir);if(b!==void 0){if(v.metaKey||v.ctrlKey||v.altKey||v.shiftKey)return;v.preventDefault();let w=p().filter(S=>S.focusable).map(S=>S.ref.current);if(b==="last")w.reverse();else if(b==="prev"||b==="next"){b==="prev"&&w.reverse();const S=w.indexOf(v.currentTarget);w=d.loop?wS(w,S+1):w.slice(S+1)}setTimeout(()=>Zd(w))}}),children:typeof i=="function"?i({isCurrentTabStop:m,hasTabStop:g!=null}):i})})});Xd.displayName=qd;var yS={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function bS(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function xS(e,t,n){const r=bS(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return yS[r]}function Zd(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 CS=Kd,SS=Xd;function ES(e,t){return l.useReducer((n,r)=>t[n][r]??n,e)}var Qd=e=>{const{present:t,children:n}=e,r=NS(t),o=typeof n=="function"?n({present:r.isPresent}):l.Children.only(n),a=U(r.ref,MS(o));return typeof n=="function"||r.isPresent?l.cloneElement(o,{ref:a}):null};Qd.displayName="Presence";function NS(e){const[t,n]=l.useState(),r=l.useRef(null),o=l.useRef(e),a=l.useRef("none"),i=e?"mounted":"unmounted",[s,c]=ES(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return l.useEffect(()=>{const u=Xn(r.current);a.current=s==="mounted"?u:"none"},[s]),de(()=>{const u=r.current,d=o.current;if(d!==e){const p=a.current,h=Xn(u);e?c("MOUNT"):h==="none"||(u==null?void 0:u.display)==="none"?c("UNMOUNT"):c(d&&p!==h?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,c]),de(()=>{if(t){let u;const d=t.ownerDocument.defaultView??window,m=h=>{const g=Xn(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=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=v)})}},p=h=>{h.target===t&&(a.current=Xn(r.current))};return t.addEventListener("animationstart",p),t.addEventListener("animationcancel",m),t.addEventListener("animationend",m),()=>{d.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 Xn(e){return(e==null?void 0:e.animationName)||"none"}function MS(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 Wr="Tabs",[RS,BE]=ve(Wr,[Ud]),Jd=Ud(),[PS,$a]=RS(Wr),ef=l.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:o,defaultValue:a,orientation:i="horizontal",dir:s,activationMode:c="automatic",...u}=e,d=bt(s),[m,p]=Ce({prop:r,onChange:o,defaultProp:a??"",caller:Wr});return f.jsx(PS,{scope:n,baseId:pe(),value:m,onValueChange:p,orientation:i,dir:d,activationMode:c,children:f.jsx(rn.div,{dir:d,"data-orientation":i,...u,ref:t})})});ef.displayName=Wr;var tf="TabsList",nf=l.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...o}=e,a=$a(tf,n),i=Jd(n);return f.jsx(CS,{asChild:!0,...i,orientation:a.orientation,dir:a.dir,loop:r,children:f.jsx(rn.div,{role:"tablist","aria-orientation":a.orientation,...o,ref:t})})});nf.displayName=tf;var rf="TabsTrigger",of=l.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:o=!1,...a}=e,i=$a(rf,n),s=Jd(n),c=cf(i.baseId,r),u=lf(i.baseId,r),d=r===i.value;return f.jsx(SS,{asChild:!0,...s,focusable:!o,active:d,children:f.jsx(rn.button,{type:"button",role:"tab","aria-selected":d,"aria-controls":u,"data-state":d?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:c,...a,ref:t,onMouseDown:O(e.onMouseDown,m=>{!o&&m.button===0&&m.ctrlKey===!1?i.onValueChange(r):m.preventDefault()}),onKeyDown:O(e.onKeyDown,m=>{[" ","Enter"].includes(m.key)&&i.onValueChange(r)}),onFocus:O(e.onFocus,()=>{const m=i.activationMode!=="manual";!d&&!o&&m&&i.onValueChange(r)})})})});of.displayName=rf;var af="TabsContent",sf=l.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:o,children:a,...i}=e,s=$a(af,n),c=cf(s.baseId,r),u=lf(s.baseId,r),d=r===s.value,m=l.useRef(d);return l.useEffect(()=>{const p=requestAnimationFrame(()=>m.current=!1);return()=>cancelAnimationFrame(p)},[]),f.jsx(Qd,{present:o||d,children:({present:p})=>f.jsx(rn.div,{"data-state":d?"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})})});sf.displayName=af;function cf(e,t){return`${e}-trigger-${t}`}function lf(e,t){return`${e}-content-${t}`}var kS=ef,uf=nf,df=of,ff=sf;const OS=kS,mf=l.forwardRef(({className:e,...t},n)=>f.jsx(uf,{ref:n,className:k(`inline-flex items-center justify-center gap-1 rounded border-[1px] border-base-300 bg-white
|
|
196
|
+
p-1 text-muted-foreground`,e),...t}));mf.displayName=uf.displayName;const pf=l.forwardRef(({className:e,...t},n)=>f.jsx(df,{ref:n,className:k(le.focusRingVisible,`inline-flex items-center justify-center whitespace-nowrap rounded px-3 py-1.5 text-sm
|
|
197
197
|
font-bold ring-offset-background transition-all hover:bg-primary-200 hover:text-primary
|
|
198
198
|
disabled:pointer-events-none disabled:cursor-not-allowed disabled:opacity-50
|
|
199
199
|
aria-disabled:cursor-not-allowed aria-disabled:opacity-50 data-[state=active]:bg-primary
|
|
200
|
-
data-[state=active]:text-white`,e),...t}));
|
|
201
|
-
focus-visible:ring-ring focus-visible:ring-offset-2`,e),...t}));df.displayName=cf.displayName;const ff=E.forwardRef(({className:e,isDisabled:t=!1,isGrowable:n=!1,...r},o)=>{const a=E.useRef(null),i=Xe({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]),f.jsx("textarea",{ref:s=>{typeof o=="function"?o(s):o&&(o.current=s),a.current=s},className:k(le.input,"min-h-[5rem]",n&&"resize-none overflow-hidden",e),...r,...i})});ff.displayName="Textarea";function OS(e){const t=DS(e),n=l.forwardRef((r,o)=>{const{children:a,...i}=r,s=l.Children.toArray(a),c=s.find(TS);if(c){const u=c.props.children,d=s.map(m=>m===c?l.Children.count(u)>1?l.Children.only(null):l.isValidElement(u)?u.props.children:null:m);return f.jsx(t,{...i,ref:o,children:l.isValidElement(u)?l.cloneElement(u,void 0,d):null})}return f.jsx(t,{...i,ref:o,children:a})});return n.displayName=`${e}.Slot`,n}function DS(e){const t=l.forwardRef((n,r)=>{const{children:o,...a}=n,i=l.isValidElement(o)?_S(o):void 0,s=U(i,r);if(l.isValidElement(o)){const c=IS(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 mf=Symbol("radix.slottable");function AS(e){const t=({children:n})=>f.jsx(f.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=mf,t}function TS(e){return l.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===mf}function IS(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 _S(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 jS=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Tt=jS.reduce((e,t)=>{const n=OS(`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),f.jsx(c,{...s,ref:a})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function FS(e,t){e&&En.flushSync(()=>e.dispatchEvent(t))}var $S="DismissableLayer",Fo="dismissableLayer.update",LS="dismissableLayer.pointerDownOutside",WS="dismissableLayer.focusOutside",Fs,pf=l.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),hf=l.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:i,onDismiss:s,...c}=e,u=l.useContext(pf),[d,m]=l.useState(null),p=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,h]=l.useState({}),y=U(t,N=>m(N)),g=Array.from(u.layers),[v]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),b=g.indexOf(v),x=d?g.indexOf(d):-1,w=u.layersWithOutsidePointerEventsDisabled.size>0,S=x>=b,C=YS(N=>{const P=N.target,F=[...u.branches].some(_=>_.contains(P));!S||F||(o==null||o(N),i==null||i(N),N.defaultPrevented||s==null||s())},p),M=HS(N=>{const P=N.target;[...u.branches].some(_=>_.contains(P))||(a==null||a(N),i==null||i(N),N.defaultPrevented||s==null||s())},p);return bi(N=>{x===u.layers.size-1&&(r==null||r(N),!N.defaultPrevented&&s&&(N.preventDefault(),s()))},p),l.useEffect(()=>{if(d)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&(Fs=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),$s(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=Fs)}},[d,p,n,u]),l.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),$s())},[d,u]),l.useEffect(()=>{const N=()=>h({});return document.addEventListener(Fo,N),()=>document.removeEventListener(Fo,N)},[]),f.jsx(Tt.div,{...c,ref:y,style:{pointerEvents:w?S?"auto":"none":void 0,...e.style},onFocusCapture:O(e.onFocusCapture,M.onFocusCapture),onBlurCapture:O(e.onBlurCapture,M.onBlurCapture),onPointerDownCapture:O(e.onPointerDownCapture,C.onPointerDownCapture)})});hf.displayName=$S;var BS="DismissableLayerBranch",VS=l.forwardRef((e,t)=>{const n=l.useContext(pf),r=l.useRef(null),o=U(t,r);return l.useEffect(()=>{const a=r.current;if(a)return n.branches.add(a),()=>{n.branches.delete(a)}},[n.branches]),f.jsx(Tt.div,{...e,ref:o})});VS.displayName=BS;function YS(e,t=globalThis==null?void 0:globalThis.document){const n=Se(e),r=l.useRef(!1),o=l.useRef(()=>{});return l.useEffect(()=>{const a=s=>{if(s.target&&!r.current){let c=function(){gf(LS,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 HS(e,t=globalThis==null?void 0:globalThis.document){const n=Se(e),r=l.useRef(!1);return l.useEffect(()=>{const o=a=>{a.target&&!r.current&&gf(WS,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 $s(){const e=new CustomEvent(Fo);document.dispatchEvent(e)}function gf(e,t,n,{discrete:r}){const o=n.originalEvent.target,a=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?FS(o,a):o.dispatchEvent(a)}var GS="Arrow",vf=l.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...a}=e;return f.jsx(Tt.svg,{...a,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:f.jsx("polygon",{points:"0,0 30,0 15,10"})})});vf.displayName=GS;var zS=vf,$a="Popper",[yf,bf]=ve($a),[US,xf]=yf($a),wf=e=>{const{__scopePopper:t,children:n}=e,[r,o]=l.useState(null);return f.jsx(US,{scope:t,anchor:r,onAnchorChange:o,children:n})};wf.displayName=$a;var Cf="PopperAnchor",Sf=l.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,a=xf(Cf,n),i=l.useRef(null),s=U(t,i);return l.useEffect(()=>{a.onAnchorChange((r==null?void 0:r.current)||i.current)}),r?null:f.jsx(Tt.div,{...o,ref:s})});Sf.displayName=Cf;var La="PopperContent",[KS,qS]=yf(La),Ef=l.forwardRef((e,t)=>{var T,Z,K,te,re,oe;const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:a="center",alignOffset:i=0,arrowPadding:s=0,avoidCollisions:c=!0,collisionBoundary:u=[],collisionPadding:d=0,sticky:m="partial",hideWhenDetached:p=!1,updatePositionStrategy:h="optimized",onPlaced:y,...g}=e,v=xf(La,n),[b,x]=l.useState(null),w=U(t,he=>x(he)),[S,C]=l.useState(null),M=An(S),N=(M==null?void 0:M.width)??0,P=(M==null?void 0:M.height)??0,F=r+(a!=="center"?"-"+a:""),_=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},$=Array.isArray(u)?u:[u],A=$.length>0,B={padding:_,boundary:$.filter(ZS),altBoundary:A},{refs:Y,floatingStyles:q,placement:j,isPositioned:G,middlewareData:I}=wc({strategy:"fixed",placement:F,whileElementsMounted:(...he)=>bc(...he,{animationFrame:h==="always"}),elements:{reference:v.anchor},middleware:[Cc({mainAxis:o+P,alignmentAxis:i}),c&&Sc({mainAxis:!0,crossAxis:!1,limiter:m==="partial"?Ec():void 0,...B}),c&&Nc({...B}),Mc({...B,apply:({elements:he,rects:be,availableWidth:Je,availableHeight:et})=>{const{width:tt,height:on}=be.reference,Ie=he.floating.style;Ie.setProperty("--radix-popper-available-width",`${Je}px`),Ie.setProperty("--radix-popper-available-height",`${et}px`),Ie.setProperty("--radix-popper-anchor-width",`${tt}px`),Ie.setProperty("--radix-popper-anchor-height",`${on}px`)}}),S&&Pc({element:S,padding:s}),QS({arrowWidth:N,arrowHeight:P}),p&&Rc({strategy:"referenceHidden",...B})]}),[D,Q]=Rf(j),J=Se(y);de(()=>{G&&(J==null||J())},[G,J]);const R=(T=I.arrow)==null?void 0:T.x,L=(Z=I.arrow)==null?void 0:Z.y,z=((K=I.arrow)==null?void 0:K.centerOffset)!==0,[W,X]=l.useState();return de(()=>{b&&X(window.getComputedStyle(b).zIndex)},[b]),f.jsx("div",{ref:Y.setFloating,"data-radix-popper-content-wrapper":"",style:{...q,transform:G?q.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:W,"--radix-popper-transform-origin":[(te=I.transformOrigin)==null?void 0:te.x,(re=I.transformOrigin)==null?void 0:re.y].join(" "),...((oe=I.hide)==null?void 0:oe.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:f.jsx(KS,{scope:n,placedSide:D,onArrowChange:C,arrowX:R,arrowY:L,shouldHideArrow:z,children:f.jsx(Tt.div,{"data-side":D,"data-align":Q,...g,ref:w,style:{...g.style,animation:G?void 0:"none"}})})})});Ef.displayName=La;var Nf="PopperArrow",XS={top:"bottom",right:"left",bottom:"top",left:"right"},Mf=l.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,a=qS(Nf,r),i=XS[a.placedSide];return f.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:f.jsx(zS,{...o,ref:n,style:{...o.style,display:"block"}})})});Mf.displayName=Nf;function ZS(e){return e!==null}var QS=e=>({name:"transformOrigin",options:e,fn(t){var v,b,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,d]=Rf(n),m={start:"0%",center:"50%",end:"100%"}[d],p=(((b=o.arrow)==null?void 0:b.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 Rf(e){const[t,n="center"]=e.split("-");return[t,n]}var JS=wf,eE=Sf,tE=Ef,nE=Mf;function rE(e,t){return l.useReducer((n,r)=>t[n][r]??n,e)}var Pf=e=>{const{present:t,children:n}=e,r=oE(t),o=typeof n=="function"?n({present:r.isPresent}):l.Children.only(n),a=U(r.ref,aE(o));return typeof n=="function"||r.isPresent?l.cloneElement(o,{ref:a}):null};Pf.displayName="Presence";function oE(e){const[t,n]=l.useState(),r=l.useRef(null),o=l.useRef(e),a=l.useRef("none"),i=e?"mounted":"unmounted",[s,c]=rE(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]),de(()=>{const u=r.current,d=o.current;if(d!==e){const p=a.current,h=Zn(u);e?c("MOUNT"):h==="none"||(u==null?void 0:u.display)==="none"?c("UNMOUNT"):c(d&&p!==h?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,c]),de(()=>{if(t){let u;const d=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=d.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),()=>{d.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 aE(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 sE=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"}),iE="VisuallyHidden",kf=l.forwardRef((e,t)=>f.jsx(Tt.span,{...e,ref:t,style:{...sE,...e.style}}));kf.displayName=iE;var cE=kf,[Br,BE]=ve("Tooltip",[bf]),Vr=bf(),Of="TooltipProvider",lE=700,$o="tooltip.open",[uE,Wa]=Br(Of),Df=e=>{const{__scopeTooltip:t,delayDuration:n=lE,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)},[]),f.jsx(uE,{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})};Df.displayName=Of;var Sn="Tooltip",[dE,Yr]=Br(Sn),Af=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o,onOpenChange:a,disableHoverableContent:i,delayDuration:s}=e,c=Wa(Sn,e.__scopeTooltip),u=Vr(t),[d,m]=l.useState(null),p=pe(),h=l.useRef(0),y=i??c.disableHoverableContent,g=s??c.delayDuration,v=l.useRef(!1),[b,x]=Ce({prop:r,defaultProp:o??!1,onChange:N=>{N?(c.onOpen(),document.dispatchEvent(new CustomEvent($o))):c.onClose(),a==null||a(N)},caller:Sn}),w=l.useMemo(()=>b?v.current?"delayed-open":"instant-open":"closed",[b]),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)},[]),f.jsx(JS,{...u,children:f.jsx(dE,{scope:t,contentId:p,open:b,stateAttribute:w,trigger:d,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})})};Af.displayName=Sn;var Lo="TooltipTrigger",Tf=l.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Yr(Lo,n),a=Wa(Lo,n),i=Vr(n),s=l.useRef(null),c=U(t,s,o.onTriggerChange),u=l.useRef(!1),d=l.useRef(!1),m=l.useCallback(()=>u.current=!1,[]);return l.useEffect(()=>()=>document.removeEventListener("pointerup",m),[m]),f.jsx(eE,{asChild:!0,...i,children:f.jsx(Tt.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:c,onPointerMove:O(e.onPointerMove,p=>{p.pointerType!=="touch"&&!d.current&&!a.isPointerInTransitRef.current&&(o.onTriggerEnter(),d.current=!0)}),onPointerLeave:O(e.onPointerLeave,()=>{o.onTriggerLeave(),d.current=!1}),onPointerDown:O(e.onPointerDown,()=>{o.open&&o.onClose(),u.current=!0,document.addEventListener("pointerup",m,{once:!0})}),onFocus:O(e.onFocus,()=>{u.current||o.onOpen()}),onBlur:O(e.onBlur,o.onClose),onClick:O(e.onClick,o.onClose)})})});Tf.displayName=Lo;var fE="TooltipPortal",[VE,mE]=Br(fE,{forceMount:void 0}),zt="TooltipContent",If=l.forwardRef((e,t)=>{const n=mE(zt,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...a}=e,i=Yr(zt,e.__scopeTooltip);return f.jsx(Pf,{present:r||i.open,children:i.disableHoverableContent?f.jsx(_f,{side:o,...a,ref:t}):f.jsx(pE,{side:o,...a,ref:t})})}),pE=l.forwardRef((e,t)=>{const n=Yr(zt,e.__scopeTooltip),r=Wa(zt,e.__scopeTooltip),o=l.useRef(null),a=U(t,o),[i,s]=l.useState(null),{trigger:c,onClose:u}=n,d=o.current,{onPointerInTransitChange:m}=r,p=l.useCallback(()=>{s(null),m(!1)},[m]),h=l.useCallback((y,g)=>{const v=y.currentTarget,b={x:y.clientX,y:y.clientY},x=yE(b,v.getBoundingClientRect()),w=bE(b,x),S=xE(g.getBoundingClientRect()),C=CE([...w,...S]);s(C),m(!0)},[m]);return l.useEffect(()=>()=>p(),[p]),l.useEffect(()=>{if(c&&d){const y=v=>h(v,d),g=v=>h(v,c);return c.addEventListener("pointerleave",y),d.addEventListener("pointerleave",g),()=>{c.removeEventListener("pointerleave",y),d.removeEventListener("pointerleave",g)}}},[c,d,h,p]),l.useEffect(()=>{if(i){const y=g=>{const v=g.target,b={x:g.clientX,y:g.clientY},x=(c==null?void 0:c.contains(v))||(d==null?void 0:d.contains(v)),w=!wE(b,i);x?p():w&&(p(),u())};return document.addEventListener("pointermove",y),()=>document.removeEventListener("pointermove",y)}},[c,d,i,u,p]),f.jsx(_f,{...e,ref:a})}),[hE,gE]=Br(Sn,{isInside:!1}),vE=AS("TooltipContent"),_f=l.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:a,onPointerDownOutside:i,...s}=e,c=Yr(zt,n),u=Vr(n),{onClose:d}=c;return l.useEffect(()=>(document.addEventListener($o,d),()=>document.removeEventListener($o,d)),[d]),l.useEffect(()=>{if(c.trigger){const m=p=>{const h=p.target;h!=null&&h.contains(c.trigger)&&d()};return window.addEventListener("scroll",m,{capture:!0}),()=>window.removeEventListener("scroll",m,{capture:!0})}},[c.trigger,d]),f.jsx(hf,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:i,onFocusOutside:m=>m.preventDefault(),onDismiss:d,children:f.jsxs(tE,{"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:[f.jsx(vE,{children:r}),f.jsx(hE,{scope:n,isInside:!0,children:f.jsx(cE,{id:c.contentId,role:"tooltip",children:o||r})})]})})});If.displayName=zt;var jf="TooltipArrow",Ff=l.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Vr(n);return gE(jf,n).isInside?null:f.jsx(nE,{...o,...r,ref:t})});Ff.displayName=jf;function yE(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 bE(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 xE(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 wE(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,d=s.y,m=c.x,p=c.y;d>r!=p>r&&n<(m-u)*(r-d)/(p-d)+u&&(o=!o)}return o}function CE(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),SE(t)}function SE(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 EE=Df,NE=Af,ME=Tf,RE=If,PE=Ff;const kE=EE,$f=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 d=Ve("tooltip",s);return f.jsxs(NE,{children:[f.jsx(ME,{asChild:!0,children:e}),f.jsxs(RE,{ref:u,align:r,className:k(le.tooltip,i),side:n,sideOffset:o,style:{zIndex:d,...c.style},...c,children:[t,a?f.jsx(PE,{className:"fill-base-700 stroke-base-700",height:5,width:11}):null]})]})});$f.displayName="Tooltip";exports.Accordion=gi;exports.Alert=vi;exports.Autocomplete=Zc;exports.Badge=Qc;exports.Breadcrumbs=Jc;exports.Button=Oe;exports.Calendar=ba;exports.Checkbox=xa;exports.CheckboxGroup=Il;exports.Combobox=_l;exports.DatePicker=jl;exports.DateRangePicker=Fl;exports.Dialog=$g;exports.DialogClose=Wg;exports.DialogContent=sc;exports.DialogDescription=$l;exports.DialogFooter=Ll;exports.DialogHeader=Wl;exports.DialogOverlay=na;exports.DialogPortal=ic;exports.DialogTitle=Bl;exports.DialogTrigger=Lg;exports.DropdownButton=Mu;exports.FormItem=Ru;exports.Image=Pu;exports.Input=ku;exports.Label=tn;exports.MultiSelect=Ou;exports.Popover=Qt;exports.PopoverContent=Ot;exports.PopoverTrigger=Jt;exports.Radio=Oa;exports.RadioGroup=Xu;exports.Select=_a;exports.SelectContent=Aa;exports.SelectGroup=z0;exports.SelectItem=Ta;exports.SelectLabel=Ad;exports.SelectRoot=Od;exports.SelectSeparator=Td;exports.SelectTrigger=Ia;exports.SelectValue=Dd;exports.SingleSelect=_a;exports.StepIndicator=Q0;exports.Switch=ja;exports.SwitchGroup=Bd;exports.Tabs=kS;exports.TabsContent=df;exports.TabsList=lf;exports.TabsTrigger=uf;exports.Textarea=ff;exports.Tooltip=$f;exports.TooltipProvider=kE;exports.cn=k;exports.configureZIndex=_g;exports.getZIndex=Ve;exports.getZIndexConfig=jg;exports.resetZIndexConfig=Fg;exports.tw=ge;exports.useAriaDisabled=Xe;
|
|
200
|
+
data-[state=active]:text-white`,e),...t}));pf.displayName=df.displayName;const hf=l.forwardRef(({className:e,...t},n)=>f.jsx(ff,{ref:n,className:k(le.focusRingVisible,`mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2
|
|
201
|
+
focus-visible:ring-ring focus-visible:ring-offset-2`,e),...t}));hf.displayName=ff.displayName;const gf=E.forwardRef(({className:e,isDisabled:t=!1,isGrowable:n=!1,...r},o)=>{const a=E.useRef(null),i=Xe({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]),f.jsx("textarea",{ref:s=>{typeof o=="function"?o(s):o&&(o.current=s),a.current=s},className:k(le.input,"min-h-[5rem]",n&&"resize-none overflow-hidden",e),...r,...i})});gf.displayName="Textarea";function DS(e){const t=IS(e),n=l.forwardRef((r,o)=>{const{children:a,...i}=r,s=l.Children.toArray(a),c=s.find(TS);if(c){const u=c.props.children,d=s.map(m=>m===c?l.Children.count(u)>1?l.Children.only(null):l.isValidElement(u)?u.props.children:null:m);return f.jsx(t,{...i,ref:o,children:l.isValidElement(u)?l.cloneElement(u,void 0,d):null})}return f.jsx(t,{...i,ref:o,children:a})});return n.displayName=`${e}.Slot`,n}function IS(e){const t=l.forwardRef((n,r)=>{const{children:o,...a}=n,i=l.isValidElement(o)?jS(o):void 0,s=U(i,r);if(l.isValidElement(o)){const c=_S(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 vf=Symbol("radix.slottable");function AS(e){const t=({children:n})=>f.jsx(f.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=vf,t}function TS(e){return l.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===vf}function _S(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 FS=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],At=FS.reduce((e,t)=>{const n=DS(`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),f.jsx(c,{...s,ref:a})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function $S(e,t){e&&En.flushSync(()=>e.dispatchEvent(t))}var LS="DismissableLayer",Fo="dismissableLayer.update",WS="dismissableLayer.pointerDownOutside",BS="dismissableLayer.focusOutside",$s,yf=l.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),bf=l.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:a,onInteractOutside:i,onDismiss:s,...c}=e,u=l.useContext(yf),[d,m]=l.useState(null),p=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,h]=l.useState({}),y=U(t,N=>m(N)),g=Array.from(u.layers),[v]=[...u.layersWithOutsidePointerEventsDisabled].slice(-1),b=g.indexOf(v),x=d?g.indexOf(d):-1,w=u.layersWithOutsidePointerEventsDisabled.size>0,S=x>=b,C=HS(N=>{const P=N.target,F=[...u.branches].some(_=>_.contains(P));!S||F||(o==null||o(N),i==null||i(N),N.defaultPrevented||s==null||s())},p),M=GS(N=>{const P=N.target;[...u.branches].some(_=>_.contains(P))||(a==null||a(N),i==null||i(N),N.defaultPrevented||s==null||s())},p);return xi(N=>{x===u.layers.size-1&&(r==null||r(N),!N.defaultPrevented&&s&&(N.preventDefault(),s()))},p),l.useEffect(()=>{if(d)return n&&(u.layersWithOutsidePointerEventsDisabled.size===0&&($s=p.body.style.pointerEvents,p.body.style.pointerEvents="none"),u.layersWithOutsidePointerEventsDisabled.add(d)),u.layers.add(d),Ls(),()=>{n&&u.layersWithOutsidePointerEventsDisabled.size===1&&(p.body.style.pointerEvents=$s)}},[d,p,n,u]),l.useEffect(()=>()=>{d&&(u.layers.delete(d),u.layersWithOutsidePointerEventsDisabled.delete(d),Ls())},[d,u]),l.useEffect(()=>{const N=()=>h({});return document.addEventListener(Fo,N),()=>document.removeEventListener(Fo,N)},[]),f.jsx(At.div,{...c,ref:y,style:{pointerEvents:w?S?"auto":"none":void 0,...e.style},onFocusCapture:O(e.onFocusCapture,M.onFocusCapture),onBlurCapture:O(e.onBlurCapture,M.onBlurCapture),onPointerDownCapture:O(e.onPointerDownCapture,C.onPointerDownCapture)})});bf.displayName=LS;var VS="DismissableLayerBranch",YS=l.forwardRef((e,t)=>{const n=l.useContext(yf),r=l.useRef(null),o=U(t,r);return l.useEffect(()=>{const a=r.current;if(a)return n.branches.add(a),()=>{n.branches.delete(a)}},[n.branches]),f.jsx(At.div,{...e,ref:o})});YS.displayName=VS;function HS(e,t=globalThis==null?void 0:globalThis.document){const n=Se(e),r=l.useRef(!1),o=l.useRef(()=>{});return l.useEffect(()=>{const a=s=>{if(s.target&&!r.current){let c=function(){xf(WS,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 GS(e,t=globalThis==null?void 0:globalThis.document){const n=Se(e),r=l.useRef(!1);return l.useEffect(()=>{const o=a=>{a.target&&!r.current&&xf(BS,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 Ls(){const e=new CustomEvent(Fo);document.dispatchEvent(e)}function xf(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?$S(o,a):o.dispatchEvent(a)}var zS="Arrow",wf=l.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...a}=e;return f.jsx(At.svg,{...a,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:f.jsx("polygon",{points:"0,0 30,0 15,10"})})});wf.displayName=zS;var US=wf,La="Popper",[Cf,Sf]=ve(La),[KS,Ef]=Cf(La),Nf=e=>{const{__scopePopper:t,children:n}=e,[r,o]=l.useState(null);return f.jsx(KS,{scope:t,anchor:r,onAnchorChange:o,children:n})};Nf.displayName=La;var Mf="PopperAnchor",Rf=l.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,a=Ef(Mf,n),i=l.useRef(null),s=U(t,i);return l.useEffect(()=>{a.onAnchorChange((r==null?void 0:r.current)||i.current)}),r?null:f.jsx(At.div,{...o,ref:s})});Rf.displayName=Mf;var Wa="PopperContent",[qS,XS]=Cf(Wa),Pf=l.forwardRef((e,t)=>{var A,Z,K,te,re,oe;const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:a="center",alignOffset:i=0,arrowPadding:s=0,avoidCollisions:c=!0,collisionBoundary:u=[],collisionPadding:d=0,sticky:m="partial",hideWhenDetached:p=!1,updatePositionStrategy:h="optimized",onPlaced:y,...g}=e,v=Ef(Wa,n),[b,x]=l.useState(null),w=U(t,he=>x(he)),[S,C]=l.useState(null),M=In(S),N=(M==null?void 0:M.width)??0,P=(M==null?void 0:M.height)??0,F=r+(a!=="center"?"-"+a:""),_=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},$=Array.isArray(u)?u:[u],I=$.length>0,B={padding:_,boundary:$.filter(QS),altBoundary:I},{refs:Y,floatingStyles:q,placement:j,isPositioned:G,middlewareData:T}=Cc({strategy:"fixed",placement:F,whileElementsMounted:(...he)=>xc(...he,{animationFrame:h==="always"}),elements:{reference:v.anchor},middleware:[Sc({mainAxis:o+P,alignmentAxis:i}),c&&Ec({mainAxis:!0,crossAxis:!1,limiter:m==="partial"?Nc():void 0,...B}),c&&Mc({...B}),Rc({...B,apply:({elements:he,rects:be,availableWidth:Je,availableHeight:et})=>{const{width:tt,height:on}=be.reference,Te=he.floating.style;Te.setProperty("--radix-popper-available-width",`${Je}px`),Te.setProperty("--radix-popper-available-height",`${et}px`),Te.setProperty("--radix-popper-anchor-width",`${tt}px`),Te.setProperty("--radix-popper-anchor-height",`${on}px`)}}),S&&kc({element:S,padding:s}),JS({arrowWidth:N,arrowHeight:P}),p&&Pc({strategy:"referenceHidden",...B})]}),[D,Q]=Df(j),J=Se(y);de(()=>{G&&(J==null||J())},[G,J]);const R=(A=T.arrow)==null?void 0:A.x,L=(Z=T.arrow)==null?void 0:Z.y,z=((K=T.arrow)==null?void 0:K.centerOffset)!==0,[W,X]=l.useState();return de(()=>{b&&X(window.getComputedStyle(b).zIndex)},[b]),f.jsx("div",{ref:Y.setFloating,"data-radix-popper-content-wrapper":"",style:{...q,transform:G?q.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:W,"--radix-popper-transform-origin":[(te=T.transformOrigin)==null?void 0:te.x,(re=T.transformOrigin)==null?void 0:re.y].join(" "),...((oe=T.hide)==null?void 0:oe.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:f.jsx(qS,{scope:n,placedSide:D,onArrowChange:C,arrowX:R,arrowY:L,shouldHideArrow:z,children:f.jsx(At.div,{"data-side":D,"data-align":Q,...g,ref:w,style:{...g.style,animation:G?void 0:"none"}})})})});Pf.displayName=Wa;var kf="PopperArrow",ZS={top:"bottom",right:"left",bottom:"top",left:"right"},Of=l.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,a=XS(kf,r),i=ZS[a.placedSide];return f.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:f.jsx(US,{...o,ref:n,style:{...o.style,display:"block"}})})});Of.displayName=kf;function QS(e){return e!==null}var JS=e=>({name:"transformOrigin",options:e,fn(t){var v,b,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,d]=Df(n),m={start:"0%",center:"50%",end:"100%"}[d],p=(((b=o.arrow)==null?void 0:b.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 Df(e){const[t,n="center"]=e.split("-");return[t,n]}var eE=Nf,tE=Rf,nE=Pf,rE=Of;function oE(e,t){return l.useReducer((n,r)=>t[n][r]??n,e)}var If=e=>{const{present:t,children:n}=e,r=aE(t),o=typeof n=="function"?n({present:r.isPresent}):l.Children.only(n),a=U(r.ref,sE(o));return typeof n=="function"||r.isPresent?l.cloneElement(o,{ref:a}):null};If.displayName="Presence";function aE(e){const[t,n]=l.useState(),r=l.useRef(null),o=l.useRef(e),a=l.useRef("none"),i=e?"mounted":"unmounted",[s,c]=oE(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]),de(()=>{const u=r.current,d=o.current;if(d!==e){const p=a.current,h=Zn(u);e?c("MOUNT"):h==="none"||(u==null?void 0:u.display)==="none"?c("UNMOUNT"):c(d&&p!==h?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,c]),de(()=>{if(t){let u;const d=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=d.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),()=>{d.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 sE(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 iE=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"}),cE="VisuallyHidden",Af=l.forwardRef((e,t)=>f.jsx(At.span,{...e,ref:t,style:{...iE,...e.style}}));Af.displayName=cE;var lE=Af,[Br,VE]=ve("Tooltip",[Sf]),Vr=Sf(),Tf="TooltipProvider",uE=700,$o="tooltip.open",[dE,Ba]=Br(Tf),_f=e=>{const{__scopeTooltip:t,delayDuration:n=uE,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)},[]),f.jsx(dE,{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})};_f.displayName=Tf;var Sn="Tooltip",[fE,Yr]=Br(Sn),jf=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o,onOpenChange:a,disableHoverableContent:i,delayDuration:s}=e,c=Ba(Sn,e.__scopeTooltip),u=Vr(t),[d,m]=l.useState(null),p=pe(),h=l.useRef(0),y=i??c.disableHoverableContent,g=s??c.delayDuration,v=l.useRef(!1),[b,x]=Ce({prop:r,defaultProp:o??!1,onChange:N=>{N?(c.onOpen(),document.dispatchEvent(new CustomEvent($o))):c.onClose(),a==null||a(N)},caller:Sn}),w=l.useMemo(()=>b?v.current?"delayed-open":"instant-open":"closed",[b]),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)},[]),f.jsx(eE,{...u,children:f.jsx(fE,{scope:t,contentId:p,open:b,stateAttribute:w,trigger:d,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})})};jf.displayName=Sn;var Lo="TooltipTrigger",Ff=l.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Yr(Lo,n),a=Ba(Lo,n),i=Vr(n),s=l.useRef(null),c=U(t,s,o.onTriggerChange),u=l.useRef(!1),d=l.useRef(!1),m=l.useCallback(()=>u.current=!1,[]);return l.useEffect(()=>()=>document.removeEventListener("pointerup",m),[m]),f.jsx(tE,{asChild:!0,...i,children:f.jsx(At.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:c,onPointerMove:O(e.onPointerMove,p=>{p.pointerType!=="touch"&&!d.current&&!a.isPointerInTransitRef.current&&(o.onTriggerEnter(),d.current=!0)}),onPointerLeave:O(e.onPointerLeave,()=>{o.onTriggerLeave(),d.current=!1}),onPointerDown:O(e.onPointerDown,()=>{o.open&&o.onClose(),u.current=!0,document.addEventListener("pointerup",m,{once:!0})}),onFocus:O(e.onFocus,()=>{u.current||o.onOpen()}),onBlur:O(e.onBlur,o.onClose),onClick:O(e.onClick,o.onClose)})})});Ff.displayName=Lo;var mE="TooltipPortal",[YE,pE]=Br(mE,{forceMount:void 0}),zt="TooltipContent",$f=l.forwardRef((e,t)=>{const n=pE(zt,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...a}=e,i=Yr(zt,e.__scopeTooltip);return f.jsx(If,{present:r||i.open,children:i.disableHoverableContent?f.jsx(Lf,{side:o,...a,ref:t}):f.jsx(hE,{side:o,...a,ref:t})})}),hE=l.forwardRef((e,t)=>{const n=Yr(zt,e.__scopeTooltip),r=Ba(zt,e.__scopeTooltip),o=l.useRef(null),a=U(t,o),[i,s]=l.useState(null),{trigger:c,onClose:u}=n,d=o.current,{onPointerInTransitChange:m}=r,p=l.useCallback(()=>{s(null),m(!1)},[m]),h=l.useCallback((y,g)=>{const v=y.currentTarget,b={x:y.clientX,y:y.clientY},x=bE(b,v.getBoundingClientRect()),w=xE(b,x),S=wE(g.getBoundingClientRect()),C=SE([...w,...S]);s(C),m(!0)},[m]);return l.useEffect(()=>()=>p(),[p]),l.useEffect(()=>{if(c&&d){const y=v=>h(v,d),g=v=>h(v,c);return c.addEventListener("pointerleave",y),d.addEventListener("pointerleave",g),()=>{c.removeEventListener("pointerleave",y),d.removeEventListener("pointerleave",g)}}},[c,d,h,p]),l.useEffect(()=>{if(i){const y=g=>{const v=g.target,b={x:g.clientX,y:g.clientY},x=(c==null?void 0:c.contains(v))||(d==null?void 0:d.contains(v)),w=!CE(b,i);x?p():w&&(p(),u())};return document.addEventListener("pointermove",y),()=>document.removeEventListener("pointermove",y)}},[c,d,i,u,p]),f.jsx(Lf,{...e,ref:a})}),[gE,vE]=Br(Sn,{isInside:!1}),yE=AS("TooltipContent"),Lf=l.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:a,onPointerDownOutside:i,...s}=e,c=Yr(zt,n),u=Vr(n),{onClose:d}=c;return l.useEffect(()=>(document.addEventListener($o,d),()=>document.removeEventListener($o,d)),[d]),l.useEffect(()=>{if(c.trigger){const m=p=>{const h=p.target;h!=null&&h.contains(c.trigger)&&d()};return window.addEventListener("scroll",m,{capture:!0}),()=>window.removeEventListener("scroll",m,{capture:!0})}},[c.trigger,d]),f.jsx(bf,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:a,onPointerDownOutside:i,onFocusOutside:m=>m.preventDefault(),onDismiss:d,children:f.jsxs(nE,{"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:[f.jsx(yE,{children:r}),f.jsx(gE,{scope:n,isInside:!0,children:f.jsx(lE,{id:c.contentId,role:"tooltip",children:o||r})})]})})});$f.displayName=zt;var Wf="TooltipArrow",Bf=l.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Vr(n);return vE(Wf,n).isInside?null:f.jsx(rE,{...o,...r,ref:t})});Bf.displayName=Wf;function bE(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 xE(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 wE(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 CE(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,d=s.y,m=c.x,p=c.y;d>r!=p>r&&n<(m-u)*(r-d)/(p-d)+u&&(o=!o)}return o}function SE(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),EE(t)}function EE(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 NE=_f,ME=jf,RE=Ff,PE=$f,kE=Bf;const OE=NE,Vf=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 d=Ve("tooltip",s);return f.jsxs(ME,{children:[f.jsx(RE,{asChild:!0,children:e}),f.jsxs(PE,{ref:u,align:r,className:k(le.tooltip,i),side:n,sideOffset:o,style:{zIndex:d,...c.style},...c,children:[t,a?f.jsx(kE,{className:"fill-base-700 stroke-base-700",height:5,width:11}):null]})]})});Vf.displayName="Tooltip";exports.Accordion=vi;exports.Alert=yi;exports.Autocomplete=Qc;exports.Badge=Jc;exports.Breadcrumbs=el;exports.Button=Oe;exports.Calendar=xa;exports.Checkbox=wa;exports.CheckboxGroup=_l;exports.Combobox=jl;exports.DatePicker=Fl;exports.DateRangePicker=$l;exports.Dialog=Vg;exports.DialogClose=Hg;exports.DialogContent=ic;exports.DialogDescription=Ll;exports.DialogFooter=Wl;exports.DialogHeader=Bl;exports.DialogOverlay=ra;exports.DialogPortal=cc;exports.DialogTitle=Vl;exports.DialogTrigger=Yg;exports.DropdownButton=Ru;exports.FormItem=Pu;exports.Image=ku;exports.Input=Ou;exports.Label=tn;exports.MultiSelect=Du;exports.Popover=Qt;exports.PopoverContent=Ot;exports.PopoverTrigger=Jt;exports.Radio=Da;exports.RadioGroup=ed;exports.Select=ja;exports.SelectContent=Aa;exports.SelectGroup=U0;exports.SelectItem=Ta;exports.SelectLabel=jd;exports.SelectRoot=Td;exports.SelectSeparator=Fd;exports.SelectTrigger=_a;exports.SelectValue=_d;exports.SingleSelect=ja;exports.StepIndicator=J0;exports.Switch=Fa;exports.SwitchGroup=Gd;exports.Tabs=OS;exports.TabsContent=hf;exports.TabsList=mf;exports.TabsTrigger=pf;exports.Textarea=gf;exports.Tooltip=Vf;exports.TooltipProvider=OE;exports.cn=k;exports.configureZIndex=Lg;exports.getZIndex=Ve;exports.getZIndexConfig=Wg;exports.resetZIndexConfig=Bg;exports.tw=ge;exports.useAriaDisabled=Xe;exports.useRadioAria=Xo;
|
|
202
202
|
//# sourceMappingURL=index.cjs.map
|