HEX
Server: Apache
System: Linux WWW 6.1.0-40-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.153-1 (2025-09-20) x86_64
User: web11 (1011)
PHP: 8.2.29
Disabled: NONE
Upload Files
File: /var/www/biblioteka/wp-content/plugins/astra-sites/inc/lib/getting-started/build/main.js
(()=>{"use strict";var e,t,n,r={409:(e,t,n)=>{var r=n(609),o=n.t(r,2);const i=window.wp.element;var s=n(848);const a=e=>{const t=d(e),{conflictingClassGroups:n,conflictingClassGroupModifiers:r}=e;return{getClassGroupId:e=>{const n=e.split("-");return""===n[0]&&1!==n.length&&n.shift(),l(n,t)||u(e)},getConflictingClassGroupIds:(e,t)=>{const o=n[e]||[];return t&&r[e]?[...o,...r[e]]:o}}},l=(e,t)=>{if(0===e.length)return t.classGroupId;const n=e[0],r=t.nextPart.get(n),o=r?l(e.slice(1),r):void 0;if(o)return o;if(0===t.validators.length)return;const i=e.join("-");return t.validators.find((({validator:e})=>e(i)))?.classGroupId},c=/^\[(.+)\]$/,u=e=>{if(c.test(e)){const t=c.exec(e)[1],n=t?.substring(0,t.indexOf(":"));if(n)return"arbitrary.."+n}},d=e=>{const{theme:t,prefix:n}=e,r={nextPart:new Map,validators:[]};return f(Object.entries(e.classGroups),n).forEach((([e,n])=>{h(n,r,e,t)})),r},h=(e,t,n,r)=>{e.forEach((e=>{if("string"!=typeof e){if("function"==typeof e)return m(e)?void h(e(r),t,n,r):void t.validators.push({validator:e,classGroupId:n});Object.entries(e).forEach((([e,o])=>{h(o,p(t,e),n,r)}))}else(""===e?t:p(t,e)).classGroupId=n}))},p=(e,t)=>{let n=e;return t.split("-").forEach((e=>{n.nextPart.has(e)||n.nextPart.set(e,{nextPart:new Map,validators:[]}),n=n.nextPart.get(e)})),n},m=e=>e.isThemeGetter,f=(e,t)=>t?e.map((([e,n])=>[e,n.map((e=>"string"==typeof e?t+e:"object"==typeof e?Object.fromEntries(Object.entries(e).map((([e,n])=>[t+e,n]))):e))])):e,g=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,n=new Map,r=new Map;const o=(o,i)=>{n.set(o,i),t++,t>e&&(t=0,r=n,n=new Map)};return{get(e){let t=n.get(e);return void 0!==t?t:void 0!==(t=r.get(e))?(o(e,t),t):void 0},set(e,t){n.has(e)?n.set(e,t):o(e,t)}}},v=e=>{const{separator:t,experimentalParseClassName:n}=e,r=1===t.length,o=t[0],i=t.length,s=e=>{const n=[];let s,a=0,l=0;for(let c=0;c<e.length;c++){let u=e[c];if(0===a){if(u===o&&(r||e.slice(c,c+i)===t)){n.push(e.slice(l,c)),l=c+i;continue}if("/"===u){s=c;continue}}"["===u?a++:"]"===u&&a--}const c=0===n.length?e:e.substring(l),u=c.startsWith("!");return{modifiers:n,hasImportantModifier:u,baseClassName:u?c.substring(1):c,maybePostfixModifierPosition:s&&s>l?s-l:void 0}};return n?e=>n({className:e,parseClassName:s}):s},y=e=>{if(e.length<=1)return e;const t=[];let n=[];return e.forEach((e=>{"["===e[0]?(t.push(...n.sort(),e),n=[]):n.push(e)})),t.push(...n.sort()),t},b=/\s+/;function x(){let e,t,n=0,r="";for(;n<arguments.length;)(e=arguments[n++])&&(t=w(e))&&(r&&(r+=" "),r+=t);return r}const w=e=>{if("string"==typeof e)return e;let t,n="";for(let r=0;r<e.length;r++)e[r]&&(t=w(e[r]))&&(n&&(n+=" "),n+=t);return n};function E(e,...t){let n,r,o,i=function(l){const c=t.reduce(((e,t)=>t(e)),e());return n=(e=>({cache:g(e.cacheSize),parseClassName:v(e),...a(e)}))(c),r=n.cache.get,o=n.cache.set,i=s,s(l)};function s(e){const t=r(e);if(t)return t;const i=((e,t)=>{const{parseClassName:n,getClassGroupId:r,getConflictingClassGroupIds:o}=t,i=[],s=e.trim().split(b);let a="";for(let e=s.length-1;e>=0;e-=1){const t=s[e],{modifiers:l,hasImportantModifier:c,baseClassName:u,maybePostfixModifierPosition:d}=n(t);let h=Boolean(d),p=r(h?u.substring(0,d):u);if(!p){if(!h){a=t+(a.length>0?" "+a:a);continue}if(p=r(u),!p){a=t+(a.length>0?" "+a:a);continue}h=!1}const m=y(l).join(":"),f=c?m+"!":m,g=f+p;if(i.includes(g))continue;i.push(g);const v=o(p,h);for(let e=0;e<v.length;++e){const t=v[e];i.push(f+t)}a=t+(a.length>0?" "+a:a)}return a})(e,n);return o(e,i),i}return function(){return i(x.apply(null,arguments))}}const k=e=>{const t=t=>t[e]||[];return t.isThemeGetter=!0,t},S=/^\[(?:([a-z-]+):)?(.+)\]$/i,T=/^\d+\/\d+$/,P=new Set(["px","full","screen"]),C=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,R=/\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$/,A=/^(rgba?|hsla?|hwb|(ok)?(lab|lch))\(.+\)$/,M=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,j=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,D=e=>L(e)||P.has(e)||T.test(e),N=e=>Y(e,"length",X),L=e=>Boolean(e)&&!Number.isNaN(Number(e)),V=e=>Y(e,"number",L),O=e=>Boolean(e)&&Number.isInteger(Number(e)),I=e=>e.endsWith("%")&&L(e.slice(0,-1)),F=e=>S.test(e),B=e=>C.test(e),z=new Set(["length","size","percentage"]),_=e=>Y(e,z,G),U=e=>Y(e,"position",G),W=new Set(["image","url"]),$=e=>Y(e,W,Z),H=e=>Y(e,"",q),K=()=>!0,Y=(e,t,n)=>{const r=S.exec(e);return!!r&&(r[1]?"string"==typeof t?r[1]===t:t.has(r[1]):n(r[2]))},X=e=>R.test(e)&&!A.test(e),G=()=>!1,q=e=>M.test(e),Z=e=>j.test(e),J=(Symbol.toStringTag,()=>{const e=k("colors"),t=k("spacing"),n=k("blur"),r=k("brightness"),o=k("borderColor"),i=k("borderRadius"),s=k("borderSpacing"),a=k("borderWidth"),l=k("contrast"),c=k("grayscale"),u=k("hueRotate"),d=k("invert"),h=k("gap"),p=k("gradientColorStops"),m=k("gradientColorStopPositions"),f=k("inset"),g=k("margin"),v=k("opacity"),y=k("padding"),b=k("saturate"),x=k("scale"),w=k("sepia"),E=k("skew"),S=k("space"),T=k("translate"),P=()=>["auto",F,t],C=()=>[F,t],R=()=>["",D,N],A=()=>["auto",L,F],M=()=>["","0",F],j=()=>[L,F];return{cacheSize:500,separator:":",theme:{colors:[K],spacing:[D,N],blur:["none","",B,F],brightness:j(),borderColor:[e],borderRadius:["none","","full",B,F],borderSpacing:C(),borderWidth:R(),contrast:j(),grayscale:M(),hueRotate:j(),invert:M(),gap:C(),gradientColorStops:[e],gradientColorStopPositions:[I,N],inset:P(),margin:P(),opacity:j(),padding:C(),saturate:j(),scale:j(),sepia:M(),skew:j(),space:C(),translate:C()},classGroups:{aspect:[{aspect:["auto","square","video",F]}],container:["container"],columns:[{columns:[B]}],"break-after":[{"break-after":["auto","avoid","all","avoid-page","page","left","right","column"]}],"break-before":[{"break-before":["auto","avoid","all","avoid-page","page","left","right","column"]}],"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:["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top",F]}],overflow:[{overflow:["auto","hidden","clip","visible","scroll"]}],"overflow-x":[{"overflow-x":["auto","hidden","clip","visible","scroll"]}],"overflow-y":[{"overflow-y":["auto","hidden","clip","visible","scroll"]}],overscroll:[{overscroll:["auto","contain","none"]}],"overscroll-x":[{"overscroll-x":["auto","contain","none"]}],"overscroll-y":[{"overscroll-y":["auto","contain","none"]}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:[f]}],"inset-x":[{"inset-x":[f]}],"inset-y":[{"inset-y":[f]}],start:[{start:[f]}],end:[{end:[f]}],top:[{top:[f]}],right:[{right:[f]}],bottom:[{bottom:[f]}],left:[{left:[f]}],visibility:["visible","invisible","collapse"],z:[{z:["auto",O,F]}],basis:[{basis:P()}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["wrap","wrap-reverse","nowrap"]}],flex:[{flex:["1","auto","initial","none",F]}],grow:[{grow:M()}],shrink:[{shrink:M()}],order:[{order:["first","last","none",O,F]}],"grid-cols":[{"grid-cols":[K]}],"col-start-end":[{col:["auto",{span:["full",O,F]},F]}],"col-start":[{"col-start":A()}],"col-end":[{"col-end":A()}],"grid-rows":[{"grid-rows":[K]}],"row-start-end":[{row:["auto",{span:[O,F]},F]}],"row-start":[{"row-start":A()}],"row-end":[{"row-end":A()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":["auto","min","max","fr",F]}],"auto-rows":[{"auto-rows":["auto","min","max","fr",F]}],gap:[{gap:[h]}],"gap-x":[{"gap-x":[h]}],"gap-y":[{"gap-y":[h]}],"justify-content":[{justify:["normal","start","end","center","between","around","evenly","stretch"]}],"justify-items":[{"justify-items":["start","end","center","stretch"]}],"justify-self":[{"justify-self":["auto","start","end","center","stretch"]}],"align-content":[{content:["normal","start","end","center","between","around","evenly","stretch","baseline"]}],"align-items":[{items:["start","end","center","baseline","stretch"]}],"align-self":[{self:["auto","start","end","center","stretch","baseline"]}],"place-content":[{"place-content":["start","end","center","between","around","evenly","stretch","baseline"]}],"place-items":[{"place-items":["start","end","center","baseline","stretch"]}],"place-self":[{"place-self":["auto","start","end","center","stretch"]}],p:[{p:[y]}],px:[{px:[y]}],py:[{py:[y]}],ps:[{ps:[y]}],pe:[{pe:[y]}],pt:[{pt:[y]}],pr:[{pr:[y]}],pb:[{pb:[y]}],pl:[{pl:[y]}],m:[{m:[g]}],mx:[{mx:[g]}],my:[{my:[g]}],ms:[{ms:[g]}],me:[{me:[g]}],mt:[{mt:[g]}],mr:[{mr:[g]}],mb:[{mb:[g]}],ml:[{ml:[g]}],"space-x":[{"space-x":[S]}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":[S]}],"space-y-reverse":["space-y-reverse"],w:[{w:["auto","min","max","fit","svw","lvw","dvw",F,t]}],"min-w":[{"min-w":[F,t,"min","max","fit"]}],"max-w":[{"max-w":[F,t,"none","full","min","max","fit","prose",{screen:[B]},B]}],h:[{h:[F,t,"auto","min","max","fit","svh","lvh","dvh"]}],"min-h":[{"min-h":[F,t,"min","max","fit","svh","lvh","dvh"]}],"max-h":[{"max-h":[F,t,"min","max","fit","svh","lvh","dvh"]}],size:[{size:[F,t,"auto","min","max","fit"]}],"font-size":[{text:["base",B,N]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:["thin","extralight","light","normal","medium","semibold","bold","extrabold","black",V]}],"font-family":[{font:[K]}],"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",F]}],"line-clamp":[{"line-clamp":["none",L,V]}],leading:[{leading:["none","tight","snug","normal","relaxed","loose",D,F]}],"list-image":[{"list-image":["none",F]}],"list-style-type":[{list:["none","disc","decimal",F]}],"list-style-position":[{list:["inside","outside"]}],"placeholder-color":[{placeholder:[e]}],"placeholder-opacity":[{"placeholder-opacity":[v]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"text-color":[{text:[e]}],"text-opacity":[{"text-opacity":[v]}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:["solid","dashed","dotted","double","none","wavy"]}],"text-decoration-thickness":[{decoration:["auto","from-font",D,N]}],"underline-offset":[{"underline-offset":["auto",D,F]}],"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:C()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",F]}],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",F]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-opacity":[{"bg-opacity":[v]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:["bottom","center","left","left-bottom","left-top","right","right-bottom","right-top","top",U]}],"bg-repeat":[{bg:["no-repeat",{repeat:["","x","y","round","space"]}]}],"bg-size":[{bg:["auto","cover","contain",_]}],"bg-image":[{bg:["none",{"gradient-to":["t","tr","r","br","b","bl","l","tl"]},$]}],"bg-color":[{bg:[e]}],"gradient-from-pos":[{from:[m]}],"gradient-via-pos":[{via:[m]}],"gradient-to-pos":[{to:[m]}],"gradient-from":[{from:[p]}],"gradient-via":[{via:[p]}],"gradient-to":[{to:[p]}],rounded:[{rounded:[i]}],"rounded-s":[{"rounded-s":[i]}],"rounded-e":[{"rounded-e":[i]}],"rounded-t":[{"rounded-t":[i]}],"rounded-r":[{"rounded-r":[i]}],"rounded-b":[{"rounded-b":[i]}],"rounded-l":[{"rounded-l":[i]}],"rounded-ss":[{"rounded-ss":[i]}],"rounded-se":[{"rounded-se":[i]}],"rounded-ee":[{"rounded-ee":[i]}],"rounded-es":[{"rounded-es":[i]}],"rounded-tl":[{"rounded-tl":[i]}],"rounded-tr":[{"rounded-tr":[i]}],"rounded-br":[{"rounded-br":[i]}],"rounded-bl":[{"rounded-bl":[i]}],"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":[v]}],"border-style":[{border:["solid","dashed","dotted","double","none","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":[v]}],"divide-style":[{divide:["solid","dashed","dotted","double","none"]}],"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:["","solid","dashed","dotted","double","none"]}],"outline-offset":[{"outline-offset":[D,F]}],"outline-w":[{outline:[D,N]}],"outline-color":[{outline:[e]}],"ring-w":[{ring:R()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:[e]}],"ring-opacity":[{"ring-opacity":[v]}],"ring-offset-w":[{"ring-offset":[D,N]}],"ring-offset-color":[{"ring-offset":[e]}],shadow:[{shadow:["","inner","none",B,H]}],"shadow-color":[{shadow:[K]}],opacity:[{opacity:[v]}],"mix-blend":[{"mix-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity","plus-lighter","plus-darker"]}],"bg-blend":[{"bg-blend":["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"]}],filter:[{filter:["","none"]}],blur:[{blur:[n]}],brightness:[{brightness:[r]}],contrast:[{contrast:[l]}],"drop-shadow":[{"drop-shadow":["","none",B,F]}],grayscale:[{grayscale:[c]}],"hue-rotate":[{"hue-rotate":[u]}],invert:[{invert:[d]}],saturate:[{saturate:[b]}],sepia:[{sepia:[w]}],"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":[d]}],"backdrop-opacity":[{"backdrop-opacity":[v]}],"backdrop-saturate":[{"backdrop-saturate":[b]}],"backdrop-sepia":[{"backdrop-sepia":[w]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":[s]}],"border-spacing-x":[{"border-spacing-x":[s]}],"border-spacing-y":[{"border-spacing-y":[s]}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["none","all","","colors","opacity","shadow","transform",F]}],duration:[{duration:j()}],ease:[{ease:["linear","in","out","in-out",F]}],delay:[{delay:j()}],animate:[{animate:["none","spin","ping","pulse","bounce",F]}],transform:[{transform:["","gpu","none"]}],scale:[{scale:[x]}],"scale-x":[{"scale-x":[x]}],"scale-y":[{"scale-y":[x]}],rotate:[{rotate:[O,F]}],"translate-x":[{"translate-x":[T]}],"translate-y":[{"translate-y":[T]}],"skew-x":[{"skew-x":[E]}],"skew-y":[{"skew-y":[E]}],"transform-origin":[{origin:["center","top","top-right","right","bottom-right","bottom","bottom-left","left","top-left",F]}],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",F]}],"caret-color":[{caret:[e]}],"pointer-events":[{"pointer-events":["none","auto"]}],resize:[{resize:["none","y","x",""]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":C()}],"scroll-mx":[{"scroll-mx":C()}],"scroll-my":[{"scroll-my":C()}],"scroll-ms":[{"scroll-ms":C()}],"scroll-me":[{"scroll-me":C()}],"scroll-mt":[{"scroll-mt":C()}],"scroll-mr":[{"scroll-mr":C()}],"scroll-mb":[{"scroll-mb":C()}],"scroll-ml":[{"scroll-ml":C()}],"scroll-p":[{"scroll-p":C()}],"scroll-px":[{"scroll-px":C()}],"scroll-py":[{"scroll-py":C()}],"scroll-ps":[{"scroll-ps":C()}],"scroll-pe":[{"scroll-pe":C()}],"scroll-pt":[{"scroll-pt":C()}],"scroll-pr":[{"scroll-pr":C()}],"scroll-pb":[{"scroll-pb":C()}],"scroll-pl":[{"scroll-pl":C()}],"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",F]}],fill:[{fill:[e,"none"]}],"stroke-w":[{stroke:[D,N,V]}],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"]}}}),Q=E(J);function ee(e){var t,n,r="";if("string"==typeof e||"number"==typeof e)r+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=ee(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function te(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=ee(e))&&(r&&(r+=" "),r+=t);return r}const ne=(...e)=>Q(te(...e)),re=(...e)=>(...t)=>e.forEach((e=>e?.(...t))),oe=e=>{const t={0:"gap-0",xxs:"gap-1",xs:"gap-2",sm:"gap-3",md:"gap-4",lg:"gap-5",xl:"gap-6","2xl":"gap-8"};return t[e]||t.md},ie={400:"font-normal",500:"font-medium",600:"font-semibold",700:"font-bold"},se={36:"text-4xl",30:"text-3xl",24:"text-2xl",20:"text-xl",18:"text-lg",16:"text-base",14:"text-sm",12:"text-xs"},ae={44:"leading-11",38:"leading-9.5",32:"leading-8",30:"leading-7.5",28:"leading-7",24:"leading-6",20:"leading-5",16:"leading-4"},le={2:"tracking-2"},ce={brand600:"text-brand-primary-600",link:"text-link-primary",primary:"text-text-primary",secondary:"text-text-secondary",tertiary:"text-text-tertiary",disabled:"text-text-disabled",help:"text-field-helper",label:"text-field-label",info:"text-support-info",success:"text-support-success",warning:"text-support-warning",error:"text-support-error",inverse:"text-text-on-color"},ue=(0,r.forwardRef)((function({as:e,children:t,weight:n,size:r,lineHeight:o,letterSpacing:i,color:a="primary",className:l,...c},u){return(0,s.jsx)(e||"p",{ref:u,className:ne("m-0 p-0",n?ie[n]:"",r?se[r]:"",o?ae[o]:"",i?le[i]:"",a?ce[a]:"",l),...c,children:t})})),de=(...e)=>e.filter(((e,t,n)=>Boolean(e)&&n.indexOf(e)===t)).join(" ");var he={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"};const pe=(0,r.forwardRef)((({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:o,className:i="",children:s,iconNode:a,...l},c)=>(0,r.createElement)("svg",{ref:c,...he,width:t,height:t,stroke:e,strokeWidth:o?24*Number(n)/Number(t):n,className:de("lucide",i),...l},[...a.map((([e,t])=>(0,r.createElement)(e,t))),...Array.isArray(s)?s:[s]]))),me=(e,t)=>{const n=(0,r.forwardRef)((({className:n,...o},i)=>{return(0,r.createElement)(pe,{ref:i,iconNode:t,className:de(`lucide-${s=e,s.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,n),...o});var s}));return n.displayName=`${e}`,n},fe=me("X",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]);let ge=1;const ve=new class{#e;#t;constructor(){this.#e=[],this.#t=[]}subscribe(e){return this.#t.push(e),()=>{this.#t=this.#t.filter((t=>t!==e))}}publish(e){this.#t.forEach((t=>t(e)))}add(e){this.#e.push(e),this.publish(e)}remove(e){return this.#e=this.#e.filter((t=>t.id!==e)),e}create(e){const{id:t,message:n="",jsx:r,...o}=e;if(!n&&"function"!=typeof r)return;const i="number"==typeof t?t:ge++;return this.#e.find((e=>e.id===i))&&(this.#e=this.#e.map((e=>e.id===i?(this.publish({...e,title:n,jsx:r,...o}),{...e,title:n,jsx:r,...o}):e))),this.add({id:i,title:n,jsx:r,...o}),i}update(e,t){const{render:n}=t;let r=t;switch(typeof n){case"function":r={jsx:n,...t};break;case"string":r={title:n,...t}}this.#e=this.#e.map((t=>t.id===e?(this.publish({...t,...r}),{...t,...r}):t))}dismiss(e){return e||this.#e.forEach((e=>this.#t.forEach((t=>t({id:e.id,dismiss:!0}))))),this.#t.forEach((t=>t({id:e,dismiss:!0}))),e}history(){return this.#e}default(e="",t={}){return this.create({message:e,type:"neutral",...t})}success(e="",t={}){return this.create({message:e,type:"success",...t})}error(e="",t={}){return this.create({message:e,type:"error",...t})}warning(e="",t={}){return this.create({message:e,type:"warning",...t})}info(e="",t={}){return this.create({message:e,type:"info",...t})}custom(e,t={}){return this.create({jsx:e,type:"custom",...t})}},ye=Object.seal(Object.assign(((e,t)=>ve.default(e,t)),{success:ve.success.bind(ve),error:ve.error.bind(ve),warning:ve.warning.bind(ve),info:ve.info.bind(ve),custom:ve.custom.bind(ve),dismiss:ve.dismiss.bind(ve),update:ve.update.bind(ve)},{getHistory:ve.history.bind(ve)})),be=me("Info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]),xe=me("Check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]),we=me("TriangleAlert",[["path",{d:"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3",key:"wmoenq"}],["path",{d:"M12 9v4",key:"juzpu7"}],["path",{d:"M12 17h.01",key:"p32p05"}]]),Ee=me("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]),ke=(0,r.forwardRef)(((e,t)=>{const{variant:n="primary",size:o="md",type:i="button",tag:a="button",className:l,children:c,disabled:u=!1,destructive:d=!1,icon:h=null,iconPosition:p="left",loading:m=!1,...f}=e,g=d&&"focus:ring-focus-error",v=m?"opacity-50 disabled:cursor-not-allowed":"",y={primary:"text-text-on-color bg-button-primary hover:bg-button-primary-hover outline-button-primary hover:outline-button-primary-hover shadow-xs disabled:shadow-none focus:shadow-none disabled:bg-button-disabled disabled:outline-button-disabled",secondary:"text-text-on-color bg-button-secondary hover:bg-button-secondary-hover outline-button-secondary hover:outline-button-secondary-hover shadow-xs focus:shadow-none disabled:shadow-none disabled:bg-button-disabled disabled:outline-button-disabled",outline:"text-button-tertiary-color outline-border-subtle bg-button-tertiary shadow-sm focus:shadow-none hover:bg-button-tertiary-hover hover:outline-border-subtle disabled:bg-button-tertiary disabled:outline-border-disabled",ghost:"text-text-primary bg-transparent outline-transparent hover:bg-button-tertiary-hover",link:"outline-none text-link-primary bg-transparent hover:text-link-primary-hover hover:underline p-0 border-0 leading-none"}[n],b=d&&!u?{primary:"bg-button-danger hover:bg-button-danger-hover outline-button-danger hover:outline-button-danger-hover",secondary:"bg-button-danger hover:bg-button-danger-hover outline-button-danger hover:outline-button-danger-hover",outline:"text-button-danger outline outline-1 outline-button-danger hover:outline-button-danger bg-button-tertiary hover:bg-field-background-error",ghost:"text-button-danger hover:bg-field-background-error",link:"text-button-danger hover:text-button-danger-secondary"}[n]:"",x={xs:"p-1 rounded [&>svg]:size-4",sm:"p-2 rounded [&>svg]:size-4 gap-0.5",md:"p-2.5 rounded-md text-sm [&>svg]:size-5 gap-1",lg:"p-3 rounded-lg text-base [&>svg]:size-6 gap-1"}[o];let w,E=null,k="";return h&&(k="flex items-center justify-center","left"===p?w=h:E=h),(0,s.jsxs)(a,{ref:t,type:i,className:ne(k,"outline outline-1 border-none cursor-pointer transition-colors duration-300 ease-in-out text-xs font-semibold focus:ring-2 focus:ring-toggle-on focus:ring-offset-2 disabled:text-text-disabled",x,y,b,g,v,{"cursor-default":u},l),disabled:u,...f,children:[(0,s.jsx)(r.Fragment,{children:w},"left-icon"),c?(0,s.jsx)("span",{className:"px-1",children:c}):null,(0,s.jsx)(r.Fragment,{children:E},"right-icon")]})}));ke.displayName="Button";const Se="light",Te="neutral",Pe=({icon:e,theme:t=Se,variant:n=Te})=>{const o="[&>svg]:h-5 [&>svg]:w-5",i=(({theme:e=Se,variant:t=Te})=>{let n="light"===e?"text-icon-secondary":"text-icon-inverse";return n={info:"light"===e?"text-support-info":"text-support-info-inverse",success:"light"===e?"text-support-success":"text-support-success-inverse",warning:"light"===e?"text-support-warning":"text-support-warning-inverse",error:"light"===e?"text-support-error":"text-support-error-inverse"}[t]||n,n})({theme:t,variant:n});if(e&&(0,r.isValidElement)(e))return(0,r.cloneElement)(e,{className:ne(o,i,e?.props?.className??"")});const a={neutral:(0,s.jsx)(be,{className:ne(o,i)}),info:(0,s.jsx)(be,{className:ne(o,i)}),success:(0,s.jsx)(xe,{className:ne(o,i)}),warning:(0,s.jsx)(we,{className:ne(o,i)}),error:(0,s.jsx)(Ee,{className:ne(o,i)})};return a[n]||a.neutral},Ce=({actionType:e="button",onAction:t=(()=>{}),actionLabel:n="",theme:r=Se})=>{const o="focus:ring-0 focus:ring-offset-0 ring-offset-0 focus:outline-none";let i="text-button-primary border-button-primary hover:border-button-primary hover:text-button-primary-hover";switch("dark"===r&&(i="text-text-inverse border-text-inverse hover:border-text-inverse hover:text-text-inverse"),e){case"button":return(0,s.jsx)(ke,{variant:"outline",size:"xs",onClick:t,className:ne("rounded",o,i,"dark"===r?"bg-transparent hover:bg-transparent":"bg-white hover:bg-white"),children:n});case"link":return(0,s.jsx)(ke,{variant:"link",size:"xs",onClick:t,className:ne(o,i),children:n});default:return null}},Re=({theme:e=Se,title:t="",inline:n=!1})=>t?(0,s.jsx)("span",{className:ne("block",{light:"text-text-primary",dark:"text-text-inverse"}[e],"text-sm leading-5 font-semibold",n?"inline":"block"),children:t}):null,Ae=({theme:e=Se,content:t="",inline:n=!1})=>t?(0,s.jsx)("span",{className:ne({light:"text-text-primary",dark:"text-text-inverse"}[e],"block text-sm [&_*]:text-sm leading-5 [&_*]:leading-5 font-normal [word-break:break-word]",n?"inline":"block"),children:t}):null,Me=(...e)=>t=>{e.forEach((e=>{"function"==typeof e?e(t):e&&(e.current=t)}))},je={"top-left":"top-0 bottom-0 left-0 justify-start items-start","top-right":"top-0 bottom-0 right-0 justify-start items-end","bottom-left":"top-0 bottom-0 left-0 justify-end items-start","bottom-right":"top-0 bottom-0 right-0 justify-end items-end"},De={neutral:"border-alert-border-neutral bg-alert-background-neutral",custom:"border-alert-border-neutral bg-alert-background-neutral",info:"border-alert-border-info bg-alert-background-info",success:"border-alert-border-green bg-alert-background-green",warning:"border-alert-border-warning bg-alert-background-warning",error:"border-alert-border-danger bg-alert-background-danger"},Ne="bg-background-inverse border-background-inverse",Le={light:"text-icon-secondary",dark:"text-icon-inverse"},Ve=window.ReactDOM,Oe=(0,r.createContext)({});function Ie(e){const t=(0,r.useRef)(null);return null===t.current&&(t.current=e()),t.current}const Fe=(0,r.createContext)(null),Be=(0,r.createContext)({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});class ze extends r.Component{getSnapshotBeforeUpdate(e){const t=this.props.childRef.current;if(t&&e.isPresent&&!this.props.isPresent){const e=this.props.sizeRef.current;e.height=t.offsetHeight||0,e.width=t.offsetWidth||0,e.top=t.offsetTop,e.left=t.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function _e({children:e,isPresent:t}){const n=(0,r.useId)(),o=(0,r.useRef)(null),i=(0,r.useRef)({width:0,height:0,top:0,left:0}),{nonce:a}=(0,r.useContext)(Be);return(0,r.useInsertionEffect)((()=>{const{width:e,height:r,top:s,left:l}=i.current;if(t||!o.current||!e||!r)return;o.current.dataset.motionPopId=n;const c=document.createElement("style");return a&&(c.nonce=a),document.head.appendChild(c),c.sheet&&c.sheet.insertRule(`\n          [data-motion-pop-id="${n}"] {\n            position: absolute !important;\n            width: ${e}px !important;\n            height: ${r}px !important;\n            top: ${s}px !important;\n            left: ${l}px !important;\n          }\n        `),()=>{document.head.removeChild(c)}}),[t]),(0,s.jsx)(ze,{isPresent:t,childRef:o,sizeRef:i,children:r.cloneElement(e,{ref:o})})}const Ue=({children:e,initial:t,isPresent:n,onExitComplete:o,custom:i,presenceAffectsLayout:a,mode:l})=>{const c=Ie(We),u=(0,r.useId)(),d=(0,r.useCallback)((e=>{c.set(e,!0);for(const e of c.values())if(!e)return;o&&o()}),[c,o]),h=(0,r.useMemo)((()=>({id:u,initial:t,isPresent:n,custom:i,onExitComplete:d,register:e=>(c.set(e,!1),()=>c.delete(e))})),a?[Math.random(),d]:[n,d]);return(0,r.useMemo)((()=>{c.forEach(((e,t)=>c.set(t,!1)))}),[n]),r.useEffect((()=>{!n&&!c.size&&o&&o()}),[n]),"popLayout"===l&&(e=(0,s.jsx)(_e,{isPresent:n,children:e})),(0,s.jsx)(Fe.Provider,{value:h,children:e})};function We(){return new Map}function $e(e=!0){const t=(0,r.useContext)(Fe);if(null===t)return[!0,null];const{isPresent:n,onExitComplete:o,register:i}=t,s=(0,r.useId)();(0,r.useEffect)((()=>{e&&i(s)}),[e]);const a=(0,r.useCallback)((()=>e&&o&&o(s)),[s,o,e]);return!n&&o?[!1,a]:[!0]}const He=e=>e.key||"";function Ke(e){const t=[];return r.Children.forEach(e,(e=>{(0,r.isValidElement)(e)&&t.push(e)})),t}const Ye="undefined"!=typeof window,Xe=Ye?r.useLayoutEffect:r.useEffect,Ge=({children:e,custom:t,initial:n=!0,onExitComplete:o,presenceAffectsLayout:i=!0,mode:a="sync",propagate:l=!1})=>{const[c,u]=$e(l),d=(0,r.useMemo)((()=>Ke(e)),[e]),h=l&&!c?[]:d.map(He),p=(0,r.useRef)(!0),m=(0,r.useRef)(d),f=Ie((()=>new Map)),[g,v]=(0,r.useState)(d),[y,b]=(0,r.useState)(d);Xe((()=>{p.current=!1,m.current=d;for(let e=0;e<y.length;e++){const t=He(y[e]);h.includes(t)?f.delete(t):!0!==f.get(t)&&f.set(t,!1)}}),[y,h.length,h.join("-")]);const x=[];if(d!==g){let e=[...d];for(let t=0;t<y.length;t++){const n=y[t],r=He(n);h.includes(r)||(e.splice(t,0,n),x.push(n))}return"wait"===a&&x.length&&(e=x),b(Ke(e)),void v(d)}const{forceRender:w}=(0,r.useContext)(Oe);return(0,s.jsx)(s.Fragment,{children:y.map((e=>{const r=He(e),g=!(l&&!c)&&(d===y||h.includes(r));return(0,s.jsx)(Ue,{isPresent:g,initial:!(p.current&&!n)&&void 0,custom:g?void 0:t,presenceAffectsLayout:i,mode:a,onExitComplete:g?void 0:()=>{if(!f.has(r))return;f.set(r,!0);let e=!0;f.forEach((t=>{t||(e=!1)})),e&&(null==w||w(),b(m.current),l&&(null==u||u()),o&&o())},children:e},r)}))})};function qe(e){if("undefined"==typeof Proxy)return e;const t=new Map;return new Proxy(((...t)=>e(...t)),{get:(n,r)=>"create"===r?e:(t.has(r)||t.set(r,e(r)),t.get(r))})}function Ze(e){return null!==e&&"object"==typeof e&&"function"==typeof e.start}const Je=e=>Array.isArray(e);function Qe(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 et(e){return"string"==typeof e||Array.isArray(e)}function tt(e){const t=[{},{}];return null==e||e.values.forEach(((e,n)=>{t[0][n]=e.get(),t[1][n]=e.getVelocity()})),t}function nt(e,t,n,r){if("function"==typeof t){const[o,i]=tt(r);t=t(void 0!==n?n:e.custom,o,i)}if("string"==typeof t&&(t=e.variants&&e.variants[t]),"function"==typeof t){const[o,i]=tt(r);t=t(void 0!==n?n:e.custom,o,i)}return t}function rt(e,t,n){const r=e.getProps();return nt(r,t,void 0!==n?n:r.custom,e)}const ot=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],it=["initial",...ot];function st(e){let t;return()=>(void 0===t&&(t=e()),t)}const at=st((()=>void 0!==window.ScrollTimeline));class lt{constructor(e){this.stop=()=>this.runAll("stop"),this.animations=e.filter(Boolean)}get finished(){return Promise.all(this.animations.map((e=>"finished"in e?e.finished:e)))}getAll(e){return this.animations[0][e]}setAll(e,t){for(let n=0;n<this.animations.length;n++)this.animations[n][e]=t}attachTimeline(e,t){const n=this.animations.map((n=>at()&&n.attachTimeline?n.attachTimeline(e):"function"==typeof t?t(n):void 0));return()=>{n.forEach(((e,t)=>{e&&e(),this.animations[t].stop()}))}}get time(){return this.getAll("time")}set time(e){this.setAll("time",e)}get speed(){return this.getAll("speed")}set speed(e){this.setAll("speed",e)}get startTime(){return this.getAll("startTime")}get duration(){let e=0;for(let t=0;t<this.animations.length;t++)e=Math.max(e,this.animations[t].duration);return e}runAll(e){this.animations.forEach((t=>t[e]()))}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class ct extends lt{then(e,t){return Promise.all(this.animations).then(e).catch(t)}}function ut(e,t){return e?e[t]||e.default||e:void 0}const dt=2e4;function ht(e){let t=0,n=e.next(t);for(;!n.done&&t<dt;)t+=50,n=e.next(t);return t>=dt?1/0:t}function pt(e){return"function"==typeof e}function mt(e,t){e.timeline=t,e.onfinish=null}const ft=e=>Array.isArray(e)&&"number"==typeof e[0],gt={linearEasing:void 0};function vt(e,t){const n=st(e);return()=>{var e;return null!==(e=gt[t])&&void 0!==e?e:n()}}const yt=vt((()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(e){return!1}return!0}),"linearEasing"),bt=(e,t,n)=>{const r=t-e;return 0===r?1:(n-e)/r},xt=(e,t,n=10)=>{let r="";const o=Math.max(Math.round(t/n),2);for(let t=0;t<o;t++)r+=e(bt(0,o-1,t))+", ";return`linear(${r.substring(0,r.length-2)})`};function wt(e){return Boolean("function"==typeof e&&yt()||!e||"string"==typeof e&&(e in kt||yt())||ft(e)||Array.isArray(e)&&e.every(wt))}const Et=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,kt={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Et([0,.65,.55,1]),circOut:Et([.55,0,1,.45]),backIn:Et([.31,.01,.66,-.59]),backOut:Et([.33,1.53,.69,.99])};function St(e,t){return e?"function"==typeof e&&yt()?xt(e,t):ft(e)?Et(e):Array.isArray(e)?e.map((e=>St(e,t)||kt.easeOut)):kt[e]:void 0}const Tt={x:!1,y:!1};function Pt(){return Tt.x||Tt.y}function Ct(e,t){const n=function(e,t,n){if(e instanceof Element)return[e];if("string"==typeof e){let t=document;const n=(void 0,t.querySelectorAll(e));return n?Array.from(n):[]}return Array.from(e)}(e),r=new AbortController;return[n,{passive:!0,...t,signal:r.signal},()=>r.abort()]}function Rt(e){return t=>{"touch"===t.pointerType||Pt()||e(t)}}const At=(e,t)=>!!t&&(e===t||At(e,t.parentElement)),Mt=e=>"mouse"===e.pointerType?"number"!=typeof e.button||e.button<=0:!1!==e.isPrimary,jt=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]),Dt=new WeakSet;function Nt(e){return t=>{"Enter"===t.key&&e(t)}}function Lt(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}function Vt(e){return Mt(e)&&!Pt()}const Ot=e=>1e3*e,It=e=>e/1e3,Ft=e=>e,Bt=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],zt=new Set(Bt),_t=new Set(["width","height","top","left","right","bottom",...Bt]),Ut=e=>Boolean(e&&"object"==typeof e&&e.mix&&e.toValue),Wt=e=>Je(e)?e[e.length-1]||0:e,$t=["read","resolveKeyframes","update","preRender","render","postRender"];function Ht(e,t){let n=!1,r=!0;const o={delta:0,timestamp:0,isProcessing:!1},i=()=>n=!0,s=$t.reduce(((e,t)=>(e[t]=function(e){let t=new Set,n=new Set,r=!1,o=!1;const i=new WeakSet;let s={delta:0,timestamp:0,isProcessing:!1};function a(t){i.has(t)&&(l.schedule(t),e()),t(s)}const l={schedule:(e,o=!1,s=!1)=>{const a=s&&r?t:n;return o&&i.add(e),a.has(e)||a.add(e),e},cancel:e=>{n.delete(e),i.delete(e)},process:e=>{s=e,r?o=!0:(r=!0,[t,n]=[n,t],t.forEach(a),t.clear(),r=!1,o&&(o=!1,l.process(e)))}};return l}(i),e)),{}),{read:a,resolveKeyframes:l,update:c,preRender:u,render:d,postRender:h}=s,p=()=>{const i=performance.now();n=!1,o.delta=r?1e3/60:Math.max(Math.min(i-o.timestamp,40),1),o.timestamp=i,o.isProcessing=!0,a.process(o),l.process(o),c.process(o),u.process(o),d.process(o),h.process(o),o.isProcessing=!1,n&&t&&(r=!1,e(p))};return{schedule:$t.reduce(((t,i)=>{const a=s[i];return t[i]=(t,i=!1,s=!1)=>(n||(n=!0,r=!0,o.isProcessing||e(p)),a.schedule(t,i,s)),t}),{}),cancel:e=>{for(let t=0;t<$t.length;t++)s[$t[t]].cancel(e)},state:o,steps:s}}const{schedule:Kt,cancel:Yt,state:Xt,steps:Gt}=Ht("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:Ft,!0);let qt;function Zt(){qt=void 0}const Jt={now:()=>(void 0===qt&&Jt.set(Xt.isProcessing?Xt.timestamp:performance.now()),qt),set:e=>{qt=e,queueMicrotask(Zt)}};function Qt(e,t){-1===e.indexOf(t)&&e.push(t)}function en(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class tn{constructor(){this.subscriptions=[]}add(e){return Qt(this.subscriptions,e),()=>en(this.subscriptions,e)}notify(e,t,n){const r=this.subscriptions.length;if(r)if(1===r)this.subscriptions[0](e,t,n);else for(let o=0;o<r;o++){const r=this.subscriptions[o];r&&r(e,t,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}function nn(e,t){return t?e*(1e3/t):0}const rn={current:void 0};class on{constructor(e,t={}){this.version="11.18.2",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(e,t=!0)=>{const n=Jt.now();this.updatedAt!==n&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(e),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),t&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}setCurrent(e){var t;this.current=e,this.updatedAt=Jt.now(),null===this.canTrackVelocity&&void 0!==e&&(this.canTrackVelocity=(t=this.current,!isNaN(parseFloat(t))))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,t){this.events[e]||(this.events[e]=new tn);const n=this.events[e].add(t);return"change"===e?()=>{n(),Kt.read((()=>{this.events.change.getSize()||this.stop()}))}:n}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e,t=!0){t&&this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e,t)}setWithVelocity(e,t,n){this.set(t),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-n}jump(e,t=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,t&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return rn.current&&rn.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const e=Jt.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||e-this.updatedAt>30)return 0;const t=Math.min(this.updatedAt-this.prevUpdatedAt,30);return nn(parseFloat(this.current)-parseFloat(this.prevFrameValue),t)}start(e){return this.stop(),new Promise((t=>{this.hasAnimated=!0,this.animation=e(t),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 sn(e,t){return new on(e,t)}function an(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,sn(n))}const ln=e=>Boolean(e&&e.getVelocity);function cn(e,t){const n=e.getValue("willChange");if(r=n,Boolean(ln(r)&&r.add))return n.add(t);var r}const un=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),dn="data-"+un("framerAppearId");function hn(e){return e.props[dn]}const pn=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e;function mn(e,t,n,r){if(e===t&&n===r)return Ft;return o=>0===o||1===o?o:pn(function(e,t,n,r,o){let i,s,a=0;do{s=t+(n-t)/2,i=pn(s,r,o)-e,i>0?n=s:t=s}while(Math.abs(i)>1e-7&&++a<12);return s}(o,0,1,e,n),t,r)}const fn=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,gn=e=>t=>1-e(1-t),vn=mn(.33,1.53,.69,.99),yn=gn(vn),bn=fn(yn),xn=e=>(e*=2)<1?.5*yn(e):.5*(2-Math.pow(2,-10*(e-1))),wn=e=>1-Math.sin(Math.acos(e)),En=gn(wn),kn=fn(wn),Sn=e=>/^0[^.\s]+$/u.test(e),Tn=(e,t,n)=>n>t?t:n<e?e:n,Pn={test:e=>"number"==typeof e,parse:parseFloat,transform:e=>e},Cn={...Pn,transform:e=>Tn(0,1,e)},Rn={...Pn,default:1},An=e=>Math.round(1e5*e)/1e5,Mn=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu,jn=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Dn=(e,t)=>n=>Boolean("string"==typeof n&&jn.test(n)&&n.startsWith(e)||t&&!function(e){return null==e}(n)&&Object.prototype.hasOwnProperty.call(n,t)),Nn=(e,t,n)=>r=>{if("string"!=typeof r)return r;const[o,i,s,a]=r.match(Mn);return{[e]:parseFloat(o),[t]:parseFloat(i),[n]:parseFloat(s),alpha:void 0!==a?parseFloat(a):1}},Ln={...Pn,transform:e=>Math.round((e=>Tn(0,255,e))(e))},Vn={test:Dn("rgb","red"),parse:Nn("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Ln.transform(e)+", "+Ln.transform(t)+", "+Ln.transform(n)+", "+An(Cn.transform(r))+")"},On={test:Dn("#"),parse:function(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}},transform:Vn.transform},In=e=>({test:t=>"string"==typeof t&&t.endsWith(e)&&1===t.split(" ").length,parse:parseFloat,transform:t=>`${t}${e}`}),Fn=In("deg"),Bn=In("%"),zn=In("px"),Un=In("vh"),Wn=In("vw"),$n={...Bn,parse:e=>Bn.parse(e)/100,transform:e=>Bn.transform(100*e)},Hn={test:Dn("hsl","hue"),parse:Nn("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Bn.transform(An(t))+", "+Bn.transform(An(n))+", "+An(Cn.transform(r))+")"},Kn={test:e=>Vn.test(e)||On.test(e)||Hn.test(e),parse:e=>Vn.test(e)?Vn.parse(e):Hn.test(e)?Hn.parse(e):On.parse(e),transform:e=>"string"==typeof e?e:e.hasOwnProperty("red")?Vn.transform(e):Hn.transform(e)},Yn=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,Xn="number",Gn="color",qn="var",Zn="var(",Jn="${}",Qn=/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 er(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},o=[];let i=0;const s=t.replace(Qn,(e=>(Kn.test(e)?(r.color.push(i),o.push(Gn),n.push(Kn.parse(e))):e.startsWith(Zn)?(r.var.push(i),o.push(qn),n.push(e)):(r.number.push(i),o.push(Xn),n.push(parseFloat(e))),++i,Jn))).split(Jn);return{values:n,split:s,indexes:r,types:o}}function tr(e){return er(e).values}function nr(e){const{split:t,types:n}=er(e),r=t.length;return e=>{let o="";for(let i=0;i<r;i++)if(o+=t[i],void 0!==e[i]){const t=n[i];o+=t===Xn?An(e[i]):t===Gn?Kn.transform(e[i]):e[i]}return o}}const rr=e=>"number"==typeof e?0:e,or={test:function(e){var t,n;return isNaN(e)&&"string"==typeof e&&((null===(t=e.match(Mn))||void 0===t?void 0:t.length)||0)+((null===(n=e.match(Yn))||void 0===n?void 0:n.length)||0)>0},parse:tr,createTransformer:nr,getAnimatableNone:function(e){const t=tr(e);return nr(e)(t.map(rr))}},ir=new Set(["brightness","contrast","saturate","opacity"]);function sr(e){const[t,n]=e.slice(0,-1).split("(");if("drop-shadow"===t)return e;const[r]=n.match(Mn)||[];if(!r)return e;const o=n.replace(r,"");let i=ir.has(t)?1:0;return r!==n&&(i*=100),t+"("+i+o+")"}const ar=/\b([a-z-]*)\(.*?\)/gu,lr={...or,getAnimatableNone:e=>{const t=e.match(ar);return t?t.map(sr).join(" "):e}},cr={borderWidth:zn,borderTopWidth:zn,borderRightWidth:zn,borderBottomWidth:zn,borderLeftWidth:zn,borderRadius:zn,radius:zn,borderTopLeftRadius:zn,borderTopRightRadius:zn,borderBottomRightRadius:zn,borderBottomLeftRadius:zn,width:zn,maxWidth:zn,height:zn,maxHeight:zn,top:zn,right:zn,bottom:zn,left:zn,padding:zn,paddingTop:zn,paddingRight:zn,paddingBottom:zn,paddingLeft:zn,margin:zn,marginTop:zn,marginRight:zn,marginBottom:zn,marginLeft:zn,backgroundPositionX:zn,backgroundPositionY:zn},ur={rotate:Fn,rotateX:Fn,rotateY:Fn,rotateZ:Fn,scale:Rn,scaleX:Rn,scaleY:Rn,scaleZ:Rn,skew:Fn,skewX:Fn,skewY:Fn,distance:zn,translateX:zn,translateY:zn,translateZ:zn,x:zn,y:zn,z:zn,perspective:zn,transformPerspective:zn,opacity:Cn,originX:$n,originY:$n,originZ:zn},dr={...Pn,transform:Math.round},hr={...cr,...ur,zIndex:dr,size:zn,fillOpacity:Cn,strokeOpacity:Cn,numOctaves:dr},pr={...hr,color:Kn,backgroundColor:Kn,outlineColor:Kn,fill:Kn,stroke:Kn,borderColor:Kn,borderTopColor:Kn,borderRightColor:Kn,borderBottomColor:Kn,borderLeftColor:Kn,filter:lr,WebkitFilter:lr},mr=e=>pr[e];function fr(e,t){let n=mr(e);return n!==lr&&(n=or),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const gr=new Set(["auto","none","0"]),vr=e=>e===Pn||e===zn,yr=(e,t)=>parseFloat(e.split(", ")[t]),br=(e,t)=>(n,{transform:r})=>{if("none"===r||!r)return 0;const o=r.match(/^matrix3d\((.+)\)$/u);if(o)return yr(o[1],t);{const t=r.match(/^matrix\((.+)\)$/u);return t?yr(t[1],e):0}},xr=new Set(["x","y","z"]),wr=Bt.filter((e=>!xr.has(e))),Er={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:br(4,13),y:br(5,14)};Er.translateX=Er.x,Er.translateY=Er.y;const kr=new Set;let Sr=!1,Tr=!1;function Pr(){if(Tr){const e=Array.from(kr).filter((e=>e.needsMeasurement)),t=new Set(e.map((e=>e.element))),n=new Map;t.forEach((e=>{const t=function(e){const t=[];return wr.forEach((n=>{const r=e.getValue(n);void 0!==r&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))})),t}(e);t.length&&(n.set(e,t),e.render())})),e.forEach((e=>e.measureInitialState())),t.forEach((e=>{e.render();const t=n.get(e);t&&t.forEach((([t,n])=>{var r;null===(r=e.getValue(t))||void 0===r||r.set(n)}))})),e.forEach((e=>e.measureEndState())),e.forEach((e=>{void 0!==e.suspendedScrollY&&window.scrollTo(0,e.suspendedScrollY)}))}Tr=!1,Sr=!1,kr.forEach((e=>e.complete())),kr.clear()}function Cr(){kr.forEach((e=>{e.readKeyframes(),e.needsMeasurement&&(Tr=!0)}))}class Rr{constructor(e,t,n,r,o,i=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...e],this.onComplete=t,this.name=n,this.motionValue=r,this.element=o,this.isAsync=i}scheduleResolve(){this.isScheduled=!0,this.isAsync?(kr.add(this),Sr||(Sr=!0,Kt.read(Cr),Kt.resolveKeyframes(Pr))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:t,element:n,motionValue:r}=this;for(let o=0;o<e.length;o++)if(null===e[o])if(0===o){const o=null==r?void 0:r.get(),i=e[e.length-1];if(void 0!==o)e[0]=o;else if(n&&t){const r=n.readValue(t,i);null!=r&&(e[0]=r)}void 0===e[0]&&(e[0]=i),r&&void 0===o&&r.set(e[0])}else e[o]=e[o-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),kr.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,kr.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}let Ar=Ft,Mr=Ft;const jr=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),Dr=e=>t=>"string"==typeof t&&t.startsWith(e),Nr=Dr("--"),Lr=Dr("var(--"),Vr=e=>!!Lr(e)&&Or.test(e.split("/*")[0].trim()),Or=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Ir=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Fr(e,t,n=1){Mr(n<=4,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);const[r,o]=function(e){const t=Ir.exec(e);if(!t)return[,];const[,n,r,o]=t;return[`--${null!=n?n:r}`,o]}(e);if(!r)return;const i=window.getComputedStyle(t).getPropertyValue(r);if(i){const e=i.trim();return jr(e)?parseFloat(e):e}return Vr(o)?Fr(o,t,n+1):o}const Br=e=>t=>t.test(e),zr=[Pn,zn,Bn,Fn,Wn,Un,{test:e=>"auto"===e,parse:e=>e}],_r=e=>zr.find(Br(e));class Ur extends Rr{constructor(e,t,n,r,o){super(e,t,n,r,o,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:t,name:n}=this;if(!t||!t.current)return;super.readKeyframes();for(let n=0;n<e.length;n++){let r=e[n];if("string"==typeof r&&(r=r.trim(),Vr(r))){const o=Fr(r,t.current);void 0!==o&&(e[n]=o),n===e.length-1&&(this.finalKeyframe=r)}}if(this.resolveNoneKeyframes(),!_t.has(n)||2!==e.length)return;const[r,o]=e,i=_r(r),s=_r(o);if(i!==s)if(vr(i)&&vr(s))for(let t=0;t<e.length;t++){const n=e[t];"string"==typeof n&&(e[t]=parseFloat(n))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:t}=this,n=[];for(let t=0;t<e.length;t++)("number"==typeof(r=e[t])?0===r:null===r||"none"===r||"0"===r||Sn(r))&&n.push(t);var r;n.length&&function(e,t,n){let r,o=0;for(;o<e.length&&!r;){const t=e[o];"string"==typeof t&&!gr.has(t)&&er(t).values.length&&(r=e[o]),o++}if(r&&n)for(const o of t)e[o]=fr(n,r)}(e,n,t)}measureInitialState(){const{element:e,unresolvedKeyframes:t,name:n}=this;if(!e||!e.current)return;"height"===n&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Er[n](e.measureViewportBox(),window.getComputedStyle(e.current)),t[0]=this.measuredOrigin;const r=t[t.length-1];void 0!==r&&e.getValue(n,r).jump(r,!1)}measureEndState(){var e;const{element:t,name:n,unresolvedKeyframes:r}=this;if(!t||!t.current)return;const o=t.getValue(n);o&&o.jump(this.measuredOrigin,!1);const i=r.length-1,s=r[i];r[i]=Er[n](t.measureViewportBox(),window.getComputedStyle(t.current)),null!==s&&void 0===this.finalKeyframe&&(this.finalKeyframe=s),(null===(e=this.removedTransforms)||void 0===e?void 0:e.length)&&this.removedTransforms.forEach((([e,n])=>{t.getValue(e).set(n)})),this.resolveNoneKeyframes()}}const Wr=(e,t)=>!("zIndex"===t||"number"!=typeof e&&!Array.isArray(e)&&("string"!=typeof e||!or.test(e)&&"0"!==e||e.startsWith("url(")));function $r(e,t,n,r){const o=e[0];if(null===o)return!1;if("display"===t||"visibility"===t)return!0;const i=e[e.length-1],s=Wr(o,t),a=Wr(i,t);return Ar(s===a,`You are trying to animate ${t} from "${o}" to "${i}". ${o} is not an animatable value - to enable this animation set ${o} to a value animatable to ${i} via the \`style\` property.`),!(!s||!a)&&(function(e){const t=e[0];if(1===e.length)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}(e)||("spring"===n||pt(n))&&r)}const Hr=e=>null!==e;function Kr(e,{repeat:t,repeatType:n="loop"},r){const o=e.filter(Hr),i=t&&"loop"!==n&&t%2==1?0:o.length-1;return i&&void 0!==r?r:o[i]}class Yr{constructor({autoplay:e=!0,delay:t=0,type:n="keyframes",repeat:r=0,repeatDelay:o=0,repeatType:i="loop",...s}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=Jt.now(),this.options={autoplay:e,delay:t,type:n,repeat:r,repeatDelay:o,repeatType:i,...s},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt&&this.resolvedAt-this.createdAt>40?this.resolvedAt:this.createdAt}get resolved(){return this._resolved||this.hasAttemptedResolve||(Cr(),Pr()),this._resolved}onKeyframesResolved(e,t){this.resolvedAt=Jt.now(),this.hasAttemptedResolve=!0;const{name:n,type:r,velocity:o,delay:i,onComplete:s,onUpdate:a,isGenerator:l}=this.options;if(!l&&!$r(e,n,r,o)){if(!i)return a&&a(Kr(e,this.options,t)),s&&s(),void this.resolveFinishedPromise();this.options.duration=0}const c=this.initPlayback(e,t);!1!==c&&(this._resolved={keyframes:e,finalKeyframe:t,...c},this.onPostResolved())}onPostResolved(){}then(e,t){return this.currentFinishedPromise.then(e,t)}flatten(){this.options.type="keyframes",this.options.ease="linear"}updateFinishedPromise(){this.currentFinishedPromise=new Promise((e=>{this.resolveFinishedPromise=e}))}}const Xr=(e,t,n)=>e+(t-e)*n;function Gr(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function qr(e,t){return n=>n>0?t:e}const Zr=(e,t,n)=>{const r=e*e,o=n*(t*t-r)+r;return o<0?0:Math.sqrt(o)},Jr=[On,Vn,Hn];function Qr(e){const t=(n=e,Jr.find((e=>e.test(n))));var n;if(Ar(Boolean(t),`'${e}' is not an animatable color. Use the equivalent color code instead.`),!Boolean(t))return!1;let r=t.parse(e);return t===Hn&&(r=function({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,n/=100;let o=0,i=0,s=0;if(t/=100){const r=n<.5?n*(1+t):n+t-n*t,a=2*n-r;o=Gr(a,r,e+1/3),i=Gr(a,r,e),s=Gr(a,r,e-1/3)}else o=i=s=n;return{red:Math.round(255*o),green:Math.round(255*i),blue:Math.round(255*s),alpha:r}}(r)),r}const eo=(e,t)=>{const n=Qr(e),r=Qr(t);if(!n||!r)return qr(e,t);const o={...n};return e=>(o.red=Zr(n.red,r.red,e),o.green=Zr(n.green,r.green,e),o.blue=Zr(n.blue,r.blue,e),o.alpha=Xr(n.alpha,r.alpha,e),Vn.transform(o))},to=(e,t)=>n=>t(e(n)),no=(...e)=>e.reduce(to),ro=new Set(["none","hidden"]);function oo(e,t){return n=>Xr(e,t,n)}function io(e){return"number"==typeof e?oo:"string"==typeof e?Vr(e)?qr:Kn.test(e)?eo:lo:Array.isArray(e)?so:"object"==typeof e?Kn.test(e)?eo:ao:qr}function so(e,t){const n=[...e],r=n.length,o=e.map(((e,n)=>io(e)(e,t[n])));return e=>{for(let t=0;t<r;t++)n[t]=o[t](e);return n}}function ao(e,t){const n={...e,...t},r={};for(const o in n)void 0!==e[o]&&void 0!==t[o]&&(r[o]=io(e[o])(e[o],t[o]));return e=>{for(const t in r)n[t]=r[t](e);return n}}const lo=(e,t)=>{const n=or.createTransformer(t),r=er(e),o=er(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?ro.has(e)&&!o.values.length||ro.has(t)&&!r.values.length?function(e,t){return ro.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}(e,t):no(so(function(e,t){var n;const r=[],o={color:0,var:0,number:0};for(let i=0;i<t.values.length;i++){const s=t.types[i],a=e.indexes[s][o[s]],l=null!==(n=e.values[a])&&void 0!==n?n:0;r[i]=l,o[s]++}return r}(r,o),o.values),n):(Ar(!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.`),qr(e,t))};function co(e,t,n){return"number"==typeof e&&"number"==typeof t&&"number"==typeof n?Xr(e,t,n):io(e)(e,t)}const uo=5;function ho(e,t,n){const r=Math.max(t-uo,0);return nn(n-e(r),t-r)}const po={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},mo=.001;const fo=12;function go(e,t){return e*Math.sqrt(1-t*t)}const vo=["duration","bounce"],yo=["stiffness","damping","mass"];function bo(e,t){return t.some((t=>void 0!==e[t]))}function xo(e=po.visualDuration,t=po.bounce){const n="object"!=typeof e?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:o}=n;const i=n.keyframes[0],s=n.keyframes[n.keyframes.length-1],a={done:!1,value:i},{stiffness:l,damping:c,mass:u,duration:d,velocity:h,isResolvedFromDuration:p}=function(e){let t={velocity:po.velocity,stiffness:po.stiffness,damping:po.damping,mass:po.mass,isResolvedFromDuration:!1,...e};if(!bo(e,yo)&&bo(e,vo))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(1.2*n),o=r*r,i=2*Tn(.05,1,1-(e.bounce||0))*Math.sqrt(o);t={...t,mass:po.mass,stiffness:o,damping:i}}else{const n=function({duration:e=po.duration,bounce:t=po.bounce,velocity:n=po.velocity,mass:r=po.mass}){let o,i;Ar(e<=Ot(po.maxDuration),"Spring duration must be 10 seconds or less");let s=1-t;s=Tn(po.minDamping,po.maxDamping,s),e=Tn(po.minDuration,po.maxDuration,It(e)),s<1?(o=t=>{const r=t*s,o=r*e,i=r-n,a=go(t,s),l=Math.exp(-o);return mo-i/a*l},i=t=>{const r=t*s*e,i=r*n+n,a=Math.pow(s,2)*Math.pow(t,2)*e,l=Math.exp(-r),c=go(Math.pow(t,2),s);return(-o(t)+mo>0?-1:1)*((i-a)*l)/c}):(o=t=>Math.exp(-t*e)*((t-n)*e+1)-mo,i=t=>Math.exp(-t*e)*(e*e*(n-t)));const a=function(e,t,n){let r=n;for(let n=1;n<fo;n++)r-=e(r)/t(r);return r}(o,i,5/e);if(e=Ot(e),isNaN(a))return{stiffness:po.stiffness,damping:po.damping,duration:e};{const t=Math.pow(a,2)*r;return{stiffness:t,damping:2*s*Math.sqrt(r*t),duration:e}}}(e);t={...t,...n,mass:po.mass},t.isResolvedFromDuration=!0}return t}({...n,velocity:-It(n.velocity||0)}),m=h||0,f=c/(2*Math.sqrt(l*u)),g=s-i,v=It(Math.sqrt(l/u)),y=Math.abs(g)<5;let b;if(r||(r=y?po.restSpeed.granular:po.restSpeed.default),o||(o=y?po.restDelta.granular:po.restDelta.default),f<1){const e=go(v,f);b=t=>{const n=Math.exp(-f*v*t);return s-n*((m+f*v*g)/e*Math.sin(e*t)+g*Math.cos(e*t))}}else if(1===f)b=e=>s-Math.exp(-v*e)*(g+(m+v*g)*e);else{const e=v*Math.sqrt(f*f-1);b=t=>{const n=Math.exp(-f*v*t),r=Math.min(e*t,300);return s-n*((m+f*v*g)*Math.sinh(r)+e*g*Math.cosh(r))/e}}const x={calculatedDuration:p&&d||null,next:e=>{const t=b(e);if(p)a.done=e>=d;else{let n=0;f<1&&(n=0===e?Ot(m):ho(b,e,t));const i=Math.abs(n)<=r,l=Math.abs(s-t)<=o;a.done=i&&l}return a.value=a.done?s:t,a},toString:()=>{const e=Math.min(ht(x),dt),t=xt((t=>x.next(e*t).value),e,30);return e+"ms "+t}};return x}function wo({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:o=10,bounceStiffness:i=500,modifyTarget:s,min:a,max:l,restDelta:c=.5,restSpeed:u}){const d=e[0],h={done:!1,value:d},p=e=>void 0===a?l:void 0===l||Math.abs(a-e)<Math.abs(l-e)?a:l;let m=n*t;const f=d+m,g=void 0===s?f:s(f);g!==f&&(m=g-d);const v=e=>-m*Math.exp(-e/r),y=e=>g+v(e),b=e=>{const t=v(e),n=y(e);h.done=Math.abs(t)<=c,h.value=h.done?g:n};let x,w;const E=e=>{var t;t=h.value,(void 0!==a&&t<a||void 0!==l&&t>l)&&(x=e,w=xo({keyframes:[h.value,p(h.value)],velocity:ho(y,e,h.value),damping:o,stiffness:i,restDelta:c,restSpeed:u}))};return E(0),{calculatedDuration:null,next:e=>{let t=!1;return w||void 0!==x||(t=!0,b(e),E(e)),void 0!==x&&e>=x?w.next(e-x):(!t&&b(e),h)}}}const Eo=mn(.42,0,1,1),ko=mn(0,0,.58,1),So=mn(.42,0,.58,1),To={linear:Ft,easeIn:Eo,easeInOut:So,easeOut:ko,circIn:wn,circInOut:kn,circOut:En,backIn:yn,backInOut:bn,backOut:vn,anticipate:xn},Po=e=>{if(ft(e)){Mr(4===e.length,"Cubic bezier arrays must contain four numerical values.");const[t,n,r,o]=e;return mn(t,n,r,o)}return"string"==typeof e?(Mr(void 0!==To[e],`Invalid easing type '${e}'`),To[e]):e};function Co({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const o=(e=>Array.isArray(e)&&"number"!=typeof e[0])(r)?r.map(Po):Po(r),i={done:!1,value:t[0]},s=function(e,t){return e.map((e=>e*t))}(n&&n.length===t.length?n:function(e){const t=[0];return function(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const o=bt(0,t,r);e.push(Xr(n,1,o))}}(t,e.length-1),t}(t),e),a=function(e,t,{clamp:n=!0,ease:r,mixer:o}={}){const i=e.length;if(Mr(i===t.length,"Both input and output ranges must be the same length"),1===i)return()=>t[0];if(2===i&&t[0]===t[1])return()=>t[1];const s=e[0]===e[1];e[0]>e[i-1]&&(e=[...e].reverse(),t=[...t].reverse());const a=function(e,t,n){const r=[],o=n||co,i=e.length-1;for(let n=0;n<i;n++){let i=o(e[n],e[n+1]);if(t){const e=Array.isArray(t)?t[n]||Ft:t;i=no(e,i)}r.push(i)}return r}(t,r,o),l=a.length,c=n=>{if(s&&n<e[0])return t[0];let r=0;if(l>1)for(;r<e.length-2&&!(n<e[r+1]);r++);const o=bt(e[r],e[r+1],n);return a[r](o)};return n?t=>c(Tn(e[0],e[i-1],t)):c}(s,t,{ease:Array.isArray(o)?o:(l=t,c=o,l.map((()=>c||So)).splice(0,l.length-1))});var l,c;return{calculatedDuration:e,next:t=>(i.value=a(t),i.done=t>=e,i)}}const Ro=e=>{const t=({timestamp:t})=>e(t);return{start:()=>Kt.update(t,!0),stop:()=>Yt(t),now:()=>Xt.isProcessing?Xt.timestamp:Jt.now()}},Ao={decay:wo,inertia:wo,tween:Co,keyframes:Co,spring:xo},Mo=e=>e/100;class jo extends Yr{constructor(e){super(e),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,"idle"===this.state)return;this.teardown();const{onStop:e}=this.options;e&&e()};const{name:t,motionValue:n,element:r,keyframes:o}=this.options,i=(null==r?void 0:r.KeyframeResolver)||Rr;this.resolver=new i(o,((e,t)=>this.onKeyframesResolved(e,t)),t,n,r),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(e){const{type:t="keyframes",repeat:n=0,repeatDelay:r=0,repeatType:o,velocity:i=0}=this.options,s=pt(t)?t:Ao[t]||Co;let a,l;s!==Co&&"number"!=typeof e[0]&&(a=no(Mo,co(e[0],e[1])),e=[0,100]);const c=s({...this.options,keyframes:e});"mirror"===o&&(l=s({...this.options,keyframes:[...e].reverse(),velocity:-i})),null===c.calculatedDuration&&(c.calculatedDuration=ht(c));const{calculatedDuration:u}=c,d=u+r;return{generator:c,mirroredGenerator:l,mapPercentToKeyframes:a,calculatedDuration:u,resolvedDuration:d,totalDuration:d*(n+1)-r}}onPostResolved(){const{autoplay:e=!0}=this.options;this.play(),"paused"!==this.pendingPlayState&&e?this.state=this.pendingPlayState:this.pause()}tick(e,t=!1){const{resolved:n}=this;if(!n){const{keyframes:e}=this.options;return{done:!0,value:e[e.length-1]}}const{finalKeyframe:r,generator:o,mirroredGenerator:i,mapPercentToKeyframes:s,keyframes:a,calculatedDuration:l,totalDuration:c,resolvedDuration:u}=n;if(null===this.startTime)return o.next(0);const{delay:d,repeat:h,repeatType:p,repeatDelay:m,onUpdate:f}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-c/this.speed,this.startTime)),t?this.currentTime=e:null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=Math.round(e-this.startTime)*this.speed;const g=this.currentTime-d*(this.speed>=0?1:-1),v=this.speed>=0?g<0:g>c;this.currentTime=Math.max(g,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=c);let y=this.currentTime,b=o;if(h){const e=Math.min(this.currentTime,c)/u;let t=Math.floor(e),n=e%1;!n&&e>=1&&(n=1),1===n&&t--,t=Math.min(t,h+1),Boolean(t%2)&&("reverse"===p?(n=1-n,m&&(n-=m/u)):"mirror"===p&&(b=i)),y=Tn(0,1,n)*u}const x=v?{done:!1,value:a[0]}:b.next(y);s&&(x.value=s(x.value));let{done:w}=x;v||null===l||(w=this.speed>=0?this.currentTime>=c:this.currentTime<=0);const E=null===this.holdTime&&("finished"===this.state||"running"===this.state&&w);return E&&void 0!==r&&(x.value=Kr(a,this.options,r)),f&&f(x.value),E&&this.finish(),x}get duration(){const{resolved:e}=this;return e?It(e.calculatedDuration):0}get time(){return It(this.currentTime)}set time(e){e=Ot(e),this.currentTime=e,null!==this.holdTime||0===this.speed?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.speed)}get speed(){return this.playbackSpeed}set speed(e){const t=this.playbackSpeed!==e;this.playbackSpeed=e,t&&(this.time=It(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved)return void(this.pendingPlayState="running");if(this.isStopped)return;const{driver:e=Ro,onPlay:t,startTime:n}=this.options;this.driver||(this.driver=e((e=>this.tick(e)))),t&&t();const r=this.driver.now();null!==this.holdTime?this.startTime=r-this.holdTime:this.startTime?"finished"===this.state&&(this.startTime=r):this.startTime=null!=n?n:this.calcStartTime(),"finished"===this.state&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var e;this._resolved?(this.state="paused",this.holdTime=null!==(e=this.currentTime)&&void 0!==e?e:0):this.pendingPlayState="paused"}complete(){"running"!==this.state&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:e}=this.options;e&&e()}cancel(){null!==this.cancelTime&&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(e){return this.startTime=0,this.tick(e,!0)}}const Do=new Set(["opacity","clipPath","filter","transform"]),No=st((()=>Object.hasOwnProperty.call(Element.prototype,"animate"))),Lo={anticipate:xn,backInOut:bn,circInOut:kn};class Vo extends Yr{constructor(e){super(e);const{name:t,motionValue:n,element:r,keyframes:o}=this.options;this.resolver=new Ur(o,((e,t)=>this.onKeyframesResolved(e,t)),t,n,r),this.resolver.scheduleResolve()}initPlayback(e,t){let{duration:n=300,times:r,ease:o,type:i,motionValue:s,name:a,startTime:l}=this.options;if(!s.owner||!s.owner.current)return!1;var c;if("string"==typeof o&&yt()&&o in Lo&&(o=Lo[o]),pt((c=this.options).type)||"spring"===c.type||!wt(c.ease)){const{onComplete:t,onUpdate:s,motionValue:a,element:l,...c}=this.options,u=function(e,t){const n=new jo({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:e[0]};const o=[];let i=0;for(;!r.done&&i<2e4;)r=n.sample(i),o.push(r.value),i+=10;return{times:void 0,keyframes:o,duration:i-10,ease:"linear"}}(e,c);1===(e=u.keyframes).length&&(e[1]=e[0]),n=u.duration,r=u.times,o=u.ease,i="keyframes"}const u=function(e,t,n,{delay:r=0,duration:o=300,repeat:i=0,repeatType:s="loop",ease:a="easeInOut",times:l}={}){const c={[t]:n};l&&(c.offset=l);const u=St(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:i+1,direction:"reverse"===s?"alternate":"normal"})}(s.owner.current,a,e,{...this.options,duration:n,times:r,ease:o});return u.startTime=null!=l?l:this.calcStartTime(),this.pendingTimeline?(mt(u,this.pendingTimeline),this.pendingTimeline=void 0):u.onfinish=()=>{const{onComplete:n}=this.options;s.set(Kr(e,this.options,t)),n&&n(),this.cancel(),this.resolveFinishedPromise()},{animation:u,duration:n,times:r,type:i,ease:o,keyframes:e}}get duration(){const{resolved:e}=this;if(!e)return 0;const{duration:t}=e;return It(t)}get time(){const{resolved:e}=this;if(!e)return 0;const{animation:t}=e;return It(t.currentTime||0)}set time(e){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.currentTime=Ot(e)}get speed(){const{resolved:e}=this;if(!e)return 1;const{animation:t}=e;return t.playbackRate}set speed(e){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.playbackRate=e}get state(){const{resolved:e}=this;if(!e)return"idle";const{animation:t}=e;return t.playState}get startTime(){const{resolved:e}=this;if(!e)return null;const{animation:t}=e;return t.startTime}attachTimeline(e){if(this._resolved){const{resolved:t}=this;if(!t)return Ft;const{animation:n}=t;mt(n,e)}else this.pendingTimeline=e;return Ft}play(){if(this.isStopped)return;const{resolved:e}=this;if(!e)return;const{animation:t}=e;"finished"===t.playState&&this.updateFinishedPromise(),t.play()}pause(){const{resolved:e}=this;if(!e)return;const{animation:t}=e;t.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,"idle"===this.state)return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:e}=this;if(!e)return;const{animation:t,keyframes:n,duration:r,type:o,ease:i,times:s}=e;if("idle"===t.playState||"finished"===t.playState)return;if(this.time){const{motionValue:e,onUpdate:t,onComplete:a,element:l,...c}=this.options,u=new jo({...c,keyframes:n,duration:r,type:o,ease:i,times:s,isGenerator:!0}),d=Ot(this.time);e.setWithVelocity(u.sample(d-10).value,u.sample(d).value,10)}const{onStop:a}=this.options;a&&a(),this.cancel()}complete(){const{resolved:e}=this;e&&e.animation.finish()}cancel(){const{resolved:e}=this;e&&e.animation.cancel()}static supports(e){const{motionValue:t,name:n,repeatDelay:r,repeatType:o,damping:i,type:s}=e;if(!(t&&t.owner&&t.owner.current instanceof HTMLElement))return!1;const{onUpdate:a,transformTemplate:l}=t.owner.getProps();return No()&&n&&Do.has(n)&&!a&&!l&&!r&&"mirror"!==o&&0!==i&&"inertia"!==s}}const Oo={type:"spring",stiffness:500,damping:25,restSpeed:10},Io={type:"keyframes",duration:.8},Fo={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Bo=(e,{keyframes:t})=>t.length>2?Io:zt.has(e)?e.startsWith("scale")?{type:"spring",stiffness:550,damping:0===t[1]?2*Math.sqrt(550):30,restSpeed:10}:Oo:Fo,zo=(e,t,n,r={},o,i)=>s=>{const a=ut(r,e)||{},l=a.delay||r.delay||0;let{elapsed:c=0}=r;c-=Ot(l);let u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...a,delay:-c,onUpdate:e=>{t.set(e),a.onUpdate&&a.onUpdate(e)},onComplete:()=>{s(),a.onComplete&&a.onComplete()},name:e,motionValue:t,element:i?void 0:o};(function({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:o,repeat:i,repeatType:s,repeatDelay:a,from:l,elapsed:c,...u}){return!!Object.keys(u).length})(a)||(u={...u,...Bo(e,u)}),u.duration&&(u.duration=Ot(u.duration)),u.repeatDelay&&(u.repeatDelay=Ot(u.repeatDelay)),void 0!==u.from&&(u.keyframes[0]=u.from);let d=!1;if((!1===u.type||0===u.duration&&!u.repeatDelay)&&(u.duration=0,0===u.delay&&(d=!0)),d&&!i&&void 0!==t.get()){const e=Kr(u.keyframes,a);if(void 0!==e)return Kt.update((()=>{u.onUpdate(e),u.onComplete()})),new ct([])}return!i&&Vo.supports(u)?new Vo(u):new jo(u)};function _o({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&!0!==t[n];return t[n]=!1,r}function Uo(e,t,{delay:n=0,transitionOverride:r,type:o}={}){var i;let{transition:s=e.getDefaultTransition(),transitionEnd:a,...l}=t;r&&(s=r);const c=[],u=o&&e.animationState&&e.animationState.getState()[o];for(const t in l){const r=e.getValue(t,null!==(i=e.latestValues[t])&&void 0!==i?i:null),o=l[t];if(void 0===o||u&&_o(u,t))continue;const a={delay:n,...ut(s||{},t)};let d=!1;if(window.MotionHandoffAnimation){const n=hn(e);if(n){const e=window.MotionHandoffAnimation(n,t,Kt);null!==e&&(a.startTime=e,d=!0)}}cn(e,t),r.start(zo(t,r,o,e.shouldReduceMotion&&_t.has(t)?{type:!1}:a,e,d));const h=r.animation;h&&c.push(h)}return a&&Promise.all(c).then((()=>{Kt.update((()=>{a&&function(e,t){const n=rt(e,t);let{transitionEnd:r={},transition:o={},...i}=n||{};i={...i,...r};for(const t in i)an(e,t,Wt(i[t]))}(e,a)}))})),c}function Wo(e,t,n={}){var r;const o=rt(e,t,"exit"===n.type?null===(r=e.presenceContext)||void 0===r?void 0:r.custom:void 0);let{transition:i=e.getDefaultTransition()||{}}=o||{};n.transitionOverride&&(i=n.transitionOverride);const s=o?()=>Promise.all(Uo(e,o,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(r=0)=>{const{delayChildren:o=0,staggerChildren:s,staggerDirection:a}=i;return function(e,t,n=0,r=0,o=1,i){const s=[],a=(e.variantChildren.size-1)*r,l=1===o?(e=0)=>e*r:(e=0)=>a-e*r;return Array.from(e.variantChildren).sort($o).forEach(((e,r)=>{e.notify("AnimationStart",t),s.push(Wo(e,t,{...i,delay:n+l(r)}).then((()=>e.notify("AnimationComplete",t))))})),Promise.all(s)}(e,t,o+r,s,a,n)}:()=>Promise.resolve(),{when:l}=i;if(l){const[e,t]="beforeChildren"===l?[s,a]:[a,s];return e().then((()=>t()))}return Promise.all([s(),a(n.delay)])}function $o(e,t){return e.sortNodePosition(t)}const Ho=it.length;function Ko(e){if(!e)return;if(!e.isControllingVariants){const t=e.parent&&Ko(e.parent)||{};return void 0!==e.props.initial&&(t.initial=e.props.initial),t}const t={};for(let n=0;n<Ho;n++){const r=it[n],o=e.props[r];(et(o)||!1===o)&&(t[r]=o)}return t}const Yo=[...ot].reverse(),Xo=ot.length;function Go(e){let t=function(e){return t=>Promise.all(t.map((({animation:t,options:n})=>function(e,t,n={}){let r;if(e.notify("AnimationStart",t),Array.isArray(t)){const o=t.map((t=>Wo(e,t,n)));r=Promise.all(o)}else if("string"==typeof t)r=Wo(e,t,n);else{const o="function"==typeof t?rt(e,t,n.custom):t;r=Promise.all(Uo(e,o,n))}return r.then((()=>{e.notify("AnimationComplete",t)}))}(e,t,n))))}(e),n=Zo(),r=!0;const o=t=>(n,r)=>{var o;const i=rt(e,r,"exit"===t?null===(o=e.presenceContext)||void 0===o?void 0:o.custom:void 0);if(i){const{transition:e,transitionEnd:t,...r}=i;n={...n,...r,...t}}return n};function i(i){const{props:s}=e,a=Ko(e.parent)||{},l=[],c=new Set;let u={},d=1/0;for(let t=0;t<Xo;t++){const m=Yo[t],f=n[m],g=void 0!==s[m]?s[m]:a[m],v=et(g),y=m===i?f.isActive:null;!1===y&&(d=t);let b=g===a[m]&&g!==s[m]&&v;if(b&&r&&e.manuallyAnimateOnMount&&(b=!1),f.protectedKeys={...u},!f.isActive&&null===y||!g&&!f.prevProp||Ze(g)||"boolean"==typeof g)continue;const x=(h=f.prevProp,"string"==typeof(p=g)?p!==h:!!Array.isArray(p)&&!Qe(p,h));let w=x||m===i&&f.isActive&&!b&&v||t>d&&v,E=!1;const k=Array.isArray(g)?g:[g];let S=k.reduce(o(m),{});!1===y&&(S={});const{prevResolvedValues:T={}}=f,P={...T,...S},C=t=>{w=!0,c.has(t)&&(E=!0,c.delete(t)),f.needsAnimating[t]=!0;const n=e.getValue(t);n&&(n.liveStyle=!1)};for(const e in P){const t=S[e],n=T[e];if(u.hasOwnProperty(e))continue;let r=!1;r=Je(t)&&Je(n)?!Qe(t,n):t!==n,r?null!=t?C(e):c.add(e):void 0!==t&&c.has(e)?C(e):f.protectedKeys[e]=!0}f.prevProp=g,f.prevResolvedValues=S,f.isActive&&(u={...u,...S}),r&&e.blockInitialAnimation&&(w=!1),w&&(!b||!x||E)&&l.push(...k.map((e=>({animation:e,options:{type:m}}))))}var h,p;if(c.size){const t={};c.forEach((n=>{const r=e.getBaseTarget(n),o=e.getValue(n);o&&(o.liveStyle=!0),t[n]=null!=r?r:null})),l.push({animation:t})}let m=Boolean(l.length);return!r||!1!==s.initial&&s.initial!==s.animate||e.manuallyAnimateOnMount||(m=!1),r=!1,m?t(l):Promise.resolve()}return{animateChanges:i,setActive:function(t,r){var o;if(n[t].isActive===r)return Promise.resolve();null===(o=e.variantChildren)||void 0===o||o.forEach((e=>{var n;return null===(n=e.animationState)||void 0===n?void 0:n.setActive(t,r)})),n[t].isActive=r;const s=i(t);for(const e in n)n[e].protectedKeys={};return s},setAnimateFunction:function(n){t=n(e)},getState:()=>n,reset:()=>{n=Zo(),r=!0}}}function qo(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Zo(){return{animate:qo(!0),whileInView:qo(),whileHover:qo(),whileTap:qo(),whileDrag:qo(),whileFocus:qo(),exit:qo()}}class Jo{constructor(e){this.isMounted=!1,this.node=e}update(){}}let Qo=0;const ei={animation:{Feature:class extends Jo{constructor(e){super(e),e.animationState||(e.animationState=Go(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();Ze(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){var e;this.node.animationState.reset(),null===(e=this.unmountControls)||void 0===e||e.call(this)}}},exit:{Feature:class extends Jo{constructor(){super(...arguments),this.id=Qo++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:t}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===n)return;const r=this.node.animationState.setActive("exit",!e);t&&!e&&r.then((()=>t(this.id)))}mount(){const{register:e}=this.node.presenceContext||{};e&&(this.unmount=e(this.id))}unmount(){}}}};function ti(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function ni(e){return{point:{x:e.pageX,y:e.pageY}}}function ri(e,t,n,r){return ti(e,t,(e=>t=>Mt(t)&&e(t,ni(t)))(n),r)}const oi=(e,t)=>Math.abs(e-t);class ii{constructor(e,t,{transformPagePoint:n,contextWindow:r,dragSnapToOrigin:o=!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 e=li(this.lastMoveEventInfo,this.history),t=null!==this.startEvent,n=function(e,t){const n=oi(e.x,t.x),r=oi(e.y,t.y);return Math.sqrt(n**2+r**2)}(e.offset,{x:0,y:0})>=3;if(!t&&!n)return;const{point:r}=e,{timestamp:o}=Xt;this.history.push({...r,timestamp:o});const{onStart:i,onMove:s}=this.handlers;t||(i&&i(this.lastMoveEvent,e),this.startEvent=this.lastMoveEvent),s&&s(this.lastMoveEvent,e)},this.handlePointerMove=(e,t)=>{this.lastMoveEvent=e,this.lastMoveEventInfo=si(t,this.transformPagePoint),Kt.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{this.end();const{onEnd:n,onSessionEnd:r,resumeAnimation:o}=this.handlers;if(this.dragSnapToOrigin&&o&&o(),!this.lastMoveEvent||!this.lastMoveEventInfo)return;const i=li("pointercancel"===e.type?this.lastMoveEventInfo:si(t,this.transformPagePoint),this.history);this.startEvent&&n&&n(e,i),r&&r(e,i)},!Mt(e))return;this.dragSnapToOrigin=o,this.handlers=t,this.transformPagePoint=n,this.contextWindow=r||window;const i=si(ni(e),this.transformPagePoint),{point:s}=i,{timestamp:a}=Xt;this.history=[{...s,timestamp:a}];const{onSessionStart:l}=t;l&&l(e,li(i,this.history)),this.removeListeners=no(ri(this.contextWindow,"pointermove",this.handlePointerMove),ri(this.contextWindow,"pointerup",this.handlePointerUp),ri(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),Yt(this.updatePoint)}}function si(e,t){return t?{point:t(e.point)}:e}function ai(e,t){return{x:e.x-t.x,y:e.y-t.y}}function li({point:e},t){return{point:e,delta:ai(e,ui(t)),offset:ai(e,ci(t)),velocity:di(t,.1)}}function ci(e){return e[0]}function ui(e){return e[e.length-1]}function di(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const o=ui(e);for(;n>=0&&(r=e[n],!(o.timestamp-r.timestamp>Ot(t)));)n--;if(!r)return{x:0,y:0};const i=It(o.timestamp-r.timestamp);if(0===i)return{x:0,y:0};const s={x:(o.x-r.x)/i,y:(o.y-r.y)/i};return s.x===1/0&&(s.x=0),s.y===1/0&&(s.y=0),s}function hi(e){return e&&"object"==typeof e&&Object.prototype.hasOwnProperty.call(e,"current")}const pi=.9999,mi=1.0001,fi=-.01,gi=.01;function vi(e){return e.max-e.min}function yi(e,t,n,r=.5){e.origin=r,e.originPoint=Xr(t.min,t.max,e.origin),e.scale=vi(n)/vi(t),e.translate=Xr(n.min,n.max,e.origin)-e.originPoint,(e.scale>=pi&&e.scale<=mi||isNaN(e.scale))&&(e.scale=1),(e.translate>=fi&&e.translate<=gi||isNaN(e.translate))&&(e.translate=0)}function bi(e,t,n,r){yi(e.x,t.x,n.x,r?r.originX:void 0),yi(e.y,t.y,n.y,r?r.originY:void 0)}function xi(e,t,n){e.min=n.min+t.min,e.max=e.min+vi(t)}function wi(e,t,n){e.min=t.min-n.min,e.max=e.min+vi(t)}function Ei(e,t,n){wi(e.x,t.x,n.x),wi(e.y,t.y,n.y)}function ki(e,t,n){return{min:void 0!==t?e.min+t:void 0,max:void 0!==n?e.max+n-(e.max-e.min):void 0}}function Si(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}}const Ti=.35;function Pi(e,t,n){return{min:Ci(e,t),max:Ci(e,n)}}function Ci(e,t){return"number"==typeof e?e:e[t]||0}const Ri=()=>({x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}}),Ai=()=>({x:{min:0,max:0},y:{min:0,max:0}});function Mi(e){return[e("x"),e("y")]}function ji({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function Di(e){return void 0===e||1===e}function Ni({scale:e,scaleX:t,scaleY:n}){return!Di(e)||!Di(t)||!Di(n)}function Li(e){return Ni(e)||Vi(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Vi(e){return Oi(e.x)||Oi(e.y)}function Oi(e){return e&&"0%"!==e}function Ii(e,t,n){return n+t*(e-n)}function Fi(e,t,n,r,o){return void 0!==o&&(e=Ii(e,o,r)),Ii(e,n,r)+t}function Bi(e,t=0,n=1,r,o){e.min=Fi(e.min,t,n,r,o),e.max=Fi(e.max,t,n,r,o)}function zi(e,{x:t,y:n}){Bi(e.x,t.translate,t.scale,t.originPoint),Bi(e.y,n.translate,n.scale,n.originPoint)}const _i=.999999999999,Ui=1.0000000000001;function Wi(e,t){e.min=e.min+t,e.max=e.max+t}function $i(e,t,n,r,o=.5){Bi(e,t,n,Xr(e.min,e.max,o),r)}function Hi(e,t){$i(e.x,t.x,t.scaleX,t.scale,t.originX),$i(e.y,t.y,t.scaleY,t.scale,t.originY)}function Ki(e,t){return ji(function(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}}(e.getBoundingClientRect(),t))}const Yi=({current:e})=>e?e.ownerDocument.defaultView:null,Xi=new WeakMap;class Gi{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Ai(),this.visualElement=e}start(e,{snapToCursor:t=!1}={}){const{presenceContext:n}=this.visualElement;if(n&&!1===n.isPresent)return;const{dragSnapToOrigin:r}=this.getProps();this.panSession=new ii(e,{onSessionStart:e=>{const{dragSnapToOrigin:n}=this.getProps();n?this.pauseAnimation():this.stopAnimation(),t&&this.snapToCursor(ni(e).point)},onStart:(e,t)=>{const{drag:n,dragPropagation:r,onDragStart:o}=this.getProps();if(n&&!r&&(this.openDragLock&&this.openDragLock(),this.openDragLock="x"===(i=n)||"y"===i?Tt[i]?null:(Tt[i]=!0,()=>{Tt[i]=!1}):Tt.x||Tt.y?null:(Tt.x=Tt.y=!0,()=>{Tt.x=Tt.y=!1}),!this.openDragLock))return;var i;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Mi((e=>{let t=this.getAxisMotionValue(e).get()||0;if(Bn.test(t)){const{projection:n}=this.visualElement;if(n&&n.layout){const r=n.layout.layoutBox[e];r&&(t=vi(r)*(parseFloat(t)/100))}}this.originPoint[e]=t})),o&&Kt.postRender((()=>o(e,t))),cn(this.visualElement,"transform");const{animationState:s}=this.visualElement;s&&s.setActive("whileDrag",!0)},onMove:(e,t)=>{const{dragPropagation:n,dragDirectionLock:r,onDirectionLock:o,onDrag:i}=this.getProps();if(!n&&!this.openDragLock)return;const{offset:s}=t;if(r&&null===this.currentDirection)return this.currentDirection=function(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}(s),void(null!==this.currentDirection&&o&&o(this.currentDirection));this.updateAxis("x",t.point,s),this.updateAxis("y",t.point,s),this.visualElement.render(),i&&i(e,t)},onSessionEnd:(e,t)=>this.stop(e,t),resumeAnimation:()=>Mi((e=>{var t;return"paused"===this.getAnimationState(e)&&(null===(t=this.getAxisMotionValue(e).animation)||void 0===t?void 0:t.play())}))},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:r,contextWindow:Yi(this.visualElement)})}stop(e,t){const n=this.isDragging;if(this.cancel(),!n)return;const{velocity:r}=t;this.startAnimation(r);const{onDragEnd:o}=this.getProps();o&&Kt.postRender((()=>o(e,t)))}cancel(){this.isDragging=!1;const{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),t&&t.setActive("whileDrag",!1)}updateAxis(e,t,n){const{drag:r}=this.getProps();if(!n||!qi(e,r,this.currentDirection))return;const o=this.getAxisMotionValue(e);let i=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(i=function(e,{min:t,max:n},r){return void 0!==t&&e<t?e=r?Xr(t,e,r.min):Math.max(e,t):void 0!==n&&e>n&&(e=r?Xr(n,e,r.max):Math.min(e,n)),e}(i,this.constraints[e],this.elastic[e])),o.set(i)}resolveConstraints(){var e;const{dragConstraints:t,dragElastic:n}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):null===(e=this.visualElement.projection)||void 0===e?void 0:e.layout,o=this.constraints;t&&hi(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!t||!r)&&function(e,{top:t,left:n,bottom:r,right:o}){return{x:ki(e.x,n,o),y:ki(e.y,t,r)}}(r.layoutBox,t),this.elastic=function(e=Ti){return!1===e?e=0:!0===e&&(e=Ti),{x:Pi(e,"left","right"),y:Pi(e,"top","bottom")}}(n),o!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&Mi((e=>{!1!==this.constraints&&this.getAxisMotionValue(e)&&(this.constraints[e]=function(e,t){const n={};return void 0!==t.min&&(n.min=t.min-e.min),void 0!==t.max&&(n.max=t.max-e.min),n}(r.layoutBox[e],this.constraints[e]))}))}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!hi(e))return!1;const n=e.current;Mr(null!==n,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");const{projection:r}=this.visualElement;if(!r||!r.layout)return!1;const o=function(e,t,n){const r=Ki(e,n),{scroll:o}=t;return o&&(Wi(r.x,o.offset.x),Wi(r.y,o.offset.y)),r}(n,r.root,this.visualElement.getTransformPagePoint());let i=function(e,t){return{x:Si(e.x,t.x),y:Si(e.y,t.y)}}(r.layout.layoutBox,o);if(t){const e=t(function({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}(i));this.hasMutatedConstraints=!!e,e&&(i=ji(e))}return i}startAnimation(e){const{drag:t,dragMomentum:n,dragElastic:r,dragTransition:o,dragSnapToOrigin:i,onDragTransitionEnd:s}=this.getProps(),a=this.constraints||{},l=Mi((s=>{if(!qi(s,t,this.currentDirection))return;let l=a&&a[s]||{};i&&(l={min:0,max:0});const c=r?200:1e6,u=r?40:1e7,d={type:"inertia",velocity:n?e[s]:0,bounceStiffness:c,bounceDamping:u,timeConstant:750,restDelta:1,restSpeed:10,...o,...l};return this.startAxisValueAnimation(s,d)}));return Promise.all(l).then(s)}startAxisValueAnimation(e,t){const n=this.getAxisMotionValue(e);return cn(this.visualElement,e),n.start(zo(e,n,0,t,this.visualElement,!1))}stopAnimation(){Mi((e=>this.getAxisMotionValue(e).stop()))}pauseAnimation(){Mi((e=>{var t;return null===(t=this.getAxisMotionValue(e).animation)||void 0===t?void 0:t.pause()}))}getAnimationState(e){var t;return null===(t=this.getAxisMotionValue(e).animation)||void 0===t?void 0:t.state}getAxisMotionValue(e){const t=`_drag${e.toUpperCase()}`,n=this.visualElement.getProps();return n[t]||this.visualElement.getValue(e,(n.initial?n.initial[e]:void 0)||0)}snapToCursor(e){Mi((t=>{const{drag:n}=this.getProps();if(!qi(t,n,this.currentDirection))return;const{projection:r}=this.visualElement,o=this.getAxisMotionValue(t);if(r&&r.layout){const{min:n,max:i}=r.layout.layoutBox[t];o.set(e[t]-Xr(n,i,.5))}}))}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!hi(t)||!n||!this.constraints)return;this.stopAnimation();const r={x:0,y:0};Mi((e=>{const t=this.getAxisMotionValue(e);if(t&&!1!==this.constraints){const n=t.get();r[e]=function(e,t){let n=.5;const r=vi(e),o=vi(t);return o>r?n=bt(t.min,t.max-r,e.min):r>o&&(n=bt(e.min,e.max-o,t.min)),Tn(0,1,n)}({min:n,max:n},this.constraints[e])}}));const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.resolveConstraints(),Mi((t=>{if(!qi(t,e,null))return;const n=this.getAxisMotionValue(t),{min:o,max:i}=this.constraints[t];n.set(Xr(o,i,r[t]))}))}addListeners(){if(!this.visualElement.current)return;Xi.set(this.visualElement,this);const e=ri(this.visualElement.current,"pointerdown",(e=>{const{drag:t,dragListener:n=!0}=this.getProps();t&&n&&this.start(e)})),t=()=>{const{dragConstraints:e}=this.getProps();hi(e)&&e.current&&(this.constraints=this.resolveRefConstraints())},{projection:n}=this.visualElement,r=n.addEventListener("measure",t);n&&!n.layout&&(n.root&&n.root.updateScroll(),n.updateLayout()),Kt.read(t);const o=ti(window,"resize",(()=>this.scalePositionWithinConstraints())),i=n.addEventListener("didUpdate",(({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(Mi((t=>{const n=this.getAxisMotionValue(t);n&&(this.originPoint[t]+=e[t].translate,n.set(n.get()+e[t].translate))})),this.visualElement.render())}));return()=>{o(),e(),r(),i&&i()}}getProps(){const e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:n=!1,dragPropagation:r=!1,dragConstraints:o=!1,dragElastic:i=Ti,dragMomentum:s=!0}=e;return{...e,drag:t,dragDirectionLock:n,dragPropagation:r,dragConstraints:o,dragElastic:i,dragMomentum:s}}}function qi(e,t,n){return!(!0!==t&&t!==e||null!==n&&n!==e)}const Zi=e=>(t,n)=>{e&&Kt.postRender((()=>e(t,n)))},Ji=(0,r.createContext)({}),Qi={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function es(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const ts={correct:(e,t)=>{if(!t.target)return e;if("string"==typeof e){if(!zn.test(e))return e;e=parseFloat(e)}return`${es(e,t.target.x)}% ${es(e,t.target.y)}%`}},ns={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,o=or.parse(e);if(o.length>5)return r;const i=or.createTransformer(e),s="number"!=typeof o[0]?1:0,a=n.x.scale*t.x,l=n.y.scale*t.y;o[0+s]/=a,o[1+s]/=l;const c=Xr(a,l,.5);return"number"==typeof o[2+s]&&(o[2+s]/=c),"number"==typeof o[3+s]&&(o[3+s]/=c),i(o)}},rs={},{schedule:os,cancel:is}=Ht(queueMicrotask,!1);class ss extends r.Component{componentDidMount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:n,layoutId:r}=this.props,{projection:o}=e;var i;i=ls,Object.assign(rs,i),o&&(t.group&&t.group.add(o),n&&n.register&&r&&n.register(o),o.root.didUpdate(),o.addEventListener("animationComplete",(()=>{this.safeToRemove()})),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),Qi.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:t,visualElement:n,drag:r,isPresent:o}=this.props,i=n.projection;return i?(i.isPresent=o,r||e.layoutDependency!==t||void 0===t?i.willUpdate():this.safeToRemove(),e.isPresent!==o&&(o?i.promote():i.relegate()||Kt.postRender((()=>{const e=i.getStack();e&&e.members.length||this.safeToRemove()}))),null):null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),os.postRender((()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()})))}componentWillUnmount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;r&&(r.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(r),n&&n.deregister&&n.deregister(r))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function as(e){const[t,n]=$e(),o=(0,r.useContext)(Oe);return(0,s.jsx)(ss,{...e,layoutGroup:o,switchLayoutGroup:(0,r.useContext)(Ji),isPresent:t,safeToRemove:n})}const ls={borderRadius:{...ts,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:ts,borderTopRightRadius:ts,borderBottomLeftRadius:ts,borderBottomRightRadius:ts,boxShadow:ns},cs=(e,t)=>e.depth-t.depth;class us{constructor(){this.children=[],this.isDirty=!1}add(e){Qt(this.children,e),this.isDirty=!0}remove(e){en(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(cs),this.isDirty=!1,this.children.forEach(e)}}function ds(e){const t=ln(e)?e.get():e;return Ut(t)?t.toValue():t}const hs=["TopLeft","TopRight","BottomLeft","BottomRight"],ps=hs.length,ms=e=>"string"==typeof e?parseFloat(e):e,fs=e=>"number"==typeof e||zn.test(e);function gs(e,t){return void 0!==e[t]?e[t]:e.borderRadius}const vs=bs(0,.5,En),ys=bs(.5,.95,Ft);function bs(e,t,n){return r=>r<e?0:r>t?1:n(bt(e,t,r))}function xs(e,t){e.min=t.min,e.max=t.max}function ws(e,t){xs(e.x,t.x),xs(e.y,t.y)}function Es(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function ks(e,t,n,r,o){return e=Ii(e-=t,1/n,r),void 0!==o&&(e=Ii(e,1/o,r)),e}function Ss(e,t,[n,r,o],i,s){!function(e,t=0,n=1,r=.5,o,i=e,s=e){if(Bn.test(t)&&(t=parseFloat(t),t=Xr(s.min,s.max,t/100)-s.min),"number"!=typeof t)return;let a=Xr(i.min,i.max,r);e===i&&(a-=t),e.min=ks(e.min,t,n,a,o),e.max=ks(e.max,t,n,a,o)}(e,t[n],t[r],t[o],t.scale,i,s)}const Ts=["x","scaleX","originX"],Ps=["y","scaleY","originY"];function Cs(e,t,n,r){Ss(e.x,t,Ts,n?n.x:void 0,r?r.x:void 0),Ss(e.y,t,Ps,n?n.y:void 0,r?r.y:void 0)}function Rs(e){return 0===e.translate&&1===e.scale}function As(e){return Rs(e.x)&&Rs(e.y)}function Ms(e,t){return e.min===t.min&&e.max===t.max}function js(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Ds(e,t){return js(e.x,t.x)&&js(e.y,t.y)}function Ns(e){return vi(e.x)/vi(e.y)}function Ls(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class Vs{constructor(){this.members=[]}add(e){Qt(this.members,e),e.scheduleRender()}remove(e){if(en(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(e){const t=this.members.findIndex((t=>e===t));if(0===t)return!1;let n;for(let e=t;e>=0;e--){const t=this.members[e];if(!1!==t.isPresent){n=t;break}}return!!n&&(this.promote(n),!0)}promote(e,t){const n=this.lead;if(e!==n&&(this.prevLead=n,this.lead=e,e.show(),n)){n.instance&&n.scheduleRender(),e.scheduleRender(),e.resumeFrom=n,t&&(e.resumeFrom.preserveOpacity=!0),n.snapshot&&(e.snapshot=n.snapshot,e.snapshot.latestValues=n.animationValues||n.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:r}=e.options;!1===r&&n.hide()}}exitAnimationComplete(){this.members.forEach((e=>{const{options:t,resumingFrom:n}=e;t.onExitComplete&&t.onExitComplete(),n&&n.options.onExitComplete&&n.options.onExitComplete()}))}scheduleRender(){this.members.forEach((e=>{e.instance&&e.scheduleRender(!1)}))}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}const Os={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0},Is="undefined"!=typeof window&&void 0!==window.MotionDebug,Fs=["","X","Y","Z"],Bs={visibility:"hidden"};let zs=0;function _s(e,t,n,r){const{latestValues:o}=t;o[e]&&(n[e]=o[e],t.setStaticValue(e,0),r&&(r[e]=0))}function Us(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=hn(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:t,layoutId:r}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",Kt,!(t||r))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&Us(r)}function Ws({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:o}){return class{constructor(e={},n=(null==t?void 0:t())){this.id=zs++,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,Is&&(Os.totalNodes=Os.resolvedTargetDeltas=Os.recalculatedProjection=0),this.nodes.forEach(Ks),this.nodes.forEach(Qs),this.nodes.forEach(ea),this.nodes.forEach(Ys),Is&&window.MotionDebug.record(Os)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=e,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let e=0;e<this.path.length;e++)this.path[e].shouldResetTransform=!0;this.root===this&&(this.nodes=new us)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new tn),this.eventHandlers.get(e).add(t)}notifyListeners(e,...t){const n=this.eventHandlers.get(e);n&&n.notify(...t)}hasListeners(e){return this.eventHandlers.has(e)}mount(t,n=this.root.hasTreeAnimated){if(this.instance)return;var r;this.isSVG=(r=t)instanceof SVGElement&&"svg"!==r.tagName,this.instance=t;const{layoutId:o,layout:i,visualElement:s}=this.options;if(s&&!s.current&&s.mount(t),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),n&&(i||o)&&(this.isLayoutDirty=!0),e){let n;const r=()=>this.root.updateBlockedByResize=!1;e(t,(()=>{this.root.updateBlockedByResize=!0,n&&n(),n=function(e,t){const n=Jt.now(),r=({timestamp:o})=>{const i=o-n;i>=t&&(Yt(r),e(i-t))};return Kt.read(r,!0),()=>Yt(r)}(r,250),Qi.hasAnimatedSinceResize&&(Qi.hasAnimatedSinceResize=!1,this.nodes.forEach(Js))}))}o&&this.root.registerSharedNode(o,this),!1!==this.options.animate&&s&&(o||i)&&this.addEventListener("didUpdate",(({delta:e,hasLayoutChanged:t,hasRelativeTargetChanged:n,layout:r})=>{if(this.isTreeAnimationBlocked())return this.target=void 0,void(this.relativeTarget=void 0);const o=this.options.transition||s.getDefaultTransition()||sa,{onLayoutAnimationStart:i,onLayoutAnimationComplete:a}=s.getProps(),l=!this.targetLayout||!Ds(this.targetLayout,r)||n,c=!t&&n;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||c||t&&(l||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(e,c);const t={...ut(o,"layout"),onPlay:i,onComplete:a};(s.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t)}else t||Js(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=r}))}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const e=this.getStack();e&&e.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,Yt(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(ta),this.animationId++)}getTransformTemplate(){const{visualElement:e}=this.options;return e&&e.getProps().transformTemplate}willUpdate(e=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked())return void(this.options.onExitComplete&&this.options.onExitComplete());if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Us(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let e=0;e<this.path.length;e++){const t=this.path[e];t.shouldResetTransform=!0,t.updateScroll("snapshot"),t.options.layoutRoot&&t.willUpdate(!1)}const{layoutId:t,layout:n}=this.options;if(void 0===t&&!n)return;const r=this.getTransformTemplate();this.prevTransformTemplateValue=r?r(this.latestValues,""):void 0,this.updateSnapshot(),e&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked())return this.unblockUpdate(),this.clearAllSnapshots(),void this.nodes.forEach(Gs);this.isUpdating||this.nodes.forEach(qs),this.isUpdating=!1,this.nodes.forEach(Zs),this.nodes.forEach($s),this.nodes.forEach(Hs),this.clearAllSnapshots();const e=Jt.now();Xt.delta=Tn(0,1e3/60,e-Xt.timestamp),Xt.timestamp=e,Xt.isProcessing=!0,Gt.update.process(Xt),Gt.preRender.process(Xt),Gt.render.process(Xt),Xt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,os.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Xs),this.sharedNodes.forEach(na)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Kt.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Kt.postRender((()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()}))}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure())}updateLayout(){if(!this.instance)return;if(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead()||this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let e=0;e<this.path.length;e++)this.path[e].updateScroll();const e=this.layout;this.layout=this.measure(!1),this.layoutCorrected=Ai(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:t}=this.options;t&&t.notify("LayoutMeasure",this.layout.layoutBox,e?e.layoutBox:void 0)}updateScroll(e="measure"){let t=Boolean(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===e&&(t=!1),t){const t=r(this.instance);this.scroll={animationId:this.root.animationId,phase:e,isRoot:t,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:t}}}resetTransform(){if(!o)return;const e=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,t=this.projectionDelta&&!As(this.projectionDelta),n=this.getTransformTemplate(),r=n?n(this.latestValues,""):void 0,i=r!==this.prevTransformTemplateValue;e&&(t||Li(this.latestValues)||i)&&(o(this.instance,r),this.shouldResetTransform=!1,this.scheduleRender())}measure(e=!0){const t=this.measurePageBox();let n=this.removeElementScroll(t);var r;return e&&(n=this.removeTransform(n)),ca((r=n).x),ca(r.y),{animationId:this.root.animationId,measuredBox:t,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){var e;const{visualElement:t}=this.options;if(!t)return Ai();const n=t.measureViewportBox();if(!(null===(e=this.scroll)||void 0===e?void 0:e.wasRoot)&&!this.path.some(da)){const{scroll:e}=this.root;e&&(Wi(n.x,e.offset.x),Wi(n.y,e.offset.y))}return n}removeElementScroll(e){var t;const n=Ai();if(ws(n,e),null===(t=this.scroll)||void 0===t?void 0:t.wasRoot)return n;for(let t=0;t<this.path.length;t++){const r=this.path[t],{scroll:o,options:i}=r;r!==this.root&&o&&i.layoutScroll&&(o.wasRoot&&ws(n,e),Wi(n.x,o.offset.x),Wi(n.y,o.offset.y))}return n}applyTransform(e,t=!1){const n=Ai();ws(n,e);for(let e=0;e<this.path.length;e++){const r=this.path[e];!t&&r.options.layoutScroll&&r.scroll&&r!==r.root&&Hi(n,{x:-r.scroll.offset.x,y:-r.scroll.offset.y}),Li(r.latestValues)&&Hi(n,r.latestValues)}return Li(this.latestValues)&&Hi(n,this.latestValues),n}removeTransform(e){const t=Ai();ws(t,e);for(let e=0;e<this.path.length;e++){const n=this.path[e];if(!n.instance)continue;if(!Li(n.latestValues))continue;Ni(n.latestValues)&&n.updateSnapshot();const r=Ai();ws(r,n.measurePageBox()),Cs(t,n.latestValues,n.snapshot?n.snapshot.layoutBox:void 0,r)}return Li(this.latestValues)&&Cs(t,this.latestValues),t}setTargetDelta(e){this.targetDelta=e,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(e){this.options={...this.options,...e,crossfade:void 0===e.crossfade||e.crossfade}}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!==Xt.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(e=!1){var t;const n=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=n.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=n.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=n.isSharedProjectionDirty);const r=Boolean(this.resumingFrom)||this!==n;if(!(e||r&&this.isSharedProjectionDirty||this.isProjectionDirty||(null===(t=this.parent)||void 0===t?void 0:t.isProjectionDirty)||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:o,layoutId:i}=this.options;if(this.layout&&(o||i)){if(this.resolvedRelativeTargetAt=Xt.timestamp,!this.targetDelta&&!this.relativeTarget){const e=this.getClosestProjectingParent();e&&e.layout&&1!==this.animationProgress?(this.relativeParent=e,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Ai(),this.relativeTargetOrigin=Ai(),Ei(this.relativeTargetOrigin,this.layout.layoutBox,e.layout.layoutBox),ws(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(this.relativeTarget||this.targetDelta){var s,a,l;if(this.target||(this.target=Ai(),this.targetWithTransforms=Ai()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),s=this.target,a=this.relativeTarget,l=this.relativeParent.target,xi(s.x,a.x,l.x),xi(s.y,a.y,l.y)):this.targetDelta?(Boolean(this.resumingFrom)?this.target=this.applyTransform(this.layout.layoutBox):ws(this.target,this.layout.layoutBox),zi(this.target,this.targetDelta)):ws(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const e=this.getClosestProjectingParent();e&&Boolean(e.resumingFrom)===Boolean(this.resumingFrom)&&!e.options.layoutScroll&&e.target&&1!==this.animationProgress?(this.relativeParent=e,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Ai(),this.relativeTargetOrigin=Ai(),Ei(this.relativeTargetOrigin,this.target,e.target),ws(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}Is&&Os.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(this.parent&&!Ni(this.parent.latestValues)&&!Vi(this.parent.latestValues))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return Boolean((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var e;const t=this.getLead(),n=Boolean(this.resumingFrom)||this!==t;let r=!0;if((this.isProjectionDirty||(null===(e=this.parent)||void 0===e?void 0:e.isProjectionDirty))&&(r=!1),n&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(r=!1),this.resolvedRelativeTargetAt===Xt.timestamp&&(r=!1),r)return;const{layout:o,layoutId:i}=this.options;if(this.isTreeAnimating=Boolean(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!o&&!i)return;ws(this.layoutCorrected,this.layout.layoutBox);const s=this.treeScale.x,a=this.treeScale.y;!function(e,t,n,r=!1){const o=n.length;if(!o)return;let i,s;t.x=t.y=1;for(let a=0;a<o;a++){i=n[a],s=i.projectionDelta;const{visualElement:o}=i.options;o&&o.props.style&&"contents"===o.props.style.display||(r&&i.options.layoutScroll&&i.scroll&&i!==i.root&&Hi(e,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),s&&(t.x*=s.x.scale,t.y*=s.y.scale,zi(e,s)),r&&Li(i.latestValues)&&Hi(e,i.latestValues))}t.x<Ui&&t.x>_i&&(t.x=1),t.y<Ui&&t.y>_i&&(t.y=1)}(this.layoutCorrected,this.treeScale,this.path,n),!t.layout||t.target||1===this.treeScale.x&&1===this.treeScale.y||(t.target=t.layout.layoutBox,t.targetWithTransforms=Ai());const{target:l}=t;l?(this.projectionDelta&&this.prevProjectionDelta?(Es(this.prevProjectionDelta.x,this.projectionDelta.x),Es(this.prevProjectionDelta.y,this.projectionDelta.y)):this.createProjectionDeltas(),bi(this.projectionDelta,this.layoutCorrected,l,this.latestValues),this.treeScale.x===s&&this.treeScale.y===a&&Ls(this.projectionDelta.x,this.prevProjectionDelta.x)&&Ls(this.projectionDelta.y,this.prevProjectionDelta.y)||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",l)),Is&&Os.recalculatedProjection++):this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender())}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(e=!0){var t;if(null===(t=this.options.visualElement)||void 0===t||t.scheduleRender(),e){const e=this.getStack();e&&e.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Ri(),this.projectionDelta=Ri(),this.projectionDeltaWithTransform=Ri()}setAnimationOrigin(e,t=!1){const n=this.snapshot,r=n?n.latestValues:{},o={...this.latestValues},i=Ri();this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;const s=Ai(),a=(n?n.source:void 0)!==(this.layout?this.layout.source:void 0),l=this.getStack(),c=!l||l.members.length<=1,u=Boolean(a&&!c&&!0===this.options.crossfade&&!this.path.some(ia));let d;this.animationProgress=0,this.mixTargetDelta=t=>{const n=t/1e3;ra(i.x,e.x,n),ra(i.y,e.y,n),this.setTargetDelta(i),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Ei(s,this.layout.layoutBox,this.relativeParent.layout.layoutBox),function(e,t,n,r){oa(e.x,t.x,n.x,r),oa(e.y,t.y,n.y,r)}(this.relativeTarget,this.relativeTargetOrigin,s,n),d&&function(e,t){return Ms(e.x,t.x)&&Ms(e.y,t.y)}(this.relativeTarget,d)&&(this.isProjectionDirty=!1),d||(d=Ai()),ws(d,this.relativeTarget)),a&&(this.animationValues=o,function(e,t,n,r,o,i){o?(e.opacity=Xr(0,void 0!==n.opacity?n.opacity:1,vs(r)),e.opacityExit=Xr(void 0!==t.opacity?t.opacity:1,0,ys(r))):i&&(e.opacity=Xr(void 0!==t.opacity?t.opacity:1,void 0!==n.opacity?n.opacity:1,r));for(let o=0;o<ps;o++){const i=`border${hs[o]}Radius`;let s=gs(t,i),a=gs(n,i);void 0===s&&void 0===a||(s||(s=0),a||(a=0),0===s||0===a||fs(s)===fs(a)?(e[i]=Math.max(Xr(ms(s),ms(a),r),0),(Bn.test(a)||Bn.test(s))&&(e[i]+="%")):e[i]=a)}(t.rotate||n.rotate)&&(e.rotate=Xr(t.rotate||0,n.rotate||0,r))}(o,r,this.latestValues,n,u,c)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(e){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Yt(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Kt.update((()=>{Qi.hasAnimatedSinceResize=!0,this.currentAnimation=function(e,t,n){const r=ln(0)?0:sn(0);return r.start(zo("",r,1e3,n)),r.animation}(0,0,{...e,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onComplete:()=>{e.onComplete&&e.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 e=this.getStack();e&&e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const e=this.getLead();let{targetWithTransforms:t,target:n,layout:r,latestValues:o}=e;if(t&&n&&r){if(this!==e&&this.layout&&r&&ua(this.options.animationType,this.layout.layoutBox,r.layoutBox)){n=this.target||Ai();const t=vi(this.layout.layoutBox.x);n.x.min=e.target.x.min,n.x.max=n.x.min+t;const r=vi(this.layout.layoutBox.y);n.y.min=e.target.y.min,n.y.max=n.y.min+r}ws(t,n),Hi(t,o),bi(this.projectionDeltaWithTransform,this.layoutCorrected,t,o)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new Vs),this.sharedNodes.get(e).add(t);const n=t.options.initialPromotionConfig;t.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(t):void 0})}isLead(){const e=this.getStack();return!e||e.lead===this}getLead(){var e;const{layoutId:t}=this.options;return t&&(null===(e=this.getStack())||void 0===e?void 0:e.lead)||this}getPrevLead(){var e;const{layoutId:t}=this.options;return t?null===(e=this.getStack())||void 0===e?void 0:e.prevLead:void 0}getStack(){const{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote({needsReset:e,transition:t,preserveFollowOpacity:n}={}){const r=this.getStack();r&&r.promote(this,n),e&&(this.projectionDelta=void 0,this.needsReset=!0),t&&this.setOptions({transition:t})}relegate(){const e=this.getStack();return!!e&&e.relegate(this)}resetSkewAndRotation(){const{visualElement:e}=this.options;if(!e)return;let t=!1;const{latestValues:n}=e;if((n.z||n.rotate||n.rotateX||n.rotateY||n.rotateZ||n.skewX||n.skewY)&&(t=!0),!t)return;const r={};n.z&&_s("z",e,r,this.animationValues);for(let t=0;t<Fs.length;t++)_s(`rotate${Fs[t]}`,e,r,this.animationValues),_s(`skew${Fs[t]}`,e,r,this.animationValues);e.render();for(const t in r)e.setStaticValue(t,r[t]),this.animationValues&&(this.animationValues[t]=r[t]);e.scheduleRender()}getProjectionStyles(e){var t,n;if(!this.instance||this.isSVG)return;if(!this.isVisible)return Bs;const r={visibility:""},o=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,r.opacity="",r.pointerEvents=ds(null==e?void 0:e.pointerEvents)||"",r.transform=o?o(this.latestValues,""):"none",r;const i=this.getLead();if(!this.projectionDelta||!this.layout||!i.target){const t={};return this.options.layoutId&&(t.opacity=void 0!==this.latestValues.opacity?this.latestValues.opacity:1,t.pointerEvents=ds(null==e?void 0:e.pointerEvents)||""),this.hasProjected&&!Li(this.latestValues)&&(t.transform=o?o({},""):"none",this.hasProjected=!1),t}const s=i.animationValues||i.latestValues;this.applyTransformsToTarget(),r.transform=function(e,t,n){let r="";const o=e.x.translate/t.x,i=e.y.translate/t.y,s=(null==n?void 0:n.z)||0;if((o||i||s)&&(r=`translate3d(${o}px, ${i}px, ${s}px) `),1===t.x&&1===t.y||(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:e,rotate:t,rotateX:o,rotateY:i,skewX:s,skewY:a}=n;e&&(r=`perspective(${e}px) ${r}`),t&&(r+=`rotate(${t}deg) `),o&&(r+=`rotateX(${o}deg) `),i&&(r+=`rotateY(${i}deg) `),s&&(r+=`skewX(${s}deg) `),a&&(r+=`skewY(${a}deg) `)}const a=e.x.scale*t.x,l=e.y.scale*t.y;return 1===a&&1===l||(r+=`scale(${a}, ${l})`),r||"none"}(this.projectionDeltaWithTransform,this.treeScale,s),o&&(r.transform=o(s,r.transform));const{x:a,y:l}=this.projectionDelta;r.transformOrigin=`${100*a.origin}% ${100*l.origin}% 0`,i.animationValues?r.opacity=i===this?null!==(n=null!==(t=s.opacity)&&void 0!==t?t:this.latestValues.opacity)&&void 0!==n?n:1:this.preserveOpacity?this.latestValues.opacity:s.opacityExit:r.opacity=i===this?void 0!==s.opacity?s.opacity:"":void 0!==s.opacityExit?s.opacityExit:0;for(const e in rs){if(void 0===s[e])continue;const{correct:t,applyTo:n}=rs[e],o="none"===r.transform?s[e]:t(s[e],i);if(n){const e=n.length;for(let t=0;t<e;t++)r[n[t]]=o}else r[e]=o}return this.options.layoutId&&(r.pointerEvents=i===this?ds(null==e?void 0:e.pointerEvents)||"":"none"),r}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach((e=>{var t;return null===(t=e.currentAnimation)||void 0===t?void 0:t.stop()})),this.root.nodes.forEach(Gs),this.root.sharedNodes.clear()}}}function $s(e){e.updateLayout()}function Hs(e){var t;const n=(null===(t=e.resumeFrom)||void 0===t?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:t,measuredBox:r}=e.layout,{animationType:o}=e.options,i=n.source!==e.layout.source;"size"===o?Mi((e=>{const r=i?n.measuredBox[e]:n.layoutBox[e],o=vi(r);r.min=t[e].min,r.max=r.min+o})):ua(o,n.layoutBox,t)&&Mi((r=>{const o=i?n.measuredBox[r]:n.layoutBox[r],s=vi(t[r]);o.max=o.min+s,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[r].max=e.relativeTarget[r].min+s)}));const s=Ri();bi(s,t,n.layoutBox);const a=Ri();i?bi(a,e.applyTransform(r,!0),n.measuredBox):bi(a,t,n.layoutBox);const l=!As(s);let c=!1;if(!e.resumeFrom){const r=e.getClosestProjectingParent();if(r&&!r.resumeFrom){const{snapshot:o,layout:i}=r;if(o&&i){const s=Ai();Ei(s,n.layoutBox,o.layoutBox);const a=Ai();Ei(a,t,i.layoutBox),Ds(s,a)||(c=!0),r.options.layoutRoot&&(e.relativeTarget=a,e.relativeTargetOrigin=s,e.relativeParent=r)}}}e.notifyListeners("didUpdate",{layout:t,snapshot:n,delta:a,layoutDelta:s,hasLayoutChanged:l,hasRelativeTargetChanged:c})}else if(e.isLead()){const{onExitComplete:t}=e.options;t&&t()}e.options.transition=void 0}function Ks(e){Is&&Os.totalNodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=Boolean(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function Ys(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function Xs(e){e.clearSnapshot()}function Gs(e){e.clearMeasurements()}function qs(e){e.isLayoutDirty=!1}function Zs(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Js(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function Qs(e){e.resolveTargetDelta()}function ea(e){e.calcProjection()}function ta(e){e.resetSkewAndRotation()}function na(e){e.removeLeadSnapshot()}function ra(e,t,n){e.translate=Xr(t.translate,0,n),e.scale=Xr(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function oa(e,t,n,r){e.min=Xr(t.min,n.min,r),e.max=Xr(t.max,n.max,r)}function ia(e){return e.animationValues&&void 0!==e.animationValues.opacityExit}const sa={duration:.45,ease:[.4,0,.1,1]},aa=e=>"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),la=aa("applewebkit/")&&!aa("chrome/")?Math.round:Ft;function ca(e){e.min=la(e.min),e.max=la(e.max)}function ua(e,t,n){return"position"===e||"preserve-aspect"===e&&(r=Ns(t),o=Ns(n),.2,!(Math.abs(r-o)<=.2));var r,o}function da(e){var t;return e!==e.root&&(null===(t=e.scroll)||void 0===t?void 0:t.wasRoot)}const ha=Ws({attachResizeListener:(e,t)=>ti(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),pa={current:void 0},ma=Ws({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!pa.current){const e=new ha({});e.mount(window),e.setOptions({layoutScroll:!0}),pa.current=e}return pa.current},resetTransform:(e,t)=>{e.style.transform=void 0!==t?t:"none"},checkIsScrollRoot:e=>Boolean("fixed"===window.getComputedStyle(e).position)}),fa={pan:{Feature:class extends Jo{constructor(){super(...arguments),this.removePointerDownListener=Ft}onPointerDown(e){this.session=new ii(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Yi(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:Zi(e),onStart:Zi(t),onMove:n,onEnd:(e,t)=>{delete this.session,r&&Kt.postRender((()=>r(e,t)))}}}mount(){this.removePointerDownListener=ri(this.node.current,"pointerdown",(e=>this.onPointerDown(e)))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}},drag:{Feature:class extends Jo{constructor(e){super(e),this.removeGroupControls=Ft,this.removeListeners=Ft,this.controls=new Gi(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Ft}unmount(){this.removeGroupControls(),this.removeListeners()}},ProjectionNode:ma,MeasureLayout:as}};function ga(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover","Start"===n);const o=r["onHover"+n];o&&Kt.postRender((()=>o(t,ni(t))))}function va(e,t,n){const{props:r}=e;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap","Start"===n);const o=r["onTap"+("End"===n?"":n)];o&&Kt.postRender((()=>o(t,ni(t))))}const ya=new WeakMap,ba=new WeakMap,xa=e=>{const t=ya.get(e.target);t&&t(e)},wa=e=>{e.forEach(xa)};const Ea={some:0,all:1},ka={inView:{Feature:class extends Jo{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:t,margin:n,amount:r="some",once:o}=e,i={root:t?t.current:void 0,rootMargin:n,threshold:"number"==typeof r?r:Ea[r]};return function(e,t,n){const r=function({root:e,...t}){const n=e||document;ba.has(n)||ba.set(n,{});const r=ba.get(n),o=JSON.stringify(t);return r[o]||(r[o]=new IntersectionObserver(wa,{root:e,...t})),r[o]}(t);return ya.set(e,n),r.observe(e),()=>{ya.delete(e),r.unobserve(e)}}(this.node.current,i,(e=>{const{isIntersecting:t}=e;if(this.isInView===t)return;if(this.isInView=t,o&&!t&&this.hasEnteredView)return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",t);const{onViewportEnter:n,onViewportLeave:r}=this.node.getProps(),i=t?n:r;i&&i(e)}))}mount(){this.startObserver()}update(){if("undefined"==typeof IntersectionObserver)return;const{props:e,prevProps:t}=this.node;["amount","margin","root"].some(function({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}(e,t))&&this.startObserver()}unmount(){}}},tap:{Feature:class extends Jo{mount(){const{current:e}=this.node;e&&(this.unmount=function(e,t,n={}){const[r,o,i]=Ct(e,n),s=e=>{const r=e.currentTarget;if(!Vt(e)||Dt.has(r))return;Dt.add(r);const i=t(e),s=(e,t)=>{window.removeEventListener("pointerup",a),window.removeEventListener("pointercancel",l),Vt(e)&&Dt.has(r)&&(Dt.delete(r),"function"==typeof i&&i(e,{success:t}))},a=e=>{s(e,n.useGlobalTarget||At(r,e.target))},l=e=>{s(e,!1)};window.addEventListener("pointerup",a,o),window.addEventListener("pointercancel",l,o)};return r.forEach((e=>{(function(e){return jt.has(e.tagName)||-1!==e.tabIndex})(e)||null!==e.getAttribute("tabindex")||(e.tabIndex=0),(n.useGlobalTarget?window:e).addEventListener("pointerdown",s,o),e.addEventListener("focus",(e=>((e,t)=>{const n=e.currentTarget;if(!n)return;const r=Nt((()=>{if(Dt.has(n))return;Lt(n,"down");const e=Nt((()=>{Lt(n,"up")}));n.addEventListener("keyup",e,t),n.addEventListener("blur",(()=>Lt(n,"cancel")),t)}));n.addEventListener("keydown",r,t),n.addEventListener("blur",(()=>n.removeEventListener("keydown",r)),t)})(e,o)),o)})),i}(e,(e=>(va(this.node,e,"Start"),(e,{success:t})=>va(this.node,e,t?"End":"Cancel"))),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}},focus:{Feature:class extends Jo{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch(t){e=!0}e&&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=no(ti(this.node.current,"focus",(()=>this.onFocus())),ti(this.node.current,"blur",(()=>this.onBlur())))}unmount(){}}},hover:{Feature:class extends Jo{mount(){const{current:e}=this.node;e&&(this.unmount=function(e,t,n={}){const[r,o,i]=Ct(e,n),s=Rt((e=>{const{target:n}=e,r=t(e);if("function"!=typeof r||!n)return;const i=Rt((e=>{r(e),n.removeEventListener("pointerleave",i)}));n.addEventListener("pointerleave",i,o)}));return r.forEach((e=>{e.addEventListener("pointerenter",s,o)})),i}(e,(e=>(ga(this.node,e,"Start"),e=>ga(this.node,e,"End")))))}unmount(){}}}},Sa={layout:{ProjectionNode:ma,MeasureLayout:as}},Ta=(0,r.createContext)({strict:!1}),Pa=(0,r.createContext)({});function Ca(e){return Ze(e.animate)||it.some((t=>et(e[t])))}function Ra(e){return Boolean(Ca(e)||e.variants)}function Aa(e){return Array.isArray(e)?e.join(" "):e}const Ma={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"]},ja={};for(const e in Ma)ja[e]={isEnabled:t=>Ma[e].some((e=>!!t[e]))};const Da=Symbol.for("motionComponentSymbol");function Na(e,t,n){return(0,r.useCallback)((r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&("function"==typeof n?n(r):hi(n)&&(n.current=r))}),[t])}function La(e,t,n,o,i){var s,a;const{visualElement:l}=(0,r.useContext)(Pa),c=(0,r.useContext)(Ta),u=(0,r.useContext)(Fe),d=(0,r.useContext)(Be).reducedMotion,h=(0,r.useRef)(null);o=o||c.renderer,!h.current&&o&&(h.current=o(e,{visualState:t,parent:l,props:n,presenceContext:u,blockInitialAnimation:!!u&&!1===u.initial,reducedMotionConfig:d}));const p=h.current,m=(0,r.useContext)(Ji);!p||p.projection||!i||"html"!==p.type&&"svg"!==p.type||function(e,t,n,r){const{layoutId:o,layout:i,drag:s,dragConstraints:a,layoutScroll:l,layoutRoot:c}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Va(e.parent)),e.projection.setOptions({layoutId:o,layout:i,alwaysMeasureLayout:Boolean(s)||a&&hi(a),visualElement:e,animationType:"string"==typeof i?i:"both",initialPromotionConfig:r,layoutScroll:l,layoutRoot:c})}(h.current,n,i,m);const f=(0,r.useRef)(!1);(0,r.useInsertionEffect)((()=>{p&&f.current&&p.update(n,u)}));const g=n[dn],v=(0,r.useRef)(Boolean(g)&&!(null===(s=window.MotionHandoffIsComplete)||void 0===s?void 0:s.call(window,g))&&(null===(a=window.MotionHasOptimisedAnimation)||void 0===a?void 0:a.call(window,g)));return Xe((()=>{p&&(f.current=!0,window.MotionIsMounted=!0,p.updateFeatures(),os.render(p.render),v.current&&p.animationState&&p.animationState.animateChanges())})),(0,r.useEffect)((()=>{p&&(!v.current&&p.animationState&&p.animationState.animateChanges(),v.current&&(queueMicrotask((()=>{var e;null===(e=window.MotionHandoffMarkAsComplete)||void 0===e||e.call(window,g)})),v.current=!1))})),p}function Va(e){if(e)return!1!==e.options.allowProjection?e.projection:Va(e.parent)}function Oa({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:o,Component:i}){var a,l;function c(e,a){let l;const c={...(0,r.useContext)(Be),...e,layoutId:Ia(e)},{isStatic:u}=c,d=function(e){const{initial:t,animate:n}=function(e,t){if(Ca(e)){const{initial:t,animate:n}=e;return{initial:!1===t||et(t)?t:void 0,animate:et(n)?n:void 0}}return!1!==e.inherit?t:{}}(e,(0,r.useContext)(Pa));return(0,r.useMemo)((()=>({initial:t,animate:n})),[Aa(t),Aa(n)])}(e),h=o(e,u);if(!u&&Ye){(0,r.useContext)(Ta).strict;const e=function(e){const{drag:t,layout:n}=ja;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:(null==t?void 0:t.isEnabled(e))||(null==n?void 0:n.isEnabled(e))?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}(c);l=e.MeasureLayout,d.visualElement=La(i,h,c,t,e.ProjectionNode)}return(0,s.jsxs)(Pa.Provider,{value:d,children:[l&&d.visualElement?(0,s.jsx)(l,{visualElement:d.visualElement,...c}):null,n(i,e,Na(h,d.visualElement,a),h,u,d.visualElement)]})}e&&function(e){for(const t in e)ja[t]={...ja[t],...e[t]}}(e),c.displayName=`motion.${"string"==typeof i?i:`create(${null!==(l=null!==(a=i.displayName)&&void 0!==a?a:i.name)&&void 0!==l?l:""})`}`;const u=(0,r.forwardRef)(c);return u[Da]=i,u}function Ia({layoutId:e}){const t=(0,r.useContext)(Oe).id;return t&&void 0!==e?t+"-"+e:e}const Fa=["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 Ba(e){return"string"==typeof e&&!e.includes("-")&&!!(Fa.indexOf(e)>-1||/[A-Z]/u.test(e))}const za=e=>(t,n)=>{const o=(0,r.useContext)(Pa),i=(0,r.useContext)(Fe),s=()=>function({scrapeMotionValuesFromProps:e,createRenderState:t,onUpdate:n},r,o,i){const s={latestValues:_a(r,o,i,e),renderState:t()};return n&&(s.onMount=e=>n({props:r,current:e,...s}),s.onUpdate=e=>n(e)),s}(e,t,o,i);return n?s():Ie(s)};function _a(e,t,n,r){const o={},i=r(e,{});for(const e in i)o[e]=ds(i[e]);let{initial:s,animate:a}=e;const l=Ca(e),c=Ra(e);t&&c&&!l&&!1!==e.inherit&&(void 0===s&&(s=t.initial),void 0===a&&(a=t.animate));let u=!!n&&!1===n.initial;u=u||!1===s;const d=u?a:s;if(d&&"boolean"!=typeof d&&!Ze(d)){const t=Array.isArray(d)?d:[d];for(let n=0;n<t.length;n++){const r=nt(e,t[n]);if(r){const{transitionEnd:e,transition:t,...n}=r;for(const e in n){let t=n[e];Array.isArray(t)&&(t=t[u?t.length-1:0]),null!==t&&(o[e]=t)}for(const t in e)o[t]=e[t]}}}return o}const Ua=(e,t)=>t&&"number"==typeof e?t.transform(e):e,Wa={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},$a=Bt.length;function Ha(e,t,n){const{style:r,vars:o,transformOrigin:i}=e;let s=!1,a=!1;for(const e in t){const n=t[e];if(zt.has(e))s=!0;else if(Nr(e))o[e]=n;else{const t=Ua(n,hr[e]);e.startsWith("origin")?(a=!0,i[e]=t):r[e]=t}}if(t.transform||(s||n?r.transform=function(e,t,n){let r="",o=!0;for(let i=0;i<$a;i++){const s=Bt[i],a=e[s];if(void 0===a)continue;let l=!0;if(l="number"==typeof a?a===(s.startsWith("scale")?1:0):0===parseFloat(a),!l||n){const e=Ua(a,hr[s]);l||(o=!1,r+=`${Wa[s]||s}(${e}) `),n&&(t[s]=e)}}return r=r.trim(),n?r=n(t,o?"":r):o&&(r="none"),r}(t,e.transform,n):r.transform&&(r.transform="none")),a){const{originX:e="50%",originY:t="50%",originZ:n=0}=i;r.transformOrigin=`${e} ${t} ${n}`}}const Ka={offset:"stroke-dashoffset",array:"stroke-dasharray"},Ya={offset:"strokeDashoffset",array:"strokeDasharray"};function Xa(e,t,n){return"string"==typeof e?e:zn.transform(t+n*e)}function Ga(e,{attrX:t,attrY:n,attrScale:r,originX:o,originY:i,pathLength:s,pathSpacing:a=1,pathOffset:l=0,...c},u,d){if(Ha(e,c,d),u)return void(e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox));e.attrs=e.style,e.style={};const{attrs:h,style:p,dimensions:m}=e;h.transform&&(m&&(p.transform=h.transform),delete h.transform),m&&(void 0!==o||void 0!==i||p.transform)&&(p.transformOrigin=function(e,t,n){return`${Xa(t,e.x,e.width)} ${Xa(n,e.y,e.height)}`}(m,void 0!==o?o:.5,void 0!==i?i:.5)),void 0!==t&&(h.x=t),void 0!==n&&(h.y=n),void 0!==r&&(h.scale=r),void 0!==s&&function(e,t,n=1,r=0,o=!0){e.pathLength=1;const i=o?Ka:Ya;e[i.offset]=zn.transform(-r);const s=zn.transform(t),a=zn.transform(n);e[i.array]=`${s} ${a}`}(h,s,a,l,!1)}const qa=()=>({style:{},transform:{},transformOrigin:{},vars:{}}),Za=()=>({...qa(),attrs:{}}),Ja=e=>"string"==typeof e&&"svg"===e.toLowerCase();function Qa(e,{style:t,vars:n},r,o){Object.assign(e.style,t,o&&o.getProjectionStyles(r));for(const t in n)e.style.setProperty(t,n[t])}const el=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 tl(e,t,n,r){Qa(e,t,void 0,r);for(const n in t.attrs)e.setAttribute(el.has(n)?n:un(n),t.attrs[n])}function nl(e,{layout:t,layoutId:n}){return zt.has(e)||e.startsWith("origin")||(t||void 0!==n)&&(!!rs[e]||"opacity"===e)}function rl(e,t,n){var r;const{style:o}=e,i={};for(const s in o)(ln(o[s])||t.style&&ln(t.style[s])||nl(s,e)||void 0!==(null===(r=null==n?void 0:n.getValue(s))||void 0===r?void 0:r.liveStyle))&&(i[s]=o[s]);return i}function ol(e,t,n){const r=rl(e,t,n);for(const n in e)(ln(e[n])||ln(t[n]))&&(r[-1!==Bt.indexOf(n)?"attr"+n.charAt(0).toUpperCase()+n.substring(1):n]=e[n]);return r}const il=["x","y","width","height","cx","cy","r"],sl={useVisualState:za({scrapeMotionValuesFromProps:ol,createRenderState:Za,onUpdate:({props:e,prevProps:t,current:n,renderState:r,latestValues:o})=>{if(!n)return;let i=!!e.drag;if(!i)for(const e in o)if(zt.has(e)){i=!0;break}if(!i)return;let s=!t;if(t)for(let n=0;n<il.length;n++){const r=il[n];e[r]!==t[r]&&(s=!0)}s&&Kt.read((()=>{!function(e,t){try{t.dimensions="function"==typeof e.getBBox?e.getBBox():e.getBoundingClientRect()}catch(e){t.dimensions={x:0,y:0,width:0,height:0}}}(n,r),Kt.render((()=>{Ga(r,o,Ja(n.tagName),e.transformTemplate),tl(n,r)}))}))}})},al={useVisualState:za({scrapeMotionValuesFromProps:rl,createRenderState:qa})};function ll(e,t,n){for(const r in t)ln(t[r])||nl(r,n)||(e[r]=t[r])}function cl(e,t){const n={},o=function(e,t){const n={};return ll(n,e.style||{},e),Object.assign(n,function({transformTemplate:e},t){return(0,r.useMemo)((()=>{const n=qa();return Ha(n,t,e),Object.assign({},n.vars,n.style)}),[t])}(e,t)),n}(e,t);return e.drag&&!1!==e.dragListener&&(n.draggable=!1,o.userSelect=o.WebkitUserSelect=o.WebkitTouchCallout="none",o.touchAction=!0===e.drag?"none":"pan-"+("x"===e.drag?"y":"x")),void 0===e.tabIndex&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=o,n}const ul=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 dl(e){return e.startsWith("while")||e.startsWith("drag")&&"draggable"!==e||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||ul.has(e)}let hl=e=>!dl(e);try{(pl=require("@emotion/is-prop-valid").default)&&(hl=e=>e.startsWith("on")?!dl(e):pl(e))}catch(e){}var pl;function ml(e,t,n,o){const i=(0,r.useMemo)((()=>{const n=Za();return Ga(n,t,Ja(o),e.transformTemplate),{...n.attrs,style:{...n.style}}}),[t]);if(e.style){const t={};ll(t,e.style,e),i.style={...t,...i.style}}return i}function fl(e=!1){return(t,n,o,{latestValues:i},s)=>{const a=(Ba(t)?ml:cl)(n,i,s,t),l=function(e,t,n){const r={};for(const o in e)"values"===o&&"object"==typeof e.values||(hl(o)||!0===n&&dl(o)||!t&&!dl(o)||e.draggable&&o.startsWith("onDrag"))&&(r[o]=e[o]);return r}(n,"string"==typeof t,e),c=t!==r.Fragment?{...l,...a,ref:o}:{},{children:u}=n,d=(0,r.useMemo)((()=>ln(u)?u.get():u),[u]);return(0,r.createElement)(t,{...c,children:d})}}function gl(e,t){return function(n,{forwardMotionProps:r}={forwardMotionProps:!1}){return Oa({...Ba(n)?sl:al,preloadedFeatures:e,useRender:fl(r),createVisualElement:t,Component:n})}}const vl={current:null},yl={current:!1},bl=[...zr,Kn,or],xl=new WeakMap,wl=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class El{scrapeMotionValuesFromProps(e,t,n){return{}}constructor({parent:e,props:t,presenceContext:n,reducedMotionConfig:r,blockInitialAnimation:o,visualState:i},s={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Rr,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 e=Jt.now();this.renderScheduledAt<e&&(this.renderScheduledAt=e,Kt.render(this.render,!1,!0))};const{latestValues:a,renderState:l,onUpdate:c}=i;this.onUpdate=c,this.latestValues=a,this.baseTarget={...a},this.initialValues=t.initial?{...a}:{},this.renderState=l,this.parent=e,this.props=t,this.presenceContext=n,this.depth=e?e.depth+1:0,this.reducedMotionConfig=r,this.options=s,this.blockInitialAnimation=Boolean(o),this.isControllingVariants=Ca(t),this.isVariantNode=Ra(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(e&&e.current);const{willChange:u,...d}=this.scrapeMotionValuesFromProps(t,{},this);for(const e in d){const t=d[e];void 0!==a[e]&&ln(t)&&t.set(a[e],!1)}}mount(e){this.current=e,xl.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach(((e,t)=>this.bindToMotionValue(t,e))),yl.current||function(){if(yl.current=!0,Ye)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>vl.current=e.matches;e.addListener(t),t()}else vl.current=!1}(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||vl.current),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){xl.delete(this.current),this.projection&&this.projection.unmount(),Yt(this.notifyUpdate),Yt(this.render),this.valueSubscriptions.forEach((e=>e())),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const e in this.events)this.events[e].clear();for(const e in this.features){const t=this.features[e];t&&(t.unmount(),t.isMounted=!1)}this.current=null}bindToMotionValue(e,t){this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)();const n=zt.has(e),r=t.on("change",(t=>{this.latestValues[e]=t,this.props.onUpdate&&Kt.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0)})),o=t.on("renderRequest",this.scheduleRender);let i;window.MotionCheckAppearSync&&(i=window.MotionCheckAppearSync(this,e,t)),this.valueSubscriptions.set(e,(()=>{r(),o(),i&&i(),t.owner&&t.stop()}))}sortNodePosition(e){return this.current&&this.sortInstanceNodePosition&&this.type===e.type?this.sortInstanceNodePosition(this.current,e.current):0}updateFeatures(){let e="animation";for(e in ja){const t=ja[e];if(!t)continue;const{isEnabled:n,Feature:r}=t;if(!this.features[e]&&r&&n(this.props)&&(this.features[e]=new r(this)),this.features[e]){const t=this.features[e];t.isMounted?t.update():(t.mount(),t.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Ai()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let t=0;t<wl.length;t++){const n=wl[t];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);const r=e["on"+n];r&&(this.propEventSubscriptions[n]=this.on(n,r))}this.prevMotionValues=function(e,t,n){for(const r in t){const o=t[r],i=n[r];if(ln(o))e.addValue(r,o);else if(ln(i))e.addValue(r,sn(o,{owner:e}));else if(i!==o)if(e.hasValue(r)){const t=e.getValue(r);!0===t.liveStyle?t.jump(o):t.hasAnimated||t.set(o)}else{const t=e.getStaticValue(r);e.addValue(r,sn(void 0!==t?t:o,{owner:e}))}}for(const r in n)void 0===t[r]&&e.removeValue(r);return t}(this,this.scrapeMotionValuesFromProps(e,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue(),this.onUpdate&&this.onUpdate(this)}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]: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(e){const t=this.getClosestVariantNode();if(t)return t.variantChildren&&t.variantChildren.add(e),()=>t.variantChildren.delete(e)}addValue(e,t){const n=this.values.get(e);t!==n&&(n&&this.removeValue(e),this.bindToMotionValue(e,t),this.values.set(e,t),this.latestValues[e]=t.get())}removeValue(e){this.values.delete(e);const t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let n=this.values.get(e);return void 0===n&&void 0!==t&&(n=sn(null===t?void 0:t,{owner:this}),this.addValue(e,n)),n}readValue(e,t){var n;let r=void 0===this.latestValues[e]&&this.current?null!==(n=this.getBaseTargetFromProps(this.props,e))&&void 0!==n?n:this.readValueFromInstance(this.current,e,this.options):this.latestValues[e];return null!=r&&("string"==typeof r&&(jr(r)||Sn(r))?r=parseFloat(r):(o=r,!bl.find(Br(o))&&or.test(t)&&(r=fr(e,t))),this.setBaseTarget(e,ln(r)?r.get():r)),ln(r)?r.get():r;var o}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){var t;const{initial:n}=this.props;let r;if("string"==typeof n||"object"==typeof n){const o=nt(this.props,n,null===(t=this.presenceContext)||void 0===t?void 0:t.custom);o&&(r=o[e])}if(n&&void 0!==r)return r;const o=this.getBaseTargetFromProps(this.props,e);return void 0===o||ln(o)?void 0!==this.initialValues[e]&&void 0===r?void 0:this.baseTarget[e]:o}on(e,t){return this.events[e]||(this.events[e]=new tn),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}}class kl extends El{constructor(){super(...arguments),this.KeyframeResolver=Ur}sortInstanceNodePosition(e,t){return 2&e.compareDocumentPosition(t)?1:-1}getBaseTargetFromProps(e,t){return e.style?e.style[t]:void 0}removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;ln(e)&&(this.childSubscription=e.on("change",(e=>{this.current&&(this.current.textContent=`${e}`)})))}}class Sl extends kl{constructor(){super(...arguments),this.type="html",this.renderInstance=Qa}readValueFromInstance(e,t){if(zt.has(t)){const e=mr(t);return e&&e.default||0}{const r=(n=e,window.getComputedStyle(n)),o=(Nr(t)?r.getPropertyValue(t):r[t])||0;return"string"==typeof o?o.trim():o}var n}measureInstanceViewportBox(e,{transformPagePoint:t}){return Ki(e,t)}build(e,t,n){Ha(e,t,n.transformTemplate)}scrapeMotionValuesFromProps(e,t,n){return rl(e,t,n)}}class Tl extends kl{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Ai}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(zt.has(t)){const e=mr(t);return e&&e.default||0}return t=el.has(t)?t:un(t),e.getAttribute(t)}scrapeMotionValuesFromProps(e,t,n){return ol(e,t,n)}build(e,t,n){Ga(e,t,this.isSVGTag,n.transformTemplate)}renderInstance(e,t,n,r){tl(e,t,0,r)}mount(e){this.isSVGTag=Ja(e.tagName),super.mount(e)}}const Pl=qe(gl({...ei,...ka,...fa,...Sa},((e,t)=>Ba(e)?new Tl(t):new Sl(t,{allowProjection:e!==r.Fragment}))));let Cl=!1;const Rl=({toastItem:e,title:t="",content:n="",autoDismiss:o=!0,dismissAfter:i=5e3,theme:a="light",design:l="stack",icon:c,variant:u="neutral",removeToast:d})=>{const h=(0,r.useRef)(0),p=(0,r.useRef)(0),m=(0,r.useRef)(),f=(e,t=i)=>{if(o&&!(i<0))return h.current=(new Date).getTime(),setTimeout((()=>{"function"==typeof d&&d(e.id)}),t)};(0,r.useEffect)((()=>{const t=i;return m.current=f(e,t),()=>{clearTimeout(m.current)}}),[]),(0,r.useEffect)((()=>{!e?.dismiss||"function"!=typeof d||d(e.id)}),[e]);const g=()=>{"function"==typeof d&&e?.action?.onClick?.((()=>d(e.id)))};let v=null;return"stack"===l&&(v=(0,s.jsx)("div",{className:ne("flex items-center justify-start p-4 gap-2 relative border border-solid rounded-md shadow-lg","dark"===a?Ne:De?.[u],"w-[22.5rem]"),onMouseEnter:()=>{clearTimeout(m.current),p.current=(new Date).getTime()},onMouseLeave:()=>{m.current=f(e,i-(p.current-h.current))},children:"custom"!==e.type?(0,s.jsxs)(s.Fragment,{children:[(0,s.jsx)("div",{className:"self-start flex items-center justify-center [&_svg]:size-5 shrink-0",children:Pe({variant:u,icon:c,theme:a})}),(0,s.jsxs)("div",{className:"flex flex-col items-start justify-start gap-0.5 mr-6",children:[Re({title:t,theme:a}),Ae({content:n,theme:a}),e?.action?.label&&"function"==typeof e?.action?.onClick&&(0,s.jsx)("div",{className:"mt-2.5",children:Ce({actionLabel:e?.action?.label,actionType:e?.action?.type??"button",onAction:g,theme:a})})]}),(0,s.jsx)("div",{className:"absolute right-4 top-4 [&_svg]:size-5",children:(0,s.jsx)("button",{className:ne("bg-transparent m-0 p-0 border-none focus:outline-none active:outline-none cursor-pointer",Le[a]??Le.light),onClick:()=>{"function"==typeof d&&d(e.id)},children:(0,s.jsx)(fe,{})})})]}):e?.jsx?.({close:()=>d(e.id),action:e?.action?{...e?.action,onClick:g}:null})})),"inline"===l&&(v=(0,s.jsxs)("div",{className:ne("flex items-center justify-start p-3 gap-2 relative border border-solid rounded-md shadow-lg","dark"===a?Ne:De?.[u],"lg:w-[47.5rem] w-full"),children:[(0,s.jsx)("div",{className:"self-start flex items-center justify-center [&_svg]:size-5 shrink-0",children:Pe({variant:u,icon:c,theme:a})}),(0,s.jsxs)("div",{className:"flex items-start justify-start gap-1 mr-10 [&>span:first-child]:shrink-0",children:[Re({title:t,theme:a}),Ae({content:n,theme:a})]}),(0,s.jsx)("div",{className:"absolute right-3 top-3 [&_svg]:size-5",children:(0,s.jsx)("button",{className:ne("bg-transparent m-0 p-0 border-none focus:outline-none active:outline-none cursor-pointer",Le[a]??Le.light),onClick:()=>d(e.id),children:(0,s.jsx)(fe,{})})})]})),v},Al=(Ml=({position:e="top-right",design:t="stack",theme:n="light",className:o="",autoDismiss:i=!0,dismissAfter:a=5e3})=>{const[l,c]=(0,r.useState)([]);(0,r.useEffect)((()=>{ve.subscribe((e=>{e?.dismiss?c((t=>t.map((t=>t.id===e.id?{...t,dismiss:!0}:t)))):setTimeout((()=>{(0,Ve.flushSync)((()=>c((t=>-1!==t.findIndex((t=>t.id===e.id))?t.map((t=>t.id===e.id?{...t,...e}:t)):[...t,e]))))}))}))}),[]);const u=e=>{c((t=>t.filter((t=>t.id!==e))))};return(0,s.jsx)("ul",{className:ne("fixed flex flex-col list-none z-20 p-10 pointer-events-none [&>li]:pointer-events-auto gap-3",je[e]??je["top-right"],o),children:(0,s.jsx)(Ge,{initial:!1,children:l.map((e=>(0,s.jsx)(Pl.li,{initial:{opacity:0,y:50,scale:.7},animate:{opacity:1,y:0,scale:1},exit:{opacity:0,scale:.6,transition:{duration:.15}},layoutId:`toast-${e.id}`,children:(0,s.jsx)(Rl,{toastItem:e,title:e.title,content:e?.description,icon:e?.icon??void 0,design:e?.design??t,autoDismiss:e?.autoDismiss??i,dismissAfter:e?.dismissAfter??a,removeToast:u,variant:e.type,theme:e?.theme??n})},e.id)))})})},(0,r.memo)((e=>{const t=e.singleTon;return Cl&&t?null:(Cl=!0,(0,s.jsx)(Ml,{...e}))})));var Ml;const jl=window.wp.apiFetch;var Dl=n.n(jl);const Nl=window.wp.i18n,Ll=async(e="yes")=>await Dl()({path:"getting-started/v1/dismiss-setup-wizard",method:"POST",data:{dismiss:e},headers:{"X-WP-Nonce":gettingStartedVars.rest_api_nonce}}),Vl=({children:e,gap:t="lg",className:n,...r})=>(0,s.jsx)("div",{className:ne("w-full box-border flex items-center justify-between bg-background-primary p-5 min-h-16",oe(t),n),...r,children:e});Vl.displayName="Topbar";const Ol=({gap:e="sm",children:t,className:n})=>(0,s.jsx)("div",{className:ne("flex items-center",oe(e),n),children:t});Ol.displayName="Topbar.Left";const Il=({gap:e="md",children:t,align:n="center",className:r})=>{const o={left:"justify-start",center:"justify-center",right:"justify-end"}[n];return(0,s.jsx)("div",{className:ne("flex items-center grow",oe(e),o,r),children:t})};Il.displayName="Topbar.Middle";const Fl=({gap:e="sm",children:t,className:n})=>(0,s.jsx)("div",{className:ne("flex items-center",oe(e),n),children:t});Fl.displayName="Topbar.Right";const Bl=({children:e,className:t})=>(0,s.jsx)("div",{className:ne("flex items-center [&>svg]:block h-full",t),children:e});Bl.displayName="Topbar.Item",Vl.Left=Ol,Vl.Middle=Il,Vl.Right=Fl,Vl.Item=Bl;const zl=e=>{const t=(e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,((e,t,n)=>n?n.toUpperCase():t.toLowerCase())))(e);return t.charAt(0).toUpperCase()+t.slice(1)},_l=(...e)=>e.filter(((e,t,n)=>Boolean(e)&&""!==e.trim()&&n.indexOf(e)===t)).join(" ").trim(),Ul=e=>{for(const t in e)if(t.startsWith("aria-")||"role"===t||"title"===t)return!0};var Wl={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"};const $l=(0,r.forwardRef)((({color:e="currentColor",size:t=24,strokeWidth:n=2,absoluteStrokeWidth:o,className:i="",children:s,iconNode:a,...l},c)=>(0,r.createElement)("svg",{ref:c,...Wl,width:t,height:t,stroke:e,strokeWidth:o?24*Number(n)/Number(t):n,className:_l("lucide",i),...!s&&!Ul(l)&&{"aria-hidden":"true"},...l},[...a.map((([e,t])=>(0,r.createElement)(e,t))),...Array.isArray(s)?s:[s]]))),Hl=(e,t)=>{const n=(0,r.forwardRef)((({className:n,...o},i)=>{return(0,r.createElement)($l,{ref:i,iconNode:t,className:_l(`lucide-${s=zl(e),s.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,`lucide-${e}`,n),...o});var s}));return n.displayName=zl(e),n},Kl=Hl("rocket",[["path",{d:"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09z",key:"m3kijz"}],["path",{d:"m12 15-3-3a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.35 22.35 0 0 1-4 2z",key:"1fmvmk"}],["path",{d:"M9 12H4s.55-3.03 2-4c1.62-1.08 5 0 5 0",key:"1f8sc4"}],["path",{d:"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5",key:"qeys4"}]]),Yl=Hl("x",[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]]),{icon:Xl,iconURL:Gl}=gettingStartedVars||{},ql=()=>(0,r.createElement)(Vl,{className:"sticky top-0 sm:top-[46px] md:top-[32px] p-0 bg-background-primary gap-0 min-h-12 sm:min-h-14 shadow-sm z-20"},(0,r.createElement)(Vl.Left,{className:"p-3 sm:p-4"},(0,r.createElement)(Vl.Item,{className:"w-5 h-5 sm:w-6 sm:h-6"},(0,r.createElement)("span",{className:"sr-only"},(0,Nl.__)("Finish Setup Icon","astra-sites")),Gl&&(0,r.createElement)("img",{src:Gl,alt:(0,Nl.__)("Finish Setup","astra-sites"),className:"w-5 h-5 sm:w-6 sm:h-6"}),!Gl&&Xl&&(0,r.createElement)("span",{className:"[&>svg]:w-5 [&>svg]:h-5 sm:[&>svg]:w-6 sm:[&>svg]:h-6",dangerouslySetInnerHTML:{__html:Xl}}),!Gl&&!Xl&&(0,r.createElement)(Kl,null))),(0,r.createElement)(Vl.Middle,{align:"left",className:"h-full"},(0,r.createElement)(Vl.Item,{className:"gap-3"},(0,r.createElement)(ue,{size:14,color:"primary",weight:500,className:"content-center no-underline relative h-full py-3 sm:py-4.5 px-1 m-0 bg-transparent outline-none shadow-none border-0 focus:outline-none cursor-pointer text-xs sm:text-sm"},(0,Nl.__)("Finish Setup","astra-sites"),(0,r.createElement)("span",{className:"absolute bottom-0 left-0 w-full h-px bg-gs-primary"})))),(0,r.createElement)(Vl.Right,{className:"p-3 sm:p-4"},(0,r.createElement)(Vl.Item,null,(0,r.createElement)(ke,{size:"xs",variant:"link",className:"w-full rounded-sm text-black hover:text-gray-800 hover:no-underline",onClick:()=>{Ll().then((e=>{e.success&&(window.location.href=gettingStartedVars.adminDashboardURL)})).catch((e=>{ye.error((0,Nl.__)("Setup dismissal failed!","astra-sites"),{description:e?.message||(0,Nl.__)("Failed to dismiss setup.","astra-sites")})}))},icon:(0,r.createElement)(Yl,null),iconPosition:"right"},(0,Nl.__)("Dismiss Setup","astra-sites"))))),Zl=me("ChevronDown",[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]]),Jl=me("Minus",[["path",{d:"M5 12h14",key:"1ays0h"}]]),Ql=me("Plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]),ec=({type:e="simple",defaultValue:t=[],autoClose:n=!1,disabled:o=!1,children:i,className:a})=>{const[l,c]=(0,r.useState)(Array.isArray(t)?t:[t]);return(0,s.jsx)("div",{className:ne("boxed"===e?"space-y-3":"",a),children:r.Children.map(i,(t=>r.isValidElement(t)&&"value"in t.props?r.cloneElement(t,{isOpen:l.includes(t.props.value),onToggle:()=>(e=>{c((t=>n?t.includes(e)?[]:[e]:t.includes(e)?t.filter((t=>t!==e)):[...t,e]))})(t.props.value),type:e,disabled:o||t.props.disabled}):t))})};ec.displayName="Accordion";const tc=({isOpen:e,onToggle:t,type:n="simple",disabled:o=!1,children:i,className:a})=>{const l={simple:"border-0",separator:"border-0 border-b border-solid border-border-subtle",boxed:"border border-solid border-border-subtle rounded-md"}[n];return(0,s.jsx)("div",{className:ne(l,a),children:r.Children.map(i,(i=>r.isValidElement(i)?r.cloneElement(i,{isOpen:e,onToggle:t,type:n,disabled:o}):i))})};tc.displayName="Accordion.Item";const nc=({onToggle:e,isOpen:t,iconType:n="arrow",disabled:r=!1,tag:o="h3",type:i="simple",children:a,className:l,...c})=>{const u={simple:"px-2 py-3",separator:"px-2 py-4",boxed:"px-3 py-4"}[i];return(0,s.jsx)(o,{className:"flex m-0 hover:bg-background-secondary transition duration-150 ease-in-out",children:(0,s.jsxs)("button",{className:ne("flex w-full items-center justify-between text-sm font-medium transition-all appearance-none bg-transparent border-0 cursor-pointer gap-3",u,r&&"cursor-not-allowed opacity-40",l),onClick:r?()=>{}:e,"aria-expanded":t,disabled:r,...c,children:[(0,s.jsx)("div",{className:"flex items-center gap-2 text-text-primary font-semibold text-left",children:a}),"arrow"===n?(0,s.jsx)(Zl,{className:ne("flex-shrink-0 text-icon-secondary size-5 transition-transform duration-300 ease-in-out",t?"rotate-180":"rotate-0")}):"plus-minus"===n?(0,s.jsx)(Pl.span,{initial:{opacity:0,rotate:t?-180:0},animate:{opacity:1,rotate:t?0:180},exit:{opacity:0},transition:{duration:.3,ease:"easeInOut"},className:"flex items-center flex-shrink-0 text-icon-secondary",children:t?(0,s.jsx)(Jl,{}):(0,s.jsx)(Ql,{})},t?"minus":"plus"):null]})})};nc.displayName="Accordion.Trigger";const rc=({isOpen:e,disabled:t=!1,type:n="simple",children:r,className:o})=>{const i={simple:"px-2 pb-3",separator:"px-2 pb-4",boxed:"px-3 pb-4"}[n];return(0,s.jsx)(Ge,{initial:!1,children:e&&(0,s.jsx)(Pl.div,{variants:{open:{height:"auto",opacity:1},closed:{height:0,opacity:0}},initial:"closed",animate:"open",exit:"closed",transition:{duration:.3,ease:"easeInOut"},className:ne("overflow-hidden text-text-secondary w-full text-sm transition-[height, opacity, transform] ease-in box-border",t&&"opacity-40",o),"aria-hidden":!e,children:(0,s.jsx)("div",{className:ne(i),children:r})},"content")})};rc.displayName="Accordion.Content";const oc=Object.assign(ec,{Item:tc,Trigger:nc,Content:rc}),ic=(0,r.forwardRef)((({label:e="",size:t="sm",className:n="",type:r="pill",variant:o="neutral",icon:i=null,disabled:a=!1,onClose:l=(()=>{}),closable:c=!1,onMouseDown:u=(()=>{}),disableHover:d=!1},h)=>{const p={neutral:"bg-badge-background-gray text-badge-color-gray border-badge-border-gray",red:"bg-badge-background-red text-badge-color-red border-badge-border-red",yellow:"bg-badge-background-yellow text-badge-color-yellow border-badge-border-yellow",green:"bg-badge-background-green text-badge-color-green border-badge-border-green",blue:"bg-badge-background-sky text-badge-color-sky border-badge-border-sky",inverse:"bg-background-inverse text-text-inverse border-background-inverse",disabled:"bg-badge-background-disabled text-badge-color-disabled border-badge-border-disabled disabled cursor-not-allowed"};let m="",f="group relative justify-center flex items-center cursor-pointer";const g={xxs:"[&>svg]:size-3",xs:"[&>svg]:size-3",sm:"[&>svg]:size-3",md:"[&>svg]:size-4",lg:"[&>svg]:size-5"};return a?(m=p.disabled,f+=" cursor-not-allowed disabled"):m=p[o],e?(0,s.jsxs)("span",{className:ne("font-medium border-badge-border-gray flex items-center justify-center border border-solid box-border max-w-full transition-colors duration-150 ease-in-out",{xxs:"py-0.5 px-0.5 text-xs h-4",xs:"py-0.5 px-1 text-xs h-5",sm:"py-1 px-1.5 text-xs h-6",md:"py-1 px-1.5 text-sm h-7",lg:"py-1 px-1.5 text-base h-8"}[t],{pill:"rounded-full",rounded:"rounded"}[r],"gap-0.5",m,!d&&{neutral:"hover:bg-badge-hover-gray",red:"hover:bg-badge-hover-red",yellow:"hover:bg-badge-hover-yellow",green:"hover:bg-badge-hover-green",blue:"hover:bg-badge-hover-sky",inverse:"hover:bg-badge-hover-inverse",disabled:"hover:bg-badge-hover-disabled"}[o],n),ref:h,children:[i?(0,s.jsx)("span",{className:ne("justify-center flex items-center",g[t]),children:i}):null,(0,s.jsx)("span",{className:"px-1 truncate inline-block",children:e}),c&&(0,s.jsxs)("span",{className:ne(f,g[t]),onMouseDown:u,role:"button",tabIndex:0,...!a&&{onClick:l},children:[(0,s.jsx)("span",{className:"sr-only",children:`Remove ${e}`}),(0,s.jsx)(fe,{}),(0,s.jsx)("span",{className:"absolute -inset-1"})]})]}):null}));ic.displayName="Badge";const sc=Hl("chevron-right",[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]]),ac=Hl("video",[["path",{d:"m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",key:"ftymec"}],["rect",{x:"2",y:"6",width:"14",height:"12",rx:"2",key:"158x01"}]]),lc=Hl("check",[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]]),cc=(...e)=>Q(te(e)),uc=({variant:e="rectangular",className:t,...n})=>{const r={circular:"rounded-full bg-gray-200 ",rectangular:"rounded-md bg-gray-200"}[e],o={circular:"size-10",rectangular:"w-96 h-3"}[e];return(0,s.jsx)("div",{className:ne(r,"animate-pulse",o,t),...n})},dc=()=>(0,r.createElement)(r.Fragment,null,(0,r.createElement)("div",{className:"border-0.5 border-solid border-border-subtle rounded-lg"},(0,r.createElement)(uc,{variant:"rectangular",className:"w-full h-14 rounded-b-none rounded-t-lg"}),(0,r.createElement)("div",{className:"px-4"},Array(4).fill(0).map(((e,t)=>(0,r.createElement)("div",{key:`step-skeleton-${t}`,className:cc("py-5 flex items-center gap-3",3===t?"":"border-b-0.5 border-solid border-border-subtle")},(0,r.createElement)(uc,{variant:"circular",className:"w-6 h-6"}),(0,r.createElement)("div",{className:"flex-1"},(0,r.createElement)(uc,{variant:"rectangular",className:"w-2/3 h-5"})),(0,r.createElement)(uc,{variant:"rectangular",className:"w-[104px] h-8"})))))),Array(4).fill(0).map(((e,t)=>(0,r.createElement)(uc,{key:`skeleton-${t}`,variant:"rectangular",className:"w-full h-14 rounded-lg"}))));function hc(){return"undefined"!=typeof window}function pc(e){return gc(e)?(e.nodeName||"").toLowerCase():"#document"}function mc(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function fc(e){var t;return null==(t=(gc(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function gc(e){return!!hc()&&(e instanceof Node||e instanceof mc(e).Node)}function vc(e){return!!hc()&&(e instanceof Element||e instanceof mc(e).Element)}function yc(e){return!!hc()&&(e instanceof HTMLElement||e instanceof mc(e).HTMLElement)}function bc(e){return!(!hc()||"undefined"==typeof ShadowRoot)&&(e instanceof ShadowRoot||e instanceof mc(e).ShadowRoot)}function xc(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Pc(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!["inline","contents"].includes(o)}function wc(e){return["table","td","th"].includes(pc(e))}function Ec(e){return[":popover-open",":modal"].some((t=>{try{return e.matches(t)}catch(e){return!1}}))}function kc(e){const t=Sc(),n=vc(e)?Pc(e):e;return["transform","translate","scale","rotate","perspective"].some((e=>!!n[e]&&"none"!==n[e]))||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||["transform","translate","scale","rotate","perspective","filter"].some((e=>(n.willChange||"").includes(e)))||["paint","layout","strict","content"].some((e=>(n.contain||"").includes(e)))}function Sc(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function Tc(e){return["html","body","#document"].includes(pc(e))}function Pc(e){return mc(e).getComputedStyle(e)}function Cc(e){return vc(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Rc(e){if("html"===pc(e))return e;const t=e.assignedSlot||e.parentNode||bc(e)&&e.host||fc(e);return bc(t)?t.host:t}function Ac(e){const t=Rc(e);return Tc(t)?e.ownerDocument?e.ownerDocument.body:e.body:yc(t)&&xc(t)?t:Ac(t)}function Mc(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);const o=Ac(e),i=o===(null==(r=e.ownerDocument)?void 0:r.body),s=mc(o);if(i){const e=function(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}(s);return t.concat(s,s.visualViewport||[],xc(o)?o:[],e&&n?Mc(e):[])}return t.concat(o,Mc(o,[],n))}function jc(e){let t=e.activeElement;for(;null!=(null==(n=t)||null==(n=n.shadowRoot)?void 0:n.activeElement);){var n;t=t.shadowRoot.activeElement}return t}function Dc(e,t){if(!e||!t)return!1;const n=null==t.getRootNode?void 0:t.getRootNode();if(e.contains(t))return!0;if(n&&bc(n)){let n=t;for(;n;){if(e===n)return!0;n=n.parentNode||n.host}}return!1}function Nc(){const e=navigator.userAgentData;return null!=e&&e.platform?e.platform:navigator.platform}function Lc(){const e=navigator.userAgentData;return e&&Array.isArray(e.brands)?e.brands.map((e=>{let{brand:t,version:n}=e;return t+"/"+n})).join(" "):navigator.userAgent}function Vc(){return/apple/i.test(navigator.vendor)}function Oc(){const e=/android/i;return e.test(Nc())||e.test(Lc())}function Ic(e,t){const n=["mouse","pen"];return t||n.push("",void 0),n.includes(e)}function Fc(e){return(null==e?void 0:e.ownerDocument)||document}function Bc(e,t){if(null==t)return!1;if("composedPath"in e)return e.composedPath().includes(t);const n=e;return null!=n.target&&t.contains(n.target)}function zc(e){return"composedPath"in e?e.composedPath()[0]:e.target}const _c="input:not([type='hidden']):not([disabled]),[contenteditable]:not([contenteditable='false']),textarea:not([disabled])";function Uc(e){return yc(e)&&e.matches(_c)}var Wc=["input:not([inert])","select:not([inert])","textarea:not([inert])","a[href]:not([inert])","button:not([inert])","[tabindex]:not(slot):not([inert])","audio[controls]:not([inert])","video[controls]:not([inert])",'[contenteditable]:not([contenteditable="false"]):not([inert])',"details>summary:first-of-type:not([inert])","details:not([inert])"].join(","),$c="undefined"==typeof Element,Hc=$c?function(){}:Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,Kc=!$c&&Element.prototype.getRootNode?function(e){var t;return null==e||null===(t=e.getRootNode)||void 0===t?void 0:t.call(e)}:function(e){return null==e?void 0:e.ownerDocument},Yc=function e(t,n){var r;void 0===n&&(n=!0);var o=null==t||null===(r=t.getAttribute)||void 0===r?void 0:r.call(t,"inert");return""===o||"true"===o||n&&t&&e(t.parentNode)},Xc=function e(t,n,r){for(var o=[],i=Array.from(t);i.length;){var s=i.shift();if(!Yc(s,!1))if("SLOT"===s.tagName){var a=s.assignedElements(),l=e(a.length?a:s.children,!0,r);r.flatten?o.push.apply(o,l):o.push({scopeParent:s,candidates:l})}else{Hc.call(s,Wc)&&r.filter(s)&&(n||!t.includes(s))&&o.push(s);var c=s.shadowRoot||"function"==typeof r.getShadowRoot&&r.getShadowRoot(s),u=!Yc(c,!1)&&(!r.shadowRootFilter||r.shadowRootFilter(s));if(c&&u){var d=e(!0===c?s.children:c.children,!0,r);r.flatten?o.push.apply(o,d):o.push({scopeParent:s,candidates:d})}else i.unshift.apply(i,s.children)}}return o},Gc=function(e){return!isNaN(parseInt(e.getAttribute("tabindex"),10))},qc=function(e){if(!e)throw new Error("No node provided");return e.tabIndex<0&&(/^(AUDIO|VIDEO|DETAILS)$/.test(e.tagName)||function(e){var t,n=null==e||null===(t=e.getAttribute)||void 0===t?void 0:t.call(e,"contenteditable");return""===n||"true"===n}(e))&&!Gc(e)?0:e.tabIndex},Zc=function(e,t){return e.tabIndex===t.tabIndex?e.documentOrder-t.documentOrder:e.tabIndex-t.tabIndex},Jc=function(e){return"INPUT"===e.tagName},Qc=function(e){var t=e.getBoundingClientRect(),n=t.width,r=t.height;return 0===n&&0===r},eu=function(e,t){return!(t.disabled||Yc(t)||function(e){return Jc(e)&&"hidden"===e.type}(t)||function(e,t){var n=t.displayCheck,r=t.getShadowRoot;if("hidden"===getComputedStyle(e).visibility)return!0;var o=Hc.call(e,"details>summary:first-of-type")?e.parentElement:e;if(Hc.call(o,"details:not([open]) *"))return!0;if(n&&"full"!==n&&"legacy-full"!==n){if("non-zero-area"===n)return Qc(e)}else{if("function"==typeof r){for(var i=e;e;){var s=e.parentElement,a=Kc(e);if(s&&!s.shadowRoot&&!0===r(s))return Qc(e);e=e.assignedSlot?e.assignedSlot:s||a===e.ownerDocument?s:a.host}e=i}if(function(e){var t,n,r,o,i=e&&Kc(e),s=null===(t=i)||void 0===t?void 0:t.host,a=!1;if(i&&i!==e)for(a=!!(null!==(n=s)&&void 0!==n&&null!==(r=n.ownerDocument)&&void 0!==r&&r.contains(s)||null!=e&&null!==(o=e.ownerDocument)&&void 0!==o&&o.contains(e));!a&&s;){var l,c,u;a=!(null===(c=s=null===(l=i=Kc(s))||void 0===l?void 0:l.host)||void 0===c||null===(u=c.ownerDocument)||void 0===u||!u.contains(s))}return a}(e))return!e.getClientRects().length;if("legacy-full"!==n)return!0}return!1}(t,e)||function(e){return"DETAILS"===e.tagName&&Array.prototype.slice.apply(e.children).some((function(e){return"SUMMARY"===e.tagName}))}(t)||function(e){if(/^(INPUT|BUTTON|SELECT|TEXTAREA)$/.test(e.tagName))for(var t=e.parentElement;t;){if("FIELDSET"===t.tagName&&t.disabled){for(var n=0;n<t.children.length;n++){var r=t.children.item(n);if("LEGEND"===r.tagName)return!!Hc.call(t,"fieldset[disabled] *")||!r.contains(e)}return!0}t=t.parentElement}return!1}(t))},tu=function(e,t){return!(function(e){return function(e){return Jc(e)&&"radio"===e.type}(e)&&!function(e){if(!e.name)return!0;var t,n=e.form||Kc(e),r=function(e){return n.querySelectorAll('input[type="radio"][name="'+e+'"]')};if("undefined"!=typeof window&&void 0!==window.CSS&&"function"==typeof window.CSS.escape)t=r(window.CSS.escape(e.name));else try{t=r(e.name)}catch(e){return console.error("Looks like you have a radio button with a name attribute containing invalid CSS selector characters and need the CSS.escape polyfill: %s",e.message),!1}var o=function(e,t){for(var n=0;n<e.length;n++)if(e[n].checked&&e[n].form===t)return e[n]}(t,e.form);return!o||o===e}(e)}(t)||qc(t)<0||!eu(e,t))},nu=function(e){var t=parseInt(e.getAttribute("tabindex"),10);return!!(isNaN(t)||t>=0)},ru=function e(t){var n=[],r=[];return t.forEach((function(t,o){var i=!!t.scopeParent,s=i?t.scopeParent:t,a=function(e,t){var n=qc(e);return n<0&&t&&!Gc(e)?0:n}(s,i),l=i?e(t.candidates):s;0===a?i?n.push.apply(n,l):n.push(s):r.push({documentOrder:o,tabIndex:a,item:t,isScope:i,content:l})})),r.sort(Zc).reduce((function(e,t){return t.isScope?e.push.apply(e,t.content):e.push(t.content),e}),[]).concat(n)},ou=function(e,t){var n;return n=(t=t||{}).getShadowRoot?Xc([e],t.includeContainer,{filter:tu.bind(null,t),flatten:!1,getShadowRoot:t.getShadowRoot,shadowRootFilter:nu}):function(e,t,n){if(Yc(e))return[];var r=Array.prototype.slice.apply(e.querySelectorAll(Wc));return t&&Hc.call(e,Wc)&&r.unshift(e),r.filter(n)}(e,t.includeContainer,tu.bind(null,t)),ru(n)};const iu=Math.min,su=Math.max,au=Math.round,lu=Math.floor,cu=e=>({x:e,y:e}),uu={left:"right",right:"left",bottom:"top",top:"bottom"},du={start:"end",end:"start"};function hu(e,t,n){return su(e,iu(t,n))}function pu(e,t){return"function"==typeof e?e(t):e}function mu(e){return e.split("-")[0]}function fu(e){return e.split("-")[1]}function gu(e){return"x"===e?"y":"x"}function vu(e){return"y"===e?"height":"width"}function yu(e){return["top","bottom"].includes(mu(e))?"y":"x"}function bu(e){return gu(yu(e))}function xu(e){return e.replace(/start|end/g,(e=>du[e]))}function wu(e){return e.replace(/left|right|bottom|top/g,(e=>uu[e]))}function Eu(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function ku(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 Su(e,t,n){let{reference:r,floating:o}=e;const i=yu(t),s=bu(t),a=vu(s),l=mu(t),c="y"===i,u=r.x+r.width/2-o.width/2,d=r.y+r.height/2-o.height/2,h=r[a]/2-o[a]/2;let p;switch(l){case"top":p={x:u,y:r.y-o.height};break;case"bottom":p={x:u,y:r.y+r.height};break;case"right":p={x:r.x+r.width,y:d};break;case"left":p={x:r.x-o.width,y:d};break;default:p={x:r.x,y:r.y}}switch(fu(t)){case"start":p[s]-=h*(n&&c?-1:1);break;case"end":p[s]+=h*(n&&c?-1:1)}return p}async function Tu(e,t){var n;void 0===t&&(t={});const{x:r,y:o,platform:i,rects:s,elements:a,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:h=!1,padding:p=0}=pu(t,e),m=Eu(p),f=a[h?"floating"===d?"reference":"floating":d],g=ku(await i.getClippingRect({element:null==(n=await(null==i.isElement?void 0:i.isElement(f)))||n?f:f.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(a.floating)),boundary:c,rootBoundary:u,strategy:l})),v="floating"===d?{x:r,y:o,width:s.floating.width,height:s.floating.height}:s.reference,y=await(null==i.getOffsetParent?void 0:i.getOffsetParent(a.floating)),b=await(null==i.isElement?void 0:i.isElement(y))&&await(null==i.getScale?void 0:i.getScale(y))||{x:1,y:1},x=ku(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:v,offsetParent:y,strategy:l}):v);return{top:(g.top-x.top+m.top)/b.y,bottom:(x.bottom-g.bottom+m.bottom)/b.y,left:(g.left-x.left+m.left)/b.x,right:(x.right-g.right+m.right)/b.x}}function Pu(e){const t=Pc(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=yc(e),i=o?e.offsetWidth:n,s=o?e.offsetHeight:r,a=au(n)!==i||au(r)!==s;return a&&(n=i,r=s),{width:n,height:r,$:a}}function Cu(e){return vc(e)?e:e.contextElement}function Ru(e){const t=Cu(e);if(!yc(t))return cu(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:i}=Pu(t);let s=(i?au(n.width):n.width)/r,a=(i?au(n.height):n.height)/o;return s&&Number.isFinite(s)||(s=1),a&&Number.isFinite(a)||(a=1),{x:s,y:a}}const Au=cu(0);function Mu(e){const t=mc(e);return Sc()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:Au}function ju(e,t,n,r){void 0===t&&(t=!1),void 0===n&&(n=!1);const o=e.getBoundingClientRect(),i=Cu(e);let s=cu(1);t&&(r?vc(r)&&(s=Ru(r)):s=Ru(e));const a=function(e,t,n){return void 0===t&&(t=!1),!(!n||t&&n!==mc(e))&&t}(i,n,r)?Mu(i):cu(0);let l=(o.left+a.x)/s.x,c=(o.top+a.y)/s.y,u=o.width/s.x,d=o.height/s.y;if(i){const e=mc(i),t=r&&vc(r)?mc(r):r;let n=e,o=n.frameElement;for(;o&&r&&t!==n;){const e=Ru(o),t=o.getBoundingClientRect(),r=Pc(o),i=t.left+(o.clientLeft+parseFloat(r.paddingLeft))*e.x,s=t.top+(o.clientTop+parseFloat(r.paddingTop))*e.y;l*=e.x,c*=e.y,u*=e.x,d*=e.y,l+=i,c+=s,n=mc(o),o=n.frameElement}}return ku({width:u,height:d,x:l,y:c})}const Du=[":popover-open",":modal"];function Nu(e){return Du.some((t=>{try{return e.matches(t)}catch(e){return!1}}))}function Lu(e){return ju(fc(e)).left+Cc(e).scrollLeft}function Vu(e,t,n){let r;if("viewport"===t)r=function(e,t){const n=mc(e),r=fc(e),o=n.visualViewport;let i=r.clientWidth,s=r.clientHeight,a=0,l=0;if(o){i=o.width,s=o.height;const e=Sc();(!e||e&&"fixed"===t)&&(a=o.offsetLeft,l=o.offsetTop)}return{width:i,height:s,x:a,y:l}}(e,n);else if("document"===t)r=function(e){const t=fc(e),n=Cc(e),r=e.ownerDocument.body,o=su(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),i=su(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let s=-n.scrollLeft+Lu(e);const a=-n.scrollTop;return"rtl"===Pc(r).direction&&(s+=su(t.clientWidth,r.clientWidth)-o),{width:o,height:i,x:s,y:a}}(fc(e));else if(vc(t))r=function(e,t){const n=ju(e,!0,"fixed"===t),r=n.top+e.clientTop,o=n.left+e.clientLeft,i=yc(e)?Ru(e):cu(1);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:o*i.x,y:r*i.y}}(t,n);else{const n=Mu(e);r={...t,x:t.x-n.x,y:t.y-n.y}}return ku(r)}function Ou(e,t){const n=Rc(e);return!(n===t||!vc(n)||Tc(n))&&("fixed"===Pc(n).position||Ou(n,t))}function Iu(e,t,n){const r=yc(t),o=fc(t),i="fixed"===n,s=ju(e,!0,i,t);let a={scrollLeft:0,scrollTop:0};const l=cu(0);if(r||!r&&!i)if(("body"!==pc(t)||xc(o))&&(a=Cc(t)),r){const e=ju(t,!0,i,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else o&&(l.x=Lu(o));return{x:s.left+a.scrollLeft-l.x,y:s.top+a.scrollTop-l.y,width:s.width,height:s.height}}function Fu(e){return"static"===Pc(e).position}function Bu(e,t){return yc(e)&&"fixed"!==Pc(e).position?t?t(e):e.offsetParent:null}function zu(e,t){const n=mc(e);if(Nu(e))return n;if(!yc(e)){let t=Rc(e);for(;t&&!Tc(t);){if(vc(t)&&!Fu(t))return t;t=Rc(t)}return n}let r=Bu(e,t);for(;r&&wc(r)&&Fu(r);)r=Bu(r,t);return r&&Tc(r)&&Fu(r)&&!kc(r)?n:r||function(e){let t=Rc(e);for(;yc(t)&&!Tc(t);){if(kc(t))return t;if(Ec(t))return null;t=Rc(t)}return null}(e)||n}const _u={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const i="fixed"===o,s=fc(r),a=!!t&&Nu(t.floating);if(r===s||a&&i)return n;let l={scrollLeft:0,scrollTop:0},c=cu(1);const u=cu(0),d=yc(r);if((d||!d&&!i)&&(("body"!==pc(r)||xc(s))&&(l=Cc(r)),yc(r))){const e=ju(r);c=Ru(r),u.x=e.x+r.clientLeft,u.y=e.y+r.clientTop}return{width:n.width*c.x,height:n.height*c.y,x:n.x*c.x-l.scrollLeft*c.x+u.x,y:n.y*c.y-l.scrollTop*c.y+u.y}},getDocumentElement:fc,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const i=[..."clippingAncestors"===n?Nu(t)?[]:function(e,t){const n=t.get(e);if(n)return n;let r=Mc(e,[],!1).filter((e=>vc(e)&&"body"!==pc(e))),o=null;const i="fixed"===Pc(e).position;let s=i?Rc(e):e;for(;vc(s)&&!Tc(s);){const t=Pc(s),n=kc(s);n||"fixed"!==t.position||(o=null),(i?!n&&!o:!n&&"static"===t.position&&o&&["absolute","fixed"].includes(o.position)||xc(s)&&!n&&Ou(e,s))?r=r.filter((e=>e!==s)):o=t,s=Rc(s)}return t.set(e,r),r}(t,this._c):[].concat(n),r],s=i[0],a=i.reduce(((e,n)=>{const r=Vu(t,n,o);return e.top=su(r.top,e.top),e.right=iu(r.right,e.right),e.bottom=iu(r.bottom,e.bottom),e.left=su(r.left,e.left),e}),Vu(t,s,o));return{width:a.right-a.left,height:a.bottom-a.top,x:a.left,y:a.top}},getOffsetParent:zu,getElementRects:async function(e){const t=this.getOffsetParent||zu,n=this.getDimensions,r=await n(e.floating);return{reference:Iu(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:n}=Pu(e);return{width:t,height:n}},getScale:Ru,isElement:vc,isRTL:function(e){return"rtl"===Pc(e).direction}};function Uu(e,t,n,r){void 0===r&&(r={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:s="function"==typeof ResizeObserver,layoutShift:a="function"==typeof IntersectionObserver,animationFrame:l=!1}=r,c=Cu(e),u=o||i?[...c?Mc(c):[],...Mc(t)]:[];u.forEach((e=>{o&&e.addEventListener("scroll",n,{passive:!0}),i&&e.addEventListener("resize",n)}));const d=c&&a?function(e,t){let n,r=null;const o=fc(e);function i(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return function s(a,l){void 0===a&&(a=!1),void 0===l&&(l=1),i();const{left:c,top:u,width:d,height:h}=e.getBoundingClientRect();if(a||t(),!d||!h)return;const p={rootMargin:-lu(u)+"px "+-lu(o.clientWidth-(c+d))+"px "+-lu(o.clientHeight-(u+h))+"px "+-lu(c)+"px",threshold:su(0,iu(1,l))||1};let m=!0;function f(e){const t=e[0].intersectionRatio;if(t!==l){if(!m)return s();t?s(!1,t):n=setTimeout((()=>{s(!1,1e-7)}),1e3)}m=!1}try{r=new IntersectionObserver(f,{...p,root:o.ownerDocument})}catch(e){r=new IntersectionObserver(f,p)}r.observe(e)}(!0),i}(c,n):null;let h,p=-1,m=null;s&&(m=new ResizeObserver((e=>{let[r]=e;r&&r.target===c&&m&&(m.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame((()=>{var e;null==(e=m)||e.observe(t)}))),n()})),c&&!l&&m.observe(c),m.observe(t));let f=l?ju(e):null;return l&&function t(){const r=ju(e);!f||r.x===f.x&&r.y===f.y&&r.width===f.width&&r.height===f.height||n(),f=r,h=requestAnimationFrame(t)}(),n(),()=>{var e;u.forEach((e=>{o&&e.removeEventListener("scroll",n),i&&e.removeEventListener("resize",n)})),null==d||d(),null==(e=m)||e.disconnect(),m=null,l&&cancelAnimationFrame(h)}}const Wu=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var n,r;const{x:o,y:i,placement:s,middlewareData:a}=t,l=await async function(e,t){const{placement:n,platform:r,elements:o}=e,i=await(null==r.isRTL?void 0:r.isRTL(o.floating)),s=mu(n),a=fu(n),l="y"===yu(n),c=["left","top"].includes(s)?-1:1,u=i&&l?-1:1,d=pu(t,e);let{mainAxis:h,crossAxis:p,alignmentAxis:m}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return a&&"number"==typeof m&&(p="end"===a?-1*m:m),l?{x:p*u,y:h*c}:{x:h*c,y:p*u}}(t,e);return s===(null==(n=a.offset)?void 0:n.placement)&&null!=(r=a.arrow)&&r.alignmentOffset?{}:{x:o+l.x,y:i+l.y,data:{...l,placement:s}}}}},$u=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:n,y:r,placement:o}=t,{mainAxis:i=!0,crossAxis:s=!1,limiter:a={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...l}=pu(e,t),c={x:n,y:r},u=await Tu(t,l),d=yu(mu(o)),h=gu(d);let p=c[h],m=c[d];if(i){const e="y"===h?"bottom":"right";p=hu(p+u["y"===h?"top":"left"],p,p-u[e])}if(s){const e="y"===d?"bottom":"right";m=hu(m+u["y"===d?"top":"left"],m,m-u[e])}const f=a.fn({...t,[h]:p,[d]:m});return{...f,data:{x:f.x-n,y:f.y-r}}}}},Hu=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var n,r;const{placement:o,middlewareData:i,rects:s,initialPlacement:a,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:h,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:m="none",flipAlignment:f=!0,...g}=pu(e,t);if(null!=(n=i.arrow)&&n.alignmentOffset)return{};const v=mu(o),y=mu(a)===a,b=await(null==l.isRTL?void 0:l.isRTL(c.floating)),x=h||(y||!f?[wu(a)]:function(e){const t=wu(e);return[xu(e),t,xu(t)]}(a));h||"none"===m||x.push(...function(e,t,n,r){const o=fu(e);let i=function(e,t,n){const r=["left","right"],o=["right","left"],i=["top","bottom"],s=["bottom","top"];switch(e){case"top":case"bottom":return n?t?o:r:t?r:o;case"left":case"right":return t?i:s;default:return[]}}(mu(e),"start"===n,r);return o&&(i=i.map((e=>e+"-"+o)),t&&(i=i.concat(i.map(xu)))),i}(a,f,m,b));const w=[a,...x],E=await Tu(t,g),k=[];let S=(null==(r=i.flip)?void 0:r.overflows)||[];if(u&&k.push(E[v]),d){const e=function(e,t,n){void 0===n&&(n=!1);const r=fu(e),o=bu(e),i=vu(o);let s="x"===o?r===(n?"end":"start")?"right":"left":"start"===r?"bottom":"top";return t.reference[i]>t.floating[i]&&(s=wu(s)),[s,wu(s)]}(o,s,b);k.push(E[e[0]],E[e[1]])}if(S=[...S,{placement:o,overflows:k}],!k.every((e=>e<=0))){var T,P;const e=((null==(T=i.flip)?void 0:T.index)||0)+1,t=w[e];if(t)return{data:{index:e,overflows:S},reset:{placement:t}};let n=null==(P=S.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:P.placement;if(!n)switch(p){case"bestFit":{var C;const e=null==(C=S.map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:C[0];e&&(n=e);break}case"initialPlacement":n=a}if(o!==n)return{reset:{placement:n}}}return{}}}},Ku=e=>({name:"arrow",options:e,async fn(t){const{x:n,y:r,placement:o,rects:i,platform:s,elements:a,middlewareData:l}=t,{element:c,padding:u=0}=pu(e,t)||{};if(null==c)return{};const d=Eu(u),h={x:n,y:r},p=bu(o),m=vu(p),f=await s.getDimensions(c),g="y"===p,v=g?"top":"left",y=g?"bottom":"right",b=g?"clientHeight":"clientWidth",x=i.reference[m]+i.reference[p]-h[p]-i.floating[m],w=h[p]-i.reference[p],E=await(null==s.getOffsetParent?void 0:s.getOffsetParent(c));let k=E?E[b]:0;k&&await(null==s.isElement?void 0:s.isElement(E))||(k=a.floating[b]||i.floating[m]);const S=x/2-w/2,T=k/2-f[m]/2-1,P=iu(d[v],T),C=iu(d[y],T),R=P,A=k-f[m]-C,M=k/2-f[m]/2+S,j=hu(R,M,A),D=!l.arrow&&null!=fu(o)&&M!==j&&i.reference[m]/2-(M<R?P:C)-f[m]/2<0,N=D?M<R?M-R:M-A:0;return{[p]:h[p]+N,data:{[p]:j,centerOffset:M-j-N,...D&&{alignmentOffset:N}},reset:D}}}),Yu=(e,t,n)=>{const r=new Map,o={platform:_u,...n},i={...o.platform,_c:r};return(async(e,t,n)=>{const{placement:r="bottom",strategy:o="absolute",middleware:i=[],platform:s}=n,a=i.filter(Boolean),l=await(null==s.isRTL?void 0:s.isRTL(t));let c=await s.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:d}=Su(c,r,l),h=r,p={},m=0;for(let n=0;n<a.length;n++){const{name:i,fn:f}=a[n],{x:g,y:v,data:y,reset:b}=await f({x:u,y:d,initialPlacement:r,placement:h,strategy:o,middlewareData:p,rects:c,platform:s,elements:{reference:e,floating:t}});u=null!=g?g:u,d=null!=v?v:d,p={...p,[i]:{...p[i],...y}},b&&m<=50&&(m++,"object"==typeof b&&(b.placement&&(h=b.placement),b.rects&&(c=!0===b.rects?await s.getElementRects({reference:e,floating:t,strategy:o}):b.rects),({x:u,y:d}=Su(c,h,l))),n=-1)}return{x:u,y:d,placement:h,strategy:o,middlewareData:p}})(e,t,{...o,platform:i})};var Xu="undefined"!=typeof document?r.useLayoutEffect:r.useEffect;function Gu(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let n,r,o;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(n=e.length,n!==t.length)return!1;for(r=n;0!=r--;)if(!Gu(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;0!=r--;)if(!{}.hasOwnProperty.call(t,o[r]))return!1;for(r=n;0!=r--;){const n=o[r];if(!("_owner"===n&&e.$$typeof||Gu(e[n],t[n])))return!1}return!0}return e!=e&&t!=t}function qu(e){return"undefined"==typeof window?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Zu(e,t){const n=qu(e);return Math.round(t*n)/n}function Ju(e){const t=r.useRef(e);return Xu((()=>{t.current=e})),t}const Qu=e=>({name:"arrow",options:e,fn(t){const{element:n,padding:r}="function"==typeof e?e(t):e;return n&&(o=n,{}.hasOwnProperty.call(o,"current"))?null!=n.current?Ku({element:n.current,padding:r}).fn(t):{}:n?Ku({element:n,padding:r}).fn(t):{};var o}}),ed=(e,t)=>({...$u(e),options:[e,t]}),td=(e,t)=>({...Hu(e),options:[e,t]}),nd=(e,t)=>({...Qu(e),options:[e,t]}),rd={...o},od=rd.useInsertionEffect||(e=>e());function id(e){const t=r.useRef((()=>{}));return od((()=>{t.current=e})),r.useCallback((function(){for(var e=arguments.length,n=new Array(e),r=0;r<e;r++)n[r]=arguments[r];return null==t.current?void 0:t.current(...n)}),[])}var sd="undefined"!=typeof document?r.useLayoutEffect:r.useEffect;function ad(){return ad=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ad.apply(this,arguments)}let ld=!1,cd=0;const ud=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+cd++,dd=rd.useId||function(){const[e,t]=r.useState((()=>ld?ud():void 0));return sd((()=>{null==e&&t(ud())}),[]),r.useEffect((()=>{ld=!0}),[]),e},hd=r.forwardRef((function(e,t){const{context:{placement:n,elements:{floating:o},middlewareData:{arrow:i,shift:s}},width:a=14,height:l=7,tipRadius:c=0,strokeWidth:u=0,staticOffset:d,stroke:h,d:p,style:{transform:m,...f}={},...g}=e,v=dd(),[y,b]=r.useState(!1);if(sd((()=>{o&&"rtl"===Pc(o).direction&&b(!0)}),[o]),!o)return null;const[x,w]=n.split("-"),E="top"===x||"bottom"===x;let k=d;(E&&null!=s&&s.x||!E&&null!=s&&s.y)&&(k=null);const S=2*u,T=S/2,P=a/2*(c/-8+1),C=l/2*c/4,R=!!p,A=k&&"end"===w?"bottom":"top";let M=k&&"end"===w?"right":"left";k&&y&&(M="end"===w?"left":"right");const j=null!=(null==i?void 0:i.x)?k||i.x:"",D=null!=(null==i?void 0:i.y)?k||i.y:"",N=p||"M0,0 H"+a+" L"+(a-P)+","+(l-C)+" Q"+a/2+","+l+" "+P+","+(l-C)+" Z",L={top:R?"rotate(180deg)":"",left:R?"rotate(90deg)":"rotate(-90deg)",bottom:R?"":"rotate(180deg)",right:R?"rotate(-90deg)":"rotate(90deg)"}[x];return r.createElement("svg",ad({},g,{"aria-hidden":!0,ref:t,width:R?a:a+S,height:a,viewBox:"0 0 "+a+" "+(l>a?l:a),style:{position:"absolute",pointerEvents:"none",[M]:j,[A]:D,[x]:E||R?"100%":"calc(100% - "+S/2+"px)",transform:[L,m].filter((e=>!!e)).join(" "),...f}}),S>0&&r.createElement("path",{clipPath:"url(#"+v+")",fill:"none",stroke:h,strokeWidth:S+(p?0:1),d:N}),r.createElement("path",{stroke:S&&!p?g.fill:"none",d:N}),r.createElement("clipPath",{id:v},r.createElement("rect",{x:-T,y:T*(R?-1:1),width:a+S,height:a})))}));const pd=r.createContext(null),md=r.createContext(null),fd=()=>{var e;return(null==(e=r.useContext(pd))?void 0:e.id)||null},gd=()=>r.useContext(md);function vd(e){return"data-floating-ui-"+e}function yd(e){const t=(0,r.useRef)(e);return sd((()=>{t.current=e})),t}const bd=vd("safe-polygon");function xd(e,t,n){return n&&!Ic(n)?0:"number"==typeof e?e:null==e?void 0:e[t]}function wd(e,t){let n=e.filter((e=>{var n;return e.parentId===t&&(null==(n=e.context)?void 0:n.open)})),r=n;for(;r.length;)r=e.filter((e=>{var t;return null==(t=r)?void 0:t.some((t=>{var n;return e.parentId===t.id&&(null==(n=e.context)?void 0:n.open)}))})),n=n.concat(r);return n}const Ed=()=>({getShadowRoot:!0,displayCheck:"function"==typeof ResizeObserver&&ResizeObserver.toString().includes("[native code]")?"full":"none"});function kd(e,t){const n=ou(e,Ed());"prev"===t&&n.reverse();const r=n.indexOf(jc(Fc(e)));return n.slice(r+1)[0]}function Sd(e,t){const n=t||e.currentTarget,r=e.relatedTarget;return!r||!Dc(n,r)}function Td(e){ou(e,Ed()).forEach((e=>{e.dataset.tabindex=e.getAttribute("tabindex")||"",e.setAttribute("tabindex","-1")}))}function Pd(e){e.querySelectorAll("[data-tabindex]").forEach((e=>{const t=e.dataset.tabindex;delete e.dataset.tabindex,t?e.setAttribute("tabindex",t):e.removeAttribute("tabindex")}))}const Cd={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"fixed",whiteSpace:"nowrap",width:"1px",top:0,left:0};function Rd(e){"Tab"===e.key&&(e.target,clearTimeout(void 0))}const Ad=r.forwardRef((function(e,t){const[n,o]=r.useState();sd((()=>(Vc()&&o("button"),document.addEventListener("keydown",Rd),()=>{document.removeEventListener("keydown",Rd)})),[]);const i={ref:t,tabIndex:0,role:n,"aria-hidden":!n||void 0,[vd("focus-guard")]:"",style:Cd};return r.createElement("span",ad({},e,i))})),Md=r.createContext(null),jd=vd("portal");function Dd(e){const{children:t,id:n,root:o,preserveTabOrder:i=!0}=e,s=function(e){void 0===e&&(e={});const{id:t,root:n}=e,o=dd(),i=Nd(),[s,a]=r.useState(null),l=r.useRef(null);return sd((()=>()=>{null==s||s.remove(),queueMicrotask((()=>{l.current=null}))}),[s]),sd((()=>{if(!o)return;if(l.current)return;const e=t?document.getElementById(t):null;if(!e)return;const n=document.createElement("div");n.id=o,n.setAttribute(jd,""),e.appendChild(n),l.current=n,a(n)}),[t,o]),sd((()=>{if(null===n)return;if(!o)return;if(l.current)return;let e=n||(null==i?void 0:i.portalNode);e&&!vc(e)&&(e=e.current),e=e||document.body;let r=null;t&&(r=document.createElement("div"),r.id=t,e.appendChild(r));const s=document.createElement("div");s.id=o,s.setAttribute(jd,""),e=r||e,e.appendChild(s),l.current=s,a(s)}),[t,n,o,i]),s}({id:n,root:o}),[a,l]=r.useState(null),c=r.useRef(null),u=r.useRef(null),d=r.useRef(null),h=r.useRef(null),p=null==a?void 0:a.modal,m=null==a?void 0:a.open,f=!!a&&!a.modal&&a.open&&i&&!(!o&&!s);return r.useEffect((()=>{if(s&&i&&!p)return s.addEventListener("focusin",e,!0),s.addEventListener("focusout",e,!0),()=>{s.removeEventListener("focusin",e,!0),s.removeEventListener("focusout",e,!0)};function e(e){s&&Sd(e)&&("focusin"===e.type?Pd:Td)(s)}}),[s,i,p]),r.useEffect((()=>{s&&(m||Pd(s))}),[m,s]),r.createElement(Md.Provider,{value:r.useMemo((()=>({preserveTabOrder:i,beforeOutsideRef:c,afterOutsideRef:u,beforeInsideRef:d,afterInsideRef:h,portalNode:s,setFocusManagerState:l})),[i,s])},f&&s&&r.createElement(Ad,{"data-type":"outside",ref:c,onFocus:e=>{if(Sd(e,s)){var t;null==(t=d.current)||t.focus()}else{const e=kd(document.body,"prev")||(null==a?void 0:a.refs.domReference.current);null==e||e.focus()}}}),f&&s&&r.createElement("span",{"aria-owns":s.id,style:Cd}),s&&Ve.createPortal(t,s),f&&s&&r.createElement(Ad,{"data-type":"outside",ref:u,onFocus:e=>{if(Sd(e,s)){var t;null==(t=h.current)||t.focus()}else{const t=kd(document.body,"next")||(null==a?void 0:a.refs.domReference.current);null==t||t.focus(),(null==a?void 0:a.closeOnFocusOut)&&(null==a||a.onOpenChange(!1,e.nativeEvent,"focus-out"))}}}))}const Nd=()=>r.useContext(Md),Ld="data-floating-ui-focusable";function Vd(e){return yc(e.target)&&"BUTTON"===e.target.tagName}function Od(e){return Uc(e)}const Id={pointerdown:"onPointerDown",mousedown:"onMouseDown",click:"onClick"},Fd={pointerdown:"onPointerDownCapture",mousedown:"onMouseDownCapture",click:"onClickCapture"},Bd=e=>{var t,n;return{escapeKey:"boolean"==typeof e?e:null!=(t=null==e?void 0:e.escapeKey)&&t,outsidePress:"boolean"==typeof e?e:null==(n=null==e?void 0:e.outsidePress)||n}};function zd(e){void 0===e&&(e={});const{nodeId:t}=e,n=function(e){const{open:t=!1,onOpenChange:n,elements:o}=e,i=dd(),s=r.useRef({}),[a]=r.useState((()=>function(){const e=new Map;return{emit(t,n){var r;null==(r=e.get(t))||r.forEach((e=>e(n)))},on(t,n){e.set(t,[...e.get(t)||[],n])},off(t,n){var r;e.set(t,(null==(r=e.get(t))?void 0:r.filter((e=>e!==n)))||[])}}}())),l=null!=fd(),[c,u]=r.useState(o.reference),d=id(((e,t,r)=>{s.current.openEvent=e?t:void 0,a.emit("openchange",{open:e,event:t,reason:r,nested:l}),null==n||n(e,t,r)})),h=r.useMemo((()=>({setPositionReference:u})),[]),p=r.useMemo((()=>({reference:c||o.reference||null,floating:o.floating||null,domReference:o.reference})),[c,o.reference,o.floating]);return r.useMemo((()=>({dataRef:s,open:t,onOpenChange:d,elements:p,events:a,floatingId:i,refs:h})),[t,d,p,a,i,h])}({...e,elements:{reference:null,floating:null,...e.elements}}),o=e.rootContext||n,i=o.elements,[s,a]=r.useState(null),[l,c]=r.useState(null),u=(null==i?void 0:i.domReference)||s,d=r.useRef(null),h=gd();sd((()=>{u&&(d.current=u)}),[u]);const p=function(e){void 0===e&&(e={});const{placement:t="bottom",strategy:n="absolute",middleware:o=[],platform:i,elements:{reference:s,floating:a}={},transform:l=!0,whileElementsMounted:c,open:u}=e,[d,h]=r.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[p,m]=r.useState(o);Gu(p,o)||m(o);const[f,g]=r.useState(null),[v,y]=r.useState(null),b=r.useCallback((e=>{e!==k.current&&(k.current=e,g(e))}),[]),x=r.useCallback((e=>{e!==S.current&&(S.current=e,y(e))}),[]),w=s||f,E=a||v,k=r.useRef(null),S=r.useRef(null),T=r.useRef(d),P=null!=c,C=Ju(c),R=Ju(i),A=Ju(u),M=r.useCallback((()=>{if(!k.current||!S.current)return;const e={placement:t,strategy:n,middleware:p};R.current&&(e.platform=R.current),Yu(k.current,S.current,e).then((e=>{const t={...e,isPositioned:!1!==A.current};j.current&&!Gu(T.current,t)&&(T.current=t,Ve.flushSync((()=>{h(t)})))}))}),[p,t,n,R,A]);Xu((()=>{!1===u&&T.current.isPositioned&&(T.current.isPositioned=!1,h((e=>({...e,isPositioned:!1}))))}),[u]);const j=r.useRef(!1);Xu((()=>(j.current=!0,()=>{j.current=!1})),[]),Xu((()=>{if(w&&(k.current=w),E&&(S.current=E),w&&E){if(C.current)return C.current(w,E,M);M()}}),[w,E,M,C,P]);const D=r.useMemo((()=>({reference:k,floating:S,setReference:b,setFloating:x})),[b,x]),N=r.useMemo((()=>({reference:w,floating:E})),[w,E]),L=r.useMemo((()=>{const e={position:n,left:0,top:0};if(!N.floating)return e;const t=Zu(N.floating,d.x),r=Zu(N.floating,d.y);return l?{...e,transform:"translate("+t+"px, "+r+"px)",...qu(N.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}}),[n,l,N.floating,d.x,d.y]);return r.useMemo((()=>({...d,update:M,refs:D,elements:N,floatingStyles:L})),[d,M,D,N,L])}({...e,elements:{...i,...l&&{reference:l}}}),m=r.useCallback((e=>{const t=vc(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),contextElement:e}:e;c(t),p.refs.setReference(t)}),[p.refs]),f=r.useCallback((e=>{(vc(e)||null===e)&&(d.current=e,a(e)),(vc(p.refs.reference.current)||null===p.refs.reference.current||null!==e&&!vc(e))&&p.refs.setReference(e)}),[p.refs]),g=r.useMemo((()=>({...p.refs,setReference:f,setPositionReference:m,domReference:d})),[p.refs,f,m]),v=r.useMemo((()=>({...p.elements,domReference:u})),[p.elements,u]),y=r.useMemo((()=>({...p,...o,refs:g,elements:v,nodeId:t})),[p,g,v,t,o]);return sd((()=>{o.dataRef.current.floatingContext=y;const e=null==h?void 0:h.nodesRef.current.find((e=>e.id===t));e&&(e.context=y)})),r.useMemo((()=>({...p,context:y,refs:g,elements:v})),[p,g,v,y])}function _d(e,t){void 0===t&&(t={});const{open:n,onOpenChange:o,events:i,dataRef:s,elements:a}=e,{enabled:l=!0,visibleOnly:c=!0}=t,u=r.useRef(!1),d=r.useRef(),h=r.useRef(!0);r.useEffect((()=>{if(!l)return;const e=mc(a.domReference);function t(){!n&&yc(a.domReference)&&a.domReference===jc(Fc(a.domReference))&&(u.current=!0)}function r(){h.current=!0}return e.addEventListener("blur",t),e.addEventListener("keydown",r,!0),()=>{e.removeEventListener("blur",t),e.removeEventListener("keydown",r,!0)}}),[a.domReference,n,l]),r.useEffect((()=>{if(l)return i.on("openchange",e),()=>{i.off("openchange",e)};function e(e){let{reason:t}=e;"reference-press"!==t&&"escape-key"!==t||(u.current=!0)}}),[i,l]),r.useEffect((()=>()=>{clearTimeout(d.current)}),[]);const p=r.useMemo((()=>({onPointerDown(e){(function(e){return!Lc().includes("jsdom/")&&(!Oc()&&0===e.width&&0===e.height||Oc()&&1===e.width&&1===e.height&&0===e.pressure&&0===e.detail&&"mouse"===e.pointerType||e.width<1&&e.height<1&&0===e.pressure&&0===e.detail&&"touch"===e.pointerType)})(e.nativeEvent)||(h.current=!1)},onMouseLeave(){u.current=!1},onFocus(e){if(u.current)return;const t=zc(e.nativeEvent);if(c&&vc(t))try{if(Vc()&&Nc().toLowerCase().startsWith("mac")&&!navigator.maxTouchPoints)throw Error();if(!t.matches(":focus-visible"))return}catch(e){if(!h.current&&!Uc(t))return}o(!0,e.nativeEvent,"focus")},onBlur(e){u.current=!1;const t=e.relatedTarget,n=e.nativeEvent,r=vc(t)&&t.hasAttribute(vd("focus-guard"))&&"outside"===t.getAttribute("data-type");d.current=window.setTimeout((()=>{var e;const i=jc(a.domReference?a.domReference.ownerDocument:document);(t||i!==a.domReference)&&(Dc(null==(e=s.current.floatingContext)?void 0:e.refs.floating.current,i)||Dc(a.domReference,i)||r||o(!1,n,"focus"))}))}})),[s,a.domReference,o,c]);return r.useMemo((()=>l?{reference:p}:{}),[l,p])}const Ud="active",Wd="selected";function $d(e,t,n){const r=new Map,o="item"===n;let i=e;if(o&&e){const{[Ud]:t,[Wd]:__,...n}=e;i=n}return{..."floating"===n&&{tabIndex:-1,[Ld]:""},...i,...t.map((t=>{const r=t?t[n]:null;return"function"==typeof r?e?r(e):null:r})).concat(e).reduce(((e,t)=>t?(Object.entries(t).forEach((t=>{let[n,i]=t;var s;o&&[Ud,Wd].includes(n)||(0===n.indexOf("on")?(r.has(n)||r.set(n,[]),"function"==typeof i&&(null==(s=r.get(n))||s.push(i),e[n]=function(){for(var e,t=arguments.length,o=new Array(t),i=0;i<t;i++)o[i]=arguments[i];return null==(e=r.get(n))?void 0:e.map((e=>e(...o))).find((e=>void 0!==e))})):e[n]=i)})),e):e),{})}}const Hd=new Map([["select","listbox"],["combobox","listbox"],["label",!1]]),Kd=e=>e.replace(/[A-Z]+(?![a-z])|[A-Z]/g,((e,t)=>(t?"-":"")+e.toLowerCase()));function Yd(e,t){return"function"==typeof e?e(t):e}function Xd(e,t){const[n,r]=e;let o=!1;const i=t.length;for(let e=0,s=i-1;e<i;s=e++){const[i,a]=t[e]||[0,0],[l,c]=t[s]||[0,0];a>=r!=c>=r&&n<=(l-i)*(r-a)/(c-a)+i&&(o=!o)}return o}function Gd(e){void 0===e&&(e={});const{buffer:t=.5,blockPointerEvents:n=!1,requireIntent:r=!0}=e;let o,i=!1,s=null,a=null,l=performance.now();const c=e=>{let{x:n,y:c,placement:u,elements:d,onClose:h,nodeId:p,tree:m}=e;return function(e){function f(){clearTimeout(o),h()}if(clearTimeout(o),!d.domReference||!d.floating||null==u||null==n||null==c)return;const{clientX:g,clientY:v}=e,y=[g,v],b=zc(e),x="mouseleave"===e.type,w=Dc(d.floating,b),E=Dc(d.domReference,b),k=d.domReference.getBoundingClientRect(),S=d.floating.getBoundingClientRect(),T=u.split("-")[0],P=n>S.right-S.width/2,C=c>S.bottom-S.height/2,R=function(e,t){return e[0]>=t.x&&e[0]<=t.x+t.width&&e[1]>=t.y&&e[1]<=t.y+t.height}(y,k),A=S.width>k.width,M=S.height>k.height,j=(A?k:S).left,D=(A?k:S).right,N=(M?k:S).top,L=(M?k:S).bottom;if(w&&(i=!0,!x))return;if(E&&(i=!1),E&&!x)return void(i=!0);if(x&&vc(e.relatedTarget)&&Dc(d.floating,e.relatedTarget))return;if(m&&wd(m.nodesRef.current,p).some((e=>{let{context:t}=e;return null==t?void 0:t.open})))return;if("top"===T&&c>=k.bottom-1||"bottom"===T&&c<=k.top+1||"left"===T&&n>=k.right-1||"right"===T&&n<=k.left+1)return f();let V=[];switch(T){case"top":V=[[j,k.top+1],[j,S.bottom-1],[D,S.bottom-1],[D,k.top+1]];break;case"bottom":V=[[j,S.top+1],[j,k.bottom-1],[D,k.bottom-1],[D,S.top+1]];break;case"left":V=[[S.right-1,L],[S.right-1,N],[k.left+1,N],[k.left+1,L]];break;case"right":V=[[k.right-1,L],[k.right-1,N],[S.left+1,N],[S.left+1,L]]}if(!Xd([g,v],V)){if(i&&!R)return f();if(!x&&r){const t=function(e,t){const n=performance.now(),r=n-l;if(null===s||null===a||0===r)return s=e,a=t,l=n,null;const o=e-s,i=t-a,c=Math.sqrt(o*o+i*i);return s=e,a=t,l=n,c/r}(e.clientX,e.clientY);if(null!==t&&t<.1)return f()}Xd([g,v],function(e){let[n,r]=e;switch(T){case"top":return[[A?n+t/2:P?n+4*t:n-4*t,r+t+1],[A?n-t/2:P?n+4*t:n-4*t,r+t+1],[S.left,P||A?S.bottom-t:S.top],[S.right,P?A?S.bottom-t:S.top:S.bottom-t]];case"bottom":return[[A?n+t/2:P?n+4*t:n-4*t,r-t],[A?n-t/2:P?n+4*t:n-4*t,r-t],[S.left,P||A?S.top+t:S.bottom],[S.right,P?A?S.top+t:S.bottom:S.top+t]];case"left":{const e=[n+t+1,M?r+t/2:C?r+4*t:r-4*t],o=[n+t+1,M?r-t/2:C?r+4*t:r-4*t];return[[C||M?S.right-t:S.left,S.top],[C?M?S.right-t:S.left:S.right-t,S.bottom],e,o]}case"right":return[[n-t,M?r+t/2:C?r+4*t:r-4*t],[n-t,M?r-t/2:C?r+4*t:r-4*t],[C||M?S.left+t:S.right,S.top],[C?M?S.left+t:S.right:S.left+t,S.bottom]]}}([n,c]))?!i&&r&&(o=window.setTimeout(f,40)):f()}}};return c.__options={blockPointerEvents:n},c}const qd=({variant:e="dark",placement:t="bottom",title:n="",content:o,arrow:i=!1,open:a,setOpen:l,children:c,className:u,tooltipPortalRoot:d,tooltipPortalId:h,boundary:p="clippingAncestors",strategy:m="fixed",offset:f=8,triggers:g=["hover","focus"],interactive:v=!1})=>{const y=(0,r.useMemo)((()=>"boolean"==typeof a&&"function"==typeof l),[a,l]),[b,x]=(0,r.useState)(!1),w=(0,r.useRef)(null),{refs:E,floatingStyles:k,context:S}=zd({open:y?a:b,onOpenChange:y?l:x,placement:t,strategy:m,middleware:[(O=f,{...Wu(O),options:[O,undefined]}),td({boundary:p}),ed({boundary:p}),nd({element:w})],whileElementsMounted:Uu}),T=function(e,t){void 0===t&&(t={});const{open:n,onOpenChange:o,dataRef:i,elements:{domReference:s}}=e,{enabled:a=!0,event:l="click",toggle:c=!0,ignoreMouse:u=!1,keyboardHandlers:d=!0,stickIfOpen:h=!0}=t,p=r.useRef(),m=r.useRef(!1),f=r.useMemo((()=>({onPointerDown(e){p.current=e.pointerType},onMouseDown(e){const t=p.current;0===e.button&&"click"!==l&&(Ic(t,!0)&&u||(!n||!c||i.current.openEvent&&h&&"mousedown"!==i.current.openEvent.type?(e.preventDefault(),o(!0,e.nativeEvent,"click")):o(!1,e.nativeEvent,"click")))},onClick(e){const t=p.current;"mousedown"===l&&p.current?p.current=void 0:Ic(t,!0)&&u||(!n||!c||i.current.openEvent&&h&&"click"!==i.current.openEvent.type?o(!0,e.nativeEvent,"click"):o(!1,e.nativeEvent,"click"))},onKeyDown(e){p.current=void 0,e.defaultPrevented||!d||Vd(e)||(" "!==e.key||Od(s)||(e.preventDefault(),m.current=!0),"Enter"===e.key&&o(!n||!c,e.nativeEvent,"click"))},onKeyUp(e){e.defaultPrevented||!d||Vd(e)||Od(s)||" "===e.key&&m.current&&(m.current=!1,o(!n||!c,e.nativeEvent,"click"))}})),[i,s,l,u,d,o,n,h,c]);return r.useMemo((()=>a?{reference:f}:{}),[a,f])}(S,{enabled:!y&&g.includes("click")}),P=function(e,t){void 0===t&&(t={});const{open:n,onOpenChange:o,dataRef:i,events:s,elements:a}=e,{enabled:l=!0,delay:c=0,handleClose:u=null,mouseOnly:d=!1,restMs:h=0,move:p=!0}=t,m=gd(),f=fd(),g=yd(u),v=yd(c),y=yd(n),b=r.useRef(),x=r.useRef(-1),w=r.useRef(),E=r.useRef(-1),k=r.useRef(!0),S=r.useRef(!1),T=r.useRef((()=>{})),P=r.useRef(!1),C=r.useCallback((()=>{var e;const t=null==(e=i.current.openEvent)?void 0:e.type;return(null==t?void 0:t.includes("mouse"))&&"mousedown"!==t}),[i]);r.useEffect((()=>{if(l)return s.on("openchange",e),()=>{s.off("openchange",e)};function e(e){let{open:t}=e;t||(clearTimeout(x.current),clearTimeout(E.current),k.current=!0,P.current=!1)}}),[l,s]),r.useEffect((()=>{if(!l)return;if(!g.current)return;if(!n)return;function e(e){C()&&o(!1,e,"hover")}const t=Fc(a.floating).documentElement;return t.addEventListener("mouseleave",e),()=>{t.removeEventListener("mouseleave",e)}}),[a.floating,n,o,l,g,C]);const R=r.useCallback((function(e,t,n){void 0===t&&(t=!0),void 0===n&&(n="hover");const r=xd(v.current,"close",b.current);r&&!w.current?(clearTimeout(x.current),x.current=window.setTimeout((()=>o(!1,e,n)),r)):t&&(clearTimeout(x.current),o(!1,e,n))}),[v,o]),A=id((()=>{T.current(),w.current=void 0})),M=id((()=>{if(S.current){const e=Fc(a.floating).body;e.style.pointerEvents="",e.removeAttribute(bd),S.current=!1}})),j=id((()=>!!i.current.openEvent&&["click","mousedown"].includes(i.current.openEvent.type)));r.useEffect((()=>{if(l&&vc(a.domReference)){var e;const o=a.domReference;return n&&o.addEventListener("mouseleave",s),null==(e=a.floating)||e.addEventListener("mouseleave",s),p&&o.addEventListener("mousemove",t,{once:!0}),o.addEventListener("mouseenter",t),o.addEventListener("mouseleave",r),()=>{var e;n&&o.removeEventListener("mouseleave",s),null==(e=a.floating)||e.removeEventListener("mouseleave",s),p&&o.removeEventListener("mousemove",t),o.removeEventListener("mouseenter",t),o.removeEventListener("mouseleave",r)}}function t(e){if(clearTimeout(x.current),k.current=!1,d&&!Ic(b.current)||h>0&&!xd(v.current,"open"))return;const t=xd(v.current,"open",b.current);t?x.current=window.setTimeout((()=>{y.current||o(!0,e,"hover")}),t):n||o(!0,e,"hover")}function r(e){if(j())return;T.current();const t=Fc(a.floating);if(clearTimeout(E.current),P.current=!1,g.current&&i.current.floatingContext){n||clearTimeout(x.current),w.current=g.current({...i.current.floatingContext,tree:m,x:e.clientX,y:e.clientY,onClose(){M(),A(),j()||R(e,!0,"safe-polygon")}});const r=w.current;return t.addEventListener("mousemove",r),void(T.current=()=>{t.removeEventListener("mousemove",r)})}("touch"!==b.current||!Dc(a.floating,e.relatedTarget))&&R(e)}function s(e){j()||i.current.floatingContext&&(null==g.current||g.current({...i.current.floatingContext,tree:m,x:e.clientX,y:e.clientY,onClose(){M(),A(),j()||R(e)}})(e))}}),[a,l,e,d,h,p,R,A,M,o,n,y,m,v,g,i,j]),sd((()=>{var e;if(l&&n&&null!=(e=g.current)&&e.__options.blockPointerEvents&&C()){S.current=!0;const e=a.floating;if(vc(a.domReference)&&e){var t;const n=Fc(a.floating).body;n.setAttribute(bd,"");const r=a.domReference,o=null==m||null==(t=m.nodesRef.current.find((e=>e.id===f)))||null==(t=t.context)?void 0:t.elements.floating;return o&&(o.style.pointerEvents=""),n.style.pointerEvents="none",r.style.pointerEvents="auto",e.style.pointerEvents="auto",()=>{n.style.pointerEvents="",r.style.pointerEvents="",e.style.pointerEvents=""}}}}),[l,n,f,a,m,g,C]),sd((()=>{n||(b.current=void 0,P.current=!1,A(),M())}),[n,A,M]),r.useEffect((()=>()=>{A(),clearTimeout(x.current),clearTimeout(E.current),M()}),[l,a.domReference,A,M]);const D=r.useMemo((()=>{function e(e){b.current=e.pointerType}return{onPointerDown:e,onPointerEnter:e,onMouseMove(e){const{nativeEvent:t}=e;function r(){k.current||y.current||o(!0,t,"hover")}d&&!Ic(b.current)||n||0===h||P.current&&e.movementX**2+e.movementY**2<2||(clearTimeout(E.current),"touch"===b.current?r():(P.current=!0,E.current=window.setTimeout(r,h)))}}}),[d,o,n,y,h]),N=r.useMemo((()=>({onMouseEnter(){clearTimeout(x.current)},onMouseLeave(e){j()||R(e.nativeEvent,!1)}})),[R,j]);return r.useMemo((()=>l?{reference:D,floating:N}:{}),[l,D,N])}(S,{move:!1,enabled:!y&&g.includes("hover"),...v&&{handleClose:Gd()}}),C=_d(S,{enabled:!y&&g.includes("focus")}),R=function(e,t){void 0===t&&(t={});const{open:n,onOpenChange:o,elements:i,dataRef:s}=e,{enabled:a=!0,escapeKey:l=!0,outsidePress:c=!0,outsidePressEvent:u="pointerdown",referencePress:d=!1,referencePressEvent:h="pointerdown",ancestorScroll:p=!1,bubbles:m,capture:f}=t,g=gd(),v=id("function"==typeof c?c:()=>!1),y="function"==typeof c?v:c,b=r.useRef(!1),x=r.useRef(!1),{escapeKey:w,outsidePress:E}=Bd(m),{escapeKey:k,outsidePress:S}=Bd(f),T=r.useRef(!1),P=id((e=>{var t;if(!n||!a||!l||"Escape"!==e.key)return;if(T.current)return;const r=null==(t=s.current.floatingContext)?void 0:t.nodeId,i=g?wd(g.nodesRef.current,r):[];if(!w&&(e.stopPropagation(),i.length>0)){let e=!0;if(i.forEach((t=>{var n;null==(n=t.context)||!n.open||t.context.dataRef.current.__escapeKeyBubbles||(e=!1)})),!e)return}o(!1,function(e){return"nativeEvent"in e}(e)?e.nativeEvent:e,"escape-key")})),C=id((e=>{var t;const n=()=>{var t;P(e),null==(t=zc(e))||t.removeEventListener("keydown",n)};null==(t=zc(e))||t.addEventListener("keydown",n)})),R=id((e=>{var t;const n=b.current;b.current=!1;const r=x.current;if(x.current=!1,"click"===u&&r)return;if(n)return;if("function"==typeof y&&!y(e))return;const a=zc(e),l="["+vd("inert")+"]",c=Fc(i.floating).querySelectorAll(l);let d=vc(a)?a:null;for(;d&&!Tc(d);){const e=Rc(d);if(Tc(e)||!vc(e))break;d=e}if(c.length&&vc(a)&&!a.matches("html,body")&&!Dc(a,i.floating)&&Array.from(c).every((e=>!Dc(d,e))))return;if(yc(a)&&j){const t=a.clientWidth>0&&a.scrollWidth>a.clientWidth,n=a.clientHeight>0&&a.scrollHeight>a.clientHeight;let r=n&&e.offsetX>a.clientWidth;if(n&&"rtl"===Pc(a).direction&&(r=e.offsetX<=a.offsetWidth-a.clientWidth),r||t&&e.offsetY>a.clientHeight)return}const h=null==(t=s.current.floatingContext)?void 0:t.nodeId,p=g&&wd(g.nodesRef.current,h).some((t=>{var n;return Bc(e,null==(n=t.context)?void 0:n.elements.floating)}));if(Bc(e,i.floating)||Bc(e,i.domReference)||p)return;const m=g?wd(g.nodesRef.current,h):[];if(m.length>0){let e=!0;if(m.forEach((t=>{var n;null==(n=t.context)||!n.open||t.context.dataRef.current.__outsidePressBubbles||(e=!1)})),!e)return}o(!1,e,"outside-press")})),A=id((e=>{var t;const n=()=>{var t;R(e),null==(t=zc(e))||t.removeEventListener(u,n)};null==(t=zc(e))||t.addEventListener(u,n)}));r.useEffect((()=>{if(!n||!a)return;s.current.__escapeKeyBubbles=w,s.current.__outsidePressBubbles=E;let e=-1;function t(e){o(!1,e,"ancestor-scroll")}function r(){window.clearTimeout(e),T.current=!0}function c(){e=window.setTimeout((()=>{T.current=!1}),Sc()?5:0)}const d=Fc(i.floating);l&&(d.addEventListener("keydown",k?C:P,k),d.addEventListener("compositionstart",r),d.addEventListener("compositionend",c)),y&&d.addEventListener(u,S?A:R,S);let h=[];return p&&(vc(i.domReference)&&(h=Mc(i.domReference)),vc(i.floating)&&(h=h.concat(Mc(i.floating))),!vc(i.reference)&&i.reference&&i.reference.contextElement&&(h=h.concat(Mc(i.reference.contextElement)))),h=h.filter((e=>{var t;return e!==(null==(t=d.defaultView)?void 0:t.visualViewport)})),h.forEach((e=>{e.addEventListener("scroll",t,{passive:!0})})),()=>{l&&(d.removeEventListener("keydown",k?C:P,k),d.removeEventListener("compositionstart",r),d.removeEventListener("compositionend",c)),y&&d.removeEventListener(u,S?A:R,S),h.forEach((e=>{e.removeEventListener("scroll",t)})),window.clearTimeout(e)}}),[s,i,l,y,u,n,o,p,a,w,E,P,k,C,R,S,A]),r.useEffect((()=>{b.current=!1}),[y,u]);const M=r.useMemo((()=>({onKeyDown:P,[Id[h]]:e=>{d&&o(!1,e.nativeEvent,"reference-press")}})),[P,o,d,h]),j=r.useMemo((()=>({onKeyDown:P,onMouseDown(){x.current=!0},onMouseUp(){x.current=!0},[Fd[u]]:()=>{b.current=!0}})),[P,u]);return r.useMemo((()=>a?{reference:M,floating:j}:{}),[a,M,j])}(S),A=function(e,t){var n;void 0===t&&(t={});const{open:o,floatingId:i}=e,{enabled:s=!0,role:a="dialog"}=t,l=null!=(n=Hd.get(a))?n:a,c=dd(),u=null!=fd(),d=r.useMemo((()=>"tooltip"===l||"label"===a?{["aria-"+("label"===a?"labelledby":"describedby")]:o?i:void 0}:{"aria-expanded":o?"true":"false","aria-haspopup":"alertdialog"===l?"dialog":l,"aria-controls":o?i:void 0,..."listbox"===l&&{role:"combobox"},..."menu"===l&&{id:c},..."menu"===l&&u&&{role:"menuitem"},..."select"===a&&{"aria-autocomplete":"none"},..."combobox"===a&&{"aria-autocomplete":"list"}}),[l,i,u,o,c,a]),h=r.useMemo((()=>{const e={id:i,...l&&{role:l}};return"tooltip"===l||"label"===a?e:{...e,..."menu"===l&&{"aria-labelledby":c}}}),[l,i,c,a]),p=r.useCallback((e=>{let{active:t,selected:n}=e;const r={role:"option",...t&&{id:i+"-option"}};switch(a){case"select":return{...r,"aria-selected":t&&n};case"combobox":return{...r,...t&&{"aria-selected":!0}}}return{}}),[i,a]);return r.useMemo((()=>s?{reference:d,floating:h,item:p}:{}),[s,d,h,p])}(S,{role:"tooltip"}),{getReferenceProps:M,getFloatingProps:j}=function(e){void 0===e&&(e=[]);const t=e.map((e=>null==e?void 0:e.reference)),n=e.map((e=>null==e?void 0:e.floating)),o=e.map((e=>null==e?void 0:e.item)),i=r.useCallback((t=>$d(t,e,"reference")),t),s=r.useCallback((t=>$d(t,e,"floating")),n),a=r.useCallback((t=>$d(t,e,"item")),o);return r.useMemo((()=>({getReferenceProps:i,getFloatingProps:s,getItemProps:a})),[i,s,a])}([T,P,C,R,A]),{isMounted:D,styles:N}=function(e,t){void 0===t&&(t={});const{initial:n={opacity:0},open:o,close:i,common:s,duration:a=250}=t,l=e.placement,c=l.split("-")[0],u=r.useMemo((()=>({side:c,placement:l})),[c,l]),d="number"==typeof a,h=(d?a:a.open)||0,p=(d?a:a.close)||0,[m,f]=r.useState((()=>({...Yd(s,u),...Yd(n,u)}))),{isMounted:g,status:v}=function(e,t){void 0===t&&(t={});const{open:n,elements:{floating:o}}=e,{duration:i=250}=t,s=("number"==typeof i?i:i.close)||0,[a,l]=r.useState("unmounted"),c=function(e,t){const[n,o]=r.useState(e);return e&&!n&&o(!0),r.useEffect((()=>{if(!e&&n){const e=setTimeout((()=>o(!1)),t);return()=>clearTimeout(e)}}),[e,n,t]),n}(n,s);return c||"close"!==a||l("unmounted"),sd((()=>{if(o){if(n){l("initial");const e=requestAnimationFrame((()=>{l("open")}));return()=>{cancelAnimationFrame(e)}}l("close")}}),[n,o]),{isMounted:c,status:a}}(e,{duration:a}),y=yd(n),b=yd(o),x=yd(i),w=yd(s);return sd((()=>{const e=Yd(y.current,u),t=Yd(x.current,u),n=Yd(w.current,u),r=Yd(b.current,u)||Object.keys(e).reduce(((e,t)=>(e[t]="",e)),{});if("initial"===v&&f((t=>({transitionProperty:t.transitionProperty,...n,...e}))),"open"===v&&f({transitionProperty:Object.keys(r).map(Kd).join(","),transitionDuration:h+"ms",...n,...r}),"close"===v){const r=t||e;f({transitionProperty:Object.keys(r).map(Kd).join(","),transitionDuration:p+"ms",...n,...r})}}),[p,x,y,b,w,h,v,u]),{isMounted:g,styles:m}}(S,{duration:150,initial:{opacity:0},open:{opacity:1},close:{opacity:0}}),L={light:"bg-tooltip-background-light text-text-primary",dark:"bg-tooltip-background-dark text-text-on-color"}[e],V="dark"===e?"text-tooltip-background-dark":"text-tooltip-background-light";var O;return(0,s.jsxs)(r.Fragment,{children:[(0,r.isValidElement)(c)&&(0,s.jsx)(r.Fragment,{children:(0,r.cloneElement)(c,{ref:Me(c.ref,E.setReference),className:ne(c.props.className),...M()})},"tooltip-reference"),(0,s.jsx)(Dd,{id:h,root:d,children:D&&(0,s.jsxs)("div",{className:ne("absolute z-20 py-2 px-3 rounded-md text-xs leading-4 shadow-soft-shadow-lg",L,"max-w-80 w-fit",u),ref:E.setFloating,style:{...k,...N},...j(),children:[(0,s.jsxs)("div",{children:[!!n&&(0,s.jsx)("span",{className:"font-semibold",children:n},"tooltip-title"),!!o&&(0,s.jsx)("div",{className:"font-normal",children:o},"tooltip-content")]}),i&&(0,s.jsx)(hd,{ref:w,context:S,className:ne("fill-current",V)})]})})]})};qd.displayName="Tooltip";const Zd=Hl("info",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]]),Jd=Hl("arrow-up-right",[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]]),Qd=e=>{let t;const n=new Set,r=(e,r)=>{const o="function"==typeof e?e(t):e;if(!Object.is(o,t)){const e=t;t=(null!=r?r:"object"!=typeof o||null===o)?o:Object.assign({},t,o),n.forEach((n=>n(t,e)))}},o=()=>t,i={setState:r,getState:o,getInitialState:()=>s,subscribe:e=>(n.add(e),()=>n.delete(e)),destroy:()=>{console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),n.clear()}},s=t=e(r,o,i);return i};var eh=n(242);const{useDebugValue:th}=r,{useSyncExternalStoreWithSelector:nh}=eh;let rh=!1;const oh=e=>e,ih=e=>{"function"!=typeof e&&console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");const t="function"==typeof e?(e=>e?Qd(e):Qd)(e):e,n=(e,n)=>function(e,t=oh,n){n&&!rh&&(console.warn("[DEPRECATED] Use `createWithEqualityFn` instead of `create` or use `useStoreWithEqualityFn` instead of `useStore`. They can be imported from 'zustand/traditional'. https://github.com/pmndrs/zustand/discussions/1937"),rh=!0);const r=nh(e.subscribe,e.getState,e.getServerState||e.getInitialState,t,n);return th(r),r}(t,e,n);return Object.assign(n,t),n},sh="SET_ACTION_ITEMS",ah="SET_ACTION_CATEGORIES",lh="SET_VIDEO_MODAL_OPEN",ch="SET_VIDEO_MODAL_ITEM",uh="SET_LEARN_MORE_DIALOG_OPEN",dh="SET_LEARN_MORE_DIALOG_ITEM",hh=(e=>e?ih(e):ih)((xh=(e,{type:t,payload:n})=>{switch(t){case sh:return{...e,actionItems:n};case ah:return{...e,actionCategories:n};case lh:return{...e,videoModalOpen:n};case ch:return{...e,videoModalOpen:!0,currentVideoModalItem:n.item||null};case uh:return{...e,learnMoreDialogOpen:n};case dh:return{...e,learnMoreDialogOpen:!0,currentLearnMoreDialogItem:n.item||null};default:return e}},wh={actionItems:[],actionCategories:{},videoModalOpen:!1,currentVideoModalItem:null,learnMoreDialogOpen:!1,currentLearnMoreDialogItem:null},(e,t,n)=>(n.dispatch=t=>(e((e=>xh(e,t)),!1,t),t),n.dispatchFromDevtools=!0,{dispatch:(...e)=>n.dispatch(...e),...wh}))),ph=({step:e,isLast:t=!1,actionItem:n})=>{const{id:o,title:s,cta:a,completed:l=!1,content:c=[]}=e,{dispatch:u,actionItems:d}=hh((e=>({dispatch:e.dispatch,actionItems:e.actionItems}))),[h,p]=(0,i.useState)(l);if((0,i.useEffect)((()=>{p(l)}),[l]),!o||!s)return null;const m=h?(0,Nl.__)("Mark as incomplete","astra-sites"):(0,Nl.__)("Mark as complete","astra-sites");return(0,r.createElement)("div",{className:cc("py-4 sm:py-5 flex items-center gap-2 sm:gap-3",t?"":"border-b-0.5 border-solid border-border-subtle")},(0,r.createElement)(qd,{arrow:!0,content:m,placement:"top",variant:"dark"},(0,r.createElement)("span",{className:cc("rounded-full cursor-pointer border-[1.25px] border-solid",h?"bg-support-success p-[3px] sm:p-[4px] border-support-success-inverse":"flex justify-center items-center w-5 h-5 sm:w-6 sm:h-6 border-border-strong [&:hover>svg]:text-border-strong"),tabIndex:0,"aria-label":m,onClick:()=>{const e=!h,t=d.map((t=>t.id===n.id?{...t,steps:t?.steps?.map((t=>t?.id===o?{...t,completed:e}:t))}:t));p(e),u({type:sh,payload:t});const r=(e,t)=>{const n=d;p(h),u({type:sh,payload:n}),ye.error(e,{description:t||(0,Nl.__)("An error occurred while updating the step status.","astra-sites")})};Dl()({path:"getting-started/v1/update-action-item-steps/",method:"POST",data:{action_id:n?.id,steps:t.find((e=>e.id===n.id))?.steps},headers:{"X-WP-Nonce":gettingStartedVars.rest_api_nonce}}).then((e=>{e.success||r((0,Nl.__)("Failed to update step status:","astra-sites"),e?.data?.message)})).catch((e=>{r((0,Nl.__)("Error updating step status:","astra-sites"),e?.message)}))}},(0,r.createElement)(lc,{className:"text-icon-on-color sm:w-3.5 sm:h-3.5 transition-all duration-200",size:12,strokeWidth:1.5}))),(0,r.createElement)(ue,{className:"flex-1 sm:text-base",size:14,weight:500,color:"primary"},s),(c?.length||"link"===c?.type)&&(0,r.createElement)(ke,{size:"xs",variant:"ghost",icon:(0,r.createElement)(Zd,{size:14,className:"inline sm:hidden"}),onClick:()=>{"link"!==e?.content?.type?u({type:dh,payload:{open:!0,item:e}}):window.open(e?.content?.url,"_blank")},className:"outline-none hover:bg-transparent underline-offset-3 hover:underline hover:text-gs-primary focus:ring-0 focus:ring-offset-0"},(0,r.createElement)("span",{className:"hidden sm:inline"},c?.title||(0,Nl.__)("Learn how","astra-sites"))),(0,r.createElement)(ke,{className:"px-3 sm:px-5 gap-0.5 text-gs-primary outline-gs-primary hover:text-button-tertiary hover:outline-gs-primary hover:bg-gs-primary focus:ring-gs-primary w-[104px]",size:"sm",variant:"outline",icon:(0,r.createElement)(Jd,{size:14}),iconPosition:"right",onClick:()=>{a?.url&&window.open(a.url,a?.target||"_blank")}},a?.label||(0,Nl.__)("Set Up","astra-sites")))},mh=({category:e={},items:t=[],defaultValue:n,isLoading:o=!1})=>{const{dispatch:i}=hh();if(o||t?.length)return(0,r.createElement)("div",{className:"p-4 sm:p-6 bg-background-primary flex flex-col gap-4 sm:gap-5 border-0.5 border-solid border-border-subtle rounded-xl shadow-sm [&>div:space-y-5]"},o&&(0,r.createElement)(dc,null),e?.name&&(0,r.createElement)(ue,{size:16,weight:600},e?.name),!o&&(0,r.createElement)(oc,{type:"boxed",autoClose:!0,defaultValue:n},t?.map((e=>{const t=e?.steps?.length,n=e?.steps?.filter((e=>e?.completed)).length,o=t===n;return(0,r.createElement)(oc.Item,{className:"border-0.5 [&:hover>h3]:bg-transparent rounded-lg overflow-hidden [&:has([aria-expanded='true'])]:border-border-strong [&:has([aria-expanded='true'])]:shadow-lg transition-all duration-200 ease-in-out",key:e.id,value:e.id},(0,r.createElement)(oc.Trigger,{className:"group p-3 sm:p-4 hover:bg-transparent [&>svg]:hidden [&>div]:flex-grow [&[aria-expanded='true']_.gs-chevron-right]:rotate-90 [&[aria-expanded='true']_.gs-play-video]:flex"},(0,r.createElement)("div",{className:"flex items-center gap-2 sm:gap-3 flex-1"},(0,r.createElement)(sc,{className:"gs-chevron-right transition-transform duration-200 ease-in-out",size:20}),(0,r.createElement)("div",{className:"flex-1 text-left"},(0,r.createElement)(ue,{size:14,className:"sm:text-base",weight:700},e.title)),e?.cta&&(0,r.createElement)(ke,{className:"gs-play-video hidden transition-all outline-none hover:bg-transparent underline-offset-3 hover:underline hover:text-gs-primary focus:ring-0 focus:ring-offset-0",size:"xs",variant:"ghost",onClick:t=>{t.stopPropagation(),(e=>{const{type:t}=e?.cta||{};i({type:"video"===t?ch:dh,payload:{open:!0,item:e?.cta||{}}})})(e)},icon:"video"===e?.cta?.type&&(0,r.createElement)(ac,{size:16,strokeWidth:1.25})},(0,r.createElement)("span",{className:"hidden sm:inline"},e?.cta?.label||(e=>{switch(e){case"video":return(0,Nl.__)("Play Video","astra-sites");case"link":return(0,Nl.__)("Learn More","astra-sites")}return(0,Nl.__)("Learn how","astra-sites")})(e?.cta?.type))),(0,r.createElement)(ic,{className:"relative overflow-hidden w-14 sm:w-[62px] text-xs",label:(0,r.createElement)(r.Fragment,null,(0,r.createElement)("span",{className:"sr-only"},(0,Nl.sprintf)(
// translators: %1$d is the number of completed steps, %2$d is the total number of steps.
// translators: %1$d is the number of completed steps, %2$d is the total number of steps.
(0,Nl.__)("%1$d of %2$d steps completed","astra-sites"),n,t)),(0,r.createElement)("span",{className:"flex items-center"},o&&(0,r.createElement)(lc,{size:12}),(0,r.createElement)("span",{className:"px-1 relative z-10"},n,"/",t)),(0,r.createElement)("span",{className:"absolute h-full top-0 left-0 bg-[#BAE6FD]/40 transition-[width] duration-300 ease-in-out",style:{width:n/t*100+"%"}})),variant:o?"green":n>0?"blue":"gray"}))),(0,r.createElement)(oc.Content,{className:"overflow-visible [&>div]:p-0"},e?.description&&(0,r.createElement)(ue,{className:"px-3 sm:px-4 ml-7 mr-0 sm:mx-8 -mt-2 pb-4 max-w-full sm:max-w-[72%]",size:14,color:"secondary",weight:400},e?.description),(0,r.createElement)("span",{className:"block w-full h-[0.5px] bg-border-subtle"}),(0,r.createElement)("div",{className:"px-3 sm:px-4 bg-gs-secondary flex flex-col"},e?.steps?.map(((t,n)=>(0,r.createElement)(ph,{key:t.id,step:t,actionItem:e,isLast:n===e.steps.length-1}))))))}))))},fh=(0,r.createContext)({}),gh=()=>(0,r.useContext)(fh),vh={open:{opacity:1},exit:{opacity:0}},yh={duration:.2},bh=({open:e,setOpen:t,children:n,trigger:o=null,className:i,exitOnClickOutside:a=!1,exitOnEsc:l=!0,design:c="simple",scrollLock:u=!0})=>{const d=void 0!==e&&void 0!==t,[h,p]=(0,r.useState)(!1),m=(0,r.useRef)(null),f=(0,r.useRef)(null),g=(0,r.useMemo)((()=>d?e:h),[e,h]),v=(0,r.useMemo)((()=>d?t:p),[p,p]),y=()=>{g||v(!0)},b=()=>{g&&v(!1)},x=(0,r.useCallback)((()=>(0,r.isValidElement)(o)?(0,r.cloneElement)(o,{onClick:re(y,o?.props?.onClick)}):"function"==typeof o?o({onClick:y}):null),[o,y,b]),w=e=>{"Escape"===e.key&&l&&b()},E=e=>{a&&m.current&&!m.current.contains(e.target)&&b()};return(0,r.useEffect)((()=>(window.addEventListener("keydown",w),document.addEventListener("mousedown",E),()=>{window.removeEventListener("keydown",w),document.removeEventListener("mousedown",E)})),[g]),(0,r.useEffect)((()=>{if(!u)return;const e=document.querySelector("html");return g&&e&&(e.style.overflow="hidden"),()=>{e&&(e.style.overflow="")}}),[g]),(0,s.jsxs)(s.Fragment,{children:[x(),(0,s.jsx)(fh.Provider,{value:{open:g,setOpen:v,handleClose:b,design:c,dialogContainerRef:f,dialogRef:m},children:(0,s.jsx)("div",{ref:f,className:ne("fixed z-999999 w-0 h-0 overflow-visible",i),children:n})})]})};var xh,wh;bh.displayName="Dialog";const Eh=({children:e,className:t})=>{const{open:n,handleClose:r,dialogRef:o}=gh();return(0,s.jsx)(Ge,{children:n&&(0,s.jsx)(Pl.div,{className:"fixed inset-0 overflow-y-auto",initial:"exit",animate:"open",exit:"exit",variants:vh,role:"dialog",transition:yh,children:(0,s.jsx)("div",{className:"flex items-center justify-center min-h-full",children:(0,s.jsx)("div",{ref:o,className:ne("flex flex-col gap-5 w-120 h-fit bg-background-primary border border-solid border-border-subtle rounded-xl shadow-soft-shadow-2xl my-5 overflow-hidden",t),children:"function"==typeof e?e({close:r}):e})})})})};Eh.displayName="Dialog.Panel";const kh=({className:e,...t})=>{const{open:n,dialogContainerRef:r}=gh();return r?.current?(0,s.jsx)(s.Fragment,{children:(0,Ve.createPortal)((0,s.jsx)(Ge,{children:n&&(0,s.jsx)(Pl.div,{className:ne("fixed inset-0 -z-10 bg-background-inverse/90",e),...t,initial:"exit",animate:"open",exit:"exit",variants:vh,transition:yh})}),r.current)}):null};kh.displayName="Dialog.Backdrop";const Sh=({children:e,className:t,...n})=>(0,s.jsx)("div",{className:ne("space-y-2 px-5 pt-5 pb-1",t),...n,children:e});Sh.displayName="Dialog.Header";const Th=({children:e,as:t="h3",className:n,...r})=>(0,s.jsx)(t,{className:ne("text-base font-semibold text-text-primary m-0 p-0",n),...r,children:e});Th.displayName="Dialog.Title";const Ph=({children:e,as:t="p",className:n,...r})=>(0,s.jsx)(t,{className:ne("text-sm font-normal text-text-secondary my-0 ml-0 mr-1 p-0",n),...r,children:e});Ph.displayName="Dialog.Description";const Ch=({className:e,...t})=>(0,s.jsx)("button",{className:ne("bg-transparent inline-flex justify-center items-center border-0 p-1 m-0 cursor-pointer focus:outline-none outline-none shadow-none",e),"aria-label":"Close dialog",...t,children:(0,s.jsx)(fe,{className:"size-4 text-text-primary shrink-0"})}),Rh=({children:e,as:t=r.Fragment,...n})=>{const{handleClose:o}=gh();return e?t===r.Fragment?"function"==typeof e?e({close:o}):(0,r.cloneElement)(e,{onClick:o}):(0,s.jsx)(t,{...n,onClick:o,children:e}):(0,s.jsx)(Ch,{onClick:o,...n})};Rh.displayName="Dialog.CloseButton";const Ah=({children:e,className:t,...n})=>(0,s.jsx)("div",{className:ne("px-5",t),...n,children:e});Ah.displayName="Dialog.Body";const Mh=({children:e,className:t})=>{const{design:n,handleClose:r}=gh();return(0,s.jsx)("div",{className:ne("p-4 flex justify-end gap-3",{"bg-background-secondary":"footer-divided"===n},t),children:e?"function"==typeof e?e({close:r}):e:null})};Mh.displayName="Dialog.Footer",bh.Panel=Eh,bh.Title=Th,bh.Description=Ph,bh.CloseButton=Rh,bh.Header=Sh,bh.Body=Ah,bh.Footer=Mh,bh.Backdrop=kh;const jh=({url:e,title:t})=>(0,r.createElement)("div",{className:"aspect-video rounded-lg bg-background-tertiary overflow-clip shadow-sm"},(0,r.createElement)("iframe",{src:e,title:t,className:"w-full h-full border-none",allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",allowFullScreen:!0})),Dh=()=>{const{dispatch:e,videoModalOpen:t,currentVideoModalItem:n}=hh();return(0,r.createElement)(bh,{design:"simple",exitOnEsc:!0,scrollLock:!0,exitOnClickOutside:!0,open:t,setOpen:()=>{e({type:lh,payload:!1})}},(0,r.createElement)(bh.Backdrop,null),(0,r.createElement)(bh.Panel,{className:"w-[90vw] max-w-[672px] max-h-[85vh] sm:max-h-[80vh] mx-auto rounded-lg border-none"},(0,r.createElement)(bh.Body,{className:"p-0"},(0,r.createElement)(jh,{url:n?.url,title:n?.title}))))},Nh=(0,i.forwardRef)((({text:e,variant:t,onClick:n})=>(0,r.createElement)(ke,{variant:t||"primary",size:"sm",onClick:e=>{n&&"function"==typeof n&&n(e)}},e))),Lh=({items:e})=>(0,r.createElement)("div",{className:"space-y-2"},e.map(((e,t)=>(0,r.createElement)("div",{key:t,className:"flex items-start gap-2"},(0,r.createElement)(ue,{size:14,weight:600,color:"primary",className:"flex-shrink-0"},(0,Nl.sprintf)(
// translators: %s is the step number.
// translators: %s is the step number.
(0,Nl.__)("Step %d:","astra-sites"),t+1)),(0,r.createElement)(ue,{size:14,color:"secondary"},e.text))))),Vh=({prefix:e,text:t,url:n,target:o="_blank"})=>(0,r.createElement)("div",{className:"text-sm flex gap-1"},e&&(0,r.createElement)("span",null,e),(0,r.createElement)(ue,{as:"a",href:n,target:o,className:"text-gs-primary underline"},t||n)),Oh=({items:e})=>(0,r.createElement)("ul",{className:"list-disc ml-8"},e.map(((e,t)=>(0,r.createElement)("li",{key:t,className:"my-0.5"},(0,r.createElement)(ue,{size:14,color:"secondary"},e))))),Ih=({text:e,isHeading:t=!1})=>(0,r.createElement)(ue,{as:t?"h3":"p",weight:t?600:400,size:t?18:14,color:t?"primary":"secondary",className:cc("leading-relaxed",t?"mt-4":"")},e),Fh=({items:e})=>e?.map(((e,t)=>{switch(e.type){case"video":return(0,r.createElement)(jh,{key:t,url:e.data.url,title:e.data.title});case"image":return(0,r.createElement)("img",{key:t,src:e.data.src,alt:e.data.alt||"",className:"w-full h-auto shadow-sm rounded-lg border-0.5 border-solid border-border-subtle"});case"link":return(0,r.createElement)(Vh,{key:t,prefix:e.prefix,text:e.data.text,url:e.data.url,target:e.data.target});case"heading":return(0,r.createElement)(Ih,{key:t,text:e.text,isHeading:!0});case"paragraph":case"text":return(0,r.createElement)(Ih,{key:t,text:e.text});case"list":return(0,r.createElement)(Oh,{key:t,items:e.data.items});case"checklist":return(0,r.createElement)(Lh,{key:t,items:e.data.items});case"button":return(0,r.createElement)(Nh,{key:t,onClick:()=>window.open(e.data.url,e.data.target),...e.data});default:return null}})),Bh=()=>{const{dispatch:e,learnMoreDialogOpen:t,currentLearnMoreDialogItem:n}=hh();return(0,r.createElement)(bh,{design:"simple",exitOnEsc:!0,scrollLock:!0,exitOnClickOutside:!0,open:t,setOpen:t=>{e({type:uh,payload:!1})}},(0,r.createElement)(bh.Backdrop,null),(0,r.createElement)(bh.Panel,{className:"w-[90vw] max-w-[672px] gap-2 max-h-[85vh] sm:max-h-[80vh] mx-auto"},(0,r.createElement)(bh.Header,{className:"px-4 sm:px-5 pb-0"},(0,r.createElement)("div",{className:"flex items-center justify-between"},(0,r.createElement)(bh.Title,{className:"text-base"},n?.title),(0,r.createElement)(bh.CloseButton,null))),(0,r.createElement)(bh.Body,{className:"px-4 sm:px-5 pb-4 sm:pb-5 flex flex-col gap-2 sm:gap-2.5 overflow-auto"},(0,r.createElement)(Fh,{items:n?.content}))))};(0,i.createRoot)(document.getElementById("getting-started-page")).render((0,r.createElement)((()=>{const{dispatch:e,actionItems:t=[],actionCategories:n={}}=hh(),[o,s]=(0,i.useState)(!1);(0,i.useEffect)((()=>{s(!0),(async()=>{const e=await Dl()({path:"getting-started/v1/action-items",method:"POST",headers:{"X-WP-Nonce":gettingStartedVars.rest_api_nonce}});return e.success&&e?.data?e.data:[]})().then((t=>{e({type:sh,payload:t?.items||[]}),e({type:ah,payload:t?.categories||{}}),s(!1)})).catch(console.error).finally((()=>s(!1)))}),[]);const a=(0,i.useMemo)((()=>{const e={skeleton:[]};return t.forEach((t=>{const n=t?.category||"uncategorized";e[n]||(e[n]=[]),e[n].push(t)})),e}),[t]),l=(0,i.useMemo)((()=>t?.find((e=>e?.steps?.length!==e?.steps?.filter((e=>e?.completed)).length))?.id),[t]);return(0,r.createElement)("div",{className:"bg-background-secondary min-h-[calc(100vh-46px)] md:min-h-[calc(100vh-32px)] font-figtree"},(0,r.createElement)(ql,null),(0,r.createElement)("div",{className:"flex flex-col gap-6 sm:gap-8 py-6 sm:py-8 md:py-10 px-4 sm:px-6 lg:px-0 m-auto max-w-[768px]"},(0,r.createElement)("div",{className:"flex flex-col gap-2"},(0,r.createElement)(ue,{as:"h3",size:20,className:"sm:text-2xl",weight:600},(0,Nl.__)("Finish Setting Up Your Website","astra-sites")),(0,r.createElement)(ue,{size:14},(0,Nl.__)("Let’s get your new website fully ready. Follow this quick checklist to customize, configure, and launch with confidence.","astra-sites"))),a&&Object.entries(a)?.map((([e,t])=>(0,r.createElement)(mh,{key:e,category:n[e]||{},items:t,defaultValue:l,isLoading:o})))),(0,r.createElement)(Dh,null),(0,r.createElement)(Bh,null),(0,r.createElement)(Al,{position:"top-right",design:"stack",theme:"light",autoDismiss:!0,dismissAfter:5e3}))}),null))},20:(e,t,n)=>{var r=n(609),o=Symbol.for("react.element"),i=Symbol.for("react.fragment"),s=Object.prototype.hasOwnProperty,a=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={key:!0,ref:!0,__self:!0,__source:!0};function c(e,t,n){var r,i={},c=null,u=null;for(r in void 0!==n&&(c=""+n),void 0!==t.key&&(c=""+t.key),void 0!==t.ref&&(u=t.ref),t)s.call(t,r)&&!l.hasOwnProperty(r)&&(i[r]=t[r]);if(e&&e.defaultProps)for(r in t=e.defaultProps)void 0===i[r]&&(i[r]=t[r]);return{$$typeof:o,type:e,key:c,ref:u,props:i,_owner:a.current}}t.Fragment=i,t.jsx=c,t.jsxs=c},848:(e,t,n)=>{e.exports=n(20)},63:(e,t,n)=>{var r=n(609),o="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},i=r.useState,s=r.useEffect,a=r.useLayoutEffect,l=r.useDebugValue;function c(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!o(e,n)}catch(e){return!0}}var u="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var n=t(),r=i({inst:{value:n,getSnapshot:t}}),o=r[0].inst,u=r[1];return a((function(){o.value=n,o.getSnapshot=t,c(o)&&u({inst:o})}),[e,n,t]),s((function(){return c(o)&&u({inst:o}),e((function(){c(o)&&u({inst:o})}))}),[e]),l(n),n};t.useSyncExternalStore=void 0!==r.useSyncExternalStore?r.useSyncExternalStore:u},940:(e,t,n)=>{var r=n(609),o=n(888),i="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},s=o.useSyncExternalStore,a=r.useRef,l=r.useEffect,c=r.useMemo,u=r.useDebugValue;t.useSyncExternalStoreWithSelector=function(e,t,n,r,o){var d=a(null);if(null===d.current){var h={hasValue:!1,value:null};d.current=h}else h=d.current;d=c((function(){function e(e){if(!l){if(l=!0,s=e,e=r(e),void 0!==o&&h.hasValue){var t=h.value;if(o(t,e))return a=t}return a=e}if(t=a,i(s,e))return t;var n=r(e);return void 0!==o&&o(t,n)?t:(s=e,a=n)}var s,a,l=!1,c=void 0===n?null:n;return[function(){return e(t())},null===c?void 0:function(){return e(c())}]}),[t,n,r,o]);var p=s(e,d[0],d[1]);return l((function(){h.hasValue=!0,h.value=p}),[p]),u(p),p}},888:(e,t,n)=>{e.exports=n(63)},242:(e,t,n)=>{e.exports=n(940)},609:e=>{e.exports=window.React}},o={};function i(e){var t=o[e];if(void 0!==t)return t.exports;var n=o[e]={exports:{}};return r[e](n,n.exports,i),n.exports}i.m=r,e=[],i.O=(t,n,r,o)=>{if(!n){var s=1/0;for(u=0;u<e.length;u++){for(var[n,r,o]=e[u],a=!0,l=0;l<n.length;l++)(!1&o||s>=o)&&Object.keys(i.O).every((e=>i.O[e](n[l])))?n.splice(l--,1):(a=!1,o<s&&(s=o));if(a){e.splice(u--,1);var c=r();void 0!==c&&(t=c)}}return t}o=o||0;for(var u=e.length;u>0&&e[u-1][2]>o;u--)e[u]=e[u-1];e[u]=[n,r,o]},i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},n=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,i.t=function(e,r){if(1&r&&(e=this(e)),8&r)return e;if("object"==typeof e&&e){if(4&r&&e.__esModule)return e;if(16&r&&"function"==typeof e.then)return e}var o=Object.create(null);i.r(o);var s={};t=t||[null,n({}),n([]),n(n)];for(var a=2&r&&e;"object"==typeof a&&!~t.indexOf(a);a=n(a))Object.getOwnPropertyNames(a).forEach((t=>s[t]=()=>e[t]));return s.default=()=>e,i.d(o,s),o},i.d=(e,t)=>{for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e={792:0,85:0};i.O.j=t=>0===e[t];var t=(t,n)=>{var r,o,[s,a,l]=n,c=0;if(s.some((t=>0!==e[t]))){for(r in a)i.o(a,r)&&(i.m[r]=a[r]);if(l)var u=l(i)}for(t&&t(n);c<s.length;c++)o=s[c],i.o(e,o)&&e[o]&&e[o][0](),e[o]=0;return i.O(u)},n=globalThis.webpackChunkgetting_started=globalThis.webpackChunkgetting_started||[];n.forEach(t.bind(null,0)),n.push=t.bind(null,n.push.bind(n))})();var s=i.O(void 0,[85],(()=>i(409)));s=i.O(s)})();