@3sc/common-component 0.0.183 → 0.0.184

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.umd.js CHANGED
@@ -249,7 +249,7 @@ const theme2 = createTheme({ palette: {
249
249
  ${f}px !important;
250
250
  top: ${u}px !important;
251
251
  }
252
- `),()=>{document.head.removeChild(m)}},[t]),b.jsx(c3,{isPresent:t,childRef:r,sizeRef:s,children:C.cloneElement(e,{ref:r})})}const d3=({children:e,initial:t,isPresent:n,onExitComplete:o,custom:r,presenceAffectsLayout:s,mode:a,anchorX:l})=>{const c=Sd(p3),u=_.useId(),d=_.useCallback(f=>{c.set(f,!0);for(const m of c.values())if(!m)return;o&&o()},[c,o]),p=_.useMemo(()=>({id:u,initial:t,isPresent:n,custom:r,onExitComplete:d,register:f=>(c.set(f,!1),()=>c.delete(f))}),s?[Math.random(),d]:[n,d]);return _.useMemo(()=>{c.forEach((f,m)=>c.set(m,!1))},[n]),C.useEffect(()=>{!n&&!c.size&&o&&o()},[n]),a==="popLayout"&&(e=b.jsx(u3,{isPresent:n,anchorX:l,children:e})),b.jsx(Sl.Provider,{value:p,children:e})};function p3(){return new Map}function rb(e=!0){const t=_.useContext(Sl);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:o,register:r}=t,s=_.useId();_.useEffect(()=>{if(e)return r(s)},[e]);const a=_.useCallback(()=>e&&o&&o(s),[s,o,e]);return!n&&o?[!1,a]:[!0]}const wl=e=>e.key||"";function ib(e){const t=[];return _.Children.forEach(e,n=>{_.isValidElement(n)&&t.push(n)}),t}const f3=({children:e,custom:t,initial:n=!0,onExitComplete:o,presenceAffectsLayout:r=!0,mode:s="sync",propagate:a=!1,anchorX:l="left"})=>{const[c,u]=rb(a),d=_.useMemo(()=>ib(e),[e]),p=a&&!c?[]:d.map(wl),f=_.useRef(!0),m=_.useRef(d),g=Sd(()=>new Map),[h,y]=_.useState(d),[v,I]=_.useState(d);ob(()=>{f.current=!1,m.current=d;for(let S=0;S<v.length;S++){const E=wl(v[S]);p.includes(E)?g.delete(E):g.get(E)!==!0&&g.set(E,!1)}},[v,p.length,p.join("-")]);const w=[];if(d!==h){let S=[...d];for(let E=0;E<v.length;E++){const O=v[E],R=wl(O);p.includes(R)||(S.splice(E,0,O),w.push(O))}return s==="wait"&&w.length&&(S=w),I(ib(S)),y(d),null}process.env.NODE_ENV!=="production"&&s==="wait"&&v.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`);const{forceRender:T}=_.useContext(Cd);return b.jsx(b.Fragment,{children:v.map(S=>{const E=wl(S),O=a&&!c?!1:d===v||p.includes(E),R=()=>{if(g.has(E))g.set(E,!0);else return;let k=!0;g.forEach(D=>{D||(k=!1)}),k&&(T==null||T(),I(m.current),a&&(u==null||u()),o&&o())};return b.jsx(d3,{isPresent:O,initial:!f.current||n?void 0:!1,custom:t,presenceAffectsLayout:r,mode:s,onExitComplete:O?void 0:R,anchorX:l,children:S},E)})})};function Td(e,t){e.indexOf(t)===-1&&e.push(t)}function Ed(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}let Qr=()=>{},Ao=()=>{};process.env.NODE_ENV!=="production"&&(Qr=(e,t)=>{!e&&typeof console<"u"&&console.warn(t)},Ao=(e,t)=>{if(!e)throw new Error(t)});const Od={useManualTiming:!1};function Rd(e){let t;return()=>(t===void 0&&(t=e()),t)}const An=e=>e,xs=(e,t,n)=>{const o=t-e;return o===0?1:(n-e)/o};class Pd{constructor(){this.subscriptions=[]}add(t){return Td(this.subscriptions,t),()=>Ed(this.subscriptions,t)}notify(t,n,o){const r=this.subscriptions.length;if(r)if(r===1)this.subscriptions[0](t,n,o);else for(let s=0;s<r;s++){const a=this.subscriptions[s];a&&a(t,n,o)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Ln=e=>e*1e3,Kn=e=>e/1e3;function sb(e,t){return t?e*(1e3/t):0}const ab=new Set;function Il(e,t,n){e||ab.has(t)||(console.warn(t),ab.add(t))}const h3=Rd(()=>window.ScrollTimeline!==void 0);class m3{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>t.finished))}getAll(t){return this.animations[0][t]}setAll(t,n){for(let o=0;o<this.animations.length;o++)this.animations[o][t]=n}attachTimeline(t,n){const o=this.animations.map(r=>{if(h3()&&r.attachTimeline)return r.attachTimeline(t);if(typeof n=="function")return n(r)});return()=>{o.forEach((r,s)=>{r&&r(),this.animations[s].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let n=0;n<this.animations.length;n++)t=Math.max(t,this.animations[n].duration);return t}runAll(t){this.animations.forEach(n=>n[t]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class g3 extends m3{then(t,n){return this.finished.finally(t).then(()=>{})}}const lb={value:null},Ad=e=>Array.isArray(e)&&typeof e[0]=="number",b3={};function y3(e,t){const n=Rd(e);return()=>b3[t]??n()}const Cs=y3(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),cb=(e,t,n=10)=>{let o="";const r=Math.max(Math.round(t/n),2);for(let s=0;s<r;s++)o+=e(s/(r-1))+", ";return`linear(${o.substring(0,o.length-2)})`},Ss=([e,t,n,o])=>`cubic-bezier(${e}, ${t}, ${n}, ${o})`,Md={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Ss([0,.65,.55,1]),circOut:Ss([.55,0,1,.45]),backIn:Ss([.31,.01,.66,-.59]),backOut:Ss([.33,1.53,.69,.99])};function ub(e,t){if(e)return typeof e=="function"&&Cs()?cb(e,t):Ad(e)?Ss(e):Array.isArray(e)?e.map(n=>ub(n,t)||Md.easeOut):Md[e]}function v3(e,t,n,{delay:o=0,duration:r=300,repeat:s=0,repeatType:a="loop",ease:l="easeInOut",times:c}={},u=void 0){const d={[t]:n};c&&(d.offset=c);const p=ub(l,r);return Array.isArray(p)&&(d.easing=p),e.animate(d,{delay:o,duration:r,easing:Array.isArray(p)?"linear":p,fill:"both",iterations:s+1,direction:a==="reverse"?"alternate":"normal",pseudoElement:u})}function kd(e){return typeof e=="function"&&"applyToOptions"in e}function Dd(e,t){return(e==null?void 0:e[t])??(e==null?void 0:e.default)??e}const Tl=2e4;function Nd(e){let t=0;const n=50;let o=e.next(t);for(;!o.done&&t<Tl;)t+=n,o=e.next(t);return t>=Tl?1/0:t}function x3(e,t=100,n){const o=n({...e,keyframes:[0,t]}),r=Math.min(Nd(o),Tl);return{type:"keyframes",ease:s=>o.next(r*s).value/t,duration:Kn(r)}}function db(e){return!!(typeof e=="function"&&Cs()||!e||typeof e=="string"&&(e in Md||Cs())||Ad(e)||Array.isArray(e)&&e.every(db))}function pb(e,t){e.timeline=t,e.onfinish=null}const El=["read","resolveKeyframes","update","preRender","render","postRender"];function C3(e,t){let n=new Set,o=new Set,r=!1,s=!1;const a=new WeakSet;let l={delta:0,timestamp:0,isProcessing:!1},c=0;function u(p){a.has(p)&&(d.schedule(p),e()),c++,p(l)}const d={schedule:(p,f=!1,m=!1)=>{const h=m&&r?n:o;return f&&a.add(p),h.has(p)||h.add(p),p},cancel:p=>{o.delete(p),a.delete(p)},process:p=>{if(l=p,r){s=!0;return}r=!0,[n,o]=[o,n],n.forEach(u),t&&lb.value&&lb.value.frameloop[t].push(c),c=0,n.clear(),r=!1,s&&(s=!1,d.process(p))}};return d}const S3=40;function fb(e,t){let n=!1,o=!0;const r={delta:0,timestamp:0,isProcessing:!1},s=()=>n=!0,a=El.reduce((v,I)=>(v[I]=C3(s,t?I:void 0),v),{}),{read:l,resolveKeyframes:c,update:u,preRender:d,render:p,postRender:f}=a,m=()=>{const v=performance.now();n=!1,r.delta=o?1e3/60:Math.max(Math.min(v-r.timestamp,S3),1),r.timestamp=v,r.isProcessing=!0,l.process(r),c.process(r),u.process(r),d.process(r),p.process(r),f.process(r),r.isProcessing=!1,n&&t&&(o=!1,e(m))},g=()=>{n=!0,o=!0,r.isProcessing||e(m)};return{schedule:El.reduce((v,I)=>{const w=a[I];return v[I]=(T,S=!1,E=!1)=>(n||g(),w.schedule(T,S,E)),v},{}),cancel:v=>{for(let I=0;I<El.length;I++)a[El[I]].cancel(v)},state:r,steps:a}}const{schedule:jd}=fb(queueMicrotask,!1),{schedule:ht,cancel:Mo,state:_t,steps:Fd}=fb(typeof requestAnimationFrame<"u"?requestAnimationFrame:An,!0);let Ol;function w3(){Ol=void 0}const Qn={now:()=>(Ol===void 0&&Qn.set(_t.isProcessing||Od.useManualTiming?_t.timestamp:performance.now()),Ol),set:e=>{Ol=e,queueMicrotask(w3)}},$n={x:!1,y:!1};function hb(){return $n.x||$n.y}function I3(e){return e==="x"||e==="y"?$n[e]?null:($n[e]=!0,()=>{$n[e]=!1}):$n.x||$n.y?null:($n.x=$n.y=!0,()=>{$n.x=$n.y=!1})}function T3(e,t,n){if(e instanceof EventTarget)return[e];if(typeof e=="string"){let o=document;const r=(n==null?void 0:n[e])??o.querySelectorAll(e);return r?Array.from(r):[]}return Array.from(e)}function mb(e,t){const n=T3(e),o=new AbortController,r={passive:!0,...t,signal:o.signal};return[n,r,()=>o.abort()]}function gb(e){return!(e.pointerType==="touch"||hb())}function E3(e,t,n={}){const[o,r,s]=mb(e,n),a=l=>{if(!gb(l))return;const{target:c}=l,u=t(c,l);if(typeof u!="function"||!c)return;const d=p=>{gb(p)&&(u(p),c.removeEventListener("pointerleave",d))};c.addEventListener("pointerleave",d,r)};return o.forEach(l=>{l.addEventListener("pointerenter",a,r)}),s}const bb=(e,t)=>t?e===t?!0:bb(e,t.parentElement):!1,Bd=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,O3=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function R3(e){return O3.has(e.tagName)||e.tabIndex!==-1}const ws=new WeakSet;function yb(e){return t=>{t.key==="Enter"&&e(t)}}function Vd(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const P3=(e,t)=>{const n=e.currentTarget;if(!n)return;const o=yb(()=>{if(ws.has(n))return;Vd(n,"down");const r=yb(()=>{Vd(n,"up")}),s=()=>Vd(n,"cancel");n.addEventListener("keyup",r,t),n.addEventListener("blur",s,t)});n.addEventListener("keydown",o,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",o),t)};function vb(e){return Bd(e)&&!hb()}function A3(e,t,n={}){const[o,r,s]=mb(e,n),a=l=>{const c=l.currentTarget;if(!vb(l)||ws.has(c))return;ws.add(c);const u=t(c,l),d=(m,g)=>{window.removeEventListener("pointerup",p),window.removeEventListener("pointercancel",f),!(!vb(m)||!ws.has(c))&&(ws.delete(c),typeof u=="function"&&u(m,{success:g}))},p=m=>{d(m,c===window||c===document||n.useGlobalTarget||bb(c,m.target))},f=m=>{d(m,!1)};window.addEventListener("pointerup",p,r),window.addEventListener("pointercancel",f,r)};return o.forEach(l=>{(n.useGlobalTarget?window:l).addEventListener("pointerdown",a,r),l instanceof HTMLElement&&(l.addEventListener("focus",u=>P3(u,r)),!R3(l)&&!l.hasAttribute("tabindex")&&(l.tabIndex=0))}),s}const xb=30,M3=e=>!isNaN(parseFloat(e));class k3{constructor(t,n={}){this.version="12.7.3",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(o,r=!0)=>{const s=Qn.now();this.updatedAt!==s&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(o),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),r&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=Qn.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=M3(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&Il(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new Pd);const o=this.events[t].add(n);return t==="change"?()=>{o(),ht.read(()=>{this.events.change.getSize()||this.stop()})}:o}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,o){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-o}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=Qn.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>xb)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,xb);return sb(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Is(e,t){return new k3(e,t)}const Cb=_.createContext({strict:!1}),Sb={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"]},ei={};for(const e in Sb)ei[e]={isEnabled:t=>Sb[e].some(n=>!!t[n])};function D3(e){for(const t in e)ei[t]={...ei[t],...e[t]}}const N3=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 Rl(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||N3.has(e)}let wb=e=>!Rl(e);function j3(e){e&&(wb=t=>t.startsWith("on")?!Rl(t):e(t))}try{j3(require("@emotion/is-prop-valid").default)}catch{}function F3(e,t,n){const o={};for(const r in e)r==="values"&&typeof e.values=="object"||(wb(r)||n===!0&&Rl(r)||!t&&!Rl(r)||e.draggable&&r.startsWith("onDrag"))&&(o[r]=e[r]);return o}function B3(e){if(typeof Proxy>"u")return e;const t=new Map,n=(...o)=>(process.env.NODE_ENV!=="production"&&Il(!1,"motion() is deprecated. Use motion.create() instead."),e(...o));return new Proxy(n,{get:(o,r)=>r==="create"?e:(t.has(r)||t.set(r,e(r)),t.get(r))})}const Pl=_.createContext({});function Al(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Ts(e){return typeof e=="string"||Array.isArray(e)}const Ld=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],$d=["initial",...Ld];function Ml(e){return Al(e.animate)||$d.some(t=>Ts(e[t]))}function Ib(e){return!!(Ml(e)||e.variants)}function V3(e,t){if(Ml(e)){const{initial:n,animate:o}=e;return{initial:n===!1||Ts(n)?n:void 0,animate:Ts(o)?o:void 0}}return e.inherit!==!1?t:{}}function L3(e){const{initial:t,animate:n}=V3(e,_.useContext(Pl));return _.useMemo(()=>({initial:t,animate:n}),[Tb(t),Tb(n)])}function Tb(e){return Array.isArray(e)?e.join(" "):e}const $3=Symbol.for("motionComponentSymbol");function ti(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function _3(e,t,n){return _.useCallback(o=>{o&&e.onMount&&e.onMount(o),t&&(o?t.mount(o):t.unmount()),n&&(typeof n=="function"?n(o):ti(n)&&(n.current=o))},[t])}const _d=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Eb="data-"+_d("framerAppearId"),Ob=_.createContext({});function W3(e,t,n,o,r){var h,y;const{visualElement:s}=_.useContext(Pl),a=_.useContext(Cb),l=_.useContext(Sl),c=_.useContext(Id).reducedMotion,u=_.useRef(null);o=o||a.renderer,!u.current&&o&&(u.current=o(e,{visualState:t,parent:s,props:n,presenceContext:l,blockInitialAnimation:l?l.initial===!1:!1,reducedMotionConfig:c}));const d=u.current,p=_.useContext(Ob);d&&!d.projection&&r&&(d.type==="html"||d.type==="svg")&&z3(u.current,n,r,p);const f=_.useRef(!1);_.useInsertionEffect(()=>{d&&f.current&&d.update(n,l)});const m=n[Eb],g=_.useRef(!!m&&!((h=window.MotionHandoffIsComplete)!=null&&h.call(window,m))&&((y=window.MotionHasOptimisedAnimation)==null?void 0:y.call(window,m)));return ob(()=>{d&&(f.current=!0,window.MotionIsMounted=!0,d.updateFeatures(),jd.render(d.render),g.current&&d.animationState&&d.animationState.animateChanges())}),_.useEffect(()=>{d&&(!g.current&&d.animationState&&d.animationState.animateChanges(),g.current&&(queueMicrotask(()=>{var v;(v=window.MotionHandoffMarkAsComplete)==null||v.call(window,m)}),g.current=!1))}),d}function z3(e,t,n,o){const{layoutId:r,layout:s,drag:a,dragConstraints:l,layoutScroll:c,layoutRoot:u,layoutCrossfade:d}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Rb(e.parent)),e.projection.setOptions({layoutId:r,layout:s,alwaysMeasureLayout:!!a||l&&ti(l),visualElement:e,animationType:typeof s=="string"?s:"both",initialPromotionConfig:o,crossfade:d,layoutScroll:c,layoutRoot:u})}function Rb(e){if(e)return e.options.allowProjection!==!1?e.projection:Rb(e.parent)}function G3({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:o,Component:r}){e&&D3(e);function s(l,c){let u;const d={..._.useContext(Id),...l,layoutId:H3(l)},{isStatic:p}=d,f=L3(l),m=o(l,p);if(!p&&wd){U3(d,e);const g=Y3(d);u=g.MeasureLayout,f.visualElement=W3(r,m,d,t,g.ProjectionNode)}return b.jsxs(Pl.Provider,{value:f,children:[u&&f.visualElement?b.jsx(u,{visualElement:f.visualElement,...d}):null,n(r,l,_3(m,f.visualElement,c),m,p,f.visualElement)]})}s.displayName=`motion.${typeof r=="string"?r:`create(${r.displayName??r.name??""})`}`;const a=_.forwardRef(s);return a[$3]=r,a}function H3({layoutId:e}){const t=_.useContext(Cd).id;return t&&e!==void 0?t+"-"+e:e}function U3(e,t){const n=_.useContext(Cb).strict;if(process.env.NODE_ENV!=="production"&&t&&n){const o="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";e.ignoreStrict?Qr(!1,o):Ao(!1,o)}}function Y3(e){const{drag:t,layout:n}=ei;if(!t&&!n)return{};const o={...t,...n};return{MeasureLayout:t!=null&&t.isEnabled(e)||n!=null&&n.isEnabled(e)?o.MeasureLayout:void 0,ProjectionNode:o.ProjectionNode}}const Pb=e=>t=>typeof t=="string"&&t.startsWith(e),Wd=Pb("--"),X3=Pb("var(--"),zd=e=>X3(e)?Z3.test(e.split("/*")[0].trim()):!1,Z3=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Es={};function J3(e){for(const t in e)Es[t]=e[t],Wd(t)&&(Es[t].isCSSVariable=!0)}const ni=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],qo=new Set(ni);function Ab(e,{layout:t,layoutId:n}){return qo.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Es[e]||e==="opacity")}const Ut=e=>!!(e&&e.getVelocity),Mb=(e,t)=>t&&typeof e=="number"?t.transform(e):e,mo=(e,t,n)=>n>t?t:n<e?e:n,oi={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Os={...oi,transform:e=>mo(0,1,e)},kl={...oi,default:1},Rs=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),ko=Rs("deg"),eo=Rs("%"),De=Rs("px"),q3=Rs("vh"),K3=Rs("vw"),kb={...eo,parse:e=>eo.parse(e)/100,transform:e=>eo.transform(e*100)},Q3={borderWidth:De,borderTopWidth:De,borderRightWidth:De,borderBottomWidth:De,borderLeftWidth:De,borderRadius:De,radius:De,borderTopLeftRadius:De,borderTopRightRadius:De,borderBottomRightRadius:De,borderBottomLeftRadius:De,width:De,maxWidth:De,height:De,maxHeight:De,top:De,right:De,bottom:De,left:De,padding:De,paddingTop:De,paddingRight:De,paddingBottom:De,paddingLeft:De,margin:De,marginTop:De,marginRight:De,marginBottom:De,marginLeft:De,backgroundPositionX:De,backgroundPositionY:De},e5={rotate:ko,rotateX:ko,rotateY:ko,rotateZ:ko,scale:kl,scaleX:kl,scaleY:kl,scaleZ:kl,skew:ko,skewX:ko,skewY:ko,distance:De,translateX:De,translateY:De,translateZ:De,x:De,y:De,z:De,perspective:De,transformPerspective:De,opacity:Os,originX:kb,originY:kb,originZ:De},Db={...oi,transform:Math.round},Gd={...Q3,...e5,zIndex:Db,size:De,fillOpacity:Os,strokeOpacity:Os,numOctaves:Db},t5={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},n5=ni.length;function o5(e,t,n){let o="",r=!0;for(let s=0;s<n5;s++){const a=ni[s],l=e[a];if(l===void 0)continue;let c=!0;if(typeof l=="number"?c=l===(a.startsWith("scale")?1:0):c=parseFloat(l)===0,!c||n){const u=Mb(l,Gd[a]);if(!c){r=!1;const d=t5[a]||a;o+=`${d}(${u}) `}n&&(t[a]=u)}}return o=o.trim(),n?o=n(t,r?"":o):r&&(o="none"),o}function Hd(e,t,n){const{style:o,vars:r,transformOrigin:s}=e;let a=!1,l=!1;for(const c in t){const u=t[c];if(qo.has(c)){a=!0;continue}else if(Wd(c)){r[c]=u;continue}else{const d=Mb(u,Gd[c]);c.startsWith("origin")?(l=!0,s[c]=d):o[c]=d}}if(t.transform||(a||n?o.transform=o5(t,e.transform,n):o.transform&&(o.transform="none")),l){const{originX:c="50%",originY:u="50%",originZ:d=0}=s;o.transformOrigin=`${c} ${u} ${d}`}}const Ud=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Nb(e,t,n){for(const o in t)!Ut(t[o])&&!Ab(o,n)&&(e[o]=t[o])}function r5({transformTemplate:e},t){return _.useMemo(()=>{const n=Ud();return Hd(n,t,e),Object.assign({},n.vars,n.style)},[t])}function i5(e,t){const n=e.style||{},o={};return Nb(o,n,e),Object.assign(o,r5(e,t)),o}function s5(e,t){const n={},o=i5(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,o.userSelect=o.WebkitUserSelect=o.WebkitTouchCallout="none",o.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=o,n}const a5=["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 Yd(e){return typeof e!="string"||e.includes("-")?!1:!!(a5.indexOf(e)>-1||/[A-Z]/u.test(e))}const l5={offset:"stroke-dashoffset",array:"stroke-dasharray"},c5={offset:"strokeDashoffset",array:"strokeDasharray"};function u5(e,t,n=1,o=0,r=!0){e.pathLength=1;const s=r?l5:c5;e[s.offset]=De.transform(-o);const a=De.transform(t),l=De.transform(n);e[s.array]=`${a} ${l}`}function jb(e,t,n){return typeof e=="string"?e:De.transform(t+n*e)}function d5(e,t,n){const o=jb(t,e.x,e.width),r=jb(n,e.y,e.height);return`${o} ${r}`}function Xd(e,{attrX:t,attrY:n,attrScale:o,originX:r,originY:s,pathLength:a,pathSpacing:l=1,pathOffset:c=0,...u},d,p){if(Hd(e,u,p),d){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:f,style:m,dimensions:g}=e;f.transform&&(g&&(m.transform=f.transform),delete f.transform),g&&(r!==void 0||s!==void 0||m.transform)&&(m.transformOrigin=d5(g,r!==void 0?r:.5,s!==void 0?s:.5)),t!==void 0&&(f.x=t),n!==void 0&&(f.y=n),o!==void 0&&(f.scale=o),a!==void 0&&u5(f,a,l,c,!1)}const Fb=()=>({...Ud(),attrs:{}}),Zd=e=>typeof e=="string"&&e.toLowerCase()==="svg";function p5(e,t,n,o){const r=_.useMemo(()=>{const s=Fb();return Xd(s,t,Zd(o),e.transformTemplate),{...s.attrs,style:{...s.style}}},[t]);if(e.style){const s={};Nb(s,e.style,e),r.style={...s,...r.style}}return r}function f5(e=!1){return(n,o,r,{latestValues:s},a)=>{const c=(Yd(n)?p5:s5)(o,s,a,n),u=F3(o,typeof n=="string",e),d=n!==_.Fragment?{...u,...c,ref:r}:{},{children:p}=o,f=_.useMemo(()=>Ut(p)?p.get():p,[p]);return _.createElement(n,{...d,children:f})}}function Bb(e){const t=[{},{}];return e==null||e.values.forEach((n,o)=>{t[0][o]=n.get(),t[1][o]=n.getVelocity()}),t}function Jd(e,t,n,o){if(typeof t=="function"){const[r,s]=Bb(o);t=t(n!==void 0?n:e.custom,r,s)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[r,s]=Bb(o);t=t(n!==void 0?n:e.custom,r,s)}return t}const qd=e=>Array.isArray(e),h5=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),m5=e=>qd(e)?e[e.length-1]||0:e;function Dl(e){const t=Ut(e)?e.get():e;return h5(t)?t.toValue():t}function g5({scrapeMotionValuesFromProps:e,createRenderState:t,onUpdate:n},o,r,s){const a={latestValues:b5(o,r,s,e),renderState:t()};return n&&(a.onMount=l=>n({props:o,current:l,...a}),a.onUpdate=l=>n(l)),a}const Vb=e=>(t,n)=>{const o=_.useContext(Pl),r=_.useContext(Sl),s=()=>g5(e,t,o,r);return n?s():Sd(s)};function b5(e,t,n,o){const r={},s=o(e,{});for(const f in s)r[f]=Dl(s[f]);let{initial:a,animate:l}=e;const c=Ml(e),u=Ib(e);t&&u&&!c&&e.inherit!==!1&&(a===void 0&&(a=t.initial),l===void 0&&(l=t.animate));let d=n?n.initial===!1:!1;d=d||a===!1;const p=d?l:a;if(p&&typeof p!="boolean"&&!Al(p)){const f=Array.isArray(p)?p:[p];for(let m=0;m<f.length;m++){const g=Jd(e,f[m]);if(g){const{transitionEnd:h,transition:y,...v}=g;for(const I in v){let w=v[I];if(Array.isArray(w)){const T=d?w.length-1:0;w=w[T]}w!==null&&(r[I]=w)}for(const I in h)r[I]=h[I]}}}return r}function Kd(e,t,n){var s;const{style:o}=e,r={};for(const a in o)(Ut(o[a])||t.style&&Ut(t.style[a])||Ab(a,e)||((s=n==null?void 0:n.getValue(a))==null?void 0:s.liveStyle)!==void 0)&&(r[a]=o[a]);return r}const y5={useVisualState:Vb({scrapeMotionValuesFromProps:Kd,createRenderState:Ud})};function Lb(e,t){try{t.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{t.dimensions={x:0,y:0,width:0,height:0}}}function $b(e,{style:t,vars:n},o,r){Object.assign(e.style,t,r&&r.getProjectionStyles(o));for(const s in n)e.style.setProperty(s,n[s])}const _b=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 Wb(e,t,n,o){$b(e,t,void 0,o);for(const r in t.attrs)e.setAttribute(_b.has(r)?r:_d(r),t.attrs[r])}function zb(e,t,n){const o=Kd(e,t,n);for(const r in e)if(Ut(e[r])||Ut(t[r])){const s=ni.indexOf(r)!==-1?"attr"+r.charAt(0).toUpperCase()+r.substring(1):r;o[s]=e[r]}return o}const Gb=["x","y","width","height","cx","cy","r"],v5={useVisualState:Vb({scrapeMotionValuesFromProps:zb,createRenderState:Fb,onUpdate:({props:e,prevProps:t,current:n,renderState:o,latestValues:r})=>{if(!n)return;let s=!!e.drag;if(!s){for(const l in r)if(qo.has(l)){s=!0;break}}if(!s)return;let a=!t;if(t)for(let l=0;l<Gb.length;l++){const c=Gb[l];e[c]!==t[c]&&(a=!0)}a&&ht.read(()=>{Lb(n,o),ht.render(()=>{Xd(o,r,Zd(n.tagName),e.transformTemplate),Wb(n,o)})})}})};function x5(e,t){return function(o,{forwardMotionProps:r}={forwardMotionProps:!1}){const a={...Yd(o)?v5:y5,preloadedFeatures:e,useRender:f5(r),createVisualElement:t,Component:o};return G3(a)}}function Ps(e,t,n){const o=e.getProps();return Jd(o,t,n!==void 0?n:o.custom,e)}const Hb=new Set(["width","height","top","left","right","bottom",...ni]);function C5(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Is(n))}function S5(e,t){const n=Ps(e,t);let{transitionEnd:o={},transition:r={},...s}=n||{};s={...s,...o};for(const a in s){const l=m5(s[a]);C5(e,a,l)}}function w5(e){return!!(Ut(e)&&e.add)}function Qd(e,t){const n=e.getValue("willChange");if(w5(n))return n.add(t);if(!n&&Od.WillChange){const o=new Od.WillChange("auto");e.addValue("willChange",o),o.add(t)}}function Ub(e){return e.props[Eb]}const Yb=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,I5=1e-7,T5=12;function E5(e,t,n,o,r){let s,a,l=0;do a=t+(n-t)/2,s=Yb(a,o,r)-e,s>0?n=a:t=a;while(Math.abs(s)>I5&&++l<T5);return a}function As(e,t,n,o){if(e===t&&n===o)return An;const r=s=>E5(s,0,1,e,n);return s=>s===0||s===1?s:Yb(r(s),t,o)}const Xb=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Zb=e=>t=>1-e(1-t),Jb=As(.33,1.53,.69,.99),ep=Zb(Jb),qb=Xb(ep),Kb=e=>(e*=2)<1?.5*ep(e):.5*(2-Math.pow(2,-10*(e-1))),tp=e=>1-Math.sin(Math.acos(e)),Qb=Zb(tp),ey=Xb(tp),ty=e=>/^0[^.\s]+$/u.test(e);function O5(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||ty(e):!0}const Ms=e=>Math.round(e*1e5)/1e5,np=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function R5(e){return e==null}const P5=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,op=(e,t)=>n=>!!(typeof n=="string"&&P5.test(n)&&n.startsWith(e)||t&&!R5(n)&&Object.prototype.hasOwnProperty.call(n,t)),ny=(e,t,n)=>o=>{if(typeof o!="string")return o;const[r,s,a,l]=o.match(np);return{[e]:parseFloat(r),[t]:parseFloat(s),[n]:parseFloat(a),alpha:l!==void 0?parseFloat(l):1}},A5=e=>mo(0,255,e),rp={...oi,transform:e=>Math.round(A5(e))},Ko={test:op("rgb","red"),parse:ny("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:o=1})=>"rgba("+rp.transform(e)+", "+rp.transform(t)+", "+rp.transform(n)+", "+Ms(Os.transform(o))+")"};function M5(e){let t="",n="",o="",r="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),o=e.substring(5,7),r=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),o=e.substring(3,4),r=e.substring(4,5),t+=t,n+=n,o+=o,r+=r),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(o,16),alpha:r?parseInt(r,16)/255:1}}const ip={test:op("#"),parse:M5,transform:Ko.transform},ri={test:op("hsl","hue"),parse:ny("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:o=1})=>"hsla("+Math.round(e)+", "+eo.transform(Ms(t))+", "+eo.transform(Ms(n))+", "+Ms(Os.transform(o))+")"},Yt={test:e=>Ko.test(e)||ip.test(e)||ri.test(e),parse:e=>Ko.test(e)?Ko.parse(e):ri.test(e)?ri.parse(e):ip.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Ko.transform(e):ri.transform(e)},k5=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function D5(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(np))==null?void 0:t.length)||0)+(((n=e.match(k5))==null?void 0:n.length)||0)>0}const oy="number",ry="color",N5="var",j5="var(",iy="${}",F5=/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 ks(e){const t=e.toString(),n=[],o={color:[],number:[],var:[]},r=[];let s=0;const l=t.replace(F5,c=>(Yt.test(c)?(o.color.push(s),r.push(ry),n.push(Yt.parse(c))):c.startsWith(j5)?(o.var.push(s),r.push(N5),n.push(c)):(o.number.push(s),r.push(oy),n.push(parseFloat(c))),++s,iy)).split(iy);return{values:n,split:l,indexes:o,types:r}}function sy(e){return ks(e).values}function ay(e){const{split:t,types:n}=ks(e),o=t.length;return r=>{let s="";for(let a=0;a<o;a++)if(s+=t[a],r[a]!==void 0){const l=n[a];l===oy?s+=Ms(r[a]):l===ry?s+=Yt.transform(r[a]):s+=r[a]}return s}}const B5=e=>typeof e=="number"?0:e;function V5(e){const t=sy(e);return ay(e)(t.map(B5))}const Do={test:D5,parse:sy,createTransformer:ay,getAnimatableNone:V5},L5=new Set(["brightness","contrast","saturate","opacity"]);function $5(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[o]=n.match(np)||[];if(!o)return e;const r=n.replace(o,"");let s=L5.has(t)?1:0;return o!==n&&(s*=100),t+"("+s+r+")"}const _5=/\b([a-z-]*)\(.*?\)/gu,sp={...Do,getAnimatableNone:e=>{const t=e.match(_5);return t?t.map($5).join(" "):e}},W5={...Gd,color:Yt,backgroundColor:Yt,outlineColor:Yt,fill:Yt,stroke:Yt,borderColor:Yt,borderTopColor:Yt,borderRightColor:Yt,borderBottomColor:Yt,borderLeftColor:Yt,filter:sp,WebkitFilter:sp},ly=e=>W5[e];function cy(e,t){let n=ly(e);return n!==sp&&(n=Do),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const z5=new Set(["auto","none","0"]);function G5(e,t,n){let o=0,r;for(;o<e.length&&!r;){const s=e[o];typeof s=="string"&&!z5.has(s)&&ks(s).values.length&&(r=e[o]),o++}if(r&&n)for(const s of t)e[s]=cy(n,r)}const Qo=e=>e*180/Math.PI,ap=e=>{const t=Qo(Math.atan2(e[1],e[0]));return lp(t)},H5={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:ap,rotateZ:ap,skewX:e=>Qo(Math.atan(e[1])),skewY:e=>Qo(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},lp=e=>(e=e%360,e<0&&(e+=360),e),uy=ap,dy=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),py=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),U5={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:dy,scaleY:py,scale:e=>(dy(e)+py(e))/2,rotateX:e=>lp(Qo(Math.atan2(e[6],e[5]))),rotateY:e=>lp(Qo(Math.atan2(-e[2],e[0]))),rotateZ:uy,rotate:uy,skewX:e=>Qo(Math.atan(e[4])),skewY:e=>Qo(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function fy(e){return e.includes("scale")?1:0}function cp(e,t){if(!e||e==="none")return fy(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let o,r;if(n)o=U5,r=n;else{const l=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);o=H5,r=l}if(!r)return fy(t);const s=o[t],a=r[1].split(",").map(X5);return typeof s=="function"?s(a):a[s]}const Y5=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return cp(n,t)};function X5(e){return parseFloat(e.trim())}const hy=e=>e===oi||e===De,Z5=new Set(["x","y","z"]),J5=ni.filter(e=>!Z5.has(e));function q5(e){const t=[];return J5.forEach(n=>{const o=e.getValue(n);o!==void 0&&(t.push([n,o.get()]),o.set(n.startsWith("scale")?1:0))}),t}const ii={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:(e,{transform:t})=>cp(t,"x"),y:(e,{transform:t})=>cp(t,"y")};ii.translateX=ii.x,ii.translateY=ii.y;const er=new Set;let up=!1,dp=!1;function my(){if(dp){const e=Array.from(er).filter(o=>o.needsMeasurement),t=new Set(e.map(o=>o.element)),n=new Map;t.forEach(o=>{const r=q5(o);r.length&&(n.set(o,r),o.render())}),e.forEach(o=>o.measureInitialState()),t.forEach(o=>{o.render();const r=n.get(o);r&&r.forEach(([s,a])=>{var l;(l=o.getValue(s))==null||l.set(a)})}),e.forEach(o=>o.measureEndState()),e.forEach(o=>{o.suspendedScrollY!==void 0&&window.scrollTo(0,o.suspendedScrollY)})}dp=!1,up=!1,er.forEach(e=>e.complete()),er.clear()}function gy(){er.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(dp=!0)})}function K5(){gy(),my()}class pp{constructor(t,n,o,r,s,a=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=o,this.motionValue=r,this.element=s,this.isAsync=a}scheduleResolve(){this.isScheduled=!0,this.isAsync?(er.add(this),up||(up=!0,ht.read(gy),ht.resolveKeyframes(my))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:o,motionValue:r}=this;for(let s=0;s<t.length;s++)if(t[s]===null)if(s===0){const a=r==null?void 0:r.get(),l=t[t.length-1];if(a!==void 0)t[0]=a;else if(o&&n){const c=o.readValue(n,l);c!=null&&(t[0]=c)}t[0]===void 0&&(t[0]=l),r&&a===void 0&&r.set(t[0])}else t[s]=t[s-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),er.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,er.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const by=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),Q5=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function eN(e){const t=Q5.exec(e);if(!t)return[,];const[,n,o,r]=t;return[`--${n??o}`,r]}const tN=4;function yy(e,t,n=1){Ao(n<=tN,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);const[o,r]=eN(e);if(!o)return;const s=window.getComputedStyle(t).getPropertyValue(o);if(s){const a=s.trim();return by(a)?parseFloat(a):a}return zd(r)?yy(r,t,n+1):r}const vy=e=>t=>t.test(e),xy=[oi,De,eo,ko,K3,q3,{test:e=>e==="auto",parse:e=>e}],Cy=e=>xy.find(vy(e));class Sy extends pp{constructor(t,n,o,r,s){super(t,n,o,r,s,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:o}=this;if(!n||!n.current)return;super.readKeyframes();for(let c=0;c<t.length;c++){let u=t[c];if(typeof u=="string"&&(u=u.trim(),zd(u))){const d=yy(u,n.current);d!==void 0&&(t[c]=d),c===t.length-1&&(this.finalKeyframe=u)}}if(this.resolveNoneKeyframes(),!Hb.has(o)||t.length!==2)return;const[r,s]=t,a=Cy(r),l=Cy(s);if(a!==l)if(hy(a)&&hy(l))for(let c=0;c<t.length;c++){const u=t[c];typeof u=="string"&&(t[c]=parseFloat(u))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,o=[];for(let r=0;r<t.length;r++)O5(t[r])&&o.push(r);o.length&&G5(t,o,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:o}=this;if(!t||!t.current)return;o==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=ii[o](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const r=n[n.length-1];r!==void 0&&t.getValue(o,r).jump(r,!1)}measureEndState(){var l;const{element:t,name:n,unresolvedKeyframes:o}=this;if(!t||!t.current)return;const r=t.getValue(n);r&&r.jump(this.measuredOrigin,!1);const s=o.length-1,a=o[s];o[s]=ii[n](t.measureViewportBox(),window.getComputedStyle(t.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),(l=this.removedTransforms)!=null&&l.length&&this.removedTransforms.forEach(([c,u])=>{t.getValue(c).set(u)}),this.resolveNoneKeyframes()}}const wy=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Do.test(e)||e==="0")&&!e.startsWith("url("));function nN(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function oN(e,t,n,o){const r=e[0];if(r===null)return!1;if(t==="display"||t==="visibility")return!0;const s=e[e.length-1],a=wy(r,t),l=wy(s,t);return Qr(a===l,`You are trying to animate ${t} from "${r}" to "${s}". ${r} is not an animatable value - to enable this animation set ${r} to a value animatable to ${s} via the \`style\` property.`),!a||!l?!1:nN(e)||(n==="spring"||kd(n))&&o}const rN=e=>e!==null;function Nl(e,{repeat:t,repeatType:n="loop"},o){const r=e.filter(rN),s=t&&n!=="loop"&&t%2===1?0:r.length-1;return!s||o===void 0?r[s]:o}const iN=40;class Iy{constructor({autoplay:t=!0,delay:n=0,type:o="keyframes",repeat:r=0,repeatDelay:s=0,repeatType:a="loop",...l}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=Qn.now(),this.options={autoplay:t,delay:n,type:o,repeat:r,repeatDelay:s,repeatType:a,...l},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>iN?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&K5(),this._resolved}onKeyframesResolved(t,n){this.resolvedAt=Qn.now(),this.hasAttemptedResolve=!0;const{name:o,type:r,velocity:s,delay:a,onComplete:l,onUpdate:c,isGenerator:u}=this.options;if(!u&&!oN(t,o,r,s))if(a)this.options.duration=0;else{c&&c(Nl(t,this.options,n)),l&&l(),this.resolveFinishedPromise();return}const d=this.initPlayback(t,n);d!==!1&&(this._resolved={keyframes:t,finalKeyframe:n,...d},this.onPostResolved())}onPostResolved(){}then(t,n){return this.currentFinishedPromise.then(t,n)}flatten(){this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear")}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}const wt=(e,t,n)=>e+(t-e)*n;function fp(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function sN({hue:e,saturation:t,lightness:n,alpha:o}){e/=360,t/=100,n/=100;let r=0,s=0,a=0;if(!t)r=s=a=n;else{const l=n<.5?n*(1+t):n+t-n*t,c=2*n-l;r=fp(c,l,e+1/3),s=fp(c,l,e),a=fp(c,l,e-1/3)}return{red:Math.round(r*255),green:Math.round(s*255),blue:Math.round(a*255),alpha:o}}function jl(e,t){return n=>n>0?t:e}const hp=(e,t,n)=>{const o=e*e,r=n*(t*t-o)+o;return r<0?0:Math.sqrt(r)},aN=[ip,Ko,ri],lN=e=>aN.find(t=>t.test(e));function Ty(e){const t=lN(e);if(Qr(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`),!t)return!1;let n=t.parse(e);return t===ri&&(n=sN(n)),n}const Ey=(e,t)=>{const n=Ty(e),o=Ty(t);if(!n||!o)return jl(e,t);const r={...n};return s=>(r.red=hp(n.red,o.red,s),r.green=hp(n.green,o.green,s),r.blue=hp(n.blue,o.blue,s),r.alpha=wt(n.alpha,o.alpha,s),Ko.transform(r))},cN=(e,t)=>n=>t(e(n)),Ds=(...e)=>e.reduce(cN),mp=new Set(["none","hidden"]);function uN(e,t){return mp.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function dN(e,t){return n=>wt(e,t,n)}function gp(e){return typeof e=="number"?dN:typeof e=="string"?zd(e)?jl:Yt.test(e)?Ey:hN:Array.isArray(e)?Oy:typeof e=="object"?Yt.test(e)?Ey:pN:jl}function Oy(e,t){const n=[...e],o=n.length,r=e.map((s,a)=>gp(s)(s,t[a]));return s=>{for(let a=0;a<o;a++)n[a]=r[a](s);return n}}function pN(e,t){const n={...e,...t},o={};for(const r in n)e[r]!==void 0&&t[r]!==void 0&&(o[r]=gp(e[r])(e[r],t[r]));return r=>{for(const s in o)n[s]=o[s](r);return n}}function fN(e,t){const n=[],o={color:0,var:0,number:0};for(let r=0;r<t.values.length;r++){const s=t.types[r],a=e.indexes[s][o[s]],l=e.values[a]??0;n[r]=l,o[s]++}return n}const hN=(e,t)=>{const n=Do.createTransformer(t),o=ks(e),r=ks(t);return o.indexes.var.length===r.indexes.var.length&&o.indexes.color.length===r.indexes.color.length&&o.indexes.number.length>=r.indexes.number.length?mp.has(e)&&!r.values.length||mp.has(t)&&!o.values.length?uN(e,t):Ds(Oy(fN(o,r),r.values),n):(Qr(!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.`),jl(e,t))};function Ry(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?wt(e,t,n):gp(e)(e,t)}const mN=5;function Py(e,t,n){const o=Math.max(t-mN,0);return sb(n-e(o),t-o)}const It={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},Ay=.001;function gN({duration:e=It.duration,bounce:t=It.bounce,velocity:n=It.velocity,mass:o=It.mass}){let r,s;Qr(e<=Ln(It.maxDuration),"Spring duration must be 10 seconds or less");let a=1-t;a=mo(It.minDamping,It.maxDamping,a),e=mo(It.minDuration,It.maxDuration,Kn(e)),a<1?(r=u=>{const d=u*a,p=d*e,f=d-n,m=bp(u,a),g=Math.exp(-p);return Ay-f/m*g},s=u=>{const p=u*a*e,f=p*n+n,m=Math.pow(a,2)*Math.pow(u,2)*e,g=Math.exp(-p),h=bp(Math.pow(u,2),a);return(-r(u)+Ay>0?-1:1)*((f-m)*g)/h}):(r=u=>{const d=Math.exp(-u*e),p=(u-n)*e+1;return-.001+d*p},s=u=>{const d=Math.exp(-u*e),p=(n-u)*(e*e);return d*p});const l=5/e,c=yN(r,s,l);if(e=Ln(e),isNaN(c))return{stiffness:It.stiffness,damping:It.damping,duration:e};{const u=Math.pow(c,2)*o;return{stiffness:u,damping:a*2*Math.sqrt(o*u),duration:e}}}const bN=12;function yN(e,t,n){let o=n;for(let r=1;r<bN;r++)o=o-e(o)/t(o);return o}function bp(e,t){return e*Math.sqrt(1-t*t)}const vN=["duration","bounce"],xN=["stiffness","damping","mass"];function My(e,t){return t.some(n=>e[n]!==void 0)}function CN(e){let t={velocity:It.velocity,stiffness:It.stiffness,damping:It.damping,mass:It.mass,isResolvedFromDuration:!1,...e};if(!My(e,xN)&&My(e,vN))if(e.visualDuration){const n=e.visualDuration,o=2*Math.PI/(n*1.2),r=o*o,s=2*mo(.05,1,1-(e.bounce||0))*Math.sqrt(r);t={...t,mass:It.mass,stiffness:r,damping:s}}else{const n=gN(e);t={...t,...n,mass:It.mass},t.isResolvedFromDuration=!0}return t}function Fl(e=It.visualDuration,t=It.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:o,restDelta:r}=n;const s=n.keyframes[0],a=n.keyframes[n.keyframes.length-1],l={done:!1,value:s},{stiffness:c,damping:u,mass:d,duration:p,velocity:f,isResolvedFromDuration:m}=CN({...n,velocity:-Kn(n.velocity||0)}),g=f||0,h=u/(2*Math.sqrt(c*d)),y=a-s,v=Kn(Math.sqrt(c/d)),I=Math.abs(y)<5;o||(o=I?It.restSpeed.granular:It.restSpeed.default),r||(r=I?It.restDelta.granular:It.restDelta.default);let w;if(h<1){const S=bp(v,h);w=E=>{const O=Math.exp(-h*v*E);return a-O*((g+h*v*y)/S*Math.sin(S*E)+y*Math.cos(S*E))}}else if(h===1)w=S=>a-Math.exp(-v*S)*(y+(g+v*y)*S);else{const S=v*Math.sqrt(h*h-1);w=E=>{const O=Math.exp(-h*v*E),R=Math.min(S*E,300);return a-O*((g+h*v*y)*Math.sinh(R)+S*y*Math.cosh(R))/S}}const T={calculatedDuration:m&&p||null,next:S=>{const E=w(S);if(m)l.done=S>=p;else{let O=0;h<1&&(O=S===0?Ln(g):Py(w,S,E));const R=Math.abs(O)<=o,k=Math.abs(a-E)<=r;l.done=R&&k}return l.value=l.done?a:E,l},toString:()=>{const S=Math.min(Nd(T),Tl),E=cb(O=>T.next(S*O).value,S,30);return S+"ms "+E},toTransition:()=>{}};return T}Fl.applyToOptions=e=>{const t=x3(e,100,Fl);return e.ease=Cs()?t.ease:"easeOut",e.duration=Ln(t.duration),e.type="keyframes",e};function ky({keyframes:e,velocity:t=0,power:n=.8,timeConstant:o=325,bounceDamping:r=10,bounceStiffness:s=500,modifyTarget:a,min:l,max:c,restDelta:u=.5,restSpeed:d}){const p=e[0],f={done:!1,value:p},m=R=>l!==void 0&&R<l||c!==void 0&&R>c,g=R=>l===void 0?c:c===void 0||Math.abs(l-R)<Math.abs(c-R)?l:c;let h=n*t;const y=p+h,v=a===void 0?y:a(y);v!==y&&(h=v-p);const I=R=>-h*Math.exp(-R/o),w=R=>v+I(R),T=R=>{const k=I(R),D=w(R);f.done=Math.abs(k)<=u,f.value=f.done?v:D};let S,E;const O=R=>{m(f.value)&&(S=R,E=Fl({keyframes:[f.value,g(f.value)],velocity:Py(w,R,f.value),damping:r,stiffness:s,restDelta:u,restSpeed:d}))};return O(0),{calculatedDuration:null,next:R=>{let k=!1;return!E&&S===void 0&&(k=!0,T(R),O(R)),S!==void 0&&R>=S?E.next(R-S):(!k&&T(R),f)}}}const SN=As(.42,0,1,1),wN=As(0,0,.58,1),Dy=As(.42,0,.58,1),IN=e=>Array.isArray(e)&&typeof e[0]!="number",Ny={linear:An,easeIn:SN,easeInOut:Dy,easeOut:wN,circIn:tp,circInOut:ey,circOut:Qb,backIn:ep,backInOut:qb,backOut:Jb,anticipate:Kb},jy=e=>{if(Ad(e)){Ao(e.length===4,"Cubic bezier arrays must contain four numerical values.");const[t,n,o,r]=e;return As(t,n,o,r)}else if(typeof e=="string")return Ao(Ny[e]!==void 0,`Invalid easing type '${e}'`),Ny[e];return e};function TN(e,t,n){const o=[],r=n||Ry,s=e.length-1;for(let a=0;a<s;a++){let l=r(e[a],e[a+1]);if(t){const c=Array.isArray(t)?t[a]||An:t;l=Ds(c,l)}o.push(l)}return o}function EN(e,t,{clamp:n=!0,ease:o,mixer:r}={}){const s=e.length;if(Ao(s===t.length,"Both input and output ranges must be the same length"),s===1)return()=>t[0];if(s===2&&t[0]===t[1])return()=>t[1];const a=e[0]===e[1];e[0]>e[s-1]&&(e=[...e].reverse(),t=[...t].reverse());const l=TN(t,o,r),c=l.length,u=d=>{if(a&&d<e[0])return t[0];let p=0;if(c>1)for(;p<e.length-2&&!(d<e[p+1]);p++);const f=xs(e[p],e[p+1],d);return l[p](f)};return n?d=>u(mo(e[0],e[s-1],d)):u}function ON(e,t){const n=e[e.length-1];for(let o=1;o<=t;o++){const r=xs(0,t,o);e.push(wt(n,1,r))}}function RN(e){const t=[0];return ON(t,e.length-1),t}function PN(e,t){return e.map(n=>n*t)}function AN(e,t){return e.map(()=>t||Dy).splice(0,e.length-1)}function Ns({duration:e=300,keyframes:t,times:n,ease:o="easeInOut"}){const r=IN(o)?o.map(jy):jy(o),s={done:!1,value:t[0]},a=PN(n&&n.length===t.length?n:RN(t),e),l=EN(a,t,{ease:Array.isArray(r)?r:AN(t,r)});return{calculatedDuration:e,next:c=>(s.value=l(c),s.done=c>=e,s)}}const MN=e=>{const t=({timestamp:n})=>e(n);return{start:()=>ht.update(t,!0),stop:()=>Mo(t),now:()=>_t.isProcessing?_t.timestamp:Qn.now()}},kN={decay:ky,inertia:ky,tween:Ns,keyframes:Ns,spring:Fl},DN=e=>e/100;class yp extends Iy{constructor(t){super(t),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:c}=this.options;c&&c()};const{name:n,motionValue:o,element:r,keyframes:s}=this.options,a=(r==null?void 0:r.KeyframeResolver)||pp,l=(c,u)=>this.onKeyframesResolved(c,u);this.resolver=new a(s,l,n,o,r),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(t){const{type:n="keyframes",repeat:o=0,repeatDelay:r=0,repeatType:s,velocity:a=0}=this.options,l=kd(n)?n:kN[n]||Ns;let c,u;process.env.NODE_ENV!=="production"&&l!==Ns&&Ao(t.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${t}`),l!==Ns&&typeof t[0]!="number"&&(c=Ds(DN,Ry(t[0],t[1])),t=[0,100]);const d=l({...this.options,keyframes:t});s==="mirror"&&(u=l({...this.options,keyframes:[...t].reverse(),velocity:-a})),d.calculatedDuration===null&&(d.calculatedDuration=Nd(d));const{calculatedDuration:p}=d,f=p+r,m=f*(o+1)-r;return{generator:d,mirroredGenerator:u,mapPercentToKeyframes:c,calculatedDuration:p,resolvedDuration:f,totalDuration:m}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!t?this.pause():this.state=this.pendingPlayState}tick(t,n=!1){const{resolved:o}=this;if(!o){const{keyframes:R}=this.options;return{done:!0,value:R[R.length-1]}}const{finalKeyframe:r,generator:s,mirroredGenerator:a,mapPercentToKeyframes:l,keyframes:c,calculatedDuration:u,totalDuration:d,resolvedDuration:p}=o;if(this.startTime===null)return s.next(0);const{delay:f,repeat:m,repeatType:g,repeatDelay:h,onUpdate:y}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-d/this.speed,this.startTime)),n?this.currentTime=t:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const v=this.currentTime-f*(this.speed>=0?1:-1),I=this.speed>=0?v<0:v>d;this.currentTime=Math.max(v,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=d);let w=this.currentTime,T=s;if(m){const R=Math.min(this.currentTime,d)/p;let k=Math.floor(R),D=R%1;!D&&R>=1&&(D=1),D===1&&k--,k=Math.min(k,m+1),!!(k%2)&&(g==="reverse"?(D=1-D,h&&(D-=h/p)):g==="mirror"&&(T=a)),w=mo(0,1,D)*p}const S=I?{done:!1,value:c[0]}:T.next(w);l&&(S.value=l(S.value));let{done:E}=S;!I&&u!==null&&(E=this.speed>=0?this.currentTime>=d:this.currentTime<=0);const O=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&E);return O&&r!==void 0&&(S.value=Nl(c,this.options,r)),y&&y(S.value),O&&this.finish(),S}get duration(){const{resolved:t}=this;return t?Kn(t.calculatedDuration):0}get time(){return Kn(this.currentTime)}set time(t){t=Ln(t),this.currentTime=t,this.holdTime!==null||this.speed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.speed)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=Kn(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=MN,onPlay:n,startTime:o}=this.options;this.driver||(this.driver=t(s=>this.tick(s))),n&&n();const r=this.driver.now();this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=r):this.startTime=o??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=this.currentTime??0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}get finished(){return this.currentFinishedPromise}}const NN=new Set(["opacity","clipPath","filter","transform"]),jN=Rd(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),Bl=10,FN=2e4;function BN(e){return kd(e.type)||e.type==="spring"||!db(e.ease)}function VN(e,t){const n=new yp({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let o={done:!1,value:e[0]};const r=[];let s=0;for(;!o.done&&s<FN;)o=n.sample(s),r.push(o.value),s+=Bl;return{times:void 0,keyframes:r,duration:s-Bl,ease:"linear"}}const Fy={anticipate:Kb,backInOut:qb,circInOut:ey};function LN(e){return e in Fy}class By extends Iy{constructor(t){super(t);const{name:n,motionValue:o,element:r,keyframes:s}=this.options;this.resolver=new Sy(s,(a,l)=>this.onKeyframesResolved(a,l),n,o,r),this.resolver.scheduleResolve()}initPlayback(t,n){let{duration:o=300,times:r,ease:s,type:a,motionValue:l,name:c,startTime:u}=this.options;if(!l.owner||!l.owner.current)return!1;if(typeof s=="string"&&Cs()&&LN(s)&&(s=Fy[s]),BN(this.options)){const{onComplete:p,onUpdate:f,motionValue:m,element:g,...h}=this.options,y=VN(t,h);t=y.keyframes,t.length===1&&(t[1]=t[0]),o=y.duration,r=y.times,s=y.ease,a="keyframes"}const d=v3(l.owner.current,c,t,{...this.options,duration:o,times:r,ease:s});return d.startTime=u??this.calcStartTime(),this.pendingTimeline?(pb(d,this.pendingTimeline),this.pendingTimeline=void 0):d.onfinish=()=>{const{onComplete:p}=this.options;l.set(Nl(t,this.options,n)),p&&p(),this.cancel(),this.resolveFinishedPromise()},{animation:d,duration:o,times:r,type:a,ease:s,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:n}=t;return Kn(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return Kn(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:o}=n;o.currentTime=Ln(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:n}=t;return n.playbackRate}get finished(){return this.resolved.animation.finished}set speed(t){const{resolved:n}=this;if(!n)return;const{animation:o}=n;o.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:n}=t;return n.playState}get startTime(){const{resolved:t}=this;if(!t)return null;const{animation:n}=t;return n.startTime}attachTimeline(t){if(!this._resolved)this.pendingTimeline=t;else{const{resolved:n}=this;if(!n)return An;const{animation:o}=n;pb(o,t)}return An}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:t}=this;if(!t)return;const{animation:n,keyframes:o,duration:r,type:s,ease:a,times:l}=t;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:u,onUpdate:d,onComplete:p,element:f,...m}=this.options,g=new yp({...m,keyframes:o,duration:r,type:s,ease:a,times:l,isGenerator:!0}),h=Ln(this.time);u.setWithVelocity(g.sample(h-Bl).value,g.sample(h).value,Bl)}const{onStop:c}=this.options;c&&c(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:n,name:o,repeatDelay:r,repeatType:s,damping:a,type:l}=t;if(!n||!n.owner||!(n.owner.current instanceof HTMLElement))return!1;const{onUpdate:c,transformTemplate:u}=n.owner.getProps();return jN()&&o&&NN.has(o)&&(o!=="transform"||!u)&&!c&&!r&&s!=="mirror"&&a!==0&&l!=="inertia"}}const $N={type:"spring",stiffness:500,damping:25,restSpeed:10},_N=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),WN={type:"keyframes",duration:.8},zN={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},GN=(e,{keyframes:t})=>t.length>2?WN:qo.has(e)?e.startsWith("scale")?_N(t[1]):$N:zN;function HN({when:e,delay:t,delayChildren:n,staggerChildren:o,staggerDirection:r,repeat:s,repeatType:a,repeatDelay:l,from:c,elapsed:u,...d}){return!!Object.keys(d).length}const vp=(e,t,n,o={},r,s)=>a=>{const l=Dd(o,e)||{},c=l.delay||o.delay||0;let{elapsed:u=0}=o;u=u-Ln(c);let d={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...l,delay:-u,onUpdate:f=>{t.set(f),l.onUpdate&&l.onUpdate(f)},onComplete:()=>{a(),l.onComplete&&l.onComplete()},name:e,motionValue:t,element:s?void 0:r};HN(l)||(d={...d,...GN(e,d)}),d.duration&&(d.duration=Ln(d.duration)),d.repeatDelay&&(d.repeatDelay=Ln(d.repeatDelay)),d.from!==void 0&&(d.keyframes[0]=d.from);let p=!1;if((d.type===!1||d.duration===0&&!d.repeatDelay)&&(d.duration=0,d.delay===0&&(p=!0)),d.allowFlatten=!l.type&&!l.ease,p&&!s&&t.get()!==void 0){const f=Nl(d.keyframes,l);if(f!==void 0)return ht.update(()=>{d.onUpdate(f),d.onComplete()}),new g3([])}return!s&&By.supports(d)?new By(d):new yp(d)};function UN({protectedKeys:e,needsAnimating:t},n){const o=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,o}function Vy(e,t,{delay:n=0,transitionOverride:o,type:r}={}){let{transition:s=e.getDefaultTransition(),transitionEnd:a,...l}=t;o&&(s=o);const c=[],u=r&&e.animationState&&e.animationState.getState()[r];for(const d in l){const p=e.getValue(d,e.latestValues[d]??null),f=l[d];if(f===void 0||u&&UN(u,d))continue;const m={delay:n,...Dd(s||{},d)};let g=!1;if(window.MotionHandoffAnimation){const y=Ub(e);if(y){const v=window.MotionHandoffAnimation(y,d,ht);v!==null&&(m.startTime=v,g=!0)}}Qd(e,d),p.start(vp(d,p,f,e.shouldReduceMotion&&Hb.has(d)?{type:!1}:m,e,g));const h=p.animation;h&&c.push(h)}return a&&Promise.all(c).then(()=>{ht.update(()=>{a&&S5(e,a)})}),c}function xp(e,t,n={}){var c;const o=Ps(e,t,n.type==="exit"?(c=e.presenceContext)==null?void 0:c.custom:void 0);let{transition:r=e.getDefaultTransition()||{}}=o||{};n.transitionOverride&&(r=n.transitionOverride);const s=o?()=>Promise.all(Vy(e,o,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(u=0)=>{const{delayChildren:d=0,staggerChildren:p,staggerDirection:f}=r;return YN(e,t,d+u,p,f,n)}:()=>Promise.resolve(),{when:l}=r;if(l){const[u,d]=l==="beforeChildren"?[s,a]:[a,s];return u().then(()=>d())}else return Promise.all([s(),a(n.delay)])}function YN(e,t,n=0,o=0,r=1,s){const a=[],l=(e.variantChildren.size-1)*o,c=r===1?(u=0)=>u*o:(u=0)=>l-u*o;return Array.from(e.variantChildren).sort(XN).forEach((u,d)=>{u.notify("AnimationStart",t),a.push(xp(u,t,{...s,delay:n+c(d)}).then(()=>u.notify("AnimationComplete",t)))}),Promise.all(a)}function XN(e,t){return e.sortNodePosition(t)}function ZN(e,t,n={}){e.notify("AnimationStart",t);let o;if(Array.isArray(t)){const r=t.map(s=>xp(e,s,n));o=Promise.all(r)}else if(typeof t=="string")o=xp(e,t,n);else{const r=typeof t=="function"?Ps(e,t,n.custom):t;o=Promise.all(Vy(e,r,n))}return o.then(()=>{e.notify("AnimationComplete",t)})}function Ly(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let o=0;o<n;o++)if(t[o]!==e[o])return!1;return!0}const JN=$d.length;function $y(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?$y(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<JN;n++){const o=$d[n],r=e.props[o];(Ts(r)||r===!1)&&(t[o]=r)}return t}const qN=[...Ld].reverse(),KN=Ld.length;function QN(e){return t=>Promise.all(t.map(({animation:n,options:o})=>ZN(e,n,o)))}function e4(e){let t=QN(e),n=_y(),o=!0;const r=c=>(u,d)=>{var f;const p=Ps(e,d,c==="exit"?(f=e.presenceContext)==null?void 0:f.custom:void 0);if(p){const{transition:m,transitionEnd:g,...h}=p;u={...u,...h,...g}}return u};function s(c){t=c(e)}function a(c){const{props:u}=e,d=$y(e.parent)||{},p=[],f=new Set;let m={},g=1/0;for(let y=0;y<KN;y++){const v=qN[y],I=n[v],w=u[v]!==void 0?u[v]:d[v],T=Ts(w),S=v===c?I.isActive:null;S===!1&&(g=y);let E=w===d[v]&&w!==u[v]&&T;if(E&&o&&e.manuallyAnimateOnMount&&(E=!1),I.protectedKeys={...m},!I.isActive&&S===null||!w&&!I.prevProp||Al(w)||typeof w=="boolean")continue;const O=t4(I.prevProp,w);let R=O||v===c&&I.isActive&&!E&&T||y>g&&T,k=!1;const D=Array.isArray(w)?w:[w];let N=D.reduce(r(v),{});S===!1&&(N={});const{prevResolvedValues:A={}}=I,$={...A,...N},j=V=>{R=!0,f.has(V)&&(k=!0,f.delete(V)),I.needsAnimating[V]=!0;const B=e.getValue(V);B&&(B.liveStyle=!1)};for(const V in $){const B=N[V],G=A[V];if(m.hasOwnProperty(V))continue;let F=!1;qd(B)&&qd(G)?F=!Ly(B,G):F=B!==G,F?B!=null?j(V):f.add(V):B!==void 0&&f.has(V)?j(V):I.protectedKeys[V]=!0}I.prevProp=w,I.prevResolvedValues=N,I.isActive&&(m={...m,...N}),o&&e.blockInitialAnimation&&(R=!1),R&&(!(E&&O)||k)&&p.push(...D.map(V=>({animation:V,options:{type:v}})))}if(f.size){const y={};if(typeof u.initial!="boolean"){const v=Ps(e,Array.isArray(u.initial)?u.initial[0]:u.initial);v&&v.transition&&(y.transition=v.transition)}f.forEach(v=>{const I=e.getBaseTarget(v),w=e.getValue(v);w&&(w.liveStyle=!0),y[v]=I??null}),p.push({animation:y})}let h=!!p.length;return o&&(u.initial===!1||u.initial===u.animate)&&!e.manuallyAnimateOnMount&&(h=!1),o=!1,h?t(p):Promise.resolve()}function l(c,u){var p;if(n[c].isActive===u)return Promise.resolve();(p=e.variantChildren)==null||p.forEach(f=>{var m;return(m=f.animationState)==null?void 0:m.setActive(c,u)}),n[c].isActive=u;const d=a(c);for(const f in n)n[f].protectedKeys={};return d}return{animateChanges:a,setActive:l,setAnimateFunction:s,getState:()=>n,reset:()=>{n=_y(),o=!0}}}function t4(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!Ly(t,e):!1}function tr(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function _y(){return{animate:tr(!0),whileInView:tr(),whileHover:tr(),whileTap:tr(),whileDrag:tr(),whileFocus:tr(),exit:tr()}}class No{constructor(t){this.isMounted=!1,this.node=t}update(){}}class n4 extends No{constructor(t){super(t),t.animationState||(t.animationState=e4(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Al(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)==null||t.call(this)}}let o4=0;class r4 extends No{constructor(){super(...arguments),this.id=o4++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:o}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===o)return;const r=this.node.animationState.setActive("exit",!t);n&&!t&&r.then(()=>{n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const i4={animation:{Feature:n4},exit:{Feature:r4}};function js(e,t,n,o={passive:!0}){return e.addEventListener(t,n,o),()=>e.removeEventListener(t,n)}function Fs(e){return{point:{x:e.pageX,y:e.pageY}}}const s4=e=>t=>Bd(t)&&e(t,Fs(t));function Bs(e,t,n,o){return js(e,t,s4(n),o)}function Wy({top:e,left:t,right:n,bottom:o}){return{x:{min:t,max:n},y:{min:e,max:o}}}function a4({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function l4(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),o=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:o.y,right:o.x}}const zy=1e-4,c4=1-zy,u4=1+zy,Gy=.01,d4=0-Gy,p4=0+Gy;function en(e){return e.max-e.min}function f4(e,t,n){return Math.abs(e-t)<=n}function Hy(e,t,n,o=.5){e.origin=o,e.originPoint=wt(t.min,t.max,e.origin),e.scale=en(n)/en(t),e.translate=wt(n.min,n.max,e.origin)-e.originPoint,(e.scale>=c4&&e.scale<=u4||isNaN(e.scale))&&(e.scale=1),(e.translate>=d4&&e.translate<=p4||isNaN(e.translate))&&(e.translate=0)}function Vs(e,t,n,o){Hy(e.x,t.x,n.x,o?o.originX:void 0),Hy(e.y,t.y,n.y,o?o.originY:void 0)}function Uy(e,t,n){e.min=n.min+t.min,e.max=e.min+en(t)}function h4(e,t,n){Uy(e.x,t.x,n.x),Uy(e.y,t.y,n.y)}function Yy(e,t,n){e.min=t.min-n.min,e.max=e.min+en(t)}function Ls(e,t,n){Yy(e.x,t.x,n.x),Yy(e.y,t.y,n.y)}const Xy=()=>({translate:0,scale:1,origin:0,originPoint:0}),si=()=>({x:Xy(),y:Xy()}),Zy=()=>({min:0,max:0}),kt=()=>({x:Zy(),y:Zy()});function Mn(e){return[e("x"),e("y")]}function Cp(e){return e===void 0||e===1}function Sp({scale:e,scaleX:t,scaleY:n}){return!Cp(e)||!Cp(t)||!Cp(n)}function nr(e){return Sp(e)||Jy(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Jy(e){return qy(e.x)||qy(e.y)}function qy(e){return e&&e!=="0%"}function Vl(e,t,n){const o=e-n,r=t*o;return n+r}function Ky(e,t,n,o,r){return r!==void 0&&(e=Vl(e,r,o)),Vl(e,n,o)+t}function wp(e,t=0,n=1,o,r){e.min=Ky(e.min,t,n,o,r),e.max=Ky(e.max,t,n,o,r)}function Qy(e,{x:t,y:n}){wp(e.x,t.translate,t.scale,t.originPoint),wp(e.y,n.translate,n.scale,n.originPoint)}const ev=.999999999999,tv=1.0000000000001;function m4(e,t,n,o=!1){const r=n.length;if(!r)return;t.x=t.y=1;let s,a;for(let l=0;l<r;l++){s=n[l],a=s.projectionDelta;const{visualElement:c}=s.options;c&&c.props.style&&c.props.style.display==="contents"||(o&&s.options.layoutScroll&&s.scroll&&s!==s.root&&li(e,{x:-s.scroll.offset.x,y:-s.scroll.offset.y}),a&&(t.x*=a.x.scale,t.y*=a.y.scale,Qy(e,a)),o&&nr(s.latestValues)&&li(e,s.latestValues))}t.x<tv&&t.x>ev&&(t.x=1),t.y<tv&&t.y>ev&&(t.y=1)}function ai(e,t){e.min=e.min+t,e.max=e.max+t}function nv(e,t,n,o,r=.5){const s=wt(e.min,e.max,r);wp(e,t,n,s,o)}function li(e,t){nv(e.x,t.x,t.scaleX,t.scale,t.originX),nv(e.y,t.y,t.scaleY,t.scale,t.originY)}function ov(e,t){return Wy(l4(e.getBoundingClientRect(),t))}function g4(e,t,n){const o=ov(e,n),{scroll:r}=t;return r&&(ai(o.x,r.offset.x),ai(o.y,r.offset.y)),o}const rv=({current:e})=>e?e.ownerDocument.defaultView:null,iv=(e,t)=>Math.abs(e-t);function b4(e,t){const n=iv(e.x,t.x),o=iv(e.y,t.y);return Math.sqrt(n**2+o**2)}class sv{constructor(t,n,{transformPagePoint:o,contextWindow:r,dragSnapToOrigin:s=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const p=Tp(this.lastMoveEventInfo,this.history),f=this.startEvent!==null,m=b4(p.offset,{x:0,y:0})>=3;if(!f&&!m)return;const{point:g}=p,{timestamp:h}=_t;this.history.push({...g,timestamp:h});const{onStart:y,onMove:v}=this.handlers;f||(y&&y(this.lastMoveEvent,p),this.startEvent=this.lastMoveEvent),v&&v(this.lastMoveEvent,p)},this.handlePointerMove=(p,f)=>{this.lastMoveEvent=p,this.lastMoveEventInfo=Ip(f,this.transformPagePoint),ht.update(this.updatePoint,!0)},this.handlePointerUp=(p,f)=>{this.end();const{onEnd:m,onSessionEnd:g,resumeAnimation:h}=this.handlers;if(this.dragSnapToOrigin&&h&&h(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const y=Tp(p.type==="pointercancel"?this.lastMoveEventInfo:Ip(f,this.transformPagePoint),this.history);this.startEvent&&m&&m(p,y),g&&g(p,y)},!Bd(t))return;this.dragSnapToOrigin=s,this.handlers=n,this.transformPagePoint=o,this.contextWindow=r||window;const a=Fs(t),l=Ip(a,this.transformPagePoint),{point:c}=l,{timestamp:u}=_t;this.history=[{...c,timestamp:u}];const{onSessionStart:d}=n;d&&d(t,Tp(l,this.history)),this.removeListeners=Ds(Bs(this.contextWindow,"pointermove",this.handlePointerMove),Bs(this.contextWindow,"pointerup",this.handlePointerUp),Bs(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Mo(this.updatePoint)}}function Ip(e,t){return t?{point:t(e.point)}:e}function av(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Tp({point:e},t){return{point:e,delta:av(e,lv(t)),offset:av(e,y4(t)),velocity:v4(t,.1)}}function y4(e){return e[0]}function lv(e){return e[e.length-1]}function v4(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,o=null;const r=lv(e);for(;n>=0&&(o=e[n],!(r.timestamp-o.timestamp>Ln(t)));)n--;if(!o)return{x:0,y:0};const s=Kn(r.timestamp-o.timestamp);if(s===0)return{x:0,y:0};const a={x:(r.x-o.x)/s,y:(r.y-o.y)/s};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function x4(e,{min:t,max:n},o){return t!==void 0&&e<t?e=o?wt(t,e,o.min):Math.max(e,t):n!==void 0&&e>n&&(e=o?wt(n,e,o.max):Math.min(e,n)),e}function cv(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function C4(e,{top:t,left:n,bottom:o,right:r}){return{x:cv(e.x,n,r),y:cv(e.y,t,o)}}function uv(e,t){let n=t.min-e.min,o=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,o]=[o,n]),{min:n,max:o}}function S4(e,t){return{x:uv(e.x,t.x),y:uv(e.y,t.y)}}function w4(e,t){let n=.5;const o=en(e),r=en(t);return r>o?n=xs(t.min,t.max-o,e.min):o>r&&(n=xs(e.min,e.max-r,t.min)),mo(0,1,n)}function I4(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const Ep=.35;function T4(e=Ep){return e===!1?e=0:e===!0&&(e=Ep),{x:dv(e,"left","right"),y:dv(e,"top","bottom")}}function dv(e,t,n){return{min:pv(e,t),max:pv(e,n)}}function pv(e,t){return typeof e=="number"?e:e[t]||0}const E4=new WeakMap;class O4{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=kt(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:o}=this.visualElement;if(o&&o.isPresent===!1)return;const r=d=>{const{dragSnapToOrigin:p}=this.getProps();p?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(Fs(d).point)},s=(d,p)=>{const{drag:f,dragPropagation:m,onDragStart:g}=this.getProps();if(f&&!m&&(this.openDragLock&&this.openDragLock(),this.openDragLock=I3(f),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Mn(y=>{let v=this.getAxisMotionValue(y).get()||0;if(eo.test(v)){const{projection:I}=this.visualElement;if(I&&I.layout){const w=I.layout.layoutBox[y];w&&(v=en(w)*(parseFloat(v)/100))}}this.originPoint[y]=v}),g&&ht.postRender(()=>g(d,p)),Qd(this.visualElement,"transform");const{animationState:h}=this.visualElement;h&&h.setActive("whileDrag",!0)},a=(d,p)=>{const{dragPropagation:f,dragDirectionLock:m,onDirectionLock:g,onDrag:h}=this.getProps();if(!f&&!this.openDragLock)return;const{offset:y}=p;if(m&&this.currentDirection===null){this.currentDirection=R4(y),this.currentDirection!==null&&g&&g(this.currentDirection);return}this.updateAxis("x",p.point,y),this.updateAxis("y",p.point,y),this.visualElement.render(),h&&h(d,p)},l=(d,p)=>this.stop(d,p),c=()=>Mn(d=>{var p;return this.getAnimationState(d)==="paused"&&((p=this.getAxisMotionValue(d).animation)==null?void 0:p.play())}),{dragSnapToOrigin:u}=this.getProps();this.panSession=new sv(t,{onSessionStart:r,onStart:s,onMove:a,onSessionEnd:l,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,contextWindow:rv(this.visualElement)})}stop(t,n){const o=this.isDragging;if(this.cancel(),!o)return;const{velocity:r}=n;this.startAnimation(r);const{onDragEnd:s}=this.getProps();s&&ht.postRender(()=>s(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:o}=this.getProps();!o&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,o){const{drag:r}=this.getProps();if(!o||!Ll(t,r,this.currentDirection))return;const s=this.getAxisMotionValue(t);let a=this.originPoint[t]+o[t];this.constraints&&this.constraints[t]&&(a=x4(a,this.constraints[t],this.elastic[t])),s.set(a)}resolveConstraints(){var s;const{dragConstraints:t,dragElastic:n}=this.getProps(),o=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(s=this.visualElement.projection)==null?void 0:s.layout,r=this.constraints;t&&ti(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&o?this.constraints=C4(o.layoutBox,t):this.constraints=!1,this.elastic=T4(n),r!==this.constraints&&o&&this.constraints&&!this.hasMutatedConstraints&&Mn(a=>{this.constraints!==!1&&this.getAxisMotionValue(a)&&(this.constraints[a]=I4(o.layoutBox[a],this.constraints[a]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!ti(t))return!1;const o=t.current;Ao(o!==null,"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 s=g4(o,r.root,this.visualElement.getTransformPagePoint());let a=S4(r.layout.layoutBox,s);if(n){const l=n(a4(a));this.hasMutatedConstraints=!!l,l&&(a=Wy(l))}return a}startAnimation(t){const{drag:n,dragMomentum:o,dragElastic:r,dragTransition:s,dragSnapToOrigin:a,onDragTransitionEnd:l}=this.getProps(),c=this.constraints||{},u=Mn(d=>{if(!Ll(d,n,this.currentDirection))return;let p=c&&c[d]||{};a&&(p={min:0,max:0});const f=r?200:1e6,m=r?40:1e7,g={type:"inertia",velocity:o?t[d]:0,bounceStiffness:f,bounceDamping:m,timeConstant:750,restDelta:1,restSpeed:10,...s,...p};return this.startAxisValueAnimation(d,g)});return Promise.all(u).then(l)}startAxisValueAnimation(t,n){const o=this.getAxisMotionValue(t);return Qd(this.visualElement,t),o.start(vp(t,o,0,n,this.visualElement,!1))}stopAnimation(){Mn(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){Mn(t=>{var n;return(n=this.getAxisMotionValue(t).animation)==null?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)==null?void 0:n.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,o=this.visualElement.getProps(),r=o[n];return r||this.visualElement.getValue(t,(o.initial?o.initial[t]:void 0)||0)}snapToCursor(t){Mn(n=>{const{drag:o}=this.getProps();if(!Ll(n,o,this.currentDirection))return;const{projection:r}=this.visualElement,s=this.getAxisMotionValue(n);if(r&&r.layout){const{min:a,max:l}=r.layout.layoutBox[n];s.set(t[n]-wt(a,l,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:o}=this.visualElement;if(!ti(n)||!o||!this.constraints)return;this.stopAnimation();const r={x:0,y:0};Mn(a=>{const l=this.getAxisMotionValue(a);if(l&&this.constraints!==!1){const c=l.get();r[a]=w4({min:c,max:c},this.constraints[a])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",o.root&&o.root.updateScroll(),o.updateLayout(),this.resolveConstraints(),Mn(a=>{if(!Ll(a,t,null))return;const l=this.getAxisMotionValue(a),{min:c,max:u}=this.constraints[a];l.set(wt(c,u,r[a]))})}addListeners(){if(!this.visualElement.current)return;E4.set(this.visualElement,this);const t=this.visualElement.current,n=Bs(t,"pointerdown",c=>{const{drag:u,dragListener:d=!0}=this.getProps();u&&d&&this.start(c)}),o=()=>{const{dragConstraints:c}=this.getProps();ti(c)&&c.current&&(this.constraints=this.resolveRefConstraints())},{projection:r}=this.visualElement,s=r.addEventListener("measure",o);r&&!r.layout&&(r.root&&r.root.updateScroll(),r.updateLayout()),ht.read(o);const a=js(window,"resize",()=>this.scalePositionWithinConstraints()),l=r.addEventListener("didUpdate",({delta:c,hasLayoutChanged:u})=>{this.isDragging&&u&&(Mn(d=>{const p=this.getAxisMotionValue(d);p&&(this.originPoint[d]+=c[d].translate,p.set(p.get()+c[d].translate))}),this.visualElement.render())});return()=>{a(),n(),s(),l&&l()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:o=!1,dragPropagation:r=!1,dragConstraints:s=!1,dragElastic:a=Ep,dragMomentum:l=!0}=t;return{...t,drag:n,dragDirectionLock:o,dragPropagation:r,dragConstraints:s,dragElastic:a,dragMomentum:l}}}function Ll(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function R4(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class P4 extends No{constructor(t){super(t),this.removeGroupControls=An,this.removeListeners=An,this.controls=new O4(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||An}unmount(){this.removeGroupControls(),this.removeListeners()}}const fv=e=>(t,n)=>{e&&ht.postRender(()=>e(t,n))};class A4 extends No{constructor(){super(...arguments),this.removePointerDownListener=An}onPointerDown(t){this.session=new sv(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:rv(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:o,onPanEnd:r}=this.node.getProps();return{onSessionStart:fv(t),onStart:fv(n),onMove:o,onEnd:(s,a)=>{delete this.session,r&&ht.postRender(()=>r(s,a))}}}mount(){this.removePointerDownListener=Bs(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const $l={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function hv(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const $s={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(De.test(e))e=parseFloat(e);else return e;const n=hv(e,t.target.x),o=hv(e,t.target.y);return`${n}% ${o}%`}},M4={correct:(e,{treeScale:t,projectionDelta:n})=>{const o=e,r=Do.parse(e);if(r.length>5)return o;const s=Do.createTransformer(e),a=typeof r[0]!="number"?1:0,l=n.x.scale*t.x,c=n.y.scale*t.y;r[0+a]/=l,r[1+a]/=c;const u=wt(l,c,.5);return typeof r[2+a]=="number"&&(r[2+a]/=u),typeof r[3+a]=="number"&&(r[3+a]/=u),s(r)}};class k4 extends _.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:o,layoutId:r}=this.props,{projection:s}=t;J3(D4),s&&(n.group&&n.group.add(s),o&&o.register&&r&&o.register(s),s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,onExitComplete:()=>this.safeToRemove()})),$l.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:o,drag:r,isPresent:s}=this.props,a=o.projection;return a&&(a.isPresent=s,r||t.layoutDependency!==n||n===void 0||t.isPresent!==s?a.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?a.promote():a.relegate()||ht.postRender(()=>{const l=a.getStack();(!l||!l.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),jd.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:o}=this.props,{projection:r}=t;r&&(r.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(r),o&&o.deregister&&o.deregister(r))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function mv(e){const[t,n]=rb(),o=_.useContext(Cd);return b.jsx(k4,{...e,layoutGroup:o,switchLayoutGroup:_.useContext(Ob),isPresent:t,safeToRemove:n})}const D4={borderRadius:{...$s,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:$s,borderTopRightRadius:$s,borderBottomLeftRadius:$s,borderBottomRightRadius:$s,boxShadow:M4};function N4(e,t,n){const o=Ut(e)?e:Is(e);return o.start(vp("",o,t,n)),o.animation}function j4(e){return e instanceof SVGElement&&e.tagName!=="svg"}const F4=(e,t)=>e.depth-t.depth;class B4{constructor(){this.children=[],this.isDirty=!1}add(t){Td(this.children,t),this.isDirty=!0}remove(t){Ed(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(F4),this.isDirty=!1,this.children.forEach(t)}}function V4(e,t){const n=Qn.now(),o=({timestamp:r})=>{const s=r-n;s>=t&&(Mo(o),e(s-t))};return ht.read(o,!0),()=>Mo(o)}const gv=["TopLeft","TopRight","BottomLeft","BottomRight"],L4=gv.length,bv=e=>typeof e=="string"?parseFloat(e):e,yv=e=>typeof e=="number"||De.test(e);function $4(e,t,n,o,r,s){r?(e.opacity=wt(0,n.opacity??1,_4(o)),e.opacityExit=wt(t.opacity??1,0,W4(o))):s&&(e.opacity=wt(t.opacity??1,n.opacity??1,o));for(let a=0;a<L4;a++){const l=`border${gv[a]}Radius`;let c=vv(t,l),u=vv(n,l);if(c===void 0&&u===void 0)continue;c||(c=0),u||(u=0),c===0||u===0||yv(c)===yv(u)?(e[l]=Math.max(wt(bv(c),bv(u),o),0),(eo.test(u)||eo.test(c))&&(e[l]+="%")):e[l]=u}(t.rotate||n.rotate)&&(e.rotate=wt(t.rotate||0,n.rotate||0,o))}function vv(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const _4=xv(0,.5,Qb),W4=xv(.5,.95,An);function xv(e,t,n){return o=>o<e?0:o>t?1:n(xs(e,t,o))}function Cv(e,t){e.min=t.min,e.max=t.max}function kn(e,t){Cv(e.x,t.x),Cv(e.y,t.y)}function Sv(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function wv(e,t,n,o,r){return e-=t,e=Vl(e,1/n,o),r!==void 0&&(e=Vl(e,1/r,o)),e}function z4(e,t=0,n=1,o=.5,r,s=e,a=e){if(eo.test(t)&&(t=parseFloat(t),t=wt(a.min,a.max,t/100)-a.min),typeof t!="number")return;let l=wt(s.min,s.max,o);e===s&&(l-=t),e.min=wv(e.min,t,n,l,r),e.max=wv(e.max,t,n,l,r)}function Iv(e,t,[n,o,r],s,a){z4(e,t[n],t[o],t[r],t.scale,s,a)}const G4=["x","scaleX","originX"],H4=["y","scaleY","originY"];function Tv(e,t,n,o){Iv(e.x,t,G4,n?n.x:void 0,o?o.x:void 0),Iv(e.y,t,H4,n?n.y:void 0,o?o.y:void 0)}function Ev(e){return e.translate===0&&e.scale===1}function Ov(e){return Ev(e.x)&&Ev(e.y)}function Rv(e,t){return e.min===t.min&&e.max===t.max}function U4(e,t){return Rv(e.x,t.x)&&Rv(e.y,t.y)}function Pv(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Av(e,t){return Pv(e.x,t.x)&&Pv(e.y,t.y)}function Mv(e){return en(e.x)/en(e.y)}function kv(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class Y4{constructor(){this.members=[]}add(t){Td(this.members,t),t.scheduleRender()}remove(t){if(Ed(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(r=>t===r);if(n===0)return!1;let o;for(let r=n;r>=0;r--){const s=this.members[r];if(s.isPresent!==!1){o=s;break}}return o?(this.promote(o),!0):!1}promote(t,n){const o=this.lead;if(t!==o&&(this.prevLead=o,this.lead=t,t.show(),o)){o.instance&&o.scheduleRender(),t.scheduleRender(),t.resumeFrom=o,n&&(t.resumeFrom.preserveOpacity=!0),o.snapshot&&(t.snapshot=o.snapshot,t.snapshot.latestValues=o.animationValues||o.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:r}=t.options;r===!1&&o.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:o}=t;n.onExitComplete&&n.onExitComplete(),o&&o.options.onExitComplete&&o.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function X4(e,t,n){let o="";const r=e.x.translate/t.x,s=e.y.translate/t.y,a=(n==null?void 0:n.z)||0;if((r||s||a)&&(o=`translate3d(${r}px, ${s}px, ${a}px) `),(t.x!==1||t.y!==1)&&(o+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:u,rotate:d,rotateX:p,rotateY:f,skewX:m,skewY:g}=n;u&&(o=`perspective(${u}px) ${o}`),d&&(o+=`rotate(${d}deg) `),p&&(o+=`rotateX(${p}deg) `),f&&(o+=`rotateY(${f}deg) `),m&&(o+=`skewX(${m}deg) `),g&&(o+=`skewY(${g}deg) `)}const l=e.x.scale*t.x,c=e.y.scale*t.y;return(l!==1||c!==1)&&(o+=`scale(${l}, ${c})`),o||"none"}const Op=["","X","Y","Z"],Z4={visibility:"hidden"},Dv=1e3;let J4=0;function Rp(e,t,n,o){const{latestValues:r}=t;r[e]&&(n[e]=r[e],t.setStaticValue(e,0),o&&(o[e]=0))}function Nv(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=Ub(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:r,layoutId:s}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",ht,!(r||s))}const{parent:o}=e;o&&!o.hasCheckedOptimisedAppear&&Nv(o)}function jv({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:o,resetTransform:r}){return class{constructor(a={},l=t==null?void 0:t()){this.id=J4++,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,this.nodes.forEach(Q4),this.nodes.forEach(rj),this.nodes.forEach(ij),this.nodes.forEach(ej)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=a,this.root=l?l.root||l:this,this.path=l?[...l.path,l]:[],this.parent=l,this.depth=l?l.depth+1:0;for(let c=0;c<this.path.length;c++)this.path[c].shouldResetTransform=!0;this.root===this&&(this.nodes=new B4)}addEventListener(a,l){return this.eventHandlers.has(a)||this.eventHandlers.set(a,new Pd),this.eventHandlers.get(a).add(l)}notifyListeners(a,...l){const c=this.eventHandlers.get(a);c&&c.notify(...l)}hasListeners(a){return this.eventHandlers.has(a)}mount(a,l=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=j4(a),this.instance=a;const{layoutId:c,layout:u,visualElement:d}=this.options;if(d&&!d.current&&d.mount(a),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),l&&(u||c)&&(this.isLayoutDirty=!0),e){let p;const f=()=>this.root.updateBlockedByResize=!1;e(a,()=>{this.root.updateBlockedByResize=!0,p&&p(),p=V4(f,250),$l.hasAnimatedSinceResize&&($l.hasAnimatedSinceResize=!1,this.nodes.forEach(Bv))})}c&&this.root.registerSharedNode(c,this),this.options.animate!==!1&&d&&(c||u)&&this.addEventListener("didUpdate",({delta:p,hasLayoutChanged:f,hasRelativeLayoutChanged:m,layout:g})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const h=this.options.transition||d.getDefaultTransition()||uj,{onLayoutAnimationStart:y,onLayoutAnimationComplete:v}=d.getProps(),I=!this.targetLayout||!Av(this.targetLayout,g),w=!f&&m;if(this.options.layoutRoot||this.resumeFrom||w||f&&(I||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(p,w);const T={...Dd(h,"layout"),onPlay:y,onComplete:v};(d.shouldReduceMotion||this.options.layoutRoot)&&(T.delay=0,T.type=!1),this.startAnimation(T)}else f||Bv(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=g})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const a=this.getStack();a&&a.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,Mo(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(sj),this.animationId++)}getTransformTemplate(){const{visualElement:a}=this.options;return a&&a.getProps().transformTemplate}willUpdate(a=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Nv(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let d=0;d<this.path.length;d++){const p=this.path[d];p.shouldResetTransform=!0,p.updateScroll("snapshot"),p.options.layoutRoot&&p.willUpdate(!1)}const{layoutId:l,layout:c}=this.options;if(l===void 0&&!c)return;const u=this.getTransformTemplate();this.prevTransformTemplateValue=u?u(this.latestValues,""):void 0,this.updateSnapshot(),a&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Fv);return}this.isUpdating||this.nodes.forEach(nj),this.isUpdating=!1,this.nodes.forEach(oj),this.nodes.forEach(q4),this.nodes.forEach(K4),this.clearAllSnapshots();const l=Qn.now();_t.delta=mo(0,1e3/60,l-_t.timestamp),_t.timestamp=l,_t.isProcessing=!0,Fd.update.process(_t),Fd.preRender.process(_t),Fd.render.process(_t),_t.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,jd.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(tj),this.sharedNodes.forEach(aj)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,ht.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){ht.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!en(this.snapshot.measuredBox.x)&&!en(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let c=0;c<this.path.length;c++)this.path[c].updateScroll();const a=this.layout;this.layout=this.measure(!1),this.layoutCorrected=kt(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:l}=this.options;l&&l.notify("LayoutMeasure",this.layout.layoutBox,a?a.layoutBox:void 0)}updateScroll(a="measure"){let l=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===a&&(l=!1),l){const c=o(this.instance);this.scroll={animationId:this.root.animationId,phase:a,isRoot:c,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:c}}}resetTransform(){if(!r)return;const a=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,l=this.projectionDelta&&!Ov(this.projectionDelta),c=this.getTransformTemplate(),u=c?c(this.latestValues,""):void 0,d=u!==this.prevTransformTemplateValue;a&&(l||nr(this.latestValues)||d)&&(r(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(a=!0){const l=this.measurePageBox();let c=this.removeElementScroll(l);return a&&(c=this.removeTransform(c)),dj(c),{animationId:this.root.animationId,measuredBox:l,layoutBox:c,latestValues:{},source:this.id}}measurePageBox(){var u;const{visualElement:a}=this.options;if(!a)return kt();const l=a.measureViewportBox();if(!(((u=this.scroll)==null?void 0:u.wasRoot)||this.path.some(pj))){const{scroll:d}=this.root;d&&(ai(l.x,d.offset.x),ai(l.y,d.offset.y))}return l}removeElementScroll(a){var c;const l=kt();if(kn(l,a),(c=this.scroll)!=null&&c.wasRoot)return l;for(let u=0;u<this.path.length;u++){const d=this.path[u],{scroll:p,options:f}=d;d!==this.root&&p&&f.layoutScroll&&(p.wasRoot&&kn(l,a),ai(l.x,p.offset.x),ai(l.y,p.offset.y))}return l}applyTransform(a,l=!1){const c=kt();kn(c,a);for(let u=0;u<this.path.length;u++){const d=this.path[u];!l&&d.options.layoutScroll&&d.scroll&&d!==d.root&&li(c,{x:-d.scroll.offset.x,y:-d.scroll.offset.y}),nr(d.latestValues)&&li(c,d.latestValues)}return nr(this.latestValues)&&li(c,this.latestValues),c}removeTransform(a){const l=kt();kn(l,a);for(let c=0;c<this.path.length;c++){const u=this.path[c];if(!u.instance||!nr(u.latestValues))continue;Sp(u.latestValues)&&u.updateSnapshot();const d=kt(),p=u.measurePageBox();kn(d,p),Tv(l,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,d)}return nr(this.latestValues)&&Tv(l,this.latestValues),l}setTargetDelta(a){this.targetDelta=a,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(a){this.options={...this.options,...a,crossfade:a.crossfade!==void 0?a.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==_t.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(a=!1){var f;const l=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=l.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=l.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=l.isSharedProjectionDirty);const c=!!this.resumingFrom||this!==l;if(!(a||c&&this.isSharedProjectionDirty||this.isProjectionDirty||(f=this.parent)!=null&&f.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:d,layoutId:p}=this.options;if(!(!this.layout||!(d||p))){if(this.resolvedRelativeTargetAt=_t.timestamp,!this.targetDelta&&!this.relativeTarget){const m=this.getClosestProjectingParent();m&&m.layout&&this.animationProgress!==1?(this.relativeParent=m,this.forceRelativeParentToResolveTarget(),this.relativeTarget=kt(),this.relativeTargetOrigin=kt(),Ls(this.relativeTargetOrigin,this.layout.layoutBox,m.layout.layoutBox),kn(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=kt(),this.targetWithTransforms=kt()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),h4(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):kn(this.target,this.layout.layoutBox),Qy(this.target,this.targetDelta)):kn(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const m=this.getClosestProjectingParent();m&&!!m.resumingFrom==!!this.resumingFrom&&!m.options.layoutScroll&&m.target&&this.animationProgress!==1?(this.relativeParent=m,this.forceRelativeParentToResolveTarget(),this.relativeTarget=kt(),this.relativeTargetOrigin=kt(),Ls(this.relativeTargetOrigin,this.target,m.target),kn(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||Sp(this.parent.latestValues)||Jy(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var g;const a=this.getLead(),l=!!this.resumingFrom||this!==a;let c=!0;if((this.isProjectionDirty||(g=this.parent)!=null&&g.isProjectionDirty)&&(c=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===_t.timestamp&&(c=!1),c)return;const{layout:u,layoutId:d}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||d))return;kn(this.layoutCorrected,this.layout.layoutBox);const p=this.treeScale.x,f=this.treeScale.y;m4(this.layoutCorrected,this.treeScale,this.path,l),a.layout&&!a.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(a.target=a.layout.layoutBox,a.targetWithTransforms=kt());const{target:m}=a;if(!m){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Sv(this.prevProjectionDelta.x,this.projectionDelta.x),Sv(this.prevProjectionDelta.y,this.projectionDelta.y)),Vs(this.projectionDelta,this.layoutCorrected,m,this.latestValues),(this.treeScale.x!==p||this.treeScale.y!==f||!kv(this.projectionDelta.x,this.prevProjectionDelta.x)||!kv(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",m))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(a=!0){var l;if((l=this.options.visualElement)==null||l.scheduleRender(),a){const c=this.getStack();c&&c.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=si(),this.projectionDelta=si(),this.projectionDeltaWithTransform=si()}setAnimationOrigin(a,l=!1){const c=this.snapshot,u=c?c.latestValues:{},d={...this.latestValues},p=si();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!l;const f=kt(),m=c?c.source:void 0,g=this.layout?this.layout.source:void 0,h=m!==g,y=this.getStack(),v=!y||y.members.length<=1,I=!!(h&&!v&&this.options.crossfade===!0&&!this.path.some(cj));this.animationProgress=0;let w;this.mixTargetDelta=T=>{const S=T/1e3;Vv(p.x,a.x,S),Vv(p.y,a.y,S),this.setTargetDelta(p),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Ls(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),lj(this.relativeTarget,this.relativeTargetOrigin,f,S),w&&U4(this.relativeTarget,w)&&(this.isProjectionDirty=!1),w||(w=kt()),kn(w,this.relativeTarget)),h&&(this.animationValues=d,$4(d,u,this.latestValues,S,I,v)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=S},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(a){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Mo(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=ht.update(()=>{$l.hasAnimatedSinceResize=!0,this.currentAnimation=N4(0,Dv,{...a,onUpdate:l=>{this.mixTargetDelta(l),a.onUpdate&&a.onUpdate(l)},onStop:()=>{},onComplete:()=>{a.onComplete&&a.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 a=this.getStack();a&&a.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Dv),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const a=this.getLead();let{targetWithTransforms:l,target:c,layout:u,latestValues:d}=a;if(!(!l||!c||!u)){if(this!==a&&this.layout&&u&&zv(this.options.animationType,this.layout.layoutBox,u.layoutBox)){c=this.target||kt();const p=en(this.layout.layoutBox.x);c.x.min=a.target.x.min,c.x.max=c.x.min+p;const f=en(this.layout.layoutBox.y);c.y.min=a.target.y.min,c.y.max=c.y.min+f}kn(l,c),li(l,d),Vs(this.projectionDeltaWithTransform,this.layoutCorrected,l,d)}}registerSharedNode(a,l){this.sharedNodes.has(a)||this.sharedNodes.set(a,new Y4),this.sharedNodes.get(a).add(l);const u=l.options.initialPromotionConfig;l.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(l):void 0})}isLead(){const a=this.getStack();return a?a.lead===this:!0}getLead(){var l;const{layoutId:a}=this.options;return a?((l=this.getStack())==null?void 0:l.lead)||this:this}getPrevLead(){var l;const{layoutId:a}=this.options;return a?(l=this.getStack())==null?void 0:l.prevLead:void 0}getStack(){const{layoutId:a}=this.options;if(a)return this.root.sharedNodes.get(a)}promote({needsReset:a,transition:l,preserveFollowOpacity:c}={}){const u=this.getStack();u&&u.promote(this,c),a&&(this.projectionDelta=void 0,this.needsReset=!0),l&&this.setOptions({transition:l})}relegate(){const a=this.getStack();return a?a.relegate(this):!1}resetSkewAndRotation(){const{visualElement:a}=this.options;if(!a)return;let l=!1;const{latestValues:c}=a;if((c.z||c.rotate||c.rotateX||c.rotateY||c.rotateZ||c.skewX||c.skewY)&&(l=!0),!l)return;const u={};c.z&&Rp("z",a,u,this.animationValues);for(let d=0;d<Op.length;d++)Rp(`rotate${Op[d]}`,a,u,this.animationValues),Rp(`skew${Op[d]}`,a,u,this.animationValues);a.render();for(const d in u)a.setStaticValue(d,u[d]),this.animationValues&&(this.animationValues[d]=u[d]);a.scheduleRender()}getProjectionStyles(a){if(!this.instance||this.isSVG)return;if(!this.isVisible)return Z4;const l={visibility:""},c=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,l.opacity="",l.pointerEvents=Dl(a==null?void 0:a.pointerEvents)||"",l.transform=c?c(this.latestValues,""):"none",l;const u=this.getLead();if(!this.projectionDelta||!this.layout||!u.target){const m={};return this.options.layoutId&&(m.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,m.pointerEvents=Dl(a==null?void 0:a.pointerEvents)||""),this.hasProjected&&!nr(this.latestValues)&&(m.transform=c?c({},""):"none",this.hasProjected=!1),m}const d=u.animationValues||u.latestValues;this.applyTransformsToTarget(),l.transform=X4(this.projectionDeltaWithTransform,this.treeScale,d),c&&(l.transform=c(d,l.transform));const{x:p,y:f}=this.projectionDelta;l.transformOrigin=`${p.origin*100}% ${f.origin*100}% 0`,u.animationValues?l.opacity=u===this?d.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:d.opacityExit:l.opacity=u===this?d.opacity!==void 0?d.opacity:"":d.opacityExit!==void 0?d.opacityExit:0;for(const m in Es){if(d[m]===void 0)continue;const{correct:g,applyTo:h,isCSSVariable:y}=Es[m],v=l.transform==="none"?d[m]:g(d[m],u);if(h){const I=h.length;for(let w=0;w<I;w++)l[h[w]]=v}else y?this.options.visualElement.renderState.vars[m]=v:l[m]=v}return this.options.layoutId&&(l.pointerEvents=u===this?Dl(a==null?void 0:a.pointerEvents)||"":"none"),l}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(a=>{var l;return(l=a.currentAnimation)==null?void 0:l.stop()}),this.root.nodes.forEach(Fv),this.root.sharedNodes.clear()}}}function q4(e){e.updateLayout()}function K4(e){var n;const t=((n=e.resumeFrom)==null?void 0:n.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:o,measuredBox:r}=e.layout,{animationType:s}=e.options,a=t.source!==e.layout.source;s==="size"?Mn(p=>{const f=a?t.measuredBox[p]:t.layoutBox[p],m=en(f);f.min=o[p].min,f.max=f.min+m}):zv(s,t.layoutBox,o)&&Mn(p=>{const f=a?t.measuredBox[p]:t.layoutBox[p],m=en(o[p]);f.max=f.min+m,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[p].max=e.relativeTarget[p].min+m)});const l=si();Vs(l,o,t.layoutBox);const c=si();a?Vs(c,e.applyTransform(r,!0),t.measuredBox):Vs(c,o,t.layoutBox);const u=!Ov(l);let d=!1;if(!e.resumeFrom){const p=e.getClosestProjectingParent();if(p&&!p.resumeFrom){const{snapshot:f,layout:m}=p;if(f&&m){const g=kt();Ls(g,t.layoutBox,f.layoutBox);const h=kt();Ls(h,o,m.layoutBox),Av(g,h)||(d=!0),p.options.layoutRoot&&(e.relativeTarget=h,e.relativeTargetOrigin=g,e.relativeParent=p)}}}e.notifyListeners("didUpdate",{layout:o,snapshot:t,delta:c,layoutDelta:l,hasLayoutChanged:u,hasRelativeLayoutChanged:d})}else if(e.isLead()){const{onExitComplete:o}=e.options;o&&o()}e.options.transition=void 0}function Q4(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function ej(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function tj(e){e.clearSnapshot()}function Fv(e){e.clearMeasurements()}function nj(e){e.isLayoutDirty=!1}function oj(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Bv(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function rj(e){e.resolveTargetDelta()}function ij(e){e.calcProjection()}function sj(e){e.resetSkewAndRotation()}function aj(e){e.removeLeadSnapshot()}function Vv(e,t,n){e.translate=wt(t.translate,0,n),e.scale=wt(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Lv(e,t,n,o){e.min=wt(t.min,n.min,o),e.max=wt(t.max,n.max,o)}function lj(e,t,n,o){Lv(e.x,t.x,n.x,o),Lv(e.y,t.y,n.y,o)}function cj(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const uj={duration:.45,ease:[.4,0,.1,1]},$v=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),_v=$v("applewebkit/")&&!$v("chrome/")?Math.round:An;function Wv(e){e.min=_v(e.min),e.max=_v(e.max)}function dj(e){Wv(e.x),Wv(e.y)}function zv(e,t,n){return e==="position"||e==="preserve-aspect"&&!f4(Mv(t),Mv(n),.2)}function pj(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const fj=jv({attachResizeListener:(e,t)=>js(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Pp={current:void 0},Gv=jv({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Pp.current){const e=new fj({});e.mount(window),e.setOptions({layoutScroll:!0}),Pp.current=e}return Pp.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),hj={pan:{Feature:A4},drag:{Feature:P4,ProjectionNode:Gv,MeasureLayout:mv}};function Hv(e,t,n){const{props:o}=e;e.animationState&&o.whileHover&&e.animationState.setActive("whileHover",n==="Start");const r="onHover"+n,s=o[r];s&&ht.postRender(()=>s(t,Fs(t)))}class mj extends No{mount(){const{current:t}=this.node;t&&(this.unmount=E3(t,(n,o)=>(Hv(this.node,o,"Start"),r=>Hv(this.node,r,"End"))))}unmount(){}}class gj extends No{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Ds(js(this.node.current,"focus",()=>this.onFocus()),js(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Uv(e,t,n){const{props:o}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&o.whileTap&&e.animationState.setActive("whileTap",n==="Start");const r="onTap"+(n==="End"?"":n),s=o[r];s&&ht.postRender(()=>s(t,Fs(t)))}class bj extends No{mount(){const{current:t}=this.node;t&&(this.unmount=A3(t,(n,o)=>(Uv(this.node,o,"Start"),(r,{success:s})=>Uv(this.node,r,s?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Ap=new WeakMap,Mp=new WeakMap,yj=e=>{const t=Ap.get(e.target);t&&t(e)},vj=e=>{e.forEach(yj)};function xj({root:e,...t}){const n=e||document;Mp.has(n)||Mp.set(n,{});const o=Mp.get(n),r=JSON.stringify(t);return o[r]||(o[r]=new IntersectionObserver(vj,{root:e,...t})),o[r]}function Cj(e,t,n){const o=xj(t);return Ap.set(e,n),o.observe(e),()=>{Ap.delete(e),o.unobserve(e)}}const Sj={some:0,all:1};class wj extends No{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:o,amount:r="some",once:s}=t,a={root:n?n.current:void 0,rootMargin:o,threshold:typeof r=="number"?r:Sj[r]},l=c=>{const{isIntersecting:u}=c;if(this.isInView===u||(this.isInView=u,s&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:d,onViewportLeave:p}=this.node.getProps(),f=u?d:p;f&&f(c)};return Cj(this.node.current,a,l)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(Ij(t,n))&&this.startObserver()}unmount(){}}function Ij({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const Tj={inView:{Feature:wj},tap:{Feature:bj},focus:{Feature:gj},hover:{Feature:mj}},Ej={layout:{ProjectionNode:Gv,MeasureLayout:mv}},kp={current:null},Yv={current:!1};function Oj(){if(Yv.current=!0,!!wd)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>kp.current=e.matches;e.addListener(t),t()}else kp.current=!1}const Rj=[...xy,Yt,Do],Pj=e=>Rj.find(vy(e)),Aj=new WeakMap;function Mj(e,t,n){for(const o in t){const r=t[o],s=n[o];if(Ut(r))e.addValue(o,r),process.env.NODE_ENV==="development"&&Il(r.version==="12.7.3",`Attempting to mix Motion versions ${r.version} with 12.7.3 may not work as expected.`);else if(Ut(s))e.addValue(o,Is(r,{owner:e}));else if(s!==r)if(e.hasValue(o)){const a=e.getValue(o);a.liveStyle===!0?a.jump(r):a.hasAnimated||a.set(r)}else{const a=e.getStaticValue(o);e.addValue(o,Is(a!==void 0?a:r,{owner:e}))}}for(const o in n)t[o]===void 0&&e.removeValue(o);return t}const Xv=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class kj{scrapeMotionValuesFromProps(t,n,o){return{}}constructor({parent:t,props:n,presenceContext:o,reducedMotionConfig:r,blockInitialAnimation:s,visualState:a},l={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=pp,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const m=Qn.now();this.renderScheduledAt<m&&(this.renderScheduledAt=m,ht.render(this.render,!1,!0))};const{latestValues:c,renderState:u,onUpdate:d}=a;this.onUpdate=d,this.latestValues=c,this.baseTarget={...c},this.initialValues=n.initial?{...c}:{},this.renderState=u,this.parent=t,this.props=n,this.presenceContext=o,this.depth=t?t.depth+1:0,this.reducedMotionConfig=r,this.options=l,this.blockInitialAnimation=!!s,this.isControllingVariants=Ml(n),this.isVariantNode=Ib(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:p,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const m in f){const g=f[m];c[m]!==void 0&&Ut(g)&&g.set(c[m],!1)}}mount(t){this.current=t,Aj.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,o)=>this.bindToMotionValue(o,n)),Yv.current||Oj(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:kp.current,process.env.NODE_ENV!=="production"&&Il(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected."),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),Mo(this.notifyUpdate),Mo(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const o=qo.has(t);o&&this.onBindTransform&&this.onBindTransform();const r=n.on("change",l=>{this.latestValues[t]=l,this.props.onUpdate&&ht.preRender(this.notifyUpdate),o&&this.projection&&(this.projection.isTransformDirty=!0)}),s=n.on("renderRequest",this.scheduleRender);let a;window.MotionCheckAppearSync&&(a=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{r(),s(),a&&a(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in ei){const n=ei[t];if(!n)continue;const{isEnabled:o,Feature:r}=n;if(!this.features[t]&&r&&o(this.props)&&(this.features[t]=new r(this)),this.features[t]){const s=this.features[t];s.isMounted?s.update():(s.mount(),s.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):kt()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let o=0;o<Xv.length;o++){const r=Xv[o];this.propEventSubscriptions[r]&&(this.propEventSubscriptions[r](),delete this.propEventSubscriptions[r]);const s="on"+r,a=t[s];a&&(this.propEventSubscriptions[r]=this.on(r,a))}this.prevMotionValues=Mj(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue(),this.onUpdate&&this.onUpdate(this)}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const o=this.values.get(t);n!==o&&(o&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let o=this.values.get(t);return o===void 0&&n!==void 0&&(o=Is(n===null?void 0:n,{owner:this}),this.addValue(t,o)),o}readValue(t,n){let o=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return o!=null&&(typeof o=="string"&&(by(o)||ty(o))?o=parseFloat(o):!Pj(o)&&Do.test(n)&&(o=cy(t,n)),this.setBaseTarget(t,Ut(o)?o.get():o)),Ut(o)?o.get():o}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var s;const{initial:n}=this.props;let o;if(typeof n=="string"||typeof n=="object"){const a=Jd(this.props,n,(s=this.presenceContext)==null?void 0:s.custom);a&&(o=a[t])}if(n&&o!==void 0)return o;const r=this.getBaseTargetFromProps(this.props,t);return r!==void 0&&!Ut(r)?r:this.initialValues[t]!==void 0&&o===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Pd),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class Zv extends kj{constructor(){super(...arguments),this.KeyframeResolver=Sy}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:o}){delete n[t],delete o[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;Ut(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function Dj(e){return window.getComputedStyle(e)}class Nj extends Zv{constructor(){super(...arguments),this.type="html",this.renderInstance=$b}readValueFromInstance(t,n){if(qo.has(n))return Y5(t,n);{const o=Dj(t),r=(Wd(n)?o.getPropertyValue(n):o[n])||0;return typeof r=="string"?r.trim():r}}measureInstanceViewportBox(t,{transformPagePoint:n}){return ov(t,n)}build(t,n,o){Hd(t,n,o.transformTemplate)}scrapeMotionValuesFromProps(t,n,o){return Kd(t,n,o)}}class jj extends Zv{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=kt,this.updateDimensions=()=>{this.current&&!this.renderState.dimensions&&Lb(this.current,this.renderState)}}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(qo.has(n)){const o=ly(n);return o&&o.default||0}return n=_b.has(n)?n:_d(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,o){return zb(t,n,o)}onBindTransform(){this.current&&!this.renderState.dimensions&&ht.postRender(this.updateDimensions)}build(t,n,o){Xd(t,n,this.isSVGTag,o.transformTemplate)}renderInstance(t,n,o,r){Wb(t,n,o,r)}mount(t){this.isSVGTag=Zd(t.tagName),super.mount(t)}}const Fj=(e,t)=>Yd(e)?new jj(t):new Nj(t,{allowProjection:e!==_.Fragment}),Bj=x5({...i4,...Tj,...hj,...Ej},Fj),_s=B3(Bj),Vj=({showOptions:e,setShowOptions:t,buttonRef:n,options:o,onClick:r})=>{const s=_.useRef(null);return _.useEffect(()=>{let a;return e&&(a=setTimeout(()=>{const l=c=>{s!=null&&s.current&&!(s!=null&&s.current.contains(c.target))&&!(n!=null&&n.contains(c.target))&&t(!1)};document.addEventListener("mousedown",l),document._customLabelClickOutside=l},0)),()=>{clearTimeout(a),document._customLabelClickOutside&&(document.removeEventListener("mousedown",document._customLabelClickOutside),delete document._customLabelClickOutside)}},[e]),b.jsx(ns,{open:e,anchorEl:n,placement:"bottom",transition:!0,modifiers:[{name:"offset",options:{offset:[0,0]}},{name:"sameWidth",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:({state:a})=>{a.styles.popper.width=`${a.rects.reference.width}px`}}],sx:{padding:"0rem 0.6rem"},style:{zIndex:1300},ref:s,children:({TransitionProps:a})=>b.jsx(Io,{...a,timeout:100,children:b.jsx(ge,{sx:{background:l=>l.palette.primary.appBackground,border:l=>`1px solid ${l.palette.primary.notifyBorderColor}`,borderRadius:"0.7rem",width:"100%",padding:"0.3rem",maxHeight:"20rem",overflowY:"auto"},children:b.jsx(ge,{children:o==null?void 0:o.map((l,c)=>b.jsx(Oo,{sx:{opacity:1,pointerEvents:"auto",padding:"0rem",borderTop:c!==0?u=>`0.1rem solid ${u.palette.primary.notifyBorderColor}`:"none"},onClick:u=>{u.stopPropagation(),r(l)},children:b.jsx(gt,{direction:"row",alignItems:"center",justifyContent:"space-between",sx:{p:"0.5rem"},children:b.jsx(gt,{direction:"row",alignItems:"center",gap:"1rem",children:b.jsx(at,{component:"h3",sx:{color:u=>u.palette.primary.notifyActiveText,fontWeight:"300",fontSize:"1.1rem",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:l.label})})})},c))})})})})},Jv=({styles:e,label:t,disabled:n,onClick:o,...r})=>{const s=ft();let a=(t==null?void 0:t.length)*((t==null?void 0:t.length)>=10?6.5:7.5)+38||0;a=r!=null&&r.options?a+15:a;const[l,c]=_.useState(!1),u=_.useRef(null),[d,p]=_.useState(!1),[f,m]=_.useState(!1);return _.useEffect(()=>{m(e==null?void 0:e.isAnimate)},[e==null?void 0:e.isAnimate]),b.jsxs(_s.button,{ref:u,onMouseEnter:()=>f&&c(!0),onMouseLeave:()=>f&&c(!1),initial:{width:f||!t?(e==null?void 0:e.width)||"3rem":`${a/10}rem`,borderRadius:"0.7rem"},animate:{width:f?`${l?a/10:3}rem`:`${t?a/10:3}rem`},transition:{duration:.2,ease:"easeInOut"},style:{height:"3rem",outline:"none",overflow:"hidden",backgroundColor:(e==null?void 0:e.variant)!=="outlined"?(e==null?void 0:e.colorType)==="secondary"?s.palette.brandColor.blue:(e==null?void 0:e.colorType)==="danger"?s.palette.brandColor.red:(e==null?void 0:e.colorType)==="empty"?s.palette.primary.notifyButtonBackground:s.palette.brandColor.orange:s.palette.primary.notifyBackground,border:(e==null?void 0:e.variant)==="outlined"||(e==null?void 0:e.colorType)==="empty"?`0.1rem solid ${s.palette.primary.notifyBorderColor}`:"none",display:"flex",cursor:"pointer",alignItems:"center",gap:l||!f?"0.5rem":0,color:(e==null?void 0:e.variant)==="outlined"||(e==null?void 0:e.colorType)==="empty"?s.palette.primary.notifyTextColor:"white",justifyContent:l?"flex-start":"center",padding:l||!f?"1.2rem":"0.8rem",whiteSpace:"nowrap",opacity:n?.6:1,cursor:n?"auto":"pointer",...e},disabled:n,layout:!0,onClick:()=>{!(r!=null&&r.options)&&o(),r!=null&&r.options&&(p(g=>!g),m(d))},...r,children:[(e==null?void 0:e.icon)&&(!(e!=null&&e.iconPosition)||(e==null?void 0:e.iconPosition)==="start")&&b.jsx(ge,{component:"img",src:e==null?void 0:e.icon}),t&&b.jsxs(_s.div,{layout:!0,initial:{opacity:0,width:0},animate:{opacity:l||!f?1:0,width:l||!f?"auto":0},transition:{duration:.2,ease:"easeInOut",delay:l?.1:0},style:{overflow:"hidden",whiteSpace:"nowrap",display:"flex",justifyContent:"center",gap:"0.8rem"},children:[b.jsx(at,{sx:{fontSize:"1.1rem"},children:t}),(r==null?void 0:r.options)&&(d?b.jsx(ge,{component:"img",src:Ke.ArrowUpLight}):b.jsx(ge,{component:"img",src:Ke.ArrowDownLight}))]}),(e==null?void 0:e.iconPosition)==="end"&&b.jsx(ge,{component:"img",src:e==null?void 0:e.icon}),b.jsx(Vj,{showOptions:d,buttonRef:u==null?void 0:u.current,setShowOptions:p,options:r==null?void 0:r.options,onClick:o})]})};Jv.propTypes={styles:i.object.isRequired,label:i.string};function or({...e}){return b.jsx(Vn,{children:b.jsx(Jv,{...e})})}function _l({...e}){return b.jsx(Vn,{children:b.jsx(Ku,{icon:b.jsx(ge,{component:"img",src:Ke.Uncheck}),checkedIcon:b.jsx(ge,{component:"img",src:Ke.Check}),...e})})}var qv={exports:{}};(function(e,t){(function(n,o){e.exports=o()})(br,function(){var n=1e3,o=6e4,r=36e5,s="millisecond",a="second",l="minute",c="hour",u="day",d="week",p="month",f="quarter",m="year",g="date",h="Invalid Date",y=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,v=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,I={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(j){var M=["th","st","nd","rd"],P=j%100;return"["+j+(M[(P-20)%10]||M[P]||M[0])+"]"}},w=function(j,M,P){var V=String(j);return!V||V.length>=M?j:""+Array(M+1-V.length).join(P)+j},T={s:w,z:function(j){var M=-j.utcOffset(),P=Math.abs(M),V=Math.floor(P/60),B=P%60;return(M<=0?"+":"-")+w(V,2,"0")+":"+w(B,2,"0")},m:function j(M,P){if(M.date()<P.date())return-j(P,M);var V=12*(P.year()-M.year())+(P.month()-M.month()),B=M.clone().add(V,p),G=P-B<0,F=M.clone().add(V+(G?-1:1),p);return+(-(V+(P-B)/(G?B-F:F-B))||0)},a:function(j){return j<0?Math.ceil(j)||0:Math.floor(j)},p:function(j){return{M:p,y:m,w:d,d:u,D:g,h:c,m:l,s:a,ms:s,Q:f}[j]||String(j||"").toLowerCase().replace(/s$/,"")},u:function(j){return j===void 0}},S="en",E={};E[S]=I;var O="$isDayjsObject",R=function(j){return j instanceof A||!(!j||!j[O])},k=function j(M,P,V){var B;if(!M)return S;if(typeof M=="string"){var G=M.toLowerCase();E[G]&&(B=G),P&&(E[G]=P,B=G);var F=M.split("-");if(!B&&F.length>1)return j(F[0])}else{var W=M.name;E[W]=M,B=W}return!V&&B&&(S=B),B||!V&&S},D=function(j,M){if(R(j))return j.clone();var P=typeof M=="object"?M:{};return P.date=j,P.args=arguments,new A(P)},N=T;N.l=k,N.i=R,N.w=function(j,M){return D(j,{locale:M.$L,utc:M.$u,x:M.$x,$offset:M.$offset})};var A=function(){function j(P){this.$L=k(P.locale,null,!0),this.parse(P),this.$x=this.$x||P.x||{},this[O]=!0}var M=j.prototype;return M.parse=function(P){this.$d=function(V){var B=V.date,G=V.utc;if(B===null)return new Date(NaN);if(N.u(B))return new Date;if(B instanceof Date)return new Date(B);if(typeof B=="string"&&!/Z$/i.test(B)){var F=B.match(y);if(F){var W=F[2]-1||0,Z=(F[7]||"0").substring(0,3);return G?new Date(Date.UTC(F[1],W,F[3]||1,F[4]||0,F[5]||0,F[6]||0,Z)):new Date(F[1],W,F[3]||1,F[4]||0,F[5]||0,F[6]||0,Z)}}return new Date(B)}(P),this.init()},M.init=function(){var P=this.$d;this.$y=P.getFullYear(),this.$M=P.getMonth(),this.$D=P.getDate(),this.$W=P.getDay(),this.$H=P.getHours(),this.$m=P.getMinutes(),this.$s=P.getSeconds(),this.$ms=P.getMilliseconds()},M.$utils=function(){return N},M.isValid=function(){return this.$d.toString()!==h},M.isSame=function(P,V){var B=D(P);return this.startOf(V)<=B&&B<=this.endOf(V)},M.isAfter=function(P,V){return D(P)<this.startOf(V)},M.isBefore=function(P,V){return this.endOf(V)<D(P)},M.$g=function(P,V,B){return N.u(P)?this[V]:this.set(B,P)},M.unix=function(){return Math.floor(this.valueOf()/1e3)},M.valueOf=function(){return this.$d.getTime()},M.startOf=function(P,V){var B=this,G=!!N.u(V)||V,F=N.p(P),W=function(ne,Q){var J=N.w(B.$u?Date.UTC(B.$y,Q,ne):new Date(B.$y,Q,ne),B);return G?J:J.endOf(u)},Z=function(ne,Q){return N.w(B.toDate()[ne].apply(B.toDate("s"),(G?[0,0,0,0]:[23,59,59,999]).slice(Q)),B)},L=this.$W,U=this.$M,q=this.$D,Y="set"+(this.$u?"UTC":"");switch(F){case m:return G?W(1,0):W(31,11);case p:return G?W(1,U):W(0,U+1);case d:var ee=this.$locale().weekStart||0,te=(L<ee?L+7:L)-ee;return W(G?q-te:q+(6-te),U);case u:case g:return Z(Y+"Hours",0);case c:return Z(Y+"Minutes",1);case l:return Z(Y+"Seconds",2);case a:return Z(Y+"Milliseconds",3);default:return this.clone()}},M.endOf=function(P){return this.startOf(P,!1)},M.$set=function(P,V){var B,G=N.p(P),F="set"+(this.$u?"UTC":""),W=(B={},B[u]=F+"Date",B[g]=F+"Date",B[p]=F+"Month",B[m]=F+"FullYear",B[c]=F+"Hours",B[l]=F+"Minutes",B[a]=F+"Seconds",B[s]=F+"Milliseconds",B)[G],Z=G===u?this.$D+(V-this.$W):V;if(G===p||G===m){var L=this.clone().set(g,1);L.$d[W](Z),L.init(),this.$d=L.set(g,Math.min(this.$D,L.daysInMonth())).$d}else W&&this.$d[W](Z);return this.init(),this},M.set=function(P,V){return this.clone().$set(P,V)},M.get=function(P){return this[N.p(P)]()},M.add=function(P,V){var B,G=this;P=Number(P);var F=N.p(V),W=function(U){var q=D(G);return N.w(q.date(q.date()+Math.round(U*P)),G)};if(F===p)return this.set(p,this.$M+P);if(F===m)return this.set(m,this.$y+P);if(F===u)return W(1);if(F===d)return W(7);var Z=(B={},B[l]=o,B[c]=r,B[a]=n,B)[F]||1,L=this.$d.getTime()+P*Z;return N.w(L,this)},M.subtract=function(P,V){return this.add(-1*P,V)},M.format=function(P){var V=this,B=this.$locale();if(!this.isValid())return B.invalidDate||h;var G=P||"YYYY-MM-DDTHH:mm:ssZ",F=N.z(this),W=this.$H,Z=this.$m,L=this.$M,U=B.weekdays,q=B.months,Y=B.meridiem,ee=function(Q,J,z,K){return Q&&(Q[J]||Q(V,G))||z[J].slice(0,K)},te=function(Q){return N.s(W%12||12,Q,"0")},ne=Y||function(Q,J,z){var K=Q<12?"AM":"PM";return z?K.toLowerCase():K};return G.replace(v,function(Q,J){return J||function(z){switch(z){case"YY":return String(V.$y).slice(-2);case"YYYY":return N.s(V.$y,4,"0");case"M":return L+1;case"MM":return N.s(L+1,2,"0");case"MMM":return ee(B.monthsShort,L,q,3);case"MMMM":return ee(q,L);case"D":return V.$D;case"DD":return N.s(V.$D,2,"0");case"d":return String(V.$W);case"dd":return ee(B.weekdaysMin,V.$W,U,2);case"ddd":return ee(B.weekdaysShort,V.$W,U,3);case"dddd":return U[V.$W];case"H":return String(W);case"HH":return N.s(W,2,"0");case"h":return te(1);case"hh":return te(2);case"a":return ne(W,Z,!0);case"A":return ne(W,Z,!1);case"m":return String(Z);case"mm":return N.s(Z,2,"0");case"s":return String(V.$s);case"ss":return N.s(V.$s,2,"0");case"SSS":return N.s(V.$ms,3,"0");case"Z":return F}return null}(Q)||F.replace(":","")})},M.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},M.diff=function(P,V,B){var G,F=this,W=N.p(V),Z=D(P),L=(Z.utcOffset()-this.utcOffset())*o,U=this-Z,q=function(){return N.m(F,Z)};switch(W){case m:G=q()/12;break;case p:G=q();break;case f:G=q()/3;break;case d:G=(U-L)/6048e5;break;case u:G=(U-L)/864e5;break;case c:G=U/r;break;case l:G=U/o;break;case a:G=U/n;break;default:G=U}return B?G:N.a(G)},M.daysInMonth=function(){return this.endOf(p).$D},M.$locale=function(){return E[this.$L]},M.locale=function(P,V){if(!P)return this.$L;var B=this.clone(),G=k(P,V,!0);return G&&(B.$L=G),B},M.clone=function(){return N.w(this.$d,this)},M.toDate=function(){return new Date(this.valueOf())},M.toJSON=function(){return this.isValid()?this.toISOString():null},M.toISOString=function(){return this.$d.toISOString()},M.toString=function(){return this.$d.toUTCString()},j}(),$=A.prototype;return D.prototype=$,[["$ms",s],["$s",a],["$m",l],["$H",c],["$W",u],["$M",p],["$y",m],["$D",g]].forEach(function(j){$[j[1]]=function(M){return this.$g(M,j[0],j[1])}}),D.extend=function(j,M){return j.$i||(j(M,A,D),j.$i=!0),D},D.locale=k,D.isDayjs=R,D.unix=function(j){return D(1e3*j)},D.en=E[S],D.Ls=E,D.p={},D})})(qv);var Lj=qv.exports;const Vt=Vo(Lj);var Kv={exports:{}};(function(e,t){(function(n,o){e.exports=o()})(br,function(){var n="week",o="year";return function(r,s,a){var l=s.prototype;l.week=function(c){if(c===void 0&&(c=null),c!==null)return this.add(7*(c-this.week()),"day");var u=this.$locale().yearStart||1;if(this.month()===11&&this.date()>25){var d=a(this).startOf(o).add(1,o).date(u),p=a(this).endOf(n);if(d.isBefore(p))return 1}var f=a(this).startOf(o).date(u).startOf(n).subtract(1,"millisecond"),m=this.diff(f,n,!0);return m<0?a(this).startOf("week").week():Math.ceil(m)},l.weeks=function(c){return c===void 0&&(c=null),this.week(c)}}})})(Kv);var $j=Kv.exports;const _j=Vo($j);var Qv={exports:{}};(function(e,t){(function(n,o){e.exports=o()})(br,function(){var n={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},o=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,r=/\d/,s=/\d\d/,a=/\d\d?/,l=/\d*[^-_:/,()\s\d]+/,c={},u=function(y){return(y=+y)+(y>68?1900:2e3)},d=function(y){return function(v){this[y]=+v}},p=[/[+-]\d\d:?(\d\d)?|Z/,function(y){(this.zone||(this.zone={})).offset=function(v){if(!v||v==="Z")return 0;var I=v.match(/([+-]|\d\d)/g),w=60*I[1]+(+I[2]||0);return w===0?0:I[0]==="+"?-w:w}(y)}],f=function(y){var v=c[y];return v&&(v.indexOf?v:v.s.concat(v.f))},m=function(y,v){var I,w=c.meridiem;if(w){for(var T=1;T<=24;T+=1)if(y.indexOf(w(T,0,v))>-1){I=T>12;break}}else I=y===(v?"pm":"PM");return I},g={A:[l,function(y){this.afternoon=m(y,!1)}],a:[l,function(y){this.afternoon=m(y,!0)}],Q:[r,function(y){this.month=3*(y-1)+1}],S:[r,function(y){this.milliseconds=100*+y}],SS:[s,function(y){this.milliseconds=10*+y}],SSS:[/\d{3}/,function(y){this.milliseconds=+y}],s:[a,d("seconds")],ss:[a,d("seconds")],m:[a,d("minutes")],mm:[a,d("minutes")],H:[a,d("hours")],h:[a,d("hours")],HH:[a,d("hours")],hh:[a,d("hours")],D:[a,d("day")],DD:[s,d("day")],Do:[l,function(y){var v=c.ordinal,I=y.match(/\d+/);if(this.day=I[0],v)for(var w=1;w<=31;w+=1)v(w).replace(/\[|\]/g,"")===y&&(this.day=w)}],w:[a,d("week")],ww:[s,d("week")],M:[a,d("month")],MM:[s,d("month")],MMM:[l,function(y){var v=f("months"),I=(f("monthsShort")||v.map(function(w){return w.slice(0,3)})).indexOf(y)+1;if(I<1)throw new Error;this.month=I%12||I}],MMMM:[l,function(y){var v=f("months").indexOf(y)+1;if(v<1)throw new Error;this.month=v%12||v}],Y:[/[+-]?\d+/,d("year")],YY:[s,function(y){this.year=u(y)}],YYYY:[/\d{4}/,d("year")],Z:p,ZZ:p};function h(y){var v,I;v=y,I=c&&c.formats;for(var w=(y=v.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(D,N,A){var $=A&&A.toUpperCase();return N||I[A]||n[A]||I[$].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(j,M,P){return M||P.slice(1)})})).match(o),T=w.length,S=0;S<T;S+=1){var E=w[S],O=g[E],R=O&&O[0],k=O&&O[1];w[S]=k?{regex:R,parser:k}:E.replace(/^\[|\]$/g,"")}return function(D){for(var N={},A=0,$=0;A<T;A+=1){var j=w[A];if(typeof j=="string")$+=j.length;else{var M=j.regex,P=j.parser,V=D.slice($),B=M.exec(V)[0];P.call(N,B),D=D.replace(B,"")}}return function(G){var F=G.afternoon;if(F!==void 0){var W=G.hours;F?W<12&&(G.hours+=12):W===12&&(G.hours=0),delete G.afternoon}}(N),N}}return function(y,v,I){I.p.customParseFormat=!0,y&&y.parseTwoDigitYear&&(u=y.parseTwoDigitYear);var w=v.prototype,T=w.parse;w.parse=function(S){var E=S.date,O=S.utc,R=S.args;this.$u=O;var k=R[1];if(typeof k=="string"){var D=R[2]===!0,N=R[3]===!0,A=D||N,$=R[2];N&&($=R[2]),c=this.$locale(),!D&&$&&(c=I.Ls[$]),this.$d=function(V,B,G,F){try{if(["x","X"].indexOf(B)>-1)return new Date((B==="X"?1e3:1)*V);var W=h(B)(V),Z=W.year,L=W.month,U=W.day,q=W.hours,Y=W.minutes,ee=W.seconds,te=W.milliseconds,ne=W.zone,Q=W.week,J=new Date,z=U||(Z||L?1:J.getDate()),K=Z||J.getFullYear(),le=0;Z&&!L||(le=L>0?L-1:J.getMonth());var de,ue=q||0,we=Y||0,ae=ee||0,Se=te||0;return ne?new Date(Date.UTC(K,le,z,ue,we,ae,Se+60*ne.offset*1e3)):G?new Date(Date.UTC(K,le,z,ue,we,ae,Se)):(de=new Date(K,le,z,ue,we,ae,Se),Q&&(de=F(de).week(Q).toDate()),de)}catch{return new Date("")}}(E,k,O,I),this.init(),$&&$!==!0&&(this.$L=this.locale($).$L),A&&E!=this.format(k)&&(this.$d=new Date("")),c={}}else if(k instanceof Array)for(var j=k.length,M=1;M<=j;M+=1){R[1]=k[M-1];var P=I.apply(this,R);if(P.isValid()){this.$d=P.$d,this.$L=P.$L,this.init();break}M===j&&(this.$d=new Date(""))}else T.call(this,S)}}})})(Qv);var Wj=Qv.exports;const zj=Vo(Wj);var ex={exports:{}};(function(e,t){(function(n,o){e.exports=o()})(br,function(){var n={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};return function(o,r,s){var a=r.prototype,l=a.format;s.en.formats=n,a.format=function(c){c===void 0&&(c="YYYY-MM-DDTHH:mm:ssZ");var u=this.$locale().formats,d=function(p,f){return p.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(m,g,h){var y=h&&h.toUpperCase();return g||f[h]||n[h]||f[y].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(v,I,w){return I||w.slice(1)})})}(c,u===void 0?{}:u);return l.call(this,d)}}})})(ex);var Gj=ex.exports;const Hj=Vo(Gj);var tx={exports:{}};(function(e,t){(function(n,o){e.exports=o()})(br,function(){return function(n,o,r){o.prototype.isBetween=function(s,a,l,c){var u=r(s),d=r(a),p=(c=c||"()")[0]==="(",f=c[1]===")";return(p?this.isAfter(u,l):!this.isBefore(u,l))&&(f?this.isBefore(d,l):!this.isAfter(d,l))||(p?this.isBefore(u,l):!this.isAfter(u,l))&&(f?this.isAfter(d,l):!this.isBefore(d,l))}}})})(tx);var Uj=tx.exports;const Yj=Vo(Uj);var nx={exports:{}};(function(e,t){(function(n,o){e.exports=o()})(br,function(){return function(n,o){var r=o.prototype,s=r.format;r.format=function(a){var l=this,c=this.$locale();if(!this.isValid())return s.bind(this)(a);var u=this.$utils(),d=(a||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,function(p){switch(p){case"Q":return Math.ceil((l.$M+1)/3);case"Do":return c.ordinal(l.$D);case"gggg":return l.weekYear();case"GGGG":return l.isoWeekYear();case"wo":return c.ordinal(l.week(),"W");case"w":case"ww":return u.s(l.week(),p==="w"?1:2,"0");case"W":case"WW":return u.s(l.isoWeek(),p==="W"?1:2,"0");case"k":case"kk":return u.s(String(l.$H===0?24:l.$H),p==="k"?1:2,"0");case"X":return Math.floor(l.$d.getTime()/1e3);case"x":return l.$d.getTime();case"z":return"["+l.offsetName()+"]";case"zzz":return"["+l.offsetName("long")+"]";default:return p}});return s.bind(this)(d)}}})})(nx);var Xj=nx.exports;const Zj=Vo(Xj),ox=new Set;function rx(e,t="warning"){if(process.env.NODE_ENV==="production")return;const n=Array.isArray(e)?e.join(`
252
+ `),()=>{document.head.removeChild(m)}},[t]),b.jsx(c3,{isPresent:t,childRef:r,sizeRef:s,children:C.cloneElement(e,{ref:r})})}const d3=({children:e,initial:t,isPresent:n,onExitComplete:o,custom:r,presenceAffectsLayout:s,mode:a,anchorX:l})=>{const c=Sd(p3),u=_.useId(),d=_.useCallback(f=>{c.set(f,!0);for(const m of c.values())if(!m)return;o&&o()},[c,o]),p=_.useMemo(()=>({id:u,initial:t,isPresent:n,custom:r,onExitComplete:d,register:f=>(c.set(f,!1),()=>c.delete(f))}),s?[Math.random(),d]:[n,d]);return _.useMemo(()=>{c.forEach((f,m)=>c.set(m,!1))},[n]),C.useEffect(()=>{!n&&!c.size&&o&&o()},[n]),a==="popLayout"&&(e=b.jsx(u3,{isPresent:n,anchorX:l,children:e})),b.jsx(Sl.Provider,{value:p,children:e})};function p3(){return new Map}function rb(e=!0){const t=_.useContext(Sl);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:o,register:r}=t,s=_.useId();_.useEffect(()=>{if(e)return r(s)},[e]);const a=_.useCallback(()=>e&&o&&o(s),[s,o,e]);return!n&&o?[!1,a]:[!0]}const wl=e=>e.key||"";function ib(e){const t=[];return _.Children.forEach(e,n=>{_.isValidElement(n)&&t.push(n)}),t}const f3=({children:e,custom:t,initial:n=!0,onExitComplete:o,presenceAffectsLayout:r=!0,mode:s="sync",propagate:a=!1,anchorX:l="left"})=>{const[c,u]=rb(a),d=_.useMemo(()=>ib(e),[e]),p=a&&!c?[]:d.map(wl),f=_.useRef(!0),m=_.useRef(d),g=Sd(()=>new Map),[h,y]=_.useState(d),[v,I]=_.useState(d);ob(()=>{f.current=!1,m.current=d;for(let S=0;S<v.length;S++){const E=wl(v[S]);p.includes(E)?g.delete(E):g.get(E)!==!0&&g.set(E,!1)}},[v,p.length,p.join("-")]);const w=[];if(d!==h){let S=[...d];for(let E=0;E<v.length;E++){const O=v[E],R=wl(O);p.includes(R)||(S.splice(E,0,O),w.push(O))}return s==="wait"&&w.length&&(S=w),I(ib(S)),y(d),null}process.env.NODE_ENV!=="production"&&s==="wait"&&v.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`);const{forceRender:T}=_.useContext(Cd);return b.jsx(b.Fragment,{children:v.map(S=>{const E=wl(S),O=a&&!c?!1:d===v||p.includes(E),R=()=>{if(g.has(E))g.set(E,!0);else return;let k=!0;g.forEach(D=>{D||(k=!1)}),k&&(T==null||T(),I(m.current),a&&(u==null||u()),o&&o())};return b.jsx(d3,{isPresent:O,initial:!f.current||n?void 0:!1,custom:t,presenceAffectsLayout:r,mode:s,onExitComplete:O?void 0:R,anchorX:l,children:S},E)})})};function Td(e,t){e.indexOf(t)===-1&&e.push(t)}function Ed(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}let Qr=()=>{},Ao=()=>{};process.env.NODE_ENV!=="production"&&(Qr=(e,t)=>{!e&&typeof console<"u"&&console.warn(t)},Ao=(e,t)=>{if(!e)throw new Error(t)});const Od={useManualTiming:!1};function Rd(e){let t;return()=>(t===void 0&&(t=e()),t)}const An=e=>e,xs=(e,t,n)=>{const o=t-e;return o===0?1:(n-e)/o};class Pd{constructor(){this.subscriptions=[]}add(t){return Td(this.subscriptions,t),()=>Ed(this.subscriptions,t)}notify(t,n,o){const r=this.subscriptions.length;if(r)if(r===1)this.subscriptions[0](t,n,o);else for(let s=0;s<r;s++){const a=this.subscriptions[s];a&&a(t,n,o)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Ln=e=>e*1e3,Kn=e=>e/1e3;function sb(e,t){return t?e*(1e3/t):0}const ab=new Set;function Il(e,t,n){e||ab.has(t)||(console.warn(t),ab.add(t))}const h3=Rd(()=>window.ScrollTimeline!==void 0);class m3{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>t.finished))}getAll(t){return this.animations[0][t]}setAll(t,n){for(let o=0;o<this.animations.length;o++)this.animations[o][t]=n}attachTimeline(t,n){const o=this.animations.map(r=>{if(h3()&&r.attachTimeline)return r.attachTimeline(t);if(typeof n=="function")return n(r)});return()=>{o.forEach((r,s)=>{r&&r(),this.animations[s].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let n=0;n<this.animations.length;n++)t=Math.max(t,this.animations[n].duration);return t}runAll(t){this.animations.forEach(n=>n[t]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class g3 extends m3{then(t,n){return this.finished.finally(t).then(()=>{})}}const lb={value:null},Ad=e=>Array.isArray(e)&&typeof e[0]=="number",b3={};function y3(e,t){const n=Rd(e);return()=>b3[t]??n()}const Cs=y3(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),cb=(e,t,n=10)=>{let o="";const r=Math.max(Math.round(t/n),2);for(let s=0;s<r;s++)o+=e(s/(r-1))+", ";return`linear(${o.substring(0,o.length-2)})`},Ss=([e,t,n,o])=>`cubic-bezier(${e}, ${t}, ${n}, ${o})`,Md={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Ss([0,.65,.55,1]),circOut:Ss([.55,0,1,.45]),backIn:Ss([.31,.01,.66,-.59]),backOut:Ss([.33,1.53,.69,.99])};function ub(e,t){if(e)return typeof e=="function"&&Cs()?cb(e,t):Ad(e)?Ss(e):Array.isArray(e)?e.map(n=>ub(n,t)||Md.easeOut):Md[e]}function v3(e,t,n,{delay:o=0,duration:r=300,repeat:s=0,repeatType:a="loop",ease:l="easeInOut",times:c}={},u=void 0){const d={[t]:n};c&&(d.offset=c);const p=ub(l,r);return Array.isArray(p)&&(d.easing=p),e.animate(d,{delay:o,duration:r,easing:Array.isArray(p)?"linear":p,fill:"both",iterations:s+1,direction:a==="reverse"?"alternate":"normal",pseudoElement:u})}function kd(e){return typeof e=="function"&&"applyToOptions"in e}function Dd(e,t){return(e==null?void 0:e[t])??(e==null?void 0:e.default)??e}const Tl=2e4;function Nd(e){let t=0;const n=50;let o=e.next(t);for(;!o.done&&t<Tl;)t+=n,o=e.next(t);return t>=Tl?1/0:t}function x3(e,t=100,n){const o=n({...e,keyframes:[0,t]}),r=Math.min(Nd(o),Tl);return{type:"keyframes",ease:s=>o.next(r*s).value/t,duration:Kn(r)}}function db(e){return!!(typeof e=="function"&&Cs()||!e||typeof e=="string"&&(e in Md||Cs())||Ad(e)||Array.isArray(e)&&e.every(db))}function pb(e,t){e.timeline=t,e.onfinish=null}const El=["read","resolveKeyframes","update","preRender","render","postRender"];function C3(e,t){let n=new Set,o=new Set,r=!1,s=!1;const a=new WeakSet;let l={delta:0,timestamp:0,isProcessing:!1},c=0;function u(p){a.has(p)&&(d.schedule(p),e()),c++,p(l)}const d={schedule:(p,f=!1,m=!1)=>{const h=m&&r?n:o;return f&&a.add(p),h.has(p)||h.add(p),p},cancel:p=>{o.delete(p),a.delete(p)},process:p=>{if(l=p,r){s=!0;return}r=!0,[n,o]=[o,n],n.forEach(u),t&&lb.value&&lb.value.frameloop[t].push(c),c=0,n.clear(),r=!1,s&&(s=!1,d.process(p))}};return d}const S3=40;function fb(e,t){let n=!1,o=!0;const r={delta:0,timestamp:0,isProcessing:!1},s=()=>n=!0,a=El.reduce((v,I)=>(v[I]=C3(s,t?I:void 0),v),{}),{read:l,resolveKeyframes:c,update:u,preRender:d,render:p,postRender:f}=a,m=()=>{const v=performance.now();n=!1,r.delta=o?1e3/60:Math.max(Math.min(v-r.timestamp,S3),1),r.timestamp=v,r.isProcessing=!0,l.process(r),c.process(r),u.process(r),d.process(r),p.process(r),f.process(r),r.isProcessing=!1,n&&t&&(o=!1,e(m))},g=()=>{n=!0,o=!0,r.isProcessing||e(m)};return{schedule:El.reduce((v,I)=>{const w=a[I];return v[I]=(T,S=!1,E=!1)=>(n||g(),w.schedule(T,S,E)),v},{}),cancel:v=>{for(let I=0;I<El.length;I++)a[El[I]].cancel(v)},state:r,steps:a}}const{schedule:jd}=fb(queueMicrotask,!1),{schedule:ht,cancel:Mo,state:_t,steps:Fd}=fb(typeof requestAnimationFrame<"u"?requestAnimationFrame:An,!0);let Ol;function w3(){Ol=void 0}const Qn={now:()=>(Ol===void 0&&Qn.set(_t.isProcessing||Od.useManualTiming?_t.timestamp:performance.now()),Ol),set:e=>{Ol=e,queueMicrotask(w3)}},$n={x:!1,y:!1};function hb(){return $n.x||$n.y}function I3(e){return e==="x"||e==="y"?$n[e]?null:($n[e]=!0,()=>{$n[e]=!1}):$n.x||$n.y?null:($n.x=$n.y=!0,()=>{$n.x=$n.y=!1})}function T3(e,t,n){if(e instanceof EventTarget)return[e];if(typeof e=="string"){let o=document;const r=(n==null?void 0:n[e])??o.querySelectorAll(e);return r?Array.from(r):[]}return Array.from(e)}function mb(e,t){const n=T3(e),o=new AbortController,r={passive:!0,...t,signal:o.signal};return[n,r,()=>o.abort()]}function gb(e){return!(e.pointerType==="touch"||hb())}function E3(e,t,n={}){const[o,r,s]=mb(e,n),a=l=>{if(!gb(l))return;const{target:c}=l,u=t(c,l);if(typeof u!="function"||!c)return;const d=p=>{gb(p)&&(u(p),c.removeEventListener("pointerleave",d))};c.addEventListener("pointerleave",d,r)};return o.forEach(l=>{l.addEventListener("pointerenter",a,r)}),s}const bb=(e,t)=>t?e===t?!0:bb(e,t.parentElement):!1,Bd=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,O3=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function R3(e){return O3.has(e.tagName)||e.tabIndex!==-1}const ws=new WeakSet;function yb(e){return t=>{t.key==="Enter"&&e(t)}}function Vd(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const P3=(e,t)=>{const n=e.currentTarget;if(!n)return;const o=yb(()=>{if(ws.has(n))return;Vd(n,"down");const r=yb(()=>{Vd(n,"up")}),s=()=>Vd(n,"cancel");n.addEventListener("keyup",r,t),n.addEventListener("blur",s,t)});n.addEventListener("keydown",o,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",o),t)};function vb(e){return Bd(e)&&!hb()}function A3(e,t,n={}){const[o,r,s]=mb(e,n),a=l=>{const c=l.currentTarget;if(!vb(l)||ws.has(c))return;ws.add(c);const u=t(c,l),d=(m,g)=>{window.removeEventListener("pointerup",p),window.removeEventListener("pointercancel",f),!(!vb(m)||!ws.has(c))&&(ws.delete(c),typeof u=="function"&&u(m,{success:g}))},p=m=>{d(m,c===window||c===document||n.useGlobalTarget||bb(c,m.target))},f=m=>{d(m,!1)};window.addEventListener("pointerup",p,r),window.addEventListener("pointercancel",f,r)};return o.forEach(l=>{(n.useGlobalTarget?window:l).addEventListener("pointerdown",a,r),l instanceof HTMLElement&&(l.addEventListener("focus",u=>P3(u,r)),!R3(l)&&!l.hasAttribute("tabindex")&&(l.tabIndex=0))}),s}const xb=30,M3=e=>!isNaN(parseFloat(e));class k3{constructor(t,n={}){this.version="12.7.3",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(o,r=!0)=>{const s=Qn.now();this.updatedAt!==s&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(o),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),r&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=Qn.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=M3(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&Il(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new Pd);const o=this.events[t].add(n);return t==="change"?()=>{o(),ht.read(()=>{this.events.change.getSize()||this.stop()})}:o}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,o){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-o}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=Qn.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>xb)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,xb);return sb(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Is(e,t){return new k3(e,t)}const Cb=_.createContext({strict:!1}),Sb={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"]},ei={};for(const e in Sb)ei[e]={isEnabled:t=>Sb[e].some(n=>!!t[n])};function D3(e){for(const t in e)ei[t]={...ei[t],...e[t]}}const N3=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 Rl(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||N3.has(e)}let wb=e=>!Rl(e);function j3(e){e&&(wb=t=>t.startsWith("on")?!Rl(t):e(t))}try{j3(require("@emotion/is-prop-valid").default)}catch{}function F3(e,t,n){const o={};for(const r in e)r==="values"&&typeof e.values=="object"||(wb(r)||n===!0&&Rl(r)||!t&&!Rl(r)||e.draggable&&r.startsWith("onDrag"))&&(o[r]=e[r]);return o}function B3(e){if(typeof Proxy>"u")return e;const t=new Map,n=(...o)=>(process.env.NODE_ENV!=="production"&&Il(!1,"motion() is deprecated. Use motion.create() instead."),e(...o));return new Proxy(n,{get:(o,r)=>r==="create"?e:(t.has(r)||t.set(r,e(r)),t.get(r))})}const Pl=_.createContext({});function Al(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function Ts(e){return typeof e=="string"||Array.isArray(e)}const Ld=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],$d=["initial",...Ld];function Ml(e){return Al(e.animate)||$d.some(t=>Ts(e[t]))}function Ib(e){return!!(Ml(e)||e.variants)}function V3(e,t){if(Ml(e)){const{initial:n,animate:o}=e;return{initial:n===!1||Ts(n)?n:void 0,animate:Ts(o)?o:void 0}}return e.inherit!==!1?t:{}}function L3(e){const{initial:t,animate:n}=V3(e,_.useContext(Pl));return _.useMemo(()=>({initial:t,animate:n}),[Tb(t),Tb(n)])}function Tb(e){return Array.isArray(e)?e.join(" "):e}const $3=Symbol.for("motionComponentSymbol");function ti(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function _3(e,t,n){return _.useCallback(o=>{o&&e.onMount&&e.onMount(o),t&&(o?t.mount(o):t.unmount()),n&&(typeof n=="function"?n(o):ti(n)&&(n.current=o))},[t])}const _d=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Eb="data-"+_d("framerAppearId"),Ob=_.createContext({});function W3(e,t,n,o,r){var h,y;const{visualElement:s}=_.useContext(Pl),a=_.useContext(Cb),l=_.useContext(Sl),c=_.useContext(Id).reducedMotion,u=_.useRef(null);o=o||a.renderer,!u.current&&o&&(u.current=o(e,{visualState:t,parent:s,props:n,presenceContext:l,blockInitialAnimation:l?l.initial===!1:!1,reducedMotionConfig:c}));const d=u.current,p=_.useContext(Ob);d&&!d.projection&&r&&(d.type==="html"||d.type==="svg")&&z3(u.current,n,r,p);const f=_.useRef(!1);_.useInsertionEffect(()=>{d&&f.current&&d.update(n,l)});const m=n[Eb],g=_.useRef(!!m&&!((h=window.MotionHandoffIsComplete)!=null&&h.call(window,m))&&((y=window.MotionHasOptimisedAnimation)==null?void 0:y.call(window,m)));return ob(()=>{d&&(f.current=!0,window.MotionIsMounted=!0,d.updateFeatures(),jd.render(d.render),g.current&&d.animationState&&d.animationState.animateChanges())}),_.useEffect(()=>{d&&(!g.current&&d.animationState&&d.animationState.animateChanges(),g.current&&(queueMicrotask(()=>{var v;(v=window.MotionHandoffMarkAsComplete)==null||v.call(window,m)}),g.current=!1))}),d}function z3(e,t,n,o){const{layoutId:r,layout:s,drag:a,dragConstraints:l,layoutScroll:c,layoutRoot:u,layoutCrossfade:d}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:Rb(e.parent)),e.projection.setOptions({layoutId:r,layout:s,alwaysMeasureLayout:!!a||l&&ti(l),visualElement:e,animationType:typeof s=="string"?s:"both",initialPromotionConfig:o,crossfade:d,layoutScroll:c,layoutRoot:u})}function Rb(e){if(e)return e.options.allowProjection!==!1?e.projection:Rb(e.parent)}function G3({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:o,Component:r}){e&&D3(e);function s(l,c){let u;const d={..._.useContext(Id),...l,layoutId:H3(l)},{isStatic:p}=d,f=L3(l),m=o(l,p);if(!p&&wd){U3(d,e);const g=Y3(d);u=g.MeasureLayout,f.visualElement=W3(r,m,d,t,g.ProjectionNode)}return b.jsxs(Pl.Provider,{value:f,children:[u&&f.visualElement?b.jsx(u,{visualElement:f.visualElement,...d}):null,n(r,l,_3(m,f.visualElement,c),m,p,f.visualElement)]})}s.displayName=`motion.${typeof r=="string"?r:`create(${r.displayName??r.name??""})`}`;const a=_.forwardRef(s);return a[$3]=r,a}function H3({layoutId:e}){const t=_.useContext(Cd).id;return t&&e!==void 0?t+"-"+e:e}function U3(e,t){const n=_.useContext(Cb).strict;if(process.env.NODE_ENV!=="production"&&t&&n){const o="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";e.ignoreStrict?Qr(!1,o):Ao(!1,o)}}function Y3(e){const{drag:t,layout:n}=ei;if(!t&&!n)return{};const o={...t,...n};return{MeasureLayout:t!=null&&t.isEnabled(e)||n!=null&&n.isEnabled(e)?o.MeasureLayout:void 0,ProjectionNode:o.ProjectionNode}}const Pb=e=>t=>typeof t=="string"&&t.startsWith(e),Wd=Pb("--"),X3=Pb("var(--"),zd=e=>X3(e)?Z3.test(e.split("/*")[0].trim()):!1,Z3=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Es={};function J3(e){for(const t in e)Es[t]=e[t],Wd(t)&&(Es[t].isCSSVariable=!0)}const ni=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],qo=new Set(ni);function Ab(e,{layout:t,layoutId:n}){return qo.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!Es[e]||e==="opacity")}const Ut=e=>!!(e&&e.getVelocity),Mb=(e,t)=>t&&typeof e=="number"?t.transform(e):e,mo=(e,t,n)=>n>t?t:n<e?e:n,oi={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Os={...oi,transform:e=>mo(0,1,e)},kl={...oi,default:1},Rs=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),ko=Rs("deg"),eo=Rs("%"),De=Rs("px"),q3=Rs("vh"),K3=Rs("vw"),kb={...eo,parse:e=>eo.parse(e)/100,transform:e=>eo.transform(e*100)},Q3={borderWidth:De,borderTopWidth:De,borderRightWidth:De,borderBottomWidth:De,borderLeftWidth:De,borderRadius:De,radius:De,borderTopLeftRadius:De,borderTopRightRadius:De,borderBottomRightRadius:De,borderBottomLeftRadius:De,width:De,maxWidth:De,height:De,maxHeight:De,top:De,right:De,bottom:De,left:De,padding:De,paddingTop:De,paddingRight:De,paddingBottom:De,paddingLeft:De,margin:De,marginTop:De,marginRight:De,marginBottom:De,marginLeft:De,backgroundPositionX:De,backgroundPositionY:De},e5={rotate:ko,rotateX:ko,rotateY:ko,rotateZ:ko,scale:kl,scaleX:kl,scaleY:kl,scaleZ:kl,skew:ko,skewX:ko,skewY:ko,distance:De,translateX:De,translateY:De,translateZ:De,x:De,y:De,z:De,perspective:De,transformPerspective:De,opacity:Os,originX:kb,originY:kb,originZ:De},Db={...oi,transform:Math.round},Gd={...Q3,...e5,zIndex:Db,size:De,fillOpacity:Os,strokeOpacity:Os,numOctaves:Db},t5={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},n5=ni.length;function o5(e,t,n){let o="",r=!0;for(let s=0;s<n5;s++){const a=ni[s],l=e[a];if(l===void 0)continue;let c=!0;if(typeof l=="number"?c=l===(a.startsWith("scale")?1:0):c=parseFloat(l)===0,!c||n){const u=Mb(l,Gd[a]);if(!c){r=!1;const d=t5[a]||a;o+=`${d}(${u}) `}n&&(t[a]=u)}}return o=o.trim(),n?o=n(t,r?"":o):r&&(o="none"),o}function Hd(e,t,n){const{style:o,vars:r,transformOrigin:s}=e;let a=!1,l=!1;for(const c in t){const u=t[c];if(qo.has(c)){a=!0;continue}else if(Wd(c)){r[c]=u;continue}else{const d=Mb(u,Gd[c]);c.startsWith("origin")?(l=!0,s[c]=d):o[c]=d}}if(t.transform||(a||n?o.transform=o5(t,e.transform,n):o.transform&&(o.transform="none")),l){const{originX:c="50%",originY:u="50%",originZ:d=0}=s;o.transformOrigin=`${c} ${u} ${d}`}}const Ud=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Nb(e,t,n){for(const o in t)!Ut(t[o])&&!Ab(o,n)&&(e[o]=t[o])}function r5({transformTemplate:e},t){return _.useMemo(()=>{const n=Ud();return Hd(n,t,e),Object.assign({},n.vars,n.style)},[t])}function i5(e,t){const n=e.style||{},o={};return Nb(o,n,e),Object.assign(o,r5(e,t)),o}function s5(e,t){const n={},o=i5(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,o.userSelect=o.WebkitUserSelect=o.WebkitTouchCallout="none",o.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=o,n}const a5=["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 Yd(e){return typeof e!="string"||e.includes("-")?!1:!!(a5.indexOf(e)>-1||/[A-Z]/u.test(e))}const l5={offset:"stroke-dashoffset",array:"stroke-dasharray"},c5={offset:"strokeDashoffset",array:"strokeDasharray"};function u5(e,t,n=1,o=0,r=!0){e.pathLength=1;const s=r?l5:c5;e[s.offset]=De.transform(-o);const a=De.transform(t),l=De.transform(n);e[s.array]=`${a} ${l}`}function jb(e,t,n){return typeof e=="string"?e:De.transform(t+n*e)}function d5(e,t,n){const o=jb(t,e.x,e.width),r=jb(n,e.y,e.height);return`${o} ${r}`}function Xd(e,{attrX:t,attrY:n,attrScale:o,originX:r,originY:s,pathLength:a,pathSpacing:l=1,pathOffset:c=0,...u},d,p){if(Hd(e,u,p),d){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:f,style:m,dimensions:g}=e;f.transform&&(g&&(m.transform=f.transform),delete f.transform),g&&(r!==void 0||s!==void 0||m.transform)&&(m.transformOrigin=d5(g,r!==void 0?r:.5,s!==void 0?s:.5)),t!==void 0&&(f.x=t),n!==void 0&&(f.y=n),o!==void 0&&(f.scale=o),a!==void 0&&u5(f,a,l,c,!1)}const Fb=()=>({...Ud(),attrs:{}}),Zd=e=>typeof e=="string"&&e.toLowerCase()==="svg";function p5(e,t,n,o){const r=_.useMemo(()=>{const s=Fb();return Xd(s,t,Zd(o),e.transformTemplate),{...s.attrs,style:{...s.style}}},[t]);if(e.style){const s={};Nb(s,e.style,e),r.style={...s,...r.style}}return r}function f5(e=!1){return(n,o,r,{latestValues:s},a)=>{const c=(Yd(n)?p5:s5)(o,s,a,n),u=F3(o,typeof n=="string",e),d=n!==_.Fragment?{...u,...c,ref:r}:{},{children:p}=o,f=_.useMemo(()=>Ut(p)?p.get():p,[p]);return _.createElement(n,{...d,children:f})}}function Bb(e){const t=[{},{}];return e==null||e.values.forEach((n,o)=>{t[0][o]=n.get(),t[1][o]=n.getVelocity()}),t}function Jd(e,t,n,o){if(typeof t=="function"){const[r,s]=Bb(o);t=t(n!==void 0?n:e.custom,r,s)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[r,s]=Bb(o);t=t(n!==void 0?n:e.custom,r,s)}return t}const qd=e=>Array.isArray(e),h5=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),m5=e=>qd(e)?e[e.length-1]||0:e;function Dl(e){const t=Ut(e)?e.get():e;return h5(t)?t.toValue():t}function g5({scrapeMotionValuesFromProps:e,createRenderState:t,onUpdate:n},o,r,s){const a={latestValues:b5(o,r,s,e),renderState:t()};return n&&(a.onMount=l=>n({props:o,current:l,...a}),a.onUpdate=l=>n(l)),a}const Vb=e=>(t,n)=>{const o=_.useContext(Pl),r=_.useContext(Sl),s=()=>g5(e,t,o,r);return n?s():Sd(s)};function b5(e,t,n,o){const r={},s=o(e,{});for(const f in s)r[f]=Dl(s[f]);let{initial:a,animate:l}=e;const c=Ml(e),u=Ib(e);t&&u&&!c&&e.inherit!==!1&&(a===void 0&&(a=t.initial),l===void 0&&(l=t.animate));let d=n?n.initial===!1:!1;d=d||a===!1;const p=d?l:a;if(p&&typeof p!="boolean"&&!Al(p)){const f=Array.isArray(p)?p:[p];for(let m=0;m<f.length;m++){const g=Jd(e,f[m]);if(g){const{transitionEnd:h,transition:y,...v}=g;for(const I in v){let w=v[I];if(Array.isArray(w)){const T=d?w.length-1:0;w=w[T]}w!==null&&(r[I]=w)}for(const I in h)r[I]=h[I]}}}return r}function Kd(e,t,n){var s;const{style:o}=e,r={};for(const a in o)(Ut(o[a])||t.style&&Ut(t.style[a])||Ab(a,e)||((s=n==null?void 0:n.getValue(a))==null?void 0:s.liveStyle)!==void 0)&&(r[a]=o[a]);return r}const y5={useVisualState:Vb({scrapeMotionValuesFromProps:Kd,createRenderState:Ud})};function Lb(e,t){try{t.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{t.dimensions={x:0,y:0,width:0,height:0}}}function $b(e,{style:t,vars:n},o,r){Object.assign(e.style,t,r&&r.getProjectionStyles(o));for(const s in n)e.style.setProperty(s,n[s])}const _b=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 Wb(e,t,n,o){$b(e,t,void 0,o);for(const r in t.attrs)e.setAttribute(_b.has(r)?r:_d(r),t.attrs[r])}function zb(e,t,n){const o=Kd(e,t,n);for(const r in e)if(Ut(e[r])||Ut(t[r])){const s=ni.indexOf(r)!==-1?"attr"+r.charAt(0).toUpperCase()+r.substring(1):r;o[s]=e[r]}return o}const Gb=["x","y","width","height","cx","cy","r"],v5={useVisualState:Vb({scrapeMotionValuesFromProps:zb,createRenderState:Fb,onUpdate:({props:e,prevProps:t,current:n,renderState:o,latestValues:r})=>{if(!n)return;let s=!!e.drag;if(!s){for(const l in r)if(qo.has(l)){s=!0;break}}if(!s)return;let a=!t;if(t)for(let l=0;l<Gb.length;l++){const c=Gb[l];e[c]!==t[c]&&(a=!0)}a&&ht.read(()=>{Lb(n,o),ht.render(()=>{Xd(o,r,Zd(n.tagName),e.transformTemplate),Wb(n,o)})})}})};function x5(e,t){return function(o,{forwardMotionProps:r}={forwardMotionProps:!1}){const a={...Yd(o)?v5:y5,preloadedFeatures:e,useRender:f5(r),createVisualElement:t,Component:o};return G3(a)}}function Ps(e,t,n){const o=e.getProps();return Jd(o,t,n!==void 0?n:o.custom,e)}const Hb=new Set(["width","height","top","left","right","bottom",...ni]);function C5(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Is(n))}function S5(e,t){const n=Ps(e,t);let{transitionEnd:o={},transition:r={},...s}=n||{};s={...s,...o};for(const a in s){const l=m5(s[a]);C5(e,a,l)}}function w5(e){return!!(Ut(e)&&e.add)}function Qd(e,t){const n=e.getValue("willChange");if(w5(n))return n.add(t);if(!n&&Od.WillChange){const o=new Od.WillChange("auto");e.addValue("willChange",o),o.add(t)}}function Ub(e){return e.props[Eb]}const Yb=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,I5=1e-7,T5=12;function E5(e,t,n,o,r){let s,a,l=0;do a=t+(n-t)/2,s=Yb(a,o,r)-e,s>0?n=a:t=a;while(Math.abs(s)>I5&&++l<T5);return a}function As(e,t,n,o){if(e===t&&n===o)return An;const r=s=>E5(s,0,1,e,n);return s=>s===0||s===1?s:Yb(r(s),t,o)}const Xb=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Zb=e=>t=>1-e(1-t),Jb=As(.33,1.53,.69,.99),ep=Zb(Jb),qb=Xb(ep),Kb=e=>(e*=2)<1?.5*ep(e):.5*(2-Math.pow(2,-10*(e-1))),tp=e=>1-Math.sin(Math.acos(e)),Qb=Zb(tp),ey=Xb(tp),ty=e=>/^0[^.\s]+$/u.test(e);function O5(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||ty(e):!0}const Ms=e=>Math.round(e*1e5)/1e5,np=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function R5(e){return e==null}const P5=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,op=(e,t)=>n=>!!(typeof n=="string"&&P5.test(n)&&n.startsWith(e)||t&&!R5(n)&&Object.prototype.hasOwnProperty.call(n,t)),ny=(e,t,n)=>o=>{if(typeof o!="string")return o;const[r,s,a,l]=o.match(np);return{[e]:parseFloat(r),[t]:parseFloat(s),[n]:parseFloat(a),alpha:l!==void 0?parseFloat(l):1}},A5=e=>mo(0,255,e),rp={...oi,transform:e=>Math.round(A5(e))},Ko={test:op("rgb","red"),parse:ny("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:o=1})=>"rgba("+rp.transform(e)+", "+rp.transform(t)+", "+rp.transform(n)+", "+Ms(Os.transform(o))+")"};function M5(e){let t="",n="",o="",r="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),o=e.substring(5,7),r=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),o=e.substring(3,4),r=e.substring(4,5),t+=t,n+=n,o+=o,r+=r),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(o,16),alpha:r?parseInt(r,16)/255:1}}const ip={test:op("#"),parse:M5,transform:Ko.transform},ri={test:op("hsl","hue"),parse:ny("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:o=1})=>"hsla("+Math.round(e)+", "+eo.transform(Ms(t))+", "+eo.transform(Ms(n))+", "+Ms(Os.transform(o))+")"},Yt={test:e=>Ko.test(e)||ip.test(e)||ri.test(e),parse:e=>Ko.test(e)?Ko.parse(e):ri.test(e)?ri.parse(e):ip.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Ko.transform(e):ri.transform(e)},k5=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function D5(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(np))==null?void 0:t.length)||0)+(((n=e.match(k5))==null?void 0:n.length)||0)>0}const oy="number",ry="color",N5="var",j5="var(",iy="${}",F5=/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 ks(e){const t=e.toString(),n=[],o={color:[],number:[],var:[]},r=[];let s=0;const l=t.replace(F5,c=>(Yt.test(c)?(o.color.push(s),r.push(ry),n.push(Yt.parse(c))):c.startsWith(j5)?(o.var.push(s),r.push(N5),n.push(c)):(o.number.push(s),r.push(oy),n.push(parseFloat(c))),++s,iy)).split(iy);return{values:n,split:l,indexes:o,types:r}}function sy(e){return ks(e).values}function ay(e){const{split:t,types:n}=ks(e),o=t.length;return r=>{let s="";for(let a=0;a<o;a++)if(s+=t[a],r[a]!==void 0){const l=n[a];l===oy?s+=Ms(r[a]):l===ry?s+=Yt.transform(r[a]):s+=r[a]}return s}}const B5=e=>typeof e=="number"?0:e;function V5(e){const t=sy(e);return ay(e)(t.map(B5))}const Do={test:D5,parse:sy,createTransformer:ay,getAnimatableNone:V5},L5=new Set(["brightness","contrast","saturate","opacity"]);function $5(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[o]=n.match(np)||[];if(!o)return e;const r=n.replace(o,"");let s=L5.has(t)?1:0;return o!==n&&(s*=100),t+"("+s+r+")"}const _5=/\b([a-z-]*)\(.*?\)/gu,sp={...Do,getAnimatableNone:e=>{const t=e.match(_5);return t?t.map($5).join(" "):e}},W5={...Gd,color:Yt,backgroundColor:Yt,outlineColor:Yt,fill:Yt,stroke:Yt,borderColor:Yt,borderTopColor:Yt,borderRightColor:Yt,borderBottomColor:Yt,borderLeftColor:Yt,filter:sp,WebkitFilter:sp},ly=e=>W5[e];function cy(e,t){let n=ly(e);return n!==sp&&(n=Do),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const z5=new Set(["auto","none","0"]);function G5(e,t,n){let o=0,r;for(;o<e.length&&!r;){const s=e[o];typeof s=="string"&&!z5.has(s)&&ks(s).values.length&&(r=e[o]),o++}if(r&&n)for(const s of t)e[s]=cy(n,r)}const Qo=e=>e*180/Math.PI,ap=e=>{const t=Qo(Math.atan2(e[1],e[0]));return lp(t)},H5={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:ap,rotateZ:ap,skewX:e=>Qo(Math.atan(e[1])),skewY:e=>Qo(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},lp=e=>(e=e%360,e<0&&(e+=360),e),uy=ap,dy=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),py=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),U5={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:dy,scaleY:py,scale:e=>(dy(e)+py(e))/2,rotateX:e=>lp(Qo(Math.atan2(e[6],e[5]))),rotateY:e=>lp(Qo(Math.atan2(-e[2],e[0]))),rotateZ:uy,rotate:uy,skewX:e=>Qo(Math.atan(e[4])),skewY:e=>Qo(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function fy(e){return e.includes("scale")?1:0}function cp(e,t){if(!e||e==="none")return fy(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let o,r;if(n)o=U5,r=n;else{const l=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);o=H5,r=l}if(!r)return fy(t);const s=o[t],a=r[1].split(",").map(X5);return typeof s=="function"?s(a):a[s]}const Y5=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return cp(n,t)};function X5(e){return parseFloat(e.trim())}const hy=e=>e===oi||e===De,Z5=new Set(["x","y","z"]),J5=ni.filter(e=>!Z5.has(e));function q5(e){const t=[];return J5.forEach(n=>{const o=e.getValue(n);o!==void 0&&(t.push([n,o.get()]),o.set(n.startsWith("scale")?1:0))}),t}const ii={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:(e,{transform:t})=>cp(t,"x"),y:(e,{transform:t})=>cp(t,"y")};ii.translateX=ii.x,ii.translateY=ii.y;const er=new Set;let up=!1,dp=!1;function my(){if(dp){const e=Array.from(er).filter(o=>o.needsMeasurement),t=new Set(e.map(o=>o.element)),n=new Map;t.forEach(o=>{const r=q5(o);r.length&&(n.set(o,r),o.render())}),e.forEach(o=>o.measureInitialState()),t.forEach(o=>{o.render();const r=n.get(o);r&&r.forEach(([s,a])=>{var l;(l=o.getValue(s))==null||l.set(a)})}),e.forEach(o=>o.measureEndState()),e.forEach(o=>{o.suspendedScrollY!==void 0&&window.scrollTo(0,o.suspendedScrollY)})}dp=!1,up=!1,er.forEach(e=>e.complete()),er.clear()}function gy(){er.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(dp=!0)})}function K5(){gy(),my()}class pp{constructor(t,n,o,r,s,a=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=o,this.motionValue=r,this.element=s,this.isAsync=a}scheduleResolve(){this.isScheduled=!0,this.isAsync?(er.add(this),up||(up=!0,ht.read(gy),ht.resolveKeyframes(my))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:o,motionValue:r}=this;for(let s=0;s<t.length;s++)if(t[s]===null)if(s===0){const a=r==null?void 0:r.get(),l=t[t.length-1];if(a!==void 0)t[0]=a;else if(o&&n){const c=o.readValue(n,l);c!=null&&(t[0]=c)}t[0]===void 0&&(t[0]=l),r&&a===void 0&&r.set(t[0])}else t[s]=t[s-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),er.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,er.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const by=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),Q5=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function eN(e){const t=Q5.exec(e);if(!t)return[,];const[,n,o,r]=t;return[`--${n??o}`,r]}const tN=4;function yy(e,t,n=1){Ao(n<=tN,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);const[o,r]=eN(e);if(!o)return;const s=window.getComputedStyle(t).getPropertyValue(o);if(s){const a=s.trim();return by(a)?parseFloat(a):a}return zd(r)?yy(r,t,n+1):r}const vy=e=>t=>t.test(e),xy=[oi,De,eo,ko,K3,q3,{test:e=>e==="auto",parse:e=>e}],Cy=e=>xy.find(vy(e));class Sy extends pp{constructor(t,n,o,r,s){super(t,n,o,r,s,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:o}=this;if(!n||!n.current)return;super.readKeyframes();for(let c=0;c<t.length;c++){let u=t[c];if(typeof u=="string"&&(u=u.trim(),zd(u))){const d=yy(u,n.current);d!==void 0&&(t[c]=d),c===t.length-1&&(this.finalKeyframe=u)}}if(this.resolveNoneKeyframes(),!Hb.has(o)||t.length!==2)return;const[r,s]=t,a=Cy(r),l=Cy(s);if(a!==l)if(hy(a)&&hy(l))for(let c=0;c<t.length;c++){const u=t[c];typeof u=="string"&&(t[c]=parseFloat(u))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,o=[];for(let r=0;r<t.length;r++)O5(t[r])&&o.push(r);o.length&&G5(t,o,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:o}=this;if(!t||!t.current)return;o==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=ii[o](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const r=n[n.length-1];r!==void 0&&t.getValue(o,r).jump(r,!1)}measureEndState(){var l;const{element:t,name:n,unresolvedKeyframes:o}=this;if(!t||!t.current)return;const r=t.getValue(n);r&&r.jump(this.measuredOrigin,!1);const s=o.length-1,a=o[s];o[s]=ii[n](t.measureViewportBox(),window.getComputedStyle(t.current)),a!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=a),(l=this.removedTransforms)!=null&&l.length&&this.removedTransforms.forEach(([c,u])=>{t.getValue(c).set(u)}),this.resolveNoneKeyframes()}}const wy=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Do.test(e)||e==="0")&&!e.startsWith("url("));function nN(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function oN(e,t,n,o){const r=e[0];if(r===null)return!1;if(t==="display"||t==="visibility")return!0;const s=e[e.length-1],a=wy(r,t),l=wy(s,t);return Qr(a===l,`You are trying to animate ${t} from "${r}" to "${s}". ${r} is not an animatable value - to enable this animation set ${r} to a value animatable to ${s} via the \`style\` property.`),!a||!l?!1:nN(e)||(n==="spring"||kd(n))&&o}const rN=e=>e!==null;function Nl(e,{repeat:t,repeatType:n="loop"},o){const r=e.filter(rN),s=t&&n!=="loop"&&t%2===1?0:r.length-1;return!s||o===void 0?r[s]:o}const iN=40;class Iy{constructor({autoplay:t=!0,delay:n=0,type:o="keyframes",repeat:r=0,repeatDelay:s=0,repeatType:a="loop",...l}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=Qn.now(),this.options={autoplay:t,delay:n,type:o,repeat:r,repeatDelay:s,repeatType:a,...l},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>iN?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&K5(),this._resolved}onKeyframesResolved(t,n){this.resolvedAt=Qn.now(),this.hasAttemptedResolve=!0;const{name:o,type:r,velocity:s,delay:a,onComplete:l,onUpdate:c,isGenerator:u}=this.options;if(!u&&!oN(t,o,r,s))if(a)this.options.duration=0;else{c&&c(Nl(t,this.options,n)),l&&l(),this.resolveFinishedPromise();return}const d=this.initPlayback(t,n);d!==!1&&(this._resolved={keyframes:t,finalKeyframe:n,...d},this.onPostResolved())}onPostResolved(){}then(t,n){return this.currentFinishedPromise.then(t,n)}flatten(){this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear")}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}const wt=(e,t,n)=>e+(t-e)*n;function fp(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function sN({hue:e,saturation:t,lightness:n,alpha:o}){e/=360,t/=100,n/=100;let r=0,s=0,a=0;if(!t)r=s=a=n;else{const l=n<.5?n*(1+t):n+t-n*t,c=2*n-l;r=fp(c,l,e+1/3),s=fp(c,l,e),a=fp(c,l,e-1/3)}return{red:Math.round(r*255),green:Math.round(s*255),blue:Math.round(a*255),alpha:o}}function jl(e,t){return n=>n>0?t:e}const hp=(e,t,n)=>{const o=e*e,r=n*(t*t-o)+o;return r<0?0:Math.sqrt(r)},aN=[ip,Ko,ri],lN=e=>aN.find(t=>t.test(e));function Ty(e){const t=lN(e);if(Qr(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`),!t)return!1;let n=t.parse(e);return t===ri&&(n=sN(n)),n}const Ey=(e,t)=>{const n=Ty(e),o=Ty(t);if(!n||!o)return jl(e,t);const r={...n};return s=>(r.red=hp(n.red,o.red,s),r.green=hp(n.green,o.green,s),r.blue=hp(n.blue,o.blue,s),r.alpha=wt(n.alpha,o.alpha,s),Ko.transform(r))},cN=(e,t)=>n=>t(e(n)),Ds=(...e)=>e.reduce(cN),mp=new Set(["none","hidden"]);function uN(e,t){return mp.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function dN(e,t){return n=>wt(e,t,n)}function gp(e){return typeof e=="number"?dN:typeof e=="string"?zd(e)?jl:Yt.test(e)?Ey:hN:Array.isArray(e)?Oy:typeof e=="object"?Yt.test(e)?Ey:pN:jl}function Oy(e,t){const n=[...e],o=n.length,r=e.map((s,a)=>gp(s)(s,t[a]));return s=>{for(let a=0;a<o;a++)n[a]=r[a](s);return n}}function pN(e,t){const n={...e,...t},o={};for(const r in n)e[r]!==void 0&&t[r]!==void 0&&(o[r]=gp(e[r])(e[r],t[r]));return r=>{for(const s in o)n[s]=o[s](r);return n}}function fN(e,t){const n=[],o={color:0,var:0,number:0};for(let r=0;r<t.values.length;r++){const s=t.types[r],a=e.indexes[s][o[s]],l=e.values[a]??0;n[r]=l,o[s]++}return n}const hN=(e,t)=>{const n=Do.createTransformer(t),o=ks(e),r=ks(t);return o.indexes.var.length===r.indexes.var.length&&o.indexes.color.length===r.indexes.color.length&&o.indexes.number.length>=r.indexes.number.length?mp.has(e)&&!r.values.length||mp.has(t)&&!o.values.length?uN(e,t):Ds(Oy(fN(o,r),r.values),n):(Qr(!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.`),jl(e,t))};function Ry(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?wt(e,t,n):gp(e)(e,t)}const mN=5;function Py(e,t,n){const o=Math.max(t-mN,0);return sb(n-e(o),t-o)}const It={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},Ay=.001;function gN({duration:e=It.duration,bounce:t=It.bounce,velocity:n=It.velocity,mass:o=It.mass}){let r,s;Qr(e<=Ln(It.maxDuration),"Spring duration must be 10 seconds or less");let a=1-t;a=mo(It.minDamping,It.maxDamping,a),e=mo(It.minDuration,It.maxDuration,Kn(e)),a<1?(r=u=>{const d=u*a,p=d*e,f=d-n,m=bp(u,a),g=Math.exp(-p);return Ay-f/m*g},s=u=>{const p=u*a*e,f=p*n+n,m=Math.pow(a,2)*Math.pow(u,2)*e,g=Math.exp(-p),h=bp(Math.pow(u,2),a);return(-r(u)+Ay>0?-1:1)*((f-m)*g)/h}):(r=u=>{const d=Math.exp(-u*e),p=(u-n)*e+1;return-.001+d*p},s=u=>{const d=Math.exp(-u*e),p=(n-u)*(e*e);return d*p});const l=5/e,c=yN(r,s,l);if(e=Ln(e),isNaN(c))return{stiffness:It.stiffness,damping:It.damping,duration:e};{const u=Math.pow(c,2)*o;return{stiffness:u,damping:a*2*Math.sqrt(o*u),duration:e}}}const bN=12;function yN(e,t,n){let o=n;for(let r=1;r<bN;r++)o=o-e(o)/t(o);return o}function bp(e,t){return e*Math.sqrt(1-t*t)}const vN=["duration","bounce"],xN=["stiffness","damping","mass"];function My(e,t){return t.some(n=>e[n]!==void 0)}function CN(e){let t={velocity:It.velocity,stiffness:It.stiffness,damping:It.damping,mass:It.mass,isResolvedFromDuration:!1,...e};if(!My(e,xN)&&My(e,vN))if(e.visualDuration){const n=e.visualDuration,o=2*Math.PI/(n*1.2),r=o*o,s=2*mo(.05,1,1-(e.bounce||0))*Math.sqrt(r);t={...t,mass:It.mass,stiffness:r,damping:s}}else{const n=gN(e);t={...t,...n,mass:It.mass},t.isResolvedFromDuration=!0}return t}function Fl(e=It.visualDuration,t=It.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:o,restDelta:r}=n;const s=n.keyframes[0],a=n.keyframes[n.keyframes.length-1],l={done:!1,value:s},{stiffness:c,damping:u,mass:d,duration:p,velocity:f,isResolvedFromDuration:m}=CN({...n,velocity:-Kn(n.velocity||0)}),g=f||0,h=u/(2*Math.sqrt(c*d)),y=a-s,v=Kn(Math.sqrt(c/d)),I=Math.abs(y)<5;o||(o=I?It.restSpeed.granular:It.restSpeed.default),r||(r=I?It.restDelta.granular:It.restDelta.default);let w;if(h<1){const S=bp(v,h);w=E=>{const O=Math.exp(-h*v*E);return a-O*((g+h*v*y)/S*Math.sin(S*E)+y*Math.cos(S*E))}}else if(h===1)w=S=>a-Math.exp(-v*S)*(y+(g+v*y)*S);else{const S=v*Math.sqrt(h*h-1);w=E=>{const O=Math.exp(-h*v*E),R=Math.min(S*E,300);return a-O*((g+h*v*y)*Math.sinh(R)+S*y*Math.cosh(R))/S}}const T={calculatedDuration:m&&p||null,next:S=>{const E=w(S);if(m)l.done=S>=p;else{let O=0;h<1&&(O=S===0?Ln(g):Py(w,S,E));const R=Math.abs(O)<=o,k=Math.abs(a-E)<=r;l.done=R&&k}return l.value=l.done?a:E,l},toString:()=>{const S=Math.min(Nd(T),Tl),E=cb(O=>T.next(S*O).value,S,30);return S+"ms "+E},toTransition:()=>{}};return T}Fl.applyToOptions=e=>{const t=x3(e,100,Fl);return e.ease=Cs()?t.ease:"easeOut",e.duration=Ln(t.duration),e.type="keyframes",e};function ky({keyframes:e,velocity:t=0,power:n=.8,timeConstant:o=325,bounceDamping:r=10,bounceStiffness:s=500,modifyTarget:a,min:l,max:c,restDelta:u=.5,restSpeed:d}){const p=e[0],f={done:!1,value:p},m=R=>l!==void 0&&R<l||c!==void 0&&R>c,g=R=>l===void 0?c:c===void 0||Math.abs(l-R)<Math.abs(c-R)?l:c;let h=n*t;const y=p+h,v=a===void 0?y:a(y);v!==y&&(h=v-p);const I=R=>-h*Math.exp(-R/o),w=R=>v+I(R),T=R=>{const k=I(R),D=w(R);f.done=Math.abs(k)<=u,f.value=f.done?v:D};let S,E;const O=R=>{m(f.value)&&(S=R,E=Fl({keyframes:[f.value,g(f.value)],velocity:Py(w,R,f.value),damping:r,stiffness:s,restDelta:u,restSpeed:d}))};return O(0),{calculatedDuration:null,next:R=>{let k=!1;return!E&&S===void 0&&(k=!0,T(R),O(R)),S!==void 0&&R>=S?E.next(R-S):(!k&&T(R),f)}}}const SN=As(.42,0,1,1),wN=As(0,0,.58,1),Dy=As(.42,0,.58,1),IN=e=>Array.isArray(e)&&typeof e[0]!="number",Ny={linear:An,easeIn:SN,easeInOut:Dy,easeOut:wN,circIn:tp,circInOut:ey,circOut:Qb,backIn:ep,backInOut:qb,backOut:Jb,anticipate:Kb},jy=e=>{if(Ad(e)){Ao(e.length===4,"Cubic bezier arrays must contain four numerical values.");const[t,n,o,r]=e;return As(t,n,o,r)}else if(typeof e=="string")return Ao(Ny[e]!==void 0,`Invalid easing type '${e}'`),Ny[e];return e};function TN(e,t,n){const o=[],r=n||Ry,s=e.length-1;for(let a=0;a<s;a++){let l=r(e[a],e[a+1]);if(t){const c=Array.isArray(t)?t[a]||An:t;l=Ds(c,l)}o.push(l)}return o}function EN(e,t,{clamp:n=!0,ease:o,mixer:r}={}){const s=e.length;if(Ao(s===t.length,"Both input and output ranges must be the same length"),s===1)return()=>t[0];if(s===2&&t[0]===t[1])return()=>t[1];const a=e[0]===e[1];e[0]>e[s-1]&&(e=[...e].reverse(),t=[...t].reverse());const l=TN(t,o,r),c=l.length,u=d=>{if(a&&d<e[0])return t[0];let p=0;if(c>1)for(;p<e.length-2&&!(d<e[p+1]);p++);const f=xs(e[p],e[p+1],d);return l[p](f)};return n?d=>u(mo(e[0],e[s-1],d)):u}function ON(e,t){const n=e[e.length-1];for(let o=1;o<=t;o++){const r=xs(0,t,o);e.push(wt(n,1,r))}}function RN(e){const t=[0];return ON(t,e.length-1),t}function PN(e,t){return e.map(n=>n*t)}function AN(e,t){return e.map(()=>t||Dy).splice(0,e.length-1)}function Ns({duration:e=300,keyframes:t,times:n,ease:o="easeInOut"}){const r=IN(o)?o.map(jy):jy(o),s={done:!1,value:t[0]},a=PN(n&&n.length===t.length?n:RN(t),e),l=EN(a,t,{ease:Array.isArray(r)?r:AN(t,r)});return{calculatedDuration:e,next:c=>(s.value=l(c),s.done=c>=e,s)}}const MN=e=>{const t=({timestamp:n})=>e(n);return{start:()=>ht.update(t,!0),stop:()=>Mo(t),now:()=>_t.isProcessing?_t.timestamp:Qn.now()}},kN={decay:ky,inertia:ky,tween:Ns,keyframes:Ns,spring:Fl},DN=e=>e/100;class yp extends Iy{constructor(t){super(t),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:c}=this.options;c&&c()};const{name:n,motionValue:o,element:r,keyframes:s}=this.options,a=(r==null?void 0:r.KeyframeResolver)||pp,l=(c,u)=>this.onKeyframesResolved(c,u);this.resolver=new a(s,l,n,o,r),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(t){const{type:n="keyframes",repeat:o=0,repeatDelay:r=0,repeatType:s,velocity:a=0}=this.options,l=kd(n)?n:kN[n]||Ns;let c,u;process.env.NODE_ENV!=="production"&&l!==Ns&&Ao(t.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${t}`),l!==Ns&&typeof t[0]!="number"&&(c=Ds(DN,Ry(t[0],t[1])),t=[0,100]);const d=l({...this.options,keyframes:t});s==="mirror"&&(u=l({...this.options,keyframes:[...t].reverse(),velocity:-a})),d.calculatedDuration===null&&(d.calculatedDuration=Nd(d));const{calculatedDuration:p}=d,f=p+r,m=f*(o+1)-r;return{generator:d,mirroredGenerator:u,mapPercentToKeyframes:c,calculatedDuration:p,resolvedDuration:f,totalDuration:m}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!t?this.pause():this.state=this.pendingPlayState}tick(t,n=!1){const{resolved:o}=this;if(!o){const{keyframes:R}=this.options;return{done:!0,value:R[R.length-1]}}const{finalKeyframe:r,generator:s,mirroredGenerator:a,mapPercentToKeyframes:l,keyframes:c,calculatedDuration:u,totalDuration:d,resolvedDuration:p}=o;if(this.startTime===null)return s.next(0);const{delay:f,repeat:m,repeatType:g,repeatDelay:h,onUpdate:y}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-d/this.speed,this.startTime)),n?this.currentTime=t:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const v=this.currentTime-f*(this.speed>=0?1:-1),I=this.speed>=0?v<0:v>d;this.currentTime=Math.max(v,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=d);let w=this.currentTime,T=s;if(m){const R=Math.min(this.currentTime,d)/p;let k=Math.floor(R),D=R%1;!D&&R>=1&&(D=1),D===1&&k--,k=Math.min(k,m+1),!!(k%2)&&(g==="reverse"?(D=1-D,h&&(D-=h/p)):g==="mirror"&&(T=a)),w=mo(0,1,D)*p}const S=I?{done:!1,value:c[0]}:T.next(w);l&&(S.value=l(S.value));let{done:E}=S;!I&&u!==null&&(E=this.speed>=0?this.currentTime>=d:this.currentTime<=0);const O=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&E);return O&&r!==void 0&&(S.value=Nl(c,this.options,r)),y&&y(S.value),O&&this.finish(),S}get duration(){const{resolved:t}=this;return t?Kn(t.calculatedDuration):0}get time(){return Kn(this.currentTime)}set time(t){t=Ln(t),this.currentTime=t,this.holdTime!==null||this.speed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.speed)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=Kn(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=MN,onPlay:n,startTime:o}=this.options;this.driver||(this.driver=t(s=>this.tick(s))),n&&n();const r=this.driver.now();this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=r):this.startTime=o??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=this.currentTime??0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}get finished(){return this.currentFinishedPromise}}const NN=new Set(["opacity","clipPath","filter","transform"]),jN=Rd(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),Bl=10,FN=2e4;function BN(e){return kd(e.type)||e.type==="spring"||!db(e.ease)}function VN(e,t){const n=new yp({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let o={done:!1,value:e[0]};const r=[];let s=0;for(;!o.done&&s<FN;)o=n.sample(s),r.push(o.value),s+=Bl;return{times:void 0,keyframes:r,duration:s-Bl,ease:"linear"}}const Fy={anticipate:Kb,backInOut:qb,circInOut:ey};function LN(e){return e in Fy}class By extends Iy{constructor(t){super(t);const{name:n,motionValue:o,element:r,keyframes:s}=this.options;this.resolver=new Sy(s,(a,l)=>this.onKeyframesResolved(a,l),n,o,r),this.resolver.scheduleResolve()}initPlayback(t,n){let{duration:o=300,times:r,ease:s,type:a,motionValue:l,name:c,startTime:u}=this.options;if(!l.owner||!l.owner.current)return!1;if(typeof s=="string"&&Cs()&&LN(s)&&(s=Fy[s]),BN(this.options)){const{onComplete:p,onUpdate:f,motionValue:m,element:g,...h}=this.options,y=VN(t,h);t=y.keyframes,t.length===1&&(t[1]=t[0]),o=y.duration,r=y.times,s=y.ease,a="keyframes"}const d=v3(l.owner.current,c,t,{...this.options,duration:o,times:r,ease:s});return d.startTime=u??this.calcStartTime(),this.pendingTimeline?(pb(d,this.pendingTimeline),this.pendingTimeline=void 0):d.onfinish=()=>{const{onComplete:p}=this.options;l.set(Nl(t,this.options,n)),p&&p(),this.cancel(),this.resolveFinishedPromise()},{animation:d,duration:o,times:r,type:a,ease:s,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:n}=t;return Kn(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return Kn(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:o}=n;o.currentTime=Ln(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:n}=t;return n.playbackRate}get finished(){return this.resolved.animation.finished}set speed(t){const{resolved:n}=this;if(!n)return;const{animation:o}=n;o.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:n}=t;return n.playState}get startTime(){const{resolved:t}=this;if(!t)return null;const{animation:n}=t;return n.startTime}attachTimeline(t){if(!this._resolved)this.pendingTimeline=t;else{const{resolved:n}=this;if(!n)return An;const{animation:o}=n;pb(o,t)}return An}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:t}=this;if(!t)return;const{animation:n,keyframes:o,duration:r,type:s,ease:a,times:l}=t;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:u,onUpdate:d,onComplete:p,element:f,...m}=this.options,g=new yp({...m,keyframes:o,duration:r,type:s,ease:a,times:l,isGenerator:!0}),h=Ln(this.time);u.setWithVelocity(g.sample(h-Bl).value,g.sample(h).value,Bl)}const{onStop:c}=this.options;c&&c(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:n,name:o,repeatDelay:r,repeatType:s,damping:a,type:l}=t;if(!n||!n.owner||!(n.owner.current instanceof HTMLElement))return!1;const{onUpdate:c,transformTemplate:u}=n.owner.getProps();return jN()&&o&&NN.has(o)&&(o!=="transform"||!u)&&!c&&!r&&s!=="mirror"&&a!==0&&l!=="inertia"}}const $N={type:"spring",stiffness:500,damping:25,restSpeed:10},_N=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),WN={type:"keyframes",duration:.8},zN={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},GN=(e,{keyframes:t})=>t.length>2?WN:qo.has(e)?e.startsWith("scale")?_N(t[1]):$N:zN;function HN({when:e,delay:t,delayChildren:n,staggerChildren:o,staggerDirection:r,repeat:s,repeatType:a,repeatDelay:l,from:c,elapsed:u,...d}){return!!Object.keys(d).length}const vp=(e,t,n,o={},r,s)=>a=>{const l=Dd(o,e)||{},c=l.delay||o.delay||0;let{elapsed:u=0}=o;u=u-Ln(c);let d={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...l,delay:-u,onUpdate:f=>{t.set(f),l.onUpdate&&l.onUpdate(f)},onComplete:()=>{a(),l.onComplete&&l.onComplete()},name:e,motionValue:t,element:s?void 0:r};HN(l)||(d={...d,...GN(e,d)}),d.duration&&(d.duration=Ln(d.duration)),d.repeatDelay&&(d.repeatDelay=Ln(d.repeatDelay)),d.from!==void 0&&(d.keyframes[0]=d.from);let p=!1;if((d.type===!1||d.duration===0&&!d.repeatDelay)&&(d.duration=0,d.delay===0&&(p=!0)),d.allowFlatten=!l.type&&!l.ease,p&&!s&&t.get()!==void 0){const f=Nl(d.keyframes,l);if(f!==void 0)return ht.update(()=>{d.onUpdate(f),d.onComplete()}),new g3([])}return!s&&By.supports(d)?new By(d):new yp(d)};function UN({protectedKeys:e,needsAnimating:t},n){const o=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,o}function Vy(e,t,{delay:n=0,transitionOverride:o,type:r}={}){let{transition:s=e.getDefaultTransition(),transitionEnd:a,...l}=t;o&&(s=o);const c=[],u=r&&e.animationState&&e.animationState.getState()[r];for(const d in l){const p=e.getValue(d,e.latestValues[d]??null),f=l[d];if(f===void 0||u&&UN(u,d))continue;const m={delay:n,...Dd(s||{},d)};let g=!1;if(window.MotionHandoffAnimation){const y=Ub(e);if(y){const v=window.MotionHandoffAnimation(y,d,ht);v!==null&&(m.startTime=v,g=!0)}}Qd(e,d),p.start(vp(d,p,f,e.shouldReduceMotion&&Hb.has(d)?{type:!1}:m,e,g));const h=p.animation;h&&c.push(h)}return a&&Promise.all(c).then(()=>{ht.update(()=>{a&&S5(e,a)})}),c}function xp(e,t,n={}){var c;const o=Ps(e,t,n.type==="exit"?(c=e.presenceContext)==null?void 0:c.custom:void 0);let{transition:r=e.getDefaultTransition()||{}}=o||{};n.transitionOverride&&(r=n.transitionOverride);const s=o?()=>Promise.all(Vy(e,o,n)):()=>Promise.resolve(),a=e.variantChildren&&e.variantChildren.size?(u=0)=>{const{delayChildren:d=0,staggerChildren:p,staggerDirection:f}=r;return YN(e,t,d+u,p,f,n)}:()=>Promise.resolve(),{when:l}=r;if(l){const[u,d]=l==="beforeChildren"?[s,a]:[a,s];return u().then(()=>d())}else return Promise.all([s(),a(n.delay)])}function YN(e,t,n=0,o=0,r=1,s){const a=[],l=(e.variantChildren.size-1)*o,c=r===1?(u=0)=>u*o:(u=0)=>l-u*o;return Array.from(e.variantChildren).sort(XN).forEach((u,d)=>{u.notify("AnimationStart",t),a.push(xp(u,t,{...s,delay:n+c(d)}).then(()=>u.notify("AnimationComplete",t)))}),Promise.all(a)}function XN(e,t){return e.sortNodePosition(t)}function ZN(e,t,n={}){e.notify("AnimationStart",t);let o;if(Array.isArray(t)){const r=t.map(s=>xp(e,s,n));o=Promise.all(r)}else if(typeof t=="string")o=xp(e,t,n);else{const r=typeof t=="function"?Ps(e,t,n.custom):t;o=Promise.all(Vy(e,r,n))}return o.then(()=>{e.notify("AnimationComplete",t)})}function Ly(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let o=0;o<n;o++)if(t[o]!==e[o])return!1;return!0}const JN=$d.length;function $y(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?$y(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<JN;n++){const o=$d[n],r=e.props[o];(Ts(r)||r===!1)&&(t[o]=r)}return t}const qN=[...Ld].reverse(),KN=Ld.length;function QN(e){return t=>Promise.all(t.map(({animation:n,options:o})=>ZN(e,n,o)))}function e4(e){let t=QN(e),n=_y(),o=!0;const r=c=>(u,d)=>{var f;const p=Ps(e,d,c==="exit"?(f=e.presenceContext)==null?void 0:f.custom:void 0);if(p){const{transition:m,transitionEnd:g,...h}=p;u={...u,...h,...g}}return u};function s(c){t=c(e)}function a(c){const{props:u}=e,d=$y(e.parent)||{},p=[],f=new Set;let m={},g=1/0;for(let y=0;y<KN;y++){const v=qN[y],I=n[v],w=u[v]!==void 0?u[v]:d[v],T=Ts(w),S=v===c?I.isActive:null;S===!1&&(g=y);let E=w===d[v]&&w!==u[v]&&T;if(E&&o&&e.manuallyAnimateOnMount&&(E=!1),I.protectedKeys={...m},!I.isActive&&S===null||!w&&!I.prevProp||Al(w)||typeof w=="boolean")continue;const O=t4(I.prevProp,w);let R=O||v===c&&I.isActive&&!E&&T||y>g&&T,k=!1;const D=Array.isArray(w)?w:[w];let N=D.reduce(r(v),{});S===!1&&(N={});const{prevResolvedValues:A={}}=I,$={...A,...N},j=V=>{R=!0,f.has(V)&&(k=!0,f.delete(V)),I.needsAnimating[V]=!0;const B=e.getValue(V);B&&(B.liveStyle=!1)};for(const V in $){const B=N[V],G=A[V];if(m.hasOwnProperty(V))continue;let F=!1;qd(B)&&qd(G)?F=!Ly(B,G):F=B!==G,F?B!=null?j(V):f.add(V):B!==void 0&&f.has(V)?j(V):I.protectedKeys[V]=!0}I.prevProp=w,I.prevResolvedValues=N,I.isActive&&(m={...m,...N}),o&&e.blockInitialAnimation&&(R=!1),R&&(!(E&&O)||k)&&p.push(...D.map(V=>({animation:V,options:{type:v}})))}if(f.size){const y={};if(typeof u.initial!="boolean"){const v=Ps(e,Array.isArray(u.initial)?u.initial[0]:u.initial);v&&v.transition&&(y.transition=v.transition)}f.forEach(v=>{const I=e.getBaseTarget(v),w=e.getValue(v);w&&(w.liveStyle=!0),y[v]=I??null}),p.push({animation:y})}let h=!!p.length;return o&&(u.initial===!1||u.initial===u.animate)&&!e.manuallyAnimateOnMount&&(h=!1),o=!1,h?t(p):Promise.resolve()}function l(c,u){var p;if(n[c].isActive===u)return Promise.resolve();(p=e.variantChildren)==null||p.forEach(f=>{var m;return(m=f.animationState)==null?void 0:m.setActive(c,u)}),n[c].isActive=u;const d=a(c);for(const f in n)n[f].protectedKeys={};return d}return{animateChanges:a,setActive:l,setAnimateFunction:s,getState:()=>n,reset:()=>{n=_y(),o=!0}}}function t4(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!Ly(t,e):!1}function tr(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function _y(){return{animate:tr(!0),whileInView:tr(),whileHover:tr(),whileTap:tr(),whileDrag:tr(),whileFocus:tr(),exit:tr()}}class No{constructor(t){this.isMounted=!1,this.node=t}update(){}}class n4 extends No{constructor(t){super(t),t.animationState||(t.animationState=e4(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Al(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)==null||t.call(this)}}let o4=0;class r4 extends No{constructor(){super(...arguments),this.id=o4++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:o}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===o)return;const r=this.node.animationState.setActive("exit",!t);n&&!t&&r.then(()=>{n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const i4={animation:{Feature:n4},exit:{Feature:r4}};function js(e,t,n,o={passive:!0}){return e.addEventListener(t,n,o),()=>e.removeEventListener(t,n)}function Fs(e){return{point:{x:e.pageX,y:e.pageY}}}const s4=e=>t=>Bd(t)&&e(t,Fs(t));function Bs(e,t,n,o){return js(e,t,s4(n),o)}function Wy({top:e,left:t,right:n,bottom:o}){return{x:{min:t,max:n},y:{min:e,max:o}}}function a4({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function l4(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),o=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:o.y,right:o.x}}const zy=1e-4,c4=1-zy,u4=1+zy,Gy=.01,d4=0-Gy,p4=0+Gy;function en(e){return e.max-e.min}function f4(e,t,n){return Math.abs(e-t)<=n}function Hy(e,t,n,o=.5){e.origin=o,e.originPoint=wt(t.min,t.max,e.origin),e.scale=en(n)/en(t),e.translate=wt(n.min,n.max,e.origin)-e.originPoint,(e.scale>=c4&&e.scale<=u4||isNaN(e.scale))&&(e.scale=1),(e.translate>=d4&&e.translate<=p4||isNaN(e.translate))&&(e.translate=0)}function Vs(e,t,n,o){Hy(e.x,t.x,n.x,o?o.originX:void 0),Hy(e.y,t.y,n.y,o?o.originY:void 0)}function Uy(e,t,n){e.min=n.min+t.min,e.max=e.min+en(t)}function h4(e,t,n){Uy(e.x,t.x,n.x),Uy(e.y,t.y,n.y)}function Yy(e,t,n){e.min=t.min-n.min,e.max=e.min+en(t)}function Ls(e,t,n){Yy(e.x,t.x,n.x),Yy(e.y,t.y,n.y)}const Xy=()=>({translate:0,scale:1,origin:0,originPoint:0}),si=()=>({x:Xy(),y:Xy()}),Zy=()=>({min:0,max:0}),kt=()=>({x:Zy(),y:Zy()});function Mn(e){return[e("x"),e("y")]}function Cp(e){return e===void 0||e===1}function Sp({scale:e,scaleX:t,scaleY:n}){return!Cp(e)||!Cp(t)||!Cp(n)}function nr(e){return Sp(e)||Jy(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function Jy(e){return qy(e.x)||qy(e.y)}function qy(e){return e&&e!=="0%"}function Vl(e,t,n){const o=e-n,r=t*o;return n+r}function Ky(e,t,n,o,r){return r!==void 0&&(e=Vl(e,r,o)),Vl(e,n,o)+t}function wp(e,t=0,n=1,o,r){e.min=Ky(e.min,t,n,o,r),e.max=Ky(e.max,t,n,o,r)}function Qy(e,{x:t,y:n}){wp(e.x,t.translate,t.scale,t.originPoint),wp(e.y,n.translate,n.scale,n.originPoint)}const ev=.999999999999,tv=1.0000000000001;function m4(e,t,n,o=!1){const r=n.length;if(!r)return;t.x=t.y=1;let s,a;for(let l=0;l<r;l++){s=n[l],a=s.projectionDelta;const{visualElement:c}=s.options;c&&c.props.style&&c.props.style.display==="contents"||(o&&s.options.layoutScroll&&s.scroll&&s!==s.root&&li(e,{x:-s.scroll.offset.x,y:-s.scroll.offset.y}),a&&(t.x*=a.x.scale,t.y*=a.y.scale,Qy(e,a)),o&&nr(s.latestValues)&&li(e,s.latestValues))}t.x<tv&&t.x>ev&&(t.x=1),t.y<tv&&t.y>ev&&(t.y=1)}function ai(e,t){e.min=e.min+t,e.max=e.max+t}function nv(e,t,n,o,r=.5){const s=wt(e.min,e.max,r);wp(e,t,n,s,o)}function li(e,t){nv(e.x,t.x,t.scaleX,t.scale,t.originX),nv(e.y,t.y,t.scaleY,t.scale,t.originY)}function ov(e,t){return Wy(l4(e.getBoundingClientRect(),t))}function g4(e,t,n){const o=ov(e,n),{scroll:r}=t;return r&&(ai(o.x,r.offset.x),ai(o.y,r.offset.y)),o}const rv=({current:e})=>e?e.ownerDocument.defaultView:null,iv=(e,t)=>Math.abs(e-t);function b4(e,t){const n=iv(e.x,t.x),o=iv(e.y,t.y);return Math.sqrt(n**2+o**2)}class sv{constructor(t,n,{transformPagePoint:o,contextWindow:r,dragSnapToOrigin:s=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const p=Tp(this.lastMoveEventInfo,this.history),f=this.startEvent!==null,m=b4(p.offset,{x:0,y:0})>=3;if(!f&&!m)return;const{point:g}=p,{timestamp:h}=_t;this.history.push({...g,timestamp:h});const{onStart:y,onMove:v}=this.handlers;f||(y&&y(this.lastMoveEvent,p),this.startEvent=this.lastMoveEvent),v&&v(this.lastMoveEvent,p)},this.handlePointerMove=(p,f)=>{this.lastMoveEvent=p,this.lastMoveEventInfo=Ip(f,this.transformPagePoint),ht.update(this.updatePoint,!0)},this.handlePointerUp=(p,f)=>{this.end();const{onEnd:m,onSessionEnd:g,resumeAnimation:h}=this.handlers;if(this.dragSnapToOrigin&&h&&h(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const y=Tp(p.type==="pointercancel"?this.lastMoveEventInfo:Ip(f,this.transformPagePoint),this.history);this.startEvent&&m&&m(p,y),g&&g(p,y)},!Bd(t))return;this.dragSnapToOrigin=s,this.handlers=n,this.transformPagePoint=o,this.contextWindow=r||window;const a=Fs(t),l=Ip(a,this.transformPagePoint),{point:c}=l,{timestamp:u}=_t;this.history=[{...c,timestamp:u}];const{onSessionStart:d}=n;d&&d(t,Tp(l,this.history)),this.removeListeners=Ds(Bs(this.contextWindow,"pointermove",this.handlePointerMove),Bs(this.contextWindow,"pointerup",this.handlePointerUp),Bs(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Mo(this.updatePoint)}}function Ip(e,t){return t?{point:t(e.point)}:e}function av(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Tp({point:e},t){return{point:e,delta:av(e,lv(t)),offset:av(e,y4(t)),velocity:v4(t,.1)}}function y4(e){return e[0]}function lv(e){return e[e.length-1]}function v4(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,o=null;const r=lv(e);for(;n>=0&&(o=e[n],!(r.timestamp-o.timestamp>Ln(t)));)n--;if(!o)return{x:0,y:0};const s=Kn(r.timestamp-o.timestamp);if(s===0)return{x:0,y:0};const a={x:(r.x-o.x)/s,y:(r.y-o.y)/s};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function x4(e,{min:t,max:n},o){return t!==void 0&&e<t?e=o?wt(t,e,o.min):Math.max(e,t):n!==void 0&&e>n&&(e=o?wt(n,e,o.max):Math.min(e,n)),e}function cv(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function C4(e,{top:t,left:n,bottom:o,right:r}){return{x:cv(e.x,n,r),y:cv(e.y,t,o)}}function uv(e,t){let n=t.min-e.min,o=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,o]=[o,n]),{min:n,max:o}}function S4(e,t){return{x:uv(e.x,t.x),y:uv(e.y,t.y)}}function w4(e,t){let n=.5;const o=en(e),r=en(t);return r>o?n=xs(t.min,t.max-o,e.min):o>r&&(n=xs(e.min,e.max-r,t.min)),mo(0,1,n)}function I4(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const Ep=.35;function T4(e=Ep){return e===!1?e=0:e===!0&&(e=Ep),{x:dv(e,"left","right"),y:dv(e,"top","bottom")}}function dv(e,t,n){return{min:pv(e,t),max:pv(e,n)}}function pv(e,t){return typeof e=="number"?e:e[t]||0}const E4=new WeakMap;class O4{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=kt(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:o}=this.visualElement;if(o&&o.isPresent===!1)return;const r=d=>{const{dragSnapToOrigin:p}=this.getProps();p?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(Fs(d).point)},s=(d,p)=>{const{drag:f,dragPropagation:m,onDragStart:g}=this.getProps();if(f&&!m&&(this.openDragLock&&this.openDragLock(),this.openDragLock=I3(f),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Mn(y=>{let v=this.getAxisMotionValue(y).get()||0;if(eo.test(v)){const{projection:I}=this.visualElement;if(I&&I.layout){const w=I.layout.layoutBox[y];w&&(v=en(w)*(parseFloat(v)/100))}}this.originPoint[y]=v}),g&&ht.postRender(()=>g(d,p)),Qd(this.visualElement,"transform");const{animationState:h}=this.visualElement;h&&h.setActive("whileDrag",!0)},a=(d,p)=>{const{dragPropagation:f,dragDirectionLock:m,onDirectionLock:g,onDrag:h}=this.getProps();if(!f&&!this.openDragLock)return;const{offset:y}=p;if(m&&this.currentDirection===null){this.currentDirection=R4(y),this.currentDirection!==null&&g&&g(this.currentDirection);return}this.updateAxis("x",p.point,y),this.updateAxis("y",p.point,y),this.visualElement.render(),h&&h(d,p)},l=(d,p)=>this.stop(d,p),c=()=>Mn(d=>{var p;return this.getAnimationState(d)==="paused"&&((p=this.getAxisMotionValue(d).animation)==null?void 0:p.play())}),{dragSnapToOrigin:u}=this.getProps();this.panSession=new sv(t,{onSessionStart:r,onStart:s,onMove:a,onSessionEnd:l,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u,contextWindow:rv(this.visualElement)})}stop(t,n){const o=this.isDragging;if(this.cancel(),!o)return;const{velocity:r}=n;this.startAnimation(r);const{onDragEnd:s}=this.getProps();s&&ht.postRender(()=>s(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:o}=this.getProps();!o&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,o){const{drag:r}=this.getProps();if(!o||!Ll(t,r,this.currentDirection))return;const s=this.getAxisMotionValue(t);let a=this.originPoint[t]+o[t];this.constraints&&this.constraints[t]&&(a=x4(a,this.constraints[t],this.elastic[t])),s.set(a)}resolveConstraints(){var s;const{dragConstraints:t,dragElastic:n}=this.getProps(),o=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(s=this.visualElement.projection)==null?void 0:s.layout,r=this.constraints;t&&ti(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&o?this.constraints=C4(o.layoutBox,t):this.constraints=!1,this.elastic=T4(n),r!==this.constraints&&o&&this.constraints&&!this.hasMutatedConstraints&&Mn(a=>{this.constraints!==!1&&this.getAxisMotionValue(a)&&(this.constraints[a]=I4(o.layoutBox[a],this.constraints[a]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!ti(t))return!1;const o=t.current;Ao(o!==null,"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 s=g4(o,r.root,this.visualElement.getTransformPagePoint());let a=S4(r.layout.layoutBox,s);if(n){const l=n(a4(a));this.hasMutatedConstraints=!!l,l&&(a=Wy(l))}return a}startAnimation(t){const{drag:n,dragMomentum:o,dragElastic:r,dragTransition:s,dragSnapToOrigin:a,onDragTransitionEnd:l}=this.getProps(),c=this.constraints||{},u=Mn(d=>{if(!Ll(d,n,this.currentDirection))return;let p=c&&c[d]||{};a&&(p={min:0,max:0});const f=r?200:1e6,m=r?40:1e7,g={type:"inertia",velocity:o?t[d]:0,bounceStiffness:f,bounceDamping:m,timeConstant:750,restDelta:1,restSpeed:10,...s,...p};return this.startAxisValueAnimation(d,g)});return Promise.all(u).then(l)}startAxisValueAnimation(t,n){const o=this.getAxisMotionValue(t);return Qd(this.visualElement,t),o.start(vp(t,o,0,n,this.visualElement,!1))}stopAnimation(){Mn(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){Mn(t=>{var n;return(n=this.getAxisMotionValue(t).animation)==null?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)==null?void 0:n.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,o=this.visualElement.getProps(),r=o[n];return r||this.visualElement.getValue(t,(o.initial?o.initial[t]:void 0)||0)}snapToCursor(t){Mn(n=>{const{drag:o}=this.getProps();if(!Ll(n,o,this.currentDirection))return;const{projection:r}=this.visualElement,s=this.getAxisMotionValue(n);if(r&&r.layout){const{min:a,max:l}=r.layout.layoutBox[n];s.set(t[n]-wt(a,l,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:o}=this.visualElement;if(!ti(n)||!o||!this.constraints)return;this.stopAnimation();const r={x:0,y:0};Mn(a=>{const l=this.getAxisMotionValue(a);if(l&&this.constraints!==!1){const c=l.get();r[a]=w4({min:c,max:c},this.constraints[a])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",o.root&&o.root.updateScroll(),o.updateLayout(),this.resolveConstraints(),Mn(a=>{if(!Ll(a,t,null))return;const l=this.getAxisMotionValue(a),{min:c,max:u}=this.constraints[a];l.set(wt(c,u,r[a]))})}addListeners(){if(!this.visualElement.current)return;E4.set(this.visualElement,this);const t=this.visualElement.current,n=Bs(t,"pointerdown",c=>{const{drag:u,dragListener:d=!0}=this.getProps();u&&d&&this.start(c)}),o=()=>{const{dragConstraints:c}=this.getProps();ti(c)&&c.current&&(this.constraints=this.resolveRefConstraints())},{projection:r}=this.visualElement,s=r.addEventListener("measure",o);r&&!r.layout&&(r.root&&r.root.updateScroll(),r.updateLayout()),ht.read(o);const a=js(window,"resize",()=>this.scalePositionWithinConstraints()),l=r.addEventListener("didUpdate",({delta:c,hasLayoutChanged:u})=>{this.isDragging&&u&&(Mn(d=>{const p=this.getAxisMotionValue(d);p&&(this.originPoint[d]+=c[d].translate,p.set(p.get()+c[d].translate))}),this.visualElement.render())});return()=>{a(),n(),s(),l&&l()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:o=!1,dragPropagation:r=!1,dragConstraints:s=!1,dragElastic:a=Ep,dragMomentum:l=!0}=t;return{...t,drag:n,dragDirectionLock:o,dragPropagation:r,dragConstraints:s,dragElastic:a,dragMomentum:l}}}function Ll(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function R4(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class P4 extends No{constructor(t){super(t),this.removeGroupControls=An,this.removeListeners=An,this.controls=new O4(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||An}unmount(){this.removeGroupControls(),this.removeListeners()}}const fv=e=>(t,n)=>{e&&ht.postRender(()=>e(t,n))};class A4 extends No{constructor(){super(...arguments),this.removePointerDownListener=An}onPointerDown(t){this.session=new sv(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:rv(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:o,onPanEnd:r}=this.node.getProps();return{onSessionStart:fv(t),onStart:fv(n),onMove:o,onEnd:(s,a)=>{delete this.session,r&&ht.postRender(()=>r(s,a))}}}mount(){this.removePointerDownListener=Bs(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const $l={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function hv(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const $s={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(De.test(e))e=parseFloat(e);else return e;const n=hv(e,t.target.x),o=hv(e,t.target.y);return`${n}% ${o}%`}},M4={correct:(e,{treeScale:t,projectionDelta:n})=>{const o=e,r=Do.parse(e);if(r.length>5)return o;const s=Do.createTransformer(e),a=typeof r[0]!="number"?1:0,l=n.x.scale*t.x,c=n.y.scale*t.y;r[0+a]/=l,r[1+a]/=c;const u=wt(l,c,.5);return typeof r[2+a]=="number"&&(r[2+a]/=u),typeof r[3+a]=="number"&&(r[3+a]/=u),s(r)}};class k4 extends _.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:o,layoutId:r}=this.props,{projection:s}=t;J3(D4),s&&(n.group&&n.group.add(s),o&&o.register&&r&&o.register(s),s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,onExitComplete:()=>this.safeToRemove()})),$l.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:o,drag:r,isPresent:s}=this.props,a=o.projection;return a&&(a.isPresent=s,r||t.layoutDependency!==n||n===void 0||t.isPresent!==s?a.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?a.promote():a.relegate()||ht.postRender(()=>{const l=a.getStack();(!l||!l.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),jd.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:o}=this.props,{projection:r}=t;r&&(r.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(r),o&&o.deregister&&o.deregister(r))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function mv(e){const[t,n]=rb(),o=_.useContext(Cd);return b.jsx(k4,{...e,layoutGroup:o,switchLayoutGroup:_.useContext(Ob),isPresent:t,safeToRemove:n})}const D4={borderRadius:{...$s,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:$s,borderTopRightRadius:$s,borderBottomLeftRadius:$s,borderBottomRightRadius:$s,boxShadow:M4};function N4(e,t,n){const o=Ut(e)?e:Is(e);return o.start(vp("",o,t,n)),o.animation}function j4(e){return e instanceof SVGElement&&e.tagName!=="svg"}const F4=(e,t)=>e.depth-t.depth;class B4{constructor(){this.children=[],this.isDirty=!1}add(t){Td(this.children,t),this.isDirty=!0}remove(t){Ed(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(F4),this.isDirty=!1,this.children.forEach(t)}}function V4(e,t){const n=Qn.now(),o=({timestamp:r})=>{const s=r-n;s>=t&&(Mo(o),e(s-t))};return ht.read(o,!0),()=>Mo(o)}const gv=["TopLeft","TopRight","BottomLeft","BottomRight"],L4=gv.length,bv=e=>typeof e=="string"?parseFloat(e):e,yv=e=>typeof e=="number"||De.test(e);function $4(e,t,n,o,r,s){r?(e.opacity=wt(0,n.opacity??1,_4(o)),e.opacityExit=wt(t.opacity??1,0,W4(o))):s&&(e.opacity=wt(t.opacity??1,n.opacity??1,o));for(let a=0;a<L4;a++){const l=`border${gv[a]}Radius`;let c=vv(t,l),u=vv(n,l);if(c===void 0&&u===void 0)continue;c||(c=0),u||(u=0),c===0||u===0||yv(c)===yv(u)?(e[l]=Math.max(wt(bv(c),bv(u),o),0),(eo.test(u)||eo.test(c))&&(e[l]+="%")):e[l]=u}(t.rotate||n.rotate)&&(e.rotate=wt(t.rotate||0,n.rotate||0,o))}function vv(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const _4=xv(0,.5,Qb),W4=xv(.5,.95,An);function xv(e,t,n){return o=>o<e?0:o>t?1:n(xs(e,t,o))}function Cv(e,t){e.min=t.min,e.max=t.max}function kn(e,t){Cv(e.x,t.x),Cv(e.y,t.y)}function Sv(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function wv(e,t,n,o,r){return e-=t,e=Vl(e,1/n,o),r!==void 0&&(e=Vl(e,1/r,o)),e}function z4(e,t=0,n=1,o=.5,r,s=e,a=e){if(eo.test(t)&&(t=parseFloat(t),t=wt(a.min,a.max,t/100)-a.min),typeof t!="number")return;let l=wt(s.min,s.max,o);e===s&&(l-=t),e.min=wv(e.min,t,n,l,r),e.max=wv(e.max,t,n,l,r)}function Iv(e,t,[n,o,r],s,a){z4(e,t[n],t[o],t[r],t.scale,s,a)}const G4=["x","scaleX","originX"],H4=["y","scaleY","originY"];function Tv(e,t,n,o){Iv(e.x,t,G4,n?n.x:void 0,o?o.x:void 0),Iv(e.y,t,H4,n?n.y:void 0,o?o.y:void 0)}function Ev(e){return e.translate===0&&e.scale===1}function Ov(e){return Ev(e.x)&&Ev(e.y)}function Rv(e,t){return e.min===t.min&&e.max===t.max}function U4(e,t){return Rv(e.x,t.x)&&Rv(e.y,t.y)}function Pv(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function Av(e,t){return Pv(e.x,t.x)&&Pv(e.y,t.y)}function Mv(e){return en(e.x)/en(e.y)}function kv(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class Y4{constructor(){this.members=[]}add(t){Td(this.members,t),t.scheduleRender()}remove(t){if(Ed(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(r=>t===r);if(n===0)return!1;let o;for(let r=n;r>=0;r--){const s=this.members[r];if(s.isPresent!==!1){o=s;break}}return o?(this.promote(o),!0):!1}promote(t,n){const o=this.lead;if(t!==o&&(this.prevLead=o,this.lead=t,t.show(),o)){o.instance&&o.scheduleRender(),t.scheduleRender(),t.resumeFrom=o,n&&(t.resumeFrom.preserveOpacity=!0),o.snapshot&&(t.snapshot=o.snapshot,t.snapshot.latestValues=o.animationValues||o.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:r}=t.options;r===!1&&o.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:o}=t;n.onExitComplete&&n.onExitComplete(),o&&o.options.onExitComplete&&o.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function X4(e,t,n){let o="";const r=e.x.translate/t.x,s=e.y.translate/t.y,a=(n==null?void 0:n.z)||0;if((r||s||a)&&(o=`translate3d(${r}px, ${s}px, ${a}px) `),(t.x!==1||t.y!==1)&&(o+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:u,rotate:d,rotateX:p,rotateY:f,skewX:m,skewY:g}=n;u&&(o=`perspective(${u}px) ${o}`),d&&(o+=`rotate(${d}deg) `),p&&(o+=`rotateX(${p}deg) `),f&&(o+=`rotateY(${f}deg) `),m&&(o+=`skewX(${m}deg) `),g&&(o+=`skewY(${g}deg) `)}const l=e.x.scale*t.x,c=e.y.scale*t.y;return(l!==1||c!==1)&&(o+=`scale(${l}, ${c})`),o||"none"}const Op=["","X","Y","Z"],Z4={visibility:"hidden"},Dv=1e3;let J4=0;function Rp(e,t,n,o){const{latestValues:r}=t;r[e]&&(n[e]=r[e],t.setStaticValue(e,0),o&&(o[e]=0))}function Nv(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=Ub(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:r,layoutId:s}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",ht,!(r||s))}const{parent:o}=e;o&&!o.hasCheckedOptimisedAppear&&Nv(o)}function jv({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:o,resetTransform:r}){return class{constructor(a={},l=t==null?void 0:t()){this.id=J4++,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,this.nodes.forEach(Q4),this.nodes.forEach(rj),this.nodes.forEach(ij),this.nodes.forEach(ej)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=a,this.root=l?l.root||l:this,this.path=l?[...l.path,l]:[],this.parent=l,this.depth=l?l.depth+1:0;for(let c=0;c<this.path.length;c++)this.path[c].shouldResetTransform=!0;this.root===this&&(this.nodes=new B4)}addEventListener(a,l){return this.eventHandlers.has(a)||this.eventHandlers.set(a,new Pd),this.eventHandlers.get(a).add(l)}notifyListeners(a,...l){const c=this.eventHandlers.get(a);c&&c.notify(...l)}hasListeners(a){return this.eventHandlers.has(a)}mount(a,l=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=j4(a),this.instance=a;const{layoutId:c,layout:u,visualElement:d}=this.options;if(d&&!d.current&&d.mount(a),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),l&&(u||c)&&(this.isLayoutDirty=!0),e){let p;const f=()=>this.root.updateBlockedByResize=!1;e(a,()=>{this.root.updateBlockedByResize=!0,p&&p(),p=V4(f,250),$l.hasAnimatedSinceResize&&($l.hasAnimatedSinceResize=!1,this.nodes.forEach(Bv))})}c&&this.root.registerSharedNode(c,this),this.options.animate!==!1&&d&&(c||u)&&this.addEventListener("didUpdate",({delta:p,hasLayoutChanged:f,hasRelativeLayoutChanged:m,layout:g})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const h=this.options.transition||d.getDefaultTransition()||uj,{onLayoutAnimationStart:y,onLayoutAnimationComplete:v}=d.getProps(),I=!this.targetLayout||!Av(this.targetLayout,g),w=!f&&m;if(this.options.layoutRoot||this.resumeFrom||w||f&&(I||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(p,w);const T={...Dd(h,"layout"),onPlay:y,onComplete:v};(d.shouldReduceMotion||this.options.layoutRoot)&&(T.delay=0,T.type=!1),this.startAnimation(T)}else f||Bv(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=g})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const a=this.getStack();a&&a.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,Mo(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(sj),this.animationId++)}getTransformTemplate(){const{visualElement:a}=this.options;return a&&a.getProps().transformTemplate}willUpdate(a=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Nv(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let d=0;d<this.path.length;d++){const p=this.path[d];p.shouldResetTransform=!0,p.updateScroll("snapshot"),p.options.layoutRoot&&p.willUpdate(!1)}const{layoutId:l,layout:c}=this.options;if(l===void 0&&!c)return;const u=this.getTransformTemplate();this.prevTransformTemplateValue=u?u(this.latestValues,""):void 0,this.updateSnapshot(),a&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(Fv);return}this.isUpdating||this.nodes.forEach(nj),this.isUpdating=!1,this.nodes.forEach(oj),this.nodes.forEach(q4),this.nodes.forEach(K4),this.clearAllSnapshots();const l=Qn.now();_t.delta=mo(0,1e3/60,l-_t.timestamp),_t.timestamp=l,_t.isProcessing=!0,Fd.update.process(_t),Fd.preRender.process(_t),Fd.render.process(_t),_t.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,jd.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(tj),this.sharedNodes.forEach(aj)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,ht.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){ht.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!en(this.snapshot.measuredBox.x)&&!en(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let c=0;c<this.path.length;c++)this.path[c].updateScroll();const a=this.layout;this.layout=this.measure(!1),this.layoutCorrected=kt(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:l}=this.options;l&&l.notify("LayoutMeasure",this.layout.layoutBox,a?a.layoutBox:void 0)}updateScroll(a="measure"){let l=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===a&&(l=!1),l){const c=o(this.instance);this.scroll={animationId:this.root.animationId,phase:a,isRoot:c,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:c}}}resetTransform(){if(!r)return;const a=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,l=this.projectionDelta&&!Ov(this.projectionDelta),c=this.getTransformTemplate(),u=c?c(this.latestValues,""):void 0,d=u!==this.prevTransformTemplateValue;a&&(l||nr(this.latestValues)||d)&&(r(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(a=!0){const l=this.measurePageBox();let c=this.removeElementScroll(l);return a&&(c=this.removeTransform(c)),dj(c),{animationId:this.root.animationId,measuredBox:l,layoutBox:c,latestValues:{},source:this.id}}measurePageBox(){var u;const{visualElement:a}=this.options;if(!a)return kt();const l=a.measureViewportBox();if(!(((u=this.scroll)==null?void 0:u.wasRoot)||this.path.some(pj))){const{scroll:d}=this.root;d&&(ai(l.x,d.offset.x),ai(l.y,d.offset.y))}return l}removeElementScroll(a){var c;const l=kt();if(kn(l,a),(c=this.scroll)!=null&&c.wasRoot)return l;for(let u=0;u<this.path.length;u++){const d=this.path[u],{scroll:p,options:f}=d;d!==this.root&&p&&f.layoutScroll&&(p.wasRoot&&kn(l,a),ai(l.x,p.offset.x),ai(l.y,p.offset.y))}return l}applyTransform(a,l=!1){const c=kt();kn(c,a);for(let u=0;u<this.path.length;u++){const d=this.path[u];!l&&d.options.layoutScroll&&d.scroll&&d!==d.root&&li(c,{x:-d.scroll.offset.x,y:-d.scroll.offset.y}),nr(d.latestValues)&&li(c,d.latestValues)}return nr(this.latestValues)&&li(c,this.latestValues),c}removeTransform(a){const l=kt();kn(l,a);for(let c=0;c<this.path.length;c++){const u=this.path[c];if(!u.instance||!nr(u.latestValues))continue;Sp(u.latestValues)&&u.updateSnapshot();const d=kt(),p=u.measurePageBox();kn(d,p),Tv(l,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,d)}return nr(this.latestValues)&&Tv(l,this.latestValues),l}setTargetDelta(a){this.targetDelta=a,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(a){this.options={...this.options,...a,crossfade:a.crossfade!==void 0?a.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==_t.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(a=!1){var f;const l=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=l.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=l.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=l.isSharedProjectionDirty);const c=!!this.resumingFrom||this!==l;if(!(a||c&&this.isSharedProjectionDirty||this.isProjectionDirty||(f=this.parent)!=null&&f.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:d,layoutId:p}=this.options;if(!(!this.layout||!(d||p))){if(this.resolvedRelativeTargetAt=_t.timestamp,!this.targetDelta&&!this.relativeTarget){const m=this.getClosestProjectingParent();m&&m.layout&&this.animationProgress!==1?(this.relativeParent=m,this.forceRelativeParentToResolveTarget(),this.relativeTarget=kt(),this.relativeTargetOrigin=kt(),Ls(this.relativeTargetOrigin,this.layout.layoutBox,m.layout.layoutBox),kn(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=kt(),this.targetWithTransforms=kt()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),h4(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):kn(this.target,this.layout.layoutBox),Qy(this.target,this.targetDelta)):kn(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const m=this.getClosestProjectingParent();m&&!!m.resumingFrom==!!this.resumingFrom&&!m.options.layoutScroll&&m.target&&this.animationProgress!==1?(this.relativeParent=m,this.forceRelativeParentToResolveTarget(),this.relativeTarget=kt(),this.relativeTargetOrigin=kt(),Ls(this.relativeTargetOrigin,this.target,m.target),kn(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||Sp(this.parent.latestValues)||Jy(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var g;const a=this.getLead(),l=!!this.resumingFrom||this!==a;let c=!0;if((this.isProjectionDirty||(g=this.parent)!=null&&g.isProjectionDirty)&&(c=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(c=!1),this.resolvedRelativeTargetAt===_t.timestamp&&(c=!1),c)return;const{layout:u,layoutId:d}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||d))return;kn(this.layoutCorrected,this.layout.layoutBox);const p=this.treeScale.x,f=this.treeScale.y;m4(this.layoutCorrected,this.treeScale,this.path,l),a.layout&&!a.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(a.target=a.layout.layoutBox,a.targetWithTransforms=kt());const{target:m}=a;if(!m){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(Sv(this.prevProjectionDelta.x,this.projectionDelta.x),Sv(this.prevProjectionDelta.y,this.projectionDelta.y)),Vs(this.projectionDelta,this.layoutCorrected,m,this.latestValues),(this.treeScale.x!==p||this.treeScale.y!==f||!kv(this.projectionDelta.x,this.prevProjectionDelta.x)||!kv(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",m))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(a=!0){var l;if((l=this.options.visualElement)==null||l.scheduleRender(),a){const c=this.getStack();c&&c.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=si(),this.projectionDelta=si(),this.projectionDeltaWithTransform=si()}setAnimationOrigin(a,l=!1){const c=this.snapshot,u=c?c.latestValues:{},d={...this.latestValues},p=si();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!l;const f=kt(),m=c?c.source:void 0,g=this.layout?this.layout.source:void 0,h=m!==g,y=this.getStack(),v=!y||y.members.length<=1,I=!!(h&&!v&&this.options.crossfade===!0&&!this.path.some(cj));this.animationProgress=0;let w;this.mixTargetDelta=T=>{const S=T/1e3;Vv(p.x,a.x,S),Vv(p.y,a.y,S),this.setTargetDelta(p),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Ls(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),lj(this.relativeTarget,this.relativeTargetOrigin,f,S),w&&U4(this.relativeTarget,w)&&(this.isProjectionDirty=!1),w||(w=kt()),kn(w,this.relativeTarget)),h&&(this.animationValues=d,$4(d,u,this.latestValues,S,I,v)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=S},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(a){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Mo(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=ht.update(()=>{$l.hasAnimatedSinceResize=!0,this.currentAnimation=N4(0,Dv,{...a,onUpdate:l=>{this.mixTargetDelta(l),a.onUpdate&&a.onUpdate(l)},onStop:()=>{},onComplete:()=>{a.onComplete&&a.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 a=this.getStack();a&&a.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Dv),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const a=this.getLead();let{targetWithTransforms:l,target:c,layout:u,latestValues:d}=a;if(!(!l||!c||!u)){if(this!==a&&this.layout&&u&&zv(this.options.animationType,this.layout.layoutBox,u.layoutBox)){c=this.target||kt();const p=en(this.layout.layoutBox.x);c.x.min=a.target.x.min,c.x.max=c.x.min+p;const f=en(this.layout.layoutBox.y);c.y.min=a.target.y.min,c.y.max=c.y.min+f}kn(l,c),li(l,d),Vs(this.projectionDeltaWithTransform,this.layoutCorrected,l,d)}}registerSharedNode(a,l){this.sharedNodes.has(a)||this.sharedNodes.set(a,new Y4),this.sharedNodes.get(a).add(l);const u=l.options.initialPromotionConfig;l.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(l):void 0})}isLead(){const a=this.getStack();return a?a.lead===this:!0}getLead(){var l;const{layoutId:a}=this.options;return a?((l=this.getStack())==null?void 0:l.lead)||this:this}getPrevLead(){var l;const{layoutId:a}=this.options;return a?(l=this.getStack())==null?void 0:l.prevLead:void 0}getStack(){const{layoutId:a}=this.options;if(a)return this.root.sharedNodes.get(a)}promote({needsReset:a,transition:l,preserveFollowOpacity:c}={}){const u=this.getStack();u&&u.promote(this,c),a&&(this.projectionDelta=void 0,this.needsReset=!0),l&&this.setOptions({transition:l})}relegate(){const a=this.getStack();return a?a.relegate(this):!1}resetSkewAndRotation(){const{visualElement:a}=this.options;if(!a)return;let l=!1;const{latestValues:c}=a;if((c.z||c.rotate||c.rotateX||c.rotateY||c.rotateZ||c.skewX||c.skewY)&&(l=!0),!l)return;const u={};c.z&&Rp("z",a,u,this.animationValues);for(let d=0;d<Op.length;d++)Rp(`rotate${Op[d]}`,a,u,this.animationValues),Rp(`skew${Op[d]}`,a,u,this.animationValues);a.render();for(const d in u)a.setStaticValue(d,u[d]),this.animationValues&&(this.animationValues[d]=u[d]);a.scheduleRender()}getProjectionStyles(a){if(!this.instance||this.isSVG)return;if(!this.isVisible)return Z4;const l={visibility:""},c=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,l.opacity="",l.pointerEvents=Dl(a==null?void 0:a.pointerEvents)||"",l.transform=c?c(this.latestValues,""):"none",l;const u=this.getLead();if(!this.projectionDelta||!this.layout||!u.target){const m={};return this.options.layoutId&&(m.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,m.pointerEvents=Dl(a==null?void 0:a.pointerEvents)||""),this.hasProjected&&!nr(this.latestValues)&&(m.transform=c?c({},""):"none",this.hasProjected=!1),m}const d=u.animationValues||u.latestValues;this.applyTransformsToTarget(),l.transform=X4(this.projectionDeltaWithTransform,this.treeScale,d),c&&(l.transform=c(d,l.transform));const{x:p,y:f}=this.projectionDelta;l.transformOrigin=`${p.origin*100}% ${f.origin*100}% 0`,u.animationValues?l.opacity=u===this?d.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:d.opacityExit:l.opacity=u===this?d.opacity!==void 0?d.opacity:"":d.opacityExit!==void 0?d.opacityExit:0;for(const m in Es){if(d[m]===void 0)continue;const{correct:g,applyTo:h,isCSSVariable:y}=Es[m],v=l.transform==="none"?d[m]:g(d[m],u);if(h){const I=h.length;for(let w=0;w<I;w++)l[h[w]]=v}else y?this.options.visualElement.renderState.vars[m]=v:l[m]=v}return this.options.layoutId&&(l.pointerEvents=u===this?Dl(a==null?void 0:a.pointerEvents)||"":"none"),l}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(a=>{var l;return(l=a.currentAnimation)==null?void 0:l.stop()}),this.root.nodes.forEach(Fv),this.root.sharedNodes.clear()}}}function q4(e){e.updateLayout()}function K4(e){var n;const t=((n=e.resumeFrom)==null?void 0:n.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:o,measuredBox:r}=e.layout,{animationType:s}=e.options,a=t.source!==e.layout.source;s==="size"?Mn(p=>{const f=a?t.measuredBox[p]:t.layoutBox[p],m=en(f);f.min=o[p].min,f.max=f.min+m}):zv(s,t.layoutBox,o)&&Mn(p=>{const f=a?t.measuredBox[p]:t.layoutBox[p],m=en(o[p]);f.max=f.min+m,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[p].max=e.relativeTarget[p].min+m)});const l=si();Vs(l,o,t.layoutBox);const c=si();a?Vs(c,e.applyTransform(r,!0),t.measuredBox):Vs(c,o,t.layoutBox);const u=!Ov(l);let d=!1;if(!e.resumeFrom){const p=e.getClosestProjectingParent();if(p&&!p.resumeFrom){const{snapshot:f,layout:m}=p;if(f&&m){const g=kt();Ls(g,t.layoutBox,f.layoutBox);const h=kt();Ls(h,o,m.layoutBox),Av(g,h)||(d=!0),p.options.layoutRoot&&(e.relativeTarget=h,e.relativeTargetOrigin=g,e.relativeParent=p)}}}e.notifyListeners("didUpdate",{layout:o,snapshot:t,delta:c,layoutDelta:l,hasLayoutChanged:u,hasRelativeLayoutChanged:d})}else if(e.isLead()){const{onExitComplete:o}=e.options;o&&o()}e.options.transition=void 0}function Q4(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function ej(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function tj(e){e.clearSnapshot()}function Fv(e){e.clearMeasurements()}function nj(e){e.isLayoutDirty=!1}function oj(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Bv(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function rj(e){e.resolveTargetDelta()}function ij(e){e.calcProjection()}function sj(e){e.resetSkewAndRotation()}function aj(e){e.removeLeadSnapshot()}function Vv(e,t,n){e.translate=wt(t.translate,0,n),e.scale=wt(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function Lv(e,t,n,o){e.min=wt(t.min,n.min,o),e.max=wt(t.max,n.max,o)}function lj(e,t,n,o){Lv(e.x,t.x,n.x,o),Lv(e.y,t.y,n.y,o)}function cj(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const uj={duration:.45,ease:[.4,0,.1,1]},$v=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),_v=$v("applewebkit/")&&!$v("chrome/")?Math.round:An;function Wv(e){e.min=_v(e.min),e.max=_v(e.max)}function dj(e){Wv(e.x),Wv(e.y)}function zv(e,t,n){return e==="position"||e==="preserve-aspect"&&!f4(Mv(t),Mv(n),.2)}function pj(e){var t;return e!==e.root&&((t=e.scroll)==null?void 0:t.wasRoot)}const fj=jv({attachResizeListener:(e,t)=>js(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Pp={current:void 0},Gv=jv({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Pp.current){const e=new fj({});e.mount(window),e.setOptions({layoutScroll:!0}),Pp.current=e}return Pp.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),hj={pan:{Feature:A4},drag:{Feature:P4,ProjectionNode:Gv,MeasureLayout:mv}};function Hv(e,t,n){const{props:o}=e;e.animationState&&o.whileHover&&e.animationState.setActive("whileHover",n==="Start");const r="onHover"+n,s=o[r];s&&ht.postRender(()=>s(t,Fs(t)))}class mj extends No{mount(){const{current:t}=this.node;t&&(this.unmount=E3(t,(n,o)=>(Hv(this.node,o,"Start"),r=>Hv(this.node,r,"End"))))}unmount(){}}class gj extends No{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Ds(js(this.node.current,"focus",()=>this.onFocus()),js(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Uv(e,t,n){const{props:o}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&o.whileTap&&e.animationState.setActive("whileTap",n==="Start");const r="onTap"+(n==="End"?"":n),s=o[r];s&&ht.postRender(()=>s(t,Fs(t)))}class bj extends No{mount(){const{current:t}=this.node;t&&(this.unmount=A3(t,(n,o)=>(Uv(this.node,o,"Start"),(r,{success:s})=>Uv(this.node,r,s?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Ap=new WeakMap,Mp=new WeakMap,yj=e=>{const t=Ap.get(e.target);t&&t(e)},vj=e=>{e.forEach(yj)};function xj({root:e,...t}){const n=e||document;Mp.has(n)||Mp.set(n,{});const o=Mp.get(n),r=JSON.stringify(t);return o[r]||(o[r]=new IntersectionObserver(vj,{root:e,...t})),o[r]}function Cj(e,t,n){const o=xj(t);return Ap.set(e,n),o.observe(e),()=>{Ap.delete(e),o.unobserve(e)}}const Sj={some:0,all:1};class wj extends No{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:o,amount:r="some",once:s}=t,a={root:n?n.current:void 0,rootMargin:o,threshold:typeof r=="number"?r:Sj[r]},l=c=>{const{isIntersecting:u}=c;if(this.isInView===u||(this.isInView=u,s&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:d,onViewportLeave:p}=this.node.getProps(),f=u?d:p;f&&f(c)};return Cj(this.node.current,a,l)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(Ij(t,n))&&this.startObserver()}unmount(){}}function Ij({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const Tj={inView:{Feature:wj},tap:{Feature:bj},focus:{Feature:gj},hover:{Feature:mj}},Ej={layout:{ProjectionNode:Gv,MeasureLayout:mv}},kp={current:null},Yv={current:!1};function Oj(){if(Yv.current=!0,!!wd)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>kp.current=e.matches;e.addListener(t),t()}else kp.current=!1}const Rj=[...xy,Yt,Do],Pj=e=>Rj.find(vy(e)),Aj=new WeakMap;function Mj(e,t,n){for(const o in t){const r=t[o],s=n[o];if(Ut(r))e.addValue(o,r),process.env.NODE_ENV==="development"&&Il(r.version==="12.7.3",`Attempting to mix Motion versions ${r.version} with 12.7.3 may not work as expected.`);else if(Ut(s))e.addValue(o,Is(r,{owner:e}));else if(s!==r)if(e.hasValue(o)){const a=e.getValue(o);a.liveStyle===!0?a.jump(r):a.hasAnimated||a.set(r)}else{const a=e.getStaticValue(o);e.addValue(o,Is(a!==void 0?a:r,{owner:e}))}}for(const o in n)t[o]===void 0&&e.removeValue(o);return t}const Xv=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class kj{scrapeMotionValuesFromProps(t,n,o){return{}}constructor({parent:t,props:n,presenceContext:o,reducedMotionConfig:r,blockInitialAnimation:s,visualState:a},l={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=pp,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const m=Qn.now();this.renderScheduledAt<m&&(this.renderScheduledAt=m,ht.render(this.render,!1,!0))};const{latestValues:c,renderState:u,onUpdate:d}=a;this.onUpdate=d,this.latestValues=c,this.baseTarget={...c},this.initialValues=n.initial?{...c}:{},this.renderState=u,this.parent=t,this.props=n,this.presenceContext=o,this.depth=t?t.depth+1:0,this.reducedMotionConfig=r,this.options=l,this.blockInitialAnimation=!!s,this.isControllingVariants=Ml(n),this.isVariantNode=Ib(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:p,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const m in f){const g=f[m];c[m]!==void 0&&Ut(g)&&g.set(c[m],!1)}}mount(t){this.current=t,Aj.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,o)=>this.bindToMotionValue(o,n)),Yv.current||Oj(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:kp.current,process.env.NODE_ENV!=="production"&&Il(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected."),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),Mo(this.notifyUpdate),Mo(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const o=qo.has(t);o&&this.onBindTransform&&this.onBindTransform();const r=n.on("change",l=>{this.latestValues[t]=l,this.props.onUpdate&&ht.preRender(this.notifyUpdate),o&&this.projection&&(this.projection.isTransformDirty=!0)}),s=n.on("renderRequest",this.scheduleRender);let a;window.MotionCheckAppearSync&&(a=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{r(),s(),a&&a(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in ei){const n=ei[t];if(!n)continue;const{isEnabled:o,Feature:r}=n;if(!this.features[t]&&r&&o(this.props)&&(this.features[t]=new r(this)),this.features[t]){const s=this.features[t];s.isMounted?s.update():(s.mount(),s.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):kt()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let o=0;o<Xv.length;o++){const r=Xv[o];this.propEventSubscriptions[r]&&(this.propEventSubscriptions[r](),delete this.propEventSubscriptions[r]);const s="on"+r,a=t[s];a&&(this.propEventSubscriptions[r]=this.on(r,a))}this.prevMotionValues=Mj(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue(),this.onUpdate&&this.onUpdate(this)}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const o=this.values.get(t);n!==o&&(o&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let o=this.values.get(t);return o===void 0&&n!==void 0&&(o=Is(n===null?void 0:n,{owner:this}),this.addValue(t,o)),o}readValue(t,n){let o=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return o!=null&&(typeof o=="string"&&(by(o)||ty(o))?o=parseFloat(o):!Pj(o)&&Do.test(n)&&(o=cy(t,n)),this.setBaseTarget(t,Ut(o)?o.get():o)),Ut(o)?o.get():o}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var s;const{initial:n}=this.props;let o;if(typeof n=="string"||typeof n=="object"){const a=Jd(this.props,n,(s=this.presenceContext)==null?void 0:s.custom);a&&(o=a[t])}if(n&&o!==void 0)return o;const r=this.getBaseTargetFromProps(this.props,t);return r!==void 0&&!Ut(r)?r:this.initialValues[t]!==void 0&&o===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Pd),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class Zv extends kj{constructor(){super(...arguments),this.KeyframeResolver=Sy}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:o}){delete n[t],delete o[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;Ut(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function Dj(e){return window.getComputedStyle(e)}class Nj extends Zv{constructor(){super(...arguments),this.type="html",this.renderInstance=$b}readValueFromInstance(t,n){if(qo.has(n))return Y5(t,n);{const o=Dj(t),r=(Wd(n)?o.getPropertyValue(n):o[n])||0;return typeof r=="string"?r.trim():r}}measureInstanceViewportBox(t,{transformPagePoint:n}){return ov(t,n)}build(t,n,o){Hd(t,n,o.transformTemplate)}scrapeMotionValuesFromProps(t,n,o){return Kd(t,n,o)}}class jj extends Zv{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=kt,this.updateDimensions=()=>{this.current&&!this.renderState.dimensions&&Lb(this.current,this.renderState)}}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(qo.has(n)){const o=ly(n);return o&&o.default||0}return n=_b.has(n)?n:_d(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,o){return zb(t,n,o)}onBindTransform(){this.current&&!this.renderState.dimensions&&ht.postRender(this.updateDimensions)}build(t,n,o){Xd(t,n,this.isSVGTag,o.transformTemplate)}renderInstance(t,n,o,r){Wb(t,n,o,r)}mount(t){this.isSVGTag=Zd(t.tagName),super.mount(t)}}const Fj=(e,t)=>Yd(e)?new jj(t):new Nj(t,{allowProjection:e!==_.Fragment}),Bj=x5({...i4,...Tj,...hj,...Ej},Fj),_s=B3(Bj),Vj=({showOptions:e,setShowOptions:t,buttonRef:n,options:o,onClick:r})=>{const s=_.useRef(null);return _.useEffect(()=>{let a;return e&&(a=setTimeout(()=>{const l=c=>{s!=null&&s.current&&!(s!=null&&s.current.contains(c.target))&&!(n!=null&&n.contains(c.target))&&t(!1)};document.addEventListener("mousedown",l),document._customLabelClickOutside=l},0)),()=>{clearTimeout(a),document._customLabelClickOutside&&(document.removeEventListener("mousedown",document._customLabelClickOutside),delete document._customLabelClickOutside)}},[e]),b.jsx(ns,{open:e,anchorEl:n,placement:"bottom",transition:!0,modifiers:[{name:"offset",options:{offset:[0,0]}},{name:"sameWidth",enabled:!0,phase:"beforeWrite",requires:["computeStyles"],fn:({state:a})=>{a.styles.popper.width=`${a.rects.reference.width}px`}}],style:{zIndex:1300},ref:s,children:({TransitionProps:a})=>b.jsx(Io,{...a,timeout:100,children:b.jsx(ge,{sx:{background:l=>l.palette.primary.appBackground,border:l=>`1px solid ${l.palette.primary.notifyBorderColor}`,borderRadius:"0.7rem",width:"100%",padding:"0.3rem",maxHeight:"20rem",overflowY:"auto"},children:b.jsx(ge,{children:o==null?void 0:o.map((l,c)=>b.jsx(Oo,{sx:{opacity:1,pointerEvents:"auto",padding:"0rem",borderTop:c!==0?u=>`0.1rem solid ${u.palette.primary.notifyBorderColor}`:"none"},onClick:u=>{u.stopPropagation(),r(l)},children:b.jsx(gt,{direction:"row",alignItems:"center",justifyContent:"space-between",sx:{p:"0.5rem"},children:b.jsx(gt,{direction:"row",alignItems:"center",gap:"1rem",children:b.jsx(at,{component:"h3",sx:{color:u=>u.palette.primary.notifyActiveText,fontWeight:"300",fontSize:"1.1rem",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:l.label})})})},c))})})})})},Jv=({styles:e,label:t,disabled:n,onClick:o,...r})=>{const s=ft();let a=(t==null?void 0:t.length)*((t==null?void 0:t.length)>=10?6.5:7.5)+38||0;a=r!=null&&r.options?a+15:a;const[l,c]=_.useState(!1),u=_.useRef(null),[d,p]=_.useState(!1),[f,m]=_.useState(!1);return _.useEffect(()=>{m(e==null?void 0:e.isAnimate)},[e==null?void 0:e.isAnimate]),b.jsxs(_s.button,{ref:u,onMouseEnter:()=>f&&c(!0),onMouseLeave:()=>f&&c(!1),initial:{width:f||!t?(e==null?void 0:e.width)||"3rem":`${a/10}rem`,borderRadius:"0.7rem"},animate:{width:f?`${l?a/10:3}rem`:`${t?a/10:3}rem`},transition:{duration:.2,ease:"easeInOut"},style:{height:"3rem",outline:"none",overflow:"hidden",backgroundColor:(e==null?void 0:e.variant)!=="outlined"?(e==null?void 0:e.colorType)==="secondary"?s.palette.brandColor.blue:(e==null?void 0:e.colorType)==="danger"?s.palette.brandColor.red:(e==null?void 0:e.colorType)==="empty"?s.palette.primary.notifyButtonBackground:s.palette.brandColor.orange:s.palette.primary.notifyBackground,border:(e==null?void 0:e.variant)==="outlined"||(e==null?void 0:e.colorType)==="empty"?`0.1rem solid ${s.palette.primary.notifyBorderColor}`:"none",display:"flex",cursor:"pointer",alignItems:"center",gap:l||!f?"0.5rem":0,color:(e==null?void 0:e.variant)==="outlined"||(e==null?void 0:e.colorType)==="empty"?s.palette.primary.notifyTextColor:"white",justifyContent:l?"flex-start":"center",padding:l||!f?"1.2rem":"0.8rem",whiteSpace:"nowrap",opacity:n?.6:1,cursor:n?"auto":"pointer",...e},disabled:n,layout:!0,onClick:()=>{!(r!=null&&r.options)&&o(),r!=null&&r.options&&(p(g=>!g),m(d))},...r,children:[(e==null?void 0:e.icon)&&(!(e!=null&&e.iconPosition)||(e==null?void 0:e.iconPosition)==="start")&&b.jsx(ge,{component:"img",src:e==null?void 0:e.icon}),t&&b.jsxs(_s.div,{layout:!0,initial:{opacity:0,width:0},animate:{opacity:l||!f?1:0,width:l||!f?"auto":0},transition:{duration:.2,ease:"easeInOut",delay:l?.1:0},style:{overflow:"hidden",whiteSpace:"nowrap",display:"flex",justifyContent:"center",gap:"0.8rem"},children:[b.jsx(at,{sx:{fontSize:"1.1rem"},children:t}),(r==null?void 0:r.options)&&(d?b.jsx(ge,{component:"img",src:Ke.ArrowUpLight}):b.jsx(ge,{component:"img",src:Ke.ArrowDownLight}))]}),(e==null?void 0:e.iconPosition)==="end"&&b.jsx(ge,{component:"img",src:e==null?void 0:e.icon}),b.jsx(Vj,{showOptions:d,buttonRef:u==null?void 0:u.current,setShowOptions:p,options:r==null?void 0:r.options,onClick:o})]})};Jv.propTypes={styles:i.object.isRequired,label:i.string};function or({...e}){return b.jsx(Vn,{children:b.jsx(Jv,{...e})})}function _l({...e}){return b.jsx(Vn,{children:b.jsx(Ku,{icon:b.jsx(ge,{component:"img",src:Ke.Uncheck}),checkedIcon:b.jsx(ge,{component:"img",src:Ke.Check}),...e})})}var qv={exports:{}};(function(e,t){(function(n,o){e.exports=o()})(br,function(){var n=1e3,o=6e4,r=36e5,s="millisecond",a="second",l="minute",c="hour",u="day",d="week",p="month",f="quarter",m="year",g="date",h="Invalid Date",y=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,v=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,I={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(j){var M=["th","st","nd","rd"],P=j%100;return"["+j+(M[(P-20)%10]||M[P]||M[0])+"]"}},w=function(j,M,P){var V=String(j);return!V||V.length>=M?j:""+Array(M+1-V.length).join(P)+j},T={s:w,z:function(j){var M=-j.utcOffset(),P=Math.abs(M),V=Math.floor(P/60),B=P%60;return(M<=0?"+":"-")+w(V,2,"0")+":"+w(B,2,"0")},m:function j(M,P){if(M.date()<P.date())return-j(P,M);var V=12*(P.year()-M.year())+(P.month()-M.month()),B=M.clone().add(V,p),G=P-B<0,F=M.clone().add(V+(G?-1:1),p);return+(-(V+(P-B)/(G?B-F:F-B))||0)},a:function(j){return j<0?Math.ceil(j)||0:Math.floor(j)},p:function(j){return{M:p,y:m,w:d,d:u,D:g,h:c,m:l,s:a,ms:s,Q:f}[j]||String(j||"").toLowerCase().replace(/s$/,"")},u:function(j){return j===void 0}},S="en",E={};E[S]=I;var O="$isDayjsObject",R=function(j){return j instanceof A||!(!j||!j[O])},k=function j(M,P,V){var B;if(!M)return S;if(typeof M=="string"){var G=M.toLowerCase();E[G]&&(B=G),P&&(E[G]=P,B=G);var F=M.split("-");if(!B&&F.length>1)return j(F[0])}else{var W=M.name;E[W]=M,B=W}return!V&&B&&(S=B),B||!V&&S},D=function(j,M){if(R(j))return j.clone();var P=typeof M=="object"?M:{};return P.date=j,P.args=arguments,new A(P)},N=T;N.l=k,N.i=R,N.w=function(j,M){return D(j,{locale:M.$L,utc:M.$u,x:M.$x,$offset:M.$offset})};var A=function(){function j(P){this.$L=k(P.locale,null,!0),this.parse(P),this.$x=this.$x||P.x||{},this[O]=!0}var M=j.prototype;return M.parse=function(P){this.$d=function(V){var B=V.date,G=V.utc;if(B===null)return new Date(NaN);if(N.u(B))return new Date;if(B instanceof Date)return new Date(B);if(typeof B=="string"&&!/Z$/i.test(B)){var F=B.match(y);if(F){var W=F[2]-1||0,Z=(F[7]||"0").substring(0,3);return G?new Date(Date.UTC(F[1],W,F[3]||1,F[4]||0,F[5]||0,F[6]||0,Z)):new Date(F[1],W,F[3]||1,F[4]||0,F[5]||0,F[6]||0,Z)}}return new Date(B)}(P),this.init()},M.init=function(){var P=this.$d;this.$y=P.getFullYear(),this.$M=P.getMonth(),this.$D=P.getDate(),this.$W=P.getDay(),this.$H=P.getHours(),this.$m=P.getMinutes(),this.$s=P.getSeconds(),this.$ms=P.getMilliseconds()},M.$utils=function(){return N},M.isValid=function(){return this.$d.toString()!==h},M.isSame=function(P,V){var B=D(P);return this.startOf(V)<=B&&B<=this.endOf(V)},M.isAfter=function(P,V){return D(P)<this.startOf(V)},M.isBefore=function(P,V){return this.endOf(V)<D(P)},M.$g=function(P,V,B){return N.u(P)?this[V]:this.set(B,P)},M.unix=function(){return Math.floor(this.valueOf()/1e3)},M.valueOf=function(){return this.$d.getTime()},M.startOf=function(P,V){var B=this,G=!!N.u(V)||V,F=N.p(P),W=function(ne,Q){var J=N.w(B.$u?Date.UTC(B.$y,Q,ne):new Date(B.$y,Q,ne),B);return G?J:J.endOf(u)},Z=function(ne,Q){return N.w(B.toDate()[ne].apply(B.toDate("s"),(G?[0,0,0,0]:[23,59,59,999]).slice(Q)),B)},L=this.$W,U=this.$M,q=this.$D,Y="set"+(this.$u?"UTC":"");switch(F){case m:return G?W(1,0):W(31,11);case p:return G?W(1,U):W(0,U+1);case d:var ee=this.$locale().weekStart||0,te=(L<ee?L+7:L)-ee;return W(G?q-te:q+(6-te),U);case u:case g:return Z(Y+"Hours",0);case c:return Z(Y+"Minutes",1);case l:return Z(Y+"Seconds",2);case a:return Z(Y+"Milliseconds",3);default:return this.clone()}},M.endOf=function(P){return this.startOf(P,!1)},M.$set=function(P,V){var B,G=N.p(P),F="set"+(this.$u?"UTC":""),W=(B={},B[u]=F+"Date",B[g]=F+"Date",B[p]=F+"Month",B[m]=F+"FullYear",B[c]=F+"Hours",B[l]=F+"Minutes",B[a]=F+"Seconds",B[s]=F+"Milliseconds",B)[G],Z=G===u?this.$D+(V-this.$W):V;if(G===p||G===m){var L=this.clone().set(g,1);L.$d[W](Z),L.init(),this.$d=L.set(g,Math.min(this.$D,L.daysInMonth())).$d}else W&&this.$d[W](Z);return this.init(),this},M.set=function(P,V){return this.clone().$set(P,V)},M.get=function(P){return this[N.p(P)]()},M.add=function(P,V){var B,G=this;P=Number(P);var F=N.p(V),W=function(U){var q=D(G);return N.w(q.date(q.date()+Math.round(U*P)),G)};if(F===p)return this.set(p,this.$M+P);if(F===m)return this.set(m,this.$y+P);if(F===u)return W(1);if(F===d)return W(7);var Z=(B={},B[l]=o,B[c]=r,B[a]=n,B)[F]||1,L=this.$d.getTime()+P*Z;return N.w(L,this)},M.subtract=function(P,V){return this.add(-1*P,V)},M.format=function(P){var V=this,B=this.$locale();if(!this.isValid())return B.invalidDate||h;var G=P||"YYYY-MM-DDTHH:mm:ssZ",F=N.z(this),W=this.$H,Z=this.$m,L=this.$M,U=B.weekdays,q=B.months,Y=B.meridiem,ee=function(Q,J,z,K){return Q&&(Q[J]||Q(V,G))||z[J].slice(0,K)},te=function(Q){return N.s(W%12||12,Q,"0")},ne=Y||function(Q,J,z){var K=Q<12?"AM":"PM";return z?K.toLowerCase():K};return G.replace(v,function(Q,J){return J||function(z){switch(z){case"YY":return String(V.$y).slice(-2);case"YYYY":return N.s(V.$y,4,"0");case"M":return L+1;case"MM":return N.s(L+1,2,"0");case"MMM":return ee(B.monthsShort,L,q,3);case"MMMM":return ee(q,L);case"D":return V.$D;case"DD":return N.s(V.$D,2,"0");case"d":return String(V.$W);case"dd":return ee(B.weekdaysMin,V.$W,U,2);case"ddd":return ee(B.weekdaysShort,V.$W,U,3);case"dddd":return U[V.$W];case"H":return String(W);case"HH":return N.s(W,2,"0");case"h":return te(1);case"hh":return te(2);case"a":return ne(W,Z,!0);case"A":return ne(W,Z,!1);case"m":return String(Z);case"mm":return N.s(Z,2,"0");case"s":return String(V.$s);case"ss":return N.s(V.$s,2,"0");case"SSS":return N.s(V.$ms,3,"0");case"Z":return F}return null}(Q)||F.replace(":","")})},M.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},M.diff=function(P,V,B){var G,F=this,W=N.p(V),Z=D(P),L=(Z.utcOffset()-this.utcOffset())*o,U=this-Z,q=function(){return N.m(F,Z)};switch(W){case m:G=q()/12;break;case p:G=q();break;case f:G=q()/3;break;case d:G=(U-L)/6048e5;break;case u:G=(U-L)/864e5;break;case c:G=U/r;break;case l:G=U/o;break;case a:G=U/n;break;default:G=U}return B?G:N.a(G)},M.daysInMonth=function(){return this.endOf(p).$D},M.$locale=function(){return E[this.$L]},M.locale=function(P,V){if(!P)return this.$L;var B=this.clone(),G=k(P,V,!0);return G&&(B.$L=G),B},M.clone=function(){return N.w(this.$d,this)},M.toDate=function(){return new Date(this.valueOf())},M.toJSON=function(){return this.isValid()?this.toISOString():null},M.toISOString=function(){return this.$d.toISOString()},M.toString=function(){return this.$d.toUTCString()},j}(),$=A.prototype;return D.prototype=$,[["$ms",s],["$s",a],["$m",l],["$H",c],["$W",u],["$M",p],["$y",m],["$D",g]].forEach(function(j){$[j[1]]=function(M){return this.$g(M,j[0],j[1])}}),D.extend=function(j,M){return j.$i||(j(M,A,D),j.$i=!0),D},D.locale=k,D.isDayjs=R,D.unix=function(j){return D(1e3*j)},D.en=E[S],D.Ls=E,D.p={},D})})(qv);var Lj=qv.exports;const Vt=Vo(Lj);var Kv={exports:{}};(function(e,t){(function(n,o){e.exports=o()})(br,function(){var n="week",o="year";return function(r,s,a){var l=s.prototype;l.week=function(c){if(c===void 0&&(c=null),c!==null)return this.add(7*(c-this.week()),"day");var u=this.$locale().yearStart||1;if(this.month()===11&&this.date()>25){var d=a(this).startOf(o).add(1,o).date(u),p=a(this).endOf(n);if(d.isBefore(p))return 1}var f=a(this).startOf(o).date(u).startOf(n).subtract(1,"millisecond"),m=this.diff(f,n,!0);return m<0?a(this).startOf("week").week():Math.ceil(m)},l.weeks=function(c){return c===void 0&&(c=null),this.week(c)}}})})(Kv);var $j=Kv.exports;const _j=Vo($j);var Qv={exports:{}};(function(e,t){(function(n,o){e.exports=o()})(br,function(){var n={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},o=/(\[[^[]*\])|([-_:/.,()\s]+)|(A|a|Q|YYYY|YY?|ww?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g,r=/\d/,s=/\d\d/,a=/\d\d?/,l=/\d*[^-_:/,()\s\d]+/,c={},u=function(y){return(y=+y)+(y>68?1900:2e3)},d=function(y){return function(v){this[y]=+v}},p=[/[+-]\d\d:?(\d\d)?|Z/,function(y){(this.zone||(this.zone={})).offset=function(v){if(!v||v==="Z")return 0;var I=v.match(/([+-]|\d\d)/g),w=60*I[1]+(+I[2]||0);return w===0?0:I[0]==="+"?-w:w}(y)}],f=function(y){var v=c[y];return v&&(v.indexOf?v:v.s.concat(v.f))},m=function(y,v){var I,w=c.meridiem;if(w){for(var T=1;T<=24;T+=1)if(y.indexOf(w(T,0,v))>-1){I=T>12;break}}else I=y===(v?"pm":"PM");return I},g={A:[l,function(y){this.afternoon=m(y,!1)}],a:[l,function(y){this.afternoon=m(y,!0)}],Q:[r,function(y){this.month=3*(y-1)+1}],S:[r,function(y){this.milliseconds=100*+y}],SS:[s,function(y){this.milliseconds=10*+y}],SSS:[/\d{3}/,function(y){this.milliseconds=+y}],s:[a,d("seconds")],ss:[a,d("seconds")],m:[a,d("minutes")],mm:[a,d("minutes")],H:[a,d("hours")],h:[a,d("hours")],HH:[a,d("hours")],hh:[a,d("hours")],D:[a,d("day")],DD:[s,d("day")],Do:[l,function(y){var v=c.ordinal,I=y.match(/\d+/);if(this.day=I[0],v)for(var w=1;w<=31;w+=1)v(w).replace(/\[|\]/g,"")===y&&(this.day=w)}],w:[a,d("week")],ww:[s,d("week")],M:[a,d("month")],MM:[s,d("month")],MMM:[l,function(y){var v=f("months"),I=(f("monthsShort")||v.map(function(w){return w.slice(0,3)})).indexOf(y)+1;if(I<1)throw new Error;this.month=I%12||I}],MMMM:[l,function(y){var v=f("months").indexOf(y)+1;if(v<1)throw new Error;this.month=v%12||v}],Y:[/[+-]?\d+/,d("year")],YY:[s,function(y){this.year=u(y)}],YYYY:[/\d{4}/,d("year")],Z:p,ZZ:p};function h(y){var v,I;v=y,I=c&&c.formats;for(var w=(y=v.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(D,N,A){var $=A&&A.toUpperCase();return N||I[A]||n[A]||I[$].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(j,M,P){return M||P.slice(1)})})).match(o),T=w.length,S=0;S<T;S+=1){var E=w[S],O=g[E],R=O&&O[0],k=O&&O[1];w[S]=k?{regex:R,parser:k}:E.replace(/^\[|\]$/g,"")}return function(D){for(var N={},A=0,$=0;A<T;A+=1){var j=w[A];if(typeof j=="string")$+=j.length;else{var M=j.regex,P=j.parser,V=D.slice($),B=M.exec(V)[0];P.call(N,B),D=D.replace(B,"")}}return function(G){var F=G.afternoon;if(F!==void 0){var W=G.hours;F?W<12&&(G.hours+=12):W===12&&(G.hours=0),delete G.afternoon}}(N),N}}return function(y,v,I){I.p.customParseFormat=!0,y&&y.parseTwoDigitYear&&(u=y.parseTwoDigitYear);var w=v.prototype,T=w.parse;w.parse=function(S){var E=S.date,O=S.utc,R=S.args;this.$u=O;var k=R[1];if(typeof k=="string"){var D=R[2]===!0,N=R[3]===!0,A=D||N,$=R[2];N&&($=R[2]),c=this.$locale(),!D&&$&&(c=I.Ls[$]),this.$d=function(V,B,G,F){try{if(["x","X"].indexOf(B)>-1)return new Date((B==="X"?1e3:1)*V);var W=h(B)(V),Z=W.year,L=W.month,U=W.day,q=W.hours,Y=W.minutes,ee=W.seconds,te=W.milliseconds,ne=W.zone,Q=W.week,J=new Date,z=U||(Z||L?1:J.getDate()),K=Z||J.getFullYear(),le=0;Z&&!L||(le=L>0?L-1:J.getMonth());var de,ue=q||0,we=Y||0,ae=ee||0,Se=te||0;return ne?new Date(Date.UTC(K,le,z,ue,we,ae,Se+60*ne.offset*1e3)):G?new Date(Date.UTC(K,le,z,ue,we,ae,Se)):(de=new Date(K,le,z,ue,we,ae,Se),Q&&(de=F(de).week(Q).toDate()),de)}catch{return new Date("")}}(E,k,O,I),this.init(),$&&$!==!0&&(this.$L=this.locale($).$L),A&&E!=this.format(k)&&(this.$d=new Date("")),c={}}else if(k instanceof Array)for(var j=k.length,M=1;M<=j;M+=1){R[1]=k[M-1];var P=I.apply(this,R);if(P.isValid()){this.$d=P.$d,this.$L=P.$L,this.init();break}M===j&&(this.$d=new Date(""))}else T.call(this,S)}}})})(Qv);var Wj=Qv.exports;const zj=Vo(Wj);var ex={exports:{}};(function(e,t){(function(n,o){e.exports=o()})(br,function(){var n={LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"};return function(o,r,s){var a=r.prototype,l=a.format;s.en.formats=n,a.format=function(c){c===void 0&&(c="YYYY-MM-DDTHH:mm:ssZ");var u=this.$locale().formats,d=function(p,f){return p.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,function(m,g,h){var y=h&&h.toUpperCase();return g||f[h]||n[h]||f[y].replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,function(v,I,w){return I||w.slice(1)})})}(c,u===void 0?{}:u);return l.call(this,d)}}})})(ex);var Gj=ex.exports;const Hj=Vo(Gj);var tx={exports:{}};(function(e,t){(function(n,o){e.exports=o()})(br,function(){return function(n,o,r){o.prototype.isBetween=function(s,a,l,c){var u=r(s),d=r(a),p=(c=c||"()")[0]==="(",f=c[1]===")";return(p?this.isAfter(u,l):!this.isBefore(u,l))&&(f?this.isBefore(d,l):!this.isAfter(d,l))||(p?this.isBefore(u,l):!this.isAfter(u,l))&&(f?this.isAfter(d,l):!this.isBefore(d,l))}}})})(tx);var Uj=tx.exports;const Yj=Vo(Uj);var nx={exports:{}};(function(e,t){(function(n,o){e.exports=o()})(br,function(){return function(n,o){var r=o.prototype,s=r.format;r.format=function(a){var l=this,c=this.$locale();if(!this.isValid())return s.bind(this)(a);var u=this.$utils(),d=(a||"YYYY-MM-DDTHH:mm:ssZ").replace(/\[([^\]]+)]|Q|wo|ww|w|WW|W|zzz|z|gggg|GGGG|Do|X|x|k{1,2}|S/g,function(p){switch(p){case"Q":return Math.ceil((l.$M+1)/3);case"Do":return c.ordinal(l.$D);case"gggg":return l.weekYear();case"GGGG":return l.isoWeekYear();case"wo":return c.ordinal(l.week(),"W");case"w":case"ww":return u.s(l.week(),p==="w"?1:2,"0");case"W":case"WW":return u.s(l.isoWeek(),p==="W"?1:2,"0");case"k":case"kk":return u.s(String(l.$H===0?24:l.$H),p==="k"?1:2,"0");case"X":return Math.floor(l.$d.getTime()/1e3);case"x":return l.$d.getTime();case"z":return"["+l.offsetName()+"]";case"zzz":return"["+l.offsetName("long")+"]";default:return p}});return s.bind(this)(d)}}})})(nx);var Xj=nx.exports;const Zj=Vo(Xj),ox=new Set;function rx(e,t="warning"){if(process.env.NODE_ENV==="production")return;const n=Array.isArray(e)?e.join(`
253
253
  `):e;ox.has(n)||(ox.add(n),t==="error"?console.error(n):console.warn(n))}Vt.extend(Hj),Vt.extend(_j),Vt.extend(Yj),Vt.extend(Zj);const Jj={YY:"year",YYYY:{sectionType:"year",contentType:"digit",maxLength:4},M:{sectionType:"month",contentType:"digit",maxLength:2},MM:"month",MMM:{sectionType:"month",contentType:"letter"},MMMM:{sectionType:"month",contentType:"letter"},D:{sectionType:"day",contentType:"digit",maxLength:2},DD:"day",Do:{sectionType:"day",contentType:"digit-with-letter"},d:{sectionType:"weekDay",contentType:"digit",maxLength:2},dd:{sectionType:"weekDay",contentType:"letter"},ddd:{sectionType:"weekDay",contentType:"letter"},dddd:{sectionType:"weekDay",contentType:"letter"},A:"meridiem",a:"meridiem",H:{sectionType:"hours",contentType:"digit",maxLength:2},HH:"hours",h:{sectionType:"hours",contentType:"digit",maxLength:2},hh:"hours",m:{sectionType:"minutes",contentType:"digit",maxLength:2},mm:"minutes",s:{sectionType:"seconds",contentType:"digit",maxLength:2},ss:"seconds"},qj={year:"YYYY",month:"MMMM",monthShort:"MMM",dayOfMonth:"D",dayOfMonthFull:"Do",weekday:"dddd",weekdayShort:"dd",hours24h:"HH",hours12h:"hh",meridiem:"A",minutes:"mm",seconds:"ss",fullDate:"ll",keyboardDate:"L",shortDate:"MMM D",normalDate:"D MMMM",normalDateWithWeekday:"ddd, MMM D",fullTime12h:"hh:mm A",fullTime24h:"HH:mm",keyboardDateTime12h:"L hh:mm A",keyboardDateTime24h:"L HH:mm"},Dp=["Missing UTC plugin","To be able to use UTC or timezones, you have to enable the `utc` plugin","Find more information on https://mui.com/x/react-date-pickers/timezone/#day-js-and-utc"].join(`
254
254
  `),ix=["Missing timezone plugin","To be able to use timezones, you have to enable both the `utc` and the `timezone` plugin","Find more information on https://mui.com/x/react-date-pickers/timezone/#day-js-and-timezone"].join(`
255
255
  `),Kj=(e,t)=>t?(...n)=>e(...n).locale(t):e;class Qj{constructor({locale:t,formats:n}={}){this.isMUIAdapter=!0,this.isTimezoneCompatible=!0,this.lib="dayjs",this.dayjs=void 0,this.locale=void 0,this.formats=void 0,this.escapedCharacters={start:"[",end:"]"},this.formatTokenMap=Jj,this.setLocaleToValue=o=>{const r=this.getCurrentLocaleCode();return r===o.locale()?o:o.locale(r)},this.hasUTCPlugin=()=>typeof Vt.utc<"u",this.hasTimezonePlugin=()=>typeof Vt.tz<"u",this.isSame=(o,r,s)=>{const a=this.setTimezone(r,this.getTimezone(o));return o.format(s)===a.format(s)},this.cleanTimezone=o=>{switch(o){case"default":return;case"system":return Vt.tz.guess();default:return o}},this.createSystemDate=o=>{if(this.hasUTCPlugin()&&this.hasTimezonePlugin()){const r=Vt.tz.guess();return r!=="UTC"?Vt.tz(o,r):Vt(o)}return Vt(o)},this.createUTCDate=o=>{if(!this.hasUTCPlugin())throw new Error(Dp);return Vt.utc(o)},this.createTZDate=(o,r)=>{if(!this.hasUTCPlugin())throw new Error(Dp);if(!this.hasTimezonePlugin())throw new Error(ix);const s=o!==void 0&&!o.endsWith("Z");return Vt(o).tz(this.cleanTimezone(r),s)},this.getLocaleFormats=()=>{const o=Vt.Ls,r=this.locale||"en";let s=o[r];return s===void 0&&(process.env.NODE_ENV!=="production"&&rx(["MUI X: Your locale has not been found.","Either the locale key is not a supported one. Locales supported by dayjs are available here: https://github.com/iamkun/dayjs/tree/dev/src/locale.","Or you forget to import the locale from 'dayjs/locale/{localeUsed}'","fallback on English locale."]),s=o.en),s.formats},this.adjustOffset=o=>{if(!this.hasTimezonePlugin())return o;const r=this.getTimezone(o);if(r!=="UTC"){const s=o.tz(this.cleanTimezone(r),!0);if(s.$offset===(o.$offset??0))return o;o.$offset=s.$offset}return o},this.date=(o,r="default")=>{if(o===null)return null;let s;return r==="UTC"?s=this.createUTCDate(o):r==="system"||r==="default"&&!this.hasTimezonePlugin()?s=this.createSystemDate(o):s=this.createTZDate(o,r),this.locale===void 0?s:s.locale(this.locale)},this.getInvalidDate=()=>Vt(new Date("Invalid date")),this.getTimezone=o=>{var r;if(this.hasTimezonePlugin()){const s=(r=o.$x)==null?void 0:r.$timezone;if(s)return s}return this.hasUTCPlugin()&&o.isUTC()?"UTC":"system"},this.setTimezone=(o,r)=>{if(this.getTimezone(o)===r)return o;if(r==="UTC"){if(!this.hasUTCPlugin())throw new Error(Dp);return o.utc()}if(r==="system")return o.local();if(!this.hasTimezonePlugin()){if(r==="default")return o;throw new Error(ix)}return Vt.tz(o,this.cleanTimezone(r))},this.toJsDate=o=>o.toDate(),this.parse=(o,r)=>o===""?null:this.dayjs(o,r,this.locale,!0),this.getCurrentLocaleCode=()=>this.locale||"en",this.is12HourCycleInCurrentLocale=()=>/A|a/.test(this.getLocaleFormats().LT||""),this.expandFormat=o=>{const r=this.getLocaleFormats(),s=a=>a.replace(/(\[[^\]]+])|(MMMM|MM|DD|dddd)/g,(l,c,u)=>c||u.slice(1));return o.replace(/(\[[^\]]+])|(LTS?|l{1,4}|L{1,4})/g,(a,l,c)=>{const u=c&&c.toUpperCase();return l||r[c]||s(r[u])})},this.isValid=o=>o==null?!1:o.isValid(),this.format=(o,r)=>this.formatByString(o,this.formats[r]),this.formatByString=(o,r)=>this.dayjs(o).format(r),this.formatNumber=o=>o,this.isEqual=(o,r)=>o===null&&r===null?!0:o===null||r===null?!1:o.toDate().getTime()===r.toDate().getTime(),this.isSameYear=(o,r)=>this.isSame(o,r,"YYYY"),this.isSameMonth=(o,r)=>this.isSame(o,r,"YYYY-MM"),this.isSameDay=(o,r)=>this.isSame(o,r,"YYYY-MM-DD"),this.isSameHour=(o,r)=>o.isSame(r,"hour"),this.isAfter=(o,r)=>o>r,this.isAfterYear=(o,r)=>this.hasUTCPlugin()?!this.isSameYear(o,r)&&o.utc()>r.utc():o.isAfter(r,"year"),this.isAfterDay=(o,r)=>this.hasUTCPlugin()?!this.isSameDay(o,r)&&o.utc()>r.utc():o.isAfter(r,"day"),this.isBefore=(o,r)=>o<r,this.isBeforeYear=(o,r)=>this.hasUTCPlugin()?!this.isSameYear(o,r)&&o.utc()<r.utc():o.isBefore(r,"year"),this.isBeforeDay=(o,r)=>this.hasUTCPlugin()?!this.isSameDay(o,r)&&o.utc()<r.utc():o.isBefore(r,"day"),this.isWithinRange=(o,[r,s])=>o>=r&&o<=s,this.startOfYear=o=>this.adjustOffset(o.startOf("year")),this.startOfMonth=o=>this.adjustOffset(o.startOf("month")),this.startOfWeek=o=>this.adjustOffset(this.setLocaleToValue(o).startOf("week")),this.startOfDay=o=>this.adjustOffset(o.startOf("day")),this.endOfYear=o=>this.adjustOffset(o.endOf("year")),this.endOfMonth=o=>this.adjustOffset(o.endOf("month")),this.endOfWeek=o=>this.adjustOffset(this.setLocaleToValue(o).endOf("week")),this.endOfDay=o=>this.adjustOffset(o.endOf("day")),this.addYears=(o,r)=>this.adjustOffset(r<0?o.subtract(Math.abs(r),"year"):o.add(r,"year")),this.addMonths=(o,r)=>this.adjustOffset(r<0?o.subtract(Math.abs(r),"month"):o.add(r,"month")),this.addWeeks=(o,r)=>this.adjustOffset(r<0?o.subtract(Math.abs(r),"week"):o.add(r,"week")),this.addDays=(o,r)=>this.adjustOffset(r<0?o.subtract(Math.abs(r),"day"):o.add(r,"day")),this.addHours=(o,r)=>this.adjustOffset(r<0?o.subtract(Math.abs(r),"hour"):o.add(r,"hour")),this.addMinutes=(o,r)=>this.adjustOffset(r<0?o.subtract(Math.abs(r),"minute"):o.add(r,"minute")),this.addSeconds=(o,r)=>this.adjustOffset(r<0?o.subtract(Math.abs(r),"second"):o.add(r,"second")),this.getYear=o=>o.year(),this.getMonth=o=>o.month(),this.getDate=o=>o.date(),this.getHours=o=>o.hour(),this.getMinutes=o=>o.minute(),this.getSeconds=o=>o.second(),this.getMilliseconds=o=>o.millisecond(),this.setYear=(o,r)=>this.adjustOffset(o.set("year",r)),this.setMonth=(o,r)=>this.adjustOffset(o.set("month",r)),this.setDate=(o,r)=>this.adjustOffset(o.set("date",r)),this.setHours=(o,r)=>this.adjustOffset(o.set("hour",r)),this.setMinutes=(o,r)=>this.adjustOffset(o.set("minute",r)),this.setSeconds=(o,r)=>this.adjustOffset(o.set("second",r)),this.setMilliseconds=(o,r)=>this.adjustOffset(o.set("millisecond",r)),this.getDaysInMonth=o=>o.daysInMonth(),this.getWeekArray=o=>{const r=this.startOfWeek(this.startOfMonth(o)),s=this.endOfWeek(this.endOfMonth(o));let a=0,l=r;const c=[];for(;l<s;){const u=Math.floor(a/7);c[u]=c[u]||[],c[u].push(l),l=this.addDays(l,1),a+=1}return c},this.getWeekNumber=o=>o.week(),this.getYearRange=([o,r])=>{const s=this.startOfYear(o),a=this.endOfYear(r),l=[];let c=s;for(;this.isBefore(c,a);)l.push(c),c=this.addYears(c,1);return l},this.dayjs=Kj(Vt,t),this.locale=t,this.formats=x({},qj,n),Vt.extend(zj)}getDayOfWeek(t){return t.day()+1}}function eF(e,...t){const n=new URL(`https://mui.com/production-error/?code=${e}`);return t.forEach(o=>n.searchParams.append("args[]",o)),`Minified MUI error #${e}; visit ${n} for the full message.`}const go=i.oneOfType([i.func,i.object]);function tF(e){if(typeof e!="string")throw new Error(process.env.NODE_ENV!=="production"?"MUI: `capitalize(string)` expects a string argument.":eF(7));return e.charAt(0).toUpperCase()+e.slice(1)}function Np(e){return e&&e.ownerDocument||document}const to=typeof window<"u"?C.useLayoutEffect:C.useEffect;let sx=0;function nF(e){const[t,n]=C.useState(e),o=e||t;return C.useEffect(()=>{t==null&&(sx+=1,n(`mui-${sx}`))},[t]),o}const ax={...C}.useId;function Wl(e){if(ax!==void 0){const t=ax();return e??t}return nF(e)}function ci({controlled:e,default:t,name:n,state:o="value"}){const{current:r}=C.useRef(e!==void 0),[s,a]=C.useState(t),l=r?e:s;if(process.env.NODE_ENV!=="production"){C.useEffect(()=>{r!==(e!==void 0)&&console.error([`MUI: A component is changing the ${r?"":"un"}controlled ${o} state of ${n} to be ${r?"un":""}controlled.`,"Elements should not switch from uncontrolled to controlled (or vice versa).",`Decide between using a controlled or uncontrolled ${n} element for the lifetime of the component.`,"The nature of the state is determined during the first render. It's considered controlled if the value is not `undefined`.","More info: https://fb.me/react-controlled-components"].join(`