framer-motion 12.6.2 → 12.6.3-alpha.0
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/cjs/client.js +1 -1
- package/dist/cjs/{create-BLp_edji.js → create-CTAzqVbr.js} +6 -1
- package/dist/cjs/dom.js +6 -1
- package/dist/cjs/index.js +2 -1
- package/dist/dom.js +1 -1
- package/dist/es/index.mjs +1 -0
- package/dist/es/render/utils/motion-values.mjs +1 -1
- package/dist/es/value/use-will-change/add-will-change.mjs +6 -0
- package/dist/framer-motion.dev.js +8 -2
- package/dist/framer-motion.js +1 -1
- package/dist/size-rollup-animate.js +1 -1
- package/dist/size-rollup-dom-animation.js +1 -1
- package/dist/size-rollup-dom-max.js +1 -1
- package/dist/size-rollup-motion.js +1 -1
- package/dist/types/index.d.ts +7 -1
- package/package.json +4 -4
package/dist/framer-motion.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("react")):"function"==typeof define&&define.amd?define(["exports","react"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).Motion={},t.React)}(this,(function(t,e){"use strict";function n(t){var e=Object.create(null);return t&&Object.keys(t).forEach((function(n){if("default"!==n){var i=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,i.get?i:{enumerable:!0,get:function(){return t[n]}})}})),e.default=t,Object.freeze(e)}var i=n(e),s=React,o=Symbol.for("react.element"),r=Symbol.for("react.fragment"),a=Object.prototype.hasOwnProperty,l=s.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,u={key:!0,ref:!0,__self:!0,__source:!0};function c(t,e,n){var i,s={},r=null,c=null;for(i in void 0!==n&&(r=""+n),void 0!==e.key&&(r=""+e.key),void 0!==e.ref&&(c=e.ref),e)a.call(e,i)&&!u.hasOwnProperty(i)&&(s[i]=e[i]);if(t&&t.defaultProps)for(i in e=t.defaultProps)void 0===s[i]&&(s[i]=e[i]);return{$$typeof:o,type:t,key:r,ref:c,props:s,_owner:l.current}}const h=r,d=c,p=c,m=e.createContext({});function f(t){const n=e.useRef(null);return null===n.current&&(n.current=t()),n.current}const g="undefined"!=typeof window,y=g?e.useLayoutEffect:e.useEffect,v=e.createContext(null),x=e.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"});class w extends i.Component{getSnapshotBeforeUpdate(t){const e=this.props.childRef.current;if(e&&t.isPresent&&!this.props.isPresent){const t=e.offsetParent,n=t instanceof HTMLElement&&t.offsetWidth||0,i=this.props.sizeRef.current;i.height=e.offsetHeight||0,i.width=e.offsetWidth||0,i.top=e.offsetTop,i.left=e.offsetLeft,i.right=n-i.width-i.left}return null}componentDidUpdate(){}render(){return this.props.children}}function P({children:t,isPresent:n,anchorX:s}){const o=e.useId(),r=e.useRef(null),a=e.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:l}=e.useContext(x);return e.useInsertionEffect(()=>{const{width:t,height:e,top:i,left:u,right:c}=a.current;if(n||!r.current||!t||!e)return;const h="left"===s?"left: "+u:"right: "+c;r.current.dataset.motionPopId=o;const d=document.createElement("style");return l&&(d.nonce=l),document.head.appendChild(d),d.sheet&&d.sheet.insertRule(`\n [data-motion-pop-id="${o}"] {\n position: absolute !important;\n width: ${t}px !important;\n height: ${e}px !important;\n ${h}px !important;\n top: ${i}px !important;\n }\n `),()=>{document.head.removeChild(d)}},[n]),d(w,{isPresent:n,childRef:r,sizeRef:a,children:i.cloneElement(t,{ref:r})})}const S=({children:t,initial:n,isPresent:s,onExitComplete:o,custom:r,presenceAffectsLayout:a,mode:l,anchorX:u})=>{const c=f(T),h=e.useId(),p=e.useCallback(t=>{c.set(t,!0);for(const t of c.values())if(!t)return;o&&o()},[c,o]),m=e.useMemo(()=>({id:h,initial:n,isPresent:s,custom:r,onExitComplete:p,register:t=>(c.set(t,!1),()=>c.delete(t))}),a?[Math.random(),p]:[s,p]);return e.useMemo(()=>{c.forEach((t,e)=>c.set(e,!1))},[s]),i.useEffect(()=>{!s&&!c.size&&o&&o()},[s]),"popLayout"===l&&(t=d(P,{isPresent:s,anchorX:u,children:t})),d(v.Provider,{value:m,children:t})};function T(){return new Map}function b(t=!0){const n=e.useContext(v);if(null===n)return[!0,null];const{isPresent:i,onExitComplete:s,register:o}=n,r=e.useId();e.useEffect(()=>{if(t)return o(r)},[t]);const a=e.useCallback(()=>t&&s&&s(r),[r,s,t]);return!i&&s?[!1,a]:[!0]}const A=t=>t.key||"";function E(t){const n=[];return e.Children.forEach(t,t=>{e.isValidElement(t)&&n.push(t)}),n}const M=e.createContext(null);function C(t,e){-1===t.indexOf(e)&&t.push(e)}function V(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}const R=t=>t;let D=R,k=R;const L={skipAnimations:!1,useManualTiming:!1};function B(t){let e;return()=>(void 0===e&&(e=t()),e)}const F=(t,e,n)=>{const i=e-t;return 0===i?1:(n-t)/i};class O{constructor(){this.subscriptions=[]}add(t){return C(this.subscriptions,t),()=>V(this.subscriptions,t)}notify(t,e,n){const i=this.subscriptions.length;if(i)if(1===i)this.subscriptions[0](t,e,n);else for(let s=0;s<i;s++){const i=this.subscriptions[s];i&&i(t,e,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const j=t=>1e3*t,I=t=>t/1e3;function U(t,e){return e?t*(1e3/e):0}const W=B(()=>void 0!==window.ScrollTimeline);class N extends class{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>"finished"in t?t.finished:t))}getAll(t){return this.animations[0][t]}setAll(t,e){for(let n=0;n<this.animations.length;n++)this.animations[n][t]=e}attachTimeline(t,e){const n=this.animations.map(n=>W()&&n.attachTimeline?n.attachTimeline(t):"function"==typeof e?e(n):void 0);return()=>{n.forEach((t,e)=>{t&&t(),this.animations[e].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 e=0;e<this.animations.length;e++)t=Math.max(t,this.animations[e].duration);return t}runAll(t){this.animations.forEach(e=>e[t]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}{then(t,e){return Promise.all(this.animations).then(t).catch(e)}}function z(t,e){return t?t[e]||t.default||t:void 0}function $(t){let e=0;let n=t.next(e);for(;!n.done&&e<2e4;)e+=50,n=t.next(e);return e>=2e4?1/0:e}function H(t,e=100,n){const i=n({...t,keyframes:[0,e]}),s=Math.min($(i),2e4);return{type:"keyframes",ease:t=>i.next(s*t).value/e,duration:I(s)}}function X(t){return"function"==typeof t}function Y(t,e){t.timeline=e,t.onfinish=null}const K=t=>Array.isArray(t)&&"number"==typeof t[0],G={linearEasing:void 0};function _(t,e){const n=B(t);return()=>{var t;return null!==(t=G[e])&&void 0!==t?t:n()}}const q=_(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(t){return!1}return!0},"linearEasing"),Z=(t,e,n=10)=>{let i="";const s=Math.max(Math.round(e/n),2);for(let e=0;e<s;e++)i+=t(F(0,s-1,e))+", ";return`linear(${i.substring(0,i.length-2)})`};function J(t){return Boolean("function"==typeof t&&q()||!t||"string"==typeof t&&(t in tt||q())||K(t)||Array.isArray(t)&&t.every(J))}const Q=([t,e,n,i])=>`cubic-bezier(${t}, ${e}, ${n}, ${i})`,tt={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Q([0,.65,.55,1]),circOut:Q([.55,0,1,.45]),backIn:Q([.31,.01,.66,-.59]),backOut:Q([.33,1.53,.69,.99])};const et=["read","resolveKeyframes","update","preRender","render","postRender"],nt={value:null,addProjectionMetrics:null};function it(t,e){let n=!1,i=!0;const s={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,r=et.reduce((t,n)=>(t[n]=function(t,e){let n=new Set,i=new Set,s=!1,o=!1;const r=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1},l=0;function u(e){r.has(e)&&(c.schedule(e),t()),l++,e(a)}const c={schedule:(t,e=!1,o=!1)=>{const a=o&&s?n:i;return e&&r.add(t),a.has(t)||a.add(t),t},cancel:t=>{i.delete(t),r.delete(t)},process:t=>{a=t,s?o=!0:(s=!0,[n,i]=[i,n],n.forEach(u),e&&nt.value&&nt.value.frameloop[e].push(l),l=0,n.clear(),s=!1,o&&(o=!1,c.process(t)))}};return c}(o,e?n:void 0),t),{}),{read:a,resolveKeyframes:l,update:u,preRender:c,render:h,postRender:d}=r,p=()=>{const o=L.useManualTiming?s.timestamp:performance.now();n=!1,L.useManualTiming||(s.delta=i?1e3/60:Math.max(Math.min(o-s.timestamp,40),1)),s.timestamp=o,s.isProcessing=!0,a.process(s),l.process(s),u.process(s),c.process(s),h.process(s),d.process(s),s.isProcessing=!1,n&&e&&(i=!1,t(p))};return{schedule:et.reduce((e,o)=>{const a=r[o];return e[o]=(e,o=!1,r=!1)=>(n||(n=!0,i=!0,s.isProcessing||t(p)),a.schedule(e,o,r)),e},{}),cancel:t=>{for(let e=0;e<et.length;e++)r[et[e]].cancel(t)},state:s,steps:r}}const{schedule:st,cancel:ot,state:rt,steps:at}=it("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:R,!0),{schedule:lt,cancel:ut}=it(queueMicrotask,!1);let ct;function ht(){ct=void 0}const dt={now:()=>(void 0===ct&&dt.set(rt.isProcessing||L.useManualTiming?rt.timestamp:performance.now()),ct),set:t=>{ct=t,queueMicrotask(ht)}},pt={x:!1,y:!1};function mt(){return pt.x||pt.y}function ft(t,e,n){var i;if(t instanceof EventTarget)return[t];if("string"==typeof t){let s=document;e&&(s=e.current);const o=null!==(i=null==n?void 0:n[t])&&void 0!==i?i:s.querySelectorAll(t);return o?Array.from(o):[]}return Array.from(t)}function gt(t,e){const n=ft(t),i=new AbortController;return[n,{passive:!0,...e,signal:i.signal},()=>i.abort()]}function yt(t){return!("touch"===t.pointerType||mt())}function vt(t,e,n={}){const[i,s,o]=gt(t,n),r=t=>{if(!yt(t))return;const{target:n}=t,i=e(n,t);if("function"!=typeof i||!n)return;const o=t=>{yt(t)&&(i(t),n.removeEventListener("pointerleave",o))};n.addEventListener("pointerleave",o,s)};return i.forEach(t=>{t.addEventListener("pointerenter",r,s)}),o}const xt=(t,e)=>!!e&&(t===e||xt(t,e.parentElement)),wt=t=>"mouse"===t.pointerType?"number"!=typeof t.button||t.button<=0:!1!==t.isPrimary,Pt=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);const St=new WeakSet;function Tt(t){return e=>{"Enter"===e.key&&t(e)}}function bt(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}function At(t){return wt(t)&&!mt()}function Et(t,e,n={}){const[i,s,o]=gt(t,n),r=t=>{const i=t.currentTarget;if(!At(t)||St.has(i))return;St.add(i);const o=e(i,t),r=(t,e)=>{window.removeEventListener("pointerup",a),window.removeEventListener("pointercancel",l),At(t)&&St.has(i)&&(St.delete(i),"function"==typeof o&&o(t,{success:e}))},a=t=>{r(t,i===window||i===document||n.useGlobalTarget||xt(i,t.target))},l=t=>{r(t,!1)};window.addEventListener("pointerup",a,s),window.addEventListener("pointercancel",l,s)};return i.forEach(t=>{var e;(n.useGlobalTarget?window:t).addEventListener("pointerdown",r,s),t instanceof HTMLElement&&(t.addEventListener("focus",t=>((t,e)=>{const n=t.currentTarget;if(!n)return;const i=Tt(()=>{if(St.has(n))return;bt(n,"down");const t=Tt(()=>{bt(n,"up")});n.addEventListener("keyup",t,e),n.addEventListener("blur",()=>bt(n,"cancel"),e)});n.addEventListener("keydown",i,e),n.addEventListener("blur",()=>n.removeEventListener("keydown",i),e)})(t,s)),e=t,Pt.has(e.tagName)||-1!==e.tabIndex||null!==t.tabIndex||(t.tabIndex=0))}),o}const Mt={current:void 0};class Ct{constructor(t,e={}){this.version="12.6.1",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(t,e=!0)=>{const n=dt.now();this.updatedAt!==n&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(t),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),e&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=e.owner}setCurrent(t){var e;this.current=t,this.updatedAt=dt.now(),null===this.canTrackVelocity&&void 0!==t&&(this.canTrackVelocity=(e=this.current,!isNaN(parseFloat(e))))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,e){this.events[t]||(this.events[t]=new O);const n=this.events[t].add(e);return"change"===t?()=>{n(),st.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,e){this.passiveEffect=t,this.stopPassiveEffect=e}set(t,e=!0){e&&this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t,e)}setWithVelocity(t,e,n){this.set(e),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-n}jump(t,e=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,e&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return Mt.current&&Mt.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const t=dt.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||t-this.updatedAt>30)return 0;const e=Math.min(this.updatedAt-this.prevUpdatedAt,30);return U(parseFloat(this.current)-parseFloat(this.prevFrameValue),e)}start(t){return this.stop(),new Promise(e=>{this.hasAnimated=!0,this.animation=t(e),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 Vt(t,e){return new Ct(t,e)}const Rt=(t,e,n)=>t+(e-t)*n;function Dt(t){return t.max-t.min}function kt(t,e,n,i=.5){t.origin=i,t.originPoint=Rt(e.min,e.max,t.origin),t.scale=Dt(n)/Dt(e),t.translate=Rt(n.min,n.max,t.origin)-t.originPoint,(t.scale>=.9999&&t.scale<=1.0001||isNaN(t.scale))&&(t.scale=1),(t.translate>=-.01&&t.translate<=.01||isNaN(t.translate))&&(t.translate=0)}function Lt(t,e,n,i){kt(t.x,e.x,n.x,i?i.originX:void 0),kt(t.y,e.y,n.y,i?i.originY:void 0)}function Bt(t,e,n){t.min=n.min+e.min,t.max=t.min+Dt(e)}function Ft(t,e,n){t.min=e.min-n.min,t.max=t.min+Dt(e)}function Ot(t,e,n){Ft(t.x,e.x,n.x),Ft(t.y,e.y,n.y)}const jt=t=>!t.isLayoutDirty&&t.willUpdate(!1);function It(){const t=new Set,e=new WeakMap,n=()=>t.forEach(jt);return{add:i=>{t.add(i),e.set(i,i.addEventListener("willUpdate",n))},remove:i=>{t.delete(i);const s=e.get(i);s&&(s(),e.delete(i)),n()},dirty:n}}const Ut=t=>Boolean(t&&t.getVelocity),Wt={current:!1},Nt=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t;function zt(t,e,n,i){if(t===e&&n===i)return R;const s=e=>function(t,e,n,i,s){let o,r,a=0;do{r=e+(n-e)/2,o=Nt(r,i,s)-t,o>0?n=r:e=r}while(Math.abs(o)>1e-7&&++a<12);return r}(e,0,1,t,n);return t=>0===t||1===t?t:Nt(s(t),e,i)}const $t=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,Ht=t=>e=>1-t(1-e),Xt=zt(.33,1.53,.69,.99),Yt=Ht(Xt),Kt=$t(Yt),Gt=t=>(t*=2)<1?.5*Yt(t):.5*(2-Math.pow(2,-10*(t-1))),_t=t=>1-Math.sin(Math.acos(t)),qt=Ht(_t),Zt=$t(_t),Jt=t=>/^0[^.\s]+$/u.test(t);const Qt=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],te=new Set(Qt),ee=new Set(["width","height","top","left","right","bottom",...Qt]),ne=(t,e,n)=>n>e?e:n<t?t:n,ie={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},se={...ie,transform:t=>ne(0,1,t)},oe={...ie,default:1},re=t=>Math.round(1e5*t)/1e5,ae=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;const le=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,ue=(t,e)=>n=>Boolean("string"==typeof n&&le.test(n)&&n.startsWith(t)||e&&!function(t){return null==t}(n)&&Object.prototype.hasOwnProperty.call(n,e)),ce=(t,e,n)=>i=>{if("string"!=typeof i)return i;const[s,o,r,a]=i.match(ae);return{[t]:parseFloat(s),[e]:parseFloat(o),[n]:parseFloat(r),alpha:void 0!==a?parseFloat(a):1}},he={...ie,transform:t=>Math.round((t=>ne(0,255,t))(t))},de={test:ue("rgb","red"),parse:ce("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:i=1})=>"rgba("+he.transform(t)+", "+he.transform(e)+", "+he.transform(n)+", "+re(se.transform(i))+")"};const pe={test:ue("#"),parse:function(t){let e="",n="",i="",s="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),i=t.substring(5,7),s=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),i=t.substring(3,4),s=t.substring(4,5),e+=e,n+=n,i+=i,s+=s),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(i,16),alpha:s?parseInt(s,16)/255:1}},transform:de.transform},me=t=>({test:e=>"string"==typeof e&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),fe=me("deg"),ge=me("%"),ye=me("px"),ve=me("vh"),xe=me("vw"),we={...ge,parse:t=>ge.parse(t)/100,transform:t=>ge.transform(100*t)},Pe={test:ue("hsl","hue"),parse:ce("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:i=1})=>"hsla("+Math.round(t)+", "+ge.transform(re(e))+", "+ge.transform(re(n))+", "+re(se.transform(i))+")"},Se={test:t=>de.test(t)||pe.test(t)||Pe.test(t),parse:t=>de.test(t)?de.parse(t):Pe.test(t)?Pe.parse(t):pe.parse(t),transform:t=>"string"==typeof t?t:t.hasOwnProperty("red")?de.transform(t):Pe.transform(t)},Te=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;const be=/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 Ae(t){const e=t.toString(),n=[],i={color:[],number:[],var:[]},s=[];let o=0;const r=e.replace(be,t=>(Se.test(t)?(i.color.push(o),s.push("color"),n.push(Se.parse(t))):t.startsWith("var(")?(i.var.push(o),s.push("var"),n.push(t)):(i.number.push(o),s.push("number"),n.push(parseFloat(t))),++o,"${}")).split("${}");return{values:n,split:r,indexes:i,types:s}}function Ee(t){return Ae(t).values}function Me(t){const{split:e,types:n}=Ae(t),i=e.length;return t=>{let s="";for(let o=0;o<i;o++)if(s+=e[o],void 0!==t[o]){const e=n[o];s+="number"===e?re(t[o]):"color"===e?Se.transform(t[o]):t[o]}return s}}const Ce=t=>"number"==typeof t?0:t;const Ve={test:function(t){var e,n;return isNaN(t)&&"string"==typeof t&&((null===(e=t.match(ae))||void 0===e?void 0:e.length)||0)+((null===(n=t.match(Te))||void 0===n?void 0:n.length)||0)>0},parse:Ee,createTransformer:Me,getAnimatableNone:function(t){const e=Ee(t);return Me(t)(e.map(Ce))}},Re=new Set(["brightness","contrast","saturate","opacity"]);function De(t){const[e,n]=t.slice(0,-1).split("(");if("drop-shadow"===e)return t;const[i]=n.match(ae)||[];if(!i)return t;const s=n.replace(i,"");let o=Re.has(e)?1:0;return i!==n&&(o*=100),e+"("+o+s+")"}const ke=/\b([a-z-]*)\(.*?\)/gu,Le={...Ve,getAnimatableNone:t=>{const e=t.match(ke);return e?e.map(De).join(" "):t}},Be={borderWidth:ye,borderTopWidth:ye,borderRightWidth:ye,borderBottomWidth:ye,borderLeftWidth:ye,borderRadius:ye,radius:ye,borderTopLeftRadius:ye,borderTopRightRadius:ye,borderBottomRightRadius:ye,borderBottomLeftRadius:ye,width:ye,maxWidth:ye,height:ye,maxHeight:ye,top:ye,right:ye,bottom:ye,left:ye,padding:ye,paddingTop:ye,paddingRight:ye,paddingBottom:ye,paddingLeft:ye,margin:ye,marginTop:ye,marginRight:ye,marginBottom:ye,marginLeft:ye,backgroundPositionX:ye,backgroundPositionY:ye},Fe={rotate:fe,rotateX:fe,rotateY:fe,rotateZ:fe,scale:oe,scaleX:oe,scaleY:oe,scaleZ:oe,skew:fe,skewX:fe,skewY:fe,distance:ye,translateX:ye,translateY:ye,translateZ:ye,x:ye,y:ye,z:ye,perspective:ye,transformPerspective:ye,opacity:se,originX:we,originY:we,originZ:ye},Oe={...ie,transform:Math.round},je={...Be,...Fe,zIndex:Oe,size:ye,fillOpacity:se,strokeOpacity:se,numOctaves:Oe},Ie={...je,color:Se,backgroundColor:Se,outlineColor:Se,fill:Se,stroke:Se,borderColor:Se,borderTopColor:Se,borderRightColor:Se,borderBottomColor:Se,borderLeftColor:Se,filter:Le,WebkitFilter:Le},Ue=t=>Ie[t];function We(t,e){let n=Ue(t);return n!==Le&&(n=Ve),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const Ne=new Set(["auto","none","0"]);const ze=t=>180*t/Math.PI,$e=t=>{const e=ze(Math.atan2(t[1],t[0]));return Xe(e)},He={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:$e,rotateZ:$e,skewX:t=>ze(Math.atan(t[1])),skewY:t=>ze(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},Xe=t=>((t%=360)<0&&(t+=360),t),Ye=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),Ke=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),Ge={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Ye,scaleY:Ke,scale:t=>(Ye(t)+Ke(t))/2,rotateX:t=>Xe(ze(Math.atan2(t[6],t[5]))),rotateY:t=>Xe(ze(Math.atan2(-t[2],t[0]))),rotateZ:$e,rotate:$e,skewX:t=>ze(Math.atan(t[4])),skewY:t=>ze(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function _e(t){return t.includes("scale")?1:0}function qe(t,e){if(!t||"none"===t)return _e(e);const n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let i,s;if(n)i=Ge,s=n;else{const e=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);i=He,s=e}if(!s)return _e(e);const o=i[e],r=s[1].split(",").map(Ze);return"function"==typeof o?o(r):r[o]}function Ze(t){return parseFloat(t.trim())}const Je=t=>t===ie||t===ye,Qe=new Set(["x","y","z"]),tn=Qt.filter(t=>!Qe.has(t));const en={width:({x:t},{paddingLeft:e="0",paddingRight:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),height:({y:t},{paddingTop:e="0",paddingBottom:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:(t,{transform:e})=>qe(e,"x"),y:(t,{transform:e})=>qe(e,"y")};en.translateX=en.x,en.translateY=en.y;const nn=new Set;let sn=!1,on=!1;function rn(){if(on){const t=Array.from(nn).filter(t=>t.needsMeasurement),e=new Set(t.map(t=>t.element)),n=new Map;e.forEach(t=>{const e=function(t){const e=[];return tn.forEach(n=>{const i=t.getValue(n);void 0!==i&&(e.push([n,i.get()]),i.set(n.startsWith("scale")?1:0))}),e}(t);e.length&&(n.set(t,e),t.render())}),t.forEach(t=>t.measureInitialState()),e.forEach(t=>{t.render();const e=n.get(t);e&&e.forEach(([e,n])=>{var i;null===(i=t.getValue(e))||void 0===i||i.set(n)})}),t.forEach(t=>t.measureEndState()),t.forEach(t=>{void 0!==t.suspendedScrollY&&window.scrollTo(0,t.suspendedScrollY)})}on=!1,sn=!1,nn.forEach(t=>t.complete()),nn.clear()}function an(){nn.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(on=!0)})}class ln{constructor(t,e,n,i,s,o=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=e,this.name=n,this.motionValue=i,this.element=s,this.isAsync=o}scheduleResolve(){this.isScheduled=!0,this.isAsync?(nn.add(this),sn||(sn=!0,st.read(an),st.resolveKeyframes(rn))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:e,element:n,motionValue:i}=this;for(let s=0;s<t.length;s++)if(null===t[s])if(0===s){const s=null==i?void 0:i.get(),o=t[t.length-1];if(void 0!==s)t[0]=s;else if(n&&e){const i=n.readValue(e,o);null!=i&&(t[0]=i)}void 0===t[0]&&(t[0]=o),i&&void 0===s&&i.set(t[0])}else t[s]=t[s-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),nn.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,nn.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const un=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),cn=t=>e=>"string"==typeof e&&e.startsWith(t),hn=cn("--"),dn=cn("var(--"),pn=t=>!!dn(t)&&mn.test(t.split("/*")[0].trim()),mn=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,fn=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function gn(t,e,n=1){const[i,s]=function(t){const e=fn.exec(t);if(!e)return[,];const[,n,i,s]=e;return["--"+(null!=n?n:i),s]}(t);if(!i)return;const o=window.getComputedStyle(e).getPropertyValue(i);if(o){const t=o.trim();return un(t)?parseFloat(t):t}return pn(s)?gn(s,e,n+1):s}const yn=t=>e=>e.test(t),vn=[ie,ye,ge,fe,xe,ve,{test:t=>"auto"===t,parse:t=>t}],xn=t=>vn.find(yn(t));class wn extends ln{constructor(t,e,n,i,s){super(t,e,n,i,s,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:e,name:n}=this;if(!e||!e.current)return;super.readKeyframes();for(let n=0;n<t.length;n++){let i=t[n];if("string"==typeof i&&(i=i.trim(),pn(i))){const s=gn(i,e.current);void 0!==s&&(t[n]=s),n===t.length-1&&(this.finalKeyframe=i)}}if(this.resolveNoneKeyframes(),!ee.has(n)||2!==t.length)return;const[i,s]=t,o=xn(i),r=xn(s);if(o!==r)if(Je(o)&&Je(r))for(let e=0;e<t.length;e++){const n=t[e];"string"==typeof n&&(t[e]=parseFloat(n))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:e}=this,n=[];for(let e=0;e<t.length;e++)("number"==typeof(i=t[e])?0===i:null===i||"none"===i||"0"===i||Jt(i))&&n.push(e);var i;n.length&&function(t,e,n){let i=0,s=void 0;for(;i<t.length&&!s;){const e=t[i];"string"==typeof e&&!Ne.has(e)&&Ae(e).values.length&&(s=t[i]),i++}if(s&&n)for(const i of e)t[i]=We(n,s)}(t,n,e)}measureInitialState(){const{element:t,unresolvedKeyframes:e,name:n}=this;if(!t||!t.current)return;"height"===n&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=en[n](t.measureViewportBox(),window.getComputedStyle(t.current)),e[0]=this.measuredOrigin;const i=e[e.length-1];void 0!==i&&t.getValue(n,i).jump(i,!1)}measureEndState(){var t;const{element:e,name:n,unresolvedKeyframes:i}=this;if(!e||!e.current)return;const s=e.getValue(n);s&&s.jump(this.measuredOrigin,!1);const o=i.length-1,r=i[o];i[o]=en[n](e.measureViewportBox(),window.getComputedStyle(e.current)),null!==r&&void 0===this.finalKeyframe&&(this.finalKeyframe=r),(null===(t=this.removedTransforms)||void 0===t?void 0:t.length)&&this.removedTransforms.forEach(([t,n])=>{e.getValue(t).set(n)}),this.resolveNoneKeyframes()}}const Pn=(t,e)=>"zIndex"!==e&&(!("number"!=typeof t&&!Array.isArray(t))||!("string"!=typeof t||!Ve.test(t)&&"0"!==t||t.startsWith("url(")));function Sn(t,e,n,i){const s=t[0];if(null===s)return!1;if("display"===e||"visibility"===e)return!0;const o=t[t.length-1],r=Pn(s,e),a=Pn(o,e);return!(!r||!a)&&(function(t){const e=t[0];if(1===t.length)return!0;for(let n=0;n<t.length;n++)if(t[n]!==e)return!0}(t)||("spring"===n||X(n))&&i)}const Tn=t=>null!==t;function bn(t,{repeat:e,repeatType:n="loop"},i){const s=t.filter(Tn),o=e&&"loop"!==n&&e%2==1?0:s.length-1;return o&&void 0!==i?i:s[o]}class An{constructor({autoplay:t=!0,delay:e=0,type:n="keyframes",repeat:i=0,repeatDelay:s=0,repeatType:o="loop",...r}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=dt.now(),this.options={autoplay:t,delay:e,type:n,repeat:i,repeatDelay:s,repeatType:o,...r},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt&&this.resolvedAt-this.createdAt>40?this.resolvedAt:this.createdAt}get resolved(){return this._resolved||this.hasAttemptedResolve||(an(),rn()),this._resolved}onKeyframesResolved(t,e){this.resolvedAt=dt.now(),this.hasAttemptedResolve=!0;const{name:n,type:i,velocity:s,delay:o,onComplete:r,onUpdate:a,isGenerator:l}=this.options;if(!l&&!Sn(t,n,i,s)){if(Wt.current||!o)return a&&a(bn(t,this.options,e)),r&&r(),void this.resolveFinishedPromise();this.options.duration=0}const u=this.initPlayback(t,e);!1!==u&&(this._resolved={keyframes:t,finalKeyframe:e,...u},this.onPostResolved())}onPostResolved(){}then(t,e){return this.currentFinishedPromise.then(t,e)}flatten(){this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear")}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}function En(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function Mn(t,e){return n=>n>0?e:t}const Cn=(t,e,n)=>{const i=t*t,s=n*(e*e-i)+i;return s<0?0:Math.sqrt(s)},Vn=[pe,de,Pe];function Rn(t){const e=(n=t,Vn.find(t=>t.test(n)));var n;if(!Boolean(e))return!1;let i=e.parse(t);return e===Pe&&(i=function({hue:t,saturation:e,lightness:n,alpha:i}){t/=360,n/=100;let s=0,o=0,r=0;if(e/=100){const i=n<.5?n*(1+e):n+e-n*e,a=2*n-i;s=En(a,i,t+1/3),o=En(a,i,t),r=En(a,i,t-1/3)}else s=o=r=n;return{red:Math.round(255*s),green:Math.round(255*o),blue:Math.round(255*r),alpha:i}}(i)),i}const Dn=(t,e)=>{const n=Rn(t),i=Rn(e);if(!n||!i)return Mn(t,e);const s={...n};return t=>(s.red=Cn(n.red,i.red,t),s.green=Cn(n.green,i.green,t),s.blue=Cn(n.blue,i.blue,t),s.alpha=Rt(n.alpha,i.alpha,t),de.transform(s))},kn=(t,e)=>n=>e(t(n)),Ln=(...t)=>t.reduce(kn),Bn=new Set(["none","hidden"]);function Fn(t,e){return n=>Rt(t,e,n)}function On(t){return"number"==typeof t?Fn:"string"==typeof t?pn(t)?Mn:Se.test(t)?Dn:Un:Array.isArray(t)?jn:"object"==typeof t?Se.test(t)?Dn:In:Mn}function jn(t,e){const n=[...t],i=n.length,s=t.map((t,n)=>On(t)(t,e[n]));return t=>{for(let e=0;e<i;e++)n[e]=s[e](t);return n}}function In(t,e){const n={...t,...e},i={};for(const s in n)void 0!==t[s]&&void 0!==e[s]&&(i[s]=On(t[s])(t[s],e[s]));return t=>{for(const e in i)n[e]=i[e](t);return n}}const Un=(t,e)=>{const n=Ve.createTransformer(e),i=Ae(t),s=Ae(e);return i.indexes.var.length===s.indexes.var.length&&i.indexes.color.length===s.indexes.color.length&&i.indexes.number.length>=s.indexes.number.length?Bn.has(t)&&!s.values.length||Bn.has(e)&&!i.values.length?function(t,e){return Bn.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}(t,e):Ln(jn(function(t,e){var n;const i=[],s={color:0,var:0,number:0};for(let o=0;o<e.values.length;o++){const r=e.types[o],a=t.indexes[r][s[r]],l=null!==(n=t.values[a])&&void 0!==n?n:0;i[o]=l,s[r]++}return i}(i,s),s.values),n):Mn(t,e)};function Wn(t,e,n){if("number"==typeof t&&"number"==typeof e&&"number"==typeof n)return Rt(t,e,n);return On(t)(t,e)}function Nn(t,e,n){const i=Math.max(e-5,0);return U(n-t(i),e-i)}const zn=100,$n=10,Hn=1,Xn=0,Yn=800,Kn=.3,Gn=.3,_n={granular:.01,default:2},qn={granular:.005,default:.5},Zn=.01,Jn=10,Qn=.05,ti=1;function ei({duration:t=Yn,bounce:e=Kn,velocity:n=Xn,mass:i=Hn}){let s,o,r=1-e;r=ne(Qn,ti,r),t=ne(Zn,Jn,I(t)),r<1?(s=e=>{const i=e*r,s=i*t;return.001-(i-n)/ni(e,r)*Math.exp(-s)},o=e=>{const i=e*r*t,o=i*n+n,a=Math.pow(r,2)*Math.pow(e,2)*t,l=Math.exp(-i),u=ni(Math.pow(e,2),r);return(.001-s(e)>0?-1:1)*((o-a)*l)/u}):(s=e=>Math.exp(-e*t)*((e-n)*t+1)-.001,o=e=>Math.exp(-e*t)*(t*t*(n-e)));const a=function(t,e,n){let i=n;for(let n=1;n<12;n++)i-=t(i)/e(i);return i}(s,o,5/t);if(t=j(t),isNaN(a))return{stiffness:zn,damping:$n,duration:t};{const e=Math.pow(a,2)*i;return{stiffness:e,damping:2*r*Math.sqrt(i*e),duration:t}}}function ni(t,e){return t*Math.sqrt(1-e*e)}const ii=["duration","bounce"],si=["stiffness","damping","mass"];function oi(t,e){return e.some(e=>void 0!==t[e])}function ri(t=Gn,e=Kn){const n="object"!=typeof t?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:i,restDelta:s}=n;const o=n.keyframes[0],r=n.keyframes[n.keyframes.length-1],a={done:!1,value:o},{stiffness:l,damping:u,mass:c,duration:h,velocity:d,isResolvedFromDuration:p}=function(t){let e={velocity:Xn,stiffness:zn,damping:$n,mass:Hn,isResolvedFromDuration:!1,...t};if(!oi(t,si)&&oi(t,ii))if(t.visualDuration){const n=t.visualDuration,i=2*Math.PI/(1.2*n),s=i*i,o=2*ne(.05,1,1-(t.bounce||0))*Math.sqrt(s);e={...e,mass:Hn,stiffness:s,damping:o}}else{const n=ei(t);e={...e,...n,mass:Hn},e.isResolvedFromDuration=!0}return e}({...n,velocity:-I(n.velocity||0)}),m=d||0,f=u/(2*Math.sqrt(l*c)),g=r-o,y=I(Math.sqrt(l/c)),v=Math.abs(g)<5;let x;if(i||(i=v?_n.granular:_n.default),s||(s=v?qn.granular:qn.default),f<1){const t=ni(y,f);x=e=>{const n=Math.exp(-f*y*e);return r-n*((m+f*y*g)/t*Math.sin(t*e)+g*Math.cos(t*e))}}else if(1===f)x=t=>r-Math.exp(-y*t)*(g+(m+y*g)*t);else{const t=y*Math.sqrt(f*f-1);x=e=>{const n=Math.exp(-f*y*e),i=Math.min(t*e,300);return r-n*((m+f*y*g)*Math.sinh(i)+t*g*Math.cosh(i))/t}}const w={calculatedDuration:p&&h||null,next:t=>{const e=x(t);if(p)a.done=t>=h;else{let n=0;f<1&&(n=0===t?j(m):Nn(x,t,e));const o=Math.abs(n)<=i,l=Math.abs(r-e)<=s;a.done=o&&l}return a.value=a.done?r:e,a},toString:()=>{const t=Math.min($(w),2e4),e=Z(e=>w.next(t*e).value,t,30);return t+"ms "+e}};return w}function ai({keyframes:t,velocity:e=0,power:n=.8,timeConstant:i=325,bounceDamping:s=10,bounceStiffness:o=500,modifyTarget:r,min:a,max:l,restDelta:u=.5,restSpeed:c}){const h=t[0],d={done:!1,value:h},p=t=>void 0===a?l:void 0===l||Math.abs(a-t)<Math.abs(l-t)?a:l;let m=n*e;const f=h+m,g=void 0===r?f:r(f);g!==f&&(m=g-h);const y=t=>-m*Math.exp(-t/i),v=t=>g+y(t),x=t=>{const e=y(t),n=v(t);d.done=Math.abs(e)<=u,d.value=d.done?g:n};let w,P;const S=t=>{var e;(e=d.value,void 0!==a&&e<a||void 0!==l&&e>l)&&(w=t,P=ri({keyframes:[d.value,p(d.value)],velocity:Nn(v,t,d.value),damping:s,stiffness:o,restDelta:u,restSpeed:c}))};return S(0),{calculatedDuration:null,next:t=>{let e=!1;return P||void 0!==w||(e=!0,x(t),S(t)),void 0!==w&&t>=w?P.next(t-w):(!e&&x(t),d)}}}const li=zt(.42,0,1,1),ui=zt(0,0,.58,1),ci=zt(.42,0,.58,1),hi=t=>Array.isArray(t)&&"number"!=typeof t[0],di={linear:R,easeIn:li,easeInOut:ci,easeOut:ui,circIn:_t,circInOut:Zt,circOut:qt,backIn:Yt,backInOut:Kt,backOut:Xt,anticipate:Gt},pi=t=>{if(K(t)){k(4===t.length);const[e,n,i,s]=t;return zt(e,n,i,s)}return"string"==typeof t?di[t]:t};function mi(t,e,{clamp:n=!0,ease:i,mixer:s}={}){const o=t.length;if(k(o===e.length),1===o)return()=>e[0];if(2===o&&e[0]===e[1])return()=>e[1];const r=t[0]===t[1];t[0]>t[o-1]&&(t=[...t].reverse(),e=[...e].reverse());const a=function(t,e,n){const i=[],s=n||Wn,o=t.length-1;for(let n=0;n<o;n++){let o=s(t[n],t[n+1]);if(e){const t=Array.isArray(e)?e[n]||R:e;o=Ln(t,o)}i.push(o)}return i}(e,i,s),l=a.length,u=n=>{if(r&&n<t[0])return e[0];let i=0;if(l>1)for(;i<t.length-2&&!(n<t[i+1]);i++);const s=F(t[i],t[i+1],n);return a[i](s)};return n?e=>u(ne(t[0],t[o-1],e)):u}function fi(t,e){const n=t[t.length-1];for(let i=1;i<=e;i++){const s=F(0,e,i);t.push(Rt(n,1,s))}}function gi(t){const e=[0];return fi(e,t.length-1),e}function yi({duration:t=300,keyframes:e,times:n,ease:i="easeInOut"}){const s=hi(i)?i.map(pi):pi(i),o={done:!1,value:e[0]},r=mi(function(t,e){return t.map(t=>t*e)}(n&&n.length===e.length?n:gi(e),t),e,{ease:Array.isArray(s)?s:(a=e,l=s,a.map(()=>l||ci).splice(0,a.length-1))});var a,l;return{calculatedDuration:t,next:e=>(o.value=r(e),o.done=e>=t,o)}}const vi=t=>{const e=({timestamp:e})=>t(e);return{start:()=>st.update(e,!0),stop:()=>ot(e),now:()=>rt.isProcessing?rt.timestamp:dt.now()}},xi={decay:ai,inertia:ai,tween:yi,keyframes:yi,spring:ri},wi=t=>t/100;class Pi extends An{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,"idle"===this.state)return;this.teardown();const{onStop:t}=this.options;t&&t()};const{name:e,motionValue:n,element:i,keyframes:s}=this.options,o=(null==i?void 0:i.KeyframeResolver)||ln;this.resolver=new o(s,(t,e)=>this.onKeyframesResolved(t,e),e,n,i),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(t){const{type:e="keyframes",repeat:n=0,repeatDelay:i=0,repeatType:s,velocity:o=0}=this.options,r=X(e)?e:xi[e]||yi;let a,l;r!==yi&&"number"!=typeof t[0]&&(a=Ln(wi,Wn(t[0],t[1])),t=[0,100]);const u=r({...this.options,keyframes:t});"mirror"===s&&(l=r({...this.options,keyframes:[...t].reverse(),velocity:-o})),null===u.calculatedDuration&&(u.calculatedDuration=$(u));const{calculatedDuration:c}=u,h=c+i;return{generator:u,mirroredGenerator:l,mapPercentToKeyframes:a,calculatedDuration:c,resolvedDuration:h,totalDuration:h*(n+1)-i}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),"paused"!==this.pendingPlayState&&t?this.state=this.pendingPlayState:this.pause()}tick(t,e=!1){const{resolved:n}=this;if(!n){const{keyframes:t}=this.options;return{done:!0,value:t[t.length-1]}}const{finalKeyframe:i,generator:s,mirroredGenerator:o,mapPercentToKeyframes:r,keyframes:a,calculatedDuration:l,totalDuration:u,resolvedDuration:c}=n;if(null===this.startTime)return s.next(0);const{delay:h,repeat:d,repeatType:p,repeatDelay:m,onUpdate:f}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-u/this.speed,this.startTime)),e?this.currentTime=t:null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const g=this.currentTime-h*(this.speed>=0?1:-1),y=this.speed>=0?g<0:g>u;this.currentTime=Math.max(g,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=u);let v=this.currentTime,x=s;if(d){const t=Math.min(this.currentTime,u)/c;let e=Math.floor(t),n=t%1;!n&&t>=1&&(n=1),1===n&&e--,e=Math.min(e,d+1);Boolean(e%2)&&("reverse"===p?(n=1-n,m&&(n-=m/c)):"mirror"===p&&(x=o)),v=ne(0,1,n)*c}const w=y?{done:!1,value:a[0]}:x.next(v);r&&(w.value=r(w.value));let{done:P}=w;y||null===l||(P=this.speed>=0?this.currentTime>=u:this.currentTime<=0);const S=null===this.holdTime&&("finished"===this.state||"running"===this.state&&P);return S&&void 0!==i&&(w.value=bn(a,this.options,i)),f&&f(w.value),S&&this.finish(),w}get duration(){const{resolved:t}=this;return t?I(t.calculatedDuration):0}get time(){return I(this.currentTime)}set time(t){t=j(t),this.currentTime=t,null!==this.holdTime||0===this.speed?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.speed)}get speed(){return this.playbackSpeed}set speed(t){const e=this.playbackSpeed!==t;this.playbackSpeed=t,e&&(this.time=I(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved)return void(this.pendingPlayState="running");if(this.isStopped)return;const{driver:t=vi,onPlay:e,startTime:n}=this.options;this.driver||(this.driver=t(t=>this.tick(t))),e&&e();const i=this.driver.now();null!==this.holdTime?this.startTime=i-this.holdTime:this.startTime?"finished"===this.state&&(this.startTime=i):this.startTime=null!=n?n:this.calcStartTime(),"finished"===this.state&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var t;this._resolved?(this.state="paused",this.holdTime=null!==(t=this.currentTime)&&void 0!==t?t:0):this.pendingPlayState="paused"}complete(){"running"!==this.state&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}cancel(){null!==this.cancelTime&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}}function Si(t){return new Pi(t)}const Ti=new Set(["opacity","clipPath","filter","transform"]);function bi(t,e,n,{delay:i=0,duration:s=300,repeat:o=0,repeatType:r="loop",ease:a="easeInOut",times:l}={}){const u={[e]:n};l&&(u.offset=l);const c=function t(e,n){return e?"function"==typeof e&&q()?Z(e,n):K(e)?Q(e):Array.isArray(e)?e.map(e=>t(e,n)||tt.easeOut):tt[e]:void 0}(a,s);Array.isArray(c)&&(u.easing=c);return t.animate(u,{delay:i,duration:s,easing:Array.isArray(c)?"linear":c,fill:"both",iterations:o+1,direction:"reverse"===r?"alternate":"normal"})}const Ai=B(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));const Ei={anticipate:Gt,backInOut:Kt,circInOut:Zt};class Mi extends An{constructor(t){super(t);const{name:e,motionValue:n,element:i,keyframes:s}=this.options;this.resolver=new wn(s,(t,e)=>this.onKeyframesResolved(t,e),e,n,i),this.resolver.scheduleResolve()}initPlayback(t,e){let{duration:n=300,times:i,ease:s,type:o,motionValue:r,name:a,startTime:l}=this.options;if(!r.owner||!r.owner.current)return!1;var u;if("string"==typeof s&&q()&&s in Ei&&(s=Ei[s]),X((u=this.options).type)||"spring"===u.type||!J(u.ease)){const{onComplete:e,onUpdate:r,motionValue:a,element:l,...u}=this.options,c=function(t,e){const n=new Pi({...e,keyframes:t,repeat:0,delay:0,isGenerator:!0});let i={done:!1,value:t[0]};const s=[];let o=0;for(;!i.done&&o<2e4;)i=n.sample(o),s.push(i.value),o+=10;return{times:void 0,keyframes:s,duration:o-10,ease:"linear"}}(t,u);1===(t=c.keyframes).length&&(t[1]=t[0]),n=c.duration,i=c.times,s=c.ease,o="keyframes"}const c=bi(r.owner.current,a,t,{...this.options,duration:n,times:i,ease:s});return c.startTime=null!=l?l:this.calcStartTime(),this.pendingTimeline?(Y(c,this.pendingTimeline),this.pendingTimeline=void 0):c.onfinish=()=>{const{onComplete:n}=this.options;r.set(bn(t,this.options,e)),n&&n(),this.cancel(),this.resolveFinishedPromise()},{animation:c,duration:n,times:i,type:o,ease:s,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:e}=t;return I(e)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:e}=t;return I(e.currentTime||0)}set time(t){const{resolved:e}=this;if(!e)return;const{animation:n}=e;n.currentTime=j(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:e}=t;return e.playbackRate}set speed(t){const{resolved:e}=this;if(!e)return;const{animation:n}=e;n.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:e}=t;return e.playState}get startTime(){const{resolved:t}=this;if(!t)return null;const{animation:e}=t;return e.startTime}attachTimeline(t){if(this._resolved){const{resolved:e}=this;if(!e)return R;const{animation:n}=e;Y(n,t)}else this.pendingTimeline=t;return R}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:e}=t;"finished"===e.playState&&this.updateFinishedPromise(),e.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:e}=t;e.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,"idle"===this.state)return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:t}=this;if(!t)return;const{animation:e,keyframes:n,duration:i,type:s,ease:o,times:r}=t;if("idle"===e.playState||"finished"===e.playState)return;if(this.time){const{motionValue:t,onUpdate:e,onComplete:a,element:l,...u}=this.options,c=new Pi({...u,keyframes:n,duration:i,type:s,ease:o,times:r,isGenerator:!0}),h=j(this.time);t.setWithVelocity(c.sample(h-10).value,c.sample(h).value,10)}const{onStop:a}=this.options;a&&a(),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:e,name:n,repeatDelay:i,repeatType:s,damping:o,type:r}=t;if(!(e&&e.owner&&e.owner.current instanceof HTMLElement))return!1;const{onUpdate:a,transformTemplate:l}=e.owner.getProps();return Ai()&&n&&Ti.has(n)&&("transform"!==n||!l)&&!a&&!i&&"mirror"!==s&&0!==o&&"inertia"!==r}}const Ci={type:"spring",stiffness:500,damping:25,restSpeed:10},Vi={type:"keyframes",duration:.8},Ri={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Di=(t,{keyframes:e})=>e.length>2?Vi:te.has(t)?t.startsWith("scale")?{type:"spring",stiffness:550,damping:0===e[1]?2*Math.sqrt(550):30,restSpeed:10}:Ci:Ri;const ki=(t,e,n,i={},s,o)=>r=>{const a=z(i,t)||{},l=a.delay||i.delay||0;let{elapsed:u=0}=i;u-=j(l);let c={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...a,delay:-u,onUpdate:t=>{e.set(t),a.onUpdate&&a.onUpdate(t)},onComplete:()=>{r(),a.onComplete&&a.onComplete()},name:t,motionValue:e,element:o?void 0:s};(function({when:t,delay:e,delayChildren:n,staggerChildren:i,staggerDirection:s,repeat:o,repeatType:r,repeatDelay:a,from:l,elapsed:u,...c}){return!!Object.keys(c).length})(a)||(c={...c,...Di(t,c)}),c.duration&&(c.duration=j(c.duration)),c.repeatDelay&&(c.repeatDelay=j(c.repeatDelay)),void 0!==c.from&&(c.keyframes[0]=c.from);let h=!1;if((!1===c.type||0===c.duration&&!c.repeatDelay)&&(c.duration=0,0===c.delay&&(h=!0)),(Wt.current||L.skipAnimations)&&(h=!0,c.duration=0,c.delay=0),c.allowFlatten=!a.type&&!a.ease,h&&!o&&void 0!==e.get()){const t=bn(c.keyframes,a);if(void 0!==t)return st.update(()=>{c.onUpdate(t),c.onComplete()}),new N([])}return!o&&Mi.supports(c)?new Mi(c):new Pi(c)};function Li(t,e,n){const i=Ut(t)?t:Vt(t);return i.start(ki("",i,e,n)),i.animation}const Bi=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Fi="data-"+Bi("framerAppearId");function Oi(t){return t.props[Fi]}function ji(t){return t instanceof SVGElement&&"svg"!==t.tagName}const Ii=(t,e)=>t.depth-e.depth;class Ui{constructor(){this.children=[],this.isDirty=!1}add(t){C(this.children,t),this.isDirty=!0}remove(t){V(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(Ii),this.isDirty=!1,this.children.forEach(t)}}function Wi(t,e){const n=dt.now(),i=({timestamp:s})=>{const o=s-n;o>=e&&(ot(i),t(o-e))};return st.read(i,!0),()=>ot(i)}const Ni=t=>Array.isArray(t);function zi(t){const e=Ut(t)?t.get():t;return n=e,Boolean(n&&"object"==typeof n&&n.mix&&n.toValue)?e.toValue():e;var n}const $i=["TopLeft","TopRight","BottomLeft","BottomRight"],Hi=$i.length,Xi=t=>"string"==typeof t?parseFloat(t):t,Yi=t=>"number"==typeof t||ye.test(t);function Ki(t,e){return void 0!==t[e]?t[e]:t.borderRadius}const Gi=qi(0,.5,qt),_i=qi(.5,.95,R);function qi(t,e,n){return i=>i<t?0:i>e?1:n(F(t,e,i))}function Zi(t,e){t.min=e.min,t.max=e.max}function Ji(t,e){Zi(t.x,e.x),Zi(t.y,e.y)}function Qi(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}function ts(t){return void 0===t||1===t}function es({scale:t,scaleX:e,scaleY:n}){return!ts(t)||!ts(e)||!ts(n)}function ns(t){return es(t)||is(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function is(t){return ss(t.x)||ss(t.y)}function ss(t){return t&&"0%"!==t}function os(t,e,n){return n+e*(t-n)}function rs(t,e,n,i,s){return void 0!==s&&(t=os(t,s,i)),os(t,n,i)+e}function as(t,e=0,n=1,i,s){t.min=rs(t.min,e,n,i,s),t.max=rs(t.max,e,n,i,s)}function ls(t,{x:e,y:n}){as(t.x,e.translate,e.scale,e.originPoint),as(t.y,n.translate,n.scale,n.originPoint)}function us(t,e){t.min=t.min+e,t.max=t.max+e}function cs(t,e,n,i,s=.5){as(t,e,n,Rt(t.min,t.max,s),i)}function hs(t,e){cs(t.x,e.x,e.scaleX,e.scale,e.originX),cs(t.y,e.y,e.scaleY,e.scale,e.originY)}function ds(t,e,n,i,s){return t=os(t-=e,1/n,i),void 0!==s&&(t=os(t,1/s,i)),t}function ps(t,e,[n,i,s],o,r){!function(t,e=0,n=1,i=.5,s,o=t,r=t){if(ge.test(e)){e=parseFloat(e);e=Rt(r.min,r.max,e/100)-r.min}if("number"!=typeof e)return;let a=Rt(o.min,o.max,i);t===o&&(a-=e),t.min=ds(t.min,e,n,a,s),t.max=ds(t.max,e,n,a,s)}(t,e[n],e[i],e[s],e.scale,o,r)}const ms=["x","scaleX","originX"],fs=["y","scaleY","originY"];function gs(t,e,n,i){ps(t.x,e,ms,n?n.x:void 0,i?i.x:void 0),ps(t.y,e,fs,n?n.y:void 0,i?i.y:void 0)}const ys=()=>({x:{min:0,max:0},y:{min:0,max:0}});function vs(t){return 0===t.translate&&1===t.scale}function xs(t){return vs(t.x)&&vs(t.y)}function ws(t,e){return t.min===e.min&&t.max===e.max}function Ps(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function Ss(t,e){return Ps(t.x,e.x)&&Ps(t.y,e.y)}function Ts(t){return Dt(t.x)/Dt(t.y)}function bs(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}class As{constructor(){this.members=[]}add(t){C(this.members,t),t.scheduleRender()}remove(t){if(V(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const t=this.members[this.members.length-1];t&&this.promote(t)}}relegate(t){const e=this.members.findIndex(e=>t===e);if(0===e)return!1;let n;for(let t=e;t>=0;t--){const e=this.members[t];if(!1!==e.isPresent){n=e;break}}return!!n&&(this.promote(n),!0)}promote(t,e){const n=this.lead;if(t!==n&&(this.prevLead=n,this.lead=t,t.show(),n)){n.instance&&n.scheduleRender(),t.scheduleRender(),t.resumeFrom=n,e&&(t.resumeFrom.preserveOpacity=!0),n.snapshot&&(t.snapshot=n.snapshot,t.snapshot.latestValues=n.animationValues||n.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:i}=t.options;!1===i&&n.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:e,resumingFrom:n}=t;e.onExitComplete&&e.onExitComplete(),n&&n.options.onExitComplete&&n.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}const Es={};function Ms(t){for(const e in t)Es[e]=t[e],hn(e)&&(Es[e].isCSSVariable=!0)}function Cs(t){return[t("x"),t("y")]}const Vs={hasAnimatedSinceResize:!0,hasEverUpdated:!1},Rs=["","X","Y","Z"],Ds={visibility:"hidden"};let ks=0;function Ls(t,e,n,i){const{latestValues:s}=e;s[t]&&(n[t]=s[t],e.setStaticValue(t,0),i&&(i[t]=0))}function Bs({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:i,resetTransform:s}){return class{constructor(t={},n=(null==e?void 0:e())){this.id=ks++,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(js),this.nodes.forEach(Hs),this.nodes.forEach(Xs),this.nodes.forEach(Is)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=t,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let t=0;t<this.path.length;t++)this.path[t].shouldResetTransform=!0;this.root===this&&(this.nodes=new Ui)}addEventListener(t,e){return this.eventHandlers.has(t)||this.eventHandlers.set(t,new O),this.eventHandlers.get(t).add(e)}notifyListeners(t,...e){const n=this.eventHandlers.get(t);n&&n.notify(...e)}hasListeners(t){return this.eventHandlers.has(t)}mount(e,n=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=ji(e),this.instance=e;const{layoutId:i,layout:s,visualElement:o}=this.options;if(o&&!o.current&&o.mount(e),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),n&&(s||i)&&(this.isLayoutDirty=!0),t){let n;const i=()=>this.root.updateBlockedByResize=!1;t(e,()=>{this.root.updateBlockedByResize=!0,n&&n(),n=Wi(i,250),Vs.hasAnimatedSinceResize&&(Vs.hasAnimatedSinceResize=!1,this.nodes.forEach($s))})}i&&this.root.registerSharedNode(i,this),!1!==this.options.animate&&o&&(i||s)&&this.addEventListener("didUpdate",({delta:t,hasLayoutChanged:e,hasRelativeLayoutChanged:n,layout:i})=>{if(this.isTreeAnimationBlocked())return this.target=void 0,void(this.relativeTarget=void 0);const s=this.options.transition||o.getDefaultTransition()||Zs,{onLayoutAnimationStart:r,onLayoutAnimationComplete:a}=o.getProps(),l=!this.targetLayout||!Ss(this.targetLayout,i),u=!e&&n;if(this.options.layoutRoot||this.resumeFrom||u||e&&(l||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(t,u);const e={...z(s,"layout"),onPlay:r,onComplete:a};(o.shouldReduceMotion||this.options.layoutRoot)&&(e.delay=0,e.type=!1),this.startAnimation(e)}else e||$s(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=i})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const t=this.getStack();t&&t.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,ot(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(Ys),this.animationId++)}getTransformTemplate(){const{visualElement:t}=this.options;return t&&t.getProps().transformTemplate}willUpdate(t=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked())return void(this.options.onExitComplete&&this.options.onExitComplete());if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&function t(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:n}=e.options;if(!n)return;const i=Oi(n);if(window.MotionHasOptimisedAnimation(i,"transform")){const{layout:t,layoutId:n}=e.options;window.MotionCancelOptimisedAnimation(i,"transform",st,!(t||n))}const{parent:s}=e;s&&!s.hasCheckedOptimisedAppear&&t(s)}(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let t=0;t<this.path.length;t++){const e=this.path[t];e.shouldResetTransform=!0,e.updateScroll("snapshot"),e.options.layoutRoot&&e.willUpdate(!1)}const{layoutId:e,layout:n}=this.options;if(void 0===e&&!n)return;const i=this.getTransformTemplate();this.prevTransformTemplateValue=i?i(this.latestValues,""):void 0,this.updateSnapshot(),t&&this.notifyListeners("willUpdate")}update(){this.updateScheduled=!1;if(this.isUpdateBlocked())return this.unblockUpdate(),this.clearAllSnapshots(),void this.nodes.forEach(Ws);this.isUpdating||this.nodes.forEach(Ns),this.isUpdating=!1,this.nodes.forEach(zs),this.nodes.forEach(Fs),this.nodes.forEach(Os),this.clearAllSnapshots();const t=dt.now();rt.delta=ne(0,1e3/60,t-rt.timestamp),rt.timestamp=t,rt.isProcessing=!0,at.update.process(rt),at.preRender.process(rt),at.render.process(rt),rt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,lt.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Us),this.sharedNodes.forEach(Ks)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,st.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){st.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure(),!this.snapshot||Dt(this.snapshot.measuredBox.x)||Dt(this.snapshot.measuredBox.y)||(this.snapshot=void 0))}updateLayout(){if(!this.instance)return;if(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead()||this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let t=0;t<this.path.length;t++){this.path[t].updateScroll()}const t=this.layout;this.layout=this.measure(!1),this.layoutCorrected={x:{min:0,max:0},y:{min:0,max:0}},this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:e}=this.options;e&&e.notify("LayoutMeasure",this.layout.layoutBox,t?t.layoutBox:void 0)}updateScroll(t="measure"){let e=Boolean(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===t&&(e=!1),e){const e=i(this.instance);this.scroll={animationId:this.root.animationId,phase:t,isRoot:e,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:e}}}resetTransform(){if(!s)return;const t=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,e=this.projectionDelta&&!xs(this.projectionDelta),n=this.getTransformTemplate(),i=n?n(this.latestValues,""):void 0,o=i!==this.prevTransformTemplateValue;t&&(e||ns(this.latestValues)||o)&&(s(this.instance,i),this.shouldResetTransform=!1,this.scheduleRender())}measure(t=!0){const e=this.measurePageBox();let n=this.removeElementScroll(e);var i;return t&&(n=this.removeTransform(n)),to((i=n).x),to(i.y),{animationId:this.root.animationId,measuredBox:e,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){var t;const{visualElement:e}=this.options;if(!e)return{x:{min:0,max:0},y:{min:0,max:0}};const n=e.measureViewportBox();if(!((null===(t=this.scroll)||void 0===t?void 0:t.wasRoot)||this.path.some(no))){const{scroll:t}=this.root;t&&(us(n.x,t.offset.x),us(n.y,t.offset.y))}return n}removeElementScroll(t){var e;const n={x:{min:0,max:0},y:{min:0,max:0}};if(Ji(n,t),null===(e=this.scroll)||void 0===e?void 0:e.wasRoot)return n;for(let e=0;e<this.path.length;e++){const i=this.path[e],{scroll:s,options:o}=i;i!==this.root&&s&&o.layoutScroll&&(s.wasRoot&&Ji(n,t),us(n.x,s.offset.x),us(n.y,s.offset.y))}return n}applyTransform(t,e=!1){const n={x:{min:0,max:0},y:{min:0,max:0}};Ji(n,t);for(let t=0;t<this.path.length;t++){const i=this.path[t];!e&&i.options.layoutScroll&&i.scroll&&i!==i.root&&hs(n,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),ns(i.latestValues)&&hs(n,i.latestValues)}return ns(this.latestValues)&&hs(n,this.latestValues),n}removeTransform(t){const e={x:{min:0,max:0},y:{min:0,max:0}};Ji(e,t);for(let t=0;t<this.path.length;t++){const n=this.path[t];if(!n.instance)continue;if(!ns(n.latestValues))continue;es(n.latestValues)&&n.updateSnapshot();const i={x:{min:0,max:0},y:{min:0,max:0}};Ji(i,n.measurePageBox()),gs(e,n.latestValues,n.snapshot?n.snapshot.layoutBox:void 0,i)}return ns(this.latestValues)&&gs(e,this.latestValues),e}setTargetDelta(t){this.targetDelta=t,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(t){this.options={...this.options,...t,crossfade:void 0===t.crossfade||t.crossfade}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==rt.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(t=!1){var e;const n=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=n.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=n.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=n.isSharedProjectionDirty);const i=Boolean(this.resumingFrom)||this!==n;if(!(t||i&&this.isSharedProjectionDirty||this.isProjectionDirty||(null===(e=this.parent)||void 0===e?void 0:e.isProjectionDirty)||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:s,layoutId:o}=this.options;if(this.layout&&(s||o)){if(this.resolvedRelativeTargetAt=rt.timestamp,!this.targetDelta&&!this.relativeTarget){const t=this.getClosestProjectingParent();t&&t.layout&&1!==this.animationProgress?(this.relativeParent=t,this.forceRelativeParentToResolveTarget(),this.relativeTarget={x:{min:0,max:0},y:{min:0,max:0}},this.relativeTargetOrigin={x:{min:0,max:0},y:{min:0,max:0}},Ot(this.relativeTargetOrigin,this.layout.layoutBox,t.layout.layoutBox),Ji(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}var r,a,l;if(this.relativeTarget||this.targetDelta)if(this.target||(this.target={x:{min:0,max:0},y:{min:0,max:0}},this.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}}),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),r=this.target,a=this.relativeTarget,l=this.relativeParent.target,Bt(r.x,a.x,l.x),Bt(r.y,a.y,l.y)):this.targetDelta?(Boolean(this.resumingFrom)?this.target=this.applyTransform(this.layout.layoutBox):Ji(this.target,this.layout.layoutBox),ls(this.target,this.targetDelta)):Ji(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const t=this.getClosestProjectingParent();t&&Boolean(t.resumingFrom)===Boolean(this.resumingFrom)&&!t.options.layoutScroll&&t.target&&1!==this.animationProgress?(this.relativeParent=t,this.forceRelativeParentToResolveTarget(),this.relativeTarget={x:{min:0,max:0},y:{min:0,max:0}},this.relativeTargetOrigin={x:{min:0,max:0},y:{min:0,max:0}},Ot(this.relativeTargetOrigin,this.target,t.target),Ji(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(this.parent&&!es(this.parent.latestValues)&&!is(this.parent.latestValues))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return Boolean((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var t;const e=this.getLead(),n=Boolean(this.resumingFrom)||this!==e;let i=!0;if((this.isProjectionDirty||(null===(t=this.parent)||void 0===t?void 0:t.isProjectionDirty))&&(i=!1),n&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(i=!1),this.resolvedRelativeTargetAt===rt.timestamp&&(i=!1),i)return;const{layout:s,layoutId:o}=this.options;if(this.isTreeAnimating=Boolean(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!s&&!o)return;Ji(this.layoutCorrected,this.layout.layoutBox);const r=this.treeScale.x,a=this.treeScale.y;!function(t,e,n,i=!1){const s=n.length;if(!s)return;let o,r;e.x=e.y=1;for(let a=0;a<s;a++){o=n[a],r=o.projectionDelta;const{visualElement:s}=o.options;s&&s.props.style&&"contents"===s.props.style.display||(i&&o.options.layoutScroll&&o.scroll&&o!==o.root&&hs(t,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),r&&(e.x*=r.x.scale,e.y*=r.y.scale,ls(t,r)),i&&ns(o.latestValues)&&hs(t,o.latestValues))}e.x<1.0000000000001&&e.x>.999999999999&&(e.x=1),e.y<1.0000000000001&&e.y>.999999999999&&(e.y=1)}(this.layoutCorrected,this.treeScale,this.path,n),!e.layout||e.target||1===this.treeScale.x&&1===this.treeScale.y||(e.target=e.layout.layoutBox,e.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}});const{target:l}=e;l?(this.projectionDelta&&this.prevProjectionDelta?(Qi(this.prevProjectionDelta.x,this.projectionDelta.x),Qi(this.prevProjectionDelta.y,this.projectionDelta.y)):this.createProjectionDeltas(),Lt(this.projectionDelta,this.layoutCorrected,l,this.latestValues),this.treeScale.x===r&&this.treeScale.y===a&&bs(this.projectionDelta.x,this.prevProjectionDelta.x)&&bs(this.projectionDelta.y,this.prevProjectionDelta.y)||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",l))):this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender())}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(t=!0){var e;if(null===(e=this.options.visualElement)||void 0===e||e.scheduleRender(),t){const t=this.getStack();t&&t.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDeltaWithTransform={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}}}setAnimationOrigin(t,e=!1){const n=this.snapshot,i=n?n.latestValues:{},s={...this.latestValues},o={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!e;const r={x:{min:0,max:0},y:{min:0,max:0}},a=(n?n.source:void 0)!==(this.layout?this.layout.source:void 0),l=this.getStack(),u=!l||l.members.length<=1,c=Boolean(a&&!u&&!0===this.options.crossfade&&!this.path.some(qs));let h;this.animationProgress=0,this.mixTargetDelta=e=>{const n=e/1e3;var l,d;Gs(o.x,t.x,n),Gs(o.y,t.y,n),this.setTargetDelta(o),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Ot(r,this.layout.layoutBox,this.relativeParent.layout.layoutBox),function(t,e,n,i){_s(t.x,e.x,n.x,i),_s(t.y,e.y,n.y,i)}(this.relativeTarget,this.relativeTargetOrigin,r,n),h&&(l=this.relativeTarget,d=h,ws(l.x,d.x)&&ws(l.y,d.y))&&(this.isProjectionDirty=!1),h||(h={x:{min:0,max:0},y:{min:0,max:0}}),Ji(h,this.relativeTarget)),a&&(this.animationValues=s,function(t,e,n,i,s,o){s?(t.opacity=Rt(0,void 0!==n.opacity?n.opacity:1,Gi(i)),t.opacityExit=Rt(void 0!==e.opacity?e.opacity:1,0,_i(i))):o&&(t.opacity=Rt(void 0!==e.opacity?e.opacity:1,void 0!==n.opacity?n.opacity:1,i));for(let s=0;s<Hi;s++){const o=`border${$i[s]}Radius`;let r=Ki(e,o),a=Ki(n,o);if(void 0===r&&void 0===a)continue;r||(r=0),a||(a=0);0===r||0===a||Yi(r)===Yi(a)?(t[o]=Math.max(Rt(Xi(r),Xi(a),i),0),(ge.test(a)||ge.test(r))&&(t[o]+="%")):t[o]=a}(e.rotate||n.rotate)&&(t.rotate=Rt(e.rotate||0,n.rotate||0,i))}(s,i,this.latestValues,n,c,u)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(t){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(ot(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=st.update(()=>{Vs.hasAnimatedSinceResize=!0,this.currentAnimation=Li(0,1e3,{...t,onUpdate:e=>{this.mixTargetDelta(e),t.onUpdate&&t.onUpdate(e)},onStop:()=>{},onComplete:()=>{t.onComplete&&t.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 t=this.getStack();t&&t.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const t=this.getLead();let{targetWithTransforms:e,target:n,layout:i,latestValues:s}=t;if(e&&n&&i){if(this!==t&&this.layout&&i&&eo(this.options.animationType,this.layout.layoutBox,i.layoutBox)){n=this.target||{x:{min:0,max:0},y:{min:0,max:0}};const e=Dt(this.layout.layoutBox.x);n.x.min=t.target.x.min,n.x.max=n.x.min+e;const i=Dt(this.layout.layoutBox.y);n.y.min=t.target.y.min,n.y.max=n.y.min+i}Ji(e,n),hs(e,s),Lt(this.projectionDeltaWithTransform,this.layoutCorrected,e,s)}}registerSharedNode(t,e){this.sharedNodes.has(t)||this.sharedNodes.set(t,new As);this.sharedNodes.get(t).add(e);const n=e.options.initialPromotionConfig;e.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(e):void 0})}isLead(){const t=this.getStack();return!t||t.lead===this}getLead(){var t;const{layoutId:e}=this.options;return e&&(null===(t=this.getStack())||void 0===t?void 0:t.lead)||this}getPrevLead(){var t;const{layoutId:e}=this.options;return e?null===(t=this.getStack())||void 0===t?void 0:t.prevLead:void 0}getStack(){const{layoutId:t}=this.options;if(t)return this.root.sharedNodes.get(t)}promote({needsReset:t,transition:e,preserveFollowOpacity:n}={}){const i=this.getStack();i&&i.promote(this,n),t&&(this.projectionDelta=void 0,this.needsReset=!0),e&&this.setOptions({transition:e})}relegate(){const t=this.getStack();return!!t&&t.relegate(this)}resetSkewAndRotation(){const{visualElement:t}=this.options;if(!t)return;let e=!1;const{latestValues:n}=t;if((n.z||n.rotate||n.rotateX||n.rotateY||n.rotateZ||n.skewX||n.skewY)&&(e=!0),!e)return;const i={};n.z&&Ls("z",t,i,this.animationValues);for(let e=0;e<Rs.length;e++)Ls("rotate"+Rs[e],t,i,this.animationValues),Ls("skew"+Rs[e],t,i,this.animationValues);t.render();for(const e in i)t.setStaticValue(e,i[e]),this.animationValues&&(this.animationValues[e]=i[e]);t.scheduleRender()}getProjectionStyles(t){var e,n;if(!this.instance||this.isSVG)return;if(!this.isVisible)return Ds;const i={visibility:""},s=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,i.opacity="",i.pointerEvents=zi(null==t?void 0:t.pointerEvents)||"",i.transform=s?s(this.latestValues,""):"none",i;const o=this.getLead();if(!this.projectionDelta||!this.layout||!o.target){const e={};return this.options.layoutId&&(e.opacity=void 0!==this.latestValues.opacity?this.latestValues.opacity:1,e.pointerEvents=zi(null==t?void 0:t.pointerEvents)||""),this.hasProjected&&!ns(this.latestValues)&&(e.transform=s?s({},""):"none",this.hasProjected=!1),e}const r=o.animationValues||o.latestValues;this.applyTransformsToTarget(),i.transform=function(t,e,n){let i="";const s=t.x.translate/e.x,o=t.y.translate/e.y,r=(null==n?void 0:n.z)||0;if((s||o||r)&&(i=`translate3d(${s}px, ${o}px, ${r}px) `),1===e.x&&1===e.y||(i+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:t,rotate:e,rotateX:s,rotateY:o,skewX:r,skewY:a}=n;t&&(i=`perspective(${t}px) ${i}`),e&&(i+=`rotate(${e}deg) `),s&&(i+=`rotateX(${s}deg) `),o&&(i+=`rotateY(${o}deg) `),r&&(i+=`skewX(${r}deg) `),a&&(i+=`skewY(${a}deg) `)}const a=t.x.scale*e.x,l=t.y.scale*e.y;return 1===a&&1===l||(i+=`scale(${a}, ${l})`),i||"none"}(this.projectionDeltaWithTransform,this.treeScale,r),s&&(i.transform=s(r,i.transform));const{x:a,y:l}=this.projectionDelta;i.transformOrigin=`${100*a.origin}% ${100*l.origin}% 0`,o.animationValues?i.opacity=o===this?null!==(n=null!==(e=r.opacity)&&void 0!==e?e:this.latestValues.opacity)&&void 0!==n?n:1:this.preserveOpacity?this.latestValues.opacity:r.opacityExit:i.opacity=o===this?void 0!==r.opacity?r.opacity:"":void 0!==r.opacityExit?r.opacityExit:0;for(const t in Es){if(void 0===r[t])continue;const{correct:e,applyTo:n,isCSSVariable:s}=Es[t],a="none"===i.transform?r[t]:e(r[t],o);if(n){const t=n.length;for(let e=0;e<t;e++)i[n[e]]=a}else s?this.options.visualElement.renderState.vars[t]=a:i[t]=a}return this.options.layoutId&&(i.pointerEvents=o===this?zi(null==t?void 0:t.pointerEvents)||"":"none"),i}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(t=>{var e;return null===(e=t.currentAnimation)||void 0===e?void 0:e.stop()}),this.root.nodes.forEach(Ws),this.root.sharedNodes.clear()}}}function Fs(t){t.updateLayout()}function Os(t){var e;const n=(null===(e=t.resumeFrom)||void 0===e?void 0:e.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&n&&t.hasListeners("didUpdate")){const{layoutBox:e,measuredBox:i}=t.layout,{animationType:s}=t.options,o=n.source!==t.layout.source;"size"===s?Cs(t=>{const i=o?n.measuredBox[t]:n.layoutBox[t],s=Dt(i);i.min=e[t].min,i.max=i.min+s}):eo(s,n.layoutBox,e)&&Cs(i=>{const s=o?n.measuredBox[i]:n.layoutBox[i],r=Dt(e[i]);s.max=s.min+r,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[i].max=t.relativeTarget[i].min+r)});const r={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};Lt(r,e,n.layoutBox);const a={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};o?Lt(a,t.applyTransform(i,!0),n.measuredBox):Lt(a,e,n.layoutBox);const l=!xs(r);let u=!1;if(!t.resumeFrom){const i=t.getClosestProjectingParent();if(i&&!i.resumeFrom){const{snapshot:s,layout:o}=i;if(s&&o){const r={x:{min:0,max:0},y:{min:0,max:0}};Ot(r,n.layoutBox,s.layoutBox);const a={x:{min:0,max:0},y:{min:0,max:0}};Ot(a,e,o.layoutBox),Ss(r,a)||(u=!0),i.options.layoutRoot&&(t.relativeTarget=a,t.relativeTargetOrigin=r,t.relativeParent=i)}}}t.notifyListeners("didUpdate",{layout:e,snapshot:n,delta:a,layoutDelta:r,hasLayoutChanged:l,hasRelativeLayoutChanged:u})}else if(t.isLead()){const{onExitComplete:e}=t.options;e&&e()}t.options.transition=void 0}function js(t){t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=Boolean(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function Is(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function Us(t){t.clearSnapshot()}function Ws(t){t.clearMeasurements()}function Ns(t){t.isLayoutDirty=!1}function zs(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function $s(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function Hs(t){t.resolveTargetDelta()}function Xs(t){t.calcProjection()}function Ys(t){t.resetSkewAndRotation()}function Ks(t){t.removeLeadSnapshot()}function Gs(t,e,n){t.translate=Rt(e.translate,0,n),t.scale=Rt(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function _s(t,e,n,i){t.min=Rt(e.min,n.min,i),t.max=Rt(e.max,n.max,i)}function qs(t){return t.animationValues&&void 0!==t.animationValues.opacityExit}const Zs={duration:.45,ease:[.4,0,.1,1]},Js=t=>"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),Qs=Js("applewebkit/")&&!Js("chrome/")?Math.round:R;function to(t){t.min=Qs(t.min),t.max=Qs(t.max)}function eo(t,e,n){return"position"===t||"preserve-aspect"===t&&(i=Ts(e),s=Ts(n),o=.2,!(Math.abs(i-s)<=o));var i,s,o}function no(t){var e;return t!==t.root&&(null===(e=t.scroll)||void 0===e?void 0:e.wasRoot)}function io(t,e,n,i={passive:!0}){return t.addEventListener(e,n,i),()=>t.removeEventListener(e,n)}const so=Bs({attachResizeListener:(t,e)=>io(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),oo={current:void 0},ro=Bs({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!oo.current){const t=new so({});t.mount(window),t.setOptions({layoutScroll:!0}),oo.current=t}return oo.current},resetTransform:(t,e)=>{t.style.transform=void 0!==e?e:"none"},checkIsScrollRoot:t=>Boolean("fixed"===window.getComputedStyle(t).position)});function ao(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const lo={correct:(t,e)=>{if(!e.target)return t;if("string"==typeof t){if(!ye.test(t))return t;t=parseFloat(t)}return`${ao(t,e.target.x)}% ${ao(t,e.target.y)}%`}},uo={correct:(t,{treeScale:e,projectionDelta:n})=>{const i=t,s=Ve.parse(t);if(s.length>5)return i;const o=Ve.createTransformer(t),r="number"!=typeof s[0]?1:0,a=n.x.scale*e.x,l=n.y.scale*e.y;s[0+r]/=a,s[1+r]/=l;const u=Rt(a,l,.5);return"number"==typeof s[2+r]&&(s[2+r]/=u),"number"==typeof s[3+r]&&(s[3+r]/=u),o(s)}};function co({top:t,left:e,right:n,bottom:i}){return{x:{min:e,max:n},y:{min:t,max:i}}}function ho(t,e){return co(function(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),i=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:i.y,right:i.x}}(t.getBoundingClientRect(),e))}const po={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"]},mo={};for(const t in po)mo[t]={isEnabled:e=>po[t].some(t=>!!e[t])};const fo={current:null},go={current:!1};function yo(){if(go.current=!0,g)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>fo.current=t.matches;t.addListener(e),e()}else fo.current=!1}const vo=[...vn,Se,Ve],xo=new WeakMap;function wo(t){return null!==t&&"object"==typeof t&&"function"==typeof t.start}function Po(t){return"string"==typeof t||Array.isArray(t)}const So=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],To=["initial",...So];function bo(t){return wo(t.animate)||To.some(e=>Po(t[e]))}function Ao(t){return Boolean(bo(t)||t.variants)}function Eo(t){const e=[{},{}];return null==t||t.values.forEach((t,n)=>{e[0][n]=t.get(),e[1][n]=t.getVelocity()}),e}function Mo(t,e,n,i){if("function"==typeof e){const[s,o]=Eo(i);e=e(void 0!==n?n:t.custom,s,o)}if("string"==typeof e&&(e=t.variants&&t.variants[e]),"function"==typeof e){const[s,o]=Eo(i);e=e(void 0!==n?n:t.custom,s,o)}return e}const Co=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Vo{scrapeMotionValuesFromProps(t,e,n){return{}}constructor({parent:t,props:e,presenceContext:n,reducedMotionConfig:i,blockInitialAnimation:s,visualState:o},r={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=ln,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 t=dt.now();this.renderScheduledAt<t&&(this.renderScheduledAt=t,st.render(this.render,!1,!0))};const{latestValues:a,renderState:l,onUpdate:u}=o;this.onUpdate=u,this.latestValues=a,this.baseTarget={...a},this.initialValues=e.initial?{...a}:{},this.renderState=l,this.parent=t,this.props=e,this.presenceContext=n,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.options=r,this.blockInitialAnimation=Boolean(s),this.isControllingVariants=bo(e),this.isVariantNode=Ao(e),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(t&&t.current);const{willChange:c,...h}=this.scrapeMotionValuesFromProps(e,{},this);for(const t in h){const e=h[t];void 0!==a[t]&&Ut(e)&&e.set(a[t],!1)}}mount(t){this.current=t,xo.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((t,e)=>this.bindToMotionValue(e,t)),go.current||yo(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||fo.current),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),ot(this.notifyUpdate),ot(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 e=this.features[t];e&&(e.unmount(),e.isMounted=!1)}this.current=null}bindToMotionValue(t,e){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const n=te.has(t);n&&this.onBindTransform&&this.onBindTransform();const i=e.on("change",e=>{this.latestValues[t]=e,this.props.onUpdate&&st.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0)}),s=e.on("renderRequest",this.scheduleRender);let o;window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,t,e)),this.valueSubscriptions.set(t,()=>{i(),s(),o&&o(),e.owner&&e.stop()})}sortNodePosition(t){return this.current&&this.sortInstanceNodePosition&&this.type===t.type?this.sortInstanceNodePosition(this.current,t.current):0}updateFeatures(){let t="animation";for(t in mo){const e=mo[t];if(!e)continue;const{isEnabled:n,Feature:i}=e;if(!this.features[t]&&i&&n(this.props)&&(this.features[t]=new i(this)),this.features[t]){const e=this.features[t];e.isMounted?e.update():(e.mount(),e.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):{x:{min:0,max:0},y:{min:0,max:0}}}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,e){this.latestValues[t]=e}update(t,e){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=e;for(let e=0;e<Co.length;e++){const n=Co[e];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);const i=t["on"+n];i&&(this.propEventSubscriptions[n]=this.on(n,i))}this.prevMotionValues=function(t,e,n){for(const i in e){const s=e[i],o=n[i];if(Ut(s))t.addValue(i,s);else if(Ut(o))t.addValue(i,Vt(s,{owner:t}));else if(o!==s)if(t.hasValue(i)){const e=t.getValue(i);!0===e.liveStyle?e.jump(s):e.hasAnimated||e.set(s)}else{const e=t.getStaticValue(i);t.addValue(i,Vt(void 0!==e?e:s,{owner:t}))}}for(const i in n)void 0===e[i]&&t.removeValue(i);return e}(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 e=this.getClosestVariantNode();if(e)return e.variantChildren&&e.variantChildren.add(t),()=>e.variantChildren.delete(t)}addValue(t,e){const n=this.values.get(t);e!==n&&(n&&this.removeValue(t),this.bindToMotionValue(t,e),this.values.set(t,e),this.latestValues[t]=e.get())}removeValue(t){this.values.delete(t);const e=this.valueSubscriptions.get(t);e&&(e(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,e){if(this.props.values&&this.props.values[t])return this.props.values[t];let n=this.values.get(t);return void 0===n&&void 0!==e&&(n=Vt(null===e?void 0:e,{owner:this}),this.addValue(t,n)),n}readValue(t,e){var n;let i=void 0===this.latestValues[t]&&this.current?null!==(n=this.getBaseTargetFromProps(this.props,t))&&void 0!==n?n:this.readValueFromInstance(this.current,t,this.options):this.latestValues[t];var s;return null!=i&&("string"==typeof i&&(un(i)||Jt(i))?i=parseFloat(i):(s=i,!vo.find(yn(s))&&Ve.test(e)&&(i=We(t,e))),this.setBaseTarget(t,Ut(i)?i.get():i)),Ut(i)?i.get():i}setBaseTarget(t,e){this.baseTarget[t]=e}getBaseTarget(t){var e;const{initial:n}=this.props;let i;if("string"==typeof n||"object"==typeof n){const s=Mo(this.props,n,null===(e=this.presenceContext)||void 0===e?void 0:e.custom);s&&(i=s[t])}if(n&&void 0!==i)return i;const s=this.getBaseTargetFromProps(this.props,t);return void 0===s||Ut(s)?void 0!==this.initialValues[t]&&void 0===i?void 0:this.baseTarget[t]:s}on(t,e){return this.events[t]||(this.events[t]=new O),this.events[t].add(e)}notify(t,...e){this.events[t]&&this.events[t].notify(...e)}}class Ro extends Vo{constructor(){super(...arguments),this.KeyframeResolver=wn}sortInstanceNodePosition(t,e){return 2&t.compareDocumentPosition(e)?1:-1}getBaseTargetFromProps(t,e){return t.style?t.style[e]:void 0}removeValueFromRenderState(t,{vars:e,style:n}){delete e[t],delete n[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;Ut(t)&&(this.childSubscription=t.on("change",t=>{this.current&&(this.current.textContent=""+t)}))}}const Do=(t,e)=>e&&"number"==typeof t?e.transform(t):t,ko={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Lo=Qt.length;function Bo(t,e,n){let i="",s=!0;for(let o=0;o<Lo;o++){const r=Qt[o],a=t[r];if(void 0===a)continue;let l=!0;if(l="number"==typeof a?a===(r.startsWith("scale")?1:0):0===parseFloat(a),!l||n){const t=Do(a,je[r]);if(!l){s=!1;i+=`${ko[r]||r}(${t}) `}n&&(e[r]=t)}}return i=i.trim(),n?i=n(e,s?"":i):s&&(i="none"),i}function Fo(t,e,n){const{style:i,vars:s,transformOrigin:o}=t;let r=!1,a=!1;for(const t in e){const n=e[t];if(te.has(t))r=!0;else if(hn(t))s[t]=n;else{const e=Do(n,je[t]);t.startsWith("origin")?(a=!0,o[t]=e):i[t]=e}}if(e.transform||(r||n?i.transform=Bo(e,t.transform,n):i.transform&&(i.transform="none")),a){const{originX:t="50%",originY:e="50%",originZ:n=0}=o;i.transformOrigin=`${t} ${e} ${n}`}}function Oo(t,{style:e,vars:n},i,s){Object.assign(t.style,e,s&&s.getProjectionStyles(i));for(const e in n)t.style.setProperty(e,n[e])}function jo(t,{layout:e,layoutId:n}){return te.has(t)||t.startsWith("origin")||(e||void 0!==n)&&(!!Es[t]||"opacity"===t)}function Io(t,e,n){var i;const{style:s}=t,o={};for(const r in s)(Ut(s[r])||e.style&&Ut(e.style[r])||jo(r,t)||void 0!==(null===(i=null==n?void 0:n.getValue(r))||void 0===i?void 0:i.liveStyle))&&(o[r]=s[r]);return o}class Uo extends Ro{constructor(){super(...arguments),this.type="html",this.renderInstance=Oo}readValueFromInstance(t,e){if(te.has(e))return((t,e)=>{const{transform:n="none"}=getComputedStyle(t);return qe(n,e)})(t,e);{const i=(n=t,window.getComputedStyle(n)),s=(hn(e)?i.getPropertyValue(e):i[e])||0;return"string"==typeof s?s.trim():s}var n}measureInstanceViewportBox(t,{transformPagePoint:e}){return ho(t,e)}build(t,e,n){Fo(t,e,n.transformTemplate)}scrapeMotionValuesFromProps(t,e,n){return Io(t,e,n)}}function Wo(){const t=function(){const t=e.useRef(!1);return y(()=>(t.current=!0,()=>{t.current=!1}),[]),t}(),[n,i]=e.useState(0),s=e.useCallback(()=>{t.current&&i(n+1)},[n]);return[e.useCallback(()=>st.postRender(s),[s]),n]}const No=t=>!0===t,zo=({children:t,id:n,inherit:i=!0})=>{const s=e.useContext(m),o=e.useContext(M),[r,a]=Wo(),l=e.useRef(null),u=s.id||o;null===l.current&&((t=>No(!0===t)||"id"===t)(i)&&u&&(n=n?u+"-"+n:u),l.current={id:n,group:No(i)&&s.group||It()});const c=e.useMemo(()=>({...l.current,forceRender:r}),[a]);return d(m.Provider,{value:c,children:t})},$o=e.createContext({strict:!1});function Ho(t){for(const e in t)mo[e]={...mo[e],...t[e]}}function Xo(t){return"function"==typeof t}const Yo=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 Ko(t){return t.startsWith("while")||t.startsWith("drag")&&"draggable"!==t||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||Yo.has(t)}let Go=t=>!Ko(t);function _o(t){t&&(Go=e=>e.startsWith("on")?!Ko(e):t(e))}try{_o(require("@emotion/is-prop-valid").default)}catch(t){}function qo(t,e,n){const i={};for(const s in t)"values"===s&&"object"==typeof t.values||(Go(s)||!0===n&&Ko(s)||!e&&!Ko(s)||t.draggable&&s.startsWith("onDrag"))&&(i[s]=t[s]);return i}const Zo=e.createContext(null);function Jo(t){if("undefined"==typeof Proxy)return t;const e=new Map;return new Proxy((...e)=>t(...e),{get:(n,i)=>"create"===i?t:(e.has(i)||e.set(i,t(i)),e.get(i))})}function Qo(t,e,n){const i=t.getProps();return Mo(i,e,void 0!==n?n:i.custom,t)}function tr(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,Vt(n))}function er(t,e){const n=Qo(t,e);let{transitionEnd:i={},transition:s={},...o}=n||{};o={...o,...i};for(const e in o){tr(t,e,(r=o[e],Ni(r)?r[r.length-1]||0:r))}var r}function nr(t,e){const n=t.getValue("willChange");if(i=n,Boolean(Ut(i)&&i.add))return n.add(e);var i}function ir({protectedKeys:t,needsAnimating:e},n){const i=t.hasOwnProperty(n)&&!0!==e[n];return e[n]=!1,i}function sr(t,e,{delay:n=0,transitionOverride:i,type:s}={}){var o;let{transition:r=t.getDefaultTransition(),transitionEnd:a,...l}=e;i&&(r=i);const u=[],c=s&&t.animationState&&t.animationState.getState()[s];for(const e in l){const i=t.getValue(e,null!==(o=t.latestValues[e])&&void 0!==o?o:null),s=l[e];if(void 0===s||c&&ir(c,e))continue;const a={delay:n,...z(r||{},e)};let h=!1;if(window.MotionHandoffAnimation){const n=Oi(t);if(n){const t=window.MotionHandoffAnimation(n,e,st);null!==t&&(a.startTime=t,h=!0)}}nr(t,e),i.start(ki(e,i,s,t.shouldReduceMotion&&ee.has(e)?{type:!1}:a,t,h));const d=i.animation;d&&u.push(d)}return a&&Promise.all(u).then(()=>{st.update(()=>{a&&er(t,a)})}),u}function or(t,e,n={}){var i;const s=Qo(t,e,"exit"===n.type?null===(i=t.presenceContext)||void 0===i?void 0:i.custom:void 0);let{transition:o=t.getDefaultTransition()||{}}=s||{};n.transitionOverride&&(o=n.transitionOverride);const r=s?()=>Promise.all(sr(t,s,n)):()=>Promise.resolve(),a=t.variantChildren&&t.variantChildren.size?(i=0)=>{const{delayChildren:s=0,staggerChildren:r,staggerDirection:a}=o;return function(t,e,n=0,i=0,s=1,o){const r=[],a=(t.variantChildren.size-1)*i,l=1===s?(t=0)=>t*i:(t=0)=>a-t*i;return Array.from(t.variantChildren).sort(rr).forEach((t,i)=>{t.notify("AnimationStart",e),r.push(or(t,e,{...o,delay:n+l(i)}).then(()=>t.notify("AnimationComplete",e)))}),Promise.all(r)}(t,e,s+i,r,a,n)}:()=>Promise.resolve(),{when:l}=o;if(l){const[t,e]="beforeChildren"===l?[r,a]:[a,r];return t().then(()=>e())}return Promise.all([r(),a(n.delay)])}function rr(t,e){return t.sortNodePosition(e)}function ar(t,e,n={}){let i;if(t.notify("AnimationStart",e),Array.isArray(e)){const s=e.map(e=>or(t,e,n));i=Promise.all(s)}else if("string"==typeof e)i=or(t,e,n);else{const s="function"==typeof e?Qo(t,e,n.custom):e;i=Promise.all(sr(t,s,n))}return i.then(()=>{t.notify("AnimationComplete",e)})}function lr(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let i=0;i<n;i++)if(e[i]!==t[i])return!1;return!0}const ur=To.length;const cr=[...So].reverse(),hr=So.length;function dr(t){let e=function(t){return e=>Promise.all(e.map(({animation:e,options:n})=>ar(t,e,n)))}(t),n=fr(),i=!0;const s=e=>(n,i)=>{var s;const o=Qo(t,i,"exit"===e?null===(s=t.presenceContext)||void 0===s?void 0:s.custom:void 0);if(o){const{transition:t,transitionEnd:e,...i}=o;n={...n,...i,...e}}return n};function o(o){const{props:r}=t,a=function t(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent&&t(e.parent)||{};return void 0!==e.props.initial&&(n.initial=e.props.initial),n}const n={};for(let t=0;t<ur;t++){const i=To[t],s=e.props[i];(Po(s)||!1===s)&&(n[i]=s)}return n}(t.parent)||{},l=[],u=new Set;let c={},h=1/0;for(let e=0;e<hr;e++){const d=cr[e],p=n[d],m=void 0!==r[d]?r[d]:a[d],f=Po(m),g=d===o?p.isActive:null;!1===g&&(h=e);let y=m===a[d]&&m!==r[d]&&f;if(y&&i&&t.manuallyAnimateOnMount&&(y=!1),p.protectedKeys={...c},!p.isActive&&null===g||!m&&!p.prevProp||wo(m)||"boolean"==typeof m)continue;const v=pr(p.prevProp,m);let x=v||d===o&&p.isActive&&!y&&f||e>h&&f,w=!1;const P=Array.isArray(m)?m:[m];let S=P.reduce(s(d),{});!1===g&&(S={});const{prevResolvedValues:T={}}=p,b={...T,...S},A=e=>{x=!0,u.has(e)&&(w=!0,u.delete(e)),p.needsAnimating[e]=!0;const n=t.getValue(e);n&&(n.liveStyle=!1)};for(const t in b){const e=S[t],n=T[t];if(c.hasOwnProperty(t))continue;let i=!1;i=Ni(e)&&Ni(n)?!lr(e,n):e!==n,i?null!=e?A(t):u.add(t):void 0!==e&&u.has(t)?A(t):p.protectedKeys[t]=!0}p.prevProp=m,p.prevResolvedValues=S,p.isActive&&(c={...c,...S}),i&&t.blockInitialAnimation&&(x=!1);const E=!(y&&v)||w;x&&E&&l.push(...P.map(t=>({animation:t,options:{type:d}})))}if(u.size){const e={};if("boolean"!=typeof r.initial){const n=Qo(t,Array.isArray(r.initial)?r.initial[0]:r.initial);n&&n.transition&&(e.transition=n.transition)}u.forEach(n=>{const i=t.getBaseTarget(n),s=t.getValue(n);s&&(s.liveStyle=!0),e[n]=null!=i?i:null}),l.push({animation:e})}let d=Boolean(l.length);return!i||!1!==r.initial&&r.initial!==r.animate||t.manuallyAnimateOnMount||(d=!1),i=!1,d?e(l):Promise.resolve()}return{animateChanges:o,setActive:function(e,i){var s;if(n[e].isActive===i)return Promise.resolve();null===(s=t.variantChildren)||void 0===s||s.forEach(t=>{var n;return null===(n=t.animationState)||void 0===n?void 0:n.setActive(e,i)}),n[e].isActive=i;const r=o(e);for(const t in n)n[t].protectedKeys={};return r},setAnimateFunction:function(n){e=n(t)},getState:()=>n,reset:()=>{n=fr(),i=!0}}}function pr(t,e){return"string"==typeof e?e!==t:!!Array.isArray(e)&&!lr(e,t)}function mr(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function fr(){return{animate:mr(!0),whileInView:mr(),whileHover:mr(),whileTap:mr(),whileDrag:mr(),whileFocus:mr(),exit:mr()}}class gr{constructor(t){this.isMounted=!1,this.node=t}update(){}}let yr=0;const vr={animation:{Feature:class extends gr{constructor(t){super(t),t.animationState||(t.animationState=dr(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();wo(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:e}=this.node.prevProps||{};t!==e&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),null===(t=this.unmountControls)||void 0===t||t.call(this)}}},exit:{Feature:class extends gr{constructor(){super(...arguments),this.id=yr++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:e}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===n)return;const i=this.node.animationState.setActive("exit",!t);e&&!t&&i.then(()=>{e(this.id)})}mount(){const{register:t,onExitComplete:e}=this.node.presenceContext||{};e&&e(this.id),t&&(this.unmount=t(this.id))}unmount(){}}}};function xr(t){return{point:{x:t.pageX,y:t.pageY}}}const wr=t=>e=>wt(e)&&t(e,xr(e));function Pr(t,e,n,i){return io(t,e,wr(n),i)}const Sr=({current:t})=>t?t.ownerDocument.defaultView:null;function Tr(t){return t&&"object"==typeof t&&Object.prototype.hasOwnProperty.call(t,"current")}const br=(t,e)=>Math.abs(t-e);function Ar(t,e){const n=br(t.x,e.x),i=br(t.y,e.y);return Math.sqrt(n**2+i**2)}class Er{constructor(t,e,{transformPagePoint:n,contextWindow:i,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 t=Vr(this.lastMoveEventInfo,this.history),e=null!==this.startEvent,n=Ar(t.offset,{x:0,y:0})>=3;if(!e&&!n)return;const{point:i}=t,{timestamp:s}=rt;this.history.push({...i,timestamp:s});const{onStart:o,onMove:r}=this.handlers;e||(o&&o(this.lastMoveEvent,t),this.startEvent=this.lastMoveEvent),r&&r(this.lastMoveEvent,t)},this.handlePointerMove=(t,e)=>{this.lastMoveEvent=t,this.lastMoveEventInfo=Mr(e,this.transformPagePoint),st.update(this.updatePoint,!0)},this.handlePointerUp=(t,e)=>{this.end();const{onEnd:n,onSessionEnd:i,resumeAnimation:s}=this.handlers;if(this.dragSnapToOrigin&&s&&s(),!this.lastMoveEvent||!this.lastMoveEventInfo)return;const o=Vr("pointercancel"===t.type?this.lastMoveEventInfo:Mr(e,this.transformPagePoint),this.history);this.startEvent&&n&&n(t,o),i&&i(t,o)},!wt(t))return;this.dragSnapToOrigin=s,this.handlers=e,this.transformPagePoint=n,this.contextWindow=i||window;const o=Mr(xr(t),this.transformPagePoint),{point:r}=o,{timestamp:a}=rt;this.history=[{...r,timestamp:a}];const{onSessionStart:l}=e;l&&l(t,Vr(o,this.history)),this.removeListeners=Ln(Pr(this.contextWindow,"pointermove",this.handlePointerMove),Pr(this.contextWindow,"pointerup",this.handlePointerUp),Pr(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),ot(this.updatePoint)}}function Mr(t,e){return e?{point:e(t.point)}:t}function Cr(t,e){return{x:t.x-e.x,y:t.y-e.y}}function Vr({point:t},e){return{point:t,delta:Cr(t,Dr(e)),offset:Cr(t,Rr(e)),velocity:kr(e,.1)}}function Rr(t){return t[0]}function Dr(t){return t[t.length-1]}function kr(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,i=null;const s=Dr(t);for(;n>=0&&(i=t[n],!(s.timestamp-i.timestamp>j(e)));)n--;if(!i)return{x:0,y:0};const o=I(s.timestamp-i.timestamp);if(0===o)return{x:0,y:0};const r={x:(s.x-i.x)/o,y:(s.y-i.y)/o};return r.x===1/0&&(r.x=0),r.y===1/0&&(r.y=0),r}function Lr(t,e,n){return{min:void 0!==e?t.min+e:void 0,max:void 0!==n?t.max+n-(t.max-t.min):void 0}}function Br(t,e){let n=e.min-t.min,i=e.max-t.max;return e.max-e.min<t.max-t.min&&([n,i]=[i,n]),{min:n,max:i}}const Fr=.35;function Or(t,e,n){return{min:jr(t,e),max:jr(t,n)}}function jr(t,e){return"number"==typeof t?t:t[e]||0}const Ir=new WeakMap;class Ur{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={x:{min:0,max:0},y:{min:0,max:0}},this.visualElement=t}start(t,{snapToCursor:e=!1}={}){const{presenceContext:n}=this.visualElement;if(n&&!1===n.isPresent)return;const{dragSnapToOrigin:i}=this.getProps();this.panSession=new Er(t,{onSessionStart:t=>{const{dragSnapToOrigin:n}=this.getProps();n?this.pauseAnimation():this.stopAnimation(),e&&this.snapToCursor(xr(t).point)},onStart:(t,e)=>{const{drag:n,dragPropagation:i,onDragStart:s}=this.getProps();if(n&&!i&&(this.openDragLock&&this.openDragLock(),this.openDragLock="x"===(o=n)||"y"===o?pt[o]?null:(pt[o]=!0,()=>{pt[o]=!1}):pt.x||pt.y?null:(pt.x=pt.y=!0,()=>{pt.x=pt.y=!1}),!this.openDragLock))return;var o;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Cs(t=>{let e=this.getAxisMotionValue(t).get()||0;if(ge.test(e)){const{projection:n}=this.visualElement;if(n&&n.layout){const i=n.layout.layoutBox[t];if(i){e=Dt(i)*(parseFloat(e)/100)}}}this.originPoint[t]=e}),s&&st.postRender(()=>s(t,e)),nr(this.visualElement,"transform");const{animationState:r}=this.visualElement;r&&r.setActive("whileDrag",!0)},onMove:(t,e)=>{const{dragPropagation:n,dragDirectionLock:i,onDirectionLock:s,onDrag:o}=this.getProps();if(!n&&!this.openDragLock)return;const{offset:r}=e;if(i&&null===this.currentDirection)return this.currentDirection=function(t,e=10){let n=null;Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x");return n}(r),void(null!==this.currentDirection&&s&&s(this.currentDirection));this.updateAxis("x",e.point,r),this.updateAxis("y",e.point,r),this.visualElement.render(),o&&o(t,e)},onSessionEnd:(t,e)=>this.stop(t,e),resumeAnimation:()=>Cs(t=>{var e;return"paused"===this.getAnimationState(t)&&(null===(e=this.getAxisMotionValue(t).animation)||void 0===e?void 0:e.play())})},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:i,contextWindow:Sr(this.visualElement)})}stop(t,e){const n=this.isDragging;if(this.cancel(),!n)return;const{velocity:i}=e;this.startAnimation(i);const{onDragEnd:s}=this.getProps();s&&st.postRender(()=>s(t,e))}cancel(){this.isDragging=!1;const{projection:t,animationState:e}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),e&&e.setActive("whileDrag",!1)}updateAxis(t,e,n){const{drag:i}=this.getProps();if(!n||!Wr(t,i,this.currentDirection))return;const s=this.getAxisMotionValue(t);let o=this.originPoint[t]+n[t];this.constraints&&this.constraints[t]&&(o=function(t,{min:e,max:n},i){return void 0!==e&&t<e?t=i?Rt(e,t,i.min):Math.max(t,e):void 0!==n&&t>n&&(t=i?Rt(n,t,i.max):Math.min(t,n)),t}(o,this.constraints[t],this.elastic[t])),s.set(o)}resolveConstraints(){var t;const{dragConstraints:e,dragElastic:n}=this.getProps(),i=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):null===(t=this.visualElement.projection)||void 0===t?void 0:t.layout,s=this.constraints;e&&Tr(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!e||!i)&&function(t,{top:e,left:n,bottom:i,right:s}){return{x:Lr(t.x,n,s),y:Lr(t.y,e,i)}}(i.layoutBox,e),this.elastic=function(t=Fr){return!1===t?t=0:!0===t&&(t=Fr),{x:Or(t,"left","right"),y:Or(t,"top","bottom")}}(n),s!==this.constraints&&i&&this.constraints&&!this.hasMutatedConstraints&&Cs(t=>{!1!==this.constraints&&this.getAxisMotionValue(t)&&(this.constraints[t]=function(t,e){const n={};return void 0!==e.min&&(n.min=e.min-t.min),void 0!==e.max&&(n.max=e.max-t.min),n}(i.layoutBox[t],this.constraints[t]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:e}=this.getProps();if(!t||!Tr(t))return!1;const n=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const s=function(t,e,n){const i=ho(t,n),{scroll:s}=e;return s&&(us(i.x,s.offset.x),us(i.y,s.offset.y)),i}(n,i.root,this.visualElement.getTransformPagePoint());let o=function(t,e){return{x:Br(t.x,e.x),y:Br(t.y,e.y)}}(i.layout.layoutBox,s);if(e){const t=e(function({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}(o));this.hasMutatedConstraints=!!t,t&&(o=co(t))}return o}startAnimation(t){const{drag:e,dragMomentum:n,dragElastic:i,dragTransition:s,dragSnapToOrigin:o,onDragTransitionEnd:r}=this.getProps(),a=this.constraints||{},l=Cs(r=>{if(!Wr(r,e,this.currentDirection))return;let l=a&&a[r]||{};o&&(l={min:0,max:0});const u=i?200:1e6,c=i?40:1e7,h={type:"inertia",velocity:n?t[r]:0,bounceStiffness:u,bounceDamping:c,timeConstant:750,restDelta:1,restSpeed:10,...s,...l};return this.startAxisValueAnimation(r,h)});return Promise.all(l).then(r)}startAxisValueAnimation(t,e){const n=this.getAxisMotionValue(t);return nr(this.visualElement,t),n.start(ki(t,n,0,e,this.visualElement,!1))}stopAnimation(){Cs(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){Cs(t=>{var e;return null===(e=this.getAxisMotionValue(t).animation)||void 0===e?void 0:e.pause()})}getAnimationState(t){var e;return null===(e=this.getAxisMotionValue(t).animation)||void 0===e?void 0:e.state}getAxisMotionValue(t){const e="_drag"+t.toUpperCase(),n=this.visualElement.getProps(),i=n[e];return i||this.visualElement.getValue(t,(n.initial?n.initial[t]:void 0)||0)}snapToCursor(t){Cs(e=>{const{drag:n}=this.getProps();if(!Wr(e,n,this.currentDirection))return;const{projection:i}=this.visualElement,s=this.getAxisMotionValue(e);if(i&&i.layout){const{min:n,max:o}=i.layout.layoutBox[e];s.set(t[e]-Rt(n,o,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:e}=this.getProps(),{projection:n}=this.visualElement;if(!Tr(e)||!n||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};Cs(t=>{const e=this.getAxisMotionValue(t);if(e&&!1!==this.constraints){const n=e.get();i[t]=function(t,e){let n=.5;const i=Dt(t),s=Dt(e);return s>i?n=F(e.min,e.max-i,t.min):i>s&&(n=F(t.min,t.max-s,e.min)),ne(0,1,n)}({min:n,max:n},this.constraints[t])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.resolveConstraints(),Cs(e=>{if(!Wr(e,t,null))return;const n=this.getAxisMotionValue(e),{min:s,max:o}=this.constraints[e];n.set(Rt(s,o,i[e]))})}addListeners(){if(!this.visualElement.current)return;Ir.set(this.visualElement,this);const t=Pr(this.visualElement.current,"pointerdown",t=>{const{drag:e,dragListener:n=!0}=this.getProps();e&&n&&this.start(t)}),e=()=>{const{dragConstraints:t}=this.getProps();Tr(t)&&t.current&&(this.constraints=this.resolveRefConstraints())},{projection:n}=this.visualElement,i=n.addEventListener("measure",e);n&&!n.layout&&(n.root&&n.root.updateScroll(),n.updateLayout()),st.read(e);const s=io(window,"resize",()=>this.scalePositionWithinConstraints()),o=n.addEventListener("didUpdate",({delta:t,hasLayoutChanged:e})=>{this.isDragging&&e&&(Cs(e=>{const n=this.getAxisMotionValue(e);n&&(this.originPoint[e]+=t[e].translate,n.set(n.get()+t[e].translate))}),this.visualElement.render())});return()=>{s(),t(),i(),o&&o()}}getProps(){const t=this.visualElement.getProps(),{drag:e=!1,dragDirectionLock:n=!1,dragPropagation:i=!1,dragConstraints:s=!1,dragElastic:o=Fr,dragMomentum:r=!0}=t;return{...t,drag:e,dragDirectionLock:n,dragPropagation:i,dragConstraints:s,dragElastic:o,dragMomentum:r}}}function Wr(t,e,n){return!(!0!==e&&e!==t||null!==n&&n!==t)}const Nr=t=>(e,n)=>{t&&st.postRender(()=>t(e,n))};const zr=e.createContext({});class $r extends e.Component{componentDidMount(){const{visualElement:t,layoutGroup:e,switchLayoutGroup:n,layoutId:i}=this.props,{projection:s}=t;Ms(Xr),s&&(e.group&&e.group.add(s),n&&n.register&&i&&n.register(s),s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,onExitComplete:()=>this.safeToRemove()})),Vs.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:e,visualElement:n,drag:i,isPresent:s}=this.props,o=n.projection;return o?(o.isPresent=s,i||t.layoutDependency!==e||void 0===e||t.isPresent!==s?o.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?o.promote():o.relegate()||st.postRender(()=>{const t=o.getStack();t&&t.members.length||this.safeToRemove()})),null):null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),lt.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:e,switchLayoutGroup:n}=this.props,{projection:i}=t;i&&(i.scheduleCheckAfterUnmount(),e&&e.group&&e.group.remove(i),n&&n.deregister&&n.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function Hr(t){const[n,i]=b(),s=e.useContext(m);return d($r,{...t,layoutGroup:s,switchLayoutGroup:e.useContext(zr),isPresent:n,safeToRemove:i})}const Xr={borderRadius:{...lo,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:lo,borderTopRightRadius:lo,borderBottomLeftRadius:lo,borderBottomRightRadius:lo,boxShadow:uo},Yr={pan:{Feature:class extends gr{constructor(){super(...arguments),this.removePointerDownListener=R}onPointerDown(t){this.session=new Er(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Sr(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:e,onPan:n,onPanEnd:i}=this.node.getProps();return{onSessionStart:Nr(t),onStart:Nr(e),onMove:n,onEnd:(t,e)=>{delete this.session,i&&st.postRender(()=>i(t,e))}}}mount(){this.removePointerDownListener=Pr(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}},drag:{Feature:class extends gr{constructor(t){super(t),this.removeGroupControls=R,this.removeListeners=R,this.controls=new Ur(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||R}unmount(){this.removeGroupControls(),this.removeListeners()}},ProjectionNode:ro,MeasureLayout:Hr}};function Kr(t,e,n){const{props:i}=t;t.animationState&&i.whileHover&&t.animationState.setActive("whileHover","Start"===n);const s=i["onHover"+n];s&&st.postRender(()=>s(e,xr(e)))}function Gr(t,e,n){const{props:i}=t;if(t.current instanceof HTMLButtonElement&&t.current.disabled)return;t.animationState&&i.whileTap&&t.animationState.setActive("whileTap","Start"===n);const s=i["onTap"+("End"===n?"":n)];s&&st.postRender(()=>s(e,xr(e)))}const _r=new WeakMap,qr=new WeakMap,Zr=t=>{const e=_r.get(t.target);e&&e(t)},Jr=t=>{t.forEach(Zr)};function Qr(t,e,n){const i=function({root:t,...e}){const n=t||document;qr.has(n)||qr.set(n,{});const i=qr.get(n),s=JSON.stringify(e);return i[s]||(i[s]=new IntersectionObserver(Jr,{root:t,...e})),i[s]}(e);return _r.set(t,n),i.observe(t),()=>{_r.delete(t),i.unobserve(t)}}const ta={some:0,all:1};const ea={inView:{Feature:class extends gr{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:e,margin:n,amount:i="some",once:s}=t,o={root:e?e.current:void 0,rootMargin:n,threshold:"number"==typeof i?i:ta[i]};return Qr(this.node.current,o,t=>{const{isIntersecting:e}=t;if(this.isInView===e)return;if(this.isInView=e,s&&!e&&this.hasEnteredView)return;e&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",e);const{onViewportEnter:n,onViewportLeave:i}=this.node.getProps(),o=e?n:i;o&&o(t)})}mount(){this.startObserver()}update(){if("undefined"==typeof IntersectionObserver)return;const{props:t,prevProps:e}=this.node;["amount","margin","root"].some(function({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}(t,e))&&this.startObserver()}unmount(){}}},tap:{Feature:class extends gr{mount(){const{current:t}=this.node;t&&(this.unmount=Et(t,(t,e)=>(Gr(this.node,e,"Start"),(t,{success:e})=>Gr(this.node,t,e?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}},focus:{Feature:class extends gr{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch(e){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=Ln(io(this.node.current,"focus",()=>this.onFocus()),io(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}},hover:{Feature:class extends gr{mount(){const{current:t}=this.node;t&&(this.unmount=vt(t,(t,e)=>(Kr(this.node,e,"Start"),t=>Kr(this.node,t,"End"))))}unmount(){}}}},na={layout:{ProjectionNode:ro,MeasureLayout:Hr}},ia=e.createContext({});function sa(t){const{initial:n,animate:i}=function(t,e){if(bo(t)){const{initial:e,animate:n}=t;return{initial:!1===e||Po(e)?e:void 0,animate:Po(n)?n:void 0}}return!1!==t.inherit?e:{}}(t,e.useContext(ia));return e.useMemo(()=>({initial:n,animate:i}),[oa(n),oa(i)])}function oa(t){return Array.isArray(t)?t.join(" "):t}const ra=Symbol.for("motionComponentSymbol");function aa(t,n,i){return e.useCallback(e=>{e&&t.onMount&&t.onMount(e),n&&(e?n.mount(e):n.unmount()),i&&("function"==typeof i?i(e):Tr(i)&&(i.current=e))},[n])}function la(t,n,i,s,o){var r,a;const{visualElement:l}=e.useContext(ia),u=e.useContext($o),c=e.useContext(v),h=e.useContext(x).reducedMotion,d=e.useRef(null);s=s||u.renderer,!d.current&&s&&(d.current=s(t,{visualState:n,parent:l,props:i,presenceContext:c,blockInitialAnimation:!!c&&!1===c.initial,reducedMotionConfig:h}));const p=d.current,m=e.useContext(zr);!p||p.projection||!o||"html"!==p.type&&"svg"!==p.type||function(t,e,n,i){const{layoutId:s,layout:o,drag:r,dragConstraints:a,layoutScroll:l,layoutRoot:u}=e;t.projection=new n(t.latestValues,e["data-framer-portal-id"]?void 0:function t(e){return e?!1!==e.options.allowProjection?e.projection:t(e.parent):void 0}(t.parent)),t.projection.setOptions({layoutId:s,layout:o,alwaysMeasureLayout:Boolean(r)||a&&Tr(a),visualElement:t,animationType:"string"==typeof o?o:"both",initialPromotionConfig:i,layoutScroll:l,layoutRoot:u})}(d.current,i,o,m);const f=e.useRef(!1);e.useInsertionEffect(()=>{p&&f.current&&p.update(i,c)});const g=i[Fi],w=e.useRef(Boolean(g)&&!(null===(r=window.MotionHandoffIsComplete)||void 0===r?void 0:r.call(window,g))&&(null===(a=window.MotionHasOptimisedAnimation)||void 0===a?void 0:a.call(window,g)));return y(()=>{p&&(f.current=!0,window.MotionIsMounted=!0,p.updateFeatures(),lt.render(p.render),w.current&&p.animationState&&p.animationState.animateChanges())}),e.useEffect(()=>{p&&(!w.current&&p.animationState&&p.animationState.animateChanges(),w.current&&(queueMicrotask(()=>{var t;null===(t=window.MotionHandoffMarkAsComplete)||void 0===t||t.call(window,g)}),w.current=!1))}),p}function ua({preloadedFeatures:t,createVisualElement:n,useRender:i,useVisualState:s,Component:o}){var r,a;function l(t,r){let a;const l={...e.useContext(x),...t,layoutId:ca(t)},{isStatic:u}=l,c=sa(t),h=s(t,u);if(!u&&g){e.useContext($o).strict;const t=function(t){const{drag:e,layout:n}=mo;if(!e&&!n)return{};const i={...e,...n};return{MeasureLayout:(null==e?void 0:e.isEnabled(t))||(null==n?void 0:n.isEnabled(t))?i.MeasureLayout:void 0,ProjectionNode:i.ProjectionNode}}(l);a=t.MeasureLayout,c.visualElement=la(o,h,l,n,t.ProjectionNode)}return p(ia.Provider,{value:c,children:[a&&c.visualElement?d(a,{visualElement:c.visualElement,...l}):null,i(o,t,aa(h,c.visualElement,r),h,u,c.visualElement)]})}t&&Ho(t),l.displayName="motion."+("string"==typeof o?o:`create(${null!==(a=null!==(r=o.displayName)&&void 0!==r?r:o.name)&&void 0!==a?a:""})`);const u=e.forwardRef(l);return u[ra]=o,u}function ca({layoutId:t}){const n=e.useContext(m).id;return n&&void 0!==t?n+"-"+t:t}const ha=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function da(t,e,n){for(const i in e)Ut(e[i])||jo(i,n)||(t[i]=e[i])}function pa(t,n){const i={};return da(i,t.style||{},t),Object.assign(i,function({transformTemplate:t},n){return e.useMemo(()=>{const e={style:{},transform:{},transformOrigin:{},vars:{}};return Fo(e,n,t),Object.assign({},e.vars,e.style)},[n])}(t,n)),i}function ma(t,e){const n={},i=pa(t,e);return t.drag&&!1!==t.dragListener&&(n.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=!0===t.drag?"none":"pan-"+("x"===t.drag?"y":"x")),void 0===t.tabIndex&&(t.onTap||t.onTapStart||t.whileTap)&&(n.tabIndex=0),n.style=i,n}const fa=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function ga(t){return"string"==typeof t&&!t.includes("-")&&!!(fa.indexOf(t)>-1||/[A-Z]/u.test(t))}const ya={offset:"stroke-dashoffset",array:"stroke-dasharray"},va={offset:"strokeDashoffset",array:"strokeDasharray"};function xa(t,e,n){return"string"==typeof t?t:ye.transform(e+n*t)}function wa(t,{attrX:e,attrY:n,attrScale:i,originX:s,originY:o,pathLength:r,pathSpacing:a=1,pathOffset:l=0,...u},c,h){if(Fo(t,u,h),c)return void(t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox));t.attrs=t.style,t.style={};const{attrs:d,style:p,dimensions:m}=t;d.transform&&(m&&(p.transform=d.transform),delete d.transform),m&&(void 0!==s||void 0!==o||p.transform)&&(p.transformOrigin=function(t,e,n){return`${xa(e,t.x,t.width)} ${xa(n,t.y,t.height)}`}(m,void 0!==s?s:.5,void 0!==o?o:.5)),void 0!==e&&(d.x=e),void 0!==n&&(d.y=n),void 0!==i&&(d.scale=i),void 0!==r&&function(t,e,n=1,i=0,s=!0){t.pathLength=1;const o=s?ya:va;t[o.offset]=ye.transform(-i);const r=ye.transform(e),a=ye.transform(n);t[o.array]=`${r} ${a}`}(d,r,a,l,!1)}const Pa=()=>({style:{},transform:{},transformOrigin:{},vars:{},attrs:{}}),Sa=t=>"string"==typeof t&&"svg"===t.toLowerCase();function Ta(t,n,i,s){const o=e.useMemo(()=>{const e={style:{},transform:{},transformOrigin:{},vars:{},attrs:{}};return wa(e,n,Sa(s),t.transformTemplate),{...e.attrs,style:{...e.style}}},[n]);if(t.style){const e={};da(e,t.style,t),o.style={...e,...o.style}}return o}function ba(t=!1){return(n,i,s,{latestValues:o},r)=>{const a=(ga(n)?Ta:ma)(i,o,r,n),l=qo(i,"string"==typeof n,t),u=n!==e.Fragment?{...l,...a,ref:s}:{},{children:c}=i,h=e.useMemo(()=>Ut(c)?c.get():c,[c]);return e.createElement(n,{...u,children:h})}}const Aa=t=>(n,i)=>{const s=e.useContext(ia),o=e.useContext(v),r=()=>function({scrapeMotionValuesFromProps:t,createRenderState:e,onUpdate:n},i,s,o){const r={latestValues:Ea(i,s,o,t),renderState:e()};return n&&(r.onMount=t=>n({props:i,current:t,...r}),r.onUpdate=t=>n(t)),r}(t,n,s,o);return i?r():f(r)};function Ea(t,e,n,i){const s={},o=i(t,{});for(const t in o)s[t]=zi(o[t]);let{initial:r,animate:a}=t;const l=bo(t),u=Ao(t);e&&u&&!l&&!1!==t.inherit&&(void 0===r&&(r=e.initial),void 0===a&&(a=e.animate));let c=!!n&&!1===n.initial;c=c||!1===r;const h=c?a:r;if(h&&"boolean"!=typeof h&&!wo(h)){const e=Array.isArray(h)?h:[h];for(let n=0;n<e.length;n++){const i=Mo(t,e[n]);if(i){const{transitionEnd:t,transition:e,...n}=i;for(const t in n){let e=n[t];if(Array.isArray(e)){e=e[c?e.length-1:0]}null!==e&&(s[t]=e)}for(const e in t)s[e]=t[e]}}}return s}const Ma={useVisualState:Aa({scrapeMotionValuesFromProps:Io,createRenderState:ha})};function Ca(t,e){try{e.dimensions="function"==typeof t.getBBox?t.getBBox():t.getBoundingClientRect()}catch(t){e.dimensions={x:0,y:0,width:0,height:0}}}const Va=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 Ra(t,e,n,i){Oo(t,e,void 0,i);for(const n in e.attrs)t.setAttribute(Va.has(n)?n:Bi(n),e.attrs[n])}function Da(t,e,n){const i=Io(t,e,n);for(const n in t)if(Ut(t[n])||Ut(e[n])){i[-1!==Qt.indexOf(n)?"attr"+n.charAt(0).toUpperCase()+n.substring(1):n]=t[n]}return i}const ka=["x","y","width","height","cx","cy","r"],La={useVisualState:Aa({scrapeMotionValuesFromProps:Da,createRenderState:Pa,onUpdate:({props:t,prevProps:e,current:n,renderState:i,latestValues:s})=>{if(!n)return;let o=!!t.drag;if(!o)for(const t in s)if(te.has(t)){o=!0;break}if(!o)return;let r=!e;if(e)for(let n=0;n<ka.length;n++){const i=ka[n];t[i]!==e[i]&&(r=!0)}r&&st.read(()=>{Ca(n,i),st.render(()=>{wa(i,s,Sa(n.tagName),t.transformTemplate),Ra(n,i)})})}})};function Ba(t,e){return function(n,{forwardMotionProps:i}={forwardMotionProps:!1}){return ua({...ga(n)?La:Ma,preloadedFeatures:t,useRender:ba(i),createVisualElement:e,Component:n})}}class Fa extends Ro{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=ys,this.updateDimensions=()=>{this.current&&!this.renderState.dimensions&&Ca(this.current,this.renderState)}}getBaseTargetFromProps(t,e){return t[e]}readValueFromInstance(t,e){if(te.has(e)){const t=Ue(e);return t&&t.default||0}return e=Va.has(e)?e:Bi(e),t.getAttribute(e)}scrapeMotionValuesFromProps(t,e,n){return Da(t,e,n)}onBindTransform(){this.current&&!this.renderState.dimensions&&st.postRender(this.updateDimensions)}build(t,e,n){wa(t,e,this.isSVGTag,n.transformTemplate)}renderInstance(t,e,n,i){Ra(t,e,0,i)}mount(t){this.isSVGTag=Sa(t.tagName),super.mount(t)}}const Oa=(t,n)=>ga(t)?new Fa(n):new Uo(n,{allowProjection:t!==e.Fragment}),ja=Jo(Ba({...vr,...ea,...Yr,...na},Oa));function Ia({children:t,as:n="ul",axis:i="y",onReorder:s,values:o,...r},a){const l=f(()=>ja[n]),u=[],c=e.useRef(!1),h={axis:i,registerItem:(t,e)=>{const n=u.findIndex(e=>t===e.value);-1!==n?u[n].layout=e[i]:u.push({value:t,layout:e[i]}),u.sort(Na)},updateOrder:(t,e,n)=>{if(c.current)return;const i=function(t,e,n,i){if(!i)return t;const s=t.findIndex(t=>t.value===e);if(-1===s)return t;const o=i>0?1:-1,r=t[s+o];if(!r)return t;const a=t[s],l=r.layout,u=Rt(l.min,l.max,.5);return 1===o&&a.layout.max+n>u||-1===o&&a.layout.min+n<u?function([...t],e,n){const i=e<0?t.length+e:e;if(i>=0&&i<t.length){const i=n<0?t.length+n:n,[s]=t.splice(e,1);t.splice(i,0,s)}return t}(t,s,s+o):t}(u,t,e,n);u!==i&&(c.current=!0,s(i.map(Wa).filter(t=>-1!==o.indexOf(t))))}};return e.useEffect(()=>{c.current=!1}),d(l,{...r,ref:a,ignoreStrict:!0,children:d(Zo.Provider,{value:h,children:t})})}const Ua=e.forwardRef(Ia);function Wa(t){return t.value}function Na(t,e){return t.layout.min-e.layout.min}function za(t){const n=f(()=>Vt(t)),{isStatic:i}=e.useContext(x);if(i){const[,i]=e.useState(t);e.useEffect(()=>n.on("change",i),[])}return n}function $a(...t){const e=!Array.isArray(t[0]),n=e?0:-1,i=t[0+n],s=t[1+n],o=t[2+n],r=t[3+n],a=mi(s,o,{mixer:(l=o[0],(t=>t&&"object"==typeof t&&t.mix)(l)?l.mix:void 0),...r});var l;return e?a(i):a}function Ha(t,e){const n=za(e()),i=()=>n.set(e());return i(),y(()=>{const e=()=>st.preRender(i,!1,!0),n=t.map(t=>t.on("change",e));return()=>{n.forEach(t=>t()),ot(i)}}),n}function Xa(t,e,n,i){if("function"==typeof t)return function(t){Mt.current=[],t();const e=Ha(Mt.current,t);return Mt.current=void 0,e}(t);const s="function"==typeof e?e:$a(e,n,i);return Array.isArray(t)?Ya(t,s):Ya([t],([t])=>s(t))}function Ya(t,e){const n=f(()=>[]);return Ha(t,()=>{n.length=0;const i=t.length;for(let e=0;e<i;e++)n[e]=t[e].get();return e(n)})}function Ka(t,e=0){return Ut(t)?t:za(e)}function Ga({children:t,style:n={},value:i,as:s="li",onDrag:o,layout:r=!0,...a},l){const u=f(()=>ja[s]),c=e.useContext(Zo),h={x:Ka(n.x),y:Ka(n.y)},p=Xa([h.x,h.y],([t,e])=>t||e?1:"unset"),{axis:m,registerItem:g,updateOrder:y}=c;return d(u,{drag:m,...a,dragSnapToOrigin:!0,style:{...n,x:h.x,y:h.y,zIndex:p},layout:r,onDrag:(t,e)=>{const{velocity:n}=e;n[m]&&y(i,h[m].get(),n[m]),o&&o(t,e)},onLayoutMeasure:t=>g(i,t),ref:l,ignoreStrict:!0,children:t})}const _a=e.forwardRef(Ga);var qa=Object.freeze({__proto__:null,Group:Ua,Item:_a});const Za=(t,e,n)=>{const i=e-t;return((n-t)%i+i)%i+t};function Ja(t,e){return hi(t)?t[Za(0,t.length,e)]:t}function Qa(t){return"object"==typeof t&&!Array.isArray(t)}function tl(t,e,n,i){return"string"==typeof t&&Qa(e)?ft(t,n,i):t instanceof NodeList?Array.from(t):Array.isArray(t)?t:[t]}function el(t,e,n){return t*(e+1)}function nl(t,e,n,i){var s;return"number"==typeof e?e:e.startsWith("-")||e.startsWith("+")?Math.max(0,t+parseFloat(e)):"<"===e?n:null!==(s=i.get(e))&&void 0!==s?s:t}function il(t,e,n,i,s,o){!function(t,e,n){for(let i=0;i<t.length;i++){const s=t[i];s.at>e&&s.at<n&&(V(t,s),i--)}}(t,s,o);for(let r=0;r<e.length;r++)t.push({value:e[r],at:Rt(s,o,i[r]),easing:Ja(n,r)})}function sl(t,e){for(let n=0;n<t.length;n++)t[n]=t[n]/(e+1)}function ol(t,e){return t.at===e.at?null===t.value?1:null===e.value?-1:0:t.at-e.at}function rl(t,e){return!e.has(t)&&e.set(t,{}),e.get(t)}function al(t,e){return e[t]||(e[t]=[]),e[t]}function ll(t){return Array.isArray(t)?t:[t]}function ul(t,e){return t&&t[e]?{...t,...t[e]}:{...t}}const cl=t=>"number"==typeof t,hl=t=>t.every(cl);class dl extends Vo{constructor(){super(...arguments),this.type="object"}readValueFromInstance(t,e){if(function(t,e){return t in e}(e,t)){const n=t[e];if("string"==typeof n||"number"==typeof n)return n}}getBaseTargetFromProps(){}removeValueFromRenderState(t,e){delete e.output[t]}measureInstanceViewportBox(){return{x:{min:0,max:0},y:{min:0,max:0}}}build(t,e){Object.assign(t.output,e)}renderInstance(t,{output:e}){Object.assign(t,e)}sortInstanceNodePosition(){return 0}}function pl(t){const e={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=ji(t)?new Fa(e):new Uo(e);n.mount(t),xo.set(t,n)}function ml(t){const e=new dl({presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}});e.mount(t),xo.set(t,e)}function fl(t,e,n,i){const s=[];if(function(t,e){return Ut(t)||"number"==typeof t||"string"==typeof t&&!Qa(e)}(t,e))s.push(Li(t,Qa(e)&&e.default||e,n&&n.default||n));else{const o=tl(t,e,i),r=o.length;for(let t=0;t<r;t++){const i=o[t],a=i instanceof Element?pl:ml;xo.has(i)||a(i);const l=xo.get(i),u={...n};"delay"in u&&"function"==typeof u.delay&&(u.delay=u.delay(t,r)),s.push(...sr(l,{...e,transition:u},{}))}}return s}function gl(t,e,n){const i=[];return function(t,{defaultTransition:e={},...n}={},i,s){const o=e.duration||.3,r=new Map,a=new Map,l={},u=new Map;let c=0,h=0,d=0;for(let n=0;n<t.length;n++){const r=t[n];if("string"==typeof r){u.set(r,h);continue}if(!Array.isArray(r)){u.set(r.name,nl(h,r.at,c,u));continue}let[p,m,f={}]=r;void 0!==f.at&&(h=nl(h,f.at,c,u));let g=0;const y=(t,n,i,r=0,a=0)=>{const l=ll(t),{delay:u=0,times:c=gi(l),type:p="keyframes",repeat:m,repeatType:f,repeatDelay:y=0,...v}=n;let{ease:x=e.ease||"easeOut",duration:w}=n;const P="function"==typeof u?u(r,a):u,S=l.length,T=X(p)?p:null==s?void 0:s[p];if(S<=2&&T){let t=100;if(2===S&&hl(l)){const e=l[1]-l[0];t=Math.abs(e)}const e={...v};void 0!==w&&(e.duration=j(w));const n=H(e,t,T);x=n.ease,w=n.duration}null!=w||(w=o);const b=h+P;1===c.length&&0===c[0]&&(c[1]=1);const A=c.length-l.length;if(A>0&&fi(c,A),1===l.length&&l.unshift(null),m){w=el(w,m);const t=[...l],e=[...c];x=Array.isArray(x)?[...x]:[x];const n=[...x];for(let i=0;i<m;i++){l.push(...t);for(let s=0;s<t.length;s++)c.push(e[s]+(i+1)),x.push(0===s?"linear":Ja(n,s-1))}sl(c,m)}const E=b+w;il(i,l,x,c,b,E),g=Math.max(P+w,g),d=Math.max(E,d)};if(Ut(p)){y(m,f,al("default",rl(p,a)))}else{const t=tl(p,m,i,l),e=t.length;for(let n=0;n<e;n++){m=m,f=f;const i=rl(t[n],a);for(const t in m)y(m[t],ul(f,t),al(t,i),n,e)}}c=h,h+=g}return a.forEach((t,i)=>{for(const s in t){const o=t[s];o.sort(ol);const a=[],l=[],u=[];for(let t=0;t<o.length;t++){const{at:e,value:n,easing:i}=o[t];a.push(n),l.push(F(0,d,e)),u.push(i||"easeOut")}0!==l[0]&&(l.unshift(0),a.unshift(a[0]),u.unshift("easeInOut")),1!==l[l.length-1]&&(l.push(1),a.push(null)),r.has(i)||r.set(i,{keyframes:{},transition:{}});const c=r.get(i);c.keyframes[s]=a,c.transition[s]={...e,duration:d,ease:u,times:l,...n}}}),r}(t,e,n,{spring:ri}).forEach(({keyframes:t,transition:e},n)=>{i.push(...fl(n,t,e))}),i}function yl(t){return function(e,n,i){let s=[];var o;o=e,s=Array.isArray(o)&&o.some(Array.isArray)?gl(e,n,t):fl(e,n,i,t);const r=new N(s);return t&&t.animations.push(r),r}}const vl=yl();function xl(t,e,n){t.style.setProperty(e,n)}function wl(t,e,n){t.style[e]=n}const Pl=B(()=>{try{document.createElement("div").animate({opacity:[1]})}catch(t){return!1}return!0}),Sl=new WeakMap;function Tl(t){const e=Sl.get(t)||new Map;return Sl.set(t,e),Sl.get(t)}class bl extends class{constructor(t){this.animation=t}get duration(){var t,e,n;const i=(null===(e=null===(t=this.animation)||void 0===t?void 0:t.effect)||void 0===e?void 0:e.getComputedTiming().duration)||(null===(n=this.options)||void 0===n?void 0:n.duration)||300;return I(Number(i))}get time(){var t;return this.animation?I((null===(t=this.animation)||void 0===t?void 0:t.currentTime)||0):0}set time(t){this.animation&&(this.animation.currentTime=j(t))}get speed(){return this.animation?this.animation.playbackRate:1}set speed(t){this.animation&&(this.animation.playbackRate=t)}get state(){return this.animation?this.animation.playState:"finished"}get startTime(){return this.animation?this.animation.startTime:null}get finished(){return this.animation?this.animation.finished:Promise.resolve()}play(){this.animation&&this.animation.play()}pause(){this.animation&&this.animation.pause()}stop(){this.animation&&"idle"!==this.state&&"finished"!==this.state&&(this.animation.commitStyles&&this.animation.commitStyles(),this.cancel())}flatten(){var t,e;this.animation&&(null===(t=this.options)||void 0===t?void 0:t.allowFlatten)&&(null===(e=this.animation.effect)||void 0===e||e.updateTiming({easing:"linear"}))}attachTimeline(t){return this.animation&&Y(this.animation,t),R}complete(){this.animation&&this.animation.finish()}cancel(){try{this.animation&&this.animation.cancel()}catch(t){}}}{constructor(t,e,n,i){const s=e.startsWith("--");k("string"!=typeof i.type);const o=Tl(t).get(e);o&&o.stop();if(Array.isArray(n)||(n=[n]),function(t,e,n){for(let i=0;i<e.length;i++)null===e[i]&&(e[i]=0===i?n():e[i-1]),"number"==typeof e[i]&&Be[t]&&(e[i]=Be[t].transform(e[i]));!Pl()&&e.length<2&&e.unshift(n())}(e,n,()=>e.startsWith("--")?t.style.getPropertyValue(e):window.getComputedStyle(t)[e]),X(i.type)){const t=H(i,100,i.type);i.ease=q()?t.ease:"easeOut",i.duration=j(t.duration),i.type="keyframes"}else i.ease=i.ease||"easeOut";const r=()=>{this.setValue(t,e,bn(n,i)),this.cancel(),this.resolveFinishedPromise()},a=()=>{this.setValue=s?xl:wl,this.options=i,this.updateFinishedPromise(),this.removeAnimation=()=>{const n=Sl.get(t);n&&n.delete(e)}};Ai()?(super(bi(t,e,n,i)),a(),!1===i.autoplay&&this.animation.pause(),this.animation.onfinish=r,Tl(t).set(e,this)):(super(),a(),r())}then(t,e){return this.currentFinishedPromise.then(t,e)}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}play(){"finished"===this.state&&this.updateFinishedPromise(),super.play()}cancel(){this.removeAnimation(),super.cancel()}}const Al=t=>function(e,n,i){return new N(function(t,e,n,i){const s=ft(t,i),o=s.length,r=[];for(let t=0;t<o;t++){const i=s[t],a={...n};"function"==typeof a.delay&&(a.delay=a.delay(t,o));for(const t in e){const n=e[t],s={...z(a,t)};s.duration=s.duration?j(s.duration):s.duration,s.delay=j(s.delay||0),s.allowFlatten=!a.type&&!a.ease,r.push(new bl(i,t,n,s))}}return r}(e,n,i,t))},El=Al();function Ml(t,e){let n;const i=()=>{const{currentTime:i}=e,s=(null===i?0:i.value)/100;n!==s&&t(s),n=s};return st.update(i,!0),()=>ot(i)}const Cl=new WeakMap;let Vl;function Rl({target:t,contentRect:e,borderBoxSize:n}){var i;null===(i=Cl.get(t))||void 0===i||i.forEach(i=>{i({target:t,contentSize:e,get size(){return function(t,e){if(e){const{inlineSize:t,blockSize:n}=e[0];return{width:t,height:n}}return t instanceof SVGElement&&"getBBox"in t?t.getBBox():{width:t.offsetWidth,height:t.offsetHeight}}(t,n)}})})}function Dl(t){t.forEach(Rl)}function kl(t,e){Vl||"undefined"!=typeof ResizeObserver&&(Vl=new ResizeObserver(Dl));const n=ft(t);return n.forEach(t=>{let n=Cl.get(t);n||(n=new Set,Cl.set(t,n)),n.add(e),null==Vl||Vl.observe(t)}),()=>{n.forEach(t=>{const n=Cl.get(t);null==n||n.delete(e),(null==n?void 0:n.size)||null==Vl||Vl.unobserve(t)})}}const Ll=new Set;let Bl;function Fl(t){return Ll.add(t),Bl||(Bl=()=>{const t={width:window.innerWidth,height:window.innerHeight},e={target:window,size:t,contentSize:t};Ll.forEach(t=>t(e))},window.addEventListener("resize",Bl)),()=>{Ll.delete(t),!Ll.size&&Bl&&(Bl=void 0)}}const Ol={x:{length:"Width",position:"Left"},y:{length:"Height",position:"Top"}};function jl(t,e,n,i){const s=n[e],{length:o,position:r}=Ol[e],a=s.current,l=n.time;s.current=t["scroll"+r],s.scrollLength=t["scroll"+o]-t["client"+o],s.offset.length=0,s.offset[0]=0,s.offset[1]=s.scrollLength,s.progress=F(0,s.scrollLength,s.current);const u=i-l;s.velocity=u>50?0:U(s.current-a,u)}const Il={start:0,center:.5,end:1};function Ul(t,e,n=0){let i=0;if(t in Il&&(t=Il[t]),"string"==typeof t){const e=parseFloat(t);t.endsWith("px")?i=e:t.endsWith("%")?t=e/100:t.endsWith("vw")?i=e/100*document.documentElement.clientWidth:t.endsWith("vh")?i=e/100*document.documentElement.clientHeight:t=e}return"number"==typeof t&&(i=e*t),n+i}const Wl=[0,0];function Nl(t,e,n,i){let s=Array.isArray(t)?t:Wl,o=0,r=0;return"number"==typeof t?s=[t,t]:"string"==typeof t&&(s=(t=t.trim()).includes(" ")?t.split(" "):[t,Il[t]?t:"0"]),o=Ul(s[0],n,i),r=Ul(s[1],e),o-r}const zl={Enter:[[0,1],[1,1]],Exit:[[0,0],[1,0]],Any:[[1,0],[0,1]],All:[[0,0],[1,1]]},$l={x:0,y:0};function Hl(t,e,n){const{offset:i=zl.All}=n,{target:s=t,axis:o="y"}=n,r="y"===o?"height":"width",a=s!==t?function(t,e){const n={x:0,y:0};let i=t;for(;i&&i!==e;)if(i instanceof HTMLElement)n.x+=i.offsetLeft,n.y+=i.offsetTop,i=i.offsetParent;else if("svg"===i.tagName){const t=i.getBoundingClientRect();i=i.parentElement;const e=i.getBoundingClientRect();n.x+=t.left-e.left,n.y+=t.top-e.top}else{if(!(i instanceof SVGGraphicsElement))break;{const{x:t,y:e}=i.getBBox();n.x+=t,n.y+=e;let s=null,o=i.parentNode;for(;!s;)"svg"===o.tagName&&(s=o),o=i.parentNode;i=s}}return n}(s,t):$l,l=s===t?{width:t.scrollWidth,height:t.scrollHeight}:function(t){return"getBBox"in t&&"svg"!==t.tagName?t.getBBox():{width:t.clientWidth,height:t.clientHeight}}(s),u={width:t.clientWidth,height:t.clientHeight};e[o].offset.length=0;let c=!e[o].interpolate;const h=i.length;for(let t=0;t<h;t++){const n=Nl(i[t],u[r],l[r],a[o]);c||n===e[o].interpolatorOffsets[t]||(c=!0),e[o].offset[t]=n}c&&(e[o].interpolate=mi(e[o].offset,gi(i),{clamp:!1}),e[o].interpolatorOffsets=[...e[o].offset]),e[o].progress=ne(0,1,e[o].interpolate(e[o].current))}function Xl(t,e,n,i={}){return{measure:()=>function(t,e=t,n){if(n.x.targetOffset=0,n.y.targetOffset=0,e!==t){let i=e;for(;i&&i!==t;)n.x.targetOffset+=i.offsetLeft,n.y.targetOffset+=i.offsetTop,i=i.offsetParent}n.x.targetLength=e===t?e.scrollWidth:e.clientWidth,n.y.targetLength=e===t?e.scrollHeight:e.clientHeight,n.x.containerLength=t.clientWidth,n.y.containerLength=t.clientHeight}(t,i.target,n),update:e=>{!function(t,e,n){jl(t,"x",e,n),jl(t,"y",e,n),e.time=n}(t,n,e),(i.offset||i.target)&&Hl(t,n,i)},notify:()=>e(n)}}const Yl=new WeakMap,Kl=new WeakMap,Gl=new WeakMap,_l=t=>t===document.documentElement?window:t;function ql(t,{container:e=document.documentElement,...n}={}){let i=Gl.get(e);i||(i=new Set,Gl.set(e,i));const s=Xl(e,t,{time:0,x:{current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0},y:{current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0}},n);if(i.add(s),!Yl.has(e)){const t=()=>{for(const t of i)t.measure()},n=()=>{for(const t of i)t.update(rt.timestamp)},s=()=>{for(const t of i)t.notify()},a=()=>{st.read(t,!1,!0),st.read(n,!1,!0),st.update(s,!1,!0)};Yl.set(e,a);const l=_l(e);window.addEventListener("resize",a,{passive:!0}),e!==document.documentElement&&Kl.set(e,(r=a,"function"==typeof(o=e)?Fl(o):kl(o,r))),l.addEventListener("scroll",a,{passive:!0})}var o,r;const a=Yl.get(e);return st.read(a,!1,!0),()=>{var t;ot(a);const n=Gl.get(e);if(!n)return;if(n.delete(s),n.size)return;const i=Yl.get(e);Yl.delete(e),i&&(_l(e).removeEventListener("scroll",i),null===(t=Kl.get(e))||void 0===t||t(),window.removeEventListener("resize",i))}}const Zl=new Map;function Jl({source:t,container:e=document.documentElement,axis:n="y"}={}){t&&(e=t),Zl.has(e)||Zl.set(e,{});const i=Zl.get(e);return i[n]||(i[n]=W()?new ScrollTimeline({source:e,axis:n}):function({source:t,container:e,axis:n="y"}){t&&(e=t);const i={value:0},s=ql(t=>{i.value=100*t[n].progress},{container:e,axis:n});return{currentTime:i,cancel:s}}({source:e,axis:n})),i[n]}function Ql(t){return t&&(t.target||t.offset)}function tu(t,{axis:e="y",...n}={}){const i={axis:e,...n};return"function"==typeof t?function(t,e){return function(t){return 2===t.length}(t)||Ql(e)?ql(n=>{t(n[e.axis].progress,n)},e):Ml(t,Jl(e))}(t,i):function(t,e){if(t.flatten(),Ql(e))return t.pause(),ql(n=>{t.time=t.duration*n[e.axis].progress},e);{const n=Jl(e);return t.attachTimeline?t.attachTimeline(n,t=>(t.pause(),Ml(e=>{t.time=t.duration*e},n))):R}}(t,i)}const eu={some:0,all:1};function nu(t,e,{root:n,margin:i,amount:s="some"}={}){const o=ft(t),r=new WeakMap,a=new IntersectionObserver(t=>{t.forEach(t=>{const n=r.get(t.target);if(t.isIntersecting!==Boolean(n))if(t.isIntersecting){const n=e(t.target,t);"function"==typeof n?r.set(t.target,n):a.unobserve(t.target)}else"function"==typeof n&&(n(t),r.delete(t.target))})},{root:n,rootMargin:i,threshold:"number"==typeof s?s:eu[s]});return o.forEach(t=>a.observe(t)),()=>a.disconnect()}const iu=Jo(Ba());function su(t){return e.useEffect(()=>()=>t(),[])}const ou={renderer:Oa,...vr,...ea},ru={...ou,...Yr,...na},au={renderer:Oa,...vr};function lu(t,n,i){e.useInsertionEffect(()=>t.on(n,i),[t,n,i])}function uu(t,e){D(Boolean(!e||e.current))}const cu=()=>({scrollX:Vt(0),scrollY:Vt(0),scrollXProgress:Vt(0),scrollYProgress:Vt(0)});function hu({container:t,target:n,layoutEffect:i=!0,...s}={}){const o=f(cu);return(i?y:e.useEffect)(()=>(uu(0,n),uu(0,t),tu((t,{x:e,y:n})=>{o.scrollX.set(e.current),o.scrollXProgress.set(e.progress),o.scrollY.set(n.current),o.scrollYProgress.set(n.progress)},{...s,container:(null==t?void 0:t.current)||void 0,target:(null==n?void 0:n.current)||void 0})),[t,n,JSON.stringify(s.offset)]),o}function du(t,e){return e?t+e:t}function pu(t){return"number"==typeof t?t:parseFloat(t)}function mu(t){const n=e.useRef(0),{isStatic:i}=e.useContext(x);e.useEffect(()=>{if(i)return;const e=({timestamp:e,delta:i})=>{n.current||(n.current=e),t(e-n.current,i)};return st.update(e,!0),()=>ot(e)},[t])}class fu extends Ct{constructor(){super(...arguments),this.values=[]}add(t){const e=function(t){return te.has(t)?"transform":Ti.has(t)?Bi(t):void 0}(t);e&&(C(this.values,e),this.update())}update(){this.set(this.values.length?this.values.join(", "):"auto")}}function gu(){!go.current&&yo();const[t]=e.useState(fo.current);return t}function yu(t,e){[...e].reverse().forEach(n=>{const i=t.getVariant(n);i&&er(t,i),t.variantChildren&&t.variantChildren.forEach(t=>{yu(t,e)})})}function vu(){const t=new Set,e={subscribe:e=>(t.add(e),()=>{t.delete(e)}),start(e,n){const i=[];return t.forEach(t=>{i.push(ar(t,e,{transitionOverride:n}))}),Promise.all(i)},set:e=>t.forEach(t=>{!function(t,e){Array.isArray(e)?yu(t,e):"string"==typeof e?yu(t,[e]):er(t,e)}(t,e)}),stop(){t.forEach(t=>{!function(t){t.values.forEach(t=>t.stop())}(t)})},mount:()=>()=>{e.stop()}};return e}function xu(){const t=f(vu);return y(t.mount,[]),t}const wu=xu;class Pu{constructor(){this.componentControls=new Set}subscribe(t){return this.componentControls.add(t),()=>this.componentControls.delete(t)}start(t,e){this.componentControls.forEach(n=>{n.start(t.nativeEvent||t,e)})}}const Su=()=>new Pu;function Tu(t){return null!==t&&"object"==typeof t&&ra in t}function bu(){return Au}function Au(t){oo.current&&(oo.current.isUpdating=!1,oo.current.blockUpdate(),t&&t())}const Eu=new Map,Mu=new Map,Cu=(t,e)=>`${t}: ${te.has(e)?"transform":e}`;function Vu(t,e,n){var i;const s=Cu(t,e),o=Eu.get(s);if(!o)return null;const{animation:r,startTime:a}=o;function l(){var i;null===(i=window.MotionCancelOptimisedAnimation)||void 0===i||i.call(window,t,e,n)}return r.onfinish=l,null===a||(null===(i=window.MotionHandoffIsComplete)||void 0===i?void 0:i.call(window,t))?(l(),null):a}let Ru,Du;const ku=new Set;function Lu(){ku.forEach(t=>{t.animation.play(),t.animation.startTime=t.startTime}),ku.clear()}const Bu=()=>({});class Fu extends Vo{constructor(){super(...arguments),this.measureInstanceViewportBox=ys}build(){}resetTransform(){}restoreTransform(){}removeValueFromRenderState(){}renderInstance(){}scrapeMotionValuesFromProps(){return{}}getBaseTargetFromProps(){}readValueFromInstance(t,e,n){return n.initialState[e]||0}sortInstanceNodePosition(){return 0}}const Ou=Aa({scrapeMotionValuesFromProps:Bu,createRenderState:Bu});let ju=0;const Iu=t=>t>.001?1/t:1e5;t.AcceleratedAnimation=Mi,t.AnimatePresence=({children:t,custom:n,initial:i=!0,onExitComplete:s,presenceAffectsLayout:o=!0,mode:r="sync",propagate:a=!1,anchorX:l="left"})=>{const[u,c]=b(a),p=e.useMemo(()=>E(t),[t]),g=a&&!u?[]:p.map(A),v=e.useRef(!0),x=e.useRef(p),w=f(()=>new Map),[P,T]=e.useState(p),[M,C]=e.useState(p);y(()=>{v.current=!1,x.current=p;for(let t=0;t<M.length;t++){const e=A(M[t]);g.includes(e)?w.delete(e):!0!==w.get(e)&&w.set(e,!1)}},[M,g.length,g.join("-")]);const V=[];if(p!==P){let t=[...p];for(let e=0;e<M.length;e++){const n=M[e],i=A(n);g.includes(i)||(t.splice(e,0,n),V.push(n))}return"wait"===r&&V.length&&(t=V),C(E(t)),T(p),null}const{forceRender:R}=e.useContext(m);return d(h,{children:M.map(t=>{const e=A(t),h=!(a&&!u)&&(p===M||g.includes(e));return d(S,{isPresent:h,initial:!(v.current&&!i)&&void 0,custom:n,presenceAffectsLayout:o,mode:r,onExitComplete:h?void 0:()=>{if(!w.has(e))return;w.set(e,!0);let t=!0;w.forEach(e=>{e||(t=!1)}),t&&(null==R||R(),C(x.current),a&&(null==c||c()),s&&s())},anchorX:l,children:t},e)})})},t.AnimateSharedLayout=({children:t})=>(i.useEffect(()=>{},[]),d(zo,{id:f(()=>"asl-"+ju++),children:t})),t.DeprecatedLayoutGroupContext=M,t.DragControls=Pu,t.FlatTree=Ui,t.LayoutGroup=zo,t.LayoutGroupContext=m,t.LazyMotion=function({children:t,features:n,strict:i=!1}){const[,s]=e.useState(!Xo(n)),o=e.useRef(void 0);if(!Xo(n)){const{renderer:t,...e}=n;o.current=t,Ho(e)}return e.useEffect(()=>{Xo(n)&&n().then(({renderer:t,...e})=>{Ho(e),o.current=t,s(!0)})},[]),d($o.Provider,{value:{renderer:o.current,strict:i},children:t})},t.MotionConfig=function({children:t,isValidProp:n,...i}){n&&_o(n),(i={...e.useContext(x),...i}).isStatic=f(()=>i.isStatic);const s=e.useMemo(()=>i,[JSON.stringify(i.transition),i.transformPagePoint,i.reducedMotion]);return d(x.Provider,{value:s,children:t})},t.MotionConfigContext=x,t.MotionContext=ia,t.MotionGlobalConfig=L,t.MotionValue=Ct,t.PresenceContext=v,t.Reorder=qa,t.SwitchLayoutGroupContext=zr,t.VisualElement=Vo,t.addPointerEvent=Pr,t.addPointerInfo=wr,t.addScaleCorrector=Ms,t.animate=vl,t.animateMini=El,t.animateValue=Si,t.animateVisualElement=ar,t.animationControls=vu,t.animations=vr,t.anticipate=Gt,t.backIn=Yt,t.backInOut=Kt,t.backOut=Xt,t.buildTransform=Bo,t.calcLength=Dt,t.cancelFrame=ot,t.circIn=_t,t.circInOut=Zt,t.circOut=qt,t.clamp=ne,t.color=Se,t.complex=Ve,t.createBox=ys,t.createRendererMotionComponent=ua,t.createScopedAnimate=yl,t.cubicBezier=zt,t.delay=Wi,t.disableInstantTransitions=function(){Wt.current=!1},t.distance=br,t.distance2D=Ar,t.domAnimation=ou,t.domMax=ru,t.domMin=au,t.easeIn=li,t.easeInOut=ci,t.easeOut=ui,t.filterProps=qo,t.findSpring=ei,t.frame=st,t.frameData=rt,t.hover=vt,t.inView=nu,t.inertia=ai,t.interpolate=mi,t.invariant=k,t.isBrowser=g,t.isDragActive=mt,t.isMotionComponent=Tu,t.isMotionValue=Ut,t.isValidMotionProp=Ko,t.keyframes=yi,t.m=iu,t.makeUseVisualState=Aa,t.mirrorEasing=$t,t.mix=Wn,t.motion=ja,t.motionValue=Vt,t.noop=R,t.optimizedAppearDataAttribute=Fi,t.pipe=Ln,t.press=Et,t.progress=F,t.px=ye,t.resolveMotionValue=zi,t.reverseEasing=Ht,t.scroll=tu,t.scrollInfo=ql,t.spring=ri,t.stagger=function(t=.1,{startDelay:e=0,from:n=0,ease:i}={}){return(s,o)=>{const r="number"==typeof n?n:function(t,e){if("first"===t)return 0;{const n=e-1;return"last"===t?n:n/2}}(n,o),a=Math.abs(r-s);let l=t*a;if(i){const e=o*t;l=pi(i)(l/e)*e}return e+l}},t.startOptimizedAppearAnimation=function(t,e,n,i,s){if(window.MotionIsMounted)return;const o=t.dataset.framerAppearId;if(!o)return;window.MotionHandoffAnimation=Vu;const r=Cu(o,e);Du||(Du=bi(t,e,[n[0],n[0]],{duration:1e4,ease:"linear"}),Eu.set(r,{animation:Du,startTime:null}),window.MotionHandoffAnimation=Vu,window.MotionHasOptimisedAnimation=(t,e)=>{if(!t)return!1;if(!e)return Mu.has(t);const n=Cu(t,e);return Boolean(Eu.get(n))},window.MotionHandoffMarkAsComplete=t=>{Mu.has(t)&&Mu.set(t,!0)},window.MotionHandoffIsComplete=t=>!0===Mu.get(t),window.MotionCancelOptimisedAnimation=(t,e,n,i)=>{const s=Cu(t,e),o=Eu.get(s);o&&(n&&void 0===i?n.postRender(()=>{n.postRender(()=>{o.animation.cancel()})}):o.animation.cancel(),n&&i?(ku.add(o),n.render(Lu)):(Eu.delete(s),Eu.size||(window.MotionCancelOptimisedAnimation=void 0)))},window.MotionCheckAppearSync=(t,e,n)=>{var i,s;const o=Oi(t);if(!o)return;const r=null===(i=window.MotionHasOptimisedAnimation)||void 0===i?void 0:i.call(window,o,e),a=null===(s=t.props.values)||void 0===s?void 0:s[e];if(!r||!a)return;const l=n.on("change",t=>{var n;a.get()!==t&&(null===(n=window.MotionCancelOptimisedAnimation)||void 0===n||n.call(window,o,e),l())});return l});const a=()=>{Du.cancel();const o=bi(t,e,n,i);void 0===Ru&&(Ru=performance.now()),o.startTime=Ru,Eu.set(r,{animation:o,startTime:Ru}),s&&s(o)};Mu.set(o,!1),Du.ready?Du.ready.then(a).catch(R):a()},t.steps=function(t,e="end"){return n=>{const i=(n="end"===e?Math.min(n,.999):Math.max(n,.001))*t,s="end"===e?Math.floor(i):Math.ceil(i);return ne(0,1,s/t)}},t.time=dt,t.transform=$a,t.unwrapMotionComponent=function(t){if(Tu(t))return t[ra]},t.useAnimate=function(){const t=f(()=>({current:null,animations:[]})),e=f(()=>yl(t));return su(()=>{t.animations.forEach(t=>t.stop())}),[t,e]},t.useAnimateMini=function(){const t=f(()=>({current:null,animations:[]})),e=f(()=>Al(t));return su(()=>{t.animations.forEach(t=>t.stop())}),[t,e]},t.useAnimation=wu,t.useAnimationControls=xu,t.useAnimationFrame=mu,t.useCycle=function(...t){const n=e.useRef(0),[i,s]=e.useState(t[n.current]);return[i,e.useCallback(e=>{n.current="number"!=typeof e?Za(0,t.length,n.current+1):e,s(t[n.current])},[t.length,...t])]},t.useDeprecatedAnimatedState=function(t){const[n,i]=e.useState(t),s=Ou({},!1),o=f(()=>new Fu({props:{onUpdate:t=>{i({...t})}},visualState:s,presenceContext:null},{initialState:t}));return e.useLayoutEffect(()=>(o.mount({}),()=>o.unmount()),[o]),[n,f(()=>t=>ar(o,t))]},t.useDeprecatedInvertedScale=function(t){let n=za(1),i=za(1);const{visualElement:s}=e.useContext(ia);return t?(n=t.scaleX||n,i=t.scaleY||i):s&&(n=s.getValue("scaleX",1),i=s.getValue("scaleY",1)),{scaleX:Xa(n,Iu),scaleY:Xa(i,Iu)}},t.useDomEvent=function(t,n,i,s){e.useEffect(()=>{const e=t.current;if(i&&e)return io(e,n,i,s)},[t,n,i,s])},t.useDragControls=function(){return f(Su)},t.useElementScroll=function(t){return hu({container:t})},t.useForceUpdate=Wo,t.useInView=function(t,{root:n,margin:i,amount:s,once:o=!1,initial:r=!1}={}){const[a,l]=e.useState(r);return e.useEffect(()=>{if(!t.current||o&&a)return;const e={root:n&&n.current||void 0,margin:i,amount:s};return nu(t.current,()=>(l(!0),o?void 0:()=>l(!1)),e)},[n,t,i,o,s]),a},t.useInstantLayoutTransition=bu,t.useInstantTransition=function(){const[t,n]=Wo(),i=bu(),s=e.useRef(-1);return e.useEffect(()=>{st.postRender(()=>st.postRender(()=>{n===s.current&&(Wt.current=!1)}))},[n]),e=>{i(()=>{Wt.current=!0,t(),e(),s.current=n+1})}},t.useIsPresent=function(){return null===(t=e.useContext(v))||t.isPresent;var t},t.useIsomorphicLayoutEffect=y,t.useMotionTemplate=function(t,...e){const n=t.length;return Ha(e.filter(Ut),(function(){let i="";for(let s=0;s<n;s++){i+=t[s];const n=e[s];n&&(i+=Ut(n)?n.get():n)}return i}))},t.useMotionValue=za,t.useMotionValueEvent=lu,t.usePresence=b,t.usePresenceData=function(){const t=e.useContext(v);return t?t.custom:void 0},t.useReducedMotion=gu,t.useReducedMotionConfig=function(){const t=gu(),{reducedMotion:n}=e.useContext(x);return"never"!==n&&("always"===n||t)},t.useResetProjection=function(){return e.useCallback(()=>{const t=oo.current;t&&t.resetTree()},[])},t.useScroll=hu,t.useSpring=function(t,n={}){const{isStatic:i}=e.useContext(x),s=e.useRef(null),o=f(()=>Ut(t)?t.get():t),r=f(()=>"string"==typeof o?o.replace(/[\d.-]/g,""):void 0),a=za(o),l=e.useRef(o),u=e.useRef(R),c=()=>{h(),s.current=Si({keyframes:[pu(a.get()),pu(l.current)],velocity:a.getVelocity(),type:"spring",restDelta:.001,restSpeed:.01,...n,onUpdate:u.current})},h=()=>{s.current&&s.current.stop()};return e.useInsertionEffect(()=>a.attach((t,e)=>i?e(t):(l.current=t,u.current=t=>e(du(t,r)),st.postRender(c),a.get()),h),[JSON.stringify(n)]),y(()=>{if(Ut(t))return t.on("change",t=>a.set(du(t,r)))},[a,r]),a},t.useTime=function(){const t=za(0);return mu(e=>t.set(e)),t},t.useTransform=Xa,t.useUnmountEffect=su,t.useVelocity=function(t){const e=za(t.getVelocity()),n=()=>{const i=t.getVelocity();e.set(i),i&&st.update(n)};return lu(t,"change",()=>{st.update(n,!1,!0)}),e},t.useViewportScroll=function(){return hu()},t.useWillChange=function(){return f(()=>new fu("auto"))},t.visualElementStore=xo,t.wrap=Za}));
|
|
1
|
+
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("react")):"function"==typeof define&&define.amd?define(["exports","react"],e):e((t="undefined"!=typeof globalThis?globalThis:t||self).Motion={},t.React)}(this,(function(t,e){"use strict";function n(t){var e=Object.create(null);return t&&Object.keys(t).forEach((function(n){if("default"!==n){var i=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,i.get?i:{enumerable:!0,get:function(){return t[n]}})}})),e.default=t,Object.freeze(e)}var i=n(e),s=React,o=Symbol.for("react.element"),r=Symbol.for("react.fragment"),a=Object.prototype.hasOwnProperty,l=s.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,u={key:!0,ref:!0,__self:!0,__source:!0};function c(t,e,n){var i,s={},r=null,c=null;for(i in void 0!==n&&(r=""+n),void 0!==e.key&&(r=""+e.key),void 0!==e.ref&&(c=e.ref),e)a.call(e,i)&&!u.hasOwnProperty(i)&&(s[i]=e[i]);if(t&&t.defaultProps)for(i in e=t.defaultProps)void 0===s[i]&&(s[i]=e[i]);return{$$typeof:o,type:t,key:r,ref:c,props:s,_owner:l.current}}const h=r,d=c,p=c,m=e.createContext({});function f(t){const n=e.useRef(null);return null===n.current&&(n.current=t()),n.current}const g="undefined"!=typeof window,y=g?e.useLayoutEffect:e.useEffect,v=e.createContext(null),x=e.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"});class w extends i.Component{getSnapshotBeforeUpdate(t){const e=this.props.childRef.current;if(e&&t.isPresent&&!this.props.isPresent){const t=e.offsetParent,n=t instanceof HTMLElement&&t.offsetWidth||0,i=this.props.sizeRef.current;i.height=e.offsetHeight||0,i.width=e.offsetWidth||0,i.top=e.offsetTop,i.left=e.offsetLeft,i.right=n-i.width-i.left}return null}componentDidUpdate(){}render(){return this.props.children}}function P({children:t,isPresent:n,anchorX:s}){const o=e.useId(),r=e.useRef(null),a=e.useRef({width:0,height:0,top:0,left:0,right:0}),{nonce:l}=e.useContext(x);return e.useInsertionEffect(()=>{const{width:t,height:e,top:i,left:u,right:c}=a.current;if(n||!r.current||!t||!e)return;const h="left"===s?"left: "+u:"right: "+c;r.current.dataset.motionPopId=o;const d=document.createElement("style");return l&&(d.nonce=l),document.head.appendChild(d),d.sheet&&d.sheet.insertRule(`\n [data-motion-pop-id="${o}"] {\n position: absolute !important;\n width: ${t}px !important;\n height: ${e}px !important;\n ${h}px !important;\n top: ${i}px !important;\n }\n `),()=>{document.head.removeChild(d)}},[n]),d(w,{isPresent:n,childRef:r,sizeRef:a,children:i.cloneElement(t,{ref:r})})}const S=({children:t,initial:n,isPresent:s,onExitComplete:o,custom:r,presenceAffectsLayout:a,mode:l,anchorX:u})=>{const c=f(T),h=e.useId(),p=e.useCallback(t=>{c.set(t,!0);for(const t of c.values())if(!t)return;o&&o()},[c,o]),m=e.useMemo(()=>({id:h,initial:n,isPresent:s,custom:r,onExitComplete:p,register:t=>(c.set(t,!1),()=>c.delete(t))}),a?[Math.random(),p]:[s,p]);return e.useMemo(()=>{c.forEach((t,e)=>c.set(e,!1))},[s]),i.useEffect(()=>{!s&&!c.size&&o&&o()},[s]),"popLayout"===l&&(t=d(P,{isPresent:s,anchorX:u,children:t})),d(v.Provider,{value:m,children:t})};function T(){return new Map}function b(t=!0){const n=e.useContext(v);if(null===n)return[!0,null];const{isPresent:i,onExitComplete:s,register:o}=n,r=e.useId();e.useEffect(()=>{if(t)return o(r)},[t]);const a=e.useCallback(()=>t&&s&&s(r),[r,s,t]);return!i&&s?[!1,a]:[!0]}const A=t=>t.key||"";function E(t){const n=[];return e.Children.forEach(t,t=>{e.isValidElement(t)&&n.push(t)}),n}const M=e.createContext(null);function C(t,e){-1===t.indexOf(e)&&t.push(e)}function V(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}const R=t=>t;let D=R,k=R;const L={skipAnimations:!1,useManualTiming:!1};function B(t){let e;return()=>(void 0===e&&(e=t()),e)}const F=(t,e,n)=>{const i=e-t;return 0===i?1:(n-t)/i};class O{constructor(){this.subscriptions=[]}add(t){return C(this.subscriptions,t),()=>V(this.subscriptions,t)}notify(t,e,n){const i=this.subscriptions.length;if(i)if(1===i)this.subscriptions[0](t,e,n);else for(let s=0;s<i;s++){const i=this.subscriptions[s];i&&i(t,e,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const j=t=>1e3*t,I=t=>t/1e3;function U(t,e){return e?t*(1e3/e):0}const W=B(()=>void 0!==window.ScrollTimeline);class N extends class{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>"finished"in t?t.finished:t))}getAll(t){return this.animations[0][t]}setAll(t,e){for(let n=0;n<this.animations.length;n++)this.animations[n][t]=e}attachTimeline(t,e){const n=this.animations.map(n=>W()&&n.attachTimeline?n.attachTimeline(t):"function"==typeof e?e(n):void 0);return()=>{n.forEach((t,e)=>{t&&t(),this.animations[e].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 e=0;e<this.animations.length;e++)t=Math.max(t,this.animations[e].duration);return t}runAll(t){this.animations.forEach(e=>e[t]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}{then(t,e){return Promise.all(this.animations).then(t).catch(e)}}function z(t,e){return t?t[e]||t.default||t:void 0}function $(t){let e=0;let n=t.next(e);for(;!n.done&&e<2e4;)e+=50,n=t.next(e);return e>=2e4?1/0:e}function H(t,e=100,n){const i=n({...t,keyframes:[0,e]}),s=Math.min($(i),2e4);return{type:"keyframes",ease:t=>i.next(s*t).value/e,duration:I(s)}}function X(t){return"function"==typeof t}function Y(t,e){t.timeline=e,t.onfinish=null}const K=t=>Array.isArray(t)&&"number"==typeof t[0],G={linearEasing:void 0};function _(t,e){const n=B(t);return()=>{var t;return null!==(t=G[e])&&void 0!==t?t:n()}}const q=_(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(t){return!1}return!0},"linearEasing"),Z=(t,e,n=10)=>{let i="";const s=Math.max(Math.round(e/n),2);for(let e=0;e<s;e++)i+=t(F(0,s-1,e))+", ";return`linear(${i.substring(0,i.length-2)})`};function J(t){return Boolean("function"==typeof t&&q()||!t||"string"==typeof t&&(t in tt||q())||K(t)||Array.isArray(t)&&t.every(J))}const Q=([t,e,n,i])=>`cubic-bezier(${t}, ${e}, ${n}, ${i})`,tt={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Q([0,.65,.55,1]),circOut:Q([.55,0,1,.45]),backIn:Q([.31,.01,.66,-.59]),backOut:Q([.33,1.53,.69,.99])};const et=["read","resolveKeyframes","update","preRender","render","postRender"],nt={value:null,addProjectionMetrics:null};function it(t,e){let n=!1,i=!0;const s={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,r=et.reduce((t,n)=>(t[n]=function(t,e){let n=new Set,i=new Set,s=!1,o=!1;const r=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1},l=0;function u(e){r.has(e)&&(c.schedule(e),t()),l++,e(a)}const c={schedule:(t,e=!1,o=!1)=>{const a=o&&s?n:i;return e&&r.add(t),a.has(t)||a.add(t),t},cancel:t=>{i.delete(t),r.delete(t)},process:t=>{a=t,s?o=!0:(s=!0,[n,i]=[i,n],n.forEach(u),e&&nt.value&&nt.value.frameloop[e].push(l),l=0,n.clear(),s=!1,o&&(o=!1,c.process(t)))}};return c}(o,e?n:void 0),t),{}),{read:a,resolveKeyframes:l,update:u,preRender:c,render:h,postRender:d}=r,p=()=>{const o=L.useManualTiming?s.timestamp:performance.now();n=!1,L.useManualTiming||(s.delta=i?1e3/60:Math.max(Math.min(o-s.timestamp,40),1)),s.timestamp=o,s.isProcessing=!0,a.process(s),l.process(s),u.process(s),c.process(s),h.process(s),d.process(s),s.isProcessing=!1,n&&e&&(i=!1,t(p))};return{schedule:et.reduce((e,o)=>{const a=r[o];return e[o]=(e,o=!1,r=!1)=>(n||(n=!0,i=!0,s.isProcessing||t(p)),a.schedule(e,o,r)),e},{}),cancel:t=>{for(let e=0;e<et.length;e++)r[et[e]].cancel(t)},state:s,steps:r}}const{schedule:st,cancel:ot,state:rt,steps:at}=it("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:R,!0),{schedule:lt,cancel:ut}=it(queueMicrotask,!1);let ct;function ht(){ct=void 0}const dt={now:()=>(void 0===ct&&dt.set(rt.isProcessing||L.useManualTiming?rt.timestamp:performance.now()),ct),set:t=>{ct=t,queueMicrotask(ht)}},pt={x:!1,y:!1};function mt(){return pt.x||pt.y}function ft(t,e,n){var i;if(t instanceof EventTarget)return[t];if("string"==typeof t){let s=document;e&&(s=e.current);const o=null!==(i=null==n?void 0:n[t])&&void 0!==i?i:s.querySelectorAll(t);return o?Array.from(o):[]}return Array.from(t)}function gt(t,e){const n=ft(t),i=new AbortController;return[n,{passive:!0,...e,signal:i.signal},()=>i.abort()]}function yt(t){return!("touch"===t.pointerType||mt())}function vt(t,e,n={}){const[i,s,o]=gt(t,n),r=t=>{if(!yt(t))return;const{target:n}=t,i=e(n,t);if("function"!=typeof i||!n)return;const o=t=>{yt(t)&&(i(t),n.removeEventListener("pointerleave",o))};n.addEventListener("pointerleave",o,s)};return i.forEach(t=>{t.addEventListener("pointerenter",r,s)}),o}const xt=(t,e)=>!!e&&(t===e||xt(t,e.parentElement)),wt=t=>"mouse"===t.pointerType?"number"!=typeof t.button||t.button<=0:!1!==t.isPrimary,Pt=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);const St=new WeakSet;function Tt(t){return e=>{"Enter"===e.key&&t(e)}}function bt(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}function At(t){return wt(t)&&!mt()}function Et(t,e,n={}){const[i,s,o]=gt(t,n),r=t=>{const i=t.currentTarget;if(!At(t)||St.has(i))return;St.add(i);const o=e(i,t),r=(t,e)=>{window.removeEventListener("pointerup",a),window.removeEventListener("pointercancel",l),At(t)&&St.has(i)&&(St.delete(i),"function"==typeof o&&o(t,{success:e}))},a=t=>{r(t,i===window||i===document||n.useGlobalTarget||xt(i,t.target))},l=t=>{r(t,!1)};window.addEventListener("pointerup",a,s),window.addEventListener("pointercancel",l,s)};return i.forEach(t=>{var e;(n.useGlobalTarget?window:t).addEventListener("pointerdown",r,s),t instanceof HTMLElement&&(t.addEventListener("focus",t=>((t,e)=>{const n=t.currentTarget;if(!n)return;const i=Tt(()=>{if(St.has(n))return;bt(n,"down");const t=Tt(()=>{bt(n,"up")});n.addEventListener("keyup",t,e),n.addEventListener("blur",()=>bt(n,"cancel"),e)});n.addEventListener("keydown",i,e),n.addEventListener("blur",()=>n.removeEventListener("keydown",i),e)})(t,s)),e=t,Pt.has(e.tagName)||-1!==e.tabIndex||null!==t.tabIndex||(t.tabIndex=0))}),o}const Mt={current:void 0};class Ct{constructor(t,e={}){this.version="12.6.3-alpha.0",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(t,e=!0)=>{const n=dt.now();this.updatedAt!==n&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(t),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),e&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=e.owner}setCurrent(t){var e;this.current=t,this.updatedAt=dt.now(),null===this.canTrackVelocity&&void 0!==t&&(this.canTrackVelocity=(e=this.current,!isNaN(parseFloat(e))))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,e){this.events[t]||(this.events[t]=new O);const n=this.events[t].add(e);return"change"===t?()=>{n(),st.read(()=>{this.events.change.getSize()||this.stop()})}:n}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,e){this.passiveEffect=t,this.stopPassiveEffect=e}set(t,e=!0){e&&this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t,e)}setWithVelocity(t,e,n){this.set(e),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-n}jump(t,e=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,e&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return Mt.current&&Mt.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const t=dt.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||t-this.updatedAt>30)return 0;const e=Math.min(this.updatedAt-this.prevUpdatedAt,30);return U(parseFloat(this.current)-parseFloat(this.prevFrameValue),e)}start(t){return this.stop(),new Promise(e=>{this.hasAnimated=!0,this.animation=t(e),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 Vt(t,e){return new Ct(t,e)}const Rt=(t,e,n)=>t+(e-t)*n;function Dt(t){return t.max-t.min}function kt(t,e,n,i=.5){t.origin=i,t.originPoint=Rt(e.min,e.max,t.origin),t.scale=Dt(n)/Dt(e),t.translate=Rt(n.min,n.max,t.origin)-t.originPoint,(t.scale>=.9999&&t.scale<=1.0001||isNaN(t.scale))&&(t.scale=1),(t.translate>=-.01&&t.translate<=.01||isNaN(t.translate))&&(t.translate=0)}function Lt(t,e,n,i){kt(t.x,e.x,n.x,i?i.originX:void 0),kt(t.y,e.y,n.y,i?i.originY:void 0)}function Bt(t,e,n){t.min=n.min+e.min,t.max=t.min+Dt(e)}function Ft(t,e,n){t.min=e.min-n.min,t.max=t.min+Dt(e)}function Ot(t,e,n){Ft(t.x,e.x,n.x),Ft(t.y,e.y,n.y)}const jt=t=>!t.isLayoutDirty&&t.willUpdate(!1);function It(){const t=new Set,e=new WeakMap,n=()=>t.forEach(jt);return{add:i=>{t.add(i),e.set(i,i.addEventListener("willUpdate",n))},remove:i=>{t.delete(i);const s=e.get(i);s&&(s(),e.delete(i)),n()},dirty:n}}const Ut=t=>Boolean(t&&t.getVelocity),Wt={current:!1},Nt=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t;function zt(t,e,n,i){if(t===e&&n===i)return R;const s=e=>function(t,e,n,i,s){let o,r,a=0;do{r=e+(n-e)/2,o=Nt(r,i,s)-t,o>0?n=r:e=r}while(Math.abs(o)>1e-7&&++a<12);return r}(e,0,1,t,n);return t=>0===t||1===t?t:Nt(s(t),e,i)}const $t=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,Ht=t=>e=>1-t(1-e),Xt=zt(.33,1.53,.69,.99),Yt=Ht(Xt),Kt=$t(Yt),Gt=t=>(t*=2)<1?.5*Yt(t):.5*(2-Math.pow(2,-10*(t-1))),_t=t=>1-Math.sin(Math.acos(t)),qt=Ht(_t),Zt=$t(_t),Jt=t=>/^0[^.\s]+$/u.test(t);const Qt=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],te=new Set(Qt),ee=new Set(["width","height","top","left","right","bottom",...Qt]),ne=(t,e,n)=>n>e?e:n<t?t:n,ie={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},se={...ie,transform:t=>ne(0,1,t)},oe={...ie,default:1},re=t=>Math.round(1e5*t)/1e5,ae=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;const le=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,ue=(t,e)=>n=>Boolean("string"==typeof n&&le.test(n)&&n.startsWith(t)||e&&!function(t){return null==t}(n)&&Object.prototype.hasOwnProperty.call(n,e)),ce=(t,e,n)=>i=>{if("string"!=typeof i)return i;const[s,o,r,a]=i.match(ae);return{[t]:parseFloat(s),[e]:parseFloat(o),[n]:parseFloat(r),alpha:void 0!==a?parseFloat(a):1}},he={...ie,transform:t=>Math.round((t=>ne(0,255,t))(t))},de={test:ue("rgb","red"),parse:ce("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:i=1})=>"rgba("+he.transform(t)+", "+he.transform(e)+", "+he.transform(n)+", "+re(se.transform(i))+")"};const pe={test:ue("#"),parse:function(t){let e="",n="",i="",s="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),i=t.substring(5,7),s=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),i=t.substring(3,4),s=t.substring(4,5),e+=e,n+=n,i+=i,s+=s),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(i,16),alpha:s?parseInt(s,16)/255:1}},transform:de.transform},me=t=>({test:e=>"string"==typeof e&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),fe=me("deg"),ge=me("%"),ye=me("px"),ve=me("vh"),xe=me("vw"),we={...ge,parse:t=>ge.parse(t)/100,transform:t=>ge.transform(100*t)},Pe={test:ue("hsl","hue"),parse:ce("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:i=1})=>"hsla("+Math.round(t)+", "+ge.transform(re(e))+", "+ge.transform(re(n))+", "+re(se.transform(i))+")"},Se={test:t=>de.test(t)||pe.test(t)||Pe.test(t),parse:t=>de.test(t)?de.parse(t):Pe.test(t)?Pe.parse(t):pe.parse(t),transform:t=>"string"==typeof t?t:t.hasOwnProperty("red")?de.transform(t):Pe.transform(t)},Te=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;const be=/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 Ae(t){const e=t.toString(),n=[],i={color:[],number:[],var:[]},s=[];let o=0;const r=e.replace(be,t=>(Se.test(t)?(i.color.push(o),s.push("color"),n.push(Se.parse(t))):t.startsWith("var(")?(i.var.push(o),s.push("var"),n.push(t)):(i.number.push(o),s.push("number"),n.push(parseFloat(t))),++o,"${}")).split("${}");return{values:n,split:r,indexes:i,types:s}}function Ee(t){return Ae(t).values}function Me(t){const{split:e,types:n}=Ae(t),i=e.length;return t=>{let s="";for(let o=0;o<i;o++)if(s+=e[o],void 0!==t[o]){const e=n[o];s+="number"===e?re(t[o]):"color"===e?Se.transform(t[o]):t[o]}return s}}const Ce=t=>"number"==typeof t?0:t;const Ve={test:function(t){var e,n;return isNaN(t)&&"string"==typeof t&&((null===(e=t.match(ae))||void 0===e?void 0:e.length)||0)+((null===(n=t.match(Te))||void 0===n?void 0:n.length)||0)>0},parse:Ee,createTransformer:Me,getAnimatableNone:function(t){const e=Ee(t);return Me(t)(e.map(Ce))}},Re=new Set(["brightness","contrast","saturate","opacity"]);function De(t){const[e,n]=t.slice(0,-1).split("(");if("drop-shadow"===e)return t;const[i]=n.match(ae)||[];if(!i)return t;const s=n.replace(i,"");let o=Re.has(e)?1:0;return i!==n&&(o*=100),e+"("+o+s+")"}const ke=/\b([a-z-]*)\(.*?\)/gu,Le={...Ve,getAnimatableNone:t=>{const e=t.match(ke);return e?e.map(De).join(" "):t}},Be={borderWidth:ye,borderTopWidth:ye,borderRightWidth:ye,borderBottomWidth:ye,borderLeftWidth:ye,borderRadius:ye,radius:ye,borderTopLeftRadius:ye,borderTopRightRadius:ye,borderBottomRightRadius:ye,borderBottomLeftRadius:ye,width:ye,maxWidth:ye,height:ye,maxHeight:ye,top:ye,right:ye,bottom:ye,left:ye,padding:ye,paddingTop:ye,paddingRight:ye,paddingBottom:ye,paddingLeft:ye,margin:ye,marginTop:ye,marginRight:ye,marginBottom:ye,marginLeft:ye,backgroundPositionX:ye,backgroundPositionY:ye},Fe={rotate:fe,rotateX:fe,rotateY:fe,rotateZ:fe,scale:oe,scaleX:oe,scaleY:oe,scaleZ:oe,skew:fe,skewX:fe,skewY:fe,distance:ye,translateX:ye,translateY:ye,translateZ:ye,x:ye,y:ye,z:ye,perspective:ye,transformPerspective:ye,opacity:se,originX:we,originY:we,originZ:ye},Oe={...ie,transform:Math.round},je={...Be,...Fe,zIndex:Oe,size:ye,fillOpacity:se,strokeOpacity:se,numOctaves:Oe},Ie={...je,color:Se,backgroundColor:Se,outlineColor:Se,fill:Se,stroke:Se,borderColor:Se,borderTopColor:Se,borderRightColor:Se,borderBottomColor:Se,borderLeftColor:Se,filter:Le,WebkitFilter:Le},Ue=t=>Ie[t];function We(t,e){let n=Ue(t);return n!==Le&&(n=Ve),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const Ne=new Set(["auto","none","0"]);const ze=t=>180*t/Math.PI,$e=t=>{const e=ze(Math.atan2(t[1],t[0]));return Xe(e)},He={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:$e,rotateZ:$e,skewX:t=>ze(Math.atan(t[1])),skewY:t=>ze(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},Xe=t=>((t%=360)<0&&(t+=360),t),Ye=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),Ke=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),Ge={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Ye,scaleY:Ke,scale:t=>(Ye(t)+Ke(t))/2,rotateX:t=>Xe(ze(Math.atan2(t[6],t[5]))),rotateY:t=>Xe(ze(Math.atan2(-t[2],t[0]))),rotateZ:$e,rotate:$e,skewX:t=>ze(Math.atan(t[4])),skewY:t=>ze(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function _e(t){return t.includes("scale")?1:0}function qe(t,e){if(!t||"none"===t)return _e(e);const n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let i,s;if(n)i=Ge,s=n;else{const e=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);i=He,s=e}if(!s)return _e(e);const o=i[e],r=s[1].split(",").map(Ze);return"function"==typeof o?o(r):r[o]}function Ze(t){return parseFloat(t.trim())}const Je=t=>t===ie||t===ye,Qe=new Set(["x","y","z"]),tn=Qt.filter(t=>!Qe.has(t));const en={width:({x:t},{paddingLeft:e="0",paddingRight:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),height:({y:t},{paddingTop:e="0",paddingBottom:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:(t,{transform:e})=>qe(e,"x"),y:(t,{transform:e})=>qe(e,"y")};en.translateX=en.x,en.translateY=en.y;const nn=new Set;let sn=!1,on=!1;function rn(){if(on){const t=Array.from(nn).filter(t=>t.needsMeasurement),e=new Set(t.map(t=>t.element)),n=new Map;e.forEach(t=>{const e=function(t){const e=[];return tn.forEach(n=>{const i=t.getValue(n);void 0!==i&&(e.push([n,i.get()]),i.set(n.startsWith("scale")?1:0))}),e}(t);e.length&&(n.set(t,e),t.render())}),t.forEach(t=>t.measureInitialState()),e.forEach(t=>{t.render();const e=n.get(t);e&&e.forEach(([e,n])=>{var i;null===(i=t.getValue(e))||void 0===i||i.set(n)})}),t.forEach(t=>t.measureEndState()),t.forEach(t=>{void 0!==t.suspendedScrollY&&window.scrollTo(0,t.suspendedScrollY)})}on=!1,sn=!1,nn.forEach(t=>t.complete()),nn.clear()}function an(){nn.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(on=!0)})}class ln{constructor(t,e,n,i,s,o=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=e,this.name=n,this.motionValue=i,this.element=s,this.isAsync=o}scheduleResolve(){this.isScheduled=!0,this.isAsync?(nn.add(this),sn||(sn=!0,st.read(an),st.resolveKeyframes(rn))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:e,element:n,motionValue:i}=this;for(let s=0;s<t.length;s++)if(null===t[s])if(0===s){const s=null==i?void 0:i.get(),o=t[t.length-1];if(void 0!==s)t[0]=s;else if(n&&e){const i=n.readValue(e,o);null!=i&&(t[0]=i)}void 0===t[0]&&(t[0]=o),i&&void 0===s&&i.set(t[0])}else t[s]=t[s-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),nn.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,nn.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const un=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),cn=t=>e=>"string"==typeof e&&e.startsWith(t),hn=cn("--"),dn=cn("var(--"),pn=t=>!!dn(t)&&mn.test(t.split("/*")[0].trim()),mn=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,fn=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function gn(t,e,n=1){const[i,s]=function(t){const e=fn.exec(t);if(!e)return[,];const[,n,i,s]=e;return["--"+(null!=n?n:i),s]}(t);if(!i)return;const o=window.getComputedStyle(e).getPropertyValue(i);if(o){const t=o.trim();return un(t)?parseFloat(t):t}return pn(s)?gn(s,e,n+1):s}const yn=t=>e=>e.test(t),vn=[ie,ye,ge,fe,xe,ve,{test:t=>"auto"===t,parse:t=>t}],xn=t=>vn.find(yn(t));class wn extends ln{constructor(t,e,n,i,s){super(t,e,n,i,s,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:e,name:n}=this;if(!e||!e.current)return;super.readKeyframes();for(let n=0;n<t.length;n++){let i=t[n];if("string"==typeof i&&(i=i.trim(),pn(i))){const s=gn(i,e.current);void 0!==s&&(t[n]=s),n===t.length-1&&(this.finalKeyframe=i)}}if(this.resolveNoneKeyframes(),!ee.has(n)||2!==t.length)return;const[i,s]=t,o=xn(i),r=xn(s);if(o!==r)if(Je(o)&&Je(r))for(let e=0;e<t.length;e++){const n=t[e];"string"==typeof n&&(t[e]=parseFloat(n))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:e}=this,n=[];for(let e=0;e<t.length;e++)("number"==typeof(i=t[e])?0===i:null===i||"none"===i||"0"===i||Jt(i))&&n.push(e);var i;n.length&&function(t,e,n){let i=0,s=void 0;for(;i<t.length&&!s;){const e=t[i];"string"==typeof e&&!Ne.has(e)&&Ae(e).values.length&&(s=t[i]),i++}if(s&&n)for(const i of e)t[i]=We(n,s)}(t,n,e)}measureInitialState(){const{element:t,unresolvedKeyframes:e,name:n}=this;if(!t||!t.current)return;"height"===n&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=en[n](t.measureViewportBox(),window.getComputedStyle(t.current)),e[0]=this.measuredOrigin;const i=e[e.length-1];void 0!==i&&t.getValue(n,i).jump(i,!1)}measureEndState(){var t;const{element:e,name:n,unresolvedKeyframes:i}=this;if(!e||!e.current)return;const s=e.getValue(n);s&&s.jump(this.measuredOrigin,!1);const o=i.length-1,r=i[o];i[o]=en[n](e.measureViewportBox(),window.getComputedStyle(e.current)),null!==r&&void 0===this.finalKeyframe&&(this.finalKeyframe=r),(null===(t=this.removedTransforms)||void 0===t?void 0:t.length)&&this.removedTransforms.forEach(([t,n])=>{e.getValue(t).set(n)}),this.resolveNoneKeyframes()}}const Pn=(t,e)=>"zIndex"!==e&&(!("number"!=typeof t&&!Array.isArray(t))||!("string"!=typeof t||!Ve.test(t)&&"0"!==t||t.startsWith("url(")));function Sn(t,e,n,i){const s=t[0];if(null===s)return!1;if("display"===e||"visibility"===e)return!0;const o=t[t.length-1],r=Pn(s,e),a=Pn(o,e);return!(!r||!a)&&(function(t){const e=t[0];if(1===t.length)return!0;for(let n=0;n<t.length;n++)if(t[n]!==e)return!0}(t)||("spring"===n||X(n))&&i)}const Tn=t=>null!==t;function bn(t,{repeat:e,repeatType:n="loop"},i){const s=t.filter(Tn),o=e&&"loop"!==n&&e%2==1?0:s.length-1;return o&&void 0!==i?i:s[o]}class An{constructor({autoplay:t=!0,delay:e=0,type:n="keyframes",repeat:i=0,repeatDelay:s=0,repeatType:o="loop",...r}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=dt.now(),this.options={autoplay:t,delay:e,type:n,repeat:i,repeatDelay:s,repeatType:o,...r},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt&&this.resolvedAt-this.createdAt>40?this.resolvedAt:this.createdAt}get resolved(){return this._resolved||this.hasAttemptedResolve||(an(),rn()),this._resolved}onKeyframesResolved(t,e){this.resolvedAt=dt.now(),this.hasAttemptedResolve=!0;const{name:n,type:i,velocity:s,delay:o,onComplete:r,onUpdate:a,isGenerator:l}=this.options;if(!l&&!Sn(t,n,i,s)){if(Wt.current||!o)return a&&a(bn(t,this.options,e)),r&&r(),void this.resolveFinishedPromise();this.options.duration=0}const u=this.initPlayback(t,e);!1!==u&&(this._resolved={keyframes:t,finalKeyframe:e,...u},this.onPostResolved())}onPostResolved(){}then(t,e){return this.currentFinishedPromise.then(t,e)}flatten(){this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear")}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}function En(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function Mn(t,e){return n=>n>0?e:t}const Cn=(t,e,n)=>{const i=t*t,s=n*(e*e-i)+i;return s<0?0:Math.sqrt(s)},Vn=[pe,de,Pe];function Rn(t){const e=(n=t,Vn.find(t=>t.test(n)));var n;if(!Boolean(e))return!1;let i=e.parse(t);return e===Pe&&(i=function({hue:t,saturation:e,lightness:n,alpha:i}){t/=360,n/=100;let s=0,o=0,r=0;if(e/=100){const i=n<.5?n*(1+e):n+e-n*e,a=2*n-i;s=En(a,i,t+1/3),o=En(a,i,t),r=En(a,i,t-1/3)}else s=o=r=n;return{red:Math.round(255*s),green:Math.round(255*o),blue:Math.round(255*r),alpha:i}}(i)),i}const Dn=(t,e)=>{const n=Rn(t),i=Rn(e);if(!n||!i)return Mn(t,e);const s={...n};return t=>(s.red=Cn(n.red,i.red,t),s.green=Cn(n.green,i.green,t),s.blue=Cn(n.blue,i.blue,t),s.alpha=Rt(n.alpha,i.alpha,t),de.transform(s))},kn=(t,e)=>n=>e(t(n)),Ln=(...t)=>t.reduce(kn),Bn=new Set(["none","hidden"]);function Fn(t,e){return n=>Rt(t,e,n)}function On(t){return"number"==typeof t?Fn:"string"==typeof t?pn(t)?Mn:Se.test(t)?Dn:Un:Array.isArray(t)?jn:"object"==typeof t?Se.test(t)?Dn:In:Mn}function jn(t,e){const n=[...t],i=n.length,s=t.map((t,n)=>On(t)(t,e[n]));return t=>{for(let e=0;e<i;e++)n[e]=s[e](t);return n}}function In(t,e){const n={...t,...e},i={};for(const s in n)void 0!==t[s]&&void 0!==e[s]&&(i[s]=On(t[s])(t[s],e[s]));return t=>{for(const e in i)n[e]=i[e](t);return n}}const Un=(t,e)=>{const n=Ve.createTransformer(e),i=Ae(t),s=Ae(e);return i.indexes.var.length===s.indexes.var.length&&i.indexes.color.length===s.indexes.color.length&&i.indexes.number.length>=s.indexes.number.length?Bn.has(t)&&!s.values.length||Bn.has(e)&&!i.values.length?function(t,e){return Bn.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}(t,e):Ln(jn(function(t,e){var n;const i=[],s={color:0,var:0,number:0};for(let o=0;o<e.values.length;o++){const r=e.types[o],a=t.indexes[r][s[r]],l=null!==(n=t.values[a])&&void 0!==n?n:0;i[o]=l,s[r]++}return i}(i,s),s.values),n):Mn(t,e)};function Wn(t,e,n){if("number"==typeof t&&"number"==typeof e&&"number"==typeof n)return Rt(t,e,n);return On(t)(t,e)}function Nn(t,e,n){const i=Math.max(e-5,0);return U(n-t(i),e-i)}const zn=100,$n=10,Hn=1,Xn=0,Yn=800,Kn=.3,Gn=.3,_n={granular:.01,default:2},qn={granular:.005,default:.5},Zn=.01,Jn=10,Qn=.05,ti=1;function ei({duration:t=Yn,bounce:e=Kn,velocity:n=Xn,mass:i=Hn}){let s,o,r=1-e;r=ne(Qn,ti,r),t=ne(Zn,Jn,I(t)),r<1?(s=e=>{const i=e*r,s=i*t;return.001-(i-n)/ni(e,r)*Math.exp(-s)},o=e=>{const i=e*r*t,o=i*n+n,a=Math.pow(r,2)*Math.pow(e,2)*t,l=Math.exp(-i),u=ni(Math.pow(e,2),r);return(.001-s(e)>0?-1:1)*((o-a)*l)/u}):(s=e=>Math.exp(-e*t)*((e-n)*t+1)-.001,o=e=>Math.exp(-e*t)*(t*t*(n-e)));const a=function(t,e,n){let i=n;for(let n=1;n<12;n++)i-=t(i)/e(i);return i}(s,o,5/t);if(t=j(t),isNaN(a))return{stiffness:zn,damping:$n,duration:t};{const e=Math.pow(a,2)*i;return{stiffness:e,damping:2*r*Math.sqrt(i*e),duration:t}}}function ni(t,e){return t*Math.sqrt(1-e*e)}const ii=["duration","bounce"],si=["stiffness","damping","mass"];function oi(t,e){return e.some(e=>void 0!==t[e])}function ri(t=Gn,e=Kn){const n="object"!=typeof t?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:i,restDelta:s}=n;const o=n.keyframes[0],r=n.keyframes[n.keyframes.length-1],a={done:!1,value:o},{stiffness:l,damping:u,mass:c,duration:h,velocity:d,isResolvedFromDuration:p}=function(t){let e={velocity:Xn,stiffness:zn,damping:$n,mass:Hn,isResolvedFromDuration:!1,...t};if(!oi(t,si)&&oi(t,ii))if(t.visualDuration){const n=t.visualDuration,i=2*Math.PI/(1.2*n),s=i*i,o=2*ne(.05,1,1-(t.bounce||0))*Math.sqrt(s);e={...e,mass:Hn,stiffness:s,damping:o}}else{const n=ei(t);e={...e,...n,mass:Hn},e.isResolvedFromDuration=!0}return e}({...n,velocity:-I(n.velocity||0)}),m=d||0,f=u/(2*Math.sqrt(l*c)),g=r-o,y=I(Math.sqrt(l/c)),v=Math.abs(g)<5;let x;if(i||(i=v?_n.granular:_n.default),s||(s=v?qn.granular:qn.default),f<1){const t=ni(y,f);x=e=>{const n=Math.exp(-f*y*e);return r-n*((m+f*y*g)/t*Math.sin(t*e)+g*Math.cos(t*e))}}else if(1===f)x=t=>r-Math.exp(-y*t)*(g+(m+y*g)*t);else{const t=y*Math.sqrt(f*f-1);x=e=>{const n=Math.exp(-f*y*e),i=Math.min(t*e,300);return r-n*((m+f*y*g)*Math.sinh(i)+t*g*Math.cosh(i))/t}}const w={calculatedDuration:p&&h||null,next:t=>{const e=x(t);if(p)a.done=t>=h;else{let n=0;f<1&&(n=0===t?j(m):Nn(x,t,e));const o=Math.abs(n)<=i,l=Math.abs(r-e)<=s;a.done=o&&l}return a.value=a.done?r:e,a},toString:()=>{const t=Math.min($(w),2e4),e=Z(e=>w.next(t*e).value,t,30);return t+"ms "+e}};return w}function ai({keyframes:t,velocity:e=0,power:n=.8,timeConstant:i=325,bounceDamping:s=10,bounceStiffness:o=500,modifyTarget:r,min:a,max:l,restDelta:u=.5,restSpeed:c}){const h=t[0],d={done:!1,value:h},p=t=>void 0===a?l:void 0===l||Math.abs(a-t)<Math.abs(l-t)?a:l;let m=n*e;const f=h+m,g=void 0===r?f:r(f);g!==f&&(m=g-h);const y=t=>-m*Math.exp(-t/i),v=t=>g+y(t),x=t=>{const e=y(t),n=v(t);d.done=Math.abs(e)<=u,d.value=d.done?g:n};let w,P;const S=t=>{var e;(e=d.value,void 0!==a&&e<a||void 0!==l&&e>l)&&(w=t,P=ri({keyframes:[d.value,p(d.value)],velocity:Nn(v,t,d.value),damping:s,stiffness:o,restDelta:u,restSpeed:c}))};return S(0),{calculatedDuration:null,next:t=>{let e=!1;return P||void 0!==w||(e=!0,x(t),S(t)),void 0!==w&&t>=w?P.next(t-w):(!e&&x(t),d)}}}const li=zt(.42,0,1,1),ui=zt(0,0,.58,1),ci=zt(.42,0,.58,1),hi=t=>Array.isArray(t)&&"number"!=typeof t[0],di={linear:R,easeIn:li,easeInOut:ci,easeOut:ui,circIn:_t,circInOut:Zt,circOut:qt,backIn:Yt,backInOut:Kt,backOut:Xt,anticipate:Gt},pi=t=>{if(K(t)){k(4===t.length);const[e,n,i,s]=t;return zt(e,n,i,s)}return"string"==typeof t?di[t]:t};function mi(t,e,{clamp:n=!0,ease:i,mixer:s}={}){const o=t.length;if(k(o===e.length),1===o)return()=>e[0];if(2===o&&e[0]===e[1])return()=>e[1];const r=t[0]===t[1];t[0]>t[o-1]&&(t=[...t].reverse(),e=[...e].reverse());const a=function(t,e,n){const i=[],s=n||Wn,o=t.length-1;for(let n=0;n<o;n++){let o=s(t[n],t[n+1]);if(e){const t=Array.isArray(e)?e[n]||R:e;o=Ln(t,o)}i.push(o)}return i}(e,i,s),l=a.length,u=n=>{if(r&&n<t[0])return e[0];let i=0;if(l>1)for(;i<t.length-2&&!(n<t[i+1]);i++);const s=F(t[i],t[i+1],n);return a[i](s)};return n?e=>u(ne(t[0],t[o-1],e)):u}function fi(t,e){const n=t[t.length-1];for(let i=1;i<=e;i++){const s=F(0,e,i);t.push(Rt(n,1,s))}}function gi(t){const e=[0];return fi(e,t.length-1),e}function yi({duration:t=300,keyframes:e,times:n,ease:i="easeInOut"}){const s=hi(i)?i.map(pi):pi(i),o={done:!1,value:e[0]},r=mi(function(t,e){return t.map(t=>t*e)}(n&&n.length===e.length?n:gi(e),t),e,{ease:Array.isArray(s)?s:(a=e,l=s,a.map(()=>l||ci).splice(0,a.length-1))});var a,l;return{calculatedDuration:t,next:e=>(o.value=r(e),o.done=e>=t,o)}}const vi=t=>{const e=({timestamp:e})=>t(e);return{start:()=>st.update(e,!0),stop:()=>ot(e),now:()=>rt.isProcessing?rt.timestamp:dt.now()}},xi={decay:ai,inertia:ai,tween:yi,keyframes:yi,spring:ri},wi=t=>t/100;class Pi extends An{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,"idle"===this.state)return;this.teardown();const{onStop:t}=this.options;t&&t()};const{name:e,motionValue:n,element:i,keyframes:s}=this.options,o=(null==i?void 0:i.KeyframeResolver)||ln;this.resolver=new o(s,(t,e)=>this.onKeyframesResolved(t,e),e,n,i),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(t){const{type:e="keyframes",repeat:n=0,repeatDelay:i=0,repeatType:s,velocity:o=0}=this.options,r=X(e)?e:xi[e]||yi;let a,l;r!==yi&&"number"!=typeof t[0]&&(a=Ln(wi,Wn(t[0],t[1])),t=[0,100]);const u=r({...this.options,keyframes:t});"mirror"===s&&(l=r({...this.options,keyframes:[...t].reverse(),velocity:-o})),null===u.calculatedDuration&&(u.calculatedDuration=$(u));const{calculatedDuration:c}=u,h=c+i;return{generator:u,mirroredGenerator:l,mapPercentToKeyframes:a,calculatedDuration:c,resolvedDuration:h,totalDuration:h*(n+1)-i}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),"paused"!==this.pendingPlayState&&t?this.state=this.pendingPlayState:this.pause()}tick(t,e=!1){const{resolved:n}=this;if(!n){const{keyframes:t}=this.options;return{done:!0,value:t[t.length-1]}}const{finalKeyframe:i,generator:s,mirroredGenerator:o,mapPercentToKeyframes:r,keyframes:a,calculatedDuration:l,totalDuration:u,resolvedDuration:c}=n;if(null===this.startTime)return s.next(0);const{delay:h,repeat:d,repeatType:p,repeatDelay:m,onUpdate:f}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-u/this.speed,this.startTime)),e?this.currentTime=t:null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const g=this.currentTime-h*(this.speed>=0?1:-1),y=this.speed>=0?g<0:g>u;this.currentTime=Math.max(g,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=u);let v=this.currentTime,x=s;if(d){const t=Math.min(this.currentTime,u)/c;let e=Math.floor(t),n=t%1;!n&&t>=1&&(n=1),1===n&&e--,e=Math.min(e,d+1);Boolean(e%2)&&("reverse"===p?(n=1-n,m&&(n-=m/c)):"mirror"===p&&(x=o)),v=ne(0,1,n)*c}const w=y?{done:!1,value:a[0]}:x.next(v);r&&(w.value=r(w.value));let{done:P}=w;y||null===l||(P=this.speed>=0?this.currentTime>=u:this.currentTime<=0);const S=null===this.holdTime&&("finished"===this.state||"running"===this.state&&P);return S&&void 0!==i&&(w.value=bn(a,this.options,i)),f&&f(w.value),S&&this.finish(),w}get duration(){const{resolved:t}=this;return t?I(t.calculatedDuration):0}get time(){return I(this.currentTime)}set time(t){t=j(t),this.currentTime=t,null!==this.holdTime||0===this.speed?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.speed)}get speed(){return this.playbackSpeed}set speed(t){const e=this.playbackSpeed!==t;this.playbackSpeed=t,e&&(this.time=I(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved)return void(this.pendingPlayState="running");if(this.isStopped)return;const{driver:t=vi,onPlay:e,startTime:n}=this.options;this.driver||(this.driver=t(t=>this.tick(t))),e&&e();const i=this.driver.now();null!==this.holdTime?this.startTime=i-this.holdTime:this.startTime?"finished"===this.state&&(this.startTime=i):this.startTime=null!=n?n:this.calcStartTime(),"finished"===this.state&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var t;this._resolved?(this.state="paused",this.holdTime=null!==(t=this.currentTime)&&void 0!==t?t:0):this.pendingPlayState="paused"}complete(){"running"!==this.state&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}cancel(){null!==this.cancelTime&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}}function Si(t){return new Pi(t)}const Ti=new Set(["opacity","clipPath","filter","transform"]);function bi(t,e,n,{delay:i=0,duration:s=300,repeat:o=0,repeatType:r="loop",ease:a="easeInOut",times:l}={}){const u={[e]:n};l&&(u.offset=l);const c=function t(e,n){return e?"function"==typeof e&&q()?Z(e,n):K(e)?Q(e):Array.isArray(e)?e.map(e=>t(e,n)||tt.easeOut):tt[e]:void 0}(a,s);Array.isArray(c)&&(u.easing=c);return t.animate(u,{delay:i,duration:s,easing:Array.isArray(c)?"linear":c,fill:"both",iterations:o+1,direction:"reverse"===r?"alternate":"normal"})}const Ai=B(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));const Ei={anticipate:Gt,backInOut:Kt,circInOut:Zt};class Mi extends An{constructor(t){super(t);const{name:e,motionValue:n,element:i,keyframes:s}=this.options;this.resolver=new wn(s,(t,e)=>this.onKeyframesResolved(t,e),e,n,i),this.resolver.scheduleResolve()}initPlayback(t,e){let{duration:n=300,times:i,ease:s,type:o,motionValue:r,name:a,startTime:l}=this.options;if(!r.owner||!r.owner.current)return!1;var u;if("string"==typeof s&&q()&&s in Ei&&(s=Ei[s]),X((u=this.options).type)||"spring"===u.type||!J(u.ease)){const{onComplete:e,onUpdate:r,motionValue:a,element:l,...u}=this.options,c=function(t,e){const n=new Pi({...e,keyframes:t,repeat:0,delay:0,isGenerator:!0});let i={done:!1,value:t[0]};const s=[];let o=0;for(;!i.done&&o<2e4;)i=n.sample(o),s.push(i.value),o+=10;return{times:void 0,keyframes:s,duration:o-10,ease:"linear"}}(t,u);1===(t=c.keyframes).length&&(t[1]=t[0]),n=c.duration,i=c.times,s=c.ease,o="keyframes"}const c=bi(r.owner.current,a,t,{...this.options,duration:n,times:i,ease:s});return c.startTime=null!=l?l:this.calcStartTime(),this.pendingTimeline?(Y(c,this.pendingTimeline),this.pendingTimeline=void 0):c.onfinish=()=>{const{onComplete:n}=this.options;r.set(bn(t,this.options,e)),n&&n(),this.cancel(),this.resolveFinishedPromise()},{animation:c,duration:n,times:i,type:o,ease:s,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:e}=t;return I(e)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:e}=t;return I(e.currentTime||0)}set time(t){const{resolved:e}=this;if(!e)return;const{animation:n}=e;n.currentTime=j(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:e}=t;return e.playbackRate}set speed(t){const{resolved:e}=this;if(!e)return;const{animation:n}=e;n.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:e}=t;return e.playState}get startTime(){const{resolved:t}=this;if(!t)return null;const{animation:e}=t;return e.startTime}attachTimeline(t){if(this._resolved){const{resolved:e}=this;if(!e)return R;const{animation:n}=e;Y(n,t)}else this.pendingTimeline=t;return R}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:e}=t;"finished"===e.playState&&this.updateFinishedPromise(),e.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:e}=t;e.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,"idle"===this.state)return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:t}=this;if(!t)return;const{animation:e,keyframes:n,duration:i,type:s,ease:o,times:r}=t;if("idle"===e.playState||"finished"===e.playState)return;if(this.time){const{motionValue:t,onUpdate:e,onComplete:a,element:l,...u}=this.options,c=new Pi({...u,keyframes:n,duration:i,type:s,ease:o,times:r,isGenerator:!0}),h=j(this.time);t.setWithVelocity(c.sample(h-10).value,c.sample(h).value,10)}const{onStop:a}=this.options;a&&a(),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:e,name:n,repeatDelay:i,repeatType:s,damping:o,type:r}=t;if(!(e&&e.owner&&e.owner.current instanceof HTMLElement))return!1;const{onUpdate:a,transformTemplate:l}=e.owner.getProps();return Ai()&&n&&Ti.has(n)&&("transform"!==n||!l)&&!a&&!i&&"mirror"!==s&&0!==o&&"inertia"!==r}}const Ci={type:"spring",stiffness:500,damping:25,restSpeed:10},Vi={type:"keyframes",duration:.8},Ri={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Di=(t,{keyframes:e})=>e.length>2?Vi:te.has(t)?t.startsWith("scale")?{type:"spring",stiffness:550,damping:0===e[1]?2*Math.sqrt(550):30,restSpeed:10}:Ci:Ri;const ki=(t,e,n,i={},s,o)=>r=>{const a=z(i,t)||{},l=a.delay||i.delay||0;let{elapsed:u=0}=i;u-=j(l);let c={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...a,delay:-u,onUpdate:t=>{e.set(t),a.onUpdate&&a.onUpdate(t)},onComplete:()=>{r(),a.onComplete&&a.onComplete()},name:t,motionValue:e,element:o?void 0:s};(function({when:t,delay:e,delayChildren:n,staggerChildren:i,staggerDirection:s,repeat:o,repeatType:r,repeatDelay:a,from:l,elapsed:u,...c}){return!!Object.keys(c).length})(a)||(c={...c,...Di(t,c)}),c.duration&&(c.duration=j(c.duration)),c.repeatDelay&&(c.repeatDelay=j(c.repeatDelay)),void 0!==c.from&&(c.keyframes[0]=c.from);let h=!1;if((!1===c.type||0===c.duration&&!c.repeatDelay)&&(c.duration=0,0===c.delay&&(h=!0)),(Wt.current||L.skipAnimations)&&(h=!0,c.duration=0,c.delay=0),c.allowFlatten=!a.type&&!a.ease,h&&!o&&void 0!==e.get()){const t=bn(c.keyframes,a);if(void 0!==t)return st.update(()=>{c.onUpdate(t),c.onComplete()}),new N([])}return!o&&Mi.supports(c)?new Mi(c):new Pi(c)};function Li(t,e,n){const i=Ut(t)?t:Vt(t);return i.start(ki("",i,e,n)),i.animation}const Bi=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Fi="data-"+Bi("framerAppearId");function Oi(t){return t.props[Fi]}function ji(t){return t instanceof SVGElement&&"svg"!==t.tagName}const Ii=(t,e)=>t.depth-e.depth;class Ui{constructor(){this.children=[],this.isDirty=!1}add(t){C(this.children,t),this.isDirty=!0}remove(t){V(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(Ii),this.isDirty=!1,this.children.forEach(t)}}function Wi(t,e){const n=dt.now(),i=({timestamp:s})=>{const o=s-n;o>=e&&(ot(i),t(o-e))};return st.read(i,!0),()=>ot(i)}const Ni=t=>Array.isArray(t);function zi(t){const e=Ut(t)?t.get():t;return n=e,Boolean(n&&"object"==typeof n&&n.mix&&n.toValue)?e.toValue():e;var n}const $i=["TopLeft","TopRight","BottomLeft","BottomRight"],Hi=$i.length,Xi=t=>"string"==typeof t?parseFloat(t):t,Yi=t=>"number"==typeof t||ye.test(t);function Ki(t,e){return void 0!==t[e]?t[e]:t.borderRadius}const Gi=qi(0,.5,qt),_i=qi(.5,.95,R);function qi(t,e,n){return i=>i<t?0:i>e?1:n(F(t,e,i))}function Zi(t,e){t.min=e.min,t.max=e.max}function Ji(t,e){Zi(t.x,e.x),Zi(t.y,e.y)}function Qi(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}function ts(t){return void 0===t||1===t}function es({scale:t,scaleX:e,scaleY:n}){return!ts(t)||!ts(e)||!ts(n)}function ns(t){return es(t)||is(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function is(t){return ss(t.x)||ss(t.y)}function ss(t){return t&&"0%"!==t}function os(t,e,n){return n+e*(t-n)}function rs(t,e,n,i,s){return void 0!==s&&(t=os(t,s,i)),os(t,n,i)+e}function as(t,e=0,n=1,i,s){t.min=rs(t.min,e,n,i,s),t.max=rs(t.max,e,n,i,s)}function ls(t,{x:e,y:n}){as(t.x,e.translate,e.scale,e.originPoint),as(t.y,n.translate,n.scale,n.originPoint)}function us(t,e){t.min=t.min+e,t.max=t.max+e}function cs(t,e,n,i,s=.5){as(t,e,n,Rt(t.min,t.max,s),i)}function hs(t,e){cs(t.x,e.x,e.scaleX,e.scale,e.originX),cs(t.y,e.y,e.scaleY,e.scale,e.originY)}function ds(t,e,n,i,s){return t=os(t-=e,1/n,i),void 0!==s&&(t=os(t,1/s,i)),t}function ps(t,e,[n,i,s],o,r){!function(t,e=0,n=1,i=.5,s,o=t,r=t){if(ge.test(e)){e=parseFloat(e);e=Rt(r.min,r.max,e/100)-r.min}if("number"!=typeof e)return;let a=Rt(o.min,o.max,i);t===o&&(a-=e),t.min=ds(t.min,e,n,a,s),t.max=ds(t.max,e,n,a,s)}(t,e[n],e[i],e[s],e.scale,o,r)}const ms=["x","scaleX","originX"],fs=["y","scaleY","originY"];function gs(t,e,n,i){ps(t.x,e,ms,n?n.x:void 0,i?i.x:void 0),ps(t.y,e,fs,n?n.y:void 0,i?i.y:void 0)}const ys=()=>({x:{min:0,max:0},y:{min:0,max:0}});function vs(t){return 0===t.translate&&1===t.scale}function xs(t){return vs(t.x)&&vs(t.y)}function ws(t,e){return t.min===e.min&&t.max===e.max}function Ps(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function Ss(t,e){return Ps(t.x,e.x)&&Ps(t.y,e.y)}function Ts(t){return Dt(t.x)/Dt(t.y)}function bs(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}class As{constructor(){this.members=[]}add(t){C(this.members,t),t.scheduleRender()}remove(t){if(V(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const t=this.members[this.members.length-1];t&&this.promote(t)}}relegate(t){const e=this.members.findIndex(e=>t===e);if(0===e)return!1;let n;for(let t=e;t>=0;t--){const e=this.members[t];if(!1!==e.isPresent){n=e;break}}return!!n&&(this.promote(n),!0)}promote(t,e){const n=this.lead;if(t!==n&&(this.prevLead=n,this.lead=t,t.show(),n)){n.instance&&n.scheduleRender(),t.scheduleRender(),t.resumeFrom=n,e&&(t.resumeFrom.preserveOpacity=!0),n.snapshot&&(t.snapshot=n.snapshot,t.snapshot.latestValues=n.animationValues||n.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:i}=t.options;!1===i&&n.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:e,resumingFrom:n}=t;e.onExitComplete&&e.onExitComplete(),n&&n.options.onExitComplete&&n.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}const Es={};function Ms(t){for(const e in t)Es[e]=t[e],hn(e)&&(Es[e].isCSSVariable=!0)}function Cs(t){return[t("x"),t("y")]}const Vs={hasAnimatedSinceResize:!0,hasEverUpdated:!1},Rs=["","X","Y","Z"],Ds={visibility:"hidden"};let ks=0;function Ls(t,e,n,i){const{latestValues:s}=e;s[t]&&(n[t]=s[t],e.setStaticValue(t,0),i&&(i[t]=0))}function Bs({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:i,resetTransform:s}){return class{constructor(t={},n=(null==e?void 0:e())){this.id=ks++,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(js),this.nodes.forEach(Hs),this.nodes.forEach(Xs),this.nodes.forEach(Is)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=t,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let t=0;t<this.path.length;t++)this.path[t].shouldResetTransform=!0;this.root===this&&(this.nodes=new Ui)}addEventListener(t,e){return this.eventHandlers.has(t)||this.eventHandlers.set(t,new O),this.eventHandlers.get(t).add(e)}notifyListeners(t,...e){const n=this.eventHandlers.get(t);n&&n.notify(...e)}hasListeners(t){return this.eventHandlers.has(t)}mount(e,n=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=ji(e),this.instance=e;const{layoutId:i,layout:s,visualElement:o}=this.options;if(o&&!o.current&&o.mount(e),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),n&&(s||i)&&(this.isLayoutDirty=!0),t){let n;const i=()=>this.root.updateBlockedByResize=!1;t(e,()=>{this.root.updateBlockedByResize=!0,n&&n(),n=Wi(i,250),Vs.hasAnimatedSinceResize&&(Vs.hasAnimatedSinceResize=!1,this.nodes.forEach($s))})}i&&this.root.registerSharedNode(i,this),!1!==this.options.animate&&o&&(i||s)&&this.addEventListener("didUpdate",({delta:t,hasLayoutChanged:e,hasRelativeLayoutChanged:n,layout:i})=>{if(this.isTreeAnimationBlocked())return this.target=void 0,void(this.relativeTarget=void 0);const s=this.options.transition||o.getDefaultTransition()||Zs,{onLayoutAnimationStart:r,onLayoutAnimationComplete:a}=o.getProps(),l=!this.targetLayout||!Ss(this.targetLayout,i),u=!e&&n;if(this.options.layoutRoot||this.resumeFrom||u||e&&(l||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(t,u);const e={...z(s,"layout"),onPlay:r,onComplete:a};(o.shouldReduceMotion||this.options.layoutRoot)&&(e.delay=0,e.type=!1),this.startAnimation(e)}else e||$s(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=i})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const t=this.getStack();t&&t.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,ot(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(Ys),this.animationId++)}getTransformTemplate(){const{visualElement:t}=this.options;return t&&t.getProps().transformTemplate}willUpdate(t=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked())return void(this.options.onExitComplete&&this.options.onExitComplete());if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&function t(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:n}=e.options;if(!n)return;const i=Oi(n);if(window.MotionHasOptimisedAnimation(i,"transform")){const{layout:t,layoutId:n}=e.options;window.MotionCancelOptimisedAnimation(i,"transform",st,!(t||n))}const{parent:s}=e;s&&!s.hasCheckedOptimisedAppear&&t(s)}(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let t=0;t<this.path.length;t++){const e=this.path[t];e.shouldResetTransform=!0,e.updateScroll("snapshot"),e.options.layoutRoot&&e.willUpdate(!1)}const{layoutId:e,layout:n}=this.options;if(void 0===e&&!n)return;const i=this.getTransformTemplate();this.prevTransformTemplateValue=i?i(this.latestValues,""):void 0,this.updateSnapshot(),t&&this.notifyListeners("willUpdate")}update(){this.updateScheduled=!1;if(this.isUpdateBlocked())return this.unblockUpdate(),this.clearAllSnapshots(),void this.nodes.forEach(Ws);this.isUpdating||this.nodes.forEach(Ns),this.isUpdating=!1,this.nodes.forEach(zs),this.nodes.forEach(Fs),this.nodes.forEach(Os),this.clearAllSnapshots();const t=dt.now();rt.delta=ne(0,1e3/60,t-rt.timestamp),rt.timestamp=t,rt.isProcessing=!0,at.update.process(rt),at.preRender.process(rt),at.render.process(rt),rt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,lt.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(Us),this.sharedNodes.forEach(Ks)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,st.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){st.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure(),!this.snapshot||Dt(this.snapshot.measuredBox.x)||Dt(this.snapshot.measuredBox.y)||(this.snapshot=void 0))}updateLayout(){if(!this.instance)return;if(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead()||this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let t=0;t<this.path.length;t++){this.path[t].updateScroll()}const t=this.layout;this.layout=this.measure(!1),this.layoutCorrected={x:{min:0,max:0},y:{min:0,max:0}},this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:e}=this.options;e&&e.notify("LayoutMeasure",this.layout.layoutBox,t?t.layoutBox:void 0)}updateScroll(t="measure"){let e=Boolean(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===t&&(e=!1),e){const e=i(this.instance);this.scroll={animationId:this.root.animationId,phase:t,isRoot:e,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:e}}}resetTransform(){if(!s)return;const t=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,e=this.projectionDelta&&!xs(this.projectionDelta),n=this.getTransformTemplate(),i=n?n(this.latestValues,""):void 0,o=i!==this.prevTransformTemplateValue;t&&(e||ns(this.latestValues)||o)&&(s(this.instance,i),this.shouldResetTransform=!1,this.scheduleRender())}measure(t=!0){const e=this.measurePageBox();let n=this.removeElementScroll(e);var i;return t&&(n=this.removeTransform(n)),to((i=n).x),to(i.y),{animationId:this.root.animationId,measuredBox:e,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){var t;const{visualElement:e}=this.options;if(!e)return{x:{min:0,max:0},y:{min:0,max:0}};const n=e.measureViewportBox();if(!((null===(t=this.scroll)||void 0===t?void 0:t.wasRoot)||this.path.some(no))){const{scroll:t}=this.root;t&&(us(n.x,t.offset.x),us(n.y,t.offset.y))}return n}removeElementScroll(t){var e;const n={x:{min:0,max:0},y:{min:0,max:0}};if(Ji(n,t),null===(e=this.scroll)||void 0===e?void 0:e.wasRoot)return n;for(let e=0;e<this.path.length;e++){const i=this.path[e],{scroll:s,options:o}=i;i!==this.root&&s&&o.layoutScroll&&(s.wasRoot&&Ji(n,t),us(n.x,s.offset.x),us(n.y,s.offset.y))}return n}applyTransform(t,e=!1){const n={x:{min:0,max:0},y:{min:0,max:0}};Ji(n,t);for(let t=0;t<this.path.length;t++){const i=this.path[t];!e&&i.options.layoutScroll&&i.scroll&&i!==i.root&&hs(n,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),ns(i.latestValues)&&hs(n,i.latestValues)}return ns(this.latestValues)&&hs(n,this.latestValues),n}removeTransform(t){const e={x:{min:0,max:0},y:{min:0,max:0}};Ji(e,t);for(let t=0;t<this.path.length;t++){const n=this.path[t];if(!n.instance)continue;if(!ns(n.latestValues))continue;es(n.latestValues)&&n.updateSnapshot();const i={x:{min:0,max:0},y:{min:0,max:0}};Ji(i,n.measurePageBox()),gs(e,n.latestValues,n.snapshot?n.snapshot.layoutBox:void 0,i)}return ns(this.latestValues)&&gs(e,this.latestValues),e}setTargetDelta(t){this.targetDelta=t,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(t){this.options={...this.options,...t,crossfade:void 0===t.crossfade||t.crossfade}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==rt.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(t=!1){var e;const n=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=n.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=n.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=n.isSharedProjectionDirty);const i=Boolean(this.resumingFrom)||this!==n;if(!(t||i&&this.isSharedProjectionDirty||this.isProjectionDirty||(null===(e=this.parent)||void 0===e?void 0:e.isProjectionDirty)||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:s,layoutId:o}=this.options;if(this.layout&&(s||o)){if(this.resolvedRelativeTargetAt=rt.timestamp,!this.targetDelta&&!this.relativeTarget){const t=this.getClosestProjectingParent();t&&t.layout&&1!==this.animationProgress?(this.relativeParent=t,this.forceRelativeParentToResolveTarget(),this.relativeTarget={x:{min:0,max:0},y:{min:0,max:0}},this.relativeTargetOrigin={x:{min:0,max:0},y:{min:0,max:0}},Ot(this.relativeTargetOrigin,this.layout.layoutBox,t.layout.layoutBox),Ji(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}var r,a,l;if(this.relativeTarget||this.targetDelta)if(this.target||(this.target={x:{min:0,max:0},y:{min:0,max:0}},this.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}}),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),r=this.target,a=this.relativeTarget,l=this.relativeParent.target,Bt(r.x,a.x,l.x),Bt(r.y,a.y,l.y)):this.targetDelta?(Boolean(this.resumingFrom)?this.target=this.applyTransform(this.layout.layoutBox):Ji(this.target,this.layout.layoutBox),ls(this.target,this.targetDelta)):Ji(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const t=this.getClosestProjectingParent();t&&Boolean(t.resumingFrom)===Boolean(this.resumingFrom)&&!t.options.layoutScroll&&t.target&&1!==this.animationProgress?(this.relativeParent=t,this.forceRelativeParentToResolveTarget(),this.relativeTarget={x:{min:0,max:0},y:{min:0,max:0}},this.relativeTargetOrigin={x:{min:0,max:0},y:{min:0,max:0}},Ot(this.relativeTargetOrigin,this.target,t.target),Ji(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(this.parent&&!es(this.parent.latestValues)&&!is(this.parent.latestValues))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return Boolean((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var t;const e=this.getLead(),n=Boolean(this.resumingFrom)||this!==e;let i=!0;if((this.isProjectionDirty||(null===(t=this.parent)||void 0===t?void 0:t.isProjectionDirty))&&(i=!1),n&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(i=!1),this.resolvedRelativeTargetAt===rt.timestamp&&(i=!1),i)return;const{layout:s,layoutId:o}=this.options;if(this.isTreeAnimating=Boolean(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!s&&!o)return;Ji(this.layoutCorrected,this.layout.layoutBox);const r=this.treeScale.x,a=this.treeScale.y;!function(t,e,n,i=!1){const s=n.length;if(!s)return;let o,r;e.x=e.y=1;for(let a=0;a<s;a++){o=n[a],r=o.projectionDelta;const{visualElement:s}=o.options;s&&s.props.style&&"contents"===s.props.style.display||(i&&o.options.layoutScroll&&o.scroll&&o!==o.root&&hs(t,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),r&&(e.x*=r.x.scale,e.y*=r.y.scale,ls(t,r)),i&&ns(o.latestValues)&&hs(t,o.latestValues))}e.x<1.0000000000001&&e.x>.999999999999&&(e.x=1),e.y<1.0000000000001&&e.y>.999999999999&&(e.y=1)}(this.layoutCorrected,this.treeScale,this.path,n),!e.layout||e.target||1===this.treeScale.x&&1===this.treeScale.y||(e.target=e.layout.layoutBox,e.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}});const{target:l}=e;l?(this.projectionDelta&&this.prevProjectionDelta?(Qi(this.prevProjectionDelta.x,this.projectionDelta.x),Qi(this.prevProjectionDelta.y,this.projectionDelta.y)):this.createProjectionDeltas(),Lt(this.projectionDelta,this.layoutCorrected,l,this.latestValues),this.treeScale.x===r&&this.treeScale.y===a&&bs(this.projectionDelta.x,this.prevProjectionDelta.x)&&bs(this.projectionDelta.y,this.prevProjectionDelta.y)||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",l))):this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender())}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(t=!0){var e;if(null===(e=this.options.visualElement)||void 0===e||e.scheduleRender(),t){const t=this.getStack();t&&t.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDeltaWithTransform={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}}}setAnimationOrigin(t,e=!1){const n=this.snapshot,i=n?n.latestValues:{},s={...this.latestValues},o={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!e;const r={x:{min:0,max:0},y:{min:0,max:0}},a=(n?n.source:void 0)!==(this.layout?this.layout.source:void 0),l=this.getStack(),u=!l||l.members.length<=1,c=Boolean(a&&!u&&!0===this.options.crossfade&&!this.path.some(qs));let h;this.animationProgress=0,this.mixTargetDelta=e=>{const n=e/1e3;var l,d;Gs(o.x,t.x,n),Gs(o.y,t.y,n),this.setTargetDelta(o),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Ot(r,this.layout.layoutBox,this.relativeParent.layout.layoutBox),function(t,e,n,i){_s(t.x,e.x,n.x,i),_s(t.y,e.y,n.y,i)}(this.relativeTarget,this.relativeTargetOrigin,r,n),h&&(l=this.relativeTarget,d=h,ws(l.x,d.x)&&ws(l.y,d.y))&&(this.isProjectionDirty=!1),h||(h={x:{min:0,max:0},y:{min:0,max:0}}),Ji(h,this.relativeTarget)),a&&(this.animationValues=s,function(t,e,n,i,s,o){s?(t.opacity=Rt(0,void 0!==n.opacity?n.opacity:1,Gi(i)),t.opacityExit=Rt(void 0!==e.opacity?e.opacity:1,0,_i(i))):o&&(t.opacity=Rt(void 0!==e.opacity?e.opacity:1,void 0!==n.opacity?n.opacity:1,i));for(let s=0;s<Hi;s++){const o=`border${$i[s]}Radius`;let r=Ki(e,o),a=Ki(n,o);if(void 0===r&&void 0===a)continue;r||(r=0),a||(a=0);0===r||0===a||Yi(r)===Yi(a)?(t[o]=Math.max(Rt(Xi(r),Xi(a),i),0),(ge.test(a)||ge.test(r))&&(t[o]+="%")):t[o]=a}(e.rotate||n.rotate)&&(t.rotate=Rt(e.rotate||0,n.rotate||0,i))}(s,i,this.latestValues,n,c,u)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(t){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(ot(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=st.update(()=>{Vs.hasAnimatedSinceResize=!0,this.currentAnimation=Li(0,1e3,{...t,onUpdate:e=>{this.mixTargetDelta(e),t.onUpdate&&t.onUpdate(e)},onStop:()=>{},onComplete:()=>{t.onComplete&&t.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 t=this.getStack();t&&t.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const t=this.getLead();let{targetWithTransforms:e,target:n,layout:i,latestValues:s}=t;if(e&&n&&i){if(this!==t&&this.layout&&i&&eo(this.options.animationType,this.layout.layoutBox,i.layoutBox)){n=this.target||{x:{min:0,max:0},y:{min:0,max:0}};const e=Dt(this.layout.layoutBox.x);n.x.min=t.target.x.min,n.x.max=n.x.min+e;const i=Dt(this.layout.layoutBox.y);n.y.min=t.target.y.min,n.y.max=n.y.min+i}Ji(e,n),hs(e,s),Lt(this.projectionDeltaWithTransform,this.layoutCorrected,e,s)}}registerSharedNode(t,e){this.sharedNodes.has(t)||this.sharedNodes.set(t,new As);this.sharedNodes.get(t).add(e);const n=e.options.initialPromotionConfig;e.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(e):void 0})}isLead(){const t=this.getStack();return!t||t.lead===this}getLead(){var t;const{layoutId:e}=this.options;return e&&(null===(t=this.getStack())||void 0===t?void 0:t.lead)||this}getPrevLead(){var t;const{layoutId:e}=this.options;return e?null===(t=this.getStack())||void 0===t?void 0:t.prevLead:void 0}getStack(){const{layoutId:t}=this.options;if(t)return this.root.sharedNodes.get(t)}promote({needsReset:t,transition:e,preserveFollowOpacity:n}={}){const i=this.getStack();i&&i.promote(this,n),t&&(this.projectionDelta=void 0,this.needsReset=!0),e&&this.setOptions({transition:e})}relegate(){const t=this.getStack();return!!t&&t.relegate(this)}resetSkewAndRotation(){const{visualElement:t}=this.options;if(!t)return;let e=!1;const{latestValues:n}=t;if((n.z||n.rotate||n.rotateX||n.rotateY||n.rotateZ||n.skewX||n.skewY)&&(e=!0),!e)return;const i={};n.z&&Ls("z",t,i,this.animationValues);for(let e=0;e<Rs.length;e++)Ls("rotate"+Rs[e],t,i,this.animationValues),Ls("skew"+Rs[e],t,i,this.animationValues);t.render();for(const e in i)t.setStaticValue(e,i[e]),this.animationValues&&(this.animationValues[e]=i[e]);t.scheduleRender()}getProjectionStyles(t){var e,n;if(!this.instance||this.isSVG)return;if(!this.isVisible)return Ds;const i={visibility:""},s=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,i.opacity="",i.pointerEvents=zi(null==t?void 0:t.pointerEvents)||"",i.transform=s?s(this.latestValues,""):"none",i;const o=this.getLead();if(!this.projectionDelta||!this.layout||!o.target){const e={};return this.options.layoutId&&(e.opacity=void 0!==this.latestValues.opacity?this.latestValues.opacity:1,e.pointerEvents=zi(null==t?void 0:t.pointerEvents)||""),this.hasProjected&&!ns(this.latestValues)&&(e.transform=s?s({},""):"none",this.hasProjected=!1),e}const r=o.animationValues||o.latestValues;this.applyTransformsToTarget(),i.transform=function(t,e,n){let i="";const s=t.x.translate/e.x,o=t.y.translate/e.y,r=(null==n?void 0:n.z)||0;if((s||o||r)&&(i=`translate3d(${s}px, ${o}px, ${r}px) `),1===e.x&&1===e.y||(i+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:t,rotate:e,rotateX:s,rotateY:o,skewX:r,skewY:a}=n;t&&(i=`perspective(${t}px) ${i}`),e&&(i+=`rotate(${e}deg) `),s&&(i+=`rotateX(${s}deg) `),o&&(i+=`rotateY(${o}deg) `),r&&(i+=`skewX(${r}deg) `),a&&(i+=`skewY(${a}deg) `)}const a=t.x.scale*e.x,l=t.y.scale*e.y;return 1===a&&1===l||(i+=`scale(${a}, ${l})`),i||"none"}(this.projectionDeltaWithTransform,this.treeScale,r),s&&(i.transform=s(r,i.transform));const{x:a,y:l}=this.projectionDelta;i.transformOrigin=`${100*a.origin}% ${100*l.origin}% 0`,o.animationValues?i.opacity=o===this?null!==(n=null!==(e=r.opacity)&&void 0!==e?e:this.latestValues.opacity)&&void 0!==n?n:1:this.preserveOpacity?this.latestValues.opacity:r.opacityExit:i.opacity=o===this?void 0!==r.opacity?r.opacity:"":void 0!==r.opacityExit?r.opacityExit:0;for(const t in Es){if(void 0===r[t])continue;const{correct:e,applyTo:n,isCSSVariable:s}=Es[t],a="none"===i.transform?r[t]:e(r[t],o);if(n){const t=n.length;for(let e=0;e<t;e++)i[n[e]]=a}else s?this.options.visualElement.renderState.vars[t]=a:i[t]=a}return this.options.layoutId&&(i.pointerEvents=o===this?zi(null==t?void 0:t.pointerEvents)||"":"none"),i}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(t=>{var e;return null===(e=t.currentAnimation)||void 0===e?void 0:e.stop()}),this.root.nodes.forEach(Ws),this.root.sharedNodes.clear()}}}function Fs(t){t.updateLayout()}function Os(t){var e;const n=(null===(e=t.resumeFrom)||void 0===e?void 0:e.snapshot)||t.snapshot;if(t.isLead()&&t.layout&&n&&t.hasListeners("didUpdate")){const{layoutBox:e,measuredBox:i}=t.layout,{animationType:s}=t.options,o=n.source!==t.layout.source;"size"===s?Cs(t=>{const i=o?n.measuredBox[t]:n.layoutBox[t],s=Dt(i);i.min=e[t].min,i.max=i.min+s}):eo(s,n.layoutBox,e)&&Cs(i=>{const s=o?n.measuredBox[i]:n.layoutBox[i],r=Dt(e[i]);s.max=s.min+r,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[i].max=t.relativeTarget[i].min+r)});const r={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};Lt(r,e,n.layoutBox);const a={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};o?Lt(a,t.applyTransform(i,!0),n.measuredBox):Lt(a,e,n.layoutBox);const l=!xs(r);let u=!1;if(!t.resumeFrom){const i=t.getClosestProjectingParent();if(i&&!i.resumeFrom){const{snapshot:s,layout:o}=i;if(s&&o){const r={x:{min:0,max:0},y:{min:0,max:0}};Ot(r,n.layoutBox,s.layoutBox);const a={x:{min:0,max:0},y:{min:0,max:0}};Ot(a,e,o.layoutBox),Ss(r,a)||(u=!0),i.options.layoutRoot&&(t.relativeTarget=a,t.relativeTargetOrigin=r,t.relativeParent=i)}}}t.notifyListeners("didUpdate",{layout:e,snapshot:n,delta:a,layoutDelta:r,hasLayoutChanged:l,hasRelativeLayoutChanged:u})}else if(t.isLead()){const{onExitComplete:e}=t.options;e&&e()}t.options.transition=void 0}function js(t){t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=Boolean(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function Is(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function Us(t){t.clearSnapshot()}function Ws(t){t.clearMeasurements()}function Ns(t){t.isLayoutDirty=!1}function zs(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function $s(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function Hs(t){t.resolveTargetDelta()}function Xs(t){t.calcProjection()}function Ys(t){t.resetSkewAndRotation()}function Ks(t){t.removeLeadSnapshot()}function Gs(t,e,n){t.translate=Rt(e.translate,0,n),t.scale=Rt(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function _s(t,e,n,i){t.min=Rt(e.min,n.min,i),t.max=Rt(e.max,n.max,i)}function qs(t){return t.animationValues&&void 0!==t.animationValues.opacityExit}const Zs={duration:.45,ease:[.4,0,.1,1]},Js=t=>"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),Qs=Js("applewebkit/")&&!Js("chrome/")?Math.round:R;function to(t){t.min=Qs(t.min),t.max=Qs(t.max)}function eo(t,e,n){return"position"===t||"preserve-aspect"===t&&(i=Ts(e),s=Ts(n),o=.2,!(Math.abs(i-s)<=o));var i,s,o}function no(t){var e;return t!==t.root&&(null===(e=t.scroll)||void 0===e?void 0:e.wasRoot)}function io(t,e,n,i={passive:!0}){return t.addEventListener(e,n,i),()=>t.removeEventListener(e,n)}const so=Bs({attachResizeListener:(t,e)=>io(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),oo={current:void 0},ro=Bs({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!oo.current){const t=new so({});t.mount(window),t.setOptions({layoutScroll:!0}),oo.current=t}return oo.current},resetTransform:(t,e)=>{t.style.transform=void 0!==e?e:"none"},checkIsScrollRoot:t=>Boolean("fixed"===window.getComputedStyle(t).position)});function ao(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const lo={correct:(t,e)=>{if(!e.target)return t;if("string"==typeof t){if(!ye.test(t))return t;t=parseFloat(t)}return`${ao(t,e.target.x)}% ${ao(t,e.target.y)}%`}},uo={correct:(t,{treeScale:e,projectionDelta:n})=>{const i=t,s=Ve.parse(t);if(s.length>5)return i;const o=Ve.createTransformer(t),r="number"!=typeof s[0]?1:0,a=n.x.scale*e.x,l=n.y.scale*e.y;s[0+r]/=a,s[1+r]/=l;const u=Rt(a,l,.5);return"number"==typeof s[2+r]&&(s[2+r]/=u),"number"==typeof s[3+r]&&(s[3+r]/=u),o(s)}};function co({top:t,left:e,right:n,bottom:i}){return{x:{min:e,max:n},y:{min:t,max:i}}}function ho(t,e){return co(function(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),i=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:i.y,right:i.x}}(t.getBoundingClientRect(),e))}const po={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"]},mo={};for(const t in po)mo[t]={isEnabled:e=>po[t].some(t=>!!e[t])};const fo={current:null},go={current:!1};function yo(){if(go.current=!0,g)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>fo.current=t.matches;t.addListener(e),e()}else fo.current=!1}const vo=[...vn,Se,Ve],xo=new WeakMap;function wo(t){return null!==t&&"object"==typeof t&&"function"==typeof t.start}function Po(t){return"string"==typeof t||Array.isArray(t)}const So=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],To=["initial",...So];function bo(t){return wo(t.animate)||To.some(e=>Po(t[e]))}function Ao(t){return Boolean(bo(t)||t.variants)}function Eo(t){const e=[{},{}];return null==t||t.values.forEach((t,n)=>{e[0][n]=t.get(),e[1][n]=t.getVelocity()}),e}function Mo(t,e,n,i){if("function"==typeof e){const[s,o]=Eo(i);e=e(void 0!==n?n:t.custom,s,o)}if("string"==typeof e&&(e=t.variants&&t.variants[e]),"function"==typeof e){const[s,o]=Eo(i);e=e(void 0!==n?n:t.custom,s,o)}return e}const Co=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Vo{scrapeMotionValuesFromProps(t,e,n){return{}}constructor({parent:t,props:e,presenceContext:n,reducedMotionConfig:i,blockInitialAnimation:s,visualState:o},r={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=ln,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 t=dt.now();this.renderScheduledAt<t&&(this.renderScheduledAt=t,st.render(this.render,!1,!0))};const{latestValues:a,renderState:l,onUpdate:u}=o;this.onUpdate=u,this.latestValues=a,this.baseTarget={...a},this.initialValues=e.initial?{...a}:{},this.renderState=l,this.parent=t,this.props=e,this.presenceContext=n,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.options=r,this.blockInitialAnimation=Boolean(s),this.isControllingVariants=bo(e),this.isVariantNode=Ao(e),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(t&&t.current);const{willChange:c,...h}=this.scrapeMotionValuesFromProps(e,{},this);for(const t in h){const e=h[t];void 0!==a[t]&&Ut(e)&&e.set(a[t],!1)}}mount(t){this.current=t,xo.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((t,e)=>this.bindToMotionValue(e,t)),go.current||yo(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||fo.current),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),ot(this.notifyUpdate),ot(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 e=this.features[t];e&&(e.unmount(),e.isMounted=!1)}this.current=null}bindToMotionValue(t,e){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const n=te.has(t);n&&this.onBindTransform&&this.onBindTransform();const i=e.on("change",e=>{this.latestValues[t]=e,this.props.onUpdate&&st.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0)}),s=e.on("renderRequest",this.scheduleRender);let o;window.MotionCheckAppearSync&&(o=window.MotionCheckAppearSync(this,t,e)),this.valueSubscriptions.set(t,()=>{i(),s(),o&&o(),e.owner&&e.stop()})}sortNodePosition(t){return this.current&&this.sortInstanceNodePosition&&this.type===t.type?this.sortInstanceNodePosition(this.current,t.current):0}updateFeatures(){let t="animation";for(t in mo){const e=mo[t];if(!e)continue;const{isEnabled:n,Feature:i}=e;if(!this.features[t]&&i&&n(this.props)&&(this.features[t]=new i(this)),this.features[t]){const e=this.features[t];e.isMounted?e.update():(e.mount(),e.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):{x:{min:0,max:0},y:{min:0,max:0}}}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,e){this.latestValues[t]=e}update(t,e){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=e;for(let e=0;e<Co.length;e++){const n=Co[e];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);const i=t["on"+n];i&&(this.propEventSubscriptions[n]=this.on(n,i))}this.prevMotionValues=function(t,e,n){for(const i in e){const s=e[i],o=n[i];if(Ut(s))t.addValue(i,s);else if(Ut(o))t.addValue(i,Vt(s,{owner:t}));else if(o!==s)if(t.hasValue(i)){const e=t.getValue(i);!0===e.liveStyle?e.jump(s):e.hasAnimated||e.set(s)}else{const e=t.getStaticValue(i);t.addValue(i,Vt(void 0!==e?e:s,{owner:t}))}}for(const i in n)void 0===e[i]&&t.removeValue(i);return e}(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 e=this.getClosestVariantNode();if(e)return e.variantChildren&&e.variantChildren.add(t),()=>e.variantChildren.delete(t)}addValue(t,e){const n=this.values.get(t);e!==n&&(n&&this.removeValue(t),this.bindToMotionValue(t,e),this.values.set(t,e),this.latestValues[t]=e.get())}removeValue(t){this.values.delete(t);const e=this.valueSubscriptions.get(t);e&&(e(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,e){if(this.props.values&&this.props.values[t])return this.props.values[t];let n=this.values.get(t);return void 0===n&&void 0!==e&&(n=Vt(null===e?void 0:e,{owner:this}),this.addValue(t,n)),n}readValue(t,e){var n;let i=void 0===this.latestValues[t]&&this.current?null!==(n=this.getBaseTargetFromProps(this.props,t))&&void 0!==n?n:this.readValueFromInstance(this.current,t,this.options):this.latestValues[t];var s;return null!=i&&("string"==typeof i&&(un(i)||Jt(i))?i=parseFloat(i):(s=i,!vo.find(yn(s))&&Ve.test(e)&&(i=We(t,e))),this.setBaseTarget(t,Ut(i)?i.get():i)),Ut(i)?i.get():i}setBaseTarget(t,e){this.baseTarget[t]=e}getBaseTarget(t){var e;const{initial:n}=this.props;let i;if("string"==typeof n||"object"==typeof n){const s=Mo(this.props,n,null===(e=this.presenceContext)||void 0===e?void 0:e.custom);s&&(i=s[t])}if(n&&void 0!==i)return i;const s=this.getBaseTargetFromProps(this.props,t);return void 0===s||Ut(s)?void 0!==this.initialValues[t]&&void 0===i?void 0:this.baseTarget[t]:s}on(t,e){return this.events[t]||(this.events[t]=new O),this.events[t].add(e)}notify(t,...e){this.events[t]&&this.events[t].notify(...e)}}class Ro extends Vo{constructor(){super(...arguments),this.KeyframeResolver=wn}sortInstanceNodePosition(t,e){return 2&t.compareDocumentPosition(e)?1:-1}getBaseTargetFromProps(t,e){return t.style?t.style[e]:void 0}removeValueFromRenderState(t,{vars:e,style:n}){delete e[t],delete n[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;Ut(t)&&(this.childSubscription=t.on("change",t=>{this.current&&(this.current.textContent=""+t)}))}}const Do=(t,e)=>e&&"number"==typeof t?e.transform(t):t,ko={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Lo=Qt.length;function Bo(t,e,n){let i="",s=!0;for(let o=0;o<Lo;o++){const r=Qt[o],a=t[r];if(void 0===a)continue;let l=!0;if(l="number"==typeof a?a===(r.startsWith("scale")?1:0):0===parseFloat(a),!l||n){const t=Do(a,je[r]);if(!l){s=!1;i+=`${ko[r]||r}(${t}) `}n&&(e[r]=t)}}return i=i.trim(),n?i=n(e,s?"":i):s&&(i="none"),i}function Fo(t,e,n){const{style:i,vars:s,transformOrigin:o}=t;let r=!1,a=!1;for(const t in e){const n=e[t];if(te.has(t))r=!0;else if(hn(t))s[t]=n;else{const e=Do(n,je[t]);t.startsWith("origin")?(a=!0,o[t]=e):i[t]=e}}if(e.transform||(r||n?i.transform=Bo(e,t.transform,n):i.transform&&(i.transform="none")),a){const{originX:t="50%",originY:e="50%",originZ:n=0}=o;i.transformOrigin=`${t} ${e} ${n}`}}function Oo(t,{style:e,vars:n},i,s){Object.assign(t.style,e,s&&s.getProjectionStyles(i));for(const e in n)t.style.setProperty(e,n[e])}function jo(t,{layout:e,layoutId:n}){return te.has(t)||t.startsWith("origin")||(e||void 0!==n)&&(!!Es[t]||"opacity"===t)}function Io(t,e,n){var i;const{style:s}=t,o={};for(const r in s)(Ut(s[r])||e.style&&Ut(e.style[r])||jo(r,t)||void 0!==(null===(i=null==n?void 0:n.getValue(r))||void 0===i?void 0:i.liveStyle))&&(o[r]=s[r]);return o}class Uo extends Ro{constructor(){super(...arguments),this.type="html",this.renderInstance=Oo}readValueFromInstance(t,e){if(te.has(e))return((t,e)=>{const{transform:n="none"}=getComputedStyle(t);return qe(n,e)})(t,e);{const i=(n=t,window.getComputedStyle(n)),s=(hn(e)?i.getPropertyValue(e):i[e])||0;return"string"==typeof s?s.trim():s}var n}measureInstanceViewportBox(t,{transformPagePoint:e}){return ho(t,e)}build(t,e,n){Fo(t,e,n.transformTemplate)}scrapeMotionValuesFromProps(t,e,n){return Io(t,e,n)}}function Wo(){const t=function(){const t=e.useRef(!1);return y(()=>(t.current=!0,()=>{t.current=!1}),[]),t}(),[n,i]=e.useState(0),s=e.useCallback(()=>{t.current&&i(n+1)},[n]);return[e.useCallback(()=>st.postRender(s),[s]),n]}const No=t=>!0===t,zo=({children:t,id:n,inherit:i=!0})=>{const s=e.useContext(m),o=e.useContext(M),[r,a]=Wo(),l=e.useRef(null),u=s.id||o;null===l.current&&((t=>No(!0===t)||"id"===t)(i)&&u&&(n=n?u+"-"+n:u),l.current={id:n,group:No(i)&&s.group||It()});const c=e.useMemo(()=>({...l.current,forceRender:r}),[a]);return d(m.Provider,{value:c,children:t})},$o=e.createContext({strict:!1});function Ho(t){for(const e in t)mo[e]={...mo[e],...t[e]}}function Xo(t){return"function"==typeof t}const Yo=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 Ko(t){return t.startsWith("while")||t.startsWith("drag")&&"draggable"!==t||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||Yo.has(t)}let Go=t=>!Ko(t);function _o(t){t&&(Go=e=>e.startsWith("on")?!Ko(e):t(e))}try{_o(require("@emotion/is-prop-valid").default)}catch(t){}function qo(t,e,n){const i={};for(const s in t)"values"===s&&"object"==typeof t.values||(Go(s)||!0===n&&Ko(s)||!e&&!Ko(s)||t.draggable&&s.startsWith("onDrag"))&&(i[s]=t[s]);return i}const Zo=e.createContext(null);function Jo(t){if("undefined"==typeof Proxy)return t;const e=new Map;return new Proxy((...e)=>t(...e),{get:(n,i)=>"create"===i?t:(e.has(i)||e.set(i,t(i)),e.get(i))})}function Qo(t,e,n){const i=t.getProps();return Mo(i,e,void 0!==n?n:i.custom,t)}function tr(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,Vt(n))}function er(t,e){const n=Qo(t,e);let{transitionEnd:i={},transition:s={},...o}=n||{};o={...o,...i};for(const e in o){tr(t,e,(r=o[e],Ni(r)?r[r.length-1]||0:r))}var r}function nr(t,e){const n=t.getValue("willChange");if(i=n,Boolean(Ut(i)&&i.add))return n.add(e);if(!n&&L.WillChange){const n=new L.WillChange("auto");t.addValue("willChange",n),n.add(e)}var i}function ir({protectedKeys:t,needsAnimating:e},n){const i=t.hasOwnProperty(n)&&!0!==e[n];return e[n]=!1,i}function sr(t,e,{delay:n=0,transitionOverride:i,type:s}={}){var o;let{transition:r=t.getDefaultTransition(),transitionEnd:a,...l}=e;i&&(r=i);const u=[],c=s&&t.animationState&&t.animationState.getState()[s];for(const e in l){const i=t.getValue(e,null!==(o=t.latestValues[e])&&void 0!==o?o:null),s=l[e];if(void 0===s||c&&ir(c,e))continue;const a={delay:n,...z(r||{},e)};let h=!1;if(window.MotionHandoffAnimation){const n=Oi(t);if(n){const t=window.MotionHandoffAnimation(n,e,st);null!==t&&(a.startTime=t,h=!0)}}nr(t,e),i.start(ki(e,i,s,t.shouldReduceMotion&&ee.has(e)?{type:!1}:a,t,h));const d=i.animation;d&&u.push(d)}return a&&Promise.all(u).then(()=>{st.update(()=>{a&&er(t,a)})}),u}function or(t,e,n={}){var i;const s=Qo(t,e,"exit"===n.type?null===(i=t.presenceContext)||void 0===i?void 0:i.custom:void 0);let{transition:o=t.getDefaultTransition()||{}}=s||{};n.transitionOverride&&(o=n.transitionOverride);const r=s?()=>Promise.all(sr(t,s,n)):()=>Promise.resolve(),a=t.variantChildren&&t.variantChildren.size?(i=0)=>{const{delayChildren:s=0,staggerChildren:r,staggerDirection:a}=o;return function(t,e,n=0,i=0,s=1,o){const r=[],a=(t.variantChildren.size-1)*i,l=1===s?(t=0)=>t*i:(t=0)=>a-t*i;return Array.from(t.variantChildren).sort(rr).forEach((t,i)=>{t.notify("AnimationStart",e),r.push(or(t,e,{...o,delay:n+l(i)}).then(()=>t.notify("AnimationComplete",e)))}),Promise.all(r)}(t,e,s+i,r,a,n)}:()=>Promise.resolve(),{when:l}=o;if(l){const[t,e]="beforeChildren"===l?[r,a]:[a,r];return t().then(()=>e())}return Promise.all([r(),a(n.delay)])}function rr(t,e){return t.sortNodePosition(e)}function ar(t,e,n={}){let i;if(t.notify("AnimationStart",e),Array.isArray(e)){const s=e.map(e=>or(t,e,n));i=Promise.all(s)}else if("string"==typeof e)i=or(t,e,n);else{const s="function"==typeof e?Qo(t,e,n.custom):e;i=Promise.all(sr(t,s,n))}return i.then(()=>{t.notify("AnimationComplete",e)})}function lr(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let i=0;i<n;i++)if(e[i]!==t[i])return!1;return!0}const ur=To.length;const cr=[...So].reverse(),hr=So.length;function dr(t){let e=function(t){return e=>Promise.all(e.map(({animation:e,options:n})=>ar(t,e,n)))}(t),n=fr(),i=!0;const s=e=>(n,i)=>{var s;const o=Qo(t,i,"exit"===e?null===(s=t.presenceContext)||void 0===s?void 0:s.custom:void 0);if(o){const{transition:t,transitionEnd:e,...i}=o;n={...n,...i,...e}}return n};function o(o){const{props:r}=t,a=function t(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent&&t(e.parent)||{};return void 0!==e.props.initial&&(n.initial=e.props.initial),n}const n={};for(let t=0;t<ur;t++){const i=To[t],s=e.props[i];(Po(s)||!1===s)&&(n[i]=s)}return n}(t.parent)||{},l=[],u=new Set;let c={},h=1/0;for(let e=0;e<hr;e++){const d=cr[e],p=n[d],m=void 0!==r[d]?r[d]:a[d],f=Po(m),g=d===o?p.isActive:null;!1===g&&(h=e);let y=m===a[d]&&m!==r[d]&&f;if(y&&i&&t.manuallyAnimateOnMount&&(y=!1),p.protectedKeys={...c},!p.isActive&&null===g||!m&&!p.prevProp||wo(m)||"boolean"==typeof m)continue;const v=pr(p.prevProp,m);let x=v||d===o&&p.isActive&&!y&&f||e>h&&f,w=!1;const P=Array.isArray(m)?m:[m];let S=P.reduce(s(d),{});!1===g&&(S={});const{prevResolvedValues:T={}}=p,b={...T,...S},A=e=>{x=!0,u.has(e)&&(w=!0,u.delete(e)),p.needsAnimating[e]=!0;const n=t.getValue(e);n&&(n.liveStyle=!1)};for(const t in b){const e=S[t],n=T[t];if(c.hasOwnProperty(t))continue;let i=!1;i=Ni(e)&&Ni(n)?!lr(e,n):e!==n,i?null!=e?A(t):u.add(t):void 0!==e&&u.has(t)?A(t):p.protectedKeys[t]=!0}p.prevProp=m,p.prevResolvedValues=S,p.isActive&&(c={...c,...S}),i&&t.blockInitialAnimation&&(x=!1);const E=!(y&&v)||w;x&&E&&l.push(...P.map(t=>({animation:t,options:{type:d}})))}if(u.size){const e={};if("boolean"!=typeof r.initial){const n=Qo(t,Array.isArray(r.initial)?r.initial[0]:r.initial);n&&n.transition&&(e.transition=n.transition)}u.forEach(n=>{const i=t.getBaseTarget(n),s=t.getValue(n);s&&(s.liveStyle=!0),e[n]=null!=i?i:null}),l.push({animation:e})}let d=Boolean(l.length);return!i||!1!==r.initial&&r.initial!==r.animate||t.manuallyAnimateOnMount||(d=!1),i=!1,d?e(l):Promise.resolve()}return{animateChanges:o,setActive:function(e,i){var s;if(n[e].isActive===i)return Promise.resolve();null===(s=t.variantChildren)||void 0===s||s.forEach(t=>{var n;return null===(n=t.animationState)||void 0===n?void 0:n.setActive(e,i)}),n[e].isActive=i;const r=o(e);for(const t in n)n[t].protectedKeys={};return r},setAnimateFunction:function(n){e=n(t)},getState:()=>n,reset:()=>{n=fr(),i=!0}}}function pr(t,e){return"string"==typeof e?e!==t:!!Array.isArray(e)&&!lr(e,t)}function mr(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function fr(){return{animate:mr(!0),whileInView:mr(),whileHover:mr(),whileTap:mr(),whileDrag:mr(),whileFocus:mr(),exit:mr()}}class gr{constructor(t){this.isMounted=!1,this.node=t}update(){}}let yr=0;const vr={animation:{Feature:class extends gr{constructor(t){super(t),t.animationState||(t.animationState=dr(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();wo(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:e}=this.node.prevProps||{};t!==e&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),null===(t=this.unmountControls)||void 0===t||t.call(this)}}},exit:{Feature:class extends gr{constructor(){super(...arguments),this.id=yr++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:e}=this.node.presenceContext,{isPresent:n}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===n)return;const i=this.node.animationState.setActive("exit",!t);e&&!t&&i.then(()=>{e(this.id)})}mount(){const{register:t,onExitComplete:e}=this.node.presenceContext||{};e&&e(this.id),t&&(this.unmount=t(this.id))}unmount(){}}}};function xr(t){return{point:{x:t.pageX,y:t.pageY}}}const wr=t=>e=>wt(e)&&t(e,xr(e));function Pr(t,e,n,i){return io(t,e,wr(n),i)}const Sr=({current:t})=>t?t.ownerDocument.defaultView:null;function Tr(t){return t&&"object"==typeof t&&Object.prototype.hasOwnProperty.call(t,"current")}const br=(t,e)=>Math.abs(t-e);function Ar(t,e){const n=br(t.x,e.x),i=br(t.y,e.y);return Math.sqrt(n**2+i**2)}class Er{constructor(t,e,{transformPagePoint:n,contextWindow:i,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 t=Vr(this.lastMoveEventInfo,this.history),e=null!==this.startEvent,n=Ar(t.offset,{x:0,y:0})>=3;if(!e&&!n)return;const{point:i}=t,{timestamp:s}=rt;this.history.push({...i,timestamp:s});const{onStart:o,onMove:r}=this.handlers;e||(o&&o(this.lastMoveEvent,t),this.startEvent=this.lastMoveEvent),r&&r(this.lastMoveEvent,t)},this.handlePointerMove=(t,e)=>{this.lastMoveEvent=t,this.lastMoveEventInfo=Mr(e,this.transformPagePoint),st.update(this.updatePoint,!0)},this.handlePointerUp=(t,e)=>{this.end();const{onEnd:n,onSessionEnd:i,resumeAnimation:s}=this.handlers;if(this.dragSnapToOrigin&&s&&s(),!this.lastMoveEvent||!this.lastMoveEventInfo)return;const o=Vr("pointercancel"===t.type?this.lastMoveEventInfo:Mr(e,this.transformPagePoint),this.history);this.startEvent&&n&&n(t,o),i&&i(t,o)},!wt(t))return;this.dragSnapToOrigin=s,this.handlers=e,this.transformPagePoint=n,this.contextWindow=i||window;const o=Mr(xr(t),this.transformPagePoint),{point:r}=o,{timestamp:a}=rt;this.history=[{...r,timestamp:a}];const{onSessionStart:l}=e;l&&l(t,Vr(o,this.history)),this.removeListeners=Ln(Pr(this.contextWindow,"pointermove",this.handlePointerMove),Pr(this.contextWindow,"pointerup",this.handlePointerUp),Pr(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),ot(this.updatePoint)}}function Mr(t,e){return e?{point:e(t.point)}:t}function Cr(t,e){return{x:t.x-e.x,y:t.y-e.y}}function Vr({point:t},e){return{point:t,delta:Cr(t,Dr(e)),offset:Cr(t,Rr(e)),velocity:kr(e,.1)}}function Rr(t){return t[0]}function Dr(t){return t[t.length-1]}function kr(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,i=null;const s=Dr(t);for(;n>=0&&(i=t[n],!(s.timestamp-i.timestamp>j(e)));)n--;if(!i)return{x:0,y:0};const o=I(s.timestamp-i.timestamp);if(0===o)return{x:0,y:0};const r={x:(s.x-i.x)/o,y:(s.y-i.y)/o};return r.x===1/0&&(r.x=0),r.y===1/0&&(r.y=0),r}function Lr(t,e,n){return{min:void 0!==e?t.min+e:void 0,max:void 0!==n?t.max+n-(t.max-t.min):void 0}}function Br(t,e){let n=e.min-t.min,i=e.max-t.max;return e.max-e.min<t.max-t.min&&([n,i]=[i,n]),{min:n,max:i}}const Fr=.35;function Or(t,e,n){return{min:jr(t,e),max:jr(t,n)}}function jr(t,e){return"number"==typeof t?t:t[e]||0}const Ir=new WeakMap;class Ur{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={x:{min:0,max:0},y:{min:0,max:0}},this.visualElement=t}start(t,{snapToCursor:e=!1}={}){const{presenceContext:n}=this.visualElement;if(n&&!1===n.isPresent)return;const{dragSnapToOrigin:i}=this.getProps();this.panSession=new Er(t,{onSessionStart:t=>{const{dragSnapToOrigin:n}=this.getProps();n?this.pauseAnimation():this.stopAnimation(),e&&this.snapToCursor(xr(t).point)},onStart:(t,e)=>{const{drag:n,dragPropagation:i,onDragStart:s}=this.getProps();if(n&&!i&&(this.openDragLock&&this.openDragLock(),this.openDragLock="x"===(o=n)||"y"===o?pt[o]?null:(pt[o]=!0,()=>{pt[o]=!1}):pt.x||pt.y?null:(pt.x=pt.y=!0,()=>{pt.x=pt.y=!1}),!this.openDragLock))return;var o;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Cs(t=>{let e=this.getAxisMotionValue(t).get()||0;if(ge.test(e)){const{projection:n}=this.visualElement;if(n&&n.layout){const i=n.layout.layoutBox[t];if(i){e=Dt(i)*(parseFloat(e)/100)}}}this.originPoint[t]=e}),s&&st.postRender(()=>s(t,e)),nr(this.visualElement,"transform");const{animationState:r}=this.visualElement;r&&r.setActive("whileDrag",!0)},onMove:(t,e)=>{const{dragPropagation:n,dragDirectionLock:i,onDirectionLock:s,onDrag:o}=this.getProps();if(!n&&!this.openDragLock)return;const{offset:r}=e;if(i&&null===this.currentDirection)return this.currentDirection=function(t,e=10){let n=null;Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x");return n}(r),void(null!==this.currentDirection&&s&&s(this.currentDirection));this.updateAxis("x",e.point,r),this.updateAxis("y",e.point,r),this.visualElement.render(),o&&o(t,e)},onSessionEnd:(t,e)=>this.stop(t,e),resumeAnimation:()=>Cs(t=>{var e;return"paused"===this.getAnimationState(t)&&(null===(e=this.getAxisMotionValue(t).animation)||void 0===e?void 0:e.play())})},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:i,contextWindow:Sr(this.visualElement)})}stop(t,e){const n=this.isDragging;if(this.cancel(),!n)return;const{velocity:i}=e;this.startAnimation(i);const{onDragEnd:s}=this.getProps();s&&st.postRender(()=>s(t,e))}cancel(){this.isDragging=!1;const{projection:t,animationState:e}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:n}=this.getProps();!n&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),e&&e.setActive("whileDrag",!1)}updateAxis(t,e,n){const{drag:i}=this.getProps();if(!n||!Wr(t,i,this.currentDirection))return;const s=this.getAxisMotionValue(t);let o=this.originPoint[t]+n[t];this.constraints&&this.constraints[t]&&(o=function(t,{min:e,max:n},i){return void 0!==e&&t<e?t=i?Rt(e,t,i.min):Math.max(t,e):void 0!==n&&t>n&&(t=i?Rt(n,t,i.max):Math.min(t,n)),t}(o,this.constraints[t],this.elastic[t])),s.set(o)}resolveConstraints(){var t;const{dragConstraints:e,dragElastic:n}=this.getProps(),i=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):null===(t=this.visualElement.projection)||void 0===t?void 0:t.layout,s=this.constraints;e&&Tr(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!e||!i)&&function(t,{top:e,left:n,bottom:i,right:s}){return{x:Lr(t.x,n,s),y:Lr(t.y,e,i)}}(i.layoutBox,e),this.elastic=function(t=Fr){return!1===t?t=0:!0===t&&(t=Fr),{x:Or(t,"left","right"),y:Or(t,"top","bottom")}}(n),s!==this.constraints&&i&&this.constraints&&!this.hasMutatedConstraints&&Cs(t=>{!1!==this.constraints&&this.getAxisMotionValue(t)&&(this.constraints[t]=function(t,e){const n={};return void 0!==e.min&&(n.min=e.min-t.min),void 0!==e.max&&(n.max=e.max-t.min),n}(i.layoutBox[t],this.constraints[t]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:e}=this.getProps();if(!t||!Tr(t))return!1;const n=t.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const s=function(t,e,n){const i=ho(t,n),{scroll:s}=e;return s&&(us(i.x,s.offset.x),us(i.y,s.offset.y)),i}(n,i.root,this.visualElement.getTransformPagePoint());let o=function(t,e){return{x:Br(t.x,e.x),y:Br(t.y,e.y)}}(i.layout.layoutBox,s);if(e){const t=e(function({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}(o));this.hasMutatedConstraints=!!t,t&&(o=co(t))}return o}startAnimation(t){const{drag:e,dragMomentum:n,dragElastic:i,dragTransition:s,dragSnapToOrigin:o,onDragTransitionEnd:r}=this.getProps(),a=this.constraints||{},l=Cs(r=>{if(!Wr(r,e,this.currentDirection))return;let l=a&&a[r]||{};o&&(l={min:0,max:0});const u=i?200:1e6,c=i?40:1e7,h={type:"inertia",velocity:n?t[r]:0,bounceStiffness:u,bounceDamping:c,timeConstant:750,restDelta:1,restSpeed:10,...s,...l};return this.startAxisValueAnimation(r,h)});return Promise.all(l).then(r)}startAxisValueAnimation(t,e){const n=this.getAxisMotionValue(t);return nr(this.visualElement,t),n.start(ki(t,n,0,e,this.visualElement,!1))}stopAnimation(){Cs(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){Cs(t=>{var e;return null===(e=this.getAxisMotionValue(t).animation)||void 0===e?void 0:e.pause()})}getAnimationState(t){var e;return null===(e=this.getAxisMotionValue(t).animation)||void 0===e?void 0:e.state}getAxisMotionValue(t){const e="_drag"+t.toUpperCase(),n=this.visualElement.getProps(),i=n[e];return i||this.visualElement.getValue(t,(n.initial?n.initial[t]:void 0)||0)}snapToCursor(t){Cs(e=>{const{drag:n}=this.getProps();if(!Wr(e,n,this.currentDirection))return;const{projection:i}=this.visualElement,s=this.getAxisMotionValue(e);if(i&&i.layout){const{min:n,max:o}=i.layout.layoutBox[e];s.set(t[e]-Rt(n,o,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:e}=this.getProps(),{projection:n}=this.visualElement;if(!Tr(e)||!n||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};Cs(t=>{const e=this.getAxisMotionValue(t);if(e&&!1!==this.constraints){const n=e.get();i[t]=function(t,e){let n=.5;const i=Dt(t),s=Dt(e);return s>i?n=F(e.min,e.max-i,t.min):i>s&&(n=F(t.min,t.max-s,e.min)),ne(0,1,n)}({min:n,max:n},this.constraints[t])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.resolveConstraints(),Cs(e=>{if(!Wr(e,t,null))return;const n=this.getAxisMotionValue(e),{min:s,max:o}=this.constraints[e];n.set(Rt(s,o,i[e]))})}addListeners(){if(!this.visualElement.current)return;Ir.set(this.visualElement,this);const t=Pr(this.visualElement.current,"pointerdown",t=>{const{drag:e,dragListener:n=!0}=this.getProps();e&&n&&this.start(t)}),e=()=>{const{dragConstraints:t}=this.getProps();Tr(t)&&t.current&&(this.constraints=this.resolveRefConstraints())},{projection:n}=this.visualElement,i=n.addEventListener("measure",e);n&&!n.layout&&(n.root&&n.root.updateScroll(),n.updateLayout()),st.read(e);const s=io(window,"resize",()=>this.scalePositionWithinConstraints()),o=n.addEventListener("didUpdate",({delta:t,hasLayoutChanged:e})=>{this.isDragging&&e&&(Cs(e=>{const n=this.getAxisMotionValue(e);n&&(this.originPoint[e]+=t[e].translate,n.set(n.get()+t[e].translate))}),this.visualElement.render())});return()=>{s(),t(),i(),o&&o()}}getProps(){const t=this.visualElement.getProps(),{drag:e=!1,dragDirectionLock:n=!1,dragPropagation:i=!1,dragConstraints:s=!1,dragElastic:o=Fr,dragMomentum:r=!0}=t;return{...t,drag:e,dragDirectionLock:n,dragPropagation:i,dragConstraints:s,dragElastic:o,dragMomentum:r}}}function Wr(t,e,n){return!(!0!==e&&e!==t||null!==n&&n!==t)}const Nr=t=>(e,n)=>{t&&st.postRender(()=>t(e,n))};const zr=e.createContext({});class $r extends e.Component{componentDidMount(){const{visualElement:t,layoutGroup:e,switchLayoutGroup:n,layoutId:i}=this.props,{projection:s}=t;Ms(Xr),s&&(e.group&&e.group.add(s),n&&n.register&&i&&n.register(s),s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,onExitComplete:()=>this.safeToRemove()})),Vs.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:e,visualElement:n,drag:i,isPresent:s}=this.props,o=n.projection;return o?(o.isPresent=s,i||t.layoutDependency!==e||void 0===e||t.isPresent!==s?o.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?o.promote():o.relegate()||st.postRender(()=>{const t=o.getStack();t&&t.members.length||this.safeToRemove()})),null):null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),lt.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:e,switchLayoutGroup:n}=this.props,{projection:i}=t;i&&(i.scheduleCheckAfterUnmount(),e&&e.group&&e.group.remove(i),n&&n.deregister&&n.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function Hr(t){const[n,i]=b(),s=e.useContext(m);return d($r,{...t,layoutGroup:s,switchLayoutGroup:e.useContext(zr),isPresent:n,safeToRemove:i})}const Xr={borderRadius:{...lo,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:lo,borderTopRightRadius:lo,borderBottomLeftRadius:lo,borderBottomRightRadius:lo,boxShadow:uo},Yr={pan:{Feature:class extends gr{constructor(){super(...arguments),this.removePointerDownListener=R}onPointerDown(t){this.session=new Er(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Sr(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:e,onPan:n,onPanEnd:i}=this.node.getProps();return{onSessionStart:Nr(t),onStart:Nr(e),onMove:n,onEnd:(t,e)=>{delete this.session,i&&st.postRender(()=>i(t,e))}}}mount(){this.removePointerDownListener=Pr(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}},drag:{Feature:class extends gr{constructor(t){super(t),this.removeGroupControls=R,this.removeListeners=R,this.controls=new Ur(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||R}unmount(){this.removeGroupControls(),this.removeListeners()}},ProjectionNode:ro,MeasureLayout:Hr}};function Kr(t,e,n){const{props:i}=t;t.animationState&&i.whileHover&&t.animationState.setActive("whileHover","Start"===n);const s=i["onHover"+n];s&&st.postRender(()=>s(e,xr(e)))}function Gr(t,e,n){const{props:i}=t;if(t.current instanceof HTMLButtonElement&&t.current.disabled)return;t.animationState&&i.whileTap&&t.animationState.setActive("whileTap","Start"===n);const s=i["onTap"+("End"===n?"":n)];s&&st.postRender(()=>s(e,xr(e)))}const _r=new WeakMap,qr=new WeakMap,Zr=t=>{const e=_r.get(t.target);e&&e(t)},Jr=t=>{t.forEach(Zr)};function Qr(t,e,n){const i=function({root:t,...e}){const n=t||document;qr.has(n)||qr.set(n,{});const i=qr.get(n),s=JSON.stringify(e);return i[s]||(i[s]=new IntersectionObserver(Jr,{root:t,...e})),i[s]}(e);return _r.set(t,n),i.observe(t),()=>{_r.delete(t),i.unobserve(t)}}const ta={some:0,all:1};const ea={inView:{Feature:class extends gr{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:e,margin:n,amount:i="some",once:s}=t,o={root:e?e.current:void 0,rootMargin:n,threshold:"number"==typeof i?i:ta[i]};return Qr(this.node.current,o,t=>{const{isIntersecting:e}=t;if(this.isInView===e)return;if(this.isInView=e,s&&!e&&this.hasEnteredView)return;e&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",e);const{onViewportEnter:n,onViewportLeave:i}=this.node.getProps(),o=e?n:i;o&&o(t)})}mount(){this.startObserver()}update(){if("undefined"==typeof IntersectionObserver)return;const{props:t,prevProps:e}=this.node;["amount","margin","root"].some(function({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}(t,e))&&this.startObserver()}unmount(){}}},tap:{Feature:class extends gr{mount(){const{current:t}=this.node;t&&(this.unmount=Et(t,(t,e)=>(Gr(this.node,e,"Start"),(t,{success:e})=>Gr(this.node,t,e?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}},focus:{Feature:class extends gr{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch(e){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=Ln(io(this.node.current,"focus",()=>this.onFocus()),io(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}},hover:{Feature:class extends gr{mount(){const{current:t}=this.node;t&&(this.unmount=vt(t,(t,e)=>(Kr(this.node,e,"Start"),t=>Kr(this.node,t,"End"))))}unmount(){}}}},na={layout:{ProjectionNode:ro,MeasureLayout:Hr}},ia=e.createContext({});function sa(t){const{initial:n,animate:i}=function(t,e){if(bo(t)){const{initial:e,animate:n}=t;return{initial:!1===e||Po(e)?e:void 0,animate:Po(n)?n:void 0}}return!1!==t.inherit?e:{}}(t,e.useContext(ia));return e.useMemo(()=>({initial:n,animate:i}),[oa(n),oa(i)])}function oa(t){return Array.isArray(t)?t.join(" "):t}const ra=Symbol.for("motionComponentSymbol");function aa(t,n,i){return e.useCallback(e=>{e&&t.onMount&&t.onMount(e),n&&(e?n.mount(e):n.unmount()),i&&("function"==typeof i?i(e):Tr(i)&&(i.current=e))},[n])}function la(t,n,i,s,o){var r,a;const{visualElement:l}=e.useContext(ia),u=e.useContext($o),c=e.useContext(v),h=e.useContext(x).reducedMotion,d=e.useRef(null);s=s||u.renderer,!d.current&&s&&(d.current=s(t,{visualState:n,parent:l,props:i,presenceContext:c,blockInitialAnimation:!!c&&!1===c.initial,reducedMotionConfig:h}));const p=d.current,m=e.useContext(zr);!p||p.projection||!o||"html"!==p.type&&"svg"!==p.type||function(t,e,n,i){const{layoutId:s,layout:o,drag:r,dragConstraints:a,layoutScroll:l,layoutRoot:u}=e;t.projection=new n(t.latestValues,e["data-framer-portal-id"]?void 0:function t(e){return e?!1!==e.options.allowProjection?e.projection:t(e.parent):void 0}(t.parent)),t.projection.setOptions({layoutId:s,layout:o,alwaysMeasureLayout:Boolean(r)||a&&Tr(a),visualElement:t,animationType:"string"==typeof o?o:"both",initialPromotionConfig:i,layoutScroll:l,layoutRoot:u})}(d.current,i,o,m);const f=e.useRef(!1);e.useInsertionEffect(()=>{p&&f.current&&p.update(i,c)});const g=i[Fi],w=e.useRef(Boolean(g)&&!(null===(r=window.MotionHandoffIsComplete)||void 0===r?void 0:r.call(window,g))&&(null===(a=window.MotionHasOptimisedAnimation)||void 0===a?void 0:a.call(window,g)));return y(()=>{p&&(f.current=!0,window.MotionIsMounted=!0,p.updateFeatures(),lt.render(p.render),w.current&&p.animationState&&p.animationState.animateChanges())}),e.useEffect(()=>{p&&(!w.current&&p.animationState&&p.animationState.animateChanges(),w.current&&(queueMicrotask(()=>{var t;null===(t=window.MotionHandoffMarkAsComplete)||void 0===t||t.call(window,g)}),w.current=!1))}),p}function ua({preloadedFeatures:t,createVisualElement:n,useRender:i,useVisualState:s,Component:o}){var r,a;function l(t,r){let a;const l={...e.useContext(x),...t,layoutId:ca(t)},{isStatic:u}=l,c=sa(t),h=s(t,u);if(!u&&g){e.useContext($o).strict;const t=function(t){const{drag:e,layout:n}=mo;if(!e&&!n)return{};const i={...e,...n};return{MeasureLayout:(null==e?void 0:e.isEnabled(t))||(null==n?void 0:n.isEnabled(t))?i.MeasureLayout:void 0,ProjectionNode:i.ProjectionNode}}(l);a=t.MeasureLayout,c.visualElement=la(o,h,l,n,t.ProjectionNode)}return p(ia.Provider,{value:c,children:[a&&c.visualElement?d(a,{visualElement:c.visualElement,...l}):null,i(o,t,aa(h,c.visualElement,r),h,u,c.visualElement)]})}t&&Ho(t),l.displayName="motion."+("string"==typeof o?o:`create(${null!==(a=null!==(r=o.displayName)&&void 0!==r?r:o.name)&&void 0!==a?a:""})`);const u=e.forwardRef(l);return u[ra]=o,u}function ca({layoutId:t}){const n=e.useContext(m).id;return n&&void 0!==t?n+"-"+t:t}const ha=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function da(t,e,n){for(const i in e)Ut(e[i])||jo(i,n)||(t[i]=e[i])}function pa(t,n){const i={};return da(i,t.style||{},t),Object.assign(i,function({transformTemplate:t},n){return e.useMemo(()=>{const e={style:{},transform:{},transformOrigin:{},vars:{}};return Fo(e,n,t),Object.assign({},e.vars,e.style)},[n])}(t,n)),i}function ma(t,e){const n={},i=pa(t,e);return t.drag&&!1!==t.dragListener&&(n.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=!0===t.drag?"none":"pan-"+("x"===t.drag?"y":"x")),void 0===t.tabIndex&&(t.onTap||t.onTapStart||t.whileTap)&&(n.tabIndex=0),n.style=i,n}const fa=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function ga(t){return"string"==typeof t&&!t.includes("-")&&!!(fa.indexOf(t)>-1||/[A-Z]/u.test(t))}const ya={offset:"stroke-dashoffset",array:"stroke-dasharray"},va={offset:"strokeDashoffset",array:"strokeDasharray"};function xa(t,e,n){return"string"==typeof t?t:ye.transform(e+n*t)}function wa(t,{attrX:e,attrY:n,attrScale:i,originX:s,originY:o,pathLength:r,pathSpacing:a=1,pathOffset:l=0,...u},c,h){if(Fo(t,u,h),c)return void(t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox));t.attrs=t.style,t.style={};const{attrs:d,style:p,dimensions:m}=t;d.transform&&(m&&(p.transform=d.transform),delete d.transform),m&&(void 0!==s||void 0!==o||p.transform)&&(p.transformOrigin=function(t,e,n){return`${xa(e,t.x,t.width)} ${xa(n,t.y,t.height)}`}(m,void 0!==s?s:.5,void 0!==o?o:.5)),void 0!==e&&(d.x=e),void 0!==n&&(d.y=n),void 0!==i&&(d.scale=i),void 0!==r&&function(t,e,n=1,i=0,s=!0){t.pathLength=1;const o=s?ya:va;t[o.offset]=ye.transform(-i);const r=ye.transform(e),a=ye.transform(n);t[o.array]=`${r} ${a}`}(d,r,a,l,!1)}const Pa=()=>({style:{},transform:{},transformOrigin:{},vars:{},attrs:{}}),Sa=t=>"string"==typeof t&&"svg"===t.toLowerCase();function Ta(t,n,i,s){const o=e.useMemo(()=>{const e={style:{},transform:{},transformOrigin:{},vars:{},attrs:{}};return wa(e,n,Sa(s),t.transformTemplate),{...e.attrs,style:{...e.style}}},[n]);if(t.style){const e={};da(e,t.style,t),o.style={...e,...o.style}}return o}function ba(t=!1){return(n,i,s,{latestValues:o},r)=>{const a=(ga(n)?Ta:ma)(i,o,r,n),l=qo(i,"string"==typeof n,t),u=n!==e.Fragment?{...l,...a,ref:s}:{},{children:c}=i,h=e.useMemo(()=>Ut(c)?c.get():c,[c]);return e.createElement(n,{...u,children:h})}}const Aa=t=>(n,i)=>{const s=e.useContext(ia),o=e.useContext(v),r=()=>function({scrapeMotionValuesFromProps:t,createRenderState:e,onUpdate:n},i,s,o){const r={latestValues:Ea(i,s,o,t),renderState:e()};return n&&(r.onMount=t=>n({props:i,current:t,...r}),r.onUpdate=t=>n(t)),r}(t,n,s,o);return i?r():f(r)};function Ea(t,e,n,i){const s={},o=i(t,{});for(const t in o)s[t]=zi(o[t]);let{initial:r,animate:a}=t;const l=bo(t),u=Ao(t);e&&u&&!l&&!1!==t.inherit&&(void 0===r&&(r=e.initial),void 0===a&&(a=e.animate));let c=!!n&&!1===n.initial;c=c||!1===r;const h=c?a:r;if(h&&"boolean"!=typeof h&&!wo(h)){const e=Array.isArray(h)?h:[h];for(let n=0;n<e.length;n++){const i=Mo(t,e[n]);if(i){const{transitionEnd:t,transition:e,...n}=i;for(const t in n){let e=n[t];if(Array.isArray(e)){e=e[c?e.length-1:0]}null!==e&&(s[t]=e)}for(const e in t)s[e]=t[e]}}}return s}const Ma={useVisualState:Aa({scrapeMotionValuesFromProps:Io,createRenderState:ha})};function Ca(t,e){try{e.dimensions="function"==typeof t.getBBox?t.getBBox():t.getBoundingClientRect()}catch(t){e.dimensions={x:0,y:0,width:0,height:0}}}const Va=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 Ra(t,e,n,i){Oo(t,e,void 0,i);for(const n in e.attrs)t.setAttribute(Va.has(n)?n:Bi(n),e.attrs[n])}function Da(t,e,n){const i=Io(t,e,n);for(const n in t)if(Ut(t[n])||Ut(e[n])){i[-1!==Qt.indexOf(n)?"attr"+n.charAt(0).toUpperCase()+n.substring(1):n]=t[n]}return i}const ka=["x","y","width","height","cx","cy","r"],La={useVisualState:Aa({scrapeMotionValuesFromProps:Da,createRenderState:Pa,onUpdate:({props:t,prevProps:e,current:n,renderState:i,latestValues:s})=>{if(!n)return;let o=!!t.drag;if(!o)for(const t in s)if(te.has(t)){o=!0;break}if(!o)return;let r=!e;if(e)for(let n=0;n<ka.length;n++){const i=ka[n];t[i]!==e[i]&&(r=!0)}r&&st.read(()=>{Ca(n,i),st.render(()=>{wa(i,s,Sa(n.tagName),t.transformTemplate),Ra(n,i)})})}})};function Ba(t,e){return function(n,{forwardMotionProps:i}={forwardMotionProps:!1}){return ua({...ga(n)?La:Ma,preloadedFeatures:t,useRender:ba(i),createVisualElement:e,Component:n})}}class Fa extends Ro{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=ys,this.updateDimensions=()=>{this.current&&!this.renderState.dimensions&&Ca(this.current,this.renderState)}}getBaseTargetFromProps(t,e){return t[e]}readValueFromInstance(t,e){if(te.has(e)){const t=Ue(e);return t&&t.default||0}return e=Va.has(e)?e:Bi(e),t.getAttribute(e)}scrapeMotionValuesFromProps(t,e,n){return Da(t,e,n)}onBindTransform(){this.current&&!this.renderState.dimensions&&st.postRender(this.updateDimensions)}build(t,e,n){wa(t,e,this.isSVGTag,n.transformTemplate)}renderInstance(t,e,n,i){Ra(t,e,0,i)}mount(t){this.isSVGTag=Sa(t.tagName),super.mount(t)}}const Oa=(t,n)=>ga(t)?new Fa(n):new Uo(n,{allowProjection:t!==e.Fragment}),ja=Jo(Ba({...vr,...ea,...Yr,...na},Oa));function Ia({children:t,as:n="ul",axis:i="y",onReorder:s,values:o,...r},a){const l=f(()=>ja[n]),u=[],c=e.useRef(!1),h={axis:i,registerItem:(t,e)=>{const n=u.findIndex(e=>t===e.value);-1!==n?u[n].layout=e[i]:u.push({value:t,layout:e[i]}),u.sort(Na)},updateOrder:(t,e,n)=>{if(c.current)return;const i=function(t,e,n,i){if(!i)return t;const s=t.findIndex(t=>t.value===e);if(-1===s)return t;const o=i>0?1:-1,r=t[s+o];if(!r)return t;const a=t[s],l=r.layout,u=Rt(l.min,l.max,.5);return 1===o&&a.layout.max+n>u||-1===o&&a.layout.min+n<u?function([...t],e,n){const i=e<0?t.length+e:e;if(i>=0&&i<t.length){const i=n<0?t.length+n:n,[s]=t.splice(e,1);t.splice(i,0,s)}return t}(t,s,s+o):t}(u,t,e,n);u!==i&&(c.current=!0,s(i.map(Wa).filter(t=>-1!==o.indexOf(t))))}};return e.useEffect(()=>{c.current=!1}),d(l,{...r,ref:a,ignoreStrict:!0,children:d(Zo.Provider,{value:h,children:t})})}const Ua=e.forwardRef(Ia);function Wa(t){return t.value}function Na(t,e){return t.layout.min-e.layout.min}function za(t){const n=f(()=>Vt(t)),{isStatic:i}=e.useContext(x);if(i){const[,i]=e.useState(t);e.useEffect(()=>n.on("change",i),[])}return n}function $a(...t){const e=!Array.isArray(t[0]),n=e?0:-1,i=t[0+n],s=t[1+n],o=t[2+n],r=t[3+n],a=mi(s,o,{mixer:(l=o[0],(t=>t&&"object"==typeof t&&t.mix)(l)?l.mix:void 0),...r});var l;return e?a(i):a}function Ha(t,e){const n=za(e()),i=()=>n.set(e());return i(),y(()=>{const e=()=>st.preRender(i,!1,!0),n=t.map(t=>t.on("change",e));return()=>{n.forEach(t=>t()),ot(i)}}),n}function Xa(t,e,n,i){if("function"==typeof t)return function(t){Mt.current=[],t();const e=Ha(Mt.current,t);return Mt.current=void 0,e}(t);const s="function"==typeof e?e:$a(e,n,i);return Array.isArray(t)?Ya(t,s):Ya([t],([t])=>s(t))}function Ya(t,e){const n=f(()=>[]);return Ha(t,()=>{n.length=0;const i=t.length;for(let e=0;e<i;e++)n[e]=t[e].get();return e(n)})}function Ka(t,e=0){return Ut(t)?t:za(e)}function Ga({children:t,style:n={},value:i,as:s="li",onDrag:o,layout:r=!0,...a},l){const u=f(()=>ja[s]),c=e.useContext(Zo),h={x:Ka(n.x),y:Ka(n.y)},p=Xa([h.x,h.y],([t,e])=>t||e?1:"unset"),{axis:m,registerItem:g,updateOrder:y}=c;return d(u,{drag:m,...a,dragSnapToOrigin:!0,style:{...n,x:h.x,y:h.y,zIndex:p},layout:r,onDrag:(t,e)=>{const{velocity:n}=e;n[m]&&y(i,h[m].get(),n[m]),o&&o(t,e)},onLayoutMeasure:t=>g(i,t),ref:l,ignoreStrict:!0,children:t})}const _a=e.forwardRef(Ga);var qa=Object.freeze({__proto__:null,Group:Ua,Item:_a});const Za=(t,e,n)=>{const i=e-t;return((n-t)%i+i)%i+t};function Ja(t,e){return hi(t)?t[Za(0,t.length,e)]:t}function Qa(t){return"object"==typeof t&&!Array.isArray(t)}function tl(t,e,n,i){return"string"==typeof t&&Qa(e)?ft(t,n,i):t instanceof NodeList?Array.from(t):Array.isArray(t)?t:[t]}function el(t,e,n){return t*(e+1)}function nl(t,e,n,i){var s;return"number"==typeof e?e:e.startsWith("-")||e.startsWith("+")?Math.max(0,t+parseFloat(e)):"<"===e?n:null!==(s=i.get(e))&&void 0!==s?s:t}function il(t,e,n,i,s,o){!function(t,e,n){for(let i=0;i<t.length;i++){const s=t[i];s.at>e&&s.at<n&&(V(t,s),i--)}}(t,s,o);for(let r=0;r<e.length;r++)t.push({value:e[r],at:Rt(s,o,i[r]),easing:Ja(n,r)})}function sl(t,e){for(let n=0;n<t.length;n++)t[n]=t[n]/(e+1)}function ol(t,e){return t.at===e.at?null===t.value?1:null===e.value?-1:0:t.at-e.at}function rl(t,e){return!e.has(t)&&e.set(t,{}),e.get(t)}function al(t,e){return e[t]||(e[t]=[]),e[t]}function ll(t){return Array.isArray(t)?t:[t]}function ul(t,e){return t&&t[e]?{...t,...t[e]}:{...t}}const cl=t=>"number"==typeof t,hl=t=>t.every(cl);class dl extends Vo{constructor(){super(...arguments),this.type="object"}readValueFromInstance(t,e){if(function(t,e){return t in e}(e,t)){const n=t[e];if("string"==typeof n||"number"==typeof n)return n}}getBaseTargetFromProps(){}removeValueFromRenderState(t,e){delete e.output[t]}measureInstanceViewportBox(){return{x:{min:0,max:0},y:{min:0,max:0}}}build(t,e){Object.assign(t.output,e)}renderInstance(t,{output:e}){Object.assign(t,e)}sortInstanceNodePosition(){return 0}}function pl(t){const e={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=ji(t)?new Fa(e):new Uo(e);n.mount(t),xo.set(t,n)}function ml(t){const e=new dl({presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}});e.mount(t),xo.set(t,e)}function fl(t,e,n,i){const s=[];if(function(t,e){return Ut(t)||"number"==typeof t||"string"==typeof t&&!Qa(e)}(t,e))s.push(Li(t,Qa(e)&&e.default||e,n&&n.default||n));else{const o=tl(t,e,i),r=o.length;for(let t=0;t<r;t++){const i=o[t],a=i instanceof Element?pl:ml;xo.has(i)||a(i);const l=xo.get(i),u={...n};"delay"in u&&"function"==typeof u.delay&&(u.delay=u.delay(t,r)),s.push(...sr(l,{...e,transition:u},{}))}}return s}function gl(t,e,n){const i=[];return function(t,{defaultTransition:e={},...n}={},i,s){const o=e.duration||.3,r=new Map,a=new Map,l={},u=new Map;let c=0,h=0,d=0;for(let n=0;n<t.length;n++){const r=t[n];if("string"==typeof r){u.set(r,h);continue}if(!Array.isArray(r)){u.set(r.name,nl(h,r.at,c,u));continue}let[p,m,f={}]=r;void 0!==f.at&&(h=nl(h,f.at,c,u));let g=0;const y=(t,n,i,r=0,a=0)=>{const l=ll(t),{delay:u=0,times:c=gi(l),type:p="keyframes",repeat:m,repeatType:f,repeatDelay:y=0,...v}=n;let{ease:x=e.ease||"easeOut",duration:w}=n;const P="function"==typeof u?u(r,a):u,S=l.length,T=X(p)?p:null==s?void 0:s[p];if(S<=2&&T){let t=100;if(2===S&&hl(l)){const e=l[1]-l[0];t=Math.abs(e)}const e={...v};void 0!==w&&(e.duration=j(w));const n=H(e,t,T);x=n.ease,w=n.duration}null!=w||(w=o);const b=h+P;1===c.length&&0===c[0]&&(c[1]=1);const A=c.length-l.length;if(A>0&&fi(c,A),1===l.length&&l.unshift(null),m){w=el(w,m);const t=[...l],e=[...c];x=Array.isArray(x)?[...x]:[x];const n=[...x];for(let i=0;i<m;i++){l.push(...t);for(let s=0;s<t.length;s++)c.push(e[s]+(i+1)),x.push(0===s?"linear":Ja(n,s-1))}sl(c,m)}const E=b+w;il(i,l,x,c,b,E),g=Math.max(P+w,g),d=Math.max(E,d)};if(Ut(p)){y(m,f,al("default",rl(p,a)))}else{const t=tl(p,m,i,l),e=t.length;for(let n=0;n<e;n++){m=m,f=f;const i=rl(t[n],a);for(const t in m)y(m[t],ul(f,t),al(t,i),n,e)}}c=h,h+=g}return a.forEach((t,i)=>{for(const s in t){const o=t[s];o.sort(ol);const a=[],l=[],u=[];for(let t=0;t<o.length;t++){const{at:e,value:n,easing:i}=o[t];a.push(n),l.push(F(0,d,e)),u.push(i||"easeOut")}0!==l[0]&&(l.unshift(0),a.unshift(a[0]),u.unshift("easeInOut")),1!==l[l.length-1]&&(l.push(1),a.push(null)),r.has(i)||r.set(i,{keyframes:{},transition:{}});const c=r.get(i);c.keyframes[s]=a,c.transition[s]={...e,duration:d,ease:u,times:l,...n}}}),r}(t,e,n,{spring:ri}).forEach(({keyframes:t,transition:e},n)=>{i.push(...fl(n,t,e))}),i}function yl(t){return function(e,n,i){let s=[];var o;o=e,s=Array.isArray(o)&&o.some(Array.isArray)?gl(e,n,t):fl(e,n,i,t);const r=new N(s);return t&&t.animations.push(r),r}}const vl=yl();function xl(t,e,n){t.style.setProperty(e,n)}function wl(t,e,n){t.style[e]=n}const Pl=B(()=>{try{document.createElement("div").animate({opacity:[1]})}catch(t){return!1}return!0}),Sl=new WeakMap;function Tl(t){const e=Sl.get(t)||new Map;return Sl.set(t,e),Sl.get(t)}class bl extends class{constructor(t){this.animation=t}get duration(){var t,e,n;const i=(null===(e=null===(t=this.animation)||void 0===t?void 0:t.effect)||void 0===e?void 0:e.getComputedTiming().duration)||(null===(n=this.options)||void 0===n?void 0:n.duration)||300;return I(Number(i))}get time(){var t;return this.animation?I((null===(t=this.animation)||void 0===t?void 0:t.currentTime)||0):0}set time(t){this.animation&&(this.animation.currentTime=j(t))}get speed(){return this.animation?this.animation.playbackRate:1}set speed(t){this.animation&&(this.animation.playbackRate=t)}get state(){return this.animation?this.animation.playState:"finished"}get startTime(){return this.animation?this.animation.startTime:null}get finished(){return this.animation?this.animation.finished:Promise.resolve()}play(){this.animation&&this.animation.play()}pause(){this.animation&&this.animation.pause()}stop(){this.animation&&"idle"!==this.state&&"finished"!==this.state&&(this.animation.commitStyles&&this.animation.commitStyles(),this.cancel())}flatten(){var t,e;this.animation&&(null===(t=this.options)||void 0===t?void 0:t.allowFlatten)&&(null===(e=this.animation.effect)||void 0===e||e.updateTiming({easing:"linear"}))}attachTimeline(t){return this.animation&&Y(this.animation,t),R}complete(){this.animation&&this.animation.finish()}cancel(){try{this.animation&&this.animation.cancel()}catch(t){}}}{constructor(t,e,n,i){const s=e.startsWith("--");k("string"!=typeof i.type);const o=Tl(t).get(e);o&&o.stop();if(Array.isArray(n)||(n=[n]),function(t,e,n){for(let i=0;i<e.length;i++)null===e[i]&&(e[i]=0===i?n():e[i-1]),"number"==typeof e[i]&&Be[t]&&(e[i]=Be[t].transform(e[i]));!Pl()&&e.length<2&&e.unshift(n())}(e,n,()=>e.startsWith("--")?t.style.getPropertyValue(e):window.getComputedStyle(t)[e]),X(i.type)){const t=H(i,100,i.type);i.ease=q()?t.ease:"easeOut",i.duration=j(t.duration),i.type="keyframes"}else i.ease=i.ease||"easeOut";const r=()=>{this.setValue(t,e,bn(n,i)),this.cancel(),this.resolveFinishedPromise()},a=()=>{this.setValue=s?xl:wl,this.options=i,this.updateFinishedPromise(),this.removeAnimation=()=>{const n=Sl.get(t);n&&n.delete(e)}};Ai()?(super(bi(t,e,n,i)),a(),!1===i.autoplay&&this.animation.pause(),this.animation.onfinish=r,Tl(t).set(e,this)):(super(),a(),r())}then(t,e){return this.currentFinishedPromise.then(t,e)}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}play(){"finished"===this.state&&this.updateFinishedPromise(),super.play()}cancel(){this.removeAnimation(),super.cancel()}}const Al=t=>function(e,n,i){return new N(function(t,e,n,i){const s=ft(t,i),o=s.length,r=[];for(let t=0;t<o;t++){const i=s[t],a={...n};"function"==typeof a.delay&&(a.delay=a.delay(t,o));for(const t in e){const n=e[t],s={...z(a,t)};s.duration=s.duration?j(s.duration):s.duration,s.delay=j(s.delay||0),s.allowFlatten=!a.type&&!a.ease,r.push(new bl(i,t,n,s))}}return r}(e,n,i,t))},El=Al();function Ml(t,e){let n;const i=()=>{const{currentTime:i}=e,s=(null===i?0:i.value)/100;n!==s&&t(s),n=s};return st.update(i,!0),()=>ot(i)}const Cl=new WeakMap;let Vl;function Rl({target:t,contentRect:e,borderBoxSize:n}){var i;null===(i=Cl.get(t))||void 0===i||i.forEach(i=>{i({target:t,contentSize:e,get size(){return function(t,e){if(e){const{inlineSize:t,blockSize:n}=e[0];return{width:t,height:n}}return t instanceof SVGElement&&"getBBox"in t?t.getBBox():{width:t.offsetWidth,height:t.offsetHeight}}(t,n)}})})}function Dl(t){t.forEach(Rl)}function kl(t,e){Vl||"undefined"!=typeof ResizeObserver&&(Vl=new ResizeObserver(Dl));const n=ft(t);return n.forEach(t=>{let n=Cl.get(t);n||(n=new Set,Cl.set(t,n)),n.add(e),null==Vl||Vl.observe(t)}),()=>{n.forEach(t=>{const n=Cl.get(t);null==n||n.delete(e),(null==n?void 0:n.size)||null==Vl||Vl.unobserve(t)})}}const Ll=new Set;let Bl;function Fl(t){return Ll.add(t),Bl||(Bl=()=>{const t={width:window.innerWidth,height:window.innerHeight},e={target:window,size:t,contentSize:t};Ll.forEach(t=>t(e))},window.addEventListener("resize",Bl)),()=>{Ll.delete(t),!Ll.size&&Bl&&(Bl=void 0)}}const Ol={x:{length:"Width",position:"Left"},y:{length:"Height",position:"Top"}};function jl(t,e,n,i){const s=n[e],{length:o,position:r}=Ol[e],a=s.current,l=n.time;s.current=t["scroll"+r],s.scrollLength=t["scroll"+o]-t["client"+o],s.offset.length=0,s.offset[0]=0,s.offset[1]=s.scrollLength,s.progress=F(0,s.scrollLength,s.current);const u=i-l;s.velocity=u>50?0:U(s.current-a,u)}const Il={start:0,center:.5,end:1};function Ul(t,e,n=0){let i=0;if(t in Il&&(t=Il[t]),"string"==typeof t){const e=parseFloat(t);t.endsWith("px")?i=e:t.endsWith("%")?t=e/100:t.endsWith("vw")?i=e/100*document.documentElement.clientWidth:t.endsWith("vh")?i=e/100*document.documentElement.clientHeight:t=e}return"number"==typeof t&&(i=e*t),n+i}const Wl=[0,0];function Nl(t,e,n,i){let s=Array.isArray(t)?t:Wl,o=0,r=0;return"number"==typeof t?s=[t,t]:"string"==typeof t&&(s=(t=t.trim()).includes(" ")?t.split(" "):[t,Il[t]?t:"0"]),o=Ul(s[0],n,i),r=Ul(s[1],e),o-r}const zl={Enter:[[0,1],[1,1]],Exit:[[0,0],[1,0]],Any:[[1,0],[0,1]],All:[[0,0],[1,1]]},$l={x:0,y:0};function Hl(t,e,n){const{offset:i=zl.All}=n,{target:s=t,axis:o="y"}=n,r="y"===o?"height":"width",a=s!==t?function(t,e){const n={x:0,y:0};let i=t;for(;i&&i!==e;)if(i instanceof HTMLElement)n.x+=i.offsetLeft,n.y+=i.offsetTop,i=i.offsetParent;else if("svg"===i.tagName){const t=i.getBoundingClientRect();i=i.parentElement;const e=i.getBoundingClientRect();n.x+=t.left-e.left,n.y+=t.top-e.top}else{if(!(i instanceof SVGGraphicsElement))break;{const{x:t,y:e}=i.getBBox();n.x+=t,n.y+=e;let s=null,o=i.parentNode;for(;!s;)"svg"===o.tagName&&(s=o),o=i.parentNode;i=s}}return n}(s,t):$l,l=s===t?{width:t.scrollWidth,height:t.scrollHeight}:function(t){return"getBBox"in t&&"svg"!==t.tagName?t.getBBox():{width:t.clientWidth,height:t.clientHeight}}(s),u={width:t.clientWidth,height:t.clientHeight};e[o].offset.length=0;let c=!e[o].interpolate;const h=i.length;for(let t=0;t<h;t++){const n=Nl(i[t],u[r],l[r],a[o]);c||n===e[o].interpolatorOffsets[t]||(c=!0),e[o].offset[t]=n}c&&(e[o].interpolate=mi(e[o].offset,gi(i),{clamp:!1}),e[o].interpolatorOffsets=[...e[o].offset]),e[o].progress=ne(0,1,e[o].interpolate(e[o].current))}function Xl(t,e,n,i={}){return{measure:()=>function(t,e=t,n){if(n.x.targetOffset=0,n.y.targetOffset=0,e!==t){let i=e;for(;i&&i!==t;)n.x.targetOffset+=i.offsetLeft,n.y.targetOffset+=i.offsetTop,i=i.offsetParent}n.x.targetLength=e===t?e.scrollWidth:e.clientWidth,n.y.targetLength=e===t?e.scrollHeight:e.clientHeight,n.x.containerLength=t.clientWidth,n.y.containerLength=t.clientHeight}(t,i.target,n),update:e=>{!function(t,e,n){jl(t,"x",e,n),jl(t,"y",e,n),e.time=n}(t,n,e),(i.offset||i.target)&&Hl(t,n,i)},notify:()=>e(n)}}const Yl=new WeakMap,Kl=new WeakMap,Gl=new WeakMap,_l=t=>t===document.documentElement?window:t;function ql(t,{container:e=document.documentElement,...n}={}){let i=Gl.get(e);i||(i=new Set,Gl.set(e,i));const s=Xl(e,t,{time:0,x:{current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0},y:{current:0,offset:[],progress:0,scrollLength:0,targetOffset:0,targetLength:0,containerLength:0,velocity:0}},n);if(i.add(s),!Yl.has(e)){const t=()=>{for(const t of i)t.measure()},n=()=>{for(const t of i)t.update(rt.timestamp)},s=()=>{for(const t of i)t.notify()},a=()=>{st.read(t,!1,!0),st.read(n,!1,!0),st.update(s,!1,!0)};Yl.set(e,a);const l=_l(e);window.addEventListener("resize",a,{passive:!0}),e!==document.documentElement&&Kl.set(e,(r=a,"function"==typeof(o=e)?Fl(o):kl(o,r))),l.addEventListener("scroll",a,{passive:!0})}var o,r;const a=Yl.get(e);return st.read(a,!1,!0),()=>{var t;ot(a);const n=Gl.get(e);if(!n)return;if(n.delete(s),n.size)return;const i=Yl.get(e);Yl.delete(e),i&&(_l(e).removeEventListener("scroll",i),null===(t=Kl.get(e))||void 0===t||t(),window.removeEventListener("resize",i))}}const Zl=new Map;function Jl({source:t,container:e=document.documentElement,axis:n="y"}={}){t&&(e=t),Zl.has(e)||Zl.set(e,{});const i=Zl.get(e);return i[n]||(i[n]=W()?new ScrollTimeline({source:e,axis:n}):function({source:t,container:e,axis:n="y"}){t&&(e=t);const i={value:0},s=ql(t=>{i.value=100*t[n].progress},{container:e,axis:n});return{currentTime:i,cancel:s}}({source:e,axis:n})),i[n]}function Ql(t){return t&&(t.target||t.offset)}function tu(t,{axis:e="y",...n}={}){const i={axis:e,...n};return"function"==typeof t?function(t,e){return function(t){return 2===t.length}(t)||Ql(e)?ql(n=>{t(n[e.axis].progress,n)},e):Ml(t,Jl(e))}(t,i):function(t,e){if(t.flatten(),Ql(e))return t.pause(),ql(n=>{t.time=t.duration*n[e.axis].progress},e);{const n=Jl(e);return t.attachTimeline?t.attachTimeline(n,t=>(t.pause(),Ml(e=>{t.time=t.duration*e},n))):R}}(t,i)}const eu={some:0,all:1};function nu(t,e,{root:n,margin:i,amount:s="some"}={}){const o=ft(t),r=new WeakMap,a=new IntersectionObserver(t=>{t.forEach(t=>{const n=r.get(t.target);if(t.isIntersecting!==Boolean(n))if(t.isIntersecting){const n=e(t.target,t);"function"==typeof n?r.set(t.target,n):a.unobserve(t.target)}else"function"==typeof n&&(n(t),r.delete(t.target))})},{root:n,rootMargin:i,threshold:"number"==typeof s?s:eu[s]});return o.forEach(t=>a.observe(t)),()=>a.disconnect()}const iu=Jo(Ba());function su(t){return e.useEffect(()=>()=>t(),[])}const ou={renderer:Oa,...vr,...ea},ru={...ou,...Yr,...na},au={renderer:Oa,...vr};function lu(t,n,i){e.useInsertionEffect(()=>t.on(n,i),[t,n,i])}function uu(t,e){D(Boolean(!e||e.current))}const cu=()=>({scrollX:Vt(0),scrollY:Vt(0),scrollXProgress:Vt(0),scrollYProgress:Vt(0)});function hu({container:t,target:n,layoutEffect:i=!0,...s}={}){const o=f(cu);return(i?y:e.useEffect)(()=>(uu(0,n),uu(0,t),tu((t,{x:e,y:n})=>{o.scrollX.set(e.current),o.scrollXProgress.set(e.progress),o.scrollY.set(n.current),o.scrollYProgress.set(n.progress)},{...s,container:(null==t?void 0:t.current)||void 0,target:(null==n?void 0:n.current)||void 0})),[t,n,JSON.stringify(s.offset)]),o}function du(t,e){return e?t+e:t}function pu(t){return"number"==typeof t?t:parseFloat(t)}function mu(t){const n=e.useRef(0),{isStatic:i}=e.useContext(x);e.useEffect(()=>{if(i)return;const e=({timestamp:e,delta:i})=>{n.current||(n.current=e),t(e-n.current,i)};return st.update(e,!0),()=>ot(e)},[t])}class fu extends Ct{constructor(){super(...arguments),this.values=[]}add(t){const e=function(t){return te.has(t)?"transform":Ti.has(t)?Bi(t):void 0}(t);e&&(C(this.values,e),this.update())}update(){this.set(this.values.length?this.values.join(", "):"auto")}}function gu(){!go.current&&yo();const[t]=e.useState(fo.current);return t}function yu(t,e){[...e].reverse().forEach(n=>{const i=t.getVariant(n);i&&er(t,i),t.variantChildren&&t.variantChildren.forEach(t=>{yu(t,e)})})}function vu(){const t=new Set,e={subscribe:e=>(t.add(e),()=>{t.delete(e)}),start(e,n){const i=[];return t.forEach(t=>{i.push(ar(t,e,{transitionOverride:n}))}),Promise.all(i)},set:e=>t.forEach(t=>{!function(t,e){Array.isArray(e)?yu(t,e):"string"==typeof e?yu(t,[e]):er(t,e)}(t,e)}),stop(){t.forEach(t=>{!function(t){t.values.forEach(t=>t.stop())}(t)})},mount:()=>()=>{e.stop()}};return e}function xu(){const t=f(vu);return y(t.mount,[]),t}const wu=xu;class Pu{constructor(){this.componentControls=new Set}subscribe(t){return this.componentControls.add(t),()=>this.componentControls.delete(t)}start(t,e){this.componentControls.forEach(n=>{n.start(t.nativeEvent||t,e)})}}const Su=()=>new Pu;function Tu(t){return null!==t&&"object"==typeof t&&ra in t}function bu(){return Au}function Au(t){oo.current&&(oo.current.isUpdating=!1,oo.current.blockUpdate(),t&&t())}const Eu=new Map,Mu=new Map,Cu=(t,e)=>`${t}: ${te.has(e)?"transform":e}`;function Vu(t,e,n){var i;const s=Cu(t,e),o=Eu.get(s);if(!o)return null;const{animation:r,startTime:a}=o;function l(){var i;null===(i=window.MotionCancelOptimisedAnimation)||void 0===i||i.call(window,t,e,n)}return r.onfinish=l,null===a||(null===(i=window.MotionHandoffIsComplete)||void 0===i?void 0:i.call(window,t))?(l(),null):a}let Ru,Du;const ku=new Set;function Lu(){ku.forEach(t=>{t.animation.play(),t.animation.startTime=t.startTime}),ku.clear()}const Bu=()=>({});class Fu extends Vo{constructor(){super(...arguments),this.measureInstanceViewportBox=ys}build(){}resetTransform(){}restoreTransform(){}removeValueFromRenderState(){}renderInstance(){}scrapeMotionValuesFromProps(){return{}}getBaseTargetFromProps(){}readValueFromInstance(t,e,n){return n.initialState[e]||0}sortInstanceNodePosition(){return 0}}const Ou=Aa({scrapeMotionValuesFromProps:Bu,createRenderState:Bu});let ju=0;const Iu=t=>t>.001?1/t:1e5;t.AcceleratedAnimation=Mi,t.AnimatePresence=({children:t,custom:n,initial:i=!0,onExitComplete:s,presenceAffectsLayout:o=!0,mode:r="sync",propagate:a=!1,anchorX:l="left"})=>{const[u,c]=b(a),p=e.useMemo(()=>E(t),[t]),g=a&&!u?[]:p.map(A),v=e.useRef(!0),x=e.useRef(p),w=f(()=>new Map),[P,T]=e.useState(p),[M,C]=e.useState(p);y(()=>{v.current=!1,x.current=p;for(let t=0;t<M.length;t++){const e=A(M[t]);g.includes(e)?w.delete(e):!0!==w.get(e)&&w.set(e,!1)}},[M,g.length,g.join("-")]);const V=[];if(p!==P){let t=[...p];for(let e=0;e<M.length;e++){const n=M[e],i=A(n);g.includes(i)||(t.splice(e,0,n),V.push(n))}return"wait"===r&&V.length&&(t=V),C(E(t)),T(p),null}const{forceRender:R}=e.useContext(m);return d(h,{children:M.map(t=>{const e=A(t),h=!(a&&!u)&&(p===M||g.includes(e));return d(S,{isPresent:h,initial:!(v.current&&!i)&&void 0,custom:n,presenceAffectsLayout:o,mode:r,onExitComplete:h?void 0:()=>{if(!w.has(e))return;w.set(e,!0);let t=!0;w.forEach(e=>{e||(t=!1)}),t&&(null==R||R(),C(x.current),a&&(null==c||c()),s&&s())},anchorX:l,children:t},e)})})},t.AnimateSharedLayout=({children:t})=>(i.useEffect(()=>{},[]),d(zo,{id:f(()=>"asl-"+ju++),children:t})),t.DeprecatedLayoutGroupContext=M,t.DragControls=Pu,t.FlatTree=Ui,t.LayoutGroup=zo,t.LayoutGroupContext=m,t.LazyMotion=function({children:t,features:n,strict:i=!1}){const[,s]=e.useState(!Xo(n)),o=e.useRef(void 0);if(!Xo(n)){const{renderer:t,...e}=n;o.current=t,Ho(e)}return e.useEffect(()=>{Xo(n)&&n().then(({renderer:t,...e})=>{Ho(e),o.current=t,s(!0)})},[]),d($o.Provider,{value:{renderer:o.current,strict:i},children:t})},t.MotionConfig=function({children:t,isValidProp:n,...i}){n&&_o(n),(i={...e.useContext(x),...i}).isStatic=f(()=>i.isStatic);const s=e.useMemo(()=>i,[JSON.stringify(i.transition),i.transformPagePoint,i.reducedMotion]);return d(x.Provider,{value:s,children:t})},t.MotionConfigContext=x,t.MotionContext=ia,t.MotionGlobalConfig=L,t.MotionValue=Ct,t.PresenceContext=v,t.Reorder=qa,t.SwitchLayoutGroupContext=zr,t.VisualElement=Vo,t.WillChangeMotionValue=fu,t.addPointerEvent=Pr,t.addPointerInfo=wr,t.addScaleCorrector=Ms,t.animate=vl,t.animateMini=El,t.animateValue=Si,t.animateVisualElement=ar,t.animationControls=vu,t.animations=vr,t.anticipate=Gt,t.backIn=Yt,t.backInOut=Kt,t.backOut=Xt,t.buildTransform=Bo,t.calcLength=Dt,t.cancelFrame=ot,t.circIn=_t,t.circInOut=Zt,t.circOut=qt,t.clamp=ne,t.color=Se,t.complex=Ve,t.createBox=ys,t.createRendererMotionComponent=ua,t.createScopedAnimate=yl,t.cubicBezier=zt,t.delay=Wi,t.disableInstantTransitions=function(){Wt.current=!1},t.distance=br,t.distance2D=Ar,t.domAnimation=ou,t.domMax=ru,t.domMin=au,t.easeIn=li,t.easeInOut=ci,t.easeOut=ui,t.filterProps=qo,t.findSpring=ei,t.frame=st,t.frameData=rt,t.hover=vt,t.inView=nu,t.inertia=ai,t.interpolate=mi,t.invariant=k,t.isBrowser=g,t.isDragActive=mt,t.isMotionComponent=Tu,t.isMotionValue=Ut,t.isValidMotionProp=Ko,t.keyframes=yi,t.m=iu,t.makeUseVisualState=Aa,t.mirrorEasing=$t,t.mix=Wn,t.motion=ja,t.motionValue=Vt,t.noop=R,t.optimizedAppearDataAttribute=Fi,t.pipe=Ln,t.press=Et,t.progress=F,t.px=ye,t.resolveMotionValue=zi,t.reverseEasing=Ht,t.scroll=tu,t.scrollInfo=ql,t.spring=ri,t.stagger=function(t=.1,{startDelay:e=0,from:n=0,ease:i}={}){return(s,o)=>{const r="number"==typeof n?n:function(t,e){if("first"===t)return 0;{const n=e-1;return"last"===t?n:n/2}}(n,o),a=Math.abs(r-s);let l=t*a;if(i){const e=o*t;l=pi(i)(l/e)*e}return e+l}},t.startOptimizedAppearAnimation=function(t,e,n,i,s){if(window.MotionIsMounted)return;const o=t.dataset.framerAppearId;if(!o)return;window.MotionHandoffAnimation=Vu;const r=Cu(o,e);Du||(Du=bi(t,e,[n[0],n[0]],{duration:1e4,ease:"linear"}),Eu.set(r,{animation:Du,startTime:null}),window.MotionHandoffAnimation=Vu,window.MotionHasOptimisedAnimation=(t,e)=>{if(!t)return!1;if(!e)return Mu.has(t);const n=Cu(t,e);return Boolean(Eu.get(n))},window.MotionHandoffMarkAsComplete=t=>{Mu.has(t)&&Mu.set(t,!0)},window.MotionHandoffIsComplete=t=>!0===Mu.get(t),window.MotionCancelOptimisedAnimation=(t,e,n,i)=>{const s=Cu(t,e),o=Eu.get(s);o&&(n&&void 0===i?n.postRender(()=>{n.postRender(()=>{o.animation.cancel()})}):o.animation.cancel(),n&&i?(ku.add(o),n.render(Lu)):(Eu.delete(s),Eu.size||(window.MotionCancelOptimisedAnimation=void 0)))},window.MotionCheckAppearSync=(t,e,n)=>{var i,s;const o=Oi(t);if(!o)return;const r=null===(i=window.MotionHasOptimisedAnimation)||void 0===i?void 0:i.call(window,o,e),a=null===(s=t.props.values)||void 0===s?void 0:s[e];if(!r||!a)return;const l=n.on("change",t=>{var n;a.get()!==t&&(null===(n=window.MotionCancelOptimisedAnimation)||void 0===n||n.call(window,o,e),l())});return l});const a=()=>{Du.cancel();const o=bi(t,e,n,i);void 0===Ru&&(Ru=performance.now()),o.startTime=Ru,Eu.set(r,{animation:o,startTime:Ru}),s&&s(o)};Mu.set(o,!1),Du.ready?Du.ready.then(a).catch(R):a()},t.steps=function(t,e="end"){return n=>{const i=(n="end"===e?Math.min(n,.999):Math.max(n,.001))*t,s="end"===e?Math.floor(i):Math.ceil(i);return ne(0,1,s/t)}},t.time=dt,t.transform=$a,t.unwrapMotionComponent=function(t){if(Tu(t))return t[ra]},t.useAnimate=function(){const t=f(()=>({current:null,animations:[]})),e=f(()=>yl(t));return su(()=>{t.animations.forEach(t=>t.stop())}),[t,e]},t.useAnimateMini=function(){const t=f(()=>({current:null,animations:[]})),e=f(()=>Al(t));return su(()=>{t.animations.forEach(t=>t.stop())}),[t,e]},t.useAnimation=wu,t.useAnimationControls=xu,t.useAnimationFrame=mu,t.useCycle=function(...t){const n=e.useRef(0),[i,s]=e.useState(t[n.current]);return[i,e.useCallback(e=>{n.current="number"!=typeof e?Za(0,t.length,n.current+1):e,s(t[n.current])},[t.length,...t])]},t.useDeprecatedAnimatedState=function(t){const[n,i]=e.useState(t),s=Ou({},!1),o=f(()=>new Fu({props:{onUpdate:t=>{i({...t})}},visualState:s,presenceContext:null},{initialState:t}));return e.useLayoutEffect(()=>(o.mount({}),()=>o.unmount()),[o]),[n,f(()=>t=>ar(o,t))]},t.useDeprecatedInvertedScale=function(t){let n=za(1),i=za(1);const{visualElement:s}=e.useContext(ia);return t?(n=t.scaleX||n,i=t.scaleY||i):s&&(n=s.getValue("scaleX",1),i=s.getValue("scaleY",1)),{scaleX:Xa(n,Iu),scaleY:Xa(i,Iu)}},t.useDomEvent=function(t,n,i,s){e.useEffect(()=>{const e=t.current;if(i&&e)return io(e,n,i,s)},[t,n,i,s])},t.useDragControls=function(){return f(Su)},t.useElementScroll=function(t){return hu({container:t})},t.useForceUpdate=Wo,t.useInView=function(t,{root:n,margin:i,amount:s,once:o=!1,initial:r=!1}={}){const[a,l]=e.useState(r);return e.useEffect(()=>{if(!t.current||o&&a)return;const e={root:n&&n.current||void 0,margin:i,amount:s};return nu(t.current,()=>(l(!0),o?void 0:()=>l(!1)),e)},[n,t,i,o,s]),a},t.useInstantLayoutTransition=bu,t.useInstantTransition=function(){const[t,n]=Wo(),i=bu(),s=e.useRef(-1);return e.useEffect(()=>{st.postRender(()=>st.postRender(()=>{n===s.current&&(Wt.current=!1)}))},[n]),e=>{i(()=>{Wt.current=!0,t(),e(),s.current=n+1})}},t.useIsPresent=function(){return null===(t=e.useContext(v))||t.isPresent;var t},t.useIsomorphicLayoutEffect=y,t.useMotionTemplate=function(t,...e){const n=t.length;return Ha(e.filter(Ut),(function(){let i="";for(let s=0;s<n;s++){i+=t[s];const n=e[s];n&&(i+=Ut(n)?n.get():n)}return i}))},t.useMotionValue=za,t.useMotionValueEvent=lu,t.usePresence=b,t.usePresenceData=function(){const t=e.useContext(v);return t?t.custom:void 0},t.useReducedMotion=gu,t.useReducedMotionConfig=function(){const t=gu(),{reducedMotion:n}=e.useContext(x);return"never"!==n&&("always"===n||t)},t.useResetProjection=function(){return e.useCallback(()=>{const t=oo.current;t&&t.resetTree()},[])},t.useScroll=hu,t.useSpring=function(t,n={}){const{isStatic:i}=e.useContext(x),s=e.useRef(null),o=f(()=>Ut(t)?t.get():t),r=f(()=>"string"==typeof o?o.replace(/[\d.-]/g,""):void 0),a=za(o),l=e.useRef(o),u=e.useRef(R),c=()=>{h(),s.current=Si({keyframes:[pu(a.get()),pu(l.current)],velocity:a.getVelocity(),type:"spring",restDelta:.001,restSpeed:.01,...n,onUpdate:u.current})},h=()=>{s.current&&s.current.stop()};return e.useInsertionEffect(()=>a.attach((t,e)=>i?e(t):(l.current=t,u.current=t=>e(du(t,r)),st.postRender(c),a.get()),h),[JSON.stringify(n)]),y(()=>{if(Ut(t))return t.on("change",t=>a.set(du(t,r)))},[a,r]),a},t.useTime=function(){const t=za(0);return mu(e=>t.set(e)),t},t.useTransform=Xa,t.useUnmountEffect=su,t.useVelocity=function(t){const e=za(t.getVelocity()),n=()=>{const i=t.getVelocity();e.set(i),i&&st.update(n)};return lu(t,"change",()=>{st.update(n,!1,!0)}),e},t.useViewportScroll=function(){return hu()},t.useWillChange=function(){return f(()=>new fu("auto"))},t.visualElementStore=xo,t.wrap=Za}));
|