@3sc/common-component 0.0.140 → 0.0.141

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.umd.js CHANGED
@@ -245,7 +245,7 @@ const theme2 = createTheme({ palette: {
245
245
  ${f}px !important;
246
246
  top: ${u}px !important;
247
247
  }
248
- `),()=>{document.head.removeChild(g)}},[t]),b.jsx(XO,{isPresent:t,childRef:r,sizeRef:s,children:S.cloneElement(e,{ref:r})})}const YO=({children:e,initial:t,isPresent:n,onExitComplete:o,custom:r,presenceAffectsLayout:s,mode:a,anchorX:c})=>{const l=Hc(ZO),u=P.useId(),d=P.useCallback(f=>{l.set(f,!0);for(const g of l.values())if(!g)return;o&&o()},[l,o]),p=P.useMemo(()=>({id:u,initial:t,isPresent:n,custom:r,onExitComplete:d,register:f=>(l.set(f,!1),()=>l.delete(f))}),s?[Math.random(),d]:[n,d]);return P.useMemo(()=>{l.forEach((f,g)=>l.set(g,!1))},[n]),S.useEffect(()=>{!n&&!l.size&&o&&o()},[n]),a==="popLayout"&&(e=b.jsx(UO,{isPresent:n,anchorX:c,children:e})),b.jsx(aa.Provider,{value:p,children:e})};function ZO(){return new Map}function Zm(e=!0){const t=P.useContext(aa);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:o,register:r}=t,s=P.useId();P.useEffect(()=>{if(e)return r(s)},[e]);const a=P.useCallback(()=>e&&o&&o(s),[s,o,e]);return!n&&o?[!1,a]:[!0]}const la=e=>e.key||"";function Jm(e){const t=[];return P.Children.forEach(e,n=>{P.isValidElement(n)&&t.push(n)}),t}const Uc=typeof window<"u",qm=Uc?P.useLayoutEffect:P.useEffect,ca=({children:e,custom:t,initial:n=!0,onExitComplete:o,presenceAffectsLayout:r=!0,mode:s="sync",propagate:a=!1,anchorX:c="left"})=>{const[l,u]=Zm(a),d=P.useMemo(()=>Jm(e),[e]),p=a&&!l?[]:d.map(la),f=P.useRef(!0),g=P.useRef(d),m=Hc(()=>new Map),[h,v]=P.useState(d),[y,T]=P.useState(d);qm(()=>{f.current=!1,g.current=d;for(let x=0;x<y.length;x++){const w=la(y[x]);p.includes(w)?m.delete(w):m.get(w)!==!0&&m.set(w,!1)}},[y,p.length,p.join("-")]);const C=[];if(d!==h){let x=[...d];for(let w=0;w<y.length;w++){const R=y[w],A=la(R);p.includes(A)||(x.splice(w,0,R),C.push(R))}return s==="wait"&&C.length&&(x=C),T(Jm(x)),v(d),null}process.env.NODE_ENV!=="production"&&s==="wait"&&y.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`);const{forceRender:I}=P.useContext(zc);return b.jsx(b.Fragment,{children:y.map(x=>{const w=la(x),R=a&&!l?!1:d===y||p.includes(w),A=()=>{if(m.has(w))m.set(w,!0);else return;let M=!0;m.forEach(N=>{N||(M=!1)}),M&&(I==null||I(),T(g.current),a&&(u==null||u()),o&&o())};return b.jsx(YO,{isPresent:R,initial:!f.current||n?void 0:!1,custom:t,presenceAffectsLayout:r,mode:s,onExitComplete:R?void 0:A,anchorX:c,children:x},w)})})},Wt=e=>e;let dr=Wt,to=Wt;process.env.NODE_ENV!=="production"&&(dr=(e,t)=>{!e&&typeof console<"u"&&console.warn(t)},to=(e,t)=>{if(!e)throw new Error(t)});function Yc(e){let t;return()=>(t===void 0&&(t=e()),t)}const pr=(e,t,n)=>{const o=t-e;return o===0?1:(n-e)/o},Mn=e=>e*1e3,_n=e=>e/1e3,JO={useManualTiming:!1},ua=["read","resolveKeyframes","update","preRender","render","postRender"],Km={value:null};function qO(e,t){let n=new Set,o=new Set,r=!1,s=!1;const a=new WeakSet;let c={delta:0,timestamp:0,isProcessing:!1},l=0;function u(p){a.has(p)&&(d.schedule(p),e()),l++,p(c)}const d={schedule:(p,f=!1,g=!1)=>{const h=g&&r?n:o;return f&&a.add(p),h.has(p)||h.add(p),p},cancel:p=>{o.delete(p),a.delete(p)},process:p=>{if(c=p,r){s=!0;return}r=!0,[n,o]=[o,n],n.forEach(u),t&&Km.value&&Km.value.frameloop[t].push(l),l=0,n.clear(),r=!1,s&&(s=!1,d.process(p))}};return d}const KO=40;function Qm(e,t){let n=!1,o=!0;const r={delta:0,timestamp:0,isProcessing:!1},s=()=>n=!0,a=ua.reduce((y,T)=>(y[T]=qO(s,t?T:void 0),y),{}),{read:c,resolveKeyframes:l,update:u,preRender:d,render:p,postRender:f}=a,g=()=>{const y=performance.now();n=!1,r.delta=o?1e3/60:Math.max(Math.min(y-r.timestamp,KO),1),r.timestamp=y,r.isProcessing=!0,c.process(r),l.process(r),u.process(r),d.process(r),p.process(r),f.process(r),r.isProcessing=!1,n&&t&&(o=!1,e(g))},m=()=>{n=!0,o=!0,r.isProcessing||e(g)};return{schedule:ua.reduce((y,T)=>{const C=a[T];return y[T]=(I,x=!1,w=!1)=>(n||m(),C.schedule(I,x,w)),y},{}),cancel:y=>{for(let T=0;T<ua.length;T++)a[ua[T]].cancel(y)},state:r,steps:a}}const{schedule:Ke,cancel:no,state:Et,steps:Zc}=Qm(typeof requestAnimationFrame<"u"?requestAnimationFrame:Wt,!0),eg=P.createContext({strict:!1}),tg={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"]},fr={};for(const e in tg)fr[e]={isEnabled:t=>tg[e].some(n=>!!t[n])};function QO(e){for(const t in e)fr[t]={...fr[t],...e[t]}}const eP=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 da(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||eP.has(e)}let ng=e=>!da(e);function tP(e){e&&(ng=t=>t.startsWith("on")?!da(t):e(t))}try{tP(require("@emotion/is-prop-valid").default)}catch{}function nP(e,t,n){const o={};for(const r in e)r==="values"&&typeof e.values=="object"||(ng(r)||n===!0&&da(r)||!t&&!da(r)||e.draggable&&r.startsWith("onDrag"))&&(o[r]=e[r]);return o}const og=new Set;function pa(e,t,n){e||og.has(t)||(console.warn(t),og.add(t))}function oP(e){if(typeof Proxy>"u")return e;const t=new Map,n=(...o)=>(process.env.NODE_ENV!=="production"&&pa(!1,"motion() is deprecated. Use motion.create() instead."),e(...o));return new Proxy(n,{get:(o,r)=>r==="create"?e:(t.has(r)||t.set(r,e(r)),t.get(r))})}const fa=P.createContext({});function ha(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function vi(e){return typeof e=="string"||Array.isArray(e)}const Jc=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],qc=["initial",...Jc];function ma(e){return ha(e.animate)||qc.some(t=>vi(e[t]))}function rg(e){return!!(ma(e)||e.variants)}function rP(e,t){if(ma(e)){const{initial:n,animate:o}=e;return{initial:n===!1||vi(n)?n:void 0,animate:vi(o)?o:void 0}}return e.inherit!==!1?t:{}}function iP(e){const{initial:t,animate:n}=rP(e,P.useContext(fa));return P.useMemo(()=>({initial:t,animate:n}),[ig(t),ig(n)])}function ig(e){return Array.isArray(e)?e.join(" "):e}const sP=Symbol.for("motionComponentSymbol");function hr(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function aP(e,t,n){return P.useCallback(o=>{o&&e.onMount&&e.onMount(o),t&&(o?t.mount(o):t.unmount()),n&&(typeof n=="function"?n(o):hr(n)&&(n.current=o))},[t])}const Kc=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),sg="data-"+Kc("framerAppearId"),{schedule:Qc}=Qm(queueMicrotask,!1),ag=P.createContext({});function lP(e,t,n,o,r){var s,a;const{visualElement:c}=P.useContext(fa),l=P.useContext(eg),u=P.useContext(aa),d=P.useContext(Xc).reducedMotion,p=P.useRef(null);o=o||l.renderer,!p.current&&o&&(p.current=o(e,{visualState:t,parent:c,props:n,presenceContext:u,blockInitialAnimation:u?u.initial===!1:!1,reducedMotionConfig:d}));const f=p.current,g=P.useContext(ag);f&&!f.projection&&r&&(f.type==="html"||f.type==="svg")&&cP(p.current,n,r,g);const m=P.useRef(!1);P.useInsertionEffect(()=>{f&&m.current&&f.update(n,u)});const h=n[sg],v=P.useRef(!!h&&!(!((s=window.MotionHandoffIsComplete)===null||s===void 0)&&s.call(window,h))&&((a=window.MotionHasOptimisedAnimation)===null||a===void 0?void 0:a.call(window,h)));return qm(()=>{f&&(m.current=!0,window.MotionIsMounted=!0,f.updateFeatures(),Qc.render(f.render),v.current&&f.animationState&&f.animationState.animateChanges())}),P.useEffect(()=>{f&&(!v.current&&f.animationState&&f.animationState.animateChanges(),v.current&&(queueMicrotask(()=>{var y;(y=window.MotionHandoffMarkAsComplete)===null||y===void 0||y.call(window,h)}),v.current=!1))}),f}function cP(e,t,n,o){const{layoutId:r,layout:s,drag:a,dragConstraints:c,layoutScroll:l,layoutRoot:u}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:lg(e.parent)),e.projection.setOptions({layoutId:r,layout:s,alwaysMeasureLayout:!!a||c&&hr(c),visualElement:e,animationType:typeof s=="string"?s:"both",initialPromotionConfig:o,layoutScroll:l,layoutRoot:u})}function lg(e){if(e)return e.options.allowProjection!==!1?e.projection:lg(e.parent)}function uP({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:o,Component:r}){var s,a;e&&QO(e);function c(u,d){let p;const f={...P.useContext(Xc),...u,layoutId:dP(u)},{isStatic:g}=f,m=iP(u),h=o(u,g);if(!g&&Uc){pP(f,e);const v=fP(f);p=v.MeasureLayout,m.visualElement=lP(r,h,f,t,v.ProjectionNode)}return b.jsxs(fa.Provider,{value:m,children:[p&&m.visualElement?b.jsx(p,{visualElement:m.visualElement,...f}):null,n(r,u,aP(h,m.visualElement,d),h,g,m.visualElement)]})}c.displayName=`motion.${typeof r=="string"?r:`create(${(a=(s=r.displayName)!==null&&s!==void 0?s:r.name)!==null&&a!==void 0?a:""})`}`;const l=P.forwardRef(c);return l[sP]=r,l}function dP({layoutId:e}){const t=P.useContext(zc).id;return t&&e!==void 0?t+"-"+e:e}function pP(e,t){const n=P.useContext(eg).strict;if(process.env.NODE_ENV!=="production"&&t&&n){const o="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";e.ignoreStrict?dr(!1,o):to(!1,o)}}function fP(e){const{drag:t,layout:n}=fr;if(!t&&!n)return{};const o={...t,...n};return{MeasureLayout:t!=null&&t.isEnabled(e)||n!=null&&n.isEnabled(e)?o.MeasureLayout:void 0,ProjectionNode:o.ProjectionNode}}const cg=e=>t=>typeof t=="string"&&t.startsWith(e),eu=cg("--"),hP=cg("var(--"),tu=e=>hP(e)?mP.test(e.split("/*")[0].trim()):!1,mP=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,yi={};function gP(e){for(const t in e)yi[t]=e[t],eu(t)&&(yi[t].isCSSVariable=!0)}const mr=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],To=new Set(mr);function ug(e,{layout:t,layoutId:n}){return To.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!yi[e]||e==="opacity")}const Rt=e=>!!(e&&e.getVelocity),dg=(e,t)=>t&&typeof e=="number"?t.transform(e):e,$n=(e,t,n)=>n>t?t:n<e?e:n,gr={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},xi={...gr,transform:e=>$n(0,1,e)},ga={...gr,default:1},Ci=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),oo=Ci("deg"),Nn=Ci("%"),Ce=Ci("px"),bP=Ci("vh"),vP=Ci("vw"),pg={...Nn,parse:e=>Nn.parse(e)/100,transform:e=>Nn.transform(e*100)},yP={borderWidth:Ce,borderTopWidth:Ce,borderRightWidth:Ce,borderBottomWidth:Ce,borderLeftWidth:Ce,borderRadius:Ce,radius:Ce,borderTopLeftRadius:Ce,borderTopRightRadius:Ce,borderBottomRightRadius:Ce,borderBottomLeftRadius:Ce,width:Ce,maxWidth:Ce,height:Ce,maxHeight:Ce,top:Ce,right:Ce,bottom:Ce,left:Ce,padding:Ce,paddingTop:Ce,paddingRight:Ce,paddingBottom:Ce,paddingLeft:Ce,margin:Ce,marginTop:Ce,marginRight:Ce,marginBottom:Ce,marginLeft:Ce,backgroundPositionX:Ce,backgroundPositionY:Ce},xP={rotate:oo,rotateX:oo,rotateY:oo,rotateZ:oo,scale:ga,scaleX:ga,scaleY:ga,scaleZ:ga,skew:oo,skewX:oo,skewY:oo,distance:Ce,translateX:Ce,translateY:Ce,translateZ:Ce,x:Ce,y:Ce,z:Ce,perspective:Ce,transformPerspective:Ce,opacity:xi,originX:pg,originY:pg,originZ:Ce},fg={...gr,transform:Math.round},nu={...yP,...xP,zIndex:fg,size:Ce,fillOpacity:xi,strokeOpacity:xi,numOctaves:fg},CP={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},EP=mr.length;function IP(e,t,n){let o="",r=!0;for(let s=0;s<EP;s++){const a=mr[s],c=e[a];if(c===void 0)continue;let l=!0;if(typeof c=="number"?l=c===(a.startsWith("scale")?1:0):l=parseFloat(c)===0,!l||n){const u=dg(c,nu[a]);if(!l){r=!1;const d=CP[a]||a;o+=`${d}(${u}) `}n&&(t[a]=u)}}return o=o.trim(),n?o=n(t,r?"":o):r&&(o="none"),o}function ou(e,t,n){const{style:o,vars:r,transformOrigin:s}=e;let a=!1,c=!1;for(const l in t){const u=t[l];if(To.has(l)){a=!0;continue}else if(eu(l)){r[l]=u;continue}else{const d=dg(u,nu[l]);l.startsWith("origin")?(c=!0,s[l]=d):o[l]=d}}if(t.transform||(a||n?o.transform=IP(t,e.transform,n):o.transform&&(o.transform="none")),c){const{originX:l="50%",originY:u="50%",originZ:d=0}=s;o.transformOrigin=`${l} ${u} ${d}`}}const ru=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function hg(e,t,n){for(const o in t)!Rt(t[o])&&!ug(o,n)&&(e[o]=t[o])}function TP({transformTemplate:e},t){return P.useMemo(()=>{const n=ru();return ou(n,t,e),Object.assign({},n.vars,n.style)},[t])}function SP(e,t){const n=e.style||{},o={};return hg(o,n,e),Object.assign(o,TP(e,t)),o}function wP(e,t){const n={},o=SP(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,o.userSelect=o.WebkitUserSelect=o.WebkitTouchCallout="none",o.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=o,n}const RP=["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 iu(e){return typeof e!="string"||e.includes("-")?!1:!!(RP.indexOf(e)>-1||/[A-Z]/u.test(e))}const AP={offset:"stroke-dashoffset",array:"stroke-dasharray"},OP={offset:"strokeDashoffset",array:"strokeDasharray"};function PP(e,t,n=1,o=0,r=!0){e.pathLength=1;const s=r?AP:OP;e[s.offset]=Ce.transform(-o);const a=Ce.transform(t),c=Ce.transform(n);e[s.array]=`${a} ${c}`}function mg(e,t,n){return typeof e=="string"?e:Ce.transform(t+n*e)}function MP(e,t,n){const o=mg(t,e.x,e.width),r=mg(n,e.y,e.height);return`${o} ${r}`}function su(e,{attrX:t,attrY:n,attrScale:o,originX:r,originY:s,pathLength:a,pathSpacing:c=1,pathOffset:l=0,...u},d,p){if(ou(e,u,p),d){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:f,style:g,dimensions:m}=e;f.transform&&(m&&(g.transform=f.transform),delete f.transform),m&&(r!==void 0||s!==void 0||g.transform)&&(g.transformOrigin=MP(m,r!==void 0?r:.5,s!==void 0?s:.5)),t!==void 0&&(f.x=t),n!==void 0&&(f.y=n),o!==void 0&&(f.scale=o),a!==void 0&&PP(f,a,c,l,!1)}const gg=()=>({...ru(),attrs:{}}),au=e=>typeof e=="string"&&e.toLowerCase()==="svg";function NP(e,t,n,o){const r=P.useMemo(()=>{const s=gg();return su(s,t,au(o),e.transformTemplate),{...s.attrs,style:{...s.style}}},[t]);if(e.style){const s={};hg(s,e.style,e),r.style={...s,...r.style}}return r}function kP(e=!1){return(n,o,r,{latestValues:s},a)=>{const l=(iu(n)?NP:wP)(o,s,a,n),u=nP(o,typeof n=="string",e),d=n!==P.Fragment?{...u,...l,ref:r}:{},{children:p}=o,f=P.useMemo(()=>Rt(p)?p.get():p,[p]);return P.createElement(n,{...d,children:f})}}function bg(e){const t=[{},{}];return e==null||e.values.forEach((n,o)=>{t[0][o]=n.get(),t[1][o]=n.getVelocity()}),t}function lu(e,t,n,o){if(typeof t=="function"){const[r,s]=bg(o);t=t(n!==void 0?n:e.custom,r,s)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[r,s]=bg(o);t=t(n!==void 0?n:e.custom,r,s)}return t}const cu=e=>Array.isArray(e),DP=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),BP=e=>cu(e)?e[e.length-1]||0:e;function ba(e){const t=Rt(e)?e.get():e;return DP(t)?t.toValue():t}function jP({scrapeMotionValuesFromProps:e,createRenderState:t,onUpdate:n},o,r,s){const a={latestValues:FP(o,r,s,e),renderState:t()};return n&&(a.onMount=c=>n({props:o,current:c,...a}),a.onUpdate=c=>n(c)),a}const vg=e=>(t,n)=>{const o=P.useContext(fa),r=P.useContext(aa),s=()=>jP(e,t,o,r);return n?s():Hc(s)};function FP(e,t,n,o){const r={},s=o(e,{});for(const f in s)r[f]=ba(s[f]);let{initial:a,animate:c}=e;const l=ma(e),u=rg(e);t&&u&&!l&&e.inherit!==!1&&(a===void 0&&(a=t.initial),c===void 0&&(c=t.animate));let d=n?n.initial===!1:!1;d=d||a===!1;const p=d?c:a;if(p&&typeof p!="boolean"&&!ha(p)){const f=Array.isArray(p)?p:[p];for(let g=0;g<f.length;g++){const m=lu(e,f[g]);if(m){const{transitionEnd:h,transition:v,...y}=m;for(const T in y){let C=y[T];if(Array.isArray(C)){const I=d?C.length-1:0;C=C[I]}C!==null&&(r[T]=C)}for(const T in h)r[T]=h[T]}}}return r}function uu(e,t,n){var o;const{style:r}=e,s={};for(const a in r)(Rt(r[a])||t.style&&Rt(t.style[a])||ug(a,e)||((o=n==null?void 0:n.getValue(a))===null||o===void 0?void 0:o.liveStyle)!==void 0)&&(s[a]=r[a]);return s}const VP={useVisualState:vg({scrapeMotionValuesFromProps:uu,createRenderState:ru})};function yg(e,t){try{t.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{t.dimensions={x:0,y:0,width:0,height:0}}}function xg(e,{style:t,vars:n},o,r){Object.assign(e.style,t,r&&r.getProjectionStyles(o));for(const s in n)e.style.setProperty(s,n[s])}const Cg=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 Eg(e,t,n,o){xg(e,t,void 0,o);for(const r in t.attrs)e.setAttribute(Cg.has(r)?r:Kc(r),t.attrs[r])}function Ig(e,t,n){const o=uu(e,t,n);for(const r in e)if(Rt(e[r])||Rt(t[r])){const s=mr.indexOf(r)!==-1?"attr"+r.charAt(0).toUpperCase()+r.substring(1):r;o[s]=e[r]}return o}const Tg=["x","y","width","height","cx","cy","r"],LP={useVisualState:vg({scrapeMotionValuesFromProps:Ig,createRenderState:gg,onUpdate:({props:e,prevProps:t,current:n,renderState:o,latestValues:r})=>{if(!n)return;let s=!!e.drag;if(!s){for(const c in r)if(To.has(c)){s=!0;break}}if(!s)return;let a=!t;if(t)for(let c=0;c<Tg.length;c++){const l=Tg[c];e[l]!==t[l]&&(a=!0)}a&&Ke.read(()=>{yg(n,o),Ke.render(()=>{su(o,r,au(n.tagName),e.transformTemplate),Eg(n,o)})})}})};function _P(e,t){return function(o,{forwardMotionProps:r}={forwardMotionProps:!1}){const a={...iu(o)?LP:VP,preloadedFeatures:e,useRender:kP(r),createVisualElement:t,Component:o};return uP(a)}}function Ei(e,t,n){const o=e.getProps();return lu(o,t,n!==void 0?n:o.custom,e)}const $P=Yc(()=>window.ScrollTimeline!==void 0);class GP{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>"finished"in t?t.finished:t))}getAll(t){return this.animations[0][t]}setAll(t,n){for(let o=0;o<this.animations.length;o++)this.animations[o][t]=n}attachTimeline(t,n){const o=this.animations.map(r=>{if($P()&&r.attachTimeline)return r.attachTimeline(t);if(typeof n=="function")return n(r)});return()=>{o.forEach((r,s)=>{r&&r(),this.animations[s].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let n=0;n<this.animations.length;n++)t=Math.max(t,this.animations[n].duration);return t}runAll(t){this.animations.forEach(n=>n[t]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class WP extends GP{then(t,n){return Promise.all(this.animations).then(t).catch(n)}}function du(e,t){return e?e[t]||e.default||e:void 0}const pu=2e4;function Sg(e){let t=0;const n=50;let o=e.next(t);for(;!o.done&&t<pu;)t+=n,o=e.next(t);return t>=pu?1/0:t}function fu(e){return typeof e=="function"}function wg(e,t){e.timeline=t,e.onfinish=null}const hu=e=>Array.isArray(e)&&typeof e[0]=="number",zP={linearEasing:void 0};function HP(e,t){const n=Yc(e);return()=>{var o;return(o=zP[t])!==null&&o!==void 0?o:n()}}const va=HP(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Rg=(e,t,n=10)=>{let o="";const r=Math.max(Math.round(t/n),2);for(let s=0;s<r;s++)o+=e(pr(0,r-1,s))+", ";return`linear(${o.substring(0,o.length-2)})`};function Ag(e){return!!(typeof e=="function"&&va()||!e||typeof e=="string"&&(e in mu||va())||hu(e)||Array.isArray(e)&&e.every(Ag))}const Ii=([e,t,n,o])=>`cubic-bezier(${e}, ${t}, ${n}, ${o})`,mu={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Ii([0,.65,.55,1]),circOut:Ii([.55,0,1,.45]),backIn:Ii([.31,.01,.66,-.59]),backOut:Ii([.33,1.53,.69,.99])};function Og(e,t){if(e)return typeof e=="function"&&va()?Rg(e,t):hu(e)?Ii(e):Array.isArray(e)?e.map(n=>Og(n,t)||mu.easeOut):mu[e]}const yn={x:!1,y:!1};function Pg(){return yn.x||yn.y}function XP(e,t,n){var o;if(e instanceof EventTarget)return[e];if(typeof e=="string"){let r=document;const s=(o=void 0)!==null&&o!==void 0?o:r.querySelectorAll(e);return s?Array.from(s):[]}return Array.from(e)}function Mg(e,t){const n=XP(e),o=new AbortController,r={passive:!0,...t,signal:o.signal};return[n,r,()=>o.abort()]}function Ng(e){return!(e.pointerType==="touch"||Pg())}function UP(e,t,n={}){const[o,r,s]=Mg(e,n),a=c=>{if(!Ng(c))return;const{target:l}=c,u=t(l,c);if(typeof u!="function"||!l)return;const d=p=>{Ng(p)&&(u(p),l.removeEventListener("pointerleave",d))};l.addEventListener("pointerleave",d,r)};return o.forEach(c=>{c.addEventListener("pointerenter",a,r)}),s}function Ti(e,t){const n=`${t}PointerCapture`;if(e.target instanceof Element&&n in e.target&&e.pointerId!==void 0)try{e.target[n](e.pointerId)}catch{}}const kg=(e,t)=>t?e===t?!0:kg(e,t.parentElement):!1,gu=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,YP=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function ZP(e){return YP.has(e.tagName)||e.tabIndex!==-1}const Si=new WeakSet;function Dg(e){return t=>{t.key==="Enter"&&e(t)}}function bu(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const JP=(e,t)=>{const n=e.currentTarget;if(!n)return;const o=Dg(()=>{if(Si.has(n))return;bu(n,"down");const r=Dg(()=>{bu(n,"up")}),s=()=>bu(n,"cancel");n.addEventListener("keyup",r,t),n.addEventListener("blur",s,t)});n.addEventListener("keydown",o,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",o),t)};function Bg(e){return gu(e)&&!Pg()}function qP(e,t,n={}){const[o,r,s]=Mg(e,n),a=c=>{const l=c.currentTarget;if(!l||!Bg(c)||Si.has(l))return;Si.add(l),Ti(c,"set");const u=t(l,c),d=(g,m)=>{l.removeEventListener("pointerup",p),l.removeEventListener("pointercancel",f),Ti(g,"release"),!(!Bg(g)||!Si.has(l))&&(Si.delete(l),typeof u=="function"&&u(g,{success:m}))},p=g=>{(g.isTrusted?KP(g,l instanceof Element?l.getBoundingClientRect():{left:0,top:0,right:window.innerWidth,bottom:window.innerHeight}):!1)?d(g,!1):d(g,!(l instanceof Element)||kg(l,g.target))},f=g=>{d(g,!1)};l.addEventListener("pointerup",p,r),l.addEventListener("pointercancel",f,r),l.addEventListener("lostpointercapture",f,r)};return o.forEach(c=>{c=n.useGlobalTarget?window:c;let l=!1;c instanceof HTMLElement&&(l=!0,!ZP(c)&&c.getAttribute("tabindex")===null&&(c.tabIndex=0)),c.addEventListener("pointerdown",a,r),l&&c.addEventListener("focus",u=>JP(u,r),r)}),s}function KP(e,t){return e.clientX<t.left||e.clientX>t.right||e.clientY<t.top||e.clientY>t.bottom}function QP(e){return e==="x"||e==="y"?yn[e]?null:(yn[e]=!0,()=>{yn[e]=!1}):yn.x||yn.y?null:(yn.x=yn.y=!0,()=>{yn.x=yn.y=!1})}const jg=new Set(["width","height","top","left","right","bottom",...mr]);let ya;function eM(){ya=void 0}const kn={now:()=>(ya===void 0&&kn.set(Et.isProcessing||JO.useManualTiming?Et.timestamp:performance.now()),ya),set:e=>{ya=e,queueMicrotask(eM)}};function vu(e,t){e.indexOf(t)===-1&&e.push(t)}function yu(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class xu{constructor(){this.subscriptions=[]}add(t){return vu(this.subscriptions,t),()=>yu(this.subscriptions,t)}notify(t,n,o){const r=this.subscriptions.length;if(r)if(r===1)this.subscriptions[0](t,n,o);else for(let s=0;s<r;s++){const a=this.subscriptions[s];a&&a(t,n,o)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}function Fg(e,t){return t?e*(1e3/t):0}const Vg=30,tM=e=>!isNaN(parseFloat(e));class nM{constructor(t,n={}){this.version="12.4.10",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(o,r=!0)=>{const s=kn.now();this.updatedAt!==s&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(o),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),r&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=kn.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=tM(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&pa(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new xu);const o=this.events[t].add(n);return t==="change"?()=>{o(),Ke.read(()=>{this.events.change.getSize()||this.stop()})}:o}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,o){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-o}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=kn.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Vg)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Vg);return Fg(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function wi(e,t){return new nM(e,t)}function oM(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,wi(n))}function rM(e,t){const n=Ei(e,t);let{transitionEnd:o={},transition:r={},...s}=n||{};s={...s,...o};for(const a in s){const c=BP(s[a]);oM(e,a,c)}}function iM(e){return!!(Rt(e)&&e.add)}function Cu(e,t){const n=e.getValue("willChange");if(iM(n))return n.add(t)}function Lg(e){return e.props[sg]}const _g=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,sM=1e-7,aM=12;function lM(e,t,n,o,r){let s,a,c=0;do a=t+(n-t)/2,s=_g(a,o,r)-e,s>0?n=a:t=a;while(Math.abs(s)>sM&&++c<aM);return a}function Ri(e,t,n,o){if(e===t&&n===o)return Wt;const r=s=>lM(s,0,1,e,n);return s=>s===0||s===1?s:_g(r(s),t,o)}const $g=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Gg=e=>t=>1-e(1-t),Wg=Ri(.33,1.53,.69,.99),Eu=Gg(Wg),zg=$g(Eu),Hg=e=>(e*=2)<1?.5*Eu(e):.5*(2-Math.pow(2,-10*(e-1))),Iu=e=>1-Math.sin(Math.acos(e)),Xg=Gg(Iu),Ug=$g(Iu),Yg=e=>/^0[^.\s]+$/u.test(e);function cM(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||Yg(e):!0}const Ai=e=>Math.round(e*1e5)/1e5,Tu=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function uM(e){return e==null}const dM=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Su=(e,t)=>n=>!!(typeof n=="string"&&dM.test(n)&&n.startsWith(e)||t&&!uM(n)&&Object.prototype.hasOwnProperty.call(n,t)),Zg=(e,t,n)=>o=>{if(typeof o!="string")return o;const[r,s,a,c]=o.match(Tu);return{[e]:parseFloat(r),[t]:parseFloat(s),[n]:parseFloat(a),alpha:c!==void 0?parseFloat(c):1}},pM=e=>$n(0,255,e),wu={...gr,transform:e=>Math.round(pM(e))},So={test:Su("rgb","red"),parse:Zg("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:o=1})=>"rgba("+wu.transform(e)+", "+wu.transform(t)+", "+wu.transform(n)+", "+Ai(xi.transform(o))+")"};function fM(e){let t="",n="",o="",r="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),o=e.substring(5,7),r=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),o=e.substring(3,4),r=e.substring(4,5),t+=t,n+=n,o+=o,r+=r),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(o,16),alpha:r?parseInt(r,16)/255:1}}const Ru={test:Su("#"),parse:fM,transform:So.transform},br={test:Su("hsl","hue"),parse:Zg("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:o=1})=>"hsla("+Math.round(e)+", "+Nn.transform(Ai(t))+", "+Nn.transform(Ai(n))+", "+Ai(xi.transform(o))+")"},At={test:e=>So.test(e)||Ru.test(e)||br.test(e),parse:e=>So.test(e)?So.parse(e):br.test(e)?br.parse(e):Ru.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?So.transform(e):br.transform(e)},hM=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function mM(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(Tu))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(hM))===null||n===void 0?void 0:n.length)||0)>0}const Jg="number",qg="color",gM="var",bM="var(",Kg="${}",vM=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Oi(e){const t=e.toString(),n=[],o={color:[],number:[],var:[]},r=[];let s=0;const c=t.replace(vM,l=>(At.test(l)?(o.color.push(s),r.push(qg),n.push(At.parse(l))):l.startsWith(bM)?(o.var.push(s),r.push(gM),n.push(l)):(o.number.push(s),r.push(Jg),n.push(parseFloat(l))),++s,Kg)).split(Kg);return{values:n,split:c,indexes:o,types:r}}function Qg(e){return Oi(e).values}function eb(e){const{split:t,types:n}=Oi(e),o=t.length;return r=>{let s="";for(let a=0;a<o;a++)if(s+=t[a],r[a]!==void 0){const c=n[a];c===Jg?s+=Ai(r[a]):c===qg?s+=At.transform(r[a]):s+=r[a]}return s}}const yM=e=>typeof e=="number"?0:e;function xM(e){const t=Qg(e);return eb(e)(t.map(yM))}const ro={test:mM,parse:Qg,createTransformer:eb,getAnimatableNone:xM},CM=new Set(["brightness","contrast","saturate","opacity"]);function EM(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[o]=n.match(Tu)||[];if(!o)return e;const r=n.replace(o,"");let s=CM.has(t)?1:0;return o!==n&&(s*=100),t+"("+s+r+")"}const IM=/\b([a-z-]*)\(.*?\)/gu,Au={...ro,getAnimatableNone:e=>{const t=e.match(IM);return t?t.map(EM).join(" "):e}},TM={...nu,color:At,backgroundColor:At,outlineColor:At,fill:At,stroke:At,borderColor:At,borderTopColor:At,borderRightColor:At,borderBottomColor:At,borderLeftColor:At,filter:Au,WebkitFilter:Au},Ou=e=>TM[e];function tb(e,t){let n=Ou(e);return n!==Au&&(n=ro),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const SM=new Set(["auto","none","0"]);function wM(e,t,n){let o=0,r;for(;o<e.length&&!r;){const s=e[o];typeof s=="string"&&!SM.has(s)&&Oi(s).values.length&&(r=e[o]),o++}if(r&&n)for(const s of t)e[s]=tb(n,r)}const nb=e=>e===gr||e===Ce,ob=(e,t)=>parseFloat(e.split(", ")[t]),rb=(e,t)=>(n,{transform:o})=>{if(o==="none"||!o)return 0;const r=o.match(/^matrix3d\((.+)\)$/u);if(r)return ob(r[1],t);{const s=o.match(/^matrix\((.+)\)$/u);return s?ob(s[1],e):0}},RM=new Set(["x","y","z"]),AM=mr.filter(e=>!RM.has(e));function OM(e){const t=[];return AM.forEach(n=>{const o=e.getValue(n);o!==void 0&&(t.push([n,o.get()]),o.set(n.startsWith("scale")?1:0))}),t}const vr={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:rb(4,13),y:rb(5,14)};vr.translateX=vr.x,vr.translateY=vr.y;const wo=new Set;let Pu=!1,Mu=!1;function ib(){if(Mu){const e=Array.from(wo).filter(o=>o.needsMeasurement),t=new Set(e.map(o=>o.element)),n=new Map;t.forEach(o=>{const r=OM(o);r.length&&(n.set(o,r),o.render())}),e.forEach(o=>o.measureInitialState()),t.forEach(o=>{o.render();const r=n.get(o);r&&r.forEach(([s,a])=>{var c;(c=o.getValue(s))===null||c===void 0||c.set(a)})}),e.forEach(o=>o.measureEndState()),e.forEach(o=>{o.suspendedScrollY!==void 0&&window.scrollTo(0,o.suspendedScrollY)})}Mu=!1,Pu=!1,wo.forEach(e=>e.complete()),wo.clear()}function sb(){wo.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Mu=!0)})}function PM(){sb(),ib()}class Nu{constructor(t,n,o,r,s,a=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=o,this.motionValue=r,this.element=s,this.isAsync=a}scheduleResolve(){this.isScheduled=!0,this.isAsync?(wo.add(this),Pu||(Pu=!0,Ke.read(sb),Ke.resolveKeyframes(ib))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:o,motionValue:r}=this;for(let s=0;s<t.length;s++)if(t[s]===null)if(s===0){const a=r==null?void 0:r.get(),c=t[t.length-1];if(a!==void 0)t[0]=a;else if(o&&n){const l=o.readValue(n,c);l!=null&&(t[0]=l)}t[0]===void 0&&(t[0]=c),r&&a===void 0&&r.set(t[0])}else t[s]=t[s-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),wo.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,wo.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const ab=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),MM=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function NM(e){const t=MM.exec(e);if(!t)return[,];const[,n,o,r]=t;return[`--${n??o}`,r]}const kM=4;function lb(e,t,n=1){to(n<=kM,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);const[o,r]=NM(e);if(!o)return;const s=window.getComputedStyle(t).getPropertyValue(o);if(s){const a=s.trim();return ab(a)?parseFloat(a):a}return tu(r)?lb(r,t,n+1):r}const cb=e=>t=>t.test(e),ub=[gr,Ce,Nn,oo,vP,bP,{test:e=>e==="auto",parse:e=>e}],db=e=>ub.find(cb(e));class pb extends Nu{constructor(t,n,o,r,s){super(t,n,o,r,s,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:o}=this;if(!n||!n.current)return;super.readKeyframes();for(let l=0;l<t.length;l++){let u=t[l];if(typeof u=="string"&&(u=u.trim(),tu(u))){const d=lb(u,n.current);d!==void 0&&(t[l]=d),l===t.length-1&&(this.finalKeyframe=u)}}if(this.resolveNoneKeyframes(),!jg.has(o)||t.length!==2)return;const[r,s]=t,a=db(r),c=db(s);if(a!==c)if(nb(a)&&nb(c))for(let l=0;l<t.length;l++){const u=t[l];typeof u=="string"&&(t[l]=parseFloat(u))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,o=[];for(let r=0;r<t.length;r++)cM(t[r])&&o.push(r);o.length&&wM(t,o,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:o}=this;if(!t||!t.current)return;o==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=vr[o](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const r=n[n.length-1];r!==void 0&&t.getValue(o,r).jump(r,!1)}measureEndState(){var t;const{element:n,name:o,unresolvedKeyframes:r}=this;if(!n||!n.current)return;const s=n.getValue(o);s&&s.jump(this.measuredOrigin,!1);const a=r.length-1,c=r[a];r[a]=vr[o](n.measureViewportBox(),window.getComputedStyle(n.current)),c!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=c),!((t=this.removedTransforms)===null||t===void 0)&&t.length&&this.removedTransforms.forEach(([l,u])=>{n.getValue(l).set(u)}),this.resolveNoneKeyframes()}}const fb=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(ro.test(e)||e==="0")&&!e.startsWith("url("));function DM(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function BM(e,t,n,o){const r=e[0];if(r===null)return!1;if(t==="display"||t==="visibility")return!0;const s=e[e.length-1],a=fb(r,t),c=fb(s,t);return dr(a===c,`You are trying to animate ${t} from "${r}" to "${s}". ${r} is not an animatable value - to enable this animation set ${r} to a value animatable to ${s} via the \`style\` property.`),!a||!c?!1:DM(e)||(n==="spring"||fu(n))&&o}const jM=e=>e!==null;function xa(e,{repeat:t,repeatType:n="loop"},o){const r=e.filter(jM),s=t&&n!=="loop"&&t%2===1?0:r.length-1;return!s||o===void 0?r[s]:o}const FM=40;class hb{constructor({autoplay:t=!0,delay:n=0,type:o="keyframes",repeat:r=0,repeatDelay:s=0,repeatType:a="loop",...c}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=kn.now(),this.options={autoplay:t,delay:n,type:o,repeat:r,repeatDelay:s,repeatType:a,...c},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>FM?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&PM(),this._resolved}onKeyframesResolved(t,n){this.resolvedAt=kn.now(),this.hasAttemptedResolve=!0;const{name:o,type:r,velocity:s,delay:a,onComplete:c,onUpdate:l,isGenerator:u}=this.options;if(!u&&!BM(t,o,r,s))if(a)this.options.duration=0;else{l&&l(xa(t,this.options,n)),c&&c(),this.resolveFinishedPromise();return}const d=this.initPlayback(t,n);d!==!1&&(this._resolved={keyframes:t,finalKeyframe:n,...d},this.onPostResolved())}onPostResolved(){}then(t,n){return this.currentFinishedPromise.then(t,n)}flatten(){this.options.type="keyframes",this.options.ease="linear"}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}const lt=(e,t,n)=>e+(t-e)*n;function ku(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function VM({hue:e,saturation:t,lightness:n,alpha:o}){e/=360,t/=100,n/=100;let r=0,s=0,a=0;if(!t)r=s=a=n;else{const c=n<.5?n*(1+t):n+t-n*t,l=2*n-c;r=ku(l,c,e+1/3),s=ku(l,c,e),a=ku(l,c,e-1/3)}return{red:Math.round(r*255),green:Math.round(s*255),blue:Math.round(a*255),alpha:o}}function Ca(e,t){return n=>n>0?t:e}const Du=(e,t,n)=>{const o=e*e,r=n*(t*t-o)+o;return r<0?0:Math.sqrt(r)},LM=[Ru,So,br],_M=e=>LM.find(t=>t.test(e));function mb(e){const t=_M(e);if(dr(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`),!t)return!1;let n=t.parse(e);return t===br&&(n=VM(n)),n}const gb=(e,t)=>{const n=mb(e),o=mb(t);if(!n||!o)return Ca(e,t);const r={...n};return s=>(r.red=Du(n.red,o.red,s),r.green=Du(n.green,o.green,s),r.blue=Du(n.blue,o.blue,s),r.alpha=lt(n.alpha,o.alpha,s),So.transform(r))},$M=(e,t)=>n=>t(e(n)),Pi=(...e)=>e.reduce($M),Bu=new Set(["none","hidden"]);function GM(e,t){return Bu.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function WM(e,t){return n=>lt(e,t,n)}function ju(e){return typeof e=="number"?WM:typeof e=="string"?tu(e)?Ca:At.test(e)?gb:XM:Array.isArray(e)?bb:typeof e=="object"?At.test(e)?gb:zM:Ca}function bb(e,t){const n=[...e],o=n.length,r=e.map((s,a)=>ju(s)(s,t[a]));return s=>{for(let a=0;a<o;a++)n[a]=r[a](s);return n}}function zM(e,t){const n={...e,...t},o={};for(const r in n)e[r]!==void 0&&t[r]!==void 0&&(o[r]=ju(e[r])(e[r],t[r]));return r=>{for(const s in o)n[s]=o[s](r);return n}}function HM(e,t){var n;const o=[],r={color:0,var:0,number:0};for(let s=0;s<t.values.length;s++){const a=t.types[s],c=e.indexes[a][r[a]],l=(n=e.values[c])!==null&&n!==void 0?n:0;o[s]=l,r[a]++}return o}const XM=(e,t)=>{const n=ro.createTransformer(t),o=Oi(e),r=Oi(t);return o.indexes.var.length===r.indexes.var.length&&o.indexes.color.length===r.indexes.color.length&&o.indexes.number.length>=r.indexes.number.length?Bu.has(e)&&!r.values.length||Bu.has(t)&&!o.values.length?GM(e,t):Pi(bb(HM(o,r),r.values),n):(dr(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),Ca(e,t))};function vb(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?lt(e,t,n):ju(e)(e,t)}const UM=5;function yb(e,t,n){const o=Math.max(t-UM,0);return Fg(n-e(o),t-o)}const ct={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},xb=.001;function YM({duration:e=ct.duration,bounce:t=ct.bounce,velocity:n=ct.velocity,mass:o=ct.mass}){let r,s;dr(e<=Mn(ct.maxDuration),"Spring duration must be 10 seconds or less");let a=1-t;a=$n(ct.minDamping,ct.maxDamping,a),e=$n(ct.minDuration,ct.maxDuration,_n(e)),a<1?(r=u=>{const d=u*a,p=d*e,f=d-n,g=Fu(u,a),m=Math.exp(-p);return xb-f/g*m},s=u=>{const p=u*a*e,f=p*n+n,g=Math.pow(a,2)*Math.pow(u,2)*e,m=Math.exp(-p),h=Fu(Math.pow(u,2),a);return(-r(u)+xb>0?-1:1)*((f-g)*m)/h}):(r=u=>{const d=Math.exp(-u*e),p=(u-n)*e+1;return-.001+d*p},s=u=>{const d=Math.exp(-u*e),p=(n-u)*(e*e);return d*p});const c=5/e,l=JM(r,s,c);if(e=Mn(e),isNaN(l))return{stiffness:ct.stiffness,damping:ct.damping,duration:e};{const u=Math.pow(l,2)*o;return{stiffness:u,damping:a*2*Math.sqrt(o*u),duration:e}}}const ZM=12;function JM(e,t,n){let o=n;for(let r=1;r<ZM;r++)o=o-e(o)/t(o);return o}function Fu(e,t){return e*Math.sqrt(1-t*t)}const qM=["duration","bounce"],KM=["stiffness","damping","mass"];function Cb(e,t){return t.some(n=>e[n]!==void 0)}function QM(e){let t={velocity:ct.velocity,stiffness:ct.stiffness,damping:ct.damping,mass:ct.mass,isResolvedFromDuration:!1,...e};if(!Cb(e,KM)&&Cb(e,qM))if(e.visualDuration){const n=e.visualDuration,o=2*Math.PI/(n*1.2),r=o*o,s=2*$n(.05,1,1-(e.bounce||0))*Math.sqrt(r);t={...t,mass:ct.mass,stiffness:r,damping:s}}else{const n=YM(e);t={...t,...n,mass:ct.mass},t.isResolvedFromDuration=!0}return t}function Eb(e=ct.visualDuration,t=ct.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:o,restDelta:r}=n;const s=n.keyframes[0],a=n.keyframes[n.keyframes.length-1],c={done:!1,value:s},{stiffness:l,damping:u,mass:d,duration:p,velocity:f,isResolvedFromDuration:g}=QM({...n,velocity:-_n(n.velocity||0)}),m=f||0,h=u/(2*Math.sqrt(l*d)),v=a-s,y=_n(Math.sqrt(l/d)),T=Math.abs(v)<5;o||(o=T?ct.restSpeed.granular:ct.restSpeed.default),r||(r=T?ct.restDelta.granular:ct.restDelta.default);let C;if(h<1){const x=Fu(y,h);C=w=>{const R=Math.exp(-h*y*w);return a-R*((m+h*y*v)/x*Math.sin(x*w)+v*Math.cos(x*w))}}else if(h===1)C=x=>a-Math.exp(-y*x)*(v+(m+y*v)*x);else{const x=y*Math.sqrt(h*h-1);C=w=>{const R=Math.exp(-h*y*w),A=Math.min(x*w,300);return a-R*((m+h*y*v)*Math.sinh(A)+x*v*Math.cosh(A))/x}}const I={calculatedDuration:g&&p||null,next:x=>{const w=C(x);if(g)c.done=x>=p;else{let R=0;h<1&&(R=x===0?Mn(m):yb(C,x,w));const A=Math.abs(R)<=o,M=Math.abs(a-w)<=r;c.done=A&&M}return c.value=c.done?a:w,c},toString:()=>{const x=Math.min(Sg(I),pu),w=Rg(R=>I.next(x*R).value,x,30);return x+"ms "+w}};return I}function Ib({keyframes:e,velocity:t=0,power:n=.8,timeConstant:o=325,bounceDamping:r=10,bounceStiffness:s=500,modifyTarget:a,min:c,max:l,restDelta:u=.5,restSpeed:d}){const p=e[0],f={done:!1,value:p},g=A=>c!==void 0&&A<c||l!==void 0&&A>l,m=A=>c===void 0?l:l===void 0||Math.abs(c-A)<Math.abs(l-A)?c:l;let h=n*t;const v=p+h,y=a===void 0?v:a(v);y!==v&&(h=y-p);const T=A=>-h*Math.exp(-A/o),C=A=>y+T(A),I=A=>{const M=T(A),N=C(A);f.done=Math.abs(M)<=u,f.value=f.done?y:N};let x,w;const R=A=>{g(f.value)&&(x=A,w=Eb({keyframes:[f.value,m(f.value)],velocity:yb(C,A,f.value),damping:r,stiffness:s,restDelta:u,restSpeed:d}))};return R(0),{calculatedDuration:null,next:A=>{let M=!1;return!w&&x===void 0&&(M=!0,I(A),R(A)),x!==void 0&&A>=x?w.next(A-x):(!M&&I(A),f)}}}const e5=Ri(.42,0,1,1),t5=Ri(0,0,.58,1),Tb=Ri(.42,0,.58,1),n5=e=>Array.isArray(e)&&typeof e[0]!="number",Sb={linear:Wt,easeIn:e5,easeInOut:Tb,easeOut:t5,circIn:Iu,circInOut:Ug,circOut:Xg,backIn:Eu,backInOut:zg,backOut:Wg,anticipate:Hg},wb=e=>{if(hu(e)){to(e.length===4,"Cubic bezier arrays must contain four numerical values.");const[t,n,o,r]=e;return Ri(t,n,o,r)}else if(typeof e=="string")return to(Sb[e]!==void 0,`Invalid easing type '${e}'`),Sb[e];return e};function o5(e,t,n){const o=[],r=n||vb,s=e.length-1;for(let a=0;a<s;a++){let c=r(e[a],e[a+1]);if(t){const l=Array.isArray(t)?t[a]||Wt:t;c=Pi(l,c)}o.push(c)}return o}function r5(e,t,{clamp:n=!0,ease:o,mixer:r}={}){const s=e.length;if(to(s===t.length,"Both input and output ranges must be the same length"),s===1)return()=>t[0];if(s===2&&t[0]===t[1])return()=>t[1];const a=e[0]===e[1];e[0]>e[s-1]&&(e=[...e].reverse(),t=[...t].reverse());const c=o5(t,o,r),l=c.length,u=d=>{if(a&&d<e[0])return t[0];let p=0;if(l>1)for(;p<e.length-2&&!(d<e[p+1]);p++);const f=pr(e[p],e[p+1],d);return c[p](f)};return n?d=>u($n(e[0],e[s-1],d)):u}function i5(e,t){const n=e[e.length-1];for(let o=1;o<=t;o++){const r=pr(0,t,o);e.push(lt(n,1,r))}}function s5(e){const t=[0];return i5(t,e.length-1),t}function a5(e,t){return e.map(n=>n*t)}function l5(e,t){return e.map(()=>t||Tb).splice(0,e.length-1)}function Mi({duration:e=300,keyframes:t,times:n,ease:o="easeInOut"}){const r=n5(o)?o.map(wb):wb(o),s={done:!1,value:t[0]},a=a5(n&&n.length===t.length?n:s5(t),e),c=r5(a,t,{ease:Array.isArray(r)?r:l5(t,r)});return{calculatedDuration:e,next:l=>(s.value=c(l),s.done=l>=e,s)}}const c5=e=>{const t=({timestamp:n})=>e(n);return{start:()=>Ke.update(t,!0),stop:()=>no(t),now:()=>Et.isProcessing?Et.timestamp:kn.now()}},u5={decay:Ib,inertia:Ib,tween:Mi,keyframes:Mi,spring:Eb},d5=e=>e/100;class Vu extends hb{constructor(t){super(t),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:l}=this.options;l&&l()};const{name:n,motionValue:o,element:r,keyframes:s}=this.options,a=(r==null?void 0:r.KeyframeResolver)||Nu,c=(l,u)=>this.onKeyframesResolved(l,u);this.resolver=new a(s,c,n,o,r),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(t){const{type:n="keyframes",repeat:o=0,repeatDelay:r=0,repeatType:s,velocity:a=0}=this.options,c=fu(n)?n:u5[n]||Mi;let l,u;process.env.NODE_ENV!=="production"&&c!==Mi&&to(t.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${t}`),c!==Mi&&typeof t[0]!="number"&&(l=Pi(d5,vb(t[0],t[1])),t=[0,100]);const d=c({...this.options,keyframes:t});s==="mirror"&&(u=c({...this.options,keyframes:[...t].reverse(),velocity:-a})),d.calculatedDuration===null&&(d.calculatedDuration=Sg(d));const{calculatedDuration:p}=d,f=p+r,g=f*(o+1)-r;return{generator:d,mirroredGenerator:u,mapPercentToKeyframes:l,calculatedDuration:p,resolvedDuration:f,totalDuration:g}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!t?this.pause():this.state=this.pendingPlayState}tick(t,n=!1){const{resolved:o}=this;if(!o){const{keyframes:A}=this.options;return{done:!0,value:A[A.length-1]}}const{finalKeyframe:r,generator:s,mirroredGenerator:a,mapPercentToKeyframes:c,keyframes:l,calculatedDuration:u,totalDuration:d,resolvedDuration:p}=o;if(this.startTime===null)return s.next(0);const{delay:f,repeat:g,repeatType:m,repeatDelay:h,onUpdate:v}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-d/this.speed,this.startTime)),n?this.currentTime=t:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const y=this.currentTime-f*(this.speed>=0?1:-1),T=this.speed>=0?y<0:y>d;this.currentTime=Math.max(y,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=d);let C=this.currentTime,I=s;if(g){const A=Math.min(this.currentTime,d)/p;let M=Math.floor(A),N=A%1;!N&&A>=1&&(N=1),N===1&&M--,M=Math.min(M,g+1),!!(M%2)&&(m==="reverse"?(N=1-N,h&&(N-=h/p)):m==="mirror"&&(I=a)),C=$n(0,1,N)*p}const x=T?{done:!1,value:l[0]}:I.next(C);c&&(x.value=c(x.value));let{done:w}=x;!T&&u!==null&&(w=this.speed>=0?this.currentTime>=d:this.currentTime<=0);const R=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&w);return R&&r!==void 0&&(x.value=xa(l,this.options,r)),v&&v(x.value),R&&this.finish(),x}get duration(){const{resolved:t}=this;return t?_n(t.calculatedDuration):0}get time(){return _n(this.currentTime)}set time(t){t=Mn(t),this.currentTime=t,this.holdTime!==null||this.speed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.speed)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=_n(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=c5,onPlay:n,startTime:o}=this.options;this.driver||(this.driver=t(s=>this.tick(s))),n&&n();const r=this.driver.now();this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=r):this.startTime=o??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var t;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(t=this.currentTime)!==null&&t!==void 0?t:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}}const p5=new Set(["opacity","clipPath","filter","transform"]);function f5(e,t,n,{delay:o=0,duration:r=300,repeat:s=0,repeatType:a="loop",ease:c="easeInOut",times:l}={}){const u={[t]:n};l&&(u.offset=l);const d=Og(c,r);return Array.isArray(d)&&(u.easing=d),e.animate(u,{delay:o,duration:r,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:s+1,direction:a==="reverse"?"alternate":"normal"})}const h5=Yc(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),Ea=10,m5=2e4;function g5(e){return fu(e.type)||e.type==="spring"||!Ag(e.ease)}function b5(e,t){const n=new Vu({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let o={done:!1,value:e[0]};const r=[];let s=0;for(;!o.done&&s<m5;)o=n.sample(s),r.push(o.value),s+=Ea;return{times:void 0,keyframes:r,duration:s-Ea,ease:"linear"}}const Rb={anticipate:Hg,backInOut:zg,circInOut:Ug};function v5(e){return e in Rb}class Ab extends hb{constructor(t){super(t);const{name:n,motionValue:o,element:r,keyframes:s}=this.options;this.resolver=new pb(s,(a,c)=>this.onKeyframesResolved(a,c),n,o,r),this.resolver.scheduleResolve()}initPlayback(t,n){let{duration:o=300,times:r,ease:s,type:a,motionValue:c,name:l,startTime:u}=this.options;if(!c.owner||!c.owner.current)return!1;if(typeof s=="string"&&va()&&v5(s)&&(s=Rb[s]),g5(this.options)){const{onComplete:p,onUpdate:f,motionValue:g,element:m,...h}=this.options,v=b5(t,h);t=v.keyframes,t.length===1&&(t[1]=t[0]),o=v.duration,r=v.times,s=v.ease,a="keyframes"}const d=f5(c.owner.current,l,t,{...this.options,duration:o,times:r,ease:s});return d.startTime=u??this.calcStartTime(),this.pendingTimeline?(wg(d,this.pendingTimeline),this.pendingTimeline=void 0):d.onfinish=()=>{const{onComplete:p}=this.options;c.set(xa(t,this.options,n)),p&&p(),this.cancel(),this.resolveFinishedPromise()},{animation:d,duration:o,times:r,type:a,ease:s,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:n}=t;return _n(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return _n(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:o}=n;o.currentTime=Mn(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:n}=t;return n.playbackRate}set speed(t){const{resolved:n}=this;if(!n)return;const{animation:o}=n;o.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:n}=t;return n.playState}get startTime(){const{resolved:t}=this;if(!t)return null;const{animation:n}=t;return n.startTime}attachTimeline(t){if(!this._resolved)this.pendingTimeline=t;else{const{resolved:n}=this;if(!n)return Wt;const{animation:o}=n;wg(o,t)}return Wt}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:t}=this;if(!t)return;const{animation:n,keyframes:o,duration:r,type:s,ease:a,times:c}=t;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:u,onUpdate:d,onComplete:p,element:f,...g}=this.options,m=new Vu({...g,keyframes:o,duration:r,type:s,ease:a,times:c,isGenerator:!0}),h=Mn(this.time);u.setWithVelocity(m.sample(h-Ea).value,m.sample(h).value,Ea)}const{onStop:l}=this.options;l&&l(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:n,name:o,repeatDelay:r,repeatType:s,damping:a,type:c}=t;if(!n||!n.owner||!(n.owner.current instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:u}=n.owner.getProps();return h5()&&o&&p5.has(o)&&!l&&!u&&!r&&s!=="mirror"&&a!==0&&c!=="inertia"}}const y5={type:"spring",stiffness:500,damping:25,restSpeed:10},x5=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),C5={type:"keyframes",duration:.8},E5={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},I5=(e,{keyframes:t})=>t.length>2?C5:To.has(e)?e.startsWith("scale")?x5(t[1]):y5:E5;function T5({when:e,delay:t,delayChildren:n,staggerChildren:o,staggerDirection:r,repeat:s,repeatType:a,repeatDelay:c,from:l,elapsed:u,...d}){return!!Object.keys(d).length}const Lu=(e,t,n,o={},r,s)=>a=>{const c=du(o,e)||{},l=c.delay||o.delay||0;let{elapsed:u=0}=o;u=u-Mn(l);let d={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...c,delay:-u,onUpdate:f=>{t.set(f),c.onUpdate&&c.onUpdate(f)},onComplete:()=>{a(),c.onComplete&&c.onComplete()},name:e,motionValue:t,element:s?void 0:r};T5(c)||(d={...d,...I5(e,d)}),d.duration&&(d.duration=Mn(d.duration)),d.repeatDelay&&(d.repeatDelay=Mn(d.repeatDelay)),d.from!==void 0&&(d.keyframes[0]=d.from);let p=!1;if((d.type===!1||d.duration===0&&!d.repeatDelay)&&(d.duration=0,d.delay===0&&(p=!0)),p&&!s&&t.get()!==void 0){const f=xa(d.keyframes,c);if(f!==void 0)return Ke.update(()=>{d.onUpdate(f),d.onComplete()}),new WP([])}return!s&&Ab.supports(d)?new Ab(d):new Vu(d)};function S5({protectedKeys:e,needsAnimating:t},n){const o=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,o}function Ob(e,t,{delay:n=0,transitionOverride:o,type:r}={}){var s;let{transition:a=e.getDefaultTransition(),transitionEnd:c,...l}=t;o&&(a=o);const u=[],d=r&&e.animationState&&e.animationState.getState()[r];for(const p in l){const f=e.getValue(p,(s=e.latestValues[p])!==null&&s!==void 0?s:null),g=l[p];if(g===void 0||d&&S5(d,p))continue;const m={delay:n,...du(a||{},p)};let h=!1;if(window.MotionHandoffAnimation){const y=Lg(e);if(y){const T=window.MotionHandoffAnimation(y,p,Ke);T!==null&&(m.startTime=T,h=!0)}}Cu(e,p),f.start(Lu(p,f,g,e.shouldReduceMotion&&jg.has(p)?{type:!1}:m,e,h));const v=f.animation;v&&u.push(v)}return c&&Promise.all(u).then(()=>{Ke.update(()=>{c&&rM(e,c)})}),u}function _u(e,t,n={}){var o;const r=Ei(e,t,n.type==="exit"?(o=e.presenceContext)===null||o===void 0?void 0:o.custom:void 0);let{transition:s=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(s=n.transitionOverride);const a=r?()=>Promise.all(Ob(e,r,n)):()=>Promise.resolve(),c=e.variantChildren&&e.variantChildren.size?(u=0)=>{const{delayChildren:d=0,staggerChildren:p,staggerDirection:f}=s;return w5(e,t,d+u,p,f,n)}:()=>Promise.resolve(),{when:l}=s;if(l){const[u,d]=l==="beforeChildren"?[a,c]:[c,a];return u().then(()=>d())}else return Promise.all([a(),c(n.delay)])}function w5(e,t,n=0,o=0,r=1,s){const a=[],c=(e.variantChildren.size-1)*o,l=r===1?(u=0)=>u*o:(u=0)=>c-u*o;return Array.from(e.variantChildren).sort(R5).forEach((u,d)=>{u.notify("AnimationStart",t),a.push(_u(u,t,{...s,delay:n+l(d)}).then(()=>u.notify("AnimationComplete",t)))}),Promise.all(a)}function R5(e,t){return e.sortNodePosition(t)}function A5(e,t,n={}){e.notify("AnimationStart",t);let o;if(Array.isArray(t)){const r=t.map(s=>_u(e,s,n));o=Promise.all(r)}else if(typeof t=="string")o=_u(e,t,n);else{const r=typeof t=="function"?Ei(e,t,n.custom):t;o=Promise.all(Ob(e,r,n))}return o.then(()=>{e.notify("AnimationComplete",t)})}function Pb(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let o=0;o<n;o++)if(t[o]!==e[o])return!1;return!0}const O5=qc.length;function Mb(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?Mb(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<O5;n++){const o=qc[n],r=e.props[o];(vi(r)||r===!1)&&(t[o]=r)}return t}const P5=[...Jc].reverse(),M5=Jc.length;function N5(e){return t=>Promise.all(t.map(({animation:n,options:o})=>A5(e,n,o)))}function k5(e){let t=N5(e),n=Nb(),o=!0;const r=l=>(u,d)=>{var p;const f=Ei(e,d,l==="exit"?(p=e.presenceContext)===null||p===void 0?void 0:p.custom:void 0);if(f){const{transition:g,transitionEnd:m,...h}=f;u={...u,...h,...m}}return u};function s(l){t=l(e)}function a(l){const{props:u}=e,d=Mb(e.parent)||{},p=[],f=new Set;let g={},m=1/0;for(let v=0;v<M5;v++){const y=P5[v],T=n[y],C=u[y]!==void 0?u[y]:d[y],I=vi(C),x=y===l?T.isActive:null;x===!1&&(m=v);let w=C===d[y]&&C!==u[y]&&I;if(w&&o&&e.manuallyAnimateOnMount&&(w=!1),T.protectedKeys={...g},!T.isActive&&x===null||!C&&!T.prevProp||ha(C)||typeof C=="boolean")continue;const R=D5(T.prevProp,C);let A=R||y===l&&T.isActive&&!w&&I||v>m&&I,M=!1;const N=Array.isArray(C)?C:[C];let B=N.reduce(r(y),{});x===!1&&(B={});const{prevResolvedValues:W={}}=T,D={...W,...B},F=$=>{A=!0,f.has($)&&(M=!0,f.delete($)),T.needsAnimating[$]=!0;const V=e.getValue($);V&&(V.liveStyle=!1)};for(const $ in D){const V=B[$],Y=W[$];if(g.hasOwnProperty($))continue;let k=!1;cu(V)&&cu(Y)?k=!Pb(V,Y):k=V!==Y,k?V!=null?F($):f.add($):V!==void 0&&f.has($)?F($):T.protectedKeys[$]=!0}T.prevProp=C,T.prevResolvedValues=B,T.isActive&&(g={...g,...B}),o&&e.blockInitialAnimation&&(A=!1),A&&(!(w&&R)||M)&&p.push(...N.map($=>({animation:$,options:{type:y}})))}if(f.size){const v={};if(typeof u.initial!="boolean"){const y=Ei(e,Array.isArray(u.initial)?u.initial[0]:u.initial);y&&y.transition&&(v.transition=y.transition)}f.forEach(y=>{const T=e.getBaseTarget(y),C=e.getValue(y);C&&(C.liveStyle=!0),v[y]=T??null}),p.push({animation:v})}let h=!!p.length;return o&&(u.initial===!1||u.initial===u.animate)&&!e.manuallyAnimateOnMount&&(h=!1),o=!1,h?t(p):Promise.resolve()}function c(l,u){var d;if(n[l].isActive===u)return Promise.resolve();(d=e.variantChildren)===null||d===void 0||d.forEach(f=>{var g;return(g=f.animationState)===null||g===void 0?void 0:g.setActive(l,u)}),n[l].isActive=u;const p=a(l);for(const f in n)n[f].protectedKeys={};return p}return{animateChanges:a,setActive:c,setAnimateFunction:s,getState:()=>n,reset:()=>{n=Nb(),o=!0}}}function D5(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!Pb(t,e):!1}function Ro(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Nb(){return{animate:Ro(!0),whileInView:Ro(),whileHover:Ro(),whileTap:Ro(),whileDrag:Ro(),whileFocus:Ro(),exit:Ro()}}class io{constructor(t){this.isMounted=!1,this.node=t}update(){}}class B5 extends io{constructor(t){super(t),t.animationState||(t.animationState=k5(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();ha(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)===null||t===void 0||t.call(this)}}let j5=0;class F5 extends io{constructor(){super(...arguments),this.id=j5++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:o}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===o)return;const r=this.node.animationState.setActive("exit",!t);n&&!t&&r.then(()=>{n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const V5={animation:{Feature:B5},exit:{Feature:F5}};function Ni(e,t,n,o={passive:!0}){return e.addEventListener(t,n,o),()=>e.removeEventListener(t,n)}function ki(e){return{point:{x:e.pageX,y:e.pageY}}}const L5=e=>t=>gu(t)&&e(t,ki(t));function yr(e,t,n,o){return Ni(e,t,L5(n),o)}function kb({top:e,left:t,right:n,bottom:o}){return{x:{min:t,max:n},y:{min:e,max:o}}}function _5({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function $5(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),o=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:o.y,right:o.x}}const Db=1e-4,G5=1-Db,W5=1+Db,Bb=.01,z5=0-Bb,H5=0+Bb;function Ft(e){return e.max-e.min}function X5(e,t,n){return Math.abs(e-t)<=n}function jb(e,t,n,o=.5){e.origin=o,e.originPoint=lt(t.min,t.max,e.origin),e.scale=Ft(n)/Ft(t),e.translate=lt(n.min,n.max,e.origin)-e.originPoint,(e.scale>=G5&&e.scale<=W5||isNaN(e.scale))&&(e.scale=1),(e.translate>=z5&&e.translate<=H5||isNaN(e.translate))&&(e.translate=0)}function Di(e,t,n,o){jb(e.x,t.x,n.x,o?o.originX:void 0),jb(e.y,t.y,n.y,o?o.originY:void 0)}function Fb(e,t,n){e.min=n.min+t.min,e.max=e.min+Ft(t)}function U5(e,t,n){Fb(e.x,t.x,n.x),Fb(e.y,t.y,n.y)}function Vb(e,t,n){e.min=t.min-n.min,e.max=e.min+Ft(t)}function Bi(e,t,n){Vb(e.x,t.x,n.x),Vb(e.y,t.y,n.y)}const Lb=()=>({translate:0,scale:1,origin:0,originPoint:0}),xr=()=>({x:Lb(),y:Lb()}),_b=()=>({min:0,max:0}),gt=()=>({x:_b(),y:_b()});function dn(e){return[e("x"),e("y")]}function $u(e){return e===void 0||e===1}function Gu({scale:e,scaleX:t,scaleY:n}){return!$u(e)||!$u(t)||!$u(n)}function Ao(e){return Gu(e)||$b(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function $b(e){return Gb(e.x)||Gb(e.y)}function Gb(e){return e&&e!=="0%"}function Ia(e,t,n){const o=e-n,r=t*o;return n+r}function Wb(e,t,n,o,r){return r!==void 0&&(e=Ia(e,r,o)),Ia(e,n,o)+t}function Wu(e,t=0,n=1,o,r){e.min=Wb(e.min,t,n,o,r),e.max=Wb(e.max,t,n,o,r)}function zb(e,{x:t,y:n}){Wu(e.x,t.translate,t.scale,t.originPoint),Wu(e.y,n.translate,n.scale,n.originPoint)}const Hb=.999999999999,Xb=1.0000000000001;function Y5(e,t,n,o=!1){const r=n.length;if(!r)return;t.x=t.y=1;let s,a;for(let c=0;c<r;c++){s=n[c],a=s.projectionDelta;const{visualElement:l}=s.options;l&&l.props.style&&l.props.style.display==="contents"||(o&&s.options.layoutScroll&&s.scroll&&s!==s.root&&Er(e,{x:-s.scroll.offset.x,y:-s.scroll.offset.y}),a&&(t.x*=a.x.scale,t.y*=a.y.scale,zb(e,a)),o&&Ao(s.latestValues)&&Er(e,s.latestValues))}t.x<Xb&&t.x>Hb&&(t.x=1),t.y<Xb&&t.y>Hb&&(t.y=1)}function Cr(e,t){e.min=e.min+t,e.max=e.max+t}function Ub(e,t,n,o,r=.5){const s=lt(e.min,e.max,r);Wu(e,t,n,s,o)}function Er(e,t){Ub(e.x,t.x,t.scaleX,t.scale,t.originX),Ub(e.y,t.y,t.scaleY,t.scale,t.originY)}function Yb(e,t){return kb($5(e.getBoundingClientRect(),t))}function Z5(e,t,n){const o=Yb(e,n),{scroll:r}=t;return r&&(Cr(o.x,r.offset.x),Cr(o.y,r.offset.y)),o}const Zb=(e,t)=>Math.abs(e-t);function J5(e,t){const n=Zb(e.x,t.x),o=Zb(e.y,t.y);return Math.sqrt(n**2+o**2)}class Jb{constructor(t,n,{transformPagePoint:o,dragSnapToOrigin:r=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const d=Hu(this.lastMoveEventInfo,this.history),p=this.startEvent!==null,f=J5(d.offset,{x:0,y:0})>=3;if(!p&&!f)return;const{point:g}=d,{timestamp:m}=Et;this.history.push({...g,timestamp:m});const{onStart:h,onMove:v}=this.handlers;p||(h&&h(this.lastMoveEvent,d),this.startEvent=this.lastMoveEvent),v&&v(this.lastMoveEvent,d)},this.handlePointerMove=(d,p)=>{if(this.index=Qb(d.currentTarget),d.target instanceof Element&&d.target.hasPointerCapture&&d.pointerId!==void 0)try{if(!d.target.hasPointerCapture(d.pointerId))return}catch{}this.lastMoveEvent=d,this.lastMoveEventInfo=zu(p,this.transformPagePoint),Ke.update(this.updatePoint,!0)},this.handlePointerUp=(d,p)=>{Ti(d,"release"),this.end();const{onEnd:f,onSessionEnd:g,resumeAnimation:m}=this.handlers;if(this.dragSnapToOrigin&&m&&m(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const h=Hu(d.type==="pointercancel"||d.type==="lostpointercapture"?this.lastMoveEventInfo:zu(p,this.transformPagePoint),this.history);this.startEvent&&f&&f(d,h),g&&g(d,h)},!gu(t))return;this.dragSnapToOrigin=r,this.handlers=n,this.transformPagePoint=o;const s=ki(t),a=zu(s,this.transformPagePoint),{point:c}=a,{timestamp:l}=Et;this.history=[{...c,timestamp:l}];const{onSessionStart:u}=n;u&&u(t,Hu(a,this.history)),Ti(t,"set"),this.removeListeners=Pi(yr(t.currentTarget,"pointermove",this.handlePointerMove),yr(t.currentTarget,"pointerup",this.handlePointerUp),yr(t.currentTarget,"pointercancel",this.handlePointerUp),yr(t.currentTarget,"lostpointercapture",(d,p)=>{Qb(d.currentTarget)!==this.index?Ti(d,"set"):this.handlePointerUp(d,p)}))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),no(this.updatePoint)}}function zu(e,t){return t?{point:t(e.point)}:e}function qb(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Hu({point:e},t){return{point:e,delta:qb(e,Kb(t)),offset:qb(e,q5(t)),velocity:K5(t,.1)}}function q5(e){return e[0]}function Kb(e){return e[e.length-1]}function K5(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,o=null;const r=Kb(e);for(;n>=0&&(o=e[n],!(r.timestamp-o.timestamp>Mn(t)));)n--;if(!o)return{x:0,y:0};const s=_n(r.timestamp-o.timestamp);if(s===0)return{x:0,y:0};const a={x:(r.x-o.x)/s,y:(r.y-o.y)/s};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function Qb(e){return e.parentNode?Array.from(e.parentNode.children).indexOf(e):-1}function Q5(e,{min:t,max:n},o){return t!==void 0&&e<t?e=o?lt(t,e,o.min):Math.max(e,t):n!==void 0&&e>n&&(e=o?lt(n,e,o.max):Math.min(e,n)),e}function e0(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function eN(e,{top:t,left:n,bottom:o,right:r}){return{x:e0(e.x,n,r),y:e0(e.y,t,o)}}function t0(e,t){let n=t.min-e.min,o=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,o]=[o,n]),{min:n,max:o}}function tN(e,t){return{x:t0(e.x,t.x),y:t0(e.y,t.y)}}function nN(e,t){let n=.5;const o=Ft(e),r=Ft(t);return r>o?n=pr(t.min,t.max-o,e.min):o>r&&(n=pr(e.min,e.max-r,t.min)),$n(0,1,n)}function oN(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const Xu=.35;function rN(e=Xu){return e===!1?e=0:e===!0&&(e=Xu),{x:n0(e,"left","right"),y:n0(e,"top","bottom")}}function n0(e,t,n){return{min:o0(e,t),max:o0(e,n)}}function o0(e,t){return typeof e=="number"?e:e[t]||0}const iN=new WeakMap;class sN{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=gt(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:o}=this.visualElement;if(o&&o.isPresent===!1)return;const r=d=>{const{dragSnapToOrigin:p}=this.getProps();p?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(ki(d).point)},s=(d,p)=>{const{drag:f,dragPropagation:g,onDragStart:m}=this.getProps();if(f&&!g&&(this.openDragLock&&this.openDragLock(),this.openDragLock=QP(f),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),dn(v=>{let y=this.getAxisMotionValue(v).get()||0;if(Nn.test(y)){const{projection:T}=this.visualElement;if(T&&T.layout){const C=T.layout.layoutBox[v];C&&(y=Ft(C)*(parseFloat(y)/100))}}this.originPoint[v]=y}),m&&Ke.postRender(()=>m(d,p)),Cu(this.visualElement,"transform");const{animationState:h}=this.visualElement;h&&h.setActive("whileDrag",!0)},a=(d,p)=>{const{dragPropagation:f,dragDirectionLock:g,onDirectionLock:m,onDrag:h}=this.getProps();if(!f&&!this.openDragLock)return;const{offset:v}=p;if(g&&this.currentDirection===null){this.currentDirection=aN(v),this.currentDirection!==null&&m&&m(this.currentDirection);return}this.updateAxis("x",p.point,v),this.updateAxis("y",p.point,v),this.visualElement.render(),h&&h(d,p)},c=(d,p)=>this.stop(d,p),l=()=>dn(d=>{var p;return this.getAnimationState(d)==="paused"&&((p=this.getAxisMotionValue(d).animation)===null||p===void 0?void 0:p.play())}),{dragSnapToOrigin:u}=this.getProps();this.panSession=new Jb(t,{onSessionStart:r,onStart:s,onMove:a,onSessionEnd:c,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u})}stop(t,n){const o=this.isDragging;if(this.cancel(),!o)return;const{velocity:r}=n;this.startAnimation(r);const{onDragEnd:s}=this.getProps();s&&Ke.postRender(()=>s(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:o}=this.getProps();!o&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,o){const{drag:r}=this.getProps();if(!o||!Ta(t,r,this.currentDirection))return;const s=this.getAxisMotionValue(t);let a=this.originPoint[t]+o[t];this.constraints&&this.constraints[t]&&(a=Q5(a,this.constraints[t],this.elastic[t])),s.set(a)}resolveConstraints(){var t;const{dragConstraints:n,dragElastic:o}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(t=this.visualElement.projection)===null||t===void 0?void 0:t.layout,s=this.constraints;n&&hr(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&r?this.constraints=eN(r.layoutBox,n):this.constraints=!1,this.elastic=rN(o),s!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&dn(a=>{this.constraints!==!1&&this.getAxisMotionValue(a)&&(this.constraints[a]=oN(r.layoutBox[a],this.constraints[a]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!hr(t))return!1;const o=t.current;to(o!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");const{projection:r}=this.visualElement;if(!r||!r.layout)return!1;const s=Z5(o,r.root,this.visualElement.getTransformPagePoint());let a=tN(r.layout.layoutBox,s);if(n){const c=n(_5(a));this.hasMutatedConstraints=!!c,c&&(a=kb(c))}return a}startAnimation(t){const{drag:n,dragMomentum:o,dragElastic:r,dragTransition:s,dragSnapToOrigin:a,onDragTransitionEnd:c}=this.getProps(),l=this.constraints||{},u=dn(d=>{if(!Ta(d,n,this.currentDirection))return;let p=l&&l[d]||{};a&&(p={min:0,max:0});const f=r?200:1e6,g=r?40:1e7,m={type:"inertia",velocity:o?t[d]:0,bounceStiffness:f,bounceDamping:g,timeConstant:750,restDelta:1,restSpeed:10,...s,...p};return this.startAxisValueAnimation(d,m)});return Promise.all(u).then(c)}startAxisValueAnimation(t,n){const o=this.getAxisMotionValue(t);return Cu(this.visualElement,t),o.start(Lu(t,o,0,n,this.visualElement,!1))}stopAnimation(){dn(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){dn(t=>{var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,o=this.visualElement.getProps(),r=o[n];return r||this.visualElement.getValue(t,(o.initial?o.initial[t]:void 0)||0)}snapToCursor(t){dn(n=>{const{drag:o}=this.getProps();if(!Ta(n,o,this.currentDirection))return;const{projection:r}=this.visualElement,s=this.getAxisMotionValue(n);if(r&&r.layout){const{min:a,max:c}=r.layout.layoutBox[n];s.set(t[n]-lt(a,c,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:o}=this.visualElement;if(!hr(n)||!o||!this.constraints)return;this.stopAnimation();const r={x:0,y:0};dn(a=>{const c=this.getAxisMotionValue(a);if(c&&this.constraints!==!1){const l=c.get();r[a]=nN({min:l,max:l},this.constraints[a])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",o.root&&o.root.updateScroll(),o.updateLayout(),this.resolveConstraints(),dn(a=>{if(!Ta(a,t,null))return;const c=this.getAxisMotionValue(a),{min:l,max:u}=this.constraints[a];c.set(lt(l,u,r[a]))})}addListeners(){if(!this.visualElement.current)return;iN.set(this.visualElement,this);const t=this.visualElement.current,n=yr(t,"pointerdown",l=>{const{drag:u,dragListener:d=!0}=this.getProps();u&&d&&this.start(l)}),o=()=>{const{dragConstraints:l}=this.getProps();hr(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:r}=this.visualElement,s=r.addEventListener("measure",o);r&&!r.layout&&(r.root&&r.root.updateScroll(),r.updateLayout()),Ke.read(o);const a=Ni(window,"resize",()=>this.scalePositionWithinConstraints()),c=r.addEventListener("didUpdate",({delta:l,hasLayoutChanged:u})=>{this.isDragging&&u&&(dn(d=>{const p=this.getAxisMotionValue(d);p&&(this.originPoint[d]+=l[d].translate,p.set(p.get()+l[d].translate))}),this.visualElement.render())});return()=>{a(),n(),s(),c&&c()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:o=!1,dragPropagation:r=!1,dragConstraints:s=!1,dragElastic:a=Xu,dragMomentum:c=!0}=t;return{...t,drag:n,dragDirectionLock:o,dragPropagation:r,dragConstraints:s,dragElastic:a,dragMomentum:c}}}function Ta(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function aN(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class lN extends io{constructor(t){super(t),this.removeGroupControls=Wt,this.removeListeners=Wt,this.controls=new sN(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Wt}unmount(){this.removeGroupControls(),this.removeListeners()}}const r0=e=>(t,n)=>{e&&Ke.postRender(()=>e(t,n))};class cN extends io{constructor(){super(...arguments),this.removePointerDownListener=Wt}onPointerDown(t){this.session=new Jb(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint()})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:o,onPanEnd:r}=this.node.getProps();return{onSessionStart:r0(t),onStart:r0(n),onMove:o,onEnd:(s,a)=>{delete this.session,r&&Ke.postRender(()=>r(s,a))}}}mount(){this.removePointerDownListener=yr(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const Sa={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function i0(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const ji={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(Ce.test(e))e=parseFloat(e);else return e;const n=i0(e,t.target.x),o=i0(e,t.target.y);return`${n}% ${o}%`}},uN={correct:(e,{treeScale:t,projectionDelta:n})=>{const o=e,r=ro.parse(e);if(r.length>5)return o;const s=ro.createTransformer(e),a=typeof r[0]!="number"?1:0,c=n.x.scale*t.x,l=n.y.scale*t.y;r[0+a]/=c,r[1+a]/=l;const u=lt(c,l,.5);return typeof r[2+a]=="number"&&(r[2+a]/=u),typeof r[3+a]=="number"&&(r[3+a]/=u),s(r)}};class dN extends P.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:o,layoutId:r}=this.props,{projection:s}=t;gP(pN),s&&(n.group&&n.group.add(s),o&&o.register&&r&&o.register(s),s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,onExitComplete:()=>this.safeToRemove()})),Sa.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:o,drag:r,isPresent:s}=this.props,a=o.projection;return a&&(a.isPresent=s,r||t.layoutDependency!==n||n===void 0||t.isPresent!==s?a.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?a.promote():a.relegate()||Ke.postRender(()=>{const c=a.getStack();(!c||!c.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Qc.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:o}=this.props,{projection:r}=t;r&&(r.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(r),o&&o.deregister&&o.deregister(r))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function s0(e){const[t,n]=Zm(),o=P.useContext(zc);return b.jsx(dN,{...e,layoutGroup:o,switchLayoutGroup:P.useContext(ag),isPresent:t,safeToRemove:n})}const pN={borderRadius:{...ji,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:ji,borderTopRightRadius:ji,borderBottomLeftRadius:ji,borderBottomRightRadius:ji,boxShadow:uN};function fN(e,t,n){const o=Rt(e)?e:wi(e);return o.start(Lu("",o,t,n)),o.animation}function hN(e){return e instanceof SVGElement&&e.tagName!=="svg"}const mN=(e,t)=>e.depth-t.depth;class gN{constructor(){this.children=[],this.isDirty=!1}add(t){vu(this.children,t),this.isDirty=!0}remove(t){yu(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(mN),this.isDirty=!1,this.children.forEach(t)}}function bN(e,t){const n=kn.now(),o=({timestamp:r})=>{const s=r-n;s>=t&&(no(o),e(s-t))};return Ke.read(o,!0),()=>no(o)}const a0=["TopLeft","TopRight","BottomLeft","BottomRight"],vN=a0.length,l0=e=>typeof e=="string"?parseFloat(e):e,c0=e=>typeof e=="number"||Ce.test(e);function yN(e,t,n,o,r,s){r?(e.opacity=lt(0,n.opacity!==void 0?n.opacity:1,xN(o)),e.opacityExit=lt(t.opacity!==void 0?t.opacity:1,0,CN(o))):s&&(e.opacity=lt(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,o));for(let a=0;a<vN;a++){const c=`border${a0[a]}Radius`;let l=u0(t,c),u=u0(n,c);if(l===void 0&&u===void 0)continue;l||(l=0),u||(u=0),l===0||u===0||c0(l)===c0(u)?(e[c]=Math.max(lt(l0(l),l0(u),o),0),(Nn.test(u)||Nn.test(l))&&(e[c]+="%")):e[c]=u}(t.rotate||n.rotate)&&(e.rotate=lt(t.rotate||0,n.rotate||0,o))}function u0(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const xN=d0(0,.5,Xg),CN=d0(.5,.95,Wt);function d0(e,t,n){return o=>o<e?0:o>t?1:n(pr(e,t,o))}function p0(e,t){e.min=t.min,e.max=t.max}function pn(e,t){p0(e.x,t.x),p0(e.y,t.y)}function f0(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function h0(e,t,n,o,r){return e-=t,e=Ia(e,1/n,o),r!==void 0&&(e=Ia(e,1/r,o)),e}function EN(e,t=0,n=1,o=.5,r,s=e,a=e){if(Nn.test(t)&&(t=parseFloat(t),t=lt(a.min,a.max,t/100)-a.min),typeof t!="number")return;let c=lt(s.min,s.max,o);e===s&&(c-=t),e.min=h0(e.min,t,n,c,r),e.max=h0(e.max,t,n,c,r)}function m0(e,t,[n,o,r],s,a){EN(e,t[n],t[o],t[r],t.scale,s,a)}const IN=["x","scaleX","originX"],TN=["y","scaleY","originY"];function g0(e,t,n,o){m0(e.x,t,IN,n?n.x:void 0,o?o.x:void 0),m0(e.y,t,TN,n?n.y:void 0,o?o.y:void 0)}function b0(e){return e.translate===0&&e.scale===1}function v0(e){return b0(e.x)&&b0(e.y)}function y0(e,t){return e.min===t.min&&e.max===t.max}function SN(e,t){return y0(e.x,t.x)&&y0(e.y,t.y)}function x0(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function C0(e,t){return x0(e.x,t.x)&&x0(e.y,t.y)}function E0(e){return Ft(e.x)/Ft(e.y)}function I0(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class wN{constructor(){this.members=[]}add(t){vu(this.members,t),t.scheduleRender()}remove(t){if(yu(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(r=>t===r);if(n===0)return!1;let o;for(let r=n;r>=0;r--){const s=this.members[r];if(s.isPresent!==!1){o=s;break}}return o?(this.promote(o),!0):!1}promote(t,n){const o=this.lead;if(t!==o&&(this.prevLead=o,this.lead=t,t.show(),o)){o.instance&&o.scheduleRender(),t.scheduleRender(),t.resumeFrom=o,n&&(t.resumeFrom.preserveOpacity=!0),o.snapshot&&(t.snapshot=o.snapshot,t.snapshot.latestValues=o.animationValues||o.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:r}=t.options;r===!1&&o.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:o}=t;n.onExitComplete&&n.onExitComplete(),o&&o.options.onExitComplete&&o.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function RN(e,t,n){let o="";const r=e.x.translate/t.x,s=e.y.translate/t.y,a=(n==null?void 0:n.z)||0;if((r||s||a)&&(o=`translate3d(${r}px, ${s}px, ${a}px) `),(t.x!==1||t.y!==1)&&(o+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:u,rotate:d,rotateX:p,rotateY:f,skewX:g,skewY:m}=n;u&&(o=`perspective(${u}px) ${o}`),d&&(o+=`rotate(${d}deg) `),p&&(o+=`rotateX(${p}deg) `),f&&(o+=`rotateY(${f}deg) `),g&&(o+=`skewX(${g}deg) `),m&&(o+=`skewY(${m}deg) `)}const c=e.x.scale*t.x,l=e.y.scale*t.y;return(c!==1||l!==1)&&(o+=`scale(${c}, ${l})`),o||"none"}const Uu=["","X","Y","Z"],AN={visibility:"hidden"},T0=1e3;let ON=0;function Yu(e,t,n,o){const{latestValues:r}=t;r[e]&&(n[e]=r[e],t.setStaticValue(e,0),o&&(o[e]=0))}function S0(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=Lg(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:r,layoutId:s}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",Ke,!(r||s))}const{parent:o}=e;o&&!o.hasCheckedOptimisedAppear&&S0(o)}function w0({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:o,resetTransform:r}){return class{constructor(a={},c=t==null?void 0:t()){this.id=ON++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(NN),this.nodes.forEach(FN),this.nodes.forEach(VN),this.nodes.forEach(kN)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=a,this.root=c?c.root||c:this,this.path=c?[...c.path,c]:[],this.parent=c,this.depth=c?c.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new gN)}addEventListener(a,c){return this.eventHandlers.has(a)||this.eventHandlers.set(a,new xu),this.eventHandlers.get(a).add(c)}notifyListeners(a,...c){const l=this.eventHandlers.get(a);l&&l.notify(...c)}hasListeners(a){return this.eventHandlers.has(a)}mount(a,c=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=hN(a),this.instance=a;const{layoutId:l,layout:u,visualElement:d}=this.options;if(d&&!d.current&&d.mount(a),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),c&&(u||l)&&(this.isLayoutDirty=!0),e){let p;const f=()=>this.root.updateBlockedByResize=!1;e(a,()=>{this.root.updateBlockedByResize=!0,p&&p(),p=bN(f,250),Sa.hasAnimatedSinceResize&&(Sa.hasAnimatedSinceResize=!1,this.nodes.forEach(A0))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&d&&(l||u)&&this.addEventListener("didUpdate",({delta:p,hasLayoutChanged:f,hasRelativeLayoutChanged:g,layout:m})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const h=this.options.transition||d.getDefaultTransition()||WN,{onLayoutAnimationStart:v,onLayoutAnimationComplete:y}=d.getProps(),T=!this.targetLayout||!C0(this.targetLayout,m),C=!f&&g;if(this.options.layoutRoot||this.resumeFrom||C||f&&(T||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(p,C);const I={...du(h,"layout"),onPlay:v,onComplete:y};(d.shouldReduceMotion||this.options.layoutRoot)&&(I.delay=0,I.type=!1),this.startAnimation(I)}else f||A0(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=m})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const a=this.getStack();a&&a.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,no(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(LN),this.animationId++)}getTransformTemplate(){const{visualElement:a}=this.options;return a&&a.getProps().transformTemplate}willUpdate(a=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&S0(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let d=0;d<this.path.length;d++){const p=this.path[d];p.shouldResetTransform=!0,p.updateScroll("snapshot"),p.options.layoutRoot&&p.willUpdate(!1)}const{layoutId:c,layout:l}=this.options;if(c===void 0&&!l)return;const u=this.getTransformTemplate();this.prevTransformTemplateValue=u?u(this.latestValues,""):void 0,this.updateSnapshot(),a&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(R0);return}this.isUpdating||this.nodes.forEach(BN),this.isUpdating=!1,this.nodes.forEach(jN),this.nodes.forEach(PN),this.nodes.forEach(MN),this.clearAllSnapshots();const c=kn.now();Et.delta=$n(0,1e3/60,c-Et.timestamp),Et.timestamp=c,Et.isProcessing=!0,Zc.update.process(Et),Zc.preRender.process(Et),Zc.render.process(Et),Et.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Qc.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(DN),this.sharedNodes.forEach(_N)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Ke.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Ke.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!Ft(this.snapshot.measuredBox.x)&&!Ft(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const a=this.layout;this.layout=this.measure(!1),this.layoutCorrected=gt(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:c}=this.options;c&&c.notify("LayoutMeasure",this.layout.layoutBox,a?a.layoutBox:void 0)}updateScroll(a="measure"){let c=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===a&&(c=!1),c){const l=o(this.instance);this.scroll={animationId:this.root.animationId,phase:a,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!r)return;const a=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,c=this.projectionDelta&&!v0(this.projectionDelta),l=this.getTransformTemplate(),u=l?l(this.latestValues,""):void 0,d=u!==this.prevTransformTemplateValue;a&&(c||Ao(this.latestValues)||d)&&(r(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(a=!0){const c=this.measurePageBox();let l=this.removeElementScroll(c);return a&&(l=this.removeTransform(l)),zN(l),{animationId:this.root.animationId,measuredBox:c,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var a;const{visualElement:c}=this.options;if(!c)return gt();const l=c.measureViewportBox();if(!(((a=this.scroll)===null||a===void 0?void 0:a.wasRoot)||this.path.some(HN))){const{scroll:d}=this.root;d&&(Cr(l.x,d.offset.x),Cr(l.y,d.offset.y))}return l}removeElementScroll(a){var c;const l=gt();if(pn(l,a),!((c=this.scroll)===null||c===void 0)&&c.wasRoot)return l;for(let u=0;u<this.path.length;u++){const d=this.path[u],{scroll:p,options:f}=d;d!==this.root&&p&&f.layoutScroll&&(p.wasRoot&&pn(l,a),Cr(l.x,p.offset.x),Cr(l.y,p.offset.y))}return l}applyTransform(a,c=!1){const l=gt();pn(l,a);for(let u=0;u<this.path.length;u++){const d=this.path[u];!c&&d.options.layoutScroll&&d.scroll&&d!==d.root&&Er(l,{x:-d.scroll.offset.x,y:-d.scroll.offset.y}),Ao(d.latestValues)&&Er(l,d.latestValues)}return Ao(this.latestValues)&&Er(l,this.latestValues),l}removeTransform(a){const c=gt();pn(c,a);for(let l=0;l<this.path.length;l++){const u=this.path[l];if(!u.instance||!Ao(u.latestValues))continue;Gu(u.latestValues)&&u.updateSnapshot();const d=gt(),p=u.measurePageBox();pn(d,p),g0(c,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,d)}return Ao(this.latestValues)&&g0(c,this.latestValues),c}setTargetDelta(a){this.targetDelta=a,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(a){this.options={...this.options,...a,crossfade:a.crossfade!==void 0?a.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Et.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(a=!1){var c;const l=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=l.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=l.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=l.isSharedProjectionDirty);const u=!!this.resumingFrom||this!==l;if(!(a||u&&this.isSharedProjectionDirty||this.isProjectionDirty||!((c=this.parent)===null||c===void 0)&&c.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:p,layoutId:f}=this.options;if(!(!this.layout||!(p||f))){if(this.resolvedRelativeTargetAt=Et.timestamp,!this.targetDelta&&!this.relativeTarget){const g=this.getClosestProjectingParent();g&&g.layout&&this.animationProgress!==1?(this.relativeParent=g,this.forceRelativeParentToResolveTarget(),this.relativeTarget=gt(),this.relativeTargetOrigin=gt(),Bi(this.relativeTargetOrigin,this.layout.layoutBox,g.layout.layoutBox),pn(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=gt(),this.targetWithTransforms=gt()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),U5(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):pn(this.target,this.layout.layoutBox),zb(this.target,this.targetDelta)):pn(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const g=this.getClosestProjectingParent();g&&!!g.resumingFrom==!!this.resumingFrom&&!g.options.layoutScroll&&g.target&&this.animationProgress!==1?(this.relativeParent=g,this.forceRelativeParentToResolveTarget(),this.relativeTarget=gt(),this.relativeTargetOrigin=gt(),Bi(this.relativeTargetOrigin,this.target,g.target),pn(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||Gu(this.parent.latestValues)||$b(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var a;const c=this.getLead(),l=!!this.resumingFrom||this!==c;let u=!0;if((this.isProjectionDirty||!((a=this.parent)===null||a===void 0)&&a.isProjectionDirty)&&(u=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(u=!1),this.resolvedRelativeTargetAt===Et.timestamp&&(u=!1),u)return;const{layout:d,layoutId:p}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(d||p))return;pn(this.layoutCorrected,this.layout.layoutBox);const f=this.treeScale.x,g=this.treeScale.y;Y5(this.layoutCorrected,this.treeScale,this.path,l),c.layout&&!c.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(c.target=c.layout.layoutBox,c.targetWithTransforms=gt());const{target:m}=c;if(!m){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(f0(this.prevProjectionDelta.x,this.projectionDelta.x),f0(this.prevProjectionDelta.y,this.projectionDelta.y)),Di(this.projectionDelta,this.layoutCorrected,m,this.latestValues),(this.treeScale.x!==f||this.treeScale.y!==g||!I0(this.projectionDelta.x,this.prevProjectionDelta.x)||!I0(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",m))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(a=!0){var c;if((c=this.options.visualElement)===null||c===void 0||c.scheduleRender(),a){const l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=xr(),this.projectionDelta=xr(),this.projectionDeltaWithTransform=xr()}setAnimationOrigin(a,c=!1){const l=this.snapshot,u=l?l.latestValues:{},d={...this.latestValues},p=xr();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!c;const f=gt(),g=l?l.source:void 0,m=this.layout?this.layout.source:void 0,h=g!==m,v=this.getStack(),y=!v||v.members.length<=1,T=!!(h&&!y&&this.options.crossfade===!0&&!this.path.some(GN));this.animationProgress=0;let C;this.mixTargetDelta=I=>{const x=I/1e3;O0(p.x,a.x,x),O0(p.y,a.y,x),this.setTargetDelta(p),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Bi(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),$N(this.relativeTarget,this.relativeTargetOrigin,f,x),C&&SN(this.relativeTarget,C)&&(this.isProjectionDirty=!1),C||(C=gt()),pn(C,this.relativeTarget)),h&&(this.animationValues=d,yN(d,u,this.latestValues,x,T,y)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=x},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(a){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(no(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Ke.update(()=>{Sa.hasAnimatedSinceResize=!0,this.currentAnimation=fN(0,T0,{...a,onUpdate:c=>{this.mixTargetDelta(c),a.onUpdate&&a.onUpdate(c)},onStop:()=>{},onComplete:()=>{a.onComplete&&a.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const a=this.getStack();a&&a.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(T0),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const a=this.getLead();let{targetWithTransforms:c,target:l,layout:u,latestValues:d}=a;if(!(!c||!l||!u)){if(this!==a&&this.layout&&u&&D0(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||gt();const p=Ft(this.layout.layoutBox.x);l.x.min=a.target.x.min,l.x.max=l.x.min+p;const f=Ft(this.layout.layoutBox.y);l.y.min=a.target.y.min,l.y.max=l.y.min+f}pn(c,l),Er(c,d),Di(this.projectionDeltaWithTransform,this.layoutCorrected,c,d)}}registerSharedNode(a,c){this.sharedNodes.has(a)||this.sharedNodes.set(a,new wN),this.sharedNodes.get(a).add(c);const u=c.options.initialPromotionConfig;c.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(c):void 0})}isLead(){const a=this.getStack();return a?a.lead===this:!0}getLead(){var a;const{layoutId:c}=this.options;return c?((a=this.getStack())===null||a===void 0?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:c}=this.options;return c?(a=this.getStack())===null||a===void 0?void 0:a.prevLead:void 0}getStack(){const{layoutId:a}=this.options;if(a)return this.root.sharedNodes.get(a)}promote({needsReset:a,transition:c,preserveFollowOpacity:l}={}){const u=this.getStack();u&&u.promote(this,l),a&&(this.projectionDelta=void 0,this.needsReset=!0),c&&this.setOptions({transition:c})}relegate(){const a=this.getStack();return a?a.relegate(this):!1}resetSkewAndRotation(){const{visualElement:a}=this.options;if(!a)return;let c=!1;const{latestValues:l}=a;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(c=!0),!c)return;const u={};l.z&&Yu("z",a,u,this.animationValues);for(let d=0;d<Uu.length;d++)Yu(`rotate${Uu[d]}`,a,u,this.animationValues),Yu(`skew${Uu[d]}`,a,u,this.animationValues);a.render();for(const d in u)a.setStaticValue(d,u[d]),this.animationValues&&(this.animationValues[d]=u[d]);a.scheduleRender()}getProjectionStyles(a){var c,l;if(!this.instance||this.isSVG)return;if(!this.isVisible)return AN;const u={visibility:""},d=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,u.opacity="",u.pointerEvents=ba(a==null?void 0:a.pointerEvents)||"",u.transform=d?d(this.latestValues,""):"none",u;const p=this.getLead();if(!this.projectionDelta||!this.layout||!p.target){const h={};return this.options.layoutId&&(h.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,h.pointerEvents=ba(a==null?void 0:a.pointerEvents)||""),this.hasProjected&&!Ao(this.latestValues)&&(h.transform=d?d({},""):"none",this.hasProjected=!1),h}const f=p.animationValues||p.latestValues;this.applyTransformsToTarget(),u.transform=RN(this.projectionDeltaWithTransform,this.treeScale,f),d&&(u.transform=d(f,u.transform));const{x:g,y:m}=this.projectionDelta;u.transformOrigin=`${g.origin*100}% ${m.origin*100}% 0`,p.animationValues?u.opacity=p===this?(l=(c=f.opacity)!==null&&c!==void 0?c:this.latestValues.opacity)!==null&&l!==void 0?l:1:this.preserveOpacity?this.latestValues.opacity:f.opacityExit:u.opacity=p===this?f.opacity!==void 0?f.opacity:"":f.opacityExit!==void 0?f.opacityExit:0;for(const h in yi){if(f[h]===void 0)continue;const{correct:v,applyTo:y,isCSSVariable:T}=yi[h],C=u.transform==="none"?f[h]:v(f[h],p);if(y){const I=y.length;for(let x=0;x<I;x++)u[y[x]]=C}else T?this.options.visualElement.renderState.vars[h]=C:u[h]=C}return this.options.layoutId&&(u.pointerEvents=p===this?ba(a==null?void 0:a.pointerEvents)||"":"none"),u}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(a=>{var c;return(c=a.currentAnimation)===null||c===void 0?void 0:c.stop()}),this.root.nodes.forEach(R0),this.root.sharedNodes.clear()}}}function PN(e){e.updateLayout()}function MN(e){var t;const n=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:o,measuredBox:r}=e.layout,{animationType:s}=e.options,a=n.source!==e.layout.source;s==="size"?dn(p=>{const f=a?n.measuredBox[p]:n.layoutBox[p],g=Ft(f);f.min=o[p].min,f.max=f.min+g}):D0(s,n.layoutBox,o)&&dn(p=>{const f=a?n.measuredBox[p]:n.layoutBox[p],g=Ft(o[p]);f.max=f.min+g,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[p].max=e.relativeTarget[p].min+g)});const c=xr();Di(c,o,n.layoutBox);const l=xr();a?Di(l,e.applyTransform(r,!0),n.measuredBox):Di(l,o,n.layoutBox);const u=!v0(c);let d=!1;if(!e.resumeFrom){const p=e.getClosestProjectingParent();if(p&&!p.resumeFrom){const{snapshot:f,layout:g}=p;if(f&&g){const m=gt();Bi(m,n.layoutBox,f.layoutBox);const h=gt();Bi(h,o,g.layoutBox),C0(m,h)||(d=!0),p.options.layoutRoot&&(e.relativeTarget=h,e.relativeTargetOrigin=m,e.relativeParent=p)}}}e.notifyListeners("didUpdate",{layout:o,snapshot:n,delta:l,layoutDelta:c,hasLayoutChanged:u,hasRelativeLayoutChanged:d})}else if(e.isLead()){const{onExitComplete:o}=e.options;o&&o()}e.options.transition=void 0}function NN(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function kN(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function DN(e){e.clearSnapshot()}function R0(e){e.clearMeasurements()}function BN(e){e.isLayoutDirty=!1}function jN(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function A0(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function FN(e){e.resolveTargetDelta()}function VN(e){e.calcProjection()}function LN(e){e.resetSkewAndRotation()}function _N(e){e.removeLeadSnapshot()}function O0(e,t,n){e.translate=lt(t.translate,0,n),e.scale=lt(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function P0(e,t,n,o){e.min=lt(t.min,n.min,o),e.max=lt(t.max,n.max,o)}function $N(e,t,n,o){P0(e.x,t.x,n.x,o),P0(e.y,t.y,n.y,o)}function GN(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const WN={duration:.45,ease:[.4,0,.1,1]},M0=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),N0=M0("applewebkit/")&&!M0("chrome/")?Math.round:Wt;function k0(e){e.min=N0(e.min),e.max=N0(e.max)}function zN(e){k0(e.x),k0(e.y)}function D0(e,t,n){return e==="position"||e==="preserve-aspect"&&!X5(E0(t),E0(n),.2)}function HN(e){var t;return e!==e.root&&((t=e.scroll)===null||t===void 0?void 0:t.wasRoot)}const XN=w0({attachResizeListener:(e,t)=>Ni(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Zu={current:void 0},B0=w0({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Zu.current){const e=new XN({});e.mount(window),e.setOptions({layoutScroll:!0}),Zu.current=e}return Zu.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),UN={pan:{Feature:cN},drag:{Feature:lN,ProjectionNode:B0,MeasureLayout:s0}};function j0(e,t,n){const{props:o}=e;e.animationState&&o.whileHover&&e.animationState.setActive("whileHover",n==="Start");const r="onHover"+n,s=o[r];s&&Ke.postRender(()=>s(t,ki(t)))}class YN extends io{mount(){const{current:t}=this.node;t&&(this.unmount=UP(t,(n,o)=>(j0(this.node,o,"Start"),r=>j0(this.node,r,"End"))))}unmount(){}}class ZN extends io{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Pi(Ni(this.node.current,"focus",()=>this.onFocus()),Ni(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function F0(e,t,n){const{props:o}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&o.whileTap&&e.animationState.setActive("whileTap",n==="Start");const r="onTap"+(n==="End"?"":n),s=o[r];s&&Ke.postRender(()=>s(t,ki(t)))}class JN extends io{mount(){const{current:t}=this.node;t&&(this.unmount=qP(t,(n,o)=>(F0(this.node,o,"Start"),(r,{success:s})=>F0(this.node,r,s?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Ju=new WeakMap,qu=new WeakMap,qN=e=>{const t=Ju.get(e.target);t&&t(e)},KN=e=>{e.forEach(qN)};function QN({root:e,...t}){const n=e||document;qu.has(n)||qu.set(n,{});const o=qu.get(n),r=JSON.stringify(t);return o[r]||(o[r]=new IntersectionObserver(KN,{root:e,...t})),o[r]}function ek(e,t,n){const o=QN(t);return Ju.set(e,n),o.observe(e),()=>{Ju.delete(e),o.unobserve(e)}}const tk={some:0,all:1};class nk extends io{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:o,amount:r="some",once:s}=t,a={root:n?n.current:void 0,rootMargin:o,threshold:typeof r=="number"?r:tk[r]},c=l=>{const{isIntersecting:u}=l;if(this.isInView===u||(this.isInView=u,s&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:d,onViewportLeave:p}=this.node.getProps(),f=u?d:p;f&&f(l)};return ek(this.node.current,a,c)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(ok(t,n))&&this.startObserver()}unmount(){}}function ok({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const rk={inView:{Feature:nk},tap:{Feature:JN},focus:{Feature:ZN},hover:{Feature:YN}},ik={layout:{ProjectionNode:B0,MeasureLayout:s0}},Ku={current:null},V0={current:!1};function sk(){if(V0.current=!0,!!Uc)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Ku.current=e.matches;e.addListener(t),t()}else Ku.current=!1}const ak=[...ub,At,ro],lk=e=>ak.find(cb(e)),ck=new WeakMap;function uk(e,t,n){for(const o in t){const r=t[o],s=n[o];if(Rt(r))e.addValue(o,r),process.env.NODE_ENV==="development"&&pa(r.version==="12.4.10",`Attempting to mix Motion versions ${r.version} with 12.4.10 may not work as expected.`);else if(Rt(s))e.addValue(o,wi(r,{owner:e}));else if(s!==r)if(e.hasValue(o)){const a=e.getValue(o);a.liveStyle===!0?a.jump(r):a.hasAnimated||a.set(r)}else{const a=e.getStaticValue(o);e.addValue(o,wi(a!==void 0?a:r,{owner:e}))}}for(const o in n)t[o]===void 0&&e.removeValue(o);return t}const L0=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class dk{scrapeMotionValuesFromProps(t,n,o){return{}}constructor({parent:t,props:n,presenceContext:o,reducedMotionConfig:r,blockInitialAnimation:s,visualState:a},c={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Nu,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const g=kn.now();this.renderScheduledAt<g&&(this.renderScheduledAt=g,Ke.render(this.render,!1,!0))};const{latestValues:l,renderState:u,onUpdate:d}=a;this.onUpdate=d,this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=u,this.parent=t,this.props=n,this.presenceContext=o,this.depth=t?t.depth+1:0,this.reducedMotionConfig=r,this.options=c,this.blockInitialAnimation=!!s,this.isControllingVariants=ma(n),this.isVariantNode=rg(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:p,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const g in f){const m=f[g];l[g]!==void 0&&Rt(m)&&m.set(l[g],!1)}}mount(t){this.current=t,ck.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,o)=>this.bindToMotionValue(o,n)),V0.current||sk(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Ku.current,process.env.NODE_ENV!=="production"&&pa(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected."),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),no(this.notifyUpdate),no(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const o=To.has(t);o&&this.onBindTransform&&this.onBindTransform();const r=n.on("change",c=>{this.latestValues[t]=c,this.props.onUpdate&&Ke.preRender(this.notifyUpdate),o&&this.projection&&(this.projection.isTransformDirty=!0)}),s=n.on("renderRequest",this.scheduleRender);let a;window.MotionCheckAppearSync&&(a=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{r(),s(),a&&a(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in fr){const n=fr[t];if(!n)continue;const{isEnabled:o,Feature:r}=n;if(!this.features[t]&&r&&o(this.props)&&(this.features[t]=new r(this)),this.features[t]){const s=this.features[t];s.isMounted?s.update():(s.mount(),s.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):gt()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let o=0;o<L0.length;o++){const r=L0[o];this.propEventSubscriptions[r]&&(this.propEventSubscriptions[r](),delete this.propEventSubscriptions[r]);const s="on"+r,a=t[s];a&&(this.propEventSubscriptions[r]=this.on(r,a))}this.prevMotionValues=uk(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue(),this.onUpdate&&this.onUpdate(this)}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const o=this.values.get(t);n!==o&&(o&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let o=this.values.get(t);return o===void 0&&n!==void 0&&(o=wi(n===null?void 0:n,{owner:this}),this.addValue(t,o)),o}readValue(t,n){var o;let r=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(o=this.getBaseTargetFromProps(this.props,t))!==null&&o!==void 0?o:this.readValueFromInstance(this.current,t,this.options);return r!=null&&(typeof r=="string"&&(ab(r)||Yg(r))?r=parseFloat(r):!lk(r)&&ro.test(n)&&(r=tb(t,n)),this.setBaseTarget(t,Rt(r)?r.get():r)),Rt(r)?r.get():r}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:o}=this.props;let r;if(typeof o=="string"||typeof o=="object"){const a=lu(this.props,o,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);a&&(r=a[t])}if(o&&r!==void 0)return r;const s=this.getBaseTargetFromProps(this.props,t);return s!==void 0&&!Rt(s)?s:this.initialValues[t]!==void 0&&r===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new xu),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class _0 extends dk{constructor(){super(...arguments),this.KeyframeResolver=pb}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:o}){delete n[t],delete o[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;Rt(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function pk(e){return window.getComputedStyle(e)}class fk extends _0{constructor(){super(...arguments),this.type="html",this.renderInstance=xg}readValueFromInstance(t,n){if(To.has(n)){const o=Ou(n);return o&&o.default||0}else{const o=pk(t),r=(eu(n)?o.getPropertyValue(n):o[n])||0;return typeof r=="string"?r.trim():r}}measureInstanceViewportBox(t,{transformPagePoint:n}){return Yb(t,n)}build(t,n,o){ou(t,n,o.transformTemplate)}scrapeMotionValuesFromProps(t,n,o){return uu(t,n,o)}}class hk extends _0{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=gt,this.updateDimensions=()=>{this.current&&!this.renderState.dimensions&&yg(this.current,this.renderState)}}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(To.has(n)){const o=Ou(n);return o&&o.default||0}return n=Cg.has(n)?n:Kc(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,o){return Ig(t,n,o)}onBindTransform(){this.current&&!this.renderState.dimensions&&Ke.postRender(this.updateDimensions)}build(t,n,o){su(t,n,this.isSVGTag,o.transformTemplate)}renderInstance(t,n,o,r){Eg(t,n,o,r)}mount(t){this.isSVGTag=au(t.tagName),super.mount(t)}}const mk=(e,t)=>iu(e)?new hk(t):new fk(t,{allowProjection:e!==P.Fragment}),gk=_P({...V5,...rk,...UN,...ik},mk),fn=oP(gk),$0=({styles:e,label:t,disabled:n,...o})=>{const r=nt(),s=(t==null?void 0:t.length)*((t==null?void 0:t.length)>=10?6.5:7.5)+38||0,[a,c]=P.useState(!1);return b.jsxs(fn.button,{onMouseEnter:()=>(e==null?void 0:e.isAnimate)&&c(!0),onMouseLeave:()=>(e==null?void 0:e.isAnimate)&&c(!1),initial:{width:e!=null&&e.isAnimate||!t?"3rem":`${s/10}rem`,borderRadius:"0.7rem"},animate:{width:e!=null&&e.isAnimate?`${a?s/10:3}rem`:`${t?s/10:3}rem`},transition:{duration:.2,ease:"easeInOut"},style:{height:"3rem",outline:"none",overflow:"hidden",backgroundColor:(e==null?void 0:e.variant)!=="outlined"?(e==null?void 0:e.color)==="secondary"?r.palette.brandColor.blue:r.palette.brandColor.orange:r.palette.primary.notifyBackground,border:(e==null?void 0:e.variant)==="outlined"?`0.1rem solid ${r.palette.primary.notifyBorderColor}`:"none",display:"flex",cursor:"pointer",alignItems:"center",gap:a||!(e!=null&&e.isAnimate)?"0.5rem":0,color:(e==null?void 0:e.variant)==="outlined"?r.palette.primary.notifyActiveText:"white",justifyContent:a?"flex-start":"center",padding:a||!(e!=null&&e.isAnimate)?"1.2rem":"0.8rem",whiteSpace:"nowrap",opacity:n?.6:1,cursor:n?"auto":"pointer"},disabled:n,layout:!0,...o,children:[(e==null?void 0:e.icon)&&(!(e!=null&&e.iconPosition)||(e==null?void 0:e.iconPosition)==="start")&&b.jsx(ue,{component:"img",src:e==null?void 0:e.icon}),t&&b.jsx(fn.div,{layout:!0,initial:{opacity:0,width:0},animate:{opacity:a||!(e!=null&&e.isAnimate)?1:0,width:a||!(e!=null&&e.isAnimate)?"auto":0},transition:{duration:.2,ease:"easeInOut",delay:a?.1:0},style:{overflow:"hidden",whiteSpace:"nowrap"},children:b.jsx(wt,{sx:{fontSize:"1.1rem"},children:t})}),(e==null?void 0:e.iconPosition)==="end"&&b.jsx(ue,{component:"img",src:e==null?void 0:e.icon})]})};$0.propTypes={styles:i.object.isRequired,label:i.string};function Ir({...e}){return b.jsx(eo,{children:b.jsx($0,{...e})})}const bk=({...e})=>{const[t,n]=P.useState(!1),o=nt();return b.jsx(fn.input,{type:"text",onFocus:()=>n(!0),onBlur:()=>n(!1),initial:{width:"10rem",borderRadius:"0.7rem"},animate:{width:t?"13rem":"10rem"},transition:{duration:.3,ease:"easeInOut"},style:{height:"3rem",outline:"none",boxShadow:"none",fontSize:"1.1rem",border:`0.1rem solid ${o.palette.primary.notifyBorderColor}`,backgroundColor:o.palette.primary.notifyBackground,padding:"0rem 1rem",color:o.palette.primary.notifyTextColor,transition:"height 0.1s ease"},...e})};function G0({...e}){return b.jsx(eo,{children:b.jsx(bk,{...e})})}const ke={LOADING:"LOADING",SUCCESS:"SUCCESS",ERROR:"ERROR",MARK_ALL_AS_READ:"MARK_ALL_AS_READ",SET_GRID_DATA:"SET_GRID_DATA",HAS_SETTING_CHANGE:"HAS_SETTING_CHANGE",TRIGGER_API:"TRIGGER_API"},hn={SWR:"Something went wrong!",UNHANDLED:"Unhandled action type: ",INVALID:"Invalid action type: ",INVALID_ACTION:"Invalid action type: ",NRF:"No Records found"},wa=P.createContext(null),Fi=P.createContext(null);function W0({children:e}){const[t,n]=P.useReducer(vk,yk);return b.jsx(wa.Provider,{value:t,children:b.jsx(Fi.Provider,{value:n,children:b.jsx(eo,{children:e})})})}function vk(e,t){switch(t.type){case ke.SET_GRID_DATA:return{...e,...t.payload};case ke.HAS_SETTING_CHANGE:return{...e,...t.payload};case ke.TRIGGER_API:return{...e,...t.payload};default:throw new Error(`${hn.UNHANDLED}: ${t}`)}}const yk={visibleGridColumns:[],hasChange:!1,triggerApi:!1};W0.propTypes={children:i.node.isRequired};const xk=({options:e})=>{const t=P.useRef(null),[n,o]=P.useState(!1),[r,s]=P.useState(null),[a,c]=P.useState(e),[l,u]=P.useState(!1),d=P.useContext(Fi),{hasChange:p,visibleGridColumns:f}=P.useContext(wa);P.useEffect(()=>{c(e.sort((y,T)=>y.sequenceId-T.sequenceId))},[e]);const g=y=>{s(y)},m=y=>{y.preventDefault()},h=y=>{if(r===null||r===y)return;const T=[...a];[T[r],T[y]]=[T[y],T[r]],[T[r].sequenceId,T[y].sequenceId]=[T[y].sequenceId,T[r].sequenceId],c(T);const C=new Map(T.map(x=>[x.id,x])),I=f.map(x=>{const w=C.get(x.id);return w?{...x,sequenceId:w.sequenceId,isHidden:w.isHidden}:x}).sort((x,w)=>x.sequenceId-w.sequenceId);d({type:ke.SET_GRID_DATA,payload:{visibleGridColumns:I}}),d({type:ke.HAS_SETTING_CHANGE,payload:{hasChange:!0}}),s(null)},v=()=>{p&&d({type:ke.TRIGGER_API,payload:{triggerApi:!0}}),o(!1)};return P.useEffect(()=>{if(!n)return;const y=T=>{t.current&&!t.current.contains(T.target)&&v()};return document.addEventListener("mousedown",y),()=>document.removeEventListener("mousedown",y)},[n,p,a]),P.useEffect(()=>{if(t.current){const y=t.current.getBoundingClientRect(),T=window.innerHeight-y.bottom;u(T<200)}},[n]),{dropdownRef:t,isOpen:n,items:a,expandUp:l,setIsOpen:o,handleDragStart:g,handleDragOver:m,handleDrop:h}},Ck=({isOpen:e,setIsOpen:t,placeholder:n,theme:o,selectedValue:r,styles:s,children:a,dropdownRef:c,expandUp:l})=>b.jsxs(ue,{sx:{position:"relative",width:"100%",flexShrink:0},ref:c,children:[b.jsx(ue,{sx:{cursor:"pointer",height:"3rem",width:"100%",position:"relative",zIndex:1},onClick:()=>t(!e)}),b.jsxs(fn.div,{style:{position:"absolute",left:0,width:"100%",zIndex:1e3,border:`0.1rem solid ${o.palette.primary.notifyBorderColor}`,borderRadius:"0.7rem",color:o.palette.primary.notifyTextColor,backgroundColor:o.palette.primary.notifyBackground,overflow:"hidden",...l?{bottom:0}:{top:0}},animate:{maxHeight:e?"15rem":"3rem"},transition:{duration:.2,ease:"easeInOut"},children:[l&&b.jsxs(b.Fragment,{children:[b.jsx(ca,{children:e&&a}),e&&b.jsx("hr",{style:{width:"100%",height:"0.1rem",backgroundColor:o.palette.primary.notifyBorderColor,border:"none",margin:"0rem"}})]}),b.jsxs(ue,{sx:{padding:"0.65rem",display:"flex",alignItems:"center",justifyContent:"space-between",cursor:"pointer",gap:"0.5rem"},onClick:()=>t(!e),children:[b.jsx(ue,{component:"img",className:"select-icon",src:s==null?void 0:s.icon}),b.jsx(wt,{sx:{color:o.palette.primary.notifyTextColor,flex:1,fontSize:"1.1rem",whiteSpace:"nowrap"},children:n||r}),b.jsx(ue,{component:"img",className:"child",src:e?mt.ArrowSelectDown:mt.ArrowSelectUp})]}),!l&&b.jsxs(b.Fragment,{children:[e&&b.jsx("hr",{style:{width:"100%",height:"0.1rem",backgroundColor:o.palette.primary.notifyBorderColor,border:"none",margin:"0rem"}}),b.jsx(ca,{children:e&&a})]})]})]}),Ek=({options:e,onChange:t,showCheckBox:n,placeholder:o,isDraggable:r,value:s,isMulti:a,handleCheck:c})=>{const l=nt(),{dropdownRef:u,isOpen:d,items:p,expandUp:f,setIsOpen:g,handleDragStart:m,handleDragOver:h,handleDrop:v}=xk({options:e});return b.jsx(Ck,{isOpen:d,setIsOpen:g,placeholder:o,selectedValue:s,theme:l,dropdownRef:u,expandUp:f,children:b.jsx(fn.ul,{style:{listStyle:"none",padding:"0rem 1rem 0.8rem 1rem",margin:0,maxHeight:"10rem",overflowY:"auto",scrollbarWidth:"thin",scrollbarColor:`${l.palette.primary.notifyIconColor} transparent`},initial:{opacity:0},animate:{opacity:1},transition:{duration:.3,ease:"easeInOut"},children:p==null?void 0:p.map((y,T)=>{const C=y==null?void 0:y.isMandatory;return b.jsxs("li",{draggable:r,onDragStart:()=>m(T),onDragOver:h,onDrop:()=>v(T),style:{padding:n?"0.4rem 0":"0.2rem 0.4rem",cursor:"pointer",display:"flex",alignItems:"center",color:l.palette.primary.notifyTextColor,backgroundColor:l.palette.primary.notifyBackground,opacity:1,whiteSpace:"nowrap",pointerEvents:"auto"},onClick:()=>{C||(g(!!a),t(y))},children:[n&&b.jsx(Js,{size:"medium",sx:{color:l.palette.primary.notifyIconColor,"&.Mui-checked":{color:l.palette.brandColor.orange},p:"0.2rem 0.5rem",opacity:C?.5:1},checked:c(y),disabled:C}),b.jsx(wt,{sx:{fontSize:"1.1rem"},children:y.label})]},T)})})})};function Qu({...e}){return b.jsx(eo,{children:b.jsx(Ek,{...e})})}const Ik=U(ue)(({theme:e})=>({borderRadius:"0.4rem",position:"relative",background:e.palette.primary.notifyButtonBackground,display:"flex",height:"2.5rem"})),Tk=U(ue)(({theme:e})=>({borderRadius:"0.4rem",position:"absolute",background:e.palette.primary.notifyBackground,border:`0.1rem solid ${e.palette.primary.notifyBorderColor}`,transition:"all 0.5s ease"})),z0=U(Zs)(({theme:e})=>({borderRadius:"0.4rem",fontWeight:"400",transition:"all 0.2s 0.1s ease",padding:"0.4rem 0.8rem",fontSize:"1rem",textTransform:"none",zIndex:1,"&:hover":{background:"transparent",boxShadow:"none"}})),Sk=({isChartType:e,setIsChartType:t,leftSwitchText:n,rigthSwitchText:o})=>{const[r,s]=P.useState(0),[a,c]=P.useState(0),l=P.useRef(null),u=P.useRef(null);return P.useEffect(()=>{if(l.current&&u.current){const d=e?u.current:l.current;s(d.offsetWidth),c(d.offsetLeft)}},[e]),b.jsx(ue,{sx:{display:"flex"},children:b.jsxs(Ik,{children:[b.jsx(Tk,{sx:{width:r,transform:`translateX(${a}px)`,height:"2.5rem"}}),b.jsx(z0,{ref:l,disableRipple:!0,sx:d=>({color:e?d.palette.brandColor.grey1:d.palette.primary.notifyActiveText}),onClick:()=>t(!1),children:n}),b.jsx(z0,{ref:u,disableRipple:!0,sx:d=>({color:e?d.palette.primary.notifyActiveText:d.palette.brandColor.grey1}),onClick:()=>t(!0),children:o})]})})};function H0({...e}){return b.jsx(eo,{children:b.jsx(Sk,{...e})})}class ed extends P.Component{constructor(t){super(t),this.startDrag=this.startDrag.bind(this),this.endDrag=this.endDrag.bind(this),this.onMouseMove=this.onMouseMove.bind(this),this.dragging=!1,this.mouseX=0,this.startPos=0,this.startWidthPrev=0,this.lastDraggedWidth=0,this.draggedCol=null,this.resizeRef=P.createRef()}startDrag(){if(!this.props.disabled&&(this.draggedCol=this.props.id,this.props.resizeStart&&this.draggedCol===this.props.id&&this.props.resizeStart(),this.dragging=!0,this.startPos=this.mouseX,this.startWidthPrev=0,this.resizeRef.current)){let t=this.resizeRef.current.previousSibling;t&&(this.startWidthPrev=t.clientWidth)}}endDrag(){this.props.disabled||(this.dragging=!1,this.props.resizeEnd&&this.draggedCol===this.props.id&&this.props.resizeEnd(this.lastDraggedWidth),this.draggedCol=null)}onMouseMove(t){if(this.props.disabled||(this.mouseX=t.touches?t.touches[0].screenX:t.screenX,!this.dragging))return;const n=this.resizeRef.current,o=this.startPos-this.mouseX;let r=this.startWidthPrev-o;(!this.props.minWidth||r>=this.props.minWidth)&&(!this.props.maxWidth||r<=this.props.maxWidth)&&(n.previousSibling.style.width=r+"px",n.previousSibling.style.minWidth=r+"px",n.previousSibling.style.maxWidth=r+"px",n.previousSibling.style.setProperty("--column_resize_before_width",r+"px"),this.lastDraggedWidth=r)}componentDidMount(){const t=this.resizeRef.current;if(t&&(this.props.defaultWidth?(t.previousSibling.style.minWidth=this.props.defaultWidth+"px",t.previousSibling.style.width=this.props.defaultWidth+"px",t.previousSibling.style.maxWidth=this.props.defaultWidth+"px",t.previousSibling.style.setProperty("--column_resize_before_width",this.props.defaultWidth+"px")):this.props.minWidth&&(t.previousSibling.style.minWidth=this.props.minWidth+"px",t.previousSibling.style.width=this.props.minWidth+"px",t.previousSibling.style.maxWidth=this.props.minWidth+"px",t.previousSibling.style.setProperty("--column_resize_before_width",this.props.minWidth+"px"))),this.props.disabled){this.props.defaultWidth&&t&&(t.previousSibling.style.minWidth=this.props.defaultWidth+"px",t.previousSibling.style.width=this.props.defaultWidth+"px",t.previousSibling.style.maxWidth=this.props.defaultWidth+"px",t.previousSibling.style.setProperty("--column_resize_before_width",this.props.defaultWidth+"px")),this.props.maxWidth&&t&&(t.previousSibling.style.maxWidth=this.props.maxWidth+"px");return}this.addEventListenersToDocument()}componentWillUnmount(){this.props.disabled||this.removeEventListenersFromDocument()}componentDidUpdate(t,n){t.disabled&&!this.props.disabled&&this.addEventListenersToDocument(),!t.disabled&&this.props.disabled&&this.removeEventListenersFromDocument()}addEventListenersToDocument(){document.addEventListener("mousemove",this.onMouseMove),document.addEventListener("mouseup",this.endDrag),document.addEventListener("touchmove",this.onMouseMove),document.addEventListener("touchend",this.endDrag)}removeEventListenersFromDocument(){document.removeEventListener("mousemove",this.onMouseMove),document.removeEventListener("mouseup",this.endDrag),document.removeEventListener("touchmove",this.onMouseMove),document.removeEventListener("touchend",this.endDrag)}render(){var t={userSelect:"none"};return this.props.disabled||(t.cursor="ew-resize"),this.props.className===""&&(t.width="6px",t.backgroundColor="rgba(0, 0, 0, 0.1)"),P.createElement("th",{ref:this.resizeRef,style:t,disabled:this.props.disabled,rowSpan:this.props.rowSpan?this.props.rowSpan:1,colSpan:this.props.colSpan?this.props.colSpan:1,className:`column_resizer_own_class ${this.props.disabled?"disabled_column_resize":""} ${this.props.className}`,onMouseDown:this.props.disabled?null:this.startDrag,onTouchStart:this.props.disabled?null:this.startDrag})}}ed.defaultProps={disabled:!1,minWidth:0,className:""},ed.propTypes={disabled:"boolean",minWidth:"number",className:"string"};function X0(e,t){return function(){return e.apply(t,arguments)}}const{toString:wk}=Object.prototype,{getPrototypeOf:td}=Object,Ra=(e=>t=>{const n=wk.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),xn=e=>(e=e.toLowerCase(),t=>Ra(t)===e),Aa=e=>t=>typeof t===e,{isArray:Tr}=Array,Vi=Aa("undefined");function Rk(e){return e!==null&&!Vi(e)&&e.constructor!==null&&!Vi(e.constructor)&&Kt(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const U0=xn("ArrayBuffer");function Ak(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&U0(e.buffer),t}const Ok=Aa("string"),Kt=Aa("function"),Y0=Aa("number"),Oa=e=>e!==null&&typeof e=="object",Pk=e=>e===!0||e===!1,Pa=e=>{if(Ra(e)!=="object")return!1;const t=td(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},Mk=xn("Date"),Nk=xn("File"),kk=xn("Blob"),Dk=xn("FileList"),Bk=e=>Oa(e)&&Kt(e.pipe),jk=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||Kt(e.append)&&((t=Ra(e))==="formdata"||t==="object"&&Kt(e.toString)&&e.toString()==="[object FormData]"))},Fk=xn("URLSearchParams"),[Vk,Lk,_k,$k]=["ReadableStream","Request","Response","Headers"].map(xn),Gk=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Li(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let o,r;if(typeof e!="object"&&(e=[e]),Tr(e))for(o=0,r=e.length;o<r;o++)t.call(null,e[o],o,e);else{const s=n?Object.getOwnPropertyNames(e):Object.keys(e),a=s.length;let c;for(o=0;o<a;o++)c=s[o],t.call(null,e[c],c,e)}}function Z0(e,t){t=t.toLowerCase();const n=Object.keys(e);let o=n.length,r;for(;o-- >0;)if(r=n[o],t===r.toLowerCase())return r;return null}const Oo=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,J0=e=>!Vi(e)&&e!==Oo;function nd(){const{caseless:e}=J0(this)&&this||{},t={},n=(o,r)=>{const s=e&&Z0(t,r)||r;Pa(t[s])&&Pa(o)?t[s]=nd(t[s],o):Pa(o)?t[s]=nd({},o):Tr(o)?t[s]=o.slice():t[s]=o};for(let o=0,r=arguments.length;o<r;o++)arguments[o]&&Li(arguments[o],n);return t}const Wk=(e,t,n,{allOwnKeys:o}={})=>(Li(t,(r,s)=>{n&&Kt(r)?e[s]=X0(r,n):e[s]=r},{allOwnKeys:o}),e),zk=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Hk=(e,t,n,o)=>{e.prototype=Object.create(t.prototype,o),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},Xk=(e,t,n,o)=>{let r,s,a;const c={};if(t=t||{},e==null)return t;do{for(r=Object.getOwnPropertyNames(e),s=r.length;s-- >0;)a=r[s],(!o||o(a,e,t))&&!c[a]&&(t[a]=e[a],c[a]=!0);e=n!==!1&&td(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},Uk=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const o=e.indexOf(t,n);return o!==-1&&o===n},Yk=e=>{if(!e)return null;if(Tr(e))return e;let t=e.length;if(!Y0(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},Zk=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&td(Uint8Array)),Jk=(e,t)=>{const o=(e&&e[Symbol.iterator]).call(e);let r;for(;(r=o.next())&&!r.done;){const s=r.value;t.call(e,s[0],s[1])}},qk=(e,t)=>{let n;const o=[];for(;(n=e.exec(t))!==null;)o.push(n);return o},Kk=xn("HTMLFormElement"),Qk=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,o,r){return o.toUpperCase()+r}),q0=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),e4=xn("RegExp"),K0=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),o={};Li(n,(r,s)=>{let a;(a=t(r,s,e))!==!1&&(o[s]=a||r)}),Object.defineProperties(e,o)},t4=e=>{K0(e,(t,n)=>{if(Kt(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const o=e[n];if(Kt(o)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},n4=(e,t)=>{const n={},o=r=>{r.forEach(s=>{n[s]=!0})};return Tr(e)?o(e):o(String(e).split(t)),n},o4=()=>{},r4=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function i4(e){return!!(e&&Kt(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const s4=e=>{const t=new Array(10),n=(o,r)=>{if(Oa(o)){if(t.indexOf(o)>=0)return;if(!("toJSON"in o)){t[r]=o;const s=Tr(o)?[]:{};return Li(o,(a,c)=>{const l=n(a,r+1);!Vi(l)&&(s[c]=l)}),t[r]=void 0,s}}return o};return n(e,0)},a4=xn("AsyncFunction"),l4=e=>e&&(Oa(e)||Kt(e))&&Kt(e.then)&&Kt(e.catch),Q0=((e,t)=>e?setImmediate:t?((n,o)=>(Oo.addEventListener("message",({source:r,data:s})=>{r===Oo&&s===n&&o.length&&o.shift()()},!1),r=>{o.push(r),Oo.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",Kt(Oo.postMessage)),c4=typeof queueMicrotask<"u"?queueMicrotask.bind(Oo):typeof process<"u"&&process.nextTick||Q0,G={isArray:Tr,isArrayBuffer:U0,isBuffer:Rk,isFormData:jk,isArrayBufferView:Ak,isString:Ok,isNumber:Y0,isBoolean:Pk,isObject:Oa,isPlainObject:Pa,isReadableStream:Vk,isRequest:Lk,isResponse:_k,isHeaders:$k,isUndefined:Vi,isDate:Mk,isFile:Nk,isBlob:kk,isRegExp:e4,isFunction:Kt,isStream:Bk,isURLSearchParams:Fk,isTypedArray:Zk,isFileList:Dk,forEach:Li,merge:nd,extend:Wk,trim:Gk,stripBOM:zk,inherits:Hk,toFlatObject:Xk,kindOf:Ra,kindOfTest:xn,endsWith:Uk,toArray:Yk,forEachEntry:Jk,matchAll:qk,isHTMLForm:Kk,hasOwnProperty:q0,hasOwnProp:q0,reduceDescriptors:K0,freezeMethods:t4,toObjectSet:n4,toCamelCase:Qk,noop:o4,toFiniteNumber:r4,findKey:Z0,global:Oo,isContextDefined:J0,isSpecCompliantForm:i4,toJSONObject:s4,isAsyncFn:a4,isThenable:l4,setImmediate:Q0,asap:c4};function we(e,t,n,o,r){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),o&&(this.request=o),r&&(this.response=r,this.status=r.status?r.status:null)}G.inherits(we,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:G.toJSONObject(this.config),code:this.code,status:this.status}}});const ev=we.prototype,tv={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{tv[e]={value:e}}),Object.defineProperties(we,tv),Object.defineProperty(ev,"isAxiosError",{value:!0}),we.from=(e,t,n,o,r,s)=>{const a=Object.create(ev);return G.toFlatObject(e,a,function(l){return l!==Error.prototype},c=>c!=="isAxiosError"),we.call(a,e.message,t,n,o,r),a.cause=e,a.name=e.name,s&&Object.assign(a,s),a};const u4=null;function od(e){return G.isPlainObject(e)||G.isArray(e)}function nv(e){return G.endsWith(e,"[]")?e.slice(0,-2):e}function ov(e,t,n){return e?e.concat(t).map(function(r,s){return r=nv(r),!n&&s?"["+r+"]":r}).join(n?".":""):t}function d4(e){return G.isArray(e)&&!e.some(od)}const p4=G.toFlatObject(G,{},null,function(t){return/^is[A-Z]/.test(t)});function Ma(e,t,n){if(!G.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=G.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(h,v){return!G.isUndefined(v[h])});const o=n.metaTokens,r=n.visitor||d,s=n.dots,a=n.indexes,l=(n.Blob||typeof Blob<"u"&&Blob)&&G.isSpecCompliantForm(t);if(!G.isFunction(r))throw new TypeError("visitor must be a function");function u(m){if(m===null)return"";if(G.isDate(m))return m.toISOString();if(!l&&G.isBlob(m))throw new we("Blob is not supported. Use a Buffer instead.");return G.isArrayBuffer(m)||G.isTypedArray(m)?l&&typeof Blob=="function"?new Blob([m]):Buffer.from(m):m}function d(m,h,v){let y=m;if(m&&!v&&typeof m=="object"){if(G.endsWith(h,"{}"))h=o?h:h.slice(0,-2),m=JSON.stringify(m);else if(G.isArray(m)&&d4(m)||(G.isFileList(m)||G.endsWith(h,"[]"))&&(y=G.toArray(m)))return h=nv(h),y.forEach(function(C,I){!(G.isUndefined(C)||C===null)&&t.append(a===!0?ov([h],I,s):a===null?h:h+"[]",u(C))}),!1}return od(m)?!0:(t.append(ov(v,h,s),u(m)),!1)}const p=[],f=Object.assign(p4,{defaultVisitor:d,convertValue:u,isVisitable:od});function g(m,h){if(!G.isUndefined(m)){if(p.indexOf(m)!==-1)throw Error("Circular reference detected in "+h.join("."));p.push(m),G.forEach(m,function(y,T){(!(G.isUndefined(y)||y===null)&&r.call(t,y,G.isString(T)?T.trim():T,h,f))===!0&&g(y,h?h.concat(T):[T])}),p.pop()}}if(!G.isObject(e))throw new TypeError("data must be an object");return g(e),t}function rv(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(o){return t[o]})}function rd(e,t){this._pairs=[],e&&Ma(e,this,t)}const iv=rd.prototype;iv.append=function(t,n){this._pairs.push([t,n])},iv.toString=function(t){const n=t?function(o){return t.call(this,o,rv)}:rv;return this._pairs.map(function(r){return n(r[0])+"="+n(r[1])},"").join("&")};function f4(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function sv(e,t,n){if(!t)return e;const o=n&&n.encode||f4;G.isFunction(n)&&(n={serialize:n});const r=n&&n.serialize;let s;if(r?s=r(t,n):s=G.isURLSearchParams(t)?t.toString():new rd(t,n).toString(o),s){const a=e.indexOf("#");a!==-1&&(e=e.slice(0,a)),e+=(e.indexOf("?")===-1?"?":"&")+s}return e}class av{constructor(){this.handlers=[]}use(t,n,o){return this.handlers.push({fulfilled:t,rejected:n,synchronous:o?o.synchronous:!1,runWhen:o?o.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){G.forEach(this.handlers,function(o){o!==null&&t(o)})}}const lv={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},h4={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:rd,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},id=typeof window<"u"&&typeof document<"u",sd=typeof navigator=="object"&&navigator||void 0,m4=id&&(!sd||["ReactNative","NativeScript","NS"].indexOf(sd.product)<0),g4=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",b4=id&&window.location.href||"http://localhost",Ot={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:id,hasStandardBrowserEnv:m4,hasStandardBrowserWebWorkerEnv:g4,navigator:sd,origin:b4},Symbol.toStringTag,{value:"Module"})),...h4};function v4(e,t){return Ma(e,new Ot.classes.URLSearchParams,Object.assign({visitor:function(n,o,r,s){return Ot.isNode&&G.isBuffer(n)?(this.append(o,n.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)}},t))}function y4(e){return G.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function x4(e){const t={},n=Object.keys(e);let o;const r=n.length;let s;for(o=0;o<r;o++)s=n[o],t[s]=e[s];return t}function cv(e){function t(n,o,r,s){let a=n[s++];if(a==="__proto__")return!0;const c=Number.isFinite(+a),l=s>=n.length;return a=!a&&G.isArray(r)?r.length:a,l?(G.hasOwnProp(r,a)?r[a]=[r[a],o]:r[a]=o,!c):((!r[a]||!G.isObject(r[a]))&&(r[a]=[]),t(n,o,r[a],s)&&G.isArray(r[a])&&(r[a]=x4(r[a])),!c)}if(G.isFormData(e)&&G.isFunction(e.entries)){const n={};return G.forEachEntry(e,(o,r)=>{t(y4(o),r,n,0)}),n}return null}function C4(e,t,n){if(G.isString(e))try{return(t||JSON.parse)(e),G.trim(e)}catch(o){if(o.name!=="SyntaxError")throw o}return(n||JSON.stringify)(e)}const _i={transitional:lv,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const o=n.getContentType()||"",r=o.indexOf("application/json")>-1,s=G.isObject(t);if(s&&G.isHTMLForm(t)&&(t=new FormData(t)),G.isFormData(t))return r?JSON.stringify(cv(t)):t;if(G.isArrayBuffer(t)||G.isBuffer(t)||G.isStream(t)||G.isFile(t)||G.isBlob(t)||G.isReadableStream(t))return t;if(G.isArrayBufferView(t))return t.buffer;if(G.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let c;if(s){if(o.indexOf("application/x-www-form-urlencoded")>-1)return v4(t,this.formSerializer).toString();if((c=G.isFileList(t))||o.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return Ma(c?{"files[]":t}:t,l&&new l,this.formSerializer)}}return s||r?(n.setContentType("application/json",!1),C4(t)):t}],transformResponse:[function(t){const n=this.transitional||_i.transitional,o=n&&n.forcedJSONParsing,r=this.responseType==="json";if(G.isResponse(t)||G.isReadableStream(t))return t;if(t&&G.isString(t)&&(o&&!this.responseType||r)){const a=!(n&&n.silentJSONParsing)&&r;try{return JSON.parse(t)}catch(c){if(a)throw c.name==="SyntaxError"?we.from(c,we.ERR_BAD_RESPONSE,this,null,this.response):c}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Ot.classes.FormData,Blob:Ot.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};G.forEach(["delete","get","head","post","put","patch"],e=>{_i.headers[e]={}});const E4=G.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),I4=e=>{const t={};let n,o,r;return e&&e.split(`
248
+ `),()=>{document.head.removeChild(g)}},[t]),b.jsx(XO,{isPresent:t,childRef:r,sizeRef:s,children:S.cloneElement(e,{ref:r})})}const YO=({children:e,initial:t,isPresent:n,onExitComplete:o,custom:r,presenceAffectsLayout:s,mode:a,anchorX:c})=>{const l=Hc(ZO),u=P.useId(),d=P.useCallback(f=>{l.set(f,!0);for(const g of l.values())if(!g)return;o&&o()},[l,o]),p=P.useMemo(()=>({id:u,initial:t,isPresent:n,custom:r,onExitComplete:d,register:f=>(l.set(f,!1),()=>l.delete(f))}),s?[Math.random(),d]:[n,d]);return P.useMemo(()=>{l.forEach((f,g)=>l.set(g,!1))},[n]),S.useEffect(()=>{!n&&!l.size&&o&&o()},[n]),a==="popLayout"&&(e=b.jsx(UO,{isPresent:n,anchorX:c,children:e})),b.jsx(aa.Provider,{value:p,children:e})};function ZO(){return new Map}function Zm(e=!0){const t=P.useContext(aa);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:o,register:r}=t,s=P.useId();P.useEffect(()=>{if(e)return r(s)},[e]);const a=P.useCallback(()=>e&&o&&o(s),[s,o,e]);return!n&&o?[!1,a]:[!0]}const la=e=>e.key||"";function Jm(e){const t=[];return P.Children.forEach(e,n=>{P.isValidElement(n)&&t.push(n)}),t}const Uc=typeof window<"u",qm=Uc?P.useLayoutEffect:P.useEffect,ca=({children:e,custom:t,initial:n=!0,onExitComplete:o,presenceAffectsLayout:r=!0,mode:s="sync",propagate:a=!1,anchorX:c="left"})=>{const[l,u]=Zm(a),d=P.useMemo(()=>Jm(e),[e]),p=a&&!l?[]:d.map(la),f=P.useRef(!0),g=P.useRef(d),m=Hc(()=>new Map),[h,v]=P.useState(d),[y,T]=P.useState(d);qm(()=>{f.current=!1,g.current=d;for(let x=0;x<y.length;x++){const w=la(y[x]);p.includes(w)?m.delete(w):m.get(w)!==!0&&m.set(w,!1)}},[y,p.length,p.join("-")]);const C=[];if(d!==h){let x=[...d];for(let w=0;w<y.length;w++){const R=y[w],A=la(R);p.includes(A)||(x.splice(w,0,R),C.push(R))}return s==="wait"&&C.length&&(x=C),T(Jm(x)),v(d),null}process.env.NODE_ENV!=="production"&&s==="wait"&&y.length>1&&console.warn(`You're attempting to animate multiple children within AnimatePresence, but its mode is set to "wait". This will lead to odd visual behaviour.`);const{forceRender:I}=P.useContext(zc);return b.jsx(b.Fragment,{children:y.map(x=>{const w=la(x),R=a&&!l?!1:d===y||p.includes(w),A=()=>{if(m.has(w))m.set(w,!0);else return;let M=!0;m.forEach(N=>{N||(M=!1)}),M&&(I==null||I(),T(g.current),a&&(u==null||u()),o&&o())};return b.jsx(YO,{isPresent:R,initial:!f.current||n?void 0:!1,custom:t,presenceAffectsLayout:r,mode:s,onExitComplete:R?void 0:A,anchorX:c,children:x},w)})})},Wt=e=>e;let dr=Wt,to=Wt;process.env.NODE_ENV!=="production"&&(dr=(e,t)=>{!e&&typeof console<"u"&&console.warn(t)},to=(e,t)=>{if(!e)throw new Error(t)});function Yc(e){let t;return()=>(t===void 0&&(t=e()),t)}const pr=(e,t,n)=>{const o=t-e;return o===0?1:(n-e)/o},Mn=e=>e*1e3,_n=e=>e/1e3,JO={useManualTiming:!1},ua=["read","resolveKeyframes","update","preRender","render","postRender"],Km={value:null};function qO(e,t){let n=new Set,o=new Set,r=!1,s=!1;const a=new WeakSet;let c={delta:0,timestamp:0,isProcessing:!1},l=0;function u(p){a.has(p)&&(d.schedule(p),e()),l++,p(c)}const d={schedule:(p,f=!1,g=!1)=>{const h=g&&r?n:o;return f&&a.add(p),h.has(p)||h.add(p),p},cancel:p=>{o.delete(p),a.delete(p)},process:p=>{if(c=p,r){s=!0;return}r=!0,[n,o]=[o,n],n.forEach(u),t&&Km.value&&Km.value.frameloop[t].push(l),l=0,n.clear(),r=!1,s&&(s=!1,d.process(p))}};return d}const KO=40;function Qm(e,t){let n=!1,o=!0;const r={delta:0,timestamp:0,isProcessing:!1},s=()=>n=!0,a=ua.reduce((y,T)=>(y[T]=qO(s,t?T:void 0),y),{}),{read:c,resolveKeyframes:l,update:u,preRender:d,render:p,postRender:f}=a,g=()=>{const y=performance.now();n=!1,r.delta=o?1e3/60:Math.max(Math.min(y-r.timestamp,KO),1),r.timestamp=y,r.isProcessing=!0,c.process(r),l.process(r),u.process(r),d.process(r),p.process(r),f.process(r),r.isProcessing=!1,n&&t&&(o=!1,e(g))},m=()=>{n=!0,o=!0,r.isProcessing||e(g)};return{schedule:ua.reduce((y,T)=>{const C=a[T];return y[T]=(I,x=!1,w=!1)=>(n||m(),C.schedule(I,x,w)),y},{}),cancel:y=>{for(let T=0;T<ua.length;T++)a[ua[T]].cancel(y)},state:r,steps:a}}const{schedule:Ke,cancel:no,state:Et,steps:Zc}=Qm(typeof requestAnimationFrame<"u"?requestAnimationFrame:Wt,!0),eg=P.createContext({strict:!1}),tg={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"]},fr={};for(const e in tg)fr[e]={isEnabled:t=>tg[e].some(n=>!!t[n])};function QO(e){for(const t in e)fr[t]={...fr[t],...e[t]}}const eP=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 da(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||eP.has(e)}let ng=e=>!da(e);function tP(e){e&&(ng=t=>t.startsWith("on")?!da(t):e(t))}try{tP(require("@emotion/is-prop-valid").default)}catch{}function nP(e,t,n){const o={};for(const r in e)r==="values"&&typeof e.values=="object"||(ng(r)||n===!0&&da(r)||!t&&!da(r)||e.draggable&&r.startsWith("onDrag"))&&(o[r]=e[r]);return o}const og=new Set;function pa(e,t,n){e||og.has(t)||(console.warn(t),og.add(t))}function oP(e){if(typeof Proxy>"u")return e;const t=new Map,n=(...o)=>(process.env.NODE_ENV!=="production"&&pa(!1,"motion() is deprecated. Use motion.create() instead."),e(...o));return new Proxy(n,{get:(o,r)=>r==="create"?e:(t.has(r)||t.set(r,e(r)),t.get(r))})}const fa=P.createContext({});function ha(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function vi(e){return typeof e=="string"||Array.isArray(e)}const Jc=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],qc=["initial",...Jc];function ma(e){return ha(e.animate)||qc.some(t=>vi(e[t]))}function rg(e){return!!(ma(e)||e.variants)}function rP(e,t){if(ma(e)){const{initial:n,animate:o}=e;return{initial:n===!1||vi(n)?n:void 0,animate:vi(o)?o:void 0}}return e.inherit!==!1?t:{}}function iP(e){const{initial:t,animate:n}=rP(e,P.useContext(fa));return P.useMemo(()=>({initial:t,animate:n}),[ig(t),ig(n)])}function ig(e){return Array.isArray(e)?e.join(" "):e}const sP=Symbol.for("motionComponentSymbol");function hr(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function aP(e,t,n){return P.useCallback(o=>{o&&e.onMount&&e.onMount(o),t&&(o?t.mount(o):t.unmount()),n&&(typeof n=="function"?n(o):hr(n)&&(n.current=o))},[t])}const Kc=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),sg="data-"+Kc("framerAppearId"),{schedule:Qc}=Qm(queueMicrotask,!1),ag=P.createContext({});function lP(e,t,n,o,r){var s,a;const{visualElement:c}=P.useContext(fa),l=P.useContext(eg),u=P.useContext(aa),d=P.useContext(Xc).reducedMotion,p=P.useRef(null);o=o||l.renderer,!p.current&&o&&(p.current=o(e,{visualState:t,parent:c,props:n,presenceContext:u,blockInitialAnimation:u?u.initial===!1:!1,reducedMotionConfig:d}));const f=p.current,g=P.useContext(ag);f&&!f.projection&&r&&(f.type==="html"||f.type==="svg")&&cP(p.current,n,r,g);const m=P.useRef(!1);P.useInsertionEffect(()=>{f&&m.current&&f.update(n,u)});const h=n[sg],v=P.useRef(!!h&&!(!((s=window.MotionHandoffIsComplete)===null||s===void 0)&&s.call(window,h))&&((a=window.MotionHasOptimisedAnimation)===null||a===void 0?void 0:a.call(window,h)));return qm(()=>{f&&(m.current=!0,window.MotionIsMounted=!0,f.updateFeatures(),Qc.render(f.render),v.current&&f.animationState&&f.animationState.animateChanges())}),P.useEffect(()=>{f&&(!v.current&&f.animationState&&f.animationState.animateChanges(),v.current&&(queueMicrotask(()=>{var y;(y=window.MotionHandoffMarkAsComplete)===null||y===void 0||y.call(window,h)}),v.current=!1))}),f}function cP(e,t,n,o){const{layoutId:r,layout:s,drag:a,dragConstraints:c,layoutScroll:l,layoutRoot:u}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:lg(e.parent)),e.projection.setOptions({layoutId:r,layout:s,alwaysMeasureLayout:!!a||c&&hr(c),visualElement:e,animationType:typeof s=="string"?s:"both",initialPromotionConfig:o,layoutScroll:l,layoutRoot:u})}function lg(e){if(e)return e.options.allowProjection!==!1?e.projection:lg(e.parent)}function uP({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:o,Component:r}){var s,a;e&&QO(e);function c(u,d){let p;const f={...P.useContext(Xc),...u,layoutId:dP(u)},{isStatic:g}=f,m=iP(u),h=o(u,g);if(!g&&Uc){pP(f,e);const v=fP(f);p=v.MeasureLayout,m.visualElement=lP(r,h,f,t,v.ProjectionNode)}return b.jsxs(fa.Provider,{value:m,children:[p&&m.visualElement?b.jsx(p,{visualElement:m.visualElement,...f}):null,n(r,u,aP(h,m.visualElement,d),h,g,m.visualElement)]})}c.displayName=`motion.${typeof r=="string"?r:`create(${(a=(s=r.displayName)!==null&&s!==void 0?s:r.name)!==null&&a!==void 0?a:""})`}`;const l=P.forwardRef(c);return l[sP]=r,l}function dP({layoutId:e}){const t=P.useContext(zc).id;return t&&e!==void 0?t+"-"+e:e}function pP(e,t){const n=P.useContext(eg).strict;if(process.env.NODE_ENV!=="production"&&t&&n){const o="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";e.ignoreStrict?dr(!1,o):to(!1,o)}}function fP(e){const{drag:t,layout:n}=fr;if(!t&&!n)return{};const o={...t,...n};return{MeasureLayout:t!=null&&t.isEnabled(e)||n!=null&&n.isEnabled(e)?o.MeasureLayout:void 0,ProjectionNode:o.ProjectionNode}}const cg=e=>t=>typeof t=="string"&&t.startsWith(e),eu=cg("--"),hP=cg("var(--"),tu=e=>hP(e)?mP.test(e.split("/*")[0].trim()):!1,mP=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,yi={};function gP(e){for(const t in e)yi[t]=e[t],eu(t)&&(yi[t].isCSSVariable=!0)}const mr=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],To=new Set(mr);function ug(e,{layout:t,layoutId:n}){return To.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!yi[e]||e==="opacity")}const Rt=e=>!!(e&&e.getVelocity),dg=(e,t)=>t&&typeof e=="number"?t.transform(e):e,$n=(e,t,n)=>n>t?t:n<e?e:n,gr={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},xi={...gr,transform:e=>$n(0,1,e)},ga={...gr,default:1},Ci=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),oo=Ci("deg"),Nn=Ci("%"),Ce=Ci("px"),bP=Ci("vh"),vP=Ci("vw"),pg={...Nn,parse:e=>Nn.parse(e)/100,transform:e=>Nn.transform(e*100)},yP={borderWidth:Ce,borderTopWidth:Ce,borderRightWidth:Ce,borderBottomWidth:Ce,borderLeftWidth:Ce,borderRadius:Ce,radius:Ce,borderTopLeftRadius:Ce,borderTopRightRadius:Ce,borderBottomRightRadius:Ce,borderBottomLeftRadius:Ce,width:Ce,maxWidth:Ce,height:Ce,maxHeight:Ce,top:Ce,right:Ce,bottom:Ce,left:Ce,padding:Ce,paddingTop:Ce,paddingRight:Ce,paddingBottom:Ce,paddingLeft:Ce,margin:Ce,marginTop:Ce,marginRight:Ce,marginBottom:Ce,marginLeft:Ce,backgroundPositionX:Ce,backgroundPositionY:Ce},xP={rotate:oo,rotateX:oo,rotateY:oo,rotateZ:oo,scale:ga,scaleX:ga,scaleY:ga,scaleZ:ga,skew:oo,skewX:oo,skewY:oo,distance:Ce,translateX:Ce,translateY:Ce,translateZ:Ce,x:Ce,y:Ce,z:Ce,perspective:Ce,transformPerspective:Ce,opacity:xi,originX:pg,originY:pg,originZ:Ce},fg={...gr,transform:Math.round},nu={...yP,...xP,zIndex:fg,size:Ce,fillOpacity:xi,strokeOpacity:xi,numOctaves:fg},CP={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},EP=mr.length;function IP(e,t,n){let o="",r=!0;for(let s=0;s<EP;s++){const a=mr[s],c=e[a];if(c===void 0)continue;let l=!0;if(typeof c=="number"?l=c===(a.startsWith("scale")?1:0):l=parseFloat(c)===0,!l||n){const u=dg(c,nu[a]);if(!l){r=!1;const d=CP[a]||a;o+=`${d}(${u}) `}n&&(t[a]=u)}}return o=o.trim(),n?o=n(t,r?"":o):r&&(o="none"),o}function ou(e,t,n){const{style:o,vars:r,transformOrigin:s}=e;let a=!1,c=!1;for(const l in t){const u=t[l];if(To.has(l)){a=!0;continue}else if(eu(l)){r[l]=u;continue}else{const d=dg(u,nu[l]);l.startsWith("origin")?(c=!0,s[l]=d):o[l]=d}}if(t.transform||(a||n?o.transform=IP(t,e.transform,n):o.transform&&(o.transform="none")),c){const{originX:l="50%",originY:u="50%",originZ:d=0}=s;o.transformOrigin=`${l} ${u} ${d}`}}const ru=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function hg(e,t,n){for(const o in t)!Rt(t[o])&&!ug(o,n)&&(e[o]=t[o])}function TP({transformTemplate:e},t){return P.useMemo(()=>{const n=ru();return ou(n,t,e),Object.assign({},n.vars,n.style)},[t])}function SP(e,t){const n=e.style||{},o={};return hg(o,n,e),Object.assign(o,TP(e,t)),o}function wP(e,t){const n={},o=SP(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,o.userSelect=o.WebkitUserSelect=o.WebkitTouchCallout="none",o.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(n.tabIndex=0),n.style=o,n}const RP=["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 iu(e){return typeof e!="string"||e.includes("-")?!1:!!(RP.indexOf(e)>-1||/[A-Z]/u.test(e))}const AP={offset:"stroke-dashoffset",array:"stroke-dasharray"},OP={offset:"strokeDashoffset",array:"strokeDasharray"};function PP(e,t,n=1,o=0,r=!0){e.pathLength=1;const s=r?AP:OP;e[s.offset]=Ce.transform(-o);const a=Ce.transform(t),c=Ce.transform(n);e[s.array]=`${a} ${c}`}function mg(e,t,n){return typeof e=="string"?e:Ce.transform(t+n*e)}function MP(e,t,n){const o=mg(t,e.x,e.width),r=mg(n,e.y,e.height);return`${o} ${r}`}function su(e,{attrX:t,attrY:n,attrScale:o,originX:r,originY:s,pathLength:a,pathSpacing:c=1,pathOffset:l=0,...u},d,p){if(ou(e,u,p),d){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:f,style:g,dimensions:m}=e;f.transform&&(m&&(g.transform=f.transform),delete f.transform),m&&(r!==void 0||s!==void 0||g.transform)&&(g.transformOrigin=MP(m,r!==void 0?r:.5,s!==void 0?s:.5)),t!==void 0&&(f.x=t),n!==void 0&&(f.y=n),o!==void 0&&(f.scale=o),a!==void 0&&PP(f,a,c,l,!1)}const gg=()=>({...ru(),attrs:{}}),au=e=>typeof e=="string"&&e.toLowerCase()==="svg";function NP(e,t,n,o){const r=P.useMemo(()=>{const s=gg();return su(s,t,au(o),e.transformTemplate),{...s.attrs,style:{...s.style}}},[t]);if(e.style){const s={};hg(s,e.style,e),r.style={...s,...r.style}}return r}function kP(e=!1){return(n,o,r,{latestValues:s},a)=>{const l=(iu(n)?NP:wP)(o,s,a,n),u=nP(o,typeof n=="string",e),d=n!==P.Fragment?{...u,...l,ref:r}:{},{children:p}=o,f=P.useMemo(()=>Rt(p)?p.get():p,[p]);return P.createElement(n,{...d,children:f})}}function bg(e){const t=[{},{}];return e==null||e.values.forEach((n,o)=>{t[0][o]=n.get(),t[1][o]=n.getVelocity()}),t}function lu(e,t,n,o){if(typeof t=="function"){const[r,s]=bg(o);t=t(n!==void 0?n:e.custom,r,s)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[r,s]=bg(o);t=t(n!==void 0?n:e.custom,r,s)}return t}const cu=e=>Array.isArray(e),DP=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),BP=e=>cu(e)?e[e.length-1]||0:e;function ba(e){const t=Rt(e)?e.get():e;return DP(t)?t.toValue():t}function jP({scrapeMotionValuesFromProps:e,createRenderState:t,onUpdate:n},o,r,s){const a={latestValues:FP(o,r,s,e),renderState:t()};return n&&(a.onMount=c=>n({props:o,current:c,...a}),a.onUpdate=c=>n(c)),a}const vg=e=>(t,n)=>{const o=P.useContext(fa),r=P.useContext(aa),s=()=>jP(e,t,o,r);return n?s():Hc(s)};function FP(e,t,n,o){const r={},s=o(e,{});for(const f in s)r[f]=ba(s[f]);let{initial:a,animate:c}=e;const l=ma(e),u=rg(e);t&&u&&!l&&e.inherit!==!1&&(a===void 0&&(a=t.initial),c===void 0&&(c=t.animate));let d=n?n.initial===!1:!1;d=d||a===!1;const p=d?c:a;if(p&&typeof p!="boolean"&&!ha(p)){const f=Array.isArray(p)?p:[p];for(let g=0;g<f.length;g++){const m=lu(e,f[g]);if(m){const{transitionEnd:h,transition:v,...y}=m;for(const T in y){let C=y[T];if(Array.isArray(C)){const I=d?C.length-1:0;C=C[I]}C!==null&&(r[T]=C)}for(const T in h)r[T]=h[T]}}}return r}function uu(e,t,n){var o;const{style:r}=e,s={};for(const a in r)(Rt(r[a])||t.style&&Rt(t.style[a])||ug(a,e)||((o=n==null?void 0:n.getValue(a))===null||o===void 0?void 0:o.liveStyle)!==void 0)&&(s[a]=r[a]);return s}const VP={useVisualState:vg({scrapeMotionValuesFromProps:uu,createRenderState:ru})};function yg(e,t){try{t.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{t.dimensions={x:0,y:0,width:0,height:0}}}function xg(e,{style:t,vars:n},o,r){Object.assign(e.style,t,r&&r.getProjectionStyles(o));for(const s in n)e.style.setProperty(s,n[s])}const Cg=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 Eg(e,t,n,o){xg(e,t,void 0,o);for(const r in t.attrs)e.setAttribute(Cg.has(r)?r:Kc(r),t.attrs[r])}function Ig(e,t,n){const o=uu(e,t,n);for(const r in e)if(Rt(e[r])||Rt(t[r])){const s=mr.indexOf(r)!==-1?"attr"+r.charAt(0).toUpperCase()+r.substring(1):r;o[s]=e[r]}return o}const Tg=["x","y","width","height","cx","cy","r"],LP={useVisualState:vg({scrapeMotionValuesFromProps:Ig,createRenderState:gg,onUpdate:({props:e,prevProps:t,current:n,renderState:o,latestValues:r})=>{if(!n)return;let s=!!e.drag;if(!s){for(const c in r)if(To.has(c)){s=!0;break}}if(!s)return;let a=!t;if(t)for(let c=0;c<Tg.length;c++){const l=Tg[c];e[l]!==t[l]&&(a=!0)}a&&Ke.read(()=>{yg(n,o),Ke.render(()=>{su(o,r,au(n.tagName),e.transformTemplate),Eg(n,o)})})}})};function _P(e,t){return function(o,{forwardMotionProps:r}={forwardMotionProps:!1}){const a={...iu(o)?LP:VP,preloadedFeatures:e,useRender:kP(r),createVisualElement:t,Component:o};return uP(a)}}function Ei(e,t,n){const o=e.getProps();return lu(o,t,n!==void 0?n:o.custom,e)}const $P=Yc(()=>window.ScrollTimeline!==void 0);class GP{constructor(t){this.stop=()=>this.runAll("stop"),this.animations=t.filter(Boolean)}get finished(){return Promise.all(this.animations.map(t=>"finished"in t?t.finished:t))}getAll(t){return this.animations[0][t]}setAll(t,n){for(let o=0;o<this.animations.length;o++)this.animations[o][t]=n}attachTimeline(t,n){const o=this.animations.map(r=>{if($P()&&r.attachTimeline)return r.attachTimeline(t);if(typeof n=="function")return n(r)});return()=>{o.forEach((r,s)=>{r&&r(),this.animations[s].stop()})}}get time(){return this.getAll("time")}set time(t){this.setAll("time",t)}get speed(){return this.getAll("speed")}set speed(t){this.setAll("speed",t)}get startTime(){return this.getAll("startTime")}get duration(){let t=0;for(let n=0;n<this.animations.length;n++)t=Math.max(t,this.animations[n].duration);return t}runAll(t){this.animations.forEach(n=>n[t]())}flatten(){this.runAll("flatten")}play(){this.runAll("play")}pause(){this.runAll("pause")}cancel(){this.runAll("cancel")}complete(){this.runAll("complete")}}class WP extends GP{then(t,n){return Promise.all(this.animations).then(t).catch(n)}}function du(e,t){return e?e[t]||e.default||e:void 0}const pu=2e4;function Sg(e){let t=0;const n=50;let o=e.next(t);for(;!o.done&&t<pu;)t+=n,o=e.next(t);return t>=pu?1/0:t}function fu(e){return typeof e=="function"}function wg(e,t){e.timeline=t,e.onfinish=null}const hu=e=>Array.isArray(e)&&typeof e[0]=="number",zP={linearEasing:void 0};function HP(e,t){const n=Yc(e);return()=>{var o;return(o=zP[t])!==null&&o!==void 0?o:n()}}const va=HP(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),Rg=(e,t,n=10)=>{let o="";const r=Math.max(Math.round(t/n),2);for(let s=0;s<r;s++)o+=e(pr(0,r-1,s))+", ";return`linear(${o.substring(0,o.length-2)})`};function Ag(e){return!!(typeof e=="function"&&va()||!e||typeof e=="string"&&(e in mu||va())||hu(e)||Array.isArray(e)&&e.every(Ag))}const Ii=([e,t,n,o])=>`cubic-bezier(${e}, ${t}, ${n}, ${o})`,mu={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Ii([0,.65,.55,1]),circOut:Ii([.55,0,1,.45]),backIn:Ii([.31,.01,.66,-.59]),backOut:Ii([.33,1.53,.69,.99])};function Og(e,t){if(e)return typeof e=="function"&&va()?Rg(e,t):hu(e)?Ii(e):Array.isArray(e)?e.map(n=>Og(n,t)||mu.easeOut):mu[e]}const yn={x:!1,y:!1};function Pg(){return yn.x||yn.y}function XP(e,t,n){var o;if(e instanceof EventTarget)return[e];if(typeof e=="string"){let r=document;const s=(o=void 0)!==null&&o!==void 0?o:r.querySelectorAll(e);return s?Array.from(s):[]}return Array.from(e)}function Mg(e,t){const n=XP(e),o=new AbortController,r={passive:!0,...t,signal:o.signal};return[n,r,()=>o.abort()]}function Ng(e){return!(e.pointerType==="touch"||Pg())}function UP(e,t,n={}){const[o,r,s]=Mg(e,n),a=c=>{if(!Ng(c))return;const{target:l}=c,u=t(l,c);if(typeof u!="function"||!l)return;const d=p=>{Ng(p)&&(u(p),l.removeEventListener("pointerleave",d))};l.addEventListener("pointerleave",d,r)};return o.forEach(c=>{c.addEventListener("pointerenter",a,r)}),s}function Ti(e,t){const n=`${t}PointerCapture`;if(e.target instanceof Element&&n in e.target&&e.pointerId!==void 0)try{e.target[n](e.pointerId)}catch{}}const kg=(e,t)=>t?e===t?!0:kg(e,t.parentElement):!1,gu=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1,YP=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function ZP(e){return YP.has(e.tagName)||e.tabIndex!==-1}const Si=new WeakSet;function Dg(e){return t=>{t.key==="Enter"&&e(t)}}function bu(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const JP=(e,t)=>{const n=e.currentTarget;if(!n)return;const o=Dg(()=>{if(Si.has(n))return;bu(n,"down");const r=Dg(()=>{bu(n,"up")}),s=()=>bu(n,"cancel");n.addEventListener("keyup",r,t),n.addEventListener("blur",s,t)});n.addEventListener("keydown",o,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",o),t)};function Bg(e){return gu(e)&&!Pg()}function qP(e,t,n={}){const[o,r,s]=Mg(e,n),a=c=>{const l=c.currentTarget;if(!l||!Bg(c)||Si.has(l))return;Si.add(l),Ti(c,"set");const u=t(l,c),d=(g,m)=>{l.removeEventListener("pointerup",p),l.removeEventListener("pointercancel",f),Ti(g,"release"),!(!Bg(g)||!Si.has(l))&&(Si.delete(l),typeof u=="function"&&u(g,{success:m}))},p=g=>{(g.isTrusted?KP(g,l instanceof Element?l.getBoundingClientRect():{left:0,top:0,right:window.innerWidth,bottom:window.innerHeight}):!1)?d(g,!1):d(g,!(l instanceof Element)||kg(l,g.target))},f=g=>{d(g,!1)};l.addEventListener("pointerup",p,r),l.addEventListener("pointercancel",f,r),l.addEventListener("lostpointercapture",f,r)};return o.forEach(c=>{c=n.useGlobalTarget?window:c;let l=!1;c instanceof HTMLElement&&(l=!0,!ZP(c)&&c.getAttribute("tabindex")===null&&(c.tabIndex=0)),c.addEventListener("pointerdown",a,r),l&&c.addEventListener("focus",u=>JP(u,r),r)}),s}function KP(e,t){return e.clientX<t.left||e.clientX>t.right||e.clientY<t.top||e.clientY>t.bottom}function QP(e){return e==="x"||e==="y"?yn[e]?null:(yn[e]=!0,()=>{yn[e]=!1}):yn.x||yn.y?null:(yn.x=yn.y=!0,()=>{yn.x=yn.y=!1})}const jg=new Set(["width","height","top","left","right","bottom",...mr]);let ya;function eM(){ya=void 0}const kn={now:()=>(ya===void 0&&kn.set(Et.isProcessing||JO.useManualTiming?Et.timestamp:performance.now()),ya),set:e=>{ya=e,queueMicrotask(eM)}};function vu(e,t){e.indexOf(t)===-1&&e.push(t)}function yu(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class xu{constructor(){this.subscriptions=[]}add(t){return vu(this.subscriptions,t),()=>yu(this.subscriptions,t)}notify(t,n,o){const r=this.subscriptions.length;if(r)if(r===1)this.subscriptions[0](t,n,o);else for(let s=0;s<r;s++){const a=this.subscriptions[s];a&&a(t,n,o)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}function Fg(e,t){return t?e*(1e3/t):0}const Vg=30,tM=e=>!isNaN(parseFloat(e));class nM{constructor(t,n={}){this.version="12.4.10",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(o,r=!0)=>{const s=kn.now();this.updatedAt!==s&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(o),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),r&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.hasAnimated=!1,this.setCurrent(t),this.owner=n.owner}setCurrent(t){this.current=t,this.updatedAt=kn.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=tM(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&pa(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",t)}on(t,n){this.events[t]||(this.events[t]=new xu);const o=this.events[t].add(n);return t==="change"?()=>{o(),Ke.read(()=>{this.events.change.getSize()||this.stop()})}:o}clearListeners(){for(const t in this.events)this.events[t].clear()}attach(t,n){this.passiveEffect=t,this.stopPassiveEffect=n}set(t,n=!0){!n||!this.passiveEffect?this.updateAndNotify(t,n):this.passiveEffect(t,this.updateAndNotify)}setWithVelocity(t,n,o){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-o}jump(t,n=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=kn.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>Vg)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Vg);return Fg(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(t){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=t(n),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function wi(e,t){return new nM(e,t)}function oM(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,wi(n))}function rM(e,t){const n=Ei(e,t);let{transitionEnd:o={},transition:r={},...s}=n||{};s={...s,...o};for(const a in s){const c=BP(s[a]);oM(e,a,c)}}function iM(e){return!!(Rt(e)&&e.add)}function Cu(e,t){const n=e.getValue("willChange");if(iM(n))return n.add(t)}function Lg(e){return e.props[sg]}const _g=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,sM=1e-7,aM=12;function lM(e,t,n,o,r){let s,a,c=0;do a=t+(n-t)/2,s=_g(a,o,r)-e,s>0?n=a:t=a;while(Math.abs(s)>sM&&++c<aM);return a}function Ri(e,t,n,o){if(e===t&&n===o)return Wt;const r=s=>lM(s,0,1,e,n);return s=>s===0||s===1?s:_g(r(s),t,o)}const $g=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Gg=e=>t=>1-e(1-t),Wg=Ri(.33,1.53,.69,.99),Eu=Gg(Wg),zg=$g(Eu),Hg=e=>(e*=2)<1?.5*Eu(e):.5*(2-Math.pow(2,-10*(e-1))),Iu=e=>1-Math.sin(Math.acos(e)),Xg=Gg(Iu),Ug=$g(Iu),Yg=e=>/^0[^.\s]+$/u.test(e);function cM(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||Yg(e):!0}const Ai=e=>Math.round(e*1e5)/1e5,Tu=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function uM(e){return e==null}const dM=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Su=(e,t)=>n=>!!(typeof n=="string"&&dM.test(n)&&n.startsWith(e)||t&&!uM(n)&&Object.prototype.hasOwnProperty.call(n,t)),Zg=(e,t,n)=>o=>{if(typeof o!="string")return o;const[r,s,a,c]=o.match(Tu);return{[e]:parseFloat(r),[t]:parseFloat(s),[n]:parseFloat(a),alpha:c!==void 0?parseFloat(c):1}},pM=e=>$n(0,255,e),wu={...gr,transform:e=>Math.round(pM(e))},So={test:Su("rgb","red"),parse:Zg("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:o=1})=>"rgba("+wu.transform(e)+", "+wu.transform(t)+", "+wu.transform(n)+", "+Ai(xi.transform(o))+")"};function fM(e){let t="",n="",o="",r="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),o=e.substring(5,7),r=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),o=e.substring(3,4),r=e.substring(4,5),t+=t,n+=n,o+=o,r+=r),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(o,16),alpha:r?parseInt(r,16)/255:1}}const Ru={test:Su("#"),parse:fM,transform:So.transform},br={test:Su("hsl","hue"),parse:Zg("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:o=1})=>"hsla("+Math.round(e)+", "+Nn.transform(Ai(t))+", "+Nn.transform(Ai(n))+", "+Ai(xi.transform(o))+")"},At={test:e=>So.test(e)||Ru.test(e)||br.test(e),parse:e=>So.test(e)?So.parse(e):br.test(e)?br.parse(e):Ru.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?So.transform(e):br.transform(e)},hM=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function mM(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(Tu))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(hM))===null||n===void 0?void 0:n.length)||0)>0}const Jg="number",qg="color",gM="var",bM="var(",Kg="${}",vM=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Oi(e){const t=e.toString(),n=[],o={color:[],number:[],var:[]},r=[];let s=0;const c=t.replace(vM,l=>(At.test(l)?(o.color.push(s),r.push(qg),n.push(At.parse(l))):l.startsWith(bM)?(o.var.push(s),r.push(gM),n.push(l)):(o.number.push(s),r.push(Jg),n.push(parseFloat(l))),++s,Kg)).split(Kg);return{values:n,split:c,indexes:o,types:r}}function Qg(e){return Oi(e).values}function eb(e){const{split:t,types:n}=Oi(e),o=t.length;return r=>{let s="";for(let a=0;a<o;a++)if(s+=t[a],r[a]!==void 0){const c=n[a];c===Jg?s+=Ai(r[a]):c===qg?s+=At.transform(r[a]):s+=r[a]}return s}}const yM=e=>typeof e=="number"?0:e;function xM(e){const t=Qg(e);return eb(e)(t.map(yM))}const ro={test:mM,parse:Qg,createTransformer:eb,getAnimatableNone:xM},CM=new Set(["brightness","contrast","saturate","opacity"]);function EM(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[o]=n.match(Tu)||[];if(!o)return e;const r=n.replace(o,"");let s=CM.has(t)?1:0;return o!==n&&(s*=100),t+"("+s+r+")"}const IM=/\b([a-z-]*)\(.*?\)/gu,Au={...ro,getAnimatableNone:e=>{const t=e.match(IM);return t?t.map(EM).join(" "):e}},TM={...nu,color:At,backgroundColor:At,outlineColor:At,fill:At,stroke:At,borderColor:At,borderTopColor:At,borderRightColor:At,borderBottomColor:At,borderLeftColor:At,filter:Au,WebkitFilter:Au},Ou=e=>TM[e];function tb(e,t){let n=Ou(e);return n!==Au&&(n=ro),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const SM=new Set(["auto","none","0"]);function wM(e,t,n){let o=0,r;for(;o<e.length&&!r;){const s=e[o];typeof s=="string"&&!SM.has(s)&&Oi(s).values.length&&(r=e[o]),o++}if(r&&n)for(const s of t)e[s]=tb(n,r)}const nb=e=>e===gr||e===Ce,ob=(e,t)=>parseFloat(e.split(", ")[t]),rb=(e,t)=>(n,{transform:o})=>{if(o==="none"||!o)return 0;const r=o.match(/^matrix3d\((.+)\)$/u);if(r)return ob(r[1],t);{const s=o.match(/^matrix\((.+)\)$/u);return s?ob(s[1],e):0}},RM=new Set(["x","y","z"]),AM=mr.filter(e=>!RM.has(e));function OM(e){const t=[];return AM.forEach(n=>{const o=e.getValue(n);o!==void 0&&(t.push([n,o.get()]),o.set(n.startsWith("scale")?1:0))}),t}const vr={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:rb(4,13),y:rb(5,14)};vr.translateX=vr.x,vr.translateY=vr.y;const wo=new Set;let Pu=!1,Mu=!1;function ib(){if(Mu){const e=Array.from(wo).filter(o=>o.needsMeasurement),t=new Set(e.map(o=>o.element)),n=new Map;t.forEach(o=>{const r=OM(o);r.length&&(n.set(o,r),o.render())}),e.forEach(o=>o.measureInitialState()),t.forEach(o=>{o.render();const r=n.get(o);r&&r.forEach(([s,a])=>{var c;(c=o.getValue(s))===null||c===void 0||c.set(a)})}),e.forEach(o=>o.measureEndState()),e.forEach(o=>{o.suspendedScrollY!==void 0&&window.scrollTo(0,o.suspendedScrollY)})}Mu=!1,Pu=!1,wo.forEach(e=>e.complete()),wo.clear()}function sb(){wo.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(Mu=!0)})}function PM(){sb(),ib()}class Nu{constructor(t,n,o,r,s,a=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=o,this.motionValue=r,this.element=s,this.isAsync=a}scheduleResolve(){this.isScheduled=!0,this.isAsync?(wo.add(this),Pu||(Pu=!0,Ke.read(sb),Ke.resolveKeyframes(ib))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:o,motionValue:r}=this;for(let s=0;s<t.length;s++)if(t[s]===null)if(s===0){const a=r==null?void 0:r.get(),c=t[t.length-1];if(a!==void 0)t[0]=a;else if(o&&n){const l=o.readValue(n,c);l!=null&&(t[0]=l)}t[0]===void 0&&(t[0]=c),r&&a===void 0&&r.set(t[0])}else t[s]=t[s-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),wo.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,wo.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const ab=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),MM=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function NM(e){const t=MM.exec(e);if(!t)return[,];const[,n,o,r]=t;return[`--${n??o}`,r]}const kM=4;function lb(e,t,n=1){to(n<=kM,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);const[o,r]=NM(e);if(!o)return;const s=window.getComputedStyle(t).getPropertyValue(o);if(s){const a=s.trim();return ab(a)?parseFloat(a):a}return tu(r)?lb(r,t,n+1):r}const cb=e=>t=>t.test(e),ub=[gr,Ce,Nn,oo,vP,bP,{test:e=>e==="auto",parse:e=>e}],db=e=>ub.find(cb(e));class pb extends Nu{constructor(t,n,o,r,s){super(t,n,o,r,s,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:o}=this;if(!n||!n.current)return;super.readKeyframes();for(let l=0;l<t.length;l++){let u=t[l];if(typeof u=="string"&&(u=u.trim(),tu(u))){const d=lb(u,n.current);d!==void 0&&(t[l]=d),l===t.length-1&&(this.finalKeyframe=u)}}if(this.resolveNoneKeyframes(),!jg.has(o)||t.length!==2)return;const[r,s]=t,a=db(r),c=db(s);if(a!==c)if(nb(a)&&nb(c))for(let l=0;l<t.length;l++){const u=t[l];typeof u=="string"&&(t[l]=parseFloat(u))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,o=[];for(let r=0;r<t.length;r++)cM(t[r])&&o.push(r);o.length&&wM(t,o,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:o}=this;if(!t||!t.current)return;o==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=vr[o](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const r=n[n.length-1];r!==void 0&&t.getValue(o,r).jump(r,!1)}measureEndState(){var t;const{element:n,name:o,unresolvedKeyframes:r}=this;if(!n||!n.current)return;const s=n.getValue(o);s&&s.jump(this.measuredOrigin,!1);const a=r.length-1,c=r[a];r[a]=vr[o](n.measureViewportBox(),window.getComputedStyle(n.current)),c!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=c),!((t=this.removedTransforms)===null||t===void 0)&&t.length&&this.removedTransforms.forEach(([l,u])=>{n.getValue(l).set(u)}),this.resolveNoneKeyframes()}}const fb=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(ro.test(e)||e==="0")&&!e.startsWith("url("));function DM(e){const t=e[0];if(e.length===1)return!0;for(let n=0;n<e.length;n++)if(e[n]!==t)return!0}function BM(e,t,n,o){const r=e[0];if(r===null)return!1;if(t==="display"||t==="visibility")return!0;const s=e[e.length-1],a=fb(r,t),c=fb(s,t);return dr(a===c,`You are trying to animate ${t} from "${r}" to "${s}". ${r} is not an animatable value - to enable this animation set ${r} to a value animatable to ${s} via the \`style\` property.`),!a||!c?!1:DM(e)||(n==="spring"||fu(n))&&o}const jM=e=>e!==null;function xa(e,{repeat:t,repeatType:n="loop"},o){const r=e.filter(jM),s=t&&n!=="loop"&&t%2===1?0:r.length-1;return!s||o===void 0?r[s]:o}const FM=40;class hb{constructor({autoplay:t=!0,delay:n=0,type:o="keyframes",repeat:r=0,repeatDelay:s=0,repeatType:a="loop",...c}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=kn.now(),this.options={autoplay:t,delay:n,type:o,repeat:r,repeatDelay:s,repeatType:a,...c},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>FM?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&PM(),this._resolved}onKeyframesResolved(t,n){this.resolvedAt=kn.now(),this.hasAttemptedResolve=!0;const{name:o,type:r,velocity:s,delay:a,onComplete:c,onUpdate:l,isGenerator:u}=this.options;if(!u&&!BM(t,o,r,s))if(a)this.options.duration=0;else{l&&l(xa(t,this.options,n)),c&&c(),this.resolveFinishedPromise();return}const d=this.initPlayback(t,n);d!==!1&&(this._resolved={keyframes:t,finalKeyframe:n,...d},this.onPostResolved())}onPostResolved(){}then(t,n){return this.currentFinishedPromise.then(t,n)}flatten(){this.options.type="keyframes",this.options.ease="linear"}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}const lt=(e,t,n)=>e+(t-e)*n;function ku(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+(t-e)*6*n:n<1/2?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function VM({hue:e,saturation:t,lightness:n,alpha:o}){e/=360,t/=100,n/=100;let r=0,s=0,a=0;if(!t)r=s=a=n;else{const c=n<.5?n*(1+t):n+t-n*t,l=2*n-c;r=ku(l,c,e+1/3),s=ku(l,c,e),a=ku(l,c,e-1/3)}return{red:Math.round(r*255),green:Math.round(s*255),blue:Math.round(a*255),alpha:o}}function Ca(e,t){return n=>n>0?t:e}const Du=(e,t,n)=>{const o=e*e,r=n*(t*t-o)+o;return r<0?0:Math.sqrt(r)},LM=[Ru,So,br],_M=e=>LM.find(t=>t.test(e));function mb(e){const t=_M(e);if(dr(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`),!t)return!1;let n=t.parse(e);return t===br&&(n=VM(n)),n}const gb=(e,t)=>{const n=mb(e),o=mb(t);if(!n||!o)return Ca(e,t);const r={...n};return s=>(r.red=Du(n.red,o.red,s),r.green=Du(n.green,o.green,s),r.blue=Du(n.blue,o.blue,s),r.alpha=lt(n.alpha,o.alpha,s),So.transform(r))},$M=(e,t)=>n=>t(e(n)),Pi=(...e)=>e.reduce($M),Bu=new Set(["none","hidden"]);function GM(e,t){return Bu.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function WM(e,t){return n=>lt(e,t,n)}function ju(e){return typeof e=="number"?WM:typeof e=="string"?tu(e)?Ca:At.test(e)?gb:XM:Array.isArray(e)?bb:typeof e=="object"?At.test(e)?gb:zM:Ca}function bb(e,t){const n=[...e],o=n.length,r=e.map((s,a)=>ju(s)(s,t[a]));return s=>{for(let a=0;a<o;a++)n[a]=r[a](s);return n}}function zM(e,t){const n={...e,...t},o={};for(const r in n)e[r]!==void 0&&t[r]!==void 0&&(o[r]=ju(e[r])(e[r],t[r]));return r=>{for(const s in o)n[s]=o[s](r);return n}}function HM(e,t){var n;const o=[],r={color:0,var:0,number:0};for(let s=0;s<t.values.length;s++){const a=t.types[s],c=e.indexes[a][r[a]],l=(n=e.values[c])!==null&&n!==void 0?n:0;o[s]=l,r[a]++}return o}const XM=(e,t)=>{const n=ro.createTransformer(t),o=Oi(e),r=Oi(t);return o.indexes.var.length===r.indexes.var.length&&o.indexes.color.length===r.indexes.color.length&&o.indexes.number.length>=r.indexes.number.length?Bu.has(e)&&!r.values.length||Bu.has(t)&&!o.values.length?GM(e,t):Pi(bb(HM(o,r),r.values),n):(dr(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),Ca(e,t))};function vb(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?lt(e,t,n):ju(e)(e,t)}const UM=5;function yb(e,t,n){const o=Math.max(t-UM,0);return Fg(n-e(o),t-o)}const ct={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},xb=.001;function YM({duration:e=ct.duration,bounce:t=ct.bounce,velocity:n=ct.velocity,mass:o=ct.mass}){let r,s;dr(e<=Mn(ct.maxDuration),"Spring duration must be 10 seconds or less");let a=1-t;a=$n(ct.minDamping,ct.maxDamping,a),e=$n(ct.minDuration,ct.maxDuration,_n(e)),a<1?(r=u=>{const d=u*a,p=d*e,f=d-n,g=Fu(u,a),m=Math.exp(-p);return xb-f/g*m},s=u=>{const p=u*a*e,f=p*n+n,g=Math.pow(a,2)*Math.pow(u,2)*e,m=Math.exp(-p),h=Fu(Math.pow(u,2),a);return(-r(u)+xb>0?-1:1)*((f-g)*m)/h}):(r=u=>{const d=Math.exp(-u*e),p=(u-n)*e+1;return-.001+d*p},s=u=>{const d=Math.exp(-u*e),p=(n-u)*(e*e);return d*p});const c=5/e,l=JM(r,s,c);if(e=Mn(e),isNaN(l))return{stiffness:ct.stiffness,damping:ct.damping,duration:e};{const u=Math.pow(l,2)*o;return{stiffness:u,damping:a*2*Math.sqrt(o*u),duration:e}}}const ZM=12;function JM(e,t,n){let o=n;for(let r=1;r<ZM;r++)o=o-e(o)/t(o);return o}function Fu(e,t){return e*Math.sqrt(1-t*t)}const qM=["duration","bounce"],KM=["stiffness","damping","mass"];function Cb(e,t){return t.some(n=>e[n]!==void 0)}function QM(e){let t={velocity:ct.velocity,stiffness:ct.stiffness,damping:ct.damping,mass:ct.mass,isResolvedFromDuration:!1,...e};if(!Cb(e,KM)&&Cb(e,qM))if(e.visualDuration){const n=e.visualDuration,o=2*Math.PI/(n*1.2),r=o*o,s=2*$n(.05,1,1-(e.bounce||0))*Math.sqrt(r);t={...t,mass:ct.mass,stiffness:r,damping:s}}else{const n=YM(e);t={...t,...n,mass:ct.mass},t.isResolvedFromDuration=!0}return t}function Eb(e=ct.visualDuration,t=ct.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:o,restDelta:r}=n;const s=n.keyframes[0],a=n.keyframes[n.keyframes.length-1],c={done:!1,value:s},{stiffness:l,damping:u,mass:d,duration:p,velocity:f,isResolvedFromDuration:g}=QM({...n,velocity:-_n(n.velocity||0)}),m=f||0,h=u/(2*Math.sqrt(l*d)),v=a-s,y=_n(Math.sqrt(l/d)),T=Math.abs(v)<5;o||(o=T?ct.restSpeed.granular:ct.restSpeed.default),r||(r=T?ct.restDelta.granular:ct.restDelta.default);let C;if(h<1){const x=Fu(y,h);C=w=>{const R=Math.exp(-h*y*w);return a-R*((m+h*y*v)/x*Math.sin(x*w)+v*Math.cos(x*w))}}else if(h===1)C=x=>a-Math.exp(-y*x)*(v+(m+y*v)*x);else{const x=y*Math.sqrt(h*h-1);C=w=>{const R=Math.exp(-h*y*w),A=Math.min(x*w,300);return a-R*((m+h*y*v)*Math.sinh(A)+x*v*Math.cosh(A))/x}}const I={calculatedDuration:g&&p||null,next:x=>{const w=C(x);if(g)c.done=x>=p;else{let R=0;h<1&&(R=x===0?Mn(m):yb(C,x,w));const A=Math.abs(R)<=o,M=Math.abs(a-w)<=r;c.done=A&&M}return c.value=c.done?a:w,c},toString:()=>{const x=Math.min(Sg(I),pu),w=Rg(R=>I.next(x*R).value,x,30);return x+"ms "+w}};return I}function Ib({keyframes:e,velocity:t=0,power:n=.8,timeConstant:o=325,bounceDamping:r=10,bounceStiffness:s=500,modifyTarget:a,min:c,max:l,restDelta:u=.5,restSpeed:d}){const p=e[0],f={done:!1,value:p},g=A=>c!==void 0&&A<c||l!==void 0&&A>l,m=A=>c===void 0?l:l===void 0||Math.abs(c-A)<Math.abs(l-A)?c:l;let h=n*t;const v=p+h,y=a===void 0?v:a(v);y!==v&&(h=y-p);const T=A=>-h*Math.exp(-A/o),C=A=>y+T(A),I=A=>{const M=T(A),N=C(A);f.done=Math.abs(M)<=u,f.value=f.done?y:N};let x,w;const R=A=>{g(f.value)&&(x=A,w=Eb({keyframes:[f.value,m(f.value)],velocity:yb(C,A,f.value),damping:r,stiffness:s,restDelta:u,restSpeed:d}))};return R(0),{calculatedDuration:null,next:A=>{let M=!1;return!w&&x===void 0&&(M=!0,I(A),R(A)),x!==void 0&&A>=x?w.next(A-x):(!M&&I(A),f)}}}const e5=Ri(.42,0,1,1),t5=Ri(0,0,.58,1),Tb=Ri(.42,0,.58,1),n5=e=>Array.isArray(e)&&typeof e[0]!="number",Sb={linear:Wt,easeIn:e5,easeInOut:Tb,easeOut:t5,circIn:Iu,circInOut:Ug,circOut:Xg,backIn:Eu,backInOut:zg,backOut:Wg,anticipate:Hg},wb=e=>{if(hu(e)){to(e.length===4,"Cubic bezier arrays must contain four numerical values.");const[t,n,o,r]=e;return Ri(t,n,o,r)}else if(typeof e=="string")return to(Sb[e]!==void 0,`Invalid easing type '${e}'`),Sb[e];return e};function o5(e,t,n){const o=[],r=n||vb,s=e.length-1;for(let a=0;a<s;a++){let c=r(e[a],e[a+1]);if(t){const l=Array.isArray(t)?t[a]||Wt:t;c=Pi(l,c)}o.push(c)}return o}function r5(e,t,{clamp:n=!0,ease:o,mixer:r}={}){const s=e.length;if(to(s===t.length,"Both input and output ranges must be the same length"),s===1)return()=>t[0];if(s===2&&t[0]===t[1])return()=>t[1];const a=e[0]===e[1];e[0]>e[s-1]&&(e=[...e].reverse(),t=[...t].reverse());const c=o5(t,o,r),l=c.length,u=d=>{if(a&&d<e[0])return t[0];let p=0;if(l>1)for(;p<e.length-2&&!(d<e[p+1]);p++);const f=pr(e[p],e[p+1],d);return c[p](f)};return n?d=>u($n(e[0],e[s-1],d)):u}function i5(e,t){const n=e[e.length-1];for(let o=1;o<=t;o++){const r=pr(0,t,o);e.push(lt(n,1,r))}}function s5(e){const t=[0];return i5(t,e.length-1),t}function a5(e,t){return e.map(n=>n*t)}function l5(e,t){return e.map(()=>t||Tb).splice(0,e.length-1)}function Mi({duration:e=300,keyframes:t,times:n,ease:o="easeInOut"}){const r=n5(o)?o.map(wb):wb(o),s={done:!1,value:t[0]},a=a5(n&&n.length===t.length?n:s5(t),e),c=r5(a,t,{ease:Array.isArray(r)?r:l5(t,r)});return{calculatedDuration:e,next:l=>(s.value=c(l),s.done=l>=e,s)}}const c5=e=>{const t=({timestamp:n})=>e(n);return{start:()=>Ke.update(t,!0),stop:()=>no(t),now:()=>Et.isProcessing?Et.timestamp:kn.now()}},u5={decay:Ib,inertia:Ib,tween:Mi,keyframes:Mi,spring:Eb},d5=e=>e/100;class Vu extends hb{constructor(t){super(t),this.holdTime=null,this.cancelTime=null,this.currentTime=0,this.playbackSpeed=1,this.pendingPlayState="running",this.startTime=null,this.state="idle",this.stop=()=>{if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.teardown();const{onStop:l}=this.options;l&&l()};const{name:n,motionValue:o,element:r,keyframes:s}=this.options,a=(r==null?void 0:r.KeyframeResolver)||Nu,c=(l,u)=>this.onKeyframesResolved(l,u);this.resolver=new a(s,c,n,o,r),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(t){const{type:n="keyframes",repeat:o=0,repeatDelay:r=0,repeatType:s,velocity:a=0}=this.options,c=fu(n)?n:u5[n]||Mi;let l,u;process.env.NODE_ENV!=="production"&&c!==Mi&&to(t.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${t}`),c!==Mi&&typeof t[0]!="number"&&(l=Pi(d5,vb(t[0],t[1])),t=[0,100]);const d=c({...this.options,keyframes:t});s==="mirror"&&(u=c({...this.options,keyframes:[...t].reverse(),velocity:-a})),d.calculatedDuration===null&&(d.calculatedDuration=Sg(d));const{calculatedDuration:p}=d,f=p+r,g=f*(o+1)-r;return{generator:d,mirroredGenerator:u,mapPercentToKeyframes:l,calculatedDuration:p,resolvedDuration:f,totalDuration:g}}onPostResolved(){const{autoplay:t=!0}=this.options;this.play(),this.pendingPlayState==="paused"||!t?this.pause():this.state=this.pendingPlayState}tick(t,n=!1){const{resolved:o}=this;if(!o){const{keyframes:A}=this.options;return{done:!0,value:A[A.length-1]}}const{finalKeyframe:r,generator:s,mirroredGenerator:a,mapPercentToKeyframes:c,keyframes:l,calculatedDuration:u,totalDuration:d,resolvedDuration:p}=o;if(this.startTime===null)return s.next(0);const{delay:f,repeat:g,repeatType:m,repeatDelay:h,onUpdate:v}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-d/this.speed,this.startTime)),n?this.currentTime=t:this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=Math.round(t-this.startTime)*this.speed;const y=this.currentTime-f*(this.speed>=0?1:-1),T=this.speed>=0?y<0:y>d;this.currentTime=Math.max(y,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=d);let C=this.currentTime,I=s;if(g){const A=Math.min(this.currentTime,d)/p;let M=Math.floor(A),N=A%1;!N&&A>=1&&(N=1),N===1&&M--,M=Math.min(M,g+1),!!(M%2)&&(m==="reverse"?(N=1-N,h&&(N-=h/p)):m==="mirror"&&(I=a)),C=$n(0,1,N)*p}const x=T?{done:!1,value:l[0]}:I.next(C);c&&(x.value=c(x.value));let{done:w}=x;!T&&u!==null&&(w=this.speed>=0?this.currentTime>=d:this.currentTime<=0);const R=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&w);return R&&r!==void 0&&(x.value=xa(l,this.options,r)),v&&v(x.value),R&&this.finish(),x}get duration(){const{resolved:t}=this;return t?_n(t.calculatedDuration):0}get time(){return _n(this.currentTime)}set time(t){t=Mn(t),this.currentTime=t,this.holdTime!==null||this.speed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.speed)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=_n(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=c5,onPlay:n,startTime:o}=this.options;this.driver||(this.driver=t(s=>this.tick(s))),n&&n();const r=this.driver.now();this.holdTime!==null?this.startTime=r-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=r):this.startTime=o??this.calcStartTime(),this.state==="finished"&&this.updateFinishedPromise(),this.cancelTime=this.startTime,this.holdTime=null,this.state="running",this.driver.start()}pause(){var t;if(!this._resolved){this.pendingPlayState="paused";return}this.state="paused",this.holdTime=(t=this.currentTime)!==null&&t!==void 0?t:0}complete(){this.state!=="running"&&this.play(),this.pendingPlayState=this.state="finished",this.holdTime=null}finish(){this.teardown(),this.state="finished";const{onComplete:t}=this.options;t&&t()}cancel(){this.cancelTime!==null&&this.tick(this.cancelTime),this.teardown(),this.updateFinishedPromise()}teardown(){this.state="idle",this.stopDriver(),this.resolveFinishedPromise(),this.updateFinishedPromise(),this.startTime=this.cancelTime=null,this.resolver.cancel()}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}}const p5=new Set(["opacity","clipPath","filter","transform"]);function f5(e,t,n,{delay:o=0,duration:r=300,repeat:s=0,repeatType:a="loop",ease:c="easeInOut",times:l}={}){const u={[t]:n};l&&(u.offset=l);const d=Og(c,r);return Array.isArray(d)&&(u.easing=d),e.animate(u,{delay:o,duration:r,easing:Array.isArray(d)?"linear":d,fill:"both",iterations:s+1,direction:a==="reverse"?"alternate":"normal"})}const h5=Yc(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),Ea=10,m5=2e4;function g5(e){return fu(e.type)||e.type==="spring"||!Ag(e.ease)}function b5(e,t){const n=new Vu({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let o={done:!1,value:e[0]};const r=[];let s=0;for(;!o.done&&s<m5;)o=n.sample(s),r.push(o.value),s+=Ea;return{times:void 0,keyframes:r,duration:s-Ea,ease:"linear"}}const Rb={anticipate:Hg,backInOut:zg,circInOut:Ug};function v5(e){return e in Rb}class Ab extends hb{constructor(t){super(t);const{name:n,motionValue:o,element:r,keyframes:s}=this.options;this.resolver=new pb(s,(a,c)=>this.onKeyframesResolved(a,c),n,o,r),this.resolver.scheduleResolve()}initPlayback(t,n){let{duration:o=300,times:r,ease:s,type:a,motionValue:c,name:l,startTime:u}=this.options;if(!c.owner||!c.owner.current)return!1;if(typeof s=="string"&&va()&&v5(s)&&(s=Rb[s]),g5(this.options)){const{onComplete:p,onUpdate:f,motionValue:g,element:m,...h}=this.options,v=b5(t,h);t=v.keyframes,t.length===1&&(t[1]=t[0]),o=v.duration,r=v.times,s=v.ease,a="keyframes"}const d=f5(c.owner.current,l,t,{...this.options,duration:o,times:r,ease:s});return d.startTime=u??this.calcStartTime(),this.pendingTimeline?(wg(d,this.pendingTimeline),this.pendingTimeline=void 0):d.onfinish=()=>{const{onComplete:p}=this.options;c.set(xa(t,this.options,n)),p&&p(),this.cancel(),this.resolveFinishedPromise()},{animation:d,duration:o,times:r,type:a,ease:s,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:n}=t;return _n(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return _n(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:o}=n;o.currentTime=Mn(t)}get speed(){const{resolved:t}=this;if(!t)return 1;const{animation:n}=t;return n.playbackRate}set speed(t){const{resolved:n}=this;if(!n)return;const{animation:o}=n;o.playbackRate=t}get state(){const{resolved:t}=this;if(!t)return"idle";const{animation:n}=t;return n.playState}get startTime(){const{resolved:t}=this;if(!t)return null;const{animation:n}=t;return n.startTime}attachTimeline(t){if(!this._resolved)this.pendingTimeline=t;else{const{resolved:n}=this;if(!n)return Wt;const{animation:o}=n;wg(o,t)}return Wt}play(){if(this.isStopped)return;const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.playState==="finished"&&this.updateFinishedPromise(),n.play()}pause(){const{resolved:t}=this;if(!t)return;const{animation:n}=t;n.pause()}stop(){if(this.resolver.cancel(),this.isStopped=!0,this.state==="idle")return;this.resolveFinishedPromise(),this.updateFinishedPromise();const{resolved:t}=this;if(!t)return;const{animation:n,keyframes:o,duration:r,type:s,ease:a,times:c}=t;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:u,onUpdate:d,onComplete:p,element:f,...g}=this.options,m=new Vu({...g,keyframes:o,duration:r,type:s,ease:a,times:c,isGenerator:!0}),h=Mn(this.time);u.setWithVelocity(m.sample(h-Ea).value,m.sample(h).value,Ea)}const{onStop:l}=this.options;l&&l(),this.cancel()}complete(){const{resolved:t}=this;t&&t.animation.finish()}cancel(){const{resolved:t}=this;t&&t.animation.cancel()}static supports(t){const{motionValue:n,name:o,repeatDelay:r,repeatType:s,damping:a,type:c}=t;if(!n||!n.owner||!(n.owner.current instanceof HTMLElement))return!1;const{onUpdate:l,transformTemplate:u}=n.owner.getProps();return h5()&&o&&p5.has(o)&&!l&&!u&&!r&&s!=="mirror"&&a!==0&&c!=="inertia"}}const y5={type:"spring",stiffness:500,damping:25,restSpeed:10},x5=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),C5={type:"keyframes",duration:.8},E5={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},I5=(e,{keyframes:t})=>t.length>2?C5:To.has(e)?e.startsWith("scale")?x5(t[1]):y5:E5;function T5({when:e,delay:t,delayChildren:n,staggerChildren:o,staggerDirection:r,repeat:s,repeatType:a,repeatDelay:c,from:l,elapsed:u,...d}){return!!Object.keys(d).length}const Lu=(e,t,n,o={},r,s)=>a=>{const c=du(o,e)||{},l=c.delay||o.delay||0;let{elapsed:u=0}=o;u=u-Mn(l);let d={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...c,delay:-u,onUpdate:f=>{t.set(f),c.onUpdate&&c.onUpdate(f)},onComplete:()=>{a(),c.onComplete&&c.onComplete()},name:e,motionValue:t,element:s?void 0:r};T5(c)||(d={...d,...I5(e,d)}),d.duration&&(d.duration=Mn(d.duration)),d.repeatDelay&&(d.repeatDelay=Mn(d.repeatDelay)),d.from!==void 0&&(d.keyframes[0]=d.from);let p=!1;if((d.type===!1||d.duration===0&&!d.repeatDelay)&&(d.duration=0,d.delay===0&&(p=!0)),p&&!s&&t.get()!==void 0){const f=xa(d.keyframes,c);if(f!==void 0)return Ke.update(()=>{d.onUpdate(f),d.onComplete()}),new WP([])}return!s&&Ab.supports(d)?new Ab(d):new Vu(d)};function S5({protectedKeys:e,needsAnimating:t},n){const o=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,o}function Ob(e,t,{delay:n=0,transitionOverride:o,type:r}={}){var s;let{transition:a=e.getDefaultTransition(),transitionEnd:c,...l}=t;o&&(a=o);const u=[],d=r&&e.animationState&&e.animationState.getState()[r];for(const p in l){const f=e.getValue(p,(s=e.latestValues[p])!==null&&s!==void 0?s:null),g=l[p];if(g===void 0||d&&S5(d,p))continue;const m={delay:n,...du(a||{},p)};let h=!1;if(window.MotionHandoffAnimation){const y=Lg(e);if(y){const T=window.MotionHandoffAnimation(y,p,Ke);T!==null&&(m.startTime=T,h=!0)}}Cu(e,p),f.start(Lu(p,f,g,e.shouldReduceMotion&&jg.has(p)?{type:!1}:m,e,h));const v=f.animation;v&&u.push(v)}return c&&Promise.all(u).then(()=>{Ke.update(()=>{c&&rM(e,c)})}),u}function _u(e,t,n={}){var o;const r=Ei(e,t,n.type==="exit"?(o=e.presenceContext)===null||o===void 0?void 0:o.custom:void 0);let{transition:s=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(s=n.transitionOverride);const a=r?()=>Promise.all(Ob(e,r,n)):()=>Promise.resolve(),c=e.variantChildren&&e.variantChildren.size?(u=0)=>{const{delayChildren:d=0,staggerChildren:p,staggerDirection:f}=s;return w5(e,t,d+u,p,f,n)}:()=>Promise.resolve(),{when:l}=s;if(l){const[u,d]=l==="beforeChildren"?[a,c]:[c,a];return u().then(()=>d())}else return Promise.all([a(),c(n.delay)])}function w5(e,t,n=0,o=0,r=1,s){const a=[],c=(e.variantChildren.size-1)*o,l=r===1?(u=0)=>u*o:(u=0)=>c-u*o;return Array.from(e.variantChildren).sort(R5).forEach((u,d)=>{u.notify("AnimationStart",t),a.push(_u(u,t,{...s,delay:n+l(d)}).then(()=>u.notify("AnimationComplete",t)))}),Promise.all(a)}function R5(e,t){return e.sortNodePosition(t)}function A5(e,t,n={}){e.notify("AnimationStart",t);let o;if(Array.isArray(t)){const r=t.map(s=>_u(e,s,n));o=Promise.all(r)}else if(typeof t=="string")o=_u(e,t,n);else{const r=typeof t=="function"?Ei(e,t,n.custom):t;o=Promise.all(Ob(e,r,n))}return o.then(()=>{e.notify("AnimationComplete",t)})}function Pb(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let o=0;o<n;o++)if(t[o]!==e[o])return!1;return!0}const O5=qc.length;function Mb(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?Mb(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<O5;n++){const o=qc[n],r=e.props[o];(vi(r)||r===!1)&&(t[o]=r)}return t}const P5=[...Jc].reverse(),M5=Jc.length;function N5(e){return t=>Promise.all(t.map(({animation:n,options:o})=>A5(e,n,o)))}function k5(e){let t=N5(e),n=Nb(),o=!0;const r=l=>(u,d)=>{var p;const f=Ei(e,d,l==="exit"?(p=e.presenceContext)===null||p===void 0?void 0:p.custom:void 0);if(f){const{transition:g,transitionEnd:m,...h}=f;u={...u,...h,...m}}return u};function s(l){t=l(e)}function a(l){const{props:u}=e,d=Mb(e.parent)||{},p=[],f=new Set;let g={},m=1/0;for(let v=0;v<M5;v++){const y=P5[v],T=n[y],C=u[y]!==void 0?u[y]:d[y],I=vi(C),x=y===l?T.isActive:null;x===!1&&(m=v);let w=C===d[y]&&C!==u[y]&&I;if(w&&o&&e.manuallyAnimateOnMount&&(w=!1),T.protectedKeys={...g},!T.isActive&&x===null||!C&&!T.prevProp||ha(C)||typeof C=="boolean")continue;const R=D5(T.prevProp,C);let A=R||y===l&&T.isActive&&!w&&I||v>m&&I,M=!1;const N=Array.isArray(C)?C:[C];let B=N.reduce(r(y),{});x===!1&&(B={});const{prevResolvedValues:W={}}=T,D={...W,...B},F=$=>{A=!0,f.has($)&&(M=!0,f.delete($)),T.needsAnimating[$]=!0;const V=e.getValue($);V&&(V.liveStyle=!1)};for(const $ in D){const V=B[$],Y=W[$];if(g.hasOwnProperty($))continue;let k=!1;cu(V)&&cu(Y)?k=!Pb(V,Y):k=V!==Y,k?V!=null?F($):f.add($):V!==void 0&&f.has($)?F($):T.protectedKeys[$]=!0}T.prevProp=C,T.prevResolvedValues=B,T.isActive&&(g={...g,...B}),o&&e.blockInitialAnimation&&(A=!1),A&&(!(w&&R)||M)&&p.push(...N.map($=>({animation:$,options:{type:y}})))}if(f.size){const v={};if(typeof u.initial!="boolean"){const y=Ei(e,Array.isArray(u.initial)?u.initial[0]:u.initial);y&&y.transition&&(v.transition=y.transition)}f.forEach(y=>{const T=e.getBaseTarget(y),C=e.getValue(y);C&&(C.liveStyle=!0),v[y]=T??null}),p.push({animation:v})}let h=!!p.length;return o&&(u.initial===!1||u.initial===u.animate)&&!e.manuallyAnimateOnMount&&(h=!1),o=!1,h?t(p):Promise.resolve()}function c(l,u){var d;if(n[l].isActive===u)return Promise.resolve();(d=e.variantChildren)===null||d===void 0||d.forEach(f=>{var g;return(g=f.animationState)===null||g===void 0?void 0:g.setActive(l,u)}),n[l].isActive=u;const p=a(l);for(const f in n)n[f].protectedKeys={};return p}return{animateChanges:a,setActive:c,setAnimateFunction:s,getState:()=>n,reset:()=>{n=Nb(),o=!0}}}function D5(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!Pb(t,e):!1}function Ro(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function Nb(){return{animate:Ro(!0),whileInView:Ro(),whileHover:Ro(),whileTap:Ro(),whileDrag:Ro(),whileFocus:Ro(),exit:Ro()}}class io{constructor(t){this.isMounted=!1,this.node=t}update(){}}class B5 extends io{constructor(t){super(t),t.animationState||(t.animationState=k5(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();ha(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:t}=this.node.getProps(),{animate:n}=this.node.prevProps||{};t!==n&&this.updateAnimationControlsSubscription()}unmount(){var t;this.node.animationState.reset(),(t=this.unmountControls)===null||t===void 0||t.call(this)}}let j5=0;class F5 extends io{constructor(){super(...arguments),this.id=j5++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:o}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===o)return;const r=this.node.animationState.setActive("exit",!t);n&&!t&&r.then(()=>{n(this.id)})}mount(){const{register:t,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),t&&(this.unmount=t(this.id))}unmount(){}}const V5={animation:{Feature:B5},exit:{Feature:F5}};function Ni(e,t,n,o={passive:!0}){return e.addEventListener(t,n,o),()=>e.removeEventListener(t,n)}function ki(e){return{point:{x:e.pageX,y:e.pageY}}}const L5=e=>t=>gu(t)&&e(t,ki(t));function yr(e,t,n,o){return Ni(e,t,L5(n),o)}function kb({top:e,left:t,right:n,bottom:o}){return{x:{min:t,max:n},y:{min:e,max:o}}}function _5({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function $5(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),o=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:o.y,right:o.x}}const Db=1e-4,G5=1-Db,W5=1+Db,Bb=.01,z5=0-Bb,H5=0+Bb;function Ft(e){return e.max-e.min}function X5(e,t,n){return Math.abs(e-t)<=n}function jb(e,t,n,o=.5){e.origin=o,e.originPoint=lt(t.min,t.max,e.origin),e.scale=Ft(n)/Ft(t),e.translate=lt(n.min,n.max,e.origin)-e.originPoint,(e.scale>=G5&&e.scale<=W5||isNaN(e.scale))&&(e.scale=1),(e.translate>=z5&&e.translate<=H5||isNaN(e.translate))&&(e.translate=0)}function Di(e,t,n,o){jb(e.x,t.x,n.x,o?o.originX:void 0),jb(e.y,t.y,n.y,o?o.originY:void 0)}function Fb(e,t,n){e.min=n.min+t.min,e.max=e.min+Ft(t)}function U5(e,t,n){Fb(e.x,t.x,n.x),Fb(e.y,t.y,n.y)}function Vb(e,t,n){e.min=t.min-n.min,e.max=e.min+Ft(t)}function Bi(e,t,n){Vb(e.x,t.x,n.x),Vb(e.y,t.y,n.y)}const Lb=()=>({translate:0,scale:1,origin:0,originPoint:0}),xr=()=>({x:Lb(),y:Lb()}),_b=()=>({min:0,max:0}),gt=()=>({x:_b(),y:_b()});function dn(e){return[e("x"),e("y")]}function $u(e){return e===void 0||e===1}function Gu({scale:e,scaleX:t,scaleY:n}){return!$u(e)||!$u(t)||!$u(n)}function Ao(e){return Gu(e)||$b(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function $b(e){return Gb(e.x)||Gb(e.y)}function Gb(e){return e&&e!=="0%"}function Ia(e,t,n){const o=e-n,r=t*o;return n+r}function Wb(e,t,n,o,r){return r!==void 0&&(e=Ia(e,r,o)),Ia(e,n,o)+t}function Wu(e,t=0,n=1,o,r){e.min=Wb(e.min,t,n,o,r),e.max=Wb(e.max,t,n,o,r)}function zb(e,{x:t,y:n}){Wu(e.x,t.translate,t.scale,t.originPoint),Wu(e.y,n.translate,n.scale,n.originPoint)}const Hb=.999999999999,Xb=1.0000000000001;function Y5(e,t,n,o=!1){const r=n.length;if(!r)return;t.x=t.y=1;let s,a;for(let c=0;c<r;c++){s=n[c],a=s.projectionDelta;const{visualElement:l}=s.options;l&&l.props.style&&l.props.style.display==="contents"||(o&&s.options.layoutScroll&&s.scroll&&s!==s.root&&Er(e,{x:-s.scroll.offset.x,y:-s.scroll.offset.y}),a&&(t.x*=a.x.scale,t.y*=a.y.scale,zb(e,a)),o&&Ao(s.latestValues)&&Er(e,s.latestValues))}t.x<Xb&&t.x>Hb&&(t.x=1),t.y<Xb&&t.y>Hb&&(t.y=1)}function Cr(e,t){e.min=e.min+t,e.max=e.max+t}function Ub(e,t,n,o,r=.5){const s=lt(e.min,e.max,r);Wu(e,t,n,s,o)}function Er(e,t){Ub(e.x,t.x,t.scaleX,t.scale,t.originX),Ub(e.y,t.y,t.scaleY,t.scale,t.originY)}function Yb(e,t){return kb($5(e.getBoundingClientRect(),t))}function Z5(e,t,n){const o=Yb(e,n),{scroll:r}=t;return r&&(Cr(o.x,r.offset.x),Cr(o.y,r.offset.y)),o}const Zb=(e,t)=>Math.abs(e-t);function J5(e,t){const n=Zb(e.x,t.x),o=Zb(e.y,t.y);return Math.sqrt(n**2+o**2)}class Jb{constructor(t,n,{transformPagePoint:o,dragSnapToOrigin:r=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const d=Hu(this.lastMoveEventInfo,this.history),p=this.startEvent!==null,f=J5(d.offset,{x:0,y:0})>=3;if(!p&&!f)return;const{point:g}=d,{timestamp:m}=Et;this.history.push({...g,timestamp:m});const{onStart:h,onMove:v}=this.handlers;p||(h&&h(this.lastMoveEvent,d),this.startEvent=this.lastMoveEvent),v&&v(this.lastMoveEvent,d)},this.handlePointerMove=(d,p)=>{if(this.index=Qb(d.currentTarget),d.target instanceof Element&&d.target.hasPointerCapture&&d.pointerId!==void 0)try{if(!d.target.hasPointerCapture(d.pointerId))return}catch{}this.lastMoveEvent=d,this.lastMoveEventInfo=zu(p,this.transformPagePoint),Ke.update(this.updatePoint,!0)},this.handlePointerUp=(d,p)=>{Ti(d,"release"),this.end();const{onEnd:f,onSessionEnd:g,resumeAnimation:m}=this.handlers;if(this.dragSnapToOrigin&&m&&m(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const h=Hu(d.type==="pointercancel"||d.type==="lostpointercapture"?this.lastMoveEventInfo:zu(p,this.transformPagePoint),this.history);this.startEvent&&f&&f(d,h),g&&g(d,h)},!gu(t))return;this.dragSnapToOrigin=r,this.handlers=n,this.transformPagePoint=o;const s=ki(t),a=zu(s,this.transformPagePoint),{point:c}=a,{timestamp:l}=Et;this.history=[{...c,timestamp:l}];const{onSessionStart:u}=n;u&&u(t,Hu(a,this.history)),Ti(t,"set"),this.removeListeners=Pi(yr(t.currentTarget,"pointermove",this.handlePointerMove),yr(t.currentTarget,"pointerup",this.handlePointerUp),yr(t.currentTarget,"pointercancel",this.handlePointerUp),yr(t.currentTarget,"lostpointercapture",(d,p)=>{Qb(d.currentTarget)!==this.index?Ti(d,"set"):this.handlePointerUp(d,p)}))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),no(this.updatePoint)}}function zu(e,t){return t?{point:t(e.point)}:e}function qb(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Hu({point:e},t){return{point:e,delta:qb(e,Kb(t)),offset:qb(e,q5(t)),velocity:K5(t,.1)}}function q5(e){return e[0]}function Kb(e){return e[e.length-1]}function K5(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,o=null;const r=Kb(e);for(;n>=0&&(o=e[n],!(r.timestamp-o.timestamp>Mn(t)));)n--;if(!o)return{x:0,y:0};const s=_n(r.timestamp-o.timestamp);if(s===0)return{x:0,y:0};const a={x:(r.x-o.x)/s,y:(r.y-o.y)/s};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function Qb(e){return e.parentNode?Array.from(e.parentNode.children).indexOf(e):-1}function Q5(e,{min:t,max:n},o){return t!==void 0&&e<t?e=o?lt(t,e,o.min):Math.max(e,t):n!==void 0&&e>n&&(e=o?lt(n,e,o.max):Math.min(e,n)),e}function e0(e,t,n){return{min:t!==void 0?e.min+t:void 0,max:n!==void 0?e.max+n-(e.max-e.min):void 0}}function eN(e,{top:t,left:n,bottom:o,right:r}){return{x:e0(e.x,n,r),y:e0(e.y,t,o)}}function t0(e,t){let n=t.min-e.min,o=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,o]=[o,n]),{min:n,max:o}}function tN(e,t){return{x:t0(e.x,t.x),y:t0(e.y,t.y)}}function nN(e,t){let n=.5;const o=Ft(e),r=Ft(t);return r>o?n=pr(t.min,t.max-o,e.min):o>r&&(n=pr(e.min,e.max-r,t.min)),$n(0,1,n)}function oN(e,t){const n={};return t.min!==void 0&&(n.min=t.min-e.min),t.max!==void 0&&(n.max=t.max-e.min),n}const Xu=.35;function rN(e=Xu){return e===!1?e=0:e===!0&&(e=Xu),{x:n0(e,"left","right"),y:n0(e,"top","bottom")}}function n0(e,t,n){return{min:o0(e,t),max:o0(e,n)}}function o0(e,t){return typeof e=="number"?e:e[t]||0}const iN=new WeakMap;class sN{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=gt(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:o}=this.visualElement;if(o&&o.isPresent===!1)return;const r=d=>{const{dragSnapToOrigin:p}=this.getProps();p?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(ki(d).point)},s=(d,p)=>{const{drag:f,dragPropagation:g,onDragStart:m}=this.getProps();if(f&&!g&&(this.openDragLock&&this.openDragLock(),this.openDragLock=QP(f),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),dn(v=>{let y=this.getAxisMotionValue(v).get()||0;if(Nn.test(y)){const{projection:T}=this.visualElement;if(T&&T.layout){const C=T.layout.layoutBox[v];C&&(y=Ft(C)*(parseFloat(y)/100))}}this.originPoint[v]=y}),m&&Ke.postRender(()=>m(d,p)),Cu(this.visualElement,"transform");const{animationState:h}=this.visualElement;h&&h.setActive("whileDrag",!0)},a=(d,p)=>{const{dragPropagation:f,dragDirectionLock:g,onDirectionLock:m,onDrag:h}=this.getProps();if(!f&&!this.openDragLock)return;const{offset:v}=p;if(g&&this.currentDirection===null){this.currentDirection=aN(v),this.currentDirection!==null&&m&&m(this.currentDirection);return}this.updateAxis("x",p.point,v),this.updateAxis("y",p.point,v),this.visualElement.render(),h&&h(d,p)},c=(d,p)=>this.stop(d,p),l=()=>dn(d=>{var p;return this.getAnimationState(d)==="paused"&&((p=this.getAxisMotionValue(d).animation)===null||p===void 0?void 0:p.play())}),{dragSnapToOrigin:u}=this.getProps();this.panSession=new Jb(t,{onSessionStart:r,onStart:s,onMove:a,onSessionEnd:c,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:u})}stop(t,n){const o=this.isDragging;if(this.cancel(),!o)return;const{velocity:r}=n;this.startAnimation(r);const{onDragEnd:s}=this.getProps();s&&Ke.postRender(()=>s(t,n))}cancel(){this.isDragging=!1;const{projection:t,animationState:n}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:o}=this.getProps();!o&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,o){const{drag:r}=this.getProps();if(!o||!Ta(t,r,this.currentDirection))return;const s=this.getAxisMotionValue(t);let a=this.originPoint[t]+o[t];this.constraints&&this.constraints[t]&&(a=Q5(a,this.constraints[t],this.elastic[t])),s.set(a)}resolveConstraints(){var t;const{dragConstraints:n,dragElastic:o}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(t=this.visualElement.projection)===null||t===void 0?void 0:t.layout,s=this.constraints;n&&hr(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&r?this.constraints=eN(r.layoutBox,n):this.constraints=!1,this.elastic=rN(o),s!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&dn(a=>{this.constraints!==!1&&this.getAxisMotionValue(a)&&(this.constraints[a]=oN(r.layoutBox[a],this.constraints[a]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!hr(t))return!1;const o=t.current;to(o!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");const{projection:r}=this.visualElement;if(!r||!r.layout)return!1;const s=Z5(o,r.root,this.visualElement.getTransformPagePoint());let a=tN(r.layout.layoutBox,s);if(n){const c=n(_5(a));this.hasMutatedConstraints=!!c,c&&(a=kb(c))}return a}startAnimation(t){const{drag:n,dragMomentum:o,dragElastic:r,dragTransition:s,dragSnapToOrigin:a,onDragTransitionEnd:c}=this.getProps(),l=this.constraints||{},u=dn(d=>{if(!Ta(d,n,this.currentDirection))return;let p=l&&l[d]||{};a&&(p={min:0,max:0});const f=r?200:1e6,g=r?40:1e7,m={type:"inertia",velocity:o?t[d]:0,bounceStiffness:f,bounceDamping:g,timeConstant:750,restDelta:1,restSpeed:10,...s,...p};return this.startAxisValueAnimation(d,m)});return Promise.all(u).then(c)}startAxisValueAnimation(t,n){const o=this.getAxisMotionValue(t);return Cu(this.visualElement,t),o.start(Lu(t,o,0,n,this.visualElement,!1))}stopAnimation(){dn(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){dn(t=>{var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.pause()})}getAnimationState(t){var n;return(n=this.getAxisMotionValue(t).animation)===null||n===void 0?void 0:n.state}getAxisMotionValue(t){const n=`_drag${t.toUpperCase()}`,o=this.visualElement.getProps(),r=o[n];return r||this.visualElement.getValue(t,(o.initial?o.initial[t]:void 0)||0)}snapToCursor(t){dn(n=>{const{drag:o}=this.getProps();if(!Ta(n,o,this.currentDirection))return;const{projection:r}=this.visualElement,s=this.getAxisMotionValue(n);if(r&&r.layout){const{min:a,max:c}=r.layout.layoutBox[n];s.set(t[n]-lt(a,c,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:o}=this.visualElement;if(!hr(n)||!o||!this.constraints)return;this.stopAnimation();const r={x:0,y:0};dn(a=>{const c=this.getAxisMotionValue(a);if(c&&this.constraints!==!1){const l=c.get();r[a]=nN({min:l,max:l},this.constraints[a])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",o.root&&o.root.updateScroll(),o.updateLayout(),this.resolveConstraints(),dn(a=>{if(!Ta(a,t,null))return;const c=this.getAxisMotionValue(a),{min:l,max:u}=this.constraints[a];c.set(lt(l,u,r[a]))})}addListeners(){if(!this.visualElement.current)return;iN.set(this.visualElement,this);const t=this.visualElement.current,n=yr(t,"pointerdown",l=>{const{drag:u,dragListener:d=!0}=this.getProps();u&&d&&this.start(l)}),o=()=>{const{dragConstraints:l}=this.getProps();hr(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:r}=this.visualElement,s=r.addEventListener("measure",o);r&&!r.layout&&(r.root&&r.root.updateScroll(),r.updateLayout()),Ke.read(o);const a=Ni(window,"resize",()=>this.scalePositionWithinConstraints()),c=r.addEventListener("didUpdate",({delta:l,hasLayoutChanged:u})=>{this.isDragging&&u&&(dn(d=>{const p=this.getAxisMotionValue(d);p&&(this.originPoint[d]+=l[d].translate,p.set(p.get()+l[d].translate))}),this.visualElement.render())});return()=>{a(),n(),s(),c&&c()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:o=!1,dragPropagation:r=!1,dragConstraints:s=!1,dragElastic:a=Xu,dragMomentum:c=!0}=t;return{...t,drag:n,dragDirectionLock:o,dragPropagation:r,dragConstraints:s,dragElastic:a,dragMomentum:c}}}function Ta(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function aN(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class lN extends io{constructor(t){super(t),this.removeGroupControls=Wt,this.removeListeners=Wt,this.controls=new sN(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Wt}unmount(){this.removeGroupControls(),this.removeListeners()}}const r0=e=>(t,n)=>{e&&Ke.postRender(()=>e(t,n))};class cN extends io{constructor(){super(...arguments),this.removePointerDownListener=Wt}onPointerDown(t){this.session=new Jb(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint()})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:o,onPanEnd:r}=this.node.getProps();return{onSessionStart:r0(t),onStart:r0(n),onMove:o,onEnd:(s,a)=>{delete this.session,r&&Ke.postRender(()=>r(s,a))}}}mount(){this.removePointerDownListener=yr(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const Sa={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function i0(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const ji={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(Ce.test(e))e=parseFloat(e);else return e;const n=i0(e,t.target.x),o=i0(e,t.target.y);return`${n}% ${o}%`}},uN={correct:(e,{treeScale:t,projectionDelta:n})=>{const o=e,r=ro.parse(e);if(r.length>5)return o;const s=ro.createTransformer(e),a=typeof r[0]!="number"?1:0,c=n.x.scale*t.x,l=n.y.scale*t.y;r[0+a]/=c,r[1+a]/=l;const u=lt(c,l,.5);return typeof r[2+a]=="number"&&(r[2+a]/=u),typeof r[3+a]=="number"&&(r[3+a]/=u),s(r)}};class dN extends P.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:o,layoutId:r}=this.props,{projection:s}=t;gP(pN),s&&(n.group&&n.group.add(s),o&&o.register&&r&&o.register(s),s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,onExitComplete:()=>this.safeToRemove()})),Sa.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:o,drag:r,isPresent:s}=this.props,a=o.projection;return a&&(a.isPresent=s,r||t.layoutDependency!==n||n===void 0||t.isPresent!==s?a.willUpdate():this.safeToRemove(),t.isPresent!==s&&(s?a.promote():a.relegate()||Ke.postRender(()=>{const c=a.getStack();(!c||!c.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Qc.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:o}=this.props,{projection:r}=t;r&&(r.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(r),o&&o.deregister&&o.deregister(r))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function s0(e){const[t,n]=Zm(),o=P.useContext(zc);return b.jsx(dN,{...e,layoutGroup:o,switchLayoutGroup:P.useContext(ag),isPresent:t,safeToRemove:n})}const pN={borderRadius:{...ji,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:ji,borderTopRightRadius:ji,borderBottomLeftRadius:ji,borderBottomRightRadius:ji,boxShadow:uN};function fN(e,t,n){const o=Rt(e)?e:wi(e);return o.start(Lu("",o,t,n)),o.animation}function hN(e){return e instanceof SVGElement&&e.tagName!=="svg"}const mN=(e,t)=>e.depth-t.depth;class gN{constructor(){this.children=[],this.isDirty=!1}add(t){vu(this.children,t),this.isDirty=!0}remove(t){yu(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(mN),this.isDirty=!1,this.children.forEach(t)}}function bN(e,t){const n=kn.now(),o=({timestamp:r})=>{const s=r-n;s>=t&&(no(o),e(s-t))};return Ke.read(o,!0),()=>no(o)}const a0=["TopLeft","TopRight","BottomLeft","BottomRight"],vN=a0.length,l0=e=>typeof e=="string"?parseFloat(e):e,c0=e=>typeof e=="number"||Ce.test(e);function yN(e,t,n,o,r,s){r?(e.opacity=lt(0,n.opacity!==void 0?n.opacity:1,xN(o)),e.opacityExit=lt(t.opacity!==void 0?t.opacity:1,0,CN(o))):s&&(e.opacity=lt(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,o));for(let a=0;a<vN;a++){const c=`border${a0[a]}Radius`;let l=u0(t,c),u=u0(n,c);if(l===void 0&&u===void 0)continue;l||(l=0),u||(u=0),l===0||u===0||c0(l)===c0(u)?(e[c]=Math.max(lt(l0(l),l0(u),o),0),(Nn.test(u)||Nn.test(l))&&(e[c]+="%")):e[c]=u}(t.rotate||n.rotate)&&(e.rotate=lt(t.rotate||0,n.rotate||0,o))}function u0(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const xN=d0(0,.5,Xg),CN=d0(.5,.95,Wt);function d0(e,t,n){return o=>o<e?0:o>t?1:n(pr(e,t,o))}function p0(e,t){e.min=t.min,e.max=t.max}function pn(e,t){p0(e.x,t.x),p0(e.y,t.y)}function f0(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function h0(e,t,n,o,r){return e-=t,e=Ia(e,1/n,o),r!==void 0&&(e=Ia(e,1/r,o)),e}function EN(e,t=0,n=1,o=.5,r,s=e,a=e){if(Nn.test(t)&&(t=parseFloat(t),t=lt(a.min,a.max,t/100)-a.min),typeof t!="number")return;let c=lt(s.min,s.max,o);e===s&&(c-=t),e.min=h0(e.min,t,n,c,r),e.max=h0(e.max,t,n,c,r)}function m0(e,t,[n,o,r],s,a){EN(e,t[n],t[o],t[r],t.scale,s,a)}const IN=["x","scaleX","originX"],TN=["y","scaleY","originY"];function g0(e,t,n,o){m0(e.x,t,IN,n?n.x:void 0,o?o.x:void 0),m0(e.y,t,TN,n?n.y:void 0,o?o.y:void 0)}function b0(e){return e.translate===0&&e.scale===1}function v0(e){return b0(e.x)&&b0(e.y)}function y0(e,t){return e.min===t.min&&e.max===t.max}function SN(e,t){return y0(e.x,t.x)&&y0(e.y,t.y)}function x0(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function C0(e,t){return x0(e.x,t.x)&&x0(e.y,t.y)}function E0(e){return Ft(e.x)/Ft(e.y)}function I0(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class wN{constructor(){this.members=[]}add(t){vu(this.members,t),t.scheduleRender()}remove(t){if(yu(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(t){const n=this.members.findIndex(r=>t===r);if(n===0)return!1;let o;for(let r=n;r>=0;r--){const s=this.members[r];if(s.isPresent!==!1){o=s;break}}return o?(this.promote(o),!0):!1}promote(t,n){const o=this.lead;if(t!==o&&(this.prevLead=o,this.lead=t,t.show(),o)){o.instance&&o.scheduleRender(),t.scheduleRender(),t.resumeFrom=o,n&&(t.resumeFrom.preserveOpacity=!0),o.snapshot&&(t.snapshot=o.snapshot,t.snapshot.latestValues=o.animationValues||o.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:r}=t.options;r===!1&&o.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:o}=t;n.onExitComplete&&n.onExitComplete(),o&&o.options.onExitComplete&&o.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function RN(e,t,n){let o="";const r=e.x.translate/t.x,s=e.y.translate/t.y,a=(n==null?void 0:n.z)||0;if((r||s||a)&&(o=`translate3d(${r}px, ${s}px, ${a}px) `),(t.x!==1||t.y!==1)&&(o+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:u,rotate:d,rotateX:p,rotateY:f,skewX:g,skewY:m}=n;u&&(o=`perspective(${u}px) ${o}`),d&&(o+=`rotate(${d}deg) `),p&&(o+=`rotateX(${p}deg) `),f&&(o+=`rotateY(${f}deg) `),g&&(o+=`skewX(${g}deg) `),m&&(o+=`skewY(${m}deg) `)}const c=e.x.scale*t.x,l=e.y.scale*t.y;return(c!==1||l!==1)&&(o+=`scale(${c}, ${l})`),o||"none"}const Uu=["","X","Y","Z"],AN={visibility:"hidden"},T0=1e3;let ON=0;function Yu(e,t,n,o){const{latestValues:r}=t;r[e]&&(n[e]=r[e],t.setStaticValue(e,0),o&&(o[e]=0))}function S0(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=Lg(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:r,layoutId:s}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",Ke,!(r||s))}const{parent:o}=e;o&&!o.hasCheckedOptimisedAppear&&S0(o)}function w0({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:o,resetTransform:r}){return class{constructor(a={},c=t==null?void 0:t()){this.id=ON++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,this.nodes.forEach(NN),this.nodes.forEach(FN),this.nodes.forEach(VN),this.nodes.forEach(kN)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=a,this.root=c?c.root||c:this,this.path=c?[...c.path,c]:[],this.parent=c,this.depth=c?c.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new gN)}addEventListener(a,c){return this.eventHandlers.has(a)||this.eventHandlers.set(a,new xu),this.eventHandlers.get(a).add(c)}notifyListeners(a,...c){const l=this.eventHandlers.get(a);l&&l.notify(...c)}hasListeners(a){return this.eventHandlers.has(a)}mount(a,c=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=hN(a),this.instance=a;const{layoutId:l,layout:u,visualElement:d}=this.options;if(d&&!d.current&&d.mount(a),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),c&&(u||l)&&(this.isLayoutDirty=!0),e){let p;const f=()=>this.root.updateBlockedByResize=!1;e(a,()=>{this.root.updateBlockedByResize=!0,p&&p(),p=bN(f,250),Sa.hasAnimatedSinceResize&&(Sa.hasAnimatedSinceResize=!1,this.nodes.forEach(A0))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&d&&(l||u)&&this.addEventListener("didUpdate",({delta:p,hasLayoutChanged:f,hasRelativeLayoutChanged:g,layout:m})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const h=this.options.transition||d.getDefaultTransition()||WN,{onLayoutAnimationStart:v,onLayoutAnimationComplete:y}=d.getProps(),T=!this.targetLayout||!C0(this.targetLayout,m),C=!f&&g;if(this.options.layoutRoot||this.resumeFrom||C||f&&(T||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(p,C);const I={...du(h,"layout"),onPlay:v,onComplete:y};(d.shouldReduceMotion||this.options.layoutRoot)&&(I.delay=0,I.type=!1),this.startAnimation(I)}else f||A0(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=m})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const a=this.getStack();a&&a.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,no(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(LN),this.animationId++)}getTransformTemplate(){const{visualElement:a}=this.options;return a&&a.getProps().transformTemplate}willUpdate(a=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&S0(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let d=0;d<this.path.length;d++){const p=this.path[d];p.shouldResetTransform=!0,p.updateScroll("snapshot"),p.options.layoutRoot&&p.willUpdate(!1)}const{layoutId:c,layout:l}=this.options;if(c===void 0&&!l)return;const u=this.getTransformTemplate();this.prevTransformTemplateValue=u?u(this.latestValues,""):void 0,this.updateSnapshot(),a&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(R0);return}this.isUpdating||this.nodes.forEach(BN),this.isUpdating=!1,this.nodes.forEach(jN),this.nodes.forEach(PN),this.nodes.forEach(MN),this.clearAllSnapshots();const c=kn.now();Et.delta=$n(0,1e3/60,c-Et.timestamp),Et.timestamp=c,Et.isProcessing=!0,Zc.update.process(Et),Zc.preRender.process(Et),Zc.render.process(Et),Et.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Qc.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(DN),this.sharedNodes.forEach(_N)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Ke.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Ke.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!Ft(this.snapshot.measuredBox.x)&&!Ft(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const a=this.layout;this.layout=this.measure(!1),this.layoutCorrected=gt(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:c}=this.options;c&&c.notify("LayoutMeasure",this.layout.layoutBox,a?a.layoutBox:void 0)}updateScroll(a="measure"){let c=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===a&&(c=!1),c){const l=o(this.instance);this.scroll={animationId:this.root.animationId,phase:a,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!r)return;const a=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,c=this.projectionDelta&&!v0(this.projectionDelta),l=this.getTransformTemplate(),u=l?l(this.latestValues,""):void 0,d=u!==this.prevTransformTemplateValue;a&&(c||Ao(this.latestValues)||d)&&(r(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(a=!0){const c=this.measurePageBox();let l=this.removeElementScroll(c);return a&&(l=this.removeTransform(l)),zN(l),{animationId:this.root.animationId,measuredBox:c,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){var a;const{visualElement:c}=this.options;if(!c)return gt();const l=c.measureViewportBox();if(!(((a=this.scroll)===null||a===void 0?void 0:a.wasRoot)||this.path.some(HN))){const{scroll:d}=this.root;d&&(Cr(l.x,d.offset.x),Cr(l.y,d.offset.y))}return l}removeElementScroll(a){var c;const l=gt();if(pn(l,a),!((c=this.scroll)===null||c===void 0)&&c.wasRoot)return l;for(let u=0;u<this.path.length;u++){const d=this.path[u],{scroll:p,options:f}=d;d!==this.root&&p&&f.layoutScroll&&(p.wasRoot&&pn(l,a),Cr(l.x,p.offset.x),Cr(l.y,p.offset.y))}return l}applyTransform(a,c=!1){const l=gt();pn(l,a);for(let u=0;u<this.path.length;u++){const d=this.path[u];!c&&d.options.layoutScroll&&d.scroll&&d!==d.root&&Er(l,{x:-d.scroll.offset.x,y:-d.scroll.offset.y}),Ao(d.latestValues)&&Er(l,d.latestValues)}return Ao(this.latestValues)&&Er(l,this.latestValues),l}removeTransform(a){const c=gt();pn(c,a);for(let l=0;l<this.path.length;l++){const u=this.path[l];if(!u.instance||!Ao(u.latestValues))continue;Gu(u.latestValues)&&u.updateSnapshot();const d=gt(),p=u.measurePageBox();pn(d,p),g0(c,u.latestValues,u.snapshot?u.snapshot.layoutBox:void 0,d)}return Ao(this.latestValues)&&g0(c,this.latestValues),c}setTargetDelta(a){this.targetDelta=a,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(a){this.options={...this.options,...a,crossfade:a.crossfade!==void 0?a.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==Et.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(a=!1){var c;const l=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=l.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=l.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=l.isSharedProjectionDirty);const u=!!this.resumingFrom||this!==l;if(!(a||u&&this.isSharedProjectionDirty||this.isProjectionDirty||!((c=this.parent)===null||c===void 0)&&c.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:p,layoutId:f}=this.options;if(!(!this.layout||!(p||f))){if(this.resolvedRelativeTargetAt=Et.timestamp,!this.targetDelta&&!this.relativeTarget){const g=this.getClosestProjectingParent();g&&g.layout&&this.animationProgress!==1?(this.relativeParent=g,this.forceRelativeParentToResolveTarget(),this.relativeTarget=gt(),this.relativeTargetOrigin=gt(),Bi(this.relativeTargetOrigin,this.layout.layoutBox,g.layout.layoutBox),pn(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=gt(),this.targetWithTransforms=gt()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),U5(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):pn(this.target,this.layout.layoutBox),zb(this.target,this.targetDelta)):pn(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const g=this.getClosestProjectingParent();g&&!!g.resumingFrom==!!this.resumingFrom&&!g.options.layoutScroll&&g.target&&this.animationProgress!==1?(this.relativeParent=g,this.forceRelativeParentToResolveTarget(),this.relativeTarget=gt(),this.relativeTargetOrigin=gt(),Bi(this.relativeTargetOrigin,this.target,g.target),pn(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||Gu(this.parent.latestValues)||$b(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var a;const c=this.getLead(),l=!!this.resumingFrom||this!==c;let u=!0;if((this.isProjectionDirty||!((a=this.parent)===null||a===void 0)&&a.isProjectionDirty)&&(u=!1),l&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(u=!1),this.resolvedRelativeTargetAt===Et.timestamp&&(u=!1),u)return;const{layout:d,layoutId:p}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(d||p))return;pn(this.layoutCorrected,this.layout.layoutBox);const f=this.treeScale.x,g=this.treeScale.y;Y5(this.layoutCorrected,this.treeScale,this.path,l),c.layout&&!c.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(c.target=c.layout.layoutBox,c.targetWithTransforms=gt());const{target:m}=c;if(!m){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(f0(this.prevProjectionDelta.x,this.projectionDelta.x),f0(this.prevProjectionDelta.y,this.projectionDelta.y)),Di(this.projectionDelta,this.layoutCorrected,m,this.latestValues),(this.treeScale.x!==f||this.treeScale.y!==g||!I0(this.projectionDelta.x,this.prevProjectionDelta.x)||!I0(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",m))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(a=!0){var c;if((c=this.options.visualElement)===null||c===void 0||c.scheduleRender(),a){const l=this.getStack();l&&l.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=xr(),this.projectionDelta=xr(),this.projectionDeltaWithTransform=xr()}setAnimationOrigin(a,c=!1){const l=this.snapshot,u=l?l.latestValues:{},d={...this.latestValues},p=xr();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!c;const f=gt(),g=l?l.source:void 0,m=this.layout?this.layout.source:void 0,h=g!==m,v=this.getStack(),y=!v||v.members.length<=1,T=!!(h&&!y&&this.options.crossfade===!0&&!this.path.some(GN));this.animationProgress=0;let C;this.mixTargetDelta=I=>{const x=I/1e3;O0(p.x,a.x,x),O0(p.y,a.y,x),this.setTargetDelta(p),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Bi(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),$N(this.relativeTarget,this.relativeTargetOrigin,f,x),C&&SN(this.relativeTarget,C)&&(this.isProjectionDirty=!1),C||(C=gt()),pn(C,this.relativeTarget)),h&&(this.animationValues=d,yN(d,u,this.latestValues,x,T,y)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=x},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(a){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(no(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Ke.update(()=>{Sa.hasAnimatedSinceResize=!0,this.currentAnimation=fN(0,T0,{...a,onUpdate:c=>{this.mixTargetDelta(c),a.onUpdate&&a.onUpdate(c)},onStop:()=>{},onComplete:()=>{a.onComplete&&a.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const a=this.getStack();a&&a.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(T0),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const a=this.getLead();let{targetWithTransforms:c,target:l,layout:u,latestValues:d}=a;if(!(!c||!l||!u)){if(this!==a&&this.layout&&u&&D0(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||gt();const p=Ft(this.layout.layoutBox.x);l.x.min=a.target.x.min,l.x.max=l.x.min+p;const f=Ft(this.layout.layoutBox.y);l.y.min=a.target.y.min,l.y.max=l.y.min+f}pn(c,l),Er(c,d),Di(this.projectionDeltaWithTransform,this.layoutCorrected,c,d)}}registerSharedNode(a,c){this.sharedNodes.has(a)||this.sharedNodes.set(a,new wN),this.sharedNodes.get(a).add(c);const u=c.options.initialPromotionConfig;c.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(c):void 0})}isLead(){const a=this.getStack();return a?a.lead===this:!0}getLead(){var a;const{layoutId:c}=this.options;return c?((a=this.getStack())===null||a===void 0?void 0:a.lead)||this:this}getPrevLead(){var a;const{layoutId:c}=this.options;return c?(a=this.getStack())===null||a===void 0?void 0:a.prevLead:void 0}getStack(){const{layoutId:a}=this.options;if(a)return this.root.sharedNodes.get(a)}promote({needsReset:a,transition:c,preserveFollowOpacity:l}={}){const u=this.getStack();u&&u.promote(this,l),a&&(this.projectionDelta=void 0,this.needsReset=!0),c&&this.setOptions({transition:c})}relegate(){const a=this.getStack();return a?a.relegate(this):!1}resetSkewAndRotation(){const{visualElement:a}=this.options;if(!a)return;let c=!1;const{latestValues:l}=a;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(c=!0),!c)return;const u={};l.z&&Yu("z",a,u,this.animationValues);for(let d=0;d<Uu.length;d++)Yu(`rotate${Uu[d]}`,a,u,this.animationValues),Yu(`skew${Uu[d]}`,a,u,this.animationValues);a.render();for(const d in u)a.setStaticValue(d,u[d]),this.animationValues&&(this.animationValues[d]=u[d]);a.scheduleRender()}getProjectionStyles(a){var c,l;if(!this.instance||this.isSVG)return;if(!this.isVisible)return AN;const u={visibility:""},d=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,u.opacity="",u.pointerEvents=ba(a==null?void 0:a.pointerEvents)||"",u.transform=d?d(this.latestValues,""):"none",u;const p=this.getLead();if(!this.projectionDelta||!this.layout||!p.target){const h={};return this.options.layoutId&&(h.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,h.pointerEvents=ba(a==null?void 0:a.pointerEvents)||""),this.hasProjected&&!Ao(this.latestValues)&&(h.transform=d?d({},""):"none",this.hasProjected=!1),h}const f=p.animationValues||p.latestValues;this.applyTransformsToTarget(),u.transform=RN(this.projectionDeltaWithTransform,this.treeScale,f),d&&(u.transform=d(f,u.transform));const{x:g,y:m}=this.projectionDelta;u.transformOrigin=`${g.origin*100}% ${m.origin*100}% 0`,p.animationValues?u.opacity=p===this?(l=(c=f.opacity)!==null&&c!==void 0?c:this.latestValues.opacity)!==null&&l!==void 0?l:1:this.preserveOpacity?this.latestValues.opacity:f.opacityExit:u.opacity=p===this?f.opacity!==void 0?f.opacity:"":f.opacityExit!==void 0?f.opacityExit:0;for(const h in yi){if(f[h]===void 0)continue;const{correct:v,applyTo:y,isCSSVariable:T}=yi[h],C=u.transform==="none"?f[h]:v(f[h],p);if(y){const I=y.length;for(let x=0;x<I;x++)u[y[x]]=C}else T?this.options.visualElement.renderState.vars[h]=C:u[h]=C}return this.options.layoutId&&(u.pointerEvents=p===this?ba(a==null?void 0:a.pointerEvents)||"":"none"),u}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(a=>{var c;return(c=a.currentAnimation)===null||c===void 0?void 0:c.stop()}),this.root.nodes.forEach(R0),this.root.sharedNodes.clear()}}}function PN(e){e.updateLayout()}function MN(e){var t;const n=((t=e.resumeFrom)===null||t===void 0?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:o,measuredBox:r}=e.layout,{animationType:s}=e.options,a=n.source!==e.layout.source;s==="size"?dn(p=>{const f=a?n.measuredBox[p]:n.layoutBox[p],g=Ft(f);f.min=o[p].min,f.max=f.min+g}):D0(s,n.layoutBox,o)&&dn(p=>{const f=a?n.measuredBox[p]:n.layoutBox[p],g=Ft(o[p]);f.max=f.min+g,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[p].max=e.relativeTarget[p].min+g)});const c=xr();Di(c,o,n.layoutBox);const l=xr();a?Di(l,e.applyTransform(r,!0),n.measuredBox):Di(l,o,n.layoutBox);const u=!v0(c);let d=!1;if(!e.resumeFrom){const p=e.getClosestProjectingParent();if(p&&!p.resumeFrom){const{snapshot:f,layout:g}=p;if(f&&g){const m=gt();Bi(m,n.layoutBox,f.layoutBox);const h=gt();Bi(h,o,g.layoutBox),C0(m,h)||(d=!0),p.options.layoutRoot&&(e.relativeTarget=h,e.relativeTargetOrigin=m,e.relativeParent=p)}}}e.notifyListeners("didUpdate",{layout:o,snapshot:n,delta:l,layoutDelta:c,hasLayoutChanged:u,hasRelativeLayoutChanged:d})}else if(e.isLead()){const{onExitComplete:o}=e.options;o&&o()}e.options.transition=void 0}function NN(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function kN(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function DN(e){e.clearSnapshot()}function R0(e){e.clearMeasurements()}function BN(e){e.isLayoutDirty=!1}function jN(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function A0(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function FN(e){e.resolveTargetDelta()}function VN(e){e.calcProjection()}function LN(e){e.resetSkewAndRotation()}function _N(e){e.removeLeadSnapshot()}function O0(e,t,n){e.translate=lt(t.translate,0,n),e.scale=lt(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function P0(e,t,n,o){e.min=lt(t.min,n.min,o),e.max=lt(t.max,n.max,o)}function $N(e,t,n,o){P0(e.x,t.x,n.x,o),P0(e.y,t.y,n.y,o)}function GN(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const WN={duration:.45,ease:[.4,0,.1,1]},M0=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),N0=M0("applewebkit/")&&!M0("chrome/")?Math.round:Wt;function k0(e){e.min=N0(e.min),e.max=N0(e.max)}function zN(e){k0(e.x),k0(e.y)}function D0(e,t,n){return e==="position"||e==="preserve-aspect"&&!X5(E0(t),E0(n),.2)}function HN(e){var t;return e!==e.root&&((t=e.scroll)===null||t===void 0?void 0:t.wasRoot)}const XN=w0({attachResizeListener:(e,t)=>Ni(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Zu={current:void 0},B0=w0({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Zu.current){const e=new XN({});e.mount(window),e.setOptions({layoutScroll:!0}),Zu.current=e}return Zu.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),UN={pan:{Feature:cN},drag:{Feature:lN,ProjectionNode:B0,MeasureLayout:s0}};function j0(e,t,n){const{props:o}=e;e.animationState&&o.whileHover&&e.animationState.setActive("whileHover",n==="Start");const r="onHover"+n,s=o[r];s&&Ke.postRender(()=>s(t,ki(t)))}class YN extends io{mount(){const{current:t}=this.node;t&&(this.unmount=UP(t,(n,o)=>(j0(this.node,o,"Start"),r=>j0(this.node,r,"End"))))}unmount(){}}class ZN extends io{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Pi(Ni(this.node.current,"focus",()=>this.onFocus()),Ni(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function F0(e,t,n){const{props:o}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&o.whileTap&&e.animationState.setActive("whileTap",n==="Start");const r="onTap"+(n==="End"?"":n),s=o[r];s&&Ke.postRender(()=>s(t,ki(t)))}class JN extends io{mount(){const{current:t}=this.node;t&&(this.unmount=qP(t,(n,o)=>(F0(this.node,o,"Start"),(r,{success:s})=>F0(this.node,r,s?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Ju=new WeakMap,qu=new WeakMap,qN=e=>{const t=Ju.get(e.target);t&&t(e)},KN=e=>{e.forEach(qN)};function QN({root:e,...t}){const n=e||document;qu.has(n)||qu.set(n,{});const o=qu.get(n),r=JSON.stringify(t);return o[r]||(o[r]=new IntersectionObserver(KN,{root:e,...t})),o[r]}function ek(e,t,n){const o=QN(t);return Ju.set(e,n),o.observe(e),()=>{Ju.delete(e),o.unobserve(e)}}const tk={some:0,all:1};class nk extends io{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:o,amount:r="some",once:s}=t,a={root:n?n.current:void 0,rootMargin:o,threshold:typeof r=="number"?r:tk[r]},c=l=>{const{isIntersecting:u}=l;if(this.isInView===u||(this.isInView=u,s&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);const{onViewportEnter:d,onViewportLeave:p}=this.node.getProps(),f=u?d:p;f&&f(l)};return ek(this.node.current,a,c)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:n}=this.node;["amount","margin","root"].some(ok(t,n))&&this.startObserver()}unmount(){}}function ok({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const rk={inView:{Feature:nk},tap:{Feature:JN},focus:{Feature:ZN},hover:{Feature:YN}},ik={layout:{ProjectionNode:B0,MeasureLayout:s0}},Ku={current:null},V0={current:!1};function sk(){if(V0.current=!0,!!Uc)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Ku.current=e.matches;e.addListener(t),t()}else Ku.current=!1}const ak=[...ub,At,ro],lk=e=>ak.find(cb(e)),ck=new WeakMap;function uk(e,t,n){for(const o in t){const r=t[o],s=n[o];if(Rt(r))e.addValue(o,r),process.env.NODE_ENV==="development"&&pa(r.version==="12.4.10",`Attempting to mix Motion versions ${r.version} with 12.4.10 may not work as expected.`);else if(Rt(s))e.addValue(o,wi(r,{owner:e}));else if(s!==r)if(e.hasValue(o)){const a=e.getValue(o);a.liveStyle===!0?a.jump(r):a.hasAnimated||a.set(r)}else{const a=e.getStaticValue(o);e.addValue(o,wi(a!==void 0?a:r,{owner:e}))}}for(const o in n)t[o]===void 0&&e.removeValue(o);return t}const L0=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class dk{scrapeMotionValuesFromProps(t,n,o){return{}}constructor({parent:t,props:n,presenceContext:o,reducedMotionConfig:r,blockInitialAnimation:s,visualState:a},c={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=Nu,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{const g=kn.now();this.renderScheduledAt<g&&(this.renderScheduledAt=g,Ke.render(this.render,!1,!0))};const{latestValues:l,renderState:u,onUpdate:d}=a;this.onUpdate=d,this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=u,this.parent=t,this.props=n,this.presenceContext=o,this.depth=t?t.depth+1:0,this.reducedMotionConfig=r,this.options=c,this.blockInitialAnimation=!!s,this.isControllingVariants=ma(n),this.isVariantNode=rg(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:p,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const g in f){const m=f[g];l[g]!==void 0&&Rt(m)&&m.set(l[g],!1)}}mount(t){this.current=t,ck.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,o)=>this.bindToMotionValue(o,n)),V0.current||sk(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Ku.current,process.env.NODE_ENV!=="production"&&pa(this.shouldReduceMotion!==!0,"You have Reduced Motion enabled on your device. Animations may not appear as expected."),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){this.projection&&this.projection.unmount(),no(this.notifyUpdate),no(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const n=this.features[t];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(t,n){this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)();const o=To.has(t);o&&this.onBindTransform&&this.onBindTransform();const r=n.on("change",c=>{this.latestValues[t]=c,this.props.onUpdate&&Ke.preRender(this.notifyUpdate),o&&this.projection&&(this.projection.isTransformDirty=!0)}),s=n.on("renderRequest",this.scheduleRender);let a;window.MotionCheckAppearSync&&(a=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{r(),s(),a&&a(),n.owner&&n.stop()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in fr){const n=fr[t];if(!n)continue;const{isEnabled:o,Feature:r}=n;if(!this.features[t]&&r&&o(this.props)&&(this.features[t]=new r(this)),this.features[t]){const s=this.features[t];s.isMounted?s.update():(s.mount(),s.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):gt()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,n){this.latestValues[t]=n}update(t,n){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let o=0;o<L0.length;o++){const r=L0[o];this.propEventSubscriptions[r]&&(this.propEventSubscriptions[r](),delete this.propEventSubscriptions[r]);const s="on"+r,a=t[s];a&&(this.propEventSubscriptions[r]=this.on(r,a))}this.prevMotionValues=uk(this,this.scrapeMotionValuesFromProps(t,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue(),this.onUpdate&&this.onUpdate(this)}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(t),()=>n.variantChildren.delete(t)}addValue(t,n){const o=this.values.get(t);n!==o&&(o&&this.removeValue(t),this.bindToMotionValue(t,n),this.values.set(t,n),this.latestValues[t]=n.get())}removeValue(t){this.values.delete(t);const n=this.valueSubscriptions.get(t);n&&(n(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,n){if(this.props.values&&this.props.values[t])return this.props.values[t];let o=this.values.get(t);return o===void 0&&n!==void 0&&(o=wi(n===null?void 0:n,{owner:this}),this.addValue(t,o)),o}readValue(t,n){var o;let r=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(o=this.getBaseTargetFromProps(this.props,t))!==null&&o!==void 0?o:this.readValueFromInstance(this.current,t,this.options);return r!=null&&(typeof r=="string"&&(ab(r)||Yg(r))?r=parseFloat(r):!lk(r)&&ro.test(n)&&(r=tb(t,n)),this.setBaseTarget(t,Rt(r)?r.get():r)),Rt(r)?r.get():r}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:o}=this.props;let r;if(typeof o=="string"||typeof o=="object"){const a=lu(this.props,o,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);a&&(r=a[t])}if(o&&r!==void 0)return r;const s=this.getBaseTargetFromProps(this.props,t);return s!==void 0&&!Rt(s)?s:this.initialValues[t]!==void 0&&r===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new xu),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class _0 extends dk{constructor(){super(...arguments),this.KeyframeResolver=pb}sortInstanceNodePosition(t,n){return t.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(t,n){return t.style?t.style[n]:void 0}removeValueFromRenderState(t,{vars:n,style:o}){delete n[t],delete o[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;Rt(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function pk(e){return window.getComputedStyle(e)}class fk extends _0{constructor(){super(...arguments),this.type="html",this.renderInstance=xg}readValueFromInstance(t,n){if(To.has(n)){const o=Ou(n);return o&&o.default||0}else{const o=pk(t),r=(eu(n)?o.getPropertyValue(n):o[n])||0;return typeof r=="string"?r.trim():r}}measureInstanceViewportBox(t,{transformPagePoint:n}){return Yb(t,n)}build(t,n,o){ou(t,n,o.transformTemplate)}scrapeMotionValuesFromProps(t,n,o){return uu(t,n,o)}}class hk extends _0{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=gt,this.updateDimensions=()=>{this.current&&!this.renderState.dimensions&&yg(this.current,this.renderState)}}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(To.has(n)){const o=Ou(n);return o&&o.default||0}return n=Cg.has(n)?n:Kc(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,o){return Ig(t,n,o)}onBindTransform(){this.current&&!this.renderState.dimensions&&Ke.postRender(this.updateDimensions)}build(t,n,o){su(t,n,this.isSVGTag,o.transformTemplate)}renderInstance(t,n,o,r){Eg(t,n,o,r)}mount(t){this.isSVGTag=au(t.tagName),super.mount(t)}}const mk=(e,t)=>iu(e)?new hk(t):new fk(t,{allowProjection:e!==P.Fragment}),gk=_P({...V5,...rk,...UN,...ik},mk),fn=oP(gk),$0=({styles:e,label:t,disabled:n,...o})=>{const r=nt(),s=(t==null?void 0:t.length)*((t==null?void 0:t.length)>=10?6.5:7.5)+38||0,[a,c]=P.useState(!1);return b.jsxs(fn.button,{onMouseEnter:()=>(e==null?void 0:e.isAnimate)&&c(!0),onMouseLeave:()=>(e==null?void 0:e.isAnimate)&&c(!1),initial:{width:e!=null&&e.isAnimate||!t?"3rem":`${s/10}rem`,borderRadius:"0.7rem"},animate:{width:e!=null&&e.isAnimate?`${a?s/10:3}rem`:`${t?s/10:3}rem`},transition:{duration:.2,ease:"easeInOut"},style:{height:"3rem",outline:"none",overflow:"hidden",backgroundColor:(e==null?void 0:e.variant)!=="outlined"?(e==null?void 0:e.color)==="secondary"?r.palette.brandColor.blue:r.palette.brandColor.orange:r.palette.primary.notifyBackground,border:(e==null?void 0:e.variant)==="outlined"?`0.1rem solid ${r.palette.primary.notifyBorderColor}`:"none",display:"flex",cursor:"pointer",alignItems:"center",gap:a||!(e!=null&&e.isAnimate)?"0.5rem":0,color:(e==null?void 0:e.variant)==="outlined"?r.palette.primary.notifyTextColor:"white",justifyContent:a?"flex-start":"center",padding:a||!(e!=null&&e.isAnimate)?"1.2rem":"0.8rem",whiteSpace:"nowrap",opacity:n?.6:1,cursor:n?"auto":"pointer"},disabled:n,layout:!0,...o,children:[(e==null?void 0:e.icon)&&(!(e!=null&&e.iconPosition)||(e==null?void 0:e.iconPosition)==="start")&&b.jsx(ue,{component:"img",src:e==null?void 0:e.icon}),t&&b.jsx(fn.div,{layout:!0,initial:{opacity:0,width:0},animate:{opacity:a||!(e!=null&&e.isAnimate)?1:0,width:a||!(e!=null&&e.isAnimate)?"auto":0},transition:{duration:.2,ease:"easeInOut",delay:a?.1:0},style:{overflow:"hidden",whiteSpace:"nowrap"},children:b.jsx(wt,{sx:{fontSize:"1.1rem"},children:t})}),(e==null?void 0:e.iconPosition)==="end"&&b.jsx(ue,{component:"img",src:e==null?void 0:e.icon})]})};$0.propTypes={styles:i.object.isRequired,label:i.string};function Ir({...e}){return b.jsx(eo,{children:b.jsx($0,{...e})})}const bk=({...e})=>{const[t,n]=P.useState(!1),o=nt();return b.jsx(fn.input,{type:"text",onFocus:()=>n(!0),onBlur:()=>n(!1),initial:{width:"10rem",borderRadius:"0.7rem"},animate:{width:t?"13rem":"10rem"},transition:{duration:.3,ease:"easeInOut"},style:{height:"3rem",outline:"none",boxShadow:"none",fontSize:"1.1rem",border:`0.1rem solid ${o.palette.primary.notifyBorderColor}`,backgroundColor:o.palette.primary.notifyBackground,padding:"0rem 1rem",color:o.palette.primary.notifyTextColor,transition:"height 0.1s ease"},...e})};function G0({...e}){return b.jsx(eo,{children:b.jsx(bk,{...e})})}const ke={LOADING:"LOADING",SUCCESS:"SUCCESS",ERROR:"ERROR",MARK_ALL_AS_READ:"MARK_ALL_AS_READ",SET_GRID_DATA:"SET_GRID_DATA",HAS_SETTING_CHANGE:"HAS_SETTING_CHANGE",TRIGGER_API:"TRIGGER_API"},hn={SWR:"Something went wrong!",UNHANDLED:"Unhandled action type: ",INVALID:"Invalid action type: ",INVALID_ACTION:"Invalid action type: ",NRF:"No Records found"},wa=P.createContext(null),Fi=P.createContext(null);function W0({children:e}){const[t,n]=P.useReducer(vk,yk);return b.jsx(wa.Provider,{value:t,children:b.jsx(Fi.Provider,{value:n,children:b.jsx(eo,{children:e})})})}function vk(e,t){switch(t.type){case ke.SET_GRID_DATA:return{...e,...t.payload};case ke.HAS_SETTING_CHANGE:return{...e,...t.payload};case ke.TRIGGER_API:return{...e,...t.payload};default:throw new Error(`${hn.UNHANDLED}: ${t}`)}}const yk={visibleGridColumns:[],hasChange:!1,triggerApi:!1};W0.propTypes={children:i.node.isRequired};const xk=({options:e})=>{const t=P.useRef(null),[n,o]=P.useState(!1),[r,s]=P.useState(null),[a,c]=P.useState(e),[l,u]=P.useState(!1),d=P.useContext(Fi),{hasChange:p,visibleGridColumns:f}=P.useContext(wa);P.useEffect(()=>{c(e.sort((y,T)=>y.sequenceId-T.sequenceId))},[e]);const g=y=>{s(y)},m=y=>{y.preventDefault()},h=y=>{if(r===null||r===y)return;const T=[...a];[T[r],T[y]]=[T[y],T[r]],[T[r].sequenceId,T[y].sequenceId]=[T[y].sequenceId,T[r].sequenceId],c(T);const C=new Map(T.map(x=>[x.id,x])),I=f.map(x=>{const w=C.get(x.id);return w?{...x,sequenceId:w.sequenceId,isHidden:w.isHidden}:x}).sort((x,w)=>x.sequenceId-w.sequenceId);d({type:ke.SET_GRID_DATA,payload:{visibleGridColumns:I}}),d({type:ke.HAS_SETTING_CHANGE,payload:{hasChange:!0}}),s(null)},v=()=>{p&&d({type:ke.TRIGGER_API,payload:{triggerApi:!0}}),o(!1)};return P.useEffect(()=>{if(!n)return;const y=T=>{t.current&&!t.current.contains(T.target)&&v()};return document.addEventListener("mousedown",y),()=>document.removeEventListener("mousedown",y)},[n,p,a]),P.useEffect(()=>{if(t.current){const y=t.current.getBoundingClientRect(),T=window.innerHeight-y.bottom;u(T<200)}},[n]),{dropdownRef:t,isOpen:n,items:a,expandUp:l,setIsOpen:o,handleDragStart:g,handleDragOver:m,handleDrop:h}},Ck=({isOpen:e,setIsOpen:t,placeholder:n,theme:o,selectedValue:r,styles:s,children:a,dropdownRef:c,expandUp:l})=>b.jsxs(ue,{sx:{position:"relative",width:"100%",flexShrink:0},ref:c,children:[b.jsx(ue,{sx:{cursor:"pointer",height:"3rem",width:"100%",position:"relative",zIndex:1},onClick:()=>t(!e)}),b.jsxs(fn.div,{style:{position:"absolute",left:0,width:"100%",zIndex:1e3,border:`0.1rem solid ${o.palette.primary.notifyBorderColor}`,borderRadius:"0.7rem",color:o.palette.primary.notifyTextColor,backgroundColor:o.palette.primary.notifyBackground,overflow:"hidden",...l?{bottom:0}:{top:0}},animate:{maxHeight:e?"15rem":"3rem"},transition:{duration:.2,ease:"easeInOut"},children:[l&&b.jsxs(b.Fragment,{children:[b.jsx(ca,{children:e&&a}),e&&b.jsx("hr",{style:{width:"100%",height:"0.1rem",backgroundColor:o.palette.primary.notifyBorderColor,border:"none",margin:"0rem"}})]}),b.jsxs(ue,{sx:{padding:"0.65rem",display:"flex",alignItems:"center",justifyContent:"space-between",cursor:"pointer",gap:"0.5rem"},onClick:()=>t(!e),children:[b.jsx(ue,{component:"img",className:"select-icon",src:s==null?void 0:s.icon}),b.jsx(wt,{sx:{color:o.palette.primary.notifyTextColor,flex:1,fontSize:"1.1rem",whiteSpace:"nowrap"},children:n||r}),b.jsx(ue,{component:"img",className:"child",src:e?mt.ArrowSelectDown:mt.ArrowSelectUp})]}),!l&&b.jsxs(b.Fragment,{children:[e&&b.jsx("hr",{style:{width:"100%",height:"0.1rem",backgroundColor:o.palette.primary.notifyBorderColor,border:"none",margin:"0rem"}}),b.jsx(ca,{children:e&&a})]})]})]}),Ek=({options:e,onChange:t,showCheckBox:n,placeholder:o,isDraggable:r,value:s,isMulti:a,handleCheck:c})=>{const l=nt(),{dropdownRef:u,isOpen:d,items:p,expandUp:f,setIsOpen:g,handleDragStart:m,handleDragOver:h,handleDrop:v}=xk({options:e});return b.jsx(Ck,{isOpen:d,setIsOpen:g,placeholder:o,selectedValue:s,theme:l,dropdownRef:u,expandUp:f,children:b.jsx(fn.ul,{style:{listStyle:"none",padding:"0rem 1rem 0.8rem 1rem",margin:0,maxHeight:"10rem",overflowY:"auto",scrollbarWidth:"thin",scrollbarColor:`${l.palette.primary.notifyIconColor} transparent`},initial:{opacity:0},animate:{opacity:1},transition:{duration:.3,ease:"easeInOut"},children:p==null?void 0:p.map((y,T)=>{const C=y==null?void 0:y.isMandatory;return b.jsxs("li",{draggable:r,onDragStart:()=>m(T),onDragOver:h,onDrop:()=>v(T),style:{padding:n?"0.4rem 0":"0.2rem 0.4rem",cursor:"pointer",display:"flex",alignItems:"center",color:l.palette.primary.notifyTextColor,backgroundColor:l.palette.primary.notifyBackground,opacity:1,whiteSpace:"nowrap",pointerEvents:"auto"},onClick:()=>{C||(g(!!a),t(y))},children:[n&&b.jsx(Js,{size:"medium",sx:{color:l.palette.primary.notifyIconColor,"&.Mui-checked":{color:l.palette.brandColor.orange},p:"0.2rem 0.5rem",opacity:C?.5:1},checked:c(y),disabled:C}),b.jsx(wt,{sx:{fontSize:"1.1rem"},children:y.label})]},T)})})})};function Qu({...e}){return b.jsx(eo,{children:b.jsx(Ek,{...e})})}const Ik=U(ue)(({theme:e})=>({borderRadius:"0.4rem",position:"relative",background:e.palette.primary.notifyButtonBackground,display:"flex",height:"2.5rem"})),Tk=U(ue)(({theme:e})=>({borderRadius:"0.4rem",position:"absolute",background:e.palette.primary.notifyBackground,border:`0.1rem solid ${e.palette.primary.notifyBorderColor}`,transition:"all 0.5s ease"})),z0=U(Zs)(({theme:e})=>({borderRadius:"0.4rem",fontWeight:"400",transition:"all 0.2s 0.1s ease",padding:"0.4rem 0.8rem",fontSize:"1rem",textTransform:"none",zIndex:1,"&:hover":{background:"transparent",boxShadow:"none"}})),Sk=({isChartType:e,setIsChartType:t,leftSwitchText:n,rigthSwitchText:o})=>{const[r,s]=P.useState(0),[a,c]=P.useState(0),l=P.useRef(null),u=P.useRef(null);return P.useEffect(()=>{if(l.current&&u.current){const d=e?u.current:l.current;s(d.offsetWidth),c(d.offsetLeft)}},[e]),b.jsx(ue,{sx:{display:"flex"},children:b.jsxs(Ik,{children:[b.jsx(Tk,{sx:{width:r,transform:`translateX(${a}px)`,height:"2.5rem"}}),b.jsx(z0,{ref:l,disableRipple:!0,sx:d=>({color:e?d.palette.brandColor.grey1:d.palette.primary.notifyActiveText}),onClick:()=>t(!1),children:n}),b.jsx(z0,{ref:u,disableRipple:!0,sx:d=>({color:e?d.palette.primary.notifyActiveText:d.palette.brandColor.grey1}),onClick:()=>t(!0),children:o})]})})};function H0({...e}){return b.jsx(eo,{children:b.jsx(Sk,{...e})})}class ed extends P.Component{constructor(t){super(t),this.startDrag=this.startDrag.bind(this),this.endDrag=this.endDrag.bind(this),this.onMouseMove=this.onMouseMove.bind(this),this.dragging=!1,this.mouseX=0,this.startPos=0,this.startWidthPrev=0,this.lastDraggedWidth=0,this.draggedCol=null,this.resizeRef=P.createRef()}startDrag(){if(!this.props.disabled&&(this.draggedCol=this.props.id,this.props.resizeStart&&this.draggedCol===this.props.id&&this.props.resizeStart(),this.dragging=!0,this.startPos=this.mouseX,this.startWidthPrev=0,this.resizeRef.current)){let t=this.resizeRef.current.previousSibling;t&&(this.startWidthPrev=t.clientWidth)}}endDrag(){this.props.disabled||(this.dragging=!1,this.props.resizeEnd&&this.draggedCol===this.props.id&&this.props.resizeEnd(this.lastDraggedWidth),this.draggedCol=null)}onMouseMove(t){if(this.props.disabled||(this.mouseX=t.touches?t.touches[0].screenX:t.screenX,!this.dragging))return;const n=this.resizeRef.current,o=this.startPos-this.mouseX;let r=this.startWidthPrev-o;(!this.props.minWidth||r>=this.props.minWidth)&&(!this.props.maxWidth||r<=this.props.maxWidth)&&(n.previousSibling.style.width=r+"px",n.previousSibling.style.minWidth=r+"px",n.previousSibling.style.maxWidth=r+"px",n.previousSibling.style.setProperty("--column_resize_before_width",r+"px"),this.lastDraggedWidth=r)}componentDidMount(){const t=this.resizeRef.current;if(t&&(this.props.defaultWidth?(t.previousSibling.style.minWidth=this.props.defaultWidth+"px",t.previousSibling.style.width=this.props.defaultWidth+"px",t.previousSibling.style.maxWidth=this.props.defaultWidth+"px",t.previousSibling.style.setProperty("--column_resize_before_width",this.props.defaultWidth+"px")):this.props.minWidth&&(t.previousSibling.style.minWidth=this.props.minWidth+"px",t.previousSibling.style.width=this.props.minWidth+"px",t.previousSibling.style.maxWidth=this.props.minWidth+"px",t.previousSibling.style.setProperty("--column_resize_before_width",this.props.minWidth+"px"))),this.props.disabled){this.props.defaultWidth&&t&&(t.previousSibling.style.minWidth=this.props.defaultWidth+"px",t.previousSibling.style.width=this.props.defaultWidth+"px",t.previousSibling.style.maxWidth=this.props.defaultWidth+"px",t.previousSibling.style.setProperty("--column_resize_before_width",this.props.defaultWidth+"px")),this.props.maxWidth&&t&&(t.previousSibling.style.maxWidth=this.props.maxWidth+"px");return}this.addEventListenersToDocument()}componentWillUnmount(){this.props.disabled||this.removeEventListenersFromDocument()}componentDidUpdate(t,n){t.disabled&&!this.props.disabled&&this.addEventListenersToDocument(),!t.disabled&&this.props.disabled&&this.removeEventListenersFromDocument()}addEventListenersToDocument(){document.addEventListener("mousemove",this.onMouseMove),document.addEventListener("mouseup",this.endDrag),document.addEventListener("touchmove",this.onMouseMove),document.addEventListener("touchend",this.endDrag)}removeEventListenersFromDocument(){document.removeEventListener("mousemove",this.onMouseMove),document.removeEventListener("mouseup",this.endDrag),document.removeEventListener("touchmove",this.onMouseMove),document.removeEventListener("touchend",this.endDrag)}render(){var t={userSelect:"none"};return this.props.disabled||(t.cursor="ew-resize"),this.props.className===""&&(t.width="6px",t.backgroundColor="rgba(0, 0, 0, 0.1)"),P.createElement("th",{ref:this.resizeRef,style:t,disabled:this.props.disabled,rowSpan:this.props.rowSpan?this.props.rowSpan:1,colSpan:this.props.colSpan?this.props.colSpan:1,className:`column_resizer_own_class ${this.props.disabled?"disabled_column_resize":""} ${this.props.className}`,onMouseDown:this.props.disabled?null:this.startDrag,onTouchStart:this.props.disabled?null:this.startDrag})}}ed.defaultProps={disabled:!1,minWidth:0,className:""},ed.propTypes={disabled:"boolean",minWidth:"number",className:"string"};function X0(e,t){return function(){return e.apply(t,arguments)}}const{toString:wk}=Object.prototype,{getPrototypeOf:td}=Object,Ra=(e=>t=>{const n=wk.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),xn=e=>(e=e.toLowerCase(),t=>Ra(t)===e),Aa=e=>t=>typeof t===e,{isArray:Tr}=Array,Vi=Aa("undefined");function Rk(e){return e!==null&&!Vi(e)&&e.constructor!==null&&!Vi(e.constructor)&&Kt(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const U0=xn("ArrayBuffer");function Ak(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&U0(e.buffer),t}const Ok=Aa("string"),Kt=Aa("function"),Y0=Aa("number"),Oa=e=>e!==null&&typeof e=="object",Pk=e=>e===!0||e===!1,Pa=e=>{if(Ra(e)!=="object")return!1;const t=td(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)},Mk=xn("Date"),Nk=xn("File"),kk=xn("Blob"),Dk=xn("FileList"),Bk=e=>Oa(e)&&Kt(e.pipe),jk=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||Kt(e.append)&&((t=Ra(e))==="formdata"||t==="object"&&Kt(e.toString)&&e.toString()==="[object FormData]"))},Fk=xn("URLSearchParams"),[Vk,Lk,_k,$k]=["ReadableStream","Request","Response","Headers"].map(xn),Gk=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Li(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e>"u")return;let o,r;if(typeof e!="object"&&(e=[e]),Tr(e))for(o=0,r=e.length;o<r;o++)t.call(null,e[o],o,e);else{const s=n?Object.getOwnPropertyNames(e):Object.keys(e),a=s.length;let c;for(o=0;o<a;o++)c=s[o],t.call(null,e[c],c,e)}}function Z0(e,t){t=t.toLowerCase();const n=Object.keys(e);let o=n.length,r;for(;o-- >0;)if(r=n[o],t===r.toLowerCase())return r;return null}const Oo=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,J0=e=>!Vi(e)&&e!==Oo;function nd(){const{caseless:e}=J0(this)&&this||{},t={},n=(o,r)=>{const s=e&&Z0(t,r)||r;Pa(t[s])&&Pa(o)?t[s]=nd(t[s],o):Pa(o)?t[s]=nd({},o):Tr(o)?t[s]=o.slice():t[s]=o};for(let o=0,r=arguments.length;o<r;o++)arguments[o]&&Li(arguments[o],n);return t}const Wk=(e,t,n,{allOwnKeys:o}={})=>(Li(t,(r,s)=>{n&&Kt(r)?e[s]=X0(r,n):e[s]=r},{allOwnKeys:o}),e),zk=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),Hk=(e,t,n,o)=>{e.prototype=Object.create(t.prototype,o),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},Xk=(e,t,n,o)=>{let r,s,a;const c={};if(t=t||{},e==null)return t;do{for(r=Object.getOwnPropertyNames(e),s=r.length;s-- >0;)a=r[s],(!o||o(a,e,t))&&!c[a]&&(t[a]=e[a],c[a]=!0);e=n!==!1&&td(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},Uk=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const o=e.indexOf(t,n);return o!==-1&&o===n},Yk=e=>{if(!e)return null;if(Tr(e))return e;let t=e.length;if(!Y0(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},Zk=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&td(Uint8Array)),Jk=(e,t)=>{const o=(e&&e[Symbol.iterator]).call(e);let r;for(;(r=o.next())&&!r.done;){const s=r.value;t.call(e,s[0],s[1])}},qk=(e,t)=>{let n;const o=[];for(;(n=e.exec(t))!==null;)o.push(n);return o},Kk=xn("HTMLFormElement"),Qk=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,o,r){return o.toUpperCase()+r}),q0=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),e4=xn("RegExp"),K0=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),o={};Li(n,(r,s)=>{let a;(a=t(r,s,e))!==!1&&(o[s]=a||r)}),Object.defineProperties(e,o)},t4=e=>{K0(e,(t,n)=>{if(Kt(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const o=e[n];if(Kt(o)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},n4=(e,t)=>{const n={},o=r=>{r.forEach(s=>{n[s]=!0})};return Tr(e)?o(e):o(String(e).split(t)),n},o4=()=>{},r4=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function i4(e){return!!(e&&Kt(e.append)&&e[Symbol.toStringTag]==="FormData"&&e[Symbol.iterator])}const s4=e=>{const t=new Array(10),n=(o,r)=>{if(Oa(o)){if(t.indexOf(o)>=0)return;if(!("toJSON"in o)){t[r]=o;const s=Tr(o)?[]:{};return Li(o,(a,c)=>{const l=n(a,r+1);!Vi(l)&&(s[c]=l)}),t[r]=void 0,s}}return o};return n(e,0)},a4=xn("AsyncFunction"),l4=e=>e&&(Oa(e)||Kt(e))&&Kt(e.then)&&Kt(e.catch),Q0=((e,t)=>e?setImmediate:t?((n,o)=>(Oo.addEventListener("message",({source:r,data:s})=>{r===Oo&&s===n&&o.length&&o.shift()()},!1),r=>{o.push(r),Oo.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",Kt(Oo.postMessage)),c4=typeof queueMicrotask<"u"?queueMicrotask.bind(Oo):typeof process<"u"&&process.nextTick||Q0,G={isArray:Tr,isArrayBuffer:U0,isBuffer:Rk,isFormData:jk,isArrayBufferView:Ak,isString:Ok,isNumber:Y0,isBoolean:Pk,isObject:Oa,isPlainObject:Pa,isReadableStream:Vk,isRequest:Lk,isResponse:_k,isHeaders:$k,isUndefined:Vi,isDate:Mk,isFile:Nk,isBlob:kk,isRegExp:e4,isFunction:Kt,isStream:Bk,isURLSearchParams:Fk,isTypedArray:Zk,isFileList:Dk,forEach:Li,merge:nd,extend:Wk,trim:Gk,stripBOM:zk,inherits:Hk,toFlatObject:Xk,kindOf:Ra,kindOfTest:xn,endsWith:Uk,toArray:Yk,forEachEntry:Jk,matchAll:qk,isHTMLForm:Kk,hasOwnProperty:q0,hasOwnProp:q0,reduceDescriptors:K0,freezeMethods:t4,toObjectSet:n4,toCamelCase:Qk,noop:o4,toFiniteNumber:r4,findKey:Z0,global:Oo,isContextDefined:J0,isSpecCompliantForm:i4,toJSONObject:s4,isAsyncFn:a4,isThenable:l4,setImmediate:Q0,asap:c4};function we(e,t,n,o,r){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),n&&(this.config=n),o&&(this.request=o),r&&(this.response=r,this.status=r.status?r.status:null)}G.inherits(we,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:G.toJSONObject(this.config),code:this.code,status:this.status}}});const ev=we.prototype,tv={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{tv[e]={value:e}}),Object.defineProperties(we,tv),Object.defineProperty(ev,"isAxiosError",{value:!0}),we.from=(e,t,n,o,r,s)=>{const a=Object.create(ev);return G.toFlatObject(e,a,function(l){return l!==Error.prototype},c=>c!=="isAxiosError"),we.call(a,e.message,t,n,o,r),a.cause=e,a.name=e.name,s&&Object.assign(a,s),a};const u4=null;function od(e){return G.isPlainObject(e)||G.isArray(e)}function nv(e){return G.endsWith(e,"[]")?e.slice(0,-2):e}function ov(e,t,n){return e?e.concat(t).map(function(r,s){return r=nv(r),!n&&s?"["+r+"]":r}).join(n?".":""):t}function d4(e){return G.isArray(e)&&!e.some(od)}const p4=G.toFlatObject(G,{},null,function(t){return/^is[A-Z]/.test(t)});function Ma(e,t,n){if(!G.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=G.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(h,v){return!G.isUndefined(v[h])});const o=n.metaTokens,r=n.visitor||d,s=n.dots,a=n.indexes,l=(n.Blob||typeof Blob<"u"&&Blob)&&G.isSpecCompliantForm(t);if(!G.isFunction(r))throw new TypeError("visitor must be a function");function u(m){if(m===null)return"";if(G.isDate(m))return m.toISOString();if(!l&&G.isBlob(m))throw new we("Blob is not supported. Use a Buffer instead.");return G.isArrayBuffer(m)||G.isTypedArray(m)?l&&typeof Blob=="function"?new Blob([m]):Buffer.from(m):m}function d(m,h,v){let y=m;if(m&&!v&&typeof m=="object"){if(G.endsWith(h,"{}"))h=o?h:h.slice(0,-2),m=JSON.stringify(m);else if(G.isArray(m)&&d4(m)||(G.isFileList(m)||G.endsWith(h,"[]"))&&(y=G.toArray(m)))return h=nv(h),y.forEach(function(C,I){!(G.isUndefined(C)||C===null)&&t.append(a===!0?ov([h],I,s):a===null?h:h+"[]",u(C))}),!1}return od(m)?!0:(t.append(ov(v,h,s),u(m)),!1)}const p=[],f=Object.assign(p4,{defaultVisitor:d,convertValue:u,isVisitable:od});function g(m,h){if(!G.isUndefined(m)){if(p.indexOf(m)!==-1)throw Error("Circular reference detected in "+h.join("."));p.push(m),G.forEach(m,function(y,T){(!(G.isUndefined(y)||y===null)&&r.call(t,y,G.isString(T)?T.trim():T,h,f))===!0&&g(y,h?h.concat(T):[T])}),p.pop()}}if(!G.isObject(e))throw new TypeError("data must be an object");return g(e),t}function rv(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(o){return t[o]})}function rd(e,t){this._pairs=[],e&&Ma(e,this,t)}const iv=rd.prototype;iv.append=function(t,n){this._pairs.push([t,n])},iv.toString=function(t){const n=t?function(o){return t.call(this,o,rv)}:rv;return this._pairs.map(function(r){return n(r[0])+"="+n(r[1])},"").join("&")};function f4(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+").replace(/%5B/gi,"[").replace(/%5D/gi,"]")}function sv(e,t,n){if(!t)return e;const o=n&&n.encode||f4;G.isFunction(n)&&(n={serialize:n});const r=n&&n.serialize;let s;if(r?s=r(t,n):s=G.isURLSearchParams(t)?t.toString():new rd(t,n).toString(o),s){const a=e.indexOf("#");a!==-1&&(e=e.slice(0,a)),e+=(e.indexOf("?")===-1?"?":"&")+s}return e}class av{constructor(){this.handlers=[]}use(t,n,o){return this.handlers.push({fulfilled:t,rejected:n,synchronous:o?o.synchronous:!1,runWhen:o?o.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){G.forEach(this.handlers,function(o){o!==null&&t(o)})}}const lv={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},h4={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams<"u"?URLSearchParams:rd,FormData:typeof FormData<"u"?FormData:null,Blob:typeof Blob<"u"?Blob:null},protocols:["http","https","file","blob","url","data"]},id=typeof window<"u"&&typeof document<"u",sd=typeof navigator=="object"&&navigator||void 0,m4=id&&(!sd||["ReactNative","NativeScript","NS"].indexOf(sd.product)<0),g4=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",b4=id&&window.location.href||"http://localhost",Ot={...Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:id,hasStandardBrowserEnv:m4,hasStandardBrowserWebWorkerEnv:g4,navigator:sd,origin:b4},Symbol.toStringTag,{value:"Module"})),...h4};function v4(e,t){return Ma(e,new Ot.classes.URLSearchParams,Object.assign({visitor:function(n,o,r,s){return Ot.isNode&&G.isBuffer(n)?(this.append(o,n.toString("base64")),!1):s.defaultVisitor.apply(this,arguments)}},t))}function y4(e){return G.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function x4(e){const t={},n=Object.keys(e);let o;const r=n.length;let s;for(o=0;o<r;o++)s=n[o],t[s]=e[s];return t}function cv(e){function t(n,o,r,s){let a=n[s++];if(a==="__proto__")return!0;const c=Number.isFinite(+a),l=s>=n.length;return a=!a&&G.isArray(r)?r.length:a,l?(G.hasOwnProp(r,a)?r[a]=[r[a],o]:r[a]=o,!c):((!r[a]||!G.isObject(r[a]))&&(r[a]=[]),t(n,o,r[a],s)&&G.isArray(r[a])&&(r[a]=x4(r[a])),!c)}if(G.isFormData(e)&&G.isFunction(e.entries)){const n={};return G.forEachEntry(e,(o,r)=>{t(y4(o),r,n,0)}),n}return null}function C4(e,t,n){if(G.isString(e))try{return(t||JSON.parse)(e),G.trim(e)}catch(o){if(o.name!=="SyntaxError")throw o}return(n||JSON.stringify)(e)}const _i={transitional:lv,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const o=n.getContentType()||"",r=o.indexOf("application/json")>-1,s=G.isObject(t);if(s&&G.isHTMLForm(t)&&(t=new FormData(t)),G.isFormData(t))return r?JSON.stringify(cv(t)):t;if(G.isArrayBuffer(t)||G.isBuffer(t)||G.isStream(t)||G.isFile(t)||G.isBlob(t)||G.isReadableStream(t))return t;if(G.isArrayBufferView(t))return t.buffer;if(G.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let c;if(s){if(o.indexOf("application/x-www-form-urlencoded")>-1)return v4(t,this.formSerializer).toString();if((c=G.isFileList(t))||o.indexOf("multipart/form-data")>-1){const l=this.env&&this.env.FormData;return Ma(c?{"files[]":t}:t,l&&new l,this.formSerializer)}}return s||r?(n.setContentType("application/json",!1),C4(t)):t}],transformResponse:[function(t){const n=this.transitional||_i.transitional,o=n&&n.forcedJSONParsing,r=this.responseType==="json";if(G.isResponse(t)||G.isReadableStream(t))return t;if(t&&G.isString(t)&&(o&&!this.responseType||r)){const a=!(n&&n.silentJSONParsing)&&r;try{return JSON.parse(t)}catch(c){if(a)throw c.name==="SyntaxError"?we.from(c,we.ERR_BAD_RESPONSE,this,null,this.response):c}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Ot.classes.FormData,Blob:Ot.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};G.forEach(["delete","get","head","post","put","patch"],e=>{_i.headers[e]={}});const E4=G.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),I4=e=>{const t={};let n,o,r;return e&&e.split(`
249
249
  `).forEach(function(a){r=a.indexOf(":"),n=a.substring(0,r).trim().toLowerCase(),o=a.substring(r+1).trim(),!(!n||t[n]&&E4[n])&&(n==="set-cookie"?t[n]?t[n].push(o):t[n]=[o]:t[n]=t[n]?t[n]+", "+o:o)}),t},uv=Symbol("internals");function $i(e){return e&&String(e).trim().toLowerCase()}function Na(e){return e===!1||e==null?e:G.isArray(e)?e.map(Na):String(e)}function T4(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let o;for(;o=n.exec(e);)t[o[1]]=o[2];return t}const S4=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function ad(e,t,n,o,r){if(G.isFunction(o))return o.call(this,t,n);if(r&&(t=n),!!G.isString(t)){if(G.isString(o))return t.indexOf(o)!==-1;if(G.isRegExp(o))return o.test(t)}}function w4(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,o)=>n.toUpperCase()+o)}function R4(e,t){const n=G.toCamelCase(" "+t);["get","set","has"].forEach(o=>{Object.defineProperty(e,o+n,{value:function(r,s,a){return this[o].call(this,t,r,s,a)},configurable:!0})})}let zt=class{constructor(t){t&&this.set(t)}set(t,n,o){const r=this;function s(c,l,u){const d=$i(l);if(!d)throw new Error("header name must be a non-empty string");const p=G.findKey(r,d);(!p||r[p]===void 0||u===!0||u===void 0&&r[p]!==!1)&&(r[p||l]=Na(c))}const a=(c,l)=>G.forEach(c,(u,d)=>s(u,d,l));if(G.isPlainObject(t)||t instanceof this.constructor)a(t,n);else if(G.isString(t)&&(t=t.trim())&&!S4(t))a(I4(t),n);else if(G.isHeaders(t))for(const[c,l]of t.entries())s(l,c,o);else t!=null&&s(n,t,o);return this}get(t,n){if(t=$i(t),t){const o=G.findKey(this,t);if(o){const r=this[o];if(!n)return r;if(n===!0)return T4(r);if(G.isFunction(n))return n.call(this,r,o);if(G.isRegExp(n))return n.exec(r);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=$i(t),t){const o=G.findKey(this,t);return!!(o&&this[o]!==void 0&&(!n||ad(this,this[o],o,n)))}return!1}delete(t,n){const o=this;let r=!1;function s(a){if(a=$i(a),a){const c=G.findKey(o,a);c&&(!n||ad(o,o[c],c,n))&&(delete o[c],r=!0)}}return G.isArray(t)?t.forEach(s):s(t),r}clear(t){const n=Object.keys(this);let o=n.length,r=!1;for(;o--;){const s=n[o];(!t||ad(this,this[s],s,t,!0))&&(delete this[s],r=!0)}return r}normalize(t){const n=this,o={};return G.forEach(this,(r,s)=>{const a=G.findKey(o,s);if(a){n[a]=Na(r),delete n[s];return}const c=t?w4(s):String(s).trim();c!==s&&delete n[s],n[c]=Na(r),o[c]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return G.forEach(this,(o,r)=>{o!=null&&o!==!1&&(n[r]=t&&G.isArray(o)?o.join(", "):o)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
250
250
  `)}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const o=new this(t);return n.forEach(r=>o.set(r)),o}static accessor(t){const o=(this[uv]=this[uv]={accessors:{}}).accessors,r=this.prototype;function s(a){const c=$i(a);o[c]||(R4(r,a),o[c]=!0)}return G.isArray(t)?t.forEach(s):s(t),this}};zt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),G.reduceDescriptors(zt.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(o){this[n]=o}}}),G.freezeMethods(zt);function ld(e,t){const n=this||_i,o=t||n,r=zt.from(o.headers);let s=o.data;return G.forEach(e,function(c){s=c.call(n,s,r.normalize(),t?t.status:void 0)}),r.normalize(),s}function dv(e){return!!(e&&e.__CANCEL__)}function Sr(e,t,n){we.call(this,e??"canceled",we.ERR_CANCELED,t,n),this.name="CanceledError"}G.inherits(Sr,we,{__CANCEL__:!0});function pv(e,t,n){const o=n.config.validateStatus;!n.status||!o||o(n.status)?e(n):t(new we("Request failed with status code "+n.status,[we.ERR_BAD_REQUEST,we.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function A4(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function O4(e,t){e=e||10;const n=new Array(e),o=new Array(e);let r=0,s=0,a;return t=t!==void 0?t:1e3,function(l){const u=Date.now(),d=o[s];a||(a=u),n[r]=l,o[r]=u;let p=s,f=0;for(;p!==r;)f+=n[p++],p=p%e;if(r=(r+1)%e,r===s&&(s=(s+1)%e),u-a<t)return;const g=d&&u-d;return g?Math.round(f*1e3/g):void 0}}function P4(e,t){let n=0,o=1e3/t,r,s;const a=(u,d=Date.now())=>{n=d,r=null,s&&(clearTimeout(s),s=null),e.apply(null,u)};return[(...u)=>{const d=Date.now(),p=d-n;p>=o?a(u,d):(r=u,s||(s=setTimeout(()=>{s=null,a(r)},o-p)))},()=>r&&a(r)]}const ka=(e,t,n=3)=>{let o=0;const r=O4(50,250);return P4(s=>{const a=s.loaded,c=s.lengthComputable?s.total:void 0,l=a-o,u=r(l),d=a<=c;o=a;const p={loaded:a,total:c,progress:c?a/c:void 0,bytes:l,rate:u||void 0,estimated:u&&c&&d?(c-a)/u:void 0,event:s,lengthComputable:c!=null,[t?"download":"upload"]:!0};e(p)},n)},fv=(e,t)=>{const n=e!=null;return[o=>t[0]({lengthComputable:n,total:e,loaded:o}),t[1]]},hv=e=>(...t)=>G.asap(()=>e(...t)),M4=Ot.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Ot.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Ot.origin),Ot.navigator&&/(msie|trident)/i.test(Ot.navigator.userAgent)):()=>!0,N4=Ot.hasStandardBrowserEnv?{write(e,t,n,o,r,s){const a=[e+"="+encodeURIComponent(t)];G.isNumber(n)&&a.push("expires="+new Date(n).toGMTString()),G.isString(o)&&a.push("path="+o),G.isString(r)&&a.push("domain="+r),s===!0&&a.push("secure"),document.cookie=a.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function k4(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function D4(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function mv(e,t,n){let o=!k4(t);return e&&o||n==!1?D4(e,t):t}const gv=e=>e instanceof zt?{...e}:e;function Po(e,t){t=t||{};const n={};function o(u,d,p,f){return G.isPlainObject(u)&&G.isPlainObject(d)?G.merge.call({caseless:f},u,d):G.isPlainObject(d)?G.merge({},d):G.isArray(d)?d.slice():d}function r(u,d,p,f){if(G.isUndefined(d)){if(!G.isUndefined(u))return o(void 0,u,p,f)}else return o(u,d,p,f)}function s(u,d){if(!G.isUndefined(d))return o(void 0,d)}function a(u,d){if(G.isUndefined(d)){if(!G.isUndefined(u))return o(void 0,u)}else return o(void 0,d)}function c(u,d,p){if(p in t)return o(u,d);if(p in e)return o(void 0,u)}const l={url:s,method:s,data:s,baseURL:a,transformRequest:a,transformResponse:a,paramsSerializer:a,timeout:a,timeoutMessage:a,withCredentials:a,withXSRFToken:a,adapter:a,responseType:a,xsrfCookieName:a,xsrfHeaderName:a,onUploadProgress:a,onDownloadProgress:a,decompress:a,maxContentLength:a,maxBodyLength:a,beforeRedirect:a,transport:a,httpAgent:a,httpsAgent:a,cancelToken:a,socketPath:a,responseEncoding:a,validateStatus:c,headers:(u,d,p)=>r(gv(u),gv(d),p,!0)};return G.forEach(Object.keys(Object.assign({},e,t)),function(d){const p=l[d]||r,f=p(e[d],t[d],d);G.isUndefined(f)&&p!==c||(n[d]=f)}),n}const bv=e=>{const t=Po({},e);let{data:n,withXSRFToken:o,xsrfHeaderName:r,xsrfCookieName:s,headers:a,auth:c}=t;t.headers=a=zt.from(a),t.url=sv(mv(t.baseURL,t.url),e.params,e.paramsSerializer),c&&a.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):"")));let l;if(G.isFormData(n)){if(Ot.hasStandardBrowserEnv||Ot.hasStandardBrowserWebWorkerEnv)a.setContentType(void 0);else if((l=a.getContentType())!==!1){const[u,...d]=l?l.split(";").map(p=>p.trim()).filter(Boolean):[];a.setContentType([u||"multipart/form-data",...d].join("; "))}}if(Ot.hasStandardBrowserEnv&&(o&&G.isFunction(o)&&(o=o(t)),o||o!==!1&&M4(t.url))){const u=r&&s&&N4.read(s);u&&a.set(r,u)}return t},B4=typeof XMLHttpRequest<"u"&&function(e){return new Promise(function(n,o){const r=bv(e);let s=r.data;const a=zt.from(r.headers).normalize();let{responseType:c,onUploadProgress:l,onDownloadProgress:u}=r,d,p,f,g,m;function h(){g&&g(),m&&m(),r.cancelToken&&r.cancelToken.unsubscribe(d),r.signal&&r.signal.removeEventListener("abort",d)}let v=new XMLHttpRequest;v.open(r.method.toUpperCase(),r.url,!0),v.timeout=r.timeout;function y(){if(!v)return;const C=zt.from("getAllResponseHeaders"in v&&v.getAllResponseHeaders()),x={data:!c||c==="text"||c==="json"?v.responseText:v.response,status:v.status,statusText:v.statusText,headers:C,config:e,request:v};pv(function(R){n(R),h()},function(R){o(R),h()},x),v=null}"onloadend"in v?v.onloadend=y:v.onreadystatechange=function(){!v||v.readyState!==4||v.status===0&&!(v.responseURL&&v.responseURL.indexOf("file:")===0)||setTimeout(y)},v.onabort=function(){v&&(o(new we("Request aborted",we.ECONNABORTED,e,v)),v=null)},v.onerror=function(){o(new we("Network Error",we.ERR_NETWORK,e,v)),v=null},v.ontimeout=function(){let I=r.timeout?"timeout of "+r.timeout+"ms exceeded":"timeout exceeded";const x=r.transitional||lv;r.timeoutErrorMessage&&(I=r.timeoutErrorMessage),o(new we(I,x.clarifyTimeoutError?we.ETIMEDOUT:we.ECONNABORTED,e,v)),v=null},s===void 0&&a.setContentType(null),"setRequestHeader"in v&&G.forEach(a.toJSON(),function(I,x){v.setRequestHeader(x,I)}),G.isUndefined(r.withCredentials)||(v.withCredentials=!!r.withCredentials),c&&c!=="json"&&(v.responseType=r.responseType),u&&([f,m]=ka(u,!0),v.addEventListener("progress",f)),l&&v.upload&&([p,g]=ka(l),v.upload.addEventListener("progress",p),v.upload.addEventListener("loadend",g)),(r.cancelToken||r.signal)&&(d=C=>{v&&(o(!C||C.type?new Sr(null,e,v):C),v.abort(),v=null)},r.cancelToken&&r.cancelToken.subscribe(d),r.signal&&(r.signal.aborted?d():r.signal.addEventListener("abort",d)));const T=A4(r.url);if(T&&Ot.protocols.indexOf(T)===-1){o(new we("Unsupported protocol "+T+":",we.ERR_BAD_REQUEST,e));return}v.send(s||null)})},j4=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let o=new AbortController,r;const s=function(u){if(!r){r=!0,c();const d=u instanceof Error?u:this.reason;o.abort(d instanceof we?d:new Sr(d instanceof Error?d.message:d))}};let a=t&&setTimeout(()=>{a=null,s(new we(`timeout ${t} of ms exceeded`,we.ETIMEDOUT))},t);const c=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach(u=>{u.unsubscribe?u.unsubscribe(s):u.removeEventListener("abort",s)}),e=null)};e.forEach(u=>u.addEventListener("abort",s));const{signal:l}=o;return l.unsubscribe=()=>G.asap(c),l}},F4=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let o=0,r;for(;o<n;)r=o+t,yield e.slice(o,r),o=r},V4=async function*(e,t){for await(const n of L4(e))yield*F4(n,t)},L4=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:n,value:o}=await t.read();if(n)break;yield o}}finally{await t.cancel()}},vv=(e,t,n,o)=>{const r=V4(e,t);let s=0,a,c=l=>{a||(a=!0,o&&o(l))};return new ReadableStream({async pull(l){try{const{done:u,value:d}=await r.next();if(u){c(),l.close();return}let p=d.byteLength;if(n){let f=s+=p;n(f)}l.enqueue(new Uint8Array(d))}catch(u){throw c(u),u}},cancel(l){return c(l),r.return()}},{highWaterMark:2})},Da=typeof fetch=="function"&&typeof Request=="function"&&typeof Response=="function",yv=Da&&typeof ReadableStream=="function",_4=Da&&(typeof TextEncoder=="function"?(e=>t=>e.encode(t))(new TextEncoder):async e=>new Uint8Array(await new Response(e).arrayBuffer())),xv=(e,...t)=>{try{return!!e(...t)}catch{return!1}},$4=yv&&xv(()=>{let e=!1;const t=new Request(Ot.origin,{body:new ReadableStream,method:"POST",get duplex(){return e=!0,"half"}}).headers.has("Content-Type");return e&&!t}),Cv=64*1024,cd=yv&&xv(()=>G.isReadableStream(new Response("").body)),Ba={stream:cd&&(e=>e.body)};Da&&(e=>{["text","arrayBuffer","blob","formData","stream"].forEach(t=>{!Ba[t]&&(Ba[t]=G.isFunction(e[t])?n=>n[t]():(n,o)=>{throw new we(`Response type '${t}' is not supported`,we.ERR_NOT_SUPPORT,o)})})})(new Response);const G4=async e=>{if(e==null)return 0;if(G.isBlob(e))return e.size;if(G.isSpecCompliantForm(e))return(await new Request(Ot.origin,{method:"POST",body:e}).arrayBuffer()).byteLength;if(G.isArrayBufferView(e)||G.isArrayBuffer(e))return e.byteLength;if(G.isURLSearchParams(e)&&(e=e+""),G.isString(e))return(await _4(e)).byteLength},W4=async(e,t)=>{const n=G.toFiniteNumber(e.getContentLength());return n??G4(t)},ud={http:u4,xhr:B4,fetch:Da&&(async e=>{let{url:t,method:n,data:o,signal:r,cancelToken:s,timeout:a,onDownloadProgress:c,onUploadProgress:l,responseType:u,headers:d,withCredentials:p="same-origin",fetchOptions:f}=bv(e);u=u?(u+"").toLowerCase():"text";let g=j4([r,s&&s.toAbortSignal()],a),m;const h=g&&g.unsubscribe&&(()=>{g.unsubscribe()});let v;try{if(l&&$4&&n!=="get"&&n!=="head"&&(v=await W4(d,o))!==0){let x=new Request(t,{method:"POST",body:o,duplex:"half"}),w;if(G.isFormData(o)&&(w=x.headers.get("content-type"))&&d.setContentType(w),x.body){const[R,A]=fv(v,ka(hv(l)));o=vv(x.body,Cv,R,A)}}G.isString(p)||(p=p?"include":"omit");const y="credentials"in Request.prototype;m=new Request(t,{...f,signal:g,method:n.toUpperCase(),headers:d.normalize().toJSON(),body:o,duplex:"half",credentials:y?p:void 0});let T=await fetch(m);const C=cd&&(u==="stream"||u==="response");if(cd&&(c||C&&h)){const x={};["status","statusText","headers"].forEach(M=>{x[M]=T[M]});const w=G.toFiniteNumber(T.headers.get("content-length")),[R,A]=c&&fv(w,ka(hv(c),!0))||[];T=new Response(vv(T.body,Cv,R,()=>{A&&A(),h&&h()}),x)}u=u||"text";let I=await Ba[G.findKey(Ba,u)||"text"](T,e);return!C&&h&&h(),await new Promise((x,w)=>{pv(x,w,{data:I,headers:zt.from(T.headers),status:T.status,statusText:T.statusText,config:e,request:m})})}catch(y){throw h&&h(),y&&y.name==="TypeError"&&/fetch/i.test(y.message)?Object.assign(new we("Network Error",we.ERR_NETWORK,e,m),{cause:y.cause||y}):we.from(y,y&&y.code,e,m)}})};G.forEach(ud,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const Ev=e=>`- ${e}`,z4=e=>G.isFunction(e)||e===null||e===!1,Iv={getAdapter:e=>{e=G.isArray(e)?e:[e];const{length:t}=e;let n,o;const r={};for(let s=0;s<t;s++){n=e[s];let a;if(o=n,!z4(n)&&(o=ud[(a=String(n)).toLowerCase()],o===void 0))throw new we(`Unknown adapter '${a}'`);if(o)break;r[a||"#"+s]=o}if(!o){const s=Object.entries(r).map(([c,l])=>`adapter ${c} `+(l===!1?"is not supported by the environment":"is not available in the build"));let a=t?s.length>1?`since :
251
251
  `+s.map(Ev).join(`