extended-dynamic-forms 0.1.6 → 0.1.7
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/extended-dynamic-forms-vanilla.js +38 -0
- package/package.json +12 -9
- package/dist/ExtendedForm.d.ts +0 -4
- package/dist/components/fields/AddressField.d.ts +0 -4
- package/dist/components/fields/CurrencyField.d.ts +0 -4
- package/dist/components/fields/PhoneField.d.ts +0 -4
- package/dist/components/index.d.ts +0 -10
- package/dist/components/ui/badge.d.ts +0 -9
- package/dist/components/ui/button.d.ts +0 -11
- package/dist/components/ui/calendar.d.ts +0 -8
- package/dist/components/ui/card.d.ts +0 -8
- package/dist/components/ui/checkbox.d.ts +0 -4
- package/dist/components/ui/date-picker.d.ts +0 -13
- package/dist/components/ui/input.d.ts +0 -5
- package/dist/components/ui/label.d.ts +0 -5
- package/dist/components/ui/popover.d.ts +0 -6
- package/dist/components/ui/select.d.ts +0 -13
- package/dist/components/ui/slider.d.ts +0 -4
- package/dist/components/ui/textarea.d.ts +0 -5
- package/dist/events/FormEventContext.d.ts +0 -20
- package/dist/events/FormEventHub.d.ts +0 -27
- package/dist/events/FormEventManager.d.ts +0 -10
- package/dist/events/index.d.ts +0 -4
- package/dist/index.d.ts +0 -13
- package/dist/index.es.js +0 -11337
- package/dist/index.umd.js +0 -96
- package/dist/layouts/grid/GridLayout.d.ts +0 -11
- package/dist/layouts/horizontal/HorizontalLayout.d.ts +0 -10
- package/dist/layouts/index.d.ts +0 -3
- package/dist/layouts/vertical/VerticalLayout.d.ts +0 -9
- package/dist/lib/utils.d.ts +0 -3
- package/dist/style.css +0 -1
- package/dist/types/index.d.ts +0 -47
- package/dist/utils/formDataUtils.d.ts +0 -22
- package/dist/utils/index.d.ts +0 -3
- package/dist/utils/schemaUtils.d.ts +0 -24
- package/dist/utils/validationUtils.d.ts +0 -26
- package/dist/widgets/date/DateWidget.d.ts +0 -4
- package/dist/widgets/enhanced/EnhancedWidgets.d.ts +0 -36
- package/dist/widgets/file/FileWidget.d.ts +0 -4
- package/dist/widgets/index.d.ts +0 -33
- package/dist/widgets/input/ColorWidget.d.ts +0 -4
- package/dist/widgets/input/RangeWidget.d.ts +0 -4
- package/dist/widgets/input/RatingWidget.d.ts +0 -4
package/dist/index.umd.js
DELETED
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
(function(W,b){typeof exports=="object"&&typeof module<"u"?b(exports,require("react/jsx-runtime"),require("react"),require("react-dom"),require("@rjsf/validator-ajv8"),require("@rjsf/shadcn"),require("@rjsf/core")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react","react-dom","@rjsf/validator-ajv8","@rjsf/shadcn","@rjsf/core"],b):(W=typeof globalThis<"u"?globalThis:W||self,b(W.ExtendedDynamicForms={},W.React.jsxRuntime,W.React,W.ReactDOM,W.RJSFValidatorAjv8,W.RJSFShadcn,W.RJSFCore))})(this,function(W,b,k,Hr,Vr,Ji,ec){"use strict";var sg=Object.defineProperty;var ag=(W,b,k)=>b in W?sg(W,b,{enumerable:!0,configurable:!0,writable:!0,value:k}):W[b]=k;var rt=(W,b,k)=>ag(W,typeof b!="symbol"?b+"":b,k);function Yr(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 g=Yr(k),Kt=Yr(Hr);function zr(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=zr(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Rr(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=zr(e))&&(r&&(r+=" "),r+=t);return r}const Nn="-",tc=e=>{const t=rc(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:i=>{const a=i.split(Nn);return a[0]===""&&a.length!==1&&a.shift(),jr(a,t)||nc(i)},getConflictingClassGroupIds:(i,a)=>{const c=n[i]||[];return a&&r[i]?[...c,...r[i]]:c}}},jr=(e,t)=>{var i;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?jr(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const s=e.join(Nn);return(i=t.validators.find(({validator:a})=>a(s)))==null?void 0:i.classGroupId},Ur=/^\[(.+)\]$/,nc=e=>{if(Ur.test(e)){const t=Ur.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},rc=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return sc(Object.entries(e.classGroups),n).forEach(([s,i])=>{On(i,r,s,t)}),r},On=(e,t,n,r)=>{e.forEach(o=>{if(typeof o=="string"){const s=o===""?t:qr(t,o);s.classGroupId=n;return}if(typeof o=="function"){if(oc(o)){On(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([s,i])=>{On(i,qr(t,s),n,r)})})},qr=(e,t)=>{let n=e;return t.split(Nn).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},oc=e=>e.isThemeGetter,sc=(e,t)=>t?e.map(([n,r])=>{const o=r.map(s=>typeof s=="string"?t+s:typeof s=="object"?Object.fromEntries(Object.entries(s).map(([i,a])=>[t+i,a])):s);return[n,o]}):e,ac=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const o=(s,i)=>{n.set(s,i),t++,t>e&&(t=0,r=n,n=new Map)};return{get(s){let i=n.get(s);if(i!==void 0)return i;if((i=r.get(s))!==void 0)return o(s,i),i},set(s,i){n.has(s)?n.set(s,i):o(s,i)}}},Gr="!",ic=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,o=t[0],s=t.length,i=a=>{const c=[];let l=0,u=0,d;for(let y=0;y<a.length;y++){let m=a[y];if(l===0){if(m===o&&(r||a.slice(y,y+s)===t)){c.push(a.slice(u,y)),u=y+s;continue}if(m==="/"){d=y;continue}}m==="["?l++:m==="]"&&l--}const h=c.length===0?a:a.substring(u),p=h.startsWith(Gr),x=p?h.substring(1):h,f=d&&d>u?d-u:void 0;return{modifiers:c,hasImportantModifier:p,baseClassName:x,maybePostfixModifierPosition:f}};return n?a=>n({className:a,parseClassName:i}):i},cc=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},lc=e=>({cache:ac(e.cacheSize),parseClassName:ic(e),...tc(e)}),dc=/\s+/,uc=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o}=t,s=[],i=e.trim().split(dc);let a="";for(let c=i.length-1;c>=0;c-=1){const l=i[c],{modifiers:u,hasImportantModifier:d,baseClassName:h,maybePostfixModifierPosition:p}=n(l);let x=!!p,f=r(x?h.substring(0,p):h);if(!f){if(!x){a=l+(a.length>0?" "+a:a);continue}if(f=r(h),!f){a=l+(a.length>0?" "+a:a);continue}x=!1}const y=cc(u).join(":"),m=d?y+Gr:y,v=m+f;if(s.includes(v))continue;s.push(v);const w=o(f,x);for(let S=0;S<w.length;++S){const C=w[S];s.push(m+C)}a=l+(a.length>0?" "+a:a)}return a};function fc(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=Kr(t))&&(r&&(r+=" "),r+=n);return r}const Kr=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Kr(e[r]))&&(n&&(n+=" "),n+=t);return n};function hc(e,...t){let n,r,o,s=i;function i(c){const l=t.reduce((u,d)=>d(u),e());return n=lc(l),r=n.cache.get,o=n.cache.set,s=a,a(c)}function a(c){const l=r(c);if(l)return l;const u=uc(c,n);return o(c,u),u}return function(){return s(fc.apply(null,arguments))}}const re=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},Xr=/^\[(?:([a-z-]+):)?(.+)\]$/i,mc=/^\d+\/\d+$/,pc=new Set(["px","full","screen"]),gc=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,vc=/\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$/,yc=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,bc=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,wc=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Be=e=>ft(e)||pc.has(e)||mc.test(e),je=e=>ht(e,"length",Oc),ft=e=>!!e&&!Number.isNaN(Number(e)),Pn=e=>ht(e,"number",ft),Tt=e=>!!e&&Number.isInteger(Number(e)),xc=e=>e.endsWith("%")&&ft(e.slice(0,-1)),H=e=>Xr.test(e),Ue=e=>gc.test(e),Cc=new Set(["length","size","percentage"]),Sc=e=>ht(e,Cc,Qr),Ec=e=>ht(e,"position",Qr),kc=new Set(["image","url"]),Mc=e=>ht(e,kc,Dc),Nc=e=>ht(e,"",Pc),At=()=>!0,ht=(e,t,n)=>{const r=Xr.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},Oc=e=>vc.test(e)&&!yc.test(e),Qr=()=>!1,Pc=e=>bc.test(e),Dc=e=>wc.test(e),Tc=hc(()=>{const e=re("colors"),t=re("spacing"),n=re("blur"),r=re("brightness"),o=re("borderColor"),s=re("borderRadius"),i=re("borderSpacing"),a=re("borderWidth"),c=re("contrast"),l=re("grayscale"),u=re("hueRotate"),d=re("invert"),h=re("gap"),p=re("gradientColorStops"),x=re("gradientColorStopPositions"),f=re("inset"),y=re("margin"),m=re("opacity"),v=re("padding"),w=re("saturate"),S=re("scale"),C=re("sepia"),M=re("skew"),E=re("space"),O=re("translate"),_=()=>["auto","contain","none"],T=()=>["auto","hidden","clip","visible","scroll"],D=()=>["auto",H,t],N=()=>[H,t],B=()=>["",Be,je],z=()=>["auto",ft,H],Y=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],L=()=>["solid","dashed","dotted","double","none"],V=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],P=()=>["start","end","center","between","around","evenly","stretch"],F=()=>["","0",H],j=()=>["auto","avoid","all","avoid-page","page","left","right","column"],oe=()=>[ft,H];return{cacheSize:500,separator:":",theme:{colors:[At],spacing:[Be,je],blur:["none","",Ue,H],brightness:oe(),borderColor:[e],borderRadius:["none","","full",Ue,H],borderSpacing:N(),borderWidth:B(),contrast:oe(),grayscale:F(),hueRotate:oe(),invert:F(),gap:N(),gradientColorStops:[e],gradientColorStopPositions:[xc,je],inset:D(),margin:D(),opacity:oe(),padding:N(),saturate:oe(),scale:oe(),sepia:F(),skew:oe(),space:N(),translate:N()},classGroups:{aspect:[{aspect:["auto","square","video",H]}],container:["container"],columns:[{columns:[Ue]}],"break-after":[{"break-after":j()}],"break-before":[{"break-before":j()}],"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:[...Y(),H]}],overflow:[{overflow:T()}],"overflow-x":[{"overflow-x":T()}],"overflow-y":[{"overflow-y":T()}],overscroll:[{overscroll:_()}],"overscroll-x":[{"overscroll-x":_()}],"overscroll-y":[{"overscroll-y":_()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[f]}],"inset-x":[{"inset-x":[f]}],"inset-y":[{"inset-y":[f]}],start:[{start:[f]}],end:[{end:[f]}],top:[{top:[f]}],right:[{right:[f]}],bottom:[{bottom:[f]}],left:[{left:[f]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Tt,H]}],basis:[{basis:D()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",H]}],grow:[{grow:F()}],shrink:[{shrink:F()}],order:[{order:["first","last","none",Tt,H]}],"grid-cols":[{"grid-cols":[At]}],"col-start-end":[{col:["auto",{span:["full",Tt,H]},H]}],"col-start":[{"col-start":z()}],"col-end":[{"col-end":z()}],"grid-rows":[{"grid-rows":[At]}],"row-start-end":[{row:["auto",{span:[Tt,H]},H]}],"row-start":[{"row-start":z()}],"row-end":[{"row-end":z()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",H]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",H]}],gap:[{gap:[h]}],"gap-x":[{"gap-x":[h]}],"gap-y":[{"gap-y":[h]}],"justify-content":[{justify:["normal",...P()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...P(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...P(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[v]}],px:[{px:[v]}],py:[{py:[v]}],ps:[{ps:[v]}],pe:[{pe:[v]}],pt:[{pt:[v]}],pr:[{pr:[v]}],pb:[{pb:[v]}],pl:[{pl:[v]}],m:[{m:[y]}],mx:[{mx:[y]}],my:[{my:[y]}],ms:[{ms:[y]}],me:[{me:[y]}],mt:[{mt:[y]}],mr:[{mr:[y]}],mb:[{mb:[y]}],ml:[{ml:[y]}],"space-x":[{"space-x":[E]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[E]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",H,t]}],"min-w":[{"min-w":[H,t,"min","max","fit"]}],"max-w":[{"max-w":[H,t,"none","full","min","max","fit","prose",{screen:[Ue]},Ue]}],h:[{h:[H,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[H,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[H,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[H,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Ue,je]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",Pn]}],"font-family":[{font:[At]}],"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",H]}],"line-clamp":[{"line-clamp":["none",ft,Pn]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",Be,H]}],"list-image":[{"list-image":["none",H]}],"list-style-type":[{list:["none","disc","decimal",H]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[m]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[m]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...L(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",Be,je]}],"underline-offset":[{"underline-offset":["auto",Be,H]}],"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:N()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",H]}],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",H]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[m]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...Y(),Ec]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Sc]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Mc]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[x]}],"gradient-via-pos":[{via:[x]}],"gradient-to-pos":[{to:[x]}],"gradient-from":[{from:[p]}],"gradient-via":[{via:[p]}],"gradient-to":[{to:[p]}],rounded:[{rounded:[s]}],"rounded-s":[{"rounded-s":[s]}],"rounded-e":[{"rounded-e":[s]}],"rounded-t":[{"rounded-t":[s]}],"rounded-r":[{"rounded-r":[s]}],"rounded-b":[{"rounded-b":[s]}],"rounded-l":[{"rounded-l":[s]}],"rounded-ss":[{"rounded-ss":[s]}],"rounded-se":[{"rounded-se":[s]}],"rounded-ee":[{"rounded-ee":[s]}],"rounded-es":[{"rounded-es":[s]}],"rounded-tl":[{"rounded-tl":[s]}],"rounded-tr":[{"rounded-tr":[s]}],"rounded-br":[{"rounded-br":[s]}],"rounded-bl":[{"rounded-bl":[s]}],"border-w":[{border:[a]}],"border-w-x":[{"border-x":[a]}],"border-w-y":[{"border-y":[a]}],"border-w-s":[{"border-s":[a]}],"border-w-e":[{"border-e":[a]}],"border-w-t":[{"border-t":[a]}],"border-w-r":[{"border-r":[a]}],"border-w-b":[{"border-b":[a]}],"border-w-l":[{"border-l":[a]}],"border-opacity":[{"border-opacity":[m]}],"border-style":[{border:[...L(),"hidden"]}],"divide-x":[{"divide-x":[a]}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":[a]}],"divide-y-reverse":["divide-y-reverse"],"divide-opacity":[{"divide-opacity":[m]}],"divide-style":[{divide:L()}],"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:["",...L()]}],"outline-offset":[{"outline-offset":[Be,H]}],"outline-w":[{outline:[Be,je]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:B()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[m]}],"ring-offset-w":[{"ring-offset":[Be,je]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Ue,Nc]}],"shadow-color":[{shadow:[At]}],opacity:[{opacity:[m]}],"mix-blend":[{"mix-blend":[...V(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":V()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[c]}],"drop-shadow":[{"drop-shadow":["","none",Ue,H]}],grayscale:[{grayscale:[l]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[d]}],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":[l]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[u]}],"backdrop-invert":[{"backdrop-invert":[d]}],"backdrop-opacity":[{"backdrop-opacity":[m]}],"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",H]}],duration:[{duration:oe()}],ease:[{ease:["linear","in","out","in-out",H]}],delay:[{delay:oe()}],animate:[{animate:["none","spin","ping","pulse","bounce",H]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[S]}],"scale-x":[{"scale-x":[S]}],"scale-y":[{"scale-y":[S]}],rotate:[{rotate:[Tt,H]}],"translate-x":[{"translate-x":[O]}],"translate-y":[{"translate-y":[O]}],"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",H]}],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",H]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":N()}],"scroll-mx":[{"scroll-mx":N()}],"scroll-my":[{"scroll-my":N()}],"scroll-ms":[{"scroll-ms":N()}],"scroll-me":[{"scroll-me":N()}],"scroll-mt":[{"scroll-mt":N()}],"scroll-mr":[{"scroll-mr":N()}],"scroll-mb":[{"scroll-mb":N()}],"scroll-ml":[{"scroll-ml":N()}],"scroll-p":[{"scroll-p":N()}],"scroll-px":[{"scroll-px":N()}],"scroll-py":[{"scroll-py":N()}],"scroll-ps":[{"scroll-ps":N()}],"scroll-pe":[{"scroll-pe":N()}],"scroll-pt":[{"scroll-pt":N()}],"scroll-pr":[{"scroll-pr":N()}],"scroll-pb":[{"scroll-pb":N()}],"scroll-pl":[{"scroll-pl":N()}],"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",H]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[Be,je,Pn]}],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"]}}});function I(...e){return Tc(Rr(e))}const le=g.forwardRef(({className:e,type:t,...n},r)=>b.jsx("input",{type:t,className:I("flex h-10 w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:r,...n}));le.displayName="Input";function Zr(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Jr(...e){return t=>{let n=!1;const r=e.map(o=>{const s=Zr(o,t);return!n&&typeof s=="function"&&(n=!0),s});if(n)return()=>{for(let o=0;o<r.length;o++){const s=r[o];typeof s=="function"?s():Zr(e[o],null)}}}}function Z(...e){return g.useCallback(Jr(...e),e)}function mt(e){const t=Wc(e),n=g.forwardRef((r,o)=>{const{children:s,...i}=r,a=g.Children.toArray(s),c=a.find(Fc);if(c){const l=c.props.children,u=a.map(d=>d===c?g.Children.count(l)>1?g.Children.only(null):g.isValidElement(l)?l.props.children:null:d);return b.jsx(t,{...i,ref:o,children:g.isValidElement(l)?g.cloneElement(l,void 0,u):null})}return b.jsx(t,{...i,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}var Ac=mt("Slot");function Wc(e){const t=g.forwardRef((n,r)=>{const{children:o,...s}=n;if(g.isValidElement(o)){const i=Bc(o),a=Ic(s,o.props);return o.type!==g.Fragment&&(a.ref=r?Jr(r,i):i),g.cloneElement(o,a)}return g.Children.count(o)>1?g.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var _c=Symbol("radix.slottable");function Fc(e){return g.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===_c}function Ic(e,t){const n={...t};for(const r in t){const o=e[r],s=t[r];/^on[A-Z]/.test(r)?o&&s?n[r]=(...a)=>{const c=s(...a);return o(...a),c}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function Bc(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 Lc=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],q=Lc.reduce((e,t)=>{const n=mt(`Primitive.${t}`),r=g.forwardRef((o,s)=>{const{asChild:i,...a}=o,c=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),b.jsx(c,{...a,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function $c(e,t){e&&Kt.flushSync(()=>e.dispatchEvent(t))}var Hc="Label",eo=g.forwardRef((e,t)=>b.jsx(q.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())}}));eo.displayName=Hc;var to=eo;const no=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,ro=Rr,Dn=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return ro(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:s}=t,i=Object.keys(o).map(l=>{const u=n==null?void 0:n[l],d=s==null?void 0:s[l];if(u===null)return null;const h=no(u)||no(d);return o[l][h]}),a=n&&Object.entries(n).reduce((l,u)=>{let[d,h]=u;return h===void 0||(l[d]=h),l},{}),c=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((l,u)=>{let{class:d,className:h,...p}=u;return Object.entries(p).every(x=>{let[f,y]=x;return Array.isArray(y)?y.includes({...s,...a}[f]):{...s,...a}[f]===y})?[...l,d,h]:l},[]);return ro(e,i,c,n==null?void 0:n.class,n==null?void 0:n.className)},Vc=Dn("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),pe=g.forwardRef(({className:e,...t},n)=>b.jsx(to,{ref:n,className:I(Vc(),e),...t}));pe.displayName=to.displayName;const oo=g.forwardRef(({className:e,...t},n)=>b.jsx("div",{ref:n,className:I("rounded-lg border bg-card text-card-foreground shadow-sm",e),...t}));oo.displayName="Card";const so=g.forwardRef(({className:e,...t},n)=>b.jsx("div",{ref:n,className:I("flex flex-col space-y-1.5 p-6",e),...t}));so.displayName="CardHeader";const ao=g.forwardRef(({className:e,...t},n)=>b.jsx("h3",{ref:n,className:I("text-2xl font-semibold leading-none tracking-tight",e),...t}));ao.displayName="CardTitle";const Yc=g.forwardRef(({className:e,...t},n)=>b.jsx("p",{ref:n,className:I("text-sm text-muted-foreground",e),...t}));Yc.displayName="CardDescription";const io=g.forwardRef(({className:e,...t},n)=>b.jsx("div",{ref:n,className:I("p-6 pt-0",e),...t}));io.displayName="CardContent";const zc=g.forwardRef(({className:e,...t},n)=>b.jsx("div",{ref:n,className:I("flex items-center p-6 pt-0",e),...t}));zc.displayName="CardFooter";const co=({formData:e,onChange:t,required:n,disabled:r,readonly:o,schema:s,idSchema:i})=>{const a=c=>l=>{t({...e,[c]:l.target.value})};return b.jsxs(oo,{children:[b.jsx(so,{className:"pb-4",children:b.jsx(ao,{className:"text-lg",children:s.title||"Address"})}),b.jsxs(io,{className:"space-y-4",children:[b.jsxs("div",{className:"space-y-2",children:[b.jsxs(pe,{htmlFor:`${i.$id}_street`,children:["Street Address",n&&b.jsx("span",{className:"text-destructive ml-1",children:"*"})]}),b.jsx(le,{id:`${i.$id}_street`,type:"text",value:(e==null?void 0:e.street)||"",onChange:a("street"),disabled:r||o,placeholder:"123 Main St"})]}),b.jsxs("div",{className:"space-y-2",children:[b.jsxs(pe,{htmlFor:`${i.$id}_city`,children:["City",n&&b.jsx("span",{className:"text-destructive ml-1",children:"*"})]}),b.jsx(le,{id:`${i.$id}_city`,type:"text",value:(e==null?void 0:e.city)||"",onChange:a("city"),disabled:r||o,placeholder:"New York"})]}),b.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[b.jsxs("div",{className:"space-y-2",children:[b.jsxs(pe,{htmlFor:`${i.$id}_state`,children:["State/Province",n&&b.jsx("span",{className:"text-destructive ml-1",children:"*"})]}),b.jsx(le,{id:`${i.$id}_state`,type:"text",value:(e==null?void 0:e.state)||"",onChange:a("state"),disabled:r||o,placeholder:"NY"})]}),b.jsxs("div",{className:"space-y-2",children:[b.jsxs(pe,{htmlFor:`${i.$id}_zip`,children:["ZIP/Postal Code",n&&b.jsx("span",{className:"text-destructive ml-1",children:"*"})]}),b.jsx(le,{id:`${i.$id}_zip`,type:"text",value:(e==null?void 0:e.zip)||"",onChange:a("zip"),disabled:r||o,placeholder:"10001"})]})]}),b.jsxs("div",{className:"space-y-2",children:[b.jsx(pe,{htmlFor:`${i.$id}_country`,children:"Country"}),b.jsx(le,{id:`${i.$id}_country`,type:"text",value:(e==null?void 0:e.country)||"",onChange:a("country"),disabled:r||o,placeholder:"United States"})]})]})]})},lo=k.createContext(null),uo=({eventHub:e,formData:t,children:n})=>b.jsx(lo.Provider,{value:{eventHub:e,formData:t},children:n}),fo=()=>{const e=k.useContext(lo);if(!e)throw new Error("useFormEventHub must be used within a FormEventProvider");return e},ie=(e,t,n)=>{const{eventHub:r,formData:o}=fo();return k.useMemo(()=>r.createFieldEventHandlers(e,t,o,n),[r,e,t,o,n])},ho=({formData:e,onChange:t,required:n,disabled:r,readonly:o,schema:s,idSchema:i})=>{const a=ie(i.$id,s),c=u=>{const d=u.replace(/\D/g,""),h=d.length;return h<4?d:h<7?`(${d.slice(0,3)}) ${d.slice(3)}`:`(${d.slice(0,3)}) ${d.slice(3,6)}-${d.slice(6,10)}`},l=async u=>{const d=c(u.target.value);t(d),await a.onChange(d)};return b.jsxs("div",{className:"space-y-2",children:[b.jsxs(pe,{htmlFor:i.$id,children:[s.title||"Phone Number",n&&b.jsx("span",{className:"text-destructive ml-1",children:"*"})]}),b.jsx(le,{id:i.$id,type:"tel",value:e||"",onChange:l,disabled:r||o,placeholder:"(555) 123-4567",maxLength:14})]})},mo=({formData:e,onChange:t,required:n,disabled:r,readonly:o,schema:s,uiSchema:i,idSchema:a})=>{var x,f;const c=((x=i==null?void 0:i["ui:options"])==null?void 0:x.currency)||"USD",l=((f=i==null?void 0:i["ui:options"])==null?void 0:f.symbol)||"$",u=ie(a.$id,s),d=y=>{const m=parseFloat(y.replace(/[^0-9.-]+/g,""));return isNaN(m)?"":m.toFixed(2)},h=async y=>{const m=y.target.value.replace(/[^0-9.-]+/g,""),v=m?parseFloat(m):void 0;t(v),await u.onChange(v)},p=async y=>{const m=d(y.target.value),v=m?parseFloat(m):void 0;t(v),await u.onBlur(v)};return b.jsxs("div",{className:"space-y-2",children:[b.jsxs(pe,{htmlFor:a.$id,children:[s.title||"Amount",n&&b.jsx("span",{className:"text-destructive ml-1",children:"*"})]}),b.jsxs("div",{className:"relative",children:[b.jsx("span",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-sm text-muted-foreground",children:String(l)}),b.jsx(le,{id:a.$id,type:"text",inputMode:"decimal",value:e||"",onChange:h,onBlur:p,disabled:r||o,placeholder:"0.00",className:"pl-8 pr-12"}),b.jsx("span",{className:"absolute right-3 top-1/2 -translate-y-1/2 text-sm text-muted-foreground",children:String(c)})]})]})},po={address:co,phone:ho,currency:mo},go=({id:e,value:t,required:n,disabled:r,readonly:o,label:s,onChange:i,onBlur:a,onFocus:c,schema:l})=>{const u=ie(e,l),d=async x=>{const f=x.target.value;i(f),await u.onChange(f)},h=async x=>{const f=x.target.value;a&&a(e,f),await u.onBlur(f)},p=async x=>{const f=x.target.value;c&&c(e,f),await u.onFocus(f)};return b.jsxs("div",{className:"space-y-2",children:[b.jsxs(pe,{htmlFor:e,children:[s||l.title,n&&b.jsx("span",{className:"text-destructive ml-1",children:"*"})]}),b.jsx(le,{id:e,type:"color",value:t||"#000000",required:n,disabled:r||o,onChange:d,onBlur:h,onFocus:p,className:"h-10 w-full cursor-pointer"})]})},Rc=({id:e,value:t,required:n,disabled:r,readonly:o,label:s,onChange:i,onBlur:a,onFocus:c,options:l,schema:u})=>{const d=l.inputType||"date",h=ie(e,u),p=async y=>{const m=y.target.value;i(m),await h.onChange(m)},x=async y=>{const m=y.target.value;a&&a(e,m),await h.onBlur(m)},f=async y=>{const m=y.target.value;c&&c(e,m),await h.onFocus(m)};return b.jsxs("div",{className:"space-y-2",children:[b.jsxs(pe,{htmlFor:e,children:[s||u.title,n&&b.jsx("span",{className:"text-destructive ml-1",children:"*"})]}),b.jsx(le,{id:e,type:d,value:t||"",required:n,disabled:r||o,onChange:p,onBlur:x,onFocus:f,min:typeof l.minDate=="string"||typeof l.minDate=="number"?l.minDate:void 0,max:typeof l.maxDate=="string"||typeof l.maxDate=="number"?l.maxDate:void 0,className:"w-full"})]})},Tn=Dn("inline-flex items-center justify-center whitespace-nowrap rounded-md text-sm font-medium ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-primary text-primary-foreground hover:bg-primary/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-background hover:bg-accent hover:text-accent-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-accent hover:text-accent-foreground",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-10 px-4 py-2",sm:"h-9 rounded-md px-3",lg:"h-11 rounded-md px-8",icon:"h-10 w-10"}},defaultVariants:{variant:"default",size:"default"}}),Wt=g.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...o},s)=>{const i=r?Ac:"button";return b.jsx(i,{className:I(Tn({variant:t,size:n,className:e})),ref:s,...o})});Wt.displayName="Button";const jc=Dn("inline-flex items-center rounded-full border px-2.5 py-0.5 text-xs font-semibold transition-colors focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2",{variants:{variant:{default:"border-transparent bg-primary text-primary-foreground hover:bg-primary/80",secondary:"border-transparent bg-secondary text-secondary-foreground hover:bg-secondary/80",destructive:"border-transparent bg-destructive text-destructive-foreground hover:bg-destructive/80",outline:"text-foreground"}},defaultVariants:{variant:"default"}});function vo({className:e,variant:t,...n}){return b.jsx("div",{className:I(jc({variant:t}),e),...n})}/**
|
|
2
|
-
* @license lucide-react v0.303.0 - ISC
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the ISC license.
|
|
5
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/var Uc={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"};/**
|
|
7
|
-
* @license lucide-react v0.303.0 - ISC
|
|
8
|
-
*
|
|
9
|
-
* This source code is licensed under the ISC license.
|
|
10
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
11
|
-
*/const qc=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase().trim(),qe=(e,t)=>{const n=k.forwardRef(({color:r="currentColor",size:o=24,strokeWidth:s=2,absoluteStrokeWidth:i,className:a="",children:c,...l},u)=>k.createElement("svg",{ref:u,...Uc,width:o,height:o,stroke:r,strokeWidth:i?Number(s)*24/Number(o):s,className:["lucide",`lucide-${qc(e)}`,a].join(" "),...l},[...t.map(([d,h])=>k.createElement(d,h)),...Array.isArray(c)?c:[c]]));return n.displayName=`${e}`,n};/**
|
|
12
|
-
* @license lucide-react v0.303.0 - ISC
|
|
13
|
-
*
|
|
14
|
-
* This source code is licensed under the ISC license.
|
|
15
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
16
|
-
*/const Gc=qe("Calendar",[["rect",{width:"18",height:"18",x:"3",y:"4",rx:"2",ry:"2",key:"eu3xkr"}],["line",{x1:"16",x2:"16",y1:"2",y2:"6",key:"m3sa8f"}],["line",{x1:"8",x2:"8",y1:"2",y2:"6",key:"18kwsl"}],["line",{x1:"3",x2:"21",y1:"10",y2:"10",key:"xt86sb"}]]);/**
|
|
17
|
-
* @license lucide-react v0.303.0 - ISC
|
|
18
|
-
*
|
|
19
|
-
* This source code is licensed under the ISC license.
|
|
20
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
21
|
-
*/const yo=qe("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
|
|
22
|
-
* @license lucide-react v0.303.0 - ISC
|
|
23
|
-
*
|
|
24
|
-
* This source code is licensed under the ISC license.
|
|
25
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
26
|
-
*/const bo=qe("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
|
|
27
|
-
* @license lucide-react v0.303.0 - ISC
|
|
28
|
-
*
|
|
29
|
-
* This source code is licensed under the ISC license.
|
|
30
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
31
|
-
*/const Kc=qe("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
|
|
32
|
-
* @license lucide-react v0.303.0 - ISC
|
|
33
|
-
*
|
|
34
|
-
* This source code is licensed under the ISC license.
|
|
35
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
36
|
-
*/const Xc=qe("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
|
|
37
|
-
* @license lucide-react v0.303.0 - ISC
|
|
38
|
-
*
|
|
39
|
-
* This source code is licensed under the ISC license.
|
|
40
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
41
|
-
*/const Qc=qe("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/**
|
|
42
|
-
* @license lucide-react v0.303.0 - ISC
|
|
43
|
-
*
|
|
44
|
-
* This source code is licensed under the ISC license.
|
|
45
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
46
|
-
*/const Zc=qe("Star",[["polygon",{points:"12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2",key:"8f66p6"}]]);/**
|
|
47
|
-
* @license lucide-react v0.303.0 - ISC
|
|
48
|
-
*
|
|
49
|
-
* This source code is licensed under the ISC license.
|
|
50
|
-
* See the LICENSE file in the root directory of this source tree.
|
|
51
|
-
*/const wo=qe("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),xo=({id:e,value:t,required:n,disabled:r,readonly:o,label:s,onChange:i,options:a,schema:c})=>{const l=k.useRef(null),u=a.accept||"*/*",d=a.multiple||!1,h=ie(e,c),p=async y=>{const m=y.target.files;if(!m)return;let v;if(d){const w=Array.from(m).map(S=>({name:S.name,size:S.size,type:S.type,lastModified:S.lastModified}));v=w,i(w)}else{const w=m[0];w&&(v={name:w.name,size:w.size,type:w.type,lastModified:w.lastModified},i(v))}v&&await h.onChange(v)},x=async()=>{l.current&&(l.current.value=""),i(null),await h.onChange(null)},f=y=>y<1024?y+" B":y<1024*1024?(y/1024).toFixed(1)+" KB":(y/(1024*1024)).toFixed(1)+" MB";return b.jsxs("div",{className:"space-y-2",children:[b.jsxs(pe,{htmlFor:e,children:[s||c.title,n&&b.jsx("span",{className:"text-destructive ml-1",children:"*"})]}),b.jsx(le,{ref:l,id:e,type:"file",accept:u,multiple:d,required:n,disabled:r||o,onChange:p,className:"cursor-pointer"}),t&&b.jsx("div",{className:"space-y-2",children:d&&Array.isArray(t)?b.jsx("div",{className:"flex flex-wrap gap-2",children:t.map((y,m)=>b.jsxs(vo,{variant:"secondary",className:"flex items-center gap-1 pr-1",children:[b.jsxs("span",{className:"text-xs",children:[y.name," (",f(y.size),")"]}),!r&&!o&&b.jsx(Wt,{type:"button",variant:"ghost",size:"icon",className:"h-4 w-4 p-0 hover:bg-transparent",onClick:x,children:b.jsx(wo,{className:"h-3 w-3"})})]},m))}):t&&typeof t=="object"&&"name"in t?b.jsxs(vo,{variant:"secondary",className:"inline-flex items-center gap-1 pr-1",children:[b.jsxs("span",{className:"text-xs",children:[t.name," (",f(t.size),")"]}),!r&&!o&&b.jsx(Wt,{type:"button",variant:"ghost",size:"icon",className:"h-4 w-4 p-0 hover:bg-transparent",onClick:x,children:b.jsx(wo,{className:"h-3 w-3"})})]}):null})]})};function Xt(e,[t,n]){return Math.min(n,Math.max(t,e))}function U(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}function pt(e,t=[]){let n=[];function r(s,i){const a=g.createContext(i),c=n.length;n=[...n,i];const l=d=>{var m;const{scope:h,children:p,...x}=d,f=((m=h==null?void 0:h[e])==null?void 0:m[c])||a,y=g.useMemo(()=>x,Object.values(x));return b.jsx(f.Provider,{value:y,children:p})};l.displayName=s+"Provider";function u(d,h){var f;const p=((f=h==null?void 0:h[e])==null?void 0:f[c])||a,x=g.useContext(p);if(x)return x;if(i!==void 0)return i;throw new Error(`\`${d}\` must be used within \`${s}\``)}return[l,u]}const o=()=>{const s=n.map(i=>g.createContext(i));return function(a){const c=(a==null?void 0:a[e])||s;return g.useMemo(()=>({[`__scope${e}`]:{...a,[e]:c}}),[a,c])}};return o.scopeName=e,[r,Jc(o,...t)]}function Jc(...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(s){const i=r.reduce((a,{useScope:c,scopeName:l})=>{const d=c(s)[`__scope${l}`];return{...a,...d}},{});return g.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}var ue=globalThis!=null&&globalThis.document?g.useLayoutEffect:()=>{},el=g[" useInsertionEffect ".trim().toString()]||ue;function _t({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,s,i]=tl({defaultProp:t,onChange:n}),a=e!==void 0,c=a?e:o;{const u=g.useRef(e!==void 0);g.useEffect(()=>{const d=u.current;d!==a&&console.warn(`${r} is changing from ${d?"controlled":"uncontrolled"} to ${a?"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.`),u.current=a},[a,r])}const l=g.useCallback(u=>{var d;if(a){const h=nl(u)?u(e):u;h!==e&&((d=i.current)==null||d.call(i,h))}else s(u)},[a,e,s,i]);return[c,l]}function tl({defaultProp:e,onChange:t}){const[n,r]=g.useState(e),o=g.useRef(n),s=g.useRef(t);return el(()=>{s.current=t},[t]),g.useEffect(()=>{var i;o.current!==n&&((i=s.current)==null||i.call(s,n),o.current=n)},[n,o]),[n,r,s]}function nl(e){return typeof e=="function"}var rl=g.createContext(void 0);function Co(e){const t=g.useContext(rl);return e||t||"ltr"}function An(e){const t=g.useRef({value:e,previous:e});return g.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function Wn(e){const[t,n]=g.useState(void 0);return ue(()=>{if(e){n({width:e.offsetWidth,height:e.offsetHeight});const r=new ResizeObserver(o=>{if(!Array.isArray(o)||!o.length)return;const s=o[0];let i,a;if("borderBoxSize"in s){const c=s.borderBoxSize,l=Array.isArray(c)?c[0]:c;i=l.inlineSize,a=l.blockSize}else i=e.offsetWidth,a=e.offsetHeight;n({width:i,height:a})});return r.observe(e,{box:"border-box"}),()=>r.unobserve(e)}else n(void 0)},[e]),t}function So(e){const t=e+"CollectionProvider",[n,r]=pt(t),[o,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),i=f=>{const{scope:y,children:m}=f,v=k.useRef(null),w=k.useRef(new Map).current;return b.jsx(o,{scope:y,itemMap:w,collectionRef:v,children:m})};i.displayName=t;const a=e+"CollectionSlot",c=mt(a),l=k.forwardRef((f,y)=>{const{scope:m,children:v}=f,w=s(a,m),S=Z(y,w.collectionRef);return b.jsx(c,{ref:S,children:v})});l.displayName=a;const u=e+"CollectionItemSlot",d="data-radix-collection-item",h=mt(u),p=k.forwardRef((f,y)=>{const{scope:m,children:v,...w}=f,S=k.useRef(null),C=Z(y,S),M=s(u,m);return k.useEffect(()=>(M.itemMap.set(S,{ref:S,...w}),()=>void M.itemMap.delete(S))),b.jsx(h,{[d]:"",ref:C,children:v})});p.displayName=u;function x(f){const y=s(e+"CollectionConsumer",f);return k.useCallback(()=>{const v=y.collectionRef.current;if(!v)return[];const w=Array.from(v.querySelectorAll(`[${d}]`));return Array.from(y.itemMap.values()).sort((M,E)=>w.indexOf(M.ref.current)-w.indexOf(E.ref.current))},[y.collectionRef,y.itemMap])}return[{Provider:i,Slot:l,ItemSlot:p},x,r]}var Eo=["PageUp","PageDown"],ko=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],Mo={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},gt="Slider",[_n,ol,sl]=So(gt),[No,cg]=pt(gt,[sl]),[al,Qt]=No(gt),Oo=g.forwardRef((e,t)=>{const{name:n,min:r=0,max:o=100,step:s=1,orientation:i="horizontal",disabled:a=!1,minStepsBetweenThumbs:c=0,defaultValue:l=[r],value:u,onValueChange:d=()=>{},onValueCommit:h=()=>{},inverted:p=!1,form:x,...f}=e,y=g.useRef(new Set),m=g.useRef(0),w=i==="horizontal"?il:cl,[S=[],C]=_t({prop:u,defaultProp:l,onChange:D=>{var B;(B=[...y.current][m.current])==null||B.focus(),d(D)}}),M=g.useRef(S);function E(D){const N=hl(S,D);T(D,N)}function O(D){T(D,m.current)}function _(){const D=M.current[m.current];S[m.current]!==D&&h(S)}function T(D,N,{commit:B}={commit:!1}){const z=vl(s),Y=yl(Math.round((D-r)/s)*s+r,z),L=Xt(Y,[r,o]);C((V=[])=>{const P=ul(V,L,N);if(gl(P,c*s)){m.current=P.indexOf(L);const F=String(P)!==String(V);return F&&B&&h(P),F?P:V}else return V})}return b.jsx(al,{scope:e.__scopeSlider,name:n,disabled:a,min:r,max:o,valueIndexToChangeRef:m,thumbs:y.current,values:S,orientation:i,form:x,children:b.jsx(_n.Provider,{scope:e.__scopeSlider,children:b.jsx(_n.Slot,{scope:e.__scopeSlider,children:b.jsx(w,{"aria-disabled":a,"data-disabled":a?"":void 0,...f,ref:t,onPointerDown:U(f.onPointerDown,()=>{a||(M.current=S)}),min:r,max:o,inverted:p,onSlideStart:a?void 0:E,onSlideMove:a?void 0:O,onSlideEnd:a?void 0:_,onHomeKeyDown:()=>!a&&T(r,0,{commit:!0}),onEndKeyDown:()=>!a&&T(o,S.length-1,{commit:!0}),onStepKeyDown:({event:D,direction:N})=>{if(!a){const Y=Eo.includes(D.key)||D.shiftKey&&ko.includes(D.key)?10:1,L=m.current,V=S[L],P=s*Y*N;T(V+P,L,{commit:!0})}}})})})})});Oo.displayName=gt;var[Po,Do]=No(gt,{startEdge:"left",endEdge:"right",size:"width",direction:1}),il=g.forwardRef((e,t)=>{const{min:n,max:r,dir:o,inverted:s,onSlideStart:i,onSlideMove:a,onSlideEnd:c,onStepKeyDown:l,...u}=e,[d,h]=g.useState(null),p=Z(t,w=>h(w)),x=g.useRef(void 0),f=Co(o),y=f==="ltr",m=y&&!s||!y&&s;function v(w){const S=x.current||d.getBoundingClientRect(),C=[0,S.width],E=Bn(C,m?[n,r]:[r,n]);return x.current=S,E(w-S.left)}return b.jsx(Po,{scope:e.__scopeSlider,startEdge:m?"left":"right",endEdge:m?"right":"left",direction:m?1:-1,size:"width",children:b.jsx(To,{dir:f,"data-orientation":"horizontal",...u,ref:p,style:{...u.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:w=>{const S=v(w.clientX);i==null||i(S)},onSlideMove:w=>{const S=v(w.clientX);a==null||a(S)},onSlideEnd:()=>{x.current=void 0,c==null||c()},onStepKeyDown:w=>{const C=Mo[m?"from-left":"from-right"].includes(w.key);l==null||l({event:w,direction:C?-1:1})}})})}),cl=g.forwardRef((e,t)=>{const{min:n,max:r,inverted:o,onSlideStart:s,onSlideMove:i,onSlideEnd:a,onStepKeyDown:c,...l}=e,u=g.useRef(null),d=Z(t,u),h=g.useRef(void 0),p=!o;function x(f){const y=h.current||u.current.getBoundingClientRect(),m=[0,y.height],w=Bn(m,p?[r,n]:[n,r]);return h.current=y,w(f-y.top)}return b.jsx(Po,{scope:e.__scopeSlider,startEdge:p?"bottom":"top",endEdge:p?"top":"bottom",size:"height",direction:p?1:-1,children:b.jsx(To,{"data-orientation":"vertical",...l,ref:d,style:{...l.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:f=>{const y=x(f.clientY);s==null||s(y)},onSlideMove:f=>{const y=x(f.clientY);i==null||i(y)},onSlideEnd:()=>{h.current=void 0,a==null||a()},onStepKeyDown:f=>{const m=Mo[p?"from-bottom":"from-top"].includes(f.key);c==null||c({event:f,direction:m?-1:1})}})})}),To=g.forwardRef((e,t)=>{const{__scopeSlider:n,onSlideStart:r,onSlideMove:o,onSlideEnd:s,onHomeKeyDown:i,onEndKeyDown:a,onStepKeyDown:c,...l}=e,u=Qt(gt,n);return b.jsx(q.span,{...l,ref:t,onKeyDown:U(e.onKeyDown,d=>{d.key==="Home"?(i(d),d.preventDefault()):d.key==="End"?(a(d),d.preventDefault()):Eo.concat(ko).includes(d.key)&&(c(d),d.preventDefault())}),onPointerDown:U(e.onPointerDown,d=>{const h=d.target;h.setPointerCapture(d.pointerId),d.preventDefault(),u.thumbs.has(h)?h.focus():r(d)}),onPointerMove:U(e.onPointerMove,d=>{d.target.hasPointerCapture(d.pointerId)&&o(d)}),onPointerUp:U(e.onPointerUp,d=>{const h=d.target;h.hasPointerCapture(d.pointerId)&&(h.releasePointerCapture(d.pointerId),s(d))})})}),Ao="SliderTrack",Wo=g.forwardRef((e,t)=>{const{__scopeSlider:n,...r}=e,o=Qt(Ao,n);return b.jsx(q.span,{"data-disabled":o.disabled?"":void 0,"data-orientation":o.orientation,...r,ref:t})});Wo.displayName=Ao;var Fn="SliderRange",_o=g.forwardRef((e,t)=>{const{__scopeSlider:n,...r}=e,o=Qt(Fn,n),s=Do(Fn,n),i=g.useRef(null),a=Z(t,i),c=o.values.length,l=o.values.map(h=>Bo(h,o.min,o.max)),u=c>1?Math.min(...l):0,d=100-Math.max(...l);return b.jsx(q.span,{"data-orientation":o.orientation,"data-disabled":o.disabled?"":void 0,...r,ref:a,style:{...e.style,[s.startEdge]:u+"%",[s.endEdge]:d+"%"}})});_o.displayName=Fn;var In="SliderThumb",Fo=g.forwardRef((e,t)=>{const n=ol(e.__scopeSlider),[r,o]=g.useState(null),s=Z(t,a=>o(a)),i=g.useMemo(()=>r?n().findIndex(a=>a.ref.current===r):-1,[n,r]);return b.jsx(ll,{...e,ref:s,index:i})}),ll=g.forwardRef((e,t)=>{const{__scopeSlider:n,index:r,name:o,...s}=e,i=Qt(In,n),a=Do(In,n),[c,l]=g.useState(null),u=Z(t,v=>l(v)),d=c?i.form||!!c.closest("form"):!0,h=Wn(c),p=i.values[r],x=p===void 0?0:Bo(p,i.min,i.max),f=fl(r,i.values.length),y=h==null?void 0:h[a.size],m=y?ml(y,x,a.direction):0;return g.useEffect(()=>{if(c)return i.thumbs.add(c),()=>{i.thumbs.delete(c)}},[c,i.thumbs]),b.jsxs("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[a.startEdge]:`calc(${x}% + ${m}px)`},children:[b.jsx(_n.ItemSlot,{scope:e.__scopeSlider,children:b.jsx(q.span,{role:"slider","aria-label":e["aria-label"]||f,"aria-valuemin":i.min,"aria-valuenow":p,"aria-valuemax":i.max,"aria-orientation":i.orientation,"data-orientation":i.orientation,"data-disabled":i.disabled?"":void 0,tabIndex:i.disabled?void 0:0,...s,ref:u,style:p===void 0?{display:"none"}:e.style,onFocus:U(e.onFocus,()=>{i.valueIndexToChangeRef.current=r})})}),d&&b.jsx(Io,{name:o??(i.name?i.name+(i.values.length>1?"[]":""):void 0),form:i.form,value:p},r)]})});Fo.displayName=In;var dl="RadioBubbleInput",Io=g.forwardRef(({__scopeSlider:e,value:t,...n},r)=>{const o=g.useRef(null),s=Z(o,r),i=An(t);return g.useEffect(()=>{const a=o.current;if(!a)return;const c=window.HTMLInputElement.prototype,u=Object.getOwnPropertyDescriptor(c,"value").set;if(i!==t&&u){const d=new Event("input",{bubbles:!0});u.call(a,t),a.dispatchEvent(d)}},[i,t]),b.jsx(q.input,{style:{display:"none"},...n,ref:s,defaultValue:t})});Io.displayName=dl;function ul(e=[],t,n){const r=[...e];return r[n]=t,r.sort((o,s)=>o-s)}function Bo(e,t,n){const s=100/(n-t)*(e-t);return Xt(s,[0,100])}function fl(e,t){return t>2?`Value ${e+1} of ${t}`:t===2?["Minimum","Maximum"][e]:void 0}function hl(e,t){if(e.length===1)return 0;const n=e.map(o=>Math.abs(o-t)),r=Math.min(...n);return n.indexOf(r)}function ml(e,t,n){const r=e/2,s=Bn([0,50],[0,r]);return(r-s(t)*n)*n}function pl(e){return e.slice(0,-1).map((t,n)=>e[n+1]-t)}function gl(e,t){if(t>0){const n=pl(e);return Math.min(...n)>=t}return!0}function Bn(e,t){return n=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const r=(t[1]-t[0])/(e[1]-e[0]);return t[0]+r*(n-e[0])}}function vl(e){return(String(e).split(".")[1]||"").length}function yl(e,t){const n=Math.pow(10,t);return Math.round(e*n)/n}var Lo=Oo,bl=Wo,wl=_o,xl=Fo;const $o=g.forwardRef(({className:e,...t},n)=>b.jsxs(Lo,{ref:n,className:I("relative flex w-full touch-none select-none items-center",e),...t,children:[b.jsx(bl,{className:"relative h-2 w-full grow overflow-hidden rounded-full bg-secondary",children:b.jsx(wl,{className:"absolute h-full bg-primary"})}),b.jsx(xl,{className:"block h-5 w-5 rounded-full border-2 border-primary bg-background ring-offset-background transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50"})]}));$o.displayName=Lo.displayName;const Ho=({id:e,value:t,required:n,disabled:r,readonly:o,label:s,onChange:i,onBlur:a,schema:c})=>{const l=c.minimum||0,u=c.maximum||100,d=c.multipleOf||1,h=ie(e,c),p=async x=>{const f=x[0];i(f),a&&a(e,f),await h.onChange(f)};return b.jsxs("div",{className:"space-y-2",children:[b.jsxs("div",{className:"flex items-center justify-between",children:[b.jsxs(pe,{htmlFor:e,children:[s||c.title,n&&b.jsx("span",{className:"text-destructive ml-1",children:"*"})]}),b.jsx("span",{className:"text-sm font-medium tabular-nums",children:t||l})]}),b.jsx($o,{id:e,min:l,max:u,step:d,value:[t||l],onValueChange:p,disabled:r||o,className:"w-full"})]})},Vo=({id:e,value:t,required:n,disabled:r,readonly:o,label:s,onChange:i,options:a,schema:c})=>{const l=Number(a.max||c.maximum||5),u=Array.from({length:l},(p,x)=>x+1),d=ie(e,c),h=async p=>{!r&&!o&&(i(p),await d.onChange(p))};return b.jsxs("div",{className:"space-y-2",children:[b.jsxs(pe,{htmlFor:e,children:[s||c.title,n&&b.jsx("span",{className:"text-destructive ml-1",children:"*"})]}),b.jsx("div",{className:"flex items-center gap-1",role:"radiogroup","aria-labelledby":e,children:u.map(p=>b.jsx(Wt,{type:"button",variant:"ghost",size:"icon",className:I("h-8 w-8 p-0 hover:bg-transparent",r||o?"cursor-not-allowed opacity-50":"cursor-pointer"),onClick:()=>h(p),disabled:r||o,"aria-label":`Rate ${p} out of ${l}`,role:"radio","aria-checked":p===t,children:b.jsx(Zc,{className:I("h-5 w-5 transition-colors",p<=(t||0)?"fill-yellow-400 text-yellow-400":"text-muted-foreground")})},p))})]})},Yo=g.forwardRef(({className:e,...t},n)=>b.jsx("textarea",{className:I("flex min-h-[80px] w-full rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),ref:n,...t}));Yo.displayName="Textarea";function ot(e){const t=g.useRef(e);return g.useEffect(()=>{t.current=e}),g.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}function Cl(e,t=globalThis==null?void 0:globalThis.document){const n=ot(e);g.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 Sl="DismissableLayer",Ln="dismissableLayer.update",El="dismissableLayer.pointerDownOutside",kl="dismissableLayer.focusOutside",zo,Ro=g.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),$n=g.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:i,onDismiss:a,...c}=e,l=g.useContext(Ro),[u,d]=g.useState(null),h=(u==null?void 0:u.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,p]=g.useState({}),x=Z(t,E=>d(E)),f=Array.from(l.layers),[y]=[...l.layersWithOutsidePointerEventsDisabled].slice(-1),m=f.indexOf(y),v=u?f.indexOf(u):-1,w=l.layersWithOutsidePointerEventsDisabled.size>0,S=v>=m,C=Ol(E=>{const O=E.target,_=[...l.branches].some(T=>T.contains(O));!S||_||(o==null||o(E),i==null||i(E),E.defaultPrevented||a==null||a())},h),M=Pl(E=>{const O=E.target;[...l.branches].some(T=>T.contains(O))||(s==null||s(E),i==null||i(E),E.defaultPrevented||a==null||a())},h);return Cl(E=>{v===l.layers.size-1&&(r==null||r(E),!E.defaultPrevented&&a&&(E.preventDefault(),a()))},h),g.useEffect(()=>{if(u)return n&&(l.layersWithOutsidePointerEventsDisabled.size===0&&(zo=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),l.layersWithOutsidePointerEventsDisabled.add(u)),l.layers.add(u),jo(),()=>{n&&l.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=zo)}},[u,h,n,l]),g.useEffect(()=>()=>{u&&(l.layers.delete(u),l.layersWithOutsidePointerEventsDisabled.delete(u),jo())},[u,l]),g.useEffect(()=>{const E=()=>p({});return document.addEventListener(Ln,E),()=>document.removeEventListener(Ln,E)},[]),b.jsx(q.div,{...c,ref:x,style:{pointerEvents:w?S?"auto":"none":void 0,...e.style},onFocusCapture:U(e.onFocusCapture,M.onFocusCapture),onBlurCapture:U(e.onBlurCapture,M.onBlurCapture),onPointerDownCapture:U(e.onPointerDownCapture,C.onPointerDownCapture)})});$n.displayName=Sl;var Ml="DismissableLayerBranch",Nl=g.forwardRef((e,t)=>{const n=g.useContext(Ro),r=g.useRef(null),o=Z(t,r);return g.useEffect(()=>{const s=r.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),b.jsx(q.div,{...e,ref:o})});Nl.displayName=Ml;function Ol(e,t=globalThis==null?void 0:globalThis.document){const n=ot(e),r=g.useRef(!1),o=g.useRef(()=>{});return g.useEffect(()=>{const s=a=>{if(a.target&&!r.current){let c=function(){Uo(El,n,l,{discrete:!0})};const l={originalEvent:a};a.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",s)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",s),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Pl(e,t=globalThis==null?void 0:globalThis.document){const n=ot(e),r=g.useRef(!1);return g.useEffect(()=>{const o=s=>{s.target&&!r.current&&Uo(kl,n,{originalEvent:s},{discrete:!1})};return t.addEventListener("focusin",o),()=>t.removeEventListener("focusin",o)},[t,n]),{onFocusCapture:()=>r.current=!0,onBlurCapture:()=>r.current=!1}}function jo(){const e=new CustomEvent(Ln);document.dispatchEvent(e)}function Uo(e,t,n,{discrete:r}){const o=n.originalEvent.target,s=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?$c(o,s):o.dispatchEvent(s)}var Hn=0;function qo(){g.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Go()),document.body.insertAdjacentElement("beforeend",e[1]??Go()),Hn++,()=>{Hn===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),Hn--}},[])}function Go(){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 Vn="focusScope.autoFocusOnMount",Yn="focusScope.autoFocusOnUnmount",Ko={bubbles:!1,cancelable:!0},Dl="FocusScope",zn=g.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:s,...i}=e,[a,c]=g.useState(null),l=ot(o),u=ot(s),d=g.useRef(null),h=Z(t,f=>c(f)),p=g.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;g.useEffect(()=>{if(r){let f=function(w){if(p.paused||!a)return;const S=w.target;a.contains(S)?d.current=S:Ge(d.current,{select:!0})},y=function(w){if(p.paused||!a)return;const S=w.relatedTarget;S!==null&&(a.contains(S)||Ge(d.current,{select:!0}))},m=function(w){if(document.activeElement===document.body)for(const C of w)C.removedNodes.length>0&&Ge(a)};document.addEventListener("focusin",f),document.addEventListener("focusout",y);const v=new MutationObserver(m);return a&&v.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",f),document.removeEventListener("focusout",y),v.disconnect()}}},[r,a,p.paused]),g.useEffect(()=>{if(a){Zo.add(p);const f=document.activeElement;if(!a.contains(f)){const m=new CustomEvent(Vn,Ko);a.addEventListener(Vn,l),a.dispatchEvent(m),m.defaultPrevented||(Tl(Il(Xo(a)),{select:!0}),document.activeElement===f&&Ge(a))}return()=>{a.removeEventListener(Vn,l),setTimeout(()=>{const m=new CustomEvent(Yn,Ko);a.addEventListener(Yn,u),a.dispatchEvent(m),m.defaultPrevented||Ge(f??document.body,{select:!0}),a.removeEventListener(Yn,u),Zo.remove(p)},0)}}},[a,l,u,p]);const x=g.useCallback(f=>{if(!n&&!r||p.paused)return;const y=f.key==="Tab"&&!f.altKey&&!f.ctrlKey&&!f.metaKey,m=document.activeElement;if(y&&m){const v=f.currentTarget,[w,S]=Al(v);w&&S?!f.shiftKey&&m===S?(f.preventDefault(),n&&Ge(w,{select:!0})):f.shiftKey&&m===w&&(f.preventDefault(),n&&Ge(S,{select:!0})):m===v&&f.preventDefault()}},[n,r,p.paused]);return b.jsx(q.div,{tabIndex:-1,...i,ref:h,onKeyDown:x})});zn.displayName=Dl;function Tl(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Ge(r,{select:t}),document.activeElement!==n)return}function Al(e){const t=Xo(e),n=Qo(t,e),r=Qo(t.reverse(),e);return[n,r]}function Xo(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 Qo(e,t){for(const n of e)if(!Wl(n,{upTo:t}))return n}function Wl(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 _l(e){return e instanceof HTMLInputElement&&"select"in e}function Ge(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&_l(e)&&t&&e.select()}}var Zo=Fl();function Fl(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=Jo(e,t),e.unshift(t)},remove(t){var n;e=Jo(e,t),(n=e[0])==null||n.resume()}}}function Jo(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Il(e){return e.filter(t=>t.tagName!=="A")}var Bl=g[" useId ".trim().toString()]||(()=>{}),Ll=0;function Zt(e){const[t,n]=g.useState(Bl());return ue(()=>{n(r=>r??String(Ll++))},[e]),t?`radix-${t}`:""}const $l=["top","right","bottom","left"],Ke=Math.min,ge=Math.max,Jt=Math.round,en=Math.floor,Pe=e=>({x:e,y:e}),Hl={left:"right",right:"left",bottom:"top",top:"bottom"},Vl={start:"end",end:"start"};function Rn(e,t,n){return ge(e,Ke(t,n))}function Le(e,t){return typeof e=="function"?e(t):e}function $e(e){return e.split("-")[0]}function vt(e){return e.split("-")[1]}function jn(e){return e==="x"?"y":"x"}function Un(e){return e==="y"?"height":"width"}function He(e){return["top","bottom"].includes($e(e))?"y":"x"}function qn(e){return jn(He(e))}function Yl(e,t,n){n===void 0&&(n=!1);const r=vt(e),o=qn(e),s=Un(o);let i=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(i=tn(i)),[i,tn(i)]}function zl(e){const t=tn(e);return[Gn(e),t,Gn(t)]}function Gn(e){return e.replace(/start|end/g,t=>Vl[t])}function Rl(e,t,n){const r=["left","right"],o=["right","left"],s=["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?s:i;default:return[]}}function jl(e,t,n,r){const o=vt(e);let s=Rl($e(e),n==="start",r);return o&&(s=s.map(i=>i+"-"+o),t&&(s=s.concat(s.map(Gn)))),s}function tn(e){return e.replace(/left|right|bottom|top/g,t=>Hl[t])}function Ul(e){return{top:0,right:0,bottom:0,left:0,...e}}function es(e){return typeof e!="number"?Ul(e):{top:e,right:e,bottom:e,left:e}}function nn(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 ts(e,t,n){let{reference:r,floating:o}=e;const s=He(t),i=qn(t),a=Un(i),c=$e(t),l=s==="y",u=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,h=r[a]/2-o[a]/2;let p;switch(c){case"top":p={x:u,y:r.y-o.height};break;case"bottom":p={x:u,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:d};break;case"left":p={x:r.x-o.width,y:d};break;default:p={x:r.x,y:r.y}}switch(vt(t)){case"start":p[i]-=h*(n&&l?-1:1);break;case"end":p[i]+=h*(n&&l?-1:1);break}return p}const ql=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:s=[],platform:i}=n,a=s.filter(Boolean),c=await(i.isRTL==null?void 0:i.isRTL(t));let l=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:d}=ts(l,r,c),h=r,p={},x=0;for(let f=0;f<a.length;f++){const{name:y,fn:m}=a[f],{x:v,y:w,data:S,reset:C}=await m({x:u,y:d,initialPlacement:r,placement:h,strategy:o,middlewareData:p,rects:l,platform:i,elements:{reference:e,floating:t}});u=v??u,d=w??d,p={...p,[y]:{...p[y],...S}},C&&x<=50&&(x++,typeof C=="object"&&(C.placement&&(h=C.placement),C.rects&&(l=C.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:o}):C.rects),{x:u,y:d}=ts(l,h,c)),f=-1)}return{x:u,y:d,placement:h,strategy:o,middlewareData:p}};async function Ft(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:s,rects:i,elements:a,strategy:c}=e,{boundary:l="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:h=!1,padding:p=0}=Le(t,e),x=es(p),y=a[h?d==="floating"?"reference":"floating":d],m=nn(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(y)))==null||n?y:y.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:l,rootBoundary:u,strategy:c})),v=d==="floating"?{x:r,y:o,width:i.floating.width,height:i.floating.height}:i.reference,w=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),S=await(s.isElement==null?void 0:s.isElement(w))?await(s.getScale==null?void 0:s.getScale(w))||{x:1,y:1}:{x:1,y:1},C=nn(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:v,offsetParent:w,strategy:c}):v);return{top:(m.top-C.top+x.top)/S.y,bottom:(C.bottom-m.bottom+x.bottom)/S.y,left:(m.left-C.left+x.left)/S.x,right:(C.right-m.right+x.right)/S.x}}const Gl=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:s,platform:i,elements:a,middlewareData:c}=t,{element:l,padding:u=0}=Le(e,t)||{};if(l==null)return{};const d=es(u),h={x:n,y:r},p=qn(o),x=Un(p),f=await i.getDimensions(l),y=p==="y",m=y?"top":"left",v=y?"bottom":"right",w=y?"clientHeight":"clientWidth",S=s.reference[x]+s.reference[p]-h[p]-s.floating[x],C=h[p]-s.reference[p],M=await(i.getOffsetParent==null?void 0:i.getOffsetParent(l));let E=M?M[w]:0;(!E||!await(i.isElement==null?void 0:i.isElement(M)))&&(E=a.floating[w]||s.floating[x]);const O=S/2-C/2,_=E/2-f[x]/2-1,T=Ke(d[m],_),D=Ke(d[v],_),N=T,B=E-f[x]-D,z=E/2-f[x]/2+O,Y=Rn(N,z,B),L=!c.arrow&&vt(o)!=null&&z!==Y&&s.reference[x]/2-(z<N?T:D)-f[x]/2<0,V=L?z<N?z-N:z-B:0;return{[p]:h[p]+V,data:{[p]:Y,centerOffset:z-Y-V,...L&&{alignmentOffset:V}},reset:L}}}),Kl=function(e){return e===void 0&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:s,rects:i,initialPlacement:a,platform:c,elements:l}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:h,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:x="none",flipAlignment:f=!0,...y}=Le(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const m=$e(o),v=He(a),w=$e(a)===a,S=await(c.isRTL==null?void 0:c.isRTL(l.floating)),C=h||(w||!f?[tn(a)]:zl(a)),M=x!=="none";!h&&M&&C.push(...jl(a,f,x,S));const E=[a,...C],O=await Ft(t,y),_=[];let T=((r=s.flip)==null?void 0:r.overflows)||[];if(u&&_.push(O[m]),d){const Y=Yl(o,i,S);_.push(O[Y[0]],O[Y[1]])}if(T=[...T,{placement:o,overflows:_}],!_.every(Y=>Y<=0)){var D,N;const Y=(((D=s.flip)==null?void 0:D.index)||0)+1,L=E[Y];if(L){var B;const P=d==="alignment"?v!==He(L):!1,F=((B=T[0])==null?void 0:B.overflows[0])>0;if(!P||F)return{data:{index:Y,overflows:T},reset:{placement:L}}}let V=(N=T.filter(P=>P.overflows[0]<=0).sort((P,F)=>P.overflows[1]-F.overflows[1])[0])==null?void 0:N.placement;if(!V)switch(p){case"bestFit":{var z;const P=(z=T.filter(F=>{if(M){const j=He(F.placement);return j===v||j==="y"}return!0}).map(F=>[F.placement,F.overflows.filter(j=>j>0).reduce((j,oe)=>j+oe,0)]).sort((F,j)=>F[1]-j[1])[0])==null?void 0:z[0];P&&(V=P);break}case"initialPlacement":V=a;break}if(o!==V)return{reset:{placement:V}}}return{}}}};function ns(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function rs(e){return $l.some(t=>e[t]>=0)}const Xl=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=Le(e,t);switch(r){case"referenceHidden":{const s=await Ft(t,{...o,elementContext:"reference"}),i=ns(s,n.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:rs(i)}}}case"escaped":{const s=await Ft(t,{...o,altBoundary:!0}),i=ns(s,n.floating);return{data:{escapedOffsets:i,escaped:rs(i)}}}default:return{}}}}};async function Ql(e,t){const{placement:n,platform:r,elements:o}=e,s=await(r.isRTL==null?void 0:r.isRTL(o.floating)),i=$e(n),a=vt(n),c=He(n)==="y",l=["left","top"].includes(i)?-1:1,u=s&&c?-1:1,d=Le(t,e);let{mainAxis:h,crossAxis:p,alignmentAxis:x}=typeof d=="number"?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return a&&typeof x=="number"&&(p=a==="end"?x*-1:x),c?{x:p*u,y:h*l}:{x:h*l,y:p*u}}const Zl=function(e){return e===void 0&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:s,placement:i,middlewareData:a}=t,c=await Ql(t,e);return i===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:o+c.x,y:s+c.y,data:{...c,placement:i}}}}},Jl=function(e){return e===void 0&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:s=!0,crossAxis:i=!1,limiter:a={fn:y=>{let{x:m,y:v}=y;return{x:m,y:v}}},...c}=Le(e,t),l={x:n,y:r},u=await Ft(t,c),d=He($e(o)),h=jn(d);let p=l[h],x=l[d];if(s){const y=h==="y"?"top":"left",m=h==="y"?"bottom":"right",v=p+u[y],w=p-u[m];p=Rn(v,p,w)}if(i){const y=d==="y"?"top":"left",m=d==="y"?"bottom":"right",v=x+u[y],w=x-u[m];x=Rn(v,x,w)}const f=a.fn({...t,[h]:p,[d]:x});return{...f,data:{x:f.x-n,y:f.y-r,enabled:{[h]:s,[d]:i}}}}}},ed=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:s,middlewareData:i}=t,{offset:a=0,mainAxis:c=!0,crossAxis:l=!0}=Le(e,t),u={x:n,y:r},d=He(o),h=jn(d);let p=u[h],x=u[d];const f=Le(a,t),y=typeof f=="number"?{mainAxis:f,crossAxis:0}:{mainAxis:0,crossAxis:0,...f};if(c){const w=h==="y"?"height":"width",S=s.reference[h]-s.floating[w]+y.mainAxis,C=s.reference[h]+s.reference[w]-y.mainAxis;p<S?p=S:p>C&&(p=C)}if(l){var m,v;const w=h==="y"?"width":"height",S=["top","left"].includes($e(o)),C=s.reference[d]-s.floating[w]+(S&&((m=i.offset)==null?void 0:m[d])||0)+(S?0:y.crossAxis),M=s.reference[d]+s.reference[w]+(S?0:((v=i.offset)==null?void 0:v[d])||0)-(S?y.crossAxis:0);x<C?x=C:x>M&&(x=M)}return{[h]:p,[d]:x}}}},td=function(e){return e===void 0&&(e={}),{name:"size",options:e,async fn(t){var n,r;const{placement:o,rects:s,platform:i,elements:a}=t,{apply:c=()=>{},...l}=Le(e,t),u=await Ft(t,l),d=$e(o),h=vt(o),p=He(o)==="y",{width:x,height:f}=s.floating;let y,m;d==="top"||d==="bottom"?(y=d,m=h===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?"start":"end")?"left":"right"):(m=d,y=h==="end"?"top":"bottom");const v=f-u.top-u.bottom,w=x-u.left-u.right,S=Ke(f-u[y],v),C=Ke(x-u[m],w),M=!t.middlewareData.shift;let E=S,O=C;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(O=w),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(E=v),M&&!h){const T=ge(u.left,0),D=ge(u.right,0),N=ge(u.top,0),B=ge(u.bottom,0);p?O=x-2*(T!==0||D!==0?T+D:ge(u.left,u.right)):E=f-2*(N!==0||B!==0?N+B:ge(u.top,u.bottom))}await c({...t,availableWidth:O,availableHeight:E});const _=await i.getDimensions(a.floating);return x!==_.width||f!==_.height?{reset:{rects:!0}}:{}}}};function rn(){return typeof window<"u"}function yt(e){return os(e)?(e.nodeName||"").toLowerCase():"#document"}function ve(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function De(e){var t;return(t=(os(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function os(e){return rn()?e instanceof Node||e instanceof ve(e).Node:!1}function Ce(e){return rn()?e instanceof Element||e instanceof ve(e).Element:!1}function Te(e){return rn()?e instanceof HTMLElement||e instanceof ve(e).HTMLElement:!1}function ss(e){return!rn()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof ve(e).ShadowRoot}function It(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Se(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function nd(e){return["table","td","th"].includes(yt(e))}function on(e){return[":popover-open",":modal"].some(t=>{try{return e.matches(t)}catch{return!1}})}function Kn(e){const t=Xn(),n=Ce(e)?Se(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 rd(e){let t=Xe(e);for(;Te(t)&&!bt(t);){if(Kn(t))return t;if(on(t))return null;t=Xe(t)}return null}function Xn(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}function bt(e){return["html","body","#document"].includes(yt(e))}function Se(e){return ve(e).getComputedStyle(e)}function sn(e){return Ce(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Xe(e){if(yt(e)==="html")return e;const t=e.assignedSlot||e.parentNode||ss(e)&&e.host||De(e);return ss(t)?t.host:t}function as(e){const t=Xe(e);return bt(t)?e.ownerDocument?e.ownerDocument.body:e.body:Te(t)&&It(t)?t:as(t)}function Bt(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=as(e),s=o===((r=e.ownerDocument)==null?void 0:r.body),i=ve(o);if(s){const a=Qn(i);return t.concat(i,i.visualViewport||[],It(o)?o:[],a&&n?Bt(a):[])}return t.concat(o,Bt(o,[],n))}function Qn(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function is(e){const t=Se(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Te(e),s=o?e.offsetWidth:n,i=o?e.offsetHeight:r,a=Jt(n)!==s||Jt(r)!==i;return a&&(n=s,r=i),{width:n,height:r,$:a}}function Zn(e){return Ce(e)?e:e.contextElement}function wt(e){const t=Zn(e);if(!Te(t))return Pe(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:s}=is(t);let i=(s?Jt(n.width):n.width)/r,a=(s?Jt(n.height):n.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!a||!Number.isFinite(a))&&(a=1),{x:i,y:a}}const od=Pe(0);function cs(e){const t=ve(e);return!Xn()||!t.visualViewport?od:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function sd(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==ve(e)?!1:t}function st(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),s=Zn(e);let i=Pe(1);t&&(r?Ce(r)&&(i=wt(r)):i=wt(e));const a=sd(s,n,r)?cs(s):Pe(0);let c=(o.left+a.x)/i.x,l=(o.top+a.y)/i.y,u=o.width/i.x,d=o.height/i.y;if(s){const h=ve(s),p=r&&Ce(r)?ve(r):r;let x=h,f=Qn(x);for(;f&&r&&p!==x;){const y=wt(f),m=f.getBoundingClientRect(),v=Se(f),w=m.left+(f.clientLeft+parseFloat(v.paddingLeft))*y.x,S=m.top+(f.clientTop+parseFloat(v.paddingTop))*y.y;c*=y.x,l*=y.y,u*=y.x,d*=y.y,c+=w,l+=S,x=ve(f),f=Qn(x)}}return nn({width:u,height:d,x:c,y:l})}function Jn(e,t){const n=sn(e).scrollLeft;return t?t.left+n:st(De(e)).left+n}function ls(e,t,n){n===void 0&&(n=!1);const r=e.getBoundingClientRect(),o=r.left+t.scrollLeft-(n?0:Jn(e,r)),s=r.top+t.scrollTop;return{x:o,y:s}}function ad(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const s=o==="fixed",i=De(r),a=t?on(t.floating):!1;if(r===i||a&&s)return n;let c={scrollLeft:0,scrollTop:0},l=Pe(1);const u=Pe(0),d=Te(r);if((d||!d&&!s)&&((yt(r)!=="body"||It(i))&&(c=sn(r)),Te(r))){const p=st(r);l=wt(r),u.x=p.x+r.clientLeft,u.y=p.y+r.clientTop}const h=i&&!d&&!s?ls(i,c,!0):Pe(0);return{width:n.width*l.x,height:n.height*l.y,x:n.x*l.x-c.scrollLeft*l.x+u.x+h.x,y:n.y*l.y-c.scrollTop*l.y+u.y+h.y}}function id(e){return Array.from(e.getClientRects())}function cd(e){const t=De(e),n=sn(e),r=e.ownerDocument.body,o=ge(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=ge(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+Jn(e);const a=-n.scrollTop;return Se(r).direction==="rtl"&&(i+=ge(t.clientWidth,r.clientWidth)-o),{width:o,height:s,x:i,y:a}}function ld(e,t){const n=ve(e),r=De(e),o=n.visualViewport;let s=r.clientWidth,i=r.clientHeight,a=0,c=0;if(o){s=o.width,i=o.height;const l=Xn();(!l||l&&t==="fixed")&&(a=o.offsetLeft,c=o.offsetTop)}return{width:s,height:i,x:a,y:c}}function dd(e,t){const n=st(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,s=Te(e)?wt(e):Pe(1),i=e.clientWidth*s.x,a=e.clientHeight*s.y,c=o*s.x,l=r*s.y;return{width:i,height:a,x:c,y:l}}function ds(e,t,n){let r;if(t==="viewport")r=ld(e,n);else if(t==="document")r=cd(De(e));else if(Ce(t))r=dd(t,n);else{const o=cs(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return nn(r)}function us(e,t){const n=Xe(e);return n===t||!Ce(n)||bt(n)?!1:Se(n).position==="fixed"||us(n,t)}function ud(e,t){const n=t.get(e);if(n)return n;let r=Bt(e,[],!1).filter(a=>Ce(a)&&yt(a)!=="body"),o=null;const s=Se(e).position==="fixed";let i=s?Xe(e):e;for(;Ce(i)&&!bt(i);){const a=Se(i),c=Kn(i);!c&&a.position==="fixed"&&(o=null),(s?!c&&!o:!c&&a.position==="static"&&!!o&&["absolute","fixed"].includes(o.position)||It(i)&&!c&&us(e,i))?r=r.filter(u=>u!==i):o=a,i=Xe(i)}return t.set(e,r),r}function fd(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[...n==="clippingAncestors"?on(t)?[]:ud(t,this._c):[].concat(n),r],a=i[0],c=i.reduce((l,u)=>{const d=ds(t,u,o);return l.top=ge(d.top,l.top),l.right=Ke(d.right,l.right),l.bottom=Ke(d.bottom,l.bottom),l.left=ge(d.left,l.left),l},ds(t,a,o));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}}function hd(e){const{width:t,height:n}=is(e);return{width:t,height:n}}function md(e,t,n){const r=Te(t),o=De(t),s=n==="fixed",i=st(e,!0,s,t);let a={scrollLeft:0,scrollTop:0};const c=Pe(0);function l(){c.x=Jn(o)}if(r||!r&&!s)if((yt(t)!=="body"||It(o))&&(a=sn(t)),r){const p=st(t,!0,s,t);c.x=p.x+t.clientLeft,c.y=p.y+t.clientTop}else o&&l();s&&!r&&o&&l();const u=o&&!r&&!s?ls(o,a):Pe(0),d=i.left+a.scrollLeft-c.x-u.x,h=i.top+a.scrollTop-c.y-u.y;return{x:d,y:h,width:i.width,height:i.height}}function er(e){return Se(e).position==="static"}function fs(e,t){if(!Te(e)||Se(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return De(e)===n&&(n=n.ownerDocument.body),n}function hs(e,t){const n=ve(e);if(on(e))return n;if(!Te(e)){let o=Xe(e);for(;o&&!bt(o);){if(Ce(o)&&!er(o))return o;o=Xe(o)}return n}let r=fs(e,t);for(;r&&nd(r)&&er(r);)r=fs(r,t);return r&&bt(r)&&er(r)&&!Kn(r)?n:r||rd(e)||n}const pd=async function(e){const t=this.getOffsetParent||hs,n=this.getDimensions,r=await n(e.floating);return{reference:md(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function gd(e){return Se(e).direction==="rtl"}const vd={convertOffsetParentRelativeRectToViewportRelativeRect:ad,getDocumentElement:De,getClippingRect:fd,getOffsetParent:hs,getElementRects:pd,getClientRects:id,getDimensions:hd,getScale:wt,isElement:Ce,isRTL:gd};function ms(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function yd(e,t){let n=null,r;const o=De(e);function s(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function i(a,c){a===void 0&&(a=!1),c===void 0&&(c=1),s();const l=e.getBoundingClientRect(),{left:u,top:d,width:h,height:p}=l;if(a||t(),!h||!p)return;const x=en(d),f=en(o.clientWidth-(u+h)),y=en(o.clientHeight-(d+p)),m=en(u),w={rootMargin:-x+"px "+-f+"px "+-y+"px "+-m+"px",threshold:ge(0,Ke(1,c))||1};let S=!0;function C(M){const E=M[0].intersectionRatio;if(E!==c){if(!S)return i();E?i(!1,E):r=setTimeout(()=>{i(!1,1e-7)},1e3)}E===1&&!ms(l,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),s}function bd(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:s=!0,elementResize:i=typeof ResizeObserver=="function",layoutShift:a=typeof IntersectionObserver=="function",animationFrame:c=!1}=r,l=Zn(e),u=o||s?[...l?Bt(l):[],...Bt(t)]:[];u.forEach(m=>{o&&m.addEventListener("scroll",n,{passive:!0}),s&&m.addEventListener("resize",n)});const d=l&&a?yd(l,n):null;let h=-1,p=null;i&&(p=new ResizeObserver(m=>{let[v]=m;v&&v.target===l&&p&&(p.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var w;(w=p)==null||w.observe(t)})),n()}),l&&!c&&p.observe(l),p.observe(t));let x,f=c?st(e):null;c&&y();function y(){const m=st(e);f&&!ms(f,m)&&n(),f=m,x=requestAnimationFrame(y)}return n(),()=>{var m;u.forEach(v=>{o&&v.removeEventListener("scroll",n),s&&v.removeEventListener("resize",n)}),d==null||d(),(m=p)==null||m.disconnect(),p=null,c&&cancelAnimationFrame(x)}}const wd=Zl,xd=Jl,Cd=Kl,Sd=td,Ed=Xl,ps=Gl,kd=ed,Md=(e,t,n)=>{const r=new Map,o={platform:vd,...n},s={...o.platform,_c:r};return ql(e,t,{...o,platform:s})};var an=typeof document<"u"?k.useLayoutEffect:k.useEffect;function cn(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(!cn(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 s=o[r];if(!(s==="_owner"&&e.$$typeof)&&!cn(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function gs(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function vs(e,t){const n=gs(e);return Math.round(t*n)/n}function tr(e){const t=g.useRef(e);return an(()=>{t.current=e}),t}function Nd(e){e===void 0&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:o,elements:{reference:s,floating:i}={},transform:a=!0,whileElementsMounted:c,open:l}=e,[u,d]=g.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,p]=g.useState(r);cn(h,r)||p(r);const[x,f]=g.useState(null),[y,m]=g.useState(null),v=g.useCallback(P=>{P!==M.current&&(M.current=P,f(P))},[]),w=g.useCallback(P=>{P!==E.current&&(E.current=P,m(P))},[]),S=s||x,C=i||y,M=g.useRef(null),E=g.useRef(null),O=g.useRef(u),_=c!=null,T=tr(c),D=tr(o),N=tr(l),B=g.useCallback(()=>{if(!M.current||!E.current)return;const P={placement:t,strategy:n,middleware:h};D.current&&(P.platform=D.current),Md(M.current,E.current,P).then(F=>{const j={...F,isPositioned:N.current!==!1};z.current&&!cn(O.current,j)&&(O.current=j,Kt.flushSync(()=>{d(j)}))})},[h,t,n,D,N]);an(()=>{l===!1&&O.current.isPositioned&&(O.current.isPositioned=!1,d(P=>({...P,isPositioned:!1})))},[l]);const z=g.useRef(!1);an(()=>(z.current=!0,()=>{z.current=!1}),[]),an(()=>{if(S&&(M.current=S),C&&(E.current=C),S&&C){if(T.current)return T.current(S,C,B);B()}},[S,C,B,T,_]);const Y=g.useMemo(()=>({reference:M,floating:E,setReference:v,setFloating:w}),[v,w]),L=g.useMemo(()=>({reference:S,floating:C}),[S,C]),V=g.useMemo(()=>{const P={position:n,left:0,top:0};if(!L.floating)return P;const F=vs(L.floating,u.x),j=vs(L.floating,u.y);return a?{...P,transform:"translate("+F+"px, "+j+"px)",...gs(L.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:F,top:j}},[n,a,L.floating,u.x,u.y]);return g.useMemo(()=>({...u,update:B,refs:Y,elements:L,floatingStyles:V}),[u,B,Y,L,V])}const Od=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?ps({element:r.current,padding:o}).fn(n):{}:r?ps({element:r,padding:o}).fn(n):{}}}},Pd=(e,t)=>({...wd(e),options:[e,t]}),Dd=(e,t)=>({...xd(e),options:[e,t]}),Td=(e,t)=>({...kd(e),options:[e,t]}),Ad=(e,t)=>({...Cd(e),options:[e,t]}),Wd=(e,t)=>({...Sd(e),options:[e,t]}),_d=(e,t)=>({...Ed(e),options:[e,t]}),Fd=(e,t)=>({...Od(e),options:[e,t]});var Id="Arrow",ys=g.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...s}=e;return b.jsx(q.svg,{...s,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:b.jsx("polygon",{points:"0,0 30,0 15,10"})})});ys.displayName=Id;var Bd=ys,nr="Popper",[bs,ln]=pt(nr),[Ld,ws]=bs(nr),xs=e=>{const{__scopePopper:t,children:n}=e,[r,o]=g.useState(null);return b.jsx(Ld,{scope:t,anchor:r,onAnchorChange:o,children:n})};xs.displayName=nr;var Cs="PopperAnchor",Ss=g.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,s=ws(Cs,n),i=g.useRef(null),a=Z(t,i);return g.useEffect(()=>{s.onAnchorChange((r==null?void 0:r.current)||i.current)}),r?null:b.jsx(q.div,{...o,ref:a})});Ss.displayName=Cs;var rr="PopperContent",[$d,Hd]=bs(rr),Es=g.forwardRef((e,t)=>{var $,ee,ce,te,G,K;const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:s="center",alignOffset:i=0,arrowPadding:a=0,avoidCollisions:c=!0,collisionBoundary:l=[],collisionPadding:u=0,sticky:d="partial",hideWhenDetached:h=!1,updatePositionStrategy:p="optimized",onPlaced:x,...f}=e,y=ws(rr,n),[m,v]=g.useState(null),w=Z(t,me=>v(me)),[S,C]=g.useState(null),M=Wn(S),E=(M==null?void 0:M.width)??0,O=(M==null?void 0:M.height)??0,_=r+(s!=="center"?"-"+s:""),T=typeof u=="number"?u:{top:0,right:0,bottom:0,left:0,...u},D=Array.isArray(l)?l:[l],N=D.length>0,B={padding:T,boundary:D.filter(Yd),altBoundary:N},{refs:z,floatingStyles:Y,placement:L,isPositioned:V,middlewareData:P}=Nd({strategy:"fixed",placement:_,whileElementsMounted:(...me)=>bd(...me,{animationFrame:p==="always"}),elements:{reference:y.anchor},middleware:[Pd({mainAxis:o+O,alignmentAxis:i}),c&&Dd({mainAxis:!0,crossAxis:!1,limiter:d==="partial"?Td():void 0,...B}),c&&Ad({...B}),Wd({...B,apply:({elements:me,rects:we,availableWidth:lt,availableHeight:dt})=>{const{width:ut,height:Fr}=we.reference,Dt=me.floating.style;Dt.setProperty("--radix-popper-available-width",`${lt}px`),Dt.setProperty("--radix-popper-available-height",`${dt}px`),Dt.setProperty("--radix-popper-anchor-width",`${ut}px`),Dt.setProperty("--radix-popper-anchor-height",`${Fr}px`)}}),S&&Fd({element:S,padding:a}),zd({arrowWidth:E,arrowHeight:O}),h&&_d({strategy:"referenceHidden",...B})]}),[F,j]=Ns(L),oe=ot(x);ue(()=>{V&&(oe==null||oe())},[V,oe]);const Me=($=P.arrow)==null?void 0:$.x,Ne=(ee=P.arrow)==null?void 0:ee.y,be=((ce=P.arrow)==null?void 0:ce.centerOffset)!==0,[Re,xe]=g.useState();return ue(()=>{m&&xe(window.getComputedStyle(m).zIndex)},[m]),b.jsx("div",{ref:z.setFloating,"data-radix-popper-content-wrapper":"",style:{...Y,transform:V?Y.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:Re,"--radix-popper-transform-origin":[(te=P.transformOrigin)==null?void 0:te.x,(G=P.transformOrigin)==null?void 0:G.y].join(" "),...((K=P.hide)==null?void 0:K.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:b.jsx($d,{scope:n,placedSide:F,onArrowChange:C,arrowX:Me,arrowY:Ne,shouldHideArrow:be,children:b.jsx(q.div,{"data-side":F,"data-align":j,...f,ref:w,style:{...f.style,animation:V?void 0:"none"}})})})});Es.displayName=rr;var ks="PopperArrow",Vd={top:"bottom",right:"left",bottom:"top",left:"right"},Ms=g.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,s=Hd(ks,r),i=Vd[s.placedSide];return b.jsx("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[i]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0},children:b.jsx(Bd,{...o,ref:n,style:{...o.style,display:"block"}})})});Ms.displayName=ks;function Yd(e){return e!==null}var zd=e=>({name:"transformOrigin",options:e,fn(t){var y,m,v;const{placement:n,rects:r,middlewareData:o}=t,i=((y=o.arrow)==null?void 0:y.centerOffset)!==0,a=i?0:e.arrowWidth,c=i?0:e.arrowHeight,[l,u]=Ns(n),d={start:"0%",center:"50%",end:"100%"}[u],h=(((m=o.arrow)==null?void 0:m.x)??0)+a/2,p=(((v=o.arrow)==null?void 0:v.y)??0)+c/2;let x="",f="";return l==="bottom"?(x=i?d:`${h}px`,f=`${-c}px`):l==="top"?(x=i?d:`${h}px`,f=`${r.floating.height+c}px`):l==="right"?(x=`${-c}px`,f=i?d:`${p}px`):l==="left"&&(x=`${r.floating.width+c}px`,f=i?d:`${p}px`),{data:{x,y:f}}}});function Ns(e){const[t,n="center"]=e.split("-");return[t,n]}var Os=xs,or=Ss,Ps=Es,Ds=Ms,Rd="Portal",sr=g.forwardRef((e,t)=>{var a;const{container:n,...r}=e,[o,s]=g.useState(!1);ue(()=>s(!0),[]);const i=n||o&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return i?Hr.createPortal(b.jsx(q.div,{...r,ref:t}),i):null});sr.displayName=Rd;var Ts=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"}),jd="VisuallyHidden",Ud=g.forwardRef((e,t)=>b.jsx(q.span,{...e,ref:t,style:{...Ts,...e.style}}));Ud.displayName=jd;var qd=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},xt=new WeakMap,dn=new WeakMap,un={},ar=0,As=function(e){return e&&(e.host||As(e.parentNode))},Gd=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=As(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})},Kd=function(e,t,n,r){var o=Gd(t,Array.isArray(e)?e:[e]);un[n]||(un[n]=new WeakMap);var s=un[n],i=[],a=new Set,c=new Set(o),l=function(d){!d||a.has(d)||(a.add(d),l(d.parentNode))};o.forEach(l);var u=function(d){!d||c.has(d)||Array.prototype.forEach.call(d.children,function(h){if(a.has(h))u(h);else try{var p=h.getAttribute(r),x=p!==null&&p!=="false",f=(xt.get(h)||0)+1,y=(s.get(h)||0)+1;xt.set(h,f),s.set(h,y),i.push(h),f===1&&x&&dn.set(h,!0),y===1&&h.setAttribute(n,"true"),x||h.setAttribute(r,"true")}catch(m){console.error("aria-hidden: cannot operate on ",h,m)}})};return u(t),a.clear(),ar++,function(){i.forEach(function(d){var h=xt.get(d)-1,p=s.get(d)-1;xt.set(d,h),s.set(d,p),h||(dn.has(d)||d.removeAttribute(r),dn.delete(d)),p||d.removeAttribute(n)}),ar--,ar||(xt=new WeakMap,xt=new WeakMap,dn=new WeakMap,un={})}},Ws=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=qd(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),Kd(r,o,n,"aria-hidden")):function(){return null}},Ae=function(){return Ae=Object.assign||function(t){for(var n,r=1,o=arguments.length;r<o;r++){n=arguments[r];for(var s in n)Object.prototype.hasOwnProperty.call(n,s)&&(t[s]=n[s])}return t},Ae.apply(this,arguments)};function _s(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 Xd(e,t,n){if(n||arguments.length===2)for(var r=0,o=t.length,s;r<o;r++)(s||!(r in t))&&(s||(s=Array.prototype.slice.call(t,0,r)),s[r]=t[r]);return e.concat(s||Array.prototype.slice.call(t))}typeof SuppressedError=="function"&&SuppressedError;var fn="right-scroll-bar-position",hn="width-before-scroll-bar",Qd="with-scroll-bars-hidden",Zd="--removed-body-scroll-bar-size";function ir(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function Jd(e,t){var n=k.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 eu=typeof window<"u"?g.useLayoutEffect:g.useEffect,Fs=new WeakMap;function tu(e,t){var n=Jd(null,function(r){return e.forEach(function(o){return ir(o,r)})});return eu(function(){var r=Fs.get(n);if(r){var o=new Set(r),s=new Set(e),i=n.current;o.forEach(function(a){s.has(a)||ir(a,null)}),s.forEach(function(a){o.has(a)||ir(a,i)})}Fs.set(n,e)},[e]),n}function nu(e){return e}function ru(e,t){t===void 0&&(t=nu);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(s){var i=t(s,r);return n.push(i),function(){n=n.filter(function(a){return a!==i})}},assignSyncMedium:function(s){for(r=!0;n.length;){var i=n;n=[],i.forEach(s)}n={push:function(a){return s(a)},filter:function(){return n}}},assignMedium:function(s){r=!0;var i=[];if(n.length){var a=n;n=[],a.forEach(s),i=n}var c=function(){var u=i;i=[],u.forEach(s)},l=function(){return Promise.resolve().then(c)};l(),n={push:function(u){i.push(u),l()},filter:function(u){return i=i.filter(u),n}}}};return o}function ou(e){e===void 0&&(e={});var t=ru(null);return t.options=Ae({async:!0,ssr:!1},e),t}var Is=function(e){var t=e.sideCar,n=_s(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 g.createElement(r,Ae({},n))};Is.isSideCarExport=!0;function su(e,t){return e.useMedium(t),Is}var Bs=ou(),cr=function(){},mn=g.forwardRef(function(e,t){var n=g.useRef(null),r=g.useState({onScrollCapture:cr,onWheelCapture:cr,onTouchMoveCapture:cr}),o=r[0],s=r[1],i=e.forwardProps,a=e.children,c=e.className,l=e.removeScrollBar,u=e.enabled,d=e.shards,h=e.sideCar,p=e.noRelative,x=e.noIsolation,f=e.inert,y=e.allowPinchZoom,m=e.as,v=m===void 0?"div":m,w=e.gapMode,S=_s(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),C=h,M=tu([n,t]),E=Ae(Ae({},S),o);return g.createElement(g.Fragment,null,u&&g.createElement(C,{sideCar:Bs,removeScrollBar:l,shards:d,noRelative:p,noIsolation:x,inert:f,setCallbacks:s,allowPinchZoom:!!y,lockRef:n,gapMode:w}),i?g.cloneElement(g.Children.only(a),Ae(Ae({},E),{ref:M})):g.createElement(v,Ae({},E,{className:c,ref:M}),a))});mn.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},mn.classNames={fullWidth:hn,zeroRight:fn};var au=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function iu(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=au();return t&&e.setAttribute("nonce",t),e}function cu(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function lu(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var du=function(){var e=0,t=null;return{add:function(n){e==0&&(t=iu())&&(cu(t,n),lu(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},uu=function(){var e=du();return function(t,n){g.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},Ls=function(){var e=uu(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},fu={left:0,top:0,right:0,gap:0},lr=function(e){return parseInt(e||"",10)||0},hu=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[lr(n),lr(r),lr(o)]},mu=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return fu;var t=hu(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])}},pu=Ls(),Ct="data-scroll-locked",gu=function(e,t,n,r){var o=e.left,s=e.top,i=e.right,a=e.gap;return n===void 0&&(n="margin"),`
|
|
52
|
-
.`.concat(Qd,` {
|
|
53
|
-
overflow: hidden `).concat(r,`;
|
|
54
|
-
padding-right: `).concat(a,"px ").concat(r,`;
|
|
55
|
-
}
|
|
56
|
-
body[`).concat(Ct,`] {
|
|
57
|
-
overflow: hidden `).concat(r,`;
|
|
58
|
-
overscroll-behavior: contain;
|
|
59
|
-
`).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
|
|
60
|
-
padding-left: `.concat(o,`px;
|
|
61
|
-
padding-top: `).concat(s,`px;
|
|
62
|
-
padding-right: `).concat(i,`px;
|
|
63
|
-
margin-left:0;
|
|
64
|
-
margin-top:0;
|
|
65
|
-
margin-right: `).concat(a,"px ").concat(r,`;
|
|
66
|
-
`),n==="padding"&&"padding-right: ".concat(a,"px ").concat(r,";")].filter(Boolean).join(""),`
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
.`).concat(fn,` {
|
|
70
|
-
right: `).concat(a,"px ").concat(r,`;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
.`).concat(hn,` {
|
|
74
|
-
margin-right: `).concat(a,"px ").concat(r,`;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
.`).concat(fn," .").concat(fn,` {
|
|
78
|
-
right: 0 `).concat(r,`;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
.`).concat(hn," .").concat(hn,` {
|
|
82
|
-
margin-right: 0 `).concat(r,`;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
body[`).concat(Ct,`] {
|
|
86
|
-
`).concat(Zd,": ").concat(a,`px;
|
|
87
|
-
}
|
|
88
|
-
`)},$s=function(){var e=parseInt(document.body.getAttribute(Ct)||"0",10);return isFinite(e)?e:0},vu=function(){g.useEffect(function(){return document.body.setAttribute(Ct,($s()+1).toString()),function(){var e=$s()-1;e<=0?document.body.removeAttribute(Ct):document.body.setAttribute(Ct,e.toString())}},[])},yu=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;vu();var s=g.useMemo(function(){return mu(o)},[o]);return g.createElement(pu,{styles:gu(s,!t,o,n?"":"!important")})},dr=!1;if(typeof window<"u")try{var pn=Object.defineProperty({},"passive",{get:function(){return dr=!0,!0}});window.addEventListener("test",pn,pn),window.removeEventListener("test",pn,pn)}catch{dr=!1}var St=dr?{passive:!1}:!1,bu=function(e){return e.tagName==="TEXTAREA"},Hs=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!bu(e)&&n[t]==="visible")},wu=function(e){return Hs(e,"overflowY")},xu=function(e){return Hs(e,"overflowX")},Vs=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=Ys(e,r);if(o){var s=zs(e,r),i=s[1],a=s[2];if(i>a)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},Cu=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},Su=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},Ys=function(e,t){return e==="v"?wu(t):xu(t)},zs=function(e,t){return e==="v"?Cu(t):Su(t)},Eu=function(e,t){return e==="h"&&t==="rtl"?-1:1},ku=function(e,t,n,r,o){var s=Eu(e,window.getComputedStyle(t).direction),i=s*r,a=n.target,c=t.contains(a),l=!1,u=i>0,d=0,h=0;do{if(!a)break;var p=zs(e,a),x=p[0],f=p[1],y=p[2],m=f-y-s*x;(x||m)&&Ys(e,a)&&(d+=m,h+=x);var v=a.parentNode;a=v&&v.nodeType===Node.DOCUMENT_FRAGMENT_NODE?v.host:v}while(!c&&a!==document.body||c&&(t.contains(a)||t===a));return(u&&Math.abs(d)<1||!u&&Math.abs(h)<1)&&(l=!0),l},gn=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Rs=function(e){return[e.deltaX,e.deltaY]},js=function(e){return e&&"current"in e?e.current:e},Mu=function(e,t){return e[0]===t[0]&&e[1]===t[1]},Nu=function(e){return`
|
|
89
|
-
.block-interactivity-`.concat(e,` {pointer-events: none;}
|
|
90
|
-
.allow-interactivity-`).concat(e,` {pointer-events: all;}
|
|
91
|
-
`)},Ou=0,Et=[];function Pu(e){var t=g.useRef([]),n=g.useRef([0,0]),r=g.useRef(),o=g.useState(Ou++)[0],s=g.useState(Ls)[0],i=g.useRef(e);g.useEffect(function(){i.current=e},[e]),g.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var f=Xd([e.lockRef.current],(e.shards||[]).map(js),!0).filter(Boolean);return f.forEach(function(y){return y.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),f.forEach(function(y){return y.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var a=g.useCallback(function(f,y){if("touches"in f&&f.touches.length===2||f.type==="wheel"&&f.ctrlKey)return!i.current.allowPinchZoom;var m=gn(f),v=n.current,w="deltaX"in f?f.deltaX:v[0]-m[0],S="deltaY"in f?f.deltaY:v[1]-m[1],C,M=f.target,E=Math.abs(w)>Math.abs(S)?"h":"v";if("touches"in f&&E==="h"&&M.type==="range")return!1;var O=Vs(E,M);if(!O)return!0;if(O?C=E:(C=E==="v"?"h":"v",O=Vs(E,M)),!O)return!1;if(!r.current&&"changedTouches"in f&&(w||S)&&(r.current=C),!C)return!0;var _=r.current||C;return ku(_,y,f,_==="h"?w:S)},[]),c=g.useCallback(function(f){var y=f;if(!(!Et.length||Et[Et.length-1]!==s)){var m="deltaY"in y?Rs(y):gn(y),v=t.current.filter(function(C){return C.name===y.type&&(C.target===y.target||y.target===C.shadowParent)&&Mu(C.delta,m)})[0];if(v&&v.should){y.cancelable&&y.preventDefault();return}if(!v){var w=(i.current.shards||[]).map(js).filter(Boolean).filter(function(C){return C.contains(y.target)}),S=w.length>0?a(y,w[0]):!i.current.noIsolation;S&&y.cancelable&&y.preventDefault()}}},[]),l=g.useCallback(function(f,y,m,v){var w={name:f,delta:y,target:m,should:v,shadowParent:Du(m)};t.current.push(w),setTimeout(function(){t.current=t.current.filter(function(S){return S!==w})},1)},[]),u=g.useCallback(function(f){n.current=gn(f),r.current=void 0},[]),d=g.useCallback(function(f){l(f.type,Rs(f),f.target,a(f,e.lockRef.current))},[]),h=g.useCallback(function(f){l(f.type,gn(f),f.target,a(f,e.lockRef.current))},[]);g.useEffect(function(){return Et.push(s),e.setCallbacks({onScrollCapture:d,onWheelCapture:d,onTouchMoveCapture:h}),document.addEventListener("wheel",c,St),document.addEventListener("touchmove",c,St),document.addEventListener("touchstart",u,St),function(){Et=Et.filter(function(f){return f!==s}),document.removeEventListener("wheel",c,St),document.removeEventListener("touchmove",c,St),document.removeEventListener("touchstart",u,St)}},[]);var p=e.removeScrollBar,x=e.inert;return g.createElement(g.Fragment,null,x?g.createElement(s,{styles:Nu(o)}):null,p?g.createElement(yu,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function Du(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const Tu=su(Bs,Pu);var ur=g.forwardRef(function(e,t){return g.createElement(mn,Ae({},e,{ref:t,sideCar:Tu}))});ur.classNames=mn.classNames;var Au=[" ","Enter","ArrowUp","ArrowDown"],Wu=[" ","Enter"],at="Select",[vn,yn,_u]=So(at),[kt,lg]=pt(at,[_u,ln]),bn=ln(),[Fu,Qe]=kt(at),[Iu,Bu]=kt(at),Us=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:s,value:i,defaultValue:a,onValueChange:c,dir:l,name:u,autoComplete:d,disabled:h,required:p,form:x}=e,f=bn(t),[y,m]=g.useState(null),[v,w]=g.useState(null),[S,C]=g.useState(!1),M=Co(l),[E,O]=_t({prop:r,defaultProp:o??!1,onChange:s,caller:at}),[_,T]=_t({prop:i,defaultProp:a,onChange:c,caller:at}),D=g.useRef(null),N=y?x||!!y.closest("form"):!0,[B,z]=g.useState(new Set),Y=Array.from(B).map(L=>L.props.value).join(";");return b.jsx(Os,{...f,children:b.jsxs(Fu,{required:p,scope:t,trigger:y,onTriggerChange:m,valueNode:v,onValueNodeChange:w,valueNodeHasChildren:S,onValueNodeHasChildrenChange:C,contentId:Zt(),value:_,onValueChange:T,open:E,onOpenChange:O,dir:M,triggerPointerDownPosRef:D,disabled:h,children:[b.jsx(vn.Provider,{scope:t,children:b.jsx(Iu,{scope:e.__scopeSelect,onNativeOptionAdd:g.useCallback(L=>{z(V=>new Set(V).add(L))},[]),onNativeOptionRemove:g.useCallback(L=>{z(V=>{const P=new Set(V);return P.delete(L),P})},[]),children:n})}),N?b.jsxs(ga,{"aria-hidden":!0,required:p,tabIndex:-1,name:u,autoComplete:d,value:_,onChange:L=>T(L.target.value),disabled:h,form:x,children:[_===void 0?b.jsx("option",{value:""}):null,Array.from(B)]},Y):null]})})};Us.displayName=at;var qs="SelectTrigger",Gs=g.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,s=bn(n),i=Qe(qs,n),a=i.disabled||r,c=Z(t,i.onTriggerChange),l=yn(n),u=g.useRef("touch"),[d,h,p]=ya(f=>{const y=l().filter(w=>!w.disabled),m=y.find(w=>w.value===i.value),v=ba(y,f,m);v!==void 0&&i.onValueChange(v.value)}),x=f=>{a||(i.onOpenChange(!0),p()),f&&(i.triggerPointerDownPosRef.current={x:Math.round(f.pageX),y:Math.round(f.pageY)})};return b.jsx(or,{asChild:!0,...s,children:b.jsx(q.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:a,"data-disabled":a?"":void 0,"data-placeholder":va(i.value)?"":void 0,...o,ref:c,onClick:U(o.onClick,f=>{f.currentTarget.focus(),u.current!=="mouse"&&x(f)}),onPointerDown:U(o.onPointerDown,f=>{u.current=f.pointerType;const y=f.target;y.hasPointerCapture(f.pointerId)&&y.releasePointerCapture(f.pointerId),f.button===0&&f.ctrlKey===!1&&f.pointerType==="mouse"&&(x(f),f.preventDefault())}),onKeyDown:U(o.onKeyDown,f=>{const y=d.current!=="";!(f.ctrlKey||f.altKey||f.metaKey)&&f.key.length===1&&h(f.key),!(y&&f.key===" ")&&Au.includes(f.key)&&(x(),f.preventDefault())})})})});Gs.displayName=qs;var Ks="SelectValue",Xs=g.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:s,placeholder:i="",...a}=e,c=Qe(Ks,n),{onValueNodeHasChildrenChange:l}=c,u=s!==void 0,d=Z(t,c.onValueNodeChange);return ue(()=>{l(u)},[l,u]),b.jsx(q.span,{...a,ref:d,style:{pointerEvents:"none"},children:va(c.value)?b.jsx(b.Fragment,{children:i}):s})});Xs.displayName=Ks;var Lu="SelectIcon",Qs=g.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return b.jsx(q.span,{"aria-hidden":!0,...o,ref:t,children:r||"▼"})});Qs.displayName=Lu;var $u="SelectPortal",Zs=e=>b.jsx(sr,{asChild:!0,...e});Zs.displayName=$u;var it="SelectContent",Js=g.forwardRef((e,t)=>{const n=Qe(it,e.__scopeSelect),[r,o]=g.useState();if(ue(()=>{o(new DocumentFragment)},[]),!n.open){const s=r;return s?Kt.createPortal(b.jsx(ea,{scope:e.__scopeSelect,children:b.jsx(vn.Slot,{scope:e.__scopeSelect,children:b.jsx("div",{children:e.children})})}),s):null}return b.jsx(ta,{...e,ref:t})});Js.displayName=it;var Ee=10,[ea,Ze]=kt(it),Hu="SelectContentImpl",Vu=mt("SelectContent.RemoveScroll"),ta=g.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:s,onPointerDownOutside:i,side:a,sideOffset:c,align:l,alignOffset:u,arrowPadding:d,collisionBoundary:h,collisionPadding:p,sticky:x,hideWhenDetached:f,avoidCollisions:y,...m}=e,v=Qe(it,n),[w,S]=g.useState(null),[C,M]=g.useState(null),E=Z(t,$=>S($)),[O,_]=g.useState(null),[T,D]=g.useState(null),N=yn(n),[B,z]=g.useState(!1),Y=g.useRef(!1);g.useEffect(()=>{if(w)return Ws(w)},[w]),qo();const L=g.useCallback($=>{const[ee,...ce]=N().map(K=>K.ref.current),[te]=ce.slice(-1),G=document.activeElement;for(const K of $)if(K===G||(K==null||K.scrollIntoView({block:"nearest"}),K===ee&&C&&(C.scrollTop=0),K===te&&C&&(C.scrollTop=C.scrollHeight),K==null||K.focus(),document.activeElement!==G))return},[N,C]),V=g.useCallback(()=>L([O,w]),[L,O,w]);g.useEffect(()=>{B&&V()},[B,V]);const{onOpenChange:P,triggerPointerDownPosRef:F}=v;g.useEffect(()=>{if(w){let $={x:0,y:0};const ee=te=>{var G,K;$={x:Math.abs(Math.round(te.pageX)-(((G=F.current)==null?void 0:G.x)??0)),y:Math.abs(Math.round(te.pageY)-(((K=F.current)==null?void 0:K.y)??0))}},ce=te=>{$.x<=10&&$.y<=10?te.preventDefault():w.contains(te.target)||P(!1),document.removeEventListener("pointermove",ee),F.current=null};return F.current!==null&&(document.addEventListener("pointermove",ee),document.addEventListener("pointerup",ce,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",ee),document.removeEventListener("pointerup",ce,{capture:!0})}}},[w,P,F]),g.useEffect(()=>{const $=()=>P(!1);return window.addEventListener("blur",$),window.addEventListener("resize",$),()=>{window.removeEventListener("blur",$),window.removeEventListener("resize",$)}},[P]);const[j,oe]=ya($=>{const ee=N().filter(G=>!G.disabled),ce=ee.find(G=>G.ref.current===document.activeElement),te=ba(ee,$,ce);te&&setTimeout(()=>te.ref.current.focus())}),Me=g.useCallback(($,ee,ce)=>{const te=!Y.current&&!ce;(v.value!==void 0&&v.value===ee||te)&&(_($),te&&(Y.current=!0))},[v.value]),Ne=g.useCallback(()=>w==null?void 0:w.focus(),[w]),be=g.useCallback(($,ee,ce)=>{const te=!Y.current&&!ce;(v.value!==void 0&&v.value===ee||te)&&D($)},[v.value]),Re=r==="popper"?fr:na,xe=Re===fr?{side:a,sideOffset:c,align:l,alignOffset:u,arrowPadding:d,collisionBoundary:h,collisionPadding:p,sticky:x,hideWhenDetached:f,avoidCollisions:y}:{};return b.jsx(ea,{scope:n,content:w,viewport:C,onViewportChange:M,itemRefCallback:Me,selectedItem:O,onItemLeave:Ne,itemTextRefCallback:be,focusSelectedItem:V,selectedItemText:T,position:r,isPositioned:B,searchRef:j,children:b.jsx(ur,{as:Vu,allowPinchZoom:!0,children:b.jsx(zn,{asChild:!0,trapped:v.open,onMountAutoFocus:$=>{$.preventDefault()},onUnmountAutoFocus:U(o,$=>{var ee;(ee=v.trigger)==null||ee.focus({preventScroll:!0}),$.preventDefault()}),children:b.jsx($n,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:$=>$.preventDefault(),onDismiss:()=>v.onOpenChange(!1),children:b.jsx(Re,{role:"listbox",id:v.contentId,"data-state":v.open?"open":"closed",dir:v.dir,onContextMenu:$=>$.preventDefault(),...m,...xe,onPlaced:()=>z(!0),ref:E,style:{display:"flex",flexDirection:"column",outline:"none",...m.style},onKeyDown:U(m.onKeyDown,$=>{const ee=$.ctrlKey||$.altKey||$.metaKey;if($.key==="Tab"&&$.preventDefault(),!ee&&$.key.length===1&&oe($.key),["ArrowUp","ArrowDown","Home","End"].includes($.key)){let te=N().filter(G=>!G.disabled).map(G=>G.ref.current);if(["ArrowUp","End"].includes($.key)&&(te=te.slice().reverse()),["ArrowUp","ArrowDown"].includes($.key)){const G=$.target,K=te.indexOf(G);te=te.slice(K+1)}setTimeout(()=>L(te)),$.preventDefault()}})})})})})})});ta.displayName=Hu;var Yu="SelectItemAlignedPosition",na=g.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,s=Qe(it,n),i=Ze(it,n),[a,c]=g.useState(null),[l,u]=g.useState(null),d=Z(t,E=>u(E)),h=yn(n),p=g.useRef(!1),x=g.useRef(!0),{viewport:f,selectedItem:y,selectedItemText:m,focusSelectedItem:v}=i,w=g.useCallback(()=>{if(s.trigger&&s.valueNode&&a&&l&&f&&y&&m){const E=s.trigger.getBoundingClientRect(),O=l.getBoundingClientRect(),_=s.valueNode.getBoundingClientRect(),T=m.getBoundingClientRect();if(s.dir!=="rtl"){const G=T.left-O.left,K=_.left-G,me=E.left-K,we=E.width+me,lt=Math.max(we,O.width),dt=window.innerWidth-Ee,ut=Xt(K,[Ee,Math.max(Ee,dt-lt)]);a.style.minWidth=we+"px",a.style.left=ut+"px"}else{const G=O.right-T.right,K=window.innerWidth-_.right-G,me=window.innerWidth-E.right-K,we=E.width+me,lt=Math.max(we,O.width),dt=window.innerWidth-Ee,ut=Xt(K,[Ee,Math.max(Ee,dt-lt)]);a.style.minWidth=we+"px",a.style.right=ut+"px"}const D=h(),N=window.innerHeight-Ee*2,B=f.scrollHeight,z=window.getComputedStyle(l),Y=parseInt(z.borderTopWidth,10),L=parseInt(z.paddingTop,10),V=parseInt(z.borderBottomWidth,10),P=parseInt(z.paddingBottom,10),F=Y+L+B+P+V,j=Math.min(y.offsetHeight*5,F),oe=window.getComputedStyle(f),Me=parseInt(oe.paddingTop,10),Ne=parseInt(oe.paddingBottom,10),be=E.top+E.height/2-Ee,Re=N-be,xe=y.offsetHeight/2,$=y.offsetTop+xe,ee=Y+L+$,ce=F-ee;if(ee<=be){const G=D.length>0&&y===D[D.length-1].ref.current;a.style.bottom="0px";const K=l.clientHeight-f.offsetTop-f.offsetHeight,me=Math.max(Re,xe+(G?Ne:0)+K+V),we=ee+me;a.style.height=we+"px"}else{const G=D.length>0&&y===D[0].ref.current;a.style.top="0px";const me=Math.max(be,Y+f.offsetTop+(G?Me:0)+xe)+ce;a.style.height=me+"px",f.scrollTop=ee-be+f.offsetTop}a.style.margin=`${Ee}px 0`,a.style.minHeight=j+"px",a.style.maxHeight=N+"px",r==null||r(),requestAnimationFrame(()=>p.current=!0)}},[h,s.trigger,s.valueNode,a,l,f,y,m,s.dir,r]);ue(()=>w(),[w]);const[S,C]=g.useState();ue(()=>{l&&C(window.getComputedStyle(l).zIndex)},[l]);const M=g.useCallback(E=>{E&&x.current===!0&&(w(),v==null||v(),x.current=!1)},[w,v]);return b.jsx(Ru,{scope:n,contentWrapper:a,shouldExpandOnScrollRef:p,onScrollButtonChange:M,children:b.jsx("div",{ref:c,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:S},children:b.jsx(q.div,{...o,ref:d,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});na.displayName=Yu;var zu="SelectPopperPosition",fr=g.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=Ee,...s}=e,i=bn(n);return b.jsx(Ps,{...i,...s,ref:t,align:r,collisionPadding:o,style:{boxSizing:"border-box",...s.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)"}})});fr.displayName=zu;var[Ru,hr]=kt(it,{}),mr="SelectViewport",ra=g.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...o}=e,s=Ze(mr,n),i=hr(mr,n),a=Z(t,s.onViewportChange),c=g.useRef(0);return b.jsxs(b.Fragment,{children:[b.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}),b.jsx(vn.Slot,{scope:n,children:b.jsx(q.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:a,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:U(o.onScroll,l=>{const u=l.currentTarget,{contentWrapper:d,shouldExpandOnScrollRef:h}=i;if(h!=null&&h.current&&d){const p=Math.abs(c.current-u.scrollTop);if(p>0){const x=window.innerHeight-Ee*2,f=parseFloat(d.style.minHeight),y=parseFloat(d.style.height),m=Math.max(f,y);if(m<x){const v=m+p,w=Math.min(x,v),S=v-w;d.style.height=w+"px",d.style.bottom==="0px"&&(u.scrollTop=S>0?S:0,d.style.justifyContent="flex-end")}}}c.current=u.scrollTop})})})]})});ra.displayName=mr;var oa="SelectGroup",[ju,Uu]=kt(oa),qu=g.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Zt();return b.jsx(ju,{scope:n,id:o,children:b.jsx(q.div,{role:"group","aria-labelledby":o,...r,ref:t})})});qu.displayName=oa;var sa="SelectLabel",aa=g.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Uu(sa,n);return b.jsx(q.div,{id:o.id,...r,ref:t})});aa.displayName=sa;var wn="SelectItem",[Gu,ia]=kt(wn),ca=g.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:s,...i}=e,a=Qe(wn,n),c=Ze(wn,n),l=a.value===r,[u,d]=g.useState(s??""),[h,p]=g.useState(!1),x=Z(t,v=>{var w;return(w=c.itemRefCallback)==null?void 0:w.call(c,v,r,o)}),f=Zt(),y=g.useRef("touch"),m=()=>{o||(a.onValueChange(r),a.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 b.jsx(Gu,{scope:n,value:r,disabled:o,textId:f,isSelected:l,onItemTextChange:g.useCallback(v=>{d(w=>w||((v==null?void 0:v.textContent)??"").trim())},[]),children:b.jsx(vn.ItemSlot,{scope:n,value:r,disabled:o,textValue:u,children:b.jsx(q.div,{role:"option","aria-labelledby":f,"data-highlighted":h?"":void 0,"aria-selected":l&&h,"data-state":l?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...i,ref:x,onFocus:U(i.onFocus,()=>p(!0)),onBlur:U(i.onBlur,()=>p(!1)),onClick:U(i.onClick,()=>{y.current!=="mouse"&&m()}),onPointerUp:U(i.onPointerUp,()=>{y.current==="mouse"&&m()}),onPointerDown:U(i.onPointerDown,v=>{y.current=v.pointerType}),onPointerMove:U(i.onPointerMove,v=>{var w;y.current=v.pointerType,o?(w=c.onItemLeave)==null||w.call(c):y.current==="mouse"&&v.currentTarget.focus({preventScroll:!0})}),onPointerLeave:U(i.onPointerLeave,v=>{var w;v.currentTarget===document.activeElement&&((w=c.onItemLeave)==null||w.call(c))}),onKeyDown:U(i.onKeyDown,v=>{var S;((S=c.searchRef)==null?void 0:S.current)!==""&&v.key===" "||(Wu.includes(v.key)&&m(),v.key===" "&&v.preventDefault())})})})})});ca.displayName=wn;var Lt="SelectItemText",la=g.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,...s}=e,i=Qe(Lt,n),a=Ze(Lt,n),c=ia(Lt,n),l=Bu(Lt,n),[u,d]=g.useState(null),h=Z(t,m=>d(m),c.onItemTextChange,m=>{var v;return(v=a.itemTextRefCallback)==null?void 0:v.call(a,m,c.value,c.disabled)}),p=u==null?void 0:u.textContent,x=g.useMemo(()=>b.jsx("option",{value:c.value,disabled:c.disabled,children:p},c.value),[c.disabled,c.value,p]),{onNativeOptionAdd:f,onNativeOptionRemove:y}=l;return ue(()=>(f(x),()=>y(x)),[f,y,x]),b.jsxs(b.Fragment,{children:[b.jsx(q.span,{id:c.textId,...s,ref:h}),c.isSelected&&i.valueNode&&!i.valueNodeHasChildren?Kt.createPortal(s.children,i.valueNode):null]})});la.displayName=Lt;var da="SelectItemIndicator",ua=g.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return ia(da,n).isSelected?b.jsx(q.span,{"aria-hidden":!0,...r,ref:t}):null});ua.displayName=da;var pr="SelectScrollUpButton",fa=g.forwardRef((e,t)=>{const n=Ze(pr,e.__scopeSelect),r=hr(pr,e.__scopeSelect),[o,s]=g.useState(!1),i=Z(t,r.onScrollButtonChange);return ue(()=>{if(n.viewport&&n.isPositioned){let a=function(){const l=c.scrollTop>0;s(l)};const c=n.viewport;return a(),c.addEventListener("scroll",a),()=>c.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),o?b.jsx(ma,{...e,ref:i,onAutoScroll:()=>{const{viewport:a,selectedItem:c}=n;a&&c&&(a.scrollTop=a.scrollTop-c.offsetHeight)}}):null});fa.displayName=pr;var gr="SelectScrollDownButton",ha=g.forwardRef((e,t)=>{const n=Ze(gr,e.__scopeSelect),r=hr(gr,e.__scopeSelect),[o,s]=g.useState(!1),i=Z(t,r.onScrollButtonChange);return ue(()=>{if(n.viewport&&n.isPositioned){let a=function(){const l=c.scrollHeight-c.clientHeight,u=Math.ceil(c.scrollTop)<l;s(u)};const c=n.viewport;return a(),c.addEventListener("scroll",a),()=>c.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),o?b.jsx(ma,{...e,ref:i,onAutoScroll:()=>{const{viewport:a,selectedItem:c}=n;a&&c&&(a.scrollTop=a.scrollTop+c.offsetHeight)}}):null});ha.displayName=gr;var ma=g.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,s=Ze("SelectScrollButton",n),i=g.useRef(null),a=yn(n),c=g.useCallback(()=>{i.current!==null&&(window.clearInterval(i.current),i.current=null)},[]);return g.useEffect(()=>()=>c(),[c]),ue(()=>{var u;const l=a().find(d=>d.ref.current===document.activeElement);(u=l==null?void 0:l.ref.current)==null||u.scrollIntoView({block:"nearest"})},[a]),b.jsx(q.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:U(o.onPointerDown,()=>{i.current===null&&(i.current=window.setInterval(r,50))}),onPointerMove:U(o.onPointerMove,()=>{var l;(l=s.onItemLeave)==null||l.call(s),i.current===null&&(i.current=window.setInterval(r,50))}),onPointerLeave:U(o.onPointerLeave,()=>{c()})})}),Ku="SelectSeparator",pa=g.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return b.jsx(q.div,{"aria-hidden":!0,...r,ref:t})});pa.displayName=Ku;var vr="SelectArrow",Xu=g.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=bn(n),s=Qe(vr,n),i=Ze(vr,n);return s.open&&i.position==="popper"?b.jsx(Ds,{...o,...r,ref:t}):null});Xu.displayName=vr;var Qu="SelectBubbleInput",ga=g.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const o=g.useRef(null),s=Z(r,o),i=An(t);return g.useEffect(()=>{const a=o.current;if(!a)return;const c=window.HTMLSelectElement.prototype,u=Object.getOwnPropertyDescriptor(c,"value").set;if(i!==t&&u){const d=new Event("change",{bubbles:!0});u.call(a,t),a.dispatchEvent(d)}},[i,t]),b.jsx(q.select,{...n,style:{...Ts,...n.style},ref:s,defaultValue:t})});ga.displayName=Qu;function va(e){return e===""||e===void 0}function ya(e){const t=ot(e),n=g.useRef(""),r=g.useRef(0),o=g.useCallback(i=>{const a=n.current+i;t(a),function c(l){n.current=l,window.clearTimeout(r.current),l!==""&&(r.current=window.setTimeout(()=>c(""),1e3))}(a)},[t]),s=g.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return g.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,o,s]}function ba(e,t,n){const o=t.length>1&&Array.from(t).every(l=>l===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let i=Zu(e,Math.max(s,0));o.length===1&&(i=i.filter(l=>l!==n));const c=i.find(l=>l.textValue.toLowerCase().startsWith(o.toLowerCase()));return c!==n?c:void 0}function Zu(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var Ju=Us,wa=Gs,ef=Xs,tf=Qs,nf=Zs,xa=Js,rf=ra,Ca=aa,Sa=ca,of=la,sf=ua,Ea=fa,ka=ha,Ma=pa;const af=Ju,cf=ef,Na=g.forwardRef(({className:e,children:t,...n},r)=>b.jsxs(wa,{ref:r,className:I("flex h-10 w-full items-center justify-between rounded-md border border-input bg-background px-3 py-2 text-sm ring-offset-background placeholder:text-muted-foreground focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 [&>span]:line-clamp-1",e),...n,children:[t,b.jsx(tf,{asChild:!0,children:b.jsx(bo,{className:"h-4 w-4 opacity-50"})})]}));Na.displayName=wa.displayName;const Oa=g.forwardRef(({className:e,...t},n)=>b.jsx(Ea,{ref:n,className:I("flex cursor-default items-center justify-center py-1",e),...t,children:b.jsx(Qc,{className:"h-4 w-4"})}));Oa.displayName=Ea.displayName;const Pa=g.forwardRef(({className:e,...t},n)=>b.jsx(ka,{ref:n,className:I("flex cursor-default items-center justify-center py-1",e),...t,children:b.jsx(bo,{className:"h-4 w-4"})}));Pa.displayName=ka.displayName;const Da=g.forwardRef(({className:e,children:t,position:n="popper",...r},o)=>b.jsx(nf,{children:b.jsxs(xa,{ref:o,className:I("relative z-50 max-h-96 min-w-[8rem] overflow-hidden rounded-md border bg-popover text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",n==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:n,...r,children:[b.jsx(Oa,{}),b.jsx(rf,{className:I("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t}),b.jsx(Pa,{})]})}));Da.displayName=xa.displayName;const lf=g.forwardRef(({className:e,...t},n)=>b.jsx(Ca,{ref:n,className:I("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}));lf.displayName=Ca.displayName;const Ta=g.forwardRef(({className:e,children:t,...n},r)=>b.jsxs(Sa,{ref:r,className:I("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[b.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:b.jsx(sf,{children:b.jsx(yo,{className:"h-4 w-4"})})}),b.jsx(of,{children:t})]}));Ta.displayName=Sa.displayName;const df=g.forwardRef(({className:e,...t},n)=>b.jsx(Ma,{ref:n,className:I("-mx-1 my-1 h-px bg-muted",e),...t}));df.displayName=Ma.displayName;function uf(e,t){return g.useReducer((n,r)=>t[n][r]??n,e)}var xn=e=>{const{present:t,children:n}=e,r=ff(t),o=typeof n=="function"?n({present:r.isPresent}):g.Children.only(n),s=Z(r.ref,hf(o));return typeof n=="function"||r.isPresent?g.cloneElement(o,{ref:s}):null};xn.displayName="Presence";function ff(e){const[t,n]=g.useState(),r=g.useRef(null),o=g.useRef(e),s=g.useRef("none"),i=e?"mounted":"unmounted",[a,c]=uf(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return g.useEffect(()=>{const l=Cn(r.current);s.current=a==="mounted"?l:"none"},[a]),ue(()=>{const l=r.current,u=o.current;if(u!==e){const h=s.current,p=Cn(l);e?c("MOUNT"):p==="none"||(l==null?void 0:l.display)==="none"?c("UNMOUNT"):c(u&&h!==p?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,c]),ue(()=>{if(t){let l;const u=t.ownerDocument.defaultView??window,d=p=>{const f=Cn(r.current).includes(p.animationName);if(p.target===t&&f&&(c("ANIMATION_END"),!o.current)){const y=t.style.animationFillMode;t.style.animationFillMode="forwards",l=u.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=y)})}},h=p=>{p.target===t&&(s.current=Cn(r.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",d),t.addEventListener("animationend",d),()=>{u.clearTimeout(l),t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",d),t.removeEventListener("animationend",d)}}else c("ANIMATION_END")},[t,c]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:g.useCallback(l=>{r.current=l?getComputedStyle(l):null,n(l)},[])}}function Cn(e){return(e==null?void 0:e.animationName)||"none"}function hf(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 Sn="Checkbox",[mf,dg]=pt(Sn),[pf,yr]=mf(Sn);function gf(e){const{__scopeCheckbox:t,checked:n,children:r,defaultChecked:o,disabled:s,form:i,name:a,onCheckedChange:c,required:l,value:u="on",internal_do_not_use_render:d}=e,[h,p]=_t({prop:n,defaultProp:o??!1,onChange:c,caller:Sn}),[x,f]=g.useState(null),[y,m]=g.useState(null),v=g.useRef(!1),w=x?!!i||!!x.closest("form"):!0,S={checked:h,disabled:s,setChecked:p,control:x,setControl:f,name:a,form:i,value:u,hasConsumerStoppedPropagationRef:v,required:l,defaultChecked:Je(o)?!1:o,isFormControl:w,bubbleInput:y,setBubbleInput:m};return b.jsx(pf,{scope:t,...S,children:vf(d)?d(S):r})}var Aa="CheckboxTrigger",Wa=g.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...r},o)=>{const{control:s,value:i,disabled:a,checked:c,required:l,setControl:u,setChecked:d,hasConsumerStoppedPropagationRef:h,isFormControl:p,bubbleInput:x}=yr(Aa,e),f=Z(o,u),y=g.useRef(c);return g.useEffect(()=>{const m=s==null?void 0:s.form;if(m){const v=()=>d(y.current);return m.addEventListener("reset",v),()=>m.removeEventListener("reset",v)}},[s,d]),b.jsx(q.button,{type:"button",role:"checkbox","aria-checked":Je(c)?"mixed":c,"aria-required":l,"data-state":La(c),"data-disabled":a?"":void 0,disabled:a,value:i,...r,ref:f,onKeyDown:U(t,m=>{m.key==="Enter"&&m.preventDefault()}),onClick:U(n,m=>{d(v=>Je(v)?!0:!v),x&&p&&(h.current=m.isPropagationStopped(),h.current||m.stopPropagation())})})});Wa.displayName=Aa;var br=g.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:r,checked:o,defaultChecked:s,required:i,disabled:a,value:c,onCheckedChange:l,form:u,...d}=e;return b.jsx(gf,{__scopeCheckbox:n,checked:o,defaultChecked:s,disabled:a,required:i,onCheckedChange:l,name:r,form:u,value:c,internal_do_not_use_render:({isFormControl:h})=>b.jsxs(b.Fragment,{children:[b.jsx(Wa,{...d,ref:t,__scopeCheckbox:n}),h&&b.jsx(Ba,{__scopeCheckbox:n})]})})});br.displayName=Sn;var _a="CheckboxIndicator",Fa=g.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...o}=e,s=yr(_a,n);return b.jsx(xn,{present:r||Je(s.checked)||s.checked===!0,children:b.jsx(q.span,{"data-state":La(s.checked),"data-disabled":s.disabled?"":void 0,...o,ref:t,style:{pointerEvents:"none",...e.style}})})});Fa.displayName=_a;var Ia="CheckboxBubbleInput",Ba=g.forwardRef(({__scopeCheckbox:e,...t},n)=>{const{control:r,hasConsumerStoppedPropagationRef:o,checked:s,defaultChecked:i,required:a,disabled:c,name:l,value:u,form:d,bubbleInput:h,setBubbleInput:p}=yr(Ia,e),x=Z(n,p),f=An(s),y=Wn(r);g.useEffect(()=>{const v=h;if(!v)return;const w=window.HTMLInputElement.prototype,C=Object.getOwnPropertyDescriptor(w,"checked").set,M=!o.current;if(f!==s&&C){const E=new Event("click",{bubbles:M});v.indeterminate=Je(s),C.call(v,Je(s)?!1:s),v.dispatchEvent(E)}},[h,f,s,o]);const m=g.useRef(Je(s)?!1:s);return b.jsx(q.input,{type:"checkbox","aria-hidden":!0,defaultChecked:i??m.current,required:a,disabled:c,name:l,value:u,form:d,...t,tabIndex:-1,ref:x,style:{...t.style,...y,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});Ba.displayName=Ia;function vf(e){return typeof e=="function"}function Je(e){return e==="indeterminate"}function La(e){return Je(e)?"indeterminate":e?"checked":"unchecked"}const $a=g.forwardRef(({className:e,...t},n)=>b.jsx(br,{ref:n,className:I("peer h-4 w-4 shrink-0 rounded-sm border border-primary ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground",e),...t,children:b.jsx(Fa,{className:I("flex items-center justify-center text-current"),children:b.jsx(yo,{className:"h-4 w-4"})})}));$a.displayName=br.displayName;const Ha=6048e5,yf=864e5,Va=Symbol.for("constructDateFrom");function de(e,t){return typeof e=="function"?e(t):e&&typeof e=="object"&&Va in e?e[Va](t):e instanceof Date?new e.constructor(t):new Date(t)}function J(e,t){return de(t||e,e)}function Ya(e,t,n){const r=J(e,n==null?void 0:n.in);return isNaN(t)?de(e,NaN):(t&&r.setDate(r.getDate()+t),r)}function za(e,t,n){const r=J(e,n==null?void 0:n.in);if(isNaN(t))return de(e,NaN);if(!t)return r;const o=r.getDate(),s=de(e,r.getTime());s.setMonth(r.getMonth()+t+1,0);const i=s.getDate();return o>=i?s:(r.setFullYear(s.getFullYear(),s.getMonth(),o),r)}let bf={};function $t(){return bf}function Mt(e,t){var a,c,l,u;const n=$t(),r=(t==null?void 0:t.weekStartsOn)??((c=(a=t==null?void 0:t.locale)==null?void 0:a.options)==null?void 0:c.weekStartsOn)??n.weekStartsOn??((u=(l=n.locale)==null?void 0:l.options)==null?void 0:u.weekStartsOn)??0,o=J(e,t==null?void 0:t.in),s=o.getDay(),i=(s<r?7:0)+s-r;return o.setDate(o.getDate()-i),o.setHours(0,0,0,0),o}function Ht(e,t){return Mt(e,{...t,weekStartsOn:1})}function Ra(e,t){const n=J(e,t==null?void 0:t.in),r=n.getFullYear(),o=de(n,0);o.setFullYear(r+1,0,4),o.setHours(0,0,0,0);const s=Ht(o),i=de(n,0);i.setFullYear(r,0,4),i.setHours(0,0,0,0);const a=Ht(i);return n.getTime()>=s.getTime()?r+1:n.getTime()>=a.getTime()?r:r-1}function ja(e){const t=J(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 Nt(e,...t){const n=de.bind(null,t.find(r=>typeof r=="object"));return t.map(n)}function Vt(e,t){const n=J(e,t==null?void 0:t.in);return n.setHours(0,0,0,0),n}function Ua(e,t,n){const[r,o]=Nt(n==null?void 0:n.in,e,t),s=Vt(r),i=Vt(o),a=+s-ja(s),c=+i-ja(i);return Math.round((a-c)/yf)}function wf(e,t){const n=Ra(e,t),r=de(e,0);return r.setFullYear(n,0,4),r.setHours(0,0,0,0),Ht(r)}function xf(e,t,n){return Ya(e,t*7,n)}function Cf(e,t,n){return za(e,t*12,n)}function Sf(e,t){let n,r=t==null?void 0:t.in;return e.forEach(o=>{!r&&typeof o=="object"&&(r=de.bind(null,o));const s=J(o,r);(!n||n<s||isNaN(+s))&&(n=s)}),de(r,n||NaN)}function Ef(e,t){let n,r=t==null?void 0:t.in;return e.forEach(o=>{!r&&typeof o=="object"&&(r=de.bind(null,o));const s=J(o,r);(!n||n>s||isNaN(+s))&&(n=s)}),de(r,n||NaN)}function kf(e,t,n){const[r,o]=Nt(n==null?void 0:n.in,e,t);return+Vt(r)==+Vt(o)}function qa(e){return e instanceof Date||typeof e=="object"&&Object.prototype.toString.call(e)==="[object Date]"}function Mf(e){return!(!qa(e)&&typeof e!="number"||isNaN(+J(e)))}function Nf(e,t,n){const[r,o]=Nt(n==null?void 0:n.in,e,t),s=r.getFullYear()-o.getFullYear(),i=r.getMonth()-o.getMonth();return s*12+i}function Of(e,t){const n=J(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 Pf(e,t){const[n,r]=Nt(e,t.start,t.end);return{start:n,end:r}}function Df(e,t){const{start:n,end:r}=Pf(t==null?void 0:t.in,e);let o=+n>+r;const s=o?+n:+r,i=o?r:n;i.setHours(0,0,0,0),i.setDate(1);let a=1;const c=[];for(;+i<=s;)c.push(de(n,i)),i.setMonth(i.getMonth()+a);return o?c.reverse():c}function Tf(e,t){const n=J(e,t==null?void 0:t.in);return n.setDate(1),n.setHours(0,0,0,0),n}function Af(e,t){const n=J(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 Ga(e,t){const n=J(e,t==null?void 0:t.in);return n.setFullYear(n.getFullYear(),0,1),n.setHours(0,0,0,0),n}function Ka(e,t){var a,c,l,u;const n=$t(),r=(t==null?void 0:t.weekStartsOn)??((c=(a=t==null?void 0:t.locale)==null?void 0:a.options)==null?void 0:c.weekStartsOn)??n.weekStartsOn??((u=(l=n.locale)==null?void 0:l.options)==null?void 0:u.weekStartsOn)??0,o=J(e,t==null?void 0:t.in),s=o.getDay(),i=(s<r?-7:0)+6-(s-r);return o.setDate(o.getDate()+i),o.setHours(23,59,59,999),o}function Wf(e,t){return Ka(e,{...t,weekStartsOn:1})}const _f={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"}},Ff=(e,t,n)=>{let r;const o=_f[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 wr(e){return(t={})=>{const n=t.width?String(t.width):e.defaultWidth;return e.formats[n]||e.formats[e.defaultWidth]}}const If={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},Bf={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},Lf={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},$f={date:wr({formats:If,defaultWidth:"full"}),time:wr({formats:Bf,defaultWidth:"full"}),dateTime:wr({formats:Lf,defaultWidth:"full"})},Hf={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},Vf=(e,t,n,r)=>Hf[e];function Yt(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,a=n!=null&&n.width?String(n.width):i;o=e.formattingValues[a]||e.formattingValues[i]}else{const i=e.defaultWidth,a=n!=null&&n.width?String(n.width):e.defaultWidth;o=e.values[a]||e.values[i]}const s=e.argumentCallback?e.argumentCallback(t):t;return o[s]}}const Yf={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},zf={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},Rf={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"]},jf={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"]},Uf={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"}},qf={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"}},Gf={ordinalNumber:(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"},era:Yt({values:Yf,defaultWidth:"wide"}),quarter:Yt({values:zf,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Yt({values:Rf,defaultWidth:"wide"}),day:Yt({values:jf,defaultWidth:"wide"}),dayPeriod:Yt({values:Uf,defaultWidth:"wide",formattingValues:qf,defaultFormattingWidth:"wide"})};function zt(e){return(t,n={})=>{const r=n.width,o=r&&e.matchPatterns[r]||e.matchPatterns[e.defaultMatchWidth],s=t.match(o);if(!s)return null;const i=s[0],a=r&&e.parsePatterns[r]||e.parsePatterns[e.defaultParseWidth],c=Array.isArray(a)?Xf(a,d=>d.test(i)):Kf(a,d=>d.test(i));let l;l=e.valueCallback?e.valueCallback(c):c,l=n.valueCallback?n.valueCallback(l):l;const u=t.slice(i.length);return{value:l,rest:u}}}function Kf(e,t){for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&t(e[n]))return n}function Xf(e,t){for(let n=0;n<e.length;n++)if(t(e[n]))return n}function Qf(e){return(t,n={})=>{const r=t.match(e.matchPattern);if(!r)return null;const o=r[0],s=t.match(e.parsePattern);if(!s)return null;let i=e.valueCallback?e.valueCallback(s[0]):s[0];i=n.valueCallback?n.valueCallback(i):i;const a=t.slice(o.length);return{value:i,rest:a}}}const Zf=/^(\d+)(th|st|nd|rd)?/i,Jf=/\d+/i,eh={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},th={any:[/^b/i,/^(a|c)/i]},nh={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},rh={any:[/1/i,/2/i,/3/i,/4/i]},oh={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},sh={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]},ah={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},ih={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]},ch={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},lh={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}},dh={ordinalNumber:Qf({matchPattern:Zf,parsePattern:Jf,valueCallback:e=>parseInt(e,10)}),era:zt({matchPatterns:eh,defaultMatchWidth:"wide",parsePatterns:th,defaultParseWidth:"any"}),quarter:zt({matchPatterns:nh,defaultMatchWidth:"wide",parsePatterns:rh,defaultParseWidth:"any",valueCallback:e=>e+1}),month:zt({matchPatterns:oh,defaultMatchWidth:"wide",parsePatterns:sh,defaultParseWidth:"any"}),day:zt({matchPatterns:ah,defaultMatchWidth:"wide",parsePatterns:ih,defaultParseWidth:"any"}),dayPeriod:zt({matchPatterns:ch,defaultMatchWidth:"any",parsePatterns:lh,defaultParseWidth:"any"})},xr={code:"en-US",formatDistance:Ff,formatLong:$f,formatRelative:Vf,localize:Gf,match:dh,options:{weekStartsOn:0,firstWeekContainsDate:1}};function uh(e,t){const n=J(e,t==null?void 0:t.in);return Ua(n,Ga(n))+1}function Xa(e,t){const n=J(e,t==null?void 0:t.in),r=+Ht(n)-+wf(n);return Math.round(r/Ha)+1}function Qa(e,t){var u,d,h,p;const n=J(e,t==null?void 0:t.in),r=n.getFullYear(),o=$t(),s=(t==null?void 0:t.firstWeekContainsDate)??((d=(u=t==null?void 0:t.locale)==null?void 0:u.options)==null?void 0:d.firstWeekContainsDate)??o.firstWeekContainsDate??((p=(h=o.locale)==null?void 0:h.options)==null?void 0:p.firstWeekContainsDate)??1,i=de((t==null?void 0:t.in)||e,0);i.setFullYear(r+1,0,s),i.setHours(0,0,0,0);const a=Mt(i,t),c=de((t==null?void 0:t.in)||e,0);c.setFullYear(r,0,s),c.setHours(0,0,0,0);const l=Mt(c,t);return+n>=+a?r+1:+n>=+l?r:r-1}function fh(e,t){var a,c,l,u;const n=$t(),r=(t==null?void 0:t.firstWeekContainsDate)??((c=(a=t==null?void 0:t.locale)==null?void 0:a.options)==null?void 0:c.firstWeekContainsDate)??n.firstWeekContainsDate??((u=(l=n.locale)==null?void 0:l.options)==null?void 0:u.firstWeekContainsDate)??1,o=Qa(e,t),s=de((t==null?void 0:t.in)||e,0);return s.setFullYear(o,0,r),s.setHours(0,0,0,0),Mt(s,t)}function Za(e,t){const n=J(e,t==null?void 0:t.in),r=+Mt(n,t)-+fh(n,t);return Math.round(r/Ha)+1}function X(e,t){const n=e<0?"-":"",r=Math.abs(e).toString().padStart(t,"0");return n+r}const et={y(e,t){const n=e.getFullYear(),r=n>0?n:1-n;return X(t==="yy"?r%100:r,t.length)},M(e,t){const n=e.getMonth();return t==="M"?String(n+1):X(n+1,2)},d(e,t){return X(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 X(e.getHours()%12||12,t.length)},H(e,t){return X(e.getHours(),t.length)},m(e,t){return X(e.getMinutes(),t.length)},s(e,t){return X(e.getSeconds(),t.length)},S(e,t){const n=t.length,r=e.getMilliseconds(),o=Math.trunc(r*Math.pow(10,n-3));return X(o,t.length)}},Ot={midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},Ja={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 et.y(e,t)},Y:function(e,t,n,r){const o=Qa(e,r),s=o>0?o:1-o;if(t==="YY"){const i=s%100;return X(i,2)}return t==="Yo"?n.ordinalNumber(s,{unit:"year"}):X(s,t.length)},R:function(e,t){const n=Ra(e);return X(n,t.length)},u:function(e,t){const n=e.getFullYear();return X(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 X(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 X(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 et.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 X(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=Za(e,r);return t==="wo"?n.ordinalNumber(o,{unit:"week"}):X(o,t.length)},I:function(e,t,n){const r=Xa(e);return t==="Io"?n.ordinalNumber(r,{unit:"week"}):X(r,t.length)},d:function(e,t,n){return t==="do"?n.ordinalNumber(e.getDate(),{unit:"date"}):et.d(e,t)},D:function(e,t,n){const r=uh(e);return t==="Do"?n.ordinalNumber(r,{unit:"dayOfYear"}):X(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(),s=(o-r.weekStartsOn+8)%7||7;switch(t){case"e":return String(s);case"ee":return X(s,2);case"eo":return n.ordinalNumber(s,{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(),s=(o-r.weekStartsOn+8)%7||7;switch(t){case"c":return String(s);case"cc":return X(s,t.length);case"co":return n.ordinalNumber(s,{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 X(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=Ot.noon:r===0?o=Ot.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=Ot.evening:r>=12?o=Ot.afternoon:r>=4?o=Ot.morning:o=Ot.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 et.h(e,t)},H:function(e,t,n){return t==="Ho"?n.ordinalNumber(e.getHours(),{unit:"hour"}):et.H(e,t)},K:function(e,t,n){const r=e.getHours()%12;return t==="Ko"?n.ordinalNumber(r,{unit:"hour"}):X(r,t.length)},k:function(e,t,n){let r=e.getHours();return r===0&&(r=24),t==="ko"?n.ordinalNumber(r,{unit:"hour"}):X(r,t.length)},m:function(e,t,n){return t==="mo"?n.ordinalNumber(e.getMinutes(),{unit:"minute"}):et.m(e,t)},s:function(e,t,n){return t==="so"?n.ordinalNumber(e.getSeconds(),{unit:"second"}):et.s(e,t)},S:function(e,t){return et.S(e,t)},X:function(e,t,n){const r=e.getTimezoneOffset();if(r===0)return"Z";switch(t){case"X":return ti(r);case"XXXX":case"XX":return ct(r);case"XXXXX":case"XXX":default:return ct(r,":")}},x:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"x":return ti(r);case"xxxx":case"xx":return ct(r);case"xxxxx":case"xxx":default:return ct(r,":")}},O:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"O":case"OO":case"OOO":return"GMT"+ei(r,":");case"OOOO":default:return"GMT"+ct(r,":")}},z:function(e,t,n){const r=e.getTimezoneOffset();switch(t){case"z":case"zz":case"zzz":return"GMT"+ei(r,":");case"zzzz":default:return"GMT"+ct(r,":")}},t:function(e,t,n){const r=Math.trunc(+e/1e3);return X(r,t.length)},T:function(e,t,n){return X(+e,t.length)}};function ei(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=Math.trunc(r/60),s=r%60;return s===0?n+String(o):n+String(o)+t+X(s,2)}function ti(e,t){return e%60===0?(e>0?"-":"+")+X(Math.abs(e)/60,2):ct(e,t)}function ct(e,t=""){const n=e>0?"-":"+",r=Math.abs(e),o=X(Math.trunc(r/60),2),s=X(r%60,2);return n+o+t+s}const ni=(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"})}},ri=(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"})}},hh={p:ri,P:(e,t)=>{const n=e.match(/(P+)(p+)?/)||[],r=n[1],o=n[2];if(!o)return ni(e,t);let s;switch(r){case"P":s=t.dateTime({width:"short"});break;case"PP":s=t.dateTime({width:"medium"});break;case"PPP":s=t.dateTime({width:"long"});break;case"PPPP":default:s=t.dateTime({width:"full"});break}return s.replace("{{date}}",ni(r,t)).replace("{{time}}",ri(o,t))}},mh=/^D+$/,ph=/^Y+$/,gh=["D","DD","YY","YYYY"];function vh(e){return mh.test(e)}function yh(e){return ph.test(e)}function bh(e,t,n){const r=wh(e,t,n);if(console.warn(r),gh.includes(e))throw new RangeError(r)}function wh(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 xh=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,Ch=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,Sh=/^'([^]*?)'?$/,Eh=/''/g,kh=/[a-zA-Z]/;function Cr(e,t,n){var u,d,h,p,x,f,y,m;const r=$t(),o=(n==null?void 0:n.locale)??r.locale??xr,s=(n==null?void 0:n.firstWeekContainsDate)??((d=(u=n==null?void 0:n.locale)==null?void 0:u.options)==null?void 0:d.firstWeekContainsDate)??r.firstWeekContainsDate??((p=(h=r.locale)==null?void 0:h.options)==null?void 0:p.firstWeekContainsDate)??1,i=(n==null?void 0:n.weekStartsOn)??((f=(x=n==null?void 0:n.locale)==null?void 0:x.options)==null?void 0:f.weekStartsOn)??r.weekStartsOn??((m=(y=r.locale)==null?void 0:y.options)==null?void 0:m.weekStartsOn)??0,a=J(e,n==null?void 0:n.in);if(!Mf(a))throw new RangeError("Invalid time value");let c=t.match(Ch).map(v=>{const w=v[0];if(w==="p"||w==="P"){const S=hh[w];return S(v,o.formatLong)}return v}).join("").match(xh).map(v=>{if(v==="''")return{isToken:!1,value:"'"};const w=v[0];if(w==="'")return{isToken:!1,value:Mh(v)};if(Ja[w])return{isToken:!0,value:v};if(w.match(kh))throw new RangeError("Format string contains an unescaped latin alphabet character `"+w+"`");return{isToken:!1,value:v}});o.localize.preprocessor&&(c=o.localize.preprocessor(a,c));const l={firstWeekContainsDate:s,weekStartsOn:i,locale:o};return c.map(v=>{if(!v.isToken)return v.value;const w=v.value;(!(n!=null&&n.useAdditionalWeekYearTokens)&&yh(w)||!(n!=null&&n.useAdditionalDayOfYearTokens)&&vh(w))&&bh(w,t,String(e));const S=Ja[w[0]];return S(a,w,o.localize,l)}).join("")}function Mh(e){const t=e.match(Sh);return t?t[1].replace(Eh,"'"):e}function Nh(e,t){const n=J(e,t==null?void 0:t.in),r=n.getFullYear(),o=n.getMonth(),s=de(n,0);return s.setFullYear(r,o+1,0),s.setHours(0,0,0,0),s.getDate()}function Oh(e,t){return J(e,t==null?void 0:t.in).getMonth()}function Ph(e,t){return J(e,t==null?void 0:t.in).getFullYear()}function Dh(e,t){return+J(e)>+J(t)}function Th(e,t){return+J(e)<+J(t)}function Ah(e,t,n){const[r,o]=Nt(n==null?void 0:n.in,e,t);return r.getFullYear()===o.getFullYear()&&r.getMonth()===o.getMonth()}function Wh(e,t,n){const[r,o]=Nt(n==null?void 0:n.in,e,t);return r.getFullYear()===o.getFullYear()}function _h(e,t,n){const r=J(e,n==null?void 0:n.in),o=r.getFullYear(),s=r.getDate(),i=de(e,0);i.setFullYear(o,t,15),i.setHours(0,0,0,0);const a=Nh(i);return r.setMonth(t,Math.min(s,a)),r}function Fh(e,t,n){const r=J(e,n==null?void 0:n.in);return isNaN(+r)?de(e,NaN):(r.setFullYear(t),r)}const Sr={},Rt={};function jt(e,t){try{const r=(Sr[e]||(Sr[e]=new Intl.DateTimeFormat("en-GB",{timeZone:e,hour:"numeric",timeZoneName:"longOffset"}).format))(t).split("GMT")[1]||"";return r in Rt?Rt[r]:oi(r,r.split(":"))}catch{if(e in Rt)return Rt[e];const n=e==null?void 0:e.match(Ih);return n?oi(e,n.slice(1)):NaN}}const Ih=/([+-]\d\d):?(\d\d)?/;function oi(e,t){const n=+t[0],r=+(t[1]||0);return Rt[e]=n>0?n*60+r:n*60-r}class We extends Date{constructor(...t){super(),t.length>1&&typeof t[t.length-1]=="string"&&(this.timeZone=t.pop()),this.internal=new Date,isNaN(jt(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)),ai(this),Er(this)):this.setTime(Date.now())}static tz(t,...n){return n.length?new We(...n,t):new We(Date.now(),t)}withTimeZone(t){return new We(+this,t)}getTimezoneOffset(){return-jt(this.timeZone,this)}setTime(t){return Date.prototype.setTime.apply(this,arguments),Er(this),+this}[Symbol.for("constructDateFrom")](t){return new We(+new Date(t),this.timeZone)}}const si=/^(get|set)(?!UTC)/;Object.getOwnPropertyNames(Date.prototype).forEach(e=>{if(!si.test(e))return;const t=e.replace(si,"$1UTC");We.prototype[t]&&(e.startsWith("get")?We.prototype[e]=function(){return this.internal[t]()}:(We.prototype[e]=function(){return Date.prototype[t].apply(this.internal,arguments),Bh(this),+this},We.prototype[t]=function(){return Date.prototype[t].apply(this,arguments),Er(this),+this}))});function Er(e){e.internal.setTime(+e),e.internal.setUTCMinutes(e.internal.getUTCMinutes()-e.getTimezoneOffset())}function Bh(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()),ai(e)}function ai(e){const t=jt(e.timeZone,e),n=new Date(+e);n.setUTCHours(n.getUTCHours()-1);const r=-new Date(+e).getTimezoneOffset(),o=-new Date(+n).getTimezoneOffset(),s=r-o,i=Date.prototype.getHours.apply(e)!==e.internal.getUTCHours();s&&i&&e.internal.setUTCMinutes(e.internal.getUTCMinutes()+s);const a=r-t;a&&Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+a);const c=jt(e.timeZone,e),u=-new Date(+e).getTimezoneOffset()-c,d=c!==t,h=u-a;if(d&&h){Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+h);const p=jt(e.timeZone,e),x=c-p;x&&(e.internal.setUTCMinutes(e.internal.getUTCMinutes()+x),Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+x))}}class fe extends We{static tz(t,...n){return n.length?new fe(...n,t):new fe(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} (${Lh(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 fe(+this,t)}[Symbol.for("constructDateFrom")](t){return new fe(+new Date(t),this.timeZone)}}function Lh(e,t){return new Intl.DateTimeFormat("en-GB",{timeZone:e,timeZoneName:"long"}).format(t).slice(12)}var A;(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"})(A||(A={}));var ae;(function(e){e.disabled="disabled",e.hidden="hidden",e.outside="outside",e.focused="focused",e.today="today"})(ae||(ae={}));var ke;(function(e){e.range_end="range_end",e.range_middle="range_middle",e.range_start="range_start",e.selected="selected"})(ke||(ke={}));var ye;(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"})(ye||(ye={}));const ii=5,$h=4;function Hh(e,t){const n=t.startOfMonth(e),r=n.getDay()>0?n.getDay():7,o=t.addDays(e,-r+1),s=t.addDays(o,ii*7-1);return t.getMonth(e)===t.getMonth(s)?ii:$h}function ci(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 Vh(e,t){const n=ci(e,t),r=Hh(e,t);return t.addDays(n,r*7-1)}class Ve{constructor(t,n){this.Date=Date,this.today=()=>{var r;return(r=this.overrides)!=null&&r.today?this.overrides.today():this.options.timeZone?fe.tz(this.options.timeZone):new this.Date},this.newDate=(r,o,s)=>{var i;return(i=this.overrides)!=null&&i.newDate?this.overrides.newDate(r,o,s):this.options.timeZone?new fe(r,o,s,this.options.timeZone):new Date(r,o,s)},this.addDays=(r,o)=>{var s;return(s=this.overrides)!=null&&s.addDays?this.overrides.addDays(r,o):Ya(r,o)},this.addMonths=(r,o)=>{var s;return(s=this.overrides)!=null&&s.addMonths?this.overrides.addMonths(r,o):za(r,o)},this.addWeeks=(r,o)=>{var s;return(s=this.overrides)!=null&&s.addWeeks?this.overrides.addWeeks(r,o):xf(r,o)},this.addYears=(r,o)=>{var s;return(s=this.overrides)!=null&&s.addYears?this.overrides.addYears(r,o):Cf(r,o)},this.differenceInCalendarDays=(r,o)=>{var s;return(s=this.overrides)!=null&&s.differenceInCalendarDays?this.overrides.differenceInCalendarDays(r,o):Ua(r,o)},this.differenceInCalendarMonths=(r,o)=>{var s;return(s=this.overrides)!=null&&s.differenceInCalendarMonths?this.overrides.differenceInCalendarMonths(r,o):Nf(r,o)},this.eachMonthOfInterval=r=>{var o;return(o=this.overrides)!=null&&o.eachMonthOfInterval?this.overrides.eachMonthOfInterval(r):Df(r)},this.endOfBroadcastWeek=r=>{var o;return(o=this.overrides)!=null&&o.endOfBroadcastWeek?this.overrides.endOfBroadcastWeek(r):Vh(r,this)},this.endOfISOWeek=r=>{var o;return(o=this.overrides)!=null&&o.endOfISOWeek?this.overrides.endOfISOWeek(r):Wf(r)},this.endOfMonth=r=>{var o;return(o=this.overrides)!=null&&o.endOfMonth?this.overrides.endOfMonth(r):Of(r)},this.endOfWeek=(r,o)=>{var s;return(s=this.overrides)!=null&&s.endOfWeek?this.overrides.endOfWeek(r,o):Ka(r,this.options)},this.endOfYear=r=>{var o;return(o=this.overrides)!=null&&o.endOfYear?this.overrides.endOfYear(r):Af(r)},this.format=(r,o,s)=>{var a;const i=(a=this.overrides)!=null&&a.format?this.overrides.format(r,o,this.options):Cr(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):Xa(r)},this.getMonth=(r,o)=>{var s;return(s=this.overrides)!=null&&s.getMonth?this.overrides.getMonth(r,this.options):Oh(r,this.options)},this.getYear=(r,o)=>{var s;return(s=this.overrides)!=null&&s.getYear?this.overrides.getYear(r,this.options):Ph(r,this.options)},this.getWeek=(r,o)=>{var s;return(s=this.overrides)!=null&&s.getWeek?this.overrides.getWeek(r,this.options):Za(r,this.options)},this.isAfter=(r,o)=>{var s;return(s=this.overrides)!=null&&s.isAfter?this.overrides.isAfter(r,o):Dh(r,o)},this.isBefore=(r,o)=>{var s;return(s=this.overrides)!=null&&s.isBefore?this.overrides.isBefore(r,o):Th(r,o)},this.isDate=r=>{var o;return(o=this.overrides)!=null&&o.isDate?this.overrides.isDate(r):qa(r)},this.isSameDay=(r,o)=>{var s;return(s=this.overrides)!=null&&s.isSameDay?this.overrides.isSameDay(r,o):kf(r,o)},this.isSameMonth=(r,o)=>{var s;return(s=this.overrides)!=null&&s.isSameMonth?this.overrides.isSameMonth(r,o):Ah(r,o)},this.isSameYear=(r,o)=>{var s;return(s=this.overrides)!=null&&s.isSameYear?this.overrides.isSameYear(r,o):Wh(r,o)},this.max=r=>{var o;return(o=this.overrides)!=null&&o.max?this.overrides.max(r):Sf(r)},this.min=r=>{var o;return(o=this.overrides)!=null&&o.min?this.overrides.min(r):Ef(r)},this.setMonth=(r,o)=>{var s;return(s=this.overrides)!=null&&s.setMonth?this.overrides.setMonth(r,o):_h(r,o)},this.setYear=(r,o)=>{var s;return(s=this.overrides)!=null&&s.setYear?this.overrides.setYear(r,o):Fh(r,o)},this.startOfBroadcastWeek=(r,o)=>{var s;return(s=this.overrides)!=null&&s.startOfBroadcastWeek?this.overrides.startOfBroadcastWeek(r,this):ci(r,this)},this.startOfDay=r=>{var o;return(o=this.overrides)!=null&&o.startOfDay?this.overrides.startOfDay(r):Vt(r)},this.startOfISOWeek=r=>{var o;return(o=this.overrides)!=null&&o.startOfISOWeek?this.overrides.startOfISOWeek(r):Ht(r)},this.startOfMonth=r=>{var o;return(o=this.overrides)!=null&&o.startOfMonth?this.overrides.startOfMonth(r):Tf(r)},this.startOfWeek=(r,o)=>{var s;return(s=this.overrides)!=null&&s.startOfWeek?this.overrides.startOfWeek(r,this.options):Mt(r,this.options)},this.startOfYear=r=>{var o;return(o=this.overrides)!=null&&o.startOfYear?this.overrides.startOfYear(r):Ga(r)},this.options={locale:xr,...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 _e=new Ve;class li{constructor(t,n,r=_e){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 Yh{constructor(t,n){this.date=t,this.weeks=n}}class zh{constructor(t,n){this.days=n,this.weekNumber=t}}function Ye(e,t,n=!1,r=_e){let{from:o,to:s}=e;const{differenceInCalendarDays:i,isSameDay:a}=r;return o&&s?(i(s,o)<0&&([o,s]=[s,o]),i(t,o)>=(n?1:0)&&i(s,t)>=(n?1:0)):!n&&s?a(s,t):!n&&o?a(o,t):!1}function di(e){return!!(e&&typeof e=="object"&&"before"in e&&"after"in e)}function kr(e){return!!(e&&typeof e=="object"&&"from"in e)}function ui(e){return!!(e&&typeof e=="object"&&"after"in e)}function fi(e){return!!(e&&typeof e=="object"&&"before"in e)}function hi(e){return!!(e&&typeof e=="object"&&"dayOfWeek"in e)}function mi(e,t){return Array.isArray(e)&&e.every(t.isDate)}function ze(e,t,n=_e){const r=Array.isArray(t)?t:[t],{isSameDay:o,differenceInCalendarDays:s,isAfter:i}=n;return r.some(a=>{if(typeof a=="boolean")return a;if(n.isDate(a))return o(e,a);if(mi(a,n))return a.includes(e);if(kr(a))return Ye(a,e,!1,n);if(hi(a))return Array.isArray(a.dayOfWeek)?a.dayOfWeek.includes(e.getDay()):a.dayOfWeek===e.getDay();if(di(a)){const c=s(a.before,e),l=s(a.after,e),u=c>0,d=l<0;return i(a.before,a.after)?d&&u:u||d}return ui(a)?s(e,a.after)>0:fi(a)?s(a.before,e)>0:typeof a=="function"?a(e):!1})}function Rh(e,t,n){const{disabled:r,hidden:o,modifiers:s,showOutsideDays:i,broadcastCalendar:a,today:c}=t,{isSameDay:l,isSameMonth:u,startOfMonth:d,isBefore:h,endOfMonth:p,isAfter:x}=n,f=t.startMonth&&d(t.startMonth),y=t.endMonth&&p(t.endMonth),m={[ae.focused]:[],[ae.outside]:[],[ae.disabled]:[],[ae.hidden]:[],[ae.today]:[]},v={};for(const w of e){const{date:S,displayMonth:C}=w,M=!!(C&&!u(S,C)),E=!!(f&&h(S,f)),O=!!(y&&x(S,y)),_=!!(r&&ze(S,r,n)),T=!!(o&&ze(S,o,n))||E||O||!a&&!i&&M||a&&i===!1&&M,D=l(S,c??n.today());M&&m.outside.push(w),_&&m.disabled.push(w),T&&m.hidden.push(w),D&&m.today.push(w),s&&Object.keys(s).forEach(N=>{const B=s==null?void 0:s[N];B&&ze(S,B,n)&&(v[N]?v[N].push(w):v[N]=[w])})}return w=>{const S={[ae.focused]:!1,[ae.disabled]:!1,[ae.hidden]:!1,[ae.outside]:!1,[ae.today]:!1},C={};for(const M in m){const E=m[M];S[M]=E.some(O=>O===w)}for(const M in v)C[M]=v[M].some(E=>E===w);return{...S,...C}}}function jh(e,t,n={}){return Object.entries(e).filter(([,o])=>o===!0).reduce((o,[s])=>(n[s]?o.push(n[s]):t[ae[s]]?o.push(t[ae[s]]):t[ke[s]]&&o.push(t[ke[s]]),o),[t[A.Day]])}function Uh(e){return k.createElement("button",{...e})}function qh(e){return k.createElement("span",{...e})}function Gh(e){const{size:t=24,orientation:n="left",className:r}=e;return k.createElement("svg",{className:r,width:t,height:t,viewBox:"0 0 24 24"},n==="up"&&k.createElement("polygon",{points:"6.77 17 12.5 11.43 18.24 17 20 15.28 12.5 8 5 15.28"}),n==="down"&&k.createElement("polygon",{points:"6.77 8 12.5 13.57 18.24 8 20 9.72 12.5 17 5 9.72"}),n==="left"&&k.createElement("polygon",{points:"16 18.112 9.81111111 12 16 5.87733333 14.0888889 4 6 12 14.0888889 20"}),n==="right"&&k.createElement("polygon",{points:"8 18.112 14.18888889 12 8 5.87733333 9.91111111 4 18 12 9.91111111 20"}))}function Kh(e){const{day:t,modifiers:n,...r}=e;return k.createElement("td",{...r})}function Xh(e){const{day:t,modifiers:n,...r}=e,o=k.useRef(null);return k.useEffect(()=>{var s;n.focused&&((s=o.current)==null||s.focus())},[n.focused]),k.createElement("button",{ref:o,...r})}function Qh(e){const{options:t,className:n,components:r,classNames:o,...s}=e,i=[o[A.Dropdown],n].join(" "),a=t==null?void 0:t.find(({value:c})=>c===s.value);return k.createElement("span",{"data-disabled":s.disabled,className:o[A.DropdownRoot]},k.createElement(r.Select,{className:i,...s},t==null?void 0:t.map(({value:c,label:l,disabled:u})=>k.createElement(r.Option,{key:c,value:c,disabled:u},l))),k.createElement("span",{className:o[A.CaptionLabel],"aria-hidden":!0},a==null?void 0:a.label,k.createElement(r.Chevron,{orientation:"down",size:18,className:o[A.Chevron]})))}function Zh(e){return k.createElement("div",{...e})}function Jh(e){return k.createElement("div",{...e})}function em(e){const{calendarMonth:t,displayIndex:n,...r}=e;return k.createElement("div",{...r},e.children)}function tm(e){const{calendarMonth:t,displayIndex:n,...r}=e;return k.createElement("div",{...r})}function nm(e){return k.createElement("table",{...e})}function rm(e){return k.createElement("div",{...e})}const pi=k.createContext(void 0);function Ut(){const e=k.useContext(pi);if(e===void 0)throw new Error("useDayPicker() must be used within a custom component.");return e}function om(e){const{components:t}=Ut();return k.createElement(t.Dropdown,{...e})}function sm(e){const{onPreviousClick:t,onNextClick:n,previousMonth:r,nextMonth:o,...s}=e,{components:i,classNames:a,labels:{labelPrevious:c,labelNext:l}}=Ut(),u=k.useCallback(h=>{o&&(n==null||n(h))},[o,n]),d=k.useCallback(h=>{r&&(t==null||t(h))},[r,t]);return k.createElement("nav",{...s},k.createElement(i.PreviousMonthButton,{type:"button",className:a[A.PreviousMonthButton],tabIndex:r?void 0:-1,"aria-disabled":r?void 0:!0,"aria-label":c(r),onClick:d},k.createElement(i.Chevron,{disabled:r?void 0:!0,className:a[A.Chevron],orientation:"left"})),k.createElement(i.NextMonthButton,{type:"button",className:a[A.NextMonthButton],tabIndex:o?void 0:-1,"aria-disabled":o?void 0:!0,"aria-label":l(o),onClick:u},k.createElement(i.Chevron,{disabled:o?void 0:!0,orientation:"right",className:a[A.Chevron]})))}function am(e){const{components:t}=Ut();return k.createElement(t.Button,{...e})}function im(e){return k.createElement("option",{...e})}function cm(e){const{components:t}=Ut();return k.createElement(t.Button,{...e})}function lm(e){const{rootRef:t,...n}=e;return k.createElement("div",{...n,ref:t})}function dm(e){return k.createElement("select",{...e})}function um(e){const{week:t,...n}=e;return k.createElement("tr",{...n})}function fm(e){return k.createElement("th",{...e})}function hm(e){return k.createElement("thead",{"aria-hidden":!0},k.createElement("tr",{...e}))}function mm(e){const{week:t,...n}=e;return k.createElement("th",{...n})}function pm(e){return k.createElement("th",{...e})}function gm(e){return k.createElement("tbody",{...e})}function vm(e){const{components:t}=Ut();return k.createElement(t.Dropdown,{...e})}const ym=Object.freeze(Object.defineProperty({__proto__:null,Button:Uh,CaptionLabel:qh,Chevron:Gh,Day:Kh,DayButton:Xh,Dropdown:Qh,DropdownNav:Zh,Footer:Jh,Month:em,MonthCaption:tm,MonthGrid:nm,Months:rm,MonthsDropdown:om,Nav:sm,NextMonthButton:am,Option:im,PreviousMonthButton:cm,Root:lm,Select:dm,Week:um,WeekNumber:mm,WeekNumberHeader:pm,Weekday:fm,Weekdays:hm,Weeks:gm,YearsDropdown:vm},Symbol.toStringTag,{value:"Module"}));function bm(e){return{...ym,...e}}function wm(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 xm(){const e={};for(const t in A)e[A[t]]=`rdp-${A[t]}`;for(const t in ae)e[ae[t]]=`rdp-${ae[t]}`;for(const t in ke)e[ke[t]]=`rdp-${ke[t]}`;for(const t in ye)e[ye[t]]=`rdp-${ye[t]}`;return e}function gi(e,t,n){return(n??new Ve(t)).format(e,"LLLL y")}const Cm=gi;function Sm(e,t,n){return(n??new Ve(t)).format(e,"d")}function Em(e,t=_e){return t.format(e,"LLLL")}function km(e,t=_e){return e<10?t.formatNumber(`0${e.toLocaleString()}`):t.formatNumber(`${e.toLocaleString()}`)}function Mm(){return""}function Nm(e,t,n){return(n??new Ve(t)).format(e,"cccccc")}function vi(e,t=_e){return t.format(e,"yyyy")}const Om=Object.freeze(Object.defineProperty({__proto__:null,formatCaption:gi,formatDay:Sm,formatMonthCaption:Cm,formatMonthDropdown:Em,formatWeekNumber:km,formatWeekNumberHeader:Mm,formatWeekdayName:Nm,formatYearCaption:vi,formatYearDropdown:vi},Symbol.toStringTag,{value:"Module"}));function Pm(e){return e!=null&&e.formatMonthCaption&&!e.formatCaption&&(e.formatCaption=e.formatMonthCaption),e!=null&&e.formatYearCaption&&!e.formatYearDropdown&&(e.formatYearDropdown=e.formatYearCaption),{...Om,...e}}function Dm(e,t,n,r,o){const{startOfMonth:s,startOfYear:i,endOfYear:a,eachMonthOfInterval:c,getMonth:l}=o;return c({start:i(e),end:a(e)}).map(h=>{const p=r.formatMonthDropdown(h,o),x=l(h),f=t&&h<s(t)||n&&h>s(n)||!1;return{value:x,label:p,disabled:f}})}function Tm(e,t={},n={}){let r={...t==null?void 0:t[A.Day]};return Object.entries(e).filter(([,o])=>o===!0).forEach(([o])=>{r={...r,...n==null?void 0:n[o]}}),r}function Am(e,t,n){const r=e.today(),o=t?e.startOfISOWeek(r):e.startOfWeek(r),s=[];for(let i=0;i<7;i++){const a=e.addDays(o,i);s.push(a)}return s}function Wm(e,t,n,r){if(!e||!t)return;const{startOfYear:o,endOfYear:s,addYears:i,getYear:a,isBefore:c,isSameYear:l}=r,u=o(e),d=s(t),h=[];let p=u;for(;c(p,d)||l(p,d);)h.push(p),p=i(p,1);return h.map(x=>{const f=n.formatYearDropdown(x,r);return{value:a(x),label:f,disabled:!1}})}function yi(e,t,n){return(n??new Ve(t)).format(e,"LLLL y")}const _m=yi;function Fm(e,t,n,r){let o=(r??new Ve(n)).format(e,"PPPP");return t!=null&&t.today&&(o=`Today, ${o}`),o}function bi(e,t,n,r){let o=(r??new Ve(n)).format(e,"PPPP");return t.today&&(o=`Today, ${o}`),t.selected&&(o=`${o}, selected`),o}const Im=bi;function Bm(){return""}function Lm(e){return"Choose the Month"}function $m(e){return"Go to the Next Month"}function Hm(e){return"Go to the Previous Month"}function Vm(e,t,n){return(n??new Ve(t)).format(e,"cccc")}function Ym(e,t){return`Week ${e}`}function zm(e){return"Week Number"}function Rm(e){return"Choose the Year"}const jm=Object.freeze(Object.defineProperty({__proto__:null,labelCaption:_m,labelDay:Im,labelDayButton:bi,labelGrid:yi,labelGridcell:Fm,labelMonthDropdown:Lm,labelNav:Bm,labelNext:$m,labelPrevious:Hm,labelWeekNumber:Ym,labelWeekNumberHeader:zm,labelWeekday:Vm,labelYearDropdown:Rm},Symbol.toStringTag,{value:"Module"})),qt=e=>e instanceof HTMLElement?e:null,Mr=e=>[...e.querySelectorAll("[data-animated-month]")??[]],Um=e=>qt(e.querySelector("[data-animated-month]")),Nr=e=>qt(e.querySelector("[data-animated-caption]")),Or=e=>qt(e.querySelector("[data-animated-weeks]")),qm=e=>qt(e.querySelector("[data-animated-nav]")),Gm=e=>qt(e.querySelector("[data-animated-weekdays]"));function Km(e,t,{classNames:n,months:r,focused:o,dateLib:s}){const i=k.useRef(null),a=k.useRef(r),c=k.useRef(!1);k.useLayoutEffect(()=>{const l=a.current;if(a.current=r,!t||!e.current||!(e.current instanceof HTMLElement)||r.length===0||l.length===0||r.length!==l.length)return;const u=s.isSameMonth(r[0].date,l[0].date),d=s.isAfter(r[0].date,l[0].date),h=d?n[ye.caption_after_enter]:n[ye.caption_before_enter],p=d?n[ye.weeks_after_enter]:n[ye.weeks_before_enter],x=i.current,f=e.current.cloneNode(!0);if(f instanceof HTMLElement?(Mr(f).forEach(w=>{if(!(w instanceof HTMLElement))return;const S=Um(w);S&&w.contains(S)&&w.removeChild(S);const C=Nr(w);C&&C.classList.remove(h);const M=Or(w);M&&M.classList.remove(p)}),i.current=f):i.current=null,c.current||u||o)return;const y=x instanceof HTMLElement?Mr(x):[],m=Mr(e.current);if(m&&m.every(v=>v instanceof HTMLElement)&&y&&y.every(v=>v instanceof HTMLElement)){c.current=!0,e.current.style.isolation="isolate";const v=qm(e.current);v&&(v.style.zIndex="1"),m.forEach((w,S)=>{const C=y[S];if(!C)return;w.style.position="relative",w.style.overflow="hidden";const M=Nr(w);M&&M.classList.add(h);const E=Or(w);E&&E.classList.add(p);const O=()=>{c.current=!1,e.current&&(e.current.style.isolation=""),v&&(v.style.zIndex=""),M&&M.classList.remove(h),E&&E.classList.remove(p),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 _=Gm(C);_&&(_.style.opacity="0");const T=Nr(C);T&&(T.classList.add(d?n[ye.caption_before_exit]:n[ye.caption_after_exit]),T.addEventListener("animationend",O));const D=Or(C);D&&D.classList.add(d?n[ye.weeks_before_exit]:n[ye.weeks_after_exit]),w.insertBefore(C,w.firstChild)})}})}function Xm(e,t,n,r){const o=e[0],s=e[e.length-1],{ISOWeek:i,fixedWeeks:a,broadcastCalendar:c}=n??{},{addDays:l,differenceInCalendarDays:u,differenceInCalendarMonths:d,endOfBroadcastWeek:h,endOfISOWeek:p,endOfMonth:x,endOfWeek:f,isAfter:y,startOfBroadcastWeek:m,startOfISOWeek:v,startOfWeek:w}=r,S=c?m(o,r):i?v(o):w(o),C=c?h(s):i?p(x(s)):f(x(s)),M=u(C,S),E=d(s,o)+1,O=[];for(let D=0;D<=M;D++){const N=l(S,D);if(t&&y(N,t))break;O.push(N)}const T=(c?35:42)*E;if(a&&O.length<T){const D=T-O.length;for(let N=0;N<D;N++){const B=l(O[O.length-1],1);O.push(B)}}return O}function Qm(e){const t=[];return e.reduce((n,r)=>{const o=r.weeks.reduce((s,i)=>[...s,...i.days],t);return[...n,...o]},t)}function Zm(e,t,n,r){const{numberOfMonths:o=1}=n,s=[];for(let i=0;i<o;i++){const a=r.addMonths(e,i);if(t&&a>t)break;s.push(a)}return s}function wi(e,t){const{month:n,defaultMonth:r,today:o=t.today(),numberOfMonths:s=1,endMonth:i,startMonth:a}=e;let c=n||r||o;const{differenceInCalendarMonths:l,addMonths:u,startOfMonth:d}=t;if(i&&l(i,c)<0){const h=-1*(s-1);c=u(i,h)}return a&&l(c,a)<0&&(c=a),d(c)}function Jm(e,t,n,r){const{addDays:o,endOfBroadcastWeek:s,endOfISOWeek:i,endOfMonth:a,endOfWeek:c,getISOWeek:l,getWeek:u,startOfBroadcastWeek:d,startOfISOWeek:h,startOfWeek:p}=r,x=e.reduce((f,y)=>{const m=n.broadcastCalendar?d(y,r):n.ISOWeek?h(y):p(y),v=n.broadcastCalendar?s(y):n.ISOWeek?i(a(y)):c(a(y)),w=t.filter(E=>E>=m&&E<=v),S=n.broadcastCalendar?35:42;if(n.fixedWeeks&&w.length<S){const E=t.filter(O=>{const _=S-w.length;return O>v&&O<=o(v,_)});w.push(...E)}const C=w.reduce((E,O)=>{const _=n.ISOWeek?l(O):u(O),T=E.find(N=>N.weekNumber===_),D=new li(O,y,r);return T?T.days.push(D):E.push(new zh(_,[D])),E},[]),M=new Yh(y,C);return f.push(M),f},[]);return n.reverseMonths?x.reverse():x}function ep(e,t){let{startMonth:n,endMonth:r}=e;const{startOfYear:o,startOfDay:s,startOfMonth:i,endOfMonth:a,addYears:c,endOfYear:l,newDate:u,today:d}=t,{fromYear:h,toYear:p,fromMonth:x,toMonth:f}=e;!n&&x&&(n=x),!n&&h&&(n=t.newDate(h,0,1)),!r&&f&&(r=f),!r&&p&&(r=u(p,11,31));const y=e.captionLayout==="dropdown"||e.captionLayout==="dropdown-years";return n?n=i(n):h?n=u(h,0,1):!n&&y&&(n=o(c(e.today??d(),-100))),r?r=a(r):p?r=u(p,11,31):!r&&y&&(r=l(e.today??d())),[n&&s(n),r&&s(r)]}function tp(e,t,n,r){if(n.disableNavigation)return;const{pagedNavigation:o,numberOfMonths:s=1}=n,{startOfMonth:i,addMonths:a,differenceInCalendarMonths:c}=r,l=o?s:1,u=i(e);if(!t)return a(u,l);if(!(c(t,e)<s))return a(u,l)}function np(e,t,n,r){if(n.disableNavigation)return;const{pagedNavigation:o,numberOfMonths:s}=n,{startOfMonth:i,addMonths:a,differenceInCalendarMonths:c}=r,l=o?s??1:1,u=i(e);if(!t)return a(u,-l);if(!(c(u,t)<=0))return a(u,-l)}function rp(e){const t=[];return e.reduce((n,r)=>[...n,...r.weeks],t)}function En(e,t){const[n,r]=k.useState(e);return[t===void 0?n:t,r]}function op(e,t){const[n,r]=ep(e,t),{startOfMonth:o,endOfMonth:s}=t,i=wi(e,t),[a,c]=En(i,e.month?i:void 0);k.useEffect(()=>{const M=wi(e,t);c(M)},[e.timeZone]);const l=Zm(a,r,e,t),u=Xm(l,e.endMonth?s(e.endMonth):void 0,e,t),d=Jm(l,u,e,t),h=rp(d),p=Qm(d),x=np(a,n,e,t),f=tp(a,r,e,t),{disableNavigation:y,onMonthChange:m}=e,v=M=>h.some(E=>E.days.some(O=>O.isEqualTo(M))),w=M=>{if(y)return;let E=o(M);n&&E<o(n)&&(E=o(n)),r&&E>o(r)&&(E=o(r)),c(E),m==null||m(E)};return{months:d,weeks:h,days:p,navStart:n,navEnd:r,previousMonth:x,nextMonth:f,goToMonth:w,goToDay:M=>{v(M)||w(M.date)}}}var Fe;(function(e){e[e.Today=0]="Today",e[e.Selected=1]="Selected",e[e.LastFocused=2]="LastFocused",e[e.FocusedModifier=3]="FocusedModifier"})(Fe||(Fe={}));function xi(e){return!e[ae.disabled]&&!e[ae.hidden]&&!e[ae.outside]}function sp(e,t,n,r){let o,s=-1;for(const i of e){const a=t(i);xi(a)&&(a[ae.focused]&&s<Fe.FocusedModifier?(o=i,s=Fe.FocusedModifier):r!=null&&r.isEqualTo(i)&&s<Fe.LastFocused?(o=i,s=Fe.LastFocused):n(i.date)&&s<Fe.Selected?(o=i,s=Fe.Selected):a[ae.today]&&s<Fe.Today&&(o=i,s=Fe.Today))}return o||(o=e.find(i=>xi(t(i)))),o}function ap(e,t,n,r,o,s,i){const{ISOWeek:a,broadcastCalendar:c}=s,{addDays:l,addMonths:u,addWeeks:d,addYears:h,endOfBroadcastWeek:p,endOfISOWeek:x,endOfWeek:f,max:y,min:m,startOfBroadcastWeek:v,startOfISOWeek:w,startOfWeek:S}=i;let M={day:l,week:d,month:u,year:h,startOfWeek:E=>c?v(E,i):a?w(E):S(E),endOfWeek:E=>c?p(E):a?x(E):f(E)}[e](n,t==="after"?1:-1);return t==="before"&&r?M=y([r,M]):t==="after"&&o&&(M=m([o,M])),M}function Ci(e,t,n,r,o,s,i,a=0){if(a>365)return;const c=ap(e,t,n.date,r,o,s,i),l=!!(s.disabled&&ze(c,s.disabled,i)),u=!!(s.hidden&&ze(c,s.hidden,i)),d=c,h=new li(c,d,i);return!l&&!u?h:Ci(e,t,h,r,o,s,i,a+1)}function ip(e,t,n,r,o){const{autoFocus:s}=e,[i,a]=k.useState(),c=sp(t.days,n,r||(()=>!1),i),[l,u]=k.useState(s?c:void 0);return{isFocusTarget:f=>!!(c!=null&&c.isEqualTo(f)),setFocused:u,focused:l,blur:()=>{a(l),u(void 0)},moveFocus:(f,y)=>{if(!l)return;const m=Ci(f,y,l,t.navStart,t.navEnd,e,o);m&&(t.goToDay(m),u(m))}}}function cp(e,t){const{selected:n,required:r,onSelect:o}=e,[s,i]=En(n,o?n:void 0),a=o?n:s,{isSameDay:c}=t,l=p=>(a==null?void 0:a.some(x=>c(x,p)))??!1,{min:u,max:d}=e;return{selected:a,select:(p,x,f)=>{let y=[...a??[]];if(l(p)){if((a==null?void 0:a.length)===u||r&&(a==null?void 0:a.length)===1)return;y=a==null?void 0:a.filter(m=>!c(m,p))}else(a==null?void 0:a.length)===d?y=[p]:y=[...y,p];return o||i(y),o==null||o(y,p,x,f),y},isSelected:l}}function lp(e,t,n=0,r=0,o=!1,s=_e){const{from:i,to:a}=t||{},{isSameDay:c,isAfter:l,isBefore:u}=s;let d;if(!i&&!a)d={from:e,to:n>0?void 0:e};else if(i&&!a)c(i,e)?o?d={from:i,to:void 0}:d=void 0:u(e,i)?d={from:e,to:i}:d={from:i,to:e};else if(i&&a)if(c(i,e)&&c(a,e))o?d={from:i,to:a}:d=void 0;else if(c(i,e))d={from:i,to:n>0?void 0:e};else if(c(a,e))d={from:e,to:n>0?void 0:e};else if(u(e,i))d={from:e,to:a};else if(l(e,i))d={from:i,to:e};else if(l(e,a))d={from:i,to:e};else throw new Error("Invalid range");if(d!=null&&d.from&&(d!=null&&d.to)){const h=s.differenceInCalendarDays(d.to,d.from);r>0&&h>r?d={from:e,to:void 0}:n>1&&h<n&&(d={from:e,to:void 0})}return d}function dp(e,t,n=_e){const r=Array.isArray(t)?t:[t];let o=e.from;const s=n.differenceInCalendarDays(e.to,e.from),i=Math.min(s,6);for(let a=0;a<=i;a++){if(r.includes(o.getDay()))return!0;o=n.addDays(o,1)}return!1}function Si(e,t,n=_e){return Ye(e,t.from,!1,n)||Ye(e,t.to,!1,n)||Ye(t,e.from,!1,n)||Ye(t,e.to,!1,n)}function up(e,t,n=_e){const r=Array.isArray(t)?t:[t];if(r.filter(a=>typeof a!="function").some(a=>typeof a=="boolean"?a:n.isDate(a)?Ye(e,a,!1,n):mi(a,n)?a.some(c=>Ye(e,c,!1,n)):kr(a)?a.from&&a.to?Si(e,{from:a.from,to:a.to},n):!1:hi(a)?dp(e,a.dayOfWeek,n):di(a)?n.isAfter(a.before,a.after)?Si(e,{from:n.addDays(a.after,1),to:n.addDays(a.before,-1)},n):ze(e.from,a,n)||ze(e.to,a,n):ui(a)||fi(a)?ze(e.from,a,n)||ze(e.to,a,n):!1))return!0;const i=r.filter(a=>typeof a=="function");if(i.length){let a=e.from;const c=n.differenceInCalendarDays(e.to,e.from);for(let l=0;l<=c;l++){if(i.some(u=>u(a)))return!0;a=n.addDays(a,1)}}return!1}function fp(e,t){const{disabled:n,excludeDisabled:r,selected:o,required:s,onSelect:i}=e,[a,c]=En(o,i?o:void 0),l=i?o:a;return{selected:l,select:(h,p,x)=>{const{min:f,max:y}=e,m=h?lp(h,l,f,y,s,t):void 0;return r&&n&&(m!=null&&m.from)&&m.to&&up({from:m.from,to:m.to},n,t)&&(m.from=h,m.to=void 0),i||c(m),i==null||i(m,h,p,x),m},isSelected:h=>l&&Ye(l,h,!1,t)}}function hp(e,t){const{selected:n,required:r,onSelect:o}=e,[s,i]=En(n,o?n:void 0),a=o?n:s,{isSameDay:c}=t;return{selected:a,select:(d,h,p)=>{let x=d;return!r&&a&&a&&c(d,a)&&(x=void 0),o||i(x),o==null||o(x,d,h,p),x},isSelected:d=>a?c(a,d):!1}}function mp(e,t){const n=hp(e,t),r=cp(e,t),o=fp(e,t);switch(e.mode){case"single":return n;case"multiple":return r;case"range":return o;default:return}}function pp(e){var Zi;let t=e;t.timeZone&&(t={...e},t.today&&(t.today=new fe(t.today,t.timeZone)),t.month&&(t.month=new fe(t.month,t.timeZone)),t.defaultMonth&&(t.defaultMonth=new fe(t.defaultMonth,t.timeZone)),t.startMonth&&(t.startMonth=new fe(t.startMonth,t.timeZone)),t.endMonth&&(t.endMonth=new fe(t.endMonth,t.timeZone)),t.mode==="single"&&t.selected?t.selected=new fe(t.selected,t.timeZone):t.mode==="multiple"&&t.selected?t.selected=(Zi=t.selected)==null?void 0:Zi.map(R=>new fe(R,t.timeZone)):t.mode==="range"&&t.selected&&(t.selected={from:t.selected.from?new fe(t.selected.from,t.timeZone):void 0,to:t.selected.to?new fe(t.selected.to,t.timeZone):void 0}));const{components:n,formatters:r,labels:o,dateLib:s,locale:i,classNames:a}=k.useMemo(()=>{const R={...xr,...t.locale};return{dateLib:new Ve({locale:R,weekStartsOn:t.broadcastCalendar?1:t.weekStartsOn,firstWeekContainsDate:t.firstWeekContainsDate,useAdditionalWeekYearTokens:t.useAdditionalWeekYearTokens,useAdditionalDayOfYearTokens:t.useAdditionalDayOfYearTokens,timeZone:t.timeZone,numerals:t.numerals},t.dateLib),components:bm(t.components),formatters:Pm(t.formatters),labels:{...jm,...t.labels},locale:R,classNames:{...xm(),...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:l,navLayout:u,numberOfMonths:d=1,onDayBlur:h,onDayClick:p,onDayFocus:x,onDayKeyDown:f,onDayMouseEnter:y,onDayMouseLeave:m,onNextClick:v,onPrevClick:w,showWeekNumber:S,styles:C}=t,{formatCaption:M,formatDay:E,formatMonthDropdown:O,formatWeekNumber:_,formatWeekNumberHeader:T,formatWeekdayName:D,formatYearDropdown:N}=r,B=op(t,s),{days:z,months:Y,navStart:L,navEnd:V,previousMonth:P,nextMonth:F,goToMonth:j}=B,oe=Rh(z,t,s),{isSelected:Me,select:Ne,selected:be}=mp(t,s)??{},{blur:Re,focused:xe,isFocusTarget:$,moveFocus:ee,setFocused:ce}=ip(t,B,oe,Me??(()=>!1),s),{labelDayButton:te,labelGridcell:G,labelGrid:K,labelMonthDropdown:me,labelNav:we,labelPrevious:lt,labelNext:dt,labelWeekday:ut,labelWeekNumber:Fr,labelWeekNumberHeader:Dt,labelYearDropdown:Yp}=o,zp=k.useMemo(()=>Am(s,t.ISOWeek),[s,t.ISOWeek]),Xi=l!==void 0||p!==void 0,Ir=k.useCallback(()=>{P&&(j(P),w==null||w(P))},[P,j,w]),Br=k.useCallback(()=>{F&&(j(F),v==null||v(F))},[j,F,v]),Rp=k.useCallback((R,se)=>ne=>{ne.preventDefault(),ne.stopPropagation(),ce(R),Ne==null||Ne(R.date,se,ne),p==null||p(R.date,se,ne)},[Ne,p,ce]),jp=k.useCallback((R,se)=>ne=>{ce(R),x==null||x(R.date,se,ne)},[x,ce]),Up=k.useCallback((R,se)=>ne=>{Re(),h==null||h(R.date,se,ne)},[Re,h]),qp=k.useCallback((R,se)=>ne=>{const nt={ArrowLeft:["day",t.dir==="rtl"?"after":"before"],ArrowRight:["day",t.dir==="rtl"?"before":"after"],ArrowDown:["week","after"],ArrowUp:["week","before"],PageUp:[ne.shiftKey?"year":"month","before"],PageDown:[ne.shiftKey?"year":"month","after"],Home:["startOfWeek","before"],End:["endOfWeek","after"]};if(nt[ne.key]){ne.preventDefault(),ne.stopPropagation();const[Oe,Mn]=nt[ne.key];ee(Oe,Mn)}f==null||f(R.date,se,ne)},[ee,f,t.dir]),Gp=k.useCallback((R,se)=>ne=>{y==null||y(R.date,se,ne)},[y]),Kp=k.useCallback((R,se)=>ne=>{m==null||m(R.date,se,ne)},[m]),Xp=k.useCallback(R=>se=>{const ne=Number(se.target.value),nt=s.setMonth(s.startOfMonth(R),ne);j(nt)},[s,j]),Qp=k.useCallback(R=>se=>{const ne=Number(se.target.value),nt=s.setYear(s.startOfMonth(R),ne);j(nt)},[s,j]),{className:Zp,style:Jp}=k.useMemo(()=>({className:[a[A.Root],t.className].filter(Boolean).join(" "),style:{...C==null?void 0:C[A.Root],...t.style}}),[a,t.className,t.style,C]),eg=wm(t),Qi=k.useRef(null);Km(Qi,!!t.animate,{classNames:a,months:Y,focused:xe,dateLib:s});const tg={dayPickerProps:t,selected:be,select:Ne,isSelected:Me,months:Y,nextMonth:F,previousMonth:P,goToMonth:j,getModifiers:oe,components:n,classNames:a,styles:C,labels:o,formatters:r};return k.createElement(pi.Provider,{value:tg},k.createElement(n.Root,{rootRef:t.animate?Qi:void 0,className:Zp,style:Jp,dir:t.dir,id:t.id,lang:t.lang,nonce:t.nonce,title:t.title,role:t.role,"aria-label":t["aria-label"],...eg},k.createElement(n.Months,{className:a[A.Months],style:C==null?void 0:C[A.Months]},!t.hideNavigation&&!u&&k.createElement(n.Nav,{"data-animated-nav":t.animate?"true":void 0,className:a[A.Nav],style:C==null?void 0:C[A.Nav],"aria-label":we(),onPreviousClick:Ir,onNextClick:Br,previousMonth:P,nextMonth:F}),Y.map((R,se)=>{const ne=Dm(R.date,L,V,r,s),nt=Wm(L,V,r,s);return k.createElement(n.Month,{"data-animated-month":t.animate?"true":void 0,className:a[A.Month],style:C==null?void 0:C[A.Month],key:se,displayIndex:se,calendarMonth:R},u==="around"&&!t.hideNavigation&&se===0&&k.createElement(n.PreviousMonthButton,{type:"button",className:a[A.PreviousMonthButton],tabIndex:P?void 0:-1,"aria-disabled":P?void 0:!0,"aria-label":lt(P),onClick:Ir,"data-animated-button":t.animate?"true":void 0},k.createElement(n.Chevron,{disabled:P?void 0:!0,className:a[A.Chevron],orientation:t.dir==="rtl"?"right":"left"})),k.createElement(n.MonthCaption,{"data-animated-caption":t.animate?"true":void 0,className:a[A.MonthCaption],style:C==null?void 0:C[A.MonthCaption],calendarMonth:R,displayIndex:se},c!=null&&c.startsWith("dropdown")?k.createElement(n.DropdownNav,{className:a[A.Dropdowns],style:C==null?void 0:C[A.Dropdowns]},c==="dropdown"||c==="dropdown-months"?k.createElement(n.MonthsDropdown,{className:a[A.MonthsDropdown],"aria-label":me(),classNames:a,components:n,disabled:!!t.disableNavigation,onChange:Xp(R.date),options:ne,style:C==null?void 0:C[A.Dropdown],value:s.getMonth(R.date)}):k.createElement("span",null,O(R.date,s)),c==="dropdown"||c==="dropdown-years"?k.createElement(n.YearsDropdown,{className:a[A.YearsDropdown],"aria-label":Yp(s.options),classNames:a,components:n,disabled:!!t.disableNavigation,onChange:Qp(R.date),options:nt,style:C==null?void 0:C[A.Dropdown],value:s.getYear(R.date)}):k.createElement("span",null,N(R.date,s)),k.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(R.date,s.options,s))):k.createElement(n.CaptionLabel,{className:a[A.CaptionLabel],role:"status","aria-live":"polite"},M(R.date,s.options,s))),u==="around"&&!t.hideNavigation&&se===d-1&&k.createElement(n.NextMonthButton,{type:"button",className:a[A.NextMonthButton],tabIndex:F?void 0:-1,"aria-disabled":F?void 0:!0,"aria-label":dt(F),onClick:Br,"data-animated-button":t.animate?"true":void 0},k.createElement(n.Chevron,{disabled:F?void 0:!0,className:a[A.Chevron],orientation:t.dir==="rtl"?"left":"right"})),se===d-1&&u==="after"&&!t.hideNavigation&&k.createElement(n.Nav,{"data-animated-nav":t.animate?"true":void 0,className:a[A.Nav],style:C==null?void 0:C[A.Nav],"aria-label":we(),onPreviousClick:Ir,onNextClick:Br,previousMonth:P,nextMonth:F}),k.createElement(n.MonthGrid,{role:"grid","aria-multiselectable":l==="multiple"||l==="range","aria-label":K(R.date,s.options,s)||void 0,className:a[A.MonthGrid],style:C==null?void 0:C[A.MonthGrid]},!t.hideWeekdays&&k.createElement(n.Weekdays,{"data-animated-weekdays":t.animate?"true":void 0,className:a[A.Weekdays],style:C==null?void 0:C[A.Weekdays]},S&&k.createElement(n.WeekNumberHeader,{"aria-label":Dt(s.options),className:a[A.WeekNumberHeader],style:C==null?void 0:C[A.WeekNumberHeader],scope:"col"},T()),zp.map((Oe,Mn)=>k.createElement(n.Weekday,{"aria-label":ut(Oe,s.options,s),className:a[A.Weekday],key:Mn,style:C==null?void 0:C[A.Weekday],scope:"col"},D(Oe,s.options,s)))),k.createElement(n.Weeks,{"data-animated-weeks":t.animate?"true":void 0,className:a[A.Weeks],style:C==null?void 0:C[A.Weeks]},R.weeks.map((Oe,Mn)=>k.createElement(n.Week,{className:a[A.Week],key:Oe.weekNumber,style:C==null?void 0:C[A.Week],week:Oe},S&&k.createElement(n.WeekNumber,{week:Oe,style:C==null?void 0:C[A.WeekNumber],"aria-label":Fr(Oe.weekNumber,{locale:i}),className:a[A.WeekNumber],scope:"row",role:"rowheader"},_(Oe.weekNumber,s)),Oe.days.map(he=>{const{date:Ie}=he,Q=oe(he);if(Q[ae.focused]=!Q.hidden&&!!(xe!=null&&xe.isEqualTo(he)),Q[ke.selected]=(Me==null?void 0:Me(Ie))||Q.selected,kr(be)){const{from:Lr,to:$r}=be;Q[ke.range_start]=!!(Lr&&$r&&s.isSameDay(Ie,Lr)),Q[ke.range_end]=!!(Lr&&$r&&s.isSameDay(Ie,$r)),Q[ke.range_middle]=Ye(be,Ie,!0,s)}const ng=Tm(Q,C,t.modifiersStyles),rg=jh(Q,a,t.modifiersClassNames),og=!Xi&&!Q.hidden?G(Ie,Q,s.options,s):void 0;return k.createElement(n.Day,{key:`${s.format(Ie,"yyyy-MM-dd")}_${s.format(he.displayMonth,"yyyy-MM")}`,day:he,modifiers:Q,className:rg.join(" "),style:ng,role:"gridcell","aria-selected":Q.selected||void 0,"aria-label":og,"data-day":s.format(Ie,"yyyy-MM-dd"),"data-month":he.outside?s.format(Ie,"yyyy-MM"):void 0,"data-selected":Q.selected||void 0,"data-disabled":Q.disabled||void 0,"data-hidden":Q.hidden||void 0,"data-outside":he.outside||void 0,"data-focused":Q.focused||void 0,"data-today":Q.today||void 0},!Q.hidden&&Xi?k.createElement(n.DayButton,{className:a[A.DayButton],style:C==null?void 0:C[A.DayButton],type:"button",day:he,modifiers:Q,disabled:Q.disabled||void 0,tabIndex:$(he)?0:-1,"aria-label":te(Ie,Q,s.options,s),onClick:Rp(he,Q),onBlur:Up(he,Q),onFocus:jp(he,Q),onKeyDown:qp(he,Q),onMouseEnter:Gp(he,Q),onMouseLeave:Kp(he,Q)},E(Ie,s.options,s)):!Q.hidden&&E(he.date,s.options,s))}))))))})),t.footer&&k.createElement(n.Footer,{className:a[A.Footer],style:C==null?void 0:C[A.Footer],role:"status","aria-live":"polite"},t.footer)))}function Ei({className:e,classNames:t,showOutsideDays:n=!0,...r}){return b.jsx(pp,{showOutsideDays:n,className:I("p-3",e),classNames:{months:"flex flex-col sm:flex-row space-y-4 sm:space-x-4 sm:space-y-0",month:"space-y-4",caption:"flex justify-center pt-1 relative items-center",caption_label:"text-sm font-medium",nav:"space-x-1 flex items-center",nav_button:I(Tn({variant:"outline"}),"h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100"),nav_button_previous:"absolute left-1",nav_button_next:"absolute right-1",table:"w-full border-collapse space-y-1",head_row:"flex",head_cell:"text-muted-foreground rounded-md w-9 font-normal text-[0.8rem]",row:"flex w-full mt-2",cell:"h-9 w-9 text-center text-sm p-0 relative [&:has([aria-selected].day-range-end)]:rounded-r-md [&:has([aria-selected].day-outside)]:bg-accent/50 [&:has([aria-selected])]:bg-accent first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md focus-within:relative focus-within:z-20",day:I(Tn({variant:"ghost"}),"h-9 w-9 p-0 font-normal aria-selected:opacity-100"),day_range_end:"day-range-end",day_selected:"bg-primary text-primary-foreground hover:bg-primary hover:text-primary-foreground focus:bg-primary focus:text-primary-foreground",day_today:"bg-accent text-accent-foreground",day_outside:"day-outside text-muted-foreground opacity-50 aria-selected:bg-accent/50 aria-selected:text-muted-foreground aria-selected:opacity-30",day_disabled:"text-muted-foreground opacity-50",day_range_middle:"aria-selected:bg-accent aria-selected:text-accent-foreground",day_hidden:"invisible",...t},components:{Chevron:({orientation:o})=>o==="left"?b.jsx(Kc,{className:"h-4 w-4"}):b.jsx(Xc,{className:"h-4 w-4"})},...r})}Ei.displayName="Calendar";var kn="Popover",[ki,mg]=pt(kn,[ln]),Gt=ln(),[gp,tt]=ki(kn),Mi=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:o,onOpenChange:s,modal:i=!1}=e,a=Gt(t),c=g.useRef(null),[l,u]=g.useState(!1),[d,h]=_t({prop:r,defaultProp:o??!1,onChange:s,caller:kn});return b.jsx(Os,{...a,children:b.jsx(gp,{scope:t,contentId:Zt(),triggerRef:c,open:d,onOpenChange:h,onOpenToggle:g.useCallback(()=>h(p=>!p),[h]),hasCustomAnchor:l,onCustomAnchorAdd:g.useCallback(()=>u(!0),[]),onCustomAnchorRemove:g.useCallback(()=>u(!1),[]),modal:i,children:n})})};Mi.displayName=kn;var Ni="PopoverAnchor",vp=g.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=tt(Ni,n),s=Gt(n),{onCustomAnchorAdd:i,onCustomAnchorRemove:a}=o;return g.useEffect(()=>(i(),()=>a()),[i,a]),b.jsx(or,{...s,...r,ref:t})});vp.displayName=Ni;var Oi="PopoverTrigger",Pi=g.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=tt(Oi,n),s=Gt(n),i=Z(t,o.triggerRef),a=b.jsx(q.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":_i(o.open),...r,ref:i,onClick:U(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?a:b.jsx(or,{asChild:!0,...s,children:a})});Pi.displayName=Oi;var Pr="PopoverPortal",[yp,bp]=ki(Pr,{forceMount:void 0}),Di=e=>{const{__scopePopover:t,forceMount:n,children:r,container:o}=e,s=tt(Pr,t);return b.jsx(yp,{scope:t,forceMount:n,children:b.jsx(xn,{present:n||s.open,children:b.jsx(sr,{asChild:!0,container:o,children:r})})})};Di.displayName=Pr;var Pt="PopoverContent",Ti=g.forwardRef((e,t)=>{const n=bp(Pt,e.__scopePopover),{forceMount:r=n.forceMount,...o}=e,s=tt(Pt,e.__scopePopover);return b.jsx(xn,{present:r||s.open,children:s.modal?b.jsx(xp,{...o,ref:t}):b.jsx(Cp,{...o,ref:t})})});Ti.displayName=Pt;var wp=mt("PopoverContent.RemoveScroll"),xp=g.forwardRef((e,t)=>{const n=tt(Pt,e.__scopePopover),r=g.useRef(null),o=Z(t,r),s=g.useRef(!1);return g.useEffect(()=>{const i=r.current;if(i)return Ws(i)},[]),b.jsx(ur,{as:wp,allowPinchZoom:!0,children:b.jsx(Ai,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:U(e.onCloseAutoFocus,i=>{var a;i.preventDefault(),s.current||(a=n.triggerRef.current)==null||a.focus()}),onPointerDownOutside:U(e.onPointerDownOutside,i=>{const a=i.detail.originalEvent,c=a.button===0&&a.ctrlKey===!0,l=a.button===2||c;s.current=l},{checkForDefaultPrevented:!1}),onFocusOutside:U(e.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1})})})}),Cp=g.forwardRef((e,t)=>{const n=tt(Pt,e.__scopePopover),r=g.useRef(!1),o=g.useRef(!1);return b.jsx(Ai,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{var i,a;(i=e.onCloseAutoFocus)==null||i.call(e,s),s.defaultPrevented||(r.current||(a=n.triggerRef.current)==null||a.focus(),s.preventDefault()),r.current=!1,o.current=!1},onInteractOutside:s=>{var c,l;(c=e.onInteractOutside)==null||c.call(e,s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const i=s.target;((l=n.triggerRef.current)==null?void 0:l.contains(i))&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&o.current&&s.preventDefault()}})}),Ai=g.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:s,disableOutsidePointerEvents:i,onEscapeKeyDown:a,onPointerDownOutside:c,onFocusOutside:l,onInteractOutside:u,...d}=e,h=tt(Pt,n),p=Gt(n);return qo(),b.jsx(zn,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:s,children:b.jsx($n,{asChild:!0,disableOutsidePointerEvents:i,onInteractOutside:u,onEscapeKeyDown:a,onPointerDownOutside:c,onFocusOutside:l,onDismiss:()=>h.onOpenChange(!1),children:b.jsx(Ps,{"data-state":_i(h.open),role:"dialog",id:h.contentId,...p,...d,ref:t,style:{...d.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)"}})})})}),Wi="PopoverClose",Sp=g.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=tt(Wi,n);return b.jsx(q.button,{type:"button",...r,ref:t,onClick:U(e.onClick,()=>o.onOpenChange(!1))})});Sp.displayName=Wi;var Ep="PopoverArrow",kp=g.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=Gt(n);return b.jsx(Ds,{...o,...r,ref:t})});kp.displayName=Ep;function _i(e){return e?"open":"closed"}var Mp=Mi,Np=Pi,Op=Di,Fi=Ti;const Pp=Mp,Dp=Np,Ii=g.forwardRef(({className:e,align:t="center",sideOffset:n=4,...r},o)=>b.jsx(Op,{children:b.jsx(Fi,{ref:o,align:t,sideOffset:n,className:I("z-50 w-72 rounded-md border bg-popover p-4 text-popover-foreground shadow-md outline-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 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",e),...r})}));Ii.displayName=Fi.displayName;function Tp({id:e,value:t,placeholder:n,disabled:r,onChange:o,onBlur:s,onFocus:i,className:a,"aria-invalid":c}){const[l,u]=g.useState();g.useEffect(()=>{t&&u(new Date(t))},[t]);const d=h=>{u(h),h&&o&&o(Cr(h,"yyyy-MM-dd"))};return b.jsxs(Pp,{children:[b.jsx(Dp,{asChild:!0,children:b.jsxs(Wt,{id:e,variant:"outline",className:I("w-full justify-start text-left font-normal",!l&&"text-muted-foreground",a),disabled:r,onBlur:s,onFocus:i,"aria-invalid":c,children:[b.jsx(Gc,{className:"mr-2 h-4 w-4"}),l?Cr(l,"PPP"):b.jsx("span",{children:n})]})}),b.jsx(Ii,{className:"w-auto p-0",children:b.jsx(Ei,{mode:"single",selected:l,onSelect:d,initialFocus:!0})})]})}function Bi(e){const{id:t,value:n,required:r,disabled:o,readonly:s,placeholder:i,onChange:a,onBlur:c,onFocus:l,options:u,rawErrors:d=[],schema:h}=e,p=ie(t,h),x=async v=>{const w=v.target.value===""?u.emptyValue:v.target.value;a(w),await p.onChange(w)},f=async v=>{const w=v.target.value;c&&c(t,w),await p.onBlur(w)},y=async v=>{const w=v.target.value;l&&l(t,w),await p.onFocus(w)},m=d.length>0;return b.jsx(le,{id:t,type:"text",value:n||"",placeholder:i,required:r,disabled:o,readOnly:s,onChange:x,onBlur:f,onFocus:y,"aria-invalid":m,className:I(m&&"border-destructive focus-visible:ring-destructive/20")})}function Li(e){const{id:t,value:n,required:r,disabled:o,readonly:s,placeholder:i,onChange:a,onBlur:c,onFocus:l,options:u,rawErrors:d=[],schema:h}=e,p=ie(t,h),x=async w=>{const S=w.target.value===""?u.emptyValue:w.target.value;a(S),await p.onChange(S)},f=async w=>{const S=w.target.value;c&&c(t,S),await p.onBlur(S)},y=async w=>{const S=w.target.value;l&&l(t,S),await p.onFocus(S)},m=d.length>0,v=u.rows||4;return b.jsx(Yo,{id:t,value:n||"",placeholder:i,required:r,disabled:o,readOnly:s,rows:v,onChange:x,onBlur:f,onFocus:y,"aria-invalid":m,className:I("resize-y",m&&"border-destructive focus-visible:ring-destructive/20")})}function $i(e){const{id:t,value:n,required:r,disabled:o,onChange:s,onBlur:i,onFocus:a,options:c,rawErrors:l=[],schema:u}=e,d=ie(t,u),h=async m=>{const v=m===""?c.emptyValue:m;s(v),await d.onChange(v)},p=async()=>{i&&i(t,n),await d.onBlur(n)},x=async()=>{a&&a(t,n),await d.onFocus(n)},f=l.length>0,{enumOptions:y=[]}=c;return b.jsxs(af,{value:n||"",onValueChange:h,disabled:o,required:r,children:[b.jsx(Na,{id:t,"aria-invalid":f,className:I("w-full",f&&"border-destructive focus-visible:ring-destructive/20"),onBlur:p,onFocus:x,children:b.jsx(cf,{placeholder:"Select an option..."})}),b.jsx(Da,{children:y.map(m=>b.jsx(Ta,{value:m.value,children:m.label},m.value))})]})}function Hi(e){const{id:t,value:n,disabled:r,readonly:o,onChange:s,onBlur:i,onFocus:a,label:c,rawErrors:l=[],schema:u}=e,d=ie(t,u),h=async y=>{s(y),await d.onChange(y)},p=async()=>{i&&i(t,n),await d.onBlur(n)},x=async()=>{a&&a(t,n),await d.onFocus(n)},f=l.length>0;return b.jsxs("div",{className:"flex items-start space-x-2",children:[b.jsx($a,{id:t,checked:n||!1,disabled:r||o,onCheckedChange:h,onBlur:p,onFocus:x,"aria-invalid":f,className:I("mt-0.5",f&&"border-destructive focus-visible:ring-destructive/20")}),c&&b.jsx(pe,{htmlFor:t,className:I("text-sm leading-none",r&&"opacity-50",!o&&!r&&"cursor-pointer"),children:c})]})}function Vi(e){const{id:t,value:n,disabled:r,readonly:o,onChange:s,onBlur:i,onFocus:a,options:c,rawErrors:l=[],schema:u}=e,d=ie(t,u),h=async m=>{s(m),await d.onChange(m)},p=async()=>{i&&i(t,n),await d.onBlur(n)},x=async()=>{a&&a(t,n),await d.onFocus(n)},f=l.length>0,{enumOptions:y=[]}=c;return b.jsx("div",{className:"space-y-2",children:y.map((m,v)=>b.jsxs("div",{className:"flex items-center",children:[b.jsx("input",{id:`${t}_${v}`,type:"radio",name:t,value:m.value,checked:n===m.value,disabled:r,readOnly:o,onChange:()=>h(m.value),onBlur:p,onFocus:x,className:`
|
|
92
|
-
h-4 w-4 border-gray-300 text-blue-600 mr-3
|
|
93
|
-
focus:ring-blue-500 transition-colors duration-200
|
|
94
|
-
${f?"border-red-300 focus:ring-red-500":""}
|
|
95
|
-
${r?"cursor-not-allowed opacity-50":"cursor-pointer"}
|
|
96
|
-
`}),b.jsx("label",{htmlFor:`${t}_${v}`,className:`text-sm text-gray-700 ${r?"opacity-50":""} ${o?"":"cursor-pointer"}`,children:m.label})]},m.value))})}function Yi(e){const{id:t,value:n,required:r,disabled:o,readonly:s,placeholder:i,onChange:a,onBlur:c,onFocus:l,options:u,schema:d,rawErrors:h=[]}=e,p=ie(t,d),x=async v=>{const w=v.target.value,S=w===""?u.emptyValue:parseFloat(w);a(S),await p.onChange(S)},f=async v=>{const w=v.target.value;c&&c(t,w),await p.onBlur(w)},y=async v=>{const w=v.target.value;l&&l(t,w),await p.onFocus(w)},m=h.length>0;return b.jsx(le,{id:t,type:"number",value:n??"",placeholder:i,required:r,disabled:o,readOnly:s,min:d.minimum,max:d.maximum,step:d.multipleOf||"any",onChange:x,onBlur:f,onFocus:y,"aria-invalid":m,className:I(m&&"border-destructive focus-visible:ring-destructive/20")})}function Dr(e){const{id:t,value:n,required:r,disabled:o,readonly:s,placeholder:i,onChange:a,onBlur:c,onFocus:l,options:u,rawErrors:d=[],schema:h}=e,p=ie(t,h),x=async v=>{const w=v.target.value===""?u.emptyValue:v.target.value;a(w),await p.onChange(w)},f=async v=>{const w=v.target.value;c&&c(t,w),await p.onBlur(w)},y=async v=>{const w=v.target.value;l&&l(t,w),await p.onFocus(w)},m=d.length>0;return b.jsx(le,{id:t,type:"tel",value:n||"",placeholder:i||"Enter phone number",required:r,disabled:o,readOnly:s,onChange:x,onBlur:f,onFocus:y,"aria-invalid":m,className:I(m&&"border-destructive focus-visible:ring-destructive/20")})}function Tr(e){const{id:t,value:n,required:r,disabled:o,readonly:s,placeholder:i,onChange:a,onBlur:c,onFocus:l,options:u,rawErrors:d=[],schema:h}=e,p=ie(t,h),x=async v=>{const w=v.target.value===""?u.emptyValue:v.target.value;a(w),await p.onChange(w)},f=async v=>{const w=v.target.value;c&&c(t,w),await p.onBlur(w)},y=async v=>{const w=v.target.value;l&&l(t,w),await p.onFocus(w)},m=d.length>0;return b.jsx(le,{id:t,type:"email",value:n||"",placeholder:i||"Enter email address",required:r,disabled:o,readOnly:s,onChange:x,onBlur:f,onFocus:y,"aria-invalid":m,className:I(m&&"border-destructive focus-visible:ring-destructive/20")})}function Ar(e){const{id:t,value:n,required:r,disabled:o,readonly:s,placeholder:i,onChange:a,onBlur:c,onFocus:l,options:u,rawErrors:d=[],schema:h}=e,p=ie(t,h),x=async v=>{const w=v.target.value===""?u.emptyValue:v.target.value;a(w),await p.onChange(w)},f=async v=>{const w=v.target.value;c&&c(t,w),await p.onBlur(w)},y=async v=>{const w=v.target.value;l&&l(t,w),await p.onFocus(w)},m=d.length>0;return b.jsx(le,{id:t,type:"url",value:n||"",placeholder:i||"Enter URL",required:r,disabled:o,readOnly:s,onChange:x,onBlur:f,onFocus:y,"aria-invalid":m,className:I(m&&"border-destructive focus-visible:ring-destructive/20")})}function Wr(e){const{id:t,value:n,required:r,disabled:o,readonly:s,placeholder:i,onChange:a,onBlur:c,onFocus:l,options:u,rawErrors:d=[],schema:h}=e,p=ie(t,h),x=async v=>{const w=v.target.value===""?u.emptyValue:v.target.value;a(w),await p.onChange(w)},f=async v=>{const w=v.target.value;c&&c(t,w),await p.onBlur(w)},y=async v=>{const w=v.target.value;l&&l(t,w),await p.onFocus(w)},m=d.length>0;return b.jsx(le,{id:t,type:"password",value:n||"",placeholder:i||"Enter password",required:r,disabled:o,readOnly:s,onChange:x,onBlur:f,onFocus:y,"aria-invalid":m,className:I(m&&"border-destructive focus-visible:ring-destructive/20")})}function zi(e){const{id:t,value:n,required:r,disabled:o,readonly:s,onChange:i,onBlur:a,onFocus:c,options:l,rawErrors:u=[],schema:d}=e,h=ie(t,d),p=async m=>{const v=m===""?l.emptyValue:m;i(v),await h.onChange(v)},x=async()=>{a&&a(t,n),await h.onBlur(n)},f=async()=>{c&&c(t,n),await h.onFocus(n)},y=u.length>0;return s?b.jsx(le,{id:t,type:"date",value:n||"",required:r,disabled:o,readOnly:s,"aria-invalid":y,className:I(y&&"border-destructive focus-visible:ring-destructive/20")}):b.jsx(Tp,{id:t,value:n||"",placeholder:"Select a date",disabled:o,onChange:p,onBlur:x,onFocus:f,"aria-invalid":y,className:I(y&&"border-destructive focus-visible:ring-destructive/20")})}function _r(e){const{id:t,value:n,required:r,disabled:o,readonly:s,onChange:i,onBlur:a,onFocus:c,options:l,rawErrors:u=[],schema:d}=e,h=ie(t,d),p=async m=>{const v=m.target.value===""?l.emptyValue:m.target.value;i(v),await h.onChange(v)},x=async m=>{const v=m.target.value;a&&a(t,v),await h.onBlur(v)},f=async m=>{const v=m.target.value;c&&c(t,v),await h.onFocus(v)},y=u.length>0;return b.jsx(le,{id:t,type:"datetime-local",value:n||"",required:r,disabled:o,readOnly:s,onChange:p,onBlur:x,onFocus:f,"aria-invalid":y,className:I(y&&"border-destructive focus-visible:ring-destructive/20")})}function Ri(e){const{id:t,required:n,disabled:r,readonly:o,onChange:s,onBlur:i,onFocus:a,options:c,rawErrors:l=[],schema:u}=e,d=ie(t,u),h=async m=>{const v=m.target.files;if(v&&v.length>0){const w=v[0],S=new FileReader;S.onload=async()=>{const C=S.result;s(C),await d.onChange(C)},S.readAsDataURL(w)}},p=async m=>{const v=m.target.value;i&&i(t,v),await d.onBlur(v)},x=async m=>{const v=m.target.value;a&&a(t,v),await d.onFocus(v)},f=l.length>0,y=typeof c.accept=="string"?c.accept:"*/*";return b.jsx(le,{id:t,type:"file",required:n,disabled:r,readOnly:o,accept:y,onChange:h,onBlur:p,onFocus:x,"aria-invalid":f,className:I("file:mr-4 file:py-1 file:px-2 file:rounded file:border-0 file:text-sm file:font-medium file:bg-blue-50 file:text-blue-700 hover:file:bg-blue-100",f&&"border-destructive focus-visible:ring-destructive/20")})}const ji={TextWidget:Bi,TextareaWidget:Li,SelectWidget:$i,CheckboxWidget:Hi,RadioWidget:Vi,UpDownWidget:Yi,FileWidget:Ri,tel:Dr,email:Tr,url:Ar,password:Wr,date:zi,"datetime-local":_r,TelWidget:Dr,EmailWidget:Tr,URLWidget:Ar,PasswordWidget:Wr,DateWidget:zi,DateTimeWidget:_r},Ui={color:go,file:xo,range:Ho,rating:Vo,...ji},Ap={small:"space-y-2",medium:"space-y-4",large:"space-y-6"},Wp=({children:e,spacing:t="medium",className:n=""})=>b.jsx("div",{className:I("flex flex-col",Ap[t],n),children:e}),_p={small:"space-x-2",medium:"space-x-4",large:"space-x-6"},Fp={start:"items-start",center:"items-center",end:"items-end",stretch:"items-stretch"},Ip=({children:e,spacing:t="medium",align:n="center",className:r=""})=>b.jsx("div",{className:I("flex flex-row",_p[t],Fp[n],r),children:e}),Bp={small:"gap-2",medium:"gap-4",large:"gap-6"},Lp=({children:e,columns:t="auto-fit",gap:n="medium",minItemWidth:r="250px",className:o=""})=>{const s={display:"grid"};return typeof t=="number"?s.gridTemplateColumns=`repeat(${t}, 1fr)`:s.gridTemplateColumns=`repeat(${t}, minmax(${r}, 1fr))`,b.jsx("div",{className:I("grid",Bp[n],o),style:s,children:e})};class $p{constructor(t){rt(this,"handlers");this.handlers=t}async handleBeforeSubmit(t){return this.handlers.beforeSubmit?await this.handlers.beforeSubmit(t):t}async handleAfterSubmit(t){this.handlers.afterSubmit&&await this.handlers.afterSubmit(t)}async handleBeforeValidation(t){return this.handlers.beforeValidation?await this.handlers.beforeValidation(t):t}async handleAfterValidation(t,n){this.handlers.afterValidation&&await this.handlers.afterValidation(t,n)}}class qi{constructor(t,n={},r=[]){rt(this,"formHandlers");rt(this,"fieldHandlers");rt(this,"webhooks");rt(this,"debounceTimers",new Map);rt(this,"webhookQueue",[]);rt(this,"isProcessingQueue",!1);this.formHandlers=t,this.fieldHandlers=n,this.webhooks=r}async handleBeforeSubmit(t){return this.formHandlers.beforeSubmit?await this.formHandlers.beforeSubmit(t):t}async handleAfterSubmit(t){this.formHandlers.afterSubmit&&await this.formHandlers.afterSubmit(t)}async handleBeforeValidation(t){return this.formHandlers.beforeValidation?await this.formHandlers.beforeValidation(t):t}async handleAfterValidation(t,n){this.formHandlers.afterValidation&&await this.formHandlers.afterValidation(t,n)}async handleFieldEvent(t,n,r,o,s,i){const a={eventType:t,fieldId:n,fieldValue:r,schema:o,formData:s,timestamp:Date.now(),fieldPath:i};try{switch(t){case"focus":this.fieldHandlers.onFieldFocus&&await this.fieldHandlers.onFieldFocus(a);break;case"blur":this.fieldHandlers.onFieldBlur&&await this.fieldHandlers.onFieldBlur(a);break;case"change":this.fieldHandlers.onFieldChange&&await this.fieldHandlers.onFieldChange(a);break}}catch(c){console.error(`Error in field event handler (${t}):`,c)}this.processWebhooks(a)}processWebhooks(t){const n=this.webhooks.filter(r=>!r.events||r.events.includes(t.eventType));for(const r of n)r.debounceMs&&r.debounceMs>0?this.debounceWebhook(r,t):this.queueWebhook(r,t)}debounceWebhook(t,n){const r=`${t.url}-${n.fieldId}-${n.eventType}`;this.debounceTimers.has(r)&&clearTimeout(this.debounceTimers.get(r));const o=setTimeout(()=>{this.queueWebhook(t,n),this.debounceTimers.delete(r)},t.debounceMs);this.debounceTimers.set(r,o)}queueWebhook(t,n){this.webhookQueue.push({config:t,event:n,retryCount:0}),this.isProcessingQueue||this.processWebhookQueue()}async processWebhookQueue(){if(!(this.isProcessingQueue||this.webhookQueue.length===0)){for(this.isProcessingQueue=!0;this.webhookQueue.length>0;){const t=this.webhookQueue.shift();try{await this.callWebhook(t.config,t.event)}catch(n){const r=t.config.retries||3;t.retryCount<r?(t.retryCount++,setTimeout(()=>{this.webhookQueue.push(t)},Math.pow(2,t.retryCount)*1e3)):console.error(`Webhook failed after ${r} retries:`,n)}}this.isProcessingQueue=!1}}async callWebhook(t,n){const r={event:n,timestamp:Date.now(),source:"extended-dynamic-forms"},o={method:t.method||"POST",headers:{"Content-Type":"application/json",...t.headers},body:JSON.stringify(r)};t.timeout&&(o.signal=AbortSignal.timeout(t.timeout));const s=await fetch(t.url,o);if(!s.ok)throw new Error(`Webhook request failed: ${s.status} ${s.statusText}`)}createFieldEventHandlers(t,n,r,o){return{onFocus:s=>this.handleFieldEvent("focus",t,s,n,r,o),onBlur:s=>this.handleFieldEvent("blur",t,s,n,r,o),onChange:s=>this.handleFieldEvent("change",t,s,n,r,o)}}cleanup(){for(const t of this.debounceTimers.values())clearTimeout(t);this.debounceTimers.clear()}}const Gi={cloneFormData:e=>JSON.parse(JSON.stringify(e)),mergeFormData:(e,t)=>({...e,...t}),getNestedValue:(e,t)=>{const n=t.split(".");let r=e;for(const o of n)if(r&&typeof r=="object"&&o in r)r=r[o];else return;return r},setNestedValue:(e,t,n)=>{const r=t.split("."),o={...e};let s=o;for(let i=0;i<r.length-1;i++){const a=r[i];(!(a in s)||typeof s[a]!="object")&&(s[a]={}),s=s[a]}return s[r[r.length-1]]=n,o},removeEmptyValues:e=>{if(Array.isArray(e))return e.filter(t=>t!=null&&t!=="");if(e!==null&&typeof e=="object"){const t={};for(const[n,r]of Object.entries(e))r!=null&&r!==""&&(t[n]=Gi.removeEmptyValues(r));return t}return e}},Ki={getRequiredFields:e=>e.required||[],isFieldRequired:(e,t)=>(e.required||[]).includes(t),getFieldSchema:(e,t)=>{const n=t.split(".");let r=e;for(const o of n)if(r.type==="object"&&r.properties)r=r.properties[o];else if(r.type==="array"&&r.items)r=r.items;else return;return r},mergeSchemas:(e,t)=>({...e,...t,properties:{...e.properties,...t.properties},required:[...new Set([...e.required||[],...t.required||[]])]}),getAllFieldPaths:(e,t="")=>{const n=[];if(e.type==="object"&&e.properties)for(const[r,o]of Object.entries(e.properties)){const s=t?`${t}.${r}`:r;n.push(s),n.push(...Ki.getAllFieldPaths(o,s))}return n}},Hp={isValidEmail:e=>/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e),isValidPhone:e=>/^\(?([0-9]{3})\)?[-. ]?([0-9]{3})[-. ]?([0-9]{4})$/.test(e),isValidUrl:e=>{try{return new URL(e),!0}catch{return!1}},isValidDate:e=>{const t=new Date(e);return t instanceof Date&&!isNaN(t.getTime())},isInRange:(e,t,n)=>!(t!==void 0&&e<t||n!==void 0&&e>n),getValidationMessage:(e,t)=>({required:"This field is required",email:"Please enter a valid email address",phone:"Please enter a valid phone number",url:"Please enter a valid URL",date:"Please enter a valid date",min:`Value must be at least ${t==null?void 0:t.min}`,max:`Value must be at most ${t==null?void 0:t.max}`,minLength:`Must be at least ${t==null?void 0:t.minLength} characters`,maxLength:`Must be at most ${t==null?void 0:t.maxLength} characters`})[e]||"Invalid value"},Vp=({schema:e,uiSchema:t,formData:n,onSubmit:r,onChange:o,onError:s,onBlur:i,onFocus:a,beforeSubmit:c,afterSubmit:l,beforeValidation:u,afterValidation:d,onFieldFocus:h,onFieldBlur:p,onFieldChange:x,webhooks:f=[],widgets:y={},fields:m={},templates:v={},...w})=>{const S=k.useRef(null),C=k.useMemo(()=>{const T=new qi({beforeSubmit:c,afterSubmit:l,beforeValidation:u,afterValidation:d},{onFieldFocus:h,onFieldBlur:p,onFieldChange:x},f);return S.current=T,T},[c,l,u,d,h,p,x,f]);k.useEffect(()=>()=>{S.current&&S.current.cleanup()},[]);const M=async(T,D)=>{const N=await C.handleBeforeSubmit(T);r&&await r(N,D),await C.handleAfterSubmit(N)},E=T=>{o&&o(T)},O={...Ui,...y},_={...po,...m};return b.jsx(uo,{eventHub:C,formData:n,children:b.jsx(ec,{schema:e,uiSchema:t,formData:n,validator:Vr,onSubmit:M,onChange:E,onError:s,onBlur:i,onFocus:a,widgets:O,fields:_,templates:v,...w})})};W.validator=Vr,Object.defineProperty(W,"generateTheme",{enumerable:!0,get:()=>Ji.generateTheme}),W.AddressField=co,W.ColorWidget=go,W.CurrencyField=mo,W.DateTimeWidget=_r,W.DateWidget=Rc,W.EmailWidget=Tr,W.EnhancedCheckboxWidget=Hi,W.EnhancedNumberWidget=Yi,W.EnhancedRadioWidget=Vi,W.EnhancedSelectWidget=$i,W.EnhancedTextWidget=Bi,W.EnhancedTextareaWidget=Li,W.ExtendedForm=Vp,W.FileUploadWidget=Ri,W.FileWidget=xo,W.FormEventHub=qi,W.FormEventManager=$p,W.FormEventProvider=uo,W.GridLayout=Lp,W.HorizontalLayout=Ip,W.PasswordWidget=Wr,W.PhoneField=ho,W.RangeWidget=Ho,W.RatingWidget=Vo,W.TelephoneWidget=Dr,W.URLWidget=Ar,W.VerticalLayout=Wp,W.cn=I,W.customFields=po,W.customWidgets=Ui,W.enhancedWidgets=ji,W.formDataUtils=Gi,W.schemaUtils=Ki,W.useFieldEventHandlers=ie,W.useFormEventHub=fo,W.validationUtils=Hp,Object.defineProperty(W,Symbol.toStringTag,{value:"Module"})});
|