framer-motion 12.4.11 → 12.4.13
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-6TyswOY8.js → create-DkTZDHiS.js} +102 -58
- package/dist/cjs/dom.js +85 -22
- package/dist/cjs/index.js +1 -1
- package/dist/dom.js +1 -1
- package/dist/es/gestures/drag/VisualElementDragControls.mjs +2 -0
- package/dist/es/gestures/pan/PanSession.mjs +9 -35
- package/dist/es/gestures/pan/index.mjs +2 -0
- package/dist/es/render/dom/utils/unit-conversion.mjs +3 -20
- package/dist/es/render/html/HTMLVisualElement.mjs +2 -3
- package/dist/es/render/html/utils/parse-transform.mjs +83 -0
- package/dist/es/render/utils/motion-values.mjs +1 -1
- package/dist/es/utils/get-context-window.mjs +6 -0
- package/dist/es/value/index.mjs +1 -1
- package/dist/framer-motion.dev.js +100 -56
- package/dist/framer-motion.js +1 -1
- package/dist/size-rollup-animate.js +1 -0
- package/dist/size-rollup-dom-animation-assets.js +1 -0
- package/dist/size-rollup-dom-animation-m.js +1 -0
- package/dist/size-rollup-dom-animation.js +1 -0
- package/dist/size-rollup-dom-max-assets.js +1 -0
- package/dist/size-rollup-dom-max.js +1 -0
- package/dist/size-rollup-m.js +1 -0
- package/dist/size-rollup-motion.js +1 -0
- package/dist/size-rollup-scroll.js +1 -0
- package/dist/size-rollup-waapi-animate.js +1 -0
- package/package.json +10 -9
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){return null!==t&&"object"==typeof t&&"function"==typeof t.start}function g(t){const e=[{},{}];return null==t||t.values.forEach((t,n)=>{e[0][n]=t.get(),e[1][n]=t.getVelocity()}),e}function y(t,e,n,i){if("function"==typeof e){const[s,o]=g(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]=g(i);e=e(void 0!==n?n:t.custom,s,o)}return e}function v(t,e,n){const i=t.getProps();return y(i,e,void 0!==n?n:i.custom,t)}const x=t=>t;let w=x,P=x;function T(t){let e;return()=>(void 0===e&&(e=t()),e)}const S=(t,e,n)=>{const i=e-t;return 0===i?1:(n-t)/i},b=t=>1e3*t,A=t=>t/1e3,E=T(()=>void 0!==window.ScrollTimeline);class C 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=>E()&&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 M(t,e){return t?t[e]||t.default||t:void 0}function V(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 R(t,e=100,n){const i=n({...t,keyframes:[0,e]}),s=Math.min(V(i),2e4);return{type:"keyframes",ease:t=>i.next(s*t).value/e,duration:A(s)}}function D(t){return"function"==typeof t}function k(t,e){t.timeline=e,t.onfinish=null}const L=t=>Array.isArray(t)&&"number"==typeof t[0],B={linearEasing:void 0};function F(t,e){const n=T(t);return()=>{var t;return null!==(t=B[e])&&void 0!==t?t:n()}}const O=F(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(t){return!1}return!0},"linearEasing"),j=(t,e,n=10)=>{let i="";const s=Math.max(Math.round(e/n),2);for(let e=0;e<s;e++)i+=t(S(0,s-1,e))+", ";return`linear(${i.substring(0,i.length-2)})`};function I(t){return Boolean("function"==typeof t&&O()||!t||"string"==typeof t&&(t in W||O())||L(t)||Array.isArray(t)&&t.every(I))}const U=([t,e,n,i])=>`cubic-bezier(${t}, ${e}, ${n}, ${i})`,W={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:U([0,.65,.55,1]),circOut:U([.55,0,1,.45]),backIn:U([.31,.01,.66,-.59]),backOut:U([.33,1.53,.69,.99])};const N={x:!1,y:!1};function z(){return N.x||N.y}function $(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 H(t,e){const n=$(t),i=new AbortController;return[n,{passive:!0,...e,signal:i.signal},()=>i.abort()]}function X(t){return!("touch"===t.pointerType||z())}function Y(t,e,n={}){const[i,s,o]=H(t,n),r=t=>{if(!X(t))return;const{target:n}=t,i=e(n,t);if("function"!=typeof i||!n)return;const o=t=>{X(t)&&(i(t),n.removeEventListener("pointerleave",o))};n.addEventListener("pointerleave",o,s)};return i.forEach(t=>{t.addEventListener("pointerenter",r,s)}),o}function K(t,e){const n=e+"PointerCapture";if(t.target instanceof Element&&n in t.target&&void 0!==t.pointerId)try{t.target[n](t.pointerId)}catch(t){}}const G=(t,e)=>!!e&&(t===e||G(t,e.parentElement)),_=t=>"mouse"===t.pointerType?"number"!=typeof t.button||t.button<=0:!1!==t.isPrimary,q=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);const Z=new WeakSet;function J(t){return e=>{"Enter"===e.key&&t(e)}}function Q(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}function tt(t){return _(t)&&!z()}function et(t,e,n={}){const[i,s,o]=H(t,n),r=t=>{const n=t.currentTarget;if(!n||!tt(t)||Z.has(n))return;Z.add(n),K(t,"set");const i=e(n,t),o=(t,e)=>{n.removeEventListener("pointerup",r),n.removeEventListener("pointercancel",a),K(t,"release"),tt(t)&&Z.has(n)&&(Z.delete(n),"function"==typeof i&&i(t,{success:e}))},r=t=>{const e=!!t.isTrusted&&(i=t,s=n instanceof Element?n.getBoundingClientRect():{left:0,top:0,right:window.innerWidth,bottom:window.innerHeight},i.clientX<s.left||i.clientX>s.right||i.clientY<s.top||i.clientY>s.bottom);var i,s;o(t,!e&&(!(n instanceof Element)||G(n,t.target)))},a=t=>{o(t,!1)};n.addEventListener("pointerup",r,s),n.addEventListener("pointercancel",a,s),n.addEventListener("lostpointercapture",a,s)};return i.forEach(t=>{let e=!1;var i;(t=n.useGlobalTarget?window:t)instanceof HTMLElement&&(e=!0,i=t,q.has(i.tagName)||-1!==i.tabIndex||null!==t.getAttribute("tabindex")||(t.tabIndex=0)),t.addEventListener("pointerdown",r,s),e&&t.addEventListener("focus",t=>((t,e)=>{const n=t.currentTarget;if(!n)return;const i=J(()=>{if(Z.has(n))return;Q(n,"down");const t=J(()=>{Q(n,"up")});n.addEventListener("keyup",t,e),n.addEventListener("blur",()=>Q(n,"cancel"),e)});n.addEventListener("keydown",i,e),n.addEventListener("blur",()=>n.removeEventListener("keydown",i),e)})(t,s),s)}),o}const nt={skipAnimations:!1,useManualTiming:!1},it=["read","resolveKeyframes","update","preRender","render","postRender"],st={value:null,addProjectionMetrics:null};function ot(t,e){let n=!1,i=!0;const s={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,r=it.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&&st.value&&st.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=nt.useManualTiming?s.timestamp:performance.now();n=!1,nt.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:it.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<it.length;e++)r[it[e]].cancel(t)},state:s,steps:r}}const{schedule:rt,cancel:at,state:lt,steps:ut}=ot("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:x,!0),ct=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],ht=new Set(ct),dt=new Set(["width","height","top","left","right","bottom",...ct]),pt=t=>Array.isArray(t);let mt;function ft(){mt=void 0}const gt={now:()=>(void 0===mt&>.set(lt.isProcessing||nt.useManualTiming?lt.timestamp:performance.now()),mt),set:t=>{mt=t,queueMicrotask(ft)}};function yt(t,e){-1===t.indexOf(e)&&t.push(e)}function vt(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}class xt{constructor(){this.subscriptions=[]}add(t){return yt(this.subscriptions,t),()=>vt(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}}function wt(t,e){return e?t*(1e3/e):0}const Pt={current:void 0};class Tt{constructor(t,e={}){this.version="12.4.11",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(t,e=!0)=>{const n=gt.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=gt.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 xt);const n=this.events[t].add(e);return"change"===t?()=>{n(),rt.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 Pt.current&&Pt.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const t=gt.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||t-this.updatedAt>30)return 0;const e=Math.min(this.updatedAt-this.prevUpdatedAt,30);return wt(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 St(t,e){return new Tt(t,e)}function bt(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,St(n))}function At(t,e){const n=v(t,e);let{transitionEnd:i={},transition:s={},...o}=n||{};o={...o,...i};for(const e in o){bt(t,e,(r=o[e],pt(r)?r[r.length-1]||0:r))}var r}const Et=t=>Boolean(t&&t.getVelocity);function Ct(t,e){const n=t.getValue("willChange");if(i=n,Boolean(Et(i)&&i.add))return n.add(e);var i}const Mt=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Vt="data-"+Mt("framerAppearId");function Rt(t){return t.props[Vt]}const Dt={current:!1},kt=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t;function Lt(t,e,n,i){if(t===e&&n===i)return x;const s=e=>function(t,e,n,i,s){let o,r,a=0;do{r=e+(n-e)/2,o=kt(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:kt(s(t),e,i)}const Bt=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,Ft=t=>e=>1-t(1-e),Ot=Lt(.33,1.53,.69,.99),jt=Ft(Ot),It=Bt(jt),Ut=t=>(t*=2)<1?.5*jt(t):.5*(2-Math.pow(2,-10*(t-1))),Wt=t=>1-Math.sin(Math.acos(t)),Nt=Ft(Wt),zt=Bt(Wt),$t=t=>/^0[^.\s]+$/u.test(t);const Ht=(t,e,n)=>n>e?e:n<t?t:n,Xt={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},Yt={...Xt,transform:t=>Ht(0,1,t)},Kt={...Xt,default:1},Gt=t=>Math.round(1e5*t)/1e5,_t=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;const qt=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Zt=(t,e)=>n=>Boolean("string"==typeof n&&qt.test(n)&&n.startsWith(t)||e&&!function(t){return null==t}(n)&&Object.prototype.hasOwnProperty.call(n,e)),Jt=(t,e,n)=>i=>{if("string"!=typeof i)return i;const[s,o,r,a]=i.match(_t);return{[t]:parseFloat(s),[e]:parseFloat(o),[n]:parseFloat(r),alpha:void 0!==a?parseFloat(a):1}},Qt={...Xt,transform:t=>Math.round((t=>Ht(0,255,t))(t))},te={test:Zt("rgb","red"),parse:Jt("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:i=1})=>"rgba("+Qt.transform(t)+", "+Qt.transform(e)+", "+Qt.transform(n)+", "+Gt(Yt.transform(i))+")"};const ee={test:Zt("#"),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:te.transform},ne=t=>({test:e=>"string"==typeof e&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),ie=ne("deg"),se=ne("%"),oe=ne("px"),re=ne("vh"),ae=ne("vw"),le={...se,parse:t=>se.parse(t)/100,transform:t=>se.transform(100*t)},ue={test:Zt("hsl","hue"),parse:Jt("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:i=1})=>"hsla("+Math.round(t)+", "+se.transform(Gt(e))+", "+se.transform(Gt(n))+", "+Gt(Yt.transform(i))+")"},ce={test:t=>te.test(t)||ee.test(t)||ue.test(t),parse:t=>te.test(t)?te.parse(t):ue.test(t)?ue.parse(t):ee.parse(t),transform:t=>"string"==typeof t?t:t.hasOwnProperty("red")?te.transform(t):ue.transform(t)},he=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;const de=/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 pe(t){const e=t.toString(),n=[],i={color:[],number:[],var:[]},s=[];let o=0;const r=e.replace(de,t=>(ce.test(t)?(i.color.push(o),s.push("color"),n.push(ce.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 me(t){return pe(t).values}function fe(t){const{split:e,types:n}=pe(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?Gt(t[o]):"color"===e?ce.transform(t[o]):t[o]}return s}}const ge=t=>"number"==typeof t?0:t;const ye={test:function(t){var e,n;return isNaN(t)&&"string"==typeof t&&((null===(e=t.match(_t))||void 0===e?void 0:e.length)||0)+((null===(n=t.match(he))||void 0===n?void 0:n.length)||0)>0},parse:me,createTransformer:fe,getAnimatableNone:function(t){const e=me(t);return fe(t)(e.map(ge))}},ve=new Set(["brightness","contrast","saturate","opacity"]);function xe(t){const[e,n]=t.slice(0,-1).split("(");if("drop-shadow"===e)return t;const[i]=n.match(_t)||[];if(!i)return t;const s=n.replace(i,"");let o=ve.has(e)?1:0;return i!==n&&(o*=100),e+"("+o+s+")"}const we=/\b([a-z-]*)\(.*?\)/gu,Pe={...ye,getAnimatableNone:t=>{const e=t.match(we);return e?e.map(xe).join(" "):t}},Te={borderWidth:oe,borderTopWidth:oe,borderRightWidth:oe,borderBottomWidth:oe,borderLeftWidth:oe,borderRadius:oe,radius:oe,borderTopLeftRadius:oe,borderTopRightRadius:oe,borderBottomRightRadius:oe,borderBottomLeftRadius:oe,width:oe,maxWidth:oe,height:oe,maxHeight:oe,top:oe,right:oe,bottom:oe,left:oe,padding:oe,paddingTop:oe,paddingRight:oe,paddingBottom:oe,paddingLeft:oe,margin:oe,marginTop:oe,marginRight:oe,marginBottom:oe,marginLeft:oe,backgroundPositionX:oe,backgroundPositionY:oe},Se={rotate:ie,rotateX:ie,rotateY:ie,rotateZ:ie,scale:Kt,scaleX:Kt,scaleY:Kt,scaleZ:Kt,skew:ie,skewX:ie,skewY:ie,distance:oe,translateX:oe,translateY:oe,translateZ:oe,x:oe,y:oe,z:oe,perspective:oe,transformPerspective:oe,opacity:Yt,originX:le,originY:le,originZ:oe},be={...Xt,transform:Math.round},Ae={...Te,...Se,zIndex:be,size:oe,fillOpacity:Yt,strokeOpacity:Yt,numOctaves:be},Ee={...Ae,color:ce,backgroundColor:ce,outlineColor:ce,fill:ce,stroke:ce,borderColor:ce,borderTopColor:ce,borderRightColor:ce,borderBottomColor:ce,borderLeftColor:ce,filter:Pe,WebkitFilter:Pe},Ce=t=>Ee[t];function Me(t,e){let n=Ce(t);return n!==Pe&&(n=ye),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const Ve=new Set(["auto","none","0"]);const Re=t=>t===Xt||t===oe,De=(t,e)=>parseFloat(t.split(", ")[e]),ke=(t,e)=>(n,{transform:i})=>{if("none"===i||!i)return 0;const s=i.match(/^matrix3d\((.+)\)$/u);if(s)return De(s[1],e);{const e=i.match(/^matrix\((.+)\)$/u);return e?De(e[1],t):0}},Le=new Set(["x","y","z"]),Be=ct.filter(t=>!Le.has(t));const Fe={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:ke(4,13),y:ke(5,14)};Fe.translateX=Fe.x,Fe.translateY=Fe.y;const Oe=new Set;let je=!1,Ie=!1;function Ue(){if(Ie){const t=Array.from(Oe).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 Be.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)})}Ie=!1,je=!1,Oe.forEach(t=>t.complete()),Oe.clear()}function We(){Oe.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(Ie=!0)})}class Ne{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?(Oe.add(this),je||(je=!0,rt.read(We),rt.resolveKeyframes(Ue))):(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),Oe.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,Oe.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const ze=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),$e=t=>e=>"string"==typeof e&&e.startsWith(t),He=$e("--"),Xe=$e("var(--"),Ye=t=>!!Xe(t)&&Ke.test(t.split("/*")[0].trim()),Ke=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Ge=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function _e(t,e,n=1){const[i,s]=function(t){const e=Ge.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 ze(t)?parseFloat(t):t}return Ye(s)?_e(s,e,n+1):s}const qe=t=>e=>e.test(t),Ze=[Xt,oe,se,ie,ae,re,{test:t=>"auto"===t,parse:t=>t}],Je=t=>Ze.find(qe(t));class Qe extends Ne{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(),Ye(i))){const s=_e(i,e.current);void 0!==s&&(t[n]=s),n===t.length-1&&(this.finalKeyframe=i)}}if(this.resolveNoneKeyframes(),!dt.has(n)||2!==t.length)return;const[i,s]=t,o=Je(i),r=Je(s);if(o!==r)if(Re(o)&&Re(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||$t(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&&!Ve.has(e)&&pe(e).values.length&&(s=t[i]),i++}if(s&&n)for(const i of e)t[i]=Me(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=Fe[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]=Fe[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 tn=(t,e)=>"zIndex"!==e&&(!("number"!=typeof t&&!Array.isArray(t))||!("string"!=typeof t||!ye.test(t)&&"0"!==t||t.startsWith("url(")));function en(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=tn(s,e),a=tn(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||D(n))&&i)}const nn=t=>null!==t;function sn(t,{repeat:e,repeatType:n="loop"},i){const s=t.filter(nn),o=e&&"loop"!==n&&e%2==1?0:s.length-1;return o&&void 0!==i?i:s[o]}class on{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=gt.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||(We(),Ue()),this._resolved}onKeyframesResolved(t,e){this.resolvedAt=gt.now(),this.hasAttemptedResolve=!0;const{name:n,type:i,velocity:s,delay:o,onComplete:r,onUpdate:a,isGenerator:l}=this.options;if(!l&&!en(t,n,i,s)){if(Dt.current||!o)return a&&a(sn(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})}}const rn=(t,e,n)=>t+(e-t)*n;function an(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 ln(t,e){return n=>n>0?e:t}const un=(t,e,n)=>{const i=t*t,s=n*(e*e-i)+i;return s<0?0:Math.sqrt(s)},cn=[ee,te,ue];function hn(t){const e=(n=t,cn.find(t=>t.test(n)));var n;if(!Boolean(e))return!1;let i=e.parse(t);return e===ue&&(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=an(a,i,t+1/3),o=an(a,i,t),r=an(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=hn(t),i=hn(e);if(!n||!i)return ln(t,e);const s={...n};return t=>(s.red=un(n.red,i.red,t),s.green=un(n.green,i.green,t),s.blue=un(n.blue,i.blue,t),s.alpha=rn(n.alpha,i.alpha,t),te.transform(s))},pn=(t,e)=>n=>e(t(n)),mn=(...t)=>t.reduce(pn),fn=new Set(["none","hidden"]);function gn(t,e){return n=>rn(t,e,n)}function yn(t){return"number"==typeof t?gn:"string"==typeof t?Ye(t)?ln:ce.test(t)?dn:wn:Array.isArray(t)?vn:"object"==typeof t?ce.test(t)?dn:xn:ln}function vn(t,e){const n=[...t],i=n.length,s=t.map((t,n)=>yn(t)(t,e[n]));return t=>{for(let e=0;e<i;e++)n[e]=s[e](t);return n}}function xn(t,e){const n={...t,...e},i={};for(const s in n)void 0!==t[s]&&void 0!==e[s]&&(i[s]=yn(t[s])(t[s],e[s]));return t=>{for(const e in i)n[e]=i[e](t);return n}}const wn=(t,e)=>{const n=ye.createTransformer(e),i=pe(t),s=pe(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?fn.has(t)&&!s.values.length||fn.has(e)&&!i.values.length?function(t,e){return fn.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}(t,e):mn(vn(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):ln(t,e)};function Pn(t,e,n){if("number"==typeof t&&"number"==typeof e&&"number"==typeof n)return rn(t,e,n);return yn(t)(t,e)}function Tn(t,e,n){const i=Math.max(e-5,0);return wt(n-t(i),e-i)}const Sn=100,bn=10,An=1,En=0,Cn=800,Mn=.3,Vn=.3,Rn={granular:.01,default:2},Dn={granular:.005,default:.5},kn=.01,Ln=10,Bn=.05,Fn=1;function On({duration:t=Cn,bounce:e=Mn,velocity:n=En,mass:i=An}){let s,o,r=1-e;r=Ht(Bn,Fn,r),t=Ht(kn,Ln,A(t)),r<1?(s=e=>{const i=e*r,s=i*t;return.001-(i-n)/jn(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=jn(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=b(t),isNaN(a))return{stiffness:Sn,damping:bn,duration:t};{const e=Math.pow(a,2)*i;return{stiffness:e,damping:2*r*Math.sqrt(i*e),duration:t}}}function jn(t,e){return t*Math.sqrt(1-e*e)}const In=["duration","bounce"],Un=["stiffness","damping","mass"];function Wn(t,e){return e.some(e=>void 0!==t[e])}function Nn(t=Vn,e=Mn){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:En,stiffness:Sn,damping:bn,mass:An,isResolvedFromDuration:!1,...t};if(!Wn(t,Un)&&Wn(t,In))if(t.visualDuration){const n=t.visualDuration,i=2*Math.PI/(1.2*n),s=i*i,o=2*Ht(.05,1,1-(t.bounce||0))*Math.sqrt(s);e={...e,mass:An,stiffness:s,damping:o}}else{const n=On(t);e={...e,...n,mass:An},e.isResolvedFromDuration=!0}return e}({...n,velocity:-A(n.velocity||0)}),m=d||0,f=u/(2*Math.sqrt(l*c)),g=r-o,y=A(Math.sqrt(l/c)),v=Math.abs(g)<5;let x;if(i||(i=v?Rn.granular:Rn.default),s||(s=v?Dn.granular:Dn.default),f<1){const t=jn(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?b(m):Tn(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(V(w),2e4),e=j(e=>w.next(t*e).value,t,30);return t+"ms "+e}};return w}function zn({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 T=t=>{var e;(e=d.value,void 0!==a&&e<a||void 0!==l&&e>l)&&(w=t,P=Nn({keyframes:[d.value,p(d.value)],velocity:Tn(v,t,d.value),damping:s,stiffness:o,restDelta:u,restSpeed:c}))};return T(0),{calculatedDuration:null,next:t=>{let e=!1;return P||void 0!==w||(e=!0,x(t),T(t)),void 0!==w&&t>=w?P.next(t-w):(!e&&x(t),d)}}}const $n=Lt(.42,0,1,1),Hn=Lt(0,0,.58,1),Xn=Lt(.42,0,.58,1),Yn=t=>Array.isArray(t)&&"number"!=typeof t[0],Kn={linear:x,easeIn:$n,easeInOut:Xn,easeOut:Hn,circIn:Wt,circInOut:zt,circOut:Nt,backIn:jt,backInOut:It,backOut:Ot,anticipate:Ut},Gn=t=>{if(L(t)){P(4===t.length);const[e,n,i,s]=t;return Lt(e,n,i,s)}return"string"==typeof t?Kn[t]:t};function _n(t,e,{clamp:n=!0,ease:i,mixer:s}={}){const o=t.length;if(P(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||Pn,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]||x:e;o=mn(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=S(t[i],t[i+1],n);return a[i](s)};return n?e=>u(Ht(t[0],t[o-1],e)):u}function qn(t,e){const n=t[t.length-1];for(let i=1;i<=e;i++){const s=S(0,e,i);t.push(rn(n,1,s))}}function Zn(t){const e=[0];return qn(e,t.length-1),e}function Jn({duration:t=300,keyframes:e,times:n,ease:i="easeInOut"}){const s=Yn(i)?i.map(Gn):Gn(i),o={done:!1,value:e[0]},r=_n(function(t,e){return t.map(t=>t*e)}(n&&n.length===e.length?n:Zn(e),t),e,{ease:Array.isArray(s)?s:(a=e,l=s,a.map(()=>l||Xn).splice(0,a.length-1))});var a,l;return{calculatedDuration:t,next:e=>(o.value=r(e),o.done=e>=t,o)}}const Qn=t=>{const e=({timestamp:e})=>t(e);return{start:()=>rt.update(e,!0),stop:()=>at(e),now:()=>lt.isProcessing?lt.timestamp:gt.now()}},ti={decay:zn,inertia:zn,tween:Jn,keyframes:Jn,spring:Nn},ei=t=>t/100;class ni extends on{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)||Ne;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=D(e)?e:ti[e]||Jn;let a,l;r!==Jn&&"number"!=typeof t[0]&&(a=mn(ei,Pn(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=V(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=Ht(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 T=null===this.holdTime&&("finished"===this.state||"running"===this.state&&P);return T&&void 0!==i&&(w.value=sn(a,this.options,i)),f&&f(w.value),T&&this.finish(),w}get duration(){const{resolved:t}=this;return t?A(t.calculatedDuration):0}get time(){return A(this.currentTime)}set time(t){t=b(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=A(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved)return void(this.pendingPlayState="running");if(this.isStopped)return;const{driver:t=Qn,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 ii(t){return new ni(t)}const si=new Set(["opacity","clipPath","filter","transform"]);function oi(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&&O()?j(e,n):L(e)?U(e):Array.isArray(e)?e.map(e=>t(e,n)||W.easeOut):W[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 ri=T(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));const ai={anticipate:Ut,backInOut:It,circInOut:zt};class li extends on{constructor(t){super(t);const{name:e,motionValue:n,element:i,keyframes:s}=this.options;this.resolver=new Qe(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&&O()&&s in ai&&(s=ai[s]),D((u=this.options).type)||"spring"===u.type||!I(u.ease)){const{onComplete:e,onUpdate:r,motionValue:a,element:l,...u}=this.options,c=function(t,e){const n=new ni({...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=oi(r.owner.current,a,t,{...this.options,duration:n,times:i,ease:s});return c.startTime=null!=l?l:this.calcStartTime(),this.pendingTimeline?(k(c,this.pendingTimeline),this.pendingTimeline=void 0):c.onfinish=()=>{const{onComplete:n}=this.options;r.set(sn(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 A(e)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:e}=t;return A(e.currentTime||0)}set time(t){const{resolved:e}=this;if(!e)return;const{animation:n}=e;n.currentTime=b(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 x;const{animation:n}=e;k(n,t)}else this.pendingTimeline=t;return x}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 ni({...u,keyframes:n,duration:i,type:s,ease:o,times:r,isGenerator:!0}),h=b(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 ri()&&n&&si.has(n)&&!a&&!l&&!i&&"mirror"!==s&&0!==o&&"inertia"!==r}}const ui={type:"spring",stiffness:500,damping:25,restSpeed:10},ci={type:"keyframes",duration:.8},hi={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},di=(t,{keyframes:e})=>e.length>2?ci:ht.has(t)?t.startsWith("scale")?{type:"spring",stiffness:550,damping:0===e[1]?2*Math.sqrt(550):30,restSpeed:10}:ui:hi;const pi=(t,e,n,i={},s,o)=>r=>{const a=M(i,t)||{},l=a.delay||i.delay||0;let{elapsed:u=0}=i;u-=b(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=b(c.duration)),c.repeatDelay&&(c.repeatDelay=b(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)),(Dt.current||nt.skipAnimations)&&(h=!0,c.duration=0,c.delay=0),c.allowFlatten=!a.type&&!a.ease,h&&!o&&void 0!==e.get()){const t=sn(c.keyframes,a);if(void 0!==t)return rt.update(()=>{c.onUpdate(t),c.onComplete()}),new C([])}return!o&&li.supports(c)?new li(c):new ni(c)};function mi({protectedKeys:t,needsAnimating:e},n){const i=t.hasOwnProperty(n)&&!0!==e[n];return e[n]=!1,i}function fi(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&&mi(c,e))continue;const a={delay:n,...M(r||{},e)};let h=!1;if(window.MotionHandoffAnimation){const n=Rt(t);if(n){const t=window.MotionHandoffAnimation(n,e,rt);null!==t&&(a.startTime=t,h=!0)}}Ct(t,e),i.start(pi(e,i,s,t.shouldReduceMotion&&dt.has(e)?{type:!1}:a,t,h));const d=i.animation;d&&u.push(d)}return a&&Promise.all(u).then(()=>{rt.update(()=>{a&&At(t,a)})}),u}function gi(t,e,n={}){var i;const s=v(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(fi(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(yi).forEach((t,i)=>{t.notify("AnimationStart",e),r.push(gi(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 yi(t,e){return t.sortNodePosition(e)}function vi(t,e,n={}){let i;if(t.notify("AnimationStart",e),Array.isArray(e)){const s=e.map(e=>gi(t,e,n));i=Promise.all(s)}else if("string"==typeof e)i=gi(t,e,n);else{const s="function"==typeof e?v(t,e,n.custom):e;i=Promise.all(fi(t,s,n))}return i.then(()=>{t.notify("AnimationComplete",e)})}function xi(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}function wi(t){return"string"==typeof t||Array.isArray(t)}const Pi=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Ti=["initial",...Pi],Si=Ti.length;const bi=[...Pi].reverse(),Ai=Pi.length;function Ei(t){let e=function(t){return e=>Promise.all(e.map(({animation:e,options:n})=>vi(t,e,n)))}(t),n=Vi(),i=!0;const s=e=>(n,i)=>{var s;const o=v(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<Si;t++){const i=Ti[t],s=e.props[i];(wi(s)||!1===s)&&(n[i]=s)}return n}(t.parent)||{},l=[],u=new Set;let c={},h=1/0;for(let e=0;e<Ai;e++){const d=bi[e],p=n[d],m=void 0!==r[d]?r[d]:a[d],g=wi(m),y=d===o?p.isActive:null;!1===y&&(h=e);let v=m===a[d]&&m!==r[d]&&g;if(v&&i&&t.manuallyAnimateOnMount&&(v=!1),p.protectedKeys={...c},!p.isActive&&null===y||!m&&!p.prevProp||f(m)||"boolean"==typeof m)continue;const x=Ci(p.prevProp,m);let w=x||d===o&&p.isActive&&!v&&g||e>h&&g,P=!1;const T=Array.isArray(m)?m:[m];let S=T.reduce(s(d),{});!1===y&&(S={});const{prevResolvedValues:b={}}=p,A={...b,...S},E=e=>{w=!0,u.has(e)&&(P=!0,u.delete(e)),p.needsAnimating[e]=!0;const n=t.getValue(e);n&&(n.liveStyle=!1)};for(const t in A){const e=S[t],n=b[t];if(c.hasOwnProperty(t))continue;let i=!1;i=pt(e)&&pt(n)?!xi(e,n):e!==n,i?null!=e?E(t):u.add(t):void 0!==e&&u.has(t)?E(t):p.protectedKeys[t]=!0}p.prevProp=m,p.prevResolvedValues=S,p.isActive&&(c={...c,...S}),i&&t.blockInitialAnimation&&(w=!1);const C=!(v&&x)||P;w&&C&&l.push(...T.map(t=>({animation:t,options:{type:d}})))}if(u.size){const e={};if("boolean"!=typeof r.initial){const n=v(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=Vi(),i=!0}}}function Ci(t,e){return"string"==typeof e?e!==t:!!Array.isArray(e)&&!xi(e,t)}function Mi(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Vi(){return{animate:Mi(!0),whileInView:Mi(),whileHover:Mi(),whileTap:Mi(),whileDrag:Mi(),whileFocus:Mi(),exit:Mi()}}class Ri{constructor(t){this.isMounted=!1,this.node=t}update(){}}let Di=0;const ki={animation:{Feature:class extends Ri{constructor(t){super(t),t.animationState||(t.animationState=Ei(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();f(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 Ri{constructor(){super(...arguments),this.id=Di++}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(){}}}},Li=e.createContext({}),Bi=()=>({x:{min:0,max:0},y:{min:0,max:0}});function Fi(t){return t.max-t.min}function Oi(t,e,n,i=.5){t.origin=i,t.originPoint=rn(e.min,e.max,t.origin),t.scale=Fi(n)/Fi(e),t.translate=rn(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 ji(t,e,n,i){Oi(t.x,e.x,n.x,i?i.originX:void 0),Oi(t.y,e.y,n.y,i?i.originY:void 0)}function Ii(t,e,n){t.min=n.min+e.min,t.max=t.min+Fi(e)}function Ui(t,e,n){t.min=e.min-n.min,t.max=t.min+Fi(e)}function Wi(t,e,n){Ui(t.x,e.x,n.x),Ui(t.y,e.y,n.y)}const Ni=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 zi(t){return t.startsWith("while")||t.startsWith("drag")&&"draggable"!==t||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||Ni.has(t)}let $i=t=>!zi(t);function Hi(t){t&&($i=e=>e.startsWith("on")?!zi(e):t(e))}try{Hi(require("@emotion/is-prop-valid").default)}catch(t){}function Xi(t,e,n){const i={};for(const s in t)"values"===s&&"object"==typeof t.values||($i(s)||!0===n&&zi(s)||!e&&!zi(s)||t.draggable&&s.startsWith("onDrag"))&&(i[s]=t[s]);return i}const Yi=e.createContext(null);function Ki(t){return f(t.animate)||Ti.some(e=>wi(t[e]))}function Gi(t){return Boolean(Ki(t)||t.variants)}function _i(t){const n=e.useRef(null);return null===n.current&&(n.current=t()),n.current}function qi(t){const e=Et(t)?t.get():t;return n=e,Boolean(n&&"object"==typeof n&&n.mix&&n.toValue)?e.toValue():e;var n}const Zi=t=>(n,i)=>{const s=e.useContext(Li),o=e.useContext(Yi),r=()=>function({scrapeMotionValuesFromProps:t,createRenderState:e,onUpdate:n},i,s,o){const r={latestValues:Ji(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():_i(r)};function Ji(t,e,n,i){const s={},o=i(t,{});for(const t in o)s[t]=qi(o[t]);let{initial:r,animate:a}=t;const l=Ki(t),u=Gi(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&&!f(h)){const e=Array.isArray(h)?h:[h];for(let n=0;n<e.length;n++){const i=y(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}function Qi(t,e,n,i={passive:!0}){return t.addEventListener(e,n,i),()=>t.removeEventListener(e,n)}function ts(t){return{point:{x:t.pageX,y:t.pageY}}}const es=t=>e=>_(e)&&t(e,ts(e));function ns(t,e,n,i){return Qi(t,e,es(n),i)}const is="undefined"!=typeof window;function ss(t){return e.useEffect(()=>()=>t(),[])}const os=is?e.useLayoutEffect:e.useEffect;function rs(){const t=function(){const t=e.useRef(!1);return os(()=>(t.current=!0,()=>{t.current=!1}),[]),t}(),[n,i]=e.useState(0),s=e.useCallback(()=>{t.current&&i(n+1)},[n]);return[e.useCallback(()=>rt.postRender(s),[s]),n]}const as=e.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"});class ls 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 us({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(as);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(ls,{isPresent:n,childRef:r,sizeRef:a,children:i.cloneElement(t,{ref:r})})}const cs=({children:t,initial:n,isPresent:s,onExitComplete:o,custom:r,presenceAffectsLayout:a,mode:l,anchorX:u})=>{const c=_i(hs),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(us,{isPresent:s,anchorX:u,children:t})),d(Yi.Provider,{value:m,children:t})};function hs(){return new Map}function ds(t=!0){const n=e.useContext(Yi);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 ps=t=>t.key||"";function ms(t){const n=[];return e.Children.forEach(t,t=>{e.isValidElement(t)&&n.push(t)}),n}const fs=e.createContext(null),gs=t=>!t.isLayoutDirty&&t.willUpdate(!1);function ys(){const t=new Set,e=new WeakMap,n=()=>t.forEach(gs);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}}function vs(t,e,n){const i=Et(t)?t:St(t);return i.start(pi("",i,e,n)),i.animation}const xs=(t,e,n)=>{const i=e-t;return((n-t)%i+i)%i+t};function ws(t,e){return Yn(t)?t[xs(0,t.length,e)]:t}function Ps(t){return"object"==typeof t&&!Array.isArray(t)}function Ts(t,e,n,i){return"string"==typeof t&&Ps(e)?$(t,n,i):t instanceof NodeList?Array.from(t):Array.isArray(t)?t:[t]}function Ss(t,e,n){return t*(e+1)}function bs(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 As(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&&(vt(t,s),i--)}}(t,s,o);for(let r=0;r<e.length;r++)t.push({value:e[r],at:rn(s,o,i[r]),easing:ws(n,r)})}function Es(t,e){for(let n=0;n<t.length;n++)t[n]=t[n]/(e+1)}function Cs(t,e){return t.at===e.at?null===t.value?1:null===e.value?-1:0:t.at-e.at}function Ms(t,e){return!e.has(t)&&e.set(t,{}),e.get(t)}function Vs(t,e){return e[t]||(e[t]=[]),e[t]}function Rs(t){return Array.isArray(t)?t:[t]}function Ds(t,e){return t&&t[e]?{...t,...t[e]}:{...t}}const ks=t=>"number"==typeof t,Ls=t=>t.every(ks),Bs=new WeakMap;function Fs(t){return t instanceof SVGElement&&"svg"!==t.tagName}const Os={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"]},js={};for(const t in Os)js[t]={isEnabled:e=>Os[t].some(t=>!!e[t])};const Is={current:null},Us={current:!1};function Ws(){if(Us.current=!0,is)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>Is.current=t.matches;t.addListener(e),e()}else Is.current=!1}const Ns=[...Ze,ce,ye];const zs=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class $s{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=Ne,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=gt.now();this.renderScheduledAt<t&&(this.renderScheduledAt=t,rt.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=Ki(e),this.isVariantNode=Gi(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]&&Et(e)&&e.set(a[t],!1)}}mount(t){this.current=t,Bs.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)),Us.current||Ws(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||Is.current),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),at(this.notifyUpdate),at(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=ht.has(t);n&&this.onBindTransform&&this.onBindTransform();const i=e.on("change",e=>{this.latestValues[t]=e,this.props.onUpdate&&rt.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 js){const e=js[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<zs.length;e++){const n=zs[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(Et(s))t.addValue(i,s);else if(Et(o))t.addValue(i,St(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,St(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=St(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&&(ze(i)||$t(i))?i=parseFloat(i):(s=i,!Ns.find(qe(s))&&ye.test(e)&&(i=Me(t,e))),this.setBaseTarget(t,Et(i)?i.get():i)),Et(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=y(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||Et(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 xt),this.events[t].add(e)}notify(t,...e){this.events[t]&&this.events[t].notify(...e)}}class Hs extends $s{constructor(){super(...arguments),this.KeyframeResolver=Qe}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;Et(t)&&(this.childSubscription=t.on("change",t=>{this.current&&(this.current.textContent=""+t)}))}}const Xs=(t,e)=>e&&"number"==typeof t?e.transform(t):t,Ys={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Ks=ct.length;function Gs(t,e,n){let i="",s=!0;for(let o=0;o<Ks;o++){const r=ct[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=Xs(a,Ae[r]);if(!l){s=!1;i+=`${Ys[r]||r}(${t}) `}n&&(e[r]=t)}}return i=i.trim(),n?i=n(e,s?"":i):s&&(i="none"),i}function _s(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(ht.has(t))r=!0;else if(He(t))s[t]=n;else{const e=Xs(n,Ae[t]);t.startsWith("origin")?(a=!0,o[t]=e):i[t]=e}}if(e.transform||(r||n?i.transform=Gs(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}`}}const qs={offset:"stroke-dashoffset",array:"stroke-dasharray"},Zs={offset:"strokeDashoffset",array:"strokeDasharray"};function Js(t,e,n){return"string"==typeof t?t:oe.transform(e+n*t)}function Qs(t,{attrX:e,attrY:n,attrScale:i,originX:s,originY:o,pathLength:r,pathSpacing:a=1,pathOffset:l=0,...u},c,h){if(_s(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`${Js(e,t.x,t.width)} ${Js(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?qs:Zs;t[o.offset]=oe.transform(-i);const r=oe.transform(e),a=oe.transform(n);t[o.array]=`${r} ${a}`}(d,r,a,l,!1)}const to=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"]),eo=t=>"string"==typeof t&&"svg"===t.toLowerCase();function no(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}}}function io(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 so(t,e,n,i){io(t,e,void 0,i);for(const n in e.attrs)t.setAttribute(to.has(n)?n:Mt(n),e.attrs[n])}const oo={};function ro(t){for(const e in t)oo[e]=t[e],He(e)&&(oo[e].isCSSVariable=!0)}function ao(t,{layout:e,layoutId:n}){return ht.has(t)||t.startsWith("origin")||(e||void 0!==n)&&(!!oo[t]||"opacity"===t)}function lo(t,e,n){var i;const{style:s}=t,o={};for(const r in s)(Et(s[r])||e.style&&Et(e.style[r])||ao(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}function uo(t,e,n){const i=lo(t,e,n);for(const n in t)if(Et(t[n])||Et(e[n])){i[-1!==ct.indexOf(n)?"attr"+n.charAt(0).toUpperCase()+n.substring(1):n]=t[n]}return i}class co extends Hs{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Bi,this.updateDimensions=()=>{this.current&&!this.renderState.dimensions&&no(this.current,this.renderState)}}getBaseTargetFromProps(t,e){return t[e]}readValueFromInstance(t,e){if(ht.has(e)){const t=Ce(e);return t&&t.default||0}return e=to.has(e)?e:Mt(e),t.getAttribute(e)}scrapeMotionValuesFromProps(t,e,n){return uo(t,e,n)}onBindTransform(){this.current&&!this.renderState.dimensions&&rt.postRender(this.updateDimensions)}build(t,e,n){Qs(t,e,this.isSVGTag,n.transformTemplate)}renderInstance(t,e,n,i){so(t,e,0,i)}mount(t){this.isSVGTag=eo(t.tagName),super.mount(t)}}function ho({top:t,left:e,right:n,bottom:i}){return{x:{min:e,max:n},y:{min:t,max:i}}}function po(t){return void 0===t||1===t}function mo({scale:t,scaleX:e,scaleY:n}){return!po(t)||!po(e)||!po(n)}function fo(t){return mo(t)||go(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function go(t){return yo(t.x)||yo(t.y)}function yo(t){return t&&"0%"!==t}function vo(t,e,n){return n+e*(t-n)}function xo(t,e,n,i,s){return void 0!==s&&(t=vo(t,s,i)),vo(t,n,i)+e}function wo(t,e=0,n=1,i,s){t.min=xo(t.min,e,n,i,s),t.max=xo(t.max,e,n,i,s)}function Po(t,{x:e,y:n}){wo(t.x,e.translate,e.scale,e.originPoint),wo(t.y,n.translate,n.scale,n.originPoint)}function To(t,e){t.min=t.min+e,t.max=t.max+e}function So(t,e,n,i,s=.5){wo(t,e,n,rn(t.min,t.max,s),i)}function bo(t,e){So(t.x,e.x,e.scaleX,e.scale,e.originX),So(t.y,e.y,e.scaleY,e.scale,e.originY)}function Ao(t,e){return ho(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))}class Eo extends Hs{constructor(){super(...arguments),this.type="html",this.renderInstance=io}readValueFromInstance(t,e){if(ht.has(e)){const t=Ce(e);return t&&t.default||0}{const i=(n=t,window.getComputedStyle(n)),s=(He(e)?i.getPropertyValue(e):i[e])||0;return"string"==typeof s?s.trim():s}var n}measureInstanceViewportBox(t,{transformPagePoint:e}){return Ao(t,e)}build(t,e,n){_s(t,e,n.transformTemplate)}scrapeMotionValuesFromProps(t,e,n){return lo(t,e,n)}}class Co extends $s{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 Mo(t){const e={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=Fs(t)?new co(e):new Eo(e);n.mount(t),Bs.set(t,n)}function Vo(t){const e=new Co({presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}});e.mount(t),Bs.set(t,e)}function Ro(t,e,n,i){const s=[];if(function(t,e){return Et(t)||"number"==typeof t||"string"==typeof t&&!Ps(e)}(t,e))s.push(vs(t,Ps(e)&&e.default||e,n&&n.default||n));else{const o=Ts(t,e,i),r=o.length;for(let t=0;t<r;t++){const i=o[t],a=i instanceof Element?Mo:Vo;Bs.has(i)||a(i);const l=Bs.get(i),u={...n};"delay"in u&&"function"==typeof u.delay&&(u.delay=u.delay(t,r)),s.push(...fi(l,{...e,transition:u},{}))}}return s}function Do(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,bs(h,r.at,c,u));continue}let[p,m,f={}]=r;void 0!==f.at&&(h=bs(h,f.at,c,u));let g=0;const y=(t,n,i,r=0,a=0)=>{const l=Rs(t),{delay:u=0,times:c=Zn(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,T=l.length,S=D(p)?p:null==s?void 0:s[p];if(T<=2&&S){let t=100;if(2===T&&Ls(l)){const e=l[1]-l[0];t=Math.abs(e)}const e={...v};void 0!==w&&(e.duration=b(w));const n=R(e,t,S);x=n.ease,w=n.duration}null!=w||(w=o);const A=h+P;1===c.length&&0===c[0]&&(c[1]=1);const E=c.length-l.length;if(E>0&&qn(c,E),1===l.length&&l.unshift(null),m){w=Ss(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":ws(n,s-1))}Es(c,m)}const C=A+w;As(i,l,x,c,A,C),g=Math.max(P+w,g),d=Math.max(C,d)};if(Et(p)){y(m,f,Vs("default",Ms(p,a)))}else{const t=Ts(p,m,i,l),e=t.length;for(let n=0;n<e;n++){m=m,f=f;const i=Ms(t[n],a);for(const t in m)y(m[t],Ds(f,t),Vs(t,i),n,e)}}c=h,h+=g}return a.forEach((t,i)=>{for(const s in t){const o=t[s];o.sort(Cs);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(S(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:Nn}).forEach(({keyframes:t,transition:e},n)=>{i.push(...Ro(n,t,e))}),i}function ko(t){return function(e,n,i){let s=[];var o;o=e,s=Array.isArray(o)&&o.some(Array.isArray)?Do(e,n,t):Ro(e,n,i,t);const r=new C(s);return t&&t.animations.push(r),r}}const Lo=ko();function Bo(t,e,n){t.style.setProperty(e,n)}function Fo(t,e,n){t.style[e]=n}const Oo=T(()=>{try{document.createElement("div").animate({opacity:[1]})}catch(t){return!1}return!0}),jo=new WeakMap;function Io(t){const e=jo.get(t)||new Map;return jo.set(t,e),jo.get(t)}class Uo 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 A(Number(i))}get time(){var t;return this.animation?A((null===(t=this.animation)||void 0===t?void 0:t.currentTime)||0):0}set time(t){this.animation&&(this.animation.currentTime=b(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&&k(this.animation,t),x}complete(){this.animation&&this.animation.finish()}cancel(){try{this.animation&&this.animation.cancel()}catch(t){}}}{constructor(t,e,n,i){const s=e.startsWith("--");P("string"!=typeof i.type);const o=Io(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]&&Te[t]&&(e[i]=Te[t].transform(e[i]));!Oo()&&e.length<2&&e.unshift(n())}(e,n,()=>e.startsWith("--")?t.style.getPropertyValue(e):window.getComputedStyle(t)[e]),D(i.type)){const t=R(i,100,i.type);i.ease=O()?t.ease:"easeOut",i.duration=b(t.duration),i.type="keyframes"}else i.ease=i.ease||"easeOut";const r=()=>{this.setValue(t,e,sn(n,i)),this.cancel(),this.resolveFinishedPromise()},a=()=>{this.setValue=s?Bo:Fo,this.options=i,this.updateFinishedPromise(),this.removeAnimation=()=>{const n=jo.get(t);n&&n.delete(e)}};ri()?(super(oi(t,e,n,i)),a(),!1===i.autoplay&&this.animation.pause(),this.animation.onfinish=r,Io(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 Wo=t=>function(e,n,i){return new C(function(t,e,n,i){const s=$(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={...M(a,t)};s.duration=s.duration?b(s.duration):s.duration,s.delay=b(s.delay||0),s.allowFlatten=!a.type&&!a.ease,r.push(new Uo(i,t,n,s))}}return r}(e,n,i,t))},No=Wo();function zo(t,e){let n;const i=()=>{const{currentTime:i}=e,s=(null===i?0:i.value)/100;n!==s&&t(s),n=s};return rt.update(i,!0),()=>at(i)}const $o=new WeakMap;let Ho;function Xo({target:t,contentRect:e,borderBoxSize:n}){var i;null===(i=$o.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 Yo(t){t.forEach(Xo)}function Ko(t,e){Ho||"undefined"!=typeof ResizeObserver&&(Ho=new ResizeObserver(Yo));const n=$(t);return n.forEach(t=>{let n=$o.get(t);n||(n=new Set,$o.set(t,n)),n.add(e),null==Ho||Ho.observe(t)}),()=>{n.forEach(t=>{const n=$o.get(t);null==n||n.delete(e),(null==n?void 0:n.size)||null==Ho||Ho.unobserve(t)})}}const Go=new Set;let _o;function qo(t){return Go.add(t),_o||(_o=()=>{const t={width:window.innerWidth,height:window.innerHeight},e={target:window,size:t,contentSize:t};Go.forEach(t=>t(e))},window.addEventListener("resize",_o)),()=>{Go.delete(t),!Go.size&&_o&&(_o=void 0)}}const Zo={x:{length:"Width",position:"Left"},y:{length:"Height",position:"Top"}};function Jo(t,e,n,i){const s=n[e],{length:o,position:r}=Zo[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=S(0,s.scrollLength,s.current);const u=i-l;s.velocity=u>50?0:wt(s.current-a,u)}const Qo={start:0,center:.5,end:1};function tr(t,e,n=0){let i=0;if(t in Qo&&(t=Qo[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 er=[0,0];function nr(t,e,n,i){let s=Array.isArray(t)?t:er,o=0,r=0;return"number"==typeof t?s=[t,t]:"string"==typeof t&&(s=(t=t.trim()).includes(" ")?t.split(" "):[t,Qo[t]?t:"0"]),o=tr(s[0],n,i),r=tr(s[1],e),o-r}const ir={Enter:[[0,1],[1,1]],Exit:[[0,0],[1,0]],Any:[[1,0],[0,1]],All:[[0,0],[1,1]]},sr={x:0,y:0};function or(t,e,n){const{offset:i=ir.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):sr,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=nr(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=_n(e[o].offset,Zn(i),{clamp:!1}),e[o].interpolatorOffsets=[...e[o].offset]),e[o].progress=Ht(0,1,e[o].interpolate(e[o].current))}function rr(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){Jo(t,"x",e,n),Jo(t,"y",e,n),e.time=n}(t,n,e),(i.offset||i.target)&&or(t,n,i)},notify:()=>e(n)}}const ar=new WeakMap,lr=new WeakMap,ur=new WeakMap,cr=t=>t===document.documentElement?window:t;function hr(t,{container:e=document.documentElement,...n}={}){let i=ur.get(e);i||(i=new Set,ur.set(e,i));const s=rr(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),!ar.has(e)){const t=()=>{for(const t of i)t.measure()},n=()=>{for(const t of i)t.update(lt.timestamp)},s=()=>{for(const t of i)t.notify()},a=()=>{rt.read(t,!1,!0),rt.read(n,!1,!0),rt.update(s,!1,!0)};ar.set(e,a);const l=cr(e);window.addEventListener("resize",a,{passive:!0}),e!==document.documentElement&&lr.set(e,(r=a,"function"==typeof(o=e)?qo(o):Ko(o,r))),l.addEventListener("scroll",a,{passive:!0})}var o,r;const a=ar.get(e);return rt.read(a,!1,!0),()=>{var t;at(a);const n=ur.get(e);if(!n)return;if(n.delete(s),n.size)return;const i=ar.get(e);ar.delete(e),i&&(cr(e).removeEventListener("scroll",i),null===(t=lr.get(e))||void 0===t||t(),window.removeEventListener("resize",i))}}const dr=new Map;function pr({source:t,container:e=document.documentElement,axis:n="y"}={}){t&&(e=t),dr.has(e)||dr.set(e,{});const i=dr.get(e);return i[n]||(i[n]=E()?new ScrollTimeline({source:e,axis:n}):function({source:t,container:e,axis:n="y"}){t&&(e=t);const i={value:0},s=hr(t=>{i.value=100*t[n].progress},{container:e,axis:n});return{currentTime:i,cancel:s}}({source:e,axis:n})),i[n]}function mr(t){return t&&(t.target||t.offset)}function fr(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)||mr(e)?hr(n=>{t(n[e.axis].progress,n)},e):zo(t,pr(e))}(t,i):function(t,e){if(t.flatten(),mr(e))return t.pause(),hr(n=>{t.time=t.duration*n[e.axis].progress},e);{const n=pr(e);return t.attachTimeline?t.attachTimeline(n,t=>(t.pause(),zo(e=>{t.time=t.duration*e},n))):x}}(t,i)}const gr={some:0,all:1};function yr(t,e,{root:n,margin:i,amount:s="some"}={}){const o=$(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:gr[s]});return o.forEach(t=>a.observe(t)),()=>a.disconnect()}function vr(t,e){const n=gt.now(),i=({timestamp:s})=>{const o=s-n;o>=e&&(at(i),t(o-e))};return rt.read(i,!0),()=>at(i)}const xr=(t,e)=>Math.abs(t-e);function wr(t,e){const n=xr(t.x,e.x),i=xr(t.y,e.y);return Math.sqrt(n**2+i**2)}function Pr(...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=_n(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}const Tr=rt,Sr=it.reduce((t,e)=>(t[e]=t=>at(t),t),{}),{schedule:br,cancel:Ar}=ot(queueMicrotask,!1),Er=(t,e)=>t.depth-e.depth;class Cr{constructor(){this.children=[],this.isDirty=!1}add(t){yt(this.children,t),this.isDirty=!0}remove(t){vt(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(Er),this.isDirty=!1,this.children.forEach(t)}}const Mr=["TopLeft","TopRight","BottomLeft","BottomRight"],Vr=Mr.length,Rr=t=>"string"==typeof t?parseFloat(t):t,Dr=t=>"number"==typeof t||oe.test(t);function kr(t,e){return void 0!==t[e]?t[e]:t.borderRadius}const Lr=Fr(0,.5,Nt),Br=Fr(.5,.95,x);function Fr(t,e,n){return i=>i<t?0:i>e?1:n(S(t,e,i))}function Or(t,e){t.min=e.min,t.max=e.max}function jr(t,e){Or(t.x,e.x),Or(t.y,e.y)}function Ir(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}function Ur(t,e,n,i,s){return t=vo(t-=e,1/n,i),void 0!==s&&(t=vo(t,1/s,i)),t}function Wr(t,e,[n,i,s],o,r){!function(t,e=0,n=1,i=.5,s,o=t,r=t){if(se.test(e)){e=parseFloat(e);e=rn(r.min,r.max,e/100)-r.min}if("number"!=typeof e)return;let a=rn(o.min,o.max,i);t===o&&(a-=e),t.min=Ur(t.min,e,n,a,s),t.max=Ur(t.max,e,n,a,s)}(t,e[n],e[i],e[s],e.scale,o,r)}const Nr=["x","scaleX","originX"],zr=["y","scaleY","originY"];function $r(t,e,n,i){Wr(t.x,e,Nr,n?n.x:void 0,i?i.x:void 0),Wr(t.y,e,zr,n?n.y:void 0,i?i.y:void 0)}function Hr(t){return 0===t.translate&&1===t.scale}function Xr(t){return Hr(t.x)&&Hr(t.y)}function Yr(t,e){return t.min===e.min&&t.max===e.max}function Kr(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function Gr(t,e){return Kr(t.x,e.x)&&Kr(t.y,e.y)}function _r(t){return Fi(t.x)/Fi(t.y)}function qr(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}class Zr{constructor(){this.members=[]}add(t){yt(this.members,t),t.scheduleRender()}remove(t){if(vt(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)}}function Jr(t){return[t("x"),t("y")]}const Qr={hasAnimatedSinceResize:!0,hasEverUpdated:!1},ta=["","X","Y","Z"],ea={visibility:"hidden"};let na=0;function ia(t,e,n,i){const{latestValues:s}=e;s[t]&&(n[t]=s[t],e.setStaticValue(t,0),i&&(i[t]=0))}function sa({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:i,resetTransform:s}){return class{constructor(t={},n=(null==e?void 0:e())){this.id=na++,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(aa),this.nodes.forEach(ma),this.nodes.forEach(fa),this.nodes.forEach(la)},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 Cr)}addEventListener(t,e){return this.eventHandlers.has(t)||this.eventHandlers.set(t,new xt),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=Fs(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=vr(i,250),Qr.hasAnimatedSinceResize&&(Qr.hasAnimatedSinceResize=!1,this.nodes.forEach(pa))})}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()||Pa,{onLayoutAnimationStart:r,onLayoutAnimationComplete:a}=o.getProps(),l=!this.targetLayout||!Gr(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={...M(s,"layout"),onPlay:r,onComplete:a};(o.shouldReduceMotion||this.options.layoutRoot)&&(e.delay=0,e.type=!1),this.startAnimation(e)}else e||pa(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,at(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(ga),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=Rt(n);if(window.MotionHasOptimisedAnimation(i,"transform")){const{layout:t,layoutId:n}=e.options;window.MotionCancelOptimisedAnimation(i,"transform",rt,!(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(ca);this.isUpdating||this.nodes.forEach(ha),this.isUpdating=!1,this.nodes.forEach(da),this.nodes.forEach(oa),this.nodes.forEach(ra),this.clearAllSnapshots();const t=gt.now();lt.delta=Ht(0,1e3/60,t-lt.timestamp),lt.timestamp=t,lt.isProcessing=!0,ut.update.process(lt),ut.preRender.process(lt),ut.render.process(lt),lt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,br.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(ua),this.sharedNodes.forEach(ya)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,rt.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){rt.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure(),!this.snapshot||Fi(this.snapshot.measuredBox.x)||Fi(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&&!Xr(this.projectionDelta),n=this.getTransformTemplate(),i=n?n(this.latestValues,""):void 0,o=i!==this.prevTransformTemplateValue;t&&(e||fo(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)),ba((i=n).x),ba(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(Ea))){const{scroll:t}=this.root;t&&(To(n.x,t.offset.x),To(n.y,t.offset.y))}return n}removeElementScroll(t){var e;const n={x:{min:0,max:0},y:{min:0,max:0}};if(jr(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&&jr(n,t),To(n.x,s.offset.x),To(n.y,s.offset.y))}return n}applyTransform(t,e=!1){const n={x:{min:0,max:0},y:{min:0,max:0}};jr(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&&bo(n,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),fo(i.latestValues)&&bo(n,i.latestValues)}return fo(this.latestValues)&&bo(n,this.latestValues),n}removeTransform(t){const e={x:{min:0,max:0},y:{min:0,max:0}};jr(e,t);for(let t=0;t<this.path.length;t++){const n=this.path[t];if(!n.instance)continue;if(!fo(n.latestValues))continue;mo(n.latestValues)&&n.updateSnapshot();const i={x:{min:0,max:0},y:{min:0,max:0}};jr(i,n.measurePageBox()),$r(e,n.latestValues,n.snapshot?n.snapshot.layoutBox:void 0,i)}return fo(this.latestValues)&&$r(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!==lt.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=lt.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}},Wi(this.relativeTargetOrigin,this.layout.layoutBox,t.layout.layoutBox),jr(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,Ii(r.x,a.x,l.x),Ii(r.y,a.y,l.y)):this.targetDelta?(Boolean(this.resumingFrom)?this.target=this.applyTransform(this.layout.layoutBox):jr(this.target,this.layout.layoutBox),Po(this.target,this.targetDelta)):jr(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}},Wi(this.relativeTargetOrigin,this.target,t.target),jr(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(this.parent&&!mo(this.parent.latestValues)&&!go(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===lt.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;jr(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&&bo(t,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),r&&(e.x*=r.x.scale,e.y*=r.y.scale,Po(t,r)),i&&fo(o.latestValues)&&bo(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?(Ir(this.prevProjectionDelta.x,this.projectionDelta.x),Ir(this.prevProjectionDelta.y,this.projectionDelta.y)):this.createProjectionDeltas(),ji(this.projectionDelta,this.layoutCorrected,l,this.latestValues),this.treeScale.x===r&&this.treeScale.y===a&&qr(this.projectionDelta.x,this.prevProjectionDelta.x)&&qr(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(wa));let h;this.animationProgress=0,this.mixTargetDelta=e=>{const n=e/1e3;var l,d;va(o.x,t.x,n),va(o.y,t.y,n),this.setTargetDelta(o),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Wi(r,this.layout.layoutBox,this.relativeParent.layout.layoutBox),function(t,e,n,i){xa(t.x,e.x,n.x,i),xa(t.y,e.y,n.y,i)}(this.relativeTarget,this.relativeTargetOrigin,r,n),h&&(l=this.relativeTarget,d=h,Yr(l.x,d.x)&&Yr(l.y,d.y))&&(this.isProjectionDirty=!1),h||(h={x:{min:0,max:0},y:{min:0,max:0}}),jr(h,this.relativeTarget)),a&&(this.animationValues=s,function(t,e,n,i,s,o){s?(t.opacity=rn(0,void 0!==n.opacity?n.opacity:1,Lr(i)),t.opacityExit=rn(void 0!==e.opacity?e.opacity:1,0,Br(i))):o&&(t.opacity=rn(void 0!==e.opacity?e.opacity:1,void 0!==n.opacity?n.opacity:1,i));for(let s=0;s<Vr;s++){const o=`border${Mr[s]}Radius`;let r=kr(e,o),a=kr(n,o);if(void 0===r&&void 0===a)continue;r||(r=0),a||(a=0);0===r||0===a||Dr(r)===Dr(a)?(t[o]=Math.max(rn(Rr(r),Rr(a),i),0),(se.test(a)||se.test(r))&&(t[o]+="%")):t[o]=a}(e.rotate||n.rotate)&&(t.rotate=rn(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&&(at(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=rt.update(()=>{Qr.hasAnimatedSinceResize=!0,this.currentAnimation=vs(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&&Aa(this.options.animationType,this.layout.layoutBox,i.layoutBox)){n=this.target||{x:{min:0,max:0},y:{min:0,max:0}};const e=Fi(this.layout.layoutBox.x);n.x.min=t.target.x.min,n.x.max=n.x.min+e;const i=Fi(this.layout.layoutBox.y);n.y.min=t.target.y.min,n.y.max=n.y.min+i}jr(e,n),bo(e,s),ji(this.projectionDeltaWithTransform,this.layoutCorrected,e,s)}}registerSharedNode(t,e){this.sharedNodes.has(t)||this.sharedNodes.set(t,new Zr);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&&ia("z",t,i,this.animationValues);for(let e=0;e<ta.length;e++)ia("rotate"+ta[e],t,i,this.animationValues),ia("skew"+ta[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 ea;const i={visibility:""},s=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,i.opacity="",i.pointerEvents=qi(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=qi(null==t?void 0:t.pointerEvents)||""),this.hasProjected&&!fo(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 oo){if(void 0===r[t])continue;const{correct:e,applyTo:n,isCSSVariable:s}=oo[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?qi(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(ca),this.root.sharedNodes.clear()}}}function oa(t){t.updateLayout()}function ra(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?Jr(t=>{const i=o?n.measuredBox[t]:n.layoutBox[t],s=Fi(i);i.min=e[t].min,i.max=i.min+s}):Aa(s,n.layoutBox,e)&&Jr(i=>{const s=o?n.measuredBox[i]:n.layoutBox[i],r=Fi(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}};ji(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?ji(a,t.applyTransform(i,!0),n.measuredBox):ji(a,e,n.layoutBox);const l=!Xr(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}};Wi(r,n.layoutBox,s.layoutBox);const a={x:{min:0,max:0},y:{min:0,max:0}};Wi(a,e,o.layoutBox),Gr(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 aa(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 la(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function ua(t){t.clearSnapshot()}function ca(t){t.clearMeasurements()}function ha(t){t.isLayoutDirty=!1}function da(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function pa(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function ma(t){t.resolveTargetDelta()}function fa(t){t.calcProjection()}function ga(t){t.resetSkewAndRotation()}function ya(t){t.removeLeadSnapshot()}function va(t,e,n){t.translate=rn(e.translate,0,n),t.scale=rn(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function xa(t,e,n,i){t.min=rn(e.min,n.min,i),t.max=rn(e.max,n.max,i)}function wa(t){return t.animationValues&&void 0!==t.animationValues.opacityExit}const Pa={duration:.45,ease:[.4,0,.1,1]},Ta=t=>"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),Sa=Ta("applewebkit/")&&!Ta("chrome/")?Math.round:x;function ba(t){t.min=Sa(t.min),t.max=Sa(t.max)}function Aa(t,e,n){return"position"===t||"preserve-aspect"===t&&(i=_r(e),s=_r(n),o=.2,!(Math.abs(i-s)<=o));var i,s,o}function Ea(t){var e;return t!==t.root&&(null===(e=t.scroll)||void 0===e?void 0:e.wasRoot)}const Ca=sa({attachResizeListener:(t,e)=>Qi(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Ma={current:void 0},Va=sa({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!Ma.current){const t=new Ca({});t.mount(window),t.setOptions({layoutScroll:!0}),Ma.current=t}return Ma.current},resetTransform:(t,e)=>{t.style.transform=void 0!==e?e:"none"},checkIsScrollRoot:t=>Boolean("fixed"===window.getComputedStyle(t).position)});function Ra(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const Da={correct:(t,e)=>{if(!e.target)return t;if("string"==typeof t){if(!oe.test(t))return t;t=parseFloat(t)}return`${Ra(t,e.target.x)}% ${Ra(t,e.target.y)}%`}},ka={correct:(t,{treeScale:e,projectionDelta:n})=>{const i=t,s=ye.parse(t);if(s.length>5)return i;const o=ye.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=rn(a,l,.5);return"number"==typeof s[2+r]&&(s[2+r]/=u),"number"==typeof s[3+r]&&(s[3+r]/=u),o(s)}},La=t=>!0===t,Ba=({children:t,id:n,inherit:i=!0})=>{const s=e.useContext(m),o=e.useContext(fs),[r,a]=rs(),l=e.useRef(null),u=s.id||o;null===l.current&&((t=>La(!0===t)||"id"===t)(i)&&u&&(n=n?u+"-"+n:u),l.current={id:n,group:La(i)&&s.group||ys()});const c=e.useMemo(()=>({...l.current,forceRender:r}),[a]);return d(m.Provider,{value:c,children:t})},Fa=e.createContext({strict:!1});function Oa(t){for(const e in t)js[e]={...js[e],...t[e]}}function ja(t){return"function"==typeof t}const Ia=e.createContext(null);function Ua(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 Wa(t){return t&&"object"==typeof t&&Object.prototype.hasOwnProperty.call(t,"current")}class Na{constructor(t,e,{transformPagePoint:n,dragSnapToOrigin:i=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=()=>{if(!this.lastMoveEvent||!this.lastMoveEventInfo)return;const t=Ha(this.lastMoveEventInfo,this.history),e=null!==this.startEvent,n=wr(t.offset,{x:0,y:0})>=3;if(!e&&!n)return;const{point:i}=t,{timestamp:s}=lt;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)=>{if(this.index=Ga(t.currentTarget),t.target instanceof Element&&t.target.hasPointerCapture&&void 0!==t.pointerId)try{if(!t.target.hasPointerCapture(t.pointerId))return}catch(t){}this.lastMoveEvent=t,this.lastMoveEventInfo=za(e,this.transformPagePoint),rt.update(this.updatePoint,!0)},this.handlePointerUp=(t,e)=>{K(t,"release"),this.end();const{onEnd:n,onSessionEnd:i,resumeAnimation:s}=this.handlers;if(this.dragSnapToOrigin&&s&&s(),!this.lastMoveEvent||!this.lastMoveEventInfo)return;const o=Ha("pointercancel"===t.type||"lostpointercapture"===t.type?this.lastMoveEventInfo:za(e,this.transformPagePoint),this.history);this.startEvent&&n&&n(t,o),i&&i(t,o)},!_(t))return;this.dragSnapToOrigin=i,this.handlers=e,this.transformPagePoint=n;const s=za(ts(t),this.transformPagePoint),{point:o}=s,{timestamp:r}=lt;this.history=[{...o,timestamp:r}];const{onSessionStart:a}=e;a&&a(t,Ha(s,this.history)),K(t,"set"),this.removeListeners=mn(ns(t.currentTarget,"pointermove",this.handlePointerMove),ns(t.currentTarget,"pointerup",this.handlePointerUp),ns(t.currentTarget,"pointercancel",this.handlePointerUp),ns(t.currentTarget,"lostpointercapture",(t,e)=>{Ga(t.currentTarget)!==this.index?K(t,"set"):this.handlePointerUp(t,e)}))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),at(this.updatePoint)}}function za(t,e){return e?{point:e(t.point)}:t}function $a(t,e){return{x:t.x-e.x,y:t.y-e.y}}function Ha({point:t},e){return{point:t,delta:$a(t,Ya(e)),offset:$a(t,Xa(e)),velocity:Ka(e,.1)}}function Xa(t){return t[0]}function Ya(t){return t[t.length-1]}function Ka(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,i=null;const s=Ya(t);for(;n>=0&&(i=t[n],!(s.timestamp-i.timestamp>b(e)));)n--;if(!i)return{x:0,y:0};const o=A(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 Ga(t){return t.parentNode?Array.from(t.parentNode.children).indexOf(t):-1}function _a(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 qa(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 Za=.35;function Ja(t,e,n){return{min:Qa(t,e),max:Qa(t,n)}}function Qa(t,e){return"number"==typeof t?t:t[e]||0}const tl=new WeakMap;class el{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 Na(t,{onSessionStart:t=>{const{dragSnapToOrigin:n}=this.getProps();n?this.pauseAnimation():this.stopAnimation(),e&&this.snapToCursor(ts(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?N[o]?null:(N[o]=!0,()=>{N[o]=!1}):N.x||N.y?null:(N.x=N.y=!0,()=>{N.x=N.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),Jr(t=>{let e=this.getAxisMotionValue(t).get()||0;if(se.test(e)){const{projection:n}=this.visualElement;if(n&&n.layout){const i=n.layout.layoutBox[t];if(i){e=Fi(i)*(parseFloat(e)/100)}}}this.originPoint[t]=e}),s&&rt.postRender(()=>s(t,e)),Ct(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:()=>Jr(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})}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&&rt.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||!nl(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?rn(e,t,i.min):Math.max(t,e):void 0!==n&&t>n&&(t=i?rn(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&&Wa(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!e||!i)&&function(t,{top:e,left:n,bottom:i,right:s}){return{x:_a(t.x,n,s),y:_a(t.y,e,i)}}(i.layoutBox,e),this.elastic=function(t=Za){return!1===t?t=0:!0===t&&(t=Za),{x:Ja(t,"left","right"),y:Ja(t,"top","bottom")}}(n),s!==this.constraints&&i&&this.constraints&&!this.hasMutatedConstraints&&Jr(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||!Wa(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=Ao(t,n),{scroll:s}=e;return s&&(To(i.x,s.offset.x),To(i.y,s.offset.y)),i}(n,i.root,this.visualElement.getTransformPagePoint());let o=function(t,e){return{x:qa(t.x,e.x),y:qa(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=ho(t))}return o}startAnimation(t){const{drag:e,dragMomentum:n,dragElastic:i,dragTransition:s,dragSnapToOrigin:o,onDragTransitionEnd:r}=this.getProps(),a=this.constraints||{},l=Jr(r=>{if(!nl(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 Ct(this.visualElement,t),n.start(pi(t,n,0,e,this.visualElement,!1))}stopAnimation(){Jr(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){Jr(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){Jr(e=>{const{drag:n}=this.getProps();if(!nl(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]-rn(n,o,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:e}=this.getProps(),{projection:n}=this.visualElement;if(!Wa(e)||!n||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};Jr(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=Fi(t),s=Fi(e);return s>i?n=S(e.min,e.max-i,t.min):i>s&&(n=S(t.min,t.max-s,e.min)),Ht(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(),Jr(e=>{if(!nl(e,t,null))return;const n=this.getAxisMotionValue(e),{min:s,max:o}=this.constraints[e];n.set(rn(s,o,i[e]))})}addListeners(){if(!this.visualElement.current)return;tl.set(this.visualElement,this);const t=ns(this.visualElement.current,"pointerdown",t=>{const{drag:e,dragListener:n=!0}=this.getProps();e&&n&&this.start(t)}),e=()=>{const{dragConstraints:t}=this.getProps();Wa(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()),rt.read(e);const s=Qi(window,"resize",()=>this.scalePositionWithinConstraints()),o=n.addEventListener("didUpdate",({delta:t,hasLayoutChanged:e})=>{this.isDragging&&e&&(Jr(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=Za,dragMomentum:r=!0}=t;return{...t,drag:e,dragDirectionLock:n,dragPropagation:i,dragConstraints:s,dragElastic:o,dragMomentum:r}}}function nl(t,e,n){return!(!0!==e&&e!==t||null!==n&&n!==t)}const il=t=>(e,n)=>{t&&rt.postRender(()=>t(e,n))};const sl=e.createContext({});class ol extends e.Component{componentDidMount(){const{visualElement:t,layoutGroup:e,switchLayoutGroup:n,layoutId:i}=this.props,{projection:s}=t;ro(al),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()})),Qr.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()||rt.postRender(()=>{const t=o.getStack();t&&t.members.length||this.safeToRemove()})),null):null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),br.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 rl(t){const[n,i]=ds(),s=e.useContext(m);return d(ol,{...t,layoutGroup:s,switchLayoutGroup:e.useContext(sl),isPresent:n,safeToRemove:i})}const al={borderRadius:{...Da,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Da,borderTopRightRadius:Da,borderBottomLeftRadius:Da,borderBottomRightRadius:Da,boxShadow:ka},ll={pan:{Feature:class extends Ri{constructor(){super(...arguments),this.removePointerDownListener=x}onPointerDown(t){this.session=new Na(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint()})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:e,onPan:n,onPanEnd:i}=this.node.getProps();return{onSessionStart:il(t),onStart:il(e),onMove:n,onEnd:(t,e)=>{delete this.session,i&&rt.postRender(()=>i(t,e))}}}mount(){this.removePointerDownListener=ns(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 Ri{constructor(t){super(t),this.removeGroupControls=x,this.removeListeners=x,this.controls=new el(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||x}unmount(){this.removeGroupControls(),this.removeListeners()}},ProjectionNode:Va,MeasureLayout:rl}};function ul(t,e,n){const{props:i}=t;t.animationState&&i.whileHover&&t.animationState.setActive("whileHover","Start"===n);const s=i["onHover"+n];s&&rt.postRender(()=>s(e,ts(e)))}function cl(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&&rt.postRender(()=>s(e,ts(e)))}const hl=new WeakMap,dl=new WeakMap,pl=t=>{const e=hl.get(t.target);e&&e(t)},ml=t=>{t.forEach(pl)};function fl(t,e,n){const i=function({root:t,...e}){const n=t||document;dl.has(n)||dl.set(n,{});const i=dl.get(n),s=JSON.stringify(e);return i[s]||(i[s]=new IntersectionObserver(ml,{root:t,...e})),i[s]}(e);return hl.set(t,n),i.observe(t),()=>{hl.delete(t),i.unobserve(t)}}const gl={some:0,all:1};const yl={inView:{Feature:class extends Ri{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:gl[i]};return fl(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 Ri{mount(){const{current:t}=this.node;t&&(this.unmount=et(t,(t,e)=>(cl(this.node,e,"Start"),(t,{success:e})=>cl(this.node,t,e?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}},focus:{Feature:class extends Ri{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=mn(Qi(this.node.current,"focus",()=>this.onFocus()),Qi(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}},hover:{Feature:class extends Ri{mount(){const{current:t}=this.node;t&&(this.unmount=Y(t,(t,e)=>(ul(this.node,e,"Start"),t=>ul(this.node,t,"End"))))}unmount(){}}}},vl={layout:{ProjectionNode:Va,MeasureLayout:rl}};function xl(t){const{initial:n,animate:i}=function(t,e){if(Ki(t)){const{initial:e,animate:n}=t;return{initial:!1===e||wi(e)?e:void 0,animate:wi(n)?n:void 0}}return!1!==t.inherit?e:{}}(t,e.useContext(Li));return e.useMemo(()=>({initial:n,animate:i}),[wl(n),wl(i)])}function wl(t){return Array.isArray(t)?t.join(" "):t}const Pl=Symbol.for("motionComponentSymbol");function Tl(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):Wa(i)&&(i.current=e))},[n])}function Sl(t,n,i,s,o){var r,a;const{visualElement:l}=e.useContext(Li),u=e.useContext(Fa),c=e.useContext(Yi),h=e.useContext(as).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(sl);!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&&Wa(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[Vt],y=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 os(()=>{p&&(f.current=!0,window.MotionIsMounted=!0,p.updateFeatures(),br.render(p.render),y.current&&p.animationState&&p.animationState.animateChanges())}),e.useEffect(()=>{p&&(!y.current&&p.animationState&&p.animationState.animateChanges(),y.current&&(queueMicrotask(()=>{var t;null===(t=window.MotionHandoffMarkAsComplete)||void 0===t||t.call(window,g)}),y.current=!1))}),p}function bl({preloadedFeatures:t,createVisualElement:n,useRender:i,useVisualState:s,Component:o}){var r,a;function l(t,r){let a;const l={...e.useContext(as),...t,layoutId:Al(t)},{isStatic:u}=l,c=xl(t),h=s(t,u);if(!u&&is){e.useContext(Fa).strict;const t=function(t){const{drag:e,layout:n}=js;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=Sl(o,h,l,n,t.ProjectionNode)}return p(Li.Provider,{value:c,children:[a&&c.visualElement?d(a,{visualElement:c.visualElement,...l}):null,i(o,t,Tl(h,c.visualElement,r),h,u,c.visualElement)]})}t&&Oa(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[Pl]=o,u}function Al({layoutId:t}){const n=e.useContext(m).id;return n&&void 0!==t?n+"-"+t:t}const El=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Cl(t,e,n){for(const i in e)Et(e[i])||ao(i,n)||(t[i]=e[i])}function Ml(t,n){const i={};return Cl(i,t.style||{},t),Object.assign(i,function({transformTemplate:t},n){return e.useMemo(()=>{const e={style:{},transform:{},transformOrigin:{},vars:{}};return _s(e,n,t),Object.assign({},e.vars,e.style)},[n])}(t,n)),i}function Vl(t,e){const n={},i=Ml(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 Rl=["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 Dl(t){return"string"==typeof t&&!t.includes("-")&&!!(Rl.indexOf(t)>-1||/[A-Z]/u.test(t))}const kl=()=>({style:{},transform:{},transformOrigin:{},vars:{},attrs:{}});function Ll(t,n,i,s){const o=e.useMemo(()=>{const e={style:{},transform:{},transformOrigin:{},vars:{},attrs:{}};return Qs(e,n,eo(s),t.transformTemplate),{...e.attrs,style:{...e.style}}},[n]);if(t.style){const e={};Cl(e,t.style,t),o.style={...e,...o.style}}return o}function Bl(t=!1){return(n,i,s,{latestValues:o},r)=>{const a=(Dl(n)?Ll:Vl)(i,o,r,n),l=Xi(i,"string"==typeof n,t),u=n!==e.Fragment?{...l,...a,ref:s}:{},{children:c}=i,h=e.useMemo(()=>Et(c)?c.get():c,[c]);return e.createElement(n,{...u,children:h})}}const Fl={useVisualState:Zi({scrapeMotionValuesFromProps:lo,createRenderState:El})},Ol=["x","y","width","height","cx","cy","r"],jl={useVisualState:Zi({scrapeMotionValuesFromProps:uo,createRenderState:kl,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(ht.has(t)){o=!0;break}if(!o)return;let r=!e;if(e)for(let n=0;n<Ol.length;n++){const i=Ol[n];t[i]!==e[i]&&(r=!0)}r&&rt.read(()=>{no(n,i),rt.render(()=>{Qs(i,s,eo(n.tagName),t.transformTemplate),so(n,i)})})}})};function Il(t,e){return function(n,{forwardMotionProps:i}={forwardMotionProps:!1}){return bl({...Dl(n)?jl:Fl,preloadedFeatures:t,useRender:Bl(i),createVisualElement:e,Component:n})}}const Ul=(t,n)=>Dl(t)?new co(n):new Eo(n,{allowProjection:t!==e.Fragment}),Wl=Ua(Il({...ki,...yl,...ll,...vl},Ul));function Nl({children:t,as:n="ul",axis:i="y",onReorder:s,values:o,...r},a){const l=_i(()=>Wl[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(Hl)},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=rn(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($l).filter(t=>-1!==o.indexOf(t))))}};return e.useEffect(()=>{c.current=!1}),d(l,{...r,ref:a,ignoreStrict:!0,children:d(Ia.Provider,{value:h,children:t})})}const zl=e.forwardRef(Nl);function $l(t){return t.value}function Hl(t,e){return t.layout.min-e.layout.min}function Xl(t){const n=_i(()=>St(t)),{isStatic:i}=e.useContext(as);if(i){const[,i]=e.useState(t);e.useEffect(()=>n.on("change",i),[])}return n}function Yl(t,e){const n=Xl(e()),i=()=>n.set(e());return i(),os(()=>{const e=()=>rt.preRender(i,!1,!0),n=t.map(t=>t.on("change",e));return()=>{n.forEach(t=>t()),at(i)}}),n}function Kl(t,e,n,i){if("function"==typeof t)return function(t){Pt.current=[],t();const e=Yl(Pt.current,t);return Pt.current=void 0,e}(t);const s="function"==typeof e?e:Pr(e,n,i);return Array.isArray(t)?Gl(t,s):Gl([t],([t])=>s(t))}function Gl(t,e){const n=_i(()=>[]);return Yl(t,()=>{n.length=0;const i=t.length;for(let e=0;e<i;e++)n[e]=t[e].get();return e(n)})}function _l(t,e=0){return Et(t)?t:Xl(e)}function ql({children:t,style:n={},value:i,as:s="li",onDrag:o,layout:r=!0,...a},l){const u=_i(()=>Wl[s]),c=e.useContext(Ia),h={x:_l(n.x),y:_l(n.y)},p=Kl([h.x,h.y],([t,e])=>t||e?1:"unset"),{axis:m,registerItem:f,updateOrder:g}=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]&&g(i,h[m].get(),n[m]),o&&o(t,e)},onLayoutMeasure:t=>f(i,t),ref:l,ignoreStrict:!0,children:t})}const Zl=e.forwardRef(ql);var Jl=Object.freeze({__proto__:null,Group:zl,Item:Zl});const Ql=Ua(Il()),tu={renderer:Ul,...ki,...yl},eu={...tu,...ll,...vl},nu={renderer:Ul,...ki};function iu(t,n,i){e.useInsertionEffect(()=>t.on(n,i),[t,n,i])}function su(t,e){w(Boolean(!e||e.current))}const ou=()=>({scrollX:St(0),scrollY:St(0),scrollXProgress:St(0),scrollYProgress:St(0)});function ru({container:t,target:n,layoutEffect:i=!0,...s}={}){const o=_i(ou);return(i?os:e.useEffect)(()=>(su(0,n),su(0,t),fr((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 au(t,e){return e?t+e:t}function lu(t){return"number"==typeof t?t:parseFloat(t)}function uu(t){const n=e.useRef(0),{isStatic:i}=e.useContext(as);e.useEffect(()=>{if(i)return;const e=({timestamp:e,delta:i})=>{n.current||(n.current=e),t(e-n.current,i)};return rt.update(e,!0),()=>at(e)},[t])}class cu extends Tt{constructor(){super(...arguments),this.values=[]}add(t){const e=function(t){return ht.has(t)?"transform":si.has(t)?Mt(t):void 0}(t);e&&(yt(this.values,e),this.update())}update(){this.set(this.values.length?this.values.join(", "):"auto")}}function hu(){!Us.current&&Ws();const[t]=e.useState(Is.current);return t}function du(t,e){[...e].reverse().forEach(n=>{const i=t.getVariant(n);i&&At(t,i),t.variantChildren&&t.variantChildren.forEach(t=>{du(t,e)})})}function pu(){const t=new Set,e={subscribe:e=>(t.add(e),()=>{t.delete(e)}),start(e,n){const i=[];return t.forEach(t=>{i.push(vi(t,e,{transitionOverride:n}))}),Promise.all(i)},set:e=>t.forEach(t=>{!function(t,e){Array.isArray(e)?du(t,e):"string"==typeof e?du(t,[e]):At(t,e)}(t,e)}),stop(){t.forEach(t=>{!function(t){t.values.forEach(t=>t.stop())}(t)})},mount:()=>()=>{e.stop()}};return e}function mu(){const t=_i(pu);return os(t.mount,[]),t}const fu=mu;class gu{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 yu=()=>new gu;function vu(t){return null!==t&&"object"==typeof t&&Pl in t}function xu(){return wu}function wu(t){Ma.current&&(Ma.current.isUpdating=!1,Ma.current.blockUpdate(),t&&t())}const Pu=(t,e)=>`${t}: ${ht.has(e)?"transform":e}`,Tu=new Map,Su=new Map;function bu(t,e,n){var i;const s=Pu(t,e),o=Tu.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 Au,Eu;const Cu=new Set;function Mu(){Cu.forEach(t=>{t.animation.play(),t.animation.startTime=t.startTime}),Cu.clear()}const Vu=()=>({});class Ru extends $s{constructor(){super(...arguments),this.measureInstanceViewportBox=Bi}build(){}resetTransform(){}restoreTransform(){}removeValueFromRenderState(){}renderInstance(){}scrapeMotionValuesFromProps(){return{}}getBaseTargetFromProps(){}readValueFromInstance(t,e,n){return n.initialState[e]||0}sortInstanceNodePosition(){return 0}}const Du=Zi({scrapeMotionValuesFromProps:Vu,createRenderState:Vu});let ku=0;const Lu=t=>t>.001?1/t:1e5;t.AcceleratedAnimation=li,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]=ds(a),p=e.useMemo(()=>ms(t),[t]),f=a&&!u?[]:p.map(ps),g=e.useRef(!0),y=e.useRef(p),v=_i(()=>new Map),[x,w]=e.useState(p),[P,T]=e.useState(p);os(()=>{g.current=!1,y.current=p;for(let t=0;t<P.length;t++){const e=ps(P[t]);f.includes(e)?v.delete(e):!0!==v.get(e)&&v.set(e,!1)}},[P,f.length,f.join("-")]);const S=[];if(p!==x){let t=[...p];for(let e=0;e<P.length;e++){const n=P[e],i=ps(n);f.includes(i)||(t.splice(e,0,n),S.push(n))}return"wait"===r&&S.length&&(t=S),T(ms(t)),w(p),null}const{forceRender:b}=e.useContext(m);return d(h,{children:P.map(t=>{const e=ps(t),h=!(a&&!u)&&(p===P||f.includes(e));return d(cs,{isPresent:h,initial:!(g.current&&!i)&&void 0,custom:n,presenceAffectsLayout:o,mode:r,onExitComplete:h?void 0:()=>{if(!v.has(e))return;v.set(e,!0);let t=!0;v.forEach(e=>{e||(t=!1)}),t&&(null==b||b(),T(y.current),a&&(null==c||c()),s&&s())},anchorX:l,children:t},e)})})},t.AnimateSharedLayout=({children:t})=>(i.useEffect(()=>{},[]),d(Ba,{id:_i(()=>"asl-"+ku++),children:t})),t.DeprecatedLayoutGroupContext=fs,t.DragControls=gu,t.FlatTree=Cr,t.LayoutGroup=Ba,t.LayoutGroupContext=m,t.LazyMotion=function({children:t,features:n,strict:i=!1}){const[,s]=e.useState(!ja(n)),o=e.useRef(void 0);if(!ja(n)){const{renderer:t,...e}=n;o.current=t,Oa(e)}return e.useEffect(()=>{ja(n)&&n().then(({renderer:t,...e})=>{Oa(e),o.current=t,s(!0)})},[]),d(Fa.Provider,{value:{renderer:o.current,strict:i},children:t})},t.MotionConfig=function({children:t,isValidProp:n,...i}){n&&Hi(n),(i={...e.useContext(as),...i}).isStatic=_i(()=>i.isStatic);const s=e.useMemo(()=>i,[JSON.stringify(i.transition),i.transformPagePoint,i.reducedMotion]);return d(as.Provider,{value:s,children:t})},t.MotionConfigContext=as,t.MotionContext=Li,t.MotionGlobalConfig=nt,t.MotionValue=Tt,t.PresenceContext=Yi,t.Reorder=Jl,t.SwitchLayoutGroupContext=sl,t.VisualElement=$s,t.addPointerEvent=ns,t.addPointerInfo=es,t.addScaleCorrector=ro,t.animate=Lo,t.animateMini=No,t.animateValue=ii,t.animateVisualElement=vi,t.animationControls=pu,t.animations=ki,t.anticipate=Ut,t.backIn=jt,t.backInOut=It,t.backOut=Ot,t.buildTransform=Gs,t.calcLength=Fi,t.cancelFrame=at,t.cancelSync=Sr,t.circIn=Wt,t.circInOut=zt,t.circOut=Nt,t.clamp=Ht,t.color=ce,t.complex=ye,t.createBox=Bi,t.createRendererMotionComponent=bl,t.createScopedAnimate=ko,t.cubicBezier=Lt,t.delay=vr,t.disableInstantTransitions=function(){Dt.current=!1},t.distance=xr,t.distance2D=wr,t.domAnimation=tu,t.domMax=eu,t.domMin=nu,t.easeIn=$n,t.easeInOut=Xn,t.easeOut=Hn,t.filterProps=Xi,t.findSpring=On,t.frame=rt,t.frameData=lt,t.frameSteps=ut,t.hover=Y,t.inView=yr,t.inertia=zn,t.interpolate=_n,t.invariant=P,t.isBrowser=is,t.isDragActive=z,t.isMotionComponent=vu,t.isMotionValue=Et,t.isValidMotionProp=zi,t.keyframes=Jn,t.m=Ql,t.makeUseVisualState=Zi,t.mirrorEasing=Bt,t.mix=Pn,t.motion=Wl,t.motionValue=St,t.noop=x,t.optimizedAppearDataAttribute=Vt,t.pipe=mn,t.press=et,t.progress=S,t.px=oe,t.resolveMotionValue=qi,t.reverseEasing=Ft,t.scroll=fr,t.scrollInfo=hr,t.spring=Nn,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=Gn(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=bu;const r=Pu(o,e);Eu||(Eu=oi(t,e,[n[0],n[0]],{duration:1e4,ease:"linear"}),Tu.set(r,{animation:Eu,startTime:null}),window.MotionHandoffAnimation=bu,window.MotionHasOptimisedAnimation=(t,e)=>{if(!t)return!1;if(!e)return Su.has(t);const n=Pu(t,e);return Boolean(Tu.get(n))},window.MotionHandoffMarkAsComplete=t=>{Su.has(t)&&Su.set(t,!0)},window.MotionHandoffIsComplete=t=>!0===Su.get(t),window.MotionCancelOptimisedAnimation=(t,e,n,i)=>{const s=Pu(t,e),o=Tu.get(s);o&&(n&&void 0===i?n.postRender(()=>{n.postRender(()=>{o.animation.cancel()})}):o.animation.cancel(),n&&i?(Cu.add(o),n.render(Mu)):(Tu.delete(s),Tu.size||(window.MotionCancelOptimisedAnimation=void 0)))},window.MotionCheckAppearSync=(t,e,n)=>{var i,s;const o=Rt(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=()=>{Eu.cancel();const o=oi(t,e,n,i);void 0===Au&&(Au=performance.now()),o.startTime=Au,Tu.set(r,{animation:o,startTime:Au}),s&&s(o)};Su.set(o,!1),Eu.ready?Eu.ready.then(a).catch(x):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 Ht(0,1,s/t)}},t.sync=Tr,t.time=gt,t.transform=Pr,t.unwrapMotionComponent=function(t){if(vu(t))return t[Pl]},t.useAnimate=function(){const t=_i(()=>({current:null,animations:[]})),e=_i(()=>ko(t));return ss(()=>{t.animations.forEach(t=>t.stop())}),[t,e]},t.useAnimateMini=function(){const t=_i(()=>({current:null,animations:[]})),e=_i(()=>Wo(t));return ss(()=>{t.animations.forEach(t=>t.stop())}),[t,e]},t.useAnimation=fu,t.useAnimationControls=mu,t.useAnimationFrame=uu,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?xs(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=Du({},!1),o=_i(()=>new Ru({props:{onUpdate:t=>{i({...t})}},visualState:s,presenceContext:null},{initialState:t}));return e.useLayoutEffect(()=>(o.mount({}),()=>o.unmount()),[o]),[n,_i(()=>t=>vi(o,t))]},t.useDeprecatedInvertedScale=function(t){let n=Xl(1),i=Xl(1);const{visualElement:s}=e.useContext(Li);return t?(n=t.scaleX||n,i=t.scaleY||i):s&&(n=s.getValue("scaleX",1),i=s.getValue("scaleY",1)),{scaleX:Kl(n,Lu),scaleY:Kl(i,Lu)}},t.useDomEvent=function(t,n,i,s){e.useEffect(()=>{const e=t.current;if(i&&e)return Qi(e,n,i,s)},[t,n,i,s])},t.useDragControls=function(){return _i(yu)},t.useElementScroll=function(t){return ru({container:t})},t.useForceUpdate=rs,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 yr(t.current,()=>(l(!0),o?void 0:()=>l(!1)),e)},[n,t,i,o,s]),a},t.useInstantLayoutTransition=xu,t.useInstantTransition=function(){const[t,n]=rs(),i=xu(),s=e.useRef(-1);return e.useEffect(()=>{rt.postRender(()=>rt.postRender(()=>{n===s.current&&(Dt.current=!1)}))},[n]),e=>{i(()=>{Dt.current=!0,t(),e(),s.current=n+1})}},t.useIsPresent=function(){return null===(t=e.useContext(Yi))||t.isPresent;var t},t.useIsomorphicLayoutEffect=os,t.useMotionTemplate=function(t,...e){const n=t.length;return Yl(e.filter(Et),(function(){let i="";for(let s=0;s<n;s++){i+=t[s];const n=e[s];n&&(i+=Et(n)?n.get():n)}return i}))},t.useMotionValue=Xl,t.useMotionValueEvent=iu,t.usePresence=ds,t.usePresenceData=function(){const t=e.useContext(Yi);return t?t.custom:void 0},t.useReducedMotion=hu,t.useReducedMotionConfig=function(){const t=hu(),{reducedMotion:n}=e.useContext(as);return"never"!==n&&("always"===n||t)},t.useResetProjection=function(){return e.useCallback(()=>{const t=Ma.current;t&&t.resetTree()},[])},t.useScroll=ru,t.useSpring=function(t,n={}){const{isStatic:i}=e.useContext(as),s=e.useRef(null),o=_i(()=>Et(t)?t.get():t),r=_i(()=>"string"==typeof o?o.replace(/[\d.-]/g,""):void 0),a=Xl(o),l=e.useRef(o),u=e.useRef(x),c=()=>{h(),s.current=ii({keyframes:[lu(a.get()),lu(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(au(t,r)),rt.postRender(c),a.get()),h),[JSON.stringify(n)]),os(()=>{if(Et(t))return t.on("change",t=>a.set(au(t,r)))},[a,r]),a},t.useTime=function(){const t=Xl(0);return uu(e=>t.set(e)),t},t.useTransform=Kl,t.useUnmountEffect=ss,t.useVelocity=function(t){const e=Xl(t.getVelocity()),n=()=>{const i=t.getVelocity();e.set(i),i&&rt.update(n)};return iu(t,"change",()=>{rt.update(n,!1,!0)}),e},t.useViewportScroll=function(){return ru()},t.useWillChange=function(){return _i(()=>new cu("auto"))},t.visualElementStore=Bs,t.wrap=xs}));
|
|
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){return null!==t&&"object"==typeof t&&"function"==typeof t.start}function g(t){const e=[{},{}];return null==t||t.values.forEach((t,n)=>{e[0][n]=t.get(),e[1][n]=t.getVelocity()}),e}function y(t,e,n,i){if("function"==typeof e){const[s,o]=g(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]=g(i);e=e(void 0!==n?n:t.custom,s,o)}return e}function v(t,e,n){const i=t.getProps();return y(i,e,void 0!==n?n:i.custom,t)}const x=t=>t;let w=x,P=x;function S(t){let e;return()=>(void 0===e&&(e=t()),e)}const T=(t,e,n)=>{const i=e-t;return 0===i?1:(n-t)/i},b=t=>1e3*t,A=t=>t/1e3,E=S(()=>void 0!==window.ScrollTimeline);class M 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=>E()&&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 C(t,e){return t?t[e]||t.default||t:void 0}function V(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 R(t,e=100,n){const i=n({...t,keyframes:[0,e]}),s=Math.min(V(i),2e4);return{type:"keyframes",ease:t=>i.next(s*t).value/e,duration:A(s)}}function D(t){return"function"==typeof t}function k(t,e){t.timeline=e,t.onfinish=null}const L=t=>Array.isArray(t)&&"number"==typeof t[0],B={linearEasing:void 0};function F(t,e){const n=S(t);return()=>{var t;return null!==(t=B[e])&&void 0!==t?t:n()}}const O=F(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(t){return!1}return!0},"linearEasing"),j=(t,e,n=10)=>{let i="";const s=Math.max(Math.round(e/n),2);for(let e=0;e<s;e++)i+=t(T(0,s-1,e))+", ";return`linear(${i.substring(0,i.length-2)})`};function I(t){return Boolean("function"==typeof t&&O()||!t||"string"==typeof t&&(t in W||O())||L(t)||Array.isArray(t)&&t.every(I))}const U=([t,e,n,i])=>`cubic-bezier(${t}, ${e}, ${n}, ${i})`,W={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:U([0,.65,.55,1]),circOut:U([.55,0,1,.45]),backIn:U([.31,.01,.66,-.59]),backOut:U([.33,1.53,.69,.99])};const N={x:!1,y:!1};function z(){return N.x||N.y}function X(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 $(t,e){const n=X(t),i=new AbortController;return[n,{passive:!0,...e,signal:i.signal},()=>i.abort()]}function H(t){return!("touch"===t.pointerType||z())}function Y(t,e,n={}){const[i,s,o]=$(t,n),r=t=>{if(!H(t))return;const{target:n}=t,i=e(n,t);if("function"!=typeof i||!n)return;const o=t=>{H(t)&&(i(t),n.removeEventListener("pointerleave",o))};n.addEventListener("pointerleave",o,s)};return i.forEach(t=>{t.addEventListener("pointerenter",r,s)}),o}function K(t,e){const n=e+"PointerCapture";if(t.target instanceof Element&&n in t.target&&void 0!==t.pointerId)try{t.target[n](t.pointerId)}catch(t){}}const G=(t,e)=>!!e&&(t===e||G(t,e.parentElement)),_=t=>"mouse"===t.pointerType?"number"!=typeof t.button||t.button<=0:!1!==t.isPrimary,q=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);const Z=new WeakSet;function J(t){return e=>{"Enter"===e.key&&t(e)}}function Q(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}function tt(t){return _(t)&&!z()}function et(t,e,n={}){const[i,s,o]=$(t,n),r=t=>{const n=t.currentTarget;if(!n||!tt(t)||Z.has(n))return;Z.add(n),K(t,"set");const i=e(n,t),o=(t,e)=>{n.removeEventListener("pointerup",r),n.removeEventListener("pointercancel",a),K(t,"release"),tt(t)&&Z.has(n)&&(Z.delete(n),"function"==typeof i&&i(t,{success:e}))},r=t=>{const e=!!t.isTrusted&&(i=t,s=n instanceof Element?n.getBoundingClientRect():{left:0,top:0,right:window.innerWidth,bottom:window.innerHeight},i.clientX<s.left||i.clientX>s.right||i.clientY<s.top||i.clientY>s.bottom);var i,s;o(t,!e&&(!(n instanceof Element)||G(n,t.target)))},a=t=>{o(t,!1)};n.addEventListener("pointerup",r,s),n.addEventListener("pointercancel",a,s),n.addEventListener("lostpointercapture",a,s)};return i.forEach(t=>{let e=!1;var i;(t=n.useGlobalTarget?window:t)instanceof HTMLElement&&(e=!0,i=t,q.has(i.tagName)||-1!==i.tabIndex||null!==t.getAttribute("tabindex")||(t.tabIndex=0)),t.addEventListener("pointerdown",r,s),e&&t.addEventListener("focus",t=>((t,e)=>{const n=t.currentTarget;if(!n)return;const i=J(()=>{if(Z.has(n))return;Q(n,"down");const t=J(()=>{Q(n,"up")});n.addEventListener("keyup",t,e),n.addEventListener("blur",()=>Q(n,"cancel"),e)});n.addEventListener("keydown",i,e),n.addEventListener("blur",()=>n.removeEventListener("keydown",i),e)})(t,s),s)}),o}const nt={skipAnimations:!1,useManualTiming:!1},it=["read","resolveKeyframes","update","preRender","render","postRender"],st={value:null,addProjectionMetrics:null};function ot(t,e){let n=!1,i=!0;const s={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,r=it.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&&st.value&&st.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=nt.useManualTiming?s.timestamp:performance.now();n=!1,nt.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:it.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<it.length;e++)r[it[e]].cancel(t)},state:s,steps:r}}const{schedule:rt,cancel:at,state:lt,steps:ut}=ot("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:x,!0),ct=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],ht=new Set(ct),dt=new Set(["width","height","top","left","right","bottom",...ct]),pt=t=>Array.isArray(t);let mt;function ft(){mt=void 0}const gt={now:()=>(void 0===mt&>.set(lt.isProcessing||nt.useManualTiming?lt.timestamp:performance.now()),mt),set:t=>{mt=t,queueMicrotask(ft)}};function yt(t,e){-1===t.indexOf(e)&&t.push(e)}function vt(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}class xt{constructor(){this.subscriptions=[]}add(t){return yt(this.subscriptions,t),()=>vt(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}}function wt(t,e){return e?t*(1e3/e):0}const Pt={current:void 0};class St{constructor(t,e={}){this.version="12.4.13",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(t,e=!0)=>{const n=gt.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=gt.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 xt);const n=this.events[t].add(e);return"change"===t?()=>{n(),rt.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 Pt.current&&Pt.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const t=gt.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||t-this.updatedAt>30)return 0;const e=Math.min(this.updatedAt-this.prevUpdatedAt,30);return wt(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 Tt(t,e){return new St(t,e)}function bt(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,Tt(n))}function At(t,e){const n=v(t,e);let{transitionEnd:i={},transition:s={},...o}=n||{};o={...o,...i};for(const e in o){bt(t,e,(r=o[e],pt(r)?r[r.length-1]||0:r))}var r}const Et=t=>Boolean(t&&t.getVelocity);function Mt(t,e){const n=t.getValue("willChange");if(i=n,Boolean(Et(i)&&i.add))return n.add(e);var i}const Ct=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Vt="data-"+Ct("framerAppearId");function Rt(t){return t.props[Vt]}const Dt={current:!1},kt=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t;function Lt(t,e,n,i){if(t===e&&n===i)return x;const s=e=>function(t,e,n,i,s){let o,r,a=0;do{r=e+(n-e)/2,o=kt(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:kt(s(t),e,i)}const Bt=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,Ft=t=>e=>1-t(1-e),Ot=Lt(.33,1.53,.69,.99),jt=Ft(Ot),It=Bt(jt),Ut=t=>(t*=2)<1?.5*jt(t):.5*(2-Math.pow(2,-10*(t-1))),Wt=t=>1-Math.sin(Math.acos(t)),Nt=Ft(Wt),zt=Bt(Wt),Xt=t=>/^0[^.\s]+$/u.test(t);const $t=(t,e,n)=>n>e?e:n<t?t:n,Ht={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},Yt={...Ht,transform:t=>$t(0,1,t)},Kt={...Ht,default:1},Gt=t=>Math.round(1e5*t)/1e5,_t=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;const qt=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Zt=(t,e)=>n=>Boolean("string"==typeof n&&qt.test(n)&&n.startsWith(t)||e&&!function(t){return null==t}(n)&&Object.prototype.hasOwnProperty.call(n,e)),Jt=(t,e,n)=>i=>{if("string"!=typeof i)return i;const[s,o,r,a]=i.match(_t);return{[t]:parseFloat(s),[e]:parseFloat(o),[n]:parseFloat(r),alpha:void 0!==a?parseFloat(a):1}},Qt={...Ht,transform:t=>Math.round((t=>$t(0,255,t))(t))},te={test:Zt("rgb","red"),parse:Jt("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:i=1})=>"rgba("+Qt.transform(t)+", "+Qt.transform(e)+", "+Qt.transform(n)+", "+Gt(Yt.transform(i))+")"};const ee={test:Zt("#"),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:te.transform},ne=t=>({test:e=>"string"==typeof e&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),ie=ne("deg"),se=ne("%"),oe=ne("px"),re=ne("vh"),ae=ne("vw"),le={...se,parse:t=>se.parse(t)/100,transform:t=>se.transform(100*t)},ue={test:Zt("hsl","hue"),parse:Jt("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:i=1})=>"hsla("+Math.round(t)+", "+se.transform(Gt(e))+", "+se.transform(Gt(n))+", "+Gt(Yt.transform(i))+")"},ce={test:t=>te.test(t)||ee.test(t)||ue.test(t),parse:t=>te.test(t)?te.parse(t):ue.test(t)?ue.parse(t):ee.parse(t),transform:t=>"string"==typeof t?t:t.hasOwnProperty("red")?te.transform(t):ue.transform(t)},he=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;const de=/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 pe(t){const e=t.toString(),n=[],i={color:[],number:[],var:[]},s=[];let o=0;const r=e.replace(de,t=>(ce.test(t)?(i.color.push(o),s.push("color"),n.push(ce.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 me(t){return pe(t).values}function fe(t){const{split:e,types:n}=pe(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?Gt(t[o]):"color"===e?ce.transform(t[o]):t[o]}return s}}const ge=t=>"number"==typeof t?0:t;const ye={test:function(t){var e,n;return isNaN(t)&&"string"==typeof t&&((null===(e=t.match(_t))||void 0===e?void 0:e.length)||0)+((null===(n=t.match(he))||void 0===n?void 0:n.length)||0)>0},parse:me,createTransformer:fe,getAnimatableNone:function(t){const e=me(t);return fe(t)(e.map(ge))}},ve=new Set(["brightness","contrast","saturate","opacity"]);function xe(t){const[e,n]=t.slice(0,-1).split("(");if("drop-shadow"===e)return t;const[i]=n.match(_t)||[];if(!i)return t;const s=n.replace(i,"");let o=ve.has(e)?1:0;return i!==n&&(o*=100),e+"("+o+s+")"}const we=/\b([a-z-]*)\(.*?\)/gu,Pe={...ye,getAnimatableNone:t=>{const e=t.match(we);return e?e.map(xe).join(" "):t}},Se={borderWidth:oe,borderTopWidth:oe,borderRightWidth:oe,borderBottomWidth:oe,borderLeftWidth:oe,borderRadius:oe,radius:oe,borderTopLeftRadius:oe,borderTopRightRadius:oe,borderBottomRightRadius:oe,borderBottomLeftRadius:oe,width:oe,maxWidth:oe,height:oe,maxHeight:oe,top:oe,right:oe,bottom:oe,left:oe,padding:oe,paddingTop:oe,paddingRight:oe,paddingBottom:oe,paddingLeft:oe,margin:oe,marginTop:oe,marginRight:oe,marginBottom:oe,marginLeft:oe,backgroundPositionX:oe,backgroundPositionY:oe},Te={rotate:ie,rotateX:ie,rotateY:ie,rotateZ:ie,scale:Kt,scaleX:Kt,scaleY:Kt,scaleZ:Kt,skew:ie,skewX:ie,skewY:ie,distance:oe,translateX:oe,translateY:oe,translateZ:oe,x:oe,y:oe,z:oe,perspective:oe,transformPerspective:oe,opacity:Yt,originX:le,originY:le,originZ:oe},be={...Ht,transform:Math.round},Ae={...Se,...Te,zIndex:be,size:oe,fillOpacity:Yt,strokeOpacity:Yt,numOctaves:be},Ee={...Ae,color:ce,backgroundColor:ce,outlineColor:ce,fill:ce,stroke:ce,borderColor:ce,borderTopColor:ce,borderRightColor:ce,borderBottomColor:ce,borderLeftColor:ce,filter:Pe,WebkitFilter:Pe},Me=t=>Ee[t];function Ce(t,e){let n=Me(t);return n!==Pe&&(n=ye),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const Ve=new Set(["auto","none","0"]);const Re=t=>180*t/Math.PI,De=t=>{const e=Re(Math.atan2(t[1],t[0]));return Le(e)},ke={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:De,rotateZ:De,skewX:t=>Re(Math.atan(t[1])),skewY:t=>Re(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},Le=t=>((t%=360)<0&&(t+=360),t),Be=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),Fe=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),Oe={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Be,scaleY:Fe,scale:t=>(Be(t)+Fe(t))/2,rotateX:t=>Le(Re(Math.atan2(t[6],t[5]))),rotateY:t=>Le(Re(Math.atan2(-t[2],t[0]))),rotateZ:De,rotate:De,skewX:t=>Re(Math.atan(t[4])),skewY:t=>Re(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function je(t){return t.includes("scale")?1:0}function Ie(t,e){if(!t||"none"===t)return je(e);const n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let i,s;if(n)i=Oe,s=n;else{const e=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);i=ke,s=e}if(!s)return je(e);const o=i[e],r=s[1].split(",").map(Ue);return"function"==typeof o?o(r):r[o]}function Ue(t){return parseFloat(t.trim())}const We=t=>t===Ht||t===oe,Ne=new Set(["x","y","z"]),ze=ct.filter(t=>!Ne.has(t));const Xe={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})=>Ie(e,"x"),y:(t,{transform:e})=>Ie(e,"y")};Xe.translateX=Xe.x,Xe.translateY=Xe.y;const $e=new Set;let He=!1,Ye=!1;function Ke(){if(Ye){const t=Array.from($e).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 ze.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)})}Ye=!1,He=!1,$e.forEach(t=>t.complete()),$e.clear()}function Ge(){$e.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(Ye=!0)})}class _e{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?($e.add(this),He||(He=!0,rt.read(Ge),rt.resolveKeyframes(Ke))):(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),$e.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,$e.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const qe=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),Ze=t=>e=>"string"==typeof e&&e.startsWith(t),Je=Ze("--"),Qe=Ze("var(--"),tn=t=>!!Qe(t)&&en.test(t.split("/*")[0].trim()),en=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,nn=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function sn(t,e,n=1){const[i,s]=function(t){const e=nn.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 qe(t)?parseFloat(t):t}return tn(s)?sn(s,e,n+1):s}const on=t=>e=>e.test(t),rn=[Ht,oe,se,ie,ae,re,{test:t=>"auto"===t,parse:t=>t}],an=t=>rn.find(on(t));class ln extends _e{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(),tn(i))){const s=sn(i,e.current);void 0!==s&&(t[n]=s),n===t.length-1&&(this.finalKeyframe=i)}}if(this.resolveNoneKeyframes(),!dt.has(n)||2!==t.length)return;const[i,s]=t,o=an(i),r=an(s);if(o!==r)if(We(o)&&We(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||Xt(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&&!Ve.has(e)&&pe(e).values.length&&(s=t[i]),i++}if(s&&n)for(const i of e)t[i]=Ce(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=Xe[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]=Xe[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 un=(t,e)=>"zIndex"!==e&&(!("number"!=typeof t&&!Array.isArray(t))||!("string"!=typeof t||!ye.test(t)&&"0"!==t||t.startsWith("url(")));function cn(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=un(s,e),a=un(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||D(n))&&i)}const hn=t=>null!==t;function dn(t,{repeat:e,repeatType:n="loop"},i){const s=t.filter(hn),o=e&&"loop"!==n&&e%2==1?0:s.length-1;return o&&void 0!==i?i:s[o]}class pn{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=gt.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||(Ge(),Ke()),this._resolved}onKeyframesResolved(t,e){this.resolvedAt=gt.now(),this.hasAttemptedResolve=!0;const{name:n,type:i,velocity:s,delay:o,onComplete:r,onUpdate:a,isGenerator:l}=this.options;if(!l&&!cn(t,n,i,s)){if(Dt.current||!o)return a&&a(dn(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})}}const mn=(t,e,n)=>t+(e-t)*n;function fn(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 gn(t,e){return n=>n>0?e:t}const yn=(t,e,n)=>{const i=t*t,s=n*(e*e-i)+i;return s<0?0:Math.sqrt(s)},vn=[ee,te,ue];function xn(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===ue&&(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=fn(a,i,t+1/3),o=fn(a,i,t),r=fn(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 wn=(t,e)=>{const n=xn(t),i=xn(e);if(!n||!i)return gn(t,e);const s={...n};return t=>(s.red=yn(n.red,i.red,t),s.green=yn(n.green,i.green,t),s.blue=yn(n.blue,i.blue,t),s.alpha=mn(n.alpha,i.alpha,t),te.transform(s))},Pn=(t,e)=>n=>e(t(n)),Sn=(...t)=>t.reduce(Pn),Tn=new Set(["none","hidden"]);function bn(t,e){return n=>mn(t,e,n)}function An(t){return"number"==typeof t?bn:"string"==typeof t?tn(t)?gn:ce.test(t)?wn:Cn:Array.isArray(t)?En:"object"==typeof t?ce.test(t)?wn:Mn:gn}function En(t,e){const n=[...t],i=n.length,s=t.map((t,n)=>An(t)(t,e[n]));return t=>{for(let e=0;e<i;e++)n[e]=s[e](t);return n}}function Mn(t,e){const n={...t,...e},i={};for(const s in n)void 0!==t[s]&&void 0!==e[s]&&(i[s]=An(t[s])(t[s],e[s]));return t=>{for(const e in i)n[e]=i[e](t);return n}}const Cn=(t,e)=>{const n=ye.createTransformer(e),i=pe(t),s=pe(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?Tn.has(t)&&!s.values.length||Tn.has(e)&&!i.values.length?function(t,e){return Tn.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}(t,e):Sn(En(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):gn(t,e)};function Vn(t,e,n){if("number"==typeof t&&"number"==typeof e&&"number"==typeof n)return mn(t,e,n);return An(t)(t,e)}function Rn(t,e,n){const i=Math.max(e-5,0);return wt(n-t(i),e-i)}const Dn=100,kn=10,Ln=1,Bn=0,Fn=800,On=.3,jn=.3,In={granular:.01,default:2},Un={granular:.005,default:.5},Wn=.01,Nn=10,zn=.05,Xn=1;function $n({duration:t=Fn,bounce:e=On,velocity:n=Bn,mass:i=Ln}){let s,o,r=1-e;r=$t(zn,Xn,r),t=$t(Wn,Nn,A(t)),r<1?(s=e=>{const i=e*r,s=i*t;return.001-(i-n)/Hn(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=Hn(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=b(t),isNaN(a))return{stiffness:Dn,damping:kn,duration:t};{const e=Math.pow(a,2)*i;return{stiffness:e,damping:2*r*Math.sqrt(i*e),duration:t}}}function Hn(t,e){return t*Math.sqrt(1-e*e)}const Yn=["duration","bounce"],Kn=["stiffness","damping","mass"];function Gn(t,e){return e.some(e=>void 0!==t[e])}function _n(t=jn,e=On){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:Bn,stiffness:Dn,damping:kn,mass:Ln,isResolvedFromDuration:!1,...t};if(!Gn(t,Kn)&&Gn(t,Yn))if(t.visualDuration){const n=t.visualDuration,i=2*Math.PI/(1.2*n),s=i*i,o=2*$t(.05,1,1-(t.bounce||0))*Math.sqrt(s);e={...e,mass:Ln,stiffness:s,damping:o}}else{const n=$n(t);e={...e,...n,mass:Ln},e.isResolvedFromDuration=!0}return e}({...n,velocity:-A(n.velocity||0)}),m=d||0,f=u/(2*Math.sqrt(l*c)),g=r-o,y=A(Math.sqrt(l/c)),v=Math.abs(g)<5;let x;if(i||(i=v?In.granular:In.default),s||(s=v?Un.granular:Un.default),f<1){const t=Hn(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?b(m):Rn(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(V(w),2e4),e=j(e=>w.next(t*e).value,t,30);return t+"ms "+e}};return w}function qn({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=_n({keyframes:[d.value,p(d.value)],velocity:Rn(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 Zn=Lt(.42,0,1,1),Jn=Lt(0,0,.58,1),Qn=Lt(.42,0,.58,1),ti=t=>Array.isArray(t)&&"number"!=typeof t[0],ei={linear:x,easeIn:Zn,easeInOut:Qn,easeOut:Jn,circIn:Wt,circInOut:zt,circOut:Nt,backIn:jt,backInOut:It,backOut:Ot,anticipate:Ut},ni=t=>{if(L(t)){P(4===t.length);const[e,n,i,s]=t;return Lt(e,n,i,s)}return"string"==typeof t?ei[t]:t};function ii(t,e,{clamp:n=!0,ease:i,mixer:s}={}){const o=t.length;if(P(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||Vn,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]||x:e;o=Sn(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=T(t[i],t[i+1],n);return a[i](s)};return n?e=>u($t(t[0],t[o-1],e)):u}function si(t,e){const n=t[t.length-1];for(let i=1;i<=e;i++){const s=T(0,e,i);t.push(mn(n,1,s))}}function oi(t){const e=[0];return si(e,t.length-1),e}function ri({duration:t=300,keyframes:e,times:n,ease:i="easeInOut"}){const s=ti(i)?i.map(ni):ni(i),o={done:!1,value:e[0]},r=ii(function(t,e){return t.map(t=>t*e)}(n&&n.length===e.length?n:oi(e),t),e,{ease:Array.isArray(s)?s:(a=e,l=s,a.map(()=>l||Qn).splice(0,a.length-1))});var a,l;return{calculatedDuration:t,next:e=>(o.value=r(e),o.done=e>=t,o)}}const ai=t=>{const e=({timestamp:e})=>t(e);return{start:()=>rt.update(e,!0),stop:()=>at(e),now:()=>lt.isProcessing?lt.timestamp:gt.now()}},li={decay:qn,inertia:qn,tween:ri,keyframes:ri,spring:_n},ui=t=>t/100;class ci extends pn{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)||_e;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=D(e)?e:li[e]||ri;let a,l;r!==ri&&"number"!=typeof t[0]&&(a=Sn(ui,Vn(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=V(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=$t(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=dn(a,this.options,i)),f&&f(w.value),S&&this.finish(),w}get duration(){const{resolved:t}=this;return t?A(t.calculatedDuration):0}get time(){return A(this.currentTime)}set time(t){t=b(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=A(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved)return void(this.pendingPlayState="running");if(this.isStopped)return;const{driver:t=ai,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 hi(t){return new ci(t)}const di=new Set(["opacity","clipPath","filter","transform"]);function pi(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&&O()?j(e,n):L(e)?U(e):Array.isArray(e)?e.map(e=>t(e,n)||W.easeOut):W[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 mi=S(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));const fi={anticipate:Ut,backInOut:It,circInOut:zt};class gi extends pn{constructor(t){super(t);const{name:e,motionValue:n,element:i,keyframes:s}=this.options;this.resolver=new ln(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&&O()&&s in fi&&(s=fi[s]),D((u=this.options).type)||"spring"===u.type||!I(u.ease)){const{onComplete:e,onUpdate:r,motionValue:a,element:l,...u}=this.options,c=function(t,e){const n=new ci({...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=pi(r.owner.current,a,t,{...this.options,duration:n,times:i,ease:s});return c.startTime=null!=l?l:this.calcStartTime(),this.pendingTimeline?(k(c,this.pendingTimeline),this.pendingTimeline=void 0):c.onfinish=()=>{const{onComplete:n}=this.options;r.set(dn(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 A(e)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:e}=t;return A(e.currentTime||0)}set time(t){const{resolved:e}=this;if(!e)return;const{animation:n}=e;n.currentTime=b(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 x;const{animation:n}=e;k(n,t)}else this.pendingTimeline=t;return x}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 ci({...u,keyframes:n,duration:i,type:s,ease:o,times:r,isGenerator:!0}),h=b(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 mi()&&n&&di.has(n)&&!a&&!l&&!i&&"mirror"!==s&&0!==o&&"inertia"!==r}}const yi={type:"spring",stiffness:500,damping:25,restSpeed:10},vi={type:"keyframes",duration:.8},xi={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},wi=(t,{keyframes:e})=>e.length>2?vi:ht.has(t)?t.startsWith("scale")?{type:"spring",stiffness:550,damping:0===e[1]?2*Math.sqrt(550):30,restSpeed:10}:yi:xi;const Pi=(t,e,n,i={},s,o)=>r=>{const a=C(i,t)||{},l=a.delay||i.delay||0;let{elapsed:u=0}=i;u-=b(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,...wi(t,c)}),c.duration&&(c.duration=b(c.duration)),c.repeatDelay&&(c.repeatDelay=b(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)),(Dt.current||nt.skipAnimations)&&(h=!0,c.duration=0,c.delay=0),c.allowFlatten=!a.type&&!a.ease,h&&!o&&void 0!==e.get()){const t=dn(c.keyframes,a);if(void 0!==t)return rt.update(()=>{c.onUpdate(t),c.onComplete()}),new M([])}return!o&&gi.supports(c)?new gi(c):new ci(c)};function Si({protectedKeys:t,needsAnimating:e},n){const i=t.hasOwnProperty(n)&&!0!==e[n];return e[n]=!1,i}function Ti(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&&Si(c,e))continue;const a={delay:n,...C(r||{},e)};let h=!1;if(window.MotionHandoffAnimation){const n=Rt(t);if(n){const t=window.MotionHandoffAnimation(n,e,rt);null!==t&&(a.startTime=t,h=!0)}}Mt(t,e),i.start(Pi(e,i,s,t.shouldReduceMotion&&dt.has(e)?{type:!1}:a,t,h));const d=i.animation;d&&u.push(d)}return a&&Promise.all(u).then(()=>{rt.update(()=>{a&&At(t,a)})}),u}function bi(t,e,n={}){var i;const s=v(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(Ti(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(Ai).forEach((t,i)=>{t.notify("AnimationStart",e),r.push(bi(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 Ai(t,e){return t.sortNodePosition(e)}function Ei(t,e,n={}){let i;if(t.notify("AnimationStart",e),Array.isArray(e)){const s=e.map(e=>bi(t,e,n));i=Promise.all(s)}else if("string"==typeof e)i=bi(t,e,n);else{const s="function"==typeof e?v(t,e,n.custom):e;i=Promise.all(Ti(t,s,n))}return i.then(()=>{t.notify("AnimationComplete",e)})}function Mi(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}function Ci(t){return"string"==typeof t||Array.isArray(t)}const Vi=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Ri=["initial",...Vi],Di=Ri.length;const ki=[...Vi].reverse(),Li=Vi.length;function Bi(t){let e=function(t){return e=>Promise.all(e.map(({animation:e,options:n})=>Ei(t,e,n)))}(t),n=ji(),i=!0;const s=e=>(n,i)=>{var s;const o=v(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<Di;t++){const i=Ri[t],s=e.props[i];(Ci(s)||!1===s)&&(n[i]=s)}return n}(t.parent)||{},l=[],u=new Set;let c={},h=1/0;for(let e=0;e<Li;e++){const d=ki[e],p=n[d],m=void 0!==r[d]?r[d]:a[d],g=Ci(m),y=d===o?p.isActive:null;!1===y&&(h=e);let v=m===a[d]&&m!==r[d]&&g;if(v&&i&&t.manuallyAnimateOnMount&&(v=!1),p.protectedKeys={...c},!p.isActive&&null===y||!m&&!p.prevProp||f(m)||"boolean"==typeof m)continue;const x=Fi(p.prevProp,m);let w=x||d===o&&p.isActive&&!v&&g||e>h&&g,P=!1;const S=Array.isArray(m)?m:[m];let T=S.reduce(s(d),{});!1===y&&(T={});const{prevResolvedValues:b={}}=p,A={...b,...T},E=e=>{w=!0,u.has(e)&&(P=!0,u.delete(e)),p.needsAnimating[e]=!0;const n=t.getValue(e);n&&(n.liveStyle=!1)};for(const t in A){const e=T[t],n=b[t];if(c.hasOwnProperty(t))continue;let i=!1;i=pt(e)&&pt(n)?!Mi(e,n):e!==n,i?null!=e?E(t):u.add(t):void 0!==e&&u.has(t)?E(t):p.protectedKeys[t]=!0}p.prevProp=m,p.prevResolvedValues=T,p.isActive&&(c={...c,...T}),i&&t.blockInitialAnimation&&(w=!1);const M=!(v&&x)||P;w&&M&&l.push(...S.map(t=>({animation:t,options:{type:d}})))}if(u.size){const e={};if("boolean"!=typeof r.initial){const n=v(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=ji(),i=!0}}}function Fi(t,e){return"string"==typeof e?e!==t:!!Array.isArray(e)&&!Mi(e,t)}function Oi(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function ji(){return{animate:Oi(!0),whileInView:Oi(),whileHover:Oi(),whileTap:Oi(),whileDrag:Oi(),whileFocus:Oi(),exit:Oi()}}class Ii{constructor(t){this.isMounted=!1,this.node=t}update(){}}let Ui=0;const Wi={animation:{Feature:class extends Ii{constructor(t){super(t),t.animationState||(t.animationState=Bi(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();f(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 Ii{constructor(){super(...arguments),this.id=Ui++}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(){}}}},Ni=e.createContext({}),zi=()=>({x:{min:0,max:0},y:{min:0,max:0}});function Xi(t){return t.max-t.min}function $i(t,e,n,i=.5){t.origin=i,t.originPoint=mn(e.min,e.max,t.origin),t.scale=Xi(n)/Xi(e),t.translate=mn(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 Hi(t,e,n,i){$i(t.x,e.x,n.x,i?i.originX:void 0),$i(t.y,e.y,n.y,i?i.originY:void 0)}function Yi(t,e,n){t.min=n.min+e.min,t.max=t.min+Xi(e)}function Ki(t,e,n){t.min=e.min-n.min,t.max=t.min+Xi(e)}function Gi(t,e,n){Ki(t.x,e.x,n.x),Ki(t.y,e.y,n.y)}const _i=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 qi(t){return t.startsWith("while")||t.startsWith("drag")&&"draggable"!==t||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||_i.has(t)}let Zi=t=>!qi(t);function Ji(t){t&&(Zi=e=>e.startsWith("on")?!qi(e):t(e))}try{Ji(require("@emotion/is-prop-valid").default)}catch(t){}function Qi(t,e,n){const i={};for(const s in t)"values"===s&&"object"==typeof t.values||(Zi(s)||!0===n&&qi(s)||!e&&!qi(s)||t.draggable&&s.startsWith("onDrag"))&&(i[s]=t[s]);return i}const ts=e.createContext(null);function es(t){return f(t.animate)||Ri.some(e=>Ci(t[e]))}function ns(t){return Boolean(es(t)||t.variants)}function is(t){const n=e.useRef(null);return null===n.current&&(n.current=t()),n.current}function ss(t){const e=Et(t)?t.get():t;return n=e,Boolean(n&&"object"==typeof n&&n.mix&&n.toValue)?e.toValue():e;var n}const os=t=>(n,i)=>{const s=e.useContext(Ni),o=e.useContext(ts),r=()=>function({scrapeMotionValuesFromProps:t,createRenderState:e,onUpdate:n},i,s,o){const r={latestValues:rs(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():is(r)};function rs(t,e,n,i){const s={},o=i(t,{});for(const t in o)s[t]=ss(o[t]);let{initial:r,animate:a}=t;const l=es(t),u=ns(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&&!f(h)){const e=Array.isArray(h)?h:[h];for(let n=0;n<e.length;n++){const i=y(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}function as(t,e,n,i={passive:!0}){return t.addEventListener(e,n,i),()=>t.removeEventListener(e,n)}function ls(t){return{point:{x:t.pageX,y:t.pageY}}}const us=t=>e=>_(e)&&t(e,ls(e));function cs(t,e,n,i){return as(t,e,us(n),i)}const hs="undefined"!=typeof window;function ds(t){return e.useEffect(()=>()=>t(),[])}const ps=hs?e.useLayoutEffect:e.useEffect;function ms(){const t=function(){const t=e.useRef(!1);return ps(()=>(t.current=!0,()=>{t.current=!1}),[]),t}(),[n,i]=e.useState(0),s=e.useCallback(()=>{t.current&&i(n+1)},[n]);return[e.useCallback(()=>rt.postRender(s),[s]),n]}const fs=e.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"});class gs 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 ys({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(fs);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(gs,{isPresent:n,childRef:r,sizeRef:a,children:i.cloneElement(t,{ref:r})})}const vs=({children:t,initial:n,isPresent:s,onExitComplete:o,custom:r,presenceAffectsLayout:a,mode:l,anchorX:u})=>{const c=is(xs),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(ys,{isPresent:s,anchorX:u,children:t})),d(ts.Provider,{value:m,children:t})};function xs(){return new Map}function ws(t=!0){const n=e.useContext(ts);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 Ps=t=>t.key||"";function Ss(t){const n=[];return e.Children.forEach(t,t=>{e.isValidElement(t)&&n.push(t)}),n}const Ts=e.createContext(null),bs=t=>!t.isLayoutDirty&&t.willUpdate(!1);function As(){const t=new Set,e=new WeakMap,n=()=>t.forEach(bs);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}}function Es(t,e,n){const i=Et(t)?t:Tt(t);return i.start(Pi("",i,e,n)),i.animation}const Ms=(t,e,n)=>{const i=e-t;return((n-t)%i+i)%i+t};function Cs(t,e){return ti(t)?t[Ms(0,t.length,e)]:t}function Vs(t){return"object"==typeof t&&!Array.isArray(t)}function Rs(t,e,n,i){return"string"==typeof t&&Vs(e)?X(t,n,i):t instanceof NodeList?Array.from(t):Array.isArray(t)?t:[t]}function Ds(t,e,n){return t*(e+1)}function ks(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 Ls(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&&(vt(t,s),i--)}}(t,s,o);for(let r=0;r<e.length;r++)t.push({value:e[r],at:mn(s,o,i[r]),easing:Cs(n,r)})}function Bs(t,e){for(let n=0;n<t.length;n++)t[n]=t[n]/(e+1)}function Fs(t,e){return t.at===e.at?null===t.value?1:null===e.value?-1:0:t.at-e.at}function Os(t,e){return!e.has(t)&&e.set(t,{}),e.get(t)}function js(t,e){return e[t]||(e[t]=[]),e[t]}function Is(t){return Array.isArray(t)?t:[t]}function Us(t,e){return t&&t[e]?{...t,...t[e]}:{...t}}const Ws=t=>"number"==typeof t,Ns=t=>t.every(Ws),zs=new WeakMap;function Xs(t){return t instanceof SVGElement&&"svg"!==t.tagName}const $s={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"]},Hs={};for(const t in $s)Hs[t]={isEnabled:e=>$s[t].some(t=>!!e[t])};const Ys={current:null},Ks={current:!1};function Gs(){if(Ks.current=!0,hs)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>Ys.current=t.matches;t.addListener(e),e()}else Ys.current=!1}const _s=[...rn,ce,ye];const qs=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Zs{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=_e,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=gt.now();this.renderScheduledAt<t&&(this.renderScheduledAt=t,rt.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=es(e),this.isVariantNode=ns(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]&&Et(e)&&e.set(a[t],!1)}}mount(t){this.current=t,zs.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)),Ks.current||Gs(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||Ys.current),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),at(this.notifyUpdate),at(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=ht.has(t);n&&this.onBindTransform&&this.onBindTransform();const i=e.on("change",e=>{this.latestValues[t]=e,this.props.onUpdate&&rt.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 Hs){const e=Hs[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<qs.length;e++){const n=qs[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(Et(s))t.addValue(i,s);else if(Et(o))t.addValue(i,Tt(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,Tt(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=Tt(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&&(qe(i)||Xt(i))?i=parseFloat(i):(s=i,!_s.find(on(s))&&ye.test(e)&&(i=Ce(t,e))),this.setBaseTarget(t,Et(i)?i.get():i)),Et(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=y(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||Et(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 xt),this.events[t].add(e)}notify(t,...e){this.events[t]&&this.events[t].notify(...e)}}class Js extends Zs{constructor(){super(...arguments),this.KeyframeResolver=ln}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;Et(t)&&(this.childSubscription=t.on("change",t=>{this.current&&(this.current.textContent=""+t)}))}}const Qs=(t,e)=>e&&"number"==typeof t?e.transform(t):t,to={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},eo=ct.length;function no(t,e,n){let i="",s=!0;for(let o=0;o<eo;o++){const r=ct[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=Qs(a,Ae[r]);if(!l){s=!1;i+=`${to[r]||r}(${t}) `}n&&(e[r]=t)}}return i=i.trim(),n?i=n(e,s?"":i):s&&(i="none"),i}function io(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(ht.has(t))r=!0;else if(Je(t))s[t]=n;else{const e=Qs(n,Ae[t]);t.startsWith("origin")?(a=!0,o[t]=e):i[t]=e}}if(e.transform||(r||n?i.transform=no(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}`}}const so={offset:"stroke-dashoffset",array:"stroke-dasharray"},oo={offset:"strokeDashoffset",array:"strokeDasharray"};function ro(t,e,n){return"string"==typeof t?t:oe.transform(e+n*t)}function ao(t,{attrX:e,attrY:n,attrScale:i,originX:s,originY:o,pathLength:r,pathSpacing:a=1,pathOffset:l=0,...u},c,h){if(io(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`${ro(e,t.x,t.width)} ${ro(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?so:oo;t[o.offset]=oe.transform(-i);const r=oe.transform(e),a=oe.transform(n);t[o.array]=`${r} ${a}`}(d,r,a,l,!1)}const lo=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"]),uo=t=>"string"==typeof t&&"svg"===t.toLowerCase();function co(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}}}function ho(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 po(t,e,n,i){ho(t,e,void 0,i);for(const n in e.attrs)t.setAttribute(lo.has(n)?n:Ct(n),e.attrs[n])}const mo={};function fo(t){for(const e in t)mo[e]=t[e],Je(e)&&(mo[e].isCSSVariable=!0)}function go(t,{layout:e,layoutId:n}){return ht.has(t)||t.startsWith("origin")||(e||void 0!==n)&&(!!mo[t]||"opacity"===t)}function yo(t,e,n){var i;const{style:s}=t,o={};for(const r in s)(Et(s[r])||e.style&&Et(e.style[r])||go(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}function vo(t,e,n){const i=yo(t,e,n);for(const n in t)if(Et(t[n])||Et(e[n])){i[-1!==ct.indexOf(n)?"attr"+n.charAt(0).toUpperCase()+n.substring(1):n]=t[n]}return i}class xo extends Js{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=zi,this.updateDimensions=()=>{this.current&&!this.renderState.dimensions&&co(this.current,this.renderState)}}getBaseTargetFromProps(t,e){return t[e]}readValueFromInstance(t,e){if(ht.has(e)){const t=Me(e);return t&&t.default||0}return e=lo.has(e)?e:Ct(e),t.getAttribute(e)}scrapeMotionValuesFromProps(t,e,n){return vo(t,e,n)}onBindTransform(){this.current&&!this.renderState.dimensions&&rt.postRender(this.updateDimensions)}build(t,e,n){ao(t,e,this.isSVGTag,n.transformTemplate)}renderInstance(t,e,n,i){po(t,e,0,i)}mount(t){this.isSVGTag=uo(t.tagName),super.mount(t)}}function wo({top:t,left:e,right:n,bottom:i}){return{x:{min:e,max:n},y:{min:t,max:i}}}function Po(t){return void 0===t||1===t}function So({scale:t,scaleX:e,scaleY:n}){return!Po(t)||!Po(e)||!Po(n)}function To(t){return So(t)||bo(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function bo(t){return Ao(t.x)||Ao(t.y)}function Ao(t){return t&&"0%"!==t}function Eo(t,e,n){return n+e*(t-n)}function Mo(t,e,n,i,s){return void 0!==s&&(t=Eo(t,s,i)),Eo(t,n,i)+e}function Co(t,e=0,n=1,i,s){t.min=Mo(t.min,e,n,i,s),t.max=Mo(t.max,e,n,i,s)}function Vo(t,{x:e,y:n}){Co(t.x,e.translate,e.scale,e.originPoint),Co(t.y,n.translate,n.scale,n.originPoint)}function Ro(t,e){t.min=t.min+e,t.max=t.max+e}function Do(t,e,n,i,s=.5){Co(t,e,n,mn(t.min,t.max,s),i)}function ko(t,e){Do(t.x,e.x,e.scaleX,e.scale,e.originX),Do(t.y,e.y,e.scaleY,e.scale,e.originY)}function Lo(t,e){return wo(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))}class Bo extends Js{constructor(){super(...arguments),this.type="html",this.renderInstance=ho}readValueFromInstance(t,e){if(ht.has(e))return((t,e)=>{const{transform:n="none"}=getComputedStyle(t);return Ie(n,e)})(t,e);{const i=(n=t,window.getComputedStyle(n)),s=(Je(e)?i.getPropertyValue(e):i[e])||0;return"string"==typeof s?s.trim():s}var n}measureInstanceViewportBox(t,{transformPagePoint:e}){return Lo(t,e)}build(t,e,n){io(t,e,n.transformTemplate)}scrapeMotionValuesFromProps(t,e,n){return yo(t,e,n)}}class Fo extends Zs{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 Oo(t){const e={presenceContext:null,props:{},visualState:{renderState:{transform:{},transformOrigin:{},style:{},vars:{},attrs:{}},latestValues:{}}},n=Xs(t)?new xo(e):new Bo(e);n.mount(t),zs.set(t,n)}function jo(t){const e=new Fo({presenceContext:null,props:{},visualState:{renderState:{output:{}},latestValues:{}}});e.mount(t),zs.set(t,e)}function Io(t,e,n,i){const s=[];if(function(t,e){return Et(t)||"number"==typeof t||"string"==typeof t&&!Vs(e)}(t,e))s.push(Es(t,Vs(e)&&e.default||e,n&&n.default||n));else{const o=Rs(t,e,i),r=o.length;for(let t=0;t<r;t++){const i=o[t],a=i instanceof Element?Oo:jo;zs.has(i)||a(i);const l=zs.get(i),u={...n};"delay"in u&&"function"==typeof u.delay&&(u.delay=u.delay(t,r)),s.push(...Ti(l,{...e,transition:u},{}))}}return s}function Uo(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,ks(h,r.at,c,u));continue}let[p,m,f={}]=r;void 0!==f.at&&(h=ks(h,f.at,c,u));let g=0;const y=(t,n,i,r=0,a=0)=>{const l=Is(t),{delay:u=0,times:c=oi(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=D(p)?p:null==s?void 0:s[p];if(S<=2&&T){let t=100;if(2===S&&Ns(l)){const e=l[1]-l[0];t=Math.abs(e)}const e={...v};void 0!==w&&(e.duration=b(w));const n=R(e,t,T);x=n.ease,w=n.duration}null!=w||(w=o);const A=h+P;1===c.length&&0===c[0]&&(c[1]=1);const E=c.length-l.length;if(E>0&&si(c,E),1===l.length&&l.unshift(null),m){w=Ds(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":Cs(n,s-1))}Bs(c,m)}const M=A+w;Ls(i,l,x,c,A,M),g=Math.max(P+w,g),d=Math.max(M,d)};if(Et(p)){y(m,f,js("default",Os(p,a)))}else{const t=Rs(p,m,i,l),e=t.length;for(let n=0;n<e;n++){m=m,f=f;const i=Os(t[n],a);for(const t in m)y(m[t],Us(f,t),js(t,i),n,e)}}c=h,h+=g}return a.forEach((t,i)=>{for(const s in t){const o=t[s];o.sort(Fs);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(T(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:_n}).forEach(({keyframes:t,transition:e},n)=>{i.push(...Io(n,t,e))}),i}function Wo(t){return function(e,n,i){let s=[];var o;o=e,s=Array.isArray(o)&&o.some(Array.isArray)?Uo(e,n,t):Io(e,n,i,t);const r=new M(s);return t&&t.animations.push(r),r}}const No=Wo();function zo(t,e,n){t.style.setProperty(e,n)}function Xo(t,e,n){t.style[e]=n}const $o=S(()=>{try{document.createElement("div").animate({opacity:[1]})}catch(t){return!1}return!0}),Ho=new WeakMap;function Yo(t){const e=Ho.get(t)||new Map;return Ho.set(t,e),Ho.get(t)}class Ko 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 A(Number(i))}get time(){var t;return this.animation?A((null===(t=this.animation)||void 0===t?void 0:t.currentTime)||0):0}set time(t){this.animation&&(this.animation.currentTime=b(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&&k(this.animation,t),x}complete(){this.animation&&this.animation.finish()}cancel(){try{this.animation&&this.animation.cancel()}catch(t){}}}{constructor(t,e,n,i){const s=e.startsWith("--");P("string"!=typeof i.type);const o=Yo(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]&&Se[t]&&(e[i]=Se[t].transform(e[i]));!$o()&&e.length<2&&e.unshift(n())}(e,n,()=>e.startsWith("--")?t.style.getPropertyValue(e):window.getComputedStyle(t)[e]),D(i.type)){const t=R(i,100,i.type);i.ease=O()?t.ease:"easeOut",i.duration=b(t.duration),i.type="keyframes"}else i.ease=i.ease||"easeOut";const r=()=>{this.setValue(t,e,dn(n,i)),this.cancel(),this.resolveFinishedPromise()},a=()=>{this.setValue=s?zo:Xo,this.options=i,this.updateFinishedPromise(),this.removeAnimation=()=>{const n=Ho.get(t);n&&n.delete(e)}};mi()?(super(pi(t,e,n,i)),a(),!1===i.autoplay&&this.animation.pause(),this.animation.onfinish=r,Yo(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 Go=t=>function(e,n,i){return new M(function(t,e,n,i){const s=X(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={...C(a,t)};s.duration=s.duration?b(s.duration):s.duration,s.delay=b(s.delay||0),s.allowFlatten=!a.type&&!a.ease,r.push(new Ko(i,t,n,s))}}return r}(e,n,i,t))},_o=Go();function qo(t,e){let n;const i=()=>{const{currentTime:i}=e,s=(null===i?0:i.value)/100;n!==s&&t(s),n=s};return rt.update(i,!0),()=>at(i)}const Zo=new WeakMap;let Jo;function Qo({target:t,contentRect:e,borderBoxSize:n}){var i;null===(i=Zo.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 tr(t){t.forEach(Qo)}function er(t,e){Jo||"undefined"!=typeof ResizeObserver&&(Jo=new ResizeObserver(tr));const n=X(t);return n.forEach(t=>{let n=Zo.get(t);n||(n=new Set,Zo.set(t,n)),n.add(e),null==Jo||Jo.observe(t)}),()=>{n.forEach(t=>{const n=Zo.get(t);null==n||n.delete(e),(null==n?void 0:n.size)||null==Jo||Jo.unobserve(t)})}}const nr=new Set;let ir;function sr(t){return nr.add(t),ir||(ir=()=>{const t={width:window.innerWidth,height:window.innerHeight},e={target:window,size:t,contentSize:t};nr.forEach(t=>t(e))},window.addEventListener("resize",ir)),()=>{nr.delete(t),!nr.size&&ir&&(ir=void 0)}}const or={x:{length:"Width",position:"Left"},y:{length:"Height",position:"Top"}};function rr(t,e,n,i){const s=n[e],{length:o,position:r}=or[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=T(0,s.scrollLength,s.current);const u=i-l;s.velocity=u>50?0:wt(s.current-a,u)}const ar={start:0,center:.5,end:1};function lr(t,e,n=0){let i=0;if(t in ar&&(t=ar[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 ur=[0,0];function cr(t,e,n,i){let s=Array.isArray(t)?t:ur,o=0,r=0;return"number"==typeof t?s=[t,t]:"string"==typeof t&&(s=(t=t.trim()).includes(" ")?t.split(" "):[t,ar[t]?t:"0"]),o=lr(s[0],n,i),r=lr(s[1],e),o-r}const hr={Enter:[[0,1],[1,1]],Exit:[[0,0],[1,0]],Any:[[1,0],[0,1]],All:[[0,0],[1,1]]},dr={x:0,y:0};function pr(t,e,n){const{offset:i=hr.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):dr,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=cr(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=ii(e[o].offset,oi(i),{clamp:!1}),e[o].interpolatorOffsets=[...e[o].offset]),e[o].progress=$t(0,1,e[o].interpolate(e[o].current))}function mr(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){rr(t,"x",e,n),rr(t,"y",e,n),e.time=n}(t,n,e),(i.offset||i.target)&&pr(t,n,i)},notify:()=>e(n)}}const fr=new WeakMap,gr=new WeakMap,yr=new WeakMap,vr=t=>t===document.documentElement?window:t;function xr(t,{container:e=document.documentElement,...n}={}){let i=yr.get(e);i||(i=new Set,yr.set(e,i));const s=mr(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),!fr.has(e)){const t=()=>{for(const t of i)t.measure()},n=()=>{for(const t of i)t.update(lt.timestamp)},s=()=>{for(const t of i)t.notify()},a=()=>{rt.read(t,!1,!0),rt.read(n,!1,!0),rt.update(s,!1,!0)};fr.set(e,a);const l=vr(e);window.addEventListener("resize",a,{passive:!0}),e!==document.documentElement&&gr.set(e,(r=a,"function"==typeof(o=e)?sr(o):er(o,r))),l.addEventListener("scroll",a,{passive:!0})}var o,r;const a=fr.get(e);return rt.read(a,!1,!0),()=>{var t;at(a);const n=yr.get(e);if(!n)return;if(n.delete(s),n.size)return;const i=fr.get(e);fr.delete(e),i&&(vr(e).removeEventListener("scroll",i),null===(t=gr.get(e))||void 0===t||t(),window.removeEventListener("resize",i))}}const wr=new Map;function Pr({source:t,container:e=document.documentElement,axis:n="y"}={}){t&&(e=t),wr.has(e)||wr.set(e,{});const i=wr.get(e);return i[n]||(i[n]=E()?new ScrollTimeline({source:e,axis:n}):function({source:t,container:e,axis:n="y"}){t&&(e=t);const i={value:0},s=xr(t=>{i.value=100*t[n].progress},{container:e,axis:n});return{currentTime:i,cancel:s}}({source:e,axis:n})),i[n]}function Sr(t){return t&&(t.target||t.offset)}function Tr(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)||Sr(e)?xr(n=>{t(n[e.axis].progress,n)},e):qo(t,Pr(e))}(t,i):function(t,e){if(t.flatten(),Sr(e))return t.pause(),xr(n=>{t.time=t.duration*n[e.axis].progress},e);{const n=Pr(e);return t.attachTimeline?t.attachTimeline(n,t=>(t.pause(),qo(e=>{t.time=t.duration*e},n))):x}}(t,i)}const br={some:0,all:1};function Ar(t,e,{root:n,margin:i,amount:s="some"}={}){const o=X(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:br[s]});return o.forEach(t=>a.observe(t)),()=>a.disconnect()}function Er(t,e){const n=gt.now(),i=({timestamp:s})=>{const o=s-n;o>=e&&(at(i),t(o-e))};return rt.read(i,!0),()=>at(i)}const Mr=(t,e)=>Math.abs(t-e);function Cr(t,e){const n=Mr(t.x,e.x),i=Mr(t.y,e.y);return Math.sqrt(n**2+i**2)}function Vr(...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=ii(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}const Rr=rt,Dr=it.reduce((t,e)=>(t[e]=t=>at(t),t),{}),{schedule:kr,cancel:Lr}=ot(queueMicrotask,!1),Br=(t,e)=>t.depth-e.depth;class Fr{constructor(){this.children=[],this.isDirty=!1}add(t){yt(this.children,t),this.isDirty=!0}remove(t){vt(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(Br),this.isDirty=!1,this.children.forEach(t)}}const Or=["TopLeft","TopRight","BottomLeft","BottomRight"],jr=Or.length,Ir=t=>"string"==typeof t?parseFloat(t):t,Ur=t=>"number"==typeof t||oe.test(t);function Wr(t,e){return void 0!==t[e]?t[e]:t.borderRadius}const Nr=Xr(0,.5,Nt),zr=Xr(.5,.95,x);function Xr(t,e,n){return i=>i<t?0:i>e?1:n(T(t,e,i))}function $r(t,e){t.min=e.min,t.max=e.max}function Hr(t,e){$r(t.x,e.x),$r(t.y,e.y)}function Yr(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}function Kr(t,e,n,i,s){return t=Eo(t-=e,1/n,i),void 0!==s&&(t=Eo(t,1/s,i)),t}function Gr(t,e,[n,i,s],o,r){!function(t,e=0,n=1,i=.5,s,o=t,r=t){if(se.test(e)){e=parseFloat(e);e=mn(r.min,r.max,e/100)-r.min}if("number"!=typeof e)return;let a=mn(o.min,o.max,i);t===o&&(a-=e),t.min=Kr(t.min,e,n,a,s),t.max=Kr(t.max,e,n,a,s)}(t,e[n],e[i],e[s],e.scale,o,r)}const _r=["x","scaleX","originX"],qr=["y","scaleY","originY"];function Zr(t,e,n,i){Gr(t.x,e,_r,n?n.x:void 0,i?i.x:void 0),Gr(t.y,e,qr,n?n.y:void 0,i?i.y:void 0)}function Jr(t){return 0===t.translate&&1===t.scale}function Qr(t){return Jr(t.x)&&Jr(t.y)}function ta(t,e){return t.min===e.min&&t.max===e.max}function ea(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function na(t,e){return ea(t.x,e.x)&&ea(t.y,e.y)}function ia(t){return Xi(t.x)/Xi(t.y)}function sa(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}class oa{constructor(){this.members=[]}add(t){yt(this.members,t),t.scheduleRender()}remove(t){if(vt(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)}}function ra(t){return[t("x"),t("y")]}const aa={hasAnimatedSinceResize:!0,hasEverUpdated:!1},la=["","X","Y","Z"],ua={visibility:"hidden"};let ca=0;function ha(t,e,n,i){const{latestValues:s}=e;s[t]&&(n[t]=s[t],e.setStaticValue(t,0),i&&(i[t]=0))}function da({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:i,resetTransform:s}){return class{constructor(t={},n=(null==e?void 0:e())){this.id=ca++,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(fa),this.nodes.forEach(Sa),this.nodes.forEach(Ta),this.nodes.forEach(ga)},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 Fr)}addEventListener(t,e){return this.eventHandlers.has(t)||this.eventHandlers.set(t,new xt),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=Xs(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=Er(i,250),aa.hasAnimatedSinceResize&&(aa.hasAnimatedSinceResize=!1,this.nodes.forEach(Pa))})}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()||Va,{onLayoutAnimationStart:r,onLayoutAnimationComplete:a}=o.getProps(),l=!this.targetLayout||!na(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={...C(s,"layout"),onPlay:r,onComplete:a};(o.shouldReduceMotion||this.options.layoutRoot)&&(e.delay=0,e.type=!1),this.startAnimation(e)}else e||Pa(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,at(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(ba),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=Rt(n);if(window.MotionHasOptimisedAnimation(i,"transform")){const{layout:t,layoutId:n}=e.options;window.MotionCancelOptimisedAnimation(i,"transform",rt,!(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(va);this.isUpdating||this.nodes.forEach(xa),this.isUpdating=!1,this.nodes.forEach(wa),this.nodes.forEach(pa),this.nodes.forEach(ma),this.clearAllSnapshots();const t=gt.now();lt.delta=$t(0,1e3/60,t-lt.timestamp),lt.timestamp=t,lt.isProcessing=!0,ut.update.process(lt),ut.preRender.process(lt),ut.render.process(lt),lt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,kr.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(ya),this.sharedNodes.forEach(Aa)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,rt.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){rt.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure(),!this.snapshot||Xi(this.snapshot.measuredBox.x)||Xi(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&&!Qr(this.projectionDelta),n=this.getTransformTemplate(),i=n?n(this.latestValues,""):void 0,o=i!==this.prevTransformTemplateValue;t&&(e||To(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)),ka((i=n).x),ka(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(Ba))){const{scroll:t}=this.root;t&&(Ro(n.x,t.offset.x),Ro(n.y,t.offset.y))}return n}removeElementScroll(t){var e;const n={x:{min:0,max:0},y:{min:0,max:0}};if(Hr(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&&Hr(n,t),Ro(n.x,s.offset.x),Ro(n.y,s.offset.y))}return n}applyTransform(t,e=!1){const n={x:{min:0,max:0},y:{min:0,max:0}};Hr(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&&ko(n,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),To(i.latestValues)&&ko(n,i.latestValues)}return To(this.latestValues)&&ko(n,this.latestValues),n}removeTransform(t){const e={x:{min:0,max:0},y:{min:0,max:0}};Hr(e,t);for(let t=0;t<this.path.length;t++){const n=this.path[t];if(!n.instance)continue;if(!To(n.latestValues))continue;So(n.latestValues)&&n.updateSnapshot();const i={x:{min:0,max:0},y:{min:0,max:0}};Hr(i,n.measurePageBox()),Zr(e,n.latestValues,n.snapshot?n.snapshot.layoutBox:void 0,i)}return To(this.latestValues)&&Zr(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!==lt.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=lt.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}},Gi(this.relativeTargetOrigin,this.layout.layoutBox,t.layout.layoutBox),Hr(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,Yi(r.x,a.x,l.x),Yi(r.y,a.y,l.y)):this.targetDelta?(Boolean(this.resumingFrom)?this.target=this.applyTransform(this.layout.layoutBox):Hr(this.target,this.layout.layoutBox),Vo(this.target,this.targetDelta)):Hr(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}},Gi(this.relativeTargetOrigin,this.target,t.target),Hr(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(this.parent&&!So(this.parent.latestValues)&&!bo(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===lt.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;Hr(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&&ko(t,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),r&&(e.x*=r.x.scale,e.y*=r.y.scale,Vo(t,r)),i&&To(o.latestValues)&&ko(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?(Yr(this.prevProjectionDelta.x,this.projectionDelta.x),Yr(this.prevProjectionDelta.y,this.projectionDelta.y)):this.createProjectionDeltas(),Hi(this.projectionDelta,this.layoutCorrected,l,this.latestValues),this.treeScale.x===r&&this.treeScale.y===a&&sa(this.projectionDelta.x,this.prevProjectionDelta.x)&&sa(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(Ca));let h;this.animationProgress=0,this.mixTargetDelta=e=>{const n=e/1e3;var l,d;Ea(o.x,t.x,n),Ea(o.y,t.y,n),this.setTargetDelta(o),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Gi(r,this.layout.layoutBox,this.relativeParent.layout.layoutBox),function(t,e,n,i){Ma(t.x,e.x,n.x,i),Ma(t.y,e.y,n.y,i)}(this.relativeTarget,this.relativeTargetOrigin,r,n),h&&(l=this.relativeTarget,d=h,ta(l.x,d.x)&&ta(l.y,d.y))&&(this.isProjectionDirty=!1),h||(h={x:{min:0,max:0},y:{min:0,max:0}}),Hr(h,this.relativeTarget)),a&&(this.animationValues=s,function(t,e,n,i,s,o){s?(t.opacity=mn(0,void 0!==n.opacity?n.opacity:1,Nr(i)),t.opacityExit=mn(void 0!==e.opacity?e.opacity:1,0,zr(i))):o&&(t.opacity=mn(void 0!==e.opacity?e.opacity:1,void 0!==n.opacity?n.opacity:1,i));for(let s=0;s<jr;s++){const o=`border${Or[s]}Radius`;let r=Wr(e,o),a=Wr(n,o);if(void 0===r&&void 0===a)continue;r||(r=0),a||(a=0);0===r||0===a||Ur(r)===Ur(a)?(t[o]=Math.max(mn(Ir(r),Ir(a),i),0),(se.test(a)||se.test(r))&&(t[o]+="%")):t[o]=a}(e.rotate||n.rotate)&&(t.rotate=mn(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&&(at(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=rt.update(()=>{aa.hasAnimatedSinceResize=!0,this.currentAnimation=Es(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&&La(this.options.animationType,this.layout.layoutBox,i.layoutBox)){n=this.target||{x:{min:0,max:0},y:{min:0,max:0}};const e=Xi(this.layout.layoutBox.x);n.x.min=t.target.x.min,n.x.max=n.x.min+e;const i=Xi(this.layout.layoutBox.y);n.y.min=t.target.y.min,n.y.max=n.y.min+i}Hr(e,n),ko(e,s),Hi(this.projectionDeltaWithTransform,this.layoutCorrected,e,s)}}registerSharedNode(t,e){this.sharedNodes.has(t)||this.sharedNodes.set(t,new oa);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&&ha("z",t,i,this.animationValues);for(let e=0;e<la.length;e++)ha("rotate"+la[e],t,i,this.animationValues),ha("skew"+la[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 ua;const i={visibility:""},s=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,i.opacity="",i.pointerEvents=ss(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=ss(null==t?void 0:t.pointerEvents)||""),this.hasProjected&&!To(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 mo){if(void 0===r[t])continue;const{correct:e,applyTo:n,isCSSVariable:s}=mo[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?ss(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(va),this.root.sharedNodes.clear()}}}function pa(t){t.updateLayout()}function ma(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?ra(t=>{const i=o?n.measuredBox[t]:n.layoutBox[t],s=Xi(i);i.min=e[t].min,i.max=i.min+s}):La(s,n.layoutBox,e)&&ra(i=>{const s=o?n.measuredBox[i]:n.layoutBox[i],r=Xi(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}};Hi(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?Hi(a,t.applyTransform(i,!0),n.measuredBox):Hi(a,e,n.layoutBox);const l=!Qr(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}};Gi(r,n.layoutBox,s.layoutBox);const a={x:{min:0,max:0},y:{min:0,max:0}};Gi(a,e,o.layoutBox),na(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 fa(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 ga(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function ya(t){t.clearSnapshot()}function va(t){t.clearMeasurements()}function xa(t){t.isLayoutDirty=!1}function wa(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function Pa(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function Sa(t){t.resolveTargetDelta()}function Ta(t){t.calcProjection()}function ba(t){t.resetSkewAndRotation()}function Aa(t){t.removeLeadSnapshot()}function Ea(t,e,n){t.translate=mn(e.translate,0,n),t.scale=mn(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function Ma(t,e,n,i){t.min=mn(e.min,n.min,i),t.max=mn(e.max,n.max,i)}function Ca(t){return t.animationValues&&void 0!==t.animationValues.opacityExit}const Va={duration:.45,ease:[.4,0,.1,1]},Ra=t=>"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),Da=Ra("applewebkit/")&&!Ra("chrome/")?Math.round:x;function ka(t){t.min=Da(t.min),t.max=Da(t.max)}function La(t,e,n){return"position"===t||"preserve-aspect"===t&&(i=ia(e),s=ia(n),o=.2,!(Math.abs(i-s)<=o));var i,s,o}function Ba(t){var e;return t!==t.root&&(null===(e=t.scroll)||void 0===e?void 0:e.wasRoot)}const Fa=da({attachResizeListener:(t,e)=>as(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Oa={current:void 0},ja=da({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!Oa.current){const t=new Fa({});t.mount(window),t.setOptions({layoutScroll:!0}),Oa.current=t}return Oa.current},resetTransform:(t,e)=>{t.style.transform=void 0!==e?e:"none"},checkIsScrollRoot:t=>Boolean("fixed"===window.getComputedStyle(t).position)});function Ia(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const Ua={correct:(t,e)=>{if(!e.target)return t;if("string"==typeof t){if(!oe.test(t))return t;t=parseFloat(t)}return`${Ia(t,e.target.x)}% ${Ia(t,e.target.y)}%`}},Wa={correct:(t,{treeScale:e,projectionDelta:n})=>{const i=t,s=ye.parse(t);if(s.length>5)return i;const o=ye.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=mn(a,l,.5);return"number"==typeof s[2+r]&&(s[2+r]/=u),"number"==typeof s[3+r]&&(s[3+r]/=u),o(s)}},Na=t=>!0===t,za=({children:t,id:n,inherit:i=!0})=>{const s=e.useContext(m),o=e.useContext(Ts),[r,a]=ms(),l=e.useRef(null),u=s.id||o;null===l.current&&((t=>Na(!0===t)||"id"===t)(i)&&u&&(n=n?u+"-"+n:u),l.current={id:n,group:Na(i)&&s.group||As()});const c=e.useMemo(()=>({...l.current,forceRender:r}),[a]);return d(m.Provider,{value:c,children:t})},Xa=e.createContext({strict:!1});function $a(t){for(const e in t)Hs[e]={...Hs[e],...t[e]}}function Ha(t){return"function"==typeof t}const Ya=e.createContext(null);function Ka(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))})}const Ga=({current:t})=>t?t.ownerDocument.defaultView:null;function _a(t){return t&&"object"==typeof t&&Object.prototype.hasOwnProperty.call(t,"current")}class qa{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=Qa(this.lastMoveEventInfo,this.history),e=null!==this.startEvent,n=Cr(t.offset,{x:0,y:0})>=3;if(!e&&!n)return;const{point:i}=t,{timestamp:s}=lt;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=Za(e,this.transformPagePoint),rt.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=Qa("pointercancel"===t.type?this.lastMoveEventInfo:Za(e,this.transformPagePoint),this.history);this.startEvent&&n&&n(t,o),i&&i(t,o)},!_(t))return;this.dragSnapToOrigin=s,this.handlers=e,this.transformPagePoint=n,this.contextWindow=i||window;const o=Za(ls(t),this.transformPagePoint),{point:r}=o,{timestamp:a}=lt;this.history=[{...r,timestamp:a}];const{onSessionStart:l}=e;l&&l(t,Qa(o,this.history)),this.removeListeners=Sn(cs(this.contextWindow,"pointermove",this.handlePointerMove),cs(this.contextWindow,"pointerup",this.handlePointerUp),cs(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),at(this.updatePoint)}}function Za(t,e){return e?{point:e(t.point)}:t}function Ja(t,e){return{x:t.x-e.x,y:t.y-e.y}}function Qa({point:t},e){return{point:t,delta:Ja(t,el(e)),offset:Ja(t,tl(e)),velocity:nl(e,.1)}}function tl(t){return t[0]}function el(t){return t[t.length-1]}function nl(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,i=null;const s=el(t);for(;n>=0&&(i=t[n],!(s.timestamp-i.timestamp>b(e)));)n--;if(!i)return{x:0,y:0};const o=A(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 il(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 sl(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 ol=.35;function rl(t,e,n){return{min:al(t,e),max:al(t,n)}}function al(t,e){return"number"==typeof t?t:t[e]||0}const ll=new WeakMap;class ul{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 qa(t,{onSessionStart:t=>{const{dragSnapToOrigin:n}=this.getProps();n?this.pauseAnimation():this.stopAnimation(),e&&this.snapToCursor(ls(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?N[o]?null:(N[o]=!0,()=>{N[o]=!1}):N.x||N.y?null:(N.x=N.y=!0,()=>{N.x=N.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),ra(t=>{let e=this.getAxisMotionValue(t).get()||0;if(se.test(e)){const{projection:n}=this.visualElement;if(n&&n.layout){const i=n.layout.layoutBox[t];if(i){e=Xi(i)*(parseFloat(e)/100)}}}this.originPoint[t]=e}),s&&rt.postRender(()=>s(t,e)),Mt(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:()=>ra(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:Ga(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&&rt.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||!cl(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?mn(e,t,i.min):Math.max(t,e):void 0!==n&&t>n&&(t=i?mn(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&&_a(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!e||!i)&&function(t,{top:e,left:n,bottom:i,right:s}){return{x:il(t.x,n,s),y:il(t.y,e,i)}}(i.layoutBox,e),this.elastic=function(t=ol){return!1===t?t=0:!0===t&&(t=ol),{x:rl(t,"left","right"),y:rl(t,"top","bottom")}}(n),s!==this.constraints&&i&&this.constraints&&!this.hasMutatedConstraints&&ra(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||!_a(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=Lo(t,n),{scroll:s}=e;return s&&(Ro(i.x,s.offset.x),Ro(i.y,s.offset.y)),i}(n,i.root,this.visualElement.getTransformPagePoint());let o=function(t,e){return{x:sl(t.x,e.x),y:sl(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=wo(t))}return o}startAnimation(t){const{drag:e,dragMomentum:n,dragElastic:i,dragTransition:s,dragSnapToOrigin:o,onDragTransitionEnd:r}=this.getProps(),a=this.constraints||{},l=ra(r=>{if(!cl(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 Mt(this.visualElement,t),n.start(Pi(t,n,0,e,this.visualElement,!1))}stopAnimation(){ra(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){ra(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){ra(e=>{const{drag:n}=this.getProps();if(!cl(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]-mn(n,o,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:e}=this.getProps(),{projection:n}=this.visualElement;if(!_a(e)||!n||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};ra(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=Xi(t),s=Xi(e);return s>i?n=T(e.min,e.max-i,t.min):i>s&&(n=T(t.min,t.max-s,e.min)),$t(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(),ra(e=>{if(!cl(e,t,null))return;const n=this.getAxisMotionValue(e),{min:s,max:o}=this.constraints[e];n.set(mn(s,o,i[e]))})}addListeners(){if(!this.visualElement.current)return;ll.set(this.visualElement,this);const t=cs(this.visualElement.current,"pointerdown",t=>{const{drag:e,dragListener:n=!0}=this.getProps();e&&n&&this.start(t)}),e=()=>{const{dragConstraints:t}=this.getProps();_a(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()),rt.read(e);const s=as(window,"resize",()=>this.scalePositionWithinConstraints()),o=n.addEventListener("didUpdate",({delta:t,hasLayoutChanged:e})=>{this.isDragging&&e&&(ra(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=ol,dragMomentum:r=!0}=t;return{...t,drag:e,dragDirectionLock:n,dragPropagation:i,dragConstraints:s,dragElastic:o,dragMomentum:r}}}function cl(t,e,n){return!(!0!==e&&e!==t||null!==n&&n!==t)}const hl=t=>(e,n)=>{t&&rt.postRender(()=>t(e,n))};const dl=e.createContext({});class pl extends e.Component{componentDidMount(){const{visualElement:t,layoutGroup:e,switchLayoutGroup:n,layoutId:i}=this.props,{projection:s}=t;fo(fl),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()})),aa.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()||rt.postRender(()=>{const t=o.getStack();t&&t.members.length||this.safeToRemove()})),null):null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),kr.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 ml(t){const[n,i]=ws(),s=e.useContext(m);return d(pl,{...t,layoutGroup:s,switchLayoutGroup:e.useContext(dl),isPresent:n,safeToRemove:i})}const fl={borderRadius:{...Ua,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Ua,borderTopRightRadius:Ua,borderBottomLeftRadius:Ua,borderBottomRightRadius:Ua,boxShadow:Wa},gl={pan:{Feature:class extends Ii{constructor(){super(...arguments),this.removePointerDownListener=x}onPointerDown(t){this.session=new qa(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Ga(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:e,onPan:n,onPanEnd:i}=this.node.getProps();return{onSessionStart:hl(t),onStart:hl(e),onMove:n,onEnd:(t,e)=>{delete this.session,i&&rt.postRender(()=>i(t,e))}}}mount(){this.removePointerDownListener=cs(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 Ii{constructor(t){super(t),this.removeGroupControls=x,this.removeListeners=x,this.controls=new ul(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||x}unmount(){this.removeGroupControls(),this.removeListeners()}},ProjectionNode:ja,MeasureLayout:ml}};function yl(t,e,n){const{props:i}=t;t.animationState&&i.whileHover&&t.animationState.setActive("whileHover","Start"===n);const s=i["onHover"+n];s&&rt.postRender(()=>s(e,ls(e)))}function vl(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&&rt.postRender(()=>s(e,ls(e)))}const xl=new WeakMap,wl=new WeakMap,Pl=t=>{const e=xl.get(t.target);e&&e(t)},Sl=t=>{t.forEach(Pl)};function Tl(t,e,n){const i=function({root:t,...e}){const n=t||document;wl.has(n)||wl.set(n,{});const i=wl.get(n),s=JSON.stringify(e);return i[s]||(i[s]=new IntersectionObserver(Sl,{root:t,...e})),i[s]}(e);return xl.set(t,n),i.observe(t),()=>{xl.delete(t),i.unobserve(t)}}const bl={some:0,all:1};const Al={inView:{Feature:class extends Ii{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:bl[i]};return Tl(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 Ii{mount(){const{current:t}=this.node;t&&(this.unmount=et(t,(t,e)=>(vl(this.node,e,"Start"),(t,{success:e})=>vl(this.node,t,e?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}},focus:{Feature:class extends Ii{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=Sn(as(this.node.current,"focus",()=>this.onFocus()),as(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}},hover:{Feature:class extends Ii{mount(){const{current:t}=this.node;t&&(this.unmount=Y(t,(t,e)=>(yl(this.node,e,"Start"),t=>yl(this.node,t,"End"))))}unmount(){}}}},El={layout:{ProjectionNode:ja,MeasureLayout:ml}};function Ml(t){const{initial:n,animate:i}=function(t,e){if(es(t)){const{initial:e,animate:n}=t;return{initial:!1===e||Ci(e)?e:void 0,animate:Ci(n)?n:void 0}}return!1!==t.inherit?e:{}}(t,e.useContext(Ni));return e.useMemo(()=>({initial:n,animate:i}),[Cl(n),Cl(i)])}function Cl(t){return Array.isArray(t)?t.join(" "):t}const Vl=Symbol.for("motionComponentSymbol");function Rl(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):_a(i)&&(i.current=e))},[n])}function Dl(t,n,i,s,o){var r,a;const{visualElement:l}=e.useContext(Ni),u=e.useContext(Xa),c=e.useContext(ts),h=e.useContext(fs).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(dl);!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&&_a(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[Vt],y=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 ps(()=>{p&&(f.current=!0,window.MotionIsMounted=!0,p.updateFeatures(),kr.render(p.render),y.current&&p.animationState&&p.animationState.animateChanges())}),e.useEffect(()=>{p&&(!y.current&&p.animationState&&p.animationState.animateChanges(),y.current&&(queueMicrotask(()=>{var t;null===(t=window.MotionHandoffMarkAsComplete)||void 0===t||t.call(window,g)}),y.current=!1))}),p}function kl({preloadedFeatures:t,createVisualElement:n,useRender:i,useVisualState:s,Component:o}){var r,a;function l(t,r){let a;const l={...e.useContext(fs),...t,layoutId:Ll(t)},{isStatic:u}=l,c=Ml(t),h=s(t,u);if(!u&&hs){e.useContext(Xa).strict;const t=function(t){const{drag:e,layout:n}=Hs;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=Dl(o,h,l,n,t.ProjectionNode)}return p(Ni.Provider,{value:c,children:[a&&c.visualElement?d(a,{visualElement:c.visualElement,...l}):null,i(o,t,Rl(h,c.visualElement,r),h,u,c.visualElement)]})}t&&$a(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[Vl]=o,u}function Ll({layoutId:t}){const n=e.useContext(m).id;return n&&void 0!==t?n+"-"+t:t}const Bl=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Fl(t,e,n){for(const i in e)Et(e[i])||go(i,n)||(t[i]=e[i])}function Ol(t,n){const i={};return Fl(i,t.style||{},t),Object.assign(i,function({transformTemplate:t},n){return e.useMemo(()=>{const e={style:{},transform:{},transformOrigin:{},vars:{}};return io(e,n,t),Object.assign({},e.vars,e.style)},[n])}(t,n)),i}function jl(t,e){const n={},i=Ol(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 Il=["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 Ul(t){return"string"==typeof t&&!t.includes("-")&&!!(Il.indexOf(t)>-1||/[A-Z]/u.test(t))}const Wl=()=>({style:{},transform:{},transformOrigin:{},vars:{},attrs:{}});function Nl(t,n,i,s){const o=e.useMemo(()=>{const e={style:{},transform:{},transformOrigin:{},vars:{},attrs:{}};return ao(e,n,uo(s),t.transformTemplate),{...e.attrs,style:{...e.style}}},[n]);if(t.style){const e={};Fl(e,t.style,t),o.style={...e,...o.style}}return o}function zl(t=!1){return(n,i,s,{latestValues:o},r)=>{const a=(Ul(n)?Nl:jl)(i,o,r,n),l=Qi(i,"string"==typeof n,t),u=n!==e.Fragment?{...l,...a,ref:s}:{},{children:c}=i,h=e.useMemo(()=>Et(c)?c.get():c,[c]);return e.createElement(n,{...u,children:h})}}const Xl={useVisualState:os({scrapeMotionValuesFromProps:yo,createRenderState:Bl})},$l=["x","y","width","height","cx","cy","r"],Hl={useVisualState:os({scrapeMotionValuesFromProps:vo,createRenderState:Wl,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(ht.has(t)){o=!0;break}if(!o)return;let r=!e;if(e)for(let n=0;n<$l.length;n++){const i=$l[n];t[i]!==e[i]&&(r=!0)}r&&rt.read(()=>{co(n,i),rt.render(()=>{ao(i,s,uo(n.tagName),t.transformTemplate),po(n,i)})})}})};function Yl(t,e){return function(n,{forwardMotionProps:i}={forwardMotionProps:!1}){return kl({...Ul(n)?Hl:Xl,preloadedFeatures:t,useRender:zl(i),createVisualElement:e,Component:n})}}const Kl=(t,n)=>Ul(t)?new xo(n):new Bo(n,{allowProjection:t!==e.Fragment}),Gl=Ka(Yl({...Wi,...Al,...gl,...El},Kl));function _l({children:t,as:n="ul",axis:i="y",onReorder:s,values:o,...r},a){const l=is(()=>Gl[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(Jl)},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=mn(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(Zl).filter(t=>-1!==o.indexOf(t))))}};return e.useEffect(()=>{c.current=!1}),d(l,{...r,ref:a,ignoreStrict:!0,children:d(Ya.Provider,{value:h,children:t})})}const ql=e.forwardRef(_l);function Zl(t){return t.value}function Jl(t,e){return t.layout.min-e.layout.min}function Ql(t){const n=is(()=>Tt(t)),{isStatic:i}=e.useContext(fs);if(i){const[,i]=e.useState(t);e.useEffect(()=>n.on("change",i),[])}return n}function tu(t,e){const n=Ql(e()),i=()=>n.set(e());return i(),ps(()=>{const e=()=>rt.preRender(i,!1,!0),n=t.map(t=>t.on("change",e));return()=>{n.forEach(t=>t()),at(i)}}),n}function eu(t,e,n,i){if("function"==typeof t)return function(t){Pt.current=[],t();const e=tu(Pt.current,t);return Pt.current=void 0,e}(t);const s="function"==typeof e?e:Vr(e,n,i);return Array.isArray(t)?nu(t,s):nu([t],([t])=>s(t))}function nu(t,e){const n=is(()=>[]);return tu(t,()=>{n.length=0;const i=t.length;for(let e=0;e<i;e++)n[e]=t[e].get();return e(n)})}function iu(t,e=0){return Et(t)?t:Ql(e)}function su({children:t,style:n={},value:i,as:s="li",onDrag:o,layout:r=!0,...a},l){const u=is(()=>Gl[s]),c=e.useContext(Ya),h={x:iu(n.x),y:iu(n.y)},p=eu([h.x,h.y],([t,e])=>t||e?1:"unset"),{axis:m,registerItem:f,updateOrder:g}=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]&&g(i,h[m].get(),n[m]),o&&o(t,e)},onLayoutMeasure:t=>f(i,t),ref:l,ignoreStrict:!0,children:t})}const ou=e.forwardRef(su);var ru=Object.freeze({__proto__:null,Group:ql,Item:ou});const au=Ka(Yl()),lu={renderer:Kl,...Wi,...Al},uu={...lu,...gl,...El},cu={renderer:Kl,...Wi};function hu(t,n,i){e.useInsertionEffect(()=>t.on(n,i),[t,n,i])}function du(t,e){w(Boolean(!e||e.current))}const pu=()=>({scrollX:Tt(0),scrollY:Tt(0),scrollXProgress:Tt(0),scrollYProgress:Tt(0)});function mu({container:t,target:n,layoutEffect:i=!0,...s}={}){const o=is(pu);return(i?ps:e.useEffect)(()=>(du(0,n),du(0,t),Tr((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 fu(t,e){return e?t+e:t}function gu(t){return"number"==typeof t?t:parseFloat(t)}function yu(t){const n=e.useRef(0),{isStatic:i}=e.useContext(fs);e.useEffect(()=>{if(i)return;const e=({timestamp:e,delta:i})=>{n.current||(n.current=e),t(e-n.current,i)};return rt.update(e,!0),()=>at(e)},[t])}class vu extends St{constructor(){super(...arguments),this.values=[]}add(t){const e=function(t){return ht.has(t)?"transform":di.has(t)?Ct(t):void 0}(t);e&&(yt(this.values,e),this.update())}update(){this.set(this.values.length?this.values.join(", "):"auto")}}function xu(){!Ks.current&&Gs();const[t]=e.useState(Ys.current);return t}function wu(t,e){[...e].reverse().forEach(n=>{const i=t.getVariant(n);i&&At(t,i),t.variantChildren&&t.variantChildren.forEach(t=>{wu(t,e)})})}function Pu(){const t=new Set,e={subscribe:e=>(t.add(e),()=>{t.delete(e)}),start(e,n){const i=[];return t.forEach(t=>{i.push(Ei(t,e,{transitionOverride:n}))}),Promise.all(i)},set:e=>t.forEach(t=>{!function(t,e){Array.isArray(e)?wu(t,e):"string"==typeof e?wu(t,[e]):At(t,e)}(t,e)}),stop(){t.forEach(t=>{!function(t){t.values.forEach(t=>t.stop())}(t)})},mount:()=>()=>{e.stop()}};return e}function Su(){const t=is(Pu);return ps(t.mount,[]),t}const Tu=Su;class bu{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 Au=()=>new bu;function Eu(t){return null!==t&&"object"==typeof t&&Vl in t}function Mu(){return Cu}function Cu(t){Oa.current&&(Oa.current.isUpdating=!1,Oa.current.blockUpdate(),t&&t())}const Vu=(t,e)=>`${t}: ${ht.has(e)?"transform":e}`,Ru=new Map,Du=new Map;function ku(t,e,n){var i;const s=Vu(t,e),o=Ru.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 Lu,Bu;const Fu=new Set;function Ou(){Fu.forEach(t=>{t.animation.play(),t.animation.startTime=t.startTime}),Fu.clear()}const ju=()=>({});class Iu extends Zs{constructor(){super(...arguments),this.measureInstanceViewportBox=zi}build(){}resetTransform(){}restoreTransform(){}removeValueFromRenderState(){}renderInstance(){}scrapeMotionValuesFromProps(){return{}}getBaseTargetFromProps(){}readValueFromInstance(t,e,n){return n.initialState[e]||0}sortInstanceNodePosition(){return 0}}const Uu=os({scrapeMotionValuesFromProps:ju,createRenderState:ju});let Wu=0;const Nu=t=>t>.001?1/t:1e5;t.AcceleratedAnimation=gi,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]=ws(a),p=e.useMemo(()=>Ss(t),[t]),f=a&&!u?[]:p.map(Ps),g=e.useRef(!0),y=e.useRef(p),v=is(()=>new Map),[x,w]=e.useState(p),[P,S]=e.useState(p);ps(()=>{g.current=!1,y.current=p;for(let t=0;t<P.length;t++){const e=Ps(P[t]);f.includes(e)?v.delete(e):!0!==v.get(e)&&v.set(e,!1)}},[P,f.length,f.join("-")]);const T=[];if(p!==x){let t=[...p];for(let e=0;e<P.length;e++){const n=P[e],i=Ps(n);f.includes(i)||(t.splice(e,0,n),T.push(n))}return"wait"===r&&T.length&&(t=T),S(Ss(t)),w(p),null}const{forceRender:b}=e.useContext(m);return d(h,{children:P.map(t=>{const e=Ps(t),h=!(a&&!u)&&(p===P||f.includes(e));return d(vs,{isPresent:h,initial:!(g.current&&!i)&&void 0,custom:n,presenceAffectsLayout:o,mode:r,onExitComplete:h?void 0:()=>{if(!v.has(e))return;v.set(e,!0);let t=!0;v.forEach(e=>{e||(t=!1)}),t&&(null==b||b(),S(y.current),a&&(null==c||c()),s&&s())},anchorX:l,children:t},e)})})},t.AnimateSharedLayout=({children:t})=>(i.useEffect(()=>{},[]),d(za,{id:is(()=>"asl-"+Wu++),children:t})),t.DeprecatedLayoutGroupContext=Ts,t.DragControls=bu,t.FlatTree=Fr,t.LayoutGroup=za,t.LayoutGroupContext=m,t.LazyMotion=function({children:t,features:n,strict:i=!1}){const[,s]=e.useState(!Ha(n)),o=e.useRef(void 0);if(!Ha(n)){const{renderer:t,...e}=n;o.current=t,$a(e)}return e.useEffect(()=>{Ha(n)&&n().then(({renderer:t,...e})=>{$a(e),o.current=t,s(!0)})},[]),d(Xa.Provider,{value:{renderer:o.current,strict:i},children:t})},t.MotionConfig=function({children:t,isValidProp:n,...i}){n&&Ji(n),(i={...e.useContext(fs),...i}).isStatic=is(()=>i.isStatic);const s=e.useMemo(()=>i,[JSON.stringify(i.transition),i.transformPagePoint,i.reducedMotion]);return d(fs.Provider,{value:s,children:t})},t.MotionConfigContext=fs,t.MotionContext=Ni,t.MotionGlobalConfig=nt,t.MotionValue=St,t.PresenceContext=ts,t.Reorder=ru,t.SwitchLayoutGroupContext=dl,t.VisualElement=Zs,t.addPointerEvent=cs,t.addPointerInfo=us,t.addScaleCorrector=fo,t.animate=No,t.animateMini=_o,t.animateValue=hi,t.animateVisualElement=Ei,t.animationControls=Pu,t.animations=Wi,t.anticipate=Ut,t.backIn=jt,t.backInOut=It,t.backOut=Ot,t.buildTransform=no,t.calcLength=Xi,t.cancelFrame=at,t.cancelSync=Dr,t.circIn=Wt,t.circInOut=zt,t.circOut=Nt,t.clamp=$t,t.color=ce,t.complex=ye,t.createBox=zi,t.createRendererMotionComponent=kl,t.createScopedAnimate=Wo,t.cubicBezier=Lt,t.delay=Er,t.disableInstantTransitions=function(){Dt.current=!1},t.distance=Mr,t.distance2D=Cr,t.domAnimation=lu,t.domMax=uu,t.domMin=cu,t.easeIn=Zn,t.easeInOut=Qn,t.easeOut=Jn,t.filterProps=Qi,t.findSpring=$n,t.frame=rt,t.frameData=lt,t.frameSteps=ut,t.hover=Y,t.inView=Ar,t.inertia=qn,t.interpolate=ii,t.invariant=P,t.isBrowser=hs,t.isDragActive=z,t.isMotionComponent=Eu,t.isMotionValue=Et,t.isValidMotionProp=qi,t.keyframes=ri,t.m=au,t.makeUseVisualState=os,t.mirrorEasing=Bt,t.mix=Vn,t.motion=Gl,t.motionValue=Tt,t.noop=x,t.optimizedAppearDataAttribute=Vt,t.pipe=Sn,t.press=et,t.progress=T,t.px=oe,t.resolveMotionValue=ss,t.reverseEasing=Ft,t.scroll=Tr,t.scrollInfo=xr,t.spring=_n,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=ni(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=ku;const r=Vu(o,e);Bu||(Bu=pi(t,e,[n[0],n[0]],{duration:1e4,ease:"linear"}),Ru.set(r,{animation:Bu,startTime:null}),window.MotionHandoffAnimation=ku,window.MotionHasOptimisedAnimation=(t,e)=>{if(!t)return!1;if(!e)return Du.has(t);const n=Vu(t,e);return Boolean(Ru.get(n))},window.MotionHandoffMarkAsComplete=t=>{Du.has(t)&&Du.set(t,!0)},window.MotionHandoffIsComplete=t=>!0===Du.get(t),window.MotionCancelOptimisedAnimation=(t,e,n,i)=>{const s=Vu(t,e),o=Ru.get(s);o&&(n&&void 0===i?n.postRender(()=>{n.postRender(()=>{o.animation.cancel()})}):o.animation.cancel(),n&&i?(Fu.add(o),n.render(Ou)):(Ru.delete(s),Ru.size||(window.MotionCancelOptimisedAnimation=void 0)))},window.MotionCheckAppearSync=(t,e,n)=>{var i,s;const o=Rt(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=()=>{Bu.cancel();const o=pi(t,e,n,i);void 0===Lu&&(Lu=performance.now()),o.startTime=Lu,Ru.set(r,{animation:o,startTime:Lu}),s&&s(o)};Du.set(o,!1),Bu.ready?Bu.ready.then(a).catch(x):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 $t(0,1,s/t)}},t.sync=Rr,t.time=gt,t.transform=Vr,t.unwrapMotionComponent=function(t){if(Eu(t))return t[Vl]},t.useAnimate=function(){const t=is(()=>({current:null,animations:[]})),e=is(()=>Wo(t));return ds(()=>{t.animations.forEach(t=>t.stop())}),[t,e]},t.useAnimateMini=function(){const t=is(()=>({current:null,animations:[]})),e=is(()=>Go(t));return ds(()=>{t.animations.forEach(t=>t.stop())}),[t,e]},t.useAnimation=Tu,t.useAnimationControls=Su,t.useAnimationFrame=yu,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?Ms(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=Uu({},!1),o=is(()=>new Iu({props:{onUpdate:t=>{i({...t})}},visualState:s,presenceContext:null},{initialState:t}));return e.useLayoutEffect(()=>(o.mount({}),()=>o.unmount()),[o]),[n,is(()=>t=>Ei(o,t))]},t.useDeprecatedInvertedScale=function(t){let n=Ql(1),i=Ql(1);const{visualElement:s}=e.useContext(Ni);return t?(n=t.scaleX||n,i=t.scaleY||i):s&&(n=s.getValue("scaleX",1),i=s.getValue("scaleY",1)),{scaleX:eu(n,Nu),scaleY:eu(i,Nu)}},t.useDomEvent=function(t,n,i,s){e.useEffect(()=>{const e=t.current;if(i&&e)return as(e,n,i,s)},[t,n,i,s])},t.useDragControls=function(){return is(Au)},t.useElementScroll=function(t){return mu({container:t})},t.useForceUpdate=ms,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 Ar(t.current,()=>(l(!0),o?void 0:()=>l(!1)),e)},[n,t,i,o,s]),a},t.useInstantLayoutTransition=Mu,t.useInstantTransition=function(){const[t,n]=ms(),i=Mu(),s=e.useRef(-1);return e.useEffect(()=>{rt.postRender(()=>rt.postRender(()=>{n===s.current&&(Dt.current=!1)}))},[n]),e=>{i(()=>{Dt.current=!0,t(),e(),s.current=n+1})}},t.useIsPresent=function(){return null===(t=e.useContext(ts))||t.isPresent;var t},t.useIsomorphicLayoutEffect=ps,t.useMotionTemplate=function(t,...e){const n=t.length;return tu(e.filter(Et),(function(){let i="";for(let s=0;s<n;s++){i+=t[s];const n=e[s];n&&(i+=Et(n)?n.get():n)}return i}))},t.useMotionValue=Ql,t.useMotionValueEvent=hu,t.usePresence=ws,t.usePresenceData=function(){const t=e.useContext(ts);return t?t.custom:void 0},t.useReducedMotion=xu,t.useReducedMotionConfig=function(){const t=xu(),{reducedMotion:n}=e.useContext(fs);return"never"!==n&&("always"===n||t)},t.useResetProjection=function(){return e.useCallback(()=>{const t=Oa.current;t&&t.resetTree()},[])},t.useScroll=mu,t.useSpring=function(t,n={}){const{isStatic:i}=e.useContext(fs),s=e.useRef(null),o=is(()=>Et(t)?t.get():t),r=is(()=>"string"==typeof o?o.replace(/[\d.-]/g,""):void 0),a=Ql(o),l=e.useRef(o),u=e.useRef(x),c=()=>{h(),s.current=hi({keyframes:[gu(a.get()),gu(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(fu(t,r)),rt.postRender(c),a.get()),h),[JSON.stringify(n)]),ps(()=>{if(Et(t))return t.on("change",t=>a.set(fu(t,r)))},[a,r]),a},t.useTime=function(){const t=Ql(0);return yu(e=>t.set(e)),t},t.useTransform=eu,t.useUnmountEffect=ds,t.useVelocity=function(t){const e=Ql(t.getVelocity()),n=()=>{const i=t.getVelocity();e.set(i),i&&rt.update(n)};return hu(t,"change",()=>{rt.update(n,!1,!0)}),e},t.useViewportScroll=function(){return mu()},t.useWillChange=function(){return is(()=>new vu("auto"))},t.visualElementStore=zs,t.wrap=Ms}));
|