@kroo-web/design-system 1.0.13 → 1.0.14
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/index.js +1 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +1 -1
- package/dist/esm/index.js.map +1 -1
- package/package.json +1 -1
package/dist/cjs/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var t=require("react"),e=require("./product/components/TextField/textField.module.css");function n(t){var e=Object.create(null);return t&&Object.keys(t).forEach((function(n){if("default"!==n){var s=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,s.get?s:{enumerable:!0,get:function(){return t[n]}})}})),e.default=t,Object.freeze(e)}var s=n(t),i=function(){return i=Object.assign||function(t){for(var e,n=1,s=arguments.length;n<s;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},i.apply(this,arguments)};"function"==typeof SuppressedError&&SuppressedError;const o=t.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"}),r=t.createContext({}),a=t.createContext(null),l="undefined"!=typeof document,u=l?t.useLayoutEffect:t.useEffect,c=t.createContext({strict:!1}),h=t=>t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),d="data-"+h("framerAppearId"),p=!1,m=!1;class f{constructor(){this.order=[],this.scheduled=new Set}add(t){if(!this.scheduled.has(t))return this.scheduled.add(t),this.order.push(t),!0}remove(t){const e=this.order.indexOf(t);-1!==e&&(this.order.splice(e,1),this.scheduled.delete(t))}clear(){this.order.length=0,this.scheduled.clear()}}const g=["prepare","read","update","preRender","render","postRender"];function v(t,e){let n=!1,s=!0;const i={delta:0,timestamp:0,isProcessing:!1},o=g.reduce(((t,e)=>(t[e]=function(t){let e=new f,n=new f,s=0,i=!1,o=!1;const r=new WeakSet,a={schedule:(t,o=!1,a=!1)=>{const l=a&&i,u=l?e:n;return o&&r.add(t),u.add(t)&&l&&i&&(s=e.order.length),t},cancel:t=>{n.remove(t),r.delete(t)},process:l=>{if(i)o=!0;else{if(i=!0,[e,n]=[n,e],n.clear(),s=e.order.length,s)for(let n=0;n<s;n++){const s=e.order[n];r.has(s)&&(a.schedule(s),t()),s(l)}i=!1,o&&(o=!1,a.process(l))}}};return a}((()=>n=!0)),t)),{}),r=t=>{o[t].process(i)},a=()=>{const o=performance.now();n=!1,i.delta=s?1e3/60:Math.max(Math.min(o-i.timestamp,40),1),i.timestamp=o,i.isProcessing=!0,g.forEach(r),i.isProcessing=!1,n&&e&&(s=!1,t(a))};return{schedule:g.reduce(((e,r)=>{const l=o[r];return e[r]=(e,o=!1,r=!1)=>(n||(n=!0,s=!0,i.isProcessing||t(a)),l.schedule(e,o,r)),e}),{}),cancel:t=>g.forEach((e=>o[e].cancel(t))),state:i,steps:o}}const{schedule:y,cancel:x}=v(queueMicrotask,!1);function P(t){return t&&"object"==typeof t&&Object.prototype.hasOwnProperty.call(t,"current")}function b(t){return"string"==typeof t||Array.isArray(t)}function w(t){return null!==t&&"object"==typeof t&&"function"==typeof t.start}const T=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],S=["initial",...T];function A(t){return w(t.animate)||S.some((e=>b(t[e])))}function E(t){return Boolean(A(t)||t.variants)}function V(e){const{initial:n,animate:s}=function(t,e){if(A(t)){const{initial:e,animate:n}=t;return{initial:!1===e||b(e)?e:void 0,animate:b(n)?n:void 0}}return!1!==t.inherit?e:{}}(e,t.useContext(r));return t.useMemo((()=>({initial:n,animate:s})),[C(n),C(s)])}function C(t){return Array.isArray(t)?t.join(" "):t}const M={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"]},D={};for(const t in M)D[t]={isEnabled:e=>M[t].some((t=>!!e[t]))};const R=t.createContext({}),L=t.createContext({}),k=Symbol.for("motionComponentSymbol");function j({preloadedFeatures:e,createVisualElement:n,useRender:i,useVisualState:h,Component:p}){e&&function(t){for(const e in t)D[e]={...D[e],...t[e]}}(e);const m=t.forwardRef((function(m,f){let g;const v={...t.useContext(o),...m,layoutId:F(m)},{isStatic:x}=v,b=V(m),w=h(m,x);if(!x&&l){b.visualElement=function(e,n,s,i){const{visualElement:l}=t.useContext(r),h=t.useContext(c),p=t.useContext(a),m=t.useContext(o).reducedMotion,f=t.useRef();i=i||h.renderer,!f.current&&i&&(f.current=i(e,{visualState:n,parent:l,props:s,presenceContext:p,blockInitialAnimation:!!p&&!1===p.initial,reducedMotionConfig:m}));const g=f.current;t.useInsertionEffect((()=>{g&&g.update(s,p)}));const v=t.useRef(Boolean(s[d]&&!window.HandoffComplete));return u((()=>{g&&(y.postRender(g.render),v.current&&g.animationState&&g.animationState.animateChanges())})),t.useEffect((()=>{g&&(g.updateFeatures(),!v.current&&g.animationState&&g.animationState.animateChanges(),v.current&&(v.current=!1,window.HandoffComplete=!0))})),g}(p,w,v,n);const s=t.useContext(L),i=t.useContext(c).strict;b.visualElement&&(g=b.visualElement.loadFeatures(v,i,e,s))}return s.createElement(r.Provider,{value:b},g&&b.visualElement?s.createElement(g,{visualElement:b.visualElement,...v}):null,i(p,m,function(e,n,s){return t.useCallback((t=>{t&&e.mount&&e.mount(t),n&&(t?n.mount(t):n.unmount()),s&&("function"==typeof s?s(t):P(s)&&(s.current=t))}),[n])}(w,b.visualElement,f),w,x,b.visualElement))}));return m[k]=p,m}function F({layoutId:e}){const n=t.useContext(R).id;return n&&void 0!==e?n+"-"+e:e}function B(t){function e(e,n={}){return j(t(e,n))}if("undefined"==typeof Proxy)return e;const n=new Map;return new Proxy(e,{get:(t,s)=>(n.has(s)||n.set(s,e(s)),n.get(s))})}const O=["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 I(t){return"string"==typeof t&&!t.includes("-")&&!!(O.indexOf(t)>-1||/[A-Z]/.test(t))}const U={};const N=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],W=new Set(N);function $(t,{layout:e,layoutId:n}){return W.has(t)||t.startsWith("origin")||(e||void 0!==n)&&(!!U[t]||"opacity"===t)}const H=t=>Boolean(t&&t.getVelocity),z={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Y=N.length;const X=t=>e=>"string"==typeof e&&e.startsWith(t),G=X("--"),q=X("var(--"),Z=t=>!!q(t)&&_.test(t.split("/*")[0].trim()),_=/var\s*\(\s*--[\w-]+(\s*,\s*(?:(?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)+)?\s*\)$/i,K=(t,e)=>e&&"number"==typeof t?e.transform(t):t,J=(t,e,n)=>n>e?e:n<t?t:n,Q={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},tt={...Q,transform:t=>J(0,1,t)},et={...Q,default:1},nt=t=>Math.round(1e5*t)/1e5,st=/(-)?([\d]*\.?[\d])+/g,it=/(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,ot=/^(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function rt(t){return"string"==typeof t}const at=t=>({test:e=>rt(e)&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),lt=at("deg"),ut=at("%"),ct=at("px"),ht=at("vh"),dt=at("vw"),pt={...ut,parse:t=>ut.parse(t)/100,transform:t=>ut.transform(100*t)},mt={...Q,transform:Math.round},ft={borderWidth:ct,borderTopWidth:ct,borderRightWidth:ct,borderBottomWidth:ct,borderLeftWidth:ct,borderRadius:ct,radius:ct,borderTopLeftRadius:ct,borderTopRightRadius:ct,borderBottomRightRadius:ct,borderBottomLeftRadius:ct,width:ct,maxWidth:ct,height:ct,maxHeight:ct,size:ct,top:ct,right:ct,bottom:ct,left:ct,padding:ct,paddingTop:ct,paddingRight:ct,paddingBottom:ct,paddingLeft:ct,margin:ct,marginTop:ct,marginRight:ct,marginBottom:ct,marginLeft:ct,rotate:lt,rotateX:lt,rotateY:lt,rotateZ:lt,scale:et,scaleX:et,scaleY:et,scaleZ:et,skew:lt,skewX:lt,skewY:lt,distance:ct,translateX:ct,translateY:ct,translateZ:ct,x:ct,y:ct,z:ct,perspective:ct,transformPerspective:ct,opacity:tt,originX:pt,originY:pt,originZ:ct,zIndex:mt,fillOpacity:tt,strokeOpacity:tt,numOctaves:mt};function gt(t,e,n,s){const{style:i,vars:o,transform:r,transformOrigin:a}=t;let l=!1,u=!1,c=!0;for(const t in e){const n=e[t];if(G(t)){o[t]=n;continue}const s=ft[t],h=K(n,s);if(W.has(t)){if(l=!0,r[t]=h,!c)continue;n!==(s.default||0)&&(c=!1)}else t.startsWith("origin")?(u=!0,a[t]=h):i[t]=h}if(e.transform||(l||s?i.transform=function(t,{enableHardwareAcceleration:e=!0,allowTransformNone:n=!0},s,i){let o="";for(let e=0;e<Y;e++){const n=N[e];void 0!==t[n]&&(o+=`${z[n]||n}(${t[n]}) `)}return e&&!t.z&&(o+="translateZ(0)"),o=o.trim(),i?o=i(t,s?"":o):n&&s&&(o="none"),o}(t.transform,n,c,s):i.transform&&(i.transform="none")),u){const{originX:t="50%",originY:e="50%",originZ:n=0}=a;i.transformOrigin=`${t} ${e} ${n}`}}const vt=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function yt(t,e,n){for(const s in e)H(e[s])||$(s,n)||(t[s]=e[s])}function xt(e,n,s){const i={};return yt(i,e.style||{},e),Object.assign(i,function({transformTemplate:e},n,s){return t.useMemo((()=>{const t=vt();return gt(t,n,{enableHardwareAcceleration:!s},e),Object.assign({},t.vars,t.style)}),[n])}(e,n,s)),i}function Pt(t,e,n){const s={},i=xt(t,e,n);return t.drag&&!1!==t.dragListener&&(s.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)&&(s.tabIndex=0),s.style=i,s}const bt=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 wt(t){return t.startsWith("while")||t.startsWith("drag")&&"draggable"!==t||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||bt.has(t)}let Tt=t=>!wt(t);try{(St=require("@emotion/is-prop-valid").default)&&(Tt=t=>t.startsWith("on")?!wt(t):St(t))}catch(t){}var St;function At(t,e,n){return"string"==typeof t?t:ct.transform(e+n*t)}const Et={offset:"stroke-dashoffset",array:"stroke-dasharray"},Vt={offset:"strokeDashoffset",array:"strokeDasharray"};function Ct(t,{attrX:e,attrY:n,attrScale:s,originX:i,originY:o,pathLength:r,pathSpacing:a=1,pathOffset:l=0,...u},c,h,d){if(gt(t,u,c,d),h)return void(t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox));t.attrs=t.style,t.style={};const{attrs:p,style:m,dimensions:f}=t;p.transform&&(f&&(m.transform=p.transform),delete p.transform),f&&(void 0!==i||void 0!==o||m.transform)&&(m.transformOrigin=function(t,e,n){return`${At(e,t.x,t.width)} ${At(n,t.y,t.height)}`}(f,void 0!==i?i:.5,void 0!==o?o:.5)),void 0!==e&&(p.x=e),void 0!==n&&(p.y=n),void 0!==s&&(p.scale=s),void 0!==r&&function(t,e,n=1,s=0,i=!0){t.pathLength=1;const o=i?Et:Vt;t[o.offset]=ct.transform(-s);const r=ct.transform(e),a=ct.transform(n);t[o.array]=`${r} ${a}`}(p,r,a,l,!1)}const Mt=()=>({...vt(),attrs:{}}),Dt=t=>"string"==typeof t&&"svg"===t.toLowerCase();function Rt(e,n,s,i){const o=t.useMemo((()=>{const t=Mt();return Ct(t,n,{enableHardwareAcceleration:!1},Dt(i),e.transformTemplate),{...t.attrs,style:{...t.style}}}),[n]);if(e.style){const t={};yt(t,e.style,e),o.style={...t,...o.style}}return o}function Lt(e=!1){return(n,s,i,{latestValues:o},r)=>{const a=(I(n)?Rt:Pt)(s,o,r,n),l=function(t,e,n){const s={};for(const i in t)"values"===i&&"object"==typeof t.values||(Tt(i)||!0===n&&wt(i)||!e&&!wt(i)||t.draggable&&i.startsWith("onDrag"))&&(s[i]=t[i]);return s}(s,"string"==typeof n,e),u=n!==t.Fragment?{...l,...a,ref:i}:{},{children:c}=s,h=t.useMemo((()=>H(c)?c.get():c),[c]);return t.createElement(n,{...u,children:h})}}function kt(t,{style:e,vars:n},s,i){Object.assign(t.style,e,i&&i.getProjectionStyles(s));for(const e in n)t.style.setProperty(e,n[e])}const jt=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function Ft(t,e,n,s){kt(t,e,void 0,s);for(const n in e.attrs)t.setAttribute(jt.has(n)?n:h(n),e.attrs[n])}function Bt(t,e){const{style:n}=t,s={};for(const i in n)(H(n[i])||e.style&&H(e.style[i])||$(i,t))&&(s[i]=n[i]);return s}function Ot(t,e){const n=Bt(t,e);for(const s in t)if(H(t[s])||H(e[s])){n[-1!==N.indexOf(s)?"attr"+s.charAt(0).toUpperCase()+s.substring(1):s]=t[s]}return n}function It(t,e,n,s={},i={}){return"function"==typeof e&&(e=e(void 0!==n?n:t.custom,s,i)),"string"==typeof e&&(e=t.variants&&t.variants[e]),"function"==typeof e&&(e=e(void 0!==n?n:t.custom,s,i)),e}const Ut=t=>Array.isArray(t),Nt=t=>Boolean(t&&"object"==typeof t&&t.mix&&t.toValue),Wt=t=>Ut(t)?t[t.length-1]||0:t;function $t(t){const e=H(t)?t.get():t;return Nt(e)?e.toValue():e}const Ht=e=>(n,s)=>{const i=t.useContext(r),o=t.useContext(a),l=()=>function({scrapeMotionValuesFromProps:t,createRenderState:e,onMount:n},s,i,o){const r={latestValues:zt(s,i,o,t),renderState:e()};return n&&(r.mount=t=>n(s,t,r)),r}(e,n,i,o);return s?l():function(e){const n=t.useRef(null);return null===n.current&&(n.current=e()),n.current}(l)};function zt(t,e,n,s){const i={},o=s(t,{});for(const t in o)i[t]=$t(o[t]);let{initial:r,animate:a}=t;const l=A(t),u=E(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&&!w(h)){(Array.isArray(h)?h:[h]).forEach((e=>{const n=It(t,e);if(!n)return;const{transitionEnd:s,transition:o,...r}=n;for(const t in r){let e=r[t];if(Array.isArray(e)){e=e[c?e.length-1:0]}null!==e&&(i[t]=e)}for(const t in s)i[t]=s[t]}))}return i}const Yt=t=>t,{schedule:Xt,cancel:Gt,state:qt,steps:Zt}=v("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:Yt,!0),_t={useVisualState:Ht({scrapeMotionValuesFromProps:Ot,createRenderState:Mt,onMount:(t,e,{renderState:n,latestValues:s})=>{Xt.read((()=>{try{n.dimensions="function"==typeof e.getBBox?e.getBBox():e.getBoundingClientRect()}catch(t){n.dimensions={x:0,y:0,width:0,height:0}}})),Xt.render((()=>{Ct(n,s,{enableHardwareAcceleration:!1},Dt(e.tagName),t.transformTemplate),Ft(e,n)}))}})},Kt={useVisualState:Ht({scrapeMotionValuesFromProps:Bt,createRenderState:vt})};function Jt(t,e,n,s={passive:!0}){return t.addEventListener(e,n,s),()=>t.removeEventListener(e,n)}const Qt=t=>"mouse"===t.pointerType?"number"!=typeof t.button||t.button<=0:!1!==t.isPrimary;function te(t,e="page"){return{point:{x:t[e+"X"],y:t[e+"Y"]}}}const ee=t=>e=>Qt(e)&&t(e,te(e));function ne(t,e,n,s){return Jt(t,e,ee(n),s)}const se=(t,e)=>n=>e(t(n)),ie=(...t)=>t.reduce(se);function oe(t){let e=null;return()=>{const n=()=>{e=null};return null===e&&(e=t,n)}}const re=oe("dragHorizontal"),ae=oe("dragVertical");function le(t){let e=!1;if("y"===t)e=ae();else if("x"===t)e=re();else{const t=re(),n=ae();t&&n?e=()=>{t(),n()}:(t&&t(),n&&n())}return e}function ue(){const t=le(!0);return!t||(t(),!1)}class ce{constructor(t){this.isMounted=!1,this.node=t}update(){}}function he(t,e){const n="pointer"+(e?"enter":"leave"),s="onHover"+(e?"Start":"End");return ne(t.current,n,((n,i)=>{if("touch"===n.pointerType||ue())return;const o=t.getProps();t.animationState&&o.whileHover&&t.animationState.setActive("whileHover",e),o[s]&&Xt.update((()=>o[s](n,i)))}),{passive:!t.getProps()[s]})}const de=(t,e)=>!!e&&(t===e||de(t,e.parentElement));function pe(t,e){if(!e)return;const n=new PointerEvent("pointer"+t);e(n,te(n))}const me=new WeakMap,fe=new WeakMap,ge=t=>{const e=me.get(t.target);e&&e(t)},ve=t=>{t.forEach(ge)};function ye(t,e,n){const s=function({root:t,...e}){const n=t||document;fe.has(n)||fe.set(n,{});const s=fe.get(n),i=JSON.stringify(e);return s[i]||(s[i]=new IntersectionObserver(ve,{root:t,...e})),s[i]}(e);return me.set(t,n),s.observe(t),()=>{me.delete(t),s.unobserve(t)}}const xe={some:0,all:1};const Pe={inView:{Feature:class extends ce{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:e,margin:n,amount:s="some",once:i}=t,o={root:e?e.current:void 0,rootMargin:n,threshold:"number"==typeof s?s:xe[s]};return ye(this.node.current,o,(t=>{const{isIntersecting:e}=t;if(this.isInView===e)return;if(this.isInView=e,i&&!e&&this.hasEnteredView)return;e&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",e);const{onViewportEnter:n,onViewportLeave:s}=this.node.getProps(),o=e?n:s;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 ce{constructor(){super(...arguments),this.removeStartListeners=Yt,this.removeEndListeners=Yt,this.removeAccessibleListeners=Yt,this.startPointerPress=(t,e)=>{if(this.isPressing)return;this.removeEndListeners();const n=this.node.getProps(),s=ne(window,"pointerup",((t,e)=>{if(!this.checkPressEnd())return;const{onTap:n,onTapCancel:s,globalTapTarget:i}=this.node.getProps();Xt.update((()=>{i||de(this.node.current,t.target)?n&&n(t,e):s&&s(t,e)}))}),{passive:!(n.onTap||n.onPointerUp)}),i=ne(window,"pointercancel",((t,e)=>this.cancelPress(t,e)),{passive:!(n.onTapCancel||n.onPointerCancel)});this.removeEndListeners=ie(s,i),this.startPress(t,e)},this.startAccessiblePress=()=>{const t=Jt(this.node.current,"keydown",(t=>{if("Enter"!==t.key||this.isPressing)return;this.removeEndListeners(),this.removeEndListeners=Jt(this.node.current,"keyup",(t=>{"Enter"===t.key&&this.checkPressEnd()&&pe("up",((t,e)=>{const{onTap:n}=this.node.getProps();n&&Xt.update((()=>n(t,e)))}))})),pe("down",((t,e)=>{this.startPress(t,e)}))})),e=Jt(this.node.current,"blur",(()=>{this.isPressing&&pe("cancel",((t,e)=>this.cancelPress(t,e)))}));this.removeAccessibleListeners=ie(t,e)}}startPress(t,e){this.isPressing=!0;const{onTapStart:n,whileTap:s}=this.node.getProps();s&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),n&&Xt.update((()=>n(t,e)))}checkPressEnd(){this.removeEndListeners(),this.isPressing=!1;return this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!ue()}cancelPress(t,e){if(!this.checkPressEnd())return;const{onTapCancel:n}=this.node.getProps();n&&Xt.update((()=>n(t,e)))}mount(){const t=this.node.getProps(),e=ne(t.globalTapTarget?window:this.node.current,"pointerdown",this.startPointerPress,{passive:!(t.onTapStart||t.onPointerStart)}),n=Jt(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=ie(e,n)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}},focus:{Feature:class extends ce{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=ie(Jt(this.node.current,"focus",(()=>this.onFocus())),Jt(this.node.current,"blur",(()=>this.onBlur())))}unmount(){}}},hover:{Feature:class extends ce{mount(){this.unmount=ie(he(this.node,!0),he(this.node,!1))}unmount(){}}}};function be(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let s=0;s<n;s++)if(e[s]!==t[s])return!1;return!0}function we(t,e,n){const s=t.getProps();return It(s,e,void 0!==n?n:s.custom,function(t){const e={};return t.values.forEach(((t,n)=>e[n]=t.get())),e}(t),function(t){const e={};return t.values.forEach(((t,n)=>e[n]=t.getVelocity())),e}(t))}let Te=Yt,Se=Yt;"production"!==process.env.NODE_ENV&&(Te=(t,e)=>{t||"undefined"==typeof console||console.warn(e)},Se=(t,e)=>{if(!t)throw new Error(e)});const Ae=t=>1e3*t,Ee=t=>t/1e3,Ve=!1,Ce=t=>Array.isArray(t)&&"number"==typeof t[0];function Me(t){return Boolean(!t||"string"==typeof t&&Re[t]||Ce(t)||Array.isArray(t)&&t.every(Me))}const De=([t,e,n,s])=>`cubic-bezier(${t}, ${e}, ${n}, ${s})`,Re={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:De([0,.65,.55,1]),circOut:De([.55,0,1,.45]),backIn:De([.31,.01,.66,-.59]),backOut:De([.33,1.53,.69,.99])};function Le(t){if(t)return Ce(t)?De(t):Array.isArray(t)?t.map(Le):Re[t]}const ke=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,je=1e-7,Fe=12;function Be(t,e,n,s){if(t===e&&n===s)return Yt;const i=e=>function(t,e,n,s,i){let o,r,a=0;do{r=e+(n-e)/2,o=ke(r,s,i)-t,o>0?n=r:e=r}while(Math.abs(o)>je&&++a<Fe);return r}(e,0,1,t,n);return t=>0===t||1===t?t:ke(i(t),e,s)}const Oe=Be(.42,0,1,1),Ie=Be(0,0,.58,1),Ue=Be(.42,0,.58,1),Ne=t=>Array.isArray(t)&&"number"!=typeof t[0],We=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,$e=t=>e=>1-t(1-e),He=t=>1-Math.sin(Math.acos(t)),ze=$e(He),Ye=We(He),Xe=Be(.33,1.53,.69,.99),Ge=$e(Xe),qe=We(Ge),Ze={linear:Yt,easeIn:Oe,easeInOut:Ue,easeOut:Ie,circIn:He,circInOut:Ye,circOut:ze,backIn:Ge,backInOut:qe,backOut:Xe,anticipate:t=>(t*=2)<1?.5*Ge(t):.5*(2-Math.pow(2,-10*(t-1)))},_e=t=>{if(Array.isArray(t)){Se(4===t.length,"Cubic bezier arrays must contain four numerical values.");const[e,n,s,i]=t;return Be(e,n,s,i)}return"string"==typeof t?(Se(void 0!==Ze[t],`Invalid easing type '${t}'`),Ze[t]):t},Ke=(t,e,n)=>{const s=e-t;return 0===s?1:(n-t)/s},Je=(t,e,n)=>t+(e-t)*n;function Qe(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}const tn=(t,e)=>n=>Boolean(rt(n)&&ot.test(n)&&n.startsWith(t)||e&&Object.prototype.hasOwnProperty.call(n,e)),en=(t,e,n)=>s=>{if(!rt(s))return s;const[i,o,r,a]=s.match(st);return{[t]:parseFloat(i),[e]:parseFloat(o),[n]:parseFloat(r),alpha:void 0!==a?parseFloat(a):1}},nn={...Q,transform:t=>Math.round((t=>J(0,255,t))(t))},sn={test:tn("rgb","red"),parse:en("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:s=1})=>"rgba("+nn.transform(t)+", "+nn.transform(e)+", "+nn.transform(n)+", "+nt(tt.transform(s))+")"};const on={test:tn("#"),parse:function(t){let e="",n="",s="",i="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),s=t.substring(5,7),i=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),s=t.substring(3,4),i=t.substring(4,5),e+=e,n+=n,s+=s,i+=i),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(s,16),alpha:i?parseInt(i,16)/255:1}},transform:sn.transform},rn={test:tn("hsl","hue"),parse:en("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:s=1})=>"hsla("+Math.round(t)+", "+ut.transform(nt(e))+", "+ut.transform(nt(n))+", "+nt(tt.transform(s))+")"},an=(t,e,n)=>{const s=t*t,i=n*(e*e-s)+s;return i<0?0:Math.sqrt(i)},ln=[on,sn,rn];function un(t){const e=(n=t,ln.find((t=>t.test(n))));var n;Se(Boolean(e),`'${t}' is not an animatable color. Use the equivalent color code instead.`);let s=e.parse(t);return e===rn&&(s=function({hue:t,saturation:e,lightness:n,alpha:s}){t/=360,n/=100;let i=0,o=0,r=0;if(e/=100){const s=n<.5?n*(1+e):n+e-n*e,a=2*n-s;i=Qe(a,s,t+1/3),o=Qe(a,s,t),r=Qe(a,s,t-1/3)}else i=o=r=n;return{red:Math.round(255*i),green:Math.round(255*o),blue:Math.round(255*r),alpha:s}}(s)),s}const cn=(t,e)=>{const n=un(t),s=un(e),i={...n};return t=>(i.red=an(n.red,s.red,t),i.green=an(n.green,s.green,t),i.blue=an(n.blue,s.blue,t),i.alpha=Je(n.alpha,s.alpha,t),sn.transform(i))},hn={test:t=>sn.test(t)||on.test(t)||rn.test(t),parse:t=>sn.test(t)?sn.parse(t):rn.test(t)?rn.parse(t):on.parse(t),transform:t=>rt(t)?t:t.hasOwnProperty("red")?sn.transform(t):rn.transform(t)};const dn="number",pn="color",mn="var",fn="var(",gn="${}",vn=/(var\s*\(\s*--[\w-]+(\s*,\s*(?:(?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)+)?\s*\))|(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))|((-)?([\d]*\.?[\d])+)/gi;function yn(t){const e=t.toString(),n=e.match(vn)||[],s=[],i={color:[],number:[],var:[]},o=[];for(let t=0;t<n.length;t++){const e=n[t];hn.test(e)?(i.color.push(t),o.push(pn),s.push(hn.parse(e))):e.startsWith(fn)?(i.var.push(t),o.push(mn),s.push(e)):(i.number.push(t),o.push(dn),s.push(parseFloat(e)))}return{values:s,split:e.replace(vn,gn).split(gn),indexes:i,types:o}}function xn(t){return yn(t).values}function Pn(t){const{split:e,types:n}=yn(t),s=e.length;return t=>{let i="";for(let o=0;o<s;o++)if(i+=e[o],void 0!==t[o]){const e=n[o];i+=e===dn?nt(t[o]):e===pn?hn.transform(t[o]):t[o]}return i}}const bn=t=>"number"==typeof t?0:t;const wn={test:function(t){var e,n;return isNaN(t)&&rt(t)&&((null===(e=t.match(st))||void 0===e?void 0:e.length)||0)+((null===(n=t.match(it))||void 0===n?void 0:n.length)||0)>0},parse:xn,createTransformer:Pn,getAnimatableNone:function(t){const e=xn(t);return Pn(t)(e.map(bn))}};function Tn(t,e){return n=>n>0?e:t}function Sn(t,e){return n=>Je(t,e,n)}function An(t){return"number"==typeof t?Sn:"string"==typeof t?Z(t)?Tn:hn.test(t)?cn:Cn:Array.isArray(t)?En:"object"==typeof t?hn.test(t)?cn:Vn:Tn}function En(t,e){const n=[...t],s=n.length,i=t.map(((t,n)=>An(t)(t,e[n])));return t=>{for(let e=0;e<s;e++)n[e]=i[e](t);return n}}function Vn(t,e){const n={...t,...e},s={};for(const i in n)void 0!==t[i]&&void 0!==e[i]&&(s[i]=An(t[i])(t[i],e[i]));return t=>{for(const e in s)n[e]=s[e](t);return n}}const Cn=(t,e)=>{const n=wn.createTransformer(e),s=yn(t),i=yn(e);return s.indexes.var.length===i.indexes.var.length&&s.indexes.color.length===i.indexes.color.length&&s.indexes.number.length>=i.indexes.number.length?ie(En(function(t,e){var n;const s=[],i={color:0,var:0,number:0};for(let o=0;o<e.values.length;o++){const r=e.types[o],a=t.indexes[r][i[r]],l=null!==(n=t.values[a])&&void 0!==n?n:0;s[o]=l,i[r]++}return s}(s,i),i.values),n):(Te(!0,`Complex values '${t}' and '${e}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),Tn(t,e))};function Mn(t,e,n){if("number"==typeof t&&"number"==typeof e&&"number"==typeof n)return Je(t,e,n);return An(t)(t,e)}function Dn(t,e,{clamp:n=!0,ease:s,mixer:i}={}){const o=t.length;if(Se(o===e.length,"Both input and output ranges must be the same length"),1===o)return()=>e[0];t[0]>t[o-1]&&(t=[...t].reverse(),e=[...e].reverse());const r=function(t,e,n){const s=[],i=n||Mn,o=t.length-1;for(let n=0;n<o;n++){let o=i(t[n],t[n+1]);if(e){const t=Array.isArray(e)?e[n]||Yt:e;o=ie(t,o)}s.push(o)}return s}(e,s,i),a=r.length,l=e=>{let n=0;if(a>1)for(;n<t.length-2&&!(e<t[n+1]);n++);const s=Ke(t[n],t[n+1],e);return r[n](s)};return n?e=>l(J(t[0],t[o-1],e)):l}function Rn(t){const e=[0];return function(t,e){const n=t[t.length-1];for(let s=1;s<=e;s++){const i=Ke(0,e,s);t.push(Je(n,1,i))}}(e,t.length-1),e}function Ln({duration:t=300,keyframes:e,times:n,ease:s="easeInOut"}){const i=Ne(s)?s.map(_e):_e(s),o={done:!1,value:e[0]},r=function(t,e){return t.map((t=>t*e))}(n&&n.length===e.length?n:Rn(e),t),a=Dn(r,e,{ease:Array.isArray(i)?i:(l=e,u=i,l.map((()=>u||Ue)).splice(0,l.length-1))});var l,u;return{calculatedDuration:t,next:e=>(o.value=a(e),o.done=e>=t,o)}}function kn(t,e){return e?t*(1e3/e):0}const jn=5;function Fn(t,e,n){const s=Math.max(e-jn,0);return kn(n-t(s),e-s)}const Bn=.001,On=.01,In=10,Un=.05,Nn=1;function Wn({duration:t=800,bounce:e=.25,velocity:n=0,mass:s=1}){let i,o;Te(t<=Ae(In),"Spring duration must be 10 seconds or less");let r=1-e;r=J(Un,Nn,r),t=J(On,In,Ee(t)),r<1?(i=e=>{const s=e*r,i=s*t,o=s-n,a=Hn(e,r),l=Math.exp(-i);return Bn-o/a*l},o=e=>{const s=e*r*t,o=s*n+n,a=Math.pow(r,2)*Math.pow(e,2)*t,l=Math.exp(-s),u=Hn(Math.pow(e,2),r);return(-i(e)+Bn>0?-1:1)*((o-a)*l)/u}):(i=e=>Math.exp(-e*t)*((e-n)*t+1)-Bn,o=e=>Math.exp(-e*t)*(t*t*(n-e)));const a=function(t,e,n){let s=n;for(let n=1;n<$n;n++)s-=t(s)/e(s);return s}(i,o,5/t);if(t=Ae(t),isNaN(a))return{stiffness:100,damping:10,duration:t};{const e=Math.pow(a,2)*s;return{stiffness:e,damping:2*r*Math.sqrt(s*e),duration:t}}}const $n=12;function Hn(t,e){return t*Math.sqrt(1-e*e)}const zn=["duration","bounce"],Yn=["stiffness","damping","mass"];function Xn(t,e){return e.some((e=>void 0!==t[e]))}function Gn({keyframes:t,restDelta:e,restSpeed:n,...s}){const i=t[0],o=t[t.length-1],r={done:!1,value:i},{stiffness:a,damping:l,mass:u,duration:c,velocity:h,isResolvedFromDuration:d}=function(t){let e={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...t};if(!Xn(t,Yn)&&Xn(t,zn)){const n=Wn(t);e={...e,...n,mass:1},e.isResolvedFromDuration=!0}return e}({...s,velocity:-Ee(s.velocity||0)}),p=h||0,m=l/(2*Math.sqrt(a*u)),f=o-i,g=Ee(Math.sqrt(a/u)),v=Math.abs(f)<5;let y;if(n||(n=v?.01:2),e||(e=v?.005:.5),m<1){const t=Hn(g,m);y=e=>{const n=Math.exp(-m*g*e);return o-n*((p+m*g*f)/t*Math.sin(t*e)+f*Math.cos(t*e))}}else if(1===m)y=t=>o-Math.exp(-g*t)*(f+(p+g*f)*t);else{const t=g*Math.sqrt(m*m-1);y=e=>{const n=Math.exp(-m*g*e),s=Math.min(t*e,300);return o-n*((p+m*g*f)*Math.sinh(s)+t*f*Math.cosh(s))/t}}return{calculatedDuration:d&&c||null,next:t=>{const s=y(t);if(d)r.done=t>=c;else{let i=p;0!==t&&(i=m<1?Fn(y,t,s):0);const a=Math.abs(i)<=n,l=Math.abs(o-s)<=e;r.done=a&&l}return r.value=r.done?o:s,r}}}function qn({keyframes:t,velocity:e=0,power:n=.8,timeConstant:s=325,bounceDamping:i=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 v=t=>-m*Math.exp(-t/s),y=t=>g+v(t),x=t=>{const e=v(t),n=y(t);d.done=Math.abs(e)<=u,d.value=d.done?g:n};let P,b;const w=t=>{var e;(e=d.value,void 0!==a&&e<a||void 0!==l&&e>l)&&(P=t,b=Gn({keyframes:[d.value,p(d.value)],velocity:Fn(y,t,d.value),damping:i,stiffness:o,restDelta:u,restSpeed:c}))};return w(0),{calculatedDuration:null,next:t=>{let e=!1;return b||void 0!==P||(e=!0,x(t),w(t)),void 0!==P&&t>P?b.next(t-P):(!e&&x(t),d)}}}let Zn;function _n(){Zn=void 0}const Kn={now:()=>(void 0===Zn&&Kn.set(qt.isProcessing||m?qt.timestamp:performance.now()),Zn),set:t=>{Zn=t,queueMicrotask(_n)}},Jn=t=>{const e=({timestamp:e})=>t(e);return{start:()=>Xt.update(e,!0),stop:()=>Gt(e),now:()=>qt.isProcessing?qt.timestamp:Kn.now()}},Qn=2e4;function ts(t){let e=0;let n=t.next(e);for(;!n.done&&e<Qn;)e+=50,n=t.next(e);return e>=Qn?1/0:e}const es={decay:qn,inertia:qn,tween:Ln,keyframes:Ln,spring:Gn},ns=t=>t/100;function ss({autoplay:t=!0,delay:e=0,driver:n=Jn,keyframes:s,type:i="keyframes",repeat:o=0,repeatDelay:r=0,repeatType:a="loop",onPlay:l,onStop:u,onComplete:c,onUpdate:h,...d}){let p,m,f=1,g=!1;const v=()=>{m=new Promise((t=>{p=t}))};let y;v();const x=es[i]||Ln;let P;x!==Ln&&"number"!=typeof s[0]&&("production"!==process.env.NODE_ENV&&Se(2===s.length,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${s}`),P=ie(ns,Mn(s[0],s[1])),s=[0,100]);const b=x({...d,keyframes:s});let w;"mirror"===a&&(w=x({...d,keyframes:[...s].reverse(),velocity:-(d.velocity||0)}));let T="idle",S=null,A=null,E=null;null===b.calculatedDuration&&o&&(b.calculatedDuration=ts(b));const{calculatedDuration:V}=b;let C=1/0,M=1/0;null!==V&&(C=V+r,M=C*(o+1)-r);let D=0;const R=t=>{if(null===A)return;f>0&&(A=Math.min(A,t)),f<0&&(A=Math.min(t-M/f,A)),D=null!==S?S:Math.round(t-A)*f;const n=D-e*(f>=0?1:-1),i=f>=0?n<0:n>M;D=Math.max(n,0),"finished"===T&&null===S&&(D=M);let l=D,u=b;if(o){const t=Math.min(D,M)/C;let e=Math.floor(t),n=t%1;!n&&t>=1&&(n=1),1===n&&e--,e=Math.min(e,o+1);Boolean(e%2)&&("reverse"===a?(n=1-n,r&&(n-=r/C)):"mirror"===a&&(u=w)),l=J(0,1,n)*C}const c=i?{done:!1,value:s[0]}:u.next(l);P&&(c.value=P(c.value));let{done:d}=c;i||null===V||(d=f>=0?D>=M:D<=0);const p=null===S&&("finished"===T||"running"===T&&d);return h&&h(c.value),p&&j(),c},L=()=>{y&&y.stop(),y=void 0},k=()=>{T="idle",L(),p(),v(),A=E=null},j=()=>{T="finished",c&&c(),L(),p()},F=()=>{if(g)return;y||(y=n(R));const t=y.now();l&&l(),null!==S?A=t-S:A&&"finished"!==T||(A=t),"finished"===T&&v(),E=A,S=null,T="running",y.start()};t&&F();const B={then:(t,e)=>m.then(t,e),get time(){return Ee(D)},set time(t){t=Ae(t),D=t,null===S&&y&&0!==f?A=y.now()-t/f:S=t},get duration(){const t=null===b.calculatedDuration?ts(b):b.calculatedDuration;return Ee(t)},get speed(){return f},set speed(t){t!==f&&y&&(f=t,B.time=Ee(D))},get state(){return T},play:F,pause:()=>{T="paused",S=D},stop:()=>{g=!0,"idle"!==T&&(T="idle",u&&u(),k())},cancel:()=>{null!==E&&R(E),k()},complete:()=>{T="finished"},sample:t=>(A=0,R(t))};return B}const is=function(t){let e;return()=>(void 0===e&&(e=t()),e)}((()=>Object.hasOwnProperty.call(Element.prototype,"animate"))),os=new Set(["opacity","clipPath","filter","transform"]);function rs(t,e,{onUpdate:n,onComplete:s,...i}){if(!(is()&&os.has(e)&&!i.repeatDelay&&"mirror"!==i.repeatType&&0!==i.damping&&"inertia"!==i.type))return!1;let o,r,a=!1,l=!1;const u=()=>{r=new Promise((t=>{o=t}))};u();let{keyframes:c,duration:h=300,ease:d,times:p}=i;if(((t,e)=>"spring"===e.type||"backgroundColor"===t||!Me(e.ease))(e,i)){const t=ss({...i,repeat:0,delay:0});let e={done:!1,value:c[0]};const n=[];let s=0;for(;!e.done&&s<2e4;)e=t.sample(s),n.push(e.value),s+=10;p=void 0,c=n,h=s-10,d="linear"}const m=function(t,e,n,{delay:s=0,duration:i,repeat:o=0,repeatType:r="loop",ease:a,times:l}={}){const u={[e]:n};l&&(u.offset=l);const c=Le(a);return Array.isArray(c)&&(u.easing=c),t.animate(u,{delay:s,duration:i,easing:Array.isArray(c)?"linear":c,fill:"both",iterations:o+1,direction:"reverse"===r?"alternate":"normal"})}(t.owner.current,e,c,{...i,duration:h,ease:d,times:p}),f=()=>{l=!1,m.cancel()},g=()=>{l=!0,Xt.update(f),o(),u()};m.onfinish=()=>{l||(t.set(function(t,{repeat:e,repeatType:n="loop"}){return t[e&&"loop"!==n&&e%2==1?0:t.length-1]}(c,i)),s&&s(),g())};return{then:(t,e)=>r.then(t,e),attachTimeline:t=>(m.timeline=t,m.onfinish=null,Yt),get time(){return Ee(m.currentTime||0)},set time(t){m.currentTime=Ae(t)},get speed(){return m.playbackRate},set speed(t){m.playbackRate=t},get duration(){return Ee(h)},play:()=>{a||(m.play(),Gt(f))},pause:()=>m.pause(),stop:()=>{if(a=!0,"idle"===m.playState)return;const{currentTime:e}=m;if(e){const n=ss({...i,autoplay:!1});t.setWithVelocity(n.sample(e-10).value,n.sample(e).value,10)}g()},complete:()=>{l||m.finish()},cancel:g}}const as={type:"spring",stiffness:500,damping:25,restSpeed:10},ls={type:"keyframes",duration:.8},us={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},cs=(t,{keyframes:e})=>e.length>2?ls:W.has(t)?t.startsWith("scale")?{type:"spring",stiffness:550,damping:0===e[1]?2*Math.sqrt(550):30,restSpeed:10}:as:us,hs=(t,e)=>"zIndex"!==t&&(!("number"!=typeof e&&!Array.isArray(e))||!("string"!=typeof e||!wn.test(e)&&"0"!==e||e.startsWith("url("))),ds=new Set(["brightness","contrast","saturate","opacity"]);function ps(t){const[e,n]=t.slice(0,-1).split("(");if("drop-shadow"===e)return t;const[s]=n.match(st)||[];if(!s)return t;const i=n.replace(s,"");let o=ds.has(e)?1:0;return s!==n&&(o*=100),e+"("+o+i+")"}const ms=/([a-z-]*)\(.*?\)/g,fs={...wn,getAnimatableNone:t=>{const e=t.match(ms);return e?e.map(ps).join(" "):t}},gs={...ft,color:hn,backgroundColor:hn,outlineColor:hn,fill:hn,stroke:hn,borderColor:hn,borderTopColor:hn,borderRightColor:hn,borderBottomColor:hn,borderLeftColor:hn,filter:fs,WebkitFilter:fs},vs=t=>gs[t];function ys(t,e){let n=vs(t);return n!==fs&&(n=wn),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const xs=t=>/^0[^.\s]+$/.test(t);function Ps(t){return"number"==typeof t?0===t:null!==t?"none"===t||"0"===t||xs(t):void 0}function bs(t,e){return t[e]||t.default||t}const ws=(t,e,n,s={})=>i=>{const o=bs(s,t)||{},r=o.delay||s.delay||0;let{elapsed:a=0}=s;a-=Ae(r);const l=function(t,e,n,s){const i=hs(e,n);let o;o=Array.isArray(n)?[...n]:[null,n];const r=void 0!==s.from?s.from:t.get();let a;const l=[];for(let t=0;t<o.length;t++)null===o[t]&&(o[t]=0===t?r:o[t-1]),Ps(o[t])&&l.push(t),"string"==typeof o[t]&&"none"!==o[t]&&"0"!==o[t]&&(a=o[t]);if(i&&l.length&&a)for(let t=0;t<l.length;t++)o[l[t]]=ys(e,a);return o}(e,t,n,o),u=l[0],c=l[l.length-1],h=hs(t,u),d=hs(t,c);Te(h===d,`You are trying to animate ${t} from "${u}" to "${c}". ${u} is not an animatable value - to enable this animation set ${u} to a value animatable to ${c} via the \`style\` property.`);let m={keyframes:l,velocity:e.getVelocity(),ease:"easeOut",...o,delay:-a,onUpdate:t=>{e.set(t),o.onUpdate&&o.onUpdate(t)},onComplete:()=>{i(),o.onComplete&&o.onComplete()}};if(function({when:t,delay:e,delayChildren:n,staggerChildren:s,staggerDirection:i,repeat:o,repeatType:r,repeatDelay:a,from:l,elapsed:u,...c}){return!!Object.keys(c).length}(o)||(m={...m,...cs(t,m)}),m.duration&&(m.duration=Ae(m.duration)),m.repeatDelay&&(m.repeatDelay=Ae(m.repeatDelay)),!h||!d||Ve||!1===o.type||p)return function({keyframes:t,delay:e,onUpdate:n,onComplete:s}){const i=()=>(n&&n(t[t.length-1]),s&&s(),{time:0,speed:1,duration:0,play:Yt,pause:Yt,stop:Yt,then:t=>(t(),Promise.resolve()),cancel:Yt,complete:Yt});return e?ss({keyframes:[0,1],duration:0,delay:e,onComplete:i}):i()}(m);if(!s.isHandoff&&e.owner&&e.owner.current instanceof HTMLElement&&!e.owner.getProps().onUpdate){const n=rs(e,t,m);if(n)return n}return ss(m)};function Ts(t){return Boolean(H(t)&&t.add)}const Ss=t=>/^\-?\d*\.?\d+$/.test(t);function As(t,e){-1===t.indexOf(e)&&t.push(e)}function Es(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}class Vs{constructor(){this.subscriptions=[]}add(t){return As(this.subscriptions,t),()=>Es(this.subscriptions,t)}notify(t,e,n){const s=this.subscriptions.length;if(s)if(1===s)this.subscriptions[0](t,e,n);else for(let i=0;i<s;i++){const s=this.subscriptions[i];s&&s(t,e,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Cs=new Set;function Ms(t,e,n){t||Cs.has(e)||(console.warn(e),n&&console.warn(n),Cs.add(e))}class Ds{constructor(t,e={}){var n;this.version="11.0.8",this.canTrackVelocity=!1,this.events={},this.updateAndNotify=(t,e=!0)=>{const n=Kn.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.canTrackVelocity=(n=this.current,!isNaN(parseFloat(n))),this.owner=e.owner}setCurrent(t){this.current=t,this.updatedAt=Kn.now()}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return"production"!==process.env.NODE_ENV&&Ms(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",t)}on(t,e){this.events[t]||(this.events[t]=new Vs);const n=this.events[t].add(e);return"change"===t?()=>{n(),Xt.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){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=Kn.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||t-this.updatedAt>30)return 0;const e=Math.min(this.updatedAt-this.prevUpdatedAt,30);return kn(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 Rs(t,e){return new Ds(t,e)}const Ls=t=>e=>e.test(t),ks=[Q,ct,ut,lt,dt,ht,{test:t=>"auto"===t,parse:t=>t}],js=t=>ks.find(Ls(t)),Fs=[...ks,hn,wn];function Bs(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,Rs(n))}function Os(t,e){if(!e)return;return(e[t]||e.default||e).from}function Is({protectedKeys:t,needsAnimating:e},n){const s=t.hasOwnProperty(n)&&!0!==e[n];return e[n]=!1,s}function Us(t,e){const n=t.get();if(!Array.isArray(e))return n!==e;for(let t=0;t<e.length;t++)if(e[t]!==n)return!0}function Ns(t,e,{delay:n=0,transitionOverride:s,type:i}={}){let{transition:o=t.getDefaultTransition(),transitionEnd:r,...a}=t.makeTargetAnimatable(e);const l=t.getValue("willChange");s&&(o=s);const u=[],c=i&&t.animationState&&t.animationState.getState()[i];for(const e in a){const s=t.getValue(e),i=a[e];if(!s||void 0===i||c&&Is(c,e))continue;const r={delay:n,elapsed:0,...bs(o||{},e)};if(window.HandoffAppearAnimations){const n=t.getProps()[d];if(n){const t=window.HandoffAppearAnimations(n,e,s,Xt);null!==t&&(r.elapsed=t,r.isHandoff=!0)}}let h=!r.isHandoff&&!Us(s,i);if("spring"===r.type&&(s.getVelocity()||r.velocity)&&(h=!1),s.animation&&(h=!1),h)continue;s.start(ws(e,s,i,t.shouldReduceMotion&&W.has(e)?{type:!1}:r));const p=s.animation;Ts(l)&&(l.add(e),p.then((()=>l.remove(e)))),u.push(p)}return r&&Promise.all(u).then((()=>{r&&function(t,e){const n=we(t,e);let{transitionEnd:s={},transition:i={},...o}=n?t.makeTargetAnimatable(n,!1):{};o={...o,...s};for(const e in o)Bs(t,e,Wt(o[e]))}(t,r)})),u}function Ws(t,e,n={}){const s=we(t,e,n.custom);let{transition:i=t.getDefaultTransition()||{}}=s||{};n.transitionOverride&&(i=n.transitionOverride);const o=s?()=>Promise.all(Ns(t,s,n)):()=>Promise.resolve(),r=t.variantChildren&&t.variantChildren.size?(s=0)=>{const{delayChildren:o=0,staggerChildren:r,staggerDirection:a}=i;return function(t,e,n=0,s=0,i=1,o){const r=[],a=(t.variantChildren.size-1)*s,l=1===i?(t=0)=>t*s:(t=0)=>a-t*s;return Array.from(t.variantChildren).sort($s).forEach(((t,s)=>{t.notify("AnimationStart",e),r.push(Ws(t,e,{...o,delay:n+l(s)}).then((()=>t.notify("AnimationComplete",e))))})),Promise.all(r)}(t,e,o+s,r,a,n)}:()=>Promise.resolve(),{when:a}=i;if(a){const[t,e]="beforeChildren"===a?[o,r]:[r,o];return t().then((()=>e()))}return Promise.all([o(),r(n.delay)])}function $s(t,e){return t.sortNodePosition(e)}const Hs=[...T].reverse(),zs=T.length;function Ys(t){return e=>Promise.all(e.map((({animation:e,options:n})=>function(t,e,n={}){let s;if(t.notify("AnimationStart",e),Array.isArray(e)){const i=e.map((e=>Ws(t,e,n)));s=Promise.all(i)}else if("string"==typeof e)s=Ws(t,e,n);else{const i="function"==typeof e?we(t,e,n.custom):e;s=Promise.all(Ns(t,i,n))}return s.then((()=>t.notify("AnimationComplete",e)))}(t,e,n))))}function Xs(t){let e=Ys(t);const n={animate:qs(!0),whileInView:qs(),whileHover:qs(),whileTap:qs(),whileDrag:qs(),whileFocus:qs(),exit:qs()};let s=!0;const i=(e,n)=>{const s=we(t,n);if(s){const{transition:t,transitionEnd:n,...i}=s;e={...e,...i,...n}}return e};function o(o,r){const a=t.getProps(),l=t.getVariantContext(!0)||{},u=[],c=new Set;let h={},d=1/0;for(let e=0;e<zs;e++){const p=Hs[e],m=n[p],f=void 0!==a[p]?a[p]:l[p],g=b(f),v=p===r?m.isActive:null;!1===v&&(d=e);let y=f===l[p]&&f!==a[p]&&g;if(y&&s&&t.manuallyAnimateOnMount&&(y=!1),m.protectedKeys={...h},!m.isActive&&null===v||!f&&!m.prevProp||w(f)||"boolean"==typeof f)continue;let x=Gs(m.prevProp,f)||p===r&&m.isActive&&!y&&g||e>d&&g,P=!1;const T=Array.isArray(f)?f:[f];let S=T.reduce(i,{});!1===v&&(S={});const{prevResolvedValues:A={}}=m,E={...A,...S},V=t=>{x=!0,c.has(t)&&(P=!0,c.delete(t)),m.needsAnimating[t]=!0};for(const t in E){const e=S[t],n=A[t];if(h.hasOwnProperty(t))continue;let s=!1;s=Ut(e)&&Ut(n)?!be(e,n):e!==n,s?void 0!==e?V(t):c.add(t):void 0!==e&&c.has(t)?V(t):m.protectedKeys[t]=!0}m.prevProp=f,m.prevResolvedValues=S,m.isActive&&(h={...h,...S}),s&&t.blockInitialAnimation&&(x=!1),!x||y&&!P||u.push(...T.map((t=>({animation:t,options:{type:p,...o}}))))}if(c.size){const e={};c.forEach((n=>{const s=t.getBaseTarget(n);void 0!==s&&(e[n]=s)})),u.push({animation:e})}let p=Boolean(u.length);return!s||!1!==a.initial&&a.initial!==a.animate||t.manuallyAnimateOnMount||(p=!1),s=!1,p?e(u):Promise.resolve()}return{animateChanges:o,setActive:function(e,s,i){var r;if(n[e].isActive===s)return Promise.resolve();null===(r=t.variantChildren)||void 0===r||r.forEach((t=>{var n;return null===(n=t.animationState)||void 0===n?void 0:n.setActive(e,s)})),n[e].isActive=s;const a=o(i,e);for(const t in n)n[t].protectedKeys={};return a},setAnimateFunction:function(n){e=n(t)},getState:()=>n}}function Gs(t,e){return"string"==typeof e?e!==t:!!Array.isArray(e)&&!be(e,t)}function qs(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}let Zs=0;const _s={animation:{Feature:class extends ce{constructor(t){super(t),t.animationState||(t.animationState=Xs(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();this.unmount(),w(t)&&(this.unmount=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:e}=this.node.prevProps||{};t!==e&&this.updateAnimationControlsSubscription()}unmount(){}}},exit:{Feature:class extends ce{constructor(){super(...arguments),this.id=Zs++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:e,custom:n}=this.node.presenceContext,{isPresent:s}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===s)return;const i=this.node.animationState.setActive("exit",!t,{custom:null!=n?n:this.node.getProps().custom});e&&!t&&i.then((()=>e(this.id)))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}}},Ks=(t,e)=>Math.abs(t-e);class Js{constructor(t,e,{transformPagePoint:n,contextWindow:s,dragSnapToOrigin:i=!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=ei(this.lastMoveEventInfo,this.history),e=null!==this.startEvent,n=function(t,e){const n=Ks(t.x,e.x),s=Ks(t.y,e.y);return Math.sqrt(n**2+s**2)}(t.offset,{x:0,y:0})>=3;if(!e&&!n)return;const{point:s}=t,{timestamp:i}=qt;this.history.push({...s,timestamp:i});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=Qs(e,this.transformPagePoint),Xt.update(this.updatePoint,!0)},this.handlePointerUp=(t,e)=>{this.end();const{onEnd:n,onSessionEnd:s,resumeAnimation:i}=this.handlers;if(this.dragSnapToOrigin&&i&&i(),!this.lastMoveEvent||!this.lastMoveEventInfo)return;const o=ei("pointercancel"===t.type?this.lastMoveEventInfo:Qs(e,this.transformPagePoint),this.history);this.startEvent&&n&&n(t,o),s&&s(t,o)},!Qt(t))return;this.dragSnapToOrigin=i,this.handlers=e,this.transformPagePoint=n,this.contextWindow=s||window;const o=Qs(te(t),this.transformPagePoint),{point:r}=o,{timestamp:a}=qt;this.history=[{...r,timestamp:a}];const{onSessionStart:l}=e;l&&l(t,ei(o,this.history)),this.removeListeners=ie(ne(this.contextWindow,"pointermove",this.handlePointerMove),ne(this.contextWindow,"pointerup",this.handlePointerUp),ne(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Gt(this.updatePoint)}}function Qs(t,e){return e?{point:e(t.point)}:t}function ti(t,e){return{x:t.x-e.x,y:t.y-e.y}}function ei({point:t},e){return{point:t,delta:ti(t,si(e)),offset:ti(t,ni(e)),velocity:ii(e,.1)}}function ni(t){return t[0]}function si(t){return t[t.length-1]}function ii(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,s=null;const i=si(t);for(;n>=0&&(s=t[n],!(i.timestamp-s.timestamp>Ae(e)));)n--;if(!s)return{x:0,y:0};const o=Ee(i.timestamp-s.timestamp);if(0===o)return{x:0,y:0};const r={x:(i.x-s.x)/o,y:(i.y-s.y)/o};return r.x===1/0&&(r.x=0),r.y===1/0&&(r.y=0),r}function oi(t){return t.max-t.min}function ri(t,e=0,n=.01){return Math.abs(t-e)<=n}function ai(t,e,n,s=.5){t.origin=s,t.originPoint=Je(e.min,e.max,t.origin),t.scale=oi(n)/oi(e),(ri(t.scale,1,1e-4)||isNaN(t.scale))&&(t.scale=1),t.translate=Je(n.min,n.max,t.origin)-t.originPoint,(ri(t.translate)||isNaN(t.translate))&&(t.translate=0)}function li(t,e,n,s){ai(t.x,e.x,n.x,s?s.originX:void 0),ai(t.y,e.y,n.y,s?s.originY:void 0)}function ui(t,e,n){t.min=n.min+e.min,t.max=t.min+oi(e)}function ci(t,e,n){t.min=e.min-n.min,t.max=t.min+oi(e)}function hi(t,e,n){ci(t.x,e.x,n.x),ci(t.y,e.y,n.y)}function di(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 pi(t,e){let n=e.min-t.min,s=e.max-t.max;return e.max-e.min<t.max-t.min&&([n,s]=[s,n]),{min:n,max:s}}const mi=.35;function fi(t,e,n){return{min:gi(t,e),max:gi(t,n)}}function gi(t,e){return"number"==typeof t?t:t[e]||0}const vi=()=>({x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}}),yi=()=>({x:{min:0,max:0},y:{min:0,max:0}});function xi(t){return[t("x"),t("y")]}function Pi({top:t,left:e,right:n,bottom:s}){return{x:{min:e,max:n},y:{min:t,max:s}}}function bi(t){return void 0===t||1===t}function wi({scale:t,scaleX:e,scaleY:n}){return!bi(t)||!bi(e)||!bi(n)}function Ti(t){return wi(t)||Si(t)||t.z||t.rotate||t.rotateX||t.rotateY}function Si(t){return Ai(t.x)||Ai(t.y)}function Ai(t){return t&&"0%"!==t}function Ei(t,e,n){return n+e*(t-n)}function Vi(t,e,n,s,i){return void 0!==i&&(t=Ei(t,i,s)),Ei(t,n,s)+e}function Ci(t,e=0,n=1,s,i){t.min=Vi(t.min,e,n,s,i),t.max=Vi(t.max,e,n,s,i)}function Mi(t,{x:e,y:n}){Ci(t.x,e.translate,e.scale,e.originPoint),Ci(t.y,n.translate,n.scale,n.originPoint)}function Di(t){return Number.isInteger(t)||t>1.0000000000001||t<.999999999999?t:1}function Ri(t,e){t.min=t.min+e,t.max=t.max+e}function Li(t,e,[n,s,i]){const o=void 0!==e[i]?e[i]:.5,r=Je(t.min,t.max,o);Ci(t,e[n],e[s],r,e.scale)}const ki=["x","scaleX","originX"],ji=["y","scaleY","originY"];function Fi(t,e){Li(t.x,e,ki),Li(t.y,e,ji)}function Bi(t,e){return Pi(function(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),s=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:s.y,right:s.x}}(t.getBoundingClientRect(),e))}const Oi=({current:t})=>t?t.ownerDocument.defaultView:null,Ii=new WeakMap;class Ui{constructor(t){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=yi(),this.visualElement=t}start(t,{snapToCursor:e=!1}={}){const{presenceContext:n}=this.visualElement;if(n&&!1===n.isPresent)return;const{dragSnapToOrigin:s}=this.getProps();this.panSession=new Js(t,{onSessionStart:t=>{const{dragSnapToOrigin:n}=this.getProps();n?this.pauseAnimation():this.stopAnimation(),e&&this.snapToCursor(te(t,"page").point)},onStart:(t,e)=>{const{drag:n,dragPropagation:s,onDragStart:i}=this.getProps();if(n&&!s&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=le(n),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),xi((t=>{let e=this.getAxisMotionValue(t).get()||0;if(ut.test(e)){const{projection:n}=this.visualElement;if(n&&n.layout){const s=n.layout.layoutBox[t];if(s){e=oi(s)*(parseFloat(e)/100)}}}this.originPoint[t]=e})),i&&Xt.update((()=>i(t,e)),!1,!0);const{animationState:o}=this.visualElement;o&&o.setActive("whileDrag",!0)},onMove:(t,e)=>{const{dragPropagation:n,dragDirectionLock:s,onDirectionLock:i,onDrag:o}=this.getProps();if(!n&&!this.openGlobalLock)return;const{offset:r}=e;if(s&&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&&i&&i(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:()=>xi((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:s,contextWindow:Oi(this.visualElement)})}stop(t,e){const n=this.isDragging;if(this.cancel(),!n)return;const{velocity:s}=e;this.startAnimation(s);const{onDragEnd:i}=this.getProps();i&&Xt.update((()=>i(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.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),e&&e.setActive("whileDrag",!1)}updateAxis(t,e,n){const{drag:s}=this.getProps();if(!n||!Ni(t,s,this.currentDirection))return;const i=this.getAxisMotionValue(t);let o=this.originPoint[t]+n[t];this.constraints&&this.constraints[t]&&(o=function(t,{min:e,max:n},s){return void 0!==e&&t<e?t=s?Je(e,t,s.min):Math.max(t,e):void 0!==n&&t>n&&(t=s?Je(n,t,s.max):Math.min(t,n)),t}(o,this.constraints[t],this.elastic[t])),i.set(o)}resolveConstraints(){var t;const{dragConstraints:e,dragElastic:n}=this.getProps(),s=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):null===(t=this.visualElement.projection)||void 0===t?void 0:t.layout,i=this.constraints;e&&P(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!e||!s)&&function(t,{top:e,left:n,bottom:s,right:i}){return{x:di(t.x,n,i),y:di(t.y,e,s)}}(s.layoutBox,e),this.elastic=function(t=mi){return!1===t?t=0:!0===t&&(t=mi),{x:fi(t,"left","right"),y:fi(t,"top","bottom")}}(n),i!==this.constraints&&s&&this.constraints&&!this.hasMutatedConstraints&&xi((t=>{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}(s.layoutBox[t],this.constraints[t]))}))}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:e}=this.getProps();if(!t||!P(t))return!1;const n=t.current;Se(null!==n,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");const{projection:s}=this.visualElement;if(!s||!s.layout)return!1;const i=function(t,e,n){const s=Bi(t,n),{scroll:i}=e;return i&&(Ri(s.x,i.offset.x),Ri(s.y,i.offset.y)),s}(n,s.root,this.visualElement.getTransformPagePoint());let o=function(t,e){return{x:pi(t.x,e.x),y:pi(t.y,e.y)}}(s.layout.layoutBox,i);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=Pi(t))}return o}startAnimation(t){const{drag:e,dragMomentum:n,dragElastic:s,dragTransition:i,dragSnapToOrigin:o,onDragTransitionEnd:r}=this.getProps(),a=this.constraints||{},l=xi((r=>{if(!Ni(r,e,this.currentDirection))return;let l=a&&a[r]||{};o&&(l={min:0,max:0});const u=s?200:1e6,c=s?40:1e7,h={type:"inertia",velocity:n?t[r]:0,bounceStiffness:u,bounceDamping:c,timeConstant:750,restDelta:1,restSpeed:10,...i,...l};return this.startAxisValueAnimation(r,h)}));return Promise.all(l).then(r)}startAxisValueAnimation(t,e){const n=this.getAxisMotionValue(t);return n.start(ws(t,n,0,e))}stopAnimation(){xi((t=>this.getAxisMotionValue(t).stop()))}pauseAnimation(){xi((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(),s=n[e];return s||this.visualElement.getValue(t,(n.initial?n.initial[t]:void 0)||0)}snapToCursor(t){xi((e=>{const{drag:n}=this.getProps();if(!Ni(e,n,this.currentDirection))return;const{projection:s}=this.visualElement,i=this.getAxisMotionValue(e);if(s&&s.layout){const{min:n,max:o}=s.layout.layoutBox[e];i.set(t[e]-Je(n,o,.5))}}))}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:e}=this.getProps(),{projection:n}=this.visualElement;if(!P(e)||!n||!this.constraints)return;this.stopAnimation();const s={x:0,y:0};xi((t=>{const e=this.getAxisMotionValue(t);if(e){const n=e.get();s[t]=function(t,e){let n=.5;const s=oi(t),i=oi(e);return i>s?n=Ke(e.min,e.max-s,t.min):s>i&&(n=Ke(t.min,t.max-i,e.min)),J(0,1,n)}({min:n,max:n},this.constraints[t])}}));const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.resolveConstraints(),xi((e=>{if(!Ni(e,t,null))return;const n=this.getAxisMotionValue(e),{min:i,max:o}=this.constraints[e];n.set(Je(i,o,s[e]))}))}addListeners(){if(!this.visualElement.current)return;Ii.set(this.visualElement,this);const t=ne(this.visualElement.current,"pointerdown",(t=>{const{drag:e,dragListener:n=!0}=this.getProps();e&&n&&this.start(t)})),e=()=>{const{dragConstraints:t}=this.getProps();P(t)&&(this.constraints=this.resolveRefConstraints())},{projection:n}=this.visualElement,s=n.addEventListener("measure",e);n&&!n.layout&&(n.root&&n.root.updateScroll(),n.updateLayout()),e();const i=Jt(window,"resize",(()=>this.scalePositionWithinConstraints())),o=n.addEventListener("didUpdate",(({delta:t,hasLayoutChanged:e})=>{this.isDragging&&e&&(xi((e=>{const n=this.getAxisMotionValue(e);n&&(this.originPoint[e]+=t[e].translate,n.set(n.get()+t[e].translate))})),this.visualElement.render())}));return()=>{i(),t(),s(),o&&o()}}getProps(){const t=this.visualElement.getProps(),{drag:e=!1,dragDirectionLock:n=!1,dragPropagation:s=!1,dragConstraints:i=!1,dragElastic:o=mi,dragMomentum:r=!0}=t;return{...t,drag:e,dragDirectionLock:n,dragPropagation:s,dragConstraints:i,dragElastic:o,dragMomentum:r}}}function Ni(t,e,n){return!(!0!==e&&e!==t||null!==n&&n!==t)}const Wi=t=>(e,n)=>{t&&Xt.update((()=>t(e,n)))};const $i={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Hi(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const zi={correct:(t,e)=>{if(!e.target)return t;if("string"==typeof t){if(!ct.test(t))return t;t=parseFloat(t)}return`${Hi(t,e.target.x)}% ${Hi(t,e.target.y)}%`}},Yi={correct:(t,{treeScale:e,projectionDelta:n})=>{const s=t,i=wn.parse(t);if(i.length>5)return s;const o=wn.createTransformer(t),r="number"!=typeof i[0]?1:0,a=n.x.scale*e.x,l=n.y.scale*e.y;i[0+r]/=a,i[1+r]/=l;const u=Je(a,l,.5);return"number"==typeof i[2+r]&&(i[2+r]/=u),"number"==typeof i[3+r]&&(i[3+r]/=u),o(i)}};class Xi extends t.Component{componentDidMount(){const{visualElement:t,layoutGroup:e,switchLayoutGroup:n,layoutId:s}=this.props,{projection:i}=t;var o;o=qi,Object.assign(U,o),i&&(e.group&&e.group.add(i),n&&n.register&&s&&n.register(i),i.root.didUpdate(),i.addEventListener("animationComplete",(()=>{this.safeToRemove()})),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),$i.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:e,visualElement:n,drag:s,isPresent:i}=this.props,o=n.projection;return o?(o.isPresent=i,s||t.layoutDependency!==e||void 0===e?o.willUpdate():this.safeToRemove(),t.isPresent!==i&&(i?o.promote():o.relegate()||Xt.postRender((()=>{const t=o.getStack();t&&t.members.length||this.safeToRemove()}))),null):null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),y.postRender((()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()})))}componentWillUnmount(){const{visualElement:t,layoutGroup:e,switchLayoutGroup:n}=this.props,{projection:s}=t;s&&(s.scheduleCheckAfterUnmount(),e&&e.group&&e.group.remove(s),n&&n.deregister&&n.deregister(s))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function Gi(e){const[n,s]=function(){const e=t.useContext(a);if(null===e)return[!0,null];const{isPresent:n,onExitComplete:s,register:i}=e,o=t.useId();return t.useEffect((()=>i(o)),[]),!n&&s?[!1,()=>s&&s(o)]:[!0]}(),i=t.useContext(R);return t.createElement(Xi,{...e,layoutGroup:i,switchLayoutGroup:t.useContext(L),isPresent:n,safeToRemove:s})}const qi={borderRadius:{...zi,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:zi,borderTopRightRadius:zi,borderBottomLeftRadius:zi,borderBottomRightRadius:zi,boxShadow:Yi},Zi=["TopLeft","TopRight","BottomLeft","BottomRight"],_i=Zi.length,Ki=t=>"string"==typeof t?parseFloat(t):t,Ji=t=>"number"==typeof t||ct.test(t);function Qi(t,e){return void 0!==t[e]?t[e]:t.borderRadius}const to=no(0,.5,ze),eo=no(.5,.95,Yt);function no(t,e,n){return s=>s<t?0:s>e?1:n(Ke(t,e,s))}function so(t,e){t.min=e.min,t.max=e.max}function io(t,e){so(t.x,e.x),so(t.y,e.y)}function oo(t,e,n,s,i){return t=Ei(t-=e,1/n,s),void 0!==i&&(t=Ei(t,1/i,s)),t}function ro(t,e,[n,s,i],o,r){!function(t,e=0,n=1,s=.5,i,o=t,r=t){ut.test(e)&&(e=parseFloat(e),e=Je(r.min,r.max,e/100)-r.min);if("number"!=typeof e)return;let a=Je(o.min,o.max,s);t===o&&(a-=e),t.min=oo(t.min,e,n,a,i),t.max=oo(t.max,e,n,a,i)}(t,e[n],e[s],e[i],e.scale,o,r)}const ao=["x","scaleX","originX"],lo=["y","scaleY","originY"];function uo(t,e,n,s){ro(t.x,e,ao,n?n.x:void 0,s?s.x:void 0),ro(t.y,e,lo,n?n.y:void 0,s?s.y:void 0)}function co(t){return 0===t.translate&&1===t.scale}function ho(t){return co(t.x)&&co(t.y)}function po(t,e){return Math.round(t.x.min)===Math.round(e.x.min)&&Math.round(t.x.max)===Math.round(e.x.max)&&Math.round(t.y.min)===Math.round(e.y.min)&&Math.round(t.y.max)===Math.round(e.y.max)}function mo(t){return oi(t.x)/oi(t.y)}class fo{constructor(){this.members=[]}add(t){As(this.members,t),t.scheduleRender()}remove(t){if(Es(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:s}=t.options;!1===s&&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 go(t,e,n){let s="";const i=t.x.translate/e.x,o=t.y.translate/e.y;if((i||o)&&(s=`translate3d(${i}px, ${o}px, 0) `),1===e.x&&1===e.y||(s+=`scale(${1/e.x}, ${1/e.y}) `),n){const{rotate:t,rotateX:e,rotateY:i}=n;t&&(s+=`rotate(${t}deg) `),e&&(s+=`rotateX(${e}deg) `),i&&(s+=`rotateY(${i}deg) `)}const r=t.x.scale*e.x,a=t.y.scale*e.y;return 1===r&&1===a||(s+=`scale(${r}, ${a})`),s||"none"}const vo=(t,e)=>t.depth-e.depth;class yo{constructor(){this.children=[],this.isDirty=!1}add(t){As(this.children,t),this.isDirty=!0}remove(t){Es(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(vo),this.isDirty=!1,this.children.forEach(t)}}const xo=["","X","Y","Z"],Po={visibility:"hidden"};let bo=0;const wo={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0};function To({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:s,resetTransform:i}){return class{constructor(t={},n=(null==e?void 0:e())){this.id=bo++,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.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{var t;this.projectionUpdateScheduled=!1,wo.totalNodes=wo.resolvedTargetDeltas=wo.recalculatedProjection=0,this.nodes.forEach(Eo),this.nodes.forEach(ko),this.nodes.forEach(jo),this.nodes.forEach(Vo),t=wo,window.MotionDebug&&window.MotionDebug.record(t)},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 yo)}addEventListener(t,e){return this.eventHandlers.has(t)||this.eventHandlers.set(t,new Vs),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;var s;this.isSVG=(s=e)instanceof SVGElement&&"svg"!==s.tagName,this.instance=e;const{layoutId:i,layout:o,visualElement:r}=this.options;if(r&&!r.current&&r.mount(e),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),n&&(o||i)&&(this.isLayoutDirty=!0),t){let n;const s=()=>this.root.updateBlockedByResize=!1;t(e,(()=>{this.root.updateBlockedByResize=!0,n&&n(),n=function(t,e){const n=Kn.now(),s=({timestamp:i})=>{const o=i-n;o>=e&&(Gt(s),t(o-e))};return Xt.read(s,!0),()=>Gt(s)}(s,250),$i.hasAnimatedSinceResize&&($i.hasAnimatedSinceResize=!1,this.nodes.forEach(Lo))}))}i&&this.root.registerSharedNode(i,this),!1!==this.options.animate&&r&&(i||o)&&this.addEventListener("didUpdate",(({delta:t,hasLayoutChanged:e,hasRelativeTargetChanged:n,layout:s})=>{if(this.isTreeAnimationBlocked())return this.target=void 0,void(this.relativeTarget=void 0);const i=this.options.transition||r.getDefaultTransition()||No,{onLayoutAnimationStart:o,onLayoutAnimationComplete:a}=r.getProps(),l=!this.targetLayout||!po(this.targetLayout,s)||n,u=!e&&n;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||u||e&&(l||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(t,u);const e={...bs(i,"layout"),onPlay:o,onComplete:a};(r.shouldReduceMotion||this.options.layoutRoot)&&(e.delay=0,e.type=!1),this.startAnimation(e)}else e||Lo(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=s}))}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,Gt(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(Fo),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(!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 s=this.getTransformTemplate();this.prevTransformTemplateValue=s?s(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(Mo);this.isUpdating||this.nodes.forEach(Do),this.isUpdating=!1,window.HandoffCancelAllAnimations&&window.HandoffCancelAllAnimations(),this.nodes.forEach(Ro),this.nodes.forEach(So),this.nodes.forEach(Ao),this.clearAllSnapshots();const t=Kn.now();qt.delta=J(0,1e3/60,t-qt.timestamp),qt.timestamp=t,qt.isProcessing=!0,Zt.update.process(qt),Zt.preRender.process(qt),Zt.render.process(qt),qt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,y.read((()=>this.update())))}clearAllSnapshots(){this.nodes.forEach(Co),this.sharedNodes.forEach(Bo)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Xt.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Xt.postRender((()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()}))}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure())}updateLayout(){if(!this.instance)return;if(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead()||this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let t=0;t<this.path.length;t++){this.path[t].updateScroll()}const t=this.layout;this.layout=this.measure(!1),this.layoutCorrected=yi(),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);this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===t&&(e=!1),e&&(this.scroll={animationId:this.root.animationId,phase:t,isRoot:s(this.instance),offset:n(this.instance)})}resetTransform(){if(!i)return;const t=this.isLayoutDirty||this.shouldResetTransform,e=this.projectionDelta&&!ho(this.projectionDelta),n=this.getTransformTemplate(),s=n?n(this.latestValues,""):void 0,o=s!==this.prevTransformTemplateValue;t&&(e||Ti(this.latestValues)||o)&&(i(this.instance,s),this.shouldResetTransform=!1,this.scheduleRender())}measure(t=!0){const e=this.measurePageBox();let n=this.removeElementScroll(e);var s;return t&&(n=this.removeTransform(n)),Ho((s=n).x),Ho(s.y),{animationId:this.root.animationId,measuredBox:e,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:t}=this.options;if(!t)return yi();const e=t.measureViewportBox(),{scroll:n}=this.root;return n&&(Ri(e.x,n.offset.x),Ri(e.y,n.offset.y)),e}removeElementScroll(t){const e=yi();io(e,t);for(let n=0;n<this.path.length;n++){const s=this.path[n],{scroll:i,options:o}=s;if(s!==this.root&&i&&o.layoutScroll){if(i.isRoot){io(e,t);const{scroll:n}=this.root;n&&(Ri(e.x,-n.offset.x),Ri(e.y,-n.offset.y))}Ri(e.x,i.offset.x),Ri(e.y,i.offset.y)}}return e}applyTransform(t,e=!1){const n=yi();io(n,t);for(let t=0;t<this.path.length;t++){const s=this.path[t];!e&&s.options.layoutScroll&&s.scroll&&s!==s.root&&Fi(n,{x:-s.scroll.offset.x,y:-s.scroll.offset.y}),Ti(s.latestValues)&&Fi(n,s.latestValues)}return Ti(this.latestValues)&&Fi(n,this.latestValues),n}removeTransform(t){const e=yi();io(e,t);for(let t=0;t<this.path.length;t++){const n=this.path[t];if(!n.instance)continue;if(!Ti(n.latestValues))continue;wi(n.latestValues)&&n.updateSnapshot();const s=yi();io(s,n.measurePageBox()),uo(e,n.latestValues,n.snapshot?n.snapshot.layoutBox:void 0,s)}return Ti(this.latestValues)&&uo(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!==qt.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 s=Boolean(this.resumingFrom)||this!==n;if(!(t||s&&this.isSharedProjectionDirty||this.isProjectionDirty||(null===(e=this.parent)||void 0===e?void 0:e.isProjectionDirty)||this.attemptToResolveRelativeTarget))return;const{layout:i,layoutId:o}=this.options;if(this.layout&&(i||o)){if(this.resolvedRelativeTargetAt=qt.timestamp,!this.targetDelta&&!this.relativeTarget){const t=this.getClosestProjectingParent();t&&t.layout&&1!==this.animationProgress?(this.relativeParent=t,this.forceRelativeParentToResolveTarget(),this.relativeTarget=yi(),this.relativeTargetOrigin=yi(),hi(this.relativeTargetOrigin,this.layout.layoutBox,t.layout.layoutBox),io(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(this.relativeTarget||this.targetDelta){var r,a,l;if(this.target||(this.target=yi(),this.targetWithTransforms=yi()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),r=this.target,a=this.relativeTarget,l=this.relativeParent.target,ui(r.x,a.x,l.x),ui(r.y,a.y,l.y)):this.targetDelta?(Boolean(this.resumingFrom)?this.target=this.applyTransform(this.layout.layoutBox):io(this.target,this.layout.layoutBox),Mi(this.target,this.targetDelta)):io(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=yi(),this.relativeTargetOrigin=yi(),hi(this.relativeTargetOrigin,this.target,t.target),io(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}wo.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(this.parent&&!wi(this.parent.latestValues)&&!Si(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 s=!0;if((this.isProjectionDirty||(null===(t=this.parent)||void 0===t?void 0:t.isProjectionDirty))&&(s=!1),n&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(s=!1),this.resolvedRelativeTargetAt===qt.timestamp&&(s=!1),s)return;const{layout:i,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||!i&&!o)return;io(this.layoutCorrected,this.layout.layoutBox);const r=this.treeScale.x,a=this.treeScale.y;!function(t,e,n,s=!1){const i=n.length;if(!i)return;let o,r;e.x=e.y=1;for(let a=0;a<i;a++){o=n[a],r=o.projectionDelta;const i=o.instance;i&&i.style&&"contents"===i.style.display||(s&&o.options.layoutScroll&&o.scroll&&o!==o.root&&Fi(t,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),r&&(e.x*=r.x.scale,e.y*=r.y.scale,Mi(t,r)),s&&Ti(o.latestValues)&&Fi(t,o.latestValues))}e.x=Di(e.x),e.y=Di(e.y)}(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=yi());const{target:l}=e;if(!l)return void(this.projectionTransform&&(this.projectionDelta=vi(),this.projectionTransform="none",this.scheduleRender()));this.projectionDelta||(this.projectionDelta=vi(),this.projectionDeltaWithTransform=vi());const u=this.projectionTransform;li(this.projectionDelta,this.layoutCorrected,l,this.latestValues),this.projectionTransform=go(this.projectionDelta,this.treeScale),this.projectionTransform===u&&this.treeScale.x===r&&this.treeScale.y===a||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",l)),wo.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(t=!0){if(this.options.scheduleRender&&this.options.scheduleRender(),t){const t=this.getStack();t&&t.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}setAnimationOrigin(t,e=!1){const n=this.snapshot,s=n?n.latestValues:{},i={...this.latestValues},o=vi();this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!e;const r=yi(),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(Uo));let h;this.animationProgress=0,this.mixTargetDelta=e=>{const n=e/1e3;var l,d,p,m,f,g;Oo(o.x,t.x,n),Oo(o.y,t.y,n),this.setTargetDelta(o),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(hi(r,this.layout.layoutBox,this.relativeParent.layout.layoutBox),p=this.relativeTarget,m=this.relativeTargetOrigin,f=r,g=n,Io(p.x,m.x,f.x,g),Io(p.y,m.y,f.y,g),h&&(l=this.relativeTarget,d=h,l.x.min===d.x.min&&l.x.max===d.x.max&&l.y.min===d.y.min&&l.y.max===d.y.max)&&(this.isProjectionDirty=!1),h||(h=yi()),io(h,this.relativeTarget)),a&&(this.animationValues=i,function(t,e,n,s,i,o){i?(t.opacity=Je(0,void 0!==n.opacity?n.opacity:1,to(s)),t.opacityExit=Je(void 0!==e.opacity?e.opacity:1,0,eo(s))):o&&(t.opacity=Je(void 0!==e.opacity?e.opacity:1,void 0!==n.opacity?n.opacity:1,s));for(let i=0;i<_i;i++){const o=`border${Zi[i]}Radius`;let r=Qi(e,o),a=Qi(n,o);void 0===r&&void 0===a||(r||(r=0),a||(a=0),0===r||0===a||Ji(r)===Ji(a)?(t[o]=Math.max(Je(Ki(r),Ki(a),s),0),(ut.test(a)||ut.test(r))&&(t[o]+="%")):t[o]=a)}(e.rotate||n.rotate)&&(t.rotate=Je(e.rotate||0,n.rotate||0,s))}(i,s,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&&(Gt(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Xt.update((()=>{$i.hasAnimatedSinceResize=!0,this.currentAnimation=function(t,e,n){const s=H(t)?t:Rs(t);return s.start(ws("",s,e,n)),s.animation}(0,1e3,{...t,onUpdate:e=>{this.mixTargetDelta(e),t.onUpdate&&t.onUpdate(e)},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:s,latestValues:i}=t;if(e&&n&&s){if(this!==t&&this.layout&&s&&zo(this.options.animationType,this.layout.layoutBox,s.layoutBox)){n=this.target||yi();const e=oi(this.layout.layoutBox.x);n.x.min=t.target.x.min,n.x.max=n.x.min+e;const s=oi(this.layout.layoutBox.y);n.y.min=t.target.y.min,n.y.max=n.y.min+s}io(e,n),Fi(e,i),li(this.projectionDeltaWithTransform,this.layoutCorrected,e,i)}}registerSharedNode(t,e){this.sharedNodes.has(t)||this.sharedNodes.set(t,new fo);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 s=this.getStack();s&&s.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)}resetRotation(){const{visualElement:t}=this.options;if(!t)return;let e=!1;const{latestValues:n}=t;if((n.rotate||n.rotateX||n.rotateY||n.rotateZ)&&(e=!0),!e)return;const s={};for(let e=0;e<xo.length;e++){const i="rotate"+xo[e];n[i]&&(s[i]=n[i],t.setStaticValue(i,0))}t.render();for(const e in s)t.setStaticValue(e,s[e]);t.scheduleRender()}getProjectionStyles(t){var e,n;if(!this.instance||this.isSVG)return;if(!this.isVisible)return Po;const s={visibility:""},i=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,s.opacity="",s.pointerEvents=$t(null==t?void 0:t.pointerEvents)||"",s.transform=i?i(this.latestValues,""):"none",s;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=$t(null==t?void 0:t.pointerEvents)||""),this.hasProjected&&!Ti(this.latestValues)&&(e.transform=i?i({},""):"none",this.hasProjected=!1),e}const r=o.animationValues||o.latestValues;this.applyTransformsToTarget(),s.transform=go(this.projectionDeltaWithTransform,this.treeScale,r),i&&(s.transform=i(r,s.transform));const{x:a,y:l}=this.projectionDelta;s.transformOrigin=`${100*a.origin}% ${100*l.origin}% 0`,o.animationValues?s.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:s.opacity=o===this?void 0!==r.opacity?r.opacity:"":void 0!==r.opacityExit?r.opacityExit:0;for(const t in U){if(void 0===r[t])continue;const{correct:e,applyTo:n}=U[t],i="none"===s.transform?r[t]:e(r[t],o);if(n){const t=n.length;for(let e=0;e<t;e++)s[n[e]]=i}else s[t]=i}return this.options.layoutId&&(s.pointerEvents=o===this?$t(null==t?void 0:t.pointerEvents)||"":"none"),s}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(Mo),this.root.sharedNodes.clear()}}}function So(t){t.updateLayout()}function Ao(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:s}=t.layout,{animationType:i}=t.options,o=n.source!==t.layout.source;"size"===i?xi((t=>{const s=o?n.measuredBox[t]:n.layoutBox[t],i=oi(s);s.min=e[t].min,s.max=s.min+i})):zo(i,n.layoutBox,e)&&xi((s=>{const i=o?n.measuredBox[s]:n.layoutBox[s],r=oi(e[s]);i.max=i.min+r,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[s].max=t.relativeTarget[s].min+r)}));const r=vi();li(r,e,n.layoutBox);const a=vi();o?li(a,t.applyTransform(s,!0),n.measuredBox):li(a,e,n.layoutBox);const l=!ho(r);let u=!1;if(!t.resumeFrom){const s=t.getClosestProjectingParent();if(s&&!s.resumeFrom){const{snapshot:i,layout:o}=s;if(i&&o){const r=yi();hi(r,n.layoutBox,i.layoutBox);const a=yi();hi(a,e,o.layoutBox),po(r,a)||(u=!0),s.options.layoutRoot&&(t.relativeTarget=a,t.relativeTargetOrigin=r,t.relativeParent=s)}}}t.notifyListeners("didUpdate",{layout:e,snapshot:n,delta:a,layoutDelta:r,hasLayoutChanged:l,hasRelativeTargetChanged:u})}else if(t.isLead()){const{onExitComplete:e}=t.options;e&&e()}t.options.transition=void 0}function Eo(t){wo.totalNodes++,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 Vo(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function Co(t){t.clearSnapshot()}function Mo(t){t.clearMeasurements()}function Do(t){t.isLayoutDirty=!1}function Ro(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function Lo(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function ko(t){t.resolveTargetDelta()}function jo(t){t.calcProjection()}function Fo(t){t.resetRotation()}function Bo(t){t.removeLeadSnapshot()}function Oo(t,e,n){t.translate=Je(e.translate,0,n),t.scale=Je(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function Io(t,e,n,s){t.min=Je(e.min,n.min,s),t.max=Je(e.max,n.max,s)}function Uo(t){return t.animationValues&&void 0!==t.animationValues.opacityExit}const No={duration:.45,ease:[.4,0,.1,1]},Wo=t=>"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),$o=Wo("applewebkit/")&&!Wo("chrome/")?Math.round:Yt;function Ho(t){t.min=$o(t.min),t.max=$o(t.max)}function zo(t,e,n){return"position"===t||"preserve-aspect"===t&&!ri(mo(e),mo(n),.2)}const Yo=To({attachResizeListener:(t,e)=>Jt(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Xo={current:void 0},Go=To({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!Xo.current){const t=new Yo({});t.mount(window),t.setOptions({layoutScroll:!0}),Xo.current=t}return Xo.current},resetTransform:(t,e)=>{t.style.transform=void 0!==e?e:"none"},checkIsScrollRoot:t=>Boolean("fixed"===window.getComputedStyle(t).position)}),qo={pan:{Feature:class extends ce{constructor(){super(...arguments),this.removePointerDownListener=Yt}onPointerDown(t){this.session=new Js(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Oi(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:e,onPan:n,onPanEnd:s}=this.node.getProps();return{onSessionStart:Wi(t),onStart:Wi(e),onMove:n,onEnd:(t,e)=>{delete this.session,s&&Xt.update((()=>s(t,e)))}}}mount(){this.removePointerDownListener=ne(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 ce{constructor(t){super(t),this.removeGroupControls=Yt,this.removeListeners=Yt,this.controls=new Ui(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Yt}unmount(){this.removeGroupControls(),this.removeListeners()}},ProjectionNode:Go,MeasureLayout:Gi}},Zo=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;const _o=4;function Ko(t,e,n=1){Se(n<=_o,`Max CSS variable fallback depth detected in property "${t}". This may indicate a circular fallback dependency.`);const[s,i]=function(t){const e=Zo.exec(t);if(!e)return[,];const[,n,s]=e;return[n,s]}(t);if(!s)return;const o=window.getComputedStyle(e).getPropertyValue(s);if(o){const t=o.trim();return Ss(t)?parseFloat(t):t}return Z(i)?Ko(i,e,n+1):i}const Jo=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),Qo=t=>Jo.has(t),tr=t=>t===Q||t===ct,er=(t,e)=>parseFloat(t.split(", ")[e]),nr=(t,e)=>(n,{transform:s})=>{if("none"===s||!s)return 0;const i=s.match(/^matrix3d\((.+)\)$/);if(i)return er(i[1],e);{const e=s.match(/^matrix\((.+)\)$/);return e?er(e[1],t):0}},sr=new Set(["x","y","z"]),ir=N.filter((t=>!sr.has(t)));const or={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:nr(4,13),y:nr(5,14)};or.translateX=or.x,or.translateY=or.y;const rr=(t,e,n={},s={})=>{e={...e},s={...s};const i=Object.keys(e).filter(Qo);let o=[],r=!1;const a=[];if(i.forEach((i=>{const l=t.getValue(i);if(!t.hasValue(i))return;let u=n[i],c=js(u);const h=e[i];let d;if(Ut(h)){const t=h.length,e=null===h[0]?1:0;u=h[e],c=js(u);for(let n=e;n<t&&null!==h[n];n++)d?Se(js(h[n])===d,"All keyframes must be of the same type"):(d=js(h[n]),Se(d===c||tr(c)&&tr(d),"Keyframes must be of the same dimension as the current value"))}else d=js(h);if(c!==d)if(tr(c)&&tr(d)){const t=l.get();"string"==typeof t&&l.set(parseFloat(t)),"string"==typeof h?e[i]=parseFloat(h):Array.isArray(h)&&d===ct&&(e[i]=h.map(parseFloat))}else(null==c?void 0:c.transform)&&(null==d?void 0:d.transform)&&(0===u||0===h)?0===u?l.set(d.transform(u)):e[i]=c.transform(h):(r||(o=function(t){const e=[];return ir.forEach((n=>{const s=t.getValue(n);void 0!==s&&(e.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))})),e.length&&t.render(),e}(t),r=!0),a.push(i),s[i]=void 0!==s[i]?s[i]:e[i],l.jump(h))})),a.length){const n=a.indexOf("height")>=0?window.pageYOffset:null,i=((t,e,n)=>{const s=e.measureViewportBox(),i=e.current,o=getComputedStyle(i),{display:r}=o,a={};"none"===r&&e.setStaticValue("display",t.display||"block"),n.forEach((t=>{a[t]=or[t](s,o)})),e.render();const l=e.measureViewportBox();return n.forEach((n=>{const s=e.getValue(n);s&&s.jump(a[n]),t[n]=or[n](l,o)})),t})(e,t,a);return o.length&&o.forEach((([e,n])=>{t.getValue(e).set(n)})),t.render(),l&&null!==n&&window.scrollTo({top:n}),{target:i,transitionEnd:s}}return{target:e,transitionEnd:s}};function ar(t,e,n,s){return(t=>Object.keys(t).some(Qo))(e)?rr(t,e,n,s):{target:e,transitionEnd:s}}const lr=(t,e,n,s)=>{const i=function(t,{...e},n){const s=t.current;if(!(s instanceof Element))return{target:e,transitionEnd:n};n&&(n={...n}),t.values.forEach((t=>{const e=t.get();if(!Z(e))return;const n=Ko(e,s);n&&t.set(n)}));for(const t in e){const i=e[t];if(!Z(i))continue;const o=Ko(i,s);o&&(e[t]=o,n||(n={}),void 0===n[t]&&(n[t]=i))}return{target:e,transitionEnd:n}}(t,e,s);return ar(t,e=i.target,n,s=i.transitionEnd)},ur={current:null},cr={current:!1};const hr=new WeakMap,dr=Object.keys(D),pr=dr.length,mr=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],fr=S.length;class gr{constructor({parent:t,props:e,presenceContext:n,reducedMotionConfig:s,visualState:i},o={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,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.scheduleRender=()=>Xt.render(this.render,!1,!0);const{latestValues:r,renderState:a}=i;this.latestValues=r,this.baseTarget={...r},this.initialValues=e.initial?{...r}:{},this.renderState=a,this.parent=t,this.props=e,this.presenceContext=n,this.depth=t?t.depth+1:0,this.reducedMotionConfig=s,this.options=o,this.isControllingVariants=A(e),this.isVariantNode=E(e),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(t&&t.current);const{willChange:l,...u}=this.scrapeMotionValuesFromProps(e,{});for(const t in u){const e=u[t];void 0!==r[t]&&H(e)&&(e.set(r[t],!1),Ts(l)&&l.add(t))}}scrapeMotionValuesFromProps(t,e){return{}}mount(t){this.current=t,hr.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))),cr.current||function(){if(cr.current=!0,l)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>ur.current=t.matches;t.addListener(e),e()}else ur.current=!1}(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||ur.current),"production"!==process.env.NODE_ENV&&Ms(!0!==this.shouldReduceMotion,"You have Reduced Motion enabled on your device. Animations may not appear as expected."),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){hr.delete(this.current),this.projection&&this.projection.unmount(),Gt(this.notifyUpdate),Gt(this.render),this.valueSubscriptions.forEach((t=>t())),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)this.features[t].unmount();this.current=null}bindToMotionValue(t,e){const n=W.has(t),s=e.on("change",(e=>{this.latestValues[t]=e,this.props.onUpdate&&Xt.update(this.notifyUpdate,!1,!0),n&&this.projection&&(this.projection.isTransformDirty=!0)})),i=e.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(t,(()=>{s(),i()}))}sortNodePosition(t){return this.current&&this.sortInstanceNodePosition&&this.type===t.type?this.sortInstanceNodePosition(this.current,t.current):0}loadFeatures({children:t,...e},n,s,i){let o,r;if("production"!==process.env.NODE_ENV&&s&&n){const t="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";e.ignoreStrict?Te(!1,t):Se(!1,t)}for(let t=0;t<pr;t++){const n=dr[t],{isEnabled:s,Feature:i,ProjectionNode:a,MeasureLayout:l}=D[n];a&&(o=a),s(e)&&(!this.features[n]&&i&&(this.features[n]=new i(this)),l&&(r=l))}if(("html"===this.type||"svg"===this.type)&&!this.projection&&o){this.projection=new o(this.latestValues,this.parent&&this.parent.projection);const{layoutId:t,layout:n,drag:s,dragConstraints:r,layoutScroll:a,layoutRoot:l}=e;this.projection.setOptions({layoutId:t,layout:n,alwaysMeasureLayout:Boolean(s)||r&&P(r),visualElement:this,scheduleRender:()=>this.scheduleRender(),animationType:"string"==typeof n?n:"both",initialPromotionConfig:i,layoutScroll:a,layoutRoot:l})}return r}updateFeatures(){for(const t in this.features){const e=this.features[t];e.isMounted?e.update():(e.mount(),e.isMounted=!0)}}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):yi()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,e){this.latestValues[t]=e}makeTargetAnimatable(t,e=!0){return this.makeTargetAnimatableFromInstance(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<mr.length;e++){const n=mr[e];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);const s=t["on"+n];s&&(this.propEventSubscriptions[n]=this.on(n,s))}this.prevMotionValues=function(t,e,n){const{willChange:s}=e;for(const i in e){const o=e[i],r=n[i];if(H(o))t.addValue(i,o),Ts(s)&&s.add(i),"development"===process.env.NODE_ENV&&Ms("11.0.8"===o.version,`Attempting to mix Framer Motion versions ${o.version} with 11.0.8 may not work as expected.`);else if(H(r))t.addValue(i,Rs(o,{owner:t})),Ts(s)&&s.remove(i);else if(r!==o)if(t.hasValue(i)){const e=t.getValue(i);!e.hasAnimated&&e.set(o)}else{const e=t.getStaticValue(i);t.addValue(i,Rs(void 0!==e?e:o,{owner:t}))}}for(const s in n)void 0===e[s]&&t.removeValue(s);return e}(this,this.scrapeMotionValuesFromProps(t,this.prevProps),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}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}getVariantContext(t=!1){if(t)return this.parent?this.parent.getVariantContext():void 0;if(!this.isControllingVariants){const t=this.parent&&this.parent.getVariantContext()||{};return void 0!==this.props.initial&&(t.initial=this.props.initial),t}const e={};for(let t=0;t<fr;t++){const n=S[t],s=this.props[n];(b(s)||!1===s)&&(e[n]=s)}return e}addVariantChild(t){const e=this.getClosestVariantNode();if(e)return e.variantChildren&&e.variantChildren.add(t),()=>e.variantChildren.delete(t)}addValue(t,e){e!==this.values.get(t)&&(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=Rs(e,{owner:this}),this.addValue(t,n)),n}readValue(t){var e;return void 0===this.latestValues[t]&&this.current?null!==(e=this.getBaseTargetFromProps(this.props,t))&&void 0!==e?e:this.readValueFromInstance(this.current,t,this.options):this.latestValues[t]}setBaseTarget(t,e){this.baseTarget[t]=e}getBaseTarget(t){var e;const{initial:n}=this.props,s="string"==typeof n||"object"==typeof n?null===(e=It(this.props,n))||void 0===e?void 0:e[t]:void 0;if(n&&void 0!==s)return s;const i=this.getBaseTargetFromProps(this.props,t);return void 0===i||H(i)?void 0!==this.initialValues[t]&&void 0===s?void 0:this.baseTarget[t]:i}on(t,e){return this.events[t]||(this.events[t]=new Vs),this.events[t].add(e)}notify(t,...e){this.events[t]&&this.events[t].notify(...e)}}class vr extends gr{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]}makeTargetAnimatableFromInstance({transition:t,transitionEnd:e,...n},s){const i=function(t,e,n){const s={};for(const i in t){const t=Os(i,e);if(void 0!==t)s[i]=t;else{const t=n.getValue(i);t&&(s[i]=t.get())}}return s}(n,t||{},this);if(s){!function(t,e,n){var s,i;const o=Object.keys(e).filter((e=>!t.hasValue(e))),r=o.length;var a;if(r)for(let l=0;l<r;l++){const r=o[l],u=e[r];let c=null;Array.isArray(u)&&(c=u[0]),null===c&&(c=null!==(i=null!==(s=n[r])&&void 0!==s?s:t.readValue(r))&&void 0!==i?i:e[r]),null!=c&&("string"==typeof c&&(Ss(c)||xs(c))?c=parseFloat(c):(a=c,!Fs.find(Ls(a))&&wn.test(u)&&(c=ys(r,u))),t.addValue(r,Rs(c,{owner:t})),void 0===n[r]&&(n[r]=c),null!==c&&t.setBaseTarget(r,c))}}(this,n,i);const t=lr(this,n,i,e);e=t.transitionEnd,n=t.target}return{transition:t,transitionEnd:e,...n}}}class yr extends vr{constructor(){super(...arguments),this.type="html"}readValueFromInstance(t,e){if(W.has(e)){const t=vs(e);return t&&t.default||0}{const s=(n=t,window.getComputedStyle(n)),i=(G(e)?s.getPropertyValue(e):s[e])||0;return"string"==typeof i?i.trim():i}var n}measureInstanceViewportBox(t,{transformPagePoint:e}){return Bi(t,e)}build(t,e,n,s){gt(t,e,n,s.transformTemplate)}scrapeMotionValuesFromProps(t,e){return Bt(t,e)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;H(t)&&(this.childSubscription=t.on("change",(t=>{this.current&&(this.current.textContent=`${t}`)})))}renderInstance(t,e,n,s){kt(t,e,n,s)}}class xr extends vr{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1}getBaseTargetFromProps(t,e){return t[e]}readValueFromInstance(t,e){if(W.has(e)){const t=vs(e);return t&&t.default||0}return e=jt.has(e)?e:h(e),t.getAttribute(e)}measureInstanceViewportBox(){return yi()}scrapeMotionValuesFromProps(t,e){return Ot(t,e)}build(t,e,n,s){Ct(t,e,n,this.isSVGTag,s.transformTemplate)}renderInstance(t,e,n,s){Ft(t,e,0,s)}mount(t){this.isSVGTag=Dt(t.tagName),super.mount(t)}}const Pr=(t,e)=>I(t)?new xr(e,{enableHardwareAcceleration:!1}):new yr(e,{enableHardwareAcceleration:!0}),br={..._s,...Pe,...qo,...{layout:{ProjectionNode:Go,MeasureLayout:Gi}}},wr=B(((t,e)=>function(t,{forwardMotionProps:e=!1},n,s){return{...I(t)?_t:Kt,preloadedFeatures:n,useRender:Lt(e),createVisualElement:s,Component:t}}(t,e,br,Pr)));function Tr(t){var e,n,s="";if("string"==typeof t||"number"==typeof t)s+=t;else if("object"==typeof t)if(Array.isArray(t)){var i=t.length;for(e=0;e<i;e++)t[e]&&(n=Tr(t[e]))&&(s&&(s+=" "),s+=n)}else for(n in t)t[n]&&(s&&(s+=" "),s+=n);return s}function Sr(){for(var t,e,n=0,s="",i=arguments.length;n<i;n++)(t=arguments[n])&&(e=Tr(t))&&(s&&(s+=" "),s+=e);return s}exports.TextField=function(n){var s=n.id,o=n.label,r=n.helper,a=n.error,l=n.register,u=n.name,c=n.type,h=n.prefix,d=n.suffix,p=n.disabled,m=n.value,f=n.className,g=n.rightContent,v=n.leftContent,y=function(){var e=t.useState({width:600,height:void 0}),n=e[0],s=e[1];return t.useEffect((function(){function t(){s({width:window.innerWidth||600,height:window.innerHeight})}return window.addEventListener("resize",t,{passive:!0}),t(),function(){return window.removeEventListener("resize",t)}}),[]),n}().width,x=t.useState(m||!1),P=x[0],b=x[1],w=y>768,T={focused:{fontSize:w?"1rem":"0.875rem",top:"1rem"},notFocused:{transform:"translateY(-50%)",fontSize:w?"1.25rem":"1.125rem",top:"50%"}};return t.createElement("div",{className:e.outer},t.createElement("div",{className:Sr(e.container,a&&e["container--error"])},t.createElement(wr.label,{className:e.label,initial:"notFocused",variants:T,htmlFor:"input-".concat(s),animate:P?"focused":"notFocused"},h&&t.createElement("span",null,h)," ",o," ",d&&t.createElement("span",null,d)),t.createElement("input",i({className:Sr(e["input--".concat(f)],e.input),id:"input-".concat(s),type:c,"aria-describedby":"error-".concat(s),disabled:p},(l&&l(u),{onFocus:function(){b(!0)},onBlur:function(t){b(!!t.target.value)}}),{value:m})),t.createElement("div",null,g&&t.createElement("div",{className:e.rightContent},g),v&&t.createElement("div",{className:e.leftContent},v))),t.createElement("div",{className:e.inputDescription},r&&t.createElement("span",{id:"feedback-".concat(s),className:e.helper},r.message),a&&t.createElement("span",{id:"error-".concat(s),className:e.error},a.message)))};
|
|
1
|
+
"use strict";var t=require("react");function e(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 n=e(t),i=function(){return i=Object.assign||function(t){for(var e,n=1,i=arguments.length;n<i;n++)for(var s in e=arguments[n])Object.prototype.hasOwnProperty.call(e,s)&&(t[s]=e[s]);return t},i.apply(this,arguments)};"function"==typeof SuppressedError&&SuppressedError;const s=t.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"}),o=t.createContext({}),r=t.createContext(null),a="undefined"!=typeof document,l=a?t.useLayoutEffect:t.useEffect,u=t.createContext({strict:!1}),c=t=>t.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),h="data-"+c("framerAppearId"),d=!1,p=!1;class m{constructor(){this.order=[],this.scheduled=new Set}add(t){if(!this.scheduled.has(t))return this.scheduled.add(t),this.order.push(t),!0}remove(t){const e=this.order.indexOf(t);-1!==e&&(this.order.splice(e,1),this.scheduled.delete(t))}clear(){this.order.length=0,this.scheduled.clear()}}const f=["prepare","read","update","preRender","render","postRender"];function g(t,e){let n=!1,i=!0;const s={delta:0,timestamp:0,isProcessing:!1},o=f.reduce(((t,e)=>(t[e]=function(t){let e=new m,n=new m,i=0,s=!1,o=!1;const r=new WeakSet,a={schedule:(t,o=!1,a=!1)=>{const l=a&&s,u=l?e:n;return o&&r.add(t),u.add(t)&&l&&s&&(i=e.order.length),t},cancel:t=>{n.remove(t),r.delete(t)},process:l=>{if(s)o=!0;else{if(s=!0,[e,n]=[n,e],n.clear(),i=e.order.length,i)for(let n=0;n<i;n++){const i=e.order[n];r.has(i)&&(a.schedule(i),t()),i(l)}s=!1,o&&(o=!1,a.process(l))}}};return a}((()=>n=!0)),t)),{}),r=t=>{o[t].process(s)},a=()=>{const o=performance.now();n=!1,s.delta=i?1e3/60:Math.max(Math.min(o-s.timestamp,40),1),s.timestamp=o,s.isProcessing=!0,f.forEach(r),s.isProcessing=!1,n&&e&&(i=!1,t(a))};return{schedule:f.reduce(((e,r)=>{const l=o[r];return e[r]=(e,o=!1,r=!1)=>(n||(n=!0,i=!0,s.isProcessing||t(a)),l.schedule(e,o,r)),e}),{}),cancel:t=>f.forEach((e=>o[e].cancel(t))),state:s,steps:o}}const{schedule:v,cancel:y}=g(queueMicrotask,!1);function x(t){return t&&"object"==typeof t&&Object.prototype.hasOwnProperty.call(t,"current")}function b(t){return"string"==typeof t||Array.isArray(t)}function P(t){return null!==t&&"object"==typeof t&&"function"==typeof t.start}const w=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],T=["initial",...w];function E(t){return P(t.animate)||T.some((e=>b(t[e])))}function S(t){return Boolean(E(t)||t.variants)}function A(e){const{initial:n,animate:i}=function(t,e){if(E(t)){const{initial:e,animate:n}=t;return{initial:!1===e||b(e)?e:void 0,animate:b(n)?n:void 0}}return!1!==t.inherit?e:{}}(e,t.useContext(o));return t.useMemo((()=>({initial:n,animate:i})),[C(n),C(i)])}function C(t){return Array.isArray(t)?t.join(" "):t}const V={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"]},M={};for(const t in V)M[t]={isEnabled:e=>V[t].some((t=>!!e[t]))};const D=t.createContext({}),F=t.createContext({}),R=Symbol.for("motionComponentSymbol");function k({preloadedFeatures:e,createVisualElement:i,useRender:c,useVisualState:d,Component:p}){e&&function(t){for(const e in t)M[e]={...M[e],...t[e]}}(e);const m=t.forwardRef((function(m,f){let g;const y={...t.useContext(s),...m,layoutId:L(m)},{isStatic:b}=y,P=A(m),w=d(m,b);if(!b&&a){P.visualElement=function(e,n,i,a){const{visualElement:c}=t.useContext(o),d=t.useContext(u),p=t.useContext(r),m=t.useContext(s).reducedMotion,f=t.useRef();a=a||d.renderer,!f.current&&a&&(f.current=a(e,{visualState:n,parent:c,props:i,presenceContext:p,blockInitialAnimation:!!p&&!1===p.initial,reducedMotionConfig:m}));const g=f.current;t.useInsertionEffect((()=>{g&&g.update(i,p)}));const y=t.useRef(Boolean(i[h]&&!window.HandoffComplete));return l((()=>{g&&(v.postRender(g.render),y.current&&g.animationState&&g.animationState.animateChanges())})),t.useEffect((()=>{g&&(g.updateFeatures(),!y.current&&g.animationState&&g.animationState.animateChanges(),y.current&&(y.current=!1,window.HandoffComplete=!0))})),g}(p,w,y,i);const n=t.useContext(F),a=t.useContext(u).strict;P.visualElement&&(g=P.visualElement.loadFeatures(y,a,e,n))}return n.createElement(o.Provider,{value:P},g&&P.visualElement?n.createElement(g,{visualElement:P.visualElement,...y}):null,c(p,m,function(e,n,i){return t.useCallback((t=>{t&&e.mount&&e.mount(t),n&&(t?n.mount(t):n.unmount()),i&&("function"==typeof i?i(t):x(i)&&(i.current=t))}),[n])}(w,P.visualElement,f),w,b,P.visualElement))}));return m[R]=p,m}function L({layoutId:e}){const n=t.useContext(D).id;return n&&void 0!==e?n+"-"+e:e}function j(t){function e(e,n={}){return k(t(e,n))}if("undefined"==typeof Proxy)return e;const n=new Map;return new Proxy(e,{get:(t,i)=>(n.has(i)||n.set(i,e(i)),n.get(i))})}const B=["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 O(t){return"string"==typeof t&&!t.includes("-")&&!!(B.indexOf(t)>-1||/[A-Z]/.test(t))}const _={};const I=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],U=new Set(I);function N(t,{layout:e,layoutId:n}){return U.has(t)||t.startsWith("origin")||(e||void 0!==n)&&(!!_[t]||"opacity"===t)}const W=t=>Boolean(t&&t.getVelocity),$={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},z=I.length;const H=t=>e=>"string"==typeof e&&e.startsWith(t),X=H("--"),Y=H("var(--"),G=t=>!!Y(t)&&q.test(t.split("/*")[0].trim()),q=/var\s*\(\s*--[\w-]+(\s*,\s*(?:(?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)+)?\s*\)$/i,Z=(t,e)=>e&&"number"==typeof t?e.transform(t):t,J=(t,e,n)=>n>e?e:n<t?t:n,Q={test:t=>"number"==typeof t,parse:parseFloat,transform:t=>t},K={...Q,transform:t=>J(0,1,t)},tt={...Q,default:1},et=t=>Math.round(1e5*t)/1e5,nt=/(-)?([\d]*\.?[\d])+/g,it=/(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,st=/^(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function ot(t){return"string"==typeof t}const rt=t=>({test:e=>ot(e)&&e.endsWith(t)&&1===e.split(" ").length,parse:parseFloat,transform:e=>`${e}${t}`}),at=rt("deg"),lt=rt("%"),ut=rt("px"),ct=rt("vh"),ht=rt("vw"),dt={...lt,parse:t=>lt.parse(t)/100,transform:t=>lt.transform(100*t)},pt={...Q,transform:Math.round},mt={borderWidth:ut,borderTopWidth:ut,borderRightWidth:ut,borderBottomWidth:ut,borderLeftWidth:ut,borderRadius:ut,radius:ut,borderTopLeftRadius:ut,borderTopRightRadius:ut,borderBottomRightRadius:ut,borderBottomLeftRadius:ut,width:ut,maxWidth:ut,height:ut,maxHeight:ut,size:ut,top:ut,right:ut,bottom:ut,left:ut,padding:ut,paddingTop:ut,paddingRight:ut,paddingBottom:ut,paddingLeft:ut,margin:ut,marginTop:ut,marginRight:ut,marginBottom:ut,marginLeft:ut,rotate:at,rotateX:at,rotateY:at,rotateZ:at,scale:tt,scaleX:tt,scaleY:tt,scaleZ:tt,skew:at,skewX:at,skewY:at,distance:ut,translateX:ut,translateY:ut,translateZ:ut,x:ut,y:ut,z:ut,perspective:ut,transformPerspective:ut,opacity:K,originX:dt,originY:dt,originZ:ut,zIndex:pt,fillOpacity:K,strokeOpacity:K,numOctaves:pt};function ft(t,e,n,i){const{style:s,vars:o,transform:r,transformOrigin:a}=t;let l=!1,u=!1,c=!0;for(const t in e){const n=e[t];if(X(t)){o[t]=n;continue}const i=mt[t],h=Z(n,i);if(U.has(t)){if(l=!0,r[t]=h,!c)continue;n!==(i.default||0)&&(c=!1)}else t.startsWith("origin")?(u=!0,a[t]=h):s[t]=h}if(e.transform||(l||i?s.transform=function(t,{enableHardwareAcceleration:e=!0,allowTransformNone:n=!0},i,s){let o="";for(let e=0;e<z;e++){const n=I[e];void 0!==t[n]&&(o+=`${$[n]||n}(${t[n]}) `)}return e&&!t.z&&(o+="translateZ(0)"),o=o.trim(),s?o=s(t,i?"":o):n&&i&&(o="none"),o}(t.transform,n,c,i):s.transform&&(s.transform="none")),u){const{originX:t="50%",originY:e="50%",originZ:n=0}=a;s.transformOrigin=`${t} ${e} ${n}`}}const gt=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function vt(t,e,n){for(const i in e)W(e[i])||N(i,n)||(t[i]=e[i])}function yt(e,n,i){const s={};return vt(s,e.style||{},e),Object.assign(s,function({transformTemplate:e},n,i){return t.useMemo((()=>{const t=gt();return ft(t,n,{enableHardwareAcceleration:!i},e),Object.assign({},t.vars,t.style)}),[n])}(e,n,i)),s}function xt(t,e,n){const i={},s=yt(t,e,n);return t.drag&&!1!==t.dragListener&&(i.draggable=!1,s.userSelect=s.WebkitUserSelect=s.WebkitTouchCallout="none",s.touchAction=!0===t.drag?"none":"pan-"+("x"===t.drag?"y":"x")),void 0===t.tabIndex&&(t.onTap||t.onTapStart||t.whileTap)&&(i.tabIndex=0),i.style=s,i}const bt=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 Pt(t){return t.startsWith("while")||t.startsWith("drag")&&"draggable"!==t||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||bt.has(t)}let wt=t=>!Pt(t);try{(Tt=require("@emotion/is-prop-valid").default)&&(wt=t=>t.startsWith("on")?!Pt(t):Tt(t))}catch(t){}var Tt;function Et(t,e,n){return"string"==typeof t?t:ut.transform(e+n*t)}const St={offset:"stroke-dashoffset",array:"stroke-dasharray"},At={offset:"strokeDashoffset",array:"strokeDasharray"};function Ct(t,{attrX:e,attrY:n,attrScale:i,originX:s,originY:o,pathLength:r,pathSpacing:a=1,pathOffset:l=0,...u},c,h,d){if(ft(t,u,c,d),h)return void(t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox));t.attrs=t.style,t.style={};const{attrs:p,style:m,dimensions:f}=t;p.transform&&(f&&(m.transform=p.transform),delete p.transform),f&&(void 0!==s||void 0!==o||m.transform)&&(m.transformOrigin=function(t,e,n){return`${Et(e,t.x,t.width)} ${Et(n,t.y,t.height)}`}(f,void 0!==s?s:.5,void 0!==o?o:.5)),void 0!==e&&(p.x=e),void 0!==n&&(p.y=n),void 0!==i&&(p.scale=i),void 0!==r&&function(t,e,n=1,i=0,s=!0){t.pathLength=1;const o=s?St:At;t[o.offset]=ut.transform(-i);const r=ut.transform(e),a=ut.transform(n);t[o.array]=`${r} ${a}`}(p,r,a,l,!1)}const Vt=()=>({...gt(),attrs:{}}),Mt=t=>"string"==typeof t&&"svg"===t.toLowerCase();function Dt(e,n,i,s){const o=t.useMemo((()=>{const t=Vt();return Ct(t,n,{enableHardwareAcceleration:!1},Mt(s),e.transformTemplate),{...t.attrs,style:{...t.style}}}),[n]);if(e.style){const t={};vt(t,e.style,e),o.style={...t,...o.style}}return o}function Ft(e=!1){return(n,i,s,{latestValues:o},r)=>{const a=(O(n)?Dt:xt)(i,o,r,n),l=function(t,e,n){const i={};for(const s in t)"values"===s&&"object"==typeof t.values||(wt(s)||!0===n&&Pt(s)||!e&&!Pt(s)||t.draggable&&s.startsWith("onDrag"))&&(i[s]=t[s]);return i}(i,"string"==typeof n,e),u=n!==t.Fragment?{...l,...a,ref:s}:{},{children:c}=i,h=t.useMemo((()=>W(c)?c.get():c),[c]);return t.createElement(n,{...u,children:h})}}function Rt(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])}const kt=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function Lt(t,e,n,i){Rt(t,e,void 0,i);for(const n in e.attrs)t.setAttribute(kt.has(n)?n:c(n),e.attrs[n])}function jt(t,e){const{style:n}=t,i={};for(const s in n)(W(n[s])||e.style&&W(e.style[s])||N(s,t))&&(i[s]=n[s]);return i}function Bt(t,e){const n=jt(t,e);for(const i in t)if(W(t[i])||W(e[i])){n[-1!==I.indexOf(i)?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i]=t[i]}return n}function Ot(t,e,n,i={},s={}){return"function"==typeof e&&(e=e(void 0!==n?n:t.custom,i,s)),"string"==typeof e&&(e=t.variants&&t.variants[e]),"function"==typeof e&&(e=e(void 0!==n?n:t.custom,i,s)),e}const _t=t=>Array.isArray(t),It=t=>Boolean(t&&"object"==typeof t&&t.mix&&t.toValue),Ut=t=>_t(t)?t[t.length-1]||0:t;function Nt(t){const e=W(t)?t.get():t;return It(e)?e.toValue():e}const Wt=e=>(n,i)=>{const s=t.useContext(o),a=t.useContext(r),l=()=>function({scrapeMotionValuesFromProps:t,createRenderState:e,onMount:n},i,s,o){const r={latestValues:$t(i,s,o,t),renderState:e()};return n&&(r.mount=t=>n(i,t,r)),r}(e,n,s,a);return i?l():function(e){const n=t.useRef(null);return null===n.current&&(n.current=e()),n.current}(l)};function $t(t,e,n,i){const s={},o=i(t,{});for(const t in o)s[t]=Nt(o[t]);let{initial:r,animate:a}=t;const l=E(t),u=S(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&&!P(h)){(Array.isArray(h)?h:[h]).forEach((e=>{const n=Ot(t,e);if(!n)return;const{transitionEnd:i,transition:o,...r}=n;for(const t in r){let e=r[t];if(Array.isArray(e)){e=e[c?e.length-1:0]}null!==e&&(s[t]=e)}for(const t in i)s[t]=i[t]}))}return s}const zt=t=>t,{schedule:Ht,cancel:Xt,state:Yt,steps:Gt}=g("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:zt,!0),qt={useVisualState:Wt({scrapeMotionValuesFromProps:Bt,createRenderState:Vt,onMount:(t,e,{renderState:n,latestValues:i})=>{Ht.read((()=>{try{n.dimensions="function"==typeof e.getBBox?e.getBBox():e.getBoundingClientRect()}catch(t){n.dimensions={x:0,y:0,width:0,height:0}}})),Ht.render((()=>{Ct(n,i,{enableHardwareAcceleration:!1},Mt(e.tagName),t.transformTemplate),Lt(e,n)}))}})},Zt={useVisualState:Wt({scrapeMotionValuesFromProps:jt,createRenderState:gt})};function Jt(t,e,n,i={passive:!0}){return t.addEventListener(e,n,i),()=>t.removeEventListener(e,n)}const Qt=t=>"mouse"===t.pointerType?"number"!=typeof t.button||t.button<=0:!1!==t.isPrimary;function Kt(t,e="page"){return{point:{x:t[e+"X"],y:t[e+"Y"]}}}const te=t=>e=>Qt(e)&&t(e,Kt(e));function ee(t,e,n,i){return Jt(t,e,te(n),i)}const ne=(t,e)=>n=>e(t(n)),ie=(...t)=>t.reduce(ne);function se(t){let e=null;return()=>{const n=()=>{e=null};return null===e&&(e=t,n)}}const oe=se("dragHorizontal"),re=se("dragVertical");function ae(t){let e=!1;if("y"===t)e=re();else if("x"===t)e=oe();else{const t=oe(),n=re();t&&n?e=()=>{t(),n()}:(t&&t(),n&&n())}return e}function le(){const t=ae(!0);return!t||(t(),!1)}class ue{constructor(t){this.isMounted=!1,this.node=t}update(){}}function ce(t,e){const n="pointer"+(e?"enter":"leave"),i="onHover"+(e?"Start":"End");return ee(t.current,n,((n,s)=>{if("touch"===n.pointerType||le())return;const o=t.getProps();t.animationState&&o.whileHover&&t.animationState.setActive("whileHover",e),o[i]&&Ht.update((()=>o[i](n,s)))}),{passive:!t.getProps()[i]})}const he=(t,e)=>!!e&&(t===e||he(t,e.parentElement));function de(t,e){if(!e)return;const n=new PointerEvent("pointer"+t);e(n,Kt(n))}const pe=new WeakMap,me=new WeakMap,fe=t=>{const e=pe.get(t.target);e&&e(t)},ge=t=>{t.forEach(fe)};function ve(t,e,n){const i=function({root:t,...e}){const n=t||document;me.has(n)||me.set(n,{});const i=me.get(n),s=JSON.stringify(e);return i[s]||(i[s]=new IntersectionObserver(ge,{root:t,...e})),i[s]}(e);return pe.set(t,n),i.observe(t),()=>{pe.delete(t),i.unobserve(t)}}const ye={some:0,all:1};const xe={inView:{Feature:class extends ue{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:ye[i]};return ve(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 ue{constructor(){super(...arguments),this.removeStartListeners=zt,this.removeEndListeners=zt,this.removeAccessibleListeners=zt,this.startPointerPress=(t,e)=>{if(this.isPressing)return;this.removeEndListeners();const n=this.node.getProps(),i=ee(window,"pointerup",((t,e)=>{if(!this.checkPressEnd())return;const{onTap:n,onTapCancel:i,globalTapTarget:s}=this.node.getProps();Ht.update((()=>{s||he(this.node.current,t.target)?n&&n(t,e):i&&i(t,e)}))}),{passive:!(n.onTap||n.onPointerUp)}),s=ee(window,"pointercancel",((t,e)=>this.cancelPress(t,e)),{passive:!(n.onTapCancel||n.onPointerCancel)});this.removeEndListeners=ie(i,s),this.startPress(t,e)},this.startAccessiblePress=()=>{const t=Jt(this.node.current,"keydown",(t=>{if("Enter"!==t.key||this.isPressing)return;this.removeEndListeners(),this.removeEndListeners=Jt(this.node.current,"keyup",(t=>{"Enter"===t.key&&this.checkPressEnd()&&de("up",((t,e)=>{const{onTap:n}=this.node.getProps();n&&Ht.update((()=>n(t,e)))}))})),de("down",((t,e)=>{this.startPress(t,e)}))})),e=Jt(this.node.current,"blur",(()=>{this.isPressing&&de("cancel",((t,e)=>this.cancelPress(t,e)))}));this.removeAccessibleListeners=ie(t,e)}}startPress(t,e){this.isPressing=!0;const{onTapStart:n,whileTap:i}=this.node.getProps();i&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),n&&Ht.update((()=>n(t,e)))}checkPressEnd(){this.removeEndListeners(),this.isPressing=!1;return this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!le()}cancelPress(t,e){if(!this.checkPressEnd())return;const{onTapCancel:n}=this.node.getProps();n&&Ht.update((()=>n(t,e)))}mount(){const t=this.node.getProps(),e=ee(t.globalTapTarget?window:this.node.current,"pointerdown",this.startPointerPress,{passive:!(t.onTapStart||t.onPointerStart)}),n=Jt(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=ie(e,n)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}},focus:{Feature:class extends ue{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=ie(Jt(this.node.current,"focus",(()=>this.onFocus())),Jt(this.node.current,"blur",(()=>this.onBlur())))}unmount(){}}},hover:{Feature:class extends ue{mount(){this.unmount=ie(ce(this.node,!0),ce(this.node,!1))}unmount(){}}}};function be(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 Pe(t,e,n){const i=t.getProps();return Ot(i,e,void 0!==n?n:i.custom,function(t){const e={};return t.values.forEach(((t,n)=>e[n]=t.get())),e}(t),function(t){const e={};return t.values.forEach(((t,n)=>e[n]=t.getVelocity())),e}(t))}let we=zt,Te=zt;"production"!==process.env.NODE_ENV&&(we=(t,e)=>{t||"undefined"==typeof console||console.warn(e)},Te=(t,e)=>{if(!t)throw new Error(e)});const Ee=t=>1e3*t,Se=t=>t/1e3,Ae=!1,Ce=t=>Array.isArray(t)&&"number"==typeof t[0];function Ve(t){return Boolean(!t||"string"==typeof t&&De[t]||Ce(t)||Array.isArray(t)&&t.every(Ve))}const Me=([t,e,n,i])=>`cubic-bezier(${t}, ${e}, ${n}, ${i})`,De={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Me([0,.65,.55,1]),circOut:Me([.55,0,1,.45]),backIn:Me([.31,.01,.66,-.59]),backOut:Me([.33,1.53,.69,.99])};function Fe(t){if(t)return Ce(t)?Me(t):Array.isArray(t)?t.map(Fe):De[t]}const Re=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,ke=1e-7,Le=12;function je(t,e,n,i){if(t===e&&n===i)return zt;const s=e=>function(t,e,n,i,s){let o,r,a=0;do{r=e+(n-e)/2,o=Re(r,i,s)-t,o>0?n=r:e=r}while(Math.abs(o)>ke&&++a<Le);return r}(e,0,1,t,n);return t=>0===t||1===t?t:Re(s(t),e,i)}const Be=je(.42,0,1,1),Oe=je(0,0,.58,1),_e=je(.42,0,.58,1),Ie=t=>Array.isArray(t)&&"number"!=typeof t[0],Ue=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,Ne=t=>e=>1-t(1-e),We=t=>1-Math.sin(Math.acos(t)),$e=Ne(We),ze=Ue(We),He=je(.33,1.53,.69,.99),Xe=Ne(He),Ye=Ue(Xe),Ge={linear:zt,easeIn:Be,easeInOut:_e,easeOut:Oe,circIn:We,circInOut:ze,circOut:$e,backIn:Xe,backInOut:Ye,backOut:He,anticipate:t=>(t*=2)<1?.5*Xe(t):.5*(2-Math.pow(2,-10*(t-1)))},qe=t=>{if(Array.isArray(t)){Te(4===t.length,"Cubic bezier arrays must contain four numerical values.");const[e,n,i,s]=t;return je(e,n,i,s)}return"string"==typeof t?(Te(void 0!==Ge[t],`Invalid easing type '${t}'`),Ge[t]):t},Ze=(t,e,n)=>{const i=e-t;return 0===i?1:(n-t)/i},Je=(t,e,n)=>t+(e-t)*n;function Qe(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}const Ke=(t,e)=>n=>Boolean(ot(n)&&st.test(n)&&n.startsWith(t)||e&&Object.prototype.hasOwnProperty.call(n,e)),tn=(t,e,n)=>i=>{if(!ot(i))return i;const[s,o,r,a]=i.match(nt);return{[t]:parseFloat(s),[e]:parseFloat(o),[n]:parseFloat(r),alpha:void 0!==a?parseFloat(a):1}},en={...Q,transform:t=>Math.round((t=>J(0,255,t))(t))},nn={test:Ke("rgb","red"),parse:tn("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:i=1})=>"rgba("+en.transform(t)+", "+en.transform(e)+", "+en.transform(n)+", "+et(K.transform(i))+")"};const sn={test:Ke("#"),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:nn.transform},on={test:Ke("hsl","hue"),parse:tn("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:i=1})=>"hsla("+Math.round(t)+", "+lt.transform(et(e))+", "+lt.transform(et(n))+", "+et(K.transform(i))+")"},rn=(t,e,n)=>{const i=t*t,s=n*(e*e-i)+i;return s<0?0:Math.sqrt(s)},an=[sn,nn,on];function ln(t){const e=(n=t,an.find((t=>t.test(n))));var n;Te(Boolean(e),`'${t}' is not an animatable color. Use the equivalent color code instead.`);let i=e.parse(t);return e===on&&(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=Qe(a,i,t+1/3),o=Qe(a,i,t),r=Qe(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 un=(t,e)=>{const n=ln(t),i=ln(e),s={...n};return t=>(s.red=rn(n.red,i.red,t),s.green=rn(n.green,i.green,t),s.blue=rn(n.blue,i.blue,t),s.alpha=Je(n.alpha,i.alpha,t),nn.transform(s))},cn={test:t=>nn.test(t)||sn.test(t)||on.test(t),parse:t=>nn.test(t)?nn.parse(t):on.test(t)?on.parse(t):sn.parse(t),transform:t=>ot(t)?t:t.hasOwnProperty("red")?nn.transform(t):on.transform(t)};const hn="number",dn="color",pn="var",mn="var(",fn="${}",gn=/(var\s*\(\s*--[\w-]+(\s*,\s*(?:(?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)+)?\s*\))|(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))|((-)?([\d]*\.?[\d])+)/gi;function vn(t){const e=t.toString(),n=e.match(gn)||[],i=[],s={color:[],number:[],var:[]},o=[];for(let t=0;t<n.length;t++){const e=n[t];cn.test(e)?(s.color.push(t),o.push(dn),i.push(cn.parse(e))):e.startsWith(mn)?(s.var.push(t),o.push(pn),i.push(e)):(s.number.push(t),o.push(hn),i.push(parseFloat(e)))}return{values:i,split:e.replace(gn,fn).split(fn),indexes:s,types:o}}function yn(t){return vn(t).values}function xn(t){const{split:e,types:n}=vn(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+=e===hn?et(t[o]):e===dn?cn.transform(t[o]):t[o]}return s}}const bn=t=>"number"==typeof t?0:t;const Pn={test:function(t){var e,n;return isNaN(t)&&ot(t)&&((null===(e=t.match(nt))||void 0===e?void 0:e.length)||0)+((null===(n=t.match(it))||void 0===n?void 0:n.length)||0)>0},parse:yn,createTransformer:xn,getAnimatableNone:function(t){const e=yn(t);return xn(t)(e.map(bn))}};function wn(t,e){return n=>n>0?e:t}function Tn(t,e){return n=>Je(t,e,n)}function En(t){return"number"==typeof t?Tn:"string"==typeof t?G(t)?wn:cn.test(t)?un:Cn:Array.isArray(t)?Sn:"object"==typeof t?cn.test(t)?un:An:wn}function Sn(t,e){const n=[...t],i=n.length,s=t.map(((t,n)=>En(t)(t,e[n])));return t=>{for(let e=0;e<i;e++)n[e]=s[e](t);return n}}function An(t,e){const n={...t,...e},i={};for(const s in n)void 0!==t[s]&&void 0!==e[s]&&(i[s]=En(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=Pn.createTransformer(e),i=vn(t),s=vn(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?ie(Sn(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):(we(!0,`Complex values '${t}' and '${e}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),wn(t,e))};function Vn(t,e,n){if("number"==typeof t&&"number"==typeof e&&"number"==typeof n)return Je(t,e,n);return En(t)(t,e)}function Mn(t,e,{clamp:n=!0,ease:i,mixer:s}={}){const o=t.length;if(Te(o===e.length,"Both input and output ranges must be the same length"),1===o)return()=>e[0];t[0]>t[o-1]&&(t=[...t].reverse(),e=[...e].reverse());const r=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]||zt:e;o=ie(t,o)}i.push(o)}return i}(e,i,s),a=r.length,l=e=>{let n=0;if(a>1)for(;n<t.length-2&&!(e<t[n+1]);n++);const i=Ze(t[n],t[n+1],e);return r[n](i)};return n?e=>l(J(t[0],t[o-1],e)):l}function Dn(t){const e=[0];return function(t,e){const n=t[t.length-1];for(let i=1;i<=e;i++){const s=Ze(0,e,i);t.push(Je(n,1,s))}}(e,t.length-1),e}function Fn({duration:t=300,keyframes:e,times:n,ease:i="easeInOut"}){const s=Ie(i)?i.map(qe):qe(i),o={done:!1,value:e[0]},r=function(t,e){return t.map((t=>t*e))}(n&&n.length===e.length?n:Dn(e),t),a=Mn(r,e,{ease:Array.isArray(s)?s:(l=e,u=s,l.map((()=>u||_e)).splice(0,l.length-1))});var l,u;return{calculatedDuration:t,next:e=>(o.value=a(e),o.done=e>=t,o)}}function Rn(t,e){return e?t*(1e3/e):0}const kn=5;function Ln(t,e,n){const i=Math.max(e-kn,0);return Rn(n-t(i),e-i)}const jn=.001,Bn=.01,On=10,_n=.05,In=1;function Un({duration:t=800,bounce:e=.25,velocity:n=0,mass:i=1}){let s,o;we(t<=Ee(On),"Spring duration must be 10 seconds or less");let r=1-e;r=J(_n,In,r),t=J(Bn,On,Se(t)),r<1?(s=e=>{const i=e*r,s=i*t,o=i-n,a=Wn(e,r),l=Math.exp(-s);return jn-o/a*l},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=Wn(Math.pow(e,2),r);return(-s(e)+jn>0?-1:1)*((o-a)*l)/u}):(s=e=>Math.exp(-e*t)*((e-n)*t+1)-jn,o=e=>Math.exp(-e*t)*(t*t*(n-e)));const a=function(t,e,n){let i=n;for(let n=1;n<Nn;n++)i-=t(i)/e(i);return i}(s,o,5/t);if(t=Ee(t),isNaN(a))return{stiffness:100,damping:10,duration:t};{const e=Math.pow(a,2)*i;return{stiffness:e,damping:2*r*Math.sqrt(i*e),duration:t}}}const Nn=12;function Wn(t,e){return t*Math.sqrt(1-e*e)}const $n=["duration","bounce"],zn=["stiffness","damping","mass"];function Hn(t,e){return e.some((e=>void 0!==t[e]))}function Xn({keyframes:t,restDelta:e,restSpeed:n,...i}){const s=t[0],o=t[t.length-1],r={done:!1,value:s},{stiffness:a,damping:l,mass:u,duration:c,velocity:h,isResolvedFromDuration:d}=function(t){let e={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...t};if(!Hn(t,zn)&&Hn(t,$n)){const n=Un(t);e={...e,...n,mass:1},e.isResolvedFromDuration=!0}return e}({...i,velocity:-Se(i.velocity||0)}),p=h||0,m=l/(2*Math.sqrt(a*u)),f=o-s,g=Se(Math.sqrt(a/u)),v=Math.abs(f)<5;let y;if(n||(n=v?.01:2),e||(e=v?.005:.5),m<1){const t=Wn(g,m);y=e=>{const n=Math.exp(-m*g*e);return o-n*((p+m*g*f)/t*Math.sin(t*e)+f*Math.cos(t*e))}}else if(1===m)y=t=>o-Math.exp(-g*t)*(f+(p+g*f)*t);else{const t=g*Math.sqrt(m*m-1);y=e=>{const n=Math.exp(-m*g*e),i=Math.min(t*e,300);return o-n*((p+m*g*f)*Math.sinh(i)+t*f*Math.cosh(i))/t}}return{calculatedDuration:d&&c||null,next:t=>{const i=y(t);if(d)r.done=t>=c;else{let s=p;0!==t&&(s=m<1?Ln(y,t,i):0);const a=Math.abs(s)<=n,l=Math.abs(o-i)<=e;r.done=a&&l}return r.value=r.done?o:i,r}}}function Yn({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 v=t=>-m*Math.exp(-t/i),y=t=>g+v(t),x=t=>{const e=v(t),n=y(t);d.done=Math.abs(e)<=u,d.value=d.done?g:n};let b,P;const w=t=>{var e;(e=d.value,void 0!==a&&e<a||void 0!==l&&e>l)&&(b=t,P=Xn({keyframes:[d.value,p(d.value)],velocity:Ln(y,t,d.value),damping:s,stiffness:o,restDelta:u,restSpeed:c}))};return w(0),{calculatedDuration:null,next:t=>{let e=!1;return P||void 0!==b||(e=!0,x(t),w(t)),void 0!==b&&t>b?P.next(t-b):(!e&&x(t),d)}}}let Gn;function qn(){Gn=void 0}const Zn={now:()=>(void 0===Gn&&Zn.set(Yt.isProcessing||p?Yt.timestamp:performance.now()),Gn),set:t=>{Gn=t,queueMicrotask(qn)}},Jn=t=>{const e=({timestamp:e})=>t(e);return{start:()=>Ht.update(e,!0),stop:()=>Xt(e),now:()=>Yt.isProcessing?Yt.timestamp:Zn.now()}},Qn=2e4;function Kn(t){let e=0;let n=t.next(e);for(;!n.done&&e<Qn;)e+=50,n=t.next(e);return e>=Qn?1/0:e}const ti={decay:Yn,inertia:Yn,tween:Fn,keyframes:Fn,spring:Xn},ei=t=>t/100;function ni({autoplay:t=!0,delay:e=0,driver:n=Jn,keyframes:i,type:s="keyframes",repeat:o=0,repeatDelay:r=0,repeatType:a="loop",onPlay:l,onStop:u,onComplete:c,onUpdate:h,...d}){let p,m,f=1,g=!1;const v=()=>{m=new Promise((t=>{p=t}))};let y;v();const x=ti[s]||Fn;let b;x!==Fn&&"number"!=typeof i[0]&&("production"!==process.env.NODE_ENV&&Te(2===i.length,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${i}`),b=ie(ei,Vn(i[0],i[1])),i=[0,100]);const P=x({...d,keyframes:i});let w;"mirror"===a&&(w=x({...d,keyframes:[...i].reverse(),velocity:-(d.velocity||0)}));let T="idle",E=null,S=null,A=null;null===P.calculatedDuration&&o&&(P.calculatedDuration=Kn(P));const{calculatedDuration:C}=P;let V=1/0,M=1/0;null!==C&&(V=C+r,M=V*(o+1)-r);let D=0;const F=t=>{if(null===S)return;f>0&&(S=Math.min(S,t)),f<0&&(S=Math.min(t-M/f,S)),D=null!==E?E:Math.round(t-S)*f;const n=D-e*(f>=0?1:-1),s=f>=0?n<0:n>M;D=Math.max(n,0),"finished"===T&&null===E&&(D=M);let l=D,u=P;if(o){const t=Math.min(D,M)/V;let e=Math.floor(t),n=t%1;!n&&t>=1&&(n=1),1===n&&e--,e=Math.min(e,o+1);Boolean(e%2)&&("reverse"===a?(n=1-n,r&&(n-=r/V)):"mirror"===a&&(u=w)),l=J(0,1,n)*V}const c=s?{done:!1,value:i[0]}:u.next(l);b&&(c.value=b(c.value));let{done:d}=c;s||null===C||(d=f>=0?D>=M:D<=0);const p=null===E&&("finished"===T||"running"===T&&d);return h&&h(c.value),p&&L(),c},R=()=>{y&&y.stop(),y=void 0},k=()=>{T="idle",R(),p(),v(),S=A=null},L=()=>{T="finished",c&&c(),R(),p()},j=()=>{if(g)return;y||(y=n(F));const t=y.now();l&&l(),null!==E?S=t-E:S&&"finished"!==T||(S=t),"finished"===T&&v(),A=S,E=null,T="running",y.start()};t&&j();const B={then:(t,e)=>m.then(t,e),get time(){return Se(D)},set time(t){t=Ee(t),D=t,null===E&&y&&0!==f?S=y.now()-t/f:E=t},get duration(){const t=null===P.calculatedDuration?Kn(P):P.calculatedDuration;return Se(t)},get speed(){return f},set speed(t){t!==f&&y&&(f=t,B.time=Se(D))},get state(){return T},play:j,pause:()=>{T="paused",E=D},stop:()=>{g=!0,"idle"!==T&&(T="idle",u&&u(),k())},cancel:()=>{null!==A&&F(A),k()},complete:()=>{T="finished"},sample:t=>(S=0,F(t))};return B}const ii=function(t){let e;return()=>(void 0===e&&(e=t()),e)}((()=>Object.hasOwnProperty.call(Element.prototype,"animate"))),si=new Set(["opacity","clipPath","filter","transform"]);function oi(t,e,{onUpdate:n,onComplete:i,...s}){if(!(ii()&&si.has(e)&&!s.repeatDelay&&"mirror"!==s.repeatType&&0!==s.damping&&"inertia"!==s.type))return!1;let o,r,a=!1,l=!1;const u=()=>{r=new Promise((t=>{o=t}))};u();let{keyframes:c,duration:h=300,ease:d,times:p}=s;if(((t,e)=>"spring"===e.type||"backgroundColor"===t||!Ve(e.ease))(e,s)){const t=ni({...s,repeat:0,delay:0});let e={done:!1,value:c[0]};const n=[];let i=0;for(;!e.done&&i<2e4;)e=t.sample(i),n.push(e.value),i+=10;p=void 0,c=n,h=i-10,d="linear"}const m=function(t,e,n,{delay:i=0,duration:s,repeat:o=0,repeatType:r="loop",ease:a,times:l}={}){const u={[e]:n};l&&(u.offset=l);const c=Fe(a);return Array.isArray(c)&&(u.easing=c),t.animate(u,{delay:i,duration:s,easing:Array.isArray(c)?"linear":c,fill:"both",iterations:o+1,direction:"reverse"===r?"alternate":"normal"})}(t.owner.current,e,c,{...s,duration:h,ease:d,times:p}),f=()=>{l=!1,m.cancel()},g=()=>{l=!0,Ht.update(f),o(),u()};m.onfinish=()=>{l||(t.set(function(t,{repeat:e,repeatType:n="loop"}){return t[e&&"loop"!==n&&e%2==1?0:t.length-1]}(c,s)),i&&i(),g())};return{then:(t,e)=>r.then(t,e),attachTimeline:t=>(m.timeline=t,m.onfinish=null,zt),get time(){return Se(m.currentTime||0)},set time(t){m.currentTime=Ee(t)},get speed(){return m.playbackRate},set speed(t){m.playbackRate=t},get duration(){return Se(h)},play:()=>{a||(m.play(),Xt(f))},pause:()=>m.pause(),stop:()=>{if(a=!0,"idle"===m.playState)return;const{currentTime:e}=m;if(e){const n=ni({...s,autoplay:!1});t.setWithVelocity(n.sample(e-10).value,n.sample(e).value,10)}g()},complete:()=>{l||m.finish()},cancel:g}}const ri={type:"spring",stiffness:500,damping:25,restSpeed:10},ai={type:"keyframes",duration:.8},li={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},ui=(t,{keyframes:e})=>e.length>2?ai:U.has(t)?t.startsWith("scale")?{type:"spring",stiffness:550,damping:0===e[1]?2*Math.sqrt(550):30,restSpeed:10}:ri:li,ci=(t,e)=>"zIndex"!==t&&(!("number"!=typeof e&&!Array.isArray(e))||!("string"!=typeof e||!Pn.test(e)&&"0"!==e||e.startsWith("url("))),hi=new Set(["brightness","contrast","saturate","opacity"]);function di(t){const[e,n]=t.slice(0,-1).split("(");if("drop-shadow"===e)return t;const[i]=n.match(nt)||[];if(!i)return t;const s=n.replace(i,"");let o=hi.has(e)?1:0;return i!==n&&(o*=100),e+"("+o+s+")"}const pi=/([a-z-]*)\(.*?\)/g,mi={...Pn,getAnimatableNone:t=>{const e=t.match(pi);return e?e.map(di).join(" "):t}},fi={...mt,color:cn,backgroundColor:cn,outlineColor:cn,fill:cn,stroke:cn,borderColor:cn,borderTopColor:cn,borderRightColor:cn,borderBottomColor:cn,borderLeftColor:cn,filter:mi,WebkitFilter:mi},gi=t=>fi[t];function vi(t,e){let n=gi(t);return n!==mi&&(n=Pn),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const yi=t=>/^0[^.\s]+$/.test(t);function xi(t){return"number"==typeof t?0===t:null!==t?"none"===t||"0"===t||yi(t):void 0}function bi(t,e){return t[e]||t.default||t}const Pi=(t,e,n,i={})=>s=>{const o=bi(i,t)||{},r=o.delay||i.delay||0;let{elapsed:a=0}=i;a-=Ee(r);const l=function(t,e,n,i){const s=ci(e,n);let o;o=Array.isArray(n)?[...n]:[null,n];const r=void 0!==i.from?i.from:t.get();let a;const l=[];for(let t=0;t<o.length;t++)null===o[t]&&(o[t]=0===t?r:o[t-1]),xi(o[t])&&l.push(t),"string"==typeof o[t]&&"none"!==o[t]&&"0"!==o[t]&&(a=o[t]);if(s&&l.length&&a)for(let t=0;t<l.length;t++)o[l[t]]=vi(e,a);return o}(e,t,n,o),u=l[0],c=l[l.length-1],h=ci(t,u),p=ci(t,c);we(h===p,`You are trying to animate ${t} from "${u}" to "${c}". ${u} is not an animatable value - to enable this animation set ${u} to a value animatable to ${c} via the \`style\` property.`);let m={keyframes:l,velocity:e.getVelocity(),ease:"easeOut",...o,delay:-a,onUpdate:t=>{e.set(t),o.onUpdate&&o.onUpdate(t)},onComplete:()=>{s(),o.onComplete&&o.onComplete()}};if(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}(o)||(m={...m,...ui(t,m)}),m.duration&&(m.duration=Ee(m.duration)),m.repeatDelay&&(m.repeatDelay=Ee(m.repeatDelay)),!h||!p||Ae||!1===o.type||d)return function({keyframes:t,delay:e,onUpdate:n,onComplete:i}){const s=()=>(n&&n(t[t.length-1]),i&&i(),{time:0,speed:1,duration:0,play:zt,pause:zt,stop:zt,then:t=>(t(),Promise.resolve()),cancel:zt,complete:zt});return e?ni({keyframes:[0,1],duration:0,delay:e,onComplete:s}):s()}(m);if(!i.isHandoff&&e.owner&&e.owner.current instanceof HTMLElement&&!e.owner.getProps().onUpdate){const n=oi(e,t,m);if(n)return n}return ni(m)};function wi(t){return Boolean(W(t)&&t.add)}const Ti=t=>/^\-?\d*\.?\d+$/.test(t);function Ei(t,e){-1===t.indexOf(e)&&t.push(e)}function Si(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}class Ai{constructor(){this.subscriptions=[]}add(t){return Ei(this.subscriptions,t),()=>Si(this.subscriptions,t)}notify(t,e,n){const i=this.subscriptions.length;if(i)if(1===i)this.subscriptions[0](t,e,n);else for(let s=0;s<i;s++){const i=this.subscriptions[s];i&&i(t,e,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const Ci=new Set;function Vi(t,e,n){t||Ci.has(e)||(console.warn(e),n&&console.warn(n),Ci.add(e))}class Mi{constructor(t,e={}){var n;this.version="11.0.8",this.canTrackVelocity=!1,this.events={},this.updateAndNotify=(t,e=!0)=>{const n=Zn.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.canTrackVelocity=(n=this.current,!isNaN(parseFloat(n))),this.owner=e.owner}setCurrent(t){this.current=t,this.updatedAt=Zn.now()}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return"production"!==process.env.NODE_ENV&&Vi(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",t)}on(t,e){this.events[t]||(this.events[t]=new Ai);const n=this.events[t].add(e);return"change"===t?()=>{n(),Ht.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){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=Zn.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||t-this.updatedAt>30)return 0;const e=Math.min(this.updatedAt-this.prevUpdatedAt,30);return Rn(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 Di(t,e){return new Mi(t,e)}const Fi=t=>e=>e.test(t),Ri=[Q,ut,lt,at,ht,ct,{test:t=>"auto"===t,parse:t=>t}],ki=t=>Ri.find(Fi(t)),Li=[...Ri,cn,Pn];function ji(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,Di(n))}function Bi(t,e){if(!e)return;return(e[t]||e.default||e).from}function Oi({protectedKeys:t,needsAnimating:e},n){const i=t.hasOwnProperty(n)&&!0!==e[n];return e[n]=!1,i}function _i(t,e){const n=t.get();if(!Array.isArray(e))return n!==e;for(let t=0;t<e.length;t++)if(e[t]!==n)return!0}function Ii(t,e,{delay:n=0,transitionOverride:i,type:s}={}){let{transition:o=t.getDefaultTransition(),transitionEnd:r,...a}=t.makeTargetAnimatable(e);const l=t.getValue("willChange");i&&(o=i);const u=[],c=s&&t.animationState&&t.animationState.getState()[s];for(const e in a){const i=t.getValue(e),s=a[e];if(!i||void 0===s||c&&Oi(c,e))continue;const r={delay:n,elapsed:0,...bi(o||{},e)};if(window.HandoffAppearAnimations){const n=t.getProps()[h];if(n){const t=window.HandoffAppearAnimations(n,e,i,Ht);null!==t&&(r.elapsed=t,r.isHandoff=!0)}}let d=!r.isHandoff&&!_i(i,s);if("spring"===r.type&&(i.getVelocity()||r.velocity)&&(d=!1),i.animation&&(d=!1),d)continue;i.start(Pi(e,i,s,t.shouldReduceMotion&&U.has(e)?{type:!1}:r));const p=i.animation;wi(l)&&(l.add(e),p.then((()=>l.remove(e)))),u.push(p)}return r&&Promise.all(u).then((()=>{r&&function(t,e){const n=Pe(t,e);let{transitionEnd:i={},transition:s={},...o}=n?t.makeTargetAnimatable(n,!1):{};o={...o,...i};for(const e in o)ji(t,e,Ut(o[e]))}(t,r)})),u}function Ui(t,e,n={}){const i=Pe(t,e,n.custom);let{transition:s=t.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(s=n.transitionOverride);const o=i?()=>Promise.all(Ii(t,i,n)):()=>Promise.resolve(),r=t.variantChildren&&t.variantChildren.size?(i=0)=>{const{delayChildren:o=0,staggerChildren:r,staggerDirection:a}=s;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(Ni).forEach(((t,i)=>{t.notify("AnimationStart",e),r.push(Ui(t,e,{...o,delay:n+l(i)}).then((()=>t.notify("AnimationComplete",e))))})),Promise.all(r)}(t,e,o+i,r,a,n)}:()=>Promise.resolve(),{when:a}=s;if(a){const[t,e]="beforeChildren"===a?[o,r]:[r,o];return t().then((()=>e()))}return Promise.all([o(),r(n.delay)])}function Ni(t,e){return t.sortNodePosition(e)}const Wi=[...w].reverse(),$i=w.length;function zi(t){return e=>Promise.all(e.map((({animation:e,options:n})=>function(t,e,n={}){let i;if(t.notify("AnimationStart",e),Array.isArray(e)){const s=e.map((e=>Ui(t,e,n)));i=Promise.all(s)}else if("string"==typeof e)i=Ui(t,e,n);else{const s="function"==typeof e?Pe(t,e,n.custom):e;i=Promise.all(Ii(t,s,n))}return i.then((()=>t.notify("AnimationComplete",e)))}(t,e,n))))}function Hi(t){let e=zi(t);const n={animate:Yi(!0),whileInView:Yi(),whileHover:Yi(),whileTap:Yi(),whileDrag:Yi(),whileFocus:Yi(),exit:Yi()};let i=!0;const s=(e,n)=>{const i=Pe(t,n);if(i){const{transition:t,transitionEnd:n,...s}=i;e={...e,...s,...n}}return e};function o(o,r){const a=t.getProps(),l=t.getVariantContext(!0)||{},u=[],c=new Set;let h={},d=1/0;for(let e=0;e<$i;e++){const p=Wi[e],m=n[p],f=void 0!==a[p]?a[p]:l[p],g=b(f),v=p===r?m.isActive:null;!1===v&&(d=e);let y=f===l[p]&&f!==a[p]&&g;if(y&&i&&t.manuallyAnimateOnMount&&(y=!1),m.protectedKeys={...h},!m.isActive&&null===v||!f&&!m.prevProp||P(f)||"boolean"==typeof f)continue;let x=Xi(m.prevProp,f)||p===r&&m.isActive&&!y&&g||e>d&&g,w=!1;const T=Array.isArray(f)?f:[f];let E=T.reduce(s,{});!1===v&&(E={});const{prevResolvedValues:S={}}=m,A={...S,...E},C=t=>{x=!0,c.has(t)&&(w=!0,c.delete(t)),m.needsAnimating[t]=!0};for(const t in A){const e=E[t],n=S[t];if(h.hasOwnProperty(t))continue;let i=!1;i=_t(e)&&_t(n)?!be(e,n):e!==n,i?void 0!==e?C(t):c.add(t):void 0!==e&&c.has(t)?C(t):m.protectedKeys[t]=!0}m.prevProp=f,m.prevResolvedValues=E,m.isActive&&(h={...h,...E}),i&&t.blockInitialAnimation&&(x=!1),!x||y&&!w||u.push(...T.map((t=>({animation:t,options:{type:p,...o}}))))}if(c.size){const e={};c.forEach((n=>{const i=t.getBaseTarget(n);void 0!==i&&(e[n]=i)})),u.push({animation:e})}let p=Boolean(u.length);return!i||!1!==a.initial&&a.initial!==a.animate||t.manuallyAnimateOnMount||(p=!1),i=!1,p?e(u):Promise.resolve()}return{animateChanges:o,setActive:function(e,i,s){var r;if(n[e].isActive===i)return Promise.resolve();null===(r=t.variantChildren)||void 0===r||r.forEach((t=>{var n;return null===(n=t.animationState)||void 0===n?void 0:n.setActive(e,i)})),n[e].isActive=i;const a=o(s,e);for(const t in n)n[t].protectedKeys={};return a},setAnimateFunction:function(n){e=n(t)},getState:()=>n}}function Xi(t,e){return"string"==typeof e?e!==t:!!Array.isArray(e)&&!be(e,t)}function Yi(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}let Gi=0;const qi={animation:{Feature:class extends ue{constructor(t){super(t),t.animationState||(t.animationState=Hi(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();this.unmount(),P(t)&&(this.unmount=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:e}=this.node.prevProps||{};t!==e&&this.updateAnimationControlsSubscription()}unmount(){}}},exit:{Feature:class extends ue{constructor(){super(...arguments),this.id=Gi++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:e,custom:n}=this.node.presenceContext,{isPresent:i}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===i)return;const s=this.node.animationState.setActive("exit",!t,{custom:null!=n?n:this.node.getProps().custom});e&&!t&&s.then((()=>e(this.id)))}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id))}unmount(){}}}},Zi=(t,e)=>Math.abs(t-e);class Ji{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=ts(this.lastMoveEventInfo,this.history),e=null!==this.startEvent,n=function(t,e){const n=Zi(t.x,e.x),i=Zi(t.y,e.y);return Math.sqrt(n**2+i**2)}(t.offset,{x:0,y:0})>=3;if(!e&&!n)return;const{point:i}=t,{timestamp:s}=Yt;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=Qi(e,this.transformPagePoint),Ht.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=ts("pointercancel"===t.type?this.lastMoveEventInfo:Qi(e,this.transformPagePoint),this.history);this.startEvent&&n&&n(t,o),i&&i(t,o)},!Qt(t))return;this.dragSnapToOrigin=s,this.handlers=e,this.transformPagePoint=n,this.contextWindow=i||window;const o=Qi(Kt(t),this.transformPagePoint),{point:r}=o,{timestamp:a}=Yt;this.history=[{...r,timestamp:a}];const{onSessionStart:l}=e;l&&l(t,ts(o,this.history)),this.removeListeners=ie(ee(this.contextWindow,"pointermove",this.handlePointerMove),ee(this.contextWindow,"pointerup",this.handlePointerUp),ee(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Xt(this.updatePoint)}}function Qi(t,e){return e?{point:e(t.point)}:t}function Ki(t,e){return{x:t.x-e.x,y:t.y-e.y}}function ts({point:t},e){return{point:t,delta:Ki(t,ns(e)),offset:Ki(t,es(e)),velocity:is(e,.1)}}function es(t){return t[0]}function ns(t){return t[t.length-1]}function is(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,i=null;const s=ns(t);for(;n>=0&&(i=t[n],!(s.timestamp-i.timestamp>Ee(e)));)n--;if(!i)return{x:0,y:0};const o=Se(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 ss(t){return t.max-t.min}function os(t,e=0,n=.01){return Math.abs(t-e)<=n}function rs(t,e,n,i=.5){t.origin=i,t.originPoint=Je(e.min,e.max,t.origin),t.scale=ss(n)/ss(e),(os(t.scale,1,1e-4)||isNaN(t.scale))&&(t.scale=1),t.translate=Je(n.min,n.max,t.origin)-t.originPoint,(os(t.translate)||isNaN(t.translate))&&(t.translate=0)}function as(t,e,n,i){rs(t.x,e.x,n.x,i?i.originX:void 0),rs(t.y,e.y,n.y,i?i.originY:void 0)}function ls(t,e,n){t.min=n.min+e.min,t.max=t.min+ss(e)}function us(t,e,n){t.min=e.min-n.min,t.max=t.min+ss(e)}function cs(t,e,n){us(t.x,e.x,n.x),us(t.y,e.y,n.y)}function hs(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 ds(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 ps=.35;function ms(t,e,n){return{min:fs(t,e),max:fs(t,n)}}function fs(t,e){return"number"==typeof t?t:t[e]||0}const gs=()=>({x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}}),vs=()=>({x:{min:0,max:0},y:{min:0,max:0}});function ys(t){return[t("x"),t("y")]}function xs({top:t,left:e,right:n,bottom:i}){return{x:{min:e,max:n},y:{min:t,max:i}}}function bs(t){return void 0===t||1===t}function Ps({scale:t,scaleX:e,scaleY:n}){return!bs(t)||!bs(e)||!bs(n)}function ws(t){return Ps(t)||Ts(t)||t.z||t.rotate||t.rotateX||t.rotateY}function Ts(t){return Es(t.x)||Es(t.y)}function Es(t){return t&&"0%"!==t}function Ss(t,e,n){return n+e*(t-n)}function As(t,e,n,i,s){return void 0!==s&&(t=Ss(t,s,i)),Ss(t,n,i)+e}function Cs(t,e=0,n=1,i,s){t.min=As(t.min,e,n,i,s),t.max=As(t.max,e,n,i,s)}function Vs(t,{x:e,y:n}){Cs(t.x,e.translate,e.scale,e.originPoint),Cs(t.y,n.translate,n.scale,n.originPoint)}function Ms(t){return Number.isInteger(t)||t>1.0000000000001||t<.999999999999?t:1}function Ds(t,e){t.min=t.min+e,t.max=t.max+e}function Fs(t,e,[n,i,s]){const o=void 0!==e[s]?e[s]:.5,r=Je(t.min,t.max,o);Cs(t,e[n],e[i],r,e.scale)}const Rs=["x","scaleX","originX"],ks=["y","scaleY","originY"];function Ls(t,e){Fs(t.x,e,Rs),Fs(t.y,e,ks)}function js(t,e){return xs(function(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),i=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:i.y,right:i.x}}(t.getBoundingClientRect(),e))}const Bs=({current:t})=>t?t.ownerDocument.defaultView:null,Os=new WeakMap;class _s{constructor(t){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=vs(),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 Ji(t,{onSessionStart:t=>{const{dragSnapToOrigin:n}=this.getProps();n?this.pauseAnimation():this.stopAnimation(),e&&this.snapToCursor(Kt(t,"page").point)},onStart:(t,e)=>{const{drag:n,dragPropagation:i,onDragStart:s}=this.getProps();if(n&&!i&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=ae(n),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),ys((t=>{let e=this.getAxisMotionValue(t).get()||0;if(lt.test(e)){const{projection:n}=this.visualElement;if(n&&n.layout){const i=n.layout.layoutBox[t];if(i){e=ss(i)*(parseFloat(e)/100)}}}this.originPoint[t]=e})),s&&Ht.update((()=>s(t,e)),!1,!0);const{animationState:o}=this.visualElement;o&&o.setActive("whileDrag",!0)},onMove:(t,e)=>{const{dragPropagation:n,dragDirectionLock:i,onDirectionLock:s,onDrag:o}=this.getProps();if(!n&&!this.openGlobalLock)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:()=>ys((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:Bs(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&&Ht.update((()=>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.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),e&&e.setActive("whileDrag",!1)}updateAxis(t,e,n){const{drag:i}=this.getProps();if(!n||!Is(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?Je(e,t,i.min):Math.max(t,e):void 0!==n&&t>n&&(t=i?Je(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&&x(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!e||!i)&&function(t,{top:e,left:n,bottom:i,right:s}){return{x:hs(t.x,n,s),y:hs(t.y,e,i)}}(i.layoutBox,e),this.elastic=function(t=ps){return!1===t?t=0:!0===t&&(t=ps),{x:ms(t,"left","right"),y:ms(t,"top","bottom")}}(n),s!==this.constraints&&i&&this.constraints&&!this.hasMutatedConstraints&&ys((t=>{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||!x(t))return!1;const n=t.current;Te(null!==n,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");const{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const s=function(t,e,n){const i=js(t,n),{scroll:s}=e;return s&&(Ds(i.x,s.offset.x),Ds(i.y,s.offset.y)),i}(n,i.root,this.visualElement.getTransformPagePoint());let o=function(t,e){return{x:ds(t.x,e.x),y:ds(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=xs(t))}return o}startAnimation(t){const{drag:e,dragMomentum:n,dragElastic:i,dragTransition:s,dragSnapToOrigin:o,onDragTransitionEnd:r}=this.getProps(),a=this.constraints||{},l=ys((r=>{if(!Is(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 n.start(Pi(t,n,0,e))}stopAnimation(){ys((t=>this.getAxisMotionValue(t).stop()))}pauseAnimation(){ys((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){ys((e=>{const{drag:n}=this.getProps();if(!Is(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]-Je(n,o,.5))}}))}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:e}=this.getProps(),{projection:n}=this.visualElement;if(!x(e)||!n||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};ys((t=>{const e=this.getAxisMotionValue(t);if(e){const n=e.get();i[t]=function(t,e){let n=.5;const i=ss(t),s=ss(e);return s>i?n=Ze(e.min,e.max-i,t.min):i>s&&(n=Ze(t.min,t.max-s,e.min)),J(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(),ys((e=>{if(!Is(e,t,null))return;const n=this.getAxisMotionValue(e),{min:s,max:o}=this.constraints[e];n.set(Je(s,o,i[e]))}))}addListeners(){if(!this.visualElement.current)return;Os.set(this.visualElement,this);const t=ee(this.visualElement.current,"pointerdown",(t=>{const{drag:e,dragListener:n=!0}=this.getProps();e&&n&&this.start(t)})),e=()=>{const{dragConstraints:t}=this.getProps();x(t)&&(this.constraints=this.resolveRefConstraints())},{projection:n}=this.visualElement,i=n.addEventListener("measure",e);n&&!n.layout&&(n.root&&n.root.updateScroll(),n.updateLayout()),e();const s=Jt(window,"resize",(()=>this.scalePositionWithinConstraints())),o=n.addEventListener("didUpdate",(({delta:t,hasLayoutChanged:e})=>{this.isDragging&&e&&(ys((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=ps,dragMomentum:r=!0}=t;return{...t,drag:e,dragDirectionLock:n,dragPropagation:i,dragConstraints:s,dragElastic:o,dragMomentum:r}}}function Is(t,e,n){return!(!0!==e&&e!==t||null!==n&&n!==t)}const Us=t=>(e,n)=>{t&&Ht.update((()=>t(e,n)))};const Ns={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function Ws(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const $s={correct:(t,e)=>{if(!e.target)return t;if("string"==typeof t){if(!ut.test(t))return t;t=parseFloat(t)}return`${Ws(t,e.target.x)}% ${Ws(t,e.target.y)}%`}},zs={correct:(t,{treeScale:e,projectionDelta:n})=>{const i=t,s=Pn.parse(t);if(s.length>5)return i;const o=Pn.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=Je(a,l,.5);return"number"==typeof s[2+r]&&(s[2+r]/=u),"number"==typeof s[3+r]&&(s[3+r]/=u),o(s)}};class Hs extends t.Component{componentDidMount(){const{visualElement:t,layoutGroup:e,switchLayoutGroup:n,layoutId:i}=this.props,{projection:s}=t;var o;o=Ys,Object.assign(_,o),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()})),Ns.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?o.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?o.promote():o.relegate()||Ht.postRender((()=>{const t=o.getStack();t&&t.members.length||this.safeToRemove()}))),null):null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),v.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 Xs(e){const[n,i]=function(){const e=t.useContext(r);if(null===e)return[!0,null];const{isPresent:n,onExitComplete:i,register:s}=e,o=t.useId();return t.useEffect((()=>s(o)),[]),!n&&i?[!1,()=>i&&i(o)]:[!0]}(),s=t.useContext(D);return t.createElement(Hs,{...e,layoutGroup:s,switchLayoutGroup:t.useContext(F),isPresent:n,safeToRemove:i})}const Ys={borderRadius:{...$s,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:$s,borderTopRightRadius:$s,borderBottomLeftRadius:$s,borderBottomRightRadius:$s,boxShadow:zs},Gs=["TopLeft","TopRight","BottomLeft","BottomRight"],qs=Gs.length,Zs=t=>"string"==typeof t?parseFloat(t):t,Js=t=>"number"==typeof t||ut.test(t);function Qs(t,e){return void 0!==t[e]?t[e]:t.borderRadius}const Ks=eo(0,.5,$e),to=eo(.5,.95,zt);function eo(t,e,n){return i=>i<t?0:i>e?1:n(Ze(t,e,i))}function no(t,e){t.min=e.min,t.max=e.max}function io(t,e){no(t.x,e.x),no(t.y,e.y)}function so(t,e,n,i,s){return t=Ss(t-=e,1/n,i),void 0!==s&&(t=Ss(t,1/s,i)),t}function oo(t,e,[n,i,s],o,r){!function(t,e=0,n=1,i=.5,s,o=t,r=t){lt.test(e)&&(e=parseFloat(e),e=Je(r.min,r.max,e/100)-r.min);if("number"!=typeof e)return;let a=Je(o.min,o.max,i);t===o&&(a-=e),t.min=so(t.min,e,n,a,s),t.max=so(t.max,e,n,a,s)}(t,e[n],e[i],e[s],e.scale,o,r)}const ro=["x","scaleX","originX"],ao=["y","scaleY","originY"];function lo(t,e,n,i){oo(t.x,e,ro,n?n.x:void 0,i?i.x:void 0),oo(t.y,e,ao,n?n.y:void 0,i?i.y:void 0)}function uo(t){return 0===t.translate&&1===t.scale}function co(t){return uo(t.x)&&uo(t.y)}function ho(t,e){return Math.round(t.x.min)===Math.round(e.x.min)&&Math.round(t.x.max)===Math.round(e.x.max)&&Math.round(t.y.min)===Math.round(e.y.min)&&Math.round(t.y.max)===Math.round(e.y.max)}function po(t){return ss(t.x)/ss(t.y)}class mo{constructor(){this.members=[]}add(t){Ei(this.members,t),t.scheduleRender()}remove(t){if(Si(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 fo(t,e,n){let i="";const s=t.x.translate/e.x,o=t.y.translate/e.y;if((s||o)&&(i=`translate3d(${s}px, ${o}px, 0) `),1===e.x&&1===e.y||(i+=`scale(${1/e.x}, ${1/e.y}) `),n){const{rotate:t,rotateX:e,rotateY:s}=n;t&&(i+=`rotate(${t}deg) `),e&&(i+=`rotateX(${e}deg) `),s&&(i+=`rotateY(${s}deg) `)}const r=t.x.scale*e.x,a=t.y.scale*e.y;return 1===r&&1===a||(i+=`scale(${r}, ${a})`),i||"none"}const go=(t,e)=>t.depth-e.depth;class vo{constructor(){this.children=[],this.isDirty=!1}add(t){Ei(this.children,t),this.isDirty=!0}remove(t){Si(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(go),this.isDirty=!1,this.children.forEach(t)}}const yo=["","X","Y","Z"],xo={visibility:"hidden"};let bo=0;const Po={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0};function wo({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:i,resetTransform:s}){return class{constructor(t={},n=(null==e?void 0:e())){this.id=bo++,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.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{var t;this.projectionUpdateScheduled=!1,Po.totalNodes=Po.resolvedTargetDeltas=Po.recalculatedProjection=0,this.nodes.forEach(So),this.nodes.forEach(Ro),this.nodes.forEach(ko),this.nodes.forEach(Ao),t=Po,window.MotionDebug&&window.MotionDebug.record(t)},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 vo)}addEventListener(t,e){return this.eventHandlers.has(t)||this.eventHandlers.set(t,new Ai),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;var i;this.isSVG=(i=e)instanceof SVGElement&&"svg"!==i.tagName,this.instance=e;const{layoutId:s,layout:o,visualElement:r}=this.options;if(r&&!r.current&&r.mount(e),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),n&&(o||s)&&(this.isLayoutDirty=!0),t){let n;const i=()=>this.root.updateBlockedByResize=!1;t(e,(()=>{this.root.updateBlockedByResize=!0,n&&n(),n=function(t,e){const n=Zn.now(),i=({timestamp:s})=>{const o=s-n;o>=e&&(Xt(i),t(o-e))};return Ht.read(i,!0),()=>Xt(i)}(i,250),Ns.hasAnimatedSinceResize&&(Ns.hasAnimatedSinceResize=!1,this.nodes.forEach(Fo))}))}s&&this.root.registerSharedNode(s,this),!1!==this.options.animate&&r&&(s||o)&&this.addEventListener("didUpdate",(({delta:t,hasLayoutChanged:e,hasRelativeTargetChanged:n,layout:i})=>{if(this.isTreeAnimationBlocked())return this.target=void 0,void(this.relativeTarget=void 0);const s=this.options.transition||r.getDefaultTransition()||Io,{onLayoutAnimationStart:o,onLayoutAnimationComplete:a}=r.getProps(),l=!this.targetLayout||!ho(this.targetLayout,i)||n,u=!e&&n;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||u||e&&(l||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(t,u);const e={...bi(s,"layout"),onPlay:o,onComplete:a};(r.shouldReduceMotion||this.options.layoutRoot)&&(e.delay=0,e.type=!1),this.startAnimation(e)}else e||Fo(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,Xt(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(Lo),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(!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(Vo);this.isUpdating||this.nodes.forEach(Mo),this.isUpdating=!1,window.HandoffCancelAllAnimations&&window.HandoffCancelAllAnimations(),this.nodes.forEach(Do),this.nodes.forEach(To),this.nodes.forEach(Eo),this.clearAllSnapshots();const t=Zn.now();Yt.delta=J(0,1e3/60,t-Yt.timestamp),Yt.timestamp=t,Yt.isProcessing=!0,Gt.update.process(Yt),Gt.preRender.process(Yt),Gt.render.process(Yt),Yt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,v.read((()=>this.update())))}clearAllSnapshots(){this.nodes.forEach(Co),this.sharedNodes.forEach(jo)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Ht.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Ht.postRender((()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()}))}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure())}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=vs(),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);this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===t&&(e=!1),e&&(this.scroll={animationId:this.root.animationId,phase:t,isRoot:i(this.instance),offset:n(this.instance)})}resetTransform(){if(!s)return;const t=this.isLayoutDirty||this.shouldResetTransform,e=this.projectionDelta&&!co(this.projectionDelta),n=this.getTransformTemplate(),i=n?n(this.latestValues,""):void 0,o=i!==this.prevTransformTemplateValue;t&&(e||ws(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)),Wo((i=n).x),Wo(i.y),{animationId:this.root.animationId,measuredBox:e,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:t}=this.options;if(!t)return vs();const e=t.measureViewportBox(),{scroll:n}=this.root;return n&&(Ds(e.x,n.offset.x),Ds(e.y,n.offset.y)),e}removeElementScroll(t){const e=vs();io(e,t);for(let n=0;n<this.path.length;n++){const i=this.path[n],{scroll:s,options:o}=i;if(i!==this.root&&s&&o.layoutScroll){if(s.isRoot){io(e,t);const{scroll:n}=this.root;n&&(Ds(e.x,-n.offset.x),Ds(e.y,-n.offset.y))}Ds(e.x,s.offset.x),Ds(e.y,s.offset.y)}}return e}applyTransform(t,e=!1){const n=vs();io(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&&Ls(n,{x:-i.scroll.offset.x,y:-i.scroll.offset.y}),ws(i.latestValues)&&Ls(n,i.latestValues)}return ws(this.latestValues)&&Ls(n,this.latestValues),n}removeTransform(t){const e=vs();io(e,t);for(let t=0;t<this.path.length;t++){const n=this.path[t];if(!n.instance)continue;if(!ws(n.latestValues))continue;Ps(n.latestValues)&&n.updateSnapshot();const i=vs();io(i,n.measurePageBox()),lo(e,n.latestValues,n.snapshot?n.snapshot.layoutBox:void 0,i)}return ws(this.latestValues)&&lo(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!==Yt.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))return;const{layout:s,layoutId:o}=this.options;if(this.layout&&(s||o)){if(this.resolvedRelativeTargetAt=Yt.timestamp,!this.targetDelta&&!this.relativeTarget){const t=this.getClosestProjectingParent();t&&t.layout&&1!==this.animationProgress?(this.relativeParent=t,this.forceRelativeParentToResolveTarget(),this.relativeTarget=vs(),this.relativeTargetOrigin=vs(),cs(this.relativeTargetOrigin,this.layout.layoutBox,t.layout.layoutBox),io(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(this.relativeTarget||this.targetDelta){var r,a,l;if(this.target||(this.target=vs(),this.targetWithTransforms=vs()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),r=this.target,a=this.relativeTarget,l=this.relativeParent.target,ls(r.x,a.x,l.x),ls(r.y,a.y,l.y)):this.targetDelta?(Boolean(this.resumingFrom)?this.target=this.applyTransform(this.layout.layoutBox):io(this.target,this.layout.layoutBox),Vs(this.target,this.targetDelta)):io(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=vs(),this.relativeTargetOrigin=vs(),cs(this.relativeTargetOrigin,this.target,t.target),io(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}Po.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(this.parent&&!Ps(this.parent.latestValues)&&!Ts(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===Yt.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;io(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 s=o.instance;s&&s.style&&"contents"===s.style.display||(i&&o.options.layoutScroll&&o.scroll&&o!==o.root&&Ls(t,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),r&&(e.x*=r.x.scale,e.y*=r.y.scale,Vs(t,r)),i&&ws(o.latestValues)&&Ls(t,o.latestValues))}e.x=Ms(e.x),e.y=Ms(e.y)}(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=vs());const{target:l}=e;if(!l)return void(this.projectionTransform&&(this.projectionDelta=gs(),this.projectionTransform="none",this.scheduleRender()));this.projectionDelta||(this.projectionDelta=gs(),this.projectionDeltaWithTransform=gs());const u=this.projectionTransform;as(this.projectionDelta,this.layoutCorrected,l,this.latestValues),this.projectionTransform=fo(this.projectionDelta,this.treeScale),this.projectionTransform===u&&this.treeScale.x===r&&this.treeScale.y===a||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",l)),Po.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(t=!0){if(this.options.scheduleRender&&this.options.scheduleRender(),t){const t=this.getStack();t&&t.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}setAnimationOrigin(t,e=!1){const n=this.snapshot,i=n?n.latestValues:{},s={...this.latestValues},o=gs();this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!e;const r=vs(),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(_o));let h;this.animationProgress=0,this.mixTargetDelta=e=>{const n=e/1e3;var l,d,p,m,f,g;Bo(o.x,t.x,n),Bo(o.y,t.y,n),this.setTargetDelta(o),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(cs(r,this.layout.layoutBox,this.relativeParent.layout.layoutBox),p=this.relativeTarget,m=this.relativeTargetOrigin,f=r,g=n,Oo(p.x,m.x,f.x,g),Oo(p.y,m.y,f.y,g),h&&(l=this.relativeTarget,d=h,l.x.min===d.x.min&&l.x.max===d.x.max&&l.y.min===d.y.min&&l.y.max===d.y.max)&&(this.isProjectionDirty=!1),h||(h=vs()),io(h,this.relativeTarget)),a&&(this.animationValues=s,function(t,e,n,i,s,o){s?(t.opacity=Je(0,void 0!==n.opacity?n.opacity:1,Ks(i)),t.opacityExit=Je(void 0!==e.opacity?e.opacity:1,0,to(i))):o&&(t.opacity=Je(void 0!==e.opacity?e.opacity:1,void 0!==n.opacity?n.opacity:1,i));for(let s=0;s<qs;s++){const o=`border${Gs[s]}Radius`;let r=Qs(e,o),a=Qs(n,o);void 0===r&&void 0===a||(r||(r=0),a||(a=0),0===r||0===a||Js(r)===Js(a)?(t[o]=Math.max(Je(Zs(r),Zs(a),i),0),(lt.test(a)||lt.test(r))&&(t[o]+="%")):t[o]=a)}(e.rotate||n.rotate)&&(t.rotate=Je(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&&(Xt(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Ht.update((()=>{Ns.hasAnimatedSinceResize=!0,this.currentAnimation=function(t,e,n){const i=W(t)?t:Di(t);return i.start(Pi("",i,e,n)),i.animation}(0,1e3,{...t,onUpdate:e=>{this.mixTargetDelta(e),t.onUpdate&&t.onUpdate(e)},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&&$o(this.options.animationType,this.layout.layoutBox,i.layoutBox)){n=this.target||vs();const e=ss(this.layout.layoutBox.x);n.x.min=t.target.x.min,n.x.max=n.x.min+e;const i=ss(this.layout.layoutBox.y);n.y.min=t.target.y.min,n.y.max=n.y.min+i}io(e,n),Ls(e,s),as(this.projectionDeltaWithTransform,this.layoutCorrected,e,s)}}registerSharedNode(t,e){this.sharedNodes.has(t)||this.sharedNodes.set(t,new mo);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)}resetRotation(){const{visualElement:t}=this.options;if(!t)return;let e=!1;const{latestValues:n}=t;if((n.rotate||n.rotateX||n.rotateY||n.rotateZ)&&(e=!0),!e)return;const i={};for(let e=0;e<yo.length;e++){const s="rotate"+yo[e];n[s]&&(i[s]=n[s],t.setStaticValue(s,0))}t.render();for(const e in i)t.setStaticValue(e,i[e]);t.scheduleRender()}getProjectionStyles(t){var e,n;if(!this.instance||this.isSVG)return;if(!this.isVisible)return xo;const i={visibility:""},s=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,i.opacity="",i.pointerEvents=Nt(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=Nt(null==t?void 0:t.pointerEvents)||""),this.hasProjected&&!ws(this.latestValues)&&(e.transform=s?s({},""):"none",this.hasProjected=!1),e}const r=o.animationValues||o.latestValues;this.applyTransformsToTarget(),i.transform=fo(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 _){if(void 0===r[t])continue;const{correct:e,applyTo:n}=_[t],s="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]]=s}else i[t]=s}return this.options.layoutId&&(i.pointerEvents=o===this?Nt(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(Vo),this.root.sharedNodes.clear()}}}function To(t){t.updateLayout()}function Eo(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?ys((t=>{const i=o?n.measuredBox[t]:n.layoutBox[t],s=ss(i);i.min=e[t].min,i.max=i.min+s})):$o(s,n.layoutBox,e)&&ys((i=>{const s=o?n.measuredBox[i]:n.layoutBox[i],r=ss(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=gs();as(r,e,n.layoutBox);const a=gs();o?as(a,t.applyTransform(i,!0),n.measuredBox):as(a,e,n.layoutBox);const l=!co(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=vs();cs(r,n.layoutBox,s.layoutBox);const a=vs();cs(a,e,o.layoutBox),ho(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,hasRelativeTargetChanged:u})}else if(t.isLead()){const{onExitComplete:e}=t.options;e&&e()}t.options.transition=void 0}function So(t){Po.totalNodes++,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 Ao(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function Co(t){t.clearSnapshot()}function Vo(t){t.clearMeasurements()}function Mo(t){t.isLayoutDirty=!1}function Do(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function Fo(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function Ro(t){t.resolveTargetDelta()}function ko(t){t.calcProjection()}function Lo(t){t.resetRotation()}function jo(t){t.removeLeadSnapshot()}function Bo(t,e,n){t.translate=Je(e.translate,0,n),t.scale=Je(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function Oo(t,e,n,i){t.min=Je(e.min,n.min,i),t.max=Je(e.max,n.max,i)}function _o(t){return t.animationValues&&void 0!==t.animationValues.opacityExit}const Io={duration:.45,ease:[.4,0,.1,1]},Uo=t=>"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),No=Uo("applewebkit/")&&!Uo("chrome/")?Math.round:zt;function Wo(t){t.min=No(t.min),t.max=No(t.max)}function $o(t,e,n){return"position"===t||"preserve-aspect"===t&&!os(po(e),po(n),.2)}const zo=wo({attachResizeListener:(t,e)=>Jt(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Ho={current:void 0},Xo=wo({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!Ho.current){const t=new zo({});t.mount(window),t.setOptions({layoutScroll:!0}),Ho.current=t}return Ho.current},resetTransform:(t,e)=>{t.style.transform=void 0!==e?e:"none"},checkIsScrollRoot:t=>Boolean("fixed"===window.getComputedStyle(t).position)}),Yo={pan:{Feature:class extends ue{constructor(){super(...arguments),this.removePointerDownListener=zt}onPointerDown(t){this.session=new Ji(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Bs(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:e,onPan:n,onPanEnd:i}=this.node.getProps();return{onSessionStart:Us(t),onStart:Us(e),onMove:n,onEnd:(t,e)=>{delete this.session,i&&Ht.update((()=>i(t,e)))}}}mount(){this.removePointerDownListener=ee(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 ue{constructor(t){super(t),this.removeGroupControls=zt,this.removeListeners=zt,this.controls=new _s(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||zt}unmount(){this.removeGroupControls(),this.removeListeners()}},ProjectionNode:Xo,MeasureLayout:Xs}},Go=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;const qo=4;function Zo(t,e,n=1){Te(n<=qo,`Max CSS variable fallback depth detected in property "${t}". This may indicate a circular fallback dependency.`);const[i,s]=function(t){const e=Go.exec(t);if(!e)return[,];const[,n,i]=e;return[n,i]}(t);if(!i)return;const o=window.getComputedStyle(e).getPropertyValue(i);if(o){const t=o.trim();return Ti(t)?parseFloat(t):t}return G(s)?Zo(s,e,n+1):s}const Jo=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),Qo=t=>Jo.has(t),Ko=t=>t===Q||t===ut,tr=(t,e)=>parseFloat(t.split(", ")[e]),er=(t,e)=>(n,{transform:i})=>{if("none"===i||!i)return 0;const s=i.match(/^matrix3d\((.+)\)$/);if(s)return tr(s[1],e);{const e=i.match(/^matrix\((.+)\)$/);return e?tr(e[1],t):0}},nr=new Set(["x","y","z"]),ir=I.filter((t=>!nr.has(t)));const sr={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:er(4,13),y:er(5,14)};sr.translateX=sr.x,sr.translateY=sr.y;const or=(t,e,n={},i={})=>{e={...e},i={...i};const s=Object.keys(e).filter(Qo);let o=[],r=!1;const l=[];if(s.forEach((s=>{const a=t.getValue(s);if(!t.hasValue(s))return;let u=n[s],c=ki(u);const h=e[s];let d;if(_t(h)){const t=h.length,e=null===h[0]?1:0;u=h[e],c=ki(u);for(let n=e;n<t&&null!==h[n];n++)d?Te(ki(h[n])===d,"All keyframes must be of the same type"):(d=ki(h[n]),Te(d===c||Ko(c)&&Ko(d),"Keyframes must be of the same dimension as the current value"))}else d=ki(h);if(c!==d)if(Ko(c)&&Ko(d)){const t=a.get();"string"==typeof t&&a.set(parseFloat(t)),"string"==typeof h?e[s]=parseFloat(h):Array.isArray(h)&&d===ut&&(e[s]=h.map(parseFloat))}else(null==c?void 0:c.transform)&&(null==d?void 0:d.transform)&&(0===u||0===h)?0===u?a.set(d.transform(u)):e[s]=c.transform(h):(r||(o=function(t){const e=[];return ir.forEach((n=>{const i=t.getValue(n);void 0!==i&&(e.push([n,i.get()]),i.set(n.startsWith("scale")?1:0))})),e.length&&t.render(),e}(t),r=!0),l.push(s),i[s]=void 0!==i[s]?i[s]:e[s],a.jump(h))})),l.length){const n=l.indexOf("height")>=0?window.pageYOffset:null,s=((t,e,n)=>{const i=e.measureViewportBox(),s=e.current,o=getComputedStyle(s),{display:r}=o,a={};"none"===r&&e.setStaticValue("display",t.display||"block"),n.forEach((t=>{a[t]=sr[t](i,o)})),e.render();const l=e.measureViewportBox();return n.forEach((n=>{const i=e.getValue(n);i&&i.jump(a[n]),t[n]=sr[n](l,o)})),t})(e,t,l);return o.length&&o.forEach((([e,n])=>{t.getValue(e).set(n)})),t.render(),a&&null!==n&&window.scrollTo({top:n}),{target:s,transitionEnd:i}}return{target:e,transitionEnd:i}};function rr(t,e,n,i){return(t=>Object.keys(t).some(Qo))(e)?or(t,e,n,i):{target:e,transitionEnd:i}}const ar=(t,e,n,i)=>{const s=function(t,{...e},n){const i=t.current;if(!(i instanceof Element))return{target:e,transitionEnd:n};n&&(n={...n}),t.values.forEach((t=>{const e=t.get();if(!G(e))return;const n=Zo(e,i);n&&t.set(n)}));for(const t in e){const s=e[t];if(!G(s))continue;const o=Zo(s,i);o&&(e[t]=o,n||(n={}),void 0===n[t]&&(n[t]=s))}return{target:e,transitionEnd:n}}(t,e,i);return rr(t,e=s.target,n,i=s.transitionEnd)},lr={current:null},ur={current:!1};const cr=new WeakMap,hr=Object.keys(M),dr=hr.length,pr=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],mr=T.length;class fr{constructor({parent:t,props:e,presenceContext:n,reducedMotionConfig:i,visualState:s},o={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,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.scheduleRender=()=>Ht.render(this.render,!1,!0);const{latestValues:r,renderState:a}=s;this.latestValues=r,this.baseTarget={...r},this.initialValues=e.initial?{...r}:{},this.renderState=a,this.parent=t,this.props=e,this.presenceContext=n,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.options=o,this.isControllingVariants=E(e),this.isVariantNode=S(e),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(t&&t.current);const{willChange:l,...u}=this.scrapeMotionValuesFromProps(e,{});for(const t in u){const e=u[t];void 0!==r[t]&&W(e)&&(e.set(r[t],!1),wi(l)&&l.add(t))}}scrapeMotionValuesFromProps(t,e){return{}}mount(t){this.current=t,cr.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))),ur.current||function(){if(ur.current=!0,a)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>lr.current=t.matches;t.addListener(e),e()}else lr.current=!1}(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||lr.current),"production"!==process.env.NODE_ENV&&Vi(!0!==this.shouldReduceMotion,"You have Reduced Motion enabled on your device. Animations may not appear as expected."),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){cr.delete(this.current),this.projection&&this.projection.unmount(),Xt(this.notifyUpdate),Xt(this.render),this.valueSubscriptions.forEach((t=>t())),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)this.features[t].unmount();this.current=null}bindToMotionValue(t,e){const n=U.has(t),i=e.on("change",(e=>{this.latestValues[t]=e,this.props.onUpdate&&Ht.update(this.notifyUpdate,!1,!0),n&&this.projection&&(this.projection.isTransformDirty=!0)})),s=e.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(t,(()=>{i(),s()}))}sortNodePosition(t){return this.current&&this.sortInstanceNodePosition&&this.type===t.type?this.sortInstanceNodePosition(this.current,t.current):0}loadFeatures({children:t,...e},n,i,s){let o,r;if("production"!==process.env.NODE_ENV&&i&&n){const t="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";e.ignoreStrict?we(!1,t):Te(!1,t)}for(let t=0;t<dr;t++){const n=hr[t],{isEnabled:i,Feature:s,ProjectionNode:a,MeasureLayout:l}=M[n];a&&(o=a),i(e)&&(!this.features[n]&&s&&(this.features[n]=new s(this)),l&&(r=l))}if(("html"===this.type||"svg"===this.type)&&!this.projection&&o){this.projection=new o(this.latestValues,this.parent&&this.parent.projection);const{layoutId:t,layout:n,drag:i,dragConstraints:r,layoutScroll:a,layoutRoot:l}=e;this.projection.setOptions({layoutId:t,layout:n,alwaysMeasureLayout:Boolean(i)||r&&x(r),visualElement:this,scheduleRender:()=>this.scheduleRender(),animationType:"string"==typeof n?n:"both",initialPromotionConfig:s,layoutScroll:a,layoutRoot:l})}return r}updateFeatures(){for(const t in this.features){const e=this.features[t];e.isMounted?e.update():(e.mount(),e.isMounted=!0)}}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):vs()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,e){this.latestValues[t]=e}makeTargetAnimatable(t,e=!0){return this.makeTargetAnimatableFromInstance(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<pr.length;e++){const n=pr[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){const{willChange:i}=e;for(const s in e){const o=e[s],r=n[s];if(W(o))t.addValue(s,o),wi(i)&&i.add(s),"development"===process.env.NODE_ENV&&Vi("11.0.8"===o.version,`Attempting to mix Framer Motion versions ${o.version} with 11.0.8 may not work as expected.`);else if(W(r))t.addValue(s,Di(o,{owner:t})),wi(i)&&i.remove(s);else if(r!==o)if(t.hasValue(s)){const e=t.getValue(s);!e.hasAnimated&&e.set(o)}else{const e=t.getStaticValue(s);t.addValue(s,Di(void 0!==e?e:o,{owner:t}))}}for(const i in n)void 0===e[i]&&t.removeValue(i);return e}(this,this.scrapeMotionValuesFromProps(t,this.prevProps),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}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}getVariantContext(t=!1){if(t)return this.parent?this.parent.getVariantContext():void 0;if(!this.isControllingVariants){const t=this.parent&&this.parent.getVariantContext()||{};return void 0!==this.props.initial&&(t.initial=this.props.initial),t}const e={};for(let t=0;t<mr;t++){const n=T[t],i=this.props[n];(b(i)||!1===i)&&(e[n]=i)}return e}addVariantChild(t){const e=this.getClosestVariantNode();if(e)return e.variantChildren&&e.variantChildren.add(t),()=>e.variantChildren.delete(t)}addValue(t,e){e!==this.values.get(t)&&(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=Di(e,{owner:this}),this.addValue(t,n)),n}readValue(t){var e;return void 0===this.latestValues[t]&&this.current?null!==(e=this.getBaseTargetFromProps(this.props,t))&&void 0!==e?e:this.readValueFromInstance(this.current,t,this.options):this.latestValues[t]}setBaseTarget(t,e){this.baseTarget[t]=e}getBaseTarget(t){var e;const{initial:n}=this.props,i="string"==typeof n||"object"==typeof n?null===(e=Ot(this.props,n))||void 0===e?void 0:e[t]:void 0;if(n&&void 0!==i)return i;const s=this.getBaseTargetFromProps(this.props,t);return void 0===s||W(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 Ai),this.events[t].add(e)}notify(t,...e){this.events[t]&&this.events[t].notify(...e)}}class gr extends fr{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]}makeTargetAnimatableFromInstance({transition:t,transitionEnd:e,...n},i){const s=function(t,e,n){const i={};for(const s in t){const t=Bi(s,e);if(void 0!==t)i[s]=t;else{const t=n.getValue(s);t&&(i[s]=t.get())}}return i}(n,t||{},this);if(i){!function(t,e,n){var i,s;const o=Object.keys(e).filter((e=>!t.hasValue(e))),r=o.length;var a;if(r)for(let l=0;l<r;l++){const r=o[l],u=e[r];let c=null;Array.isArray(u)&&(c=u[0]),null===c&&(c=null!==(s=null!==(i=n[r])&&void 0!==i?i:t.readValue(r))&&void 0!==s?s:e[r]),null!=c&&("string"==typeof c&&(Ti(c)||yi(c))?c=parseFloat(c):(a=c,!Li.find(Fi(a))&&Pn.test(u)&&(c=vi(r,u))),t.addValue(r,Di(c,{owner:t})),void 0===n[r]&&(n[r]=c),null!==c&&t.setBaseTarget(r,c))}}(this,n,s);const t=ar(this,n,s,e);e=t.transitionEnd,n=t.target}return{transition:t,transitionEnd:e,...n}}}class vr extends gr{constructor(){super(...arguments),this.type="html"}readValueFromInstance(t,e){if(U.has(e)){const t=gi(e);return t&&t.default||0}{const i=(n=t,window.getComputedStyle(n)),s=(X(e)?i.getPropertyValue(e):i[e])||0;return"string"==typeof s?s.trim():s}var n}measureInstanceViewportBox(t,{transformPagePoint:e}){return js(t,e)}build(t,e,n,i){ft(t,e,n,i.transformTemplate)}scrapeMotionValuesFromProps(t,e){return jt(t,e)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;W(t)&&(this.childSubscription=t.on("change",(t=>{this.current&&(this.current.textContent=`${t}`)})))}renderInstance(t,e,n,i){Rt(t,e,n,i)}}class yr extends gr{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1}getBaseTargetFromProps(t,e){return t[e]}readValueFromInstance(t,e){if(U.has(e)){const t=gi(e);return t&&t.default||0}return e=kt.has(e)?e:c(e),t.getAttribute(e)}measureInstanceViewportBox(){return vs()}scrapeMotionValuesFromProps(t,e){return Bt(t,e)}build(t,e,n,i){Ct(t,e,n,this.isSVGTag,i.transformTemplate)}renderInstance(t,e,n,i){Lt(t,e,0,i)}mount(t){this.isSVGTag=Mt(t.tagName),super.mount(t)}}const xr=(t,e)=>O(t)?new yr(e,{enableHardwareAcceleration:!1}):new vr(e,{enableHardwareAcceleration:!0}),br={...qi,...xe,...Yo,...{layout:{ProjectionNode:Xo,MeasureLayout:Xs}}},Pr=j(((t,e)=>function(t,{forwardMotionProps:e=!1},n,i){return{...O(t)?qt:Zt,preloadedFeatures:n,useRender:Ft(e),createVisualElement:i,Component:t}}(t,e,br,xr)));function wr(t){var e,n,i="";if("string"==typeof t||"number"==typeof t)i+=t;else if("object"==typeof t)if(Array.isArray(t)){var s=t.length;for(e=0;e<s;e++)t[e]&&(n=wr(t[e]))&&(i&&(i+=" "),i+=n)}else for(n in t)t[n]&&(i&&(i+=" "),i+=n);return i}function Tr(){for(var t,e,n=0,i="",s=arguments.length;n<s;n++)(t=arguments[n])&&(e=wr(t))&&(i&&(i+=" "),i+=e);return i}var Er={outer:"textField-module_outer__yOnxl",container:"textField-module_container__dwME5",label:"textField-module_label__Pb0Yj",input:"textField-module_input__R8QTX",inputDescription:"textField-module_inputDescription__nc-XC","container--error":"textField-module_container--error__CJ8JR",error:"textField-module_error__OWiII",helper:"textField-module_helper__arACk",rightContent:"textField-module_rightContent__6xW-l",leftContent:"textField-module_leftContent__XrivE","input--focus":"textField-module_input--focus__ngCQF","input--hover":"textField-module_input--hover__wo5JR"};!function(t,e){void 0===e&&(e={});var n=e.insertAt;if(t&&"undefined"!=typeof document){var i=document.head||document.getElementsByTagName("head")[0],s=document.createElement("style");s.type="text/css","top"===n&&i.firstChild?i.insertBefore(s,i.firstChild):i.appendChild(s),s.styleSheet?s.styleSheet.cssText=t:s.appendChild(document.createTextNode(t))}}(".textField-module_outer__yOnxl {\n margin-bottom: 1rem;\n}\n\n.textField-module_container__dwME5 {\n position: relative;\n display: flex;\n flex-direction: column;\n}\n\n.textField-module_label__Pb0Yj {\n position: absolute;\n z-index: 3;\n left: 1.25rem;\n color: #666666;\n pointer-events: none;\n}\n\n.textField-module_input__R8QTX {\n all: unset;\n background: white;\n padding: 1rem 1.25rem;\n padding-top: 1.70rem;\n border-radius: var(--product-radius-2);\n z-index: 1;\n font-size: 1.125rem;\n caret-color: var(--primary-love-pink-100);\n}\n\n.textField-module_inputDescription__nc-XC {\n display: flex;\n flex-direction: column;\n gap: 0.5rem;\n padding-top: 0.5rem;\n padding-left: 1.5rem;\n}\n\n.textField-module_container--error__CJ8JR > label {\n color: var(--product-error);\n}\n\n.textField-module_container--error__CJ8JR > input {\n border: var(--product-border-width-1) solid var(--product-error);\n}\n\n.textField-module_error__OWiII {\n color: var(--product-error);\n}\n\n.textField-module_helper__arACk {\n color: rgba(var(--grey-60-rgb));\n}\n\n.textField-module_rightContent__6xW-l {\n position: absolute;\n right: 1.5rem;\n top: 50%;\n transform: translateY(-50%);\n z-index: 2;\n}\n\n.textField-module_leftContent__XrivE {\n position: absolute;\n left: 1.5rem;\n top: 50%;\n transform: translateY(-50%);\n z-index: 2;\n}\n\n\n.textField-module_input__R8QTX:focus {\n border: var(--product-border-width-1) solid rgba(var(--primary-dark-rgb));\n}\n\n.textField-module_input--focus__ngCQF {\n border: var(--product-border-width-1) solid rgba(var(--primary-dark-rgb));\n}\n\n.textField-module_input__R8QTX:hover {\n outline: var(--product-border-width-1) solid #E6E6E6;\n}\n\n.textField-module_input--hover__wo5JR {\n outline: var(--product-border-width-1) solid #E6E6E6;\n}\n\n.textField-module_input__R8QTX:disabled {\n background: #E6E6E6;\n cursor: not-allowed;\n}\n\n.textField-module_input__R8QTX:disabled:hover {\n outline: none;\n}\n\n\n\n @media (min-width: 768px) {\n .textField-module_input__R8QTX {\n padding: 1.5rem;\n padding-top: 1.8rem;\n font-size: 1.25rem;\n }\n\n .textField-module_label__Pb0Yj {\n left: 1.5rem;\n }\n}\n\n\n\n\n\n\n\n");exports.TextField=function(e){var n=e.id,s=e.label,o=e.helper,r=e.error,a=e.register,l=e.name,u=e.type,c=e.prefix,h=e.suffix,d=e.disabled,p=e.value,m=e.className,f=e.rightContent,g=e.leftContent,v=function(){var e=t.useState({width:600,height:void 0}),n=e[0],i=e[1];return t.useEffect((function(){function t(){i({width:window.innerWidth||600,height:window.innerHeight})}return window.addEventListener("resize",t,{passive:!0}),t(),function(){return window.removeEventListener("resize",t)}}),[]),n}().width,y=t.useState(p||!1),x=y[0],b=y[1],P=v>768,w={focused:{fontSize:P?"1rem":"0.875rem",top:"1rem"},notFocused:{transform:"translateY(-50%)",fontSize:P?"1.25rem":"1.125rem",top:"50%"}};return t.createElement("div",{className:Er.outer},t.createElement("div",{className:Tr(Er.container,r&&Er["container--error"])},t.createElement(Pr.label,{className:Er.label,initial:"notFocused",variants:w,htmlFor:"input-".concat(n),animate:x?"focused":"notFocused"},c&&t.createElement("span",null,c)," ",s," ",h&&t.createElement("span",null,h)),t.createElement("input",i({className:Tr(Er["input--".concat(m)],Er.input),id:"input-".concat(n),type:u,"aria-describedby":"error-".concat(n),disabled:d},(a&&a(l),{onFocus:function(){b(!0)},onBlur:function(t){b(!!t.target.value)}}),{value:p})),t.createElement("div",null,f&&t.createElement("div",{className:Er.rightContent},f),g&&t.createElement("div",{className:Er.leftContent},g))),t.createElement("div",{className:Er.inputDescription},o&&t.createElement("span",{id:"feedback-".concat(n),className:Er.helper},o.message),r&&t.createElement("span",{id:"error-".concat(n),className:Er.error},r.message)))};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|