@undp/data-viz 1.4.0 → 1.4.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/AreaChart.cjs +1 -1
- package/dist/AreaChart.js +21 -21
- package/dist/BarGraph.cjs +1 -1
- package/dist/BarGraph.js +7 -7
- package/dist/BeeSwarmChart.cjs +1 -1
- package/dist/BeeSwarmChart.js +2 -2
- package/dist/BiVariateChoroplethMap.cjs +1 -1
- package/dist/BiVariateChoroplethMap.js +5 -5
- package/dist/BulletChart.cjs +1 -1
- package/dist/BulletChart.js +14 -14
- package/dist/ButterflyChart.cjs +1 -1
- package/dist/ButterflyChart.js +9 -9
- package/dist/ChoroplethMap.cjs +1 -1
- package/dist/ChoroplethMap.js +9 -9
- package/dist/CirclePackingGraph.cjs +1 -1
- package/dist/CirclePackingGraph.js +1 -1
- package/dist/CopyTextButton.cjs +7 -7
- package/dist/CopyTextButton.cjs.map +1 -1
- package/dist/CopyTextButton.js +4 -4
- package/dist/CopyTextButton.js.map +1 -1
- package/dist/DataCards.cjs +9 -9
- package/dist/DataCards.cjs.map +1 -1
- package/dist/DataCards.js +93 -93
- package/dist/DataCards.js.map +1 -1
- package/dist/DifferenceLineChart.cjs +1 -1
- package/dist/DifferenceLineChart.js +18 -18
- package/dist/DonutChart.cjs +1 -1
- package/dist/DonutChart.js +1 -1
- package/dist/DotDensityMap.cjs +1 -1
- package/dist/DotDensityMap.js +8 -8
- package/dist/{DropdownSelect-0I2QxaVy.cjs → DropdownSelect-BmE5JaeE.cjs} +6 -6
- package/dist/{DropdownSelect-0I2QxaVy.cjs.map → DropdownSelect-BmE5JaeE.cjs.map} +1 -1
- package/dist/{DropdownSelect-CDC9lEqU.js → DropdownSelect-CeHog_ih.js} +4 -4
- package/dist/{DropdownSelect-CDC9lEqU.js.map → DropdownSelect-CeHog_ih.js.map} +1 -1
- package/dist/DualAxisLineChart.cjs +1 -1
- package/dist/DualAxisLineChart.js +15 -15
- package/dist/DumbbellChart.cjs +1 -1
- package/dist/DumbbellChart.js +13 -13
- package/dist/GeoHubMap.cjs +1 -1
- package/dist/GeoHubMap.js +2 -2
- package/dist/GeoHubMapWithLayerSelection.cjs +1 -1
- package/dist/GeoHubMapWithLayerSelection.js +2 -2
- package/dist/{GraphEl-B6SoGRFW.cjs → GraphEl-B5gAX1IQ.cjs} +2 -2
- package/dist/{GraphEl-B6SoGRFW.cjs.map → GraphEl-B5gAX1IQ.cjs.map} +1 -1
- package/dist/{GraphEl-Cw2tDUb3.js → GraphEl-BdIyscdt.js} +3 -3
- package/dist/{GraphEl-Cw2tDUb3.js.map → GraphEl-BdIyscdt.js.map} +1 -1
- package/dist/GriddedGraphs.cjs +1 -1
- package/dist/GriddedGraphs.js +4 -4
- package/dist/GriddedGraphsFromConfig.cjs +1 -1
- package/dist/GriddedGraphsFromConfig.js +1 -1
- package/dist/HeatMap.cjs +1 -1
- package/dist/HeatMap.js +10 -10
- package/dist/Histogram.cjs +1 -1
- package/dist/Histogram.js +1 -1
- package/dist/LineChartWithConfidenceInterval.cjs +1 -1
- package/dist/LineChartWithConfidenceInterval.js +21 -21
- package/dist/{Modal-CUU6ZK3U.js → Modal-DVVwpKhP.js} +2 -2
- package/dist/{Modal-CUU6ZK3U.js.map → Modal-DVVwpKhP.js.map} +1 -1
- package/dist/{Modal-C_dl0EtQ.cjs → Modal-tXZlLE5s.cjs} +4 -4
- package/dist/{Modal-C_dl0EtQ.cjs.map → Modal-tXZlLE5s.cjs.map} +1 -1
- package/dist/MultiGraphDashboard.cjs +1 -1
- package/dist/MultiGraphDashboard.js +3 -3
- package/dist/MultiGraphDashboardFromConfig.cjs +1 -1
- package/dist/MultiGraphDashboardFromConfig.js +1 -1
- package/dist/MultiGraphDashboardWideToLongFormat.cjs +1 -1
- package/dist/MultiGraphDashboardWideToLongFormat.js +3 -3
- package/dist/MultiGraphDashboardWideToLongFormatFromConfig.cjs +1 -1
- package/dist/MultiGraphDashboardWideToLongFormatFromConfig.js +1 -1
- package/dist/MultiLineAltChart.cjs +1 -1
- package/dist/MultiLineAltChart.js +21 -21
- package/dist/MultiLineChart.cjs +1 -1
- package/dist/MultiLineChart.js +19 -19
- package/dist/ParetoChart.cjs +1 -1
- package/dist/ParetoChart.js +12 -12
- package/dist/PerformanceIntensiveMultiGraphDashboard.cjs +1 -1
- package/dist/PerformanceIntensiveMultiGraphDashboard.js +3 -3
- package/dist/PerformanceIntensiveMultiGraphDashboardFromConfig.cjs +1 -1
- package/dist/PerformanceIntensiveMultiGraphDashboardFromConfig.js +1 -1
- package/dist/PerformanceIntensiveScrollStory.cjs +1 -1
- package/dist/PerformanceIntensiveScrollStory.js +2 -2
- package/dist/RadarChart.cjs +1 -1
- package/dist/RadarChart.js +8 -8
- package/dist/{ReferenceLine-CuFMk0cI.cjs → ReferenceLine-CFVBBN__.cjs} +2 -2
- package/dist/{ReferenceLine-CuFMk0cI.cjs.map → ReferenceLine-CFVBBN__.cjs.map} +1 -1
- package/dist/{ReferenceLine-C1GpoG9d.js → ReferenceLine-CfAW3vKJ.js} +2 -2
- package/dist/{ReferenceLine-C1GpoG9d.js.map → ReferenceLine-CfAW3vKJ.js.map} +1 -1
- package/dist/{RegressionLine-BFwDCTUU.js → RegressionLine-mH7UKOPi.js} +3 -3
- package/dist/{RegressionLine-BFwDCTUU.js.map → RegressionLine-mH7UKOPi.js.map} +1 -1
- package/dist/{RegressionLine-7_rKTHN_.cjs → RegressionLine-xKdiJ8sw.cjs} +2 -2
- package/dist/{RegressionLine-7_rKTHN_.cjs.map → RegressionLine-xKdiJ8sw.cjs.map} +1 -1
- package/dist/SankeyChart.cjs +1 -1
- package/dist/SankeyChart.js +4 -4
- package/dist/ScatterPlot.cjs +1 -1
- package/dist/ScatterPlot.js +13 -13
- package/dist/ScrollStory.cjs +1 -1
- package/dist/ScrollStory.js +2 -2
- package/dist/SimpleLineChart.cjs +1 -1
- package/dist/SimpleLineChart.js +20 -20
- package/dist/SingleGraphDashboard.cjs +1 -1
- package/dist/SingleGraphDashboard.js +4 -4
- package/dist/SingleGraphDashboardFromConfig.cjs +1 -1
- package/dist/SingleGraphDashboardFromConfig.js +1 -1
- package/dist/SingleGraphDashboardGeoHubMapsFromConfig.cjs +1 -1
- package/dist/SingleGraphDashboardGeoHubMapsFromConfig.js +1 -1
- package/dist/SingleGraphDashboardThreeDGraphs.cjs +1 -1
- package/dist/SingleGraphDashboardThreeDGraphs.js +3 -3
- package/dist/SingleGraphDashboardThreeDGraphsFromConfig.cjs +1 -1
- package/dist/SingleGraphDashboardThreeDGraphsFromConfig.js +1 -1
- package/dist/SlopeChart.cjs +1 -1
- package/dist/SlopeChart.js +7 -7
- package/dist/StripChart.cjs +1 -1
- package/dist/StripChart.js +9 -9
- package/dist/ThreeDGlobe.cjs +1 -1
- package/dist/ThreeDGlobe.js +2 -2
- package/dist/TreeMapGraph.cjs +1 -1
- package/dist/TreeMapGraph.js +4 -4
- package/dist/UnitChart.cjs +1 -1
- package/dist/UnitChart.js +3 -3
- package/dist/{XAxesLabels-DQFo_z2R.js → XAxesLabels-CaV2q-6H.js} +2 -2
- package/dist/{XAxesLabels-DQFo_z2R.js.map → XAxesLabels-CaV2q-6H.js.map} +1 -1
- package/dist/{XAxesLabels-CJMQbfVy.cjs → XAxesLabels-OjBNl_lS.cjs} +2 -2
- package/dist/{XAxesLabels-CJMQbfVy.cjs.map → XAxesLabels-OjBNl_lS.cjs.map} +1 -1
- package/dist/{YAxesLabels-H5-002X5.js → YAxesLabels-CPGZjmZJ.js} +2 -2
- package/dist/{YAxesLabels-H5-002X5.js.map → YAxesLabels-CPGZjmZJ.js.map} +1 -1
- package/dist/{YAxesLabels-BXLTX7AI.cjs → YAxesLabels-D8IydyZj.cjs} +2 -2
- package/dist/{YAxesLabels-BXLTX7AI.cjs.map → YAxesLabels-D8IydyZj.cjs.map} +1 -1
- package/dist/{checkIfMultiple-Do4kADNr.cjs → checkIfMultiple-BXbHUCWM.cjs} +6 -6
- package/dist/{checkIfMultiple-Do4kADNr.cjs.map → checkIfMultiple-BXbHUCWM.cjs.map} +1 -1
- package/dist/{checkIfMultiple-CYp3vADF.js → checkIfMultiple-ChTJk2Tk.js} +5 -5
- package/dist/{checkIfMultiple-CYp3vADF.js.map → checkIfMultiple-ChTJk2Tk.js.map} +1 -1
- package/dist/{customArea-CaxScFmW.js → customArea-B-dWU0zZ.js} +2 -2
- package/dist/{customArea-CaxScFmW.js.map → customArea-B-dWU0zZ.js.map} +1 -1
- package/dist/{customArea-BYNyxAkm.cjs → customArea-CK768gCn.cjs} +2 -2
- package/dist/{customArea-BYNyxAkm.cjs.map → customArea-CK768gCn.cjs.map} +1 -1
- package/dist/{fetchAndParseData-Bcmr659B.js → fetchAndParseData-4gsYTy6_.js} +3 -3
- package/dist/fetchAndParseData-4gsYTy6_.js.map +1 -0
- package/dist/{fetchAndParseData-DmgQtB9n.cjs → fetchAndParseData-CQyVGCul.cjs} +6 -6
- package/dist/fetchAndParseData-CQyVGCul.cjs.map +1 -0
- package/dist/fetchAndParseData.cjs +1 -1
- package/dist/fetchAndParseData.js +1 -1
- package/dist/index-BW8iNx7E.cjs +10 -0
- package/dist/index-BW8iNx7E.cjs.map +1 -0
- package/dist/index-CNvov0eg.js +122 -0
- package/dist/index-CNvov0eg.js.map +1 -0
- package/dist/{index-D_n8aamX.cjs → index-CZLvTu6p.cjs} +2 -2
- package/dist/{index-D_n8aamX.cjs.map → index-CZLvTu6p.cjs.map} +1 -1
- package/dist/{index-n_RI8T0n.js → index-Cdcfp4nk.js} +2 -2
- package/dist/{index-n_RI8T0n.js.map → index-Cdcfp4nk.js.map} +1 -1
- package/dist/{index-BVnYktl4.js → index-DGAaLNu9.js} +2 -2
- package/dist/{index-BVnYktl4.js.map → index-DGAaLNu9.js.map} +1 -1
- package/dist/{index-CylX-pWB.cjs → index-DNj994Pv.cjs} +2 -2
- package/dist/{index-CylX-pWB.cjs.map → index-DNj994Pv.cjs.map} +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.js +3 -3
- package/dist/proxy-BHRoeZgd.cjs +2 -0
- package/dist/proxy-BHRoeZgd.cjs.map +1 -0
- package/dist/{proxy-DJxJg1kD.js → proxy-CkpFesk1.js} +4123 -4075
- package/dist/proxy-CkpFesk1.js.map +1 -0
- package/dist/style.css +1 -1
- package/dist/transformData.cjs +1 -1
- package/dist/transformData.js +2 -2
- package/dist/{transformDataForGraphFromFile-D9G3ToQf.cjs → transformDataForGraphFromFile-B1A0AS-Z.cjs} +2 -2
- package/dist/{transformDataForGraphFromFile-D9G3ToQf.cjs.map → transformDataForGraphFromFile-B1A0AS-Z.cjs.map} +1 -1
- package/dist/{transformDataForGraphFromFile-CA0rw80A.js → transformDataForGraphFromFile-BCjsizvb.js} +2 -2
- package/dist/{transformDataForGraphFromFile-CA0rw80A.js.map → transformDataForGraphFromFile-BCjsizvb.js.map} +1 -1
- package/dist/{use-in-view-BCmzDU2O.cjs → use-in-view-sQJZ_xDO.cjs} +2 -2
- package/dist/use-in-view-sQJZ_xDO.cjs.map +1 -0
- package/dist/{use-in-view-BAHrBy6b.js → use-in-view-yS6jzJAp.js} +2 -2
- package/dist/use-in-view-yS6jzJAp.js.map +1 -0
- package/dist/x-BBpi7a_7-Dz2vKSfu.cjs +27 -0
- package/dist/x-BBpi7a_7-Dz2vKSfu.cjs.map +1 -0
- package/dist/x-BBpi7a_7-WVdj1j6r.js +106 -0
- package/dist/x-BBpi7a_7-WVdj1j6r.js.map +1 -0
- package/package.json +50 -51
- package/dist/fetchAndParseData-Bcmr659B.js.map +0 -1
- package/dist/fetchAndParseData-DmgQtB9n.cjs.map +0 -1
- package/dist/index-BxAUvrua.js +0 -120
- package/dist/index-BxAUvrua.js.map +0 -1
- package/dist/index-DVOJ7vxH.cjs +0 -10
- package/dist/index-DVOJ7vxH.cjs.map +0 -1
- package/dist/proxy-DJxJg1kD.js.map +0 -1
- package/dist/proxy-PQd2AItT.cjs +0 -2
- package/dist/proxy-PQd2AItT.cjs.map +0 -1
- package/dist/use-in-view-BAHrBy6b.js.map +0 -1
- package/dist/use-in-view-BCmzDU2O.cjs.map +0 -1
- package/dist/x-CnsEH4Ox-CGGXQl4M.cjs +0 -27
- package/dist/x-CnsEH4Ox-CGGXQl4M.cjs.map +0 -1
- package/dist/x-CnsEH4Ox-DDvAJndW.js +0 -101
- package/dist/x-CnsEH4Ox-DDvAJndW.js.map +0 -1
package/dist/proxy-PQd2AItT.cjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";const de=require("./index-CHPV5EwG-DDoeWRVt.cjs"),S=require("react"),Fe=S.createContext({});function Ds(t){const e=S.useRef(null);return e.current===null&&(e.current=t()),e.current}const Be=typeof window<"u",Es=Be?S.useLayoutEffect:S.useEffect,Yt=S.createContext(null),Oe=S.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"});function Rs(t=!0){const e=S.useContext(Yt);if(e===null)return[!0,null];const{isPresent:n,onExitComplete:s,register:i}=e,o=S.useId();S.useEffect(()=>{if(t)return i(o)},[t]);const r=S.useCallback(()=>t&&s&&s(o),[o,s,t]);return!n&&s?[!1,r]:[!0]}const Ot=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"],gn={value:null};function or(t,e){let n=new Set,s=new Set,i=!1,o=!1;const r=new WeakSet;let a={delta:0,timestamp:0,isProcessing:!1},l=0;function c(h){r.has(h)&&(u.schedule(h),t()),l++,h(a)}const u={schedule:(h,f=!1,d=!1)=>{const y=d&&i?n:s;return f&&r.add(h),y.has(h)||y.add(h),h},cancel:h=>{s.delete(h),r.delete(h)},process:h=>{if(a=h,i){o=!0;return}i=!0,[n,s]=[s,n],n.forEach(c),e&&gn.value&&gn.value.frameloop[e].push(l),l=0,n.clear(),i=!1,o&&(o=!1,u.process(h))}};return u}const z={},ar=40;function Ls(t,e){let n=!1,s=!0;const i={delta:0,timestamp:0,isProcessing:!1},o=()=>n=!0,r=Ot.reduce((p,w)=>(p[w]=or(o,e?w:void 0),p),{}),{setup:a,read:l,resolveKeyframes:c,preUpdate:u,update:h,preRender:f,render:d,postRender:m}=r,y=()=>{const p=z.useManualTiming?i.timestamp:performance.now();n=!1,z.useManualTiming||(i.delta=s?1e3/60:Math.max(Math.min(p-i.timestamp,ar),1)),i.timestamp=p,i.isProcessing=!0,a.process(i),l.process(i),c.process(i),u.process(i),h.process(i),f.process(i),d.process(i),m.process(i),i.isProcessing=!1,n&&e&&(s=!1,t(y))},v=()=>{n=!0,s=!0,i.isProcessing||t(y)};return{schedule:Ot.reduce((p,w)=>{const x=r[w];return p[w]=(A,E=!1,b=!1)=>(n||v(),x.schedule(A,E,b)),p},{}),cancel:p=>{for(let w=0;w<Ot.length;w++)r[Ot[w]].cancel(p)},state:i,steps:r}}const K=t=>t,{schedule:M,cancel:Z,state:R,steps:te}=Ls(typeof requestAnimationFrame<"u"?requestAnimationFrame:K,!0),ks=S.createContext({strict:!1}),yn={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"]},dt={};for(const t in yn)dt[t]={isEnabled:e=>yn[t].some(n=>!!e[n])};function lr(t){for(const e in t)dt[e]={...dt[e],...t[e]}}const ur=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function Wt(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||ur.has(t)}let Fs=t=>!Wt(t);function cr(t){t&&(Fs=e=>e.startsWith("on")?!Wt(e):t(e))}try{cr(require("@emotion/is-prop-valid").default)}catch{}function hr(t,e,n){const s={};for(const i in t)i==="values"&&typeof t.values=="object"||(Fs(i)||n===!0&&Wt(i)||!e&&!Wt(i)||t.draggable&&i.startsWith("onDrag"))&&(s[i]=t[i]);return s}const vn=new Set;function Ie(t,e,n){t||vn.has(e)||(console.warn(e),vn.add(e))}function fr(t){if(typeof Proxy>"u")return t;const e=new Map,n=(...s)=>(process.env.NODE_ENV!=="production"&&Ie(!1,"motion() is deprecated. Use motion.create() instead."),t(...s));return new Proxy(n,{get:(s,i)=>i==="create"?t:(e.has(i)||e.set(i,t(i)),e.get(i))})}const Xt=S.createContext({});function qt(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}function At(t){return typeof t=="string"||Array.isArray(t)}const je=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Ne=["initial",...je];function Zt(t){return qt(t.animate)||Ne.some(e=>At(t[e]))}function Bs(t){return!!(Zt(t)||t.variants)}function dr(t,e){if(Zt(t)){const{initial:n,animate:s}=t;return{initial:n===!1||At(n)?n:void 0,animate:At(s)?s:void 0}}return t.inherit!==!1?e:{}}function mr(t){const{initial:e,animate:n}=dr(t,S.useContext(Xt));return S.useMemo(()=>({initial:e,animate:n}),[Tn(e),Tn(n)])}function Tn(t){return Array.isArray(t)?t.join(" "):t}const pr=Symbol.for("motionComponentSymbol");function at(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function gr(t,e,n){return S.useCallback(s=>{s&&t.onMount&&t.onMount(s),e&&(s?e.mount(s):e.unmount()),n&&(typeof n=="function"?n(s):at(n)&&(n.current=s))},[e])}const Ue=t=>t.replace(/([a-z])([A-Z])/gu,"$1-$2").toLowerCase(),yr="framerAppearId",Os="data-"+Ue(yr),Is=S.createContext({}),{schedule:Ke}=Ls(queueMicrotask,!1);function vr(t,e,n,s,i){const{visualElement:o}=S.useContext(Xt),r=S.useContext(ks),a=S.useContext(Yt),l=S.useContext(Oe).reducedMotion,c=S.useRef(null);s=s||r.renderer,!c.current&&s&&(c.current=s(t,{visualState:e,parent:o,props:n,presenceContext:a,blockInitialAnimation:a?a.initial===!1:!1,reducedMotionConfig:l}));const u=c.current,h=S.useContext(Is);u&&!u.projection&&i&&(u.type==="html"||u.type==="svg")&&Tr(c.current,n,i,h);const f=S.useRef(!1);S.useInsertionEffect(()=>{u&&f.current&&u.update(n,a)});const d=n[Os],m=S.useRef(!!d&&!window.MotionHandoffIsComplete?.(d)&&window.MotionHasOptimisedAnimation?.(d));return Es(()=>{u&&(f.current=!0,window.MotionIsMounted=!0,u.updateFeatures(),Ke.render(u.render),m.current&&u.animationState&&u.animationState.animateChanges())}),S.useEffect(()=>{u&&(!m.current&&u.animationState&&u.animationState.animateChanges(),m.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(d)}),m.current=!1))}),u}function Tr(t,e,n,s){const{layoutId:i,layout:o,drag:r,dragConstraints:a,layoutScroll:l,layoutRoot:c,layoutCrossfade:u}=e;t.projection=new n(t.latestValues,e["data-framer-portal-id"]?void 0:js(t.parent)),t.projection.setOptions({layoutId:i,layout:o,alwaysMeasureLayout:!!r||a&&at(a),visualElement:t,animationType:typeof o=="string"?o:"both",initialPromotionConfig:s,crossfade:u,layoutScroll:l,layoutRoot:c})}function js(t){if(t)return t.options.allowProjection!==!1?t.projection:js(t.parent)}let pt=()=>{},Y=()=>{};process.env.NODE_ENV!=="production"&&(pt=(t,e)=>{!t&&typeof console<"u"&&console.warn(e)},Y=(t,e)=>{if(!t)throw new Error(e)});function xr({preloadedFeatures:t,createVisualElement:e,useRender:n,useVisualState:s,Component:i}){t&&lr(t);function o(a,l){let c;const u={...S.useContext(Oe),...a,layoutId:Pr(a)},{isStatic:h}=u,f=mr(a),d=s(a,h);if(!h&&Be){Sr(u,t);const m=br(u);c=m.MeasureLayout,f.visualElement=vr(i,d,u,e,m.ProjectionNode)}return de.jsxRuntimeExports.jsxs(Xt.Provider,{value:f,children:[c&&f.visualElement?de.jsxRuntimeExports.jsx(c,{visualElement:f.visualElement,...u}):null,n(i,a,gr(d,f.visualElement,l),d,h,f.visualElement)]})}o.displayName=`motion.${typeof i=="string"?i:`create(${i.displayName??i.name??""})`}`;const r=S.forwardRef(o);return r[pr]=i,r}function Pr({layoutId:t}){const e=S.useContext(Fe).id;return e&&t!==void 0?e+"-"+t:t}function Sr(t,e){const n=S.useContext(ks).strict;if(process.env.NODE_ENV!=="production"&&e&&n){const s="You have rendered a `motion` component within a `LazyMotion` component. This will break tree shaking. Import and render a `m` component instead.";t.ignoreStrict?pt(!1,s):Y(!1,s)}}function br(t){const{drag:e,layout:n}=dt;if(!e&&!n)return{};const s={...e,...n};return{MeasureLayout:e?.isEnabled(t)||n?.isEnabled(t)?s.MeasureLayout:void 0,ProjectionNode:s.ProjectionNode}}const Ns=t=>e=>typeof e=="string"&&e.startsWith(t),$e=Ns("--"),wr=Ns("var(--"),We=t=>wr(t)?Ar.test(t.split("/*")[0].trim()):!1,Ar=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu,Vt={};function Vr(t){for(const e in t)Vt[e]=t[e],$e(e)&&(Vt[e].isCSSVariable=!0)}const gt=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],yt=new Set(gt);function Us(t,{layout:e,layoutId:n}){return yt.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!Vt[t]||t==="opacity")}const Ks=(t,e)=>e&&typeof t=="number"?e.transform(t):t,X=(t,e,n)=>n>e?e:n<t?t:n,vt={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},Ct={...vt,transform:t=>X(0,1,t)},It={...vt,default:1},xn={...vt,transform:Math.round},Lt=t=>({test:e=>typeof e=="string"&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),q=Lt("deg"),_=Lt("%"),T=Lt("px"),Cr=Lt("vh"),Mr=Lt("vw"),Pn={..._,parse:t=>_.parse(t)/100,transform:t=>_.transform(t*100)},Dr={rotate:q,rotateX:q,rotateY:q,rotateZ:q,scale:It,scaleX:It,scaleY:It,scaleZ:It,skew:q,skewX:q,skewY:q,distance:T,translateX:T,translateY:T,translateZ:T,x:T,y:T,z:T,perspective:T,transformPerspective:T,opacity:Ct,originX:Pn,originY:Pn,originZ:T},_e={borderWidth:T,borderTopWidth:T,borderRightWidth:T,borderBottomWidth:T,borderLeftWidth:T,borderRadius:T,radius:T,borderTopLeftRadius:T,borderTopRightRadius:T,borderBottomRightRadius:T,borderBottomLeftRadius:T,width:T,maxWidth:T,height:T,maxHeight:T,top:T,right:T,bottom:T,left:T,padding:T,paddingTop:T,paddingRight:T,paddingBottom:T,paddingLeft:T,margin:T,marginTop:T,marginRight:T,marginBottom:T,marginLeft:T,backgroundPositionX:T,backgroundPositionY:T,...Dr,zIndex:xn,fillOpacity:Ct,strokeOpacity:Ct,numOctaves:xn},Er={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},Rr=gt.length;function Lr(t,e,n){let s="",i=!0;for(let o=0;o<Rr;o++){const r=gt[o],a=t[r];if(a===void 0)continue;let l=!0;if(typeof a=="number"?l=a===(r.startsWith("scale")?1:0):l=parseFloat(a)===0,!l||n){const c=Ks(a,_e[r]);if(!l){i=!1;const u=Er[r]||r;s+=`${u}(${c}) `}n&&(e[r]=c)}}return s=s.trim(),n?s=n(e,i?"":s):i&&(s="none"),s}function Ge(t,e,n){const{style:s,vars:i,transformOrigin:o}=t;let r=!1,a=!1;for(const l in e){const c=e[l];if(yt.has(l)){r=!0;continue}else if($e(l)){i[l]=c;continue}else{const u=Ks(c,_e[l]);l.startsWith("origin")?(a=!0,o[l]=u):s[l]=u}}if(e.transform||(r||n?s.transform=Lr(e,t.transform,n):s.transform&&(s.transform="none")),a){const{originX:l="50%",originY:c="50%",originZ:u=0}=o;s.transformOrigin=`${l} ${c} ${u}`}}const He=()=>({style:{},transform:{},transformOrigin:{},vars:{}}),k=t=>!!(t&&t.getVelocity);function $s(t,e,n){for(const s in e)!k(e[s])&&!Us(s,n)&&(t[s]=e[s])}function kr({transformTemplate:t},e){return S.useMemo(()=>{const n=He();return Ge(n,e,t),Object.assign({},n.vars,n.style)},[e])}function Fr(t,e){const n=t.style||{},s={};return $s(s,n,t),Object.assign(s,kr(t,e)),s}function Br(t,e){const n={},s=Fr(t,e);return t.drag&&t.dragListener!==!1&&(n.draggable=!1,s.userSelect=s.WebkitUserSelect=s.WebkitTouchCallout="none",s.touchAction=t.drag===!0?"none":`pan-${t.drag==="x"?"y":"x"}`),t.tabIndex===void 0&&(t.onTap||t.onTapStart||t.whileTap)&&(n.tabIndex=0),n.style=s,n}const Or={offset:"stroke-dashoffset",array:"stroke-dasharray"},Ir={offset:"strokeDashoffset",array:"strokeDasharray"};function jr(t,e,n=1,s=0,i=!0){t.pathLength=1;const o=i?Or:Ir;t[o.offset]=T.transform(-s);const r=T.transform(e),a=T.transform(n);t[o.array]=`${r} ${a}`}function Ws(t,{attrX:e,attrY:n,attrScale:s,pathLength:i,pathSpacing:o=1,pathOffset:r=0,...a},l,c,u){if(Ge(t,a,c),l){t.style.viewBox&&(t.attrs.viewBox=t.style.viewBox);return}t.attrs=t.style,t.style={};const{attrs:h,style:f}=t;h.transform&&(f.transform=h.transform,delete h.transform),(f.transform||h.transformOrigin)&&(f.transformOrigin=h.transformOrigin??"50% 50%",delete h.transformOrigin),f.transform&&(f.transformBox=u?.transformBox??"fill-box",delete h.transformBox),e!==void 0&&(h.x=e),n!==void 0&&(h.y=n),s!==void 0&&(h.scale=s),i!==void 0&&jr(h,i,o,r,!1)}const _s=()=>({...He(),attrs:{}}),Gs=t=>typeof t=="string"&&t.toLowerCase()==="svg";function Nr(t,e,n,s){const i=S.useMemo(()=>{const o=_s();return Ws(o,e,Gs(s),t.transformTemplate,t.style),{...o.attrs,style:{...o.style}}},[e]);if(t.style){const o={};$s(o,t.style,t),i.style={...o,...i.style}}return i}const Ur=["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 ze(t){return typeof t!="string"||t.includes("-")?!1:!!(Ur.indexOf(t)>-1||/[A-Z]/u.test(t))}function Kr(t=!1){return(n,s,i,{latestValues:o},r)=>{const l=(ze(n)?Nr:Br)(s,o,r,n),c=hr(s,typeof n=="string",t),u=n!==S.Fragment?{...c,...l,ref:i}:{},{children:h}=s,f=S.useMemo(()=>k(h)?h.get():h,[h]);return S.createElement(n,{...u,children:f})}}function Sn(t){const e=[{},{}];return t?.values.forEach((n,s)=>{e[0][s]=n.get(),e[1][s]=n.getVelocity()}),e}function Ye(t,e,n,s){if(typeof e=="function"){const[i,o]=Sn(s);e=e(n!==void 0?n:t.custom,i,o)}if(typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"){const[i,o]=Sn(s);e=e(n!==void 0?n:t.custom,i,o)}return e}function Nt(t){return k(t)?t.get():t}function $r({scrapeMotionValuesFromProps:t,createRenderState:e},n,s,i){return{latestValues:Wr(n,s,i,t),renderState:e()}}const Hs=t=>(e,n)=>{const s=S.useContext(Xt),i=S.useContext(Yt),o=()=>$r(t,e,s,i);return n?o():Ds(o)};function Wr(t,e,n,s){const i={},o=s(t,{});for(const f in o)i[f]=Nt(o[f]);let{initial:r,animate:a}=t;const l=Zt(t),c=Bs(t);e&&c&&!l&&t.inherit!==!1&&(r===void 0&&(r=e.initial),a===void 0&&(a=e.animate));let u=n?n.initial===!1:!1;u=u||r===!1;const h=u?a:r;if(h&&typeof h!="boolean"&&!qt(h)){const f=Array.isArray(h)?h:[h];for(let d=0;d<f.length;d++){const m=Ye(t,f[d]);if(m){const{transitionEnd:y,transition:v,...g}=m;for(const P in g){let p=g[P];if(Array.isArray(p)){const w=u?p.length-1:0;p=p[w]}p!==null&&(i[P]=p)}for(const P in y)i[P]=y[P]}}}return i}function Xe(t,e,n){const{style:s}=t,i={};for(const o in s)(k(s[o])||e.style&&k(e.style[o])||Us(o,t)||n?.getValue(o)?.liveStyle!==void 0)&&(i[o]=s[o]);return i}const _r={useVisualState:Hs({scrapeMotionValuesFromProps:Xe,createRenderState:He})};function zs(t,e,n){const s=Xe(t,e,n);for(const i in t)if(k(t[i])||k(e[i])){const o=gt.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;s[o]=t[i]}return s}const Gr={useVisualState:Hs({scrapeMotionValuesFromProps:zs,createRenderState:_s})};function Hr(t,e){return function(s,{forwardMotionProps:i}={forwardMotionProps:!1}){const r={...ze(s)?Gr:_r,preloadedFeatures:t,useRender:Kr(i),createVisualElement:e,Component:s};return xr(r)}}function Mt(t,e,n){const s=t.getProps();return Ye(s,e,n!==void 0?n:s.custom,t)}const me=t=>Array.isArray(t);let Ut;function zr(){Ut=void 0}const I={now:()=>(Ut===void 0&&I.set(R.isProcessing||z.useManualTiming?R.timestamp:performance.now()),Ut),set:t=>{Ut=t,queueMicrotask(zr)}};function qe(t,e){t.indexOf(e)===-1&&t.push(e)}function Ze(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}class Je{constructor(){this.subscriptions=[]}add(e){return qe(this.subscriptions,e),()=>Ze(this.subscriptions,e)}notify(e,n,s){const i=this.subscriptions.length;if(i)if(i===1)this.subscriptions[0](e,n,s);else for(let o=0;o<i;o++){const r=this.subscriptions[o];r&&r(e,n,s)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}function Ys(t,e){return e?t*(1e3/e):0}const bn=30,Yr=t=>!isNaN(parseFloat(t));class Xr{constructor(e,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=(s,i=!0)=>{const o=I.now();if(this.updatedAt!==o&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(s),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(const r of this.dependents)r.dirty();i&&this.events.renderRequest?.notify(this.current)},this.hasAnimated=!1,this.setCurrent(e),this.owner=n.owner}setCurrent(e){this.current=e,this.updatedAt=I.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=Yr(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return process.env.NODE_ENV!=="production"&&Ie(!1,'value.onChange(callback) is deprecated. Switch to value.on("change", callback).'),this.on("change",e)}on(e,n){this.events[e]||(this.events[e]=new Je);const s=this.events[e].add(n);return e==="change"?()=>{s(),M.read(()=>{this.events.change.getSize()||this.stop()})}:s}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,n){this.passiveEffect=e,this.stopPassiveEffect=n}set(e,n=!0){!n||!this.passiveEffect?this.updateAndNotify(e,n):this.passiveEffect(e,this.updateAndNotify)}setWithVelocity(e,n,s){this.set(n),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-s}jump(e,n=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,n&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(e){this.dependents||(this.dependents=new Set),this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return this.current}getPrevious(){return this.prev}getVelocity(){const e=I.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>bn)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,bn);return Ys(parseFloat(this.current)-parseFloat(this.prevFrameValue),n)}start(e){return this.stop(),new Promise(n=>{this.hasAnimated=!0,this.animation=e(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.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function mt(t,e){return new Xr(t,e)}function qr(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,mt(n))}function Zr(t){return me(t)?t[t.length-1]||0:t}function Jr(t,e){const n=Mt(t,e);let{transitionEnd:s={},transition:i={},...o}=n||{};o={...o,...s};for(const r in o){const a=Zr(o[r]);qr(t,r,a)}}function Qr(t){return!!(k(t)&&t.add)}function pe(t,e){const n=t.getValue("willChange");if(Qr(n))return n.add(e);if(!n&&z.WillChange){const s=new z.WillChange("auto");t.addValue("willChange",s),s.add(e)}}function Xs(t){return t.props[Os]}const to=t=>t!==null;function eo(t,{repeat:e,repeatType:n="loop"},s){const i=t.filter(to),o=e&&n!=="loop"&&e%2===1?0:i.length-1;return i[o]}const no={type:"spring",stiffness:500,damping:25,restSpeed:10},so=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),io={type:"keyframes",duration:.8},ro={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},oo=(t,{keyframes:e})=>e.length>2?io:yt.has(t)?t.startsWith("scale")?so(e[1]):no:ro;function ao({when:t,delay:e,delayChildren:n,staggerChildren:s,staggerDirection:i,repeat:o,repeatType:r,repeatDelay:a,from:l,elapsed:c,...u}){return!!Object.keys(u).length}function Qe(t,e){return t?.[e]??t?.default??t}const W=t=>t*1e3,G=t=>t/1e3,Pt=t=>Math.round(t*1e5)/1e5,tn=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function lo(t){return t==null}const uo=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,en=(t,e)=>n=>!!(typeof n=="string"&&uo.test(n)&&n.startsWith(t)||e&&!lo(n)&&Object.prototype.hasOwnProperty.call(n,e)),qs=(t,e,n)=>s=>{if(typeof s!="string")return s;const[i,o,r,a]=s.match(tn);return{[t]:parseFloat(i),[e]:parseFloat(o),[n]:parseFloat(r),alpha:a!==void 0?parseFloat(a):1}},co=t=>X(0,255,t),ee={...vt,transform:t=>Math.round(co(t))},nt={test:en("rgb","red"),parse:qs("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:s=1})=>"rgba("+ee.transform(t)+", "+ee.transform(e)+", "+ee.transform(n)+", "+Pt(Ct.transform(s))+")"};function ho(t){let e="",n="",s="",i="";return t.length>5?(e=t.substring(1,3),n=t.substring(3,5),s=t.substring(5,7),i=t.substring(7,9)):(e=t.substring(1,2),n=t.substring(2,3),s=t.substring(3,4),i=t.substring(4,5),e+=e,n+=n,s+=s,i+=i),{red:parseInt(e,16),green:parseInt(n,16),blue:parseInt(s,16),alpha:i?parseInt(i,16)/255:1}}const ge={test:en("#"),parse:ho,transform:nt.transform},lt={test:en("hsl","hue"),parse:qs("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:s=1})=>"hsla("+Math.round(t)+", "+_.transform(Pt(e))+", "+_.transform(Pt(n))+", "+Pt(Ct.transform(s))+")"},L={test:t=>nt.test(t)||ge.test(t)||lt.test(t),parse:t=>nt.test(t)?nt.parse(t):lt.test(t)?lt.parse(t):ge.parse(t),transform:t=>typeof t=="string"?t:t.hasOwnProperty("red")?nt.transform(t):lt.transform(t)},fo=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function mo(t){return isNaN(t)&&typeof t=="string"&&(t.match(tn)?.length||0)+(t.match(fo)?.length||0)>0}const Zs="number",Js="color",po="var",go="var(",wn="${}",yo=/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 Dt(t){const e=t.toString(),n=[],s={color:[],number:[],var:[]},i=[];let o=0;const a=e.replace(yo,l=>(L.test(l)?(s.color.push(o),i.push(Js),n.push(L.parse(l))):l.startsWith(go)?(s.var.push(o),i.push(po),n.push(l)):(s.number.push(o),i.push(Zs),n.push(parseFloat(l))),++o,wn)).split(wn);return{values:n,split:a,indexes:s,types:i}}function Qs(t){return Dt(t).values}function ti(t){const{split:e,types:n}=Dt(t),s=e.length;return i=>{let o="";for(let r=0;r<s;r++)if(o+=e[r],i[r]!==void 0){const a=n[r];a===Zs?o+=Pt(i[r]):a===Js?o+=L.transform(i[r]):o+=i[r]}return o}}const vo=t=>typeof t=="number"?0:t;function To(t){const e=Qs(t);return ti(t)(e.map(vo))}const J={test:mo,parse:Qs,createTransformer:ti,getAnimatableNone:To};function ne(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+(e-t)*6*n:n<1/2?e:n<2/3?t+(e-t)*(2/3-n)*6:t}function xo({hue:t,saturation:e,lightness:n,alpha:s}){t/=360,e/=100,n/=100;let i=0,o=0,r=0;if(!e)i=o=r=n;else{const a=n<.5?n*(1+e):n+e-n*e,l=2*n-a;i=ne(l,a,t+1/3),o=ne(l,a,t),r=ne(l,a,t-1/3)}return{red:Math.round(i*255),green:Math.round(o*255),blue:Math.round(r*255),alpha:s}}function _t(t,e){return n=>n>0?e:t}const C=(t,e,n)=>t+(e-t)*n,se=(t,e,n)=>{const s=t*t,i=n*(e*e-s)+s;return i<0?0:Math.sqrt(i)},Po=[ge,nt,lt],So=t=>Po.find(e=>e.test(t));function An(t){const e=So(t);if(pt(!!e,`'${t}' is not an animatable color. Use the equivalent color code instead.`),!e)return!1;let n=e.parse(t);return e===lt&&(n=xo(n)),n}const Vn=(t,e)=>{const n=An(t),s=An(e);if(!n||!s)return _t(t,e);const i={...n};return o=>(i.red=se(n.red,s.red,o),i.green=se(n.green,s.green,o),i.blue=se(n.blue,s.blue,o),i.alpha=C(n.alpha,s.alpha,o),nt.transform(i))},ye=new Set(["none","hidden"]);function bo(t,e){return ye.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}const wo=(t,e)=>n=>e(t(n)),kt=(...t)=>t.reduce(wo);function Ao(t,e){return n=>C(t,e,n)}function nn(t){return typeof t=="number"?Ao:typeof t=="string"?We(t)?_t:L.test(t)?Vn:Mo:Array.isArray(t)?ei:typeof t=="object"?L.test(t)?Vn:Vo:_t}function ei(t,e){const n=[...t],s=n.length,i=t.map((o,r)=>nn(o)(o,e[r]));return o=>{for(let r=0;r<s;r++)n[r]=i[r](o);return n}}function Vo(t,e){const n={...t,...e},s={};for(const i in n)t[i]!==void 0&&e[i]!==void 0&&(s[i]=nn(t[i])(t[i],e[i]));return i=>{for(const o in s)n[o]=s[o](i);return n}}function Co(t,e){const n=[],s={color:0,var:0,number:0};for(let i=0;i<e.values.length;i++){const o=e.types[i],r=t.indexes[o][s[o]],a=t.values[r]??0;n[i]=a,s[o]++}return n}const Mo=(t,e)=>{const n=J.createTransformer(e),s=Dt(t),i=Dt(e);return s.indexes.var.length===i.indexes.var.length&&s.indexes.color.length===i.indexes.color.length&&s.indexes.number.length>=i.indexes.number.length?ye.has(t)&&!i.values.length||ye.has(e)&&!s.values.length?bo(t,e):kt(ei(Co(s,i),i.values),n):(pt(!0,`Complex values '${t}' and '${e}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),_t(t,e))};function ni(t,e,n){return typeof t=="number"&&typeof e=="number"&&typeof n=="number"?C(t,e,n):nn(t)(t,e)}const Do=t=>{const e=({timestamp:n})=>t(n);return{start:(n=!0)=>M.update(e,n),stop:()=>Z(e),now:()=>R.isProcessing?R.timestamp:I.now()}},si=(t,e,n=10)=>{let s="";const i=Math.max(Math.round(e/n),2);for(let o=0;o<i;o++)s+=t(o/(i-1))+", ";return`linear(${s.substring(0,s.length-2)})`},Gt=2e4;function sn(t){let e=0;const n=50;let s=t.next(e);for(;!s.done&&e<Gt;)e+=n,s=t.next(e);return e>=Gt?1/0:e}function Eo(t,e=100,n){const s=n({...t,keyframes:[0,e]}),i=Math.min(sn(s),Gt);return{type:"keyframes",ease:o=>s.next(i*o).value/e,duration:G(i)}}const Ro=5;function ii(t,e,n){const s=Math.max(e-Ro,0);return Ys(n-t(s),e-s)}const V={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},ie=.001;function Lo({duration:t=V.duration,bounce:e=V.bounce,velocity:n=V.velocity,mass:s=V.mass}){let i,o;pt(t<=W(V.maxDuration),"Spring duration must be 10 seconds or less");let r=1-e;r=X(V.minDamping,V.maxDamping,r),t=X(V.minDuration,V.maxDuration,G(t)),r<1?(i=c=>{const u=c*r,h=u*t,f=u-n,d=ve(c,r),m=Math.exp(-h);return ie-f/d*m},o=c=>{const h=c*r*t,f=h*n+n,d=Math.pow(r,2)*Math.pow(c,2)*t,m=Math.exp(-h),y=ve(Math.pow(c,2),r);return(-i(c)+ie>0?-1:1)*((f-d)*m)/y}):(i=c=>{const u=Math.exp(-c*t),h=(c-n)*t+1;return-ie+u*h},o=c=>{const u=Math.exp(-c*t),h=(n-c)*(t*t);return u*h});const a=5/t,l=Fo(i,o,a);if(t=W(t),isNaN(l))return{stiffness:V.stiffness,damping:V.damping,duration:t};{const c=Math.pow(l,2)*s;return{stiffness:c,damping:r*2*Math.sqrt(s*c),duration:t}}}const ko=12;function Fo(t,e,n){let s=n;for(let i=1;i<ko;i++)s=s-t(s)/e(s);return s}function ve(t,e){return t*Math.sqrt(1-e*e)}const Bo=["duration","bounce"],Oo=["stiffness","damping","mass"];function Cn(t,e){return e.some(n=>t[n]!==void 0)}function Io(t){let e={velocity:V.velocity,stiffness:V.stiffness,damping:V.damping,mass:V.mass,isResolvedFromDuration:!1,...t};if(!Cn(t,Oo)&&Cn(t,Bo))if(t.visualDuration){const n=t.visualDuration,s=2*Math.PI/(n*1.2),i=s*s,o=2*X(.05,1,1-(t.bounce||0))*Math.sqrt(i);e={...e,mass:V.mass,stiffness:i,damping:o}}else{const n=Lo(t);e={...e,...n,mass:V.mass},e.isResolvedFromDuration=!0}return e}function Ht(t=V.visualDuration,e=V.bounce){const n=typeof t!="object"?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:s,restDelta:i}=n;const o=n.keyframes[0],r=n.keyframes[n.keyframes.length-1],a={done:!1,value:o},{stiffness:l,damping:c,mass:u,duration:h,velocity:f,isResolvedFromDuration:d}=Io({...n,velocity:-G(n.velocity||0)}),m=f||0,y=c/(2*Math.sqrt(l*u)),v=r-o,g=G(Math.sqrt(l/u)),P=Math.abs(v)<5;s||(s=P?V.restSpeed.granular:V.restSpeed.default),i||(i=P?V.restDelta.granular:V.restDelta.default);let p;if(y<1){const x=ve(g,y);p=A=>{const E=Math.exp(-y*g*A);return r-E*((m+y*g*v)/x*Math.sin(x*A)+v*Math.cos(x*A))}}else if(y===1)p=x=>r-Math.exp(-g*x)*(v+(m+g*v)*x);else{const x=g*Math.sqrt(y*y-1);p=A=>{const E=Math.exp(-y*g*A),b=Math.min(x*A,300);return r-E*((m+y*g*v)*Math.sinh(b)+x*v*Math.cosh(b))/x}}const w={calculatedDuration:d&&h||null,next:x=>{const A=p(x);if(d)a.done=x>=h;else{let E=x===0?m:0;y<1&&(E=x===0?W(m):ii(p,x,A));const b=Math.abs(E)<=s,O=Math.abs(r-A)<=i;a.done=b&&O}return a.value=a.done?r:A,a},toString:()=>{const x=Math.min(sn(w),Gt),A=si(E=>w.next(x*E).value,x,30);return x+"ms "+A},toTransition:()=>{}};return w}Ht.applyToOptions=t=>{const e=Eo(t,100,Ht);return t.ease=e.ease,t.duration=W(e.duration),t.type="keyframes",t};function Te({keyframes:t,velocity:e=0,power:n=.8,timeConstant:s=325,bounceDamping:i=10,bounceStiffness:o=500,modifyTarget:r,min:a,max:l,restDelta:c=.5,restSpeed:u}){const h=t[0],f={done:!1,value:h},d=b=>a!==void 0&&b<a||l!==void 0&&b>l,m=b=>a===void 0?l:l===void 0||Math.abs(a-b)<Math.abs(l-b)?a:l;let y=n*e;const v=h+y,g=r===void 0?v:r(v);g!==v&&(y=g-h);const P=b=>-y*Math.exp(-b/s),p=b=>g+P(b),w=b=>{const O=P(b),j=p(b);f.done=Math.abs(O)<=c,f.value=f.done?g:j};let x,A;const E=b=>{d(f.value)&&(x=b,A=Ht({keyframes:[f.value,m(f.value)],velocity:ii(p,b,f.value),damping:i,stiffness:o,restDelta:c,restSpeed:u}))};return E(0),{calculatedDuration:null,next:b=>{let O=!1;return!A&&x===void 0&&(O=!0,w(b),E(b)),x!==void 0&&b>=x?A.next(b-x):(!O&&w(b),f)}}}const Et=(t,e,n)=>{const s=e-t;return s===0?1:(n-t)/s};function jo(t,e,n){const s=[],i=n||z.mix||ni,o=t.length-1;for(let r=0;r<o;r++){let a=i(t[r],t[r+1]);if(e){const l=Array.isArray(e)?e[r]||K:e;a=kt(l,a)}s.push(a)}return s}function No(t,e,{clamp:n=!0,ease:s,mixer:i}={}){const o=t.length;if(Y(o===e.length,"Both input and output ranges must be the same length"),o===1)return()=>e[0];if(o===2&&e[0]===e[1])return()=>e[1];const r=t[0]===t[1];t[0]>t[o-1]&&(t=[...t].reverse(),e=[...e].reverse());const a=jo(e,s,i),l=a.length,c=u=>{if(r&&u<t[0])return e[0];let h=0;if(l>1)for(;h<t.length-2&&!(u<t[h+1]);h++);const f=Et(t[h],t[h+1],u);return a[h](f)};return n?u=>c(X(t[0],t[o-1],u)):c}function Uo(t,e){const n=t[t.length-1];for(let s=1;s<=e;s++){const i=Et(0,e,s);t.push(C(n,1,i))}}function Ko(t){const e=[0];return Uo(e,t.length-1),e}function $o(t,e){return t.map(n=>n*e)}const ri=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,Wo=1e-7,_o=12;function Go(t,e,n,s,i){let o,r,a=0;do r=e+(n-e)/2,o=ri(r,s,i)-t,o>0?n=r:e=r;while(Math.abs(o)>Wo&&++a<_o);return r}function Ft(t,e,n,s){if(t===e&&n===s)return K;const i=o=>Go(o,0,1,t,n);return o=>o===0||o===1?o:ri(i(o),e,s)}const Ho=Ft(.42,0,1,1),zo=Ft(0,0,.58,1),oi=Ft(.42,0,.58,1),Yo=t=>Array.isArray(t)&&typeof t[0]!="number",ai=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,li=t=>e=>1-t(1-e),ui=Ft(.33,1.53,.69,.99),rn=li(ui),ci=ai(rn),hi=t=>(t*=2)<1?.5*rn(t):.5*(2-Math.pow(2,-10*(t-1))),on=t=>1-Math.sin(Math.acos(t)),fi=li(on),di=ai(on),mi=t=>Array.isArray(t)&&typeof t[0]=="number",Mn={linear:K,easeIn:Ho,easeInOut:oi,easeOut:zo,circIn:on,circInOut:di,circOut:fi,backIn:rn,backInOut:ci,backOut:ui,anticipate:hi},Xo=t=>typeof t=="string",Dn=t=>{if(mi(t)){Y(t.length===4,"Cubic bezier arrays must contain four numerical values.");const[e,n,s,i]=t;return Ft(e,n,s,i)}else if(Xo(t))return Y(Mn[t]!==void 0,`Invalid easing type '${t}'`),Mn[t];return t};function qo(t,e){return t.map(()=>e||oi).splice(0,t.length-1)}function ut({duration:t=300,keyframes:e,times:n,ease:s="easeInOut"}){const i=Yo(s)?s.map(Dn):Dn(s),o={done:!1,value:e[0]},r=$o(n&&n.length===e.length?n:Ko(e),t),a=No(r,e,{ease:Array.isArray(i)?i:qo(e,i)});return{calculatedDuration:t,next:l=>(o.value=a(l),o.done=l>=t,o)}}const Zo=t=>t!==null;function an(t,{repeat:e,repeatType:n="loop"},s,i=1){const o=t.filter(Zo),a=i<0||e&&n!=="loop"&&e%2===1?0:o.length-1;return!a||s===void 0?o[a]:s}const Jo={decay:Te,inertia:Te,tween:ut,keyframes:ut,spring:Ht};function pi(t){typeof t.type=="string"&&(t.type=Jo[t.type])}class ln{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,n){return this.finished.then(e,n)}}const Qo=t=>t/100;class un extends ln{constructor(e){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=(n=!0)=>{if(n){const{motionValue:s}=this.options;s&&s.updatedAt!==I.now()&&this.tick(I.now())}this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=e,this.initAnimation(),this.play(),e.autoplay===!1&&this.pause()}initAnimation(){const{options:e}=this;pi(e);const{type:n=ut,repeat:s=0,repeatDelay:i=0,repeatType:o,velocity:r=0}=e;let{keyframes:a}=e;const l=n||ut;process.env.NODE_ENV!=="production"&&l!==ut&&Y(a.length<=2,`Only two keyframes currently supported with spring and inertia animations. Trying to animate ${a}`),l!==ut&&typeof a[0]!="number"&&(this.mixKeyframes=kt(Qo,ni(a[0],a[1])),a=[0,100]);const c=l({...e,keyframes:a});o==="mirror"&&(this.mirroredGenerator=l({...e,keyframes:[...a].reverse(),velocity:-r})),c.calculatedDuration===null&&(c.calculatedDuration=sn(c));const{calculatedDuration:u}=c;this.calculatedDuration=u,this.resolvedDuration=u+i,this.totalDuration=this.resolvedDuration*(s+1)-i,this.generator=c}updateTime(e){const n=Math.round(e-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=n}tick(e,n=!1){const{generator:s,totalDuration:i,mixKeyframes:o,mirroredGenerator:r,resolvedDuration:a,calculatedDuration:l}=this;if(this.startTime===null)return s.next(0);const{delay:c=0,keyframes:u,repeat:h,repeatType:f,repeatDelay:d,type:m,onUpdate:y,finalKeyframe:v}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-i/this.speed,this.startTime)),n?this.currentTime=e:this.updateTime(e);const g=this.currentTime-c*(this.playbackSpeed>=0?1:-1),P=this.playbackSpeed>=0?g<0:g>i;this.currentTime=Math.max(g,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let p=this.currentTime,w=s;if(h){const b=Math.min(this.currentTime,i)/a;let O=Math.floor(b),j=b%1;!j&&b>=1&&(j=1),j===1&&O--,O=Math.min(O,h+1),!!(O%2)&&(f==="reverse"?(j=1-j,d&&(j-=d/a)):f==="mirror"&&(w=r)),p=X(0,1,j)*a}const x=P?{done:!1,value:u[0]}:w.next(p);o&&(x.value=o(x.value));let{done:A}=x;!P&&l!==null&&(A=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const E=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&A);return E&&m!==Te&&(x.value=an(u,this.options,v,this.speed)),y&&y(x.value),E&&this.finish(),x}then(e,n){return this.finished.then(e,n)}get duration(){return G(this.calculatedDuration)}get time(){return G(this.currentTime)}set time(e){e=W(e),this.currentTime=e,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(e){this.updateTime(I.now());const n=this.playbackSpeed!==e;this.playbackSpeed=e,n&&(this.time=G(this.currentTime))}play(){if(this.isStopped)return;const{driver:e=Do,startTime:n}=this.options;this.driver||(this.driver=e(i=>this.tick(i))),this.options.onPlay?.();const s=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=s):this.holdTime!==null?this.startTime=s-this.holdTime:this.startTime||(this.startTime=n??s),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(I.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),e.observe(this)}}function ta(t){for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}const st=t=>t*180/Math.PI,xe=t=>{const e=st(Math.atan2(t[1],t[0]));return Pe(e)},ea={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:xe,rotateZ:xe,skewX:t=>st(Math.atan(t[1])),skewY:t=>st(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},Pe=t=>(t=t%360,t<0&&(t+=360),t),En=xe,Rn=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),Ln=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),na={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Rn,scaleY:Ln,scale:t=>(Rn(t)+Ln(t))/2,rotateX:t=>Pe(st(Math.atan2(t[6],t[5]))),rotateY:t=>Pe(st(Math.atan2(-t[2],t[0]))),rotateZ:En,rotate:En,skewX:t=>st(Math.atan(t[4])),skewY:t=>st(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function Se(t){return t.includes("scale")?1:0}function be(t,e){if(!t||t==="none")return Se(e);const n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let s,i;if(n)s=na,i=n;else{const a=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);s=ea,i=a}if(!i)return Se(e);const o=s[e],r=i[1].split(",").map(ia);return typeof o=="function"?o(r):r[o]}const sa=(t,e)=>{const{transform:n="none"}=getComputedStyle(t);return be(n,e)};function ia(t){return parseFloat(t.trim())}const kn=t=>t===vt||t===T,ra=new Set(["x","y","z"]),oa=gt.filter(t=>!ra.has(t));function aa(t){const e=[];return oa.forEach(n=>{const s=t.getValue(n);s!==void 0&&(e.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))}),e}const it={width:({x:t},{paddingLeft:e="0",paddingRight:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),height:({y:t},{paddingTop:e="0",paddingBottom:n="0"})=>t.max-t.min-parseFloat(e)-parseFloat(n),top:(t,{top:e})=>parseFloat(e),left:(t,{left:e})=>parseFloat(e),bottom:({y:t},{top:e})=>parseFloat(e)+(t.max-t.min),right:({x:t},{left:e})=>parseFloat(e)+(t.max-t.min),x:(t,{transform:e})=>be(e,"x"),y:(t,{transform:e})=>be(e,"y")};it.translateX=it.x;it.translateY=it.y;const rt=new Set;let we=!1,Ae=!1,Ve=!1;function gi(){if(Ae){const t=Array.from(rt).filter(s=>s.needsMeasurement),e=new Set(t.map(s=>s.element)),n=new Map;e.forEach(s=>{const i=aa(s);i.length&&(n.set(s,i),s.render())}),t.forEach(s=>s.measureInitialState()),e.forEach(s=>{s.render();const i=n.get(s);i&&i.forEach(([o,r])=>{s.getValue(o)?.set(r)})}),t.forEach(s=>s.measureEndState()),t.forEach(s=>{s.suspendedScrollY!==void 0&&window.scrollTo(0,s.suspendedScrollY)})}Ae=!1,we=!1,rt.forEach(t=>t.complete(Ve)),rt.clear()}function yi(){rt.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(Ae=!0)})}function la(){Ve=!0,yi(),gi(),Ve=!1}class cn{constructor(e,n,s,i,o,r=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=n,this.name=s,this.motionValue=i,this.element=o,this.isAsync=r}scheduleResolve(){this.state="scheduled",this.isAsync?(rt.add(this),we||(we=!0,M.read(yi),M.resolveKeyframes(gi))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:n,element:s,motionValue:i}=this;if(e[0]===null){const o=i?.get(),r=e[e.length-1];if(o!==void 0)e[0]=o;else if(s&&n){const a=s.readValue(n,r);a!=null&&(e[0]=a)}e[0]===void 0&&(e[0]=r),i&&o===void 0&&i.set(e[0])}ta(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),rt.delete(this)}cancel(){this.state==="scheduled"&&(rt.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const ua=t=>t.startsWith("--");function ca(t,e,n){ua(e)?t.style.setProperty(e,n):t.style[e]=n}function hn(t){let e;return()=>(e===void 0&&(e=t()),e)}const ha=hn(()=>window.ScrollTimeline!==void 0),fa={};function da(t,e){const n=hn(t);return()=>fa[e]??n()}const vi=da(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),xt=([t,e,n,s])=>`cubic-bezier(${t}, ${e}, ${n}, ${s})`,Fn={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:xt([0,.65,.55,1]),circOut:xt([.55,0,1,.45]),backIn:xt([.31,.01,.66,-.59]),backOut:xt([.33,1.53,.69,.99])};function Ti(t,e){if(t)return typeof t=="function"?vi()?si(t,e):"ease-out":mi(t)?xt(t):Array.isArray(t)?t.map(n=>Ti(n,e)||Fn.easeOut):Fn[t]}function ma(t,e,n,{delay:s=0,duration:i=300,repeat:o=0,repeatType:r="loop",ease:a="easeOut",times:l}={},c=void 0){const u={[e]:n};l&&(u.offset=l);const h=Ti(a,i);Array.isArray(h)&&(u.easing=h);const f={delay:s,duration:i,easing:Array.isArray(h)?"linear":h,fill:"both",iterations:o+1,direction:r==="reverse"?"alternate":"normal"};return c&&(f.pseudoElement=c),t.animate(u,f)}function xi(t){return typeof t=="function"&&"applyToOptions"in t}function pa({type:t,...e}){return xi(t)&&vi()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}class ga extends ln{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,!e)return;const{element:n,name:s,keyframes:i,pseudoElement:o,allowFlatten:r=!1,finalKeyframe:a,onComplete:l}=e;this.isPseudoElement=!!o,this.allowFlatten=r,this.options=e,Y(typeof e.type!="string",`animateMini doesn't support "type" as a string. Did you mean to import { spring } from "motion"?`);const c=pa(e);this.animation=ma(n,s,i,c,o),c.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!o){const u=an(i,this.options,a,this.speed);this.updateMotionValue?this.updateMotionValue(u):ca(n,s,u),this.animation.cancel()}l?.(),this.notifyFinished()}}play(){this.isStopped||(this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;const{state:e}=this;e==="idle"||e==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){this.isPseudoElement||this.animation.commitStyles?.()}get duration(){const e=this.animation.effect?.getComputedTiming?.().duration||0;return G(Number(e))}get time(){return G(Number(this.animation.currentTime)||0)}set time(e){this.finishedTime=null,this.animation.currentTime=W(e)}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return Number(this.animation.startTime)}set startTime(e){this.animation.startTime=e}attachTimeline({timeline:e,observe:n}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,e&&ha()?(this.animation.timeline=e,K):n(this)}}const Pi={anticipate:hi,backInOut:ci,circInOut:di};function ya(t){return t in Pi}function va(t){typeof t.ease=="string"&&ya(t.ease)&&(t.ease=Pi[t.ease])}const Bn=10;class Ta extends ga{constructor(e){va(e),pi(e),super(e),e.startTime&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){const{motionValue:n,onUpdate:s,onComplete:i,element:o,...r}=this.options;if(!n)return;if(e!==void 0){n.set(e);return}const a=new un({...r,autoplay:!1}),l=W(this.finishedTime??this.time);n.setWithVelocity(a.sample(l-Bn).value,a.sample(l).value,Bn),a.stop()}}const On=(t,e)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(J.test(t)||t==="0")&&!t.startsWith("url("));function xa(t){const e=t[0];if(t.length===1)return!0;for(let n=0;n<t.length;n++)if(t[n]!==e)return!0}function Pa(t,e,n,s){const i=t[0];if(i===null)return!1;if(e==="display"||e==="visibility")return!0;const o=t[t.length-1],r=On(i,e),a=On(o,e);return pt(r===a,`You are trying to animate ${e} 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.`),!r||!a?!1:xa(t)||(n==="spring"||xi(n))&&s}const Sa=new Set(["opacity","clipPath","filter","transform"]),ba=hn(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function wa(t){const{motionValue:e,name:n,repeatDelay:s,repeatType:i,damping:o,type:r}=t;if(!e||!e.owner||!(e.owner.current instanceof HTMLElement))return!1;const{onUpdate:a,transformTemplate:l}=e.owner.getProps();return ba()&&n&&Sa.has(n)&&(n!=="transform"||!l)&&!a&&!s&&i!=="mirror"&&o!==0&&r!=="inertia"}const Aa=40;class Va extends ln{constructor({autoplay:e=!0,delay:n=0,type:s="keyframes",repeat:i=0,repeatDelay:o=0,repeatType:r="loop",keyframes:a,name:l,motionValue:c,element:u,...h}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=I.now();const f={autoplay:e,delay:n,type:s,repeat:i,repeatDelay:o,repeatType:r,name:l,motionValue:c,element:u,...h},d=u?.KeyframeResolver||cn;this.keyframeResolver=new d(a,(m,y,v)=>this.onKeyframesResolved(m,y,f,!v),l,c,u),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,n,s,i){this.keyframeResolver=void 0;const{name:o,type:r,velocity:a,delay:l,isHandoff:c,onUpdate:u}=s;this.resolvedAt=I.now(),Pa(e,o,r,a)||((z.instantAnimations||!l)&&u?.(an(e,s,n)),e[0]=e[e.length-1],s.duration=0,s.repeat=0);const f={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>Aa?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...s,keyframes:e},d=!c&&wa(f)?new Ta({...f,element:f.motionValue.owner.current}):new un(f);d.finished.then(()=>this.notifyFinished()).catch(K),this.pendingTimeline&&(this.stopTimeline=d.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=d}get finished(){return this._animation?this.animation.finished:this._finished}then(e,n){return this.finished.finally(e).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),la()),this._animation}get duration(){return this.animation.duration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}const fn=(t,e,n,s={},i,o)=>r=>{const a=Qe(s,t)||{},l=a.delay||s.delay||0;let{elapsed:c=0}=s;c=c-W(l);const u={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...a,delay:-c,onUpdate:f=>{e.set(f),a.onUpdate&&a.onUpdate(f)},onComplete:()=>{r(),a.onComplete&&a.onComplete()},name:t,motionValue:e,element:o?void 0:i};ao(a)||Object.assign(u,oo(t,u)),u.duration&&(u.duration=W(u.duration)),u.repeatDelay&&(u.repeatDelay=W(u.repeatDelay)),u.from!==void 0&&(u.keyframes[0]=u.from);let h=!1;if((u.type===!1||u.duration===0&&!u.repeatDelay)&&(u.duration=0,u.delay===0&&(h=!0)),(z.instantAnimations||z.skipAnimations)&&(h=!0,u.duration=0,u.delay=0),u.allowFlatten=!a.type&&!a.ease,h&&!o&&e.get()!==void 0){const f=eo(u.keyframes,a);if(f!==void 0){M.update(()=>{u.onUpdate(f),u.onComplete()});return}}return a.isSync?new un(u):new Va(u)},Si=new Set(["width","height","top","left","right","bottom",...gt]);function Ca({protectedKeys:t,needsAnimating:e},n){const s=t.hasOwnProperty(n)&&e[n]!==!0;return e[n]=!1,s}function bi(t,e,{delay:n=0,transitionOverride:s,type:i}={}){let{transition:o=t.getDefaultTransition(),transitionEnd:r,...a}=e;s&&(o=s);const l=[],c=i&&t.animationState&&t.animationState.getState()[i];for(const u in a){const h=t.getValue(u,t.latestValues[u]??null),f=a[u];if(f===void 0||c&&Ca(c,u))continue;const d={delay:n,...Qe(o||{},u)},m=h.get();if(m!==void 0&&!h.isAnimating&&!Array.isArray(f)&&f===m&&!d.velocity)continue;let y=!1;if(window.MotionHandoffAnimation){const g=Xs(t);if(g){const P=window.MotionHandoffAnimation(g,u,M);P!==null&&(d.startTime=P,y=!0)}}pe(t,u),h.start(fn(u,h,f,t.shouldReduceMotion&&Si.has(u)?{type:!1}:d,t,y));const v=h.animation;v&&l.push(v)}return r&&Promise.all(l).then(()=>{M.update(()=>{r&&Jr(t,r)})}),l}function Ce(t,e,n={}){const s=Mt(t,e,n.type==="exit"?t.presenceContext?.custom:void 0);let{transition:i=t.getDefaultTransition()||{}}=s||{};n.transitionOverride&&(i=n.transitionOverride);const o=s?()=>Promise.all(bi(t,s,n)):()=>Promise.resolve(),r=t.variantChildren&&t.variantChildren.size?(l=0)=>{const{delayChildren:c=0,staggerChildren:u,staggerDirection:h}=i;return Ma(t,e,c+l,u,h,n)}:()=>Promise.resolve(),{when:a}=i;if(a){const[l,c]=a==="beforeChildren"?[o,r]:[r,o];return l().then(()=>c())}else return Promise.all([o(),r(n.delay)])}function Ma(t,e,n=0,s=0,i=1,o){const r=[],a=(t.variantChildren.size-1)*s,l=i===1?(c=0)=>c*s:(c=0)=>a-c*s;return Array.from(t.variantChildren).sort(Da).forEach((c,u)=>{c.notify("AnimationStart",e),r.push(Ce(c,e,{...o,delay:n+l(u)}).then(()=>c.notify("AnimationComplete",e)))}),Promise.all(r)}function Da(t,e){return t.sortNodePosition(e)}function Ea(t,e,n={}){t.notify("AnimationStart",e);let s;if(Array.isArray(e)){const i=e.map(o=>Ce(t,o,n));s=Promise.all(i)}else if(typeof e=="string")s=Ce(t,e,n);else{const i=typeof e=="function"?Mt(t,e,n.custom):e;s=Promise.all(bi(t,i,n))}return s.then(()=>{t.notify("AnimationComplete",e)})}function wi(t,e){if(!Array.isArray(e))return!1;const n=e.length;if(n!==t.length)return!1;for(let s=0;s<n;s++)if(e[s]!==t[s])return!1;return!0}const Ra=Ne.length;function Ai(t){if(!t)return;if(!t.isControllingVariants){const n=t.parent?Ai(t.parent)||{}:{};return t.props.initial!==void 0&&(n.initial=t.props.initial),n}const e={};for(let n=0;n<Ra;n++){const s=Ne[n],i=t.props[s];(At(i)||i===!1)&&(e[s]=i)}return e}const La=[...je].reverse(),ka=je.length;function Fa(t){return e=>Promise.all(e.map(({animation:n,options:s})=>Ea(t,n,s)))}function Ba(t){let e=Fa(t),n=In(),s=!0;const i=l=>(c,u)=>{const h=Mt(t,u,l==="exit"?t.presenceContext?.custom:void 0);if(h){const{transition:f,transitionEnd:d,...m}=h;c={...c,...m,...d}}return c};function o(l){e=l(t)}function r(l){const{props:c}=t,u=Ai(t.parent)||{},h=[],f=new Set;let d={},m=1/0;for(let v=0;v<ka;v++){const g=La[v],P=n[g],p=c[g]!==void 0?c[g]:u[g],w=At(p),x=g===l?P.isActive:null;x===!1&&(m=v);let A=p===u[g]&&p!==c[g]&&w;if(A&&s&&t.manuallyAnimateOnMount&&(A=!1),P.protectedKeys={...d},!P.isActive&&x===null||!p&&!P.prevProp||qt(p)||typeof p=="boolean")continue;const E=Oa(P.prevProp,p);let b=E||g===l&&P.isActive&&!A&&w||v>m&&w,O=!1;const j=Array.isArray(p)?p:[p];let ot=j.reduce(i(g),{});x===!1&&(ot={});const{prevResolvedValues:mn={}}=P,rr={...mn,...ot},pn=F=>{b=!0,f.has(F)&&(O=!0,f.delete(F)),P.needsAnimating[F]=!0;const H=t.getValue(F);H&&(H.liveStyle=!1)};for(const F in rr){const H=ot[F],Jt=mn[F];if(d.hasOwnProperty(F))continue;let Qt=!1;me(H)&&me(Jt)?Qt=!wi(H,Jt):Qt=H!==Jt,Qt?H!=null?pn(F):f.add(F):H!==void 0&&f.has(F)?pn(F):P.protectedKeys[F]=!0}P.prevProp=p,P.prevResolvedValues=ot,P.isActive&&(d={...d,...ot}),s&&t.blockInitialAnimation&&(b=!1),b&&(!(A&&E)||O)&&h.push(...j.map(F=>({animation:F,options:{type:g}})))}if(f.size){const v={};if(typeof c.initial!="boolean"){const g=Mt(t,Array.isArray(c.initial)?c.initial[0]:c.initial);g&&g.transition&&(v.transition=g.transition)}f.forEach(g=>{const P=t.getBaseTarget(g),p=t.getValue(g);p&&(p.liveStyle=!0),v[g]=P??null}),h.push({animation:v})}let y=!!h.length;return s&&(c.initial===!1||c.initial===c.animate)&&!t.manuallyAnimateOnMount&&(y=!1),s=!1,y?e(h):Promise.resolve()}function a(l,c){if(n[l].isActive===c)return Promise.resolve();t.variantChildren?.forEach(h=>h.animationState?.setActive(l,c)),n[l].isActive=c;const u=r(l);for(const h in n)n[h].protectedKeys={};return u}return{animateChanges:r,setActive:a,setAnimateFunction:o,getState:()=>n,reset:()=>{n=In(),s=!0}}}function Oa(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!wi(e,t):!1}function tt(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function In(){return{animate:tt(!0),whileInView:tt(),whileHover:tt(),whileTap:tt(),whileDrag:tt(),whileFocus:tt(),exit:tt()}}class Q{constructor(e){this.isMounted=!1,this.node=e}update(){}}class Ia extends Q{constructor(e){super(e),e.animationState||(e.animationState=Ba(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();qt(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:n}=this.node.prevProps||{};e!==n&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}let ja=0;class Na extends Q{constructor(){super(...arguments),this.id=ja++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:n}=this.node.presenceContext,{isPresent:s}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===s)return;const i=this.node.animationState.setActive("exit",!e);n&&!e&&i.then(()=>{n(this.id)})}mount(){const{register:e,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),e&&(this.unmount=e(this.id))}unmount(){}}const Ua={animation:{Feature:Ia},exit:{Feature:Na}};function Rt(t,e,n,s={passive:!0}){return t.addEventListener(e,n,s),()=>t.removeEventListener(e,n)}const dn=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1;function Bt(t){return{point:{x:t.pageX,y:t.pageY}}}const Ka=t=>e=>dn(e)&&t(e,Bt(e));function St(t,e,n,s){return Rt(t,e,Ka(n),s)}function Vi({top:t,left:e,right:n,bottom:s}){return{x:{min:e,max:n},y:{min:t,max:s}}}function $a({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function Wa(t,e){if(!e)return t;const n=e({x:t.left,y:t.top}),s=e({x:t.right,y:t.bottom});return{top:n.y,left:n.x,bottom:s.y,right:s.x}}const Ci=1e-4,_a=1-Ci,Ga=1+Ci,Mi=.01,Ha=0-Mi,za=0+Mi;function B(t){return t.max-t.min}function Ya(t,e,n){return Math.abs(t-e)<=n}function jn(t,e,n,s=.5){t.origin=s,t.originPoint=C(e.min,e.max,t.origin),t.scale=B(n)/B(e),t.translate=C(n.min,n.max,t.origin)-t.originPoint,(t.scale>=_a&&t.scale<=Ga||isNaN(t.scale))&&(t.scale=1),(t.translate>=Ha&&t.translate<=za||isNaN(t.translate))&&(t.translate=0)}function bt(t,e,n,s){jn(t.x,e.x,n.x,s?s.originX:void 0),jn(t.y,e.y,n.y,s?s.originY:void 0)}function Nn(t,e,n){t.min=n.min+e.min,t.max=t.min+B(e)}function Xa(t,e,n){Nn(t.x,e.x,n.x),Nn(t.y,e.y,n.y)}function Un(t,e,n){t.min=e.min-n.min,t.max=t.min+B(e)}function wt(t,e,n){Un(t.x,e.x,n.x),Un(t.y,e.y,n.y)}const Kn=()=>({translate:0,scale:1,origin:0,originPoint:0}),ct=()=>({x:Kn(),y:Kn()}),$n=()=>({min:0,max:0}),D=()=>({x:$n(),y:$n()});function U(t){return[t("x"),t("y")]}function re(t){return t===void 0||t===1}function Me({scale:t,scaleX:e,scaleY:n}){return!re(t)||!re(e)||!re(n)}function et(t){return Me(t)||Di(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function Di(t){return Wn(t.x)||Wn(t.y)}function Wn(t){return t&&t!=="0%"}function zt(t,e,n){const s=t-n,i=e*s;return n+i}function _n(t,e,n,s,i){return i!==void 0&&(t=zt(t,i,s)),zt(t,n,s)+e}function De(t,e=0,n=1,s,i){t.min=_n(t.min,e,n,s,i),t.max=_n(t.max,e,n,s,i)}function Ei(t,{x:e,y:n}){De(t.x,e.translate,e.scale,e.originPoint),De(t.y,n.translate,n.scale,n.originPoint)}const Gn=.999999999999,Hn=1.0000000000001;function qa(t,e,n,s=!1){const i=n.length;if(!i)return;e.x=e.y=1;let o,r;for(let a=0;a<i;a++){o=n[a],r=o.projectionDelta;const{visualElement:l}=o.options;l&&l.props.style&&l.props.style.display==="contents"||(s&&o.options.layoutScroll&&o.scroll&&o!==o.root&&ft(t,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),r&&(e.x*=r.x.scale,e.y*=r.y.scale,Ei(t,r)),s&&et(o.latestValues)&&ft(t,o.latestValues))}e.x<Hn&&e.x>Gn&&(e.x=1),e.y<Hn&&e.y>Gn&&(e.y=1)}function ht(t,e){t.min=t.min+e,t.max=t.max+e}function zn(t,e,n,s,i=.5){const o=C(t.min,t.max,i);De(t,e,n,o,s)}function ft(t,e){zn(t.x,e.x,e.scaleX,e.scale,e.originX),zn(t.y,e.y,e.scaleY,e.scale,e.originY)}function Ri(t,e){return Vi(Wa(t.getBoundingClientRect(),e))}function Za(t,e,n){const s=Ri(t,n),{scroll:i}=e;return i&&(ht(s.x,i.offset.x),ht(s.y,i.offset.y)),s}const Li=({current:t})=>t?t.ownerDocument.defaultView:null,Yn=(t,e)=>Math.abs(t-e);function Ja(t,e){const n=Yn(t.x,e.x),s=Yn(t.y,e.y);return Math.sqrt(n**2+s**2)}class ki{constructor(e,n,{transformPagePoint:s,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 h=ae(this.lastMoveEventInfo,this.history),f=this.startEvent!==null,d=Ja(h.offset,{x:0,y:0})>=3;if(!f&&!d)return;const{point:m}=h,{timestamp:y}=R;this.history.push({...m,timestamp:y});const{onStart:v,onMove:g}=this.handlers;f||(v&&v(this.lastMoveEvent,h),this.startEvent=this.lastMoveEvent),g&&g(this.lastMoveEvent,h)},this.handlePointerMove=(h,f)=>{this.lastMoveEvent=h,this.lastMoveEventInfo=oe(f,this.transformPagePoint),M.update(this.updatePoint,!0)},this.handlePointerUp=(h,f)=>{this.end();const{onEnd:d,onSessionEnd:m,resumeAnimation:y}=this.handlers;if(this.dragSnapToOrigin&&y&&y(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const v=ae(h.type==="pointercancel"?this.lastMoveEventInfo:oe(f,this.transformPagePoint),this.history);this.startEvent&&d&&d(h,v),m&&m(h,v)},!dn(e))return;this.dragSnapToOrigin=o,this.handlers=n,this.transformPagePoint=s,this.contextWindow=i||window;const r=Bt(e),a=oe(r,this.transformPagePoint),{point:l}=a,{timestamp:c}=R;this.history=[{...l,timestamp:c}];const{onSessionStart:u}=n;u&&u(e,ae(a,this.history)),this.removeListeners=kt(St(this.contextWindow,"pointermove",this.handlePointerMove),St(this.contextWindow,"pointerup",this.handlePointerUp),St(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),Z(this.updatePoint)}}function oe(t,e){return e?{point:e(t.point)}:t}function Xn(t,e){return{x:t.x-e.x,y:t.y-e.y}}function ae({point:t},e){return{point:t,delta:Xn(t,Fi(e)),offset:Xn(t,Qa(e)),velocity:tl(e,.1)}}function Qa(t){return t[0]}function Fi(t){return t[t.length-1]}function tl(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,s=null;const i=Fi(t);for(;n>=0&&(s=t[n],!(i.timestamp-s.timestamp>W(e)));)n--;if(!s)return{x:0,y:0};const o=G(i.timestamp-s.timestamp);if(o===0)return{x:0,y:0};const r={x:(i.x-s.x)/o,y:(i.y-s.y)/o};return r.x===1/0&&(r.x=0),r.y===1/0&&(r.y=0),r}function el(t,{min:e,max:n},s){return e!==void 0&&t<e?t=s?C(e,t,s.min):Math.max(t,e):n!==void 0&&t>n&&(t=s?C(n,t,s.max):Math.min(t,n)),t}function qn(t,e,n){return{min:e!==void 0?t.min+e:void 0,max:n!==void 0?t.max+n-(t.max-t.min):void 0}}function nl(t,{top:e,left:n,bottom:s,right:i}){return{x:qn(t.x,n,i),y:qn(t.y,e,s)}}function Zn(t,e){let n=e.min-t.min,s=e.max-t.max;return e.max-e.min<t.max-t.min&&([n,s]=[s,n]),{min:n,max:s}}function sl(t,e){return{x:Zn(t.x,e.x),y:Zn(t.y,e.y)}}function il(t,e){let n=.5;const s=B(t),i=B(e);return i>s?n=Et(e.min,e.max-s,t.min):s>i&&(n=Et(t.min,t.max-i,e.min)),X(0,1,n)}function rl(t,e){const n={};return e.min!==void 0&&(n.min=e.min-t.min),e.max!==void 0&&(n.max=e.max-t.min),n}const Ee=.35;function ol(t=Ee){return t===!1?t=0:t===!0&&(t=Ee),{x:Jn(t,"left","right"),y:Jn(t,"top","bottom")}}function Jn(t,e,n){return{min:Qn(t,e),max:Qn(t,n)}}function Qn(t,e){return typeof t=="number"?t:t[e]||0}const $={x:!1,y:!1};function Bi(){return $.x||$.y}function al(t){return t==="x"||t==="y"?$[t]?null:($[t]=!0,()=>{$[t]=!1}):$.x||$.y?null:($.x=$.y=!0,()=>{$.x=$.y=!1})}const ll=new WeakMap;class ul{constructor(e){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=D(),this.visualElement=e}start(e,{snapToCursor:n=!1}={}){const{presenceContext:s}=this.visualElement;if(s&&s.isPresent===!1)return;const i=u=>{const{dragSnapToOrigin:h}=this.getProps();h?this.pauseAnimation():this.stopAnimation(),n&&this.snapToCursor(Bt(u).point)},o=(u,h)=>{const{drag:f,dragPropagation:d,onDragStart:m}=this.getProps();if(f&&!d&&(this.openDragLock&&this.openDragLock(),this.openDragLock=al(f),!this.openDragLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),U(v=>{let g=this.getAxisMotionValue(v).get()||0;if(_.test(g)){const{projection:P}=this.visualElement;if(P&&P.layout){const p=P.layout.layoutBox[v];p&&(g=B(p)*(parseFloat(g)/100))}}this.originPoint[v]=g}),m&&M.postRender(()=>m(u,h)),pe(this.visualElement,"transform");const{animationState:y}=this.visualElement;y&&y.setActive("whileDrag",!0)},r=(u,h)=>{const{dragPropagation:f,dragDirectionLock:d,onDirectionLock:m,onDrag:y}=this.getProps();if(!f&&!this.openDragLock)return;const{offset:v}=h;if(d&&this.currentDirection===null){this.currentDirection=cl(v),this.currentDirection!==null&&m&&m(this.currentDirection);return}this.updateAxis("x",h.point,v),this.updateAxis("y",h.point,v),this.visualElement.render(),y&&y(u,h)},a=(u,h)=>this.stop(u,h),l=()=>U(u=>this.getAnimationState(u)==="paused"&&this.getAxisMotionValue(u).animation?.play()),{dragSnapToOrigin:c}=this.getProps();this.panSession=new ki(e,{onSessionStart:i,onStart:o,onMove:r,onSessionEnd:a,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,contextWindow:Li(this.visualElement)})}stop(e,n){const s=this.isDragging;if(this.cancel(),!s)return;const{velocity:i}=n;this.startAnimation(i);const{onDragEnd:o}=this.getProps();o&&M.postRender(()=>o(e,n))}cancel(){this.isDragging=!1;const{projection:e,animationState:n}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:s}=this.getProps();!s&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}updateAxis(e,n,s){const{drag:i}=this.getProps();if(!s||!jt(e,i,this.currentDirection))return;const o=this.getAxisMotionValue(e);let r=this.originPoint[e]+s[e];this.constraints&&this.constraints[e]&&(r=el(r,this.constraints[e],this.elastic[e])),o.set(r)}resolveConstraints(){const{dragConstraints:e,dragElastic:n}=this.getProps(),s=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,i=this.constraints;e&&at(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&s?this.constraints=nl(s.layoutBox,e):this.constraints=!1,this.elastic=ol(n),i!==this.constraints&&s&&this.constraints&&!this.hasMutatedConstraints&&U(o=>{this.constraints!==!1&&this.getAxisMotionValue(o)&&(this.constraints[o]=rl(s.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:n}=this.getProps();if(!e||!at(e))return!1;const s=e.current;Y(s!==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=Za(s,i.root,this.visualElement.getTransformPagePoint());let r=sl(i.layout.layoutBox,o);if(n){const a=n($a(r));this.hasMutatedConstraints=!!a,a&&(r=Vi(a))}return r}startAnimation(e){const{drag:n,dragMomentum:s,dragElastic:i,dragTransition:o,dragSnapToOrigin:r,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},c=U(u=>{if(!jt(u,n,this.currentDirection))return;let h=l&&l[u]||{};r&&(h={min:0,max:0});const f=i?200:1e6,d=i?40:1e7,m={type:"inertia",velocity:s?e[u]:0,bounceStiffness:f,bounceDamping:d,timeConstant:750,restDelta:1,restSpeed:10,...o,...h};return this.startAxisValueAnimation(u,m)});return Promise.all(c).then(a)}startAxisValueAnimation(e,n){const s=this.getAxisMotionValue(e);return pe(this.visualElement,e),s.start(fn(e,s,0,n,this.visualElement,!1))}stopAnimation(){U(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){U(e=>this.getAxisMotionValue(e).animation?.pause())}getAnimationState(e){return this.getAxisMotionValue(e).animation?.state}getAxisMotionValue(e){const n=`_drag${e.toUpperCase()}`,s=this.visualElement.getProps(),i=s[n];return i||this.visualElement.getValue(e,(s.initial?s.initial[e]:void 0)||0)}snapToCursor(e){U(n=>{const{drag:s}=this.getProps();if(!jt(n,s,this.currentDirection))return;const{projection:i}=this.visualElement,o=this.getAxisMotionValue(n);if(i&&i.layout){const{min:r,max:a}=i.layout.layoutBox[n];o.set(e[n]-C(r,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:n}=this.getProps(),{projection:s}=this.visualElement;if(!at(n)||!s||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};U(r=>{const a=this.getAxisMotionValue(r);if(a&&this.constraints!==!1){const l=a.get();i[r]=il({min:l,max:l},this.constraints[r])}});const{transformTemplate:o}=this.visualElement.getProps();this.visualElement.current.style.transform=o?o({},""):"none",s.root&&s.root.updateScroll(),s.updateLayout(),this.resolveConstraints(),U(r=>{if(!jt(r,e,null))return;const a=this.getAxisMotionValue(r),{min:l,max:c}=this.constraints[r];a.set(C(l,c,i[r]))})}addListeners(){if(!this.visualElement.current)return;ll.set(this.visualElement,this);const e=this.visualElement.current,n=St(e,"pointerdown",l=>{const{drag:c,dragListener:u=!0}=this.getProps();c&&u&&this.start(l)}),s=()=>{const{dragConstraints:l}=this.getProps();at(l)&&l.current&&(this.constraints=this.resolveRefConstraints())},{projection:i}=this.visualElement,o=i.addEventListener("measure",s);i&&!i.layout&&(i.root&&i.root.updateScroll(),i.updateLayout()),M.read(s);const r=Rt(window,"resize",()=>this.scalePositionWithinConstraints()),a=i.addEventListener("didUpdate",({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(U(u=>{const h=this.getAxisMotionValue(u);h&&(this.originPoint[u]+=l[u].translate,h.set(h.get()+l[u].translate))}),this.visualElement.render())});return()=>{r(),n(),o(),a&&a()}}getProps(){const e=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:s=!1,dragPropagation:i=!1,dragConstraints:o=!1,dragElastic:r=Ee,dragMomentum:a=!0}=e;return{...e,drag:n,dragDirectionLock:s,dragPropagation:i,dragConstraints:o,dragElastic:r,dragMomentum:a}}}function jt(t,e,n){return(e===!0||e===t)&&(n===null||n===t)}function cl(t,e=10){let n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}class hl extends Q{constructor(e){super(e),this.removeGroupControls=K,this.removeListeners=K,this.controls=new ul(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||K}unmount(){this.removeGroupControls(),this.removeListeners()}}const ts=t=>(e,n)=>{t&&M.postRender(()=>t(e,n))};class fl extends Q{constructor(){super(...arguments),this.removePointerDownListener=K}onPointerDown(e){this.session=new ki(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Li(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:n,onPan:s,onPanEnd:i}=this.node.getProps();return{onSessionStart:ts(e),onStart:ts(n),onMove:s,onEnd:(o,r)=>{delete this.session,i&&M.postRender(()=>i(o,r))}}}mount(){this.removePointerDownListener=St(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}const Kt={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function es(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const Tt={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(T.test(t))t=parseFloat(t);else return t;const n=es(t,e.target.x),s=es(t,e.target.y);return`${n}% ${s}%`}},dl={correct:(t,{treeScale:e,projectionDelta:n})=>{const s=t,i=J.parse(t);if(i.length>5)return s;const o=J.createTransformer(t),r=typeof i[0]!="number"?1:0,a=n.x.scale*e.x,l=n.y.scale*e.y;i[0+r]/=a,i[1+r]/=l;const c=C(a,l,.5);return typeof i[2+r]=="number"&&(i[2+r]/=c),typeof i[3+r]=="number"&&(i[3+r]/=c),o(i)}};class ml extends S.Component{componentDidMount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:s,layoutId:i}=this.props,{projection:o}=e;Vr(pl),o&&(n.group&&n.group.add(o),s&&s.register&&i&&s.register(o),o.root.didUpdate(),o.addEventListener("animationComplete",()=>{this.safeToRemove()}),o.setOptions({...o.options,onExitComplete:()=>this.safeToRemove()})),Kt.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:n,visualElement:s,drag:i,isPresent:o}=this.props,{projection:r}=s;return r&&(r.isPresent=o,i||e.layoutDependency!==n||n===void 0||e.isPresent!==o?r.willUpdate():this.safeToRemove(),e.isPresent!==o&&(o?r.promote():r.relegate()||M.postRender(()=>{const a=r.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),Ke.postRender(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:s}=this.props,{projection:i}=e;i&&(i.scheduleCheckAfterUnmount(),n&&n.group&&n.group.remove(i),s&&s.deregister&&s.deregister(i))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function Oi(t){const[e,n]=Rs(),s=S.useContext(Fe);return de.jsxRuntimeExports.jsx(ml,{...t,layoutGroup:s,switchLayoutGroup:S.useContext(Is),isPresent:e,safeToRemove:n})}const pl={borderRadius:{...Tt,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Tt,borderTopRightRadius:Tt,borderBottomLeftRadius:Tt,borderBottomRightRadius:Tt,boxShadow:dl};function gl(t,e,n){const s=k(t)?t:mt(t);return s.start(fn("",s,e,n)),s.animation}function yl(t){return t instanceof SVGElement&&t.tagName!=="svg"}const vl=(t,e)=>t.depth-e.depth;class Tl{constructor(){this.children=[],this.isDirty=!1}add(e){qe(this.children,e),this.isDirty=!0}remove(e){Ze(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(vl),this.isDirty=!1,this.children.forEach(e)}}function xl(t,e){const n=I.now(),s=({timestamp:i})=>{const o=i-n;o>=e&&(Z(s),t(o-e))};return M.setup(s,!0),()=>Z(s)}const Ii=["TopLeft","TopRight","BottomLeft","BottomRight"],Pl=Ii.length,ns=t=>typeof t=="string"?parseFloat(t):t,ss=t=>typeof t=="number"||T.test(t);function Sl(t,e,n,s,i,o){i?(t.opacity=C(0,n.opacity??1,bl(s)),t.opacityExit=C(e.opacity??1,0,wl(s))):o&&(t.opacity=C(e.opacity??1,n.opacity??1,s));for(let r=0;r<Pl;r++){const a=`border${Ii[r]}Radius`;let l=is(e,a),c=is(n,a);if(l===void 0&&c===void 0)continue;l||(l=0),c||(c=0),l===0||c===0||ss(l)===ss(c)?(t[a]=Math.max(C(ns(l),ns(c),s),0),(_.test(c)||_.test(l))&&(t[a]+="%")):t[a]=c}(e.rotate||n.rotate)&&(t.rotate=C(e.rotate||0,n.rotate||0,s))}function is(t,e){return t[e]!==void 0?t[e]:t.borderRadius}const bl=ji(0,.5,fi),wl=ji(.5,.95,K);function ji(t,e,n){return s=>s<t?0:s>e?1:n(Et(t,e,s))}function rs(t,e){t.min=e.min,t.max=e.max}function N(t,e){rs(t.x,e.x),rs(t.y,e.y)}function os(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}function as(t,e,n,s,i){return t-=e,t=zt(t,1/n,s),i!==void 0&&(t=zt(t,1/i,s)),t}function Al(t,e=0,n=1,s=.5,i,o=t,r=t){if(_.test(e)&&(e=parseFloat(e),e=C(r.min,r.max,e/100)-r.min),typeof e!="number")return;let a=C(o.min,o.max,s);t===o&&(a-=e),t.min=as(t.min,e,n,a,i),t.max=as(t.max,e,n,a,i)}function ls(t,e,[n,s,i],o,r){Al(t,e[n],e[s],e[i],e.scale,o,r)}const Vl=["x","scaleX","originX"],Cl=["y","scaleY","originY"];function us(t,e,n,s){ls(t.x,e,Vl,n?n.x:void 0,s?s.x:void 0),ls(t.y,e,Cl,n?n.y:void 0,s?s.y:void 0)}function cs(t){return t.translate===0&&t.scale===1}function Ni(t){return cs(t.x)&&cs(t.y)}function hs(t,e){return t.min===e.min&&t.max===e.max}function Ml(t,e){return hs(t.x,e.x)&&hs(t.y,e.y)}function fs(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function Ui(t,e){return fs(t.x,e.x)&&fs(t.y,e.y)}function ds(t){return B(t.x)/B(t.y)}function ms(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}class Dl{constructor(){this.members=[]}add(e){qe(this.members,e),e.scheduleRender()}remove(e){if(Ze(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const n=this.members[this.members.length-1];n&&this.promote(n)}}relegate(e){const n=this.members.findIndex(i=>e===i);if(n===0)return!1;let s;for(let i=n;i>=0;i--){const o=this.members[i];if(o.isPresent!==!1){s=o;break}}return s?(this.promote(s),!0):!1}promote(e,n){const s=this.lead;if(e!==s&&(this.prevLead=s,this.lead=e,e.show(),s)){s.instance&&s.scheduleRender(),e.scheduleRender(),e.resumeFrom=s,n&&(e.resumeFrom.preserveOpacity=!0),s.snapshot&&(e.snapshot=s.snapshot,e.snapshot.latestValues=s.animationValues||s.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:i}=e.options;i===!1&&s.hide()}}exitAnimationComplete(){this.members.forEach(e=>{const{options:n,resumingFrom:s}=e;n.onExitComplete&&n.onExitComplete(),s&&s.options.onExitComplete&&s.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function El(t,e,n){let s="";const i=t.x.translate/e.x,o=t.y.translate/e.y,r=n?.z||0;if((i||o||r)&&(s=`translate3d(${i}px, ${o}px, ${r}px) `),(e.x!==1||e.y!==1)&&(s+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:c,rotate:u,rotateX:h,rotateY:f,skewX:d,skewY:m}=n;c&&(s=`perspective(${c}px) ${s}`),u&&(s+=`rotate(${u}deg) `),h&&(s+=`rotateX(${h}deg) `),f&&(s+=`rotateY(${f}deg) `),d&&(s+=`skewX(${d}deg) `),m&&(s+=`skewY(${m}deg) `)}const a=t.x.scale*e.x,l=t.y.scale*e.y;return(a!==1||l!==1)&&(s+=`scale(${a}, ${l})`),s||"none"}const le=["","X","Y","Z"],Rl={visibility:"hidden"},Ll=1e3;let kl=0;function ue(t,e,n,s){const{latestValues:i}=e;i[t]&&(n[t]=i[t],e.setStaticValue(t,0),s&&(s[t]=0))}function Ki(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=Xs(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:o}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",M,!(i||o))}const{parent:s}=t;s&&!s.hasCheckedOptimisedAppear&&Ki(s)}function $i({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:s,resetTransform:i}){return class{constructor(r={},a=e?.()){this.id=kl++,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(Ol),this.nodes.forEach(Kl),this.nodes.forEach($l),this.nodes.forEach(Il)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=r,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new Tl)}addEventListener(r,a){return this.eventHandlers.has(r)||this.eventHandlers.set(r,new Je),this.eventHandlers.get(r).add(a)}notifyListeners(r,...a){const l=this.eventHandlers.get(r);l&&l.notify(...a)}hasListeners(r){return this.eventHandlers.has(r)}mount(r){if(this.instance)return;this.isSVG=yl(r),this.instance=r;const{layoutId:a,layout:l,visualElement:c}=this.options;if(c&&!c.current&&c.mount(r),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(l||a)&&(this.isLayoutDirty=!0),t){let u;const h=()=>this.root.updateBlockedByResize=!1;t(r,()=>{this.root.updateBlockedByResize=!0,u&&u(),u=xl(h,250),Kt.hasAnimatedSinceResize&&(Kt.hasAnimatedSinceResize=!1,this.nodes.forEach(gs))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&c&&(a||l)&&this.addEventListener("didUpdate",({delta:u,hasLayoutChanged:h,hasRelativeLayoutChanged:f,layout:d})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const m=this.options.transition||c.getDefaultTransition()||zl,{onLayoutAnimationStart:y,onLayoutAnimationComplete:v}=c.getProps(),g=!this.targetLayout||!Ui(this.targetLayout,d),P=!h&&f;if(this.options.layoutRoot||this.resumeFrom||P||h&&(g||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(u,P);const p={...Qe(m,"layout"),onPlay:y,onComplete:v};(c.shouldReduceMotion||this.options.layoutRoot)&&(p.delay=0,p.type=!1),this.startAnimation(p)}else h||gs(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=d})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const r=this.getStack();r&&r.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),Z(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(Wl),this.animationId++)}getTransformTemplate(){const{visualElement:r}=this.options;return r&&r.getProps().transformTemplate}willUpdate(r=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&Ki(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let u=0;u<this.path.length;u++){const h=this.path[u];h.shouldResetTransform=!0,h.updateScroll("snapshot"),h.options.layoutRoot&&h.willUpdate(!1)}const{layoutId:a,layout:l}=this.options;if(a===void 0&&!l)return;const c=this.getTransformTemplate();this.prevTransformTemplateValue=c?c(this.latestValues,""):void 0,this.updateSnapshot(),r&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){this.unblockUpdate(),this.clearAllSnapshots(),this.nodes.forEach(ps);return}this.isUpdating||this.nodes.forEach(Nl),this.isUpdating=!1,this.nodes.forEach(Ul),this.nodes.forEach(Fl),this.nodes.forEach(Bl),this.clearAllSnapshots();const a=I.now();R.delta=X(0,1e3/60,a-R.timestamp),R.timestamp=a,R.isProcessing=!0,te.update.process(R),te.preRender.process(R),te.render.process(R),R.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Ke.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(jl),this.sharedNodes.forEach(_l)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,M.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){M.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!B(this.snapshot.measuredBox.x)&&!B(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();const r=this.layout;this.layout=this.measure(!1),this.layoutCorrected=D(),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:a}=this.options;a&&a.notify("LayoutMeasure",this.layout.layoutBox,r?r.layoutBox:void 0)}updateScroll(r="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===r&&(a=!1),a&&this.instance){const l=s(this.instance);this.scroll={animationId:this.root.animationId,phase:r,isRoot:l,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!i)return;const r=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!Ni(this.projectionDelta),l=this.getTransformTemplate(),c=l?l(this.latestValues,""):void 0,u=c!==this.prevTransformTemplateValue;r&&this.instance&&(a||et(this.latestValues)||u)&&(i(this.instance,c),this.shouldResetTransform=!1,this.scheduleRender())}measure(r=!0){const a=this.measurePageBox();let l=this.removeElementScroll(a);return r&&(l=this.removeTransform(l)),Yl(l),{animationId:this.root.animationId,measuredBox:a,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:r}=this.options;if(!r)return D();const a=r.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(Xl))){const{scroll:c}=this.root;c&&(ht(a.x,c.offset.x),ht(a.y,c.offset.y))}return a}removeElementScroll(r){const a=D();if(N(a,r),this.scroll?.wasRoot)return a;for(let l=0;l<this.path.length;l++){const c=this.path[l],{scroll:u,options:h}=c;c!==this.root&&u&&h.layoutScroll&&(u.wasRoot&&N(a,r),ht(a.x,u.offset.x),ht(a.y,u.offset.y))}return a}applyTransform(r,a=!1){const l=D();N(l,r);for(let c=0;c<this.path.length;c++){const u=this.path[c];!a&&u.options.layoutScroll&&u.scroll&&u!==u.root&&ft(l,{x:-u.scroll.offset.x,y:-u.scroll.offset.y}),et(u.latestValues)&&ft(l,u.latestValues)}return et(this.latestValues)&&ft(l,this.latestValues),l}removeTransform(r){const a=D();N(a,r);for(let l=0;l<this.path.length;l++){const c=this.path[l];if(!c.instance||!et(c.latestValues))continue;Me(c.latestValues)&&c.updateSnapshot();const u=D(),h=c.measurePageBox();N(u,h),us(a,c.latestValues,c.snapshot?c.snapshot.layoutBox:void 0,u)}return et(this.latestValues)&&us(a,this.latestValues),a}setTargetDelta(r){this.targetDelta=r,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(r){this.options={...this.options,...r,crossfade:r.crossfade!==void 0?r.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!==R.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(r=!1){const a=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=a.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=a.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=a.isSharedProjectionDirty);const l=!!this.resumingFrom||this!==a;if(!(r||l&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:u,layoutId:h}=this.options;if(!(!this.layout||!(u||h))){if(this.resolvedRelativeTargetAt=R.timestamp,!this.targetDelta&&!this.relativeTarget){const f=this.getClosestProjectingParent();f&&f.layout&&this.animationProgress!==1?(this.relativeParent=f,this.forceRelativeParentToResolveTarget(),this.relativeTarget=D(),this.relativeTargetOrigin=D(),wt(this.relativeTargetOrigin,this.layout.layoutBox,f.layout.layoutBox),N(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=D(),this.targetWithTransforms=D()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),Xa(this.target,this.relativeTarget,this.relativeParent.target)):this.targetDelta?(this.resumingFrom?this.target=this.applyTransform(this.layout.layoutBox):N(this.target,this.layout.layoutBox),Ei(this.target,this.targetDelta)):N(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const f=this.getClosestProjectingParent();f&&!!f.resumingFrom==!!this.resumingFrom&&!f.options.layoutScroll&&f.target&&this.animationProgress!==1?(this.relativeParent=f,this.forceRelativeParentToResolveTarget(),this.relativeTarget=D(),this.relativeTargetOrigin=D(),wt(this.relativeTargetOrigin,this.target,f.target),N(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(!(!this.parent||Me(this.parent.latestValues)||Di(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){const r=this.getLead(),a=!!this.resumingFrom||this!==r;let l=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(l=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===R.timestamp&&(l=!1),l)return;const{layout:c,layoutId:u}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(c||u))return;N(this.layoutCorrected,this.layout.layoutBox);const h=this.treeScale.x,f=this.treeScale.y;qa(this.layoutCorrected,this.treeScale,this.path,a),r.layout&&!r.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(r.target=r.layout.layoutBox,r.targetWithTransforms=D());const{target:d}=r;if(!d){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(os(this.prevProjectionDelta.x,this.projectionDelta.x),os(this.prevProjectionDelta.y,this.projectionDelta.y)),bt(this.projectionDelta,this.layoutCorrected,d,this.latestValues),(this.treeScale.x!==h||this.treeScale.y!==f||!ms(this.projectionDelta.x,this.prevProjectionDelta.x)||!ms(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",d))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(r=!0){if(this.options.visualElement?.scheduleRender(),r){const a=this.getStack();a&&a.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=ct(),this.projectionDelta=ct(),this.projectionDeltaWithTransform=ct()}setAnimationOrigin(r,a=!1){const l=this.snapshot,c=l?l.latestValues:{},u={...this.latestValues},h=ct();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const f=D(),d=l?l.source:void 0,m=this.layout?this.layout.source:void 0,y=d!==m,v=this.getStack(),g=!v||v.members.length<=1,P=!!(y&&!g&&this.options.crossfade===!0&&!this.path.some(Hl));this.animationProgress=0;let p;this.mixTargetDelta=w=>{const x=w/1e3;ys(h.x,r.x,x),ys(h.y,r.y,x),this.setTargetDelta(h),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(wt(f,this.layout.layoutBox,this.relativeParent.layout.layoutBox),Gl(this.relativeTarget,this.relativeTargetOrigin,f,x),p&&Ml(this.relativeTarget,p)&&(this.isProjectionDirty=!1),p||(p=D()),N(p,this.relativeTarget)),y&&(this.animationValues=u,Sl(u,c,this.latestValues,x,P,g)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=x},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(r){this.notifyListeners("animationStart"),this.currentAnimation?.stop(!1),this.resumingFrom?.currentAnimation?.stop(!1),this.pendingAnimation&&(Z(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=M.update(()=>{Kt.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=mt(0)),this.currentAnimation=gl(this.motionValue,[0,1e3],{...r,isSync:!0,onUpdate:a=>{this.mixTargetDelta(a),r.onUpdate&&r.onUpdate(a)},onStop:()=>{},onComplete:()=>{r.onComplete&&r.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 r=this.getStack();r&&r.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Ll),this.currentAnimation.stop(!1)),this.completeAnimation()}applyTransformsToTarget(){const r=this.getLead();let{targetWithTransforms:a,target:l,layout:c,latestValues:u}=r;if(!(!a||!l||!c)){if(this!==r&&this.layout&&c&&Wi(this.options.animationType,this.layout.layoutBox,c.layoutBox)){l=this.target||D();const h=B(this.layout.layoutBox.x);l.x.min=r.target.x.min,l.x.max=l.x.min+h;const f=B(this.layout.layoutBox.y);l.y.min=r.target.y.min,l.y.max=l.y.min+f}N(a,l),ft(a,u),bt(this.projectionDeltaWithTransform,this.layoutCorrected,a,u)}}registerSharedNode(r,a){this.sharedNodes.has(r)||this.sharedNodes.set(r,new Dl),this.sharedNodes.get(r).add(a);const c=a.options.initialPromotionConfig;a.promote({transition:c?c.transition:void 0,preserveFollowOpacity:c&&c.shouldPreserveFollowOpacity?c.shouldPreserveFollowOpacity(a):void 0})}isLead(){const r=this.getStack();return r?r.lead===this:!0}getLead(){const{layoutId:r}=this.options;return r?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:r}=this.options;return r?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:r}=this.options;if(r)return this.root.sharedNodes.get(r)}promote({needsReset:r,transition:a,preserveFollowOpacity:l}={}){const c=this.getStack();c&&c.promote(this,l),r&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const r=this.getStack();return r?r.relegate(this):!1}resetSkewAndRotation(){const{visualElement:r}=this.options;if(!r)return;let a=!1;const{latestValues:l}=r;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(a=!0),!a)return;const c={};l.z&&ue("z",r,c,this.animationValues);for(let u=0;u<le.length;u++)ue(`rotate${le[u]}`,r,c,this.animationValues),ue(`skew${le[u]}`,r,c,this.animationValues);r.render();for(const u in c)r.setStaticValue(u,c[u]),this.animationValues&&(this.animationValues[u]=c[u]);r.scheduleRender()}getProjectionStyles(r){if(!this.instance||this.isSVG)return;if(!this.isVisible)return Rl;const a={visibility:""},l=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,a.opacity="",a.pointerEvents=Nt(r?.pointerEvents)||"",a.transform=l?l(this.latestValues,""):"none",a;const c=this.getLead();if(!this.projectionDelta||!this.layout||!c.target){const d={};return this.options.layoutId&&(d.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,d.pointerEvents=Nt(r?.pointerEvents)||""),this.hasProjected&&!et(this.latestValues)&&(d.transform=l?l({},""):"none",this.hasProjected=!1),d}const u=c.animationValues||c.latestValues;this.applyTransformsToTarget(),a.transform=El(this.projectionDeltaWithTransform,this.treeScale,u),l&&(a.transform=l(u,a.transform));const{x:h,y:f}=this.projectionDelta;a.transformOrigin=`${h.origin*100}% ${f.origin*100}% 0`,c.animationValues?a.opacity=c===this?u.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:u.opacityExit:a.opacity=c===this?u.opacity!==void 0?u.opacity:"":u.opacityExit!==void 0?u.opacityExit:0;for(const d in Vt){if(u[d]===void 0)continue;const{correct:m,applyTo:y,isCSSVariable:v}=Vt[d],g=a.transform==="none"?u[d]:m(u[d],c);if(y){const P=y.length;for(let p=0;p<P;p++)a[y[p]]=g}else v?this.options.visualElement.renderState.vars[d]=g:a[d]=g}return this.options.layoutId&&(a.pointerEvents=c===this?Nt(r?.pointerEvents)||"":"none"),a}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(r=>r.currentAnimation?.stop(!1)),this.root.nodes.forEach(ps),this.root.sharedNodes.clear()}}}function Fl(t){t.updateLayout()}function Bl(t){const e=t.resumeFrom?.snapshot||t.snapshot;if(t.isLead()&&t.layout&&e&&t.hasListeners("didUpdate")){const{layoutBox:n,measuredBox:s}=t.layout,{animationType:i}=t.options,o=e.source!==t.layout.source;i==="size"?U(u=>{const h=o?e.measuredBox[u]:e.layoutBox[u],f=B(h);h.min=n[u].min,h.max=h.min+f}):Wi(i,e.layoutBox,n)&&U(u=>{const h=o?e.measuredBox[u]:e.layoutBox[u],f=B(n[u]);h.max=h.min+f,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[u].max=t.relativeTarget[u].min+f)});const r=ct();bt(r,n,e.layoutBox);const a=ct();o?bt(a,t.applyTransform(s,!0),e.measuredBox):bt(a,n,e.layoutBox);const l=!Ni(r);let c=!1;if(!t.resumeFrom){const u=t.getClosestProjectingParent();if(u&&!u.resumeFrom){const{snapshot:h,layout:f}=u;if(h&&f){const d=D();wt(d,e.layoutBox,h.layoutBox);const m=D();wt(m,n,f.layoutBox),Ui(d,m)||(c=!0),u.options.layoutRoot&&(t.relativeTarget=m,t.relativeTargetOrigin=d,t.relativeParent=u)}}}t.notifyListeners("didUpdate",{layout:n,snapshot:e,delta:a,layoutDelta:r,hasLayoutChanged:l,hasRelativeLayoutChanged:c})}else if(t.isLead()){const{onExitComplete:n}=t.options;n&&n()}t.options.transition=void 0}function Ol(t){t.parent&&(t.isProjecting()||(t.isProjectionDirty=t.parent.isProjectionDirty),t.isSharedProjectionDirty||(t.isSharedProjectionDirty=!!(t.isProjectionDirty||t.parent.isProjectionDirty||t.parent.isSharedProjectionDirty)),t.isTransformDirty||(t.isTransformDirty=t.parent.isTransformDirty))}function Il(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function jl(t){t.clearSnapshot()}function ps(t){t.clearMeasurements()}function Nl(t){t.isLayoutDirty=!1}function Ul(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function gs(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function Kl(t){t.resolveTargetDelta()}function $l(t){t.calcProjection()}function Wl(t){t.resetSkewAndRotation()}function _l(t){t.removeLeadSnapshot()}function ys(t,e,n){t.translate=C(e.translate,0,n),t.scale=C(e.scale,1,n),t.origin=e.origin,t.originPoint=e.originPoint}function vs(t,e,n,s){t.min=C(e.min,n.min,s),t.max=C(e.max,n.max,s)}function Gl(t,e,n,s){vs(t.x,e.x,n.x,s),vs(t.y,e.y,n.y,s)}function Hl(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const zl={duration:.45,ease:[.4,0,.1,1]},Ts=t=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),xs=Ts("applewebkit/")&&!Ts("chrome/")?Math.round:K;function Ps(t){t.min=xs(t.min),t.max=xs(t.max)}function Yl(t){Ps(t.x),Ps(t.y)}function Wi(t,e,n){return t==="position"||t==="preserve-aspect"&&!Ya(ds(e),ds(n),.2)}function Xl(t){return t!==t.root&&t.scroll?.wasRoot}const ql=$i({attachResizeListener:(t,e)=>Rt(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),ce={current:void 0},_i=$i({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!ce.current){const t=new ql({});t.mount(window),t.setOptions({layoutScroll:!0}),ce.current=t}return ce.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),Zl={pan:{Feature:fl},drag:{Feature:hl,ProjectionNode:_i,MeasureLayout:Oi}};function Gi(t,e,n){if(t instanceof EventTarget)return[t];if(typeof t=="string"){const i=document.querySelectorAll(t);return i?Array.from(i):[]}return Array.from(t)}function Hi(t,e){const n=Gi(t),s=new AbortController,i={passive:!0,...e,signal:s.signal};return[n,i,()=>s.abort()]}function Ss(t){return!(t.pointerType==="touch"||Bi())}function Jl(t,e,n={}){const[s,i,o]=Hi(t,n),r=a=>{if(!Ss(a))return;const{target:l}=a,c=e(l,a);if(typeof c!="function"||!l)return;const u=h=>{Ss(h)&&(c(h),l.removeEventListener("pointerleave",u))};l.addEventListener("pointerleave",u,i)};return s.forEach(a=>{a.addEventListener("pointerenter",r,i)}),o}function bs(t,e,n){const{props:s}=t;t.animationState&&s.whileHover&&t.animationState.setActive("whileHover",n==="Start");const i="onHover"+n,o=s[i];o&&M.postRender(()=>o(e,Bt(e)))}class Ql extends Q{mount(){const{current:e}=this.node;e&&(this.unmount=Jl(e,(n,s)=>(bs(this.node,s,"Start"),i=>bs(this.node,i,"End"))))}unmount(){}}class tu extends Q{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch{e=!0}!e||!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=kt(Rt(this.node.current,"focus",()=>this.onFocus()),Rt(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const zi=(t,e)=>e?t===e?!0:zi(t,e.parentElement):!1,eu=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function nu(t){return eu.has(t.tagName)||t.tabIndex!==-1}const $t=new WeakSet;function ws(t){return e=>{e.key==="Enter"&&t(e)}}function he(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}const su=(t,e)=>{const n=t.currentTarget;if(!n)return;const s=ws(()=>{if($t.has(n))return;he(n,"down");const i=ws(()=>{he(n,"up")}),o=()=>he(n,"cancel");n.addEventListener("keyup",i,e),n.addEventListener("blur",o,e)});n.addEventListener("keydown",s,e),n.addEventListener("blur",()=>n.removeEventListener("keydown",s),e)};function As(t){return dn(t)&&!Bi()}function iu(t,e,n={}){const[s,i,o]=Hi(t,n),r=a=>{const l=a.currentTarget;if(!As(a))return;$t.add(l);const c=e(l,a),u=(d,m)=>{window.removeEventListener("pointerup",h),window.removeEventListener("pointercancel",f),$t.has(l)&&$t.delete(l),As(d)&&typeof c=="function"&&c(d,{success:m})},h=d=>{u(d,l===window||l===document||n.useGlobalTarget||zi(l,d.target))},f=d=>{u(d,!1)};window.addEventListener("pointerup",h,i),window.addEventListener("pointercancel",f,i)};return s.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",r,i),a instanceof HTMLElement&&(a.addEventListener("focus",c=>su(c,i)),!nu(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),o}function Vs(t,e,n){const{props:s}=t;if(t.current instanceof HTMLButtonElement&&t.current.disabled)return;t.animationState&&s.whileTap&&t.animationState.setActive("whileTap",n==="Start");const i="onTap"+(n==="End"?"":n),o=s[i];o&&M.postRender(()=>o(e,Bt(e)))}class ru extends Q{mount(){const{current:e}=this.node;e&&(this.unmount=iu(e,(n,s)=>(Vs(this.node,s,"Start"),(i,{success:o})=>Vs(this.node,i,o?"End":"Cancel")),{useGlobalTarget:this.node.props.globalTapTarget}))}unmount(){}}const Re=new WeakMap,fe=new WeakMap,ou=t=>{const e=Re.get(t.target);e&&e(t)},au=t=>{t.forEach(ou)};function lu({root:t,...e}){const n=t||document;fe.has(n)||fe.set(n,{});const s=fe.get(n),i=JSON.stringify(e);return s[i]||(s[i]=new IntersectionObserver(au,{root:t,...e})),s[i]}function uu(t,e,n){const s=lu(e);return Re.set(t,n),s.observe(t),()=>{Re.delete(t),s.unobserve(t)}}const cu={some:0,all:1};class hu extends Q{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:n,margin:s,amount:i="some",once:o}=e,r={root:n?n.current:void 0,rootMargin:s,threshold:typeof i=="number"?i:cu[i]},a=l=>{const{isIntersecting:c}=l;if(this.isInView===c||(this.isInView=c,o&&!c&&this.hasEnteredView))return;c&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",c);const{onViewportEnter:u,onViewportLeave:h}=this.node.getProps(),f=c?u:h;f&&f(l)};return uu(this.node.current,r,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:e,prevProps:n}=this.node;["amount","margin","root"].some(fu(e,n))&&this.startObserver()}unmount(){}}function fu({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}const du={inView:{Feature:hu},tap:{Feature:ru},focus:{Feature:tu},hover:{Feature:Ql}},mu={layout:{ProjectionNode:_i,MeasureLayout:Oi}},Le={current:null},Yi={current:!1};function pu(){if(Yi.current=!0,!!Be)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>Le.current=t.matches;t.addListener(e),e()}else Le.current=!1}const gu=new WeakMap;function yu(t,e,n){for(const s in e){const i=e[s],o=n[s];if(k(i))t.addValue(s,i);else if(k(o))t.addValue(s,mt(i,{owner:t}));else if(o!==i)if(t.hasValue(s)){const r=t.getValue(s);r.liveStyle===!0?r.jump(i):r.hasAnimated||r.set(i)}else{const r=t.getStaticValue(s);t.addValue(s,mt(r!==void 0?r:i,{owner:t}))}}for(const s in n)e[s]===void 0&&t.removeValue(s);return e}const Xi=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),qi=t=>/^0[^.\s]+$/u.test(t),vu={test:t=>t==="auto",parse:t=>t},Zi=t=>e=>e.test(t),Ji=[vt,T,_,q,Mr,Cr,vu],Cs=t=>Ji.find(Zi(t)),Tu=[...Ji,L,J],xu=t=>Tu.find(Zi(t)),Pu=new Set(["brightness","contrast","saturate","opacity"]);function Su(t){const[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[s]=n.match(tn)||[];if(!s)return t;const i=n.replace(s,"");let o=Pu.has(e)?1:0;return s!==n&&(o*=100),e+"("+o+i+")"}const bu=/\b([a-z-]*)\(.*?\)/gu,ke={...J,getAnimatableNone:t=>{const e=t.match(bu);return e?e.map(Su).join(" "):t}},wu={..._e,color:L,backgroundColor:L,outlineColor:L,fill:L,stroke:L,borderColor:L,borderTopColor:L,borderRightColor:L,borderBottomColor:L,borderLeftColor:L,filter:ke,WebkitFilter:ke},Qi=t=>wu[t];function tr(t,e){let n=Qi(t);return n!==ke&&(n=J),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const Ms=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];class Au{scrapeMotionValuesFromProps(e,n,s){return{}}constructor({parent:e,props:n,presenceContext:s,reducedMotionConfig:i,blockInitialAnimation:o,visualState:r},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.KeyframeResolver=cn,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 f=I.now();this.renderScheduledAt<f&&(this.renderScheduledAt=f,M.render(this.render,!1,!0))};const{latestValues:l,renderState:c}=r;this.latestValues=l,this.baseTarget={...l},this.initialValues=n.initial?{...l}:{},this.renderState=c,this.parent=e,this.props=n,this.presenceContext=s,this.depth=e?e.depth+1:0,this.reducedMotionConfig=i,this.options=a,this.blockInitialAnimation=!!o,this.isControllingVariants=Zt(n),this.isVariantNode=Bs(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:u,...h}=this.scrapeMotionValuesFromProps(n,{},this);for(const f in h){const d=h[f];l[f]!==void 0&&k(d)&&d.set(l[f],!1)}}mount(e){this.current=e,gu.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((n,s)=>this.bindToMotionValue(s,n)),Yi.current||pu(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:Le.current,process.env.NODE_ENV!=="production"&&Ie(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(),Z(this.notifyUpdate),Z(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const e in this.events)this.events[e].clear();for(const e in this.features){const n=this.features[e];n&&(n.unmount(),n.isMounted=!1)}this.current=null}bindToMotionValue(e,n){this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)();const s=yt.has(e);s&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",a=>{this.latestValues[e]=a,this.props.onUpdate&&M.preRender(this.notifyUpdate),s&&this.projection&&(this.projection.isTransformDirty=!0)}),o=n.on("renderRequest",this.scheduleRender);let r;window.MotionCheckAppearSync&&(r=window.MotionCheckAppearSync(this,e,n)),this.valueSubscriptions.set(e,()=>{i(),o(),r&&r(),n.owner&&n.stop()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}updateFeatures(){let e="animation";for(e in dt){const n=dt[e];if(!n)continue;const{isEnabled:s,Feature:i}=n;if(!this.features[e]&&i&&s(this.props)&&(this.features[e]=new i(this)),this.features[e]){const o=this.features[e];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):D()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,n){this.latestValues[e]=n}update(e,n){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=n;for(let s=0;s<Ms.length;s++){const i=Ms[s];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const o="on"+i,r=e[o];r&&(this.propEventSubscriptions[i]=this.on(i,r))}this.prevMotionValues=yu(this,this.scrapeMotionValuesFromProps(e,this.prevProps,this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]: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(e){const n=this.getClosestVariantNode();if(n)return n.variantChildren&&n.variantChildren.add(e),()=>n.variantChildren.delete(e)}addValue(e,n){const s=this.values.get(e);n!==s&&(s&&this.removeValue(e),this.bindToMotionValue(e,n),this.values.set(e,n),this.latestValues[e]=n.get())}removeValue(e){this.values.delete(e);const n=this.valueSubscriptions.get(e);n&&(n(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,n){if(this.props.values&&this.props.values[e])return this.props.values[e];let s=this.values.get(e);return s===void 0&&n!==void 0&&(s=mt(n===null?void 0:n,{owner:this}),this.addValue(e,s)),s}readValue(e,n){let s=this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options);return s!=null&&(typeof s=="string"&&(Xi(s)||qi(s))?s=parseFloat(s):!xu(s)&&J.test(n)&&(s=tr(e,n)),this.setBaseTarget(e,k(s)?s.get():s)),k(s)?s.get():s}setBaseTarget(e,n){this.baseTarget[e]=n}getBaseTarget(e){const{initial:n}=this.props;let s;if(typeof n=="string"||typeof n=="object"){const o=Ye(this.props,n,this.presenceContext?.custom);o&&(s=o[e])}if(n&&s!==void 0)return s;const i=this.getBaseTargetFromProps(this.props,e);return i!==void 0&&!k(i)?i:this.initialValues[e]!==void 0&&s===void 0?void 0:this.baseTarget[e]}on(e,n){return this.events[e]||(this.events[e]=new Je),this.events[e].add(n)}notify(e,...n){this.events[e]&&this.events[e].notify(...n)}}const Vu=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function Cu(t){const e=Vu.exec(t);if(!e)return[,];const[,n,s,i]=e;return[`--${n??s}`,i]}const Mu=4;function er(t,e,n=1){Y(n<=Mu,`Max CSS variable fallback depth detected in property "${t}". This may indicate a circular fallback dependency.`);const[s,i]=Cu(t);if(!s)return;const o=window.getComputedStyle(e).getPropertyValue(s);if(o){const r=o.trim();return Xi(r)?parseFloat(r):r}return We(i)?er(i,e,n+1):i}function Du(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||qi(t):!0}const Eu=new Set(["auto","none","0"]);function Ru(t,e,n){let s=0,i;for(;s<t.length&&!i;){const o=t[s];typeof o=="string"&&!Eu.has(o)&&Dt(o).values.length&&(i=t[s]),s++}if(i&&n)for(const o of e)t[o]=tr(n,i)}class Lu extends cn{constructor(e,n,s,i,o){super(e,n,s,i,o,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:n,name:s}=this;if(!n||!n.current)return;super.readKeyframes();for(let l=0;l<e.length;l++){let c=e[l];if(typeof c=="string"&&(c=c.trim(),We(c))){const u=er(c,n.current);u!==void 0&&(e[l]=u),l===e.length-1&&(this.finalKeyframe=c)}}if(this.resolveNoneKeyframes(),!Si.has(s)||e.length!==2)return;const[i,o]=e,r=Cs(i),a=Cs(o);if(r!==a)if(kn(r)&&kn(a))for(let l=0;l<e.length;l++){const c=e[l];typeof c=="string"&&(e[l]=parseFloat(c))}else it[s]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:n}=this,s=[];for(let i=0;i<e.length;i++)(e[i]===null||Du(e[i]))&&s.push(i);s.length&&Ru(e,s,n)}measureInitialState(){const{element:e,unresolvedKeyframes:n,name:s}=this;if(!e||!e.current)return;s==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=it[s](e.measureViewportBox(),window.getComputedStyle(e.current)),n[0]=this.measuredOrigin;const i=n[n.length-1];i!==void 0&&e.getValue(s,i).jump(i,!1)}measureEndState(){const{element:e,name:n,unresolvedKeyframes:s}=this;if(!e||!e.current)return;const i=e.getValue(n);i&&i.jump(this.measuredOrigin,!1);const o=s.length-1,r=s[o];s[o]=it[n](e.measureViewportBox(),window.getComputedStyle(e.current)),r!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=r),this.removedTransforms?.length&&this.removedTransforms.forEach(([a,l])=>{e.getValue(a).set(l)}),this.resolveNoneKeyframes()}}class nr extends Au{constructor(){super(...arguments),this.KeyframeResolver=Lu}sortInstanceNodePosition(e,n){return e.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(e,n){return e.style?e.style[n]:void 0}removeValueFromRenderState(e,{vars:n,style:s}){delete n[e],delete s[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;k(e)&&(this.childSubscription=e.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}function sr(t,{style:e,vars:n},s,i){Object.assign(t.style,e,i&&i.getProjectionStyles(s));for(const o in n)t.style.setProperty(o,n[o])}function ku(t){return window.getComputedStyle(t)}class Fu extends nr{constructor(){super(...arguments),this.type="html",this.renderInstance=sr}readValueFromInstance(e,n){if(yt.has(n))return this.projection?.isProjecting?Se(n):sa(e,n);{const s=ku(e),i=($e(n)?s.getPropertyValue(n):s[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(e,{transformPagePoint:n}){return Ri(e,n)}build(e,n,s){Ge(e,n,s.transformTemplate)}scrapeMotionValuesFromProps(e,n,s){return Xe(e,n,s)}}const ir=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 Bu(t,e,n,s){sr(t,e,void 0,s);for(const i in e.attrs)t.setAttribute(ir.has(i)?i:Ue(i),e.attrs[i])}class Ou extends nr{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=D}getBaseTargetFromProps(e,n){return e[n]}readValueFromInstance(e,n){if(yt.has(n)){const s=Qi(n);return s&&s.default||0}return n=ir.has(n)?n:Ue(n),e.getAttribute(n)}scrapeMotionValuesFromProps(e,n,s){return zs(e,n,s)}build(e,n,s){Ws(e,n,this.isSVGTag,s.transformTemplate,s.style)}renderInstance(e,n,s,i){Bu(e,n,s,i)}mount(e){this.isSVGTag=Gs(e.tagName),super.mount(e)}}const Iu=(t,e)=>ze(t)?new Ou(e):new Fu(e,{allowProjection:t!==S.Fragment}),ju=Hr({...Ua,...du,...Zl,...mu},Iu),Nu=fr(ju);exports.LayoutGroupContext=Fe;exports.MotionConfigContext=Oe;exports.PresenceContext=Yt;exports.motion=Nu;exports.resolveElements=Gi;exports.useConstant=Ds;exports.useIsomorphicLayoutEffect=Es;exports.usePresence=Rs;
|
|
2
|
-
//# sourceMappingURL=proxy-PQd2AItT.cjs.map
|