lawgic-dev-kit 0.15.9 → 0.16.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -7,21 +7,21 @@ import { useTheme as j } from "../../../hooks/useTheme.js";
7
7
  import "react-hook-form";
8
8
  import "../InformationContainer/InformationContainer.js";
9
9
  import g from "../../atoms/BoxContainer/BoxContainer.js";
10
- import a from "../../atoms/Button/Button.js";
10
+ import r from "../../atoms/Button/Button.js";
11
11
  import "../../../constants/countries.js";
12
12
  import "../../atoms/ImageProfileInput/ImageProfileInput.validators.js";
13
13
  import "fuse.js";
14
14
  import { AnimatePresence as u } from "../../../node_modules/motion/dist/es/framer-motion/dist/es/components/AnimatePresence/index.js";
15
- import { motion as n } from "../../../node_modules/motion/dist/es/framer-motion/dist/es/render/components/motion/proxy.js";
16
- const R = ({
17
- title: s,
18
- description: r,
15
+ import { motion as l } from "../../../node_modules/motion/dist/es/framer-motion/dist/es/render/components/motion/proxy.js";
16
+ const T = ({
17
+ title: n,
18
+ description: c,
19
19
  open: o,
20
20
  onClose: i,
21
- onConfirm: l,
22
- onCancel: c
21
+ onConfirm: e,
22
+ onCancel: a
23
23
  }) => {
24
- const { t: e } = j(), m = {
24
+ const { t: s } = j(), m = {
25
25
  hidden: { opacity: 0 },
26
26
  visible: { opacity: 1 }
27
27
  }, x = {
@@ -49,12 +49,12 @@ const R = ({
49
49
  }
50
50
  }
51
51
  }, p = () => {
52
- l(), i();
52
+ e == null || e(), i();
53
53
  }, d = () => {
54
- c(), i();
54
+ a == null || a(), i();
55
55
  };
56
56
  return /* @__PURE__ */ t.jsx(u, { children: o && /* @__PURE__ */ t.jsx(t.Fragment, { children: /* @__PURE__ */ t.jsx(
57
- n.div,
57
+ l.div,
58
58
  {
59
59
  className: "fixed inset-0 bg-black/50 z-9999 flex items-center justify-center",
60
60
  initial: "hidden",
@@ -63,7 +63,7 @@ const R = ({
63
63
  variants: m,
64
64
  onClick: i,
65
65
  children: /* @__PURE__ */ t.jsx(
66
- n.div,
66
+ l.div,
67
67
  {
68
68
  className: "w-full max-w-4xl mx-16 z-50",
69
69
  variants: x,
@@ -73,7 +73,7 @@ const R = ({
73
73
  onClick: (f) => f.stopPropagation(),
74
74
  children: /* @__PURE__ */ t.jsxs(g, { className: "flex flex-col gap-16 p-32", children: [
75
75
  /* @__PURE__ */ t.jsxs("div", { className: "flex justify-between items-center gap-16", children: [
76
- /* @__PURE__ */ t.jsx("h3", { className: "text-black font-700 text-3xl", children: s }),
76
+ /* @__PURE__ */ t.jsx("h3", { className: "text-black font-700 text-3xl", children: n }),
77
77
  /* @__PURE__ */ t.jsx(
78
78
  y,
79
79
  {
@@ -83,23 +83,23 @@ const R = ({
83
83
  }
84
84
  )
85
85
  ] }),
86
- /* @__PURE__ */ t.jsx("p", { className: "text-gray-500 text-xl font-600", children: r }),
86
+ /* @__PURE__ */ t.jsx("p", { className: "text-gray-500 text-xl font-600", children: c }),
87
87
  /* @__PURE__ */ t.jsxs("div", { className: "flex justify-end w-full gap-16", children: [
88
- /* @__PURE__ */ t.jsx(
89
- a,
88
+ a && /* @__PURE__ */ t.jsx(
89
+ r,
90
90
  {
91
91
  onClick: d,
92
92
  variant: "transparent",
93
93
  className: "px-24 py-10! text-lg!",
94
- children: e("cancel")
94
+ children: s("cancel")
95
95
  }
96
96
  ),
97
- /* @__PURE__ */ t.jsx(
98
- a,
97
+ e && /* @__PURE__ */ t.jsx(
98
+ r,
99
99
  {
100
100
  onClick: p,
101
101
  className: "px-24 py-16 text-lg!",
102
- children: e("confirm")
102
+ children: s("confirm")
103
103
  }
104
104
  )
105
105
  ] })
@@ -110,5 +110,5 @@ const R = ({
110
110
  ) }) });
111
111
  };
112
112
  export {
113
- R as default
113
+ T as default
114
114
  };
@@ -3,6 +3,6 @@ export interface AlertModalProps {
3
3
  description: string;
4
4
  open: boolean;
5
5
  onClose: () => void;
6
- onConfirm: () => void;
7
- onCancel: () => void;
6
+ onConfirm?: () => void;
7
+ onCancel?: () => void;
8
8
  }
@@ -1,6 +1,6 @@
1
- import { j as i } from "../../../_virtual/jsx-runtime.js";
1
+ import { j as e } from "../../../_virtual/jsx-runtime.js";
2
2
  import { faX as u } from "../../../node_modules/@fortawesome/pro-light-svg-icons/index.js";
3
- import { FontAwesomeIcon as a } from "../../../node_modules/@fortawesome/react-fontawesome/index.es.js";
3
+ import { FontAwesomeIcon as l } from "../../../node_modules/@fortawesome/react-fontawesome/index.es.js";
4
4
  import "react";
5
5
  import "../../../_virtual/lodash.js";
6
6
  import { useTheme as y } from "../../../hooks/useTheme.js";
@@ -8,19 +8,19 @@ import { faCheck as v } from "../../../node_modules/@fortawesome/pro-solid-svg-i
8
8
  import "react-hook-form";
9
9
  import "../InformationContainer/InformationContainer.js";
10
10
  import g from "../../atoms/BoxContainer/BoxContainer.js";
11
- import l from "../../atoms/Button/Button.js";
11
+ import r from "../../atoms/Button/Button.js";
12
12
  import "../../../constants/countries.js";
13
13
  import "../../atoms/ImageProfileInput/ImageProfileInput.validators.js";
14
14
  import "fuse.js";
15
15
  import { AnimatePresence as N } from "../../../node_modules/motion/dist/es/framer-motion/dist/es/components/AnimatePresence/index.js";
16
- import { motion as r } from "../../../node_modules/motion/dist/es/framer-motion/dist/es/render/components/motion/proxy.js";
17
- const X = ({
16
+ import { motion as c } from "../../../node_modules/motion/dist/es/framer-motion/dist/es/render/components/motion/proxy.js";
17
+ const q = ({
18
18
  title: n,
19
- description: c,
19
+ description: m,
20
20
  open: o,
21
- onClose: e,
22
- onConfirm: m,
23
- onCancel: t,
21
+ onClose: i,
22
+ onConfirm: t,
23
+ onCancel: s,
24
24
  icon: x = v
25
25
  }) => {
26
26
  const d = {
@@ -51,21 +51,21 @@ const X = ({
51
51
  }
52
52
  }
53
53
  }, p = () => {
54
- m(), e();
54
+ t == null || t(), i();
55
55
  }, h = () => {
56
- t == null || t(), e();
57
- }, { t: s } = y();
58
- return /* @__PURE__ */ i.jsx(N, { children: o && /* @__PURE__ */ i.jsx(i.Fragment, { children: /* @__PURE__ */ i.jsx(
59
- r.div,
56
+ s == null || s(), i();
57
+ }, { t: a } = y();
58
+ return /* @__PURE__ */ e.jsx(N, { children: o && /* @__PURE__ */ e.jsx(e.Fragment, { children: /* @__PURE__ */ e.jsx(
59
+ c.div,
60
60
  {
61
61
  className: "fixed inset-0 bg-black/50 z-9999 flex items-center justify-center",
62
62
  initial: "hidden",
63
63
  animate: "visible",
64
64
  exit: "hidden",
65
65
  variants: d,
66
- onClick: e,
67
- children: /* @__PURE__ */ i.jsx(
68
- r.div,
66
+ onClick: i,
67
+ children: /* @__PURE__ */ e.jsx(
68
+ c.div,
69
69
  {
70
70
  className: "w-full max-w-sm mx-16 z-50",
71
71
  variants: f,
@@ -73,46 +73,46 @@ const X = ({
73
73
  animate: "visible",
74
74
  exit: "exit",
75
75
  onClick: (j) => j.stopPropagation(),
76
- children: /* @__PURE__ */ i.jsxs(g, { className: "flex flex-col gap-20 p-32", children: [
77
- /* @__PURE__ */ i.jsxs("div", { className: "flex flex-col", children: [
78
- /* @__PURE__ */ i.jsx("div", { className: "flex justify-end", children: /* @__PURE__ */ i.jsx(
79
- a,
76
+ children: /* @__PURE__ */ e.jsxs(g, { className: "flex flex-col gap-20 p-32", children: [
77
+ /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col", children: [
78
+ /* @__PURE__ */ e.jsx("div", { className: "flex justify-end", children: /* @__PURE__ */ e.jsx(
79
+ l,
80
80
  {
81
81
  icon: u,
82
82
  className: "cursor-pointer text-2xl text-gray-500 transition-all duration-300 hover:text-gray-700",
83
- onClick: e
83
+ onClick: i
84
84
  }
85
85
  ) }),
86
- /* @__PURE__ */ i.jsx("div", { className: "flex justify-center", children: /* @__PURE__ */ i.jsx("div", { className: "bg-blue-100 rounded-full w-76 h-76 flex justify-center items-center", children: /* @__PURE__ */ i.jsx(
87
- a,
86
+ /* @__PURE__ */ e.jsx("div", { className: "flex justify-center", children: /* @__PURE__ */ e.jsx("div", { className: "bg-blue-100 rounded-full w-76 h-76 flex justify-center items-center", children: /* @__PURE__ */ e.jsx(
87
+ l,
88
88
  {
89
89
  icon: x,
90
90
  className: "w-32 h-36 min-h-36 min-w-36 text-blue-500",
91
- onClick: e
91
+ onClick: i
92
92
  }
93
93
  ) }) })
94
94
  ] }),
95
- /* @__PURE__ */ i.jsxs("div", { className: "flex flex-col gap-20 items-center justify-center", children: [
96
- /* @__PURE__ */ i.jsxs("div", { className: "text-center w-full", children: [
97
- /* @__PURE__ */ i.jsx("h3", { className: "text-black font-700 text-3xl w-full", children: n }),
98
- /* @__PURE__ */ i.jsx("p", { className: "text-gray-500 text-xl font-600 w-full", children: c })
95
+ /* @__PURE__ */ e.jsxs("div", { className: "flex flex-col gap-20 items-center justify-center", children: [
96
+ /* @__PURE__ */ e.jsxs("div", { className: "text-center w-full", children: [
97
+ /* @__PURE__ */ e.jsx("h3", { className: "text-black font-700 text-3xl w-full", children: n }),
98
+ /* @__PURE__ */ e.jsx("p", { className: "text-gray-500 text-xl font-600 w-full", children: m })
99
99
  ] }),
100
- /* @__PURE__ */ i.jsxs("div", { className: "flex justify-center w-full gap-16", children: [
101
- !!t && /* @__PURE__ */ i.jsx(
102
- l,
100
+ /* @__PURE__ */ e.jsxs("div", { className: "flex justify-center w-full gap-16", children: [
101
+ !!s && /* @__PURE__ */ e.jsx(
102
+ r,
103
103
  {
104
104
  size: "lg",
105
105
  onClick: h,
106
106
  variant: "transparent",
107
- children: s("cancel")
107
+ children: a("cancel")
108
108
  }
109
109
  ),
110
- /* @__PURE__ */ i.jsx(
111
- l,
110
+ !!t && /* @__PURE__ */ e.jsx(
111
+ r,
112
112
  {
113
113
  size: "lg",
114
114
  onClick: p,
115
- children: s("confirm")
115
+ children: a("confirm")
116
116
  }
117
117
  )
118
118
  ] })
@@ -124,5 +124,5 @@ const X = ({
124
124
  ) }) });
125
125
  };
126
126
  export {
127
- X as default
127
+ q as default
128
128
  };
@@ -1,10 +1,10 @@
1
1
  import { IconProp } from '@fortawesome/fontawesome-svg-core';
2
2
  export interface DialogModalProps {
3
3
  title: string;
4
- description: string;
4
+ description?: string;
5
5
  open: boolean;
6
6
  icon?: IconProp;
7
7
  onClose: () => void;
8
- onConfirm: () => void;
9
- onCancel: () => void;
8
+ onConfirm?: () => void;
9
+ onCancel?: () => void;
10
10
  }
@@ -656,7 +656,7 @@ function print() { __p += __j.call(arguments, '') }
656
656
  ${g}px !important;
657
657
  top: ${d}px !important;
658
658
  }
659
- `),()=>{document.head.removeChild(y)}},[t]),v.jsx(hD,{isPresent:t,childRef:i,sizeRef:o,children:Z.cloneElement(e,{ref:i})})}const pD=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:o,mode:a,anchorX:c})=>{const u=bf(gD),d=I.useId(),h=I.useCallback(g=>{u.set(g,!0);for(const y of u.values())if(!y)return;r&&r()},[u,r]),m=I.useMemo(()=>({id:d,initial:t,isPresent:n,custom:i,onExitComplete:h,register:g=>(u.set(g,!1),()=>u.delete(g))}),o?[Math.random(),h]:[n,h]);return I.useMemo(()=>{u.forEach((g,y)=>u.set(y,!1))},[n]),Z.useEffect(()=>{!n&&!u.size&&r&&r()},[n]),a==="popLayout"&&(e=v.jsx(mD,{isPresent:n,anchorX:c,children:e})),v.jsx(ka.Provider,{value:m,children:e})};function gD(){return new Map}function Cv(e=!0){const t=I.useContext(ka);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:i}=t,o=I.useId();I.useEffect(()=>{if(e)return i(o)},[e]);const a=I.useCallback(()=>e&&r&&r(o),[o,r,e]);return!n&&r?[!1,a]:[!0]}const ja=e=>e.key||"";function Pv(e){const t=[];return I.Children.forEach(e,n=>{I.isValidElement(n)&&t.push(n)}),t}const Kn=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:i=!0,mode:o="sync",propagate:a=!1,anchorX:c="left"})=>{const[u,d]=Cv(a),h=I.useMemo(()=>Pv(e),[e]),m=a&&!u?[]:h.map(ja),g=I.useRef(!0),y=I.useRef(h),S=bf(()=>new Map),[b,E]=I.useState(h),[w,P]=I.useState(h);Ev(()=>{g.current=!1,y.current=h;for(let A=0;A<w.length;A++){const R=ja(w[A]);m.includes(R)?S.delete(R):S.get(R)!==!0&&S.set(R,!1)}},[w,m.length,m.join("-")]);const O=[];if(h!==b){let A=[...h];for(let R=0;R<w.length;R++){const V=w[R],F=ja(V);m.includes(F)||(A.splice(R,0,V),O.push(V))}return o==="wait"&&O.length&&(A=O),P(Pv(A)),E(h),null}process.env.NODE_ENV!=="production"&&o==="wait"&&w.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.useContext(vf);return v.jsx(v.Fragment,{children:w.map(A=>{const R=ja(A),V=a&&!u?!1:h===w||m.includes(R),F=()=>{if(S.has(R))S.set(R,!0);else return;let Y=!0;S.forEach(Q=>{Q||(Y=!1)}),Y&&($==null||$(),P(y.current),a&&(d==null||d()),r&&r())};return v.jsx(pD,{isPresent:V,initial:!g.current||n?void 0:!1,custom:t,presenceAffectsLayout:i,mode:o,onExitComplete:V?void 0:F,anchorX:c,children:A},R)})})},Nt=e=>e;let Qi=Nt,Er=Nt;process.env.NODE_ENV!=="production"&&(Qi=(e,t)=>{!e&&typeof console<"u"&&console.warn(t)},Er=(e,t)=>{if(!e)throw new Error(t)});const yD={useManualTiming:!1},Fa=["read","resolveKeyframes","update","preRender","render","postRender"],Av={value:null};function vD(e,t){let n=new Set,r=new Set,i=!1,o=!1;const a=new WeakSet;let c={delta:0,timestamp:0,isProcessing:!1},u=0;function d(m){a.has(m)&&(h.schedule(m),e()),u++,m(c)}const h={schedule:(m,g=!1,y=!1)=>{const b=y&&i?n:r;return g&&a.add(m),b.has(m)||b.add(m),m},cancel:m=>{r.delete(m),a.delete(m)},process:m=>{if(c=m,i){o=!0;return}i=!0,[n,r]=[r,n],n.forEach(d),t&&Av.value&&Av.value.frameloop[t].push(u),u=0,n.clear(),i=!1,o&&(o=!1,h.process(m))}};return h}const bD=40;function Ov(e,t){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,a=Fa.reduce((w,P)=>(w[P]=vD(o,t?P:void 0),w),{}),{read:c,resolveKeyframes:u,update:d,preRender:h,render:m,postRender:g}=a,y=()=>{const w=performance.now();n=!1,i.delta=r?1e3/60:Math.max(Math.min(w-i.timestamp,bD),1),i.timestamp=w,i.isProcessing=!0,c.process(i),u.process(i),d.process(i),h.process(i),m.process(i),g.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(y))},S=()=>{n=!0,r=!0,i.isProcessing||e(y)};return{schedule:Fa.reduce((w,P)=>{const O=a[P];return w[P]=($,A=!1,R=!1)=>(n||S(),O.schedule($,A,R)),w},{}),cancel:w=>{for(let P=0;P<Fa.length;P++)a[Fa[P]].cancel(w)},state:i,steps:a}}const{schedule:He,cancel:Cr,state:vt,steps:Sf}=Ov(typeof requestAnimationFrame<"u"?requestAnimationFrame:Nt,!0),Mv=I.createContext({strict:!1}),_v={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},es={};for(const e in _v)es[e]={isEnabled:t=>_v[e].some(n=>!!t[n])};function xD(e){for(const t in e)es[t]={...es[t],...e[t]}}const wD=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 Va(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||wD.has(e)}let Iv=e=>!Va(e);function SD(e){e&&(Iv=t=>t.startsWith("on")?!Va(t):e(t))}try{SD(require("@emotion/is-prop-valid").default)}catch{}function TD(e,t,n){const r={};for(const i in e)i==="values"&&typeof e.values=="object"||(Iv(i)||n===!0&&Va(i)||!t&&!Va(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}const Dv=new Set;function Ba(e,t,n){e||Dv.has(t)||(console.warn(t),Dv.add(t))}function ED(e){if(typeof Proxy>"u")return e;const t=new Map,n=(...r)=>(process.env.NODE_ENV!=="production"&&Ba(!1,"motion() is deprecated. Use motion.create() instead."),e(...r));return new Proxy(n,{get:(r,i)=>i==="create"?e:(t.has(i)||t.set(i,e(i)),t.get(i))})}const Wa=I.createContext({});function Ua(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function ho(e){return typeof e=="string"||Array.isArray(e)}const Tf=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Ef=["initial",...Tf];function za(e){return Ua(e.animate)||Ef.some(t=>ho(e[t]))}function $v(e){return!!(za(e)||e.variants)}function CD(e,t){if(za(e)){const{initial:n,animate:r}=e;return{initial:n===!1||ho(n)?n:void 0,animate:ho(r)?r:void 0}}return e.inherit!==!1?t:{}}function PD(e){const{initial:t,animate:n}=CD(e,I.useContext(Wa));return I.useMemo(()=>({initial:t,animate:n}),[Rv(t),Rv(n)])}function Rv(e){return Array.isArray(e)?e.join(" "):e}const AD=Symbol.for("motionComponentSymbol");function ts(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function OD(e,t,n){return I.useCallback(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):ts(n)&&(n.current=r))},[t])}const{schedule:Cf}=Ov(queueMicrotask,!1),Pf=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Nv="data-"+Pf("framerAppearId"),Lv=I.createContext({});function MD(e,t,n,r,i){var o,a;const{visualElement:c}=I.useContext(Wa),u=I.useContext(Mv),d=I.useContext(ka),h=I.useContext(wf).reducedMotion,m=I.useRef(null);r=r||u.renderer,!m.current&&r&&(m.current=r(e,{visualState:t,parent:c,props:n,presenceContext:d,blockInitialAnimation:d?d.initial===!1:!1,reducedMotionConfig:h}));const g=m.current,y=I.useContext(Lv);g&&!g.projection&&i&&(g.type==="html"||g.type==="svg")&&_D(m.current,n,i,y);const S=I.useRef(!1);I.useInsertionEffect(()=>{g&&S.current&&g.update(n,d)});const b=n[Nv],E=I.useRef(!!b&&!(!((o=window.MotionHandoffIsComplete)===null||o===void 0)&&o.call(window,b))&&((a=window.MotionHasOptimisedAnimation)===null||a===void 0?void 0:a.call(window,b)));return Ev(()=>{g&&(S.current=!0,window.MotionIsMounted=!0,g.updateFeatures(),Cf.render(g.render),E.current&&g.animationState&&g.animationState.animateChanges())}),I.useEffect(()=>{g&&(!E.current&&g.animationState&&g.animationState.animateChanges(),E.current&&(queueMicrotask(()=>{var w;(w=window.MotionHandoffMarkAsComplete)===null||w===void 0||w.call(window,b)}),E.current=!1))}),g}function _D(e,t,n,r){const{layoutId:i,layout:o,drag:a,dragConstraints:c,layoutScroll:u,layoutRoot:d}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:kv(e.parent)),e.projection.setOptions({layoutId:i,layout:o,alwaysMeasureLayout:!!a||c&&ts(c),visualElement:e,animationType:typeof o=="string"?o:"both",initialPromotionConfig:r,layoutScroll:u,layoutRoot:d})}function kv(e){if(e)return e.options.allowProjection!==!1?e.projection:kv(e.parent)}function ID({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:i}){var o,a;e&&xD(e);function c(d,h){let m;const g={...I.useContext(wf),...d,layoutId:DD(d)},{isStatic:y}=g,S=PD(d),b=r(d,y);if(!y&&xf){$D(g,e);const E=RD(g);m=E.MeasureLayout,S.visualElement=MD(i,b,g,t,E.ProjectionNode)}return v.jsxs(Wa.Provider,{value:S,children:[m&&S.visualElement?v.jsx(m,{visualElement:S.visualElement,...g}):null,n(i,d,OD(b,S.visualElement,h),b,y,S.visualElement)]})}c.displayName=`motion.${typeof i=="string"?i:`create(${(a=(o=i.displayName)!==null&&o!==void 0?o:i.name)!==null&&a!==void 0?a:""})`}`;const u=I.forwardRef(c);return u[AD]=i,u}function DD({layoutId:e}){const t=I.useContext(vf).id;return t&&e!==void 0?t+"-"+e:e}function $D(e,t){const n=I.useContext(Mv).strict;if(process.env.NODE_ENV!=="production"&&t&&n){const r="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";e.ignoreStrict?Qi(!1,r):Er(!1,r)}}function RD(e){const{drag:t,layout:n}=es;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t!=null&&t.isEnabled(e)||n!=null&&n.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}const jv=e=>t=>typeof t=="string"&&t.startsWith(e),Af=jv("--"),ND=jv("var(--"),Of=e=>ND(e)?LD.test(e.split("/*")[0].trim()):!1,LD=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,mo={};function kD(e){for(const t in e)mo[t]=e[t],Af(t)&&(mo[t].isCSSVariable=!0)}const ns=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],ti=new Set(ns);function Fv(e,{layout:t,layoutId:n}){return ti.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!mo[e]||e==="opacity")}const Et=e=>!!(e&&e.getVelocity),Vv=(e,t)=>t&&typeof e=="number"?t.transform(e):e,Xn=(e,t,n)=>n>t?t:n<e?e:n,rs={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},po={...rs,transform:e=>Xn(0,1,e)},Ga={...rs,default:1},go=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Pr=go("deg"),Rn=go("%"),Se=go("px"),jD=go("vh"),FD=go("vw"),Bv={...Rn,parse:e=>Rn.parse(e)/100,transform:e=>Rn.transform(e*100)},VD={borderWidth:Se,borderTopWidth:Se,borderRightWidth:Se,borderBottomWidth:Se,borderLeftWidth:Se,borderRadius:Se,radius:Se,borderTopLeftRadius:Se,borderTopRightRadius:Se,borderBottomRightRadius:Se,borderBottomLeftRadius:Se,width:Se,maxWidth:Se,height:Se,maxHeight:Se,top:Se,right:Se,bottom:Se,left:Se,padding:Se,paddingTop:Se,paddingRight:Se,paddingBottom:Se,paddingLeft:Se,margin:Se,marginTop:Se,marginRight:Se,marginBottom:Se,marginLeft:Se,backgroundPositionX:Se,backgroundPositionY:Se},BD={rotate:Pr,rotateX:Pr,rotateY:Pr,rotateZ:Pr,scale:Ga,scaleX:Ga,scaleY:Ga,scaleZ:Ga,skew:Pr,skewX:Pr,skewY:Pr,distance:Se,translateX:Se,translateY:Se,translateZ:Se,x:Se,y:Se,z:Se,perspective:Se,transformPerspective:Se,opacity:po,originX:Bv,originY:Bv,originZ:Se},Wv={...rs,transform:Math.round},Mf={...VD,...BD,zIndex:Wv,size:Se,fillOpacity:po,strokeOpacity:po,numOctaves:Wv},WD={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},UD=ns.length;function zD(e,t,n){let r="",i=!0;for(let o=0;o<UD;o++){const a=ns[o],c=e[a];if(c===void 0)continue;let u=!0;if(typeof c=="number"?u=c===(a.startsWith("scale")?1:0):u=parseFloat(c)===0,!u||n){const d=Vv(c,Mf[a]);if(!u){i=!1;const h=WD[a]||a;r+=`${h}(${d}) `}n&&(t[a]=d)}}return r=r.trim(),n?r=n(t,i?"":r):i&&(r="none"),r}function _f(e,t,n){const{style:r,vars:i,transformOrigin:o}=e;let a=!1,c=!1;for(const u in t){const d=t[u];if(ti.has(u)){a=!0;continue}else if(Af(u)){i[u]=d;continue}else{const h=Vv(d,Mf[u]);u.startsWith("origin")?(c=!0,o[u]=h):r[u]=h}}if(t.transform||(a||n?r.transform=zD(t,e.transform,n):r.transform&&(r.transform="none")),c){const{originX:u="50%",originY:d="50%",originZ:h=0}=o;r.transformOrigin=`${u} ${d} ${h}`}}const If=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Uv(e,t,n){for(const r in t)!Et(t[r])&&!Fv(r,n)&&(e[r]=t[r])}function GD({transformTemplate:e},t){return I.useMemo(()=>{const n=If();return _f(n,t,e),Object.assign({},n.vars,n.style)},[t])}function YD(e,t){const n=e.style||{},r={};return Uv(r,n,e),Object.assign(r,GD(e,t)),r}function HD(e,t){const n={},r=YD(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.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=r,n}const qD=["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 Df(e){return typeof e!="string"||e.includes("-")?!1:!!(qD.indexOf(e)>-1||/[A-Z]/u.test(e))}const KD={offset:"stroke-dashoffset",array:"stroke-dasharray"},XD={offset:"strokeDashoffset",array:"strokeDasharray"};function ZD(e,t,n=1,r=0,i=!0){e.pathLength=1;const o=i?KD:XD;e[o.offset]=Se.transform(-r);const a=Se.transform(t),c=Se.transform(n);e[o.array]=`${a} ${c}`}function zv(e,t,n){return typeof e=="string"?e:Se.transform(t+n*e)}function JD(e,t,n){const r=zv(t,e.x,e.width),i=zv(n,e.y,e.height);return`${r} ${i}`}function $f(e,{attrX:t,attrY:n,attrScale:r,originX:i,originY:o,pathLength:a,pathSpacing:c=1,pathOffset:u=0,...d},h,m){if(_f(e,d,m),h){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:g,style:y,dimensions:S}=e;g.transform&&(S&&(y.transform=g.transform),delete g.transform),S&&(i!==void 0||o!==void 0||y.transform)&&(y.transformOrigin=JD(S,i!==void 0?i:.5,o!==void 0?o:.5)),t!==void 0&&(g.x=t),n!==void 0&&(g.y=n),r!==void 0&&(g.scale=r),a!==void 0&&ZD(g,a,c,u,!1)}const Gv=()=>({...If(),attrs:{}}),Rf=e=>typeof e=="string"&&e.toLowerCase()==="svg";function QD(e,t,n,r){const i=I.useMemo(()=>{const o=Gv();return $f(o,t,Rf(r),e.transformTemplate),{...o.attrs,style:{...o.style}}},[t]);if(e.style){const o={};Uv(o,e.style,e),i.style={...o,...i.style}}return i}function e$(e=!1){return(n,r,i,{latestValues:o},a)=>{const u=(Df(n)?QD:HD)(r,o,a,n),d=TD(r,typeof n=="string",e),h=n!==I.Fragment?{...d,...u,ref:i}:{},{children:m}=r,g=I.useMemo(()=>Et(m)?m.get():m,[m]);return I.createElement(n,{...h,children:g})}}function Yv(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function Nf(e,t,n,r){if(typeof t=="function"){const[i,o]=Yv(r);t=t(n!==void 0?n:e.custom,i,o)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[i,o]=Yv(r);t=t(n!==void 0?n:e.custom,i,o)}return t}const Lf=e=>Array.isArray(e),t$=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),n$=e=>Lf(e)?e[e.length-1]||0:e;function Ya(e){const t=Et(e)?e.get():e;return t$(t)?t.toValue():t}function r$({scrapeMotionValuesFromProps:e,createRenderState:t,onUpdate:n},r,i,o){const a={latestValues:i$(r,i,o,e),renderState:t()};return n&&(a.onMount=c=>n({props:r,current:c,...a}),a.onUpdate=c=>n(c)),a}const Hv=e=>(t,n)=>{const r=I.useContext(Wa),i=I.useContext(ka),o=()=>r$(e,t,r,i);return n?o():bf(o)};function i$(e,t,n,r){const i={},o=r(e,{});for(const g in o)i[g]=Ya(o[g]);let{initial:a,animate:c}=e;const u=za(e),d=$v(e);t&&d&&!u&&e.inherit!==!1&&(a===void 0&&(a=t.initial),c===void 0&&(c=t.animate));let h=n?n.initial===!1:!1;h=h||a===!1;const m=h?c:a;if(m&&typeof m!="boolean"&&!Ua(m)){const g=Array.isArray(m)?m:[m];for(let y=0;y<g.length;y++){const S=Nf(e,g[y]);if(S){const{transitionEnd:b,transition:E,...w}=S;for(const P in w){let O=w[P];if(Array.isArray(O)){const $=h?O.length-1:0;O=O[$]}O!==null&&(i[P]=O)}for(const P in b)i[P]=b[P]}}}return i}function kf(e,t,n){var r;const{style:i}=e,o={};for(const a in i)(Et(i[a])||t.style&&Et(t.style[a])||Fv(a,e)||((r=n==null?void 0:n.getValue(a))===null||r===void 0?void 0:r.liveStyle)!==void 0)&&(o[a]=i[a]);return o}const s$={useVisualState:Hv({scrapeMotionValuesFromProps:kf,createRenderState:If})};function qv(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 Kv(e,{style:t,vars:n},r,i){Object.assign(e.style,t,i&&i.getProjectionStyles(r));for(const o in n)e.style.setProperty(o,n[o])}const Xv=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 Zv(e,t,n,r){Kv(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(Xv.has(i)?i:Pf(i),t.attrs[i])}function Jv(e,t,n){const r=kf(e,t,n);for(const i in e)if(Et(e[i])||Et(t[i])){const o=ns.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;r[o]=e[i]}return r}const Qv=["x","y","width","height","cx","cy","r"],o$={useVisualState:Hv({scrapeMotionValuesFromProps:Jv,createRenderState:Gv,onUpdate:({props:e,prevProps:t,current:n,renderState:r,latestValues:i})=>{if(!n)return;let o=!!e.drag;if(!o){for(const c in i)if(ti.has(c)){o=!0;break}}if(!o)return;let a=!t;if(t)for(let c=0;c<Qv.length;c++){const u=Qv[c];e[u]!==t[u]&&(a=!0)}a&&He.read(()=>{qv(n,r),He.render(()=>{$f(r,i,Rf(n.tagName),e.transformTemplate),Zv(n,r)})})}})};function a$(e,t){return function(r,{forwardMotionProps:i}={forwardMotionProps:!1}){const a={...Df(r)?o$:s$,preloadedFeatures:e,useRender:e$(i),createVisualElement:t,Component:r};return ID(a)}}function yo(e,t,n){const r=e.getProps();return Nf(r,t,n!==void 0?n:r.custom,e)}function jf(e,t){return e?e[t]||e.default||e:void 0}const eb=new Set(["width","height","top","left","right","bottom",...ns]);function Ff(e,t){e.indexOf(t)===-1&&e.push(t)}function Vf(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class Bf{constructor(){this.subscriptions=[]}add(t){return Ff(this.subscriptions,t),()=>Vf(this.subscriptions,t)}notify(t,n,r){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](t,n,r);else for(let o=0;o<i;o++){const a=this.subscriptions[o];a&&a(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}function tb(e,t){return t?e*(1e3/t):0}let Ha;function l$(){Ha=void 0}const Nn={now:()=>(Ha===void 0&&Nn.set(vt.isProcessing||yD.useManualTiming?vt.timestamp:performance.now()),Ha),set:e=>{Ha=e,queueMicrotask(l$)}},nb=30,c$=e=>!isNaN(parseFloat(e));class u${constructor(t,n={}){this.version="12.6.1",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,i=!0)=>{const o=Nn.now();this.updatedAt!==o&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),i&&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=Nn.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=c$(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&Ba(!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 Bf);const r=this.events[t].add(n);return t==="change"?()=>{r(),He.read(()=>{this.events.change.getSize()||this.stop()})}:r}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,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}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=Nn.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>nb)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,nb);return tb(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 vo(e,t){return new u$(e,t)}function f$(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,vo(n))}function d$(e,t){const n=yo(e,t);let{transitionEnd:r={},transition:i={},...o}=n||{};o={...o,...r};for(const a in o){const c=n$(o[a]);f$(e,a,c)}}function h$(e){return!!(Et(e)&&e.add)}function Wf(e,t){const n=e.getValue("willChange");if(h$(n))return n.add(t)}function rb(e){return e.props[Nv]}function Uf(e){let t;return()=>(t===void 0&&(t=e()),t)}const m$=Uf(()=>window.ScrollTimeline!==void 0);class p${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 r=0;r<this.animations.length;r++)this.animations[r][t]=n}attachTimeline(t,n){const r=this.animations.map(i=>{if(m$()&&i.attachTimeline)return i.attachTimeline(t);if(typeof n=="function")return n(i)});return()=>{r.forEach((i,o)=>{i&&i(),this.animations[o].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 g$ extends p${then(t,n){return Promise.all(this.animations).then(t).catch(n)}}const Ln=e=>e*1e3,Zn=e=>e/1e3;function zf(e){return typeof e=="function"}function ib(e,t){e.timeline=t,e.onfinish=null}const Gf=e=>Array.isArray(e)&&typeof e[0]=="number",y$={linearEasing:void 0};function v$(e,t){const n=Uf(e);return()=>{var r;return(r=y$[t])!==null&&r!==void 0?r:n()}}const qa=v$(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),is=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},sb=(e,t,n=10)=>{let r="";const i=Math.max(Math.round(t/n),2);for(let o=0;o<i;o++)r+=e(is(0,i-1,o))+", ";return`linear(${r.substring(0,r.length-2)})`};function ob(e){return!!(typeof e=="function"&&qa()||!e||typeof e=="string"&&(e in Yf||qa())||Gf(e)||Array.isArray(e)&&e.every(ob))}const bo=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Yf={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:bo([0,.65,.55,1]),circOut:bo([.55,0,1,.45]),backIn:bo([.31,.01,.66,-.59]),backOut:bo([.33,1.53,.69,.99])};function ab(e,t){if(e)return typeof e=="function"&&qa()?sb(e,t):Gf(e)?bo(e):Array.isArray(e)?e.map(n=>ab(n,t)||Yf.easeOut):Yf[e]}const lb=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,b$=1e-7,x$=12;function w$(e,t,n,r,i){let o,a,c=0;do a=t+(n-t)/2,o=lb(a,r,i)-e,o>0?n=a:t=a;while(Math.abs(o)>b$&&++c<x$);return a}function xo(e,t,n,r){if(e===t&&n===r)return Nt;const i=o=>w$(o,0,1,e,n);return o=>o===0||o===1?o:lb(i(o),t,r)}const cb=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,ub=e=>t=>1-e(1-t),fb=xo(.33,1.53,.69,.99),Hf=ub(fb),db=cb(Hf),hb=e=>(e*=2)<1?.5*Hf(e):.5*(2-Math.pow(2,-10*(e-1))),qf=e=>1-Math.sin(Math.acos(e)),mb=ub(qf),pb=cb(qf),gb=e=>/^0[^.\s]+$/u.test(e);function S$(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||gb(e):!0}const wo=e=>Math.round(e*1e5)/1e5,Kf=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function T$(e){return e==null}const E$=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Xf=(e,t)=>n=>!!(typeof n=="string"&&E$.test(n)&&n.startsWith(e)||t&&!T$(n)&&Object.prototype.hasOwnProperty.call(n,t)),yb=(e,t,n)=>r=>{if(typeof r!="string")return r;const[i,o,a,c]=r.match(Kf);return{[e]:parseFloat(i),[t]:parseFloat(o),[n]:parseFloat(a),alpha:c!==void 0?parseFloat(c):1}},C$=e=>Xn(0,255,e),Zf={...rs,transform:e=>Math.round(C$(e))},ni={test:Xf("rgb","red"),parse:yb("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Zf.transform(e)+", "+Zf.transform(t)+", "+Zf.transform(n)+", "+wo(po.transform(r))+")"};function P$(e){let t="",n="",r="",i="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const Jf={test:Xf("#"),parse:P$,transform:ni.transform},ss={test:Xf("hsl","hue"),parse:yb("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Rn.transform(wo(t))+", "+Rn.transform(wo(n))+", "+wo(po.transform(r))+")"},Ct={test:e=>ni.test(e)||Jf.test(e)||ss.test(e),parse:e=>ni.test(e)?ni.parse(e):ss.test(e)?ss.parse(e):Jf.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?ni.transform(e):ss.transform(e)},A$=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function O$(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(Kf))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(A$))===null||n===void 0?void 0:n.length)||0)>0}const vb="number",bb="color",M$="var",_$="var(",xb="${}",I$=/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 So(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[];let o=0;const c=t.replace(I$,u=>(Ct.test(u)?(r.color.push(o),i.push(bb),n.push(Ct.parse(u))):u.startsWith(_$)?(r.var.push(o),i.push(M$),n.push(u)):(r.number.push(o),i.push(vb),n.push(parseFloat(u))),++o,xb)).split(xb);return{values:n,split:c,indexes:r,types:i}}function wb(e){return So(e).values}function Sb(e){const{split:t,types:n}=So(e),r=t.length;return i=>{let o="";for(let a=0;a<r;a++)if(o+=t[a],i[a]!==void 0){const c=n[a];c===vb?o+=wo(i[a]):c===bb?o+=Ct.transform(i[a]):o+=i[a]}return o}}const D$=e=>typeof e=="number"?0:e;function $$(e){const t=wb(e);return Sb(e)(t.map(D$))}const Ar={test:O$,parse:wb,createTransformer:Sb,getAnimatableNone:$$},R$=new Set(["brightness","contrast","saturate","opacity"]);function N$(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Kf)||[];if(!r)return e;const i=n.replace(r,"");let o=R$.has(t)?1:0;return r!==n&&(o*=100),t+"("+o+i+")"}const L$=/\b([a-z-]*)\(.*?\)/gu,Qf={...Ar,getAnimatableNone:e=>{const t=e.match(L$);return t?t.map(N$).join(" "):e}},k$={...Mf,color:Ct,backgroundColor:Ct,outlineColor:Ct,fill:Ct,stroke:Ct,borderColor:Ct,borderTopColor:Ct,borderRightColor:Ct,borderBottomColor:Ct,borderLeftColor:Ct,filter:Qf,WebkitFilter:Qf},Tb=e=>k$[e];function Eb(e,t){let n=Tb(e);return n!==Qf&&(n=Ar),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const j$=new Set(["auto","none","0"]);function F$(e,t,n){let r=0,i;for(;r<e.length&&!i;){const o=e[r];typeof o=="string"&&!j$.has(o)&&So(o).values.length&&(i=e[r]),r++}if(i&&n)for(const o of t)e[o]=Eb(n,i)}const ri=e=>e*180/Math.PI,ed=e=>{const t=ri(Math.atan2(e[1],e[0]));return td(t)},V$={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:ed,rotateZ:ed,skewX:e=>ri(Math.atan(e[1])),skewY:e=>ri(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},td=e=>(e=e%360,e<0&&(e+=360),e),Cb=ed,Pb=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),Ab=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),B$={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Pb,scaleY:Ab,scale:e=>(Pb(e)+Ab(e))/2,rotateX:e=>td(ri(Math.atan2(e[6],e[5]))),rotateY:e=>td(ri(Math.atan2(-e[2],e[0]))),rotateZ:Cb,rotate:Cb,skewX:e=>ri(Math.atan(e[4])),skewY:e=>ri(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Ob(e){return e.includes("scale")?1:0}function nd(e,t){if(!e||e==="none")return Ob(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,i;if(n)r=B$,i=n;else{const c=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=V$,i=c}if(!i)return Ob(t);const o=r[t],a=i[1].split(",").map(U$);return typeof o=="function"?o(a):a[o]}const W$=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return nd(n,t)};function U$(e){return parseFloat(e.trim())}const Mb=e=>e===rs||e===Se,z$=new Set(["x","y","z"]),G$=ns.filter(e=>!z$.has(e));function Y$(e){const t=[];return G$.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const os={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>nd(t,"x"),y:(e,{transform:t})=>nd(t,"y")};os.translateX=os.x,os.translateY=os.y;const ii=new Set;let rd=!1,id=!1;function _b(){if(id){const e=Array.from(ii).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const i=Y$(r);i.length&&(n.set(r,i),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const i=n.get(r);i&&i.forEach(([o,a])=>{var c;(c=r.getValue(o))===null||c===void 0||c.set(a)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}id=!1,rd=!1,ii.forEach(e=>e.complete()),ii.clear()}function Ib(){ii.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(id=!0)})}function H$(){Ib(),_b()}class sd{constructor(t,n,r,i,o,a=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=i,this.element=o,this.isAsync=a}scheduleResolve(){this.isScheduled=!0,this.isAsync?(ii.add(this),rd||(rd=!0,He.read(Ib),He.resolveKeyframes(_b))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:i}=this;for(let o=0;o<t.length;o++)if(t[o]===null)if(o===0){const a=i==null?void 0:i.get(),c=t[t.length-1];if(a!==void 0)t[0]=a;else if(r&&n){const u=r.readValue(n,c);u!=null&&(t[0]=u)}t[0]===void 0&&(t[0]=c),i&&a===void 0&&i.set(t[0])}else t[o]=t[o-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),ii.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,ii.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const Db=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),q$=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function K$(e){const t=q$.exec(e);if(!t)return[,];const[,n,r,i]=t;return[`--${n??r}`,i]}const X$=4;function $b(e,t,n=1){Er(n<=X$,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);const[r,i]=K$(e);if(!r)return;const o=window.getComputedStyle(t).getPropertyValue(r);if(o){const a=o.trim();return Db(a)?parseFloat(a):a}return Of(i)?$b(i,t,n+1):i}const Rb=e=>t=>t.test(e),Nb=[rs,Se,Rn,Pr,FD,jD,{test:e=>e==="auto",parse:e=>e}],Lb=e=>Nb.find(Rb(e));class kb extends sd{constructor(t,n,r,i,o){super(t,n,r,i,o,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let u=0;u<t.length;u++){let d=t[u];if(typeof d=="string"&&(d=d.trim(),Of(d))){const h=$b(d,n.current);h!==void 0&&(t[u]=h),u===t.length-1&&(this.finalKeyframe=d)}}if(this.resolveNoneKeyframes(),!eb.has(r)||t.length!==2)return;const[i,o]=t,a=Lb(i),c=Lb(o);if(a!==c)if(Mb(a)&&Mb(c))for(let u=0;u<t.length;u++){const d=t[u];typeof d=="string"&&(t[u]=parseFloat(d))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let i=0;i<t.length;i++)S$(t[i])&&r.push(i);r.length&&F$(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=os[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const i=n[n.length-1];i!==void 0&&t.getValue(r,i).jump(i,!1)}measureEndState(){var t;const{element:n,name:r,unresolvedKeyframes:i}=this;if(!n||!n.current)return;const o=n.getValue(r);o&&o.jump(this.measuredOrigin,!1);const a=i.length-1,c=i[a];i[a]=os[r](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(([u,d])=>{n.getValue(u).set(d)}),this.resolveNoneKeyframes()}}const jb=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Ar.test(e)||e==="0")&&!e.startsWith("url("));function Z$(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 J$(e,t,n,r){const i=e[0];if(i===null)return!1;if(t==="display"||t==="visibility")return!0;const o=e[e.length-1],a=jb(i,t),c=jb(o,t);return Qi(a===c,`You are trying to animate ${t} from "${i}" to "${o}". ${i} is not an animatable value - to enable this animation set ${i} to a value animatable to ${o} via the \`style\` property.`),!a||!c?!1:Z$(e)||(n==="spring"||zf(n))&&r}const Q$=e=>e!==null;function Ka(e,{repeat:t,repeatType:n="loop"},r){const i=e.filter(Q$),o=t&&n!=="loop"&&t%2===1?0:i.length-1;return!o||r===void 0?i[o]:r}const e4=40;class Fb{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:i=0,repeatDelay:o=0,repeatType:a="loop",...c}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=Nn.now(),this.options={autoplay:t,delay:n,type:r,repeat:i,repeatDelay:o,repeatType:a,...c},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>e4?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&H$(),this._resolved}onKeyframesResolved(t,n){this.resolvedAt=Nn.now(),this.hasAttemptedResolve=!0;const{name:r,type:i,velocity:o,delay:a,onComplete:c,onUpdate:u,isGenerator:d}=this.options;if(!d&&!J$(t,r,i,o))if(a)this.options.duration=0;else{u&&u(Ka(t,this.options,n)),c&&c(),this.resolveFinishedPromise();return}const h=this.initPlayback(t,n);h!==!1&&(this._resolved={keyframes:t,finalKeyframe:n,...h},this.onPostResolved())}onPostResolved(){}then(t,n){return this.currentFinishedPromise.then(t,n)}flatten(){this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear")}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}const od=2e4;function Vb(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<od;)t+=n,r=e.next(t);return t>=od?1/0:t}const rt=(e,t,n)=>e+(t-e)*n;function ad(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 t4({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,o=0,a=0;if(!t)i=o=a=n;else{const c=n<.5?n*(1+t):n+t-n*t,u=2*n-c;i=ad(u,c,e+1/3),o=ad(u,c,e),a=ad(u,c,e-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(a*255),alpha:r}}function Xa(e,t){return n=>n>0?t:e}const ld=(e,t,n)=>{const r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},n4=[Jf,ni,ss],r4=e=>n4.find(t=>t.test(e));function Bb(e){const t=r4(e);if(Qi(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`),!t)return!1;let n=t.parse(e);return t===ss&&(n=t4(n)),n}const Wb=(e,t)=>{const n=Bb(e),r=Bb(t);if(!n||!r)return Xa(e,t);const i={...n};return o=>(i.red=ld(n.red,r.red,o),i.green=ld(n.green,r.green,o),i.blue=ld(n.blue,r.blue,o),i.alpha=rt(n.alpha,r.alpha,o),ni.transform(i))},i4=(e,t)=>n=>t(e(n)),To=(...e)=>e.reduce(i4),cd=new Set(["none","hidden"]);function s4(e,t){return cd.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function o4(e,t){return n=>rt(e,t,n)}function ud(e){return typeof e=="number"?o4:typeof e=="string"?Of(e)?Xa:Ct.test(e)?Wb:c4:Array.isArray(e)?Ub:typeof e=="object"?Ct.test(e)?Wb:a4:Xa}function Ub(e,t){const n=[...e],r=n.length,i=e.map((o,a)=>ud(o)(o,t[a]));return o=>{for(let a=0;a<r;a++)n[a]=i[a](o);return n}}function a4(e,t){const n={...e,...t},r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=ud(e[i])(e[i],t[i]));return i=>{for(const o in r)n[o]=r[o](i);return n}}function l4(e,t){var n;const r=[],i={color:0,var:0,number:0};for(let o=0;o<t.values.length;o++){const a=t.types[o],c=e.indexes[a][i[a]],u=(n=e.values[c])!==null&&n!==void 0?n:0;r[o]=u,i[a]++}return r}const c4=(e,t)=>{const n=Ar.createTransformer(t),r=So(e),i=So(t);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?cd.has(e)&&!i.values.length||cd.has(t)&&!r.values.length?s4(e,t):To(Ub(l4(r,i),i.values),n):(Qi(!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.`),Xa(e,t))};function zb(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?rt(e,t,n):ud(e)(e,t)}const u4=5;function Gb(e,t,n){const r=Math.max(t-u4,0);return tb(n-e(r),t-r)}const it={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},Yb=.001;function f4({duration:e=it.duration,bounce:t=it.bounce,velocity:n=it.velocity,mass:r=it.mass}){let i,o;Qi(e<=Ln(it.maxDuration),"Spring duration must be 10 seconds or less");let a=1-t;a=Xn(it.minDamping,it.maxDamping,a),e=Xn(it.minDuration,it.maxDuration,Zn(e)),a<1?(i=d=>{const h=d*a,m=h*e,g=h-n,y=fd(d,a),S=Math.exp(-m);return Yb-g/y*S},o=d=>{const m=d*a*e,g=m*n+n,y=Math.pow(a,2)*Math.pow(d,2)*e,S=Math.exp(-m),b=fd(Math.pow(d,2),a);return(-i(d)+Yb>0?-1:1)*((g-y)*S)/b}):(i=d=>{const h=Math.exp(-d*e),m=(d-n)*e+1;return-.001+h*m},o=d=>{const h=Math.exp(-d*e),m=(n-d)*(e*e);return h*m});const c=5/e,u=h4(i,o,c);if(e=Ln(e),isNaN(u))return{stiffness:it.stiffness,damping:it.damping,duration:e};{const d=Math.pow(u,2)*r;return{stiffness:d,damping:a*2*Math.sqrt(r*d),duration:e}}}const d4=12;function h4(e,t,n){let r=n;for(let i=1;i<d4;i++)r=r-e(r)/t(r);return r}function fd(e,t){return e*Math.sqrt(1-t*t)}const m4=["duration","bounce"],p4=["stiffness","damping","mass"];function Hb(e,t){return t.some(n=>e[n]!==void 0)}function g4(e){let t={velocity:it.velocity,stiffness:it.stiffness,damping:it.damping,mass:it.mass,isResolvedFromDuration:!1,...e};if(!Hb(e,p4)&&Hb(e,m4))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,o=2*Xn(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:it.mass,stiffness:i,damping:o}}else{const n=f4(e);t={...t,...n,mass:it.mass},t.isResolvedFromDuration=!0}return t}function qb(e=it.visualDuration,t=it.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:i}=n;const o=n.keyframes[0],a=n.keyframes[n.keyframes.length-1],c={done:!1,value:o},{stiffness:u,damping:d,mass:h,duration:m,velocity:g,isResolvedFromDuration:y}=g4({...n,velocity:-Zn(n.velocity||0)}),S=g||0,b=d/(2*Math.sqrt(u*h)),E=a-o,w=Zn(Math.sqrt(u/h)),P=Math.abs(E)<5;r||(r=P?it.restSpeed.granular:it.restSpeed.default),i||(i=P?it.restDelta.granular:it.restDelta.default);let O;if(b<1){const A=fd(w,b);O=R=>{const V=Math.exp(-b*w*R);return a-V*((S+b*w*E)/A*Math.sin(A*R)+E*Math.cos(A*R))}}else if(b===1)O=A=>a-Math.exp(-w*A)*(E+(S+w*E)*A);else{const A=w*Math.sqrt(b*b-1);O=R=>{const V=Math.exp(-b*w*R),F=Math.min(A*R,300);return a-V*((S+b*w*E)*Math.sinh(F)+A*E*Math.cosh(F))/A}}const $={calculatedDuration:y&&m||null,next:A=>{const R=O(A);if(y)c.done=A>=m;else{let V=0;b<1&&(V=A===0?Ln(S):Gb(O,A,R));const F=Math.abs(V)<=r,Y=Math.abs(a-R)<=i;c.done=F&&Y}return c.value=c.done?a:R,c},toString:()=>{const A=Math.min(Vb($),od),R=sb(V=>$.next(A*V).value,A,30);return A+"ms "+R}};return $}function Kb({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:o=500,modifyTarget:a,min:c,max:u,restDelta:d=.5,restSpeed:h}){const m=e[0],g={done:!1,value:m},y=F=>c!==void 0&&F<c||u!==void 0&&F>u,S=F=>c===void 0?u:u===void 0||Math.abs(c-F)<Math.abs(u-F)?c:u;let b=n*t;const E=m+b,w=a===void 0?E:a(E);w!==E&&(b=w-m);const P=F=>-b*Math.exp(-F/r),O=F=>w+P(F),$=F=>{const Y=P(F),Q=O(F);g.done=Math.abs(Y)<=d,g.value=g.done?w:Q};let A,R;const V=F=>{y(g.value)&&(A=F,R=qb({keyframes:[g.value,S(g.value)],velocity:Gb(O,F,g.value),damping:i,stiffness:o,restDelta:d,restSpeed:h}))};return V(0),{calculatedDuration:null,next:F=>{let Y=!1;return!R&&A===void 0&&(Y=!0,$(F),V(F)),A!==void 0&&F>=A?R.next(F-A):(!Y&&$(F),g)}}}const y4=xo(.42,0,1,1),v4=xo(0,0,.58,1),Xb=xo(.42,0,.58,1),b4=e=>Array.isArray(e)&&typeof e[0]!="number",Zb={linear:Nt,easeIn:y4,easeInOut:Xb,easeOut:v4,circIn:qf,circInOut:pb,circOut:mb,backIn:Hf,backInOut:db,backOut:fb,anticipate:hb},Jb=e=>{if(Gf(e)){Er(e.length===4,"Cubic bezier arrays must contain four numerical values.");const[t,n,r,i]=e;return xo(t,n,r,i)}else if(typeof e=="string")return Er(Zb[e]!==void 0,`Invalid easing type '${e}'`),Zb[e];return e};function x4(e,t,n){const r=[],i=n||zb,o=e.length-1;for(let a=0;a<o;a++){let c=i(e[a],e[a+1]);if(t){const u=Array.isArray(t)?t[a]||Nt:t;c=To(u,c)}r.push(c)}return r}function w4(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const o=e.length;if(Er(o===t.length,"Both input and output ranges must be the same length"),o===1)return()=>t[0];if(o===2&&t[0]===t[1])return()=>t[1];const a=e[0]===e[1];e[0]>e[o-1]&&(e=[...e].reverse(),t=[...t].reverse());const c=x4(t,r,i),u=c.length,d=h=>{if(a&&h<e[0])return t[0];let m=0;if(u>1)for(;m<e.length-2&&!(h<e[m+1]);m++);const g=is(e[m],e[m+1],h);return c[m](g)};return n?h=>d(Xn(e[0],e[o-1],h)):d}function S4(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=is(0,t,r);e.push(rt(n,1,i))}}function T4(e){const t=[0];return S4(t,e.length-1),t}function E4(e,t){return e.map(n=>n*t)}function C4(e,t){return e.map(()=>t||Xb).splice(0,e.length-1)}function Eo({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=b4(r)?r.map(Jb):Jb(r),o={done:!1,value:t[0]},a=E4(n&&n.length===t.length?n:T4(t),e),c=w4(a,t,{ease:Array.isArray(i)?i:C4(t,i)});return{calculatedDuration:e,next:u=>(o.value=c(u),o.done=u>=e,o)}}const P4=e=>{const t=({timestamp:n})=>e(n);return{start:()=>He.update(t,!0),stop:()=>Cr(t),now:()=>vt.isProcessing?vt.timestamp:Nn.now()}},A4={decay:Kb,inertia:Kb,tween:Eo,keyframes:Eo,spring:qb},O4=e=>e/100;class dd extends Fb{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:u}=this.options;u&&u()};const{name:n,motionValue:r,element:i,keyframes:o}=this.options,a=(i==null?void 0:i.KeyframeResolver)||sd,c=(u,d)=>this.onKeyframesResolved(u,d);this.resolver=new a(o,c,n,r,i),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(t){const{type:n="keyframes",repeat:r=0,repeatDelay:i=0,repeatType:o,velocity:a=0}=this.options,c=zf(n)?n:A4[n]||Eo;let u,d;process.env.NODE_ENV!=="production"&&c!==Eo&&Er(t.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${t}`),c!==Eo&&typeof t[0]!="number"&&(u=To(O4,zb(t[0],t[1])),t=[0,100]);const h=c({...this.options,keyframes:t});o==="mirror"&&(d=c({...this.options,keyframes:[...t].reverse(),velocity:-a})),h.calculatedDuration===null&&(h.calculatedDuration=Vb(h));const{calculatedDuration:m}=h,g=m+i,y=g*(r+1)-i;return{generator:h,mirroredGenerator:d,mapPercentToKeyframes:u,calculatedDuration:m,resolvedDuration:g,totalDuration:y}}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:r}=this;if(!r){const{keyframes:F}=this.options;return{done:!0,value:F[F.length-1]}}const{finalKeyframe:i,generator:o,mirroredGenerator:a,mapPercentToKeyframes:c,keyframes:u,calculatedDuration:d,totalDuration:h,resolvedDuration:m}=r;if(this.startTime===null)return o.next(0);const{delay:g,repeat:y,repeatType:S,repeatDelay:b,onUpdate:E}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-h/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 w=this.currentTime-g*(this.speed>=0?1:-1),P=this.speed>=0?w<0:w>h;this.currentTime=Math.max(w,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=h);let O=this.currentTime,$=o;if(y){const F=Math.min(this.currentTime,h)/m;let Y=Math.floor(F),Q=F%1;!Q&&F>=1&&(Q=1),Q===1&&Y--,Y=Math.min(Y,y+1),!!(Y%2)&&(S==="reverse"?(Q=1-Q,b&&(Q-=b/m)):S==="mirror"&&($=a)),O=Xn(0,1,Q)*m}const A=P?{done:!1,value:u[0]}:$.next(O);c&&(A.value=c(A.value));let{done:R}=A;!P&&d!==null&&(R=this.speed>=0?this.currentTime>=h:this.currentTime<=0);const V=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&R);return V&&i!==void 0&&(A.value=Ka(u,this.options,i)),E&&E(A.value),V&&this.finish(),A}get duration(){const{resolved:t}=this;return t?Zn(t.calculatedDuration):0}get time(){return Zn(this.currentTime)}set time(t){t=Ln(t),this.currentTime=t,this.holdTime!==null||this.speed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.speed)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=Zn(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=P4,onPlay:n,startTime:r}=this.options;this.driver||(this.driver=t(o=>this.tick(o))),n&&n();const i=this.driver.now();this.holdTime!==null?this.startTime=i-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=i):this.startTime=r??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 M4=new Set(["opacity","clipPath","filter","transform"]);function _4(e,t,n,{delay:r=0,duration:i=300,repeat:o=0,repeatType:a="loop",ease:c="easeInOut",times:u}={}){const d={[t]:n};u&&(d.offset=u);const h=ab(c,i);return Array.isArray(h)&&(d.easing=h),e.animate(d,{delay:r,duration:i,easing:Array.isArray(h)?"linear":h,fill:"both",iterations:o+1,direction:a==="reverse"?"alternate":"normal"})}const I4=Uf(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),Za=10,D4=2e4;function $4(e){return zf(e.type)||e.type==="spring"||!ob(e.ease)}function R4(e,t){const n=new dd({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:e[0]};const i=[];let o=0;for(;!r.done&&o<D4;)r=n.sample(o),i.push(r.value),o+=Za;return{times:void 0,keyframes:i,duration:o-Za,ease:"linear"}}const Qb={anticipate:hb,backInOut:db,circInOut:pb};function N4(e){return e in Qb}class e1 extends Fb{constructor(t){super(t);const{name:n,motionValue:r,element:i,keyframes:o}=this.options;this.resolver=new kb(o,(a,c)=>this.onKeyframesResolved(a,c),n,r,i),this.resolver.scheduleResolve()}initPlayback(t,n){let{duration:r=300,times:i,ease:o,type:a,motionValue:c,name:u,startTime:d}=this.options;if(!c.owner||!c.owner.current)return!1;if(typeof o=="string"&&qa()&&N4(o)&&(o=Qb[o]),$4(this.options)){const{onComplete:m,onUpdate:g,motionValue:y,element:S,...b}=this.options,E=R4(t,b);t=E.keyframes,t.length===1&&(t[1]=t[0]),r=E.duration,i=E.times,o=E.ease,a="keyframes"}const h=_4(c.owner.current,u,t,{...this.options,duration:r,times:i,ease:o});return h.startTime=d??this.calcStartTime(),this.pendingTimeline?(ib(h,this.pendingTimeline),this.pendingTimeline=void 0):h.onfinish=()=>{const{onComplete:m}=this.options;c.set(Ka(t,this.options,n)),m&&m(),this.cancel(),this.resolveFinishedPromise()},{animation:h,duration:r,times:i,type:a,ease:o,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:n}=t;return Zn(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return Zn(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=Ln(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:r}=n;r.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 Nt;const{animation:r}=n;ib(r,t)}return Nt}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:r,duration:i,type:o,ease:a,times:c}=t;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:d,onUpdate:h,onComplete:m,element:g,...y}=this.options,S=new dd({...y,keyframes:r,duration:i,type:o,ease:a,times:c,isGenerator:!0}),b=Ln(this.time);d.setWithVelocity(S.sample(b-Za).value,S.sample(b).value,Za)}const{onStop:u}=this.options;u&&u(),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:r,repeatDelay:i,repeatType:o,damping:a,type:c}=t;if(!n||!n.owner||!(n.owner.current instanceof HTMLElement))return!1;const{onUpdate:u,transformTemplate:d}=n.owner.getProps();return I4()&&r&&M4.has(r)&&(r!=="transform"||!d)&&!u&&!i&&o!=="mirror"&&a!==0&&c!=="inertia"}}const L4={type:"spring",stiffness:500,damping:25,restSpeed:10},k4=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),j4={type:"keyframes",duration:.8},F4={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},V4=(e,{keyframes:t})=>t.length>2?j4:ti.has(e)?e.startsWith("scale")?k4(t[1]):L4:F4;function B4({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:o,repeatType:a,repeatDelay:c,from:u,elapsed:d,...h}){return!!Object.keys(h).length}const hd=(e,t,n,r={},i,o)=>a=>{const c=jf(r,e)||{},u=c.delay||r.delay||0;let{elapsed:d=0}=r;d=d-Ln(u);let h={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...c,delay:-d,onUpdate:g=>{t.set(g),c.onUpdate&&c.onUpdate(g)},onComplete:()=>{a(),c.onComplete&&c.onComplete()},name:e,motionValue:t,element:o?void 0:i};B4(c)||(h={...h,...V4(e,h)}),h.duration&&(h.duration=Ln(h.duration)),h.repeatDelay&&(h.repeatDelay=Ln(h.repeatDelay)),h.from!==void 0&&(h.keyframes[0]=h.from);let m=!1;if((h.type===!1||h.duration===0&&!h.repeatDelay)&&(h.duration=0,h.delay===0&&(m=!0)),h.allowFlatten=!c.type&&!c.ease,m&&!o&&t.get()!==void 0){const g=Ka(h.keyframes,c);if(g!==void 0)return He.update(()=>{h.onUpdate(g),h.onComplete()}),new g$([])}return!o&&e1.supports(h)?new e1(h):new dd(h)};function W4({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function t1(e,t,{delay:n=0,transitionOverride:r,type:i}={}){var o;let{transition:a=e.getDefaultTransition(),transitionEnd:c,...u}=t;r&&(a=r);const d=[],h=i&&e.animationState&&e.animationState.getState()[i];for(const m in u){const g=e.getValue(m,(o=e.latestValues[m])!==null&&o!==void 0?o:null),y=u[m];if(y===void 0||h&&W4(h,m))continue;const S={delay:n,...jf(a||{},m)};let b=!1;if(window.MotionHandoffAnimation){const w=rb(e);if(w){const P=window.MotionHandoffAnimation(w,m,He);P!==null&&(S.startTime=P,b=!0)}}Wf(e,m),g.start(hd(m,g,y,e.shouldReduceMotion&&eb.has(m)?{type:!1}:S,e,b));const E=g.animation;E&&d.push(E)}return c&&Promise.all(d).then(()=>{He.update(()=>{c&&d$(e,c)})}),d}function md(e,t,n={}){var r;const i=yo(e,t,n.type==="exit"?(r=e.presenceContext)===null||r===void 0?void 0:r.custom:void 0);let{transition:o=e.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(o=n.transitionOverride);const a=i?()=>Promise.all(t1(e,i,n)):()=>Promise.resolve(),c=e.variantChildren&&e.variantChildren.size?(d=0)=>{const{delayChildren:h=0,staggerChildren:m,staggerDirection:g}=o;return U4(e,t,h+d,m,g,n)}:()=>Promise.resolve(),{when:u}=o;if(u){const[d,h]=u==="beforeChildren"?[a,c]:[c,a];return d().then(()=>h())}else return Promise.all([a(),c(n.delay)])}function U4(e,t,n=0,r=0,i=1,o){const a=[],c=(e.variantChildren.size-1)*r,u=i===1?(d=0)=>d*r:(d=0)=>c-d*r;return Array.from(e.variantChildren).sort(z4).forEach((d,h)=>{d.notify("AnimationStart",t),a.push(md(d,t,{...o,delay:n+u(h)}).then(()=>d.notify("AnimationComplete",t)))}),Promise.all(a)}function z4(e,t){return e.sortNodePosition(t)}function G4(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const i=t.map(o=>md(e,o,n));r=Promise.all(i)}else if(typeof t=="string")r=md(e,t,n);else{const i=typeof t=="function"?yo(e,t,n.custom):t;r=Promise.all(t1(e,i,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}function n1(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}const Y4=Ef.length;function r1(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?r1(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<Y4;n++){const r=Ef[n],i=e.props[r];(ho(i)||i===!1)&&(t[r]=i)}return t}const H4=[...Tf].reverse(),q4=Tf.length;function K4(e){return t=>Promise.all(t.map(({animation:n,options:r})=>G4(e,n,r)))}function X4(e){let t=K4(e),n=i1(),r=!0;const i=u=>(d,h)=>{var m;const g=yo(e,h,u==="exit"?(m=e.presenceContext)===null||m===void 0?void 0:m.custom:void 0);if(g){const{transition:y,transitionEnd:S,...b}=g;d={...d,...b,...S}}return d};function o(u){t=u(e)}function a(u){const{props:d}=e,h=r1(e.parent)||{},m=[],g=new Set;let y={},S=1/0;for(let E=0;E<q4;E++){const w=H4[E],P=n[w],O=d[w]!==void 0?d[w]:h[w],$=ho(O),A=w===u?P.isActive:null;A===!1&&(S=E);let R=O===h[w]&&O!==d[w]&&$;if(R&&r&&e.manuallyAnimateOnMount&&(R=!1),P.protectedKeys={...y},!P.isActive&&A===null||!O&&!P.prevProp||Ua(O)||typeof O=="boolean")continue;const V=Z4(P.prevProp,O);let F=V||w===u&&P.isActive&&!R&&$||E>S&&$,Y=!1;const Q=Array.isArray(O)?O:[O];let ee=Q.reduce(i(w),{});A===!1&&(ee={});const{prevResolvedValues:de={}}=P,fe={...de,...ee},oe=j=>{F=!0,g.has(j)&&(Y=!0,g.delete(j)),P.needsAnimating[j]=!0;const W=e.getValue(j);W&&(W.liveStyle=!1)};for(const j in fe){const W=ee[j],H=de[j];if(y.hasOwnProperty(j))continue;let M=!1;Lf(W)&&Lf(H)?M=!n1(W,H):M=W!==H,M?W!=null?oe(j):g.add(j):W!==void 0&&g.has(j)?oe(j):P.protectedKeys[j]=!0}P.prevProp=O,P.prevResolvedValues=ee,P.isActive&&(y={...y,...ee}),r&&e.blockInitialAnimation&&(F=!1),F&&(!(R&&V)||Y)&&m.push(...Q.map(j=>({animation:j,options:{type:w}})))}if(g.size){const E={};if(typeof d.initial!="boolean"){const w=yo(e,Array.isArray(d.initial)?d.initial[0]:d.initial);w&&w.transition&&(E.transition=w.transition)}g.forEach(w=>{const P=e.getBaseTarget(w),O=e.getValue(w);O&&(O.liveStyle=!0),E[w]=P??null}),m.push({animation:E})}let b=!!m.length;return r&&(d.initial===!1||d.initial===d.animate)&&!e.manuallyAnimateOnMount&&(b=!1),r=!1,b?t(m):Promise.resolve()}function c(u,d){var h;if(n[u].isActive===d)return Promise.resolve();(h=e.variantChildren)===null||h===void 0||h.forEach(g=>{var y;return(y=g.animationState)===null||y===void 0?void 0:y.setActive(u,d)}),n[u].isActive=d;const m=a(u);for(const g in n)n[g].protectedKeys={};return m}return{animateChanges:a,setActive:c,setAnimateFunction:o,getState:()=>n,reset:()=>{n=i1(),r=!0}}}function Z4(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!n1(t,e):!1}function si(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function i1(){return{animate:si(!0),whileInView:si(),whileHover:si(),whileTap:si(),whileDrag:si(),whileFocus:si(),exit:si()}}class Or{constructor(t){this.isMounted=!1,this.node=t}update(){}}class J4 extends Or{constructor(t){super(t),t.animationState||(t.animationState=X4(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Ua(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 Q4=0;class e6 extends Or{constructor(){super(...arguments),this.id=Q4++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const i=this.node.animationState.setActive("exit",!t);n&&!t&&i.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 t6={animation:{Feature:J4},exit:{Feature:e6}},vn={x:!1,y:!1};function s1(){return vn.x||vn.y}function n6(e){return e==="x"||e==="y"?vn[e]?null:(vn[e]=!0,()=>{vn[e]=!1}):vn.x||vn.y?null:(vn.x=vn.y=!0,()=>{vn.x=vn.y=!1})}function Co(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const pd=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;function Po(e){return{point:{x:e.pageX,y:e.pageY}}}const r6=e=>t=>pd(t)&&e(t,Po(t));function Ao(e,t,n,r){return Co(e,t,r6(n),r)}function o1({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function i6({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function s6(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}const a1=1e-4,o6=1-a1,a6=1+a1,l1=.01,l6=0-l1,c6=0+l1;function _t(e){return e.max-e.min}function u6(e,t,n){return Math.abs(e-t)<=n}function c1(e,t,n,r=.5){e.origin=r,e.originPoint=rt(t.min,t.max,e.origin),e.scale=_t(n)/_t(t),e.translate=rt(n.min,n.max,e.origin)-e.originPoint,(e.scale>=o6&&e.scale<=a6||isNaN(e.scale))&&(e.scale=1),(e.translate>=l6&&e.translate<=c6||isNaN(e.translate))&&(e.translate=0)}function Oo(e,t,n,r){c1(e.x,t.x,n.x,r?r.originX:void 0),c1(e.y,t.y,n.y,r?r.originY:void 0)}function u1(e,t,n){e.min=n.min+t.min,e.max=e.min+_t(t)}function f6(e,t,n){u1(e.x,t.x,n.x),u1(e.y,t.y,n.y)}function f1(e,t,n){e.min=t.min-n.min,e.max=e.min+_t(t)}function Mo(e,t,n){f1(e.x,t.x,n.x),f1(e.y,t.y,n.y)}const d1=()=>({translate:0,scale:1,origin:0,originPoint:0}),as=()=>({x:d1(),y:d1()}),h1=()=>({min:0,max:0}),lt=()=>({x:h1(),y:h1()});function rn(e){return[e("x"),e("y")]}function gd(e){return e===void 0||e===1}function yd({scale:e,scaleX:t,scaleY:n}){return!gd(e)||!gd(t)||!gd(n)}function oi(e){return yd(e)||m1(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function m1(e){return p1(e.x)||p1(e.y)}function p1(e){return e&&e!=="0%"}function Ja(e,t,n){const r=e-n,i=t*r;return n+i}function g1(e,t,n,r,i){return i!==void 0&&(e=Ja(e,i,r)),Ja(e,n,r)+t}function vd(e,t=0,n=1,r,i){e.min=g1(e.min,t,n,r,i),e.max=g1(e.max,t,n,r,i)}function y1(e,{x:t,y:n}){vd(e.x,t.translate,t.scale,t.originPoint),vd(e.y,n.translate,n.scale,n.originPoint)}const v1=.999999999999,b1=1.0000000000001;function d6(e,t,n,r=!1){const i=n.length;if(!i)return;t.x=t.y=1;let o,a;for(let c=0;c<i;c++){o=n[c],a=o.projectionDelta;const{visualElement:u}=o.options;u&&u.props.style&&u.props.style.display==="contents"||(r&&o.options.layoutScroll&&o.scroll&&o!==o.root&&cs(e,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),a&&(t.x*=a.x.scale,t.y*=a.y.scale,y1(e,a)),r&&oi(o.latestValues)&&cs(e,o.latestValues))}t.x<b1&&t.x>v1&&(t.x=1),t.y<b1&&t.y>v1&&(t.y=1)}function ls(e,t){e.min=e.min+t,e.max=e.max+t}function x1(e,t,n,r,i=.5){const o=rt(e.min,e.max,i);vd(e,t,n,o,r)}function cs(e,t){x1(e.x,t.x,t.scaleX,t.scale,t.originX),x1(e.y,t.y,t.scaleY,t.scale,t.originY)}function w1(e,t){return o1(s6(e.getBoundingClientRect(),t))}function h6(e,t,n){const r=w1(e,n),{scroll:i}=t;return i&&(ls(r.x,i.offset.x),ls(r.y,i.offset.y)),r}const S1=({current:e})=>e?e.ownerDocument.defaultView:null,T1=(e,t)=>Math.abs(e-t);function m6(e,t){const n=T1(e.x,t.x),r=T1(e.y,t.y);return Math.sqrt(n**2+r**2)}class E1{constructor(t,n,{transformPagePoint:r,contextWindow:i,dragSnapToOrigin:o=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const m=xd(this.lastMoveEventInfo,this.history),g=this.startEvent!==null,y=m6(m.offset,{x:0,y:0})>=3;if(!g&&!y)return;const{point:S}=m,{timestamp:b}=vt;this.history.push({...S,timestamp:b});const{onStart:E,onMove:w}=this.handlers;g||(E&&E(this.lastMoveEvent,m),this.startEvent=this.lastMoveEvent),w&&w(this.lastMoveEvent,m)},this.handlePointerMove=(m,g)=>{this.lastMoveEvent=m,this.lastMoveEventInfo=bd(g,this.transformPagePoint),He.update(this.updatePoint,!0)},this.handlePointerUp=(m,g)=>{this.end();const{onEnd:y,onSessionEnd:S,resumeAnimation:b}=this.handlers;if(this.dragSnapToOrigin&&b&&b(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const E=xd(m.type==="pointercancel"?this.lastMoveEventInfo:bd(g,this.transformPagePoint),this.history);this.startEvent&&y&&y(m,E),S&&S(m,E)},!pd(t))return;this.dragSnapToOrigin=o,this.handlers=n,this.transformPagePoint=r,this.contextWindow=i||window;const a=Po(t),c=bd(a,this.transformPagePoint),{point:u}=c,{timestamp:d}=vt;this.history=[{...u,timestamp:d}];const{onSessionStart:h}=n;h&&h(t,xd(c,this.history)),this.removeListeners=To(Ao(this.contextWindow,"pointermove",this.handlePointerMove),Ao(this.contextWindow,"pointerup",this.handlePointerUp),Ao(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Cr(this.updatePoint)}}function bd(e,t){return t?{point:t(e.point)}:e}function C1(e,t){return{x:e.x-t.x,y:e.y-t.y}}function xd({point:e},t){return{point:e,delta:C1(e,P1(t)),offset:C1(e,p6(t)),velocity:g6(t,.1)}}function p6(e){return e[0]}function P1(e){return e[e.length-1]}function g6(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=P1(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>Ln(t)));)n--;if(!r)return{x:0,y:0};const o=Zn(i.timestamp-r.timestamp);if(o===0)return{x:0,y:0};const a={x:(i.x-r.x)/o,y:(i.y-r.y)/o};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function y6(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?rt(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?rt(n,e,r.max):Math.min(e,n)),e}function A1(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 v6(e,{top:t,left:n,bottom:r,right:i}){return{x:A1(e.x,n,i),y:A1(e.y,t,r)}}function O1(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function b6(e,t){return{x:O1(e.x,t.x),y:O1(e.y,t.y)}}function x6(e,t){let n=.5;const r=_t(e),i=_t(t);return i>r?n=is(t.min,t.max-r,e.min):r>i&&(n=is(e.min,e.max-i,t.min)),Xn(0,1,n)}function w6(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 wd=.35;function S6(e=wd){return e===!1?e=0:e===!0&&(e=wd),{x:M1(e,"left","right"),y:M1(e,"top","bottom")}}function M1(e,t,n){return{min:_1(e,t),max:_1(e,n)}}function _1(e,t){return typeof e=="number"?e:e[t]||0}const T6=new WeakMap;class E6{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=lt(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const i=h=>{const{dragSnapToOrigin:m}=this.getProps();m?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(Po(h).point)},o=(h,m)=>{const{drag:g,dragPropagation:y,onDragStart:S}=this.getProps();if(g&&!y&&(this.openDragLock&&this.openDragLock(),this.openDragLock=n6(g),!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),rn(E=>{let w=this.getAxisMotionValue(E).get()||0;if(Rn.test(w)){const{projection:P}=this.visualElement;if(P&&P.layout){const O=P.layout.layoutBox[E];O&&(w=_t(O)*(parseFloat(w)/100))}}this.originPoint[E]=w}),S&&He.postRender(()=>S(h,m)),Wf(this.visualElement,"transform");const{animationState:b}=this.visualElement;b&&b.setActive("whileDrag",!0)},a=(h,m)=>{const{dragPropagation:g,dragDirectionLock:y,onDirectionLock:S,onDrag:b}=this.getProps();if(!g&&!this.openDragLock)return;const{offset:E}=m;if(y&&this.currentDirection===null){this.currentDirection=C6(E),this.currentDirection!==null&&S&&S(this.currentDirection);return}this.updateAxis("x",m.point,E),this.updateAxis("y",m.point,E),this.visualElement.render(),b&&b(h,m)},c=(h,m)=>this.stop(h,m),u=()=>rn(h=>{var m;return this.getAnimationState(h)==="paused"&&((m=this.getAxisMotionValue(h).animation)===null||m===void 0?void 0:m.play())}),{dragSnapToOrigin:d}=this.getProps();this.panSession=new E1(t,{onSessionStart:i,onStart:o,onMove:a,onSessionEnd:c,resumeAnimation:u},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:d,contextWindow:S1(this.visualElement)})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:i}=n;this.startAnimation(i);const{onDragEnd:o}=this.getProps();o&&He.postRender(()=>o(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:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:i}=this.getProps();if(!r||!Qa(t,i,this.currentDirection))return;const o=this.getAxisMotionValue(t);let a=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(a=y6(a,this.constraints[t],this.elastic[t])),o.set(a)}resolveConstraints(){var t;const{dragConstraints:n,dragElastic:r}=this.getProps(),i=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(t=this.visualElement.projection)===null||t===void 0?void 0:t.layout,o=this.constraints;n&&ts(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&i?this.constraints=v6(i.layoutBox,n):this.constraints=!1,this.elastic=S6(r),o!==this.constraints&&i&&this.constraints&&!this.hasMutatedConstraints&&rn(a=>{this.constraints!==!1&&this.getAxisMotionValue(a)&&(this.constraints[a]=w6(i.layoutBox[a],this.constraints[a]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!ts(t))return!1;const r=t.current;Er(r!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");const{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const o=h6(r,i.root,this.visualElement.getTransformPagePoint());let a=b6(i.layout.layoutBox,o);if(n){const c=n(i6(a));this.hasMutatedConstraints=!!c,c&&(a=o1(c))}return a}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:o,dragSnapToOrigin:a,onDragTransitionEnd:c}=this.getProps(),u=this.constraints||{},d=rn(h=>{if(!Qa(h,n,this.currentDirection))return;let m=u&&u[h]||{};a&&(m={min:0,max:0});const g=i?200:1e6,y=i?40:1e7,S={type:"inertia",velocity:r?t[h]:0,bounceStiffness:g,bounceDamping:y,timeConstant:750,restDelta:1,restSpeed:10,...o,...m};return this.startAxisValueAnimation(h,S)});return Promise.all(d).then(c)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return Wf(this.visualElement,t),r.start(hd(t,r,0,n,this.visualElement,!1))}stopAnimation(){rn(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){rn(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()}`,r=this.visualElement.getProps(),i=r[n];return i||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){rn(n=>{const{drag:r}=this.getProps();if(!Qa(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,o=this.getAxisMotionValue(n);if(i&&i.layout){const{min:a,max:c}=i.layout.layoutBox[n];o.set(t[n]-rt(a,c,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!ts(n)||!r||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};rn(a=>{const c=this.getAxisMotionValue(a);if(c&&this.constraints!==!1){const u=c.get();i[a]=x6({min:u,max:u},this.constraints[a])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),rn(a=>{if(!Qa(a,t,null))return;const c=this.getAxisMotionValue(a),{min:u,max:d}=this.constraints[a];c.set(rt(u,d,i[a]))})}addListeners(){if(!this.visualElement.current)return;T6.set(this.visualElement,this);const t=this.visualElement.current,n=Ao(t,"pointerdown",u=>{const{drag:d,dragListener:h=!0}=this.getProps();d&&h&&this.start(u)}),r=()=>{const{dragConstraints:u}=this.getProps();ts(u)&&u.current&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,o=i.addEventListener("measure",r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),He.read(r);const a=Co(window,"resize",()=>this.scalePositionWithinConstraints()),c=i.addEventListener("didUpdate",({delta:u,hasLayoutChanged:d})=>{this.isDragging&&d&&(rn(h=>{const m=this.getAxisMotionValue(h);m&&(this.originPoint[h]+=u[h].translate,m.set(m.get()+u[h].translate))}),this.visualElement.render())});return()=>{a(),n(),o(),c&&c()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:o=!1,dragElastic:a=wd,dragMomentum:c=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:o,dragElastic:a,dragMomentum:c}}}function Qa(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function C6(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class P6 extends Or{constructor(t){super(t),this.removeGroupControls=Nt,this.removeListeners=Nt,this.controls=new E6(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Nt}unmount(){this.removeGroupControls(),this.removeListeners()}}const I1=e=>(t,n)=>{e&&He.postRender(()=>e(t,n))};class A6 extends Or{constructor(){super(...arguments),this.removePointerDownListener=Nt}onPointerDown(t){this.session=new E1(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:S1(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:I1(t),onStart:I1(n),onMove:r,onEnd:(o,a)=>{delete this.session,i&&He.postRender(()=>i(o,a))}}}mount(){this.removePointerDownListener=Ao(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 el={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function D1(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const _o={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(Se.test(e))e=parseFloat(e);else return e;const n=D1(e,t.target.x),r=D1(e,t.target.y);return`${n}% ${r}%`}},O6={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=Ar.parse(e);if(i.length>5)return r;const o=Ar.createTransformer(e),a=typeof i[0]!="number"?1:0,c=n.x.scale*t.x,u=n.y.scale*t.y;i[0+a]/=c,i[1+a]/=u;const d=rt(c,u,.5);return typeof i[2+a]=="number"&&(i[2+a]/=d),typeof i[3+a]=="number"&&(i[3+a]/=d),o(i)}};class M6 extends I.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:o}=t;kD(_6),o&&(n.group&&n.group.add(o),r&&r.register&&i&&r.register(o),o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),el.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:i,isPresent:o}=this.props,a=r.projection;return a&&(a.isPresent=o,i||t.layoutDependency!==n||n===void 0||t.isPresent!==o?a.willUpdate():this.safeToRemove(),t.isPresent!==o&&(o?a.promote():a.relegate()||He.postRender(()=>{const c=a.getStack();(!c||!c.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Cf.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=t;i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),r&&r.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function $1(e){const[t,n]=Cv(),r=I.useContext(vf);return v.jsx(M6,{...e,layoutGroup:r,switchLayoutGroup:I.useContext(Lv),isPresent:t,safeToRemove:n})}const _6={borderRadius:{..._o,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:_o,borderTopRightRadius:_o,borderBottomLeftRadius:_o,borderBottomRightRadius:_o,boxShadow:O6};function I6(e,t,n){const r=Et(e)?e:vo(e);return r.start(hd("",r,t,n)),r.animation}function D6(e){return e instanceof SVGElement&&e.tagName!=="svg"}const $6=(e,t)=>e.depth-t.depth;class R6{constructor(){this.children=[],this.isDirty=!1}add(t){Ff(this.children,t),this.isDirty=!0}remove(t){Vf(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort($6),this.isDirty=!1,this.children.forEach(t)}}function N6(e,t){const n=Nn.now(),r=({timestamp:i})=>{const o=i-n;o>=t&&(Cr(r),e(o-t))};return He.read(r,!0),()=>Cr(r)}const R1=["TopLeft","TopRight","BottomLeft","BottomRight"],L6=R1.length,N1=e=>typeof e=="string"?parseFloat(e):e,L1=e=>typeof e=="number"||Se.test(e);function k6(e,t,n,r,i,o){i?(e.opacity=rt(0,n.opacity!==void 0?n.opacity:1,j6(r)),e.opacityExit=rt(t.opacity!==void 0?t.opacity:1,0,F6(r))):o&&(e.opacity=rt(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let a=0;a<L6;a++){const c=`border${R1[a]}Radius`;let u=k1(t,c),d=k1(n,c);if(u===void 0&&d===void 0)continue;u||(u=0),d||(d=0),u===0||d===0||L1(u)===L1(d)?(e[c]=Math.max(rt(N1(u),N1(d),r),0),(Rn.test(d)||Rn.test(u))&&(e[c]+="%")):e[c]=d}(t.rotate||n.rotate)&&(e.rotate=rt(t.rotate||0,n.rotate||0,r))}function k1(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const j6=j1(0,.5,mb),F6=j1(.5,.95,Nt);function j1(e,t,n){return r=>r<e?0:r>t?1:n(is(e,t,r))}function F1(e,t){e.min=t.min,e.max=t.max}function sn(e,t){F1(e.x,t.x),F1(e.y,t.y)}function V1(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function B1(e,t,n,r,i){return e-=t,e=Ja(e,1/n,r),i!==void 0&&(e=Ja(e,1/i,r)),e}function V6(e,t=0,n=1,r=.5,i,o=e,a=e){if(Rn.test(t)&&(t=parseFloat(t),t=rt(a.min,a.max,t/100)-a.min),typeof t!="number")return;let c=rt(o.min,o.max,r);e===o&&(c-=t),e.min=B1(e.min,t,n,c,i),e.max=B1(e.max,t,n,c,i)}function W1(e,t,[n,r,i],o,a){V6(e,t[n],t[r],t[i],t.scale,o,a)}const B6=["x","scaleX","originX"],W6=["y","scaleY","originY"];function U1(e,t,n,r){W1(e.x,t,B6,n?n.x:void 0,r?r.x:void 0),W1(e.y,t,W6,n?n.y:void 0,r?r.y:void 0)}function z1(e){return e.translate===0&&e.scale===1}function G1(e){return z1(e.x)&&z1(e.y)}function Y1(e,t){return e.min===t.min&&e.max===t.max}function U6(e,t){return Y1(e.x,t.x)&&Y1(e.y,t.y)}function H1(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function q1(e,t){return H1(e.x,t.x)&&H1(e.y,t.y)}function K1(e){return _t(e.x)/_t(e.y)}function X1(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class z6{constructor(){this.members=[]}add(t){Ff(this.members,t),t.scheduleRender()}remove(t){if(Vf(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(i=>t===i);if(n===0)return!1;let r;for(let i=n;i>=0;i--){const o=this.members[i];if(o.isPresent!==!1){r=o;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:i}=t.options;i===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function G6(e,t,n){let r="";const i=e.x.translate/t.x,o=e.y.translate/t.y,a=(n==null?void 0:n.z)||0;if((i||o||a)&&(r=`translate3d(${i}px, ${o}px, ${a}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:d,rotate:h,rotateX:m,rotateY:g,skewX:y,skewY:S}=n;d&&(r=`perspective(${d}px) ${r}`),h&&(r+=`rotate(${h}deg) `),m&&(r+=`rotateX(${m}deg) `),g&&(r+=`rotateY(${g}deg) `),y&&(r+=`skewX(${y}deg) `),S&&(r+=`skewY(${S}deg) `)}const c=e.x.scale*t.x,u=e.y.scale*t.y;return(c!==1||u!==1)&&(r+=`scale(${c}, ${u})`),r||"none"}const Sd=["","X","Y","Z"],Y6={visibility:"hidden"},Z1=1e3;let H6=0;function Td(e,t,n,r){const{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function J1(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=rb(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:o}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",He,!(i||o))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&J1(r)}function Q1({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(a={},c=t==null?void 0:t()){this.id=H6++,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(X6),this.nodes.forEach(tR),this.nodes.forEach(nR),this.nodes.forEach(Z6)},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 u=0;u<this.path.length;u++)this.path[u].shouldResetTransform=!0;this.root===this&&(this.nodes=new R6)}addEventListener(a,c){return this.eventHandlers.has(a)||this.eventHandlers.set(a,new Bf),this.eventHandlers.get(a).add(c)}notifyListeners(a,...c){const u=this.eventHandlers.get(a);u&&u.notify(...c)}hasListeners(a){return this.eventHandlers.has(a)}mount(a,c=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=D6(a),this.instance=a;const{layoutId:u,layout:d,visualElement:h}=this.options;if(h&&!h.current&&h.mount(a),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),c&&(d||u)&&(this.isLayoutDirty=!0),e){let m;const g=()=>this.root.updateBlockedByResize=!1;e(a,()=>{this.root.updateBlockedByResize=!0,m&&m(),m=N6(g,250),el.hasAnimatedSinceResize&&(el.hasAnimatedSinceResize=!1,this.nodes.forEach(tx))})}u&&this.root.registerSharedNode(u,this),this.options.animate!==!1&&h&&(u||d)&&this.addEventListener("didUpdate",({delta:m,hasLayoutChanged:g,hasRelativeLayoutChanged:y,layout:S})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const b=this.options.transition||h.getDefaultTransition()||aR,{onLayoutAnimationStart:E,onLayoutAnimationComplete:w}=h.getProps(),P=!this.targetLayout||!q1(this.targetLayout,S),O=!g&&y;if(this.options.layoutRoot||this.resumeFrom||O||g&&(P||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(m,O);const $={...jf(b,"layout"),onPlay:E,onComplete:w};(h.shouldReduceMotion||this.options.layoutRoot)&&($.delay=0,$.type=!1),this.startAnimation($)}else g||tx(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=S})}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,Cr(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(rR),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&&J1(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let h=0;h<this.path.length;h++){const m=this.path[h];m.shouldResetTransform=!0,m.updateScroll("snapshot"),m.options.layoutRoot&&m.willUpdate(!1)}const{layoutId:c,layout:u}=this.options;if(c===void 0&&!u)return;const d=this.getTransformTemplate();this.prevTransformTemplateValue=d?d(this.latestValues,""):void 0,this.updateSnapshot(),a&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(ex);return}this.isUpdating||this.nodes.forEach(Q6),this.isUpdating=!1,this.nodes.forEach(eR),this.nodes.forEach(q6),this.nodes.forEach(K6),this.clearAllSnapshots();const c=Nn.now();vt.delta=Xn(0,1e3/60,c-vt.timestamp),vt.timestamp=c,vt.isProcessing=!0,Sf.update.process(vt),Sf.preRender.process(vt),Sf.render.process(vt),vt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Cf.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(J6),this.sharedNodes.forEach(iR)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,He.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){He.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!_t(this.snapshot.measuredBox.x)&&!_t(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 u=0;u<this.path.length;u++)this.path[u].updateScroll();const a=this.layout;this.layout=this.measure(!1),this.layoutCorrected=lt(),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 u=r(this.instance);this.scroll={animationId:this.root.animationId,phase:a,isRoot:u,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:u}}}resetTransform(){if(!i)return;const a=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,c=this.projectionDelta&&!G1(this.projectionDelta),u=this.getTransformTemplate(),d=u?u(this.latestValues,""):void 0,h=d!==this.prevTransformTemplateValue;a&&(c||oi(this.latestValues)||h)&&(i(this.instance,d),this.shouldResetTransform=!1,this.scheduleRender())}measure(a=!0){const c=this.measurePageBox();let u=this.removeElementScroll(c);return a&&(u=this.removeTransform(u)),lR(u),{animationId:this.root.animationId,measuredBox:c,layoutBox:u,latestValues:{},source:this.id}}measurePageBox(){var a;const{visualElement:c}=this.options;if(!c)return lt();const u=c.measureViewportBox();if(!(((a=this.scroll)===null||a===void 0?void 0:a.wasRoot)||this.path.some(cR))){const{scroll:h}=this.root;h&&(ls(u.x,h.offset.x),ls(u.y,h.offset.y))}return u}removeElementScroll(a){var c;const u=lt();if(sn(u,a),!((c=this.scroll)===null||c===void 0)&&c.wasRoot)return u;for(let d=0;d<this.path.length;d++){const h=this.path[d],{scroll:m,options:g}=h;h!==this.root&&m&&g.layoutScroll&&(m.wasRoot&&sn(u,a),ls(u.x,m.offset.x),ls(u.y,m.offset.y))}return u}applyTransform(a,c=!1){const u=lt();sn(u,a);for(let d=0;d<this.path.length;d++){const h=this.path[d];!c&&h.options.layoutScroll&&h.scroll&&h!==h.root&&cs(u,{x:-h.scroll.offset.x,y:-h.scroll.offset.y}),oi(h.latestValues)&&cs(u,h.latestValues)}return oi(this.latestValues)&&cs(u,this.latestValues),u}removeTransform(a){const c=lt();sn(c,a);for(let u=0;u<this.path.length;u++){const d=this.path[u];if(!d.instance||!oi(d.latestValues))continue;yd(d.latestValues)&&d.updateSnapshot();const h=lt(),m=d.measurePageBox();sn(h,m),U1(c,d.latestValues,d.snapshot?d.snapshot.layoutBox:void 0,h)}return oi(this.latestValues)&&U1(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!==vt.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(a=!1){var c;const u=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=u.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=u.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=u.isSharedProjectionDirty);const d=!!this.resumingFrom||this!==u;if(!(a||d&&this.isSharedProjectionDirty||this.isProjectionDirty||!((c=this.parent)===null||c===void 0)&&c.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:m,layoutId:g}=this.options;if(!(!this.layout||!(m||g))){if(this.resolvedRelativeTargetAt=vt.timestamp,!this.targetDelta&&!this.relativeTarget){const y=this.getClosestProjectingParent();y&&y.layout&&this.animationProgress!==1?(this.relativeParent=y,this.forceRelativeParentToResolveTarget(),this.relativeTarget=lt(),this.relativeTargetOrigin=lt(),Mo(this.relativeTargetOrigin,this.layout.layoutBox,y.layout.layoutBox),sn(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=lt(),this.targetWithTransforms=lt()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),f6(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):sn(this.target,this.layout.layoutBox),y1(this.target,this.targetDelta)):sn(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const y=this.getClosestProjectingParent();y&&!!y.resumingFrom==!!this.resumingFrom&&!y.options.layoutScroll&&y.target&&this.animationProgress!==1?(this.relativeParent=y,this.forceRelativeParentToResolveTarget(),this.relativeTarget=lt(),this.relativeTargetOrigin=lt(),Mo(this.relativeTargetOrigin,this.target,y.target),sn(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||yd(this.parent.latestValues)||m1(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(),u=!!this.resumingFrom||this!==c;let d=!0;if((this.isProjectionDirty||!((a=this.parent)===null||a===void 0)&&a.isProjectionDirty)&&(d=!1),u&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(d=!1),this.resolvedRelativeTargetAt===vt.timestamp&&(d=!1),d)return;const{layout:h,layoutId:m}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(h||m))return;sn(this.layoutCorrected,this.layout.layoutBox);const g=this.treeScale.x,y=this.treeScale.y;d6(this.layoutCorrected,this.treeScale,this.path,u),c.layout&&!c.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(c.target=c.layout.layoutBox,c.targetWithTransforms=lt());const{target:S}=c;if(!S){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(V1(this.prevProjectionDelta.x,this.projectionDelta.x),V1(this.prevProjectionDelta.y,this.projectionDelta.y)),Oo(this.projectionDelta,this.layoutCorrected,S,this.latestValues),(this.treeScale.x!==g||this.treeScale.y!==y||!X1(this.projectionDelta.x,this.prevProjectionDelta.x)||!X1(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",S))}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 u=this.getStack();u&&u.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=as(),this.projectionDelta=as(),this.projectionDeltaWithTransform=as()}setAnimationOrigin(a,c=!1){const u=this.snapshot,d=u?u.latestValues:{},h={...this.latestValues},m=as();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!c;const g=lt(),y=u?u.source:void 0,S=this.layout?this.layout.source:void 0,b=y!==S,E=this.getStack(),w=!E||E.members.length<=1,P=!!(b&&!w&&this.options.crossfade===!0&&!this.path.some(oR));this.animationProgress=0;let O;this.mixTargetDelta=$=>{const A=$/1e3;nx(m.x,a.x,A),nx(m.y,a.y,A),this.setTargetDelta(m),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Mo(g,this.layout.layoutBox,this.relativeParent.layout.layoutBox),sR(this.relativeTarget,this.relativeTargetOrigin,g,A),O&&U6(this.relativeTarget,O)&&(this.isProjectionDirty=!1),O||(O=lt()),sn(O,this.relativeTarget)),b&&(this.animationValues=h,k6(h,d,this.latestValues,A,P,w)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=A},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&&(Cr(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=He.update(()=>{el.hasAnimatedSinceResize=!0,this.currentAnimation=I6(0,Z1,{...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(Z1),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const a=this.getLead();let{targetWithTransforms:c,target:u,layout:d,latestValues:h}=a;if(!(!c||!u||!d)){if(this!==a&&this.layout&&d&&ax(this.options.animationType,this.layout.layoutBox,d.layoutBox)){u=this.target||lt();const m=_t(this.layout.layoutBox.x);u.x.min=a.target.x.min,u.x.max=u.x.min+m;const g=_t(this.layout.layoutBox.y);u.y.min=a.target.y.min,u.y.max=u.y.min+g}sn(c,u),cs(c,h),Oo(this.projectionDeltaWithTransform,this.layoutCorrected,c,h)}}registerSharedNode(a,c){this.sharedNodes.has(a)||this.sharedNodes.set(a,new z6),this.sharedNodes.get(a).add(c);const d=c.options.initialPromotionConfig;c.promote({transition:d?d.transition:void 0,preserveFollowOpacity:d&&d.shouldPreserveFollowOpacity?d.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:u}={}){const d=this.getStack();d&&d.promote(this,u),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:u}=a;if((u.z||u.rotate||u.rotateX||u.rotateY||u.rotateZ||u.skewX||u.skewY)&&(c=!0),!c)return;const d={};u.z&&Td("z",a,d,this.animationValues);for(let h=0;h<Sd.length;h++)Td(`rotate${Sd[h]}`,a,d,this.animationValues),Td(`skew${Sd[h]}`,a,d,this.animationValues);a.render();for(const h in d)a.setStaticValue(h,d[h]),this.animationValues&&(this.animationValues[h]=d[h]);a.scheduleRender()}getProjectionStyles(a){var c,u;if(!this.instance||this.isSVG)return;if(!this.isVisible)return Y6;const d={visibility:""},h=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,d.opacity="",d.pointerEvents=Ya(a==null?void 0:a.pointerEvents)||"",d.transform=h?h(this.latestValues,""):"none",d;const m=this.getLead();if(!this.projectionDelta||!this.layout||!m.target){const b={};return this.options.layoutId&&(b.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,b.pointerEvents=Ya(a==null?void 0:a.pointerEvents)||""),this.hasProjected&&!oi(this.latestValues)&&(b.transform=h?h({},""):"none",this.hasProjected=!1),b}const g=m.animationValues||m.latestValues;this.applyTransformsToTarget(),d.transform=G6(this.projectionDeltaWithTransform,this.treeScale,g),h&&(d.transform=h(g,d.transform));const{x:y,y:S}=this.projectionDelta;d.transformOrigin=`${y.origin*100}% ${S.origin*100}% 0`,m.animationValues?d.opacity=m===this?(u=(c=g.opacity)!==null&&c!==void 0?c:this.latestValues.opacity)!==null&&u!==void 0?u:1:this.preserveOpacity?this.latestValues.opacity:g.opacityExit:d.opacity=m===this?g.opacity!==void 0?g.opacity:"":g.opacityExit!==void 0?g.opacityExit:0;for(const b in mo){if(g[b]===void 0)continue;const{correct:E,applyTo:w,isCSSVariable:P}=mo[b],O=d.transform==="none"?g[b]:E(g[b],m);if(w){const $=w.length;for(let A=0;A<$;A++)d[w[A]]=O}else P?this.options.visualElement.renderState.vars[b]=O:d[b]=O}return this.options.layoutId&&(d.pointerEvents=m===this?Ya(a==null?void 0:a.pointerEvents)||"":"none"),d}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(ex),this.root.sharedNodes.clear()}}}function q6(e){e.updateLayout()}function K6(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:r,measuredBox:i}=e.layout,{animationType:o}=e.options,a=n.source!==e.layout.source;o==="size"?rn(m=>{const g=a?n.measuredBox[m]:n.layoutBox[m],y=_t(g);g.min=r[m].min,g.max=g.min+y}):ax(o,n.layoutBox,r)&&rn(m=>{const g=a?n.measuredBox[m]:n.layoutBox[m],y=_t(r[m]);g.max=g.min+y,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[m].max=e.relativeTarget[m].min+y)});const c=as();Oo(c,r,n.layoutBox);const u=as();a?Oo(u,e.applyTransform(i,!0),n.measuredBox):Oo(u,r,n.layoutBox);const d=!G1(c);let h=!1;if(!e.resumeFrom){const m=e.getClosestProjectingParent();if(m&&!m.resumeFrom){const{snapshot:g,layout:y}=m;if(g&&y){const S=lt();Mo(S,n.layoutBox,g.layoutBox);const b=lt();Mo(b,r,y.layoutBox),q1(S,b)||(h=!0),m.options.layoutRoot&&(e.relativeTarget=b,e.relativeTargetOrigin=S,e.relativeParent=m)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:u,layoutDelta:c,hasLayoutChanged:d,hasRelativeLayoutChanged:h})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function X6(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 Z6(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function J6(e){e.clearSnapshot()}function ex(e){e.clearMeasurements()}function Q6(e){e.isLayoutDirty=!1}function eR(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function tx(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function tR(e){e.resolveTargetDelta()}function nR(e){e.calcProjection()}function rR(e){e.resetSkewAndRotation()}function iR(e){e.removeLeadSnapshot()}function nx(e,t,n){e.translate=rt(t.translate,0,n),e.scale=rt(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function rx(e,t,n,r){e.min=rt(t.min,n.min,r),e.max=rt(t.max,n.max,r)}function sR(e,t,n,r){rx(e.x,t.x,n.x,r),rx(e.y,t.y,n.y,r)}function oR(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const aR={duration:.45,ease:[.4,0,.1,1]},ix=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),sx=ix("applewebkit/")&&!ix("chrome/")?Math.round:Nt;function ox(e){e.min=sx(e.min),e.max=sx(e.max)}function lR(e){ox(e.x),ox(e.y)}function ax(e,t,n){return e==="position"||e==="preserve-aspect"&&!u6(K1(t),K1(n),.2)}function cR(e){var t;return e!==e.root&&((t=e.scroll)===null||t===void 0?void 0:t.wasRoot)}const uR=Q1({attachResizeListener:(e,t)=>Co(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Ed={current:void 0},lx=Q1({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Ed.current){const e=new uR({});e.mount(window),e.setOptions({layoutScroll:!0}),Ed.current=e}return Ed.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),fR={pan:{Feature:A6},drag:{Feature:P6,ProjectionNode:lx,MeasureLayout:$1}};function dR(e,t,n){var r;if(e instanceof EventTarget)return[e];if(typeof e=="string"){let i=document;const o=(r=void 0)!==null&&r!==void 0?r:i.querySelectorAll(e);return o?Array.from(o):[]}return Array.from(e)}function cx(e,t){const n=dR(e),r=new AbortController,i={passive:!0,...t,signal:r.signal};return[n,i,()=>r.abort()]}function ux(e){return!(e.pointerType==="touch"||s1())}function hR(e,t,n={}){const[r,i,o]=cx(e,n),a=c=>{if(!ux(c))return;const{target:u}=c,d=t(u,c);if(typeof d!="function"||!u)return;const h=m=>{ux(m)&&(d(m),u.removeEventListener("pointerleave",h))};u.addEventListener("pointerleave",h,i)};return r.forEach(c=>{c.addEventListener("pointerenter",a,i)}),o}function fx(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const i="onHover"+n,o=r[i];o&&He.postRender(()=>o(t,Po(t)))}class mR extends Or{mount(){const{current:t}=this.node;t&&(this.unmount=hR(t,(n,r)=>(fx(this.node,r,"Start"),i=>fx(this.node,i,"End"))))}unmount(){}}class pR extends Or{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=To(Co(this.node.current,"focus",()=>this.onFocus()),Co(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const dx=(e,t)=>t?e===t?!0:dx(e,t.parentElement):!1,gR=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function yR(e){return gR.has(e.tagName)||e.tabIndex!==-1}const Io=new WeakSet;function hx(e){return t=>{t.key==="Enter"&&e(t)}}function Cd(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const vR=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=hx(()=>{if(Io.has(n))return;Cd(n,"down");const i=hx(()=>{Cd(n,"up")}),o=()=>Cd(n,"cancel");n.addEventListener("keyup",i,t),n.addEventListener("blur",o,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function mx(e){return pd(e)&&!s1()}function bR(e,t,n={}){const[r,i,o]=cx(e,n),a=c=>{const u=c.currentTarget;if(!mx(c)||Io.has(u))return;Io.add(u);const d=t(u,c),h=(y,S)=>{window.removeEventListener("pointerup",m),window.removeEventListener("pointercancel",g),!(!mx(y)||!Io.has(u))&&(Io.delete(u),typeof d=="function"&&d(y,{success:S}))},m=y=>{h(y,u===window||u===document||n.useGlobalTarget||dx(u,y.target))},g=y=>{h(y,!1)};window.addEventListener("pointerup",m,i),window.addEventListener("pointercancel",g,i)};return r.forEach(c=>{(n.useGlobalTarget?window:c).addEventListener("pointerdown",a,i),c instanceof HTMLElement&&(c.addEventListener("focus",d=>vR(d,i)),!yR(c)&&c.tabIndex===null&&(c.tabIndex=0))}),o}function px(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const i="onTap"+(n==="End"?"":n),o=r[i];o&&He.postRender(()=>o(t,Po(t)))}class xR extends Or{mount(){const{current:t}=this.node;t&&(this.unmount=bR(t,(n,r)=>(px(this.node,r,"Start"),(i,{success:o})=>px(this.node,i,o?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Pd=new WeakMap,Ad=new WeakMap,wR=e=>{const t=Pd.get(e.target);t&&t(e)},SR=e=>{e.forEach(wR)};function TR({root:e,...t}){const n=e||document;Ad.has(n)||Ad.set(n,{});const r=Ad.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(SR,{root:e,...t})),r[i]}function ER(e,t,n){const r=TR(t);return Pd.set(e,n),r.observe(e),()=>{Pd.delete(e),r.unobserve(e)}}const CR={some:0,all:1};class PR extends Or{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:i="some",once:o}=t,a={root:n?n.current:void 0,rootMargin:r,threshold:typeof i=="number"?i:CR[i]},c=u=>{const{isIntersecting:d}=u;if(this.isInView===d||(this.isInView=d,o&&!d&&this.hasEnteredView))return;d&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",d);const{onViewportEnter:h,onViewportLeave:m}=this.node.getProps(),g=d?h:m;g&&g(u)};return ER(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(AR(t,n))&&this.startObserver()}unmount(){}}function AR({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const OR={inView:{Feature:PR},tap:{Feature:xR},focus:{Feature:pR},hover:{Feature:mR}},MR={layout:{ProjectionNode:lx,MeasureLayout:$1}},Od={current:null},gx={current:!1};function _R(){if(gx.current=!0,!!xf)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Od.current=e.matches;e.addListener(t),t()}else Od.current=!1}const IR=[...Nb,Ct,Ar],DR=e=>IR.find(Rb(e)),$R=new WeakMap;function RR(e,t,n){for(const r in t){const i=t[r],o=n[r];if(Et(i))e.addValue(r,i),process.env.NODE_ENV==="development"&&Ba(i.version==="12.6.2",`Attempting to mix Motion versions ${i.version} with 12.6.2 may not work as expected.`);else if(Et(o))e.addValue(r,vo(i,{owner:e}));else if(o!==i)if(e.hasValue(r)){const a=e.getValue(r);a.liveStyle===!0?a.jump(i):a.hasAnimated||a.set(i)}else{const a=e.getStaticValue(r);e.addValue(r,vo(a!==void 0?a:i,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const yx=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class NR{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:i,blockInitialAnimation:o,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=sd,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 y=Nn.now();this.renderScheduledAt<y&&(this.renderScheduledAt=y,He.render(this.render,!1,!0))};const{latestValues:u,renderState:d,onUpdate:h}=a;this.onUpdate=h,this.latestValues=u,this.baseTarget={...u},this.initialValues=n.initial?{...u}:{},this.renderState=d,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.options=c,this.blockInitialAnimation=!!o,this.isControllingVariants=za(n),this.isVariantNode=$v(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:m,...g}=this.scrapeMotionValuesFromProps(n,{},this);for(const y in g){const S=g[y];u[y]!==void 0&&Et(S)&&S.set(u[y],!1)}}mount(t){this.current=t,$R.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,r)=>this.bindToMotionValue(r,n)),gx.current||_R(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Od.current,process.env.NODE_ENV!=="production"&&Ba(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(),Cr(this.notifyUpdate),Cr(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 r=ti.has(t);r&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",c=>{this.latestValues[t]=c,this.props.onUpdate&&He.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),o=n.on("renderRequest",this.scheduleRender);let a;window.MotionCheckAppearSync&&(a=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{i(),o(),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 es){const n=es[t];if(!n)continue;const{isEnabled:r,Feature:i}=n;if(!this.features[t]&&i&&r(this.props)&&(this.features[t]=new i(this)),this.features[t]){const o=this.features[t];o.isMounted?o.update():(o.mount(),o.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):lt()}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 r=0;r<yx.length;r++){const i=yx[r];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const o="on"+i,a=t[o];a&&(this.propEventSubscriptions[i]=this.on(i,a))}this.prevMotionValues=RR(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 r=this.values.get(t);n!==r&&(r&&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 r=this.values.get(t);return r===void 0&&n!==void 0&&(r=vo(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){var r;let i=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(r=this.getBaseTargetFromProps(this.props,t))!==null&&r!==void 0?r:this.readValueFromInstance(this.current,t,this.options);return i!=null&&(typeof i=="string"&&(Db(i)||gb(i))?i=parseFloat(i):!DR(i)&&Ar.test(n)&&(i=Eb(t,n)),this.setBaseTarget(t,Et(i)?i.get():i)),Et(i)?i.get():i}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:r}=this.props;let i;if(typeof r=="string"||typeof r=="object"){const a=Nf(this.props,r,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);a&&(i=a[t])}if(r&&i!==void 0)return i;const o=this.getBaseTargetFromProps(this.props,t);return o!==void 0&&!Et(o)?o:this.initialValues[t]!==void 0&&i===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Bf),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class vx extends NR{constructor(){super(...arguments),this.KeyframeResolver=kb}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:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;Et(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function LR(e){return window.getComputedStyle(e)}class kR extends vx{constructor(){super(...arguments),this.type="html",this.renderInstance=Kv}readValueFromInstance(t,n){if(ti.has(n))return W$(t,n);{const r=LR(t),i=(Af(n)?r.getPropertyValue(n):r[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return w1(t,n)}build(t,n,r){_f(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return kf(t,n,r)}}class jR extends vx{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=lt,this.updateDimensions=()=>{this.current&&!this.renderState.dimensions&&qv(this.current,this.renderState)}}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(ti.has(n)){const r=Tb(n);return r&&r.default||0}return n=Xv.has(n)?n:Pf(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return Jv(t,n,r)}onBindTransform(){this.current&&!this.renderState.dimensions&&He.postRender(this.updateDimensions)}build(t,n,r){$f(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,i){Zv(t,n,r,i)}mount(t){this.isSVGTag=Rf(t.tagName),super.mount(t)}}const FR=(e,t)=>Df(e)?new jR(t):new kR(t,{allowProjection:e!==I.Fragment}),VR=a$({...t6,...OR,...fR,...MR},FR),Ze=ED(VR),Md={defaultColorScheme:"aqua",t:e=>e},bx=I.createContext(Md),ze=()=>I.useContext(bx),xx=({title:e,description:t,open:n,onClose:r,onConfirm:i,onCancel:o})=>{const{t:a}=ze(),c={hidden:{opacity:0},visible:{opacity:1}},u={hidden:{opacity:0,scale:.8,y:-20},visible:{opacity:1,scale:1,y:0,transition:{type:"spring",stiffness:300,damping:25}},exit:{opacity:0,scale:.8,y:20,transition:{duration:.2}}},d=()=>{i(),r()},h=()=>{o(),r()};return v.jsx(Kn,{children:n&&v.jsx(v.Fragment,{children:v.jsx(Ze.div,{className:"fixed inset-0 bg-black/50 z-9999 flex items-center justify-center",initial:"hidden",animate:"visible",exit:"hidden",variants:c,onClick:r,children:v.jsx(Ze.div,{className:"w-full max-w-4xl mx-16 z-50",variants:u,initial:"hidden",animate:"visible",exit:"exit",onClick:m=>m.stopPropagation(),children:v.jsxs(bs,{className:"flex flex-col gap-16 p-32",children:[v.jsxs("div",{className:"flex justify-between items-center gap-16",children:[v.jsx("h3",{className:"text-black font-700 text-3xl",children:e}),v.jsx(De,{icon:tu,className:"cursor-pointer text-2xl text-gray-500 transition-all duration-300 hover:text-gray-700",onClick:r})]}),v.jsx("p",{className:"text-gray-500 text-xl font-600",children:t}),v.jsxs("div",{className:"flex justify-end w-full gap-16",children:[v.jsx(jo,{onClick:h,variant:"transparent",className:"px-24 py-10! text-lg!",children:a("cancel")}),v.jsx(jo,{onClick:d,className:"px-24 py-16 text-lg!",children:a("confirm")})]})]})})})})})};/*!
659
+ `),()=>{document.head.removeChild(y)}},[t]),v.jsx(hD,{isPresent:t,childRef:i,sizeRef:o,children:Z.cloneElement(e,{ref:i})})}const pD=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:o,mode:a,anchorX:c})=>{const u=bf(gD),d=I.useId(),h=I.useCallback(g=>{u.set(g,!0);for(const y of u.values())if(!y)return;r&&r()},[u,r]),m=I.useMemo(()=>({id:d,initial:t,isPresent:n,custom:i,onExitComplete:h,register:g=>(u.set(g,!1),()=>u.delete(g))}),o?[Math.random(),h]:[n,h]);return I.useMemo(()=>{u.forEach((g,y)=>u.set(y,!1))},[n]),Z.useEffect(()=>{!n&&!u.size&&r&&r()},[n]),a==="popLayout"&&(e=v.jsx(mD,{isPresent:n,anchorX:c,children:e})),v.jsx(ka.Provider,{value:m,children:e})};function gD(){return new Map}function Cv(e=!0){const t=I.useContext(ka);if(t===null)return[!0,null];const{isPresent:n,onExitComplete:r,register:i}=t,o=I.useId();I.useEffect(()=>{if(e)return i(o)},[e]);const a=I.useCallback(()=>e&&r&&r(o),[o,r,e]);return!n&&r?[!1,a]:[!0]}const ja=e=>e.key||"";function Pv(e){const t=[];return I.Children.forEach(e,n=>{I.isValidElement(n)&&t.push(n)}),t}const Kn=({children:e,custom:t,initial:n=!0,onExitComplete:r,presenceAffectsLayout:i=!0,mode:o="sync",propagate:a=!1,anchorX:c="left"})=>{const[u,d]=Cv(a),h=I.useMemo(()=>Pv(e),[e]),m=a&&!u?[]:h.map(ja),g=I.useRef(!0),y=I.useRef(h),S=bf(()=>new Map),[b,E]=I.useState(h),[w,P]=I.useState(h);Ev(()=>{g.current=!1,y.current=h;for(let A=0;A<w.length;A++){const R=ja(w[A]);m.includes(R)?S.delete(R):S.get(R)!==!0&&S.set(R,!1)}},[w,m.length,m.join("-")]);const O=[];if(h!==b){let A=[...h];for(let R=0;R<w.length;R++){const V=w[R],F=ja(V);m.includes(F)||(A.splice(R,0,V),O.push(V))}return o==="wait"&&O.length&&(A=O),P(Pv(A)),E(h),null}process.env.NODE_ENV!=="production"&&o==="wait"&&w.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.useContext(vf);return v.jsx(v.Fragment,{children:w.map(A=>{const R=ja(A),V=a&&!u?!1:h===w||m.includes(R),F=()=>{if(S.has(R))S.set(R,!0);else return;let Y=!0;S.forEach(Q=>{Q||(Y=!1)}),Y&&($==null||$(),P(y.current),a&&(d==null||d()),r&&r())};return v.jsx(pD,{isPresent:V,initial:!g.current||n?void 0:!1,custom:t,presenceAffectsLayout:i,mode:o,onExitComplete:V?void 0:F,anchorX:c,children:A},R)})})},Nt=e=>e;let Qi=Nt,Er=Nt;process.env.NODE_ENV!=="production"&&(Qi=(e,t)=>{!e&&typeof console<"u"&&console.warn(t)},Er=(e,t)=>{if(!e)throw new Error(t)});const yD={useManualTiming:!1},Fa=["read","resolveKeyframes","update","preRender","render","postRender"],Av={value:null};function vD(e,t){let n=new Set,r=new Set,i=!1,o=!1;const a=new WeakSet;let c={delta:0,timestamp:0,isProcessing:!1},u=0;function d(m){a.has(m)&&(h.schedule(m),e()),u++,m(c)}const h={schedule:(m,g=!1,y=!1)=>{const b=y&&i?n:r;return g&&a.add(m),b.has(m)||b.add(m),m},cancel:m=>{r.delete(m),a.delete(m)},process:m=>{if(c=m,i){o=!0;return}i=!0,[n,r]=[r,n],n.forEach(d),t&&Av.value&&Av.value.frameloop[t].push(u),u=0,n.clear(),i=!1,o&&(o=!1,h.process(m))}};return h}const bD=40;function Ov(e,t){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,a=Fa.reduce((w,P)=>(w[P]=vD(o,t?P:void 0),w),{}),{read:c,resolveKeyframes:u,update:d,preRender:h,render:m,postRender:g}=a,y=()=>{const w=performance.now();n=!1,i.delta=r?1e3/60:Math.max(Math.min(w-i.timestamp,bD),1),i.timestamp=w,i.isProcessing=!0,c.process(i),u.process(i),d.process(i),h.process(i),m.process(i),g.process(i),i.isProcessing=!1,n&&t&&(r=!1,e(y))},S=()=>{n=!0,r=!0,i.isProcessing||e(y)};return{schedule:Fa.reduce((w,P)=>{const O=a[P];return w[P]=($,A=!1,R=!1)=>(n||S(),O.schedule($,A,R)),w},{}),cancel:w=>{for(let P=0;P<Fa.length;P++)a[Fa[P]].cancel(w)},state:i,steps:a}}const{schedule:He,cancel:Cr,state:vt,steps:Sf}=Ov(typeof requestAnimationFrame<"u"?requestAnimationFrame:Nt,!0),Mv=I.createContext({strict:!1}),_v={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},es={};for(const e in _v)es[e]={isEnabled:t=>_v[e].some(n=>!!t[n])};function xD(e){for(const t in e)es[t]={...es[t],...e[t]}}const wD=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 Va(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||wD.has(e)}let Iv=e=>!Va(e);function SD(e){e&&(Iv=t=>t.startsWith("on")?!Va(t):e(t))}try{SD(require("@emotion/is-prop-valid").default)}catch{}function TD(e,t,n){const r={};for(const i in e)i==="values"&&typeof e.values=="object"||(Iv(i)||n===!0&&Va(i)||!t&&!Va(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}const Dv=new Set;function Ba(e,t,n){e||Dv.has(t)||(console.warn(t),Dv.add(t))}function ED(e){if(typeof Proxy>"u")return e;const t=new Map,n=(...r)=>(process.env.NODE_ENV!=="production"&&Ba(!1,"motion() is deprecated. Use motion.create() instead."),e(...r));return new Proxy(n,{get:(r,i)=>i==="create"?e:(t.has(i)||t.set(i,e(i)),t.get(i))})}const Wa=I.createContext({});function Ua(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function ho(e){return typeof e=="string"||Array.isArray(e)}const Tf=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Ef=["initial",...Tf];function za(e){return Ua(e.animate)||Ef.some(t=>ho(e[t]))}function $v(e){return!!(za(e)||e.variants)}function CD(e,t){if(za(e)){const{initial:n,animate:r}=e;return{initial:n===!1||ho(n)?n:void 0,animate:ho(r)?r:void 0}}return e.inherit!==!1?t:{}}function PD(e){const{initial:t,animate:n}=CD(e,I.useContext(Wa));return I.useMemo(()=>({initial:t,animate:n}),[Rv(t),Rv(n)])}function Rv(e){return Array.isArray(e)?e.join(" "):e}const AD=Symbol.for("motionComponentSymbol");function ts(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function OD(e,t,n){return I.useCallback(r=>{r&&e.onMount&&e.onMount(r),t&&(r?t.mount(r):t.unmount()),n&&(typeof n=="function"?n(r):ts(n)&&(n.current=r))},[t])}const{schedule:Cf}=Ov(queueMicrotask,!1),Pf=e=>e.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),Nv="data-"+Pf("framerAppearId"),Lv=I.createContext({});function MD(e,t,n,r,i){var o,a;const{visualElement:c}=I.useContext(Wa),u=I.useContext(Mv),d=I.useContext(ka),h=I.useContext(wf).reducedMotion,m=I.useRef(null);r=r||u.renderer,!m.current&&r&&(m.current=r(e,{visualState:t,parent:c,props:n,presenceContext:d,blockInitialAnimation:d?d.initial===!1:!1,reducedMotionConfig:h}));const g=m.current,y=I.useContext(Lv);g&&!g.projection&&i&&(g.type==="html"||g.type==="svg")&&_D(m.current,n,i,y);const S=I.useRef(!1);I.useInsertionEffect(()=>{g&&S.current&&g.update(n,d)});const b=n[Nv],E=I.useRef(!!b&&!(!((o=window.MotionHandoffIsComplete)===null||o===void 0)&&o.call(window,b))&&((a=window.MotionHasOptimisedAnimation)===null||a===void 0?void 0:a.call(window,b)));return Ev(()=>{g&&(S.current=!0,window.MotionIsMounted=!0,g.updateFeatures(),Cf.render(g.render),E.current&&g.animationState&&g.animationState.animateChanges())}),I.useEffect(()=>{g&&(!E.current&&g.animationState&&g.animationState.animateChanges(),E.current&&(queueMicrotask(()=>{var w;(w=window.MotionHandoffMarkAsComplete)===null||w===void 0||w.call(window,b)}),E.current=!1))}),g}function _D(e,t,n,r){const{layoutId:i,layout:o,drag:a,dragConstraints:c,layoutScroll:u,layoutRoot:d}=t;e.projection=new n(e.latestValues,t["data-framer-portal-id"]?void 0:kv(e.parent)),e.projection.setOptions({layoutId:i,layout:o,alwaysMeasureLayout:!!a||c&&ts(c),visualElement:e,animationType:typeof o=="string"?o:"both",initialPromotionConfig:r,layoutScroll:u,layoutRoot:d})}function kv(e){if(e)return e.options.allowProjection!==!1?e.projection:kv(e.parent)}function ID({preloadedFeatures:e,createVisualElement:t,useRender:n,useVisualState:r,Component:i}){var o,a;e&&xD(e);function c(d,h){let m;const g={...I.useContext(wf),...d,layoutId:DD(d)},{isStatic:y}=g,S=PD(d),b=r(d,y);if(!y&&xf){$D(g,e);const E=RD(g);m=E.MeasureLayout,S.visualElement=MD(i,b,g,t,E.ProjectionNode)}return v.jsxs(Wa.Provider,{value:S,children:[m&&S.visualElement?v.jsx(m,{visualElement:S.visualElement,...g}):null,n(i,d,OD(b,S.visualElement,h),b,y,S.visualElement)]})}c.displayName=`motion.${typeof i=="string"?i:`create(${(a=(o=i.displayName)!==null&&o!==void 0?o:i.name)!==null&&a!==void 0?a:""})`}`;const u=I.forwardRef(c);return u[AD]=i,u}function DD({layoutId:e}){const t=I.useContext(vf).id;return t&&e!==void 0?t+"-"+e:e}function $D(e,t){const n=I.useContext(Mv).strict;if(process.env.NODE_ENV!=="production"&&t&&n){const r="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";e.ignoreStrict?Qi(!1,r):Er(!1,r)}}function RD(e){const{drag:t,layout:n}=es;if(!t&&!n)return{};const r={...t,...n};return{MeasureLayout:t!=null&&t.isEnabled(e)||n!=null&&n.isEnabled(e)?r.MeasureLayout:void 0,ProjectionNode:r.ProjectionNode}}const jv=e=>t=>typeof t=="string"&&t.startsWith(e),Af=jv("--"),ND=jv("var(--"),Of=e=>ND(e)?LD.test(e.split("/*")[0].trim()):!1,LD=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,mo={};function kD(e){for(const t in e)mo[t]=e[t],Af(t)&&(mo[t].isCSSVariable=!0)}const ns=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],ti=new Set(ns);function Fv(e,{layout:t,layoutId:n}){return ti.has(e)||e.startsWith("origin")||(t||n!==void 0)&&(!!mo[e]||e==="opacity")}const Et=e=>!!(e&&e.getVelocity),Vv=(e,t)=>t&&typeof e=="number"?t.transform(e):e,Xn=(e,t,n)=>n>t?t:n<e?e:n,rs={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},po={...rs,transform:e=>Xn(0,1,e)},Ga={...rs,default:1},go=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Pr=go("deg"),Rn=go("%"),Se=go("px"),jD=go("vh"),FD=go("vw"),Bv={...Rn,parse:e=>Rn.parse(e)/100,transform:e=>Rn.transform(e*100)},VD={borderWidth:Se,borderTopWidth:Se,borderRightWidth:Se,borderBottomWidth:Se,borderLeftWidth:Se,borderRadius:Se,radius:Se,borderTopLeftRadius:Se,borderTopRightRadius:Se,borderBottomRightRadius:Se,borderBottomLeftRadius:Se,width:Se,maxWidth:Se,height:Se,maxHeight:Se,top:Se,right:Se,bottom:Se,left:Se,padding:Se,paddingTop:Se,paddingRight:Se,paddingBottom:Se,paddingLeft:Se,margin:Se,marginTop:Se,marginRight:Se,marginBottom:Se,marginLeft:Se,backgroundPositionX:Se,backgroundPositionY:Se},BD={rotate:Pr,rotateX:Pr,rotateY:Pr,rotateZ:Pr,scale:Ga,scaleX:Ga,scaleY:Ga,scaleZ:Ga,skew:Pr,skewX:Pr,skewY:Pr,distance:Se,translateX:Se,translateY:Se,translateZ:Se,x:Se,y:Se,z:Se,perspective:Se,transformPerspective:Se,opacity:po,originX:Bv,originY:Bv,originZ:Se},Wv={...rs,transform:Math.round},Mf={...VD,...BD,zIndex:Wv,size:Se,fillOpacity:po,strokeOpacity:po,numOctaves:Wv},WD={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},UD=ns.length;function zD(e,t,n){let r="",i=!0;for(let o=0;o<UD;o++){const a=ns[o],c=e[a];if(c===void 0)continue;let u=!0;if(typeof c=="number"?u=c===(a.startsWith("scale")?1:0):u=parseFloat(c)===0,!u||n){const d=Vv(c,Mf[a]);if(!u){i=!1;const h=WD[a]||a;r+=`${h}(${d}) `}n&&(t[a]=d)}}return r=r.trim(),n?r=n(t,i?"":r):i&&(r="none"),r}function _f(e,t,n){const{style:r,vars:i,transformOrigin:o}=e;let a=!1,c=!1;for(const u in t){const d=t[u];if(ti.has(u)){a=!0;continue}else if(Af(u)){i[u]=d;continue}else{const h=Vv(d,Mf[u]);u.startsWith("origin")?(c=!0,o[u]=h):r[u]=h}}if(t.transform||(a||n?r.transform=zD(t,e.transform,n):r.transform&&(r.transform="none")),c){const{originX:u="50%",originY:d="50%",originZ:h=0}=o;r.transformOrigin=`${u} ${d} ${h}`}}const If=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function Uv(e,t,n){for(const r in t)!Et(t[r])&&!Fv(r,n)&&(e[r]=t[r])}function GD({transformTemplate:e},t){return I.useMemo(()=>{const n=If();return _f(n,t,e),Object.assign({},n.vars,n.style)},[t])}function YD(e,t){const n=e.style||{},r={};return Uv(r,n,e),Object.assign(r,GD(e,t)),r}function HD(e,t){const n={},r=YD(e,t);return e.drag&&e.dragListener!==!1&&(n.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.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=r,n}const qD=["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 Df(e){return typeof e!="string"||e.includes("-")?!1:!!(qD.indexOf(e)>-1||/[A-Z]/u.test(e))}const KD={offset:"stroke-dashoffset",array:"stroke-dasharray"},XD={offset:"strokeDashoffset",array:"strokeDasharray"};function ZD(e,t,n=1,r=0,i=!0){e.pathLength=1;const o=i?KD:XD;e[o.offset]=Se.transform(-r);const a=Se.transform(t),c=Se.transform(n);e[o.array]=`${a} ${c}`}function zv(e,t,n){return typeof e=="string"?e:Se.transform(t+n*e)}function JD(e,t,n){const r=zv(t,e.x,e.width),i=zv(n,e.y,e.height);return`${r} ${i}`}function $f(e,{attrX:t,attrY:n,attrScale:r,originX:i,originY:o,pathLength:a,pathSpacing:c=1,pathOffset:u=0,...d},h,m){if(_f(e,d,m),h){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:g,style:y,dimensions:S}=e;g.transform&&(S&&(y.transform=g.transform),delete g.transform),S&&(i!==void 0||o!==void 0||y.transform)&&(y.transformOrigin=JD(S,i!==void 0?i:.5,o!==void 0?o:.5)),t!==void 0&&(g.x=t),n!==void 0&&(g.y=n),r!==void 0&&(g.scale=r),a!==void 0&&ZD(g,a,c,u,!1)}const Gv=()=>({...If(),attrs:{}}),Rf=e=>typeof e=="string"&&e.toLowerCase()==="svg";function QD(e,t,n,r){const i=I.useMemo(()=>{const o=Gv();return $f(o,t,Rf(r),e.transformTemplate),{...o.attrs,style:{...o.style}}},[t]);if(e.style){const o={};Uv(o,e.style,e),i.style={...o,...i.style}}return i}function e$(e=!1){return(n,r,i,{latestValues:o},a)=>{const u=(Df(n)?QD:HD)(r,o,a,n),d=TD(r,typeof n=="string",e),h=n!==I.Fragment?{...d,...u,ref:i}:{},{children:m}=r,g=I.useMemo(()=>Et(m)?m.get():m,[m]);return I.createElement(n,{...h,children:g})}}function Yv(e){const t=[{},{}];return e==null||e.values.forEach((n,r)=>{t[0][r]=n.get(),t[1][r]=n.getVelocity()}),t}function Nf(e,t,n,r){if(typeof t=="function"){const[i,o]=Yv(r);t=t(n!==void 0?n:e.custom,i,o)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){const[i,o]=Yv(r);t=t(n!==void 0?n:e.custom,i,o)}return t}const Lf=e=>Array.isArray(e),t$=e=>!!(e&&typeof e=="object"&&e.mix&&e.toValue),n$=e=>Lf(e)?e[e.length-1]||0:e;function Ya(e){const t=Et(e)?e.get():e;return t$(t)?t.toValue():t}function r$({scrapeMotionValuesFromProps:e,createRenderState:t,onUpdate:n},r,i,o){const a={latestValues:i$(r,i,o,e),renderState:t()};return n&&(a.onMount=c=>n({props:r,current:c,...a}),a.onUpdate=c=>n(c)),a}const Hv=e=>(t,n)=>{const r=I.useContext(Wa),i=I.useContext(ka),o=()=>r$(e,t,r,i);return n?o():bf(o)};function i$(e,t,n,r){const i={},o=r(e,{});for(const g in o)i[g]=Ya(o[g]);let{initial:a,animate:c}=e;const u=za(e),d=$v(e);t&&d&&!u&&e.inherit!==!1&&(a===void 0&&(a=t.initial),c===void 0&&(c=t.animate));let h=n?n.initial===!1:!1;h=h||a===!1;const m=h?c:a;if(m&&typeof m!="boolean"&&!Ua(m)){const g=Array.isArray(m)?m:[m];for(let y=0;y<g.length;y++){const S=Nf(e,g[y]);if(S){const{transitionEnd:b,transition:E,...w}=S;for(const P in w){let O=w[P];if(Array.isArray(O)){const $=h?O.length-1:0;O=O[$]}O!==null&&(i[P]=O)}for(const P in b)i[P]=b[P]}}}return i}function kf(e,t,n){var r;const{style:i}=e,o={};for(const a in i)(Et(i[a])||t.style&&Et(t.style[a])||Fv(a,e)||((r=n==null?void 0:n.getValue(a))===null||r===void 0?void 0:r.liveStyle)!==void 0)&&(o[a]=i[a]);return o}const s$={useVisualState:Hv({scrapeMotionValuesFromProps:kf,createRenderState:If})};function qv(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 Kv(e,{style:t,vars:n},r,i){Object.assign(e.style,t,i&&i.getProjectionStyles(r));for(const o in n)e.style.setProperty(o,n[o])}const Xv=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 Zv(e,t,n,r){Kv(e,t,void 0,r);for(const i in t.attrs)e.setAttribute(Xv.has(i)?i:Pf(i),t.attrs[i])}function Jv(e,t,n){const r=kf(e,t,n);for(const i in e)if(Et(e[i])||Et(t[i])){const o=ns.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;r[o]=e[i]}return r}const Qv=["x","y","width","height","cx","cy","r"],o$={useVisualState:Hv({scrapeMotionValuesFromProps:Jv,createRenderState:Gv,onUpdate:({props:e,prevProps:t,current:n,renderState:r,latestValues:i})=>{if(!n)return;let o=!!e.drag;if(!o){for(const c in i)if(ti.has(c)){o=!0;break}}if(!o)return;let a=!t;if(t)for(let c=0;c<Qv.length;c++){const u=Qv[c];e[u]!==t[u]&&(a=!0)}a&&He.read(()=>{qv(n,r),He.render(()=>{$f(r,i,Rf(n.tagName),e.transformTemplate),Zv(n,r)})})}})};function a$(e,t){return function(r,{forwardMotionProps:i}={forwardMotionProps:!1}){const a={...Df(r)?o$:s$,preloadedFeatures:e,useRender:e$(i),createVisualElement:t,Component:r};return ID(a)}}function yo(e,t,n){const r=e.getProps();return Nf(r,t,n!==void 0?n:r.custom,e)}function jf(e,t){return e?e[t]||e.default||e:void 0}const eb=new Set(["width","height","top","left","right","bottom",...ns]);function Ff(e,t){e.indexOf(t)===-1&&e.push(t)}function Vf(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class Bf{constructor(){this.subscriptions=[]}add(t){return Ff(this.subscriptions,t),()=>Vf(this.subscriptions,t)}notify(t,n,r){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](t,n,r);else for(let o=0;o<i;o++){const a=this.subscriptions[o];a&&a(t,n,r)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}function tb(e,t){return t?e*(1e3/t):0}let Ha;function l$(){Ha=void 0}const Nn={now:()=>(Ha===void 0&&Nn.set(vt.isProcessing||yD.useManualTiming?vt.timestamp:performance.now()),Ha),set:e=>{Ha=e,queueMicrotask(l$)}},nb=30,c$=e=>!isNaN(parseFloat(e));class u${constructor(t,n={}){this.version="12.6.1",this.canTrackVelocity=null,this.events={},this.updateAndNotify=(r,i=!0)=>{const o=Nn.now();this.updatedAt!==o&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(r),this.current!==this.prev&&this.events.change&&this.events.change.notify(this.current),i&&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=Nn.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=c$(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return process.env.NODE_ENV!=="production"&&Ba(!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 Bf);const r=this.events[t].add(n);return t==="change"?()=>{r(),He.read(()=>{this.events.change.getSize()||this.stop()})}:r}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,r){this.set(n),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-r}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=Nn.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>nb)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,nb);return tb(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 vo(e,t){return new u$(e,t)}function f$(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,vo(n))}function d$(e,t){const n=yo(e,t);let{transitionEnd:r={},transition:i={},...o}=n||{};o={...o,...r};for(const a in o){const c=n$(o[a]);f$(e,a,c)}}function h$(e){return!!(Et(e)&&e.add)}function Wf(e,t){const n=e.getValue("willChange");if(h$(n))return n.add(t)}function rb(e){return e.props[Nv]}function Uf(e){let t;return()=>(t===void 0&&(t=e()),t)}const m$=Uf(()=>window.ScrollTimeline!==void 0);class p${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 r=0;r<this.animations.length;r++)this.animations[r][t]=n}attachTimeline(t,n){const r=this.animations.map(i=>{if(m$()&&i.attachTimeline)return i.attachTimeline(t);if(typeof n=="function")return n(i)});return()=>{r.forEach((i,o)=>{i&&i(),this.animations[o].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 g$ extends p${then(t,n){return Promise.all(this.animations).then(t).catch(n)}}const Ln=e=>e*1e3,Zn=e=>e/1e3;function zf(e){return typeof e=="function"}function ib(e,t){e.timeline=t,e.onfinish=null}const Gf=e=>Array.isArray(e)&&typeof e[0]=="number",y$={linearEasing:void 0};function v$(e,t){const n=Uf(e);return()=>{var r;return(r=y$[t])!==null&&r!==void 0?r:n()}}const qa=v$(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),is=(e,t,n)=>{const r=t-e;return r===0?1:(n-e)/r},sb=(e,t,n=10)=>{let r="";const i=Math.max(Math.round(t/n),2);for(let o=0;o<i;o++)r+=e(is(0,i-1,o))+", ";return`linear(${r.substring(0,r.length-2)})`};function ob(e){return!!(typeof e=="function"&&qa()||!e||typeof e=="string"&&(e in Yf||qa())||Gf(e)||Array.isArray(e)&&e.every(ob))}const bo=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,Yf={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:bo([0,.65,.55,1]),circOut:bo([.55,0,1,.45]),backIn:bo([.31,.01,.66,-.59]),backOut:bo([.33,1.53,.69,.99])};function ab(e,t){if(e)return typeof e=="function"&&qa()?sb(e,t):Gf(e)?bo(e):Array.isArray(e)?e.map(n=>ab(n,t)||Yf.easeOut):Yf[e]}const lb=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e,b$=1e-7,x$=12;function w$(e,t,n,r,i){let o,a,c=0;do a=t+(n-t)/2,o=lb(a,r,i)-e,o>0?n=a:t=a;while(Math.abs(o)>b$&&++c<x$);return a}function xo(e,t,n,r){if(e===t&&n===r)return Nt;const i=o=>w$(o,0,1,e,n);return o=>o===0||o===1?o:lb(i(o),t,r)}const cb=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,ub=e=>t=>1-e(1-t),fb=xo(.33,1.53,.69,.99),Hf=ub(fb),db=cb(Hf),hb=e=>(e*=2)<1?.5*Hf(e):.5*(2-Math.pow(2,-10*(e-1))),qf=e=>1-Math.sin(Math.acos(e)),mb=ub(qf),pb=cb(qf),gb=e=>/^0[^.\s]+$/u.test(e);function S$(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||gb(e):!0}const wo=e=>Math.round(e*1e5)/1e5,Kf=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function T$(e){return e==null}const E$=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,Xf=(e,t)=>n=>!!(typeof n=="string"&&E$.test(n)&&n.startsWith(e)||t&&!T$(n)&&Object.prototype.hasOwnProperty.call(n,t)),yb=(e,t,n)=>r=>{if(typeof r!="string")return r;const[i,o,a,c]=r.match(Kf);return{[e]:parseFloat(i),[t]:parseFloat(o),[n]:parseFloat(a),alpha:c!==void 0?parseFloat(c):1}},C$=e=>Xn(0,255,e),Zf={...rs,transform:e=>Math.round(C$(e))},ni={test:Xf("rgb","red"),parse:yb("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Zf.transform(e)+", "+Zf.transform(t)+", "+Zf.transform(n)+", "+wo(po.transform(r))+")"};function P$(e){let t="",n="",r="",i="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}}const Jf={test:Xf("#"),parse:P$,transform:ni.transform},ss={test:Xf("hsl","hue"),parse:yb("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Rn.transform(wo(t))+", "+Rn.transform(wo(n))+", "+wo(po.transform(r))+")"},Ct={test:e=>ni.test(e)||Jf.test(e)||ss.test(e),parse:e=>ni.test(e)?ni.parse(e):ss.test(e)?ss.parse(e):Jf.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?ni.transform(e):ss.transform(e)},A$=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function O$(e){var t,n;return isNaN(e)&&typeof e=="string"&&(((t=e.match(Kf))===null||t===void 0?void 0:t.length)||0)+(((n=e.match(A$))===null||n===void 0?void 0:n.length)||0)>0}const vb="number",bb="color",M$="var",_$="var(",xb="${}",I$=/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 So(e){const t=e.toString(),n=[],r={color:[],number:[],var:[]},i=[];let o=0;const c=t.replace(I$,u=>(Ct.test(u)?(r.color.push(o),i.push(bb),n.push(Ct.parse(u))):u.startsWith(_$)?(r.var.push(o),i.push(M$),n.push(u)):(r.number.push(o),i.push(vb),n.push(parseFloat(u))),++o,xb)).split(xb);return{values:n,split:c,indexes:r,types:i}}function wb(e){return So(e).values}function Sb(e){const{split:t,types:n}=So(e),r=t.length;return i=>{let o="";for(let a=0;a<r;a++)if(o+=t[a],i[a]!==void 0){const c=n[a];c===vb?o+=wo(i[a]):c===bb?o+=Ct.transform(i[a]):o+=i[a]}return o}}const D$=e=>typeof e=="number"?0:e;function $$(e){const t=wb(e);return Sb(e)(t.map(D$))}const Ar={test:O$,parse:wb,createTransformer:Sb,getAnimatableNone:$$},R$=new Set(["brightness","contrast","saturate","opacity"]);function N$(e){const[t,n]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[r]=n.match(Kf)||[];if(!r)return e;const i=n.replace(r,"");let o=R$.has(t)?1:0;return r!==n&&(o*=100),t+"("+o+i+")"}const L$=/\b([a-z-]*)\(.*?\)/gu,Qf={...Ar,getAnimatableNone:e=>{const t=e.match(L$);return t?t.map(N$).join(" "):e}},k$={...Mf,color:Ct,backgroundColor:Ct,outlineColor:Ct,fill:Ct,stroke:Ct,borderColor:Ct,borderTopColor:Ct,borderRightColor:Ct,borderBottomColor:Ct,borderLeftColor:Ct,filter:Qf,WebkitFilter:Qf},Tb=e=>k$[e];function Eb(e,t){let n=Tb(e);return n!==Qf&&(n=Ar),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const j$=new Set(["auto","none","0"]);function F$(e,t,n){let r=0,i;for(;r<e.length&&!i;){const o=e[r];typeof o=="string"&&!j$.has(o)&&So(o).values.length&&(i=e[r]),r++}if(i&&n)for(const o of t)e[o]=Eb(n,i)}const ri=e=>e*180/Math.PI,ed=e=>{const t=ri(Math.atan2(e[1],e[0]));return td(t)},V$={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:ed,rotateZ:ed,skewX:e=>ri(Math.atan(e[1])),skewY:e=>ri(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},td=e=>(e=e%360,e<0&&(e+=360),e),Cb=ed,Pb=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),Ab=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),B$={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Pb,scaleY:Ab,scale:e=>(Pb(e)+Ab(e))/2,rotateX:e=>td(ri(Math.atan2(e[6],e[5]))),rotateY:e=>td(ri(Math.atan2(-e[2],e[0]))),rotateZ:Cb,rotate:Cb,skewX:e=>ri(Math.atan(e[4])),skewY:e=>ri(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function Ob(e){return e.includes("scale")?1:0}function nd(e,t){if(!e||e==="none")return Ob(t);const n=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let r,i;if(n)r=B$,i=n;else{const c=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);r=V$,i=c}if(!i)return Ob(t);const o=r[t],a=i[1].split(",").map(U$);return typeof o=="function"?o(a):a[o]}const W$=(e,t)=>{const{transform:n="none"}=getComputedStyle(e);return nd(n,t)};function U$(e){return parseFloat(e.trim())}const Mb=e=>e===rs||e===Se,z$=new Set(["x","y","z"]),G$=ns.filter(e=>!z$.has(e));function Y$(e){const t=[];return G$.forEach(n=>{const r=e.getValue(n);r!==void 0&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))}),t}const os={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>nd(t,"x"),y:(e,{transform:t})=>nd(t,"y")};os.translateX=os.x,os.translateY=os.y;const ii=new Set;let rd=!1,id=!1;function _b(){if(id){const e=Array.from(ii).filter(r=>r.needsMeasurement),t=new Set(e.map(r=>r.element)),n=new Map;t.forEach(r=>{const i=Y$(r);i.length&&(n.set(r,i),r.render())}),e.forEach(r=>r.measureInitialState()),t.forEach(r=>{r.render();const i=n.get(r);i&&i.forEach(([o,a])=>{var c;(c=r.getValue(o))===null||c===void 0||c.set(a)})}),e.forEach(r=>r.measureEndState()),e.forEach(r=>{r.suspendedScrollY!==void 0&&window.scrollTo(0,r.suspendedScrollY)})}id=!1,rd=!1,ii.forEach(e=>e.complete()),ii.clear()}function Ib(){ii.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(id=!0)})}function H$(){Ib(),_b()}class sd{constructor(t,n,r,i,o,a=!1){this.isComplete=!1,this.isAsync=!1,this.needsMeasurement=!1,this.isScheduled=!1,this.unresolvedKeyframes=[...t],this.onComplete=n,this.name=r,this.motionValue=i,this.element=o,this.isAsync=a}scheduleResolve(){this.isScheduled=!0,this.isAsync?(ii.add(this),rd||(rd=!0,He.read(Ib),He.resolveKeyframes(_b))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:n,element:r,motionValue:i}=this;for(let o=0;o<t.length;o++)if(t[o]===null)if(o===0){const a=i==null?void 0:i.get(),c=t[t.length-1];if(a!==void 0)t[0]=a;else if(r&&n){const u=r.readValue(n,c);u!=null&&(t[0]=u)}t[0]===void 0&&(t[0]=c),i&&a===void 0&&i.set(t[0])}else t[o]=t[o-1]}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(){this.isComplete=!0,this.onComplete(this.unresolvedKeyframes,this.finalKeyframe),ii.delete(this)}cancel(){this.isComplete||(this.isScheduled=!1,ii.delete(this))}resume(){this.isComplete||this.scheduleResolve()}}const Db=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),q$=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function K$(e){const t=q$.exec(e);if(!t)return[,];const[,n,r,i]=t;return[`--${n??r}`,i]}const X$=4;function $b(e,t,n=1){Er(n<=X$,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);const[r,i]=K$(e);if(!r)return;const o=window.getComputedStyle(t).getPropertyValue(r);if(o){const a=o.trim();return Db(a)?parseFloat(a):a}return Of(i)?$b(i,t,n+1):i}const Rb=e=>t=>t.test(e),Nb=[rs,Se,Rn,Pr,FD,jD,{test:e=>e==="auto",parse:e=>e}],Lb=e=>Nb.find(Rb(e));class kb extends sd{constructor(t,n,r,i,o){super(t,n,r,i,o,!0)}readKeyframes(){const{unresolvedKeyframes:t,element:n,name:r}=this;if(!n||!n.current)return;super.readKeyframes();for(let u=0;u<t.length;u++){let d=t[u];if(typeof d=="string"&&(d=d.trim(),Of(d))){const h=$b(d,n.current);h!==void 0&&(t[u]=h),u===t.length-1&&(this.finalKeyframe=d)}}if(this.resolveNoneKeyframes(),!eb.has(r)||t.length!==2)return;const[i,o]=t,a=Lb(i),c=Lb(o);if(a!==c)if(Mb(a)&&Mb(c))for(let u=0;u<t.length;u++){const d=t[u];typeof d=="string"&&(t[u]=parseFloat(d))}else this.needsMeasurement=!0}resolveNoneKeyframes(){const{unresolvedKeyframes:t,name:n}=this,r=[];for(let i=0;i<t.length;i++)S$(t[i])&&r.push(i);r.length&&F$(t,r,n)}measureInitialState(){const{element:t,unresolvedKeyframes:n,name:r}=this;if(!t||!t.current)return;r==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=os[r](t.measureViewportBox(),window.getComputedStyle(t.current)),n[0]=this.measuredOrigin;const i=n[n.length-1];i!==void 0&&t.getValue(r,i).jump(i,!1)}measureEndState(){var t;const{element:n,name:r,unresolvedKeyframes:i}=this;if(!n||!n.current)return;const o=n.getValue(r);o&&o.jump(this.measuredOrigin,!1);const a=i.length-1,c=i[a];i[a]=os[r](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(([u,d])=>{n.getValue(u).set(d)}),this.resolveNoneKeyframes()}}const jb=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Ar.test(e)||e==="0")&&!e.startsWith("url("));function Z$(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 J$(e,t,n,r){const i=e[0];if(i===null)return!1;if(t==="display"||t==="visibility")return!0;const o=e[e.length-1],a=jb(i,t),c=jb(o,t);return Qi(a===c,`You are trying to animate ${t} from "${i}" to "${o}". ${i} is not an animatable value - to enable this animation set ${i} to a value animatable to ${o} via the \`style\` property.`),!a||!c?!1:Z$(e)||(n==="spring"||zf(n))&&r}const Q$=e=>e!==null;function Ka(e,{repeat:t,repeatType:n="loop"},r){const i=e.filter(Q$),o=t&&n!=="loop"&&t%2===1?0:i.length-1;return!o||r===void 0?i[o]:r}const e4=40;class Fb{constructor({autoplay:t=!0,delay:n=0,type:r="keyframes",repeat:i=0,repeatDelay:o=0,repeatType:a="loop",...c}){this.isStopped=!1,this.hasAttemptedResolve=!1,this.createdAt=Nn.now(),this.options={autoplay:t,delay:n,type:r,repeat:i,repeatDelay:o,repeatType:a,...c},this.updateFinishedPromise()}calcStartTime(){return this.resolvedAt?this.resolvedAt-this.createdAt>e4?this.resolvedAt:this.createdAt:this.createdAt}get resolved(){return!this._resolved&&!this.hasAttemptedResolve&&H$(),this._resolved}onKeyframesResolved(t,n){this.resolvedAt=Nn.now(),this.hasAttemptedResolve=!0;const{name:r,type:i,velocity:o,delay:a,onComplete:c,onUpdate:u,isGenerator:d}=this.options;if(!d&&!J$(t,r,i,o))if(a)this.options.duration=0;else{u&&u(Ka(t,this.options,n)),c&&c(),this.resolveFinishedPromise();return}const h=this.initPlayback(t,n);h!==!1&&(this._resolved={keyframes:t,finalKeyframe:n,...h},this.onPostResolved())}onPostResolved(){}then(t,n){return this.currentFinishedPromise.then(t,n)}flatten(){this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear")}updateFinishedPromise(){this.currentFinishedPromise=new Promise(t=>{this.resolveFinishedPromise=t})}}const od=2e4;function Vb(e){let t=0;const n=50;let r=e.next(t);for(;!r.done&&t<od;)t+=n,r=e.next(t);return t>=od?1/0:t}const rt=(e,t,n)=>e+(t-e)*n;function ad(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 t4({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,t/=100,n/=100;let i=0,o=0,a=0;if(!t)i=o=a=n;else{const c=n<.5?n*(1+t):n+t-n*t,u=2*n-c;i=ad(u,c,e+1/3),o=ad(u,c,e),a=ad(u,c,e-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(a*255),alpha:r}}function Xa(e,t){return n=>n>0?t:e}const ld=(e,t,n)=>{const r=e*e,i=n*(t*t-r)+r;return i<0?0:Math.sqrt(i)},n4=[Jf,ni,ss],r4=e=>n4.find(t=>t.test(e));function Bb(e){const t=r4(e);if(Qi(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`),!t)return!1;let n=t.parse(e);return t===ss&&(n=t4(n)),n}const Wb=(e,t)=>{const n=Bb(e),r=Bb(t);if(!n||!r)return Xa(e,t);const i={...n};return o=>(i.red=ld(n.red,r.red,o),i.green=ld(n.green,r.green,o),i.blue=ld(n.blue,r.blue,o),i.alpha=rt(n.alpha,r.alpha,o),ni.transform(i))},i4=(e,t)=>n=>t(e(n)),To=(...e)=>e.reduce(i4),cd=new Set(["none","hidden"]);function s4(e,t){return cd.has(e)?n=>n<=0?e:t:n=>n>=1?t:e}function o4(e,t){return n=>rt(e,t,n)}function ud(e){return typeof e=="number"?o4:typeof e=="string"?Of(e)?Xa:Ct.test(e)?Wb:c4:Array.isArray(e)?Ub:typeof e=="object"?Ct.test(e)?Wb:a4:Xa}function Ub(e,t){const n=[...e],r=n.length,i=e.map((o,a)=>ud(o)(o,t[a]));return o=>{for(let a=0;a<r;a++)n[a]=i[a](o);return n}}function a4(e,t){const n={...e,...t},r={};for(const i in n)e[i]!==void 0&&t[i]!==void 0&&(r[i]=ud(e[i])(e[i],t[i]));return i=>{for(const o in r)n[o]=r[o](i);return n}}function l4(e,t){var n;const r=[],i={color:0,var:0,number:0};for(let o=0;o<t.values.length;o++){const a=t.types[o],c=e.indexes[a][i[a]],u=(n=e.values[c])!==null&&n!==void 0?n:0;r[o]=u,i[a]++}return r}const c4=(e,t)=>{const n=Ar.createTransformer(t),r=So(e),i=So(t);return r.indexes.var.length===i.indexes.var.length&&r.indexes.color.length===i.indexes.color.length&&r.indexes.number.length>=i.indexes.number.length?cd.has(e)&&!i.values.length||cd.has(t)&&!r.values.length?s4(e,t):To(Ub(l4(r,i),i.values),n):(Qi(!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.`),Xa(e,t))};function zb(e,t,n){return typeof e=="number"&&typeof t=="number"&&typeof n=="number"?rt(e,t,n):ud(e)(e,t)}const u4=5;function Gb(e,t,n){const r=Math.max(t-u4,0);return tb(n-e(r),t-r)}const it={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1},Yb=.001;function f4({duration:e=it.duration,bounce:t=it.bounce,velocity:n=it.velocity,mass:r=it.mass}){let i,o;Qi(e<=Ln(it.maxDuration),"Spring duration must be 10 seconds or less");let a=1-t;a=Xn(it.minDamping,it.maxDamping,a),e=Xn(it.minDuration,it.maxDuration,Zn(e)),a<1?(i=d=>{const h=d*a,m=h*e,g=h-n,y=fd(d,a),S=Math.exp(-m);return Yb-g/y*S},o=d=>{const m=d*a*e,g=m*n+n,y=Math.pow(a,2)*Math.pow(d,2)*e,S=Math.exp(-m),b=fd(Math.pow(d,2),a);return(-i(d)+Yb>0?-1:1)*((g-y)*S)/b}):(i=d=>{const h=Math.exp(-d*e),m=(d-n)*e+1;return-.001+h*m},o=d=>{const h=Math.exp(-d*e),m=(n-d)*(e*e);return h*m});const c=5/e,u=h4(i,o,c);if(e=Ln(e),isNaN(u))return{stiffness:it.stiffness,damping:it.damping,duration:e};{const d=Math.pow(u,2)*r;return{stiffness:d,damping:a*2*Math.sqrt(r*d),duration:e}}}const d4=12;function h4(e,t,n){let r=n;for(let i=1;i<d4;i++)r=r-e(r)/t(r);return r}function fd(e,t){return e*Math.sqrt(1-t*t)}const m4=["duration","bounce"],p4=["stiffness","damping","mass"];function Hb(e,t){return t.some(n=>e[n]!==void 0)}function g4(e){let t={velocity:it.velocity,stiffness:it.stiffness,damping:it.damping,mass:it.mass,isResolvedFromDuration:!1,...e};if(!Hb(e,p4)&&Hb(e,m4))if(e.visualDuration){const n=e.visualDuration,r=2*Math.PI/(n*1.2),i=r*r,o=2*Xn(.05,1,1-(e.bounce||0))*Math.sqrt(i);t={...t,mass:it.mass,stiffness:i,damping:o}}else{const n=f4(e);t={...t,...n,mass:it.mass},t.isResolvedFromDuration=!0}return t}function qb(e=it.visualDuration,t=it.bounce){const n=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e;let{restSpeed:r,restDelta:i}=n;const o=n.keyframes[0],a=n.keyframes[n.keyframes.length-1],c={done:!1,value:o},{stiffness:u,damping:d,mass:h,duration:m,velocity:g,isResolvedFromDuration:y}=g4({...n,velocity:-Zn(n.velocity||0)}),S=g||0,b=d/(2*Math.sqrt(u*h)),E=a-o,w=Zn(Math.sqrt(u/h)),P=Math.abs(E)<5;r||(r=P?it.restSpeed.granular:it.restSpeed.default),i||(i=P?it.restDelta.granular:it.restDelta.default);let O;if(b<1){const A=fd(w,b);O=R=>{const V=Math.exp(-b*w*R);return a-V*((S+b*w*E)/A*Math.sin(A*R)+E*Math.cos(A*R))}}else if(b===1)O=A=>a-Math.exp(-w*A)*(E+(S+w*E)*A);else{const A=w*Math.sqrt(b*b-1);O=R=>{const V=Math.exp(-b*w*R),F=Math.min(A*R,300);return a-V*((S+b*w*E)*Math.sinh(F)+A*E*Math.cosh(F))/A}}const $={calculatedDuration:y&&m||null,next:A=>{const R=O(A);if(y)c.done=A>=m;else{let V=0;b<1&&(V=A===0?Ln(S):Gb(O,A,R));const F=Math.abs(V)<=r,Y=Math.abs(a-R)<=i;c.done=F&&Y}return c.value=c.done?a:R,c},toString:()=>{const A=Math.min(Vb($),od),R=sb(V=>$.next(A*V).value,A,30);return A+"ms "+R}};return $}function Kb({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:o=500,modifyTarget:a,min:c,max:u,restDelta:d=.5,restSpeed:h}){const m=e[0],g={done:!1,value:m},y=F=>c!==void 0&&F<c||u!==void 0&&F>u,S=F=>c===void 0?u:u===void 0||Math.abs(c-F)<Math.abs(u-F)?c:u;let b=n*t;const E=m+b,w=a===void 0?E:a(E);w!==E&&(b=w-m);const P=F=>-b*Math.exp(-F/r),O=F=>w+P(F),$=F=>{const Y=P(F),Q=O(F);g.done=Math.abs(Y)<=d,g.value=g.done?w:Q};let A,R;const V=F=>{y(g.value)&&(A=F,R=qb({keyframes:[g.value,S(g.value)],velocity:Gb(O,F,g.value),damping:i,stiffness:o,restDelta:d,restSpeed:h}))};return V(0),{calculatedDuration:null,next:F=>{let Y=!1;return!R&&A===void 0&&(Y=!0,$(F),V(F)),A!==void 0&&F>=A?R.next(F-A):(!Y&&$(F),g)}}}const y4=xo(.42,0,1,1),v4=xo(0,0,.58,1),Xb=xo(.42,0,.58,1),b4=e=>Array.isArray(e)&&typeof e[0]!="number",Zb={linear:Nt,easeIn:y4,easeInOut:Xb,easeOut:v4,circIn:qf,circInOut:pb,circOut:mb,backIn:Hf,backInOut:db,backOut:fb,anticipate:hb},Jb=e=>{if(Gf(e)){Er(e.length===4,"Cubic bezier arrays must contain four numerical values.");const[t,n,r,i]=e;return xo(t,n,r,i)}else if(typeof e=="string")return Er(Zb[e]!==void 0,`Invalid easing type '${e}'`),Zb[e];return e};function x4(e,t,n){const r=[],i=n||zb,o=e.length-1;for(let a=0;a<o;a++){let c=i(e[a],e[a+1]);if(t){const u=Array.isArray(t)?t[a]||Nt:t;c=To(u,c)}r.push(c)}return r}function w4(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const o=e.length;if(Er(o===t.length,"Both input and output ranges must be the same length"),o===1)return()=>t[0];if(o===2&&t[0]===t[1])return()=>t[1];const a=e[0]===e[1];e[0]>e[o-1]&&(e=[...e].reverse(),t=[...t].reverse());const c=x4(t,r,i),u=c.length,d=h=>{if(a&&h<e[0])return t[0];let m=0;if(u>1)for(;m<e.length-2&&!(h<e[m+1]);m++);const g=is(e[m],e[m+1],h);return c[m](g)};return n?h=>d(Xn(e[0],e[o-1],h)):d}function S4(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=is(0,t,r);e.push(rt(n,1,i))}}function T4(e){const t=[0];return S4(t,e.length-1),t}function E4(e,t){return e.map(n=>n*t)}function C4(e,t){return e.map(()=>t||Xb).splice(0,e.length-1)}function Eo({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=b4(r)?r.map(Jb):Jb(r),o={done:!1,value:t[0]},a=E4(n&&n.length===t.length?n:T4(t),e),c=w4(a,t,{ease:Array.isArray(i)?i:C4(t,i)});return{calculatedDuration:e,next:u=>(o.value=c(u),o.done=u>=e,o)}}const P4=e=>{const t=({timestamp:n})=>e(n);return{start:()=>He.update(t,!0),stop:()=>Cr(t),now:()=>vt.isProcessing?vt.timestamp:Nn.now()}},A4={decay:Kb,inertia:Kb,tween:Eo,keyframes:Eo,spring:qb},O4=e=>e/100;class dd extends Fb{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:u}=this.options;u&&u()};const{name:n,motionValue:r,element:i,keyframes:o}=this.options,a=(i==null?void 0:i.KeyframeResolver)||sd,c=(u,d)=>this.onKeyframesResolved(u,d);this.resolver=new a(o,c,n,r,i),this.resolver.scheduleResolve()}flatten(){super.flatten(),this._resolved&&Object.assign(this._resolved,this.initPlayback(this._resolved.keyframes))}initPlayback(t){const{type:n="keyframes",repeat:r=0,repeatDelay:i=0,repeatType:o,velocity:a=0}=this.options,c=zf(n)?n:A4[n]||Eo;let u,d;process.env.NODE_ENV!=="production"&&c!==Eo&&Er(t.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${t}`),c!==Eo&&typeof t[0]!="number"&&(u=To(O4,zb(t[0],t[1])),t=[0,100]);const h=c({...this.options,keyframes:t});o==="mirror"&&(d=c({...this.options,keyframes:[...t].reverse(),velocity:-a})),h.calculatedDuration===null&&(h.calculatedDuration=Vb(h));const{calculatedDuration:m}=h,g=m+i,y=g*(r+1)-i;return{generator:h,mirroredGenerator:d,mapPercentToKeyframes:u,calculatedDuration:m,resolvedDuration:g,totalDuration:y}}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:r}=this;if(!r){const{keyframes:F}=this.options;return{done:!0,value:F[F.length-1]}}const{finalKeyframe:i,generator:o,mirroredGenerator:a,mapPercentToKeyframes:c,keyframes:u,calculatedDuration:d,totalDuration:h,resolvedDuration:m}=r;if(this.startTime===null)return o.next(0);const{delay:g,repeat:y,repeatType:S,repeatDelay:b,onUpdate:E}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-h/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 w=this.currentTime-g*(this.speed>=0?1:-1),P=this.speed>=0?w<0:w>h;this.currentTime=Math.max(w,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=h);let O=this.currentTime,$=o;if(y){const F=Math.min(this.currentTime,h)/m;let Y=Math.floor(F),Q=F%1;!Q&&F>=1&&(Q=1),Q===1&&Y--,Y=Math.min(Y,y+1),!!(Y%2)&&(S==="reverse"?(Q=1-Q,b&&(Q-=b/m)):S==="mirror"&&($=a)),O=Xn(0,1,Q)*m}const A=P?{done:!1,value:u[0]}:$.next(O);c&&(A.value=c(A.value));let{done:R}=A;!P&&d!==null&&(R=this.speed>=0?this.currentTime>=h:this.currentTime<=0);const V=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&R);return V&&i!==void 0&&(A.value=Ka(u,this.options,i)),E&&E(A.value),V&&this.finish(),A}get duration(){const{resolved:t}=this;return t?Zn(t.calculatedDuration):0}get time(){return Zn(this.currentTime)}set time(t){t=Ln(t),this.currentTime=t,this.holdTime!==null||this.speed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.speed)}get speed(){return this.playbackSpeed}set speed(t){const n=this.playbackSpeed!==t;this.playbackSpeed=t,n&&(this.time=Zn(this.currentTime))}play(){if(this.resolver.isScheduled||this.resolver.resume(),!this._resolved){this.pendingPlayState="running";return}if(this.isStopped)return;const{driver:t=P4,onPlay:n,startTime:r}=this.options;this.driver||(this.driver=t(o=>this.tick(o))),n&&n();const i=this.driver.now();this.holdTime!==null?this.startTime=i-this.holdTime:this.startTime?this.state==="finished"&&(this.startTime=i):this.startTime=r??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 M4=new Set(["opacity","clipPath","filter","transform"]);function _4(e,t,n,{delay:r=0,duration:i=300,repeat:o=0,repeatType:a="loop",ease:c="easeInOut",times:u}={}){const d={[t]:n};u&&(d.offset=u);const h=ab(c,i);return Array.isArray(h)&&(d.easing=h),e.animate(d,{delay:r,duration:i,easing:Array.isArray(h)?"linear":h,fill:"both",iterations:o+1,direction:a==="reverse"?"alternate":"normal"})}const I4=Uf(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),Za=10,D4=2e4;function $4(e){return zf(e.type)||e.type==="spring"||!ob(e.ease)}function R4(e,t){const n=new dd({...t,keyframes:e,repeat:0,delay:0,isGenerator:!0});let r={done:!1,value:e[0]};const i=[];let o=0;for(;!r.done&&o<D4;)r=n.sample(o),i.push(r.value),o+=Za;return{times:void 0,keyframes:i,duration:o-Za,ease:"linear"}}const Qb={anticipate:hb,backInOut:db,circInOut:pb};function N4(e){return e in Qb}class e1 extends Fb{constructor(t){super(t);const{name:n,motionValue:r,element:i,keyframes:o}=this.options;this.resolver=new kb(o,(a,c)=>this.onKeyframesResolved(a,c),n,r,i),this.resolver.scheduleResolve()}initPlayback(t,n){let{duration:r=300,times:i,ease:o,type:a,motionValue:c,name:u,startTime:d}=this.options;if(!c.owner||!c.owner.current)return!1;if(typeof o=="string"&&qa()&&N4(o)&&(o=Qb[o]),$4(this.options)){const{onComplete:m,onUpdate:g,motionValue:y,element:S,...b}=this.options,E=R4(t,b);t=E.keyframes,t.length===1&&(t[1]=t[0]),r=E.duration,i=E.times,o=E.ease,a="keyframes"}const h=_4(c.owner.current,u,t,{...this.options,duration:r,times:i,ease:o});return h.startTime=d??this.calcStartTime(),this.pendingTimeline?(ib(h,this.pendingTimeline),this.pendingTimeline=void 0):h.onfinish=()=>{const{onComplete:m}=this.options;c.set(Ka(t,this.options,n)),m&&m(),this.cancel(),this.resolveFinishedPromise()},{animation:h,duration:r,times:i,type:a,ease:o,keyframes:t}}get duration(){const{resolved:t}=this;if(!t)return 0;const{duration:n}=t;return Zn(n)}get time(){const{resolved:t}=this;if(!t)return 0;const{animation:n}=t;return Zn(n.currentTime||0)}set time(t){const{resolved:n}=this;if(!n)return;const{animation:r}=n;r.currentTime=Ln(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:r}=n;r.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 Nt;const{animation:r}=n;ib(r,t)}return Nt}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:r,duration:i,type:o,ease:a,times:c}=t;if(n.playState==="idle"||n.playState==="finished")return;if(this.time){const{motionValue:d,onUpdate:h,onComplete:m,element:g,...y}=this.options,S=new dd({...y,keyframes:r,duration:i,type:o,ease:a,times:c,isGenerator:!0}),b=Ln(this.time);d.setWithVelocity(S.sample(b-Za).value,S.sample(b).value,Za)}const{onStop:u}=this.options;u&&u(),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:r,repeatDelay:i,repeatType:o,damping:a,type:c}=t;if(!n||!n.owner||!(n.owner.current instanceof HTMLElement))return!1;const{onUpdate:u,transformTemplate:d}=n.owner.getProps();return I4()&&r&&M4.has(r)&&(r!=="transform"||!d)&&!u&&!i&&o!=="mirror"&&a!==0&&c!=="inertia"}}const L4={type:"spring",stiffness:500,damping:25,restSpeed:10},k4=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),j4={type:"keyframes",duration:.8},F4={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},V4=(e,{keyframes:t})=>t.length>2?j4:ti.has(e)?e.startsWith("scale")?k4(t[1]):L4:F4;function B4({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:o,repeatType:a,repeatDelay:c,from:u,elapsed:d,...h}){return!!Object.keys(h).length}const hd=(e,t,n,r={},i,o)=>a=>{const c=jf(r,e)||{},u=c.delay||r.delay||0;let{elapsed:d=0}=r;d=d-Ln(u);let h={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:t.getVelocity(),...c,delay:-d,onUpdate:g=>{t.set(g),c.onUpdate&&c.onUpdate(g)},onComplete:()=>{a(),c.onComplete&&c.onComplete()},name:e,motionValue:t,element:o?void 0:i};B4(c)||(h={...h,...V4(e,h)}),h.duration&&(h.duration=Ln(h.duration)),h.repeatDelay&&(h.repeatDelay=Ln(h.repeatDelay)),h.from!==void 0&&(h.keyframes[0]=h.from);let m=!1;if((h.type===!1||h.duration===0&&!h.repeatDelay)&&(h.duration=0,h.delay===0&&(m=!0)),h.allowFlatten=!c.type&&!c.ease,m&&!o&&t.get()!==void 0){const g=Ka(h.keyframes,c);if(g!==void 0)return He.update(()=>{h.onUpdate(g),h.onComplete()}),new g$([])}return!o&&e1.supports(h)?new e1(h):new dd(h)};function W4({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&t[n]!==!0;return t[n]=!1,r}function t1(e,t,{delay:n=0,transitionOverride:r,type:i}={}){var o;let{transition:a=e.getDefaultTransition(),transitionEnd:c,...u}=t;r&&(a=r);const d=[],h=i&&e.animationState&&e.animationState.getState()[i];for(const m in u){const g=e.getValue(m,(o=e.latestValues[m])!==null&&o!==void 0?o:null),y=u[m];if(y===void 0||h&&W4(h,m))continue;const S={delay:n,...jf(a||{},m)};let b=!1;if(window.MotionHandoffAnimation){const w=rb(e);if(w){const P=window.MotionHandoffAnimation(w,m,He);P!==null&&(S.startTime=P,b=!0)}}Wf(e,m),g.start(hd(m,g,y,e.shouldReduceMotion&&eb.has(m)?{type:!1}:S,e,b));const E=g.animation;E&&d.push(E)}return c&&Promise.all(d).then(()=>{He.update(()=>{c&&d$(e,c)})}),d}function md(e,t,n={}){var r;const i=yo(e,t,n.type==="exit"?(r=e.presenceContext)===null||r===void 0?void 0:r.custom:void 0);let{transition:o=e.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(o=n.transitionOverride);const a=i?()=>Promise.all(t1(e,i,n)):()=>Promise.resolve(),c=e.variantChildren&&e.variantChildren.size?(d=0)=>{const{delayChildren:h=0,staggerChildren:m,staggerDirection:g}=o;return U4(e,t,h+d,m,g,n)}:()=>Promise.resolve(),{when:u}=o;if(u){const[d,h]=u==="beforeChildren"?[a,c]:[c,a];return d().then(()=>h())}else return Promise.all([a(),c(n.delay)])}function U4(e,t,n=0,r=0,i=1,o){const a=[],c=(e.variantChildren.size-1)*r,u=i===1?(d=0)=>d*r:(d=0)=>c-d*r;return Array.from(e.variantChildren).sort(z4).forEach((d,h)=>{d.notify("AnimationStart",t),a.push(md(d,t,{...o,delay:n+u(h)}).then(()=>d.notify("AnimationComplete",t)))}),Promise.all(a)}function z4(e,t){return e.sortNodePosition(t)}function G4(e,t,n={}){e.notify("AnimationStart",t);let r;if(Array.isArray(t)){const i=t.map(o=>md(e,o,n));r=Promise.all(i)}else if(typeof t=="string")r=md(e,t,n);else{const i=typeof t=="function"?yo(e,t,n.custom):t;r=Promise.all(t1(e,i,n))}return r.then(()=>{e.notify("AnimationComplete",t)})}function n1(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}const Y4=Ef.length;function r1(e){if(!e)return;if(!e.isControllingVariants){const n=e.parent?r1(e.parent)||{}:{};return e.props.initial!==void 0&&(n.initial=e.props.initial),n}const t={};for(let n=0;n<Y4;n++){const r=Ef[n],i=e.props[r];(ho(i)||i===!1)&&(t[r]=i)}return t}const H4=[...Tf].reverse(),q4=Tf.length;function K4(e){return t=>Promise.all(t.map(({animation:n,options:r})=>G4(e,n,r)))}function X4(e){let t=K4(e),n=i1(),r=!0;const i=u=>(d,h)=>{var m;const g=yo(e,h,u==="exit"?(m=e.presenceContext)===null||m===void 0?void 0:m.custom:void 0);if(g){const{transition:y,transitionEnd:S,...b}=g;d={...d,...b,...S}}return d};function o(u){t=u(e)}function a(u){const{props:d}=e,h=r1(e.parent)||{},m=[],g=new Set;let y={},S=1/0;for(let E=0;E<q4;E++){const w=H4[E],P=n[w],O=d[w]!==void 0?d[w]:h[w],$=ho(O),A=w===u?P.isActive:null;A===!1&&(S=E);let R=O===h[w]&&O!==d[w]&&$;if(R&&r&&e.manuallyAnimateOnMount&&(R=!1),P.protectedKeys={...y},!P.isActive&&A===null||!O&&!P.prevProp||Ua(O)||typeof O=="boolean")continue;const V=Z4(P.prevProp,O);let F=V||w===u&&P.isActive&&!R&&$||E>S&&$,Y=!1;const Q=Array.isArray(O)?O:[O];let ee=Q.reduce(i(w),{});A===!1&&(ee={});const{prevResolvedValues:de={}}=P,fe={...de,...ee},oe=j=>{F=!0,g.has(j)&&(Y=!0,g.delete(j)),P.needsAnimating[j]=!0;const W=e.getValue(j);W&&(W.liveStyle=!1)};for(const j in fe){const W=ee[j],H=de[j];if(y.hasOwnProperty(j))continue;let M=!1;Lf(W)&&Lf(H)?M=!n1(W,H):M=W!==H,M?W!=null?oe(j):g.add(j):W!==void 0&&g.has(j)?oe(j):P.protectedKeys[j]=!0}P.prevProp=O,P.prevResolvedValues=ee,P.isActive&&(y={...y,...ee}),r&&e.blockInitialAnimation&&(F=!1),F&&(!(R&&V)||Y)&&m.push(...Q.map(j=>({animation:j,options:{type:w}})))}if(g.size){const E={};if(typeof d.initial!="boolean"){const w=yo(e,Array.isArray(d.initial)?d.initial[0]:d.initial);w&&w.transition&&(E.transition=w.transition)}g.forEach(w=>{const P=e.getBaseTarget(w),O=e.getValue(w);O&&(O.liveStyle=!0),E[w]=P??null}),m.push({animation:E})}let b=!!m.length;return r&&(d.initial===!1||d.initial===d.animate)&&!e.manuallyAnimateOnMount&&(b=!1),r=!1,b?t(m):Promise.resolve()}function c(u,d){var h;if(n[u].isActive===d)return Promise.resolve();(h=e.variantChildren)===null||h===void 0||h.forEach(g=>{var y;return(y=g.animationState)===null||y===void 0?void 0:y.setActive(u,d)}),n[u].isActive=d;const m=a(u);for(const g in n)n[g].protectedKeys={};return m}return{animateChanges:a,setActive:c,setAnimateFunction:o,getState:()=>n,reset:()=>{n=i1(),r=!0}}}function Z4(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!n1(t,e):!1}function si(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function i1(){return{animate:si(!0),whileInView:si(),whileHover:si(),whileTap:si(),whileDrag:si(),whileFocus:si(),exit:si()}}class Or{constructor(t){this.isMounted=!1,this.node=t}update(){}}class J4 extends Or{constructor(t){super(t),t.animationState||(t.animationState=X4(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();Ua(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 Q4=0;class e6 extends Or{constructor(){super(...arguments),this.id=Q4++}update(){if(!this.node.presenceContext)return;const{isPresent:t,onExitComplete:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===r)return;const i=this.node.animationState.setActive("exit",!t);n&&!t&&i.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 t6={animation:{Feature:J4},exit:{Feature:e6}},vn={x:!1,y:!1};function s1(){return vn.x||vn.y}function n6(e){return e==="x"||e==="y"?vn[e]?null:(vn[e]=!0,()=>{vn[e]=!1}):vn.x||vn.y?null:(vn.x=vn.y=!0,()=>{vn.x=vn.y=!1})}function Co(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const pd=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;function Po(e){return{point:{x:e.pageX,y:e.pageY}}}const r6=e=>t=>pd(t)&&e(t,Po(t));function Ao(e,t,n,r){return Co(e,t,r6(n),r)}function o1({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function i6({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function s6(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}const a1=1e-4,o6=1-a1,a6=1+a1,l1=.01,l6=0-l1,c6=0+l1;function _t(e){return e.max-e.min}function u6(e,t,n){return Math.abs(e-t)<=n}function c1(e,t,n,r=.5){e.origin=r,e.originPoint=rt(t.min,t.max,e.origin),e.scale=_t(n)/_t(t),e.translate=rt(n.min,n.max,e.origin)-e.originPoint,(e.scale>=o6&&e.scale<=a6||isNaN(e.scale))&&(e.scale=1),(e.translate>=l6&&e.translate<=c6||isNaN(e.translate))&&(e.translate=0)}function Oo(e,t,n,r){c1(e.x,t.x,n.x,r?r.originX:void 0),c1(e.y,t.y,n.y,r?r.originY:void 0)}function u1(e,t,n){e.min=n.min+t.min,e.max=e.min+_t(t)}function f6(e,t,n){u1(e.x,t.x,n.x),u1(e.y,t.y,n.y)}function f1(e,t,n){e.min=t.min-n.min,e.max=e.min+_t(t)}function Mo(e,t,n){f1(e.x,t.x,n.x),f1(e.y,t.y,n.y)}const d1=()=>({translate:0,scale:1,origin:0,originPoint:0}),as=()=>({x:d1(),y:d1()}),h1=()=>({min:0,max:0}),lt=()=>({x:h1(),y:h1()});function rn(e){return[e("x"),e("y")]}function gd(e){return e===void 0||e===1}function yd({scale:e,scaleX:t,scaleY:n}){return!gd(e)||!gd(t)||!gd(n)}function oi(e){return yd(e)||m1(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function m1(e){return p1(e.x)||p1(e.y)}function p1(e){return e&&e!=="0%"}function Ja(e,t,n){const r=e-n,i=t*r;return n+i}function g1(e,t,n,r,i){return i!==void 0&&(e=Ja(e,i,r)),Ja(e,n,r)+t}function vd(e,t=0,n=1,r,i){e.min=g1(e.min,t,n,r,i),e.max=g1(e.max,t,n,r,i)}function y1(e,{x:t,y:n}){vd(e.x,t.translate,t.scale,t.originPoint),vd(e.y,n.translate,n.scale,n.originPoint)}const v1=.999999999999,b1=1.0000000000001;function d6(e,t,n,r=!1){const i=n.length;if(!i)return;t.x=t.y=1;let o,a;for(let c=0;c<i;c++){o=n[c],a=o.projectionDelta;const{visualElement:u}=o.options;u&&u.props.style&&u.props.style.display==="contents"||(r&&o.options.layoutScroll&&o.scroll&&o!==o.root&&cs(e,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),a&&(t.x*=a.x.scale,t.y*=a.y.scale,y1(e,a)),r&&oi(o.latestValues)&&cs(e,o.latestValues))}t.x<b1&&t.x>v1&&(t.x=1),t.y<b1&&t.y>v1&&(t.y=1)}function ls(e,t){e.min=e.min+t,e.max=e.max+t}function x1(e,t,n,r,i=.5){const o=rt(e.min,e.max,i);vd(e,t,n,o,r)}function cs(e,t){x1(e.x,t.x,t.scaleX,t.scale,t.originX),x1(e.y,t.y,t.scaleY,t.scale,t.originY)}function w1(e,t){return o1(s6(e.getBoundingClientRect(),t))}function h6(e,t,n){const r=w1(e,n),{scroll:i}=t;return i&&(ls(r.x,i.offset.x),ls(r.y,i.offset.y)),r}const S1=({current:e})=>e?e.ownerDocument.defaultView:null,T1=(e,t)=>Math.abs(e-t);function m6(e,t){const n=T1(e.x,t.x),r=T1(e.y,t.y);return Math.sqrt(n**2+r**2)}class E1{constructor(t,n,{transformPagePoint:r,contextWindow:i,dragSnapToOrigin:o=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const m=xd(this.lastMoveEventInfo,this.history),g=this.startEvent!==null,y=m6(m.offset,{x:0,y:0})>=3;if(!g&&!y)return;const{point:S}=m,{timestamp:b}=vt;this.history.push({...S,timestamp:b});const{onStart:E,onMove:w}=this.handlers;g||(E&&E(this.lastMoveEvent,m),this.startEvent=this.lastMoveEvent),w&&w(this.lastMoveEvent,m)},this.handlePointerMove=(m,g)=>{this.lastMoveEvent=m,this.lastMoveEventInfo=bd(g,this.transformPagePoint),He.update(this.updatePoint,!0)},this.handlePointerUp=(m,g)=>{this.end();const{onEnd:y,onSessionEnd:S,resumeAnimation:b}=this.handlers;if(this.dragSnapToOrigin&&b&&b(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const E=xd(m.type==="pointercancel"?this.lastMoveEventInfo:bd(g,this.transformPagePoint),this.history);this.startEvent&&y&&y(m,E),S&&S(m,E)},!pd(t))return;this.dragSnapToOrigin=o,this.handlers=n,this.transformPagePoint=r,this.contextWindow=i||window;const a=Po(t),c=bd(a,this.transformPagePoint),{point:u}=c,{timestamp:d}=vt;this.history=[{...u,timestamp:d}];const{onSessionStart:h}=n;h&&h(t,xd(c,this.history)),this.removeListeners=To(Ao(this.contextWindow,"pointermove",this.handlePointerMove),Ao(this.contextWindow,"pointerup",this.handlePointerUp),Ao(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),Cr(this.updatePoint)}}function bd(e,t){return t?{point:t(e.point)}:e}function C1(e,t){return{x:e.x-t.x,y:e.y-t.y}}function xd({point:e},t){return{point:e,delta:C1(e,P1(t)),offset:C1(e,p6(t)),velocity:g6(t,.1)}}function p6(e){return e[0]}function P1(e){return e[e.length-1]}function g6(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=P1(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>Ln(t)));)n--;if(!r)return{x:0,y:0};const o=Zn(i.timestamp-r.timestamp);if(o===0)return{x:0,y:0};const a={x:(i.x-r.x)/o,y:(i.y-r.y)/o};return a.x===1/0&&(a.x=0),a.y===1/0&&(a.y=0),a}function y6(e,{min:t,max:n},r){return t!==void 0&&e<t?e=r?rt(t,e,r.min):Math.max(e,t):n!==void 0&&e>n&&(e=r?rt(n,e,r.max):Math.min(e,n)),e}function A1(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 v6(e,{top:t,left:n,bottom:r,right:i}){return{x:A1(e.x,n,i),y:A1(e.y,t,r)}}function O1(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}function b6(e,t){return{x:O1(e.x,t.x),y:O1(e.y,t.y)}}function x6(e,t){let n=.5;const r=_t(e),i=_t(t);return i>r?n=is(t.min,t.max-r,e.min):r>i&&(n=is(e.min,e.max-i,t.min)),Xn(0,1,n)}function w6(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 wd=.35;function S6(e=wd){return e===!1?e=0:e===!0&&(e=wd),{x:M1(e,"left","right"),y:M1(e,"top","bottom")}}function M1(e,t,n){return{min:_1(e,t),max:_1(e,n)}}function _1(e,t){return typeof e=="number"?e:e[t]||0}const T6=new WeakMap;class E6{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=lt(),this.visualElement=t}start(t,{snapToCursor:n=!1}={}){const{presenceContext:r}=this.visualElement;if(r&&r.isPresent===!1)return;const i=h=>{const{dragSnapToOrigin:m}=this.getProps();m?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(Po(h).point)},o=(h,m)=>{const{drag:g,dragPropagation:y,onDragStart:S}=this.getProps();if(g&&!y&&(this.openDragLock&&this.openDragLock(),this.openDragLock=n6(g),!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),rn(E=>{let w=this.getAxisMotionValue(E).get()||0;if(Rn.test(w)){const{projection:P}=this.visualElement;if(P&&P.layout){const O=P.layout.layoutBox[E];O&&(w=_t(O)*(parseFloat(w)/100))}}this.originPoint[E]=w}),S&&He.postRender(()=>S(h,m)),Wf(this.visualElement,"transform");const{animationState:b}=this.visualElement;b&&b.setActive("whileDrag",!0)},a=(h,m)=>{const{dragPropagation:g,dragDirectionLock:y,onDirectionLock:S,onDrag:b}=this.getProps();if(!g&&!this.openDragLock)return;const{offset:E}=m;if(y&&this.currentDirection===null){this.currentDirection=C6(E),this.currentDirection!==null&&S&&S(this.currentDirection);return}this.updateAxis("x",m.point,E),this.updateAxis("y",m.point,E),this.visualElement.render(),b&&b(h,m)},c=(h,m)=>this.stop(h,m),u=()=>rn(h=>{var m;return this.getAnimationState(h)==="paused"&&((m=this.getAxisMotionValue(h).animation)===null||m===void 0?void 0:m.play())}),{dragSnapToOrigin:d}=this.getProps();this.panSession=new E1(t,{onSessionStart:i,onStart:o,onMove:a,onSessionEnd:c,resumeAnimation:u},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:d,contextWindow:S1(this.visualElement)})}stop(t,n){const r=this.isDragging;if(this.cancel(),!r)return;const{velocity:i}=n;this.startAnimation(i);const{onDragEnd:o}=this.getProps();o&&He.postRender(()=>o(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:r}=this.getProps();!r&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(t,n,r){const{drag:i}=this.getProps();if(!r||!Qa(t,i,this.currentDirection))return;const o=this.getAxisMotionValue(t);let a=this.originPoint[t]+r[t];this.constraints&&this.constraints[t]&&(a=y6(a,this.constraints[t],this.elastic[t])),o.set(a)}resolveConstraints(){var t;const{dragConstraints:n,dragElastic:r}=this.getProps(),i=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(t=this.visualElement.projection)===null||t===void 0?void 0:t.layout,o=this.constraints;n&&ts(n)?this.constraints||(this.constraints=this.resolveRefConstraints()):n&&i?this.constraints=v6(i.layoutBox,n):this.constraints=!1,this.elastic=S6(r),o!==this.constraints&&i&&this.constraints&&!this.hasMutatedConstraints&&rn(a=>{this.constraints!==!1&&this.getAxisMotionValue(a)&&(this.constraints[a]=w6(i.layoutBox[a],this.constraints[a]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:n}=this.getProps();if(!t||!ts(t))return!1;const r=t.current;Er(r!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");const{projection:i}=this.visualElement;if(!i||!i.layout)return!1;const o=h6(r,i.root,this.visualElement.getTransformPagePoint());let a=b6(i.layout.layoutBox,o);if(n){const c=n(i6(a));this.hasMutatedConstraints=!!c,c&&(a=o1(c))}return a}startAnimation(t){const{drag:n,dragMomentum:r,dragElastic:i,dragTransition:o,dragSnapToOrigin:a,onDragTransitionEnd:c}=this.getProps(),u=this.constraints||{},d=rn(h=>{if(!Qa(h,n,this.currentDirection))return;let m=u&&u[h]||{};a&&(m={min:0,max:0});const g=i?200:1e6,y=i?40:1e7,S={type:"inertia",velocity:r?t[h]:0,bounceStiffness:g,bounceDamping:y,timeConstant:750,restDelta:1,restSpeed:10,...o,...m};return this.startAxisValueAnimation(h,S)});return Promise.all(d).then(c)}startAxisValueAnimation(t,n){const r=this.getAxisMotionValue(t);return Wf(this.visualElement,t),r.start(hd(t,r,0,n,this.visualElement,!1))}stopAnimation(){rn(t=>this.getAxisMotionValue(t).stop())}pauseAnimation(){rn(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()}`,r=this.visualElement.getProps(),i=r[n];return i||this.visualElement.getValue(t,(r.initial?r.initial[t]:void 0)||0)}snapToCursor(t){rn(n=>{const{drag:r}=this.getProps();if(!Qa(n,r,this.currentDirection))return;const{projection:i}=this.visualElement,o=this.getAxisMotionValue(n);if(i&&i.layout){const{min:a,max:c}=i.layout.layoutBox[n];o.set(t[n]-rt(a,c,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!ts(n)||!r||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};rn(a=>{const c=this.getAxisMotionValue(a);if(c&&this.constraints!==!1){const u=c.get();i[a]=x6({min:u,max:u},this.constraints[a])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",r.root&&r.root.updateScroll(),r.updateLayout(),this.resolveConstraints(),rn(a=>{if(!Qa(a,t,null))return;const c=this.getAxisMotionValue(a),{min:u,max:d}=this.constraints[a];c.set(rt(u,d,i[a]))})}addListeners(){if(!this.visualElement.current)return;T6.set(this.visualElement,this);const t=this.visualElement.current,n=Ao(t,"pointerdown",u=>{const{drag:d,dragListener:h=!0}=this.getProps();d&&h&&this.start(u)}),r=()=>{const{dragConstraints:u}=this.getProps();ts(u)&&u.current&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,o=i.addEventListener("measure",r);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),He.read(r);const a=Co(window,"resize",()=>this.scalePositionWithinConstraints()),c=i.addEventListener("didUpdate",({delta:u,hasLayoutChanged:d})=>{this.isDragging&&d&&(rn(h=>{const m=this.getAxisMotionValue(h);m&&(this.originPoint[h]+=u[h].translate,m.set(m.get()+u[h].translate))}),this.visualElement.render())});return()=>{a(),n(),o(),c&&c()}}getProps(){const t=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:r=!1,dragPropagation:i=!1,dragConstraints:o=!1,dragElastic:a=wd,dragMomentum:c=!0}=t;return{...t,drag:n,dragDirectionLock:r,dragPropagation:i,dragConstraints:o,dragElastic:a,dragMomentum:c}}}function Qa(e,t,n){return(t===!0||t===e)&&(n===null||n===e)}function C6(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}class P6 extends Or{constructor(t){super(t),this.removeGroupControls=Nt,this.removeListeners=Nt,this.controls=new E6(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Nt}unmount(){this.removeGroupControls(),this.removeListeners()}}const I1=e=>(t,n)=>{e&&He.postRender(()=>e(t,n))};class A6 extends Or{constructor(){super(...arguments),this.removePointerDownListener=Nt}onPointerDown(t){this.session=new E1(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:S1(this.node)})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:n,onPan:r,onPanEnd:i}=this.node.getProps();return{onSessionStart:I1(t),onStart:I1(n),onMove:r,onEnd:(o,a)=>{delete this.session,i&&He.postRender(()=>i(o,a))}}}mount(){this.removePointerDownListener=Ao(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 el={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function D1(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const _o={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(Se.test(e))e=parseFloat(e);else return e;const n=D1(e,t.target.x),r=D1(e,t.target.y);return`${n}% ${r}%`}},O6={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=Ar.parse(e);if(i.length>5)return r;const o=Ar.createTransformer(e),a=typeof i[0]!="number"?1:0,c=n.x.scale*t.x,u=n.y.scale*t.y;i[0+a]/=c,i[1+a]/=u;const d=rt(c,u,.5);return typeof i[2+a]=="number"&&(i[2+a]/=d),typeof i[3+a]=="number"&&(i[3+a]/=d),o(i)}};class M6 extends I.Component{componentDidMount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r,layoutId:i}=this.props,{projection:o}=t;kD(_6),o&&(n.group&&n.group.add(o),r&&r.register&&i&&r.register(o),o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),el.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:n,visualElement:r,drag:i,isPresent:o}=this.props,a=r.projection;return a&&(a.isPresent=o,i||t.layoutDependency!==n||n===void 0||t.isPresent!==o?a.willUpdate():this.safeToRemove(),t.isPresent!==o&&(o?a.promote():a.relegate()||He.postRender(()=>{const c=a.getStack();(!c||!c.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(t.root.didUpdate(),Cf.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:n,switchLayoutGroup:r}=this.props,{projection:i}=t;i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),r&&r.deregister&&r.deregister(i))}safeToRemove(){const{safeToRemove:t}=this.props;t&&t()}render(){return null}}function $1(e){const[t,n]=Cv(),r=I.useContext(vf);return v.jsx(M6,{...e,layoutGroup:r,switchLayoutGroup:I.useContext(Lv),isPresent:t,safeToRemove:n})}const _6={borderRadius:{..._o,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:_o,borderTopRightRadius:_o,borderBottomLeftRadius:_o,borderBottomRightRadius:_o,boxShadow:O6};function I6(e,t,n){const r=Et(e)?e:vo(e);return r.start(hd("",r,t,n)),r.animation}function D6(e){return e instanceof SVGElement&&e.tagName!=="svg"}const $6=(e,t)=>e.depth-t.depth;class R6{constructor(){this.children=[],this.isDirty=!1}add(t){Ff(this.children,t),this.isDirty=!0}remove(t){Vf(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort($6),this.isDirty=!1,this.children.forEach(t)}}function N6(e,t){const n=Nn.now(),r=({timestamp:i})=>{const o=i-n;o>=t&&(Cr(r),e(o-t))};return He.read(r,!0),()=>Cr(r)}const R1=["TopLeft","TopRight","BottomLeft","BottomRight"],L6=R1.length,N1=e=>typeof e=="string"?parseFloat(e):e,L1=e=>typeof e=="number"||Se.test(e);function k6(e,t,n,r,i,o){i?(e.opacity=rt(0,n.opacity!==void 0?n.opacity:1,j6(r)),e.opacityExit=rt(t.opacity!==void 0?t.opacity:1,0,F6(r))):o&&(e.opacity=rt(t.opacity!==void 0?t.opacity:1,n.opacity!==void 0?n.opacity:1,r));for(let a=0;a<L6;a++){const c=`border${R1[a]}Radius`;let u=k1(t,c),d=k1(n,c);if(u===void 0&&d===void 0)continue;u||(u=0),d||(d=0),u===0||d===0||L1(u)===L1(d)?(e[c]=Math.max(rt(N1(u),N1(d),r),0),(Rn.test(d)||Rn.test(u))&&(e[c]+="%")):e[c]=d}(t.rotate||n.rotate)&&(e.rotate=rt(t.rotate||0,n.rotate||0,r))}function k1(e,t){return e[t]!==void 0?e[t]:e.borderRadius}const j6=j1(0,.5,mb),F6=j1(.5,.95,Nt);function j1(e,t,n){return r=>r<e?0:r>t?1:n(is(e,t,r))}function F1(e,t){e.min=t.min,e.max=t.max}function sn(e,t){F1(e.x,t.x),F1(e.y,t.y)}function V1(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}function B1(e,t,n,r,i){return e-=t,e=Ja(e,1/n,r),i!==void 0&&(e=Ja(e,1/i,r)),e}function V6(e,t=0,n=1,r=.5,i,o=e,a=e){if(Rn.test(t)&&(t=parseFloat(t),t=rt(a.min,a.max,t/100)-a.min),typeof t!="number")return;let c=rt(o.min,o.max,r);e===o&&(c-=t),e.min=B1(e.min,t,n,c,i),e.max=B1(e.max,t,n,c,i)}function W1(e,t,[n,r,i],o,a){V6(e,t[n],t[r],t[i],t.scale,o,a)}const B6=["x","scaleX","originX"],W6=["y","scaleY","originY"];function U1(e,t,n,r){W1(e.x,t,B6,n?n.x:void 0,r?r.x:void 0),W1(e.y,t,W6,n?n.y:void 0,r?r.y:void 0)}function z1(e){return e.translate===0&&e.scale===1}function G1(e){return z1(e.x)&&z1(e.y)}function Y1(e,t){return e.min===t.min&&e.max===t.max}function U6(e,t){return Y1(e.x,t.x)&&Y1(e.y,t.y)}function H1(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function q1(e,t){return H1(e.x,t.x)&&H1(e.y,t.y)}function K1(e){return _t(e.x)/_t(e.y)}function X1(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class z6{constructor(){this.members=[]}add(t){Ff(this.members,t),t.scheduleRender()}remove(t){if(Vf(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(i=>t===i);if(n===0)return!1;let r;for(let i=n;i>=0;i--){const o=this.members[i];if(o.isPresent!==!1){r=o;break}}return r?(this.promote(r),!0):!1}promote(t,n){const r=this.lead;if(t!==r&&(this.prevLead=r,this.lead=t,t.show(),r)){r.instance&&r.scheduleRender(),t.scheduleRender(),t.resumeFrom=r,n&&(t.resumeFrom.preserveOpacity=!0),r.snapshot&&(t.snapshot=r.snapshot,t.snapshot.latestValues=r.animationValues||r.latestValues),t.root&&t.root.isUpdating&&(t.isLayoutDirty=!0);const{crossfade:i}=t.options;i===!1&&r.hide()}}exitAnimationComplete(){this.members.forEach(t=>{const{options:n,resumingFrom:r}=t;n.onExitComplete&&n.onExitComplete(),r&&r.options.onExitComplete&&r.options.onExitComplete()})}scheduleRender(){this.members.forEach(t=>{t.instance&&t.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function G6(e,t,n){let r="";const i=e.x.translate/t.x,o=e.y.translate/t.y,a=(n==null?void 0:n.z)||0;if((i||o||a)&&(r=`translate3d(${i}px, ${o}px, ${a}px) `),(t.x!==1||t.y!==1)&&(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{transformPerspective:d,rotate:h,rotateX:m,rotateY:g,skewX:y,skewY:S}=n;d&&(r=`perspective(${d}px) ${r}`),h&&(r+=`rotate(${h}deg) `),m&&(r+=`rotateX(${m}deg) `),g&&(r+=`rotateY(${g}deg) `),y&&(r+=`skewX(${y}deg) `),S&&(r+=`skewY(${S}deg) `)}const c=e.x.scale*t.x,u=e.y.scale*t.y;return(c!==1||u!==1)&&(r+=`scale(${c}, ${u})`),r||"none"}const Sd=["","X","Y","Z"],Y6={visibility:"hidden"},Z1=1e3;let H6=0;function Td(e,t,n,r){const{latestValues:i}=t;i[e]&&(n[e]=i[e],t.setStaticValue(e,0),r&&(r[e]=0))}function J1(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const n=rb(t);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:o}=e.options;window.MotionCancelOptimisedAnimation(n,"transform",He,!(i||o))}const{parent:r}=e;r&&!r.hasCheckedOptimisedAppear&&J1(r)}function Q1({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(a={},c=t==null?void 0:t()){this.id=H6++,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(X6),this.nodes.forEach(tR),this.nodes.forEach(nR),this.nodes.forEach(Z6)},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 u=0;u<this.path.length;u++)this.path[u].shouldResetTransform=!0;this.root===this&&(this.nodes=new R6)}addEventListener(a,c){return this.eventHandlers.has(a)||this.eventHandlers.set(a,new Bf),this.eventHandlers.get(a).add(c)}notifyListeners(a,...c){const u=this.eventHandlers.get(a);u&&u.notify(...c)}hasListeners(a){return this.eventHandlers.has(a)}mount(a,c=this.root.hasTreeAnimated){if(this.instance)return;this.isSVG=D6(a),this.instance=a;const{layoutId:u,layout:d,visualElement:h}=this.options;if(h&&!h.current&&h.mount(a),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),c&&(d||u)&&(this.isLayoutDirty=!0),e){let m;const g=()=>this.root.updateBlockedByResize=!1;e(a,()=>{this.root.updateBlockedByResize=!0,m&&m(),m=N6(g,250),el.hasAnimatedSinceResize&&(el.hasAnimatedSinceResize=!1,this.nodes.forEach(tx))})}u&&this.root.registerSharedNode(u,this),this.options.animate!==!1&&h&&(u||d)&&this.addEventListener("didUpdate",({delta:m,hasLayoutChanged:g,hasRelativeLayoutChanged:y,layout:S})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const b=this.options.transition||h.getDefaultTransition()||aR,{onLayoutAnimationStart:E,onLayoutAnimationComplete:w}=h.getProps(),P=!this.targetLayout||!q1(this.targetLayout,S),O=!g&&y;if(this.options.layoutRoot||this.resumeFrom||O||g&&(P||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(m,O);const $={...jf(b,"layout"),onPlay:E,onComplete:w};(h.shouldReduceMotion||this.options.layoutRoot)&&($.delay=0,$.type=!1),this.startAnimation($)}else g||tx(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=S})}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,Cr(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(rR),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&&J1(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let h=0;h<this.path.length;h++){const m=this.path[h];m.shouldResetTransform=!0,m.updateScroll("snapshot"),m.options.layoutRoot&&m.willUpdate(!1)}const{layoutId:c,layout:u}=this.options;if(c===void 0&&!u)return;const d=this.getTransformTemplate();this.prevTransformTemplateValue=d?d(this.latestValues,""):void 0,this.updateSnapshot(),a&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(ex);return}this.isUpdating||this.nodes.forEach(Q6),this.isUpdating=!1,this.nodes.forEach(eR),this.nodes.forEach(q6),this.nodes.forEach(K6),this.clearAllSnapshots();const c=Nn.now();vt.delta=Xn(0,1e3/60,c-vt.timestamp),vt.timestamp=c,vt.isProcessing=!0,Sf.update.process(vt),Sf.preRender.process(vt),Sf.render.process(vt),vt.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Cf.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(J6),this.sharedNodes.forEach(iR)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,He.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){He.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!_t(this.snapshot.measuredBox.x)&&!_t(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 u=0;u<this.path.length;u++)this.path[u].updateScroll();const a=this.layout;this.layout=this.measure(!1),this.layoutCorrected=lt(),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 u=r(this.instance);this.scroll={animationId:this.root.animationId,phase:a,isRoot:u,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:u}}}resetTransform(){if(!i)return;const a=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,c=this.projectionDelta&&!G1(this.projectionDelta),u=this.getTransformTemplate(),d=u?u(this.latestValues,""):void 0,h=d!==this.prevTransformTemplateValue;a&&(c||oi(this.latestValues)||h)&&(i(this.instance,d),this.shouldResetTransform=!1,this.scheduleRender())}measure(a=!0){const c=this.measurePageBox();let u=this.removeElementScroll(c);return a&&(u=this.removeTransform(u)),lR(u),{animationId:this.root.animationId,measuredBox:c,layoutBox:u,latestValues:{},source:this.id}}measurePageBox(){var a;const{visualElement:c}=this.options;if(!c)return lt();const u=c.measureViewportBox();if(!(((a=this.scroll)===null||a===void 0?void 0:a.wasRoot)||this.path.some(cR))){const{scroll:h}=this.root;h&&(ls(u.x,h.offset.x),ls(u.y,h.offset.y))}return u}removeElementScroll(a){var c;const u=lt();if(sn(u,a),!((c=this.scroll)===null||c===void 0)&&c.wasRoot)return u;for(let d=0;d<this.path.length;d++){const h=this.path[d],{scroll:m,options:g}=h;h!==this.root&&m&&g.layoutScroll&&(m.wasRoot&&sn(u,a),ls(u.x,m.offset.x),ls(u.y,m.offset.y))}return u}applyTransform(a,c=!1){const u=lt();sn(u,a);for(let d=0;d<this.path.length;d++){const h=this.path[d];!c&&h.options.layoutScroll&&h.scroll&&h!==h.root&&cs(u,{x:-h.scroll.offset.x,y:-h.scroll.offset.y}),oi(h.latestValues)&&cs(u,h.latestValues)}return oi(this.latestValues)&&cs(u,this.latestValues),u}removeTransform(a){const c=lt();sn(c,a);for(let u=0;u<this.path.length;u++){const d=this.path[u];if(!d.instance||!oi(d.latestValues))continue;yd(d.latestValues)&&d.updateSnapshot();const h=lt(),m=d.measurePageBox();sn(h,m),U1(c,d.latestValues,d.snapshot?d.snapshot.layoutBox:void 0,h)}return oi(this.latestValues)&&U1(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!==vt.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(a=!1){var c;const u=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=u.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=u.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=u.isSharedProjectionDirty);const d=!!this.resumingFrom||this!==u;if(!(a||d&&this.isSharedProjectionDirty||this.isProjectionDirty||!((c=this.parent)===null||c===void 0)&&c.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:m,layoutId:g}=this.options;if(!(!this.layout||!(m||g))){if(this.resolvedRelativeTargetAt=vt.timestamp,!this.targetDelta&&!this.relativeTarget){const y=this.getClosestProjectingParent();y&&y.layout&&this.animationProgress!==1?(this.relativeParent=y,this.forceRelativeParentToResolveTarget(),this.relativeTarget=lt(),this.relativeTargetOrigin=lt(),Mo(this.relativeTargetOrigin,this.layout.layoutBox,y.layout.layoutBox),sn(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=lt(),this.targetWithTransforms=lt()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),f6(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):sn(this.target,this.layout.layoutBox),y1(this.target,this.targetDelta)):sn(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const y=this.getClosestProjectingParent();y&&!!y.resumingFrom==!!this.resumingFrom&&!y.options.layoutScroll&&y.target&&this.animationProgress!==1?(this.relativeParent=y,this.forceRelativeParentToResolveTarget(),this.relativeTarget=lt(),this.relativeTargetOrigin=lt(),Mo(this.relativeTargetOrigin,this.target,y.target),sn(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||yd(this.parent.latestValues)||m1(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(),u=!!this.resumingFrom||this!==c;let d=!0;if((this.isProjectionDirty||!((a=this.parent)===null||a===void 0)&&a.isProjectionDirty)&&(d=!1),u&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(d=!1),this.resolvedRelativeTargetAt===vt.timestamp&&(d=!1),d)return;const{layout:h,layoutId:m}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(h||m))return;sn(this.layoutCorrected,this.layout.layoutBox);const g=this.treeScale.x,y=this.treeScale.y;d6(this.layoutCorrected,this.treeScale,this.path,u),c.layout&&!c.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(c.target=c.layout.layoutBox,c.targetWithTransforms=lt());const{target:S}=c;if(!S){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(V1(this.prevProjectionDelta.x,this.projectionDelta.x),V1(this.prevProjectionDelta.y,this.projectionDelta.y)),Oo(this.projectionDelta,this.layoutCorrected,S,this.latestValues),(this.treeScale.x!==g||this.treeScale.y!==y||!X1(this.projectionDelta.x,this.prevProjectionDelta.x)||!X1(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",S))}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 u=this.getStack();u&&u.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=as(),this.projectionDelta=as(),this.projectionDeltaWithTransform=as()}setAnimationOrigin(a,c=!1){const u=this.snapshot,d=u?u.latestValues:{},h={...this.latestValues},m=as();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!c;const g=lt(),y=u?u.source:void 0,S=this.layout?this.layout.source:void 0,b=y!==S,E=this.getStack(),w=!E||E.members.length<=1,P=!!(b&&!w&&this.options.crossfade===!0&&!this.path.some(oR));this.animationProgress=0;let O;this.mixTargetDelta=$=>{const A=$/1e3;nx(m.x,a.x,A),nx(m.y,a.y,A),this.setTargetDelta(m),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Mo(g,this.layout.layoutBox,this.relativeParent.layout.layoutBox),sR(this.relativeTarget,this.relativeTargetOrigin,g,A),O&&U6(this.relativeTarget,O)&&(this.isProjectionDirty=!1),O||(O=lt()),sn(O,this.relativeTarget)),b&&(this.animationValues=h,k6(h,d,this.latestValues,A,P,w)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=A},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&&(Cr(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=He.update(()=>{el.hasAnimatedSinceResize=!0,this.currentAnimation=I6(0,Z1,{...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(Z1),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const a=this.getLead();let{targetWithTransforms:c,target:u,layout:d,latestValues:h}=a;if(!(!c||!u||!d)){if(this!==a&&this.layout&&d&&ax(this.options.animationType,this.layout.layoutBox,d.layoutBox)){u=this.target||lt();const m=_t(this.layout.layoutBox.x);u.x.min=a.target.x.min,u.x.max=u.x.min+m;const g=_t(this.layout.layoutBox.y);u.y.min=a.target.y.min,u.y.max=u.y.min+g}sn(c,u),cs(c,h),Oo(this.projectionDeltaWithTransform,this.layoutCorrected,c,h)}}registerSharedNode(a,c){this.sharedNodes.has(a)||this.sharedNodes.set(a,new z6),this.sharedNodes.get(a).add(c);const d=c.options.initialPromotionConfig;c.promote({transition:d?d.transition:void 0,preserveFollowOpacity:d&&d.shouldPreserveFollowOpacity?d.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:u}={}){const d=this.getStack();d&&d.promote(this,u),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:u}=a;if((u.z||u.rotate||u.rotateX||u.rotateY||u.rotateZ||u.skewX||u.skewY)&&(c=!0),!c)return;const d={};u.z&&Td("z",a,d,this.animationValues);for(let h=0;h<Sd.length;h++)Td(`rotate${Sd[h]}`,a,d,this.animationValues),Td(`skew${Sd[h]}`,a,d,this.animationValues);a.render();for(const h in d)a.setStaticValue(h,d[h]),this.animationValues&&(this.animationValues[h]=d[h]);a.scheduleRender()}getProjectionStyles(a){var c,u;if(!this.instance||this.isSVG)return;if(!this.isVisible)return Y6;const d={visibility:""},h=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,d.opacity="",d.pointerEvents=Ya(a==null?void 0:a.pointerEvents)||"",d.transform=h?h(this.latestValues,""):"none",d;const m=this.getLead();if(!this.projectionDelta||!this.layout||!m.target){const b={};return this.options.layoutId&&(b.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,b.pointerEvents=Ya(a==null?void 0:a.pointerEvents)||""),this.hasProjected&&!oi(this.latestValues)&&(b.transform=h?h({},""):"none",this.hasProjected=!1),b}const g=m.animationValues||m.latestValues;this.applyTransformsToTarget(),d.transform=G6(this.projectionDeltaWithTransform,this.treeScale,g),h&&(d.transform=h(g,d.transform));const{x:y,y:S}=this.projectionDelta;d.transformOrigin=`${y.origin*100}% ${S.origin*100}% 0`,m.animationValues?d.opacity=m===this?(u=(c=g.opacity)!==null&&c!==void 0?c:this.latestValues.opacity)!==null&&u!==void 0?u:1:this.preserveOpacity?this.latestValues.opacity:g.opacityExit:d.opacity=m===this?g.opacity!==void 0?g.opacity:"":g.opacityExit!==void 0?g.opacityExit:0;for(const b in mo){if(g[b]===void 0)continue;const{correct:E,applyTo:w,isCSSVariable:P}=mo[b],O=d.transform==="none"?g[b]:E(g[b],m);if(w){const $=w.length;for(let A=0;A<$;A++)d[w[A]]=O}else P?this.options.visualElement.renderState.vars[b]=O:d[b]=O}return this.options.layoutId&&(d.pointerEvents=m===this?Ya(a==null?void 0:a.pointerEvents)||"":"none"),d}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(ex),this.root.sharedNodes.clear()}}}function q6(e){e.updateLayout()}function K6(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:r,measuredBox:i}=e.layout,{animationType:o}=e.options,a=n.source!==e.layout.source;o==="size"?rn(m=>{const g=a?n.measuredBox[m]:n.layoutBox[m],y=_t(g);g.min=r[m].min,g.max=g.min+y}):ax(o,n.layoutBox,r)&&rn(m=>{const g=a?n.measuredBox[m]:n.layoutBox[m],y=_t(r[m]);g.max=g.min+y,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[m].max=e.relativeTarget[m].min+y)});const c=as();Oo(c,r,n.layoutBox);const u=as();a?Oo(u,e.applyTransform(i,!0),n.measuredBox):Oo(u,r,n.layoutBox);const d=!G1(c);let h=!1;if(!e.resumeFrom){const m=e.getClosestProjectingParent();if(m&&!m.resumeFrom){const{snapshot:g,layout:y}=m;if(g&&y){const S=lt();Mo(S,n.layoutBox,g.layoutBox);const b=lt();Mo(b,r,y.layoutBox),q1(S,b)||(h=!0),m.options.layoutRoot&&(e.relativeTarget=b,e.relativeTargetOrigin=S,e.relativeParent=m)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:n,delta:u,layoutDelta:c,hasLayoutChanged:d,hasRelativeLayoutChanged:h})}else if(e.isLead()){const{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function X6(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 Z6(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function J6(e){e.clearSnapshot()}function ex(e){e.clearMeasurements()}function Q6(e){e.isLayoutDirty=!1}function eR(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function tx(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function tR(e){e.resolveTargetDelta()}function nR(e){e.calcProjection()}function rR(e){e.resetSkewAndRotation()}function iR(e){e.removeLeadSnapshot()}function nx(e,t,n){e.translate=rt(t.translate,0,n),e.scale=rt(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function rx(e,t,n,r){e.min=rt(t.min,n.min,r),e.max=rt(t.max,n.max,r)}function sR(e,t,n,r){rx(e.x,t.x,n.x,r),rx(e.y,t.y,n.y,r)}function oR(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}const aR={duration:.45,ease:[.4,0,.1,1]},ix=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),sx=ix("applewebkit/")&&!ix("chrome/")?Math.round:Nt;function ox(e){e.min=sx(e.min),e.max=sx(e.max)}function lR(e){ox(e.x),ox(e.y)}function ax(e,t,n){return e==="position"||e==="preserve-aspect"&&!u6(K1(t),K1(n),.2)}function cR(e){var t;return e!==e.root&&((t=e.scroll)===null||t===void 0?void 0:t.wasRoot)}const uR=Q1({attachResizeListener:(e,t)=>Co(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Ed={current:void 0},lx=Q1({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Ed.current){const e=new uR({});e.mount(window),e.setOptions({layoutScroll:!0}),Ed.current=e}return Ed.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),fR={pan:{Feature:A6},drag:{Feature:P6,ProjectionNode:lx,MeasureLayout:$1}};function dR(e,t,n){var r;if(e instanceof EventTarget)return[e];if(typeof e=="string"){let i=document;const o=(r=void 0)!==null&&r!==void 0?r:i.querySelectorAll(e);return o?Array.from(o):[]}return Array.from(e)}function cx(e,t){const n=dR(e),r=new AbortController,i={passive:!0,...t,signal:r.signal};return[n,i,()=>r.abort()]}function ux(e){return!(e.pointerType==="touch"||s1())}function hR(e,t,n={}){const[r,i,o]=cx(e,n),a=c=>{if(!ux(c))return;const{target:u}=c,d=t(u,c);if(typeof d!="function"||!u)return;const h=m=>{ux(m)&&(d(m),u.removeEventListener("pointerleave",h))};u.addEventListener("pointerleave",h,i)};return r.forEach(c=>{c.addEventListener("pointerenter",a,i)}),o}function fx(e,t,n){const{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover",n==="Start");const i="onHover"+n,o=r[i];o&&He.postRender(()=>o(t,Po(t)))}class mR extends Or{mount(){const{current:t}=this.node;t&&(this.unmount=hR(t,(n,r)=>(fx(this.node,r,"Start"),i=>fx(this.node,i,"End"))))}unmount(){}}class pR extends Or{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=To(Co(this.node.current,"focus",()=>this.onFocus()),Co(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const dx=(e,t)=>t?e===t?!0:dx(e,t.parentElement):!1,gR=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function yR(e){return gR.has(e.tagName)||e.tabIndex!==-1}const Io=new WeakSet;function hx(e){return t=>{t.key==="Enter"&&e(t)}}function Cd(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const vR=(e,t)=>{const n=e.currentTarget;if(!n)return;const r=hx(()=>{if(Io.has(n))return;Cd(n,"down");const i=hx(()=>{Cd(n,"up")}),o=()=>Cd(n,"cancel");n.addEventListener("keyup",i,t),n.addEventListener("blur",o,t)});n.addEventListener("keydown",r,t),n.addEventListener("blur",()=>n.removeEventListener("keydown",r),t)};function mx(e){return pd(e)&&!s1()}function bR(e,t,n={}){const[r,i,o]=cx(e,n),a=c=>{const u=c.currentTarget;if(!mx(c)||Io.has(u))return;Io.add(u);const d=t(u,c),h=(y,S)=>{window.removeEventListener("pointerup",m),window.removeEventListener("pointercancel",g),!(!mx(y)||!Io.has(u))&&(Io.delete(u),typeof d=="function"&&d(y,{success:S}))},m=y=>{h(y,u===window||u===document||n.useGlobalTarget||dx(u,y.target))},g=y=>{h(y,!1)};window.addEventListener("pointerup",m,i),window.addEventListener("pointercancel",g,i)};return r.forEach(c=>{(n.useGlobalTarget?window:c).addEventListener("pointerdown",a,i),c instanceof HTMLElement&&(c.addEventListener("focus",d=>vR(d,i)),!yR(c)&&c.tabIndex===null&&(c.tabIndex=0))}),o}function px(e,t,n){const{props:r}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&r.whileTap&&e.animationState.setActive("whileTap",n==="Start");const i="onTap"+(n==="End"?"":n),o=r[i];o&&He.postRender(()=>o(t,Po(t)))}class xR extends Or{mount(){const{current:t}=this.node;t&&(this.unmount=bR(t,(n,r)=>(px(this.node,r,"Start"),(i,{success:o})=>px(this.node,i,o?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Pd=new WeakMap,Ad=new WeakMap,wR=e=>{const t=Pd.get(e.target);t&&t(e)},SR=e=>{e.forEach(wR)};function TR({root:e,...t}){const n=e||document;Ad.has(n)||Ad.set(n,{});const r=Ad.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(SR,{root:e,...t})),r[i]}function ER(e,t,n){const r=TR(t);return Pd.set(e,n),r.observe(e),()=>{Pd.delete(e),r.unobserve(e)}}const CR={some:0,all:1};class PR extends Or{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:t={}}=this.node.getProps(),{root:n,margin:r,amount:i="some",once:o}=t,a={root:n?n.current:void 0,rootMargin:r,threshold:typeof i=="number"?i:CR[i]},c=u=>{const{isIntersecting:d}=u;if(this.isInView===d||(this.isInView=d,o&&!d&&this.hasEnteredView))return;d&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",d);const{onViewportEnter:h,onViewportLeave:m}=this.node.getProps(),g=d?h:m;g&&g(u)};return ER(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(AR(t,n))&&this.startObserver()}unmount(){}}function AR({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}const OR={inView:{Feature:PR},tap:{Feature:xR},focus:{Feature:pR},hover:{Feature:mR}},MR={layout:{ProjectionNode:lx,MeasureLayout:$1}},Od={current:null},gx={current:!1};function _R(){if(gx.current=!0,!!xf)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Od.current=e.matches;e.addListener(t),t()}else Od.current=!1}const IR=[...Nb,Ct,Ar],DR=e=>IR.find(Rb(e)),$R=new WeakMap;function RR(e,t,n){for(const r in t){const i=t[r],o=n[r];if(Et(i))e.addValue(r,i),process.env.NODE_ENV==="development"&&Ba(i.version==="12.6.2",`Attempting to mix Motion versions ${i.version} with 12.6.2 may not work as expected.`);else if(Et(o))e.addValue(r,vo(i,{owner:e}));else if(o!==i)if(e.hasValue(r)){const a=e.getValue(r);a.liveStyle===!0?a.jump(i):a.hasAnimated||a.set(i)}else{const a=e.getStaticValue(r);e.addValue(r,vo(a!==void 0?a:i,{owner:e}))}}for(const r in n)t[r]===void 0&&e.removeValue(r);return t}const yx=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class NR{scrapeMotionValuesFromProps(t,n,r){return{}}constructor({parent:t,props:n,presenceContext:r,reducedMotionConfig:i,blockInitialAnimation:o,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=sd,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 y=Nn.now();this.renderScheduledAt<y&&(this.renderScheduledAt=y,He.render(this.render,!1,!0))};const{latestValues:u,renderState:d,onUpdate:h}=a;this.onUpdate=h,this.latestValues=u,this.baseTarget={...u},this.initialValues=n.initial?{...u}:{},this.renderState=d,this.parent=t,this.props=n,this.presenceContext=r,this.depth=t?t.depth+1:0,this.reducedMotionConfig=i,this.options=c,this.blockInitialAnimation=!!o,this.isControllingVariants=za(n),this.isVariantNode=$v(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);const{willChange:m,...g}=this.scrapeMotionValuesFromProps(n,{},this);for(const y in g){const S=g[y];u[y]!==void 0&&Et(S)&&S.set(u[y],!1)}}mount(t){this.current=t,$R.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,r)=>this.bindToMotionValue(r,n)),gx.current||_R(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Od.current,process.env.NODE_ENV!=="production"&&Ba(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(),Cr(this.notifyUpdate),Cr(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 r=ti.has(t);r&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",c=>{this.latestValues[t]=c,this.props.onUpdate&&He.preRender(this.notifyUpdate),r&&this.projection&&(this.projection.isTransformDirty=!0)}),o=n.on("renderRequest",this.scheduleRender);let a;window.MotionCheckAppearSync&&(a=window.MotionCheckAppearSync(this,t,n)),this.valueSubscriptions.set(t,()=>{i(),o(),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 es){const n=es[t];if(!n)continue;const{isEnabled:r,Feature:i}=n;if(!this.features[t]&&i&&r(this.props)&&(this.features[t]=new i(this)),this.features[t]){const o=this.features[t];o.isMounted?o.update():(o.mount(),o.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):lt()}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 r=0;r<yx.length;r++){const i=yx[r];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const o="on"+i,a=t[o];a&&(this.propEventSubscriptions[i]=this.on(i,a))}this.prevMotionValues=RR(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 r=this.values.get(t);n!==r&&(r&&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 r=this.values.get(t);return r===void 0&&n!==void 0&&(r=vo(n===null?void 0:n,{owner:this}),this.addValue(t,r)),r}readValue(t,n){var r;let i=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:(r=this.getBaseTargetFromProps(this.props,t))!==null&&r!==void 0?r:this.readValueFromInstance(this.current,t,this.options);return i!=null&&(typeof i=="string"&&(Db(i)||gb(i))?i=parseFloat(i):!DR(i)&&Ar.test(n)&&(i=Eb(t,n)),this.setBaseTarget(t,Et(i)?i.get():i)),Et(i)?i.get():i}setBaseTarget(t,n){this.baseTarget[t]=n}getBaseTarget(t){var n;const{initial:r}=this.props;let i;if(typeof r=="string"||typeof r=="object"){const a=Nf(this.props,r,(n=this.presenceContext)===null||n===void 0?void 0:n.custom);a&&(i=a[t])}if(r&&i!==void 0)return i;const o=this.getBaseTargetFromProps(this.props,t);return o!==void 0&&!Et(o)?o:this.initialValues[t]!==void 0&&i===void 0?void 0:this.baseTarget[t]}on(t,n){return this.events[t]||(this.events[t]=new Bf),this.events[t].add(n)}notify(t,...n){this.events[t]&&this.events[t].notify(...n)}}class vx extends NR{constructor(){super(...arguments),this.KeyframeResolver=kb}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:r}){delete n[t],delete r[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:t}=this.props;Et(t)&&(this.childSubscription=t.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function LR(e){return window.getComputedStyle(e)}class kR extends vx{constructor(){super(...arguments),this.type="html",this.renderInstance=Kv}readValueFromInstance(t,n){if(ti.has(n))return W$(t,n);{const r=LR(t),i=(Af(n)?r.getPropertyValue(n):r[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(t,{transformPagePoint:n}){return w1(t,n)}build(t,n,r){_f(t,n,r.transformTemplate)}scrapeMotionValuesFromProps(t,n,r){return kf(t,n,r)}}class jR extends vx{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=lt,this.updateDimensions=()=>{this.current&&!this.renderState.dimensions&&qv(this.current,this.renderState)}}getBaseTargetFromProps(t,n){return t[n]}readValueFromInstance(t,n){if(ti.has(n)){const r=Tb(n);return r&&r.default||0}return n=Xv.has(n)?n:Pf(n),t.getAttribute(n)}scrapeMotionValuesFromProps(t,n,r){return Jv(t,n,r)}onBindTransform(){this.current&&!this.renderState.dimensions&&He.postRender(this.updateDimensions)}build(t,n,r){$f(t,n,this.isSVGTag,r.transformTemplate)}renderInstance(t,n,r,i){Zv(t,n,r,i)}mount(t){this.isSVGTag=Rf(t.tagName),super.mount(t)}}const FR=(e,t)=>Df(e)?new jR(t):new kR(t,{allowProjection:e!==I.Fragment}),VR=a$({...t6,...OR,...fR,...MR},FR),Ze=ED(VR),Md={defaultColorScheme:"aqua",t:e=>e},bx=I.createContext(Md),ze=()=>I.useContext(bx),xx=({title:e,description:t,open:n,onClose:r,onConfirm:i,onCancel:o})=>{const{t:a}=ze(),c={hidden:{opacity:0},visible:{opacity:1}},u={hidden:{opacity:0,scale:.8,y:-20},visible:{opacity:1,scale:1,y:0,transition:{type:"spring",stiffness:300,damping:25}},exit:{opacity:0,scale:.8,y:20,transition:{duration:.2}}},d=()=>{i==null||i(),r()},h=()=>{o==null||o(),r()};return v.jsx(Kn,{children:n&&v.jsx(v.Fragment,{children:v.jsx(Ze.div,{className:"fixed inset-0 bg-black/50 z-9999 flex items-center justify-center",initial:"hidden",animate:"visible",exit:"hidden",variants:c,onClick:r,children:v.jsx(Ze.div,{className:"w-full max-w-4xl mx-16 z-50",variants:u,initial:"hidden",animate:"visible",exit:"exit",onClick:m=>m.stopPropagation(),children:v.jsxs(bs,{className:"flex flex-col gap-16 p-32",children:[v.jsxs("div",{className:"flex justify-between items-center gap-16",children:[v.jsx("h3",{className:"text-black font-700 text-3xl",children:e}),v.jsx(De,{icon:tu,className:"cursor-pointer text-2xl text-gray-500 transition-all duration-300 hover:text-gray-700",onClick:r})]}),v.jsx("p",{className:"text-gray-500 text-xl font-600",children:t}),v.jsxs("div",{className:"flex justify-end w-full gap-16",children:[o&&v.jsx(jo,{onClick:h,variant:"transparent",className:"px-24 py-10! text-lg!",children:a("cancel")}),i&&v.jsx(jo,{onClick:d,className:"px-24 py-16 text-lg!",children:a("confirm")})]})]})})})})})};/*!
660
660
  * Font Awesome Pro 6.7.2 by @fontawesome - https://fontawesome.com
661
661
  * License - https://fontawesome.com/license (Commercial License)
662
662
  * Copyright 2024 Fonticons, Inc.
@@ -684,7 +684,7 @@ function print() { __p += __j.call(arguments, '') }
684
684
  group-focus-within:border-blue-500 transition-colors duration-200 ease-in-out
685
685
  ${u&&"hover:!cursor-pointer"}
686
686
  group-disabled:bg-gray-500
687
- `,children:[d&&d,v.jsx("input",{...m,id:r,name:r,disabled:c,placeholder:o,value:n,onChange:y=>{t(y.target.value)},className:`group bg-transparent w-full h-full font-600 placeholder:font-600 text-body-m disabled:text-gray-300 disabled:placeholder:text-gray-300 placeholder:text-gray-400 disabled:cursor-not-allowed overflow-visible outline-none ${u&&"pointer-events-none !select-none !caret-transparent"}`}),h&&h]}),v.jsx("h4",{className:"font-500 text-label text-red-500 leading-none",children:i&&g(i||"",{x:g(r)})})]})},tw=e=>$n(e,"dd/MM/yyyy"),nw=e=>{const[t,n,r]=e.split("/");if((t==null?void 0:t.length)===2&&(n==null?void 0:n.length)===2&&(r==null?void 0:r.length)===4){const i=new Date(Number(r),Number(n)-1,Number(t));return isNaN(i.getTime())?null:i}return null},iN=({control:e,name:t,showTimeSelector:n=!1,label:r,translateKey:i="",placeholder:o})=>{const{field:{value:a,onChange:c,onBlur:u},fieldState:{error:d}}=hr.useController({name:t,control:e}),{t:h}=ze(),m=h(t),g=h(i),[y,S]=I.useState(!1),[b,E]=I.useState("");I.useEffect(()=>{a instanceof Date&&!isNaN(a.getTime())?E(tw(a)):E("")},[a]);const w=nw(b),P=$=>{const A=$.replace(/\D/g,"").slice(0,8),R=[];A.length>0&&R.push(A.slice(0,2)),A.length>2&&R.push(A.slice(2,4)),A.length>4&&R.push(A.slice(4,8));const V=R.join("/");if(E(V),S(!1),V.length===10){const F=nw(V);c(F)}},O=()=>{c(null),E("")};return v.jsx(Lo,{open:y,strategy:"fixed",padding:0,offset:0,onClose:()=>S(!1),className:"p-0!",component:v.jsx(Xd,{date:w||new Date,onDateChange:$=>{E(tw($)),c($),S(!1)},showTimeSelector:n,maxDate:new Date}),children:v.jsx(Zd,{onBlur:u,name:g||m,label:r,value:b,onFocus:$=>{$.preventDefault(),S(!0)},disabledInput:!0,onChange:$=>P($),placeholder:o,error:d==null?void 0:d.message,rightSide:!!w&&v.jsx(De,{icon:nv,className:"text-gray-500 cursor-pointer",onClick:O})})})},rw=({title:e,description:t,open:n,onClose:r,onConfirm:i,onCancel:o,icon:a=GR})=>{const c={hidden:{opacity:0},visible:{opacity:1}},u={hidden:{opacity:0,scale:.8,y:-20},visible:{opacity:1,scale:1,y:0,transition:{type:"spring",stiffness:300,damping:25}},exit:{opacity:0,scale:.8,y:20,transition:{duration:.2}}},d=()=>{i(),r()},h=()=>{o==null||o(),r()},{t:m}=ze();return v.jsx(Kn,{children:n&&v.jsx(v.Fragment,{children:v.jsx(Ze.div,{className:"fixed inset-0 bg-black/50 z-9999 flex items-center justify-center",initial:"hidden",animate:"visible",exit:"hidden",variants:c,onClick:r,children:v.jsx(Ze.div,{className:"w-full max-w-sm mx-16 z-50",variants:u,initial:"hidden",animate:"visible",exit:"exit",onClick:g=>g.stopPropagation(),children:v.jsxs(bs,{className:"flex flex-col gap-20 p-32",children:[v.jsxs("div",{className:"flex flex-col",children:[v.jsx("div",{className:"flex justify-end",children:v.jsx(De,{icon:tu,className:"cursor-pointer text-2xl text-gray-500 transition-all duration-300 hover:text-gray-700",onClick:r})}),v.jsx("div",{className:"flex justify-center",children:v.jsx("div",{className:"bg-blue-100 rounded-full w-76 h-76 flex justify-center items-center",children:v.jsx(De,{icon:a,className:"w-32 h-36 min-h-36 min-w-36 text-blue-500",onClick:r})})})]}),v.jsxs("div",{className:"flex flex-col gap-20 items-center justify-center",children:[v.jsxs("div",{className:"text-center w-full",children:[v.jsx("h3",{className:"text-black font-700 text-3xl w-full",children:e}),v.jsx("p",{className:"text-gray-500 text-xl font-600 w-full",children:t})]}),v.jsxs("div",{className:"flex justify-center w-full gap-16",children:[!!o&&v.jsx(jo,{size:"lg",onClick:h,variant:"transparent",children:m("cancel")}),v.jsx(jo,{size:"lg",onClick:d,children:m("confirm")})]})]})]})})})})})},iw={duration:.3,ease:[.32,.72,0,1]},sN={initial:{opacity:0,height:0,y:-8},animate:{opacity:1,height:"auto",y:0},exit:{opacity:0,height:0,y:-8}},oN=({isOpen:e})=>v.jsx(Ze.div,{animate:{rotate:e?180:0},transition:{duration:.5,ease:[.16,1,.3,1]},children:v.jsx(De,{icon:WR,className:"text-gray-500 w-12 h-12 max-w-12 max-h-12"})}),aN=({label:e,children:t,subtitle:n,open:r,onClick:i,className:o="",labelClassName:a=""})=>{const{t:c}=ze(),[u,d]=I.useState(!1),h=r!==void 0?r:u,m=i||(()=>d(!u));return v.jsxs(Ze.div,{className:"relative w-full bg-white border border-blue-100 rounded-2xl overflow-hidden",children:[v.jsxs("button",{onClick:m,className:`py-24 px-32 text-black font-semibold border-b
687
+ `,children:[d&&d,v.jsx("input",{...m,id:r,name:r,disabled:c,placeholder:o,value:n,onChange:y=>{t(y.target.value)},className:`group bg-transparent w-full h-full font-600 placeholder:font-600 text-body-m disabled:text-gray-300 disabled:placeholder:text-gray-300 placeholder:text-gray-400 disabled:cursor-not-allowed overflow-visible outline-none ${u&&"pointer-events-none !select-none !caret-transparent"}`}),h&&h]}),v.jsx("h4",{className:"font-500 text-label text-red-500 leading-none",children:i&&g(i||"",{x:g(r)})})]})},tw=e=>$n(e,"dd/MM/yyyy"),nw=e=>{const[t,n,r]=e.split("/");if((t==null?void 0:t.length)===2&&(n==null?void 0:n.length)===2&&(r==null?void 0:r.length)===4){const i=new Date(Number(r),Number(n)-1,Number(t));return isNaN(i.getTime())?null:i}return null},iN=({control:e,name:t,showTimeSelector:n=!1,label:r,translateKey:i="",placeholder:o})=>{const{field:{value:a,onChange:c,onBlur:u},fieldState:{error:d}}=hr.useController({name:t,control:e}),{t:h}=ze(),m=h(t),g=h(i),[y,S]=I.useState(!1),[b,E]=I.useState("");I.useEffect(()=>{a instanceof Date&&!isNaN(a.getTime())?E(tw(a)):E("")},[a]);const w=nw(b),P=$=>{const A=$.replace(/\D/g,"").slice(0,8),R=[];A.length>0&&R.push(A.slice(0,2)),A.length>2&&R.push(A.slice(2,4)),A.length>4&&R.push(A.slice(4,8));const V=R.join("/");if(E(V),S(!1),V.length===10){const F=nw(V);c(F)}},O=()=>{c(null),E("")};return v.jsx(Lo,{open:y,strategy:"fixed",padding:0,offset:0,onClose:()=>S(!1),className:"p-0!",component:v.jsx(Xd,{date:w||new Date,onDateChange:$=>{E(tw($)),c($),S(!1)},showTimeSelector:n,maxDate:new Date}),children:v.jsx(Zd,{onBlur:u,name:g||m,label:r,value:b,onFocus:$=>{$.preventDefault(),S(!0)},disabledInput:!0,onChange:$=>P($),placeholder:o,error:d==null?void 0:d.message,rightSide:!!w&&v.jsx(De,{icon:nv,className:"text-gray-500 cursor-pointer",onClick:O})})})},rw=({title:e,description:t,open:n,onClose:r,onConfirm:i,onCancel:o,icon:a=GR})=>{const c={hidden:{opacity:0},visible:{opacity:1}},u={hidden:{opacity:0,scale:.8,y:-20},visible:{opacity:1,scale:1,y:0,transition:{type:"spring",stiffness:300,damping:25}},exit:{opacity:0,scale:.8,y:20,transition:{duration:.2}}},d=()=>{i==null||i(),r()},h=()=>{o==null||o(),r()},{t:m}=ze();return v.jsx(Kn,{children:n&&v.jsx(v.Fragment,{children:v.jsx(Ze.div,{className:"fixed inset-0 bg-black/50 z-9999 flex items-center justify-center",initial:"hidden",animate:"visible",exit:"hidden",variants:c,onClick:r,children:v.jsx(Ze.div,{className:"w-full max-w-sm mx-16 z-50",variants:u,initial:"hidden",animate:"visible",exit:"exit",onClick:g=>g.stopPropagation(),children:v.jsxs(bs,{className:"flex flex-col gap-20 p-32",children:[v.jsxs("div",{className:"flex flex-col",children:[v.jsx("div",{className:"flex justify-end",children:v.jsx(De,{icon:tu,className:"cursor-pointer text-2xl text-gray-500 transition-all duration-300 hover:text-gray-700",onClick:r})}),v.jsx("div",{className:"flex justify-center",children:v.jsx("div",{className:"bg-blue-100 rounded-full w-76 h-76 flex justify-center items-center",children:v.jsx(De,{icon:a,className:"w-32 h-36 min-h-36 min-w-36 text-blue-500",onClick:r})})})]}),v.jsxs("div",{className:"flex flex-col gap-20 items-center justify-center",children:[v.jsxs("div",{className:"text-center w-full",children:[v.jsx("h3",{className:"text-black font-700 text-3xl w-full",children:e}),v.jsx("p",{className:"text-gray-500 text-xl font-600 w-full",children:t})]}),v.jsxs("div",{className:"flex justify-center w-full gap-16",children:[!!o&&v.jsx(jo,{size:"lg",onClick:h,variant:"transparent",children:m("cancel")}),!!i&&v.jsx(jo,{size:"lg",onClick:d,children:m("confirm")})]})]})]})})})})})},iw={duration:.3,ease:[.32,.72,0,1]},sN={initial:{opacity:0,height:0,y:-8},animate:{opacity:1,height:"auto",y:0},exit:{opacity:0,height:0,y:-8}},oN=({isOpen:e})=>v.jsx(Ze.div,{animate:{rotate:e?180:0},transition:{duration:.5,ease:[.16,1,.3,1]},children:v.jsx(De,{icon:WR,className:"text-gray-500 w-12 h-12 max-w-12 max-h-12"})}),aN=({label:e,children:t,subtitle:n,open:r,onClick:i,className:o="",labelClassName:a=""})=>{const{t:c}=ze(),[u,d]=I.useState(!1),h=r!==void 0?r:u,m=i||(()=>d(!u));return v.jsxs(Ze.div,{className:"relative w-full bg-white border border-blue-100 rounded-2xl overflow-hidden",children:[v.jsxs("button",{onClick:m,className:`py-24 px-32 text-black font-semibold border-b
688
688
  ${h?"border-blue-100 bg-gray-50/50":"border-transparent"}
689
689
  transition-all duration-200 ease-in-out ${a} focus:outline-none hover:bg-gray-50/50
690
690
  flex items-center gap-2 group w-full justify-between`,children:[v.jsx("span",{className:"truncate text-nowrap text-lg md:text-xl font-700",children:c(e)}),v.jsxs("div",{className:"flex gap-10 items-center",children:[v.jsx("span",{className:"text-gray-500 font-normal text-base md:text-lg",children:n}),v.jsx(oN,{isOpen:h})]})]}),v.jsx(Kn,{mode:"wait",children:h&&v.jsx(Ze.div,{...sN,transition:{height:{duration:iw.duration,ease:iw.ease},opacity:{duration:.15,ease:"easeOut"}},className:`w-full bg-white overflow-hidden ${o}`,children:t})})]})},Ht={LOADING:"loading",COMPLETE:"complete",ERROR:"error"},lN=({file:e,onDelete:t,onRetry:n,uploadDuration:r=4e3})=>{const{t:i}=ze(),o=()=>e.error?Ht.ERROR:e.loading?Ht.LOADING:Ht.COMPLETE,[a,c]=I.useState(o()),[u,d]=I.useState(0),[h,m]=I.useState(10);I.useEffect(()=>{const b=o();c(b);let E;if(b===Ht.LOADING&&u<100){const O=100/(r/100);E=setInterval(()=>{d($=>{const A=Math.min($+O,99),R=Math.max(0,Math.round((100-A)/10));return m(R),A})},100)}else b===Ht.COMPLETE&&u<100&&d(100);return()=>{E&&clearInterval(E)}},[e.loading,e.error,r,o,u]);const g=()=>{switch(a){case Ht.LOADING:return`${Math.round(u)}% (${h} ${i("seconds_left")})`;case Ht.COMPLETE:return i("file_uploaded");case Ht.ERROR:return i("upload_error");default:return""}},y=()=>{switch(a){case Ht.COMPLETE:return"text-green-500 font-600";case Ht.ERROR:return"text-red-500 font-600";default:return"text-gray-300 font-400"}},S=()=>{if(!(e!=null&&e.file_size))return i("unknown");const b=e.file_size/1024;return b<1024?`${b.toFixed(1)} KB`:`${(b/1024).toFixed(1)} MB`};return v.jsxs("div",{className:"border border-gray-100 bg-white rounded-lg p-16 shadow-sm w-full",children:[v.jsxs("div",{className:"flex items-center justify-between",children:[v.jsxs("div",{className:"flex items-center gap-4",children:[v.jsx(De,{icon:zC,className:"w-12 h-12 min-w-12 min-h-12 text-gray-400"}),v.jsx("span",{className:"text-gray-500 text-sm",children:e.user_file_name})]}),a===Ht.COMPLETE&&v.jsx("button",{onClick:t,className:"text-gray-400 transition-all duration-200 hover:text-gray-600 focus:outline-none",children:v.jsx(De,{icon:UC})}),a===Ht.ERROR&&v.jsx("button",{onClick:n,className:"text-gray-400 transition-all duration-200 hover:text-gray-600 focus:outline-none",children:v.jsx(De,{icon:BC})})]}),v.jsx("div",{className:"flex items-center mt-2",children:e!=null&&e.analyzing?v.jsxs("div",{className:"flex items-center gap-6",children:[v.jsx(Ze.div,{className:"h-14 w-14 rounded-full border-2 border-t-blue-500 border-r-blue-300 border-b-blue-200 border-l-blue-400",animate:{rotate:360},transition:{duration:1,repeat:1/0,ease:"linear"}}),v.jsxs("span",{className:"text-sm text-gray-500",children:[i("analyzing_file_with_ai"),"..."]})]}):v.jsxs("div",{className:"text-sm",children:[v.jsxs("span",{className:"text-gray-500",children:[S()," |"]})," ",v.jsx("span",{className:y(),children:g()})]})}),a===Ht.LOADING&&v.jsx("div",{className:"mt-2 bg-gray-200 rounded-full h-2",children:v.jsx("div",{className:"h-2 rounded-full transition-all duration-100 ease-linear bg-blue-500",style:{width:`${u}%`}})})]})},sw=({index:e,label:t,active:n,completed:r})=>v.jsxs("div",{className:"flex items-center gap-8",children:[v.jsx("div",{className:`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lawgic-dev-kit",
3
- "version": "0.15.9",
3
+ "version": "0.16.0",
4
4
  "description": "Componentes de UI para Lawgic",
5
5
  "type": "module",
6
6
  "private": false,