@bodyhc/blazeui 0.1.0 → 0.1.1

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.
@@ -1,98 +1,69 @@
1
- (function(P,T){typeof exports=="object"&&typeof module<"u"?T(exports,require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react","react-dom"],T):(P=typeof globalThis<"u"?globalThis:P||self,T(P.BlazeUI={},P.React,P.ReactDOM))})(this,function(P,T,fc){"use strict";function pc(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const n in e)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:()=>e[n]})}}return t.default=e,Object.freeze(t)}const d=pc(T),Zn=pc(fc);function hc(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=hc(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function mc(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=hc(e))&&(r&&(r+=" "),r+=t);return r}const Bs="-",ow=e=>{const t=iw(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:i=>{const a=i.split(Bs);return a[0]===""&&a.length!==1&&a.shift(),gc(a,t)||sw(i)},getConflictingClassGroupIds:(i,a)=>{const l=n[i]||[];return a&&r[i]?[...l,...r[i]]:l}}},gc=(e,t)=>{var i;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?gc(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const s=e.join(Bs);return(i=t.validators.find(({validator:a})=>a(s)))==null?void 0:i.classGroupId},vc=/^\[(.+)\]$/,sw=e=>{if(vc.test(e)){const t=vc.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},iw=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return lw(Object.entries(e.classGroups),n).forEach(([s,i])=>{Ws(i,r,s,t)}),r},Ws=(e,t,n,r)=>{e.forEach(o=>{if(typeof o=="string"){const s=o===""?t:yc(t,o);s.classGroupId=n;return}if(typeof o=="function"){if(aw(o)){Ws(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([s,i])=>{Ws(i,yc(t,s),n,r)})})},yc=(e,t)=>{let n=e;return t.split(Bs).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},aw=e=>e.isThemeGetter,lw=(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,cw=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)}}},xc="!",uw=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,o=t[0],s=t.length,i=a=>{const l=[];let c=0,u=0,f;for(let v=0;v<a.length;v++){let x=a[v];if(c===0){if(x===o&&(r||a.slice(v,v+s)===t)){l.push(a.slice(u,v)),u=v+s;continue}if(x==="/"){f=v;continue}}x==="["?c++:x==="]"&&c--}const h=l.length===0?a:a.substring(u),m=h.startsWith(xc),y=m?h.substring(1):h,g=f&&f>u?f-u:void 0;return{modifiers:l,hasImportantModifier:m,baseClassName:y,maybePostfixModifierPosition:g}};return n?a=>n({className:a,parseClassName:i}):i},dw=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},fw=e=>({cache:cw(e.cacheSize),parseClassName:uw(e),...ow(e)}),pw=/\s+/,hw=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o}=t,s=[],i=e.trim().split(pw);let a="";for(let l=i.length-1;l>=0;l-=1){const c=i[l],{modifiers:u,hasImportantModifier:f,baseClassName:h,maybePostfixModifierPosition:m}=n(c);let y=!!m,g=r(y?h.substring(0,m):h);if(!g){if(!y){a=c+(a.length>0?" "+a:a);continue}if(g=r(h),!g){a=c+(a.length>0?" "+a:a);continue}y=!1}const v=dw(u).join(":"),x=f?v+xc:v,b=x+g;if(s.includes(b))continue;s.push(b);const w=o(g,y);for(let S=0;S<w.length;++S){const C=w[S];s.push(x+C)}a=c+(a.length>0?" "+a:a)}return a};function mw(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=bc(t))&&(r&&(r+=" "),r+=n);return r}const bc=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=bc(e[r]))&&(n&&(n+=" "),n+=t);return n};function gw(e,...t){let n,r,o,s=i;function i(l){const c=t.reduce((u,f)=>f(u),e());return n=fw(c),r=n.cache.get,o=n.cache.set,s=a,a(l)}function a(l){const c=r(l);if(c)return c;const u=hw(l,n);return o(l,u),u}return function(){return s(mw.apply(null,arguments))}}const ve=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},wc=/^\[(?:([a-z-]+):)?(.+)\]$/i,vw=/^\d+\/\d+$/,yw=new Set(["px","full","screen"]),xw=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,bw=/\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$/,ww=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,Sw=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,Cw=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,bt=e=>un(e)||yw.has(e)||vw.test(e),Ct=e=>dn(e,"length",_w),un=e=>!!e&&!Number.isNaN(Number(e)),zs=e=>dn(e,"number",un),Jn=e=>!!e&&Number.isInteger(Number(e)),Ew=e=>e.endsWith("%")&&un(e.slice(0,-1)),le=e=>wc.test(e),Et=e=>xw.test(e),Tw=new Set(["length","size","percentage"]),Pw=e=>dn(e,Tw,Sc),Rw=e=>dn(e,"position",Sc),Aw=new Set(["image","url"]),Nw=e=>dn(e,Aw,Iw),Mw=e=>dn(e,"",jw),Qn=()=>!0,dn=(e,t,n)=>{const r=wc.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},_w=e=>bw.test(e)&&!ww.test(e),Sc=()=>!1,jw=e=>Sw.test(e),Iw=e=>Cw.test(e),Dw=gw(()=>{const e=ve("colors"),t=ve("spacing"),n=ve("blur"),r=ve("brightness"),o=ve("borderColor"),s=ve("borderRadius"),i=ve("borderSpacing"),a=ve("borderWidth"),l=ve("contrast"),c=ve("grayscale"),u=ve("hueRotate"),f=ve("invert"),h=ve("gap"),m=ve("gradientColorStops"),y=ve("gradientColorStopPositions"),g=ve("inset"),v=ve("margin"),x=ve("opacity"),b=ve("padding"),w=ve("saturate"),S=ve("scale"),C=ve("sepia"),R=ve("skew"),A=ve("space"),N=ve("translate"),_=()=>["auto","contain","none"],k=()=>["auto","hidden","clip","visible","scroll"],O=()=>["auto",le,t],L=()=>[le,t],G=()=>["",bt,Ct],j=()=>["auto",un,le],X=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],U=()=>["solid","dashed","dotted","double","none"],z=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],V=()=>["start","end","center","between","around","evenly","stretch"],$=()=>["","0",le],oe=()=>["auto","avoid","all","avoid-page","page","left","right","column"],ie=()=>[un,le];return{cacheSize:500,separator:":",theme:{colors:[Qn],spacing:[bt,Ct],blur:["none","",Et,le],brightness:ie(),borderColor:[e],borderRadius:["none","","full",Et,le],borderSpacing:L(),borderWidth:G(),contrast:ie(),grayscale:$(),hueRotate:ie(),invert:$(),gap:L(),gradientColorStops:[e],gradientColorStopPositions:[Ew,Ct],inset:O(),margin:O(),opacity:ie(),padding:L(),saturate:ie(),scale:ie(),sepia:$(),skew:ie(),space:L(),translate:L()},classGroups:{aspect:[{aspect:["auto","square","video",le]}],container:["container"],columns:[{columns:[Et]}],"break-after":[{"break-after":oe()}],"break-before":[{"break-before":oe()}],"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:[...X(),le]}],overflow:[{overflow:k()}],"overflow-x":[{"overflow-x":k()}],"overflow-y":[{"overflow-y":k()}],overscroll:[{overscroll:_()}],"overscroll-x":[{"overscroll-x":_()}],"overscroll-y":[{"overscroll-y":_()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[g]}],"inset-x":[{"inset-x":[g]}],"inset-y":[{"inset-y":[g]}],start:[{start:[g]}],end:[{end:[g]}],top:[{top:[g]}],right:[{right:[g]}],bottom:[{bottom:[g]}],left:[{left:[g]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",Jn,le]}],basis:[{basis:O()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",le]}],grow:[{grow:$()}],shrink:[{shrink:$()}],order:[{order:["first","last","none",Jn,le]}],"grid-cols":[{"grid-cols":[Qn]}],"col-start-end":[{col:["auto",{span:["full",Jn,le]},le]}],"col-start":[{"col-start":j()}],"col-end":[{"col-end":j()}],"grid-rows":[{"grid-rows":[Qn]}],"row-start-end":[{row:["auto",{span:[Jn,le]},le]}],"row-start":[{"row-start":j()}],"row-end":[{"row-end":j()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",le]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",le]}],gap:[{gap:[h]}],"gap-x":[{"gap-x":[h]}],"gap-y":[{"gap-y":[h]}],"justify-content":[{justify:["normal",...V()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...V(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...V(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[b]}],px:[{px:[b]}],py:[{py:[b]}],ps:[{ps:[b]}],pe:[{pe:[b]}],pt:[{pt:[b]}],pr:[{pr:[b]}],pb:[{pb:[b]}],pl:[{pl:[b]}],m:[{m:[v]}],mx:[{mx:[v]}],my:[{my:[v]}],ms:[{ms:[v]}],me:[{me:[v]}],mt:[{mt:[v]}],mr:[{mr:[v]}],mb:[{mb:[v]}],ml:[{ml:[v]}],"space-x":[{"space-x":[A]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[A]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",le,t]}],"min-w":[{"min-w":[le,t,"min","max","fit"]}],"max-w":[{"max-w":[le,t,"none","full","min","max","fit","prose",{screen:[Et]},Et]}],h:[{h:[le,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[le,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[le,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[le,t,"auto","min","max","fit"]}],"font-size":[{text:["base",Et,Ct]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",zs]}],"font-family":[{font:[Qn]}],"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",le]}],"line-clamp":[{"line-clamp":["none",un,zs]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",bt,le]}],"list-image":[{"list-image":["none",le]}],"list-style-type":[{list:["none","disc","decimal",le]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[x]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[x]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...U(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",bt,Ct]}],"underline-offset":[{"underline-offset":["auto",bt,le]}],"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:L()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",le]}],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",le]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[x]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...X(),Rw]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Pw]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Nw]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[y]}],"gradient-via-pos":[{via:[y]}],"gradient-to-pos":[{to:[y]}],"gradient-from":[{from:[m]}],"gradient-via":[{via:[m]}],"gradient-to":[{to:[m]}],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":[x]}],"border-style":[{border:[...U(),"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":[x]}],"divide-style":[{divide:U()}],"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:["",...U()]}],"outline-offset":[{"outline-offset":[bt,le]}],"outline-w":[{outline:[bt,Ct]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:G()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[x]}],"ring-offset-w":[{"ring-offset":[bt,Ct]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",Et,Mw]}],"shadow-color":[{shadow:[Qn]}],opacity:[{opacity:[x]}],"mix-blend":[{"mix-blend":[...z(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":z()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",Et,le]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[f]}],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":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[u]}],"backdrop-invert":[{"backdrop-invert":[f]}],"backdrop-opacity":[{"backdrop-opacity":[x]}],"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",le]}],duration:[{duration:ie()}],ease:[{ease:["linear","in","out","in-out",le]}],delay:[{delay:ie()}],animate:[{animate:["none","spin","ping","pulse","bounce",le]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[S]}],"scale-x":[{"scale-x":[S]}],"scale-y":[{"scale-y":[S]}],rotate:[{rotate:[Jn,le]}],"translate-x":[{"translate-x":[N]}],"translate-y":[{"translate-y":[N]}],"skew-x":[{"skew-x":[R]}],"skew-y":[{"skew-y":[R]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",le]}],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",le]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":L()}],"scroll-mx":[{"scroll-mx":L()}],"scroll-my":[{"scroll-my":L()}],"scroll-ms":[{"scroll-ms":L()}],"scroll-me":[{"scroll-me":L()}],"scroll-mt":[{"scroll-mt":L()}],"scroll-mr":[{"scroll-mr":L()}],"scroll-mb":[{"scroll-mb":L()}],"scroll-ml":[{"scroll-ml":L()}],"scroll-p":[{"scroll-p":L()}],"scroll-px":[{"scroll-px":L()}],"scroll-py":[{"scroll-py":L()}],"scroll-ps":[{"scroll-ps":L()}],"scroll-pe":[{"scroll-pe":L()}],"scroll-pt":[{"scroll-pt":L()}],"scroll-pr":[{"scroll-pr":L()}],"scroll-pb":[{"scroll-pb":L()}],"scroll-pl":[{"scroll-pl":L()}],"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",le]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[bt,Ct,zs]}],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 M(...e){return Dw(mc(e))}var Hs={exports:{}},er={};/**
2
- * @license React
3
- * react-jsx-runtime.production.min.js
4
- *
5
- * Copyright (c) Facebook, Inc. and its affiliates.
6
- *
7
- * This source code is licensed under the MIT license found in the
8
- * LICENSE file in the root directory of this source tree.
9
- */var Cc;function kw(){if(Cc)return er;Cc=1;var e=T,t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,o=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s={key:!0,ref:!0,__self:!0,__source:!0};function i(a,l,c){var u,f={},h=null,m=null;c!==void 0&&(h=""+c),l.key!==void 0&&(h=""+l.key),l.ref!==void 0&&(m=l.ref);for(u in l)r.call(l,u)&&!s.hasOwnProperty(u)&&(f[u]=l[u]);if(a&&a.defaultProps)for(u in l=a.defaultProps,l)f[u]===void 0&&(f[u]=l[u]);return{$$typeof:t,type:a,key:h,ref:m,props:f,_owner:o.current}}return er.Fragment=n,er.jsx=i,er.jsxs=i,er}var tr={};/**
10
- * @license React
11
- * react-jsx-runtime.development.js
12
- *
13
- * Copyright (c) Facebook, Inc. and its affiliates.
14
- *
15
- * This source code is licensed under the MIT license found in the
16
- * LICENSE file in the root directory of this source tree.
17
- */var Ec;function Ow(){return Ec||(Ec=1,process.env.NODE_ENV!=="production"&&function(){var e=T,t=Symbol.for("react.element"),n=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),o=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),i=Symbol.for("react.provider"),a=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),u=Symbol.for("react.suspense_list"),f=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),m=Symbol.for("react.offscreen"),y=Symbol.iterator,g="@@iterator";function v(E){if(E===null||typeof E!="object")return null;var F=y&&E[y]||E[g];return typeof F=="function"?F:null}var x=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function b(E){{for(var F=arguments.length,q=new Array(F>1?F-1:0),ae=1;ae<F;ae++)q[ae-1]=arguments[ae];w("error",E,q)}}function w(E,F,q){{var ae=x.ReactDebugCurrentFrame,me=ae.getStackAddendum();me!==""&&(F+="%s",q=q.concat([me]));var ge=q.map(function(fe){return String(fe)});ge.unshift("Warning: "+F),Function.prototype.apply.call(console[E],console,ge)}}var S=!1,C=!1,R=!1,A=!1,N=!1,_;_=Symbol.for("react.module.reference");function k(E){return!!(typeof E=="string"||typeof E=="function"||E===r||E===s||N||E===o||E===c||E===u||A||E===m||S||C||R||typeof E=="object"&&E!==null&&(E.$$typeof===h||E.$$typeof===f||E.$$typeof===i||E.$$typeof===a||E.$$typeof===l||E.$$typeof===_||E.getModuleId!==void 0))}function O(E,F,q){var ae=E.displayName;if(ae)return ae;var me=F.displayName||F.name||"";return me!==""?q+"("+me+")":q}function L(E){return E.displayName||"Context"}function G(E){if(E==null)return null;if(typeof E.tag=="number"&&b("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof E=="function")return E.displayName||E.name||null;if(typeof E=="string")return E;switch(E){case r:return"Fragment";case n:return"Portal";case s:return"Profiler";case o:return"StrictMode";case c:return"Suspense";case u:return"SuspenseList"}if(typeof E=="object")switch(E.$$typeof){case a:var F=E;return L(F)+".Consumer";case i:var q=E;return L(q._context)+".Provider";case l:return O(E,E.render,"ForwardRef");case f:var ae=E.displayName||null;return ae!==null?ae:G(E.type)||"Memo";case h:{var me=E,ge=me._payload,fe=me._init;try{return G(fe(ge))}catch{return null}}}return null}var j=Object.assign,X=0,U,z,V,$,oe,ie,I;function Y(){}Y.__reactDisabledLog=!0;function J(){{if(X===0){U=console.log,z=console.info,V=console.warn,$=console.error,oe=console.group,ie=console.groupCollapsed,I=console.groupEnd;var E={configurable:!0,enumerable:!0,value:Y,writable:!0};Object.defineProperties(console,{info:E,log:E,warn:E,error:E,group:E,groupCollapsed:E,groupEnd:E})}X++}}function K(){{if(X--,X===0){var E={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:j({},E,{value:U}),info:j({},E,{value:z}),warn:j({},E,{value:V}),error:j({},E,{value:$}),group:j({},E,{value:oe}),groupCollapsed:j({},E,{value:ie}),groupEnd:j({},E,{value:I})})}X<0&&b("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var te=x.ReactCurrentDispatcher,W;function Q(E,F,q){{if(W===void 0)try{throw Error()}catch(me){var ae=me.stack.trim().match(/\n( *(at )?)/);W=ae&&ae[1]||""}return`
18
- `+W+E}}var ee=!1,ne;{var he=typeof WeakMap=="function"?WeakMap:Map;ne=new he}function B(E,F){if(!E||ee)return"";{var q=ne.get(E);if(q!==void 0)return q}var ae;ee=!0;var me=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var ge;ge=te.current,te.current=null,J();try{if(F){var fe=function(){throw Error()};if(Object.defineProperty(fe.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(fe,[])}catch(We){ae=We}Reflect.construct(E,[],fe)}else{try{fe.call()}catch(We){ae=We}E.call(fe.prototype)}}else{try{throw Error()}catch(We){ae=We}E()}}catch(We){if(We&&ae&&typeof We.stack=="string"){for(var ue=We.stack.split(`
19
- `),Fe=ae.stack.split(`
20
- `),Pe=ue.length-1,Ae=Fe.length-1;Pe>=1&&Ae>=0&&ue[Pe]!==Fe[Ae];)Ae--;for(;Pe>=1&&Ae>=0;Pe--,Ae--)if(ue[Pe]!==Fe[Ae]){if(Pe!==1||Ae!==1)do if(Pe--,Ae--,Ae<0||ue[Pe]!==Fe[Ae]){var Je=`
21
- `+ue[Pe].replace(" at new "," at ");return E.displayName&&Je.includes("<anonymous>")&&(Je=Je.replace("<anonymous>",E.displayName)),typeof E=="function"&&ne.set(E,Je),Je}while(Pe>=1&&Ae>=0);break}}}finally{ee=!1,te.current=ge,K(),Error.prepareStackTrace=me}var qn=E?E.displayName||E.name:"",cn=qn?Q(qn):"";return typeof E=="function"&&ne.set(E,cn),cn}function Z(E,F,q){return B(E,!1)}function de(E){var F=E.prototype;return!!(F&&F.isReactComponent)}function je(E,F,q){if(E==null)return"";if(typeof E=="function")return B(E,de(E));if(typeof E=="string")return Q(E);switch(E){case c:return Q("Suspense");case u:return Q("SuspenseList")}if(typeof E=="object")switch(E.$$typeof){case l:return Z(E.render);case f:return je(E.type,F,q);case h:{var ae=E,me=ae._payload,ge=ae._init;try{return je(ge(me),F,q)}catch{}}}return""}var Me=Object.prototype.hasOwnProperty,Oe={},Ze=x.ReactDebugCurrentFrame;function Le(E){if(E){var F=E._owner,q=je(E.type,E._source,F?F.type:null);Ze.setExtraStackFrame(q)}else Ze.setExtraStackFrame(null)}function Ie(E,F,q,ae,me){{var ge=Function.call.bind(Me);for(var fe in E)if(ge(E,fe)){var ue=void 0;try{if(typeof E[fe]!="function"){var Fe=Error((ae||"React class")+": "+q+" type `"+fe+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof E[fe]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw Fe.name="Invariant Violation",Fe}ue=E[fe](F,fe,ae,q,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(Pe){ue=Pe}ue&&!(ue instanceof Error)&&(Le(me),b("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",ae||"React class",q,fe,typeof ue),Le(null)),ue instanceof Error&&!(ue.message in Oe)&&(Oe[ue.message]=!0,Le(me),b("Failed %s type: %s",q,ue.message),Le(null))}}}var Hn=Array.isArray;function Ht(E){return Hn(E)}function Jr(E){{var F=typeof Symbol=="function"&&Symbol.toStringTag,q=F&&E[Symbol.toStringTag]||E.constructor.name||"Object";return q}}function an(E){try{return Ut(E),!1}catch{return!0}}function Ut(E){return""+E}function Un(E){if(an(E))return b("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Jr(E)),Ut(E)}var Gn=x.ReactCurrentOwner,ln={key:!0,ref:!0,__self:!0,__source:!0},Kn,Yn;function Qr(E){if(Me.call(E,"ref")){var F=Object.getOwnPropertyDescriptor(E,"ref").get;if(F&&F.isReactWarning)return!1}return E.ref!==void 0}function eo(E){if(Me.call(E,"key")){var F=Object.getOwnPropertyDescriptor(E,"key").get;if(F&&F.isReactWarning)return!1}return E.key!==void 0}function $s(E,F){typeof E.ref=="string"&&Gn.current}function Fs(E,F){{var q=function(){Kn||(Kn=!0,b("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",F))};q.isReactWarning=!0,Object.defineProperty(E,"key",{get:q,configurable:!0})}}function Pk(E,F){{var q=function(){Yn||(Yn=!0,b("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",F))};q.isReactWarning=!0,Object.defineProperty(E,"ref",{get:q,configurable:!0})}}var Rk=function(E,F,q,ae,me,ge,fe){var ue={$$typeof:t,type:E,key:F,ref:q,props:fe,_owner:ge};return ue._store={},Object.defineProperty(ue._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(ue,"_self",{configurable:!1,enumerable:!1,writable:!1,value:ae}),Object.defineProperty(ue,"_source",{configurable:!1,enumerable:!1,writable:!1,value:me}),Object.freeze&&(Object.freeze(ue.props),Object.freeze(ue)),ue};function Ak(E,F,q,ae,me){{var ge,fe={},ue=null,Fe=null;q!==void 0&&(Un(q),ue=""+q),eo(F)&&(Un(F.key),ue=""+F.key),Qr(F)&&(Fe=F.ref,$s(F,me));for(ge in F)Me.call(F,ge)&&!ln.hasOwnProperty(ge)&&(fe[ge]=F[ge]);if(E&&E.defaultProps){var Pe=E.defaultProps;for(ge in Pe)fe[ge]===void 0&&(fe[ge]=Pe[ge])}if(ue||Fe){var Ae=typeof E=="function"?E.displayName||E.name||"Unknown":E;ue&&Fs(fe,Ae),Fe&&Pk(fe,Ae)}return Rk(E,ue,Fe,me,ae,Gn.current,fe)}}var lc=x.ReactCurrentOwner,Zb=x.ReactDebugCurrentFrame;function Xn(E){if(E){var F=E._owner,q=je(E.type,E._source,F?F.type:null);Zb.setExtraStackFrame(q)}else Zb.setExtraStackFrame(null)}var cc;cc=!1;function uc(E){return typeof E=="object"&&E!==null&&E.$$typeof===t}function Jb(){{if(lc.current){var E=G(lc.current.type);if(E)return`
22
-
23
- Check the render method of \``+E+"`."}return""}}function Nk(E){return""}var Qb={};function Mk(E){{var F=Jb();if(!F){var q=typeof E=="string"?E:E.displayName||E.name;q&&(F=`
24
-
25
- Check the top-level render call using <`+q+">.")}return F}}function ew(E,F){{if(!E._store||E._store.validated||E.key!=null)return;E._store.validated=!0;var q=Mk(F);if(Qb[q])return;Qb[q]=!0;var ae="";E&&E._owner&&E._owner!==lc.current&&(ae=" It was passed a child from "+G(E._owner.type)+"."),Xn(E),b('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',q,ae),Xn(null)}}function tw(E,F){{if(typeof E!="object")return;if(Ht(E))for(var q=0;q<E.length;q++){var ae=E[q];uc(ae)&&ew(ae,F)}else if(uc(E))E._store&&(E._store.validated=!0);else if(E){var me=v(E);if(typeof me=="function"&&me!==E.entries)for(var ge=me.call(E),fe;!(fe=ge.next()).done;)uc(fe.value)&&ew(fe.value,F)}}}function _k(E){{var F=E.type;if(F==null||typeof F=="string")return;var q;if(typeof F=="function")q=F.propTypes;else if(typeof F=="object"&&(F.$$typeof===l||F.$$typeof===f))q=F.propTypes;else return;if(q){var ae=G(F);Ie(q,E.props,"prop",ae,E)}else if(F.PropTypes!==void 0&&!cc){cc=!0;var me=G(F);b("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",me||"Unknown")}typeof F.getDefaultProps=="function"&&!F.getDefaultProps.isReactClassApproved&&b("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function jk(E){{for(var F=Object.keys(E.props),q=0;q<F.length;q++){var ae=F[q];if(ae!=="children"&&ae!=="key"){Xn(E),b("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",ae),Xn(null);break}}E.ref!==null&&(Xn(E),b("Invalid attribute `ref` supplied to `React.Fragment`."),Xn(null))}}var nw={};function rw(E,F,q,ae,me,ge){{var fe=k(E);if(!fe){var ue="";(E===void 0||typeof E=="object"&&E!==null&&Object.keys(E).length===0)&&(ue+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var Fe=Nk();Fe?ue+=Fe:ue+=Jb();var Pe;E===null?Pe="null":Ht(E)?Pe="array":E!==void 0&&E.$$typeof===t?(Pe="<"+(G(E.type)||"Unknown")+" />",ue=" Did you accidentally export a JSX literal instead of a component?"):Pe=typeof E,b("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",Pe,ue)}var Ae=Ak(E,F,q,me,ge);if(Ae==null)return Ae;if(fe){var Je=F.children;if(Je!==void 0)if(ae)if(Ht(Je)){for(var qn=0;qn<Je.length;qn++)tw(Je[qn],E);Object.freeze&&Object.freeze(Je)}else b("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else tw(Je,E)}if(Me.call(F,"key")){var cn=G(E),We=Object.keys(F).filter(function(Vk){return Vk!=="key"}),dc=We.length>0?"{key: someKey, "+We.join(": ..., ")+": ...}":"{key: someKey}";if(!nw[cn+dc]){var Lk=We.length>0?"{"+We.join(": ..., ")+": ...}":"{}";b(`A props object containing a "key" prop is being spread into JSX:
26
- let props = %s;
27
- <%s {...props} />
28
- React keys must be passed directly to JSX without using spread:
29
- let props = %s;
30
- <%s key={someKey} {...props} />`,dc,cn,Lk,cn),nw[cn+dc]=!0}}return E===r?jk(Ae):_k(Ae),Ae}}function Ik(E,F,q){return rw(E,F,q,!0)}function Dk(E,F,q){return rw(E,F,q,!1)}var kk=Dk,Ok=Ik;tr.Fragment=r,tr.jsx=kk,tr.jsxs=Ok}()),tr}process.env.NODE_ENV==="production"?Hs.exports=kw():Hs.exports=Ow();var p=Hs.exports;const Lw={theme:"system",setTheme:()=>null},Us=T.createContext(Lw),Gs=()=>{const e=T.useContext(Us);if(e===void 0)throw new Error("useTheme must be used within a ThemeProvider");return e};function Vw({children:e,defaultTheme:t="system",storageKey:n="vite-ui-theme",...r}){const[o,s]=T.useState(()=>localStorage.getItem(n)||t);T.useEffect(()=>{const a=window.document.documentElement;if(a.classList.remove("light","dark"),o==="system"){const l=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light";a.classList.add(l);return}a.classList.add(o)},[o]);const i={theme:o,setTheme:a=>{localStorage.setItem(n,a),s(a)}};return p.jsx(Us.Provider,{...r,value:i,children:e})}function Tc(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Ve(...e){return t=>{let n=!1;const r=e.map(o=>{const s=Tc(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():Tc(e[o],null)}}}}function re(...e){return d.useCallback(Ve(...e),e)}var $w=Symbol.for("react.lazy"),to=d[" use ".trim().toString()];function Fw(e){return typeof e=="object"&&e!==null&&"then"in e}function Pc(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===$w&&"_payload"in e&&Fw(e._payload)}function nr(e){const t=Ww(e),n=d.forwardRef((r,o)=>{let{children:s,...i}=r;Pc(s)&&typeof to=="function"&&(s=to(s._payload));const a=d.Children.toArray(s),l=a.find(Hw);if(l){const c=l.props.children,u=a.map(f=>f===l?d.Children.count(c)>1?d.Children.only(null):d.isValidElement(c)?c.props.children:null:f);return p.jsx(t,{...i,ref:o,children:d.isValidElement(c)?d.cloneElement(c,void 0,u):null})}return p.jsx(t,{...i,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}var Bw=nr("Slot");function Ww(e){const t=d.forwardRef((n,r)=>{let{children:o,...s}=n;if(Pc(o)&&typeof to=="function"&&(o=to(o._payload)),d.isValidElement(o)){const i=Gw(o),a=Uw(s,o.props);return o.type!==d.Fragment&&(a.ref=r?Ve(r,i):i),d.cloneElement(o,a)}return d.Children.count(o)>1?d.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var zw=Symbol("radix.slottable");function Hw(e){return d.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===zw}function Uw(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 l=s(...a);return o(...a),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function Gw(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)}const Rc=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,Ac=mc,fn=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return Ac(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:s}=t,i=Object.keys(o).map(c=>{const u=n==null?void 0:n[c],f=s==null?void 0:s[c];if(u===null)return null;const h=Rc(u)||Rc(f);return o[c][h]}),a=n&&Object.entries(n).reduce((c,u)=>{let[f,h]=u;return h===void 0||(c[f]=h),c},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((c,u)=>{let{class:f,className:h,...m}=u;return Object.entries(m).every(y=>{let[g,v]=y;return Array.isArray(v)?v.includes({...s,...a}[g]):{...s,...a}[g]===v})?[...c,f,h]:c},[]);return Ac(e,i,l,n==null?void 0:n.class,n==null?void 0:n.className)},Ks=fn("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"}}),Nc=d.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...o},s)=>{const i=r?Bw:"button";return p.jsx(i,{className:M(Ks({variant:t,size:n,className:e})),ref:s,...o})});Nc.displayName="Button";const Mc=d.forwardRef(({className:e,type:t,...n},r)=>p.jsx("input",{type:t,className:M("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}));Mc.displayName="Input";const _c=d.forwardRef(({className:e,...t},n)=>p.jsx("textarea",{className:M("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}));_c.displayName="Textarea";var Kw=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Yw=Kw.reduce((e,t)=>{const n=nr(`Primitive.${t}`),r=d.forwardRef((o,s)=>{const{asChild:i,...a}=o,l=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),p.jsx(l,{...a,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),Xw="Label",jc=d.forwardRef((e,t)=>p.jsx(Yw.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())}}));jc.displayName=Xw;var Ic=jc;const qw=fn("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Dc=d.forwardRef(({className:e,...t},n)=>p.jsx(Ic,{ref:n,className:M(qw(),e),...t}));Dc.displayName=Ic.displayName;function Zw(e,t){const n=d.createContext(t),r=s=>{const{children:i,...a}=s,l=d.useMemo(()=>a,Object.values(a));return p.jsx(n.Provider,{value:l,children:i})};r.displayName=e+"Provider";function o(s){const i=d.useContext(n);if(i)return i;if(t!==void 0)return t;throw new Error(`\`${s}\` must be used within \`${e}\``)}return[r,o]}function Re(e,t=[]){let n=[];function r(s,i){const a=d.createContext(i),l=n.length;n=[...n,i];const c=f=>{var x;const{scope:h,children:m,...y}=f,g=((x=h==null?void 0:h[e])==null?void 0:x[l])||a,v=d.useMemo(()=>y,Object.values(y));return p.jsx(g.Provider,{value:v,children:m})};c.displayName=s+"Provider";function u(f,h){var g;const m=((g=h==null?void 0:h[e])==null?void 0:g[l])||a,y=d.useContext(m);if(y)return y;if(i!==void 0)return i;throw new Error(`\`${f}\` must be used within \`${s}\``)}return[c,u]}const o=()=>{const s=n.map(i=>d.createContext(i));return function(a){const l=(a==null?void 0:a[e])||s;return d.useMemo(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])}};return o.scopeName=e,[r,Jw(o,...t)]}function Jw(...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:l,scopeName:c})=>{const f=l(s)[`__scope${c}`];return{...a,...f}},{});return d.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}function D(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}var we=globalThis!=null&&globalThis.document?d.useLayoutEffect:()=>{},Qw=d[" useInsertionEffect ".trim().toString()]||we;function _e({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,s,i]=e0({defaultProp:t,onChange:n}),a=e!==void 0,l=a?e:o;{const u=d.useRef(e!==void 0);d.useEffect(()=>{const f=u.current;f!==a&&console.warn(`${r} is changing from ${f?"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 c=d.useCallback(u=>{var f;if(a){const h=t0(u)?u(e):u;h!==e&&((f=i.current)==null||f.call(i,h))}else s(u)},[a,e,s,i]);return[l,c]}function e0({defaultProp:e,onChange:t}){const[n,r]=d.useState(e),o=d.useRef(n),s=d.useRef(t);return Qw(()=>{s.current=t},[t]),d.useEffect(()=>{var i;o.current!==n&&((i=s.current)==null||i.call(s,n),o.current=n)},[n,o]),[n,r,s]}function t0(e){return typeof e=="function"}function rr(e){const t=d.useRef({value:e,previous:e});return d.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function or(e){const[t,n]=d.useState(void 0);return we(()=>{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 l=s.borderBoxSize,c=Array.isArray(l)?l[0]:l;i=c.inlineSize,a=c.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 n0(e,t){return d.useReducer((n,r)=>t[n][r]??n,e)}var Te=e=>{const{present:t,children:n}=e,r=r0(t),o=typeof n=="function"?n({present:r.isPresent}):d.Children.only(n),s=re(r.ref,o0(o));return typeof n=="function"||r.isPresent?d.cloneElement(o,{ref:s}):null};Te.displayName="Presence";function r0(e){const[t,n]=d.useState(),r=d.useRef(null),o=d.useRef(e),s=d.useRef("none"),i=e?"mounted":"unmounted",[a,l]=n0(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return d.useEffect(()=>{const c=no(r.current);s.current=a==="mounted"?c:"none"},[a]),we(()=>{const c=r.current,u=o.current;if(u!==e){const h=s.current,m=no(c);e?l("MOUNT"):m==="none"||(c==null?void 0:c.display)==="none"?l("UNMOUNT"):l(u&&h!==m?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),we(()=>{if(t){let c;const u=t.ownerDocument.defaultView??window,f=m=>{const g=no(r.current).includes(CSS.escape(m.animationName));if(m.target===t&&g&&(l("ANIMATION_END"),!o.current)){const v=t.style.animationFillMode;t.style.animationFillMode="forwards",c=u.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=v)})}},h=m=>{m.target===t&&(s.current=no(r.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{u.clearTimeout(c),t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:d.useCallback(c=>{r.current=c?getComputedStyle(c):null,n(c)},[])}}function no(e){return(e==null?void 0:e.animationName)||"none"}function o0(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function s0(e){const t=i0(e),n=d.forwardRef((r,o)=>{const{children:s,...i}=r,a=d.Children.toArray(s),l=a.find(l0);if(l){const c=l.props.children,u=a.map(f=>f===l?d.Children.count(c)>1?d.Children.only(null):d.isValidElement(c)?c.props.children:null:f);return p.jsx(t,{...i,ref:o,children:d.isValidElement(c)?d.cloneElement(c,void 0,u):null})}return p.jsx(t,{...i,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}function i0(e){const t=d.forwardRef((n,r)=>{const{children:o,...s}=n;if(d.isValidElement(o)){const i=u0(o),a=c0(s,o.props);return o.type!==d.Fragment&&(a.ref=r?Ve(r,i):i),d.cloneElement(o,a)}return d.Children.count(o)>1?d.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var a0=Symbol("radix.slottable");function l0(e){return d.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===a0}function c0(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 l=s(...a);return o(...a),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function u0(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 d0=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],H=d0.reduce((e,t)=>{const n=s0(`Primitive.${t}`),r=d.forwardRef((o,s)=>{const{asChild:i,...a}=o,l=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),p.jsx(l,{...a,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function Ys(e,t){e&&Zn.flushSync(()=>e.dispatchEvent(t))}var ro="Checkbox",[f0]=Re(ro),[p0,Xs]=f0(ro);function h0(e){const{__scopeCheckbox:t,checked:n,children:r,defaultChecked:o,disabled:s,form:i,name:a,onCheckedChange:l,required:c,value:u="on",internal_do_not_use_render:f}=e,[h,m]=_e({prop:n,defaultProp:o??!1,onChange:l,caller:ro}),[y,g]=d.useState(null),[v,x]=d.useState(null),b=d.useRef(!1),w=y?!!i||!!y.closest("form"):!0,S={checked:h,disabled:s,setChecked:m,control:y,setControl:g,name:a,form:i,value:u,hasConsumerStoppedPropagationRef:b,required:c,defaultChecked:Tt(o)?!1:o,isFormControl:w,bubbleInput:v,setBubbleInput:x};return p.jsx(p0,{scope:t,...S,children:m0(f)?f(S):r})}var kc="CheckboxTrigger",Oc=d.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...r},o)=>{const{control:s,value:i,disabled:a,checked:l,required:c,setControl:u,setChecked:f,hasConsumerStoppedPropagationRef:h,isFormControl:m,bubbleInput:y}=Xs(kc,e),g=re(o,u),v=d.useRef(l);return d.useEffect(()=>{const x=s==null?void 0:s.form;if(x){const b=()=>f(v.current);return x.addEventListener("reset",b),()=>x.removeEventListener("reset",b)}},[s,f]),p.jsx(H.button,{type:"button",role:"checkbox","aria-checked":Tt(l)?"mixed":l,"aria-required":c,"data-state":Bc(l),"data-disabled":a?"":void 0,disabled:a,value:i,...r,ref:g,onKeyDown:D(t,x=>{x.key==="Enter"&&x.preventDefault()}),onClick:D(n,x=>{f(b=>Tt(b)?!0:!b),y&&m&&(h.current=x.isPropagationStopped(),h.current||x.stopPropagation())})})});Oc.displayName=kc;var qs=d.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:r,checked:o,defaultChecked:s,required:i,disabled:a,value:l,onCheckedChange:c,form:u,...f}=e;return p.jsx(h0,{__scopeCheckbox:n,checked:o,defaultChecked:s,disabled:a,required:i,onCheckedChange:c,name:r,form:u,value:l,internal_do_not_use_render:({isFormControl:h})=>p.jsxs(p.Fragment,{children:[p.jsx(Oc,{...f,ref:t,__scopeCheckbox:n}),h&&p.jsx(Fc,{__scopeCheckbox:n})]})})});qs.displayName=ro;var Lc="CheckboxIndicator",Vc=d.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...o}=e,s=Xs(Lc,n);return p.jsx(Te,{present:r||Tt(s.checked)||s.checked===!0,children:p.jsx(H.span,{"data-state":Bc(s.checked),"data-disabled":s.disabled?"":void 0,...o,ref:t,style:{pointerEvents:"none",...e.style}})})});Vc.displayName=Lc;var $c="CheckboxBubbleInput",Fc=d.forwardRef(({__scopeCheckbox:e,...t},n)=>{const{control:r,hasConsumerStoppedPropagationRef:o,checked:s,defaultChecked:i,required:a,disabled:l,name:c,value:u,form:f,bubbleInput:h,setBubbleInput:m}=Xs($c,e),y=re(n,m),g=rr(s),v=or(r);d.useEffect(()=>{const b=h;if(!b)return;const w=window.HTMLInputElement.prototype,C=Object.getOwnPropertyDescriptor(w,"checked").set,R=!o.current;if(g!==s&&C){const A=new Event("click",{bubbles:R});b.indeterminate=Tt(s),C.call(b,Tt(s)?!1:s),b.dispatchEvent(A)}},[h,g,s,o]);const x=d.useRef(Tt(s)?!1:s);return p.jsx(H.input,{type:"checkbox","aria-hidden":!0,defaultChecked:i??x.current,required:a,disabled:l,name:c,value:u,form:f,...t,tabIndex:-1,ref:y,style:{...t.style,...v,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});Fc.displayName=$c;function m0(e){return typeof e=="function"}function Tt(e){return e==="indeterminate"}function Bc(e){return Tt(e)?"indeterminate":e?"checked":"unchecked"}/**
1
+ (function(E,p){typeof exports=="object"&&typeof module<"u"?p(exports,require("react/jsx-runtime"),require("react"),require("react-dom")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime","react","react-dom"],p):(E=typeof globalThis<"u"?globalThis:E||self,p(E.BlazeUI={},E.jsxRuntime,E.React,E.ReactDOM))})(this,function(E,p,P,zl){"use strict";function Wl(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 u=Wl(P),Tn=Wl(zl);function Hl(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=Hl(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function jl(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Hl(e))&&(r&&(r+=" "),r+=t);return r}const hs="-",T0=e=>{const t=N0(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:i=>{const a=i.split(hs);return a[0]===""&&a.length!==1&&a.shift(),Ul(a,t)||A0(i)},getConflictingClassGroupIds:(i,a)=>{const l=n[i]||[];return a&&r[i]?[...l,...r[i]]:l}}},Ul=(e,t)=>{var i;if(e.length===0)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?Ul(e.slice(1),r):void 0;if(o)return o;if(t.validators.length===0)return;const s=e.join(hs);return(i=t.validators.find(({validator:a})=>a(s)))==null?void 0:i.classGroupId},Gl=/^\[(.+)\]$/,A0=e=>{if(Gl.test(e)){const t=Gl.exec(e)[1],n=t==null?void 0:t.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},N0=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return I0(Object.entries(e.classGroups),n).forEach(([s,i])=>{ms(i,r,s,t)}),r},ms=(e,t,n,r)=>{e.forEach(o=>{if(typeof o=="string"){const s=o===""?t:Kl(t,o);s.classGroupId=n;return}if(typeof o=="function"){if(M0(o)){ms(o(r),t,n,r);return}t.validators.push({validator:o,classGroupId:n});return}Object.entries(o).forEach(([s,i])=>{ms(i,Kl(t,s),n,r)})})},Kl=(e,t)=>{let n=e;return t.split(hs).forEach(r=>{n.nextPart.has(r)||n.nextPart.set(r,{nextPart:new Map,validators:[]}),n=n.nextPart.get(r)}),n},M0=e=>e.isThemeGetter,I0=(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,D0=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)}}},Yl="!",_0=e=>{const{separator:t,experimentalParseClassName:n}=e,r=t.length===1,o=t[0],s=t.length,i=a=>{const l=[];let c=0,d=0,f;for(let v=0;v<a.length;v++){let b=a[v];if(c===0){if(b===o&&(r||a.slice(v,v+s)===t)){l.push(a.slice(d,v)),d=v+s;continue}if(b==="/"){f=v;continue}}b==="["?c++:b==="]"&&c--}const h=l.length===0?a:a.substring(d),m=h.startsWith(Yl),y=m?h.substring(1):h,g=f&&f>d?f-d:void 0;return{modifiers:l,hasImportantModifier:m,baseClassName:y,maybePostfixModifierPosition:g}};return n?a=>n({className:a,parseClassName:i}):i},k0=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},O0=e=>({cache:D0(e.cacheSize),parseClassName:_0(e),...T0(e)}),L0=/\s+/,V0=(e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o}=t,s=[],i=e.trim().split(L0);let a="";for(let l=i.length-1;l>=0;l-=1){const c=i[l],{modifiers:d,hasImportantModifier:f,baseClassName:h,maybePostfixModifierPosition:m}=n(c);let y=!!m,g=r(y?h.substring(0,m):h);if(!g){if(!y){a=c+(a.length>0?" "+a:a);continue}if(g=r(h),!g){a=c+(a.length>0?" "+a:a);continue}y=!1}const v=k0(d).join(":"),b=f?v+Yl:v,w=b+g;if(s.includes(w))continue;s.push(w);const x=o(g,y);for(let S=0;S<x.length;++S){const C=x[S];s.push(b+C)}a=c+(a.length>0?" "+a:a)}return a};function $0(){let e=0,t,n,r="";for(;e<arguments.length;)(t=arguments[e++])&&(n=Xl(t))&&(r&&(r+=" "),r+=n);return r}const Xl=e=>{if(typeof e=="string")return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=Xl(e[r]))&&(n&&(n+=" "),n+=t);return n};function F0(e,...t){let n,r,o,s=i;function i(l){const c=t.reduce((d,f)=>f(d),e());return n=O0(c),r=n.cache.get,o=n.cache.set,s=a,a(l)}function a(l){const c=r(l);if(c)return c;const d=V0(l,n);return o(l,d),d}return function(){return s($0.apply(null,arguments))}}const ce=e=>{const t=n=>n[e]||[];return t.isThemeGetter=!0,t},ql=/^\[(?:([a-z-]+):)?(.+)\]$/i,R0=/^\d+\/\d+$/,B0=new Set(["px","full","screen"]),z0=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,W0=/\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$/,H0=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,j0=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,U0=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,it=e=>Ut(e)||B0.has(e)||R0.test(e),ut=e=>Gt(e,"length",Q0),Ut=e=>!!e&&!Number.isNaN(Number(e)),gs=e=>Gt(e,"number",Ut),An=e=>!!e&&Number.isInteger(Number(e)),G0=e=>e.endsWith("%")&&Ut(e.slice(0,-1)),oe=e=>ql.test(e),dt=e=>z0.test(e),K0=new Set(["length","size","percentage"]),Y0=e=>Gt(e,K0,Zl),X0=e=>Gt(e,"position",Zl),q0=new Set(["image","url"]),Z0=e=>Gt(e,q0,tw),J0=e=>Gt(e,"",ew),Nn=()=>!0,Gt=(e,t,n)=>{const r=ql.exec(e);return r?r[1]?typeof t=="string"?r[1]===t:t.has(r[1]):n(r[2]):!1},Q0=e=>W0.test(e)&&!H0.test(e),Zl=()=>!1,ew=e=>j0.test(e),tw=e=>U0.test(e),nw=F0(()=>{const e=ce("colors"),t=ce("spacing"),n=ce("blur"),r=ce("brightness"),o=ce("borderColor"),s=ce("borderRadius"),i=ce("borderSpacing"),a=ce("borderWidth"),l=ce("contrast"),c=ce("grayscale"),d=ce("hueRotate"),f=ce("invert"),h=ce("gap"),m=ce("gradientColorStops"),y=ce("gradientColorStopPositions"),g=ce("inset"),v=ce("margin"),b=ce("opacity"),w=ce("padding"),x=ce("saturate"),S=ce("scale"),C=ce("sepia"),T=ce("skew"),A=ce("space"),N=ce("translate"),I=()=>["auto","contain","none"],O=()=>["auto","hidden","clip","visible","scroll"],L=()=>["auto",oe,t],V=()=>[oe,t],U=()=>["",it,ut],_=()=>["auto",Ut,oe],K=()=>["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top"],H=()=>["solid","dashed","dotted","double","none"],B=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],$=()=>["start","end","center","between","around","evenly","stretch"],F=()=>["","0",oe],ne=()=>["auto","avoid","all","avoid-page","page","left","right","column"],re=()=>[Ut,oe];return{cacheSize:500,separator:":",theme:{colors:[Nn],spacing:[it,ut],blur:["none","",dt,oe],brightness:re(),borderColor:[e],borderRadius:["none","","full",dt,oe],borderSpacing:V(),borderWidth:U(),contrast:re(),grayscale:F(),hueRotate:re(),invert:F(),gap:V(),gradientColorStops:[e],gradientColorStopPositions:[G0,ut],inset:L(),margin:L(),opacity:re(),padding:V(),saturate:re(),scale:re(),sepia:F(),skew:re(),space:V(),translate:V()},classGroups:{aspect:[{aspect:["auto","square","video",oe]}],container:["container"],columns:[{columns:[dt]}],"break-after":[{"break-after":ne()}],"break-before":[{"break-before":ne()}],"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:[...K(),oe]}],overflow:[{overflow:O()}],"overflow-x":[{"overflow-x":O()}],"overflow-y":[{"overflow-y":O()}],overscroll:[{overscroll:I()}],"overscroll-x":[{"overscroll-x":I()}],"overscroll-y":[{"overscroll-y":I()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[g]}],"inset-x":[{"inset-x":[g]}],"inset-y":[{"inset-y":[g]}],start:[{start:[g]}],end:[{end:[g]}],top:[{top:[g]}],right:[{right:[g]}],bottom:[{bottom:[g]}],left:[{left:[g]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",An,oe]}],basis:[{basis:L()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",oe]}],grow:[{grow:F()}],shrink:[{shrink:F()}],order:[{order:["first","last","none",An,oe]}],"grid-cols":[{"grid-cols":[Nn]}],"col-start-end":[{col:["auto",{span:["full",An,oe]},oe]}],"col-start":[{"col-start":_()}],"col-end":[{"col-end":_()}],"grid-rows":[{"grid-rows":[Nn]}],"row-start-end":[{row:["auto",{span:[An,oe]},oe]}],"row-start":[{"row-start":_()}],"row-end":[{"row-end":_()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",oe]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",oe]}],gap:[{gap:[h]}],"gap-x":[{"gap-x":[h]}],"gap-y":[{"gap-y":[h]}],"justify-content":[{justify:["normal",...$()]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal",...$(),"baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":[...$(),"baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[w]}],px:[{px:[w]}],py:[{py:[w]}],ps:[{ps:[w]}],pe:[{pe:[w]}],pt:[{pt:[w]}],pr:[{pr:[w]}],pb:[{pb:[w]}],pl:[{pl:[w]}],m:[{m:[v]}],mx:[{mx:[v]}],my:[{my:[v]}],ms:[{ms:[v]}],me:[{me:[v]}],mt:[{mt:[v]}],mr:[{mr:[v]}],mb:[{mb:[v]}],ml:[{ml:[v]}],"space-x":[{"space-x":[A]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[A]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",oe,t]}],"min-w":[{"min-w":[oe,t,"min","max","fit"]}],"max-w":[{"max-w":[oe,t,"none","full","min","max","fit","prose",{screen:[dt]},dt]}],h:[{h:[oe,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[oe,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[oe,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[oe,t,"auto","min","max","fit"]}],"font-size":[{text:["base",dt,ut]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",gs]}],"font-family":[{font:[Nn]}],"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",oe]}],"line-clamp":[{"line-clamp":["none",Ut,gs]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",it,oe]}],"list-image":[{"list-image":["none",oe]}],"list-style-type":[{list:["none","disc","decimal",oe]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[b]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[b]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...H(),"wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",it,ut]}],"underline-offset":[{"underline-offset":["auto",it,oe]}],"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:V()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",oe]}],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",oe]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[b]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:[...K(),X0]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",Y0]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},Z0]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[y]}],"gradient-via-pos":[{via:[y]}],"gradient-to-pos":[{to:[y]}],"gradient-from":[{from:[m]}],"gradient-via":[{via:[m]}],"gradient-to":[{to:[m]}],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":[b]}],"border-style":[{border:[...H(),"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":[b]}],"divide-style":[{divide:H()}],"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:["",...H()]}],"outline-offset":[{"outline-offset":[it,oe]}],"outline-w":[{outline:[it,ut]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:U()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[b]}],"ring-offset-w":[{"ring-offset":[it,ut]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",dt,J0]}],"shadow-color":[{shadow:[Nn]}],opacity:[{opacity:[b]}],"mix-blend":[{"mix-blend":[...B(),"plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":B()}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",dt,oe]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[d]}],invert:[{invert:[f]}],saturate:[{saturate:[x]}],sepia:[{sepia:[C]}],"backdrop-filter":[{"backdrop-filter":["","none"]}],"backdrop-blur":[{"backdrop-blur":[n]}],"backdrop-brightness":[{"backdrop-brightness":[r]}],"backdrop-contrast":[{"backdrop-contrast":[l]}],"backdrop-grayscale":[{"backdrop-grayscale":[c]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[d]}],"backdrop-invert":[{"backdrop-invert":[f]}],"backdrop-opacity":[{"backdrop-opacity":[b]}],"backdrop-saturate":[{"backdrop-saturate":[x]}],"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",oe]}],duration:[{duration:re()}],ease:[{ease:["linear","in","out","in-out",oe]}],delay:[{delay:re()}],animate:[{animate:["none","spin","ping","pulse","bounce",oe]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[S]}],"scale-x":[{"scale-x":[S]}],"scale-y":[{"scale-y":[S]}],rotate:[{rotate:[An,oe]}],"translate-x":[{"translate-x":[N]}],"translate-y":[{"translate-y":[N]}],"skew-x":[{"skew-x":[T]}],"skew-y":[{"skew-y":[T]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",oe]}],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",oe]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":V()}],"scroll-mx":[{"scroll-mx":V()}],"scroll-my":[{"scroll-my":V()}],"scroll-ms":[{"scroll-ms":V()}],"scroll-me":[{"scroll-me":V()}],"scroll-mt":[{"scroll-mt":V()}],"scroll-mr":[{"scroll-mr":V()}],"scroll-mb":[{"scroll-mb":V()}],"scroll-ml":[{"scroll-ml":V()}],"scroll-p":[{"scroll-p":V()}],"scroll-px":[{"scroll-px":V()}],"scroll-py":[{"scroll-py":V()}],"scroll-ps":[{"scroll-ps":V()}],"scroll-pe":[{"scroll-pe":V()}],"scroll-pt":[{"scroll-pt":V()}],"scroll-pr":[{"scroll-pr":V()}],"scroll-pb":[{"scroll-pb":V()}],"scroll-pl":[{"scroll-pl":V()}],"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",oe]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[it,ut,gs]}],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 M(...e){return nw(jl(e))}const rw={theme:"system",setTheme:()=>null},vs=P.createContext(rw),ys=()=>{const e=P.useContext(vs);if(e===void 0)throw new Error("useTheme must be used within a ThemeProvider");return e};function ow({children:e,defaultTheme:t="system",storageKey:n="vite-ui-theme",...r}){const[o,s]=P.useState(()=>localStorage.getItem(n)||t);P.useEffect(()=>{const a=window.document.documentElement;if(a.classList.remove("light","dark"),o==="system"){const l=window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light";a.classList.add(l);return}a.classList.add(o)},[o]);const i={theme:o,setTheme:a=>{localStorage.setItem(n,a),s(a)}};return p.jsx(vs.Provider,{...r,value:i,children:e})}function Jl(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function Ce(...e){return t=>{let n=!1;const r=e.map(o=>{const s=Jl(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():Jl(e[o],null)}}}}function J(...e){return u.useCallback(Ce(...e),e)}var sw=Symbol.for("react.lazy"),Nr=u[" use ".trim().toString()];function iw(e){return typeof e=="object"&&e!==null&&"then"in e}function Ql(e){return e!=null&&typeof e=="object"&&"$$typeof"in e&&e.$$typeof===sw&&"_payload"in e&&iw(e._payload)}function Mn(e){const t=lw(e),n=u.forwardRef((r,o)=>{let{children:s,...i}=r;Ql(s)&&typeof Nr=="function"&&(s=Nr(s._payload));const a=u.Children.toArray(s),l=a.find(uw);if(l){const c=l.props.children,d=a.map(f=>f===l?u.Children.count(c)>1?u.Children.only(null):u.isValidElement(c)?c.props.children:null:f);return p.jsx(t,{...i,ref:o,children:u.isValidElement(c)?u.cloneElement(c,void 0,d):null})}return p.jsx(t,{...i,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}var aw=Mn("Slot");function lw(e){const t=u.forwardRef((n,r)=>{let{children:o,...s}=n;if(Ql(o)&&typeof Nr=="function"&&(o=Nr(o._payload)),u.isValidElement(o)){const i=fw(o),a=dw(s,o.props);return o.type!==u.Fragment&&(a.ref=r?Ce(r,i):i),u.cloneElement(o,a)}return u.Children.count(o)>1?u.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var cw=Symbol("radix.slottable");function uw(e){return u.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===cw}function dw(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 l=s(...a);return o(...a),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function fw(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)}const ec=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,tc=jl,Kt=(e,t)=>n=>{var r;if((t==null?void 0:t.variants)==null)return tc(e,n==null?void 0:n.class,n==null?void 0:n.className);const{variants:o,defaultVariants:s}=t,i=Object.keys(o).map(c=>{const d=n==null?void 0:n[c],f=s==null?void 0:s[c];if(d===null)return null;const h=ec(d)||ec(f);return o[c][h]}),a=n&&Object.entries(n).reduce((c,d)=>{let[f,h]=d;return h===void 0||(c[f]=h),c},{}),l=t==null||(r=t.compoundVariants)===null||r===void 0?void 0:r.reduce((c,d)=>{let{class:f,className:h,...m}=d;return Object.entries(m).every(y=>{let[g,v]=y;return Array.isArray(v)?v.includes({...s,...a}[g]):{...s,...a}[g]===v})?[...c,f,h]:c},[]);return tc(e,i,l,n==null?void 0:n.class,n==null?void 0:n.className)},bs=Kt("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"}}),nc=u.forwardRef(({className:e,variant:t,size:n,asChild:r=!1,...o},s)=>{const i=r?aw:"button";return p.jsx(i,{className:M(bs({variant:t,size:n,className:e})),ref:s,...o})});nc.displayName="Button";const rc=u.forwardRef(({className:e,type:t,...n},r)=>p.jsx("input",{type:t,className:M("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}));rc.displayName="Input";const oc=u.forwardRef(({className:e,...t},n)=>p.jsx("textarea",{className:M("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}));oc.displayName="Textarea";var pw=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],hw=pw.reduce((e,t)=>{const n=Mn(`Primitive.${t}`),r=u.forwardRef((o,s)=>{const{asChild:i,...a}=o,l=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),p.jsx(l,{...a,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),mw="Label",sc=u.forwardRef((e,t)=>p.jsx(hw.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())}}));sc.displayName=mw;var ic=sc;const gw=Kt("text-sm font-medium leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),ac=u.forwardRef(({className:e,...t},n)=>p.jsx(ic,{ref:n,className:M(gw(),e),...t}));ac.displayName=ic.displayName;function vw(e,t){const n=u.createContext(t),r=s=>{const{children:i,...a}=s,l=u.useMemo(()=>a,Object.values(a));return p.jsx(n.Provider,{value:l,children:i})};r.displayName=e+"Provider";function o(s){const i=u.useContext(n);if(i)return i;if(t!==void 0)return t;throw new Error(`\`${s}\` must be used within \`${e}\``)}return[r,o]}function ye(e,t=[]){let n=[];function r(s,i){const a=u.createContext(i),l=n.length;n=[...n,i];const c=f=>{var b;const{scope:h,children:m,...y}=f,g=((b=h==null?void 0:h[e])==null?void 0:b[l])||a,v=u.useMemo(()=>y,Object.values(y));return p.jsx(g.Provider,{value:v,children:m})};c.displayName=s+"Provider";function d(f,h){var g;const m=((g=h==null?void 0:h[e])==null?void 0:g[l])||a,y=u.useContext(m);if(y)return y;if(i!==void 0)return i;throw new Error(`\`${f}\` must be used within \`${s}\``)}return[c,d]}const o=()=>{const s=n.map(i=>u.createContext(i));return function(a){const l=(a==null?void 0:a[e])||s;return u.useMemo(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])}};return o.scopeName=e,[r,yw(o,...t)]}function yw(...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:l,scopeName:c})=>{const f=l(s)[`__scope${c}`];return{...a,...f}},{});return u.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}function k(e,t,{checkForDefaultPrevented:n=!0}={}){return function(o){if(e==null||e(o),n===!1||!o.defaultPrevented)return t==null?void 0:t(o)}}var pe=globalThis!=null&&globalThis.document?u.useLayoutEffect:()=>{},bw=u[" useInsertionEffect ".trim().toString()]||pe;function we({prop:e,defaultProp:t,onChange:n=()=>{},caller:r}){const[o,s,i]=ww({defaultProp:t,onChange:n}),a=e!==void 0,l=a?e:o;{const d=u.useRef(e!==void 0);u.useEffect(()=>{const f=d.current;f!==a&&console.warn(`${r} is changing from ${f?"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.`),d.current=a},[a,r])}const c=u.useCallback(d=>{var f;if(a){const h=xw(d)?d(e):d;h!==e&&((f=i.current)==null||f.call(i,h))}else s(d)},[a,e,s,i]);return[l,c]}function ww({defaultProp:e,onChange:t}){const[n,r]=u.useState(e),o=u.useRef(n),s=u.useRef(t);return bw(()=>{s.current=t},[t]),u.useEffect(()=>{var i;o.current!==n&&((i=s.current)==null||i.call(s,n),o.current=n)},[n,o]),[n,r,s]}function xw(e){return typeof e=="function"}function In(e){const t=u.useRef({value:e,previous:e});return u.useMemo(()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous),[e])}function Dn(e){const[t,n]=u.useState(void 0);return pe(()=>{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 l=s.borderBoxSize,c=Array.isArray(l)?l[0]:l;i=c.inlineSize,a=c.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 Sw(e,t){return u.useReducer((n,r)=>t[n][r]??n,e)}var ve=e=>{const{present:t,children:n}=e,r=Cw(t),o=typeof n=="function"?n({present:r.isPresent}):u.Children.only(n),s=J(r.ref,Ew(o));return typeof n=="function"||r.isPresent?u.cloneElement(o,{ref:s}):null};ve.displayName="Presence";function Cw(e){const[t,n]=u.useState(),r=u.useRef(null),o=u.useRef(e),s=u.useRef("none"),i=e?"mounted":"unmounted",[a,l]=Sw(i,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return u.useEffect(()=>{const c=Mr(r.current);s.current=a==="mounted"?c:"none"},[a]),pe(()=>{const c=r.current,d=o.current;if(d!==e){const h=s.current,m=Mr(c);e?l("MOUNT"):m==="none"||(c==null?void 0:c.display)==="none"?l("UNMOUNT"):l(d&&h!==m?"ANIMATION_OUT":"UNMOUNT"),o.current=e}},[e,l]),pe(()=>{if(t){let c;const d=t.ownerDocument.defaultView??window,f=m=>{const g=Mr(r.current).includes(CSS.escape(m.animationName));if(m.target===t&&g&&(l("ANIMATION_END"),!o.current)){const v=t.style.animationFillMode;t.style.animationFillMode="forwards",c=d.setTimeout(()=>{t.style.animationFillMode==="forwards"&&(t.style.animationFillMode=v)})}},h=m=>{m.target===t&&(s.current=Mr(r.current))};return t.addEventListener("animationstart",h),t.addEventListener("animationcancel",f),t.addEventListener("animationend",f),()=>{d.clearTimeout(c),t.removeEventListener("animationstart",h),t.removeEventListener("animationcancel",f),t.removeEventListener("animationend",f)}}else l("ANIMATION_END")},[t,l]),{isPresent:["mounted","unmountSuspended"].includes(a),ref:u.useCallback(c=>{r.current=c?getComputedStyle(c):null,n(c)},[])}}function Mr(e){return(e==null?void 0:e.animationName)||"none"}function Ew(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function Pw(e){const t=Tw(e),n=u.forwardRef((r,o)=>{const{children:s,...i}=r,a=u.Children.toArray(s),l=a.find(Nw);if(l){const c=l.props.children,d=a.map(f=>f===l?u.Children.count(c)>1?u.Children.only(null):u.isValidElement(c)?c.props.children:null:f);return p.jsx(t,{...i,ref:o,children:u.isValidElement(c)?u.cloneElement(c,void 0,d):null})}return p.jsx(t,{...i,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}function Tw(e){const t=u.forwardRef((n,r)=>{const{children:o,...s}=n;if(u.isValidElement(o)){const i=Iw(o),a=Mw(s,o.props);return o.type!==u.Fragment&&(a.ref=r?Ce(r,i):i),u.cloneElement(o,a)}return u.Children.count(o)>1?u.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Aw=Symbol("radix.slottable");function Nw(e){return u.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Aw}function Mw(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 l=s(...a);return o(...a),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function Iw(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 Dw=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],W=Dw.reduce((e,t)=>{const n=Pw(`Primitive.${t}`),r=u.forwardRef((o,s)=>{const{asChild:i,...a}=o,l=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),p.jsx(l,{...a,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{});function ws(e,t){e&&Tn.flushSync(()=>e.dispatchEvent(t))}var Ir="Checkbox",[_w]=ye(Ir),[kw,xs]=_w(Ir);function Ow(e){const{__scopeCheckbox:t,checked:n,children:r,defaultChecked:o,disabled:s,form:i,name:a,onCheckedChange:l,required:c,value:d="on",internal_do_not_use_render:f}=e,[h,m]=we({prop:n,defaultProp:o??!1,onChange:l,caller:Ir}),[y,g]=u.useState(null),[v,b]=u.useState(null),w=u.useRef(!1),x=y?!!i||!!y.closest("form"):!0,S={checked:h,disabled:s,setChecked:m,control:y,setControl:g,name:a,form:i,value:d,hasConsumerStoppedPropagationRef:w,required:c,defaultChecked:ft(o)?!1:o,isFormControl:x,bubbleInput:v,setBubbleInput:b};return p.jsx(kw,{scope:t,...S,children:Lw(f)?f(S):r})}var lc="CheckboxTrigger",cc=u.forwardRef(({__scopeCheckbox:e,onKeyDown:t,onClick:n,...r},o)=>{const{control:s,value:i,disabled:a,checked:l,required:c,setControl:d,setChecked:f,hasConsumerStoppedPropagationRef:h,isFormControl:m,bubbleInput:y}=xs(lc,e),g=J(o,d),v=u.useRef(l);return u.useEffect(()=>{const b=s==null?void 0:s.form;if(b){const w=()=>f(v.current);return b.addEventListener("reset",w),()=>b.removeEventListener("reset",w)}},[s,f]),p.jsx(W.button,{type:"button",role:"checkbox","aria-checked":ft(l)?"mixed":l,"aria-required":c,"data-state":hc(l),"data-disabled":a?"":void 0,disabled:a,value:i,...r,ref:g,onKeyDown:k(t,b=>{b.key==="Enter"&&b.preventDefault()}),onClick:k(n,b=>{f(w=>ft(w)?!0:!w),y&&m&&(h.current=b.isPropagationStopped(),h.current||b.stopPropagation())})})});cc.displayName=lc;var Ss=u.forwardRef((e,t)=>{const{__scopeCheckbox:n,name:r,checked:o,defaultChecked:s,required:i,disabled:a,value:l,onCheckedChange:c,form:d,...f}=e;return p.jsx(Ow,{__scopeCheckbox:n,checked:o,defaultChecked:s,disabled:a,required:i,onCheckedChange:c,name:r,form:d,value:l,internal_do_not_use_render:({isFormControl:h})=>p.jsxs(p.Fragment,{children:[p.jsx(cc,{...f,ref:t,__scopeCheckbox:n}),h&&p.jsx(pc,{__scopeCheckbox:n})]})})});Ss.displayName=Ir;var uc="CheckboxIndicator",dc=u.forwardRef((e,t)=>{const{__scopeCheckbox:n,forceMount:r,...o}=e,s=xs(uc,n);return p.jsx(ve,{present:r||ft(s.checked)||s.checked===!0,children:p.jsx(W.span,{"data-state":hc(s.checked),"data-disabled":s.disabled?"":void 0,...o,ref:t,style:{pointerEvents:"none",...e.style}})})});dc.displayName=uc;var fc="CheckboxBubbleInput",pc=u.forwardRef(({__scopeCheckbox:e,...t},n)=>{const{control:r,hasConsumerStoppedPropagationRef:o,checked:s,defaultChecked:i,required:a,disabled:l,name:c,value:d,form:f,bubbleInput:h,setBubbleInput:m}=xs(fc,e),y=J(n,m),g=In(s),v=Dn(r);u.useEffect(()=>{const w=h;if(!w)return;const x=window.HTMLInputElement.prototype,C=Object.getOwnPropertyDescriptor(x,"checked").set,T=!o.current;if(g!==s&&C){const A=new Event("click",{bubbles:T});w.indeterminate=ft(s),C.call(w,ft(s)?!1:s),w.dispatchEvent(A)}},[h,g,s,o]);const b=u.useRef(ft(s)?!1:s);return p.jsx(W.input,{type:"checkbox","aria-hidden":!0,defaultChecked:i??b.current,required:a,disabled:l,name:c,value:d,form:f,...t,tabIndex:-1,ref:y,style:{...t.style,...v,position:"absolute",pointerEvents:"none",opacity:0,margin:0,transform:"translateX(-100%)"}})});pc.displayName=fc;function Lw(e){return typeof e=="function"}function ft(e){return e==="indeterminate"}function hc(e){return ft(e)?"indeterminate":e?"checked":"unchecked"}/**
31
2
  * @license lucide-react v0.379.0 - ISC
32
3
  *
33
4
  * This source code is licensed under the ISC license.
34
5
  * See the LICENSE file in the root directory of this source tree.
35
- */const g0=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),Wc=(...e)=>e.filter((t,n,r)=>!!t&&r.indexOf(t)===n).join(" ");/**
6
+ */const Vw=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),mc=(...e)=>e.filter((t,n,r)=>!!t&&r.indexOf(t)===n).join(" ");/**
36
7
  * @license lucide-react v0.379.0 - ISC
37
8
  *
38
9
  * This source code is licensed under the ISC license.
39
10
  * See the LICENSE file in the root directory of this source tree.
40
- */var v0={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};/**
11
+ */var $w={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"};/**
41
12
  * @license lucide-react v0.379.0 - ISC
42
13
  *
43
14
  * This source code is licensed under the ISC license.
44
15
  * See the LICENSE file in the root directory of this source tree.
45
- */const y0=T.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:s,iconNode:i,...a},l)=>T.createElement("svg",{ref:l,...v0,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:Wc("lucide",o),...a},[...i.map(([c,u])=>T.createElement(c,u)),...Array.isArray(s)?s:[s]]));/**
16
+ */const Fw=P.forwardRef(({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:r,className:o="",children:s,iconNode:i,...a},l)=>P.createElement("svg",{ref:l,...$w,width:t,height:t,stroke:e,strokeWidth:r?Number(n)*24/Number(t):n,className:mc("lucide",o),...a},[...i.map(([c,d])=>P.createElement(c,d)),...Array.isArray(s)?s:[s]]));/**
46
17
  * @license lucide-react v0.379.0 - ISC
47
18
  *
48
19
  * This source code is licensed under the ISC license.
49
20
  * See the LICENSE file in the root directory of this source tree.
50
- */const Pt=(e,t)=>{const n=T.forwardRef(({className:r,...o},s)=>T.createElement(y0,{ref:s,iconNode:t,className:Wc(`lucide-${g0(e)}`,r),...o}));return n.displayName=`${e}`,n};/**
21
+ */const pt=(e,t)=>{const n=P.forwardRef(({className:r,...o},s)=>P.createElement(Fw,{ref:s,iconNode:t,className:mc(`lucide-${Vw(e)}`,r),...o}));return n.displayName=`${e}`,n};/**
51
22
  * @license lucide-react v0.379.0 - ISC
52
23
  *
53
24
  * This source code is licensed under the ISC license.
54
25
  * See the LICENSE file in the root directory of this source tree.
55
- */const Zs=Pt("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
26
+ */const Cs=pt("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]);/**
56
27
  * @license lucide-react v0.379.0 - ISC
57
28
  *
58
29
  * This source code is licensed under the ISC license.
59
30
  * See the LICENSE file in the root directory of this source tree.
60
- */const zc=Pt("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
31
+ */const gc=pt("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]);/**
61
32
  * @license lucide-react v0.379.0 - ISC
62
33
  *
63
34
  * This source code is licensed under the ISC license.
64
35
  * See the LICENSE file in the root directory of this source tree.
65
- */const x0=Pt("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
36
+ */const Rw=pt("ChevronLeft",[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]]);/**
66
37
  * @license lucide-react v0.379.0 - ISC
67
38
  *
68
39
  * This source code is licensed under the ISC license.
69
40
  * See the LICENSE file in the root directory of this source tree.
70
- */const Js=Pt("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
41
+ */const Es=pt("ChevronRight",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]);/**
71
42
  * @license lucide-react v0.379.0 - ISC
72
43
  *
73
44
  * This source code is licensed under the ISC license.
74
45
  * See the LICENSE file in the root directory of this source tree.
75
- */const Hc=Pt("Circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/**
46
+ */const vc=pt("Circle",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}]]);/**
76
47
  * @license lucide-react v0.379.0 - ISC
77
48
  *
78
49
  * This source code is licensed under the ISC license.
79
50
  * See the LICENSE file in the root directory of this source tree.
80
- */const Uc=Pt("Ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]);/**
51
+ */const yc=pt("Ellipsis",[["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}],["circle",{cx:"19",cy:"12",r:"1",key:"1wjl8i"}],["circle",{cx:"5",cy:"12",r:"1",key:"1pcz8c"}]]);/**
81
52
  * @license lucide-react v0.379.0 - ISC
82
53
  *
83
54
  * This source code is licensed under the ISC license.
84
55
  * See the LICENSE file in the root directory of this source tree.
85
- */const b0=Pt("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
56
+ */const Bw=pt("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/**
86
57
  * @license lucide-react v0.379.0 - ISC
87
58
  *
88
59
  * This source code is licensed under the ISC license.
89
60
  * See the LICENSE file in the root directory of this source tree.
90
- */const Qs=Pt("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),Gc=d.forwardRef(({className:e,...t},n)=>p.jsx(qs,{ref:n,className:M("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:p.jsx(Vc,{className:M("flex items-center justify-center text-current"),children:p.jsx(Zs,{className:"h-4 w-4"})})}));Gc.displayName=qs.displayName;function Kc(e){const t=w0(e),n=d.forwardRef((r,o)=>{const{children:s,...i}=r,a=d.Children.toArray(s),l=a.find(C0);if(l){const c=l.props.children,u=a.map(f=>f===l?d.Children.count(c)>1?d.Children.only(null):d.isValidElement(c)?c.props.children:null:f);return p.jsx(t,{...i,ref:o,children:d.isValidElement(c)?d.cloneElement(c,void 0,u):null})}return p.jsx(t,{...i,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}function w0(e){const t=d.forwardRef((n,r)=>{const{children:o,...s}=n;if(d.isValidElement(o)){const i=T0(o),a=E0(s,o.props);return o.type!==d.Fragment&&(a.ref=r?Ve(r,i):i),d.cloneElement(o,a)}return d.Children.count(o)>1?d.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var S0=Symbol("radix.slottable");function C0(e){return d.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===S0}function E0(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 l=s(...a);return o(...a),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function T0(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function pn(e){const t=e+"CollectionProvider",[n,r]=Re(t),[o,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),i=g=>{const{scope:v,children:x}=g,b=T.useRef(null),w=T.useRef(new Map).current;return p.jsx(o,{scope:v,itemMap:w,collectionRef:b,children:x})};i.displayName=t;const a=e+"CollectionSlot",l=Kc(a),c=T.forwardRef((g,v)=>{const{scope:x,children:b}=g,w=s(a,x),S=re(v,w.collectionRef);return p.jsx(l,{ref:S,children:b})});c.displayName=a;const u=e+"CollectionItemSlot",f="data-radix-collection-item",h=Kc(u),m=T.forwardRef((g,v)=>{const{scope:x,children:b,...w}=g,S=T.useRef(null),C=re(v,S),R=s(u,x);return T.useEffect(()=>(R.itemMap.set(S,{ref:S,...w}),()=>void R.itemMap.delete(S))),p.jsx(h,{[f]:"",ref:C,children:b})});m.displayName=u;function y(g){const v=s(e+"CollectionConsumer",g);return T.useCallback(()=>{const b=v.collectionRef.current;if(!b)return[];const w=Array.from(b.querySelectorAll(`[${f}]`));return Array.from(v.itemMap.values()).sort((R,A)=>w.indexOf(R.ref.current)-w.indexOf(A.ref.current))},[v.collectionRef,v.itemMap])}return[{Provider:i,Slot:c,ItemSlot:m},y,r]}var P0=d[" useId ".trim().toString()]||(()=>{}),R0=0;function Se(e){const[t,n]=d.useState(P0());return we(()=>{n(r=>r??String(R0++))},[e]),t?`radix-${t}`:""}function xe(e){const t=d.useRef(e);return d.useEffect(()=>{t.current=e}),d.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}var A0=d.createContext(void 0);function Rt(e){const t=d.useContext(A0);return e||t||"ltr"}var ei="rovingFocusGroup.onEntryFocus",N0={bubbles:!1,cancelable:!0},sr="RovingFocusGroup",[ti,Yc,M0]=pn(sr),[_0,hn]=Re(sr,[M0]),[j0,I0]=_0(sr),Xc=d.forwardRef((e,t)=>p.jsx(ti.Provider,{scope:e.__scopeRovingFocusGroup,children:p.jsx(ti.Slot,{scope:e.__scopeRovingFocusGroup,children:p.jsx(D0,{...e,ref:t})})}));Xc.displayName=sr;var D0=d.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:s,currentTabStopId:i,defaultCurrentTabStopId:a,onCurrentTabStopIdChange:l,onEntryFocus:c,preventScrollOnEntryFocus:u=!1,...f}=e,h=d.useRef(null),m=re(t,h),y=Rt(s),[g,v]=_e({prop:i,defaultProp:a??null,onChange:l,caller:sr}),[x,b]=d.useState(!1),w=xe(c),S=Yc(n),C=d.useRef(!1),[R,A]=d.useState(0);return d.useEffect(()=>{const N=h.current;if(N)return N.addEventListener(ei,w),()=>N.removeEventListener(ei,w)},[w]),p.jsx(j0,{scope:n,orientation:r,dir:y,loop:o,currentTabStopId:g,onItemFocus:d.useCallback(N=>v(N),[v]),onItemShiftTab:d.useCallback(()=>b(!0),[]),onFocusableItemAdd:d.useCallback(()=>A(N=>N+1),[]),onFocusableItemRemove:d.useCallback(()=>A(N=>N-1),[]),children:p.jsx(H.div,{tabIndex:x||R===0?-1:0,"data-orientation":r,...f,ref:m,style:{outline:"none",...e.style},onMouseDown:D(e.onMouseDown,()=>{C.current=!0}),onFocus:D(e.onFocus,N=>{const _=!C.current;if(N.target===N.currentTarget&&_&&!x){const k=new CustomEvent(ei,N0);if(N.currentTarget.dispatchEvent(k),!k.defaultPrevented){const O=S().filter(U=>U.focusable),L=O.find(U=>U.active),G=O.find(U=>U.id===g),X=[L,G,...O].filter(Boolean).map(U=>U.ref.current);Jc(X,u)}}C.current=!1}),onBlur:D(e.onBlur,()=>b(!1))})})}),qc="RovingFocusGroupItem",Zc=d.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:s,children:i,...a}=e,l=Se(),c=s||l,u=I0(qc,n),f=u.currentTabStopId===c,h=Yc(n),{onFocusableItemAdd:m,onFocusableItemRemove:y,currentTabStopId:g}=u;return d.useEffect(()=>{if(r)return m(),()=>y()},[r,m,y]),p.jsx(ti.ItemSlot,{scope:n,id:c,focusable:r,active:o,children:p.jsx(H.span,{tabIndex:f?0:-1,"data-orientation":u.orientation,...a,ref:t,onMouseDown:D(e.onMouseDown,v=>{r?u.onItemFocus(c):v.preventDefault()}),onFocus:D(e.onFocus,()=>u.onItemFocus(c)),onKeyDown:D(e.onKeyDown,v=>{if(v.key==="Tab"&&v.shiftKey){u.onItemShiftTab();return}if(v.target!==v.currentTarget)return;const x=L0(v,u.orientation,u.dir);if(x!==void 0){if(v.metaKey||v.ctrlKey||v.altKey||v.shiftKey)return;v.preventDefault();let w=h().filter(S=>S.focusable).map(S=>S.ref.current);if(x==="last")w.reverse();else if(x==="prev"||x==="next"){x==="prev"&&w.reverse();const S=w.indexOf(v.currentTarget);w=u.loop?V0(w,S+1):w.slice(S+1)}setTimeout(()=>Jc(w))}}),children:typeof i=="function"?i({isCurrentTabStop:f,hasTabStop:g!=null}):i})})});Zc.displayName=qc;var k0={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function O0(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function L0(e,t,n){const r=O0(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return k0[r]}function Jc(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function V0(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var ni=Xc,ri=Zc,oi="Radio",[$0,Qc]=Re(oi),[F0,B0]=$0(oi),eu=d.forwardRef((e,t)=>{const{__scopeRadio:n,name:r,checked:o=!1,required:s,disabled:i,value:a="on",onCheck:l,form:c,...u}=e,[f,h]=d.useState(null),m=re(t,v=>h(v)),y=d.useRef(!1),g=f?c||!!f.closest("form"):!0;return p.jsxs(F0,{scope:n,checked:o,disabled:i,children:[p.jsx(H.button,{type:"button",role:"radio","aria-checked":o,"data-state":ou(o),"data-disabled":i?"":void 0,disabled:i,value:a,...u,ref:m,onClick:D(e.onClick,v=>{o||l==null||l(),g&&(y.current=v.isPropagationStopped(),y.current||v.stopPropagation())})}),g&&p.jsx(ru,{control:f,bubbles:!y.current,name:r,value:a,checked:o,required:s,disabled:i,form:c,style:{transform:"translateX(-100%)"}})]})});eu.displayName=oi;var tu="RadioIndicator",nu=d.forwardRef((e,t)=>{const{__scopeRadio:n,forceMount:r,...o}=e,s=B0(tu,n);return p.jsx(Te,{present:r||s.checked,children:p.jsx(H.span,{"data-state":ou(s.checked),"data-disabled":s.disabled?"":void 0,...o,ref:t})})});nu.displayName=tu;var W0="RadioBubbleInput",ru=d.forwardRef(({__scopeRadio:e,control:t,checked:n,bubbles:r=!0,...o},s)=>{const i=d.useRef(null),a=re(i,s),l=rr(n),c=or(t);return d.useEffect(()=>{const u=i.current;if(!u)return;const f=window.HTMLInputElement.prototype,m=Object.getOwnPropertyDescriptor(f,"checked").set;if(l!==n&&m){const y=new Event("click",{bubbles:r});m.call(u,n),u.dispatchEvent(y)}},[l,n,r]),p.jsx(H.input,{type:"radio","aria-hidden":!0,defaultChecked:n,...o,tabIndex:-1,ref:a,style:{...o.style,...c,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});ru.displayName=W0;function ou(e){return e?"checked":"unchecked"}var z0=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],oo="RadioGroup",[H0]=Re(oo,[hn,Qc]),su=hn(),iu=Qc(),[U0,G0]=H0(oo),au=d.forwardRef((e,t)=>{const{__scopeRadioGroup:n,name:r,defaultValue:o,value:s,required:i=!1,disabled:a=!1,orientation:l,dir:c,loop:u=!0,onValueChange:f,...h}=e,m=su(n),y=Rt(c),[g,v]=_e({prop:s,defaultProp:o??null,onChange:f,caller:oo});return p.jsx(U0,{scope:n,name:r,required:i,disabled:a,value:g,onValueChange:v,children:p.jsx(ni,{asChild:!0,...m,orientation:l,dir:y,loop:u,children:p.jsx(H.div,{role:"radiogroup","aria-required":i,"aria-orientation":l,"data-disabled":a?"":void 0,dir:y,...h,ref:t})})})});au.displayName=oo;var lu="RadioGroupItem",cu=d.forwardRef((e,t)=>{const{__scopeRadioGroup:n,disabled:r,...o}=e,s=G0(lu,n),i=s.disabled||r,a=su(n),l=iu(n),c=d.useRef(null),u=re(t,c),f=s.value===o.value,h=d.useRef(!1);return d.useEffect(()=>{const m=g=>{z0.includes(g.key)&&(h.current=!0)},y=()=>h.current=!1;return document.addEventListener("keydown",m),document.addEventListener("keyup",y),()=>{document.removeEventListener("keydown",m),document.removeEventListener("keyup",y)}},[]),p.jsx(ri,{asChild:!0,...a,focusable:!i,active:f,children:p.jsx(eu,{disabled:i,required:s.required,checked:f,...l,...o,name:s.name,ref:u,onCheck:()=>s.onValueChange(o.value),onKeyDown:D(m=>{m.key==="Enter"&&m.preventDefault()}),onFocus:D(o.onFocus,()=>{var m;h.current&&((m=c.current)==null||m.click())})})})});cu.displayName=lu;var K0="RadioGroupIndicator",uu=d.forwardRef((e,t)=>{const{__scopeRadioGroup:n,...r}=e,o=iu(n);return p.jsx(nu,{...o,...r,ref:t})});uu.displayName=K0;var du=au,fu=cu,Y0=uu;const pu=d.forwardRef(({className:e,...t},n)=>p.jsx(du,{className:M("grid gap-2",e),...t,ref:n}));pu.displayName=du.displayName;const hu=d.forwardRef(({className:e,...t},n)=>p.jsx(fu,{ref:n,className:M("aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:p.jsx(Y0,{className:"flex items-center justify-center",children:p.jsx(Hc,{className:"h-2.5 w-2.5 fill-current text-current"})})}));hu.displayName=fu.displayName;var so="Switch",[X0]=Re(so),[q0,Z0]=X0(so),mu=d.forwardRef((e,t)=>{const{__scopeSwitch:n,name:r,checked:o,defaultChecked:s,required:i,disabled:a,value:l="on",onCheckedChange:c,form:u,...f}=e,[h,m]=d.useState(null),y=re(t,w=>m(w)),g=d.useRef(!1),v=h?u||!!h.closest("form"):!0,[x,b]=_e({prop:o,defaultProp:s??!1,onChange:c,caller:so});return p.jsxs(q0,{scope:n,checked:x,disabled:a,children:[p.jsx(H.button,{type:"button",role:"switch","aria-checked":x,"aria-required":i,"data-state":xu(x),"data-disabled":a?"":void 0,disabled:a,value:l,...f,ref:y,onClick:D(e.onClick,w=>{b(S=>!S),v&&(g.current=w.isPropagationStopped(),g.current||w.stopPropagation())})}),v&&p.jsx(yu,{control:h,bubbles:!g.current,name:r,value:l,checked:x,required:i,disabled:a,form:u,style:{transform:"translateX(-100%)"}})]})});mu.displayName=so;var gu="SwitchThumb",vu=d.forwardRef((e,t)=>{const{__scopeSwitch:n,...r}=e,o=Z0(gu,n);return p.jsx(H.span,{"data-state":xu(o.checked),"data-disabled":o.disabled?"":void 0,...r,ref:t})});vu.displayName=gu;var J0="SwitchBubbleInput",yu=d.forwardRef(({__scopeSwitch:e,control:t,checked:n,bubbles:r=!0,...o},s)=>{const i=d.useRef(null),a=re(i,s),l=rr(n),c=or(t);return d.useEffect(()=>{const u=i.current;if(!u)return;const f=window.HTMLInputElement.prototype,m=Object.getOwnPropertyDescriptor(f,"checked").set;if(l!==n&&m){const y=new Event("click",{bubbles:r});m.call(u,n),u.dispatchEvent(y)}},[l,n,r]),p.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...o,tabIndex:-1,ref:a,style:{...o.style,...c,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});yu.displayName=J0;function xu(e){return e?"checked":"unchecked"}var bu=mu,Q0=vu;const wu=d.forwardRef(({className:e,...t},n)=>p.jsx(bu,{className:M("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",e),...t,ref:n,children:p.jsx(Q0,{className:M("pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0")})}));wu.displayName=bu.displayName;function ir(e,[t,n]){return Math.min(n,Math.max(t,e))}function eS(e,t=globalThis==null?void 0:globalThis.document){const n=xe(e);d.useEffect(()=>{const r=o=>{o.key==="Escape"&&n(o)};return t.addEventListener("keydown",r,{capture:!0}),()=>t.removeEventListener("keydown",r,{capture:!0})},[n,t])}var tS="DismissableLayer",si="dismissableLayer.update",nS="dismissableLayer.pointerDownOutside",rS="dismissableLayer.focusOutside",Su,Cu=d.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),At=d.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:i,onDismiss:a,...l}=e,c=d.useContext(Cu),[u,f]=d.useState(null),h=(u==null?void 0:u.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,m]=d.useState({}),y=re(t,A=>f(A)),g=Array.from(c.layers),[v]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),x=g.indexOf(v),b=u?g.indexOf(u):-1,w=c.layersWithOutsidePointerEventsDisabled.size>0,S=b>=x,C=sS(A=>{const N=A.target,_=[...c.branches].some(k=>k.contains(N));!S||_||(o==null||o(A),i==null||i(A),A.defaultPrevented||a==null||a())},h),R=iS(A=>{const N=A.target;[...c.branches].some(k=>k.contains(N))||(s==null||s(A),i==null||i(A),A.defaultPrevented||a==null||a())},h);return eS(A=>{b===c.layers.size-1&&(r==null||r(A),!A.defaultPrevented&&a&&(A.preventDefault(),a()))},h),d.useEffect(()=>{if(u)return n&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(Su=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(u)),c.layers.add(u),Tu(),()=>{n&&c.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=Su)}},[u,h,n,c]),d.useEffect(()=>()=>{u&&(c.layers.delete(u),c.layersWithOutsidePointerEventsDisabled.delete(u),Tu())},[u,c]),d.useEffect(()=>{const A=()=>m({});return document.addEventListener(si,A),()=>document.removeEventListener(si,A)},[]),p.jsx(H.div,{...l,ref:y,style:{pointerEvents:w?S?"auto":"none":void 0,...e.style},onFocusCapture:D(e.onFocusCapture,R.onFocusCapture),onBlurCapture:D(e.onBlurCapture,R.onBlurCapture),onPointerDownCapture:D(e.onPointerDownCapture,C.onPointerDownCapture)})});At.displayName=tS;var oS="DismissableLayerBranch",Eu=d.forwardRef((e,t)=>{const n=d.useContext(Cu),r=d.useRef(null),o=re(t,r);return d.useEffect(()=>{const s=r.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),p.jsx(H.div,{...e,ref:o})});Eu.displayName=oS;function sS(e,t=globalThis==null?void 0:globalThis.document){const n=xe(e),r=d.useRef(!1),o=d.useRef(()=>{});return d.useEffect(()=>{const s=a=>{if(a.target&&!r.current){let l=function(){Pu(nS,n,c,{discrete:!0})};const c={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=l,t.addEventListener("click",o.current,{once:!0})):l()}else t.removeEventListener("click",o.current);r.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",s),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function iS(e,t=globalThis==null?void 0:globalThis.document){const n=xe(e),r=d.useRef(!1);return d.useEffect(()=>{const o=s=>{s.target&&!r.current&&Pu(rS,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 Tu(){const e=new CustomEvent(si);document.dispatchEvent(e)}function Pu(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?Ys(o,s):o.dispatchEvent(s)}var aS=At,lS=Eu,ii=0;function io(){d.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??Ru()),document.body.insertAdjacentElement("beforeend",e[1]??Ru()),ii++,()=>{ii===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),ii--}},[])}function Ru(){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 ai="focusScope.autoFocusOnMount",li="focusScope.autoFocusOnUnmount",Au={bubbles:!1,cancelable:!0},cS="FocusScope",ar=d.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:s,...i}=e,[a,l]=d.useState(null),c=xe(o),u=xe(s),f=d.useRef(null),h=re(t,g=>l(g)),m=d.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;d.useEffect(()=>{if(r){let g=function(w){if(m.paused||!a)return;const S=w.target;a.contains(S)?f.current=S:Nt(f.current,{select:!0})},v=function(w){if(m.paused||!a)return;const S=w.relatedTarget;S!==null&&(a.contains(S)||Nt(f.current,{select:!0}))},x=function(w){if(document.activeElement===document.body)for(const C of w)C.removedNodes.length>0&&Nt(a)};document.addEventListener("focusin",g),document.addEventListener("focusout",v);const b=new MutationObserver(x);return a&&b.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",g),document.removeEventListener("focusout",v),b.disconnect()}}},[r,a,m.paused]),d.useEffect(()=>{if(a){_u.add(m);const g=document.activeElement;if(!a.contains(g)){const x=new CustomEvent(ai,Au);a.addEventListener(ai,c),a.dispatchEvent(x),x.defaultPrevented||(uS(mS(Nu(a)),{select:!0}),document.activeElement===g&&Nt(a))}return()=>{a.removeEventListener(ai,c),setTimeout(()=>{const x=new CustomEvent(li,Au);a.addEventListener(li,u),a.dispatchEvent(x),x.defaultPrevented||Nt(g??document.body,{select:!0}),a.removeEventListener(li,u),_u.remove(m)},0)}}},[a,c,u,m]);const y=d.useCallback(g=>{if(!n&&!r||m.paused)return;const v=g.key==="Tab"&&!g.altKey&&!g.ctrlKey&&!g.metaKey,x=document.activeElement;if(v&&x){const b=g.currentTarget,[w,S]=dS(b);w&&S?!g.shiftKey&&x===S?(g.preventDefault(),n&&Nt(w,{select:!0})):g.shiftKey&&x===w&&(g.preventDefault(),n&&Nt(S,{select:!0})):x===b&&g.preventDefault()}},[n,r,m.paused]);return p.jsx(H.div,{tabIndex:-1,...i,ref:h,onKeyDown:y})});ar.displayName=cS;function uS(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(Nt(r,{select:t}),document.activeElement!==n)return}function dS(e){const t=Nu(e),n=Mu(t,e),r=Mu(t.reverse(),e);return[n,r]}function Nu(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 Mu(e,t){for(const n of e)if(!fS(n,{upTo:t}))return n}function fS(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 pS(e){return e instanceof HTMLInputElement&&"select"in e}function Nt(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&pS(e)&&t&&e.select()}}var _u=hS();function hS(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=ju(e,t),e.unshift(t)},remove(t){var n;e=ju(e,t),(n=e[0])==null||n.resume()}}}function ju(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function mS(e){return e.filter(t=>t.tagName!=="A")}const gS=["top","right","bottom","left"],Mt=Math.min,ze=Math.max,ao=Math.round,lo=Math.floor,it=e=>({x:e,y:e}),vS={left:"right",right:"left",bottom:"top",top:"bottom"},yS={start:"end",end:"start"};function ci(e,t,n){return ze(e,Mt(t,n))}function wt(e,t){return typeof e=="function"?e(t):e}function St(e){return e.split("-")[0]}function mn(e){return e.split("-")[1]}function ui(e){return e==="x"?"y":"x"}function di(e){return e==="y"?"height":"width"}const xS=new Set(["top","bottom"]);function at(e){return xS.has(St(e))?"y":"x"}function fi(e){return ui(at(e))}function bS(e,t,n){n===void 0&&(n=!1);const r=mn(e),o=fi(e),s=di(o);let i=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(i=co(i)),[i,co(i)]}function wS(e){const t=co(e);return[pi(e),t,pi(t)]}function pi(e){return e.replace(/start|end/g,t=>yS[t])}const Iu=["left","right"],Du=["right","left"],SS=["top","bottom"],CS=["bottom","top"];function ES(e,t,n){switch(e){case"top":case"bottom":return n?t?Du:Iu:t?Iu:Du;case"left":case"right":return t?SS:CS;default:return[]}}function TS(e,t,n,r){const o=mn(e);let s=ES(St(e),n==="start",r);return o&&(s=s.map(i=>i+"-"+o),t&&(s=s.concat(s.map(pi)))),s}function co(e){return e.replace(/left|right|bottom|top/g,t=>vS[t])}function PS(e){return{top:0,right:0,bottom:0,left:0,...e}}function ku(e){return typeof e!="number"?PS(e):{top:e,right:e,bottom:e,left:e}}function uo(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 Ou(e,t,n){let{reference:r,floating:o}=e;const s=at(t),i=fi(t),a=di(i),l=St(t),c=s==="y",u=r.x+r.width/2-o.width/2,f=r.y+r.height/2-o.height/2,h=r[a]/2-o[a]/2;let m;switch(l){case"top":m={x:u,y:r.y-o.height};break;case"bottom":m={x:u,y:r.y+r.height};break;case"right":m={x:r.x+r.width,y:f};break;case"left":m={x:r.x-o.width,y:f};break;default:m={x:r.x,y:r.y}}switch(mn(t)){case"start":m[i]-=h*(n&&c?-1:1);break;case"end":m[i]+=h*(n&&c?-1:1);break}return m}const RS=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:s=[],platform:i}=n,a=s.filter(Boolean),l=await(i.isRTL==null?void 0:i.isRTL(t));let c=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:f}=Ou(c,r,l),h=r,m={},y=0;for(let g=0;g<a.length;g++){const{name:v,fn:x}=a[g],{x:b,y:w,data:S,reset:C}=await x({x:u,y:f,initialPlacement:r,placement:h,strategy:o,middlewareData:m,rects:c,platform:i,elements:{reference:e,floating:t}});u=b??u,f=w??f,m={...m,[v]:{...m[v],...S}},C&&y<=50&&(y++,typeof C=="object"&&(C.placement&&(h=C.placement),C.rects&&(c=C.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:o}):C.rects),{x:u,y:f}=Ou(c,h,l)),g=-1)}return{x:u,y:f,placement:h,strategy:o,middlewareData:m}};async function lr(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:s,rects:i,elements:a,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:f="floating",altBoundary:h=!1,padding:m=0}=wt(t,e),y=ku(m),v=a[h?f==="floating"?"reference":"floating":f],x=uo(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(v)))==null||n?v:v.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),b=f==="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=uo(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:b,offsetParent:w,strategy:l}):b);return{top:(x.top-C.top+y.top)/S.y,bottom:(C.bottom-x.bottom+y.bottom)/S.y,left:(x.left-C.left+y.left)/S.x,right:(C.right-x.right+y.right)/S.x}}const AS=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:s,platform:i,elements:a,middlewareData:l}=t,{element:c,padding:u=0}=wt(e,t)||{};if(c==null)return{};const f=ku(u),h={x:n,y:r},m=fi(o),y=di(m),g=await i.getDimensions(c),v=m==="y",x=v?"top":"left",b=v?"bottom":"right",w=v?"clientHeight":"clientWidth",S=s.reference[y]+s.reference[m]-h[m]-s.floating[y],C=h[m]-s.reference[m],R=await(i.getOffsetParent==null?void 0:i.getOffsetParent(c));let A=R?R[w]:0;(!A||!await(i.isElement==null?void 0:i.isElement(R)))&&(A=a.floating[w]||s.floating[y]);const N=S/2-C/2,_=A/2-g[y]/2-1,k=Mt(f[x],_),O=Mt(f[b],_),L=k,G=A-g[y]-O,j=A/2-g[y]/2+N,X=ci(L,j,G),U=!l.arrow&&mn(o)!=null&&j!==X&&s.reference[y]/2-(j<L?k:O)-g[y]/2<0,z=U?j<L?j-L:j-G:0;return{[m]:h[m]+z,data:{[m]:X,centerOffset:j-X-z,...U&&{alignmentOffset:z}},reset:U}}}),NS=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:l,elements:c}=t,{mainAxis:u=!0,crossAxis:f=!0,fallbackPlacements:h,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:y="none",flipAlignment:g=!0,...v}=wt(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const x=St(o),b=at(a),w=St(a)===a,S=await(l.isRTL==null?void 0:l.isRTL(c.floating)),C=h||(w||!g?[co(a)]:wS(a)),R=y!=="none";!h&&R&&C.push(...TS(a,g,y,S));const A=[a,...C],N=await lr(t,v),_=[];let k=((r=s.flip)==null?void 0:r.overflows)||[];if(u&&_.push(N[x]),f){const j=bS(o,i,S);_.push(N[j[0]],N[j[1]])}if(k=[...k,{placement:o,overflows:_}],!_.every(j=>j<=0)){var O,L;const j=(((O=s.flip)==null?void 0:O.index)||0)+1,X=A[j];if(X&&(!(f==="alignment"?b!==at(X):!1)||k.every(V=>at(V.placement)===b?V.overflows[0]>0:!0)))return{data:{index:j,overflows:k},reset:{placement:X}};let U=(L=k.filter(z=>z.overflows[0]<=0).sort((z,V)=>z.overflows[1]-V.overflows[1])[0])==null?void 0:L.placement;if(!U)switch(m){case"bestFit":{var G;const z=(G=k.filter(V=>{if(R){const $=at(V.placement);return $===b||$==="y"}return!0}).map(V=>[V.placement,V.overflows.filter($=>$>0).reduce(($,oe)=>$+oe,0)]).sort((V,$)=>V[1]-$[1])[0])==null?void 0:G[0];z&&(U=z);break}case"initialPlacement":U=a;break}if(o!==U)return{reset:{placement:U}}}return{}}}};function Lu(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function Vu(e){return gS.some(t=>e[t]>=0)}const MS=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=wt(e,t);switch(r){case"referenceHidden":{const s=await lr(t,{...o,elementContext:"reference"}),i=Lu(s,n.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:Vu(i)}}}case"escaped":{const s=await lr(t,{...o,altBoundary:!0}),i=Lu(s,n.floating);return{data:{escapedOffsets:i,escaped:Vu(i)}}}default:return{}}}}},$u=new Set(["left","top"]);async function _S(e,t){const{placement:n,platform:r,elements:o}=e,s=await(r.isRTL==null?void 0:r.isRTL(o.floating)),i=St(n),a=mn(n),l=at(n)==="y",c=$u.has(i)?-1:1,u=s&&l?-1:1,f=wt(t,e);let{mainAxis:h,crossAxis:m,alignmentAxis:y}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return a&&typeof y=="number"&&(m=a==="end"?y*-1:y),l?{x:m*u,y:h*c}:{x:h*c,y:m*u}}const jS=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,l=await _S(t,e);return i===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:o+l.x,y:s+l.y,data:{...l,placement:i}}}}},IS=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:v=>{let{x,y:b}=v;return{x,y:b}}},...l}=wt(e,t),c={x:n,y:r},u=await lr(t,l),f=at(St(o)),h=ui(f);let m=c[h],y=c[f];if(s){const v=h==="y"?"top":"left",x=h==="y"?"bottom":"right",b=m+u[v],w=m-u[x];m=ci(b,m,w)}if(i){const v=f==="y"?"top":"left",x=f==="y"?"bottom":"right",b=y+u[v],w=y-u[x];y=ci(b,y,w)}const g=a.fn({...t,[h]:m,[f]:y});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[h]:s,[f]:i}}}}}},DS=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:l=!0,crossAxis:c=!0}=wt(e,t),u={x:n,y:r},f=at(o),h=ui(f);let m=u[h],y=u[f];const g=wt(a,t),v=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(l){const w=h==="y"?"height":"width",S=s.reference[h]-s.floating[w]+v.mainAxis,C=s.reference[h]+s.reference[w]-v.mainAxis;m<S?m=S:m>C&&(m=C)}if(c){var x,b;const w=h==="y"?"width":"height",S=$u.has(St(o)),C=s.reference[f]-s.floating[w]+(S&&((x=i.offset)==null?void 0:x[f])||0)+(S?0:v.crossAxis),R=s.reference[f]+s.reference[w]+(S?0:((b=i.offset)==null?void 0:b[f])||0)-(S?v.crossAxis:0);y<C?y=C:y>R&&(y=R)}return{[h]:m,[f]:y}}}},kS=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:l=()=>{},...c}=wt(e,t),u=await lr(t,c),f=St(o),h=mn(o),m=at(o)==="y",{width:y,height:g}=s.floating;let v,x;f==="top"||f==="bottom"?(v=f,x=h===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?"start":"end")?"left":"right"):(x=f,v=h==="end"?"top":"bottom");const b=g-u.top-u.bottom,w=y-u.left-u.right,S=Mt(g-u[v],b),C=Mt(y-u[x],w),R=!t.middlewareData.shift;let A=S,N=C;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(N=w),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(A=b),R&&!h){const k=ze(u.left,0),O=ze(u.right,0),L=ze(u.top,0),G=ze(u.bottom,0);m?N=y-2*(k!==0||O!==0?k+O:ze(u.left,u.right)):A=g-2*(L!==0||G!==0?L+G:ze(u.top,u.bottom))}await l({...t,availableWidth:N,availableHeight:A});const _=await i.getDimensions(a.floating);return y!==_.width||g!==_.height?{reset:{rects:!0}}:{}}}};function fo(){return typeof window<"u"}function gn(e){return Fu(e)?(e.nodeName||"").toLowerCase():"#document"}function He(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function lt(e){var t;return(t=(Fu(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function Fu(e){return fo()?e instanceof Node||e instanceof He(e).Node:!1}function Qe(e){return fo()?e instanceof Element||e instanceof He(e).Element:!1}function ct(e){return fo()?e instanceof HTMLElement||e instanceof He(e).HTMLElement:!1}function Bu(e){return!fo()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof He(e).ShadowRoot}const OS=new Set(["inline","contents"]);function cr(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=et(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!OS.has(o)}const LS=new Set(["table","td","th"]);function VS(e){return LS.has(gn(e))}const $S=[":popover-open",":modal"];function po(e){return $S.some(t=>{try{return e.matches(t)}catch{return!1}})}const FS=["transform","translate","scale","rotate","perspective"],BS=["transform","translate","scale","rotate","perspective","filter"],WS=["paint","layout","strict","content"];function hi(e){const t=mi(),n=Qe(e)?et(e):e;return FS.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)||BS.some(r=>(n.willChange||"").includes(r))||WS.some(r=>(n.contain||"").includes(r))}function zS(e){let t=_t(e);for(;ct(t)&&!vn(t);){if(hi(t))return t;if(po(t))return null;t=_t(t)}return null}function mi(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const HS=new Set(["html","body","#document"]);function vn(e){return HS.has(gn(e))}function et(e){return He(e).getComputedStyle(e)}function ho(e){return Qe(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function _t(e){if(gn(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Bu(e)&&e.host||lt(e);return Bu(t)?t.host:t}function Wu(e){const t=_t(e);return vn(t)?e.ownerDocument?e.ownerDocument.body:e.body:ct(t)&&cr(t)?t:Wu(t)}function ur(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=Wu(e),s=o===((r=e.ownerDocument)==null?void 0:r.body),i=He(o);if(s){const a=gi(i);return t.concat(i,i.visualViewport||[],cr(o)?o:[],a&&n?ur(a):[])}return t.concat(o,ur(o,[],n))}function gi(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function zu(e){const t=et(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=ct(e),s=o?e.offsetWidth:n,i=o?e.offsetHeight:r,a=ao(n)!==s||ao(r)!==i;return a&&(n=s,r=i),{width:n,height:r,$:a}}function vi(e){return Qe(e)?e:e.contextElement}function yn(e){const t=vi(e);if(!ct(t))return it(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:s}=zu(t);let i=(s?ao(n.width):n.width)/r,a=(s?ao(n.height):n.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!a||!Number.isFinite(a))&&(a=1),{x:i,y:a}}const US=it(0);function Hu(e){const t=He(e);return!mi()||!t.visualViewport?US:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function GS(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==He(e)?!1:t}function Gt(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),s=vi(e);let i=it(1);t&&(r?Qe(r)&&(i=yn(r)):i=yn(e));const a=GS(s,n,r)?Hu(s):it(0);let l=(o.left+a.x)/i.x,c=(o.top+a.y)/i.y,u=o.width/i.x,f=o.height/i.y;if(s){const h=He(s),m=r&&Qe(r)?He(r):r;let y=h,g=gi(y);for(;g&&r&&m!==y;){const v=yn(g),x=g.getBoundingClientRect(),b=et(g),w=x.left+(g.clientLeft+parseFloat(b.paddingLeft))*v.x,S=x.top+(g.clientTop+parseFloat(b.paddingTop))*v.y;l*=v.x,c*=v.y,u*=v.x,f*=v.y,l+=w,c+=S,y=He(g),g=gi(y)}}return uo({width:u,height:f,x:l,y:c})}function mo(e,t){const n=ho(e).scrollLeft;return t?t.left+n:Gt(lt(e)).left+n}function Uu(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-mo(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function KS(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const s=o==="fixed",i=lt(r),a=t?po(t.floating):!1;if(r===i||a&&s)return n;let l={scrollLeft:0,scrollTop:0},c=it(1);const u=it(0),f=ct(r);if((f||!f&&!s)&&((gn(r)!=="body"||cr(i))&&(l=ho(r)),ct(r))){const m=Gt(r);c=yn(r),u.x=m.x+r.clientLeft,u.y=m.y+r.clientTop}const h=i&&!f&&!s?Uu(i,l):it(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x+h.x,y:n.y*c.y-l.scrollTop*c.y+u.y+h.y}}function YS(e){return Array.from(e.getClientRects())}function XS(e){const t=lt(e),n=ho(e),r=e.ownerDocument.body,o=ze(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=ze(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+mo(e);const a=-n.scrollTop;return et(r).direction==="rtl"&&(i+=ze(t.clientWidth,r.clientWidth)-o),{width:o,height:s,x:i,y:a}}const Gu=25;function qS(e,t){const n=He(e),r=lt(e),o=n.visualViewport;let s=r.clientWidth,i=r.clientHeight,a=0,l=0;if(o){s=o.width,i=o.height;const u=mi();(!u||u&&t==="fixed")&&(a=o.offsetLeft,l=o.offsetTop)}const c=mo(r);if(c<=0){const u=r.ownerDocument,f=u.body,h=getComputedStyle(f),m=u.compatMode==="CSS1Compat"&&parseFloat(h.marginLeft)+parseFloat(h.marginRight)||0,y=Math.abs(r.clientWidth-f.clientWidth-m);y<=Gu&&(s-=y)}else c<=Gu&&(s+=c);return{width:s,height:i,x:a,y:l}}const ZS=new Set(["absolute","fixed"]);function JS(e,t){const n=Gt(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,s=ct(e)?yn(e):it(1),i=e.clientWidth*s.x,a=e.clientHeight*s.y,l=o*s.x,c=r*s.y;return{width:i,height:a,x:l,y:c}}function Ku(e,t,n){let r;if(t==="viewport")r=qS(e,n);else if(t==="document")r=XS(lt(e));else if(Qe(t))r=JS(t,n);else{const o=Hu(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return uo(r)}function Yu(e,t){const n=_t(e);return n===t||!Qe(n)||vn(n)?!1:et(n).position==="fixed"||Yu(n,t)}function QS(e,t){const n=t.get(e);if(n)return n;let r=ur(e,[],!1).filter(a=>Qe(a)&&gn(a)!=="body"),o=null;const s=et(e).position==="fixed";let i=s?_t(e):e;for(;Qe(i)&&!vn(i);){const a=et(i),l=hi(i);!l&&a.position==="fixed"&&(o=null),(s?!l&&!o:!l&&a.position==="static"&&!!o&&ZS.has(o.position)||cr(i)&&!l&&Yu(e,i))?r=r.filter(u=>u!==i):o=a,i=_t(i)}return t.set(e,r),r}function eC(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[...n==="clippingAncestors"?po(t)?[]:QS(t,this._c):[].concat(n),r],a=i[0],l=i.reduce((c,u)=>{const f=Ku(t,u,o);return c.top=ze(f.top,c.top),c.right=Mt(f.right,c.right),c.bottom=Mt(f.bottom,c.bottom),c.left=ze(f.left,c.left),c},Ku(t,a,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function tC(e){const{width:t,height:n}=zu(e);return{width:t,height:n}}function nC(e,t,n){const r=ct(t),o=lt(t),s=n==="fixed",i=Gt(e,!0,s,t);let a={scrollLeft:0,scrollTop:0};const l=it(0);function c(){l.x=mo(o)}if(r||!r&&!s)if((gn(t)!=="body"||cr(o))&&(a=ho(t)),r){const m=Gt(t,!0,s,t);l.x=m.x+t.clientLeft,l.y=m.y+t.clientTop}else o&&c();s&&!r&&o&&c();const u=o&&!r&&!s?Uu(o,a):it(0),f=i.left+a.scrollLeft-l.x-u.x,h=i.top+a.scrollTop-l.y-u.y;return{x:f,y:h,width:i.width,height:i.height}}function yi(e){return et(e).position==="static"}function Xu(e,t){if(!ct(e)||et(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return lt(e)===n&&(n=n.ownerDocument.body),n}function qu(e,t){const n=He(e);if(po(e))return n;if(!ct(e)){let o=_t(e);for(;o&&!vn(o);){if(Qe(o)&&!yi(o))return o;o=_t(o)}return n}let r=Xu(e,t);for(;r&&VS(r)&&yi(r);)r=Xu(r,t);return r&&vn(r)&&yi(r)&&!hi(r)?n:r||zS(e)||n}const rC=async function(e){const t=this.getOffsetParent||qu,n=this.getDimensions,r=await n(e.floating);return{reference:nC(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function oC(e){return et(e).direction==="rtl"}const sC={convertOffsetParentRelativeRectToViewportRelativeRect:KS,getDocumentElement:lt,getClippingRect:eC,getOffsetParent:qu,getElementRects:rC,getClientRects:YS,getDimensions:tC,getScale:yn,isElement:Qe,isRTL:oC};function Zu(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function iC(e,t){let n=null,r;const o=lt(e);function s(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function i(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),s();const c=e.getBoundingClientRect(),{left:u,top:f,width:h,height:m}=c;if(a||t(),!h||!m)return;const y=lo(f),g=lo(o.clientWidth-(u+h)),v=lo(o.clientHeight-(f+m)),x=lo(u),w={rootMargin:-y+"px "+-g+"px "+-v+"px "+-x+"px",threshold:ze(0,Mt(1,l))||1};let S=!0;function C(R){const A=R[0].intersectionRatio;if(A!==l){if(!S)return i();A?i(!1,A):r=setTimeout(()=>{i(!1,1e-7)},1e3)}A===1&&!Zu(c,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 aC(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:l=!1}=r,c=vi(e),u=o||s?[...c?ur(c):[],...ur(t)]:[];u.forEach(x=>{o&&x.addEventListener("scroll",n,{passive:!0}),s&&x.addEventListener("resize",n)});const f=c&&a?iC(c,n):null;let h=-1,m=null;i&&(m=new ResizeObserver(x=>{let[b]=x;b&&b.target===c&&m&&(m.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var w;(w=m)==null||w.observe(t)})),n()}),c&&!l&&m.observe(c),m.observe(t));let y,g=l?Gt(e):null;l&&v();function v(){const x=Gt(e);g&&!Zu(g,x)&&n(),g=x,y=requestAnimationFrame(v)}return n(),()=>{var x;u.forEach(b=>{o&&b.removeEventListener("scroll",n),s&&b.removeEventListener("resize",n)}),f==null||f(),(x=m)==null||x.disconnect(),m=null,l&&cancelAnimationFrame(y)}}const lC=jS,cC=IS,uC=NS,dC=kS,fC=MS,Ju=AS,pC=DS,hC=(e,t,n)=>{const r=new Map,o={platform:sC,...n},s={...o.platform,_c:r};return RS(e,t,{...o,platform:s})};var mC=typeof document<"u",gC=function(){},go=mC?T.useLayoutEffect:gC;function vo(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(!vo(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)&&!vo(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function Qu(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function ed(e,t){const n=Qu(e);return Math.round(t*n)/n}function xi(e){const t=d.useRef(e);return go(()=>{t.current=e}),t}function vC(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:l,open:c}=e,[u,f]=d.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,m]=d.useState(r);vo(h,r)||m(r);const[y,g]=d.useState(null),[v,x]=d.useState(null),b=d.useCallback(V=>{V!==R.current&&(R.current=V,g(V))},[]),w=d.useCallback(V=>{V!==A.current&&(A.current=V,x(V))},[]),S=s||y,C=i||v,R=d.useRef(null),A=d.useRef(null),N=d.useRef(u),_=l!=null,k=xi(l),O=xi(o),L=xi(c),G=d.useCallback(()=>{if(!R.current||!A.current)return;const V={placement:t,strategy:n,middleware:h};O.current&&(V.platform=O.current),hC(R.current,A.current,V).then($=>{const oe={...$,isPositioned:L.current!==!1};j.current&&!vo(N.current,oe)&&(N.current=oe,Zn.flushSync(()=>{f(oe)}))})},[h,t,n,O,L]);go(()=>{c===!1&&N.current.isPositioned&&(N.current.isPositioned=!1,f(V=>({...V,isPositioned:!1})))},[c]);const j=d.useRef(!1);go(()=>(j.current=!0,()=>{j.current=!1}),[]),go(()=>{if(S&&(R.current=S),C&&(A.current=C),S&&C){if(k.current)return k.current(S,C,G);G()}},[S,C,G,k,_]);const X=d.useMemo(()=>({reference:R,floating:A,setReference:b,setFloating:w}),[b,w]),U=d.useMemo(()=>({reference:S,floating:C}),[S,C]),z=d.useMemo(()=>{const V={position:n,left:0,top:0};if(!U.floating)return V;const $=ed(U.floating,u.x),oe=ed(U.floating,u.y);return a?{...V,transform:"translate("+$+"px, "+oe+"px)",...Qu(U.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:$,top:oe}},[n,a,U.floating,u.x,u.y]);return d.useMemo(()=>({...u,update:G,refs:X,elements:U,floatingStyles:z}),[u,G,X,U,z])}const yC=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?Ju({element:r.current,padding:o}).fn(n):{}:r?Ju({element:r,padding:o}).fn(n):{}}}},xC=(e,t)=>({...lC(e),options:[e,t]}),bC=(e,t)=>({...cC(e),options:[e,t]}),wC=(e,t)=>({...pC(e),options:[e,t]}),SC=(e,t)=>({...uC(e),options:[e,t]}),CC=(e,t)=>({...dC(e),options:[e,t]}),EC=(e,t)=>({...fC(e),options:[e,t]}),TC=(e,t)=>({...yC(e),options:[e,t]});var PC="Arrow",td=d.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...s}=e;return p.jsx(H.svg,{...s,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:p.jsx("polygon",{points:"0,0 30,0 15,10"})})});td.displayName=PC;var RC=td,bi="Popper",[nd,ut]=Re(bi),[AC,rd]=nd(bi),od=e=>{const{__scopePopper:t,children:n}=e,[r,o]=d.useState(null);return p.jsx(AC,{scope:t,anchor:r,onAnchorChange:o,children:n})};od.displayName=bi;var sd="PopperAnchor",id=d.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,s=rd(sd,n),i=d.useRef(null),a=re(t,i),l=d.useRef(null);return d.useEffect(()=>{const c=l.current;l.current=(r==null?void 0:r.current)||i.current,c!==l.current&&s.onAnchorChange(l.current)}),r?null:p.jsx(H.div,{...o,ref:a})});id.displayName=sd;var wi="PopperContent",[NC,MC]=nd(wi),ad=d.forwardRef((e,t)=>{var W,Q,ee,ne,he,B;const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:s="center",alignOffset:i=0,arrowPadding:a=0,avoidCollisions:l=!0,collisionBoundary:c=[],collisionPadding:u=0,sticky:f="partial",hideWhenDetached:h=!1,updatePositionStrategy:m="optimized",onPlaced:y,...g}=e,v=rd(wi,n),[x,b]=d.useState(null),w=re(t,Z=>b(Z)),[S,C]=d.useState(null),R=or(S),A=(R==null?void 0:R.width)??0,N=(R==null?void 0:R.height)??0,_=r+(s!=="center"?"-"+s:""),k=typeof u=="number"?u:{top:0,right:0,bottom:0,left:0,...u},O=Array.isArray(c)?c:[c],L=O.length>0,G={padding:k,boundary:O.filter(jC),altBoundary:L},{refs:j,floatingStyles:X,placement:U,isPositioned:z,middlewareData:V}=vC({strategy:"fixed",placement:_,whileElementsMounted:(...Z)=>aC(...Z,{animationFrame:m==="always"}),elements:{reference:v.anchor},middleware:[xC({mainAxis:o+N,alignmentAxis:i}),l&&bC({mainAxis:!0,crossAxis:!1,limiter:f==="partial"?wC():void 0,...G}),l&&SC({...G}),CC({...G,apply:({elements:Z,rects:de,availableWidth:je,availableHeight:Me})=>{const{width:Oe,height:Ze}=de.reference,Le=Z.floating.style;Le.setProperty("--radix-popper-available-width",`${je}px`),Le.setProperty("--radix-popper-available-height",`${Me}px`),Le.setProperty("--radix-popper-anchor-width",`${Oe}px`),Le.setProperty("--radix-popper-anchor-height",`${Ze}px`)}}),S&&TC({element:S,padding:a}),IC({arrowWidth:A,arrowHeight:N}),h&&EC({strategy:"referenceHidden",...G})]}),[$,oe]=ud(U),ie=xe(y);we(()=>{z&&(ie==null||ie())},[z,ie]);const I=(W=V.arrow)==null?void 0:W.x,Y=(Q=V.arrow)==null?void 0:Q.y,J=((ee=V.arrow)==null?void 0:ee.centerOffset)!==0,[K,te]=d.useState();return we(()=>{x&&te(window.getComputedStyle(x).zIndex)},[x]),p.jsx("div",{ref:j.setFloating,"data-radix-popper-content-wrapper":"",style:{...X,transform:z?X.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:K,"--radix-popper-transform-origin":[(ne=V.transformOrigin)==null?void 0:ne.x,(he=V.transformOrigin)==null?void 0:he.y].join(" "),...((B=V.hide)==null?void 0:B.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:p.jsx(NC,{scope:n,placedSide:$,onArrowChange:C,arrowX:I,arrowY:Y,shouldHideArrow:J,children:p.jsx(H.div,{"data-side":$,"data-align":oe,...g,ref:w,style:{...g.style,animation:z?void 0:"none"}})})})});ad.displayName=wi;var ld="PopperArrow",_C={top:"bottom",right:"left",bottom:"top",left:"right"},cd=d.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,s=MC(ld,r),i=_C[s.placedSide];return p.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:p.jsx(RC,{...o,ref:n,style:{...o.style,display:"block"}})})});cd.displayName=ld;function jC(e){return e!==null}var IC=e=>({name:"transformOrigin",options:e,fn(t){var v,x,b;const{placement:n,rects:r,middlewareData:o}=t,i=((v=o.arrow)==null?void 0:v.centerOffset)!==0,a=i?0:e.arrowWidth,l=i?0:e.arrowHeight,[c,u]=ud(n),f={start:"0%",center:"50%",end:"100%"}[u],h=(((x=o.arrow)==null?void 0:x.x)??0)+a/2,m=(((b=o.arrow)==null?void 0:b.y)??0)+l/2;let y="",g="";return c==="bottom"?(y=i?f:`${h}px`,g=`${-l}px`):c==="top"?(y=i?f:`${h}px`,g=`${r.floating.height+l}px`):c==="right"?(y=`${-l}px`,g=i?f:`${m}px`):c==="left"&&(y=`${r.floating.width+l}px`,g=i?f:`${m}px`),{data:{x:y,y:g}}}});function ud(e){const[t,n="center"]=e.split("-");return[t,n]}var xn=od,bn=id,dr=ad,fr=cd,DC="Portal",wn=d.forwardRef((e,t)=>{var a;const{container:n,...r}=e,[o,s]=d.useState(!1);we(()=>s(!0),[]);const i=n||o&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return i?fc.createPortal(p.jsx(H.div,{...r,ref:t}),i):null});wn.displayName=DC;function kC(e){const t=OC(e),n=d.forwardRef((r,o)=>{const{children:s,...i}=r,a=d.Children.toArray(s),l=a.find(VC);if(l){const c=l.props.children,u=a.map(f=>f===l?d.Children.count(c)>1?d.Children.only(null):d.isValidElement(c)?c.props.children:null:f);return p.jsx(t,{...i,ref:o,children:d.isValidElement(c)?d.cloneElement(c,void 0,u):null})}return p.jsx(t,{...i,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}function OC(e){const t=d.forwardRef((n,r)=>{const{children:o,...s}=n;if(d.isValidElement(o)){const i=FC(o),a=$C(s,o.props);return o.type!==d.Fragment&&(a.ref=r?Ve(r,i):i),d.cloneElement(o,a)}return d.Children.count(o)>1?d.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var LC=Symbol("radix.slottable");function VC(e){return d.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===LC}function $C(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 l=s(...a);return o(...a),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function FC(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 dd=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"}),BC="VisuallyHidden",yo=d.forwardRef((e,t)=>p.jsx(H.span,{...e,ref:t,style:{...dd,...e.style}}));yo.displayName=BC;var WC=yo,zC=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},Sn=new WeakMap,xo=new WeakMap,bo={},Si=0,fd=function(e){return e&&(e.host||fd(e.parentNode))},HC=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=fd(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})},UC=function(e,t,n,r){var o=HC(t,Array.isArray(e)?e:[e]);bo[n]||(bo[n]=new WeakMap);var s=bo[n],i=[],a=new Set,l=new Set(o),c=function(f){!f||a.has(f)||(a.add(f),c(f.parentNode))};o.forEach(c);var u=function(f){!f||l.has(f)||Array.prototype.forEach.call(f.children,function(h){if(a.has(h))u(h);else try{var m=h.getAttribute(r),y=m!==null&&m!=="false",g=(Sn.get(h)||0)+1,v=(s.get(h)||0)+1;Sn.set(h,g),s.set(h,v),i.push(h),g===1&&y&&xo.set(h,!0),v===1&&h.setAttribute(n,"true"),y||h.setAttribute(r,"true")}catch(x){console.error("aria-hidden: cannot operate on ",h,x)}})};return u(t),a.clear(),Si++,function(){i.forEach(function(f){var h=Sn.get(f)-1,m=s.get(f)-1;Sn.set(f,h),s.set(f,m),h||(xo.has(f)||f.removeAttribute(r),xo.delete(f)),m||f.removeAttribute(n)}),Si--,Si||(Sn=new WeakMap,Sn=new WeakMap,xo=new WeakMap,bo={})}},wo=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=zC(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),UC(r,o,n,"aria-hidden")):function(){return null}},dt=function(){return dt=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},dt.apply(this,arguments)};function pd(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 GC(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 So="right-scroll-bar-position",Co="width-before-scroll-bar",KC="with-scroll-bars-hidden",YC="--removed-body-scroll-bar-size";function Ci(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function XC(e,t){var n=T.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 qC=typeof window<"u"?d.useLayoutEffect:d.useEffect,hd=new WeakMap;function ZC(e,t){var n=XC(null,function(r){return e.forEach(function(o){return Ci(o,r)})});return qC(function(){var r=hd.get(n);if(r){var o=new Set(r),s=new Set(e),i=n.current;o.forEach(function(a){s.has(a)||Ci(a,null)}),s.forEach(function(a){o.has(a)||Ci(a,i)})}hd.set(n,e)},[e]),n}function JC(e){return e}function QC(e,t){t===void 0&&(t=JC);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 l=function(){var u=i;i=[],u.forEach(s)},c=function(){return Promise.resolve().then(l)};c(),n={push:function(u){i.push(u),c()},filter:function(u){return i=i.filter(u),n}}}};return o}function eE(e){e===void 0&&(e={});var t=QC(null);return t.options=dt({async:!0,ssr:!1},e),t}var md=function(e){var t=e.sideCar,n=pd(e,["sideCar"]);if(!t)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var r=t.read();if(!r)throw new Error("Sidecar medium not found");return d.createElement(r,dt({},n))};md.isSideCarExport=!0;function tE(e,t){return e.useMedium(t),md}var gd=eE(),Ei=function(){},Eo=d.forwardRef(function(e,t){var n=d.useRef(null),r=d.useState({onScrollCapture:Ei,onWheelCapture:Ei,onTouchMoveCapture:Ei}),o=r[0],s=r[1],i=e.forwardProps,a=e.children,l=e.className,c=e.removeScrollBar,u=e.enabled,f=e.shards,h=e.sideCar,m=e.noRelative,y=e.noIsolation,g=e.inert,v=e.allowPinchZoom,x=e.as,b=x===void 0?"div":x,w=e.gapMode,S=pd(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),C=h,R=ZC([n,t]),A=dt(dt({},S),o);return d.createElement(d.Fragment,null,u&&d.createElement(C,{sideCar:gd,removeScrollBar:c,shards:f,noRelative:m,noIsolation:y,inert:g,setCallbacks:s,allowPinchZoom:!!v,lockRef:n,gapMode:w}),i?d.cloneElement(d.Children.only(a),dt(dt({},A),{ref:R})):d.createElement(b,dt({},A,{className:l,ref:R}),a))});Eo.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},Eo.classNames={fullWidth:Co,zeroRight:So};var nE=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function rE(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=nE();return t&&e.setAttribute("nonce",t),e}function oE(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function sE(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var iE=function(){var e=0,t=null;return{add:function(n){e==0&&(t=rE())&&(oE(t,n),sE(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},aE=function(){var e=iE();return function(t,n){d.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},vd=function(){var e=aE(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},lE={left:0,top:0,right:0,gap:0},Ti=function(e){return parseInt(e||"",10)||0},cE=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[Ti(n),Ti(r),Ti(o)]},uE=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return lE;var t=cE(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])}},dE=vd(),Cn="data-scroll-locked",fE=function(e,t,n,r){var o=e.left,s=e.top,i=e.right,a=e.gap;return n===void 0&&(n="margin"),`
91
- .`.concat(KC,` {
61
+ */const Ps=pt("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),bc=u.forwardRef(({className:e,...t},n)=>p.jsx(Ss,{ref:n,className:M("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:p.jsx(dc,{className:M("flex items-center justify-center text-current"),children:p.jsx(Cs,{className:"h-4 w-4"})})}));bc.displayName=Ss.displayName;function wc(e){const t=zw(e),n=u.forwardRef((r,o)=>{const{children:s,...i}=r,a=u.Children.toArray(s),l=a.find(Hw);if(l){const c=l.props.children,d=a.map(f=>f===l?u.Children.count(c)>1?u.Children.only(null):u.isValidElement(c)?c.props.children:null:f);return p.jsx(t,{...i,ref:o,children:u.isValidElement(c)?u.cloneElement(c,void 0,d):null})}return p.jsx(t,{...i,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}function zw(e){const t=u.forwardRef((n,r)=>{const{children:o,...s}=n;if(u.isValidElement(o)){const i=Uw(o),a=jw(s,o.props);return o.type!==u.Fragment&&(a.ref=r?Ce(r,i):i),u.cloneElement(o,a)}return u.Children.count(o)>1?u.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var Ww=Symbol("radix.slottable");function Hw(e){return u.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===Ww}function jw(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 l=s(...a);return o(...a),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function Uw(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}function Yt(e){const t=e+"CollectionProvider",[n,r]=ye(t),[o,s]=n(t,{collectionRef:{current:null},itemMap:new Map}),i=g=>{const{scope:v,children:b}=g,w=P.useRef(null),x=P.useRef(new Map).current;return p.jsx(o,{scope:v,itemMap:x,collectionRef:w,children:b})};i.displayName=t;const a=e+"CollectionSlot",l=wc(a),c=P.forwardRef((g,v)=>{const{scope:b,children:w}=g,x=s(a,b),S=J(v,x.collectionRef);return p.jsx(l,{ref:S,children:w})});c.displayName=a;const d=e+"CollectionItemSlot",f="data-radix-collection-item",h=wc(d),m=P.forwardRef((g,v)=>{const{scope:b,children:w,...x}=g,S=P.useRef(null),C=J(v,S),T=s(d,b);return P.useEffect(()=>(T.itemMap.set(S,{ref:S,...x}),()=>void T.itemMap.delete(S))),p.jsx(h,{[f]:"",ref:C,children:w})});m.displayName=d;function y(g){const v=s(e+"CollectionConsumer",g);return P.useCallback(()=>{const w=v.collectionRef.current;if(!w)return[];const x=Array.from(w.querySelectorAll(`[${f}]`));return Array.from(v.itemMap.values()).sort((T,A)=>x.indexOf(T.ref.current)-x.indexOf(A.ref.current))},[v.collectionRef,v.itemMap])}return[{Provider:i,Slot:c,ItemSlot:m},y,r]}var Gw=u[" useId ".trim().toString()]||(()=>{}),Kw=0;function he(e){const[t,n]=u.useState(Gw());return pe(()=>{n(r=>r??String(Kw++))},[e]),t?`radix-${t}`:""}function de(e){const t=u.useRef(e);return u.useEffect(()=>{t.current=e}),u.useMemo(()=>(...n)=>{var r;return(r=t.current)==null?void 0:r.call(t,...n)},[])}var Yw=u.createContext(void 0);function ht(e){const t=u.useContext(Yw);return e||t||"ltr"}var Ts="rovingFocusGroup.onEntryFocus",Xw={bubbles:!1,cancelable:!0},_n="RovingFocusGroup",[As,xc,qw]=Yt(_n),[Zw,Xt]=ye(_n,[qw]),[Jw,Qw]=Zw(_n),Sc=u.forwardRef((e,t)=>p.jsx(As.Provider,{scope:e.__scopeRovingFocusGroup,children:p.jsx(As.Slot,{scope:e.__scopeRovingFocusGroup,children:p.jsx(ex,{...e,ref:t})})}));Sc.displayName=_n;var ex=u.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:s,currentTabStopId:i,defaultCurrentTabStopId:a,onCurrentTabStopIdChange:l,onEntryFocus:c,preventScrollOnEntryFocus:d=!1,...f}=e,h=u.useRef(null),m=J(t,h),y=ht(s),[g,v]=we({prop:i,defaultProp:a??null,onChange:l,caller:_n}),[b,w]=u.useState(!1),x=de(c),S=xc(n),C=u.useRef(!1),[T,A]=u.useState(0);return u.useEffect(()=>{const N=h.current;if(N)return N.addEventListener(Ts,x),()=>N.removeEventListener(Ts,x)},[x]),p.jsx(Jw,{scope:n,orientation:r,dir:y,loop:o,currentTabStopId:g,onItemFocus:u.useCallback(N=>v(N),[v]),onItemShiftTab:u.useCallback(()=>w(!0),[]),onFocusableItemAdd:u.useCallback(()=>A(N=>N+1),[]),onFocusableItemRemove:u.useCallback(()=>A(N=>N-1),[]),children:p.jsx(W.div,{tabIndex:b||T===0?-1:0,"data-orientation":r,...f,ref:m,style:{outline:"none",...e.style},onMouseDown:k(e.onMouseDown,()=>{C.current=!0}),onFocus:k(e.onFocus,N=>{const I=!C.current;if(N.target===N.currentTarget&&I&&!b){const O=new CustomEvent(Ts,Xw);if(N.currentTarget.dispatchEvent(O),!O.defaultPrevented){const L=S().filter(H=>H.focusable),V=L.find(H=>H.active),U=L.find(H=>H.id===g),K=[V,U,...L].filter(Boolean).map(H=>H.ref.current);Pc(K,d)}}C.current=!1}),onBlur:k(e.onBlur,()=>w(!1))})})}),Cc="RovingFocusGroupItem",Ec=u.forwardRef((e,t)=>{const{__scopeRovingFocusGroup:n,focusable:r=!0,active:o=!1,tabStopId:s,children:i,...a}=e,l=he(),c=s||l,d=Qw(Cc,n),f=d.currentTabStopId===c,h=xc(n),{onFocusableItemAdd:m,onFocusableItemRemove:y,currentTabStopId:g}=d;return u.useEffect(()=>{if(r)return m(),()=>y()},[r,m,y]),p.jsx(As.ItemSlot,{scope:n,id:c,focusable:r,active:o,children:p.jsx(W.span,{tabIndex:f?0:-1,"data-orientation":d.orientation,...a,ref:t,onMouseDown:k(e.onMouseDown,v=>{r?d.onItemFocus(c):v.preventDefault()}),onFocus:k(e.onFocus,()=>d.onItemFocus(c)),onKeyDown:k(e.onKeyDown,v=>{if(v.key==="Tab"&&v.shiftKey){d.onItemShiftTab();return}if(v.target!==v.currentTarget)return;const b=rx(v,d.orientation,d.dir);if(b!==void 0){if(v.metaKey||v.ctrlKey||v.altKey||v.shiftKey)return;v.preventDefault();let x=h().filter(S=>S.focusable).map(S=>S.ref.current);if(b==="last")x.reverse();else if(b==="prev"||b==="next"){b==="prev"&&x.reverse();const S=x.indexOf(v.currentTarget);x=d.loop?ox(x,S+1):x.slice(S+1)}setTimeout(()=>Pc(x))}}),children:typeof i=="function"?i({isCurrentTabStop:f,hasTabStop:g!=null}):i})})});Ec.displayName=Cc;var tx={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function nx(e,t){return t!=="rtl"?e:e==="ArrowLeft"?"ArrowRight":e==="ArrowRight"?"ArrowLeft":e}function rx(e,t,n){const r=nx(e.key,n);if(!(t==="vertical"&&["ArrowLeft","ArrowRight"].includes(r))&&!(t==="horizontal"&&["ArrowUp","ArrowDown"].includes(r)))return tx[r]}function Pc(e,t=!1){const n=document.activeElement;for(const r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function ox(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var Ns=Sc,Ms=Ec,Is="Radio",[sx,Tc]=ye(Is),[ix,ax]=sx(Is),Ac=u.forwardRef((e,t)=>{const{__scopeRadio:n,name:r,checked:o=!1,required:s,disabled:i,value:a="on",onCheck:l,form:c,...d}=e,[f,h]=u.useState(null),m=J(t,v=>h(v)),y=u.useRef(!1),g=f?c||!!f.closest("form"):!0;return p.jsxs(ix,{scope:n,checked:o,disabled:i,children:[p.jsx(W.button,{type:"button",role:"radio","aria-checked":o,"data-state":Dc(o),"data-disabled":i?"":void 0,disabled:i,value:a,...d,ref:m,onClick:k(e.onClick,v=>{o||l==null||l(),g&&(y.current=v.isPropagationStopped(),y.current||v.stopPropagation())})}),g&&p.jsx(Ic,{control:f,bubbles:!y.current,name:r,value:a,checked:o,required:s,disabled:i,form:c,style:{transform:"translateX(-100%)"}})]})});Ac.displayName=Is;var Nc="RadioIndicator",Mc=u.forwardRef((e,t)=>{const{__scopeRadio:n,forceMount:r,...o}=e,s=ax(Nc,n);return p.jsx(ve,{present:r||s.checked,children:p.jsx(W.span,{"data-state":Dc(s.checked),"data-disabled":s.disabled?"":void 0,...o,ref:t})})});Mc.displayName=Nc;var lx="RadioBubbleInput",Ic=u.forwardRef(({__scopeRadio:e,control:t,checked:n,bubbles:r=!0,...o},s)=>{const i=u.useRef(null),a=J(i,s),l=In(n),c=Dn(t);return u.useEffect(()=>{const d=i.current;if(!d)return;const f=window.HTMLInputElement.prototype,m=Object.getOwnPropertyDescriptor(f,"checked").set;if(l!==n&&m){const y=new Event("click",{bubbles:r});m.call(d,n),d.dispatchEvent(y)}},[l,n,r]),p.jsx(W.input,{type:"radio","aria-hidden":!0,defaultChecked:n,...o,tabIndex:-1,ref:a,style:{...o.style,...c,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});Ic.displayName=lx;function Dc(e){return e?"checked":"unchecked"}var cx=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],Dr="RadioGroup",[ux]=ye(Dr,[Xt,Tc]),_c=Xt(),kc=Tc(),[dx,fx]=ux(Dr),Oc=u.forwardRef((e,t)=>{const{__scopeRadioGroup:n,name:r,defaultValue:o,value:s,required:i=!1,disabled:a=!1,orientation:l,dir:c,loop:d=!0,onValueChange:f,...h}=e,m=_c(n),y=ht(c),[g,v]=we({prop:s,defaultProp:o??null,onChange:f,caller:Dr});return p.jsx(dx,{scope:n,name:r,required:i,disabled:a,value:g,onValueChange:v,children:p.jsx(Ns,{asChild:!0,...m,orientation:l,dir:y,loop:d,children:p.jsx(W.div,{role:"radiogroup","aria-required":i,"aria-orientation":l,"data-disabled":a?"":void 0,dir:y,...h,ref:t})})})});Oc.displayName=Dr;var Lc="RadioGroupItem",Vc=u.forwardRef((e,t)=>{const{__scopeRadioGroup:n,disabled:r,...o}=e,s=fx(Lc,n),i=s.disabled||r,a=_c(n),l=kc(n),c=u.useRef(null),d=J(t,c),f=s.value===o.value,h=u.useRef(!1);return u.useEffect(()=>{const m=g=>{cx.includes(g.key)&&(h.current=!0)},y=()=>h.current=!1;return document.addEventListener("keydown",m),document.addEventListener("keyup",y),()=>{document.removeEventListener("keydown",m),document.removeEventListener("keyup",y)}},[]),p.jsx(Ms,{asChild:!0,...a,focusable:!i,active:f,children:p.jsx(Ac,{disabled:i,required:s.required,checked:f,...l,...o,name:s.name,ref:d,onCheck:()=>s.onValueChange(o.value),onKeyDown:k(m=>{m.key==="Enter"&&m.preventDefault()}),onFocus:k(o.onFocus,()=>{var m;h.current&&((m=c.current)==null||m.click())})})})});Vc.displayName=Lc;var px="RadioGroupIndicator",$c=u.forwardRef((e,t)=>{const{__scopeRadioGroup:n,...r}=e,o=kc(n);return p.jsx(Mc,{...o,...r,ref:t})});$c.displayName=px;var Fc=Oc,Rc=Vc,hx=$c;const Bc=u.forwardRef(({className:e,...t},n)=>p.jsx(Fc,{className:M("grid gap-2",e),...t,ref:n}));Bc.displayName=Fc.displayName;const zc=u.forwardRef(({className:e,...t},n)=>p.jsx(Rc,{ref:n,className:M("aspect-square h-4 w-4 rounded-full border border-primary text-primary ring-offset-background focus:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50",e),...t,children:p.jsx(hx,{className:"flex items-center justify-center",children:p.jsx(vc,{className:"h-2.5 w-2.5 fill-current text-current"})})}));zc.displayName=Rc.displayName;var _r="Switch",[mx]=ye(_r),[gx,vx]=mx(_r),Wc=u.forwardRef((e,t)=>{const{__scopeSwitch:n,name:r,checked:o,defaultChecked:s,required:i,disabled:a,value:l="on",onCheckedChange:c,form:d,...f}=e,[h,m]=u.useState(null),y=J(t,x=>m(x)),g=u.useRef(!1),v=h?d||!!h.closest("form"):!0,[b,w]=we({prop:o,defaultProp:s??!1,onChange:c,caller:_r});return p.jsxs(gx,{scope:n,checked:b,disabled:a,children:[p.jsx(W.button,{type:"button",role:"switch","aria-checked":b,"aria-required":i,"data-state":Gc(b),"data-disabled":a?"":void 0,disabled:a,value:l,...f,ref:y,onClick:k(e.onClick,x=>{w(S=>!S),v&&(g.current=x.isPropagationStopped(),g.current||x.stopPropagation())})}),v&&p.jsx(Uc,{control:h,bubbles:!g.current,name:r,value:l,checked:b,required:i,disabled:a,form:d,style:{transform:"translateX(-100%)"}})]})});Wc.displayName=_r;var Hc="SwitchThumb",jc=u.forwardRef((e,t)=>{const{__scopeSwitch:n,...r}=e,o=vx(Hc,n);return p.jsx(W.span,{"data-state":Gc(o.checked),"data-disabled":o.disabled?"":void 0,...r,ref:t})});jc.displayName=Hc;var yx="SwitchBubbleInput",Uc=u.forwardRef(({__scopeSwitch:e,control:t,checked:n,bubbles:r=!0,...o},s)=>{const i=u.useRef(null),a=J(i,s),l=In(n),c=Dn(t);return u.useEffect(()=>{const d=i.current;if(!d)return;const f=window.HTMLInputElement.prototype,m=Object.getOwnPropertyDescriptor(f,"checked").set;if(l!==n&&m){const y=new Event("click",{bubbles:r});m.call(d,n),d.dispatchEvent(y)}},[l,n,r]),p.jsx("input",{type:"checkbox","aria-hidden":!0,defaultChecked:n,...o,tabIndex:-1,ref:a,style:{...o.style,...c,position:"absolute",pointerEvents:"none",opacity:0,margin:0}})});Uc.displayName=yx;function Gc(e){return e?"checked":"unchecked"}var Kc=Wc,bx=jc;const Yc=u.forwardRef(({className:e,...t},n)=>p.jsx(Kc,{className:M("peer inline-flex h-6 w-11 shrink-0 cursor-pointer items-center rounded-full border-2 border-transparent transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background disabled:cursor-not-allowed disabled:opacity-50 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input",e),...t,ref:n,children:p.jsx(bx,{className:M("pointer-events-none block h-5 w-5 rounded-full bg-background shadow-lg ring-0 transition-transform data-[state=checked]:translate-x-5 data-[state=unchecked]:translate-x-0")})}));Yc.displayName=Kc.displayName;function kn(e,[t,n]){return Math.min(n,Math.max(t,e))}function wx(e,t=globalThis==null?void 0:globalThis.document){const n=de(e);u.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 xx="DismissableLayer",Ds="dismissableLayer.update",Sx="dismissableLayer.pointerDownOutside",Cx="dismissableLayer.focusOutside",Xc,qc=u.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),mt=u.forwardRef((e,t)=>{const{disableOutsidePointerEvents:n=!1,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:i,onDismiss:a,...l}=e,c=u.useContext(qc),[d,f]=u.useState(null),h=(d==null?void 0:d.ownerDocument)??(globalThis==null?void 0:globalThis.document),[,m]=u.useState({}),y=J(t,A=>f(A)),g=Array.from(c.layers),[v]=[...c.layersWithOutsidePointerEventsDisabled].slice(-1),b=g.indexOf(v),w=d?g.indexOf(d):-1,x=c.layersWithOutsidePointerEventsDisabled.size>0,S=w>=b,C=Px(A=>{const N=A.target,I=[...c.branches].some(O=>O.contains(N));!S||I||(o==null||o(A),i==null||i(A),A.defaultPrevented||a==null||a())},h),T=Tx(A=>{const N=A.target;[...c.branches].some(O=>O.contains(N))||(s==null||s(A),i==null||i(A),A.defaultPrevented||a==null||a())},h);return wx(A=>{w===c.layers.size-1&&(r==null||r(A),!A.defaultPrevented&&a&&(A.preventDefault(),a()))},h),u.useEffect(()=>{if(d)return n&&(c.layersWithOutsidePointerEventsDisabled.size===0&&(Xc=h.body.style.pointerEvents,h.body.style.pointerEvents="none"),c.layersWithOutsidePointerEventsDisabled.add(d)),c.layers.add(d),Jc(),()=>{n&&c.layersWithOutsidePointerEventsDisabled.size===1&&(h.body.style.pointerEvents=Xc)}},[d,h,n,c]),u.useEffect(()=>()=>{d&&(c.layers.delete(d),c.layersWithOutsidePointerEventsDisabled.delete(d),Jc())},[d,c]),u.useEffect(()=>{const A=()=>m({});return document.addEventListener(Ds,A),()=>document.removeEventListener(Ds,A)},[]),p.jsx(W.div,{...l,ref:y,style:{pointerEvents:x?S?"auto":"none":void 0,...e.style},onFocusCapture:k(e.onFocusCapture,T.onFocusCapture),onBlurCapture:k(e.onBlurCapture,T.onBlurCapture),onPointerDownCapture:k(e.onPointerDownCapture,C.onPointerDownCapture)})});mt.displayName=xx;var Ex="DismissableLayerBranch",Zc=u.forwardRef((e,t)=>{const n=u.useContext(qc),r=u.useRef(null),o=J(t,r);return u.useEffect(()=>{const s=r.current;if(s)return n.branches.add(s),()=>{n.branches.delete(s)}},[n.branches]),p.jsx(W.div,{...e,ref:o})});Zc.displayName=Ex;function Px(e,t=globalThis==null?void 0:globalThis.document){const n=de(e),r=u.useRef(!1),o=u.useRef(()=>{});return u.useEffect(()=>{const s=a=>{if(a.target&&!r.current){let l=function(){Qc(Sx,n,c,{discrete:!0})};const c={originalEvent:a};a.pointerType==="touch"?(t.removeEventListener("click",o.current),o.current=l,t.addEventListener("click",o.current,{once:!0})):l()}else t.removeEventListener("click",o.current);r.current=!1},i=window.setTimeout(()=>{t.addEventListener("pointerdown",s)},0);return()=>{window.clearTimeout(i),t.removeEventListener("pointerdown",s),t.removeEventListener("click",o.current)}},[t,n]),{onPointerDownCapture:()=>r.current=!0}}function Tx(e,t=globalThis==null?void 0:globalThis.document){const n=de(e),r=u.useRef(!1);return u.useEffect(()=>{const o=s=>{s.target&&!r.current&&Qc(Cx,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 Jc(){const e=new CustomEvent(Ds);document.dispatchEvent(e)}function Qc(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?ws(o,s):o.dispatchEvent(s)}var Ax=mt,Nx=Zc,_s=0;function kr(){u.useEffect(()=>{const e=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",e[0]??eu()),document.body.insertAdjacentElement("beforeend",e[1]??eu()),_s++,()=>{_s===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(t=>t.remove()),_s--}},[])}function eu(){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 ks="focusScope.autoFocusOnMount",Os="focusScope.autoFocusOnUnmount",tu={bubbles:!1,cancelable:!0},Mx="FocusScope",On=u.forwardRef((e,t)=>{const{loop:n=!1,trapped:r=!1,onMountAutoFocus:o,onUnmountAutoFocus:s,...i}=e,[a,l]=u.useState(null),c=de(o),d=de(s),f=u.useRef(null),h=J(t,g=>l(g)),m=u.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;u.useEffect(()=>{if(r){let g=function(x){if(m.paused||!a)return;const S=x.target;a.contains(S)?f.current=S:gt(f.current,{select:!0})},v=function(x){if(m.paused||!a)return;const S=x.relatedTarget;S!==null&&(a.contains(S)||gt(f.current,{select:!0}))},b=function(x){if(document.activeElement===document.body)for(const C of x)C.removedNodes.length>0&&gt(a)};document.addEventListener("focusin",g),document.addEventListener("focusout",v);const w=new MutationObserver(b);return a&&w.observe(a,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",g),document.removeEventListener("focusout",v),w.disconnect()}}},[r,a,m.paused]),u.useEffect(()=>{if(a){ou.add(m);const g=document.activeElement;if(!a.contains(g)){const b=new CustomEvent(ks,tu);a.addEventListener(ks,c),a.dispatchEvent(b),b.defaultPrevented||(Ix(Lx(nu(a)),{select:!0}),document.activeElement===g&&gt(a))}return()=>{a.removeEventListener(ks,c),setTimeout(()=>{const b=new CustomEvent(Os,tu);a.addEventListener(Os,d),a.dispatchEvent(b),b.defaultPrevented||gt(g??document.body,{select:!0}),a.removeEventListener(Os,d),ou.remove(m)},0)}}},[a,c,d,m]);const y=u.useCallback(g=>{if(!n&&!r||m.paused)return;const v=g.key==="Tab"&&!g.altKey&&!g.ctrlKey&&!g.metaKey,b=document.activeElement;if(v&&b){const w=g.currentTarget,[x,S]=Dx(w);x&&S?!g.shiftKey&&b===S?(g.preventDefault(),n&&gt(x,{select:!0})):g.shiftKey&&b===x&&(g.preventDefault(),n&&gt(S,{select:!0})):b===w&&g.preventDefault()}},[n,r,m.paused]);return p.jsx(W.div,{tabIndex:-1,...i,ref:h,onKeyDown:y})});On.displayName=Mx;function Ix(e,{select:t=!1}={}){const n=document.activeElement;for(const r of e)if(gt(r,{select:t}),document.activeElement!==n)return}function Dx(e){const t=nu(e),n=ru(t,e),r=ru(t.reverse(),e);return[n,r]}function nu(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 ru(e,t){for(const n of e)if(!_x(n,{upTo:t}))return n}function _x(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 kx(e){return e instanceof HTMLInputElement&&"select"in e}function gt(e,{select:t=!1}={}){if(e&&e.focus){const n=document.activeElement;e.focus({preventScroll:!0}),e!==n&&kx(e)&&t&&e.select()}}var ou=Ox();function Ox(){let e=[];return{add(t){const n=e[0];t!==n&&(n==null||n.pause()),e=su(e,t),e.unshift(t)},remove(t){var n;e=su(e,t),(n=e[0])==null||n.resume()}}}function su(e,t){const n=[...e],r=n.indexOf(t);return r!==-1&&n.splice(r,1),n}function Lx(e){return e.filter(t=>t.tagName!=="A")}const Vx=["top","right","bottom","left"],vt=Math.min,Ae=Math.max,Or=Math.round,Lr=Math.floor,Ge=e=>({x:e,y:e}),$x={left:"right",right:"left",bottom:"top",top:"bottom"},Fx={start:"end",end:"start"};function Ls(e,t,n){return Ae(e,vt(t,n))}function at(e,t){return typeof e=="function"?e(t):e}function lt(e){return e.split("-")[0]}function qt(e){return e.split("-")[1]}function Vs(e){return e==="x"?"y":"x"}function $s(e){return e==="y"?"height":"width"}const Rx=new Set(["top","bottom"]);function Ke(e){return Rx.has(lt(e))?"y":"x"}function Fs(e){return Vs(Ke(e))}function Bx(e,t,n){n===void 0&&(n=!1);const r=qt(e),o=Fs(e),s=$s(o);let i=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(i=Vr(i)),[i,Vr(i)]}function zx(e){const t=Vr(e);return[Rs(e),t,Rs(t)]}function Rs(e){return e.replace(/start|end/g,t=>Fx[t])}const iu=["left","right"],au=["right","left"],Wx=["top","bottom"],Hx=["bottom","top"];function jx(e,t,n){switch(e){case"top":case"bottom":return n?t?au:iu:t?iu:au;case"left":case"right":return t?Wx:Hx;default:return[]}}function Ux(e,t,n,r){const o=qt(e);let s=jx(lt(e),n==="start",r);return o&&(s=s.map(i=>i+"-"+o),t&&(s=s.concat(s.map(Rs)))),s}function Vr(e){return e.replace(/left|right|bottom|top/g,t=>$x[t])}function Gx(e){return{top:0,right:0,bottom:0,left:0,...e}}function lu(e){return typeof e!="number"?Gx(e):{top:e,right:e,bottom:e,left:e}}function $r(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 cu(e,t,n){let{reference:r,floating:o}=e;const s=Ke(t),i=Fs(t),a=$s(i),l=lt(t),c=s==="y",d=r.x+r.width/2-o.width/2,f=r.y+r.height/2-o.height/2,h=r[a]/2-o[a]/2;let m;switch(l){case"top":m={x:d,y:r.y-o.height};break;case"bottom":m={x:d,y:r.y+r.height};break;case"right":m={x:r.x+r.width,y:f};break;case"left":m={x:r.x-o.width,y:f};break;default:m={x:r.x,y:r.y}}switch(qt(t)){case"start":m[i]-=h*(n&&c?-1:1);break;case"end":m[i]+=h*(n&&c?-1:1);break}return m}const Kx=async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:s=[],platform:i}=n,a=s.filter(Boolean),l=await(i.isRTL==null?void 0:i.isRTL(t));let c=await i.getElementRects({reference:e,floating:t,strategy:o}),{x:d,y:f}=cu(c,r,l),h=r,m={},y=0;for(let g=0;g<a.length;g++){const{name:v,fn:b}=a[g],{x:w,y:x,data:S,reset:C}=await b({x:d,y:f,initialPlacement:r,placement:h,strategy:o,middlewareData:m,rects:c,platform:i,elements:{reference:e,floating:t}});d=w??d,f=x??f,m={...m,[v]:{...m[v],...S}},C&&y<=50&&(y++,typeof C=="object"&&(C.placement&&(h=C.placement),C.rects&&(c=C.rects===!0?await i.getElementRects({reference:e,floating:t,strategy:o}):C.rects),{x:d,y:f}=cu(c,h,l)),g=-1)}return{x:d,y:f,placement:h,strategy:o,middlewareData:m}};async function Ln(e,t){var n;t===void 0&&(t={});const{x:r,y:o,platform:s,rects:i,elements:a,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:f="floating",altBoundary:h=!1,padding:m=0}=at(t,e),y=lu(m),v=a[h?f==="floating"?"reference":"floating":f],b=$r(await s.getClippingRect({element:(n=await(s.isElement==null?void 0:s.isElement(v)))==null||n?v:v.contextElement||await(s.getDocumentElement==null?void 0:s.getDocumentElement(a.floating)),boundary:c,rootBoundary:d,strategy:l})),w=f==="floating"?{x:r,y:o,width:i.floating.width,height:i.floating.height}:i.reference,x=await(s.getOffsetParent==null?void 0:s.getOffsetParent(a.floating)),S=await(s.isElement==null?void 0:s.isElement(x))?await(s.getScale==null?void 0:s.getScale(x))||{x:1,y:1}:{x:1,y:1},C=$r(s.convertOffsetParentRelativeRectToViewportRelativeRect?await s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:w,offsetParent:x,strategy:l}):w);return{top:(b.top-C.top+y.top)/S.y,bottom:(C.bottom-b.bottom+y.bottom)/S.y,left:(b.left-C.left+y.left)/S.x,right:(C.right-b.right+y.right)/S.x}}const Yx=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:s,platform:i,elements:a,middlewareData:l}=t,{element:c,padding:d=0}=at(e,t)||{};if(c==null)return{};const f=lu(d),h={x:n,y:r},m=Fs(o),y=$s(m),g=await i.getDimensions(c),v=m==="y",b=v?"top":"left",w=v?"bottom":"right",x=v?"clientHeight":"clientWidth",S=s.reference[y]+s.reference[m]-h[m]-s.floating[y],C=h[m]-s.reference[m],T=await(i.getOffsetParent==null?void 0:i.getOffsetParent(c));let A=T?T[x]:0;(!A||!await(i.isElement==null?void 0:i.isElement(T)))&&(A=a.floating[x]||s.floating[y]);const N=S/2-C/2,I=A/2-g[y]/2-1,O=vt(f[b],I),L=vt(f[w],I),V=O,U=A-g[y]-L,_=A/2-g[y]/2+N,K=Ls(V,_,U),H=!l.arrow&&qt(o)!=null&&_!==K&&s.reference[y]/2-(_<V?O:L)-g[y]/2<0,B=H?_<V?_-V:_-U:0;return{[m]:h[m]+B,data:{[m]:K,centerOffset:_-K-B,...H&&{alignmentOffset:B}},reset:H}}}),Xx=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:l,elements:c}=t,{mainAxis:d=!0,crossAxis:f=!0,fallbackPlacements:h,fallbackStrategy:m="bestFit",fallbackAxisSideDirection:y="none",flipAlignment:g=!0,...v}=at(e,t);if((n=s.arrow)!=null&&n.alignmentOffset)return{};const b=lt(o),w=Ke(a),x=lt(a)===a,S=await(l.isRTL==null?void 0:l.isRTL(c.floating)),C=h||(x||!g?[Vr(a)]:zx(a)),T=y!=="none";!h&&T&&C.push(...Ux(a,g,y,S));const A=[a,...C],N=await Ln(t,v),I=[];let O=((r=s.flip)==null?void 0:r.overflows)||[];if(d&&I.push(N[b]),f){const _=Bx(o,i,S);I.push(N[_[0]],N[_[1]])}if(O=[...O,{placement:o,overflows:I}],!I.every(_=>_<=0)){var L,V;const _=(((L=s.flip)==null?void 0:L.index)||0)+1,K=A[_];if(K&&(!(f==="alignment"?w!==Ke(K):!1)||O.every($=>Ke($.placement)===w?$.overflows[0]>0:!0)))return{data:{index:_,overflows:O},reset:{placement:K}};let H=(V=O.filter(B=>B.overflows[0]<=0).sort((B,$)=>B.overflows[1]-$.overflows[1])[0])==null?void 0:V.placement;if(!H)switch(m){case"bestFit":{var U;const B=(U=O.filter($=>{if(T){const F=Ke($.placement);return F===w||F==="y"}return!0}).map($=>[$.placement,$.overflows.filter(F=>F>0).reduce((F,ne)=>F+ne,0)]).sort(($,F)=>$[1]-F[1])[0])==null?void 0:U[0];B&&(H=B);break}case"initialPlacement":H=a;break}if(o!==H)return{reset:{placement:H}}}return{}}}};function uu(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function du(e){return Vx.some(t=>e[t]>=0)}const qx=function(e){return e===void 0&&(e={}),{name:"hide",options:e,async fn(t){const{rects:n}=t,{strategy:r="referenceHidden",...o}=at(e,t);switch(r){case"referenceHidden":{const s=await Ln(t,{...o,elementContext:"reference"}),i=uu(s,n.reference);return{data:{referenceHiddenOffsets:i,referenceHidden:du(i)}}}case"escaped":{const s=await Ln(t,{...o,altBoundary:!0}),i=uu(s,n.floating);return{data:{escapedOffsets:i,escaped:du(i)}}}default:return{}}}}},fu=new Set(["left","top"]);async function Zx(e,t){const{placement:n,platform:r,elements:o}=e,s=await(r.isRTL==null?void 0:r.isRTL(o.floating)),i=lt(n),a=qt(n),l=Ke(n)==="y",c=fu.has(i)?-1:1,d=s&&l?-1:1,f=at(t,e);let{mainAxis:h,crossAxis:m,alignmentAxis:y}=typeof f=="number"?{mainAxis:f,crossAxis:0,alignmentAxis:null}:{mainAxis:f.mainAxis||0,crossAxis:f.crossAxis||0,alignmentAxis:f.alignmentAxis};return a&&typeof y=="number"&&(m=a==="end"?y*-1:y),l?{x:m*d,y:h*c}:{x:h*c,y:m*d}}const Jx=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,l=await Zx(t,e);return i===((n=a.offset)==null?void 0:n.placement)&&(r=a.arrow)!=null&&r.alignmentOffset?{}:{x:o+l.x,y:s+l.y,data:{...l,placement:i}}}}},Qx=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:v=>{let{x:b,y:w}=v;return{x:b,y:w}}},...l}=at(e,t),c={x:n,y:r},d=await Ln(t,l),f=Ke(lt(o)),h=Vs(f);let m=c[h],y=c[f];if(s){const v=h==="y"?"top":"left",b=h==="y"?"bottom":"right",w=m+d[v],x=m-d[b];m=Ls(w,m,x)}if(i){const v=f==="y"?"top":"left",b=f==="y"?"bottom":"right",w=y+d[v],x=y-d[b];y=Ls(w,y,x)}const g=a.fn({...t,[h]:m,[f]:y});return{...g,data:{x:g.x-n,y:g.y-r,enabled:{[h]:s,[f]:i}}}}}},eS=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:l=!0,crossAxis:c=!0}=at(e,t),d={x:n,y:r},f=Ke(o),h=Vs(f);let m=d[h],y=d[f];const g=at(a,t),v=typeof g=="number"?{mainAxis:g,crossAxis:0}:{mainAxis:0,crossAxis:0,...g};if(l){const x=h==="y"?"height":"width",S=s.reference[h]-s.floating[x]+v.mainAxis,C=s.reference[h]+s.reference[x]-v.mainAxis;m<S?m=S:m>C&&(m=C)}if(c){var b,w;const x=h==="y"?"width":"height",S=fu.has(lt(o)),C=s.reference[f]-s.floating[x]+(S&&((b=i.offset)==null?void 0:b[f])||0)+(S?0:v.crossAxis),T=s.reference[f]+s.reference[x]+(S?0:((w=i.offset)==null?void 0:w[f])||0)-(S?v.crossAxis:0);y<C?y=C:y>T&&(y=T)}return{[h]:m,[f]:y}}}},tS=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:l=()=>{},...c}=at(e,t),d=await Ln(t,c),f=lt(o),h=qt(o),m=Ke(o)==="y",{width:y,height:g}=s.floating;let v,b;f==="top"||f==="bottom"?(v=f,b=h===(await(i.isRTL==null?void 0:i.isRTL(a.floating))?"start":"end")?"left":"right"):(b=f,v=h==="end"?"top":"bottom");const w=g-d.top-d.bottom,x=y-d.left-d.right,S=vt(g-d[v],w),C=vt(y-d[b],x),T=!t.middlewareData.shift;let A=S,N=C;if((n=t.middlewareData.shift)!=null&&n.enabled.x&&(N=x),(r=t.middlewareData.shift)!=null&&r.enabled.y&&(A=w),T&&!h){const O=Ae(d.left,0),L=Ae(d.right,0),V=Ae(d.top,0),U=Ae(d.bottom,0);m?N=y-2*(O!==0||L!==0?O+L:Ae(d.left,d.right)):A=g-2*(V!==0||U!==0?V+U:Ae(d.top,d.bottom))}await l({...t,availableWidth:N,availableHeight:A});const I=await i.getDimensions(a.floating);return y!==I.width||g!==I.height?{reset:{rects:!0}}:{}}}};function Fr(){return typeof window<"u"}function Zt(e){return pu(e)?(e.nodeName||"").toLowerCase():"#document"}function Ne(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ye(e){var t;return(t=(pu(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function pu(e){return Fr()?e instanceof Node||e instanceof Ne(e).Node:!1}function Fe(e){return Fr()?e instanceof Element||e instanceof Ne(e).Element:!1}function Xe(e){return Fr()?e instanceof HTMLElement||e instanceof Ne(e).HTMLElement:!1}function hu(e){return!Fr()||typeof ShadowRoot>"u"?!1:e instanceof ShadowRoot||e instanceof Ne(e).ShadowRoot}const nS=new Set(["inline","contents"]);function Vn(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Re(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!nS.has(o)}const rS=new Set(["table","td","th"]);function oS(e){return rS.has(Zt(e))}const sS=[":popover-open",":modal"];function Rr(e){return sS.some(t=>{try{return e.matches(t)}catch{return!1}})}const iS=["transform","translate","scale","rotate","perspective"],aS=["transform","translate","scale","rotate","perspective","filter"],lS=["paint","layout","strict","content"];function Bs(e){const t=zs(),n=Fe(e)?Re(e):e;return iS.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)||aS.some(r=>(n.willChange||"").includes(r))||lS.some(r=>(n.contain||"").includes(r))}function cS(e){let t=yt(e);for(;Xe(t)&&!Jt(t);){if(Bs(t))return t;if(Rr(t))return null;t=yt(t)}return null}function zs(){return typeof CSS>"u"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const uS=new Set(["html","body","#document"]);function Jt(e){return uS.has(Zt(e))}function Re(e){return Ne(e).getComputedStyle(e)}function Br(e){return Fe(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function yt(e){if(Zt(e)==="html")return e;const t=e.assignedSlot||e.parentNode||hu(e)&&e.host||Ye(e);return hu(t)?t.host:t}function mu(e){const t=yt(e);return Jt(t)?e.ownerDocument?e.ownerDocument.body:e.body:Xe(t)&&Vn(t)?t:mu(t)}function $n(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=mu(e),s=o===((r=e.ownerDocument)==null?void 0:r.body),i=Ne(o);if(s){const a=Ws(i);return t.concat(i,i.visualViewport||[],Vn(o)?o:[],a&&n?$n(a):[])}return t.concat(o,$n(o,[],n))}function Ws(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function gu(e){const t=Re(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Xe(e),s=o?e.offsetWidth:n,i=o?e.offsetHeight:r,a=Or(n)!==s||Or(r)!==i;return a&&(n=s,r=i),{width:n,height:r,$:a}}function Hs(e){return Fe(e)?e:e.contextElement}function Qt(e){const t=Hs(e);if(!Xe(t))return Ge(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:s}=gu(t);let i=(s?Or(n.width):n.width)/r,a=(s?Or(n.height):n.height)/o;return(!i||!Number.isFinite(i))&&(i=1),(!a||!Number.isFinite(a))&&(a=1),{x:i,y:a}}const dS=Ge(0);function vu(e){const t=Ne(e);return!zs()||!t.visualViewport?dS:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function fS(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Ne(e)?!1:t}function Dt(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),s=Hs(e);let i=Ge(1);t&&(r?Fe(r)&&(i=Qt(r)):i=Qt(e));const a=fS(s,n,r)?vu(s):Ge(0);let l=(o.left+a.x)/i.x,c=(o.top+a.y)/i.y,d=o.width/i.x,f=o.height/i.y;if(s){const h=Ne(s),m=r&&Fe(r)?Ne(r):r;let y=h,g=Ws(y);for(;g&&r&&m!==y;){const v=Qt(g),b=g.getBoundingClientRect(),w=Re(g),x=b.left+(g.clientLeft+parseFloat(w.paddingLeft))*v.x,S=b.top+(g.clientTop+parseFloat(w.paddingTop))*v.y;l*=v.x,c*=v.y,d*=v.x,f*=v.y,l+=x,c+=S,y=Ne(g),g=Ws(y)}}return $r({width:d,height:f,x:l,y:c})}function zr(e,t){const n=Br(e).scrollLeft;return t?t.left+n:Dt(Ye(e)).left+n}function yu(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-zr(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function pS(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const s=o==="fixed",i=Ye(r),a=t?Rr(t.floating):!1;if(r===i||a&&s)return n;let l={scrollLeft:0,scrollTop:0},c=Ge(1);const d=Ge(0),f=Xe(r);if((f||!f&&!s)&&((Zt(r)!=="body"||Vn(i))&&(l=Br(r)),Xe(r))){const m=Dt(r);c=Qt(r),d.x=m.x+r.clientLeft,d.y=m.y+r.clientTop}const h=i&&!f&&!s?yu(i,l):Ge(0);return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+d.x+h.x,y:n.y*c.y-l.scrollTop*c.y+d.y+h.y}}function hS(e){return Array.from(e.getClientRects())}function mS(e){const t=Ye(e),n=Br(e),r=e.ownerDocument.body,o=Ae(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=Ae(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let i=-n.scrollLeft+zr(e);const a=-n.scrollTop;return Re(r).direction==="rtl"&&(i+=Ae(t.clientWidth,r.clientWidth)-o),{width:o,height:s,x:i,y:a}}const bu=25;function gS(e,t){const n=Ne(e),r=Ye(e),o=n.visualViewport;let s=r.clientWidth,i=r.clientHeight,a=0,l=0;if(o){s=o.width,i=o.height;const d=zs();(!d||d&&t==="fixed")&&(a=o.offsetLeft,l=o.offsetTop)}const c=zr(r);if(c<=0){const d=r.ownerDocument,f=d.body,h=getComputedStyle(f),m=d.compatMode==="CSS1Compat"&&parseFloat(h.marginLeft)+parseFloat(h.marginRight)||0,y=Math.abs(r.clientWidth-f.clientWidth-m);y<=bu&&(s-=y)}else c<=bu&&(s+=c);return{width:s,height:i,x:a,y:l}}const vS=new Set(["absolute","fixed"]);function yS(e,t){const n=Dt(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,s=Xe(e)?Qt(e):Ge(1),i=e.clientWidth*s.x,a=e.clientHeight*s.y,l=o*s.x,c=r*s.y;return{width:i,height:a,x:l,y:c}}function wu(e,t,n){let r;if(t==="viewport")r=gS(e,n);else if(t==="document")r=mS(Ye(e));else if(Fe(t))r=yS(t,n);else{const o=vu(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return $r(r)}function xu(e,t){const n=yt(e);return n===t||!Fe(n)||Jt(n)?!1:Re(n).position==="fixed"||xu(n,t)}function bS(e,t){const n=t.get(e);if(n)return n;let r=$n(e,[],!1).filter(a=>Fe(a)&&Zt(a)!=="body"),o=null;const s=Re(e).position==="fixed";let i=s?yt(e):e;for(;Fe(i)&&!Jt(i);){const a=Re(i),l=Bs(i);!l&&a.position==="fixed"&&(o=null),(s?!l&&!o:!l&&a.position==="static"&&!!o&&vS.has(o.position)||Vn(i)&&!l&&xu(e,i))?r=r.filter(d=>d!==i):o=a,i=yt(i)}return t.set(e,r),r}function wS(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[...n==="clippingAncestors"?Rr(t)?[]:bS(t,this._c):[].concat(n),r],a=i[0],l=i.reduce((c,d)=>{const f=wu(t,d,o);return c.top=Ae(f.top,c.top),c.right=vt(f.right,c.right),c.bottom=vt(f.bottom,c.bottom),c.left=Ae(f.left,c.left),c},wu(t,a,o));return{width:l.right-l.left,height:l.bottom-l.top,x:l.left,y:l.top}}function xS(e){const{width:t,height:n}=gu(e);return{width:t,height:n}}function SS(e,t,n){const r=Xe(t),o=Ye(t),s=n==="fixed",i=Dt(e,!0,s,t);let a={scrollLeft:0,scrollTop:0};const l=Ge(0);function c(){l.x=zr(o)}if(r||!r&&!s)if((Zt(t)!=="body"||Vn(o))&&(a=Br(t)),r){const m=Dt(t,!0,s,t);l.x=m.x+t.clientLeft,l.y=m.y+t.clientTop}else o&&c();s&&!r&&o&&c();const d=o&&!r&&!s?yu(o,a):Ge(0),f=i.left+a.scrollLeft-l.x-d.x,h=i.top+a.scrollTop-l.y-d.y;return{x:f,y:h,width:i.width,height:i.height}}function js(e){return Re(e).position==="static"}function Su(e,t){if(!Xe(e)||Re(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Ye(e)===n&&(n=n.ownerDocument.body),n}function Cu(e,t){const n=Ne(e);if(Rr(e))return n;if(!Xe(e)){let o=yt(e);for(;o&&!Jt(o);){if(Fe(o)&&!js(o))return o;o=yt(o)}return n}let r=Su(e,t);for(;r&&oS(r)&&js(r);)r=Su(r,t);return r&&Jt(r)&&js(r)&&!Bs(r)?n:r||cS(e)||n}const CS=async function(e){const t=this.getOffsetParent||Cu,n=this.getDimensions,r=await n(e.floating);return{reference:SS(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}};function ES(e){return Re(e).direction==="rtl"}const PS={convertOffsetParentRelativeRectToViewportRelativeRect:pS,getDocumentElement:Ye,getClippingRect:wS,getOffsetParent:Cu,getElementRects:CS,getClientRects:hS,getDimensions:xS,getScale:Qt,isElement:Fe,isRTL:ES};function Eu(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function TS(e,t){let n=null,r;const o=Ye(e);function s(){var a;clearTimeout(r),(a=n)==null||a.disconnect(),n=null}function i(a,l){a===void 0&&(a=!1),l===void 0&&(l=1),s();const c=e.getBoundingClientRect(),{left:d,top:f,width:h,height:m}=c;if(a||t(),!h||!m)return;const y=Lr(f),g=Lr(o.clientWidth-(d+h)),v=Lr(o.clientHeight-(f+m)),b=Lr(d),x={rootMargin:-y+"px "+-g+"px "+-v+"px "+-b+"px",threshold:Ae(0,vt(1,l))||1};let S=!0;function C(T){const A=T[0].intersectionRatio;if(A!==l){if(!S)return i();A?i(!1,A):r=setTimeout(()=>{i(!1,1e-7)},1e3)}A===1&&!Eu(c,e.getBoundingClientRect())&&i(),S=!1}try{n=new IntersectionObserver(C,{...x,root:o.ownerDocument})}catch{n=new IntersectionObserver(C,x)}n.observe(e)}return i(!0),s}function AS(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:l=!1}=r,c=Hs(e),d=o||s?[...c?$n(c):[],...$n(t)]:[];d.forEach(b=>{o&&b.addEventListener("scroll",n,{passive:!0}),s&&b.addEventListener("resize",n)});const f=c&&a?TS(c,n):null;let h=-1,m=null;i&&(m=new ResizeObserver(b=>{let[w]=b;w&&w.target===c&&m&&(m.unobserve(t),cancelAnimationFrame(h),h=requestAnimationFrame(()=>{var x;(x=m)==null||x.observe(t)})),n()}),c&&!l&&m.observe(c),m.observe(t));let y,g=l?Dt(e):null;l&&v();function v(){const b=Dt(e);g&&!Eu(g,b)&&n(),g=b,y=requestAnimationFrame(v)}return n(),()=>{var b;d.forEach(w=>{o&&w.removeEventListener("scroll",n),s&&w.removeEventListener("resize",n)}),f==null||f(),(b=m)==null||b.disconnect(),m=null,l&&cancelAnimationFrame(y)}}const NS=Jx,MS=Qx,IS=Xx,DS=tS,_S=qx,Pu=Yx,kS=eS,OS=(e,t,n)=>{const r=new Map,o={platform:PS,...n},s={...o.platform,_c:r};return Kx(e,t,{...o,platform:s})};var LS=typeof document<"u",VS=function(){},Wr=LS?P.useLayoutEffect:VS;function Hr(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if(typeof e=="function"&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&typeof e=="object"){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;r--!==0;)if(!Hr(e[r],t[r]))return!1;return!0}if(o=Object.keys(e),n=o.length,n!==Object.keys(t).length)return!1;for(r=n;r--!==0;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;r--!==0;){const s=o[r];if(!(s==="_owner"&&e.$$typeof)&&!Hr(e[s],t[s]))return!1}return!0}return e!==e&&t!==t}function Tu(e){return typeof window>"u"?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Au(e,t){const n=Tu(e);return Math.round(t*n)/n}function Us(e){const t=u.useRef(e);return Wr(()=>{t.current=e}),t}function $S(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:l,open:c}=e,[d,f]=u.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[h,m]=u.useState(r);Hr(h,r)||m(r);const[y,g]=u.useState(null),[v,b]=u.useState(null),w=u.useCallback($=>{$!==T.current&&(T.current=$,g($))},[]),x=u.useCallback($=>{$!==A.current&&(A.current=$,b($))},[]),S=s||y,C=i||v,T=u.useRef(null),A=u.useRef(null),N=u.useRef(d),I=l!=null,O=Us(l),L=Us(o),V=Us(c),U=u.useCallback(()=>{if(!T.current||!A.current)return;const $={placement:t,strategy:n,middleware:h};L.current&&($.platform=L.current),OS(T.current,A.current,$).then(F=>{const ne={...F,isPositioned:V.current!==!1};_.current&&!Hr(N.current,ne)&&(N.current=ne,Tn.flushSync(()=>{f(ne)}))})},[h,t,n,L,V]);Wr(()=>{c===!1&&N.current.isPositioned&&(N.current.isPositioned=!1,f($=>({...$,isPositioned:!1})))},[c]);const _=u.useRef(!1);Wr(()=>(_.current=!0,()=>{_.current=!1}),[]),Wr(()=>{if(S&&(T.current=S),C&&(A.current=C),S&&C){if(O.current)return O.current(S,C,U);U()}},[S,C,U,O,I]);const K=u.useMemo(()=>({reference:T,floating:A,setReference:w,setFloating:x}),[w,x]),H=u.useMemo(()=>({reference:S,floating:C}),[S,C]),B=u.useMemo(()=>{const $={position:n,left:0,top:0};if(!H.floating)return $;const F=Au(H.floating,d.x),ne=Au(H.floating,d.y);return a?{...$,transform:"translate("+F+"px, "+ne+"px)",...Tu(H.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:F,top:ne}},[n,a,H.floating,d.x,d.y]);return u.useMemo(()=>({...d,update:U,refs:K,elements:H,floatingStyles:B}),[d,U,K,H,B])}const FS=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?Pu({element:r.current,padding:o}).fn(n):{}:r?Pu({element:r,padding:o}).fn(n):{}}}},RS=(e,t)=>({...NS(e),options:[e,t]}),BS=(e,t)=>({...MS(e),options:[e,t]}),zS=(e,t)=>({...kS(e),options:[e,t]}),WS=(e,t)=>({...IS(e),options:[e,t]}),HS=(e,t)=>({...DS(e),options:[e,t]}),jS=(e,t)=>({..._S(e),options:[e,t]}),US=(e,t)=>({...FS(e),options:[e,t]});var GS="Arrow",Nu=u.forwardRef((e,t)=>{const{children:n,width:r=10,height:o=5,...s}=e;return p.jsx(W.svg,{...s,ref:t,width:r,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none",children:e.asChild?n:p.jsx("polygon",{points:"0,0 30,0 15,10"})})});Nu.displayName=GS;var KS=Nu,Gs="Popper",[Mu,qe]=ye(Gs),[YS,Iu]=Mu(Gs),Du=e=>{const{__scopePopper:t,children:n}=e,[r,o]=u.useState(null);return p.jsx(YS,{scope:t,anchor:r,onAnchorChange:o,children:n})};Du.displayName=Gs;var _u="PopperAnchor",ku=u.forwardRef((e,t)=>{const{__scopePopper:n,virtualRef:r,...o}=e,s=Iu(_u,n),i=u.useRef(null),a=J(t,i),l=u.useRef(null);return u.useEffect(()=>{const c=l.current;l.current=(r==null?void 0:r.current)||i.current,c!==l.current&&s.onAnchorChange(l.current)}),r?null:p.jsx(W.div,{...o,ref:a})});ku.displayName=_u;var Ks="PopperContent",[XS,qS]=Mu(Ks),Ou=u.forwardRef((e,t)=>{var z,Z,q,ee,le,R;const{__scopePopper:n,side:r="bottom",sideOffset:o=0,align:s="center",alignOffset:i=0,arrowPadding:a=0,avoidCollisions:l=!0,collisionBoundary:c=[],collisionPadding:d=0,sticky:f="partial",hideWhenDetached:h=!1,updatePositionStrategy:m="optimized",onPlaced:y,...g}=e,v=Iu(Ks,n),[b,w]=u.useState(null),x=J(t,Y=>w(Y)),[S,C]=u.useState(null),T=Dn(S),A=(T==null?void 0:T.width)??0,N=(T==null?void 0:T.height)??0,I=r+(s!=="center"?"-"+s:""),O=typeof d=="number"?d:{top:0,right:0,bottom:0,left:0,...d},L=Array.isArray(c)?c:[c],V=L.length>0,U={padding:O,boundary:L.filter(JS),altBoundary:V},{refs:_,floatingStyles:K,placement:H,isPositioned:B,middlewareData:$}=$S({strategy:"fixed",placement:I,whileElementsMounted:(...Y)=>AS(...Y,{animationFrame:m==="always"}),elements:{reference:v.anchor},middleware:[RS({mainAxis:o+N,alignmentAxis:i}),l&&BS({mainAxis:!0,crossAxis:!1,limiter:f==="partial"?zS():void 0,...U}),l&&WS({...U}),HS({...U,apply:({elements:Y,rects:ae,availableWidth:Ie,availableHeight:De})=>{const{width:_e,height:ct}=ae.reference,Ue=Y.floating.style;Ue.setProperty("--radix-popper-available-width",`${Ie}px`),Ue.setProperty("--radix-popper-available-height",`${De}px`),Ue.setProperty("--radix-popper-anchor-width",`${_e}px`),Ue.setProperty("--radix-popper-anchor-height",`${ct}px`)}}),S&&US({element:S,padding:a}),QS({arrowWidth:A,arrowHeight:N}),h&&jS({strategy:"referenceHidden",...U})]}),[F,ne]=$u(H),re=de(y);pe(()=>{B&&(re==null||re())},[B,re]);const D=(z=$.arrow)==null?void 0:z.x,G=(Z=$.arrow)==null?void 0:Z.y,X=((q=$.arrow)==null?void 0:q.centerOffset)!==0,[j,Q]=u.useState();return pe(()=>{b&&Q(window.getComputedStyle(b).zIndex)},[b]),p.jsx("div",{ref:_.setFloating,"data-radix-popper-content-wrapper":"",style:{...K,transform:B?K.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:j,"--radix-popper-transform-origin":[(ee=$.transformOrigin)==null?void 0:ee.x,(le=$.transformOrigin)==null?void 0:le.y].join(" "),...((R=$.hide)==null?void 0:R.referenceHidden)&&{visibility:"hidden",pointerEvents:"none"}},dir:e.dir,children:p.jsx(XS,{scope:n,placedSide:F,onArrowChange:C,arrowX:D,arrowY:G,shouldHideArrow:X,children:p.jsx(W.div,{"data-side":F,"data-align":ne,...g,ref:x,style:{...g.style,animation:B?void 0:"none"}})})})});Ou.displayName=Ks;var Lu="PopperArrow",ZS={top:"bottom",right:"left",bottom:"top",left:"right"},Vu=u.forwardRef(function(t,n){const{__scopePopper:r,...o}=t,s=qS(Lu,r),i=ZS[s.placedSide];return p.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:p.jsx(KS,{...o,ref:n,style:{...o.style,display:"block"}})})});Vu.displayName=Lu;function JS(e){return e!==null}var QS=e=>({name:"transformOrigin",options:e,fn(t){var v,b,w;const{placement:n,rects:r,middlewareData:o}=t,i=((v=o.arrow)==null?void 0:v.centerOffset)!==0,a=i?0:e.arrowWidth,l=i?0:e.arrowHeight,[c,d]=$u(n),f={start:"0%",center:"50%",end:"100%"}[d],h=(((b=o.arrow)==null?void 0:b.x)??0)+a/2,m=(((w=o.arrow)==null?void 0:w.y)??0)+l/2;let y="",g="";return c==="bottom"?(y=i?f:`${h}px`,g=`${-l}px`):c==="top"?(y=i?f:`${h}px`,g=`${r.floating.height+l}px`):c==="right"?(y=`${-l}px`,g=i?f:`${m}px`):c==="left"&&(y=`${r.floating.width+l}px`,g=i?f:`${m}px`),{data:{x:y,y:g}}}});function $u(e){const[t,n="center"]=e.split("-");return[t,n]}var en=Du,tn=ku,Fn=Ou,Rn=Vu,eC="Portal",nn=u.forwardRef((e,t)=>{var a;const{container:n,...r}=e,[o,s]=u.useState(!1);pe(()=>s(!0),[]);const i=n||o&&((a=globalThis==null?void 0:globalThis.document)==null?void 0:a.body);return i?zl.createPortal(p.jsx(W.div,{...r,ref:t}),i):null});nn.displayName=eC;function tC(e){const t=nC(e),n=u.forwardRef((r,o)=>{const{children:s,...i}=r,a=u.Children.toArray(s),l=a.find(oC);if(l){const c=l.props.children,d=a.map(f=>f===l?u.Children.count(c)>1?u.Children.only(null):u.isValidElement(c)?c.props.children:null:f);return p.jsx(t,{...i,ref:o,children:u.isValidElement(c)?u.cloneElement(c,void 0,d):null})}return p.jsx(t,{...i,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}function nC(e){const t=u.forwardRef((n,r)=>{const{children:o,...s}=n;if(u.isValidElement(o)){const i=iC(o),a=sC(s,o.props);return o.type!==u.Fragment&&(a.ref=r?Ce(r,i):i),u.cloneElement(o,a)}return u.Children.count(o)>1?u.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var rC=Symbol("radix.slottable");function oC(e){return u.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===rC}function sC(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 l=s(...a);return o(...a),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function iC(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 Fu=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"}),aC="VisuallyHidden",jr=u.forwardRef((e,t)=>p.jsx(W.span,{...e,ref:t,style:{...Fu,...e.style}}));jr.displayName=aC;var lC=jr,cC=function(e){if(typeof document>"u")return null;var t=Array.isArray(e)?e[0]:e;return t.ownerDocument.body},rn=new WeakMap,Ur=new WeakMap,Gr={},Ys=0,Ru=function(e){return e&&(e.host||Ru(e.parentNode))},uC=function(e,t){return t.map(function(n){if(e.contains(n))return n;var r=Ru(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})},dC=function(e,t,n,r){var o=uC(t,Array.isArray(e)?e:[e]);Gr[n]||(Gr[n]=new WeakMap);var s=Gr[n],i=[],a=new Set,l=new Set(o),c=function(f){!f||a.has(f)||(a.add(f),c(f.parentNode))};o.forEach(c);var d=function(f){!f||l.has(f)||Array.prototype.forEach.call(f.children,function(h){if(a.has(h))d(h);else try{var m=h.getAttribute(r),y=m!==null&&m!=="false",g=(rn.get(h)||0)+1,v=(s.get(h)||0)+1;rn.set(h,g),s.set(h,v),i.push(h),g===1&&y&&Ur.set(h,!0),v===1&&h.setAttribute(n,"true"),y||h.setAttribute(r,"true")}catch(b){console.error("aria-hidden: cannot operate on ",h,b)}})};return d(t),a.clear(),Ys++,function(){i.forEach(function(f){var h=rn.get(f)-1,m=s.get(f)-1;rn.set(f,h),s.set(f,m),h||(Ur.has(f)||f.removeAttribute(r),Ur.delete(f)),m||f.removeAttribute(n)}),Ys--,Ys||(rn=new WeakMap,rn=new WeakMap,Ur=new WeakMap,Gr={})}},Kr=function(e,t,n){n===void 0&&(n="data-aria-hidden");var r=Array.from(Array.isArray(e)?e:[e]),o=cC(e);return o?(r.push.apply(r,Array.from(o.querySelectorAll("[aria-live], script"))),dC(r,o,n,"aria-hidden")):function(){return null}},Ze=function(){return Ze=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},Ze.apply(this,arguments)};function Bu(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 fC(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 Yr="right-scroll-bar-position",Xr="width-before-scroll-bar",pC="with-scroll-bars-hidden",hC="--removed-body-scroll-bar-size";function Xs(e,t){return typeof e=="function"?e(t):e&&(e.current=t),e}function mC(e,t){var n=P.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 gC=typeof window<"u"?u.useLayoutEffect:u.useEffect,zu=new WeakMap;function vC(e,t){var n=mC(null,function(r){return e.forEach(function(o){return Xs(o,r)})});return gC(function(){var r=zu.get(n);if(r){var o=new Set(r),s=new Set(e),i=n.current;o.forEach(function(a){s.has(a)||Xs(a,null)}),s.forEach(function(a){o.has(a)||Xs(a,i)})}zu.set(n,e)},[e]),n}function yC(e){return e}function bC(e,t){t===void 0&&(t=yC);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 l=function(){var d=i;i=[],d.forEach(s)},c=function(){return Promise.resolve().then(l)};c(),n={push:function(d){i.push(d),c()},filter:function(d){return i=i.filter(d),n}}}};return o}function wC(e){e===void 0&&(e={});var t=bC(null);return t.options=Ze({async:!0,ssr:!1},e),t}var Wu=function(e){var t=e.sideCar,n=Bu(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 u.createElement(r,Ze({},n))};Wu.isSideCarExport=!0;function xC(e,t){return e.useMedium(t),Wu}var Hu=wC(),qs=function(){},qr=u.forwardRef(function(e,t){var n=u.useRef(null),r=u.useState({onScrollCapture:qs,onWheelCapture:qs,onTouchMoveCapture:qs}),o=r[0],s=r[1],i=e.forwardProps,a=e.children,l=e.className,c=e.removeScrollBar,d=e.enabled,f=e.shards,h=e.sideCar,m=e.noRelative,y=e.noIsolation,g=e.inert,v=e.allowPinchZoom,b=e.as,w=b===void 0?"div":b,x=e.gapMode,S=Bu(e,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),C=h,T=vC([n,t]),A=Ze(Ze({},S),o);return u.createElement(u.Fragment,null,d&&u.createElement(C,{sideCar:Hu,removeScrollBar:c,shards:f,noRelative:m,noIsolation:y,inert:g,setCallbacks:s,allowPinchZoom:!!v,lockRef:n,gapMode:x}),i?u.cloneElement(u.Children.only(a),Ze(Ze({},A),{ref:T})):u.createElement(w,Ze({},A,{className:l,ref:T}),a))});qr.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1},qr.classNames={fullWidth:Xr,zeroRight:Yr};var SC=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function CC(){if(!document)return null;var e=document.createElement("style");e.type="text/css";var t=SC();return t&&e.setAttribute("nonce",t),e}function EC(e,t){e.styleSheet?e.styleSheet.cssText=t:e.appendChild(document.createTextNode(t))}function PC(e){var t=document.head||document.getElementsByTagName("head")[0];t.appendChild(e)}var TC=function(){var e=0,t=null;return{add:function(n){e==0&&(t=CC())&&(EC(t,n),PC(t)),e++},remove:function(){e--,!e&&t&&(t.parentNode&&t.parentNode.removeChild(t),t=null)}}},AC=function(){var e=TC();return function(t,n){u.useEffect(function(){return e.add(t),function(){e.remove()}},[t&&n])}},ju=function(){var e=AC(),t=function(n){var r=n.styles,o=n.dynamic;return e(r,o),null};return t},NC={left:0,top:0,right:0,gap:0},Zs=function(e){return parseInt(e||"",10)||0},MC=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[Zs(n),Zs(r),Zs(o)]},IC=function(e){if(e===void 0&&(e="margin"),typeof window>"u")return NC;var t=MC(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])}},DC=ju(),on="data-scroll-locked",_C=function(e,t,n,r){var o=e.left,s=e.top,i=e.right,a=e.gap;return n===void 0&&(n="margin"),`
62
+ .`.concat(pC,` {
92
63
  overflow: hidden `).concat(r,`;
93
64
  padding-right: `).concat(a,"px ").concat(r,`;
94
65
  }
95
- body[`).concat(Cn,`] {
66
+ body[`).concat(on,`] {
96
67
  overflow: hidden `).concat(r,`;
97
68
  overscroll-behavior: contain;
98
69
  `).concat([t&&"position: relative ".concat(r,";"),n==="margin"&&`
@@ -105,38 +76,38 @@ React keys must be passed directly to JSX without using spread:
105
76
  `),n==="padding"&&"padding-right: ".concat(a,"px ").concat(r,";")].filter(Boolean).join(""),`
106
77
  }
107
78
 
108
- .`).concat(So,` {
79
+ .`).concat(Yr,` {
109
80
  right: `).concat(a,"px ").concat(r,`;
110
81
  }
111
82
 
112
- .`).concat(Co,` {
83
+ .`).concat(Xr,` {
113
84
  margin-right: `).concat(a,"px ").concat(r,`;
114
85
  }
115
86
 
116
- .`).concat(So," .").concat(So,` {
87
+ .`).concat(Yr," .").concat(Yr,` {
117
88
  right: 0 `).concat(r,`;
118
89
  }
119
90
 
120
- .`).concat(Co," .").concat(Co,` {
91
+ .`).concat(Xr," .").concat(Xr,` {
121
92
  margin-right: 0 `).concat(r,`;
122
93
  }
123
94
 
124
- body[`).concat(Cn,`] {
125
- `).concat(YC,": ").concat(a,`px;
95
+ body[`).concat(on,`] {
96
+ `).concat(hC,": ").concat(a,`px;
126
97
  }
127
- `)},yd=function(){var e=parseInt(document.body.getAttribute(Cn)||"0",10);return isFinite(e)?e:0},pE=function(){d.useEffect(function(){return document.body.setAttribute(Cn,(yd()+1).toString()),function(){var e=yd()-1;e<=0?document.body.removeAttribute(Cn):document.body.setAttribute(Cn,e.toString())}},[])},hE=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;pE();var s=d.useMemo(function(){return uE(o)},[o]);return d.createElement(dE,{styles:fE(s,!t,o,n?"":"!important")})},Pi=!1;if(typeof window<"u")try{var To=Object.defineProperty({},"passive",{get:function(){return Pi=!0,!0}});window.addEventListener("test",To,To),window.removeEventListener("test",To,To)}catch{Pi=!1}var En=Pi?{passive:!1}:!1,mE=function(e){return e.tagName==="TEXTAREA"},xd=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!mE(e)&&n[t]==="visible")},gE=function(e){return xd(e,"overflowY")},vE=function(e){return xd(e,"overflowX")},bd=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=wd(e,r);if(o){var s=Sd(e,r),i=s[1],a=s[2];if(i>a)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},yE=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},xE=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},wd=function(e,t){return e==="v"?gE(t):vE(t)},Sd=function(e,t){return e==="v"?yE(t):xE(t)},bE=function(e,t){return e==="h"&&t==="rtl"?-1:1},wE=function(e,t,n,r,o){var s=bE(e,window.getComputedStyle(t).direction),i=s*r,a=n.target,l=t.contains(a),c=!1,u=i>0,f=0,h=0;do{if(!a)break;var m=Sd(e,a),y=m[0],g=m[1],v=m[2],x=g-v-s*y;(y||x)&&wd(e,a)&&(f+=x,h+=y);var b=a.parentNode;a=b&&b.nodeType===Node.DOCUMENT_FRAGMENT_NODE?b.host:b}while(!l&&a!==document.body||l&&(t.contains(a)||t===a));return(u&&Math.abs(f)<1||!u&&Math.abs(h)<1)&&(c=!0),c},Po=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},Cd=function(e){return[e.deltaX,e.deltaY]},Ed=function(e){return e&&"current"in e?e.current:e},SE=function(e,t){return e[0]===t[0]&&e[1]===t[1]},CE=function(e){return`
98
+ `)},Uu=function(){var e=parseInt(document.body.getAttribute(on)||"0",10);return isFinite(e)?e:0},kC=function(){u.useEffect(function(){return document.body.setAttribute(on,(Uu()+1).toString()),function(){var e=Uu()-1;e<=0?document.body.removeAttribute(on):document.body.setAttribute(on,e.toString())}},[])},OC=function(e){var t=e.noRelative,n=e.noImportant,r=e.gapMode,o=r===void 0?"margin":r;kC();var s=u.useMemo(function(){return IC(o)},[o]);return u.createElement(DC,{styles:_C(s,!t,o,n?"":"!important")})},Js=!1;if(typeof window<"u")try{var Zr=Object.defineProperty({},"passive",{get:function(){return Js=!0,!0}});window.addEventListener("test",Zr,Zr),window.removeEventListener("test",Zr,Zr)}catch{Js=!1}var sn=Js?{passive:!1}:!1,LC=function(e){return e.tagName==="TEXTAREA"},Gu=function(e,t){if(!(e instanceof Element))return!1;var n=window.getComputedStyle(e);return n[t]!=="hidden"&&!(n.overflowY===n.overflowX&&!LC(e)&&n[t]==="visible")},VC=function(e){return Gu(e,"overflowY")},$C=function(e){return Gu(e,"overflowX")},Ku=function(e,t){var n=t.ownerDocument,r=t;do{typeof ShadowRoot<"u"&&r instanceof ShadowRoot&&(r=r.host);var o=Yu(e,r);if(o){var s=Xu(e,r),i=s[1],a=s[2];if(i>a)return!0}r=r.parentNode}while(r&&r!==n.body);return!1},FC=function(e){var t=e.scrollTop,n=e.scrollHeight,r=e.clientHeight;return[t,n,r]},RC=function(e){var t=e.scrollLeft,n=e.scrollWidth,r=e.clientWidth;return[t,n,r]},Yu=function(e,t){return e==="v"?VC(t):$C(t)},Xu=function(e,t){return e==="v"?FC(t):RC(t)},BC=function(e,t){return e==="h"&&t==="rtl"?-1:1},zC=function(e,t,n,r,o){var s=BC(e,window.getComputedStyle(t).direction),i=s*r,a=n.target,l=t.contains(a),c=!1,d=i>0,f=0,h=0;do{if(!a)break;var m=Xu(e,a),y=m[0],g=m[1],v=m[2],b=g-v-s*y;(y||b)&&Yu(e,a)&&(f+=b,h+=y);var w=a.parentNode;a=w&&w.nodeType===Node.DOCUMENT_FRAGMENT_NODE?w.host:w}while(!l&&a!==document.body||l&&(t.contains(a)||t===a));return(d&&Math.abs(f)<1||!d&&Math.abs(h)<1)&&(c=!0),c},Jr=function(e){return"changedTouches"in e?[e.changedTouches[0].clientX,e.changedTouches[0].clientY]:[0,0]},qu=function(e){return[e.deltaX,e.deltaY]},Zu=function(e){return e&&"current"in e?e.current:e},WC=function(e,t){return e[0]===t[0]&&e[1]===t[1]},HC=function(e){return`
128
99
  .block-interactivity-`.concat(e,` {pointer-events: none;}
129
100
  .allow-interactivity-`).concat(e,` {pointer-events: all;}
130
- `)},EE=0,Tn=[];function TE(e){var t=d.useRef([]),n=d.useRef([0,0]),r=d.useRef(),o=d.useState(EE++)[0],s=d.useState(vd)[0],i=d.useRef(e);d.useEffect(function(){i.current=e},[e]),d.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var g=GC([e.lockRef.current],(e.shards||[]).map(Ed),!0).filter(Boolean);return g.forEach(function(v){return v.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),g.forEach(function(v){return v.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var a=d.useCallback(function(g,v){if("touches"in g&&g.touches.length===2||g.type==="wheel"&&g.ctrlKey)return!i.current.allowPinchZoom;var x=Po(g),b=n.current,w="deltaX"in g?g.deltaX:b[0]-x[0],S="deltaY"in g?g.deltaY:b[1]-x[1],C,R=g.target,A=Math.abs(w)>Math.abs(S)?"h":"v";if("touches"in g&&A==="h"&&R.type==="range")return!1;var N=window.getSelection(),_=N&&N.anchorNode,k=_?_===R||_.contains(R):!1;if(k)return!1;var O=bd(A,R);if(!O)return!0;if(O?C=A:(C=A==="v"?"h":"v",O=bd(A,R)),!O)return!1;if(!r.current&&"changedTouches"in g&&(w||S)&&(r.current=C),!C)return!0;var L=r.current||C;return wE(L,v,g,L==="h"?w:S)},[]),l=d.useCallback(function(g){var v=g;if(!(!Tn.length||Tn[Tn.length-1]!==s)){var x="deltaY"in v?Cd(v):Po(v),b=t.current.filter(function(C){return C.name===v.type&&(C.target===v.target||v.target===C.shadowParent)&&SE(C.delta,x)})[0];if(b&&b.should){v.cancelable&&v.preventDefault();return}if(!b){var w=(i.current.shards||[]).map(Ed).filter(Boolean).filter(function(C){return C.contains(v.target)}),S=w.length>0?a(v,w[0]):!i.current.noIsolation;S&&v.cancelable&&v.preventDefault()}}},[]),c=d.useCallback(function(g,v,x,b){var w={name:g,delta:v,target:x,should:b,shadowParent:PE(x)};t.current.push(w),setTimeout(function(){t.current=t.current.filter(function(S){return S!==w})},1)},[]),u=d.useCallback(function(g){n.current=Po(g),r.current=void 0},[]),f=d.useCallback(function(g){c(g.type,Cd(g),g.target,a(g,e.lockRef.current))},[]),h=d.useCallback(function(g){c(g.type,Po(g),g.target,a(g,e.lockRef.current))},[]);d.useEffect(function(){return Tn.push(s),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:h}),document.addEventListener("wheel",l,En),document.addEventListener("touchmove",l,En),document.addEventListener("touchstart",u,En),function(){Tn=Tn.filter(function(g){return g!==s}),document.removeEventListener("wheel",l,En),document.removeEventListener("touchmove",l,En),document.removeEventListener("touchstart",u,En)}},[]);var m=e.removeScrollBar,y=e.inert;return d.createElement(d.Fragment,null,y?d.createElement(s,{styles:CE(o)}):null,m?d.createElement(hE,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function PE(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const RE=tE(gd,TE);var pr=d.forwardRef(function(e,t){return d.createElement(Eo,dt({},e,{ref:t,sideCar:RE}))});pr.classNames=Eo.classNames;var AE=[" ","Enter","ArrowUp","ArrowDown"],NE=[" ","Enter"],Kt="Select",[Ro,Ao,ME]=pn(Kt),[Pn]=Re(Kt,[ME,ut]),No=ut(),[_E,jt]=Pn(Kt),[jE,IE]=Pn(Kt),Td=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:s,value:i,defaultValue:a,onValueChange:l,dir:c,name:u,autoComplete:f,disabled:h,required:m,form:y}=e,g=No(t),[v,x]=d.useState(null),[b,w]=d.useState(null),[S,C]=d.useState(!1),R=Rt(c),[A,N]=_e({prop:r,defaultProp:o??!1,onChange:s,caller:Kt}),[_,k]=_e({prop:i,defaultProp:a,onChange:l,caller:Kt}),O=d.useRef(null),L=v?y||!!v.closest("form"):!0,[G,j]=d.useState(new Set),X=Array.from(G).map(U=>U.props.value).join(";");return p.jsx(xn,{...g,children:p.jsxs(_E,{required:m,scope:t,trigger:v,onTriggerChange:x,valueNode:b,onValueNodeChange:w,valueNodeHasChildren:S,onValueNodeHasChildrenChange:C,contentId:Se(),value:_,onValueChange:k,open:A,onOpenChange:N,dir:R,triggerPointerDownPosRef:O,disabled:h,children:[p.jsx(Ro.Provider,{scope:t,children:p.jsx(jE,{scope:e.__scopeSelect,onNativeOptionAdd:d.useCallback(U=>{j(z=>new Set(z).add(U))},[]),onNativeOptionRemove:d.useCallback(U=>{j(z=>{const V=new Set(z);return V.delete(U),V})},[]),children:n})}),L?p.jsxs(Yd,{"aria-hidden":!0,required:m,tabIndex:-1,name:u,autoComplete:f,value:_,onChange:U=>k(U.target.value),disabled:h,form:y,children:[_===void 0?p.jsx("option",{value:""}):null,Array.from(G)]},X):null]})})};Td.displayName=Kt;var Pd="SelectTrigger",Rd=d.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,s=No(n),i=jt(Pd,n),a=i.disabled||r,l=re(t,i.onTriggerChange),c=Ao(n),u=d.useRef("touch"),[f,h,m]=qd(g=>{const v=c().filter(w=>!w.disabled),x=v.find(w=>w.value===i.value),b=Zd(v,g,x);b!==void 0&&i.onValueChange(b.value)}),y=g=>{a||(i.onOpenChange(!0),m()),g&&(i.triggerPointerDownPosRef.current={x:Math.round(g.pageX),y:Math.round(g.pageY)})};return p.jsx(bn,{asChild:!0,...s,children:p.jsx(H.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":Xd(i.value)?"":void 0,...o,ref:l,onClick:D(o.onClick,g=>{g.currentTarget.focus(),u.current!=="mouse"&&y(g)}),onPointerDown:D(o.onPointerDown,g=>{u.current=g.pointerType;const v=g.target;v.hasPointerCapture(g.pointerId)&&v.releasePointerCapture(g.pointerId),g.button===0&&g.ctrlKey===!1&&g.pointerType==="mouse"&&(y(g),g.preventDefault())}),onKeyDown:D(o.onKeyDown,g=>{const v=f.current!=="";!(g.ctrlKey||g.altKey||g.metaKey)&&g.key.length===1&&h(g.key),!(v&&g.key===" ")&&AE.includes(g.key)&&(y(),g.preventDefault())})})})});Rd.displayName=Pd;var Ad="SelectValue",Nd=d.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:s,placeholder:i="",...a}=e,l=jt(Ad,n),{onValueNodeHasChildrenChange:c}=l,u=s!==void 0,f=re(t,l.onValueNodeChange);return we(()=>{c(u)},[c,u]),p.jsx(H.span,{...a,ref:f,style:{pointerEvents:"none"},children:Xd(l.value)?p.jsx(p.Fragment,{children:i}):s})});Nd.displayName=Ad;var DE="SelectIcon",Md=d.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return p.jsx(H.span,{"aria-hidden":!0,...o,ref:t,children:r||"▼"})});Md.displayName=DE;var kE="SelectPortal",_d=e=>p.jsx(wn,{asChild:!0,...e});_d.displayName=kE;var Yt="SelectContent",jd=d.forwardRef((e,t)=>{const n=jt(Yt,e.__scopeSelect),[r,o]=d.useState();if(we(()=>{o(new DocumentFragment)},[]),!n.open){const s=r;return s?Zn.createPortal(p.jsx(Id,{scope:e.__scopeSelect,children:p.jsx(Ro.Slot,{scope:e.__scopeSelect,children:p.jsx("div",{children:e.children})})}),s):null}return p.jsx(Dd,{...e,ref:t})});jd.displayName=Yt;var tt=10,[Id,It]=Pn(Yt),OE="SelectContentImpl",LE=kC("SelectContent.RemoveScroll"),Dd=d.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:s,onPointerDownOutside:i,side:a,sideOffset:l,align:c,alignOffset:u,arrowPadding:f,collisionBoundary:h,collisionPadding:m,sticky:y,hideWhenDetached:g,avoidCollisions:v,...x}=e,b=jt(Yt,n),[w,S]=d.useState(null),[C,R]=d.useState(null),A=re(t,W=>S(W)),[N,_]=d.useState(null),[k,O]=d.useState(null),L=Ao(n),[G,j]=d.useState(!1),X=d.useRef(!1);d.useEffect(()=>{if(w)return wo(w)},[w]),io();const U=d.useCallback(W=>{const[Q,...ee]=L().map(B=>B.ref.current),[ne]=ee.slice(-1),he=document.activeElement;for(const B of W)if(B===he||(B==null||B.scrollIntoView({block:"nearest"}),B===Q&&C&&(C.scrollTop=0),B===ne&&C&&(C.scrollTop=C.scrollHeight),B==null||B.focus(),document.activeElement!==he))return},[L,C]),z=d.useCallback(()=>U([N,w]),[U,N,w]);d.useEffect(()=>{G&&z()},[G,z]);const{onOpenChange:V,triggerPointerDownPosRef:$}=b;d.useEffect(()=>{if(w){let W={x:0,y:0};const Q=ne=>{var he,B;W={x:Math.abs(Math.round(ne.pageX)-(((he=$.current)==null?void 0:he.x)??0)),y:Math.abs(Math.round(ne.pageY)-(((B=$.current)==null?void 0:B.y)??0))}},ee=ne=>{W.x<=10&&W.y<=10?ne.preventDefault():w.contains(ne.target)||V(!1),document.removeEventListener("pointermove",Q),$.current=null};return $.current!==null&&(document.addEventListener("pointermove",Q),document.addEventListener("pointerup",ee,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",Q),document.removeEventListener("pointerup",ee,{capture:!0})}}},[w,V,$]),d.useEffect(()=>{const W=()=>V(!1);return window.addEventListener("blur",W),window.addEventListener("resize",W),()=>{window.removeEventListener("blur",W),window.removeEventListener("resize",W)}},[V]);const[oe,ie]=qd(W=>{const Q=L().filter(he=>!he.disabled),ee=Q.find(he=>he.ref.current===document.activeElement),ne=Zd(Q,W,ee);ne&&setTimeout(()=>ne.ref.current.focus())}),I=d.useCallback((W,Q,ee)=>{const ne=!X.current&&!ee;(b.value!==void 0&&b.value===Q||ne)&&(_(W),ne&&(X.current=!0))},[b.value]),Y=d.useCallback(()=>w==null?void 0:w.focus(),[w]),J=d.useCallback((W,Q,ee)=>{const ne=!X.current&&!ee;(b.value!==void 0&&b.value===Q||ne)&&O(W)},[b.value]),K=r==="popper"?Ri:kd,te=K===Ri?{side:a,sideOffset:l,align:c,alignOffset:u,arrowPadding:f,collisionBoundary:h,collisionPadding:m,sticky:y,hideWhenDetached:g,avoidCollisions:v}:{};return p.jsx(Id,{scope:n,content:w,viewport:C,onViewportChange:R,itemRefCallback:I,selectedItem:N,onItemLeave:Y,itemTextRefCallback:J,focusSelectedItem:z,selectedItemText:k,position:r,isPositioned:G,searchRef:oe,children:p.jsx(pr,{as:LE,allowPinchZoom:!0,children:p.jsx(ar,{asChild:!0,trapped:b.open,onMountAutoFocus:W=>{W.preventDefault()},onUnmountAutoFocus:D(o,W=>{var Q;(Q=b.trigger)==null||Q.focus({preventScroll:!0}),W.preventDefault()}),children:p.jsx(At,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:W=>W.preventDefault(),onDismiss:()=>b.onOpenChange(!1),children:p.jsx(K,{role:"listbox",id:b.contentId,"data-state":b.open?"open":"closed",dir:b.dir,onContextMenu:W=>W.preventDefault(),...x,...te,onPlaced:()=>j(!0),ref:A,style:{display:"flex",flexDirection:"column",outline:"none",...x.style},onKeyDown:D(x.onKeyDown,W=>{const Q=W.ctrlKey||W.altKey||W.metaKey;if(W.key==="Tab"&&W.preventDefault(),!Q&&W.key.length===1&&ie(W.key),["ArrowUp","ArrowDown","Home","End"].includes(W.key)){let ne=L().filter(he=>!he.disabled).map(he=>he.ref.current);if(["ArrowUp","End"].includes(W.key)&&(ne=ne.slice().reverse()),["ArrowUp","ArrowDown"].includes(W.key)){const he=W.target,B=ne.indexOf(he);ne=ne.slice(B+1)}setTimeout(()=>U(ne)),W.preventDefault()}})})})})})})});Dd.displayName=OE;var VE="SelectItemAlignedPosition",kd=d.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,s=jt(Yt,n),i=It(Yt,n),[a,l]=d.useState(null),[c,u]=d.useState(null),f=re(t,A=>u(A)),h=Ao(n),m=d.useRef(!1),y=d.useRef(!0),{viewport:g,selectedItem:v,selectedItemText:x,focusSelectedItem:b}=i,w=d.useCallback(()=>{if(s.trigger&&s.valueNode&&a&&c&&g&&v&&x){const A=s.trigger.getBoundingClientRect(),N=c.getBoundingClientRect(),_=s.valueNode.getBoundingClientRect(),k=x.getBoundingClientRect();if(s.dir!=="rtl"){const he=k.left-N.left,B=_.left-he,Z=A.left-B,de=A.width+Z,je=Math.max(de,N.width),Me=window.innerWidth-tt,Oe=ir(B,[tt,Math.max(tt,Me-je)]);a.style.minWidth=de+"px",a.style.left=Oe+"px"}else{const he=N.right-k.right,B=window.innerWidth-_.right-he,Z=window.innerWidth-A.right-B,de=A.width+Z,je=Math.max(de,N.width),Me=window.innerWidth-tt,Oe=ir(B,[tt,Math.max(tt,Me-je)]);a.style.minWidth=de+"px",a.style.right=Oe+"px"}const O=h(),L=window.innerHeight-tt*2,G=g.scrollHeight,j=window.getComputedStyle(c),X=parseInt(j.borderTopWidth,10),U=parseInt(j.paddingTop,10),z=parseInt(j.borderBottomWidth,10),V=parseInt(j.paddingBottom,10),$=X+U+G+V+z,oe=Math.min(v.offsetHeight*5,$),ie=window.getComputedStyle(g),I=parseInt(ie.paddingTop,10),Y=parseInt(ie.paddingBottom,10),J=A.top+A.height/2-tt,K=L-J,te=v.offsetHeight/2,W=v.offsetTop+te,Q=X+U+W,ee=$-Q;if(Q<=J){const he=O.length>0&&v===O[O.length-1].ref.current;a.style.bottom="0px";const B=c.clientHeight-g.offsetTop-g.offsetHeight,Z=Math.max(K,te+(he?Y:0)+B+z),de=Q+Z;a.style.height=de+"px"}else{const he=O.length>0&&v===O[0].ref.current;a.style.top="0px";const Z=Math.max(J,X+g.offsetTop+(he?I:0)+te)+ee;a.style.height=Z+"px",g.scrollTop=Q-J+g.offsetTop}a.style.margin=`${tt}px 0`,a.style.minHeight=oe+"px",a.style.maxHeight=L+"px",r==null||r(),requestAnimationFrame(()=>m.current=!0)}},[h,s.trigger,s.valueNode,a,c,g,v,x,s.dir,r]);we(()=>w(),[w]);const[S,C]=d.useState();we(()=>{c&&C(window.getComputedStyle(c).zIndex)},[c]);const R=d.useCallback(A=>{A&&y.current===!0&&(w(),b==null||b(),y.current=!1)},[w,b]);return p.jsx(FE,{scope:n,contentWrapper:a,shouldExpandOnScrollRef:m,onScrollButtonChange:R,children:p.jsx("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:S},children:p.jsx(H.div,{...o,ref:f,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});kd.displayName=VE;var $E="SelectPopperPosition",Ri=d.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=tt,...s}=e,i=No(n);return p.jsx(dr,{...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)"}})});Ri.displayName=$E;var[FE,Ai]=Pn(Yt,{}),Ni="SelectViewport",Od=d.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...o}=e,s=It(Ni,n),i=Ai(Ni,n),a=re(t,s.onViewportChange),l=d.useRef(0);return p.jsxs(p.Fragment,{children:[p.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}),p.jsx(Ro.Slot,{scope:n,children:p.jsx(H.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:a,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:D(o.onScroll,c=>{const u=c.currentTarget,{contentWrapper:f,shouldExpandOnScrollRef:h}=i;if(h!=null&&h.current&&f){const m=Math.abs(l.current-u.scrollTop);if(m>0){const y=window.innerHeight-tt*2,g=parseFloat(f.style.minHeight),v=parseFloat(f.style.height),x=Math.max(g,v);if(x<y){const b=x+m,w=Math.min(y,b),S=b-w;f.style.height=w+"px",f.style.bottom==="0px"&&(u.scrollTop=S>0?S:0,f.style.justifyContent="flex-end")}}}l.current=u.scrollTop})})})]})});Od.displayName=Ni;var Ld="SelectGroup",[BE,WE]=Pn(Ld),Vd=d.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=Se();return p.jsx(BE,{scope:n,id:o,children:p.jsx(H.div,{role:"group","aria-labelledby":o,...r,ref:t})})});Vd.displayName=Ld;var $d="SelectLabel",Fd=d.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=WE($d,n);return p.jsx(H.div,{id:o.id,...r,ref:t})});Fd.displayName=$d;var Mo="SelectItem",[zE,Bd]=Pn(Mo),Wd=d.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:s,...i}=e,a=jt(Mo,n),l=It(Mo,n),c=a.value===r,[u,f]=d.useState(s??""),[h,m]=d.useState(!1),y=re(t,b=>{var w;return(w=l.itemRefCallback)==null?void 0:w.call(l,b,r,o)}),g=Se(),v=d.useRef("touch"),x=()=>{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 p.jsx(zE,{scope:n,value:r,disabled:o,textId:g,isSelected:c,onItemTextChange:d.useCallback(b=>{f(w=>w||((b==null?void 0:b.textContent)??"").trim())},[]),children:p.jsx(Ro.ItemSlot,{scope:n,value:r,disabled:o,textValue:u,children:p.jsx(H.div,{role:"option","aria-labelledby":g,"data-highlighted":h?"":void 0,"aria-selected":c&&h,"data-state":c?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...i,ref:y,onFocus:D(i.onFocus,()=>m(!0)),onBlur:D(i.onBlur,()=>m(!1)),onClick:D(i.onClick,()=>{v.current!=="mouse"&&x()}),onPointerUp:D(i.onPointerUp,()=>{v.current==="mouse"&&x()}),onPointerDown:D(i.onPointerDown,b=>{v.current=b.pointerType}),onPointerMove:D(i.onPointerMove,b=>{var w;v.current=b.pointerType,o?(w=l.onItemLeave)==null||w.call(l):v.current==="mouse"&&b.currentTarget.focus({preventScroll:!0})}),onPointerLeave:D(i.onPointerLeave,b=>{var w;b.currentTarget===document.activeElement&&((w=l.onItemLeave)==null||w.call(l))}),onKeyDown:D(i.onKeyDown,b=>{var S;((S=l.searchRef)==null?void 0:S.current)!==""&&b.key===" "||(NE.includes(b.key)&&x(),b.key===" "&&b.preventDefault())})})})})});Wd.displayName=Mo;var hr="SelectItemText",zd=d.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,...s}=e,i=jt(hr,n),a=It(hr,n),l=Bd(hr,n),c=IE(hr,n),[u,f]=d.useState(null),h=re(t,x=>f(x),l.onItemTextChange,x=>{var b;return(b=a.itemTextRefCallback)==null?void 0:b.call(a,x,l.value,l.disabled)}),m=u==null?void 0:u.textContent,y=d.useMemo(()=>p.jsx("option",{value:l.value,disabled:l.disabled,children:m},l.value),[l.disabled,l.value,m]),{onNativeOptionAdd:g,onNativeOptionRemove:v}=c;return we(()=>(g(y),()=>v(y)),[g,v,y]),p.jsxs(p.Fragment,{children:[p.jsx(H.span,{id:l.textId,...s,ref:h}),l.isSelected&&i.valueNode&&!i.valueNodeHasChildren?Zn.createPortal(s.children,i.valueNode):null]})});zd.displayName=hr;var Hd="SelectItemIndicator",Ud=d.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return Bd(Hd,n).isSelected?p.jsx(H.span,{"aria-hidden":!0,...r,ref:t}):null});Ud.displayName=Hd;var Mi="SelectScrollUpButton",HE=d.forwardRef((e,t)=>{const n=It(Mi,e.__scopeSelect),r=Ai(Mi,e.__scopeSelect),[o,s]=d.useState(!1),i=re(t,r.onScrollButtonChange);return we(()=>{if(n.viewport&&n.isPositioned){let a=function(){const c=l.scrollTop>0;s(c)};const l=n.viewport;return a(),l.addEventListener("scroll",a),()=>l.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),o?p.jsx(Gd,{...e,ref:i,onAutoScroll:()=>{const{viewport:a,selectedItem:l}=n;a&&l&&(a.scrollTop=a.scrollTop-l.offsetHeight)}}):null});HE.displayName=Mi;var _i="SelectScrollDownButton",UE=d.forwardRef((e,t)=>{const n=It(_i,e.__scopeSelect),r=Ai(_i,e.__scopeSelect),[o,s]=d.useState(!1),i=re(t,r.onScrollButtonChange);return we(()=>{if(n.viewport&&n.isPositioned){let a=function(){const c=l.scrollHeight-l.clientHeight,u=Math.ceil(l.scrollTop)<c;s(u)};const l=n.viewport;return a(),l.addEventListener("scroll",a),()=>l.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),o?p.jsx(Gd,{...e,ref:i,onAutoScroll:()=>{const{viewport:a,selectedItem:l}=n;a&&l&&(a.scrollTop=a.scrollTop+l.offsetHeight)}}):null});UE.displayName=_i;var Gd=d.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,s=It("SelectScrollButton",n),i=d.useRef(null),a=Ao(n),l=d.useCallback(()=>{i.current!==null&&(window.clearInterval(i.current),i.current=null)},[]);return d.useEffect(()=>()=>l(),[l]),we(()=>{var u;const c=a().find(f=>f.ref.current===document.activeElement);(u=c==null?void 0:c.ref.current)==null||u.scrollIntoView({block:"nearest"})},[a]),p.jsx(H.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:D(o.onPointerDown,()=>{i.current===null&&(i.current=window.setInterval(r,50))}),onPointerMove:D(o.onPointerMove,()=>{var c;(c=s.onItemLeave)==null||c.call(s),i.current===null&&(i.current=window.setInterval(r,50))}),onPointerLeave:D(o.onPointerLeave,()=>{l()})})}),GE="SelectSeparator",Kd=d.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return p.jsx(H.div,{"aria-hidden":!0,...r,ref:t})});Kd.displayName=GE;var ji="SelectArrow",KE=d.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=No(n),s=jt(ji,n),i=It(ji,n);return s.open&&i.position==="popper"?p.jsx(fr,{...o,...r,ref:t}):null});KE.displayName=ji;var YE="SelectBubbleInput",Yd=d.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const o=d.useRef(null),s=re(r,o),i=rr(t);return d.useEffect(()=>{const a=o.current;if(!a)return;const l=window.HTMLSelectElement.prototype,u=Object.getOwnPropertyDescriptor(l,"value").set;if(i!==t&&u){const f=new Event("change",{bubbles:!0});u.call(a,t),a.dispatchEvent(f)}},[i,t]),p.jsx(H.select,{...n,style:{...dd,...n.style},ref:s,defaultValue:t})});Yd.displayName=YE;function Xd(e){return e===""||e===void 0}function qd(e){const t=xe(e),n=d.useRef(""),r=d.useRef(0),o=d.useCallback(i=>{const a=n.current+i;t(a),function l(c){n.current=c,window.clearTimeout(r.current),c!==""&&(r.current=window.setTimeout(()=>l(""),1e3))}(a)},[t]),s=d.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return d.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,o,s]}function Zd(e,t,n){const o=t.length>1&&Array.from(t).every(c=>c===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let i=XE(e,Math.max(s,0));o.length===1&&(i=i.filter(c=>c!==n));const l=i.find(c=>c.textValue.toLowerCase().startsWith(o.toLowerCase()));return l!==n?l:void 0}function XE(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var qE=Td,Jd=Rd,ZE=Nd,JE=Md,QE=_d,Qd=jd,eT=Od,tT=Vd,ef=Fd,tf=Wd,nT=zd,rT=Ud,nf=Kd;const oT=qE,sT=tT,iT=ZE,rf=d.forwardRef(({className:e,children:t,...n},r)=>p.jsxs(Jd,{ref:r,className:M("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",e),...n,children:[t,p.jsx(JE,{asChild:!0,children:p.jsx(zc,{className:"h-4 w-4 opacity-50"})})]}));rf.displayName=Jd.displayName;const of=d.forwardRef(({className:e,children:t,position:n="popper",...r},o)=>p.jsx(QE,{children:p.jsx(Qd,{ref:o,className:M("relative z-50 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:p.jsx(eT,{className:M("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t})})}));of.displayName=Qd.displayName;const sf=d.forwardRef(({className:e,...t},n)=>p.jsx(ef,{ref:n,className:M("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}));sf.displayName=ef.displayName;const af=d.forwardRef(({className:e,children:t,...n},r)=>p.jsxs(tf,{ref:r,className:M("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:[p.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:p.jsx(rT,{children:p.jsx(Zs,{className:"h-4 w-4"})})}),p.jsx(nT,{children:t})]}));af.displayName=tf.displayName;const lf=d.forwardRef(({className:e,...t},n)=>p.jsx(nf,{ref:n,className:M("-mx-1 my-1 h-px bg-muted",e),...t}));lf.displayName=nf.displayName;var cf=["PageUp","PageDown"],uf=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],df={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},Rn="Slider",[Ii,aT,lT]=pn(Rn),[ff]=Re(Rn,[lT]),[cT,_o]=ff(Rn),pf=d.forwardRef((e,t)=>{const{name:n,min:r=0,max:o=100,step:s=1,orientation:i="horizontal",disabled:a=!1,minStepsBetweenThumbs:l=0,defaultValue:c=[r],value:u,onValueChange:f=()=>{},onValueCommit:h=()=>{},inverted:m=!1,form:y,...g}=e,v=d.useRef(new Set),x=d.useRef(0),w=i==="horizontal"?uT:dT,[S=[],C]=_e({prop:u,defaultProp:c,onChange:O=>{var G;(G=[...v.current][x.current])==null||G.focus(),f(O)}}),R=d.useRef(S);function A(O){const L=gT(S,O);k(O,L)}function N(O){k(O,x.current)}function _(){const O=R.current[x.current];S[x.current]!==O&&h(S)}function k(O,L,{commit:G}={commit:!1}){const j=bT(s),X=wT(Math.round((O-r)/s)*s+r,j),U=ir(X,[r,o]);C((z=[])=>{const V=hT(z,U,L);if(xT(V,l*s)){x.current=V.indexOf(U);const $=String(V)!==String(z);return $&&G&&h(V),$?V:z}else return z})}return p.jsx(cT,{scope:e.__scopeSlider,name:n,disabled:a,min:r,max:o,valueIndexToChangeRef:x,thumbs:v.current,values:S,orientation:i,form:y,children:p.jsx(Ii.Provider,{scope:e.__scopeSlider,children:p.jsx(Ii.Slot,{scope:e.__scopeSlider,children:p.jsx(w,{"aria-disabled":a,"data-disabled":a?"":void 0,...g,ref:t,onPointerDown:D(g.onPointerDown,()=>{a||(R.current=S)}),min:r,max:o,inverted:m,onSlideStart:a?void 0:A,onSlideMove:a?void 0:N,onSlideEnd:a?void 0:_,onHomeKeyDown:()=>!a&&k(r,0,{commit:!0}),onEndKeyDown:()=>!a&&k(o,S.length-1,{commit:!0}),onStepKeyDown:({event:O,direction:L})=>{if(!a){const X=cf.includes(O.key)||O.shiftKey&&uf.includes(O.key)?10:1,U=x.current,z=S[U],V=s*X*L;k(z+V,U,{commit:!0})}}})})})})});pf.displayName=Rn;var[hf,mf]=ff(Rn,{startEdge:"left",endEdge:"right",size:"width",direction:1}),uT=d.forwardRef((e,t)=>{const{min:n,max:r,dir:o,inverted:s,onSlideStart:i,onSlideMove:a,onSlideEnd:l,onStepKeyDown:c,...u}=e,[f,h]=d.useState(null),m=re(t,w=>h(w)),y=d.useRef(void 0),g=Rt(o),v=g==="ltr",x=v&&!s||!v&&s;function b(w){const S=y.current||f.getBoundingClientRect(),C=[0,S.width],A=Oi(C,x?[n,r]:[r,n]);return y.current=S,A(w-S.left)}return p.jsx(hf,{scope:e.__scopeSlider,startEdge:x?"left":"right",endEdge:x?"right":"left",direction:x?1:-1,size:"width",children:p.jsx(gf,{dir:g,"data-orientation":"horizontal",...u,ref:m,style:{...u.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:w=>{const S=b(w.clientX);i==null||i(S)},onSlideMove:w=>{const S=b(w.clientX);a==null||a(S)},onSlideEnd:()=>{y.current=void 0,l==null||l()},onStepKeyDown:w=>{const C=df[x?"from-left":"from-right"].includes(w.key);c==null||c({event:w,direction:C?-1:1})}})})}),dT=d.forwardRef((e,t)=>{const{min:n,max:r,inverted:o,onSlideStart:s,onSlideMove:i,onSlideEnd:a,onStepKeyDown:l,...c}=e,u=d.useRef(null),f=re(t,u),h=d.useRef(void 0),m=!o;function y(g){const v=h.current||u.current.getBoundingClientRect(),x=[0,v.height],w=Oi(x,m?[r,n]:[n,r]);return h.current=v,w(g-v.top)}return p.jsx(hf,{scope:e.__scopeSlider,startEdge:m?"bottom":"top",endEdge:m?"top":"bottom",size:"height",direction:m?1:-1,children:p.jsx(gf,{"data-orientation":"vertical",...c,ref:f,style:{...c.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:g=>{const v=y(g.clientY);s==null||s(v)},onSlideMove:g=>{const v=y(g.clientY);i==null||i(v)},onSlideEnd:()=>{h.current=void 0,a==null||a()},onStepKeyDown:g=>{const x=df[m?"from-bottom":"from-top"].includes(g.key);l==null||l({event:g,direction:x?-1:1})}})})}),gf=d.forwardRef((e,t)=>{const{__scopeSlider:n,onSlideStart:r,onSlideMove:o,onSlideEnd:s,onHomeKeyDown:i,onEndKeyDown:a,onStepKeyDown:l,...c}=e,u=_o(Rn,n);return p.jsx(H.span,{...c,ref:t,onKeyDown:D(e.onKeyDown,f=>{f.key==="Home"?(i(f),f.preventDefault()):f.key==="End"?(a(f),f.preventDefault()):cf.concat(uf).includes(f.key)&&(l(f),f.preventDefault())}),onPointerDown:D(e.onPointerDown,f=>{const h=f.target;h.setPointerCapture(f.pointerId),f.preventDefault(),u.thumbs.has(h)?h.focus():r(f)}),onPointerMove:D(e.onPointerMove,f=>{f.target.hasPointerCapture(f.pointerId)&&o(f)}),onPointerUp:D(e.onPointerUp,f=>{const h=f.target;h.hasPointerCapture(f.pointerId)&&(h.releasePointerCapture(f.pointerId),s(f))})})}),vf="SliderTrack",yf=d.forwardRef((e,t)=>{const{__scopeSlider:n,...r}=e,o=_o(vf,n);return p.jsx(H.span,{"data-disabled":o.disabled?"":void 0,"data-orientation":o.orientation,...r,ref:t})});yf.displayName=vf;var Di="SliderRange",xf=d.forwardRef((e,t)=>{const{__scopeSlider:n,...r}=e,o=_o(Di,n),s=mf(Di,n),i=d.useRef(null),a=re(t,i),l=o.values.length,c=o.values.map(h=>Sf(h,o.min,o.max)),u=l>1?Math.min(...c):0,f=100-Math.max(...c);return p.jsx(H.span,{"data-orientation":o.orientation,"data-disabled":o.disabled?"":void 0,...r,ref:a,style:{...e.style,[s.startEdge]:u+"%",[s.endEdge]:f+"%"}})});xf.displayName=Di;var ki="SliderThumb",bf=d.forwardRef((e,t)=>{const n=aT(e.__scopeSlider),[r,o]=d.useState(null),s=re(t,a=>o(a)),i=d.useMemo(()=>r?n().findIndex(a=>a.ref.current===r):-1,[n,r]);return p.jsx(fT,{...e,ref:s,index:i})}),fT=d.forwardRef((e,t)=>{const{__scopeSlider:n,index:r,name:o,...s}=e,i=_o(ki,n),a=mf(ki,n),[l,c]=d.useState(null),u=re(t,b=>c(b)),f=l?i.form||!!l.closest("form"):!0,h=or(l),m=i.values[r],y=m===void 0?0:Sf(m,i.min,i.max),g=mT(r,i.values.length),v=h==null?void 0:h[a.size],x=v?vT(v,y,a.direction):0;return d.useEffect(()=>{if(l)return i.thumbs.add(l),()=>{i.thumbs.delete(l)}},[l,i.thumbs]),p.jsxs("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[a.startEdge]:`calc(${y}% + ${x}px)`},children:[p.jsx(Ii.ItemSlot,{scope:e.__scopeSlider,children:p.jsx(H.span,{role:"slider","aria-label":e["aria-label"]||g,"aria-valuemin":i.min,"aria-valuenow":m,"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:m===void 0?{display:"none"}:e.style,onFocus:D(e.onFocus,()=>{i.valueIndexToChangeRef.current=r})})}),f&&p.jsx(wf,{name:o??(i.name?i.name+(i.values.length>1?"[]":""):void 0),form:i.form,value:m},r)]})});bf.displayName=ki;var pT="RadioBubbleInput",wf=d.forwardRef(({__scopeSlider:e,value:t,...n},r)=>{const o=d.useRef(null),s=re(o,r),i=rr(t);return d.useEffect(()=>{const a=o.current;if(!a)return;const l=window.HTMLInputElement.prototype,u=Object.getOwnPropertyDescriptor(l,"value").set;if(i!==t&&u){const f=new Event("input",{bubbles:!0});u.call(a,t),a.dispatchEvent(f)}},[i,t]),p.jsx(H.input,{style:{display:"none"},...n,ref:s,defaultValue:t})});wf.displayName=pT;function hT(e=[],t,n){const r=[...e];return r[n]=t,r.sort((o,s)=>o-s)}function Sf(e,t,n){const s=100/(n-t)*(e-t);return ir(s,[0,100])}function mT(e,t){return t>2?`Value ${e+1} of ${t}`:t===2?["Minimum","Maximum"][e]:void 0}function gT(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 vT(e,t,n){const r=e/2,s=Oi([0,50],[0,r]);return(r-s(t)*n)*n}function yT(e){return e.slice(0,-1).map((t,n)=>e[n+1]-t)}function xT(e,t){if(t>0){const n=yT(e);return Math.min(...n)>=t}return!0}function Oi(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 bT(e){return(String(e).split(".")[1]||"").length}function wT(e,t){const n=Math.pow(10,t);return Math.round(e*n)/n}var Cf=pf,ST=yf,CT=xf,ET=bf;const Ef=d.forwardRef(({className:e,...t},n)=>p.jsxs(Cf,{ref:n,className:M("relative flex w-full touch-none select-none items-center",e),...t,children:[p.jsx(ST,{className:"relative h-2 w-full grow overflow-hidden rounded-full bg-secondary",children:p.jsx(CT,{className:"absolute h-full bg-primary"})}),p.jsx(ET,{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"})]}));Ef.displayName=Cf.displayName;const TT=fn("relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"}},defaultVariants:{variant:"default"}}),Tf=d.forwardRef(({className:e,variant:t,...n},r)=>p.jsx("div",{ref:r,role:"alert",className:M(TT({variant:t}),e),...n}));Tf.displayName="Alert";const Pf=d.forwardRef(({className:e,...t},n)=>p.jsx("h5",{ref:n,className:M("mb-1 font-medium leading-none tracking-tight",e),...t}));Pf.displayName="AlertTitle";const Rf=d.forwardRef(({className:e,...t},n)=>p.jsx("div",{ref:n,className:M("text-sm [&_p]:leading-relaxed",e),...t}));Rf.displayName="AlertDescription";function PT(e){const t=RT(e),n=d.forwardRef((r,o)=>{const{children:s,...i}=r,a=d.Children.toArray(s),l=a.find(NT);if(l){const c=l.props.children,u=a.map(f=>f===l?d.Children.count(c)>1?d.Children.only(null):d.isValidElement(c)?c.props.children:null:f);return p.jsx(t,{...i,ref:o,children:d.isValidElement(c)?d.cloneElement(c,void 0,u):null})}return p.jsx(t,{...i,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}function RT(e){const t=d.forwardRef((n,r)=>{const{children:o,...s}=n;if(d.isValidElement(o)){const i=_T(o),a=MT(s,o.props);return o.type!==d.Fragment&&(a.ref=r?Ve(r,i):i),d.cloneElement(o,a)}return d.Children.count(o)>1?d.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var AT=Symbol("radix.slottable");function NT(e){return d.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===AT}function MT(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 l=s(...a);return o(...a),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function _T(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 jo="Dialog",[Af]=Re(jo),[jT,nt]=Af(jo),Nf=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:s,modal:i=!0}=e,a=d.useRef(null),l=d.useRef(null),[c,u]=_e({prop:r,defaultProp:o??!1,onChange:s,caller:jo});return p.jsx(jT,{scope:t,triggerRef:a,contentRef:l,contentId:Se(),titleId:Se(),descriptionId:Se(),open:c,onOpenChange:u,onOpenToggle:d.useCallback(()=>u(f=>!f),[u]),modal:i,children:n})};Nf.displayName=jo;var Mf="DialogTrigger",_f=d.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=nt(Mf,n),s=re(t,o.triggerRef);return p.jsx(H.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":$i(o.open),...r,ref:s,onClick:D(e.onClick,o.onOpenToggle)})});_f.displayName=Mf;var Li="DialogPortal",[IT,jf]=Af(Li,{forceMount:void 0}),If=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,s=nt(Li,t);return p.jsx(IT,{scope:t,forceMount:n,children:d.Children.map(r,i=>p.jsx(Te,{present:n||s.open,children:p.jsx(wn,{asChild:!0,container:o,children:i})}))})};If.displayName=Li;var Io="DialogOverlay",Df=d.forwardRef((e,t)=>{const n=jf(Io,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,s=nt(Io,e.__scopeDialog);return s.modal?p.jsx(Te,{present:r||s.open,children:p.jsx(kT,{...o,ref:t})}):null});Df.displayName=Io;var DT=PT("DialogOverlay.RemoveScroll"),kT=d.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=nt(Io,n);return p.jsx(pr,{as:DT,allowPinchZoom:!0,shards:[o.contentRef],children:p.jsx(H.div,{"data-state":$i(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),Xt="DialogContent",kf=d.forwardRef((e,t)=>{const n=jf(Xt,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,s=nt(Xt,e.__scopeDialog);return p.jsx(Te,{present:r||s.open,children:s.modal?p.jsx(OT,{...o,ref:t}):p.jsx(LT,{...o,ref:t})})});kf.displayName=Xt;var OT=d.forwardRef((e,t)=>{const n=nt(Xt,e.__scopeDialog),r=d.useRef(null),o=re(t,n.contentRef,r);return d.useEffect(()=>{const s=r.current;if(s)return wo(s)},[]),p.jsx(Of,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:D(e.onCloseAutoFocus,s=>{var i;s.preventDefault(),(i=n.triggerRef.current)==null||i.focus()}),onPointerDownOutside:D(e.onPointerDownOutside,s=>{const i=s.detail.originalEvent,a=i.button===0&&i.ctrlKey===!0;(i.button===2||a)&&s.preventDefault()}),onFocusOutside:D(e.onFocusOutside,s=>s.preventDefault())})}),LT=d.forwardRef((e,t)=>{const n=nt(Xt,e.__scopeDialog),r=d.useRef(!1),o=d.useRef(!1);return p.jsx(Of,{...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 l,c;(l=e.onInteractOutside)==null||l.call(e,s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const i=s.target;((c=n.triggerRef.current)==null?void 0:c.contains(i))&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&o.current&&s.preventDefault()}})}),Of=d.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:s,...i}=e,a=nt(Xt,n),l=d.useRef(null),c=re(t,l);return io(),p.jsxs(p.Fragment,{children:[p.jsx(ar,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:s,children:p.jsx(At,{role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":$i(a.open),...i,ref:c,onDismiss:()=>a.onOpenChange(!1)})}),p.jsxs(p.Fragment,{children:[p.jsx(VT,{titleId:a.titleId}),p.jsx(FT,{contentRef:l,descriptionId:a.descriptionId})]})]})}),Vi="DialogTitle",Lf=d.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=nt(Vi,n);return p.jsx(H.h2,{id:o.titleId,...r,ref:t})});Lf.displayName=Vi;var Vf="DialogDescription",$f=d.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=nt(Vf,n);return p.jsx(H.p,{id:o.descriptionId,...r,ref:t})});$f.displayName=Vf;var Ff="DialogClose",Bf=d.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=nt(Ff,n);return p.jsx(H.button,{type:"button",...r,ref:t,onClick:D(e.onClick,()=>o.onOpenChange(!1))})});Bf.displayName=Ff;function $i(e){return e?"open":"closed"}var Wf="DialogTitleWarning",[Fk,zf]=Zw(Wf,{contentName:Xt,titleName:Vi,docsSlug:"dialog"}),VT=({titleId:e})=>{const t=zf(Wf),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
101
+ `)},jC=0,an=[];function UC(e){var t=u.useRef([]),n=u.useRef([0,0]),r=u.useRef(),o=u.useState(jC++)[0],s=u.useState(ju)[0],i=u.useRef(e);u.useEffect(function(){i.current=e},[e]),u.useEffect(function(){if(e.inert){document.body.classList.add("block-interactivity-".concat(o));var g=fC([e.lockRef.current],(e.shards||[]).map(Zu),!0).filter(Boolean);return g.forEach(function(v){return v.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),g.forEach(function(v){return v.classList.remove("allow-interactivity-".concat(o))})}}},[e.inert,e.lockRef.current,e.shards]);var a=u.useCallback(function(g,v){if("touches"in g&&g.touches.length===2||g.type==="wheel"&&g.ctrlKey)return!i.current.allowPinchZoom;var b=Jr(g),w=n.current,x="deltaX"in g?g.deltaX:w[0]-b[0],S="deltaY"in g?g.deltaY:w[1]-b[1],C,T=g.target,A=Math.abs(x)>Math.abs(S)?"h":"v";if("touches"in g&&A==="h"&&T.type==="range")return!1;var N=window.getSelection(),I=N&&N.anchorNode,O=I?I===T||I.contains(T):!1;if(O)return!1;var L=Ku(A,T);if(!L)return!0;if(L?C=A:(C=A==="v"?"h":"v",L=Ku(A,T)),!L)return!1;if(!r.current&&"changedTouches"in g&&(x||S)&&(r.current=C),!C)return!0;var V=r.current||C;return zC(V,v,g,V==="h"?x:S)},[]),l=u.useCallback(function(g){var v=g;if(!(!an.length||an[an.length-1]!==s)){var b="deltaY"in v?qu(v):Jr(v),w=t.current.filter(function(C){return C.name===v.type&&(C.target===v.target||v.target===C.shadowParent)&&WC(C.delta,b)})[0];if(w&&w.should){v.cancelable&&v.preventDefault();return}if(!w){var x=(i.current.shards||[]).map(Zu).filter(Boolean).filter(function(C){return C.contains(v.target)}),S=x.length>0?a(v,x[0]):!i.current.noIsolation;S&&v.cancelable&&v.preventDefault()}}},[]),c=u.useCallback(function(g,v,b,w){var x={name:g,delta:v,target:b,should:w,shadowParent:GC(b)};t.current.push(x),setTimeout(function(){t.current=t.current.filter(function(S){return S!==x})},1)},[]),d=u.useCallback(function(g){n.current=Jr(g),r.current=void 0},[]),f=u.useCallback(function(g){c(g.type,qu(g),g.target,a(g,e.lockRef.current))},[]),h=u.useCallback(function(g){c(g.type,Jr(g),g.target,a(g,e.lockRef.current))},[]);u.useEffect(function(){return an.push(s),e.setCallbacks({onScrollCapture:f,onWheelCapture:f,onTouchMoveCapture:h}),document.addEventListener("wheel",l,sn),document.addEventListener("touchmove",l,sn),document.addEventListener("touchstart",d,sn),function(){an=an.filter(function(g){return g!==s}),document.removeEventListener("wheel",l,sn),document.removeEventListener("touchmove",l,sn),document.removeEventListener("touchstart",d,sn)}},[]);var m=e.removeScrollBar,y=e.inert;return u.createElement(u.Fragment,null,y?u.createElement(s,{styles:HC(o)}):null,m?u.createElement(OC,{noRelative:e.noRelative,gapMode:e.gapMode}):null)}function GC(e){for(var t=null;e!==null;)e instanceof ShadowRoot&&(t=e.host,e=e.host),e=e.parentNode;return t}const KC=xC(Hu,UC);var Bn=u.forwardRef(function(e,t){return u.createElement(qr,Ze({},e,{ref:t,sideCar:KC}))});Bn.classNames=qr.classNames;var YC=[" ","Enter","ArrowUp","ArrowDown"],XC=[" ","Enter"],_t="Select",[Qr,eo,qC]=Yt(_t),[ln]=ye(_t,[qC,qe]),to=qe(),[ZC,bt]=ln(_t),[JC,QC]=ln(_t),Ju=e=>{const{__scopeSelect:t,children:n,open:r,defaultOpen:o,onOpenChange:s,value:i,defaultValue:a,onValueChange:l,dir:c,name:d,autoComplete:f,disabled:h,required:m,form:y}=e,g=to(t),[v,b]=u.useState(null),[w,x]=u.useState(null),[S,C]=u.useState(!1),T=ht(c),[A,N]=we({prop:r,defaultProp:o??!1,onChange:s,caller:_t}),[I,O]=we({prop:i,defaultProp:a,onChange:l,caller:_t}),L=u.useRef(null),V=v?y||!!v.closest("form"):!0,[U,_]=u.useState(new Set),K=Array.from(U).map(H=>H.props.value).join(";");return p.jsx(en,{...g,children:p.jsxs(ZC,{required:m,scope:t,trigger:v,onTriggerChange:b,valueNode:w,onValueNodeChange:x,valueNodeHasChildren:S,onValueNodeHasChildrenChange:C,contentId:he(),value:I,onValueChange:O,open:A,onOpenChange:N,dir:T,triggerPointerDownPosRef:L,disabled:h,children:[p.jsx(Qr.Provider,{scope:t,children:p.jsx(JC,{scope:e.__scopeSelect,onNativeOptionAdd:u.useCallback(H=>{_(B=>new Set(B).add(H))},[]),onNativeOptionRemove:u.useCallback(H=>{_(B=>{const $=new Set(B);return $.delete(H),$})},[]),children:n})}),V?p.jsxs(xd,{"aria-hidden":!0,required:m,tabIndex:-1,name:d,autoComplete:f,value:I,onChange:H=>O(H.target.value),disabled:h,form:y,children:[I===void 0?p.jsx("option",{value:""}):null,Array.from(U)]},K):null]})})};Ju.displayName=_t;var Qu="SelectTrigger",ed=u.forwardRef((e,t)=>{const{__scopeSelect:n,disabled:r=!1,...o}=e,s=to(n),i=bt(Qu,n),a=i.disabled||r,l=J(t,i.onTriggerChange),c=eo(n),d=u.useRef("touch"),[f,h,m]=Cd(g=>{const v=c().filter(x=>!x.disabled),b=v.find(x=>x.value===i.value),w=Ed(v,g,b);w!==void 0&&i.onValueChange(w.value)}),y=g=>{a||(i.onOpenChange(!0),m()),g&&(i.triggerPointerDownPosRef.current={x:Math.round(g.pageX),y:Math.round(g.pageY)})};return p.jsx(tn,{asChild:!0,...s,children:p.jsx(W.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":Sd(i.value)?"":void 0,...o,ref:l,onClick:k(o.onClick,g=>{g.currentTarget.focus(),d.current!=="mouse"&&y(g)}),onPointerDown:k(o.onPointerDown,g=>{d.current=g.pointerType;const v=g.target;v.hasPointerCapture(g.pointerId)&&v.releasePointerCapture(g.pointerId),g.button===0&&g.ctrlKey===!1&&g.pointerType==="mouse"&&(y(g),g.preventDefault())}),onKeyDown:k(o.onKeyDown,g=>{const v=f.current!=="";!(g.ctrlKey||g.altKey||g.metaKey)&&g.key.length===1&&h(g.key),!(v&&g.key===" ")&&YC.includes(g.key)&&(y(),g.preventDefault())})})})});ed.displayName=Qu;var td="SelectValue",nd=u.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,children:s,placeholder:i="",...a}=e,l=bt(td,n),{onValueNodeHasChildrenChange:c}=l,d=s!==void 0,f=J(t,l.onValueNodeChange);return pe(()=>{c(d)},[c,d]),p.jsx(W.span,{...a,ref:f,style:{pointerEvents:"none"},children:Sd(l.value)?p.jsx(p.Fragment,{children:i}):s})});nd.displayName=td;var eE="SelectIcon",rd=u.forwardRef((e,t)=>{const{__scopeSelect:n,children:r,...o}=e;return p.jsx(W.span,{"aria-hidden":!0,...o,ref:t,children:r||"▼"})});rd.displayName=eE;var tE="SelectPortal",od=e=>p.jsx(nn,{asChild:!0,...e});od.displayName=tE;var kt="SelectContent",sd=u.forwardRef((e,t)=>{const n=bt(kt,e.__scopeSelect),[r,o]=u.useState();if(pe(()=>{o(new DocumentFragment)},[]),!n.open){const s=r;return s?Tn.createPortal(p.jsx(id,{scope:e.__scopeSelect,children:p.jsx(Qr.Slot,{scope:e.__scopeSelect,children:p.jsx("div",{children:e.children})})}),s):null}return p.jsx(ad,{...e,ref:t})});sd.displayName=kt;var Be=10,[id,wt]=ln(kt),nE="SelectContentImpl",rE=tC("SelectContent.RemoveScroll"),ad=u.forwardRef((e,t)=>{const{__scopeSelect:n,position:r="item-aligned",onCloseAutoFocus:o,onEscapeKeyDown:s,onPointerDownOutside:i,side:a,sideOffset:l,align:c,alignOffset:d,arrowPadding:f,collisionBoundary:h,collisionPadding:m,sticky:y,hideWhenDetached:g,avoidCollisions:v,...b}=e,w=bt(kt,n),[x,S]=u.useState(null),[C,T]=u.useState(null),A=J(t,z=>S(z)),[N,I]=u.useState(null),[O,L]=u.useState(null),V=eo(n),[U,_]=u.useState(!1),K=u.useRef(!1);u.useEffect(()=>{if(x)return Kr(x)},[x]),kr();const H=u.useCallback(z=>{const[Z,...q]=V().map(R=>R.ref.current),[ee]=q.slice(-1),le=document.activeElement;for(const R of z)if(R===le||(R==null||R.scrollIntoView({block:"nearest"}),R===Z&&C&&(C.scrollTop=0),R===ee&&C&&(C.scrollTop=C.scrollHeight),R==null||R.focus(),document.activeElement!==le))return},[V,C]),B=u.useCallback(()=>H([N,x]),[H,N,x]);u.useEffect(()=>{U&&B()},[U,B]);const{onOpenChange:$,triggerPointerDownPosRef:F}=w;u.useEffect(()=>{if(x){let z={x:0,y:0};const Z=ee=>{var le,R;z={x:Math.abs(Math.round(ee.pageX)-(((le=F.current)==null?void 0:le.x)??0)),y:Math.abs(Math.round(ee.pageY)-(((R=F.current)==null?void 0:R.y)??0))}},q=ee=>{z.x<=10&&z.y<=10?ee.preventDefault():x.contains(ee.target)||$(!1),document.removeEventListener("pointermove",Z),F.current=null};return F.current!==null&&(document.addEventListener("pointermove",Z),document.addEventListener("pointerup",q,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",Z),document.removeEventListener("pointerup",q,{capture:!0})}}},[x,$,F]),u.useEffect(()=>{const z=()=>$(!1);return window.addEventListener("blur",z),window.addEventListener("resize",z),()=>{window.removeEventListener("blur",z),window.removeEventListener("resize",z)}},[$]);const[ne,re]=Cd(z=>{const Z=V().filter(le=>!le.disabled),q=Z.find(le=>le.ref.current===document.activeElement),ee=Ed(Z,z,q);ee&&setTimeout(()=>ee.ref.current.focus())}),D=u.useCallback((z,Z,q)=>{const ee=!K.current&&!q;(w.value!==void 0&&w.value===Z||ee)&&(I(z),ee&&(K.current=!0))},[w.value]),G=u.useCallback(()=>x==null?void 0:x.focus(),[x]),X=u.useCallback((z,Z,q)=>{const ee=!K.current&&!q;(w.value!==void 0&&w.value===Z||ee)&&L(z)},[w.value]),j=r==="popper"?Qs:ld,Q=j===Qs?{side:a,sideOffset:l,align:c,alignOffset:d,arrowPadding:f,collisionBoundary:h,collisionPadding:m,sticky:y,hideWhenDetached:g,avoidCollisions:v}:{};return p.jsx(id,{scope:n,content:x,viewport:C,onViewportChange:T,itemRefCallback:D,selectedItem:N,onItemLeave:G,itemTextRefCallback:X,focusSelectedItem:B,selectedItemText:O,position:r,isPositioned:U,searchRef:ne,children:p.jsx(Bn,{as:rE,allowPinchZoom:!0,children:p.jsx(On,{asChild:!0,trapped:w.open,onMountAutoFocus:z=>{z.preventDefault()},onUnmountAutoFocus:k(o,z=>{var Z;(Z=w.trigger)==null||Z.focus({preventScroll:!0}),z.preventDefault()}),children:p.jsx(mt,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:z=>z.preventDefault(),onDismiss:()=>w.onOpenChange(!1),children:p.jsx(j,{role:"listbox",id:w.contentId,"data-state":w.open?"open":"closed",dir:w.dir,onContextMenu:z=>z.preventDefault(),...b,...Q,onPlaced:()=>_(!0),ref:A,style:{display:"flex",flexDirection:"column",outline:"none",...b.style},onKeyDown:k(b.onKeyDown,z=>{const Z=z.ctrlKey||z.altKey||z.metaKey;if(z.key==="Tab"&&z.preventDefault(),!Z&&z.key.length===1&&re(z.key),["ArrowUp","ArrowDown","Home","End"].includes(z.key)){let ee=V().filter(le=>!le.disabled).map(le=>le.ref.current);if(["ArrowUp","End"].includes(z.key)&&(ee=ee.slice().reverse()),["ArrowUp","ArrowDown"].includes(z.key)){const le=z.target,R=ee.indexOf(le);ee=ee.slice(R+1)}setTimeout(()=>H(ee)),z.preventDefault()}})})})})})})});ad.displayName=nE;var oE="SelectItemAlignedPosition",ld=u.forwardRef((e,t)=>{const{__scopeSelect:n,onPlaced:r,...o}=e,s=bt(kt,n),i=wt(kt,n),[a,l]=u.useState(null),[c,d]=u.useState(null),f=J(t,A=>d(A)),h=eo(n),m=u.useRef(!1),y=u.useRef(!0),{viewport:g,selectedItem:v,selectedItemText:b,focusSelectedItem:w}=i,x=u.useCallback(()=>{if(s.trigger&&s.valueNode&&a&&c&&g&&v&&b){const A=s.trigger.getBoundingClientRect(),N=c.getBoundingClientRect(),I=s.valueNode.getBoundingClientRect(),O=b.getBoundingClientRect();if(s.dir!=="rtl"){const le=O.left-N.left,R=I.left-le,Y=A.left-R,ae=A.width+Y,Ie=Math.max(ae,N.width),De=window.innerWidth-Be,_e=kn(R,[Be,Math.max(Be,De-Ie)]);a.style.minWidth=ae+"px",a.style.left=_e+"px"}else{const le=N.right-O.right,R=window.innerWidth-I.right-le,Y=window.innerWidth-A.right-R,ae=A.width+Y,Ie=Math.max(ae,N.width),De=window.innerWidth-Be,_e=kn(R,[Be,Math.max(Be,De-Ie)]);a.style.minWidth=ae+"px",a.style.right=_e+"px"}const L=h(),V=window.innerHeight-Be*2,U=g.scrollHeight,_=window.getComputedStyle(c),K=parseInt(_.borderTopWidth,10),H=parseInt(_.paddingTop,10),B=parseInt(_.borderBottomWidth,10),$=parseInt(_.paddingBottom,10),F=K+H+U+$+B,ne=Math.min(v.offsetHeight*5,F),re=window.getComputedStyle(g),D=parseInt(re.paddingTop,10),G=parseInt(re.paddingBottom,10),X=A.top+A.height/2-Be,j=V-X,Q=v.offsetHeight/2,z=v.offsetTop+Q,Z=K+H+z,q=F-Z;if(Z<=X){const le=L.length>0&&v===L[L.length-1].ref.current;a.style.bottom="0px";const R=c.clientHeight-g.offsetTop-g.offsetHeight,Y=Math.max(j,Q+(le?G:0)+R+B),ae=Z+Y;a.style.height=ae+"px"}else{const le=L.length>0&&v===L[0].ref.current;a.style.top="0px";const Y=Math.max(X,K+g.offsetTop+(le?D:0)+Q)+q;a.style.height=Y+"px",g.scrollTop=Z-X+g.offsetTop}a.style.margin=`${Be}px 0`,a.style.minHeight=ne+"px",a.style.maxHeight=V+"px",r==null||r(),requestAnimationFrame(()=>m.current=!0)}},[h,s.trigger,s.valueNode,a,c,g,v,b,s.dir,r]);pe(()=>x(),[x]);const[S,C]=u.useState();pe(()=>{c&&C(window.getComputedStyle(c).zIndex)},[c]);const T=u.useCallback(A=>{A&&y.current===!0&&(x(),w==null||w(),y.current=!1)},[x,w]);return p.jsx(iE,{scope:n,contentWrapper:a,shouldExpandOnScrollRef:m,onScrollButtonChange:T,children:p.jsx("div",{ref:l,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:S},children:p.jsx(W.div,{...o,ref:f,style:{boxSizing:"border-box",maxHeight:"100%",...o.style}})})})});ld.displayName=oE;var sE="SelectPopperPosition",Qs=u.forwardRef((e,t)=>{const{__scopeSelect:n,align:r="start",collisionPadding:o=Be,...s}=e,i=to(n);return p.jsx(Fn,{...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)"}})});Qs.displayName=sE;var[iE,ei]=ln(kt,{}),ti="SelectViewport",cd=u.forwardRef((e,t)=>{const{__scopeSelect:n,nonce:r,...o}=e,s=wt(ti,n),i=ei(ti,n),a=J(t,s.onViewportChange),l=u.useRef(0);return p.jsxs(p.Fragment,{children:[p.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}),p.jsx(Qr.Slot,{scope:n,children:p.jsx(W.div,{"data-radix-select-viewport":"",role:"presentation",...o,ref:a,style:{position:"relative",flex:1,overflow:"hidden auto",...o.style},onScroll:k(o.onScroll,c=>{const d=c.currentTarget,{contentWrapper:f,shouldExpandOnScrollRef:h}=i;if(h!=null&&h.current&&f){const m=Math.abs(l.current-d.scrollTop);if(m>0){const y=window.innerHeight-Be*2,g=parseFloat(f.style.minHeight),v=parseFloat(f.style.height),b=Math.max(g,v);if(b<y){const w=b+m,x=Math.min(y,w),S=w-x;f.style.height=x+"px",f.style.bottom==="0px"&&(d.scrollTop=S>0?S:0,f.style.justifyContent="flex-end")}}}l.current=d.scrollTop})})})]})});cd.displayName=ti;var ud="SelectGroup",[aE,lE]=ln(ud),dd=u.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=he();return p.jsx(aE,{scope:n,id:o,children:p.jsx(W.div,{role:"group","aria-labelledby":o,...r,ref:t})})});dd.displayName=ud;var fd="SelectLabel",pd=u.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=lE(fd,n);return p.jsx(W.div,{id:o.id,...r,ref:t})});pd.displayName=fd;var no="SelectItem",[cE,hd]=ln(no),md=u.forwardRef((e,t)=>{const{__scopeSelect:n,value:r,disabled:o=!1,textValue:s,...i}=e,a=bt(no,n),l=wt(no,n),c=a.value===r,[d,f]=u.useState(s??""),[h,m]=u.useState(!1),y=J(t,w=>{var x;return(x=l.itemRefCallback)==null?void 0:x.call(l,w,r,o)}),g=he(),v=u.useRef("touch"),b=()=>{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 p.jsx(cE,{scope:n,value:r,disabled:o,textId:g,isSelected:c,onItemTextChange:u.useCallback(w=>{f(x=>x||((w==null?void 0:w.textContent)??"").trim())},[]),children:p.jsx(Qr.ItemSlot,{scope:n,value:r,disabled:o,textValue:d,children:p.jsx(W.div,{role:"option","aria-labelledby":g,"data-highlighted":h?"":void 0,"aria-selected":c&&h,"data-state":c?"checked":"unchecked","aria-disabled":o||void 0,"data-disabled":o?"":void 0,tabIndex:o?void 0:-1,...i,ref:y,onFocus:k(i.onFocus,()=>m(!0)),onBlur:k(i.onBlur,()=>m(!1)),onClick:k(i.onClick,()=>{v.current!=="mouse"&&b()}),onPointerUp:k(i.onPointerUp,()=>{v.current==="mouse"&&b()}),onPointerDown:k(i.onPointerDown,w=>{v.current=w.pointerType}),onPointerMove:k(i.onPointerMove,w=>{var x;v.current=w.pointerType,o?(x=l.onItemLeave)==null||x.call(l):v.current==="mouse"&&w.currentTarget.focus({preventScroll:!0})}),onPointerLeave:k(i.onPointerLeave,w=>{var x;w.currentTarget===document.activeElement&&((x=l.onItemLeave)==null||x.call(l))}),onKeyDown:k(i.onKeyDown,w=>{var S;((S=l.searchRef)==null?void 0:S.current)!==""&&w.key===" "||(XC.includes(w.key)&&b(),w.key===" "&&w.preventDefault())})})})})});md.displayName=no;var zn="SelectItemText",gd=u.forwardRef((e,t)=>{const{__scopeSelect:n,className:r,style:o,...s}=e,i=bt(zn,n),a=wt(zn,n),l=hd(zn,n),c=QC(zn,n),[d,f]=u.useState(null),h=J(t,b=>f(b),l.onItemTextChange,b=>{var w;return(w=a.itemTextRefCallback)==null?void 0:w.call(a,b,l.value,l.disabled)}),m=d==null?void 0:d.textContent,y=u.useMemo(()=>p.jsx("option",{value:l.value,disabled:l.disabled,children:m},l.value),[l.disabled,l.value,m]),{onNativeOptionAdd:g,onNativeOptionRemove:v}=c;return pe(()=>(g(y),()=>v(y)),[g,v,y]),p.jsxs(p.Fragment,{children:[p.jsx(W.span,{id:l.textId,...s,ref:h}),l.isSelected&&i.valueNode&&!i.valueNodeHasChildren?Tn.createPortal(s.children,i.valueNode):null]})});gd.displayName=zn;var vd="SelectItemIndicator",yd=u.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return hd(vd,n).isSelected?p.jsx(W.span,{"aria-hidden":!0,...r,ref:t}):null});yd.displayName=vd;var ni="SelectScrollUpButton",uE=u.forwardRef((e,t)=>{const n=wt(ni,e.__scopeSelect),r=ei(ni,e.__scopeSelect),[o,s]=u.useState(!1),i=J(t,r.onScrollButtonChange);return pe(()=>{if(n.viewport&&n.isPositioned){let a=function(){const c=l.scrollTop>0;s(c)};const l=n.viewport;return a(),l.addEventListener("scroll",a),()=>l.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),o?p.jsx(bd,{...e,ref:i,onAutoScroll:()=>{const{viewport:a,selectedItem:l}=n;a&&l&&(a.scrollTop=a.scrollTop-l.offsetHeight)}}):null});uE.displayName=ni;var ri="SelectScrollDownButton",dE=u.forwardRef((e,t)=>{const n=wt(ri,e.__scopeSelect),r=ei(ri,e.__scopeSelect),[o,s]=u.useState(!1),i=J(t,r.onScrollButtonChange);return pe(()=>{if(n.viewport&&n.isPositioned){let a=function(){const c=l.scrollHeight-l.clientHeight,d=Math.ceil(l.scrollTop)<c;s(d)};const l=n.viewport;return a(),l.addEventListener("scroll",a),()=>l.removeEventListener("scroll",a)}},[n.viewport,n.isPositioned]),o?p.jsx(bd,{...e,ref:i,onAutoScroll:()=>{const{viewport:a,selectedItem:l}=n;a&&l&&(a.scrollTop=a.scrollTop+l.offsetHeight)}}):null});dE.displayName=ri;var bd=u.forwardRef((e,t)=>{const{__scopeSelect:n,onAutoScroll:r,...o}=e,s=wt("SelectScrollButton",n),i=u.useRef(null),a=eo(n),l=u.useCallback(()=>{i.current!==null&&(window.clearInterval(i.current),i.current=null)},[]);return u.useEffect(()=>()=>l(),[l]),pe(()=>{var d;const c=a().find(f=>f.ref.current===document.activeElement);(d=c==null?void 0:c.ref.current)==null||d.scrollIntoView({block:"nearest"})},[a]),p.jsx(W.div,{"aria-hidden":!0,...o,ref:t,style:{flexShrink:0,...o.style},onPointerDown:k(o.onPointerDown,()=>{i.current===null&&(i.current=window.setInterval(r,50))}),onPointerMove:k(o.onPointerMove,()=>{var c;(c=s.onItemLeave)==null||c.call(s),i.current===null&&(i.current=window.setInterval(r,50))}),onPointerLeave:k(o.onPointerLeave,()=>{l()})})}),fE="SelectSeparator",wd=u.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e;return p.jsx(W.div,{"aria-hidden":!0,...r,ref:t})});wd.displayName=fE;var oi="SelectArrow",pE=u.forwardRef((e,t)=>{const{__scopeSelect:n,...r}=e,o=to(n),s=bt(oi,n),i=wt(oi,n);return s.open&&i.position==="popper"?p.jsx(Rn,{...o,...r,ref:t}):null});pE.displayName=oi;var hE="SelectBubbleInput",xd=u.forwardRef(({__scopeSelect:e,value:t,...n},r)=>{const o=u.useRef(null),s=J(r,o),i=In(t);return u.useEffect(()=>{const a=o.current;if(!a)return;const l=window.HTMLSelectElement.prototype,d=Object.getOwnPropertyDescriptor(l,"value").set;if(i!==t&&d){const f=new Event("change",{bubbles:!0});d.call(a,t),a.dispatchEvent(f)}},[i,t]),p.jsx(W.select,{...n,style:{...Fu,...n.style},ref:s,defaultValue:t})});xd.displayName=hE;function Sd(e){return e===""||e===void 0}function Cd(e){const t=de(e),n=u.useRef(""),r=u.useRef(0),o=u.useCallback(i=>{const a=n.current+i;t(a),function l(c){n.current=c,window.clearTimeout(r.current),c!==""&&(r.current=window.setTimeout(()=>l(""),1e3))}(a)},[t]),s=u.useCallback(()=>{n.current="",window.clearTimeout(r.current)},[]);return u.useEffect(()=>()=>window.clearTimeout(r.current),[]),[n,o,s]}function Ed(e,t,n){const o=t.length>1&&Array.from(t).every(c=>c===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let i=mE(e,Math.max(s,0));o.length===1&&(i=i.filter(c=>c!==n));const l=i.find(c=>c.textValue.toLowerCase().startsWith(o.toLowerCase()));return l!==n?l:void 0}function mE(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var gE=Ju,Pd=ed,vE=nd,yE=rd,bE=od,Td=sd,wE=cd,xE=dd,Ad=pd,Nd=md,SE=gd,CE=yd,Md=wd;const EE=gE,PE=xE,TE=vE,Id=u.forwardRef(({className:e,children:t,...n},r)=>p.jsxs(Pd,{ref:r,className:M("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",e),...n,children:[t,p.jsx(yE,{asChild:!0,children:p.jsx(gc,{className:"h-4 w-4 opacity-50"})})]}));Id.displayName=Pd.displayName;const Dd=u.forwardRef(({className:e,children:t,position:n="popper",...r},o)=>p.jsx(bE,{children:p.jsx(Td,{ref:o,className:M("relative z-50 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:p.jsx(wE,{className:M("p-1",n==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t})})}));Dd.displayName=Td.displayName;const _d=u.forwardRef(({className:e,...t},n)=>p.jsx(Ad,{ref:n,className:M("py-1.5 pl-8 pr-2 text-sm font-semibold",e),...t}));_d.displayName=Ad.displayName;const kd=u.forwardRef(({className:e,children:t,...n},r)=>p.jsxs(Nd,{ref:r,className:M("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:[p.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:p.jsx(CE,{children:p.jsx(Cs,{className:"h-4 w-4"})})}),p.jsx(SE,{children:t})]}));kd.displayName=Nd.displayName;const Od=u.forwardRef(({className:e,...t},n)=>p.jsx(Md,{ref:n,className:M("-mx-1 my-1 h-px bg-muted",e),...t}));Od.displayName=Md.displayName;var Ld=["PageUp","PageDown"],Vd=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],$d={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},cn="Slider",[si,AE,NE]=Yt(cn),[Fd]=ye(cn,[NE]),[ME,ro]=Fd(cn),Rd=u.forwardRef((e,t)=>{const{name:n,min:r=0,max:o=100,step:s=1,orientation:i="horizontal",disabled:a=!1,minStepsBetweenThumbs:l=0,defaultValue:c=[r],value:d,onValueChange:f=()=>{},onValueCommit:h=()=>{},inverted:m=!1,form:y,...g}=e,v=u.useRef(new Set),b=u.useRef(0),x=i==="horizontal"?IE:DE,[S=[],C]=we({prop:d,defaultProp:c,onChange:L=>{var U;(U=[...v.current][b.current])==null||U.focus(),f(L)}}),T=u.useRef(S);function A(L){const V=VE(S,L);O(L,V)}function N(L){O(L,b.current)}function I(){const L=T.current[b.current];S[b.current]!==L&&h(S)}function O(L,V,{commit:U}={commit:!1}){const _=BE(s),K=zE(Math.round((L-r)/s)*s+r,_),H=kn(K,[r,o]);C((B=[])=>{const $=OE(B,H,V);if(RE($,l*s)){b.current=$.indexOf(H);const F=String($)!==String(B);return F&&U&&h($),F?$:B}else return B})}return p.jsx(ME,{scope:e.__scopeSlider,name:n,disabled:a,min:r,max:o,valueIndexToChangeRef:b,thumbs:v.current,values:S,orientation:i,form:y,children:p.jsx(si.Provider,{scope:e.__scopeSlider,children:p.jsx(si.Slot,{scope:e.__scopeSlider,children:p.jsx(x,{"aria-disabled":a,"data-disabled":a?"":void 0,...g,ref:t,onPointerDown:k(g.onPointerDown,()=>{a||(T.current=S)}),min:r,max:o,inverted:m,onSlideStart:a?void 0:A,onSlideMove:a?void 0:N,onSlideEnd:a?void 0:I,onHomeKeyDown:()=>!a&&O(r,0,{commit:!0}),onEndKeyDown:()=>!a&&O(o,S.length-1,{commit:!0}),onStepKeyDown:({event:L,direction:V})=>{if(!a){const K=Ld.includes(L.key)||L.shiftKey&&Vd.includes(L.key)?10:1,H=b.current,B=S[H],$=s*K*V;O(B+$,H,{commit:!0})}}})})})})});Rd.displayName=cn;var[Bd,zd]=Fd(cn,{startEdge:"left",endEdge:"right",size:"width",direction:1}),IE=u.forwardRef((e,t)=>{const{min:n,max:r,dir:o,inverted:s,onSlideStart:i,onSlideMove:a,onSlideEnd:l,onStepKeyDown:c,...d}=e,[f,h]=u.useState(null),m=J(t,x=>h(x)),y=u.useRef(void 0),g=ht(o),v=g==="ltr",b=v&&!s||!v&&s;function w(x){const S=y.current||f.getBoundingClientRect(),C=[0,S.width],A=li(C,b?[n,r]:[r,n]);return y.current=S,A(x-S.left)}return p.jsx(Bd,{scope:e.__scopeSlider,startEdge:b?"left":"right",endEdge:b?"right":"left",direction:b?1:-1,size:"width",children:p.jsx(Wd,{dir:g,"data-orientation":"horizontal",...d,ref:m,style:{...d.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:x=>{const S=w(x.clientX);i==null||i(S)},onSlideMove:x=>{const S=w(x.clientX);a==null||a(S)},onSlideEnd:()=>{y.current=void 0,l==null||l()},onStepKeyDown:x=>{const C=$d[b?"from-left":"from-right"].includes(x.key);c==null||c({event:x,direction:C?-1:1})}})})}),DE=u.forwardRef((e,t)=>{const{min:n,max:r,inverted:o,onSlideStart:s,onSlideMove:i,onSlideEnd:a,onStepKeyDown:l,...c}=e,d=u.useRef(null),f=J(t,d),h=u.useRef(void 0),m=!o;function y(g){const v=h.current||d.current.getBoundingClientRect(),b=[0,v.height],x=li(b,m?[r,n]:[n,r]);return h.current=v,x(g-v.top)}return p.jsx(Bd,{scope:e.__scopeSlider,startEdge:m?"bottom":"top",endEdge:m?"top":"bottom",size:"height",direction:m?1:-1,children:p.jsx(Wd,{"data-orientation":"vertical",...c,ref:f,style:{...c.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:g=>{const v=y(g.clientY);s==null||s(v)},onSlideMove:g=>{const v=y(g.clientY);i==null||i(v)},onSlideEnd:()=>{h.current=void 0,a==null||a()},onStepKeyDown:g=>{const b=$d[m?"from-bottom":"from-top"].includes(g.key);l==null||l({event:g,direction:b?-1:1})}})})}),Wd=u.forwardRef((e,t)=>{const{__scopeSlider:n,onSlideStart:r,onSlideMove:o,onSlideEnd:s,onHomeKeyDown:i,onEndKeyDown:a,onStepKeyDown:l,...c}=e,d=ro(cn,n);return p.jsx(W.span,{...c,ref:t,onKeyDown:k(e.onKeyDown,f=>{f.key==="Home"?(i(f),f.preventDefault()):f.key==="End"?(a(f),f.preventDefault()):Ld.concat(Vd).includes(f.key)&&(l(f),f.preventDefault())}),onPointerDown:k(e.onPointerDown,f=>{const h=f.target;h.setPointerCapture(f.pointerId),f.preventDefault(),d.thumbs.has(h)?h.focus():r(f)}),onPointerMove:k(e.onPointerMove,f=>{f.target.hasPointerCapture(f.pointerId)&&o(f)}),onPointerUp:k(e.onPointerUp,f=>{const h=f.target;h.hasPointerCapture(f.pointerId)&&(h.releasePointerCapture(f.pointerId),s(f))})})}),Hd="SliderTrack",jd=u.forwardRef((e,t)=>{const{__scopeSlider:n,...r}=e,o=ro(Hd,n);return p.jsx(W.span,{"data-disabled":o.disabled?"":void 0,"data-orientation":o.orientation,...r,ref:t})});jd.displayName=Hd;var ii="SliderRange",Ud=u.forwardRef((e,t)=>{const{__scopeSlider:n,...r}=e,o=ro(ii,n),s=zd(ii,n),i=u.useRef(null),a=J(t,i),l=o.values.length,c=o.values.map(h=>Yd(h,o.min,o.max)),d=l>1?Math.min(...c):0,f=100-Math.max(...c);return p.jsx(W.span,{"data-orientation":o.orientation,"data-disabled":o.disabled?"":void 0,...r,ref:a,style:{...e.style,[s.startEdge]:d+"%",[s.endEdge]:f+"%"}})});Ud.displayName=ii;var ai="SliderThumb",Gd=u.forwardRef((e,t)=>{const n=AE(e.__scopeSlider),[r,o]=u.useState(null),s=J(t,a=>o(a)),i=u.useMemo(()=>r?n().findIndex(a=>a.ref.current===r):-1,[n,r]);return p.jsx(_E,{...e,ref:s,index:i})}),_E=u.forwardRef((e,t)=>{const{__scopeSlider:n,index:r,name:o,...s}=e,i=ro(ai,n),a=zd(ai,n),[l,c]=u.useState(null),d=J(t,w=>c(w)),f=l?i.form||!!l.closest("form"):!0,h=Dn(l),m=i.values[r],y=m===void 0?0:Yd(m,i.min,i.max),g=LE(r,i.values.length),v=h==null?void 0:h[a.size],b=v?$E(v,y,a.direction):0;return u.useEffect(()=>{if(l)return i.thumbs.add(l),()=>{i.thumbs.delete(l)}},[l,i.thumbs]),p.jsxs("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[a.startEdge]:`calc(${y}% + ${b}px)`},children:[p.jsx(si.ItemSlot,{scope:e.__scopeSlider,children:p.jsx(W.span,{role:"slider","aria-label":e["aria-label"]||g,"aria-valuemin":i.min,"aria-valuenow":m,"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:d,style:m===void 0?{display:"none"}:e.style,onFocus:k(e.onFocus,()=>{i.valueIndexToChangeRef.current=r})})}),f&&p.jsx(Kd,{name:o??(i.name?i.name+(i.values.length>1?"[]":""):void 0),form:i.form,value:m},r)]})});Gd.displayName=ai;var kE="RadioBubbleInput",Kd=u.forwardRef(({__scopeSlider:e,value:t,...n},r)=>{const o=u.useRef(null),s=J(o,r),i=In(t);return u.useEffect(()=>{const a=o.current;if(!a)return;const l=window.HTMLInputElement.prototype,d=Object.getOwnPropertyDescriptor(l,"value").set;if(i!==t&&d){const f=new Event("input",{bubbles:!0});d.call(a,t),a.dispatchEvent(f)}},[i,t]),p.jsx(W.input,{style:{display:"none"},...n,ref:s,defaultValue:t})});Kd.displayName=kE;function OE(e=[],t,n){const r=[...e];return r[n]=t,r.sort((o,s)=>o-s)}function Yd(e,t,n){const s=100/(n-t)*(e-t);return kn(s,[0,100])}function LE(e,t){return t>2?`Value ${e+1} of ${t}`:t===2?["Minimum","Maximum"][e]:void 0}function VE(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 $E(e,t,n){const r=e/2,s=li([0,50],[0,r]);return(r-s(t)*n)*n}function FE(e){return e.slice(0,-1).map((t,n)=>e[n+1]-t)}function RE(e,t){if(t>0){const n=FE(e);return Math.min(...n)>=t}return!0}function li(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 BE(e){return(String(e).split(".")[1]||"").length}function zE(e,t){const n=Math.pow(10,t);return Math.round(e*n)/n}var Xd=Rd,WE=jd,HE=Ud,jE=Gd;const qd=u.forwardRef(({className:e,...t},n)=>p.jsxs(Xd,{ref:n,className:M("relative flex w-full touch-none select-none items-center",e),...t,children:[p.jsx(WE,{className:"relative h-2 w-full grow overflow-hidden rounded-full bg-secondary",children:p.jsx(HE,{className:"absolute h-full bg-primary"})}),p.jsx(jE,{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"})]}));qd.displayName=Xd.displayName;const UE=Kt("relative w-full rounded-lg border p-4 [&>svg~*]:pl-7 [&>svg+div]:translate-y-[-3px] [&>svg]:absolute [&>svg]:left-4 [&>svg]:top-4 [&>svg]:text-foreground",{variants:{variant:{default:"bg-background text-foreground",destructive:"border-destructive/50 text-destructive dark:border-destructive [&>svg]:text-destructive"}},defaultVariants:{variant:"default"}}),Zd=u.forwardRef(({className:e,variant:t,...n},r)=>p.jsx("div",{ref:r,role:"alert",className:M(UE({variant:t}),e),...n}));Zd.displayName="Alert";const Jd=u.forwardRef(({className:e,...t},n)=>p.jsx("h5",{ref:n,className:M("mb-1 font-medium leading-none tracking-tight",e),...t}));Jd.displayName="AlertTitle";const Qd=u.forwardRef(({className:e,...t},n)=>p.jsx("div",{ref:n,className:M("text-sm [&_p]:leading-relaxed",e),...t}));Qd.displayName="AlertDescription";function GE(e){const t=KE(e),n=u.forwardRef((r,o)=>{const{children:s,...i}=r,a=u.Children.toArray(s),l=a.find(XE);if(l){const c=l.props.children,d=a.map(f=>f===l?u.Children.count(c)>1?u.Children.only(null):u.isValidElement(c)?c.props.children:null:f);return p.jsx(t,{...i,ref:o,children:u.isValidElement(c)?u.cloneElement(c,void 0,d):null})}return p.jsx(t,{...i,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}function KE(e){const t=u.forwardRef((n,r)=>{const{children:o,...s}=n;if(u.isValidElement(o)){const i=ZE(o),a=qE(s,o.props);return o.type!==u.Fragment&&(a.ref=r?Ce(r,i):i),u.cloneElement(o,a)}return u.Children.count(o)>1?u.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var YE=Symbol("radix.slottable");function XE(e){return u.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===YE}function qE(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 l=s(...a);return o(...a),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function ZE(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 oo="Dialog",[ef]=ye(oo),[JE,ze]=ef(oo),tf=e=>{const{__scopeDialog:t,children:n,open:r,defaultOpen:o,onOpenChange:s,modal:i=!0}=e,a=u.useRef(null),l=u.useRef(null),[c,d]=we({prop:r,defaultProp:o??!1,onChange:s,caller:oo});return p.jsx(JE,{scope:t,triggerRef:a,contentRef:l,contentId:he(),titleId:he(),descriptionId:he(),open:c,onOpenChange:d,onOpenToggle:u.useCallback(()=>d(f=>!f),[d]),modal:i,children:n})};tf.displayName=oo;var nf="DialogTrigger",rf=u.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=ze(nf,n),s=J(t,o.triggerRef);return p.jsx(W.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":di(o.open),...r,ref:s,onClick:k(e.onClick,o.onOpenToggle)})});rf.displayName=nf;var ci="DialogPortal",[QE,of]=ef(ci,{forceMount:void 0}),sf=e=>{const{__scopeDialog:t,forceMount:n,children:r,container:o}=e,s=ze(ci,t);return p.jsx(QE,{scope:t,forceMount:n,children:u.Children.map(r,i=>p.jsx(ve,{present:n||s.open,children:p.jsx(nn,{asChild:!0,container:o,children:i})}))})};sf.displayName=ci;var so="DialogOverlay",af=u.forwardRef((e,t)=>{const n=of(so,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,s=ze(so,e.__scopeDialog);return s.modal?p.jsx(ve,{present:r||s.open,children:p.jsx(tP,{...o,ref:t})}):null});af.displayName=so;var eP=GE("DialogOverlay.RemoveScroll"),tP=u.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=ze(so,n);return p.jsx(Bn,{as:eP,allowPinchZoom:!0,shards:[o.contentRef],children:p.jsx(W.div,{"data-state":di(o.open),...r,ref:t,style:{pointerEvents:"auto",...r.style}})})}),Ot="DialogContent",lf=u.forwardRef((e,t)=>{const n=of(Ot,e.__scopeDialog),{forceMount:r=n.forceMount,...o}=e,s=ze(Ot,e.__scopeDialog);return p.jsx(ve,{present:r||s.open,children:s.modal?p.jsx(nP,{...o,ref:t}):p.jsx(rP,{...o,ref:t})})});lf.displayName=Ot;var nP=u.forwardRef((e,t)=>{const n=ze(Ot,e.__scopeDialog),r=u.useRef(null),o=J(t,n.contentRef,r);return u.useEffect(()=>{const s=r.current;if(s)return Kr(s)},[]),p.jsx(cf,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:k(e.onCloseAutoFocus,s=>{var i;s.preventDefault(),(i=n.triggerRef.current)==null||i.focus()}),onPointerDownOutside:k(e.onPointerDownOutside,s=>{const i=s.detail.originalEvent,a=i.button===0&&i.ctrlKey===!0;(i.button===2||a)&&s.preventDefault()}),onFocusOutside:k(e.onFocusOutside,s=>s.preventDefault())})}),rP=u.forwardRef((e,t)=>{const n=ze(Ot,e.__scopeDialog),r=u.useRef(!1),o=u.useRef(!1);return p.jsx(cf,{...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 l,c;(l=e.onInteractOutside)==null||l.call(e,s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const i=s.target;((c=n.triggerRef.current)==null?void 0:c.contains(i))&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&o.current&&s.preventDefault()}})}),cf=u.forwardRef((e,t)=>{const{__scopeDialog:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:s,...i}=e,a=ze(Ot,n),l=u.useRef(null),c=J(t,l);return kr(),p.jsxs(p.Fragment,{children:[p.jsx(On,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:s,children:p.jsx(mt,{role:"dialog",id:a.contentId,"aria-describedby":a.descriptionId,"aria-labelledby":a.titleId,"data-state":di(a.open),...i,ref:c,onDismiss:()=>a.onOpenChange(!1)})}),p.jsxs(p.Fragment,{children:[p.jsx(oP,{titleId:a.titleId}),p.jsx(iP,{contentRef:l,descriptionId:a.descriptionId})]})]})}),ui="DialogTitle",uf=u.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=ze(ui,n);return p.jsx(W.h2,{id:o.titleId,...r,ref:t})});uf.displayName=ui;var df="DialogDescription",ff=u.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=ze(df,n);return p.jsx(W.p,{id:o.descriptionId,...r,ref:t})});ff.displayName=df;var pf="DialogClose",hf=u.forwardRef((e,t)=>{const{__scopeDialog:n,...r}=e,o=ze(pf,n);return p.jsx(W.button,{type:"button",...r,ref:t,onClick:k(e.onClick,()=>o.onOpenChange(!1))})});hf.displayName=pf;function di(e){return e?"open":"closed"}var mf="DialogTitleWarning",[KO,gf]=vw(mf,{contentName:Ot,titleName:ui,docsSlug:"dialog"}),oP=({titleId:e})=>{const t=gf(mf),n=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
131
102
 
132
103
  If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
133
104
 
134
- For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return d.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},$T="DialogDescriptionWarning",FT=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${zf($T).contentName}}.`;return d.useEffect(()=>{var s;const o=(s=e.current)==null?void 0:s.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},Fi=Nf,Hf=_f,Bi=If,mr=Df,gr=kf,Do=Lf,ko=$f,Oo=Bf;const Uf=Fi,BT=Hf,Gf=Bi,WT=Oo,Wi=d.forwardRef(({className:e,...t},n)=>p.jsx(mr,{ref:n,className:M("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));Wi.displayName=mr.displayName;const zi=d.forwardRef(({className:e,children:t,"aria-describedby":n,description:r,...o},s)=>{const i=T.useId(),a=n||(r?i:void 0);return p.jsxs(Gf,{children:[p.jsx(Wi,{}),p.jsxs(gr,{ref:s,className:M("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-1/2 data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-1/2 sm:rounded-lg",e),...o,"aria-describedby":a,children:[t,r&&p.jsx("span",{id:i,className:"sr-only",children:r}),p.jsxs(Oo,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[p.jsx(Qs,{className:"h-4 w-4"}),p.jsx("span",{className:"sr-only",children:"Close"})]})]})]})});zi.displayName=gr.displayName;const Kf=({className:e,...t})=>p.jsx("div",{className:M("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});Kf.displayName="DialogHeader";const Yf=({className:e,...t})=>p.jsx("div",{className:M("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Yf.displayName="DialogFooter";const Xf=d.forwardRef(({className:e,...t},n)=>p.jsx(Do,{ref:n,className:M("text-lg font-semibold leading-none tracking-tight",e),...t}));Xf.displayName=Do.displayName;const qf=d.forwardRef(({className:e,...t},n)=>p.jsx(ko,{ref:n,className:M("text-sm text-muted-foreground",e),...t}));qf.displayName=ko.displayName;function zT(e){const t=HT(e),n=d.forwardRef((r,o)=>{const{children:s,...i}=r,a=d.Children.toArray(s),l=a.find(GT);if(l){const c=l.props.children,u=a.map(f=>f===l?d.Children.count(c)>1?d.Children.only(null):d.isValidElement(c)?c.props.children:null:f);return p.jsx(t,{...i,ref:o,children:d.isValidElement(c)?d.cloneElement(c,void 0,u):null})}return p.jsx(t,{...i,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}function HT(e){const t=d.forwardRef((n,r)=>{const{children:o,...s}=n;if(d.isValidElement(o)){const i=YT(o),a=KT(s,o.props);return o.type!==d.Fragment&&(a.ref=r?Ve(r,i):i),d.cloneElement(o,a)}return d.Children.count(o)>1?d.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var UT=Symbol("radix.slottable");function GT(e){return d.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===UT}function KT(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 l=s(...a);return o(...a),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function YT(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 Hi=["Enter"," "],XT=["ArrowDown","PageUp","Home"],Zf=["ArrowUp","PageDown","End"],qT=[...XT,...Zf],ZT={ltr:[...Hi,"ArrowRight"],rtl:[...Hi,"ArrowLeft"]},JT={ltr:["ArrowLeft"],rtl:["ArrowRight"]},vr="Menu",[yr,QT,eP]=pn(vr),[qt,Jf]=Re(vr,[eP,ut,hn]),xr=ut(),Qf=hn(),[ep,Dt]=qt(vr),[tP,br]=qt(vr),tp=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:o,onOpenChange:s,modal:i=!0}=e,a=xr(t),[l,c]=d.useState(null),u=d.useRef(!1),f=xe(s),h=Rt(o);return d.useEffect(()=>{const m=()=>{u.current=!0,document.addEventListener("pointerdown",y,{capture:!0,once:!0}),document.addEventListener("pointermove",y,{capture:!0,once:!0})},y=()=>u.current=!1;return document.addEventListener("keydown",m,{capture:!0}),()=>{document.removeEventListener("keydown",m,{capture:!0}),document.removeEventListener("pointerdown",y,{capture:!0}),document.removeEventListener("pointermove",y,{capture:!0})}},[]),p.jsx(xn,{...a,children:p.jsx(ep,{scope:t,open:n,onOpenChange:f,content:l,onContentChange:c,children:p.jsx(tP,{scope:t,onClose:d.useCallback(()=>f(!1),[f]),isUsingKeyboardRef:u,dir:h,modal:i,children:r})})})};tp.displayName=vr;var nP="MenuAnchor",Ui=d.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=xr(n);return p.jsx(bn,{...o,...r,ref:t})});Ui.displayName=nP;var Gi="MenuPortal",[rP,np]=qt(Gi,{forceMount:void 0}),rp=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:o}=e,s=Dt(Gi,t);return p.jsx(rP,{scope:t,forceMount:n,children:p.jsx(Te,{present:n||s.open,children:p.jsx(wn,{asChild:!0,container:o,children:r})})})};rp.displayName=Gi;var Ge="MenuContent",[oP,Ki]=qt(Ge),op=d.forwardRef((e,t)=>{const n=np(Ge,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,s=Dt(Ge,e.__scopeMenu),i=br(Ge,e.__scopeMenu);return p.jsx(yr.Provider,{scope:e.__scopeMenu,children:p.jsx(Te,{present:r||s.open,children:p.jsx(yr.Slot,{scope:e.__scopeMenu,children:i.modal?p.jsx(sP,{...o,ref:t}):p.jsx(iP,{...o,ref:t})})})})}),sP=d.forwardRef((e,t)=>{const n=Dt(Ge,e.__scopeMenu),r=d.useRef(null),o=re(t,r);return d.useEffect(()=>{const s=r.current;if(s)return wo(s)},[]),p.jsx(Yi,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:D(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),iP=d.forwardRef((e,t)=>{const n=Dt(Ge,e.__scopeMenu);return p.jsx(Yi,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),aP=zT("MenuContent.ScrollLock"),Yi=d.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:o,onOpenAutoFocus:s,onCloseAutoFocus:i,disableOutsidePointerEvents:a,onEntryFocus:l,onEscapeKeyDown:c,onPointerDownOutside:u,onFocusOutside:f,onInteractOutside:h,onDismiss:m,disableOutsideScroll:y,...g}=e,v=Dt(Ge,n),x=br(Ge,n),b=xr(n),w=Qf(n),S=QT(n),[C,R]=d.useState(null),A=d.useRef(null),N=re(t,A,v.onContentChange),_=d.useRef(0),k=d.useRef(""),O=d.useRef(0),L=d.useRef(null),G=d.useRef("right"),j=d.useRef(0),X=y?pr:d.Fragment,U=y?{as:aP,allowPinchZoom:!0}:void 0,z=$=>{var W,Q;const oe=k.current+$,ie=S().filter(ee=>!ee.disabled),I=document.activeElement,Y=(W=ie.find(ee=>ee.ref.current===I))==null?void 0:W.textValue,J=ie.map(ee=>ee.textValue),K=xP(J,oe,Y),te=(Q=ie.find(ee=>ee.textValue===K))==null?void 0:Q.ref.current;(function ee(ne){k.current=ne,window.clearTimeout(_.current),ne!==""&&(_.current=window.setTimeout(()=>ee(""),1e3))})(oe),te&&setTimeout(()=>te.focus())};d.useEffect(()=>()=>window.clearTimeout(_.current),[]),io();const V=d.useCallback($=>{var ie,I;return G.current===((ie=L.current)==null?void 0:ie.side)&&wP($,(I=L.current)==null?void 0:I.area)},[]);return p.jsx(oP,{scope:n,searchRef:k,onItemEnter:d.useCallback($=>{V($)&&$.preventDefault()},[V]),onItemLeave:d.useCallback($=>{var oe;V($)||((oe=A.current)==null||oe.focus(),R(null))},[V]),onTriggerLeave:d.useCallback($=>{V($)&&$.preventDefault()},[V]),pointerGraceTimerRef:O,onPointerGraceIntentChange:d.useCallback($=>{L.current=$},[]),children:p.jsx(X,{...U,children:p.jsx(ar,{asChild:!0,trapped:o,onMountAutoFocus:D(s,$=>{var oe;$.preventDefault(),(oe=A.current)==null||oe.focus({preventScroll:!0})}),onUnmountAutoFocus:i,children:p.jsx(At,{asChild:!0,disableOutsidePointerEvents:a,onEscapeKeyDown:c,onPointerDownOutside:u,onFocusOutside:f,onInteractOutside:h,onDismiss:m,children:p.jsx(ni,{asChild:!0,...w,dir:x.dir,orientation:"vertical",loop:r,currentTabStopId:C,onCurrentTabStopIdChange:R,onEntryFocus:D(l,$=>{x.isUsingKeyboardRef.current||$.preventDefault()}),preventScrollOnEntryFocus:!0,children:p.jsx(dr,{role:"menu","aria-orientation":"vertical","data-state":Sp(v.open),"data-radix-menu-content":"",dir:x.dir,...b,...g,ref:N,style:{outline:"none",...g.style},onKeyDown:D(g.onKeyDown,$=>{const ie=$.target.closest("[data-radix-menu-content]")===$.currentTarget,I=$.ctrlKey||$.altKey||$.metaKey,Y=$.key.length===1;ie&&($.key==="Tab"&&$.preventDefault(),!I&&Y&&z($.key));const J=A.current;if($.target!==J||!qT.includes($.key))return;$.preventDefault();const te=S().filter(W=>!W.disabled).map(W=>W.ref.current);Zf.includes($.key)&&te.reverse(),vP(te)}),onBlur:D(e.onBlur,$=>{$.currentTarget.contains($.target)||(window.clearTimeout(_.current),k.current="")}),onPointerMove:D(e.onPointerMove,Sr($=>{const oe=$.target,ie=j.current!==$.clientX;if($.currentTarget.contains(oe)&&ie){const I=$.clientX>j.current?"right":"left";G.current=I,j.current=$.clientX}}))})})})})})})});op.displayName=Ge;var lP="MenuGroup",Xi=d.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return p.jsx(H.div,{role:"group",...r,ref:t})});Xi.displayName=lP;var cP="MenuLabel",sp=d.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return p.jsx(H.div,{...r,ref:t})});sp.displayName=cP;var Lo="MenuItem",ip="menu.itemSelect",Vo=d.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...o}=e,s=d.useRef(null),i=br(Lo,e.__scopeMenu),a=Ki(Lo,e.__scopeMenu),l=re(t,s),c=d.useRef(!1),u=()=>{const f=s.current;if(!n&&f){const h=new CustomEvent(ip,{bubbles:!0,cancelable:!0});f.addEventListener(ip,m=>r==null?void 0:r(m),{once:!0}),Ys(f,h),h.defaultPrevented?c.current=!1:i.onClose()}};return p.jsx(ap,{...o,ref:l,disabled:n,onClick:D(e.onClick,u),onPointerDown:f=>{var h;(h=e.onPointerDown)==null||h.call(e,f),c.current=!0},onPointerUp:D(e.onPointerUp,f=>{var h;c.current||(h=f.currentTarget)==null||h.click()}),onKeyDown:D(e.onKeyDown,f=>{const h=a.searchRef.current!=="";n||h&&f.key===" "||Hi.includes(f.key)&&(f.currentTarget.click(),f.preventDefault())})})});Vo.displayName=Lo;var ap=d.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:o,...s}=e,i=Ki(Lo,n),a=Qf(n),l=d.useRef(null),c=re(t,l),[u,f]=d.useState(!1),[h,m]=d.useState("");return d.useEffect(()=>{const y=l.current;y&&m((y.textContent??"").trim())},[s.children]),p.jsx(yr.ItemSlot,{scope:n,disabled:r,textValue:o??h,children:p.jsx(ri,{asChild:!0,...a,focusable:!r,children:p.jsx(H.div,{role:"menuitem","data-highlighted":u?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...s,ref:c,onPointerMove:D(e.onPointerMove,Sr(y=>{r?i.onItemLeave(y):(i.onItemEnter(y),y.defaultPrevented||y.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:D(e.onPointerLeave,Sr(y=>i.onItemLeave(y))),onFocus:D(e.onFocus,()=>f(!0)),onBlur:D(e.onBlur,()=>f(!1))})})})}),uP="MenuCheckboxItem",lp=d.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...o}=e;return p.jsx(pp,{scope:e.__scopeMenu,checked:n,children:p.jsx(Vo,{role:"menuitemcheckbox","aria-checked":$o(n)?"mixed":n,...o,ref:t,"data-state":Ji(n),onSelect:D(o.onSelect,()=>r==null?void 0:r($o(n)?!0:!n),{checkForDefaultPrevented:!1})})})});lp.displayName=uP;var cp="MenuRadioGroup",[dP,fP]=qt(cp,{value:void 0,onValueChange:()=>{}}),up=d.forwardRef((e,t)=>{const{value:n,onValueChange:r,...o}=e,s=xe(r);return p.jsx(dP,{scope:e.__scopeMenu,value:n,onValueChange:s,children:p.jsx(Xi,{...o,ref:t})})});up.displayName=cp;var dp="MenuRadioItem",fp=d.forwardRef((e,t)=>{const{value:n,...r}=e,o=fP(dp,e.__scopeMenu),s=n===o.value;return p.jsx(pp,{scope:e.__scopeMenu,checked:s,children:p.jsx(Vo,{role:"menuitemradio","aria-checked":s,...r,ref:t,"data-state":Ji(s),onSelect:D(r.onSelect,()=>{var i;return(i=o.onValueChange)==null?void 0:i.call(o,n)},{checkForDefaultPrevented:!1})})})});fp.displayName=dp;var qi="MenuItemIndicator",[pp,pP]=qt(qi,{checked:!1}),hp=d.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...o}=e,s=pP(qi,n);return p.jsx(Te,{present:r||$o(s.checked)||s.checked===!0,children:p.jsx(H.span,{...o,ref:t,"data-state":Ji(s.checked)})})});hp.displayName=qi;var hP="MenuSeparator",mp=d.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return p.jsx(H.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});mp.displayName=hP;var mP="MenuArrow",gp=d.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=xr(n);return p.jsx(fr,{...o,...r,ref:t})});gp.displayName=mP;var Zi="MenuSub",[gP,vp]=qt(Zi),yp=e=>{const{__scopeMenu:t,children:n,open:r=!1,onOpenChange:o}=e,s=Dt(Zi,t),i=xr(t),[a,l]=d.useState(null),[c,u]=d.useState(null),f=xe(o);return d.useEffect(()=>(s.open===!1&&f(!1),()=>f(!1)),[s.open,f]),p.jsx(xn,{...i,children:p.jsx(ep,{scope:t,open:r,onOpenChange:f,content:c,onContentChange:u,children:p.jsx(gP,{scope:t,contentId:Se(),triggerId:Se(),trigger:a,onTriggerChange:l,children:n})})})};yp.displayName=Zi;var wr="MenuSubTrigger",xp=d.forwardRef((e,t)=>{const n=Dt(wr,e.__scopeMenu),r=br(wr,e.__scopeMenu),o=vp(wr,e.__scopeMenu),s=Ki(wr,e.__scopeMenu),i=d.useRef(null),{pointerGraceTimerRef:a,onPointerGraceIntentChange:l}=s,c={__scopeMenu:e.__scopeMenu},u=d.useCallback(()=>{i.current&&window.clearTimeout(i.current),i.current=null},[]);return d.useEffect(()=>u,[u]),d.useEffect(()=>{const f=a.current;return()=>{window.clearTimeout(f),l(null)}},[a,l]),p.jsx(Ui,{asChild:!0,...c,children:p.jsx(ap,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":o.contentId,"data-state":Sp(n.open),...e,ref:Ve(t,o.onTriggerChange),onClick:f=>{var h;(h=e.onClick)==null||h.call(e,f),!(e.disabled||f.defaultPrevented)&&(f.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:D(e.onPointerMove,Sr(f=>{s.onItemEnter(f),!f.defaultPrevented&&!e.disabled&&!n.open&&!i.current&&(s.onPointerGraceIntentChange(null),i.current=window.setTimeout(()=>{n.onOpenChange(!0),u()},100))})),onPointerLeave:D(e.onPointerLeave,Sr(f=>{var m,y;u();const h=(m=n.content)==null?void 0:m.getBoundingClientRect();if(h){const g=(y=n.content)==null?void 0:y.dataset.side,v=g==="right",x=v?-5:5,b=h[v?"left":"right"],w=h[v?"right":"left"];s.onPointerGraceIntentChange({area:[{x:f.clientX+x,y:f.clientY},{x:b,y:h.top},{x:w,y:h.top},{x:w,y:h.bottom},{x:b,y:h.bottom}],side:g}),window.clearTimeout(a.current),a.current=window.setTimeout(()=>s.onPointerGraceIntentChange(null),300)}else{if(s.onTriggerLeave(f),f.defaultPrevented)return;s.onPointerGraceIntentChange(null)}})),onKeyDown:D(e.onKeyDown,f=>{var m;const h=s.searchRef.current!=="";e.disabled||h&&f.key===" "||ZT[r.dir].includes(f.key)&&(n.onOpenChange(!0),(m=n.content)==null||m.focus(),f.preventDefault())})})})});xp.displayName=wr;var bp="MenuSubContent",wp=d.forwardRef((e,t)=>{const n=np(Ge,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,s=Dt(Ge,e.__scopeMenu),i=br(Ge,e.__scopeMenu),a=vp(bp,e.__scopeMenu),l=d.useRef(null),c=re(t,l);return p.jsx(yr.Provider,{scope:e.__scopeMenu,children:p.jsx(Te,{present:r||s.open,children:p.jsx(yr.Slot,{scope:e.__scopeMenu,children:p.jsx(Yi,{id:a.contentId,"aria-labelledby":a.triggerId,...o,ref:c,align:"start",side:i.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:u=>{var f;i.isUsingKeyboardRef.current&&((f=l.current)==null||f.focus()),u.preventDefault()},onCloseAutoFocus:u=>u.preventDefault(),onFocusOutside:D(e.onFocusOutside,u=>{u.target!==a.trigger&&s.onOpenChange(!1)}),onEscapeKeyDown:D(e.onEscapeKeyDown,u=>{i.onClose(),u.preventDefault()}),onKeyDown:D(e.onKeyDown,u=>{var m;const f=u.currentTarget.contains(u.target),h=JT[i.dir].includes(u.key);f&&h&&(s.onOpenChange(!1),(m=a.trigger)==null||m.focus(),u.preventDefault())})})})})})});wp.displayName=bp;function Sp(e){return e?"open":"closed"}function $o(e){return e==="indeterminate"}function Ji(e){return $o(e)?"indeterminate":e?"checked":"unchecked"}function vP(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function yP(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function xP(e,t,n){const o=t.length>1&&Array.from(t).every(c=>c===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let i=yP(e,Math.max(s,0));o.length===1&&(i=i.filter(c=>c!==n));const l=i.find(c=>c.toLowerCase().startsWith(o.toLowerCase()));return l!==n?l:void 0}function bP(e,t){const{x:n,y:r}=e;let o=!1;for(let s=0,i=t.length-1;s<t.length;i=s++){const a=t[s],l=t[i],c=a.x,u=a.y,f=l.x,h=l.y;u>r!=h>r&&n<(f-c)*(r-u)/(h-u)+c&&(o=!o)}return o}function wP(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return bP(n,t)}function Sr(e){return t=>t.pointerType==="mouse"?e(t):void 0}var SP=tp,CP=Ui,EP=rp,TP=op,PP=Xi,RP=sp,AP=Vo,NP=lp,MP=up,_P=fp,jP=hp,IP=mp,DP=gp,kP=yp,OP=xp,LP=wp,Fo="DropdownMenu",[VP]=Re(Fo,[Jf]),De=Jf(),[$P,Cp]=VP(Fo),Ep=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:o,defaultOpen:s,onOpenChange:i,modal:a=!0}=e,l=De(t),c=d.useRef(null),[u,f]=_e({prop:o,defaultProp:s??!1,onChange:i,caller:Fo});return p.jsx($P,{scope:t,triggerId:Se(),triggerRef:c,contentId:Se(),open:u,onOpenChange:f,onOpenToggle:d.useCallback(()=>f(h=>!h),[f]),modal:a,children:p.jsx(SP,{...l,open:u,onOpenChange:f,dir:r,modal:a,children:n})})};Ep.displayName=Fo;var Tp="DropdownMenuTrigger",Pp=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...o}=e,s=Cp(Tp,n),i=De(n);return p.jsx(CP,{asChild:!0,...i,children:p.jsx(H.button,{type:"button",id:s.triggerId,"aria-haspopup":"menu","aria-expanded":s.open,"aria-controls":s.open?s.contentId:void 0,"data-state":s.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...o,ref:Ve(t,s.triggerRef),onPointerDown:D(e.onPointerDown,a=>{!r&&a.button===0&&a.ctrlKey===!1&&(s.onOpenToggle(),s.open||a.preventDefault())}),onKeyDown:D(e.onKeyDown,a=>{r||(["Enter"," "].includes(a.key)&&s.onOpenToggle(),a.key==="ArrowDown"&&s.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(a.key)&&a.preventDefault())})})})});Pp.displayName=Tp;var FP="DropdownMenuPortal",Rp=e=>{const{__scopeDropdownMenu:t,...n}=e,r=De(t);return p.jsx(EP,{...r,...n})};Rp.displayName=FP;var Ap="DropdownMenuContent",Np=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=Cp(Ap,n),s=De(n),i=d.useRef(!1);return p.jsx(TP,{id:o.contentId,"aria-labelledby":o.triggerId,...s,...r,ref:t,onCloseAutoFocus:D(e.onCloseAutoFocus,a=>{var l;i.current||(l=o.triggerRef.current)==null||l.focus(),i.current=!1,a.preventDefault()}),onInteractOutside:D(e.onInteractOutside,a=>{const l=a.detail.originalEvent,c=l.button===0&&l.ctrlKey===!0,u=l.button===2||c;(!o.modal||u)&&(i.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});Np.displayName=Ap;var BP="DropdownMenuGroup",Mp=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=De(n);return p.jsx(PP,{...o,...r,ref:t})});Mp.displayName=BP;var WP="DropdownMenuLabel",_p=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=De(n);return p.jsx(RP,{...o,...r,ref:t})});_p.displayName=WP;var zP="DropdownMenuItem",jp=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=De(n);return p.jsx(AP,{...o,...r,ref:t})});jp.displayName=zP;var HP="DropdownMenuCheckboxItem",Ip=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=De(n);return p.jsx(NP,{...o,...r,ref:t})});Ip.displayName=HP;var UP="DropdownMenuRadioGroup",Dp=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=De(n);return p.jsx(MP,{...o,...r,ref:t})});Dp.displayName=UP;var GP="DropdownMenuRadioItem",kp=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=De(n);return p.jsx(_P,{...o,...r,ref:t})});kp.displayName=GP;var KP="DropdownMenuItemIndicator",Op=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=De(n);return p.jsx(jP,{...o,...r,ref:t})});Op.displayName=KP;var YP="DropdownMenuSeparator",Lp=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=De(n);return p.jsx(IP,{...o,...r,ref:t})});Lp.displayName=YP;var XP="DropdownMenuArrow",qP=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=De(n);return p.jsx(DP,{...o,...r,ref:t})});qP.displayName=XP;var ZP=e=>{const{__scopeDropdownMenu:t,children:n,open:r,onOpenChange:o,defaultOpen:s}=e,i=De(t),[a,l]=_e({prop:r,defaultProp:s??!1,onChange:o,caller:"DropdownMenuSub"});return p.jsx(kP,{...i,open:a,onOpenChange:l,children:n})},JP="DropdownMenuSubTrigger",Vp=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=De(n);return p.jsx(OP,{...o,...r,ref:t})});Vp.displayName=JP;var QP="DropdownMenuSubContent",$p=d.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=De(n);return p.jsx(LP,{...o,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});$p.displayName=QP;var eR=Ep,tR=Pp,Fp=Rp,Bp=Np,nR=Mp,Wp=_p,zp=jp,Hp=Ip,rR=Dp,Up=kp,Gp=Op,Kp=Lp,oR=ZP,Yp=Vp,Xp=$p;const sR=eR,iR=tR,aR=nR,lR=Fp,cR=oR,uR=rR,qp=d.forwardRef(({className:e,inset:t,children:n,...r},o)=>p.jsxs(Yp,{ref:o,className:M("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",t&&"pl-8",e),...r,children:[n,p.jsx(Js,{className:"ml-auto h-4 w-4"})]}));qp.displayName=Yp.displayName;const Zp=d.forwardRef(({className:e,...t},n)=>p.jsx(Xp,{ref:n,className:M("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t}));Zp.displayName=Xp.displayName;const Jp=d.forwardRef(({className:e,sideOffset:t=4,...n},r)=>p.jsx(Fp,{children:p.jsx(Bp,{ref:r,sideOffset:t,className:M("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n})}));Jp.displayName=Bp.displayName;const Qp=d.forwardRef(({className:e,inset:t,...n},r)=>p.jsx(zp,{ref:r,className:M("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t&&"pl-8",e),...n}));Qp.displayName=zp.displayName;const eh=d.forwardRef(({className:e,children:t,checked:n,...r},o)=>p.jsxs(Hp,{ref:o,className:M("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:n,...r,children:[p.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:p.jsx(Gp,{children:p.jsx(Zs,{className:"h-4 w-4"})})}),t]}));eh.displayName=Hp.displayName;const th=d.forwardRef(({className:e,children:t,...n},r)=>p.jsxs(Up,{ref:r,className:M("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[p.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:p.jsx(Gp,{children:p.jsx(Hc,{className:"h-2 w-2 fill-current"})})}),t]}));th.displayName=Up.displayName;const nh=d.forwardRef(({className:e,inset:t,...n},r)=>p.jsx(Wp,{ref:r,className:M("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...n}));nh.displayName=Wp.displayName;const rh=d.forwardRef(({className:e,...t},n)=>p.jsx(Kp,{ref:n,className:M("-mx-1 my-1 h-px bg-muted",e),...t}));rh.displayName=Kp.displayName;const oh=({className:e,...t})=>p.jsx("span",{className:M("ml-auto text-xs tracking-widest opacity-60",e),...t});oh.displayName="DropdownMenuShortcut";function dR(e){const t=fR(e),n=d.forwardRef((r,o)=>{const{children:s,...i}=r,a=d.Children.toArray(s),l=a.find(hR);if(l){const c=l.props.children,u=a.map(f=>f===l?d.Children.count(c)>1?d.Children.only(null):d.isValidElement(c)?c.props.children:null:f);return p.jsx(t,{...i,ref:o,children:d.isValidElement(c)?d.cloneElement(c,void 0,u):null})}return p.jsx(t,{...i,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}function fR(e){const t=d.forwardRef((n,r)=>{const{children:o,...s}=n;if(d.isValidElement(o)){const i=gR(o),a=mR(s,o.props);return o.type!==d.Fragment&&(a.ref=r?Ve(r,i):i),d.cloneElement(o,a)}return d.Children.count(o)>1?d.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var pR=Symbol("radix.slottable");function hR(e){return d.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===pR}function mR(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 l=s(...a);return o(...a),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function gR(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 Bo="Popover",[sh]=Re(Bo,[ut]),Cr=ut(),[vR,kt]=sh(Bo),ih=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:o,onOpenChange:s,modal:i=!1}=e,a=Cr(t),l=d.useRef(null),[c,u]=d.useState(!1),[f,h]=_e({prop:r,defaultProp:o??!1,onChange:s,caller:Bo});return p.jsx(xn,{...a,children:p.jsx(vR,{scope:t,contentId:Se(),triggerRef:l,open:f,onOpenChange:h,onOpenToggle:d.useCallback(()=>h(m=>!m),[h]),hasCustomAnchor:c,onCustomAnchorAdd:d.useCallback(()=>u(!0),[]),onCustomAnchorRemove:d.useCallback(()=>u(!1),[]),modal:i,children:n})})};ih.displayName=Bo;var ah="PopoverAnchor",yR=d.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=kt(ah,n),s=Cr(n),{onCustomAnchorAdd:i,onCustomAnchorRemove:a}=o;return d.useEffect(()=>(i(),()=>a()),[i,a]),p.jsx(bn,{...s,...r,ref:t})});yR.displayName=ah;var lh="PopoverTrigger",ch=d.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=kt(lh,n),s=Cr(n),i=re(t,o.triggerRef),a=p.jsx(H.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":hh(o.open),...r,ref:i,onClick:D(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?a:p.jsx(bn,{asChild:!0,...s,children:a})});ch.displayName=lh;var Qi="PopoverPortal",[xR,bR]=sh(Qi,{forceMount:void 0}),uh=e=>{const{__scopePopover:t,forceMount:n,children:r,container:o}=e,s=kt(Qi,t);return p.jsx(xR,{scope:t,forceMount:n,children:p.jsx(Te,{present:n||s.open,children:p.jsx(wn,{asChild:!0,container:o,children:r})})})};uh.displayName=Qi;var An="PopoverContent",dh=d.forwardRef((e,t)=>{const n=bR(An,e.__scopePopover),{forceMount:r=n.forceMount,...o}=e,s=kt(An,e.__scopePopover);return p.jsx(Te,{present:r||s.open,children:s.modal?p.jsx(SR,{...o,ref:t}):p.jsx(CR,{...o,ref:t})})});dh.displayName=An;var wR=dR("PopoverContent.RemoveScroll"),SR=d.forwardRef((e,t)=>{const n=kt(An,e.__scopePopover),r=d.useRef(null),o=re(t,r),s=d.useRef(!1);return d.useEffect(()=>{const i=r.current;if(i)return wo(i)},[]),p.jsx(pr,{as:wR,allowPinchZoom:!0,children:p.jsx(fh,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:D(e.onCloseAutoFocus,i=>{var a;i.preventDefault(),s.current||(a=n.triggerRef.current)==null||a.focus()}),onPointerDownOutside:D(e.onPointerDownOutside,i=>{const a=i.detail.originalEvent,l=a.button===0&&a.ctrlKey===!0,c=a.button===2||l;s.current=c},{checkForDefaultPrevented:!1}),onFocusOutside:D(e.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1})})})}),CR=d.forwardRef((e,t)=>{const n=kt(An,e.__scopePopover),r=d.useRef(!1),o=d.useRef(!1);return p.jsx(fh,{...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 l,c;(l=e.onInteractOutside)==null||l.call(e,s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const i=s.target;((c=n.triggerRef.current)==null?void 0:c.contains(i))&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&o.current&&s.preventDefault()}})}),fh=d.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:s,disableOutsidePointerEvents:i,onEscapeKeyDown:a,onPointerDownOutside:l,onFocusOutside:c,onInteractOutside:u,...f}=e,h=kt(An,n),m=Cr(n);return io(),p.jsx(ar,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:s,children:p.jsx(At,{asChild:!0,disableOutsidePointerEvents:i,onInteractOutside:u,onEscapeKeyDown:a,onPointerDownOutside:l,onFocusOutside:c,onDismiss:()=>h.onOpenChange(!1),children:p.jsx(dr,{"data-state":hh(h.open),role:"dialog",id:h.contentId,...m,...f,ref:t,style:{...f.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)"}})})})}),ph="PopoverClose",ER=d.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=kt(ph,n);return p.jsx(H.button,{type:"button",...r,ref:t,onClick:D(e.onClick,()=>o.onOpenChange(!1))})});ER.displayName=ph;var TR="PopoverArrow",PR=d.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=Cr(n);return p.jsx(fr,{...o,...r,ref:t})});PR.displayName=TR;function hh(e){return e?"open":"closed"}var RR=ih,AR=ch,NR=uh,mh=dh;const MR=RR,_R=AR,gh=d.forwardRef(({className:e,align:t="center",sideOffset:n=4,...r},o)=>p.jsx(NR,{children:p.jsx(mh,{ref:o,align:t,sideOffset:n,className:M("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})}));gh.displayName=mh.displayName;var jR=Symbol("radix.slottable");function IR(e){const t=({children:n})=>p.jsx(p.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=jR,t}var[Wo]=Re("Tooltip",[ut]),zo=ut(),vh="TooltipProvider",DR=700,ea="tooltip.open",[kR,ta]=Wo(vh),yh=e=>{const{__scopeTooltip:t,delayDuration:n=DR,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:s}=e,i=d.useRef(!0),a=d.useRef(!1),l=d.useRef(0);return d.useEffect(()=>{const c=l.current;return()=>window.clearTimeout(c)},[]),p.jsx(kR,{scope:t,isOpenDelayedRef:i,delayDuration:n,onOpen:d.useCallback(()=>{window.clearTimeout(l.current),i.current=!1},[]),onClose:d.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>i.current=!0,r)},[r]),isPointerInTransitRef:a,onPointerInTransitChange:d.useCallback(c=>{a.current=c},[]),disableHoverableContent:o,children:s})};yh.displayName=vh;var Er="Tooltip",[OR,Ho]=Wo(Er),xh=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o,onOpenChange:s,disableHoverableContent:i,delayDuration:a}=e,l=ta(Er,e.__scopeTooltip),c=zo(t),[u,f]=d.useState(null),h=Se(),m=d.useRef(0),y=i??l.disableHoverableContent,g=a??l.delayDuration,v=d.useRef(!1),[x,b]=_e({prop:r,defaultProp:o??!1,onChange:A=>{A?(l.onOpen(),document.dispatchEvent(new CustomEvent(ea))):l.onClose(),s==null||s(A)},caller:Er}),w=d.useMemo(()=>x?v.current?"delayed-open":"instant-open":"closed",[x]),S=d.useCallback(()=>{window.clearTimeout(m.current),m.current=0,v.current=!1,b(!0)},[b]),C=d.useCallback(()=>{window.clearTimeout(m.current),m.current=0,b(!1)},[b]),R=d.useCallback(()=>{window.clearTimeout(m.current),m.current=window.setTimeout(()=>{v.current=!0,b(!0),m.current=0},g)},[g,b]);return d.useEffect(()=>()=>{m.current&&(window.clearTimeout(m.current),m.current=0)},[]),p.jsx(xn,{...c,children:p.jsx(OR,{scope:t,contentId:h,open:x,stateAttribute:w,trigger:u,onTriggerChange:f,onTriggerEnter:d.useCallback(()=>{l.isOpenDelayedRef.current?R():S()},[l.isOpenDelayedRef,R,S]),onTriggerLeave:d.useCallback(()=>{y?C():(window.clearTimeout(m.current),m.current=0)},[C,y]),onOpen:S,onClose:C,disableHoverableContent:y,children:n})})};xh.displayName=Er;var na="TooltipTrigger",bh=d.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=Ho(na,n),s=ta(na,n),i=zo(n),a=d.useRef(null),l=re(t,a,o.onTriggerChange),c=d.useRef(!1),u=d.useRef(!1),f=d.useCallback(()=>c.current=!1,[]);return d.useEffect(()=>()=>document.removeEventListener("pointerup",f),[f]),p.jsx(bn,{asChild:!0,...i,children:p.jsx(H.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:l,onPointerMove:D(e.onPointerMove,h=>{h.pointerType!=="touch"&&!u.current&&!s.isPointerInTransitRef.current&&(o.onTriggerEnter(),u.current=!0)}),onPointerLeave:D(e.onPointerLeave,()=>{o.onTriggerLeave(),u.current=!1}),onPointerDown:D(e.onPointerDown,()=>{o.open&&o.onClose(),c.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:D(e.onFocus,()=>{c.current||o.onOpen()}),onBlur:D(e.onBlur,o.onClose),onClick:D(e.onClick,o.onClose)})})});bh.displayName=na;var LR="TooltipPortal",[Bk,VR]=Wo(LR,{forceMount:void 0}),Nn="TooltipContent",wh=d.forwardRef((e,t)=>{const n=VR(Nn,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...s}=e,i=Ho(Nn,e.__scopeTooltip);return p.jsx(Te,{present:r||i.open,children:i.disableHoverableContent?p.jsx(Sh,{side:o,...s,ref:t}):p.jsx($R,{side:o,...s,ref:t})})}),$R=d.forwardRef((e,t)=>{const n=Ho(Nn,e.__scopeTooltip),r=ta(Nn,e.__scopeTooltip),o=d.useRef(null),s=re(t,o),[i,a]=d.useState(null),{trigger:l,onClose:c}=n,u=o.current,{onPointerInTransitChange:f}=r,h=d.useCallback(()=>{a(null),f(!1)},[f]),m=d.useCallback((y,g)=>{const v=y.currentTarget,x={x:y.clientX,y:y.clientY},b=HR(x,v.getBoundingClientRect()),w=UR(x,b),S=GR(g.getBoundingClientRect()),C=YR([...w,...S]);a(C),f(!0)},[f]);return d.useEffect(()=>()=>h(),[h]),d.useEffect(()=>{if(l&&u){const y=v=>m(v,u),g=v=>m(v,l);return l.addEventListener("pointerleave",y),u.addEventListener("pointerleave",g),()=>{l.removeEventListener("pointerleave",y),u.removeEventListener("pointerleave",g)}}},[l,u,m,h]),d.useEffect(()=>{if(i){const y=g=>{const v=g.target,x={x:g.clientX,y:g.clientY},b=(l==null?void 0:l.contains(v))||(u==null?void 0:u.contains(v)),w=!KR(x,i);b?h():w&&(h(),c())};return document.addEventListener("pointermove",y),()=>document.removeEventListener("pointermove",y)}},[l,u,i,c,h]),p.jsx(Sh,{...e,ref:s})}),[FR,BR]=Wo(Er,{isInside:!1}),WR=IR("TooltipContent"),Sh=d.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:s,onPointerDownOutside:i,...a}=e,l=Ho(Nn,n),c=zo(n),{onClose:u}=l;return d.useEffect(()=>(document.addEventListener(ea,u),()=>document.removeEventListener(ea,u)),[u]),d.useEffect(()=>{if(l.trigger){const f=h=>{const m=h.target;m!=null&&m.contains(l.trigger)&&u()};return window.addEventListener("scroll",f,{capture:!0}),()=>window.removeEventListener("scroll",f,{capture:!0})}},[l.trigger,u]),p.jsx(At,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:f=>f.preventDefault(),onDismiss:u,children:p.jsxs(dr,{"data-state":l.stateAttribute,...c,...a,ref:t,style:{...a.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[p.jsx(WR,{children:r}),p.jsx(FR,{scope:n,isInside:!0,children:p.jsx(WC,{id:l.contentId,role:"tooltip",children:o||r})})]})})});wh.displayName=Nn;var Ch="TooltipArrow",zR=d.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=zo(n);return BR(Ch,n).isInside?null:p.jsx(fr,{...o,...r,ref:t})});zR.displayName=Ch;function HR(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),s=Math.abs(t.left-e.x);switch(Math.min(n,r,o,s)){case s:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function UR(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function GR(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}function KR(e,t){const{x:n,y:r}=e;let o=!1;for(let s=0,i=t.length-1;s<t.length;i=s++){const a=t[s],l=t[i],c=a.x,u=a.y,f=l.x,h=l.y;u>r!=h>r&&n<(f-c)*(r-u)/(h-u)+c&&(o=!o)}return o}function YR(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),XR(t)}function XR(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const o=e[r];for(;t.length>=2;){const s=t[t.length-1],i=t[t.length-2];if((s.x-i.x)*(o.y-i.y)>=(s.y-i.y)*(o.x-i.x))t.pop();else break}t.push(o)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const o=e[r];for(;n.length>=2;){const s=n[n.length-1],i=n[n.length-2];if((s.x-i.x)*(o.y-i.y)>=(s.y-i.y)*(o.x-i.x))n.pop();else break}n.push(o)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var qR=yh,ZR=xh,JR=bh,Eh=wh;const QR=qR,eA=ZR,tA=JR,Th=d.forwardRef(({className:e,sideOffset:t=4,...n},r)=>p.jsx(Eh,{ref:r,sideOffset:t,className:M("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n}));Th.displayName=Eh.displayName;var ra="ToastProvider",[oa,nA,rA]=pn("Toast"),[Ph]=Re("Toast",[rA]),[oA,Uo]=Ph(ra),Rh=e=>{const{__scopeToast:t,label:n="Notification",duration:r=5e3,swipeDirection:o="right",swipeThreshold:s=50,children:i}=e,[a,l]=d.useState(null),[c,u]=d.useState(0),f=d.useRef(!1),h=d.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${ra}\`. Expected non-empty \`string\`.`),p.jsx(oa.Provider,{scope:t,children:p.jsx(oA,{scope:t,label:n,duration:r,swipeDirection:o,swipeThreshold:s,toastCount:c,viewport:a,onViewportChange:l,onToastAdd:d.useCallback(()=>u(m=>m+1),[]),onToastRemove:d.useCallback(()=>u(m=>m-1),[]),isFocusedToastEscapeKeyDownRef:f,isClosePausedRef:h,children:i})})};Rh.displayName=ra;var Ah="ToastViewport",sA=["F8"],sa="toast.viewportPause",ia="toast.viewportResume",Nh=d.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:r=sA,label:o="Notifications ({hotkey})",...s}=e,i=Uo(Ah,n),a=nA(n),l=d.useRef(null),c=d.useRef(null),u=d.useRef(null),f=d.useRef(null),h=re(t,f,i.onViewportChange),m=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),y=i.toastCount>0;d.useEffect(()=>{const v=x=>{var w;r.length!==0&&r.every(S=>x[S]||x.code===S)&&((w=f.current)==null||w.focus())};return document.addEventListener("keydown",v),()=>document.removeEventListener("keydown",v)},[r]),d.useEffect(()=>{const v=l.current,x=f.current;if(y&&v&&x){const b=()=>{if(!i.isClosePausedRef.current){const R=new CustomEvent(sa);x.dispatchEvent(R),i.isClosePausedRef.current=!0}},w=()=>{if(i.isClosePausedRef.current){const R=new CustomEvent(ia);x.dispatchEvent(R),i.isClosePausedRef.current=!1}},S=R=>{!v.contains(R.relatedTarget)&&w()},C=()=>{v.contains(document.activeElement)||w()};return v.addEventListener("focusin",b),v.addEventListener("focusout",S),v.addEventListener("pointermove",b),v.addEventListener("pointerleave",C),window.addEventListener("blur",b),window.addEventListener("focus",w),()=>{v.removeEventListener("focusin",b),v.removeEventListener("focusout",S),v.removeEventListener("pointermove",b),v.removeEventListener("pointerleave",C),window.removeEventListener("blur",b),window.removeEventListener("focus",w)}}},[y,i.isClosePausedRef]);const g=d.useCallback(({tabbingDirection:v})=>{const b=a().map(w=>{const S=w.ref.current,C=[S,...yA(S)];return v==="forwards"?C:C.reverse()});return(v==="forwards"?b.reverse():b).flat()},[a]);return d.useEffect(()=>{const v=f.current;if(v){const x=b=>{var C,R,A;const w=b.altKey||b.ctrlKey||b.metaKey;if(b.key==="Tab"&&!w){const N=document.activeElement,_=b.shiftKey;if(b.target===v&&_){(C=c.current)==null||C.focus();return}const L=g({tabbingDirection:_?"backwards":"forwards"}),G=L.findIndex(j=>j===N);ca(L.slice(G+1))?b.preventDefault():_?(R=c.current)==null||R.focus():(A=u.current)==null||A.focus()}};return v.addEventListener("keydown",x),()=>v.removeEventListener("keydown",x)}},[a,g]),p.jsxs(lS,{ref:l,role:"region","aria-label":o.replace("{hotkey}",m),tabIndex:-1,style:{pointerEvents:y?void 0:"none"},children:[y&&p.jsx(aa,{ref:c,onFocusFromOutsideViewport:()=>{const v=g({tabbingDirection:"forwards"});ca(v)}}),p.jsx(oa.Slot,{scope:n,children:p.jsx(H.ol,{tabIndex:-1,...s,ref:h})}),y&&p.jsx(aa,{ref:u,onFocusFromOutsideViewport:()=>{const v=g({tabbingDirection:"backwards"});ca(v)}})]})});Nh.displayName=Ah;var Mh="ToastFocusProxy",aa=d.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...o}=e,s=Uo(Mh,n);return p.jsx(yo,{tabIndex:0,...o,ref:t,style:{position:"fixed"},onFocus:i=>{var c;const a=i.relatedTarget;!((c=s.viewport)!=null&&c.contains(a))&&r()}})});aa.displayName=Mh;var Tr="Toast",iA="toast.swipeStart",aA="toast.swipeMove",lA="toast.swipeCancel",cA="toast.swipeEnd",_h=d.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:o,onOpenChange:s,...i}=e,[a,l]=_e({prop:r,defaultProp:o??!0,onChange:s,caller:Tr});return p.jsx(Te,{present:n||a,children:p.jsx(fA,{open:a,...i,ref:t,onClose:()=>l(!1),onPause:xe(e.onPause),onResume:xe(e.onResume),onSwipeStart:D(e.onSwipeStart,c=>{c.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:D(e.onSwipeMove,c=>{const{x:u,y:f}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","move"),c.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${u}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${f}px`)}),onSwipeCancel:D(e.onSwipeCancel,c=>{c.currentTarget.setAttribute("data-swipe","cancel"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:D(e.onSwipeEnd,c=>{const{x:u,y:f}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","end"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${u}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${f}px`),l(!1)})})})});_h.displayName=Tr;var[uA,dA]=Ph(Tr,{onClose(){}}),fA=d.forwardRef((e,t)=>{const{__scopeToast:n,type:r="foreground",duration:o,open:s,onClose:i,onEscapeKeyDown:a,onPause:l,onResume:c,onSwipeStart:u,onSwipeMove:f,onSwipeCancel:h,onSwipeEnd:m,...y}=e,g=Uo(Tr,n),[v,x]=d.useState(null),b=re(t,j=>x(j)),w=d.useRef(null),S=d.useRef(null),C=o||g.duration,R=d.useRef(0),A=d.useRef(C),N=d.useRef(0),{onToastAdd:_,onToastRemove:k}=g,O=xe(()=>{var X;(v==null?void 0:v.contains(document.activeElement))&&((X=g.viewport)==null||X.focus()),i()}),L=d.useCallback(j=>{!j||j===1/0||(window.clearTimeout(N.current),R.current=new Date().getTime(),N.current=window.setTimeout(O,j))},[O]);d.useEffect(()=>{const j=g.viewport;if(j){const X=()=>{L(A.current),c==null||c()},U=()=>{const z=new Date().getTime()-R.current;A.current=A.current-z,window.clearTimeout(N.current),l==null||l()};return j.addEventListener(sa,U),j.addEventListener(ia,X),()=>{j.removeEventListener(sa,U),j.removeEventListener(ia,X)}}},[g.viewport,C,l,c,L]),d.useEffect(()=>{s&&!g.isClosePausedRef.current&&L(C)},[s,C,g.isClosePausedRef,L]),d.useEffect(()=>(_(),()=>k()),[_,k]);const G=d.useMemo(()=>v?Vh(v):null,[v]);return g.viewport?p.jsxs(p.Fragment,{children:[G&&p.jsx(pA,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite",children:G}),p.jsx(uA,{scope:n,onClose:O,children:Zn.createPortal(p.jsx(oa.ItemSlot,{scope:n,children:p.jsx(aS,{asChild:!0,onEscapeKeyDown:D(a,()=>{g.isFocusedToastEscapeKeyDownRef.current||O(),g.isFocusedToastEscapeKeyDownRef.current=!1}),children:p.jsx(H.li,{tabIndex:0,"data-state":s?"open":"closed","data-swipe-direction":g.swipeDirection,...y,ref:b,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:D(e.onKeyDown,j=>{j.key==="Escape"&&(a==null||a(j.nativeEvent),j.nativeEvent.defaultPrevented||(g.isFocusedToastEscapeKeyDownRef.current=!0,O()))}),onPointerDown:D(e.onPointerDown,j=>{j.button===0&&(w.current={x:j.clientX,y:j.clientY})}),onPointerMove:D(e.onPointerMove,j=>{if(!w.current)return;const X=j.clientX-w.current.x,U=j.clientY-w.current.y,z=!!S.current,V=["left","right"].includes(g.swipeDirection),$=["left","up"].includes(g.swipeDirection)?Math.min:Math.max,oe=V?$(0,X):0,ie=V?0:$(0,U),I=j.pointerType==="touch"?10:2,Y={x:oe,y:ie},J={originalEvent:j,delta:Y};z?(S.current=Y,Go(aA,f,J,{discrete:!1})):$h(Y,g.swipeDirection,I)?(S.current=Y,Go(iA,u,J,{discrete:!1}),j.target.setPointerCapture(j.pointerId)):(Math.abs(X)>I||Math.abs(U)>I)&&(w.current=null)}),onPointerUp:D(e.onPointerUp,j=>{const X=S.current,U=j.target;if(U.hasPointerCapture(j.pointerId)&&U.releasePointerCapture(j.pointerId),S.current=null,w.current=null,X){const z=j.currentTarget,V={originalEvent:j,delta:X};$h(X,g.swipeDirection,g.swipeThreshold)?Go(cA,m,V,{discrete:!0}):Go(lA,h,V,{discrete:!0}),z.addEventListener("click",$=>$.preventDefault(),{once:!0})}})})})}),g.viewport)})]}):null}),pA=e=>{const{__scopeToast:t,children:n,...r}=e,o=Uo(Tr,t),[s,i]=d.useState(!1),[a,l]=d.useState(!1);return gA(()=>i(!0)),d.useEffect(()=>{const c=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(c)},[]),a?null:p.jsx(wn,{asChild:!0,children:p.jsx(yo,{...r,children:s&&p.jsxs(p.Fragment,{children:[o.label," ",n]})})})},hA="ToastTitle",jh=d.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return p.jsx(H.div,{...r,ref:t})});jh.displayName=hA;var mA="ToastDescription",Ih=d.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return p.jsx(H.div,{...r,ref:t})});Ih.displayName=mA;var Dh="ToastAction",kh=d.forwardRef((e,t)=>{const{altText:n,...r}=e;return n.trim()?p.jsx(Lh,{altText:n,asChild:!0,children:p.jsx(la,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${Dh}\`. Expected non-empty \`string\`.`),null)});kh.displayName=Dh;var Oh="ToastClose",la=d.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,o=dA(Oh,n);return p.jsx(Lh,{asChild:!0,children:p.jsx(H.button,{type:"button",...r,ref:t,onClick:D(e.onClick,o.onClose)})})});la.displayName=Oh;var Lh=d.forwardRef((e,t)=>{const{__scopeToast:n,altText:r,...o}=e;return p.jsx(H.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...o,ref:t})});function Vh(e){const t=[];return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),vA(r)){const o=r.ariaHidden||r.hidden||r.style.display==="none",s=r.dataset.radixToastAnnounceExclude==="";if(!o)if(s){const i=r.dataset.radixToastAnnounceAlt;i&&t.push(i)}else t.push(...Vh(r))}}),t}function Go(e,t,n,{discrete:r}){const o=n.originalEvent.currentTarget,s=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?Ys(o,s):o.dispatchEvent(s)}var $h=(e,t,n=0)=>{const r=Math.abs(e.x),o=Math.abs(e.y),s=r>o;return t==="left"||t==="right"?s&&r>n:!s&&o>n};function gA(e=()=>{}){const t=xe(e);we(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function vA(e){return e.nodeType===e.ELEMENT_NODE}function yA(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 ca(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var xA=Rh,Fh=Nh,Bh=_h,Wh=jh,zh=Ih,Hh=kh,Uh=la;const bA=xA,Gh=d.forwardRef(({className:e,...t},n)=>p.jsx(Fh,{ref:n,className:M("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",e),...t}));Gh.displayName=Fh.displayName;const wA=fn("group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),Kh=d.forwardRef(({className:e,variant:t,...n},r)=>p.jsx(Bh,{ref:r,className:M(wA({variant:t}),e),...n}));Kh.displayName=Bh.displayName;const Yh=d.forwardRef(({className:e,...t},n)=>p.jsx(Hh,{ref:n,className:M("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors hover:bg-secondary focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",e),...t}));Yh.displayName=Hh.displayName;const Xh=d.forwardRef(({className:e,...t},n)=>p.jsx(Uh,{ref:n,className:M("absolute right-2 top-2 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-2 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",e),"toast-close":"",...t,children:p.jsx(Qs,{className:"h-4 w-4"})}));Xh.displayName=Uh.displayName;const qh=d.forwardRef(({className:e,...t},n)=>p.jsx(Wh,{ref:n,className:M("text-sm font-semibold",e),...t}));qh.displayName=Wh.displayName;const Zh=d.forwardRef(({className:e,...t},n)=>p.jsx(zh,{ref:n,className:M("text-sm opacity-90",e),...t}));Zh.displayName=zh.displayName;const SA=1,CA=1e6;let ua=0;function EA(){return ua=(ua+1)%Number.MAX_SAFE_INTEGER,ua.toString()}const da=new Map,Jh=e=>{if(da.has(e))return;const t=setTimeout(()=>{da.delete(e),Pr({type:"REMOVE_TOAST",toastId:e})},CA);da.set(e,t)},Qh=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,SA)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(n=>n.id===t.toast.id?{...n,...t.toast}:n)};case"DISMISS_TOAST":{const{toastId:n}=t;return n?Jh(n):e.toasts.forEach(r=>{Jh(r.id)}),{...e,toasts:e.toasts.map(r=>r.id===n||n===void 0?{...r,open:!1}:r)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(n=>n.id!==t.toastId)}}},Ko=[];let Yo={toasts:[]};function Pr(e){Yo=Qh(Yo,e),Ko.forEach(t=>{t(Yo)})}function em({...e}){const t=EA(),n=o=>Pr({type:"UPDATE_TOAST",toast:{...o,id:t}}),r=()=>Pr({type:"DISMISS_TOAST",toastId:t});return Pr({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:o=>{o||r()}}}),{id:t,dismiss:r,update:n}}function TA(){const[e,t]=d.useState(Yo);return d.useEffect(()=>(Ko.push(t),()=>{const n=Ko.indexOf(t);n>-1&&Ko.splice(n,1)}),[e]),{...e,toast:em,dismiss:n=>Pr({type:"DISMISS_TOAST",toastId:n})}}function PA({className:e,...t}){return p.jsx("div",{className:M("animate-pulse rounded-md bg-muted",e),...t})}function RA(e,t=[]){let n=[];function r(s,i){const a=d.createContext(i);a.displayName=s+"Context";const l=n.length;n=[...n,i];const c=f=>{var x;const{scope:h,children:m,...y}=f,g=((x=h==null?void 0:h[e])==null?void 0:x[l])||a,v=d.useMemo(()=>y,Object.values(y));return p.jsx(g.Provider,{value:v,children:m})};c.displayName=s+"Provider";function u(f,h){var g;const m=((g=h==null?void 0:h[e])==null?void 0:g[l])||a,y=d.useContext(m);if(y)return y;if(i!==void 0)return i;throw new Error(`\`${f}\` must be used within \`${s}\``)}return[c,u]}const o=()=>{const s=n.map(i=>d.createContext(i));return function(a){const l=(a==null?void 0:a[e])||s;return d.useMemo(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])}};return o.scopeName=e,[r,AA(o,...t)]}function AA(...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:l,scopeName:c})=>{const f=l(s)[`__scope${c}`];return{...a,...f}},{});return d.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}var NA=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],tm=NA.reduce((e,t)=>{const n=nr(`Primitive.${t}`),r=d.forwardRef((o,s)=>{const{asChild:i,...a}=o,l=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),p.jsx(l,{...a,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),fa="Progress",pa=100,[MA]=RA(fa),[_A,jA]=MA(fa),nm=d.forwardRef((e,t)=>{const{__scopeProgress:n,value:r=null,max:o,getValueLabel:s=IA,...i}=e;(o||o===0)&&!im(o)&&console.error(DA(`${o}`,"Progress"));const a=im(o)?o:pa;r!==null&&!am(r,a)&&console.error(kA(`${r}`,"Progress"));const l=am(r,a)?r:null,c=Xo(l)?s(l,a):void 0;return p.jsx(_A,{scope:n,value:l,max:a,children:p.jsx(tm.div,{"aria-valuemax":a,"aria-valuemin":0,"aria-valuenow":Xo(l)?l:void 0,"aria-valuetext":c,role:"progressbar","data-state":sm(l,a),"data-value":l??void 0,"data-max":a,...i,ref:t})})});nm.displayName=fa;var rm="ProgressIndicator",om=d.forwardRef((e,t)=>{const{__scopeProgress:n,...r}=e,o=jA(rm,n);return p.jsx(tm.div,{"data-state":sm(o.value,o.max),"data-value":o.value??void 0,"data-max":o.max,...r,ref:t})});om.displayName=rm;function IA(e,t){return`${Math.round(e/t*100)}%`}function sm(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function Xo(e){return typeof e=="number"}function im(e){return Xo(e)&&!isNaN(e)&&e>0}function am(e,t){return Xo(e)&&!isNaN(e)&&e<=t&&e>=0}function DA(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${pa}\`.`}function kA(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
105
+ For more information, see https://radix-ui.com/primitives/docs/components/${t.docsSlug}`;return u.useEffect(()=>{e&&(document.getElementById(e)||console.error(n))},[n,e]),null},sP="DialogDescriptionWarning",iP=({contentRef:e,descriptionId:t})=>{const r=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${gf(sP).contentName}}.`;return u.useEffect(()=>{var s;const o=(s=e.current)==null?void 0:s.getAttribute("aria-describedby");t&&o&&(document.getElementById(t)||console.warn(r))},[r,e,t]),null},fi=tf,vf=rf,pi=sf,Wn=af,Hn=lf,io=uf,ao=ff,lo=hf;const yf=fi,aP=vf,bf=pi,lP=lo,hi=u.forwardRef(({className:e,...t},n)=>p.jsx(Wn,{ref:n,className:M("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));hi.displayName=Wn.displayName;const mi=u.forwardRef(({className:e,children:t,"aria-describedby":n,description:r,...o},s)=>{const i=P.useId(),a=n||(r?i:void 0);return p.jsxs(bf,{children:[p.jsx(hi,{}),p.jsxs(Hn,{ref:s,className:M("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-1/2 data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-1/2 sm:rounded-lg",e),...o,"aria-describedby":a,children:[t,r&&p.jsx("span",{id:i,className:"sr-only",children:r}),p.jsxs(lo,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[p.jsx(Ps,{className:"h-4 w-4"}),p.jsx("span",{className:"sr-only",children:"Close"})]})]})]})});mi.displayName=Hn.displayName;const wf=({className:e,...t})=>p.jsx("div",{className:M("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});wf.displayName="DialogHeader";const xf=({className:e,...t})=>p.jsx("div",{className:M("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});xf.displayName="DialogFooter";const Sf=u.forwardRef(({className:e,...t},n)=>p.jsx(io,{ref:n,className:M("text-lg font-semibold leading-none tracking-tight",e),...t}));Sf.displayName=io.displayName;const Cf=u.forwardRef(({className:e,...t},n)=>p.jsx(ao,{ref:n,className:M("text-sm text-muted-foreground",e),...t}));Cf.displayName=ao.displayName;function cP(e){const t=uP(e),n=u.forwardRef((r,o)=>{const{children:s,...i}=r,a=u.Children.toArray(s),l=a.find(fP);if(l){const c=l.props.children,d=a.map(f=>f===l?u.Children.count(c)>1?u.Children.only(null):u.isValidElement(c)?c.props.children:null:f);return p.jsx(t,{...i,ref:o,children:u.isValidElement(c)?u.cloneElement(c,void 0,d):null})}return p.jsx(t,{...i,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}function uP(e){const t=u.forwardRef((n,r)=>{const{children:o,...s}=n;if(u.isValidElement(o)){const i=hP(o),a=pP(s,o.props);return o.type!==u.Fragment&&(a.ref=r?Ce(r,i):i),u.cloneElement(o,a)}return u.Children.count(o)>1?u.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var dP=Symbol("radix.slottable");function fP(e){return u.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===dP}function pP(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 l=s(...a);return o(...a),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function hP(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 gi=["Enter"," "],mP=["ArrowDown","PageUp","Home"],Ef=["ArrowUp","PageDown","End"],gP=[...mP,...Ef],vP={ltr:[...gi,"ArrowRight"],rtl:[...gi,"ArrowLeft"]},yP={ltr:["ArrowLeft"],rtl:["ArrowRight"]},jn="Menu",[Un,bP,wP]=Yt(jn),[Lt,Pf]=ye(jn,[wP,qe,Xt]),Gn=qe(),Tf=Xt(),[Af,xt]=Lt(jn),[xP,Kn]=Lt(jn),Nf=e=>{const{__scopeMenu:t,open:n=!1,children:r,dir:o,onOpenChange:s,modal:i=!0}=e,a=Gn(t),[l,c]=u.useState(null),d=u.useRef(!1),f=de(s),h=ht(o);return u.useEffect(()=>{const m=()=>{d.current=!0,document.addEventListener("pointerdown",y,{capture:!0,once:!0}),document.addEventListener("pointermove",y,{capture:!0,once:!0})},y=()=>d.current=!1;return document.addEventListener("keydown",m,{capture:!0}),()=>{document.removeEventListener("keydown",m,{capture:!0}),document.removeEventListener("pointerdown",y,{capture:!0}),document.removeEventListener("pointermove",y,{capture:!0})}},[]),p.jsx(en,{...a,children:p.jsx(Af,{scope:t,open:n,onOpenChange:f,content:l,onContentChange:c,children:p.jsx(xP,{scope:t,onClose:u.useCallback(()=>f(!1),[f]),isUsingKeyboardRef:d,dir:h,modal:i,children:r})})})};Nf.displayName=jn;var SP="MenuAnchor",vi=u.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=Gn(n);return p.jsx(tn,{...o,...r,ref:t})});vi.displayName=SP;var yi="MenuPortal",[CP,Mf]=Lt(yi,{forceMount:void 0}),If=e=>{const{__scopeMenu:t,forceMount:n,children:r,container:o}=e,s=xt(yi,t);return p.jsx(CP,{scope:t,forceMount:n,children:p.jsx(ve,{present:n||s.open,children:p.jsx(nn,{asChild:!0,container:o,children:r})})})};If.displayName=yi;var ke="MenuContent",[EP,bi]=Lt(ke),Df=u.forwardRef((e,t)=>{const n=Mf(ke,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,s=xt(ke,e.__scopeMenu),i=Kn(ke,e.__scopeMenu);return p.jsx(Un.Provider,{scope:e.__scopeMenu,children:p.jsx(ve,{present:r||s.open,children:p.jsx(Un.Slot,{scope:e.__scopeMenu,children:i.modal?p.jsx(PP,{...o,ref:t}):p.jsx(TP,{...o,ref:t})})})})}),PP=u.forwardRef((e,t)=>{const n=xt(ke,e.__scopeMenu),r=u.useRef(null),o=J(t,r);return u.useEffect(()=>{const s=r.current;if(s)return Kr(s)},[]),p.jsx(wi,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:k(e.onFocusOutside,s=>s.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),TP=u.forwardRef((e,t)=>{const n=xt(ke,e.__scopeMenu);return p.jsx(wi,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),AP=cP("MenuContent.ScrollLock"),wi=u.forwardRef((e,t)=>{const{__scopeMenu:n,loop:r=!1,trapFocus:o,onOpenAutoFocus:s,onCloseAutoFocus:i,disableOutsidePointerEvents:a,onEntryFocus:l,onEscapeKeyDown:c,onPointerDownOutside:d,onFocusOutside:f,onInteractOutside:h,onDismiss:m,disableOutsideScroll:y,...g}=e,v=xt(ke,n),b=Kn(ke,n),w=Gn(n),x=Tf(n),S=bP(n),[C,T]=u.useState(null),A=u.useRef(null),N=J(t,A,v.onContentChange),I=u.useRef(0),O=u.useRef(""),L=u.useRef(0),V=u.useRef(null),U=u.useRef("right"),_=u.useRef(0),K=y?Bn:u.Fragment,H=y?{as:AP,allowPinchZoom:!0}:void 0,B=F=>{var z,Z;const ne=O.current+F,re=S().filter(q=>!q.disabled),D=document.activeElement,G=(z=re.find(q=>q.ref.current===D))==null?void 0:z.textValue,X=re.map(q=>q.textValue),j=RP(X,ne,G),Q=(Z=re.find(q=>q.textValue===j))==null?void 0:Z.ref.current;(function q(ee){O.current=ee,window.clearTimeout(I.current),ee!==""&&(I.current=window.setTimeout(()=>q(""),1e3))})(ne),Q&&setTimeout(()=>Q.focus())};u.useEffect(()=>()=>window.clearTimeout(I.current),[]),kr();const $=u.useCallback(F=>{var re,D;return U.current===((re=V.current)==null?void 0:re.side)&&zP(F,(D=V.current)==null?void 0:D.area)},[]);return p.jsx(EP,{scope:n,searchRef:O,onItemEnter:u.useCallback(F=>{$(F)&&F.preventDefault()},[$]),onItemLeave:u.useCallback(F=>{var ne;$(F)||((ne=A.current)==null||ne.focus(),T(null))},[$]),onTriggerLeave:u.useCallback(F=>{$(F)&&F.preventDefault()},[$]),pointerGraceTimerRef:L,onPointerGraceIntentChange:u.useCallback(F=>{V.current=F},[]),children:p.jsx(K,{...H,children:p.jsx(On,{asChild:!0,trapped:o,onMountAutoFocus:k(s,F=>{var ne;F.preventDefault(),(ne=A.current)==null||ne.focus({preventScroll:!0})}),onUnmountAutoFocus:i,children:p.jsx(mt,{asChild:!0,disableOutsidePointerEvents:a,onEscapeKeyDown:c,onPointerDownOutside:d,onFocusOutside:f,onInteractOutside:h,onDismiss:m,children:p.jsx(Ns,{asChild:!0,...x,dir:b.dir,orientation:"vertical",loop:r,currentTabStopId:C,onCurrentTabStopIdChange:T,onEntryFocus:k(l,F=>{b.isUsingKeyboardRef.current||F.preventDefault()}),preventScrollOnEntryFocus:!0,children:p.jsx(Fn,{role:"menu","aria-orientation":"vertical","data-state":Xf(v.open),"data-radix-menu-content":"",dir:b.dir,...w,...g,ref:N,style:{outline:"none",...g.style},onKeyDown:k(g.onKeyDown,F=>{const re=F.target.closest("[data-radix-menu-content]")===F.currentTarget,D=F.ctrlKey||F.altKey||F.metaKey,G=F.key.length===1;re&&(F.key==="Tab"&&F.preventDefault(),!D&&G&&B(F.key));const X=A.current;if(F.target!==X||!gP.includes(F.key))return;F.preventDefault();const Q=S().filter(z=>!z.disabled).map(z=>z.ref.current);Ef.includes(F.key)&&Q.reverse(),$P(Q)}),onBlur:k(e.onBlur,F=>{F.currentTarget.contains(F.target)||(window.clearTimeout(I.current),O.current="")}),onPointerMove:k(e.onPointerMove,Xn(F=>{const ne=F.target,re=_.current!==F.clientX;if(F.currentTarget.contains(ne)&&re){const D=F.clientX>_.current?"right":"left";U.current=D,_.current=F.clientX}}))})})})})})})});Df.displayName=ke;var NP="MenuGroup",xi=u.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return p.jsx(W.div,{role:"group",...r,ref:t})});xi.displayName=NP;var MP="MenuLabel",_f=u.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return p.jsx(W.div,{...r,ref:t})});_f.displayName=MP;var co="MenuItem",kf="menu.itemSelect",uo=u.forwardRef((e,t)=>{const{disabled:n=!1,onSelect:r,...o}=e,s=u.useRef(null),i=Kn(co,e.__scopeMenu),a=bi(co,e.__scopeMenu),l=J(t,s),c=u.useRef(!1),d=()=>{const f=s.current;if(!n&&f){const h=new CustomEvent(kf,{bubbles:!0,cancelable:!0});f.addEventListener(kf,m=>r==null?void 0:r(m),{once:!0}),ws(f,h),h.defaultPrevented?c.current=!1:i.onClose()}};return p.jsx(Of,{...o,ref:l,disabled:n,onClick:k(e.onClick,d),onPointerDown:f=>{var h;(h=e.onPointerDown)==null||h.call(e,f),c.current=!0},onPointerUp:k(e.onPointerUp,f=>{var h;c.current||(h=f.currentTarget)==null||h.click()}),onKeyDown:k(e.onKeyDown,f=>{const h=a.searchRef.current!=="";n||h&&f.key===" "||gi.includes(f.key)&&(f.currentTarget.click(),f.preventDefault())})})});uo.displayName=co;var Of=u.forwardRef((e,t)=>{const{__scopeMenu:n,disabled:r=!1,textValue:o,...s}=e,i=bi(co,n),a=Tf(n),l=u.useRef(null),c=J(t,l),[d,f]=u.useState(!1),[h,m]=u.useState("");return u.useEffect(()=>{const y=l.current;y&&m((y.textContent??"").trim())},[s.children]),p.jsx(Un.ItemSlot,{scope:n,disabled:r,textValue:o??h,children:p.jsx(Ms,{asChild:!0,...a,focusable:!r,children:p.jsx(W.div,{role:"menuitem","data-highlighted":d?"":void 0,"aria-disabled":r||void 0,"data-disabled":r?"":void 0,...s,ref:c,onPointerMove:k(e.onPointerMove,Xn(y=>{r?i.onItemLeave(y):(i.onItemEnter(y),y.defaultPrevented||y.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:k(e.onPointerLeave,Xn(y=>i.onItemLeave(y))),onFocus:k(e.onFocus,()=>f(!0)),onBlur:k(e.onBlur,()=>f(!1))})})})}),IP="MenuCheckboxItem",Lf=u.forwardRef((e,t)=>{const{checked:n=!1,onCheckedChange:r,...o}=e;return p.jsx(Bf,{scope:e.__scopeMenu,checked:n,children:p.jsx(uo,{role:"menuitemcheckbox","aria-checked":fo(n)?"mixed":n,...o,ref:t,"data-state":Ei(n),onSelect:k(o.onSelect,()=>r==null?void 0:r(fo(n)?!0:!n),{checkForDefaultPrevented:!1})})})});Lf.displayName=IP;var Vf="MenuRadioGroup",[DP,_P]=Lt(Vf,{value:void 0,onValueChange:()=>{}}),$f=u.forwardRef((e,t)=>{const{value:n,onValueChange:r,...o}=e,s=de(r);return p.jsx(DP,{scope:e.__scopeMenu,value:n,onValueChange:s,children:p.jsx(xi,{...o,ref:t})})});$f.displayName=Vf;var Ff="MenuRadioItem",Rf=u.forwardRef((e,t)=>{const{value:n,...r}=e,o=_P(Ff,e.__scopeMenu),s=n===o.value;return p.jsx(Bf,{scope:e.__scopeMenu,checked:s,children:p.jsx(uo,{role:"menuitemradio","aria-checked":s,...r,ref:t,"data-state":Ei(s),onSelect:k(r.onSelect,()=>{var i;return(i=o.onValueChange)==null?void 0:i.call(o,n)},{checkForDefaultPrevented:!1})})})});Rf.displayName=Ff;var Si="MenuItemIndicator",[Bf,kP]=Lt(Si,{checked:!1}),zf=u.forwardRef((e,t)=>{const{__scopeMenu:n,forceMount:r,...o}=e,s=kP(Si,n);return p.jsx(ve,{present:r||fo(s.checked)||s.checked===!0,children:p.jsx(W.span,{...o,ref:t,"data-state":Ei(s.checked)})})});zf.displayName=Si;var OP="MenuSeparator",Wf=u.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e;return p.jsx(W.div,{role:"separator","aria-orientation":"horizontal",...r,ref:t})});Wf.displayName=OP;var LP="MenuArrow",Hf=u.forwardRef((e,t)=>{const{__scopeMenu:n,...r}=e,o=Gn(n);return p.jsx(Rn,{...o,...r,ref:t})});Hf.displayName=LP;var Ci="MenuSub",[VP,jf]=Lt(Ci),Uf=e=>{const{__scopeMenu:t,children:n,open:r=!1,onOpenChange:o}=e,s=xt(Ci,t),i=Gn(t),[a,l]=u.useState(null),[c,d]=u.useState(null),f=de(o);return u.useEffect(()=>(s.open===!1&&f(!1),()=>f(!1)),[s.open,f]),p.jsx(en,{...i,children:p.jsx(Af,{scope:t,open:r,onOpenChange:f,content:c,onContentChange:d,children:p.jsx(VP,{scope:t,contentId:he(),triggerId:he(),trigger:a,onTriggerChange:l,children:n})})})};Uf.displayName=Ci;var Yn="MenuSubTrigger",Gf=u.forwardRef((e,t)=>{const n=xt(Yn,e.__scopeMenu),r=Kn(Yn,e.__scopeMenu),o=jf(Yn,e.__scopeMenu),s=bi(Yn,e.__scopeMenu),i=u.useRef(null),{pointerGraceTimerRef:a,onPointerGraceIntentChange:l}=s,c={__scopeMenu:e.__scopeMenu},d=u.useCallback(()=>{i.current&&window.clearTimeout(i.current),i.current=null},[]);return u.useEffect(()=>d,[d]),u.useEffect(()=>{const f=a.current;return()=>{window.clearTimeout(f),l(null)}},[a,l]),p.jsx(vi,{asChild:!0,...c,children:p.jsx(Of,{id:o.triggerId,"aria-haspopup":"menu","aria-expanded":n.open,"aria-controls":o.contentId,"data-state":Xf(n.open),...e,ref:Ce(t,o.onTriggerChange),onClick:f=>{var h;(h=e.onClick)==null||h.call(e,f),!(e.disabled||f.defaultPrevented)&&(f.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:k(e.onPointerMove,Xn(f=>{s.onItemEnter(f),!f.defaultPrevented&&!e.disabled&&!n.open&&!i.current&&(s.onPointerGraceIntentChange(null),i.current=window.setTimeout(()=>{n.onOpenChange(!0),d()},100))})),onPointerLeave:k(e.onPointerLeave,Xn(f=>{var m,y;d();const h=(m=n.content)==null?void 0:m.getBoundingClientRect();if(h){const g=(y=n.content)==null?void 0:y.dataset.side,v=g==="right",b=v?-5:5,w=h[v?"left":"right"],x=h[v?"right":"left"];s.onPointerGraceIntentChange({area:[{x:f.clientX+b,y:f.clientY},{x:w,y:h.top},{x,y:h.top},{x,y:h.bottom},{x:w,y:h.bottom}],side:g}),window.clearTimeout(a.current),a.current=window.setTimeout(()=>s.onPointerGraceIntentChange(null),300)}else{if(s.onTriggerLeave(f),f.defaultPrevented)return;s.onPointerGraceIntentChange(null)}})),onKeyDown:k(e.onKeyDown,f=>{var m;const h=s.searchRef.current!=="";e.disabled||h&&f.key===" "||vP[r.dir].includes(f.key)&&(n.onOpenChange(!0),(m=n.content)==null||m.focus(),f.preventDefault())})})})});Gf.displayName=Yn;var Kf="MenuSubContent",Yf=u.forwardRef((e,t)=>{const n=Mf(ke,e.__scopeMenu),{forceMount:r=n.forceMount,...o}=e,s=xt(ke,e.__scopeMenu),i=Kn(ke,e.__scopeMenu),a=jf(Kf,e.__scopeMenu),l=u.useRef(null),c=J(t,l);return p.jsx(Un.Provider,{scope:e.__scopeMenu,children:p.jsx(ve,{present:r||s.open,children:p.jsx(Un.Slot,{scope:e.__scopeMenu,children:p.jsx(wi,{id:a.contentId,"aria-labelledby":a.triggerId,...o,ref:c,align:"start",side:i.dir==="rtl"?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:d=>{var f;i.isUsingKeyboardRef.current&&((f=l.current)==null||f.focus()),d.preventDefault()},onCloseAutoFocus:d=>d.preventDefault(),onFocusOutside:k(e.onFocusOutside,d=>{d.target!==a.trigger&&s.onOpenChange(!1)}),onEscapeKeyDown:k(e.onEscapeKeyDown,d=>{i.onClose(),d.preventDefault()}),onKeyDown:k(e.onKeyDown,d=>{var m;const f=d.currentTarget.contains(d.target),h=yP[i.dir].includes(d.key);f&&h&&(s.onOpenChange(!1),(m=a.trigger)==null||m.focus(),d.preventDefault())})})})})})});Yf.displayName=Kf;function Xf(e){return e?"open":"closed"}function fo(e){return e==="indeterminate"}function Ei(e){return fo(e)?"indeterminate":e?"checked":"unchecked"}function $P(e){const t=document.activeElement;for(const n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function FP(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function RP(e,t,n){const o=t.length>1&&Array.from(t).every(c=>c===t[0])?t[0]:t,s=n?e.indexOf(n):-1;let i=FP(e,Math.max(s,0));o.length===1&&(i=i.filter(c=>c!==n));const l=i.find(c=>c.toLowerCase().startsWith(o.toLowerCase()));return l!==n?l:void 0}function BP(e,t){const{x:n,y:r}=e;let o=!1;for(let s=0,i=t.length-1;s<t.length;i=s++){const a=t[s],l=t[i],c=a.x,d=a.y,f=l.x,h=l.y;d>r!=h>r&&n<(f-c)*(r-d)/(h-d)+c&&(o=!o)}return o}function zP(e,t){if(!t)return!1;const n={x:e.clientX,y:e.clientY};return BP(n,t)}function Xn(e){return t=>t.pointerType==="mouse"?e(t):void 0}var WP=Nf,HP=vi,jP=If,UP=Df,GP=xi,KP=_f,YP=uo,XP=Lf,qP=$f,ZP=Rf,JP=zf,QP=Wf,eT=Hf,tT=Uf,nT=Gf,rT=Yf,po="DropdownMenu",[oT]=ye(po,[Pf]),xe=Pf(),[sT,qf]=oT(po),Zf=e=>{const{__scopeDropdownMenu:t,children:n,dir:r,open:o,defaultOpen:s,onOpenChange:i,modal:a=!0}=e,l=xe(t),c=u.useRef(null),[d,f]=we({prop:o,defaultProp:s??!1,onChange:i,caller:po});return p.jsx(sT,{scope:t,triggerId:he(),triggerRef:c,contentId:he(),open:d,onOpenChange:f,onOpenToggle:u.useCallback(()=>f(h=>!h),[f]),modal:a,children:p.jsx(WP,{...l,open:d,onOpenChange:f,dir:r,modal:a,children:n})})};Zf.displayName=po;var Jf="DropdownMenuTrigger",Qf=u.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,disabled:r=!1,...o}=e,s=qf(Jf,n),i=xe(n);return p.jsx(HP,{asChild:!0,...i,children:p.jsx(W.button,{type:"button",id:s.triggerId,"aria-haspopup":"menu","aria-expanded":s.open,"aria-controls":s.open?s.contentId:void 0,"data-state":s.open?"open":"closed","data-disabled":r?"":void 0,disabled:r,...o,ref:Ce(t,s.triggerRef),onPointerDown:k(e.onPointerDown,a=>{!r&&a.button===0&&a.ctrlKey===!1&&(s.onOpenToggle(),s.open||a.preventDefault())}),onKeyDown:k(e.onKeyDown,a=>{r||(["Enter"," "].includes(a.key)&&s.onOpenToggle(),a.key==="ArrowDown"&&s.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(a.key)&&a.preventDefault())})})})});Qf.displayName=Jf;var iT="DropdownMenuPortal",ep=e=>{const{__scopeDropdownMenu:t,...n}=e,r=xe(t);return p.jsx(jP,{...r,...n})};ep.displayName=iT;var tp="DropdownMenuContent",np=u.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=qf(tp,n),s=xe(n),i=u.useRef(!1);return p.jsx(UP,{id:o.contentId,"aria-labelledby":o.triggerId,...s,...r,ref:t,onCloseAutoFocus:k(e.onCloseAutoFocus,a=>{var l;i.current||(l=o.triggerRef.current)==null||l.focus(),i.current=!1,a.preventDefault()}),onInteractOutside:k(e.onInteractOutside,a=>{const l=a.detail.originalEvent,c=l.button===0&&l.ctrlKey===!0,d=l.button===2||c;(!o.modal||d)&&(i.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});np.displayName=tp;var aT="DropdownMenuGroup",rp=u.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=xe(n);return p.jsx(GP,{...o,...r,ref:t})});rp.displayName=aT;var lT="DropdownMenuLabel",op=u.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=xe(n);return p.jsx(KP,{...o,...r,ref:t})});op.displayName=lT;var cT="DropdownMenuItem",sp=u.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=xe(n);return p.jsx(YP,{...o,...r,ref:t})});sp.displayName=cT;var uT="DropdownMenuCheckboxItem",ip=u.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=xe(n);return p.jsx(XP,{...o,...r,ref:t})});ip.displayName=uT;var dT="DropdownMenuRadioGroup",ap=u.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=xe(n);return p.jsx(qP,{...o,...r,ref:t})});ap.displayName=dT;var fT="DropdownMenuRadioItem",lp=u.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=xe(n);return p.jsx(ZP,{...o,...r,ref:t})});lp.displayName=fT;var pT="DropdownMenuItemIndicator",cp=u.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=xe(n);return p.jsx(JP,{...o,...r,ref:t})});cp.displayName=pT;var hT="DropdownMenuSeparator",up=u.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=xe(n);return p.jsx(QP,{...o,...r,ref:t})});up.displayName=hT;var mT="DropdownMenuArrow",gT=u.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=xe(n);return p.jsx(eT,{...o,...r,ref:t})});gT.displayName=mT;var vT=e=>{const{__scopeDropdownMenu:t,children:n,open:r,onOpenChange:o,defaultOpen:s}=e,i=xe(t),[a,l]=we({prop:r,defaultProp:s??!1,onChange:o,caller:"DropdownMenuSub"});return p.jsx(tT,{...i,open:a,onOpenChange:l,children:n})},yT="DropdownMenuSubTrigger",dp=u.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=xe(n);return p.jsx(nT,{...o,...r,ref:t})});dp.displayName=yT;var bT="DropdownMenuSubContent",fp=u.forwardRef((e,t)=>{const{__scopeDropdownMenu:n,...r}=e,o=xe(n);return p.jsx(rT,{...o,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}})});fp.displayName=bT;var wT=Zf,xT=Qf,pp=ep,hp=np,ST=rp,mp=op,gp=sp,vp=ip,CT=ap,yp=lp,bp=cp,wp=up,ET=vT,xp=dp,Sp=fp;const PT=wT,TT=xT,AT=ST,NT=pp,MT=ET,IT=CT,Cp=u.forwardRef(({className:e,inset:t,children:n,...r},o)=>p.jsxs(xp,{ref:o,className:M("flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none focus:bg-accent data-[state=open]:bg-accent",t&&"pl-8",e),...r,children:[n,p.jsx(Es,{className:"ml-auto h-4 w-4"})]}));Cp.displayName=xp.displayName;const Ep=u.forwardRef(({className:e,...t},n)=>p.jsx(Sp,{ref:n,className:M("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-lg data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...t}));Ep.displayName=Sp.displayName;const Pp=u.forwardRef(({className:e,sideOffset:t=4,...n},r)=>p.jsx(pp,{children:p.jsx(hp,{ref:r,sideOffset:t,className:M("z-50 min-w-[8rem] overflow-hidden rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n})}));Pp.displayName=hp.displayName;const Tp=u.forwardRef(({className:e,inset:t,...n},r)=>p.jsx(gp,{ref:r,className:M("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",t&&"pl-8",e),...n}));Tp.displayName=gp.displayName;const Ap=u.forwardRef(({className:e,children:t,checked:n,...r},o)=>p.jsxs(vp,{ref:o,className:M("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),checked:n,...r,children:[p.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:p.jsx(bp,{children:p.jsx(Cs,{className:"h-4 w-4"})})}),t]}));Ap.displayName=vp.displayName;const Np=u.forwardRef(({className:e,children:t,...n},r)=>p.jsxs(yp,{ref:r,className:M("relative flex cursor-default select-none items-center rounded-sm py-1.5 pl-8 pr-2 text-sm outline-none transition-colors focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...n,children:[p.jsx("span",{className:"absolute left-2 flex h-3.5 w-3.5 items-center justify-center",children:p.jsx(bp,{children:p.jsx(vc,{className:"h-2 w-2 fill-current"})})}),t]}));Np.displayName=yp.displayName;const Mp=u.forwardRef(({className:e,inset:t,...n},r)=>p.jsx(mp,{ref:r,className:M("px-2 py-1.5 text-sm font-semibold",t&&"pl-8",e),...n}));Mp.displayName=mp.displayName;const Ip=u.forwardRef(({className:e,...t},n)=>p.jsx(wp,{ref:n,className:M("-mx-1 my-1 h-px bg-muted",e),...t}));Ip.displayName=wp.displayName;const Dp=({className:e,...t})=>p.jsx("span",{className:M("ml-auto text-xs tracking-widest opacity-60",e),...t});Dp.displayName="DropdownMenuShortcut";function DT(e){const t=_T(e),n=u.forwardRef((r,o)=>{const{children:s,...i}=r,a=u.Children.toArray(s),l=a.find(OT);if(l){const c=l.props.children,d=a.map(f=>f===l?u.Children.count(c)>1?u.Children.only(null):u.isValidElement(c)?c.props.children:null:f);return p.jsx(t,{...i,ref:o,children:u.isValidElement(c)?u.cloneElement(c,void 0,d):null})}return p.jsx(t,{...i,ref:o,children:s})});return n.displayName=`${e}.Slot`,n}function _T(e){const t=u.forwardRef((n,r)=>{const{children:o,...s}=n;if(u.isValidElement(o)){const i=VT(o),a=LT(s,o.props);return o.type!==u.Fragment&&(a.ref=r?Ce(r,i):i),u.cloneElement(o,a)}return u.Children.count(o)>1?u.Children.only(null):null});return t.displayName=`${e}.SlotClone`,t}var kT=Symbol("radix.slottable");function OT(e){return u.isValidElement(e)&&typeof e.type=="function"&&"__radixId"in e.type&&e.type.__radixId===kT}function LT(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 l=s(...a);return o(...a),l}:o&&(n[r]=o):r==="style"?n[r]={...o,...s}:r==="className"&&(n[r]=[o,s].filter(Boolean).join(" "))}return{...e,...n}}function VT(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 ho="Popover",[_p]=ye(ho,[qe]),qn=qe(),[$T,St]=_p(ho),kp=e=>{const{__scopePopover:t,children:n,open:r,defaultOpen:o,onOpenChange:s,modal:i=!1}=e,a=qn(t),l=u.useRef(null),[c,d]=u.useState(!1),[f,h]=we({prop:r,defaultProp:o??!1,onChange:s,caller:ho});return p.jsx(en,{...a,children:p.jsx($T,{scope:t,contentId:he(),triggerRef:l,open:f,onOpenChange:h,onOpenToggle:u.useCallback(()=>h(m=>!m),[h]),hasCustomAnchor:c,onCustomAnchorAdd:u.useCallback(()=>d(!0),[]),onCustomAnchorRemove:u.useCallback(()=>d(!1),[]),modal:i,children:n})})};kp.displayName=ho;var Op="PopoverAnchor",FT=u.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=St(Op,n),s=qn(n),{onCustomAnchorAdd:i,onCustomAnchorRemove:a}=o;return u.useEffect(()=>(i(),()=>a()),[i,a]),p.jsx(tn,{...s,...r,ref:t})});FT.displayName=Op;var Lp="PopoverTrigger",Vp=u.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=St(Lp,n),s=qn(n),i=J(t,o.triggerRef),a=p.jsx(W.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":zp(o.open),...r,ref:i,onClick:k(e.onClick,o.onOpenToggle)});return o.hasCustomAnchor?a:p.jsx(tn,{asChild:!0,...s,children:a})});Vp.displayName=Lp;var Pi="PopoverPortal",[RT,BT]=_p(Pi,{forceMount:void 0}),$p=e=>{const{__scopePopover:t,forceMount:n,children:r,container:o}=e,s=St(Pi,t);return p.jsx(RT,{scope:t,forceMount:n,children:p.jsx(ve,{present:n||s.open,children:p.jsx(nn,{asChild:!0,container:o,children:r})})})};$p.displayName=Pi;var un="PopoverContent",Fp=u.forwardRef((e,t)=>{const n=BT(un,e.__scopePopover),{forceMount:r=n.forceMount,...o}=e,s=St(un,e.__scopePopover);return p.jsx(ve,{present:r||s.open,children:s.modal?p.jsx(WT,{...o,ref:t}):p.jsx(HT,{...o,ref:t})})});Fp.displayName=un;var zT=DT("PopoverContent.RemoveScroll"),WT=u.forwardRef((e,t)=>{const n=St(un,e.__scopePopover),r=u.useRef(null),o=J(t,r),s=u.useRef(!1);return u.useEffect(()=>{const i=r.current;if(i)return Kr(i)},[]),p.jsx(Bn,{as:zT,allowPinchZoom:!0,children:p.jsx(Rp,{...e,ref:o,trapFocus:n.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:k(e.onCloseAutoFocus,i=>{var a;i.preventDefault(),s.current||(a=n.triggerRef.current)==null||a.focus()}),onPointerDownOutside:k(e.onPointerDownOutside,i=>{const a=i.detail.originalEvent,l=a.button===0&&a.ctrlKey===!0,c=a.button===2||l;s.current=c},{checkForDefaultPrevented:!1}),onFocusOutside:k(e.onFocusOutside,i=>i.preventDefault(),{checkForDefaultPrevented:!1})})})}),HT=u.forwardRef((e,t)=>{const n=St(un,e.__scopePopover),r=u.useRef(!1),o=u.useRef(!1);return p.jsx(Rp,{...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 l,c;(l=e.onInteractOutside)==null||l.call(e,s),s.defaultPrevented||(r.current=!0,s.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const i=s.target;((c=n.triggerRef.current)==null?void 0:c.contains(i))&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&o.current&&s.preventDefault()}})}),Rp=u.forwardRef((e,t)=>{const{__scopePopover:n,trapFocus:r,onOpenAutoFocus:o,onCloseAutoFocus:s,disableOutsidePointerEvents:i,onEscapeKeyDown:a,onPointerDownOutside:l,onFocusOutside:c,onInteractOutside:d,...f}=e,h=St(un,n),m=qn(n);return kr(),p.jsx(On,{asChild:!0,loop:!0,trapped:r,onMountAutoFocus:o,onUnmountAutoFocus:s,children:p.jsx(mt,{asChild:!0,disableOutsidePointerEvents:i,onInteractOutside:d,onEscapeKeyDown:a,onPointerDownOutside:l,onFocusOutside:c,onDismiss:()=>h.onOpenChange(!1),children:p.jsx(Fn,{"data-state":zp(h.open),role:"dialog",id:h.contentId,...m,...f,ref:t,style:{...f.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)"}})})})}),Bp="PopoverClose",jT=u.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=St(Bp,n);return p.jsx(W.button,{type:"button",...r,ref:t,onClick:k(e.onClick,()=>o.onOpenChange(!1))})});jT.displayName=Bp;var UT="PopoverArrow",GT=u.forwardRef((e,t)=>{const{__scopePopover:n,...r}=e,o=qn(n);return p.jsx(Rn,{...o,...r,ref:t})});GT.displayName=UT;function zp(e){return e?"open":"closed"}var KT=kp,YT=Vp,XT=$p,Wp=Fp;const qT=KT,ZT=YT,Hp=u.forwardRef(({className:e,align:t="center",sideOffset:n=4,...r},o)=>p.jsx(XT,{children:p.jsx(Wp,{ref:o,align:t,sideOffset:n,className:M("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})}));Hp.displayName=Wp.displayName;var JT=Symbol("radix.slottable");function QT(e){const t=({children:n})=>p.jsx(p.Fragment,{children:n});return t.displayName=`${e}.Slottable`,t.__radixId=JT,t}var[mo]=ye("Tooltip",[qe]),go=qe(),jp="TooltipProvider",eA=700,Ti="tooltip.open",[tA,Ai]=mo(jp),Up=e=>{const{__scopeTooltip:t,delayDuration:n=eA,skipDelayDuration:r=300,disableHoverableContent:o=!1,children:s}=e,i=u.useRef(!0),a=u.useRef(!1),l=u.useRef(0);return u.useEffect(()=>{const c=l.current;return()=>window.clearTimeout(c)},[]),p.jsx(tA,{scope:t,isOpenDelayedRef:i,delayDuration:n,onOpen:u.useCallback(()=>{window.clearTimeout(l.current),i.current=!1},[]),onClose:u.useCallback(()=>{window.clearTimeout(l.current),l.current=window.setTimeout(()=>i.current=!0,r)},[r]),isPointerInTransitRef:a,onPointerInTransitChange:u.useCallback(c=>{a.current=c},[]),disableHoverableContent:o,children:s})};Up.displayName=jp;var Zn="Tooltip",[nA,vo]=mo(Zn),Gp=e=>{const{__scopeTooltip:t,children:n,open:r,defaultOpen:o,onOpenChange:s,disableHoverableContent:i,delayDuration:a}=e,l=Ai(Zn,e.__scopeTooltip),c=go(t),[d,f]=u.useState(null),h=he(),m=u.useRef(0),y=i??l.disableHoverableContent,g=a??l.delayDuration,v=u.useRef(!1),[b,w]=we({prop:r,defaultProp:o??!1,onChange:A=>{A?(l.onOpen(),document.dispatchEvent(new CustomEvent(Ti))):l.onClose(),s==null||s(A)},caller:Zn}),x=u.useMemo(()=>b?v.current?"delayed-open":"instant-open":"closed",[b]),S=u.useCallback(()=>{window.clearTimeout(m.current),m.current=0,v.current=!1,w(!0)},[w]),C=u.useCallback(()=>{window.clearTimeout(m.current),m.current=0,w(!1)},[w]),T=u.useCallback(()=>{window.clearTimeout(m.current),m.current=window.setTimeout(()=>{v.current=!0,w(!0),m.current=0},g)},[g,w]);return u.useEffect(()=>()=>{m.current&&(window.clearTimeout(m.current),m.current=0)},[]),p.jsx(en,{...c,children:p.jsx(nA,{scope:t,contentId:h,open:b,stateAttribute:x,trigger:d,onTriggerChange:f,onTriggerEnter:u.useCallback(()=>{l.isOpenDelayedRef.current?T():S()},[l.isOpenDelayedRef,T,S]),onTriggerLeave:u.useCallback(()=>{y?C():(window.clearTimeout(m.current),m.current=0)},[C,y]),onOpen:S,onClose:C,disableHoverableContent:y,children:n})})};Gp.displayName=Zn;var Ni="TooltipTrigger",Kp=u.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=vo(Ni,n),s=Ai(Ni,n),i=go(n),a=u.useRef(null),l=J(t,a,o.onTriggerChange),c=u.useRef(!1),d=u.useRef(!1),f=u.useCallback(()=>c.current=!1,[]);return u.useEffect(()=>()=>document.removeEventListener("pointerup",f),[f]),p.jsx(tn,{asChild:!0,...i,children:p.jsx(W.button,{"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute,...r,ref:l,onPointerMove:k(e.onPointerMove,h=>{h.pointerType!=="touch"&&!d.current&&!s.isPointerInTransitRef.current&&(o.onTriggerEnter(),d.current=!0)}),onPointerLeave:k(e.onPointerLeave,()=>{o.onTriggerLeave(),d.current=!1}),onPointerDown:k(e.onPointerDown,()=>{o.open&&o.onClose(),c.current=!0,document.addEventListener("pointerup",f,{once:!0})}),onFocus:k(e.onFocus,()=>{c.current||o.onOpen()}),onBlur:k(e.onBlur,o.onClose),onClick:k(e.onClick,o.onClose)})})});Kp.displayName=Ni;var rA="TooltipPortal",[YO,oA]=mo(rA,{forceMount:void 0}),dn="TooltipContent",Yp=u.forwardRef((e,t)=>{const n=oA(dn,e.__scopeTooltip),{forceMount:r=n.forceMount,side:o="top",...s}=e,i=vo(dn,e.__scopeTooltip);return p.jsx(ve,{present:r||i.open,children:i.disableHoverableContent?p.jsx(Xp,{side:o,...s,ref:t}):p.jsx(sA,{side:o,...s,ref:t})})}),sA=u.forwardRef((e,t)=>{const n=vo(dn,e.__scopeTooltip),r=Ai(dn,e.__scopeTooltip),o=u.useRef(null),s=J(t,o),[i,a]=u.useState(null),{trigger:l,onClose:c}=n,d=o.current,{onPointerInTransitChange:f}=r,h=u.useCallback(()=>{a(null),f(!1)},[f]),m=u.useCallback((y,g)=>{const v=y.currentTarget,b={x:y.clientX,y:y.clientY},w=uA(b,v.getBoundingClientRect()),x=dA(b,w),S=fA(g.getBoundingClientRect()),C=hA([...x,...S]);a(C),f(!0)},[f]);return u.useEffect(()=>()=>h(),[h]),u.useEffect(()=>{if(l&&d){const y=v=>m(v,d),g=v=>m(v,l);return l.addEventListener("pointerleave",y),d.addEventListener("pointerleave",g),()=>{l.removeEventListener("pointerleave",y),d.removeEventListener("pointerleave",g)}}},[l,d,m,h]),u.useEffect(()=>{if(i){const y=g=>{const v=g.target,b={x:g.clientX,y:g.clientY},w=(l==null?void 0:l.contains(v))||(d==null?void 0:d.contains(v)),x=!pA(b,i);w?h():x&&(h(),c())};return document.addEventListener("pointermove",y),()=>document.removeEventListener("pointermove",y)}},[l,d,i,c,h]),p.jsx(Xp,{...e,ref:s})}),[iA,aA]=mo(Zn,{isInside:!1}),lA=QT("TooltipContent"),Xp=u.forwardRef((e,t)=>{const{__scopeTooltip:n,children:r,"aria-label":o,onEscapeKeyDown:s,onPointerDownOutside:i,...a}=e,l=vo(dn,n),c=go(n),{onClose:d}=l;return u.useEffect(()=>(document.addEventListener(Ti,d),()=>document.removeEventListener(Ti,d)),[d]),u.useEffect(()=>{if(l.trigger){const f=h=>{const m=h.target;m!=null&&m.contains(l.trigger)&&d()};return window.addEventListener("scroll",f,{capture:!0}),()=>window.removeEventListener("scroll",f,{capture:!0})}},[l.trigger,d]),p.jsx(mt,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:i,onFocusOutside:f=>f.preventDefault(),onDismiss:d,children:p.jsxs(Fn,{"data-state":l.stateAttribute,...c,...a,ref:t,style:{...a.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"},children:[p.jsx(lA,{children:r}),p.jsx(iA,{scope:n,isInside:!0,children:p.jsx(lC,{id:l.contentId,role:"tooltip",children:o||r})})]})})});Yp.displayName=dn;var qp="TooltipArrow",cA=u.forwardRef((e,t)=>{const{__scopeTooltip:n,...r}=e,o=go(n);return aA(qp,n).isInside?null:p.jsx(Rn,{...o,...r,ref:t})});cA.displayName=qp;function uA(e,t){const n=Math.abs(t.top-e.y),r=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),s=Math.abs(t.left-e.x);switch(Math.min(n,r,o,s)){case s:return"left";case o:return"right";case n:return"top";case r:return"bottom";default:throw new Error("unreachable")}}function dA(e,t,n=5){const r=[];switch(t){case"top":r.push({x:e.x-n,y:e.y+n},{x:e.x+n,y:e.y+n});break;case"bottom":r.push({x:e.x-n,y:e.y-n},{x:e.x+n,y:e.y-n});break;case"left":r.push({x:e.x+n,y:e.y-n},{x:e.x+n,y:e.y+n});break;case"right":r.push({x:e.x-n,y:e.y-n},{x:e.x-n,y:e.y+n});break}return r}function fA(e){const{top:t,right:n,bottom:r,left:o}=e;return[{x:o,y:t},{x:n,y:t},{x:n,y:r},{x:o,y:r}]}function pA(e,t){const{x:n,y:r}=e;let o=!1;for(let s=0,i=t.length-1;s<t.length;i=s++){const a=t[s],l=t[i],c=a.x,d=a.y,f=l.x,h=l.y;d>r!=h>r&&n<(f-c)*(r-d)/(h-d)+c&&(o=!o)}return o}function hA(e){const t=e.slice();return t.sort((n,r)=>n.x<r.x?-1:n.x>r.x?1:n.y<r.y?-1:n.y>r.y?1:0),mA(t)}function mA(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r<e.length;r++){const o=e[r];for(;t.length>=2;){const s=t[t.length-1],i=t[t.length-2];if((s.x-i.x)*(o.y-i.y)>=(s.y-i.y)*(o.x-i.x))t.pop();else break}t.push(o)}t.pop();const n=[];for(let r=e.length-1;r>=0;r--){const o=e[r];for(;n.length>=2;){const s=n[n.length-1],i=n[n.length-2];if((s.x-i.x)*(o.y-i.y)>=(s.y-i.y)*(o.x-i.x))n.pop();else break}n.push(o)}return n.pop(),t.length===1&&n.length===1&&t[0].x===n[0].x&&t[0].y===n[0].y?t:t.concat(n)}var gA=Up,vA=Gp,yA=Kp,Zp=Yp;const bA=gA,wA=vA,xA=yA,Jp=u.forwardRef(({className:e,sideOffset:t=4,...n},r)=>p.jsx(Zp,{ref:r,sideOffset:t,className:M("z-50 overflow-hidden rounded-md border bg-popover px-3 py-1.5 text-sm text-popover-foreground shadow-md animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...n}));Jp.displayName=Zp.displayName;var Mi="ToastProvider",[Ii,SA,CA]=Yt("Toast"),[Qp]=ye("Toast",[CA]),[EA,yo]=Qp(Mi),eh=e=>{const{__scopeToast:t,label:n="Notification",duration:r=5e3,swipeDirection:o="right",swipeThreshold:s=50,children:i}=e,[a,l]=u.useState(null),[c,d]=u.useState(0),f=u.useRef(!1),h=u.useRef(!1);return n.trim()||console.error(`Invalid prop \`label\` supplied to \`${Mi}\`. Expected non-empty \`string\`.`),p.jsx(Ii.Provider,{scope:t,children:p.jsx(EA,{scope:t,label:n,duration:r,swipeDirection:o,swipeThreshold:s,toastCount:c,viewport:a,onViewportChange:l,onToastAdd:u.useCallback(()=>d(m=>m+1),[]),onToastRemove:u.useCallback(()=>d(m=>m-1),[]),isFocusedToastEscapeKeyDownRef:f,isClosePausedRef:h,children:i})})};eh.displayName=Mi;var th="ToastViewport",PA=["F8"],Di="toast.viewportPause",_i="toast.viewportResume",nh=u.forwardRef((e,t)=>{const{__scopeToast:n,hotkey:r=PA,label:o="Notifications ({hotkey})",...s}=e,i=yo(th,n),a=SA(n),l=u.useRef(null),c=u.useRef(null),d=u.useRef(null),f=u.useRef(null),h=J(t,f,i.onViewportChange),m=r.join("+").replace(/Key/g,"").replace(/Digit/g,""),y=i.toastCount>0;u.useEffect(()=>{const v=b=>{var x;r.length!==0&&r.every(S=>b[S]||b.code===S)&&((x=f.current)==null||x.focus())};return document.addEventListener("keydown",v),()=>document.removeEventListener("keydown",v)},[r]),u.useEffect(()=>{const v=l.current,b=f.current;if(y&&v&&b){const w=()=>{if(!i.isClosePausedRef.current){const T=new CustomEvent(Di);b.dispatchEvent(T),i.isClosePausedRef.current=!0}},x=()=>{if(i.isClosePausedRef.current){const T=new CustomEvent(_i);b.dispatchEvent(T),i.isClosePausedRef.current=!1}},S=T=>{!v.contains(T.relatedTarget)&&x()},C=()=>{v.contains(document.activeElement)||x()};return v.addEventListener("focusin",w),v.addEventListener("focusout",S),v.addEventListener("pointermove",w),v.addEventListener("pointerleave",C),window.addEventListener("blur",w),window.addEventListener("focus",x),()=>{v.removeEventListener("focusin",w),v.removeEventListener("focusout",S),v.removeEventListener("pointermove",w),v.removeEventListener("pointerleave",C),window.removeEventListener("blur",w),window.removeEventListener("focus",x)}}},[y,i.isClosePausedRef]);const g=u.useCallback(({tabbingDirection:v})=>{const w=a().map(x=>{const S=x.ref.current,C=[S,...FA(S)];return v==="forwards"?C:C.reverse()});return(v==="forwards"?w.reverse():w).flat()},[a]);return u.useEffect(()=>{const v=f.current;if(v){const b=w=>{var C,T,A;const x=w.altKey||w.ctrlKey||w.metaKey;if(w.key==="Tab"&&!x){const N=document.activeElement,I=w.shiftKey;if(w.target===v&&I){(C=c.current)==null||C.focus();return}const V=g({tabbingDirection:I?"backwards":"forwards"}),U=V.findIndex(_=>_===N);Li(V.slice(U+1))?w.preventDefault():I?(T=c.current)==null||T.focus():(A=d.current)==null||A.focus()}};return v.addEventListener("keydown",b),()=>v.removeEventListener("keydown",b)}},[a,g]),p.jsxs(Nx,{ref:l,role:"region","aria-label":o.replace("{hotkey}",m),tabIndex:-1,style:{pointerEvents:y?void 0:"none"},children:[y&&p.jsx(ki,{ref:c,onFocusFromOutsideViewport:()=>{const v=g({tabbingDirection:"forwards"});Li(v)}}),p.jsx(Ii.Slot,{scope:n,children:p.jsx(W.ol,{tabIndex:-1,...s,ref:h})}),y&&p.jsx(ki,{ref:d,onFocusFromOutsideViewport:()=>{const v=g({tabbingDirection:"backwards"});Li(v)}})]})});nh.displayName=th;var rh="ToastFocusProxy",ki=u.forwardRef((e,t)=>{const{__scopeToast:n,onFocusFromOutsideViewport:r,...o}=e,s=yo(rh,n);return p.jsx(jr,{tabIndex:0,...o,ref:t,style:{position:"fixed"},onFocus:i=>{var c;const a=i.relatedTarget;!((c=s.viewport)!=null&&c.contains(a))&&r()}})});ki.displayName=rh;var Jn="Toast",TA="toast.swipeStart",AA="toast.swipeMove",NA="toast.swipeCancel",MA="toast.swipeEnd",oh=u.forwardRef((e,t)=>{const{forceMount:n,open:r,defaultOpen:o,onOpenChange:s,...i}=e,[a,l]=we({prop:r,defaultProp:o??!0,onChange:s,caller:Jn});return p.jsx(ve,{present:n||a,children:p.jsx(_A,{open:a,...i,ref:t,onClose:()=>l(!1),onPause:de(e.onPause),onResume:de(e.onResume),onSwipeStart:k(e.onSwipeStart,c=>{c.currentTarget.setAttribute("data-swipe","start")}),onSwipeMove:k(e.onSwipeMove,c=>{const{x:d,y:f}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","move"),c.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${d}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${f}px`)}),onSwipeCancel:k(e.onSwipeCancel,c=>{c.currentTarget.setAttribute("data-swipe","cancel"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")}),onSwipeEnd:k(e.onSwipeEnd,c=>{const{x:d,y:f}=c.detail.delta;c.currentTarget.setAttribute("data-swipe","end"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),c.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),c.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${d}px`),c.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${f}px`),l(!1)})})})});oh.displayName=Jn;var[IA,DA]=Qp(Jn,{onClose(){}}),_A=u.forwardRef((e,t)=>{const{__scopeToast:n,type:r="foreground",duration:o,open:s,onClose:i,onEscapeKeyDown:a,onPause:l,onResume:c,onSwipeStart:d,onSwipeMove:f,onSwipeCancel:h,onSwipeEnd:m,...y}=e,g=yo(Jn,n),[v,b]=u.useState(null),w=J(t,_=>b(_)),x=u.useRef(null),S=u.useRef(null),C=o||g.duration,T=u.useRef(0),A=u.useRef(C),N=u.useRef(0),{onToastAdd:I,onToastRemove:O}=g,L=de(()=>{var K;(v==null?void 0:v.contains(document.activeElement))&&((K=g.viewport)==null||K.focus()),i()}),V=u.useCallback(_=>{!_||_===1/0||(window.clearTimeout(N.current),T.current=new Date().getTime(),N.current=window.setTimeout(L,_))},[L]);u.useEffect(()=>{const _=g.viewport;if(_){const K=()=>{V(A.current),c==null||c()},H=()=>{const B=new Date().getTime()-T.current;A.current=A.current-B,window.clearTimeout(N.current),l==null||l()};return _.addEventListener(Di,H),_.addEventListener(_i,K),()=>{_.removeEventListener(Di,H),_.removeEventListener(_i,K)}}},[g.viewport,C,l,c,V]),u.useEffect(()=>{s&&!g.isClosePausedRef.current&&V(C)},[s,C,g.isClosePausedRef,V]),u.useEffect(()=>(I(),()=>O()),[I,O]);const U=u.useMemo(()=>v?dh(v):null,[v]);return g.viewport?p.jsxs(p.Fragment,{children:[U&&p.jsx(kA,{__scopeToast:n,role:"status","aria-live":r==="foreground"?"assertive":"polite",children:U}),p.jsx(IA,{scope:n,onClose:L,children:Tn.createPortal(p.jsx(Ii.ItemSlot,{scope:n,children:p.jsx(Ax,{asChild:!0,onEscapeKeyDown:k(a,()=>{g.isFocusedToastEscapeKeyDownRef.current||L(),g.isFocusedToastEscapeKeyDownRef.current=!1}),children:p.jsx(W.li,{tabIndex:0,"data-state":s?"open":"closed","data-swipe-direction":g.swipeDirection,...y,ref:w,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:k(e.onKeyDown,_=>{_.key==="Escape"&&(a==null||a(_.nativeEvent),_.nativeEvent.defaultPrevented||(g.isFocusedToastEscapeKeyDownRef.current=!0,L()))}),onPointerDown:k(e.onPointerDown,_=>{_.button===0&&(x.current={x:_.clientX,y:_.clientY})}),onPointerMove:k(e.onPointerMove,_=>{if(!x.current)return;const K=_.clientX-x.current.x,H=_.clientY-x.current.y,B=!!S.current,$=["left","right"].includes(g.swipeDirection),F=["left","up"].includes(g.swipeDirection)?Math.min:Math.max,ne=$?F(0,K):0,re=$?0:F(0,H),D=_.pointerType==="touch"?10:2,G={x:ne,y:re},X={originalEvent:_,delta:G};B?(S.current=G,bo(AA,f,X,{discrete:!1})):fh(G,g.swipeDirection,D)?(S.current=G,bo(TA,d,X,{discrete:!1}),_.target.setPointerCapture(_.pointerId)):(Math.abs(K)>D||Math.abs(H)>D)&&(x.current=null)}),onPointerUp:k(e.onPointerUp,_=>{const K=S.current,H=_.target;if(H.hasPointerCapture(_.pointerId)&&H.releasePointerCapture(_.pointerId),S.current=null,x.current=null,K){const B=_.currentTarget,$={originalEvent:_,delta:K};fh(K,g.swipeDirection,g.swipeThreshold)?bo(MA,m,$,{discrete:!0}):bo(NA,h,$,{discrete:!0}),B.addEventListener("click",F=>F.preventDefault(),{once:!0})}})})})}),g.viewport)})]}):null}),kA=e=>{const{__scopeToast:t,children:n,...r}=e,o=yo(Jn,t),[s,i]=u.useState(!1),[a,l]=u.useState(!1);return VA(()=>i(!0)),u.useEffect(()=>{const c=window.setTimeout(()=>l(!0),1e3);return()=>window.clearTimeout(c)},[]),a?null:p.jsx(nn,{asChild:!0,children:p.jsx(jr,{...r,children:s&&p.jsxs(p.Fragment,{children:[o.label," ",n]})})})},OA="ToastTitle",sh=u.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return p.jsx(W.div,{...r,ref:t})});sh.displayName=OA;var LA="ToastDescription",ih=u.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e;return p.jsx(W.div,{...r,ref:t})});ih.displayName=LA;var ah="ToastAction",lh=u.forwardRef((e,t)=>{const{altText:n,...r}=e;return n.trim()?p.jsx(uh,{altText:n,asChild:!0,children:p.jsx(Oi,{...r,ref:t})}):(console.error(`Invalid prop \`altText\` supplied to \`${ah}\`. Expected non-empty \`string\`.`),null)});lh.displayName=ah;var ch="ToastClose",Oi=u.forwardRef((e,t)=>{const{__scopeToast:n,...r}=e,o=DA(ch,n);return p.jsx(uh,{asChild:!0,children:p.jsx(W.button,{type:"button",...r,ref:t,onClick:k(e.onClick,o.onClose)})})});Oi.displayName=ch;var uh=u.forwardRef((e,t)=>{const{__scopeToast:n,altText:r,...o}=e;return p.jsx(W.div,{"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":r||void 0,...o,ref:t})});function dh(e){const t=[];return Array.from(e.childNodes).forEach(r=>{if(r.nodeType===r.TEXT_NODE&&r.textContent&&t.push(r.textContent),$A(r)){const o=r.ariaHidden||r.hidden||r.style.display==="none",s=r.dataset.radixToastAnnounceExclude==="";if(!o)if(s){const i=r.dataset.radixToastAnnounceAlt;i&&t.push(i)}else t.push(...dh(r))}}),t}function bo(e,t,n,{discrete:r}){const o=n.originalEvent.currentTarget,s=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t&&o.addEventListener(e,t,{once:!0}),r?ws(o,s):o.dispatchEvent(s)}var fh=(e,t,n=0)=>{const r=Math.abs(e.x),o=Math.abs(e.y),s=r>o;return t==="left"||t==="right"?s&&r>n:!s&&o>n};function VA(e=()=>{}){const t=de(e);pe(()=>{let n=0,r=0;return n=window.requestAnimationFrame(()=>r=window.requestAnimationFrame(t)),()=>{window.cancelAnimationFrame(n),window.cancelAnimationFrame(r)}},[t])}function $A(e){return e.nodeType===e.ELEMENT_NODE}function FA(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 Li(e){const t=document.activeElement;return e.some(n=>n===t?!0:(n.focus(),document.activeElement!==t))}var RA=eh,ph=nh,hh=oh,mh=sh,gh=ih,vh=lh,yh=Oi;const BA=RA,bh=u.forwardRef(({className:e,...t},n)=>p.jsx(ph,{ref:n,className:M("fixed top-0 z-[100] flex max-h-screen w-full flex-col-reverse p-4 sm:bottom-0 sm:right-0 sm:top-auto sm:flex-col md:max-w-[420px]",e),...t}));bh.displayName=ph.displayName;const zA=Kt("group pointer-events-auto relative flex w-full items-center justify-between space-x-4 overflow-hidden rounded-md border p-6 pr-8 shadow-lg transition-all data-[swipe=cancel]:translate-x-0 data-[swipe=end]:translate-x-[var(--radix-toast-swipe-end-x)] data-[swipe=move]:translate-x-[var(--radix-toast-swipe-move-x)] data-[swipe=move]:transition-none data-[state=open]:animate-in data-[state=closed]:animate-out data-[swipe=end]:animate-out data-[state=closed]:fade-out-80 data-[state=closed]:slide-out-to-right-full data-[state=open]:slide-in-from-top-full data-[state=open]:sm:slide-in-from-bottom-full",{variants:{variant:{default:"border bg-background text-foreground",destructive:"destructive group border-destructive bg-destructive text-destructive-foreground"}},defaultVariants:{variant:"default"}}),wh=u.forwardRef(({className:e,variant:t,...n},r)=>p.jsx(hh,{ref:r,className:M(zA({variant:t}),e),...n}));wh.displayName=hh.displayName;const xh=u.forwardRef(({className:e,...t},n)=>p.jsx(vh,{ref:n,className:M("inline-flex h-8 shrink-0 items-center justify-center rounded-md border bg-transparent px-3 text-sm font-medium ring-offset-background transition-colors hover:bg-secondary focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 group-[.destructive]:border-muted/40 group-[.destructive]:hover:border-destructive/30 group-[.destructive]:hover:bg-destructive group-[.destructive]:hover:text-destructive-foreground group-[.destructive]:focus:ring-destructive",e),...t}));xh.displayName=vh.displayName;const Sh=u.forwardRef(({className:e,...t},n)=>p.jsx(yh,{ref:n,className:M("absolute right-2 top-2 rounded-md p-1 text-foreground/50 opacity-0 transition-opacity hover:text-foreground focus:opacity-100 focus:outline-none focus:ring-2 group-hover:opacity-100 group-[.destructive]:text-red-300 group-[.destructive]:hover:text-red-50 group-[.destructive]:focus:ring-red-400 group-[.destructive]:focus:ring-offset-red-600",e),"toast-close":"",...t,children:p.jsx(Ps,{className:"h-4 w-4"})}));Sh.displayName=yh.displayName;const Ch=u.forwardRef(({className:e,...t},n)=>p.jsx(mh,{ref:n,className:M("text-sm font-semibold",e),...t}));Ch.displayName=mh.displayName;const Eh=u.forwardRef(({className:e,...t},n)=>p.jsx(gh,{ref:n,className:M("text-sm opacity-90",e),...t}));Eh.displayName=gh.displayName;const WA=1,HA=1e6;let Vi=0;function jA(){return Vi=(Vi+1)%Number.MAX_SAFE_INTEGER,Vi.toString()}const $i=new Map,Ph=e=>{if($i.has(e))return;const t=setTimeout(()=>{$i.delete(e),Qn({type:"REMOVE_TOAST",toastId:e})},HA);$i.set(e,t)},Th=(e,t)=>{switch(t.type){case"ADD_TOAST":return{...e,toasts:[t.toast,...e.toasts].slice(0,WA)};case"UPDATE_TOAST":return{...e,toasts:e.toasts.map(n=>n.id===t.toast.id?{...n,...t.toast}:n)};case"DISMISS_TOAST":{const{toastId:n}=t;return n?Ph(n):e.toasts.forEach(r=>{Ph(r.id)}),{...e,toasts:e.toasts.map(r=>r.id===n||n===void 0?{...r,open:!1}:r)}}case"REMOVE_TOAST":return t.toastId===void 0?{...e,toasts:[]}:{...e,toasts:e.toasts.filter(n=>n.id!==t.toastId)}}},wo=[];let xo={toasts:[]};function Qn(e){xo=Th(xo,e),wo.forEach(t=>{t(xo)})}function Ah({...e}){const t=jA(),n=o=>Qn({type:"UPDATE_TOAST",toast:{...o,id:t}}),r=()=>Qn({type:"DISMISS_TOAST",toastId:t});return Qn({type:"ADD_TOAST",toast:{...e,id:t,open:!0,onOpenChange:o=>{o||r()}}}),{id:t,dismiss:r,update:n}}function UA(){const[e,t]=u.useState(xo);return u.useEffect(()=>(wo.push(t),()=>{const n=wo.indexOf(t);n>-1&&wo.splice(n,1)}),[e]),{...e,toast:Ah,dismiss:n=>Qn({type:"DISMISS_TOAST",toastId:n})}}function GA({className:e,...t}){return p.jsx("div",{className:M("animate-pulse rounded-md bg-muted",e),...t})}function KA(e,t=[]){let n=[];function r(s,i){const a=u.createContext(i);a.displayName=s+"Context";const l=n.length;n=[...n,i];const c=f=>{var b;const{scope:h,children:m,...y}=f,g=((b=h==null?void 0:h[e])==null?void 0:b[l])||a,v=u.useMemo(()=>y,Object.values(y));return p.jsx(g.Provider,{value:v,children:m})};c.displayName=s+"Provider";function d(f,h){var g;const m=((g=h==null?void 0:h[e])==null?void 0:g[l])||a,y=u.useContext(m);if(y)return y;if(i!==void 0)return i;throw new Error(`\`${f}\` must be used within \`${s}\``)}return[c,d]}const o=()=>{const s=n.map(i=>u.createContext(i));return function(a){const l=(a==null?void 0:a[e])||s;return u.useMemo(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])}};return o.scopeName=e,[r,YA(o,...t)]}function YA(...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:l,scopeName:c})=>{const f=l(s)[`__scope${c}`];return{...a,...f}},{});return u.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}var XA=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],Nh=XA.reduce((e,t)=>{const n=Mn(`Primitive.${t}`),r=u.forwardRef((o,s)=>{const{asChild:i,...a}=o,l=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),p.jsx(l,{...a,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),Fi="Progress",Ri=100,[qA]=KA(Fi),[ZA,JA]=qA(Fi),Mh=u.forwardRef((e,t)=>{const{__scopeProgress:n,value:r=null,max:o,getValueLabel:s=QA,...i}=e;(o||o===0)&&!kh(o)&&console.error(eN(`${o}`,"Progress"));const a=kh(o)?o:Ri;r!==null&&!Oh(r,a)&&console.error(tN(`${r}`,"Progress"));const l=Oh(r,a)?r:null,c=So(l)?s(l,a):void 0;return p.jsx(ZA,{scope:n,value:l,max:a,children:p.jsx(Nh.div,{"aria-valuemax":a,"aria-valuemin":0,"aria-valuenow":So(l)?l:void 0,"aria-valuetext":c,role:"progressbar","data-state":_h(l,a),"data-value":l??void 0,"data-max":a,...i,ref:t})})});Mh.displayName=Fi;var Ih="ProgressIndicator",Dh=u.forwardRef((e,t)=>{const{__scopeProgress:n,...r}=e,o=JA(Ih,n);return p.jsx(Nh.div,{"data-state":_h(o.value,o.max),"data-value":o.value??void 0,"data-max":o.max,...r,ref:t})});Dh.displayName=Ih;function QA(e,t){return`${Math.round(e/t*100)}%`}function _h(e,t){return e==null?"indeterminate":e===t?"complete":"loading"}function So(e){return typeof e=="number"}function kh(e){return So(e)&&!isNaN(e)&&e>0}function Oh(e,t){return So(e)&&!isNaN(e)&&e<=t&&e>=0}function eN(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`${Ri}\`.`}function tN(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:
135
106
  - a positive number
136
- - less than the value passed to \`max\` (or ${pa} if no \`max\` prop is set)
107
+ - less than the value passed to \`max\` (or ${Ri} if no \`max\` prop is set)
137
108
  - \`null\` or \`undefined\` if the progress is indeterminate.
138
109
 
139
- Defaulting to \`null\`.`}var lm=nm,OA=om;const cm=d.forwardRef(({className:e,value:t,...n},r)=>p.jsx(lm,{ref:r,className:M("relative h-4 w-full overflow-hidden rounded-full bg-secondary",e),...n,children:p.jsx(OA,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})}));cm.displayName=lm.displayName;const LA=Fi,VA=Hf,$A=Oo,um=Bi,ha=d.forwardRef(({className:e,...t},n)=>p.jsx(mr,{className:M("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:n}));ha.displayName=mr.displayName;const FA=fn("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),dm=d.forwardRef(({side:e="right",className:t,children:n,...r},o)=>p.jsxs(um,{children:[p.jsx(ha,{}),p.jsxs(gr,{ref:o,className:M(FA({side:e}),t),...r,children:[n,p.jsxs(Oo,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",children:[p.jsx(Qs,{className:"h-4 w-4"}),p.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));dm.displayName=gr.displayName;const fm=({className:e,...t})=>p.jsx("div",{className:M("flex flex-col space-y-2 text-center sm:text-left",e),...t});fm.displayName="SheetHeader";const pm=({className:e,...t})=>p.jsx("div",{className:M("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});pm.displayName="SheetFooter";const hm=d.forwardRef(({className:e,...t},n)=>p.jsx(Do,{ref:n,className:M("text-lg font-semibold text-foreground",e),...t}));hm.displayName=Do.displayName;const mm=d.forwardRef(({className:e,...t},n)=>p.jsx(ko,{ref:n,className:M("text-sm text-muted-foreground",e),...t}));mm.displayName=ko.displayName;const gm=d.forwardRef(({className:e,...t},n)=>p.jsx("div",{ref:n,className:M("rounded-lg border bg-card text-card-foreground shadow-sm",e),...t}));gm.displayName="Card";const vm=d.forwardRef(({className:e,...t},n)=>p.jsx("div",{ref:n,className:M("flex flex-col space-y-1.5 p-6",e),...t}));vm.displayName="CardHeader";const ym=d.forwardRef(({className:e,...t},n)=>p.jsx("h3",{ref:n,className:M("text-2xl font-semibold leading-none tracking-tight",e),...t}));ym.displayName="CardTitle";const xm=d.forwardRef(({className:e,...t},n)=>p.jsx("p",{ref:n,className:M("text-sm text-muted-foreground",e),...t}));xm.displayName="CardDescription";const bm=d.forwardRef(({className:e,...t},n)=>p.jsx("div",{ref:n,className:M("p-6 pt-0",e),...t}));bm.displayName="CardContent";const wm=d.forwardRef(({className:e,...t},n)=>p.jsx("div",{ref:n,className:M("flex items-center p-6 pt-0",e),...t}));wm.displayName="CardFooter";var qo="Collapsible",[BA,Sm]=Re(qo),[WA,ma]=BA(qo),Cm=d.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:o,disabled:s,onOpenChange:i,...a}=e,[l,c]=_e({prop:r,defaultProp:o??!1,onChange:i,caller:qo});return p.jsx(WA,{scope:n,disabled:s,contentId:Se(),open:l,onOpenToggle:d.useCallback(()=>c(u=>!u),[c]),children:p.jsx(H.div,{"data-state":va(l),"data-disabled":s?"":void 0,...a,ref:t})})});Cm.displayName=qo;var Em="CollapsibleTrigger",Tm=d.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,o=ma(Em,n);return p.jsx(H.button,{type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":va(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled,...r,ref:t,onClick:D(e.onClick,o.onOpenToggle)})});Tm.displayName=Em;var ga="CollapsibleContent",Pm=d.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=ma(ga,e.__scopeCollapsible);return p.jsx(Te,{present:n||o.open,children:({present:s})=>p.jsx(zA,{...r,ref:t,present:s})})});Pm.displayName=ga;var zA=d.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:o,...s}=e,i=ma(ga,n),[a,l]=d.useState(r),c=d.useRef(null),u=re(t,c),f=d.useRef(0),h=f.current,m=d.useRef(0),y=m.current,g=i.open||a,v=d.useRef(g),x=d.useRef(void 0);return d.useEffect(()=>{const b=requestAnimationFrame(()=>v.current=!1);return()=>cancelAnimationFrame(b)},[]),we(()=>{const b=c.current;if(b){x.current=x.current||{transitionDuration:b.style.transitionDuration,animationName:b.style.animationName},b.style.transitionDuration="0s",b.style.animationName="none";const w=b.getBoundingClientRect();f.current=w.height,m.current=w.width,v.current||(b.style.transitionDuration=x.current.transitionDuration,b.style.animationName=x.current.animationName),l(r)}},[i.open,r]),p.jsx(H.div,{"data-state":va(i.open),"data-disabled":i.disabled?"":void 0,id:i.contentId,hidden:!g,...s,ref:u,style:{"--radix-collapsible-content-height":h?`${h}px`:void 0,"--radix-collapsible-content-width":y?`${y}px`:void 0,...e.style},children:g&&o})});function va(e){return e?"open":"closed"}var HA=Cm,UA=Tm,GA=Pm,rt="Accordion",KA=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[ya,YA,XA]=pn(rt),[Zo]=Re(rt,[XA,Sm]),xa=Sm(),Rm=T.forwardRef((e,t)=>{const{type:n,...r}=e,o=r,s=r;return p.jsx(ya.Provider,{scope:e.__scopeAccordion,children:n==="multiple"?p.jsx(QA,{...s,ref:t}):p.jsx(JA,{...o,ref:t})})});Rm.displayName=rt;var[Am,qA]=Zo(rt),[Nm,ZA]=Zo(rt,{collapsible:!1}),JA=T.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},collapsible:s=!1,...i}=e,[a,l]=_e({prop:n,defaultProp:r??"",onChange:o,caller:rt});return p.jsx(Am,{scope:e.__scopeAccordion,value:T.useMemo(()=>a?[a]:[],[a]),onItemOpen:l,onItemClose:T.useCallback(()=>s&&l(""),[s,l]),children:p.jsx(Nm,{scope:e.__scopeAccordion,collapsible:s,children:p.jsx(Mm,{...i,ref:t})})})}),QA=T.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},...s}=e,[i,a]=_e({prop:n,defaultProp:r??[],onChange:o,caller:rt}),l=T.useCallback(u=>a((f=[])=>[...f,u]),[a]),c=T.useCallback(u=>a((f=[])=>f.filter(h=>h!==u)),[a]);return p.jsx(Am,{scope:e.__scopeAccordion,value:i,onItemOpen:l,onItemClose:c,children:p.jsx(Nm,{scope:e.__scopeAccordion,collapsible:!0,children:p.jsx(Mm,{...s,ref:t})})})}),[eN,Jo]=Zo(rt),Mm=T.forwardRef((e,t)=>{const{__scopeAccordion:n,disabled:r,dir:o,orientation:s="vertical",...i}=e,a=T.useRef(null),l=re(a,t),c=YA(n),f=Rt(o)==="ltr",h=D(e.onKeyDown,m=>{var N;if(!KA.includes(m.key))return;const y=m.target,g=c().filter(_=>{var k;return!((k=_.ref.current)!=null&&k.disabled)}),v=g.findIndex(_=>_.ref.current===y),x=g.length;if(v===-1)return;m.preventDefault();let b=v;const w=0,S=x-1,C=()=>{b=v+1,b>S&&(b=w)},R=()=>{b=v-1,b<w&&(b=S)};switch(m.key){case"Home":b=w;break;case"End":b=S;break;case"ArrowRight":s==="horizontal"&&(f?C():R());break;case"ArrowDown":s==="vertical"&&C();break;case"ArrowLeft":s==="horizontal"&&(f?R():C());break;case"ArrowUp":s==="vertical"&&R();break}const A=b%x;(N=g[A].ref.current)==null||N.focus()});return p.jsx(eN,{scope:n,disabled:r,direction:o,orientation:s,children:p.jsx(ya.Slot,{scope:n,children:p.jsx(H.div,{...i,"data-orientation":s,ref:l,onKeyDown:r?void 0:h})})})}),Qo="AccordionItem",[tN,ba]=Zo(Qo),_m=T.forwardRef((e,t)=>{const{__scopeAccordion:n,value:r,...o}=e,s=Jo(Qo,n),i=qA(Qo,n),a=xa(n),l=Se(),c=r&&i.value.includes(r)||!1,u=s.disabled||e.disabled;return p.jsx(tN,{scope:n,open:c,disabled:u,triggerId:l,children:p.jsx(HA,{"data-orientation":s.orientation,"data-state":Lm(c),...a,...o,ref:t,disabled:u,open:c,onOpenChange:f=>{f?i.onItemOpen(r):i.onItemClose(r)}})})});_m.displayName=Qo;var jm="AccordionHeader",Im=T.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=Jo(rt,n),s=ba(jm,n);return p.jsx(H.h3,{"data-orientation":o.orientation,"data-state":Lm(s.open),"data-disabled":s.disabled?"":void 0,...r,ref:t})});Im.displayName=jm;var wa="AccordionTrigger",Dm=T.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=Jo(rt,n),s=ba(wa,n),i=ZA(wa,n),a=xa(n);return p.jsx(ya.ItemSlot,{scope:n,children:p.jsx(UA,{"aria-disabled":s.open&&!i.collapsible||void 0,"data-orientation":o.orientation,id:s.triggerId,...a,...r,ref:t})})});Dm.displayName=wa;var km="AccordionContent",Om=T.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=Jo(rt,n),s=ba(km,n),i=xa(n);return p.jsx(GA,{role:"region","aria-labelledby":s.triggerId,"data-orientation":o.orientation,...i,...r,ref:t,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...e.style}})});Om.displayName=km;function Lm(e){return e?"open":"closed"}var nN=Rm,rN=_m,oN=Im,Vm=Dm,$m=Om;const sN=nN,Fm=d.forwardRef(({className:e,...t},n)=>p.jsx(rN,{ref:n,className:M("border-b",e),...t}));Fm.displayName="AccordionItem";const Bm=d.forwardRef(({className:e,children:t,...n},r)=>p.jsx(oN,{className:"flex",children:p.jsxs(Vm,{ref:r,className:M("flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180",e),...n,children:[t,p.jsx(zc,{className:"h-4 w-4 shrink-0 transition-transform duration-200"})]})}));Bm.displayName=Vm.displayName;const Wm=d.forwardRef(({className:e,children:t,...n},r)=>p.jsx($m,{ref:r,className:"overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",...n,children:p.jsx("div",{className:M("pb-4 pt-0",e),children:t})}));Wm.displayName=$m.displayName;function iN(e,t){return d.useReducer((n,r)=>t[n][r]??n,e)}var Sa="ScrollArea",[zm]=Re(Sa),[aN,Ke]=zm(Sa),Hm=d.forwardRef((e,t)=>{const{__scopeScrollArea:n,type:r="hover",dir:o,scrollHideDelay:s=600,...i}=e,[a,l]=d.useState(null),[c,u]=d.useState(null),[f,h]=d.useState(null),[m,y]=d.useState(null),[g,v]=d.useState(null),[x,b]=d.useState(0),[w,S]=d.useState(0),[C,R]=d.useState(!1),[A,N]=d.useState(!1),_=re(t,O=>l(O)),k=Rt(o);return p.jsx(aN,{scope:n,type:r,dir:k,scrollHideDelay:s,scrollArea:a,viewport:c,onViewportChange:u,content:f,onContentChange:h,scrollbarX:m,onScrollbarXChange:y,scrollbarXEnabled:C,onScrollbarXEnabledChange:R,scrollbarY:g,onScrollbarYChange:v,scrollbarYEnabled:A,onScrollbarYEnabledChange:N,onCornerWidthChange:b,onCornerHeightChange:S,children:p.jsx(H.div,{dir:k,...i,ref:_,style:{position:"relative","--radix-scroll-area-corner-width":x+"px","--radix-scroll-area-corner-height":w+"px",...e.style}})})});Hm.displayName=Sa;var Um="ScrollAreaViewport",Gm=d.forwardRef((e,t)=>{const{__scopeScrollArea:n,children:r,nonce:o,...s}=e,i=Ke(Um,n),a=d.useRef(null),l=re(t,a,i.onViewportChange);return p.jsxs(p.Fragment,{children:[p.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:o}),p.jsx(H.div,{"data-radix-scroll-area-viewport":"",...s,ref:l,style:{overflowX:i.scrollbarXEnabled?"scroll":"hidden",overflowY:i.scrollbarYEnabled?"scroll":"hidden",...e.style},children:p.jsx("div",{ref:i.onContentChange,style:{minWidth:"100%",display:"table"},children:r})})]})});Gm.displayName=Um;var ft="ScrollAreaScrollbar",Ca=d.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=Ke(ft,e.__scopeScrollArea),{onScrollbarXEnabledChange:s,onScrollbarYEnabledChange:i}=o,a=e.orientation==="horizontal";return d.useEffect(()=>(a?s(!0):i(!0),()=>{a?s(!1):i(!1)}),[a,s,i]),o.type==="hover"?p.jsx(lN,{...r,ref:t,forceMount:n}):o.type==="scroll"?p.jsx(cN,{...r,ref:t,forceMount:n}):o.type==="auto"?p.jsx(Km,{...r,ref:t,forceMount:n}):o.type==="always"?p.jsx(Ea,{...r,ref:t}):null});Ca.displayName=ft;var lN=d.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=Ke(ft,e.__scopeScrollArea),[s,i]=d.useState(!1);return d.useEffect(()=>{const a=o.scrollArea;let l=0;if(a){const c=()=>{window.clearTimeout(l),i(!0)},u=()=>{l=window.setTimeout(()=>i(!1),o.scrollHideDelay)};return a.addEventListener("pointerenter",c),a.addEventListener("pointerleave",u),()=>{window.clearTimeout(l),a.removeEventListener("pointerenter",c),a.removeEventListener("pointerleave",u)}}},[o.scrollArea,o.scrollHideDelay]),p.jsx(Te,{present:n||s,children:p.jsx(Km,{"data-state":s?"visible":"hidden",...r,ref:t})})}),cN=d.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=Ke(ft,e.__scopeScrollArea),s=e.orientation==="horizontal",i=rs(()=>l("SCROLL_END"),100),[a,l]=iN("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return d.useEffect(()=>{if(a==="idle"){const c=window.setTimeout(()=>l("HIDE"),o.scrollHideDelay);return()=>window.clearTimeout(c)}},[a,o.scrollHideDelay,l]),d.useEffect(()=>{const c=o.viewport,u=s?"scrollLeft":"scrollTop";if(c){let f=c[u];const h=()=>{const m=c[u];f!==m&&(l("SCROLL"),i()),f=m};return c.addEventListener("scroll",h),()=>c.removeEventListener("scroll",h)}},[o.viewport,s,l,i]),p.jsx(Te,{present:n||a!=="hidden",children:p.jsx(Ea,{"data-state":a==="hidden"?"hidden":"visible",...r,ref:t,onPointerEnter:D(e.onPointerEnter,()=>l("POINTER_ENTER")),onPointerLeave:D(e.onPointerLeave,()=>l("POINTER_LEAVE"))})})}),Km=d.forwardRef((e,t)=>{const n=Ke(ft,e.__scopeScrollArea),{forceMount:r,...o}=e,[s,i]=d.useState(!1),a=e.orientation==="horizontal",l=rs(()=>{if(n.viewport){const c=n.viewport.offsetWidth<n.viewport.scrollWidth,u=n.viewport.offsetHeight<n.viewport.scrollHeight;i(a?c:u)}},10);return Mn(n.viewport,l),Mn(n.content,l),p.jsx(Te,{present:r||s,children:p.jsx(Ea,{"data-state":s?"visible":"hidden",...o,ref:t})})}),Ea=d.forwardRef((e,t)=>{const{orientation:n="vertical",...r}=e,o=Ke(ft,e.__scopeScrollArea),s=d.useRef(null),i=d.useRef(0),[a,l]=d.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),c=Jm(a.viewport,a.content),u={...r,sizes:a,onSizesChange:l,hasThumb:c>0&&c<1,onThumbChange:h=>s.current=h,onThumbPointerUp:()=>i.current=0,onThumbPointerDown:h=>i.current=h};function f(h,m){return mN(h,i.current,a,m)}return n==="horizontal"?p.jsx(uN,{...u,ref:t,onThumbPositionChange:()=>{if(o.viewport&&s.current){const h=o.viewport.scrollLeft,m=Qm(h,a,o.dir);s.current.style.transform=`translate3d(${m}px, 0, 0)`}},onWheelScroll:h=>{o.viewport&&(o.viewport.scrollLeft=h)},onDragScroll:h=>{o.viewport&&(o.viewport.scrollLeft=f(h,o.dir))}}):n==="vertical"?p.jsx(dN,{...u,ref:t,onThumbPositionChange:()=>{if(o.viewport&&s.current){const h=o.viewport.scrollTop,m=Qm(h,a);s.current.style.transform=`translate3d(0, ${m}px, 0)`}},onWheelScroll:h=>{o.viewport&&(o.viewport.scrollTop=h)},onDragScroll:h=>{o.viewport&&(o.viewport.scrollTop=f(h))}}):null}),uN=d.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...o}=e,s=Ke(ft,e.__scopeScrollArea),[i,a]=d.useState(),l=d.useRef(null),c=re(t,l,s.onScrollbarXChange);return d.useEffect(()=>{l.current&&a(getComputedStyle(l.current))},[l]),p.jsx(Xm,{"data-orientation":"horizontal",...o,ref:c,sizes:n,style:{bottom:0,left:s.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:s.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":ns(n)+"px",...e.style},onThumbPointerDown:u=>e.onThumbPointerDown(u.x),onDragScroll:u=>e.onDragScroll(u.x),onWheelScroll:(u,f)=>{if(s.viewport){const h=s.viewport.scrollLeft+u.deltaX;e.onWheelScroll(h),tg(h,f)&&u.preventDefault()}},onResize:()=>{l.current&&s.viewport&&i&&r({content:s.viewport.scrollWidth,viewport:s.viewport.offsetWidth,scrollbar:{size:l.current.clientWidth,paddingStart:ts(i.paddingLeft),paddingEnd:ts(i.paddingRight)}})}})}),dN=d.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...o}=e,s=Ke(ft,e.__scopeScrollArea),[i,a]=d.useState(),l=d.useRef(null),c=re(t,l,s.onScrollbarYChange);return d.useEffect(()=>{l.current&&a(getComputedStyle(l.current))},[l]),p.jsx(Xm,{"data-orientation":"vertical",...o,ref:c,sizes:n,style:{top:0,right:s.dir==="ltr"?0:void 0,left:s.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":ns(n)+"px",...e.style},onThumbPointerDown:u=>e.onThumbPointerDown(u.y),onDragScroll:u=>e.onDragScroll(u.y),onWheelScroll:(u,f)=>{if(s.viewport){const h=s.viewport.scrollTop+u.deltaY;e.onWheelScroll(h),tg(h,f)&&u.preventDefault()}},onResize:()=>{l.current&&s.viewport&&i&&r({content:s.viewport.scrollHeight,viewport:s.viewport.offsetHeight,scrollbar:{size:l.current.clientHeight,paddingStart:ts(i.paddingTop),paddingEnd:ts(i.paddingBottom)}})}})}),[fN,Ym]=zm(ft),Xm=d.forwardRef((e,t)=>{const{__scopeScrollArea:n,sizes:r,hasThumb:o,onThumbChange:s,onThumbPointerUp:i,onThumbPointerDown:a,onThumbPositionChange:l,onDragScroll:c,onWheelScroll:u,onResize:f,...h}=e,m=Ke(ft,n),[y,g]=d.useState(null),v=re(t,_=>g(_)),x=d.useRef(null),b=d.useRef(""),w=m.viewport,S=r.content-r.viewport,C=xe(u),R=xe(l),A=rs(f,10);function N(_){if(x.current){const k=_.clientX-x.current.left,O=_.clientY-x.current.top;c({x:k,y:O})}}return d.useEffect(()=>{const _=k=>{const O=k.target;(y==null?void 0:y.contains(O))&&C(k,S)};return document.addEventListener("wheel",_,{passive:!1}),()=>document.removeEventListener("wheel",_,{passive:!1})},[w,y,S,C]),d.useEffect(R,[r,R]),Mn(y,A),Mn(m.content,A),p.jsx(fN,{scope:n,scrollbar:y,hasThumb:o,onThumbChange:xe(s),onThumbPointerUp:xe(i),onThumbPositionChange:R,onThumbPointerDown:xe(a),children:p.jsx(H.div,{...h,ref:v,style:{position:"absolute",...h.style},onPointerDown:D(e.onPointerDown,_=>{_.button===0&&(_.target.setPointerCapture(_.pointerId),x.current=y.getBoundingClientRect(),b.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",m.viewport&&(m.viewport.style.scrollBehavior="auto"),N(_))}),onPointerMove:D(e.onPointerMove,N),onPointerUp:D(e.onPointerUp,_=>{const k=_.target;k.hasPointerCapture(_.pointerId)&&k.releasePointerCapture(_.pointerId),document.body.style.webkitUserSelect=b.current,m.viewport&&(m.viewport.style.scrollBehavior=""),x.current=null})})})}),es="ScrollAreaThumb",qm=d.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=Ym(es,e.__scopeScrollArea);return p.jsx(Te,{present:n||o.hasThumb,children:p.jsx(pN,{ref:t,...r})})}),pN=d.forwardRef((e,t)=>{const{__scopeScrollArea:n,style:r,...o}=e,s=Ke(es,n),i=Ym(es,n),{onThumbPositionChange:a}=i,l=re(t,f=>i.onThumbChange(f)),c=d.useRef(void 0),u=rs(()=>{c.current&&(c.current(),c.current=void 0)},100);return d.useEffect(()=>{const f=s.viewport;if(f){const h=()=>{if(u(),!c.current){const m=gN(f,a);c.current=m,a()}};return a(),f.addEventListener("scroll",h),()=>f.removeEventListener("scroll",h)}},[s.viewport,u,a]),p.jsx(H.div,{"data-state":i.hasThumb?"visible":"hidden",...o,ref:l,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...r},onPointerDownCapture:D(e.onPointerDownCapture,f=>{const m=f.target.getBoundingClientRect(),y=f.clientX-m.left,g=f.clientY-m.top;i.onThumbPointerDown({x:y,y:g})}),onPointerUp:D(e.onPointerUp,i.onThumbPointerUp)})});qm.displayName=es;var Ta="ScrollAreaCorner",Zm=d.forwardRef((e,t)=>{const n=Ke(Ta,e.__scopeScrollArea),r=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&r?p.jsx(hN,{...e,ref:t}):null});Zm.displayName=Ta;var hN=d.forwardRef((e,t)=>{const{__scopeScrollArea:n,...r}=e,o=Ke(Ta,n),[s,i]=d.useState(0),[a,l]=d.useState(0),c=!!(s&&a);return Mn(o.scrollbarX,()=>{var f;const u=((f=o.scrollbarX)==null?void 0:f.offsetHeight)||0;o.onCornerHeightChange(u),l(u)}),Mn(o.scrollbarY,()=>{var f;const u=((f=o.scrollbarY)==null?void 0:f.offsetWidth)||0;o.onCornerWidthChange(u),i(u)}),c?p.jsx(H.div,{...r,ref:t,style:{width:s,height:a,position:"absolute",right:o.dir==="ltr"?0:void 0,left:o.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function ts(e){return e?parseInt(e,10):0}function Jm(e,t){const n=e/t;return isNaN(n)?0:n}function ns(e){const t=Jm(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function mN(e,t,n,r="ltr"){const o=ns(n),s=o/2,i=t||s,a=o-i,l=n.scrollbar.paddingStart+i,c=n.scrollbar.size-n.scrollbar.paddingEnd-a,u=n.content-n.viewport,f=r==="ltr"?[0,u]:[u*-1,0];return eg([l,c],f)(e)}function Qm(e,t,n="ltr"){const r=ns(t),o=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,s=t.scrollbar.size-o,i=t.content-t.viewport,a=s-r,l=n==="ltr"?[0,i]:[i*-1,0],c=ir(e,l);return eg([0,i],[0,a])(c)}function eg(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 tg(e,t){return e>0&&e<t}var gN=(e,t=()=>{})=>{let n={left:e.scrollLeft,top:e.scrollTop},r=0;return function o(){const s={left:e.scrollLeft,top:e.scrollTop},i=n.left!==s.left,a=n.top!==s.top;(i||a)&&t(),n=s,r=window.requestAnimationFrame(o)}(),()=>window.cancelAnimationFrame(r)};function rs(e,t){const n=xe(e),r=d.useRef(0);return d.useEffect(()=>()=>window.clearTimeout(r.current),[]),d.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(n,t)},[n,t])}function Mn(e,t){const n=xe(t);we(()=>{let r=0;if(e){const o=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(n)});return o.observe(e),()=>{window.cancelAnimationFrame(r),o.unobserve(e)}}},[e,n])}var ng=Hm,vN=Gm,yN=Zm;const rg=d.forwardRef(({className:e,children:t,...n},r)=>p.jsxs(ng,{ref:r,className:M("relative overflow-hidden",e),...n,children:[p.jsx(vN,{className:"h-full w-full rounded-[inherit]",children:t}),p.jsx(Pa,{}),p.jsx(yN,{})]}));rg.displayName=ng.displayName;const Pa=d.forwardRef(({className:e,orientation:t="vertical",...n},r)=>p.jsx(Ca,{ref:r,orientation:t,className:M("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"h-2.5 border-t border-t-transparent p-[1px]",e),...n,children:p.jsx(qm,{className:"relative flex-1 rounded-full bg-border"})}));Pa.displayName=Ca.displayName;var xN=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],bN=xN.reduce((e,t)=>{const n=nr(`Primitive.${t}`),r=d.forwardRef((o,s)=>{const{asChild:i,...a}=o,l=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),p.jsx(l,{...a,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),wN="Separator",og="horizontal",SN=["horizontal","vertical"],sg=d.forwardRef((e,t)=>{const{decorative:n,orientation:r=og,...o}=e,s=CN(r)?r:og,a=n?{role:"none"}:{"aria-orientation":s==="vertical"?s:void 0,role:"separator"};return p.jsx(bN.div,{"data-orientation":s,...a,...o,ref:t})});sg.displayName=wN;function CN(e){return SN.includes(e)}var ig=sg;const ag=d.forwardRef(({className:e,orientation:t="horizontal",...n},r)=>p.jsx(ig,{ref:r,decorative:!0,orientation:t,className:M("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...n}));ag.displayName=ig.displayName;const lg=d.forwardRef(({...e},t)=>p.jsx("nav",{ref:t,"aria-label":"breadcrumb",...e}));lg.displayName="Breadcrumb";const cg=d.forwardRef(({className:e,...t},n)=>p.jsx("ol",{ref:n,className:M("flex flex-wrap items-center gap-1.5 break-words text-sm text-muted-foreground sm:gap-2.5",e),...t}));cg.displayName="BreadcrumbList";const ug=d.forwardRef(({className:e,...t},n)=>p.jsx("li",{ref:n,className:M("inline-flex items-center gap-1.5",e),...t}));ug.displayName="BreadcrumbItem";const dg=d.forwardRef(({asChild:e,className:t,...n},r)=>{const o=e?d.Fragment:"a";return p.jsx(o,{ref:r,className:M("transition-colors hover:text-foreground",t),...n})});dg.displayName="BreadcrumbLink";const fg=d.forwardRef(({className:e,...t},n)=>p.jsx("span",{ref:n,role:"link","aria-disabled":"true","aria-current":"page",className:M("font-normal text-foreground",e),...t}));fg.displayName="BreadcrumbPage";const pg=({children:e,className:t,...n})=>p.jsx("li",{role:"presentation","aria-hidden":"true",className:M("[&>svg]:size-3.5",t),...n,children:e??p.jsx(Js,{})});pg.displayName="BreadcrumbSeparator";const hg=({className:e,...t})=>p.jsxs("span",{role:"presentation","aria-hidden":"true",className:M("flex h-9 w-9 items-center justify-center",e),...t,children:[p.jsx(Uc,{className:"h-4 w-4"}),p.jsx("span",{className:"sr-only",children:"More"})]});hg.displayName="BreadcrumbEllipsis";const mg=({className:e,...t})=>p.jsx("nav",{role:"navigation","aria-label":"pagination",className:M("mx-auto flex w-full justify-center",e),...t});mg.displayName="Pagination";const gg=d.forwardRef(({className:e,...t},n)=>p.jsx("ul",{ref:n,className:M("flex flex-row items-center gap-1",e),...t}));gg.displayName="PaginationContent";const vg=d.forwardRef(({className:e,...t},n)=>p.jsx("li",{ref:n,className:M("",e),...t}));vg.displayName="PaginationItem";const os=({className:e,isActive:t,size:n="icon",...r})=>p.jsx("a",{"aria-current":t?"page":void 0,className:M(Ks({variant:t?"outline":"ghost",size:n}),e),...r});os.displayName="PaginationLink";const yg=({className:e,...t})=>p.jsxs(os,{"aria-label":"Go to previous page",size:"default",className:M("gap-1 pl-2.5",e),...t,children:[p.jsx(x0,{className:"h-4 w-4"}),p.jsx("span",{children:"Previous"})]});yg.displayName="PaginationPrevious";const xg=({className:e,...t})=>p.jsxs(os,{"aria-label":"Go to next page",size:"default",className:M("gap-1 pr-2.5",e),...t,children:[p.jsx("span",{children:"Next"}),p.jsx(Js,{className:"h-4 w-4"})]});xg.displayName="PaginationNext";const bg=({className:e,...t})=>p.jsxs("span",{"aria-hidden":!0,className:M("flex h-9 w-9 items-center justify-center",e),...t,children:[p.jsx(Uc,{className:"h-4 w-4"}),p.jsx("span",{className:"sr-only",children:"More pages"})]});bg.displayName="PaginationEllipsis";var ss="Tabs",[EN]=Re(ss,[hn]),wg=hn(),[TN,Ra]=EN(ss),Sg=d.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:o,defaultValue:s,orientation:i="horizontal",dir:a,activationMode:l="automatic",...c}=e,u=Rt(a),[f,h]=_e({prop:r,onChange:o,defaultProp:s??"",caller:ss});return p.jsx(TN,{scope:n,baseId:Se(),value:f,onValueChange:h,orientation:i,dir:u,activationMode:l,children:p.jsx(H.div,{dir:u,"data-orientation":i,...c,ref:t})})});Sg.displayName=ss;var Cg="TabsList",Eg=d.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...o}=e,s=Ra(Cg,n),i=wg(n);return p.jsx(ni,{asChild:!0,...i,orientation:s.orientation,dir:s.dir,loop:r,children:p.jsx(H.div,{role:"tablist","aria-orientation":s.orientation,...o,ref:t})})});Eg.displayName=Cg;var Tg="TabsTrigger",Pg=d.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:o=!1,...s}=e,i=Ra(Tg,n),a=wg(n),l=Ng(i.baseId,r),c=Mg(i.baseId,r),u=r===i.value;return p.jsx(ri,{asChild:!0,...a,focusable:!o,active:u,children:p.jsx(H.button,{type:"button",role:"tab","aria-selected":u,"aria-controls":c,"data-state":u?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:l,...s,ref:t,onMouseDown:D(e.onMouseDown,f=>{!o&&f.button===0&&f.ctrlKey===!1?i.onValueChange(r):f.preventDefault()}),onKeyDown:D(e.onKeyDown,f=>{[" ","Enter"].includes(f.key)&&i.onValueChange(r)}),onFocus:D(e.onFocus,()=>{const f=i.activationMode!=="manual";!u&&!o&&f&&i.onValueChange(r)})})})});Pg.displayName=Tg;var Rg="TabsContent",Ag=d.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:o,children:s,...i}=e,a=Ra(Rg,n),l=Ng(a.baseId,r),c=Mg(a.baseId,r),u=r===a.value,f=d.useRef(u);return d.useEffect(()=>{const h=requestAnimationFrame(()=>f.current=!1);return()=>cancelAnimationFrame(h)},[]),p.jsx(Te,{present:o||u,children:({present:h})=>p.jsx(H.div,{"data-state":u?"active":"inactive","data-orientation":a.orientation,role:"tabpanel","aria-labelledby":l,hidden:!h,id:c,tabIndex:0,...i,ref:t,style:{...e.style,animationDuration:f.current?"0s":void 0},children:h&&s})})});Ag.displayName=Rg;function Ng(e,t){return`${e}-trigger-${t}`}function Mg(e,t){return`${e}-content-${t}`}var PN=Sg,_g=Eg,jg=Pg,Ig=Ag;const RN=PN,Dg=d.forwardRef(({className:e,...t},n)=>p.jsx(_g,{ref:n,className:M("inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",e),...t}));Dg.displayName=_g.displayName;const kg=d.forwardRef(({className:e,...t},n)=>p.jsx(jg,{ref:n,className:M("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm",e),...t}));kg.displayName=jg.displayName;const Og=d.forwardRef(({className:e,...t},n)=>p.jsx(Ig,{ref:n,className:M("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));Og.displayName=Ig.displayName;var Lg=1,AN=.9,NN=.8,MN=.17,Aa=.1,Na=.999,_N=.9999,jN=.99,IN=/[\\\/_+.#"@\[\(\{&]/,DN=/[\\\/_+.#"@\[\(\{&]/g,kN=/[\s-]/,Vg=/[\s-]/g;function Ma(e,t,n,r,o,s,i){if(s===t.length)return o===e.length?Lg:jN;var a=`${o},${s}`;if(i[a]!==void 0)return i[a];for(var l=r.charAt(s),c=n.indexOf(l,o),u=0,f,h,m,y;c>=0;)f=Ma(e,t,n,r,c+1,s+1,i),f>u&&(c===o?f*=Lg:IN.test(e.charAt(c-1))?(f*=NN,m=e.slice(o,c-1).match(DN),m&&o>0&&(f*=Math.pow(Na,m.length))):kN.test(e.charAt(c-1))?(f*=AN,y=e.slice(o,c-1).match(Vg),y&&o>0&&(f*=Math.pow(Na,y.length))):(f*=MN,o>0&&(f*=Math.pow(Na,c-o))),e.charAt(c)!==t.charAt(s)&&(f*=_N)),(f<Aa&&n.charAt(c-1)===r.charAt(s+1)||r.charAt(s+1)===r.charAt(s)&&n.charAt(c-1)!==r.charAt(s))&&(h=Ma(e,t,n,r,c+1,s+2,i),h*Aa>f&&(f=h*Aa)),f>u&&(u=f),c=n.indexOf(l,c+1);return i[a]=u,u}function $g(e){return e.toLowerCase().replace(Vg," ")}function ON(e,t,n){return e=n&&n.length>0?`${e+" "+n.join(" ")}`:e,Ma(e,t,$g(e),$g(t),0,0,{})}var Rr='[cmdk-group=""]',_a='[cmdk-group-items=""]',LN='[cmdk-group-heading=""]',Fg='[cmdk-item=""]',Bg=`${Fg}:not([aria-disabled="true"])`,ja="cmdk-item-select",_n="data-value",VN=(e,t,n)=>ON(e,t,n),Wg=d.createContext(void 0),Ar=()=>d.useContext(Wg),zg=d.createContext(void 0),Ia=()=>d.useContext(zg),Hg=d.createContext(void 0),Ug=d.forwardRef((e,t)=>{let n=jn(()=>{var I,Y;return{search:"",value:(Y=(I=e.value)!=null?I:e.defaultValue)!=null?Y:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),r=jn(()=>new Set),o=jn(()=>new Map),s=jn(()=>new Map),i=jn(()=>new Set),a=Gg(e),{label:l,children:c,value:u,onValueChange:f,filter:h,shouldFilter:m,loop:y,disablePointerSelection:g=!1,vimBindings:v=!0,...x}=e,b=Se(),w=Se(),S=Se(),C=d.useRef(null),R=XN();Zt(()=>{if(u!==void 0){let I=u.trim();n.current.value=I,A.emit()}},[u]),Zt(()=>{R(6,G)},[]);let A=d.useMemo(()=>({subscribe:I=>(i.current.add(I),()=>i.current.delete(I)),snapshot:()=>n.current,setState:(I,Y,J)=>{var K,te,W,Q;if(!Object.is(n.current[I],Y)){if(n.current[I]=Y,I==="search")L(),k(),R(1,O);else if(I==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let ee=document.getElementById(S);ee?ee.focus():(K=document.getElementById(b))==null||K.focus()}if(R(7,()=>{var ee;n.current.selectedItemId=(ee=j())==null?void 0:ee.id,A.emit()}),J||R(5,G),((te=a.current)==null?void 0:te.value)!==void 0){let ee=Y??"";(Q=(W=a.current).onValueChange)==null||Q.call(W,ee);return}}A.emit()}},emit:()=>{i.current.forEach(I=>I())}}),[]),N=d.useMemo(()=>({value:(I,Y,J)=>{var K;Y!==((K=s.current.get(I))==null?void 0:K.value)&&(s.current.set(I,{value:Y,keywords:J}),n.current.filtered.items.set(I,_(Y,J)),R(2,()=>{k(),A.emit()}))},item:(I,Y)=>(r.current.add(I),Y&&(o.current.has(Y)?o.current.get(Y).add(I):o.current.set(Y,new Set([I]))),R(3,()=>{L(),k(),n.current.value||O(),A.emit()}),()=>{s.current.delete(I),r.current.delete(I),n.current.filtered.items.delete(I);let J=j();R(4,()=>{L(),(J==null?void 0:J.getAttribute("id"))===I&&O(),A.emit()})}),group:I=>(o.current.has(I)||o.current.set(I,new Set),()=>{s.current.delete(I),o.current.delete(I)}),filter:()=>a.current.shouldFilter,label:l||e["aria-label"],getDisablePointerSelection:()=>a.current.disablePointerSelection,listId:b,inputId:S,labelId:w,listInnerRef:C}),[]);function _(I,Y){var J,K;let te=(K=(J=a.current)==null?void 0:J.filter)!=null?K:VN;return I?te(I,n.current.search,Y):0}function k(){if(!n.current.search||a.current.shouldFilter===!1)return;let I=n.current.filtered.items,Y=[];n.current.filtered.groups.forEach(K=>{let te=o.current.get(K),W=0;te.forEach(Q=>{let ee=I.get(Q);W=Math.max(ee,W)}),Y.push([K,W])});let J=C.current;X().sort((K,te)=>{var W,Q;let ee=K.getAttribute("id"),ne=te.getAttribute("id");return((W=I.get(ne))!=null?W:0)-((Q=I.get(ee))!=null?Q:0)}).forEach(K=>{let te=K.closest(_a);te?te.appendChild(K.parentElement===te?K:K.closest(`${_a} > *`)):J.appendChild(K.parentElement===J?K:K.closest(`${_a} > *`))}),Y.sort((K,te)=>te[1]-K[1]).forEach(K=>{var te;let W=(te=C.current)==null?void 0:te.querySelector(`${Rr}[${_n}="${encodeURIComponent(K[0])}"]`);W==null||W.parentElement.appendChild(W)})}function O(){let I=X().find(J=>J.getAttribute("aria-disabled")!=="true"),Y=I==null?void 0:I.getAttribute(_n);A.setState("value",Y||void 0)}function L(){var I,Y,J,K;if(!n.current.search||a.current.shouldFilter===!1){n.current.filtered.count=r.current.size;return}n.current.filtered.groups=new Set;let te=0;for(let W of r.current){let Q=(Y=(I=s.current.get(W))==null?void 0:I.value)!=null?Y:"",ee=(K=(J=s.current.get(W))==null?void 0:J.keywords)!=null?K:[],ne=_(Q,ee);n.current.filtered.items.set(W,ne),ne>0&&te++}for(let[W,Q]of o.current)for(let ee of Q)if(n.current.filtered.items.get(ee)>0){n.current.filtered.groups.add(W);break}n.current.filtered.count=te}function G(){var I,Y,J;let K=j();K&&(((I=K.parentElement)==null?void 0:I.firstChild)===K&&((J=(Y=K.closest(Rr))==null?void 0:Y.querySelector(LN))==null||J.scrollIntoView({block:"nearest"})),K.scrollIntoView({block:"nearest"}))}function j(){var I;return(I=C.current)==null?void 0:I.querySelector(`${Fg}[aria-selected="true"]`)}function X(){var I;return Array.from(((I=C.current)==null?void 0:I.querySelectorAll(Bg))||[])}function U(I){let Y=X()[I];Y&&A.setState("value",Y.getAttribute(_n))}function z(I){var Y;let J=j(),K=X(),te=K.findIndex(Q=>Q===J),W=K[te+I];(Y=a.current)!=null&&Y.loop&&(W=te+I<0?K[K.length-1]:te+I===K.length?K[0]:K[te+I]),W&&A.setState("value",W.getAttribute(_n))}function V(I){let Y=j(),J=Y==null?void 0:Y.closest(Rr),K;for(;J&&!K;)J=I>0?KN(J,Rr):YN(J,Rr),K=J==null?void 0:J.querySelector(Bg);K?A.setState("value",K.getAttribute(_n)):z(I)}let $=()=>U(X().length-1),oe=I=>{I.preventDefault(),I.metaKey?$():I.altKey?V(1):z(1)},ie=I=>{I.preventDefault(),I.metaKey?U(0):I.altKey?V(-1):z(-1)};return d.createElement(H.div,{ref:t,tabIndex:-1,...x,"cmdk-root":"",onKeyDown:I=>{var Y;(Y=x.onKeyDown)==null||Y.call(x,I);let J=I.nativeEvent.isComposing||I.keyCode===229;if(!(I.defaultPrevented||J))switch(I.key){case"n":case"j":{v&&I.ctrlKey&&oe(I);break}case"ArrowDown":{oe(I);break}case"p":case"k":{v&&I.ctrlKey&&ie(I);break}case"ArrowUp":{ie(I);break}case"Home":{I.preventDefault(),U(0);break}case"End":{I.preventDefault(),$();break}case"Enter":{I.preventDefault();let K=j();if(K){let te=new Event(ja);K.dispatchEvent(te)}}}}},d.createElement("label",{"cmdk-label":"",htmlFor:N.inputId,id:N.labelId,style:ZN},l),is(e,I=>d.createElement(zg.Provider,{value:A},d.createElement(Wg.Provider,{value:N},I))))}),$N=d.forwardRef((e,t)=>{var n,r;let o=Se(),s=d.useRef(null),i=d.useContext(Hg),a=Ar(),l=Gg(e),c=(r=(n=l.current)==null?void 0:n.forceMount)!=null?r:i==null?void 0:i.forceMount;Zt(()=>{if(!c)return a.item(o,i==null?void 0:i.id)},[c]);let u=Kg(o,s,[e.value,e.children,s],e.keywords),f=Ia(),h=Ot(R=>R.value&&R.value===u.current),m=Ot(R=>c||a.filter()===!1?!0:R.search?R.filtered.items.get(o)>0:!0);d.useEffect(()=>{let R=s.current;if(!(!R||e.disabled))return R.addEventListener(ja,y),()=>R.removeEventListener(ja,y)},[m,e.onSelect,e.disabled]);function y(){var R,A;g(),(A=(R=l.current).onSelect)==null||A.call(R,u.current)}function g(){f.setState("value",u.current,!0)}if(!m)return null;let{disabled:v,value:x,onSelect:b,forceMount:w,keywords:S,...C}=e;return d.createElement(H.div,{ref:Ve(s,t),...C,id:o,"cmdk-item":"",role:"option","aria-disabled":!!v,"aria-selected":!!h,"data-disabled":!!v,"data-selected":!!h,onPointerMove:v||a.getDisablePointerSelection()?void 0:g,onClick:v?void 0:y},e.children)}),FN=d.forwardRef((e,t)=>{let{heading:n,children:r,forceMount:o,...s}=e,i=Se(),a=d.useRef(null),l=d.useRef(null),c=Se(),u=Ar(),f=Ot(m=>o||u.filter()===!1?!0:m.search?m.filtered.groups.has(i):!0);Zt(()=>u.group(i),[]),Kg(i,a,[e.value,e.heading,l]);let h=d.useMemo(()=>({id:i,forceMount:o}),[o]);return d.createElement(H.div,{ref:Ve(a,t),...s,"cmdk-group":"",role:"presentation",hidden:f?void 0:!0},n&&d.createElement("div",{ref:l,"cmdk-group-heading":"","aria-hidden":!0,id:c},n),is(e,m=>d.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?c:void 0},d.createElement(Hg.Provider,{value:h},m))))}),BN=d.forwardRef((e,t)=>{let{alwaysRender:n,...r}=e,o=d.useRef(null),s=Ot(i=>!i.search);return!n&&!s?null:d.createElement(H.div,{ref:Ve(o,t),...r,"cmdk-separator":"",role:"separator"})}),WN=d.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,o=e.value!=null,s=Ia(),i=Ot(c=>c.search),a=Ot(c=>c.selectedItemId),l=Ar();return d.useEffect(()=>{e.value!=null&&s.setState("search",e.value)},[e.value]),d.createElement(H.input,{ref:t,...r,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":l.listId,"aria-labelledby":l.labelId,"aria-activedescendant":a,id:l.inputId,type:"text",value:o?e.value:i,onChange:c=>{o||s.setState("search",c.target.value),n==null||n(c.target.value)}})}),zN=d.forwardRef((e,t)=>{let{children:n,label:r="Suggestions",...o}=e,s=d.useRef(null),i=d.useRef(null),a=Ot(c=>c.selectedItemId),l=Ar();return d.useEffect(()=>{if(i.current&&s.current){let c=i.current,u=s.current,f,h=new ResizeObserver(()=>{f=requestAnimationFrame(()=>{let m=c.offsetHeight;u.style.setProperty("--cmdk-list-height",m.toFixed(1)+"px")})});return h.observe(c),()=>{cancelAnimationFrame(f),h.unobserve(c)}}},[]),d.createElement(H.div,{ref:Ve(s,t),...o,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":a,"aria-label":r,id:l.listId},is(e,c=>d.createElement("div",{ref:Ve(i,l.listInnerRef),"cmdk-list-sizer":""},c)))}),HN=d.forwardRef((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:o,contentClassName:s,container:i,...a}=e;return d.createElement(Fi,{open:n,onOpenChange:r},d.createElement(Bi,{container:i},d.createElement(mr,{"cmdk-overlay":"",className:o}),d.createElement(gr,{"aria-label":e.label,"cmdk-dialog":"",className:s},d.createElement(Ug,{ref:t,...a}))))}),UN=d.forwardRef((e,t)=>Ot(n=>n.filtered.count===0)?d.createElement(H.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),GN=d.forwardRef((e,t)=>{let{progress:n,children:r,label:o="Loading...",...s}=e;return d.createElement(H.div,{ref:t,...s,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":o},is(e,i=>d.createElement("div",{"aria-hidden":!0},i)))}),Be=Object.assign(Ug,{List:zN,Item:$N,Input:WN,Group:FN,Separator:BN,Dialog:HN,Empty:UN,Loading:GN});function KN(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function YN(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function Gg(e){let t=d.useRef(e);return Zt(()=>{t.current=e}),t}var Zt=typeof window>"u"?d.useEffect:d.useLayoutEffect;function jn(e){let t=d.useRef();return t.current===void 0&&(t.current=e()),t}function Ot(e){let t=Ia(),n=()=>e(t.snapshot());return d.useSyncExternalStore(t.subscribe,n,n)}function Kg(e,t,n,r=[]){let o=d.useRef(),s=Ar();return Zt(()=>{var i;let a=(()=>{var c;for(let u of n){if(typeof u=="string")return u.trim();if(typeof u=="object"&&"current"in u)return u.current?(c=u.current.textContent)==null?void 0:c.trim():o.current}})(),l=r.map(c=>c.trim());s.value(e,a,l),(i=t.current)==null||i.setAttribute(_n,a),o.current=a}),o}var XN=()=>{let[e,t]=d.useState(),n=jn(()=>new Map);return Zt(()=>{n.current.forEach(r=>r()),n.current=new Map},[e]),(r,o)=>{n.current.set(r,o),t({})}};function qN(e){let t=e.type;return typeof t=="function"?t(e.props):"render"in t?t.render(e.props):e}function is({asChild:e,children:t},n){return e&&d.isValidElement(t)?d.cloneElement(qN(t),{ref:t.ref},n(t.props.children)):n(t)}var ZN={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};const Da=d.forwardRef(({className:e,...t},n)=>p.jsx(Be,{ref:n,className:M("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...t}));Da.displayName=Be.displayName;const JN=({children:e,...t})=>p.jsx(Uf,{...t,children:p.jsx(zi,{className:"overflow-hidden p-0 shadow-lg",children:p.jsx(Da,{className:"[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",children:e})})}),Yg=d.forwardRef(({className:e,...t},n)=>p.jsxs("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[p.jsx(b0,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),p.jsx(Be.Input,{ref:n,className:M("flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",e),...t})]}));Yg.displayName=Be.Input.displayName;const Xg=d.forwardRef(({className:e,...t},n)=>p.jsx(Be.List,{ref:n,className:M("max-h-[300px] overflow-y-auto overflow-x-hidden",e),...t}));Xg.displayName=Be.List.displayName;const qg=d.forwardRef((e,t)=>p.jsx(Be.Empty,{ref:t,className:"py-6 text-center text-sm",...e}));qg.displayName=Be.Empty.displayName;const Zg=d.forwardRef(({className:e,...t},n)=>p.jsx(Be.Group,{ref:n,className:M("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",e),...t}));Zg.displayName=Be.Group.displayName;const Jg=d.forwardRef(({className:e,...t},n)=>p.jsx(Be.Separator,{ref:n,className:M("-mx-1 h-px bg-border",e),...t}));Jg.displayName=Be.Separator.displayName;const Qg=d.forwardRef(({className:e,...t},n)=>p.jsx(Be.Item,{ref:n,className:M("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none aria-selected:bg-accent aria-selected:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...t}));Qg.displayName=Be.Item.displayName;const ev=({className:e,...t})=>p.jsx("span",{className:M("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});ev.displayName="CommandShortcut";const tv=d.forwardRef(({className:e,...t},n)=>p.jsx("ol",{ref:n,className:M("relative border-l border-muted",e),...t}));tv.displayName="Timeline";const nv=d.forwardRef(({className:e,...t},n)=>p.jsx("li",{ref:n,className:M("mb-10 ml-4",e),...t}));nv.displayName="TimelineItem";const rv=d.forwardRef(({className:e,...t},n)=>p.jsx("div",{ref:n,className:M("absolute -left-1.5 mt-1.5 h-3 w-3 rounded-full border border-white bg-muted-foreground dark:border-gray-900 dark:bg-gray-700",e),...t}));rv.displayName="TimelinePoint";const ov=d.forwardRef(({className:e,...t},n)=>p.jsx("div",{ref:n,className:M("ml-4",e),...t}));ov.displayName="TimelineContent";const sv=d.forwardRef(({className:e,...t},n)=>p.jsx("time",{ref:n,className:M("mb-1 text-sm font-normal leading-none text-muted-foreground",e),...t}));sv.displayName="TimelineTime";const iv=d.forwardRef(({className:e,...t},n)=>p.jsx("h3",{ref:n,className:M("text-lg font-semibold text-foreground",e),...t}));iv.displayName="TimelineTitle";const av=d.forwardRef(({className:e,...t},n)=>p.jsx("p",{ref:n,className:M("mb-4 text-base font-normal text-muted-foreground",e),...t}));av.displayName="TimelineDescription";function QN(e,t=[]){let n=[];function r(s,i){const a=d.createContext(i);a.displayName=s+"Context";const l=n.length;n=[...n,i];const c=f=>{var x;const{scope:h,children:m,...y}=f,g=((x=h==null?void 0:h[e])==null?void 0:x[l])||a,v=d.useMemo(()=>y,Object.values(y));return p.jsx(g.Provider,{value:v,children:m})};c.displayName=s+"Provider";function u(f,h){var g;const m=((g=h==null?void 0:h[e])==null?void 0:g[l])||a,y=d.useContext(m);if(y)return y;if(i!==void 0)return i;throw new Error(`\`${f}\` must be used within \`${s}\``)}return[c,u]}const o=()=>{const s=n.map(i=>d.createContext(i));return function(a){const l=(a==null?void 0:a[e])||s;return d.useMemo(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])}};return o.scopeName=e,[r,eM(o,...t)]}function eM(...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:l,scopeName:c})=>{const f=l(s)[`__scope${c}`];return{...a,...f}},{});return d.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}var tM=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],ka=tM.reduce((e,t)=>{const n=nr(`Primitive.${t}`),r=d.forwardRef((o,s)=>{const{asChild:i,...a}=o,l=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),p.jsx(l,{...a,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),Oa={exports:{}},La={};/**
110
+ Defaulting to \`null\`.`}var Lh=Mh,nN=Dh;const Vh=u.forwardRef(({className:e,value:t,...n},r)=>p.jsx(Lh,{ref:r,className:M("relative h-4 w-full overflow-hidden rounded-full bg-secondary",e),...n,children:p.jsx(nN,{className:"h-full w-full flex-1 bg-primary transition-all",style:{transform:`translateX(-${100-(t||0)}%)`}})}));Vh.displayName=Lh.displayName;const rN=fi,oN=vf,sN=lo,$h=pi,Bi=u.forwardRef(({className:e,...t},n)=>p.jsx(Wn,{className:M("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t,ref:n}));Bi.displayName=Wn.displayName;const iN=Kt("fixed z-50 gap-4 bg-background p-6 shadow-lg transition ease-in-out data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:duration-300 data-[state=open]:duration-500",{variants:{side:{top:"inset-x-0 top-0 border-b data-[state=closed]:slide-out-to-top data-[state=open]:slide-in-from-top",bottom:"inset-x-0 bottom-0 border-t data-[state=closed]:slide-out-to-bottom data-[state=open]:slide-in-from-bottom",left:"inset-y-0 left-0 h-full w-3/4 border-r data-[state=closed]:slide-out-to-left data-[state=open]:slide-in-from-left sm:max-w-sm",right:"inset-y-0 right-0 h-full w-3/4 border-l data-[state=closed]:slide-out-to-right data-[state=open]:slide-in-from-right sm:max-w-sm"}},defaultVariants:{side:"right"}}),Fh=u.forwardRef(({side:e="right",className:t,children:n,...r},o)=>p.jsxs($h,{children:[p.jsx(Bi,{}),p.jsxs(Hn,{ref:o,className:M(iN({side:e}),t),...r,children:[n,p.jsxs(lo,{className:"absolute right-4 top-4 rounded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-secondary",children:[p.jsx(Ps,{className:"h-4 w-4"}),p.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Fh.displayName=Hn.displayName;const Rh=({className:e,...t})=>p.jsx("div",{className:M("flex flex-col space-y-2 text-center sm:text-left",e),...t});Rh.displayName="SheetHeader";const Bh=({className:e,...t})=>p.jsx("div",{className:M("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});Bh.displayName="SheetFooter";const zh=u.forwardRef(({className:e,...t},n)=>p.jsx(io,{ref:n,className:M("text-lg font-semibold text-foreground",e),...t}));zh.displayName=io.displayName;const Wh=u.forwardRef(({className:e,...t},n)=>p.jsx(ao,{ref:n,className:M("text-sm text-muted-foreground",e),...t}));Wh.displayName=ao.displayName;const Hh=u.forwardRef(({className:e,...t},n)=>p.jsx("div",{ref:n,className:M("rounded-lg border bg-card text-card-foreground shadow-sm",e),...t}));Hh.displayName="Card";const jh=u.forwardRef(({className:e,...t},n)=>p.jsx("div",{ref:n,className:M("flex flex-col space-y-1.5 p-6",e),...t}));jh.displayName="CardHeader";const Uh=u.forwardRef(({className:e,...t},n)=>p.jsx("h3",{ref:n,className:M("text-2xl font-semibold leading-none tracking-tight",e),...t}));Uh.displayName="CardTitle";const Gh=u.forwardRef(({className:e,...t},n)=>p.jsx("p",{ref:n,className:M("text-sm text-muted-foreground",e),...t}));Gh.displayName="CardDescription";const Kh=u.forwardRef(({className:e,...t},n)=>p.jsx("div",{ref:n,className:M("p-6 pt-0",e),...t}));Kh.displayName="CardContent";const Yh=u.forwardRef(({className:e,...t},n)=>p.jsx("div",{ref:n,className:M("flex items-center p-6 pt-0",e),...t}));Yh.displayName="CardFooter";var Co="Collapsible",[aN,Xh]=ye(Co),[lN,zi]=aN(Co),qh=u.forwardRef((e,t)=>{const{__scopeCollapsible:n,open:r,defaultOpen:o,disabled:s,onOpenChange:i,...a}=e,[l,c]=we({prop:r,defaultProp:o??!1,onChange:i,caller:Co});return p.jsx(lN,{scope:n,disabled:s,contentId:he(),open:l,onOpenToggle:u.useCallback(()=>c(d=>!d),[c]),children:p.jsx(W.div,{"data-state":Hi(l),"data-disabled":s?"":void 0,...a,ref:t})})});qh.displayName=Co;var Zh="CollapsibleTrigger",Jh=u.forwardRef((e,t)=>{const{__scopeCollapsible:n,...r}=e,o=zi(Zh,n);return p.jsx(W.button,{type:"button","aria-controls":o.contentId,"aria-expanded":o.open||!1,"data-state":Hi(o.open),"data-disabled":o.disabled?"":void 0,disabled:o.disabled,...r,ref:t,onClick:k(e.onClick,o.onOpenToggle)})});Jh.displayName=Zh;var Wi="CollapsibleContent",Qh=u.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=zi(Wi,e.__scopeCollapsible);return p.jsx(ve,{present:n||o.open,children:({present:s})=>p.jsx(cN,{...r,ref:t,present:s})})});Qh.displayName=Wi;var cN=u.forwardRef((e,t)=>{const{__scopeCollapsible:n,present:r,children:o,...s}=e,i=zi(Wi,n),[a,l]=u.useState(r),c=u.useRef(null),d=J(t,c),f=u.useRef(0),h=f.current,m=u.useRef(0),y=m.current,g=i.open||a,v=u.useRef(g),b=u.useRef(void 0);return u.useEffect(()=>{const w=requestAnimationFrame(()=>v.current=!1);return()=>cancelAnimationFrame(w)},[]),pe(()=>{const w=c.current;if(w){b.current=b.current||{transitionDuration:w.style.transitionDuration,animationName:w.style.animationName},w.style.transitionDuration="0s",w.style.animationName="none";const x=w.getBoundingClientRect();f.current=x.height,m.current=x.width,v.current||(w.style.transitionDuration=b.current.transitionDuration,w.style.animationName=b.current.animationName),l(r)}},[i.open,r]),p.jsx(W.div,{"data-state":Hi(i.open),"data-disabled":i.disabled?"":void 0,id:i.contentId,hidden:!g,...s,ref:d,style:{"--radix-collapsible-content-height":h?`${h}px`:void 0,"--radix-collapsible-content-width":y?`${y}px`:void 0,...e.style},children:g&&o})});function Hi(e){return e?"open":"closed"}var uN=qh,dN=Jh,fN=Qh,We="Accordion",pN=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[ji,hN,mN]=Yt(We),[Eo]=ye(We,[mN,Xh]),Ui=Xh(),em=P.forwardRef((e,t)=>{const{type:n,...r}=e,o=r,s=r;return p.jsx(ji.Provider,{scope:e.__scopeAccordion,children:n==="multiple"?p.jsx(bN,{...s,ref:t}):p.jsx(yN,{...o,ref:t})})});em.displayName=We;var[tm,gN]=Eo(We),[nm,vN]=Eo(We,{collapsible:!1}),yN=P.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},collapsible:s=!1,...i}=e,[a,l]=we({prop:n,defaultProp:r??"",onChange:o,caller:We});return p.jsx(tm,{scope:e.__scopeAccordion,value:P.useMemo(()=>a?[a]:[],[a]),onItemOpen:l,onItemClose:P.useCallback(()=>s&&l(""),[s,l]),children:p.jsx(nm,{scope:e.__scopeAccordion,collapsible:s,children:p.jsx(rm,{...i,ref:t})})})}),bN=P.forwardRef((e,t)=>{const{value:n,defaultValue:r,onValueChange:o=()=>{},...s}=e,[i,a]=we({prop:n,defaultProp:r??[],onChange:o,caller:We}),l=P.useCallback(d=>a((f=[])=>[...f,d]),[a]),c=P.useCallback(d=>a((f=[])=>f.filter(h=>h!==d)),[a]);return p.jsx(tm,{scope:e.__scopeAccordion,value:i,onItemOpen:l,onItemClose:c,children:p.jsx(nm,{scope:e.__scopeAccordion,collapsible:!0,children:p.jsx(rm,{...s,ref:t})})})}),[wN,Po]=Eo(We),rm=P.forwardRef((e,t)=>{const{__scopeAccordion:n,disabled:r,dir:o,orientation:s="vertical",...i}=e,a=P.useRef(null),l=J(a,t),c=hN(n),f=ht(o)==="ltr",h=k(e.onKeyDown,m=>{var N;if(!pN.includes(m.key))return;const y=m.target,g=c().filter(I=>{var O;return!((O=I.ref.current)!=null&&O.disabled)}),v=g.findIndex(I=>I.ref.current===y),b=g.length;if(v===-1)return;m.preventDefault();let w=v;const x=0,S=b-1,C=()=>{w=v+1,w>S&&(w=x)},T=()=>{w=v-1,w<x&&(w=S)};switch(m.key){case"Home":w=x;break;case"End":w=S;break;case"ArrowRight":s==="horizontal"&&(f?C():T());break;case"ArrowDown":s==="vertical"&&C();break;case"ArrowLeft":s==="horizontal"&&(f?T():C());break;case"ArrowUp":s==="vertical"&&T();break}const A=w%b;(N=g[A].ref.current)==null||N.focus()});return p.jsx(wN,{scope:n,disabled:r,direction:o,orientation:s,children:p.jsx(ji.Slot,{scope:n,children:p.jsx(W.div,{...i,"data-orientation":s,ref:l,onKeyDown:r?void 0:h})})})}),To="AccordionItem",[xN,Gi]=Eo(To),om=P.forwardRef((e,t)=>{const{__scopeAccordion:n,value:r,...o}=e,s=Po(To,n),i=gN(To,n),a=Ui(n),l=he(),c=r&&i.value.includes(r)||!1,d=s.disabled||e.disabled;return p.jsx(xN,{scope:n,open:c,disabled:d,triggerId:l,children:p.jsx(uN,{"data-orientation":s.orientation,"data-state":um(c),...a,...o,ref:t,disabled:d,open:c,onOpenChange:f=>{f?i.onItemOpen(r):i.onItemClose(r)}})})});om.displayName=To;var sm="AccordionHeader",im=P.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=Po(We,n),s=Gi(sm,n);return p.jsx(W.h3,{"data-orientation":o.orientation,"data-state":um(s.open),"data-disabled":s.disabled?"":void 0,...r,ref:t})});im.displayName=sm;var Ki="AccordionTrigger",am=P.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=Po(We,n),s=Gi(Ki,n),i=vN(Ki,n),a=Ui(n);return p.jsx(ji.ItemSlot,{scope:n,children:p.jsx(dN,{"aria-disabled":s.open&&!i.collapsible||void 0,"data-orientation":o.orientation,id:s.triggerId,...a,...r,ref:t})})});am.displayName=Ki;var lm="AccordionContent",cm=P.forwardRef((e,t)=>{const{__scopeAccordion:n,...r}=e,o=Po(We,n),s=Gi(lm,n),i=Ui(n);return p.jsx(fN,{role:"region","aria-labelledby":s.triggerId,"data-orientation":o.orientation,...i,...r,ref:t,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...e.style}})});cm.displayName=lm;function um(e){return e?"open":"closed"}var SN=em,CN=om,EN=im,dm=am,fm=cm;const PN=SN,pm=u.forwardRef(({className:e,...t},n)=>p.jsx(CN,{ref:n,className:M("border-b",e),...t}));pm.displayName="AccordionItem";const hm=u.forwardRef(({className:e,children:t,...n},r)=>p.jsx(EN,{className:"flex",children:p.jsxs(dm,{ref:r,className:M("flex flex-1 items-center justify-between py-4 font-medium transition-all hover:underline [&[data-state=open]>svg]:rotate-180",e),...n,children:[t,p.jsx(gc,{className:"h-4 w-4 shrink-0 transition-transform duration-200"})]})}));hm.displayName=dm.displayName;const mm=u.forwardRef(({className:e,children:t,...n},r)=>p.jsx(fm,{ref:r,className:"overflow-hidden text-sm transition-all data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down",...n,children:p.jsx("div",{className:M("pb-4 pt-0",e),children:t})}));mm.displayName=fm.displayName;function TN(e,t){return u.useReducer((n,r)=>t[n][r]??n,e)}var Yi="ScrollArea",[gm]=ye(Yi),[AN,Oe]=gm(Yi),vm=u.forwardRef((e,t)=>{const{__scopeScrollArea:n,type:r="hover",dir:o,scrollHideDelay:s=600,...i}=e,[a,l]=u.useState(null),[c,d]=u.useState(null),[f,h]=u.useState(null),[m,y]=u.useState(null),[g,v]=u.useState(null),[b,w]=u.useState(0),[x,S]=u.useState(0),[C,T]=u.useState(!1),[A,N]=u.useState(!1),I=J(t,L=>l(L)),O=ht(o);return p.jsx(AN,{scope:n,type:r,dir:O,scrollHideDelay:s,scrollArea:a,viewport:c,onViewportChange:d,content:f,onContentChange:h,scrollbarX:m,onScrollbarXChange:y,scrollbarXEnabled:C,onScrollbarXEnabledChange:T,scrollbarY:g,onScrollbarYChange:v,scrollbarYEnabled:A,onScrollbarYEnabledChange:N,onCornerWidthChange:w,onCornerHeightChange:S,children:p.jsx(W.div,{dir:O,...i,ref:I,style:{position:"relative","--radix-scroll-area-corner-width":b+"px","--radix-scroll-area-corner-height":x+"px",...e.style}})})});vm.displayName=Yi;var ym="ScrollAreaViewport",bm=u.forwardRef((e,t)=>{const{__scopeScrollArea:n,children:r,nonce:o,...s}=e,i=Oe(ym,n),a=u.useRef(null),l=J(t,a,i.onViewportChange);return p.jsxs(p.Fragment,{children:[p.jsx("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"},nonce:o}),p.jsx(W.div,{"data-radix-scroll-area-viewport":"",...s,ref:l,style:{overflowX:i.scrollbarXEnabled?"scroll":"hidden",overflowY:i.scrollbarYEnabled?"scroll":"hidden",...e.style},children:p.jsx("div",{ref:i.onContentChange,style:{minWidth:"100%",display:"table"},children:r})})]})});bm.displayName=ym;var Je="ScrollAreaScrollbar",Xi=u.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=Oe(Je,e.__scopeScrollArea),{onScrollbarXEnabledChange:s,onScrollbarYEnabledChange:i}=o,a=e.orientation==="horizontal";return u.useEffect(()=>(a?s(!0):i(!0),()=>{a?s(!1):i(!1)}),[a,s,i]),o.type==="hover"?p.jsx(NN,{...r,ref:t,forceMount:n}):o.type==="scroll"?p.jsx(MN,{...r,ref:t,forceMount:n}):o.type==="auto"?p.jsx(wm,{...r,ref:t,forceMount:n}):o.type==="always"?p.jsx(qi,{...r,ref:t}):null});Xi.displayName=Je;var NN=u.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=Oe(Je,e.__scopeScrollArea),[s,i]=u.useState(!1);return u.useEffect(()=>{const a=o.scrollArea;let l=0;if(a){const c=()=>{window.clearTimeout(l),i(!0)},d=()=>{l=window.setTimeout(()=>i(!1),o.scrollHideDelay)};return a.addEventListener("pointerenter",c),a.addEventListener("pointerleave",d),()=>{window.clearTimeout(l),a.removeEventListener("pointerenter",c),a.removeEventListener("pointerleave",d)}}},[o.scrollArea,o.scrollHideDelay]),p.jsx(ve,{present:n||s,children:p.jsx(wm,{"data-state":s?"visible":"hidden",...r,ref:t})})}),MN=u.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=Oe(Je,e.__scopeScrollArea),s=e.orientation==="horizontal",i=Io(()=>l("SCROLL_END"),100),[a,l]=TN("hidden",{hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}});return u.useEffect(()=>{if(a==="idle"){const c=window.setTimeout(()=>l("HIDE"),o.scrollHideDelay);return()=>window.clearTimeout(c)}},[a,o.scrollHideDelay,l]),u.useEffect(()=>{const c=o.viewport,d=s?"scrollLeft":"scrollTop";if(c){let f=c[d];const h=()=>{const m=c[d];f!==m&&(l("SCROLL"),i()),f=m};return c.addEventListener("scroll",h),()=>c.removeEventListener("scroll",h)}},[o.viewport,s,l,i]),p.jsx(ve,{present:n||a!=="hidden",children:p.jsx(qi,{"data-state":a==="hidden"?"hidden":"visible",...r,ref:t,onPointerEnter:k(e.onPointerEnter,()=>l("POINTER_ENTER")),onPointerLeave:k(e.onPointerLeave,()=>l("POINTER_LEAVE"))})})}),wm=u.forwardRef((e,t)=>{const n=Oe(Je,e.__scopeScrollArea),{forceMount:r,...o}=e,[s,i]=u.useState(!1),a=e.orientation==="horizontal",l=Io(()=>{if(n.viewport){const c=n.viewport.offsetWidth<n.viewport.scrollWidth,d=n.viewport.offsetHeight<n.viewport.scrollHeight;i(a?c:d)}},10);return fn(n.viewport,l),fn(n.content,l),p.jsx(ve,{present:r||s,children:p.jsx(qi,{"data-state":s?"visible":"hidden",...o,ref:t})})}),qi=u.forwardRef((e,t)=>{const{orientation:n="vertical",...r}=e,o=Oe(Je,e.__scopeScrollArea),s=u.useRef(null),i=u.useRef(0),[a,l]=u.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),c=Pm(a.viewport,a.content),d={...r,sizes:a,onSizesChange:l,hasThumb:c>0&&c<1,onThumbChange:h=>s.current=h,onThumbPointerUp:()=>i.current=0,onThumbPointerDown:h=>i.current=h};function f(h,m){return LN(h,i.current,a,m)}return n==="horizontal"?p.jsx(IN,{...d,ref:t,onThumbPositionChange:()=>{if(o.viewport&&s.current){const h=o.viewport.scrollLeft,m=Tm(h,a,o.dir);s.current.style.transform=`translate3d(${m}px, 0, 0)`}},onWheelScroll:h=>{o.viewport&&(o.viewport.scrollLeft=h)},onDragScroll:h=>{o.viewport&&(o.viewport.scrollLeft=f(h,o.dir))}}):n==="vertical"?p.jsx(DN,{...d,ref:t,onThumbPositionChange:()=>{if(o.viewport&&s.current){const h=o.viewport.scrollTop,m=Tm(h,a);s.current.style.transform=`translate3d(0, ${m}px, 0)`}},onWheelScroll:h=>{o.viewport&&(o.viewport.scrollTop=h)},onDragScroll:h=>{o.viewport&&(o.viewport.scrollTop=f(h))}}):null}),IN=u.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...o}=e,s=Oe(Je,e.__scopeScrollArea),[i,a]=u.useState(),l=u.useRef(null),c=J(t,l,s.onScrollbarXChange);return u.useEffect(()=>{l.current&&a(getComputedStyle(l.current))},[l]),p.jsx(Sm,{"data-orientation":"horizontal",...o,ref:c,sizes:n,style:{bottom:0,left:s.dir==="rtl"?"var(--radix-scroll-area-corner-width)":0,right:s.dir==="ltr"?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":Mo(n)+"px",...e.style},onThumbPointerDown:d=>e.onThumbPointerDown(d.x),onDragScroll:d=>e.onDragScroll(d.x),onWheelScroll:(d,f)=>{if(s.viewport){const h=s.viewport.scrollLeft+d.deltaX;e.onWheelScroll(h),Nm(h,f)&&d.preventDefault()}},onResize:()=>{l.current&&s.viewport&&i&&r({content:s.viewport.scrollWidth,viewport:s.viewport.offsetWidth,scrollbar:{size:l.current.clientWidth,paddingStart:No(i.paddingLeft),paddingEnd:No(i.paddingRight)}})}})}),DN=u.forwardRef((e,t)=>{const{sizes:n,onSizesChange:r,...o}=e,s=Oe(Je,e.__scopeScrollArea),[i,a]=u.useState(),l=u.useRef(null),c=J(t,l,s.onScrollbarYChange);return u.useEffect(()=>{l.current&&a(getComputedStyle(l.current))},[l]),p.jsx(Sm,{"data-orientation":"vertical",...o,ref:c,sizes:n,style:{top:0,right:s.dir==="ltr"?0:void 0,left:s.dir==="rtl"?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":Mo(n)+"px",...e.style},onThumbPointerDown:d=>e.onThumbPointerDown(d.y),onDragScroll:d=>e.onDragScroll(d.y),onWheelScroll:(d,f)=>{if(s.viewport){const h=s.viewport.scrollTop+d.deltaY;e.onWheelScroll(h),Nm(h,f)&&d.preventDefault()}},onResize:()=>{l.current&&s.viewport&&i&&r({content:s.viewport.scrollHeight,viewport:s.viewport.offsetHeight,scrollbar:{size:l.current.clientHeight,paddingStart:No(i.paddingTop),paddingEnd:No(i.paddingBottom)}})}})}),[_N,xm]=gm(Je),Sm=u.forwardRef((e,t)=>{const{__scopeScrollArea:n,sizes:r,hasThumb:o,onThumbChange:s,onThumbPointerUp:i,onThumbPointerDown:a,onThumbPositionChange:l,onDragScroll:c,onWheelScroll:d,onResize:f,...h}=e,m=Oe(Je,n),[y,g]=u.useState(null),v=J(t,I=>g(I)),b=u.useRef(null),w=u.useRef(""),x=m.viewport,S=r.content-r.viewport,C=de(d),T=de(l),A=Io(f,10);function N(I){if(b.current){const O=I.clientX-b.current.left,L=I.clientY-b.current.top;c({x:O,y:L})}}return u.useEffect(()=>{const I=O=>{const L=O.target;(y==null?void 0:y.contains(L))&&C(O,S)};return document.addEventListener("wheel",I,{passive:!1}),()=>document.removeEventListener("wheel",I,{passive:!1})},[x,y,S,C]),u.useEffect(T,[r,T]),fn(y,A),fn(m.content,A),p.jsx(_N,{scope:n,scrollbar:y,hasThumb:o,onThumbChange:de(s),onThumbPointerUp:de(i),onThumbPositionChange:T,onThumbPointerDown:de(a),children:p.jsx(W.div,{...h,ref:v,style:{position:"absolute",...h.style},onPointerDown:k(e.onPointerDown,I=>{I.button===0&&(I.target.setPointerCapture(I.pointerId),b.current=y.getBoundingClientRect(),w.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",m.viewport&&(m.viewport.style.scrollBehavior="auto"),N(I))}),onPointerMove:k(e.onPointerMove,N),onPointerUp:k(e.onPointerUp,I=>{const O=I.target;O.hasPointerCapture(I.pointerId)&&O.releasePointerCapture(I.pointerId),document.body.style.webkitUserSelect=w.current,m.viewport&&(m.viewport.style.scrollBehavior=""),b.current=null})})})}),Ao="ScrollAreaThumb",Cm=u.forwardRef((e,t)=>{const{forceMount:n,...r}=e,o=xm(Ao,e.__scopeScrollArea);return p.jsx(ve,{present:n||o.hasThumb,children:p.jsx(kN,{ref:t,...r})})}),kN=u.forwardRef((e,t)=>{const{__scopeScrollArea:n,style:r,...o}=e,s=Oe(Ao,n),i=xm(Ao,n),{onThumbPositionChange:a}=i,l=J(t,f=>i.onThumbChange(f)),c=u.useRef(void 0),d=Io(()=>{c.current&&(c.current(),c.current=void 0)},100);return u.useEffect(()=>{const f=s.viewport;if(f){const h=()=>{if(d(),!c.current){const m=VN(f,a);c.current=m,a()}};return a(),f.addEventListener("scroll",h),()=>f.removeEventListener("scroll",h)}},[s.viewport,d,a]),p.jsx(W.div,{"data-state":i.hasThumb?"visible":"hidden",...o,ref:l,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...r},onPointerDownCapture:k(e.onPointerDownCapture,f=>{const m=f.target.getBoundingClientRect(),y=f.clientX-m.left,g=f.clientY-m.top;i.onThumbPointerDown({x:y,y:g})}),onPointerUp:k(e.onPointerUp,i.onThumbPointerUp)})});Cm.displayName=Ao;var Zi="ScrollAreaCorner",Em=u.forwardRef((e,t)=>{const n=Oe(Zi,e.__scopeScrollArea),r=!!(n.scrollbarX&&n.scrollbarY);return n.type!=="scroll"&&r?p.jsx(ON,{...e,ref:t}):null});Em.displayName=Zi;var ON=u.forwardRef((e,t)=>{const{__scopeScrollArea:n,...r}=e,o=Oe(Zi,n),[s,i]=u.useState(0),[a,l]=u.useState(0),c=!!(s&&a);return fn(o.scrollbarX,()=>{var f;const d=((f=o.scrollbarX)==null?void 0:f.offsetHeight)||0;o.onCornerHeightChange(d),l(d)}),fn(o.scrollbarY,()=>{var f;const d=((f=o.scrollbarY)==null?void 0:f.offsetWidth)||0;o.onCornerWidthChange(d),i(d)}),c?p.jsx(W.div,{...r,ref:t,style:{width:s,height:a,position:"absolute",right:o.dir==="ltr"?0:void 0,left:o.dir==="rtl"?0:void 0,bottom:0,...e.style}}):null});function No(e){return e?parseInt(e,10):0}function Pm(e,t){const n=e/t;return isNaN(n)?0:n}function Mo(e){const t=Pm(e.viewport,e.content),n=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,r=(e.scrollbar.size-n)*t;return Math.max(r,18)}function LN(e,t,n,r="ltr"){const o=Mo(n),s=o/2,i=t||s,a=o-i,l=n.scrollbar.paddingStart+i,c=n.scrollbar.size-n.scrollbar.paddingEnd-a,d=n.content-n.viewport,f=r==="ltr"?[0,d]:[d*-1,0];return Am([l,c],f)(e)}function Tm(e,t,n="ltr"){const r=Mo(t),o=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,s=t.scrollbar.size-o,i=t.content-t.viewport,a=s-r,l=n==="ltr"?[0,i]:[i*-1,0],c=kn(e,l);return Am([0,i],[0,a])(c)}function Am(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 Nm(e,t){return e>0&&e<t}var VN=(e,t=()=>{})=>{let n={left:e.scrollLeft,top:e.scrollTop},r=0;return function o(){const s={left:e.scrollLeft,top:e.scrollTop},i=n.left!==s.left,a=n.top!==s.top;(i||a)&&t(),n=s,r=window.requestAnimationFrame(o)}(),()=>window.cancelAnimationFrame(r)};function Io(e,t){const n=de(e),r=u.useRef(0);return u.useEffect(()=>()=>window.clearTimeout(r.current),[]),u.useCallback(()=>{window.clearTimeout(r.current),r.current=window.setTimeout(n,t)},[n,t])}function fn(e,t){const n=de(t);pe(()=>{let r=0;if(e){const o=new ResizeObserver(()=>{cancelAnimationFrame(r),r=window.requestAnimationFrame(n)});return o.observe(e),()=>{window.cancelAnimationFrame(r),o.unobserve(e)}}},[e,n])}var Mm=vm,$N=bm,FN=Em;const Im=u.forwardRef(({className:e,children:t,...n},r)=>p.jsxs(Mm,{ref:r,className:M("relative overflow-hidden",e),...n,children:[p.jsx($N,{className:"h-full w-full rounded-[inherit]",children:t}),p.jsx(Ji,{}),p.jsx(FN,{})]}));Im.displayName=Mm.displayName;const Ji=u.forwardRef(({className:e,orientation:t="vertical",...n},r)=>p.jsx(Xi,{ref:r,orientation:t,className:M("flex touch-none select-none transition-colors",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-[1px]",t==="horizontal"&&"h-2.5 border-t border-t-transparent p-[1px]",e),...n,children:p.jsx(Cm,{className:"relative flex-1 rounded-full bg-border"})}));Ji.displayName=Xi.displayName;var RN=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],BN=RN.reduce((e,t)=>{const n=Mn(`Primitive.${t}`),r=u.forwardRef((o,s)=>{const{asChild:i,...a}=o,l=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),p.jsx(l,{...a,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),zN="Separator",Dm="horizontal",WN=["horizontal","vertical"],_m=u.forwardRef((e,t)=>{const{decorative:n,orientation:r=Dm,...o}=e,s=HN(r)?r:Dm,a=n?{role:"none"}:{"aria-orientation":s==="vertical"?s:void 0,role:"separator"};return p.jsx(BN.div,{"data-orientation":s,...a,...o,ref:t})});_m.displayName=zN;function HN(e){return WN.includes(e)}var km=_m;const Om=u.forwardRef(({className:e,orientation:t="horizontal",...n},r)=>p.jsx(km,{ref:r,decorative:!0,orientation:t,className:M("shrink-0 bg-border",t==="horizontal"?"h-[1px] w-full":"h-full w-[1px]",e),...n}));Om.displayName=km.displayName;const Lm=u.forwardRef(({...e},t)=>p.jsx("nav",{ref:t,"aria-label":"breadcrumb",...e}));Lm.displayName="Breadcrumb";const Vm=u.forwardRef(({className:e,...t},n)=>p.jsx("ol",{ref:n,className:M("flex flex-wrap items-center gap-1.5 break-words text-sm text-muted-foreground sm:gap-2.5",e),...t}));Vm.displayName="BreadcrumbList";const $m=u.forwardRef(({className:e,...t},n)=>p.jsx("li",{ref:n,className:M("inline-flex items-center gap-1.5",e),...t}));$m.displayName="BreadcrumbItem";const Fm=u.forwardRef(({asChild:e,className:t,...n},r)=>{const o=e?u.Fragment:"a";return p.jsx(o,{ref:r,className:M("transition-colors hover:text-foreground",t),...n})});Fm.displayName="BreadcrumbLink";const Rm=u.forwardRef(({className:e,...t},n)=>p.jsx("span",{ref:n,role:"link","aria-disabled":"true","aria-current":"page",className:M("font-normal text-foreground",e),...t}));Rm.displayName="BreadcrumbPage";const Bm=({children:e,className:t,...n})=>p.jsx("li",{role:"presentation","aria-hidden":"true",className:M("[&>svg]:size-3.5",t),...n,children:e??p.jsx(Es,{})});Bm.displayName="BreadcrumbSeparator";const zm=({className:e,...t})=>p.jsxs("span",{role:"presentation","aria-hidden":"true",className:M("flex h-9 w-9 items-center justify-center",e),...t,children:[p.jsx(yc,{className:"h-4 w-4"}),p.jsx("span",{className:"sr-only",children:"More"})]});zm.displayName="BreadcrumbEllipsis";const Wm=({className:e,...t})=>p.jsx("nav",{role:"navigation","aria-label":"pagination",className:M("mx-auto flex w-full justify-center",e),...t});Wm.displayName="Pagination";const Hm=u.forwardRef(({className:e,...t},n)=>p.jsx("ul",{ref:n,className:M("flex flex-row items-center gap-1",e),...t}));Hm.displayName="PaginationContent";const jm=u.forwardRef(({className:e,...t},n)=>p.jsx("li",{ref:n,className:M("",e),...t}));jm.displayName="PaginationItem";const Do=({className:e,isActive:t,size:n="icon",...r})=>p.jsx("a",{"aria-current":t?"page":void 0,className:M(bs({variant:t?"outline":"ghost",size:n}),e),...r});Do.displayName="PaginationLink";const Um=({className:e,...t})=>p.jsxs(Do,{"aria-label":"Go to previous page",size:"default",className:M("gap-1 pl-2.5",e),...t,children:[p.jsx(Rw,{className:"h-4 w-4"}),p.jsx("span",{children:"Previous"})]});Um.displayName="PaginationPrevious";const Gm=({className:e,...t})=>p.jsxs(Do,{"aria-label":"Go to next page",size:"default",className:M("gap-1 pr-2.5",e),...t,children:[p.jsx("span",{children:"Next"}),p.jsx(Es,{className:"h-4 w-4"})]});Gm.displayName="PaginationNext";const Km=({className:e,...t})=>p.jsxs("span",{"aria-hidden":!0,className:M("flex h-9 w-9 items-center justify-center",e),...t,children:[p.jsx(yc,{className:"h-4 w-4"}),p.jsx("span",{className:"sr-only",children:"More pages"})]});Km.displayName="PaginationEllipsis";var _o="Tabs",[jN]=ye(_o,[Xt]),Ym=Xt(),[UN,Qi]=jN(_o),Xm=u.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,onValueChange:o,defaultValue:s,orientation:i="horizontal",dir:a,activationMode:l="automatic",...c}=e,d=ht(a),[f,h]=we({prop:r,onChange:o,defaultProp:s??"",caller:_o});return p.jsx(UN,{scope:n,baseId:he(),value:f,onValueChange:h,orientation:i,dir:d,activationMode:l,children:p.jsx(W.div,{dir:d,"data-orientation":i,...c,ref:t})})});Xm.displayName=_o;var qm="TabsList",Zm=u.forwardRef((e,t)=>{const{__scopeTabs:n,loop:r=!0,...o}=e,s=Qi(qm,n),i=Ym(n);return p.jsx(Ns,{asChild:!0,...i,orientation:s.orientation,dir:s.dir,loop:r,children:p.jsx(W.div,{role:"tablist","aria-orientation":s.orientation,...o,ref:t})})});Zm.displayName=qm;var Jm="TabsTrigger",Qm=u.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,disabled:o=!1,...s}=e,i=Qi(Jm,n),a=Ym(n),l=ng(i.baseId,r),c=rg(i.baseId,r),d=r===i.value;return p.jsx(Ms,{asChild:!0,...a,focusable:!o,active:d,children:p.jsx(W.button,{type:"button",role:"tab","aria-selected":d,"aria-controls":c,"data-state":d?"active":"inactive","data-disabled":o?"":void 0,disabled:o,id:l,...s,ref:t,onMouseDown:k(e.onMouseDown,f=>{!o&&f.button===0&&f.ctrlKey===!1?i.onValueChange(r):f.preventDefault()}),onKeyDown:k(e.onKeyDown,f=>{[" ","Enter"].includes(f.key)&&i.onValueChange(r)}),onFocus:k(e.onFocus,()=>{const f=i.activationMode!=="manual";!d&&!o&&f&&i.onValueChange(r)})})})});Qm.displayName=Jm;var eg="TabsContent",tg=u.forwardRef((e,t)=>{const{__scopeTabs:n,value:r,forceMount:o,children:s,...i}=e,a=Qi(eg,n),l=ng(a.baseId,r),c=rg(a.baseId,r),d=r===a.value,f=u.useRef(d);return u.useEffect(()=>{const h=requestAnimationFrame(()=>f.current=!1);return()=>cancelAnimationFrame(h)},[]),p.jsx(ve,{present:o||d,children:({present:h})=>p.jsx(W.div,{"data-state":d?"active":"inactive","data-orientation":a.orientation,role:"tabpanel","aria-labelledby":l,hidden:!h,id:c,tabIndex:0,...i,ref:t,style:{...e.style,animationDuration:f.current?"0s":void 0},children:h&&s})})});tg.displayName=eg;function ng(e,t){return`${e}-trigger-${t}`}function rg(e,t){return`${e}-content-${t}`}var GN=Xm,og=Zm,sg=Qm,ig=tg;const KN=GN,ag=u.forwardRef(({className:e,...t},n)=>p.jsx(og,{ref:n,className:M("inline-flex h-10 items-center justify-center rounded-md bg-muted p-1 text-muted-foreground",e),...t}));ag.displayName=og.displayName;const lg=u.forwardRef(({className:e,...t},n)=>p.jsx(sg,{ref:n,className:M("inline-flex items-center justify-center whitespace-nowrap rounded-sm px-3 py-1.5 text-sm font-medium ring-offset-background transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:pointer-events-none disabled:opacity-50 data-[state=active]:bg-background data-[state=active]:text-foreground data-[state=active]:shadow-sm",e),...t}));lg.displayName=sg.displayName;const cg=u.forwardRef(({className:e,...t},n)=>p.jsx(ig,{ref:n,className:M("mt-2 ring-offset-background focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",e),...t}));cg.displayName=ig.displayName;var ug=1,YN=.9,XN=.8,qN=.17,ea=.1,ta=.999,ZN=.9999,JN=.99,QN=/[\\\/_+.#"@\[\(\{&]/,eM=/[\\\/_+.#"@\[\(\{&]/g,tM=/[\s-]/,dg=/[\s-]/g;function na(e,t,n,r,o,s,i){if(s===t.length)return o===e.length?ug:JN;var a=`${o},${s}`;if(i[a]!==void 0)return i[a];for(var l=r.charAt(s),c=n.indexOf(l,o),d=0,f,h,m,y;c>=0;)f=na(e,t,n,r,c+1,s+1,i),f>d&&(c===o?f*=ug:QN.test(e.charAt(c-1))?(f*=XN,m=e.slice(o,c-1).match(eM),m&&o>0&&(f*=Math.pow(ta,m.length))):tM.test(e.charAt(c-1))?(f*=YN,y=e.slice(o,c-1).match(dg),y&&o>0&&(f*=Math.pow(ta,y.length))):(f*=qN,o>0&&(f*=Math.pow(ta,c-o))),e.charAt(c)!==t.charAt(s)&&(f*=ZN)),(f<ea&&n.charAt(c-1)===r.charAt(s+1)||r.charAt(s+1)===r.charAt(s)&&n.charAt(c-1)!==r.charAt(s))&&(h=na(e,t,n,r,c+1,s+2,i),h*ea>f&&(f=h*ea)),f>d&&(d=f),c=n.indexOf(l,c+1);return i[a]=d,d}function fg(e){return e.toLowerCase().replace(dg," ")}function nM(e,t,n){return e=n&&n.length>0?`${e+" "+n.join(" ")}`:e,na(e,t,fg(e),fg(t),0,0,{})}var er='[cmdk-group=""]',ra='[cmdk-group-items=""]',rM='[cmdk-group-heading=""]',pg='[cmdk-item=""]',hg=`${pg}:not([aria-disabled="true"])`,oa="cmdk-item-select",pn="data-value",oM=(e,t,n)=>nM(e,t,n),mg=u.createContext(void 0),tr=()=>u.useContext(mg),gg=u.createContext(void 0),sa=()=>u.useContext(gg),vg=u.createContext(void 0),yg=u.forwardRef((e,t)=>{let n=hn(()=>{var D,G;return{search:"",value:(G=(D=e.value)!=null?D:e.defaultValue)!=null?G:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),r=hn(()=>new Set),o=hn(()=>new Map),s=hn(()=>new Map),i=hn(()=>new Set),a=bg(e),{label:l,children:c,value:d,onValueChange:f,filter:h,shouldFilter:m,loop:y,disablePointerSelection:g=!1,vimBindings:v=!0,...b}=e,w=he(),x=he(),S=he(),C=u.useRef(null),T=mM();Vt(()=>{if(d!==void 0){let D=d.trim();n.current.value=D,A.emit()}},[d]),Vt(()=>{T(6,U)},[]);let A=u.useMemo(()=>({subscribe:D=>(i.current.add(D),()=>i.current.delete(D)),snapshot:()=>n.current,setState:(D,G,X)=>{var j,Q,z,Z;if(!Object.is(n.current[D],G)){if(n.current[D]=G,D==="search")V(),O(),T(1,L);else if(D==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let q=document.getElementById(S);q?q.focus():(j=document.getElementById(w))==null||j.focus()}if(T(7,()=>{var q;n.current.selectedItemId=(q=_())==null?void 0:q.id,A.emit()}),X||T(5,U),((Q=a.current)==null?void 0:Q.value)!==void 0){let q=G??"";(Z=(z=a.current).onValueChange)==null||Z.call(z,q);return}}A.emit()}},emit:()=>{i.current.forEach(D=>D())}}),[]),N=u.useMemo(()=>({value:(D,G,X)=>{var j;G!==((j=s.current.get(D))==null?void 0:j.value)&&(s.current.set(D,{value:G,keywords:X}),n.current.filtered.items.set(D,I(G,X)),T(2,()=>{O(),A.emit()}))},item:(D,G)=>(r.current.add(D),G&&(o.current.has(G)?o.current.get(G).add(D):o.current.set(G,new Set([D]))),T(3,()=>{V(),O(),n.current.value||L(),A.emit()}),()=>{s.current.delete(D),r.current.delete(D),n.current.filtered.items.delete(D);let X=_();T(4,()=>{V(),(X==null?void 0:X.getAttribute("id"))===D&&L(),A.emit()})}),group:D=>(o.current.has(D)||o.current.set(D,new Set),()=>{s.current.delete(D),o.current.delete(D)}),filter:()=>a.current.shouldFilter,label:l||e["aria-label"],getDisablePointerSelection:()=>a.current.disablePointerSelection,listId:w,inputId:S,labelId:x,listInnerRef:C}),[]);function I(D,G){var X,j;let Q=(j=(X=a.current)==null?void 0:X.filter)!=null?j:oM;return D?Q(D,n.current.search,G):0}function O(){if(!n.current.search||a.current.shouldFilter===!1)return;let D=n.current.filtered.items,G=[];n.current.filtered.groups.forEach(j=>{let Q=o.current.get(j),z=0;Q.forEach(Z=>{let q=D.get(Z);z=Math.max(q,z)}),G.push([j,z])});let X=C.current;K().sort((j,Q)=>{var z,Z;let q=j.getAttribute("id"),ee=Q.getAttribute("id");return((z=D.get(ee))!=null?z:0)-((Z=D.get(q))!=null?Z:0)}).forEach(j=>{let Q=j.closest(ra);Q?Q.appendChild(j.parentElement===Q?j:j.closest(`${ra} > *`)):X.appendChild(j.parentElement===X?j:j.closest(`${ra} > *`))}),G.sort((j,Q)=>Q[1]-j[1]).forEach(j=>{var Q;let z=(Q=C.current)==null?void 0:Q.querySelector(`${er}[${pn}="${encodeURIComponent(j[0])}"]`);z==null||z.parentElement.appendChild(z)})}function L(){let D=K().find(X=>X.getAttribute("aria-disabled")!=="true"),G=D==null?void 0:D.getAttribute(pn);A.setState("value",G||void 0)}function V(){var D,G,X,j;if(!n.current.search||a.current.shouldFilter===!1){n.current.filtered.count=r.current.size;return}n.current.filtered.groups=new Set;let Q=0;for(let z of r.current){let Z=(G=(D=s.current.get(z))==null?void 0:D.value)!=null?G:"",q=(j=(X=s.current.get(z))==null?void 0:X.keywords)!=null?j:[],ee=I(Z,q);n.current.filtered.items.set(z,ee),ee>0&&Q++}for(let[z,Z]of o.current)for(let q of Z)if(n.current.filtered.items.get(q)>0){n.current.filtered.groups.add(z);break}n.current.filtered.count=Q}function U(){var D,G,X;let j=_();j&&(((D=j.parentElement)==null?void 0:D.firstChild)===j&&((X=(G=j.closest(er))==null?void 0:G.querySelector(rM))==null||X.scrollIntoView({block:"nearest"})),j.scrollIntoView({block:"nearest"}))}function _(){var D;return(D=C.current)==null?void 0:D.querySelector(`${pg}[aria-selected="true"]`)}function K(){var D;return Array.from(((D=C.current)==null?void 0:D.querySelectorAll(hg))||[])}function H(D){let G=K()[D];G&&A.setState("value",G.getAttribute(pn))}function B(D){var G;let X=_(),j=K(),Q=j.findIndex(Z=>Z===X),z=j[Q+D];(G=a.current)!=null&&G.loop&&(z=Q+D<0?j[j.length-1]:Q+D===j.length?j[0]:j[Q+D]),z&&A.setState("value",z.getAttribute(pn))}function $(D){let G=_(),X=G==null?void 0:G.closest(er),j;for(;X&&!j;)X=D>0?pM(X,er):hM(X,er),j=X==null?void 0:X.querySelector(hg);j?A.setState("value",j.getAttribute(pn)):B(D)}let F=()=>H(K().length-1),ne=D=>{D.preventDefault(),D.metaKey?F():D.altKey?$(1):B(1)},re=D=>{D.preventDefault(),D.metaKey?H(0):D.altKey?$(-1):B(-1)};return u.createElement(W.div,{ref:t,tabIndex:-1,...b,"cmdk-root":"",onKeyDown:D=>{var G;(G=b.onKeyDown)==null||G.call(b,D);let X=D.nativeEvent.isComposing||D.keyCode===229;if(!(D.defaultPrevented||X))switch(D.key){case"n":case"j":{v&&D.ctrlKey&&ne(D);break}case"ArrowDown":{ne(D);break}case"p":case"k":{v&&D.ctrlKey&&re(D);break}case"ArrowUp":{re(D);break}case"Home":{D.preventDefault(),H(0);break}case"End":{D.preventDefault(),F();break}case"Enter":{D.preventDefault();let j=_();if(j){let Q=new Event(oa);j.dispatchEvent(Q)}}}}},u.createElement("label",{"cmdk-label":"",htmlFor:N.inputId,id:N.labelId,style:vM},l),ko(e,D=>u.createElement(gg.Provider,{value:A},u.createElement(mg.Provider,{value:N},D))))}),sM=u.forwardRef((e,t)=>{var n,r;let o=he(),s=u.useRef(null),i=u.useContext(vg),a=tr(),l=bg(e),c=(r=(n=l.current)==null?void 0:n.forceMount)!=null?r:i==null?void 0:i.forceMount;Vt(()=>{if(!c)return a.item(o,i==null?void 0:i.id)},[c]);let d=wg(o,s,[e.value,e.children,s],e.keywords),f=sa(),h=Ct(T=>T.value&&T.value===d.current),m=Ct(T=>c||a.filter()===!1?!0:T.search?T.filtered.items.get(o)>0:!0);u.useEffect(()=>{let T=s.current;if(!(!T||e.disabled))return T.addEventListener(oa,y),()=>T.removeEventListener(oa,y)},[m,e.onSelect,e.disabled]);function y(){var T,A;g(),(A=(T=l.current).onSelect)==null||A.call(T,d.current)}function g(){f.setState("value",d.current,!0)}if(!m)return null;let{disabled:v,value:b,onSelect:w,forceMount:x,keywords:S,...C}=e;return u.createElement(W.div,{ref:Ce(s,t),...C,id:o,"cmdk-item":"",role:"option","aria-disabled":!!v,"aria-selected":!!h,"data-disabled":!!v,"data-selected":!!h,onPointerMove:v||a.getDisablePointerSelection()?void 0:g,onClick:v?void 0:y},e.children)}),iM=u.forwardRef((e,t)=>{let{heading:n,children:r,forceMount:o,...s}=e,i=he(),a=u.useRef(null),l=u.useRef(null),c=he(),d=tr(),f=Ct(m=>o||d.filter()===!1?!0:m.search?m.filtered.groups.has(i):!0);Vt(()=>d.group(i),[]),wg(i,a,[e.value,e.heading,l]);let h=u.useMemo(()=>({id:i,forceMount:o}),[o]);return u.createElement(W.div,{ref:Ce(a,t),...s,"cmdk-group":"",role:"presentation",hidden:f?void 0:!0},n&&u.createElement("div",{ref:l,"cmdk-group-heading":"","aria-hidden":!0,id:c},n),ko(e,m=>u.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":n?c:void 0},u.createElement(vg.Provider,{value:h},m))))}),aM=u.forwardRef((e,t)=>{let{alwaysRender:n,...r}=e,o=u.useRef(null),s=Ct(i=>!i.search);return!n&&!s?null:u.createElement(W.div,{ref:Ce(o,t),...r,"cmdk-separator":"",role:"separator"})}),lM=u.forwardRef((e,t)=>{let{onValueChange:n,...r}=e,o=e.value!=null,s=sa(),i=Ct(c=>c.search),a=Ct(c=>c.selectedItemId),l=tr();return u.useEffect(()=>{e.value!=null&&s.setState("search",e.value)},[e.value]),u.createElement(W.input,{ref:t,...r,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":l.listId,"aria-labelledby":l.labelId,"aria-activedescendant":a,id:l.inputId,type:"text",value:o?e.value:i,onChange:c=>{o||s.setState("search",c.target.value),n==null||n(c.target.value)}})}),cM=u.forwardRef((e,t)=>{let{children:n,label:r="Suggestions",...o}=e,s=u.useRef(null),i=u.useRef(null),a=Ct(c=>c.selectedItemId),l=tr();return u.useEffect(()=>{if(i.current&&s.current){let c=i.current,d=s.current,f,h=new ResizeObserver(()=>{f=requestAnimationFrame(()=>{let m=c.offsetHeight;d.style.setProperty("--cmdk-list-height",m.toFixed(1)+"px")})});return h.observe(c),()=>{cancelAnimationFrame(f),h.unobserve(c)}}},[]),u.createElement(W.div,{ref:Ce(s,t),...o,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":a,"aria-label":r,id:l.listId},ko(e,c=>u.createElement("div",{ref:Ce(i,l.listInnerRef),"cmdk-list-sizer":""},c)))}),uM=u.forwardRef((e,t)=>{let{open:n,onOpenChange:r,overlayClassName:o,contentClassName:s,container:i,...a}=e;return u.createElement(fi,{open:n,onOpenChange:r},u.createElement(pi,{container:i},u.createElement(Wn,{"cmdk-overlay":"",className:o}),u.createElement(Hn,{"aria-label":e.label,"cmdk-dialog":"",className:s},u.createElement(yg,{ref:t,...a}))))}),dM=u.forwardRef((e,t)=>Ct(n=>n.filtered.count===0)?u.createElement(W.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),fM=u.forwardRef((e,t)=>{let{progress:n,children:r,label:o="Loading...",...s}=e;return u.createElement(W.div,{ref:t,...s,"cmdk-loading":"",role:"progressbar","aria-valuenow":n,"aria-valuemin":0,"aria-valuemax":100,"aria-label":o},ko(e,i=>u.createElement("div",{"aria-hidden":!0},i)))}),Te=Object.assign(yg,{List:cM,Item:sM,Input:lM,Group:iM,Separator:aM,Dialog:uM,Empty:dM,Loading:fM});function pM(e,t){let n=e.nextElementSibling;for(;n;){if(n.matches(t))return n;n=n.nextElementSibling}}function hM(e,t){let n=e.previousElementSibling;for(;n;){if(n.matches(t))return n;n=n.previousElementSibling}}function bg(e){let t=u.useRef(e);return Vt(()=>{t.current=e}),t}var Vt=typeof window>"u"?u.useEffect:u.useLayoutEffect;function hn(e){let t=u.useRef();return t.current===void 0&&(t.current=e()),t}function Ct(e){let t=sa(),n=()=>e(t.snapshot());return u.useSyncExternalStore(t.subscribe,n,n)}function wg(e,t,n,r=[]){let o=u.useRef(),s=tr();return Vt(()=>{var i;let a=(()=>{var c;for(let d of n){if(typeof d=="string")return d.trim();if(typeof d=="object"&&"current"in d)return d.current?(c=d.current.textContent)==null?void 0:c.trim():o.current}})(),l=r.map(c=>c.trim());s.value(e,a,l),(i=t.current)==null||i.setAttribute(pn,a),o.current=a}),o}var mM=()=>{let[e,t]=u.useState(),n=hn(()=>new Map);return Vt(()=>{n.current.forEach(r=>r()),n.current=new Map},[e]),(r,o)=>{n.current.set(r,o),t({})}};function gM(e){let t=e.type;return typeof t=="function"?t(e.props):"render"in t?t.render(e.props):e}function ko({asChild:e,children:t},n){return e&&u.isValidElement(t)?u.cloneElement(gM(t),{ref:t.ref},n(t.props.children)):n(t)}var vM={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"};const ia=u.forwardRef(({className:e,...t},n)=>p.jsx(Te,{ref:n,className:M("flex h-full w-full flex-col overflow-hidden rounded-md bg-popover text-popover-foreground",e),...t}));ia.displayName=Te.displayName;const yM=({children:e,...t})=>p.jsx(yf,{...t,children:p.jsx(mi,{className:"overflow-hidden p-0 shadow-lg",children:p.jsx(ia,{className:"[&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-group]]:px-2 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5",children:e})})}),xg=u.forwardRef(({className:e,...t},n)=>p.jsxs("div",{className:"flex items-center border-b px-3","cmdk-input-wrapper":"",children:[p.jsx(Bw,{className:"mr-2 h-4 w-4 shrink-0 opacity-50"}),p.jsx(Te.Input,{ref:n,className:M("flex h-11 w-full rounded-md bg-transparent py-3 text-sm outline-none placeholder:text-muted-foreground disabled:cursor-not-allowed disabled:opacity-50",e),...t})]}));xg.displayName=Te.Input.displayName;const Sg=u.forwardRef(({className:e,...t},n)=>p.jsx(Te.List,{ref:n,className:M("max-h-[300px] overflow-y-auto overflow-x-hidden",e),...t}));Sg.displayName=Te.List.displayName;const Cg=u.forwardRef((e,t)=>p.jsx(Te.Empty,{ref:t,className:"py-6 text-center text-sm",...e}));Cg.displayName=Te.Empty.displayName;const Eg=u.forwardRef(({className:e,...t},n)=>p.jsx(Te.Group,{ref:n,className:M("overflow-hidden p-1 text-foreground [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:py-1.5 [&_[cmdk-group-heading]]:text-xs [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group-heading]]:text-muted-foreground",e),...t}));Eg.displayName=Te.Group.displayName;const Pg=u.forwardRef(({className:e,...t},n)=>p.jsx(Te.Separator,{ref:n,className:M("-mx-1 h-px bg-border",e),...t}));Pg.displayName=Te.Separator.displayName;const Tg=u.forwardRef(({className:e,...t},n)=>p.jsx(Te.Item,{ref:n,className:M("relative flex cursor-default select-none items-center rounded-sm px-2 py-1.5 text-sm outline-none aria-selected:bg-accent aria-selected:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...t}));Tg.displayName=Te.Item.displayName;const Ag=({className:e,...t})=>p.jsx("span",{className:M("ml-auto text-xs tracking-widest text-muted-foreground",e),...t});Ag.displayName="CommandShortcut";const Ng=u.forwardRef(({className:e,...t},n)=>p.jsx("ol",{ref:n,className:M("relative border-l border-muted",e),...t}));Ng.displayName="Timeline";const Mg=u.forwardRef(({className:e,...t},n)=>p.jsx("li",{ref:n,className:M("mb-10 ml-4",e),...t}));Mg.displayName="TimelineItem";const Ig=u.forwardRef(({className:e,...t},n)=>p.jsx("div",{ref:n,className:M("absolute -left-1.5 mt-1.5 h-3 w-3 rounded-full border border-white bg-muted-foreground dark:border-gray-900 dark:bg-gray-700",e),...t}));Ig.displayName="TimelinePoint";const Dg=u.forwardRef(({className:e,...t},n)=>p.jsx("div",{ref:n,className:M("ml-4",e),...t}));Dg.displayName="TimelineContent";const _g=u.forwardRef(({className:e,...t},n)=>p.jsx("time",{ref:n,className:M("mb-1 text-sm font-normal leading-none text-muted-foreground",e),...t}));_g.displayName="TimelineTime";const kg=u.forwardRef(({className:e,...t},n)=>p.jsx("h3",{ref:n,className:M("text-lg font-semibold text-foreground",e),...t}));kg.displayName="TimelineTitle";const Og=u.forwardRef(({className:e,...t},n)=>p.jsx("p",{ref:n,className:M("mb-4 text-base font-normal text-muted-foreground",e),...t}));Og.displayName="TimelineDescription";function bM(e,t=[]){let n=[];function r(s,i){const a=u.createContext(i);a.displayName=s+"Context";const l=n.length;n=[...n,i];const c=f=>{var b;const{scope:h,children:m,...y}=f,g=((b=h==null?void 0:h[e])==null?void 0:b[l])||a,v=u.useMemo(()=>y,Object.values(y));return p.jsx(g.Provider,{value:v,children:m})};c.displayName=s+"Provider";function d(f,h){var g;const m=((g=h==null?void 0:h[e])==null?void 0:g[l])||a,y=u.useContext(m);if(y)return y;if(i!==void 0)return i;throw new Error(`\`${f}\` must be used within \`${s}\``)}return[c,d]}const o=()=>{const s=n.map(i=>u.createContext(i));return function(a){const l=(a==null?void 0:a[e])||s;return u.useMemo(()=>({[`__scope${e}`]:{...a,[e]:l}}),[a,l])}};return o.scopeName=e,[r,wM(o,...t)]}function wM(...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:l,scopeName:c})=>{const f=l(s)[`__scope${c}`];return{...a,...f}},{});return u.useMemo(()=>({[`__scope${t.scopeName}`]:i}),[i])}};return n.scopeName=t.scopeName,n}var xM=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],aa=xM.reduce((e,t)=>{const n=Mn(`Primitive.${t}`),r=u.forwardRef((o,s)=>{const{asChild:i,...a}=o,l=i?n:t;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),p.jsx(l,{...a,ref:s})});return r.displayName=`Primitive.${t}`,{...e,[t]:r}},{}),la={exports:{}},ca={};/**
140
111
  * @license React
141
112
  * use-sync-external-store-shim.production.js
142
113
  *
@@ -144,7 +115,7 @@ Defaulting to \`null\`.`}var lm=nm,OA=om;const cm=d.forwardRef(({className:e,val
144
115
  *
145
116
  * This source code is licensed under the MIT license found in the
146
117
  * LICENSE file in the root directory of this source tree.
147
- */var lv;function nM(){if(lv)return La;lv=1;var e=T;function t(f,h){return f===h&&(f!==0||1/f===1/h)||f!==f&&h!==h}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,o=e.useEffect,s=e.useLayoutEffect,i=e.useDebugValue;function a(f,h){var m=h(),y=r({inst:{value:m,getSnapshot:h}}),g=y[0].inst,v=y[1];return s(function(){g.value=m,g.getSnapshot=h,l(g)&&v({inst:g})},[f,m,h]),o(function(){return l(g)&&v({inst:g}),f(function(){l(g)&&v({inst:g})})},[f]),i(m),m}function l(f){var h=f.getSnapshot;f=f.value;try{var m=h();return!n(f,m)}catch{return!0}}function c(f,h){return h()}var u=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?c:a;return La.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:u,La}var Va={};/**
118
+ */var Lg;function SM(){if(Lg)return ca;Lg=1;var e=P;function t(f,h){return f===h&&(f!==0||1/f===1/h)||f!==f&&h!==h}var n=typeof Object.is=="function"?Object.is:t,r=e.useState,o=e.useEffect,s=e.useLayoutEffect,i=e.useDebugValue;function a(f,h){var m=h(),y=r({inst:{value:m,getSnapshot:h}}),g=y[0].inst,v=y[1];return s(function(){g.value=m,g.getSnapshot=h,l(g)&&v({inst:g})},[f,m,h]),o(function(){return l(g)&&v({inst:g}),f(function(){l(g)&&v({inst:g})})},[f]),i(m),m}function l(f){var h=f.getSnapshot;f=f.value;try{var m=h();return!n(f,m)}catch{return!0}}function c(f,h){return h()}var d=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?c:a;return ca.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:d,ca}var ua={};/**
148
119
  * @license React
149
120
  * use-sync-external-store-shim.development.js
150
121
  *
@@ -152,7 +123,7 @@ Defaulting to \`null\`.`}var lm=nm,OA=om;const cm=d.forwardRef(({className:e,val
152
123
  *
153
124
  * This source code is licensed under the MIT license found in the
154
125
  * LICENSE file in the root directory of this source tree.
155
- */var cv;function rM(){return cv||(cv=1,process.env.NODE_ENV!=="production"&&function(){function e(m,y){return m===y&&(m!==0||1/m===1/y)||m!==m&&y!==y}function t(m,y){u||o.startTransition===void 0||(u=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var g=y();if(!f){var v=y();s(g,v)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),f=!0)}v=i({inst:{value:g,getSnapshot:y}});var x=v[0].inst,b=v[1];return l(function(){x.value=g,x.getSnapshot=y,n(x)&&b({inst:x})},[m,g,y]),a(function(){return n(x)&&b({inst:x}),m(function(){n(x)&&b({inst:x})})},[m]),c(g),g}function n(m){var y=m.getSnapshot;m=m.value;try{var g=y();return!s(m,g)}catch{return!0}}function r(m,y){return y()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var o=T,s=typeof Object.is=="function"?Object.is:e,i=o.useState,a=o.useEffect,l=o.useLayoutEffect,c=o.useDebugValue,u=!1,f=!1,h=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?r:t;Va.useSyncExternalStore=o.useSyncExternalStore!==void 0?o.useSyncExternalStore:h,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),Va}process.env.NODE_ENV==="production"?Oa.exports=nM():Oa.exports=rM();var oM=Oa.exports;function sM(){return oM.useSyncExternalStore(iM,()=>!0,()=>!1)}function iM(){return()=>{}}var $a="Avatar",[aM]=QN($a),[lM,uv]=aM($a),dv=d.forwardRef((e,t)=>{const{__scopeAvatar:n,...r}=e,[o,s]=d.useState("idle");return p.jsx(lM,{scope:n,imageLoadingStatus:o,onImageLoadingStatusChange:s,children:p.jsx(ka.span,{...r,ref:t})})});dv.displayName=$a;var fv="AvatarImage",pv=d.forwardRef((e,t)=>{const{__scopeAvatar:n,src:r,onLoadingStatusChange:o=()=>{},...s}=e,i=uv(fv,n),a=cM(r,s),l=xe(c=>{o(c),i.onImageLoadingStatusChange(c)});return we(()=>{a!=="idle"&&l(a)},[a,l]),a==="loaded"?p.jsx(ka.img,{...s,ref:t,src:r}):null});pv.displayName=fv;var hv="AvatarFallback",mv=d.forwardRef((e,t)=>{const{__scopeAvatar:n,delayMs:r,...o}=e,s=uv(hv,n),[i,a]=d.useState(r===void 0);return d.useEffect(()=>{if(r!==void 0){const l=window.setTimeout(()=>a(!0),r);return()=>window.clearTimeout(l)}},[r]),i&&s.imageLoadingStatus!=="loaded"?p.jsx(ka.span,{...o,ref:t}):null});mv.displayName=hv;function gv(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}function cM(e,{referrerPolicy:t,crossOrigin:n}){const r=sM(),o=d.useRef(null),s=r?(o.current||(o.current=new window.Image),o.current):null,[i,a]=d.useState(()=>gv(s,e));return we(()=>{a(gv(s,e))},[s,e]),we(()=>{const l=f=>()=>{a(f)};if(!s)return;const c=l("loaded"),u=l("error");return s.addEventListener("load",c),s.addEventListener("error",u),t&&(s.referrerPolicy=t),typeof n=="string"&&(s.crossOrigin=n),()=>{s.removeEventListener("load",c),s.removeEventListener("error",u)}},[s,n,t]),i}var vv=dv,yv=pv,xv=mv;const bv=d.forwardRef(({className:e,...t},n)=>p.jsx(vv,{ref:n,className:M("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t}));bv.displayName=vv.displayName;const wv=d.forwardRef(({className:e,...t},n)=>p.jsx(yv,{ref:n,className:M("aspect-square h-full w-full",e),...t}));wv.displayName=yv.displayName;const Sv=d.forwardRef(({className:e,...t},n)=>p.jsx(xv,{ref:n,className:M("flex h-full w-full items-center justify-center rounded-full bg-muted",e),...t}));Sv.displayName=xv.displayName;const Cv=fn("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 uM({className:e,variant:t,...n}){return p.jsx("div",{className:M(Cv({variant:t}),e),...n})}const Fa=T.createContext({});function Lt(e){const t=T.useRef(null);return t.current===null&&(t.current=e()),t.current}const as=T.createContext(null),In=T.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});class dM extends d.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=this.props.sizeRef.current;r.height=n.offsetHeight||0,r.width=n.offsetWidth||0,r.top=n.offsetTop,r.left=n.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function fM({children:e,isPresent:t}){const n=T.useId(),r=T.useRef(null),o=T.useRef({width:0,height:0,top:0,left:0}),{nonce:s}=T.useContext(In);return T.useInsertionEffect(()=>{const{width:i,height:a,top:l,left:c}=o.current;if(t||!r.current||!i||!a)return;r.current.dataset.motionPopId=n;const u=document.createElement("style");return s&&(u.nonce=s),document.head.appendChild(u),u.sheet&&u.sheet.insertRule(`
126
+ */var Vg;function CM(){return Vg||(Vg=1,process.env.NODE_ENV!=="production"&&function(){function e(m,y){return m===y&&(m!==0||1/m===1/y)||m!==m&&y!==y}function t(m,y){d||o.startTransition===void 0||(d=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var g=y();if(!f){var v=y();s(g,v)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),f=!0)}v=i({inst:{value:g,getSnapshot:y}});var b=v[0].inst,w=v[1];return l(function(){b.value=g,b.getSnapshot=y,n(b)&&w({inst:b})},[m,g,y]),a(function(){return n(b)&&w({inst:b}),m(function(){n(b)&&w({inst:b})})},[m]),c(g),g}function n(m){var y=m.getSnapshot;m=m.value;try{var g=y();return!s(m,g)}catch{return!0}}function r(m,y){return y()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var o=P,s=typeof Object.is=="function"?Object.is:e,i=o.useState,a=o.useEffect,l=o.useLayoutEffect,c=o.useDebugValue,d=!1,f=!1,h=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?r:t;ua.useSyncExternalStore=o.useSyncExternalStore!==void 0?o.useSyncExternalStore:h,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),ua}process.env.NODE_ENV==="production"?la.exports=SM():la.exports=CM();var EM=la.exports;function PM(){return EM.useSyncExternalStore(TM,()=>!0,()=>!1)}function TM(){return()=>{}}var da="Avatar",[AM]=bM(da),[NM,$g]=AM(da),Fg=u.forwardRef((e,t)=>{const{__scopeAvatar:n,...r}=e,[o,s]=u.useState("idle");return p.jsx(NM,{scope:n,imageLoadingStatus:o,onImageLoadingStatusChange:s,children:p.jsx(aa.span,{...r,ref:t})})});Fg.displayName=da;var Rg="AvatarImage",Bg=u.forwardRef((e,t)=>{const{__scopeAvatar:n,src:r,onLoadingStatusChange:o=()=>{},...s}=e,i=$g(Rg,n),a=MM(r,s),l=de(c=>{o(c),i.onImageLoadingStatusChange(c)});return pe(()=>{a!=="idle"&&l(a)},[a,l]),a==="loaded"?p.jsx(aa.img,{...s,ref:t,src:r}):null});Bg.displayName=Rg;var zg="AvatarFallback",Wg=u.forwardRef((e,t)=>{const{__scopeAvatar:n,delayMs:r,...o}=e,s=$g(zg,n),[i,a]=u.useState(r===void 0);return u.useEffect(()=>{if(r!==void 0){const l=window.setTimeout(()=>a(!0),r);return()=>window.clearTimeout(l)}},[r]),i&&s.imageLoadingStatus!=="loaded"?p.jsx(aa.span,{...o,ref:t}):null});Wg.displayName=zg;function Hg(e,t){return e?t?(e.src!==t&&(e.src=t),e.complete&&e.naturalWidth>0?"loaded":"loading"):"error":"idle"}function MM(e,{referrerPolicy:t,crossOrigin:n}){const r=PM(),o=u.useRef(null),s=r?(o.current||(o.current=new window.Image),o.current):null,[i,a]=u.useState(()=>Hg(s,e));return pe(()=>{a(Hg(s,e))},[s,e]),pe(()=>{const l=f=>()=>{a(f)};if(!s)return;const c=l("loaded"),d=l("error");return s.addEventListener("load",c),s.addEventListener("error",d),t&&(s.referrerPolicy=t),typeof n=="string"&&(s.crossOrigin=n),()=>{s.removeEventListener("load",c),s.removeEventListener("error",d)}},[s,n,t]),i}var jg=Fg,Ug=Bg,Gg=Wg;const Kg=u.forwardRef(({className:e,...t},n)=>p.jsx(jg,{ref:n,className:M("relative flex h-10 w-10 shrink-0 overflow-hidden rounded-full",e),...t}));Kg.displayName=jg.displayName;const Yg=u.forwardRef(({className:e,...t},n)=>p.jsx(Ug,{ref:n,className:M("aspect-square h-full w-full",e),...t}));Yg.displayName=Ug.displayName;const Xg=u.forwardRef(({className:e,...t},n)=>p.jsx(Gg,{ref:n,className:M("flex h-full w-full items-center justify-center rounded-full bg-muted",e),...t}));Xg.displayName=Gg.displayName;const qg=Kt("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 IM({className:e,variant:t,...n}){return p.jsx("div",{className:M(qg({variant:t}),e),...n})}const fa=P.createContext({});function Et(e){const t=P.useRef(null);return t.current===null&&(t.current=e()),t.current}const Oo=P.createContext(null),mn=P.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});class DM extends u.Component{getSnapshotBeforeUpdate(t){const n=this.props.childRef.current;if(n&&t.isPresent&&!this.props.isPresent){const r=this.props.sizeRef.current;r.height=n.offsetHeight||0,r.width=n.offsetWidth||0,r.top=n.offsetTop,r.left=n.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function _M({children:e,isPresent:t}){const n=P.useId(),r=P.useRef(null),o=P.useRef({width:0,height:0,top:0,left:0}),{nonce:s}=P.useContext(mn);return P.useInsertionEffect(()=>{const{width:i,height:a,top:l,left:c}=o.current;if(t||!r.current||!i||!a)return;r.current.dataset.motionPopId=n;const d=document.createElement("style");return s&&(d.nonce=s),document.head.appendChild(d),d.sheet&&d.sheet.insertRule(`
156
127
  [data-motion-pop-id="${n}"] {
157
128
  position: absolute !important;
158
129
  width: ${i}px !important;
@@ -160,13 +131,13 @@ Defaulting to \`null\`.`}var lm=nm,OA=om;const cm=d.forwardRef(({className:e,val
160
131
  top: ${l}px !important;
161
132
  left: ${c}px !important;
162
133
  }
163
- `),()=>{document.head.removeChild(u)}},[t]),p.jsx(dM,{isPresent:t,childRef:r,sizeRef:o,children:d.cloneElement(e,{ref:r})})}const pM=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:o,presenceAffectsLayout:s,mode:i})=>{const a=Lt(hM),l=T.useId(),c=T.useCallback(f=>{a.set(f,!0);for(const h of a.values())if(!h)return;r&&r()},[a,r]),u=T.useMemo(()=>({id:l,initial:t,isPresent:n,custom:o,onExitComplete:c,register:f=>(a.set(f,!1),()=>a.delete(f))}),s?[Math.random(),c]:[n,c]);return T.useMemo(()=>{a.forEach((f,h)=>a.set(h,!1))},[n]),d.useEffect(()=>{!n&&!a.size&&r&&r()},[n]),i==="popLayout"&&(e=p.jsx(fM,{isPresent:n,children:e})),p.jsx(as.Provider,{value:u,children:e})};function hM(){return new Map}function Ev(e=!0){const t=T.useContext(as);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:o}=t,s=T.useId();T.useEffect(()=>{e&&o(s)},[e]);const i=T.useCallback(()=>e&&r&&r(s),[s,r,e]);return!n&&r?[!1,i]:[!0]}const ls=e=>e.key||"";function Tv(e){const t=[];return T.Children.forEach(e,n=>{T.isValidElement(n)&&t.push(n)}),t}const Ba=typeof window<"u",Nr=Ba?T.useLayoutEffect:T.useEffect,cs=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:o=!0,mode:s="sync",propagate:i=!1})=>{const[a,l]=Ev(i),c=T.useMemo(()=>Tv(e),[e]),u=i&&!a?[]:c.map(ls),f=T.useRef(!0),h=T.useRef(c),m=Lt(()=>new Map),[y,g]=T.useState(c),[v,x]=T.useState(c);Nr(()=>{f.current=!1,h.current=c;for(let S=0;S<v.length;S++){const C=ls(v[S]);u.includes(C)?m.delete(C):m.get(C)!==!0&&m.set(C,!1)}},[v,u.length,u.join("-")]);const b=[];if(c!==y){let S=[...c];for(let C=0;C<v.length;C++){const R=v[C],A=ls(R);u.includes(A)||(S.splice(C,0,R),b.push(R))}s==="wait"&&b.length&&(S=b),x(Tv(S)),g(c);return}process.env.NODE_ENV!=="production"&&s==="wait"&&v.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`);const{forceRender:w}=T.useContext(Fa);return p.jsx(p.Fragment,{children:v.map(S=>{const C=ls(S),R=i&&!a?!1:c===v||u.includes(C),A=()=>{if(m.has(C))m.set(C,!0);else return;let N=!0;m.forEach(_=>{_||(N=!1)}),N&&(w==null||w(),x(h.current),i&&(l==null||l()),r&&r())};return p.jsx(pM,{isPresent:R,initial:!f.current||n?void 0:!1,custom:R?void 0:t,presenceAffectsLayout:o,mode:s,onExitComplete:R?void 0:A,children:S},C)})})},$e=e=>e;let Jt=$e,pt=$e;process.env.NODE_ENV!=="production"&&(Jt=(e,t)=>{!e&&typeof console<"u"&&console.warn(t)},pt=(e,t)=>{if(!e)throw new Error(t)});function Wa(e){let t;return()=>(t===void 0&&(t=e()),t)}const Vt=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},ot=e=>e*1e3,ht=e=>e/1e3,mM={useManualTiming:!1};function gM(e){let t=new Set,n=new Set,r=!1,o=!1;const s=new WeakSet;let i={delta:0,timestamp:0,isProcessing:!1};function a(c){s.has(c)&&(l.schedule(c),e()),c(i)}const l={schedule:(c,u=!1,f=!1)=>{const m=f&&r?t:n;return u&&s.add(c),m.has(c)||m.add(c),c},cancel:c=>{n.delete(c),s.delete(c)},process:c=>{if(i=c,r){o=!0;return}r=!0,[t,n]=[n,t],t.forEach(a),t.clear(),r=!1,o&&(o=!1,l.process(c))}};return l}const us=["read","resolveKeyframes","update","preRender","render","postRender"],vM=40;function Pv(e,t){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},s=()=>n=!0,i=us.reduce((x,b)=>(x[b]=gM(s),x),{}),{read:a,resolveKeyframes:l,update:c,preRender:u,render:f,postRender:h}=i,m=()=>{const x=performance.now();n=!1,o.delta=r?1e3/60:Math.max(Math.min(x-o.timestamp,vM),1),o.timestamp=x,o.isProcessing=!0,a.process(o),l.process(o),c.process(o),u.process(o),f.process(o),h.process(o),o.isProcessing=!1,n&&t&&(r=!1,e(m))},y=()=>{n=!0,r=!0,o.isProcessing||e(m)};return{schedule:us.reduce((x,b)=>{const w=i[b];return x[b]=(S,C=!1,R=!1)=>(n||y(),w.schedule(S,C,R)),x},{}),cancel:x=>{for(let b=0;b<us.length;b++)i[us[b]].cancel(x)},state:o,steps:i}}const{schedule:pe,cancel:Ye,state:Ne,steps:za}=Pv(typeof requestAnimationFrame<"u"?requestAnimationFrame:$e,!0),Rv=T.createContext({strict:!1}),Av={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},Dn={};for(const e in Av)Dn[e]={isEnabled:t=>Av[e].some(n=>!!t[n])};function yM(e){for(const t in e)Dn[t]={...Dn[t],...e[t]}}const xM=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function ds(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||xM.has(e)}let Nv=e=>!ds(e);function bM(e){e&&(Nv=t=>t.startsWith("on")?!ds(t):e(t))}try{bM(require("@emotion/is-prop-valid").default)}catch{}function wM(e,t,n){const r={};for(const o in e)o==="values"&&typeof e.values=="object"||(Nv(o)||n===!0&&ds(o)||!t&&!ds(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}const Mv=new Set;function Mr(e,t,n){e||Mv.has(t)||(console.warn(t),Mv.add(t))}function SM(e){if(typeof Proxy>"u")return e;const t=new Map,n=(...r)=>(process.env.NODE_ENV!=="production"&&Mr(!1,"motion() is deprecated. Use motion.create() instead."),e(...r));return new Proxy(n,{get:(r,o)=>o==="create"?e:(t.has(o)||t.set(o,e(o)),t.get(o))})}const fs=T.createContext({});function _r(e){return typeof e=="string"||Array.isArray(e)}function ps(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}const Ha=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Ua=["initial",...Ha];function hs(e){return ps(e.animate)||Ua.some(t=>_r(e[t]))}function _v(e){return!!(hs(e)||e.variants)}function CM(e,t){if(hs(e)){const{initial:n,animate:r}=e;return{initial:n===!1||_r(n)?n:void 0,animate:_r(r)?r:void 0}}return e.inherit!==!1?t:{}}function EM(e){const{initial:t,animate:n}=CM(e,T.useContext(fs));return T.useMemo(()=>({initial:t,animate:n}),[jv(t),jv(n)])}function jv(e){return Array.isArray(e)?e.join(" "):e}const TM=Symbol.for("motionComponentSymbol");function kn(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function PM(e,t,n){return T.useCallback(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):kn(n)&&(n.current=r))},[t])}const Ga=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Iv="data-"+Ga("framerAppearId"),{schedule:Ka}=Pv(queueMicrotask,!1),Dv=T.createContext({});function RM(e,t,n,r,o){var s,i;const{visualElement:a}=T.useContext(fs),l=T.useContext(Rv),c=T.useContext(as),u=T.useContext(In).reducedMotion,f=T.useRef(null);r=r||l.renderer,!f.current&&r&&(f.current=r(e,{visualState:t,parent:a,props:n,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:u}));const h=f.current,m=T.useContext(Dv);h&&!h.projection&&o&&(h.type==="html"||h.type==="svg")&&AM(f.current,n,o,m);const y=T.useRef(!1);T.useInsertionEffect(()=>{h&&y.current&&h.update(n,c)});const g=n[Iv],v=T.useRef(!!g&&!(!((s=window.MotionHandoffIsComplete)===null||s===void 0)&&s.call(window,g))&&((i=window.MotionHasOptimisedAnimation)===null||i===void 0?void 0:i.call(window,g)));return Nr(()=>{h&&(y.current=!0,window.MotionIsMounted=!0,h.updateFeatures(),Ka.render(h.render),v.current&&h.animationState&&h.animationState.animateChanges())}),T.useEffect(()=>{h&&(!v.current&&h.animationState&&h.animationState.animateChanges(),v.current&&(queueMicrotask(()=>{var x;(x=window.MotionHandoffMarkAsComplete)===null||x===void 0||x.call(window,g)}),v.current=!1))}),h}function AM(e,t,n,r){const{layoutId:o,layout:s,drag:i,dragConstraints:a,layoutScroll:l,layoutRoot:c}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:kv(e.parent)),e.projection.setOptions({layoutId:o,layout:s,alwaysMeasureLayout:!!i||a&&kn(a),visualElement:e,animationType:typeof s=="string"?s:"both",initialPromotionConfig:r,layoutScroll:l,layoutRoot:c})}function kv(e){if(e)return e.options.allowProjection!==!1?e.projection:kv(e.parent)}function NM({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:o}){var s,i;e&&yM(e);function a(c,u){let f;const h={...T.useContext(In),...c,layoutId:MM(c)},{isStatic:m}=h,y=EM(c),g=r(c,m);if(!m&&Ba){_M(h,e);const v=jM(h);f=v.MeasureLayout,y.visualElement=RM(o,g,h,t,v.ProjectionNode)}return p.jsxs(fs.Provider,{value:y,children:[f&&y.visualElement?p.jsx(f,{visualElement:y.visualElement,...h}):null,n(o,c,PM(g,y.visualElement,u),g,m,y.visualElement)]})}a.displayName=`motion.${typeof o=="string"?o:`create(${(i=(s=o.displayName)!==null&&s!==void 0?s:o.name)!==null&&i!==void 0?i:""})`}`;const l=T.forwardRef(a);return l[TM]=o,l}function MM({layoutId:e}){const t=T.useContext(Fa).id;return t&&e!==void 0?t+"-"+e:e}function _M(e,t){const n=T.useContext(Rv).strict;if(process.env.NODE_ENV!=="production"&&t&&n){const r="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";e.ignoreStrict?Jt(!1,r):pt(!1,r)}}function jM(e){const{drag:t,layout:n}=Dn;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t!=null&&t.isEnabled(e)||n!=null&&n.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}const IM=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function Ya(e){return typeof e!="string"||e.includes("-")?!1:!!(IM.indexOf(e)>-1||/[A-Z]/u.test(e))}function Ov(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function Xa(e,t,n,r){if(typeof t=="function"){const[o,s]=Ov(r);t=t(n!==void 0?n:e.custom,o,s)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[o,s]=Ov(r);t=t(n!==void 0?n:e.custom,o,s)}return t}const qa=e=>Array.isArray(e),DM=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),kM=e=>qa(e)?e[e.length-1]||0:e,Ce=e=>!!(e&&e.getVelocity);function ms(e){const t=Ce(e)?e.get():e;return DM(t)?t.toValue():t}function OM({scrapeMotionValuesFromProps:e,createRenderState:t,onUpdate:n},r,o,s){const i={latestValues:LM(r,o,s,e),renderState:t()};return n&&(i.onMount=a=>n({props:r,current:a,...i}),i.onUpdate=a=>n(a)),i}const Lv=e=>(t,n)=>{const r=T.useContext(fs),o=T.useContext(as),s=()=>OM(e,t,r,o);return n?s():Lt(s)};function LM(e,t,n,r){const o={},s=r(e,{});for(const h in s)o[h]=ms(s[h]);let{initial:i,animate:a}=e;const l=hs(e),c=_v(e);t&&c&&!l&&e.inherit!==!1&&(i===void 0&&(i=t.initial),a===void 0&&(a=t.animate));let u=n?n.initial===!1:!1;u=u||i===!1;const f=u?a:i;if(f&&typeof f!="boolean"&&!ps(f)){const h=Array.isArray(f)?f:[f];for(let m=0;m<h.length;m++){const y=Xa(e,h[m]);if(y){const{transitionEnd:g,transition:v,...x}=y;for(const b in x){let w=x[b];if(Array.isArray(w)){const S=u?w.length-1:0;w=w[S]}w!==null&&(o[b]=w)}for(const b in g)o[b]=g[b]}}}return o}const On=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Qt=new Set(On),Vv=e=>t=>typeof t=="string"&&t.startsWith(e),$v=Vv("--"),VM=Vv("var(--"),Za=e=>VM(e)?$M.test(e.split("/*")[0].trim()):!1,$M=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Fv=(e,t)=>t&&typeof e=="number"?t.transform(e):e,mt=(e,t,n)=>n>t?t:n<e?e:n,Ln={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},jr={...Ln,transform:e=>mt(0,1,e)},gs={...Ln,default:1},Ir=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),$t=Ir("deg"),gt=Ir("%"),se=Ir("px"),FM=Ir("vh"),BM=Ir("vw"),Bv={...gt,parse:e=>gt.parse(e)/100,transform:e=>gt.transform(e*100)},WM={borderWidth:se,borderTopWidth:se,borderRightWidth:se,borderBottomWidth:se,borderLeftWidth:se,borderRadius:se,radius:se,borderTopLeftRadius:se,borderTopRightRadius:se,borderBottomRightRadius:se,borderBottomLeftRadius:se,width:se,maxWidth:se,height:se,maxHeight:se,top:se,right:se,bottom:se,left:se,padding:se,paddingTop:se,paddingRight:se,paddingBottom:se,paddingLeft:se,margin:se,marginTop:se,marginRight:se,marginBottom:se,marginLeft:se,backgroundPositionX:se,backgroundPositionY:se},zM={rotate:$t,rotateX:$t,rotateY:$t,rotateZ:$t,scale:gs,scaleX:gs,scaleY:gs,scaleZ:gs,skew:$t,skewX:$t,skewY:$t,distance:se,translateX:se,translateY:se,translateZ:se,x:se,y:se,z:se,perspective:se,transformPerspective:se,opacity:jr,originX:Bv,originY:Bv,originZ:se},Wv={...Ln,transform:Math.round},Ja={...WM,...zM,zIndex:Wv,size:se,fillOpacity:jr,strokeOpacity:jr,numOctaves:Wv},HM={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},UM=On.length;function GM(e,t,n){let r="",o=!0;for(let s=0;s<UM;s++){const i=On[s],a=e[i];if(a===void 0)continue;let l=!0;if(typeof a=="number"?l=a===(i.startsWith("scale")?1:0):l=parseFloat(a)===0,!l||n){const c=Fv(a,Ja[i]);if(!l){o=!1;const u=HM[i]||i;r+=`${u}(${c}) `}n&&(t[i]=c)}}return r=r.trim(),n?r=n(t,o?"":r):o&&(r="none"),r}function Qa(e,t,n){const{style:r,vars:o,transformOrigin:s}=e;let i=!1,a=!1;for(const l in t){const c=t[l];if(Qt.has(l)){i=!0;continue}else if($v(l)){o[l]=c;continue}else{const u=Fv(c,Ja[l]);l.startsWith("origin")?(a=!0,s[l]=u):r[l]=u}}if(t.transform||(i||n?r.transform=GM(t,e.transform,n):r.transform&&(r.transform="none")),a){const{originX:l="50%",originY:c="50%",originZ:u=0}=s;r.transformOrigin=`${l} ${c} ${u}`}}const KM={offset:"stroke-dashoffset",array:"stroke-dasharray"},YM={offset:"strokeDashoffset",array:"strokeDasharray"};function XM(e,t,n=1,r=0,o=!0){e.pathLength=1;const s=o?KM:YM;e[s.offset]=se.transform(-r);const i=se.transform(t),a=se.transform(n);e[s.array]=`${i} ${a}`}function zv(e,t,n){return typeof e=="string"?e:se.transform(t+n*e)}function qM(e,t,n){const r=zv(t,e.x,e.width),o=zv(n,e.y,e.height);return`${r} ${o}`}function el(e,{attrX:t,attrY:n,attrScale:r,originX:o,originY:s,pathLength:i,pathSpacing:a=1,pathOffset:l=0,...c},u,f){if(Qa(e,c,f),u){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:h,style:m,dimensions:y}=e;h.transform&&(y&&(m.transform=h.transform),delete h.transform),y&&(o!==void 0||s!==void 0||m.transform)&&(m.transformOrigin=qM(y,o!==void 0?o:.5,s!==void 0?s:.5)),t!==void 0&&(h.x=t),n!==void 0&&(h.y=n),r!==void 0&&(h.scale=r),i!==void 0&&XM(h,i,a,l,!1)}const tl=()=>({style:{},transform:{},transformOrigin:{},vars:{}}),Hv=()=>({...tl(),attrs:{}}),nl=e=>typeof e=="string"&&e.toLowerCase()==="svg";function Uv(e,{style:t,vars:n},r,o){Object.assign(e.style,t,o&&o.getProjectionStyles(r));for(const s in n)e.style.setProperty(s,n[s])}const Gv=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function Kv(e,t,n,r){Uv(e,t,void 0,r);for(const o in t.attrs)e.setAttribute(Gv.has(o)?o:Ga(o),t.attrs[o])}const vs={};function ZM(e){Object.assign(vs,e)}function Yv(e,{layout:t,layoutId:n}){return Qt.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!vs[e]||e==="opacity")}function rl(e,t,n){var r;const{style:o}=e,s={};for(const i in o)(Ce(o[i])||t.style&&Ce(t.style[i])||Yv(i,e)||((r=n==null?void 0:n.getValue(i))===null||r===void 0?void 0:r.liveStyle)!==void 0)&&(s[i]=o[i]);return s}function Xv(e,t,n){const r=rl(e,t,n);for(const o in e)if(Ce(e[o])||Ce(t[o])){const s=On.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;r[s]=e[o]}return r}function JM(e,t){try{t.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{t.dimensions={x:0,y:0,width:0,height:0}}}const qv=["x","y","width","height","cx","cy","r"],QM={useVisualState:Lv({scrapeMotionValuesFromProps:Xv,createRenderState:Hv,onUpdate:({props:e,prevProps:t,current:n,renderState:r,latestValues:o})=>{if(!n)return;let s=!!e.drag;if(!s){for(const a in o)if(Qt.has(a)){s=!0;break}}if(!s)return;let i=!t;if(t)for(let a=0;a<qv.length;a++){const l=qv[a];e[l]!==t[l]&&(i=!0)}i&&pe.read(()=>{JM(n,r),pe.render(()=>{el(r,o,nl(n.tagName),e.transformTemplate),Kv(n,r)})})}})},e1={useVisualState:Lv({scrapeMotionValuesFromProps:rl,createRenderState:tl})};function Zv(e,t,n){for(const r in t)!Ce(t[r])&&!Yv(r,n)&&(e[r]=t[r])}function t1({transformTemplate:e},t){return T.useMemo(()=>{const n=tl();return Qa(n,t,e),Object.assign({},n.vars,n.style)},[t])}function n1(e,t){const n=e.style||{},r={};return Zv(r,n,e),Object.assign(r,t1(e,t)),r}function r1(e,t){const n={},r=n1(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}function o1(e,t,n,r){const o=T.useMemo(()=>{const s=Hv();return el(s,t,nl(r),e.transformTemplate),{...s.attrs,style:{...s.style}}},[t]);if(e.style){const s={};Zv(s,e.style,e),o.style={...s,...o.style}}return o}function s1(e=!1){return(n,r,o,{latestValues:s},i)=>{const l=(Ya(n)?o1:r1)(r,s,i,n),c=wM(r,typeof n=="string",e),u=n!==T.Fragment?{...c,...l,ref:o}:{},{children:f}=r,h=T.useMemo(()=>Ce(f)?f.get():f,[f]);return T.createElement(n,{...u,children:h})}}function i1(e,t){return function(r,{forwardMotionProps:o}={forwardMotionProps:!1}){const i={...Ya(r)?QM:e1,preloadedFeatures:e,useRender:s1(o),createVisualElement:t,Component:r};return NM(i)}}function Jv(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}function ys(e,t,n){const r=e.getProps();return Xa(r,t,n!==void 0?n:r.custom,e)}const Qv=Wa(()=>window.ScrollTimeline!==void 0);class a1{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>"finished"in t?t.finished:t))}getAll(t){return this.animations[0][t]}setAll(t,n){for(let r=0;r<this.animations.length;r++)this.animations[r][t]=n}attachTimeline(t,n){const r=this.animations.map(o=>{if(Qv()&&o.attachTimeline)return o.attachTimeline(t);if(typeof n=="function")return n(o)});return()=>{r.forEach((o,s)=>{o&&o(),this.animations[s].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let n=0;n<this.animations.length;n++)t=Math.max(t,this.animations[n].duration);return t}runAll(t){this.animations.forEach(n=>n[t]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class ey extends a1{then(t,n){return Promise.all(this.animations).then(t).catch(n)}}function ol(e,t){return e?e[t]||e.default||e:void 0}const xs=2e4;function sl(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<xs;)t+=n,r=e.next(t);return t>=xs?1/0:t}function l1(e,t=100,n){const r=n({...e,keyframes:[0,t]}),o=Math.min(sl(r),xs);return{type:"keyframes",ease:s=>r.next(o*s).value/t,duration:ht(o)}}function bs(e){return typeof e=="function"}function ty(e,t){e.timeline=t,e.onfinish=null}const il=e=>Array.isArray(e)&&typeof e[0]=="number",c1={linearEasing:void 0};function u1(e,t){const n=Wa(e);return()=>{var r;return(r=c1[t])!==null&&r!==void 0?r:n()}}const ws=u1(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),ny=(e,t,n=10)=>{let r="";const o=Math.max(Math.round(t/n),2);for(let s=0;s<o;s++)r+=e(Vt(0,o-1,s))+", ";return`linear(${r.substring(0,r.length-2)})`};function ry(e){return!!(typeof e=="function"&&ws()||!e||typeof e=="string"&&(e in al||ws())||il(e)||Array.isArray(e)&&e.every(ry))}const Dr=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,al={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Dr([0,.65,.55,1]),circOut:Dr([.55,0,1,.45]),backIn:Dr([.31,.01,.66,-.59]),backOut:Dr([.33,1.53,.69,.99])};function oy(e,t){if(e)return typeof e=="function"&&ws()?ny(e,t):il(e)?Dr(e):Array.isArray(e)?e.map(n=>oy(n,t)||al.easeOut):al[e]}const st={x:!1,y:!1};function sy(){return st.x||st.y}function Ss(e,t,n){var r;if(e instanceof Element)return[e];if(typeof e=="string"){let o=document;t&&(o=t.current);const s=(r=n==null?void 0:n[e])!==null&&r!==void 0?r:o.querySelectorAll(e);return s?Array.from(s):[]}return Array.from(e)}function iy(e,t){const n=Ss(e),r=new AbortController,o={passive:!0,...t,signal:r.signal};return[n,o,()=>r.abort()]}function ay(e){return t=>{t.pointerType==="touch"||sy()||e(t)}}function d1(e,t,n={}){const[r,o,s]=iy(e,n),i=ay(a=>{const{target:l}=a,c=t(a);if(typeof c!="function"||!l)return;const u=ay(f=>{c(f),l.removeEventListener("pointerleave",u)});l.addEventListener("pointerleave",u,o)});return r.forEach(a=>{a.addEventListener("pointerenter",i,o)}),s}const ly=(e,t)=>t?e===t?!0:ly(e,t.parentElement):!1,ll=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,f1=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function p1(e){return f1.has(e.tagName)||e.tabIndex!==-1}const kr=new WeakSet;function cy(e){return t=>{t.key==="Enter"&&e(t)}}function cl(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const h1=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=cy(()=>{if(kr.has(n))return;cl(n,"down");const o=cy(()=>{cl(n,"up")}),s=()=>cl(n,"cancel");n.addEventListener("keyup",o,t),n.addEventListener("blur",s,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function uy(e){return ll(e)&&!sy()}function m1(e,t,n={}){const[r,o,s]=iy(e,n),i=a=>{const l=a.currentTarget;if(!uy(a)||kr.has(l))return;kr.add(l);const c=t(a),u=(m,y)=>{window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",h),!(!uy(m)||!kr.has(l))&&(kr.delete(l),typeof c=="function"&&c(m,{success:y}))},f=m=>{u(m,n.useGlobalTarget||ly(l,m.target))},h=m=>{u(m,!1)};window.addEventListener("pointerup",f,o),window.addEventListener("pointercancel",h,o)};return r.forEach(a=>{!p1(a)&&a.getAttribute("tabindex")===null&&(a.tabIndex=0),(n.useGlobalTarget?window:a).addEventListener("pointerdown",i,o),a.addEventListener("focus",c=>h1(c,o),o)}),s}function g1(e){return e==="x"||e==="y"?st[e]?null:(st[e]=!0,()=>{st[e]=!1}):st.x||st.y?null:(st.x=st.y=!0,()=>{st.x=st.y=!1})}const dy=new Set(["width","height","top","left","right","bottom",...On]);let Cs;function v1(){Cs=void 0}const vt={now:()=>(Cs===void 0&&vt.set(Ne.isProcessing||mM.useManualTiming?Ne.timestamp:performance.now()),Cs),set:e=>{Cs=e,queueMicrotask(v1)}};function ul(e,t){e.indexOf(t)===-1&&e.push(t)}function Es(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class dl{constructor(){this.subscriptions=[]}add(t){return ul(this.subscriptions,t),()=>Es(this.subscriptions,t)}notify(t,n,r){const o=this.subscriptions.length;if(o)if(o===1)this.subscriptions[0](t,n,r);else for(let s=0;s<o;s++){const i=this.subscriptions[s];i&&i(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}function fl(e,t){return t?e*(1e3/t):0}const fy=30,y1=e=>!isNaN(parseFloat(e)),Or={current:void 0};class x1{constructor(t,n={}){this.version="11.18.2",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,o=!0)=>{const s=vt.now();this.updatedAt!==s&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),o&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=vt.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=y1(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&Mr(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new dl);const r=this.events[t].add(n);return t==="change"?()=>{r(),pe.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return Or.current&&Or.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const t=vt.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>fy)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,fy);return fl(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function yt(e,t){return new x1(e,t)}function b1(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,yt(n))}function w1(e,t){const n=ys(e,t);let{transitionEnd:r={},transition:o={},...s}=n||{};s={...s,...r};for(const i in s){const a=kM(s[i]);b1(e,i,a)}}function S1(e){return!!(Ce(e)&&e.add)}function pl(e,t){const n=e.getValue("willChange");if(S1(n))return n.add(t)}function py(e){return e.props[Iv]}const hy=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,C1=1e-7,E1=12;function T1(e,t,n,r,o){let s,i,a=0;do i=t+(n-t)/2,s=hy(i,r,o)-e,s>0?n=i:t=i;while(Math.abs(s)>C1&&++a<E1);return i}function Lr(e,t,n,r){if(e===t&&n===r)return $e;const o=s=>T1(s,0,1,e,n);return s=>s===0||s===1?s:hy(o(s),t,r)}const my=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,gy=e=>t=>1-e(1-t),vy=Lr(.33,1.53,.69,.99),hl=gy(vy),yy=my(hl),xy=e=>(e*=2)<1?.5*hl(e):.5*(2-Math.pow(2,-10*(e-1))),ml=e=>1-Math.sin(Math.acos(e)),by=gy(ml),wy=my(ml),Sy=e=>/^0[^.\s]+$/u.test(e);function P1(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||Sy(e):!0}const Vr=e=>Math.round(e*1e5)/1e5,gl=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function R1(e){return e==null}const A1=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,vl=(e,t)=>n=>!!(typeof n=="string"&&A1.test(n)&&n.startsWith(e)||t&&!R1(n)&&Object.prototype.hasOwnProperty.call(n,t)),Cy=(e,t,n)=>r=>{if(typeof r!="string")return r;const[o,s,i,a]=r.match(gl);return{[e]:parseFloat(o),[t]:parseFloat(s),[n]:parseFloat(i),alpha:a!==void 0?parseFloat(a):1}},N1=e=>mt(0,255,e),yl={...Ln,transform:e=>Math.round(N1(e))},en={test:vl("rgb","red"),parse:Cy("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+yl.transform(e)+", "+yl.transform(t)+", "+yl.transform(n)+", "+Vr(jr.transform(r))+")"};function M1(e){let t="",n="",r="",o="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),o=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),o=e.substring(4,5),t+=t,n+=n,r+=r,o+=o),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:o?parseInt(o,16)/255:1}}const xl={test:vl("#"),parse:M1,transform:en.transform},Vn={test:vl("hsl","hue"),parse:Cy("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+gt.transform(Vr(t))+", "+gt.transform(Vr(n))+", "+Vr(jr.transform(r))+")"},ke={test:e=>en.test(e)||xl.test(e)||Vn.test(e),parse:e=>en.test(e)?en.parse(e):Vn.test(e)?Vn.parse(e):xl.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?en.transform(e):Vn.transform(e)},_1=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function j1(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(gl))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(_1))===null||n===void 0?void 0:n.length)||0)>0}const Ey="number",Ty="color",I1="var",D1="var(",Py="${}",k1=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function $r(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},o=[];let s=0;const a=t.replace(k1,l=>(ke.test(l)?(r.color.push(s),o.push(Ty),n.push(ke.parse(l))):l.startsWith(D1)?(r.var.push(s),o.push(I1),n.push(l)):(r.number.push(s),o.push(Ey),n.push(parseFloat(l))),++s,Py)).split(Py);return{values:n,split:a,indexes:r,types:o}}function Ry(e){return $r(e).values}function Ay(e){const{split:t,types:n}=$r(e),r=t.length;return o=>{let s="";for(let i=0;i<r;i++)if(s+=t[i],o[i]!==void 0){const a=n[i];a===Ey?s+=Vr(o[i]):a===Ty?s+=ke.transform(o[i]):s+=o[i]}return s}}const O1=e=>typeof e=="number"?0:e;function L1(e){const t=Ry(e);return Ay(e)(t.map(O1))}const Ft={test:j1,parse:Ry,createTransformer:Ay,getAnimatableNone:L1},V1=new Set(["brightness","contrast","saturate","opacity"]);function $1(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(gl)||[];if(!r)return e;const o=n.replace(r,"");let s=V1.has(t)?1:0;return r!==n&&(s*=100),t+"("+s+o+")"}const F1=/\b([a-z-]*)\(.*?\)/gu,bl={...Ft,getAnimatableNone:e=>{const t=e.match(F1);return t?t.map($1).join(" "):e}},B1={...Ja,color:ke,backgroundColor:ke,outlineColor:ke,fill:ke,stroke:ke,borderColor:ke,borderTopColor:ke,borderRightColor:ke,borderBottomColor:ke,borderLeftColor:ke,filter:bl,WebkitFilter:bl},wl=e=>B1[e];function Ny(e,t){let n=wl(e);return n!==bl&&(n=Ft),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const W1=new Set(["auto","none","0"]);function z1(e,t,n){let r=0,o;for(;r<e.length&&!o;){const s=e[r];typeof s=="string"&&!W1.has(s)&&$r(s).values.length&&(o=e[r]),r++}if(o&&n)for(const s of t)e[s]=Ny(n,o)}const My=e=>e===Ln||e===se,_y=(e,t)=>parseFloat(e.split(", ")[t]),jy=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const o=r.match(/^matrix3d\((.+)\)$/u);if(o)return _y(o[1],t);{const s=r.match(/^matrix\((.+)\)$/u);return s?_y(s[1],e):0}},H1=new Set(["x","y","z"]),U1=On.filter(e=>!H1.has(e));function G1(e){const t=[];return U1.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const $n={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:jy(4,13),y:jy(5,14)};$n.translateX=$n.x,$n.translateY=$n.y;const tn=new Set;let Sl=!1,Cl=!1;function Iy(){if(Cl){const e=Array.from(tn).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const o=G1(r);o.length&&(n.set(r,o),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const o=n.get(r);o&&o.forEach(([s,i])=>{var a;(a=r.getValue(s))===null||a===void 0||a.set(i)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}Cl=!1,Sl=!1,tn.forEach(e=>e.complete()),tn.clear()}function Dy(){tn.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Cl=!0)})}function K1(){Dy(),Iy()}class El{constructor(t,n,r,o,s,i=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=o,this.element=s,this.isAsync=i}scheduleResolve(){this.isScheduled=!0,this.isAsync?(tn.add(this),Sl||(Sl=!0,pe.read(Dy),pe.resolveKeyframes(Iy))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:o}=this;for(let s=0;s<t.length;s++)if(t[s]===null)if(s===0){const i=o==null?void 0:o.get(),a=t[t.length-1];if(i!==void 0)t[0]=i;else if(r&&n){const l=r.readValue(n,a);l!=null&&(t[0]=l)}t[0]===void 0&&(t[0]=a),o&&i===void 0&&o.set(t[0])}else t[s]=t[s-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),tn.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,tn.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const ky=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),Y1=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function X1(e){const t=Y1.exec(e);if(!t)return[,];const[,n,r,o]=t;return[`--${n??r}`,o]}const q1=4;function Oy(e,t,n=1){pt(n<=q1,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);const[r,o]=X1(e);if(!r)return;const s=window.getComputedStyle(t).getPropertyValue(r);if(s){const i=s.trim();return ky(i)?parseFloat(i):i}return Za(o)?Oy(o,t,n+1):o}const Ly=e=>t=>t.test(e),Vy=[Ln,se,gt,$t,BM,FM,{test:e=>e==="auto",parse:e=>e}],$y=e=>Vy.find(Ly(e));class Fy extends El{constructor(t,n,r,o,s){super(t,n,r,o,s,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let l=0;l<t.length;l++){let c=t[l];if(typeof c=="string"&&(c=c.trim(),Za(c))){const u=Oy(c,n.current);u!==void 0&&(t[l]=u),l===t.length-1&&(this.finalKeyframe=c)}}if(this.resolveNoneKeyframes(),!dy.has(r)||t.length!==2)return;const[o,s]=t,i=$y(o),a=$y(s);if(i!==a)if(My(i)&&My(a))for(let l=0;l<t.length;l++){const c=t[l];typeof c=="string"&&(t[l]=parseFloat(c))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let o=0;o<t.length;o++)P1(t[o])&&r.push(o);r.length&&z1(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=$n[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const o=n[n.length-1];o!==void 0&&t.getValue(r,o).jump(o,!1)}measureEndState(){var t;const{element:n,name:r,unresolvedKeyframes:o}=this;if(!n||!n.current)return;const s=n.getValue(r);s&&s.jump(this.measuredOrigin,!1);const i=o.length-1,a=o[i];o[i]=$n[r](n.measureViewportBox(),window.getComputedStyle(n.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),!((t=this.removedTransforms)===null||t===void 0)&&t.length&&this.removedTransforms.forEach(([l,c])=>{n.getValue(l).set(c)}),this.resolveNoneKeyframes()}}const By=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Ft.test(e)||e==="0")&&!e.startsWith("url("));function Z1(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function J1(e,t,n,r){const o=e[0];if(o===null)return!1;if(t==="display"||t==="visibility")return!0;const s=e[e.length-1],i=By(o,t),a=By(s,t);return Jt(i===a,`You are trying to animate ${t} from "${o}" to "${s}". ${o} is not an animatable value - to enable this animation set ${o} to a value animatable to ${s} via the \`style\` property.`),!i||!a?!1:Z1(e)||(n==="spring"||bs(n))&&r}const Q1=e=>e!==null;function Ts(e,{repeat:t,repeatType:n="loop"},r){const o=e.filter(Q1),s=t&&n!=="loop"&&t%2===1?0:o.length-1;return!s||r===void 0?o[s]:r}const e_=40;class Wy{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:o=0,repeatDelay:s=0,repeatType:i="loop",...a}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=vt.now(),this.options={autoplay:t,delay:n,type:r,repeat:o,repeatDelay:s,repeatType:i,...a},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>e_?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&K1(),this._resolved}onKeyframesResolved(t,n){this.resolvedAt=vt.now(),this.hasAttemptedResolve=!0;const{name:r,type:o,velocity:s,delay:i,onComplete:a,onUpdate:l,isGenerator:c}=this.options;if(!c&&!J1(t,r,o,s))if(i)this.options.duration=0;else{l&&l(Ts(t,this.options,n)),a&&a(),this.resolveFinishedPromise();return}const u=this.initPlayback(t,n);u!==!1&&(this._resolved={keyframes:t,finalKeyframe:n,...u},this.onPostResolved())}onPostResolved(){}then(t,n){return this.currentFinishedPromise.then(t,n)}flatten(){this.options.type="keyframes",this.options.ease="linear"}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}const ye=(e,t,n)=>e+(t-e)*n;function Tl(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function t_({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let o=0,s=0,i=0;if(!t)o=s=i=n;else{const a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;o=Tl(l,a,e+1/3),s=Tl(l,a,e),i=Tl(l,a,e-1/3)}return{red:Math.round(o*255),green:Math.round(s*255),blue:Math.round(i*255),alpha:r}}function Ps(e,t){return n=>n>0?t:e}const Pl=(e,t,n)=>{const r=e*e,o=n*(t*t-r)+r;return o<0?0:Math.sqrt(o)},n_=[xl,en,Vn],r_=e=>n_.find(t=>t.test(e));function zy(e){const t=r_(e);if(Jt(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`),!t)return!1;let n=t.parse(e);return t===Vn&&(n=t_(n)),n}const Hy=(e,t)=>{const n=zy(e),r=zy(t);if(!n||!r)return Ps(e,t);const o={...n};return s=>(o.red=Pl(n.red,r.red,s),o.green=Pl(n.green,r.green,s),o.blue=Pl(n.blue,r.blue,s),o.alpha=ye(n.alpha,r.alpha,s),en.transform(o))},o_=(e,t)=>n=>t(e(n)),Fr=(...e)=>e.reduce(o_),Rl=new Set(["none","hidden"]);function s_(e,t){return Rl.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function i_(e,t){return n=>ye(e,t,n)}function Al(e){return typeof e=="number"?i_:typeof e=="string"?Za(e)?Ps:ke.test(e)?Hy:c_:Array.isArray(e)?Uy:typeof e=="object"?ke.test(e)?Hy:a_:Ps}function Uy(e,t){const n=[...e],r=n.length,o=e.map((s,i)=>Al(s)(s,t[i]));return s=>{for(let i=0;i<r;i++)n[i]=o[i](s);return n}}function a_(e,t){const n={...e,...t},r={};for(const o in n)e[o]!==void 0&&t[o]!==void 0&&(r[o]=Al(e[o])(e[o],t[o]));return o=>{for(const s in r)n[s]=r[s](o);return n}}function l_(e,t){var n;const r=[],o={color:0,var:0,number:0};for(let s=0;s<t.values.length;s++){const i=t.types[s],a=e.indexes[i][o[i]],l=(n=e.values[a])!==null&&n!==void 0?n:0;r[s]=l,o[i]++}return r}const c_=(e,t)=>{const n=Ft.createTransformer(t),r=$r(e),o=$r(t);return r.indexes.var.length===o.indexes.var.length&&r.indexes.color.length===o.indexes.color.length&&r.indexes.number.length>=o.indexes.number.length?Rl.has(e)&&!o.values.length||Rl.has(t)&&!r.values.length?s_(e,t):Fr(Uy(l_(r,o),o.values),n):(Jt(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),Ps(e,t))};function Gy(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?ye(e,t,n):Al(e)(e,t)}const u_=5;function Ky(e,t,n){const r=Math.max(t-u_,0);return fl(n-e(r),t-r)}const be={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},Nl=.001;function d_({duration:e=be.duration,bounce:t=be.bounce,velocity:n=be.velocity,mass:r=be.mass}){let o,s;Jt(e<=ot(be.maxDuration),"Spring duration must be 10 seconds or less");let i=1-t;i=mt(be.minDamping,be.maxDamping,i),e=mt(be.minDuration,be.maxDuration,ht(e)),i<1?(o=c=>{const u=c*i,f=u*e,h=u-n,m=Ml(c,i),y=Math.exp(-f);return Nl-h/m*y},s=c=>{const f=c*i*e,h=f*n+n,m=Math.pow(i,2)*Math.pow(c,2)*e,y=Math.exp(-f),g=Ml(Math.pow(c,2),i);return(-o(c)+Nl>0?-1:1)*((h-m)*y)/g}):(o=c=>{const u=Math.exp(-c*e),f=(c-n)*e+1;return-Nl+u*f},s=c=>{const u=Math.exp(-c*e),f=(n-c)*(e*e);return u*f});const a=5/e,l=p_(o,s,a);if(e=ot(e),isNaN(l))return{stiffness:be.stiffness,damping:be.damping,duration:e};{const c=Math.pow(l,2)*r;return{stiffness:c,damping:i*2*Math.sqrt(r*c),duration:e}}}const f_=12;function p_(e,t,n){let r=n;for(let o=1;o<f_;o++)r=r-e(r)/t(r);return r}function Ml(e,t){return e*Math.sqrt(1-t*t)}const h_=["duration","bounce"],m_=["stiffness","damping","mass"];function Yy(e,t){return t.some(n=>e[n]!==void 0)}function g_(e){let t={velocity:be.velocity,stiffness:be.stiffness,damping:be.damping,mass:be.mass,isResolvedFromDuration:!1,...e};if(!Yy(e,m_)&&Yy(e,h_))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),o=r*r,s=2*mt(.05,1,1-(e.bounce||0))*Math.sqrt(o);t={...t,mass:be.mass,stiffness:o,damping:s}}else{const n=d_(e);t={...t,...n,mass:be.mass},t.isResolvedFromDuration=!0}return t}function _l(e=be.visualDuration,t=be.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:o}=n;const s=n.keyframes[0],i=n.keyframes[n.keyframes.length-1],a={done:!1,value:s},{stiffness:l,damping:c,mass:u,duration:f,velocity:h,isResolvedFromDuration:m}=g_({...n,velocity:-ht(n.velocity||0)}),y=h||0,g=c/(2*Math.sqrt(l*u)),v=i-s,x=ht(Math.sqrt(l/u)),b=Math.abs(v)<5;r||(r=b?be.restSpeed.granular:be.restSpeed.default),o||(o=b?be.restDelta.granular:be.restDelta.default);let w;if(g<1){const C=Ml(x,g);w=R=>{const A=Math.exp(-g*x*R);return i-A*((y+g*x*v)/C*Math.sin(C*R)+v*Math.cos(C*R))}}else if(g===1)w=C=>i-Math.exp(-x*C)*(v+(y+x*v)*C);else{const C=x*Math.sqrt(g*g-1);w=R=>{const A=Math.exp(-g*x*R),N=Math.min(C*R,300);return i-A*((y+g*x*v)*Math.sinh(N)+C*v*Math.cosh(N))/C}}const S={calculatedDuration:m&&f||null,next:C=>{const R=w(C);if(m)a.done=C>=f;else{let A=0;g<1&&(A=C===0?ot(y):Ky(w,C,R));const N=Math.abs(A)<=r,_=Math.abs(i-R)<=o;a.done=N&&_}return a.value=a.done?i:R,a},toString:()=>{const C=Math.min(sl(S),xs),R=ny(A=>S.next(C*A).value,C,30);return C+"ms "+R}};return S}function Xy({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:o=10,bounceStiffness:s=500,modifyTarget:i,min:a,max:l,restDelta:c=.5,restSpeed:u}){const f=e[0],h={done:!1,value:f},m=N=>a!==void 0&&N<a||l!==void 0&&N>l,y=N=>a===void 0?l:l===void 0||Math.abs(a-N)<Math.abs(l-N)?a:l;let g=n*t;const v=f+g,x=i===void 0?v:i(v);x!==v&&(g=x-f);const b=N=>-g*Math.exp(-N/r),w=N=>x+b(N),S=N=>{const _=b(N),k=w(N);h.done=Math.abs(_)<=c,h.value=h.done?x:k};let C,R;const A=N=>{m(h.value)&&(C=N,R=_l({keyframes:[h.value,y(h.value)],velocity:Ky(w,N,h.value),damping:o,stiffness:s,restDelta:c,restSpeed:u}))};return A(0),{calculatedDuration:null,next:N=>{let _=!1;return!R&&C===void 0&&(_=!0,S(N),A(N)),C!==void 0&&N>=C?R.next(N-C):(!_&&S(N),h)}}}const v_=Lr(.42,0,1,1),y_=Lr(0,0,.58,1),qy=Lr(.42,0,.58,1),Zy=e=>Array.isArray(e)&&typeof e[0]!="number",Jy={linear:$e,easeIn:v_,easeInOut:qy,easeOut:y_,circIn:ml,circInOut:wy,circOut:by,backIn:hl,backInOut:yy,backOut:vy,anticipate:xy},jl=e=>{if(il(e)){pt(e.length===4,"Cubic bezier arrays must contain four numerical values.");const[t,n,r,o]=e;return Lr(t,n,r,o)}else if(typeof e=="string")return pt(Jy[e]!==void 0,`Invalid easing type '${e}'`),Jy[e];return e};function x_(e,t,n){const r=[],o=n||Gy,s=e.length-1;for(let i=0;i<s;i++){let a=o(e[i],e[i+1]);if(t){const l=Array.isArray(t)?t[i]||$e:t;a=Fr(l,a)}r.push(a)}return r}function Il(e,t,{clamp:n=!0,ease:r,mixer:o}={}){const s=e.length;if(pt(s===t.length,"Both input and output ranges must be the same length"),s===1)return()=>t[0];if(s===2&&t[0]===t[1])return()=>t[1];const i=e[0]===e[1];e[0]>e[s-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=x_(t,r,o),l=a.length,c=u=>{if(i&&u<e[0])return t[0];let f=0;if(l>1)for(;f<e.length-2&&!(u<e[f+1]);f++);const h=Vt(e[f],e[f+1],u);return a[f](h)};return n?u=>c(mt(e[0],e[s-1],u)):c}function Qy(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const o=Vt(0,t,r);e.push(ye(n,1,o))}}function Dl(e){const t=[0];return Qy(t,e.length-1),t}function b_(e,t){return e.map(n=>n*t)}function w_(e,t){return e.map(()=>t||qy).splice(0,e.length-1)}function Rs({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=Zy(r)?r.map(jl):jl(r),s={done:!1,value:t[0]},i=b_(n&&n.length===t.length?n:Dl(t),e),a=Il(i,t,{ease:Array.isArray(o)?o:w_(t,o)});return{calculatedDuration:e,next:l=>(s.value=a(l),s.done=l>=e,s)}}const S_=e=>{const t=({timestamp:n})=>e(n);return{start:()=>pe.update(t,!0),stop:()=>Ye(t),now:()=>Ne.isProcessing?Ne.timestamp:vt.now()}},C_={decay:Xy,inertia:Xy,tween:Rs,keyframes:Rs,spring:_l},E_=e=>e/100;class As extends Wy{constructor(t){super(t),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:l}=this.options;l&&l()};const{name:n,motionValue:r,element:o,keyframes:s}=this.options,i=(o==null?void 0:o.KeyframeResolver)||El,a=(l,c)=>this.onKeyframesResolved(l,c);this.resolver=new i(s,a,n,r,o),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(t){const{type:n="keyframes",repeat:r=0,repeatDelay:o=0,repeatType:s,velocity:i=0}=this.options,a=bs(n)?n:C_[n]||Rs;let l,c;a!==Rs&&typeof t[0]!="number"&&(process.env.NODE_ENV!=="production"&&pt(t.length===2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${t}`),l=Fr(E_,Gy(t[0],t[1])),t=[0,100]);const u=a({...this.options,keyframes:t});s==="mirror"&&(c=a({...this.options,keyframes:[...t].reverse(),velocity:-i})),u.calculatedDuration===null&&(u.calculatedDuration=sl(u));const{calculatedDuration:f}=u,h=f+o,m=h*(r+1)-o;return{generator:u,mirroredGenerator:c,mapPercentToKeyframes:l,calculatedDuration:f,resolvedDuration:h,totalDuration:m}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!t?this.pause():this.state=this.pendingPlayState}tick(t,n=!1){const{resolved:r}=this;if(!r){const{keyframes:N}=this.options;return{done:!0,value:N[N.length-1]}}const{finalKeyframe:o,generator:s,mirroredGenerator:i,mapPercentToKeyframes:a,keyframes:l,calculatedDuration:c,totalDuration:u,resolvedDuration:f}=r;if(this.startTime===null)return s.next(0);const{delay:h,repeat:m,repeatType:y,repeatDelay:g,onUpdate:v}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-u/this.speed,this.startTime)),n?this.currentTime=t:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const x=this.currentTime-h*(this.speed>=0?1:-1),b=this.speed>=0?x<0:x>u;this.currentTime=Math.max(x,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=u);let w=this.currentTime,S=s;if(m){const N=Math.min(this.currentTime,u)/f;let _=Math.floor(N),k=N%1;!k&&N>=1&&(k=1),k===1&&_--,_=Math.min(_,m+1),!!(_%2)&&(y==="reverse"?(k=1-k,g&&(k-=g/f)):y==="mirror"&&(S=i)),w=mt(0,1,k)*f}const C=b?{done:!1,value:l[0]}:S.next(w);a&&(C.value=a(C.value));let{done:R}=C;!b&&c!==null&&(R=this.speed>=0?this.currentTime>=u:this.currentTime<=0);const A=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&R);return A&&o!==void 0&&(C.value=Ts(l,this.options,o)),v&&v(C.value),A&&this.finish(),C}get duration(){const{resolved:t}=this;return t?ht(t.calculatedDuration):0}get time(){return ht(this.currentTime)}set time(t){t=ot(t),this.currentTime=t,this.holdTime!==null||this.speed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.speed)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=ht(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=S_,onPlay:n,startTime:r}=this.options;this.driver||(this.driver=t(s=>this.tick(s))),n&&n();const o=this.driver.now();this.holdTime!==null?this.startTime=o-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=o):this.startTime=r??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var t;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(t=this.currentTime)!==null&&t!==void 0?t:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}}function T_(e){return new As(e)}const P_=new Set(["opacity","clipPath","filter","transform"]);function R_(e,t,n,{delay:r=0,duration:o=300,repeat:s=0,repeatType:i="loop",ease:a="easeInOut",times:l}={}){const c={[t]:n};l&&(c.offset=l);const u=oy(a,o);return Array.isArray(u)&&(c.easing=u),e.animate(c,{delay:r,duration:o,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:s+1,direction:i==="reverse"?"alternate":"normal"})}const A_=Wa(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),Ns=10,N_=2e4;function M_(e){return bs(e.type)||e.type==="spring"||!ry(e.ease)}function __(e,t){const n=new As({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:e[0]};const o=[];let s=0;for(;!r.done&&s<N_;)r=n.sample(s),o.push(r.value),s+=Ns;return{times:void 0,keyframes:o,duration:s-Ns,ease:"linear"}}const ex={anticipate:xy,backInOut:yy,circInOut:wy};function j_(e){return e in ex}class tx extends Wy{constructor(t){super(t);const{name:n,motionValue:r,element:o,keyframes:s}=this.options;this.resolver=new Fy(s,(i,a)=>this.onKeyframesResolved(i,a),n,r,o),this.resolver.scheduleResolve()}initPlayback(t,n){let{duration:r=300,times:o,ease:s,type:i,motionValue:a,name:l,startTime:c}=this.options;if(!a.owner||!a.owner.current)return!1;if(typeof s=="string"&&ws()&&j_(s)&&(s=ex[s]),M_(this.options)){const{onComplete:f,onUpdate:h,motionValue:m,element:y,...g}=this.options,v=__(t,g);t=v.keyframes,t.length===1&&(t[1]=t[0]),r=v.duration,o=v.times,s=v.ease,i="keyframes"}const u=R_(a.owner.current,l,t,{...this.options,duration:r,times:o,ease:s});return u.startTime=c??this.calcStartTime(),this.pendingTimeline?(ty(u,this.pendingTimeline),this.pendingTimeline=void 0):u.onfinish=()=>{const{onComplete:f}=this.options;a.set(Ts(t,this.options,n)),f&&f(),this.cancel(),this.resolveFinishedPromise()},{animation:u,duration:r,times:o,type:i,ease:s,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:n}=t;return ht(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return ht(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=ot(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:n}=t;return n.playbackRate}set speed(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:n}=t;return n.playState}get startTime(){const{resolved:t}=this;if(!t)return null;const{animation:n}=t;return n.startTime}attachTimeline(t){if(!this._resolved)this.pendingTimeline=t;else{const{resolved:n}=this;if(!n)return $e;const{animation:r}=n;ty(r,t)}return $e}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:t}=this;if(!t)return;const{animation:n,keyframes:r,duration:o,type:s,ease:i,times:a}=t;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:c,onUpdate:u,onComplete:f,element:h,...m}=this.options,y=new As({...m,keyframes:r,duration:o,type:s,ease:i,times:a,isGenerator:!0}),g=ot(this.time);c.setWithVelocity(y.sample(g-Ns).value,y.sample(g).value,Ns)}const{onStop:l}=this.options;l&&l(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:n,name:r,repeatDelay:o,repeatType:s,damping:i,type:a}=t;if(!n||!n.owner||!(n.owner.current instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:c}=n.owner.getProps();return A_()&&r&&P_.has(r)&&!l&&!c&&!o&&s!=="mirror"&&i!==0&&a!=="inertia"}}const I_={type:"spring",stiffness:500,damping:25,restSpeed:10},D_=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),k_={type:"keyframes",duration:.8},O_={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},L_=(e,{keyframes:t})=>t.length>2?k_:Qt.has(e)?e.startsWith("scale")?D_(t[1]):I_:O_;function V_({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:o,repeat:s,repeatType:i,repeatDelay:a,from:l,elapsed:c,...u}){return!!Object.keys(u).length}const kl=(e,t,n,r={},o,s)=>i=>{const a=ol(r,e)||{},l=a.delay||r.delay||0;let{elapsed:c=0}=r;c=c-ot(l);let u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-c,onUpdate:h=>{t.set(h),a.onUpdate&&a.onUpdate(h)},onComplete:()=>{i(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:s?void 0:o};V_(a)||(u={...u,...L_(e,u)}),u.duration&&(u.duration=ot(u.duration)),u.repeatDelay&&(u.repeatDelay=ot(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let f=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(u.duration=0,u.delay===0&&(f=!0)),f&&!s&&t.get()!==void 0){const h=Ts(u.keyframes,a);if(h!==void 0)return pe.update(()=>{u.onUpdate(h),u.onComplete()}),new ey([])}return!s&&tx.supports(u)?new tx(u):new As(u)};function $_({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function Ol(e,t,{delay:n=0,transitionOverride:r,type:o}={}){var s;let{transition:i=e.getDefaultTransition(),transitionEnd:a,...l}=t;r&&(i=r);const c=[],u=o&&e.animationState&&e.animationState.getState()[o];for(const f in l){const h=e.getValue(f,(s=e.latestValues[f])!==null&&s!==void 0?s:null),m=l[f];if(m===void 0||u&&$_(u,f))continue;const y={delay:n,...ol(i||{},f)};let g=!1;if(window.MotionHandoffAnimation){const x=py(e);if(x){const b=window.MotionHandoffAnimation(x,f,pe);b!==null&&(y.startTime=b,g=!0)}}pl(e,f),h.start(kl(f,h,m,e.shouldReduceMotion&&dy.has(f)?{type:!1}:y,e,g));const v=h.animation;v&&c.push(v)}return a&&Promise.all(c).then(()=>{pe.update(()=>{a&&w1(e,a)})}),c}function Ll(e,t,n={}){var r;const o=ys(e,t,n.type==="exit"?(r=e.presenceContext)===null||r===void 0?void 0:r.custom:void 0);let{transition:s=e.getDefaultTransition()||{}}=o||{};n.transitionOverride&&(s=n.transitionOverride);const i=o?()=>Promise.all(Ol(e,o,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(c=0)=>{const{delayChildren:u=0,staggerChildren:f,staggerDirection:h}=s;return F_(e,t,u+c,f,h,n)}:()=>Promise.resolve(),{when:l}=s;if(l){const[c,u]=l==="beforeChildren"?[i,a]:[a,i];return c().then(()=>u())}else return Promise.all([i(),a(n.delay)])}function F_(e,t,n=0,r=0,o=1,s){const i=[],a=(e.variantChildren.size-1)*r,l=o===1?(c=0)=>c*r:(c=0)=>a-c*r;return Array.from(e.variantChildren).sort(B_).forEach((c,u)=>{c.notify("AnimationStart",t),i.push(Ll(c,t,{...s,delay:n+l(u)}).then(()=>c.notify("AnimationComplete",t)))}),Promise.all(i)}function B_(e,t){return e.sortNodePosition(t)}function W_(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const o=t.map(s=>Ll(e,s,n));r=Promise.all(o)}else if(typeof t=="string")r=Ll(e,t,n);else{const o=typeof t=="function"?ys(e,t,n.custom):t;r=Promise.all(Ol(e,o,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}const z_=Ua.length;function nx(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?nx(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<z_;n++){const r=Ua[n],o=e.props[r];(_r(o)||o===!1)&&(t[r]=o)}return t}const H_=[...Ha].reverse(),U_=Ha.length;function G_(e){return t=>Promise.all(t.map(({animation:n,options:r})=>W_(e,n,r)))}function K_(e){let t=G_(e),n=rx(),r=!0;const o=l=>(c,u)=>{var f;const h=ys(e,u,l==="exit"?(f=e.presenceContext)===null||f===void 0?void 0:f.custom:void 0);if(h){const{transition:m,transitionEnd:y,...g}=h;c={...c,...g,...y}}return c};function s(l){t=l(e)}function i(l){const{props:c}=e,u=nx(e.parent)||{},f=[],h=new Set;let m={},y=1/0;for(let v=0;v<U_;v++){const x=H_[v],b=n[x],w=c[x]!==void 0?c[x]:u[x],S=_r(w),C=x===l?b.isActive:null;C===!1&&(y=v);let R=w===u[x]&&w!==c[x]&&S;if(R&&r&&e.manuallyAnimateOnMount&&(R=!1),b.protectedKeys={...m},!b.isActive&&C===null||!w&&!b.prevProp||ps(w)||typeof w=="boolean")continue;const A=Y_(b.prevProp,w);let N=A||x===l&&b.isActive&&!R&&S||v>y&&S,_=!1;const k=Array.isArray(w)?w:[w];let O=k.reduce(o(x),{});C===!1&&(O={});const{prevResolvedValues:L={}}=b,G={...L,...O},j=z=>{N=!0,h.has(z)&&(_=!0,h.delete(z)),b.needsAnimating[z]=!0;const V=e.getValue(z);V&&(V.liveStyle=!1)};for(const z in G){const V=O[z],$=L[z];if(m.hasOwnProperty(z))continue;let oe=!1;qa(V)&&qa($)?oe=!Jv(V,$):oe=V!==$,oe?V!=null?j(z):h.add(z):V!==void 0&&h.has(z)?j(z):b.protectedKeys[z]=!0}b.prevProp=w,b.prevResolvedValues=O,b.isActive&&(m={...m,...O}),r&&e.blockInitialAnimation&&(N=!1),N&&(!(R&&A)||_)&&f.push(...k.map(z=>({animation:z,options:{type:x}})))}if(h.size){const v={};h.forEach(x=>{const b=e.getBaseTarget(x),w=e.getValue(x);w&&(w.liveStyle=!0),v[x]=b??null}),f.push({animation:v})}let g=!!f.length;return r&&(c.initial===!1||c.initial===c.animate)&&!e.manuallyAnimateOnMount&&(g=!1),r=!1,g?t(f):Promise.resolve()}function a(l,c){var u;if(n[l].isActive===c)return Promise.resolve();(u=e.variantChildren)===null||u===void 0||u.forEach(h=>{var m;return(m=h.animationState)===null||m===void 0?void 0:m.setActive(l,c)}),n[l].isActive=c;const f=i(l);for(const h in n)n[h].protectedKeys={};return f}return{animateChanges:i,setActive:a,setAnimateFunction:s,getState:()=>n,reset:()=>{n=rx(),r=!0}}}function Y_(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!Jv(t,e):!1}function nn(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function rx(){return{animate:nn(!0),whileInView:nn(),whileHover:nn(),whileTap:nn(),whileDrag:nn(),whileFocus:nn(),exit:nn()}}class Bt{constructor(t){this.isMounted=!1,this.node=t}update(){}}class X_ extends Bt{constructor(t){super(t),t.animationState||(t.animationState=K_(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();ps(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)===null||t===void 0||t.call(this)}}let q_=0;class Z_ extends Bt{constructor(){super(...arguments),this.id=q_++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const o=this.node.animationState.setActive("exit",!t);n&&!t&&o.then(()=>n(this.id))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}const J_={animation:{Feature:X_},exit:{Feature:Z_}};function Br(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function Wr(e){return{point:{x:e.pageX,y:e.pageY}}}const Q_=e=>t=>ll(t)&&e(t,Wr(t));function zr(e,t,n,r){return Br(e,t,Q_(n),r)}const ox=(e,t)=>Math.abs(e-t);function ej(e,t){const n=ox(e.x,t.x),r=ox(e.y,t.y);return Math.sqrt(n**2+r**2)}class sx{constructor(t,n,{transformPagePoint:r,contextWindow:o,dragSnapToOrigin:s=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const f=$l(this.lastMoveEventInfo,this.history),h=this.startEvent!==null,m=ej(f.offset,{x:0,y:0})>=3;if(!h&&!m)return;const{point:y}=f,{timestamp:g}=Ne;this.history.push({...y,timestamp:g});const{onStart:v,onMove:x}=this.handlers;h||(v&&v(this.lastMoveEvent,f),this.startEvent=this.lastMoveEvent),x&&x(this.lastMoveEvent,f)},this.handlePointerMove=(f,h)=>{this.lastMoveEvent=f,this.lastMoveEventInfo=Vl(h,this.transformPagePoint),pe.update(this.updatePoint,!0)},this.handlePointerUp=(f,h)=>{this.end();const{onEnd:m,onSessionEnd:y,resumeAnimation:g}=this.handlers;if(this.dragSnapToOrigin&&g&&g(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const v=$l(f.type==="pointercancel"?this.lastMoveEventInfo:Vl(h,this.transformPagePoint),this.history);this.startEvent&&m&&m(f,v),y&&y(f,v)},!ll(t))return;this.dragSnapToOrigin=s,this.handlers=n,this.transformPagePoint=r,this.contextWindow=o||window;const i=Wr(t),a=Vl(i,this.transformPagePoint),{point:l}=a,{timestamp:c}=Ne;this.history=[{...l,timestamp:c}];const{onSessionStart:u}=n;u&&u(t,$l(a,this.history)),this.removeListeners=Fr(zr(this.contextWindow,"pointermove",this.handlePointerMove),zr(this.contextWindow,"pointerup",this.handlePointerUp),zr(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Ye(this.updatePoint)}}function Vl(e,t){return t?{point:t(e.point)}:e}function ix(e,t){return{x:e.x-t.x,y:e.y-t.y}}function $l({point:e},t){return{point:e,delta:ix(e,ax(t)),offset:ix(e,tj(t)),velocity:nj(t,.1)}}function tj(e){return e[0]}function ax(e){return e[e.length-1]}function nj(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=ax(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>ot(t)));)n--;if(!r)return{x:0,y:0};const s=ht(o.timestamp-r.timestamp);if(s===0)return{x:0,y:0};const i={x:(o.x-r.x)/s,y:(o.y-r.y)/s};return i.x===1/0&&(i.x=0),i.y===1/0&&(i.y=0),i}const lx=1e-4,rj=1-lx,oj=1+lx,cx=.01,sj=0-cx,ij=0+cx;function Ue(e){return e.max-e.min}function aj(e,t,n){return Math.abs(e-t)<=n}function ux(e,t,n,r=.5){e.origin=r,e.originPoint=ye(t.min,t.max,e.origin),e.scale=Ue(n)/Ue(t),e.translate=ye(n.min,n.max,e.origin)-e.originPoint,(e.scale>=rj&&e.scale<=oj||isNaN(e.scale))&&(e.scale=1),(e.translate>=sj&&e.translate<=ij||isNaN(e.translate))&&(e.translate=0)}function Hr(e,t,n,r){ux(e.x,t.x,n.x,r?r.originX:void 0),ux(e.y,t.y,n.y,r?r.originY:void 0)}function dx(e,t,n){e.min=n.min+t.min,e.max=e.min+Ue(t)}function lj(e,t,n){dx(e.x,t.x,n.x),dx(e.y,t.y,n.y)}function fx(e,t,n){e.min=t.min-n.min,e.max=e.min+Ue(t)}function Ur(e,t,n){fx(e.x,t.x,n.x),fx(e.y,t.y,n.y)}function cj(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?ye(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?ye(n,e,r.max):Math.min(e,n)),e}function px(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function uj(e,{top:t,left:n,bottom:r,right:o}){return{x:px(e.x,n,o),y:px(e.y,t,r)}}function hx(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function dj(e,t){return{x:hx(e.x,t.x),y:hx(e.y,t.y)}}function fj(e,t){let n=.5;const r=Ue(e),o=Ue(t);return o>r?n=Vt(t.min,t.max-r,e.min):r>o&&(n=Vt(e.min,e.max-o,t.min)),mt(0,1,n)}function pj(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const Fl=.35;function hj(e=Fl){return e===!1?e=0:e===!0&&(e=Fl),{x:mx(e,"left","right"),y:mx(e,"top","bottom")}}function mx(e,t,n){return{min:gx(e,t),max:gx(e,n)}}function gx(e,t){return typeof e=="number"?e:e[t]||0}const vx=()=>({translate:0,scale:1,origin:0,originPoint:0}),Fn=()=>({x:vx(),y:vx()}),yx=()=>({min:0,max:0}),Ee=()=>({x:yx(),y:yx()});function Xe(e){return[e("x"),e("y")]}function xx({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function mj({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function gj(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function Bl(e){return e===void 0||e===1}function Wl({scale:e,scaleX:t,scaleY:n}){return!Bl(e)||!Bl(t)||!Bl(n)}function rn(e){return Wl(e)||bx(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function bx(e){return wx(e.x)||wx(e.y)}function wx(e){return e&&e!=="0%"}function Ms(e,t,n){const r=e-n,o=t*r;return n+o}function Sx(e,t,n,r,o){return o!==void 0&&(e=Ms(e,o,r)),Ms(e,n,r)+t}function zl(e,t=0,n=1,r,o){e.min=Sx(e.min,t,n,r,o),e.max=Sx(e.max,t,n,r,o)}function Cx(e,{x:t,y:n}){zl(e.x,t.translate,t.scale,t.originPoint),zl(e.y,n.translate,n.scale,n.originPoint)}const Ex=.999999999999,Tx=1.0000000000001;function vj(e,t,n,r=!1){const o=n.length;if(!o)return;t.x=t.y=1;let s,i;for(let a=0;a<o;a++){s=n[a],i=s.projectionDelta;const{visualElement:l}=s.options;l&&l.props.style&&l.props.style.display==="contents"||(r&&s.options.layoutScroll&&s.scroll&&s!==s.root&&Wn(e,{x:-s.scroll.offset.x,y:-s.scroll.offset.y}),i&&(t.x*=i.x.scale,t.y*=i.y.scale,Cx(e,i)),r&&rn(s.latestValues)&&Wn(e,s.latestValues))}t.x<Tx&&t.x>Ex&&(t.x=1),t.y<Tx&&t.y>Ex&&(t.y=1)}function Bn(e,t){e.min=e.min+t,e.max=e.max+t}function Px(e,t,n,r,o=.5){const s=ye(e.min,e.max,o);zl(e,t,n,s,r)}function Wn(e,t){Px(e.x,t.x,t.scaleX,t.scale,t.originX),Px(e.y,t.y,t.scaleY,t.scale,t.originY)}function Rx(e,t){return xx(gj(e.getBoundingClientRect(),t))}function yj(e,t,n){const r=Rx(e,n),{scroll:o}=t;return o&&(Bn(r.x,o.offset.x),Bn(r.y,o.offset.y)),r}const Ax=({current:e})=>e?e.ownerDocument.defaultView:null,xj=new WeakMap;class bj{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Ee(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const o=u=>{const{dragSnapToOrigin:f}=this.getProps();f?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(Wr(u).point)},s=(u,f)=>{const{drag:h,dragPropagation:m,onDragStart:y}=this.getProps();if(h&&!m&&(this.openDragLock&&this.openDragLock(),this.openDragLock=g1(h),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Xe(v=>{let x=this.getAxisMotionValue(v).get()||0;if(gt.test(x)){const{projection:b}=this.visualElement;if(b&&b.layout){const w=b.layout.layoutBox[v];w&&(x=Ue(w)*(parseFloat(x)/100))}}this.originPoint[v]=x}),y&&pe.postRender(()=>y(u,f)),pl(this.visualElement,"transform");const{animationState:g}=this.visualElement;g&&g.setActive("whileDrag",!0)},i=(u,f)=>{const{dragPropagation:h,dragDirectionLock:m,onDirectionLock:y,onDrag:g}=this.getProps();if(!h&&!this.openDragLock)return;const{offset:v}=f;if(m&&this.currentDirection===null){this.currentDirection=wj(v),this.currentDirection!==null&&y&&y(this.currentDirection);return}this.updateAxis("x",f.point,v),this.updateAxis("y",f.point,v),this.visualElement.render(),g&&g(u,f)},a=(u,f)=>this.stop(u,f),l=()=>Xe(u=>{var f;return this.getAnimationState(u)==="paused"&&((f=this.getAxisMotionValue(u).animation)===null||f===void 0?void 0:f.play())}),{dragSnapToOrigin:c}=this.getProps();this.panSession=new sx(t,{onSessionStart:o,onStart:s,onMove:i,onSessionEnd:a,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,contextWindow:Ax(this.visualElement)})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:o}=n;this.startAnimation(o);const{onDragEnd:s}=this.getProps();s&&pe.postRender(()=>s(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:o}=this.getProps();if(!r||!_s(t,o,this.currentDirection))return;const s=this.getAxisMotionValue(t);let i=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(i=cj(i,this.constraints[t],this.elastic[t])),s.set(i)}resolveConstraints(){var t;const{dragConstraints:n,dragElastic:r}=this.getProps(),o=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(t=this.visualElement.projection)===null||t===void 0?void 0:t.layout,s=this.constraints;n&&kn(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&o?this.constraints=uj(o.layoutBox,n):this.constraints=!1,this.elastic=hj(r),s!==this.constraints&&o&&this.constraints&&!this.hasMutatedConstraints&&Xe(i=>{this.constraints!==!1&&this.getAxisMotionValue(i)&&(this.constraints[i]=pj(o.layoutBox[i],this.constraints[i]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!kn(t))return!1;const r=t.current;pt(r!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");const{projection:o}=this.visualElement;if(!o||!o.layout)return!1;const s=yj(r,o.root,this.visualElement.getTransformPagePoint());let i=dj(o.layout.layoutBox,s);if(n){const a=n(mj(i));this.hasMutatedConstraints=!!a,a&&(i=xx(a))}return i}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:o,dragTransition:s,dragSnapToOrigin:i,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=Xe(u=>{if(!_s(u,n,this.currentDirection))return;let f=l&&l[u]||{};i&&(f={min:0,max:0});const h=o?200:1e6,m=o?40:1e7,y={type:"inertia",velocity:r?t[u]:0,bounceStiffness:h,bounceDamping:m,timeConstant:750,restDelta:1,restSpeed:10,...s,...f};return this.startAxisValueAnimation(u,y)});return Promise.all(c).then(a)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return pl(this.visualElement,t),r.start(kl(t,r,0,n,this.visualElement,!1))}stopAnimation(){Xe(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){Xe(t=>{var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),o=r[n];return o||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){Xe(n=>{const{drag:r}=this.getProps();if(!_s(n,r,this.currentDirection))return;const{projection:o}=this.visualElement,s=this.getAxisMotionValue(n);if(o&&o.layout){const{min:i,max:a}=o.layout.layoutBox[n];s.set(t[n]-ye(i,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!kn(n)||!r||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};Xe(i=>{const a=this.getAxisMotionValue(i);if(a&&this.constraints!==!1){const l=a.get();o[i]=fj({min:l,max:l},this.constraints[i])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),Xe(i=>{if(!_s(i,t,null))return;const a=this.getAxisMotionValue(i),{min:l,max:c}=this.constraints[i];a.set(ye(l,c,o[i]))})}addListeners(){if(!this.visualElement.current)return;xj.set(this.visualElement,this);const t=this.visualElement.current,n=zr(t,"pointerdown",l=>{const{drag:c,dragListener:u=!0}=this.getProps();c&&u&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();kn(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,s=o.addEventListener("measure",r);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),pe.read(r);const i=Br(window,"resize",()=>this.scalePositionWithinConstraints()),a=o.addEventListener("didUpdate",({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(Xe(u=>{const f=this.getAxisMotionValue(u);f&&(this.originPoint[u]+=l[u].translate,f.set(f.get()+l[u].translate))}),this.visualElement.render())});return()=>{i(),n(),s(),a&&a()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:o=!1,dragConstraints:s=!1,dragElastic:i=Fl,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:o,dragConstraints:s,dragElastic:i,dragMomentum:a}}}function _s(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function wj(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class Sj extends Bt{constructor(t){super(t),this.removeGroupControls=$e,this.removeListeners=$e,this.controls=new bj(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||$e}unmount(){this.removeGroupControls(),this.removeListeners()}}const Nx=e=>(t,n)=>{e&&pe.postRender(()=>e(t,n))};class Cj extends Bt{constructor(){super(...arguments),this.removePointerDownListener=$e}onPointerDown(t){this.session=new sx(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Ax(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:o}=this.node.getProps();return{onSessionStart:Nx(t),onStart:Nx(n),onMove:r,onEnd:(s,i)=>{delete this.session,o&&pe.postRender(()=>o(s,i))}}}mount(){this.removePointerDownListener=zr(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const js={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Mx(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const Gr={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(se.test(e))e=parseFloat(e);else return e;const n=Mx(e,t.target.x),r=Mx(e,t.target.y);return`${n}% ${r}%`}},Ej={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,o=Ft.parse(e);if(o.length>5)return r;const s=Ft.createTransformer(e),i=typeof o[0]!="number"?1:0,a=n.x.scale*t.x,l=n.y.scale*t.y;o[0+i]/=a,o[1+i]/=l;const c=ye(a,l,.5);return typeof o[2+i]=="number"&&(o[2+i]/=c),typeof o[3+i]=="number"&&(o[3+i]/=c),s(o)}};class Tj extends T.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:o}=this.props,{projection:s}=t;ZM(Pj),s&&(n.group&&n.group.add(s),r&&r.register&&o&&r.register(s),s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,onExitComplete:()=>this.safeToRemove()})),js.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:o,isPresent:s}=this.props,i=r.projection;return i&&(i.isPresent=s,o||t.layoutDependency!==n||n===void 0?i.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?i.promote():i.relegate()||pe.postRender(()=>{const a=i.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Ka.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:o}=t;o&&(o.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(o),r&&r.deregister&&r.deregister(o))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function _x(e){const[t,n]=Ev(),r=T.useContext(Fa);return p.jsx(Tj,{...e,layoutGroup:r,switchLayoutGroup:T.useContext(Dv),isPresent:t,safeToRemove:n})}const Pj={borderRadius:{...Gr,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Gr,borderTopRightRadius:Gr,borderBottomLeftRadius:Gr,borderBottomRightRadius:Gr,boxShadow:Ej};function jx(e,t,n){const r=Ce(e)?e:yt(e);return r.start(kl("",r,t,n)),r.animation}function Ix(e){return e instanceof SVGElement&&e.tagName!=="svg"}const Rj=(e,t)=>e.depth-t.depth;class Aj{constructor(){this.children=[],this.isDirty=!1}add(t){ul(this.children,t),this.isDirty=!0}remove(t){Es(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(Rj),this.isDirty=!1,this.children.forEach(t)}}function Nj(e,t){const n=vt.now(),r=({timestamp:o})=>{const s=o-n;s>=t&&(Ye(r),e(s-t))};return pe.read(r,!0),()=>Ye(r)}const Dx=["TopLeft","TopRight","BottomLeft","BottomRight"],Mj=Dx.length,kx=e=>typeof e=="string"?parseFloat(e):e,Ox=e=>typeof e=="number"||se.test(e);function _j(e,t,n,r,o,s){o?(e.opacity=ye(0,n.opacity!==void 0?n.opacity:1,jj(r)),e.opacityExit=ye(t.opacity!==void 0?t.opacity:1,0,Ij(r))):s&&(e.opacity=ye(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let i=0;i<Mj;i++){const a=`border${Dx[i]}Radius`;let l=Lx(t,a),c=Lx(n,a);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||Ox(l)===Ox(c)?(e[a]=Math.max(ye(kx(l),kx(c),r),0),(gt.test(c)||gt.test(l))&&(e[a]+="%")):e[a]=c}(t.rotate||n.rotate)&&(e.rotate=ye(t.rotate||0,n.rotate||0,r))}function Lx(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const jj=Vx(0,.5,by),Ij=Vx(.5,.95,$e);function Vx(e,t,n){return r=>r<e?0:r>t?1:n(Vt(e,t,r))}function $x(e,t){e.min=t.min,e.max=t.max}function qe(e,t){$x(e.x,t.x),$x(e.y,t.y)}function Fx(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function Bx(e,t,n,r,o){return e-=t,e=Ms(e,1/n,r),o!==void 0&&(e=Ms(e,1/o,r)),e}function Dj(e,t=0,n=1,r=.5,o,s=e,i=e){if(gt.test(t)&&(t=parseFloat(t),t=ye(i.min,i.max,t/100)-i.min),typeof t!="number")return;let a=ye(s.min,s.max,r);e===s&&(a-=t),e.min=Bx(e.min,t,n,a,o),e.max=Bx(e.max,t,n,a,o)}function Wx(e,t,[n,r,o],s,i){Dj(e,t[n],t[r],t[o],t.scale,s,i)}const kj=["x","scaleX","originX"],Oj=["y","scaleY","originY"];function zx(e,t,n,r){Wx(e.x,t,kj,n?n.x:void 0,r?r.x:void 0),Wx(e.y,t,Oj,n?n.y:void 0,r?r.y:void 0)}function Hx(e){return e.translate===0&&e.scale===1}function Ux(e){return Hx(e.x)&&Hx(e.y)}function Gx(e,t){return e.min===t.min&&e.max===t.max}function Lj(e,t){return Gx(e.x,t.x)&&Gx(e.y,t.y)}function Kx(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Yx(e,t){return Kx(e.x,t.x)&&Kx(e.y,t.y)}function Xx(e){return Ue(e.x)/Ue(e.y)}function qx(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class Vj{constructor(){this.members=[]}add(t){ul(this.members,t),t.scheduleRender()}remove(t){if(Es(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(o=>t===o);if(n===0)return!1;let r;for(let o=n;o>=0;o--){const s=this.members[o];if(s.isPresent!==!1){r=s;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:o}=t.options;o===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function $j(e,t,n){let r="";const o=e.x.translate/t.x,s=e.y.translate/t.y,i=(n==null?void 0:n.z)||0;if((o||s||i)&&(r=`translate3d(${o}px, ${s}px, ${i}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:c,rotate:u,rotateX:f,rotateY:h,skewX:m,skewY:y}=n;c&&(r=`perspective(${c}px) ${r}`),u&&(r+=`rotate(${u}deg) `),f&&(r+=`rotateX(${f}deg) `),h&&(r+=`rotateY(${h}deg) `),m&&(r+=`skewX(${m}deg) `),y&&(r+=`skewY(${y}deg) `)}const a=e.x.scale*t.x,l=e.y.scale*t.y;return(a!==1||l!==1)&&(r+=`scale(${a}, ${l})`),r||"none"}const on={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},Kr=typeof window<"u"&&window.MotionDebug!==void 0,Hl=["","X","Y","Z"],Fj={visibility:"hidden"},Zx=1e3;let Bj=0;function Ul(e,t,n,r){const{latestValues:o}=t;o[e]&&(n[e]=o[e],t.setStaticValue(e,0),r&&(r[e]=0))}function Jx(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=py(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:o,layoutId:s}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",pe,!(o||s))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&Jx(r)}function Qx({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(i={},a=t==null?void 0:t()){this.id=Bj++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,Kr&&(on.totalNodes=on.resolvedTargetDeltas=on.recalculatedProjection=0),this.nodes.forEach(Hj),this.nodes.forEach(Xj),this.nodes.forEach(qj),this.nodes.forEach(Uj),Kr&&window.MotionDebug.record(on)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=i,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new Aj)}addEventListener(i,a){return this.eventHandlers.has(i)||this.eventHandlers.set(i,new dl),this.eventHandlers.get(i).add(a)}notifyListeners(i,...a){const l=this.eventHandlers.get(i);l&&l.notify(...a)}hasListeners(i){return this.eventHandlers.has(i)}mount(i,a=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=Ix(i),this.instance=i;const{layoutId:l,layout:c,visualElement:u}=this.options;if(u&&!u.current&&u.mount(i),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),a&&(c||l)&&(this.isLayoutDirty=!0),e){let f;const h=()=>this.root.updateBlockedByResize=!1;e(i,()=>{this.root.updateBlockedByResize=!0,f&&f(),f=Nj(h,250),js.hasAnimatedSinceResize&&(js.hasAnimatedSinceResize=!1,this.nodes.forEach(tb))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&u&&(l||c)&&this.addEventListener("didUpdate",({delta:f,hasLayoutChanged:h,hasRelativeTargetChanged:m,layout:y})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const g=this.options.transition||u.getDefaultTransition()||tI,{onLayoutAnimationStart:v,onLayoutAnimationComplete:x}=u.getProps(),b=!this.targetLayout||!Yx(this.targetLayout,y)||m,w=!h&&m;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||w||h&&(b||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(f,w);const S={...ol(g,"layout"),onPlay:v,onComplete:x};(u.shouldReduceMotion||this.options.layoutRoot)&&(S.delay=0,S.type=!1),this.startAnimation(S)}else h||tb(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=y})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const i=this.getStack();i&&i.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,Ye(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(Zj),this.animationId++)}getTransformTemplate(){const{visualElement:i}=this.options;return i&&i.getProps().transformTemplate}willUpdate(i=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Jx(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){const f=this.path[u];f.shouldResetTransform=!0,f.updateScroll("snapshot"),f.options.layoutRoot&&f.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const c=this.getTransformTemplate();this.prevTransformTemplateValue=c?c(this.latestValues,""):void 0,this.updateSnapshot(),i&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(eb);return}this.isUpdating||this.nodes.forEach(Kj),this.isUpdating=!1,this.nodes.forEach(Yj),this.nodes.forEach(Wj),this.nodes.forEach(zj),this.clearAllSnapshots();const a=vt.now();Ne.delta=mt(0,1e3/60,a-Ne.timestamp),Ne.timestamp=a,Ne.isProcessing=!0,za.update.process(Ne),za.preRender.process(Ne),za.render.process(Ne),Ne.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Ka.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Gj),this.sharedNodes.forEach(Jj)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,pe.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){pe.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const i=this.layout;this.layout=this.measure(!1),this.layoutCorrected=Ee(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,i?i.layoutBox:void 0)}updateScroll(i="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===i&&(a=!1),a){const l=r(this.instance);this.scroll={animationId:this.root.animationId,phase:i,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!o)return;const i=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!Ux(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;i&&(a||rn(this.latestValues)||u)&&(o(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(i=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return i&&(l=this.removeTransform(l)),nI(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var i;const{visualElement:a}=this.options;if(!a)return Ee();const l=a.measureViewportBox();if(!(((i=this.scroll)===null||i===void 0?void 0:i.wasRoot)||this.path.some(rI))){const{scroll:u}=this.root;u&&(Bn(l.x,u.offset.x),Bn(l.y,u.offset.y))}return l}removeElementScroll(i){var a;const l=Ee();if(qe(l,i),!((a=this.scroll)===null||a===void 0)&&a.wasRoot)return l;for(let c=0;c<this.path.length;c++){const u=this.path[c],{scroll:f,options:h}=u;u!==this.root&&f&&h.layoutScroll&&(f.wasRoot&&qe(l,i),Bn(l.x,f.offset.x),Bn(l.y,f.offset.y))}return l}applyTransform(i,a=!1){const l=Ee();qe(l,i);for(let c=0;c<this.path.length;c++){const u=this.path[c];!a&&u.options.layoutScroll&&u.scroll&&u!==u.root&&Wn(l,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),rn(u.latestValues)&&Wn(l,u.latestValues)}return rn(this.latestValues)&&Wn(l,this.latestValues),l}removeTransform(i){const a=Ee();qe(a,i);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!rn(c.latestValues))continue;Wl(c.latestValues)&&c.updateSnapshot();const u=Ee(),f=c.measurePageBox();qe(u,f),zx(a,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return rn(this.latestValues)&&zx(a,this.latestValues),a}setTargetDelta(i){this.targetDelta=i,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(i){this.options={...this.options,...i,crossfade:i.crossfade!==void 0?i.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Ne.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(i=!1){var a;const l=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=l.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=l.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=l.isSharedProjectionDirty);const c=!!this.resumingFrom||this!==l;if(!(i||c&&this.isSharedProjectionDirty||this.isProjectionDirty||!((a=this.parent)===null||a===void 0)&&a.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:f,layoutId:h}=this.options;if(!(!this.layout||!(f||h))){if(this.resolvedRelativeTargetAt=Ne.timestamp,!this.targetDelta&&!this.relativeTarget){const m=this.getClosestProjectingParent();m&&m.layout&&this.animationProgress!==1?(this.relativeParent=m,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Ee(),this.relativeTargetOrigin=Ee(),Ur(this.relativeTargetOrigin,this.layout.layoutBox,m.layout.layoutBox),qe(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=Ee(),this.targetWithTransforms=Ee()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),lj(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):qe(this.target,this.layout.layoutBox),Cx(this.target,this.targetDelta)):qe(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const m=this.getClosestProjectingParent();m&&!!m.resumingFrom==!!this.resumingFrom&&!m.options.layoutScroll&&m.target&&this.animationProgress!==1?(this.relativeParent=m,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Ee(),this.relativeTargetOrigin=Ee(),Ur(this.relativeTargetOrigin,this.target,m.target),qe(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}Kr&&on.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||Wl(this.parent.latestValues)||bx(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var i;const a=this.getLead(),l=!!this.resumingFrom||this!==a;let c=!0;if((this.isProjectionDirty||!((i=this.parent)===null||i===void 0)&&i.isProjectionDirty)&&(c=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===Ne.timestamp&&(c=!1),c)return;const{layout:u,layoutId:f}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||f))return;qe(this.layoutCorrected,this.layout.layoutBox);const h=this.treeScale.x,m=this.treeScale.y;vj(this.layoutCorrected,this.treeScale,this.path,l),a.layout&&!a.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(a.target=a.layout.layoutBox,a.targetWithTransforms=Ee());const{target:y}=a;if(!y){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Fx(this.prevProjectionDelta.x,this.projectionDelta.x),Fx(this.prevProjectionDelta.y,this.projectionDelta.y)),Hr(this.projectionDelta,this.layoutCorrected,y,this.latestValues),(this.treeScale.x!==h||this.treeScale.y!==m||!qx(this.projectionDelta.x,this.prevProjectionDelta.x)||!qx(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",y)),Kr&&on.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(i=!0){var a;if((a=this.options.visualElement)===null||a===void 0||a.scheduleRender(),i){const l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Fn(),this.projectionDelta=Fn(),this.projectionDeltaWithTransform=Fn()}setAnimationOrigin(i,a=!1){const l=this.snapshot,c=l?l.latestValues:{},u={...this.latestValues},f=Fn();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const h=Ee(),m=l?l.source:void 0,y=this.layout?this.layout.source:void 0,g=m!==y,v=this.getStack(),x=!v||v.members.length<=1,b=!!(g&&!x&&this.options.crossfade===!0&&!this.path.some(eI));this.animationProgress=0;let w;this.mixTargetDelta=S=>{const C=S/1e3;nb(f.x,i.x,C),nb(f.y,i.y,C),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Ur(h,this.layout.layoutBox,this.relativeParent.layout.layoutBox),Qj(this.relativeTarget,this.relativeTargetOrigin,h,C),w&&Lj(this.relativeTarget,w)&&(this.isProjectionDirty=!1),w||(w=Ee()),qe(w,this.relativeTarget)),g&&(this.animationValues=u,_j(u,c,this.latestValues,C,b,x)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=C},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(i){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Ye(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=pe.update(()=>{js.hasAnimatedSinceResize=!0,this.currentAnimation=jx(0,Zx,{...i,onUpdate:a=>{this.mixTargetDelta(a),i.onUpdate&&i.onUpdate(a)},onComplete:()=>{i.onComplete&&i.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const i=this.getStack();i&&i.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Zx),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const i=this.getLead();let{targetWithTransforms:a,target:l,layout:c,latestValues:u}=i;if(!(!a||!l||!c)){if(this!==i&&this.layout&&c&&ab(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||Ee();const f=Ue(this.layout.layoutBox.x);l.x.min=i.target.x.min,l.x.max=l.x.min+f;const h=Ue(this.layout.layoutBox.y);l.y.min=i.target.y.min,l.y.max=l.y.min+h}qe(a,l),Wn(a,u),Hr(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(i,a){this.sharedNodes.has(i)||this.sharedNodes.set(i,new Vj),this.sharedNodes.get(i).add(a);const c=a.options.initialPromotionConfig;a.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(a):void 0})}isLead(){const i=this.getStack();return i?i.lead===this:!0}getLead(){var i;const{layoutId:a}=this.options;return a?((i=this.getStack())===null||i===void 0?void 0:i.lead)||this:this}getPrevLead(){var i;const{layoutId:a}=this.options;return a?(i=this.getStack())===null||i===void 0?void 0:i.prevLead:void 0}getStack(){const{layoutId:i}=this.options;if(i)return this.root.sharedNodes.get(i)}promote({needsReset:i,transition:a,preserveFollowOpacity:l}={}){const c=this.getStack();c&&c.promote(this,l),i&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const i=this.getStack();return i?i.relegate(this):!1}resetSkewAndRotation(){const{visualElement:i}=this.options;if(!i)return;let a=!1;const{latestValues:l}=i;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const c={};l.z&&Ul("z",i,c,this.animationValues);for(let u=0;u<Hl.length;u++)Ul(`rotate${Hl[u]}`,i,c,this.animationValues),Ul(`skew${Hl[u]}`,i,c,this.animationValues);i.render();for(const u in c)i.setStaticValue(u,c[u]),this.animationValues&&(this.animationValues[u]=c[u]);i.scheduleRender()}getProjectionStyles(i){var a,l;if(!this.instance||this.isSVG)return;if(!this.isVisible)return Fj;const c={visibility:""},u=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,c.opacity="",c.pointerEvents=ms(i==null?void 0:i.pointerEvents)||"",c.transform=u?u(this.latestValues,""):"none",c;const f=this.getLead();if(!this.projectionDelta||!this.layout||!f.target){const g={};return this.options.layoutId&&(g.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,g.pointerEvents=ms(i==null?void 0:i.pointerEvents)||""),this.hasProjected&&!rn(this.latestValues)&&(g.transform=u?u({},""):"none",this.hasProjected=!1),g}const h=f.animationValues||f.latestValues;this.applyTransformsToTarget(),c.transform=$j(this.projectionDeltaWithTransform,this.treeScale,h),u&&(c.transform=u(h,c.transform));const{x:m,y}=this.projectionDelta;c.transformOrigin=`${m.origin*100}% ${y.origin*100}% 0`,f.animationValues?c.opacity=f===this?(l=(a=h.opacity)!==null&&a!==void 0?a:this.latestValues.opacity)!==null&&l!==void 0?l:1:this.preserveOpacity?this.latestValues.opacity:h.opacityExit:c.opacity=f===this?h.opacity!==void 0?h.opacity:"":h.opacityExit!==void 0?h.opacityExit:0;for(const g in vs){if(h[g]===void 0)continue;const{correct:v,applyTo:x}=vs[g],b=c.transform==="none"?h[g]:v(h[g],f);if(x){const w=x.length;for(let S=0;S<w;S++)c[x[S]]=b}else c[g]=b}return this.options.layoutId&&(c.pointerEvents=f===this?ms(i==null?void 0:i.pointerEvents)||"":"none"),c}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(i=>{var a;return(a=i.currentAnimation)===null||a===void 0?void 0:a.stop()}),this.root.nodes.forEach(eb),this.root.sharedNodes.clear()}}}function Wj(e){e.updateLayout()}function zj(e){var t;const n=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:o}=e.layout,{animationType:s}=e.options,i=n.source!==e.layout.source;s==="size"?Xe(f=>{const h=i?n.measuredBox[f]:n.layoutBox[f],m=Ue(h);h.min=r[f].min,h.max=h.min+m}):ab(s,n.layoutBox,r)&&Xe(f=>{const h=i?n.measuredBox[f]:n.layoutBox[f],m=Ue(r[f]);h.max=h.min+m,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[f].max=e.relativeTarget[f].min+m)});const a=Fn();Hr(a,r,n.layoutBox);const l=Fn();i?Hr(l,e.applyTransform(o,!0),n.measuredBox):Hr(l,r,n.layoutBox);const c=!Ux(a);let u=!1;if(!e.resumeFrom){const f=e.getClosestProjectingParent();if(f&&!f.resumeFrom){const{snapshot:h,layout:m}=f;if(h&&m){const y=Ee();Ur(y,n.layoutBox,h.layoutBox);const g=Ee();Ur(g,r,m.layoutBox),Yx(y,g)||(u=!0),f.options.layoutRoot&&(e.relativeTarget=g,e.relativeTargetOrigin=y,e.relativeParent=f)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:l,layoutDelta:a,hasLayoutChanged:c,hasRelativeTargetChanged:u})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function Hj(e){Kr&&on.totalNodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function Uj(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function Gj(e){e.clearSnapshot()}function eb(e){e.clearMeasurements()}function Kj(e){e.isLayoutDirty=!1}function Yj(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function tb(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function Xj(e){e.resolveTargetDelta()}function qj(e){e.calcProjection()}function Zj(e){e.resetSkewAndRotation()}function Jj(e){e.removeLeadSnapshot()}function nb(e,t,n){e.translate=ye(t.translate,0,n),e.scale=ye(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function rb(e,t,n,r){e.min=ye(t.min,n.min,r),e.max=ye(t.max,n.max,r)}function Qj(e,t,n,r){rb(e.x,t.x,n.x,r),rb(e.y,t.y,n.y,r)}function eI(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const tI={duration:.45,ease:[.4,0,.1,1]},ob=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),sb=ob("applewebkit/")&&!ob("chrome/")?Math.round:$e;function ib(e){e.min=sb(e.min),e.max=sb(e.max)}function nI(e){ib(e.x),ib(e.y)}function ab(e,t,n){return e==="position"||e==="preserve-aspect"&&!aj(Xx(t),Xx(n),.2)}function rI(e){var t;return e!==e.root&&((t=e.scroll)===null||t===void 0?void 0:t.wasRoot)}const oI=Qx({attachResizeListener:(e,t)=>Br(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Gl={current:void 0},lb=Qx({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Gl.current){const e=new oI({});e.mount(window),e.setOptions({layoutScroll:!0}),Gl.current=e}return Gl.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),sI={pan:{Feature:Cj},drag:{Feature:Sj,ProjectionNode:lb,MeasureLayout:_x}};function cb(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const o="onHover"+n,s=r[o];s&&pe.postRender(()=>s(t,Wr(t)))}class iI extends Bt{mount(){const{current:t}=this.node;t&&(this.unmount=d1(t,n=>(cb(this.node,n,"Start"),r=>cb(this.node,r,"End"))))}unmount(){}}class aI extends Bt{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Fr(Br(this.node.current,"focus",()=>this.onFocus()),Br(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function ub(e,t,n){const{props:r}=e;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const o="onTap"+(n==="End"?"":n),s=r[o];s&&pe.postRender(()=>s(t,Wr(t)))}class lI extends Bt{mount(){const{current:t}=this.node;t&&(this.unmount=m1(t,n=>(ub(this.node,n,"Start"),(r,{success:o})=>ub(this.node,r,o?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Kl=new WeakMap,Yl=new WeakMap,cI=e=>{const t=Kl.get(e.target);t&&t(e)},uI=e=>{e.forEach(cI)};function dI({root:e,...t}){const n=e||document;Yl.has(n)||Yl.set(n,{});const r=Yl.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(uI,{root:e,...t})),r[o]}function fI(e,t,n){const r=dI(t);return Kl.set(e,n),r.observe(e),()=>{Kl.delete(e),r.unobserve(e)}}const pI={some:0,all:1};class hI extends Bt{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:o="some",once:s}=t,i={root:n?n.current:void 0,rootMargin:r,threshold:typeof o=="number"?o:pI[o]},a=l=>{const{isIntersecting:c}=l;if(this.isInView===c||(this.isInView=c,s&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:u,onViewportLeave:f}=this.node.getProps(),h=c?u:f;h&&h(l)};return fI(this.node.current,i,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(mI(t,n))&&this.startObserver()}unmount(){}}function mI({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const gI={inView:{Feature:hI},tap:{Feature:lI},focus:{Feature:aI},hover:{Feature:iI}},vI={layout:{ProjectionNode:lb,MeasureLayout:_x}},Xl={current:null},db={current:!1};function yI(){if(db.current=!0,!!Ba)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Xl.current=e.matches;e.addListener(t),t()}else Xl.current=!1}const xI=[...Vy,ke,Ft],bI=e=>xI.find(Ly(e)),zn=new WeakMap;function wI(e,t,n){for(const r in t){const o=t[r],s=n[r];if(Ce(o))e.addValue(r,o),process.env.NODE_ENV==="development"&&Mr(o.version==="11.18.2",`Attempting to mix Motion versions ${o.version} with 11.18.2 may not work as expected.`);else if(Ce(s))e.addValue(r,yt(o,{owner:e}));else if(s!==o)if(e.hasValue(r)){const i=e.getValue(r);i.liveStyle===!0?i.jump(o):i.hasAnimated||i.set(o)}else{const i=e.getStaticValue(r);e.addValue(r,yt(i!==void 0?i:o,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const fb=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class pb{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:o,blockInitialAnimation:s,visualState:i},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=El,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const m=vt.now();this.renderScheduledAt<m&&(this.renderScheduledAt=m,pe.render(this.render,!1,!0))};const{latestValues:l,renderState:c,onUpdate:u}=i;this.onUpdate=u,this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=c,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=o,this.options=a,this.blockInitialAnimation=!!s,this.isControllingVariants=hs(n),this.isVariantNode=_v(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:f,...h}=this.scrapeMotionValuesFromProps(n,{},this);for(const m in h){const y=h[m];l[m]!==void 0&&Ce(y)&&y.set(l[m],!1)}}mount(t){this.current=t,zn.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,r)=>this.bindToMotionValue(r,n)),db.current||yI(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Xl.current,process.env.NODE_ENV!=="production"&&Mr(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected."),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){zn.delete(this.current),this.projection&&this.projection.unmount(),Ye(this.notifyUpdate),Ye(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=Qt.has(t),o=n.on("change",a=>{this.latestValues[t]=a,this.props.onUpdate&&pe.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),s=n.on("renderRequest",this.scheduleRender);let i;window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{o(),s(),i&&i(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in Dn){const n=Dn[t];if(!n)continue;const{isEnabled:r,Feature:o}=n;if(!this.features[t]&&o&&r(this.props)&&(this.features[t]=new o(this)),this.features[t]){const s=this.features[t];s.isMounted?s.update():(s.mount(),s.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Ee()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<fb.length;r++){const o=fb[r];this.propEventSubscriptions[o]&&(this.propEventSubscriptions[o](),delete this.propEventSubscriptions[o]);const s="on"+o,i=t[s];i&&(this.propEventSubscriptions[o]=this.on(o,i))}this.prevMotionValues=wI(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue(),this.onUpdate&&this.onUpdate(this)}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=yt(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){var r;let o=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(r=this.getBaseTargetFromProps(this.props,t))!==null&&r!==void 0?r:this.readValueFromInstance(this.current,t,this.options);return o!=null&&(typeof o=="string"&&(ky(o)||Sy(o))?o=parseFloat(o):!bI(o)&&Ft.test(n)&&(o=Ny(t,n)),this.setBaseTarget(t,Ce(o)?o.get():o)),Ce(o)?o.get():o}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:r}=this.props;let o;if(typeof r=="string"||typeof r=="object"){const i=Xa(this.props,r,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);i&&(o=i[t])}if(r&&o!==void 0)return o;const s=this.getBaseTargetFromProps(this.props,t);return s!==void 0&&!Ce(s)?s:this.initialValues[t]!==void 0&&o===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new dl),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class hb extends pb{constructor(){super(...arguments),this.KeyframeResolver=Fy}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;Ce(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function SI(e){return window.getComputedStyle(e)}class mb extends hb{constructor(){super(...arguments),this.type="html",this.renderInstance=Uv}readValueFromInstance(t,n){if(Qt.has(n)){const r=wl(n);return r&&r.default||0}else{const r=SI(t),o=($v(n)?r.getPropertyValue(n):r[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return Rx(t,n)}build(t,n,r){Qa(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return rl(t,n,r)}}class gb extends hb{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Ee}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Qt.has(n)){const r=wl(n);return r&&r.default||0}return n=Gv.has(n)?n:Ga(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return Xv(t,n,r)}build(t,n,r){el(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,o){Kv(t,n,r,o)}mount(t){this.isSVGTag=nl(t.tagName),super.mount(t)}}const CI=(e,t)=>Ya(e)?new gb(t):new mb(t,{allowProjection:e!==T.Fragment}),EI=i1({...J_,...gI,...sI,...vI},CI),ce=SM(EI);function TI(e,t,n){T.useInsertionEffect(()=>e.on(t,n),[e,t,n])}function vb(e,t){let n;const r=()=>{const{currentTime:o}=t,i=(o===null?0:o.value)/100;n!==i&&e(i),n=i};return pe.update(r,!0),()=>Ye(r)}const Is=new WeakMap;let Wt;function PI(e,t){if(t){const{inlineSize:n,blockSize:r}=t[0];return{width:n,height:r}}else return e instanceof SVGElement&&"getBBox"in e?e.getBBox():{width:e.offsetWidth,height:e.offsetHeight}}function RI({target:e,contentRect:t,borderBoxSize:n}){var r;(r=Is.get(e))===null||r===void 0||r.forEach(o=>{o({target:e,contentSize:t,get size(){return PI(e,n)}})})}function AI(e){e.forEach(RI)}function NI(){typeof ResizeObserver>"u"||(Wt=new ResizeObserver(AI))}function MI(e,t){Wt||NI();const n=Ss(e);return n.forEach(r=>{let o=Is.get(r);o||(o=new Set,Is.set(r,o)),o.add(t),Wt==null||Wt.observe(r)}),()=>{n.forEach(r=>{const o=Is.get(r);o==null||o.delete(t),o!=null&&o.size||Wt==null||Wt.unobserve(r)})}}const Ds=new Set;let Yr;function _I(){Yr=()=>{const e={width:window.innerWidth,height:window.innerHeight},t={target:window,size:e,contentSize:e};Ds.forEach(n=>n(t))},window.addEventListener("resize",Yr)}function jI(e){return Ds.add(e),Yr||_I(),()=>{Ds.delete(e),!Ds.size&&Yr&&(Yr=void 0)}}function II(e,t){return typeof e=="function"?jI(e):MI(e,t)}const DI=50,yb=()=>({current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0}),kI=()=>({time:0,x:yb(),y:yb()}),OI={x:{length:"Width",position:"Left"},y:{length:"Height",position:"Top"}};function xb(e,t,n,r){const o=n[t],{length:s,position:i}=OI[t],a=o.current,l=n.time;o.current=e[`scroll${i}`],o.scrollLength=e[`scroll${s}`]-e[`client${s}`],o.offset.length=0,o.offset[0]=0,o.offset[1]=o.scrollLength,o.progress=Vt(0,o.scrollLength,o.current);const c=r-l;o.velocity=c>DI?0:fl(o.current-a,c)}function LI(e,t,n){xb(e,"x",t,n),xb(e,"y",t,n),t.time=n}function VI(e,t){const n={x:0,y:0};let r=e;for(;r&&r!==t;)if(r instanceof HTMLElement)n.x+=r.offsetLeft,n.y+=r.offsetTop,r=r.offsetParent;else if(r.tagName==="svg"){const o=r.getBoundingClientRect();r=r.parentElement;const s=r.getBoundingClientRect();n.x+=o.left-s.left,n.y+=o.top-s.top}else if(r instanceof SVGGraphicsElement){const{x:o,y:s}=r.getBBox();n.x+=o,n.y+=s;let i=null,a=r.parentNode;for(;!i;)a.tagName==="svg"&&(i=a),a=r.parentNode;r=i}else break;return n}const ql={start:0,center:.5,end:1};function bb(e,t,n=0){let r=0;if(e in ql&&(e=ql[e]),typeof e=="string"){const o=parseFloat(e);e.endsWith("px")?r=o:e.endsWith("%")?e=o/100:e.endsWith("vw")?r=o/100*document.documentElement.clientWidth:e.endsWith("vh")?r=o/100*document.documentElement.clientHeight:e=o}return typeof e=="number"&&(r=t*e),n+r}const $I=[0,0];function FI(e,t,n,r){let o=Array.isArray(e)?e:$I,s=0,i=0;return typeof e=="number"?o=[e,e]:typeof e=="string"&&(e=e.trim(),e.includes(" ")?o=e.split(" "):o=[e,ql[e]?e:"0"]),s=bb(o[0],n,r),i=bb(o[1],t),s-i}const BI={All:[[0,0],[1,1]]},WI={x:0,y:0};function zI(e){return"getBBox"in e&&e.tagName!=="svg"?e.getBBox():{width:e.clientWidth,height:e.clientHeight}}function HI(e,t,n){const{offset:r=BI.All}=n,{target:o=e,axis:s="y"}=n,i=s==="y"?"height":"width",a=o!==e?VI(o,e):WI,l=o===e?{width:e.scrollWidth,height:e.scrollHeight}:zI(o),c={width:e.clientWidth,height:e.clientHeight};t[s].offset.length=0;let u=!t[s].interpolate;const f=r.length;for(let h=0;h<f;h++){const m=FI(r[h],c[i],l[i],a[s]);!u&&m!==t[s].interpolatorOffsets[h]&&(u=!0),t[s].offset[h]=m}u&&(t[s].interpolate=Il(t[s].offset,Dl(r),{clamp:!1}),t[s].interpolatorOffsets=[...t[s].offset]),t[s].progress=mt(0,1,t[s].interpolate(t[s].current))}function UI(e,t=e,n){if(n.x.targetOffset=0,n.y.targetOffset=0,t!==e){let r=t;for(;r&&r!==e;)n.x.targetOffset+=r.offsetLeft,n.y.targetOffset+=r.offsetTop,r=r.offsetParent}n.x.targetLength=t===e?t.scrollWidth:t.clientWidth,n.y.targetLength=t===e?t.scrollHeight:t.clientHeight,n.x.containerLength=e.clientWidth,n.y.containerLength=e.clientHeight,process.env.NODE_ENV!=="production"&&e&&t&&t!==e&&Mr(getComputedStyle(e).position!=="static","Please ensure that the container has a non-static position, like 'relative', 'fixed', or 'absolute' to ensure scroll offset is calculated correctly.")}function GI(e,t,n,r={}){return{measure:()=>UI(e,r.target,n),update:o=>{LI(e,n,o),(r.offset||r.target)&&HI(e,n,r)},notify:()=>t(n)}}const Xr=new WeakMap,wb=new WeakMap,Zl=new WeakMap,Sb=e=>e===document.documentElement?window:e;function Jl(e,{container:t=document.documentElement,...n}={}){let r=Zl.get(t);r||(r=new Set,Zl.set(t,r));const o=kI(),s=GI(t,e,o,n);if(r.add(s),!Xr.has(t)){const a=()=>{for(const h of r)h.measure()},l=()=>{for(const h of r)h.update(Ne.timestamp)},c=()=>{for(const h of r)h.notify()},u=()=>{pe.read(a,!1,!0),pe.read(l,!1,!0),pe.update(c,!1,!0)};Xr.set(t,u);const f=Sb(t);window.addEventListener("resize",u,{passive:!0}),t!==document.documentElement&&wb.set(t,II(t,u)),f.addEventListener("scroll",u,{passive:!0})}const i=Xr.get(t);return pe.read(i,!1,!0),()=>{var a;Ye(i);const l=Zl.get(t);if(!l||(l.delete(s),l.size))return;const c=Xr.get(t);Xr.delete(t),c&&(Sb(t).removeEventListener("scroll",c),(a=wb.get(t))===null||a===void 0||a(),window.removeEventListener("resize",c))}}function KI({source:e,container:t,axis:n="y"}){e&&(t=e);const r={value:0},o=Jl(s=>{r.value=s[n].progress*100},{container:t,axis:n});return{currentTime:r,cancel:o}}const Ql=new Map;function Cb({source:e,container:t=document.documentElement,axis:n="y"}={}){e&&(t=e),Ql.has(t)||Ql.set(t,{});const r=Ql.get(t);return r[n]||(r[n]=Qv()?new ScrollTimeline({source:t,axis:n}):KI({source:t,axis:n})),r[n]}function YI(e){return e.length===2}function Eb(e){return e&&(e.target||e.offset)}function XI(e,t){return YI(e)||Eb(t)?Jl(n=>{e(n[t.axis].progress,n)},t):vb(e,Cb(t))}function qI(e,t){if(e.flatten(),Eb(t))return e.pause(),Jl(n=>{e.time=e.duration*n[t.axis].progress},t);{const n=Cb(t);return e.attachTimeline?e.attachTimeline(n,r=>(r.pause(),vb(o=>{r.time=r.duration*o},n))):$e}}function ZI(e,{axis:t="y",...n}={}){const r={axis:t,...n};return typeof e=="function"?XI(e,r):qI(e,r)}function Tb(e,t){Jt(!!(!t||t.current),`You have defined a ${e} options but the provided ref is not yet hydrated, probably because it's defined higher up the tree. Try calling useScroll() in the same component as the ref, or setting its \`layoutEffect: false\` option.`)}const JI=()=>({scrollX:yt(0),scrollY:yt(0),scrollXProgress:yt(0),scrollYProgress:yt(0)});function Pb({container:e,target:t,layoutEffect:n=!0,...r}={}){const o=Lt(JI);return(n?Nr:T.useEffect)(()=>(Tb("target",t),Tb("container",e),ZI((i,{x:a,y:l})=>{o.scrollX.set(a.current),o.scrollXProgress.set(a.progress),o.scrollY.set(l.current),o.scrollYProgress.set(l.progress)},{...r,container:(e==null?void 0:e.current)||void 0,target:(t==null?void 0:t.current)||void 0})),[e,t,JSON.stringify(r.offset)]),o}function zt(e){const t=Lt(()=>yt(e)),{isStatic:n}=T.useContext(In);if(n){const[,r]=T.useState(e);T.useEffect(()=>t.on("change",r),[])}return t}function ec(e,t){const n=zt(t()),r=()=>n.set(t());return r(),Nr(()=>{const o=()=>pe.preRender(r,!1,!0),s=e.map(i=>i.on("change",o));return()=>{s.forEach(i=>i()),Ye(r)}}),n}function tc(e,...t){const n=e.length;function r(){let o="";for(let s=0;s<n;s++){o+=e[s];const i=t[s];i&&(o+=Ce(i)?i.get():i)}return o}return ec(t.filter(Ce),r)}function Rb(e){return typeof e=="number"?e:parseFloat(e)}function qr(e,t={}){const{isStatic:n}=T.useContext(In),r=T.useRef(null),o=zt(Ce(e)?Rb(e.get()):e),s=T.useRef(o.get()),i=T.useRef(()=>{}),a=()=>{const c=r.current;c&&c.time===0&&c.sample(Ne.delta),l(),r.current=T_({keyframes:[o.get(),s.current],velocity:o.getVelocity(),type:"spring",restDelta:.001,restSpeed:.01,...t,onUpdate:i.current})},l=()=>{r.current&&r.current.stop()};return T.useInsertionEffect(()=>o.attach((c,u)=>n?u(c):(s.current=c,i.current=u,pe.update(a),o.get()),l),[JSON.stringify(t)]),Nr(()=>{if(Ce(e))return e.on("change",c=>o.set(Rb(c)))},[o]),o}function QI(e){const t=T.useRef(0),{isStatic:n}=T.useContext(In);T.useEffect(()=>{if(n)return;const r=({timestamp:o,delta:s})=>{t.current||(t.current=o),e(o-t.current,s)};return pe.update(r,!0),()=>Ye(r)},[e])}const eD=e=>e&&typeof e=="object"&&e.mix,tD=e=>eD(e)?e.mix:void 0;function nD(...e){const t=!Array.isArray(e[0]),n=t?0:-1,r=e[0+n],o=e[1+n],s=e[2+n],i=e[3+n],a=Il(o,s,{mixer:tD(s[0]),...i});return t?a(r):a}function rD(e){Or.current=[],e();const t=ec(Or.current,e);return Or.current=void 0,t}function sn(e,t,n,r){if(typeof e=="function")return rD(e);const o=typeof t=="function"?t:nD(t,n,r);return Array.isArray(e)?Ab(e,o):Ab([e],([s])=>o(s))}function Ab(e,t){const n=Lt(()=>[]);return ec(e,()=>{n.length=0;const r=e.length;for(let o=0;o<r;o++)n[o]=e[o].get();return t(n)})}function oD(e){return T.useEffect(()=>()=>e(),[])}const sD=(e,t,n)=>{const r=t-e;return((n-e)%r+r)%r+e};function Nb(e,t){return Zy(e)?e[sD(0,e.length,t)]:e}function nc(e){return typeof e=="object"&&!Array.isArray(e)}function Mb(e,t,n,r){return typeof e=="string"&&nc(t)?Ss(e,n,r):e instanceof NodeList?Array.from(e):Array.isArray(e)?e:[e]}function iD(e,t,n){return e*(t+1)}function _b(e,t,n,r){var o;return typeof t=="number"?t:t.startsWith("-")||t.startsWith("+")?Math.max(0,e+parseFloat(t)):t==="<"?n:(o=r.get(t))!==null&&o!==void 0?o:e}function aD(e,t,n){for(let r=0;r<e.length;r++){const o=e[r];o.at>t&&o.at<n&&(Es(e,o),r--)}}function lD(e,t,n,r,o,s){aD(e,o,s);for(let i=0;i<t.length;i++)e.push({value:t[i],at:ye(o,s,r[i]),easing:Nb(n,i)})}function cD(e,t){for(let n=0;n<e.length;n++)e[n]=e[n]/(t+1)}function uD(e,t){return e.at===t.at?e.value===null?1:t.value===null?-1:0:e.at-t.at}const dD="easeInOut",fD=20;function pD(e,{defaultTransition:t={},...n}={},r,o){const s=t.duration||.3,i=new Map,a=new Map,l={},c=new Map;let u=0,f=0,h=0;for(let m=0;m<e.length;m++){const y=e[m];if(typeof y=="string"){c.set(y,f);continue}else if(!Array.isArray(y)){c.set(y.name,_b(f,y.at,u,c));continue}let[g,v,x={}]=y;x.at!==void 0&&(f=_b(f,x.at,u,c));let b=0;const w=(S,C,R,A=0,N=0)=>{const _=hD(S),{delay:k=0,times:O=Dl(_),type:L="keyframes",repeat:G,repeatType:j,repeatDelay:X=0,...U}=C;let{ease:z=t.ease||"easeOut",duration:V}=C;const $=typeof k=="function"?k(A,N):k,oe=_.length,ie=bs(L)?L:o==null?void 0:o[L];if(oe<=2&&ie){let K=100;if(oe===2&&vD(_)){const Q=_[1]-_[0];K=Math.abs(Q)}const te={...U};V!==void 0&&(te.duration=ot(V));const W=l1(te,K,ie);z=W.ease,V=W.duration}V??(V=s);const I=f+$;O.length===1&&O[0]===0&&(O[1]=1);const Y=O.length-_.length;if(Y>0&&Qy(O,Y),_.length===1&&_.unshift(null),G){pt(G<fD,"Repeat count too high, must be less than 20"),V=iD(V,G);const K=[..._],te=[...O];z=Array.isArray(z)?[...z]:[z];const W=[...z];for(let Q=0;Q<G;Q++){_.push(...K);for(let ee=0;ee<K.length;ee++)O.push(te[ee]+(Q+1)),z.push(ee===0?"linear":Nb(W,ee-1))}cD(O,G)}const J=I+V;lD(R,_,z,O,I,J),b=Math.max($+V,b),h=Math.max(J,h)};if(Ce(g)){const S=jb(g,a);w(v,x,Ib("default",S))}else{const S=Mb(g,v,r,l),C=S.length;for(let R=0;R<C;R++){v=v,x=x;const A=S[R],N=jb(A,a);for(const _ in v)w(v[_],mD(x,_),Ib(_,N),R,C)}}u=f,f+=b}return a.forEach((m,y)=>{for(const g in m){const v=m[g];v.sort(uD);const x=[],b=[],w=[];for(let C=0;C<v.length;C++){const{at:R,value:A,easing:N}=v[C];x.push(A),b.push(Vt(0,h,R)),w.push(N||"easeOut")}b[0]!==0&&(b.unshift(0),x.unshift(x[0]),w.unshift(dD)),b[b.length-1]!==1&&(b.push(1),x.push(null)),i.has(y)||i.set(y,{keyframes:{},transition:{}});const S=i.get(y);S.keyframes[g]=x,S.transition[g]={...t,duration:h,ease:w,times:b,...n}}}),i}function jb(e,t){return!t.has(e)&&t.set(e,{}),t.get(e)}function Ib(e,t){return t[e]||(t[e]=[]),t[e]}function hD(e){return Array.isArray(e)?e:[e]}function mD(e,t){return e&&e[t]?{...e,...e[t]}:{...e}}const gD=e=>typeof e=="number",vD=e=>e.every(gD);function yD(e,t){return e in t}class xD extends pb{constructor(){super(...arguments),this.type="object"}readValueFromInstance(t,n){if(yD(n,t)){const r=t[n];if(typeof r=="string"||typeof r=="number")return r}}getBaseTargetFromProps(){}removeValueFromRenderState(t,n){delete n.output[t]}measureInstanceViewportBox(){return Ee()}build(t,n){Object.assign(t.output,n)}renderInstance(t,{output:n}){Object.assign(t,n)}sortInstanceNodePosition(){return 0}}function bD(e){const t={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=Ix(e)?new gb(t):new mb(t);n.mount(e),zn.set(e,n)}function wD(e){const t={presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}},n=new xD(t);n.mount(e),zn.set(e,n)}function SD(e,t){return Ce(e)||typeof e=="number"||typeof e=="string"&&!nc(t)}function Db(e,t,n,r){const o=[];if(SD(e,t))o.push(jx(e,nc(t)&&t.default||t,n&&(n.default||n)));else{const s=Mb(e,t,r),i=s.length;pt(!!i,"No valid elements provided.");for(let a=0;a<i;a++){const l=s[a],c=l instanceof Element?bD:wD;zn.has(l)||c(l);const u=zn.get(l),f={...n};"delay"in f&&typeof f.delay=="function"&&(f.delay=f.delay(a,i)),o.push(...Ol(u,{...t,transition:f},{}))}}return o}function CD(e,t,n){const r=[];return pD(e,t,n,{spring:_l}).forEach(({keyframes:s,transition:i},a)=>{r.push(...Db(a,s,i))}),r}function ED(e){return Array.isArray(e)&&e.some(Array.isArray)}function TD(e){function t(n,r,o){let s=[];ED(n)?s=CD(n,r,e):s=Db(n,r,o,e);const i=new ey(s);return e&&e.animations.push(i),i}return t}function PD(){const e=Lt(()=>({current:null,animations:[]})),t=Lt(()=>TD(e));return oD(()=>{e.animations.forEach(n=>n.stop())}),[e,t]}const RD={some:0,all:1};function AD(e,t,{root:n,margin:r,amount:o="some"}={}){const s=Ss(e),i=new WeakMap,a=c=>{c.forEach(u=>{const f=i.get(u.target);if(u.isIntersecting!==!!f)if(u.isIntersecting){const h=t(u);typeof h=="function"?i.set(u.target,h):l.unobserve(u.target)}else typeof f=="function"&&(f(u),i.delete(u.target))})},l=new IntersectionObserver(a,{root:n,rootMargin:r,threshold:typeof o=="number"?o:RD[o]});return s.forEach(c=>l.observe(c)),()=>l.disconnect()}function ND(e,{root:t,margin:n,amount:r,once:o=!1}={}){const[s,i]=T.useState(!1);return T.useEffect(()=>{if(!e.current||o&&s)return;const a=()=>(i(!0),o?void 0:()=>i(!1)),l={root:t&&t.current||void 0,margin:n,amount:r};return AD(e.current,a,l)},[t,e,n,o,r]),s}function MD(e,t){if(e==="first")return 0;{const n=t-1;return e==="last"?n:n/2}}function _D(e=.1,{startDelay:t=0,from:n=0,ease:r}={}){return(o,s)=>{const i=typeof n=="number"?n:MD(n,s),a=Math.abs(i-o);let l=e*a;if(r){const c=s*e;l=jl(r)(l/c)*c}return t+l}}const jD=()=>p.jsx("div",{className:"flex h-[50vh] w-full items-center justify-center",children:p.jsx(ce.div,{animate:{scale:[1,1.2,1],rotate:[0,180,360],borderRadius:["20%","50%","20%"]},transition:{duration:2,ease:"easeInOut",repeat:1/0},className:"h-12 w-12 bg-primary/20 border-2 border-primary"})});function ID({value:e,className:t}){const n=qr(e,{mass:.8,stiffness:75,damping:15}),r=sn(n,o=>Math.round(o).toLocaleString());return T.useEffect(()=>{n.set(e)},[n,e]),p.jsx(ce.span,{className:M("font-mono",t),children:r})}const DD=({tabs:e,containerClassName:t,activeTabClassName:n,tabClassName:r,contentClassName:o})=>{const[s,i]=T.useState(e[0]),[a,l]=T.useState(e),c=h=>{const m=[...e],y=m.splice(h,1);m.unshift(y[0]),l(m),i(m[0])},[u,f]=T.useState(!1);return p.jsxs(p.Fragment,{children:[p.jsx("div",{className:M("flex flex-row items-center justify-start [perspective:1000px] relative overflow-auto sm:overflow-visible no-visible-scrollbar max-w-full w-full",t),children:e.map((h,m)=>p.jsxs("button",{onClick:()=>{c(m)},onMouseEnter:()=>f(!0),onMouseLeave:()=>f(!1),className:M("relative px-4 py-2 rounded-full",r),style:{transformStyle:"preserve-3d"},children:[s.value===h.value&&p.jsx(ce.div,{layoutId:"clickedbutton",transition:{type:"spring",bounce:.3,duration:.6},className:M("absolute inset-0 bg-gray-200 dark:bg-zinc-800 rounded-full ",n)}),p.jsx("span",{className:"relative block text-black dark:text-white",children:h.title})]},h.title))}),p.jsx(kb,{tabs:a,active:s,hovering:u,className:M("mt-32",o)},s.value)]})},kb=({className:e,tabs:t,hovering:n})=>{const r=o=>o.value===t[0].value;return p.jsx("div",{className:"relative w-full h-full",children:t.map((o,s)=>p.jsx(ce.div,{layoutId:o.value,style:{scale:1-s*.1,top:n?s*-50:0,zIndex:-s,opacity:s<3?1-s*.1:0},animate:{y:r(o)?[0,40,0]:0},className:M("w-full h-full absolute top-0 left-0",e),children:o.content},o.value))})},kD=({items:e})=>{const[t,n]=T.useState(null),r={stiffness:100,damping:5},o=zt(0),s=qr(sn(o,[-100,100],[-45,45]),r),i=qr(sn(o,[-100,100],[-50,50]),r),a=l=>{const c=l.target.offsetWidth/2;o.set(l.nativeEvent.offsetX-c)};return p.jsx(p.Fragment,{children:e.map(l=>p.jsxs("div",{className:"-mr-4 relative group",onMouseEnter:()=>n(l.id),onMouseLeave:()=>n(null),children:[p.jsx(cs,{mode:"popLayout",children:t===l.id&&p.jsxs(ce.div,{initial:{opacity:0,y:20,scale:.6},animate:{opacity:1,y:0,scale:1,transition:{type:"spring",stiffness:260,damping:10}},exit:{opacity:0,y:20,scale:.6},style:{translateX:i,rotate:s,whiteSpace:"nowrap"},className:"absolute -top-16 -left-1/2 translate-x-1/2 flex text-xs flex-col items-center justify-center rounded-md bg-black z-50 shadow-xl px-4 py-2",children:[p.jsx("div",{className:"absolute inset-x-10 z-30 w-[20%] -bottom-px bg-gradient-to-r from-transparent via-emerald-500 to-transparent h-px "}),p.jsx("div",{className:"absolute left-10 w-[40%] z-30 -bottom-px bg-gradient-to-r from-transparent via-sky-500 to-transparent h-px "}),p.jsx("div",{className:"font-bold text-white relative z-30 text-base",children:l.name}),p.jsx("div",{className:"text-white text-xs",children:l.designation})]})}),p.jsx("img",{onMouseMove:a,height:100,width:100,src:l.image,alt:l.name,className:"object-cover !m-0 !p-0 object-top rounded-full h-14 w-14 border-2 group-hover:scale-105 group-hover:z-30 border-white relative transition duration-500"})]},l.name))})},Ob=({className:e,...t})=>{const n=new Array(150).fill(1),r=new Array(100).fill(1);let o=["--sky-300","--pink-300","--green-300","--yellow-300","--red-300","--purple-300","--blue-300","--indigo-300","--violet-300"];const s=()=>o[Math.floor(Math.random()*o.length)];return p.jsx("div",{style:{transform:"translate(-40%,-60%) skewX(-48deg) skewY(14deg) scale(0.675) rotate(0deg) translateZ(0)"},className:M("absolute left-1/4 p-4 -top-1/4 flex -translate-x-1/2 -translate-y-1/2 w-full h-full z-0 ",e),...t,children:n.map((i,a)=>p.jsx(ce.div,{className:"w-16 h-8 border-l border-slate-200 dark:border-slate-700 relative",children:r.map((l,c)=>p.jsx(ce.div,{whileHover:{backgroundColor:`var(${s()})`,transition:{duration:0}},animate:{transition:{duration:2}},className:"w-16 h-8 border-r border-t border-slate-200 dark:border-slate-700 relative",children:c%2===0&&a%2===0?p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",className:"absolute h-6 w-10 -top-[14px] -left-[22px] text-slate-300 dark:text-slate-700 stroke-[1px] pointer-events-none",children:p.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 6v12m6-6H6"})}):null},"col"+c))},"row"+a))})},OD=T.memo(Ob),LD=({animationSpeed:e=.4,opacities:t=[.3,.3,.3,.5,.5,.5,.8,.8,.8,1],colors:n=[[0,255,255]],containerClassName:r,dotSize:o,showGradient:s=!0})=>p.jsxs("div",{className:M("h-full relative bg-white w-full",r),children:[p.jsx("div",{className:"h-full w-full",children:p.jsx(VD,{colors:n,dotSize:o??3,opacities:t,animationSpeed:e})}),s&&p.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-white to-transparent"})]}),VD=({colors:e=[[0,0,0]],opacities:t=[.04,.04,.04,.04,.04,.08,.08,.08,.08,.14],dotSize:n=2,animationSpeed:r=.4})=>{const o=T.useRef(null);return T.useEffect(()=>{const s=o.current;if(!s)return;const i=s.getContext("2d");if(!i)return;let a,l=0;const c=()=>{l+=r;const f=s.width,h=s.height;i.clearRect(0,0,f,h);const m=n*2,y=Math.floor(f/m),g=Math.floor(h/m);for(let v=0;v<y;v++)for(let x=0;x<g;x++){const b=v*m,w=x*m,S=Math.abs(Math.sin(v*12.9898+x*78.233+l*.05)),C=Math.floor(S*t.length),R=t[C%t.length],A=Math.floor(S*e.length),N=e[A%e.length];i.fillStyle=`rgba(${N[0]}, ${N[1]}, ${N[2]}, ${R})`,i.fillRect(b,w,n,n)}a=requestAnimationFrame(c)},u=()=>{const f=s.parentElement;f&&(s.width=f.clientWidth,s.height=f.clientHeight)};return window.addEventListener("resize",u),u(),c(),()=>{window.removeEventListener("resize",u),cancelAnimationFrame(a)}},[e,t,n,r]),p.jsx("canvas",{ref:o,className:"h-full w-full"})},$D=({title:e,icon:t,children:n})=>{const[r,o]=T.useState(!1);return p.jsxs("div",{onMouseEnter:()=>o(!0),onMouseLeave:()=>o(!1),className:"border border-black/[0.2] group/canvas-card flex items-center justify-center dark:border-white/[0.2] max-w-sm w-full mx-auto p-4 relative h-[30rem] ",children:[p.jsx(Zr,{className:"absolute h-6 w-6 -top-3 -left-3 dark:text-white text-black"}),p.jsx(Zr,{className:"absolute h-6 w-6 -bottom-3 -left-3 dark:text-white text-black"}),p.jsx(Zr,{className:"absolute h-6 w-6 -top-3 -right-3 dark:text-white text-black"}),p.jsx(Zr,{className:"absolute h-6 w-6 -bottom-3 -right-3 dark:text-white text-black"}),p.jsx(cs,{children:r&&p.jsx(ce.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"h-full w-full absolute inset-0",children:n})}),p.jsxs("div",{className:"relative z-20",children:[p.jsx("div",{className:"text-center group-hover/canvas-card:-translate-y-4 group-hover/canvas-card:opacity-0 transition duration-200 w-full mx-auto flex items-center justify-center",children:t}),p.jsx("h2",{className:"dark:text-white text-xl opacity-0 group-hover/canvas-card:opacity-100 relative z-10 text-black mt-4 font-bold group-hover/canvas-card:text-white group-hover/canvas-card:-translate-y-2 transition duration-200",children:e})]})]})},Zr=({className:e,...t})=>p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",className:e,...t,children:p.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 6v12m6-6H6"})});let Lb;const FD=({items:e,offset:t,scaleFactor:n})=>{const r=t||10,o=n||.06,[s,i]=T.useState(e);T.useEffect(()=>(a(),()=>clearInterval(Lb)),[]);const a=()=>{Lb=setInterval(()=>{i(l=>{const c=[...l];return c.unshift(c.pop()),c})},5e3)};return p.jsx("div",{className:"relative h-60 w-60 md:h-60 md:w-96",children:s.map((l,c)=>p.jsxs(ce.div,{className:"absolute dark:bg-black bg-white h-60 w-60 md:h-60 md:w-96 rounded-3xl p-4 shadow-xl border border-neutral-200 dark:border-white/[0.1] shadow-black/[0.1] dark:shadow-white/[0.05] flex flex-col justify-between",style:{transformOrigin:"top center"},animate:{top:c*-r,scale:1-c*o,zIndex:s.length-c},children:[p.jsx("div",{className:"font-normal text-neutral-700 dark:text-neutral-200",children:l.content}),p.jsxs("div",{children:[p.jsx("p",{className:"text-neutral-500 font-medium dark:text-white",children:l.name}),p.jsx("p",{className:"text-neutral-400 font-normal dark:text-neutral-200",children:l.designation})]})]},l.id))})},BD=({text:e,className:t})=>{let n=zt(0),r=zt(0);const[o,s]=T.useState("");T.useEffect(()=>{let a=rc(1500);s(a)},[]);function i({currentTarget:a,clientX:l,clientY:c}){let{left:u,top:f}=a.getBoundingClientRect();n.set(l-u),r.set(c-f);const h=rc(1500);s(h)}return p.jsx("div",{className:M("p-0.5 bg-transparent aspect-square flex items-center justify-center w-full h-full relative",t),children:p.jsxs("div",{onMouseMove:i,className:"group/card rounded-3xl w-full relative overflow-hidden bg-transparent flex items-center justify-center h-full",children:[p.jsx(Vb,{mouseX:n,mouseY:r,randomString:o}),p.jsx("div",{className:"relative z-10 flex items-center justify-center",children:p.jsxs("div",{className:"relative h-44 w-44 rounded-full flex items-center justify-center text-white font-bold text-4xl",children:[p.jsx("div",{className:"absolute w-full h-full bg-black/80 dark:bg-[#09090b]/[0.8] blur-sm rounded-full"}),p.jsx("span",{className:"text-white z-20",children:e})]})})]})})};function Vb({mouseX:e,mouseY:t,randomString:n}){let r=tc`radial-gradient(250px at ${e}px ${t}px, white, transparent)`,o={maskImage:r,WebkitMaskImage:r};return p.jsxs("div",{className:"pointer-events-none",children:[p.jsx("div",{className:"absolute inset-0 rounded-2xl [mask-image:linear-gradient(white,transparent)] group-hover/card:opacity-50"}),p.jsx(ce.div,{className:"absolute inset-0 rounded-2xl bg-gradient-to-r from-emerald-500 to-teal-700 opacity-0 group-hover/card:opacity-100 backdrop-blur-xl transition duration-500",style:o}),p.jsx(ce.div,{className:"absolute inset-0 rounded-2xl opacity-0 mix-blend-overlay group-hover/card:opacity-100",style:o,children:p.jsx("p",{className:"absolute inset-x-0 text-xs h-full break-words whitespace-pre-wrap text-white font-mono font-bold transition duration-500",children:n})})]})}const $b="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",rc=e=>{let t="";for(let n=0;n<e;n++)t+=$b.charAt(Math.floor(Math.random()*$b.length));return t},WD=({className:e,...t})=>p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",className:e,...t,children:p.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 6v12m6-6H6"})}),zD=({words:e,duration:t=3e3,className:n})=>{const[r,o]=T.useState(e[0]),[s,i]=T.useState(!1),a=T.useCallback(()=>{const l=e[e.indexOf(r)+1]||e[0];o(l),i(!0)},[r,e]);return T.useEffect(()=>{s||setTimeout(()=>{a()},t)},[s,t,a]),p.jsx(cs,{onExitComplete:()=>{i(!1)},children:p.jsx(ce.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{type:"spring",stiffness:100,damping:10},exit:{opacity:0,y:-40,x:40,filter:"blur(8px)",scale:2,position:"absolute"},className:M("z-10 inline-block relative text-left text-neutral-900 dark:text-neutral-100 px-2",n),children:r.split("").map((l,c)=>p.jsx(ce.span,{initial:{opacity:0,y:10,filter:"blur(8px)"},animate:{opacity:1,y:0,filter:"blur(0px)"},transition:{delay:c*.08,duration:.4,filter:{type:"tween",duration:.4}},className:"inline-block",children:l},r+c))},r)})},HD=({text:e,className:t})=>p.jsx("div",{className:M("relative inline-block",t),children:p.jsxs("span",{className:"relative inline-block",children:[e,p.jsx("span",{className:"absolute top-0 left-0 -z-10 w-full h-full text-red-500 opacity-80 animate-glitch-1","aria-hidden":"true",children:e}),p.jsx("span",{className:"absolute top-0 left-0 -z-10 w-full h-full text-cyan-400 opacity-80 animate-glitch-2","aria-hidden":"true",children:e}),p.jsx("span",{className:"absolute top-0 left-0 -z-10 w-full h-full text-green-500 opacity-80 animate-glitch-1 [animation-delay:0.5s]","aria-hidden":"true",children:e})]})});var oc,ks="HoverCard",[Fb]=Re(ks,[ut]),Os=ut(),[UD,sc]=Fb(ks),Bb=e=>{const{__scopeHoverCard:t,children:n,open:r,defaultOpen:o,onOpenChange:s,openDelay:i=700,closeDelay:a=300}=e,l=Os(t),c=d.useRef(0),u=d.useRef(0),f=d.useRef(!1),h=d.useRef(!1),[m,y]=_e({prop:r,defaultProp:o??!1,onChange:s,caller:ks}),g=d.useCallback(()=>{clearTimeout(u.current),c.current=window.setTimeout(()=>y(!0),i)},[i,y]),v=d.useCallback(()=>{clearTimeout(c.current),!f.current&&!h.current&&(u.current=window.setTimeout(()=>y(!1),a))},[a,y]),x=d.useCallback(()=>y(!1),[y]);return d.useEffect(()=>()=>{clearTimeout(c.current),clearTimeout(u.current)},[]),p.jsx(UD,{scope:t,open:m,onOpenChange:y,onOpen:g,onClose:v,onDismiss:x,hasSelectionRef:f,isPointerDownOnContentRef:h,children:p.jsx(xn,{...l,children:n})})};Bb.displayName=ks;var Wb="HoverCardTrigger",zb=d.forwardRef((e,t)=>{const{__scopeHoverCard:n,...r}=e,o=sc(Wb,n),s=Os(n);return p.jsx(bn,{asChild:!0,...s,children:p.jsx(H.a,{"data-state":o.open?"open":"closed",...r,ref:t,onPointerEnter:D(e.onPointerEnter,Vs(o.onOpen)),onPointerLeave:D(e.onPointerLeave,Vs(o.onClose)),onFocus:D(e.onFocus,o.onOpen),onBlur:D(e.onBlur,o.onClose),onTouchStart:D(e.onTouchStart,i=>i.preventDefault())})})});zb.displayName=Wb;var GD="HoverCardPortal",[Hk,KD]=Fb(GD,{forceMount:void 0}),Ls="HoverCardContent",Hb=d.forwardRef((e,t)=>{const n=KD(Ls,e.__scopeHoverCard),{forceMount:r=n.forceMount,...o}=e,s=sc(Ls,e.__scopeHoverCard);return p.jsx(Te,{present:r||s.open,children:p.jsx(YD,{"data-state":s.open?"open":"closed",...o,onPointerEnter:D(e.onPointerEnter,Vs(s.onOpen)),onPointerLeave:D(e.onPointerLeave,Vs(s.onClose)),ref:t})})});Hb.displayName=Ls;var YD=d.forwardRef((e,t)=>{const{__scopeHoverCard:n,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:i,...a}=e,l=sc(Ls,n),c=Os(n),u=d.useRef(null),f=re(t,u),[h,m]=d.useState(!1);return d.useEffect(()=>{if(h){const y=document.body;return oc=y.style.userSelect||y.style.webkitUserSelect,y.style.userSelect="none",y.style.webkitUserSelect="none",()=>{y.style.userSelect=oc,y.style.webkitUserSelect=oc}}},[h]),d.useEffect(()=>{if(u.current){const y=()=>{m(!1),l.isPointerDownOnContentRef.current=!1,setTimeout(()=>{var v;((v=document.getSelection())==null?void 0:v.toString())!==""&&(l.hasSelectionRef.current=!0)})};return document.addEventListener("pointerup",y),()=>{document.removeEventListener("pointerup",y),l.hasSelectionRef.current=!1,l.isPointerDownOnContentRef.current=!1}}},[l.isPointerDownOnContentRef,l.hasSelectionRef]),d.useEffect(()=>{u.current&&ZD(u.current).forEach(g=>g.setAttribute("tabindex","-1"))}),p.jsx(At,{asChild:!0,disableOutsidePointerEvents:!1,onInteractOutside:i,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:D(s,y=>{y.preventDefault()}),onDismiss:l.onDismiss,children:p.jsx(dr,{...c,...a,onPointerDown:D(a.onPointerDown,y=>{y.currentTarget.contains(y.target)&&m(!0),l.hasSelectionRef.current=!1,l.isPointerDownOnContentRef.current=!0}),ref:f,style:{...a.style,userSelect:h?"text":void 0,WebkitUserSelect:h?"text":void 0,"--radix-hover-card-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-hover-card-content-available-width":"var(--radix-popper-available-width)","--radix-hover-card-content-available-height":"var(--radix-popper-available-height)","--radix-hover-card-trigger-width":"var(--radix-popper-anchor-width)","--radix-hover-card-trigger-height":"var(--radix-popper-anchor-height)"}})})}),XD="HoverCardArrow",qD=d.forwardRef((e,t)=>{const{__scopeHoverCard:n,...r}=e,o=Os(n);return p.jsx(fr,{...o,...r,ref:t})});qD.displayName=XD;function Vs(e){return t=>t.pointerType==="touch"?void 0:e()}function ZD(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});for(;n.nextNode();)t.push(n.currentNode);return t}var JD=Bb,QD=zb,Ub=Hb;const ek=JD,tk=QD,Gb=d.forwardRef(({className:e,align:t="center",sideOffset:n=4,...r},o)=>p.jsx(Ub,{ref:o,align:t,sideOffset:n,className:M("z-50 w-64 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}));Gb.displayName=Ub.displayName;const nk=({items:e,direction:t="left",speed:n="fast",pauseOnHover:r=!0,className:o})=>{const s=T.useRef(null),i=T.useRef(null);T.useEffect(()=>{c()},[]);const[a,l]=T.useState(!1);function c(){s.current&&i.current&&(Array.from(i.current.children).forEach(m=>{const y=m.cloneNode(!0);i.current&&i.current.appendChild(y)}),u(),f(),l(!0))}const u=()=>{s.current&&(t==="left"?s.current.style.setProperty("--animation-direction","forwards"):s.current.style.setProperty("--animation-direction","reverse"))},f=()=>{s.current&&(n==="fast"?s.current.style.setProperty("--animation-duration","20s"):n==="normal"?s.current.style.setProperty("--animation-duration","40s"):s.current.style.setProperty("--animation-duration","80s"))};return p.jsx("div",{ref:s,className:M("scroller relative z-20 max-w-7xl overflow-hidden [mask-image:linear-gradient(to_right,transparent,white_20%,white_80%,transparent)]",o),children:p.jsx("ul",{ref:i,className:M(" flex min-w-full shrink-0 gap-4 py-4 w-max flex-nowrap",a&&"animate-scroll ",r&&"hover:[animation-play-state:paused]"),children:e.map((h,m)=>p.jsxs("li",{className:"w-[350px] max-w-full relative rounded-2xl border border-b-0 flex-shrink-0 border-zinc-200 dark:border-slate-700 px-8 py-6 md:w-[450px] bg-white dark:bg-slate-900 shadow-sm dark:shadow-none",style:{background:"linear-gradient(180deg, var(--white), var(--zinc-50))"},children:[p.jsx("div",{className:"dark:hidden absolute inset-0 bg-gradient-to-b from-white to-zinc-50 rounded-2xl -z-10"}),p.jsx("div",{className:"hidden dark:block absolute inset-0 bg-gradient-to-b from-slate-800 to-slate-900 rounded-2xl -z-10"}),p.jsxs("blockquote",{children:[p.jsx("div",{"aria-hidden":"true",className:"user-select-none -z-1 pointer-events-none absolute -left-0.5 -top-0.5 h-[calc(100%_+_4px)] w-[calc(100%_+_4px)]"}),p.jsx("span",{className:" relative z-20 text-sm leading-[1.6] text-zinc-700 dark:text-gray-100 font-normal",children:h.quote}),p.jsx("div",{className:"relative z-20 mt-6 flex flex-row items-center",children:p.jsxs("span",{className:"flex flex-col gap-1",children:[p.jsx("span",{className:" text-sm leading-[1.6] text-zinc-500 dark:text-gray-400 font-normal",children:h.name}),p.jsx("span",{className:" text-sm leading-[1.6] text-zinc-400 dark:text-gray-400 font-normal",children:h.title})]})})]})]},h.name+m))})})},rk=({className:e,height:t=40,squares:n=[20,20]})=>{const r=T.useRef(null),[o,s]=T.useState({x:0,y:0}),i=c=>{if(!r.current)return;const u=r.current.getBoundingClientRect();s({x:c.clientX-u.left,y:c.clientY-u.top})},[a,l]=n;return p.jsxs("div",{ref:r,onMouseMove:i,className:M("relative overflow-hidden border border-border bg-background",e),style:{"--mouse-x":`${o.x}px`,"--mouse-y":`${o.y}px`},children:[p.jsx("div",{className:"absolute inset-0 z-0 opacity-0 transition-opacity duration-500 hover:opacity-100 pointer-events-none",style:{background:"radial-gradient(600px circle at var(--mouse-x) var(--mouse-y), hsl(var(--primary) / 0.15), transparent 40%)"}}),p.jsx("div",{className:"relative z-10 grid",style:{gridTemplateColumns:`repeat(${l}, 1fr)`,gridTemplateRows:`repeat(${a}, 1fr)`},children:Array.from({length:a*l}).map((c,u)=>p.jsx("div",{className:"border-r border-b border-border/10",style:{width:"100%",height:`${t}px`}},u))}),p.jsx("div",{className:"absolute inset-0 z-20 pointer-events-none",style:{background:"radial-gradient(600px circle at var(--mouse-x) var(--mouse-y), hsl(var(--primary) / 0.05), transparent 40%)"}})]})},ok=({children:e,className:t})=>p.jsxs("div",{className:M("relative flex min-h-screen flex-col items-center justify-center overflow-hidden bg-slate-950 w-full rounded-md z-0",t),children:[p.jsxs("div",{className:"relative flex w-full flex-1 scale-y-125 items-center justify-center isolate z-0 ",children:[p.jsxs(ce.div,{initial:{opacity:.5,width:"15rem"},whileInView:{opacity:1,width:"30rem"},transition:{delay:.3,duration:.8,ease:"easeInOut"},style:{backgroundImage:"conic-gradient(var(--conic-position), var(--tw-gradient-stops))"},className:"absolute inset-auto right-1/2 h-56 overflow-visible w-[30rem] bg-gradient-conic from-cyan-500 via-transparent to-transparent text-white [--conic-position:from_70deg_at_center_top]",children:[p.jsx("div",{className:"absolute w-[100%] left-0 bg-slate-950 h-40 bottom-0 z-20 [mask-image:linear-gradient(to_top,white,transparent)]"}),p.jsx("div",{className:"absolute w-40 h-[100%] left-0 bg-slate-950 bottom-0 z-20 [mask-image:linear-gradient(to_right,white,transparent)]"})]}),p.jsxs(ce.div,{initial:{opacity:.5,width:"15rem"},whileInView:{opacity:1,width:"30rem"},transition:{delay:.3,duration:.8,ease:"easeInOut"},style:{backgroundImage:"conic-gradient(var(--conic-position), var(--tw-gradient-stops))"},className:"absolute inset-auto left-1/2 h-56 w-[30rem] bg-gradient-conic from-transparent via-transparent to-cyan-500 text-white [--conic-position:from_290deg_at_center_top]",children:[p.jsx("div",{className:"absolute w-40 h-[100%] right-0 bg-slate-950 bottom-0 z-20 [mask-image:linear-gradient(to_left,white,transparent)]"}),p.jsx("div",{className:"absolute w-[100%] right-0 bg-slate-950 h-40 bottom-0 z-20 [mask-image:linear-gradient(to_top,white,transparent)]"})]}),p.jsx("div",{className:"absolute top-1/2 h-48 w-full translate-y-12 scale-x-150 bg-slate-950 blur-2xl"}),p.jsx("div",{className:"absolute top-1/2 z-50 h-48 w-full bg-transparent opacity-10 backdrop-blur-md"}),p.jsx("div",{className:"absolute inset-auto z-50 h-36 w-[28rem] -translate-y-1/2 rounded-full bg-cyan-500 opacity-50 blur-3xl"}),p.jsx(ce.div,{initial:{width:"8rem"},whileInView:{width:"16rem"},transition:{delay:.3,duration:.8,ease:"easeInOut"},className:"absolute inset-auto z-30 h-36 w-64 -translate-y-[6rem] rounded-full bg-cyan-400 blur-2xl"}),p.jsx(ce.div,{initial:{width:"15rem"},whileInView:{width:"30rem"},transition:{delay:.3,duration:.8,ease:"easeInOut"},className:"absolute inset-auto z-50 h-0.5 w-[30rem] -translate-y-[7rem] bg-cyan-400 "}),p.jsx("div",{className:"absolute inset-auto z-40 h-44 w-full -translate-y-[12.5rem] bg-slate-950 "})]}),p.jsx("div",{className:"relative z-50 flex -translate-y-80 flex-col items-center px-5",children:e})]}),sk=({children:e,zoomFactor:t=1.5,lensSize:n=170,isStatic:r=!1,position:o={x:200,y:150},hovering:s,setHovering:i,className:a})=>{const[l,c]=T.useState(!1),[u,f]=T.useState({x:0,y:0}),h=T.useRef(null),m=v=>{var b;const x=(b=h.current)==null?void 0:b.getBoundingClientRect();if(x){const w=v.clientX-x.left,S=v.clientY-x.top;f({x:w,y:S})}},y=s!==void 0?s:l,g=i||c;return p.jsxs("div",{ref:h,className:M("relative overflow-hidden rounded-lg z-20 group/lens",a),onMouseEnter:()=>g(!0),onMouseLeave:()=>g(!1),onMouseMove:m,children:[e,r?p.jsx(ce.div,{initial:{opacity:0,scale:.58},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.8},transition:{duration:.3,ease:"easeOut"},className:"absolute inset-0 overflow-hidden pointer-events-none",style:{maskImage:`radial-gradient(circle ${n/2}px at ${o.x}px ${o.y}px, black 100%, transparent 100%)`,WebkitMaskImage:`radial-gradient(circle ${n/2}px at ${o.x}px ${o.y}px, black 100%, transparent 100%)`,transformOrigin:`${o.x}px ${o.y}px`},children:p.jsx("div",{className:"absolute inset-0",style:{transform:`scale(${t})`,transformOrigin:`${o.x}px ${o.y}px`},children:e})}):p.jsx(cs,{children:y&&p.jsx(ce.div,{initial:{opacity:0,scale:.58},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.8},transition:{duration:.3,ease:"easeOut"},className:"absolute inset-0 overflow-hidden pointer-events-none",style:{maskImage:`radial-gradient(circle ${n/2}px at ${u.x}px ${u.y}px, black 100%, transparent 100%)`,WebkitMaskImage:`radial-gradient(circle ${n/2}px at ${u.x}px ${u.y}px, black 100%, transparent 100%)`,transformOrigin:`${u.x}px ${u.y}px`,zIndex:50},children:p.jsx("div",{className:"absolute inset-0",style:{transform:`scale(${t})`,transformOrigin:`${u.x}px ${u.y}px`},children:e})})})]})};function ik({children:e,className:t,gradientSize:n=200,gradientColor:r="#262626",gradientOpacity:o=.8,...s}){const i=zt(-n),a=zt(-n);function l({currentTarget:u,clientX:f,clientY:h}){const{left:m,top:y}=u.getBoundingClientRect();i.set(f-m),a.set(h-y)}function c(){i.set(-n),a.set(-n)}return p.jsxs("div",{onMouseMove:l,onMouseLeave:c,className:M("group relative flex size-full overflow-hidden rounded-xl border bg-neutral-100 dark:bg-neutral-900 text-black dark:text-white",t),...s,children:[p.jsx("div",{className:"relative z-10",children:e}),p.jsx(ce.div,{className:"pointer-events-none absolute -inset-px rounded-xl opacity-0 transition-opacity duration-300 group-hover:opacity-100",style:{background:tc`
134
+ `),()=>{document.head.removeChild(d)}},[t]),p.jsx(DM,{isPresent:t,childRef:r,sizeRef:o,children:u.cloneElement(e,{ref:r})})}const kM=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:o,presenceAffectsLayout:s,mode:i})=>{const a=Et(OM),l=P.useId(),c=P.useCallback(f=>{a.set(f,!0);for(const h of a.values())if(!h)return;r&&r()},[a,r]),d=P.useMemo(()=>({id:l,initial:t,isPresent:n,custom:o,onExitComplete:c,register:f=>(a.set(f,!1),()=>a.delete(f))}),s?[Math.random(),c]:[n,c]);return P.useMemo(()=>{a.forEach((f,h)=>a.set(h,!1))},[n]),u.useEffect(()=>{!n&&!a.size&&r&&r()},[n]),i==="popLayout"&&(e=p.jsx(_M,{isPresent:n,children:e})),p.jsx(Oo.Provider,{value:d,children:e})};function OM(){return new Map}function Zg(e=!0){const t=P.useContext(Oo);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:o}=t,s=P.useId();P.useEffect(()=>{e&&o(s)},[e]);const i=P.useCallback(()=>e&&r&&r(s),[s,r,e]);return!n&&r?[!1,i]:[!0]}const Lo=e=>e.key||"";function Jg(e){const t=[];return P.Children.forEach(e,n=>{P.isValidElement(n)&&t.push(n)}),t}const pa=typeof window<"u",nr=pa?P.useLayoutEffect:P.useEffect,Vo=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:o=!0,mode:s="sync",propagate:i=!1})=>{const[a,l]=Zg(i),c=P.useMemo(()=>Jg(e),[e]),d=i&&!a?[]:c.map(Lo),f=P.useRef(!0),h=P.useRef(c),m=Et(()=>new Map),[y,g]=P.useState(c),[v,b]=P.useState(c);nr(()=>{f.current=!1,h.current=c;for(let S=0;S<v.length;S++){const C=Lo(v[S]);d.includes(C)?m.delete(C):m.get(C)!==!0&&m.set(C,!1)}},[v,d.length,d.join("-")]);const w=[];if(c!==y){let S=[...c];for(let C=0;C<v.length;C++){const T=v[C],A=Lo(T);d.includes(A)||(S.splice(C,0,T),w.push(T))}s==="wait"&&w.length&&(S=w),b(Jg(S)),g(c);return}process.env.NODE_ENV!=="production"&&s==="wait"&&v.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`);const{forceRender:x}=P.useContext(fa);return p.jsx(p.Fragment,{children:v.map(S=>{const C=Lo(S),T=i&&!a?!1:c===v||d.includes(C),A=()=>{if(m.has(C))m.set(C,!0);else return;let N=!0;m.forEach(I=>{I||(N=!1)}),N&&(x==null||x(),b(h.current),i&&(l==null||l()),r&&r())};return p.jsx(kM,{isPresent:T,initial:!f.current||n?void 0:!1,custom:T?void 0:t,presenceAffectsLayout:o,mode:s,onExitComplete:T?void 0:A,children:S},C)})})},Ee=e=>e;let $t=Ee,Qe=Ee;process.env.NODE_ENV!=="production"&&($t=(e,t)=>{!e&&typeof console<"u"&&console.warn(t)},Qe=(e,t)=>{if(!e)throw new Error(t)});function ha(e){let t;return()=>(t===void 0&&(t=e()),t)}const Pt=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},He=e=>e*1e3,et=e=>e/1e3,LM={useManualTiming:!1};function VM(e){let t=new Set,n=new Set,r=!1,o=!1;const s=new WeakSet;let i={delta:0,timestamp:0,isProcessing:!1};function a(c){s.has(c)&&(l.schedule(c),e()),c(i)}const l={schedule:(c,d=!1,f=!1)=>{const m=f&&r?t:n;return d&&s.add(c),m.has(c)||m.add(c),c},cancel:c=>{n.delete(c),s.delete(c)},process:c=>{if(i=c,r){o=!0;return}r=!0,[t,n]=[n,t],t.forEach(a),t.clear(),r=!1,o&&(o=!1,l.process(c))}};return l}const $o=["read","resolveKeyframes","update","preRender","render","postRender"],$M=40;function Qg(e,t){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},s=()=>n=!0,i=$o.reduce((b,w)=>(b[w]=VM(s),b),{}),{read:a,resolveKeyframes:l,update:c,preRender:d,render:f,postRender:h}=i,m=()=>{const b=performance.now();n=!1,o.delta=r?1e3/60:Math.max(Math.min(b-o.timestamp,$M),1),o.timestamp=b,o.isProcessing=!0,a.process(o),l.process(o),c.process(o),d.process(o),f.process(o),h.process(o),o.isProcessing=!1,n&&t&&(r=!1,e(m))},y=()=>{n=!0,r=!0,o.isProcessing||e(m)};return{schedule:$o.reduce((b,w)=>{const x=i[w];return b[w]=(S,C=!1,T=!1)=>(n||y(),x.schedule(S,C,T)),b},{}),cancel:b=>{for(let w=0;w<$o.length;w++)i[$o[w]].cancel(b)},state:o,steps:i}}const{schedule:ie,cancel:Le,state:be,steps:ma}=Qg(typeof requestAnimationFrame<"u"?requestAnimationFrame:Ee,!0),ev=P.createContext({strict:!1}),tv={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},gn={};for(const e in tv)gn[e]={isEnabled:t=>tv[e].some(n=>!!t[n])};function FM(e){for(const t in e)gn[t]={...gn[t],...e[t]}}const RM=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function Fo(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||RM.has(e)}let nv=e=>!Fo(e);function BM(e){e&&(nv=t=>t.startsWith("on")?!Fo(t):e(t))}try{BM(require("@emotion/is-prop-valid").default)}catch{}function zM(e,t,n){const r={};for(const o in e)o==="values"&&typeof e.values=="object"||(nv(o)||n===!0&&Fo(o)||!t&&!Fo(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}const rv=new Set;function rr(e,t,n){e||rv.has(t)||(console.warn(t),rv.add(t))}function WM(e){if(typeof Proxy>"u")return e;const t=new Map,n=(...r)=>(process.env.NODE_ENV!=="production"&&rr(!1,"motion() is deprecated. Use motion.create() instead."),e(...r));return new Proxy(n,{get:(r,o)=>o==="create"?e:(t.has(o)||t.set(o,e(o)),t.get(o))})}const Ro=P.createContext({});function or(e){return typeof e=="string"||Array.isArray(e)}function Bo(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}const ga=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],va=["initial",...ga];function zo(e){return Bo(e.animate)||va.some(t=>or(e[t]))}function ov(e){return!!(zo(e)||e.variants)}function HM(e,t){if(zo(e)){const{initial:n,animate:r}=e;return{initial:n===!1||or(n)?n:void 0,animate:or(r)?r:void 0}}return e.inherit!==!1?t:{}}function jM(e){const{initial:t,animate:n}=HM(e,P.useContext(Ro));return P.useMemo(()=>({initial:t,animate:n}),[sv(t),sv(n)])}function sv(e){return Array.isArray(e)?e.join(" "):e}const UM=Symbol.for("motionComponentSymbol");function vn(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function GM(e,t,n){return P.useCallback(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):vn(n)&&(n.current=r))},[t])}const ya=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),iv="data-"+ya("framerAppearId"),{schedule:ba}=Qg(queueMicrotask,!1),av=P.createContext({});function KM(e,t,n,r,o){var s,i;const{visualElement:a}=P.useContext(Ro),l=P.useContext(ev),c=P.useContext(Oo),d=P.useContext(mn).reducedMotion,f=P.useRef(null);r=r||l.renderer,!f.current&&r&&(f.current=r(e,{visualState:t,parent:a,props:n,presenceContext:c,blockInitialAnimation:c?c.initial===!1:!1,reducedMotionConfig:d}));const h=f.current,m=P.useContext(av);h&&!h.projection&&o&&(h.type==="html"||h.type==="svg")&&YM(f.current,n,o,m);const y=P.useRef(!1);P.useInsertionEffect(()=>{h&&y.current&&h.update(n,c)});const g=n[iv],v=P.useRef(!!g&&!(!((s=window.MotionHandoffIsComplete)===null||s===void 0)&&s.call(window,g))&&((i=window.MotionHasOptimisedAnimation)===null||i===void 0?void 0:i.call(window,g)));return nr(()=>{h&&(y.current=!0,window.MotionIsMounted=!0,h.updateFeatures(),ba.render(h.render),v.current&&h.animationState&&h.animationState.animateChanges())}),P.useEffect(()=>{h&&(!v.current&&h.animationState&&h.animationState.animateChanges(),v.current&&(queueMicrotask(()=>{var b;(b=window.MotionHandoffMarkAsComplete)===null||b===void 0||b.call(window,g)}),v.current=!1))}),h}function YM(e,t,n,r){const{layoutId:o,layout:s,drag:i,dragConstraints:a,layoutScroll:l,layoutRoot:c}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:lv(e.parent)),e.projection.setOptions({layoutId:o,layout:s,alwaysMeasureLayout:!!i||a&&vn(a),visualElement:e,animationType:typeof s=="string"?s:"both",initialPromotionConfig:r,layoutScroll:l,layoutRoot:c})}function lv(e){if(e)return e.options.allowProjection!==!1?e.projection:lv(e.parent)}function XM({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:o}){var s,i;e&&FM(e);function a(c,d){let f;const h={...P.useContext(mn),...c,layoutId:qM(c)},{isStatic:m}=h,y=jM(c),g=r(c,m);if(!m&&pa){ZM(h,e);const v=JM(h);f=v.MeasureLayout,y.visualElement=KM(o,g,h,t,v.ProjectionNode)}return p.jsxs(Ro.Provider,{value:y,children:[f&&y.visualElement?p.jsx(f,{visualElement:y.visualElement,...h}):null,n(o,c,GM(g,y.visualElement,d),g,m,y.visualElement)]})}a.displayName=`motion.${typeof o=="string"?o:`create(${(i=(s=o.displayName)!==null&&s!==void 0?s:o.name)!==null&&i!==void 0?i:""})`}`;const l=P.forwardRef(a);return l[UM]=o,l}function qM({layoutId:e}){const t=P.useContext(fa).id;return t&&e!==void 0?t+"-"+e:e}function ZM(e,t){const n=P.useContext(ev).strict;if(process.env.NODE_ENV!=="production"&&t&&n){const r="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";e.ignoreStrict?$t(!1,r):Qe(!1,r)}}function JM(e){const{drag:t,layout:n}=gn;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t!=null&&t.isEnabled(e)||n!=null&&n.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}const QM=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function wa(e){return typeof e!="string"||e.includes("-")?!1:!!(QM.indexOf(e)>-1||/[A-Z]/u.test(e))}function cv(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function xa(e,t,n,r){if(typeof t=="function"){const[o,s]=cv(r);t=t(n!==void 0?n:e.custom,o,s)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[o,s]=cv(r);t=t(n!==void 0?n:e.custom,o,s)}return t}const Sa=e=>Array.isArray(e),e1=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),t1=e=>Sa(e)?e[e.length-1]||0:e,me=e=>!!(e&&e.getVelocity);function Wo(e){const t=me(e)?e.get():e;return e1(t)?t.toValue():t}function n1({scrapeMotionValuesFromProps:e,createRenderState:t,onUpdate:n},r,o,s){const i={latestValues:r1(r,o,s,e),renderState:t()};return n&&(i.onMount=a=>n({props:r,current:a,...i}),i.onUpdate=a=>n(a)),i}const uv=e=>(t,n)=>{const r=P.useContext(Ro),o=P.useContext(Oo),s=()=>n1(e,t,r,o);return n?s():Et(s)};function r1(e,t,n,r){const o={},s=r(e,{});for(const h in s)o[h]=Wo(s[h]);let{initial:i,animate:a}=e;const l=zo(e),c=ov(e);t&&c&&!l&&e.inherit!==!1&&(i===void 0&&(i=t.initial),a===void 0&&(a=t.animate));let d=n?n.initial===!1:!1;d=d||i===!1;const f=d?a:i;if(f&&typeof f!="boolean"&&!Bo(f)){const h=Array.isArray(f)?f:[f];for(let m=0;m<h.length;m++){const y=xa(e,h[m]);if(y){const{transitionEnd:g,transition:v,...b}=y;for(const w in b){let x=b[w];if(Array.isArray(x)){const S=d?x.length-1:0;x=x[S]}x!==null&&(o[w]=x)}for(const w in g)o[w]=g[w]}}}return o}const yn=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Ft=new Set(yn),dv=e=>t=>typeof t=="string"&&t.startsWith(e),fv=dv("--"),o1=dv("var(--"),Ca=e=>o1(e)?s1.test(e.split("/*")[0].trim()):!1,s1=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,pv=(e,t)=>t&&typeof e=="number"?t.transform(e):e,tt=(e,t,n)=>n>t?t:n<e?e:n,bn={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},sr={...bn,transform:e=>tt(0,1,e)},Ho={...bn,default:1},ir=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Tt=ir("deg"),nt=ir("%"),te=ir("px"),i1=ir("vh"),a1=ir("vw"),hv={...nt,parse:e=>nt.parse(e)/100,transform:e=>nt.transform(e*100)},l1={borderWidth:te,borderTopWidth:te,borderRightWidth:te,borderBottomWidth:te,borderLeftWidth:te,borderRadius:te,radius:te,borderTopLeftRadius:te,borderTopRightRadius:te,borderBottomRightRadius:te,borderBottomLeftRadius:te,width:te,maxWidth:te,height:te,maxHeight:te,top:te,right:te,bottom:te,left:te,padding:te,paddingTop:te,paddingRight:te,paddingBottom:te,paddingLeft:te,margin:te,marginTop:te,marginRight:te,marginBottom:te,marginLeft:te,backgroundPositionX:te,backgroundPositionY:te},c1={rotate:Tt,rotateX:Tt,rotateY:Tt,rotateZ:Tt,scale:Ho,scaleX:Ho,scaleY:Ho,scaleZ:Ho,skew:Tt,skewX:Tt,skewY:Tt,distance:te,translateX:te,translateY:te,translateZ:te,x:te,y:te,z:te,perspective:te,transformPerspective:te,opacity:sr,originX:hv,originY:hv,originZ:te},mv={...bn,transform:Math.round},Ea={...l1,...c1,zIndex:mv,size:te,fillOpacity:sr,strokeOpacity:sr,numOctaves:mv},u1={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},d1=yn.length;function f1(e,t,n){let r="",o=!0;for(let s=0;s<d1;s++){const i=yn[s],a=e[i];if(a===void 0)continue;let l=!0;if(typeof a=="number"?l=a===(i.startsWith("scale")?1:0):l=parseFloat(a)===0,!l||n){const c=pv(a,Ea[i]);if(!l){o=!1;const d=u1[i]||i;r+=`${d}(${c}) `}n&&(t[i]=c)}}return r=r.trim(),n?r=n(t,o?"":r):o&&(r="none"),r}function Pa(e,t,n){const{style:r,vars:o,transformOrigin:s}=e;let i=!1,a=!1;for(const l in t){const c=t[l];if(Ft.has(l)){i=!0;continue}else if(fv(l)){o[l]=c;continue}else{const d=pv(c,Ea[l]);l.startsWith("origin")?(a=!0,s[l]=d):r[l]=d}}if(t.transform||(i||n?r.transform=f1(t,e.transform,n):r.transform&&(r.transform="none")),a){const{originX:l="50%",originY:c="50%",originZ:d=0}=s;r.transformOrigin=`${l} ${c} ${d}`}}const p1={offset:"stroke-dashoffset",array:"stroke-dasharray"},h1={offset:"strokeDashoffset",array:"strokeDasharray"};function m1(e,t,n=1,r=0,o=!0){e.pathLength=1;const s=o?p1:h1;e[s.offset]=te.transform(-r);const i=te.transform(t),a=te.transform(n);e[s.array]=`${i} ${a}`}function gv(e,t,n){return typeof e=="string"?e:te.transform(t+n*e)}function g1(e,t,n){const r=gv(t,e.x,e.width),o=gv(n,e.y,e.height);return`${r} ${o}`}function Ta(e,{attrX:t,attrY:n,attrScale:r,originX:o,originY:s,pathLength:i,pathSpacing:a=1,pathOffset:l=0,...c},d,f){if(Pa(e,c,f),d){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:h,style:m,dimensions:y}=e;h.transform&&(y&&(m.transform=h.transform),delete h.transform),y&&(o!==void 0||s!==void 0||m.transform)&&(m.transformOrigin=g1(y,o!==void 0?o:.5,s!==void 0?s:.5)),t!==void 0&&(h.x=t),n!==void 0&&(h.y=n),r!==void 0&&(h.scale=r),i!==void 0&&m1(h,i,a,l,!1)}const Aa=()=>({style:{},transform:{},transformOrigin:{},vars:{}}),vv=()=>({...Aa(),attrs:{}}),Na=e=>typeof e=="string"&&e.toLowerCase()==="svg";function yv(e,{style:t,vars:n},r,o){Object.assign(e.style,t,o&&o.getProjectionStyles(r));for(const s in n)e.style.setProperty(s,n[s])}const bv=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function wv(e,t,n,r){yv(e,t,void 0,r);for(const o in t.attrs)e.setAttribute(bv.has(o)?o:ya(o),t.attrs[o])}const jo={};function v1(e){Object.assign(jo,e)}function xv(e,{layout:t,layoutId:n}){return Ft.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!jo[e]||e==="opacity")}function Ma(e,t,n){var r;const{style:o}=e,s={};for(const i in o)(me(o[i])||t.style&&me(t.style[i])||xv(i,e)||((r=n==null?void 0:n.getValue(i))===null||r===void 0?void 0:r.liveStyle)!==void 0)&&(s[i]=o[i]);return s}function Sv(e,t,n){const r=Ma(e,t,n);for(const o in e)if(me(e[o])||me(t[o])){const s=yn.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;r[s]=e[o]}return r}function y1(e,t){try{t.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{t.dimensions={x:0,y:0,width:0,height:0}}}const Cv=["x","y","width","height","cx","cy","r"],b1={useVisualState:uv({scrapeMotionValuesFromProps:Sv,createRenderState:vv,onUpdate:({props:e,prevProps:t,current:n,renderState:r,latestValues:o})=>{if(!n)return;let s=!!e.drag;if(!s){for(const a in o)if(Ft.has(a)){s=!0;break}}if(!s)return;let i=!t;if(t)for(let a=0;a<Cv.length;a++){const l=Cv[a];e[l]!==t[l]&&(i=!0)}i&&ie.read(()=>{y1(n,r),ie.render(()=>{Ta(r,o,Na(n.tagName),e.transformTemplate),wv(n,r)})})}})},w1={useVisualState:uv({scrapeMotionValuesFromProps:Ma,createRenderState:Aa})};function Ev(e,t,n){for(const r in t)!me(t[r])&&!xv(r,n)&&(e[r]=t[r])}function x1({transformTemplate:e},t){return P.useMemo(()=>{const n=Aa();return Pa(n,t,e),Object.assign({},n.vars,n.style)},[t])}function S1(e,t){const n=e.style||{},r={};return Ev(r,n,e),Object.assign(r,x1(e,t)),r}function C1(e,t){const n={},r=S1(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=r,n}function E1(e,t,n,r){const o=P.useMemo(()=>{const s=vv();return Ta(s,t,Na(r),e.transformTemplate),{...s.attrs,style:{...s.style}}},[t]);if(e.style){const s={};Ev(s,e.style,e),o.style={...s,...o.style}}return o}function P1(e=!1){return(n,r,o,{latestValues:s},i)=>{const l=(wa(n)?E1:C1)(r,s,i,n),c=zM(r,typeof n=="string",e),d=n!==P.Fragment?{...c,...l,ref:o}:{},{children:f}=r,h=P.useMemo(()=>me(f)?f.get():f,[f]);return P.createElement(n,{...d,children:h})}}function T1(e,t){return function(r,{forwardMotionProps:o}={forwardMotionProps:!1}){const i={...wa(r)?b1:w1,preloadedFeatures:e,useRender:P1(o),createVisualElement:t,Component:r};return XM(i)}}function Pv(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}function Uo(e,t,n){const r=e.getProps();return xa(r,t,n!==void 0?n:r.custom,e)}const Tv=ha(()=>window.ScrollTimeline!==void 0);class A1{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>"finished"in t?t.finished:t))}getAll(t){return this.animations[0][t]}setAll(t,n){for(let r=0;r<this.animations.length;r++)this.animations[r][t]=n}attachTimeline(t,n){const r=this.animations.map(o=>{if(Tv()&&o.attachTimeline)return o.attachTimeline(t);if(typeof n=="function")return n(o)});return()=>{r.forEach((o,s)=>{o&&o(),this.animations[s].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let n=0;n<this.animations.length;n++)t=Math.max(t,this.animations[n].duration);return t}runAll(t){this.animations.forEach(n=>n[t]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class Av extends A1{then(t,n){return Promise.all(this.animations).then(t).catch(n)}}function Ia(e,t){return e?e[t]||e.default||e:void 0}const Go=2e4;function Da(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<Go;)t+=n,r=e.next(t);return t>=Go?1/0:t}function N1(e,t=100,n){const r=n({...e,keyframes:[0,t]}),o=Math.min(Da(r),Go);return{type:"keyframes",ease:s=>r.next(o*s).value/t,duration:et(o)}}function Ko(e){return typeof e=="function"}function Nv(e,t){e.timeline=t,e.onfinish=null}const _a=e=>Array.isArray(e)&&typeof e[0]=="number",M1={linearEasing:void 0};function I1(e,t){const n=ha(e);return()=>{var r;return(r=M1[t])!==null&&r!==void 0?r:n()}}const Yo=I1(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Mv=(e,t,n=10)=>{let r="";const o=Math.max(Math.round(t/n),2);for(let s=0;s<o;s++)r+=e(Pt(0,o-1,s))+", ";return`linear(${r.substring(0,r.length-2)})`};function Iv(e){return!!(typeof e=="function"&&Yo()||!e||typeof e=="string"&&(e in ka||Yo())||_a(e)||Array.isArray(e)&&e.every(Iv))}const ar=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,ka={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:ar([0,.65,.55,1]),circOut:ar([.55,0,1,.45]),backIn:ar([.31,.01,.66,-.59]),backOut:ar([.33,1.53,.69,.99])};function Dv(e,t){if(e)return typeof e=="function"&&Yo()?Mv(e,t):_a(e)?ar(e):Array.isArray(e)?e.map(n=>Dv(n,t)||ka.easeOut):ka[e]}const je={x:!1,y:!1};function _v(){return je.x||je.y}function Xo(e,t,n){var r;if(e instanceof Element)return[e];if(typeof e=="string"){let o=document;t&&(o=t.current);const s=(r=n==null?void 0:n[e])!==null&&r!==void 0?r:o.querySelectorAll(e);return s?Array.from(s):[]}return Array.from(e)}function kv(e,t){const n=Xo(e),r=new AbortController,o={passive:!0,...t,signal:r.signal};return[n,o,()=>r.abort()]}function Ov(e){return t=>{t.pointerType==="touch"||_v()||e(t)}}function D1(e,t,n={}){const[r,o,s]=kv(e,n),i=Ov(a=>{const{target:l}=a,c=t(a);if(typeof c!="function"||!l)return;const d=Ov(f=>{c(f),l.removeEventListener("pointerleave",d)});l.addEventListener("pointerleave",d,o)});return r.forEach(a=>{a.addEventListener("pointerenter",i,o)}),s}const Lv=(e,t)=>t?e===t?!0:Lv(e,t.parentElement):!1,Oa=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,_1=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function k1(e){return _1.has(e.tagName)||e.tabIndex!==-1}const lr=new WeakSet;function Vv(e){return t=>{t.key==="Enter"&&e(t)}}function La(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const O1=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=Vv(()=>{if(lr.has(n))return;La(n,"down");const o=Vv(()=>{La(n,"up")}),s=()=>La(n,"cancel");n.addEventListener("keyup",o,t),n.addEventListener("blur",s,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function $v(e){return Oa(e)&&!_v()}function L1(e,t,n={}){const[r,o,s]=kv(e,n),i=a=>{const l=a.currentTarget;if(!$v(a)||lr.has(l))return;lr.add(l);const c=t(a),d=(m,y)=>{window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",h),!(!$v(m)||!lr.has(l))&&(lr.delete(l),typeof c=="function"&&c(m,{success:y}))},f=m=>{d(m,n.useGlobalTarget||Lv(l,m.target))},h=m=>{d(m,!1)};window.addEventListener("pointerup",f,o),window.addEventListener("pointercancel",h,o)};return r.forEach(a=>{!k1(a)&&a.getAttribute("tabindex")===null&&(a.tabIndex=0),(n.useGlobalTarget?window:a).addEventListener("pointerdown",i,o),a.addEventListener("focus",c=>O1(c,o),o)}),s}function V1(e){return e==="x"||e==="y"?je[e]?null:(je[e]=!0,()=>{je[e]=!1}):je.x||je.y?null:(je.x=je.y=!0,()=>{je.x=je.y=!1})}const Fv=new Set(["width","height","top","left","right","bottom",...yn]);let qo;function $1(){qo=void 0}const rt={now:()=>(qo===void 0&&rt.set(be.isProcessing||LM.useManualTiming?be.timestamp:performance.now()),qo),set:e=>{qo=e,queueMicrotask($1)}};function Va(e,t){e.indexOf(t)===-1&&e.push(t)}function Zo(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class $a{constructor(){this.subscriptions=[]}add(t){return Va(this.subscriptions,t),()=>Zo(this.subscriptions,t)}notify(t,n,r){const o=this.subscriptions.length;if(o)if(o===1)this.subscriptions[0](t,n,r);else for(let s=0;s<o;s++){const i=this.subscriptions[s];i&&i(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}function Fa(e,t){return t?e*(1e3/t):0}const Rv=30,F1=e=>!isNaN(parseFloat(e)),cr={current:void 0};class R1{constructor(t,n={}){this.version="11.18.2",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,o=!0)=>{const s=rt.now();this.updatedAt!==s&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),o&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=rt.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=F1(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&rr(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new $a);const r=this.events[t].add(n);return t==="change"?()=>{r(),ie.read(()=>{this.events.change.getSize()||this.stop()})}:r}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return cr.current&&cr.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const t=rt.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Rv)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Rv);return Fa(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function ot(e,t){return new R1(e,t)}function B1(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,ot(n))}function z1(e,t){const n=Uo(e,t);let{transitionEnd:r={},transition:o={},...s}=n||{};s={...s,...r};for(const i in s){const a=t1(s[i]);B1(e,i,a)}}function W1(e){return!!(me(e)&&e.add)}function Ra(e,t){const n=e.getValue("willChange");if(W1(n))return n.add(t)}function Bv(e){return e.props[iv]}const zv=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,H1=1e-7,j1=12;function U1(e,t,n,r,o){let s,i,a=0;do i=t+(n-t)/2,s=zv(i,r,o)-e,s>0?n=i:t=i;while(Math.abs(s)>H1&&++a<j1);return i}function ur(e,t,n,r){if(e===t&&n===r)return Ee;const o=s=>U1(s,0,1,e,n);return s=>s===0||s===1?s:zv(o(s),t,r)}const Wv=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Hv=e=>t=>1-e(1-t),jv=ur(.33,1.53,.69,.99),Ba=Hv(jv),Uv=Wv(Ba),Gv=e=>(e*=2)<1?.5*Ba(e):.5*(2-Math.pow(2,-10*(e-1))),za=e=>1-Math.sin(Math.acos(e)),Kv=Hv(za),Yv=Wv(za),Xv=e=>/^0[^.\s]+$/u.test(e);function G1(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||Xv(e):!0}const dr=e=>Math.round(e*1e5)/1e5,Wa=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function K1(e){return e==null}const Y1=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Ha=(e,t)=>n=>!!(typeof n=="string"&&Y1.test(n)&&n.startsWith(e)||t&&!K1(n)&&Object.prototype.hasOwnProperty.call(n,t)),qv=(e,t,n)=>r=>{if(typeof r!="string")return r;const[o,s,i,a]=r.match(Wa);return{[e]:parseFloat(o),[t]:parseFloat(s),[n]:parseFloat(i),alpha:a!==void 0?parseFloat(a):1}},X1=e=>tt(0,255,e),ja={...bn,transform:e=>Math.round(X1(e))},Rt={test:Ha("rgb","red"),parse:qv("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+ja.transform(e)+", "+ja.transform(t)+", "+ja.transform(n)+", "+dr(sr.transform(r))+")"};function q1(e){let t="",n="",r="",o="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),o=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),o=e.substring(4,5),t+=t,n+=n,r+=r,o+=o),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:o?parseInt(o,16)/255:1}}const Ua={test:Ha("#"),parse:q1,transform:Rt.transform},wn={test:Ha("hsl","hue"),parse:qv("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+nt.transform(dr(t))+", "+nt.transform(dr(n))+", "+dr(sr.transform(r))+")"},Se={test:e=>Rt.test(e)||Ua.test(e)||wn.test(e),parse:e=>Rt.test(e)?Rt.parse(e):wn.test(e)?wn.parse(e):Ua.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Rt.transform(e):wn.transform(e)},Z1=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function J1(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(Wa))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(Z1))===null||n===void 0?void 0:n.length)||0)>0}const Zv="number",Jv="color",Q1="var",eI="var(",Qv="${}",tI=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function fr(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},o=[];let s=0;const a=t.replace(tI,l=>(Se.test(l)?(r.color.push(s),o.push(Jv),n.push(Se.parse(l))):l.startsWith(eI)?(r.var.push(s),o.push(Q1),n.push(l)):(r.number.push(s),o.push(Zv),n.push(parseFloat(l))),++s,Qv)).split(Qv);return{values:n,split:a,indexes:r,types:o}}function ey(e){return fr(e).values}function ty(e){const{split:t,types:n}=fr(e),r=t.length;return o=>{let s="";for(let i=0;i<r;i++)if(s+=t[i],o[i]!==void 0){const a=n[i];a===Zv?s+=dr(o[i]):a===Jv?s+=Se.transform(o[i]):s+=o[i]}return s}}const nI=e=>typeof e=="number"?0:e;function rI(e){const t=ey(e);return ty(e)(t.map(nI))}const At={test:J1,parse:ey,createTransformer:ty,getAnimatableNone:rI},oI=new Set(["brightness","contrast","saturate","opacity"]);function sI(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Wa)||[];if(!r)return e;const o=n.replace(r,"");let s=oI.has(t)?1:0;return r!==n&&(s*=100),t+"("+s+o+")"}const iI=/\b([a-z-]*)\(.*?\)/gu,Ga={...At,getAnimatableNone:e=>{const t=e.match(iI);return t?t.map(sI).join(" "):e}},aI={...Ea,color:Se,backgroundColor:Se,outlineColor:Se,fill:Se,stroke:Se,borderColor:Se,borderTopColor:Se,borderRightColor:Se,borderBottomColor:Se,borderLeftColor:Se,filter:Ga,WebkitFilter:Ga},Ka=e=>aI[e];function ny(e,t){let n=Ka(e);return n!==Ga&&(n=At),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const lI=new Set(["auto","none","0"]);function cI(e,t,n){let r=0,o;for(;r<e.length&&!o;){const s=e[r];typeof s=="string"&&!lI.has(s)&&fr(s).values.length&&(o=e[r]),r++}if(o&&n)for(const s of t)e[s]=ny(n,o)}const ry=e=>e===bn||e===te,oy=(e,t)=>parseFloat(e.split(", ")[t]),sy=(e,t)=>(n,{transform:r})=>{if(r==="none"||!r)return 0;const o=r.match(/^matrix3d\((.+)\)$/u);if(o)return oy(o[1],t);{const s=r.match(/^matrix\((.+)\)$/u);return s?oy(s[1],e):0}},uI=new Set(["x","y","z"]),dI=yn.filter(e=>!uI.has(e));function fI(e){const t=[];return dI.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const xn={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:sy(4,13),y:sy(5,14)};xn.translateX=xn.x,xn.translateY=xn.y;const Bt=new Set;let Ya=!1,Xa=!1;function iy(){if(Xa){const e=Array.from(Bt).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const o=fI(r);o.length&&(n.set(r,o),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const o=n.get(r);o&&o.forEach(([s,i])=>{var a;(a=r.getValue(s))===null||a===void 0||a.set(i)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}Xa=!1,Ya=!1,Bt.forEach(e=>e.complete()),Bt.clear()}function ay(){Bt.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Xa=!0)})}function pI(){ay(),iy()}class qa{constructor(t,n,r,o,s,i=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=o,this.element=s,this.isAsync=i}scheduleResolve(){this.isScheduled=!0,this.isAsync?(Bt.add(this),Ya||(Ya=!0,ie.read(ay),ie.resolveKeyframes(iy))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:o}=this;for(let s=0;s<t.length;s++)if(t[s]===null)if(s===0){const i=o==null?void 0:o.get(),a=t[t.length-1];if(i!==void 0)t[0]=i;else if(r&&n){const l=r.readValue(n,a);l!=null&&(t[0]=l)}t[0]===void 0&&(t[0]=a),o&&i===void 0&&o.set(t[0])}else t[s]=t[s-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),Bt.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,Bt.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const ly=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),hI=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function mI(e){const t=hI.exec(e);if(!t)return[,];const[,n,r,o]=t;return[`--${n??r}`,o]}const gI=4;function cy(e,t,n=1){Qe(n<=gI,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);const[r,o]=mI(e);if(!r)return;const s=window.getComputedStyle(t).getPropertyValue(r);if(s){const i=s.trim();return ly(i)?parseFloat(i):i}return Ca(o)?cy(o,t,n+1):o}const uy=e=>t=>t.test(e),dy=[bn,te,nt,Tt,a1,i1,{test:e=>e==="auto",parse:e=>e}],fy=e=>dy.find(uy(e));class py extends qa{constructor(t,n,r,o,s){super(t,n,r,o,s,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let l=0;l<t.length;l++){let c=t[l];if(typeof c=="string"&&(c=c.trim(),Ca(c))){const d=cy(c,n.current);d!==void 0&&(t[l]=d),l===t.length-1&&(this.finalKeyframe=c)}}if(this.resolveNoneKeyframes(),!Fv.has(r)||t.length!==2)return;const[o,s]=t,i=fy(o),a=fy(s);if(i!==a)if(ry(i)&&ry(a))for(let l=0;l<t.length;l++){const c=t[l];typeof c=="string"&&(t[l]=parseFloat(c))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let o=0;o<t.length;o++)G1(t[o])&&r.push(o);r.length&&cI(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=xn[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const o=n[n.length-1];o!==void 0&&t.getValue(r,o).jump(o,!1)}measureEndState(){var t;const{element:n,name:r,unresolvedKeyframes:o}=this;if(!n||!n.current)return;const s=n.getValue(r);s&&s.jump(this.measuredOrigin,!1);const i=o.length-1,a=o[i];o[i]=xn[r](n.measureViewportBox(),window.getComputedStyle(n.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),!((t=this.removedTransforms)===null||t===void 0)&&t.length&&this.removedTransforms.forEach(([l,c])=>{n.getValue(l).set(c)}),this.resolveNoneKeyframes()}}const hy=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(At.test(e)||e==="0")&&!e.startsWith("url("));function vI(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function yI(e,t,n,r){const o=e[0];if(o===null)return!1;if(t==="display"||t==="visibility")return!0;const s=e[e.length-1],i=hy(o,t),a=hy(s,t);return $t(i===a,`You are trying to animate ${t} from "${o}" to "${s}". ${o} is not an animatable value - to enable this animation set ${o} to a value animatable to ${s} via the \`style\` property.`),!i||!a?!1:vI(e)||(n==="spring"||Ko(n))&&r}const bI=e=>e!==null;function Jo(e,{repeat:t,repeatType:n="loop"},r){const o=e.filter(bI),s=t&&n!=="loop"&&t%2===1?0:o.length-1;return!s||r===void 0?o[s]:r}const wI=40;class my{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:o=0,repeatDelay:s=0,repeatType:i="loop",...a}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=rt.now(),this.options={autoplay:t,delay:n,type:r,repeat:o,repeatDelay:s,repeatType:i,...a},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>wI?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&pI(),this._resolved}onKeyframesResolved(t,n){this.resolvedAt=rt.now(),this.hasAttemptedResolve=!0;const{name:r,type:o,velocity:s,delay:i,onComplete:a,onUpdate:l,isGenerator:c}=this.options;if(!c&&!yI(t,r,o,s))if(i)this.options.duration=0;else{l&&l(Jo(t,this.options,n)),a&&a(),this.resolveFinishedPromise();return}const d=this.initPlayback(t,n);d!==!1&&(this._resolved={keyframes:t,finalKeyframe:n,...d},this.onPostResolved())}onPostResolved(){}then(t,n){return this.currentFinishedPromise.then(t,n)}flatten(){this.options.type="keyframes",this.options.ease="linear"}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}const ue=(e,t,n)=>e+(t-e)*n;function Za(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function xI({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let o=0,s=0,i=0;if(!t)o=s=i=n;else{const a=n<.5?n*(1+t):n+t-n*t,l=2*n-a;o=Za(l,a,e+1/3),s=Za(l,a,e),i=Za(l,a,e-1/3)}return{red:Math.round(o*255),green:Math.round(s*255),blue:Math.round(i*255),alpha:r}}function Qo(e,t){return n=>n>0?t:e}const Ja=(e,t,n)=>{const r=e*e,o=n*(t*t-r)+r;return o<0?0:Math.sqrt(o)},SI=[Ua,Rt,wn],CI=e=>SI.find(t=>t.test(e));function gy(e){const t=CI(e);if($t(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`),!t)return!1;let n=t.parse(e);return t===wn&&(n=xI(n)),n}const vy=(e,t)=>{const n=gy(e),r=gy(t);if(!n||!r)return Qo(e,t);const o={...n};return s=>(o.red=Ja(n.red,r.red,s),o.green=Ja(n.green,r.green,s),o.blue=Ja(n.blue,r.blue,s),o.alpha=ue(n.alpha,r.alpha,s),Rt.transform(o))},EI=(e,t)=>n=>t(e(n)),pr=(...e)=>e.reduce(EI),Qa=new Set(["none","hidden"]);function PI(e,t){return Qa.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function TI(e,t){return n=>ue(e,t,n)}function el(e){return typeof e=="number"?TI:typeof e=="string"?Ca(e)?Qo:Se.test(e)?vy:MI:Array.isArray(e)?yy:typeof e=="object"?Se.test(e)?vy:AI:Qo}function yy(e,t){const n=[...e],r=n.length,o=e.map((s,i)=>el(s)(s,t[i]));return s=>{for(let i=0;i<r;i++)n[i]=o[i](s);return n}}function AI(e,t){const n={...e,...t},r={};for(const o in n)e[o]!==void 0&&t[o]!==void 0&&(r[o]=el(e[o])(e[o],t[o]));return o=>{for(const s in r)n[s]=r[s](o);return n}}function NI(e,t){var n;const r=[],o={color:0,var:0,number:0};for(let s=0;s<t.values.length;s++){const i=t.types[s],a=e.indexes[i][o[i]],l=(n=e.values[a])!==null&&n!==void 0?n:0;r[s]=l,o[i]++}return r}const MI=(e,t)=>{const n=At.createTransformer(t),r=fr(e),o=fr(t);return r.indexes.var.length===o.indexes.var.length&&r.indexes.color.length===o.indexes.color.length&&r.indexes.number.length>=o.indexes.number.length?Qa.has(e)&&!o.values.length||Qa.has(t)&&!r.values.length?PI(e,t):pr(yy(NI(r,o),o.values),n):($t(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),Qo(e,t))};function by(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?ue(e,t,n):el(e)(e,t)}const II=5;function wy(e,t,n){const r=Math.max(t-II,0);return Fa(n-e(r),t-r)}const fe={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},tl=.001;function DI({duration:e=fe.duration,bounce:t=fe.bounce,velocity:n=fe.velocity,mass:r=fe.mass}){let o,s;$t(e<=He(fe.maxDuration),"Spring duration must be 10 seconds or less");let i=1-t;i=tt(fe.minDamping,fe.maxDamping,i),e=tt(fe.minDuration,fe.maxDuration,et(e)),i<1?(o=c=>{const d=c*i,f=d*e,h=d-n,m=nl(c,i),y=Math.exp(-f);return tl-h/m*y},s=c=>{const f=c*i*e,h=f*n+n,m=Math.pow(i,2)*Math.pow(c,2)*e,y=Math.exp(-f),g=nl(Math.pow(c,2),i);return(-o(c)+tl>0?-1:1)*((h-m)*y)/g}):(o=c=>{const d=Math.exp(-c*e),f=(c-n)*e+1;return-tl+d*f},s=c=>{const d=Math.exp(-c*e),f=(n-c)*(e*e);return d*f});const a=5/e,l=kI(o,s,a);if(e=He(e),isNaN(l))return{stiffness:fe.stiffness,damping:fe.damping,duration:e};{const c=Math.pow(l,2)*r;return{stiffness:c,damping:i*2*Math.sqrt(r*c),duration:e}}}const _I=12;function kI(e,t,n){let r=n;for(let o=1;o<_I;o++)r=r-e(r)/t(r);return r}function nl(e,t){return e*Math.sqrt(1-t*t)}const OI=["duration","bounce"],LI=["stiffness","damping","mass"];function xy(e,t){return t.some(n=>e[n]!==void 0)}function VI(e){let t={velocity:fe.velocity,stiffness:fe.stiffness,damping:fe.damping,mass:fe.mass,isResolvedFromDuration:!1,...e};if(!xy(e,LI)&&xy(e,OI))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),o=r*r,s=2*tt(.05,1,1-(e.bounce||0))*Math.sqrt(o);t={...t,mass:fe.mass,stiffness:o,damping:s}}else{const n=DI(e);t={...t,...n,mass:fe.mass},t.isResolvedFromDuration=!0}return t}function rl(e=fe.visualDuration,t=fe.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:o}=n;const s=n.keyframes[0],i=n.keyframes[n.keyframes.length-1],a={done:!1,value:s},{stiffness:l,damping:c,mass:d,duration:f,velocity:h,isResolvedFromDuration:m}=VI({...n,velocity:-et(n.velocity||0)}),y=h||0,g=c/(2*Math.sqrt(l*d)),v=i-s,b=et(Math.sqrt(l/d)),w=Math.abs(v)<5;r||(r=w?fe.restSpeed.granular:fe.restSpeed.default),o||(o=w?fe.restDelta.granular:fe.restDelta.default);let x;if(g<1){const C=nl(b,g);x=T=>{const A=Math.exp(-g*b*T);return i-A*((y+g*b*v)/C*Math.sin(C*T)+v*Math.cos(C*T))}}else if(g===1)x=C=>i-Math.exp(-b*C)*(v+(y+b*v)*C);else{const C=b*Math.sqrt(g*g-1);x=T=>{const A=Math.exp(-g*b*T),N=Math.min(C*T,300);return i-A*((y+g*b*v)*Math.sinh(N)+C*v*Math.cosh(N))/C}}const S={calculatedDuration:m&&f||null,next:C=>{const T=x(C);if(m)a.done=C>=f;else{let A=0;g<1&&(A=C===0?He(y):wy(x,C,T));const N=Math.abs(A)<=r,I=Math.abs(i-T)<=o;a.done=N&&I}return a.value=a.done?i:T,a},toString:()=>{const C=Math.min(Da(S),Go),T=Mv(A=>S.next(C*A).value,C,30);return C+"ms "+T}};return S}function Sy({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:o=10,bounceStiffness:s=500,modifyTarget:i,min:a,max:l,restDelta:c=.5,restSpeed:d}){const f=e[0],h={done:!1,value:f},m=N=>a!==void 0&&N<a||l!==void 0&&N>l,y=N=>a===void 0?l:l===void 0||Math.abs(a-N)<Math.abs(l-N)?a:l;let g=n*t;const v=f+g,b=i===void 0?v:i(v);b!==v&&(g=b-f);const w=N=>-g*Math.exp(-N/r),x=N=>b+w(N),S=N=>{const I=w(N),O=x(N);h.done=Math.abs(I)<=c,h.value=h.done?b:O};let C,T;const A=N=>{m(h.value)&&(C=N,T=rl({keyframes:[h.value,y(h.value)],velocity:wy(x,N,h.value),damping:o,stiffness:s,restDelta:c,restSpeed:d}))};return A(0),{calculatedDuration:null,next:N=>{let I=!1;return!T&&C===void 0&&(I=!0,S(N),A(N)),C!==void 0&&N>=C?T.next(N-C):(!I&&S(N),h)}}}const $I=ur(.42,0,1,1),FI=ur(0,0,.58,1),Cy=ur(.42,0,.58,1),Ey=e=>Array.isArray(e)&&typeof e[0]!="number",Py={linear:Ee,easeIn:$I,easeInOut:Cy,easeOut:FI,circIn:za,circInOut:Yv,circOut:Kv,backIn:Ba,backInOut:Uv,backOut:jv,anticipate:Gv},ol=e=>{if(_a(e)){Qe(e.length===4,"Cubic bezier arrays must contain four numerical values.");const[t,n,r,o]=e;return ur(t,n,r,o)}else if(typeof e=="string")return Qe(Py[e]!==void 0,`Invalid easing type '${e}'`),Py[e];return e};function RI(e,t,n){const r=[],o=n||by,s=e.length-1;for(let i=0;i<s;i++){let a=o(e[i],e[i+1]);if(t){const l=Array.isArray(t)?t[i]||Ee:t;a=pr(l,a)}r.push(a)}return r}function sl(e,t,{clamp:n=!0,ease:r,mixer:o}={}){const s=e.length;if(Qe(s===t.length,"Both input and output ranges must be the same length"),s===1)return()=>t[0];if(s===2&&t[0]===t[1])return()=>t[1];const i=e[0]===e[1];e[0]>e[s-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=RI(t,r,o),l=a.length,c=d=>{if(i&&d<e[0])return t[0];let f=0;if(l>1)for(;f<e.length-2&&!(d<e[f+1]);f++);const h=Pt(e[f],e[f+1],d);return a[f](h)};return n?d=>c(tt(e[0],e[s-1],d)):c}function Ty(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const o=Pt(0,t,r);e.push(ue(n,1,o))}}function il(e){const t=[0];return Ty(t,e.length-1),t}function BI(e,t){return e.map(n=>n*t)}function zI(e,t){return e.map(()=>t||Cy).splice(0,e.length-1)}function es({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=Ey(r)?r.map(ol):ol(r),s={done:!1,value:t[0]},i=BI(n&&n.length===t.length?n:il(t),e),a=sl(i,t,{ease:Array.isArray(o)?o:zI(t,o)});return{calculatedDuration:e,next:l=>(s.value=a(l),s.done=l>=e,s)}}const WI=e=>{const t=({timestamp:n})=>e(n);return{start:()=>ie.update(t,!0),stop:()=>Le(t),now:()=>be.isProcessing?be.timestamp:rt.now()}},HI={decay:Sy,inertia:Sy,tween:es,keyframes:es,spring:rl},jI=e=>e/100;class ts extends my{constructor(t){super(t),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:l}=this.options;l&&l()};const{name:n,motionValue:r,element:o,keyframes:s}=this.options,i=(o==null?void 0:o.KeyframeResolver)||qa,a=(l,c)=>this.onKeyframesResolved(l,c);this.resolver=new i(s,a,n,r,o),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(t){const{type:n="keyframes",repeat:r=0,repeatDelay:o=0,repeatType:s,velocity:i=0}=this.options,a=Ko(n)?n:HI[n]||es;let l,c;a!==es&&typeof t[0]!="number"&&(process.env.NODE_ENV!=="production"&&Qe(t.length===2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${t}`),l=pr(jI,by(t[0],t[1])),t=[0,100]);const d=a({...this.options,keyframes:t});s==="mirror"&&(c=a({...this.options,keyframes:[...t].reverse(),velocity:-i})),d.calculatedDuration===null&&(d.calculatedDuration=Da(d));const{calculatedDuration:f}=d,h=f+o,m=h*(r+1)-o;return{generator:d,mirroredGenerator:c,mapPercentToKeyframes:l,calculatedDuration:f,resolvedDuration:h,totalDuration:m}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!t?this.pause():this.state=this.pendingPlayState}tick(t,n=!1){const{resolved:r}=this;if(!r){const{keyframes:N}=this.options;return{done:!0,value:N[N.length-1]}}const{finalKeyframe:o,generator:s,mirroredGenerator:i,mapPercentToKeyframes:a,keyframes:l,calculatedDuration:c,totalDuration:d,resolvedDuration:f}=r;if(this.startTime===null)return s.next(0);const{delay:h,repeat:m,repeatType:y,repeatDelay:g,onUpdate:v}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-d/this.speed,this.startTime)),n?this.currentTime=t:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const b=this.currentTime-h*(this.speed>=0?1:-1),w=this.speed>=0?b<0:b>d;this.currentTime=Math.max(b,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=d);let x=this.currentTime,S=s;if(m){const N=Math.min(this.currentTime,d)/f;let I=Math.floor(N),O=N%1;!O&&N>=1&&(O=1),O===1&&I--,I=Math.min(I,m+1),!!(I%2)&&(y==="reverse"?(O=1-O,g&&(O-=g/f)):y==="mirror"&&(S=i)),x=tt(0,1,O)*f}const C=w?{done:!1,value:l[0]}:S.next(x);a&&(C.value=a(C.value));let{done:T}=C;!w&&c!==null&&(T=this.speed>=0?this.currentTime>=d:this.currentTime<=0);const A=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&T);return A&&o!==void 0&&(C.value=Jo(l,this.options,o)),v&&v(C.value),A&&this.finish(),C}get duration(){const{resolved:t}=this;return t?et(t.calculatedDuration):0}get time(){return et(this.currentTime)}set time(t){t=He(t),this.currentTime=t,this.holdTime!==null||this.speed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.speed)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=et(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=WI,onPlay:n,startTime:r}=this.options;this.driver||(this.driver=t(s=>this.tick(s))),n&&n();const o=this.driver.now();this.holdTime!==null?this.startTime=o-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=o):this.startTime=r??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var t;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(t=this.currentTime)!==null&&t!==void 0?t:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}}function UI(e){return new ts(e)}const GI=new Set(["opacity","clipPath","filter","transform"]);function KI(e,t,n,{delay:r=0,duration:o=300,repeat:s=0,repeatType:i="loop",ease:a="easeInOut",times:l}={}){const c={[t]:n};l&&(c.offset=l);const d=Dv(a,o);return Array.isArray(d)&&(c.easing=d),e.animate(c,{delay:r,duration:o,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:s+1,direction:i==="reverse"?"alternate":"normal"})}const YI=ha(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),ns=10,XI=2e4;function qI(e){return Ko(e.type)||e.type==="spring"||!Iv(e.ease)}function ZI(e,t){const n=new ts({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:e[0]};const o=[];let s=0;for(;!r.done&&s<XI;)r=n.sample(s),o.push(r.value),s+=ns;return{times:void 0,keyframes:o,duration:s-ns,ease:"linear"}}const Ay={anticipate:Gv,backInOut:Uv,circInOut:Yv};function JI(e){return e in Ay}class Ny extends my{constructor(t){super(t);const{name:n,motionValue:r,element:o,keyframes:s}=this.options;this.resolver=new py(s,(i,a)=>this.onKeyframesResolved(i,a),n,r,o),this.resolver.scheduleResolve()}initPlayback(t,n){let{duration:r=300,times:o,ease:s,type:i,motionValue:a,name:l,startTime:c}=this.options;if(!a.owner||!a.owner.current)return!1;if(typeof s=="string"&&Yo()&&JI(s)&&(s=Ay[s]),qI(this.options)){const{onComplete:f,onUpdate:h,motionValue:m,element:y,...g}=this.options,v=ZI(t,g);t=v.keyframes,t.length===1&&(t[1]=t[0]),r=v.duration,o=v.times,s=v.ease,i="keyframes"}const d=KI(a.owner.current,l,t,{...this.options,duration:r,times:o,ease:s});return d.startTime=c??this.calcStartTime(),this.pendingTimeline?(Nv(d,this.pendingTimeline),this.pendingTimeline=void 0):d.onfinish=()=>{const{onComplete:f}=this.options;a.set(Jo(t,this.options,n)),f&&f(),this.cancel(),this.resolveFinishedPromise()},{animation:d,duration:r,times:o,type:i,ease:s,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:n}=t;return et(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return et(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=He(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:n}=t;return n.playbackRate}set speed(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:n}=t;return n.playState}get startTime(){const{resolved:t}=this;if(!t)return null;const{animation:n}=t;return n.startTime}attachTimeline(t){if(!this._resolved)this.pendingTimeline=t;else{const{resolved:n}=this;if(!n)return Ee;const{animation:r}=n;Nv(r,t)}return Ee}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:t}=this;if(!t)return;const{animation:n,keyframes:r,duration:o,type:s,ease:i,times:a}=t;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:c,onUpdate:d,onComplete:f,element:h,...m}=this.options,y=new ts({...m,keyframes:r,duration:o,type:s,ease:i,times:a,isGenerator:!0}),g=He(this.time);c.setWithVelocity(y.sample(g-ns).value,y.sample(g).value,ns)}const{onStop:l}=this.options;l&&l(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:n,name:r,repeatDelay:o,repeatType:s,damping:i,type:a}=t;if(!n||!n.owner||!(n.owner.current instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:c}=n.owner.getProps();return YI()&&r&&GI.has(r)&&!l&&!c&&!o&&s!=="mirror"&&i!==0&&a!=="inertia"}}const QI={type:"spring",stiffness:500,damping:25,restSpeed:10},eD=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),tD={type:"keyframes",duration:.8},nD={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},rD=(e,{keyframes:t})=>t.length>2?tD:Ft.has(e)?e.startsWith("scale")?eD(t[1]):QI:nD;function oD({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:o,repeat:s,repeatType:i,repeatDelay:a,from:l,elapsed:c,...d}){return!!Object.keys(d).length}const al=(e,t,n,r={},o,s)=>i=>{const a=Ia(r,e)||{},l=a.delay||r.delay||0;let{elapsed:c=0}=r;c=c-He(l);let d={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-c,onUpdate:h=>{t.set(h),a.onUpdate&&a.onUpdate(h)},onComplete:()=>{i(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:s?void 0:o};oD(a)||(d={...d,...rD(e,d)}),d.duration&&(d.duration=He(d.duration)),d.repeatDelay&&(d.repeatDelay=He(d.repeatDelay)),d.from!==void 0&&(d.keyframes[0]=d.from);let f=!1;if((d.type===!1||d.duration===0&&!d.repeatDelay)&&(d.duration=0,d.delay===0&&(f=!0)),f&&!s&&t.get()!==void 0){const h=Jo(d.keyframes,a);if(h!==void 0)return ie.update(()=>{d.onUpdate(h),d.onComplete()}),new Av([])}return!s&&Ny.supports(d)?new Ny(d):new ts(d)};function sD({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function ll(e,t,{delay:n=0,transitionOverride:r,type:o}={}){var s;let{transition:i=e.getDefaultTransition(),transitionEnd:a,...l}=t;r&&(i=r);const c=[],d=o&&e.animationState&&e.animationState.getState()[o];for(const f in l){const h=e.getValue(f,(s=e.latestValues[f])!==null&&s!==void 0?s:null),m=l[f];if(m===void 0||d&&sD(d,f))continue;const y={delay:n,...Ia(i||{},f)};let g=!1;if(window.MotionHandoffAnimation){const b=Bv(e);if(b){const w=window.MotionHandoffAnimation(b,f,ie);w!==null&&(y.startTime=w,g=!0)}}Ra(e,f),h.start(al(f,h,m,e.shouldReduceMotion&&Fv.has(f)?{type:!1}:y,e,g));const v=h.animation;v&&c.push(v)}return a&&Promise.all(c).then(()=>{ie.update(()=>{a&&z1(e,a)})}),c}function cl(e,t,n={}){var r;const o=Uo(e,t,n.type==="exit"?(r=e.presenceContext)===null||r===void 0?void 0:r.custom:void 0);let{transition:s=e.getDefaultTransition()||{}}=o||{};n.transitionOverride&&(s=n.transitionOverride);const i=o?()=>Promise.all(ll(e,o,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(c=0)=>{const{delayChildren:d=0,staggerChildren:f,staggerDirection:h}=s;return iD(e,t,d+c,f,h,n)}:()=>Promise.resolve(),{when:l}=s;if(l){const[c,d]=l==="beforeChildren"?[i,a]:[a,i];return c().then(()=>d())}else return Promise.all([i(),a(n.delay)])}function iD(e,t,n=0,r=0,o=1,s){const i=[],a=(e.variantChildren.size-1)*r,l=o===1?(c=0)=>c*r:(c=0)=>a-c*r;return Array.from(e.variantChildren).sort(aD).forEach((c,d)=>{c.notify("AnimationStart",t),i.push(cl(c,t,{...s,delay:n+l(d)}).then(()=>c.notify("AnimationComplete",t)))}),Promise.all(i)}function aD(e,t){return e.sortNodePosition(t)}function lD(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const o=t.map(s=>cl(e,s,n));r=Promise.all(o)}else if(typeof t=="string")r=cl(e,t,n);else{const o=typeof t=="function"?Uo(e,t,n.custom):t;r=Promise.all(ll(e,o,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}const cD=va.length;function My(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?My(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<cD;n++){const r=va[n],o=e.props[r];(or(o)||o===!1)&&(t[r]=o)}return t}const uD=[...ga].reverse(),dD=ga.length;function fD(e){return t=>Promise.all(t.map(({animation:n,options:r})=>lD(e,n,r)))}function pD(e){let t=fD(e),n=Iy(),r=!0;const o=l=>(c,d)=>{var f;const h=Uo(e,d,l==="exit"?(f=e.presenceContext)===null||f===void 0?void 0:f.custom:void 0);if(h){const{transition:m,transitionEnd:y,...g}=h;c={...c,...g,...y}}return c};function s(l){t=l(e)}function i(l){const{props:c}=e,d=My(e.parent)||{},f=[],h=new Set;let m={},y=1/0;for(let v=0;v<dD;v++){const b=uD[v],w=n[b],x=c[b]!==void 0?c[b]:d[b],S=or(x),C=b===l?w.isActive:null;C===!1&&(y=v);let T=x===d[b]&&x!==c[b]&&S;if(T&&r&&e.manuallyAnimateOnMount&&(T=!1),w.protectedKeys={...m},!w.isActive&&C===null||!x&&!w.prevProp||Bo(x)||typeof x=="boolean")continue;const A=hD(w.prevProp,x);let N=A||b===l&&w.isActive&&!T&&S||v>y&&S,I=!1;const O=Array.isArray(x)?x:[x];let L=O.reduce(o(b),{});C===!1&&(L={});const{prevResolvedValues:V={}}=w,U={...V,...L},_=B=>{N=!0,h.has(B)&&(I=!0,h.delete(B)),w.needsAnimating[B]=!0;const $=e.getValue(B);$&&($.liveStyle=!1)};for(const B in U){const $=L[B],F=V[B];if(m.hasOwnProperty(B))continue;let ne=!1;Sa($)&&Sa(F)?ne=!Pv($,F):ne=$!==F,ne?$!=null?_(B):h.add(B):$!==void 0&&h.has(B)?_(B):w.protectedKeys[B]=!0}w.prevProp=x,w.prevResolvedValues=L,w.isActive&&(m={...m,...L}),r&&e.blockInitialAnimation&&(N=!1),N&&(!(T&&A)||I)&&f.push(...O.map(B=>({animation:B,options:{type:b}})))}if(h.size){const v={};h.forEach(b=>{const w=e.getBaseTarget(b),x=e.getValue(b);x&&(x.liveStyle=!0),v[b]=w??null}),f.push({animation:v})}let g=!!f.length;return r&&(c.initial===!1||c.initial===c.animate)&&!e.manuallyAnimateOnMount&&(g=!1),r=!1,g?t(f):Promise.resolve()}function a(l,c){var d;if(n[l].isActive===c)return Promise.resolve();(d=e.variantChildren)===null||d===void 0||d.forEach(h=>{var m;return(m=h.animationState)===null||m===void 0?void 0:m.setActive(l,c)}),n[l].isActive=c;const f=i(l);for(const h in n)n[h].protectedKeys={};return f}return{animateChanges:i,setActive:a,setAnimateFunction:s,getState:()=>n,reset:()=>{n=Iy(),r=!0}}}function hD(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!Pv(t,e):!1}function zt(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Iy(){return{animate:zt(!0),whileInView:zt(),whileHover:zt(),whileTap:zt(),whileDrag:zt(),whileFocus:zt(),exit:zt()}}class Nt{constructor(t){this.isMounted=!1,this.node=t}update(){}}class mD extends Nt{constructor(t){super(t),t.animationState||(t.animationState=pD(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Bo(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)===null||t===void 0||t.call(this)}}let gD=0;class vD extends Nt{constructor(){super(...arguments),this.id=gD++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const o=this.node.animationState.setActive("exit",!t);n&&!t&&o.then(()=>n(this.id))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}const yD={animation:{Feature:mD},exit:{Feature:vD}};function hr(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function mr(e){return{point:{x:e.pageX,y:e.pageY}}}const bD=e=>t=>Oa(t)&&e(t,mr(t));function gr(e,t,n,r){return hr(e,t,bD(n),r)}const Dy=(e,t)=>Math.abs(e-t);function wD(e,t){const n=Dy(e.x,t.x),r=Dy(e.y,t.y);return Math.sqrt(n**2+r**2)}class _y{constructor(t,n,{transformPagePoint:r,contextWindow:o,dragSnapToOrigin:s=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const f=dl(this.lastMoveEventInfo,this.history),h=this.startEvent!==null,m=wD(f.offset,{x:0,y:0})>=3;if(!h&&!m)return;const{point:y}=f,{timestamp:g}=be;this.history.push({...y,timestamp:g});const{onStart:v,onMove:b}=this.handlers;h||(v&&v(this.lastMoveEvent,f),this.startEvent=this.lastMoveEvent),b&&b(this.lastMoveEvent,f)},this.handlePointerMove=(f,h)=>{this.lastMoveEvent=f,this.lastMoveEventInfo=ul(h,this.transformPagePoint),ie.update(this.updatePoint,!0)},this.handlePointerUp=(f,h)=>{this.end();const{onEnd:m,onSessionEnd:y,resumeAnimation:g}=this.handlers;if(this.dragSnapToOrigin&&g&&g(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const v=dl(f.type==="pointercancel"?this.lastMoveEventInfo:ul(h,this.transformPagePoint),this.history);this.startEvent&&m&&m(f,v),y&&y(f,v)},!Oa(t))return;this.dragSnapToOrigin=s,this.handlers=n,this.transformPagePoint=r,this.contextWindow=o||window;const i=mr(t),a=ul(i,this.transformPagePoint),{point:l}=a,{timestamp:c}=be;this.history=[{...l,timestamp:c}];const{onSessionStart:d}=n;d&&d(t,dl(a,this.history)),this.removeListeners=pr(gr(this.contextWindow,"pointermove",this.handlePointerMove),gr(this.contextWindow,"pointerup",this.handlePointerUp),gr(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Le(this.updatePoint)}}function ul(e,t){return t?{point:t(e.point)}:e}function ky(e,t){return{x:e.x-t.x,y:e.y-t.y}}function dl({point:e},t){return{point:e,delta:ky(e,Oy(t)),offset:ky(e,xD(t)),velocity:SD(t,.1)}}function xD(e){return e[0]}function Oy(e){return e[e.length-1]}function SD(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=Oy(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>He(t)));)n--;if(!r)return{x:0,y:0};const s=et(o.timestamp-r.timestamp);if(s===0)return{x:0,y:0};const i={x:(o.x-r.x)/s,y:(o.y-r.y)/s};return i.x===1/0&&(i.x=0),i.y===1/0&&(i.y=0),i}const Ly=1e-4,CD=1-Ly,ED=1+Ly,Vy=.01,PD=0-Vy,TD=0+Vy;function Me(e){return e.max-e.min}function AD(e,t,n){return Math.abs(e-t)<=n}function $y(e,t,n,r=.5){e.origin=r,e.originPoint=ue(t.min,t.max,e.origin),e.scale=Me(n)/Me(t),e.translate=ue(n.min,n.max,e.origin)-e.originPoint,(e.scale>=CD&&e.scale<=ED||isNaN(e.scale))&&(e.scale=1),(e.translate>=PD&&e.translate<=TD||isNaN(e.translate))&&(e.translate=0)}function vr(e,t,n,r){$y(e.x,t.x,n.x,r?r.originX:void 0),$y(e.y,t.y,n.y,r?r.originY:void 0)}function Fy(e,t,n){e.min=n.min+t.min,e.max=e.min+Me(t)}function ND(e,t,n){Fy(e.x,t.x,n.x),Fy(e.y,t.y,n.y)}function Ry(e,t,n){e.min=t.min-n.min,e.max=e.min+Me(t)}function yr(e,t,n){Ry(e.x,t.x,n.x),Ry(e.y,t.y,n.y)}function MD(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?ue(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?ue(n,e,r.max):Math.min(e,n)),e}function By(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function ID(e,{top:t,left:n,bottom:r,right:o}){return{x:By(e.x,n,o),y:By(e.y,t,r)}}function zy(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function DD(e,t){return{x:zy(e.x,t.x),y:zy(e.y,t.y)}}function _D(e,t){let n=.5;const r=Me(e),o=Me(t);return o>r?n=Pt(t.min,t.max-r,e.min):r>o&&(n=Pt(e.min,e.max-o,t.min)),tt(0,1,n)}function kD(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const fl=.35;function OD(e=fl){return e===!1?e=0:e===!0&&(e=fl),{x:Wy(e,"left","right"),y:Wy(e,"top","bottom")}}function Wy(e,t,n){return{min:Hy(e,t),max:Hy(e,n)}}function Hy(e,t){return typeof e=="number"?e:e[t]||0}const jy=()=>({translate:0,scale:1,origin:0,originPoint:0}),Sn=()=>({x:jy(),y:jy()}),Uy=()=>({min:0,max:0}),ge=()=>({x:Uy(),y:Uy()});function Ve(e){return[e("x"),e("y")]}function Gy({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function LD({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function VD(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}function pl(e){return e===void 0||e===1}function hl({scale:e,scaleX:t,scaleY:n}){return!pl(e)||!pl(t)||!pl(n)}function Wt(e){return hl(e)||Ky(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Ky(e){return Yy(e.x)||Yy(e.y)}function Yy(e){return e&&e!=="0%"}function rs(e,t,n){const r=e-n,o=t*r;return n+o}function Xy(e,t,n,r,o){return o!==void 0&&(e=rs(e,o,r)),rs(e,n,r)+t}function ml(e,t=0,n=1,r,o){e.min=Xy(e.min,t,n,r,o),e.max=Xy(e.max,t,n,r,o)}function qy(e,{x:t,y:n}){ml(e.x,t.translate,t.scale,t.originPoint),ml(e.y,n.translate,n.scale,n.originPoint)}const Zy=.999999999999,Jy=1.0000000000001;function $D(e,t,n,r=!1){const o=n.length;if(!o)return;t.x=t.y=1;let s,i;for(let a=0;a<o;a++){s=n[a],i=s.projectionDelta;const{visualElement:l}=s.options;l&&l.props.style&&l.props.style.display==="contents"||(r&&s.options.layoutScroll&&s.scroll&&s!==s.root&&En(e,{x:-s.scroll.offset.x,y:-s.scroll.offset.y}),i&&(t.x*=i.x.scale,t.y*=i.y.scale,qy(e,i)),r&&Wt(s.latestValues)&&En(e,s.latestValues))}t.x<Jy&&t.x>Zy&&(t.x=1),t.y<Jy&&t.y>Zy&&(t.y=1)}function Cn(e,t){e.min=e.min+t,e.max=e.max+t}function Qy(e,t,n,r,o=.5){const s=ue(e.min,e.max,o);ml(e,t,n,s,r)}function En(e,t){Qy(e.x,t.x,t.scaleX,t.scale,t.originX),Qy(e.y,t.y,t.scaleY,t.scale,t.originY)}function eb(e,t){return Gy(VD(e.getBoundingClientRect(),t))}function FD(e,t,n){const r=eb(e,n),{scroll:o}=t;return o&&(Cn(r.x,o.offset.x),Cn(r.y,o.offset.y)),r}const tb=({current:e})=>e?e.ownerDocument.defaultView:null,RD=new WeakMap;class BD{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=ge(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const o=d=>{const{dragSnapToOrigin:f}=this.getProps();f?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(mr(d).point)},s=(d,f)=>{const{drag:h,dragPropagation:m,onDragStart:y}=this.getProps();if(h&&!m&&(this.openDragLock&&this.openDragLock(),this.openDragLock=V1(h),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Ve(v=>{let b=this.getAxisMotionValue(v).get()||0;if(nt.test(b)){const{projection:w}=this.visualElement;if(w&&w.layout){const x=w.layout.layoutBox[v];x&&(b=Me(x)*(parseFloat(b)/100))}}this.originPoint[v]=b}),y&&ie.postRender(()=>y(d,f)),Ra(this.visualElement,"transform");const{animationState:g}=this.visualElement;g&&g.setActive("whileDrag",!0)},i=(d,f)=>{const{dragPropagation:h,dragDirectionLock:m,onDirectionLock:y,onDrag:g}=this.getProps();if(!h&&!this.openDragLock)return;const{offset:v}=f;if(m&&this.currentDirection===null){this.currentDirection=zD(v),this.currentDirection!==null&&y&&y(this.currentDirection);return}this.updateAxis("x",f.point,v),this.updateAxis("y",f.point,v),this.visualElement.render(),g&&g(d,f)},a=(d,f)=>this.stop(d,f),l=()=>Ve(d=>{var f;return this.getAnimationState(d)==="paused"&&((f=this.getAxisMotionValue(d).animation)===null||f===void 0?void 0:f.play())}),{dragSnapToOrigin:c}=this.getProps();this.panSession=new _y(t,{onSessionStart:o,onStart:s,onMove:i,onSessionEnd:a,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,contextWindow:tb(this.visualElement)})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:o}=n;this.startAnimation(o);const{onDragEnd:s}=this.getProps();s&&ie.postRender(()=>s(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:o}=this.getProps();if(!r||!os(t,o,this.currentDirection))return;const s=this.getAxisMotionValue(t);let i=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(i=MD(i,this.constraints[t],this.elastic[t])),s.set(i)}resolveConstraints(){var t;const{dragConstraints:n,dragElastic:r}=this.getProps(),o=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(t=this.visualElement.projection)===null||t===void 0?void 0:t.layout,s=this.constraints;n&&vn(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&o?this.constraints=ID(o.layoutBox,n):this.constraints=!1,this.elastic=OD(r),s!==this.constraints&&o&&this.constraints&&!this.hasMutatedConstraints&&Ve(i=>{this.constraints!==!1&&this.getAxisMotionValue(i)&&(this.constraints[i]=kD(o.layoutBox[i],this.constraints[i]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!vn(t))return!1;const r=t.current;Qe(r!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");const{projection:o}=this.visualElement;if(!o||!o.layout)return!1;const s=FD(r,o.root,this.visualElement.getTransformPagePoint());let i=DD(o.layout.layoutBox,s);if(n){const a=n(LD(i));this.hasMutatedConstraints=!!a,a&&(i=Gy(a))}return i}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:o,dragTransition:s,dragSnapToOrigin:i,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=Ve(d=>{if(!os(d,n,this.currentDirection))return;let f=l&&l[d]||{};i&&(f={min:0,max:0});const h=o?200:1e6,m=o?40:1e7,y={type:"inertia",velocity:r?t[d]:0,bounceStiffness:h,bounceDamping:m,timeConstant:750,restDelta:1,restSpeed:10,...s,...f};return this.startAxisValueAnimation(d,y)});return Promise.all(c).then(a)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return Ra(this.visualElement,t),r.start(al(t,r,0,n,this.visualElement,!1))}stopAnimation(){Ve(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){Ve(t=>{var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,r=this.visualElement.getProps(),o=r[n];return o||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){Ve(n=>{const{drag:r}=this.getProps();if(!os(n,r,this.currentDirection))return;const{projection:o}=this.visualElement,s=this.getAxisMotionValue(n);if(o&&o.layout){const{min:i,max:a}=o.layout.layoutBox[n];s.set(t[n]-ue(i,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!vn(n)||!r||!this.constraints)return;this.stopAnimation();const o={x:0,y:0};Ve(i=>{const a=this.getAxisMotionValue(i);if(a&&this.constraints!==!1){const l=a.get();o[i]=_D({min:l,max:l},this.constraints[i])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),Ve(i=>{if(!os(i,t,null))return;const a=this.getAxisMotionValue(i),{min:l,max:c}=this.constraints[i];a.set(ue(l,c,o[i]))})}addListeners(){if(!this.visualElement.current)return;RD.set(this.visualElement,this);const t=this.visualElement.current,n=gr(t,"pointerdown",l=>{const{drag:c,dragListener:d=!0}=this.getProps();c&&d&&this.start(l)}),r=()=>{const{dragConstraints:l}=this.getProps();vn(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:o}=this.visualElement,s=o.addEventListener("measure",r);o&&!o.layout&&(o.root&&o.root.updateScroll(),o.updateLayout()),ie.read(r);const i=hr(window,"resize",()=>this.scalePositionWithinConstraints()),a=o.addEventListener("didUpdate",({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(Ve(d=>{const f=this.getAxisMotionValue(d);f&&(this.originPoint[d]+=l[d].translate,f.set(f.get()+l[d].translate))}),this.visualElement.render())});return()=>{i(),n(),s(),a&&a()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:o=!1,dragConstraints:s=!1,dragElastic:i=fl,dragMomentum:a=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:o,dragConstraints:s,dragElastic:i,dragMomentum:a}}}function os(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function zD(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class WD extends Nt{constructor(t){super(t),this.removeGroupControls=Ee,this.removeListeners=Ee,this.controls=new BD(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Ee}unmount(){this.removeGroupControls(),this.removeListeners()}}const nb=e=>(t,n)=>{e&&ie.postRender(()=>e(t,n))};class HD extends Nt{constructor(){super(...arguments),this.removePointerDownListener=Ee}onPointerDown(t){this.session=new _y(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:tb(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:o}=this.node.getProps();return{onSessionStart:nb(t),onStart:nb(n),onMove:r,onEnd:(s,i)=>{delete this.session,o&&ie.postRender(()=>o(s,i))}}}mount(){this.removePointerDownListener=gr(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const ss={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function rb(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const br={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(te.test(e))e=parseFloat(e);else return e;const n=rb(e,t.target.x),r=rb(e,t.target.y);return`${n}% ${r}%`}},jD={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,o=At.parse(e);if(o.length>5)return r;const s=At.createTransformer(e),i=typeof o[0]!="number"?1:0,a=n.x.scale*t.x,l=n.y.scale*t.y;o[0+i]/=a,o[1+i]/=l;const c=ue(a,l,.5);return typeof o[2+i]=="number"&&(o[2+i]/=c),typeof o[3+i]=="number"&&(o[3+i]/=c),s(o)}};class UD extends P.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:o}=this.props,{projection:s}=t;v1(GD),s&&(n.group&&n.group.add(s),r&&r.register&&o&&r.register(s),s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,onExitComplete:()=>this.safeToRemove()})),ss.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:o,isPresent:s}=this.props,i=r.projection;return i&&(i.isPresent=s,o||t.layoutDependency!==n||n===void 0?i.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?i.promote():i.relegate()||ie.postRender(()=>{const a=i.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),ba.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:o}=t;o&&(o.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(o),r&&r.deregister&&r.deregister(o))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function ob(e){const[t,n]=Zg(),r=P.useContext(fa);return p.jsx(UD,{...e,layoutGroup:r,switchLayoutGroup:P.useContext(av),isPresent:t,safeToRemove:n})}const GD={borderRadius:{...br,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:br,borderTopRightRadius:br,borderBottomLeftRadius:br,borderBottomRightRadius:br,boxShadow:jD};function sb(e,t,n){const r=me(e)?e:ot(e);return r.start(al("",r,t,n)),r.animation}function ib(e){return e instanceof SVGElement&&e.tagName!=="svg"}const KD=(e,t)=>e.depth-t.depth;class YD{constructor(){this.children=[],this.isDirty=!1}add(t){Va(this.children,t),this.isDirty=!0}remove(t){Zo(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(KD),this.isDirty=!1,this.children.forEach(t)}}function XD(e,t){const n=rt.now(),r=({timestamp:o})=>{const s=o-n;s>=t&&(Le(r),e(s-t))};return ie.read(r,!0),()=>Le(r)}const ab=["TopLeft","TopRight","BottomLeft","BottomRight"],qD=ab.length,lb=e=>typeof e=="string"?parseFloat(e):e,cb=e=>typeof e=="number"||te.test(e);function ZD(e,t,n,r,o,s){o?(e.opacity=ue(0,n.opacity!==void 0?n.opacity:1,JD(r)),e.opacityExit=ue(t.opacity!==void 0?t.opacity:1,0,QD(r))):s&&(e.opacity=ue(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let i=0;i<qD;i++){const a=`border${ab[i]}Radius`;let l=ub(t,a),c=ub(n,a);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||cb(l)===cb(c)?(e[a]=Math.max(ue(lb(l),lb(c),r),0),(nt.test(c)||nt.test(l))&&(e[a]+="%")):e[a]=c}(t.rotate||n.rotate)&&(e.rotate=ue(t.rotate||0,n.rotate||0,r))}function ub(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const JD=db(0,.5,Kv),QD=db(.5,.95,Ee);function db(e,t,n){return r=>r<e?0:r>t?1:n(Pt(e,t,r))}function fb(e,t){e.min=t.min,e.max=t.max}function $e(e,t){fb(e.x,t.x),fb(e.y,t.y)}function pb(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function hb(e,t,n,r,o){return e-=t,e=rs(e,1/n,r),o!==void 0&&(e=rs(e,1/o,r)),e}function e_(e,t=0,n=1,r=.5,o,s=e,i=e){if(nt.test(t)&&(t=parseFloat(t),t=ue(i.min,i.max,t/100)-i.min),typeof t!="number")return;let a=ue(s.min,s.max,r);e===s&&(a-=t),e.min=hb(e.min,t,n,a,o),e.max=hb(e.max,t,n,a,o)}function mb(e,t,[n,r,o],s,i){e_(e,t[n],t[r],t[o],t.scale,s,i)}const t_=["x","scaleX","originX"],n_=["y","scaleY","originY"];function gb(e,t,n,r){mb(e.x,t,t_,n?n.x:void 0,r?r.x:void 0),mb(e.y,t,n_,n?n.y:void 0,r?r.y:void 0)}function vb(e){return e.translate===0&&e.scale===1}function yb(e){return vb(e.x)&&vb(e.y)}function bb(e,t){return e.min===t.min&&e.max===t.max}function r_(e,t){return bb(e.x,t.x)&&bb(e.y,t.y)}function wb(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function xb(e,t){return wb(e.x,t.x)&&wb(e.y,t.y)}function Sb(e){return Me(e.x)/Me(e.y)}function Cb(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class o_{constructor(){this.members=[]}add(t){Va(this.members,t),t.scheduleRender()}remove(t){if(Zo(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(o=>t===o);if(n===0)return!1;let r;for(let o=n;o>=0;o--){const s=this.members[o];if(s.isPresent!==!1){r=s;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:o}=t.options;o===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function s_(e,t,n){let r="";const o=e.x.translate/t.x,s=e.y.translate/t.y,i=(n==null?void 0:n.z)||0;if((o||s||i)&&(r=`translate3d(${o}px, ${s}px, ${i}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:c,rotate:d,rotateX:f,rotateY:h,skewX:m,skewY:y}=n;c&&(r=`perspective(${c}px) ${r}`),d&&(r+=`rotate(${d}deg) `),f&&(r+=`rotateX(${f}deg) `),h&&(r+=`rotateY(${h}deg) `),m&&(r+=`skewX(${m}deg) `),y&&(r+=`skewY(${y}deg) `)}const a=e.x.scale*t.x,l=e.y.scale*t.y;return(a!==1||l!==1)&&(r+=`scale(${a}, ${l})`),r||"none"}const Ht={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},wr=typeof window<"u"&&window.MotionDebug!==void 0,gl=["","X","Y","Z"],i_={visibility:"hidden"},Eb=1e3;let a_=0;function vl(e,t,n,r){const{latestValues:o}=t;o[e]&&(n[e]=o[e],t.setStaticValue(e,0),r&&(r[e]=0))}function Pb(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=Bv(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:o,layoutId:s}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",ie,!(o||s))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&Pb(r)}function Tb({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(i={},a=t==null?void 0:t()){this.id=a_++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,wr&&(Ht.totalNodes=Ht.resolvedTargetDeltas=Ht.recalculatedProjection=0),this.nodes.forEach(u_),this.nodes.forEach(m_),this.nodes.forEach(g_),this.nodes.forEach(d_),wr&&window.MotionDebug.record(Ht)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=i,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new YD)}addEventListener(i,a){return this.eventHandlers.has(i)||this.eventHandlers.set(i,new $a),this.eventHandlers.get(i).add(a)}notifyListeners(i,...a){const l=this.eventHandlers.get(i);l&&l.notify(...a)}hasListeners(i){return this.eventHandlers.has(i)}mount(i,a=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=ib(i),this.instance=i;const{layoutId:l,layout:c,visualElement:d}=this.options;if(d&&!d.current&&d.mount(i),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),a&&(c||l)&&(this.isLayoutDirty=!0),e){let f;const h=()=>this.root.updateBlockedByResize=!1;e(i,()=>{this.root.updateBlockedByResize=!0,f&&f(),f=XD(h,250),ss.hasAnimatedSinceResize&&(ss.hasAnimatedSinceResize=!1,this.nodes.forEach(Nb))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&d&&(l||c)&&this.addEventListener("didUpdate",({delta:f,hasLayoutChanged:h,hasRelativeTargetChanged:m,layout:y})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const g=this.options.transition||d.getDefaultTransition()||x_,{onLayoutAnimationStart:v,onLayoutAnimationComplete:b}=d.getProps(),w=!this.targetLayout||!xb(this.targetLayout,y)||m,x=!h&&m;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||x||h&&(w||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(f,x);const S={...Ia(g,"layout"),onPlay:v,onComplete:b};(d.shouldReduceMotion||this.options.layoutRoot)&&(S.delay=0,S.type=!1),this.startAnimation(S)}else h||Nb(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=y})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const i=this.getStack();i&&i.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,Le(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(v_),this.animationId++)}getTransformTemplate(){const{visualElement:i}=this.options;return i&&i.getProps().transformTemplate}willUpdate(i=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Pb(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let d=0;d<this.path.length;d++){const f=this.path[d];f.shouldResetTransform=!0,f.updateScroll("snapshot"),f.options.layoutRoot&&f.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const c=this.getTransformTemplate();this.prevTransformTemplateValue=c?c(this.latestValues,""):void 0,this.updateSnapshot(),i&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Ab);return}this.isUpdating||this.nodes.forEach(p_),this.isUpdating=!1,this.nodes.forEach(h_),this.nodes.forEach(l_),this.nodes.forEach(c_),this.clearAllSnapshots();const a=rt.now();be.delta=tt(0,1e3/60,a-be.timestamp),be.timestamp=a,be.isProcessing=!0,ma.update.process(be),ma.preRender.process(be),ma.render.process(be),be.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,ba.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(f_),this.sharedNodes.forEach(y_)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,ie.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){ie.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const i=this.layout;this.layout=this.measure(!1),this.layoutCorrected=ge(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,i?i.layoutBox:void 0)}updateScroll(i="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===i&&(a=!1),a){const l=r(this.instance);this.scroll={animationId:this.root.animationId,phase:i,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!o)return;const i=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!yb(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,d=c!==this.prevTransformTemplateValue;i&&(a||Wt(this.latestValues)||d)&&(o(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(i=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return i&&(l=this.removeTransform(l)),S_(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var i;const{visualElement:a}=this.options;if(!a)return ge();const l=a.measureViewportBox();if(!(((i=this.scroll)===null||i===void 0?void 0:i.wasRoot)||this.path.some(C_))){const{scroll:d}=this.root;d&&(Cn(l.x,d.offset.x),Cn(l.y,d.offset.y))}return l}removeElementScroll(i){var a;const l=ge();if($e(l,i),!((a=this.scroll)===null||a===void 0)&&a.wasRoot)return l;for(let c=0;c<this.path.length;c++){const d=this.path[c],{scroll:f,options:h}=d;d!==this.root&&f&&h.layoutScroll&&(f.wasRoot&&$e(l,i),Cn(l.x,f.offset.x),Cn(l.y,f.offset.y))}return l}applyTransform(i,a=!1){const l=ge();$e(l,i);for(let c=0;c<this.path.length;c++){const d=this.path[c];!a&&d.options.layoutScroll&&d.scroll&&d!==d.root&&En(l,{x:-d.scroll.offset.x,y:-d.scroll.offset.y}),Wt(d.latestValues)&&En(l,d.latestValues)}return Wt(this.latestValues)&&En(l,this.latestValues),l}removeTransform(i){const a=ge();$e(a,i);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!Wt(c.latestValues))continue;hl(c.latestValues)&&c.updateSnapshot();const d=ge(),f=c.measurePageBox();$e(d,f),gb(a,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,d)}return Wt(this.latestValues)&&gb(a,this.latestValues),a}setTargetDelta(i){this.targetDelta=i,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(i){this.options={...this.options,...i,crossfade:i.crossfade!==void 0?i.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==be.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(i=!1){var a;const l=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=l.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=l.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=l.isSharedProjectionDirty);const c=!!this.resumingFrom||this!==l;if(!(i||c&&this.isSharedProjectionDirty||this.isProjectionDirty||!((a=this.parent)===null||a===void 0)&&a.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:f,layoutId:h}=this.options;if(!(!this.layout||!(f||h))){if(this.resolvedRelativeTargetAt=be.timestamp,!this.targetDelta&&!this.relativeTarget){const m=this.getClosestProjectingParent();m&&m.layout&&this.animationProgress!==1?(this.relativeParent=m,this.forceRelativeParentToResolveTarget(),this.relativeTarget=ge(),this.relativeTargetOrigin=ge(),yr(this.relativeTargetOrigin,this.layout.layoutBox,m.layout.layoutBox),$e(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)){if(this.target||(this.target=ge(),this.targetWithTransforms=ge()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),ND(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):$e(this.target,this.layout.layoutBox),qy(this.target,this.targetDelta)):$e(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const m=this.getClosestProjectingParent();m&&!!m.resumingFrom==!!this.resumingFrom&&!m.options.layoutScroll&&m.target&&this.animationProgress!==1?(this.relativeParent=m,this.forceRelativeParentToResolveTarget(),this.relativeTarget=ge(),this.relativeTargetOrigin=ge(),yr(this.relativeTargetOrigin,this.target,m.target),$e(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}wr&&Ht.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(!(!this.parent||hl(this.parent.latestValues)||Ky(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var i;const a=this.getLead(),l=!!this.resumingFrom||this!==a;let c=!0;if((this.isProjectionDirty||!((i=this.parent)===null||i===void 0)&&i.isProjectionDirty)&&(c=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===be.timestamp&&(c=!1),c)return;const{layout:d,layoutId:f}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(d||f))return;$e(this.layoutCorrected,this.layout.layoutBox);const h=this.treeScale.x,m=this.treeScale.y;$D(this.layoutCorrected,this.treeScale,this.path,l),a.layout&&!a.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(a.target=a.layout.layoutBox,a.targetWithTransforms=ge());const{target:y}=a;if(!y){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(pb(this.prevProjectionDelta.x,this.projectionDelta.x),pb(this.prevProjectionDelta.y,this.projectionDelta.y)),vr(this.projectionDelta,this.layoutCorrected,y,this.latestValues),(this.treeScale.x!==h||this.treeScale.y!==m||!Cb(this.projectionDelta.x,this.prevProjectionDelta.x)||!Cb(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",y)),wr&&Ht.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(i=!0){var a;if((a=this.options.visualElement)===null||a===void 0||a.scheduleRender(),i){const l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Sn(),this.projectionDelta=Sn(),this.projectionDeltaWithTransform=Sn()}setAnimationOrigin(i,a=!1){const l=this.snapshot,c=l?l.latestValues:{},d={...this.latestValues},f=Sn();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const h=ge(),m=l?l.source:void 0,y=this.layout?this.layout.source:void 0,g=m!==y,v=this.getStack(),b=!v||v.members.length<=1,w=!!(g&&!b&&this.options.crossfade===!0&&!this.path.some(w_));this.animationProgress=0;let x;this.mixTargetDelta=S=>{const C=S/1e3;Mb(f.x,i.x,C),Mb(f.y,i.y,C),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(yr(h,this.layout.layoutBox,this.relativeParent.layout.layoutBox),b_(this.relativeTarget,this.relativeTargetOrigin,h,C),x&&r_(this.relativeTarget,x)&&(this.isProjectionDirty=!1),x||(x=ge()),$e(x,this.relativeTarget)),g&&(this.animationValues=d,ZD(d,c,this.latestValues,C,w,b)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=C},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(i){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Le(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=ie.update(()=>{ss.hasAnimatedSinceResize=!0,this.currentAnimation=sb(0,Eb,{...i,onUpdate:a=>{this.mixTargetDelta(a),i.onUpdate&&i.onUpdate(a)},onComplete:()=>{i.onComplete&&i.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const i=this.getStack();i&&i.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Eb),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const i=this.getLead();let{targetWithTransforms:a,target:l,layout:c,latestValues:d}=i;if(!(!a||!l||!c)){if(this!==i&&this.layout&&c&&Ob(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||ge();const f=Me(this.layout.layoutBox.x);l.x.min=i.target.x.min,l.x.max=l.x.min+f;const h=Me(this.layout.layoutBox.y);l.y.min=i.target.y.min,l.y.max=l.y.min+h}$e(a,l),En(a,d),vr(this.projectionDeltaWithTransform,this.layoutCorrected,a,d)}}registerSharedNode(i,a){this.sharedNodes.has(i)||this.sharedNodes.set(i,new o_),this.sharedNodes.get(i).add(a);const c=a.options.initialPromotionConfig;a.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(a):void 0})}isLead(){const i=this.getStack();return i?i.lead===this:!0}getLead(){var i;const{layoutId:a}=this.options;return a?((i=this.getStack())===null||i===void 0?void 0:i.lead)||this:this}getPrevLead(){var i;const{layoutId:a}=this.options;return a?(i=this.getStack())===null||i===void 0?void 0:i.prevLead:void 0}getStack(){const{layoutId:i}=this.options;if(i)return this.root.sharedNodes.get(i)}promote({needsReset:i,transition:a,preserveFollowOpacity:l}={}){const c=this.getStack();c&&c.promote(this,l),i&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const i=this.getStack();return i?i.relegate(this):!1}resetSkewAndRotation(){const{visualElement:i}=this.options;if(!i)return;let a=!1;const{latestValues:l}=i;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const c={};l.z&&vl("z",i,c,this.animationValues);for(let d=0;d<gl.length;d++)vl(`rotate${gl[d]}`,i,c,this.animationValues),vl(`skew${gl[d]}`,i,c,this.animationValues);i.render();for(const d in c)i.setStaticValue(d,c[d]),this.animationValues&&(this.animationValues[d]=c[d]);i.scheduleRender()}getProjectionStyles(i){var a,l;if(!this.instance||this.isSVG)return;if(!this.isVisible)return i_;const c={visibility:""},d=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,c.opacity="",c.pointerEvents=Wo(i==null?void 0:i.pointerEvents)||"",c.transform=d?d(this.latestValues,""):"none",c;const f=this.getLead();if(!this.projectionDelta||!this.layout||!f.target){const g={};return this.options.layoutId&&(g.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,g.pointerEvents=Wo(i==null?void 0:i.pointerEvents)||""),this.hasProjected&&!Wt(this.latestValues)&&(g.transform=d?d({},""):"none",this.hasProjected=!1),g}const h=f.animationValues||f.latestValues;this.applyTransformsToTarget(),c.transform=s_(this.projectionDeltaWithTransform,this.treeScale,h),d&&(c.transform=d(h,c.transform));const{x:m,y}=this.projectionDelta;c.transformOrigin=`${m.origin*100}% ${y.origin*100}% 0`,f.animationValues?c.opacity=f===this?(l=(a=h.opacity)!==null&&a!==void 0?a:this.latestValues.opacity)!==null&&l!==void 0?l:1:this.preserveOpacity?this.latestValues.opacity:h.opacityExit:c.opacity=f===this?h.opacity!==void 0?h.opacity:"":h.opacityExit!==void 0?h.opacityExit:0;for(const g in jo){if(h[g]===void 0)continue;const{correct:v,applyTo:b}=jo[g],w=c.transform==="none"?h[g]:v(h[g],f);if(b){const x=b.length;for(let S=0;S<x;S++)c[b[S]]=w}else c[g]=w}return this.options.layoutId&&(c.pointerEvents=f===this?Wo(i==null?void 0:i.pointerEvents)||"":"none"),c}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(i=>{var a;return(a=i.currentAnimation)===null||a===void 0?void 0:a.stop()}),this.root.nodes.forEach(Ab),this.root.sharedNodes.clear()}}}function l_(e){e.updateLayout()}function c_(e){var t;const n=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:r,measuredBox:o}=e.layout,{animationType:s}=e.options,i=n.source!==e.layout.source;s==="size"?Ve(f=>{const h=i?n.measuredBox[f]:n.layoutBox[f],m=Me(h);h.min=r[f].min,h.max=h.min+m}):Ob(s,n.layoutBox,r)&&Ve(f=>{const h=i?n.measuredBox[f]:n.layoutBox[f],m=Me(r[f]);h.max=h.min+m,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[f].max=e.relativeTarget[f].min+m)});const a=Sn();vr(a,r,n.layoutBox);const l=Sn();i?vr(l,e.applyTransform(o,!0),n.measuredBox):vr(l,r,n.layoutBox);const c=!yb(a);let d=!1;if(!e.resumeFrom){const f=e.getClosestProjectingParent();if(f&&!f.resumeFrom){const{snapshot:h,layout:m}=f;if(h&&m){const y=ge();yr(y,n.layoutBox,h.layoutBox);const g=ge();yr(g,r,m.layoutBox),xb(y,g)||(d=!0),f.options.layoutRoot&&(e.relativeTarget=g,e.relativeTargetOrigin=y,e.relativeParent=f)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:l,layoutDelta:a,hasLayoutChanged:c,hasRelativeTargetChanged:d})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function u_(e){wr&&Ht.totalNodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function d_(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function f_(e){e.clearSnapshot()}function Ab(e){e.clearMeasurements()}function p_(e){e.isLayoutDirty=!1}function h_(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Nb(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function m_(e){e.resolveTargetDelta()}function g_(e){e.calcProjection()}function v_(e){e.resetSkewAndRotation()}function y_(e){e.removeLeadSnapshot()}function Mb(e,t,n){e.translate=ue(t.translate,0,n),e.scale=ue(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Ib(e,t,n,r){e.min=ue(t.min,n.min,r),e.max=ue(t.max,n.max,r)}function b_(e,t,n,r){Ib(e.x,t.x,n.x,r),Ib(e.y,t.y,n.y,r)}function w_(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const x_={duration:.45,ease:[.4,0,.1,1]},Db=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),_b=Db("applewebkit/")&&!Db("chrome/")?Math.round:Ee;function kb(e){e.min=_b(e.min),e.max=_b(e.max)}function S_(e){kb(e.x),kb(e.y)}function Ob(e,t,n){return e==="position"||e==="preserve-aspect"&&!AD(Sb(t),Sb(n),.2)}function C_(e){var t;return e!==e.root&&((t=e.scroll)===null||t===void 0?void 0:t.wasRoot)}const E_=Tb({attachResizeListener:(e,t)=>hr(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),yl={current:void 0},Lb=Tb({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!yl.current){const e=new E_({});e.mount(window),e.setOptions({layoutScroll:!0}),yl.current=e}return yl.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),P_={pan:{Feature:HD},drag:{Feature:WD,ProjectionNode:Lb,MeasureLayout:ob}};function Vb(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const o="onHover"+n,s=r[o];s&&ie.postRender(()=>s(t,mr(t)))}class T_ extends Nt{mount(){const{current:t}=this.node;t&&(this.unmount=D1(t,n=>(Vb(this.node,n,"Start"),r=>Vb(this.node,r,"End"))))}unmount(){}}class A_ extends Nt{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=pr(hr(this.node.current,"focus",()=>this.onFocus()),hr(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function $b(e,t,n){const{props:r}=e;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const o="onTap"+(n==="End"?"":n),s=r[o];s&&ie.postRender(()=>s(t,mr(t)))}class N_ extends Nt{mount(){const{current:t}=this.node;t&&(this.unmount=L1(t,n=>($b(this.node,n,"Start"),(r,{success:o})=>$b(this.node,r,o?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const bl=new WeakMap,wl=new WeakMap,M_=e=>{const t=bl.get(e.target);t&&t(e)},I_=e=>{e.forEach(M_)};function D_({root:e,...t}){const n=e||document;wl.has(n)||wl.set(n,{});const r=wl.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(I_,{root:e,...t})),r[o]}function __(e,t,n){const r=D_(t);return bl.set(e,n),r.observe(e),()=>{bl.delete(e),r.unobserve(e)}}const k_={some:0,all:1};class O_ extends Nt{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:o="some",once:s}=t,i={root:n?n.current:void 0,rootMargin:r,threshold:typeof o=="number"?o:k_[o]},a=l=>{const{isIntersecting:c}=l;if(this.isInView===c||(this.isInView=c,s&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:d,onViewportLeave:f}=this.node.getProps(),h=c?d:f;h&&h(l)};return __(this.node.current,i,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(L_(t,n))&&this.startObserver()}unmount(){}}function L_({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const V_={inView:{Feature:O_},tap:{Feature:N_},focus:{Feature:A_},hover:{Feature:T_}},$_={layout:{ProjectionNode:Lb,MeasureLayout:ob}},xl={current:null},Fb={current:!1};function F_(){if(Fb.current=!0,!!pa)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>xl.current=e.matches;e.addListener(t),t()}else xl.current=!1}const R_=[...dy,Se,At],B_=e=>R_.find(uy(e)),Pn=new WeakMap;function z_(e,t,n){for(const r in t){const o=t[r],s=n[r];if(me(o))e.addValue(r,o),process.env.NODE_ENV==="development"&&rr(o.version==="11.18.2",`Attempting to mix Motion versions ${o.version} with 11.18.2 may not work as expected.`);else if(me(s))e.addValue(r,ot(o,{owner:e}));else if(s!==o)if(e.hasValue(r)){const i=e.getValue(r);i.liveStyle===!0?i.jump(o):i.hasAnimated||i.set(o)}else{const i=e.getStaticValue(r);e.addValue(r,ot(i!==void 0?i:o,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const Rb=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Bb{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:o,blockInitialAnimation:s,visualState:i},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=qa,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const m=rt.now();this.renderScheduledAt<m&&(this.renderScheduledAt=m,ie.render(this.render,!1,!0))};const{latestValues:l,renderState:c,onUpdate:d}=i;this.onUpdate=d,this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=c,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=o,this.options=a,this.blockInitialAnimation=!!s,this.isControllingVariants=zo(n),this.isVariantNode=ov(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:f,...h}=this.scrapeMotionValuesFromProps(n,{},this);for(const m in h){const y=h[m];l[m]!==void 0&&me(y)&&y.set(l[m],!1)}}mount(t){this.current=t,Pn.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,r)=>this.bindToMotionValue(r,n)),Fb.current||F_(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:xl.current,process.env.NODE_ENV!=="production"&&rr(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected."),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){Pn.delete(this.current),this.projection&&this.projection.unmount(),Le(this.notifyUpdate),Le(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const r=Ft.has(t),o=n.on("change",a=>{this.latestValues[t]=a,this.props.onUpdate&&ie.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),s=n.on("renderRequest",this.scheduleRender);let i;window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{o(),s(),i&&i(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in gn){const n=gn[t];if(!n)continue;const{isEnabled:r,Feature:o}=n;if(!this.features[t]&&o&&r(this.props)&&(this.features[t]=new o(this)),this.features[t]){const s=this.features[t];s.isMounted?s.update():(s.mount(),s.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):ge()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let r=0;r<Rb.length;r++){const o=Rb[r];this.propEventSubscriptions[o]&&(this.propEventSubscriptions[o](),delete this.propEventSubscriptions[o]);const s="on"+o,i=t[s];i&&(this.propEventSubscriptions[o]=this.on(o,i))}this.prevMotionValues=z_(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue(),this.onUpdate&&this.onUpdate(this)}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const r=this.values.get(t);n!==r&&(r&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let r=this.values.get(t);return r===void 0&&n!==void 0&&(r=ot(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){var r;let o=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(r=this.getBaseTargetFromProps(this.props,t))!==null&&r!==void 0?r:this.readValueFromInstance(this.current,t,this.options);return o!=null&&(typeof o=="string"&&(ly(o)||Xv(o))?o=parseFloat(o):!B_(o)&&At.test(n)&&(o=ny(t,n)),this.setBaseTarget(t,me(o)?o.get():o)),me(o)?o.get():o}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:r}=this.props;let o;if(typeof r=="string"||typeof r=="object"){const i=xa(this.props,r,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);i&&(o=i[t])}if(r&&o!==void 0)return o;const s=this.getBaseTargetFromProps(this.props,t);return s!==void 0&&!me(s)?s:this.initialValues[t]!==void 0&&o===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new $a),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class zb extends Bb{constructor(){super(...arguments),this.KeyframeResolver=py}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;me(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function W_(e){return window.getComputedStyle(e)}class Wb extends zb{constructor(){super(...arguments),this.type="html",this.renderInstance=yv}readValueFromInstance(t,n){if(Ft.has(n)){const r=Ka(n);return r&&r.default||0}else{const r=W_(t),o=(fv(n)?r.getPropertyValue(n):r[n])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:n}){return eb(t,n)}build(t,n,r){Pa(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return Ma(t,n,r)}}class Hb extends zb{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=ge}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(Ft.has(n)){const r=Ka(n);return r&&r.default||0}return n=bv.has(n)?n:ya(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return Sv(t,n,r)}build(t,n,r){Ta(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,o){wv(t,n,r,o)}mount(t){this.isSVGTag=Na(t.tagName),super.mount(t)}}const H_=(e,t)=>wa(e)?new Hb(t):new Wb(t,{allowProjection:e!==P.Fragment}),j_=T1({...yD,...V_,...P_,...$_},H_),se=WM(j_);function U_(e,t,n){P.useInsertionEffect(()=>e.on(t,n),[e,t,n])}function jb(e,t){let n;const r=()=>{const{currentTime:o}=t,i=(o===null?0:o.value)/100;n!==i&&e(i),n=i};return ie.update(r,!0),()=>Le(r)}const is=new WeakMap;let Mt;function G_(e,t){if(t){const{inlineSize:n,blockSize:r}=t[0];return{width:n,height:r}}else return e instanceof SVGElement&&"getBBox"in e?e.getBBox():{width:e.offsetWidth,height:e.offsetHeight}}function K_({target:e,contentRect:t,borderBoxSize:n}){var r;(r=is.get(e))===null||r===void 0||r.forEach(o=>{o({target:e,contentSize:t,get size(){return G_(e,n)}})})}function Y_(e){e.forEach(K_)}function X_(){typeof ResizeObserver>"u"||(Mt=new ResizeObserver(Y_))}function q_(e,t){Mt||X_();const n=Xo(e);return n.forEach(r=>{let o=is.get(r);o||(o=new Set,is.set(r,o)),o.add(t),Mt==null||Mt.observe(r)}),()=>{n.forEach(r=>{const o=is.get(r);o==null||o.delete(t),o!=null&&o.size||Mt==null||Mt.unobserve(r)})}}const as=new Set;let xr;function Z_(){xr=()=>{const e={width:window.innerWidth,height:window.innerHeight},t={target:window,size:e,contentSize:e};as.forEach(n=>n(t))},window.addEventListener("resize",xr)}function J_(e){return as.add(e),xr||Z_(),()=>{as.delete(e),!as.size&&xr&&(xr=void 0)}}function Q_(e,t){return typeof e=="function"?J_(e):q_(e,t)}const ek=50,Ub=()=>({current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0}),tk=()=>({time:0,x:Ub(),y:Ub()}),nk={x:{length:"Width",position:"Left"},y:{length:"Height",position:"Top"}};function Gb(e,t,n,r){const o=n[t],{length:s,position:i}=nk[t],a=o.current,l=n.time;o.current=e[`scroll${i}`],o.scrollLength=e[`scroll${s}`]-e[`client${s}`],o.offset.length=0,o.offset[0]=0,o.offset[1]=o.scrollLength,o.progress=Pt(0,o.scrollLength,o.current);const c=r-l;o.velocity=c>ek?0:Fa(o.current-a,c)}function rk(e,t,n){Gb(e,"x",t,n),Gb(e,"y",t,n),t.time=n}function ok(e,t){const n={x:0,y:0};let r=e;for(;r&&r!==t;)if(r instanceof HTMLElement)n.x+=r.offsetLeft,n.y+=r.offsetTop,r=r.offsetParent;else if(r.tagName==="svg"){const o=r.getBoundingClientRect();r=r.parentElement;const s=r.getBoundingClientRect();n.x+=o.left-s.left,n.y+=o.top-s.top}else if(r instanceof SVGGraphicsElement){const{x:o,y:s}=r.getBBox();n.x+=o,n.y+=s;let i=null,a=r.parentNode;for(;!i;)a.tagName==="svg"&&(i=a),a=r.parentNode;r=i}else break;return n}const Sl={start:0,center:.5,end:1};function Kb(e,t,n=0){let r=0;if(e in Sl&&(e=Sl[e]),typeof e=="string"){const o=parseFloat(e);e.endsWith("px")?r=o:e.endsWith("%")?e=o/100:e.endsWith("vw")?r=o/100*document.documentElement.clientWidth:e.endsWith("vh")?r=o/100*document.documentElement.clientHeight:e=o}return typeof e=="number"&&(r=t*e),n+r}const sk=[0,0];function ik(e,t,n,r){let o=Array.isArray(e)?e:sk,s=0,i=0;return typeof e=="number"?o=[e,e]:typeof e=="string"&&(e=e.trim(),e.includes(" ")?o=e.split(" "):o=[e,Sl[e]?e:"0"]),s=Kb(o[0],n,r),i=Kb(o[1],t),s-i}const ak={All:[[0,0],[1,1]]},lk={x:0,y:0};function ck(e){return"getBBox"in e&&e.tagName!=="svg"?e.getBBox():{width:e.clientWidth,height:e.clientHeight}}function uk(e,t,n){const{offset:r=ak.All}=n,{target:o=e,axis:s="y"}=n,i=s==="y"?"height":"width",a=o!==e?ok(o,e):lk,l=o===e?{width:e.scrollWidth,height:e.scrollHeight}:ck(o),c={width:e.clientWidth,height:e.clientHeight};t[s].offset.length=0;let d=!t[s].interpolate;const f=r.length;for(let h=0;h<f;h++){const m=ik(r[h],c[i],l[i],a[s]);!d&&m!==t[s].interpolatorOffsets[h]&&(d=!0),t[s].offset[h]=m}d&&(t[s].interpolate=sl(t[s].offset,il(r),{clamp:!1}),t[s].interpolatorOffsets=[...t[s].offset]),t[s].progress=tt(0,1,t[s].interpolate(t[s].current))}function dk(e,t=e,n){if(n.x.targetOffset=0,n.y.targetOffset=0,t!==e){let r=t;for(;r&&r!==e;)n.x.targetOffset+=r.offsetLeft,n.y.targetOffset+=r.offsetTop,r=r.offsetParent}n.x.targetLength=t===e?t.scrollWidth:t.clientWidth,n.y.targetLength=t===e?t.scrollHeight:t.clientHeight,n.x.containerLength=e.clientWidth,n.y.containerLength=e.clientHeight,process.env.NODE_ENV!=="production"&&e&&t&&t!==e&&rr(getComputedStyle(e).position!=="static","Please ensure that the container has a non-static position, like 'relative', 'fixed', or 'absolute' to ensure scroll offset is calculated correctly.")}function fk(e,t,n,r={}){return{measure:()=>dk(e,r.target,n),update:o=>{rk(e,n,o),(r.offset||r.target)&&uk(e,n,r)},notify:()=>t(n)}}const Sr=new WeakMap,Yb=new WeakMap,Cl=new WeakMap,Xb=e=>e===document.documentElement?window:e;function El(e,{container:t=document.documentElement,...n}={}){let r=Cl.get(t);r||(r=new Set,Cl.set(t,r));const o=tk(),s=fk(t,e,o,n);if(r.add(s),!Sr.has(t)){const a=()=>{for(const h of r)h.measure()},l=()=>{for(const h of r)h.update(be.timestamp)},c=()=>{for(const h of r)h.notify()},d=()=>{ie.read(a,!1,!0),ie.read(l,!1,!0),ie.update(c,!1,!0)};Sr.set(t,d);const f=Xb(t);window.addEventListener("resize",d,{passive:!0}),t!==document.documentElement&&Yb.set(t,Q_(t,d)),f.addEventListener("scroll",d,{passive:!0})}const i=Sr.get(t);return ie.read(i,!1,!0),()=>{var a;Le(i);const l=Cl.get(t);if(!l||(l.delete(s),l.size))return;const c=Sr.get(t);Sr.delete(t),c&&(Xb(t).removeEventListener("scroll",c),(a=Yb.get(t))===null||a===void 0||a(),window.removeEventListener("resize",c))}}function pk({source:e,container:t,axis:n="y"}){e&&(t=e);const r={value:0},o=El(s=>{r.value=s[n].progress*100},{container:t,axis:n});return{currentTime:r,cancel:o}}const Pl=new Map;function qb({source:e,container:t=document.documentElement,axis:n="y"}={}){e&&(t=e),Pl.has(t)||Pl.set(t,{});const r=Pl.get(t);return r[n]||(r[n]=Tv()?new ScrollTimeline({source:t,axis:n}):pk({source:t,axis:n})),r[n]}function hk(e){return e.length===2}function Zb(e){return e&&(e.target||e.offset)}function mk(e,t){return hk(e)||Zb(t)?El(n=>{e(n[t.axis].progress,n)},t):jb(e,qb(t))}function gk(e,t){if(e.flatten(),Zb(t))return e.pause(),El(n=>{e.time=e.duration*n[t.axis].progress},t);{const n=qb(t);return e.attachTimeline?e.attachTimeline(n,r=>(r.pause(),jb(o=>{r.time=r.duration*o},n))):Ee}}function vk(e,{axis:t="y",...n}={}){const r={axis:t,...n};return typeof e=="function"?mk(e,r):gk(e,r)}function Jb(e,t){$t(!!(!t||t.current),`You have defined a ${e} options but the provided ref is not yet hydrated, probably because it's defined higher up the tree. Try calling useScroll() in the same component as the ref, or setting its \`layoutEffect: false\` option.`)}const yk=()=>({scrollX:ot(0),scrollY:ot(0),scrollXProgress:ot(0),scrollYProgress:ot(0)});function Qb({container:e,target:t,layoutEffect:n=!0,...r}={}){const o=Et(yk);return(n?nr:P.useEffect)(()=>(Jb("target",t),Jb("container",e),vk((i,{x:a,y:l})=>{o.scrollX.set(a.current),o.scrollXProgress.set(a.progress),o.scrollY.set(l.current),o.scrollYProgress.set(l.progress)},{...r,container:(e==null?void 0:e.current)||void 0,target:(t==null?void 0:t.current)||void 0})),[e,t,JSON.stringify(r.offset)]),o}function It(e){const t=Et(()=>ot(e)),{isStatic:n}=P.useContext(mn);if(n){const[,r]=P.useState(e);P.useEffect(()=>t.on("change",r),[])}return t}function Tl(e,t){const n=It(t()),r=()=>n.set(t());return r(),nr(()=>{const o=()=>ie.preRender(r,!1,!0),s=e.map(i=>i.on("change",o));return()=>{s.forEach(i=>i()),Le(r)}}),n}function Al(e,...t){const n=e.length;function r(){let o="";for(let s=0;s<n;s++){o+=e[s];const i=t[s];i&&(o+=me(i)?i.get():i)}return o}return Tl(t.filter(me),r)}function e0(e){return typeof e=="number"?e:parseFloat(e)}function Cr(e,t={}){const{isStatic:n}=P.useContext(mn),r=P.useRef(null),o=It(me(e)?e0(e.get()):e),s=P.useRef(o.get()),i=P.useRef(()=>{}),a=()=>{const c=r.current;c&&c.time===0&&c.sample(be.delta),l(),r.current=UI({keyframes:[o.get(),s.current],velocity:o.getVelocity(),type:"spring",restDelta:.001,restSpeed:.01,...t,onUpdate:i.current})},l=()=>{r.current&&r.current.stop()};return P.useInsertionEffect(()=>o.attach((c,d)=>n?d(c):(s.current=c,i.current=d,ie.update(a),o.get()),l),[JSON.stringify(t)]),nr(()=>{if(me(e))return e.on("change",c=>o.set(e0(c)))},[o]),o}function bk(e){const t=P.useRef(0),{isStatic:n}=P.useContext(mn);P.useEffect(()=>{if(n)return;const r=({timestamp:o,delta:s})=>{t.current||(t.current=o),e(o-t.current,s)};return ie.update(r,!0),()=>Le(r)},[e])}const wk=e=>e&&typeof e=="object"&&e.mix,xk=e=>wk(e)?e.mix:void 0;function Sk(...e){const t=!Array.isArray(e[0]),n=t?0:-1,r=e[0+n],o=e[1+n],s=e[2+n],i=e[3+n],a=sl(o,s,{mixer:xk(s[0]),...i});return t?a(r):a}function Ck(e){cr.current=[],e();const t=Tl(cr.current,e);return cr.current=void 0,t}function jt(e,t,n,r){if(typeof e=="function")return Ck(e);const o=typeof t=="function"?t:Sk(t,n,r);return Array.isArray(e)?t0(e,o):t0([e],([s])=>o(s))}function t0(e,t){const n=Et(()=>[]);return Tl(e,()=>{n.length=0;const r=e.length;for(let o=0;o<r;o++)n[o]=e[o].get();return t(n)})}function Ek(e){return P.useEffect(()=>()=>e(),[])}const Pk=(e,t,n)=>{const r=t-e;return((n-e)%r+r)%r+e};function n0(e,t){return Ey(e)?e[Pk(0,e.length,t)]:e}function Nl(e){return typeof e=="object"&&!Array.isArray(e)}function r0(e,t,n,r){return typeof e=="string"&&Nl(t)?Xo(e,n,r):e instanceof NodeList?Array.from(e):Array.isArray(e)?e:[e]}function Tk(e,t,n){return e*(t+1)}function o0(e,t,n,r){var o;return typeof t=="number"?t:t.startsWith("-")||t.startsWith("+")?Math.max(0,e+parseFloat(t)):t==="<"?n:(o=r.get(t))!==null&&o!==void 0?o:e}function Ak(e,t,n){for(let r=0;r<e.length;r++){const o=e[r];o.at>t&&o.at<n&&(Zo(e,o),r--)}}function Nk(e,t,n,r,o,s){Ak(e,o,s);for(let i=0;i<t.length;i++)e.push({value:t[i],at:ue(o,s,r[i]),easing:n0(n,i)})}function Mk(e,t){for(let n=0;n<e.length;n++)e[n]=e[n]/(t+1)}function Ik(e,t){return e.at===t.at?e.value===null?1:t.value===null?-1:0:e.at-t.at}const Dk="easeInOut",_k=20;function kk(e,{defaultTransition:t={},...n}={},r,o){const s=t.duration||.3,i=new Map,a=new Map,l={},c=new Map;let d=0,f=0,h=0;for(let m=0;m<e.length;m++){const y=e[m];if(typeof y=="string"){c.set(y,f);continue}else if(!Array.isArray(y)){c.set(y.name,o0(f,y.at,d,c));continue}let[g,v,b={}]=y;b.at!==void 0&&(f=o0(f,b.at,d,c));let w=0;const x=(S,C,T,A=0,N=0)=>{const I=Ok(S),{delay:O=0,times:L=il(I),type:V="keyframes",repeat:U,repeatType:_,repeatDelay:K=0,...H}=C;let{ease:B=t.ease||"easeOut",duration:$}=C;const F=typeof O=="function"?O(A,N):O,ne=I.length,re=Ko(V)?V:o==null?void 0:o[V];if(ne<=2&&re){let j=100;if(ne===2&&$k(I)){const Z=I[1]-I[0];j=Math.abs(Z)}const Q={...H};$!==void 0&&(Q.duration=He($));const z=N1(Q,j,re);B=z.ease,$=z.duration}$??($=s);const D=f+F;L.length===1&&L[0]===0&&(L[1]=1);const G=L.length-I.length;if(G>0&&Ty(L,G),I.length===1&&I.unshift(null),U){Qe(U<_k,"Repeat count too high, must be less than 20"),$=Tk($,U);const j=[...I],Q=[...L];B=Array.isArray(B)?[...B]:[B];const z=[...B];for(let Z=0;Z<U;Z++){I.push(...j);for(let q=0;q<j.length;q++)L.push(Q[q]+(Z+1)),B.push(q===0?"linear":n0(z,q-1))}Mk(L,U)}const X=D+$;Nk(T,I,B,L,D,X),w=Math.max(F+$,w),h=Math.max(X,h)};if(me(g)){const S=s0(g,a);x(v,b,i0("default",S))}else{const S=r0(g,v,r,l),C=S.length;for(let T=0;T<C;T++){v=v,b=b;const A=S[T],N=s0(A,a);for(const I in v)x(v[I],Lk(b,I),i0(I,N),T,C)}}d=f,f+=w}return a.forEach((m,y)=>{for(const g in m){const v=m[g];v.sort(Ik);const b=[],w=[],x=[];for(let C=0;C<v.length;C++){const{at:T,value:A,easing:N}=v[C];b.push(A),w.push(Pt(0,h,T)),x.push(N||"easeOut")}w[0]!==0&&(w.unshift(0),b.unshift(b[0]),x.unshift(Dk)),w[w.length-1]!==1&&(w.push(1),b.push(null)),i.has(y)||i.set(y,{keyframes:{},transition:{}});const S=i.get(y);S.keyframes[g]=b,S.transition[g]={...t,duration:h,ease:x,times:w,...n}}}),i}function s0(e,t){return!t.has(e)&&t.set(e,{}),t.get(e)}function i0(e,t){return t[e]||(t[e]=[]),t[e]}function Ok(e){return Array.isArray(e)?e:[e]}function Lk(e,t){return e&&e[t]?{...e,...e[t]}:{...e}}const Vk=e=>typeof e=="number",$k=e=>e.every(Vk);function Fk(e,t){return e in t}class Rk extends Bb{constructor(){super(...arguments),this.type="object"}readValueFromInstance(t,n){if(Fk(n,t)){const r=t[n];if(typeof r=="string"||typeof r=="number")return r}}getBaseTargetFromProps(){}removeValueFromRenderState(t,n){delete n.output[t]}measureInstanceViewportBox(){return ge()}build(t,n){Object.assign(t.output,n)}renderInstance(t,{output:n}){Object.assign(t,n)}sortInstanceNodePosition(){return 0}}function Bk(e){const t={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=ib(e)?new Hb(t):new Wb(t);n.mount(e),Pn.set(e,n)}function zk(e){const t={presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}},n=new Rk(t);n.mount(e),Pn.set(e,n)}function Wk(e,t){return me(e)||typeof e=="number"||typeof e=="string"&&!Nl(t)}function a0(e,t,n,r){const o=[];if(Wk(e,t))o.push(sb(e,Nl(t)&&t.default||t,n&&(n.default||n)));else{const s=r0(e,t,r),i=s.length;Qe(!!i,"No valid elements provided.");for(let a=0;a<i;a++){const l=s[a],c=l instanceof Element?Bk:zk;Pn.has(l)||c(l);const d=Pn.get(l),f={...n};"delay"in f&&typeof f.delay=="function"&&(f.delay=f.delay(a,i)),o.push(...ll(d,{...t,transition:f},{}))}}return o}function Hk(e,t,n){const r=[];return kk(e,t,n,{spring:rl}).forEach(({keyframes:s,transition:i},a)=>{r.push(...a0(a,s,i))}),r}function jk(e){return Array.isArray(e)&&e.some(Array.isArray)}function Uk(e){function t(n,r,o){let s=[];jk(n)?s=Hk(n,r,e):s=a0(n,r,o,e);const i=new Av(s);return e&&e.animations.push(i),i}return t}function Gk(){const e=Et(()=>({current:null,animations:[]})),t=Et(()=>Uk(e));return Ek(()=>{e.animations.forEach(n=>n.stop())}),[e,t]}const Kk={some:0,all:1};function Yk(e,t,{root:n,margin:r,amount:o="some"}={}){const s=Xo(e),i=new WeakMap,a=c=>{c.forEach(d=>{const f=i.get(d.target);if(d.isIntersecting!==!!f)if(d.isIntersecting){const h=t(d);typeof h=="function"?i.set(d.target,h):l.unobserve(d.target)}else typeof f=="function"&&(f(d),i.delete(d.target))})},l=new IntersectionObserver(a,{root:n,rootMargin:r,threshold:typeof o=="number"?o:Kk[o]});return s.forEach(c=>l.observe(c)),()=>l.disconnect()}function Xk(e,{root:t,margin:n,amount:r,once:o=!1}={}){const[s,i]=P.useState(!1);return P.useEffect(()=>{if(!e.current||o&&s)return;const a=()=>(i(!0),o?void 0:()=>i(!1)),l={root:t&&t.current||void 0,margin:n,amount:r};return Yk(e.current,a,l)},[t,e,n,o,r]),s}function qk(e,t){if(e==="first")return 0;{const n=t-1;return e==="last"?n:n/2}}function Zk(e=.1,{startDelay:t=0,from:n=0,ease:r}={}){return(o,s)=>{const i=typeof n=="number"?n:qk(n,s),a=Math.abs(i-o);let l=e*a;if(r){const c=s*e;l=ol(r)(l/c)*c}return t+l}}const Jk=()=>p.jsx("div",{className:"flex h-[50vh] w-full items-center justify-center",children:p.jsx(se.div,{animate:{scale:[1,1.2,1],rotate:[0,180,360],borderRadius:["20%","50%","20%"]},transition:{duration:2,ease:"easeInOut",repeat:1/0},className:"h-12 w-12 bg-primary/20 border-2 border-primary"})});function Qk({value:e,className:t}){const n=Cr(e,{mass:.8,stiffness:75,damping:15}),r=jt(n,o=>Math.round(o).toLocaleString());return P.useEffect(()=>{n.set(e)},[n,e]),p.jsx(se.span,{className:M("font-mono",t),children:r})}const eO=({tabs:e,containerClassName:t,activeTabClassName:n,tabClassName:r,contentClassName:o})=>{const[s,i]=P.useState(e[0]),[a,l]=P.useState(e),c=h=>{const m=[...e],y=m.splice(h,1);m.unshift(y[0]),l(m),i(m[0])},[d,f]=P.useState(!1);return p.jsxs(p.Fragment,{children:[p.jsx("div",{className:M("flex flex-row items-center justify-start [perspective:1000px] relative overflow-auto sm:overflow-visible no-visible-scrollbar max-w-full w-full",t),children:e.map((h,m)=>p.jsxs("button",{onClick:()=>{c(m)},onMouseEnter:()=>f(!0),onMouseLeave:()=>f(!1),className:M("relative px-4 py-2 rounded-full",r),style:{transformStyle:"preserve-3d"},children:[s.value===h.value&&p.jsx(se.div,{layoutId:"clickedbutton",transition:{type:"spring",bounce:.3,duration:.6},className:M("absolute inset-0 bg-gray-200 dark:bg-zinc-800 rounded-full ",n)}),p.jsx("span",{className:"relative block text-black dark:text-white",children:h.title})]},h.title))}),p.jsx(l0,{tabs:a,active:s,hovering:d,className:M("mt-32",o)},s.value)]})},l0=({className:e,tabs:t,hovering:n})=>{const r=o=>o.value===t[0].value;return p.jsx("div",{className:"relative w-full h-full",children:t.map((o,s)=>p.jsx(se.div,{layoutId:o.value,style:{scale:1-s*.1,top:n?s*-50:0,zIndex:-s,opacity:s<3?1-s*.1:0},animate:{y:r(o)?[0,40,0]:0},className:M("w-full h-full absolute top-0 left-0",e),children:o.content},o.value))})},tO=({items:e})=>{const[t,n]=P.useState(null),r={stiffness:100,damping:5},o=It(0),s=Cr(jt(o,[-100,100],[-45,45]),r),i=Cr(jt(o,[-100,100],[-50,50]),r),a=l=>{const c=l.target.offsetWidth/2;o.set(l.nativeEvent.offsetX-c)};return p.jsx(p.Fragment,{children:e.map(l=>p.jsxs("div",{className:"-mr-4 relative group",onMouseEnter:()=>n(l.id),onMouseLeave:()=>n(null),children:[p.jsx(Vo,{mode:"popLayout",children:t===l.id&&p.jsxs(se.div,{initial:{opacity:0,y:20,scale:.6},animate:{opacity:1,y:0,scale:1,transition:{type:"spring",stiffness:260,damping:10}},exit:{opacity:0,y:20,scale:.6},style:{translateX:i,rotate:s,whiteSpace:"nowrap"},className:"absolute -top-16 -left-1/2 translate-x-1/2 flex text-xs flex-col items-center justify-center rounded-md bg-black z-50 shadow-xl px-4 py-2",children:[p.jsx("div",{className:"absolute inset-x-10 z-30 w-[20%] -bottom-px bg-gradient-to-r from-transparent via-emerald-500 to-transparent h-px "}),p.jsx("div",{className:"absolute left-10 w-[40%] z-30 -bottom-px bg-gradient-to-r from-transparent via-sky-500 to-transparent h-px "}),p.jsx("div",{className:"font-bold text-white relative z-30 text-base",children:l.name}),p.jsx("div",{className:"text-white text-xs",children:l.designation})]})}),p.jsx("img",{onMouseMove:a,height:100,width:100,src:l.image,alt:l.name,className:"object-cover !m-0 !p-0 object-top rounded-full h-14 w-14 border-2 group-hover:scale-105 group-hover:z-30 border-white relative transition duration-500"})]},l.name))})},c0=({className:e,...t})=>{const n=new Array(150).fill(1),r=new Array(100).fill(1);let o=["--sky-300","--pink-300","--green-300","--yellow-300","--red-300","--purple-300","--blue-300","--indigo-300","--violet-300"];const s=()=>o[Math.floor(Math.random()*o.length)];return p.jsx("div",{style:{transform:"translate(-40%,-60%) skewX(-48deg) skewY(14deg) scale(0.675) rotate(0deg) translateZ(0)"},className:M("absolute left-1/4 p-4 -top-1/4 flex -translate-x-1/2 -translate-y-1/2 w-full h-full z-0 ",e),...t,children:n.map((i,a)=>p.jsx(se.div,{className:"w-16 h-8 border-l border-slate-200 dark:border-slate-700 relative",children:r.map((l,c)=>p.jsx(se.div,{whileHover:{backgroundColor:`var(${s()})`,transition:{duration:0}},animate:{transition:{duration:2}},className:"w-16 h-8 border-r border-t border-slate-200 dark:border-slate-700 relative",children:c%2===0&&a%2===0?p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",className:"absolute h-6 w-10 -top-[14px] -left-[22px] text-slate-300 dark:text-slate-700 stroke-[1px] pointer-events-none",children:p.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 6v12m6-6H6"})}):null},"col"+c))},"row"+a))})},nO=P.memo(c0),rO=({animationSpeed:e=.4,opacities:t=[.3,.3,.3,.5,.5,.5,.8,.8,.8,1],colors:n=[[0,255,255]],containerClassName:r,dotSize:o,showGradient:s=!0})=>p.jsxs("div",{className:M("h-full relative bg-white w-full",r),children:[p.jsx("div",{className:"h-full w-full",children:p.jsx(oO,{colors:n,dotSize:o??3,opacities:t,animationSpeed:e})}),s&&p.jsx("div",{className:"absolute inset-0 bg-gradient-to-t from-white to-transparent"})]}),oO=({colors:e=[[0,0,0]],opacities:t=[.04,.04,.04,.04,.04,.08,.08,.08,.08,.14],dotSize:n=2,animationSpeed:r=.4})=>{const o=P.useRef(null);return P.useEffect(()=>{const s=o.current;if(!s)return;const i=s.getContext("2d");if(!i)return;let a,l=0;const c=()=>{l+=r;const f=s.width,h=s.height;i.clearRect(0,0,f,h);const m=n*2,y=Math.floor(f/m),g=Math.floor(h/m);for(let v=0;v<y;v++)for(let b=0;b<g;b++){const w=v*m,x=b*m,S=Math.abs(Math.sin(v*12.9898+b*78.233+l*.05)),C=Math.floor(S*t.length),T=t[C%t.length],A=Math.floor(S*e.length),N=e[A%e.length];i.fillStyle=`rgba(${N[0]}, ${N[1]}, ${N[2]}, ${T})`,i.fillRect(w,x,n,n)}a=requestAnimationFrame(c)},d=()=>{const f=s.parentElement;f&&(s.width=f.clientWidth,s.height=f.clientHeight)};return window.addEventListener("resize",d),d(),c(),()=>{window.removeEventListener("resize",d),cancelAnimationFrame(a)}},[e,t,n,r]),p.jsx("canvas",{ref:o,className:"h-full w-full"})},sO=({title:e,icon:t,children:n})=>{const[r,o]=P.useState(!1);return p.jsxs("div",{onMouseEnter:()=>o(!0),onMouseLeave:()=>o(!1),className:"border border-black/[0.2] group/canvas-card flex items-center justify-center dark:border-white/[0.2] max-w-sm w-full mx-auto p-4 relative h-[30rem] ",children:[p.jsx(Er,{className:"absolute h-6 w-6 -top-3 -left-3 dark:text-white text-black"}),p.jsx(Er,{className:"absolute h-6 w-6 -bottom-3 -left-3 dark:text-white text-black"}),p.jsx(Er,{className:"absolute h-6 w-6 -top-3 -right-3 dark:text-white text-black"}),p.jsx(Er,{className:"absolute h-6 w-6 -bottom-3 -right-3 dark:text-white text-black"}),p.jsx(Vo,{children:r&&p.jsx(se.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"h-full w-full absolute inset-0",children:n})}),p.jsxs("div",{className:"relative z-20",children:[p.jsx("div",{className:"text-center group-hover/canvas-card:-translate-y-4 group-hover/canvas-card:opacity-0 transition duration-200 w-full mx-auto flex items-center justify-center",children:t}),p.jsx("h2",{className:"dark:text-white text-xl opacity-0 group-hover/canvas-card:opacity-100 relative z-10 text-black mt-4 font-bold group-hover/canvas-card:text-white group-hover/canvas-card:-translate-y-2 transition duration-200",children:e})]})]})},Er=({className:e,...t})=>p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",className:e,...t,children:p.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 6v12m6-6H6"})});let u0;const iO=({items:e,offset:t,scaleFactor:n})=>{const r=t||10,o=n||.06,[s,i]=P.useState(e);P.useEffect(()=>(a(),()=>clearInterval(u0)),[]);const a=()=>{u0=setInterval(()=>{i(l=>{const c=[...l];return c.unshift(c.pop()),c})},5e3)};return p.jsx("div",{className:"relative h-60 w-60 md:h-60 md:w-96",children:s.map((l,c)=>p.jsxs(se.div,{className:"absolute dark:bg-black bg-white h-60 w-60 md:h-60 md:w-96 rounded-3xl p-4 shadow-xl border border-neutral-200 dark:border-white/[0.1] shadow-black/[0.1] dark:shadow-white/[0.05] flex flex-col justify-between",style:{transformOrigin:"top center"},animate:{top:c*-r,scale:1-c*o,zIndex:s.length-c},children:[p.jsx("div",{className:"font-normal text-neutral-700 dark:text-neutral-200",children:l.content}),p.jsxs("div",{children:[p.jsx("p",{className:"text-neutral-500 font-medium dark:text-white",children:l.name}),p.jsx("p",{className:"text-neutral-400 font-normal dark:text-neutral-200",children:l.designation})]})]},l.id))})},aO=({text:e,className:t})=>{let n=It(0),r=It(0);const[o,s]=P.useState("");P.useEffect(()=>{let a=Ml(1500);s(a)},[]);function i({currentTarget:a,clientX:l,clientY:c}){let{left:d,top:f}=a.getBoundingClientRect();n.set(l-d),r.set(c-f);const h=Ml(1500);s(h)}return p.jsx("div",{className:M("p-0.5 bg-transparent aspect-square flex items-center justify-center w-full h-full relative",t),children:p.jsxs("div",{onMouseMove:i,className:"group/card rounded-3xl w-full relative overflow-hidden bg-transparent flex items-center justify-center h-full",children:[p.jsx(d0,{mouseX:n,mouseY:r,randomString:o}),p.jsx("div",{className:"relative z-10 flex items-center justify-center",children:p.jsxs("div",{className:"relative h-44 w-44 rounded-full flex items-center justify-center text-white font-bold text-4xl",children:[p.jsx("div",{className:"absolute w-full h-full bg-black/80 dark:bg-[#09090b]/[0.8] blur-sm rounded-full"}),p.jsx("span",{className:"text-white z-20",children:e})]})})]})})};function d0({mouseX:e,mouseY:t,randomString:n}){let r=Al`radial-gradient(250px at ${e}px ${t}px, white, transparent)`,o={maskImage:r,WebkitMaskImage:r};return p.jsxs("div",{className:"pointer-events-none",children:[p.jsx("div",{className:"absolute inset-0 rounded-2xl [mask-image:linear-gradient(white,transparent)] group-hover/card:opacity-50"}),p.jsx(se.div,{className:"absolute inset-0 rounded-2xl bg-gradient-to-r from-emerald-500 to-teal-700 opacity-0 group-hover/card:opacity-100 backdrop-blur-xl transition duration-500",style:o}),p.jsx(se.div,{className:"absolute inset-0 rounded-2xl opacity-0 mix-blend-overlay group-hover/card:opacity-100",style:o,children:p.jsx("p",{className:"absolute inset-x-0 text-xs h-full break-words whitespace-pre-wrap text-white font-mono font-bold transition duration-500",children:n})})]})}const f0="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",Ml=e=>{let t="";for(let n=0;n<e;n++)t+=f0.charAt(Math.floor(Math.random()*f0.length));return t},lO=({className:e,...t})=>p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",className:e,...t,children:p.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 6v12m6-6H6"})}),cO=({words:e,duration:t=3e3,className:n})=>{const[r,o]=P.useState(e[0]),[s,i]=P.useState(!1),a=P.useCallback(()=>{const l=e[e.indexOf(r)+1]||e[0];o(l),i(!0)},[r,e]);return P.useEffect(()=>{s||setTimeout(()=>{a()},t)},[s,t,a]),p.jsx(Vo,{onExitComplete:()=>{i(!1)},children:p.jsx(se.div,{initial:{opacity:0,y:10},animate:{opacity:1,y:0},transition:{type:"spring",stiffness:100,damping:10},exit:{opacity:0,y:-40,x:40,filter:"blur(8px)",scale:2,position:"absolute"},className:M("z-10 inline-block relative text-left text-neutral-900 dark:text-neutral-100 px-2",n),children:r.split("").map((l,c)=>p.jsx(se.span,{initial:{opacity:0,y:10,filter:"blur(8px)"},animate:{opacity:1,y:0,filter:"blur(0px)"},transition:{delay:c*.08,duration:.4,filter:{type:"tween",duration:.4}},className:"inline-block",children:l},r+c))},r)})},uO=({text:e,className:t})=>p.jsx("div",{className:M("relative inline-block",t),children:p.jsxs("span",{className:"relative inline-block",children:[e,p.jsx("span",{className:"absolute top-0 left-0 -z-10 w-full h-full text-red-500 opacity-80 animate-glitch-1","aria-hidden":"true",children:e}),p.jsx("span",{className:"absolute top-0 left-0 -z-10 w-full h-full text-cyan-400 opacity-80 animate-glitch-2","aria-hidden":"true",children:e}),p.jsx("span",{className:"absolute top-0 left-0 -z-10 w-full h-full text-green-500 opacity-80 animate-glitch-1 [animation-delay:0.5s]","aria-hidden":"true",children:e})]})});var Il,ls="HoverCard",[p0]=ye(ls,[qe]),cs=qe(),[dO,Dl]=p0(ls),h0=e=>{const{__scopeHoverCard:t,children:n,open:r,defaultOpen:o,onOpenChange:s,openDelay:i=700,closeDelay:a=300}=e,l=cs(t),c=u.useRef(0),d=u.useRef(0),f=u.useRef(!1),h=u.useRef(!1),[m,y]=we({prop:r,defaultProp:o??!1,onChange:s,caller:ls}),g=u.useCallback(()=>{clearTimeout(d.current),c.current=window.setTimeout(()=>y(!0),i)},[i,y]),v=u.useCallback(()=>{clearTimeout(c.current),!f.current&&!h.current&&(d.current=window.setTimeout(()=>y(!1),a))},[a,y]),b=u.useCallback(()=>y(!1),[y]);return u.useEffect(()=>()=>{clearTimeout(c.current),clearTimeout(d.current)},[]),p.jsx(dO,{scope:t,open:m,onOpenChange:y,onOpen:g,onClose:v,onDismiss:b,hasSelectionRef:f,isPointerDownOnContentRef:h,children:p.jsx(en,{...l,children:n})})};h0.displayName=ls;var m0="HoverCardTrigger",g0=u.forwardRef((e,t)=>{const{__scopeHoverCard:n,...r}=e,o=Dl(m0,n),s=cs(n);return p.jsx(tn,{asChild:!0,...s,children:p.jsx(W.a,{"data-state":o.open?"open":"closed",...r,ref:t,onPointerEnter:k(e.onPointerEnter,ds(o.onOpen)),onPointerLeave:k(e.onPointerLeave,ds(o.onClose)),onFocus:k(e.onFocus,o.onOpen),onBlur:k(e.onBlur,o.onClose),onTouchStart:k(e.onTouchStart,i=>i.preventDefault())})})});g0.displayName=m0;var fO="HoverCardPortal",[ZO,pO]=p0(fO,{forceMount:void 0}),us="HoverCardContent",v0=u.forwardRef((e,t)=>{const n=pO(us,e.__scopeHoverCard),{forceMount:r=n.forceMount,...o}=e,s=Dl(us,e.__scopeHoverCard);return p.jsx(ve,{present:r||s.open,children:p.jsx(hO,{"data-state":s.open?"open":"closed",...o,onPointerEnter:k(e.onPointerEnter,ds(s.onOpen)),onPointerLeave:k(e.onPointerLeave,ds(s.onClose)),ref:t})})});v0.displayName=us;var hO=u.forwardRef((e,t)=>{const{__scopeHoverCard:n,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:s,onInteractOutside:i,...a}=e,l=Dl(us,n),c=cs(n),d=u.useRef(null),f=J(t,d),[h,m]=u.useState(!1);return u.useEffect(()=>{if(h){const y=document.body;return Il=y.style.userSelect||y.style.webkitUserSelect,y.style.userSelect="none",y.style.webkitUserSelect="none",()=>{y.style.userSelect=Il,y.style.webkitUserSelect=Il}}},[h]),u.useEffect(()=>{if(d.current){const y=()=>{m(!1),l.isPointerDownOnContentRef.current=!1,setTimeout(()=>{var v;((v=document.getSelection())==null?void 0:v.toString())!==""&&(l.hasSelectionRef.current=!0)})};return document.addEventListener("pointerup",y),()=>{document.removeEventListener("pointerup",y),l.hasSelectionRef.current=!1,l.isPointerDownOnContentRef.current=!1}}},[l.isPointerDownOnContentRef,l.hasSelectionRef]),u.useEffect(()=>{d.current&&vO(d.current).forEach(g=>g.setAttribute("tabindex","-1"))}),p.jsx(mt,{asChild:!0,disableOutsidePointerEvents:!1,onInteractOutside:i,onEscapeKeyDown:r,onPointerDownOutside:o,onFocusOutside:k(s,y=>{y.preventDefault()}),onDismiss:l.onDismiss,children:p.jsx(Fn,{...c,...a,onPointerDown:k(a.onPointerDown,y=>{y.currentTarget.contains(y.target)&&m(!0),l.hasSelectionRef.current=!1,l.isPointerDownOnContentRef.current=!0}),ref:f,style:{...a.style,userSelect:h?"text":void 0,WebkitUserSelect:h?"text":void 0,"--radix-hover-card-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-hover-card-content-available-width":"var(--radix-popper-available-width)","--radix-hover-card-content-available-height":"var(--radix-popper-available-height)","--radix-hover-card-trigger-width":"var(--radix-popper-anchor-width)","--radix-hover-card-trigger-height":"var(--radix-popper-anchor-height)"}})})}),mO="HoverCardArrow",gO=u.forwardRef((e,t)=>{const{__scopeHoverCard:n,...r}=e,o=cs(n);return p.jsx(Rn,{...o,...r,ref:t})});gO.displayName=mO;function ds(e){return t=>t.pointerType==="touch"?void 0:e()}function vO(e){const t=[],n=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:r=>r.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});for(;n.nextNode();)t.push(n.currentNode);return t}var yO=h0,bO=g0,y0=v0;const wO=yO,xO=bO,b0=u.forwardRef(({className:e,align:t="center",sideOffset:n=4,...r},o)=>p.jsx(y0,{ref:o,align:t,sideOffset:n,className:M("z-50 w-64 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}));b0.displayName=y0.displayName;const SO=({items:e,direction:t="left",speed:n="fast",pauseOnHover:r=!0,className:o})=>{const s=P.useRef(null),i=P.useRef(null);P.useEffect(()=>{c()},[]);const[a,l]=P.useState(!1);function c(){s.current&&i.current&&(Array.from(i.current.children).forEach(m=>{const y=m.cloneNode(!0);i.current&&i.current.appendChild(y)}),d(),f(),l(!0))}const d=()=>{s.current&&(t==="left"?s.current.style.setProperty("--animation-direction","forwards"):s.current.style.setProperty("--animation-direction","reverse"))},f=()=>{s.current&&(n==="fast"?s.current.style.setProperty("--animation-duration","20s"):n==="normal"?s.current.style.setProperty("--animation-duration","40s"):s.current.style.setProperty("--animation-duration","80s"))};return p.jsx("div",{ref:s,className:M("scroller relative z-20 max-w-7xl overflow-hidden [mask-image:linear-gradient(to_right,transparent,white_20%,white_80%,transparent)]",o),children:p.jsx("ul",{ref:i,className:M(" flex min-w-full shrink-0 gap-4 py-4 w-max flex-nowrap",a&&"animate-scroll ",r&&"hover:[animation-play-state:paused]"),children:e.map((h,m)=>p.jsxs("li",{className:"w-[350px] max-w-full relative rounded-2xl border border-b-0 flex-shrink-0 border-zinc-200 dark:border-slate-700 px-8 py-6 md:w-[450px] bg-white dark:bg-slate-900 shadow-sm dark:shadow-none",style:{background:"linear-gradient(180deg, var(--white), var(--zinc-50))"},children:[p.jsx("div",{className:"dark:hidden absolute inset-0 bg-gradient-to-b from-white to-zinc-50 rounded-2xl -z-10"}),p.jsx("div",{className:"hidden dark:block absolute inset-0 bg-gradient-to-b from-slate-800 to-slate-900 rounded-2xl -z-10"}),p.jsxs("blockquote",{children:[p.jsx("div",{"aria-hidden":"true",className:"user-select-none -z-1 pointer-events-none absolute -left-0.5 -top-0.5 h-[calc(100%_+_4px)] w-[calc(100%_+_4px)]"}),p.jsx("span",{className:" relative z-20 text-sm leading-[1.6] text-zinc-700 dark:text-gray-100 font-normal",children:h.quote}),p.jsx("div",{className:"relative z-20 mt-6 flex flex-row items-center",children:p.jsxs("span",{className:"flex flex-col gap-1",children:[p.jsx("span",{className:" text-sm leading-[1.6] text-zinc-500 dark:text-gray-400 font-normal",children:h.name}),p.jsx("span",{className:" text-sm leading-[1.6] text-zinc-400 dark:text-gray-400 font-normal",children:h.title})]})})]})]},h.name+m))})})},CO=({className:e,height:t=40,squares:n=[20,20]})=>{const r=P.useRef(null),[o,s]=P.useState({x:0,y:0}),i=c=>{if(!r.current)return;const d=r.current.getBoundingClientRect();s({x:c.clientX-d.left,y:c.clientY-d.top})},[a,l]=n;return p.jsxs("div",{ref:r,onMouseMove:i,className:M("relative overflow-hidden border border-border bg-background",e),style:{"--mouse-x":`${o.x}px`,"--mouse-y":`${o.y}px`},children:[p.jsx("div",{className:"absolute inset-0 z-0 opacity-0 transition-opacity duration-500 hover:opacity-100 pointer-events-none",style:{background:"radial-gradient(600px circle at var(--mouse-x) var(--mouse-y), hsl(var(--primary) / 0.15), transparent 40%)"}}),p.jsx("div",{className:"relative z-10 grid",style:{gridTemplateColumns:`repeat(${l}, 1fr)`,gridTemplateRows:`repeat(${a}, 1fr)`},children:Array.from({length:a*l}).map((c,d)=>p.jsx("div",{className:"border-r border-b border-border/10",style:{width:"100%",height:`${t}px`}},d))}),p.jsx("div",{className:"absolute inset-0 z-20 pointer-events-none",style:{background:"radial-gradient(600px circle at var(--mouse-x) var(--mouse-y), hsl(var(--primary) / 0.05), transparent 40%)"}})]})},EO=({children:e,className:t})=>p.jsxs("div",{className:M("relative flex min-h-screen flex-col items-center justify-center overflow-hidden bg-slate-950 w-full rounded-md z-0",t),children:[p.jsxs("div",{className:"relative flex w-full flex-1 scale-y-125 items-center justify-center isolate z-0 ",children:[p.jsxs(se.div,{initial:{opacity:.5,width:"15rem"},whileInView:{opacity:1,width:"30rem"},transition:{delay:.3,duration:.8,ease:"easeInOut"},style:{backgroundImage:"conic-gradient(var(--conic-position), var(--tw-gradient-stops))"},className:"absolute inset-auto right-1/2 h-56 overflow-visible w-[30rem] bg-gradient-conic from-cyan-500 via-transparent to-transparent text-white [--conic-position:from_70deg_at_center_top]",children:[p.jsx("div",{className:"absolute w-[100%] left-0 bg-slate-950 h-40 bottom-0 z-20 [mask-image:linear-gradient(to_top,white,transparent)]"}),p.jsx("div",{className:"absolute w-40 h-[100%] left-0 bg-slate-950 bottom-0 z-20 [mask-image:linear-gradient(to_right,white,transparent)]"})]}),p.jsxs(se.div,{initial:{opacity:.5,width:"15rem"},whileInView:{opacity:1,width:"30rem"},transition:{delay:.3,duration:.8,ease:"easeInOut"},style:{backgroundImage:"conic-gradient(var(--conic-position), var(--tw-gradient-stops))"},className:"absolute inset-auto left-1/2 h-56 w-[30rem] bg-gradient-conic from-transparent via-transparent to-cyan-500 text-white [--conic-position:from_290deg_at_center_top]",children:[p.jsx("div",{className:"absolute w-40 h-[100%] right-0 bg-slate-950 bottom-0 z-20 [mask-image:linear-gradient(to_left,white,transparent)]"}),p.jsx("div",{className:"absolute w-[100%] right-0 bg-slate-950 h-40 bottom-0 z-20 [mask-image:linear-gradient(to_top,white,transparent)]"})]}),p.jsx("div",{className:"absolute top-1/2 h-48 w-full translate-y-12 scale-x-150 bg-slate-950 blur-2xl"}),p.jsx("div",{className:"absolute top-1/2 z-50 h-48 w-full bg-transparent opacity-10 backdrop-blur-md"}),p.jsx("div",{className:"absolute inset-auto z-50 h-36 w-[28rem] -translate-y-1/2 rounded-full bg-cyan-500 opacity-50 blur-3xl"}),p.jsx(se.div,{initial:{width:"8rem"},whileInView:{width:"16rem"},transition:{delay:.3,duration:.8,ease:"easeInOut"},className:"absolute inset-auto z-30 h-36 w-64 -translate-y-[6rem] rounded-full bg-cyan-400 blur-2xl"}),p.jsx(se.div,{initial:{width:"15rem"},whileInView:{width:"30rem"},transition:{delay:.3,duration:.8,ease:"easeInOut"},className:"absolute inset-auto z-50 h-0.5 w-[30rem] -translate-y-[7rem] bg-cyan-400 "}),p.jsx("div",{className:"absolute inset-auto z-40 h-44 w-full -translate-y-[12.5rem] bg-slate-950 "})]}),p.jsx("div",{className:"relative z-50 flex -translate-y-80 flex-col items-center px-5",children:e})]}),PO=({children:e,zoomFactor:t=1.5,lensSize:n=170,isStatic:r=!1,position:o={x:200,y:150},hovering:s,setHovering:i,className:a})=>{const[l,c]=P.useState(!1),[d,f]=P.useState({x:0,y:0}),h=P.useRef(null),m=v=>{var w;const b=(w=h.current)==null?void 0:w.getBoundingClientRect();if(b){const x=v.clientX-b.left,S=v.clientY-b.top;f({x,y:S})}},y=s!==void 0?s:l,g=i||c;return p.jsxs("div",{ref:h,className:M("relative overflow-hidden rounded-lg z-20 group/lens",a),onMouseEnter:()=>g(!0),onMouseLeave:()=>g(!1),onMouseMove:m,children:[e,r?p.jsx(se.div,{initial:{opacity:0,scale:.58},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.8},transition:{duration:.3,ease:"easeOut"},className:"absolute inset-0 overflow-hidden pointer-events-none",style:{maskImage:`radial-gradient(circle ${n/2}px at ${o.x}px ${o.y}px, black 100%, transparent 100%)`,WebkitMaskImage:`radial-gradient(circle ${n/2}px at ${o.x}px ${o.y}px, black 100%, transparent 100%)`,transformOrigin:`${o.x}px ${o.y}px`},children:p.jsx("div",{className:"absolute inset-0",style:{transform:`scale(${t})`,transformOrigin:`${o.x}px ${o.y}px`},children:e})}):p.jsx(Vo,{children:y&&p.jsx(se.div,{initial:{opacity:0,scale:.58},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.8},transition:{duration:.3,ease:"easeOut"},className:"absolute inset-0 overflow-hidden pointer-events-none",style:{maskImage:`radial-gradient(circle ${n/2}px at ${d.x}px ${d.y}px, black 100%, transparent 100%)`,WebkitMaskImage:`radial-gradient(circle ${n/2}px at ${d.x}px ${d.y}px, black 100%, transparent 100%)`,transformOrigin:`${d.x}px ${d.y}px`,zIndex:50},children:p.jsx("div",{className:"absolute inset-0",style:{transform:`scale(${t})`,transformOrigin:`${d.x}px ${d.y}px`},children:e})})})]})};function TO({children:e,className:t,gradientSize:n=200,gradientColor:r="#262626",gradientOpacity:o=.8,...s}){const i=It(-n),a=It(-n);function l({currentTarget:d,clientX:f,clientY:h}){const{left:m,top:y}=d.getBoundingClientRect();i.set(f-m),a.set(h-y)}function c(){i.set(-n),a.set(-n)}return p.jsxs("div",{onMouseMove:l,onMouseLeave:c,className:M("group relative flex size-full overflow-hidden rounded-xl border bg-neutral-100 dark:bg-neutral-900 text-black dark:text-white",t),...s,children:[p.jsx("div",{className:"relative z-10",children:e}),p.jsx(se.div,{className:"pointer-events-none absolute -inset-px rounded-xl opacity-0 transition-opacity duration-300 group-hover:opacity-100",style:{background:Al`
164
135
  radial-gradient(
165
136
  ${n}px circle at ${i}px ${a}px,
166
137
  ${r},
167
138
  transparent 80%
168
139
  )
169
- `,opacity:o}})]})}const ak=({children:e,className:t,...n})=>{const r=T.useRef(null),[o,s]=T.useState({x:0,y:0}),i=l=>{const{clientX:c,clientY:u}=l,{left:f,top:h,width:m,height:y}=l.currentTarget.getBoundingClientRect(),g=(c-(f+m/2))*.35,v=(u-(h+y/2))*.35;s({x:g,y:v})},a=()=>{s({x:0,y:0})};return p.jsxs(ce.button,{ref:r,onMouseMove:i,onMouseLeave:a,animate:{x:o.x,y:o.y},transition:{type:"spring",stiffness:150,damping:15,mass:.1},className:M("relative inline-flex h-12 overflow-hidden rounded-full p-[1px] focus:outline-none focus:ring-2 focus:ring-slate-400 focus:ring-offset-2 focus:ring-offset-slate-50",t),...n,children:[p.jsx("span",{className:"absolute inset-[-1000%] animate-[spin_2s_linear_infinite] bg-[conic-gradient(from_90deg_at_50%_50%,#E2CBFF_0%,#393BB2_50%,#E2CBFF_100%)]"}),p.jsx("span",{className:"inline-flex h-full w-full cursor-pointer items-center justify-center rounded-full bg-slate-950 px-6 py-1 text-sm font-medium text-white backdrop-blur-3xl",children:e})]})};function lk({borderRadius:e="1.75rem",children:t,as:n="button",containerClassName:r,borderClassName:o,duration:s,className:i,...a}){return p.jsxs(n,{className:M("bg-transparent relative text-xl h-16 w-40 p-[1px] overflow-hidden ",r),style:{borderRadius:e},...a,children:[p.jsx("div",{className:"absolute inset-0",style:{borderRadius:`calc(${e} * 0.96)`},children:p.jsx(Kb,{duration:s,rx:"30%",ry:"30%",children:p.jsx("div",{className:M("h-20 w-20 opacity-[0.8] bg-[radial-gradient(#0ea5e9_40%,transparent_60%)]",o)})})}),p.jsx("div",{className:M("relative bg-slate-900/[0.8] border border-slate-800 backdrop-blur-xl text-white flex items-center justify-center w-full h-full text-sm antialiased",i),style:{borderRadius:`calc(${e} * 0.96)`},children:t})]})}const Kb=({children:e,duration:t=2e3,rx:n,ry:r,...o})=>{const s=T.useRef(),i=zt(0);QI(u=>{var h;const f=(h=s.current)==null?void 0:h.getTotalLength();if(f){const m=f/t;i.set(u*m%f)}});const a=sn(i,u=>{var f;return(f=s.current)==null?void 0:f.getPointAtLength(u).x}),l=sn(i,u=>{var f;return(f=s.current)==null?void 0:f.getPointAtLength(u).y}),c=tc`translateX(${a}px) translateY(${l}px) translateX(-50%) translateY(-50%)`;return p.jsxs(p.Fragment,{children:[p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",preserveAspectRatio:"none",className:"absolute h-full w-full",width:"100%",height:"100%",...o,children:p.jsx("rect",{fill:"none",width:"100%",height:"100%",rx:n,ry:r,ref:s})}),p.jsx(ce.div,{style:{position:"absolute",top:0,left:0,display:"inline-block",transform:c},children:e})]})},ck=({className:e,children:t,borderSize:n=2,borderRadius:r=20,neonColors:o={firstColor:"#ff00aa",secondColor:"#00FFF1"},...s})=>p.jsxs("div",{className:M("relative overflow-hidden z-0",e),style:{borderRadius:r,...s.style},...s,children:[p.jsx("div",{className:"absolute top-0 left-0 w-full h-full -z-10 animate-[spin_4s_linear_infinite]",style:{background:`conic-gradient(from 0deg, transparent 0 340deg, ${o.firstColor} 360deg)`,top:"-50%",left:"-50%",width:"200%",height:"200%"}}),p.jsx("div",{className:"absolute top-0 left-0 w-full h-full -z-10 animate-[spin_4s_linear_infinite]",style:{background:`conic-gradient(from 180deg, transparent 0 340deg, ${o.secondColor} 360deg)`,top:"-50%",left:"-50%",width:"200%",height:"200%",animationDelay:"-2s"}}),p.jsx("div",{className:"relative bg-background z-10 w-[calc(100%-4px)] h-[calc(100%-4px)] m-[2px]",style:{borderRadius:r-n},children:t})]}),uk=({className:e,particleCount:t=50,particleColor:n})=>{const r=T.useRef(null),o=T.useRef(null),{theme:s}=Gs();return T.useEffect(()=>{const i=r.current;if(!i)return;const a=i.getContext("2d");if(!a)return;let l=[],c;const u=()=>{var m,y;i.width=((m=o.current)==null?void 0:m.offsetWidth)||window.innerWidth,i.height=((y=o.current)==null?void 0:y.offsetHeight)||window.innerHeight,f()},f=()=>{l=[];for(let m=0;m<t;m++)l.push({x:Math.random()*i.width,y:Math.random()*i.height,vx:(Math.random()-.5)*.5,vy:(Math.random()-.5)*.5,size:Math.random()*2+.5})},h=()=>{a.clearRect(0,0,i.width,i.height);const m=n||(s==="dark"?"rgba(255, 255, 255, 0.5)":"rgba(0, 0, 0, 0.7)"),y=n||(s==="dark"?"rgba(255, 255, 255, 0.15)":"rgba(0, 0, 0, 0.3)");l.forEach((g,v)=>{g.x+=g.vx,g.y+=g.vy,(g.x<0||g.x>i.width)&&(g.vx*=-1),(g.y<0||g.y>i.height)&&(g.vy*=-1),a.beginPath(),a.arc(g.x,g.y,g.size,0,Math.PI*2),a.fillStyle=m,a.fill();for(let x=v+1;x<l.length;x++){const b=l[x],w=g.x-b.x,S=g.y-b.y;Math.sqrt(w*w+S*S)<100&&(a.beginPath(),a.strokeStyle=y,a.lineWidth=.5,a.moveTo(g.x,g.y),a.lineTo(b.x,b.y),a.stroke())}}),c=requestAnimationFrame(h)};return u(),h(),window.addEventListener("resize",u),()=>{window.removeEventListener("resize",u),cancelAnimationFrame(c)}},[t,n,s]),p.jsx("div",{ref:o,className:e,style:{position:"relative",overflow:"hidden"},children:p.jsx("canvas",{ref:r,style:{display:"block",width:"100%",height:"100%"}})})},dk=({children:e,className:t,variant:n="blue",...r})=>{const[o,s]=T.useState([]),i=T.useRef(null),a=5;T.useEffect(()=>{if(!i.current)return;const u=()=>{if(!i.current)return;const f=i.current.getBoundingClientRect(),h=f.width,m=f.height,y=[];for(let g=0;g<h;g+=a)for(let v=0;v<m;v+=a)Math.random()>.9&&y.push({x:g,y:v});s(y)};return u(),window.addEventListener("resize",u),()=>window.removeEventListener("resize",u)},[]);const l={default:"bg-neutral-900 border-neutral-800",blue:"bg-slate-900 border-slate-800",pink:"bg-pink-900/20 border-pink-800/50"},c={default:"bg-neutral-500",blue:"bg-blue-500",pink:"bg-pink-500"};return p.jsxs("div",{ref:i,className:M("relative overflow-hidden rounded-xl border p-6 group",l[n],t),...r,children:[p.jsx("div",{className:"absolute inset-0 z-0 opacity-10 pointer-events-none",style:{backgroundImage:`radial-gradient(${n==="pink"?"#ec4899":"#3b82f6"} 1px, transparent 1px)`,backgroundSize:`${a*2}px ${a*2}px`}}),p.jsx("div",{className:"absolute inset-0 z-0 opacity-0 group-hover:opacity-100 transition-opacity duration-500",children:o.map((u,f)=>p.jsx("span",{className:M("absolute w-1 h-1 rounded-full animate-pulse",c[n]),style:{left:u.x,top:u.y,animationDelay:`${Math.random()*2}s`}},f))}),p.jsx("div",{className:"relative z-10",children:e})]})},fk=e=>{const{className:t,minSize:n=1,maxSize:r=3,particleDensity:o=100,particleColor:s="#FFFFFF",speed:i=4}=e,a=T.useRef(null),[l,c]=T.useState(null),[u,f]=T.useState([]),h=T.useRef(),m=(v,x)=>{const b=o,w=[];for(let S=0;S<b;S++)w.push({x:Math.random()*v,y:Math.random()*x,size:Math.random()*(r-n)+n,speedX:(Math.random()-.5)*i,speedY:(Math.random()-.5)*i});f(w)},y=()=>{if(a.current){const v=a.current,{width:x,height:b}=v.getBoundingClientRect();v.width=x,v.height=b,m(x,b)}};T.useEffect(()=>(a.current&&(c(a.current.getContext("2d")),y(),window.addEventListener("resize",y)),()=>{window.removeEventListener("resize",y)}),[l]),T.useEffect(()=>{if(l&&a.current){const{width:v,height:x}=a.current;m(v,x)}},[l,n,r,o,i]);const g=()=>{if(l&&a.current){const v=a.current;l.clearRect(0,0,v.width,v.height),u.forEach(x=>{x.x+=x.speedX,x.y+=x.speedY,x.x>v.width&&(x.x=0),x.x<0&&(x.x=v.width),x.y>v.height&&(x.y=0),x.y<0&&(x.y=v.height),l.fillStyle=s,l.beginPath(),l.arc(x.x,x.y,x.size,0,Math.PI*2),l.fill()}),h.current=requestAnimationFrame(g)}};return T.useEffect(()=>{if(l)return g(),()=>{h.current&&cancelAnimationFrame(h.current)}},[l,u,s]),p.jsx("div",{className:M("relative h-full w-full overflow-hidden",t),children:p.jsx("canvas",{ref:a,className:"absolute inset-0 h-full w-full"})})},pk=({children:e,className:t,spotlightColor:n})=>{const r=T.useRef(null),[o,s]=T.useState({x:0,y:0}),[i,a]=T.useState(0),{theme:l}=Gs(),c=n||(l==="dark"?"rgba(255, 255, 255, 0.25)":"rgba(37, 99, 235, 0.3)"),u=g=>{if(!r.current)return;const x=r.current.getBoundingClientRect();s({x:g.clientX-x.left,y:g.clientY-x.top})},f=()=>{a(1)},h=()=>{a(0)},m=()=>{a(1)},y=()=>{a(0)};return p.jsxs("div",{ref:r,onMouseMove:u,onMouseEnter:m,onMouseLeave:y,onFocus:f,onBlur:h,className:M("relative overflow-hidden rounded-xl border border-border bg-card text-card-foreground shadow",t),children:[p.jsx("div",{className:"pointer-events-none absolute -inset-px transition duration-300",style:{opacity:i,background:`radial-gradient(600px circle at ${o.x}px ${o.y}px, ${c}, transparent 40%)`}}),p.jsx("div",{className:"relative h-full",children:e})]})},hk=({content:e,contentClassName:t})=>{const[n,r]=T.useState(0),o=T.useRef(null),{scrollYProgress:s}=Pb({container:o,offset:["start start","end start"],layoutEffect:!1}),i=e.length;TI(s,"change",f=>{const h=e.map((y,g)=>g/i),m=h.reduce((y,g,v)=>Math.abs(f-g)<Math.abs(f-h[y])?v:y,0);r(m)});const a=["#0f172a","#000000","#171717"],l=["linear-gradient(to bottom right, #06b6d4, #10b981)","linear-gradient(to bottom right, #ec4899, #6366f1)","linear-gradient(to bottom right, #f97316, #eab308)"],[c,u]=T.useState(l[0]);return T.useEffect(()=>{u(l[n%l.length])},[n]),p.jsxs(ce.div,{animate:{backgroundColor:a[n%a.length]},className:"h-[30rem] overflow-y-auto flex justify-center relative space-x-10 rounded-md p-10",ref:o,children:[p.jsx("div",{className:"div relative flex items-start px-4",children:p.jsxs("div",{className:"max-w-2xl",children:[e.map((f,h)=>p.jsxs("div",{className:"my-20",children:[p.jsx(ce.h2,{initial:{opacity:0},animate:{opacity:n===h?1:.3},className:"text-2xl font-bold text-slate-100",children:f.title}),p.jsx(ce.p,{initial:{opacity:0},animate:{opacity:n===h?1:.3},className:"text-kg text-slate-300 max-w-sm mt-10",children:f.description})]},f.title+h)),p.jsx("div",{className:"h-40"})]})}),p.jsx("div",{style:{background:c},className:M("hidden lg:block h-60 w-80 rounded-md bg-white sticky top-10 overflow-hidden",t),children:e[n].content??null})]})},mk=({words:e,className:t})=>{const[n,r]=PD();let o=e.split(" ");T.useEffect(()=>{r("span",{opacity:1},{duration:2,delay:_D(.2)})},[n.current]);const s=()=>p.jsx(ce.div,{ref:n,children:o.map((i,a)=>p.jsxs(ce.span,{className:"dark:text-white text-black opacity-0",children:[i," "]},i+a))});return p.jsx("div",{className:M("font-bold",t),children:p.jsx("div",{className:"mt-4",children:p.jsx("div",{className:" dark:text-white text-black text-2xl leading-snug tracking-wide",children:s()})})})},gk=({text:e,className:t,delay:n=0,duration:r=.5})=>{const o=T.useRef(null),s=ND(o,{once:!0,margin:"-10%"}),i=e.split(" "),a={hidden:{opacity:0},visible:(c=1)=>({opacity:1,transition:{staggerChildren:.12,delayChildren:.04*c+n}})},l={visible:{opacity:1,y:0,transition:{type:"spring",damping:12,stiffness:100,duration:r,filter:{type:"tween",duration:r}},filter:"blur(0px)"},hidden:{opacity:0,y:20,filter:"blur(2px)"}};return p.jsx(ce.div,{ref:o,style:{overflow:"hidden",display:"flex",flexWrap:"wrap"},variants:a,initial:"hidden",animate:s?"visible":"hidden",className:M("text-4xl font-bold text-black dark:text-white",t),children:i.map((c,u)=>p.jsx(ce.span,{variants:l,style:{marginRight:"0.25em"},className:"inline-block",children:c},u))})},vk=({children:e,className:t,container:n})=>{const r=T.useRef(null),{scrollYProgress:o}=Pb({target:r,container:n,offset:["start start","end start"],layoutEffect:!1}),s=T.useRef(null),[i,a]=T.useState(0);T.useEffect(()=>{if(!s.current)return;const u=()=>{s.current&&a(s.current.offsetHeight)};u();const f=new ResizeObserver(u);return f.observe(s.current),()=>f.disconnect()},[]);const l=qr(sn(o,[0,.8],[50,i]),{stiffness:500,damping:90}),c=qr(sn(o,[0,1],[50,i-200]),{stiffness:500,damping:90});return p.jsxs(ce.div,{ref:r,className:M("relative w-full max-w-4xl mx-auto h-full",t),children:[p.jsxs("div",{className:"absolute left-0 top-3",children:[p.jsx(ce.div,{transition:{duration:.2,delay:.5},animate:{boxShadow:o.get()>0?"none":"rgba(0, 0, 0, 0.24) 0px 3px 8px"},className:"ml-[27px] h-4 w-4 rounded-full border border-netural-200 shadow-sm flex items-center justify-center",children:p.jsx(ce.div,{transition:{duration:.2,delay:.5},animate:{backgroundColor:o.get()>0?"#ffffff":"#10b981",borderColor:o.get()>0?"#ffffff":"#059669"},className:"h-2 w-2 rounded-full border border-neutral-300 bg-white"})}),p.jsxs("svg",{viewBox:`0 0 20 ${i}`,width:"20",height:i,className:" ml-4 block","aria-hidden":"true",children:[p.jsx(ce.path,{d:`M 1 0V -36 l 18 24 V ${i*.8} l -18 24V ${i}`,fill:"none",stroke:"#9091A0",strokeOpacity:"0.16",transition:{duration:10}}),p.jsx(ce.path,{d:`M 1 0V -36 l 18 24 V ${i*.8} l -18 24V ${i}`,fill:"none",stroke:"url(#gradient)",strokeWidth:"1.25",className:"motion-reduce:hidden",transition:{duration:10}}),p.jsx("defs",{children:p.jsxs(ce.linearGradient,{id:"gradient",gradientUnits:"userSpaceOnUse",x1:"0",x2:"0",y1:l,y2:c,children:[p.jsx("stop",{stopColor:"#18CCFC",stopOpacity:"0"}),p.jsx("stop",{stopColor:"#18CCFC"}),p.jsx("stop",{offset:"0.325",stopColor:"#6344F5"}),p.jsx("stop",{offset:"1",stopColor:"#AE48FF",stopOpacity:"0"})]})})]})]}),p.jsx("div",{ref:s,className:"ml-10",children:e})]})},yk=1/3,xt=1/6,ic=e=>Math.floor(e)|0,ac=new Float64Array([1,1,0,-1,1,0,1,-1,0,-1,-1,0,1,0,1,-1,0,1,1,0,-1,-1,0,-1,0,1,1,0,-1,1,0,1,-1,0,-1,-1]);function Yb(e=Math.random){const t=xk(e),n=new Float64Array(t).map(s=>ac[s%12*3]),r=new Float64Array(t).map(s=>ac[s%12*3+1]),o=new Float64Array(t).map(s=>ac[s%12*3+2]);return function(i,a,l){let c,u,f,h;const m=(i+a+l)*yk,y=ic(i+m),g=ic(a+m),v=ic(l+m),x=(y+g+v)*xt,b=y-x,w=g-x,S=v-x,C=i-b,R=a-w,A=l-S;let N,_,k,O,L,G;C>=R?R>=A?(N=1,_=0,k=0,O=1,L=1,G=0):C>=A?(N=1,_=0,k=0,O=1,L=0,G=1):(N=0,_=0,k=1,O=1,L=0,G=1):R<A?(N=0,_=0,k=1,O=0,L=1,G=1):C<A?(N=0,_=1,k=0,O=0,L=1,G=1):(N=0,_=1,k=0,O=1,L=1,G=0);const j=C-N+xt,X=R-_+xt,U=A-k+xt,z=C-O+2*xt,V=R-L+2*xt,$=A-G+2*xt,oe=C-1+3*xt,ie=R-1+3*xt,I=A-1+3*xt,Y=y&255,J=g&255,K=v&255;let te=.6-C*C-R*R-A*A;if(te<0)c=0;else{const ne=Y+t[J+t[K]];te*=te,c=te*te*(n[ne]*C+r[ne]*R+o[ne]*A)}let W=.6-j*j-X*X-U*U;if(W<0)u=0;else{const ne=Y+N+t[J+_+t[K+k]];W*=W,u=W*W*(n[ne]*j+r[ne]*X+o[ne]*U)}let Q=.6-z*z-V*V-$*$;if(Q<0)f=0;else{const ne=Y+O+t[J+L+t[K+G]];Q*=Q,f=Q*Q*(n[ne]*z+r[ne]*V+o[ne]*$)}let ee=.6-oe*oe-ie*ie-I*I;if(ee<0)h=0;else{const ne=Y+1+t[J+1+t[K+1]];ee*=ee,h=ee*ee*(n[ne]*oe+r[ne]*ie+o[ne]*I)}return 32*(c+u+f+h)}}function xk(e){const n=new Uint8Array(512);for(let r=0;r<512/2;r++)n[r]=r;for(let r=0;r<512/2-1;r++){const o=r+~~(e()*(256-r)),s=n[r];n[r]=n[o],n[o]=s}for(let r=256;r<512;r++)n[r]=n[r-256];return n}const bk=({children:e,className:t,containerClassName:n,particleCount:r=700,baseHue:o=220,baseSpeed:s=0,rangeSpeed:i=1.5,baseRadius:a=1,rangeRadius:l=2,backgroundColor:c="#000000"})=>{const u=T.useRef(null),f=T.useRef(null),h=9,m=r*h,y=100,g=50,v=150,x=s,b=i,w=a,S=l,C=o,R=20,A=3,N=.00125,_=.00125,k=5e-4,O=T.useRef(c);let L=0;const G=Yb();let j=new Float32Array(m),X=[0,0];const U=Math.PI*2,z=B=>B*Math.random(),V=B=>B-z(2*B),$=(B,Z)=>{let de=.5*Z;return Math.abs((B+de)%Z-de)/de},oe=(B,Z,de)=>(1-de)*B+de*Z,ie=()=>{const B=u.current,Z=f.current;if(B&&Z){const de=B.getContext("2d");de&&(ee(B),I(),J(B,de))}},I=()=>{L=0,j=new Float32Array(m);for(let B=0;B<m;B+=h)Y(B)},Y=B=>{const Z=u.current;if(!Z)return;let de,je,Me,Oe,Ze,Le,Ie,Hn,Ht;de=z(Z.width),je=X[1]+V(y),Me=0,Oe=0,Ze=0,Le=g+z(v),Ie=x+z(b),Hn=w+z(S),Ht=C+z(R),j.set([de,je,Me,Oe,Ze,Le,Ie,Hn,Ht],B)},J=(B,Z)=>{L++,Z.clearRect(0,0,B.width,B.height),Z.fillStyle=O.current,Z.fillRect(0,0,B.width,B.height),K(Z),ne(B,Z),he(B,Z),window.requestAnimationFrame(()=>J(B,Z))},K=B=>{for(let Z=0;Z<m;Z+=h)te(Z,B)},te=(B,Z)=>{const de=u.current;if(!de)return;let je=1+B,Me=2+B,Oe=3+B,Ze=4+B,Le=5+B,Ie=6+B,Hn=7+B,Ht=8+B,Jr,an,Ut,Un,Gn,ln,Kn,Yn,Qr,eo,$s,Fs;an=j[B],Ut=j[je],Jr=G(an*N,Ut*_,L*k)*A*U,Un=oe(j[Me],Math.cos(Jr),.5),Gn=oe(j[Oe],Math.sin(Jr),.5),ln=j[Ze],Kn=j[Le],Yn=j[Ie],Qr=an+Un*Yn,eo=Ut+Gn*Yn,$s=j[Hn],Fs=j[Ht],W(an,Ut,Qr,eo,ln,Kn,$s,Fs,Z),ln++,j[B]=Qr,j[je]=eo,j[Me]=Un,j[Oe]=Gn,j[Ze]=ln,(Q(an,Ut,de)||ln>Kn)&&Y(B)},W=(B,Z,de,je,Me,Oe,Ze,Le,Ie)=>{Ie.save(),Ie.lineCap="round",Ie.lineWidth=Ze,Ie.strokeStyle=`hsla(${Le},100%,60%,${$(Me,Oe)})`,Ie.beginPath(),Ie.moveTo(B,Z),Ie.lineTo(de,je),Ie.stroke(),Ie.closePath(),Ie.restore()},Q=(B,Z,de)=>B>de.width||B<0||Z>de.height||Z<0,ee=B=>{const{innerWidth:Z,innerHeight:de}=window;B.width=Z,B.height=de,X[0]=.5*B.width,X[1]=.5*B.height},ne=(B,Z)=>{Z.save(),Z.filter="blur(8px) brightness(200%)",Z.globalCompositeOperation="lighter",Z.drawImage(B,0,0),Z.restore(),Z.save(),Z.filter="blur(4px) brightness(200%)",Z.globalCompositeOperation="lighter",Z.drawImage(B,0,0),Z.restore()},he=(B,Z)=>{Z.save(),Z.globalCompositeOperation="lighter",Z.drawImage(B,0,0),Z.restore()};return T.useEffect(()=>{ie(),window.addEventListener("resize",()=>{const B=u.current,Z=B==null?void 0:B.getContext("2d");B&&Z&&ee(B)})},[]),p.jsxs("div",{className:M("relative h-full w-full",n),children:[p.jsx(ce.div,{initial:{opacity:0},animate:{opacity:1},ref:f,className:"absolute h-full w-full inset-0 z-0 bg-transparent flex items-center justify-center",children:p.jsx("canvas",{ref:u})}),p.jsx("div",{className:M("relative z-10",t),children:e})]})},wk=({children:e,className:t,containerClassName:n,colors:r,waveWidth:o,backgroundFill:s,blur:i=10,speed:a="fast",waveOpacity:l=.5,...c})=>{const u=Yb();let f,h,m,y,g,v,x;const b=T.useRef(null),w=()=>{switch(a){case"slow":return .001;case"fast":return .002;default:return .001}},S=()=>{x=b.current,v=x.getContext("2d"),f=v.canvas.width=window.innerWidth,h=v.canvas.height=window.innerHeight,v.filter=`blur(${i}px)`,m=0,window.onresize=function(){f=v.canvas.width=window.innerWidth,h=v.canvas.height=window.innerHeight,v.filter=`blur(${i}px)`},N()},C=r??["#38bdf8","#818cf8","#c084fc","#e879f9","#22d3ee"],R=O=>{for(m+=w(),y=0;y<O;y++){for(v.beginPath(),v.lineWidth=o||50,v.strokeStyle=C[y%C.length],g=0;g<f;g+=5){var L=u(g/800,.3*y,m)*100;v.lineTo(g,L+h*.5)}v.stroke(),v.closePath()}};let A;const N=()=>{v.fillStyle=s||"black",v.globalAlpha=l||.5,v.fillRect(0,0,f,h),R(5),A=requestAnimationFrame(N)};T.useEffect(()=>(S(),()=>{cancelAnimationFrame(A)}),[]);const[_,k]=T.useState(!1);return T.useEffect(()=>{k(typeof window<"u"&&navigator.userAgent.includes("Safari")&&!navigator.userAgent.includes("Chrome"))},[]),p.jsxs("div",{className:M("h-screen flex flex-col items-center justify-center",n),children:[p.jsx("canvas",{className:"absolute inset-0 z-0",ref:b,id:"canvas",style:{..._?{filter:`blur(${i}px)`}:{}}}),p.jsx("div",{className:M("relative z-10",t),...c,children:e})]})},Xb=T.createContext(void 0),Sk=({children:e,className:t,containerClassName:n})=>{const r=T.useRef(null),[o,s]=T.useState(!1),i=c=>{if(!r.current)return;const{left:u,top:f,width:h,height:m}=r.current.getBoundingClientRect(),y=(c.clientX-u-h/2)/25,g=(c.clientY-f-m/2)/25;r.current.style.transform=`rotateY(${y}deg) rotateX(${g*-1}deg)`},a=()=>{s(!0),r.current},l=()=>{r.current&&(s(!1),r.current.style.transform="rotateY(0deg) rotateX(0deg)")};return p.jsx(Xb.Provider,{value:[o,s],children:p.jsx("div",{className:M("py-20 flex items-center justify-center",n),style:{perspective:"1000px"},children:p.jsx("div",{ref:r,onMouseEnter:a,onMouseMove:i,onMouseLeave:l,className:M("flex items-center justify-center relative transition-all duration-200 ease-linear",t),style:{transformStyle:"preserve-3d"},children:e})})})},Ck=({children:e,className:t})=>p.jsx("div",{className:M("h-96 w-96 [transform-style:preserve-3d] [&>*]:[transform-style:preserve-3d]",t),children:e}),Ek=({as:e="div",children:t,className:n,translateX:r=0,translateY:o=0,translateZ:s=0,rotateX:i=0,rotateY:a=0,rotateZ:l=0,...c})=>{const u=T.useRef(null),[f]=qb();T.useEffect(()=>{h()},[f]);const h=()=>{u.current&&(f?u.current.style.transform=`translateX(${r}px) translateY(${o}px) translateZ(${s}px) rotateX(${i}deg) rotateY(${a}deg) rotateZ(${l}deg)`:u.current.style.transform="translateX(0px) translateY(0px) translateZ(0px) rotateX(0deg) rotateY(0deg) rotateZ(0deg)")};return p.jsx(e,{ref:u,className:M("w-fit transition-all duration-200 ease-linear",n),...c,children:t})},qb=()=>{const e=T.useContext(Xb);if(e===void 0)throw new Error("useMouseEnter must be used within a MouseEnterProvider");return e},Tk=({className:e,children:t,showRadialGradient:n=!0,...r})=>p.jsxs("div",{className:M("relative flex flex-col h-[100vh] items-center justify-center bg-zinc-50 dark:bg-zinc-900 text-slate-950 transition-bg",e),...r,children:[p.jsx("div",{className:"absolute inset-0 overflow-hidden",children:p.jsx("div",{className:M(`
140
+ `,opacity:o}})]})}const AO=({children:e,className:t,...n})=>{const r=P.useRef(null),[o,s]=P.useState({x:0,y:0}),i=l=>{const{clientX:c,clientY:d}=l,{left:f,top:h,width:m,height:y}=l.currentTarget.getBoundingClientRect(),g=(c-(f+m/2))*.35,v=(d-(h+y/2))*.35;s({x:g,y:v})},a=()=>{s({x:0,y:0})};return p.jsxs(se.button,{ref:r,onMouseMove:i,onMouseLeave:a,animate:{x:o.x,y:o.y},transition:{type:"spring",stiffness:150,damping:15,mass:.1},className:M("relative inline-flex h-12 overflow-hidden rounded-full p-[1px] focus:outline-none focus:ring-2 focus:ring-slate-400 focus:ring-offset-2 focus:ring-offset-slate-50",t),...n,children:[p.jsx("span",{className:"absolute inset-[-1000%] animate-[spin_2s_linear_infinite] bg-[conic-gradient(from_90deg_at_50%_50%,#E2CBFF_0%,#393BB2_50%,#E2CBFF_100%)]"}),p.jsx("span",{className:"inline-flex h-full w-full cursor-pointer items-center justify-center rounded-full bg-slate-950 px-6 py-1 text-sm font-medium text-white backdrop-blur-3xl",children:e})]})};function NO({borderRadius:e="1.75rem",children:t,as:n="button",containerClassName:r,borderClassName:o,duration:s,className:i,...a}){return p.jsxs(n,{className:M("bg-transparent relative text-xl h-16 w-40 p-[1px] overflow-hidden ",r),style:{borderRadius:e},...a,children:[p.jsx("div",{className:"absolute inset-0",style:{borderRadius:`calc(${e} * 0.96)`},children:p.jsx(w0,{duration:s,rx:"30%",ry:"30%",children:p.jsx("div",{className:M("h-20 w-20 opacity-[0.8] bg-[radial-gradient(#0ea5e9_40%,transparent_60%)]",o)})})}),p.jsx("div",{className:M("relative bg-slate-900/[0.8] border border-slate-800 backdrop-blur-xl text-white flex items-center justify-center w-full h-full text-sm antialiased",i),style:{borderRadius:`calc(${e} * 0.96)`},children:t})]})}const w0=({children:e,duration:t=2e3,rx:n,ry:r,...o})=>{const s=P.useRef(),i=It(0);bk(d=>{var h;const f=(h=s.current)==null?void 0:h.getTotalLength();if(f){const m=f/t;i.set(d*m%f)}});const a=jt(i,d=>{var f;return(f=s.current)==null?void 0:f.getPointAtLength(d).x}),l=jt(i,d=>{var f;return(f=s.current)==null?void 0:f.getPointAtLength(d).y}),c=Al`translateX(${a}px) translateY(${l}px) translateX(-50%) translateY(-50%)`;return p.jsxs(p.Fragment,{children:[p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",preserveAspectRatio:"none",className:"absolute h-full w-full",width:"100%",height:"100%",...o,children:p.jsx("rect",{fill:"none",width:"100%",height:"100%",rx:n,ry:r,ref:s})}),p.jsx(se.div,{style:{position:"absolute",top:0,left:0,display:"inline-block",transform:c},children:e})]})},MO=({className:e,children:t,borderSize:n=2,borderRadius:r=20,neonColors:o={firstColor:"#ff00aa",secondColor:"#00FFF1"},...s})=>p.jsxs("div",{className:M("relative overflow-hidden z-0",e),style:{borderRadius:r,...s.style},...s,children:[p.jsx("div",{className:"absolute top-0 left-0 w-full h-full -z-10 animate-[spin_4s_linear_infinite]",style:{background:`conic-gradient(from 0deg, transparent 0 340deg, ${o.firstColor} 360deg)`,top:"-50%",left:"-50%",width:"200%",height:"200%"}}),p.jsx("div",{className:"absolute top-0 left-0 w-full h-full -z-10 animate-[spin_4s_linear_infinite]",style:{background:`conic-gradient(from 180deg, transparent 0 340deg, ${o.secondColor} 360deg)`,top:"-50%",left:"-50%",width:"200%",height:"200%",animationDelay:"-2s"}}),p.jsx("div",{className:"relative bg-background z-10 w-[calc(100%-4px)] h-[calc(100%-4px)] m-[2px]",style:{borderRadius:r-n},children:t})]}),IO=({className:e,particleCount:t=50,particleColor:n})=>{const r=P.useRef(null),o=P.useRef(null),{theme:s}=ys();return P.useEffect(()=>{const i=r.current;if(!i)return;const a=i.getContext("2d");if(!a)return;let l=[],c;const d=()=>{var m,y;i.width=((m=o.current)==null?void 0:m.offsetWidth)||window.innerWidth,i.height=((y=o.current)==null?void 0:y.offsetHeight)||window.innerHeight,f()},f=()=>{l=[];for(let m=0;m<t;m++)l.push({x:Math.random()*i.width,y:Math.random()*i.height,vx:(Math.random()-.5)*.5,vy:(Math.random()-.5)*.5,size:Math.random()*2+.5})},h=()=>{a.clearRect(0,0,i.width,i.height);const m=n||(s==="dark"?"rgba(255, 255, 255, 0.5)":"rgba(0, 0, 0, 0.7)"),y=n||(s==="dark"?"rgba(255, 255, 255, 0.15)":"rgba(0, 0, 0, 0.3)");l.forEach((g,v)=>{g.x+=g.vx,g.y+=g.vy,(g.x<0||g.x>i.width)&&(g.vx*=-1),(g.y<0||g.y>i.height)&&(g.vy*=-1),a.beginPath(),a.arc(g.x,g.y,g.size,0,Math.PI*2),a.fillStyle=m,a.fill();for(let b=v+1;b<l.length;b++){const w=l[b],x=g.x-w.x,S=g.y-w.y;Math.sqrt(x*x+S*S)<100&&(a.beginPath(),a.strokeStyle=y,a.lineWidth=.5,a.moveTo(g.x,g.y),a.lineTo(w.x,w.y),a.stroke())}}),c=requestAnimationFrame(h)};return d(),h(),window.addEventListener("resize",d),()=>{window.removeEventListener("resize",d),cancelAnimationFrame(c)}},[t,n,s]),p.jsx("div",{ref:o,className:e,style:{position:"relative",overflow:"hidden"},children:p.jsx("canvas",{ref:r,style:{display:"block",width:"100%",height:"100%"}})})},DO=({children:e,className:t,variant:n="blue",...r})=>{const[o,s]=P.useState([]),i=P.useRef(null),a=5;P.useEffect(()=>{if(!i.current)return;const d=()=>{if(!i.current)return;const f=i.current.getBoundingClientRect(),h=f.width,m=f.height,y=[];for(let g=0;g<h;g+=a)for(let v=0;v<m;v+=a)Math.random()>.9&&y.push({x:g,y:v});s(y)};return d(),window.addEventListener("resize",d),()=>window.removeEventListener("resize",d)},[]);const l={default:"bg-neutral-900 border-neutral-800",blue:"bg-slate-900 border-slate-800",pink:"bg-pink-900/20 border-pink-800/50"},c={default:"bg-neutral-500",blue:"bg-blue-500",pink:"bg-pink-500"};return p.jsxs("div",{ref:i,className:M("relative overflow-hidden rounded-xl border p-6 group",l[n],t),...r,children:[p.jsx("div",{className:"absolute inset-0 z-0 opacity-10 pointer-events-none",style:{backgroundImage:`radial-gradient(${n==="pink"?"#ec4899":"#3b82f6"} 1px, transparent 1px)`,backgroundSize:`${a*2}px ${a*2}px`}}),p.jsx("div",{className:"absolute inset-0 z-0 opacity-0 group-hover:opacity-100 transition-opacity duration-500",children:o.map((d,f)=>p.jsx("span",{className:M("absolute w-1 h-1 rounded-full animate-pulse",c[n]),style:{left:d.x,top:d.y,animationDelay:`${Math.random()*2}s`}},f))}),p.jsx("div",{className:"relative z-10",children:e})]})},_O=e=>{const{className:t,minSize:n=1,maxSize:r=3,particleDensity:o=100,particleColor:s="#FFFFFF",speed:i=4}=e,a=P.useRef(null),[l,c]=P.useState(null),[d,f]=P.useState([]),h=P.useRef(),m=(v,b)=>{const w=o,x=[];for(let S=0;S<w;S++)x.push({x:Math.random()*v,y:Math.random()*b,size:Math.random()*(r-n)+n,speedX:(Math.random()-.5)*i,speedY:(Math.random()-.5)*i});f(x)},y=()=>{if(a.current){const v=a.current,{width:b,height:w}=v.getBoundingClientRect();v.width=b,v.height=w,m(b,w)}};P.useEffect(()=>(a.current&&(c(a.current.getContext("2d")),y(),window.addEventListener("resize",y)),()=>{window.removeEventListener("resize",y)}),[l]),P.useEffect(()=>{if(l&&a.current){const{width:v,height:b}=a.current;m(v,b)}},[l,n,r,o,i]);const g=()=>{if(l&&a.current){const v=a.current;l.clearRect(0,0,v.width,v.height),d.forEach(b=>{b.x+=b.speedX,b.y+=b.speedY,b.x>v.width&&(b.x=0),b.x<0&&(b.x=v.width),b.y>v.height&&(b.y=0),b.y<0&&(b.y=v.height),l.fillStyle=s,l.beginPath(),l.arc(b.x,b.y,b.size,0,Math.PI*2),l.fill()}),h.current=requestAnimationFrame(g)}};return P.useEffect(()=>{if(l)return g(),()=>{h.current&&cancelAnimationFrame(h.current)}},[l,d,s]),p.jsx("div",{className:M("relative h-full w-full overflow-hidden",t),children:p.jsx("canvas",{ref:a,className:"absolute inset-0 h-full w-full"})})},kO=({children:e,className:t,spotlightColor:n})=>{const r=P.useRef(null),[o,s]=P.useState({x:0,y:0}),[i,a]=P.useState(0),{theme:l}=ys(),c=n||(l==="dark"?"rgba(255, 255, 255, 0.25)":"rgba(37, 99, 235, 0.3)"),d=g=>{if(!r.current)return;const b=r.current.getBoundingClientRect();s({x:g.clientX-b.left,y:g.clientY-b.top})},f=()=>{a(1)},h=()=>{a(0)},m=()=>{a(1)},y=()=>{a(0)};return p.jsxs("div",{ref:r,onMouseMove:d,onMouseEnter:m,onMouseLeave:y,onFocus:f,onBlur:h,className:M("relative overflow-hidden rounded-xl border border-border bg-card text-card-foreground shadow",t),children:[p.jsx("div",{className:"pointer-events-none absolute -inset-px transition duration-300",style:{opacity:i,background:`radial-gradient(600px circle at ${o.x}px ${o.y}px, ${c}, transparent 40%)`}}),p.jsx("div",{className:"relative h-full",children:e})]})},OO=({content:e,contentClassName:t})=>{const[n,r]=P.useState(0),o=P.useRef(null),{scrollYProgress:s}=Qb({container:o,offset:["start start","end start"],layoutEffect:!1}),i=e.length;U_(s,"change",f=>{const h=e.map((y,g)=>g/i),m=h.reduce((y,g,v)=>Math.abs(f-g)<Math.abs(f-h[y])?v:y,0);r(m)});const a=["#0f172a","#000000","#171717"],l=["linear-gradient(to bottom right, #06b6d4, #10b981)","linear-gradient(to bottom right, #ec4899, #6366f1)","linear-gradient(to bottom right, #f97316, #eab308)"],[c,d]=P.useState(l[0]);return P.useEffect(()=>{d(l[n%l.length])},[n]),p.jsxs(se.div,{animate:{backgroundColor:a[n%a.length]},className:"h-[30rem] overflow-y-auto flex justify-center relative space-x-10 rounded-md p-10",ref:o,children:[p.jsx("div",{className:"div relative flex items-start px-4",children:p.jsxs("div",{className:"max-w-2xl",children:[e.map((f,h)=>p.jsxs("div",{className:"my-20",children:[p.jsx(se.h2,{initial:{opacity:0},animate:{opacity:n===h?1:.3},className:"text-2xl font-bold text-slate-100",children:f.title}),p.jsx(se.p,{initial:{opacity:0},animate:{opacity:n===h?1:.3},className:"text-kg text-slate-300 max-w-sm mt-10",children:f.description})]},f.title+h)),p.jsx("div",{className:"h-40"})]})}),p.jsx("div",{style:{background:c},className:M("hidden lg:block h-60 w-80 rounded-md bg-white sticky top-10 overflow-hidden",t),children:e[n].content??null})]})},LO=({words:e,className:t})=>{const[n,r]=Gk();let o=e.split(" ");P.useEffect(()=>{r("span",{opacity:1},{duration:2,delay:Zk(.2)})},[n.current]);const s=()=>p.jsx(se.div,{ref:n,children:o.map((i,a)=>p.jsxs(se.span,{className:"dark:text-white text-black opacity-0",children:[i," "]},i+a))});return p.jsx("div",{className:M("font-bold",t),children:p.jsx("div",{className:"mt-4",children:p.jsx("div",{className:" dark:text-white text-black text-2xl leading-snug tracking-wide",children:s()})})})},VO=({text:e,className:t,delay:n=0,duration:r=.5})=>{const o=P.useRef(null),s=Xk(o,{once:!0,margin:"-10%"}),i=e.split(" "),a={hidden:{opacity:0},visible:(c=1)=>({opacity:1,transition:{staggerChildren:.12,delayChildren:.04*c+n}})},l={visible:{opacity:1,y:0,transition:{type:"spring",damping:12,stiffness:100,duration:r,filter:{type:"tween",duration:r}},filter:"blur(0px)"},hidden:{opacity:0,y:20,filter:"blur(2px)"}};return p.jsx(se.div,{ref:o,style:{overflow:"hidden",display:"flex",flexWrap:"wrap"},variants:a,initial:"hidden",animate:s?"visible":"hidden",className:M("text-4xl font-bold text-black dark:text-white",t),children:i.map((c,d)=>p.jsx(se.span,{variants:l,style:{marginRight:"0.25em"},className:"inline-block",children:c},d))})},$O=({children:e,className:t,container:n})=>{const r=P.useRef(null),{scrollYProgress:o}=Qb({target:r,container:n,offset:["start start","end start"],layoutEffect:!1}),s=P.useRef(null),[i,a]=P.useState(0);P.useEffect(()=>{if(!s.current)return;const d=()=>{s.current&&a(s.current.offsetHeight)};d();const f=new ResizeObserver(d);return f.observe(s.current),()=>f.disconnect()},[]);const l=Cr(jt(o,[0,.8],[50,i]),{stiffness:500,damping:90}),c=Cr(jt(o,[0,1],[50,i-200]),{stiffness:500,damping:90});return p.jsxs(se.div,{ref:r,className:M("relative w-full max-w-4xl mx-auto h-full",t),children:[p.jsxs("div",{className:"absolute left-0 top-3",children:[p.jsx(se.div,{transition:{duration:.2,delay:.5},animate:{boxShadow:o.get()>0?"none":"rgba(0, 0, 0, 0.24) 0px 3px 8px"},className:"ml-[27px] h-4 w-4 rounded-full border border-netural-200 shadow-sm flex items-center justify-center",children:p.jsx(se.div,{transition:{duration:.2,delay:.5},animate:{backgroundColor:o.get()>0?"#ffffff":"#10b981",borderColor:o.get()>0?"#ffffff":"#059669"},className:"h-2 w-2 rounded-full border border-neutral-300 bg-white"})}),p.jsxs("svg",{viewBox:`0 0 20 ${i}`,width:"20",height:i,className:" ml-4 block","aria-hidden":"true",children:[p.jsx(se.path,{d:`M 1 0V -36 l 18 24 V ${i*.8} l -18 24V ${i}`,fill:"none",stroke:"#9091A0",strokeOpacity:"0.16",transition:{duration:10}}),p.jsx(se.path,{d:`M 1 0V -36 l 18 24 V ${i*.8} l -18 24V ${i}`,fill:"none",stroke:"url(#gradient)",strokeWidth:"1.25",className:"motion-reduce:hidden",transition:{duration:10}}),p.jsx("defs",{children:p.jsxs(se.linearGradient,{id:"gradient",gradientUnits:"userSpaceOnUse",x1:"0",x2:"0",y1:l,y2:c,children:[p.jsx("stop",{stopColor:"#18CCFC",stopOpacity:"0"}),p.jsx("stop",{stopColor:"#18CCFC"}),p.jsx("stop",{offset:"0.325",stopColor:"#6344F5"}),p.jsx("stop",{offset:"1",stopColor:"#AE48FF",stopOpacity:"0"})]})})]})]}),p.jsx("div",{ref:s,className:"ml-10",children:e})]})},FO=1/3,st=1/6,_l=e=>Math.floor(e)|0,kl=new Float64Array([1,1,0,-1,1,0,1,-1,0,-1,-1,0,1,0,1,-1,0,1,1,0,-1,-1,0,-1,0,1,1,0,-1,1,0,1,-1,0,-1,-1]);function x0(e=Math.random){const t=RO(e),n=new Float64Array(t).map(s=>kl[s%12*3]),r=new Float64Array(t).map(s=>kl[s%12*3+1]),o=new Float64Array(t).map(s=>kl[s%12*3+2]);return function(i,a,l){let c,d,f,h;const m=(i+a+l)*FO,y=_l(i+m),g=_l(a+m),v=_l(l+m),b=(y+g+v)*st,w=y-b,x=g-b,S=v-b,C=i-w,T=a-x,A=l-S;let N,I,O,L,V,U;C>=T?T>=A?(N=1,I=0,O=0,L=1,V=1,U=0):C>=A?(N=1,I=0,O=0,L=1,V=0,U=1):(N=0,I=0,O=1,L=1,V=0,U=1):T<A?(N=0,I=0,O=1,L=0,V=1,U=1):C<A?(N=0,I=1,O=0,L=0,V=1,U=1):(N=0,I=1,O=0,L=1,V=1,U=0);const _=C-N+st,K=T-I+st,H=A-O+st,B=C-L+2*st,$=T-V+2*st,F=A-U+2*st,ne=C-1+3*st,re=T-1+3*st,D=A-1+3*st,G=y&255,X=g&255,j=v&255;let Q=.6-C*C-T*T-A*A;if(Q<0)c=0;else{const ee=G+t[X+t[j]];Q*=Q,c=Q*Q*(n[ee]*C+r[ee]*T+o[ee]*A)}let z=.6-_*_-K*K-H*H;if(z<0)d=0;else{const ee=G+N+t[X+I+t[j+O]];z*=z,d=z*z*(n[ee]*_+r[ee]*K+o[ee]*H)}let Z=.6-B*B-$*$-F*F;if(Z<0)f=0;else{const ee=G+L+t[X+V+t[j+U]];Z*=Z,f=Z*Z*(n[ee]*B+r[ee]*$+o[ee]*F)}let q=.6-ne*ne-re*re-D*D;if(q<0)h=0;else{const ee=G+1+t[X+1+t[j+1]];q*=q,h=q*q*(n[ee]*ne+r[ee]*re+o[ee]*D)}return 32*(c+d+f+h)}}function RO(e){const n=new Uint8Array(512);for(let r=0;r<512/2;r++)n[r]=r;for(let r=0;r<512/2-1;r++){const o=r+~~(e()*(256-r)),s=n[r];n[r]=n[o],n[o]=s}for(let r=256;r<512;r++)n[r]=n[r-256];return n}const BO=({children:e,className:t,containerClassName:n,particleCount:r=700,baseHue:o=220,baseSpeed:s=0,rangeSpeed:i=1.5,baseRadius:a=1,rangeRadius:l=2,backgroundColor:c="#000000"})=>{const d=P.useRef(null),f=P.useRef(null),h=9,m=r*h,y=100,g=50,v=150,b=s,w=i,x=a,S=l,C=o,T=20,A=3,N=.00125,I=.00125,O=5e-4,L=P.useRef(c);let V=0;const U=x0();let _=new Float32Array(m),K=[0,0];const H=Math.PI*2,B=R=>R*Math.random(),$=R=>R-B(2*R),F=(R,Y)=>{let ae=.5*Y;return Math.abs((R+ae)%Y-ae)/ae},ne=(R,Y,ae)=>(1-ae)*R+ae*Y,re=()=>{const R=d.current,Y=f.current;if(R&&Y){const ae=R.getContext("2d");ae&&(q(R),D(),X(R,ae))}},D=()=>{V=0,_=new Float32Array(m);for(let R=0;R<m;R+=h)G(R)},G=R=>{const Y=d.current;if(!Y)return;let ae,Ie,De,_e,ct,Ue,Pe,fs,ps;ae=B(Y.width),Ie=K[1]+$(y),De=0,_e=0,ct=0,Ue=g+B(v),Pe=b+B(w),fs=x+B(S),ps=C+B(T),_.set([ae,Ie,De,_e,ct,Ue,Pe,fs,ps],R)},X=(R,Y)=>{V++,Y.clearRect(0,0,R.width,R.height),Y.fillStyle=L.current,Y.fillRect(0,0,R.width,R.height),j(Y),ee(R,Y),le(R,Y),window.requestAnimationFrame(()=>X(R,Y))},j=R=>{for(let Y=0;Y<m;Y+=h)Q(Y,R)},Q=(R,Y)=>{const ae=d.current;if(!ae)return;let Ie=1+R,De=2+R,_e=3+R,ct=4+R,Ue=5+R,Pe=6+R,fs=7+R,ps=8+R,Ol,Pr,Tr,Ll,Vl,Ar,$l,Fl,Rl,Bl,E0,P0;Pr=_[R],Tr=_[Ie],Ol=U(Pr*N,Tr*I,V*O)*A*H,Ll=ne(_[De],Math.cos(Ol),.5),Vl=ne(_[_e],Math.sin(Ol),.5),Ar=_[ct],$l=_[Ue],Fl=_[Pe],Rl=Pr+Ll*Fl,Bl=Tr+Vl*Fl,E0=_[fs],P0=_[ps],z(Pr,Tr,Rl,Bl,Ar,$l,E0,P0,Y),Ar++,_[R]=Rl,_[Ie]=Bl,_[De]=Ll,_[_e]=Vl,_[ct]=Ar,(Z(Pr,Tr,ae)||Ar>$l)&&G(R)},z=(R,Y,ae,Ie,De,_e,ct,Ue,Pe)=>{Pe.save(),Pe.lineCap="round",Pe.lineWidth=ct,Pe.strokeStyle=`hsla(${Ue},100%,60%,${F(De,_e)})`,Pe.beginPath(),Pe.moveTo(R,Y),Pe.lineTo(ae,Ie),Pe.stroke(),Pe.closePath(),Pe.restore()},Z=(R,Y,ae)=>R>ae.width||R<0||Y>ae.height||Y<0,q=R=>{const{innerWidth:Y,innerHeight:ae}=window;R.width=Y,R.height=ae,K[0]=.5*R.width,K[1]=.5*R.height},ee=(R,Y)=>{Y.save(),Y.filter="blur(8px) brightness(200%)",Y.globalCompositeOperation="lighter",Y.drawImage(R,0,0),Y.restore(),Y.save(),Y.filter="blur(4px) brightness(200%)",Y.globalCompositeOperation="lighter",Y.drawImage(R,0,0),Y.restore()},le=(R,Y)=>{Y.save(),Y.globalCompositeOperation="lighter",Y.drawImage(R,0,0),Y.restore()};return P.useEffect(()=>{re(),window.addEventListener("resize",()=>{const R=d.current,Y=R==null?void 0:R.getContext("2d");R&&Y&&q(R)})},[]),p.jsxs("div",{className:M("relative h-full w-full",n),children:[p.jsx(se.div,{initial:{opacity:0},animate:{opacity:1},ref:f,className:"absolute h-full w-full inset-0 z-0 bg-transparent flex items-center justify-center",children:p.jsx("canvas",{ref:d})}),p.jsx("div",{className:M("relative z-10",t),children:e})]})},zO=({children:e,className:t,containerClassName:n,colors:r,waveWidth:o,backgroundFill:s,blur:i=10,speed:a="fast",waveOpacity:l=.5,...c})=>{const d=x0();let f,h,m,y,g,v,b;const w=P.useRef(null),x=()=>{switch(a){case"slow":return .001;case"fast":return .002;default:return .001}},S=()=>{b=w.current,v=b.getContext("2d"),f=v.canvas.width=window.innerWidth,h=v.canvas.height=window.innerHeight,v.filter=`blur(${i}px)`,m=0,window.onresize=function(){f=v.canvas.width=window.innerWidth,h=v.canvas.height=window.innerHeight,v.filter=`blur(${i}px)`},N()},C=r??["#38bdf8","#818cf8","#c084fc","#e879f9","#22d3ee"],T=L=>{for(m+=x(),y=0;y<L;y++){for(v.beginPath(),v.lineWidth=o||50,v.strokeStyle=C[y%C.length],g=0;g<f;g+=5){var V=d(g/800,.3*y,m)*100;v.lineTo(g,V+h*.5)}v.stroke(),v.closePath()}};let A;const N=()=>{v.fillStyle=s||"black",v.globalAlpha=l||.5,v.fillRect(0,0,f,h),T(5),A=requestAnimationFrame(N)};P.useEffect(()=>(S(),()=>{cancelAnimationFrame(A)}),[]);const[I,O]=P.useState(!1);return P.useEffect(()=>{O(typeof window<"u"&&navigator.userAgent.includes("Safari")&&!navigator.userAgent.includes("Chrome"))},[]),p.jsxs("div",{className:M("h-screen flex flex-col items-center justify-center",n),children:[p.jsx("canvas",{className:"absolute inset-0 z-0",ref:w,id:"canvas",style:{...I?{filter:`blur(${i}px)`}:{}}}),p.jsx("div",{className:M("relative z-10",t),...c,children:e})]})},S0=P.createContext(void 0),WO=({children:e,className:t,containerClassName:n})=>{const r=P.useRef(null),[o,s]=P.useState(!1),i=c=>{if(!r.current)return;const{left:d,top:f,width:h,height:m}=r.current.getBoundingClientRect(),y=(c.clientX-d-h/2)/25,g=(c.clientY-f-m/2)/25;r.current.style.transform=`rotateY(${y}deg) rotateX(${g*-1}deg)`},a=()=>{s(!0),r.current},l=()=>{r.current&&(s(!1),r.current.style.transform="rotateY(0deg) rotateX(0deg)")};return p.jsx(S0.Provider,{value:[o,s],children:p.jsx("div",{className:M("py-20 flex items-center justify-center",n),style:{perspective:"1000px"},children:p.jsx("div",{ref:r,onMouseEnter:a,onMouseMove:i,onMouseLeave:l,className:M("flex items-center justify-center relative transition-all duration-200 ease-linear",t),style:{transformStyle:"preserve-3d"},children:e})})})},HO=({children:e,className:t})=>p.jsx("div",{className:M("h-96 w-96 [transform-style:preserve-3d] [&>*]:[transform-style:preserve-3d]",t),children:e}),jO=({as:e="div",children:t,className:n,translateX:r=0,translateY:o=0,translateZ:s=0,rotateX:i=0,rotateY:a=0,rotateZ:l=0,...c})=>{const d=P.useRef(null),[f]=C0();P.useEffect(()=>{h()},[f]);const h=()=>{d.current&&(f?d.current.style.transform=`translateX(${r}px) translateY(${o}px) translateZ(${s}px) rotateX(${i}deg) rotateY(${a}deg) rotateZ(${l}deg)`:d.current.style.transform="translateX(0px) translateY(0px) translateZ(0px) rotateX(0deg) rotateY(0deg) rotateZ(0deg)")};return p.jsx(e,{ref:d,className:M("w-fit transition-all duration-200 ease-linear",n),...c,children:t})},C0=()=>{const e=P.useContext(S0);if(e===void 0)throw new Error("useMouseEnter must be used within a MouseEnterProvider");return e},UO=({className:e,children:t,showRadialGradient:n=!0,...r})=>p.jsxs("div",{className:M("relative flex flex-col h-[100vh] items-center justify-center bg-zinc-50 dark:bg-zinc-900 text-slate-950 transition-bg",e),...r,children:[p.jsx("div",{className:"absolute inset-0 overflow-hidden",children:p.jsx("div",{className:M(`
170
141
  [--white-gradient:repeating-linear-gradient(100deg,#ffffff_0%,#ffffff_7%,transparent_10%,transparent_12%,#ffffff_16%)]
171
142
  [--dark-gradient:repeating-linear-gradient(100deg,#000000_0%,#000000_7%,transparent_10%,transparent_12%,#000000_16%)]
172
143
  [--aurora:repeating-linear-gradient(100deg,#3b82f6_10%,#6366f1_15%,#93c5fd_20%,#ddd6fe_25%,#60a5fa_30%)]
@@ -180,4 +151,4 @@ Defaulting to \`null\`.`}var lm=nm,OA=om;const cm=d.forwardRef(({className:e,val
180
151
  after:[background-size:200%,_100%]
181
152
  after:animate-aurora after:[background-attachment:fixed] after:mix-blend-difference
182
153
  pointer-events-none
183
- absolute -inset-[10px] opacity-50 will-change-transform`,n&&"[mask-image:radial-gradient(ellipse_at_100%_0%,black_10%,transparent_70%)]")})}),t]});P.Accordion=sN,P.AccordionContent=Wm,P.AccordionItem=Fm,P.AccordionTrigger=Bm,P.Alert=Tf,P.AlertDescription=Rf,P.AlertTitle=Pf,P.AnimatedNumber=ID,P.AnimatedTabs=DD,P.AnimatedTabsContent=kb,P.AnimatedTooltip=kD,P.AuroraBackground=Tk,P.Avatar=bv,P.AvatarFallback=Sv,P.AvatarImage=wv,P.Badge=uM,P.Boxes=Ob,P.BoxesCore=OD,P.Breadcrumb=lg,P.BreadcrumbEllipsis=hg,P.BreadcrumbItem=ug,P.BreadcrumbLink=dg,P.BreadcrumbList=cg,P.BreadcrumbPage=fg,P.BreadcrumbSeparator=pg,P.Button=Nc,P.CanvasCard=$D,P.CanvasRevealEffect=LD,P.CanvasRevealIcon=Zr,P.Card=gm,P.CardBody=Ck,P.CardContainer=Sk,P.CardContent=bm,P.CardDescription=xm,P.CardFooter=wm,P.CardHeader=vm,P.CardItem=Ek,P.CardPattern=Vb,P.CardStack=FD,P.CardTitle=ym,P.Checkbox=Gc,P.Command=Da,P.CommandDialog=JN,P.CommandEmpty=qg,P.CommandGroup=Zg,P.CommandInput=Yg,P.CommandItem=Qg,P.CommandList=Xg,P.CommandSeparator=Jg,P.CommandShortcut=ev,P.Dialog=Uf,P.DialogClose=WT,P.DialogContent=zi,P.DialogDescription=qf,P.DialogFooter=Yf,P.DialogHeader=Kf,P.DialogOverlay=Wi,P.DialogPortal=Gf,P.DialogTitle=Xf,P.DialogTrigger=BT,P.DropdownMenu=sR,P.DropdownMenuCheckboxItem=eh,P.DropdownMenuContent=Jp,P.DropdownMenuGroup=aR,P.DropdownMenuItem=Qp,P.DropdownMenuLabel=nh,P.DropdownMenuPortal=lR,P.DropdownMenuRadioGroup=uR,P.DropdownMenuRadioItem=th,P.DropdownMenuSeparator=rh,P.DropdownMenuShortcut=oh,P.DropdownMenuSub=cR,P.DropdownMenuSubContent=Zp,P.DropdownMenuSubTrigger=qp,P.DropdownMenuTrigger=iR,P.EvervaultCard=BD,P.FlipWords=zD,P.GlitchText=HD,P.HoverCard=ek,P.HoverCardContent=Gb,P.HoverCardTrigger=tk,P.Icon=WD,P.InfiniteMovingCards=nk,P.Input=Mc,P.InteractiveGrid=rk,P.Label=Dc,P.LampContainer=ok,P.Lens=sk,P.Loader=jD,P.MagicCard=ik,P.MagnetButton=ak,P.MovingBorder=Kb,P.MovingBorderButton=lk,P.NeonGradientCard=ck,P.Pagination=mg,P.PaginationContent=gg,P.PaginationEllipsis=bg,P.PaginationItem=vg,P.PaginationLink=os,P.PaginationNext=xg,P.PaginationPrevious=yg,P.ParticleBackground=uk,P.PixelCard=dk,P.Popover=MR,P.PopoverContent=gh,P.PopoverTrigger=_R,P.Progress=cm,P.RadioGroup=pu,P.RadioGroupItem=hu,P.ScrollArea=rg,P.ScrollBar=Pa,P.Select=oT,P.SelectContent=of,P.SelectGroup=sT,P.SelectItem=af,P.SelectLabel=sf,P.SelectSeparator=lf,P.SelectTrigger=rf,P.SelectValue=iT,P.Separator=ag,P.Sheet=LA,P.SheetClose=$A,P.SheetContent=dm,P.SheetDescription=mm,P.SheetFooter=pm,P.SheetHeader=fm,P.SheetOverlay=ha,P.SheetPortal=um,P.SheetTitle=hm,P.SheetTrigger=VA,P.Skeleton=PA,P.Slider=Ef,P.SparklesCore=fk,P.SpotlightCard=pk,P.StickyScroll=hk,P.Switch=wu,P.Tabs=RN,P.TabsContent=Og,P.TabsList=Dg,P.TabsTrigger=kg,P.TextGenerateEffect=mk,P.TextReveal=gk,P.Textarea=_c,P.ThemeProvider=Vw,P.ThemeProviderContext=Us,P.Timeline=tv,P.TimelineContent=ov,P.TimelineDescription=av,P.TimelineItem=nv,P.TimelinePoint=rv,P.TimelineTime=sv,P.TimelineTitle=iv,P.Toast=Kh,P.ToastAction=Yh,P.ToastClose=Xh,P.ToastDescription=Zh,P.ToastProvider=bA,P.ToastTitle=qh,P.ToastViewport=Gh,P.Tooltip=eA,P.TooltipContent=Th,P.TooltipProvider=QR,P.TooltipTrigger=tA,P.TracingBeam=vk,P.Vortex=bk,P.WavyBackground=wk,P.badgeVariants=Cv,P.buttonVariants=Ks,P.cn=M,P.generateRandomString=rc,P.reducer=Qh,P.toast=em,P.useMouseEnter=qb,P.useTheme=Gs,P.useToast=TA,Object.defineProperty(P,Symbol.toStringTag,{value:"Module"})});
154
+ absolute -inset-[10px] opacity-50 will-change-transform`,n&&"[mask-image:radial-gradient(ellipse_at_100%_0%,black_10%,transparent_70%)]")})}),t]});E.Accordion=PN,E.AccordionContent=mm,E.AccordionItem=pm,E.AccordionTrigger=hm,E.Alert=Zd,E.AlertDescription=Qd,E.AlertTitle=Jd,E.AnimatedNumber=Qk,E.AnimatedTabs=eO,E.AnimatedTabsContent=l0,E.AnimatedTooltip=tO,E.AuroraBackground=UO,E.Avatar=Kg,E.AvatarFallback=Xg,E.AvatarImage=Yg,E.Badge=IM,E.Boxes=c0,E.BoxesCore=nO,E.Breadcrumb=Lm,E.BreadcrumbEllipsis=zm,E.BreadcrumbItem=$m,E.BreadcrumbLink=Fm,E.BreadcrumbList=Vm,E.BreadcrumbPage=Rm,E.BreadcrumbSeparator=Bm,E.Button=nc,E.CanvasCard=sO,E.CanvasRevealEffect=rO,E.CanvasRevealIcon=Er,E.Card=Hh,E.CardBody=HO,E.CardContainer=WO,E.CardContent=Kh,E.CardDescription=Gh,E.CardFooter=Yh,E.CardHeader=jh,E.CardItem=jO,E.CardPattern=d0,E.CardStack=iO,E.CardTitle=Uh,E.Checkbox=bc,E.Command=ia,E.CommandDialog=yM,E.CommandEmpty=Cg,E.CommandGroup=Eg,E.CommandInput=xg,E.CommandItem=Tg,E.CommandList=Sg,E.CommandSeparator=Pg,E.CommandShortcut=Ag,E.Dialog=yf,E.DialogClose=lP,E.DialogContent=mi,E.DialogDescription=Cf,E.DialogFooter=xf,E.DialogHeader=wf,E.DialogOverlay=hi,E.DialogPortal=bf,E.DialogTitle=Sf,E.DialogTrigger=aP,E.DropdownMenu=PT,E.DropdownMenuCheckboxItem=Ap,E.DropdownMenuContent=Pp,E.DropdownMenuGroup=AT,E.DropdownMenuItem=Tp,E.DropdownMenuLabel=Mp,E.DropdownMenuPortal=NT,E.DropdownMenuRadioGroup=IT,E.DropdownMenuRadioItem=Np,E.DropdownMenuSeparator=Ip,E.DropdownMenuShortcut=Dp,E.DropdownMenuSub=MT,E.DropdownMenuSubContent=Ep,E.DropdownMenuSubTrigger=Cp,E.DropdownMenuTrigger=TT,E.EvervaultCard=aO,E.FlipWords=cO,E.GlitchText=uO,E.HoverCard=wO,E.HoverCardContent=b0,E.HoverCardTrigger=xO,E.Icon=lO,E.InfiniteMovingCards=SO,E.Input=rc,E.InteractiveGrid=CO,E.Label=ac,E.LampContainer=EO,E.Lens=PO,E.Loader=Jk,E.MagicCard=TO,E.MagnetButton=AO,E.MovingBorder=w0,E.MovingBorderButton=NO,E.NeonGradientCard=MO,E.Pagination=Wm,E.PaginationContent=Hm,E.PaginationEllipsis=Km,E.PaginationItem=jm,E.PaginationLink=Do,E.PaginationNext=Gm,E.PaginationPrevious=Um,E.ParticleBackground=IO,E.PixelCard=DO,E.Popover=qT,E.PopoverContent=Hp,E.PopoverTrigger=ZT,E.Progress=Vh,E.RadioGroup=Bc,E.RadioGroupItem=zc,E.ScrollArea=Im,E.ScrollBar=Ji,E.Select=EE,E.SelectContent=Dd,E.SelectGroup=PE,E.SelectItem=kd,E.SelectLabel=_d,E.SelectSeparator=Od,E.SelectTrigger=Id,E.SelectValue=TE,E.Separator=Om,E.Sheet=rN,E.SheetClose=sN,E.SheetContent=Fh,E.SheetDescription=Wh,E.SheetFooter=Bh,E.SheetHeader=Rh,E.SheetOverlay=Bi,E.SheetPortal=$h,E.SheetTitle=zh,E.SheetTrigger=oN,E.Skeleton=GA,E.Slider=qd,E.SparklesCore=_O,E.SpotlightCard=kO,E.StickyScroll=OO,E.Switch=Yc,E.Tabs=KN,E.TabsContent=cg,E.TabsList=ag,E.TabsTrigger=lg,E.TextGenerateEffect=LO,E.TextReveal=VO,E.Textarea=oc,E.ThemeProvider=ow,E.ThemeProviderContext=vs,E.Timeline=Ng,E.TimelineContent=Dg,E.TimelineDescription=Og,E.TimelineItem=Mg,E.TimelinePoint=Ig,E.TimelineTime=_g,E.TimelineTitle=kg,E.Toast=wh,E.ToastAction=xh,E.ToastClose=Sh,E.ToastDescription=Eh,E.ToastProvider=BA,E.ToastTitle=Ch,E.ToastViewport=bh,E.Tooltip=wA,E.TooltipContent=Jp,E.TooltipProvider=bA,E.TooltipTrigger=xA,E.TracingBeam=$O,E.Vortex=BO,E.WavyBackground=zO,E.badgeVariants=qg,E.buttonVariants=bs,E.cn=M,E.generateRandomString=Ml,E.reducer=Th,E.toast=Ah,E.useMouseEnter=C0,E.useTheme=ys,E.useToast=UA,Object.defineProperty(E,Symbol.toStringTag,{value:"Module"})});