tokentracker-cli 0.90.2 → 0.91.3
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/README.de.md +7 -5
- package/README.ja.md +9 -5
- package/README.ko.md +9 -5
- package/README.md +7 -5
- package/README.zh-CN.md +6 -4
- package/dashboard/dist/assets/{AchievementBadge-BJl0ibLg.js → AchievementBadge-LHOuekQ3.js} +1 -1
- package/dashboard/dist/assets/{AchievementsPage-CV6aNe3g.js → AchievementsPage-DNzeYWBl.js} +2 -2
- package/dashboard/dist/assets/{AchievementsSection-DxLHu9EV.js → AchievementsSection-Ch5dImt8.js} +1 -1
- package/dashboard/dist/assets/{BadgeDetailModal-ConoHhIL.js → BadgeDetailModal-CuikWkUy.js} +1 -1
- package/dashboard/dist/assets/{Card-C_VQxG6G.js → Card-Chwjmxjz.js} +1 -1
- package/dashboard/dist/assets/{ClawdAnimated-_Mfn4MnU.js → ClawdAnimated-BdB7aycS.js} +1 -1
- package/dashboard/dist/assets/{CommandPalette-CCRCnYY9.js → CommandPalette-BMwuSEWM.js} +1 -1
- package/dashboard/dist/assets/{CommunityStatsModal-DuICwpdM.js → CommunityStatsModal-eEDF-xn8.js} +1 -1
- package/dashboard/dist/assets/{ConfirmModal-CI27robt.js → ConfirmModal-Be7f6XdL.js} +1 -1
- package/dashboard/dist/assets/{Controls-Cwu0gtgj.js → Controls-CtBFPCBY.js} +1 -1
- package/dashboard/dist/assets/{DashboardPage-GsFvPie1.js → DashboardPage-M0p-SU-f.js} +1 -1
- package/dashboard/dist/assets/{DevicePage-BSK76UQE.js → DevicePage-CAfcUond.js} +1 -1
- package/dashboard/dist/assets/{DialogClose-BXQlPs02.js → DialogClose-kd1wIljN.js} +1 -1
- package/dashboard/dist/assets/DialogDescription-CjJLpfCL.js +1 -0
- package/dashboard/dist/assets/{DialogTitle-DyvhHV1-.js → DialogTitle-DhB-tbnZ.js} +1 -1
- package/dashboard/dist/assets/{FadeIn-DaP6F4f8.js → FadeIn-B8eRWBdy.js} +1 -1
- package/dashboard/dist/assets/{HeaderGithubStar-CKB5puCd.js → HeaderGithubStar-DmWep8uP.js} +1 -1
- package/dashboard/dist/assets/{HoverTooltip-BG6k61dF.js → HoverTooltip-DDyTZli0.js} +1 -1
- package/dashboard/dist/assets/{IpCheckPage-Oqt1J9S2.js → IpCheckPage-CN8hYm4o.js} +1 -1
- package/dashboard/dist/assets/{LandingPage-45qoUn79.js → LandingPage-B3cHASqK.js} +2 -2
- package/dashboard/dist/assets/{LeaderboardAvatar-ZgXnaI_N.js → LeaderboardAvatar-CEcLXrJL.js} +1 -1
- package/dashboard/dist/assets/{LeaderboardPage-C7E_LrFk.js → LeaderboardPage-H6HW9hon.js} +2 -2
- package/dashboard/dist/assets/{LeaderboardProfileModal-D6PUcj3b.js → LeaderboardProfileModal-B_5PyjRA.js} +4 -4
- package/dashboard/dist/assets/{LeaderboardProfilePage-VcC9DK_B.js → LeaderboardProfilePage-DR9KWLWv.js} +3 -3
- package/dashboard/dist/assets/{LimitsPage-B9K0RFQD.js → LimitsPage-Da0hRxO_.js} +1 -1
- package/dashboard/dist/assets/{LocalOnlyNotice-BGsfKEM9.js → LocalOnlyNotice-DuTdva_n.js} +1 -1
- package/dashboard/dist/assets/LoginCard-DOL3osrj.js +1 -0
- package/dashboard/dist/assets/{LoginModal-N3pWGciC.js → LoginModal-DBmaQL2L.js} +1 -1
- package/dashboard/dist/assets/{LoginPage-TGgL0aXF.js → LoginPage-Dk08VrkC.js} +1 -1
- package/dashboard/dist/assets/{PetPage-DPi7OT_4.js → PetPage-BbCIdpzx.js} +1 -1
- package/dashboard/dist/assets/{PopoverPopup-BkptZaPd.js → PopoverPopup-C1fJZ4qt.js} +1 -1
- package/dashboard/dist/assets/ProviderIcon-FfLD-f73.js +1 -0
- package/dashboard/dist/assets/{ResetPasswordPage-DQ4qdjBD.js → ResetPasswordPage-Bg7eVc6L.js} +1 -1
- package/dashboard/dist/assets/{SegmentedControl-CuTrxHXS.js → SegmentedControl-CFNHcUz7.js} +1 -1
- package/dashboard/dist/assets/{Select-_Txi2j1D.js → Select-B0Q0eDcJ.js} +1 -1
- package/dashboard/dist/assets/{SelectItemText-DVKhj-YN.js → SelectItemText-BVbLYxSQ.js} +1 -1
- package/dashboard/dist/assets/{ServiceStatusPage-ChflNSK0.js → ServiceStatusPage-DCZH2kz5.js} +1 -1
- package/dashboard/dist/assets/{SessionsPage-CHv6xK2J.js → SessionsPage-DO5Et7ss.js} +2 -2
- package/dashboard/dist/assets/{SettingsPage-DkWAYALG.js → SettingsPage-afgxGfzT.js} +2 -2
- package/dashboard/dist/assets/{SkillsPage-DnTSlBl-.js → SkillsPage-DDKiHCF7.js} +1 -1
- package/dashboard/dist/assets/{TokenGalaxy-yAMCaU-k.js → TokenGalaxy-DV1Xoe5z.js} +1 -1
- package/dashboard/dist/assets/{ToolbarRootContext-BeDIqB0k.js → ToolbarRootContext-DNckd9Qz.js} +1 -1
- package/dashboard/dist/assets/TrendMonitor-CliMJxCC.js +19 -0
- package/dashboard/dist/assets/{WidgetsPage-y_qKZ9Gv.js → WidgetsPage-BrwG6YMM.js} +1 -1
- package/dashboard/dist/assets/{WrappedPage-BGUGI6vk.js → WrappedPage-Ft9YJd0D.js} +1 -1
- package/dashboard/dist/assets/{__vite-browser-external-CRvi_9hb.js → __vite-browser-external-C6_BtvDo.js} +4 -3
- package/dashboard/dist/assets/agent-logos-yYNu1ZUy.js +1 -0
- package/dashboard/dist/assets/{arrow-up-right-CjEesyJI.js → arrow-up-right-B_K57Vbg.js} +1 -1
- package/dashboard/dist/assets/{check-KDrH1gwE.js → check-xH63o2xJ.js} +1 -1
- package/dashboard/dist/assets/{chevron-right-DseqFm-D.js → chevron-right-D3F2rAfr.js} +1 -1
- package/dashboard/dist/assets/{copy-CFJ1QKAQ.js → copy-WPfJGGI0.js} +1 -1
- package/dashboard/dist/assets/{download-BQUNGUdh.js → download-BgtWtEXI.js} +1 -1
- package/dashboard/dist/assets/{external-link-BCEOLLH2.js → external-link-DSHGoZRM.js} +1 -1
- package/dashboard/dist/assets/{flame-BigtoGg2.js → flame-CNGl6Qac.js} +1 -1
- package/dashboard/dist/assets/{format-tokens-CS1GUpAV.js → format-tokens-jVm2UX7Y.js} +1 -1
- package/dashboard/dist/assets/{icons-DpZ1a8Ct.js → icons-B1JZg-Id.js} +1 -1
- package/dashboard/dist/assets/{index-DqkwD6eO.js → index-BTZibjLi.js} +1 -1
- package/dashboard/dist/assets/{index-lGAAw1Rv.js → index-BjD81Qce.js} +1 -1
- package/dashboard/dist/assets/{index-DFU_yVc5.js → index-CUFHknAy.js} +1 -1
- package/dashboard/dist/assets/{info-Br_jtGtO.js → info-CLM460KM.js} +1 -1
- package/dashboard/dist/assets/{limits-providers-CkqO1LMQ.js → limits-providers-CFO4O1qh.js} +1 -1
- package/dashboard/dist/assets/{link-2-D-nAhkk-.js → link-2-BHOsUnAI.js} +1 -1
- package/dashboard/dist/assets/{loader-circle-CuNPuDRR.js → loader-circle-CgcIQi92.js} +1 -1
- package/dashboard/dist/assets/{maximize-2-dlvwitfg.js → maximize-2-DvqfuJEA.js} +1 -1
- package/dashboard/dist/assets/{modifiers.esm-ORha_lPI.js → modifiers.esm-CNiwIkPh.js} +1 -1
- package/dashboard/dist/assets/module-CV1mYFsv.js +3 -0
- package/dashboard/dist/assets/{monitor-smartphone-CI2qvlMB.js → monitor-smartphone-BLutpxrG.js} +1 -1
- package/dashboard/dist/assets/provider-display-BxIgWUEa.js +42 -0
- package/dashboard/dist/assets/{react-Dy9iWvqT.js → react-CM-ozVnh.js} +1 -1
- package/dashboard/dist/assets/{search-Do7tzc3k.js → search-4T07INKt.js} +1 -1
- package/dashboard/dist/assets/{skills-api-CJ-8EFac.js → skills-api-EXMD3LD1.js} +1 -1
- package/dashboard/dist/assets/{sortable.esm-BKQg8NHC.js → sortable.esm-jC6mPJiL.js} +1 -1
- package/dashboard/dist/assets/{store-SUT-n3k3.js → store-CvSEdgf2.js} +1 -1
- package/dashboard/dist/assets/{terminal-BX4DOxd6.js → terminal-D9fyE2pP.js} +1 -1
- package/dashboard/dist/assets/{trash-2-VERlG247.js → trash-2-QLUsAY3l.js} +1 -1
- package/dashboard/dist/assets/{use-community-stats-BX6_XUdu.js → use-community-stats-Chrt3kpU.js} +1 -1
- package/dashboard/dist/assets/{use-limits-display-prefs-BpC3tYRw.js → use-limits-display-prefs-BJJd750e.js} +1 -1
- package/dashboard/dist/assets/{use-ordered-list-CX-LREPo.js → use-ordered-list-BBJp5lFv.js} +1 -1
- package/dashboard/dist/assets/use-reduced-motion-BvXZCGFC.js +1 -0
- package/dashboard/dist/assets/{use-session-efficiency-pref-B1G8hzVM.js → use-session-efficiency-pref-BXbvx2Ht.js} +1 -1
- package/dashboard/dist/assets/{use-transform-DNCqLbUD.js → use-transform-BVp_MUsU.js} +1 -1
- package/dashboard/dist/assets/{use-usage-limits-Cvbvf30m.js → use-usage-limits-Dk3EkeIs.js} +1 -1
- package/dashboard/dist/assets/{useCurrency-EciQmJkm.js → useCurrency-Bi88Sd__.js} +1 -1
- package/dashboard/dist/assets/{useScrollLock-sLkmam8C.js → useScrollLock-if34g2H-.js} +1 -1
- package/dashboard/dist/assets/{useTokenFormat-nb9na-2-.js → useTokenFormat-C2cz-5qJ.js} +1 -1
- package/dashboard/dist/assets/{zap-BQOWCMov.js → zap-D1yHmcQR.js} +1 -1
- package/dashboard/dist/index.html +28 -24
- package/dashboard/dist/ip-check.html +1 -1
- package/dashboard/dist/leaderboard.html +1 -1
- package/dashboard/dist/llms.txt +4 -2
- package/dashboard/dist/share.html +1 -1
- package/package.json +2 -2
- package/src/commands/init.js +12 -1
- package/src/commands/status.js +59 -0
- package/src/commands/sync.js +220 -4
- package/src/lib/account-usage-dedup.js +267 -0
- package/src/lib/local-api.js +4 -0
- package/src/lib/pricing/curated-overrides.json +15 -9
- package/src/lib/pricing/index.js +38 -2
- package/src/lib/pricing/matcher.js +1 -0
- package/src/lib/pricing/seed-snapshot.json +1 -1
- package/src/lib/rollout.js +853 -14
- package/src/lib/source-metadata.js +1 -1
- package/src/lib/trae-cn-config.js +539 -0
- package/dashboard/dist/assets/DialogDescription-M_lg2jhD.js +0 -1
- package/dashboard/dist/assets/LoginCard-j5HVFRdP.js +0 -1
- package/dashboard/dist/assets/ProviderIcon-zaz4nwxI.js +0 -1
- package/dashboard/dist/assets/TrendMonitor-BthLuYwy.js +0 -19
- package/dashboard/dist/assets/agent-logos-DwHwn_cb.js +0 -1
- package/dashboard/dist/assets/module-BRJxSJmz.js +0 -3
- package/dashboard/dist/assets/provider-display-BNCdZ83n.js +0 -42
- package/dashboard/dist/assets/use-reduced-motion-DbebVWBw.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as P,j as Ce}from"./__vite-browser-external-CRvi_9hb.js";const Ws=P.createContext({});function Co(t){const e=P.useRef(null);return e.current===null&&(e.current=t()),e.current}const Mo=typeof window<"u",Do=Mo?P.useLayoutEffect:P.useEffect,Qe=P.createContext(null);function tn(t,e){t.indexOf(e)===-1&&t.push(e)}function qt(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}const Q=(t,e,n)=>n>e?e:n<t?t:n;let re=()=>{};const st={},Ks=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),Hs=t=>typeof t=="object"&&t!==null,Gs=t=>/^0[^.\s]+$/u.test(t);function zs(t){let e;return()=>(e===void 0&&(e=t()),e)}const G=t=>t,Bt=(...t)=>t.reduce((e,n)=>s=>n(e(s))),Et=(t,e,n)=>{const s=e-t;return s?(n-t)/s:1};class en{constructor(){this.subscriptions=[]}add(e){return tn(this.subscriptions,e),()=>qt(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 r=0;r<i;r++){const o=this.subscriptions[r];o&&o(e,n,s)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const W=t=>t*1e3,H=t=>t/1e3,$s=(t,e)=>e?t*(1e3/e):0,_s=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,Eo=1e-7,Ro=12;function Lo(t,e,n,s,i){let r,o,a=0;do o=e+(n-e)/2,r=_s(o,s,i)-t,r>0?n=o:e=o;while(Math.abs(r)>Eo&&++a<Ro);return o}function Ft(t,e,n,s){if(t===e&&n===s)return G;const i=r=>Lo(r,0,1,t,n);return r=>r===0||r===1?r:_s(i(r),e,s)}const Xs=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,Ys=t=>e=>1-t(1-e),qs=Ft(.33,1.53,.69,.99),nn=Ys(qs),Zs=Xs(nn),Js=t=>t>=1?1:(t*=2)<1?.5*nn(t):.5*(2-Math.pow(2,-10*(t-1))),sn=t=>1-Math.sin(Math.acos(t)),Qs=Ys(sn),ti=Xs(sn),ko=Ft(.42,0,1,1),Bo=Ft(0,0,.58,1),ei=Ft(.42,0,.58,1),Fo=t=>Array.isArray(t)&&typeof t[0]!="number",ni=t=>Array.isArray(t)&&typeof t[0]=="number",Io={linear:G,easeIn:ko,easeInOut:ei,easeOut:Bo,circIn:sn,circInOut:ti,circOut:Qs,backIn:nn,backInOut:Zs,backOut:qs,anticipate:Js},Oo=t=>typeof t=="string",Vn=t=>{if(ni(t)){re(t.length===4);const[e,n,s,i]=t;return Ft(e,n,s,i)}else if(Oo(t))return Io[t];return t},jt=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function jo(t){let e=new Set,n=new Set,s=!1,i=!1;const r=new WeakSet;let o={delta:0,timestamp:0,isProcessing:!1};function a(l){r.has(l)&&(u.schedule(l),t()),l(o)}const u={schedule:(l,c=!1,h=!1)=>{const p=h&&s?e:n;return c&&r.add(l),p.add(l),l},cancel:l=>{n.delete(l),r.delete(l)},process:l=>{if(o=l,s){i=!0;return}s=!0;const c=e;e=n,n=c,e.forEach(a),e.clear(),s=!1,i&&(i=!1,u.process(l))}};return u}const No=40;function si(t,e){let n=!1,s=!0;const i={delta:0,timestamp:0,isProcessing:!1},r=()=>n=!0,o=jt.reduce((v,w)=>(v[w]=jo(r),v),{}),{setup:a,read:u,resolveKeyframes:l,preUpdate:c,update:h,preRender:f,render:p,postRender:d}=o,m=()=>{const v=st.useManualTiming,w=v?i.timestamp:performance.now();n=!1,v||(i.delta=s?1e3/60:Math.max(Math.min(w-i.timestamp,No),1)),i.timestamp=w,i.isProcessing=!0,a.process(i),u.process(i),l.process(i),c.process(i),h.process(i),f.process(i),p.process(i),d.process(i),i.isProcessing=!1,n&&e&&(s=!1,t(m))},g=()=>{n=!0,s=!0,i.isProcessing||t(m)};return{schedule:jt.reduce((v,w)=>{const A=o[w];return v[w]=(D,V=!1,b=!1)=>(n||g(),A.schedule(D,V,b)),v},{}),cancel:v=>{for(let w=0;w<jt.length;w++)o[jt[w]].cancel(v)},state:i,steps:o}}const{schedule:M,cancel:it,state:I,steps:he}=si(typeof requestAnimationFrame<"u"?requestAnimationFrame:G,!0);let Kt;function Uo(){Kt=void 0}const j={now:()=>(Kt===void 0&&j.set(I.isProcessing||st.useManualTiming?I.timestamp:performance.now()),Kt),set:t=>{Kt=t,queueMicrotask(Uo)}},ii=t=>e=>typeof e=="string"&&e.startsWith(t),oi=ii("--"),Wo=ii("var(--"),on=t=>Wo(t)?Ko.test(t.split("/*")[0].trim()):!1,Ko=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function Cn(t){return typeof t!="string"?!1:t.split("/*")[0].includes("var(--")}const wt={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},Rt={...wt,transform:t=>Q(0,1,t)},Nt={...wt,default:1},Vt=t=>Math.round(t*1e5)/1e5,rn=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Ho(t){return t==null}const Go=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,an=(t,e)=>n=>!!(typeof n=="string"&&Go.test(n)&&n.startsWith(t)||e&&!Ho(n)&&Object.prototype.hasOwnProperty.call(n,e)),ri=(t,e,n)=>s=>{if(typeof s!="string")return s;const[i,r,o,a]=s.match(rn);return{[t]:parseFloat(i),[e]:parseFloat(r),[n]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},zo=t=>Q(0,255,t),fe={...wt,transform:t=>Math.round(zo(t))},ct={test:an("rgb","red"),parse:ri("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:s=1})=>"rgba("+fe.transform(t)+", "+fe.transform(e)+", "+fe.transform(n)+", "+Vt(Rt.transform(s))+")"};function $o(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 Me={test:an("#"),parse:$o,transform:ct.transform},It=t=>({test:e=>typeof e=="string"&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),et=It("deg"),J=It("%"),T=It("px"),_o=It("vh"),Xo=It("vw"),Mn={...J,parse:t=>J.parse(t)/100,transform:t=>J.transform(t*100)},gt={test:an("hsl","hue"),parse:ri("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:s=1})=>"hsla("+Math.round(t)+", "+J.transform(Vt(e))+", "+J.transform(Vt(n))+", "+Vt(Rt.transform(s))+")"},L={test:t=>ct.test(t)||Me.test(t)||gt.test(t),parse:t=>ct.test(t)?ct.parse(t):gt.test(t)?gt.parse(t):Me.parse(t),transform:t=>typeof t=="string"?t:t.hasOwnProperty("red")?ct.transform(t):gt.transform(t),getAnimatableNone:t=>{const e=L.parse(t);return e.alpha=0,L.transform(e)}},Yo=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function qo(t){return isNaN(t)&&typeof t=="string"&&(t.match(rn)?.length||0)+(t.match(Yo)?.length||0)>0}const ai="number",li="color",Zo="var",Jo="var(",Dn="${}",Qo=/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 xt(t){const e=t.toString(),n=[],s={color:[],number:[],var:[]},i=[];let r=0;const a=e.replace(Qo,u=>(L.test(u)?(s.color.push(r),i.push(li),n.push(L.parse(u))):u.startsWith(Jo)?(s.var.push(r),i.push(Zo),n.push(u)):(s.number.push(r),i.push(ai),n.push(parseFloat(u))),++r,Dn)).split(Dn);return{values:n,split:a,indexes:s,types:i}}function tr(t){return xt(t).values}function ui({split:t,types:e}){const n=t.length;return s=>{let i="";for(let r=0;r<n;r++)if(i+=t[r],s[r]!==void 0){const o=e[r];o===ai?i+=Vt(s[r]):o===li?i+=L.transform(s[r]):i+=s[r]}return i}}function er(t){return ui(xt(t))}const nr=t=>typeof t=="number"?0:L.test(t)?L.getAnimatableNone(t):t,sr=(t,e)=>typeof t=="number"?e?.trim().endsWith("/")?t:0:nr(t);function ir(t){const e=xt(t);return ui(e)(e.values.map((s,i)=>sr(s,e.split[i])))}const _={test:qo,parse:tr,createTransformer:er,getAnimatableNone:ir};function de(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 or({hue:t,saturation:e,lightness:n,alpha:s}){t/=360,e/=100,n/=100;let i=0,r=0,o=0;if(!e)i=r=o=n;else{const a=n<.5?n*(1+e):n+e-n*e,u=2*n-a;i=de(u,a,t+1/3),r=de(u,a,t),o=de(u,a,t-1/3)}return{red:Math.round(i*255),green:Math.round(r*255),blue:Math.round(o*255),alpha:s}}function Zt(t,e){return n=>n>0?e:t}const C=(t,e,n)=>t+(e-t)*n,pe=(t,e,n)=>{const s=t*t,i=n*(e*e-s)+s;return i<0?0:Math.sqrt(i)},rr=[Me,ct,gt],ar=t=>rr.find(e=>e.test(t));function En(t){const e=ar(t);if(!e)return!1;let n=e.parse(t);return e===gt&&(n=or(n)),n}const Rn=(t,e)=>{const n=En(t),s=En(e);if(!n||!s)return Zt(t,e);const i={...n};return r=>(i.red=pe(n.red,s.red,r),i.green=pe(n.green,s.green,r),i.blue=pe(n.blue,s.blue,r),i.alpha=C(n.alpha,s.alpha,r),ct.transform(i))},De=new Set(["none","hidden"]);function lr(t,e){return De.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function ur(t,e){return n=>C(t,e,n)}function ln(t){return typeof t=="number"?ur:typeof t=="string"?on(t)?Zt:L.test(t)?Rn:fr:Array.isArray(t)?ci:typeof t=="object"?L.test(t)?Rn:cr:Zt}function ci(t,e){const n=[...t],s=n.length,i=t.map((r,o)=>ln(r)(r,e[o]));return r=>{for(let o=0;o<s;o++)n[o]=i[o](r);return n}}function cr(t,e){const n={...t,...e},s={};for(const i in n)t[i]!==void 0&&e[i]!==void 0&&(s[i]=ln(t[i])(t[i],e[i]));return i=>{for(const r in s)n[r]=s[r](i);return n}}function hr(t,e){const n=[],s={color:0,var:0,number:0};for(let i=0;i<e.values.length;i++){const r=e.types[i],o=t.indexes[r][s[r]],a=t.values[o]??0;n[i]=a,s[r]++}return n}const fr=(t,e)=>{const n=_.createTransformer(e),s=xt(t),i=xt(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?De.has(t)&&!i.values.length||De.has(e)&&!s.values.length?lr(t,e):Bt(ci(hr(s,i),i.values),n):Zt(t,e)};function hi(t,e,n){return typeof t=="number"&&typeof e=="number"&&typeof n=="number"?C(t,e,n):ln(t)(t,e)}const dr=t=>{const e=({timestamp:n})=>t(n);return{start:(n=!0)=>M.update(e,n),stop:()=>it(e),now:()=>I.isProcessing?I.timestamp:j.now()}},fi=(t,e,n=10)=>{let s="";const i=Math.max(Math.round(e/n),2);for(let r=0;r<i;r++)s+=Math.round(t(r/(i-1))*1e4)/1e4+", ";return`linear(${s.substring(0,s.length-2)})`},Jt=2e4;function un(t){let e=0;const n=50;let s=t.next(e);for(;!s.done&&e<Jt;)e+=n,s=t.next(e);return e>=Jt?1/0:e}function pr(t,e=100,n){const s=n({...t,keyframes:[0,e]}),i=Math.min(un(s),Jt);return{type:"keyframes",ease:r=>s.next(i*r).value/e,duration:H(i)}}const E={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};function Ee(t,e){return t*Math.sqrt(1-e*e)}const mr=12;function gr(t,e,n){let s=n;for(let i=1;i<mr;i++)s=s-t(s)/e(s);return s}const me=.001;function yr({duration:t=E.duration,bounce:e=E.bounce,velocity:n=E.velocity,mass:s=E.mass}){let i,r,o=1-e;o=Q(E.minDamping,E.maxDamping,o),t=Q(E.minDuration,E.maxDuration,H(t)),o<1?(i=l=>{const c=l*o,h=c*t,f=c-n,p=Ee(l,o),d=Math.exp(-h);return me-f/p*d},r=l=>{const h=l*o*t,f=h*n+n,p=Math.pow(o,2)*Math.pow(l,2)*t,d=Math.exp(-h),m=Ee(Math.pow(l,2),o);return(-i(l)+me>0?-1:1)*((f-p)*d)/m}):(i=l=>{const c=Math.exp(-l*t),h=(l-n)*t+1;return-me+c*h},r=l=>{const c=Math.exp(-l*t),h=(n-l)*(t*t);return c*h});const a=5/t,u=gr(i,r,a);if(t=W(t),isNaN(u))return{stiffness:E.stiffness,damping:E.damping,duration:t};{const l=Math.pow(u,2)*s;return{stiffness:l,damping:o*2*Math.sqrt(s*l),duration:t}}}const vr=["duration","bounce"],xr=["stiffness","damping","mass"];function Ln(t,e){return e.some(n=>t[n]!==void 0)}function Tr(t){let e={velocity:E.velocity,stiffness:E.stiffness,damping:E.damping,mass:E.mass,isResolvedFromDuration:!1,...t};if(!Ln(t,xr)&&Ln(t,vr))if(e.velocity=0,t.visualDuration){const n=t.visualDuration,s=2*Math.PI/(n*1.2),i=s*s,r=2*Q(.05,1,1-(t.bounce||0))*Math.sqrt(i);e={...e,mass:E.mass,stiffness:i,damping:r}}else{const n=yr({...t,velocity:0});e={...e,...n,mass:E.mass},e.isResolvedFromDuration=!0}return e}function Qt(t=E.visualDuration,e=E.bounce){const n=typeof t!="object"?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:s,restDelta:i}=n;const r=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],a={done:!1,value:r},{stiffness:u,damping:l,mass:c,duration:h,velocity:f,isResolvedFromDuration:p}=Tr({...n,velocity:-H(n.velocity||0)}),d=f||0,m=l/(2*Math.sqrt(u*c)),g=o-r,y=H(Math.sqrt(u/c)),x=Math.abs(g)<5;s||(s=x?E.restSpeed.granular:E.restSpeed.default),i||(i=x?E.restDelta.granular:E.restDelta.default);let v,w,A,D,V,b;if(m<1)A=Ee(y,m),D=(d+m*y*g)/A,v=S=>{const R=Math.exp(-m*y*S);return o-R*(D*Math.sin(A*S)+g*Math.cos(A*S))},V=m*y*D+g*A,b=m*y*g-D*A,w=S=>Math.exp(-m*y*S)*(V*Math.sin(A*S)+b*Math.cos(A*S));else if(m===1){v=R=>o-Math.exp(-y*R)*(g+(d+y*g)*R);const S=d+y*g;w=R=>Math.exp(-y*R)*(y*S*R-d)}else{const S=y*Math.sqrt(m*m-1);v=X=>{const tt=Math.exp(-m*y*X),Y=Math.min(S*X,300);return o-tt*((d+m*y*g)*Math.sinh(Y)+S*g*Math.cosh(Y))/S};const R=(d+m*y*g)/S,U=m*y*R-g*S,rt=m*y*g-R*S;w=X=>{const tt=Math.exp(-m*y*X),Y=Math.min(S*X,300);return tt*(U*Math.sinh(Y)+rt*Math.cosh(Y))}}const B={calculatedDuration:p&&h||null,velocity:S=>W(w(S)),next:S=>{if(!p&&m<1){const U=Math.exp(-m*y*S),rt=Math.sin(A*S),X=Math.cos(A*S),tt=o-U*(D*rt+g*X),Y=W(U*(V*rt+b*X));return a.done=Math.abs(Y)<=s&&Math.abs(o-tt)<=i,a.value=a.done?o:tt,a}const R=v(S);if(p)a.done=S>=h;else{const U=W(w(S));a.done=Math.abs(U)<=s&&Math.abs(o-R)<=i}return a.value=a.done?o:R,a},toString:()=>{const S=Math.min(un(B),Jt),R=fi(U=>B.next(S*U).value,S,30);return S+"ms "+R},toTransition:()=>{}};return B}Qt.applyToOptions=t=>{const e=pr(t,100,Qt);return t.ease=e.ease,t.duration=W(e.duration),t.type="keyframes",t};const wr=5;function di(t,e,n){const s=Math.max(e-wr,0);return $s(n-t(s),e-s)}function Re({keyframes:t,velocity:e=0,power:n=.8,timeConstant:s=325,bounceDamping:i=10,bounceStiffness:r=500,modifyTarget:o,min:a,max:u,restDelta:l=.5,restSpeed:c}){const h=t[0],f={done:!1,value:h},p=b=>a!==void 0&&b<a||u!==void 0&&b>u,d=b=>a===void 0?u:u===void 0||Math.abs(a-b)<Math.abs(u-b)?a:u;let m=n*e;const g=h+m,y=o===void 0?g:o(g);y!==g&&(m=y-h);const x=b=>-m*Math.exp(-b/s),v=b=>y+x(b),w=b=>{const B=x(b),S=v(b);f.done=Math.abs(B)<=l,f.value=f.done?y:S};let A,D;const V=b=>{p(f.value)&&(A=b,D=Qt({keyframes:[f.value,d(f.value)],velocity:di(v,b,f.value),damping:i,stiffness:r,restDelta:l,restSpeed:c}))};return V(0),{calculatedDuration:null,next:b=>{let B=!1;return!D&&A===void 0&&(B=!0,w(b),V(b)),A!==void 0&&b>=A?D.next(b-A):(!B&&w(b),f)}}}function Pr(t,e,n){const s=[],i=n||st.mix||hi,r=t.length-1;for(let o=0;o<r;o++){let a=i(t[o],t[o+1]);if(e){const u=Array.isArray(e)?e[o]||G:e;a=Bt(u,a)}s.push(a)}return s}function Sr(t,e,{clamp:n=!0,ease:s,mixer:i}={}){const r=t.length;if(re(r===e.length),r===1)return()=>e[0];if(r===2&&e[0]===e[1])return()=>e[1];const o=t[0]===t[1];t[0]>t[r-1]&&(t=[...t].reverse(),e=[...e].reverse());const a=Pr(e,s,i),u=a.length,l=c=>{if(o&&c<t[0])return e[0];let h=0;if(u>1)for(;h<t.length-2&&!(c<t[h+1]);h++);const f=Et(t[h],t[h+1],c);return a[h](f)};return n?c=>l(Q(t[0],t[r-1],c)):l}function br(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 Ar(t){const e=[0];return br(e,t.length-1),e}function Vr(t,e){return t.map(n=>n*e)}function Cr(t,e){return t.map(()=>e||ei).splice(0,t.length-1)}function Ct({duration:t=300,keyframes:e,times:n,ease:s="easeInOut"}){const i=Fo(s)?s.map(Vn):Vn(s),r={done:!1,value:e[0]},o=Vr(n&&n.length===e.length?n:Ar(e),t),a=Sr(o,e,{ease:Array.isArray(i)?i:Cr(e,i)});return{calculatedDuration:t,next:u=>(r.value=a(u),r.done=u>=t,r)}}const Mr=t=>t!==null;function ae(t,{repeat:e,repeatType:n="loop"},s,i=1){const r=t.filter(Mr),a=i<0||e&&n!=="loop"&&e%2===1?0:r.length-1;return!a||s===void 0?r[a]:s}const Dr={decay:Re,inertia:Re,tween:Ct,keyframes:Ct,spring:Qt};function pi(t){typeof t.type=="string"&&(t.type=Dr[t.type])}class cn{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 Er=t=>t/100;class te extends cn{constructor(e){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{const{motionValue:n}=this.options;n&&n.updatedAt!==j.now()&&this.tick(j.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=Ct,repeat:s=0,repeatDelay:i=0,repeatType:r,velocity:o=0}=e;let{keyframes:a}=e;const u=n||Ct;u!==Ct&&typeof a[0]!="number"&&(this.mixKeyframes=Bt(Er,hi(a[0],a[1])),a=[0,100]);const l=u({...e,keyframes:a});r==="mirror"&&(this.mirroredGenerator=u({...e,keyframes:[...a].reverse(),velocity:-o})),l.calculatedDuration===null&&(l.calculatedDuration=un(l));const{calculatedDuration:c}=l;this.calculatedDuration=c,this.resolvedDuration=c+i,this.totalDuration=this.resolvedDuration*(s+1)-i,this.generator=l}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:r,mirroredGenerator:o,resolvedDuration:a,calculatedDuration:u}=this;if(this.startTime===null)return s.next(0);const{delay:l=0,keyframes:c,repeat:h,repeatType:f,repeatDelay:p,type:d,onUpdate:m,finalKeyframe:g}=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 y=this.currentTime-l*(this.playbackSpeed>=0?1:-1),x=this.playbackSpeed>=0?y<0:y>i;this.currentTime=Math.max(y,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let v=this.currentTime,w=s;if(h){const b=Math.min(this.currentTime,i)/a;let B=Math.floor(b),S=b%1;!S&&b>=1&&(S=1),S===1&&B--,B=Math.min(B,h+1),B%2&&(f==="reverse"?(S=1-S,p&&(S-=p/a)):f==="mirror"&&(w=o)),v=Q(0,1,S)*a}let A;x?(this.delayState.value=c[0],A=this.delayState):A=w.next(v),r&&!x&&(A.value=r(A.value));let{done:D}=A;!x&&u!==null&&(D=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const V=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&D);return V&&d!==Re&&(A.value=ae(c,this.options,g,this.speed)),m&&m(A.value),V&&this.finish(),A}then(e,n){return this.finished.then(e,n)}get duration(){return H(this.calculatedDuration)}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+H(e)}get time(){return H(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?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=e,this.tick(e))}getGeneratorVelocity(){const e=this.currentTime;if(e<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(e);const n=this.generator.next(e).value;return di(s=>this.generator.next(s).value,e,n)}get speed(){return this.playbackSpeed}set speed(e){const n=this.playbackSpeed!==e;n&&this.driver&&this.updateTime(j.now()),this.playbackSpeed=e,n&&this.driver&&(this.time=H(this.currentTime))}play(){if(this.isStopped)return;const{driver:e=dr,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(j.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 Rr(t){for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}const ht=t=>t*180/Math.PI,Le=t=>{const e=ht(Math.atan2(t[1],t[0]));return ke(e)},Lr={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:Le,rotateZ:Le,skewX:t=>ht(Math.atan(t[1])),skewY:t=>ht(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},ke=t=>(t=t%360,t<0&&(t+=360),t),kn=Le,Bn=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),Fn=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),kr={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Bn,scaleY:Fn,scale:t=>(Bn(t)+Fn(t))/2,rotateX:t=>ke(ht(Math.atan2(t[6],t[5]))),rotateY:t=>ke(ht(Math.atan2(-t[2],t[0]))),rotateZ:kn,rotate:kn,skewX:t=>ht(Math.atan(t[4])),skewY:t=>ht(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function Be(t){return t.includes("scale")?1:0}function Fe(t,e){if(!t||t==="none")return Be(e);const n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let s,i;if(n)s=kr,i=n;else{const a=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);s=Lr,i=a}if(!i)return Be(e);const r=s[e],o=i[1].split(",").map(Fr);return typeof r=="function"?r(o):o[r]}const Br=(t,e)=>{const{transform:n="none"}=getComputedStyle(t);return Fe(n,e)};function Fr(t){return parseFloat(t.trim())}const Pt=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],St=new Set([...Pt,"pathRotation"]),In=t=>t===wt||t===T,Ir=new Set(["x","y","z"]),Or=Pt.filter(t=>!Ir.has(t));function jr(t){const e=[];return Or.forEach(n=>{const s=t.getValue(n);s!==void 0&&(e.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))}),e}const nt={width:({x:t},{paddingLeft:e="0",paddingRight:n="0",boxSizing:s})=>{const i=t.max-t.min;return s==="border-box"?i:i-parseFloat(e)-parseFloat(n)},height:({y:t},{paddingTop:e="0",paddingBottom:n="0",boxSizing:s})=>{const i=t.max-t.min;return s==="border-box"?i:i-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})=>Fe(e,"x"),y:(t,{transform:e})=>Fe(e,"y")};nt.translateX=nt.x;nt.translateY=nt.y;const ft=new Set;let Ie=!1,Oe=!1,je=!1;function mi(){if(Oe){const t=Array.from(ft).filter(s=>s.needsMeasurement),e=new Set(t.map(s=>s.element)),n=new Map;e.forEach(s=>{const i=jr(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(([r,o])=>{s.getValue(r)?.set(o)})}),t.forEach(s=>s.measureEndState()),t.forEach(s=>{s.suspendedScrollY!==void 0&&window.scrollTo(0,s.suspendedScrollY)})}Oe=!1,Ie=!1,ft.forEach(t=>t.complete(je)),ft.clear()}function gi(){ft.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(Oe=!0)})}function Nr(){je=!0,gi(),mi(),je=!1}class hn{constructor(e,n,s,i,r,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=n,this.name=s,this.motionValue=i,this.element=r,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(ft.add(this),Ie||(Ie=!0,M.read(gi),M.resolveKeyframes(mi))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:n,element:s,motionValue:i}=this;if(e[0]===null){const r=i?.get(),o=e[e.length-1];if(r!==void 0)e[0]=r;else if(s&&n){const a=s.readValue(n,o);a!=null&&(e[0]=a)}e[0]===void 0&&(e[0]=o),i&&r===void 0&&i.set(e[0])}Rr(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),ft.delete(this)}cancel(){this.state==="scheduled"&&(ft.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const Ur=t=>t.startsWith("--");function yi(t,e,n){Ur(e)?t.style.setProperty(e,n):t.style[e]=n}const Wr={};function vi(t,e){const n=zs(t);return()=>Wr[e]??n()}const Kr=vi(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),xi=vi(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),At=([t,e,n,s])=>`cubic-bezier(${t}, ${e}, ${n}, ${s})`,On={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:At([0,.65,.55,1]),circOut:At([.55,0,1,.45]),backIn:At([.31,.01,.66,-.59]),backOut:At([.33,1.53,.69,.99])};function Ti(t,e){if(t)return typeof t=="function"?xi()?fi(t,e):"ease-out":ni(t)?At(t):Array.isArray(t)?t.map(n=>Ti(n,e)||On.easeOut):On[t]}function Hr(t,e,n,{delay:s=0,duration:i=300,repeat:r=0,repeatType:o="loop",ease:a="easeOut",times:u}={},l=void 0){const c={[e]:n};u&&(c.offset=u);const h=Ti(a,i);Array.isArray(h)&&(c.easing=h);const f={delay:s,duration:i,easing:Array.isArray(h)?"linear":h,fill:"both",iterations:r+1,direction:o==="reverse"?"alternate":"normal"};return l&&(f.pseudoElement=l),t.animate(c,f)}function wi(t){return typeof t=="function"&&"applyToOptions"in t}function Gr({type:t,...e}){return wi(t)&&xi()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}class Pi extends cn{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;const{element:n,name:s,keyframes:i,pseudoElement:r,allowFlatten:o=!1,finalKeyframe:a,onComplete:u}=e;this.isPseudoElement=!!r,this.allowFlatten=o,this.options=e,re(typeof e.type!="string");const l=Gr(e);this.animation=Hr(n,s,i,l,r),l.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!r){const c=ae(i,this.options,a,this.speed);this.updateMotionValue&&this.updateMotionValue(c),yi(n,s,c),this.animation.cancel()}u?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,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(){const e=this.options?.element;!this.isPseudoElement&&e?.isConnected&&this.animation.commitStyles?.()}get duration(){const e=this.animation.effect?.getComputedTiming?.().duration||0;return H(Number(e))}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+H(e)}get time(){return H(Number(this.animation.currentTime)||0)}set time(e){const n=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=W(e),n&&this.animation.pause()}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 this.manualStartTime??Number(this.animation.startTime)}set startTime(e){this.manualStartTime=this.animation.startTime=e}attachTimeline({timeline:e,rangeStart:n,rangeEnd:s,observe:i}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,e&&Kr()?(this.animation.timeline=e,n&&(this.animation.rangeStart=n),s&&(this.animation.rangeEnd=s),G):i(this)}}const Si={anticipate:Js,backInOut:Zs,circInOut:ti};function zr(t){return t in Si}function $r(t){typeof t.ease=="string"&&zr(t.ease)&&(t.ease=Si[t.ease])}const ge=10;class _r extends Pi{constructor(e){$r(e),pi(e),super(e),e.startTime!==void 0&&e.autoplay!==!1&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){const{motionValue:n,onUpdate:s,onComplete:i,element:r,...o}=this.options;if(!n)return;if(e!==void 0){n.set(e);return}const a=new te({...o,autoplay:!1}),u=Math.max(ge,j.now()-this.startTime),l=Q(0,ge,u-ge),c=a.sample(u).value,{name:h}=this.options;r&&h&&yi(r,h,c),n.setWithVelocity(a.sample(Math.max(0,u-l)).value,c,l),a.stop()}}const jn=(t,e)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(_.test(t)||t==="0")&&!t.startsWith("url("));function Xr(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 Yr(t,e,n,s){const i=t[0];if(i===null)return!1;if(e==="display"||e==="visibility")return!0;const r=t[t.length-1],o=jn(i,e),a=jn(r,e);return!o||!a?!1:Xr(t)||(n==="spring"||wi(n))&&s}function Ne(t){t.duration=0,t.type="keyframes"}const bi=new Set(["opacity","clipPath","filter","transform","backgroundColor"]),qr=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function Zr(t){for(let e=0;e<t.length;e++)if(typeof t[e]=="string"&&qr.test(t[e]))return!0;return!1}const Jr=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),Qr=zs(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function ta(t){const{motionValue:e,name:n,repeatDelay:s,repeatType:i,damping:r,type:o,keyframes:a}=t,u=e?.owner?.current;if(!(u instanceof HTMLElement)&&!(u instanceof SVGElement))return!1;const{onUpdate:l,transformTemplate:c}=e.owner.getProps();return Qr()&&n&&(bi.has(n)||Jr.has(n)&&Zr(a))&&(n!=="transform"||!c)&&!l&&!s&&i!=="mirror"&&r!==0&&o!=="inertia"}const ea=40;class na extends cn{constructor({autoplay:e=!0,delay:n=0,type:s="keyframes",repeat:i=0,repeatDelay:r=0,repeatType:o="loop",keyframes:a,name:u,motionValue:l,element:c,...h}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=j.now();const f={autoplay:e,delay:n,type:s,repeat:i,repeatDelay:r,repeatType:o,name:u,motionValue:l,element:c,...h},p=c?.KeyframeResolver||hn;this.keyframeResolver=new p(a,(d,m,g)=>this.onKeyframesResolved(d,m,f,!g),u,l,c),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,n,s,i){this.keyframeResolver=void 0;const{name:r,type:o,velocity:a,delay:u,isHandoff:l,onUpdate:c}=s;this.resolvedAt=j.now();let h=!0;Yr(e,r,o,a)||(h=!1,(st.instantAnimations||!u)&&c?.(ae(e,s,n)),e[0]=e[e.length-1],Ne(s),s.repeat=0);const p={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>ea?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...s,keyframes:e},d=h&&!l&&ta(p),m=p.motionValue?.owner?.current;let g;if(d)try{g=new _r({...p,element:m})}catch{g=new te(p)}else g=new te(p);g.finished.then(()=>{this.notifyFinished()}).catch(G),this.pendingTimeline&&(this.stopTimeline=g.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=g}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(),Nr()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}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()}}function Ai(t,e,n,s=0,i=1){const r=Array.from(t).sort((l,c)=>l.sortNodePosition(c)).indexOf(e),o=t.size,a=(o-1)*s;return typeof n=="function"?n(r,o):i===1?r*s:a-r*s}const Nn=30,sa=t=>!isNaN(parseFloat(t)),Un={current:void 0};class ia{constructor(e,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=s=>{const i=j.now();if(this.updatedAt!==i&&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()},this.hasAnimated=!1,this.setCurrent(e),this.owner=n.owner}setCurrent(e){this.current=e,this.updatedAt=j.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=sa(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,n){this.events[e]||(this.events[e]=new en);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){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}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 Un.current&&Un.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const e=j.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>Nn)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Nn);return $s(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 Tt(t,e){return new ia(t,e)}function Vi(t,e){if(t?.inherit&&e){const{inherit:n,...s}=t;return{...e,...s}}return t}function fn(t,e){const n=t?.[e]??t?.default??t;return n!==t?Vi(n,t):n}const oa={type:"spring",stiffness:500,damping:25,restSpeed:10},ra=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),aa={type:"keyframes",duration:.8},la={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},ua=(t,{keyframes:e})=>e.length>2?aa:St.has(t)?t.startsWith("scale")?ra(e[1]):oa:la,ca=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function ha(t){for(const e in t)if(!ca.has(e))return!0;return!1}const dn=(t,e,n,s={},i,r)=>o=>{const a=fn(s,t)||{},u=a.delay||s.delay||0;let{elapsed:l=0}=s;l=l-W(u);const c={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...a,delay:-l,onUpdate:f=>{e.set(f),a.onUpdate&&a.onUpdate(f)},onComplete:()=>{o(),a.onComplete&&a.onComplete()},name:t,motionValue:e,element:r?void 0:i};ha(a)||Object.assign(c,ua(t,c)),c.duration&&(c.duration=W(c.duration)),c.repeatDelay&&(c.repeatDelay=W(c.repeatDelay)),c.from!==void 0&&(c.keyframes[0]=c.from);let h=!1;if((c.type===!1||c.duration===0&&!c.repeatDelay)&&(Ne(c),c.delay===0&&(h=!0)),(st.instantAnimations||st.skipAnimations||i?.shouldSkipAnimations||a.skipAnimations)&&(h=!0,Ne(c),c.delay=0),c.allowFlatten=!a.type&&!a.ease,h&&!r&&e.get()!==void 0){const f=ae(c.keyframes,a);if(f!==void 0){M.update(()=>{c.onUpdate(f),c.onComplete()});return}}return a.isSync?new te(c):new na(c)},fa=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function da(t){const e=fa.exec(t);if(!e)return[,];const[,n,s,i]=e;return[`--${n??s}`,i]}function Ci(t,e,n=1){const[s,i]=da(t);if(!s)return;const r=window.getComputedStyle(e).getPropertyValue(s);if(r){const o=r.trim();return Ks(o)?parseFloat(o):o}return on(i)?Ci(i,e,n+1):i}function Wn(t){const e=[{},{}];return t?.values.forEach((n,s)=>{e[0][s]=n.get(),e[1][s]=n.getVelocity()}),e}function pn(t,e,n,s){if(typeof e=="function"){const[i,r]=Wn(s);e=e(n!==void 0?n:t.custom,i,r)}if(typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"){const[i,r]=Wn(s);e=e(n!==void 0?n:t.custom,i,r)}return e}function dt(t,e,n){const s=t.getProps();return pn(s,e,n!==void 0?n:s.custom,t)}const Mi=new Set(["width","height","top","left","right","bottom",...Pt]),Ue=t=>Array.isArray(t);function pa(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,Tt(n))}function ma(t){return Ue(t)?t[t.length-1]||0:t}function ga(t,e){const n=dt(t,e);let{transitionEnd:s={},transition:i={},...r}=n||{};r={...r,...s};for(const o in r){const a=ma(r[o]);pa(t,o,a)}}const O=t=>!!(t&&t.getVelocity);function ya(t){return!!(O(t)&&t.add)}function We(t,e){const n=t.getValue("willChange");if(ya(n))return n.add(e);if(!n&&st.WillChange){const s=new st.WillChange("auto");t.addValue("willChange",s),s.add(e)}}function mn(t){return t.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}const va="framerAppearId",Di="data-"+mn(va);function Ei(t){return t.props[Di]}function xa({protectedKeys:t,needsAnimating:e},n){const s=t.hasOwnProperty(n)&&e[n]!==!0;return e[n]=!1,s}function Ri(t,e,{delay:n=0,transitionOverride:s,type:i}={}){let{transition:r,transitionEnd:o,...a}=e;const u=t.getDefaultTransition();r=r?Vi(r,u):u;const l=r?.reduceMotion,c=r?.skipAnimations;s&&(r=s);const h=[],f=i&&t.animationState&&t.animationState.getState()[i],p=r?.path;p&&p.animateVisualElement(t,a,r,n,h);for(const d in a){const m=t.getValue(d,t.latestValues[d]??null),g=a[d];if(g===void 0||f&&xa(f,d))continue;const y={delay:n,...fn(r||{},d)};c&&(y.skipAnimations=!0);const x=m.get();if(x!==void 0&&!m.isAnimating()&&!Array.isArray(g)&&g===x&&!y.velocity){M.update(()=>m.set(g));continue}let v=!1;if(window.MotionHandoffAnimation){const D=Ei(t);if(D){const V=window.MotionHandoffAnimation(D,d,M);V!==null&&(y.startTime=V,v=!0)}}We(t,d);const w=l??t.shouldReduceMotion;m.start(dn(d,m,g,w&&Mi.has(d)?{type:!1}:y,t,v));const A=m.animation;A&&h.push(A)}if(o){const d=()=>M.update(()=>{o&&ga(t,o)});h.length?Promise.all(h).then(d):d()}return h}function Ke(t,e,n={}){const s=dt(t,e,n.type==="exit"?t.presenceContext?.custom:void 0);let{transition:i=t.getDefaultTransition()||{}}=s||{};n.transitionOverride&&(i=n.transitionOverride);const r=s?()=>Promise.all(Ri(t,s,n)):()=>Promise.resolve(),o=t.variantChildren&&t.variantChildren.size?(u=0)=>{const{delayChildren:l=0,staggerChildren:c,staggerDirection:h}=i;return Ta(t,e,u,l,c,h,n)}:()=>Promise.resolve(),{when:a}=i;if(a){const[u,l]=a==="beforeChildren"?[r,o]:[o,r];return u().then(()=>l())}else return Promise.all([r(),o(n.delay)])}function Ta(t,e,n=0,s=0,i=0,r=1,o){const a=[];for(const u of t.variantChildren)u.notify("AnimationStart",e),a.push(Ke(u,e,{...o,delay:n+(typeof s=="function"?0:s)+Ai(t.variantChildren,u,s,i,r)}).then(()=>u.notify("AnimationComplete",e)));return Promise.all(a)}function wa(t,e,n={}){t.notify("AnimationStart",e);let s;if(Array.isArray(e)){const i=e.map(r=>Ke(t,r,n));s=Promise.all(i)}else if(typeof e=="string")s=Ke(t,e,n);else{const i=typeof e=="function"?dt(t,e,n.custom):e;s=Promise.all(Ri(t,i,n))}return s.then(()=>{t.notify("AnimationComplete",e)})}const Pa={test:t=>t==="auto",parse:t=>t},Li=t=>e=>e.test(t),ki=[wt,T,J,et,Xo,_o,Pa],Kn=t=>ki.find(Li(t));function Sa(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||Gs(t):!0}const ba=new Set(["brightness","contrast","saturate","opacity"]);function Aa(t){const[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[s]=n.match(rn)||[];if(!s)return t;const i=n.replace(s,"");let r=ba.has(e)?1:0;return s!==n&&(r*=100),e+"("+r+i+")"}const Va=/\b([a-z-]*)\(.*?\)/gu,He={..._,getAnimatableNone:t=>{const e=t.match(Va);return e?e.map(Aa).join(" "):t}},Ge={..._,getAnimatableNone:t=>{const e=_.parse(t);return _.createTransformer(t)(e.map(s=>typeof s=="number"?0:typeof s=="object"?{...s,alpha:1}:s))}},Hn={...wt,transform:Math.round},Ca={rotate:et,pathRotation:et,rotateX:et,rotateY:et,rotateZ:et,scale:Nt,scaleX:Nt,scaleY:Nt,scaleZ:Nt,skew:et,skewX:et,skewY:et,distance:T,translateX:T,translateY:T,translateZ:T,x:T,y:T,z:T,perspective:T,transformPerspective:T,opacity:Rt,originX:Mn,originY:Mn,originZ:T},ee={borderWidth:T,borderTopWidth:T,borderRightWidth:T,borderBottomWidth:T,borderLeftWidth:T,borderRadius: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,inset:T,insetBlock:T,insetBlockStart:T,insetBlockEnd:T,insetInline:T,insetInlineStart:T,insetInlineEnd:T,padding:T,paddingTop:T,paddingRight:T,paddingBottom:T,paddingLeft:T,paddingBlock:T,paddingBlockStart:T,paddingBlockEnd:T,paddingInline:T,paddingInlineStart:T,paddingInlineEnd:T,margin:T,marginTop:T,marginRight:T,marginBottom:T,marginLeft:T,marginBlock:T,marginBlockStart:T,marginBlockEnd:T,marginInline:T,marginInlineStart:T,marginInlineEnd:T,fontSize:T,backgroundPositionX:T,backgroundPositionY:T,...Ca,zIndex:Hn,fillOpacity:Rt,strokeOpacity:Rt,numOctaves:Hn},Ma={...ee,color:L,backgroundColor:L,outlineColor:L,fill:L,stroke:L,borderColor:L,borderTopColor:L,borderRightColor:L,borderBottomColor:L,borderLeftColor:L,filter:He,WebkitFilter:He,mask:Ge,WebkitMask:Ge},Bi=t=>Ma[t],Da=new Set([He,Ge]);function Fi(t,e){let n=Bi(t);return Da.has(n)||(n=_),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const Ea=new Set(["auto","none","0"]);function Ra(t,e,n){let s=0,i;for(;s<t.length&&!i;){const r=t[s];typeof r=="string"&&!Ea.has(r)&&xt(r).values.length&&(i=t[s]),s++}if(i&&n)for(const r of e)t[r]=Fi(n,i)}class La extends hn{constructor(e,n,s,i,r){super(e,n,s,i,r,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:n,name:s}=this;if(!n||!n.current)return;super.readKeyframes();for(let c=0;c<e.length;c++){let h=e[c];if(typeof h=="string"&&(h=h.trim(),on(h))){const f=Ci(h,n.current);f!==void 0&&(e[c]=f),c===e.length-1&&(this.finalKeyframe=h)}}if(this.resolveNoneKeyframes(),!Mi.has(s)||e.length!==2)return;const[i,r]=e,o=Kn(i),a=Kn(r),u=Cn(i),l=Cn(r);if(u!==l&&nt[s]){this.needsMeasurement=!0;return}if(o!==a)if(In(o)&&In(a))for(let c=0;c<e.length;c++){const h=e[c];typeof h=="string"&&(e[c]=parseFloat(h))}else nt[s]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:n}=this,s=[];for(let i=0;i<e.length;i++)(e[i]===null||Sa(e[i]))&&s.push(i);s.length&&Ra(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=nt[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 r=s.length-1,o=s[r];s[r]=nt[n](e.measureViewportBox(),window.getComputedStyle(e.current)),o!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=o),this.removedTransforms?.length&&this.removedTransforms.forEach(([a,u])=>{e.getValue(a).set(u)}),this.resolveNoneKeyframes()}}const gn=["borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius"];function Ii(t,e,n){if(t==null)return[];if(t instanceof EventTarget)return[t];if(typeof t=="string"){let s=document;e&&(s=e.current);const i=n?.[t]??s.querySelectorAll(t);return i?Array.from(i):[]}return Array.from(t).filter(s=>s!=null)}const ze=(t,e)=>e&&typeof t=="number"?e.transform(t):t;function ka(t){return Hs(t)&&"offsetHeight"in t&&!("ownerSVGElement"in t)}const{schedule:yn}=si(queueMicrotask,!1),$={x:!1,y:!1};function Oi(){return $.x||$.y}function Ba(t){return t==="x"||t==="y"?$[t]?null:($[t]=!0,()=>{$[t]=!1}):$.x||$.y?null:($.x=$.y=!0,()=>{$.x=$.y=!1})}function ji(t,e){const n=Ii(t),s=new AbortController,i={passive:!0,...e,signal:s.signal};return[n,i,()=>s.abort()]}function Fa(t){return!(t.pointerType==="touch"||Oi())}function Ia(t,e,n={}){const[s,i,r]=ji(t,n);return s.forEach(o=>{let a=!1,u=!1,l;const c=()=>{o.removeEventListener("pointerleave",d)},h=g=>{l&&(l(g),l=void 0),c()},f=g=>{a=!1,window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",f),u&&(u=!1,h(g))},p=()=>{a=!0,window.addEventListener("pointerup",f,i),window.addEventListener("pointercancel",f,i)},d=g=>{if(g.pointerType!=="touch"){if(a){u=!0;return}h(g)}},m=g=>{if(!Fa(g))return;u=!1;const y=e(o,g);typeof y=="function"&&(l=y,o.addEventListener("pointerleave",d,i))};o.addEventListener("pointerenter",m,i),o.addEventListener("pointerdown",p,i)}),r}const Ni=(t,e)=>e?t===e?!0:Ni(t,e.parentElement):!1,vn=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1,Oa=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function ja(t){return Oa.has(t.tagName)||t.isContentEditable===!0}const Na=new Set(["INPUT","SELECT","TEXTAREA"]);function Ua(t){return Na.has(t.tagName)||t.isContentEditable===!0}const Ht=new WeakSet;function Gn(t){return e=>{e.key==="Enter"&&t(e)}}function ye(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}const Wa=(t,e)=>{const n=t.currentTarget;if(!n)return;const s=Gn(()=>{if(Ht.has(n))return;ye(n,"down");const i=Gn(()=>{ye(n,"up")}),r=()=>ye(n,"cancel");n.addEventListener("keyup",i,e),n.addEventListener("blur",r,e)});n.addEventListener("keydown",s,e),n.addEventListener("blur",()=>n.removeEventListener("keydown",s),e)};function zn(t){return vn(t)&&!Oi()}const $n=new WeakSet;function Ka(t,e,n={}){const[s,i,r]=ji(t,n),o=a=>{const u=a.currentTarget;if(!zn(a)||$n.has(a))return;Ht.add(u),n.stopPropagation&&$n.add(a);const l=e(u,a),c={...i,capture:!0},h=(d,m)=>{window.removeEventListener("pointerup",f,c),window.removeEventListener("pointercancel",p,c),Ht.has(u)&&Ht.delete(u),zn(d)&&typeof l=="function"&&l(d,{success:m})},f=d=>{h(d,u===window||u===document||n.useGlobalTarget||Ni(u,d.target))},p=d=>{h(d,!1)};window.addEventListener("pointerup",f,c),window.addEventListener("pointercancel",p,c)};return s.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",o,i),ka(a)&&(a.addEventListener("focus",l=>Wa(l,i)),!ja(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),r}function xn(t){return Hs(t)&&"ownerSVGElement"in t}const Gt=new WeakMap;let zt;const Ui=(t,e,n)=>(s,i)=>i&&i[0]?i[0][t+"Size"]:xn(s)&&"getBBox"in s?s.getBBox()[e]:s[n],Ha=Ui("inline","width","offsetWidth"),Ga=Ui("block","height","offsetHeight");function za({target:t,borderBoxSize:e}){Gt.get(t)?.forEach(n=>{n(t,{get width(){return Ha(t,e)},get height(){return Ga(t,e)}})})}function $a(t){t.forEach(za)}function _a(){typeof ResizeObserver>"u"||(zt=new ResizeObserver($a))}function Xa(t,e){zt||_a();const n=Ii(t);return n.forEach(s=>{let i=Gt.get(s);i||(i=new Set,Gt.set(s,i)),i.add(e),zt?.observe(s)}),()=>{n.forEach(s=>{const i=Gt.get(s);i?.delete(e),i?.size||zt?.unobserve(s)})}}const $t=new Set;let yt;function Ya(){yt=()=>{const t={get width(){return window.innerWidth},get height(){return window.innerHeight}};$t.forEach(e=>e(t))},window.addEventListener("resize",yt)}function qa(t){return $t.add(t),yt||Ya(),()=>{$t.delete(t),!$t.size&&typeof yt=="function"&&(window.removeEventListener("resize",yt),yt=void 0)}}function _n(t,e){return typeof t=="function"?qa(t):Xa(t,e)}function Za(t){return xn(t)&&t.tagName==="svg"}const Ja=[...ki,L,_],Qa=t=>Ja.find(Li(t)),Xn=()=>({translate:0,scale:1,origin:0,originPoint:0}),vt=()=>({x:Xn(),y:Xn()}),Yn=()=>({min:0,max:0}),k=()=>({x:Yn(),y:Yn()}),tl=new WeakMap;function le(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}function Lt(t){return typeof t=="string"||Array.isArray(t)}const Tn=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],wn=["initial",...Tn];function ue(t){return le(t.animate)||wn.some(e=>Lt(t[e]))}function Wi(t){return!!(ue(t)||t.variants)}function el(t,e,n){for(const s in e){const i=e[s],r=n[s];if(O(i))t.addValue(s,i);else if(O(r))t.addValue(s,Tt(i,{owner:t}));else if(r!==i)if(t.hasValue(s)){const o=t.getValue(s);o.liveStyle===!0?o.jump(i):o.hasAnimated||o.set(i)}else{const o=t.getStaticValue(s);t.addValue(s,Tt(o!==void 0?o:i,{owner:t}))}}for(const s in n)e[s]===void 0&&t.removeValue(s);return e}const $e={current:null},Ki={current:!1},nl=typeof window<"u";function sl(){if(Ki.current=!0,!!nl)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>$e.current=t.matches;t.addEventListener("change",e),e()}else $e.current=!1}const qn=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let ne={};function Hi(t){ne=t}function il(){return ne}class ol{scrapeMotionValuesFromProps(e,n,s){return{}}constructor({parent:e,props:n,presenceContext:s,reducedMotionConfig:i,skipAnimations:r,blockInitialAnimation:o,visualState:a},u={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=hn,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,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 p=j.now();this.renderScheduledAt<p&&(this.renderScheduledAt=p,M.render(this.render,!1,!0))};const{latestValues:l,renderState:c}=a;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.skipAnimationsConfig=r,this.options=u,this.blockInitialAnimation=!!o,this.isControllingVariants=ue(n),this.isVariantNode=Wi(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:h,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const p in f){const d=f[p];l[p]!==void 0&&O(d)&&d.set(l[p])}}mount(e){if(this.hasBeenMounted)for(const n in this.initialValues)this.values.get(n)?.jump(this.initialValues[n]),this.latestValues[n]=this.initialValues[n];this.current=e,tl.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)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(Ki.current||sl(),this.shouldReduceMotion=$e.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection&&this.projection.unmount(),it(this.notifyUpdate),it(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(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}addChild(e){this.children.add(e),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,n){if(this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)(),n.accelerate&&bi.has(e)&&this.current instanceof HTMLElement){const{factory:o,keyframes:a,times:u,ease:l,duration:c}=n.accelerate,h=new Pi({element:this.current,name:e,keyframes:a,times:u,ease:l,duration:W(c)}),f=o(h);this.valueSubscriptions.set(e,()=>{f(),h.cancel()});return}const s=St.has(e);s&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",o=>{this.latestValues[e]=o,this.props.onUpdate&&M.preRender(this.notifyUpdate),s&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let r;typeof window<"u"&&window.MotionCheckAppearSync&&(r=window.MotionCheckAppearSync(this,e,n)),this.valueSubscriptions.set(e,()=>{i(),r&&r()})}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 ne){const n=ne[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 r=this.features[e];r.isMounted?r.update():(r.mount(),r.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):k()}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<qn.length;s++){const i=qn[s];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const r="on"+i,o=e[r];o&&(this.propEventSubscriptions[i]=this.on(i,o))}this.prevMotionValues=el(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=Tt(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"&&(Ks(s)||Gs(s))?s=parseFloat(s):!Qa(s)&&_.test(n)&&(s=Fi(e,n)),this.setBaseTarget(e,O(s)?s.get():s)),O(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 r=pn(this.props,n,this.presenceContext?.custom);r&&(s=r[e])}if(n&&s!==void 0)return s;const i=this.getBaseTargetFromProps(this.props,e);return i!==void 0&&!O(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 en),this.events[e].add(n)}notify(e,...n){this.events[e]&&this.events[e].notify(...n)}scheduleRenderMicrotask(){yn.render(this.render)}}class Gi extends ol{constructor(){super(...arguments),this.KeyframeResolver=La}sortInstanceNodePosition(e,n){return e.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(e,n){const s=e.style;return s?s[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;O(e)&&(this.childSubscription=e.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class ot{constructor(e){this.isMounted=!1,this.node=e}update(){}}function zi({top:t,left:e,right:n,bottom:s}){return{x:{min:e,max:n},y:{min:t,max:s}}}function rl({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function al(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}}function ve(t){return t===void 0||t===1}function _e({scale:t,scaleX:e,scaleY:n}){return!ve(t)||!ve(e)||!ve(n)}function ut(t){return _e(t)||$i(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function $i(t){return Zn(t.x)||Zn(t.y)}function Zn(t){return t&&t!=="0%"}function se(t,e,n){const s=t-n,i=e*s;return n+i}function Jn(t,e,n,s,i){return i!==void 0&&(t=se(t,i,s)),se(t,n,s)+e}function Xe(t,e=0,n=1,s,i){t.min=Jn(t.min,e,n,s,i),t.max=Jn(t.max,e,n,s,i)}function _i(t,{x:e,y:n}){Xe(t.x,e.translate,e.scale,e.originPoint),Xe(t.y,n.translate,n.scale,n.originPoint)}const Qn=.999999999999,ts=1.0000000000001;function ll(t,e,n,s=!1){const i=n.length;if(!i)return;e.x=e.y=1;let r,o;for(let a=0;a<i;a++){r=n[a],o=r.projectionDelta;const{visualElement:u}=r.options;u&&u.props.style&&u.props.style.display==="contents"||(s&&r.options.layoutScroll&&r.scroll&&r!==r.root&&(Z(t.x,-r.scroll.offset.x),Z(t.y,-r.scroll.offset.y)),o&&(e.x*=o.x.scale,e.y*=o.y.scale,_i(t,o)),s&&ut(r.latestValues)&&_t(t,r.latestValues,r.layout?.layoutBox))}e.x<ts&&e.x>Qn&&(e.x=1),e.y<ts&&e.y>Qn&&(e.y=1)}function Z(t,e){t.min+=e,t.max+=e}function es(t,e,n,s,i=.5){const r=C(t.min,t.max,i);Xe(t,e,n,r,s)}function ns(t,e){return typeof t=="string"?parseFloat(t)/100*(e.max-e.min):t}function _t(t,e,n){const s=n??t;es(t.x,ns(e.x,s.x),e.scaleX,e.scale,e.originX),es(t.y,ns(e.y,s.y),e.scaleY,e.scale,e.originY)}function Xi(t,e){return zi(al(t.getBoundingClientRect(),e))}function ul(t,e,n){const s=Xi(t,n),{scroll:i}=e;return i&&(Z(s.x,i.offset.x),Z(s.y,i.offset.y)),s}const cl={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},hl=Pt.length;function fl(t,e,n){let s="",i=!0;for(let o=0;o<hl;o++){const a=Pt[o],u=t[a];if(u===void 0)continue;let l=!0;if(typeof u=="number")l=u===(a.startsWith("scale")?1:0);else{const c=parseFloat(u);l=a.startsWith("scale")?c===1:c===0}if(!l||n){const c=ze(u,ee[a]);if(!l){i=!1;const h=cl[a]||a;s+=`${h}(${c}) `}n&&(e[a]=c)}}const r=t.pathRotation;return r&&(i=!1,s+=`rotate(${ze(r,ee.pathRotation)}) `),s=s.trim(),n?s=n(e,i?"":s):i&&(s="none"),s}function Pn(t,e,n){const{style:s,vars:i,transformOrigin:r}=t;let o=!1,a=!1;for(const u in e){const l=e[u];if(St.has(u)){o=!0;continue}else if(oi(u)){i[u]=l;continue}else{const c=ze(l,ee[u]);u.startsWith("origin")?(a=!0,r[u]=c):s[u]=c}}if(e.transform||(o||n?s.transform=fl(e,t.transform,n):s.transform&&(s.transform="none")),a){const{originX:u="50%",originY:l="50%",originZ:c=0}=r;s.transformOrigin=`${u} ${l} ${c}`}}function Yi(t,{style:e,vars:n},s,i){const r=t.style;let o;for(o in e)r[o]=e[o];i?.applyProjectionStyles(r,s);for(o in n)r.setProperty(o,n[o])}function ss(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const bt={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(T.test(t))t=parseFloat(t);else return t;const n=ss(t,e.target.x),s=ss(t,e.target.y);return`${n}% ${s}%`}},dl={correct:(t,{treeScale:e,projectionDelta:n})=>{const s=t,i=_.parse(t);if(i.length>5)return s;const r=_.createTransformer(t),o=typeof i[0]!="number"?1:0,a=n.x.scale*e.x,u=n.y.scale*e.y;i[0+o]/=a,i[1+o]/=u;const l=C(a,u,.5);return typeof i[2+o]=="number"&&(i[2+o]/=l),typeof i[3+o]=="number"&&(i[3+o]/=l),r(i)}},Ye={borderRadius:{...bt,applyTo:[...gn]},borderTopLeftRadius:bt,borderTopRightRadius:bt,borderBottomLeftRadius:bt,borderBottomRightRadius:bt,boxShadow:dl};function qi(t,{layout:e,layoutId:n}){return St.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!Ye[t]||t==="opacity")}function Sn(t,e,n){const s=t.style,i=e?.style,r={};if(!s)return r;for(const o in s)(O(s[o])||i&&O(i[o])||qi(o,t)||n?.getValue(o)?.liveStyle!==void 0)&&(r[o]=s[o]);return r}function pl(t){return window.getComputedStyle(t)}class ml extends Gi{constructor(){super(...arguments),this.type="html",this.renderInstance=Yi}mount(e){re(!!e.style),super.mount(e)}readValueFromInstance(e,n){if(St.has(n))return this.projection?.isProjecting?Be(n):Br(e,n);{const s=pl(e),i=(oi(n)?s.getPropertyValue(n):s[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(e,{transformPagePoint:n}){return Xi(e,n)}build(e,n,s){Pn(e,n,s.transformTemplate)}scrapeMotionValuesFromProps(e,n,s){return Sn(e,n,s)}}const gl={offset:"stroke-dashoffset",array:"stroke-dasharray"},yl={offset:"strokeDashoffset",array:"strokeDasharray"};function vl(t,e,n=1,s=0,i=!0){t.pathLength=1;const r=i?gl:yl;t[r.offset]=`${-s}`,t[r.array]=`${e} ${n}`}const xl=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function Zi(t,{attrX:e,attrY:n,attrScale:s,pathLength:i,pathSpacing:r=1,pathOffset:o=0,...a},u,l,c){if(Pn(t,a,l),u){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=c?.transformBox??"fill-box",delete h.transformBox);for(const p of xl)h[p]!==void 0&&(f[p]=h[p],delete h[p]);e!==void 0&&(h.x=e),n!==void 0&&(h.y=n),s!==void 0&&(h.scale=s),i!==void 0&&vl(h,i,r,o,!1)}const Ji=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"]),Qi=t=>typeof t=="string"&&t.toLowerCase()==="svg";function Tl(t,e,n,s){Yi(t,e,void 0,s);for(const i in e.attrs)t.setAttribute(Ji.has(i)?i:mn(i),e.attrs[i])}function to(t,e,n){const s=Sn(t,e,n);for(const i in t)if(O(t[i])||O(e[i])){const r=Pt.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;s[r]=t[i]}return s}class wl extends Gi{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=k}getBaseTargetFromProps(e,n){return e[n]}readValueFromInstance(e,n){if(St.has(n)){const s=Bi(n);return s&&s.default||0}return n=Ji.has(n)?n:mn(n),e.getAttribute(n)}scrapeMotionValuesFromProps(e,n,s){return to(e,n,s)}build(e,n,s){Zi(e,n,this.isSVGTag,s.transformTemplate,s.style)}renderInstance(e,n,s,i){Tl(e,n,s,i)}mount(e){this.isSVGTag=Qi(e.tagName),super.mount(e)}}const Pl=wn.length;function eo(t){if(!t)return;if(!t.isControllingVariants){const n=t.parent?eo(t.parent)||{}:{};return t.props.initial!==void 0&&(n.initial=t.props.initial),n}const e={};for(let n=0;n<Pl;n++){const s=wn[n],i=t.props[s];(Lt(i)||i===!1)&&(e[s]=i)}return e}function no(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 Sl=[...Tn].reverse(),bl=Tn.length;function Al(t){return e=>Promise.all(e.map(({animation:n,options:s})=>wa(t,n,s)))}function Vl(t){let e=Al(t),n=is(),s=!0,i=!1;const r=l=>(c,h)=>{const f=dt(t,h,l==="exit"?t.presenceContext?.custom:void 0);if(f){const{transition:p,transitionEnd:d,...m}=f;c={...c,...m,...d}}return c};function o(l){e=l(t)}function a(l){const{props:c}=t,h=eo(t.parent)||{},f=[],p=new Set;let d={},m=1/0;for(let y=0;y<bl;y++){const x=Sl[y],v=n[x],w=c[x]!==void 0?c[x]:h[x],A=Lt(w),D=x===l?v.isActive:null;D===!1&&(m=y);let V=w===h[x]&&w!==c[x]&&A;if(V&&(s||i)&&t.manuallyAnimateOnMount&&(V=!1),v.protectedKeys={...d},!v.isActive&&D===null||!w&&!v.prevProp||le(w)||typeof w=="boolean")continue;if(x==="exit"&&v.isActive&&D!==!0){v.prevResolvedValues&&(d={...d,...v.prevResolvedValues});continue}const b=Cl(v.prevProp,w);let B=b||x===l&&v.isActive&&!V&&A||y>m&&A,S=!1;const R=Array.isArray(w)?w:[w];let U=R.reduce(r(x),{});D===!1&&(U={});const{prevResolvedValues:rt={}}=v,X={...rt,...U},tt=F=>{B=!0,p.has(F)&&(S=!0,p.delete(F)),v.needsAnimating[F]=!0;const K=t.getValue(F);K&&(K.liveStyle=!1)};for(const F in X){const K=U[F],at=rt[F];if(d.hasOwnProperty(F))continue;let pt=!1;Ue(K)&&Ue(at)?pt=!no(K,at)||b:pt=K!==at,pt?K!=null?tt(F):p.add(F):K!==void 0&&p.has(F)?tt(F):v.protectedKeys[F]=!0}v.prevProp=w,v.prevResolvedValues=U,v.isActive&&(d={...d,...U}),(s||i)&&t.blockInitialAnimation&&(B=!1);const Y=V&&b;B&&(!Y||S)&&f.push(...R.map(F=>{const K={type:x};if(typeof F=="string"&&(s||i)&&!Y&&t.manuallyAnimateOnMount&&t.parent){const{parent:at}=t,pt=dt(at,F);if(at.enteringChildren&&pt){const{delayChildren:Vo}=pt.transition||{};K.delay=Ai(at.enteringChildren,t,Vo)}}return{animation:F,options:K}}))}if(p.size){const y={};if(typeof c.initial!="boolean"){const x=dt(t,Array.isArray(c.initial)?c.initial[0]:c.initial);x&&x.transition&&(y.transition=x.transition)}p.forEach(x=>{const v=t.getBaseTarget(x),w=t.getValue(x);w&&(w.liveStyle=!0),y[x]=v??null}),f.push({animation:y})}let g=!!f.length;return s&&(c.initial===!1||c.initial===c.animate)&&!t.manuallyAnimateOnMount&&(g=!1),s=!1,i=!1,g?e(f):Promise.resolve()}function u(l,c){if(n[l].isActive===c)return Promise.resolve();t.variantChildren?.forEach(f=>f.animationState?.setActive(l,c)),n[l].isActive=c;const h=a(l);for(const f in n)n[f].protectedKeys={};return h}return{animateChanges:a,setActive:u,setAnimateFunction:o,getState:()=>n,reset:()=>{n=is(),i=!0}}}function Cl(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!no(e,t):!1}function lt(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function is(){return{animate:lt(!0),whileInView:lt(),whileHover:lt(),whileTap:lt(),whileDrag:lt(),whileFocus:lt(),exit:lt()}}function qe(t,e){t.min=e.min,t.max=e.max}function z(t,e){qe(t.x,e.x),qe(t.y,e.y)}function os(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}const so=1e-4,Ml=1-so,Dl=1+so,io=.01,El=0-io,Rl=0+io;function N(t){return t.max-t.min}function Ll(t,e,n){return Math.abs(t-e)<=n}function rs(t,e,n,s=.5){t.origin=s,t.originPoint=C(e.min,e.max,t.origin),t.scale=N(n)/N(e),t.translate=C(n.min,n.max,t.origin)-t.originPoint,(t.scale>=Ml&&t.scale<=Dl||isNaN(t.scale))&&(t.scale=1),(t.translate>=El&&t.translate<=Rl||isNaN(t.translate))&&(t.translate=0)}function Mt(t,e,n,s){rs(t.x,e.x,n.x,s?s.originX:void 0),rs(t.y,e.y,n.y,s?s.originY:void 0)}function as(t,e,n,s=0){const i=s?C(n.min,n.max,s):n.min;t.min=i+e.min,t.max=t.min+N(e)}function kl(t,e,n,s){as(t.x,e.x,n.x,s?.x),as(t.y,e.y,n.y,s?.y)}function ls(t,e,n,s=0){const i=s?C(n.min,n.max,s):n.min;t.min=e.min-i,t.max=t.min+N(e)}function ie(t,e,n,s){ls(t.x,e.x,n.x,s?.x),ls(t.y,e.y,n.y,s?.y)}function us(t,e,n,s,i){return t-=e,t=se(t,1/n,s),i!==void 0&&(t=se(t,1/i,s)),t}function Bl(t,e=0,n=1,s=.5,i,r=t,o=t){if(J.test(e)&&(e=parseFloat(e),e=C(o.min,o.max,e/100)-o.min),typeof e!="number")return;let a=C(r.min,r.max,s);t===r&&(a-=e),t.min=us(t.min,e,n,a,i),t.max=us(t.max,e,n,a,i)}function cs(t,e,[n,s,i],r,o){Bl(t,e[n],e[s],e[i],e.scale,r,o)}const Fl=["x","scaleX","originX"],Il=["y","scaleY","originY"];function hs(t,e,n,s){cs(t.x,e,Fl,n?n.x:void 0,s?s.x:void 0),cs(t.y,e,Il,n?n.y:void 0,s?s.y:void 0)}function fs(t){return t.translate===0&&t.scale===1}function oo(t){return fs(t.x)&&fs(t.y)}function ds(t,e){return t.min===e.min&&t.max===e.max}function Ol(t,e){return ds(t.x,e.x)&&ds(t.y,e.y)}function ps(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function ro(t,e){return ps(t.x,e.x)&&ps(t.y,e.y)}function ms(t){return N(t.x)/N(t.y)}function gs(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}function q(t){return[t("x"),t("y")]}function jl(t,e,n){let s="";const i=t.x.translate/e.x,r=t.y.translate/e.y,o=n?.z||0;if((i||r||o)&&(s=`translate3d(${i}px, ${r}px, ${o}px) `),(e.x!==1||e.y!==1)&&(s+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:l,rotate:c,pathRotation:h,rotateX:f,rotateY:p,skewX:d,skewY:m}=n;l&&(s=`perspective(${l}px) ${s}`),c&&(s+=`rotate(${c}deg) `),h&&(s+=`rotate(${h}deg) `),f&&(s+=`rotateX(${f}deg) `),p&&(s+=`rotateY(${p}deg) `),d&&(s+=`skewX(${d}deg) `),m&&(s+=`skewY(${m}deg) `)}const a=t.x.scale*e.x,u=t.y.scale*e.y;return(a!==1||u!==1)&&(s+=`scale(${a}, ${u})`),s||"none"}const Nl=gn.length,ys=t=>typeof t=="string"?parseFloat(t):t,vs=t=>typeof t=="number"||T.test(t);function Ul(t,e,n,s,i,r){i?(t.opacity=C(0,n.opacity??1,Wl(s)),t.opacityExit=C(e.opacity??1,0,Kl(s))):r&&(t.opacity=C(e.opacity??1,n.opacity??1,s));for(let o=0;o<Nl;o++){const a=gn[o];let u=xs(e,a),l=xs(n,a);if(u===void 0&&l===void 0)continue;u||(u=0),l||(l=0),u===0||l===0||vs(u)===vs(l)?(t[a]=Math.max(C(ys(u),ys(l),s),0),(J.test(l)||J.test(u))&&(t[a]+="%")):t[a]=l}(e.rotate||n.rotate)&&(t.rotate=C(e.rotate||0,n.rotate||0,s))}function xs(t,e){return t[e]!==void 0?t[e]:t.borderRadius}const Wl=ao(0,.5,Qs),Kl=ao(.5,.95,G);function ao(t,e,n){return s=>s<t?0:s>e?1:n(Et(t,e,s))}function Hl(t,e,n){const s=O(t)?t:Tt(t);return s.start(dn("",s,e,n)),s.animation}function kt(t,e,n,s={passive:!0}){return t.addEventListener(e,n,s),()=>t.removeEventListener(e,n,s)}const Gl=(t,e)=>t.depth-e.depth;class zl{constructor(){this.children=[],this.isDirty=!1}add(e){tn(this.children,e),this.isDirty=!0}remove(e){qt(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(Gl),this.isDirty=!1,this.children.forEach(e)}}function $l(t,e){const n=j.now(),s=({timestamp:i})=>{const r=i-n;r>=e&&(it(s),t(r-e))};return M.setup(s,!0),()=>it(s)}function Xt(t){return O(t)?t.get():t}class _l{constructor(){this.members=[]}add(e){tn(this.members,e);for(let n=this.members.length-1;n>=0;n--){const s=this.members[n];if(s===e||s===this.lead||s===this.prevLead)continue;const i=s.instance;(!i||i.isConnected===!1)&&!s.snapshot&&(qt(this.members,s),s.unmount())}e.scheduleRender()}remove(e){if(qt(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){for(let n=this.members.indexOf(e)-1;n>=0;n--){const s=this.members[n];if(s.isPresent!==!1&&s.instance?.isConnected!==!1)return this.promote(s),!0}return!1}promote(e,n){const s=this.lead;if(e!==s&&(this.prevLead=s,this.lead=e,e.show(),s)){s.updateSnapshot(),e.scheduleRender();const{layoutDependency:i}=s.options,{layoutDependency:r}=e.options;(i===void 0||i!==r)&&(e.resumeFrom=s,n&&(s.preserveOpacity=!0),s.snapshot&&(e.snapshot=s.snapshot,e.snapshot.latestValues=s.animationValues||s.latestValues),e.root?.isUpdating&&(e.isLayoutDirty=!0)),e.options.crossfade===!1&&s.hide()}}exitAnimationComplete(){this.members.forEach(e=>{e.options.onExitComplete?.(),e.resumingFrom?.options.onExitComplete?.()})}scheduleRender(){this.members.forEach(e=>e.instance&&e.scheduleRender(!1))}removeLeadSnapshot(){this.lead?.snapshot&&(this.lead.snapshot=void 0)}}const Yt={hasAnimatedSinceResize:!0,hasEverUpdated:!1},xe=["","X","Y","Z"],Xl=1e3;let Yl=0;function Te(t,e,n,s){const{latestValues:i}=e;i[t]&&(n[t]=i[t],e.setStaticValue(t,0),s&&(s[t]=0))}function lo(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=Ei(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:r}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",M,!(i||r))}const{parent:s}=t;s&&!s.hasCheckedOptimisedAppear&&lo(s)}function uo({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:s,resetTransform:i}){return class{constructor(o={},a=e?.()){this.id=Yl++,this.animationId=0,this.animationCommitId=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.layoutVersion=0,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(Jl),this.nodes.forEach(iu),this.nodes.forEach(ou),this.nodes.forEach(Ql)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,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 u=0;u<this.path.length;u++)this.path[u].shouldResetTransform=!0;this.root===this&&(this.nodes=new zl)}addEventListener(o,a){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new en),this.eventHandlers.get(o).add(a)}notifyListeners(o,...a){const u=this.eventHandlers.get(o);u&&u.notify(...a)}hasListeners(o){return this.eventHandlers.has(o)}mount(o){if(this.instance)return;this.isSVG=xn(o)&&!Za(o),this.instance=o;const{layoutId:a,layout:u,visualElement:l}=this.options;if(l&&!l.current&&l.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(u||a)&&(this.isLayoutDirty=!0),t){let c,h=0;const f=()=>this.root.updateBlockedByResize=!1;M.read(()=>{h=window.innerWidth}),t(o,()=>{const p=window.innerWidth;p!==h&&(h=p,this.root.updateBlockedByResize=!0,c&&c(),c=$l(f,250),Yt.hasAnimatedSinceResize&&(Yt.hasAnimatedSinceResize=!1,this.nodes.forEach(Ps)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&l&&(a||u)&&this.addEventListener("didUpdate",({delta:c,hasLayoutChanged:h,hasRelativeLayoutChanged:f,layout:p})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const d=this.options.transition||l.getDefaultTransition()||cu,{onLayoutAnimationStart:m,onLayoutAnimationComplete:g}=l.getProps(),y=!this.targetLayout||!ro(this.targetLayout,p),x=!h&&f;if(this.options.layoutRoot||this.resumeFrom||x||h&&(y||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const v={...fn(d,"layout"),onPlay:m,onComplete:g};(l.shouldReduceMotion||this.options.layoutRoot)&&(v.delay=0,v.type=!1),this.startAnimation(v),this.setAnimationOrigin(c,x,v.path)}else h||Ps(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=p})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),it(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(ru),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&lo(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let c=0;c<this.path.length;c++){const h=this.path[c];h.shouldResetTransform=!0,(typeof h.latestValues.x=="string"||typeof h.latestValues.y=="string")&&(h.isLayoutDirty=!0),h.updateScroll("snapshot"),h.options.layoutRoot&&h.willUpdate(!1)}const{layoutId:a,layout:u}=this.options;if(a===void 0&&!u)return;const l=this.getTransformTemplate();this.prevTransformTemplateValue=l?l(this.latestValues,""):void 0,this.updateSnapshot(),o&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){const u=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),u&&this.nodes.forEach(eu),this.nodes.forEach(Ts);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(ws);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(nu),this.nodes.forEach(su),this.nodes.forEach(ql),this.nodes.forEach(Zl)):this.nodes.forEach(ws),this.clearAllSnapshots();const a=j.now();I.delta=Q(0,1e3/60,a-I.timestamp),I.timestamp=a,I.isProcessing=!0,he.update.process(I),he.preRender.process(I),he.render.process(I),I.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,yn.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(tu),this.sharedNodes.forEach(au)}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&&!N(this.snapshot.measuredBox.x)&&!N(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let u=0;u<this.path.length;u++)this.path[u].updateScroll();const o=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||(this.layoutCorrected=k()),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,o?o.layoutBox:void 0)}updateScroll(o="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===o&&(a=!1),a&&this.instance){const u=s(this.instance);this.scroll={animationId:this.root.animationId,phase:o,isRoot:u,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:u}}}resetTransform(){if(!i)return;const o=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!oo(this.projectionDelta),u=this.getTransformTemplate(),l=u?u(this.latestValues,""):void 0,c=l!==this.prevTransformTemplateValue;o&&this.instance&&(a||ut(this.latestValues)||c)&&(i(this.instance,l),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const a=this.measurePageBox();let u=this.removeElementScroll(a);return o&&(u=this.removeTransform(u)),hu(u),{animationId:this.root.animationId,measuredBox:a,layoutBox:u,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:o}=this.options;if(!o)return k();const a=o.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(fu))){const{scroll:l}=this.root;l&&(Z(a.x,l.offset.x),Z(a.y,l.offset.y))}return a}removeElementScroll(o){const a=k();if(z(a,o),this.scroll?.wasRoot)return a;for(let u=0;u<this.path.length;u++){const l=this.path[u],{scroll:c,options:h}=l;l!==this.root&&c&&h.layoutScroll&&(c.wasRoot&&z(a,o),Z(a.x,c.offset.x),Z(a.y,c.offset.y))}return a}applyTransform(o,a=!1,u){const l=u||k();z(l,o);for(let c=0;c<this.path.length;c++){const h=this.path[c];!a&&h.options.layoutScroll&&h.scroll&&h!==h.root&&(Z(l.x,-h.scroll.offset.x),Z(l.y,-h.scroll.offset.y)),ut(h.latestValues)&&_t(l,h.latestValues,h.layout?.layoutBox)}return ut(this.latestValues)&&_t(l,this.latestValues,this.layout?.layoutBox),l}removeTransform(o){const a=k();z(a,o);for(let u=0;u<this.path.length;u++){const l=this.path[u];if(!ut(l.latestValues))continue;let c;l.instance&&(_e(l.latestValues)&&l.updateSnapshot(),c=k(),z(c,l.measurePageBox())),hs(a,l.latestValues,l.snapshot?.layoutBox,c)}return ut(this.latestValues)&&hs(a,this.latestValues),a}setTargetDelta(o){this.targetDelta=o,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(o){this.options={...this.options,...o,crossfade:o.crossfade!==void 0?o.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!==I.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){const a=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=a.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=a.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=a.isSharedProjectionDirty);const u=!!this.resumingFrom||this!==a;if(!(o||u&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:c,layoutId:h}=this.options;if(!this.layout||!(c||h))return;this.resolvedRelativeTargetAt=I.timestamp;const f=this.getClosestProjectingParent();f&&this.linkedParentVersion!==f.layoutVersion&&!f.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&f&&f.layout?this.createRelativeTarget(f,this.layout.layoutBox,f.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=k(),this.targetWithTransforms=k()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),kl(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):z(this.target,this.layout.layoutBox),_i(this.target,this.targetDelta)):z(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&f&&!!f.resumingFrom==!!this.resumingFrom&&!f.options.layoutScroll&&f.target&&this.animationProgress!==1?this.createRelativeTarget(f,this.target,f.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||_e(this.parent.latestValues)||$i(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(o,a,u){this.relativeParent=o,this.linkedParentVersion=o.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=k(),this.relativeTargetOrigin=k(),ie(this.relativeTargetOrigin,a,u,this.options.layoutAnchor||void 0),z(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){const o=this.getLead(),a=!!this.resumingFrom||this!==o;let u=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(u=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(u=!1),this.resolvedRelativeTargetAt===I.timestamp&&(u=!1),u)return;const{layout:l,layoutId:c}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(l||c))return;z(this.layoutCorrected,this.layout.layoutBox);const h=this.treeScale.x,f=this.treeScale.y;ll(this.layoutCorrected,this.treeScale,this.path,a),o.layout&&!o.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(o.target=o.layout.layoutBox,o.targetWithTransforms=k());const{target:p}=o;if(!p){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)),Mt(this.projectionDelta,this.layoutCorrected,p,this.latestValues),(this.treeScale.x!==h||this.treeScale.y!==f||!gs(this.projectionDelta.x,this.prevProjectionDelta.x)||!gs(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",p))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(o=!0){if(this.options.visualElement?.scheduleRender(),o){const a=this.getStack();a&&a.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=vt(),this.projectionDelta=vt(),this.projectionDeltaWithTransform=vt()}setAnimationOrigin(o,a=!1,u){const l=this.snapshot,c=l?l.latestValues:{},h={...this.latestValues},f=vt();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const p=k(),d=l?l.source:void 0,m=this.layout?this.layout.source:void 0,g=d!==m,y=this.getStack(),x=!y||y.members.length<=1,v=!!(g&&!x&&this.options.crossfade===!0&&!this.path.some(uu));this.animationProgress=0;let w;const A=u?.interpolateProjection(o);this.mixTargetDelta=D=>{const V=D/1e3,b=A?.(V);b?(f.x.translate=b.x,f.x.scale=C(o.x.scale,1,V),f.x.origin=o.x.origin,f.x.originPoint=o.x.originPoint,f.y.translate=b.y,f.y.scale=C(o.y.scale,1,V),f.y.origin=o.y.origin,f.y.originPoint=o.y.originPoint):(Ss(f.x,o.x,V),Ss(f.y,o.y,V)),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(ie(p,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),lu(this.relativeTarget,this.relativeTargetOrigin,p,V),w&&Ol(this.relativeTarget,w)&&(this.isProjectionDirty=!1),w||(w=k()),z(w,this.relativeTarget)),g&&(this.animationValues=h,Ul(h,c,this.latestValues,V,v,x)),b&&b.rotate!==void 0&&(this.animationValues||(this.animationValues=h),this.animationValues.pathRotation=b.rotate),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=V},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(it(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=M.update(()=>{Yt.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Tt(0)),this.motionValue.jump(0,!1),this.currentAnimation=Hl(this.motionValue,[0,1e3],{...o,velocity:0,isSync:!0,onUpdate:a=>{this.mixTargetDelta(a),o.onUpdate&&o.onUpdate(a)},onComplete:()=>{o.onComplete&&o.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 o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Xl),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:u,layout:l,latestValues:c}=o;if(!(!a||!u||!l)){if(this!==o&&this.layout&&l&&co(this.options.animationType,this.layout.layoutBox,l.layoutBox)){u=this.target||k();const h=N(this.layout.layoutBox.x);u.x.min=o.target.x.min,u.x.max=u.x.min+h;const f=N(this.layout.layoutBox.y);u.y.min=o.target.y.min,u.y.max=u.y.min+f}z(a,u),_t(a,c),Mt(this.projectionDeltaWithTransform,this.layoutCorrected,a,c)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new _l),this.sharedNodes.get(o).add(a);const l=a.options.initialPromotionConfig;a.promote({transition:l?l.transition:void 0,preserveFollowOpacity:l&&l.shouldPreserveFollowOpacity?l.shouldPreserveFollowOpacity(a):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){const{layoutId:o}=this.options;return o?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:o}=this.options;return o?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:a,preserveFollowOpacity:u}={}){const l=this.getStack();l&&l.promote(this,u),o&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let a=!1;const{latestValues:u}=o;if((u.z||u.rotate||u.rotateX||u.rotateY||u.rotateZ||u.skewX||u.skewY)&&(a=!0),!a)return;const l={};u.z&&Te("z",o,l,this.animationValues);for(let c=0;c<xe.length;c++)Te(`rotate${xe[c]}`,o,l,this.animationValues),Te(`skew${xe[c]}`,o,l,this.animationValues);o.render();for(const c in l)o.setStaticValue(c,l[c]),this.animationValues&&(this.animationValues[c]=l[c]);o.scheduleRender()}applyProjectionStyles(o,a){if(!this.instance||this.isSVG)return;if(!this.isVisible){o.visibility="hidden";return}const u=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,o.visibility="",o.opacity="",o.pointerEvents=Xt(a?.pointerEvents)||"",o.transform=u?u(this.latestValues,""):"none";return}const l=this.getLead();if(!this.projectionDelta||!this.layout||!l.target){this.options.layoutId&&(o.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,o.pointerEvents=Xt(a?.pointerEvents)||""),this.hasProjected&&!ut(this.latestValues)&&(o.transform=u?u({},""):"none",this.hasProjected=!1);return}o.visibility="";const c=l.animationValues||l.latestValues;this.applyTransformsToTarget();let h=jl(this.projectionDeltaWithTransform,this.treeScale,c);u&&(h=u(c,h)),o.transform=h;const{x:f,y:p}=this.projectionDelta;o.transformOrigin=`${f.origin*100}% ${p.origin*100}% 0`,l.animationValues?o.opacity=l===this?c.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:c.opacityExit:o.opacity=l===this?c.opacity!==void 0?c.opacity:"":c.opacityExit!==void 0?c.opacityExit:0;for(const d in Ye){if(c[d]===void 0)continue;const{correct:m,applyTo:g,isCSSVariable:y}=Ye[d],x=h==="none"?c[d]:m(c[d],l);if(g){const v=g.length;for(let w=0;w<v;w++)o[g[w]]=x}else y?this.options.visualElement.renderState.vars[d]=x:o[d]=x}this.options.layoutId&&(o.pointerEvents=l===this?Xt(a?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(o=>o.currentAnimation?.stop()),this.root.nodes.forEach(Ts),this.root.sharedNodes.clear()}}}function ql(t){t.updateLayout()}function Zl(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,r=e.source!==t.layout.source;if(i==="size")q(c=>{const h=r?e.measuredBox[c]:e.layoutBox[c],f=N(h);h.min=n[c].min,h.max=h.min+f});else if(i==="x"||i==="y"){const c=i==="x"?"y":"x";qe(r?e.measuredBox[c]:e.layoutBox[c],n[c])}else co(i,e.layoutBox,n)&&q(c=>{const h=r?e.measuredBox[c]:e.layoutBox[c],f=N(n[c]);h.max=h.min+f,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[c].max=t.relativeTarget[c].min+f)});const o=vt();Mt(o,n,e.layoutBox);const a=vt();r?Mt(a,t.applyTransform(s,!0),e.measuredBox):Mt(a,n,e.layoutBox);const u=!oo(o);let l=!1;if(!t.resumeFrom){const c=t.getClosestProjectingParent();if(c&&!c.resumeFrom){const{snapshot:h,layout:f}=c;if(h&&f){const p=t.options.layoutAnchor||void 0,d=k();ie(d,e.layoutBox,h.layoutBox,p);const m=k();ie(m,n,f.layoutBox,p),ro(d,m)||(l=!0),c.options.layoutRoot&&(t.relativeTarget=m,t.relativeTargetOrigin=d,t.relativeParent=c)}}}t.notifyListeners("didUpdate",{layout:n,snapshot:e,delta:a,layoutDelta:o,hasLayoutChanged:u,hasRelativeLayoutChanged:l})}else if(t.isLead()){const{onExitComplete:n}=t.options;n&&n()}t.options.transition=void 0}function Jl(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 Ql(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function tu(t){t.clearSnapshot()}function Ts(t){t.clearMeasurements()}function eu(t){t.isLayoutDirty=!0,t.updateLayout()}function ws(t){t.isLayoutDirty=!1}function nu(t){t.isAnimationBlocked&&t.layout&&!t.isLayoutDirty&&(t.snapshot=t.layout,t.isLayoutDirty=!0)}function su(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function Ps(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function iu(t){t.resolveTargetDelta()}function ou(t){t.calcProjection()}function ru(t){t.resetSkewAndRotation()}function au(t){t.removeLeadSnapshot()}function Ss(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 bs(t,e,n,s){t.min=C(e.min,n.min,s),t.max=C(e.max,n.max,s)}function lu(t,e,n,s){bs(t.x,e.x,n.x,s),bs(t.y,e.y,n.y,s)}function uu(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const cu={duration:.45,ease:[.4,0,.1,1]},As=t=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),Vs=As("applewebkit/")&&!As("chrome/")?Math.round:G;function Cs(t){t.min=Vs(t.min),t.max=Vs(t.max)}function hu(t){Cs(t.x),Cs(t.y)}function co(t,e,n){return t==="position"||t==="preserve-aspect"&&!Ll(ms(e),ms(n),.2)}function fu(t){return t!==t.root&&t.scroll?.wasRoot}const du=uo({attachResizeListener:(t,e)=>kt(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),we={current:void 0},ho=uo({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!we.current){const t=new du({});t.mount(window),t.setOptions({layoutScroll:!0}),we.current=t}return we.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),fo=P.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"});function pu(t=!0){const e=P.useContext(Qe);if(e===null)return[!0,null];const{isPresent:n,onExitComplete:s,register:i}=e,r=P.useId();P.useEffect(()=>{if(t)return i(r)},[t]);const o=P.useCallback(()=>t&&s&&s(r),[r,s,t]);return!n&&s?[!1,o]:[!0]}const po=P.createContext({strict:!1}),Ms={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"]};let Ds=!1;function mu(){if(Ds)return;const t={};for(const e in Ms)t[e]={isEnabled:n=>Ms[e].some(s=>!!n[s])};Hi(t),Ds=!0}function mo(){return mu(),il()}function gu(t){const e=mo();for(const n in t)e[n]={...e[n],...t[n]};Hi(e)}const yu=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","propagate","ignoreStrict","viewport"]);function oe(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||yu.has(t)}let go=t=>!oe(t);function vu(t){typeof t=="function"&&(go=e=>e.startsWith("on")?!oe(e):t(e))}try{vu(require("@emotion/is-prop-valid").default)}catch{}function xu(t,e,n){const s={};for(const i in t)i==="values"&&typeof t.values=="object"||O(t[i])||(go(i)||n===!0&&oe(i)||!e&&!oe(i)||t.draggable&&i.startsWith("onDrag"))&&(s[i]=t[i]);return s}const ce=P.createContext({});function Tu(t,e){if(ue(t)){const{initial:n,animate:s}=t;return{initial:n===!1||Lt(n)?n:void 0,animate:Lt(s)?s:void 0}}return t.inherit!==!1?e:{}}function wu(t){const{initial:e,animate:n}=Tu(t,P.useContext(ce));return P.useMemo(()=>({initial:e,animate:n}),[Es(e),Es(n)])}function Es(t){return Array.isArray(t)?t.join(" "):t}const bn=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function yo(t,e,n){for(const s in e)!O(e[s])&&!qi(s,n)&&(t[s]=e[s])}function Pu({transformTemplate:t},e){return P.useMemo(()=>{const n=bn();return Pn(n,e,t),Object.assign({},n.vars,n.style)},[e])}function Su(t,e){const n=t.style||{},s={};return yo(s,n,t),Object.assign(s,Pu(t,e)),s}function bu(t,e){const n={},s=Su(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 vo=()=>({...bn(),attrs:{}});function Au(t,e,n,s){const i=P.useMemo(()=>{const r=vo();return Zi(r,e,Qi(s),t.transformTemplate,t.style),{...r.attrs,style:{...r.style}}},[e]);if(t.style){const r={};yo(r,t.style,t),i.style={...r,...i.style}}return i}const Vu=["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 An(t){return typeof t!="string"||t.includes("-")?!1:!!(Vu.indexOf(t)>-1||/[A-Z]/u.test(t))}function Cu(t,e,n,{latestValues:s},i,r=!1,o){const u=(o??An(t)?Au:bu)(e,s,i,t),l=xu(e,typeof t=="string",r),c=t!==P.Fragment?{...l,...u,ref:n}:{},{children:h}=e,f=P.useMemo(()=>O(h)?h.get():h,[h]);return P.createElement(t,{...c,children:f})}function Mu({scrapeMotionValuesFromProps:t,createRenderState:e},n,s,i){return{latestValues:Du(n,s,i,t),renderState:e()}}function Du(t,e,n,s){const i={},r=s(t,{});for(const f in r)i[f]=Xt(r[f]);let{initial:o,animate:a}=t;const u=ue(t),l=Wi(t);e&&l&&!u&&t.inherit!==!1&&(o===void 0&&(o=e.initial),a===void 0&&(a=e.animate));let c=n?n.initial===!1:!1;c=c||o===!1;const h=c?a:o;if(h&&typeof h!="boolean"&&!le(h)){const f=Array.isArray(h)?h:[h];for(let p=0;p<f.length;p++){const d=pn(t,f[p]);if(d){const{transitionEnd:m,transition:g,...y}=d;for(const x in y){let v=y[x];if(Array.isArray(v)){const w=c?v.length-1:0;v=v[w]}v!==null&&(i[x]=v)}for(const x in m)i[x]=m[x]}}}return i}const xo=t=>(e,n)=>{const s=P.useContext(ce),i=P.useContext(Qe),r=()=>Mu(t,e,s,i);return n?r():Co(r)},Eu=xo({scrapeMotionValuesFromProps:Sn,createRenderState:bn}),Ru=xo({scrapeMotionValuesFromProps:to,createRenderState:vo}),Lu=Symbol.for("motionComponentSymbol");function ku(t,e,n){const s=P.useRef(n);P.useInsertionEffect(()=>{s.current=n});const i=P.useRef(null);return P.useCallback(r=>{r&&t.onMount?.(r),e&&(r?e.mount(r):e.unmount());const o=s.current;if(typeof o=="function")if(r){const a=o(r);typeof a=="function"&&(i.current=a)}else i.current?(i.current(),i.current=null):o(r);else o&&(o.current=r)},[e])}const To=P.createContext({});function mt(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function Bu(t,e,n,s,i,r){const{visualElement:o}=P.useContext(ce),a=P.useContext(po),u=P.useContext(Qe),l=P.useContext(fo),c=l.reducedMotion,h=l.skipAnimations,f=P.useRef(null),p=P.useRef(!1);s=s||a.renderer,!f.current&&s&&(f.current=s(t,{visualState:e,parent:o,props:n,presenceContext:u,blockInitialAnimation:u?u.initial===!1:!1,reducedMotionConfig:c,skipAnimations:h,isSVG:r}),p.current&&f.current&&(f.current.manuallyAnimateOnMount=!0));const d=f.current,m=P.useContext(To);d&&!d.projection&&i&&(d.type==="html"||d.type==="svg")&&Fu(f.current,n,i,m);const g=P.useRef(!1);P.useInsertionEffect(()=>{d&&g.current&&d.update(n,u)});const y=n[Di],x=P.useRef(!!y&&typeof window<"u"&&!window.MotionHandoffIsComplete?.(y)&&window.MotionHasOptimisedAnimation?.(y));return Do(()=>{p.current=!0,d&&(g.current=!0,window.MotionIsMounted=!0,d.updateFeatures(),d.scheduleRenderMicrotask(),x.current&&d.animationState&&d.animationState.animateChanges())}),P.useEffect(()=>{d&&(!x.current&&d.animationState&&d.animationState.animateChanges(),x.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(y)}),x.current=!1),d.enteringChildren=void 0)}),d}function Fu(t,e,n,s){const{layoutId:i,layout:r,drag:o,dragConstraints:a,layoutScroll:u,layoutRoot:l,layoutAnchor:c,layoutCrossfade:h}=e;t.projection=new n(t.latestValues,e["data-framer-portal-id"]?void 0:wo(t.parent)),t.projection.setOptions({layoutId:i,layout:r,alwaysMeasureLayout:!!o||a&&mt(a),visualElement:t,animationType:typeof r=="string"?r:"both",initialPromotionConfig:s,crossfade:h,layoutScroll:u,layoutRoot:l,layoutAnchor:c})}function wo(t){if(t)return t.options.allowProjection!==!1?t.projection:wo(t.parent)}function Pe(t,{forwardMotionProps:e=!1,type:n}={},s,i){s&&gu(s);const r=n?n==="svg":An(t),o=r?Ru:Eu;function a(l,c){let h;const f={...P.useContext(fo),...l,layoutId:Iu(l)},{isStatic:p}=f,d=wu(l),m=o(l,p);if(!p&&typeof window<"u"){Ou();const g=ju(f);h=g.MeasureLayout,d.visualElement=Bu(t,m,f,i,g.ProjectionNode,r)}return Ce.jsxs(ce.Provider,{value:d,children:[h&&d.visualElement?Ce.jsx(h,{visualElement:d.visualElement,...f}):null,Cu(t,l,ku(m,d.visualElement,c),m,p,e,r)]})}a.displayName=`motion.${typeof t=="string"?t:`create(${t.displayName??t.name??""})`}`;const u=P.forwardRef(a);return u[Lu]=t,u}function Iu({layoutId:t}){const e=P.useContext(Ws).id;return e&&t!==void 0?e+"-"+t:t}function Ou(t,e){P.useContext(po).strict}function ju(t){const e=mo(),{drag:n,layout:s}=e;if(!n&&!s)return{};const i={...n,...s};return{MeasureLayout:n?.isEnabled(t)||s?.isEnabled(t)?i.MeasureLayout:void 0,ProjectionNode:i.ProjectionNode}}function Nu(t,e){if(typeof Proxy>"u")return Pe;const n=new Map,s=(r,o)=>Pe(r,o,t,e),i=(r,o)=>s(r,o);return new Proxy(i,{get:(r,o)=>o==="create"?s:(n.has(o)||n.set(o,Pe(o,void 0,t,e)),n.get(o))})}const Uu=(t,e)=>e.isSVG??An(t)?new wl(e):new ml(e,{allowProjection:t!==P.Fragment});class Wu extends ot{constructor(e){super(e),e.animationState||(e.animationState=Vl(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();le(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 Ku=0;class Hu extends ot{constructor(){super(...arguments),this.id=Ku++,this.isExitComplete=!1}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;if(e&&s===!1){if(this.isExitComplete){const{initial:r,custom:o}=this.node.getProps();if(typeof r=="string"||typeof r=="object"&&r!==null&&!Array.isArray(r)){const a=dt(this.node,r,o);if(a){const{transition:u,transitionEnd:l,...c}=a;for(const h in c)this.node.getValue(h)?.jump(c[h])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive("exit",!1);this.isExitComplete=!1;return}const i=this.node.animationState.setActive("exit",!e);n&&!e&&i.then(()=>{this.isExitComplete=!0,n(this.id)})}mount(){const{register:e,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),e&&(this.unmount=e(this.id))}unmount(){}}const Gu={animation:{Feature:Wu},exit:{Feature:Hu}};function Ot(t){return{point:{x:t.pageX,y:t.pageY}}}const zu=t=>e=>vn(e)&&t(e,Ot(e));function Dt(t,e,n,s){return kt(t,e,zu(n),s)}const Po=({current:t})=>t?t.ownerDocument.defaultView:null,Rs=(t,e)=>Math.abs(t-e);function $u(t,e){const n=Rs(t.x,e.x),s=Rs(t.y,e.y);return Math.sqrt(n**2+s**2)}const Ls=new Set(["auto","scroll"]);class So{constructor(e,n,{transformPagePoint:s,contextWindow:i=window,dragSnapToOrigin:r=!1,distanceThreshold:o=3,element:a}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=d=>{this.handleScroll(d.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=Ut(this.lastRawMoveEventInfo,this.transformPagePoint));const d=Se(this.lastMoveEventInfo,this.history),m=this.startEvent!==null,g=$u(d.offset,{x:0,y:0})>=this.distanceThreshold;if(!m&&!g)return;const{point:y}=d,{timestamp:x}=I;this.history.push({...y,timestamp:x});const{onStart:v,onMove:w}=this.handlers;m||(v&&v(this.lastMoveEvent,d),this.startEvent=this.lastMoveEvent),w&&w(this.lastMoveEvent,d)},this.handlePointerMove=(d,m)=>{this.lastMoveEvent=d,this.lastRawMoveEventInfo=m,this.lastMoveEventInfo=Ut(m,this.transformPagePoint),M.update(this.updatePoint,!0)},this.handlePointerUp=(d,m)=>{this.end();const{onEnd:g,onSessionEnd:y,resumeAnimation:x}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&x&&x(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const v=Se(d.type==="pointercancel"?this.lastMoveEventInfo:Ut(m,this.transformPagePoint),this.history);this.startEvent&&g&&g(d,v),y&&y(d,v)},!vn(e))return;this.dragSnapToOrigin=r,this.handlers=n,this.transformPagePoint=s,this.distanceThreshold=o,this.contextWindow=i||window;const u=Ot(e),l=Ut(u,this.transformPagePoint),{point:c}=l,{timestamp:h}=I;this.history=[{...c,timestamp:h}];const{onSessionStart:f}=n;f&&f(e,Se(l,this.history));const p={passive:!0,capture:!0};this.removeListeners=Bt(Dt(this.contextWindow,"pointermove",this.handlePointerMove,p),Dt(this.contextWindow,"pointerup",this.handlePointerUp,p),Dt(this.contextWindow,"pointercancel",this.handlePointerUp,p)),a&&this.startScrollTracking(a)}startScrollTracking(e){let n=e.parentElement;for(;n;){const s=getComputedStyle(n);(Ls.has(s.overflowX)||Ls.has(s.overflowY))&&this.scrollPositions.set(n,{x:n.scrollLeft,y:n.scrollTop}),n=n.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0}),window.addEventListener("scroll",this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(e){const n=this.scrollPositions.get(e);if(!n)return;const s=e===window,i=s?{x:window.scrollX,y:window.scrollY}:{x:e.scrollLeft,y:e.scrollTop},r={x:i.x-n.x,y:i.y-n.y};r.x===0&&r.y===0||(s?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=r.x,this.lastMoveEventInfo.point.y+=r.y):this.history.length>0&&(this.history[0].x-=r.x,this.history[0].y-=r.y),this.scrollPositions.set(e,i),M.update(this.updatePoint,!0))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),it(this.updatePoint)}}function Ut(t,e){return e?{point:e(t.point)}:t}function ks(t,e){return{x:t.x-e.x,y:t.y-e.y}}function Se({point:t},e){return{point:t,delta:ks(t,bo(e)),offset:ks(t,_u(e)),velocity:Xu(e,.1)}}function _u(t){return t[0]}function bo(t){return t[t.length-1]}function Xu(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,s=null;const i=bo(t);for(;n>=0&&(s=t[n],!(i.timestamp-s.timestamp>W(e)));)n--;if(!s)return{x:0,y:0};s===t[0]&&t.length>2&&i.timestamp-s.timestamp>W(e)*2&&(s=t[1]);const r=H(i.timestamp-s.timestamp);if(r===0)return{x:0,y:0};const o={x:(i.x-s.x)/r,y:(i.y-s.y)/r};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function Yu(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 Bs(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 qu(t,{top:e,left:n,bottom:s,right:i}){return{x:Bs(t.x,n,i),y:Bs(t.y,e,s)}}function Fs(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 Zu(t,e){return{x:Fs(t.x,e.x),y:Fs(t.y,e.y)}}function Ju(t,e){let n=.5;const s=N(t),i=N(e);return i>s?n=Et(e.min,e.max-s,t.min):s>i&&(n=Et(t.min,t.max-i,e.min)),Q(0,1,n)}function Qu(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 Ze=.35;function tc(t=Ze){return t===!1?t=0:t===!0&&(t=Ze),{x:Is(t,"left","right"),y:Is(t,"top","bottom")}}function Is(t,e,n){return{min:Os(t,e),max:Os(t,n)}}function Os(t,e){return typeof t=="number"?t:t[e]||0}const ec=new WeakMap;class nc{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=k(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:n=!1,distanceThreshold:s}={}){const{presenceContext:i}=this.visualElement;if(i&&i.isPresent===!1)return;const r=h=>{n&&this.snapToCursor(Ot(h).point),this.stopAnimation()},o=(h,f)=>{const{drag:p,dragPropagation:d,onDragStart:m}=this.getProps();if(p&&!d&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Ba(p),!this.openDragLock))return;this.latestPointerEvent=h,this.latestPanInfo=f,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),q(y=>{let x=this.getAxisMotionValue(y).get()||0;if(J.test(x)){const{projection:v}=this.visualElement;if(v&&v.layout){const w=v.layout.layoutBox[y];w&&(x=N(w)*(parseFloat(x)/100))}}this.originPoint[y]=x}),m&&M.update(()=>m(h,f),!1,!0),We(this.visualElement,"transform");const{animationState:g}=this.visualElement;g&&g.setActive("whileDrag",!0)},a=(h,f)=>{this.latestPointerEvent=h,this.latestPanInfo=f;const{dragPropagation:p,dragDirectionLock:d,onDirectionLock:m,onDrag:g}=this.getProps();if(!p&&!this.openDragLock)return;const{offset:y}=f;if(d&&this.currentDirection===null){this.currentDirection=ic(y),this.currentDirection!==null&&m&&m(this.currentDirection);return}this.updateAxis("x",f.point,y),this.updateAxis("y",f.point,y),this.visualElement.render(),g&&M.update(()=>g(h,f),!1,!0)},u=(h,f)=>{this.latestPointerEvent=h,this.latestPanInfo=f,this.stop(h,f),this.latestPointerEvent=null,this.latestPanInfo=null},l=()=>{const{dragSnapToOrigin:h}=this.getProps();(h||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:c}=this.getProps();this.panSession=new So(e,{onSessionStart:r,onStart:o,onMove:a,onSessionEnd:u,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,distanceThreshold:s,contextWindow:Po(this.visualElement),element:this.visualElement.current})}stop(e,n){const s=e||this.latestPointerEvent,i=n||this.latestPanInfo,r=this.isDragging;if(this.cancel(),!r||!i||!s)return;const{velocity:o}=i;this.startAnimation(o);const{onDragEnd:a}=this.getProps();a&&M.postRender(()=>a(s,i))}cancel(){this.isDragging=!1;const{projection:e,animationState:n}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:s}=this.getProps();!s&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(e,n,s){const{drag:i}=this.getProps();if(!s||!Wt(e,i,this.currentDirection))return;const r=this.getAxisMotionValue(e);let o=this.originPoint[e]+s[e];this.constraints&&this.constraints[e]&&(o=Yu(o,this.constraints[e],this.elastic[e])),r.set(o)}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&&mt(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&s?this.constraints=qu(s.layoutBox,e):this.constraints=!1,this.elastic=tc(n),i!==this.constraints&&!mt(e)&&s&&this.constraints&&!this.hasMutatedConstraints&&q(r=>{this.constraints!==!1&&this.getAxisMotionValue(r)&&(this.constraints[r]=Qu(s.layoutBox[r],this.constraints[r]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:n}=this.getProps();if(!e||!mt(e))return!1;const s=e.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;i.root&&(i.root.scroll=void 0,i.root.updateScroll());const r=ul(s,i.root,this.visualElement.getTransformPagePoint());let o=Zu(i.layout.layoutBox,r);if(n){const a=n(rl(o));this.hasMutatedConstraints=!!a,a&&(o=zi(a))}return o}startAnimation(e){const{drag:n,dragMomentum:s,dragElastic:i,dragTransition:r,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),u=this.constraints||{},l=q(c=>{if(!Wt(c,n,this.currentDirection))return;let h=u&&u[c]||{};(o===!0||o===c)&&(h={min:0,max:0});const f=i?200:1e6,p=i?40:1e7,d={type:"inertia",velocity:s?e[c]:0,bounceStiffness:f,bounceDamping:p,timeConstant:750,restDelta:1,restSpeed:10,...r,...h};return this.startAxisValueAnimation(c,d)});return Promise.all(l).then(a)}startAxisValueAnimation(e,n){const s=this.getAxisMotionValue(e);return We(this.visualElement,e),s.start(dn(e,s,0,n,this.visualElement,!1))}stopAnimation(){q(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){const n=`_drag${e.toUpperCase()}`,i=this.visualElement.getProps()[n];return i||this.visualElement.getValue(e,this.visualElement.latestValues[e]??0)}snapToCursor(e){q(n=>{const{drag:s}=this.getProps();if(!Wt(n,s,this.currentDirection))return;const{projection:i}=this.visualElement,r=this.getAxisMotionValue(n);if(i&&i.layout){const{min:o,max:a}=i.layout.layoutBox[n],u=r.get()||0;r.set(e[n]-C(o,a,.5)+u)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:n}=this.getProps(),{projection:s}=this.visualElement;if(!mt(n)||!s||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};q(o=>{const a=this.getAxisMotionValue(o);if(a&&this.constraints!==!1){const u=a.get();i[o]=Ju({min:u,max:u},this.constraints[o])}});const{transformTemplate:r}=this.visualElement.getProps();this.visualElement.current.style.transform=r?r({},""):"none",s.root&&s.root.updateScroll(),s.updateLayout(),this.constraints=!1,this.resolveConstraints(),q(o=>{if(!Wt(o,e,null))return;const a=this.getAxisMotionValue(o),{min:u,max:l}=this.constraints[o];a.set(C(u,l,i[o]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;ec.set(this.visualElement,this);const e=this.visualElement.current,n=Dt(e,"pointerdown",l=>{const{drag:c,dragListener:h=!0}=this.getProps(),f=l.target,p=f!==e&&Ua(f);c&&h&&!p&&this.start(l)});let s;const i=()=>{const{dragConstraints:l}=this.getProps();mt(l)&&l.current&&(this.constraints=this.resolveRefConstraints(),s||(s=sc(e,l.current,()=>this.scalePositionWithinConstraints())))},{projection:r}=this.visualElement,o=r.addEventListener("measure",i);r&&!r.layout&&(r.root&&r.root.updateScroll(),r.updateLayout()),M.read(i);const a=kt(window,"resize",()=>this.scalePositionWithinConstraints()),u=r.addEventListener("didUpdate",(({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(q(h=>{const f=this.getAxisMotionValue(h);f&&(this.originPoint[h]+=l[h].translate,f.set(f.get()+l[h].translate))}),this.visualElement.render())}));return()=>{a(),n(),o(),u&&u(),s&&s()}}getProps(){const e=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:s=!1,dragPropagation:i=!1,dragConstraints:r=!1,dragElastic:o=Ze,dragMomentum:a=!0}=e;return{...e,drag:n,dragDirectionLock:s,dragPropagation:i,dragConstraints:r,dragElastic:o,dragMomentum:a}}}function js(t){let e=!0;return()=>{if(e){e=!1;return}t()}}function sc(t,e,n){const s=_n(t,js(n)),i=_n(e,js(n));return()=>{s(),i()}}function Wt(t,e,n){return(e===!0||e===t)&&(n===null||n===t)}function ic(t,e=10){let n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}class oc extends ot{constructor(e){super(e),this.removeGroupControls=G,this.removeListeners=G,this.controls=new nc(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||G}update(){const{dragControls:e}=this.node.getProps(),{dragControls:n}=this.node.prevProps||{};e!==n&&(this.removeGroupControls(),e&&(this.removeGroupControls=e.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}const be=t=>(e,n)=>{t&&M.update(()=>t(e,n),!1,!0)};class rc extends ot{constructor(){super(...arguments),this.removePointerDownListener=G}onPointerDown(e){this.session=new So(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Po(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:n,onPan:s,onPanEnd:i}=this.node.getProps();return{onSessionStart:be(e),onStart:be(n),onMove:be(s),onEnd:(r,o)=>{delete this.session,i&&M.postRender(()=>i(r,o))}}}mount(){this.removePointerDownListener=Dt(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let Ae=!1;class ac extends P.Component{componentDidMount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:s,layoutId:i}=this.props,{projection:r}=e;r&&(n.group&&n.group.add(r),s&&s.register&&i&&s.register(r),Ae&&r.root.didUpdate(),r.addEventListener("animationComplete",()=>{this.safeToRemove()}),r.setOptions({...r.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),Yt.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:n,visualElement:s,drag:i,isPresent:r}=this.props,{projection:o}=s;return o&&(o.isPresent=r,e.layoutDependency!==n&&o.setOptions({...o.options,layoutDependency:n}),Ae=!0,i||e.layoutDependency!==n||n===void 0||e.isPresent!==r?o.willUpdate():this.safeToRemove(),e.isPresent!==r&&(r?o.promote():o.relegate()||M.postRender(()=>{const a=o.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{visualElement:e,layoutAnchor:n}=this.props,{projection:s}=e;s&&(s.options.layoutAnchor=n,s.root.didUpdate(),yn.postRender(()=>{!s.currentAnimation&&s.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:s}=this.props,{projection:i}=e;Ae=!0,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 Ao(t){const[e,n]=pu(),s=P.useContext(Ws);return Ce.jsx(ac,{...t,layoutGroup:s,switchLayoutGroup:P.useContext(To),isPresent:e,safeToRemove:n})}const lc={pan:{Feature:rc},drag:{Feature:oc,ProjectionNode:ho,MeasureLayout:Ao}};function Ns(t,e,n){const{props:s}=t;t.animationState&&s.whileHover&&t.animationState.setActive("whileHover",n==="Start");const i="onHover"+n,r=s[i];r&&M.postRender(()=>r(e,Ot(e)))}class uc extends ot{mount(){const{current:e}=this.node;e&&(this.unmount=Ia(e,(n,s)=>(Ns(this.node,s,"Start"),i=>Ns(this.node,i,"End"))))}unmount(){}}class cc extends ot{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=Bt(kt(this.node.current,"focus",()=>this.onFocus()),kt(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Us(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),r=s[i];r&&M.postRender(()=>r(e,Ot(e)))}class hc extends ot{mount(){const{current:e}=this.node;if(!e)return;const{globalTapTarget:n,propagate:s}=this.node.props;this.unmount=Ka(e,(i,r)=>(Us(this.node,r,"Start"),(o,{success:a})=>Us(this.node,o,a?"End":"Cancel")),{useGlobalTarget:n,stopPropagation:s?.tap===!1})}unmount(){}}const Je=new WeakMap,Ve=new WeakMap,fc=t=>{const e=Je.get(t.target);e&&e(t)},dc=t=>{t.forEach(fc)};function pc({root:t,...e}){const n=t||document;Ve.has(n)||Ve.set(n,{});const s=Ve.get(n),i=JSON.stringify(e);return s[i]||(s[i]=new IntersectionObserver(dc,{root:t,...e})),s[i]}function mc(t,e,n){const s=pc(e);return Je.set(t,n),s.observe(t),()=>{Je.delete(t),s.unobserve(t)}}const gc={some:0,all:1};class yc extends ot{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.stopObserver?.();const{viewport:e={}}=this.node.getProps(),{root:n,margin:s,amount:i="some",once:r}=e,o={root:n?n.current:void 0,rootMargin:s,threshold:typeof i=="number"?i:gc[i]},a=u=>{const{isIntersecting:l}=u;if(this.isInView===l||(this.isInView=l,r&&!l&&this.hasEnteredView))return;l&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",l);const{onViewportEnter:c,onViewportLeave:h}=this.node.getProps(),f=l?c:h;f&&f(u)};this.stopObserver=mc(this.node.current,o,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:e,prevProps:n}=this.node;["amount","margin","root"].some(vc(e,n))&&this.startObserver()}unmount(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}}function vc({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}const xc={inView:{Feature:yc},tap:{Feature:hc},focus:{Feature:cc},hover:{Feature:uc}},Tc={layout:{ProjectionNode:ho,MeasureLayout:Ao}},wc={...Gu,...xc,...lc,...Tc},Pc=Nu(wc,Uu),Vc=Pc;export{xn as A,Za as B,tl as C,Hl as D,Ri as E,Qt as F,ml as H,te as J,Ws as L,fo as M,Qe as P,wl as S,ol as V,ka as a,Do as b,pu as c,Sr as d,Tt as e,it as f,M as g,Ki as h,sl as i,Un as j,Fo as k,k as l,Vc as m,C as n,qt as o,$e as p,O as q,Ii as r,Ar as s,pr as t,Co as u,br as v,Ys as w,wi as x,W as y,Et as z};
|
|
1
|
+
import{r as P,j as Ce}from"./__vite-browser-external-C6_BtvDo.js";const Ws=P.createContext({});function Co(t){const e=P.useRef(null);return e.current===null&&(e.current=t()),e.current}const Mo=typeof window<"u",Do=Mo?P.useLayoutEffect:P.useEffect,Qe=P.createContext(null);function tn(t,e){t.indexOf(e)===-1&&t.push(e)}function qt(t,e){const n=t.indexOf(e);n>-1&&t.splice(n,1)}const Q=(t,e,n)=>n>e?e:n<t?t:n;let re=()=>{};const st={},Ks=t=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(t),Hs=t=>typeof t=="object"&&t!==null,Gs=t=>/^0[^.\s]+$/u.test(t);function zs(t){let e;return()=>(e===void 0&&(e=t()),e)}const G=t=>t,Bt=(...t)=>t.reduce((e,n)=>s=>n(e(s))),Et=(t,e,n)=>{const s=e-t;return s?(n-t)/s:1};class en{constructor(){this.subscriptions=[]}add(e){return tn(this.subscriptions,e),()=>qt(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 r=0;r<i;r++){const o=this.subscriptions[r];o&&o(e,n,s)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}const W=t=>t*1e3,H=t=>t/1e3,$s=(t,e)=>e?t*(1e3/e):0,_s=(t,e,n)=>(((1-3*n+3*e)*t+(3*n-6*e))*t+3*e)*t,Eo=1e-7,Ro=12;function Lo(t,e,n,s,i){let r,o,a=0;do o=e+(n-e)/2,r=_s(o,s,i)-t,r>0?n=o:e=o;while(Math.abs(r)>Eo&&++a<Ro);return o}function Ft(t,e,n,s){if(t===e&&n===s)return G;const i=r=>Lo(r,0,1,t,n);return r=>r===0||r===1?r:_s(i(r),e,s)}const Xs=t=>e=>e<=.5?t(2*e)/2:(2-t(2*(1-e)))/2,Ys=t=>e=>1-t(1-e),qs=Ft(.33,1.53,.69,.99),nn=Ys(qs),Zs=Xs(nn),Js=t=>t>=1?1:(t*=2)<1?.5*nn(t):.5*(2-Math.pow(2,-10*(t-1))),sn=t=>1-Math.sin(Math.acos(t)),Qs=Ys(sn),ti=Xs(sn),ko=Ft(.42,0,1,1),Bo=Ft(0,0,.58,1),ei=Ft(.42,0,.58,1),Fo=t=>Array.isArray(t)&&typeof t[0]!="number",ni=t=>Array.isArray(t)&&typeof t[0]=="number",Io={linear:G,easeIn:ko,easeInOut:ei,easeOut:Bo,circIn:sn,circInOut:ti,circOut:Qs,backIn:nn,backInOut:Zs,backOut:qs,anticipate:Js},Oo=t=>typeof t=="string",Vn=t=>{if(ni(t)){re(t.length===4);const[e,n,s,i]=t;return Ft(e,n,s,i)}else if(Oo(t))return Io[t];return t},jt=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function jo(t){let e=new Set,n=new Set,s=!1,i=!1;const r=new WeakSet;let o={delta:0,timestamp:0,isProcessing:!1};function a(l){r.has(l)&&(u.schedule(l),t()),l(o)}const u={schedule:(l,c=!1,h=!1)=>{const p=h&&s?e:n;return c&&r.add(l),p.add(l),l},cancel:l=>{n.delete(l),r.delete(l)},process:l=>{if(o=l,s){i=!0;return}s=!0;const c=e;e=n,n=c,e.forEach(a),e.clear(),s=!1,i&&(i=!1,u.process(l))}};return u}const No=40;function si(t,e){let n=!1,s=!0;const i={delta:0,timestamp:0,isProcessing:!1},r=()=>n=!0,o=jt.reduce((v,w)=>(v[w]=jo(r),v),{}),{setup:a,read:u,resolveKeyframes:l,preUpdate:c,update:h,preRender:f,render:p,postRender:d}=o,m=()=>{const v=st.useManualTiming,w=v?i.timestamp:performance.now();n=!1,v||(i.delta=s?1e3/60:Math.max(Math.min(w-i.timestamp,No),1)),i.timestamp=w,i.isProcessing=!0,a.process(i),u.process(i),l.process(i),c.process(i),h.process(i),f.process(i),p.process(i),d.process(i),i.isProcessing=!1,n&&e&&(s=!1,t(m))},g=()=>{n=!0,s=!0,i.isProcessing||t(m)};return{schedule:jt.reduce((v,w)=>{const A=o[w];return v[w]=(D,V=!1,b=!1)=>(n||g(),A.schedule(D,V,b)),v},{}),cancel:v=>{for(let w=0;w<jt.length;w++)o[jt[w]].cancel(v)},state:i,steps:o}}const{schedule:M,cancel:it,state:I,steps:he}=si(typeof requestAnimationFrame<"u"?requestAnimationFrame:G,!0);let Kt;function Uo(){Kt=void 0}const j={now:()=>(Kt===void 0&&j.set(I.isProcessing||st.useManualTiming?I.timestamp:performance.now()),Kt),set:t=>{Kt=t,queueMicrotask(Uo)}},ii=t=>e=>typeof e=="string"&&e.startsWith(t),oi=ii("--"),Wo=ii("var(--"),on=t=>Wo(t)?Ko.test(t.split("/*")[0].trim()):!1,Ko=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function Cn(t){return typeof t!="string"?!1:t.split("/*")[0].includes("var(--")}const wt={test:t=>typeof t=="number",parse:parseFloat,transform:t=>t},Rt={...wt,transform:t=>Q(0,1,t)},Nt={...wt,default:1},Vt=t=>Math.round(t*1e5)/1e5,rn=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Ho(t){return t==null}const Go=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,an=(t,e)=>n=>!!(typeof n=="string"&&Go.test(n)&&n.startsWith(t)||e&&!Ho(n)&&Object.prototype.hasOwnProperty.call(n,e)),ri=(t,e,n)=>s=>{if(typeof s!="string")return s;const[i,r,o,a]=s.match(rn);return{[t]:parseFloat(i),[e]:parseFloat(r),[n]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},zo=t=>Q(0,255,t),fe={...wt,transform:t=>Math.round(zo(t))},ct={test:an("rgb","red"),parse:ri("red","green","blue"),transform:({red:t,green:e,blue:n,alpha:s=1})=>"rgba("+fe.transform(t)+", "+fe.transform(e)+", "+fe.transform(n)+", "+Vt(Rt.transform(s))+")"};function $o(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 Me={test:an("#"),parse:$o,transform:ct.transform},It=t=>({test:e=>typeof e=="string"&&e.endsWith(t)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${t}`}),et=It("deg"),J=It("%"),T=It("px"),_o=It("vh"),Xo=It("vw"),Mn={...J,parse:t=>J.parse(t)/100,transform:t=>J.transform(t*100)},gt={test:an("hsl","hue"),parse:ri("hue","saturation","lightness"),transform:({hue:t,saturation:e,lightness:n,alpha:s=1})=>"hsla("+Math.round(t)+", "+J.transform(Vt(e))+", "+J.transform(Vt(n))+", "+Vt(Rt.transform(s))+")"},L={test:t=>ct.test(t)||Me.test(t)||gt.test(t),parse:t=>ct.test(t)?ct.parse(t):gt.test(t)?gt.parse(t):Me.parse(t),transform:t=>typeof t=="string"?t:t.hasOwnProperty("red")?ct.transform(t):gt.transform(t),getAnimatableNone:t=>{const e=L.parse(t);return e.alpha=0,L.transform(e)}},Yo=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function qo(t){return isNaN(t)&&typeof t=="string"&&(t.match(rn)?.length||0)+(t.match(Yo)?.length||0)>0}const ai="number",li="color",Zo="var",Jo="var(",Dn="${}",Qo=/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 xt(t){const e=t.toString(),n=[],s={color:[],number:[],var:[]},i=[];let r=0;const a=e.replace(Qo,u=>(L.test(u)?(s.color.push(r),i.push(li),n.push(L.parse(u))):u.startsWith(Jo)?(s.var.push(r),i.push(Zo),n.push(u)):(s.number.push(r),i.push(ai),n.push(parseFloat(u))),++r,Dn)).split(Dn);return{values:n,split:a,indexes:s,types:i}}function tr(t){return xt(t).values}function ui({split:t,types:e}){const n=t.length;return s=>{let i="";for(let r=0;r<n;r++)if(i+=t[r],s[r]!==void 0){const o=e[r];o===ai?i+=Vt(s[r]):o===li?i+=L.transform(s[r]):i+=s[r]}return i}}function er(t){return ui(xt(t))}const nr=t=>typeof t=="number"?0:L.test(t)?L.getAnimatableNone(t):t,sr=(t,e)=>typeof t=="number"?e?.trim().endsWith("/")?t:0:nr(t);function ir(t){const e=xt(t);return ui(e)(e.values.map((s,i)=>sr(s,e.split[i])))}const _={test:qo,parse:tr,createTransformer:er,getAnimatableNone:ir};function de(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 or({hue:t,saturation:e,lightness:n,alpha:s}){t/=360,e/=100,n/=100;let i=0,r=0,o=0;if(!e)i=r=o=n;else{const a=n<.5?n*(1+e):n+e-n*e,u=2*n-a;i=de(u,a,t+1/3),r=de(u,a,t),o=de(u,a,t-1/3)}return{red:Math.round(i*255),green:Math.round(r*255),blue:Math.round(o*255),alpha:s}}function Zt(t,e){return n=>n>0?e:t}const C=(t,e,n)=>t+(e-t)*n,pe=(t,e,n)=>{const s=t*t,i=n*(e*e-s)+s;return i<0?0:Math.sqrt(i)},rr=[Me,ct,gt],ar=t=>rr.find(e=>e.test(t));function En(t){const e=ar(t);if(!e)return!1;let n=e.parse(t);return e===gt&&(n=or(n)),n}const Rn=(t,e)=>{const n=En(t),s=En(e);if(!n||!s)return Zt(t,e);const i={...n};return r=>(i.red=pe(n.red,s.red,r),i.green=pe(n.green,s.green,r),i.blue=pe(n.blue,s.blue,r),i.alpha=C(n.alpha,s.alpha,r),ct.transform(i))},De=new Set(["none","hidden"]);function lr(t,e){return De.has(t)?n=>n<=0?t:e:n=>n>=1?e:t}function ur(t,e){return n=>C(t,e,n)}function ln(t){return typeof t=="number"?ur:typeof t=="string"?on(t)?Zt:L.test(t)?Rn:fr:Array.isArray(t)?ci:typeof t=="object"?L.test(t)?Rn:cr:Zt}function ci(t,e){const n=[...t],s=n.length,i=t.map((r,o)=>ln(r)(r,e[o]));return r=>{for(let o=0;o<s;o++)n[o]=i[o](r);return n}}function cr(t,e){const n={...t,...e},s={};for(const i in n)t[i]!==void 0&&e[i]!==void 0&&(s[i]=ln(t[i])(t[i],e[i]));return i=>{for(const r in s)n[r]=s[r](i);return n}}function hr(t,e){const n=[],s={color:0,var:0,number:0};for(let i=0;i<e.values.length;i++){const r=e.types[i],o=t.indexes[r][s[r]],a=t.values[o]??0;n[i]=a,s[r]++}return n}const fr=(t,e)=>{const n=_.createTransformer(e),s=xt(t),i=xt(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?De.has(t)&&!i.values.length||De.has(e)&&!s.values.length?lr(t,e):Bt(ci(hr(s,i),i.values),n):Zt(t,e)};function hi(t,e,n){return typeof t=="number"&&typeof e=="number"&&typeof n=="number"?C(t,e,n):ln(t)(t,e)}const dr=t=>{const e=({timestamp:n})=>t(n);return{start:(n=!0)=>M.update(e,n),stop:()=>it(e),now:()=>I.isProcessing?I.timestamp:j.now()}},fi=(t,e,n=10)=>{let s="";const i=Math.max(Math.round(e/n),2);for(let r=0;r<i;r++)s+=Math.round(t(r/(i-1))*1e4)/1e4+", ";return`linear(${s.substring(0,s.length-2)})`},Jt=2e4;function un(t){let e=0;const n=50;let s=t.next(e);for(;!s.done&&e<Jt;)e+=n,s=t.next(e);return e>=Jt?1/0:e}function pr(t,e=100,n){const s=n({...t,keyframes:[0,e]}),i=Math.min(un(s),Jt);return{type:"keyframes",ease:r=>s.next(i*r).value/e,duration:H(i)}}const E={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};function Ee(t,e){return t*Math.sqrt(1-e*e)}const mr=12;function gr(t,e,n){let s=n;for(let i=1;i<mr;i++)s=s-t(s)/e(s);return s}const me=.001;function yr({duration:t=E.duration,bounce:e=E.bounce,velocity:n=E.velocity,mass:s=E.mass}){let i,r,o=1-e;o=Q(E.minDamping,E.maxDamping,o),t=Q(E.minDuration,E.maxDuration,H(t)),o<1?(i=l=>{const c=l*o,h=c*t,f=c-n,p=Ee(l,o),d=Math.exp(-h);return me-f/p*d},r=l=>{const h=l*o*t,f=h*n+n,p=Math.pow(o,2)*Math.pow(l,2)*t,d=Math.exp(-h),m=Ee(Math.pow(l,2),o);return(-i(l)+me>0?-1:1)*((f-p)*d)/m}):(i=l=>{const c=Math.exp(-l*t),h=(l-n)*t+1;return-me+c*h},r=l=>{const c=Math.exp(-l*t),h=(n-l)*(t*t);return c*h});const a=5/t,u=gr(i,r,a);if(t=W(t),isNaN(u))return{stiffness:E.stiffness,damping:E.damping,duration:t};{const l=Math.pow(u,2)*s;return{stiffness:l,damping:o*2*Math.sqrt(s*l),duration:t}}}const vr=["duration","bounce"],xr=["stiffness","damping","mass"];function Ln(t,e){return e.some(n=>t[n]!==void 0)}function Tr(t){let e={velocity:E.velocity,stiffness:E.stiffness,damping:E.damping,mass:E.mass,isResolvedFromDuration:!1,...t};if(!Ln(t,xr)&&Ln(t,vr))if(e.velocity=0,t.visualDuration){const n=t.visualDuration,s=2*Math.PI/(n*1.2),i=s*s,r=2*Q(.05,1,1-(t.bounce||0))*Math.sqrt(i);e={...e,mass:E.mass,stiffness:i,damping:r}}else{const n=yr({...t,velocity:0});e={...e,...n,mass:E.mass},e.isResolvedFromDuration=!0}return e}function Qt(t=E.visualDuration,e=E.bounce){const n=typeof t!="object"?{visualDuration:t,keyframes:[0,1],bounce:e}:t;let{restSpeed:s,restDelta:i}=n;const r=n.keyframes[0],o=n.keyframes[n.keyframes.length-1],a={done:!1,value:r},{stiffness:u,damping:l,mass:c,duration:h,velocity:f,isResolvedFromDuration:p}=Tr({...n,velocity:-H(n.velocity||0)}),d=f||0,m=l/(2*Math.sqrt(u*c)),g=o-r,y=H(Math.sqrt(u/c)),x=Math.abs(g)<5;s||(s=x?E.restSpeed.granular:E.restSpeed.default),i||(i=x?E.restDelta.granular:E.restDelta.default);let v,w,A,D,V,b;if(m<1)A=Ee(y,m),D=(d+m*y*g)/A,v=S=>{const R=Math.exp(-m*y*S);return o-R*(D*Math.sin(A*S)+g*Math.cos(A*S))},V=m*y*D+g*A,b=m*y*g-D*A,w=S=>Math.exp(-m*y*S)*(V*Math.sin(A*S)+b*Math.cos(A*S));else if(m===1){v=R=>o-Math.exp(-y*R)*(g+(d+y*g)*R);const S=d+y*g;w=R=>Math.exp(-y*R)*(y*S*R-d)}else{const S=y*Math.sqrt(m*m-1);v=X=>{const tt=Math.exp(-m*y*X),Y=Math.min(S*X,300);return o-tt*((d+m*y*g)*Math.sinh(Y)+S*g*Math.cosh(Y))/S};const R=(d+m*y*g)/S,U=m*y*R-g*S,rt=m*y*g-R*S;w=X=>{const tt=Math.exp(-m*y*X),Y=Math.min(S*X,300);return tt*(U*Math.sinh(Y)+rt*Math.cosh(Y))}}const B={calculatedDuration:p&&h||null,velocity:S=>W(w(S)),next:S=>{if(!p&&m<1){const U=Math.exp(-m*y*S),rt=Math.sin(A*S),X=Math.cos(A*S),tt=o-U*(D*rt+g*X),Y=W(U*(V*rt+b*X));return a.done=Math.abs(Y)<=s&&Math.abs(o-tt)<=i,a.value=a.done?o:tt,a}const R=v(S);if(p)a.done=S>=h;else{const U=W(w(S));a.done=Math.abs(U)<=s&&Math.abs(o-R)<=i}return a.value=a.done?o:R,a},toString:()=>{const S=Math.min(un(B),Jt),R=fi(U=>B.next(S*U).value,S,30);return S+"ms "+R},toTransition:()=>{}};return B}Qt.applyToOptions=t=>{const e=pr(t,100,Qt);return t.ease=e.ease,t.duration=W(e.duration),t.type="keyframes",t};const wr=5;function di(t,e,n){const s=Math.max(e-wr,0);return $s(n-t(s),e-s)}function Re({keyframes:t,velocity:e=0,power:n=.8,timeConstant:s=325,bounceDamping:i=10,bounceStiffness:r=500,modifyTarget:o,min:a,max:u,restDelta:l=.5,restSpeed:c}){const h=t[0],f={done:!1,value:h},p=b=>a!==void 0&&b<a||u!==void 0&&b>u,d=b=>a===void 0?u:u===void 0||Math.abs(a-b)<Math.abs(u-b)?a:u;let m=n*e;const g=h+m,y=o===void 0?g:o(g);y!==g&&(m=y-h);const x=b=>-m*Math.exp(-b/s),v=b=>y+x(b),w=b=>{const B=x(b),S=v(b);f.done=Math.abs(B)<=l,f.value=f.done?y:S};let A,D;const V=b=>{p(f.value)&&(A=b,D=Qt({keyframes:[f.value,d(f.value)],velocity:di(v,b,f.value),damping:i,stiffness:r,restDelta:l,restSpeed:c}))};return V(0),{calculatedDuration:null,next:b=>{let B=!1;return!D&&A===void 0&&(B=!0,w(b),V(b)),A!==void 0&&b>=A?D.next(b-A):(!B&&w(b),f)}}}function Pr(t,e,n){const s=[],i=n||st.mix||hi,r=t.length-1;for(let o=0;o<r;o++){let a=i(t[o],t[o+1]);if(e){const u=Array.isArray(e)?e[o]||G:e;a=Bt(u,a)}s.push(a)}return s}function Sr(t,e,{clamp:n=!0,ease:s,mixer:i}={}){const r=t.length;if(re(r===e.length),r===1)return()=>e[0];if(r===2&&e[0]===e[1])return()=>e[1];const o=t[0]===t[1];t[0]>t[r-1]&&(t=[...t].reverse(),e=[...e].reverse());const a=Pr(e,s,i),u=a.length,l=c=>{if(o&&c<t[0])return e[0];let h=0;if(u>1)for(;h<t.length-2&&!(c<t[h+1]);h++);const f=Et(t[h],t[h+1],c);return a[h](f)};return n?c=>l(Q(t[0],t[r-1],c)):l}function br(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 Ar(t){const e=[0];return br(e,t.length-1),e}function Vr(t,e){return t.map(n=>n*e)}function Cr(t,e){return t.map(()=>e||ei).splice(0,t.length-1)}function Ct({duration:t=300,keyframes:e,times:n,ease:s="easeInOut"}){const i=Fo(s)?s.map(Vn):Vn(s),r={done:!1,value:e[0]},o=Vr(n&&n.length===e.length?n:Ar(e),t),a=Sr(o,e,{ease:Array.isArray(i)?i:Cr(e,i)});return{calculatedDuration:t,next:u=>(r.value=a(u),r.done=u>=t,r)}}const Mr=t=>t!==null;function ae(t,{repeat:e,repeatType:n="loop"},s,i=1){const r=t.filter(Mr),a=i<0||e&&n!=="loop"&&e%2===1?0:r.length-1;return!a||s===void 0?r[a]:s}const Dr={decay:Re,inertia:Re,tween:Ct,keyframes:Ct,spring:Qt};function pi(t){typeof t.type=="string"&&(t.type=Dr[t.type])}class cn{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 Er=t=>t/100;class te extends cn{constructor(e){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{const{motionValue:n}=this.options;n&&n.updatedAt!==j.now()&&this.tick(j.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=Ct,repeat:s=0,repeatDelay:i=0,repeatType:r,velocity:o=0}=e;let{keyframes:a}=e;const u=n||Ct;u!==Ct&&typeof a[0]!="number"&&(this.mixKeyframes=Bt(Er,hi(a[0],a[1])),a=[0,100]);const l=u({...e,keyframes:a});r==="mirror"&&(this.mirroredGenerator=u({...e,keyframes:[...a].reverse(),velocity:-o})),l.calculatedDuration===null&&(l.calculatedDuration=un(l));const{calculatedDuration:c}=l;this.calculatedDuration=c,this.resolvedDuration=c+i,this.totalDuration=this.resolvedDuration*(s+1)-i,this.generator=l}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:r,mirroredGenerator:o,resolvedDuration:a,calculatedDuration:u}=this;if(this.startTime===null)return s.next(0);const{delay:l=0,keyframes:c,repeat:h,repeatType:f,repeatDelay:p,type:d,onUpdate:m,finalKeyframe:g}=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 y=this.currentTime-l*(this.playbackSpeed>=0?1:-1),x=this.playbackSpeed>=0?y<0:y>i;this.currentTime=Math.max(y,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=i);let v=this.currentTime,w=s;if(h){const b=Math.min(this.currentTime,i)/a;let B=Math.floor(b),S=b%1;!S&&b>=1&&(S=1),S===1&&B--,B=Math.min(B,h+1),B%2&&(f==="reverse"?(S=1-S,p&&(S-=p/a)):f==="mirror"&&(w=o)),v=Q(0,1,S)*a}let A;x?(this.delayState.value=c[0],A=this.delayState):A=w.next(v),r&&!x&&(A.value=r(A.value));let{done:D}=A;!x&&u!==null&&(D=this.playbackSpeed>=0?this.currentTime>=i:this.currentTime<=0);const V=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&D);return V&&d!==Re&&(A.value=ae(c,this.options,g,this.speed)),m&&m(A.value),V&&this.finish(),A}then(e,n){return this.finished.then(e,n)}get duration(){return H(this.calculatedDuration)}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+H(e)}get time(){return H(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?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=e,this.tick(e))}getGeneratorVelocity(){const e=this.currentTime;if(e<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(e);const n=this.generator.next(e).value;return di(s=>this.generator.next(s).value,e,n)}get speed(){return this.playbackSpeed}set speed(e){const n=this.playbackSpeed!==e;n&&this.driver&&this.updateTime(j.now()),this.playbackSpeed=e,n&&this.driver&&(this.time=H(this.currentTime))}play(){if(this.isStopped)return;const{driver:e=dr,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(j.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 Rr(t){for(let e=1;e<t.length;e++)t[e]??(t[e]=t[e-1])}const ht=t=>t*180/Math.PI,Le=t=>{const e=ht(Math.atan2(t[1],t[0]));return ke(e)},Lr={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:t=>(Math.abs(t[0])+Math.abs(t[3]))/2,rotate:Le,rotateZ:Le,skewX:t=>ht(Math.atan(t[1])),skewY:t=>ht(Math.atan(t[2])),skew:t=>(Math.abs(t[1])+Math.abs(t[2]))/2},ke=t=>(t=t%360,t<0&&(t+=360),t),kn=Le,Bn=t=>Math.sqrt(t[0]*t[0]+t[1]*t[1]),Fn=t=>Math.sqrt(t[4]*t[4]+t[5]*t[5]),kr={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Bn,scaleY:Fn,scale:t=>(Bn(t)+Fn(t))/2,rotateX:t=>ke(ht(Math.atan2(t[6],t[5]))),rotateY:t=>ke(ht(Math.atan2(-t[2],t[0]))),rotateZ:kn,rotate:kn,skewX:t=>ht(Math.atan(t[4])),skewY:t=>ht(Math.atan(t[1])),skew:t=>(Math.abs(t[1])+Math.abs(t[4]))/2};function Be(t){return t.includes("scale")?1:0}function Fe(t,e){if(!t||t==="none")return Be(e);const n=t.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);let s,i;if(n)s=kr,i=n;else{const a=t.match(/^matrix\(([-\d.e\s,]+)\)$/u);s=Lr,i=a}if(!i)return Be(e);const r=s[e],o=i[1].split(",").map(Fr);return typeof r=="function"?r(o):o[r]}const Br=(t,e)=>{const{transform:n="none"}=getComputedStyle(t);return Fe(n,e)};function Fr(t){return parseFloat(t.trim())}const Pt=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],St=new Set([...Pt,"pathRotation"]),In=t=>t===wt||t===T,Ir=new Set(["x","y","z"]),Or=Pt.filter(t=>!Ir.has(t));function jr(t){const e=[];return Or.forEach(n=>{const s=t.getValue(n);s!==void 0&&(e.push([n,s.get()]),s.set(n.startsWith("scale")?1:0))}),e}const nt={width:({x:t},{paddingLeft:e="0",paddingRight:n="0",boxSizing:s})=>{const i=t.max-t.min;return s==="border-box"?i:i-parseFloat(e)-parseFloat(n)},height:({y:t},{paddingTop:e="0",paddingBottom:n="0",boxSizing:s})=>{const i=t.max-t.min;return s==="border-box"?i:i-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})=>Fe(e,"x"),y:(t,{transform:e})=>Fe(e,"y")};nt.translateX=nt.x;nt.translateY=nt.y;const ft=new Set;let Ie=!1,Oe=!1,je=!1;function mi(){if(Oe){const t=Array.from(ft).filter(s=>s.needsMeasurement),e=new Set(t.map(s=>s.element)),n=new Map;e.forEach(s=>{const i=jr(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(([r,o])=>{s.getValue(r)?.set(o)})}),t.forEach(s=>s.measureEndState()),t.forEach(s=>{s.suspendedScrollY!==void 0&&window.scrollTo(0,s.suspendedScrollY)})}Oe=!1,Ie=!1,ft.forEach(t=>t.complete(je)),ft.clear()}function gi(){ft.forEach(t=>{t.readKeyframes(),t.needsMeasurement&&(Oe=!0)})}function Nr(){je=!0,gi(),mi(),je=!1}class hn{constructor(e,n,s,i,r,o=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=n,this.name=s,this.motionValue=i,this.element=r,this.isAsync=o}scheduleResolve(){this.state="scheduled",this.isAsync?(ft.add(this),Ie||(Ie=!0,M.read(gi),M.resolveKeyframes(mi))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:e,name:n,element:s,motionValue:i}=this;if(e[0]===null){const r=i?.get(),o=e[e.length-1];if(r!==void 0)e[0]=r;else if(s&&n){const a=s.readValue(n,o);a!=null&&(e[0]=a)}e[0]===void 0&&(e[0]=o),i&&r===void 0&&i.set(e[0])}Rr(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),ft.delete(this)}cancel(){this.state==="scheduled"&&(ft.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const Ur=t=>t.startsWith("--");function yi(t,e,n){Ur(e)?t.style.setProperty(e,n):t.style[e]=n}const Wr={};function vi(t,e){const n=zs(t);return()=>Wr[e]??n()}const Kr=vi(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),xi=vi(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),At=([t,e,n,s])=>`cubic-bezier(${t}, ${e}, ${n}, ${s})`,On={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:At([0,.65,.55,1]),circOut:At([.55,0,1,.45]),backIn:At([.31,.01,.66,-.59]),backOut:At([.33,1.53,.69,.99])};function Ti(t,e){if(t)return typeof t=="function"?xi()?fi(t,e):"ease-out":ni(t)?At(t):Array.isArray(t)?t.map(n=>Ti(n,e)||On.easeOut):On[t]}function Hr(t,e,n,{delay:s=0,duration:i=300,repeat:r=0,repeatType:o="loop",ease:a="easeOut",times:u}={},l=void 0){const c={[e]:n};u&&(c.offset=u);const h=Ti(a,i);Array.isArray(h)&&(c.easing=h);const f={delay:s,duration:i,easing:Array.isArray(h)?"linear":h,fill:"both",iterations:r+1,direction:o==="reverse"?"alternate":"normal"};return l&&(f.pseudoElement=l),t.animate(c,f)}function wi(t){return typeof t=="function"&&"applyToOptions"in t}function Gr({type:t,...e}){return wi(t)&&xi()?t.applyToOptions(e):(e.duration??(e.duration=300),e.ease??(e.ease="easeOut"),e)}class Pi extends cn{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;const{element:n,name:s,keyframes:i,pseudoElement:r,allowFlatten:o=!1,finalKeyframe:a,onComplete:u}=e;this.isPseudoElement=!!r,this.allowFlatten=o,this.options=e,re(typeof e.type!="string");const l=Gr(e);this.animation=Hr(n,s,i,l,r),l.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!r){const c=ae(i,this.options,a,this.speed);this.updateMotionValue&&this.updateMotionValue(c),yi(n,s,c),this.animation.cancel()}u?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,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(){const e=this.options?.element;!this.isPseudoElement&&e?.isConnected&&this.animation.commitStyles?.()}get duration(){const e=this.animation.effect?.getComputedTiming?.().duration||0;return H(Number(e))}get iterationDuration(){const{delay:e=0}=this.options||{};return this.duration+H(e)}get time(){return H(Number(this.animation.currentTime)||0)}set time(e){const n=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=W(e),n&&this.animation.pause()}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 this.manualStartTime??Number(this.animation.startTime)}set startTime(e){this.manualStartTime=this.animation.startTime=e}attachTimeline({timeline:e,rangeStart:n,rangeEnd:s,observe:i}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,e&&Kr()?(this.animation.timeline=e,n&&(this.animation.rangeStart=n),s&&(this.animation.rangeEnd=s),G):i(this)}}const Si={anticipate:Js,backInOut:Zs,circInOut:ti};function zr(t){return t in Si}function $r(t){typeof t.ease=="string"&&zr(t.ease)&&(t.ease=Si[t.ease])}const ge=10;class _r extends Pi{constructor(e){$r(e),pi(e),super(e),e.startTime!==void 0&&e.autoplay!==!1&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){const{motionValue:n,onUpdate:s,onComplete:i,element:r,...o}=this.options;if(!n)return;if(e!==void 0){n.set(e);return}const a=new te({...o,autoplay:!1}),u=Math.max(ge,j.now()-this.startTime),l=Q(0,ge,u-ge),c=a.sample(u).value,{name:h}=this.options;r&&h&&yi(r,h,c),n.setWithVelocity(a.sample(Math.max(0,u-l)).value,c,l),a.stop()}}const jn=(t,e)=>e==="zIndex"?!1:!!(typeof t=="number"||Array.isArray(t)||typeof t=="string"&&(_.test(t)||t==="0")&&!t.startsWith("url("));function Xr(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 Yr(t,e,n,s){const i=t[0];if(i===null)return!1;if(e==="display"||e==="visibility")return!0;const r=t[t.length-1],o=jn(i,e),a=jn(r,e);return!o||!a?!1:Xr(t)||(n==="spring"||wi(n))&&s}function Ne(t){t.duration=0,t.type="keyframes"}const bi=new Set(["opacity","clipPath","filter","transform","backgroundColor"]),qr=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function Zr(t){for(let e=0;e<t.length;e++)if(typeof t[e]=="string"&&qr.test(t[e]))return!0;return!1}const Jr=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),Qr=zs(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function ta(t){const{motionValue:e,name:n,repeatDelay:s,repeatType:i,damping:r,type:o,keyframes:a}=t,u=e?.owner?.current;if(!(u instanceof HTMLElement)&&!(u instanceof SVGElement))return!1;const{onUpdate:l,transformTemplate:c}=e.owner.getProps();return Qr()&&n&&(bi.has(n)||Jr.has(n)&&Zr(a))&&(n!=="transform"||!c)&&!l&&!s&&i!=="mirror"&&r!==0&&o!=="inertia"}const ea=40;class na extends cn{constructor({autoplay:e=!0,delay:n=0,type:s="keyframes",repeat:i=0,repeatDelay:r=0,repeatType:o="loop",keyframes:a,name:u,motionValue:l,element:c,...h}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=j.now();const f={autoplay:e,delay:n,type:s,repeat:i,repeatDelay:r,repeatType:o,name:u,motionValue:l,element:c,...h},p=c?.KeyframeResolver||hn;this.keyframeResolver=new p(a,(d,m,g)=>this.onKeyframesResolved(d,m,f,!g),u,l,c),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,n,s,i){this.keyframeResolver=void 0;const{name:r,type:o,velocity:a,delay:u,isHandoff:l,onUpdate:c}=s;this.resolvedAt=j.now();let h=!0;Yr(e,r,o,a)||(h=!1,(st.instantAnimations||!u)&&c?.(ae(e,s,n)),e[0]=e[e.length-1],Ne(s),s.repeat=0);const p={startTime:i?this.resolvedAt?this.resolvedAt-this.createdAt>ea?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:n,...s,keyframes:e},d=h&&!l&&ta(p),m=p.motionValue?.owner?.current;let g;if(d)try{g=new _r({...p,element:m})}catch{g=new te(p)}else g=new te(p);g.finished.then(()=>{this.notifyFinished()}).catch(G),this.pendingTimeline&&(this.stopTimeline=g.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=g}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(),Nr()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}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()}}function Ai(t,e,n,s=0,i=1){const r=Array.from(t).sort((l,c)=>l.sortNodePosition(c)).indexOf(e),o=t.size,a=(o-1)*s;return typeof n=="function"?n(r,o):i===1?r*s:a-r*s}const Nn=30,sa=t=>!isNaN(parseFloat(t)),Un={current:void 0};class ia{constructor(e,n={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=s=>{const i=j.now();if(this.updatedAt!==i&&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()},this.hasAnimated=!1,this.setCurrent(e),this.owner=n.owner}setCurrent(e){this.current=e,this.updatedAt=j.now(),this.canTrackVelocity===null&&e!==void 0&&(this.canTrackVelocity=sa(this.current))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,n){this.events[e]||(this.events[e]=new en);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){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}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 Un.current&&Un.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){const e=j.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||e-this.updatedAt>Nn)return 0;const n=Math.min(this.updatedAt-this.prevUpdatedAt,Nn);return $s(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 Tt(t,e){return new ia(t,e)}function Vi(t,e){if(t?.inherit&&e){const{inherit:n,...s}=t;return{...e,...s}}return t}function fn(t,e){const n=t?.[e]??t?.default??t;return n!==t?Vi(n,t):n}const oa={type:"spring",stiffness:500,damping:25,restSpeed:10},ra=t=>({type:"spring",stiffness:550,damping:t===0?2*Math.sqrt(550):30,restSpeed:10}),aa={type:"keyframes",duration:.8},la={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},ua=(t,{keyframes:e})=>e.length>2?aa:St.has(t)?t.startsWith("scale")?ra(e[1]):oa:la,ca=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function ha(t){for(const e in t)if(!ca.has(e))return!0;return!1}const dn=(t,e,n,s={},i,r)=>o=>{const a=fn(s,t)||{},u=a.delay||s.delay||0;let{elapsed:l=0}=s;l=l-W(u);const c={keyframes:Array.isArray(n)?n:[null,n],ease:"easeOut",velocity:e.getVelocity(),...a,delay:-l,onUpdate:f=>{e.set(f),a.onUpdate&&a.onUpdate(f)},onComplete:()=>{o(),a.onComplete&&a.onComplete()},name:t,motionValue:e,element:r?void 0:i};ha(a)||Object.assign(c,ua(t,c)),c.duration&&(c.duration=W(c.duration)),c.repeatDelay&&(c.repeatDelay=W(c.repeatDelay)),c.from!==void 0&&(c.keyframes[0]=c.from);let h=!1;if((c.type===!1||c.duration===0&&!c.repeatDelay)&&(Ne(c),c.delay===0&&(h=!0)),(st.instantAnimations||st.skipAnimations||i?.shouldSkipAnimations||a.skipAnimations)&&(h=!0,Ne(c),c.delay=0),c.allowFlatten=!a.type&&!a.ease,h&&!r&&e.get()!==void 0){const f=ae(c.keyframes,a);if(f!==void 0){M.update(()=>{c.onUpdate(f),c.onComplete()});return}}return a.isSync?new te(c):new na(c)},fa=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function da(t){const e=fa.exec(t);if(!e)return[,];const[,n,s,i]=e;return[`--${n??s}`,i]}function Ci(t,e,n=1){const[s,i]=da(t);if(!s)return;const r=window.getComputedStyle(e).getPropertyValue(s);if(r){const o=r.trim();return Ks(o)?parseFloat(o):o}return on(i)?Ci(i,e,n+1):i}function Wn(t){const e=[{},{}];return t?.values.forEach((n,s)=>{e[0][s]=n.get(),e[1][s]=n.getVelocity()}),e}function pn(t,e,n,s){if(typeof e=="function"){const[i,r]=Wn(s);e=e(n!==void 0?n:t.custom,i,r)}if(typeof e=="string"&&(e=t.variants&&t.variants[e]),typeof e=="function"){const[i,r]=Wn(s);e=e(n!==void 0?n:t.custom,i,r)}return e}function dt(t,e,n){const s=t.getProps();return pn(s,e,n!==void 0?n:s.custom,t)}const Mi=new Set(["width","height","top","left","right","bottom",...Pt]),Ue=t=>Array.isArray(t);function pa(t,e,n){t.hasValue(e)?t.getValue(e).set(n):t.addValue(e,Tt(n))}function ma(t){return Ue(t)?t[t.length-1]||0:t}function ga(t,e){const n=dt(t,e);let{transitionEnd:s={},transition:i={},...r}=n||{};r={...r,...s};for(const o in r){const a=ma(r[o]);pa(t,o,a)}}const O=t=>!!(t&&t.getVelocity);function ya(t){return!!(O(t)&&t.add)}function We(t,e){const n=t.getValue("willChange");if(ya(n))return n.add(e);if(!n&&st.WillChange){const s=new st.WillChange("auto");t.addValue("willChange",s),s.add(e)}}function mn(t){return t.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}const va="framerAppearId",Di="data-"+mn(va);function Ei(t){return t.props[Di]}function xa({protectedKeys:t,needsAnimating:e},n){const s=t.hasOwnProperty(n)&&e[n]!==!0;return e[n]=!1,s}function Ri(t,e,{delay:n=0,transitionOverride:s,type:i}={}){let{transition:r,transitionEnd:o,...a}=e;const u=t.getDefaultTransition();r=r?Vi(r,u):u;const l=r?.reduceMotion,c=r?.skipAnimations;s&&(r=s);const h=[],f=i&&t.animationState&&t.animationState.getState()[i],p=r?.path;p&&p.animateVisualElement(t,a,r,n,h);for(const d in a){const m=t.getValue(d,t.latestValues[d]??null),g=a[d];if(g===void 0||f&&xa(f,d))continue;const y={delay:n,...fn(r||{},d)};c&&(y.skipAnimations=!0);const x=m.get();if(x!==void 0&&!m.isAnimating()&&!Array.isArray(g)&&g===x&&!y.velocity){M.update(()=>m.set(g));continue}let v=!1;if(window.MotionHandoffAnimation){const D=Ei(t);if(D){const V=window.MotionHandoffAnimation(D,d,M);V!==null&&(y.startTime=V,v=!0)}}We(t,d);const w=l??t.shouldReduceMotion;m.start(dn(d,m,g,w&&Mi.has(d)?{type:!1}:y,t,v));const A=m.animation;A&&h.push(A)}if(o){const d=()=>M.update(()=>{o&&ga(t,o)});h.length?Promise.all(h).then(d):d()}return h}function Ke(t,e,n={}){const s=dt(t,e,n.type==="exit"?t.presenceContext?.custom:void 0);let{transition:i=t.getDefaultTransition()||{}}=s||{};n.transitionOverride&&(i=n.transitionOverride);const r=s?()=>Promise.all(Ri(t,s,n)):()=>Promise.resolve(),o=t.variantChildren&&t.variantChildren.size?(u=0)=>{const{delayChildren:l=0,staggerChildren:c,staggerDirection:h}=i;return Ta(t,e,u,l,c,h,n)}:()=>Promise.resolve(),{when:a}=i;if(a){const[u,l]=a==="beforeChildren"?[r,o]:[o,r];return u().then(()=>l())}else return Promise.all([r(),o(n.delay)])}function Ta(t,e,n=0,s=0,i=0,r=1,o){const a=[];for(const u of t.variantChildren)u.notify("AnimationStart",e),a.push(Ke(u,e,{...o,delay:n+(typeof s=="function"?0:s)+Ai(t.variantChildren,u,s,i,r)}).then(()=>u.notify("AnimationComplete",e)));return Promise.all(a)}function wa(t,e,n={}){t.notify("AnimationStart",e);let s;if(Array.isArray(e)){const i=e.map(r=>Ke(t,r,n));s=Promise.all(i)}else if(typeof e=="string")s=Ke(t,e,n);else{const i=typeof e=="function"?dt(t,e,n.custom):e;s=Promise.all(Ri(t,i,n))}return s.then(()=>{t.notify("AnimationComplete",e)})}const Pa={test:t=>t==="auto",parse:t=>t},Li=t=>e=>e.test(t),ki=[wt,T,J,et,Xo,_o,Pa],Kn=t=>ki.find(Li(t));function Sa(t){return typeof t=="number"?t===0:t!==null?t==="none"||t==="0"||Gs(t):!0}const ba=new Set(["brightness","contrast","saturate","opacity"]);function Aa(t){const[e,n]=t.slice(0,-1).split("(");if(e==="drop-shadow")return t;const[s]=n.match(rn)||[];if(!s)return t;const i=n.replace(s,"");let r=ba.has(e)?1:0;return s!==n&&(r*=100),e+"("+r+i+")"}const Va=/\b([a-z-]*)\(.*?\)/gu,He={..._,getAnimatableNone:t=>{const e=t.match(Va);return e?e.map(Aa).join(" "):t}},Ge={..._,getAnimatableNone:t=>{const e=_.parse(t);return _.createTransformer(t)(e.map(s=>typeof s=="number"?0:typeof s=="object"?{...s,alpha:1}:s))}},Hn={...wt,transform:Math.round},Ca={rotate:et,pathRotation:et,rotateX:et,rotateY:et,rotateZ:et,scale:Nt,scaleX:Nt,scaleY:Nt,scaleZ:Nt,skew:et,skewX:et,skewY:et,distance:T,translateX:T,translateY:T,translateZ:T,x:T,y:T,z:T,perspective:T,transformPerspective:T,opacity:Rt,originX:Mn,originY:Mn,originZ:T},ee={borderWidth:T,borderTopWidth:T,borderRightWidth:T,borderBottomWidth:T,borderLeftWidth:T,borderRadius: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,inset:T,insetBlock:T,insetBlockStart:T,insetBlockEnd:T,insetInline:T,insetInlineStart:T,insetInlineEnd:T,padding:T,paddingTop:T,paddingRight:T,paddingBottom:T,paddingLeft:T,paddingBlock:T,paddingBlockStart:T,paddingBlockEnd:T,paddingInline:T,paddingInlineStart:T,paddingInlineEnd:T,margin:T,marginTop:T,marginRight:T,marginBottom:T,marginLeft:T,marginBlock:T,marginBlockStart:T,marginBlockEnd:T,marginInline:T,marginInlineStart:T,marginInlineEnd:T,fontSize:T,backgroundPositionX:T,backgroundPositionY:T,...Ca,zIndex:Hn,fillOpacity:Rt,strokeOpacity:Rt,numOctaves:Hn},Ma={...ee,color:L,backgroundColor:L,outlineColor:L,fill:L,stroke:L,borderColor:L,borderTopColor:L,borderRightColor:L,borderBottomColor:L,borderLeftColor:L,filter:He,WebkitFilter:He,mask:Ge,WebkitMask:Ge},Bi=t=>Ma[t],Da=new Set([He,Ge]);function Fi(t,e){let n=Bi(t);return Da.has(n)||(n=_),n.getAnimatableNone?n.getAnimatableNone(e):void 0}const Ea=new Set(["auto","none","0"]);function Ra(t,e,n){let s=0,i;for(;s<t.length&&!i;){const r=t[s];typeof r=="string"&&!Ea.has(r)&&xt(r).values.length&&(i=t[s]),s++}if(i&&n)for(const r of e)t[r]=Fi(n,i)}class La extends hn{constructor(e,n,s,i,r){super(e,n,s,i,r,!0)}readKeyframes(){const{unresolvedKeyframes:e,element:n,name:s}=this;if(!n||!n.current)return;super.readKeyframes();for(let c=0;c<e.length;c++){let h=e[c];if(typeof h=="string"&&(h=h.trim(),on(h))){const f=Ci(h,n.current);f!==void 0&&(e[c]=f),c===e.length-1&&(this.finalKeyframe=h)}}if(this.resolveNoneKeyframes(),!Mi.has(s)||e.length!==2)return;const[i,r]=e,o=Kn(i),a=Kn(r),u=Cn(i),l=Cn(r);if(u!==l&&nt[s]){this.needsMeasurement=!0;return}if(o!==a)if(In(o)&&In(a))for(let c=0;c<e.length;c++){const h=e[c];typeof h=="string"&&(e[c]=parseFloat(h))}else nt[s]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){const{unresolvedKeyframes:e,name:n}=this,s=[];for(let i=0;i<e.length;i++)(e[i]===null||Sa(e[i]))&&s.push(i);s.length&&Ra(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=nt[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 r=s.length-1,o=s[r];s[r]=nt[n](e.measureViewportBox(),window.getComputedStyle(e.current)),o!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=o),this.removedTransforms?.length&&this.removedTransforms.forEach(([a,u])=>{e.getValue(a).set(u)}),this.resolveNoneKeyframes()}}const gn=["borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius"];function Ii(t,e,n){if(t==null)return[];if(t instanceof EventTarget)return[t];if(typeof t=="string"){let s=document;e&&(s=e.current);const i=n?.[t]??s.querySelectorAll(t);return i?Array.from(i):[]}return Array.from(t).filter(s=>s!=null)}const ze=(t,e)=>e&&typeof t=="number"?e.transform(t):t;function ka(t){return Hs(t)&&"offsetHeight"in t&&!("ownerSVGElement"in t)}const{schedule:yn}=si(queueMicrotask,!1),$={x:!1,y:!1};function Oi(){return $.x||$.y}function Ba(t){return t==="x"||t==="y"?$[t]?null:($[t]=!0,()=>{$[t]=!1}):$.x||$.y?null:($.x=$.y=!0,()=>{$.x=$.y=!1})}function ji(t,e){const n=Ii(t),s=new AbortController,i={passive:!0,...e,signal:s.signal};return[n,i,()=>s.abort()]}function Fa(t){return!(t.pointerType==="touch"||Oi())}function Ia(t,e,n={}){const[s,i,r]=ji(t,n);return s.forEach(o=>{let a=!1,u=!1,l;const c=()=>{o.removeEventListener("pointerleave",d)},h=g=>{l&&(l(g),l=void 0),c()},f=g=>{a=!1,window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",f),u&&(u=!1,h(g))},p=()=>{a=!0,window.addEventListener("pointerup",f,i),window.addEventListener("pointercancel",f,i)},d=g=>{if(g.pointerType!=="touch"){if(a){u=!0;return}h(g)}},m=g=>{if(!Fa(g))return;u=!1;const y=e(o,g);typeof y=="function"&&(l=y,o.addEventListener("pointerleave",d,i))};o.addEventListener("pointerenter",m,i),o.addEventListener("pointerdown",p,i)}),r}const Ni=(t,e)=>e?t===e?!0:Ni(t,e.parentElement):!1,vn=t=>t.pointerType==="mouse"?typeof t.button!="number"||t.button<=0:t.isPrimary!==!1,Oa=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function ja(t){return Oa.has(t.tagName)||t.isContentEditable===!0}const Na=new Set(["INPUT","SELECT","TEXTAREA"]);function Ua(t){return Na.has(t.tagName)||t.isContentEditable===!0}const Ht=new WeakSet;function Gn(t){return e=>{e.key==="Enter"&&t(e)}}function ye(t,e){t.dispatchEvent(new PointerEvent("pointer"+e,{isPrimary:!0,bubbles:!0}))}const Wa=(t,e)=>{const n=t.currentTarget;if(!n)return;const s=Gn(()=>{if(Ht.has(n))return;ye(n,"down");const i=Gn(()=>{ye(n,"up")}),r=()=>ye(n,"cancel");n.addEventListener("keyup",i,e),n.addEventListener("blur",r,e)});n.addEventListener("keydown",s,e),n.addEventListener("blur",()=>n.removeEventListener("keydown",s),e)};function zn(t){return vn(t)&&!Oi()}const $n=new WeakSet;function Ka(t,e,n={}){const[s,i,r]=ji(t,n),o=a=>{const u=a.currentTarget;if(!zn(a)||$n.has(a))return;Ht.add(u),n.stopPropagation&&$n.add(a);const l=e(u,a),c={...i,capture:!0},h=(d,m)=>{window.removeEventListener("pointerup",f,c),window.removeEventListener("pointercancel",p,c),Ht.has(u)&&Ht.delete(u),zn(d)&&typeof l=="function"&&l(d,{success:m})},f=d=>{h(d,u===window||u===document||n.useGlobalTarget||Ni(u,d.target))},p=d=>{h(d,!1)};window.addEventListener("pointerup",f,c),window.addEventListener("pointercancel",p,c)};return s.forEach(a=>{(n.useGlobalTarget?window:a).addEventListener("pointerdown",o,i),ka(a)&&(a.addEventListener("focus",l=>Wa(l,i)),!ja(a)&&!a.hasAttribute("tabindex")&&(a.tabIndex=0))}),r}function xn(t){return Hs(t)&&"ownerSVGElement"in t}const Gt=new WeakMap;let zt;const Ui=(t,e,n)=>(s,i)=>i&&i[0]?i[0][t+"Size"]:xn(s)&&"getBBox"in s?s.getBBox()[e]:s[n],Ha=Ui("inline","width","offsetWidth"),Ga=Ui("block","height","offsetHeight");function za({target:t,borderBoxSize:e}){Gt.get(t)?.forEach(n=>{n(t,{get width(){return Ha(t,e)},get height(){return Ga(t,e)}})})}function $a(t){t.forEach(za)}function _a(){typeof ResizeObserver>"u"||(zt=new ResizeObserver($a))}function Xa(t,e){zt||_a();const n=Ii(t);return n.forEach(s=>{let i=Gt.get(s);i||(i=new Set,Gt.set(s,i)),i.add(e),zt?.observe(s)}),()=>{n.forEach(s=>{const i=Gt.get(s);i?.delete(e),i?.size||zt?.unobserve(s)})}}const $t=new Set;let yt;function Ya(){yt=()=>{const t={get width(){return window.innerWidth},get height(){return window.innerHeight}};$t.forEach(e=>e(t))},window.addEventListener("resize",yt)}function qa(t){return $t.add(t),yt||Ya(),()=>{$t.delete(t),!$t.size&&typeof yt=="function"&&(window.removeEventListener("resize",yt),yt=void 0)}}function _n(t,e){return typeof t=="function"?qa(t):Xa(t,e)}function Za(t){return xn(t)&&t.tagName==="svg"}const Ja=[...ki,L,_],Qa=t=>Ja.find(Li(t)),Xn=()=>({translate:0,scale:1,origin:0,originPoint:0}),vt=()=>({x:Xn(),y:Xn()}),Yn=()=>({min:0,max:0}),k=()=>({x:Yn(),y:Yn()}),tl=new WeakMap;function le(t){return t!==null&&typeof t=="object"&&typeof t.start=="function"}function Lt(t){return typeof t=="string"||Array.isArray(t)}const Tn=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],wn=["initial",...Tn];function ue(t){return le(t.animate)||wn.some(e=>Lt(t[e]))}function Wi(t){return!!(ue(t)||t.variants)}function el(t,e,n){for(const s in e){const i=e[s],r=n[s];if(O(i))t.addValue(s,i);else if(O(r))t.addValue(s,Tt(i,{owner:t}));else if(r!==i)if(t.hasValue(s)){const o=t.getValue(s);o.liveStyle===!0?o.jump(i):o.hasAnimated||o.set(i)}else{const o=t.getStaticValue(s);t.addValue(s,Tt(o!==void 0?o:i,{owner:t}))}}for(const s in n)e[s]===void 0&&t.removeValue(s);return e}const $e={current:null},Ki={current:!1},nl=typeof window<"u";function sl(){if(Ki.current=!0,!!nl)if(window.matchMedia){const t=window.matchMedia("(prefers-reduced-motion)"),e=()=>$e.current=t.matches;t.addEventListener("change",e),e()}else $e.current=!1}const qn=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let ne={};function Hi(t){ne=t}function il(){return ne}class ol{scrapeMotionValuesFromProps(e,n,s){return{}}constructor({parent:e,props:n,presenceContext:s,reducedMotionConfig:i,skipAnimations:r,blockInitialAnimation:o,visualState:a},u={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=hn,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,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 p=j.now();this.renderScheduledAt<p&&(this.renderScheduledAt=p,M.render(this.render,!1,!0))};const{latestValues:l,renderState:c}=a;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.skipAnimationsConfig=r,this.options=u,this.blockInitialAnimation=!!o,this.isControllingVariants=ue(n),this.isVariantNode=Wi(n),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:h,...f}=this.scrapeMotionValuesFromProps(n,{},this);for(const p in f){const d=f[p];l[p]!==void 0&&O(d)&&d.set(l[p])}}mount(e){if(this.hasBeenMounted)for(const n in this.initialValues)this.values.get(n)?.jump(this.initialValues[n]),this.latestValues[n]=this.initialValues[n];this.current=e,tl.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)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(Ki.current||sl(),this.shouldReduceMotion=$e.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection&&this.projection.unmount(),it(this.notifyUpdate),it(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(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}addChild(e){this.children.add(e),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,n){if(this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)(),n.accelerate&&bi.has(e)&&this.current instanceof HTMLElement){const{factory:o,keyframes:a,times:u,ease:l,duration:c}=n.accelerate,h=new Pi({element:this.current,name:e,keyframes:a,times:u,ease:l,duration:W(c)}),f=o(h);this.valueSubscriptions.set(e,()=>{f(),h.cancel()});return}const s=St.has(e);s&&this.onBindTransform&&this.onBindTransform();const i=n.on("change",o=>{this.latestValues[e]=o,this.props.onUpdate&&M.preRender(this.notifyUpdate),s&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});let r;typeof window<"u"&&window.MotionCheckAppearSync&&(r=window.MotionCheckAppearSync(this,e,n)),this.valueSubscriptions.set(e,()=>{i(),r&&r()})}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 ne){const n=ne[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 r=this.features[e];r.isMounted?r.update():(r.mount(),r.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):k()}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<qn.length;s++){const i=qn[s];this.propEventSubscriptions[i]&&(this.propEventSubscriptions[i](),delete this.propEventSubscriptions[i]);const r="on"+i,o=e[r];o&&(this.propEventSubscriptions[i]=this.on(i,o))}this.prevMotionValues=el(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=Tt(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"&&(Ks(s)||Gs(s))?s=parseFloat(s):!Qa(s)&&_.test(n)&&(s=Fi(e,n)),this.setBaseTarget(e,O(s)?s.get():s)),O(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 r=pn(this.props,n,this.presenceContext?.custom);r&&(s=r[e])}if(n&&s!==void 0)return s;const i=this.getBaseTargetFromProps(this.props,e);return i!==void 0&&!O(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 en),this.events[e].add(n)}notify(e,...n){this.events[e]&&this.events[e].notify(...n)}scheduleRenderMicrotask(){yn.render(this.render)}}class Gi extends ol{constructor(){super(...arguments),this.KeyframeResolver=La}sortInstanceNodePosition(e,n){return e.compareDocumentPosition(n)&2?1:-1}getBaseTargetFromProps(e,n){const s=e.style;return s?s[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;O(e)&&(this.childSubscription=e.on("change",n=>{this.current&&(this.current.textContent=`${n}`)}))}}class ot{constructor(e){this.isMounted=!1,this.node=e}update(){}}function zi({top:t,left:e,right:n,bottom:s}){return{x:{min:e,max:n},y:{min:t,max:s}}}function rl({x:t,y:e}){return{top:e.min,right:t.max,bottom:e.max,left:t.min}}function al(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}}function ve(t){return t===void 0||t===1}function _e({scale:t,scaleX:e,scaleY:n}){return!ve(t)||!ve(e)||!ve(n)}function ut(t){return _e(t)||$i(t)||t.z||t.rotate||t.rotateX||t.rotateY||t.skewX||t.skewY}function $i(t){return Zn(t.x)||Zn(t.y)}function Zn(t){return t&&t!=="0%"}function se(t,e,n){const s=t-n,i=e*s;return n+i}function Jn(t,e,n,s,i){return i!==void 0&&(t=se(t,i,s)),se(t,n,s)+e}function Xe(t,e=0,n=1,s,i){t.min=Jn(t.min,e,n,s,i),t.max=Jn(t.max,e,n,s,i)}function _i(t,{x:e,y:n}){Xe(t.x,e.translate,e.scale,e.originPoint),Xe(t.y,n.translate,n.scale,n.originPoint)}const Qn=.999999999999,ts=1.0000000000001;function ll(t,e,n,s=!1){const i=n.length;if(!i)return;e.x=e.y=1;let r,o;for(let a=0;a<i;a++){r=n[a],o=r.projectionDelta;const{visualElement:u}=r.options;u&&u.props.style&&u.props.style.display==="contents"||(s&&r.options.layoutScroll&&r.scroll&&r!==r.root&&(Z(t.x,-r.scroll.offset.x),Z(t.y,-r.scroll.offset.y)),o&&(e.x*=o.x.scale,e.y*=o.y.scale,_i(t,o)),s&&ut(r.latestValues)&&_t(t,r.latestValues,r.layout?.layoutBox))}e.x<ts&&e.x>Qn&&(e.x=1),e.y<ts&&e.y>Qn&&(e.y=1)}function Z(t,e){t.min+=e,t.max+=e}function es(t,e,n,s,i=.5){const r=C(t.min,t.max,i);Xe(t,e,n,r,s)}function ns(t,e){return typeof t=="string"?parseFloat(t)/100*(e.max-e.min):t}function _t(t,e,n){const s=n??t;es(t.x,ns(e.x,s.x),e.scaleX,e.scale,e.originX),es(t.y,ns(e.y,s.y),e.scaleY,e.scale,e.originY)}function Xi(t,e){return zi(al(t.getBoundingClientRect(),e))}function ul(t,e,n){const s=Xi(t,n),{scroll:i}=e;return i&&(Z(s.x,i.offset.x),Z(s.y,i.offset.y)),s}const cl={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},hl=Pt.length;function fl(t,e,n){let s="",i=!0;for(let o=0;o<hl;o++){const a=Pt[o],u=t[a];if(u===void 0)continue;let l=!0;if(typeof u=="number")l=u===(a.startsWith("scale")?1:0);else{const c=parseFloat(u);l=a.startsWith("scale")?c===1:c===0}if(!l||n){const c=ze(u,ee[a]);if(!l){i=!1;const h=cl[a]||a;s+=`${h}(${c}) `}n&&(e[a]=c)}}const r=t.pathRotation;return r&&(i=!1,s+=`rotate(${ze(r,ee.pathRotation)}) `),s=s.trim(),n?s=n(e,i?"":s):i&&(s="none"),s}function Pn(t,e,n){const{style:s,vars:i,transformOrigin:r}=t;let o=!1,a=!1;for(const u in e){const l=e[u];if(St.has(u)){o=!0;continue}else if(oi(u)){i[u]=l;continue}else{const c=ze(l,ee[u]);u.startsWith("origin")?(a=!0,r[u]=c):s[u]=c}}if(e.transform||(o||n?s.transform=fl(e,t.transform,n):s.transform&&(s.transform="none")),a){const{originX:u="50%",originY:l="50%",originZ:c=0}=r;s.transformOrigin=`${u} ${l} ${c}`}}function Yi(t,{style:e,vars:n},s,i){const r=t.style;let o;for(o in e)r[o]=e[o];i?.applyProjectionStyles(r,s);for(o in n)r.setProperty(o,n[o])}function ss(t,e){return e.max===e.min?0:t/(e.max-e.min)*100}const bt={correct:(t,e)=>{if(!e.target)return t;if(typeof t=="string")if(T.test(t))t=parseFloat(t);else return t;const n=ss(t,e.target.x),s=ss(t,e.target.y);return`${n}% ${s}%`}},dl={correct:(t,{treeScale:e,projectionDelta:n})=>{const s=t,i=_.parse(t);if(i.length>5)return s;const r=_.createTransformer(t),o=typeof i[0]!="number"?1:0,a=n.x.scale*e.x,u=n.y.scale*e.y;i[0+o]/=a,i[1+o]/=u;const l=C(a,u,.5);return typeof i[2+o]=="number"&&(i[2+o]/=l),typeof i[3+o]=="number"&&(i[3+o]/=l),r(i)}},Ye={borderRadius:{...bt,applyTo:[...gn]},borderTopLeftRadius:bt,borderTopRightRadius:bt,borderBottomLeftRadius:bt,borderBottomRightRadius:bt,boxShadow:dl};function qi(t,{layout:e,layoutId:n}){return St.has(t)||t.startsWith("origin")||(e||n!==void 0)&&(!!Ye[t]||t==="opacity")}function Sn(t,e,n){const s=t.style,i=e?.style,r={};if(!s)return r;for(const o in s)(O(s[o])||i&&O(i[o])||qi(o,t)||n?.getValue(o)?.liveStyle!==void 0)&&(r[o]=s[o]);return r}function pl(t){return window.getComputedStyle(t)}class ml extends Gi{constructor(){super(...arguments),this.type="html",this.renderInstance=Yi}mount(e){re(!!e.style),super.mount(e)}readValueFromInstance(e,n){if(St.has(n))return this.projection?.isProjecting?Be(n):Br(e,n);{const s=pl(e),i=(oi(n)?s.getPropertyValue(n):s[n])||0;return typeof i=="string"?i.trim():i}}measureInstanceViewportBox(e,{transformPagePoint:n}){return Xi(e,n)}build(e,n,s){Pn(e,n,s.transformTemplate)}scrapeMotionValuesFromProps(e,n,s){return Sn(e,n,s)}}const gl={offset:"stroke-dashoffset",array:"stroke-dasharray"},yl={offset:"strokeDashoffset",array:"strokeDasharray"};function vl(t,e,n=1,s=0,i=!0){t.pathLength=1;const r=i?gl:yl;t[r.offset]=`${-s}`,t[r.array]=`${e} ${n}`}const xl=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function Zi(t,{attrX:e,attrY:n,attrScale:s,pathLength:i,pathSpacing:r=1,pathOffset:o=0,...a},u,l,c){if(Pn(t,a,l),u){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=c?.transformBox??"fill-box",delete h.transformBox);for(const p of xl)h[p]!==void 0&&(f[p]=h[p],delete h[p]);e!==void 0&&(h.x=e),n!==void 0&&(h.y=n),s!==void 0&&(h.scale=s),i!==void 0&&vl(h,i,r,o,!1)}const Ji=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"]),Qi=t=>typeof t=="string"&&t.toLowerCase()==="svg";function Tl(t,e,n,s){Yi(t,e,void 0,s);for(const i in e.attrs)t.setAttribute(Ji.has(i)?i:mn(i),e.attrs[i])}function to(t,e,n){const s=Sn(t,e,n);for(const i in t)if(O(t[i])||O(e[i])){const r=Pt.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;s[r]=t[i]}return s}class wl extends Gi{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=k}getBaseTargetFromProps(e,n){return e[n]}readValueFromInstance(e,n){if(St.has(n)){const s=Bi(n);return s&&s.default||0}return n=Ji.has(n)?n:mn(n),e.getAttribute(n)}scrapeMotionValuesFromProps(e,n,s){return to(e,n,s)}build(e,n,s){Zi(e,n,this.isSVGTag,s.transformTemplate,s.style)}renderInstance(e,n,s,i){Tl(e,n,s,i)}mount(e){this.isSVGTag=Qi(e.tagName),super.mount(e)}}const Pl=wn.length;function eo(t){if(!t)return;if(!t.isControllingVariants){const n=t.parent?eo(t.parent)||{}:{};return t.props.initial!==void 0&&(n.initial=t.props.initial),n}const e={};for(let n=0;n<Pl;n++){const s=wn[n],i=t.props[s];(Lt(i)||i===!1)&&(e[s]=i)}return e}function no(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 Sl=[...Tn].reverse(),bl=Tn.length;function Al(t){return e=>Promise.all(e.map(({animation:n,options:s})=>wa(t,n,s)))}function Vl(t){let e=Al(t),n=is(),s=!0,i=!1;const r=l=>(c,h)=>{const f=dt(t,h,l==="exit"?t.presenceContext?.custom:void 0);if(f){const{transition:p,transitionEnd:d,...m}=f;c={...c,...m,...d}}return c};function o(l){e=l(t)}function a(l){const{props:c}=t,h=eo(t.parent)||{},f=[],p=new Set;let d={},m=1/0;for(let y=0;y<bl;y++){const x=Sl[y],v=n[x],w=c[x]!==void 0?c[x]:h[x],A=Lt(w),D=x===l?v.isActive:null;D===!1&&(m=y);let V=w===h[x]&&w!==c[x]&&A;if(V&&(s||i)&&t.manuallyAnimateOnMount&&(V=!1),v.protectedKeys={...d},!v.isActive&&D===null||!w&&!v.prevProp||le(w)||typeof w=="boolean")continue;if(x==="exit"&&v.isActive&&D!==!0){v.prevResolvedValues&&(d={...d,...v.prevResolvedValues});continue}const b=Cl(v.prevProp,w);let B=b||x===l&&v.isActive&&!V&&A||y>m&&A,S=!1;const R=Array.isArray(w)?w:[w];let U=R.reduce(r(x),{});D===!1&&(U={});const{prevResolvedValues:rt={}}=v,X={...rt,...U},tt=F=>{B=!0,p.has(F)&&(S=!0,p.delete(F)),v.needsAnimating[F]=!0;const K=t.getValue(F);K&&(K.liveStyle=!1)};for(const F in X){const K=U[F],at=rt[F];if(d.hasOwnProperty(F))continue;let pt=!1;Ue(K)&&Ue(at)?pt=!no(K,at)||b:pt=K!==at,pt?K!=null?tt(F):p.add(F):K!==void 0&&p.has(F)?tt(F):v.protectedKeys[F]=!0}v.prevProp=w,v.prevResolvedValues=U,v.isActive&&(d={...d,...U}),(s||i)&&t.blockInitialAnimation&&(B=!1);const Y=V&&b;B&&(!Y||S)&&f.push(...R.map(F=>{const K={type:x};if(typeof F=="string"&&(s||i)&&!Y&&t.manuallyAnimateOnMount&&t.parent){const{parent:at}=t,pt=dt(at,F);if(at.enteringChildren&&pt){const{delayChildren:Vo}=pt.transition||{};K.delay=Ai(at.enteringChildren,t,Vo)}}return{animation:F,options:K}}))}if(p.size){const y={};if(typeof c.initial!="boolean"){const x=dt(t,Array.isArray(c.initial)?c.initial[0]:c.initial);x&&x.transition&&(y.transition=x.transition)}p.forEach(x=>{const v=t.getBaseTarget(x),w=t.getValue(x);w&&(w.liveStyle=!0),y[x]=v??null}),f.push({animation:y})}let g=!!f.length;return s&&(c.initial===!1||c.initial===c.animate)&&!t.manuallyAnimateOnMount&&(g=!1),s=!1,i=!1,g?e(f):Promise.resolve()}function u(l,c){if(n[l].isActive===c)return Promise.resolve();t.variantChildren?.forEach(f=>f.animationState?.setActive(l,c)),n[l].isActive=c;const h=a(l);for(const f in n)n[f].protectedKeys={};return h}return{animateChanges:a,setActive:u,setAnimateFunction:o,getState:()=>n,reset:()=>{n=is(),i=!0}}}function Cl(t,e){return typeof e=="string"?e!==t:Array.isArray(e)?!no(e,t):!1}function lt(t=!1){return{isActive:t,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function is(){return{animate:lt(!0),whileInView:lt(),whileHover:lt(),whileTap:lt(),whileDrag:lt(),whileFocus:lt(),exit:lt()}}function qe(t,e){t.min=e.min,t.max=e.max}function z(t,e){qe(t.x,e.x),qe(t.y,e.y)}function os(t,e){t.translate=e.translate,t.scale=e.scale,t.originPoint=e.originPoint,t.origin=e.origin}const so=1e-4,Ml=1-so,Dl=1+so,io=.01,El=0-io,Rl=0+io;function N(t){return t.max-t.min}function Ll(t,e,n){return Math.abs(t-e)<=n}function rs(t,e,n,s=.5){t.origin=s,t.originPoint=C(e.min,e.max,t.origin),t.scale=N(n)/N(e),t.translate=C(n.min,n.max,t.origin)-t.originPoint,(t.scale>=Ml&&t.scale<=Dl||isNaN(t.scale))&&(t.scale=1),(t.translate>=El&&t.translate<=Rl||isNaN(t.translate))&&(t.translate=0)}function Mt(t,e,n,s){rs(t.x,e.x,n.x,s?s.originX:void 0),rs(t.y,e.y,n.y,s?s.originY:void 0)}function as(t,e,n,s=0){const i=s?C(n.min,n.max,s):n.min;t.min=i+e.min,t.max=t.min+N(e)}function kl(t,e,n,s){as(t.x,e.x,n.x,s?.x),as(t.y,e.y,n.y,s?.y)}function ls(t,e,n,s=0){const i=s?C(n.min,n.max,s):n.min;t.min=e.min-i,t.max=t.min+N(e)}function ie(t,e,n,s){ls(t.x,e.x,n.x,s?.x),ls(t.y,e.y,n.y,s?.y)}function us(t,e,n,s,i){return t-=e,t=se(t,1/n,s),i!==void 0&&(t=se(t,1/i,s)),t}function Bl(t,e=0,n=1,s=.5,i,r=t,o=t){if(J.test(e)&&(e=parseFloat(e),e=C(o.min,o.max,e/100)-o.min),typeof e!="number")return;let a=C(r.min,r.max,s);t===r&&(a-=e),t.min=us(t.min,e,n,a,i),t.max=us(t.max,e,n,a,i)}function cs(t,e,[n,s,i],r,o){Bl(t,e[n],e[s],e[i],e.scale,r,o)}const Fl=["x","scaleX","originX"],Il=["y","scaleY","originY"];function hs(t,e,n,s){cs(t.x,e,Fl,n?n.x:void 0,s?s.x:void 0),cs(t.y,e,Il,n?n.y:void 0,s?s.y:void 0)}function fs(t){return t.translate===0&&t.scale===1}function oo(t){return fs(t.x)&&fs(t.y)}function ds(t,e){return t.min===e.min&&t.max===e.max}function Ol(t,e){return ds(t.x,e.x)&&ds(t.y,e.y)}function ps(t,e){return Math.round(t.min)===Math.round(e.min)&&Math.round(t.max)===Math.round(e.max)}function ro(t,e){return ps(t.x,e.x)&&ps(t.y,e.y)}function ms(t){return N(t.x)/N(t.y)}function gs(t,e){return t.translate===e.translate&&t.scale===e.scale&&t.originPoint===e.originPoint}function q(t){return[t("x"),t("y")]}function jl(t,e,n){let s="";const i=t.x.translate/e.x,r=t.y.translate/e.y,o=n?.z||0;if((i||r||o)&&(s=`translate3d(${i}px, ${r}px, ${o}px) `),(e.x!==1||e.y!==1)&&(s+=`scale(${1/e.x}, ${1/e.y}) `),n){const{transformPerspective:l,rotate:c,pathRotation:h,rotateX:f,rotateY:p,skewX:d,skewY:m}=n;l&&(s=`perspective(${l}px) ${s}`),c&&(s+=`rotate(${c}deg) `),h&&(s+=`rotate(${h}deg) `),f&&(s+=`rotateX(${f}deg) `),p&&(s+=`rotateY(${p}deg) `),d&&(s+=`skewX(${d}deg) `),m&&(s+=`skewY(${m}deg) `)}const a=t.x.scale*e.x,u=t.y.scale*e.y;return(a!==1||u!==1)&&(s+=`scale(${a}, ${u})`),s||"none"}const Nl=gn.length,ys=t=>typeof t=="string"?parseFloat(t):t,vs=t=>typeof t=="number"||T.test(t);function Ul(t,e,n,s,i,r){i?(t.opacity=C(0,n.opacity??1,Wl(s)),t.opacityExit=C(e.opacity??1,0,Kl(s))):r&&(t.opacity=C(e.opacity??1,n.opacity??1,s));for(let o=0;o<Nl;o++){const a=gn[o];let u=xs(e,a),l=xs(n,a);if(u===void 0&&l===void 0)continue;u||(u=0),l||(l=0),u===0||l===0||vs(u)===vs(l)?(t[a]=Math.max(C(ys(u),ys(l),s),0),(J.test(l)||J.test(u))&&(t[a]+="%")):t[a]=l}(e.rotate||n.rotate)&&(t.rotate=C(e.rotate||0,n.rotate||0,s))}function xs(t,e){return t[e]!==void 0?t[e]:t.borderRadius}const Wl=ao(0,.5,Qs),Kl=ao(.5,.95,G);function ao(t,e,n){return s=>s<t?0:s>e?1:n(Et(t,e,s))}function Hl(t,e,n){const s=O(t)?t:Tt(t);return s.start(dn("",s,e,n)),s.animation}function kt(t,e,n,s={passive:!0}){return t.addEventListener(e,n,s),()=>t.removeEventListener(e,n,s)}const Gl=(t,e)=>t.depth-e.depth;class zl{constructor(){this.children=[],this.isDirty=!1}add(e){tn(this.children,e),this.isDirty=!0}remove(e){qt(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(Gl),this.isDirty=!1,this.children.forEach(e)}}function $l(t,e){const n=j.now(),s=({timestamp:i})=>{const r=i-n;r>=e&&(it(s),t(r-e))};return M.setup(s,!0),()=>it(s)}function Xt(t){return O(t)?t.get():t}class _l{constructor(){this.members=[]}add(e){tn(this.members,e);for(let n=this.members.length-1;n>=0;n--){const s=this.members[n];if(s===e||s===this.lead||s===this.prevLead)continue;const i=s.instance;(!i||i.isConnected===!1)&&!s.snapshot&&(qt(this.members,s),s.unmount())}e.scheduleRender()}remove(e){if(qt(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){for(let n=this.members.indexOf(e)-1;n>=0;n--){const s=this.members[n];if(s.isPresent!==!1&&s.instance?.isConnected!==!1)return this.promote(s),!0}return!1}promote(e,n){const s=this.lead;if(e!==s&&(this.prevLead=s,this.lead=e,e.show(),s)){s.updateSnapshot(),e.scheduleRender();const{layoutDependency:i}=s.options,{layoutDependency:r}=e.options;(i===void 0||i!==r)&&(e.resumeFrom=s,n&&(s.preserveOpacity=!0),s.snapshot&&(e.snapshot=s.snapshot,e.snapshot.latestValues=s.animationValues||s.latestValues),e.root?.isUpdating&&(e.isLayoutDirty=!0)),e.options.crossfade===!1&&s.hide()}}exitAnimationComplete(){this.members.forEach(e=>{e.options.onExitComplete?.(),e.resumingFrom?.options.onExitComplete?.()})}scheduleRender(){this.members.forEach(e=>e.instance&&e.scheduleRender(!1))}removeLeadSnapshot(){this.lead?.snapshot&&(this.lead.snapshot=void 0)}}const Yt={hasAnimatedSinceResize:!0,hasEverUpdated:!1},xe=["","X","Y","Z"],Xl=1e3;let Yl=0;function Te(t,e,n,s){const{latestValues:i}=e;i[t]&&(n[t]=i[t],e.setStaticValue(t,0),s&&(s[t]=0))}function lo(t){if(t.hasCheckedOptimisedAppear=!0,t.root===t)return;const{visualElement:e}=t.options;if(!e)return;const n=Ei(e);if(window.MotionHasOptimisedAnimation(n,"transform")){const{layout:i,layoutId:r}=t.options;window.MotionCancelOptimisedAnimation(n,"transform",M,!(i||r))}const{parent:s}=t;s&&!s.hasCheckedOptimisedAppear&&lo(s)}function uo({attachResizeListener:t,defaultParent:e,measureScroll:n,checkIsScrollRoot:s,resetTransform:i}){return class{constructor(o={},a=e?.()){this.id=Yl++,this.animationId=0,this.animationCommitId=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.layoutVersion=0,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(Jl),this.nodes.forEach(iu),this.nodes.forEach(ou),this.nodes.forEach(Ql)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,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 u=0;u<this.path.length;u++)this.path[u].shouldResetTransform=!0;this.root===this&&(this.nodes=new zl)}addEventListener(o,a){return this.eventHandlers.has(o)||this.eventHandlers.set(o,new en),this.eventHandlers.get(o).add(a)}notifyListeners(o,...a){const u=this.eventHandlers.get(o);u&&u.notify(...a)}hasListeners(o){return this.eventHandlers.has(o)}mount(o){if(this.instance)return;this.isSVG=xn(o)&&!Za(o),this.instance=o;const{layoutId:a,layout:u,visualElement:l}=this.options;if(l&&!l.current&&l.mount(o),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(u||a)&&(this.isLayoutDirty=!0),t){let c,h=0;const f=()=>this.root.updateBlockedByResize=!1;M.read(()=>{h=window.innerWidth}),t(o,()=>{const p=window.innerWidth;p!==h&&(h=p,this.root.updateBlockedByResize=!0,c&&c(),c=$l(f,250),Yt.hasAnimatedSinceResize&&(Yt.hasAnimatedSinceResize=!1,this.nodes.forEach(Ps)))})}a&&this.root.registerSharedNode(a,this),this.options.animate!==!1&&l&&(a||u)&&this.addEventListener("didUpdate",({delta:c,hasLayoutChanged:h,hasRelativeLayoutChanged:f,layout:p})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const d=this.options.transition||l.getDefaultTransition()||cu,{onLayoutAnimationStart:m,onLayoutAnimationComplete:g}=l.getProps(),y=!this.targetLayout||!ro(this.targetLayout,p),x=!h&&f;if(this.options.layoutRoot||this.resumeFrom||x||h&&(y||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const v={...fn(d,"layout"),onPlay:m,onComplete:g};(l.shouldReduceMotion||this.options.layoutRoot)&&(v.delay=0,v.type=!1),this.startAnimation(v),this.setAnimationOrigin(c,x,v.path)}else h||Ps(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=p})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),it(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(ru),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&lo(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let c=0;c<this.path.length;c++){const h=this.path[c];h.shouldResetTransform=!0,(typeof h.latestValues.x=="string"||typeof h.latestValues.y=="string")&&(h.isLayoutDirty=!0),h.updateScroll("snapshot"),h.options.layoutRoot&&h.willUpdate(!1)}const{layoutId:a,layout:u}=this.options;if(a===void 0&&!u)return;const l=this.getTransformTemplate();this.prevTransformTemplateValue=l?l(this.latestValues,""):void 0,this.updateSnapshot(),o&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){const u=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),u&&this.nodes.forEach(eu),this.nodes.forEach(Ts);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(ws);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(nu),this.nodes.forEach(su),this.nodes.forEach(ql),this.nodes.forEach(Zl)):this.nodes.forEach(ws),this.clearAllSnapshots();const a=j.now();I.delta=Q(0,1e3/60,a-I.timestamp),I.timestamp=a,I.isProcessing=!0,he.update.process(I),he.preRender.process(I),he.render.process(I),I.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,yn.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(tu),this.sharedNodes.forEach(au)}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&&!N(this.snapshot.measuredBox.x)&&!N(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let u=0;u<this.path.length;u++)this.path[u].updateScroll();const o=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||(this.layoutCorrected=k()),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,o?o.layoutBox:void 0)}updateScroll(o="measure"){let a=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===o&&(a=!1),a&&this.instance){const u=s(this.instance);this.scroll={animationId:this.root.animationId,phase:o,isRoot:u,offset:n(this.instance),wasRoot:this.scroll?this.scroll.isRoot:u}}}resetTransform(){if(!i)return;const o=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,a=this.projectionDelta&&!oo(this.projectionDelta),u=this.getTransformTemplate(),l=u?u(this.latestValues,""):void 0,c=l!==this.prevTransformTemplateValue;o&&this.instance&&(a||ut(this.latestValues)||c)&&(i(this.instance,l),this.shouldResetTransform=!1,this.scheduleRender())}measure(o=!0){const a=this.measurePageBox();let u=this.removeElementScroll(a);return o&&(u=this.removeTransform(u)),hu(u),{animationId:this.root.animationId,measuredBox:a,layoutBox:u,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:o}=this.options;if(!o)return k();const a=o.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(fu))){const{scroll:l}=this.root;l&&(Z(a.x,l.offset.x),Z(a.y,l.offset.y))}return a}removeElementScroll(o){const a=k();if(z(a,o),this.scroll?.wasRoot)return a;for(let u=0;u<this.path.length;u++){const l=this.path[u],{scroll:c,options:h}=l;l!==this.root&&c&&h.layoutScroll&&(c.wasRoot&&z(a,o),Z(a.x,c.offset.x),Z(a.y,c.offset.y))}return a}applyTransform(o,a=!1,u){const l=u||k();z(l,o);for(let c=0;c<this.path.length;c++){const h=this.path[c];!a&&h.options.layoutScroll&&h.scroll&&h!==h.root&&(Z(l.x,-h.scroll.offset.x),Z(l.y,-h.scroll.offset.y)),ut(h.latestValues)&&_t(l,h.latestValues,h.layout?.layoutBox)}return ut(this.latestValues)&&_t(l,this.latestValues,this.layout?.layoutBox),l}removeTransform(o){const a=k();z(a,o);for(let u=0;u<this.path.length;u++){const l=this.path[u];if(!ut(l.latestValues))continue;let c;l.instance&&(_e(l.latestValues)&&l.updateSnapshot(),c=k(),z(c,l.measurePageBox())),hs(a,l.latestValues,l.snapshot?.layoutBox,c)}return ut(this.latestValues)&&hs(a,this.latestValues),a}setTargetDelta(o){this.targetDelta=o,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(o){this.options={...this.options,...o,crossfade:o.crossfade!==void 0?o.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!==I.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(o=!1){const a=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=a.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=a.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=a.isSharedProjectionDirty);const u=!!this.resumingFrom||this!==a;if(!(o||u&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;const{layout:c,layoutId:h}=this.options;if(!this.layout||!(c||h))return;this.resolvedRelativeTargetAt=I.timestamp;const f=this.getClosestProjectingParent();f&&this.linkedParentVersion!==f.layoutVersion&&!f.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&f&&f.layout?this.createRelativeTarget(f,this.layout.layoutBox,f.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=k(),this.targetWithTransforms=k()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),kl(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):z(this.target,this.layout.layoutBox),_i(this.target,this.targetDelta)):z(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&f&&!!f.resumingFrom==!!this.resumingFrom&&!f.options.layoutScroll&&f.target&&this.animationProgress!==1?this.createRelativeTarget(f,this.target,f.target):this.relativeParent=this.relativeTarget=void 0))}getClosestProjectingParent(){if(!(!this.parent||_e(this.parent.latestValues)||$i(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(o,a,u){this.relativeParent=o,this.linkedParentVersion=o.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=k(),this.relativeTargetOrigin=k(),ie(this.relativeTargetOrigin,a,u,this.options.layoutAnchor||void 0),z(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){const o=this.getLead(),a=!!this.resumingFrom||this!==o;let u=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(u=!1),a&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(u=!1),this.resolvedRelativeTargetAt===I.timestamp&&(u=!1),u)return;const{layout:l,layoutId:c}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(l||c))return;z(this.layoutCorrected,this.layout.layoutBox);const h=this.treeScale.x,f=this.treeScale.y;ll(this.layoutCorrected,this.treeScale,this.path,a),o.layout&&!o.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(o.target=o.layout.layoutBox,o.targetWithTransforms=k());const{target:p}=o;if(!p){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)),Mt(this.projectionDelta,this.layoutCorrected,p,this.latestValues),(this.treeScale.x!==h||this.treeScale.y!==f||!gs(this.projectionDelta.x,this.prevProjectionDelta.x)||!gs(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",p))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(o=!0){if(this.options.visualElement?.scheduleRender(),o){const a=this.getStack();a&&a.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=vt(),this.projectionDelta=vt(),this.projectionDeltaWithTransform=vt()}setAnimationOrigin(o,a=!1,u){const l=this.snapshot,c=l?l.latestValues:{},h={...this.latestValues},f=vt();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!a;const p=k(),d=l?l.source:void 0,m=this.layout?this.layout.source:void 0,g=d!==m,y=this.getStack(),x=!y||y.members.length<=1,v=!!(g&&!x&&this.options.crossfade===!0&&!this.path.some(uu));this.animationProgress=0;let w;const A=u?.interpolateProjection(o);this.mixTargetDelta=D=>{const V=D/1e3,b=A?.(V);b?(f.x.translate=b.x,f.x.scale=C(o.x.scale,1,V),f.x.origin=o.x.origin,f.x.originPoint=o.x.originPoint,f.y.translate=b.y,f.y.scale=C(o.y.scale,1,V),f.y.origin=o.y.origin,f.y.originPoint=o.y.originPoint):(Ss(f.x,o.x,V),Ss(f.y,o.y,V)),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(ie(p,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),lu(this.relativeTarget,this.relativeTargetOrigin,p,V),w&&Ol(this.relativeTarget,w)&&(this.isProjectionDirty=!1),w||(w=k()),z(w,this.relativeTarget)),g&&(this.animationValues=h,Ul(h,c,this.latestValues,V,v,x)),b&&b.rotate!==void 0&&(this.animationValues||(this.animationValues=h),this.animationValues.pathRotation=b.rotate),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=V},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(it(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=M.update(()=>{Yt.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Tt(0)),this.motionValue.jump(0,!1),this.currentAnimation=Hl(this.motionValue,[0,1e3],{...o,velocity:0,isSync:!0,onUpdate:a=>{this.mixTargetDelta(a),o.onUpdate&&o.onUpdate(a)},onComplete:()=>{o.onComplete&&o.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 o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(Xl),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:u,layout:l,latestValues:c}=o;if(!(!a||!u||!l)){if(this!==o&&this.layout&&l&&co(this.options.animationType,this.layout.layoutBox,l.layoutBox)){u=this.target||k();const h=N(this.layout.layoutBox.x);u.x.min=o.target.x.min,u.x.max=u.x.min+h;const f=N(this.layout.layoutBox.y);u.y.min=o.target.y.min,u.y.max=u.y.min+f}z(a,u),_t(a,c),Mt(this.projectionDeltaWithTransform,this.layoutCorrected,a,c)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new _l),this.sharedNodes.get(o).add(a);const l=a.options.initialPromotionConfig;a.promote({transition:l?l.transition:void 0,preserveFollowOpacity:l&&l.shouldPreserveFollowOpacity?l.shouldPreserveFollowOpacity(a):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){const{layoutId:o}=this.options;return o?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:o}=this.options;return o?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:a,preserveFollowOpacity:u}={}){const l=this.getStack();l&&l.promote(this,u),o&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetSkewAndRotation(){const{visualElement:o}=this.options;if(!o)return;let a=!1;const{latestValues:u}=o;if((u.z||u.rotate||u.rotateX||u.rotateY||u.rotateZ||u.skewX||u.skewY)&&(a=!0),!a)return;const l={};u.z&&Te("z",o,l,this.animationValues);for(let c=0;c<xe.length;c++)Te(`rotate${xe[c]}`,o,l,this.animationValues),Te(`skew${xe[c]}`,o,l,this.animationValues);o.render();for(const c in l)o.setStaticValue(c,l[c]),this.animationValues&&(this.animationValues[c]=l[c]);o.scheduleRender()}applyProjectionStyles(o,a){if(!this.instance||this.isSVG)return;if(!this.isVisible){o.visibility="hidden";return}const u=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,o.visibility="",o.opacity="",o.pointerEvents=Xt(a?.pointerEvents)||"",o.transform=u?u(this.latestValues,""):"none";return}const l=this.getLead();if(!this.projectionDelta||!this.layout||!l.target){this.options.layoutId&&(o.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,o.pointerEvents=Xt(a?.pointerEvents)||""),this.hasProjected&&!ut(this.latestValues)&&(o.transform=u?u({},""):"none",this.hasProjected=!1);return}o.visibility="";const c=l.animationValues||l.latestValues;this.applyTransformsToTarget();let h=jl(this.projectionDeltaWithTransform,this.treeScale,c);u&&(h=u(c,h)),o.transform=h;const{x:f,y:p}=this.projectionDelta;o.transformOrigin=`${f.origin*100}% ${p.origin*100}% 0`,l.animationValues?o.opacity=l===this?c.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:c.opacityExit:o.opacity=l===this?c.opacity!==void 0?c.opacity:"":c.opacityExit!==void 0?c.opacityExit:0;for(const d in Ye){if(c[d]===void 0)continue;const{correct:m,applyTo:g,isCSSVariable:y}=Ye[d],x=h==="none"?c[d]:m(c[d],l);if(g){const v=g.length;for(let w=0;w<v;w++)o[g[w]]=x}else y?this.options.visualElement.renderState.vars[d]=x:o[d]=x}this.options.layoutId&&(o.pointerEvents=l===this?Xt(a?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(o=>o.currentAnimation?.stop()),this.root.nodes.forEach(Ts),this.root.sharedNodes.clear()}}}function ql(t){t.updateLayout()}function Zl(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,r=e.source!==t.layout.source;if(i==="size")q(c=>{const h=r?e.measuredBox[c]:e.layoutBox[c],f=N(h);h.min=n[c].min,h.max=h.min+f});else if(i==="x"||i==="y"){const c=i==="x"?"y":"x";qe(r?e.measuredBox[c]:e.layoutBox[c],n[c])}else co(i,e.layoutBox,n)&&q(c=>{const h=r?e.measuredBox[c]:e.layoutBox[c],f=N(n[c]);h.max=h.min+f,t.relativeTarget&&!t.currentAnimation&&(t.isProjectionDirty=!0,t.relativeTarget[c].max=t.relativeTarget[c].min+f)});const o=vt();Mt(o,n,e.layoutBox);const a=vt();r?Mt(a,t.applyTransform(s,!0),e.measuredBox):Mt(a,n,e.layoutBox);const u=!oo(o);let l=!1;if(!t.resumeFrom){const c=t.getClosestProjectingParent();if(c&&!c.resumeFrom){const{snapshot:h,layout:f}=c;if(h&&f){const p=t.options.layoutAnchor||void 0,d=k();ie(d,e.layoutBox,h.layoutBox,p);const m=k();ie(m,n,f.layoutBox,p),ro(d,m)||(l=!0),c.options.layoutRoot&&(t.relativeTarget=m,t.relativeTargetOrigin=d,t.relativeParent=c)}}}t.notifyListeners("didUpdate",{layout:n,snapshot:e,delta:a,layoutDelta:o,hasLayoutChanged:u,hasRelativeLayoutChanged:l})}else if(t.isLead()){const{onExitComplete:n}=t.options;n&&n()}t.options.transition=void 0}function Jl(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 Ql(t){t.isProjectionDirty=t.isSharedProjectionDirty=t.isTransformDirty=!1}function tu(t){t.clearSnapshot()}function Ts(t){t.clearMeasurements()}function eu(t){t.isLayoutDirty=!0,t.updateLayout()}function ws(t){t.isLayoutDirty=!1}function nu(t){t.isAnimationBlocked&&t.layout&&!t.isLayoutDirty&&(t.snapshot=t.layout,t.isLayoutDirty=!0)}function su(t){const{visualElement:e}=t.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),t.resetTransform()}function Ps(t){t.finishAnimation(),t.targetDelta=t.relativeTarget=t.target=void 0,t.isProjectionDirty=!0}function iu(t){t.resolveTargetDelta()}function ou(t){t.calcProjection()}function ru(t){t.resetSkewAndRotation()}function au(t){t.removeLeadSnapshot()}function Ss(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 bs(t,e,n,s){t.min=C(e.min,n.min,s),t.max=C(e.max,n.max,s)}function lu(t,e,n,s){bs(t.x,e.x,n.x,s),bs(t.y,e.y,n.y,s)}function uu(t){return t.animationValues&&t.animationValues.opacityExit!==void 0}const cu={duration:.45,ease:[.4,0,.1,1]},As=t=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(t),Vs=As("applewebkit/")&&!As("chrome/")?Math.round:G;function Cs(t){t.min=Vs(t.min),t.max=Vs(t.max)}function hu(t){Cs(t.x),Cs(t.y)}function co(t,e,n){return t==="position"||t==="preserve-aspect"&&!Ll(ms(e),ms(n),.2)}function fu(t){return t!==t.root&&t.scroll?.wasRoot}const du=uo({attachResizeListener:(t,e)=>kt(t,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0}),we={current:void 0},ho=uo({measureScroll:t=>({x:t.scrollLeft,y:t.scrollTop}),defaultParent:()=>{if(!we.current){const t=new du({});t.mount(window),t.setOptions({layoutScroll:!0}),we.current=t}return we.current},resetTransform:(t,e)=>{t.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:t=>window.getComputedStyle(t).position==="fixed"}),fo=P.createContext({transformPagePoint:t=>t,isStatic:!1,reducedMotion:"never"});function pu(t=!0){const e=P.useContext(Qe);if(e===null)return[!0,null];const{isPresent:n,onExitComplete:s,register:i}=e,r=P.useId();P.useEffect(()=>{if(t)return i(r)},[t]);const o=P.useCallback(()=>t&&s&&s(r),[r,s,t]);return!n&&s?[!1,o]:[!0]}const po=P.createContext({strict:!1}),Ms={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"]};let Ds=!1;function mu(){if(Ds)return;const t={};for(const e in Ms)t[e]={isEnabled:n=>Ms[e].some(s=>!!n[s])};Hi(t),Ds=!0}function mo(){return mu(),il()}function gu(t){const e=mo();for(const n in t)e[n]={...e[n],...t[n]};Hi(e)}const yu=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","propagate","ignoreStrict","viewport"]);function oe(t){return t.startsWith("while")||t.startsWith("drag")&&t!=="draggable"||t.startsWith("layout")||t.startsWith("onTap")||t.startsWith("onPan")||t.startsWith("onLayout")||yu.has(t)}let go=t=>!oe(t);function vu(t){typeof t=="function"&&(go=e=>e.startsWith("on")?!oe(e):t(e))}try{vu(require("@emotion/is-prop-valid").default)}catch{}function xu(t,e,n){const s={};for(const i in t)i==="values"&&typeof t.values=="object"||O(t[i])||(go(i)||n===!0&&oe(i)||!e&&!oe(i)||t.draggable&&i.startsWith("onDrag"))&&(s[i]=t[i]);return s}const ce=P.createContext({});function Tu(t,e){if(ue(t)){const{initial:n,animate:s}=t;return{initial:n===!1||Lt(n)?n:void 0,animate:Lt(s)?s:void 0}}return t.inherit!==!1?e:{}}function wu(t){const{initial:e,animate:n}=Tu(t,P.useContext(ce));return P.useMemo(()=>({initial:e,animate:n}),[Es(e),Es(n)])}function Es(t){return Array.isArray(t)?t.join(" "):t}const bn=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function yo(t,e,n){for(const s in e)!O(e[s])&&!qi(s,n)&&(t[s]=e[s])}function Pu({transformTemplate:t},e){return P.useMemo(()=>{const n=bn();return Pn(n,e,t),Object.assign({},n.vars,n.style)},[e])}function Su(t,e){const n=t.style||{},s={};return yo(s,n,t),Object.assign(s,Pu(t,e)),s}function bu(t,e){const n={},s=Su(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 vo=()=>({...bn(),attrs:{}});function Au(t,e,n,s){const i=P.useMemo(()=>{const r=vo();return Zi(r,e,Qi(s),t.transformTemplate,t.style),{...r.attrs,style:{...r.style}}},[e]);if(t.style){const r={};yo(r,t.style,t),i.style={...r,...i.style}}return i}const Vu=["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 An(t){return typeof t!="string"||t.includes("-")?!1:!!(Vu.indexOf(t)>-1||/[A-Z]/u.test(t))}function Cu(t,e,n,{latestValues:s},i,r=!1,o){const u=(o??An(t)?Au:bu)(e,s,i,t),l=xu(e,typeof t=="string",r),c=t!==P.Fragment?{...l,...u,ref:n}:{},{children:h}=e,f=P.useMemo(()=>O(h)?h.get():h,[h]);return P.createElement(t,{...c,children:f})}function Mu({scrapeMotionValuesFromProps:t,createRenderState:e},n,s,i){return{latestValues:Du(n,s,i,t),renderState:e()}}function Du(t,e,n,s){const i={},r=s(t,{});for(const f in r)i[f]=Xt(r[f]);let{initial:o,animate:a}=t;const u=ue(t),l=Wi(t);e&&l&&!u&&t.inherit!==!1&&(o===void 0&&(o=e.initial),a===void 0&&(a=e.animate));let c=n?n.initial===!1:!1;c=c||o===!1;const h=c?a:o;if(h&&typeof h!="boolean"&&!le(h)){const f=Array.isArray(h)?h:[h];for(let p=0;p<f.length;p++){const d=pn(t,f[p]);if(d){const{transitionEnd:m,transition:g,...y}=d;for(const x in y){let v=y[x];if(Array.isArray(v)){const w=c?v.length-1:0;v=v[w]}v!==null&&(i[x]=v)}for(const x in m)i[x]=m[x]}}}return i}const xo=t=>(e,n)=>{const s=P.useContext(ce),i=P.useContext(Qe),r=()=>Mu(t,e,s,i);return n?r():Co(r)},Eu=xo({scrapeMotionValuesFromProps:Sn,createRenderState:bn}),Ru=xo({scrapeMotionValuesFromProps:to,createRenderState:vo}),Lu=Symbol.for("motionComponentSymbol");function ku(t,e,n){const s=P.useRef(n);P.useInsertionEffect(()=>{s.current=n});const i=P.useRef(null);return P.useCallback(r=>{r&&t.onMount?.(r),e&&(r?e.mount(r):e.unmount());const o=s.current;if(typeof o=="function")if(r){const a=o(r);typeof a=="function"&&(i.current=a)}else i.current?(i.current(),i.current=null):o(r);else o&&(o.current=r)},[e])}const To=P.createContext({});function mt(t){return t&&typeof t=="object"&&Object.prototype.hasOwnProperty.call(t,"current")}function Bu(t,e,n,s,i,r){const{visualElement:o}=P.useContext(ce),a=P.useContext(po),u=P.useContext(Qe),l=P.useContext(fo),c=l.reducedMotion,h=l.skipAnimations,f=P.useRef(null),p=P.useRef(!1);s=s||a.renderer,!f.current&&s&&(f.current=s(t,{visualState:e,parent:o,props:n,presenceContext:u,blockInitialAnimation:u?u.initial===!1:!1,reducedMotionConfig:c,skipAnimations:h,isSVG:r}),p.current&&f.current&&(f.current.manuallyAnimateOnMount=!0));const d=f.current,m=P.useContext(To);d&&!d.projection&&i&&(d.type==="html"||d.type==="svg")&&Fu(f.current,n,i,m);const g=P.useRef(!1);P.useInsertionEffect(()=>{d&&g.current&&d.update(n,u)});const y=n[Di],x=P.useRef(!!y&&typeof window<"u"&&!window.MotionHandoffIsComplete?.(y)&&window.MotionHasOptimisedAnimation?.(y));return Do(()=>{p.current=!0,d&&(g.current=!0,window.MotionIsMounted=!0,d.updateFeatures(),d.scheduleRenderMicrotask(),x.current&&d.animationState&&d.animationState.animateChanges())}),P.useEffect(()=>{d&&(!x.current&&d.animationState&&d.animationState.animateChanges(),x.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(y)}),x.current=!1),d.enteringChildren=void 0)}),d}function Fu(t,e,n,s){const{layoutId:i,layout:r,drag:o,dragConstraints:a,layoutScroll:u,layoutRoot:l,layoutAnchor:c,layoutCrossfade:h}=e;t.projection=new n(t.latestValues,e["data-framer-portal-id"]?void 0:wo(t.parent)),t.projection.setOptions({layoutId:i,layout:r,alwaysMeasureLayout:!!o||a&&mt(a),visualElement:t,animationType:typeof r=="string"?r:"both",initialPromotionConfig:s,crossfade:h,layoutScroll:u,layoutRoot:l,layoutAnchor:c})}function wo(t){if(t)return t.options.allowProjection!==!1?t.projection:wo(t.parent)}function Pe(t,{forwardMotionProps:e=!1,type:n}={},s,i){s&&gu(s);const r=n?n==="svg":An(t),o=r?Ru:Eu;function a(l,c){let h;const f={...P.useContext(fo),...l,layoutId:Iu(l)},{isStatic:p}=f,d=wu(l),m=o(l,p);if(!p&&typeof window<"u"){Ou();const g=ju(f);h=g.MeasureLayout,d.visualElement=Bu(t,m,f,i,g.ProjectionNode,r)}return Ce.jsxs(ce.Provider,{value:d,children:[h&&d.visualElement?Ce.jsx(h,{visualElement:d.visualElement,...f}):null,Cu(t,l,ku(m,d.visualElement,c),m,p,e,r)]})}a.displayName=`motion.${typeof t=="string"?t:`create(${t.displayName??t.name??""})`}`;const u=P.forwardRef(a);return u[Lu]=t,u}function Iu({layoutId:t}){const e=P.useContext(Ws).id;return e&&t!==void 0?e+"-"+t:t}function Ou(t,e){P.useContext(po).strict}function ju(t){const e=mo(),{drag:n,layout:s}=e;if(!n&&!s)return{};const i={...n,...s};return{MeasureLayout:n?.isEnabled(t)||s?.isEnabled(t)?i.MeasureLayout:void 0,ProjectionNode:i.ProjectionNode}}function Nu(t,e){if(typeof Proxy>"u")return Pe;const n=new Map,s=(r,o)=>Pe(r,o,t,e),i=(r,o)=>s(r,o);return new Proxy(i,{get:(r,o)=>o==="create"?s:(n.has(o)||n.set(o,Pe(o,void 0,t,e)),n.get(o))})}const Uu=(t,e)=>e.isSVG??An(t)?new wl(e):new ml(e,{allowProjection:t!==P.Fragment});class Wu extends ot{constructor(e){super(e),e.animationState||(e.animationState=Vl(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();le(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 Ku=0;class Hu extends ot{constructor(){super(...arguments),this.id=Ku++,this.isExitComplete=!1}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;if(e&&s===!1){if(this.isExitComplete){const{initial:r,custom:o}=this.node.getProps();if(typeof r=="string"||typeof r=="object"&&r!==null&&!Array.isArray(r)){const a=dt(this.node,r,o);if(a){const{transition:u,transitionEnd:l,...c}=a;for(const h in c)this.node.getValue(h)?.jump(c[h])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive("exit",!1);this.isExitComplete=!1;return}const i=this.node.animationState.setActive("exit",!e);n&&!e&&i.then(()=>{this.isExitComplete=!0,n(this.id)})}mount(){const{register:e,onExitComplete:n}=this.node.presenceContext||{};n&&n(this.id),e&&(this.unmount=e(this.id))}unmount(){}}const Gu={animation:{Feature:Wu},exit:{Feature:Hu}};function Ot(t){return{point:{x:t.pageX,y:t.pageY}}}const zu=t=>e=>vn(e)&&t(e,Ot(e));function Dt(t,e,n,s){return kt(t,e,zu(n),s)}const Po=({current:t})=>t?t.ownerDocument.defaultView:null,Rs=(t,e)=>Math.abs(t-e);function $u(t,e){const n=Rs(t.x,e.x),s=Rs(t.y,e.y);return Math.sqrt(n**2+s**2)}const Ls=new Set(["auto","scroll"]);class So{constructor(e,n,{transformPagePoint:s,contextWindow:i=window,dragSnapToOrigin:r=!1,distanceThreshold:o=3,element:a}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=d=>{this.handleScroll(d.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=Ut(this.lastRawMoveEventInfo,this.transformPagePoint));const d=Se(this.lastMoveEventInfo,this.history),m=this.startEvent!==null,g=$u(d.offset,{x:0,y:0})>=this.distanceThreshold;if(!m&&!g)return;const{point:y}=d,{timestamp:x}=I;this.history.push({...y,timestamp:x});const{onStart:v,onMove:w}=this.handlers;m||(v&&v(this.lastMoveEvent,d),this.startEvent=this.lastMoveEvent),w&&w(this.lastMoveEvent,d)},this.handlePointerMove=(d,m)=>{this.lastMoveEvent=d,this.lastRawMoveEventInfo=m,this.lastMoveEventInfo=Ut(m,this.transformPagePoint),M.update(this.updatePoint,!0)},this.handlePointerUp=(d,m)=>{this.end();const{onEnd:g,onSessionEnd:y,resumeAnimation:x}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&x&&x(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const v=Se(d.type==="pointercancel"?this.lastMoveEventInfo:Ut(m,this.transformPagePoint),this.history);this.startEvent&&g&&g(d,v),y&&y(d,v)},!vn(e))return;this.dragSnapToOrigin=r,this.handlers=n,this.transformPagePoint=s,this.distanceThreshold=o,this.contextWindow=i||window;const u=Ot(e),l=Ut(u,this.transformPagePoint),{point:c}=l,{timestamp:h}=I;this.history=[{...c,timestamp:h}];const{onSessionStart:f}=n;f&&f(e,Se(l,this.history));const p={passive:!0,capture:!0};this.removeListeners=Bt(Dt(this.contextWindow,"pointermove",this.handlePointerMove,p),Dt(this.contextWindow,"pointerup",this.handlePointerUp,p),Dt(this.contextWindow,"pointercancel",this.handlePointerUp,p)),a&&this.startScrollTracking(a)}startScrollTracking(e){let n=e.parentElement;for(;n;){const s=getComputedStyle(n);(Ls.has(s.overflowX)||Ls.has(s.overflowY))&&this.scrollPositions.set(n,{x:n.scrollLeft,y:n.scrollTop}),n=n.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0}),window.addEventListener("scroll",this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(e){const n=this.scrollPositions.get(e);if(!n)return;const s=e===window,i=s?{x:window.scrollX,y:window.scrollY}:{x:e.scrollLeft,y:e.scrollTop},r={x:i.x-n.x,y:i.y-n.y};r.x===0&&r.y===0||(s?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=r.x,this.lastMoveEventInfo.point.y+=r.y):this.history.length>0&&(this.history[0].x-=r.x,this.history[0].y-=r.y),this.scrollPositions.set(e,i),M.update(this.updatePoint,!0))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),it(this.updatePoint)}}function Ut(t,e){return e?{point:e(t.point)}:t}function ks(t,e){return{x:t.x-e.x,y:t.y-e.y}}function Se({point:t},e){return{point:t,delta:ks(t,bo(e)),offset:ks(t,_u(e)),velocity:Xu(e,.1)}}function _u(t){return t[0]}function bo(t){return t[t.length-1]}function Xu(t,e){if(t.length<2)return{x:0,y:0};let n=t.length-1,s=null;const i=bo(t);for(;n>=0&&(s=t[n],!(i.timestamp-s.timestamp>W(e)));)n--;if(!s)return{x:0,y:0};s===t[0]&&t.length>2&&i.timestamp-s.timestamp>W(e)*2&&(s=t[1]);const r=H(i.timestamp-s.timestamp);if(r===0)return{x:0,y:0};const o={x:(i.x-s.x)/r,y:(i.y-s.y)/r};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function Yu(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 Bs(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 qu(t,{top:e,left:n,bottom:s,right:i}){return{x:Bs(t.x,n,i),y:Bs(t.y,e,s)}}function Fs(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 Zu(t,e){return{x:Fs(t.x,e.x),y:Fs(t.y,e.y)}}function Ju(t,e){let n=.5;const s=N(t),i=N(e);return i>s?n=Et(e.min,e.max-s,t.min):s>i&&(n=Et(t.min,t.max-i,e.min)),Q(0,1,n)}function Qu(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 Ze=.35;function tc(t=Ze){return t===!1?t=0:t===!0&&(t=Ze),{x:Is(t,"left","right"),y:Is(t,"top","bottom")}}function Is(t,e,n){return{min:Os(t,e),max:Os(t,n)}}function Os(t,e){return typeof t=="number"?t:t[e]||0}const ec=new WeakMap;class nc{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=k(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=e}start(e,{snapToCursor:n=!1,distanceThreshold:s}={}){const{presenceContext:i}=this.visualElement;if(i&&i.isPresent===!1)return;const r=h=>{n&&this.snapToCursor(Ot(h).point),this.stopAnimation()},o=(h,f)=>{const{drag:p,dragPropagation:d,onDragStart:m}=this.getProps();if(p&&!d&&(this.openDragLock&&this.openDragLock(),this.openDragLock=Ba(p),!this.openDragLock))return;this.latestPointerEvent=h,this.latestPanInfo=f,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),q(y=>{let x=this.getAxisMotionValue(y).get()||0;if(J.test(x)){const{projection:v}=this.visualElement;if(v&&v.layout){const w=v.layout.layoutBox[y];w&&(x=N(w)*(parseFloat(x)/100))}}this.originPoint[y]=x}),m&&M.update(()=>m(h,f),!1,!0),We(this.visualElement,"transform");const{animationState:g}=this.visualElement;g&&g.setActive("whileDrag",!0)},a=(h,f)=>{this.latestPointerEvent=h,this.latestPanInfo=f;const{dragPropagation:p,dragDirectionLock:d,onDirectionLock:m,onDrag:g}=this.getProps();if(!p&&!this.openDragLock)return;const{offset:y}=f;if(d&&this.currentDirection===null){this.currentDirection=ic(y),this.currentDirection!==null&&m&&m(this.currentDirection);return}this.updateAxis("x",f.point,y),this.updateAxis("y",f.point,y),this.visualElement.render(),g&&M.update(()=>g(h,f),!1,!0)},u=(h,f)=>{this.latestPointerEvent=h,this.latestPanInfo=f,this.stop(h,f),this.latestPointerEvent=null,this.latestPanInfo=null},l=()=>{const{dragSnapToOrigin:h}=this.getProps();(h||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:c}=this.getProps();this.panSession=new So(e,{onSessionStart:r,onStart:o,onMove:a,onSessionEnd:u,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:c,distanceThreshold:s,contextWindow:Po(this.visualElement),element:this.visualElement.current})}stop(e,n){const s=e||this.latestPointerEvent,i=n||this.latestPanInfo,r=this.isDragging;if(this.cancel(),!r||!i||!s)return;const{velocity:o}=i;this.startAnimation(o);const{onDragEnd:a}=this.getProps();a&&M.postRender(()=>a(s,i))}cancel(){this.isDragging=!1;const{projection:e,animationState:n}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.endPanSession();const{dragPropagation:s}=this.getProps();!s&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),n&&n.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(e,n,s){const{drag:i}=this.getProps();if(!s||!Wt(e,i,this.currentDirection))return;const r=this.getAxisMotionValue(e);let o=this.originPoint[e]+s[e];this.constraints&&this.constraints[e]&&(o=Yu(o,this.constraints[e],this.elastic[e])),r.set(o)}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&&mt(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):e&&s?this.constraints=qu(s.layoutBox,e):this.constraints=!1,this.elastic=tc(n),i!==this.constraints&&!mt(e)&&s&&this.constraints&&!this.hasMutatedConstraints&&q(r=>{this.constraints!==!1&&this.getAxisMotionValue(r)&&(this.constraints[r]=Qu(s.layoutBox[r],this.constraints[r]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:n}=this.getProps();if(!e||!mt(e))return!1;const s=e.current,{projection:i}=this.visualElement;if(!i||!i.layout)return!1;i.root&&(i.root.scroll=void 0,i.root.updateScroll());const r=ul(s,i.root,this.visualElement.getTransformPagePoint());let o=Zu(i.layout.layoutBox,r);if(n){const a=n(rl(o));this.hasMutatedConstraints=!!a,a&&(o=zi(a))}return o}startAnimation(e){const{drag:n,dragMomentum:s,dragElastic:i,dragTransition:r,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),u=this.constraints||{},l=q(c=>{if(!Wt(c,n,this.currentDirection))return;let h=u&&u[c]||{};(o===!0||o===c)&&(h={min:0,max:0});const f=i?200:1e6,p=i?40:1e7,d={type:"inertia",velocity:s?e[c]:0,bounceStiffness:f,bounceDamping:p,timeConstant:750,restDelta:1,restSpeed:10,...r,...h};return this.startAxisValueAnimation(c,d)});return Promise.all(l).then(a)}startAxisValueAnimation(e,n){const s=this.getAxisMotionValue(e);return We(this.visualElement,e),s.start(dn(e,s,0,n,this.visualElement,!1))}stopAnimation(){q(e=>this.getAxisMotionValue(e).stop())}getAxisMotionValue(e){const n=`_drag${e.toUpperCase()}`,i=this.visualElement.getProps()[n];return i||this.visualElement.getValue(e,this.visualElement.latestValues[e]??0)}snapToCursor(e){q(n=>{const{drag:s}=this.getProps();if(!Wt(n,s,this.currentDirection))return;const{projection:i}=this.visualElement,r=this.getAxisMotionValue(n);if(i&&i.layout){const{min:o,max:a}=i.layout.layoutBox[n],u=r.get()||0;r.set(e[n]-C(o,a,.5)+u)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:n}=this.getProps(),{projection:s}=this.visualElement;if(!mt(n)||!s||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};q(o=>{const a=this.getAxisMotionValue(o);if(a&&this.constraints!==!1){const u=a.get();i[o]=Ju({min:u,max:u},this.constraints[o])}});const{transformTemplate:r}=this.visualElement.getProps();this.visualElement.current.style.transform=r?r({},""):"none",s.root&&s.root.updateScroll(),s.updateLayout(),this.constraints=!1,this.resolveConstraints(),q(o=>{if(!Wt(o,e,null))return;const a=this.getAxisMotionValue(o),{min:u,max:l}=this.constraints[o];a.set(C(u,l,i[o]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;ec.set(this.visualElement,this);const e=this.visualElement.current,n=Dt(e,"pointerdown",l=>{const{drag:c,dragListener:h=!0}=this.getProps(),f=l.target,p=f!==e&&Ua(f);c&&h&&!p&&this.start(l)});let s;const i=()=>{const{dragConstraints:l}=this.getProps();mt(l)&&l.current&&(this.constraints=this.resolveRefConstraints(),s||(s=sc(e,l.current,()=>this.scalePositionWithinConstraints())))},{projection:r}=this.visualElement,o=r.addEventListener("measure",i);r&&!r.layout&&(r.root&&r.root.updateScroll(),r.updateLayout()),M.read(i);const a=kt(window,"resize",()=>this.scalePositionWithinConstraints()),u=r.addEventListener("didUpdate",(({delta:l,hasLayoutChanged:c})=>{this.isDragging&&c&&(q(h=>{const f=this.getAxisMotionValue(h);f&&(this.originPoint[h]+=l[h].translate,f.set(f.get()+l[h].translate))}),this.visualElement.render())}));return()=>{a(),n(),o(),u&&u(),s&&s()}}getProps(){const e=this.visualElement.getProps(),{drag:n=!1,dragDirectionLock:s=!1,dragPropagation:i=!1,dragConstraints:r=!1,dragElastic:o=Ze,dragMomentum:a=!0}=e;return{...e,drag:n,dragDirectionLock:s,dragPropagation:i,dragConstraints:r,dragElastic:o,dragMomentum:a}}}function js(t){let e=!0;return()=>{if(e){e=!1;return}t()}}function sc(t,e,n){const s=_n(t,js(n)),i=_n(e,js(n));return()=>{s(),i()}}function Wt(t,e,n){return(e===!0||e===t)&&(n===null||n===t)}function ic(t,e=10){let n=null;return Math.abs(t.y)>e?n="y":Math.abs(t.x)>e&&(n="x"),n}class oc extends ot{constructor(e){super(e),this.removeGroupControls=G,this.removeListeners=G,this.controls=new nc(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||G}update(){const{dragControls:e}=this.node.getProps(),{dragControls:n}=this.node.prevProps||{};e!==n&&(this.removeGroupControls(),e&&(this.removeGroupControls=e.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}const be=t=>(e,n)=>{t&&M.update(()=>t(e,n),!1,!0)};class rc extends ot{constructor(){super(...arguments),this.removePointerDownListener=G}onPointerDown(e){this.session=new So(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:Po(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:n,onPan:s,onPanEnd:i}=this.node.getProps();return{onSessionStart:be(e),onStart:be(n),onMove:be(s),onEnd:(r,o)=>{delete this.session,i&&M.postRender(()=>i(r,o))}}}mount(){this.removePointerDownListener=Dt(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}let Ae=!1;class ac extends P.Component{componentDidMount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:s,layoutId:i}=this.props,{projection:r}=e;r&&(n.group&&n.group.add(r),s&&s.register&&i&&s.register(r),Ae&&r.root.didUpdate(),r.addEventListener("animationComplete",()=>{this.safeToRemove()}),r.setOptions({...r.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),Yt.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:n,visualElement:s,drag:i,isPresent:r}=this.props,{projection:o}=s;return o&&(o.isPresent=r,e.layoutDependency!==n&&o.setOptions({...o.options,layoutDependency:n}),Ae=!0,i||e.layoutDependency!==n||n===void 0||e.isPresent!==r?o.willUpdate():this.safeToRemove(),e.isPresent!==r&&(r?o.promote():o.relegate()||M.postRender(()=>{const a=o.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{visualElement:e,layoutAnchor:n}=this.props,{projection:s}=e;s&&(s.options.layoutAnchor=n,s.root.didUpdate(),yn.postRender(()=>{!s.currentAnimation&&s.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:n,switchLayoutGroup:s}=this.props,{projection:i}=e;Ae=!0,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 Ao(t){const[e,n]=pu(),s=P.useContext(Ws);return Ce.jsx(ac,{...t,layoutGroup:s,switchLayoutGroup:P.useContext(To),isPresent:e,safeToRemove:n})}const lc={pan:{Feature:rc},drag:{Feature:oc,ProjectionNode:ho,MeasureLayout:Ao}};function Ns(t,e,n){const{props:s}=t;t.animationState&&s.whileHover&&t.animationState.setActive("whileHover",n==="Start");const i="onHover"+n,r=s[i];r&&M.postRender(()=>r(e,Ot(e)))}class uc extends ot{mount(){const{current:e}=this.node;e&&(this.unmount=Ia(e,(n,s)=>(Ns(this.node,s,"Start"),i=>Ns(this.node,i,"End"))))}unmount(){}}class cc extends ot{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=Bt(kt(this.node.current,"focus",()=>this.onFocus()),kt(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function Us(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),r=s[i];r&&M.postRender(()=>r(e,Ot(e)))}class hc extends ot{mount(){const{current:e}=this.node;if(!e)return;const{globalTapTarget:n,propagate:s}=this.node.props;this.unmount=Ka(e,(i,r)=>(Us(this.node,r,"Start"),(o,{success:a})=>Us(this.node,o,a?"End":"Cancel")),{useGlobalTarget:n,stopPropagation:s?.tap===!1})}unmount(){}}const Je=new WeakMap,Ve=new WeakMap,fc=t=>{const e=Je.get(t.target);e&&e(t)},dc=t=>{t.forEach(fc)};function pc({root:t,...e}){const n=t||document;Ve.has(n)||Ve.set(n,{});const s=Ve.get(n),i=JSON.stringify(e);return s[i]||(s[i]=new IntersectionObserver(dc,{root:t,...e})),s[i]}function mc(t,e,n){const s=pc(e);return Je.set(t,n),s.observe(t),()=>{Je.delete(t),s.unobserve(t)}}const gc={some:0,all:1};class yc extends ot{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.stopObserver?.();const{viewport:e={}}=this.node.getProps(),{root:n,margin:s,amount:i="some",once:r}=e,o={root:n?n.current:void 0,rootMargin:s,threshold:typeof i=="number"?i:gc[i]},a=u=>{const{isIntersecting:l}=u;if(this.isInView===l||(this.isInView=l,r&&!l&&this.hasEnteredView))return;l&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",l);const{onViewportEnter:c,onViewportLeave:h}=this.node.getProps(),f=l?c:h;f&&f(u)};this.stopObserver=mc(this.node.current,o,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:e,prevProps:n}=this.node;["amount","margin","root"].some(vc(e,n))&&this.startObserver()}unmount(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}}function vc({viewport:t={}},{viewport:e={}}={}){return n=>t[n]!==e[n]}const xc={inView:{Feature:yc},tap:{Feature:hc},focus:{Feature:cc},hover:{Feature:uc}},Tc={layout:{ProjectionNode:ho,MeasureLayout:Ao}},wc={...Gu,...xc,...lc,...Tc},Pc=Nu(wc,Uu),Vc=Pc;export{xn as A,Za as B,tl as C,Hl as D,Ri as E,Qt as F,ml as H,te as J,Ws as L,fo as M,Qe as P,wl as S,ol as V,ka as a,Do as b,pu as c,Sr as d,Tt as e,it as f,M as g,Ki as h,sl as i,Un as j,Fo as k,k as l,Vc as m,C as n,qt as o,$e as p,O as q,Ii as r,Ar as s,pr as t,Co as u,br as v,Ys as w,wi as x,W as y,Et as z};
|