From aa63fd91284d298621691b3b8b18e841523698a7 Mon Sep 17 00:00:00 2001 From: Ashutosh Kumar Date: Sat, 14 Nov 2026 23:42:08 +0800 Subject: [PATCH 1/2] site: Talk to us emails support, and Save name matches its field Enterprise's Talk to us pointed at /signup, which sends a signed-in reader straight back to the console; it now opens an email to support@floodwall.ai. The settings page's Save name button is the field's height. --- site/src/constants/pricing.ts | 5 +++-- site/src/pages/console/SettingsPage.tsx | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/site/src/constants/pricing.ts b/site/src/constants/pricing.ts index 70b1193..1d47e5e 100644 --- a/site/src/constants/pricing.ts +++ b/site/src/constants/pricing.ts @@ -2,7 +2,8 @@ // proposal for Floodwall Cloud; they live here so they change in one place. import { AUTH_PATHS } from "./auth"; -import { EARLY_ACCESS_URL, PRICING_PATH, REPO_URL } from "./links"; +import { CONTACT_EMAIL } from "./legal"; +import { PRICING_PATH, REPO_URL } from "./links"; export { PRICING_PATH }; @@ -89,7 +90,7 @@ export const PRICING_PLANS: PricingPlan[] = [ export const ENTERPRISE_PLAN = { name: "Enterprise", copy: "Support for self-hosted planes, compliance evidence, custom retention and contracts.", - cta: { label: "Talk to us", href: EARLY_ACCESS_URL }, + cta: { label: "Talk to us", href: `mailto:${CONTACT_EMAIL}?subject=${encodeURIComponent("Floodwall Enterprise")}` }, }; /** What every plan, self-hosted or not, gets from the crate itself. */ diff --git a/site/src/pages/console/SettingsPage.tsx b/site/src/pages/console/SettingsPage.tsx index 298ac99..7c69dbe 100644 --- a/site/src/pages/console/SettingsPage.tsx +++ b/site/src/pages/console/SettingsPage.tsx @@ -110,7 +110,7 @@ function NameForm({ initial, onSave }: { initial: string; onSave: (name: string) value={name} onChange={(e) => setName(e.target.value)} /> - + {saving ? COPY.savingName : COPY.saveName} From 9ea95cff0ffde62464d69ce2f2c0b90244d6ef08 Mon Sep 17 00:00:00 2001 From: Ashutosh Kumar Date: Sat, 14 Nov 2026 23:42:11 +0800 Subject: [PATCH 2/2] docs: rebuild the site --- docs/404.html | 2 +- .../{index-Dv7vxtV_.js => index-D9NEO0bJ.js} | 26 +++++++++---------- docs/index.html | 2 +- docs/pricing/index.html | 2 +- docs/privacy/index.html | 2 +- docs/refunds/index.html | 2 +- docs/terms/index.html | 2 +- 7 files changed, 19 insertions(+), 19 deletions(-) rename docs/assets/{index-Dv7vxtV_.js => index-D9NEO0bJ.js} (67%) diff --git a/docs/404.html b/docs/404.html index c8486e5..43194d1 100644 --- a/docs/404.html +++ b/docs/404.html @@ -33,7 +33,7 @@ - + diff --git a/docs/assets/index-Dv7vxtV_.js b/docs/assets/index-D9NEO0bJ.js similarity index 67% rename from docs/assets/index-Dv7vxtV_.js rename to docs/assets/index-D9NEO0bJ.js index 96e61cc..de53e87 100644 --- a/docs/assets/index-Dv7vxtV_.js +++ b/docs/assets/index-D9NEO0bJ.js @@ -1,15 +1,15 @@ -function dj(e,t){for(var i=0;ia[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))a(o);new MutationObserver(o=>{for(const c of o)if(c.type==="childList")for(const u of c.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&a(u)}).observe(document,{childList:!0,subtree:!0});function i(o){const c={};return o.integrity&&(c.integrity=o.integrity),o.referrerPolicy&&(c.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?c.credentials="include":o.crossOrigin==="anonymous"?c.credentials="omit":c.credentials="same-origin",c}function a(o){if(o.ep)return;o.ep=!0;const c=i(o);fetch(o.href,c)}})();function hj(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Xp={exports:{}},jc={};var bx;function mj(){if(bx)return jc;bx=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function i(a,o,c){var u=null;if(c!==void 0&&(u=""+c),o.key!==void 0&&(u=""+o.key),"key"in o){c={};for(var f in o)f!=="key"&&(c[f]=o[f])}else c=o;return o=c.ref,{$$typeof:e,type:a,key:u,ref:o!==void 0?o:null,props:c}}return jc.Fragment=t,jc.jsx=i,jc.jsxs=i,jc}var xx;function pj(){return xx||(xx=1,Xp.exports=mj()),Xp.exports}var h=pj(),Wp={exports:{}},at={};var wx;function gj(){if(wx)return at;wx=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),c=Symbol.for("react.consumer"),u=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),m=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),v=Symbol.for("react.activity"),w=Symbol.iterator;function x(M){return M===null||typeof M!="object"?null:(M=w&&M[w]||M["@@iterator"],typeof M=="function"?M:null)}var C={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},E=Object.assign,S={};function T(M,_,I){this.props=M,this.context=_,this.refs=S,this.updater=I||C}T.prototype.isReactComponent={},T.prototype.setState=function(M,_){if(typeof M!="object"&&typeof M!="function"&&M!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,M,_,"setState")},T.prototype.forceUpdate=function(M){this.updater.enqueueForceUpdate(this,M,"forceUpdate")};function j(){}j.prototype=T.prototype;function L(M,_,I){this.props=M,this.context=_,this.refs=S,this.updater=I||C}var N=L.prototype=new j;N.constructor=L,E(N,T.prototype),N.isPureReactComponent=!0;var O=Array.isArray;function P(){}var k={H:null,A:null,T:null,S:null},A=Object.prototype.hasOwnProperty;function H(M,_,I){var B=I.ref;return{$$typeof:e,type:M,key:_,ref:B!==void 0?B:null,props:I}}function Y(M,_){return H(M.type,_,M.props)}function Z(M){return typeof M=="object"&&M!==null&&M.$$typeof===e}function $(M){var _={"=":"=0",":":"=2"};return"$"+M.replace(/[=:]/g,function(I){return _[I]})}var K=/\/+/g;function ee(M,_){return typeof M=="object"&&M!==null&&M.key!=null?$(""+M.key):_.toString(36)}function re(M){switch(M.status){case"fulfilled":return M.value;case"rejected":throw M.reason;default:switch(typeof M.status=="string"?M.then(P,P):(M.status="pending",M.then(function(_){M.status==="pending"&&(M.status="fulfilled",M.value=_)},function(_){M.status==="pending"&&(M.status="rejected",M.reason=_)})),M.status){case"fulfilled":return M.value;case"rejected":throw M.reason}}throw M}function V(M,_,I,B,W){var ie=typeof M;(ie==="undefined"||ie==="boolean")&&(M=null);var fe=!1;if(M===null)fe=!0;else switch(ie){case"bigint":case"string":case"number":fe=!0;break;case"object":switch(M.$$typeof){case e:case t:fe=!0;break;case y:return fe=M._init,V(fe(M._payload),_,I,B,W)}}if(fe)return W=W(M),fe=B===""?"."+ee(M,0):B,O(W)?(I="",fe!=null&&(I=fe.replace(K,"$&/")+"/"),V(W,_,I,"",function(Ae){return Ae})):W!=null&&(Z(W)&&(W=Y(W,I+(W.key==null||M&&M.key===W.key?"":(""+W.key).replace(K,"$&/")+"/")+fe)),_.push(W)),1;fe=0;var pe=B===""?".":B+":";if(O(M))for(var ce=0;ce>>1,z=V[F];if(0>>1;Fo(I,Q))Bo(W,I)?(V[F]=W,V[B]=Q,F=B):(V[F]=I,V[_]=Q,F=_);else if(Bo(W,Q))V[F]=W,V[B]=Q,F=B;else break e}}return X}function o(V,X){var Q=V.sortIndex-X.sortIndex;return Q!==0?Q:V.id-X.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var c=performance;e.unstable_now=function(){return c.now()}}else{var u=Date,f=u.now();e.unstable_now=function(){return u.now()-f}}var d=[],m=[],y=1,v=null,w=3,x=!1,C=!1,E=!1,S=!1,T=typeof setTimeout=="function"?setTimeout:null,j=typeof clearTimeout=="function"?clearTimeout:null,L=typeof setImmediate<"u"?setImmediate:null;function N(V){for(var X=i(m);X!==null;){if(X.callback===null)a(m);else if(X.startTime<=V)a(m),X.sortIndex=X.expirationTime,t(d,X);else break;X=i(m)}}function O(V){if(E=!1,N(V),!C)if(i(d)!==null)C=!0,P||(P=!0,$());else{var X=i(m);X!==null&&re(O,X.startTime-V)}}var P=!1,k=-1,A=5,H=-1;function Y(){return S?!0:!(e.unstable_now()-HV&&Y());){var F=v.callback;if(typeof F=="function"){v.callback=null,w=v.priorityLevel;var z=F(v.expirationTime<=V);if(V=e.unstable_now(),typeof z=="function"){v.callback=z,N(V),X=!0;break t}v===i(d)&&a(d),N(V)}else a(d);v=i(d)}if(v!==null)X=!0;else{var M=i(m);M!==null&&re(O,M.startTime-V),X=!1}}break e}finally{v=null,w=Q,x=!1}X=void 0}}finally{X?$():P=!1}}}var $;if(typeof L=="function")$=function(){L(Z)};else if(typeof MessageChannel<"u"){var K=new MessageChannel,ee=K.port2;K.port1.onmessage=Z,$=function(){ee.postMessage(null)}}else $=function(){T(Z,0)};function re(V,X){k=T(function(){V(e.unstable_now())},X)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(V){V.callback=null},e.unstable_forceFrameRate=function(V){0>V||125F?(V.sortIndex=Q,t(m,V),i(d)===null&&V===i(m)&&(E?(j(k),k=-1):E=!0,re(O,Q-F))):(V.sortIndex=z,t(d,V),C||x||(C=!0,P||(P=!0,$()))),V},e.unstable_shouldYield=Y,e.unstable_wrapCallback=function(V){var X=w;return function(){var Q=w;w=X;try{return V.apply(this,arguments)}finally{w=Q}}}})(Jp)),Jp}var Ex;function bj(){return Ex||(Ex=1,Qp.exports=vj()),Qp.exports}var eg={exports:{}},hr={};var Rx;function xj(){if(Rx)return hr;Rx=1;var e=ju();function t(d){var m="https://react.dev/errors/"+d;if(1"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),eg.exports=xj(),eg.exports}var Ax;function wj(){if(Ax)return Mc;Ax=1;var e=bj(),t=ju(),i=EE();function a(n){var r="https://react.dev/errors/"+n;if(1z||(n.current=F[z],F[z]=null,z--)}function I(n,r){z++,F[z]=n.current,n.current=r}var B=M(null),W=M(null),ie=M(null),fe=M(null);function pe(n,r){switch(I(ie,r),I(W,n),I(B,null),r.nodeType){case 9:case 11:n=(n=r.documentElement)&&(n=n.namespaceURI)?H2(n):0;break;default:if(n=r.tagName,r=r.namespaceURI)r=H2(r),n=F2(r,n);else switch(n){case"svg":n=1;break;case"math":n=2;break;default:n=0}}_(B),I(B,n)}function ce(){_(B),_(W),_(ie)}function Ae(n){n.memoizedState!==null&&I(fe,n);var r=B.current,s=F2(r,n.type);r!==s&&(I(W,n),I(B,s))}function Le(n){W.current===n&&(_(B),_(W)),fe.current===n&&(_(fe),Ec._currentValue=Q)}var Se,Ee;function ye(n){if(Se===void 0)try{throw Error()}catch(s){var r=s.stack.trim().match(/\n( *(at )?)/);Se=r&&r[1]||"",Ee=-1a[o]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))a(o);new MutationObserver(o=>{for(const c of o)if(c.type==="childList")for(const u of c.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&a(u)}).observe(document,{childList:!0,subtree:!0});function i(o){const c={};return o.integrity&&(c.integrity=o.integrity),o.referrerPolicy&&(c.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?c.credentials="include":o.crossOrigin==="anonymous"?c.credentials="omit":c.credentials="same-origin",c}function a(o){if(o.ep)return;o.ep=!0;const c=i(o);fetch(o.href,c)}})();function mj(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Xp={exports:{}},jc={};var bx;function pj(){if(bx)return jc;bx=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function i(a,o,c){var u=null;if(c!==void 0&&(u=""+c),o.key!==void 0&&(u=""+o.key),"key"in o){c={};for(var f in o)f!=="key"&&(c[f]=o[f])}else c=o;return o=c.ref,{$$typeof:e,type:a,key:u,ref:o!==void 0?o:null,props:c}}return jc.Fragment=t,jc.jsx=i,jc.jsxs=i,jc}var xx;function gj(){return xx||(xx=1,Xp.exports=pj()),Xp.exports}var h=gj(),Wp={exports:{}},at={};var wx;function yj(){if(wx)return at;wx=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),c=Symbol.for("react.consumer"),u=Symbol.for("react.context"),f=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),m=Symbol.for("react.memo"),y=Symbol.for("react.lazy"),v=Symbol.for("react.activity"),w=Symbol.iterator;function x(M){return M===null||typeof M!="object"?null:(M=w&&M[w]||M["@@iterator"],typeof M=="function"?M:null)}var C={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},E=Object.assign,S={};function T(M,_,I){this.props=M,this.context=_,this.refs=S,this.updater=I||C}T.prototype.isReactComponent={},T.prototype.setState=function(M,_){if(typeof M!="object"&&typeof M!="function"&&M!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,M,_,"setState")},T.prototype.forceUpdate=function(M){this.updater.enqueueForceUpdate(this,M,"forceUpdate")};function j(){}j.prototype=T.prototype;function L(M,_,I){this.props=M,this.context=_,this.refs=S,this.updater=I||C}var N=L.prototype=new j;N.constructor=L,E(N,T.prototype),N.isPureReactComponent=!0;var O=Array.isArray;function P(){}var k={H:null,A:null,T:null,S:null},A=Object.prototype.hasOwnProperty;function H(M,_,I){var B=I.ref;return{$$typeof:e,type:M,key:_,ref:B!==void 0?B:null,props:I}}function Y(M,_){return H(M.type,_,M.props)}function Z(M){return typeof M=="object"&&M!==null&&M.$$typeof===e}function $(M){var _={"=":"=0",":":"=2"};return"$"+M.replace(/[=:]/g,function(I){return _[I]})}var K=/\/+/g;function ee(M,_){return typeof M=="object"&&M!==null&&M.key!=null?$(""+M.key):_.toString(36)}function re(M){switch(M.status){case"fulfilled":return M.value;case"rejected":throw M.reason;default:switch(typeof M.status=="string"?M.then(P,P):(M.status="pending",M.then(function(_){M.status==="pending"&&(M.status="fulfilled",M.value=_)},function(_){M.status==="pending"&&(M.status="rejected",M.reason=_)})),M.status){case"fulfilled":return M.value;case"rejected":throw M.reason}}throw M}function V(M,_,I,B,W){var ie=typeof M;(ie==="undefined"||ie==="boolean")&&(M=null);var fe=!1;if(M===null)fe=!0;else switch(ie){case"bigint":case"string":case"number":fe=!0;break;case"object":switch(M.$$typeof){case e:case t:fe=!0;break;case y:return fe=M._init,V(fe(M._payload),_,I,B,W)}}if(fe)return W=W(M),fe=B===""?"."+ee(M,0):B,O(W)?(I="",fe!=null&&(I=fe.replace(K,"$&/")+"/"),V(W,_,I,"",function(Ae){return Ae})):W!=null&&(Z(W)&&(W=Y(W,I+(W.key==null||M&&M.key===W.key?"":(""+W.key).replace(K,"$&/")+"/")+fe)),_.push(W)),1;fe=0;var pe=B===""?".":B+":";if(O(M))for(var ce=0;ce>>1,z=V[F];if(0>>1;Fo(I,Q))Bo(W,I)?(V[F]=W,V[B]=Q,F=B):(V[F]=I,V[_]=Q,F=_);else if(Bo(W,Q))V[F]=W,V[B]=Q,F=B;else break e}}return X}function o(V,X){var Q=V.sortIndex-X.sortIndex;return Q!==0?Q:V.id-X.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var c=performance;e.unstable_now=function(){return c.now()}}else{var u=Date,f=u.now();e.unstable_now=function(){return u.now()-f}}var d=[],m=[],y=1,v=null,w=3,x=!1,C=!1,E=!1,S=!1,T=typeof setTimeout=="function"?setTimeout:null,j=typeof clearTimeout=="function"?clearTimeout:null,L=typeof setImmediate<"u"?setImmediate:null;function N(V){for(var X=i(m);X!==null;){if(X.callback===null)a(m);else if(X.startTime<=V)a(m),X.sortIndex=X.expirationTime,t(d,X);else break;X=i(m)}}function O(V){if(E=!1,N(V),!C)if(i(d)!==null)C=!0,P||(P=!0,$());else{var X=i(m);X!==null&&re(O,X.startTime-V)}}var P=!1,k=-1,A=5,H=-1;function Y(){return S?!0:!(e.unstable_now()-HV&&Y());){var F=v.callback;if(typeof F=="function"){v.callback=null,w=v.priorityLevel;var z=F(v.expirationTime<=V);if(V=e.unstable_now(),typeof z=="function"){v.callback=z,N(V),X=!0;break t}v===i(d)&&a(d),N(V)}else a(d);v=i(d)}if(v!==null)X=!0;else{var M=i(m);M!==null&&re(O,M.startTime-V),X=!1}}break e}finally{v=null,w=Q,x=!1}X=void 0}}finally{X?$():P=!1}}}var $;if(typeof L=="function")$=function(){L(Z)};else if(typeof MessageChannel<"u"){var K=new MessageChannel,ee=K.port2;K.port1.onmessage=Z,$=function(){ee.postMessage(null)}}else $=function(){T(Z,0)};function re(V,X){k=T(function(){V(e.unstable_now())},X)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(V){V.callback=null},e.unstable_forceFrameRate=function(V){0>V||125F?(V.sortIndex=Q,t(m,V),i(d)===null&&V===i(m)&&(E?(j(k),k=-1):E=!0,re(O,Q-F))):(V.sortIndex=z,t(d,V),C||x||(C=!0,P||(P=!0,$()))),V},e.unstable_shouldYield=Y,e.unstable_wrapCallback=function(V){var X=w;return function(){var Q=w;w=X;try{return V.apply(this,arguments)}finally{w=Q}}}})(Jp)),Jp}var Ex;function xj(){return Ex||(Ex=1,Qp.exports=bj()),Qp.exports}var eg={exports:{}},hr={};var Rx;function wj(){if(Rx)return hr;Rx=1;var e=ju();function t(d){var m="https://react.dev/errors/"+d;if(1"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),eg.exports=wj(),eg.exports}var Ax;function Sj(){if(Ax)return Mc;Ax=1;var e=xj(),t=ju(),i=EE();function a(n){var r="https://react.dev/errors/"+n;if(1z||(n.current=F[z],F[z]=null,z--)}function I(n,r){z++,F[z]=n.current,n.current=r}var B=M(null),W=M(null),ie=M(null),fe=M(null);function pe(n,r){switch(I(ie,r),I(W,n),I(B,null),r.nodeType){case 9:case 11:n=(n=r.documentElement)&&(n=n.namespaceURI)?H2(n):0;break;default:if(n=r.tagName,r=r.namespaceURI)r=H2(r),n=F2(r,n);else switch(n){case"svg":n=1;break;case"math":n=2;break;default:n=0}}_(B),I(B,n)}function ce(){_(B),_(W),_(ie)}function Ae(n){n.memoizedState!==null&&I(fe,n);var r=B.current,s=F2(r,n.type);r!==s&&(I(W,n),I(B,s))}function Le(n){W.current===n&&(_(B),_(W)),fe.current===n&&(_(fe),Ec._currentValue=Q)}var Se,Ee;function ye(n){if(Se===void 0)try{throw Error()}catch(s){var r=s.stack.trim().match(/\n( *(at )?)/);Se=r&&r[1]||"",Ee=-1)":-1p||G[l]!==se[p]){var me=` `+G[l].replace(" at new "," at ");return n.displayName&&me.includes("")&&(me=me.replace("",n.displayName)),me}while(1<=l&&0<=p);break}}}finally{Pe=!1,Error.prepareStackTrace=s}return(s=n?n.displayName||n.name:"")?ye(s):""}function Je(n,r){switch(n.tag){case 26:case 27:case 5:return ye(n.type);case 16:return ye("Lazy");case 13:return n.child!==r&&r!==null?ye("Suspense Fallback"):ye("Suspense");case 19:return ye("SuspenseList");case 0:case 15:return Ge(n.type,!1);case 11:return Ge(n.type.render,!1);case 1:return Ge(n.type,!0);case 31:return ye("Activity");default:return""}}function rt(n){try{var r="",s=null;do r+=Je(n,s),s=n,n=n.return;while(n);return r}catch(l){return` Error generating stack: `+l.message+` -`+l.stack}}var Oe=Object.prototype.hasOwnProperty,Xe=e.unstable_scheduleCallback,je=e.unstable_cancelCallback,tt=e.unstable_shouldYield,Tt=e.unstable_requestPaint,st=e.unstable_now,ue=e.unstable_getCurrentPriorityLevel,be=e.unstable_ImmediatePriority,We=e.unstable_UserBlockingPriority,Te=e.unstable_NormalPriority,Ne=e.unstable_LowPriority,wt=e.unstable_IdlePriority,Pt=e.log,St=e.unstable_setDisableYieldValue,Dt=null,_t=null;function Gt(n){if(typeof Pt=="function"&&St(n),_t&&typeof _t.setStrictMode=="function")try{_t.setStrictMode(Dt,n)}catch{}}var qt=Math.clz32?Math.clz32:Kn,gn=Math.log,$n=Math.LN2;function Kn(n){return n>>>=0,n===0?32:31-(gn(n)/$n|0)|0}var xn=256,At=262144,dn=4194304;function zt(n){var r=n&42;if(r!==0)return r;switch(n&-n){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return n&261888;case 262144:case 524288:case 1048576:case 2097152:return n&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return n&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return n}}function On(n,r,s){var l=n.pendingLanes;if(l===0)return 0;var p=0,g=n.suspendedLanes,R=n.pingedLanes;n=n.warmLanes;var D=l&134217727;return D!==0?(l=D&~g,l!==0?p=zt(l):(R&=D,R!==0?p=zt(R):s||(s=D&~n,s!==0&&(p=zt(s))))):(D=l&~g,D!==0?p=zt(D):R!==0?p=zt(R):s||(s=l&~n,s!==0&&(p=zt(s)))),p===0?0:r!==0&&r!==p&&(r&g)===0&&(g=p&-p,s=r&-r,g>=s||g===32&&(s&4194048)!==0)?r:p}function Un(n,r){return(n.pendingLanes&~(n.suspendedLanes&~n.pingedLanes)&r)===0}function ft(n,r){switch(n){case 1:case 2:case 4:case 8:case 64:return r+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return r+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function ln(){var n=dn;return dn<<=1,(dn&62914560)===0&&(dn=4194304),n}function tn(n){for(var r=[],s=0;31>s;s++)r.push(n);return r}function It(n,r){n.pendingLanes|=r,r!==268435456&&(n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0)}function nn(n,r,s,l,p,g){var R=n.pendingLanes;n.pendingLanes=s,n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0,n.expiredLanes&=s,n.entangledLanes&=s,n.errorRecoveryDisabledLanes&=s,n.shellSuspendCounter=0;var D=n.entanglements,G=n.expirationTimes,se=n.hiddenUpdates;for(s=R&~s;0"u")return null;try{return n.activeElement||n.body}catch{return n.body}}var Ue=/[\n"\\]/g;function qe(n){return n.replace(Ue,function(r){return"\\"+r.charCodeAt(0).toString(16)+" "})}function et(n,r,s,l,p,g,R,D){n.name="",R!=null&&typeof R!="function"&&typeof R!="symbol"&&typeof R!="boolean"?n.type=R:n.removeAttribute("type"),r!=null?R==="number"?(r===0&&n.value===""||n.value!=r)&&(n.value=""+$t(r)):n.value!==""+$t(r)&&(n.value=""+$t(r)):R!=="submit"&&R!=="reset"||n.removeAttribute("value"),r!=null?cn(n,R,$t(r)):s!=null?cn(n,R,$t(s)):l!=null&&n.removeAttribute("value"),p==null&&g!=null&&(n.defaultChecked=!!g),p!=null&&(n.checked=p&&typeof p!="function"&&typeof p!="symbol"),D!=null&&typeof D!="function"&&typeof D!="symbol"&&typeof D!="boolean"?n.name=""+$t(D):n.removeAttribute("name")}function Nt(n,r,s,l,p,g,R,D){if(g!=null&&typeof g!="function"&&typeof g!="symbol"&&typeof g!="boolean"&&(n.type=g),r!=null||s!=null){if(!(g!=="submit"&&g!=="reset"||r!=null)){oe(n);return}s=s!=null?""+$t(s):"",r=r!=null?""+$t(r):s,D||r===n.value||(n.value=r),n.defaultValue=r}l=l??p,l=typeof l!="function"&&typeof l!="symbol"&&!!l,n.checked=D?n.checked:!!l,n.defaultChecked=!!l,R!=null&&typeof R!="function"&&typeof R!="symbol"&&typeof R!="boolean"&&(n.name=R),oe(n)}function cn(n,r,s){r==="number"&&xe(n.ownerDocument)===n||n.defaultValue===""+s||(n.defaultValue=""+s)}function kt(n,r,s,l){if(n=n.options,r){r={};for(var p=0;p"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Mr=!1;if(Ir)try{var Nr={};Object.defineProperty(Nr,"passive",{get:function(){Mr=!0}}),window.addEventListener("test",Nr,Nr),window.removeEventListener("test",Nr,Nr)}catch{Mr=!1}var wr=null,wo=null,Sr=null;function So(){if(Sr)return Sr;var n,r=wo,s=r.length,l,p="value"in wr?wr.value:wr.textContent,g=p.length;for(n=0;n=Gl),Xv=" ",Wv=!1;function Zv(n,r){switch(n){case"keyup":return LA.indexOf(r.keyCode)!==-1;case"keydown":return r.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Qv(n){return n=n.detail,typeof n=="object"&&"data"in n?n.data:null}var Co=!1;function _A(n,r){switch(n){case"compositionend":return Qv(r);case"keypress":return r.which!==32?null:(Wv=!0,Xv);case"textInput":return n=r.data,n===Xv&&Wv?null:n;default:return null}}function zA(n,r){if(Co)return n==="compositionend"||!tm&&Zv(n,r)?(n=So(),Sr=wo=wr=null,Co=!1,n):null;switch(n){case"paste":return null;case"keypress":if(!(r.ctrlKey||r.altKey||r.metaKey)||r.ctrlKey&&r.altKey){if(r.char&&1=r)return{node:s,offset:r-n};n=l}e:{for(;s;){if(s.nextSibling){s=s.nextSibling;break e}s=s.parentNode}s=void 0}s=s1(s)}}function l1(n,r){return n&&r?n===r?!0:n&&n.nodeType===3?!1:r&&r.nodeType===3?l1(n,r.parentNode):"contains"in n?n.contains(r):n.compareDocumentPosition?!!(n.compareDocumentPosition(r)&16):!1:!1}function c1(n){n=n!=null&&n.ownerDocument!=null&&n.ownerDocument.defaultView!=null?n.ownerDocument.defaultView:window;for(var r=xe(n.document);r instanceof n.HTMLIFrameElement;){try{var s=typeof r.contentWindow.location.href=="string"}catch{s=!1}if(s)n=r.contentWindow;else break;r=xe(n.document)}return r}function im(n){var r=n&&n.nodeName&&n.nodeName.toLowerCase();return r&&(r==="input"&&(n.type==="text"||n.type==="search"||n.type==="tel"||n.type==="url"||n.type==="password")||r==="textarea"||n.contentEditable==="true")}var GA=Ir&&"documentMode"in document&&11>=document.documentMode,Eo=null,am=null,Xl=null,sm=!1;function u1(n,r,s){var l=s.window===s?s.document:s.nodeType===9?s:s.ownerDocument;sm||Eo==null||Eo!==xe(l)||(l=Eo,"selectionStart"in l&&im(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focusNode:l.focusNode,focusOffset:l.focusOffset}),Xl&&Kl(Xl,l)||(Xl=l,l=Of(am,"onSelect"),0>=R,p-=R,Ki=1<<32-qt(r)+p|s<pt?(Mt=Ie,Ie=null):Mt=Ie.sibling;var Ut=le(ne,Ie,ae[pt],ve);if(Ut===null){Ie===null&&(Ie=Mt);break}n&&Ie&&Ut.alternate===null&&r(ne,Ie),J=g(Ut,J,pt),Vt===null?$e=Ut:Vt.sibling=Ut,Vt=Ut,Ie=Mt}if(pt===ae.length)return s(ne,Ie),Ot&&ba(ne,pt),$e;if(Ie===null){for(;ptpt?(Mt=Ie,Ie=null):Mt=Ie.sibling;var ys=le(ne,Ie,Ut.value,ve);if(ys===null){Ie===null&&(Ie=Mt);break}n&&Ie&&ys.alternate===null&&r(ne,Ie),J=g(ys,J,pt),Vt===null?$e=ys:Vt.sibling=ys,Vt=ys,Ie=Mt}if(Ut.done)return s(ne,Ie),Ot&&ba(ne,pt),$e;if(Ie===null){for(;!Ut.done;pt++,Ut=ae.next())Ut=we(ne,Ut.value,ve),Ut!==null&&(J=g(Ut,J,pt),Vt===null?$e=Ut:Vt.sibling=Ut,Vt=Ut);return Ot&&ba(ne,pt),$e}for(Ie=l(Ie);!Ut.done;pt++,Ut=ae.next())Ut=de(Ie,ne,pt,Ut.value,ve),Ut!==null&&(n&&Ut.alternate!==null&&Ie.delete(Ut.key===null?pt:Ut.key),J=g(Ut,J,pt),Vt===null?$e=Ut:Vt.sibling=Ut,Vt=Ut);return n&&Ie.forEach(function(fj){return r(ne,fj)}),Ot&&ba(ne,pt),$e}function Jt(ne,J,ae,ve){if(typeof ae=="object"&&ae!==null&&ae.type===E&&ae.key===null&&(ae=ae.props.children),typeof ae=="object"&&ae!==null){switch(ae.$$typeof){case x:e:{for(var $e=ae.key;J!==null;){if(J.key===$e){if($e=ae.type,$e===E){if(J.tag===7){s(ne,J.sibling),ve=p(J,ae.props.children),ve.return=ne,ne=ve;break e}}else if(J.elementType===$e||typeof $e=="object"&&$e!==null&&$e.$$typeof===A&&qs($e)===J.type){s(ne,J.sibling),ve=p(J,ae.props),tc(ve,ae),ve.return=ne,ne=ve;break e}s(ne,J);break}else r(ne,J);J=J.sibling}ae.type===E?(ve=Bs(ae.props.children,ne.mode,ve,ae.key),ve.return=ne,ne=ve):(ve=Ku(ae.type,ae.key,ae.props,null,ne.mode,ve),tc(ve,ae),ve.return=ne,ne=ve)}return R(ne);case C:e:{for($e=ae.key;J!==null;){if(J.key===$e)if(J.tag===4&&J.stateNode.containerInfo===ae.containerInfo&&J.stateNode.implementation===ae.implementation){s(ne,J.sibling),ve=p(J,ae.children||[]),ve.return=ne,ne=ve;break e}else{s(ne,J);break}else r(ne,J);J=J.sibling}ve=hm(ae,ne.mode,ve),ve.return=ne,ne=ve}return R(ne);case A:return ae=qs(ae),Jt(ne,J,ae,ve)}if(re(ae))return ze(ne,J,ae,ve);if($(ae)){if($e=$(ae),typeof $e!="function")throw Error(a(150));return ae=$e.call(ae),Qe(ne,J,ae,ve)}if(typeof ae.then=="function")return Jt(ne,J,tf(ae),ve);if(ae.$$typeof===L)return Jt(ne,J,Zu(ne,ae),ve);nf(ne,ae)}return typeof ae=="string"&&ae!==""||typeof ae=="number"||typeof ae=="bigint"?(ae=""+ae,J!==null&&J.tag===6?(s(ne,J.sibling),ve=p(J,ae),ve.return=ne,ne=ve):(s(ne,J),ve=dm(ae,ne.mode,ve),ve.return=ne,ne=ve),R(ne)):s(ne,J)}return function(ne,J,ae,ve){try{ec=0;var $e=Jt(ne,J,ae,ve);return Po=null,$e}catch(Ie){if(Ie===Lo||Ie===Ju)throw Ie;var Vt=Gr(29,Ie,null,ne.mode);return Vt.lanes=ve,Vt.return=ne,Vt}}}var Ks=D1(!0),L1=D1(!1),es=!1;function Rm(n){n.updateQueue={baseState:n.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Tm(n,r){n=n.updateQueue,r.updateQueue===n&&(r.updateQueue={baseState:n.baseState,firstBaseUpdate:n.firstBaseUpdate,lastBaseUpdate:n.lastBaseUpdate,shared:n.shared,callbacks:null})}function ts(n){return{lane:n,tag:0,payload:null,callback:null,next:null}}function ns(n,r,s){var l=n.updateQueue;if(l===null)return null;if(l=l.shared,(Bt&2)!==0){var p=l.pending;return p===null?r.next=r:(r.next=p.next,p.next=r),l.pending=r,r=$u(n),y1(n,null,s),r}return qu(n,l,r,s),$u(n)}function nc(n,r,s){if(r=r.updateQueue,r!==null&&(r=r.shared,(s&4194048)!==0)){var l=r.lanes;l&=n.pendingLanes,s|=l,r.lanes=s,Xn(n,s)}}function Am(n,r){var s=n.updateQueue,l=n.alternate;if(l!==null&&(l=l.updateQueue,s===l)){var p=null,g=null;if(s=s.firstBaseUpdate,s!==null){do{var R={lane:s.lane,tag:s.tag,payload:s.payload,callback:null,next:null};g===null?p=g=R:g=g.next=R,s=s.next}while(s!==null);g===null?p=g=r:g=g.next=r}else p=g=r;s={baseState:l.baseState,firstBaseUpdate:p,lastBaseUpdate:g,shared:l.shared,callbacks:l.callbacks},n.updateQueue=s;return}n=s.lastBaseUpdate,n===null?s.firstBaseUpdate=r:n.next=r,s.lastBaseUpdate=r}var jm=!1;function rc(){if(jm){var n=Do;if(n!==null)throw n}}function ic(n,r,s,l){jm=!1;var p=n.updateQueue;es=!1;var g=p.firstBaseUpdate,R=p.lastBaseUpdate,D=p.shared.pending;if(D!==null){p.shared.pending=null;var G=D,se=G.next;G.next=null,R===null?g=se:R.next=se,R=G;var me=n.alternate;me!==null&&(me=me.updateQueue,D=me.lastBaseUpdate,D!==R&&(D===null?me.firstBaseUpdate=se:D.next=se,me.lastBaseUpdate=G))}if(g!==null){var we=p.baseState;R=0,me=se=G=null,D=g;do{var le=D.lane&-536870913,de=le!==D.lane;if(de?(jt&le)===le:(l&le)===le){le!==0&&le===Oo&&(jm=!0),me!==null&&(me=me.next={lane:0,tag:D.tag,payload:D.payload,callback:null,next:null});e:{var ze=n,Qe=D;le=r;var Jt=s;switch(Qe.tag){case 1:if(ze=Qe.payload,typeof ze=="function"){we=ze.call(Jt,we,le);break e}we=ze;break e;case 3:ze.flags=ze.flags&-65537|128;case 0:if(ze=Qe.payload,le=typeof ze=="function"?ze.call(Jt,we,le):ze,le==null)break e;we=v({},we,le);break e;case 2:es=!0}}le=D.callback,le!==null&&(n.flags|=64,de&&(n.flags|=8192),de=p.callbacks,de===null?p.callbacks=[le]:de.push(le))}else de={lane:le,tag:D.tag,payload:D.payload,callback:D.callback,next:null},me===null?(se=me=de,G=we):me=me.next=de,R|=le;if(D=D.next,D===null){if(D=p.shared.pending,D===null)break;de=D,D=de.next,de.next=null,p.lastBaseUpdate=de,p.shared.pending=null}}while(!0);me===null&&(G=we),p.baseState=G,p.firstBaseUpdate=se,p.lastBaseUpdate=me,g===null&&(p.shared.lanes=0),os|=R,n.lanes=R,n.memoizedState=we}}function P1(n,r){if(typeof n!="function")throw Error(a(191,n));n.call(r)}function _1(n,r){var s=n.callbacks;if(s!==null)for(n.callbacks=null,n=0;ng?g:8;var R=V.T,D={};V.T=D,$m(n,!1,r,s);try{var G=p(),se=V.S;if(se!==null&&se(D,G),G!==null&&typeof G=="object"&&typeof G.then=="function"){var me=e4(G,l);oc(n,r,me,Wr(n))}else oc(n,r,l,Wr(n))}catch(we){oc(n,r,{then:function(){},status:"rejected",reason:we},Wr())}finally{X.p=g,R!==null&&D.types!==null&&(R.types=D.types),V.T=R}}function s4(){}function Gm(n,r,s,l){if(n.tag!==5)throw Error(a(476));var p=mb(n).queue;hb(n,p,r,Q,s===null?s4:function(){return pb(n),s(l)})}function mb(n){var r=n.memoizedState;if(r!==null)return r;r={memoizedState:Q,baseState:Q,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ca,lastRenderedState:Q},next:null};var s={};return r.next={memoizedState:s,baseState:s,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ca,lastRenderedState:s},next:null},n.memoizedState=r,n=n.alternate,n!==null&&(n.memoizedState=r),r}function pb(n){var r=mb(n);r.next===null&&(r=n.alternate.memoizedState),oc(n,r.next.queue,{},Wr())}function qm(){return ir(Ec)}function gb(){return Mn().memoizedState}function yb(){return Mn().memoizedState}function o4(n){for(var r=n.return;r!==null;){switch(r.tag){case 24:case 3:var s=Wr();n=ts(s);var l=ns(r,n,s);l!==null&&(Pr(l,r,s),nc(l,r,s)),r={cache:wm()},n.payload=r;return}r=r.return}}function l4(n,r,s){var l=Wr();s={lane:l,revertLane:0,gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},hf(n)?bb(r,s):(s=um(n,r,s,l),s!==null&&(Pr(s,n,l),xb(s,r,l)))}function vb(n,r,s){var l=Wr();oc(n,r,s,l)}function oc(n,r,s,l){var p={lane:l,revertLane:0,gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null};if(hf(n))bb(r,p);else{var g=n.alternate;if(n.lanes===0&&(g===null||g.lanes===0)&&(g=r.lastRenderedReducer,g!==null))try{var R=r.lastRenderedState,D=g(R,s);if(p.hasEagerState=!0,p.eagerState=D,Yr(D,R))return qu(n,r,p,0),rn===null&&Gu(),!1}catch{}if(s=um(n,r,p,l),s!==null)return Pr(s,n,l),xb(s,r,l),!0}return!1}function $m(n,r,s,l){if(l={lane:2,revertLane:Rp(),gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},hf(n)){if(r)throw Error(a(479))}else r=um(n,s,l,2),r!==null&&Pr(r,n,2)}function hf(n){var r=n.alternate;return n===ct||r!==null&&r===ct}function bb(n,r){zo=sf=!0;var s=n.pending;s===null?r.next=r:(r.next=s.next,s.next=r),n.pending=r}function xb(n,r,s){if((s&4194048)!==0){var l=r.lanes;l&=n.pendingLanes,s|=l,r.lanes=s,Xn(n,s)}}var lc={readContext:ir,use:cf,useCallback:wn,useContext:wn,useEffect:wn,useImperativeHandle:wn,useLayoutEffect:wn,useInsertionEffect:wn,useMemo:wn,useReducer:wn,useRef:wn,useState:wn,useDebugValue:wn,useDeferredValue:wn,useTransition:wn,useSyncExternalStore:wn,useId:wn,useHostTransitionStatus:wn,useFormState:wn,useActionState:wn,useOptimistic:wn,useMemoCache:wn,useCacheRefresh:wn};lc.useEffectEvent=wn;var wb={readContext:ir,use:cf,useCallback:function(n,r){return Er().memoizedState=[n,r===void 0?null:r],n},useContext:ir,useEffect:ib,useImperativeHandle:function(n,r,s){s=s!=null?s.concat([n]):null,ff(4194308,4,lb.bind(null,r,n),s)},useLayoutEffect:function(n,r){return ff(4194308,4,n,r)},useInsertionEffect:function(n,r){ff(4,2,n,r)},useMemo:function(n,r){var s=Er();r=r===void 0?null:r;var l=n();if(Xs){Gt(!0);try{n()}finally{Gt(!1)}}return s.memoizedState=[l,r],l},useReducer:function(n,r,s){var l=Er();if(s!==void 0){var p=s(r);if(Xs){Gt(!0);try{s(r)}finally{Gt(!1)}}}else p=r;return l.memoizedState=l.baseState=p,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:n,lastRenderedState:p},l.queue=n,n=n.dispatch=l4.bind(null,ct,n),[l.memoizedState,n]},useRef:function(n){var r=Er();return n={current:n},r.memoizedState=n},useState:function(n){n=Im(n);var r=n.queue,s=vb.bind(null,ct,r);return r.dispatch=s,[n.memoizedState,s]},useDebugValue:Fm,useDeferredValue:function(n,r){var s=Er();return Ym(s,n,r)},useTransition:function(){var n=Im(!1);return n=hb.bind(null,ct,n.queue,!0,!1),Er().memoizedState=n,[!1,n]},useSyncExternalStore:function(n,r,s){var l=ct,p=Er();if(Ot){if(s===void 0)throw Error(a(407));s=s()}else{if(s=r(),rn===null)throw Error(a(349));(jt&127)!==0||H1(l,r,s)}p.memoizedState=s;var g={value:s,getSnapshot:r};return p.queue=g,ib(Y1.bind(null,l,g,n),[n]),l.flags|=2048,Uo(9,{destroy:void 0},F1.bind(null,l,g,s,r),null),s},useId:function(){var n=Er(),r=rn.identifierPrefix;if(Ot){var s=Xi,l=Ki;s=(l&~(1<<32-qt(l)-1)).toString(32)+s,r="_"+r+"R_"+s,s=of++,0<\/script>",g=g.removeChild(g.firstChild);break;case"select":g=typeof l.is=="string"?R.createElement("select",{is:l.is}):R.createElement("select"),l.multiple?g.multiple=!0:l.size&&(g.size=l.size);break;default:g=typeof l.is=="string"?R.createElement(p,{is:l.is}):R.createElement(p)}}g[Re]=r,g[Me]=l;e:for(R=r.child;R!==null;){if(R.tag===5||R.tag===6)g.appendChild(R.stateNode);else if(R.tag!==4&&R.tag!==27&&R.child!==null){R.child.return=R,R=R.child;continue}if(R===r)break e;for(;R.sibling===null;){if(R.return===null||R.return===r)break e;R=R.return}R.sibling.return=R.return,R=R.sibling}r.stateNode=g;e:switch(sr(g,p,l),p){case"button":case"input":case"select":case"textarea":l=!!l.autoFocus;break e;case"img":l=!0;break e;default:l=!1}l&&Ra(r)}}return fn(r),op(r,r.type,n===null?null:n.memoizedProps,r.pendingProps,s),null;case 6:if(n&&r.stateNode!=null)n.memoizedProps!==l&&Ra(r);else{if(typeof l!="string"&&r.stateNode===null)throw Error(a(166));if(n=ie.current,No(r)){if(n=r.stateNode,s=r.memoizedProps,l=null,p=rr,p!==null)switch(p.tag){case 27:case 5:l=p.memoizedProps}n[Re]=r,n=!!(n.nodeValue===s||l!==null&&l.suppressHydrationWarning===!0||I2(n.nodeValue,s)),n||Qa(r,!0)}else n=Df(n).createTextNode(l),n[Re]=r,r.stateNode=n}return fn(r),null;case 31:if(s=r.memoizedState,n===null||n.memoizedState!==null){if(l=No(r),s!==null){if(n===null){if(!l)throw Error(a(318));if(n=r.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(a(557));n[Re]=r}else Hs(),(r.flags&128)===0&&(r.memoizedState=null),r.flags|=4;fn(r),n=!1}else s=ym(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=s),n=!0;if(!n)return r.flags&256?($r(r),r):($r(r),null);if((r.flags&128)!==0)throw Error(a(558))}return fn(r),null;case 13:if(l=r.memoizedState,n===null||n.memoizedState!==null&&n.memoizedState.dehydrated!==null){if(p=No(r),l!==null&&l.dehydrated!==null){if(n===null){if(!p)throw Error(a(318));if(p=r.memoizedState,p=p!==null?p.dehydrated:null,!p)throw Error(a(317));p[Re]=r}else Hs(),(r.flags&128)===0&&(r.memoizedState=null),r.flags|=4;fn(r),p=!1}else p=ym(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=p),p=!0;if(!p)return r.flags&256?($r(r),r):($r(r),null)}return $r(r),(r.flags&128)!==0?(r.lanes=s,r):(s=l!==null,n=n!==null&&n.memoizedState!==null,s&&(l=r.child,p=null,l.alternate!==null&&l.alternate.memoizedState!==null&&l.alternate.memoizedState.cachePool!==null&&(p=l.alternate.memoizedState.cachePool.pool),g=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(g=l.memoizedState.cachePool.pool),g!==p&&(l.flags|=2048)),s!==n&&s&&(r.child.flags|=8192),vf(r,r.updateQueue),fn(r),null);case 4:return ce(),n===null&&Mp(r.stateNode.containerInfo),fn(r),null;case 10:return wa(r.type),fn(r),null;case 19:if(_(jn),l=r.memoizedState,l===null)return fn(r),null;if(p=(r.flags&128)!==0,g=l.rendering,g===null)if(p)uc(l,!1);else{if(Sn!==0||n!==null&&(n.flags&128)!==0)for(n=r.child;n!==null;){if(g=af(n),g!==null){for(r.flags|=128,uc(l,!1),n=g.updateQueue,r.updateQueue=n,vf(r,n),r.subtreeFlags=0,n=s,s=r.child;s!==null;)v1(s,n),s=s.sibling;return I(jn,jn.current&1|2),Ot&&ba(r,l.treeForkCount),r.child}n=n.sibling}l.tail!==null&&st()>Cf&&(r.flags|=128,p=!0,uc(l,!1),r.lanes=4194304)}else{if(!p)if(n=af(g),n!==null){if(r.flags|=128,p=!0,n=n.updateQueue,r.updateQueue=n,vf(r,n),uc(l,!0),l.tail===null&&l.tailMode==="hidden"&&!g.alternate&&!Ot)return fn(r),null}else 2*st()-l.renderingStartTime>Cf&&s!==536870912&&(r.flags|=128,p=!0,uc(l,!1),r.lanes=4194304);l.isBackwards?(g.sibling=r.child,r.child=g):(n=l.last,n!==null?n.sibling=g:r.child=g,l.last=g)}return l.tail!==null?(n=l.tail,l.rendering=n,l.tail=n.sibling,l.renderingStartTime=st(),n.sibling=null,s=jn.current,I(jn,p?s&1|2:s&1),Ot&&ba(r,l.treeForkCount),n):(fn(r),null);case 22:case 23:return $r(r),Nm(),l=r.memoizedState!==null,n!==null?n.memoizedState!==null!==l&&(r.flags|=8192):l&&(r.flags|=8192),l?(s&536870912)!==0&&(r.flags&128)===0&&(fn(r),r.subtreeFlags&6&&(r.flags|=8192)):fn(r),s=r.updateQueue,s!==null&&vf(r,s.retryQueue),s=null,n!==null&&n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(s=n.memoizedState.cachePool.pool),l=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(l=r.memoizedState.cachePool.pool),l!==s&&(r.flags|=2048),n!==null&&_(Gs),null;case 24:return s=null,n!==null&&(s=n.memoizedState.cache),r.memoizedState.cache!==s&&(r.flags|=2048),wa(Ln),fn(r),null;case 25:return null;case 30:return null}throw Error(a(156,r.tag))}function h4(n,r){switch(pm(r),r.tag){case 1:return n=r.flags,n&65536?(r.flags=n&-65537|128,r):null;case 3:return wa(Ln),ce(),n=r.flags,(n&65536)!==0&&(n&128)===0?(r.flags=n&-65537|128,r):null;case 26:case 27:case 5:return Le(r),null;case 31:if(r.memoizedState!==null){if($r(r),r.alternate===null)throw Error(a(340));Hs()}return n=r.flags,n&65536?(r.flags=n&-65537|128,r):null;case 13:if($r(r),n=r.memoizedState,n!==null&&n.dehydrated!==null){if(r.alternate===null)throw Error(a(340));Hs()}return n=r.flags,n&65536?(r.flags=n&-65537|128,r):null;case 19:return _(jn),null;case 4:return ce(),null;case 10:return wa(r.type),null;case 22:case 23:return $r(r),Nm(),n!==null&&_(Gs),n=r.flags,n&65536?(r.flags=n&-65537|128,r):null;case 24:return wa(Ln),null;case 25:return null;default:return null}}function Gb(n,r){switch(pm(r),r.tag){case 3:wa(Ln),ce();break;case 26:case 27:case 5:Le(r);break;case 4:ce();break;case 31:r.memoizedState!==null&&$r(r);break;case 13:$r(r);break;case 19:_(jn);break;case 10:wa(r.type);break;case 22:case 23:$r(r),Nm(),n!==null&&_(Gs);break;case 24:wa(Ln)}}function fc(n,r){try{var s=r.updateQueue,l=s!==null?s.lastEffect:null;if(l!==null){var p=l.next;s=p;do{if((s.tag&n)===n){l=void 0;var g=s.create,R=s.inst;l=g(),R.destroy=l}s=s.next}while(s!==p)}}catch(D){Xt(r,r.return,D)}}function as(n,r,s){try{var l=r.updateQueue,p=l!==null?l.lastEffect:null;if(p!==null){var g=p.next;l=g;do{if((l.tag&n)===n){var R=l.inst,D=R.destroy;if(D!==void 0){R.destroy=void 0,p=r;var G=s,se=D;try{se()}catch(me){Xt(p,G,me)}}}l=l.next}while(l!==g)}}catch(me){Xt(r,r.return,me)}}function qb(n){var r=n.updateQueue;if(r!==null){var s=n.stateNode;try{_1(r,s)}catch(l){Xt(n,n.return,l)}}}function $b(n,r,s){s.props=Ws(n.type,n.memoizedProps),s.state=n.memoizedState;try{s.componentWillUnmount()}catch(l){Xt(n,r,l)}}function dc(n,r){try{var s=n.ref;if(s!==null){switch(n.tag){case 26:case 27:case 5:var l=n.stateNode;break;case 30:l=n.stateNode;break;default:l=n.stateNode}typeof s=="function"?n.refCleanup=s(l):s.current=l}}catch(p){Xt(n,r,p)}}function Wi(n,r){var s=n.ref,l=n.refCleanup;if(s!==null)if(typeof l=="function")try{l()}catch(p){Xt(n,r,p)}finally{n.refCleanup=null,n=n.alternate,n!=null&&(n.refCleanup=null)}else if(typeof s=="function")try{s(null)}catch(p){Xt(n,r,p)}else s.current=null}function Kb(n){var r=n.type,s=n.memoizedProps,l=n.stateNode;try{e:switch(r){case"button":case"input":case"select":case"textarea":s.autoFocus&&l.focus();break e;case"img":s.src?l.src=s.src:s.srcSet&&(l.srcset=s.srcSet)}}catch(p){Xt(n,n.return,p)}}function lp(n,r,s){try{var l=n.stateNode;P4(l,n.type,s,r),l[Me]=r}catch(p){Xt(n,n.return,p)}}function Xb(n){return n.tag===5||n.tag===3||n.tag===26||n.tag===27&&ds(n.type)||n.tag===4}function cp(n){e:for(;;){for(;n.sibling===null;){if(n.return===null||Xb(n.return))return null;n=n.return}for(n.sibling.return=n.return,n=n.sibling;n.tag!==5&&n.tag!==6&&n.tag!==18;){if(n.tag===27&&ds(n.type)||n.flags&2||n.child===null||n.tag===4)continue e;n.child.return=n,n=n.child}if(!(n.flags&2))return n.stateNode}}function up(n,r,s){var l=n.tag;if(l===5||l===6)n=n.stateNode,r?(s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s).insertBefore(n,r):(r=s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s,r.appendChild(n),s=s._reactRootContainer,s!=null||r.onclick!==null||(r.onclick=Vr));else if(l!==4&&(l===27&&ds(n.type)&&(s=n.stateNode,r=null),n=n.child,n!==null))for(up(n,r,s),n=n.sibling;n!==null;)up(n,r,s),n=n.sibling}function bf(n,r,s){var l=n.tag;if(l===5||l===6)n=n.stateNode,r?s.insertBefore(n,r):s.appendChild(n);else if(l!==4&&(l===27&&ds(n.type)&&(s=n.stateNode),n=n.child,n!==null))for(bf(n,r,s),n=n.sibling;n!==null;)bf(n,r,s),n=n.sibling}function Wb(n){var r=n.stateNode,s=n.memoizedProps;try{for(var l=n.type,p=r.attributes;p.length;)r.removeAttributeNode(p[0]);sr(r,l,s),r[Re]=n,r[Me]=s}catch(g){Xt(n,n.return,g)}}var Ta=!1,zn=!1,fp=!1,Zb=typeof WeakSet=="function"?WeakSet:Set,Zn=null;function m4(n,r){if(n=n.containerInfo,Op=If,n=c1(n),im(n)){if("selectionStart"in n)var s={start:n.selectionStart,end:n.selectionEnd};else e:{s=(s=n.ownerDocument)&&s.defaultView||window;var l=s.getSelection&&s.getSelection();if(l&&l.rangeCount!==0){s=l.anchorNode;var p=l.anchorOffset,g=l.focusNode;l=l.focusOffset;try{s.nodeType,g.nodeType}catch{s=null;break e}var R=0,D=-1,G=-1,se=0,me=0,we=n,le=null;t:for(;;){for(var de;we!==s||p!==0&&we.nodeType!==3||(D=R+p),we!==g||l!==0&&we.nodeType!==3||(G=R+l),we.nodeType===3&&(R+=we.nodeValue.length),(de=we.firstChild)!==null;)le=we,we=de;for(;;){if(we===n)break t;if(le===s&&++se===p&&(D=R),le===g&&++me===l&&(G=R),(de=we.nextSibling)!==null)break;we=le,le=we.parentNode}we=de}s=D===-1||G===-1?null:{start:D,end:G}}else s=null}s=s||{start:0,end:0}}else s=null;for(Dp={focusedElem:n,selectionRange:s},If=!1,Zn=r;Zn!==null;)if(r=Zn,n=r.child,(r.subtreeFlags&1028)!==0&&n!==null)n.return=r,Zn=n;else for(;Zn!==null;){switch(r=Zn,g=r.alternate,n=r.flags,r.tag){case 0:if((n&4)!==0&&(n=r.updateQueue,n=n!==null?n.events:null,n!==null))for(s=0;s title"))),sr(g,l,s),g[Re]=n,ot(g),l=g;break e;case"link":var R=rx("link","href",p).get(l+(s.href||""));if(R){for(var D=0;DJt&&(R=Jt,Jt=Qe,Qe=R);var ne=o1(D,Qe),J=o1(D,Jt);if(ne&&J&&(de.rangeCount!==1||de.anchorNode!==ne.node||de.anchorOffset!==ne.offset||de.focusNode!==J.node||de.focusOffset!==J.offset)){var ae=we.createRange();ae.setStart(ne.node,ne.offset),de.removeAllRanges(),Qe>Jt?(de.addRange(ae),de.extend(J.node,J.offset)):(ae.setEnd(J.node,J.offset),de.addRange(ae))}}}}for(we=[],de=D;de=de.parentNode;)de.nodeType===1&&we.push({element:de,left:de.scrollLeft,top:de.scrollTop});for(typeof D.focus=="function"&&D.focus(),D=0;Ds?32:s,V.T=null,s=vp,vp=null;var g=cs,R=ka;if(Yn=0,Yo=cs=null,ka=0,(Bt&6)!==0)throw Error(a(331));var D=Bt;if(Bt|=4,l2(g.current),a2(g,g.current,R,s),Bt=D,vc(0,!1),_t&&typeof _t.onPostCommitFiberRoot=="function")try{_t.onPostCommitFiberRoot(Dt,g)}catch{}return!0}finally{X.p=p,V.T=l,T2(n,r)}}function j2(n,r,s){r=ci(s,r),r=Zm(n.stateNode,r,2),n=ns(n,r,2),n!==null&&(It(n,2),Zi(n))}function Xt(n,r,s){if(n.tag===3)j2(n,n,s);else for(;r!==null;){if(r.tag===3){j2(r,n,s);break}else if(r.tag===1){var l=r.stateNode;if(typeof r.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(ls===null||!ls.has(l))){n=ci(s,n),s=Mb(2),l=ns(r,s,2),l!==null&&(Nb(s,l,r,n),It(l,2),Zi(l));break}}r=r.return}}function Sp(n,r,s){var l=n.pingCache;if(l===null){l=n.pingCache=new y4;var p=new Set;l.set(r,p)}else p=l.get(r),p===void 0&&(p=new Set,l.set(r,p));p.has(s)||(mp=!0,p.add(s),n=S4.bind(null,n,r,s),r.then(n,n))}function S4(n,r,s){var l=n.pingCache;l!==null&&l.delete(r),n.pingedLanes|=n.suspendedLanes&s,n.warmLanes&=~s,rn===n&&(jt&s)===s&&(Sn===4||Sn===3&&(jt&62914560)===jt&&300>st()-Sf?(Bt&2)===0&&Go(n,0):pp|=s,Fo===jt&&(Fo=0)),Zi(n)}function M2(n,r){r===0&&(r=ln()),n=Is(n,r),n!==null&&(It(n,r),Zi(n))}function C4(n){var r=n.memoizedState,s=0;r!==null&&(s=r.retryLane),M2(n,s)}function E4(n,r){var s=0;switch(n.tag){case 31:case 13:var l=n.stateNode,p=n.memoizedState;p!==null&&(s=p.retryLane);break;case 19:l=n.stateNode;break;case 22:l=n.stateNode._retryCache;break;default:throw Error(a(314))}l!==null&&l.delete(r),M2(n,s)}function R4(n,r){return Xe(n,r)}var Mf=null,$o=null,Cp=!1,Nf=!1,Ep=!1,fs=0;function Zi(n){n!==$o&&n.next===null&&($o===null?Mf=$o=n:$o=$o.next=n),Nf=!0,Cp||(Cp=!0,A4())}function vc(n,r){if(!Ep&&Nf){Ep=!0;do for(var s=!1,l=Mf;l!==null;){if(n!==0){var p=l.pendingLanes;if(p===0)var g=0;else{var R=l.suspendedLanes,D=l.pingedLanes;g=(1<<31-qt(42|n)+1)-1,g&=p&~(R&~D),g=g&201326741?g&201326741|1:g?g|2:0}g!==0&&(s=!0,D2(l,g))}else g=jt,g=On(l,l===rn?g:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),(g&3)===0||Un(l,g)||(s=!0,D2(l,g));l=l.next}while(s);Ep=!1}}function T4(){N2()}function N2(){Nf=Cp=!1;var n=0;fs!==0&&z4()&&(n=fs);for(var r=st(),s=null,l=Mf;l!==null;){var p=l.next,g=k2(l,r);g===0?(l.next=null,s===null?Mf=p:s.next=p,p===null&&($o=s)):(s=l,(n!==0||(g&3)!==0)&&(Nf=!0)),l=p}Yn!==0&&Yn!==5||vc(n),fs!==0&&(fs=0)}function k2(n,r){for(var s=n.suspendedLanes,l=n.pingedLanes,p=n.expirationTimes,g=n.pendingLanes&-62914561;0D)break;var me=G.transferSize,we=G.initiatorType;me&&B2(we)&&(G=G.responseEnd,R+=me*(G"u"?null:document;function J2(n,r,s){var l=Ko;if(l&&typeof r=="string"&&r){var p=qe(r);p='link[rel="'+n+'"][href="'+p+'"]',typeof s=="string"&&(p+='[crossorigin="'+s+'"]'),Q2.has(p)||(Q2.add(p),n={rel:n,crossOrigin:s,href:r},l.querySelector(p)===null&&(r=l.createElement("link"),sr(r,"link",n),ot(r),l.head.appendChild(r)))}}function q4(n){Oa.D(n),J2("dns-prefetch",n,null)}function $4(n,r){Oa.C(n,r),J2("preconnect",n,r)}function K4(n,r,s){Oa.L(n,r,s);var l=Ko;if(l&&n&&r){var p='link[rel="preload"][as="'+qe(r)+'"]';r==="image"&&s&&s.imageSrcSet?(p+='[imagesrcset="'+qe(s.imageSrcSet)+'"]',typeof s.imageSizes=="string"&&(p+='[imagesizes="'+qe(s.imageSizes)+'"]')):p+='[href="'+qe(n)+'"]';var g=p;switch(r){case"style":g=Xo(n);break;case"script":g=Wo(n)}pi.has(g)||(n=v({rel:"preload",href:r==="image"&&s&&s.imageSrcSet?void 0:n,as:r},s),pi.set(g,n),l.querySelector(p)!==null||r==="style"&&l.querySelector(Sc(g))||r==="script"&&l.querySelector(Cc(g))||(r=l.createElement("link"),sr(r,"link",n),ot(r),l.head.appendChild(r)))}}function X4(n,r){Oa.m(n,r);var s=Ko;if(s&&n){var l=r&&typeof r.as=="string"?r.as:"script",p='link[rel="modulepreload"][as="'+qe(l)+'"][href="'+qe(n)+'"]',g=p;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":g=Wo(n)}if(!pi.has(g)&&(n=v({rel:"modulepreload",href:n},r),pi.set(g,n),s.querySelector(p)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(s.querySelector(Cc(g)))return}l=s.createElement("link"),sr(l,"link",n),ot(l),s.head.appendChild(l)}}}function W4(n,r,s){Oa.S(n,r,s);var l=Ko;if(l&&n){var p=Yt(l).hoistableStyles,g=Xo(n);r=r||"default";var R=p.get(g);if(!R){var D={loading:0,preload:null};if(R=l.querySelector(Sc(g)))D.loading=5;else{n=v({rel:"stylesheet",href:n,"data-precedence":r},s),(s=pi.get(g))&&Ip(n,s);var G=R=l.createElement("link");ot(G),sr(G,"link",n),G._p=new Promise(function(se,me){G.onload=se,G.onerror=me}),G.addEventListener("load",function(){D.loading|=1}),G.addEventListener("error",function(){D.loading|=2}),D.loading|=4,Pf(R,r,l)}R={type:"stylesheet",instance:R,count:1,state:D},p.set(g,R)}}}function Z4(n,r){Oa.X(n,r);var s=Ko;if(s&&n){var l=Yt(s).hoistableScripts,p=Wo(n),g=l.get(p);g||(g=s.querySelector(Cc(p)),g||(n=v({src:n,async:!0},r),(r=pi.get(p))&&Bp(n,r),g=s.createElement("script"),ot(g),sr(g,"link",n),s.head.appendChild(g)),g={type:"script",instance:g,count:1,state:null},l.set(p,g))}}function Q4(n,r){Oa.M(n,r);var s=Ko;if(s&&n){var l=Yt(s).hoistableScripts,p=Wo(n),g=l.get(p);g||(g=s.querySelector(Cc(p)),g||(n=v({src:n,async:!0,type:"module"},r),(r=pi.get(p))&&Bp(n,r),g=s.createElement("script"),ot(g),sr(g,"link",n),s.head.appendChild(g)),g={type:"script",instance:g,count:1,state:null},l.set(p,g))}}function ex(n,r,s,l){var p=(p=ie.current)?Lf(p):null;if(!p)throw Error(a(446));switch(n){case"meta":case"title":return null;case"style":return typeof s.precedence=="string"&&typeof s.href=="string"?(r=Xo(s.href),s=Yt(p).hoistableStyles,l=s.get(r),l||(l={type:"style",instance:null,count:0,state:null},s.set(r,l)),l):{type:"void",instance:null,count:0,state:null};case"link":if(s.rel==="stylesheet"&&typeof s.href=="string"&&typeof s.precedence=="string"){n=Xo(s.href);var g=Yt(p).hoistableStyles,R=g.get(n);if(R||(p=p.ownerDocument||p,R={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},g.set(n,R),(g=p.querySelector(Sc(n)))&&!g._p&&(R.instance=g,R.state.loading=5),pi.has(n)||(s={rel:"preload",as:"style",href:s.href,crossOrigin:s.crossOrigin,integrity:s.integrity,media:s.media,hrefLang:s.hrefLang,referrerPolicy:s.referrerPolicy},pi.set(n,s),g||J4(p,n,s,R.state))),r&&l===null)throw Error(a(528,""));return R}if(r&&l!==null)throw Error(a(529,""));return null;case"script":return r=s.async,s=s.src,typeof s=="string"&&r&&typeof r!="function"&&typeof r!="symbol"?(r=Wo(s),s=Yt(p).hoistableScripts,l=s.get(r),l||(l={type:"script",instance:null,count:0,state:null},s.set(r,l)),l):{type:"void",instance:null,count:0,state:null};default:throw Error(a(444,n))}}function Xo(n){return'href="'+qe(n)+'"'}function Sc(n){return'link[rel="stylesheet"]['+n+"]"}function tx(n){return v({},n,{"data-precedence":n.precedence,precedence:null})}function J4(n,r,s,l){n.querySelector('link[rel="preload"][as="style"]['+r+"]")?l.loading=1:(r=n.createElement("link"),l.preload=r,r.addEventListener("load",function(){return l.loading|=1}),r.addEventListener("error",function(){return l.loading|=2}),sr(r,"link",s),ot(r),n.head.appendChild(r))}function Wo(n){return'[src="'+qe(n)+'"]'}function Cc(n){return"script[async]"+n}function nx(n,r,s){if(r.count++,r.instance===null)switch(r.type){case"style":var l=n.querySelector('style[data-href~="'+qe(s.href)+'"]');if(l)return r.instance=l,ot(l),l;var p=v({},s,{"data-href":s.href,"data-precedence":s.precedence,href:null,precedence:null});return l=(n.ownerDocument||n).createElement("style"),ot(l),sr(l,"style",p),Pf(l,s.precedence,n),r.instance=l;case"stylesheet":p=Xo(s.href);var g=n.querySelector(Sc(p));if(g)return r.state.loading|=4,r.instance=g,ot(g),g;l=tx(s),(p=pi.get(p))&&Ip(l,p),g=(n.ownerDocument||n).createElement("link"),ot(g);var R=g;return R._p=new Promise(function(D,G){R.onload=D,R.onerror=G}),sr(g,"link",l),r.state.loading|=4,Pf(g,s.precedence,n),r.instance=g;case"script":return g=Wo(s.src),(p=n.querySelector(Cc(g)))?(r.instance=p,ot(p),p):(l=s,(p=pi.get(g))&&(l=v({},s),Bp(l,p)),n=n.ownerDocument||n,p=n.createElement("script"),ot(p),sr(p,"link",l),n.head.appendChild(p),r.instance=p);case"void":return null;default:throw Error(a(443,r.type))}else r.type==="stylesheet"&&(r.state.loading&4)===0&&(l=r.instance,r.state.loading|=4,Pf(l,s.precedence,n));return r.instance}function Pf(n,r,s){for(var l=s.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),p=l.length?l[l.length-1]:null,g=p,R=0;R title"):null)}function ej(n,r,s){if(s===1||r.itemProp!=null)return!1;switch(n){case"meta":case"title":return!0;case"style":if(typeof r.precedence!="string"||typeof r.href!="string"||r.href==="")break;return!0;case"link":if(typeof r.rel!="string"||typeof r.href!="string"||r.href===""||r.onLoad||r.onError)break;return r.rel==="stylesheet"?(n=r.disabled,typeof r.precedence=="string"&&n==null):!0;case"script":if(r.async&&typeof r.async!="function"&&typeof r.async!="symbol"&&!r.onLoad&&!r.onError&&r.src&&typeof r.src=="string")return!0}return!1}function ax(n){return!(n.type==="stylesheet"&&(n.state.loading&3)===0)}function tj(n,r,s,l){if(s.type==="stylesheet"&&(typeof l.media!="string"||matchMedia(l.media).matches!==!1)&&(s.state.loading&4)===0){if(s.instance===null){var p=Xo(l.href),g=r.querySelector(Sc(p));if(g){r=g._p,r!==null&&typeof r=="object"&&typeof r.then=="function"&&(n.count++,n=zf.bind(n),r.then(n,n)),s.state.loading|=4,s.instance=g,ot(g);return}g=r.ownerDocument||r,l=tx(l),(p=pi.get(p))&&Ip(l,p),g=g.createElement("link"),ot(g);var R=g;R._p=new Promise(function(D,G){R.onload=D,R.onerror=G}),sr(g,"link",l),s.instance=g}n.stylesheets===null&&(n.stylesheets=new Map),n.stylesheets.set(s,r),(r=s.state.preload)&&(s.state.loading&3)===0&&(n.count++,s=zf.bind(n),r.addEventListener("load",s),r.addEventListener("error",s))}}var Hp=0;function nj(n,r){return n.stylesheets&&n.count===0&&Uf(n,n.stylesheets),0Hp?50:800)+r);return n.unsuspend=s,function(){n.unsuspend=null,clearTimeout(l),clearTimeout(p)}}:null}function zf(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Uf(this,this.stylesheets);else if(this.unsuspend){var n=this.unsuspend;this.unsuspend=null,n()}}}var Vf=null;function Uf(n,r){n.stylesheets=null,n.unsuspend!==null&&(n.count++,Vf=new Map,r.forEach(rj,n),Vf=null,zf.call(n))}function rj(n,r){if(!(r.state.loading&4)){var s=Vf.get(n);if(s)var l=s.get(null);else{s=new Map,Vf.set(n,s);for(var p=n.querySelectorAll("link[data-precedence],style[data-precedence]"),g=0;g"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),Zp.exports=wj(),Zp.exports}var Mx=Sj();const uy=b.createContext({});function Mu(e){const t=b.useRef(null);return t.current===null&&(t.current=e()),t.current}const Cj=typeof window<"u",su=Cj?b.useLayoutEffect:b.useEffect,gh=b.createContext(null);function fy(e,t){e.indexOf(t)===-1&&e.push(t)}function Vd(e,t){const i=e.indexOf(t);i>-1&&e.splice(i,1)}const Ba=(e,t,i)=>i>t?t:i/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),RE=e=>typeof e=="object"&&e!==null,hy=e=>/^0[^.\s]+$/u.test(e);function Ej(e){let t;return()=>(t===void 0&&(t=e()),t)}const Bi=e=>e,Sl=(...e)=>e.reduce((t,i)=>a=>i(t(a))),ho=(e,t,i)=>{const a=t-e;return a?(i-e)/a:1};class Ud{constructor(){this.subscriptions=[]}add(t){return fy(this.subscriptions,t),()=>this.remove(t)}remove(t){Vd(this.subscriptions,t)}notify(t,i,a){const o=this.subscriptions.length;if(o)if(o===1)this.subscriptions[0](t,i,a);else for(let c=0;ce*1e3,ei=e=>e/1e3,TE=(e,t)=>t?e*(1e3/t):0,tg=(e,t,i)=>e*(3*(1-e)*((1-e)*t+e*i)+e*e);function Nu(e,t,i,a){return e===t&&i===a?Bi:o=>{let c=0,u=1,f=o;for(let d=0;;d++){f>=c&&f<=u||(f=(c+u)/2);const m=tg(f,e,i)-o;if(m*m<1e-28||d===40)break;m>0?u=f:c=f,f-=m*1e-7/(tg(f+1e-7,e,i)-o-m)}return tg(f,t,a)}}const AE=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,jE=e=>t=>1-e(1-t),ME=Nu(.33,1.53,.69,.99),my=jE(ME),NE=AE(my),kE=e=>e>=1?1:(e*=2)<1?.5*my(e):.5*(2-Math.pow(2,-10*(e-1))),py=e=>1-Math.sin(Math.acos(e)),OE=jE(py),DE=AE(py),Rj=Nu(.42,0,1,1),Tj=Nu(0,0,.58,1),gy=Nu(.42,0,.58,1),LE=e=>Array.isArray(e)&&typeof e[0]!="number",yy=e=>Array.isArray(e)&&typeof e[0]=="number",Aj={linear:Bi,easeIn:Rj,easeInOut:gy,easeOut:Tj,circIn:py,circInOut:DE,circOut:OE,backIn:my,backInOut:NE,backOut:ME,anticipate:kE},jj=e=>typeof e=="string",o0=e=>{if(yy(e)){const[t,i,a,o]=e;return Nu(t,i,a,o)}else if(jj(e))return Aj[e];return e},Nn={delta:0,timestamp:0,isProcessing:!1};let yd;function Mj(){yd=void 0}const Ht={now:()=>(yd===void 0&&Ht.set(Nn.isProcessing||Gi.useManualTiming?Nn.timestamp:performance.now()),yd),set:e=>{yd=e,queueMicrotask(Mj)}},dl=e=>Math.round(e*1e5)/1e5,PE=e=>t=>typeof t=="string"&&t.startsWith(e),_E=PE("--"),Nj=PE("var(--"),yh=e=>Nj(e)?kj.test(e.split("/*")[0].trim()):!1,kj=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function ng(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const _l={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},ou={..._l,transform:e=>Ba(0,1,e)},$f={..._l,default:1},vy=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Oj(e){return e==null}const Dj=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,by=(e,t)=>i=>!!(typeof i=="string"&&Dj.test(i)&&i.startsWith(e)||t&&!Oj(i)&&Object.prototype.hasOwnProperty.call(i,t)),zE=(e,t,i)=>a=>{if(typeof a!="string")return a;const[o,c,u,f]=a.match(vy);return{[e]:parseFloat(o),[t]:parseFloat(c),[i]:parseFloat(u),alpha:f!==void 0?parseFloat(f):1}},Lj=e=>Ba(0,255,e),rg={..._l,transform:e=>Math.round(Lj(e))},io={test:by("rgb","red"),parse:zE("red","green","blue"),transform:({red:e,green:t,blue:i,alpha:a=1})=>"rgba("+rg.transform(e)+", "+rg.transform(t)+", "+rg.transform(i)+", "+dl(ou.transform(a))+")"},Kf=(e,t,i)=>{const a=e.substring(1+t*i,1+(t+1)*i);return i>1?a:a+a};function Pj(e){const t=e.length>5?2:1,i=Kf(e,3,t);return{red:parseInt(Kf(e,0,t),16),green:parseInt(Kf(e,1,t),16),blue:parseInt(Kf(e,2,t),16),alpha:i?parseInt(i,16)/255:1}}const l0={test:by("#"),parse:Pj,transform:io.transform},ku=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Da=ku("deg"),sa=ku("%"),Ve=ku("px"),_j=ku("vh"),zj=ku("vw"),Nx={...sa,parse:e=>sa.parse(e)/100,transform:e=>sa.transform(e*100)},al={test:by("hsl","hue"),parse:zE("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:i,alpha:a=1})=>"hsla("+Math.round(e)+", "+sa.transform(dl(t))+", "+sa.transform(dl(i))+", "+dl(ou.transform(a))+")"},qn={test:e=>io.test(e)||l0.test(e)||al.test(e),parse:e=>io.test(e)?io.parse(e):al.test(e)?al.parse(e):l0.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?io.transform(e):al.transform(e),getAnimatableNone:e=>{const t=qn.parse(e);return t.alpha=0,qn.transform(t)}},Vj=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,VE=new RegExp(vy.source),UE=new RegExp(Vj.source,"i");function Uj(e){return isNaN(e)&&typeof e=="string"&&(VE.test(e)||UE.test(e))}const IE="number",BE="color",Ij="var",Bj="var(",kx="${}",Hj=/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+)(?![a-z]*\()/giu;function Fj(e){const t=e.toString();return VE.test(t)||UE.test(t)}function lu(e){const t=e.toString(),i=[],a={color:[],number:[],var:[]},o=[];let c=0;const f=t.replace(Hj,d=>(qn.test(d)?(a.color.push(c),o.push(BE),i.push(qn.parse(d))):d.startsWith(Bj)?(a.var.push(c),o.push(Ij),i.push(d)):(a.number.push(c),o.push(IE),i.push(parseFloat(d))),++c,kx)).split(kx);return{values:i,split:f,indexes:a,types:o}}function Yj(e){return lu(e).values}function xy({split:e,types:t}){const i=e.length;return a=>{let o="";for(let c=0;ctypeof e=="number"?0:qn.test(e)?qn.getAnimatableNone(e):e,$j=(e,t)=>typeof e=="number"?t?.trim().endsWith("/")?e:0:qj(e);function Kj(e){const t=lu(e);return xy(t)(t.values.map((a,o)=>$j(a,t.split[o])))}const bi={test:Uj,parse:Yj,createTransformer:Gj,getAnimatableNone:Kj};function ig(e,t,i){return i<0&&(i+=1),i>1&&(i-=1),i<1/6?e+(t-e)*6*i:i<1/2?t:i<2/3?e+(t-e)*(2/3-i)*6:e}function Xj({hue:e,saturation:t,lightness:i,alpha:a}){e/=360,t/=100,i/=100;let o=0,c=0,u=0;if(!t)o=c=u=i;else{const f=i<.5?i*(1+t):i+t-i*t,d=2*i-f;o=ig(d,f,e+1/3),c=ig(d,f,e),u=ig(d,f,e-1/3)}return{red:Math.round(o*255),green:Math.round(c*255),blue:Math.round(u*255),alpha:a}}function Id(e,t){return i=>i>0?t:e}const sn=(e,t,i)=>e+(t-e)*i,ag=(e,t,i)=>{const a=e*e,o=i*(t*t-a)+a;return o<0?0:Math.sqrt(o)},Wj=[l0,io,al],Zj=e=>Wj.find(t=>t.test(e));function Ox(e){const t=Zj(e);if(!t)return!1;let i=t.parse(e);return t===al&&(i=Xj(i)),i}const Dx=(e,t)=>{const i=Ox(e),a=Ox(t);if(!i||!a)return Id(e,t);const o={...i};return c=>(o.red=ag(i.red,a.red,c),o.green=ag(i.green,a.green,c),o.blue=ag(i.blue,a.blue,c),o.alpha=sn(i.alpha,a.alpha,c),io.transform(o))},c0=new Set(["none","hidden"]);function Qj(e,t){return c0.has(e)?i=>i<=0?e:t:i=>i>=1?t:e}function Jj(e,t){return i=>sn(e,t,i)}function wy(e){return typeof e=="number"?Jj:typeof e=="string"?yh(e)?Id:qn.test(e)?Dx:nM:Array.isArray(e)?HE:typeof e=="object"?qn.test(e)?Dx:eM:Id}function HE(e,t){const i=[...e],a=i.length,o=e.map((c,u)=>wy(c)(c,t[u]));return c=>{for(let u=0;u{for(const c in a)i[c]=a[c](o);return i}}function tM(e,t){const i=[],a={color:0,var:0,number:0};for(let o=0;o{const i=lu(e),a=lu(t);return i.indexes.var.length===a.indexes.var.length&&i.indexes.color.length===a.indexes.color.length&&i.indexes.number.length>=a.indexes.number.length?c0.has(e)&&!a.values.length||c0.has(t)&&!i.values.length?Qj(e,t):Sl(HE(tM(i,a),a.values),xy(a)):Id(e,t)},Lx=/^(-?(?:\d+(?:\.\d*)?|\.\d+))([a-z%]*)$/iu;function rM(e,t){const i=Lx.exec(e);if(!i)return;const a=Lx.exec(t);if(!a||i[2]!==a[2])return;const o=i[2],c=parseFloat(i[1]),u=parseFloat(a[1]);return f=>dl(sn(c,u,f))+o}function Sy(e,t,i){if(typeof e=="number"&&typeof t=="number"&&typeof i=="number")return sn(e,t,i);if(typeof e=="string"&&typeof t=="string"){const o=rM(e,t);if(o)return o}return wy(e)(e,t)}const Xf=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function iM(e){let t=new Set,i=new Set,a=!1,o=!1,c;const u=new Set;let f={delta:0,timestamp:0,isProcessing:!1};function d(y){u.has(y)&&(i.add(y),e()),(c=y)(f)}const m={schedule:(y,v=!1,w=!1)=>{const x=w&&a,C=x?t:i;return v&&u.add(y),x&&y!==c&&C.delete(y),C.add(y),y},cancel:y=>{i.delete(y),u.delete(y)},process:y=>{if(f=y,a){o=!0;return}a=!0;const v=t;t=i,i=v,t.forEach(d),t.clear(),c=void 0,a=!1,o&&(o=!1,m.process(y))}};return m}const aM=40;function FE(e,t,i={delta:0,timestamp:0,isProcessing:!1}){let a=!1,o=!0;const c=()=>a=!0,u=Xf.reduce((L,N)=>(L[N]=iM(c),L),{}),{setup:f,read:d,resolveKeyframes:m,preUpdate:y,update:v,preRender:w,render:x,postRender:C}=u,E=()=>{const L=Gi.useManualTiming,N=L?i.timestamp:performance.now();a=!1,L||(i.delta=o?1e3/60:Math.max(Math.min(N-i.timestamp,aM),1)),i.timestamp=N,i.isProcessing=!0,f.process(i),d.process(i),m.process(i),y.process(i),v.process(i),w.process(i),x.process(i),C.process(i),i.isProcessing=!1,a&&t&&(o=!1,e(E))},S=()=>{a=!0,o=!0,i.isProcessing||e(E)};return{schedule:Xf.reduce((L,N)=>{const O=u[N];return L[N]=(P,k=!1,A=!1)=>(a||S(),O.schedule(P,k,A)),L},{}),cancel:L=>{for(let N=0;N{const t=({timestamp:i})=>e(i);return{start:(i=!0)=>Wt.update(t,i),stop:()=>Jr(t),now:()=>Nn.isProcessing?Nn.timestamp:Ht.now()}},YE=(e,t,i=10)=>{let a="";const o=Math.max(Math.round(t/i),2);for(let c=0;c=i?1/0:o}function sM(e,t=100,i){const{keyframes:a,velocity:o}=e,c=a&&a[a.length-1]-a[0],u=i({...e,velocity:o&&c?o*t/c:o,keyframes:[0,t]}),f=Math.min(Ry(u),Ey);return{type:"keyframes",ease:d=>u.next(f*d).value/t,duration:ei(f)}}const Px=100,_x=10,oM=1,lM=800,GE=.3,cM=.3,uM=.01,fM=2,dM=.005,hM=.5,mM=.01,pM=10,zx=.05,qE=e=>e<0?1/Math.max(1+e,zx):Math.max(1-e,zx);function $E(e,t){if(!(e>1))return 1;const i=Math.sqrt(e*e-1),a=e-i,o=e+i,c=2*i*Math.exp(-t)*(1+t);return KE(u=>o*Math.exp(-a*u)-a*Math.exp(-o*u)-c,u=>Math.exp(-o*u)-Math.exp(-a*u),t)/t}function u0(e,t){return e*Math.sqrt(1-t*t)}const gM=12;function KE(e,t,i){let a=i;for(let o=1;o{const y=m*o,v=y*e,w=u0(m,o),x=Math.exp(-v);return og-y/w*x},a=m=>{const v=m*o*e,w=o*o*m*m*e,x=Math.exp(-v),C=u0(m*m,o);return(-i(m)+og>0?-1:1)*-w*x/C}):(i=m=>{const y=Math.exp(-m*e),v=m*e+1;return-og+y*v},a=m=>{const y=Math.exp(-m*e),v=-m*(e*e);return y*v});const c=5/e,u=KE(i,a,c),f=u*$E(o,u*e),d=f*f;return{stiffness:d,damping:o*2*Math.sqrt(d),duration:Tr(e)}}const f0=(e,t)=>(t?e>=0:e>0)&&e<1/0;function lg(e,t){if(f0(e,t))return e}function vM(e){const t=lg(e.stiffness),i=lg(e.damping,!0),a=lg(e.mass),o={...e,stiffness:t??Px,damping:i??_x,mass:a??oM,isResolvedFromDuration:!1,isTimeDefined:(t??i??a)===void 0&&(e.duration!==void 0||e.bounce!==void 0)};if(o.isTimeDefined){if(e.visualDuration){const c=qE(e.bounce||0),u=2*Math.PI/(e.visualDuration*1.2)*$E(c,2*Math.PI/1.2);o.stiffness=u*u,o.damping=2*c*Math.sqrt(o.stiffness)}else Object.assign(o,yM(o)),o.isResolvedFromDuration=!0;(!f0(o.stiffness)||!f0(o.damping,!0))&&(o.stiffness=Px,o.damping=_x)}return o}function Vx(e=cM,t=GE){const i=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e,a=i.keyframes[0],o=i.keyframes[i.keyframes.length-1],c={done:!1,value:a},{stiffness:u,damping:f,mass:d,duration:m,isResolvedFromDuration:y,isTimeDefined:v}=vM({...i}),w=k=>v?0:-ei(k),x=f/(2*Math.sqrt(u*d)),C=ei(Math.sqrt(u/d)),E=x*C,S={target:o,delta:o-a,velocity:w(i.velocity||0)||0,restSpeed:0,restDelta:0},T=()=>{const k=Math.abs(S.delta)<5;S.restSpeed=i.restSpeed||(k?uM:fM),S.restDelta=i.restDelta||(k?dM:hM)};T();let j,L,N;if(x<1){const k=u0(C,x),A={A:0,sinC:0,cosC:0,t:-1,env:0,sin:0,cos:0};N=()=>{A.A=(S.velocity+E*S.delta)/k,A.sinC=E*A.A+S.delta*k,A.cosC=E*S.delta-A.A*k};const H=Y=>{Y!==A.t&&(A.t=Y,A.env=Math.exp(-E*Y),A.sin=Math.sin(k*Y),A.cos=Math.cos(k*Y))};j=Y=>(H(Y),S.target-A.env*(A.A*A.sin+S.delta*A.cos)),L=Y=>(H(Y),A.env*(A.sinC*A.sin+A.cosC*A.cos))}else if(x===1){j=A=>S.target-Math.exp(-C*A)*(S.delta+(S.velocity+C*S.delta)*A);const k={C:0};N=()=>{k.C=S.velocity+C*S.delta},L=A=>Math.exp(-C*A)*(C*k.C*A-S.velocity)}else{const k=C*Math.sqrt(x*x-1),A=E-k,H=E+k,Y=k<1||v?1/0:300/k,Z=(K,ee)=>Math.exp(ee>Y?(E-K)*Y-E*ee:-K*ee),$={S:0,F:0};N=()=>{const K=(S.velocity+E*S.delta)/k;$.S=(S.delta+K)/2,$.F=(S.delta-K)/2},j=K=>S.target-$.S*Z(A,K)-$.F*Z(H,K),L=K=>A*$.S*Z(A,K)+H*$.F*Z(H,K)}N();const O=y&&m||null,P={calculatedDuration:O,retarget:(k,A)=>{S.target=k[k.length-1],S.delta=S.target-k[0],S.velocity=w(A),i.restSpeed&&i.restDelta||T(),P.calculatedDuration=O,c.done=!1,N()},velocity:k=>Tr(L(k)),next:k=>{const A=j(k);if(y)c.done=k>=m;else{const H=Tr(L(k));c.done=Math.abs(H)<=S.restSpeed&&Math.abs(S.target-A)<=S.restDelta}return c.value=c.done?S.target:A,c},toString:()=>{const k=Math.min(Ry(P),Ey),A=YE(H=>P.next(k*H).value,k,30);return k+"ms "+A},toTransition:()=>{}};return P}const XE=Object.assign(Vx,{applyToOptions:e=>{const t=sM(e,100,Vx);return e.ease=t.ease,e.duration=Tr(t.duration),e.type="keyframes",e}});function Bd({keyframes:e,velocity:t=0,power:i=.8,timeConstant:a=325,bounceDamping:o=10,bounceStiffness:c=500,modifyTarget:u,min:f,max:d,restDelta:m=.5,restSpeed:y}){const v=e[0],w={done:!1,value:v},x=k=>kd,C=k=>f===void 0?d:d===void 0||Math.abs(f-k)-E*Math.exp(-k/a),L=k=>{const A=j(k);w.done=Math.abs(A)<=m,w.value=w.done?T:k?T+A:v};let N,O;const P=k=>{x(w.value)&&(N=k,O=XE({keyframes:[w.value,C(w.value)],velocity:-j(k)/a*1e3,damping:o,stiffness:c,restDelta:m,restSpeed:y}))};return P(0),{calculatedDuration:null,next:k=>{let A=!1;return!O&&N===void 0&&(A=!0,L(k),P(k)),N!==void 0&&k>=N?O.next(k-N):(!A&&L(k),w)}}}function bM(e,t,i){const a=[],o=Gi.mix||Sy,c=e.length-1;for(let u=0;ut[0];if(c===2&&t[0]===t[1])return()=>t[1];const u=e[0]===e[1];e[0]>e[c-1]&&(e=[...e].reverse(),t=[...t].reverse());const f=bM(t,a,o),d=f.length,m=y=>{if(u&&y1)for(;vm(Ba(e[0],e[c-1],y)):m}function wM(e,t){const i=e[e.length-1];for(let a=1;a<=t;a++){const o=ho(0,t,a);e.push(sn(i,1,o))}}function cu(e){const t=[0];return wM(t,e.length-1),t}function SM(e,t){return e.map(i=>i*t)}function CM(e,t){return e.map(()=>t||gy).splice(0,e.length-1)}function Es({duration:e=300,keyframes:t,times:i,ease:a="easeInOut",mixer:o}){const c=typeof t[0]=="number"?void 0:o,u=LE(a)?a.map(o0):o0(a)||gy,f={done:!1,value:t[0]};let d=-1;if(!c){for(let v=1;v=0){d=-2;break}d=v-1}}if(d>=0){const v=i&&i.length===t.length?i:cu(t),w=v[d]*e,x=v[d+1]*e,C=t[d],E=t[d+1],S=Array.isArray(u)?u[d]:u,T=(Gi.mix||Sy)(C,E),j=t.length-2;return{calculatedDuration:e,next:L=>(f.value=d&&L=x||!e)?typeof E=="number"?E:T(1):T(S(L>=x||!e?1:L<=w?0:(L-w)/(x-w))),f.done=L>=e,f)}}const m=SM(i&&i.length===t.length?i:cu(t),e),y=xM(m,t,{ease:Array.isArray(u)?u:CM(t,u),mixer:c});return{calculatedDuration:e,next:v=>(f.value=y(v),f.done=v>=e,f)}}const EM=5;function RM(e,t,i){const a=Math.max(t-EM,0);return TE(i-e(a),t-a)}function TM(e,t,i=0){return t<=0?i:e.velocity?e.velocity(t):RM(a=>e.next(a).value,t,e.next(t).value)}function uu(e,{repeat:t,repeatType:i="loop"},a,o=1){let c,u,f=0;for(let y=0;yt-e>jM&&!Gi.useManualTiming?t:e;function QE(e,t){return{kind:e,animation:t,timestamp:Ht.now(),frameTimestamp:Nn.timestamp,frameIsProcessing:Nn.isProcessing}}function JE(e,t,i){const a=globalThis.__MOTION_INSPECT__;if(a)try{a({...QE("animation-start",e),options:i?{...t,...i}:t})}catch{}}function MM(e,t){const i=globalThis.__MOTION_INSPECT__;if(i)try{i({...QE("layout-animation-start",e),node:t})}catch{}}class Ty{constructor(){this.isResolved=!1}get finished(){return this._finished||(this._finished=this.isResolved?Promise.resolve():new Promise(t=>{this._resolve=t})),this._finished}updateFinished(){this._finished=this._resolve=void 0,this.isResolved=!1}notifyFinished(){this.isResolved=!0,this._resolve?.()}then(t,i){return this.finished.then(t,i)}}const NM=e=>e/100,fu=e=>Math.round(e*1e4)/1e4;class Cl extends Ty{constructor(t){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:i}=this.options;i&&i.updatedAt!==Ht.now()&&this.tick(Ht.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause(),JE(this,this.options)}initAnimation(){const{options:t}=this;WE(t);const{type:i=Es,repeat:a=0,repeatDelay:o=0,repeatType:c,velocity:u=0}=t;let{keyframes:f}=t;const d=i||Es;this.mixKeyframes=void 0,d!==Es&&typeof f[0]!="number"&&(this.mixKeyframes=Sl(NM,t.mixer?.(f[0],f[1])||Sy(f[0],f[1])),f=[0,100]);const m=d(f===t.keyframes?t:{...t,keyframes:f});c==="mirror"&&(this.mirroredGenerator=d({...t,keyframes:[...f].reverse(),velocity:-u})),m.calculatedDuration===null&&(m.calculatedDuration=Ry(m));const{calculatedDuration:y}=m;this.calculatedDuration=y,this.resolvedDuration=y+o,this.totalDuration=this.resolvedDuration*(a+1)-o,this.generator=m}updateTime(t){this.currentTime=this.holdTime??Math.round(t-this.startTime)*this.playbackSpeed}tick(t,i=!1){const{generator:a,totalDuration:o,calculatedDuration:c}=this;if(this.startTime===null)return a.next(0);const{delay:u=0,keyframes:f,type:d,onUpdate:m,finalKeyframe:y}=this.options;this.startTime===this.pendingStartTime&&(this.startTime=ZE(this.startTime,t)),this.pendingStartTime=void 0,this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-o/this.speed,this.startTime)),i?this.currentTime=t:this.updateTime(t);const v=this.currentTime-u*(this.playbackSpeed>=0?1:-1),w=this.playbackSpeed>=0?v<0:v>o;this.currentTime=Math.max(v,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=o);const x=this.generate(this.currentTime,w);let{done:C}=x;w||(C=this.playbackSpeed>=0?c<1/0?this.currentTime>=o:C:this.currentTime<=0);const E=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&C);return E&&d!==Bd&&(x.value=uu(f,this.options,y,this.speed)),m&&m(x.value),E&&this.finish(),x}at(t){return this.holdTime??fu((t-this.startTime)*this.playbackSpeed)}sampleAt(t,i){const{options:a,totalDuration:o}=this,c=this.at(t)-(a.delay||0);return c>=o&&a.type!==Bd?uu(a.keyframes,a,i?void 0:a.finalKeyframe):this.generate(Math.max(c,0),c<0).value}generate(t,i){const{generator:a,totalDuration:o,mixKeyframes:c,mirroredGenerator:u,resolvedDuration:f}=this,{keyframes:d,repeat:m,repeatType:y,repeatDelay:v}=this.options;let w=t,x=a;if(m){const E=Math.min(t,o)/f;let S=Math.floor(E),T=E%1;!T&&E>=1&&(T=1),T===1&&S--,S=Math.min(S,m+1),S%2&&(y==="reverse"?(T=1-T,v&&(T-=v/f)):y==="mirror"&&(x=u)),w=Ba(0,1,T)*f}let C;return i?(this.delayState.value=d[0],C=this.delayState):C=x.next(w),c&&!i&&(C.value=c(C.value)),C}get duration(){return ei(this.calculatedDuration)}get iterationDuration(){return this.duration+ei(this.options.delay??0)}get time(){return ei(this.currentTime)}set time(t){this.state==="finished"&&this.updateFinished(),t=Tr(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=t,this.tick(t))}getGeneratorVelocity(){return TM(this.generator,this.currentTime,this.options.velocity)}get speed(){return this.playbackSpeed}set speed(t){const i=this.playbackSpeed!==t;i&&this.driver&&this.updateTime(Ht.now()),this.playbackSpeed=t,i&&this.driver&&(this.time=ei(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=Cy,startTime:i}=this.options;this.driver||(this.driver=t(o=>this.tick(o))),this.options.onPlay?.();const a=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=a):this.holdTime!==null?this.startTime=a-this.holdTime/(this.playbackSpeed||1):this.startTime||(this.startTime=i??(this.pendingStartTime=a)),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(Ht.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.driver?.stop(),this.driver=void 0,this.startTime=this.holdTime=null}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}}const kM=new Set(["brightness","contrast","saturate","opacity"]);function OM(e){const[t,i]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[a]=i.match(vy)||[];if(!a)return e;const o=i.replace(a,"");let c=kM.has(t)?1:0;return a!==i&&(c*=100),t+"("+c+o+")"}const DM=/\b([a-z-]*)\(.*?\)/gu,d0={...bi,getAnimatableNone:e=>{const t=e.match(DM);return t?t.map(OM).join(" "):e}},h0={...bi,getAnimatableNone:e=>{const t=bi.parse(e);return bi.createTransformer(e)(t.map(a=>typeof a=="number"?0:typeof a=="object"?{...a,alpha:1}:a))}},Ux={..._l,transform:Math.round},eR={rotate:Da,pathRotation:Da,rotateX:Da,rotateY:Da,rotateZ:Da,scale:$f,scaleX:$f,scaleY:$f,scaleZ:$f,skew:Da,skewX:Da,skewY:Da,distance:Ve,translateX:Ve,translateY:Ve,translateZ:Ve,x:Ve,y:Ve,z:Ve,perspective:Ve,transformPerspective:Ve,opacity:ou,originX:Nx,originY:Nx,originZ:Ve},Ay={borderWidth:Ve,borderTopWidth:Ve,borderRightWidth:Ve,borderBottomWidth:Ve,borderLeftWidth:Ve,borderRadius:Ve,borderTopLeftRadius:Ve,borderTopRightRadius:Ve,borderBottomRightRadius:Ve,borderBottomLeftRadius:Ve,width:Ve,maxWidth:Ve,height:Ve,maxHeight:Ve,top:Ve,right:Ve,bottom:Ve,left:Ve,inset:Ve,insetBlock:Ve,insetBlockStart:Ve,insetBlockEnd:Ve,insetInline:Ve,insetInlineStart:Ve,insetInlineEnd:Ve,padding:Ve,paddingTop:Ve,paddingRight:Ve,paddingBottom:Ve,paddingLeft:Ve,paddingBlock:Ve,paddingBlockStart:Ve,paddingBlockEnd:Ve,paddingInline:Ve,paddingInlineStart:Ve,paddingInlineEnd:Ve,margin:Ve,marginTop:Ve,marginRight:Ve,marginBottom:Ve,marginLeft:Ve,marginBlock:Ve,marginBlockStart:Ve,marginBlockEnd:Ve,marginInline:Ve,marginInlineStart:Ve,marginInlineEnd:Ve,fontSize:Ve,backgroundPositionX:Ve,backgroundPositionY:Ve,...eR,zIndex:Ux,fillOpacity:ou,strokeOpacity:ou,numOctaves:Ux},LM={...Ay,color:qn,backgroundColor:qn,outlineColor:qn,fill:qn,stroke:qn,borderColor:qn,borderTopColor:qn,borderRightColor:qn,borderBottomColor:qn,borderLeftColor:qn,filter:d0,WebkitFilter:d0,mask:h0,WebkitMask:h0},tR=e=>LM[e],PM=new Set([d0,h0]);let Ix,Bx,cg;function jy(e,t){if(e===Ix&&t===Bx)return cg;let i=tR(e);return PM.has(i)||(i=bi),cg=i.getAnimatableNone?i.getAnimatableNone(t):void 0,Ix=e,Bx=t,cg}function _M(e){for(let t=1;te*180/Math.PI,m0=e=>{const t=ao(Math.atan2(e[1],e[0]));return p0(t)},zM={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scaleZ:()=>1,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:m0,rotateZ:m0,skewX:e=>ao(Math.atan(e[1])),skewY:e=>ao(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},p0=e=>(e=e%360,e<0&&(e+=360),e),Hx=m0,Fx=e=>Math.hypot(e[0],e[1]),Yx=e=>Math.hypot(e[4],e[5]),VM={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Fx,scaleY:Yx,scaleZ:e=>Math.hypot(e[8],e[9],e[10]),scale:e=>(Fx(e)+Yx(e))/2,rotateX:e=>p0(ao(Math.atan2(e[6],e[5]))),rotateY:e=>p0(ao(Math.atan2(-e[2],e[0]))),rotateZ:Hx,rotate:Hx,skewX:e=>ao(Math.atan(e[4])),skewY:e=>ao(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function du(e){return e.includes("scale")?1:0}function My(e,t){if(!e||e==="none")return du(t);const i=e.match(/^matrix(3d)?\(([-\d.e\s,]+)\)$/u);if(!i)return du(t);const a=(i[1]?VM:zM)[t],o=i[2].split(",").map(c=>parseFloat(c));return typeof a=="function"?a(o):o[a]}const UM=(e,t)=>{const{transform:i="none"}=getComputedStyle(e);return My(i,t)},Ia=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","scaleZ","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Rs=new Set([...Ia,"pathRotation"]),Gx=e=>e===_l||e===Ve,IM=new Set(["x","y","z"]),BM=Ia.filter(e=>!IM.has(e));function HM(e){const t=[];return BM.forEach(i=>{const a=e.getValue(i);if(a!==void 0){const o=a.get(),c=i.startsWith("scale")?1:0;if(o===c)return;t.push([i,o]),a.set(c)}}),t}const FM=new Set(["bottom","right"]);function qx(e,t,i,a,o,c){const u=parseFloat(e);if(!isNaN(u))return u;const{min:f,max:d}=t()[i],m=d-f;return c==="border-box"?m:m-parseFloat(a)-parseFloat(o)}const $x=({transform:e})=>My(e,"x"),Kx=({transform:e})=>My(e,"y"),ug={width:({width:e,paddingLeft:t="0",paddingRight:i="0",boxSizing:a},o)=>qx(e,o,"x",t,i,a),height:({height:e,paddingTop:t="0",paddingBottom:i="0",boxSizing:a},o)=>qx(e,o,"y",t,i,a),top:({top:e})=>parseFloat(e),left:({left:e})=>parseFloat(e),bottom:({top:e},t)=>{const{y:i}=t();return parseFloat(e)+(i.max-i.min)},right:({left:e},t)=>{const{x:i}=t();return parseFloat(e)+(i.max-i.min)},x:$x,y:Kx,translateX:$x,translateY:Kx},lo=new Set;let g0=!1,y0=!1,v0=!1;function nR(){if(y0){const e=[],t=new Set,i=new Set;lo.forEach(o=>{o.needsMeasurement&&(e.push(o),t.add(o.element),FM.has(o.name)&&i.add(o.element))});const a=new Map;i.forEach(o=>{const c=HM(o);c.length&&(a.set(o,c),o.render())}),e.forEach(o=>o.measureInitialState()),t.forEach(o=>{o.render();const c=a.get(o);c&&c.forEach(([u,f])=>{o.getValue(u)?.set(f)})}),e.forEach(o=>o.measureEndState()),e.forEach(o=>{o.suspendedScrollY!==void 0&&window.scrollTo(0,o.suspendedScrollY)})}y0=!1,g0=!1,lo.forEach(e=>e.complete(v0)),lo.clear()}function rR(){lo.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(y0=!0)})}function YM(){v0=!0,rR(),nR(),v0=!1}function GM(e,t,i){if(typeof e=="string"){if(dy(e)||hy(e))return parseFloat(e);if(!bi.test(e)&&bi.test(i))return jy(t,i)}return e??void 0}class Ny{constructor(t,i,a,o,c,u=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=i,this.name=a,this.motionValue=o,this.element=c,this.isAsync=u}scheduleResolve(){this.state="scheduled",this.isAsync?(lo.add(this),g0||(g0=!0,Wt.read(rR),Wt.resolveKeyframes(nR))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:i,element:a,motionValue:o}=this;if(t[0]===null){const c=o?.get(),u=t[t.length-1];if(c!==void 0)t[0]=c;else if(a&&i){const f=GM(a.readValue(i,u),i,u);f!==void 0&&(t[0]=f)}t[0]===void 0&&(t[0]=u),o&&c===void 0&&o.set(t[0])}_M(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),lo.delete(this)}cancel(){this.state==="scheduled"&&(lo.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const qM=e=>e.startsWith("--");function iR(e,t,i){qM(t)?e.style.setProperty(t,i):e.style[t]=i}const $M={};function aR(e,t){const i=Ej(e);return()=>$M[t]??i()}const KM=aR(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),ky=aR(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),sl=([e,t,i,a])=>`cubic-bezier(${e}, ${t}, ${i}, ${a})`,b0={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:sl([0,.65,.55,1]),circOut:sl([.55,0,1,.45]),backIn:sl([.31,.01,.66,-.59]),backOut:sl([.33,1.53,.69,.99])};function sR(e,t){if(e)return typeof e=="function"?ky()?YE(e,t):"ease-out":yy(e)?sl(e):Array.isArray(e)?e.map(i=>sR(i,t)||b0.easeOut):b0[e]}function XM(e,t,i,{delay:a=0,duration:o=300,repeat:c=0,repeatType:u="loop",ease:f="easeOut",times:d}={},m=void 0){const y={[t]:i};d&&(y.offset=d);const v=sR(f,o);Array.isArray(v)&&(y.easing=v);const w={delay:a,duration:o,easing:Array.isArray(v)?"linear":v,fill:"both",iterations:c+1,direction:u==="reverse"?"alternate":"normal"};return m&&(w.pseudoElement=m),e.animate(y,w)}function oR(e){return typeof e=="function"&&"applyToOptions"in e}function WM({type:e,...t}){return oR(e)&&ky()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class lR extends Ty{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;const{element:i,name:a,keyframes:o,pseudoElement:c,allowFlatten:u=!1,finalKeyframe:f,onComplete:d}=t;this.isPseudoElement=!!c,this.allowFlatten=u,this.options=t;const m=WM(t);this.animation=XM(i,a,o,m,c),m.autoplay===!1&&this.animation.pause(),this.animation.onfinish=this.onFinish=()=>{if(this.animation.onfinish=null,this.finishedTime=this.time,!c){const y=uu(o,this.options,f,this.speed);this.updateMotionValue?.(y),iR(i,a,y),this.animation.cancel()}d?.(),this.notifyFinished()},JE(this,t,m)}play(){this.isStopped||(this.manualStartTime=null,this.animation.onfinish=this.onFinish,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.isStopped||(this.animation.onfinish=this.onFinish),this.animation.finish?.()}cancel(){this.animation.onfinish=null;try{this.animation.cancel()}catch{}}stop(){this.isStopped||(this.isStopped=!0,!(this.state==="idle"||this.finishedTime!==null)&&(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel()))}commitStyles(){const t=this.options?.element;!this.isPseudoElement&&t?.isConnected&&this.animation.commitStyles?.()}get duration(){const t=this.animation.effect?.getComputedTiming?.().duration||0;return ei(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+ei(t)}get time(){return ei(Number(this.animation.currentTime)||0)}set time(t){const i=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=Tr(t),i&&(this.animation.pause(),this.updateFinished())}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,onAttach:i,observe:a}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=this.onFinish=null,t&&KM()?(this.animation.timeline=t,i?.(this.animation),Bi):a(this)}}const cR={anticipate:kE,backInOut:NE,circInOut:DE};function ZM(e){return e in cR}function QM(e){typeof e.ease=="string"&&ZM(e.ease)&&(e.ease=cR[e.ease])}const Hd=10;class JM extends lR{constructor(t){QM(t),WE(t),super(t),t.startTime!==void 0&&t.autoplay!==!1&&(this.startTime=t.startTime),this.options=t}elapsed(){return this.state==="running"?(Ht.now()-this.startTime)*this.speed:this.time*1e3}sample(t){if(!this.sampler){const{motionValue:i,onUpdate:a,onComplete:o,onPlay:c,onStop:u,element:f,...d}=this.options;this.sampler=new Cl({...d,autoplay:!1}),this.sampler.stop()}return this.sampler.sample(Math.max(0,t)).value}liveValue(){const{state:t}=this;if(t==="running"||t==="paused")return this.sample(this.elapsed())}updateMotionValue(t){const{motionValue:i,element:a,name:o}=this.options;if(!i)return;if(t!==void 0){i.set(t);return}const{speed:c}=this,u=this.elapsed(),f=this.state==="running"&&c?Ba(0,Hd,u):0,d=this.sample(u);a&&o&&iR(a,o,d),i.setWithVelocity(this.sample(u-f*Math.sign(c)),d,f/Math.abs(c||1))}}const Xx=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(bi.test(e)||e==="0")&&!e.startsWith("url("));function e6(e){const t=e[0];if(e.length===1)return!0;for(let i=0;ie&&typeof t[0]!="number"&&t.some((i,a)=>a&&e(t[a-1],i)),Wx=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),fR=()=>!Gi.useManualTiming&&Object.hasOwnProperty.call(Element.prototype,"animate");function i6(e){const{motionValue:t,name:i,repeatDelay:a,repeatType:o,damping:c,type:u,keyframes:f}=e;if(!i||!(w0.has(i)||Wx.has(i)))return!1;const d=t?.owner?.current;if(!(d instanceof HTMLElement)&&!(d instanceof SVGElement))return!1;const{onUpdate:m,transformTemplate:y}=t.owner.getProps();return fR()&&(w0.has(i)||Wx.has(i)&&r6(f))&&(i!=="transform"||!y)&&!m&&!a&&o!=="mirror"&&c!==0&&u!=="inertia"&&!uR(e)}const Oy=(e,t)=>t&&typeof e=="number"?t.transform(e):e,a6={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},s6=Ia.length,Zx={},S0=(e,t,i=Oy(t,eR[e]))=>(Zx[e]||(Zx[e]=(a6[e]||e)+"("))+i+")",C0=(e,t)=>(typeof t=="number"?t:parseFloat(t))===(e.startsWith("scale")?1:0);function o6(e,t,i){let a="";for(let c=0;cd6.has(e),Jx=new WeakMap,m6=(e,t)=>{let i=Jx.get(e);return i?.[0]!==t&&(i=[t,"linear("+cu(Array(t+1)).map(a=>fu(e(a))+" "+fu(a*100)+"%")+")"],Jx.set(e,i)),i[1]},ew=(e,t)=>Math.min(l6,Math.max(2,Math.ceil((t-e)/Hd))),Jc=(e,t)=>Math.abs(e-t)<=dR,fg=(e,t)=>e-t,tw=(e,t,i)=>cu(Array(i+1)).map(a=>sn(e,t,a)),vd=e=>e.motionValue.owner,Fd=e=>El.get(e),nw=({state:e})=>e==="idle"||e==="finished",ol=(e,t)=>e.latestValues?e.latestValues[t]:e.getValue(t)?.get(),p6=({name:e,motionValue:t})=>e&&Ia.includes(e)&&t?.owner?.current instanceof HTMLElement&&fR()&&ky();function g6(e){const t=vd(e),{onUpdate:i,transformTemplate:a}=t.getProps();return!e.isHandoff&&!i&&!e.hasOnUpdate&&!a&&e.type!=="inertia"&&(ol(t,"transform")||"none")==="none"&&!ol(t,"pathRotation")&&!t.projection?.isProjecting()&&!uR(e)}class y6{constructor(t,i,a,o){this.element=t,this.update=i,this.makeDriver=a,this.animation=o}get js(){return this.driver||(this.driver=this.makeDriver(this.update))}now(){return this.driver||this.makeDriver!==Cy?this.js.now():Nn.isProcessing?Nn.timestamp:Ht.now()}start(t=!0){const i=Fd(this.element);!i||i.isJS?this.js.start(t):i.schedule(!1,!t)}stopJS(){this.driver?.stop()}stop(){this.stopJS();const t=Fd(this.element);t&&!t.isFinishing&&t.release(this.animation)}}let rw;class v6 extends Cl{constructor(t){const i=vd(t).current,{driver:a=Cy}=t;let o;const c=g6(t);t.driver=d=>new y6(i,d,a,o),super(t),o=this;const u=this.driver;u&&(u.animation=this),this.canAccelerate=c;const{stop:f}=this;this.stop=()=>{this.isAccelerated()&&this.sync(),f()}}offsets(){const{keyframes:t,times:i}=this.options;return i||(this.offsetsOf!==t&&(this.offsetsOf=t,this.cachedOffsets=cu(t)),this.cachedOffsets)}get group(){return Fd(vd(this.options).current)}get js(){return this.driver?.js}stopJS(){this.driver?.stopJS()}get name(){return this.options.name}timing(){const{startTime:t,speed:i,totalDuration:a}=this,{delay:o=0,repeatType:c}=this.options;return this.holdTime!==null?[1/0,0]:a===1/0?[t+o/i,this.resolvedDuration*(c==="loop"?1:2)/i||1]:[t+(o+a)/i,0]}isAccelerated(){const{group:t,state:i}=this;return t?.tracks.has(this)&&!t.isJS&&this.canAccelerate&&(i==="running"||i==="paused")}liveValue(){return this.isAccelerated()?this.sampleAt(Ht.now()):void 0}tween(){const{keyframes:t,type:i,repeat:a,delay:o=0}=this.options;let c=-1;if(a||i!==Es||this.holdTime!==null)return;for(let m=1;m=0)return;c=m-1}let{ease:u}=this.options;LE(u)&&(u=u[c]);const f=this.offsets(),d=m=>this.startTime+(o+f[m]*this.totalDuration)/this.speed;if(c>=0){const m=yy(u)?sl(u):h6(u)?b0[u]:o0(u);return[d(c),d(c+1),typeof m=="string"||Jc(m(0),0)&&Jc(m(1),1)?m:void 0]}}boundaries(t,i){const{startTime:a,speed:o,resolvedDuration:c,options:u}=this,{delay:f=0,repeat:d=0,repeatDelay:m=0,repeatType:y,type:v}=u,w=(v||Es)===Es?this.offsets():[0,1],x=a+f/o,C=[];if(this.holdTime!==null||!(c>0))return C;for(let E=Math.max(0,Math.floor((t-x)*o/c));E<=d;E++){const S=x+E*c/o;if(S>i)break;for(const T of w){const j=S+(E%2&&y&&y!=="loop"?1-T:T)*(c-m)/o;j>t&&j{Nc||queueMicrotask(()=>{const t=Nc;Nc=void 0,t.forEach(i=>i())}),(Nc||(Nc=[])).push(e)};function x6(e){const t=e.current,i=new Set,a=new Map;let o={},c=[],u=new Map,f=[],d=!1,m=!1,y=!1,v=!1,w=-1/0,x,C=1/0,E;const S=z=>{for(const M of i)if(M.name===z)return!0},T=(z,M)=>{const _={};for(const I of z===void 0?Ia:c){const B=a.get(I),W=z===void 0?ol(e,I):B?B.sampleAt(M>z&&!B.timing()[1]?M:z):o[I];W!==void 0&&(_[I]=W)}return _},j=(z,M)=>{let _="";for(const I in z){const B=z[I];(!M||!C0(I,B))&&(_+=S0(I,B)+" ")}return(M?_.trim():_)||"none"},L=(z,M)=>j(T(z,M)),N=(z=T())=>{t.style.transform=j(z,!0)},O=z=>{z.onfinish=z.oncancel=null,z.cancel()},P=(z=!0)=>{clearTimeout(x),C=1/0,E=void 0,z&&N(),f.forEach(({animation:M})=>O(M)),f=[]},k=(z,M)=>new Animation(new KeyframeEffect(t,z,M)),A=(z,M,_=1/0)=>{const I={animation:z,offset:M,end:_};z.startTime=Ht.now()+M,_<1/0&&(z.onfinish=()=>{I.isDone=!0,f.some(B=>B.end===1/0)&&(O(z),f=f.filter(B=>B!==I)),F.schedule(!1)}),z.oncancel=()=>f.includes(I)&&F.demote(),f.push(I)},H=(z,M,_)=>{const I=(W,ie)=>Math.abs(z(ie)-z(W)),B=I(M,_);for(;_-M>.01;){const W=(M+_)/2;I(M,W)>I(W,_)?_=W:M=W}return I(M,_)>B/2?[M,_]:[]},Y=(z,M,_,I)=>{const B=ew(M,_);if(I.length*4>B)return;let W;for(const Se of z){const Ee=Se.numberAt(M),ye=(Se.numberAt((M+_)/2)-Ee)/(Se.numberAt(_)-Ee);if(ye===ye){if(W===void 0)W=ye;else if(!Jc(ye,W))return}}const ie=tw(M,_,B).concat(I).sort(fg),fe=Se=>ho(M,_,Se);let pe,ce;for(const Se of z){const Ee=Se.numberAt(M),ye=ie.map(rt=>Se.numberAt(rt)-Ee),Pe=ye[ye.length-1],Ge=ye.some(rt=>Math.abs(rt)*dR>Math.abs(Pe))?0:Pe,Je=ye.map(rt=>Ge?rt/Ge:rt);if(Ge&&!pe)pe=Je,ce=rt=>(Se.numberAt(rt)-Ee)/Ge;else if(Je.some((rt,Oe)=>!Jc(rt,Ge&&pe[Oe])))return}if(!pe||pe.every((Se,Ee)=>Jc(Se,fe(ie[Ee]))))return"linear";const Ae=[],Le=(Se,Ee=ce(Se))=>Ae.push(fu(Ee)+" "+fu(fe(Se)*100)+"%");return pe.forEach((Se,Ee)=>{Ee&&Math.abs(Se-pe[Ee-1])>.2&&H(ce,ie[Ee-1],ie[Ee]).forEach(ye=>Le(ye)),Le(ie[Ee],Se)}),"linear("+Ae+")"},Z=(z,M,_,I)=>{const B=[M],W=[];let ie=_,fe=M;for(const Se of z){const Ee=Se.tween();if(Ee?.[2]!=="linear"){const[ye,Pe]=Se.timing(),[Ge,Je]=Ee||[M,Pe?_:ye];ie=Math.min(ie,Ge),fe=Math.max(fe,Je),W.push(Se)}}ie=Math.max(M,ie),fe=Math.min(_,fe);const pe=(Se,Ee)=>W.every(ye=>!(Math.abs(ye.numberAt((Se+Ee)/2)-(ye.numberAt(Se)+ye.numberAt(Ee))/2)>(ye.name.startsWith("scale")?u6:c6))),ce=(Se,Ee,ye)=>{if(Ee-Se<1||pe(Se,Ee))B.push(Ee);else if(ye<4)ce(Se,(Se+Ee)/2,ye+1),ce((Se+Ee)/2,Ee,ye+1);else{for(const Pe of z)B.push(...H(Ge=>Pe.numberAt(Ge),Se,Ee));B.push(Ee)}},Ae=fe>ie?tw(ie,fe,Math.ceil((fe-ie)/100)):[];Ae.push(_);for(const Se of I)Ae.push(Se,Math.min(Se+.01,_));let Le=M;for(const Se of Ae.sort(fg))Se>Le&&ce(Le,Se,0),Le=Se;return B.sort(fg)},$=z=>{let M;for(const _ of z){const I=_.tween();if(!I||M&&(Math.abs(I[0]-M[0])>1||Math.abs(I[1]-M[1])>1))return;M=[I[0],I[1],!M||I[2]===M[2]?I[2]:void 0]}return M},K=(z,M,_,I,B={fill:"both"},W)=>{const ie=I?[]:z.flatMap(Le=>Le.boundaries(M,_)),fe=I||Y(z,M,_,ie),pe=fe?[M,_]:Z(z,M,_,ie),ce=pe.map(Le=>L(Le,W));let Ae={transform:ce};return fe||(Ae.offset=pe.map(Le=>ho(M,_,Le))),ce.every(Le=>Le===ce[0])&&(N(T(M,W)),Ae=null),k(Ae,{...B,duration:_-M,easing:fe||"linear"})},ee=z=>{const M=Ht.now()+z;M{C=1/0,F.schedule(!1)},z))},re=z=>{let M=z,_=0,I=0;const B=[],W=[],ie=new Set;a.clear(),u=new Map;for(const pe of i){a.set(pe.name,pe);const[ce,Ae]=pe.timing(),Le=ce===1/0;if(u.set(pe,[pe.at(z),pe.speed,Le]),!Le){if(pe.speed<0)return;if(Ae){if(_){const Se=(ce-I)/Ae;if(Math.abs(Ae-_)>1||Math.abs(Se-Math.round(Se))*_>1)return}else _=Ae,I=ce;W.push(pe)}else ie.add(ce);B.push(pe),M=Math.max(M,ce)}}o={},c=Ia.filter(pe=>{if(a.has(pe))return!0;const ce=o[pe]=ol(e,pe);return ce!==void 0&&!C0(pe,ce)}),P(!1);const fe=!_&&$(B);try{if(M>z){let pe;if(fe&&fe[1]>z){const[ce,Ae,Le]=fe;if(ce-z>Qx)return B.forEach(Se=>Se.sync()),ee(E=ce-z-Qx),!0;pe=typeof Le=="string"?Le:Le?m6(Le,ew(ce,Ae)):Y(B,ce,Ae,[]),pe&&A(K(B,ce,Ae,pe,{fill:"both",endDelay:M-Ae}),ce-z,M-ce)}pe||A(K(B,z,M),0,M-z),ie.forEach(ce=>ce{let _,I=0;for(const B of i){const W=u.get(B);if(!W)return!1;const[ie,fe,pe]=W,ce=B.at(z),Ae=B.timing()[0]===1/0;if(pe){if(Ae&&(ce===ie||!f.length))continue;return!1}const Le=(ce-ie)/fe,Se=Ae?0:B.speed/fe;if(_===void 0)_=Le,I=Se;else if(Math.abs(Le-_)>1||Se!==I)return!1}if(_===void 0)return!0;if(!f.length){if(E===void 0||M&&I)return!1;if(I){const B=(E-_)/I;if(B<1)return!1;ee(B)}return!0}for(const{offset:B,end:W,isDone:ie}of f){const fe=_-B;if(W<1/0&&(ie?fe=W))return!1}for(const{animation:B,offset:W,isDone:ie}of f){if(ie)continue;const fe=_-W;I&&B.updatePlaybackRate&&B.playState==="running"&&Math.abs(Number(B.currentTime)-fe)<20?B.playbackRate!==I&&B.updatePlaybackRate(I):I?(B.playbackRate!==I&&(B.playbackRate=I),B.startTime=z-fe/I):(B.startTime=null,B.currentTime=fe)}return!0},X=()=>i.size?!1:(y=!0,Fd(t)===F&&El.delete(t),F.isJS||P(),!0),Q=()=>{const z=Ht.now();if(F.isJS||(F.isFinishing=!0,i.forEach(I=>{const[B,W]=I.timing();I.state==="running"&&I.speed>0&&!W&&B<=z+1&&(I.complete(),o[I.name]=ol(e,I.name),u.has(I)||(d=!0))}),F.isFinishing=!1),m=!1,y||(i.forEach(I=>nw(I)&&i.delete(I)),X()))return;for(const I of i)if(!I.canAccelerate)return F.demote(!0);F.isJS&&(F.isJS=!1,d=!0,i.forEach(I=>I.stopJS()));const M=d,_=v;if(d=v=!1,M||!V(z,_)){if(_){if(z-wI.timing()[0]===1/0&&I.sync())},F={tracks:i,isJS:!1,isFinishing:!1,schedule(z,M){y||(d||(d=z),v||(v=!!M),m||(m=!0,Nn.isProcessing?Wt.render(Q,!1,!0):b6(Q)))},release(z){nw(z)&&i.delete(z),X()||F.schedule(!0)},check(){if(!F.isJS){for(const z in o)if(ol(e,z)!==o[z]&&!S(z))return F.schedule(!0,!0)}},demote(z){if(!(F.isJS||y))return i.forEach(M=>{M.isAccelerated()&&M.sync(),z||(M.canAccelerate=!1)}),F.isJS=!0,u=new Map,P(),i.forEach(M=>M.state==="running"&&M.js?.start()),!0}};return El.set(t,F),F}class w6 extends Ty{constructor(t){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=Ht.now();const{keyframes:i,name:a,motionValue:o,element:c}=t,u=t;u.autoplay??(u.autoplay=!0),u.delay??(u.delay=0),u.type??(u.type="keyframes"),u.repeat??(u.repeat=0),u.repeatDelay??(u.repeatDelay=0),u.repeatType??(u.repeatType="loop");const f=c?.KeyframeResolver||Ny;this.keyframeResolver=new f(i,(d,m,y)=>this.onKeyframesResolved(d,m,u,!y),a,o,c),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,i,a,o){this.keyframeResolver=void 0;const{name:c,type:u,velocity:f,delay:d,isHandoff:m,onUpdate:y}=a;this.resolvedAt=Ht.now();const v=t6(t,c,u,f);v||((Gi.instantAnimations||!d)&&y?.(uu(t,a,i)),t[0]=t[t.length-1],x0(a),a.repeat=0);const{onComplete:w}=a;a.finalKeyframe=i,a.keyframes=t,a.onComplete=()=>{w?.(),this.notifyFinished()};const x=v&&!m&&i6(a),C=!x&&p6(a);o&&(x||C||this.resolvedAt!==this.createdAt)&&(a.startTime??(a.startTime=ZE(this.createdAt,this.resolvedAt)));let E;if(x){a.element=a.motionValue?.owner?.current;try{E=new JM(a)}catch{E=new Cl(a)}}else C?E=new v6(a):E=new Cl(a);this.pendingTimeline&&(this.stopTimeline=E.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=E}get finished(){return this._animation?this._animation.finished:super.finished}then(t,i){return this.finished.finally(t).then(()=>{})}liveValue(){return this._animation?.liveValue?.()}get animation(){return this._animation||(this.keyframeResolver?.resume(),YM()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation?.cancel(),this.keyframeResolver?.cancel()}}function hR(e,t,i,a=0,o=1){const c=Array.from(e).sort((m,y)=>m.sortNodePosition(y)).indexOf(t),u=e.size,f=(u-1)*a;return typeof i=="function"?i(c,u):o===1?c*a:f-c*a}const iw=30,S6=e=>!isNaN(parseFloat(e));class C6{constructor(t,i={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=a=>{const o=Ht.now();if(this.updatedAt!==o&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(a),this.current!==this.prev&&(this.dirty(),this.dependents))for(const c of this.dependents)c.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=i.owner}setCurrent(t){this.current=t,this.updatedAt=Ht.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=S6(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,i){var a;return t==="change"?this.onChangeSubscribe(i):((a=this.events)[t]||(a[t]=new Ud)).add(i)}onChangeSubscribe(t){const{events:i}=this;return!i.change&&!this.changeSubscriber?this.changeSubscriber=t:(i.change||(i.change=new Ud,i.change.add(this.changeSubscriber),this.changeSubscriber=void 0),i.change.add(t)),()=>{this.changeSubscriber===t?this.changeSubscriber=void 0:i.change?.remove(t),this.stopIfUnobserved()}}stopIfUnobserved(){Wt.read(()=>{!this.changeSubscriber&&!this.events.change?.getSize()&&this.stop()})}clearListeners(){this.changeSubscriber=void 0;for(const t in this.events)this.events[t].clear()}attach(t,i){this.passiveEffect=t,this.stopPassiveEffect=i}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,i,a){this.set(i),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-a}jump(t,i=!0){i&&(this.updatedAt=Ht.now(),this.stop()),this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,this.stopPassiveEffect?.()}dirty(){const{current:t,changeSubscriber:i}=this;i?i(t):this.events.change?.notify(t)}addDependent(t){(this.dependents||(this.dependents=new Set)).add(t)}removeDependent(t){this.dependents?.delete(t)}get(){const t=this.animation?.liveValue?.();return t===void 0?this.current:t}getCurrent(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=Ht.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>iw)return 0;const i=Math.min(this.updatedAt-this.prevUpdatedAt,iw);return TE(parseFloat(this.current)-parseFloat(this.prevFrameValue),i)}start(t){return new Promise(i=>this.run(t,i))}run(t,i){this.stop(),this.hasAnimated=!0;let a=!1,o;o=t(()=>{a=!0,this.events.animationComplete?.notify(),this.animation===o&&(this.animation=void 0),i?.()}),a||(this.animation=o),this.events.animationStart?.notify()}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel?.notify()),this.animation=void 0}isAnimating(){return!!this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect?.()}}function Rl(e,t){return new C6(e,t)}function Dy(e,t){if(e?.inherit&&t){const{inherit:i,...a}=e;return{...t,...a}}return e}function Ly(e,t){const i=e?.[t]??e?.default??e;return i!==e?Dy(i,e):i}const E6={type:"spring",stiffness:500,damping:25,restSpeed:10},R6=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),T6={type:"keyframes",duration:.8},A6={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},j6=(e,{keyframes:t})=>t.length>2?T6:Rs.has(e)?e.startsWith("scale")?R6(t[1]):E6:A6,M6=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed","out","mixer"]);function N6(e){for(const t in e)if(!M6.has(t))return!0;return!1}const Py=(e,t,i,a={},o,c)=>u=>{const f=Ly(a,e)||{},d=f.delay||a.delay||0;let{elapsed:m=0}=a;m=m-Tr(d);const y={keyframes:Array.isArray(i)?i:[null,i],ease:"easeOut",velocity:t.getVelocity(),...f,delay:-m,onUpdate:w=>{t.set(w),f.onUpdate&&f.onUpdate(w)},onComplete:()=>{u(),f.onComplete&&f.onComplete()},name:e,motionValue:t,element:c?void 0:o,hasOnUpdate:!!f.onUpdate};N6(f)||Object.assign(y,j6(e,y)),y.duration&&(y.duration=Tr(y.duration)),y.repeatDelay&&(y.repeatDelay=Tr(y.repeatDelay)),y.from!==void 0&&(y.keyframes[0]=y.from);let v=!1;if((y.type===!1||y.duration===0&&!y.repeatDelay)&&(x0(y),y.delay===0&&(v=!0)),(Gi.instantAnimations||Gi.skipAnimations||o?.shouldSkipAnimations||f.skipAnimations)&&(v=!0,x0(y),y.delay=0),y.allowFlatten=!f.type&&!f.ease,v&&!c&&t.get()!==void 0){const w=uu(y.keyframes,f);if(w!==void 0){Wt.update(()=>{y.onUpdate(w),y.onComplete()});return}}return f.isSync?new Cl(y):new w6(y)},k6=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function O6(e){const t=k6.exec(e);if(!t)return[,];const[,i,a,o]=t;return[`--${i??a}`,o]}function _y(e,t,i=1){const[a,o]=O6(e);if(!a)return;const c=window.getComputedStyle(t).getPropertyValue(a);if(c){const u=c.trim();return dy(u)?parseFloat(u):u}return yh(o)?_y(o,t,i+1):o}function D6(e){const t=[{},{}];return e?.values.forEach((i,a)=>{t[0][a]=i.get(),t[1][a]=i.getVelocity()}),t}function mR(e,t,i,a){const o=c=>typeof c=="function"?c(i!==void 0?i:e.custom,...D6(a)):c;return t=o(t),typeof t=="string"&&(t=e.variants&&e.variants[t]),o(t)}function co(e,t,i){return mR(e.getProps(),t,i,e)}const pR=(e,t)=>t==="exit"?e.presenceContext?.custom:void 0,gR=new Set(["width","height","top","left","right","bottom",...Ia]),L6=e=>Array.isArray(e);function P6(e,t,i){e.hasValue(t)?e.getValue(t).set(i):e.addValue(t,Rl(i))}function _6(e){return L6(e)?e[e.length-1]||0:e}function z6(e,t){const i=co(e,t);let{transitionEnd:a={},transition:o={},...c}=i||{};c={...c,...a};for(const u in c){const f=_6(c[u]);P6(e,u,f)}}const ur=e=>!!(e&&e.getVelocity);function V6(e){return!!(ur(e)&&e.add)}function E0(e,t){const i=e.getValue("willChange");if(V6(i))return i.add(t);if(!i&&Gi.WillChange){const a=new Gi.WillChange("auto");e.addValue("willChange",a),a.add(t)}}const yR="data-framer-appear-id";function vR(e){return e.props[yR]}const U6=typeof window<"u";function I6({protectedKeys:e,needsAnimating:t},i){const a=i in e&&!t[i];return t[i]=!1,a}function bR(e,t,{delay:i=0,transitionOverride:a,type:o}={}){let{transition:c,transitionEnd:u,...f}=t;const d=e.getDefaultTransition();c=c?Dy(c,d):d;const m=c?.reduceMotion,y=c?.skipAnimations;a&&(c=a);const v=[],w=o&&e.animationState?.getState()[o],x=c?.path;x&&(x.animateValues?x.animateValues(C=>e.getValue(C,e.latestValues[C]??0),f,c,i,v):x.animateVisualElement?.(e,f,c,i,v));for(const C in f){const E=e.getValue(C,e.latestValues[C]??null),S=f[C];if(S===void 0||w&&I6(w,C))continue;const T={delay:i,...Ly(w?.out[C]||c||{},C)};y&&(T.skipAnimations=!0);const j=E.get();if(j!==void 0&&!E.isAnimating()&&!Array.isArray(S)&&S===j&&!T.velocity){Wt.update(()=>E.set(S));continue}let L=!1;if(U6&&window.MotionHandoffAnimation){const P=vR(e);if(P){const k=window.MotionHandoffAnimation(P,C,Wt);k!==null&&(T.startTime=k,L=!0)}}E0(e,C);const N=m??e.shouldReduceMotion;E.run(Py(C,E,S,N&&gR.has(C)?{type:!1}:T,e,L));const O=E.animation;O&&v.push(O)}if(u){const C=()=>Wt.update(()=>{u&&z6(e,u)});v.length?Promise.all(v).then(C):C()}return v}function R0(e,t,i={}){const a=co(e,t,pR(e,i.type)),o=i.transitionOverride||(a?.transition??(e.getDefaultTransition()||{})),c=()=>Promise.all(a?bR(e,a,i):[]),u=(d=0)=>{const{variantChildren:m}=e,{delayChildren:y=0,staggerChildren:v,staggerDirection:w}=o,x=[];return m?.forEach(C=>{C.notify("AnimationStart",t),x.push(R0(C,t,{...i,delay:d+(typeof y=="function"?0:y)+hR(m,C,y,v,w)}).then(()=>C.notify("AnimationComplete",t)))}),Promise.all(x)},{when:f}=o;return f?f==="beforeChildren"?c().then(()=>u()):u().then(c):Promise.all([c(),u(i.delay)])}function B6(e,t,i={}){return e.notify("AnimationStart",t),(Array.isArray(t)?Promise.all(t.map(o=>R0(e,o,i))):typeof t=="string"?R0(e,t,i):Promise.all(bR(e,co(e,t,i.custom),i))).then(()=>{e.notify("AnimationComplete",t)})}const H6={test:e=>e==="auto",parse:e=>e},F6=e=>t=>t.test(e),Y6=[_l,Ve,sa,Da,zj,_j,H6],aw=e=>Y6.find(F6(e));function G6(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||hy(e):!0}const q6=new Set(["auto","none","0"]);function $6(e,t,i){let a=0,o;for(;at.measureViewportBox())}measureInitialState(){const{element:t,unresolvedKeyframes:i,name:a}=this;if(!t?.current)return;a==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=this.measure(),i[0]=this.measuredOrigin;const o=i[i.length-1];o!==void 0&&this.motionValue?.jump(o,!1)}measureEndState(){const{element:t,unresolvedKeyframes:i}=this;if(!t?.current)return;this.motionValue?.jump(this.measuredOrigin,!1);const a=i.length-1,o=i[a];i[a]=this.measure(),o!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=o),this.resolveNoneKeyframes()}}const zy=["borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius"];function bd(e){return RE(e)&&"offsetHeight"in e&&!("ownerSVGElement"in e)}function Vy(e){return RE(e)&&"ownerSVGElement"in e}const Yd={};function Uy(e){return Yd.current?.add(e),e}const Iy=e=>Yd.current?Yd.current.bind(e):e;function xR(e,t,i){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e=="string"){const a=t?t.current:Yd.current?.root||document,o=i?.[e]??a.querySelectorAll(e);return o?Array.from(o):[]}return Array.from(e).filter(a=>a!=null)}function wR(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}function By(e,t,i){const{style:a,vars:o,transformOrigin:c}=e;let u=!1,f=!1;for(const d in t){const m=t[d];if(Rs.has(d)){u=!0;continue}else if(_E(d)){o[d]=m;continue}else{const y=Oy(m,Ay[d]);d.startsWith("origin")?(f=!0,c[d]=y):a[d]=y}}if(t.transform||(u||i?a.transform=o6(t,e.transform,i):a.transform&&(a.transform="none")),f){const{originX:d="50%",originY:m="50%",originZ:y=0}=c;a.transformOrigin=`${d} ${m} ${y}`}}const X6={offset:"stroke-dashoffset",array:"stroke-dasharray"},W6={offset:"strokeDashoffset",array:"strokeDasharray"};function Z6(e,t,i=1,a=0,o=!0){e.pathLength=1;const c=o?X6:W6;e[c.offset]=`${-a}`,e[c.array]=`${t} ${i}`}const SR=["transform","opacity","clipPath","filter","offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function CR(e,{attrX:t,attrY:i,attrScale:a,pathLength:o,pathSpacing:c=1,pathOffset:u=0,...f},d,m,y){if(By(e,f,m),d){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:v,style:w}=e;for(const x of SR)v[x]!==void 0&&(w[x]=v[x],delete v[x]);(w.transform||v.transformOrigin)&&(w.transformOrigin=v.transformOrigin??"50% 50%",delete v.transformOrigin),w.transform&&(w.transformBox=y?.transformBox??"fill-box",delete v.transformBox),t!==void 0&&(v.x=t),i!==void 0&&(v.y=i),a!==void 0&&(v.scale=a),o!==void 0&&Z6(v,o,c,u,!1)}function ER({top:e,left:t,right:i,bottom:a}){return{x:{min:t,max:i},y:{min:e,max:a}}}function Q6({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function J6(e,t){if(!t)return e;const i=t({x:e.left,y:e.top}),a=t({x:e.right,y:e.bottom});return{top:i.y,left:i.x,bottom:a.y,right:a.x}}function dg(e){return e===void 0||e===1}function T0({scale:e,scaleX:t,scaleY:i}){return!dg(e)||!dg(t)||!dg(i)}const Tl=["rotate","rotateX","rotateY","rotateZ","skewX","skewY"];function to(e){return T0(e)||TR(e)||RR(e)}function RR(e){return e.z||e.rotate||e.rotateX||e.rotateY||e.rotateZ||e.skewX||e.skewY}function TR(e){return sw(e.x)||sw(e.y)}function sw(e){return e&&e!=="0%"}function Gd(e,t,i){const a=e-i,o=t*a;return i+o}function ow(e,t,i,a,o){return o!==void 0&&(e=Gd(e,o,a)),Gd(e,i,a)+t}function A0(e,t=0,i=1,a,o){e.min=ow(e.min,t,i,a,o),e.max=ow(e.max,t,i,a,o)}function AR(e,{x:t,y:i}){A0(e.x,t.translate,t.scale,t.originPoint),A0(e.y,i.translate,i.scale,i.originPoint)}const lw=.999999999999,cw=1.0000000000001;function eN(e,t,i,a=!1){const o=i.length;if(!o)return;t.x=t.y=1;let c,u;for(let f=0;flw&&(t.x=1),t.ylw&&(t.y=1)}function Ui(e,t){e.min+=t,e.max+=t}function uw(e,t,i,a,o=.5){const c=sn(e.min,e.max,o);A0(e,t,i,c,a)}function fw(e,t){return typeof e=="string"?parseFloat(e)/100*(t.max-t.min):e}function xd(e,t,i){const a=i??e;uw(e.x,fw(t.x,a.x),t.scaleX,t.scale,t.originX),uw(e.y,fw(t.y,a.y),t.scaleY,t.scale,t.originY)}function jR(e,t){return ER(J6(e.getBoundingClientRect(),t))}function tN(e,t,i){const a=jR(e,i),{scroll:o}=t;return o&&(Ui(a.x,o.offset.x),Ui(a.y,o.offset.y)),a}const nN=()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),{schedule:hu}=FE(queueMicrotask,!1);function rN(e,t,i){const a=ur(e)?e:Rl(e);return a.run(Py("",a,t,i)),a.animation}const $c={};function iN(e,t){const i=Ht.now();e=Iy(e);const a=({timestamp:o})=>{const c=o-i;c>=t&&(Jr(a),e(c-t))};return Wt.setup(a,!0),Uy(()=>Jr(a))}function aN(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function sN(e){return Vy(e)&&e.tagName==="svg"}function wd(e){return ur(e)?e.get():e}const dw=e=>typeof e=="number"?e:parseFloat(e),oN=zy.length,hw=e=>typeof e=="number"||Ve.test(e);function lN(e,t,i,a,o,c){o?(e.opacity=sn(0,i.opacity??1,cN(a)),e.opacityExit=sn(t.opacity??1,0,uN(a))):c&&(e.opacity=sn(t.opacity??1,i.opacity??1,a));for(let u=0;uat?1:i(ho(e,t,a))}function j0(e,t){e.min=t.min,e.max=t.max}function Oi(e,t){j0(e.x,t.x),j0(e.y,t.y)}function pw(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}const NR=1e-4,fN=1-NR,dN=1+NR,kR=.01,hN=0-kR,mN=0+kR;function _r(e){return e.max-e.min}function pN(e,t,i){return Math.abs(e-t)<=i}function gw(e,t,i,a=.5){e.origin=a,e.originPoint=sn(t.min,t.max,e.origin),e.scale=_r(i)/_r(t),e.translate=sn(i.min,i.max,e.origin)-e.originPoint,(e.scale>=fN&&e.scale<=dN||isNaN(e.scale))&&(e.scale=1),(e.translate>=hN&&e.translate<=mN||isNaN(e.translate))&&(e.translate=0)}function qd(e,t,i,a){gw(e.x,t.x,i.x,a?.originX),gw(e.y,t.y,i.y,a?.originY)}function yw(e,t,i,a=0){const o=a?sn(i.min,i.max,a):i.min;e.min=o+t.min,e.max=e.min+_r(t)}function gN(e,t,i,a){yw(e.x,t.x,i.x,a?.x),yw(e.y,t.y,i.y,a?.y)}function vw(e,t,i,a=0){const o=a?sn(i.min,i.max,a):i.min;e.min=t.min-o,e.max=e.min+_r(t)}function $d(e,t,i,a){vw(e.x,t.x,i.x,a?.x),vw(e.y,t.y,i.y,a?.y)}function bw(e,t,i,a,o){return e-=t,e=Gd(e,1/i,a),o!==void 0&&(e=Gd(e,1/o,a)),e}function yN(e,t=0,i=1,a=.5,o,c=e,u=e){if(sa.test(t)&&(t=parseFloat(t),t=sn(u.min,u.max,t/100)-u.min),typeof t!="number")return;let f=sn(c.min,c.max,a);e===c&&(f-=t),e.min=bw(e.min,t,i,f,o),e.max=bw(e.max,t,i,f,o)}function xw(e,t,[i,a,o],c,u){yN(e,t[i],t[a],t[o],t.scale,c,u)}const vN=["x","scaleX","originX"],bN=["y","scaleY","originY"];function ww(e,t,i,a){xw(e.x,t,vN,i?.x,a?.x),xw(e.y,t,bN,i?.y,a?.y)}const Sw=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Cw=Sw("applewebkit/")&&!Sw("chrome/")?Math.round:Bi;function Ew(e){e.min=Cw(e.min),e.max=Cw(e.max)}function xN(e){Ew(e.x),Ew(e.y)}const Rw=()=>({translate:0,scale:1,origin:0,originPoint:0}),ll=()=>({x:Rw(),y:Rw()}),Tw=()=>({min:0,max:0}),Gn=()=>({x:Tw(),y:Tw()});function Aw(e){return e.translate===0&&e.scale===1}function OR(e){return Aw(e.x)&&Aw(e.y)}function jw(e,t){return e.min===t.min&&e.max===t.max}function wN(e,t){return jw(e.x,t.x)&&jw(e.y,t.y)}function Mw(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function DR(e,t){return Mw(e.x,t.x)&&Mw(e.y,t.y)}function Nw(e){return _r(e.x)/_r(e.y)}function kw(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class SN{constructor(){this.members=[]}add(t){fy(this.members,t);for(let i=this.members.length-1;i>=0;i--){const a=this.members[i];if(a===t||a===this.lead||a===this.prevLead)continue;const o=a.instance;(!o||o.isConnected===!1)&&!a.snapshot&&(Vd(this.members,a),a.unmount())}t.scheduleRender()}remove(t){if(Vd(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const i=this.members[this.members.length-1];i&&this.promote(i)}}relegate(t){for(let i=this.members.indexOf(t)-1;i>=0;i--){const a=this.members[i];if(a.isPresent!==!1&&a.instance?.isConnected!==!1)return this.promote(a),!0}return!1}promote(t,i){const a=this.lead;if(t!==a&&(this.prevLead=a,this.lead=t,t.show(),a)){a.updateSnapshot(),t.scheduleRender();const{layoutDependency:o}=a.options,{layoutDependency:c}=t.options;(o===void 0||o!==c)&&(t.resumeFrom=a,i&&(a.preserveOpacity=!0),a.snapshot&&(t.snapshot=a.snapshot,t.snapshot.latestValues=a.animationValues||a.latestValues),t.root?.isUpdating&&(t.isLayoutDirty=!0)),t.options.crossfade===!1&&a.hide()}}exitAnimationComplete(){this.members.forEach(t=>{t.options.onExitComplete?.(),t.resumingFrom?.options.onExitComplete?.()})}scheduleRender(){this.members.forEach(t=>t.instance&&t.scheduleRender(!1))}removeLeadSnapshot(){this.lead?.snapshot&&(this.lead.snapshot=void 0)}}function Ow(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const kc={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(Ve.test(e))e=parseFloat(e);else return e;const i=Ow(e,t.target.x),a=Ow(e,t.target.y);return`${i}% ${a}%`}},CN={correct:(e,{treeScale:t,projectionDelta:i})=>{const a=e,o=bi.parse(e);if(o.length>5)return a;const c=bi.createTransformer(e),u=typeof o[0]!="number"?1:0,f=i.x.scale*t.x,d=i.y.scale*t.y;o[0+u]/=f,o[1+u]/=d;const m=sn(f,d,.5);return typeof o[2+u]=="number"&&(o[2+u]/=m),typeof o[3+u]=="number"&&(o[3+u]/=m),c(o)}},EN={borderRadius:Object.assign({},kc,{applyTo:zy.slice()}),borderTopLeftRadius:kc,borderTopRightRadius:kc,borderBottomLeftRadius:kc,borderBottomRightRadius:kc,boxShadow:CN};function RN(e,t,i){let a="";const o=e.x.translate/t.x,c=e.y.translate/t.y,u=i?.z||0;(o||c||u)&&(a=`translate3d(${o}px, ${c}px, ${u}px) `);let f="";if(i){const{transformPerspective:d}=i;d&&(a=`perspective(${d}px) ${a}`);for(let m=0;me.depth-t.depth;class AN{constructor(){this.children=[],this.isDirty=!1}add(t){fy(this.children,t),this.isDirty=!0}remove(t){Vd(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(TN),this.isDirty=!1,this.children.forEach(t)}}const Sd={hasAnimatedSinceResize:!0,hasEverUpdated:!1},Dw=["z","skew","skewZ"],jN=1e3;let MN=0;function Lw(e,t,i,a){const{latestValues:o}=t;o[e]&&(i[e]=o[e],t.setStaticValue(e,0),a&&(a[e]=0))}const hg=e=>e.instance&&El.get(e.instance)?.demote()&&e.resetSkewAndRotation();function LR(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const i=vR(t);if(window.MotionHasOptimisedAnimation(i,"transform")){const{layout:o,layoutId:c}=e.options;window.MotionCancelOptimisedAnimation(i,"transform",Wt,!(o||c))}const{parent:a}=e;a&&!a.hasCheckedOptimisedAppear&&LR(a)}function PR(e){if(e)return e.options.allowProjection!==!1?e.projection:PR(e.parent)}function _R({attachResizeListener:e,defaultParent:t,measureScroll:i,checkIsScrollRoot:a,resetTransform:o}){return Object.assign($c,{...EN,...$c}),class{static create(u,f,d){const{layoutId:m,layout:y,drag:v,dragConstraints:w,layoutScroll:x,layoutRoot:C,layoutAnchor:E,layoutCrossfade:S}=f,T=u.projection=new this(u.latestValues,f["data-framer-portal-id"]?void 0:PR(u.parent));T.setOptions({layoutId:m,layout:y,alwaysMeasureLayout:!!v||w&&aN(w),visualElement:u,animationType:typeof y=="string"?y:"both",initialPromotionConfig:d,crossfade:S,layoutScroll:x,layoutRoot:C,layoutAnchor:E});const j=T.getStack()?.lead;j&&!T.root.isUpdateBlocked()&&(j.willUpdate(),j.scheduleCheckAfterUnmount())}constructor(u={},f=t?.()){this.id=MN++,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.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(ON),this.nodes.forEach(IN),this.nodes.forEach(BN),this.nodes.forEach(DN)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=u,this.root=f?f.root||f:this,this.path=f?[...f.path,f]:[],this.parent=f,this.depth=f?f.depth+1:0;for(let d=0;dthis.root.updateBlockedByResize=!1;Wt.read(()=>{v=window.innerWidth}),e(u,()=>{const x=window.innerWidth;x!==v&&(v=x,this.root.updateBlockedByResize=!0,y?.(),y=iN(w,250),Sd.hasAnimatedSinceResize&&(Sd.hasAnimatedSinceResize=!1,this.nodes.forEach(zw)))})}f&&this.root.registerSharedNode(f,this),this.addLayoutListener()}addLayoutListener(){const{layoutId:u,layout:f,visualElement:d,animate:m}=this.options;!this.instance||this.hasLayoutListener||m===!1||!d||!(u||f)||(this.hasLayoutListener=!0,this.addEventListener("didUpdate",({delta:y,hasLayoutChanged:v,hasRelativeLayoutChanged:w,layout:x})=>{if(this.isAnimationBlocked){this.target=void 0,this.relativeTarget=void 0;return}const C=this.options.transition||d.getDefaultTransition()||GN,{onLayoutAnimationStart:E,onLayoutAnimationComplete:S}=d.getProps(),T=!this.targetLayout||!DR(this.targetLayout,x),j=!v&&w;if(this.options.layoutRoot||this.resumeFrom||j||v&&(T||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const L={...Ly(C,"layout"),onPlay:E,onComplete:S};(d.shouldReduceMotion||this.options.layoutRoot)&&(L.delay=0,L.type=!1),this.startAnimation(L),this.setAnimationOrigin(y,j,L.path)}else v||zw(this),this.isLead()&&this.options.onExitComplete?.();this.targetLayout=x}))}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this),this.getStack()?.remove(this),this.parent?.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),this.hasLayoutListener=!1,Jr(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes?.forEach(HN),this.animationId++)}getTransformTemplate(){const{visualElement:u}=this.options;return u&&u.getProps().transformTemplate}willUpdate(u=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete?.();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&LR(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;hg(this),this.isLayoutDirty=!0;for(let y=0;yu.members.length?u.removeLeadSnapshot():this.sharedNodes.delete(f))}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Wt.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Wt.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!_r(this.snapshot.measuredBox.x)&&!_r(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 d=0;d{const O=N/1e3,P=L?.(O);Vw(w.x,u.x,O),Vw(w.y,u.y,O),P&&(w.x.translate=P.x,w.y.translate=P.y),this.setTargetDelta(w),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&($d(x,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),FN(this.relativeTarget,this.relativeTargetOrigin,x,O),j&&wN(this.relativeTarget,j)&&(this.isProjectionDirty=!1),j||(j=Gn()),Oi(j,this.relativeTarget)),C&&(this.animationValues=v,lN(v,y,this.latestValues,O,T,S)),P?.rotate!==void 0&&(this.animationValues||(this.animationValues=v),this.animationValues.pathRotation=P.rotate),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=O},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(u){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(Jr(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Wt.update(()=>{Sd.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Rl(0)),this.motionValue.jump(0,!1),this.currentAnimation=rN(this.motionValue,[0,1e3],{...u,velocity:0,isSync:!0,onUpdate:f=>{this.mixTargetDelta(f),u.onUpdate&&u.onUpdate(f)},onComplete:()=>{u.onComplete&&u.onComplete(),this.completeAnimation()}}),MM(this.currentAnimation,this),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 u=this.getStack();u&&u.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta?.(jN),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const u=this.getLead(),{targetWithTransforms:f,layout:d,latestValues:m}=u;let{target:y}=u;if(!(!f||!y||!d)){if(this!==u&&this.layout&&d&&zR(this.options.animationType,this.layout.layoutBox,d.layoutBox)){const{layoutBox:v}=this.layout,w=y;y=this.target||Gn(),Iw(y.x,w.x,v.x),Iw(y.y,w.y,v.y)}Oi(f,y),xd(f,m),qd(this.projectionDeltaWithTransform,this.layoutCorrected,f,m)}}registerSharedNode(u,f){this.sharedNodes.has(u)||this.sharedNodes.set(u,new SN),this.sharedNodes.get(u).add(f);const m=f.options.initialPromotionConfig;f.promote({transition:m?.transition,preserveFollowOpacity:m?.shouldPreserveFollowOpacity?m.shouldPreserveFollowOpacity(f):void 0})}isLead(){const u=this.getStack();return u?u.lead===this:!0}getLead(){const{layoutId:u}=this.options;return u?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:u}=this.options;return u?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:u}=this.options;if(u)return this.root.sharedNodes.get(u)}promote({needsReset:u,transition:f,preserveFollowOpacity:d}={}){this.getStack()?.promote(this,d),u&&(this.projectionDelta=void 0,this.needsReset=!0),f&&this.setOptions({transition:f})}relegate(){return this.getStack()?.relegate(this)||!1}resetSkewAndRotation(){const{visualElement:u}=this.options;if(!u)return;const{latestValues:f}=u;if(!RR(f))return;const d={};for(let m=0;mu.currentAnimation?.stop()),this.root.nodes.forEach(Pw),this.root.sharedNodes.clear()}}}function NN(e){e.updateLayout(),_N(e)}function kN(e){const t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:i,measuredBox:a}=e.layout,{animationType:o}=e.options,c=t.source!==e.layout.source,u=(x,C)=>{if(o==="size")zi(E=>{const S=_r(x[E]);x[E].min=C[E].min,x[E].max=x[E].min+S});else if(o==="x"||o==="y"){const E=o==="x"?"y":"x";j0(x[E],C[E])}else zR(o,t.layoutBox,i)&&zi(E=>{const S=_r(C[E]);x[E].max=x[E].min+S,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[E].max=e.relativeTarget[E].min+S)})},f=c?t.measuredBox:t.layoutBox;u(f,i);const d=ll();qd(d,i,t.layoutBox);const m=ll();qd(m,c?e.applyTransform(a,!0):i,f);const y=!OR(d);let v=!1;const w=e.getClosestProjectingParent();if((!c||w?.options.layoutRoot&&e.resumeFrom?.path.includes(w))&&w&&!w.resumeFrom){const{snapshot:x,layout:C}=w;if(x&&C){const E=e.options.layoutAnchor||void 0,S=Gn();$d(S,c?e.resumeFrom.applyTransform(t.layoutBox,!0,void 0,!0,w.depth+1):t.layoutBox,x.layoutBox,E);const T=Gn();$d(T,i,C.layoutBox,E),c&&u(S,T),DR(S,T)||(v=!0),w.options.layoutRoot&&(e.relativeTarget=T,e.relativeTargetOrigin=S,e.relativeParent=w)}}e.notifyListeners("didUpdate",{layout:i,snapshot:t,delta:m,layoutDelta:d,hasLayoutChanged:y,hasRelativeLayoutChanged:v})}else e.isLead()&&e.options.onExitComplete?.();e.options.transition=void 0}function ON(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function DN(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function LN(e){e.clearSnapshot()}function Pw(e){e.clearMeasurements()}function PN(e){e.isLayoutDirty=!0,e.updateLayout()}function _w(e){e.isLayoutDirty=!1}function _N(e){const{snapshot:t,dragAncestor:i}=e,a=i?.isAnimationBlocked&&i.layout;if(!t||!a||e.resumeFrom||e.isAnimationBlocked)return;const o=i.dragSnapshot;zi(c=>Ui(t.layoutBox[c],a.layoutBox[c].min-o.layoutBox[c].min))}function zN(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.dragSnapshot||e.layout,e.isLayoutDirty=!0)}function VN(e){e.relativeTarget&&e.relativeParent?.isLayoutDirty&&(e.currentAnimation?e.isLayoutDirty=!0:(e.targetDelta=void 0,e.removeRelativeTarget()))}function UN(e){const{visualElement:t}=e.options;t?.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function zw(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function IN(e){e.resolveTargetDelta()}function BN(e){e.calcProjection()}function HN(e){e.resetSkewAndRotation()}function Vw(e,t,i){e.translate=sn(t.translate,0,i),e.scale=sn(t.scale,1,i),e.origin=t.origin,e.originPoint=t.originPoint}function Uw(e,t,i,a){e.min=sn(t.min,i.min,a),e.max=sn(t.max,i.max,a)}function FN(e,t,i,a){Uw(e.x,t.x,i.x,a),Uw(e.y,t.y,i.y,a)}function YN(e){return e.animationValues?.opacityExit!==void 0}const GN={duration:.45,ease:[.4,0,.1,1]};function Iw(e,t,i){e.max=_r(i)+(e.min=t.min)}function zR(e,t,i){return e==="position"||e==="preserve-aspect"&&!pN(Nw(t),Nw(i),.2)}function qN(e){return e!==e.root&&e.scroll?.wasRoot}function mo(e,t,i,a={passive:!0}){return e.addEventListener(t,i,a),()=>e.removeEventListener(t,i,a)}const $N=_R({attachResizeListener:(e,t)=>mo(e,"resize",t),measureScroll:nN,checkIsScrollRoot:()=>!0}),Cd={current:void 0},VR=_R({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Cd.current){const e=new $N({});e.mount(window),e.setOptions({layoutScroll:!0}),Cd.current=e}return Cd.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),KN=new WeakMap;function vh(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function mu(e){return typeof e=="string"||Array.isArray(e)}const bh=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Bw=["initial"].concat(bh);function xh(e){if(vh(e.animate))return!0;for(let t=0;tKd.current=e.matches;e.addEventListener("change",t),t()}else Kd.current=!1}const Hw=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let Xd={};function BR(e){Xd=e}function ZN(){return Xd}class QN{scrapeMotionValuesFromProps(t,i,a){return{}}constructor({parent:t,props:i,presenceContext:a,reducedMotionConfig:o,skipAnimations:c,blockInitialAnimation:u,visualState:f},d={}){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=Ny,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 x=Ht.now();this.renderScheduledAto.delete(this)}}this.values.forEach((a,o)=>this.bindToMotionValue(o,a)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(Hy.current||IR(),this.shouldReduceMotion=Kd.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection?.unmount(),Jr(this.notifyUpdate),Jr(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree?.(),this.parent?.removeChild(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const i=this.features[t];i&&(i.unmount(),i.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),(this.enteringChildren||(this.enteringChildren=new Set)).add(t)}removeChild(t){this.children.delete(t),this.enteringChildren?.delete(t)}bindToMotionValue(t,i){if(this.valueSubscriptions.get(t)?.(),i.accelerate&&w0.has(t)&&this.current instanceof HTMLElement){const{factory:u,keyframes:f,times:d,ease:m,duration:y}=i.accelerate,v=new lR({element:this.current,name:t,keyframes:f,times:d,ease:m,duration:Tr(y)}),w=u(v);this.valueSubscriptions.set(t,()=>{w(),v.cancel()});return}const a=Rs.has(t);a&&this.onBindTransform&&this.onBindTransform();const o=i.on("change",u=>{this.latestValues[t]=u,this.props.onUpdate&&Wt.preRender(this.notifyUpdate),a&&(this.projection&&(this.projection.isTransformDirty=!0),El.get(this.current)?.check()),this.scheduleRender()});let c;typeof window<"u"&&window.MotionCheckAppearSync&&(c=window.MotionCheckAppearSync(this,t,i)),this.valueSubscriptions.set(t,()=>{o(),c?.()})}sortNodePosition(t){return!this.current||!t.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in Xd){const i=Xd[t];if(!i)continue;const{isEnabled:a,Feature:o}=i;if(!this.features[t]&&o&&a(this.props)&&(this.features[t]=new o(this)),this.features[t]){const c=this.features[t];c.isMounted?c.update():(c.mount(),c.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Gn()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,i){this.latestValues[t]=i}update(t,i){const{transformTemplate:a,onUpdate:o}=this.props;(t.transformTemplate||a)&&this.scheduleRender(),(t.transformTemplate&&!a||t.onUpdate&&!o)&&El.get(this.current)?.demote(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=i;for(let c=0;c{this.current&&(this.current.textContent=`${i}`)}))}}function FR(e,{style:t,vars:i},a,o){const c=e.style;let u;for(u in t)c[u]=t[u];o?.applyProjectionStyles(c,a);for(u in i)c.setProperty(u,i[u])}function YR(e,{layout:t,layoutId:i}){return Rs.has(e)||e.startsWith("origin")||(t||i!==void 0)&&(!!$c[e]||e==="opacity")}function Fy(e,t,i){const a=e.style,o=t?.style,c={};if(!a)return c;for(const u in a)(ur(a[u])||o&&ur(o[u])||YR(u,e)||i?.getValue(u)?.liveStyle!==void 0)&&(c[u]=a[u]);return c}function JN(e){return window.getComputedStyle(e)}class e8 extends HR{constructor(){super(...arguments),this.type="html",this.renderInstance=FR}mount(t){super.mount(t)}readValueFromInstance(t,i){if(Rs.has(i))return this.projection?.isProjecting?du(i):UM(t,i);{const a=JN(t),o=(_E(i)?a.getPropertyValue(i):a[i])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:i}){return jR(t,i)}build(t,i,a){By(t,i,a.transformTemplate)}scrapeMotionValuesFromProps(t,i,a){return Fy(t,i,a)}}const pu=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;function Yy(e){return{point:{x:e.pageX,y:e.pageY}}}const t8=e=>t=>pu(t)&&e(t,Yy(t));function eu(e,t,i,a){return mo(e,t,t8(i),a)}const Ed=new WeakMap;let Rd;const GR=(e,t,i)=>(a,o)=>o&&o[0]?o[0][e+"Size"]:Vy(a)&&"getBBox"in a?a.getBBox()[t]:a[i],n8=GR("inline","width","offsetWidth"),r8=GR("block","height","offsetHeight");function i8({target:e,borderBoxSize:t}){Ed.get(e)?.forEach(i=>{i(e,{get width(){return n8(e,t)},get height(){return r8(e,t)}})})}function a8(e){e.forEach(i8)}function s8(){typeof ResizeObserver>"u"||(Rd=new ResizeObserver(a8))}function o8(e,t){Rd||s8();const i=xR(e);return i.forEach(a=>{let o=Ed.get(a);o||(o=new Set,Ed.set(a,o)),o.add(t),Rd?.observe(a)}),()=>{i.forEach(a=>{const o=Ed.get(a);o?.delete(t),o?.size||Rd?.unobserve(a)})}}const Td=new Set;let cl;function l8(){cl=()=>{const e={get width(){return window.innerWidth},get height(){return window.innerHeight}};Td.forEach(t=>t(e))},window.addEventListener("resize",cl)}function c8(e){return Td.add(e),cl||l8(),()=>{Td.delete(e),!Td.size&&typeof cl=="function"&&(window.removeEventListener("resize",cl),cl=void 0)}}function Fw(e,t){return Uy(typeof e=="function"?c8(e):o8(e,t))}const Yw=(e,t)=>Math.abs(e-t);function u8(e,t){const i=Yw(e.x,t.x),a=Yw(e.y,t.y);return Math.sqrt(i**2+a**2)}const Gw=new Set(["auto","scroll"]);class qR{constructor(t,i,{transformPagePoint:a,contextWindow:o=window,dragSnapToOrigin:c=!1,distanceThreshold:u=3,element:f,immediate:d}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.onElementScroll=C=>{this.handleScroll(C.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.hasPendingMove=!1,this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=Wf(this.lastRawMoveEventInfo,this.transformPagePoint));const C=pg(this.lastMoveEventInfo,this.history),E=this.startEvent!==null,S=u8(C.offset,{x:0,y:0})>=this.distanceThreshold;if(!E&&!S)return;const{point:T}=C;this.history.push({...T,timestamp:Ht.now()});const{onStart:j,onMove:L}=this.handlers;E||(j?.(this.lastMoveEvent,C),this.startEvent=this.lastMoveEvent),L?.(this.lastMoveEvent,C)},this.handlePointerMove=(C,E)=>{this.handleScroll(window),this.lastMoveEvent=C,this.lastRawMoveEventInfo=E,this.lastMoveEventInfo=Wf(E,this.transformPagePoint),this.hasPendingMove=!0,Wt.update(this.updatePoint,!0)},this.handlePointerUp=(C,E)=>{this.hasPendingMove&&this.updatePoint(),this.end();const{onEnd:S,onSessionEnd:T,resumeAnimation:j}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&j?.(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const L=pg(C.type==="pointercancel"?this.lastMoveEventInfo:Wf(E,this.transformPagePoint),this.history);this.startEvent&&S?.(C,L),T?.(C,L)},!pu(t))return;this.dragSnapToOrigin=c,this.handlers=i,this.transformPagePoint=a,this.distanceThreshold=d?0:u,this.contextWindow=o||window;const m=Yy(t),y=Wf(m,this.transformPagePoint),{point:v}=y;this.history=[{...v,timestamp:Ht.now()}];const{onSessionStart:w}=i;w&&w(t,pg(y,this.history));const x={passive:!0,capture:!0};this.removeListeners=Sl(eu(this.contextWindow,"pointermove",this.handlePointerMove,x),eu(this.contextWindow,"pointerup",this.handlePointerUp,x),eu(this.contextWindow,"pointercancel",this.handlePointerUp,x)),f&&this.startScrollTracking(f),d&&(this.handlePointerMove(t,m),this.updatePoint())}startScrollTracking(t){let i=t.parentElement;for(;i;){const a=getComputedStyle(i);(Gw.has(a.overflowX)||Gw.has(a.overflowY))&&this.scrollPositions.set(i,mg(i)),i=i.parentElement}this.scrollPositions.set(window,mg(window)),this.removeScrollListeners=Sl(mo(window,"scroll",this.onElementScroll,{capture:!0}),mo(window,"scroll",this.onWindowScroll,{}))}handleScroll(t){const i=this.scrollPositions.get(t);if(!i)return;const a=t===window,o=mg(t),c={x:o.x-i.x,y:o.y-i.y};c.x===0&&c.y===0||(a?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=c.x,this.lastMoveEventInfo.point.y+=c.y):this.history.length>0&&(this.history[0].x-=c.x,this.history[0].y-=c.y),this.scrollPositions.set(t,o),Wt.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners?.(),this.removeScrollListeners?.(),this.scrollPositions.clear(),Jr(this.updatePoint)}}const mg=e=>e===window?{x:window.scrollX,y:window.scrollY}:{x:e.scrollLeft,y:e.scrollTop};function Wf(e,t){return t?{point:t(e.point)}:e}function qw(e,t){return{x:e.x-t.x,y:e.y-t.y}}function pg({point:e},t){return{point:e,delta:qw(e,$R(t)),offset:qw(e,f8(t)),velocity:d8(t,.1)}}function f8(e){return e[0]}function $R(e){return e[e.length-1]}function d8(e,t){if(e.length<2)return{x:0,y:0};let i=e.length-1,a=null;const o=$R(e);for(;i>=0&&(a=e[i],!(o.timestamp-a.timestamp>Tr(t)));)i--;if(!a)return{x:0,y:0};a===e[0]&&e.length>2&&o.timestamp-a.timestamp>Tr(t)*2&&(a=e[1]);const c=ei(o.timestamp-a.timestamp);if(c===0)return{x:0,y:0};const u={x:(o.x-a.x)/c,y:(o.y-a.y)/c};return u.x===1/0&&(u.x=0),u.y===1/0&&(u.y=0),u}const h8=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function m8(e){return h8.has(e.tagName)||e.isContentEditable===!0}const p8=new Set(["INPUT","SELECT","TEXTAREA"]);function g8(e){return p8.has(e.tagName)||e.isContentEditable===!0}const Pi={x:!1,y:!1};function Wd(){return Pi.x||Pi.y}function y8(e){return e==="x"||e==="y"?Pi[e]?null:(Pi[e]=!0,()=>{Pi[e]=!1}):Pi.x||Pi.y?null:(Pi.x=Pi.y=!0,()=>{Pi.x=Pi.y=!1})}function v8(e,{min:t,max:i},a){return t!==void 0&&ei&&(e=a?sn(i,e,a.max):Math.min(e,i)),e}function $w(e,t,i){return{min:t!==void 0?e.min+t:void 0,max:i!==void 0?e.max+i-(e.max-e.min):void 0}}function b8(e,{top:t,left:i,bottom:a,right:o}){return{x:$w(e.x,i,o),y:$w(e.y,t,a)}}function Kw(e,t){let i=t.min-e.min,a=t.max-e.max;return t.max-t.mina?i=ho(t.min,t.max-a,e.min):a>o&&(i=ho(e.min,e.max-o,t.min)),Ba(0,1,i)}function S8(e,t){const i={};return t.min!==void 0&&(i.min=t.min-e.min),t.max!==void 0&&(i.max=t.max-e.min),i}const M0=.35;function C8(e=M0){return e===!1?e=0:e===!0&&(e=M0),{x:Xw(e,"left","right"),y:Xw(e,"top","bottom")}}function Xw(e,t,i){return{min:Ww(e,t),max:Ww(e,i)}}function Ww(e,t){return typeof e=="number"?e:e[t]||0}function Zw(e){let t="";for(const i of e.path){i.scroll=void 0,i.updateScroll();const{scroll:a}=i;i!==e.root&&a&&(t+=a.offset.x+","+a.offset.y+",")}return t}const E8=new WeakMap;class R8{constructor(t,i=()=>t.getProps()){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Gn(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t,this.readProps=i}start(t,i={}){if(this.visualElement.presenceContext?.isPresent===!1)return;const a=m=>{i.snapToCursor&&this.snapToCursor(m),this.stopAnimation()},o=(m,y)=>{const{drag:v,dragConstraints:w,dragPropagation:x,onDragStart:C}=this.getProps();if(v&&!x&&(this.openDragLock?.(),this.openDragLock=y8(v),!this.openDragLock))return;this.latestPointerEvent=m,this.latestPanInfo=y,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints();const{projection:E}=this.visualElement;E&&(E.isAnimationBlocked=!0,E.target=void 0),zi(S=>{let T=this.getAxisMotionValue(S).get()||0;if(yh(T)&&(T=_y(T,this.visualElement.current)||0),Ve.test(T))T=parseFloat(T);else if(sa.test(T)){const j=E?.layout?.layoutBox[S];j&&(T=_r(j)*(parseFloat(T)/100))}this.originPoint[S]=T}),this.point=typeof w=="function"&&w(this),C&&Wt.update(()=>C(m,y),!1,!0),E0(this.visualElement,"transform"),this.visualElement.animationState?.setActive("whileDrag",!0)},c=(m,y)=>{this.latestPointerEvent=m,this.latestPanInfo=y;const{dragPropagation:v,dragDirectionLock:w,onDirectionLock:x,onDrag:C}=this.getProps();if(!v&&!this.openDragLock)return;const{offset:E}=y;if(w&&this.currentDirection===null){if(this.currentDirection=A8(E),this.currentDirection===null)return;x&&x(this.currentDirection)}this.updateAxis("x",E),this.updateAxis("y",E),this.point&&this.point.move(),this.visualElement.render(),C&&Wt.update(()=>C(m,y),!1,!0)},u=(m,y)=>{this.latestPointerEvent=m,this.latestPanInfo=y,this.stop(m,y),this.latestPointerEvent=null,this.latestPanInfo=null},f=()=>{const{dragSnapToOrigin:m}=this.getProps();(m||this.constraints||this.point)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:d}=this.getProps();this.panSession=new qR(t,{onSessionStart:a,onStart:o,onMove:c,onSessionEnd:u,resumeAnimation:f},{...i,transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:d,contextWindow:this.visualElement.current?.ownerDocument.defaultView,element:this.visualElement.current})}stop(t,i,a){const o=t||this.latestPointerEvent,c=i||this.latestPanInfo,u=this.isDragging;if(this.cancel(),!u||!c||!o)return;const{velocity:f}=c;this.startAnimation(f,a);const{onDragEnd:d}=this.getProps();d&&Wt.postRender(()=>d(o,c))}cancel(){this.isDragging=!1;const{projection:t,animationState:i}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.endPanSession(),!this.getProps().dragPropagation&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),i?.setActive("whileDrag",!1)}endPanSession(){this.panSession?.end(),this.panSession=void 0}updateAxis(t,i){const{drag:a}=this.readProps();if(!i||!Qo(t,a,this.currentDirection))return;const o=this.getAxisMotionValue(t);let c=this.originPoint[t]+i[t];const u=this.constraints&&this.constraints[t];u&&(c=v8(c,u,this.elastic[t])),this.point?this.point[t]=c:o.set(c)}resolveConstraints(){const{dragConstraints:t,dragElastic:i}=this.getProps(),{projection:a}=this.visualElement,o=a&&(a.layout||a.measure(!1)),c=this.constraints;Oc(t)?(!this.constraints||this.scroll!==Zw(a))&&(this.constraints=this.resolveRefConstraints()):t&&o&&typeof t=="object"?this.constraints=b8(o.layoutBox,t):this.constraints=!1,this.elastic=C8(i),c!==this.constraints&&!Oc(t)&&o&&this.constraints&&!this.hasMutatedConstraints&&zi(u=>{this.constraints!==!1&&this.getAxisMotionValue(u)&&(this.constraints[u]=S8(o.layoutBox[u],this.constraints[u]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:i}=this.getProps();if(!Oc(t))return!1;const a=Qw(t),{projection:o}=this.visualElement;if(!o||!o.layout)return!1;this.scroll=Zw(o);const c=tN(a,o.root,this.visualElement.getTransformPagePoint());let u=x8(o.layout.layoutBox,o.removeElementScroll(c));if(i){const f=i(Q6(u));this.hasMutatedConstraints=!!f,f&&(u=ER(f))}return u}startAnimation(t,i){const{drag:a,dragMomentum:o,dragElastic:c,dragTransition:u,dragSnapToOrigin:f,onDragTransitionEnd:d}=this.getProps(),m={bounceStiffness:c?200:1e6,bounceDamping:c?40:1e7,timeConstant:750,restDelta:1,restSpeed:10,...u},y=x=>o&&!(this.point&&f)&&Qo(x,i||a,this.currentDirection)?t[x]:0;if(this.point&&!f)return this.point.release({x:y("x"),y:y("y")},m).then(d);const v=this.constraints||{},w=zi(x=>{if(!Qo(x,i||a,this.currentDirection))return;let C=v[x]||{};(f===!0||f===x)&&(C={min:0,max:0});const E={type:"inertia",velocity:y(x),...m,...C};return this.startAxisValueAnimation(x,E)});return Promise.all(w).then(d)}startAxisValueAnimation(t,i){const a=this.getAxisMotionValue(t);return E0(this.visualElement,t),a.start(Py(t,a,0,i,this.visualElement,!1))}stopAnimation(){zi(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){const i=`_drag${t.toUpperCase()}`,o=this.readProps()[i];return o||this.visualElement.getValue(t,this.visualElement.latestValues[t]??0)}snapToCursor({clientX:t,clientY:i}){const{drag:a}=this.getProps(),o={x:t,y:i},c=this.visualElement.getTransformPagePoint()?.(o)||o,u=this.visualElement.measureViewportBox();zi(f=>{if(!Qo(f,a,this.currentDirection))return;const d=this.getAxisMotionValue(f),{min:m,max:y}=u[f];d.set((d.get()||0)+c[f]-sn(m,y,.5))})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:i}=this.getProps(),{projection:a}=this.visualElement;if(!Oc(i)||!a||!this.constraints)return;this.stopAnimation();const o=this.constraints,c={x:0,y:0};zi(f=>{const d=this.getAxisMotionValue(f).get();c[f]=w8({min:d,max:d},o[f])});const{transformTemplate:u}=this.visualElement.getProps();this.visualElement.current.style.transform=u?u({},""):"none",a.root?.updateScroll(),a.updateLayout(),this.constraints=!1,this.resolveConstraints(),zi(f=>{const d=this.getAxisMotionValue(f);if(!Qo(f,t,null)||!d.get())return;const{min:m,max:y}=this.constraints[f];d.set(sn(m,y,c[f]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;E8.set(this.visualElement,this);const t=this.visualElement.current,i=eu(t,"pointerdown",m=>{const{drag:y,dragListener:v=!0}=this.getProps(),w=m.target,x=w!==t&&g8(w);y&&v&&!x&&this.start(m)});let a;const o=()=>{const{dragConstraints:m}=this.getProps(),y=Oc(m)&&Qw(m);y&&(this.constraints=this.resolveRefConstraints(),a||(a=T8(t,y,()=>this.scalePositionWithinConstraints())))},{projection:c}=this.visualElement,u=c.addEventListener("measure",o);c.layout||(c.root?.updateScroll(),c.updateLayout()),Wt.read(o);const f=mo(window,"resize",()=>this.scalePositionWithinConstraints()),d=c.addEventListener("didUpdate",(({delta:m,hasLayoutChanged:y})=>{this.isDragging&&y&&(zi(v=>{if(!Qo(v,this.getProps().drag,this.currentDirection))return;const w=this.getAxisMotionValue(v);this.originPoint[v]+=m[v].translate,w.set(w.get()+m[v].translate)}),this.visualElement.render())}));return()=>{f(),i(),u(),d(),a?.()}}getProps(){const t=this.readProps(),{dragElastic:i=M0,dragMomentum:a=!0}=t;return{...t,dragElastic:i,dragMomentum:a}}}function Oc(e){return!!e&&typeof e=="object"&&("current"in e||"nodeType"in e)}const Qw=e=>"current"in e?e.current:e;function Jw(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function T8(e,t,i){const a=Fw(e,Jw(i)),o=Fw(t,Jw(i));return()=>{a(),o()}}function Qo(e,t,i){return(t===!0||t===e)&&(i===null||i===e)}function A8(e,t=10){let i=null;return Math.abs(e.y)>t?i="y":Math.abs(e.x)>t&&(i="x"),i}function KR(e,t){const i=xR(e),a=new AbortController,o={passive:!0,...t,signal:a.signal},c=Uy(()=>a.abort());return[i,o,c]}function j8(e){return!(e.pointerType==="touch"||Wd())}function M8(e,t,i={}){t=Iy(t);const[a,o,c]=KR(e,i);return a.forEach(u=>{let f=!1,d=!1,m;const y=()=>{u.removeEventListener("pointerleave",C)},v=S=>{m&&(m(S),m=void 0),y()},w=S=>{f=!1,window.removeEventListener("pointerup",w),window.removeEventListener("pointercancel",w),d&&(d=!1,v(S))},x=()=>{f=!0,window.addEventListener("pointerup",w,o),window.addEventListener("pointercancel",w,o)},C=S=>{if(S.pointerType!=="touch"){if(f){d=!0;return}v(S)}},E=S=>{if(!j8(S))return;d=!1;const T=t(u,S);typeof T=="function"&&(m=T,u.addEventListener("pointerleave",C,o))};u.addEventListener("pointerenter",E,o),u.addEventListener("pointerdown",x,o)}),c}const XR=(e,t)=>t?e===t?!0:XR(e,t.parentElement):!1,N0=new WeakSet;function eS(e){return t=>{t.key==="Enter"&&e(t)}}function gg(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const N8=(e,t)=>{let i=!1;const a=eS(()=>{i||N0.has(e)||(i=!0,gg(e,"down"))}),o=eS(()=>{i&&(i=!1,gg(e,"up"))});e.addEventListener("keydown",a,t),e.addEventListener("keyup",o,t),e.addEventListener("blur",()=>{e.removeEventListener("keydown",a),e.removeEventListener("keyup",o),i&&gg(e,"cancel")},{...t,once:!0})};function k8(e){return pu(e)&&!Wd()}const tS=new WeakSet,O8=100,D8=8,nS=(e,t,i)=>Math.hypot(e.clientX-t.clientX,e.clientY-t.clientY)>i,rS=e=>e.preventDefault();function L8(e,t,i={}){t=Iy(t);const[a,o,c]=KR(e,i),u=new WeakMap,f=d=>{const m=d.currentTarget;if(!k8(d)||tS.has(d))return;i.stopPropagation&&tS.add(d);const{count:y=1,countTimeout:v=.3,hold:w=0,repeat:x}=i,C=Ht.now(),E=Tr(w),S=Tr(v);let T=u.get(m);T?.expire(nS(T.event,d,O8))?T=void 0:T&&(Jr(T.expire),u.delete(m));const j=T?T.count+1:1,L=j>=y,N=L&&(w||x);let O=!w,P=0,k;if(N0.add(m),T)k=T.handlers;else{const Q=t(m,d);k=typeof Q=="function"?{onComplete:Q}:Q||{}}L&&O&&k.onActive?.();const A=Tr(x);let H=E||A,Y=C+H,Z=!0;const $=()=>{if(o.signal.aborted)return Jr($);let Q=Math.min(1-(Y-Ht.now())/H,1);Z&&Q<1&&(Q=0),Z=!1,k.onHold?.(Q),!(Q<1)&&(O?k.onRepeat?.(++P):(O=!0,k.onActive?.()),x?(Z=!0,Y+=H=A):Jr($))},K={...o,capture:!0},ee=(Q,F)=>{if(window.removeEventListener("pointerup",re,K),window.removeEventListener("pointercancel",V,K),window.removeEventListener("pointermove",X,K),m.removeEventListener("contextmenu",rS),Jr($),N0.delete(m),!!pu(Q))if(Wd()&&(F=!1),F&&!L){const z=Ht.now(),M=_=>{const I=o.signal.aborted;if(I||_===!0||Ht.now()-z>S)return Jr(M),u.delete(m),I||k.onComplete?.(Q,{success:!1}),!0};u.set(m,{count:j,event:d,handlers:k,expire:M}),Wt.update(M,!0)}else k.onComplete?.(Q,{success:F&&O})},re=Q=>{ee(Q,m===window||m===document||i.useGlobalTarget||XR(m,Q.target))},V=Q=>{ee(Q,!1)},X=Q=>{pu(Q)&&((x||!O)&&nS(d,Q,D8)||y>1&&Wd())&&V(Q)};window.addEventListener("pointerup",re,K),window.addEventListener("pointercancel",V,K),(N||y>1)&&window.addEventListener("pointermove",X,K),N&&(Wt.update($,!0),m.addEventListener("contextmenu",rS,{...o,passive:!1}))};return a.forEach(d=>{(i.useGlobalTarget?window:d).addEventListener("pointerdown",f,o),bd(d)&&(d.addEventListener("focus",()=>N8(d,o),o),!m8(d)&&!d.hasAttribute("tabindex")&&(d.tabIndex=0))}),c}class Ds{constructor(t){this.isMounted=!1,this.node=t}update(){}}const WR=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"]),ZR=e=>typeof e=="string"&&e.toLowerCase()==="svg";function P8(e,t,i,a){FR(e,t,void 0,a);for(const o in t.attrs)e.setAttribute(WR.has(o)?o:wR(o),t.attrs[o])}function QR(e,t,i){const a=Fy(e,t,i);for(const o in e)if(o!=="children"&&(ur(e[o])||ur(t[o]))){const c=Ia.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;a[c]=e[o]}return a}class _8 extends HR{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Gn}getBaseTargetFromProps(t,i){return Rs.has(i)?super.getBaseTargetFromProps(t,i)??du(i):t[i]}getDefaultValue(t){return Rs.has(t)?this.latestValues[t]??du(t):void 0}readValueFromInstance(t,i){if(Rs.has(i)){const a=tR(i);return a&&a.default||0}if(SR.includes(i)){const o=getComputedStyle(t)[i];if(typeof o=="string"&&o)return o.trim()}return i=WR.has(i)?i:wR(i),t.getAttribute(i)}scrapeMotionValuesFromProps(t,i,a){return QR(t,i,a)}build(t,i,a){CR(t,i,this.isSVGTag,a.transformTemplate,a.style)}renderInstance(t,i,a,o){P8(t,i,a,o)}mount(t){this.isSVGTag=ZR(t.tagName),super.mount(t)}}function JR(e,t){if(!Array.isArray(t))return!1;const i=t.length;if(i!==e.length)return!1;for(let a=0;ae?.out===!0?e:e?.out;function V8(e){let t=f=>Promise.all(f.map(({animation:d,options:m})=>B6(e,d,m))),i=aS(),a=!0,o=!1;function c(f){const{props:d,parent:m,manuallyAnimateOnMount:y}=e,{initial:v}=d,w=a||o,x=[],C=(O=v)=>typeof O!="boolean"&&co(e,Array.isArray(O)?O[0]:O,e.presenceContext?.custom)||void 0,E=new Map;let S={},T=1/0,j=e;do j=j.props.inherit!==!1&&j.parent;while(j&&!j.isControllingVariants);const L=w&&iS(C(v??(j&&j.props.initial))?.transition);if(z8.forEach((O,P)=>{const k=i[O],A=d[O],H=j&&j.props[O],Y=A!==void 0?A:mu(H)||H===!1?H:void 0,Z=mu(Y),$=O===f?k.isActive:null,K=Z&&A===void 0&&!(w&&y);if(k.protectedKeys={...S},!k.isActive&&$===null||!Y&&!k.prevProp||vh(Y)||typeof Y=="boolean")return;if($===!1&&(T=P),O==="exit"&&k.isActive&&$!==!0){S={...S,...k.prevResolvedValues};return}const ee=U8(k.prevProp,Y);let re=ee||Z&&($&&!K||P>T),V=!1;const X=Array.isArray(Y)?Y:[Y];let Q={},F;if($!==!1)for(const M of X){const{transition:_,transitionEnd:I,...B}=co(e,M,pR(e,O))||{};Q={...Q,...B,...I},F=iS(_)||F}const{prevResolvedValues:z}=k;for(const M in{...z,...Q}){if(M in S)continue;const _=Q[M],I=z[M],B=Array.isArray(_)&&Array.isArray(I)?!JR(_,I)||ee:_!==I;let W;if(B&&_==null)E.has(M)||E.set(M,k.prevOut);else if(B||_!==void 0&&E.has(M)){re=!0,W=E.get(M)||L,E.delete(M)&&(V=!0),k.needsAnimating[M]=!0;const ie=e.getValue(M);ie&&(ie.liveStyle=!1)}else k.protectedKeys[M]=!0;k.out[M]=W}if(k.prevProp=Y,k.prevResolvedValues=Q,k.prevOut=F,k.isActive&&(S={...S,...Q}),re&&(!(K&&ee)||V))for(const M of X){const _={type:O};if(typeof M=="string"&&w&&y&&m?.enteringChildren){const I=co(m,M)?.transition?.delayChildren;_.delay=hR(m.enteringChildren,e,I)}x.push({animation:M,options:_})}}),E.size){const O={},P=C();let k=P?.transition;E.forEach((A,H)=>{A&&(k={...k||e.getDefaultTransition(),[H]:A});const Y=e.getValue(H);Y&&(Y.liveStyle=!0);const Z=P&&!Array.isArray(v)?P[H]:void 0,$=e.getBaseTargetFromProps(d,H);O[H]=(Z!==void 0?Z:$!==void 0&&!ur($)?$:e.initialValues[H]===void 0?e.baseTarget[H]:void 0)??null}),k&&(O.transition=k),x.push({animation:O})}const N=w&&e.blockInitialAnimation||a&&!y&&(d.initial===!1||d.initial===d.animate);return a=o=!1,!N&&x.length?t(x):Promise.resolve()}function u(f,d){if(i[f].isActive===d)return Promise.resolve();e.variantChildren?.forEach(y=>y.animationState?.setActive(f,d)),i[f].isActive=d;const m=c(f);for(const y in i)i[y].protectedKeys={};return m}return{animateChanges:c,setActive:u,setAnimateFunction:f=>{t=f(e)},getState:()=>i,reset:()=>{i=aS(),o=!0}}}function U8(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!JR(t,e):!1}function aS(){const e={};for(const t of bh)e[t]={isActive:t==="animate",protectedKeys:{},needsAnimating:{},prevResolvedValues:{},out:{}};return e}const gu=b.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function sS(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function I8(...e){return t=>{let i=!1;const a=e.map(o=>{const c=sS(o,t);return!i&&typeof c=="function"&&(i=!0),c});if(i)return()=>{for(let o=0;o{const{width:t,height:i}=e?.getBoundingClientRect()||{};return[t/e?.offsetWidth||1,i/e?.offsetHeight||1]},eT=e=>{let{left:t,top:i}=e.getBoundingClientRect(),a=e;for(;a=a.parentElement||a.parentNode?.host;){const{scrollLeft:u,scrollTop:f}=a;if(u||f){const[d,m]=oS(a);t+=u*d,i+=f*m}if(getComputedStyle(a).position==="fixed")break}const[o,c]=oS(e.offsetParent);return[t/o,i/c]};class H8 extends b.Component{getSnapshotBeforeUpdate(t){const i=this.props.getElement();if(bd(i)&&t.isPresent&&!this.props.isPresent&&this.props.pop!==!1){const a=i.offsetParent,o=bd(a)&&a.offsetWidth||0,c=bd(a)&&a.offsetHeight||0,u=getComputedStyle(i),f=this.props.sizeRef.current;f.height=parseFloat(u.height),f.width=parseFloat(u.width),f.top=i.offsetTop,f.left=i.offsetLeft,f.right=o-f.width-f.left,f.bottom=c-f.height-f.top,f.direction=u.direction,f.point=eT(i)}return null}componentDidUpdate(){}render(){return this.props.children}}function F8({children:e,isPresent:t,anchorX:i,anchorY:a,root:o,pop:c,popNode:u}){const f=b.useId(),d=b.useRef(null),m=b.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0,direction:"ltr"}),{nonce:y}=b.useContext(gu),v=c!==!1?e.props?.ref??e?.ref:void 0,w=B8(d,v),x=()=>d.current||u?.current?.current,C=E=>{const{width:S,height:T,top:j,left:L,right:N,bottom:O,direction:P}=m.current,k=P==="rtl",A=i==="left"?k?`right:${N}`:`left:${L}`:k?`left:${L}`:`right:${N}`,H=a==="bottom"?`bottom:${O}`:`top:${j}`;E?.insertRule(`[data-motion-pop-id="${f}"]{position:absolute!important;width:${S}px!important;height:${T}px!important;${A}px!important;${H}px!important}`)};return b.useInsertionEffect(()=>{const{width:E,height:S}=m.current,T=x();if(t||c===!1||!T||!E||!S)return;T.dataset.motionPopId=f;const j=T.ownerDocument,L=j.createElement("style");y&&(L.nonce=y);const N=o??j.head;N.appendChild(L),C(L.sheet);let O=0,P=0;return hu.setup(()=>{const[k,A]=eT(T);O=m.current.point[0]-k,P=m.current.point[1]-A}),hu.read(()=>{const{sheet:k}=L;if(!k||!O&&!P)return;const A=m.current;A.left+=O,A.right-=O,A.top+=P,A.bottom-=P,k.deleteRule(0),C(k)}),()=>{T.removeAttribute("data-motion-pop-id"),N.contains(L)&&N.removeChild(L)}},[t]),h.jsx(H8,{isPresent:t,getElement:x,sizeRef:m,pop:c,children:c===!1?e:b.cloneElement(e,{ref:w})})}const Y8=({children:e,initial:t,isPresent:i,onExitComplete:a,custom:o,presenceAffectsLayout:c,mode:u,anchorX:f,anchorY:d,root:m})=>{const y=Mu(G8),v=b.useId(),w=b.useRef(),x=b.useRef(i),C=b.useRef(a);su(()=>{x.current=i,C.current=a});let E=!0,S=b.useMemo(()=>(E=!1,{id:v,initial:t,isPresent:i,custom:o,onExitComplete:T=>{y.set(T,!0);for(const j of y.values())if(!j)return;a&&a()},register:(T,j)=>(y.set(T,!1),j&&j.parent?.presenceContext?.id!==v&&(w.current=j),()=>{y.delete(T),!x.current&&!y.size&&C.current?.()})}),[i,y,a]);return c&&E&&(S={...S}),b.useMemo(()=>{y.forEach((T,j)=>y.set(j,!1))},[i]),b.useEffect(()=>{!i&&!y.size&&a&&a()},[i]),e=h.jsx(F8,{pop:u==="popLayout",isPresent:i,anchorX:f,anchorY:d,root:m,popNode:w,children:e}),h.jsx(gh.Provider,{value:S,children:e})};function G8(){return new Map}function tT(e=!0){const t=b.useContext(gh);if(t===null)return[!0,null];const{isPresent:i,onExitComplete:a,register:o}=t,c=b.useId();b.useEffect(()=>{if(e)return o(c)},[e]);const u=b.useCallback(()=>e&&a&&a(c),[c,a,e]);return!i&&a?[!1,u]:[!0]}const Dc=e=>e.key||"";function lS(e){const t=[];return b.Children.forEach(e,i=>{b.isValidElement(i)&&t.push(i)}),t}const Gy=({children:e,custom:t,initial:i=!0,onExitComplete:a,presenceAffectsLayout:o=!0,mode:c="sync",propagate:u=!1,anchorX:f="left",anchorY:d="top",root:m})=>{const[y,v]=tT(u),w=b.useMemo(()=>lS(e),[e]),x=u&&!y?[]:w.map(Dc),C=b.useRef(!0),E=Mu(()=>new Map),S=b.useRef(new Set),[T,j]=b.useState(w),[L,N]=b.useState(w);su(()=>{u&&!y&&!L.length&&v?.()},[y,u,L.length,v]);const O=b.useRef();b.useEffect(()=>()=>{const A=O.current;O.current=void 0,A?.()},[L]),su(()=>{C.current=!1;for(let A=0;AE.get(Dc(Y)))?A=w:c==="wait"&&(A=P),N(lS(A)),j(w),null}const{forceRender:k}=b.useContext(uy);return h.jsx(h.Fragment,{children:L.map(A=>{const H=Dc(A),Y=u&&!y?!1:w===L||x.includes(H),Z=()=>{if(S.current.has(H))return;if(E.has(H))S.current.add(H),E.set(H,!0);else return;let $=!0;E.forEach(K=>{K||($=!1)}),$&&(k?.(),j([]),u&&v?.(),O.current=a)};return h.jsx(Y8,{isPresent:Y,initial:!C.current||i?void 0:!1,custom:t,presenceAffectsLayout:o,mode:c,root:m,onExitComplete:Y?void 0:Z,anchorX:f,anchorY:d,children:A},H)})})},nT=b.createContext({strict:!1}),cS={animation:["variants",...bh],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 uS=!1;function q8(){if(uS)return;const e={};for(const t in cS)e[t]={isEnabled:i=>cS[t].some(a=>!!i[a])};BR(e),uS=!0}function rT(){return q8(),ZN()}function $8(e){const t=rT();for(const i in e)t[i]={...t[i],...e[i]};BR(t)}function K8({children:e,...t}){const i=b.useContext(gu);t={...i,...t},t.transition=Dy(t.transition,i.transition),t.isStatic=Mu(()=>t.isStatic);const a=b.useMemo(()=>t,[JSON.stringify(t.transition),t.transformPagePoint,t.reducedMotion,t.skipAnimations,t.isValidProp]);return h.jsx(gu.Provider,{value:a,children:e})}const wh=b.createContext({});function X8(e,t){if(xh(e)){const{initial:i,animate:a}=e;return{initial:i===!1||mu(i)?i:void 0,animate:mu(a)?a:void 0}}return e.inherit!==!1?t:{}}function W8(e){const{initial:t,animate:i}=X8(e,b.useContext(wh));return b.useMemo(()=>({initial:t,animate:i}),[fS(t),fS(i)])}function fS(e){return Array.isArray(e)?e.join(" "):e}const qy=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function iT(e,t,i){for(const a in t)!ur(t[a])&&!YR(a,i)&&(e[a]=t[a])}function Z8({transformTemplate:e},t){return b.useMemo(()=>{const i=qy();return By(i,t,e),Object.assign({},i.vars,i.style)},[t])}function Q8(e,t){const i=e.style||{},a={};return iT(a,i,e),Object.assign(a,Z8(e,t)),a}function J8(e,t){const i={},a=Q8(e,t);return e.drag&&e.dragListener!==!1&&(i.draggable=!1,a.userSelect=a.WebkitUserSelect=a.WebkitTouchCallout="none",a.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(i.tabIndex=0),i.style=a,i}const aT=()=>({...qy(),attrs:{}});function e9(e,t,i,a){const o=b.useMemo(()=>{const c=aT();return CR(c,t,ZR(a),e.transformTemplate,e.style),{...c.attrs,style:{...c.style}}},[t]);if(e.style){const c={};return iT(c,e.style,e),{...o,style:{...c,...o.style}}}return o}const t9=new Set(["animate","exit","variants","initial","style","values","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","tap","propagate","ignoreStrict","viewport"]);function Zd(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||t9.has(e)}function n9(e,t){return e.startsWith("on")?!Zd(e):t?.(e)??!Zd(e)}function r9(e,t,i,a){const o={};for(const c in e)c==="values"&&typeof e.values=="object"||ur(e[c])||(n9(c,a)||i===!0&&Zd(c)||!t&&!Zd(c)||e.draggable&&c.startsWith("onDrag"))&&(o[c]=e[c]);return o}const i9=["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 $y(e){return typeof e!="string"||e.includes("-")?!1:!!(i9.indexOf(e)>-1||/[A-Z]/u.test(e))}function a9(e,t,i,{latestValues:a},o,c=!1,u,f){const m=(u??$y(e)?e9:J8)(t,a,o,e),y=r9(t,typeof e=="string",c,f),v=e!==b.Fragment?{...y,...m,ref:i}:{},{children:w}=t,x=b.useMemo(()=>ur(w)?w.get():w,[w]);return b.createElement(e,{...v,children:x})}function s9({scrapeMotionValuesFromProps:e,createRenderState:t},i,a,o){return{latestValues:o9(i,a,o,e),renderState:t()}}function o9(e,t,i,a){const o={},c=a(e,{});for(const w in c)o[w]=wd(c[w]);let{initial:u,animate:f}=e;const d=xh(e),m=UR(e);t&&m&&!d&&e.inherit!==!1&&(u===void 0&&(u=t.initial),f===void 0&&(f=t.animate));let y=i?i.initial===!1:!1;y=y||u===!1;const v=y?f:u;if(v&&typeof v!="boolean"&&!vh(v)){const w=Array.isArray(v)?v:[v];for(let x=0;x(t,i)=>{const a=b.useContext(wh),o=b.useContext(gh),c=()=>s9(e,t,a,o);return i?c():Mu(c)},l9=sT({scrapeMotionValuesFromProps:Fy,createRenderState:qy}),c9=sT({scrapeMotionValuesFromProps:QR,createRenderState:aT}),u9=Symbol.for("motionComponentSymbol");function f9(e,t,i){const a=b.useRef(i);b.useInsertionEffect(()=>{a.current=i});const o=b.useRef(null);return b.useCallback(c=>{c&&e.onMount?.(c),t&&(c?t.mount(c):t.unmount());const u=a.current;if(typeof u=="function")if(c){const f=u(c);typeof f=="function"&&(o.current=f)}else o.current?(o.current(),o.current=null):u(c);else u&&(u.current=c)},[t])}const oT=b.createContext({});function d9(e,t,i,a,o,c){const{visualElement:u}=b.useContext(wh),f=b.useContext(nT),d=b.useContext(gh),m=b.useContext(gu),y=m.reducedMotion,v=m.skipAnimations,w=b.useRef(null),x=b.useRef(!1);a=a||f.renderer,!w.current&&a&&(w.current=a(e,{visualState:t,parent:u,props:i,presenceContext:d,blockInitialAnimation:d?d.initial===!1:!1,reducedMotionConfig:y,skipAnimations:v,isSVG:c}),x.current&&w.current&&(w.current.manuallyAnimateOnMount=!0));const C=w.current,E=b.useContext(oT);C&&!C.projection&&o&&(C.type==="html"||C.type==="svg")&&o.create(C,i,E),b.useInsertionEffect(()=>{C&&C.props!==i&&C.update(i,d)});const S=i[yR],T=b.useRef(!!S&&typeof window<"u"&&!window.MotionHandoffIsComplete?.(S)&&window.MotionHasOptimisedAnimation?.(S));return su(()=>{!x.current||!C||(C.animationState?.animateChanges(),C.enteringChildren=void 0)},[]),su(()=>{x.current=!0,C&&(window.MotionIsMounted=!0,C.updateFeatures(),C.scheduleRenderMicrotask(),T.current&&C.animationState&&C.animationState.animateChanges())}),b.useEffect(()=>{C&&(!T.current&&C.animationState&&C.animationState.animateChanges(),T.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(S)}),T.current=!1),C.enteringChildren=void 0)}),C}function yg(e,{forwardMotionProps:t=!1,type:i}={},a,o){a&&$8(a);const c=i?i==="svg":$y(e),u=c?c9:l9;function f(m,y){let v;const w=h9(m);Mu(()=>!!Cd.current?.sharedNodes.get(w)?.lead&&m.initial)&&(m={...m,initial:!1});const x={...b.useContext(gu),...m,layoutId:w},{isStatic:C,isValidProp:E}=x,S=W8(m),T=u(m,C);if(!C&&typeof window<"u"){m9();const j=p9(x);S.visualElement=d9(e,T,x,o,j.ProjectionNode,c),(j.isEnabled||S.visualElement?.projection?.options.layoutId)&&(v=j.MeasureLayout)}return h.jsxs(wh.Provider,{value:S,children:[v&&S.visualElement?h.jsx(v,{visualElement:S.visualElement,...x}):null,a9(e,m,f9(T,S.visualElement,y),T,C,t,c,E)]})}f.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const d=b.forwardRef(f);return d[u9]=e,d}function h9({layoutId:e}){const t=b.useContext(uy).id;return t&&e!==void 0?t+"-"+e:e}function m9(e,t){b.useContext(nT).strict}function p9(e){const t=rT(),{drag:i,layout:a}=t;if(!i&&!a)return{};const o={...i,...a};return{MeasureLayout:o.MeasureLayout,isEnabled:i?.isEnabled(e)||a?.isEnabled(e),ProjectionNode:o.ProjectionNode}}function g9(e,t){if(typeof Proxy>"u")return yg;const i=new Map,a=(c,u)=>yg(c,u,e,t),o=(c,u)=>a(c,u);return new Proxy(o,{get:(c,u)=>u==="create"?a:(i.has(u)||i.set(u,yg(u,void 0,e,t)),i.get(u))})}const y9=(e,t)=>t.isSVG??$y(e)?new _8(t):new e8(t,{allowProjection:e!==b.Fragment});class v9 extends Ds{constructor(t){super(t),t.animationState||(t.animationState=V8(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();vh(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){this.node.getProps().animate!==this.node.prevProps?.animate&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}let b9=0;class x9 extends Ds{constructor(){super(...arguments),this.id=b9++}update(){const{presenceContext:t,animationState:i}=this.node;if(!t||!i)return;const{isPresent:a,onExitComplete:o}=t;if(a===!this.exit)return;if(a){if(this.exit===!0){const{initial:u}=this.node.getProps();if(u&&!Array.isArray(u)){const{transition:f,transitionEnd:d,...m}=co(this.node,u)||{};for(const y in m)this.node.getValue(y)?.jump(m[y])}this.node.blockInitialAnimation=!1,i.reset(),i.animateChanges()}else i.setActive("exit",!1);this.exit=void 0;return}const c=this.exit=i.setActive("exit",!0);o&&c.then(()=>{this.exit===c&&(this.exit=!0,o(this.id))})}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id,this.node)),this.update()}unmount(){}}const w9={animation:{Feature:v9},exit:{Feature:x9}};class S9 extends Ds{constructor(t){super(t),this.removeGroupControls=Bi,this.removeListeners=Bi,this.controls=new R8(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Bi}update(){const{dragControls:t,drag:i}=this.node.getProps(),{dragControls:a,drag:o}=this.node.prevProps||{};t!==a&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls))),o&&!i&&this.controls.stop(void 0,void 0,o)}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}const vg=e=>(t,i)=>{e&&Wt.update(()=>e(t,i),!1,!0)};class C9 extends Ds{constructor(){super(...arguments),this.removePointerDownListener=Bi}onPointerDown(t){this.session=new qR(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:this.node.current?.ownerDocument.defaultView})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:i,onPan:a,onPanEnd:o}=this.node.getProps();return{onSessionStart:vg(t),onStart:vg(i),onMove:vg(a),onEnd:(c,u)=>{delete this.session,o&&Wt.postRender(()=>o(c,u))}}}mount(){this.removePointerDownListener=eu(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session?.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session?.end()}}let bg=!1;const dS=({layout:e,layoutDependency:t,layoutAnchor:i})=>({layout:e,layoutDependency:t,layoutAnchor:i,animationType:typeof e=="string"?e:"both"}),hS=(e,t)=>{const{snapshot:i}=e,a=e.getStack();a?.remove(e);const o=a?.lead;if(a?.prevLead===e&&o.resumeFrom===e&&(o.resumeFrom=o.currentAnimation=e.resumingFrom=void 0),e.options.layoutId=t,!t){e.needsShow=!0;return}return e.root.registerSharedNode(t,e),()=>{const{resumeFrom:c}=e;c?.isPresent!==!1&&e.getStack().members.includes(c)&&(c.hide(),e.resumeFrom=void 0,e.snapshot=i)}};class E9 extends b.Component{componentDidMount(){const{visualElement:t,layoutGroup:i,switchLayoutGroup:a,layoutId:o}=this.props,{projection:c}=t;c&&(i.group?.add(c),o&&a?.register?.(c),bg&&c.root.didUpdate(),c.options.layoutId!==o&&hS(c,o)?.(),c.addEventListener("animationComplete",()=>this.safeToRemove()),c.setOptions({...c.options,...dS(this.props),onExitComplete:()=>this.safeToRemove()})),Sd.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:i,layoutId:a,visualElement:o,drag:c,isPresent:u}=this.props,{projection:f}=o;return f&&(f.isPresent=u,this.takeOver=t.layoutId!==a?(f.willUpdate(),hS(f,a)):void 0,f.setOptions({...f.options,...dS(this.props)}),bg=!0,c||t.layoutDependency!==i||i===void 0||t.isPresent!==u?f.willUpdate():this.safeToRemove(),t.isPresent!==u&&(u?f.promote():f.relegate()||Wt.postRender(()=>{f.getStack()?.members.length||this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(this.takeOver?.(),t.root.didUpdate(),hu.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:i,switchLayoutGroup:a}=this.props,{projection:o}=t;bg=!0,o&&(o.scheduleCheckAfterUnmount(),i.group?.remove(o),a?.deregister?.(o))}safeToRemove(){this.props.safeToRemove?.()}render(){return null}}function lT(e){const[t,i]=tT(),a=b.useContext(uy);return h.jsx(E9,{...e,layoutGroup:a,switchLayoutGroup:b.useContext(oT),isPresent:t,safeToRemove:i})}const R9={pan:{Feature:C9},drag:{Feature:S9,ProjectionNode:VR,MeasureLayout:lT}};function k0(e,t,i,a,o){const{props:c}=e,u="while"+i;!o&&e.animationState&&c[u]&&e.animationState.setActive(u,a==="Start");const f=c["on"+i+a];f&&Wt.postRender(()=>f(t,Yy(t)))}class T9 extends Ds{mount(){const{current:t}=this.node;t&&(this.unmount=M8(t,(i,a)=>(k0(this.node,a,"Hover","Start"),o=>k0(this.node,o,"Hover","End"))))}unmount(){}}class A9 extends Ds{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Sl(mo(this.node.current,"focus",()=>this.onFocus()),mo(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function xg(e,t,i,a){e.current instanceof HTMLButtonElement&&e.current.disabled||k0(e,t,"Tap",i,a)}class j9 extends Ds{constructor(){super(...arguments),this.options={}}mount(){const{current:t}=this.node;t&&(this.update(),this.unmount=L8(t,(i,a)=>(xg(this.node,a,"Start"),{onComplete:(o,{success:c})=>xg(this.node,o,c?"":"Cancel"),onRepeat:()=>xg(this.node,a,"",!0)}),this.options))}update(){const{options:t,node:i}=this,{globalTapTarget:a,propagate:o,tap:c}=i.props;for(const u in t)delete t[u];Object.assign(t,c,{useGlobalTarget:a,stopPropagation:o?.tap===!1})}unmount(){}}const O0=new WeakMap,wg=new WeakMap,M9=e=>{const t=O0.get(e.target);t&&t(e)},N9=e=>{e.forEach(M9)};function k9({root:e,...t}){const i=e||document;wg.has(i)||wg.set(i,{});const a=wg.get(i),o=JSON.stringify(t);return a[o]||(a[o]=new IntersectionObserver(N9,{root:e,...t})),a[o]}function O9(e,t,i){const a=k9(t);return O0.set(e,i),a.observe(e),()=>{O0.delete(e),a.unobserve(e)}}const D9={some:0,all:1};class L9 extends Ds{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.stopObserver?.();const{viewport:t={}}=this.node.getProps(),{root:i,margin:a,amount:o="some",once:c}=t,u={root:i?i.current:void 0,rootMargin:a,threshold:typeof o=="number"?o:D9[o]},f=d=>{const{isIntersecting:m}=d;if(this.isInView===m||(this.isInView=m,c&&!m&&this.hasEnteredView))return;m&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",m);const{onViewportEnter:y,onViewportLeave:v}=this.node.getProps(),w=m?y:v;w&&w(d)};this.stopObserver=O9(this.node.current,u,f)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:i}=this.node;["amount","margin","root"].some(P9(t,i))&&this.startObserver()}unmount(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}}function P9({viewport:e={}},{viewport:t={}}={}){return i=>e[i]!==t[i]}const _9={inView:{Feature:L9},tap:{Feature:j9},focus:{Feature:A9},hover:{Feature:T9}},z9={layout:{ProjectionNode:VR,MeasureLayout:lT}},V9=Object.assign({},w9,_9,R9,z9),U9=g9(V9,y9);function I9(){!Hy.current&&IR();const[e]=b.useState(Kd.current);return e}const yu=U9;var cT=e=>{throw TypeError(e)},uT=(e,t,i)=>t.has(e)||cT("Cannot "+i),gi=(e,t,i)=>(uT(e,t,"read from private field"),i?i.call(e):t.get(e)),Kc=(e,t,i)=>t.has(e)?cT("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,i),Qi=(e,t,i,a)=>(uT(e,t,"write to private field"),t.set(e,i),i),Sh=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,Ch=/^[\\/]{2}/;function fT(e,t){return t+e.replace(/\\/g,"/")}var mS="popstate";function pS(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function B9(e={}){function t(a,o){let c=o.state?.masked,{pathname:u,search:f,hash:d}=c||a.location;return vu("",{pathname:u,search:f,hash:d},o.state&&o.state.usr||null,o.state&&o.state.key||"default",c?{pathname:a.location.pathname,search:a.location.search,hash:a.location.hash}:void 0)}function i(a,o){return typeof o=="string"?o:Ar(o)}return F9(t,i,null,e)}function vt(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function En(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function H9(){return Math.random().toString(36).substring(2,10)}function gS(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function vu(e,t,i=null,a,o){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?fa(t):t,state:i,key:t&&t.key||a||H9(),mask:o}}function Ar({pathname:e="/",search:t="",hash:i=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),i&&i!=="#"&&(e+=i.charAt(0)==="#"?i:"#"+i),e}function fa(e){let t={};if(e){let i=e.indexOf("#");i>=0&&(t.hash=e.substring(i),e=e.substring(0,i));let a=e.indexOf("?");a>=0&&(t.search=e.substring(a),e=e.substring(0,a)),e&&(t.pathname=e)}return t}function F9(e,t,i,a={}){let{window:o=document.defaultView,v5Compat:c=!1}=a,u=o.history,f="POP",d=null,m=y();m==null&&(m=0,u.replaceState({...u.state,idx:m},""));function y(){return(u.state||{idx:null}).idx}function v(){f="POP";let S=y(),T=S==null?null:S-m;m=S,d&&d({action:f,location:E.location,delta:T})}function w(S,T){f="PUSH";let j=pS(S)?S:vu(E.location,S,T);m=y()+1;let L=gS(j,m),N=E.createHref(j.mask||j);try{u.pushState(L,"",N)}catch(O){if(O instanceof DOMException&&O.name==="DataCloneError")throw O;o.location.assign(N)}c&&d&&d({action:f,location:E.location,delta:1})}function x(S,T){f="REPLACE";let j=pS(S)?S:vu(E.location,S,T);m=y();let L=gS(j,m),N=E.createHref(j.mask||j);u.replaceState(L,"",N),c&&d&&d({action:f,location:E.location,delta:0})}function C(S){return dT(o,S)}let E={get action(){return f},get location(){return e(o,u)},listen(S){if(d)throw new Error("A history only accepts one active listener");return o.addEventListener(mS,v),d=S,()=>{o.removeEventListener(mS,v),d=null}},createHref(S){return t(o,S)},createURL:C,encodeLocation(S){let T=C(S);return{pathname:T.pathname,search:T.search,hash:T.hash}},push:w,replace:x,go(S){return u.go(S)}};return E}function dT(e,t,i=!1){let a="http://localhost";e&&(a=e.location.origin!=="null"?e.location.origin:e.location.href),vt(a,"No window.location.(origin|href) available to create URL");let o=typeof t=="string"?t:Ar(t);return o=o.replace(/ $/,"%20"),!i&&Ch.test(o)&&(o=a+o),new URL(o,a)}var Xc,yS=class{constructor(e){if(Kc(this,Xc,new Map),e)for(let[t,i]of e)this.set(t,i)}get(e){if(gi(this,Xc).has(e))return gi(this,Xc).get(e);if(e.defaultValue!==void 0)return e.defaultValue;throw new Error("No value found for context")}set(e,t){gi(this,Xc).set(e,t)}};Xc=new WeakMap;var Y9=new Set(["lazy","caseSensitive","path","id","index","children"]);function G9(e){return Y9.has(e)}var q9=new Set(["lazy","caseSensitive","path","id","index","middleware","children"]);function $9(e){return q9.has(e)}function K9(e){return e.index===!0}function bu(e,t,i=[],a={},o=!1){return e.map((c,u)=>{let f=[...i,String(u)],d=typeof c.id=="string"?c.id:f.join("-");if(vt(c.index!==!0||!c.children,"Cannot specify children on an index route"),vt(o||!a[d],`Found a route id collision on id "${d}". Route id's must be globally unique within Data Router usages`),K9(c)){let m={...c,id:d};return a[d]=vS(m,t(m)),m}else{let m={...c,id:d,children:void 0};return a[d]=vS(m,t(m)),c.children&&(m.children=bu(c.children,t,f,a,o)),m}})}function vS(e,t){return Object.assign(e,{...t,...typeof t.lazy=="object"&&t.lazy!=null?{lazy:{...e.lazy,...t.lazy}}:{}})}function hT(e,t,i="/"){return _i(e,t,i,!1)}function _i(e,t,i,a,o){let c=typeof t=="string"?fa(t):t,u=Ci(c.pathname||"/",i);if(u==null)return null;let f=o??Ad(e),d=null,m=sk(u);for(let y=0;d==null&&y{let y={relativePath:m===void 0?u.path||"":m,caseSensitive:u.caseSensitive===!0,childrenIndex:f,route:u};if(y.relativePath.startsWith("/")){if(!y.relativePath.startsWith(a)&&d)return;vt(y.relativePath.startsWith(a),`Absolute route path "${y.relativePath}" nested under path "${a}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),y.relativePath=y.relativePath.slice(a.length)}let v=xi([a,y.relativePath]),w=i.concat(y);u.children&&u.children.length>0&&(vt(u.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${v}".`),mT(u.children,t,w,v,d)),!(u.path==null&&!u.index)&&t.push({path:v,score:rk(v,u.index),routesMeta:w.map((x,C)=>{let[E,S]=yT(x.relativePath,x.caseSensitive,C===w.length-1);return{...x,matcher:E,compiledParams:S}})})};return e.forEach((u,f)=>{if(u.path===""||!u.path?.includes("?"))c(u,f);else for(let d of pT(u.path))c(u,f,!0,d)}),t}function pT(e){let t=e.split("/");if(t.length===0)return[];let[i,...a]=t,o=i.endsWith("?"),c=i.replace(/\?$/,"");if(a.length===0)return o?[c,""]:[c];let u=pT(a.join("/")),f=[];return f.push(...u.map(d=>d===""?c:[c,d].join("/"))),o&&f.push(...u),f.map(d=>e.startsWith("/")&&d===""?"/":d)}function W9(e){e.sort((t,i)=>t.score!==i.score?i.score-t.score:ik(t.routesMeta.map(a=>a.childrenIndex),i.routesMeta.map(a=>a.childrenIndex)))}var Z9=/^:[\w-]+$/,Q9=3,J9=2,ek=1,tk=10,nk=-2,bS=e=>e==="*";function rk(e,t){let i=e.split("/"),a=i.length;return i.some(bS)&&(a+=nk),t&&(a+=J9),i.filter(o=>!bS(o)).reduce((o,c)=>o+(Z9.test(c)?Q9:c===""?ek:tk),a)}function ik(e,t){return e.length===t.length&&e.slice(0,-1).every((a,o)=>a===t[o])?e[e.length-1]-t[t.length-1]:0}function ak(e,t,i=!1){let{routesMeta:a}=e,o={},c="/",u=[];for(let f=0;f{if(y==="*"){let C=f[w]||"";u=Al(c.slice(0,c.length-C.length),1)}const x=f[w];return v&&!x?m[y]=void 0:m[y]=(x||"").replace(/%2F/g,"/"),m},{}),pathname:c,pathnameBase:u,pattern:e}}function yT(e,t=!1,i=!0){En(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let a=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(u,f,d,m,y)=>{if(a.push({paramName:f,isOptional:d!=null}),d){let v=y.charAt(m+u.length);return v&&v!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(a.push({paramName:"*"}),o+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):i?o+="\\/*$":e!==""&&e!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,t?void 0:"i"),a]}function sk(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return En(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function Ci(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let i=t.endsWith("/")?t.length-1:t.length,a=e.charAt(i);return a&&a!=="/"?null:e.slice(i)||"/"}function ok({basename:e,pathname:t}){return t==="/"?e:xi([e,t])}var Ky=e=>Sh.test(e);function lk(e,t="/"){let{pathname:i,search:a="",hash:o=""}=typeof e=="string"?fa(e):e,c;return i?(i=Xy(i),i.startsWith("/")||i.startsWith("\\")?c=xS(i.substring(1),"/"):c=xS(i,t)):c=t,{pathname:c,search:uk(a),hash:fk(o)}}function xS(e,t){let i=Al(t).split("/");return e.split("/").forEach(o=>{o===".."?i.length>1&&i.pop():o!=="."&&i.push(o)}),i.length>1?i.join("/"):"/"}function Sg(e,t,i,a){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(a)}]. Please separate it out to the \`to.${i}\` field. Alternatively you may provide the full path as a string in and the router will parse it for you.`}function vT(e){return e.filter((t,i)=>i===0||t.route.path&&t.route.path.length>0)}function Eh(e){let t=vT(e);return t.map((i,a)=>a===t.length-1?i.pathname:i.pathnameBase)}function Ou(e,t,i,a=!1){let o;typeof e=="string"?o=fa(e):(o={...e},vt(!o.pathname||!o.pathname.includes("?"),Sg("?","pathname","search",o)),vt(!o.pathname||!o.pathname.includes("#"),Sg("#","pathname","hash",o)),vt(!o.search||!o.search.includes("#"),Sg("#","search","hash",o)));let c=e===""||o.pathname==="",u=c?"/":o.pathname,f;if(u==null)f=i;else{let v=t.length-1;if(!a&&u.startsWith("..")){let w=u.split("/");for(;w[0]==="..";)w.shift(),v-=1;o.pathname=w.join("/")}f=v>=0?t[v]:"/"}let d=lk(o,f),m=u&&u!=="/"&&u.endsWith("/"),y=(c||u===".")&&i.endsWith("/");return!d.pathname.endsWith("/")&&(m||y)&&(d.pathname+="/"),d}var Xy=e=>e.replace(/[\\/]{2,}/g,"/"),xi=e=>Xy(e.join("/"));function Al(e,t=0){let i=e.length;for(;i>t&&e.charCodeAt(i-1)===47;)i--;return i===e.length?e:e.slice(0,i)}var ck=e=>Al(e).replace(/^\/*/,"/"),uk=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,fk=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,dk=["EvalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],Du=class{constructor(e,t,i,a=!1){this.status=e,this.statusText=t||"",this.internal=a,i instanceof Error?(this.data=i.toString(),this.error=i):this.data=i}};function xu(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function Lu(e){let t=e.map(i=>i.route.path).filter(Boolean);return xi(t)||"/"}var bT=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function xT(e,t){let i=e;if(typeof i!="string"||!Sh.test(i))return{absoluteURL:void 0,isExternal:!1,to:i};let a=i,o=!1;if(bT)try{let c=new URL(window.location.href),u=Ch.test(i)?new URL(fT(i,c.protocol)):new URL(i),f=Ci(u.pathname,t);u.origin===c.origin&&f!=null?i=f+u.search+u.hash:o=!0}catch{En(!1,` contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:a,isExternal:o,to:i}}var Ss=Symbol("Uninstrumented");function hk(e,t){let i={lazy:[],"lazy.loader":[],"lazy.action":[],"lazy.middleware":[],middleware:[],loader:[],action:[]};e.forEach(o=>o({id:t.id,index:t.index,path:t.path,instrument(c){let u=Object.keys(i);for(let f of u)c[f]&&i[f].push(c[f])}}));let a={};if(typeof t.lazy=="function"&&i.lazy.length>0){let o=ul(i.lazy,t.lazy,()=>{});o&&(a.lazy=o)}if(typeof t.lazy=="object"){let o=t.lazy;["middleware","loader","action"].forEach(c=>{let u=o[c],f=i[`lazy.${c}`];if(typeof u=="function"&&f.length>0){let d=ul(f,u,()=>{});d&&(a.lazy=Object.assign(a.lazy||{},{[c]:d}))}})}return["loader","action"].forEach(o=>{let c=t[o];if(typeof c=="function"&&i[o].length>0){let u=c[Ss]??c,f=ul(i[o],u,(...d)=>wS(d[0]));f&&(o==="loader"&&u.hydrate===!0&&(f.hydrate=!0),f[Ss]=u,a[o]=f)}}),t.middleware&&t.middleware.length>0&&i.middleware.length>0&&(a.middleware=t.middleware.map(o=>{let c=o[Ss]??o,u=ul(i.middleware,c,(...f)=>wS(f[0]));return u?(u[Ss]=c,u):o})),a}function mk(e,t){let i={navigate:[],fetch:[]};if(t.forEach(a=>a({instrument(o){let c=Object.keys(o);for(let u of c)o[u]&&i[u].push(o[u])}})),i.navigate.length>0){let a=e.navigate[Ss]??e.navigate,o=ul(i.navigate,a,(...c)=>{let[u,f]=c;return{to:typeof u=="number"||typeof u=="string"?u:u?Ar(u):".",...SS(e,f??{})}});o&&(o[Ss]=a,e.navigate=o)}if(i.fetch.length>0){let a=e.fetch[Ss]??e.fetch,o=ul(i.fetch,a,(...c)=>{let[u,,f,d]=c;return{href:f??".",fetcherKey:u,...SS(e,d??{})}});o&&(o[Ss]=a,e.fetch=o)}return e}function ul(e,t,i){return e.length===0?null:async(...a)=>{let o=await wT(e,i(...a),()=>t(...a),e.length-1);if(o.type==="error")throw o.value;return o.value}}async function wT(e,t,i,a){let o=e[a],c;if(o){let u,f=async()=>(u?console.error("You cannot call instrumented handlers more than once"):u=wT(e,t,i,a-1),c=await u,vt(c,"Expected a result"),c.type==="error"&&c.value instanceof Error?{status:"error",error:c.value}:{status:"success",error:void 0});try{await o(f,t)}catch(d){console.error("An instrumentation function threw an error:",d)}u||await f(),await u}else try{c={type:"success",value:await i()}}catch(u){c={type:"error",value:u}}return c||{type:"error",value:new Error("No result assigned in instrumentation chain.")}}function wS(e){let{request:t,context:i,params:a,pattern:o}=e;return{request:pk(t),params:{...a},pattern:o,context:gk(i)}}function SS(e,t){return{currentUrl:Ar(e.state.location),..."formMethod"in t?{formMethod:t.formMethod}:{},..."formEncType"in t?{formEncType:t.formEncType}:{},..."formData"in t?{formData:t.formData}:{},..."body"in t?{body:t.body}:{}}}function pk(e){return{method:e.method,url:e.url,headers:{get:(...t)=>e.headers.get(...t)}}}function gk(e){if(vk(e)){let t={...e};return Object.freeze(t),t}else return{get:t=>e.get(t)}}var yk=Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function vk(e){if(e===null||typeof e!="object")return!1;const t=Object.getPrototypeOf(e);return t===Object.prototype||t===null||Object.getOwnPropertyNames(t).sort().join("\0")===yk}var CS=new URL("http://localhost");function Wy(e){if(e.createURL)return e.createURL("/");try{return new URL(e.createHref("/"),CS)}catch{return CS}}function Cg(e,t){return e.origin===t.origin&&(e.origin!=="null"||e.protocol===t.protocol&&e.host===t.host)}function bk(e,t){if(e.startsWith("//"))return!0;let i=t.protocol.toLowerCase();return e.toLowerCase().startsWith(i)?t.host===""||e.slice(i.length).startsWith("//"):!1}function hl(e,t,i,a){let o=null;try{o=e==null?null:new URL(e,i)}catch{}let c=new URL(t,i),u=o!=null&&!Cg(o,i),f=!Cg(c,i);if(a==="reject"){if(u||f)throw new Error("External navigation is not allowed")}else if(f&&(o==null||!bk(e,o)||!Cg(o,c)))throw new Error("External navigation is not allowed")}var ST=["POST","PUT","PATCH","DELETE"],xk=new Set(ST),wk=["GET",...ST],Sk=new Set(wk),CT=new Set([301,302,303,307,308]),Ck=new Set([307,308]),Eg={state:"idle",location:void 0,matches:void 0,historyAction:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Ek={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Lc={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},Rk=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),ET="remix-router-transitions",RT=Symbol("ResetLoaderData"),no,tl,bs,nl,Tk=class{constructor(e){Kc(this,no),Kc(this,tl),Kc(this,bs),Kc(this,nl),Qi(this,no,e),Qi(this,tl,Ad(e))}get stableRoutes(){return gi(this,no)}get activeRoutes(){return gi(this,bs)??gi(this,no)}get branches(){return gi(this,nl)??gi(this,tl)}get hasHMRRoutes(){return gi(this,bs)!=null}setRoutes(e){Qi(this,no,e),Qi(this,tl,Ad(e))}setHmrRoutes(e){Qi(this,bs,e),Qi(this,nl,Ad(e))}commitHmrRoutes(){gi(this,bs)&&(Qi(this,no,gi(this,bs)),Qi(this,tl,gi(this,nl)),Qi(this,bs,void 0),Qi(this,nl,void 0))}};no=new WeakMap;tl=new WeakMap;bs=new WeakMap;nl=new WeakMap;function Ak(e){const t=e.window?e.window:typeof window<"u"?window:void 0,i=typeof t<"u"&&typeof t.document<"u"&&typeof t.document.createElement<"u";vt(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let a=e.hydrationRouteProperties||[],o=e.mapRouteProperties||Rk,c=o;if(e.instrumentations){let U=e.instrumentations;c=q=>({...o(q),...hk(U.map(te=>te.route).filter(Boolean),q)})}let u={},f=new Tk(bu(e.routes,c,void 0,u)),d=e.basename||"/";d.startsWith("/")||(d=`/${d}`);let m=e.dataStrategy||Ok,y={...e.future},v=null,w=new Set,x=null,C=null,E=null,S=null,T=e.hydrationData!=null,j=_i(f.activeRoutes,e.history.location,d,!1,f.branches),L=!1,N=null,O,P;if(j==null&&!e.patchRoutesOnNavigation){let U=yi(404,{pathname:e.history.location.pathname}),{matches:q,route:te}=Zf(f.activeRoutes);O=!0,P=!O,j=q,N={[te.id]:U}}else if(j&&!e.hydrationData&&tn(j,f.activeRoutes,e.history.location.pathname).active&&(j=null),j)if(j.some(U=>U.route.lazy))O=!1,P=!O;else if(!j.some(U=>Zy(U.route)))O=!0,P=!O;else{let U=e.hydrationData?e.hydrationData.loaderData:null,q=e.hydrationData?e.hydrationData.errors:null,te=j;if(q){let he=j.findIndex(ge=>q[ge.route.id]!==void 0);te=te.slice(0,he+1)}P=!1,O=!0,te.forEach(he=>{let ge=TT(he.route,U,q);P=P||ge.renderFallback,O=O&&!ge.shouldLoad})}else{O=!1,P=!O,j=[];let U=tn(null,f.activeRoutes,e.history.location.pathname);U.active&&U.matches&&(L=!0,j=U.matches)}let k,A={historyAction:e.history.action,location:e.history.location,matches:j,initialized:O,renderFallback:P,navigation:Eg,restoreScrollPosition:e.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||N,fetchers:new Map,blockers:new Map},H="POP",Y=null,Z=!1,$,K=!1,ee=new Map,re=null,V=!1,X=!1,Q=new Set,F=new Map,z=0,M=-1,_=new Map,I=new Set,B=new Map,W=new Map,ie=new Set,fe=new Map,pe,ce=null;function Ae(){if(v=e.history.listen(({action:U,location:q,delta:te})=>{if(pe){pe(),pe=void 0;return}En(fe.size===0||te!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let he=dn({currentLocation:A.location,nextLocation:q,historyAction:U});if(he&&te!=null){let ge=new Promise(De=>{pe=De});e.history.go(te*-1),At(he,{state:"blocked",location:q,proceed(){At(he,{state:"proceeding",proceed:void 0,reset:void 0,location:q}),ge.then(()=>e.history.go(te))},reset(){let De=new Map(A.blockers);De.set(he,Lc),Ee({blockers:De})}}),Y?.resolve(),Y=null;return}return Je(U,q)}),i){Zk(t,ee);let U=()=>Qk(t,ee);t.addEventListener("pagehide",U),re=()=>t.removeEventListener("pagehide",U)}return A.initialized||Je("POP",A.location,{initialHydration:!0}),k}function Le(){v&&v(),re&&re(),w.clear(),$&&$.abort(),A.fetchers.forEach((U,q)=>Dt(A.fetchers,q)),A.blockers.forEach((U,q)=>xn(q))}function Se(U){if(w.add(U),x){let{newErrors:q}=x;x=null,U(A,{deletedFetchers:[],newErrors:q,viewTransitionOpts:void 0,flushSync:!1})}return()=>w.delete(U)}function Ee(U,q={}){U.matches&&(U.matches=U.matches.map(ge=>{let De=u[ge.route.id],Re=ge.route;return Re.element!==De.element||Re.errorElement!==De.errorElement||Re.hydrateFallbackElement!==De.hydrateFallbackElement?{...ge,route:De}:ge})),A={...A,...U};let te=[],he=[];A.fetchers.forEach((ge,De)=>{ge.state==="idle"&&(ie.has(De)?te.push(De):he.push(De))}),ie.forEach(ge=>{!A.fetchers.has(ge)&&!F.has(ge)&&te.push(ge)}),w.size===0&&(x={newErrors:U.errors??null}),[...w].forEach(ge=>ge(A,{deletedFetchers:te,newErrors:U.errors??null,viewTransitionOpts:q.viewTransitionOpts,flushSync:q.flushSync===!0})),te.forEach(ge=>Dt(A.fetchers,ge)),he.forEach(ge=>A.fetchers.delete(ge))}function ye(U,q,{flushSync:te}={}){let he=A.actionData!=null&&A.navigation.formMethod!=null&&mr(A.navigation.formMethod)&&A.navigation.state==="loading"&&U.state?._isRedirect!==!0,ge;q.actionData?Object.keys(q.actionData).length>0?ge=q.actionData:ge=null:he?ge=A.actionData:ge=null;let De=q.loaderData?DS(A.loaderData,q.loaderData,q.matches||[],q.errors):A.loaderData,Re=A.blockers;Re.size>0&&(Re=new Map(Re),Re.forEach((_e,nt)=>Re.set(nt,Lc)));let Me=V?!1:ln(U,q.matches||A.matches),ke=Z===!0||A.navigation.formMethod!=null&&mr(A.navigation.formMethod)&&U.state?._isRedirect!==!0;f.commitHmrRoutes(),V||H==="POP"||(H==="PUSH"?e.history.push(U,U.state):H==="REPLACE"&&e.history.replace(U,U.state));let Be;if(H==="POP"&&!V&&U!==A.location){let _e=ee.get(A.location.pathname);_e&&_e.has(U.pathname)?Be={currentLocation:A.location,nextLocation:U}:ee.has(U.pathname)&&(Be={currentLocation:U,nextLocation:A.location})}else if(K){let _e=ee.get(A.location.pathname);_e?_e.add(U.pathname):(_e=new Set([U.pathname]),ee.set(A.location.pathname,_e)),Be={currentLocation:A.location,nextLocation:U}}Ee({...q,actionData:ge,loaderData:De,historyAction:H,location:U,initialized:!0,renderFallback:!1,navigation:Eg,revalidation:"idle",restoreScrollPosition:Me,preventScrollReset:ke,blockers:Re},{viewTransitionOpts:Be,flushSync:te===!0}),H="POP",Z=!1,K=!1,V=!1,X=!1,Y?.resolve(),Y=null,ce?.resolve(),ce=null}async function Pe(U,q){if(Y?.resolve(),Y=null,typeof U=="number"){Y||(Y=zS());let yt=Y.promise;return e.history.go(U),yt}let te=D0(A.location,A.matches,d,U,q?.fromRouteId,q?.relative),{path:he,submission:ge,error:De}=ES(!1,te,q),Re;if(q?.mask){let yt=typeof q.mask=="string"?fa(q.mask):{...A.location.mask,...q.mask};if(Re={pathname:yt.pathname??"",search:yt.search??"",hash:yt.hash??""},Ch.test(Re.pathname))throw new Error("External navigation is not allowed");Re.pathname.startsWith("\\")&&(Re.pathname=Re.pathname.replace(/^\\+/,"/")),hl(typeof q.mask=="string"?q.mask:Ar(q.mask),Ar(Re),e.history.createURL("/"),"reject")}let Me=A.location,ke=vu(Me,he,q&&q.state,void 0,Re);ke={...ke,...e.history.encodeLocation(ke)},hl(U==null?e.history.createHref(A.location):typeof U=="string"?U:Ar(U),e.history.createHref(ke.mask||ke),e.history.createURL("/"),"reject");let Be=q&&q.replace!=null?q.replace:void 0,_e="PUSH";Be===!0?_e="REPLACE":Be===!1||ge!=null&&mr(ge.formMethod)&&ge.formAction===A.location.pathname+A.location.search&&(_e="REPLACE");let nt=q&&"preventScrollReset"in q?q.preventScrollReset===!0:void 0,Ke=(q&&q.flushSync)===!0,dt=dn({currentLocation:Me,nextLocation:ke,historyAction:_e});if(dt){At(dt,{state:"blocked",location:ke,proceed(){At(dt,{state:"proceeding",proceed:void 0,reset:void 0,location:ke}),Pe(U,q)},reset(){let yt=new Map(A.blockers);yt.set(dt,Lc),Ee({blockers:yt})}});return}await Je(_e,ke,{submission:ge,pendingError:De,preventScrollReset:nt,replace:q&&q.replace,enableViewTransition:q&&q.viewTransition,flushSync:Ke,callSiteDefaultShouldRevalidate:q&&q.defaultShouldRevalidate})}function Ge(){ce||(ce=zS()),Te(),Ee({revalidation:"loading"});let U=ce.promise;return A.navigation.state==="submitting"?U:A.navigation.state==="idle"?(Je(A.historyAction,A.location,{startUninterruptedRevalidation:!0}),U):(Je(H||A.historyAction,A.navigation.location,{overrideNavigation:A.navigation,enableViewTransition:K===!0}),U)}async function Je(U,q,te){$&&$.abort(),$=null,H=U,V=(te&&te.startUninterruptedRevalidation)===!0,ft(A.location,A.matches),Z=(te&&te.preventScrollReset)===!0,K=(te&&te.enableViewTransition)===!0;let he=f.activeRoutes,ge=te?.initialHydration&&A.matches&&A.matches.length>0&&!L?A.matches:_i(he,q,d,!1,f.branches),De=(te&&te.flushSync)===!0;if(ge&&A.initialized&&!X&&Bk(A.location,q)&&!(te&&te.submission&&mr(te.submission.formMethod))){ye(q,{matches:ge},{flushSync:De});return}let Re=tn(ge,he,q.pathname);if(Re.active&&Re.matches&&(ge=Re.matches),!ge){let{error:ht,notFoundMatches:mt,route:Yt}=zt(q.pathname);ye(q,{matches:mt,loaderData:{},errors:{[Yt.id]:ht}},{flushSync:De});return}let Me=te&&te.overrideNavigation?{...te.overrideNavigation,matches:ge,historyAction:U}:void 0;$=new AbortController;let ke=rl(e.history,q,$.signal,te&&te.submission),Be=e.getContext?await e.getContext():new yS,_e;if(te&&te.pendingError)_e=[xs(ge).route.id,{type:"error",error:te.pendingError}];else if(te&&te.submission&&mr(te.submission.formMethod)){let ht=await rt(ke,q,te.submission,ge,U,Be,Re.active,te&&te.initialHydration===!0,{replace:te.replace,flushSync:De});if(ht.shortCircuited)return;if(ht.pendingActionResult){let[mt,Yt]=ht.pendingActionResult;if(Qr(Yt)&&xu(Yt.error)&&Yt.error.status===404){$=null,ye(q,{matches:ht.matches,loaderData:{},errors:{[mt]:Yt.error}});return}}ge=ht.matches||ge,_e=ht.pendingActionResult,Me=Rg(q,ge,U,te.submission),De=!1,Re.active=!1,ke=rl(e.history,ke.url,ke.signal)}let{shortCircuited:nt,matches:Ke,loaderData:dt,errors:yt,workingFetchers:Ft}=await Oe(ke,q,ge,U,Be,Re.active,Me,te&&te.submission,te&&te.fetcherSubmission,te&&te.replace,te&&te.initialHydration===!0,De,_e,te&&te.callSiteDefaultShouldRevalidate);nt||($=null,ye(q,{matches:Ke||ge,...LS(_e),loaderData:dt,errors:yt,...Ft?{fetchers:Ft}:{}}))}async function rt(U,q,te,he,ge,De,Re,Me,ke={}){Te();let Be=Xk(q,he,ge,te);if(Ee({navigation:Be},{flushSync:ke.flushSync===!0}),Re){let Ke=await It(he,q.pathname,U.signal);if(Ke.type==="aborted")return{shortCircuited:!0};if(Ke.type==="error"){if(Ke.partialMatches.length===0){let{matches:yt,route:Ft}=Zf(f.activeRoutes);return{matches:yt,pendingActionResult:[Ft.id,{type:"error",error:Ke.error}]}}let dt=xs(Ke.partialMatches).route.id;return{matches:Ke.partialMatches,pendingActionResult:[dt,{type:"error",error:Ke.error}]}}else if(Ke.matches)he=Ke.matches;else{let{notFoundMatches:dt,error:yt,route:Ft}=zt(q.pathname);return{matches:dt,pendingActionResult:[Ft.id,{type:"error",error:yt}]}}}let _e,nt=jd(he,q);if(!nt.route.action&&!nt.route.lazy)_e={type:"error",error:yi(405,{method:U.method,pathname:q.pathname,routeId:nt.route.id})};else{let Ke=ml(c,u,U,q,he,nt,Me?[]:a,De),dt=await be(U,q,Ke,De,null);if(_e=dt[nt.route.id],!_e){for(let yt of he)if(dt[yt.route.id]){_e=dt[yt.route.id];break}}if(U.signal.aborted)return{shortCircuited:!0}}if(so(_e)){let Ke;return ke&&ke.replace!=null?Ke=ke.replace:Ke=NS(_e.response.headers.get("Location"),new URL(U.url),d,e.history)===A.location.pathname+A.location.search,await ue(U,_e,!0,{submission:te,replace:Ke}),{shortCircuited:!0}}if(Qr(_e)){let Ke=xs(he,nt.route.id);return(ke&&ke.replace)!==!0&&(H="PUSH"),{matches:he,pendingActionResult:[Ke.route.id,_e,nt.route.id]}}return{matches:he,pendingActionResult:[nt.route.id,_e]}}async function Oe(U,q,te,he,ge,De,Re,Me,ke,Be,_e,nt,Ke,dt){let yt=Re||Rg(q,te,he,Me),Ft=Me||ke||_S(yt),ht=!V&&!_e;if(De){if(ht){let $t=Xe(Ke);Ee({navigation:yt,...$t!==void 0?{actionData:$t}:{}},{flushSync:nt})}let it=await It(te,q.pathname,U.signal);if(it.type==="aborted")return{shortCircuited:!0};if(it.type==="error"){if(it.partialMatches.length===0){let{matches:nr,route:ai}=Zf(f.activeRoutes);return{matches:nr,loaderData:{},errors:{[ai.id]:it.error}}}let $t=xs(it.partialMatches).route.id;return{matches:it.partialMatches,loaderData:{},errors:{[$t]:it.error}}}else if(it.matches)te=it.matches;else{let{error:$t,notFoundMatches:nr,route:ai}=zt(q.pathname);return{matches:nr,loaderData:{},errors:{[ai.id]:$t}}}}let mt=f.activeRoutes,{dsMatches:Yt,revalidatingFetchers:ot}=RS(U,ge,c,u,e.history,A,te,Ft,q,_e?[]:a,_e===!0,X,Q,ie,B,I,mt,d,e.patchRoutesOnNavigation!=null,f.branches,Ke,dt);if(M=++z,!e.dataStrategy&&!Yt.some(it=>it.shouldLoad)&&!Yt.some(it=>it.route.middleware&&it.route.middleware.length>0)&&ot.length===0){let it=new Map(A.fetchers),$t=gn(it);return ye(q,{matches:te,loaderData:{},errors:Ke&&Qr(Ke[1])?{[Ke[0]]:Ke[1].error}:null,...LS(Ke),...$t?{fetchers:it}:{}},{flushSync:nt}),{shortCircuited:!0}}if(ht){let it={};if(!De){it.navigation=yt;let $t=Xe(Ke);$t!==void 0&&(it.actionData=$t)}ot.length>0&&(it.fetchers=je(ot)),Ee(it,{flushSync:nt})}ot.forEach(it=>{Gt(it.key),it.controller&&F.set(it.key,it.controller)});let zr=()=>ot.forEach(it=>Gt(it.key));$&&$.signal.addEventListener("abort",zr);let{loaderResults:yn,fetcherResults:Dn}=await We(Yt,ot,U,q,ge);if(U.signal.aborted)return{shortCircuited:!0};$&&$.signal.removeEventListener("abort",zr),ot.forEach(it=>F.delete(it.key));let Wn=Qf(yn);if(Wn)return await ue(U,Wn.result,!0,{replace:Be}),{shortCircuited:!0};if(Wn=Qf(Dn),Wn)return I.add(Wn.key),await ue(U,Wn.result,!0,{replace:Be}),{shortCircuited:!0};let In=new Map(A.fetchers),{loaderData:ma,errors:dr}=OS(A,te,yn,Ke,ot,Dn,In);_e&&A.errors&&(dr={...A.errors,...dr});let Ti=gn(In),br=$n(M,In),Ai=Ti||br||ot.length>0;return{matches:te,loaderData:ma,errors:dr,...Ai?{workingFetchers:In}:{}}}function Xe(U){if(U&&!Qr(U[1]))return{[U[0]]:U[1].data};if(A.actionData)return Object.keys(A.actionData).length===0?null:A.actionData}function je(U){let q=new Map(A.fetchers);return U.forEach(te=>{let he=q.get(te.key),ge=Pc(void 0,he?he.data:void 0);q.set(te.key,ge)}),q}async function tt(U,q,te,he){Gt(U);let ge=(he&&he.flushSync)===!0,De=f.activeRoutes,Re=D0(A.location,A.matches,d,te,q,he?.relative),Me=_i(De,Re,d,!1,f.branches),ke=tn(Me,De,Re);if(ke.active&&ke.matches&&(Me=ke.matches),!Me){wt(U,q,yi(404,{pathname:Re}),{flushSync:ge});return}let{path:Be,submission:_e,error:nt}=ES(!0,Re,he);if(nt){wt(U,q,nt,{flushSync:ge});return}let Ke=e.getContext?await e.getContext():new yS,dt=(he&&he.preventScrollReset)===!0;if(_e&&mr(_e.formMethod)){await Tt(U,q,Be,Me,Ke,ke.active,ge,dt,_e,he&&he.defaultShouldRevalidate);return}B.set(U,{routeId:q,path:Be}),await st(U,q,Be,Me,Ke,ke.active,ge,dt,_e)}async function Tt(U,q,te,he,ge,De,Re,Me,ke,Be){Te(),B.delete(U);let _e=A.fetchers.get(U);Ne(U,Wk(ke,_e),{flushSync:Re});let nt=new AbortController,Ke=rl(e.history,te,nt.signal,ke);if(De){let xe=await It(he,new URL(Ke.url).pathname,Ke.signal,U);if(xe.type==="aborted")return;if(xe.type==="error"){wt(U,q,xe.error,{flushSync:Re});return}else if(xe.matches)he=xe.matches;else{wt(U,q,yi(404,{pathname:te}),{flushSync:Re});return}}let dt=jd(he,te);if(!dt.route.action&&!dt.route.lazy){let xe=yi(405,{method:ke.formMethod,pathname:te,routeId:q});wt(U,q,xe,{flushSync:Re});return}F.set(U,nt);let yt=z,Ft=ml(c,u,Ke,te,he,dt,a,ge),ht=await be(Ke,te,Ft,ge,U),mt=ht[dt.route.id];if(!mt){for(let xe of Ft)if(ht[xe.route.id]){mt=ht[xe.route.id];break}}if(Ke.signal.aborted){F.get(U)===nt&&F.delete(U);return}if(ie.has(U)){if(so(mt)||Qr(mt)){Ne(U,ta(void 0));return}}else{if(so(mt))if(F.delete(U),M>yt){Ne(U,ta(void 0));return}else return I.add(U),Ne(U,Pc(ke)),ue(Ke,mt,!1,{fetcherSubmission:ke,preventScrollReset:Me});if(Qr(mt)){wt(U,q,mt.error);return}}let Yt=A.navigation.location||A.location,ot=rl(e.history,Yt,nt.signal),zr=f.activeRoutes,yn=A.navigation.state!=="idle"?_i(zr,A.navigation.location,d,!1,f.branches):A.matches;vt(yn,"Didn't find any matches after fetcher action");let Dn=++z;_.set(U,Dn);let{dsMatches:Wn,revalidatingFetchers:In}=RS(ot,ge,c,u,e.history,A,yn,ke,Yt,a,!1,X,Q,ie,B,I,zr,d,e.patchRoutesOnNavigation!=null,f.branches,[dt.route.id,mt],Be),ma=Pc(ke,mt.data),dr=new Map(A.fetchers);dr.set(U,ma),In.filter(xe=>xe.key!==U).forEach(xe=>{let Ue=xe.key,qe=dr.get(Ue),et=Pc(void 0,qe?qe.data:void 0);dr.set(Ue,et),Gt(Ue),xe.controller&&F.set(Ue,xe.controller)}),Ee({fetchers:dr});let Ti=()=>In.forEach(xe=>Gt(xe.key));nt.signal.addEventListener("abort",Ti);let{loaderResults:br,fetcherResults:Ai}=await We(Wn,In,ot,Yt,ge);if(nt.signal.aborted)return;nt.signal.removeEventListener("abort",Ti),_.delete(U),F.delete(U),In.forEach(xe=>F.delete(xe.key));let it=A.fetchers.has(U),$t=xe=>{if(!it)return xe;let Ue=new Map(xe.fetchers);return Ue.set(U,ta(mt.data)),{...xe,fetchers:Ue}},nr=Qf(br);if(nr)return A=$t(A),ue(ot,nr.result,!1,{preventScrollReset:Me});if(nr=Qf(Ai),nr)return I.add(nr.key),A=$t(A),ue(ot,nr.result,!1,{preventScrollReset:Me});let ai=new Map(A.fetchers);it&&ai.set(U,ta(mt.data));let{loaderData:oe,errors:Ce}=OS(A,yn,br,void 0,In,Ai,ai);$n(Dn,ai),A.navigation.state==="loading"&&Dn>M?(vt(H,"Expected pending action"),$&&$.abort(),ye(A.navigation.location,{matches:yn,loaderData:oe,errors:Ce,fetchers:ai})):(Ee({errors:Ce,loaderData:DS(A.loaderData,oe,yn,Ce),fetchers:ai}),X=!1)}async function st(U,q,te,he,ge,De,Re,Me,ke){let Be=A.fetchers.get(U);Ne(U,Pc(ke,Be?Be.data:void 0),{flushSync:Re});let _e=new AbortController,nt=rl(e.history,te,_e.signal);if(De){let mt=await It(he,new URL(nt.url).pathname,nt.signal,U);if(mt.type==="aborted")return;if(mt.type==="error"){wt(U,q,mt.error,{flushSync:Re});return}else if(mt.matches)he=mt.matches;else{wt(U,q,yi(404,{pathname:te}),{flushSync:Re});return}}let Ke=jd(he,te);F.set(U,_e);let dt=z,yt=ml(c,u,nt,te,he,Ke,a,ge),Ft=await be(nt,te,yt,ge,U),ht=Ft[Ke.route.id];if(!ht){for(let mt of he)if(Ft[mt.route.id]){ht=Ft[mt.route.id];break}}if(F.get(U)===_e&&F.delete(U),!nt.signal.aborted){if(ie.has(U)){Ne(U,ta(void 0));return}if(so(ht))if(M>dt){Ne(U,ta(void 0));return}else{I.add(U),await ue(nt,ht,!1,{preventScrollReset:Me});return}if(Qr(ht)){wt(U,q,ht.error);return}Ne(U,ta(ht.data))}}async function ue(U,q,te,{submission:he,fetcherSubmission:ge,preventScrollReset:De,replace:Re}={}){te||(Y?.resolve(),Y=null),q.response.headers.has("X-Remix-Revalidate")&&(X=!0);let Me=q.response.headers.get("Location");vt(Me,"Expected a Location header on the redirect Response");let ke=Me,Be=new URL(U.url);Me=NS(Me,Be,d,e.history),hl(ke,Me,Be,"allow-explicit");let _e=vu(A.location,Me,{_isRedirect:!0});if(i){let ht=!1;if(q.response.headers.has("X-Remix-Reload-Document"))ht=!0;else if(Ky(Me)){const mt=dT(t,Me,!0);ht=mt.origin!==t.location.origin||Ci(mt.pathname,d)==null}if(ht){Re?t.location.replace(Me):t.location.assign(Me);return}}$=null;let nt=Re===!0||q.response.headers.has("X-Remix-Replace")?"REPLACE":"PUSH",{formMethod:Ke,formAction:dt,formEncType:yt}=A.navigation;!he&&!ge&&Ke&&dt&&yt&&(he=_S(A.navigation));let Ft=he||ge;if(Ck.has(q.response.status)&&Ft&&mr(Ft.formMethod))await Je(nt,_e,{submission:{...Ft,formAction:Me},preventScrollReset:De||Z,enableViewTransition:te?K:void 0});else{let ht=Rg(_e,[],nt,he);await Je(nt,_e,{overrideNavigation:ht,fetcherSubmission:ge,preventScrollReset:De||Z,enableViewTransition:te?K:void 0})}}async function be(U,q,te,he,ge){let De,Re={};try{De=await Lk(m,U,q,te,ge,he,!1)}catch(Me){return te.filter(ke=>ke.shouldLoad).forEach(ke=>{Re[ke.route.id]={type:"error",error:Me}}),Re}if(U.signal.aborted)return Re;if(!mr(U.method))for(let Me of te){if(De[Me.route.id]?.type==="error")break;!De.hasOwnProperty(Me.route.id)&&!A.loaderData.hasOwnProperty(Me.route.id)&&(!A.errors||!A.errors.hasOwnProperty(Me.route.id))&&Me.shouldCallHandler()&&(De[Me.route.id]={type:"error",result:new Error(`No result returned from dataStrategy for route ${Me.route.id}`)})}for(let[Me,ke]of Object.entries(De))if(Gk(ke)){let Be=ke.result;Re[Me]={type:"redirect",response:Vk(Be,U,Me,te,d)}}else Re[Me]=await zk(ke);return Re}async function We(U,q,te,he,ge){let De=be(te,he,U,ge,null),Re=Promise.all(q.map(async Be=>{if(Be.matches&&Be.match&&Be.request&&Be.controller){let nt=(await be(Be.request,Be.path,Be.matches,ge,Be.key))[Be.match.route.id];return{[Be.key]:nt}}else return Promise.resolve({[Be.key]:{type:"error",error:yi(404,{pathname:Be.path})}})})),Me=await De,ke=(await Re).reduce((Be,_e)=>Object.assign(Be,_e),{});return{loaderResults:Me,fetcherResults:ke}}function Te(){X=!0,B.forEach((U,q)=>{F.has(q)&&Q.add(q),Gt(q)})}function Ne(U,q,te={}){let he=new Map(A.fetchers);he.set(U,q),Ee({fetchers:he},{flushSync:(te&&te.flushSync)===!0})}function wt(U,q,te,he={}){let ge=xs(A.matches,q),De=new Map(A.fetchers);Dt(De,U),Ee({errors:{[ge.route.id]:te},fetchers:De},{flushSync:(he&&he.flushSync)===!0})}function Pt(U){return W.set(U,(W.get(U)||0)+1),ie.has(U)&&ie.delete(U),A.fetchers.get(U)||Ek}function St(U,q){Gt(U,q?.reason),Ne(U,ta(null))}function Dt(U,q){let te=A.fetchers.get(q);F.has(q)&&!(te&&te.state==="loading"&&_.has(q))&&Gt(q),B.delete(q),_.delete(q),I.delete(q),ie.delete(q),Q.delete(q),U.delete(q)}function _t(U){let q=(W.get(U)||0)-1;q<=0?(W.delete(U),ie.add(U)):W.set(U,q),Ee({fetchers:new Map(A.fetchers)})}function Gt(U,q){let te=F.get(U);te&&(te.abort(q),F.delete(U))}function qt(U,q){for(let te of U){let he=q.get(te);vt(he,`Expected fetcher: ${te}`);let ge=ta(he.data);q.set(te,ge)}}function gn(U){let q=[],te=!1;for(let he of I){let ge=U.get(he);vt(ge,`Expected fetcher: ${he}`),ge.state==="loading"&&(I.delete(he),q.push(he),te=!0)}return qt(q,U),te}function $n(U,q){let te=[];for(let[he,ge]of _)if(ge0}function Kn(U,q){let te=A.blockers.get(U)||Lc;return fe.get(U)!==q&&fe.set(U,q),te}function xn(U){A.blockers.delete(U),fe.delete(U)}function At(U,q){let te=A.blockers.get(U)||Lc;vt(te.state==="unblocked"&&q.state==="blocked"||te.state==="blocked"&&q.state==="blocked"||te.state==="blocked"&&q.state==="proceeding"||te.state==="blocked"&&q.state==="unblocked"||te.state==="proceeding"&&q.state==="unblocked",`Invalid blocker state transition: ${te.state} -> ${q.state}`);let he=new Map(A.blockers);he.set(U,q),Ee({blockers:he})}function dn({currentLocation:U,nextLocation:q,historyAction:te}){if(fe.size===0)return;fe.size>1&&En(!1,"A router only supports one blocker at a time");let he=Array.from(fe.entries()),[ge,De]=he[he.length-1],Re=A.blockers.get(ge);if(!(Re&&Re.state==="proceeding")&&De({currentLocation:U,nextLocation:q,historyAction:te}))return ge}function zt(U){let q=yi(404,{pathname:U}),te=f.activeRoutes,{matches:he,route:ge}=Zf(te);return{notFoundMatches:he,route:ge,error:q}}function On(U,q,te){if(C=U,S=q,E=te||null,!T&&A.navigation===Eg){T=!0;let he=ln(A.location,A.matches);he!=null&&Ee({restoreScrollPosition:he})}return()=>{C=null,S=null,E=null}}function Un(U,q){return E&&E(U,q.map(he=>X9(he,A.loaderData)))||U.key}function ft(U,q){if(C&&S){let te=Un(U,q);C[te]=S()}}function ln(U,q){if(C){let te=Un(U,q),he=C[te];if(typeof he=="number")return he}return null}function tn(U,q,te){if(e.patchRoutesOnNavigation){let he=f.branches;if(U){if(Object.keys(U[0].params).length>0)return{active:!0,matches:_i(q,te,d,!0,he)}}else return{active:!0,matches:_i(q,te,d,!0,he)||[]}}return{active:!1,matches:null}}async function It(U,q,te,he){if(!e.patchRoutesOnNavigation)return{type:"success",matches:U};let ge=U;for(;;){let De=u;try{await e.patchRoutesOnNavigation({signal:te,path:q,matches:ge,fetcherKey:he,patch:(Be,_e)=>{te.aborted||TS(Be,_e,f,De,c,!1)}})}catch(Be){return{type:"error",error:Be,partialMatches:ge}}if(te.aborted)return{type:"aborted"};let Re=f.branches,Me=_i(f.activeRoutes,q,d,!1,Re),ke=null;if(Me){if(Object.keys(Me[0].params).length===0)return{type:"success",matches:Me};if(ke=_i(f.activeRoutes,q,d,!0,Re),!(ke&&ge.lengthte.route.id===q[he].route.id)}function hn(U){u={},f.setHmrRoutes(bu(U,c,void 0,u))}function Xn(U,q,te=!1){TS(U,q,f,u,c,te),f.hasHMRRoutes||Ee({})}return k={get basename(){return d},get future(){return y},get state(){return A},get routes(){return f.stableRoutes},get branches(){return f.branches},get manifest(){return u},get window(){return t},initialize:Ae,subscribe:Se,enableScrollRestoration:On,navigate:Pe,fetch:tt,revalidate:Ge,createHref:U=>e.history.createHref(U),createURL:U=>e.history.createURL(U),encodeLocation:U=>e.history.encodeLocation(U),getFetcher:Pt,resetFetcher:St,deleteFetcher:_t,dispose:Le,getBlocker:Kn,deleteBlocker:xn,patchRoutes:Xn,_internalFetchControllers:F,_internalSetRoutes:hn,_internalSetStateDoNotUseOrYouWillBreakYourApp(U){Ee(U)}},e.instrumentations&&(k=mk(k,e.instrumentations.map(U=>U.router).filter(Boolean))),k}function jk(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function D0(e,t,i,a,o,c){let u,f;if(o){u=[];for(let m of t)if(u.push(m),m.route.id===o){f=m;break}}else u=t,f=t[t.length-1];let d=Ou(a||".",Eh(u),Ci(e.pathname,i)||e.pathname,c==="path");if(a==null&&(d.search=e.search,d.hash=e.hash),(a==null||a===""||a===".")&&f){let m=Jy(d.search);if(f.route.index&&!m)d.search=d.search?d.search.replace(/^\?/,"?index&"):"?index";else if(!f.route.index&&m){let y=new URLSearchParams(d.search),v=y.getAll("index");y.delete("index"),v.filter(x=>x).forEach(x=>y.append("index",x));let w=y.toString();d.search=w?`?${w}`:""}}return i!=="/"&&(d.pathname=ok({basename:i,pathname:d.pathname})),Ar(d)}function ES(e,t,i){if(!i||!jk(i))return{path:t};if(i.formMethod&&!Kk(i.formMethod))return{path:t,error:yi(405,{method:i.formMethod})};let a=()=>({path:t,error:yi(400,{type:"invalid-body"})}),c=(i.formMethod||"get").toUpperCase(),u=DT(t);if(i.body!==void 0){if(i.formEncType==="text/plain"){if(!mr(c))return a();let v=typeof i.body=="string"?i.body:i.body instanceof FormData||i.body instanceof URLSearchParams?Array.from(i.body.entries()).reduce((w,[x,C])=>`${w}${x}=${C} -`,""):String(i.body);return{path:t,submission:{formMethod:c,formAction:u,formEncType:i.formEncType,formData:void 0,json:void 0,text:v}}}else if(i.formEncType==="application/json"){if(!mr(c))return a();try{let v=typeof i.body=="string"?JSON.parse(i.body):i.body;return{path:t,submission:{formMethod:c,formAction:u,formEncType:i.formEncType,formData:void 0,json:v,text:void 0}}}catch{return a()}}}vt(typeof FormData=="function","FormData is not available in this environment");let f,d;if(i.formData)f=_0(i.formData),d=i.formData;else if(i.body instanceof FormData)f=_0(i.body),d=i.body;else if(i.body instanceof URLSearchParams)f=i.body,d=kS(f);else if(i.body==null)f=new URLSearchParams,d=new FormData;else try{f=new URLSearchParams(i.body),d=kS(f)}catch{return a()}let m={formMethod:c,formAction:u,formEncType:i&&i.formEncType||"application/x-www-form-urlencoded",formData:d,json:void 0,text:void 0};if(mr(m.formMethod))return{path:t,submission:m};let y=fa(t);return e&&y.search&&Jy(y.search)&&f.append("index",""),y.search=`?${f}`,{path:Ar(y),submission:m}}function RS(e,t,i,a,o,c,u,f,d,m,y,v,w,x,C,E,S,T,j,L,N,O){let P=N?Qr(N[1])?N[1].error:N[1].data:void 0,k=o.createURL(c.location),A=o.createURL(d),H;if(y&&c.errors){let V=Object.keys(c.errors)[0];H=u.findIndex(X=>X.route.id===V)}else if(N&&Qr(N[1])){let V=N[0];H=u.findIndex(X=>X.route.id===V)-1}let Y=N?N[1].statusCode:void 0,Z=Y&&Y>=400,$={currentUrl:k,currentParams:c.matches[0]?.params||{},nextUrl:A,nextParams:u[0].params,...f,actionResult:P,actionStatus:Y},K=Lu(u),ee=u.map((V,X)=>{let{route:Q}=V,F=null;if(H!=null&&X>H)F=!1;else if(Q.lazy)F=!0;else if(!Zy(Q))F=!1;else if(y){let{shouldLoad:I}=TT(Q,c.loaderData,c.errors);F=I}else Mk(c.loaderData,c.matches[X],V)&&(F=!0);if(F!==null)return L0(i,a,e,d,K,V,m,t,F);let z=!1;typeof O=="boolean"?z=O:Z?z=!1:(v||k.pathname+k.search===A.pathname+A.search||k.search!==A.search||Nk(c.matches[X],V))&&(z=!0);let M={...$,defaultShouldRevalidate:z},_=tu(V,M);return L0(i,a,e,d,K,V,m,t,_,M,O)}),re=[];return C.forEach((V,X)=>{if(y||!u.some(W=>W.route.id===V.routeId)||x.has(X))return;let Q=c.fetchers.get(X),F=Q&&Q.state!=="idle"&&Q.data===void 0,z=_i(S,V.path,T??"/",!1,L);if(!z){if(j&&F)return;re.push({key:X,routeId:V.routeId,path:V.path,matches:null,match:null,request:null,controller:null});return}if(E.has(X))return;let M=jd(z,V.path),_=new AbortController,I=rl(o,V.path,_.signal),B=null;if(w.has(X))w.delete(X),B=ml(i,a,I,V.path,z,M,m,t);else if(F)v&&(B=ml(i,a,I,V.path,z,M,m,t));else{let W;typeof O=="boolean"?W=O:Z?W=!1:W=v;let ie={...$,defaultShouldRevalidate:W};tu(M,ie)&&(B=ml(i,a,I,V.path,z,M,m,t,ie))}B&&re.push({key:X,routeId:V.routeId,path:V.path,matches:B,match:M,request:I,controller:_})}),{dsMatches:ee,revalidatingFetchers:re}}function Zy(e){return e.loader!=null||e.middleware!=null&&e.middleware.length>0}function TT(e,t,i){if(e.lazy)return{shouldLoad:!0,renderFallback:!0};if(!Zy(e))return{shouldLoad:!1,renderFallback:!1};let a=t!=null&&e.id in t,o=i!=null&&i[e.id]!==void 0;if(!a&&o)return{shouldLoad:!1,renderFallback:!1};if(typeof e.loader=="function"&&e.loader.hydrate===!0)return{shouldLoad:!0,renderFallback:!a};let c=!a&&!o;return{shouldLoad:c,renderFallback:c}}function Mk(e,t,i){let a=!t||i.route.id!==t.route.id,o=!e.hasOwnProperty(i.route.id);return a||o}function Nk(e,t){let i=e.route.path;return e.pathname!==t.pathname||i!=null&&i.endsWith("*")&&e.params["*"]!==t.params["*"]}function tu(e,t){if(e.route.shouldRevalidate){let i=e.route.shouldRevalidate(t);if(typeof i=="boolean")return i}return t.defaultShouldRevalidate}function TS(e,t,i,a,o,c){let u;if(e){let m=a[e];vt(m,`No route found to patch children into: routeId = ${e}`),m.children||(m.children=[]),u=m.children}else u=i.activeRoutes;let f=[],d=[];if(t.forEach(m=>{let y=u.find(v=>AT(m,v));y?d.push({existingRoute:y,newRoute:m}):f.push(m)}),f.length>0){let m=bu(f,o,[e||"_","patch",String(u?.length||"0")],a);u.push(...m)}if(c&&d.length>0)for(let m=0;mt.children?.some(o=>AT(i,o)))??!1:!1}var AS=new WeakMap,jT=({key:e,route:t,manifest:i,mapRouteProperties:a})=>{let o=i[t.id];if(vt(o,"No route found in manifest"),!o.lazy||typeof o.lazy!="object")return;let c=o.lazy[e];if(!c)return;let u=AS.get(o);u||(u={},AS.set(o,u));let f=u[e];if(f)return f;let d=(async()=>{let m=G9(e),v=o[e]!==void 0&&e!=="hasErrorBoundary";if(m)En(!m,"Route property "+e+" is not a supported lazy route property. This property will be ignored."),u[e]=Promise.resolve();else if(v)En(!1,`Route "${o.id}" has a static property "${e}" defined. The lazy property will be ignored.`);else{let w=await c();w!=null&&(Object.assign(o,{[e]:w}),Object.assign(o,a(o)))}typeof o.lazy=="object"&&(o.lazy[e]=void 0,Object.values(o.lazy).every(w=>w===void 0)&&(o.lazy=void 0))})();return u[e]=d,d},jS=new WeakMap;function kk(e,t,i,a,o){let c=i[e.id];if(vt(c,"No route found in manifest"),!e.lazy)return{lazyRoutePromise:void 0,lazyHandlerPromise:void 0};if(typeof e.lazy=="function"){let y=jS.get(c);if(y)return{lazyRoutePromise:y,lazyHandlerPromise:y};let v=(async()=>{vt(typeof e.lazy=="function","No lazy route function found");let w=await e.lazy(),x={};for(let C in w){let E=w[C];if(E===void 0)continue;let S=$9(C),j=c[C]!==void 0&&C!=="hasErrorBoundary";S?En(!S,"Route property "+C+" is not a supported property to be returned from a lazy route function. This property will be ignored."):j?En(!j,`Route "${c.id}" has a static property "${C}" defined but its lazy function is also returning a value for this property. The lazy route property "${C}" will be ignored.`):x[C]=E}Object.assign(c,x),Object.assign(c,{...a(c),lazy:void 0})})();return jS.set(c,v),v.catch(()=>{}),{lazyRoutePromise:v,lazyHandlerPromise:v}}let u=Object.keys(e.lazy),f=[],d;for(let y of u){if(o&&o.includes(y))continue;let v=jT({key:y,route:e,manifest:i,mapRouteProperties:a});v&&(f.push(v),y===t&&(d=v))}let m=f.length>0?Promise.all(f).then(()=>{}):void 0;return m?.catch(()=>{}),d?.catch(()=>{}),{lazyRoutePromise:m,lazyHandlerPromise:d}}async function MS(e){let t=e.matches.filter(o=>o.shouldLoad),i={};return(await Promise.all(t.map(o=>o.resolve()))).forEach((o,c)=>{i[t[c].route.id]=o}),i}async function Ok(e){return e.matches.some(t=>t.route.middleware)?MT(e,()=>MS(e)):MS(e)}function MT(e,t){return Dk(e,t,a=>{if($k(a))throw a;return a},Fk,i);function i(a,o,c){if(c)return Promise.resolve(Object.assign(c.value,{[o]:{type:"error",result:a}}));{let{matches:u}=e,f=Math.min(Math.max(u.findIndex(m=>m.route.id===o),0),Math.max(u.findIndex(m=>m.shouldCallHandler()),0)),d=xs(u,u[f].route.id).route.id;return Promise.resolve({[d]:{type:"error",result:a}})}}}async function Dk(e,t,i,a,o){let{matches:c,...u}=e,f=c.flatMap(m=>m.route.middleware?m.route.middleware.map(y=>[m.route.id,y]):[]);return await NT(u,f,t,i,a,o)}async function NT(e,t,i,a,o,c,u=0){let{request:f}=e;if(f.signal.aborted)throw f.signal.reason??new Error(`Request aborted: ${f.method} ${f.url}`);let d=t[u];if(!d)return await i();let[m,y]=d,v,w=async()=>{if(v)throw new Error("You may only call `next()` once per middleware");try{return v={value:await NT(e,t,i,a,o,c,u+1)},v.value}catch(x){return v={value:await c(x,m,v)},v.value}};try{let x=await y(e,w),C=x!=null?a(x):void 0;return o(C)?C:v?C??v.value:(v={value:await w()},v.value)}catch(x){return await c(x,m,v)}}function kT(e,t,i,a,o){let c=jT({key:"middleware",route:a.route,manifest:t,mapRouteProperties:e}),u=kk(a.route,mr(i.method)?"action":"loader",t,e,o);return{middleware:c,route:u.lazyRoutePromise,handler:u.lazyHandlerPromise}}function L0(e,t,i,a,o,c,u,f,d,m=null,y){let v=!1,w=kT(e,t,i,c,u);return{...c,_lazyPromises:w,shouldLoad:d,shouldRevalidateArgs:m,shouldCallHandler(x){return v=!0,m?typeof y=="boolean"?tu(c,{...m,defaultShouldRevalidate:y}):typeof x=="boolean"?tu(c,{...m,defaultShouldRevalidate:x}):tu(c,m):d},resolve(x){let{lazy:C,loader:E,middleware:S}=c.route,T=v||d||x&&!mr(i.method)&&(C||E),j=S&&S.length>0&&!E&&!C;return T&&(mr(i.method)||!j)?Pk({request:i,path:a,pattern:o,match:c,lazyHandlerPromise:w?.handler,lazyRoutePromise:w?.route,handlerOverride:x,scopedContext:f}):Promise.resolve({type:"data",result:void 0})}}}function ml(e,t,i,a,o,c,u,f,d=null){return o.map(m=>m.route.id!==c.route.id?{...m,shouldLoad:!1,shouldRevalidateArgs:d,shouldCallHandler:()=>!1,_lazyPromises:kT(e,t,i,m,u),resolve:()=>Promise.resolve({type:"data",result:void 0})}:L0(e,t,i,a,Lu(o),m,u,f,!0,d))}async function Lk(e,t,i,a,o,c,u){a.some(y=>y._lazyPromises?.middleware)&&await Promise.all(a.map(y=>y._lazyPromises?.middleware));let f={request:t,url:OT(t,i),pattern:Lu(a),params:a[0].params,context:c,matches:a},m=await e({...f,fetcherKey:o,runClientMiddleware:y=>{let v=f;return MT(v,()=>y({...v,fetcherKey:o,runClientMiddleware:()=>{throw new Error("Cannot call `runClientMiddleware()` from within an `runClientMiddleware` handler")}}))}});try{await Promise.all(a.flatMap(y=>[y._lazyPromises?.handler,y._lazyPromises?.route]))}catch{}return m}async function Pk({request:e,path:t,pattern:i,match:a,lazyHandlerPromise:o,lazyRoutePromise:c,handlerOverride:u,scopedContext:f}){let d,m,y=mr(e.method),v=y?"action":"loader",w=x=>{let C,E=new Promise((j,L)=>C=L);m=()=>C(),e.signal.addEventListener("abort",m);let S=j=>typeof x!="function"?Promise.reject(new Error(`You cannot call the handler for a route which defines a boolean "${v}" [routeId: ${a.route.id}]`)):x({request:e,url:OT(e,t),pattern:i,params:a.params,context:f},...j!==void 0?[j]:[]),T=(async()=>{try{return{type:"data",result:await(u?u(L=>S(L)):S())}}catch(j){return{type:"error",result:j}}})();return Promise.race([T,E])};try{let x=y?a.route.action:a.route.loader;if(o||c)if(x){let C,[E]=await Promise.all([w(x).catch(S=>{C=S}),o,c]);if(C!==void 0)throw C;d=E}else{await o;let C=y?a.route.action:a.route.loader;if(C)[d]=await Promise.all([w(C),c]);else if(v==="action"){let E=new URL(e.url),S=E.pathname+E.search;throw yi(405,{method:e.method,pathname:S,routeId:a.route.id})}else return{type:"data",result:void 0}}else if(x)d=await w(x);else{let C=new URL(e.url),E=C.pathname+C.search;throw yi(404,{pathname:E})}}catch(x){return{type:"error",result:x}}finally{m&&e.signal.removeEventListener("abort",m)}return d}async function _k(e){let t=e.headers.get("Content-Type");return t&&/\bapplication\/json\b/.test(t)?e.body==null?null:e.json():e.text()}async function zk(e){let{result:t,type:i}=e;if(Qy(t)){let a;try{a=await _k(t)}catch(o){return{type:"error",error:o}}return i==="error"?{type:"error",error:new Du(t.status,t.statusText,a),statusCode:t.status,headers:t.headers}:{type:"data",data:a,statusCode:t.status,headers:t.headers}}return i==="error"?PS(t)?t.data instanceof Error?{type:"error",error:t.data,statusCode:t.init?.status,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:"error",error:Hk(t),statusCode:xu(t)?t.status:void 0,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:"error",error:t,statusCode:xu(t)?t.status:void 0}:PS(t)?{type:"data",data:t.data,statusCode:t.init?.status,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:"data",data:t}}function Vk(e,t,i,a,o){let c=e.headers.get("Location");if(vt(c,"Redirects returned/thrown from loaders/actions must have a Location header"),!Ky(c)){let u=a.slice(0,a.findIndex(f=>f.route.id===i)+1);c=D0(new URL(t.url),u,o,c),e.headers.set("Location",c)}return e}var Uk=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];function P0(e){try{return Uk.includes(new URL(e).protocol)}catch{return!1}}function NS(e,t,i,a){if(Ky(e)){let o=e,c=Ch.test(o)?new URL(fT(o,t.protocol)):new URL(o);if(P0(c.toString()))throw new Error("Invalid redirect location");let u=Ci(c.pathname,i)!=null;if(c.origin===t.origin&&u)return Xy(c.pathname)+c.search+c.hash}try{let o=a.createURL(e);if(P0(o.toString()))throw new Error("Invalid redirect location")}catch{}return e}function rl(e,t,i,a){let o=e.createURL(DT(t)).toString(),c={signal:i};if(a&&mr(a.formMethod)){let{formMethod:u,formEncType:f}=a;c.method=u.toUpperCase(),f==="application/json"?(c.headers=new Headers({"Content-Type":f}),c.body=JSON.stringify(a.json)):f==="text/plain"?c.body=a.text:f==="application/x-www-form-urlencoded"&&a.formData?c.body=_0(a.formData):c.body=a.formData}return new Request(o,c)}function OT(e,t){let i=new URL(e.url),a=typeof t=="string"?fa(t):t;if(i.pathname=a.pathname||"/",a.search){let o=new URLSearchParams(a.search),c=o.getAll("index");o.delete("index");for(let u of c.filter(Boolean))o.append("index",u);i.search=o.size?`?${o.toString()}`:""}else i.search="";return i.hash=a.hash||"",i}function _0(e){let t=new URLSearchParams;for(let[i,a]of e.entries())t.append(i,typeof a=="string"?a:a.name);return t}function kS(e){let t=new FormData;for(let[i,a]of e.entries())t.append(i,a);return t}function Ik(e,t,i,a=!1,o=!1){let c={},u=null,f,d=!1,m={},y=i&&Qr(i[1])?i[1].error:void 0;return e.forEach(v=>{if(!(v.route.id in t))return;let w=v.route.id,x=t[w];if(vt(!so(x),"Cannot handle redirect results in processLoaderData"),Qr(x)){let C=x.error;if(y!==void 0&&(C=y,y=void 0),u=u||{},o)u[w]=C;else{let E=xs(e,w);u[E.route.id]==null&&(u[E.route.id]=C)}a||(c[w]=RT),d||(d=!0,f=xu(x.error)?x.error.status:500),x.headers&&(m[w]=x.headers)}else c[w]=x.data,x.statusCode&&x.statusCode!==200&&!d&&(f=x.statusCode),x.headers&&(m[w]=x.headers)}),y!==void 0&&i&&(u={[i[0]]:y},i[2]&&(c[i[2]]=void 0)),{loaderData:c,errors:u,statusCode:f||200,loaderHeaders:m}}function OS(e,t,i,a,o,c,u){let{loaderData:f,errors:d}=Ik(t,i,a);return o.filter(m=>!m.matches||m.matches.some(y=>y.shouldLoad)).forEach(m=>{let{key:y,match:v,controller:w}=m;if(w&&w.signal.aborted)return;let x=c[y];if(vt(x,"Did not find corresponding fetcher result"),Qr(x)){let C=xs(e.matches,v?.route.id);d&&d[C.route.id]||(d={...d,[C.route.id]:x.error}),u.delete(y)}else if(so(x))vt(!1,"Unhandled fetcher revalidation redirect");else{let C=ta(x.data);u.set(y,C)}}),{loaderData:f,errors:d}}function DS(e,t,i,a){let o=Object.entries(t).filter(([,c])=>c!==RT).reduce((c,[u,f])=>(c[u]=f,c),{});for(let c of i){let u=c.route.id;if(!t.hasOwnProperty(u)&&e.hasOwnProperty(u)&&c.route.loader&&(o[u]=e[u]),a&&a.hasOwnProperty(u))break}return o}function LS(e){return e?Qr(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function xs(e,t){return(t?e.slice(0,e.findIndex(a=>a.route.id===t)+1):[...e]).reverse().find(a=>a.route.hasErrorBoundary===!0)||e[0]}function Zf(e){let t=e.length===1?e[0]:e.find(i=>i.index||!i.path||i.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function yi(e,{pathname:t,routeId:i,method:a,type:o,message:c}={}){let u="Unknown Server Error",f="Unknown @remix-run/router error";return e===400?(u="Bad Request",a&&t&&i?f=`You made a ${a} request to "${t}" but did not provide a \`loader\` for route "${i}", so there is no way to handle the request.`:o==="invalid-body"&&(f="Unable to encode submission body")):e===403?(u="Forbidden",f=`Route "${i}" does not match URL "${t}"`):e===404?(u="Not Found",f=`No route matches URL "${t}"`):e===405&&(u="Method Not Allowed",a&&t&&i?f=`You made a ${a.toUpperCase()} request to "${t}" but did not provide an \`action\` for route "${i}", so there is no way to handle the request.`:a&&(f=`Invalid request method "${a.toUpperCase()}"`)),new Du(e||500,u,new Error(f),!0)}function Qf(e){let t=Object.entries(e);for(let i=t.length-1;i>=0;i--){let[a,o]=t[i];if(so(o))return{key:a,result:o}}}function DT(e){let t=typeof e=="string"?fa(e):e;return Ar({...t,hash:""})}function Bk(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function Hk(e){return new Du(e.init?.status??500,e.init?.statusText??"Internal Server Error",e.data)}function Fk(e){return e!=null&&typeof e=="object"&&Object.entries(e).every(([t,i])=>typeof t=="string"&&Yk(i))}function Yk(e){return e!=null&&typeof e=="object"&&"type"in e&&"result"in e&&(e.type==="data"||e.type==="error")}function Gk(e){return Qy(e.result)&&CT.has(e.result.status)}function Qr(e){return e.type==="error"}function so(e){return(e&&e.type)==="redirect"}function PS(e){return typeof e=="object"&&e!=null&&"type"in e&&"data"in e&&"init"in e&&e.type==="DataWithResponseInit"}function Qy(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function qk(e){return CT.has(e)}function $k(e){return Qy(e)&&qk(e.status)&&e.headers.has("Location")}function Kk(e){return Sk.has(e.toUpperCase())}function mr(e){return xk.has(e.toUpperCase())}function Jy(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function jd(e,t){let i=typeof t=="string"?fa(t).search:t.search;if(e[e.length-1].route.index&&Jy(i||""))return e[e.length-1];let a=vT(e);return a[a.length-1]}function _S(e){let{formMethod:t,formAction:i,formEncType:a,text:o,formData:c,json:u}=e;if(!(!t||!i||!a)){if(o!=null)return{formMethod:t,formAction:i,formEncType:a,formData:void 0,json:void 0,text:o};if(c!=null)return{formMethod:t,formAction:i,formEncType:a,formData:c,json:void 0,text:void 0};if(u!==void 0)return{formMethod:t,formAction:i,formEncType:a,formData:void 0,json:u,text:void 0}}}function Rg(e,t,i,a){return a?{state:"loading",location:e,matches:t,historyAction:i,formMethod:a.formMethod,formAction:a.formAction,formEncType:a.formEncType,formData:a.formData,json:a.json,text:a.text}:{state:"loading",location:e,matches:t,historyAction:i,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function Xk(e,t,i,a){return{state:"submitting",location:e,matches:t,historyAction:i,formMethod:a.formMethod,formAction:a.formAction,formEncType:a.formEncType,formData:a.formData,json:a.json,text:a.text}}function Pc(e,t){return e?{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function Wk(e,t){return{state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0}}function ta(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function Zk(e,t){try{let i=e.sessionStorage.getItem(ET);if(i){let a=JSON.parse(i);for(let[o,c]of Object.entries(a||{}))c&&Array.isArray(c)&&t.set(o,new Set(c||[]))}}catch{}}function Qk(e,t){if(t.size>0){let i={};for(let[a,o]of t)i[a]=[...o];try{e.sessionStorage.setItem(ET,JSON.stringify(i))}catch(a){En(!1,`Failed to save applied view transitions in sessionStorage (${a}).`)}}}function zS(){let e,t,i=new Promise((a,o)=>{e=async c=>{a(c);try{await i}catch{}},t=async c=>{o(c);try{await i}catch{}}});return{promise:i,resolve:e,reject:t}}var xo=b.createContext(null);xo.displayName="DataRouter";var Pu=b.createContext(null);Pu.displayName="DataRouterState";var LT=b.createContext(!1);function PT(){return b.useContext(LT)}var ev=b.createContext({isTransitioning:!1});ev.displayName="ViewTransition";var _T=b.createContext(new Map);_T.displayName="Fetchers";var Jk=b.createContext(null);Jk.displayName="Await";var ri=b.createContext(null);ri.displayName="Navigation";var Rh=b.createContext(null);Rh.displayName="Location";var Ri=b.createContext({outlet:null,matches:[],isDataRoute:!1});Ri.displayName="Route";var tv=b.createContext(null);tv.displayName="RouteError";var zT="REACT_ROUTER_ERROR",eO="REDIRECT",tO="ROUTE_ERROR_RESPONSE";function nO(e){if(e.startsWith(`${zT}:${eO}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.location=="string"&&typeof t.reloadDocument=="boolean"&&typeof t.replace=="boolean")return t}catch{}}function rO(e){if(e.startsWith(`${zT}:${tO}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new Du(t.status,t.statusText,t.data)}catch{}}function iO(e,{relative:t}={}){vt(zl(),"useHref() may be used only in the context of a component.");let{basename:i,navigator:a}=b.useContext(ri),{hash:o,pathname:c,search:u}=_u(e,{relative:t}),f=c;return i!=="/"&&(f=c==="/"?i:xi([i,c])),a.createHref({pathname:f,search:u,hash:o})}function zl(){return b.useContext(Rh)!=null}function jr(){return vt(zl(),"useLocation() may be used only in the context of a component."),b.useContext(Rh).location}var VT="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function UT(e){b.useContext(ri).static||b.useLayoutEffect(e)}function Vl(){let{isDataRoute:e}=b.useContext(Ri);return e?xO():aO()}function aO(){vt(zl(),"useNavigate() may be used only in the context of a component.");let e=b.useContext(xo),{basename:t,navigator:i}=b.useContext(ri),{matches:a}=b.useContext(Ri),{pathname:o}=jr(),c=JSON.stringify(Eh(a)),u=b.useRef(!1);return UT(()=>{u.current=!0}),b.useCallback((d,m={})=>{if(En(u.current,VT),!u.current)return;if(typeof d=="number"){i.go(d);return}let y=Ou(d,JSON.parse(c),o,m.relative==="path");e==null&&t!=="/"&&(y.pathname=y.pathname==="/"?t:xi([t,y.pathname])),hl(typeof d=="string"?d:Ar(d),i.createHref(y),Wy(i),"reject"),(m.replace?i.replace:i.push)(y,m.state,m)},[t,i,c,o,e])}var IT=b.createContext(null);function sO(){return b.useContext(IT)}function oO(e){let t=b.useContext(Ri).outlet;return b.useMemo(()=>t&&b.createElement(IT.Provider,{value:e},t),[t,e])}function lO(){let{matches:e}=b.useContext(Ri);return e[e.length-1]?.params??{}}function _u(e,{relative:t}={}){let{matches:i}=b.useContext(Ri),{pathname:a}=jr(),o=JSON.stringify(Eh(i));return b.useMemo(()=>Ou(e,JSON.parse(o),a,t==="path"),[e,o,a,t])}function cO(e,t,i){vt(zl(),"useRoutes() may be used only in the context of a component.");let{navigator:a}=b.useContext(ri),{matches:o}=b.useContext(Ri),c=o[o.length-1],u=c?c.params:{},f=c?c.pathname:"/",d=c?c.pathnameBase:"/",m=c&&c.route;{let S=m&&m.path||"";HT(f,!m||S.endsWith("*")||S.endsWith("*?"),`You rendered descendant (or called \`useRoutes()\`) at "${f}" (under ) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render. +`+l.stack}}var Oe=Object.prototype.hasOwnProperty,Xe=e.unstable_scheduleCallback,je=e.unstable_cancelCallback,tt=e.unstable_shouldYield,Tt=e.unstable_requestPaint,st=e.unstable_now,ue=e.unstable_getCurrentPriorityLevel,be=e.unstable_ImmediatePriority,We=e.unstable_UserBlockingPriority,Te=e.unstable_NormalPriority,Ne=e.unstable_LowPriority,wt=e.unstable_IdlePriority,Pt=e.log,St=e.unstable_setDisableYieldValue,Dt=null,_t=null;function Gt(n){if(typeof Pt=="function"&&St(n),_t&&typeof _t.setStrictMode=="function")try{_t.setStrictMode(Dt,n)}catch{}}var qt=Math.clz32?Math.clz32:Kn,gn=Math.log,$n=Math.LN2;function Kn(n){return n>>>=0,n===0?32:31-(gn(n)/$n|0)|0}var xn=256,At=262144,dn=4194304;function zt(n){var r=n&42;if(r!==0)return r;switch(n&-n){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return n&261888;case 262144:case 524288:case 1048576:case 2097152:return n&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return n&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return n}}function On(n,r,s){var l=n.pendingLanes;if(l===0)return 0;var p=0,g=n.suspendedLanes,R=n.pingedLanes;n=n.warmLanes;var D=l&134217727;return D!==0?(l=D&~g,l!==0?p=zt(l):(R&=D,R!==0?p=zt(R):s||(s=D&~n,s!==0&&(p=zt(s))))):(D=l&~g,D!==0?p=zt(D):R!==0?p=zt(R):s||(s=l&~n,s!==0&&(p=zt(s)))),p===0?0:r!==0&&r!==p&&(r&g)===0&&(g=p&-p,s=r&-r,g>=s||g===32&&(s&4194048)!==0)?r:p}function Un(n,r){return(n.pendingLanes&~(n.suspendedLanes&~n.pingedLanes)&r)===0}function ft(n,r){switch(n){case 1:case 2:case 4:case 8:case 64:return r+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return r+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function ln(){var n=dn;return dn<<=1,(dn&62914560)===0&&(dn=4194304),n}function tn(n){for(var r=[],s=0;31>s;s++)r.push(n);return r}function It(n,r){n.pendingLanes|=r,r!==268435456&&(n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0)}function nn(n,r,s,l,p,g){var R=n.pendingLanes;n.pendingLanes=s,n.suspendedLanes=0,n.pingedLanes=0,n.warmLanes=0,n.expiredLanes&=s,n.entangledLanes&=s,n.errorRecoveryDisabledLanes&=s,n.shellSuspendCounter=0;var D=n.entanglements,G=n.expirationTimes,se=n.hiddenUpdates;for(s=R&~s;0"u")return null;try{return n.activeElement||n.body}catch{return n.body}}var Ue=/[\n"\\]/g;function qe(n){return n.replace(Ue,function(r){return"\\"+r.charCodeAt(0).toString(16)+" "})}function et(n,r,s,l,p,g,R,D){n.name="",R!=null&&typeof R!="function"&&typeof R!="symbol"&&typeof R!="boolean"?n.type=R:n.removeAttribute("type"),r!=null?R==="number"?(r===0&&n.value===""||n.value!=r)&&(n.value=""+$t(r)):n.value!==""+$t(r)&&(n.value=""+$t(r)):R!=="submit"&&R!=="reset"||n.removeAttribute("value"),r!=null?cn(n,R,$t(r)):s!=null?cn(n,R,$t(s)):l!=null&&n.removeAttribute("value"),p==null&&g!=null&&(n.defaultChecked=!!g),p!=null&&(n.checked=p&&typeof p!="function"&&typeof p!="symbol"),D!=null&&typeof D!="function"&&typeof D!="symbol"&&typeof D!="boolean"?n.name=""+$t(D):n.removeAttribute("name")}function Nt(n,r,s,l,p,g,R,D){if(g!=null&&typeof g!="function"&&typeof g!="symbol"&&typeof g!="boolean"&&(n.type=g),r!=null||s!=null){if(!(g!=="submit"&&g!=="reset"||r!=null)){oe(n);return}s=s!=null?""+$t(s):"",r=r!=null?""+$t(r):s,D||r===n.value||(n.value=r),n.defaultValue=r}l=l??p,l=typeof l!="function"&&typeof l!="symbol"&&!!l,n.checked=D?n.checked:!!l,n.defaultChecked=!!l,R!=null&&typeof R!="function"&&typeof R!="symbol"&&typeof R!="boolean"&&(n.name=R),oe(n)}function cn(n,r,s){r==="number"&&xe(n.ownerDocument)===n||n.defaultValue===""+s||(n.defaultValue=""+s)}function kt(n,r,s,l){if(n=n.options,r){r={};for(var p=0;p"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Mr=!1;if(Ir)try{var Nr={};Object.defineProperty(Nr,"passive",{get:function(){Mr=!0}}),window.addEventListener("test",Nr,Nr),window.removeEventListener("test",Nr,Nr)}catch{Mr=!1}var wr=null,wo=null,Sr=null;function So(){if(Sr)return Sr;var n,r=wo,s=r.length,l,p="value"in wr?wr.value:wr.textContent,g=p.length;for(n=0;n=Gl),Xv=" ",Wv=!1;function Zv(n,r){switch(n){case"keyup":return PA.indexOf(r.keyCode)!==-1;case"keydown":return r.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Qv(n){return n=n.detail,typeof n=="object"&&"data"in n?n.data:null}var Co=!1;function zA(n,r){switch(n){case"compositionend":return Qv(r);case"keypress":return r.which!==32?null:(Wv=!0,Xv);case"textInput":return n=r.data,n===Xv&&Wv?null:n;default:return null}}function VA(n,r){if(Co)return n==="compositionend"||!tm&&Zv(n,r)?(n=So(),Sr=wo=wr=null,Co=!1,n):null;switch(n){case"paste":return null;case"keypress":if(!(r.ctrlKey||r.altKey||r.metaKey)||r.ctrlKey&&r.altKey){if(r.char&&1=r)return{node:s,offset:r-n};n=l}e:{for(;s;){if(s.nextSibling){s=s.nextSibling;break e}s=s.parentNode}s=void 0}s=s1(s)}}function l1(n,r){return n&&r?n===r?!0:n&&n.nodeType===3?!1:r&&r.nodeType===3?l1(n,r.parentNode):"contains"in n?n.contains(r):n.compareDocumentPosition?!!(n.compareDocumentPosition(r)&16):!1:!1}function c1(n){n=n!=null&&n.ownerDocument!=null&&n.ownerDocument.defaultView!=null?n.ownerDocument.defaultView:window;for(var r=xe(n.document);r instanceof n.HTMLIFrameElement;){try{var s=typeof r.contentWindow.location.href=="string"}catch{s=!1}if(s)n=r.contentWindow;else break;r=xe(n.document)}return r}function im(n){var r=n&&n.nodeName&&n.nodeName.toLowerCase();return r&&(r==="input"&&(n.type==="text"||n.type==="search"||n.type==="tel"||n.type==="url"||n.type==="password")||r==="textarea"||n.contentEditable==="true")}var qA=Ir&&"documentMode"in document&&11>=document.documentMode,Eo=null,am=null,Xl=null,sm=!1;function u1(n,r,s){var l=s.window===s?s.document:s.nodeType===9?s:s.ownerDocument;sm||Eo==null||Eo!==xe(l)||(l=Eo,"selectionStart"in l&&im(l)?l={start:l.selectionStart,end:l.selectionEnd}:(l=(l.ownerDocument&&l.ownerDocument.defaultView||window).getSelection(),l={anchorNode:l.anchorNode,anchorOffset:l.anchorOffset,focusNode:l.focusNode,focusOffset:l.focusOffset}),Xl&&Kl(Xl,l)||(Xl=l,l=kf(am,"onSelect"),0>=R,p-=R,Ki=1<<32-qt(r)+p|s<pt?(Mt=Ie,Ie=null):Mt=Ie.sibling;var Ut=le(ne,Ie,ae[pt],ve);if(Ut===null){Ie===null&&(Ie=Mt);break}n&&Ie&&Ut.alternate===null&&r(ne,Ie),J=g(Ut,J,pt),Vt===null?$e=Ut:Vt.sibling=Ut,Vt=Ut,Ie=Mt}if(pt===ae.length)return s(ne,Ie),Ot&&ba(ne,pt),$e;if(Ie===null){for(;ptpt?(Mt=Ie,Ie=null):Mt=Ie.sibling;var ys=le(ne,Ie,Ut.value,ve);if(ys===null){Ie===null&&(Ie=Mt);break}n&&Ie&&ys.alternate===null&&r(ne,Ie),J=g(ys,J,pt),Vt===null?$e=ys:Vt.sibling=ys,Vt=ys,Ie=Mt}if(Ut.done)return s(ne,Ie),Ot&&ba(ne,pt),$e;if(Ie===null){for(;!Ut.done;pt++,Ut=ae.next())Ut=we(ne,Ut.value,ve),Ut!==null&&(J=g(Ut,J,pt),Vt===null?$e=Ut:Vt.sibling=Ut,Vt=Ut);return Ot&&ba(ne,pt),$e}for(Ie=l(Ie);!Ut.done;pt++,Ut=ae.next())Ut=de(Ie,ne,pt,Ut.value,ve),Ut!==null&&(n&&Ut.alternate!==null&&Ie.delete(Ut.key===null?pt:Ut.key),J=g(Ut,J,pt),Vt===null?$e=Ut:Vt.sibling=Ut,Vt=Ut);return n&&Ie.forEach(function(dj){return r(ne,dj)}),Ot&&ba(ne,pt),$e}function Jt(ne,J,ae,ve){if(typeof ae=="object"&&ae!==null&&ae.type===E&&ae.key===null&&(ae=ae.props.children),typeof ae=="object"&&ae!==null){switch(ae.$$typeof){case x:e:{for(var $e=ae.key;J!==null;){if(J.key===$e){if($e=ae.type,$e===E){if(J.tag===7){s(ne,J.sibling),ve=p(J,ae.props.children),ve.return=ne,ne=ve;break e}}else if(J.elementType===$e||typeof $e=="object"&&$e!==null&&$e.$$typeof===A&&qs($e)===J.type){s(ne,J.sibling),ve=p(J,ae.props),tc(ve,ae),ve.return=ne,ne=ve;break e}s(ne,J);break}else r(ne,J);J=J.sibling}ae.type===E?(ve=Bs(ae.props.children,ne.mode,ve,ae.key),ve.return=ne,ne=ve):(ve=$u(ae.type,ae.key,ae.props,null,ne.mode,ve),tc(ve,ae),ve.return=ne,ne=ve)}return R(ne);case C:e:{for($e=ae.key;J!==null;){if(J.key===$e)if(J.tag===4&&J.stateNode.containerInfo===ae.containerInfo&&J.stateNode.implementation===ae.implementation){s(ne,J.sibling),ve=p(J,ae.children||[]),ve.return=ne,ne=ve;break e}else{s(ne,J);break}else r(ne,J);J=J.sibling}ve=hm(ae,ne.mode,ve),ve.return=ne,ne=ve}return R(ne);case A:return ae=qs(ae),Jt(ne,J,ae,ve)}if(re(ae))return ze(ne,J,ae,ve);if($(ae)){if($e=$(ae),typeof $e!="function")throw Error(a(150));return ae=$e.call(ae),Qe(ne,J,ae,ve)}if(typeof ae.then=="function")return Jt(ne,J,ef(ae),ve);if(ae.$$typeof===L)return Jt(ne,J,Wu(ne,ae),ve);tf(ne,ae)}return typeof ae=="string"&&ae!==""||typeof ae=="number"||typeof ae=="bigint"?(ae=""+ae,J!==null&&J.tag===6?(s(ne,J.sibling),ve=p(J,ae),ve.return=ne,ne=ve):(s(ne,J),ve=dm(ae,ne.mode,ve),ve.return=ne,ne=ve),R(ne)):s(ne,J)}return function(ne,J,ae,ve){try{ec=0;var $e=Jt(ne,J,ae,ve);return Po=null,$e}catch(Ie){if(Ie===Lo||Ie===Qu)throw Ie;var Vt=Gr(29,Ie,null,ne.mode);return Vt.lanes=ve,Vt.return=ne,Vt}}}var Ks=D1(!0),L1=D1(!1),es=!1;function Rm(n){n.updateQueue={baseState:n.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Tm(n,r){n=n.updateQueue,r.updateQueue===n&&(r.updateQueue={baseState:n.baseState,firstBaseUpdate:n.firstBaseUpdate,lastBaseUpdate:n.lastBaseUpdate,shared:n.shared,callbacks:null})}function ts(n){return{lane:n,tag:0,payload:null,callback:null,next:null}}function ns(n,r,s){var l=n.updateQueue;if(l===null)return null;if(l=l.shared,(Bt&2)!==0){var p=l.pending;return p===null?r.next=r:(r.next=p.next,p.next=r),l.pending=r,r=qu(n),y1(n,null,s),r}return Gu(n,l,r,s),qu(n)}function nc(n,r,s){if(r=r.updateQueue,r!==null&&(r=r.shared,(s&4194048)!==0)){var l=r.lanes;l&=n.pendingLanes,s|=l,r.lanes=s,Xn(n,s)}}function Am(n,r){var s=n.updateQueue,l=n.alternate;if(l!==null&&(l=l.updateQueue,s===l)){var p=null,g=null;if(s=s.firstBaseUpdate,s!==null){do{var R={lane:s.lane,tag:s.tag,payload:s.payload,callback:null,next:null};g===null?p=g=R:g=g.next=R,s=s.next}while(s!==null);g===null?p=g=r:g=g.next=r}else p=g=r;s={baseState:l.baseState,firstBaseUpdate:p,lastBaseUpdate:g,shared:l.shared,callbacks:l.callbacks},n.updateQueue=s;return}n=s.lastBaseUpdate,n===null?s.firstBaseUpdate=r:n.next=r,s.lastBaseUpdate=r}var jm=!1;function rc(){if(jm){var n=Do;if(n!==null)throw n}}function ic(n,r,s,l){jm=!1;var p=n.updateQueue;es=!1;var g=p.firstBaseUpdate,R=p.lastBaseUpdate,D=p.shared.pending;if(D!==null){p.shared.pending=null;var G=D,se=G.next;G.next=null,R===null?g=se:R.next=se,R=G;var me=n.alternate;me!==null&&(me=me.updateQueue,D=me.lastBaseUpdate,D!==R&&(D===null?me.firstBaseUpdate=se:D.next=se,me.lastBaseUpdate=G))}if(g!==null){var we=p.baseState;R=0,me=se=G=null,D=g;do{var le=D.lane&-536870913,de=le!==D.lane;if(de?(jt&le)===le:(l&le)===le){le!==0&&le===Oo&&(jm=!0),me!==null&&(me=me.next={lane:0,tag:D.tag,payload:D.payload,callback:null,next:null});e:{var ze=n,Qe=D;le=r;var Jt=s;switch(Qe.tag){case 1:if(ze=Qe.payload,typeof ze=="function"){we=ze.call(Jt,we,le);break e}we=ze;break e;case 3:ze.flags=ze.flags&-65537|128;case 0:if(ze=Qe.payload,le=typeof ze=="function"?ze.call(Jt,we,le):ze,le==null)break e;we=v({},we,le);break e;case 2:es=!0}}le=D.callback,le!==null&&(n.flags|=64,de&&(n.flags|=8192),de=p.callbacks,de===null?p.callbacks=[le]:de.push(le))}else de={lane:le,tag:D.tag,payload:D.payload,callback:D.callback,next:null},me===null?(se=me=de,G=we):me=me.next=de,R|=le;if(D=D.next,D===null){if(D=p.shared.pending,D===null)break;de=D,D=de.next,de.next=null,p.lastBaseUpdate=de,p.shared.pending=null}}while(!0);me===null&&(G=we),p.baseState=G,p.firstBaseUpdate=se,p.lastBaseUpdate=me,g===null&&(p.shared.lanes=0),os|=R,n.lanes=R,n.memoizedState=we}}function P1(n,r){if(typeof n!="function")throw Error(a(191,n));n.call(r)}function _1(n,r){var s=n.callbacks;if(s!==null)for(n.callbacks=null,n=0;ng?g:8;var R=V.T,D={};V.T=D,$m(n,!1,r,s);try{var G=p(),se=V.S;if(se!==null&&se(D,G),G!==null&&typeof G=="object"&&typeof G.then=="function"){var me=t4(G,l);oc(n,r,me,Wr(n))}else oc(n,r,l,Wr(n))}catch(we){oc(n,r,{then:function(){},status:"rejected",reason:we},Wr())}finally{X.p=g,R!==null&&D.types!==null&&(R.types=D.types),V.T=R}}function o4(){}function Gm(n,r,s,l){if(n.tag!==5)throw Error(a(476));var p=mb(n).queue;hb(n,p,r,Q,s===null?o4:function(){return pb(n),s(l)})}function mb(n){var r=n.memoizedState;if(r!==null)return r;r={memoizedState:Q,baseState:Q,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ca,lastRenderedState:Q},next:null};var s={};return r.next={memoizedState:s,baseState:s,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Ca,lastRenderedState:s},next:null},n.memoizedState=r,n=n.alternate,n!==null&&(n.memoizedState=r),r}function pb(n){var r=mb(n);r.next===null&&(r=n.alternate.memoizedState),oc(n,r.next.queue,{},Wr())}function qm(){return ir(Ec)}function gb(){return Mn().memoizedState}function yb(){return Mn().memoizedState}function l4(n){for(var r=n.return;r!==null;){switch(r.tag){case 24:case 3:var s=Wr();n=ts(s);var l=ns(r,n,s);l!==null&&(Pr(l,r,s),nc(l,r,s)),r={cache:wm()},n.payload=r;return}r=r.return}}function c4(n,r,s){var l=Wr();s={lane:l,revertLane:0,gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},df(n)?bb(r,s):(s=um(n,r,s,l),s!==null&&(Pr(s,n,l),xb(s,r,l)))}function vb(n,r,s){var l=Wr();oc(n,r,s,l)}function oc(n,r,s,l){var p={lane:l,revertLane:0,gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null};if(df(n))bb(r,p);else{var g=n.alternate;if(n.lanes===0&&(g===null||g.lanes===0)&&(g=r.lastRenderedReducer,g!==null))try{var R=r.lastRenderedState,D=g(R,s);if(p.hasEagerState=!0,p.eagerState=D,Yr(D,R))return Gu(n,r,p,0),rn===null&&Yu(),!1}catch{}if(s=um(n,r,p,l),s!==null)return Pr(s,n,l),xb(s,r,l),!0}return!1}function $m(n,r,s,l){if(l={lane:2,revertLane:Rp(),gesture:null,action:l,hasEagerState:!1,eagerState:null,next:null},df(n)){if(r)throw Error(a(479))}else r=um(n,s,l,2),r!==null&&Pr(r,n,2)}function df(n){var r=n.alternate;return n===ct||r!==null&&r===ct}function bb(n,r){zo=af=!0;var s=n.pending;s===null?r.next=r:(r.next=s.next,s.next=r),n.pending=r}function xb(n,r,s){if((s&4194048)!==0){var l=r.lanes;l&=n.pendingLanes,s|=l,r.lanes=s,Xn(n,s)}}var lc={readContext:ir,use:lf,useCallback:wn,useContext:wn,useEffect:wn,useImperativeHandle:wn,useLayoutEffect:wn,useInsertionEffect:wn,useMemo:wn,useReducer:wn,useRef:wn,useState:wn,useDebugValue:wn,useDeferredValue:wn,useTransition:wn,useSyncExternalStore:wn,useId:wn,useHostTransitionStatus:wn,useFormState:wn,useActionState:wn,useOptimistic:wn,useMemoCache:wn,useCacheRefresh:wn};lc.useEffectEvent=wn;var wb={readContext:ir,use:lf,useCallback:function(n,r){return Er().memoizedState=[n,r===void 0?null:r],n},useContext:ir,useEffect:ib,useImperativeHandle:function(n,r,s){s=s!=null?s.concat([n]):null,uf(4194308,4,lb.bind(null,r,n),s)},useLayoutEffect:function(n,r){return uf(4194308,4,n,r)},useInsertionEffect:function(n,r){uf(4,2,n,r)},useMemo:function(n,r){var s=Er();r=r===void 0?null:r;var l=n();if(Xs){Gt(!0);try{n()}finally{Gt(!1)}}return s.memoizedState=[l,r],l},useReducer:function(n,r,s){var l=Er();if(s!==void 0){var p=s(r);if(Xs){Gt(!0);try{s(r)}finally{Gt(!1)}}}else p=r;return l.memoizedState=l.baseState=p,n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:n,lastRenderedState:p},l.queue=n,n=n.dispatch=c4.bind(null,ct,n),[l.memoizedState,n]},useRef:function(n){var r=Er();return n={current:n},r.memoizedState=n},useState:function(n){n=Im(n);var r=n.queue,s=vb.bind(null,ct,r);return r.dispatch=s,[n.memoizedState,s]},useDebugValue:Fm,useDeferredValue:function(n,r){var s=Er();return Ym(s,n,r)},useTransition:function(){var n=Im(!1);return n=hb.bind(null,ct,n.queue,!0,!1),Er().memoizedState=n,[!1,n]},useSyncExternalStore:function(n,r,s){var l=ct,p=Er();if(Ot){if(s===void 0)throw Error(a(407));s=s()}else{if(s=r(),rn===null)throw Error(a(349));(jt&127)!==0||H1(l,r,s)}p.memoizedState=s;var g={value:s,getSnapshot:r};return p.queue=g,ib(Y1.bind(null,l,g,n),[n]),l.flags|=2048,Uo(9,{destroy:void 0},F1.bind(null,l,g,s,r),null),s},useId:function(){var n=Er(),r=rn.identifierPrefix;if(Ot){var s=Xi,l=Ki;s=(l&~(1<<32-qt(l)-1)).toString(32)+s,r="_"+r+"R_"+s,s=sf++,0<\/script>",g=g.removeChild(g.firstChild);break;case"select":g=typeof l.is=="string"?R.createElement("select",{is:l.is}):R.createElement("select"),l.multiple?g.multiple=!0:l.size&&(g.size=l.size);break;default:g=typeof l.is=="string"?R.createElement(p,{is:l.is}):R.createElement(p)}}g[Re]=r,g[Me]=l;e:for(R=r.child;R!==null;){if(R.tag===5||R.tag===6)g.appendChild(R.stateNode);else if(R.tag!==4&&R.tag!==27&&R.child!==null){R.child.return=R,R=R.child;continue}if(R===r)break e;for(;R.sibling===null;){if(R.return===null||R.return===r)break e;R=R.return}R.sibling.return=R.return,R=R.sibling}r.stateNode=g;e:switch(sr(g,p,l),p){case"button":case"input":case"select":case"textarea":l=!!l.autoFocus;break e;case"img":l=!0;break e;default:l=!1}l&&Ra(r)}}return fn(r),op(r,r.type,n===null?null:n.memoizedProps,r.pendingProps,s),null;case 6:if(n&&r.stateNode!=null)n.memoizedProps!==l&&Ra(r);else{if(typeof l!="string"&&r.stateNode===null)throw Error(a(166));if(n=ie.current,No(r)){if(n=r.stateNode,s=r.memoizedProps,l=null,p=rr,p!==null)switch(p.tag){case 27:case 5:l=p.memoizedProps}n[Re]=r,n=!!(n.nodeValue===s||l!==null&&l.suppressHydrationWarning===!0||I2(n.nodeValue,s)),n||Qa(r,!0)}else n=Of(n).createTextNode(l),n[Re]=r,r.stateNode=n}return fn(r),null;case 31:if(s=r.memoizedState,n===null||n.memoizedState!==null){if(l=No(r),s!==null){if(n===null){if(!l)throw Error(a(318));if(n=r.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(a(557));n[Re]=r}else Hs(),(r.flags&128)===0&&(r.memoizedState=null),r.flags|=4;fn(r),n=!1}else s=ym(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=s),n=!0;if(!n)return r.flags&256?($r(r),r):($r(r),null);if((r.flags&128)!==0)throw Error(a(558))}return fn(r),null;case 13:if(l=r.memoizedState,n===null||n.memoizedState!==null&&n.memoizedState.dehydrated!==null){if(p=No(r),l!==null&&l.dehydrated!==null){if(n===null){if(!p)throw Error(a(318));if(p=r.memoizedState,p=p!==null?p.dehydrated:null,!p)throw Error(a(317));p[Re]=r}else Hs(),(r.flags&128)===0&&(r.memoizedState=null),r.flags|=4;fn(r),p=!1}else p=ym(),n!==null&&n.memoizedState!==null&&(n.memoizedState.hydrationErrors=p),p=!0;if(!p)return r.flags&256?($r(r),r):($r(r),null)}return $r(r),(r.flags&128)!==0?(r.lanes=s,r):(s=l!==null,n=n!==null&&n.memoizedState!==null,s&&(l=r.child,p=null,l.alternate!==null&&l.alternate.memoizedState!==null&&l.alternate.memoizedState.cachePool!==null&&(p=l.alternate.memoizedState.cachePool.pool),g=null,l.memoizedState!==null&&l.memoizedState.cachePool!==null&&(g=l.memoizedState.cachePool.pool),g!==p&&(l.flags|=2048)),s!==n&&s&&(r.child.flags|=8192),yf(r,r.updateQueue),fn(r),null);case 4:return ce(),n===null&&Mp(r.stateNode.containerInfo),fn(r),null;case 10:return wa(r.type),fn(r),null;case 19:if(_(jn),l=r.memoizedState,l===null)return fn(r),null;if(p=(r.flags&128)!==0,g=l.rendering,g===null)if(p)uc(l,!1);else{if(Sn!==0||n!==null&&(n.flags&128)!==0)for(n=r.child;n!==null;){if(g=rf(n),g!==null){for(r.flags|=128,uc(l,!1),n=g.updateQueue,r.updateQueue=n,yf(r,n),r.subtreeFlags=0,n=s,s=r.child;s!==null;)v1(s,n),s=s.sibling;return I(jn,jn.current&1|2),Ot&&ba(r,l.treeForkCount),r.child}n=n.sibling}l.tail!==null&&st()>Sf&&(r.flags|=128,p=!0,uc(l,!1),r.lanes=4194304)}else{if(!p)if(n=rf(g),n!==null){if(r.flags|=128,p=!0,n=n.updateQueue,r.updateQueue=n,yf(r,n),uc(l,!0),l.tail===null&&l.tailMode==="hidden"&&!g.alternate&&!Ot)return fn(r),null}else 2*st()-l.renderingStartTime>Sf&&s!==536870912&&(r.flags|=128,p=!0,uc(l,!1),r.lanes=4194304);l.isBackwards?(g.sibling=r.child,r.child=g):(n=l.last,n!==null?n.sibling=g:r.child=g,l.last=g)}return l.tail!==null?(n=l.tail,l.rendering=n,l.tail=n.sibling,l.renderingStartTime=st(),n.sibling=null,s=jn.current,I(jn,p?s&1|2:s&1),Ot&&ba(r,l.treeForkCount),n):(fn(r),null);case 22:case 23:return $r(r),Nm(),l=r.memoizedState!==null,n!==null?n.memoizedState!==null!==l&&(r.flags|=8192):l&&(r.flags|=8192),l?(s&536870912)!==0&&(r.flags&128)===0&&(fn(r),r.subtreeFlags&6&&(r.flags|=8192)):fn(r),s=r.updateQueue,s!==null&&yf(r,s.retryQueue),s=null,n!==null&&n.memoizedState!==null&&n.memoizedState.cachePool!==null&&(s=n.memoizedState.cachePool.pool),l=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(l=r.memoizedState.cachePool.pool),l!==s&&(r.flags|=2048),n!==null&&_(Gs),null;case 24:return s=null,n!==null&&(s=n.memoizedState.cache),r.memoizedState.cache!==s&&(r.flags|=2048),wa(Ln),fn(r),null;case 25:return null;case 30:return null}throw Error(a(156,r.tag))}function m4(n,r){switch(pm(r),r.tag){case 1:return n=r.flags,n&65536?(r.flags=n&-65537|128,r):null;case 3:return wa(Ln),ce(),n=r.flags,(n&65536)!==0&&(n&128)===0?(r.flags=n&-65537|128,r):null;case 26:case 27:case 5:return Le(r),null;case 31:if(r.memoizedState!==null){if($r(r),r.alternate===null)throw Error(a(340));Hs()}return n=r.flags,n&65536?(r.flags=n&-65537|128,r):null;case 13:if($r(r),n=r.memoizedState,n!==null&&n.dehydrated!==null){if(r.alternate===null)throw Error(a(340));Hs()}return n=r.flags,n&65536?(r.flags=n&-65537|128,r):null;case 19:return _(jn),null;case 4:return ce(),null;case 10:return wa(r.type),null;case 22:case 23:return $r(r),Nm(),n!==null&&_(Gs),n=r.flags,n&65536?(r.flags=n&-65537|128,r):null;case 24:return wa(Ln),null;case 25:return null;default:return null}}function Gb(n,r){switch(pm(r),r.tag){case 3:wa(Ln),ce();break;case 26:case 27:case 5:Le(r);break;case 4:ce();break;case 31:r.memoizedState!==null&&$r(r);break;case 13:$r(r);break;case 19:_(jn);break;case 10:wa(r.type);break;case 22:case 23:$r(r),Nm(),n!==null&&_(Gs);break;case 24:wa(Ln)}}function fc(n,r){try{var s=r.updateQueue,l=s!==null?s.lastEffect:null;if(l!==null){var p=l.next;s=p;do{if((s.tag&n)===n){l=void 0;var g=s.create,R=s.inst;l=g(),R.destroy=l}s=s.next}while(s!==p)}}catch(D){Xt(r,r.return,D)}}function as(n,r,s){try{var l=r.updateQueue,p=l!==null?l.lastEffect:null;if(p!==null){var g=p.next;l=g;do{if((l.tag&n)===n){var R=l.inst,D=R.destroy;if(D!==void 0){R.destroy=void 0,p=r;var G=s,se=D;try{se()}catch(me){Xt(p,G,me)}}}l=l.next}while(l!==g)}}catch(me){Xt(r,r.return,me)}}function qb(n){var r=n.updateQueue;if(r!==null){var s=n.stateNode;try{_1(r,s)}catch(l){Xt(n,n.return,l)}}}function $b(n,r,s){s.props=Ws(n.type,n.memoizedProps),s.state=n.memoizedState;try{s.componentWillUnmount()}catch(l){Xt(n,r,l)}}function dc(n,r){try{var s=n.ref;if(s!==null){switch(n.tag){case 26:case 27:case 5:var l=n.stateNode;break;case 30:l=n.stateNode;break;default:l=n.stateNode}typeof s=="function"?n.refCleanup=s(l):s.current=l}}catch(p){Xt(n,r,p)}}function Wi(n,r){var s=n.ref,l=n.refCleanup;if(s!==null)if(typeof l=="function")try{l()}catch(p){Xt(n,r,p)}finally{n.refCleanup=null,n=n.alternate,n!=null&&(n.refCleanup=null)}else if(typeof s=="function")try{s(null)}catch(p){Xt(n,r,p)}else s.current=null}function Kb(n){var r=n.type,s=n.memoizedProps,l=n.stateNode;try{e:switch(r){case"button":case"input":case"select":case"textarea":s.autoFocus&&l.focus();break e;case"img":s.src?l.src=s.src:s.srcSet&&(l.srcset=s.srcSet)}}catch(p){Xt(n,n.return,p)}}function lp(n,r,s){try{var l=n.stateNode;_4(l,n.type,s,r),l[Me]=r}catch(p){Xt(n,n.return,p)}}function Xb(n){return n.tag===5||n.tag===3||n.tag===26||n.tag===27&&ds(n.type)||n.tag===4}function cp(n){e:for(;;){for(;n.sibling===null;){if(n.return===null||Xb(n.return))return null;n=n.return}for(n.sibling.return=n.return,n=n.sibling;n.tag!==5&&n.tag!==6&&n.tag!==18;){if(n.tag===27&&ds(n.type)||n.flags&2||n.child===null||n.tag===4)continue e;n.child.return=n,n=n.child}if(!(n.flags&2))return n.stateNode}}function up(n,r,s){var l=n.tag;if(l===5||l===6)n=n.stateNode,r?(s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s).insertBefore(n,r):(r=s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s,r.appendChild(n),s=s._reactRootContainer,s!=null||r.onclick!==null||(r.onclick=Vr));else if(l!==4&&(l===27&&ds(n.type)&&(s=n.stateNode,r=null),n=n.child,n!==null))for(up(n,r,s),n=n.sibling;n!==null;)up(n,r,s),n=n.sibling}function vf(n,r,s){var l=n.tag;if(l===5||l===6)n=n.stateNode,r?s.insertBefore(n,r):s.appendChild(n);else if(l!==4&&(l===27&&ds(n.type)&&(s=n.stateNode),n=n.child,n!==null))for(vf(n,r,s),n=n.sibling;n!==null;)vf(n,r,s),n=n.sibling}function Wb(n){var r=n.stateNode,s=n.memoizedProps;try{for(var l=n.type,p=r.attributes;p.length;)r.removeAttributeNode(p[0]);sr(r,l,s),r[Re]=n,r[Me]=s}catch(g){Xt(n,n.return,g)}}var Ta=!1,zn=!1,fp=!1,Zb=typeof WeakSet=="function"?WeakSet:Set,Zn=null;function p4(n,r){if(n=n.containerInfo,Op=Uf,n=c1(n),im(n)){if("selectionStart"in n)var s={start:n.selectionStart,end:n.selectionEnd};else e:{s=(s=n.ownerDocument)&&s.defaultView||window;var l=s.getSelection&&s.getSelection();if(l&&l.rangeCount!==0){s=l.anchorNode;var p=l.anchorOffset,g=l.focusNode;l=l.focusOffset;try{s.nodeType,g.nodeType}catch{s=null;break e}var R=0,D=-1,G=-1,se=0,me=0,we=n,le=null;t:for(;;){for(var de;we!==s||p!==0&&we.nodeType!==3||(D=R+p),we!==g||l!==0&&we.nodeType!==3||(G=R+l),we.nodeType===3&&(R+=we.nodeValue.length),(de=we.firstChild)!==null;)le=we,we=de;for(;;){if(we===n)break t;if(le===s&&++se===p&&(D=R),le===g&&++me===l&&(G=R),(de=we.nextSibling)!==null)break;we=le,le=we.parentNode}we=de}s=D===-1||G===-1?null:{start:D,end:G}}else s=null}s=s||{start:0,end:0}}else s=null;for(Dp={focusedElem:n,selectionRange:s},Uf=!1,Zn=r;Zn!==null;)if(r=Zn,n=r.child,(r.subtreeFlags&1028)!==0&&n!==null)n.return=r,Zn=n;else for(;Zn!==null;){switch(r=Zn,g=r.alternate,n=r.flags,r.tag){case 0:if((n&4)!==0&&(n=r.updateQueue,n=n!==null?n.events:null,n!==null))for(s=0;s title"))),sr(g,l,s),g[Re]=n,ot(g),l=g;break e;case"link":var R=rx("link","href",p).get(l+(s.href||""));if(R){for(var D=0;DJt&&(R=Jt,Jt=Qe,Qe=R);var ne=o1(D,Qe),J=o1(D,Jt);if(ne&&J&&(de.rangeCount!==1||de.anchorNode!==ne.node||de.anchorOffset!==ne.offset||de.focusNode!==J.node||de.focusOffset!==J.offset)){var ae=we.createRange();ae.setStart(ne.node,ne.offset),de.removeAllRanges(),Qe>Jt?(de.addRange(ae),de.extend(J.node,J.offset)):(ae.setEnd(J.node,J.offset),de.addRange(ae))}}}}for(we=[],de=D;de=de.parentNode;)de.nodeType===1&&we.push({element:de,left:de.scrollLeft,top:de.scrollTop});for(typeof D.focus=="function"&&D.focus(),D=0;Ds?32:s,V.T=null,s=vp,vp=null;var g=cs,R=ka;if(Yn=0,Yo=cs=null,ka=0,(Bt&6)!==0)throw Error(a(331));var D=Bt;if(Bt|=4,l2(g.current),a2(g,g.current,R,s),Bt=D,vc(0,!1),_t&&typeof _t.onPostCommitFiberRoot=="function")try{_t.onPostCommitFiberRoot(Dt,g)}catch{}return!0}finally{X.p=p,V.T=l,T2(n,r)}}function j2(n,r,s){r=ci(s,r),r=Zm(n.stateNode,r,2),n=ns(n,r,2),n!==null&&(It(n,2),Zi(n))}function Xt(n,r,s){if(n.tag===3)j2(n,n,s);else for(;r!==null;){if(r.tag===3){j2(r,n,s);break}else if(r.tag===1){var l=r.stateNode;if(typeof r.type.getDerivedStateFromError=="function"||typeof l.componentDidCatch=="function"&&(ls===null||!ls.has(l))){n=ci(s,n),s=Mb(2),l=ns(r,s,2),l!==null&&(Nb(s,l,r,n),It(l,2),Zi(l));break}}r=r.return}}function Sp(n,r,s){var l=n.pingCache;if(l===null){l=n.pingCache=new v4;var p=new Set;l.set(r,p)}else p=l.get(r),p===void 0&&(p=new Set,l.set(r,p));p.has(s)||(mp=!0,p.add(s),n=C4.bind(null,n,r,s),r.then(n,n))}function C4(n,r,s){var l=n.pingCache;l!==null&&l.delete(r),n.pingedLanes|=n.suspendedLanes&s,n.warmLanes&=~s,rn===n&&(jt&s)===s&&(Sn===4||Sn===3&&(jt&62914560)===jt&&300>st()-wf?(Bt&2)===0&&Go(n,0):pp|=s,Fo===jt&&(Fo=0)),Zi(n)}function M2(n,r){r===0&&(r=ln()),n=Is(n,r),n!==null&&(It(n,r),Zi(n))}function E4(n){var r=n.memoizedState,s=0;r!==null&&(s=r.retryLane),M2(n,s)}function R4(n,r){var s=0;switch(n.tag){case 31:case 13:var l=n.stateNode,p=n.memoizedState;p!==null&&(s=p.retryLane);break;case 19:l=n.stateNode;break;case 22:l=n.stateNode._retryCache;break;default:throw Error(a(314))}l!==null&&l.delete(r),M2(n,s)}function T4(n,r){return Xe(n,r)}var jf=null,$o=null,Cp=!1,Mf=!1,Ep=!1,fs=0;function Zi(n){n!==$o&&n.next===null&&($o===null?jf=$o=n:$o=$o.next=n),Mf=!0,Cp||(Cp=!0,j4())}function vc(n,r){if(!Ep&&Mf){Ep=!0;do for(var s=!1,l=jf;l!==null;){if(n!==0){var p=l.pendingLanes;if(p===0)var g=0;else{var R=l.suspendedLanes,D=l.pingedLanes;g=(1<<31-qt(42|n)+1)-1,g&=p&~(R&~D),g=g&201326741?g&201326741|1:g?g|2:0}g!==0&&(s=!0,D2(l,g))}else g=jt,g=On(l,l===rn?g:0,l.cancelPendingCommit!==null||l.timeoutHandle!==-1),(g&3)===0||Un(l,g)||(s=!0,D2(l,g));l=l.next}while(s);Ep=!1}}function A4(){N2()}function N2(){Mf=Cp=!1;var n=0;fs!==0&&V4()&&(n=fs);for(var r=st(),s=null,l=jf;l!==null;){var p=l.next,g=k2(l,r);g===0?(l.next=null,s===null?jf=p:s.next=p,p===null&&($o=s)):(s=l,(n!==0||(g&3)!==0)&&(Mf=!0)),l=p}Yn!==0&&Yn!==5||vc(n),fs!==0&&(fs=0)}function k2(n,r){for(var s=n.suspendedLanes,l=n.pingedLanes,p=n.expirationTimes,g=n.pendingLanes&-62914561;0D)break;var me=G.transferSize,we=G.initiatorType;me&&B2(we)&&(G=G.responseEnd,R+=me*(G"u"?null:document;function J2(n,r,s){var l=Ko;if(l&&typeof r=="string"&&r){var p=qe(r);p='link[rel="'+n+'"][href="'+p+'"]',typeof s=="string"&&(p+='[crossorigin="'+s+'"]'),Q2.has(p)||(Q2.add(p),n={rel:n,crossOrigin:s,href:r},l.querySelector(p)===null&&(r=l.createElement("link"),sr(r,"link",n),ot(r),l.head.appendChild(r)))}}function $4(n){Oa.D(n),J2("dns-prefetch",n,null)}function K4(n,r){Oa.C(n,r),J2("preconnect",n,r)}function X4(n,r,s){Oa.L(n,r,s);var l=Ko;if(l&&n&&r){var p='link[rel="preload"][as="'+qe(r)+'"]';r==="image"&&s&&s.imageSrcSet?(p+='[imagesrcset="'+qe(s.imageSrcSet)+'"]',typeof s.imageSizes=="string"&&(p+='[imagesizes="'+qe(s.imageSizes)+'"]')):p+='[href="'+qe(n)+'"]';var g=p;switch(r){case"style":g=Xo(n);break;case"script":g=Wo(n)}pi.has(g)||(n=v({rel:"preload",href:r==="image"&&s&&s.imageSrcSet?void 0:n,as:r},s),pi.set(g,n),l.querySelector(p)!==null||r==="style"&&l.querySelector(Sc(g))||r==="script"&&l.querySelector(Cc(g))||(r=l.createElement("link"),sr(r,"link",n),ot(r),l.head.appendChild(r)))}}function W4(n,r){Oa.m(n,r);var s=Ko;if(s&&n){var l=r&&typeof r.as=="string"?r.as:"script",p='link[rel="modulepreload"][as="'+qe(l)+'"][href="'+qe(n)+'"]',g=p;switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":g=Wo(n)}if(!pi.has(g)&&(n=v({rel:"modulepreload",href:n},r),pi.set(g,n),s.querySelector(p)===null)){switch(l){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(s.querySelector(Cc(g)))return}l=s.createElement("link"),sr(l,"link",n),ot(l),s.head.appendChild(l)}}}function Z4(n,r,s){Oa.S(n,r,s);var l=Ko;if(l&&n){var p=Yt(l).hoistableStyles,g=Xo(n);r=r||"default";var R=p.get(g);if(!R){var D={loading:0,preload:null};if(R=l.querySelector(Sc(g)))D.loading=5;else{n=v({rel:"stylesheet",href:n,"data-precedence":r},s),(s=pi.get(g))&&Ip(n,s);var G=R=l.createElement("link");ot(G),sr(G,"link",n),G._p=new Promise(function(se,me){G.onload=se,G.onerror=me}),G.addEventListener("load",function(){D.loading|=1}),G.addEventListener("error",function(){D.loading|=2}),D.loading|=4,Lf(R,r,l)}R={type:"stylesheet",instance:R,count:1,state:D},p.set(g,R)}}}function Q4(n,r){Oa.X(n,r);var s=Ko;if(s&&n){var l=Yt(s).hoistableScripts,p=Wo(n),g=l.get(p);g||(g=s.querySelector(Cc(p)),g||(n=v({src:n,async:!0},r),(r=pi.get(p))&&Bp(n,r),g=s.createElement("script"),ot(g),sr(g,"link",n),s.head.appendChild(g)),g={type:"script",instance:g,count:1,state:null},l.set(p,g))}}function J4(n,r){Oa.M(n,r);var s=Ko;if(s&&n){var l=Yt(s).hoistableScripts,p=Wo(n),g=l.get(p);g||(g=s.querySelector(Cc(p)),g||(n=v({src:n,async:!0,type:"module"},r),(r=pi.get(p))&&Bp(n,r),g=s.createElement("script"),ot(g),sr(g,"link",n),s.head.appendChild(g)),g={type:"script",instance:g,count:1,state:null},l.set(p,g))}}function ex(n,r,s,l){var p=(p=ie.current)?Df(p):null;if(!p)throw Error(a(446));switch(n){case"meta":case"title":return null;case"style":return typeof s.precedence=="string"&&typeof s.href=="string"?(r=Xo(s.href),s=Yt(p).hoistableStyles,l=s.get(r),l||(l={type:"style",instance:null,count:0,state:null},s.set(r,l)),l):{type:"void",instance:null,count:0,state:null};case"link":if(s.rel==="stylesheet"&&typeof s.href=="string"&&typeof s.precedence=="string"){n=Xo(s.href);var g=Yt(p).hoistableStyles,R=g.get(n);if(R||(p=p.ownerDocument||p,R={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},g.set(n,R),(g=p.querySelector(Sc(n)))&&!g._p&&(R.instance=g,R.state.loading=5),pi.has(n)||(s={rel:"preload",as:"style",href:s.href,crossOrigin:s.crossOrigin,integrity:s.integrity,media:s.media,hrefLang:s.hrefLang,referrerPolicy:s.referrerPolicy},pi.set(n,s),g||ej(p,n,s,R.state))),r&&l===null)throw Error(a(528,""));return R}if(r&&l!==null)throw Error(a(529,""));return null;case"script":return r=s.async,s=s.src,typeof s=="string"&&r&&typeof r!="function"&&typeof r!="symbol"?(r=Wo(s),s=Yt(p).hoistableScripts,l=s.get(r),l||(l={type:"script",instance:null,count:0,state:null},s.set(r,l)),l):{type:"void",instance:null,count:0,state:null};default:throw Error(a(444,n))}}function Xo(n){return'href="'+qe(n)+'"'}function Sc(n){return'link[rel="stylesheet"]['+n+"]"}function tx(n){return v({},n,{"data-precedence":n.precedence,precedence:null})}function ej(n,r,s,l){n.querySelector('link[rel="preload"][as="style"]['+r+"]")?l.loading=1:(r=n.createElement("link"),l.preload=r,r.addEventListener("load",function(){return l.loading|=1}),r.addEventListener("error",function(){return l.loading|=2}),sr(r,"link",s),ot(r),n.head.appendChild(r))}function Wo(n){return'[src="'+qe(n)+'"]'}function Cc(n){return"script[async]"+n}function nx(n,r,s){if(r.count++,r.instance===null)switch(r.type){case"style":var l=n.querySelector('style[data-href~="'+qe(s.href)+'"]');if(l)return r.instance=l,ot(l),l;var p=v({},s,{"data-href":s.href,"data-precedence":s.precedence,href:null,precedence:null});return l=(n.ownerDocument||n).createElement("style"),ot(l),sr(l,"style",p),Lf(l,s.precedence,n),r.instance=l;case"stylesheet":p=Xo(s.href);var g=n.querySelector(Sc(p));if(g)return r.state.loading|=4,r.instance=g,ot(g),g;l=tx(s),(p=pi.get(p))&&Ip(l,p),g=(n.ownerDocument||n).createElement("link"),ot(g);var R=g;return R._p=new Promise(function(D,G){R.onload=D,R.onerror=G}),sr(g,"link",l),r.state.loading|=4,Lf(g,s.precedence,n),r.instance=g;case"script":return g=Wo(s.src),(p=n.querySelector(Cc(g)))?(r.instance=p,ot(p),p):(l=s,(p=pi.get(g))&&(l=v({},s),Bp(l,p)),n=n.ownerDocument||n,p=n.createElement("script"),ot(p),sr(p,"link",l),n.head.appendChild(p),r.instance=p);case"void":return null;default:throw Error(a(443,r.type))}else r.type==="stylesheet"&&(r.state.loading&4)===0&&(l=r.instance,r.state.loading|=4,Lf(l,s.precedence,n));return r.instance}function Lf(n,r,s){for(var l=s.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),p=l.length?l[l.length-1]:null,g=p,R=0;R title"):null)}function tj(n,r,s){if(s===1||r.itemProp!=null)return!1;switch(n){case"meta":case"title":return!0;case"style":if(typeof r.precedence!="string"||typeof r.href!="string"||r.href==="")break;return!0;case"link":if(typeof r.rel!="string"||typeof r.href!="string"||r.href===""||r.onLoad||r.onError)break;return r.rel==="stylesheet"?(n=r.disabled,typeof r.precedence=="string"&&n==null):!0;case"script":if(r.async&&typeof r.async!="function"&&typeof r.async!="symbol"&&!r.onLoad&&!r.onError&&r.src&&typeof r.src=="string")return!0}return!1}function ax(n){return!(n.type==="stylesheet"&&(n.state.loading&3)===0)}function nj(n,r,s,l){if(s.type==="stylesheet"&&(typeof l.media!="string"||matchMedia(l.media).matches!==!1)&&(s.state.loading&4)===0){if(s.instance===null){var p=Xo(l.href),g=r.querySelector(Sc(p));if(g){r=g._p,r!==null&&typeof r=="object"&&typeof r.then=="function"&&(n.count++,n=_f.bind(n),r.then(n,n)),s.state.loading|=4,s.instance=g,ot(g);return}g=r.ownerDocument||r,l=tx(l),(p=pi.get(p))&&Ip(l,p),g=g.createElement("link"),ot(g);var R=g;R._p=new Promise(function(D,G){R.onload=D,R.onerror=G}),sr(g,"link",l),s.instance=g}n.stylesheets===null&&(n.stylesheets=new Map),n.stylesheets.set(s,r),(r=s.state.preload)&&(s.state.loading&3)===0&&(n.count++,s=_f.bind(n),r.addEventListener("load",s),r.addEventListener("error",s))}}var Hp=0;function rj(n,r){return n.stylesheets&&n.count===0&&Vf(n,n.stylesheets),0Hp?50:800)+r);return n.unsuspend=s,function(){n.unsuspend=null,clearTimeout(l),clearTimeout(p)}}:null}function _f(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Vf(this,this.stylesheets);else if(this.unsuspend){var n=this.unsuspend;this.unsuspend=null,n()}}}var zf=null;function Vf(n,r){n.stylesheets=null,n.unsuspend!==null&&(n.count++,zf=new Map,r.forEach(ij,n),zf=null,_f.call(n))}function ij(n,r){if(!(r.state.loading&4)){var s=zf.get(n);if(s)var l=s.get(null);else{s=new Map,zf.set(n,s);for(var p=n.querySelectorAll("link[data-precedence],style[data-precedence]"),g=0;g"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),Zp.exports=Sj(),Zp.exports}var Mx=Cj();const uy=b.createContext({});function Mu(e){const t=b.useRef(null);return t.current===null&&(t.current=e()),t.current}const Ej=typeof window<"u",su=Ej?b.useLayoutEffect:b.useEffect,ph=b.createContext(null);function fy(e,t){e.indexOf(t)===-1&&e.push(t)}function zd(e,t){const i=e.indexOf(t);i>-1&&e.splice(i,1)}const Ba=(e,t,i)=>i>t?t:i/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e),RE=e=>typeof e=="object"&&e!==null,hy=e=>/^0[^.\s]+$/u.test(e);function Rj(e){let t;return()=>(t===void 0&&(t=e()),t)}const Bi=e=>e,Sl=(...e)=>e.reduce((t,i)=>a=>i(t(a))),ho=(e,t,i)=>{const a=t-e;return a?(i-e)/a:1};class Vd{constructor(){this.subscriptions=[]}add(t){return fy(this.subscriptions,t),()=>this.remove(t)}remove(t){zd(this.subscriptions,t)}notify(t,i,a){const o=this.subscriptions.length;if(o)if(o===1)this.subscriptions[0](t,i,a);else for(let c=0;ce*1e3,ei=e=>e/1e3,TE=(e,t)=>t?e*(1e3/t):0,tg=(e,t,i)=>e*(3*(1-e)*((1-e)*t+e*i)+e*e);function Nu(e,t,i,a){return e===t&&i===a?Bi:o=>{let c=0,u=1,f=o;for(let d=0;;d++){f>=c&&f<=u||(f=(c+u)/2);const m=tg(f,e,i)-o;if(m*m<1e-28||d===40)break;m>0?u=f:c=f,f-=m*1e-7/(tg(f+1e-7,e,i)-o-m)}return tg(f,t,a)}}const AE=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,jE=e=>t=>1-e(1-t),ME=Nu(.33,1.53,.69,.99),my=jE(ME),NE=AE(my),kE=e=>e>=1?1:(e*=2)<1?.5*my(e):.5*(2-Math.pow(2,-10*(e-1))),py=e=>1-Math.sin(Math.acos(e)),OE=jE(py),DE=AE(py),Tj=Nu(.42,0,1,1),Aj=Nu(0,0,.58,1),gy=Nu(.42,0,.58,1),LE=e=>Array.isArray(e)&&typeof e[0]!="number",yy=e=>Array.isArray(e)&&typeof e[0]=="number",jj={linear:Bi,easeIn:Tj,easeInOut:gy,easeOut:Aj,circIn:py,circInOut:DE,circOut:OE,backIn:my,backInOut:NE,backOut:ME,anticipate:kE},Mj=e=>typeof e=="string",o0=e=>{if(yy(e)){const[t,i,a,o]=e;return Nu(t,i,a,o)}else if(Mj(e))return jj[e];return e},Nn={delta:0,timestamp:0,isProcessing:!1};let gd;function Nj(){gd=void 0}const Ht={now:()=>(gd===void 0&&Ht.set(Nn.isProcessing||Gi.useManualTiming?Nn.timestamp:performance.now()),gd),set:e=>{gd=e,queueMicrotask(Nj)}},dl=e=>Math.round(e*1e5)/1e5,PE=e=>t=>typeof t=="string"&&t.startsWith(e),_E=PE("--"),kj=PE("var(--"),gh=e=>kj(e)?Oj.test(e.split("/*")[0].trim()):!1,Oj=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function ng(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}const _l={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},ou={..._l,transform:e=>Ba(0,1,e)},qf={..._l,default:1},vy=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function Dj(e){return e==null}const Lj=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,by=(e,t)=>i=>!!(typeof i=="string"&&Lj.test(i)&&i.startsWith(e)||t&&!Dj(i)&&Object.prototype.hasOwnProperty.call(i,t)),zE=(e,t,i)=>a=>{if(typeof a!="string")return a;const[o,c,u,f]=a.match(vy);return{[e]:parseFloat(o),[t]:parseFloat(c),[i]:parseFloat(u),alpha:f!==void 0?parseFloat(f):1}},Pj=e=>Ba(0,255,e),rg={..._l,transform:e=>Math.round(Pj(e))},io={test:by("rgb","red"),parse:zE("red","green","blue"),transform:({red:e,green:t,blue:i,alpha:a=1})=>"rgba("+rg.transform(e)+", "+rg.transform(t)+", "+rg.transform(i)+", "+dl(ou.transform(a))+")"},$f=(e,t,i)=>{const a=e.substring(1+t*i,1+(t+1)*i);return i>1?a:a+a};function _j(e){const t=e.length>5?2:1,i=$f(e,3,t);return{red:parseInt($f(e,0,t),16),green:parseInt($f(e,1,t),16),blue:parseInt($f(e,2,t),16),alpha:i?parseInt(i,16)/255:1}}const l0={test:by("#"),parse:_j,transform:io.transform},ku=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),Da=ku("deg"),sa=ku("%"),Ve=ku("px"),zj=ku("vh"),Vj=ku("vw"),Nx={...sa,parse:e=>sa.parse(e)/100,transform:e=>sa.transform(e*100)},al={test:by("hsl","hue"),parse:zE("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:i,alpha:a=1})=>"hsla("+Math.round(e)+", "+sa.transform(dl(t))+", "+sa.transform(dl(i))+", "+dl(ou.transform(a))+")"},qn={test:e=>io.test(e)||l0.test(e)||al.test(e),parse:e=>io.test(e)?io.parse(e):al.test(e)?al.parse(e):l0.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?io.transform(e):al.transform(e),getAnimatableNone:e=>{const t=qn.parse(e);return t.alpha=0,qn.transform(t)}},Uj=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu,VE=new RegExp(vy.source),UE=new RegExp(Uj.source,"i");function Ij(e){return isNaN(e)&&typeof e=="string"&&(VE.test(e)||UE.test(e))}const IE="number",BE="color",Bj="var",Hj="var(",kx="${}",Fj=/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+)(?![a-z]*\()/giu;function Yj(e){const t=e.toString();return VE.test(t)||UE.test(t)}function lu(e){const t=e.toString(),i=[],a={color:[],number:[],var:[]},o=[];let c=0;const f=t.replace(Fj,d=>(qn.test(d)?(a.color.push(c),o.push(BE),i.push(qn.parse(d))):d.startsWith(Hj)?(a.var.push(c),o.push(Bj),i.push(d)):(a.number.push(c),o.push(IE),i.push(parseFloat(d))),++c,kx)).split(kx);return{values:i,split:f,indexes:a,types:o}}function Gj(e){return lu(e).values}function xy({split:e,types:t}){const i=e.length;return a=>{let o="";for(let c=0;ctypeof e=="number"?0:qn.test(e)?qn.getAnimatableNone(e):e,Kj=(e,t)=>typeof e=="number"?t?.trim().endsWith("/")?e:0:$j(e);function Xj(e){const t=lu(e);return xy(t)(t.values.map((a,o)=>Kj(a,t.split[o])))}const bi={test:Ij,parse:Gj,createTransformer:qj,getAnimatableNone:Xj};function ig(e,t,i){return i<0&&(i+=1),i>1&&(i-=1),i<1/6?e+(t-e)*6*i:i<1/2?t:i<2/3?e+(t-e)*(2/3-i)*6:e}function Wj({hue:e,saturation:t,lightness:i,alpha:a}){e/=360,t/=100,i/=100;let o=0,c=0,u=0;if(!t)o=c=u=i;else{const f=i<.5?i*(1+t):i+t-i*t,d=2*i-f;o=ig(d,f,e+1/3),c=ig(d,f,e),u=ig(d,f,e-1/3)}return{red:Math.round(o*255),green:Math.round(c*255),blue:Math.round(u*255),alpha:a}}function Ud(e,t){return i=>i>0?t:e}const sn=(e,t,i)=>e+(t-e)*i,ag=(e,t,i)=>{const a=e*e,o=i*(t*t-a)+a;return o<0?0:Math.sqrt(o)},Zj=[l0,io,al],Qj=e=>Zj.find(t=>t.test(e));function Ox(e){const t=Qj(e);if(!t)return!1;let i=t.parse(e);return t===al&&(i=Wj(i)),i}const Dx=(e,t)=>{const i=Ox(e),a=Ox(t);if(!i||!a)return Ud(e,t);const o={...i};return c=>(o.red=ag(i.red,a.red,c),o.green=ag(i.green,a.green,c),o.blue=ag(i.blue,a.blue,c),o.alpha=sn(i.alpha,a.alpha,c),io.transform(o))},c0=new Set(["none","hidden"]);function Jj(e,t){return c0.has(e)?i=>i<=0?e:t:i=>i>=1?t:e}function eM(e,t){return i=>sn(e,t,i)}function wy(e){return typeof e=="number"?eM:typeof e=="string"?gh(e)?Ud:qn.test(e)?Dx:rM:Array.isArray(e)?HE:typeof e=="object"?qn.test(e)?Dx:tM:Ud}function HE(e,t){const i=[...e],a=i.length,o=e.map((c,u)=>wy(c)(c,t[u]));return c=>{for(let u=0;u{for(const c in a)i[c]=a[c](o);return i}}function nM(e,t){const i=[],a={color:0,var:0,number:0};for(let o=0;o{const i=lu(e),a=lu(t);return i.indexes.var.length===a.indexes.var.length&&i.indexes.color.length===a.indexes.color.length&&i.indexes.number.length>=a.indexes.number.length?c0.has(e)&&!a.values.length||c0.has(t)&&!i.values.length?Jj(e,t):Sl(HE(nM(i,a),a.values),xy(a)):Ud(e,t)},Lx=/^(-?(?:\d+(?:\.\d*)?|\.\d+))([a-z%]*)$/iu;function iM(e,t){const i=Lx.exec(e);if(!i)return;const a=Lx.exec(t);if(!a||i[2]!==a[2])return;const o=i[2],c=parseFloat(i[1]),u=parseFloat(a[1]);return f=>dl(sn(c,u,f))+o}function Sy(e,t,i){if(typeof e=="number"&&typeof t=="number"&&typeof i=="number")return sn(e,t,i);if(typeof e=="string"&&typeof t=="string"){const o=iM(e,t);if(o)return o}return wy(e)(e,t)}const Kf=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];function aM(e){let t=new Set,i=new Set,a=!1,o=!1,c;const u=new Set;let f={delta:0,timestamp:0,isProcessing:!1};function d(y){u.has(y)&&(i.add(y),e()),(c=y)(f)}const m={schedule:(y,v=!1,w=!1)=>{const x=w&&a,C=x?t:i;return v&&u.add(y),x&&y!==c&&C.delete(y),C.add(y),y},cancel:y=>{i.delete(y),u.delete(y)},process:y=>{if(f=y,a){o=!0;return}a=!0;const v=t;t=i,i=v,t.forEach(d),t.clear(),c=void 0,a=!1,o&&(o=!1,m.process(y))}};return m}const sM=40;function FE(e,t,i={delta:0,timestamp:0,isProcessing:!1}){let a=!1,o=!0;const c=()=>a=!0,u=Kf.reduce((L,N)=>(L[N]=aM(c),L),{}),{setup:f,read:d,resolveKeyframes:m,preUpdate:y,update:v,preRender:w,render:x,postRender:C}=u,E=()=>{const L=Gi.useManualTiming,N=L?i.timestamp:performance.now();a=!1,L||(i.delta=o?1e3/60:Math.max(Math.min(N-i.timestamp,sM),1)),i.timestamp=N,i.isProcessing=!0,f.process(i),d.process(i),m.process(i),y.process(i),v.process(i),w.process(i),x.process(i),C.process(i),i.isProcessing=!1,a&&t&&(o=!1,e(E))},S=()=>{a=!0,o=!0,i.isProcessing||e(E)};return{schedule:Kf.reduce((L,N)=>{const O=u[N];return L[N]=(P,k=!1,A=!1)=>(a||S(),O.schedule(P,k,A)),L},{}),cancel:L=>{for(let N=0;N{const t=({timestamp:i})=>e(i);return{start:(i=!0)=>Wt.update(t,i),stop:()=>Jr(t),now:()=>Nn.isProcessing?Nn.timestamp:Ht.now()}},YE=(e,t,i=10)=>{let a="";const o=Math.max(Math.round(t/i),2);for(let c=0;c=i?1/0:o}function oM(e,t=100,i){const{keyframes:a,velocity:o}=e,c=a&&a[a.length-1]-a[0],u=i({...e,velocity:o&&c?o*t/c:o,keyframes:[0,t]}),f=Math.min(Ry(u),Ey);return{type:"keyframes",ease:d=>u.next(f*d).value/t,duration:ei(f)}}const Px=100,_x=10,lM=1,cM=800,GE=.3,uM=.3,fM=.01,dM=2,hM=.005,mM=.5,pM=.01,gM=10,zx=.05,qE=e=>e<0?1/Math.max(1+e,zx):Math.max(1-e,zx);function $E(e,t){if(!(e>1))return 1;const i=Math.sqrt(e*e-1),a=e-i,o=e+i,c=2*i*Math.exp(-t)*(1+t);return KE(u=>o*Math.exp(-a*u)-a*Math.exp(-o*u)-c,u=>Math.exp(-o*u)-Math.exp(-a*u),t)/t}function u0(e,t){return e*Math.sqrt(1-t*t)}const yM=12;function KE(e,t,i){let a=i;for(let o=1;o{const y=m*o,v=y*e,w=u0(m,o),x=Math.exp(-v);return og-y/w*x},a=m=>{const v=m*o*e,w=o*o*m*m*e,x=Math.exp(-v),C=u0(m*m,o);return(-i(m)+og>0?-1:1)*-w*x/C}):(i=m=>{const y=Math.exp(-m*e),v=m*e+1;return-og+y*v},a=m=>{const y=Math.exp(-m*e),v=-m*(e*e);return y*v});const c=5/e,u=KE(i,a,c),f=u*$E(o,u*e),d=f*f;return{stiffness:d,damping:o*2*Math.sqrt(d),duration:Tr(e)}}const f0=(e,t)=>(t?e>=0:e>0)&&e<1/0;function lg(e,t){if(f0(e,t))return e}function bM(e){const t=lg(e.stiffness),i=lg(e.damping,!0),a=lg(e.mass),o={...e,stiffness:t??Px,damping:i??_x,mass:a??lM,isResolvedFromDuration:!1,isTimeDefined:(t??i??a)===void 0&&(e.duration!==void 0||e.bounce!==void 0)};if(o.isTimeDefined){if(e.visualDuration){const c=qE(e.bounce||0),u=2*Math.PI/(e.visualDuration*1.2)*$E(c,2*Math.PI/1.2);o.stiffness=u*u,o.damping=2*c*Math.sqrt(o.stiffness)}else Object.assign(o,vM(o)),o.isResolvedFromDuration=!0;(!f0(o.stiffness)||!f0(o.damping,!0))&&(o.stiffness=Px,o.damping=_x)}return o}function Vx(e=uM,t=GE){const i=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e,a=i.keyframes[0],o=i.keyframes[i.keyframes.length-1],c={done:!1,value:a},{stiffness:u,damping:f,mass:d,duration:m,isResolvedFromDuration:y,isTimeDefined:v}=bM({...i}),w=k=>v?0:-ei(k),x=f/(2*Math.sqrt(u*d)),C=ei(Math.sqrt(u/d)),E=x*C,S={target:o,delta:o-a,velocity:w(i.velocity||0)||0,restSpeed:0,restDelta:0},T=()=>{const k=Math.abs(S.delta)<5;S.restSpeed=i.restSpeed||(k?fM:dM),S.restDelta=i.restDelta||(k?hM:mM)};T();let j,L,N;if(x<1){const k=u0(C,x),A={A:0,sinC:0,cosC:0,t:-1,env:0,sin:0,cos:0};N=()=>{A.A=(S.velocity+E*S.delta)/k,A.sinC=E*A.A+S.delta*k,A.cosC=E*S.delta-A.A*k};const H=Y=>{Y!==A.t&&(A.t=Y,A.env=Math.exp(-E*Y),A.sin=Math.sin(k*Y),A.cos=Math.cos(k*Y))};j=Y=>(H(Y),S.target-A.env*(A.A*A.sin+S.delta*A.cos)),L=Y=>(H(Y),A.env*(A.sinC*A.sin+A.cosC*A.cos))}else if(x===1){j=A=>S.target-Math.exp(-C*A)*(S.delta+(S.velocity+C*S.delta)*A);const k={C:0};N=()=>{k.C=S.velocity+C*S.delta},L=A=>Math.exp(-C*A)*(C*k.C*A-S.velocity)}else{const k=C*Math.sqrt(x*x-1),A=E-k,H=E+k,Y=k<1||v?1/0:300/k,Z=(K,ee)=>Math.exp(ee>Y?(E-K)*Y-E*ee:-K*ee),$={S:0,F:0};N=()=>{const K=(S.velocity+E*S.delta)/k;$.S=(S.delta+K)/2,$.F=(S.delta-K)/2},j=K=>S.target-$.S*Z(A,K)-$.F*Z(H,K),L=K=>A*$.S*Z(A,K)+H*$.F*Z(H,K)}N();const O=y&&m||null,P={calculatedDuration:O,retarget:(k,A)=>{S.target=k[k.length-1],S.delta=S.target-k[0],S.velocity=w(A),i.restSpeed&&i.restDelta||T(),P.calculatedDuration=O,c.done=!1,N()},velocity:k=>Tr(L(k)),next:k=>{const A=j(k);if(y)c.done=k>=m;else{const H=Tr(L(k));c.done=Math.abs(H)<=S.restSpeed&&Math.abs(S.target-A)<=S.restDelta}return c.value=c.done?S.target:A,c},toString:()=>{const k=Math.min(Ry(P),Ey),A=YE(H=>P.next(k*H).value,k,30);return k+"ms "+A},toTransition:()=>{}};return P}const XE=Object.assign(Vx,{applyToOptions:e=>{const t=oM(e,100,Vx);return e.ease=t.ease,e.duration=Tr(t.duration),e.type="keyframes",e}});function Id({keyframes:e,velocity:t=0,power:i=.8,timeConstant:a=325,bounceDamping:o=10,bounceStiffness:c=500,modifyTarget:u,min:f,max:d,restDelta:m=.5,restSpeed:y}){const v=e[0],w={done:!1,value:v},x=k=>kd,C=k=>f===void 0?d:d===void 0||Math.abs(f-k)-E*Math.exp(-k/a),L=k=>{const A=j(k);w.done=Math.abs(A)<=m,w.value=w.done?T:k?T+A:v};let N,O;const P=k=>{x(w.value)&&(N=k,O=XE({keyframes:[w.value,C(w.value)],velocity:-j(k)/a*1e3,damping:o,stiffness:c,restDelta:m,restSpeed:y}))};return P(0),{calculatedDuration:null,next:k=>{let A=!1;return!O&&N===void 0&&(A=!0,L(k),P(k)),N!==void 0&&k>=N?O.next(k-N):(!A&&L(k),w)}}}function xM(e,t,i){const a=[],o=Gi.mix||Sy,c=e.length-1;for(let u=0;ut[0];if(c===2&&t[0]===t[1])return()=>t[1];const u=e[0]===e[1];e[0]>e[c-1]&&(e=[...e].reverse(),t=[...t].reverse());const f=xM(t,a,o),d=f.length,m=y=>{if(u&&y1)for(;vm(Ba(e[0],e[c-1],y)):m}function SM(e,t){const i=e[e.length-1];for(let a=1;a<=t;a++){const o=ho(0,t,a);e.push(sn(i,1,o))}}function cu(e){const t=[0];return SM(t,e.length-1),t}function CM(e,t){return e.map(i=>i*t)}function EM(e,t){return e.map(()=>t||gy).splice(0,e.length-1)}function Es({duration:e=300,keyframes:t,times:i,ease:a="easeInOut",mixer:o}){const c=typeof t[0]=="number"?void 0:o,u=LE(a)?a.map(o0):o0(a)||gy,f={done:!1,value:t[0]};let d=-1;if(!c){for(let v=1;v=0){d=-2;break}d=v-1}}if(d>=0){const v=i&&i.length===t.length?i:cu(t),w=v[d]*e,x=v[d+1]*e,C=t[d],E=t[d+1],S=Array.isArray(u)?u[d]:u,T=(Gi.mix||Sy)(C,E),j=t.length-2;return{calculatedDuration:e,next:L=>(f.value=d&&L=x||!e)?typeof E=="number"?E:T(1):T(S(L>=x||!e?1:L<=w?0:(L-w)/(x-w))),f.done=L>=e,f)}}const m=CM(i&&i.length===t.length?i:cu(t),e),y=wM(m,t,{ease:Array.isArray(u)?u:EM(t,u),mixer:c});return{calculatedDuration:e,next:v=>(f.value=y(v),f.done=v>=e,f)}}const RM=5;function TM(e,t,i){const a=Math.max(t-RM,0);return TE(i-e(a),t-a)}function AM(e,t,i=0){return t<=0?i:e.velocity?e.velocity(t):TM(a=>e.next(a).value,t,e.next(t).value)}function uu(e,{repeat:t,repeatType:i="loop"},a,o=1){let c,u,f=0;for(let y=0;yt-e>MM&&!Gi.useManualTiming?t:e;function QE(e,t){return{kind:e,animation:t,timestamp:Ht.now(),frameTimestamp:Nn.timestamp,frameIsProcessing:Nn.isProcessing}}function JE(e,t,i){const a=globalThis.__MOTION_INSPECT__;if(a)try{a({...QE("animation-start",e),options:i?{...t,...i}:t})}catch{}}function NM(e,t){const i=globalThis.__MOTION_INSPECT__;if(i)try{i({...QE("layout-animation-start",e),node:t})}catch{}}class Ty{constructor(){this.isResolved=!1}get finished(){return this._finished||(this._finished=this.isResolved?Promise.resolve():new Promise(t=>{this._resolve=t})),this._finished}updateFinished(){this._finished=this._resolve=void 0,this.isResolved=!1}notifyFinished(){this.isResolved=!0,this._resolve?.()}then(t,i){return this.finished.then(t,i)}}const kM=e=>e/100,fu=e=>Math.round(e*1e4)/1e4;class Cl extends Ty{constructor(t){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:i}=this.options;i&&i.updatedAt!==Ht.now()&&this.tick(Ht.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause(),JE(this,this.options)}initAnimation(){const{options:t}=this;WE(t);const{type:i=Es,repeat:a=0,repeatDelay:o=0,repeatType:c,velocity:u=0}=t;let{keyframes:f}=t;const d=i||Es;this.mixKeyframes=void 0,d!==Es&&typeof f[0]!="number"&&(this.mixKeyframes=Sl(kM,t.mixer?.(f[0],f[1])||Sy(f[0],f[1])),f=[0,100]);const m=d(f===t.keyframes?t:{...t,keyframes:f});c==="mirror"&&(this.mirroredGenerator=d({...t,keyframes:[...f].reverse(),velocity:-u})),m.calculatedDuration===null&&(m.calculatedDuration=Ry(m));const{calculatedDuration:y}=m;this.calculatedDuration=y,this.resolvedDuration=y+o,this.totalDuration=this.resolvedDuration*(a+1)-o,this.generator=m}updateTime(t){this.currentTime=this.holdTime??Math.round(t-this.startTime)*this.playbackSpeed}tick(t,i=!1){const{generator:a,totalDuration:o,calculatedDuration:c}=this;if(this.startTime===null)return a.next(0);const{delay:u=0,keyframes:f,type:d,onUpdate:m,finalKeyframe:y}=this.options;this.startTime===this.pendingStartTime&&(this.startTime=ZE(this.startTime,t)),this.pendingStartTime=void 0,this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-o/this.speed,this.startTime)),i?this.currentTime=t:this.updateTime(t);const v=this.currentTime-u*(this.playbackSpeed>=0?1:-1),w=this.playbackSpeed>=0?v<0:v>o;this.currentTime=Math.max(v,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=o);const x=this.generate(this.currentTime,w);let{done:C}=x;w||(C=this.playbackSpeed>=0?c<1/0?this.currentTime>=o:C:this.currentTime<=0);const E=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&C);return E&&d!==Id&&(x.value=uu(f,this.options,y,this.speed)),m&&m(x.value),E&&this.finish(),x}at(t){return this.holdTime??fu((t-this.startTime)*this.playbackSpeed)}sampleAt(t,i){const{options:a,totalDuration:o}=this,c=this.at(t)-(a.delay||0);return c>=o&&a.type!==Id?uu(a.keyframes,a,i?void 0:a.finalKeyframe):this.generate(Math.max(c,0),c<0).value}generate(t,i){const{generator:a,totalDuration:o,mixKeyframes:c,mirroredGenerator:u,resolvedDuration:f}=this,{keyframes:d,repeat:m,repeatType:y,repeatDelay:v}=this.options;let w=t,x=a;if(m){const E=Math.min(t,o)/f;let S=Math.floor(E),T=E%1;!T&&E>=1&&(T=1),T===1&&S--,S=Math.min(S,m+1),S%2&&(y==="reverse"?(T=1-T,v&&(T-=v/f)):y==="mirror"&&(x=u)),w=Ba(0,1,T)*f}let C;return i?(this.delayState.value=d[0],C=this.delayState):C=x.next(w),c&&!i&&(C.value=c(C.value)),C}get duration(){return ei(this.calculatedDuration)}get iterationDuration(){return this.duration+ei(this.options.delay??0)}get time(){return ei(this.currentTime)}set time(t){this.state==="finished"&&this.updateFinished(),t=Tr(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=t,this.tick(t))}getGeneratorVelocity(){return AM(this.generator,this.currentTime,this.options.velocity)}get speed(){return this.playbackSpeed}set speed(t){const i=this.playbackSpeed!==t;i&&this.driver&&this.updateTime(Ht.now()),this.playbackSpeed=t,i&&this.driver&&(this.time=ei(this.currentTime))}play(){if(this.isStopped)return;const{driver:t=Cy,startTime:i}=this.options;this.driver||(this.driver=t(o=>this.tick(o))),this.options.onPlay?.();const a=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=a):this.holdTime!==null?this.startTime=a-this.holdTime/(this.playbackSpeed||1):this.startTime||(this.startTime=i??(this.pendingStartTime=a)),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(Ht.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.driver?.stop(),this.driver=void 0,this.startTime=this.holdTime=null}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}}const OM=new Set(["brightness","contrast","saturate","opacity"]);function DM(e){const[t,i]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;const[a]=i.match(vy)||[];if(!a)return e;const o=i.replace(a,"");let c=OM.has(t)?1:0;return a!==i&&(c*=100),t+"("+c+o+")"}const LM=/\b([a-z-]*)\(.*?\)/gu,d0={...bi,getAnimatableNone:e=>{const t=e.match(LM);return t?t.map(DM).join(" "):e}},h0={...bi,getAnimatableNone:e=>{const t=bi.parse(e);return bi.createTransformer(e)(t.map(a=>typeof a=="number"?0:typeof a=="object"?{...a,alpha:1}:a))}},Ux={..._l,transform:Math.round},eR={rotate:Da,pathRotation:Da,rotateX:Da,rotateY:Da,rotateZ:Da,scale:qf,scaleX:qf,scaleY:qf,scaleZ:qf,skew:Da,skewX:Da,skewY:Da,distance:Ve,translateX:Ve,translateY:Ve,translateZ:Ve,x:Ve,y:Ve,z:Ve,perspective:Ve,transformPerspective:Ve,opacity:ou,originX:Nx,originY:Nx,originZ:Ve},Ay={borderWidth:Ve,borderTopWidth:Ve,borderRightWidth:Ve,borderBottomWidth:Ve,borderLeftWidth:Ve,borderRadius:Ve,borderTopLeftRadius:Ve,borderTopRightRadius:Ve,borderBottomRightRadius:Ve,borderBottomLeftRadius:Ve,width:Ve,maxWidth:Ve,height:Ve,maxHeight:Ve,top:Ve,right:Ve,bottom:Ve,left:Ve,inset:Ve,insetBlock:Ve,insetBlockStart:Ve,insetBlockEnd:Ve,insetInline:Ve,insetInlineStart:Ve,insetInlineEnd:Ve,padding:Ve,paddingTop:Ve,paddingRight:Ve,paddingBottom:Ve,paddingLeft:Ve,paddingBlock:Ve,paddingBlockStart:Ve,paddingBlockEnd:Ve,paddingInline:Ve,paddingInlineStart:Ve,paddingInlineEnd:Ve,margin:Ve,marginTop:Ve,marginRight:Ve,marginBottom:Ve,marginLeft:Ve,marginBlock:Ve,marginBlockStart:Ve,marginBlockEnd:Ve,marginInline:Ve,marginInlineStart:Ve,marginInlineEnd:Ve,fontSize:Ve,backgroundPositionX:Ve,backgroundPositionY:Ve,...eR,zIndex:Ux,fillOpacity:ou,strokeOpacity:ou,numOctaves:Ux},PM={...Ay,color:qn,backgroundColor:qn,outlineColor:qn,fill:qn,stroke:qn,borderColor:qn,borderTopColor:qn,borderRightColor:qn,borderBottomColor:qn,borderLeftColor:qn,filter:d0,WebkitFilter:d0,mask:h0,WebkitMask:h0},tR=e=>PM[e],_M=new Set([d0,h0]);let Ix,Bx,cg;function jy(e,t){if(e===Ix&&t===Bx)return cg;let i=tR(e);return _M.has(i)||(i=bi),cg=i.getAnimatableNone?i.getAnimatableNone(t):void 0,Ix=e,Bx=t,cg}function zM(e){for(let t=1;te*180/Math.PI,m0=e=>{const t=ao(Math.atan2(e[1],e[0]));return p0(t)},VM={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scaleZ:()=>1,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:m0,rotateZ:m0,skewX:e=>ao(Math.atan(e[1])),skewY:e=>ao(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},p0=e=>(e=e%360,e<0&&(e+=360),e),Hx=m0,Fx=e=>Math.hypot(e[0],e[1]),Yx=e=>Math.hypot(e[4],e[5]),UM={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:Fx,scaleY:Yx,scaleZ:e=>Math.hypot(e[8],e[9],e[10]),scale:e=>(Fx(e)+Yx(e))/2,rotateX:e=>p0(ao(Math.atan2(e[6],e[5]))),rotateY:e=>p0(ao(Math.atan2(-e[2],e[0]))),rotateZ:Hx,rotate:Hx,skewX:e=>ao(Math.atan(e[4])),skewY:e=>ao(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function du(e){return e.includes("scale")?1:0}function My(e,t){if(!e||e==="none")return du(t);const i=e.match(/^matrix(3d)?\(([-\d.e\s,]+)\)$/u);if(!i)return du(t);const a=(i[1]?UM:VM)[t],o=i[2].split(",").map(c=>parseFloat(c));return typeof a=="function"?a(o):o[a]}const IM=(e,t)=>{const{transform:i="none"}=getComputedStyle(e);return My(i,t)},Ia=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","scaleZ","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Rs=new Set([...Ia,"pathRotation"]),Gx=e=>e===_l||e===Ve,BM=new Set(["x","y","z"]),HM=Ia.filter(e=>!BM.has(e));function FM(e){const t=[];return HM.forEach(i=>{const a=e.getValue(i);if(a!==void 0){const o=a.get(),c=i.startsWith("scale")?1:0;if(o===c)return;t.push([i,o]),a.set(c)}}),t}const YM=new Set(["bottom","right"]);function qx(e,t,i,a,o,c){const u=parseFloat(e);if(!isNaN(u))return u;const{min:f,max:d}=t()[i],m=d-f;return c==="border-box"?m:m-parseFloat(a)-parseFloat(o)}const $x=({transform:e})=>My(e,"x"),Kx=({transform:e})=>My(e,"y"),ug={width:({width:e,paddingLeft:t="0",paddingRight:i="0",boxSizing:a},o)=>qx(e,o,"x",t,i,a),height:({height:e,paddingTop:t="0",paddingBottom:i="0",boxSizing:a},o)=>qx(e,o,"y",t,i,a),top:({top:e})=>parseFloat(e),left:({left:e})=>parseFloat(e),bottom:({top:e},t)=>{const{y:i}=t();return parseFloat(e)+(i.max-i.min)},right:({left:e},t)=>{const{x:i}=t();return parseFloat(e)+(i.max-i.min)},x:$x,y:Kx,translateX:$x,translateY:Kx},lo=new Set;let g0=!1,y0=!1,v0=!1;function nR(){if(y0){const e=[],t=new Set,i=new Set;lo.forEach(o=>{o.needsMeasurement&&(e.push(o),t.add(o.element),YM.has(o.name)&&i.add(o.element))});const a=new Map;i.forEach(o=>{const c=FM(o);c.length&&(a.set(o,c),o.render())}),e.forEach(o=>o.measureInitialState()),t.forEach(o=>{o.render();const c=a.get(o);c&&c.forEach(([u,f])=>{o.getValue(u)?.set(f)})}),e.forEach(o=>o.measureEndState()),e.forEach(o=>{o.suspendedScrollY!==void 0&&window.scrollTo(0,o.suspendedScrollY)})}y0=!1,g0=!1,lo.forEach(e=>e.complete(v0)),lo.clear()}function rR(){lo.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(y0=!0)})}function GM(){v0=!0,rR(),nR(),v0=!1}function qM(e,t,i){if(typeof e=="string"){if(dy(e)||hy(e))return parseFloat(e);if(!bi.test(e)&&bi.test(i))return jy(t,i)}return e??void 0}class Ny{constructor(t,i,a,o,c,u=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=i,this.name=a,this.motionValue=o,this.element=c,this.isAsync=u}scheduleResolve(){this.state="scheduled",this.isAsync?(lo.add(this),g0||(g0=!0,Wt.read(rR),Wt.resolveKeyframes(nR))):(this.readKeyframes(),this.complete())}readKeyframes(){const{unresolvedKeyframes:t,name:i,element:a,motionValue:o}=this;if(t[0]===null){const c=o?.get(),u=t[t.length-1];if(c!==void 0)t[0]=c;else if(a&&i){const f=qM(a.readValue(i,u),i,u);f!==void 0&&(t[0]=f)}t[0]===void 0&&(t[0]=u),o&&c===void 0&&o.set(t[0])}zM(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),lo.delete(this)}cancel(){this.state==="scheduled"&&(lo.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}}const $M=e=>e.startsWith("--");function iR(e,t,i){$M(t)?e.style.setProperty(t,i):e.style[t]=i}const KM={};function aR(e,t){const i=Rj(e);return()=>KM[t]??i()}const XM=aR(()=>window.ScrollTimeline!==void 0,"scrollTimeline"),ky=aR(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing"),sl=([e,t,i,a])=>`cubic-bezier(${e}, ${t}, ${i}, ${a})`,b0={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:sl([0,.65,.55,1]),circOut:sl([.55,0,1,.45]),backIn:sl([.31,.01,.66,-.59]),backOut:sl([.33,1.53,.69,.99])};function sR(e,t){if(e)return typeof e=="function"?ky()?YE(e,t):"ease-out":yy(e)?sl(e):Array.isArray(e)?e.map(i=>sR(i,t)||b0.easeOut):b0[e]}function WM(e,t,i,{delay:a=0,duration:o=300,repeat:c=0,repeatType:u="loop",ease:f="easeOut",times:d}={},m=void 0){const y={[t]:i};d&&(y.offset=d);const v=sR(f,o);Array.isArray(v)&&(y.easing=v);const w={delay:a,duration:o,easing:Array.isArray(v)?"linear":v,fill:"both",iterations:c+1,direction:u==="reverse"?"alternate":"normal"};return m&&(w.pseudoElement=m),e.animate(y,w)}function oR(e){return typeof e=="function"&&"applyToOptions"in e}function ZM({type:e,...t}){return oR(e)&&ky()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}class lR extends Ty{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;const{element:i,name:a,keyframes:o,pseudoElement:c,allowFlatten:u=!1,finalKeyframe:f,onComplete:d}=t;this.isPseudoElement=!!c,this.allowFlatten=u,this.options=t;const m=ZM(t);this.animation=WM(i,a,o,m,c),m.autoplay===!1&&this.animation.pause(),this.animation.onfinish=this.onFinish=()=>{if(this.animation.onfinish=null,this.finishedTime=this.time,!c){const y=uu(o,this.options,f,this.speed);this.updateMotionValue?.(y),iR(i,a,y),this.animation.cancel()}d?.(),this.notifyFinished()},JE(this,t,m)}play(){this.isStopped||(this.manualStartTime=null,this.animation.onfinish=this.onFinish,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.isStopped||(this.animation.onfinish=this.onFinish),this.animation.finish?.()}cancel(){this.animation.onfinish=null;try{this.animation.cancel()}catch{}}stop(){this.isStopped||(this.isStopped=!0,!(this.state==="idle"||this.finishedTime!==null)&&(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel()))}commitStyles(){const t=this.options?.element;!this.isPseudoElement&&t?.isConnected&&this.animation.commitStyles?.()}get duration(){const t=this.animation.effect?.getComputedTiming?.().duration||0;return ei(Number(t))}get iterationDuration(){const{delay:t=0}=this.options||{};return this.duration+ei(t)}get time(){return ei(Number(this.animation.currentTime)||0)}set time(t){const i=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=Tr(t),i&&(this.animation.pause(),this.updateFinished())}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,onAttach:i,observe:a}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=this.onFinish=null,t&&XM()?(this.animation.timeline=t,i?.(this.animation),Bi):a(this)}}const cR={anticipate:kE,backInOut:NE,circInOut:DE};function QM(e){return e in cR}function JM(e){typeof e.ease=="string"&&QM(e.ease)&&(e.ease=cR[e.ease])}const Bd=10;class e6 extends lR{constructor(t){JM(t),WE(t),super(t),t.startTime!==void 0&&t.autoplay!==!1&&(this.startTime=t.startTime),this.options=t}elapsed(){return this.state==="running"?(Ht.now()-this.startTime)*this.speed:this.time*1e3}sample(t){if(!this.sampler){const{motionValue:i,onUpdate:a,onComplete:o,onPlay:c,onStop:u,element:f,...d}=this.options;this.sampler=new Cl({...d,autoplay:!1}),this.sampler.stop()}return this.sampler.sample(Math.max(0,t)).value}liveValue(){const{state:t}=this;if(t==="running"||t==="paused")return this.sample(this.elapsed())}updateMotionValue(t){const{motionValue:i,element:a,name:o}=this.options;if(!i)return;if(t!==void 0){i.set(t);return}const{speed:c}=this,u=this.elapsed(),f=this.state==="running"&&c?Ba(0,Bd,u):0,d=this.sample(u);a&&o&&iR(a,o,d),i.setWithVelocity(this.sample(u-f*Math.sign(c)),d,f/Math.abs(c||1))}}const Xx=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(bi.test(e)||e==="0")&&!e.startsWith("url("));function t6(e){const t=e[0];if(e.length===1)return!0;for(let i=0;ie&&typeof t[0]!="number"&&t.some((i,a)=>a&&e(t[a-1],i)),Wx=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),fR=()=>!Gi.useManualTiming&&Object.hasOwnProperty.call(Element.prototype,"animate");function a6(e){const{motionValue:t,name:i,repeatDelay:a,repeatType:o,damping:c,type:u,keyframes:f}=e;if(!i||!(w0.has(i)||Wx.has(i)))return!1;const d=t?.owner?.current;if(!(d instanceof HTMLElement)&&!(d instanceof SVGElement))return!1;const{onUpdate:m,transformTemplate:y}=t.owner.getProps();return fR()&&(w0.has(i)||Wx.has(i)&&i6(f))&&(i!=="transform"||!y)&&!m&&!a&&o!=="mirror"&&c!==0&&u!=="inertia"&&!uR(e)}const Oy=(e,t)=>t&&typeof e=="number"?t.transform(e):e,s6={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},o6=Ia.length,Zx={},S0=(e,t,i=Oy(t,eR[e]))=>(Zx[e]||(Zx[e]=(s6[e]||e)+"("))+i+")",C0=(e,t)=>(typeof t=="number"?t:parseFloat(t))===(e.startsWith("scale")?1:0);function l6(e,t,i){let a="";for(let c=0;ch6.has(e),Jx=new WeakMap,p6=(e,t)=>{let i=Jx.get(e);return i?.[0]!==t&&(i=[t,"linear("+cu(Array(t+1)).map(a=>fu(e(a))+" "+fu(a*100)+"%")+")"],Jx.set(e,i)),i[1]},ew=(e,t)=>Math.min(c6,Math.max(2,Math.ceil((t-e)/Bd))),Jc=(e,t)=>Math.abs(e-t)<=dR,fg=(e,t)=>e-t,tw=(e,t,i)=>cu(Array(i+1)).map(a=>sn(e,t,a)),yd=e=>e.motionValue.owner,Hd=e=>El.get(e),nw=({state:e})=>e==="idle"||e==="finished",ol=(e,t)=>e.latestValues?e.latestValues[t]:e.getValue(t)?.get(),g6=({name:e,motionValue:t})=>e&&Ia.includes(e)&&t?.owner?.current instanceof HTMLElement&&fR()&&ky();function y6(e){const t=yd(e),{onUpdate:i,transformTemplate:a}=t.getProps();return!e.isHandoff&&!i&&!e.hasOnUpdate&&!a&&e.type!=="inertia"&&(ol(t,"transform")||"none")==="none"&&!ol(t,"pathRotation")&&!t.projection?.isProjecting()&&!uR(e)}class v6{constructor(t,i,a,o){this.element=t,this.update=i,this.makeDriver=a,this.animation=o}get js(){return this.driver||(this.driver=this.makeDriver(this.update))}now(){return this.driver||this.makeDriver!==Cy?this.js.now():Nn.isProcessing?Nn.timestamp:Ht.now()}start(t=!0){const i=Hd(this.element);!i||i.isJS?this.js.start(t):i.schedule(!1,!t)}stopJS(){this.driver?.stop()}stop(){this.stopJS();const t=Hd(this.element);t&&!t.isFinishing&&t.release(this.animation)}}let rw;class b6 extends Cl{constructor(t){const i=yd(t).current,{driver:a=Cy}=t;let o;const c=y6(t);t.driver=d=>new v6(i,d,a,o),super(t),o=this;const u=this.driver;u&&(u.animation=this),this.canAccelerate=c;const{stop:f}=this;this.stop=()=>{this.isAccelerated()&&this.sync(),f()}}offsets(){const{keyframes:t,times:i}=this.options;return i||(this.offsetsOf!==t&&(this.offsetsOf=t,this.cachedOffsets=cu(t)),this.cachedOffsets)}get group(){return Hd(yd(this.options).current)}get js(){return this.driver?.js}stopJS(){this.driver?.stopJS()}get name(){return this.options.name}timing(){const{startTime:t,speed:i,totalDuration:a}=this,{delay:o=0,repeatType:c}=this.options;return this.holdTime!==null?[1/0,0]:a===1/0?[t+o/i,this.resolvedDuration*(c==="loop"?1:2)/i||1]:[t+(o+a)/i,0]}isAccelerated(){const{group:t,state:i}=this;return t?.tracks.has(this)&&!t.isJS&&this.canAccelerate&&(i==="running"||i==="paused")}liveValue(){return this.isAccelerated()?this.sampleAt(Ht.now()):void 0}tween(){const{keyframes:t,type:i,repeat:a,delay:o=0}=this.options;let c=-1;if(a||i!==Es||this.holdTime!==null)return;for(let m=1;m=0)return;c=m-1}let{ease:u}=this.options;LE(u)&&(u=u[c]);const f=this.offsets(),d=m=>this.startTime+(o+f[m]*this.totalDuration)/this.speed;if(c>=0){const m=yy(u)?sl(u):m6(u)?b0[u]:o0(u);return[d(c),d(c+1),typeof m=="string"||Jc(m(0),0)&&Jc(m(1),1)?m:void 0]}}boundaries(t,i){const{startTime:a,speed:o,resolvedDuration:c,options:u}=this,{delay:f=0,repeat:d=0,repeatDelay:m=0,repeatType:y,type:v}=u,w=(v||Es)===Es?this.offsets():[0,1],x=a+f/o,C=[];if(this.holdTime!==null||!(c>0))return C;for(let E=Math.max(0,Math.floor((t-x)*o/c));E<=d;E++){const S=x+E*c/o;if(S>i)break;for(const T of w){const j=S+(E%2&&y&&y!=="loop"?1-T:T)*(c-m)/o;j>t&&j{Nc||queueMicrotask(()=>{const t=Nc;Nc=void 0,t.forEach(i=>i())}),(Nc||(Nc=[])).push(e)};function w6(e){const t=e.current,i=new Set,a=new Map;let o={},c=[],u=new Map,f=[],d=!1,m=!1,y=!1,v=!1,w=-1/0,x,C=1/0,E;const S=z=>{for(const M of i)if(M.name===z)return!0},T=(z,M)=>{const _={};for(const I of z===void 0?Ia:c){const B=a.get(I),W=z===void 0?ol(e,I):B?B.sampleAt(M>z&&!B.timing()[1]?M:z):o[I];W!==void 0&&(_[I]=W)}return _},j=(z,M)=>{let _="";for(const I in z){const B=z[I];(!M||!C0(I,B))&&(_+=S0(I,B)+" ")}return(M?_.trim():_)||"none"},L=(z,M)=>j(T(z,M)),N=(z=T())=>{t.style.transform=j(z,!0)},O=z=>{z.onfinish=z.oncancel=null,z.cancel()},P=(z=!0)=>{clearTimeout(x),C=1/0,E=void 0,z&&N(),f.forEach(({animation:M})=>O(M)),f=[]},k=(z,M)=>new Animation(new KeyframeEffect(t,z,M)),A=(z,M,_=1/0)=>{const I={animation:z,offset:M,end:_};z.startTime=Ht.now()+M,_<1/0&&(z.onfinish=()=>{I.isDone=!0,f.some(B=>B.end===1/0)&&(O(z),f=f.filter(B=>B!==I)),F.schedule(!1)}),z.oncancel=()=>f.includes(I)&&F.demote(),f.push(I)},H=(z,M,_)=>{const I=(W,ie)=>Math.abs(z(ie)-z(W)),B=I(M,_);for(;_-M>.01;){const W=(M+_)/2;I(M,W)>I(W,_)?_=W:M=W}return I(M,_)>B/2?[M,_]:[]},Y=(z,M,_,I)=>{const B=ew(M,_);if(I.length*4>B)return;let W;for(const Se of z){const Ee=Se.numberAt(M),ye=(Se.numberAt((M+_)/2)-Ee)/(Se.numberAt(_)-Ee);if(ye===ye){if(W===void 0)W=ye;else if(!Jc(ye,W))return}}const ie=tw(M,_,B).concat(I).sort(fg),fe=Se=>ho(M,_,Se);let pe,ce;for(const Se of z){const Ee=Se.numberAt(M),ye=ie.map(rt=>Se.numberAt(rt)-Ee),Pe=ye[ye.length-1],Ge=ye.some(rt=>Math.abs(rt)*dR>Math.abs(Pe))?0:Pe,Je=ye.map(rt=>Ge?rt/Ge:rt);if(Ge&&!pe)pe=Je,ce=rt=>(Se.numberAt(rt)-Ee)/Ge;else if(Je.some((rt,Oe)=>!Jc(rt,Ge&&pe[Oe])))return}if(!pe||pe.every((Se,Ee)=>Jc(Se,fe(ie[Ee]))))return"linear";const Ae=[],Le=(Se,Ee=ce(Se))=>Ae.push(fu(Ee)+" "+fu(fe(Se)*100)+"%");return pe.forEach((Se,Ee)=>{Ee&&Math.abs(Se-pe[Ee-1])>.2&&H(ce,ie[Ee-1],ie[Ee]).forEach(ye=>Le(ye)),Le(ie[Ee],Se)}),"linear("+Ae+")"},Z=(z,M,_,I)=>{const B=[M],W=[];let ie=_,fe=M;for(const Se of z){const Ee=Se.tween();if(Ee?.[2]!=="linear"){const[ye,Pe]=Se.timing(),[Ge,Je]=Ee||[M,Pe?_:ye];ie=Math.min(ie,Ge),fe=Math.max(fe,Je),W.push(Se)}}ie=Math.max(M,ie),fe=Math.min(_,fe);const pe=(Se,Ee)=>W.every(ye=>!(Math.abs(ye.numberAt((Se+Ee)/2)-(ye.numberAt(Se)+ye.numberAt(Ee))/2)>(ye.name.startsWith("scale")?f6:u6))),ce=(Se,Ee,ye)=>{if(Ee-Se<1||pe(Se,Ee))B.push(Ee);else if(ye<4)ce(Se,(Se+Ee)/2,ye+1),ce((Se+Ee)/2,Ee,ye+1);else{for(const Pe of z)B.push(...H(Ge=>Pe.numberAt(Ge),Se,Ee));B.push(Ee)}},Ae=fe>ie?tw(ie,fe,Math.ceil((fe-ie)/100)):[];Ae.push(_);for(const Se of I)Ae.push(Se,Math.min(Se+.01,_));let Le=M;for(const Se of Ae.sort(fg))Se>Le&&ce(Le,Se,0),Le=Se;return B.sort(fg)},$=z=>{let M;for(const _ of z){const I=_.tween();if(!I||M&&(Math.abs(I[0]-M[0])>1||Math.abs(I[1]-M[1])>1))return;M=[I[0],I[1],!M||I[2]===M[2]?I[2]:void 0]}return M},K=(z,M,_,I,B={fill:"both"},W)=>{const ie=I?[]:z.flatMap(Le=>Le.boundaries(M,_)),fe=I||Y(z,M,_,ie),pe=fe?[M,_]:Z(z,M,_,ie),ce=pe.map(Le=>L(Le,W));let Ae={transform:ce};return fe||(Ae.offset=pe.map(Le=>ho(M,_,Le))),ce.every(Le=>Le===ce[0])&&(N(T(M,W)),Ae=null),k(Ae,{...B,duration:_-M,easing:fe||"linear"})},ee=z=>{const M=Ht.now()+z;M{C=1/0,F.schedule(!1)},z))},re=z=>{let M=z,_=0,I=0;const B=[],W=[],ie=new Set;a.clear(),u=new Map;for(const pe of i){a.set(pe.name,pe);const[ce,Ae]=pe.timing(),Le=ce===1/0;if(u.set(pe,[pe.at(z),pe.speed,Le]),!Le){if(pe.speed<0)return;if(Ae){if(_){const Se=(ce-I)/Ae;if(Math.abs(Ae-_)>1||Math.abs(Se-Math.round(Se))*_>1)return}else _=Ae,I=ce;W.push(pe)}else ie.add(ce);B.push(pe),M=Math.max(M,ce)}}o={},c=Ia.filter(pe=>{if(a.has(pe))return!0;const ce=o[pe]=ol(e,pe);return ce!==void 0&&!C0(pe,ce)}),P(!1);const fe=!_&&$(B);try{if(M>z){let pe;if(fe&&fe[1]>z){const[ce,Ae,Le]=fe;if(ce-z>Qx)return B.forEach(Se=>Se.sync()),ee(E=ce-z-Qx),!0;pe=typeof Le=="string"?Le:Le?p6(Le,ew(ce,Ae)):Y(B,ce,Ae,[]),pe&&A(K(B,ce,Ae,pe,{fill:"both",endDelay:M-Ae}),ce-z,M-ce)}pe||A(K(B,z,M),0,M-z),ie.forEach(ce=>ce{let _,I=0;for(const B of i){const W=u.get(B);if(!W)return!1;const[ie,fe,pe]=W,ce=B.at(z),Ae=B.timing()[0]===1/0;if(pe){if(Ae&&(ce===ie||!f.length))continue;return!1}const Le=(ce-ie)/fe,Se=Ae?0:B.speed/fe;if(_===void 0)_=Le,I=Se;else if(Math.abs(Le-_)>1||Se!==I)return!1}if(_===void 0)return!0;if(!f.length){if(E===void 0||M&&I)return!1;if(I){const B=(E-_)/I;if(B<1)return!1;ee(B)}return!0}for(const{offset:B,end:W,isDone:ie}of f){const fe=_-B;if(W<1/0&&(ie?fe=W))return!1}for(const{animation:B,offset:W,isDone:ie}of f){if(ie)continue;const fe=_-W;I&&B.updatePlaybackRate&&B.playState==="running"&&Math.abs(Number(B.currentTime)-fe)<20?B.playbackRate!==I&&B.updatePlaybackRate(I):I?(B.playbackRate!==I&&(B.playbackRate=I),B.startTime=z-fe/I):(B.startTime=null,B.currentTime=fe)}return!0},X=()=>i.size?!1:(y=!0,Hd(t)===F&&El.delete(t),F.isJS||P(),!0),Q=()=>{const z=Ht.now();if(F.isJS||(F.isFinishing=!0,i.forEach(I=>{const[B,W]=I.timing();I.state==="running"&&I.speed>0&&!W&&B<=z+1&&(I.complete(),o[I.name]=ol(e,I.name),u.has(I)||(d=!0))}),F.isFinishing=!1),m=!1,y||(i.forEach(I=>nw(I)&&i.delete(I)),X()))return;for(const I of i)if(!I.canAccelerate)return F.demote(!0);F.isJS&&(F.isJS=!1,d=!0,i.forEach(I=>I.stopJS()));const M=d,_=v;if(d=v=!1,M||!V(z,_)){if(_){if(z-wI.timing()[0]===1/0&&I.sync())},F={tracks:i,isJS:!1,isFinishing:!1,schedule(z,M){y||(d||(d=z),v||(v=!!M),m||(m=!0,Nn.isProcessing?Wt.render(Q,!1,!0):x6(Q)))},release(z){nw(z)&&i.delete(z),X()||F.schedule(!0)},check(){if(!F.isJS){for(const z in o)if(ol(e,z)!==o[z]&&!S(z))return F.schedule(!0,!0)}},demote(z){if(!(F.isJS||y))return i.forEach(M=>{M.isAccelerated()&&M.sync(),z||(M.canAccelerate=!1)}),F.isJS=!0,u=new Map,P(),i.forEach(M=>M.state==="running"&&M.js?.start()),!0}};return El.set(t,F),F}class S6 extends Ty{constructor(t){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=Ht.now();const{keyframes:i,name:a,motionValue:o,element:c}=t,u=t;u.autoplay??(u.autoplay=!0),u.delay??(u.delay=0),u.type??(u.type="keyframes"),u.repeat??(u.repeat=0),u.repeatDelay??(u.repeatDelay=0),u.repeatType??(u.repeatType="loop");const f=c?.KeyframeResolver||Ny;this.keyframeResolver=new f(i,(d,m,y)=>this.onKeyframesResolved(d,m,u,!y),a,o,c),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,i,a,o){this.keyframeResolver=void 0;const{name:c,type:u,velocity:f,delay:d,isHandoff:m,onUpdate:y}=a;this.resolvedAt=Ht.now();const v=n6(t,c,u,f);v||((Gi.instantAnimations||!d)&&y?.(uu(t,a,i)),t[0]=t[t.length-1],x0(a),a.repeat=0);const{onComplete:w}=a;a.finalKeyframe=i,a.keyframes=t,a.onComplete=()=>{w?.(),this.notifyFinished()};const x=v&&!m&&a6(a),C=!x&&g6(a);o&&(x||C||this.resolvedAt!==this.createdAt)&&(a.startTime??(a.startTime=ZE(this.createdAt,this.resolvedAt)));let E;if(x){a.element=a.motionValue?.owner?.current;try{E=new e6(a)}catch{E=new Cl(a)}}else C?E=new b6(a):E=new Cl(a);this.pendingTimeline&&(this.stopTimeline=E.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=E}get finished(){return this._animation?this._animation.finished:super.finished}then(t,i){return this.finished.finally(t).then(()=>{})}liveValue(){return this._animation?.liveValue?.()}get animation(){return this._animation||(this.keyframeResolver?.resume(),GM()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation?.cancel(),this.keyframeResolver?.cancel()}}function hR(e,t,i,a=0,o=1){const c=Array.from(e).sort((m,y)=>m.sortNodePosition(y)).indexOf(t),u=e.size,f=(u-1)*a;return typeof i=="function"?i(c,u):o===1?c*a:f-c*a}const iw=30,C6=e=>!isNaN(parseFloat(e));class E6{constructor(t,i={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=a=>{const o=Ht.now();if(this.updatedAt!==o&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(a),this.current!==this.prev&&(this.dirty(),this.dependents))for(const c of this.dependents)c.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=i.owner}setCurrent(t){this.current=t,this.updatedAt=Ht.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=C6(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,i){var a;return t==="change"?this.onChangeSubscribe(i):((a=this.events)[t]||(a[t]=new Vd)).add(i)}onChangeSubscribe(t){const{events:i}=this;return!i.change&&!this.changeSubscriber?this.changeSubscriber=t:(i.change||(i.change=new Vd,i.change.add(this.changeSubscriber),this.changeSubscriber=void 0),i.change.add(t)),()=>{this.changeSubscriber===t?this.changeSubscriber=void 0:i.change?.remove(t),this.stopIfUnobserved()}}stopIfUnobserved(){Wt.read(()=>{!this.changeSubscriber&&!this.events.change?.getSize()&&this.stop()})}clearListeners(){this.changeSubscriber=void 0;for(const t in this.events)this.events[t].clear()}attach(t,i){this.passiveEffect=t,this.stopPassiveEffect=i}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,i,a){this.set(i),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-a}jump(t,i=!0){i&&(this.updatedAt=Ht.now(),this.stop()),this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,this.stopPassiveEffect?.()}dirty(){const{current:t,changeSubscriber:i}=this;i?i(t):this.events.change?.notify(t)}addDependent(t){(this.dependents||(this.dependents=new Set)).add(t)}removeDependent(t){this.dependents?.delete(t)}get(){const t=this.animation?.liveValue?.();return t===void 0?this.current:t}getCurrent(){return this.current}getPrevious(){return this.prev}getVelocity(){const t=Ht.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>iw)return 0;const i=Math.min(this.updatedAt-this.prevUpdatedAt,iw);return TE(parseFloat(this.current)-parseFloat(this.prevFrameValue),i)}start(t){return new Promise(i=>this.run(t,i))}run(t,i){this.stop(),this.hasAnimated=!0;let a=!1,o;o=t(()=>{a=!0,this.events.animationComplete?.notify(),this.animation===o&&(this.animation=void 0),i?.()}),a||(this.animation=o),this.events.animationStart?.notify()}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel?.notify()),this.animation=void 0}isAnimating(){return!!this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect?.()}}function Rl(e,t){return new E6(e,t)}function Dy(e,t){if(e?.inherit&&t){const{inherit:i,...a}=e;return{...t,...a}}return e}function Ly(e,t){const i=e?.[t]??e?.default??e;return i!==e?Dy(i,e):i}const R6={type:"spring",stiffness:500,damping:25,restSpeed:10},T6=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),A6={type:"keyframes",duration:.8},j6={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},M6=(e,{keyframes:t})=>t.length>2?A6:Rs.has(e)?e.startsWith("scale")?T6(t[1]):R6:j6,N6=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed","out","mixer"]);function k6(e){for(const t in e)if(!N6.has(t))return!0;return!1}const Py=(e,t,i,a={},o,c)=>u=>{const f=Ly(a,e)||{},d=f.delay||a.delay||0;let{elapsed:m=0}=a;m=m-Tr(d);const y={keyframes:Array.isArray(i)?i:[null,i],ease:"easeOut",velocity:t.getVelocity(),...f,delay:-m,onUpdate:w=>{t.set(w),f.onUpdate&&f.onUpdate(w)},onComplete:()=>{u(),f.onComplete&&f.onComplete()},name:e,motionValue:t,element:c?void 0:o,hasOnUpdate:!!f.onUpdate};k6(f)||Object.assign(y,M6(e,y)),y.duration&&(y.duration=Tr(y.duration)),y.repeatDelay&&(y.repeatDelay=Tr(y.repeatDelay)),y.from!==void 0&&(y.keyframes[0]=y.from);let v=!1;if((y.type===!1||y.duration===0&&!y.repeatDelay)&&(x0(y),y.delay===0&&(v=!0)),(Gi.instantAnimations||Gi.skipAnimations||o?.shouldSkipAnimations||f.skipAnimations)&&(v=!0,x0(y),y.delay=0),y.allowFlatten=!f.type&&!f.ease,v&&!c&&t.get()!==void 0){const w=uu(y.keyframes,f);if(w!==void 0){Wt.update(()=>{y.onUpdate(w),y.onComplete()});return}}return f.isSync?new Cl(y):new S6(y)},O6=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function D6(e){const t=O6.exec(e);if(!t)return[,];const[,i,a,o]=t;return[`--${i??a}`,o]}function _y(e,t,i=1){const[a,o]=D6(e);if(!a)return;const c=window.getComputedStyle(t).getPropertyValue(a);if(c){const u=c.trim();return dy(u)?parseFloat(u):u}return gh(o)?_y(o,t,i+1):o}function L6(e){const t=[{},{}];return e?.values.forEach((i,a)=>{t[0][a]=i.get(),t[1][a]=i.getVelocity()}),t}function mR(e,t,i,a){const o=c=>typeof c=="function"?c(i!==void 0?i:e.custom,...L6(a)):c;return t=o(t),typeof t=="string"&&(t=e.variants&&e.variants[t]),o(t)}function co(e,t,i){return mR(e.getProps(),t,i,e)}const pR=(e,t)=>t==="exit"?e.presenceContext?.custom:void 0,gR=new Set(["width","height","top","left","right","bottom",...Ia]),P6=e=>Array.isArray(e);function _6(e,t,i){e.hasValue(t)?e.getValue(t).set(i):e.addValue(t,Rl(i))}function z6(e){return P6(e)?e[e.length-1]||0:e}function V6(e,t){const i=co(e,t);let{transitionEnd:a={},transition:o={},...c}=i||{};c={...c,...a};for(const u in c){const f=z6(c[u]);_6(e,u,f)}}const ur=e=>!!(e&&e.getVelocity);function U6(e){return!!(ur(e)&&e.add)}function E0(e,t){const i=e.getValue("willChange");if(U6(i))return i.add(t);if(!i&&Gi.WillChange){const a=new Gi.WillChange("auto");e.addValue("willChange",a),a.add(t)}}const yR="data-framer-appear-id";function vR(e){return e.props[yR]}const I6=typeof window<"u";function B6({protectedKeys:e,needsAnimating:t},i){const a=i in e&&!t[i];return t[i]=!1,a}function bR(e,t,{delay:i=0,transitionOverride:a,type:o}={}){let{transition:c,transitionEnd:u,...f}=t;const d=e.getDefaultTransition();c=c?Dy(c,d):d;const m=c?.reduceMotion,y=c?.skipAnimations;a&&(c=a);const v=[],w=o&&e.animationState?.getState()[o],x=c?.path;x&&(x.animateValues?x.animateValues(C=>e.getValue(C,e.latestValues[C]??0),f,c,i,v):x.animateVisualElement?.(e,f,c,i,v));for(const C in f){const E=e.getValue(C,e.latestValues[C]??null),S=f[C];if(S===void 0||w&&B6(w,C))continue;const T={delay:i,...Ly(w?.out[C]||c||{},C)};y&&(T.skipAnimations=!0);const j=E.get();if(j!==void 0&&!E.isAnimating()&&!Array.isArray(S)&&S===j&&!T.velocity){Wt.update(()=>E.set(S));continue}let L=!1;if(I6&&window.MotionHandoffAnimation){const P=vR(e);if(P){const k=window.MotionHandoffAnimation(P,C,Wt);k!==null&&(T.startTime=k,L=!0)}}E0(e,C);const N=m??e.shouldReduceMotion;E.run(Py(C,E,S,N&&gR.has(C)?{type:!1}:T,e,L));const O=E.animation;O&&v.push(O)}if(u){const C=()=>Wt.update(()=>{u&&V6(e,u)});v.length?Promise.all(v).then(C):C()}return v}function R0(e,t,i={}){const a=co(e,t,pR(e,i.type)),o=i.transitionOverride||(a?.transition??(e.getDefaultTransition()||{})),c=()=>Promise.all(a?bR(e,a,i):[]),u=(d=0)=>{const{variantChildren:m}=e,{delayChildren:y=0,staggerChildren:v,staggerDirection:w}=o,x=[];return m?.forEach(C=>{C.notify("AnimationStart",t),x.push(R0(C,t,{...i,delay:d+(typeof y=="function"?0:y)+hR(m,C,y,v,w)}).then(()=>C.notify("AnimationComplete",t)))}),Promise.all(x)},{when:f}=o;return f?f==="beforeChildren"?c().then(()=>u()):u().then(c):Promise.all([c(),u(i.delay)])}function H6(e,t,i={}){return e.notify("AnimationStart",t),(Array.isArray(t)?Promise.all(t.map(o=>R0(e,o,i))):typeof t=="string"?R0(e,t,i):Promise.all(bR(e,co(e,t,i.custom),i))).then(()=>{e.notify("AnimationComplete",t)})}const F6={test:e=>e==="auto",parse:e=>e},Y6=e=>t=>t.test(e),G6=[_l,Ve,sa,Da,Vj,zj,F6],aw=e=>G6.find(Y6(e));function q6(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||hy(e):!0}const $6=new Set(["auto","none","0"]);function K6(e,t,i){let a=0,o;for(;at.measureViewportBox())}measureInitialState(){const{element:t,unresolvedKeyframes:i,name:a}=this;if(!t?.current)return;a==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=this.measure(),i[0]=this.measuredOrigin;const o=i[i.length-1];o!==void 0&&this.motionValue?.jump(o,!1)}measureEndState(){const{element:t,unresolvedKeyframes:i}=this;if(!t?.current)return;this.motionValue?.jump(this.measuredOrigin,!1);const a=i.length-1,o=i[a];i[a]=this.measure(),o!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=o),this.resolveNoneKeyframes()}}const zy=["borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius"];function vd(e){return RE(e)&&"offsetHeight"in e&&!("ownerSVGElement"in e)}function Vy(e){return RE(e)&&"ownerSVGElement"in e}const Fd={};function Uy(e){return Fd.current?.add(e),e}const Iy=e=>Fd.current?Fd.current.bind(e):e;function xR(e,t,i){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e=="string"){const a=t?t.current:Fd.current?.root||document,o=i?.[e]??a.querySelectorAll(e);return o?Array.from(o):[]}return Array.from(e).filter(a=>a!=null)}function wR(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}function By(e,t,i){const{style:a,vars:o,transformOrigin:c}=e;let u=!1,f=!1;for(const d in t){const m=t[d];if(Rs.has(d)){u=!0;continue}else if(_E(d)){o[d]=m;continue}else{const y=Oy(m,Ay[d]);d.startsWith("origin")?(f=!0,c[d]=y):a[d]=y}}if(t.transform||(u||i?a.transform=l6(t,e.transform,i):a.transform&&(a.transform="none")),f){const{originX:d="50%",originY:m="50%",originZ:y=0}=c;a.transformOrigin=`${d} ${m} ${y}`}}const W6={offset:"stroke-dashoffset",array:"stroke-dasharray"},Z6={offset:"strokeDashoffset",array:"strokeDasharray"};function Q6(e,t,i=1,a=0,o=!0){e.pathLength=1;const c=o?W6:Z6;e[c.offset]=`${-a}`,e[c.array]=`${t} ${i}`}const SR=["transform","opacity","clipPath","filter","offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function CR(e,{attrX:t,attrY:i,attrScale:a,pathLength:o,pathSpacing:c=1,pathOffset:u=0,...f},d,m,y){if(By(e,f,m),d){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};const{attrs:v,style:w}=e;for(const x of SR)v[x]!==void 0&&(w[x]=v[x],delete v[x]);(w.transform||v.transformOrigin)&&(w.transformOrigin=v.transformOrigin??"50% 50%",delete v.transformOrigin),w.transform&&(w.transformBox=y?.transformBox??"fill-box",delete v.transformBox),t!==void 0&&(v.x=t),i!==void 0&&(v.y=i),a!==void 0&&(v.scale=a),o!==void 0&&Q6(v,o,c,u,!1)}function ER({top:e,left:t,right:i,bottom:a}){return{x:{min:t,max:i},y:{min:e,max:a}}}function J6({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function eN(e,t){if(!t)return e;const i=t({x:e.left,y:e.top}),a=t({x:e.right,y:e.bottom});return{top:i.y,left:i.x,bottom:a.y,right:a.x}}function dg(e){return e===void 0||e===1}function T0({scale:e,scaleX:t,scaleY:i}){return!dg(e)||!dg(t)||!dg(i)}const Tl=["rotate","rotateX","rotateY","rotateZ","skewX","skewY"];function to(e){return T0(e)||TR(e)||RR(e)}function RR(e){return e.z||e.rotate||e.rotateX||e.rotateY||e.rotateZ||e.skewX||e.skewY}function TR(e){return sw(e.x)||sw(e.y)}function sw(e){return e&&e!=="0%"}function Yd(e,t,i){const a=e-i,o=t*a;return i+o}function ow(e,t,i,a,o){return o!==void 0&&(e=Yd(e,o,a)),Yd(e,i,a)+t}function A0(e,t=0,i=1,a,o){e.min=ow(e.min,t,i,a,o),e.max=ow(e.max,t,i,a,o)}function AR(e,{x:t,y:i}){A0(e.x,t.translate,t.scale,t.originPoint),A0(e.y,i.translate,i.scale,i.originPoint)}const lw=.999999999999,cw=1.0000000000001;function tN(e,t,i,a=!1){const o=i.length;if(!o)return;t.x=t.y=1;let c,u;for(let f=0;flw&&(t.x=1),t.ylw&&(t.y=1)}function Ui(e,t){e.min+=t,e.max+=t}function uw(e,t,i,a,o=.5){const c=sn(e.min,e.max,o);A0(e,t,i,c,a)}function fw(e,t){return typeof e=="string"?parseFloat(e)/100*(t.max-t.min):e}function bd(e,t,i){const a=i??e;uw(e.x,fw(t.x,a.x),t.scaleX,t.scale,t.originX),uw(e.y,fw(t.y,a.y),t.scaleY,t.scale,t.originY)}function jR(e,t){return ER(eN(e.getBoundingClientRect(),t))}function nN(e,t,i){const a=jR(e,i),{scroll:o}=t;return o&&(Ui(a.x,o.offset.x),Ui(a.y,o.offset.y)),a}const rN=()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),{schedule:hu}=FE(queueMicrotask,!1);function iN(e,t,i){const a=ur(e)?e:Rl(e);return a.run(Py("",a,t,i)),a.animation}const $c={};function aN(e,t){const i=Ht.now();e=Iy(e);const a=({timestamp:o})=>{const c=o-i;c>=t&&(Jr(a),e(c-t))};return Wt.setup(a,!0),Uy(()=>Jr(a))}function sN(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function oN(e){return Vy(e)&&e.tagName==="svg"}function xd(e){return ur(e)?e.get():e}const dw=e=>typeof e=="number"?e:parseFloat(e),lN=zy.length,hw=e=>typeof e=="number"||Ve.test(e);function cN(e,t,i,a,o,c){o?(e.opacity=sn(0,i.opacity??1,uN(a)),e.opacityExit=sn(t.opacity??1,0,fN(a))):c&&(e.opacity=sn(t.opacity??1,i.opacity??1,a));for(let u=0;uat?1:i(ho(e,t,a))}function j0(e,t){e.min=t.min,e.max=t.max}function Oi(e,t){j0(e.x,t.x),j0(e.y,t.y)}function pw(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}const NR=1e-4,dN=1-NR,hN=1+NR,kR=.01,mN=0-kR,pN=0+kR;function _r(e){return e.max-e.min}function gN(e,t,i){return Math.abs(e-t)<=i}function gw(e,t,i,a=.5){e.origin=a,e.originPoint=sn(t.min,t.max,e.origin),e.scale=_r(i)/_r(t),e.translate=sn(i.min,i.max,e.origin)-e.originPoint,(e.scale>=dN&&e.scale<=hN||isNaN(e.scale))&&(e.scale=1),(e.translate>=mN&&e.translate<=pN||isNaN(e.translate))&&(e.translate=0)}function Gd(e,t,i,a){gw(e.x,t.x,i.x,a?.originX),gw(e.y,t.y,i.y,a?.originY)}function yw(e,t,i,a=0){const o=a?sn(i.min,i.max,a):i.min;e.min=o+t.min,e.max=e.min+_r(t)}function yN(e,t,i,a){yw(e.x,t.x,i.x,a?.x),yw(e.y,t.y,i.y,a?.y)}function vw(e,t,i,a=0){const o=a?sn(i.min,i.max,a):i.min;e.min=t.min-o,e.max=e.min+_r(t)}function qd(e,t,i,a){vw(e.x,t.x,i.x,a?.x),vw(e.y,t.y,i.y,a?.y)}function bw(e,t,i,a,o){return e-=t,e=Yd(e,1/i,a),o!==void 0&&(e=Yd(e,1/o,a)),e}function vN(e,t=0,i=1,a=.5,o,c=e,u=e){if(sa.test(t)&&(t=parseFloat(t),t=sn(u.min,u.max,t/100)-u.min),typeof t!="number")return;let f=sn(c.min,c.max,a);e===c&&(f-=t),e.min=bw(e.min,t,i,f,o),e.max=bw(e.max,t,i,f,o)}function xw(e,t,[i,a,o],c,u){vN(e,t[i],t[a],t[o],t.scale,c,u)}const bN=["x","scaleX","originX"],xN=["y","scaleY","originY"];function ww(e,t,i,a){xw(e.x,t,bN,i?.x,a?.x),xw(e.y,t,xN,i?.y,a?.y)}const Sw=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),Cw=Sw("applewebkit/")&&!Sw("chrome/")?Math.round:Bi;function Ew(e){e.min=Cw(e.min),e.max=Cw(e.max)}function wN(e){Ew(e.x),Ew(e.y)}const Rw=()=>({translate:0,scale:1,origin:0,originPoint:0}),ll=()=>({x:Rw(),y:Rw()}),Tw=()=>({min:0,max:0}),Gn=()=>({x:Tw(),y:Tw()});function Aw(e){return e.translate===0&&e.scale===1}function OR(e){return Aw(e.x)&&Aw(e.y)}function jw(e,t){return e.min===t.min&&e.max===t.max}function SN(e,t){return jw(e.x,t.x)&&jw(e.y,t.y)}function Mw(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function DR(e,t){return Mw(e.x,t.x)&&Mw(e.y,t.y)}function Nw(e){return _r(e.x)/_r(e.y)}function kw(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}class CN{constructor(){this.members=[]}add(t){fy(this.members,t);for(let i=this.members.length-1;i>=0;i--){const a=this.members[i];if(a===t||a===this.lead||a===this.prevLead)continue;const o=a.instance;(!o||o.isConnected===!1)&&!a.snapshot&&(zd(this.members,a),a.unmount())}t.scheduleRender()}remove(t){if(zd(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){const i=this.members[this.members.length-1];i&&this.promote(i)}}relegate(t){for(let i=this.members.indexOf(t)-1;i>=0;i--){const a=this.members[i];if(a.isPresent!==!1&&a.instance?.isConnected!==!1)return this.promote(a),!0}return!1}promote(t,i){const a=this.lead;if(t!==a&&(this.prevLead=a,this.lead=t,t.show(),a)){a.updateSnapshot(),t.scheduleRender();const{layoutDependency:o}=a.options,{layoutDependency:c}=t.options;(o===void 0||o!==c)&&(t.resumeFrom=a,i&&(a.preserveOpacity=!0),a.snapshot&&(t.snapshot=a.snapshot,t.snapshot.latestValues=a.animationValues||a.latestValues),t.root?.isUpdating&&(t.isLayoutDirty=!0)),t.options.crossfade===!1&&a.hide()}}exitAnimationComplete(){this.members.forEach(t=>{t.options.onExitComplete?.(),t.resumingFrom?.options.onExitComplete?.()})}scheduleRender(){this.members.forEach(t=>t.instance&&t.scheduleRender(!1))}removeLeadSnapshot(){this.lead?.snapshot&&(this.lead.snapshot=void 0)}}function Ow(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const kc={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(Ve.test(e))e=parseFloat(e);else return e;const i=Ow(e,t.target.x),a=Ow(e,t.target.y);return`${i}% ${a}%`}},EN={correct:(e,{treeScale:t,projectionDelta:i})=>{const a=e,o=bi.parse(e);if(o.length>5)return a;const c=bi.createTransformer(e),u=typeof o[0]!="number"?1:0,f=i.x.scale*t.x,d=i.y.scale*t.y;o[0+u]/=f,o[1+u]/=d;const m=sn(f,d,.5);return typeof o[2+u]=="number"&&(o[2+u]/=m),typeof o[3+u]=="number"&&(o[3+u]/=m),c(o)}},RN={borderRadius:Object.assign({},kc,{applyTo:zy.slice()}),borderTopLeftRadius:kc,borderTopRightRadius:kc,borderBottomLeftRadius:kc,borderBottomRightRadius:kc,boxShadow:EN};function TN(e,t,i){let a="";const o=e.x.translate/t.x,c=e.y.translate/t.y,u=i?.z||0;(o||c||u)&&(a=`translate3d(${o}px, ${c}px, ${u}px) `);let f="";if(i){const{transformPerspective:d}=i;d&&(a=`perspective(${d}px) ${a}`);for(let m=0;me.depth-t.depth;class jN{constructor(){this.children=[],this.isDirty=!1}add(t){fy(this.children,t),this.isDirty=!0}remove(t){zd(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(AN),this.isDirty=!1,this.children.forEach(t)}}const wd={hasAnimatedSinceResize:!0,hasEverUpdated:!1},Dw=["z","skew","skewZ"],MN=1e3;let NN=0;function Lw(e,t,i,a){const{latestValues:o}=t;o[e]&&(i[e]=o[e],t.setStaticValue(e,0),a&&(a[e]=0))}const hg=e=>e.instance&&El.get(e.instance)?.demote()&&e.resetSkewAndRotation();function LR(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;const{visualElement:t}=e.options;if(!t)return;const i=vR(t);if(window.MotionHasOptimisedAnimation(i,"transform")){const{layout:o,layoutId:c}=e.options;window.MotionCancelOptimisedAnimation(i,"transform",Wt,!(o||c))}const{parent:a}=e;a&&!a.hasCheckedOptimisedAppear&&LR(a)}function PR(e){if(e)return e.options.allowProjection!==!1?e.projection:PR(e.parent)}function _R({attachResizeListener:e,defaultParent:t,measureScroll:i,checkIsScrollRoot:a,resetTransform:o}){return Object.assign($c,{...RN,...$c}),class{static create(u,f,d){const{layoutId:m,layout:y,drag:v,dragConstraints:w,layoutScroll:x,layoutRoot:C,layoutAnchor:E,layoutCrossfade:S}=f,T=u.projection=new this(u.latestValues,f["data-framer-portal-id"]?void 0:PR(u.parent));T.setOptions({layoutId:m,layout:y,alwaysMeasureLayout:!!v||w&&sN(w),visualElement:u,animationType:typeof y=="string"?y:"both",initialPromotionConfig:d,crossfade:S,layoutScroll:x,layoutRoot:C,layoutAnchor:E});const j=T.getStack()?.lead;j&&!T.root.isUpdateBlocked()&&(j.willUpdate(),j.scheduleCheckAfterUnmount())}constructor(u={},f=t?.()){this.id=NN++,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.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(DN),this.nodes.forEach(BN),this.nodes.forEach(HN),this.nodes.forEach(LN)},this.resolvedRelativeTargetAt=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=u,this.root=f?f.root||f:this,this.path=f?[...f.path,f]:[],this.parent=f,this.depth=f?f.depth+1:0;for(let d=0;dthis.root.updateBlockedByResize=!1;Wt.read(()=>{v=window.innerWidth}),e(u,()=>{const x=window.innerWidth;x!==v&&(v=x,this.root.updateBlockedByResize=!0,y?.(),y=aN(w,250),wd.hasAnimatedSinceResize&&(wd.hasAnimatedSinceResize=!1,this.nodes.forEach(zw)))})}f&&this.root.registerSharedNode(f,this),this.addLayoutListener()}addLayoutListener(){const{layoutId:u,layout:f,visualElement:d,animate:m}=this.options;!this.instance||this.hasLayoutListener||m===!1||!d||!(u||f)||(this.hasLayoutListener=!0,this.addEventListener("didUpdate",({delta:y,hasLayoutChanged:v,hasRelativeLayoutChanged:w,layout:x})=>{if(this.isAnimationBlocked){this.target=void 0,this.relativeTarget=void 0;return}const C=this.options.transition||d.getDefaultTransition()||qN,{onLayoutAnimationStart:E,onLayoutAnimationComplete:S}=d.getProps(),T=!this.targetLayout||!DR(this.targetLayout,x),j=!v&&w;if(this.options.layoutRoot||this.resumeFrom||j||v&&(T||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);const L={...Ly(C,"layout"),onPlay:E,onComplete:S};(d.shouldReduceMotion||this.options.layoutRoot)&&(L.delay=0,L.type=!1),this.startAnimation(L),this.setAnimationOrigin(y,j,L.path)}else v||zw(this),this.isLead()&&this.options.onExitComplete?.();this.targetLayout=x}))}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this),this.getStack()?.remove(this),this.parent?.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),this.hasLayoutListener=!1,Jr(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes?.forEach(FN),this.animationId++)}getTransformTemplate(){const{visualElement:u}=this.options;return u&&u.getProps().transformTemplate}willUpdate(u=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete?.();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&LR(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;hg(this),this.isLayoutDirty=!0;for(let y=0;yu.members.length?u.removeLeadSnapshot():this.sharedNodes.delete(f))}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Wt.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Wt.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!_r(this.snapshot.measuredBox.x)&&!_r(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 d=0;d{const O=N/1e3,P=L?.(O);Vw(w.x,u.x,O),Vw(w.y,u.y,O),P&&(w.x.translate=P.x,w.y.translate=P.y),this.setTargetDelta(w),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(qd(x,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),YN(this.relativeTarget,this.relativeTargetOrigin,x,O),j&&SN(this.relativeTarget,j)&&(this.isProjectionDirty=!1),j||(j=Gn()),Oi(j,this.relativeTarget)),C&&(this.animationValues=v,cN(v,y,this.latestValues,O,T,S)),P?.rotate!==void 0&&(this.animationValues||(this.animationValues=v),this.animationValues.pathRotation=P.rotate),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=O},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(u){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(Jr(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Wt.update(()=>{wd.hasAnimatedSinceResize=!0,this.motionValue||(this.motionValue=Rl(0)),this.motionValue.jump(0,!1),this.currentAnimation=iN(this.motionValue,[0,1e3],{...u,velocity:0,isSync:!0,onUpdate:f=>{this.mixTargetDelta(f),u.onUpdate&&u.onUpdate(f)},onComplete:()=>{u.onComplete&&u.onComplete(),this.completeAnimation()}}),NM(this.currentAnimation,this),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 u=this.getStack();u&&u.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta?.(MN),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const u=this.getLead(),{targetWithTransforms:f,layout:d,latestValues:m}=u;let{target:y}=u;if(!(!f||!y||!d)){if(this!==u&&this.layout&&d&&zR(this.options.animationType,this.layout.layoutBox,d.layoutBox)){const{layoutBox:v}=this.layout,w=y;y=this.target||Gn(),Iw(y.x,w.x,v.x),Iw(y.y,w.y,v.y)}Oi(f,y),bd(f,m),Gd(this.projectionDeltaWithTransform,this.layoutCorrected,f,m)}}registerSharedNode(u,f){this.sharedNodes.has(u)||this.sharedNodes.set(u,new CN),this.sharedNodes.get(u).add(f);const m=f.options.initialPromotionConfig;f.promote({transition:m?.transition,preserveFollowOpacity:m?.shouldPreserveFollowOpacity?m.shouldPreserveFollowOpacity(f):void 0})}isLead(){const u=this.getStack();return u?u.lead===this:!0}getLead(){const{layoutId:u}=this.options;return u?this.getStack()?.lead||this:this}getPrevLead(){const{layoutId:u}=this.options;return u?this.getStack()?.prevLead:void 0}getStack(){const{layoutId:u}=this.options;if(u)return this.root.sharedNodes.get(u)}promote({needsReset:u,transition:f,preserveFollowOpacity:d}={}){this.getStack()?.promote(this,d),u&&(this.projectionDelta=void 0,this.needsReset=!0),f&&this.setOptions({transition:f})}relegate(){return this.getStack()?.relegate(this)||!1}resetSkewAndRotation(){const{visualElement:u}=this.options;if(!u)return;const{latestValues:f}=u;if(!RR(f))return;const d={};for(let m=0;mu.currentAnimation?.stop()),this.root.nodes.forEach(Pw),this.root.sharedNodes.clear()}}}function kN(e){e.updateLayout(),zN(e)}function ON(e){const t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){const{layoutBox:i,measuredBox:a}=e.layout,{animationType:o}=e.options,c=t.source!==e.layout.source,u=(x,C)=>{if(o==="size")zi(E=>{const S=_r(x[E]);x[E].min=C[E].min,x[E].max=x[E].min+S});else if(o==="x"||o==="y"){const E=o==="x"?"y":"x";j0(x[E],C[E])}else zR(o,t.layoutBox,i)&&zi(E=>{const S=_r(C[E]);x[E].max=x[E].min+S,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[E].max=e.relativeTarget[E].min+S)})},f=c?t.measuredBox:t.layoutBox;u(f,i);const d=ll();Gd(d,i,t.layoutBox);const m=ll();Gd(m,c?e.applyTransform(a,!0):i,f);const y=!OR(d);let v=!1;const w=e.getClosestProjectingParent();if((!c||w?.options.layoutRoot&&e.resumeFrom?.path.includes(w))&&w&&!w.resumeFrom){const{snapshot:x,layout:C}=w;if(x&&C){const E=e.options.layoutAnchor||void 0,S=Gn();qd(S,c?e.resumeFrom.applyTransform(t.layoutBox,!0,void 0,!0,w.depth+1):t.layoutBox,x.layoutBox,E);const T=Gn();qd(T,i,C.layoutBox,E),c&&u(S,T),DR(S,T)||(v=!0),w.options.layoutRoot&&(e.relativeTarget=T,e.relativeTargetOrigin=S,e.relativeParent=w)}}e.notifyListeners("didUpdate",{layout:i,snapshot:t,delta:m,layoutDelta:d,hasLayoutChanged:y,hasRelativeLayoutChanged:v})}else e.isLead()&&e.options.onExitComplete?.();e.options.transition=void 0}function DN(e){e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function LN(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function PN(e){e.clearSnapshot()}function Pw(e){e.clearMeasurements()}function _N(e){e.isLayoutDirty=!0,e.updateLayout()}function _w(e){e.isLayoutDirty=!1}function zN(e){const{snapshot:t,dragAncestor:i}=e,a=i?.isAnimationBlocked&&i.layout;if(!t||!a||e.resumeFrom||e.isAnimationBlocked)return;const o=i.dragSnapshot;zi(c=>Ui(t.layoutBox[c],a.layoutBox[c].min-o.layoutBox[c].min))}function VN(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.dragSnapshot||e.layout,e.isLayoutDirty=!0)}function UN(e){e.relativeTarget&&e.relativeParent?.isLayoutDirty&&(e.currentAnimation?e.isLayoutDirty=!0:(e.targetDelta=void 0,e.removeRelativeTarget()))}function IN(e){const{visualElement:t}=e.options;t?.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function zw(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function BN(e){e.resolveTargetDelta()}function HN(e){e.calcProjection()}function FN(e){e.resetSkewAndRotation()}function Vw(e,t,i){e.translate=sn(t.translate,0,i),e.scale=sn(t.scale,1,i),e.origin=t.origin,e.originPoint=t.originPoint}function Uw(e,t,i,a){e.min=sn(t.min,i.min,a),e.max=sn(t.max,i.max,a)}function YN(e,t,i,a){Uw(e.x,t.x,i.x,a),Uw(e.y,t.y,i.y,a)}function GN(e){return e.animationValues?.opacityExit!==void 0}const qN={duration:.45,ease:[.4,0,.1,1]};function Iw(e,t,i){e.max=_r(i)+(e.min=t.min)}function zR(e,t,i){return e==="position"||e==="preserve-aspect"&&!gN(Nw(t),Nw(i),.2)}function $N(e){return e!==e.root&&e.scroll?.wasRoot}function mo(e,t,i,a={passive:!0}){return e.addEventListener(t,i,a),()=>e.removeEventListener(t,i,a)}const KN=_R({attachResizeListener:(e,t)=>mo(e,"resize",t),measureScroll:rN,checkIsScrollRoot:()=>!0}),Sd={current:void 0},VR=_R({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Sd.current){const e=new KN({});e.mount(window),e.setOptions({layoutScroll:!0}),Sd.current=e}return Sd.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"}),XN=new WeakMap;function yh(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function mu(e){return typeof e=="string"||Array.isArray(e)}const vh=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],Bw=["initial"].concat(vh);function bh(e){if(yh(e.animate))return!0;for(let t=0;t$d.current=e.matches;e.addEventListener("change",t),t()}else $d.current=!1}const Hw=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"];let Kd={};function BR(e){Kd=e}function QN(){return Kd}class JN{scrapeMotionValuesFromProps(t,i,a){return{}}constructor({parent:t,props:i,presenceContext:a,reducedMotionConfig:o,skipAnimations:c,blockInitialAnimation:u,visualState:f},d={}){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=Ny,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 x=Ht.now();this.renderScheduledAto.delete(this)}}this.values.forEach((a,o)=>this.bindToMotionValue(o,a)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(Hy.current||IR(),this.shouldReduceMotion=$d.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection?.unmount(),Jr(this.notifyUpdate),Jr(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree?.(),this.parent?.removeChild(this);for(const t in this.events)this.events[t].clear();for(const t in this.features){const i=this.features[t];i&&(i.unmount(),i.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),(this.enteringChildren||(this.enteringChildren=new Set)).add(t)}removeChild(t){this.children.delete(t),this.enteringChildren?.delete(t)}bindToMotionValue(t,i){if(this.valueSubscriptions.get(t)?.(),i.accelerate&&w0.has(t)&&this.current instanceof HTMLElement){const{factory:u,keyframes:f,times:d,ease:m,duration:y}=i.accelerate,v=new lR({element:this.current,name:t,keyframes:f,times:d,ease:m,duration:Tr(y)}),w=u(v);this.valueSubscriptions.set(t,()=>{w(),v.cancel()});return}const a=Rs.has(t);a&&this.onBindTransform&&this.onBindTransform();const o=i.on("change",u=>{this.latestValues[t]=u,this.props.onUpdate&&Wt.preRender(this.notifyUpdate),a&&(this.projection&&(this.projection.isTransformDirty=!0),El.get(this.current)?.check()),this.scheduleRender()});let c;typeof window<"u"&&window.MotionCheckAppearSync&&(c=window.MotionCheckAppearSync(this,t,i)),this.valueSubscriptions.set(t,()=>{o(),c?.()})}sortNodePosition(t){return!this.current||!t.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in Kd){const i=Kd[t];if(!i)continue;const{isEnabled:a,Feature:o}=i;if(!this.features[t]&&o&&a(this.props)&&(this.features[t]=new o(this)),this.features[t]){const c=this.features[t];c.isMounted?c.update():(c.mount(),c.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Gn()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,i){this.latestValues[t]=i}update(t,i){const{transformTemplate:a,onUpdate:o}=this.props;(t.transformTemplate||a)&&this.scheduleRender(),(t.transformTemplate&&!a||t.onUpdate&&!o)&&El.get(this.current)?.demote(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=i;for(let c=0;c{this.current&&(this.current.textContent=`${i}`)}))}}function FR(e,{style:t,vars:i},a,o){const c=e.style;let u;for(u in t)c[u]=t[u];o?.applyProjectionStyles(c,a);for(u in i)c.setProperty(u,i[u])}function YR(e,{layout:t,layoutId:i}){return Rs.has(e)||e.startsWith("origin")||(t||i!==void 0)&&(!!$c[e]||e==="opacity")}function Fy(e,t,i){const a=e.style,o=t?.style,c={};if(!a)return c;for(const u in a)(ur(a[u])||o&&ur(o[u])||YR(u,e)||i?.getValue(u)?.liveStyle!==void 0)&&(c[u]=a[u]);return c}function e8(e){return window.getComputedStyle(e)}class t8 extends HR{constructor(){super(...arguments),this.type="html",this.renderInstance=FR}mount(t){super.mount(t)}readValueFromInstance(t,i){if(Rs.has(i))return this.projection?.isProjecting?du(i):IM(t,i);{const a=e8(t),o=(_E(i)?a.getPropertyValue(i):a[i])||0;return typeof o=="string"?o.trim():o}}measureInstanceViewportBox(t,{transformPagePoint:i}){return jR(t,i)}build(t,i,a){By(t,i,a.transformTemplate)}scrapeMotionValuesFromProps(t,i,a){return Fy(t,i,a)}}const pu=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;function Yy(e){return{point:{x:e.pageX,y:e.pageY}}}const n8=e=>t=>pu(t)&&e(t,Yy(t));function eu(e,t,i,a){return mo(e,t,n8(i),a)}const Cd=new WeakMap;let Ed;const GR=(e,t,i)=>(a,o)=>o&&o[0]?o[0][e+"Size"]:Vy(a)&&"getBBox"in a?a.getBBox()[t]:a[i],r8=GR("inline","width","offsetWidth"),i8=GR("block","height","offsetHeight");function a8({target:e,borderBoxSize:t}){Cd.get(e)?.forEach(i=>{i(e,{get width(){return r8(e,t)},get height(){return i8(e,t)}})})}function s8(e){e.forEach(a8)}function o8(){typeof ResizeObserver>"u"||(Ed=new ResizeObserver(s8))}function l8(e,t){Ed||o8();const i=xR(e);return i.forEach(a=>{let o=Cd.get(a);o||(o=new Set,Cd.set(a,o)),o.add(t),Ed?.observe(a)}),()=>{i.forEach(a=>{const o=Cd.get(a);o?.delete(t),o?.size||Ed?.unobserve(a)})}}const Rd=new Set;let cl;function c8(){cl=()=>{const e={get width(){return window.innerWidth},get height(){return window.innerHeight}};Rd.forEach(t=>t(e))},window.addEventListener("resize",cl)}function u8(e){return Rd.add(e),cl||c8(),()=>{Rd.delete(e),!Rd.size&&typeof cl=="function"&&(window.removeEventListener("resize",cl),cl=void 0)}}function Fw(e,t){return Uy(typeof e=="function"?u8(e):l8(e,t))}const Yw=(e,t)=>Math.abs(e-t);function f8(e,t){const i=Yw(e.x,t.x),a=Yw(e.y,t.y);return Math.sqrt(i**2+a**2)}const Gw=new Set(["auto","scroll"]);class qR{constructor(t,i,{transformPagePoint:a,contextWindow:o=window,dragSnapToOrigin:c=!1,distanceThreshold:u=3,element:f,immediate:d}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.onElementScroll=C=>{this.handleScroll(C.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.hasPendingMove=!1,this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=Xf(this.lastRawMoveEventInfo,this.transformPagePoint));const C=pg(this.lastMoveEventInfo,this.history),E=this.startEvent!==null,S=f8(C.offset,{x:0,y:0})>=this.distanceThreshold;if(!E&&!S)return;const{point:T}=C;this.history.push({...T,timestamp:Ht.now()});const{onStart:j,onMove:L}=this.handlers;E||(j?.(this.lastMoveEvent,C),this.startEvent=this.lastMoveEvent),L?.(this.lastMoveEvent,C)},this.handlePointerMove=(C,E)=>{this.handleScroll(window),this.lastMoveEvent=C,this.lastRawMoveEventInfo=E,this.lastMoveEventInfo=Xf(E,this.transformPagePoint),this.hasPendingMove=!0,Wt.update(this.updatePoint,!0)},this.handlePointerUp=(C,E)=>{this.hasPendingMove&&this.updatePoint(),this.end();const{onEnd:S,onSessionEnd:T,resumeAnimation:j}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&j?.(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const L=pg(C.type==="pointercancel"?this.lastMoveEventInfo:Xf(E,this.transformPagePoint),this.history);this.startEvent&&S?.(C,L),T?.(C,L)},!pu(t))return;this.dragSnapToOrigin=c,this.handlers=i,this.transformPagePoint=a,this.distanceThreshold=d?0:u,this.contextWindow=o||window;const m=Yy(t),y=Xf(m,this.transformPagePoint),{point:v}=y;this.history=[{...v,timestamp:Ht.now()}];const{onSessionStart:w}=i;w&&w(t,pg(y,this.history));const x={passive:!0,capture:!0};this.removeListeners=Sl(eu(this.contextWindow,"pointermove",this.handlePointerMove,x),eu(this.contextWindow,"pointerup",this.handlePointerUp,x),eu(this.contextWindow,"pointercancel",this.handlePointerUp,x)),f&&this.startScrollTracking(f),d&&(this.handlePointerMove(t,m),this.updatePoint())}startScrollTracking(t){let i=t.parentElement;for(;i;){const a=getComputedStyle(i);(Gw.has(a.overflowX)||Gw.has(a.overflowY))&&this.scrollPositions.set(i,mg(i)),i=i.parentElement}this.scrollPositions.set(window,mg(window)),this.removeScrollListeners=Sl(mo(window,"scroll",this.onElementScroll,{capture:!0}),mo(window,"scroll",this.onWindowScroll,{}))}handleScroll(t){const i=this.scrollPositions.get(t);if(!i)return;const a=t===window,o=mg(t),c={x:o.x-i.x,y:o.y-i.y};c.x===0&&c.y===0||(a?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=c.x,this.lastMoveEventInfo.point.y+=c.y):this.history.length>0&&(this.history[0].x-=c.x,this.history[0].y-=c.y),this.scrollPositions.set(t,o),Wt.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners?.(),this.removeScrollListeners?.(),this.scrollPositions.clear(),Jr(this.updatePoint)}}const mg=e=>e===window?{x:window.scrollX,y:window.scrollY}:{x:e.scrollLeft,y:e.scrollTop};function Xf(e,t){return t?{point:t(e.point)}:e}function qw(e,t){return{x:e.x-t.x,y:e.y-t.y}}function pg({point:e},t){return{point:e,delta:qw(e,$R(t)),offset:qw(e,d8(t)),velocity:h8(t,.1)}}function d8(e){return e[0]}function $R(e){return e[e.length-1]}function h8(e,t){if(e.length<2)return{x:0,y:0};let i=e.length-1,a=null;const o=$R(e);for(;i>=0&&(a=e[i],!(o.timestamp-a.timestamp>Tr(t)));)i--;if(!a)return{x:0,y:0};a===e[0]&&e.length>2&&o.timestamp-a.timestamp>Tr(t)*2&&(a=e[1]);const c=ei(o.timestamp-a.timestamp);if(c===0)return{x:0,y:0};const u={x:(o.x-a.x)/c,y:(o.y-a.y)/c};return u.x===1/0&&(u.x=0),u.y===1/0&&(u.y=0),u}const m8=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function p8(e){return m8.has(e.tagName)||e.isContentEditable===!0}const g8=new Set(["INPUT","SELECT","TEXTAREA"]);function y8(e){return g8.has(e.tagName)||e.isContentEditable===!0}const Pi={x:!1,y:!1};function Xd(){return Pi.x||Pi.y}function v8(e){return e==="x"||e==="y"?Pi[e]?null:(Pi[e]=!0,()=>{Pi[e]=!1}):Pi.x||Pi.y?null:(Pi.x=Pi.y=!0,()=>{Pi.x=Pi.y=!1})}function b8(e,{min:t,max:i},a){return t!==void 0&&ei&&(e=a?sn(i,e,a.max):Math.min(e,i)),e}function $w(e,t,i){return{min:t!==void 0?e.min+t:void 0,max:i!==void 0?e.max+i-(e.max-e.min):void 0}}function x8(e,{top:t,left:i,bottom:a,right:o}){return{x:$w(e.x,i,o),y:$w(e.y,t,a)}}function Kw(e,t){let i=t.min-e.min,a=t.max-e.max;return t.max-t.mina?i=ho(t.min,t.max-a,e.min):a>o&&(i=ho(e.min,e.max-o,t.min)),Ba(0,1,i)}function C8(e,t){const i={};return t.min!==void 0&&(i.min=t.min-e.min),t.max!==void 0&&(i.max=t.max-e.min),i}const M0=.35;function E8(e=M0){return e===!1?e=0:e===!0&&(e=M0),{x:Xw(e,"left","right"),y:Xw(e,"top","bottom")}}function Xw(e,t,i){return{min:Ww(e,t),max:Ww(e,i)}}function Ww(e,t){return typeof e=="number"?e:e[t]||0}function Zw(e){let t="";for(const i of e.path){i.scroll=void 0,i.updateScroll();const{scroll:a}=i;i!==e.root&&a&&(t+=a.offset.x+","+a.offset.y+",")}return t}const R8=new WeakMap;class T8{constructor(t,i=()=>t.getProps()){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Gn(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t,this.readProps=i}start(t,i={}){if(this.visualElement.presenceContext?.isPresent===!1)return;const a=m=>{i.snapToCursor&&this.snapToCursor(m),this.stopAnimation()},o=(m,y)=>{const{drag:v,dragConstraints:w,dragPropagation:x,onDragStart:C}=this.getProps();if(v&&!x&&(this.openDragLock?.(),this.openDragLock=v8(v),!this.openDragLock))return;this.latestPointerEvent=m,this.latestPanInfo=y,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints();const{projection:E}=this.visualElement;E&&(E.isAnimationBlocked=!0,E.target=void 0),zi(S=>{let T=this.getAxisMotionValue(S).get()||0;if(gh(T)&&(T=_y(T,this.visualElement.current)||0),Ve.test(T))T=parseFloat(T);else if(sa.test(T)){const j=E?.layout?.layoutBox[S];j&&(T=_r(j)*(parseFloat(T)/100))}this.originPoint[S]=T}),this.point=typeof w=="function"&&w(this),C&&Wt.update(()=>C(m,y),!1,!0),E0(this.visualElement,"transform"),this.visualElement.animationState?.setActive("whileDrag",!0)},c=(m,y)=>{this.latestPointerEvent=m,this.latestPanInfo=y;const{dragPropagation:v,dragDirectionLock:w,onDirectionLock:x,onDrag:C}=this.getProps();if(!v&&!this.openDragLock)return;const{offset:E}=y;if(w&&this.currentDirection===null){if(this.currentDirection=j8(E),this.currentDirection===null)return;x&&x(this.currentDirection)}this.updateAxis("x",E),this.updateAxis("y",E),this.point&&this.point.move(),this.visualElement.render(),C&&Wt.update(()=>C(m,y),!1,!0)},u=(m,y)=>{this.latestPointerEvent=m,this.latestPanInfo=y,this.stop(m,y),this.latestPointerEvent=null,this.latestPanInfo=null},f=()=>{const{dragSnapToOrigin:m}=this.getProps();(m||this.constraints||this.point)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:d}=this.getProps();this.panSession=new qR(t,{onSessionStart:a,onStart:o,onMove:c,onSessionEnd:u,resumeAnimation:f},{...i,transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:d,contextWindow:this.visualElement.current?.ownerDocument.defaultView,element:this.visualElement.current})}stop(t,i,a){const o=t||this.latestPointerEvent,c=i||this.latestPanInfo,u=this.isDragging;if(this.cancel(),!u||!c||!o)return;const{velocity:f}=c;this.startAnimation(f,a);const{onDragEnd:d}=this.getProps();d&&Wt.postRender(()=>d(o,c))}cancel(){this.isDragging=!1;const{projection:t,animationState:i}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.endPanSession(),!this.getProps().dragPropagation&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),i?.setActive("whileDrag",!1)}endPanSession(){this.panSession?.end(),this.panSession=void 0}updateAxis(t,i){const{drag:a}=this.readProps();if(!i||!Qo(t,a,this.currentDirection))return;const o=this.getAxisMotionValue(t);let c=this.originPoint[t]+i[t];const u=this.constraints&&this.constraints[t];u&&(c=b8(c,u,this.elastic[t])),this.point?this.point[t]=c:o.set(c)}resolveConstraints(){const{dragConstraints:t,dragElastic:i}=this.getProps(),{projection:a}=this.visualElement,o=a&&(a.layout||a.measure(!1)),c=this.constraints;Oc(t)?(!this.constraints||this.scroll!==Zw(a))&&(this.constraints=this.resolveRefConstraints()):t&&o&&typeof t=="object"?this.constraints=x8(o.layoutBox,t):this.constraints=!1,this.elastic=E8(i),c!==this.constraints&&!Oc(t)&&o&&this.constraints&&!this.hasMutatedConstraints&&zi(u=>{this.constraints!==!1&&this.getAxisMotionValue(u)&&(this.constraints[u]=C8(o.layoutBox[u],this.constraints[u]))})}resolveRefConstraints(){const{dragConstraints:t,onMeasureDragConstraints:i}=this.getProps();if(!Oc(t))return!1;const a=Qw(t),{projection:o}=this.visualElement;if(!o||!o.layout)return!1;this.scroll=Zw(o);const c=nN(a,o.root,this.visualElement.getTransformPagePoint());let u=w8(o.layout.layoutBox,o.removeElementScroll(c));if(i){const f=i(J6(u));this.hasMutatedConstraints=!!f,f&&(u=ER(f))}return u}startAnimation(t,i){const{drag:a,dragMomentum:o,dragElastic:c,dragTransition:u,dragSnapToOrigin:f,onDragTransitionEnd:d}=this.getProps(),m={bounceStiffness:c?200:1e6,bounceDamping:c?40:1e7,timeConstant:750,restDelta:1,restSpeed:10,...u},y=x=>o&&!(this.point&&f)&&Qo(x,i||a,this.currentDirection)?t[x]:0;if(this.point&&!f)return this.point.release({x:y("x"),y:y("y")},m).then(d);const v=this.constraints||{},w=zi(x=>{if(!Qo(x,i||a,this.currentDirection))return;let C=v[x]||{};(f===!0||f===x)&&(C={min:0,max:0});const E={type:"inertia",velocity:y(x),...m,...C};return this.startAxisValueAnimation(x,E)});return Promise.all(w).then(d)}startAxisValueAnimation(t,i){const a=this.getAxisMotionValue(t);return E0(this.visualElement,t),a.start(Py(t,a,0,i,this.visualElement,!1))}stopAnimation(){zi(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){const i=`_drag${t.toUpperCase()}`,o=this.readProps()[i];return o||this.visualElement.getValue(t,this.visualElement.latestValues[t]??0)}snapToCursor({clientX:t,clientY:i}){const{drag:a}=this.getProps(),o={x:t,y:i},c=this.visualElement.getTransformPagePoint()?.(o)||o,u=this.visualElement.measureViewportBox();zi(f=>{if(!Qo(f,a,this.currentDirection))return;const d=this.getAxisMotionValue(f),{min:m,max:y}=u[f];d.set((d.get()||0)+c[f]-sn(m,y,.5))})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:t,dragConstraints:i}=this.getProps(),{projection:a}=this.visualElement;if(!Oc(i)||!a||!this.constraints)return;this.stopAnimation();const o=this.constraints,c={x:0,y:0};zi(f=>{const d=this.getAxisMotionValue(f).get();c[f]=S8({min:d,max:d},o[f])});const{transformTemplate:u}=this.visualElement.getProps();this.visualElement.current.style.transform=u?u({},""):"none",a.root?.updateScroll(),a.updateLayout(),this.constraints=!1,this.resolveConstraints(),zi(f=>{const d=this.getAxisMotionValue(f);if(!Qo(f,t,null)||!d.get())return;const{min:m,max:y}=this.constraints[f];d.set(sn(m,y,c[f]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;R8.set(this.visualElement,this);const t=this.visualElement.current,i=eu(t,"pointerdown",m=>{const{drag:y,dragListener:v=!0}=this.getProps(),w=m.target,x=w!==t&&y8(w);y&&v&&!x&&this.start(m)});let a;const o=()=>{const{dragConstraints:m}=this.getProps(),y=Oc(m)&&Qw(m);y&&(this.constraints=this.resolveRefConstraints(),a||(a=A8(t,y,()=>this.scalePositionWithinConstraints())))},{projection:c}=this.visualElement,u=c.addEventListener("measure",o);c.layout||(c.root?.updateScroll(),c.updateLayout()),Wt.read(o);const f=mo(window,"resize",()=>this.scalePositionWithinConstraints()),d=c.addEventListener("didUpdate",(({delta:m,hasLayoutChanged:y})=>{this.isDragging&&y&&(zi(v=>{if(!Qo(v,this.getProps().drag,this.currentDirection))return;const w=this.getAxisMotionValue(v);this.originPoint[v]+=m[v].translate,w.set(w.get()+m[v].translate)}),this.visualElement.render())}));return()=>{f(),i(),u(),d(),a?.()}}getProps(){const t=this.readProps(),{dragElastic:i=M0,dragMomentum:a=!0}=t;return{...t,dragElastic:i,dragMomentum:a}}}function Oc(e){return!!e&&typeof e=="object"&&("current"in e||"nodeType"in e)}const Qw=e=>"current"in e?e.current:e;function Jw(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function A8(e,t,i){const a=Fw(e,Jw(i)),o=Fw(t,Jw(i));return()=>{a(),o()}}function Qo(e,t,i){return(t===!0||t===e)&&(i===null||i===e)}function j8(e,t=10){let i=null;return Math.abs(e.y)>t?i="y":Math.abs(e.x)>t&&(i="x"),i}function KR(e,t){const i=xR(e),a=new AbortController,o={passive:!0,...t,signal:a.signal},c=Uy(()=>a.abort());return[i,o,c]}function M8(e){return!(e.pointerType==="touch"||Xd())}function N8(e,t,i={}){t=Iy(t);const[a,o,c]=KR(e,i);return a.forEach(u=>{let f=!1,d=!1,m;const y=()=>{u.removeEventListener("pointerleave",C)},v=S=>{m&&(m(S),m=void 0),y()},w=S=>{f=!1,window.removeEventListener("pointerup",w),window.removeEventListener("pointercancel",w),d&&(d=!1,v(S))},x=()=>{f=!0,window.addEventListener("pointerup",w,o),window.addEventListener("pointercancel",w,o)},C=S=>{if(S.pointerType!=="touch"){if(f){d=!0;return}v(S)}},E=S=>{if(!M8(S))return;d=!1;const T=t(u,S);typeof T=="function"&&(m=T,u.addEventListener("pointerleave",C,o))};u.addEventListener("pointerenter",E,o),u.addEventListener("pointerdown",x,o)}),c}const XR=(e,t)=>t?e===t?!0:XR(e,t.parentElement):!1,N0=new WeakSet;function eS(e){return t=>{t.key==="Enter"&&e(t)}}function gg(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}const k8=(e,t)=>{let i=!1;const a=eS(()=>{i||N0.has(e)||(i=!0,gg(e,"down"))}),o=eS(()=>{i&&(i=!1,gg(e,"up"))});e.addEventListener("keydown",a,t),e.addEventListener("keyup",o,t),e.addEventListener("blur",()=>{e.removeEventListener("keydown",a),e.removeEventListener("keyup",o),i&&gg(e,"cancel")},{...t,once:!0})};function O8(e){return pu(e)&&!Xd()}const tS=new WeakSet,D8=100,L8=8,nS=(e,t,i)=>Math.hypot(e.clientX-t.clientX,e.clientY-t.clientY)>i,rS=e=>e.preventDefault();function P8(e,t,i={}){t=Iy(t);const[a,o,c]=KR(e,i),u=new WeakMap,f=d=>{const m=d.currentTarget;if(!O8(d)||tS.has(d))return;i.stopPropagation&&tS.add(d);const{count:y=1,countTimeout:v=.3,hold:w=0,repeat:x}=i,C=Ht.now(),E=Tr(w),S=Tr(v);let T=u.get(m);T?.expire(nS(T.event,d,D8))?T=void 0:T&&(Jr(T.expire),u.delete(m));const j=T?T.count+1:1,L=j>=y,N=L&&(w||x);let O=!w,P=0,k;if(N0.add(m),T)k=T.handlers;else{const Q=t(m,d);k=typeof Q=="function"?{onComplete:Q}:Q||{}}L&&O&&k.onActive?.();const A=Tr(x);let H=E||A,Y=C+H,Z=!0;const $=()=>{if(o.signal.aborted)return Jr($);let Q=Math.min(1-(Y-Ht.now())/H,1);Z&&Q<1&&(Q=0),Z=!1,k.onHold?.(Q),!(Q<1)&&(O?k.onRepeat?.(++P):(O=!0,k.onActive?.()),x?(Z=!0,Y+=H=A):Jr($))},K={...o,capture:!0},ee=(Q,F)=>{if(window.removeEventListener("pointerup",re,K),window.removeEventListener("pointercancel",V,K),window.removeEventListener("pointermove",X,K),m.removeEventListener("contextmenu",rS),Jr($),N0.delete(m),!!pu(Q))if(Xd()&&(F=!1),F&&!L){const z=Ht.now(),M=_=>{const I=o.signal.aborted;if(I||_===!0||Ht.now()-z>S)return Jr(M),u.delete(m),I||k.onComplete?.(Q,{success:!1}),!0};u.set(m,{count:j,event:d,handlers:k,expire:M}),Wt.update(M,!0)}else k.onComplete?.(Q,{success:F&&O})},re=Q=>{ee(Q,m===window||m===document||i.useGlobalTarget||XR(m,Q.target))},V=Q=>{ee(Q,!1)},X=Q=>{pu(Q)&&((x||!O)&&nS(d,Q,L8)||y>1&&Xd())&&V(Q)};window.addEventListener("pointerup",re,K),window.addEventListener("pointercancel",V,K),(N||y>1)&&window.addEventListener("pointermove",X,K),N&&(Wt.update($,!0),m.addEventListener("contextmenu",rS,{...o,passive:!1}))};return a.forEach(d=>{(i.useGlobalTarget?window:d).addEventListener("pointerdown",f,o),vd(d)&&(d.addEventListener("focus",()=>k8(d,o),o),!p8(d)&&!d.hasAttribute("tabindex")&&(d.tabIndex=0))}),c}class Ds{constructor(t){this.isMounted=!1,this.node=t}update(){}}const WR=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"]),ZR=e=>typeof e=="string"&&e.toLowerCase()==="svg";function _8(e,t,i,a){FR(e,t,void 0,a);for(const o in t.attrs)e.setAttribute(WR.has(o)?o:wR(o),t.attrs[o])}function QR(e,t,i){const a=Fy(e,t,i);for(const o in e)if(o!=="children"&&(ur(e[o])||ur(t[o]))){const c=Ia.indexOf(o)!==-1?"attr"+o.charAt(0).toUpperCase()+o.substring(1):o;a[c]=e[o]}return a}class z8 extends HR{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Gn}getBaseTargetFromProps(t,i){return Rs.has(i)?super.getBaseTargetFromProps(t,i)??du(i):t[i]}getDefaultValue(t){return Rs.has(t)?this.latestValues[t]??du(t):void 0}readValueFromInstance(t,i){if(Rs.has(i)){const a=tR(i);return a&&a.default||0}if(SR.includes(i)){const o=getComputedStyle(t)[i];if(typeof o=="string"&&o)return o.trim()}return i=WR.has(i)?i:wR(i),t.getAttribute(i)}scrapeMotionValuesFromProps(t,i,a){return QR(t,i,a)}build(t,i,a){CR(t,i,this.isSVGTag,a.transformTemplate,a.style)}renderInstance(t,i,a,o){_8(t,i,a,o)}mount(t){this.isSVGTag=ZR(t.tagName),super.mount(t)}}function JR(e,t){if(!Array.isArray(t))return!1;const i=t.length;if(i!==e.length)return!1;for(let a=0;ae?.out===!0?e:e?.out;function U8(e){let t=f=>Promise.all(f.map(({animation:d,options:m})=>H6(e,d,m))),i=aS(),a=!0,o=!1;function c(f){const{props:d,parent:m,manuallyAnimateOnMount:y}=e,{initial:v}=d,w=a||o,x=[],C=(O=v)=>typeof O!="boolean"&&co(e,Array.isArray(O)?O[0]:O,e.presenceContext?.custom)||void 0,E=new Map;let S={},T=1/0,j=e;do j=j.props.inherit!==!1&&j.parent;while(j&&!j.isControllingVariants);const L=w&&iS(C(v??(j&&j.props.initial))?.transition);if(V8.forEach((O,P)=>{const k=i[O],A=d[O],H=j&&j.props[O],Y=A!==void 0?A:mu(H)||H===!1?H:void 0,Z=mu(Y),$=O===f?k.isActive:null,K=Z&&A===void 0&&!(w&&y);if(k.protectedKeys={...S},!k.isActive&&$===null||!Y&&!k.prevProp||yh(Y)||typeof Y=="boolean")return;if($===!1&&(T=P),O==="exit"&&k.isActive&&$!==!0){S={...S,...k.prevResolvedValues};return}const ee=I8(k.prevProp,Y);let re=ee||Z&&($&&!K||P>T),V=!1;const X=Array.isArray(Y)?Y:[Y];let Q={},F;if($!==!1)for(const M of X){const{transition:_,transitionEnd:I,...B}=co(e,M,pR(e,O))||{};Q={...Q,...B,...I},F=iS(_)||F}const{prevResolvedValues:z}=k;for(const M in{...z,...Q}){if(M in S)continue;const _=Q[M],I=z[M],B=Array.isArray(_)&&Array.isArray(I)?!JR(_,I)||ee:_!==I;let W;if(B&&_==null)E.has(M)||E.set(M,k.prevOut);else if(B||_!==void 0&&E.has(M)){re=!0,W=E.get(M)||L,E.delete(M)&&(V=!0),k.needsAnimating[M]=!0;const ie=e.getValue(M);ie&&(ie.liveStyle=!1)}else k.protectedKeys[M]=!0;k.out[M]=W}if(k.prevProp=Y,k.prevResolvedValues=Q,k.prevOut=F,k.isActive&&(S={...S,...Q}),re&&(!(K&&ee)||V))for(const M of X){const _={type:O};if(typeof M=="string"&&w&&y&&m?.enteringChildren){const I=co(m,M)?.transition?.delayChildren;_.delay=hR(m.enteringChildren,e,I)}x.push({animation:M,options:_})}}),E.size){const O={},P=C();let k=P?.transition;E.forEach((A,H)=>{A&&(k={...k||e.getDefaultTransition(),[H]:A});const Y=e.getValue(H);Y&&(Y.liveStyle=!0);const Z=P&&!Array.isArray(v)?P[H]:void 0,$=e.getBaseTargetFromProps(d,H);O[H]=(Z!==void 0?Z:$!==void 0&&!ur($)?$:e.initialValues[H]===void 0?e.baseTarget[H]:void 0)??null}),k&&(O.transition=k),x.push({animation:O})}const N=w&&e.blockInitialAnimation||a&&!y&&(d.initial===!1||d.initial===d.animate);return a=o=!1,!N&&x.length?t(x):Promise.resolve()}function u(f,d){if(i[f].isActive===d)return Promise.resolve();e.variantChildren?.forEach(y=>y.animationState?.setActive(f,d)),i[f].isActive=d;const m=c(f);for(const y in i)i[y].protectedKeys={};return m}return{animateChanges:c,setActive:u,setAnimateFunction:f=>{t=f(e)},getState:()=>i,reset:()=>{i=aS(),o=!0}}}function I8(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!JR(t,e):!1}function aS(){const e={};for(const t of vh)e[t]={isActive:t==="animate",protectedKeys:{},needsAnimating:{},prevResolvedValues:{},out:{}};return e}const gu=b.createContext({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});function sS(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function B8(...e){return t=>{let i=!1;const a=e.map(o=>{const c=sS(o,t);return!i&&typeof c=="function"&&(i=!0),c});if(i)return()=>{for(let o=0;o{const{width:t,height:i}=e?.getBoundingClientRect()||{};return[t/e?.offsetWidth||1,i/e?.offsetHeight||1]},eT=e=>{let{left:t,top:i}=e.getBoundingClientRect(),a=e;for(;a=a.parentElement||a.parentNode?.host;){const{scrollLeft:u,scrollTop:f}=a;if(u||f){const[d,m]=oS(a);t+=u*d,i+=f*m}if(getComputedStyle(a).position==="fixed")break}const[o,c]=oS(e.offsetParent);return[t/o,i/c]};class F8 extends b.Component{getSnapshotBeforeUpdate(t){const i=this.props.getElement();if(vd(i)&&t.isPresent&&!this.props.isPresent&&this.props.pop!==!1){const a=i.offsetParent,o=vd(a)&&a.offsetWidth||0,c=vd(a)&&a.offsetHeight||0,u=getComputedStyle(i),f=this.props.sizeRef.current;f.height=parseFloat(u.height),f.width=parseFloat(u.width),f.top=i.offsetTop,f.left=i.offsetLeft,f.right=o-f.width-f.left,f.bottom=c-f.height-f.top,f.direction=u.direction,f.point=eT(i)}return null}componentDidUpdate(){}render(){return this.props.children}}function Y8({children:e,isPresent:t,anchorX:i,anchorY:a,root:o,pop:c,popNode:u}){const f=b.useId(),d=b.useRef(null),m=b.useRef({width:0,height:0,top:0,left:0,right:0,bottom:0,direction:"ltr"}),{nonce:y}=b.useContext(gu),v=c!==!1?e.props?.ref??e?.ref:void 0,w=H8(d,v),x=()=>d.current||u?.current?.current,C=E=>{const{width:S,height:T,top:j,left:L,right:N,bottom:O,direction:P}=m.current,k=P==="rtl",A=i==="left"?k?`right:${N}`:`left:${L}`:k?`left:${L}`:`right:${N}`,H=a==="bottom"?`bottom:${O}`:`top:${j}`;E?.insertRule(`[data-motion-pop-id="${f}"]{position:absolute!important;width:${S}px!important;height:${T}px!important;${A}px!important;${H}px!important}`)};return b.useInsertionEffect(()=>{const{width:E,height:S}=m.current,T=x();if(t||c===!1||!T||!E||!S)return;T.dataset.motionPopId=f;const j=T.ownerDocument,L=j.createElement("style");y&&(L.nonce=y);const N=o??j.head;N.appendChild(L),C(L.sheet);let O=0,P=0;return hu.setup(()=>{const[k,A]=eT(T);O=m.current.point[0]-k,P=m.current.point[1]-A}),hu.read(()=>{const{sheet:k}=L;if(!k||!O&&!P)return;const A=m.current;A.left+=O,A.right-=O,A.top+=P,A.bottom-=P,k.deleteRule(0),C(k)}),()=>{T.removeAttribute("data-motion-pop-id"),N.contains(L)&&N.removeChild(L)}},[t]),h.jsx(F8,{isPresent:t,getElement:x,sizeRef:m,pop:c,children:c===!1?e:b.cloneElement(e,{ref:w})})}const G8=({children:e,initial:t,isPresent:i,onExitComplete:a,custom:o,presenceAffectsLayout:c,mode:u,anchorX:f,anchorY:d,root:m})=>{const y=Mu(q8),v=b.useId(),w=b.useRef(),x=b.useRef(i),C=b.useRef(a);su(()=>{x.current=i,C.current=a});let E=!0,S=b.useMemo(()=>(E=!1,{id:v,initial:t,isPresent:i,custom:o,onExitComplete:T=>{y.set(T,!0);for(const j of y.values())if(!j)return;a&&a()},register:(T,j)=>(y.set(T,!1),j&&j.parent?.presenceContext?.id!==v&&(w.current=j),()=>{y.delete(T),!x.current&&!y.size&&C.current?.()})}),[i,y,a]);return c&&E&&(S={...S}),b.useMemo(()=>{y.forEach((T,j)=>y.set(j,!1))},[i]),b.useEffect(()=>{!i&&!y.size&&a&&a()},[i]),e=h.jsx(Y8,{pop:u==="popLayout",isPresent:i,anchorX:f,anchorY:d,root:m,popNode:w,children:e}),h.jsx(ph.Provider,{value:S,children:e})};function q8(){return new Map}function tT(e=!0){const t=b.useContext(ph);if(t===null)return[!0,null];const{isPresent:i,onExitComplete:a,register:o}=t,c=b.useId();b.useEffect(()=>{if(e)return o(c)},[e]);const u=b.useCallback(()=>e&&a&&a(c),[c,a,e]);return!i&&a?[!1,u]:[!0]}const Dc=e=>e.key||"";function lS(e){const t=[];return b.Children.forEach(e,i=>{b.isValidElement(i)&&t.push(i)}),t}const Gy=({children:e,custom:t,initial:i=!0,onExitComplete:a,presenceAffectsLayout:o=!0,mode:c="sync",propagate:u=!1,anchorX:f="left",anchorY:d="top",root:m})=>{const[y,v]=tT(u),w=b.useMemo(()=>lS(e),[e]),x=u&&!y?[]:w.map(Dc),C=b.useRef(!0),E=Mu(()=>new Map),S=b.useRef(new Set),[T,j]=b.useState(w),[L,N]=b.useState(w);su(()=>{u&&!y&&!L.length&&v?.()},[y,u,L.length,v]);const O=b.useRef();b.useEffect(()=>()=>{const A=O.current;O.current=void 0,A?.()},[L]),su(()=>{C.current=!1;for(let A=0;AE.get(Dc(Y)))?A=w:c==="wait"&&(A=P),N(lS(A)),j(w),null}const{forceRender:k}=b.useContext(uy);return h.jsx(h.Fragment,{children:L.map(A=>{const H=Dc(A),Y=u&&!y?!1:w===L||x.includes(H),Z=()=>{if(S.current.has(H))return;if(E.has(H))S.current.add(H),E.set(H,!0);else return;let $=!0;E.forEach(K=>{K||($=!1)}),$&&(k?.(),j([]),u&&v?.(),O.current=a)};return h.jsx(G8,{isPresent:Y,initial:!C.current||i?void 0:!1,custom:t,presenceAffectsLayout:o,mode:c,root:m,onExitComplete:Y?void 0:Z,anchorX:f,anchorY:d,children:A},H)})})},nT=b.createContext({strict:!1}),cS={animation:["variants",...vh],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 uS=!1;function $8(){if(uS)return;const e={};for(const t in cS)e[t]={isEnabled:i=>cS[t].some(a=>!!i[a])};BR(e),uS=!0}function rT(){return $8(),QN()}function K8(e){const t=rT();for(const i in e)t[i]={...t[i],...e[i]};BR(t)}function X8({children:e,...t}){const i=b.useContext(gu);t={...i,...t},t.transition=Dy(t.transition,i.transition),t.isStatic=Mu(()=>t.isStatic);const a=b.useMemo(()=>t,[JSON.stringify(t.transition),t.transformPagePoint,t.reducedMotion,t.skipAnimations,t.isValidProp]);return h.jsx(gu.Provider,{value:a,children:e})}const xh=b.createContext({});function W8(e,t){if(bh(e)){const{initial:i,animate:a}=e;return{initial:i===!1||mu(i)?i:void 0,animate:mu(a)?a:void 0}}return e.inherit!==!1?t:{}}function Z8(e){const{initial:t,animate:i}=W8(e,b.useContext(xh));return b.useMemo(()=>({initial:t,animate:i}),[fS(t),fS(i)])}function fS(e){return Array.isArray(e)?e.join(" "):e}const qy=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function iT(e,t,i){for(const a in t)!ur(t[a])&&!YR(a,i)&&(e[a]=t[a])}function Q8({transformTemplate:e},t){return b.useMemo(()=>{const i=qy();return By(i,t,e),Object.assign({},i.vars,i.style)},[t])}function J8(e,t){const i=e.style||{},a={};return iT(a,i,e),Object.assign(a,Q8(e,t)),a}function e9(e,t){const i={},a=J8(e,t);return e.drag&&e.dragListener!==!1&&(i.draggable=!1,a.userSelect=a.WebkitUserSelect=a.WebkitTouchCallout="none",a.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(i.tabIndex=0),i.style=a,i}const aT=()=>({...qy(),attrs:{}});function t9(e,t,i,a){const o=b.useMemo(()=>{const c=aT();return CR(c,t,ZR(a),e.transformTemplate,e.style),{...c.attrs,style:{...c.style}}},[t]);if(e.style){const c={};return iT(c,e.style,e),{...o,style:{...c,...o.style}}}return o}const n9=new Set(["animate","exit","variants","initial","style","values","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","tap","propagate","ignoreStrict","viewport"]);function Wd(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||n9.has(e)}function r9(e,t){return e.startsWith("on")?!Wd(e):t?.(e)??!Wd(e)}function i9(e,t,i,a){const o={};for(const c in e)c==="values"&&typeof e.values=="object"||ur(e[c])||(r9(c,a)||i===!0&&Wd(c)||!t&&!Wd(c)||e.draggable&&c.startsWith("onDrag"))&&(o[c]=e[c]);return o}const a9=["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 $y(e){return typeof e!="string"||e.includes("-")?!1:!!(a9.indexOf(e)>-1||/[A-Z]/u.test(e))}function s9(e,t,i,{latestValues:a},o,c=!1,u,f){const m=(u??$y(e)?t9:e9)(t,a,o,e),y=i9(t,typeof e=="string",c,f),v=e!==b.Fragment?{...y,...m,ref:i}:{},{children:w}=t,x=b.useMemo(()=>ur(w)?w.get():w,[w]);return b.createElement(e,{...v,children:x})}function o9({scrapeMotionValuesFromProps:e,createRenderState:t},i,a,o){return{latestValues:l9(i,a,o,e),renderState:t()}}function l9(e,t,i,a){const o={},c=a(e,{});for(const w in c)o[w]=xd(c[w]);let{initial:u,animate:f}=e;const d=bh(e),m=UR(e);t&&m&&!d&&e.inherit!==!1&&(u===void 0&&(u=t.initial),f===void 0&&(f=t.animate));let y=i?i.initial===!1:!1;y=y||u===!1;const v=y?f:u;if(v&&typeof v!="boolean"&&!yh(v)){const w=Array.isArray(v)?v:[v];for(let x=0;x(t,i)=>{const a=b.useContext(xh),o=b.useContext(ph),c=()=>o9(e,t,a,o);return i?c():Mu(c)},c9=sT({scrapeMotionValuesFromProps:Fy,createRenderState:qy}),u9=sT({scrapeMotionValuesFromProps:QR,createRenderState:aT}),f9=Symbol.for("motionComponentSymbol");function d9(e,t,i){const a=b.useRef(i);b.useInsertionEffect(()=>{a.current=i});const o=b.useRef(null);return b.useCallback(c=>{c&&e.onMount?.(c),t&&(c?t.mount(c):t.unmount());const u=a.current;if(typeof u=="function")if(c){const f=u(c);typeof f=="function"&&(o.current=f)}else o.current?(o.current(),o.current=null):u(c);else u&&(u.current=c)},[t])}const oT=b.createContext({});function h9(e,t,i,a,o,c){const{visualElement:u}=b.useContext(xh),f=b.useContext(nT),d=b.useContext(ph),m=b.useContext(gu),y=m.reducedMotion,v=m.skipAnimations,w=b.useRef(null),x=b.useRef(!1);a=a||f.renderer,!w.current&&a&&(w.current=a(e,{visualState:t,parent:u,props:i,presenceContext:d,blockInitialAnimation:d?d.initial===!1:!1,reducedMotionConfig:y,skipAnimations:v,isSVG:c}),x.current&&w.current&&(w.current.manuallyAnimateOnMount=!0));const C=w.current,E=b.useContext(oT);C&&!C.projection&&o&&(C.type==="html"||C.type==="svg")&&o.create(C,i,E),b.useInsertionEffect(()=>{C&&C.props!==i&&C.update(i,d)});const S=i[yR],T=b.useRef(!!S&&typeof window<"u"&&!window.MotionHandoffIsComplete?.(S)&&window.MotionHasOptimisedAnimation?.(S));return su(()=>{!x.current||!C||(C.animationState?.animateChanges(),C.enteringChildren=void 0)},[]),su(()=>{x.current=!0,C&&(window.MotionIsMounted=!0,C.updateFeatures(),C.scheduleRenderMicrotask(),T.current&&C.animationState&&C.animationState.animateChanges())}),b.useEffect(()=>{C&&(!T.current&&C.animationState&&C.animationState.animateChanges(),T.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(S)}),T.current=!1),C.enteringChildren=void 0)}),C}function yg(e,{forwardMotionProps:t=!1,type:i}={},a,o){a&&K8(a);const c=i?i==="svg":$y(e),u=c?u9:c9;function f(m,y){let v;const w=m9(m);Mu(()=>!!Sd.current?.sharedNodes.get(w)?.lead&&m.initial)&&(m={...m,initial:!1});const x={...b.useContext(gu),...m,layoutId:w},{isStatic:C,isValidProp:E}=x,S=Z8(m),T=u(m,C);if(!C&&typeof window<"u"){p9();const j=g9(x);S.visualElement=h9(e,T,x,o,j.ProjectionNode,c),(j.isEnabled||S.visualElement?.projection?.options.layoutId)&&(v=j.MeasureLayout)}return h.jsxs(xh.Provider,{value:S,children:[v&&S.visualElement?h.jsx(v,{visualElement:S.visualElement,...x}):null,s9(e,m,d9(T,S.visualElement,y),T,C,t,c,E)]})}f.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;const d=b.forwardRef(f);return d[f9]=e,d}function m9({layoutId:e}){const t=b.useContext(uy).id;return t&&e!==void 0?t+"-"+e:e}function p9(e,t){b.useContext(nT).strict}function g9(e){const t=rT(),{drag:i,layout:a}=t;if(!i&&!a)return{};const o={...i,...a};return{MeasureLayout:o.MeasureLayout,isEnabled:i?.isEnabled(e)||a?.isEnabled(e),ProjectionNode:o.ProjectionNode}}function y9(e,t){if(typeof Proxy>"u")return yg;const i=new Map,a=(c,u)=>yg(c,u,e,t),o=(c,u)=>a(c,u);return new Proxy(o,{get:(c,u)=>u==="create"?a:(i.has(u)||i.set(u,yg(u,void 0,e,t)),i.get(u))})}const v9=(e,t)=>t.isSVG??$y(e)?new z8(t):new t8(t,{allowProjection:e!==b.Fragment});class b9 extends Ds{constructor(t){super(t),t.animationState||(t.animationState=U8(t))}updateAnimationControlsSubscription(){const{animate:t}=this.node.getProps();yh(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){this.node.getProps().animate!==this.node.prevProps?.animate&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}let x9=0;class w9 extends Ds{constructor(){super(...arguments),this.id=x9++}update(){const{presenceContext:t,animationState:i}=this.node;if(!t||!i)return;const{isPresent:a,onExitComplete:o}=t;if(a===!this.exit)return;if(a){if(this.exit===!0){const{initial:u}=this.node.getProps();if(u&&!Array.isArray(u)){const{transition:f,transitionEnd:d,...m}=co(this.node,u)||{};for(const y in m)this.node.getValue(y)?.jump(m[y])}this.node.blockInitialAnimation=!1,i.reset(),i.animateChanges()}else i.setActive("exit",!1);this.exit=void 0;return}const c=this.exit=i.setActive("exit",!0);o&&c.then(()=>{this.exit===c&&(this.exit=!0,o(this.id))})}mount(){const{register:t}=this.node.presenceContext||{};t&&(this.unmount=t(this.id,this.node)),this.update()}unmount(){}}const S9={animation:{Feature:b9},exit:{Feature:w9}};class C9 extends Ds{constructor(t){super(t),this.removeGroupControls=Bi,this.removeListeners=Bi,this.controls=new T8(t)}mount(){const{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Bi}update(){const{dragControls:t,drag:i}=this.node.getProps(),{dragControls:a,drag:o}=this.node.prevProps||{};t!==a&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls))),o&&!i&&this.controls.stop(void 0,void 0,o)}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}}const vg=e=>(t,i)=>{e&&Wt.update(()=>e(t,i),!1,!0)};class E9 extends Ds{constructor(){super(...arguments),this.removePointerDownListener=Bi}onPointerDown(t){this.session=new qR(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:this.node.current?.ownerDocument.defaultView})}createPanHandlers(){const{onPanSessionStart:t,onPanStart:i,onPan:a,onPanEnd:o}=this.node.getProps();return{onSessionStart:vg(t),onStart:vg(i),onMove:vg(a),onEnd:(c,u)=>{delete this.session,o&&Wt.postRender(()=>o(c,u))}}}mount(){this.removePointerDownListener=eu(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session?.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session?.end()}}let bg=!1;const dS=({layout:e,layoutDependency:t,layoutAnchor:i})=>({layout:e,layoutDependency:t,layoutAnchor:i,animationType:typeof e=="string"?e:"both"}),hS=(e,t)=>{const{snapshot:i}=e,a=e.getStack();a?.remove(e);const o=a?.lead;if(a?.prevLead===e&&o.resumeFrom===e&&(o.resumeFrom=o.currentAnimation=e.resumingFrom=void 0),e.options.layoutId=t,!t){e.needsShow=!0;return}return e.root.registerSharedNode(t,e),()=>{const{resumeFrom:c}=e;c?.isPresent!==!1&&e.getStack().members.includes(c)&&(c.hide(),e.resumeFrom=void 0,e.snapshot=i)}};class R9 extends b.Component{componentDidMount(){const{visualElement:t,layoutGroup:i,switchLayoutGroup:a,layoutId:o}=this.props,{projection:c}=t;c&&(i.group?.add(c),o&&a?.register?.(c),bg&&c.root.didUpdate(),c.options.layoutId!==o&&hS(c,o)?.(),c.addEventListener("animationComplete",()=>this.safeToRemove()),c.setOptions({...c.options,...dS(this.props),onExitComplete:()=>this.safeToRemove()})),wd.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){const{layoutDependency:i,layoutId:a,visualElement:o,drag:c,isPresent:u}=this.props,{projection:f}=o;return f&&(f.isPresent=u,this.takeOver=t.layoutId!==a?(f.willUpdate(),hS(f,a)):void 0,f.setOptions({...f.options,...dS(this.props)}),bg=!0,c||t.layoutDependency!==i||i===void 0||t.isPresent!==u?f.willUpdate():this.safeToRemove(),t.isPresent!==u&&(u?f.promote():f.relegate()||Wt.postRender(()=>{f.getStack()?.members.length||this.safeToRemove()}))),null}componentDidUpdate(){const{projection:t}=this.props.visualElement;t&&(this.takeOver?.(),t.root.didUpdate(),hu.postRender(()=>{!t.currentAnimation&&t.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:t,layoutGroup:i,switchLayoutGroup:a}=this.props,{projection:o}=t;bg=!0,o&&(o.scheduleCheckAfterUnmount(),i.group?.remove(o),a?.deregister?.(o))}safeToRemove(){this.props.safeToRemove?.()}render(){return null}}function lT(e){const[t,i]=tT(),a=b.useContext(uy);return h.jsx(R9,{...e,layoutGroup:a,switchLayoutGroup:b.useContext(oT),isPresent:t,safeToRemove:i})}const T9={pan:{Feature:E9},drag:{Feature:C9,ProjectionNode:VR,MeasureLayout:lT}};function k0(e,t,i,a,o){const{props:c}=e,u="while"+i;!o&&e.animationState&&c[u]&&e.animationState.setActive(u,a==="Start");const f=c["on"+i+a];f&&Wt.postRender(()=>f(t,Yy(t)))}class A9 extends Ds{mount(){const{current:t}=this.node;t&&(this.unmount=N8(t,(i,a)=>(k0(this.node,a,"Hover","Start"),o=>k0(this.node,o,"Hover","End"))))}unmount(){}}class j9 extends Ds{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Sl(mo(this.node.current,"focus",()=>this.onFocus()),mo(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}function xg(e,t,i,a){e.current instanceof HTMLButtonElement&&e.current.disabled||k0(e,t,"Tap",i,a)}class M9 extends Ds{constructor(){super(...arguments),this.options={}}mount(){const{current:t}=this.node;t&&(this.update(),this.unmount=P8(t,(i,a)=>(xg(this.node,a,"Start"),{onComplete:(o,{success:c})=>xg(this.node,o,c?"":"Cancel"),onRepeat:()=>xg(this.node,a,"",!0)}),this.options))}update(){const{options:t,node:i}=this,{globalTapTarget:a,propagate:o,tap:c}=i.props;for(const u in t)delete t[u];Object.assign(t,c,{useGlobalTarget:a,stopPropagation:o?.tap===!1})}unmount(){}}const O0=new WeakMap,wg=new WeakMap,N9=e=>{const t=O0.get(e.target);t&&t(e)},k9=e=>{e.forEach(N9)};function O9({root:e,...t}){const i=e||document;wg.has(i)||wg.set(i,{});const a=wg.get(i),o=JSON.stringify(t);return a[o]||(a[o]=new IntersectionObserver(k9,{root:e,...t})),a[o]}function D9(e,t,i){const a=O9(t);return O0.set(e,i),a.observe(e),()=>{O0.delete(e),a.unobserve(e)}}const L9={some:0,all:1};class P9 extends Ds{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.stopObserver?.();const{viewport:t={}}=this.node.getProps(),{root:i,margin:a,amount:o="some",once:c}=t,u={root:i?i.current:void 0,rootMargin:a,threshold:typeof o=="number"?o:L9[o]},f=d=>{const{isIntersecting:m}=d;if(this.isInView===m||(this.isInView=m,c&&!m&&this.hasEnteredView))return;m&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",m);const{onViewportEnter:y,onViewportLeave:v}=this.node.getProps(),w=m?y:v;w&&w(d)};this.stopObserver=D9(this.node.current,u,f)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:t,prevProps:i}=this.node;["amount","margin","root"].some(_9(t,i))&&this.startObserver()}unmount(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}}function _9({viewport:e={}},{viewport:t={}}={}){return i=>e[i]!==t[i]}const z9={inView:{Feature:P9},tap:{Feature:M9},focus:{Feature:j9},hover:{Feature:A9}},V9={layout:{ProjectionNode:VR,MeasureLayout:lT}},U9=Object.assign({},S9,z9,T9,V9),I9=y9(U9,v9);function B9(){!Hy.current&&IR();const[e]=b.useState($d.current);return e}const yu=I9;var cT=e=>{throw TypeError(e)},uT=(e,t,i)=>t.has(e)||cT("Cannot "+i),gi=(e,t,i)=>(uT(e,t,"read from private field"),i?i.call(e):t.get(e)),Kc=(e,t,i)=>t.has(e)?cT("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,i),Qi=(e,t,i,a)=>(uT(e,t,"write to private field"),t.set(e,i),i),wh=/^(?:[a-z][a-z0-9+.-]*:|[\\/]{2})/i,Sh=/^[\\/]{2}/;function fT(e,t){return t+e.replace(/\\/g,"/")}var mS="popstate";function pS(e){return typeof e=="object"&&e!=null&&"pathname"in e&&"search"in e&&"hash"in e&&"state"in e&&"key"in e}function H9(e={}){function t(a,o){let c=o.state?.masked,{pathname:u,search:f,hash:d}=c||a.location;return vu("",{pathname:u,search:f,hash:d},o.state&&o.state.usr||null,o.state&&o.state.key||"default",c?{pathname:a.location.pathname,search:a.location.search,hash:a.location.hash}:void 0)}function i(a,o){return typeof o=="string"?o:Ar(o)}return Y9(t,i,null,e)}function vt(e,t){if(e===!1||e===null||typeof e>"u")throw new Error(t)}function En(e,t){if(!e){typeof console<"u"&&console.warn(t);try{throw new Error(t)}catch{}}}function F9(){return Math.random().toString(36).substring(2,10)}function gS(e,t){return{usr:e.state,key:e.key,idx:t,masked:e.mask?{pathname:e.pathname,search:e.search,hash:e.hash}:void 0}}function vu(e,t,i=null,a,o){return{pathname:typeof e=="string"?e:e.pathname,search:"",hash:"",...typeof t=="string"?fa(t):t,state:i,key:t&&t.key||a||F9(),mask:o}}function Ar({pathname:e="/",search:t="",hash:i=""}){return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),i&&i!=="#"&&(e+=i.charAt(0)==="#"?i:"#"+i),e}function fa(e){let t={};if(e){let i=e.indexOf("#");i>=0&&(t.hash=e.substring(i),e=e.substring(0,i));let a=e.indexOf("?");a>=0&&(t.search=e.substring(a),e=e.substring(0,a)),e&&(t.pathname=e)}return t}function Y9(e,t,i,a={}){let{window:o=document.defaultView,v5Compat:c=!1}=a,u=o.history,f="POP",d=null,m=y();m==null&&(m=0,u.replaceState({...u.state,idx:m},""));function y(){return(u.state||{idx:null}).idx}function v(){f="POP";let S=y(),T=S==null?null:S-m;m=S,d&&d({action:f,location:E.location,delta:T})}function w(S,T){f="PUSH";let j=pS(S)?S:vu(E.location,S,T);m=y()+1;let L=gS(j,m),N=E.createHref(j.mask||j);try{u.pushState(L,"",N)}catch(O){if(O instanceof DOMException&&O.name==="DataCloneError")throw O;o.location.assign(N)}c&&d&&d({action:f,location:E.location,delta:1})}function x(S,T){f="REPLACE";let j=pS(S)?S:vu(E.location,S,T);m=y();let L=gS(j,m),N=E.createHref(j.mask||j);u.replaceState(L,"",N),c&&d&&d({action:f,location:E.location,delta:0})}function C(S){return dT(o,S)}let E={get action(){return f},get location(){return e(o,u)},listen(S){if(d)throw new Error("A history only accepts one active listener");return o.addEventListener(mS,v),d=S,()=>{o.removeEventListener(mS,v),d=null}},createHref(S){return t(o,S)},createURL:C,encodeLocation(S){let T=C(S);return{pathname:T.pathname,search:T.search,hash:T.hash}},push:w,replace:x,go(S){return u.go(S)}};return E}function dT(e,t,i=!1){let a="http://localhost";e&&(a=e.location.origin!=="null"?e.location.origin:e.location.href),vt(a,"No window.location.(origin|href) available to create URL");let o=typeof t=="string"?t:Ar(t);return o=o.replace(/ $/,"%20"),!i&&Sh.test(o)&&(o=a+o),new URL(o,a)}var Xc,yS=class{constructor(e){if(Kc(this,Xc,new Map),e)for(let[t,i]of e)this.set(t,i)}get(e){if(gi(this,Xc).has(e))return gi(this,Xc).get(e);if(e.defaultValue!==void 0)return e.defaultValue;throw new Error("No value found for context")}set(e,t){gi(this,Xc).set(e,t)}};Xc=new WeakMap;var G9=new Set(["lazy","caseSensitive","path","id","index","children"]);function q9(e){return G9.has(e)}var $9=new Set(["lazy","caseSensitive","path","id","index","middleware","children"]);function K9(e){return $9.has(e)}function X9(e){return e.index===!0}function bu(e,t,i=[],a={},o=!1){return e.map((c,u)=>{let f=[...i,String(u)],d=typeof c.id=="string"?c.id:f.join("-");if(vt(c.index!==!0||!c.children,"Cannot specify children on an index route"),vt(o||!a[d],`Found a route id collision on id "${d}". Route id's must be globally unique within Data Router usages`),X9(c)){let m={...c,id:d};return a[d]=vS(m,t(m)),m}else{let m={...c,id:d,children:void 0};return a[d]=vS(m,t(m)),c.children&&(m.children=bu(c.children,t,f,a,o)),m}})}function vS(e,t){return Object.assign(e,{...t,...typeof t.lazy=="object"&&t.lazy!=null?{lazy:{...e.lazy,...t.lazy}}:{}})}function hT(e,t,i="/"){return _i(e,t,i,!1)}function _i(e,t,i,a,o){let c=typeof t=="string"?fa(t):t,u=Ci(c.pathname||"/",i);if(u==null)return null;let f=o??Td(e),d=null,m=ok(u);for(let y=0;d==null&&y{let y={relativePath:m===void 0?u.path||"":m,caseSensitive:u.caseSensitive===!0,childrenIndex:f,route:u};if(y.relativePath.startsWith("/")){if(!y.relativePath.startsWith(a)&&d)return;vt(y.relativePath.startsWith(a),`Absolute route path "${y.relativePath}" nested under path "${a}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),y.relativePath=y.relativePath.slice(a.length)}let v=xi([a,y.relativePath]),w=i.concat(y);u.children&&u.children.length>0&&(vt(u.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${v}".`),mT(u.children,t,w,v,d)),!(u.path==null&&!u.index)&&t.push({path:v,score:ik(v,u.index),routesMeta:w.map((x,C)=>{let[E,S]=yT(x.relativePath,x.caseSensitive,C===w.length-1);return{...x,matcher:E,compiledParams:S}})})};return e.forEach((u,f)=>{if(u.path===""||!u.path?.includes("?"))c(u,f);else for(let d of pT(u.path))c(u,f,!0,d)}),t}function pT(e){let t=e.split("/");if(t.length===0)return[];let[i,...a]=t,o=i.endsWith("?"),c=i.replace(/\?$/,"");if(a.length===0)return o?[c,""]:[c];let u=pT(a.join("/")),f=[];return f.push(...u.map(d=>d===""?c:[c,d].join("/"))),o&&f.push(...u),f.map(d=>e.startsWith("/")&&d===""?"/":d)}function Z9(e){e.sort((t,i)=>t.score!==i.score?i.score-t.score:ak(t.routesMeta.map(a=>a.childrenIndex),i.routesMeta.map(a=>a.childrenIndex)))}var Q9=/^:[\w-]+$/,J9=3,ek=2,tk=1,nk=10,rk=-2,bS=e=>e==="*";function ik(e,t){let i=e.split("/"),a=i.length;return i.some(bS)&&(a+=rk),t&&(a+=ek),i.filter(o=>!bS(o)).reduce((o,c)=>o+(Q9.test(c)?J9:c===""?tk:nk),a)}function ak(e,t){return e.length===t.length&&e.slice(0,-1).every((a,o)=>a===t[o])?e[e.length-1]-t[t.length-1]:0}function sk(e,t,i=!1){let{routesMeta:a}=e,o={},c="/",u=[];for(let f=0;f{if(y==="*"){let C=f[w]||"";u=Al(c.slice(0,c.length-C.length),1)}const x=f[w];return v&&!x?m[y]=void 0:m[y]=(x||"").replace(/%2F/g,"/"),m},{}),pathname:c,pathnameBase:u,pattern:e}}function yT(e,t=!1,i=!0){En(e==="*"||!e.endsWith("*")||e.endsWith("/*"),`Route path "${e}" will be treated as if it were "${e.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${e.replace(/\*$/,"/*")}".`);let a=[],o="^"+e.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(u,f,d,m,y)=>{if(a.push({paramName:f,isOptional:d!=null}),d){let v=y.charAt(m+u.length);return v&&v!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return e.endsWith("*")?(a.push({paramName:"*"}),o+=e==="*"||e==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):i?o+="\\/*$":e!==""&&e!=="/"&&(o+="(?:(?=\\/|$))"),[new RegExp(o,t?void 0:"i"),a]}function ok(e){try{return e.split("/").map(t=>decodeURIComponent(t).replace(/\//g,"%2F")).join("/")}catch(t){return En(!1,`The URL path "${e}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${t}).`),e}}function Ci(e,t){if(t==="/")return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let i=t.endsWith("/")?t.length-1:t.length,a=e.charAt(i);return a&&a!=="/"?null:e.slice(i)||"/"}function lk({basename:e,pathname:t}){return t==="/"?e:xi([e,t])}var Ky=e=>wh.test(e);function ck(e,t="/"){let{pathname:i,search:a="",hash:o=""}=typeof e=="string"?fa(e):e,c;return i?(i=Xy(i),i.startsWith("/")||i.startsWith("\\")?c=xS(i.substring(1),"/"):c=xS(i,t)):c=t,{pathname:c,search:fk(a),hash:dk(o)}}function xS(e,t){let i=Al(t).split("/");return e.split("/").forEach(o=>{o===".."?i.length>1&&i.pop():o!=="."&&i.push(o)}),i.length>1?i.join("/"):"/"}function Sg(e,t,i,a){return`Cannot include a '${e}' character in a manually specified \`to.${t}\` field [${JSON.stringify(a)}]. Please separate it out to the \`to.${i}\` field. Alternatively you may provide the full path as a string in and the router will parse it for you.`}function vT(e){return e.filter((t,i)=>i===0||t.route.path&&t.route.path.length>0)}function Ch(e){let t=vT(e);return t.map((i,a)=>a===t.length-1?i.pathname:i.pathnameBase)}function Ou(e,t,i,a=!1){let o;typeof e=="string"?o=fa(e):(o={...e},vt(!o.pathname||!o.pathname.includes("?"),Sg("?","pathname","search",o)),vt(!o.pathname||!o.pathname.includes("#"),Sg("#","pathname","hash",o)),vt(!o.search||!o.search.includes("#"),Sg("#","search","hash",o)));let c=e===""||o.pathname==="",u=c?"/":o.pathname,f;if(u==null)f=i;else{let v=t.length-1;if(!a&&u.startsWith("..")){let w=u.split("/");for(;w[0]==="..";)w.shift(),v-=1;o.pathname=w.join("/")}f=v>=0?t[v]:"/"}let d=ck(o,f),m=u&&u!=="/"&&u.endsWith("/"),y=(c||u===".")&&i.endsWith("/");return!d.pathname.endsWith("/")&&(m||y)&&(d.pathname+="/"),d}var Xy=e=>e.replace(/[\\/]{2,}/g,"/"),xi=e=>Xy(e.join("/"));function Al(e,t=0){let i=e.length;for(;i>t&&e.charCodeAt(i-1)===47;)i--;return i===e.length?e:e.slice(0,i)}var uk=e=>Al(e).replace(/^\/*/,"/"),fk=e=>!e||e==="?"?"":e.startsWith("?")?e:"?"+e,dk=e=>!e||e==="#"?"":e.startsWith("#")?e:"#"+e,hk=["EvalError","RangeError","ReferenceError","SyntaxError","TypeError","URIError"],Du=class{constructor(e,t,i,a=!1){this.status=e,this.statusText=t||"",this.internal=a,i instanceof Error?(this.data=i.toString(),this.error=i):this.data=i}};function xu(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.internal=="boolean"&&"data"in e}function Lu(e){let t=e.map(i=>i.route.path).filter(Boolean);return xi(t)||"/"}var bT=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function xT(e,t){let i=e;if(typeof i!="string"||!wh.test(i))return{absoluteURL:void 0,isExternal:!1,to:i};let a=i,o=!1;if(bT)try{let c=new URL(window.location.href),u=Sh.test(i)?new URL(fT(i,c.protocol)):new URL(i),f=Ci(u.pathname,t);u.origin===c.origin&&f!=null?i=f+u.search+u.hash:o=!0}catch{En(!1,` contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:a,isExternal:o,to:i}}var Ss=Symbol("Uninstrumented");function mk(e,t){let i={lazy:[],"lazy.loader":[],"lazy.action":[],"lazy.middleware":[],middleware:[],loader:[],action:[]};e.forEach(o=>o({id:t.id,index:t.index,path:t.path,instrument(c){let u=Object.keys(i);for(let f of u)c[f]&&i[f].push(c[f])}}));let a={};if(typeof t.lazy=="function"&&i.lazy.length>0){let o=ul(i.lazy,t.lazy,()=>{});o&&(a.lazy=o)}if(typeof t.lazy=="object"){let o=t.lazy;["middleware","loader","action"].forEach(c=>{let u=o[c],f=i[`lazy.${c}`];if(typeof u=="function"&&f.length>0){let d=ul(f,u,()=>{});d&&(a.lazy=Object.assign(a.lazy||{},{[c]:d}))}})}return["loader","action"].forEach(o=>{let c=t[o];if(typeof c=="function"&&i[o].length>0){let u=c[Ss]??c,f=ul(i[o],u,(...d)=>wS(d[0]));f&&(o==="loader"&&u.hydrate===!0&&(f.hydrate=!0),f[Ss]=u,a[o]=f)}}),t.middleware&&t.middleware.length>0&&i.middleware.length>0&&(a.middleware=t.middleware.map(o=>{let c=o[Ss]??o,u=ul(i.middleware,c,(...f)=>wS(f[0]));return u?(u[Ss]=c,u):o})),a}function pk(e,t){let i={navigate:[],fetch:[]};if(t.forEach(a=>a({instrument(o){let c=Object.keys(o);for(let u of c)o[u]&&i[u].push(o[u])}})),i.navigate.length>0){let a=e.navigate[Ss]??e.navigate,o=ul(i.navigate,a,(...c)=>{let[u,f]=c;return{to:typeof u=="number"||typeof u=="string"?u:u?Ar(u):".",...SS(e,f??{})}});o&&(o[Ss]=a,e.navigate=o)}if(i.fetch.length>0){let a=e.fetch[Ss]??e.fetch,o=ul(i.fetch,a,(...c)=>{let[u,,f,d]=c;return{href:f??".",fetcherKey:u,...SS(e,d??{})}});o&&(o[Ss]=a,e.fetch=o)}return e}function ul(e,t,i){return e.length===0?null:async(...a)=>{let o=await wT(e,i(...a),()=>t(...a),e.length-1);if(o.type==="error")throw o.value;return o.value}}async function wT(e,t,i,a){let o=e[a],c;if(o){let u,f=async()=>(u?console.error("You cannot call instrumented handlers more than once"):u=wT(e,t,i,a-1),c=await u,vt(c,"Expected a result"),c.type==="error"&&c.value instanceof Error?{status:"error",error:c.value}:{status:"success",error:void 0});try{await o(f,t)}catch(d){console.error("An instrumentation function threw an error:",d)}u||await f(),await u}else try{c={type:"success",value:await i()}}catch(u){c={type:"error",value:u}}return c||{type:"error",value:new Error("No result assigned in instrumentation chain.")}}function wS(e){let{request:t,context:i,params:a,pattern:o}=e;return{request:gk(t),params:{...a},pattern:o,context:yk(i)}}function SS(e,t){return{currentUrl:Ar(e.state.location),..."formMethod"in t?{formMethod:t.formMethod}:{},..."formEncType"in t?{formEncType:t.formEncType}:{},..."formData"in t?{formData:t.formData}:{},..."body"in t?{body:t.body}:{}}}function gk(e){return{method:e.method,url:e.url,headers:{get:(...t)=>e.headers.get(...t)}}}function yk(e){if(bk(e)){let t={...e};return Object.freeze(t),t}else return{get:t=>e.get(t)}}var vk=Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function bk(e){if(e===null||typeof e!="object")return!1;const t=Object.getPrototypeOf(e);return t===Object.prototype||t===null||Object.getOwnPropertyNames(t).sort().join("\0")===vk}var CS=new URL("http://localhost");function Wy(e){if(e.createURL)return e.createURL("/");try{return new URL(e.createHref("/"),CS)}catch{return CS}}function Cg(e,t){return e.origin===t.origin&&(e.origin!=="null"||e.protocol===t.protocol&&e.host===t.host)}function xk(e,t){if(e.startsWith("//"))return!0;let i=t.protocol.toLowerCase();return e.toLowerCase().startsWith(i)?t.host===""||e.slice(i.length).startsWith("//"):!1}function hl(e,t,i,a){let o=null;try{o=e==null?null:new URL(e,i)}catch{}let c=new URL(t,i),u=o!=null&&!Cg(o,i),f=!Cg(c,i);if(a==="reject"){if(u||f)throw new Error("External navigation is not allowed")}else if(f&&(o==null||!xk(e,o)||!Cg(o,c)))throw new Error("External navigation is not allowed")}var ST=["POST","PUT","PATCH","DELETE"],wk=new Set(ST),Sk=["GET",...ST],Ck=new Set(Sk),CT=new Set([301,302,303,307,308]),Ek=new Set([307,308]),Eg={state:"idle",location:void 0,matches:void 0,historyAction:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Rk={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},Lc={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},Tk=e=>({hasErrorBoundary:!!e.hasErrorBoundary}),ET="remix-router-transitions",RT=Symbol("ResetLoaderData"),no,tl,bs,nl,Ak=class{constructor(e){Kc(this,no),Kc(this,tl),Kc(this,bs),Kc(this,nl),Qi(this,no,e),Qi(this,tl,Td(e))}get stableRoutes(){return gi(this,no)}get activeRoutes(){return gi(this,bs)??gi(this,no)}get branches(){return gi(this,nl)??gi(this,tl)}get hasHMRRoutes(){return gi(this,bs)!=null}setRoutes(e){Qi(this,no,e),Qi(this,tl,Td(e))}setHmrRoutes(e){Qi(this,bs,e),Qi(this,nl,Td(e))}commitHmrRoutes(){gi(this,bs)&&(Qi(this,no,gi(this,bs)),Qi(this,tl,gi(this,nl)),Qi(this,bs,void 0),Qi(this,nl,void 0))}};no=new WeakMap;tl=new WeakMap;bs=new WeakMap;nl=new WeakMap;function jk(e){const t=e.window?e.window:typeof window<"u"?window:void 0,i=typeof t<"u"&&typeof t.document<"u"&&typeof t.document.createElement<"u";vt(e.routes.length>0,"You must provide a non-empty routes array to createRouter");let a=e.hydrationRouteProperties||[],o=e.mapRouteProperties||Tk,c=o;if(e.instrumentations){let U=e.instrumentations;c=q=>({...o(q),...mk(U.map(te=>te.route).filter(Boolean),q)})}let u={},f=new Ak(bu(e.routes,c,void 0,u)),d=e.basename||"/";d.startsWith("/")||(d=`/${d}`);let m=e.dataStrategy||Dk,y={...e.future},v=null,w=new Set,x=null,C=null,E=null,S=null,T=e.hydrationData!=null,j=_i(f.activeRoutes,e.history.location,d,!1,f.branches),L=!1,N=null,O,P;if(j==null&&!e.patchRoutesOnNavigation){let U=yi(404,{pathname:e.history.location.pathname}),{matches:q,route:te}=Wf(f.activeRoutes);O=!0,P=!O,j=q,N={[te.id]:U}}else if(j&&!e.hydrationData&&tn(j,f.activeRoutes,e.history.location.pathname).active&&(j=null),j)if(j.some(U=>U.route.lazy))O=!1,P=!O;else if(!j.some(U=>Zy(U.route)))O=!0,P=!O;else{let U=e.hydrationData?e.hydrationData.loaderData:null,q=e.hydrationData?e.hydrationData.errors:null,te=j;if(q){let he=j.findIndex(ge=>q[ge.route.id]!==void 0);te=te.slice(0,he+1)}P=!1,O=!0,te.forEach(he=>{let ge=TT(he.route,U,q);P=P||ge.renderFallback,O=O&&!ge.shouldLoad})}else{O=!1,P=!O,j=[];let U=tn(null,f.activeRoutes,e.history.location.pathname);U.active&&U.matches&&(L=!0,j=U.matches)}let k,A={historyAction:e.history.action,location:e.history.location,matches:j,initialized:O,renderFallback:P,navigation:Eg,restoreScrollPosition:e.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:e.hydrationData&&e.hydrationData.loaderData||{},actionData:e.hydrationData&&e.hydrationData.actionData||null,errors:e.hydrationData&&e.hydrationData.errors||N,fetchers:new Map,blockers:new Map},H="POP",Y=null,Z=!1,$,K=!1,ee=new Map,re=null,V=!1,X=!1,Q=new Set,F=new Map,z=0,M=-1,_=new Map,I=new Set,B=new Map,W=new Map,ie=new Set,fe=new Map,pe,ce=null;function Ae(){if(v=e.history.listen(({action:U,location:q,delta:te})=>{if(pe){pe(),pe=void 0;return}En(fe.size===0||te!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let he=dn({currentLocation:A.location,nextLocation:q,historyAction:U});if(he&&te!=null){let ge=new Promise(De=>{pe=De});e.history.go(te*-1),At(he,{state:"blocked",location:q,proceed(){At(he,{state:"proceeding",proceed:void 0,reset:void 0,location:q}),ge.then(()=>e.history.go(te))},reset(){let De=new Map(A.blockers);De.set(he,Lc),Ee({blockers:De})}}),Y?.resolve(),Y=null;return}return Je(U,q)}),i){Qk(t,ee);let U=()=>Jk(t,ee);t.addEventListener("pagehide",U),re=()=>t.removeEventListener("pagehide",U)}return A.initialized||Je("POP",A.location,{initialHydration:!0}),k}function Le(){v&&v(),re&&re(),w.clear(),$&&$.abort(),A.fetchers.forEach((U,q)=>Dt(A.fetchers,q)),A.blockers.forEach((U,q)=>xn(q))}function Se(U){if(w.add(U),x){let{newErrors:q}=x;x=null,U(A,{deletedFetchers:[],newErrors:q,viewTransitionOpts:void 0,flushSync:!1})}return()=>w.delete(U)}function Ee(U,q={}){U.matches&&(U.matches=U.matches.map(ge=>{let De=u[ge.route.id],Re=ge.route;return Re.element!==De.element||Re.errorElement!==De.errorElement||Re.hydrateFallbackElement!==De.hydrateFallbackElement?{...ge,route:De}:ge})),A={...A,...U};let te=[],he=[];A.fetchers.forEach((ge,De)=>{ge.state==="idle"&&(ie.has(De)?te.push(De):he.push(De))}),ie.forEach(ge=>{!A.fetchers.has(ge)&&!F.has(ge)&&te.push(ge)}),w.size===0&&(x={newErrors:U.errors??null}),[...w].forEach(ge=>ge(A,{deletedFetchers:te,newErrors:U.errors??null,viewTransitionOpts:q.viewTransitionOpts,flushSync:q.flushSync===!0})),te.forEach(ge=>Dt(A.fetchers,ge)),he.forEach(ge=>A.fetchers.delete(ge))}function ye(U,q,{flushSync:te}={}){let he=A.actionData!=null&&A.navigation.formMethod!=null&&mr(A.navigation.formMethod)&&A.navigation.state==="loading"&&U.state?._isRedirect!==!0,ge;q.actionData?Object.keys(q.actionData).length>0?ge=q.actionData:ge=null:he?ge=A.actionData:ge=null;let De=q.loaderData?DS(A.loaderData,q.loaderData,q.matches||[],q.errors):A.loaderData,Re=A.blockers;Re.size>0&&(Re=new Map(Re),Re.forEach((_e,nt)=>Re.set(nt,Lc)));let Me=V?!1:ln(U,q.matches||A.matches),ke=Z===!0||A.navigation.formMethod!=null&&mr(A.navigation.formMethod)&&U.state?._isRedirect!==!0;f.commitHmrRoutes(),V||H==="POP"||(H==="PUSH"?e.history.push(U,U.state):H==="REPLACE"&&e.history.replace(U,U.state));let Be;if(H==="POP"&&!V&&U!==A.location){let _e=ee.get(A.location.pathname);_e&&_e.has(U.pathname)?Be={currentLocation:A.location,nextLocation:U}:ee.has(U.pathname)&&(Be={currentLocation:U,nextLocation:A.location})}else if(K){let _e=ee.get(A.location.pathname);_e?_e.add(U.pathname):(_e=new Set([U.pathname]),ee.set(A.location.pathname,_e)),Be={currentLocation:A.location,nextLocation:U}}Ee({...q,actionData:ge,loaderData:De,historyAction:H,location:U,initialized:!0,renderFallback:!1,navigation:Eg,revalidation:"idle",restoreScrollPosition:Me,preventScrollReset:ke,blockers:Re},{viewTransitionOpts:Be,flushSync:te===!0}),H="POP",Z=!1,K=!1,V=!1,X=!1,Y?.resolve(),Y=null,ce?.resolve(),ce=null}async function Pe(U,q){if(Y?.resolve(),Y=null,typeof U=="number"){Y||(Y=zS());let yt=Y.promise;return e.history.go(U),yt}let te=D0(A.location,A.matches,d,U,q?.fromRouteId,q?.relative),{path:he,submission:ge,error:De}=ES(!1,te,q),Re;if(q?.mask){let yt=typeof q.mask=="string"?fa(q.mask):{...A.location.mask,...q.mask};if(Re={pathname:yt.pathname??"",search:yt.search??"",hash:yt.hash??""},Sh.test(Re.pathname))throw new Error("External navigation is not allowed");Re.pathname.startsWith("\\")&&(Re.pathname=Re.pathname.replace(/^\\+/,"/")),hl(typeof q.mask=="string"?q.mask:Ar(q.mask),Ar(Re),e.history.createURL("/"),"reject")}let Me=A.location,ke=vu(Me,he,q&&q.state,void 0,Re);ke={...ke,...e.history.encodeLocation(ke)},hl(U==null?e.history.createHref(A.location):typeof U=="string"?U:Ar(U),e.history.createHref(ke.mask||ke),e.history.createURL("/"),"reject");let Be=q&&q.replace!=null?q.replace:void 0,_e="PUSH";Be===!0?_e="REPLACE":Be===!1||ge!=null&&mr(ge.formMethod)&&ge.formAction===A.location.pathname+A.location.search&&(_e="REPLACE");let nt=q&&"preventScrollReset"in q?q.preventScrollReset===!0:void 0,Ke=(q&&q.flushSync)===!0,dt=dn({currentLocation:Me,nextLocation:ke,historyAction:_e});if(dt){At(dt,{state:"blocked",location:ke,proceed(){At(dt,{state:"proceeding",proceed:void 0,reset:void 0,location:ke}),Pe(U,q)},reset(){let yt=new Map(A.blockers);yt.set(dt,Lc),Ee({blockers:yt})}});return}await Je(_e,ke,{submission:ge,pendingError:De,preventScrollReset:nt,replace:q&&q.replace,enableViewTransition:q&&q.viewTransition,flushSync:Ke,callSiteDefaultShouldRevalidate:q&&q.defaultShouldRevalidate})}function Ge(){ce||(ce=zS()),Te(),Ee({revalidation:"loading"});let U=ce.promise;return A.navigation.state==="submitting"?U:A.navigation.state==="idle"?(Je(A.historyAction,A.location,{startUninterruptedRevalidation:!0}),U):(Je(H||A.historyAction,A.navigation.location,{overrideNavigation:A.navigation,enableViewTransition:K===!0}),U)}async function Je(U,q,te){$&&$.abort(),$=null,H=U,V=(te&&te.startUninterruptedRevalidation)===!0,ft(A.location,A.matches),Z=(te&&te.preventScrollReset)===!0,K=(te&&te.enableViewTransition)===!0;let he=f.activeRoutes,ge=te?.initialHydration&&A.matches&&A.matches.length>0&&!L?A.matches:_i(he,q,d,!1,f.branches),De=(te&&te.flushSync)===!0;if(ge&&A.initialized&&!X&&Hk(A.location,q)&&!(te&&te.submission&&mr(te.submission.formMethod))){ye(q,{matches:ge},{flushSync:De});return}let Re=tn(ge,he,q.pathname);if(Re.active&&Re.matches&&(ge=Re.matches),!ge){let{error:ht,notFoundMatches:mt,route:Yt}=zt(q.pathname);ye(q,{matches:mt,loaderData:{},errors:{[Yt.id]:ht}},{flushSync:De});return}let Me=te&&te.overrideNavigation?{...te.overrideNavigation,matches:ge,historyAction:U}:void 0;$=new AbortController;let ke=rl(e.history,q,$.signal,te&&te.submission),Be=e.getContext?await e.getContext():new yS,_e;if(te&&te.pendingError)_e=[xs(ge).route.id,{type:"error",error:te.pendingError}];else if(te&&te.submission&&mr(te.submission.formMethod)){let ht=await rt(ke,q,te.submission,ge,U,Be,Re.active,te&&te.initialHydration===!0,{replace:te.replace,flushSync:De});if(ht.shortCircuited)return;if(ht.pendingActionResult){let[mt,Yt]=ht.pendingActionResult;if(Qr(Yt)&&xu(Yt.error)&&Yt.error.status===404){$=null,ye(q,{matches:ht.matches,loaderData:{},errors:{[mt]:Yt.error}});return}}ge=ht.matches||ge,_e=ht.pendingActionResult,Me=Rg(q,ge,U,te.submission),De=!1,Re.active=!1,ke=rl(e.history,ke.url,ke.signal)}let{shortCircuited:nt,matches:Ke,loaderData:dt,errors:yt,workingFetchers:Ft}=await Oe(ke,q,ge,U,Be,Re.active,Me,te&&te.submission,te&&te.fetcherSubmission,te&&te.replace,te&&te.initialHydration===!0,De,_e,te&&te.callSiteDefaultShouldRevalidate);nt||($=null,ye(q,{matches:Ke||ge,...LS(_e),loaderData:dt,errors:yt,...Ft?{fetchers:Ft}:{}}))}async function rt(U,q,te,he,ge,De,Re,Me,ke={}){Te();let Be=Wk(q,he,ge,te);if(Ee({navigation:Be},{flushSync:ke.flushSync===!0}),Re){let Ke=await It(he,q.pathname,U.signal);if(Ke.type==="aborted")return{shortCircuited:!0};if(Ke.type==="error"){if(Ke.partialMatches.length===0){let{matches:yt,route:Ft}=Wf(f.activeRoutes);return{matches:yt,pendingActionResult:[Ft.id,{type:"error",error:Ke.error}]}}let dt=xs(Ke.partialMatches).route.id;return{matches:Ke.partialMatches,pendingActionResult:[dt,{type:"error",error:Ke.error}]}}else if(Ke.matches)he=Ke.matches;else{let{notFoundMatches:dt,error:yt,route:Ft}=zt(q.pathname);return{matches:dt,pendingActionResult:[Ft.id,{type:"error",error:yt}]}}}let _e,nt=Ad(he,q);if(!nt.route.action&&!nt.route.lazy)_e={type:"error",error:yi(405,{method:U.method,pathname:q.pathname,routeId:nt.route.id})};else{let Ke=ml(c,u,U,q,he,nt,Me?[]:a,De),dt=await be(U,q,Ke,De,null);if(_e=dt[nt.route.id],!_e){for(let yt of he)if(dt[yt.route.id]){_e=dt[yt.route.id];break}}if(U.signal.aborted)return{shortCircuited:!0}}if(so(_e)){let Ke;return ke&&ke.replace!=null?Ke=ke.replace:Ke=NS(_e.response.headers.get("Location"),new URL(U.url),d,e.history)===A.location.pathname+A.location.search,await ue(U,_e,!0,{submission:te,replace:Ke}),{shortCircuited:!0}}if(Qr(_e)){let Ke=xs(he,nt.route.id);return(ke&&ke.replace)!==!0&&(H="PUSH"),{matches:he,pendingActionResult:[Ke.route.id,_e,nt.route.id]}}return{matches:he,pendingActionResult:[nt.route.id,_e]}}async function Oe(U,q,te,he,ge,De,Re,Me,ke,Be,_e,nt,Ke,dt){let yt=Re||Rg(q,te,he,Me),Ft=Me||ke||_S(yt),ht=!V&&!_e;if(De){if(ht){let $t=Xe(Ke);Ee({navigation:yt,...$t!==void 0?{actionData:$t}:{}},{flushSync:nt})}let it=await It(te,q.pathname,U.signal);if(it.type==="aborted")return{shortCircuited:!0};if(it.type==="error"){if(it.partialMatches.length===0){let{matches:nr,route:ai}=Wf(f.activeRoutes);return{matches:nr,loaderData:{},errors:{[ai.id]:it.error}}}let $t=xs(it.partialMatches).route.id;return{matches:it.partialMatches,loaderData:{},errors:{[$t]:it.error}}}else if(it.matches)te=it.matches;else{let{error:$t,notFoundMatches:nr,route:ai}=zt(q.pathname);return{matches:nr,loaderData:{},errors:{[ai.id]:$t}}}}let mt=f.activeRoutes,{dsMatches:Yt,revalidatingFetchers:ot}=RS(U,ge,c,u,e.history,A,te,Ft,q,_e?[]:a,_e===!0,X,Q,ie,B,I,mt,d,e.patchRoutesOnNavigation!=null,f.branches,Ke,dt);if(M=++z,!e.dataStrategy&&!Yt.some(it=>it.shouldLoad)&&!Yt.some(it=>it.route.middleware&&it.route.middleware.length>0)&&ot.length===0){let it=new Map(A.fetchers),$t=gn(it);return ye(q,{matches:te,loaderData:{},errors:Ke&&Qr(Ke[1])?{[Ke[0]]:Ke[1].error}:null,...LS(Ke),...$t?{fetchers:it}:{}},{flushSync:nt}),{shortCircuited:!0}}if(ht){let it={};if(!De){it.navigation=yt;let $t=Xe(Ke);$t!==void 0&&(it.actionData=$t)}ot.length>0&&(it.fetchers=je(ot)),Ee(it,{flushSync:nt})}ot.forEach(it=>{Gt(it.key),it.controller&&F.set(it.key,it.controller)});let zr=()=>ot.forEach(it=>Gt(it.key));$&&$.signal.addEventListener("abort",zr);let{loaderResults:yn,fetcherResults:Dn}=await We(Yt,ot,U,q,ge);if(U.signal.aborted)return{shortCircuited:!0};$&&$.signal.removeEventListener("abort",zr),ot.forEach(it=>F.delete(it.key));let Wn=Zf(yn);if(Wn)return await ue(U,Wn.result,!0,{replace:Be}),{shortCircuited:!0};if(Wn=Zf(Dn),Wn)return I.add(Wn.key),await ue(U,Wn.result,!0,{replace:Be}),{shortCircuited:!0};let In=new Map(A.fetchers),{loaderData:ma,errors:dr}=OS(A,te,yn,Ke,ot,Dn,In);_e&&A.errors&&(dr={...A.errors,...dr});let Ti=gn(In),br=$n(M,In),Ai=Ti||br||ot.length>0;return{matches:te,loaderData:ma,errors:dr,...Ai?{workingFetchers:In}:{}}}function Xe(U){if(U&&!Qr(U[1]))return{[U[0]]:U[1].data};if(A.actionData)return Object.keys(A.actionData).length===0?null:A.actionData}function je(U){let q=new Map(A.fetchers);return U.forEach(te=>{let he=q.get(te.key),ge=Pc(void 0,he?he.data:void 0);q.set(te.key,ge)}),q}async function tt(U,q,te,he){Gt(U);let ge=(he&&he.flushSync)===!0,De=f.activeRoutes,Re=D0(A.location,A.matches,d,te,q,he?.relative),Me=_i(De,Re,d,!1,f.branches),ke=tn(Me,De,Re);if(ke.active&&ke.matches&&(Me=ke.matches),!Me){wt(U,q,yi(404,{pathname:Re}),{flushSync:ge});return}let{path:Be,submission:_e,error:nt}=ES(!0,Re,he);if(nt){wt(U,q,nt,{flushSync:ge});return}let Ke=e.getContext?await e.getContext():new yS,dt=(he&&he.preventScrollReset)===!0;if(_e&&mr(_e.formMethod)){await Tt(U,q,Be,Me,Ke,ke.active,ge,dt,_e,he&&he.defaultShouldRevalidate);return}B.set(U,{routeId:q,path:Be}),await st(U,q,Be,Me,Ke,ke.active,ge,dt,_e)}async function Tt(U,q,te,he,ge,De,Re,Me,ke,Be){Te(),B.delete(U);let _e=A.fetchers.get(U);Ne(U,Zk(ke,_e),{flushSync:Re});let nt=new AbortController,Ke=rl(e.history,te,nt.signal,ke);if(De){let xe=await It(he,new URL(Ke.url).pathname,Ke.signal,U);if(xe.type==="aborted")return;if(xe.type==="error"){wt(U,q,xe.error,{flushSync:Re});return}else if(xe.matches)he=xe.matches;else{wt(U,q,yi(404,{pathname:te}),{flushSync:Re});return}}let dt=Ad(he,te);if(!dt.route.action&&!dt.route.lazy){let xe=yi(405,{method:ke.formMethod,pathname:te,routeId:q});wt(U,q,xe,{flushSync:Re});return}F.set(U,nt);let yt=z,Ft=ml(c,u,Ke,te,he,dt,a,ge),ht=await be(Ke,te,Ft,ge,U),mt=ht[dt.route.id];if(!mt){for(let xe of Ft)if(ht[xe.route.id]){mt=ht[xe.route.id];break}}if(Ke.signal.aborted){F.get(U)===nt&&F.delete(U);return}if(ie.has(U)){if(so(mt)||Qr(mt)){Ne(U,ta(void 0));return}}else{if(so(mt))if(F.delete(U),M>yt){Ne(U,ta(void 0));return}else return I.add(U),Ne(U,Pc(ke)),ue(Ke,mt,!1,{fetcherSubmission:ke,preventScrollReset:Me});if(Qr(mt)){wt(U,q,mt.error);return}}let Yt=A.navigation.location||A.location,ot=rl(e.history,Yt,nt.signal),zr=f.activeRoutes,yn=A.navigation.state!=="idle"?_i(zr,A.navigation.location,d,!1,f.branches):A.matches;vt(yn,"Didn't find any matches after fetcher action");let Dn=++z;_.set(U,Dn);let{dsMatches:Wn,revalidatingFetchers:In}=RS(ot,ge,c,u,e.history,A,yn,ke,Yt,a,!1,X,Q,ie,B,I,zr,d,e.patchRoutesOnNavigation!=null,f.branches,[dt.route.id,mt],Be),ma=Pc(ke,mt.data),dr=new Map(A.fetchers);dr.set(U,ma),In.filter(xe=>xe.key!==U).forEach(xe=>{let Ue=xe.key,qe=dr.get(Ue),et=Pc(void 0,qe?qe.data:void 0);dr.set(Ue,et),Gt(Ue),xe.controller&&F.set(Ue,xe.controller)}),Ee({fetchers:dr});let Ti=()=>In.forEach(xe=>Gt(xe.key));nt.signal.addEventListener("abort",Ti);let{loaderResults:br,fetcherResults:Ai}=await We(Wn,In,ot,Yt,ge);if(nt.signal.aborted)return;nt.signal.removeEventListener("abort",Ti),_.delete(U),F.delete(U),In.forEach(xe=>F.delete(xe.key));let it=A.fetchers.has(U),$t=xe=>{if(!it)return xe;let Ue=new Map(xe.fetchers);return Ue.set(U,ta(mt.data)),{...xe,fetchers:Ue}},nr=Zf(br);if(nr)return A=$t(A),ue(ot,nr.result,!1,{preventScrollReset:Me});if(nr=Zf(Ai),nr)return I.add(nr.key),A=$t(A),ue(ot,nr.result,!1,{preventScrollReset:Me});let ai=new Map(A.fetchers);it&&ai.set(U,ta(mt.data));let{loaderData:oe,errors:Ce}=OS(A,yn,br,void 0,In,Ai,ai);$n(Dn,ai),A.navigation.state==="loading"&&Dn>M?(vt(H,"Expected pending action"),$&&$.abort(),ye(A.navigation.location,{matches:yn,loaderData:oe,errors:Ce,fetchers:ai})):(Ee({errors:Ce,loaderData:DS(A.loaderData,oe,yn,Ce),fetchers:ai}),X=!1)}async function st(U,q,te,he,ge,De,Re,Me,ke){let Be=A.fetchers.get(U);Ne(U,Pc(ke,Be?Be.data:void 0),{flushSync:Re});let _e=new AbortController,nt=rl(e.history,te,_e.signal);if(De){let mt=await It(he,new URL(nt.url).pathname,nt.signal,U);if(mt.type==="aborted")return;if(mt.type==="error"){wt(U,q,mt.error,{flushSync:Re});return}else if(mt.matches)he=mt.matches;else{wt(U,q,yi(404,{pathname:te}),{flushSync:Re});return}}let Ke=Ad(he,te);F.set(U,_e);let dt=z,yt=ml(c,u,nt,te,he,Ke,a,ge),Ft=await be(nt,te,yt,ge,U),ht=Ft[Ke.route.id];if(!ht){for(let mt of he)if(Ft[mt.route.id]){ht=Ft[mt.route.id];break}}if(F.get(U)===_e&&F.delete(U),!nt.signal.aborted){if(ie.has(U)){Ne(U,ta(void 0));return}if(so(ht))if(M>dt){Ne(U,ta(void 0));return}else{I.add(U),await ue(nt,ht,!1,{preventScrollReset:Me});return}if(Qr(ht)){wt(U,q,ht.error);return}Ne(U,ta(ht.data))}}async function ue(U,q,te,{submission:he,fetcherSubmission:ge,preventScrollReset:De,replace:Re}={}){te||(Y?.resolve(),Y=null),q.response.headers.has("X-Remix-Revalidate")&&(X=!0);let Me=q.response.headers.get("Location");vt(Me,"Expected a Location header on the redirect Response");let ke=Me,Be=new URL(U.url);Me=NS(Me,Be,d,e.history),hl(ke,Me,Be,"allow-explicit");let _e=vu(A.location,Me,{_isRedirect:!0});if(i){let ht=!1;if(q.response.headers.has("X-Remix-Reload-Document"))ht=!0;else if(Ky(Me)){const mt=dT(t,Me,!0);ht=mt.origin!==t.location.origin||Ci(mt.pathname,d)==null}if(ht){Re?t.location.replace(Me):t.location.assign(Me);return}}$=null;let nt=Re===!0||q.response.headers.has("X-Remix-Replace")?"REPLACE":"PUSH",{formMethod:Ke,formAction:dt,formEncType:yt}=A.navigation;!he&&!ge&&Ke&&dt&&yt&&(he=_S(A.navigation));let Ft=he||ge;if(Ek.has(q.response.status)&&Ft&&mr(Ft.formMethod))await Je(nt,_e,{submission:{...Ft,formAction:Me},preventScrollReset:De||Z,enableViewTransition:te?K:void 0});else{let ht=Rg(_e,[],nt,he);await Je(nt,_e,{overrideNavigation:ht,fetcherSubmission:ge,preventScrollReset:De||Z,enableViewTransition:te?K:void 0})}}async function be(U,q,te,he,ge){let De,Re={};try{De=await Pk(m,U,q,te,ge,he,!1)}catch(Me){return te.filter(ke=>ke.shouldLoad).forEach(ke=>{Re[ke.route.id]={type:"error",error:Me}}),Re}if(U.signal.aborted)return Re;if(!mr(U.method))for(let Me of te){if(De[Me.route.id]?.type==="error")break;!De.hasOwnProperty(Me.route.id)&&!A.loaderData.hasOwnProperty(Me.route.id)&&(!A.errors||!A.errors.hasOwnProperty(Me.route.id))&&Me.shouldCallHandler()&&(De[Me.route.id]={type:"error",result:new Error(`No result returned from dataStrategy for route ${Me.route.id}`)})}for(let[Me,ke]of Object.entries(De))if(qk(ke)){let Be=ke.result;Re[Me]={type:"redirect",response:Uk(Be,U,Me,te,d)}}else Re[Me]=await Vk(ke);return Re}async function We(U,q,te,he,ge){let De=be(te,he,U,ge,null),Re=Promise.all(q.map(async Be=>{if(Be.matches&&Be.match&&Be.request&&Be.controller){let nt=(await be(Be.request,Be.path,Be.matches,ge,Be.key))[Be.match.route.id];return{[Be.key]:nt}}else return Promise.resolve({[Be.key]:{type:"error",error:yi(404,{pathname:Be.path})}})})),Me=await De,ke=(await Re).reduce((Be,_e)=>Object.assign(Be,_e),{});return{loaderResults:Me,fetcherResults:ke}}function Te(){X=!0,B.forEach((U,q)=>{F.has(q)&&Q.add(q),Gt(q)})}function Ne(U,q,te={}){let he=new Map(A.fetchers);he.set(U,q),Ee({fetchers:he},{flushSync:(te&&te.flushSync)===!0})}function wt(U,q,te,he={}){let ge=xs(A.matches,q),De=new Map(A.fetchers);Dt(De,U),Ee({errors:{[ge.route.id]:te},fetchers:De},{flushSync:(he&&he.flushSync)===!0})}function Pt(U){return W.set(U,(W.get(U)||0)+1),ie.has(U)&&ie.delete(U),A.fetchers.get(U)||Rk}function St(U,q){Gt(U,q?.reason),Ne(U,ta(null))}function Dt(U,q){let te=A.fetchers.get(q);F.has(q)&&!(te&&te.state==="loading"&&_.has(q))&&Gt(q),B.delete(q),_.delete(q),I.delete(q),ie.delete(q),Q.delete(q),U.delete(q)}function _t(U){let q=(W.get(U)||0)-1;q<=0?(W.delete(U),ie.add(U)):W.set(U,q),Ee({fetchers:new Map(A.fetchers)})}function Gt(U,q){let te=F.get(U);te&&(te.abort(q),F.delete(U))}function qt(U,q){for(let te of U){let he=q.get(te);vt(he,`Expected fetcher: ${te}`);let ge=ta(he.data);q.set(te,ge)}}function gn(U){let q=[],te=!1;for(let he of I){let ge=U.get(he);vt(ge,`Expected fetcher: ${he}`),ge.state==="loading"&&(I.delete(he),q.push(he),te=!0)}return qt(q,U),te}function $n(U,q){let te=[];for(let[he,ge]of _)if(ge0}function Kn(U,q){let te=A.blockers.get(U)||Lc;return fe.get(U)!==q&&fe.set(U,q),te}function xn(U){A.blockers.delete(U),fe.delete(U)}function At(U,q){let te=A.blockers.get(U)||Lc;vt(te.state==="unblocked"&&q.state==="blocked"||te.state==="blocked"&&q.state==="blocked"||te.state==="blocked"&&q.state==="proceeding"||te.state==="blocked"&&q.state==="unblocked"||te.state==="proceeding"&&q.state==="unblocked",`Invalid blocker state transition: ${te.state} -> ${q.state}`);let he=new Map(A.blockers);he.set(U,q),Ee({blockers:he})}function dn({currentLocation:U,nextLocation:q,historyAction:te}){if(fe.size===0)return;fe.size>1&&En(!1,"A router only supports one blocker at a time");let he=Array.from(fe.entries()),[ge,De]=he[he.length-1],Re=A.blockers.get(ge);if(!(Re&&Re.state==="proceeding")&&De({currentLocation:U,nextLocation:q,historyAction:te}))return ge}function zt(U){let q=yi(404,{pathname:U}),te=f.activeRoutes,{matches:he,route:ge}=Wf(te);return{notFoundMatches:he,route:ge,error:q}}function On(U,q,te){if(C=U,S=q,E=te||null,!T&&A.navigation===Eg){T=!0;let he=ln(A.location,A.matches);he!=null&&Ee({restoreScrollPosition:he})}return()=>{C=null,S=null,E=null}}function Un(U,q){return E&&E(U,q.map(he=>W9(he,A.loaderData)))||U.key}function ft(U,q){if(C&&S){let te=Un(U,q);C[te]=S()}}function ln(U,q){if(C){let te=Un(U,q),he=C[te];if(typeof he=="number")return he}return null}function tn(U,q,te){if(e.patchRoutesOnNavigation){let he=f.branches;if(U){if(Object.keys(U[0].params).length>0)return{active:!0,matches:_i(q,te,d,!0,he)}}else return{active:!0,matches:_i(q,te,d,!0,he)||[]}}return{active:!1,matches:null}}async function It(U,q,te,he){if(!e.patchRoutesOnNavigation)return{type:"success",matches:U};let ge=U;for(;;){let De=u;try{await e.patchRoutesOnNavigation({signal:te,path:q,matches:ge,fetcherKey:he,patch:(Be,_e)=>{te.aborted||TS(Be,_e,f,De,c,!1)}})}catch(Be){return{type:"error",error:Be,partialMatches:ge}}if(te.aborted)return{type:"aborted"};let Re=f.branches,Me=_i(f.activeRoutes,q,d,!1,Re),ke=null;if(Me){if(Object.keys(Me[0].params).length===0)return{type:"success",matches:Me};if(ke=_i(f.activeRoutes,q,d,!0,Re),!(ke&&ge.lengthte.route.id===q[he].route.id)}function hn(U){u={},f.setHmrRoutes(bu(U,c,void 0,u))}function Xn(U,q,te=!1){TS(U,q,f,u,c,te),f.hasHMRRoutes||Ee({})}return k={get basename(){return d},get future(){return y},get state(){return A},get routes(){return f.stableRoutes},get branches(){return f.branches},get manifest(){return u},get window(){return t},initialize:Ae,subscribe:Se,enableScrollRestoration:On,navigate:Pe,fetch:tt,revalidate:Ge,createHref:U=>e.history.createHref(U),createURL:U=>e.history.createURL(U),encodeLocation:U=>e.history.encodeLocation(U),getFetcher:Pt,resetFetcher:St,deleteFetcher:_t,dispose:Le,getBlocker:Kn,deleteBlocker:xn,patchRoutes:Xn,_internalFetchControllers:F,_internalSetRoutes:hn,_internalSetStateDoNotUseOrYouWillBreakYourApp(U){Ee(U)}},e.instrumentations&&(k=pk(k,e.instrumentations.map(U=>U.router).filter(Boolean))),k}function Mk(e){return e!=null&&("formData"in e&&e.formData!=null||"body"in e&&e.body!==void 0)}function D0(e,t,i,a,o,c){let u,f;if(o){u=[];for(let m of t)if(u.push(m),m.route.id===o){f=m;break}}else u=t,f=t[t.length-1];let d=Ou(a||".",Ch(u),Ci(e.pathname,i)||e.pathname,c==="path");if(a==null&&(d.search=e.search,d.hash=e.hash),(a==null||a===""||a===".")&&f){let m=Jy(d.search);if(f.route.index&&!m)d.search=d.search?d.search.replace(/^\?/,"?index&"):"?index";else if(!f.route.index&&m){let y=new URLSearchParams(d.search),v=y.getAll("index");y.delete("index"),v.filter(x=>x).forEach(x=>y.append("index",x));let w=y.toString();d.search=w?`?${w}`:""}}return i!=="/"&&(d.pathname=lk({basename:i,pathname:d.pathname})),Ar(d)}function ES(e,t,i){if(!i||!Mk(i))return{path:t};if(i.formMethod&&!Xk(i.formMethod))return{path:t,error:yi(405,{method:i.formMethod})};let a=()=>({path:t,error:yi(400,{type:"invalid-body"})}),c=(i.formMethod||"get").toUpperCase(),u=DT(t);if(i.body!==void 0){if(i.formEncType==="text/plain"){if(!mr(c))return a();let v=typeof i.body=="string"?i.body:i.body instanceof FormData||i.body instanceof URLSearchParams?Array.from(i.body.entries()).reduce((w,[x,C])=>`${w}${x}=${C} +`,""):String(i.body);return{path:t,submission:{formMethod:c,formAction:u,formEncType:i.formEncType,formData:void 0,json:void 0,text:v}}}else if(i.formEncType==="application/json"){if(!mr(c))return a();try{let v=typeof i.body=="string"?JSON.parse(i.body):i.body;return{path:t,submission:{formMethod:c,formAction:u,formEncType:i.formEncType,formData:void 0,json:v,text:void 0}}}catch{return a()}}}vt(typeof FormData=="function","FormData is not available in this environment");let f,d;if(i.formData)f=_0(i.formData),d=i.formData;else if(i.body instanceof FormData)f=_0(i.body),d=i.body;else if(i.body instanceof URLSearchParams)f=i.body,d=kS(f);else if(i.body==null)f=new URLSearchParams,d=new FormData;else try{f=new URLSearchParams(i.body),d=kS(f)}catch{return a()}let m={formMethod:c,formAction:u,formEncType:i&&i.formEncType||"application/x-www-form-urlencoded",formData:d,json:void 0,text:void 0};if(mr(m.formMethod))return{path:t,submission:m};let y=fa(t);return e&&y.search&&Jy(y.search)&&f.append("index",""),y.search=`?${f}`,{path:Ar(y),submission:m}}function RS(e,t,i,a,o,c,u,f,d,m,y,v,w,x,C,E,S,T,j,L,N,O){let P=N?Qr(N[1])?N[1].error:N[1].data:void 0,k=o.createURL(c.location),A=o.createURL(d),H;if(y&&c.errors){let V=Object.keys(c.errors)[0];H=u.findIndex(X=>X.route.id===V)}else if(N&&Qr(N[1])){let V=N[0];H=u.findIndex(X=>X.route.id===V)-1}let Y=N?N[1].statusCode:void 0,Z=Y&&Y>=400,$={currentUrl:k,currentParams:c.matches[0]?.params||{},nextUrl:A,nextParams:u[0].params,...f,actionResult:P,actionStatus:Y},K=Lu(u),ee=u.map((V,X)=>{let{route:Q}=V,F=null;if(H!=null&&X>H)F=!1;else if(Q.lazy)F=!0;else if(!Zy(Q))F=!1;else if(y){let{shouldLoad:I}=TT(Q,c.loaderData,c.errors);F=I}else Nk(c.loaderData,c.matches[X],V)&&(F=!0);if(F!==null)return L0(i,a,e,d,K,V,m,t,F);let z=!1;typeof O=="boolean"?z=O:Z?z=!1:(v||k.pathname+k.search===A.pathname+A.search||k.search!==A.search||kk(c.matches[X],V))&&(z=!0);let M={...$,defaultShouldRevalidate:z},_=tu(V,M);return L0(i,a,e,d,K,V,m,t,_,M,O)}),re=[];return C.forEach((V,X)=>{if(y||!u.some(W=>W.route.id===V.routeId)||x.has(X))return;let Q=c.fetchers.get(X),F=Q&&Q.state!=="idle"&&Q.data===void 0,z=_i(S,V.path,T??"/",!1,L);if(!z){if(j&&F)return;re.push({key:X,routeId:V.routeId,path:V.path,matches:null,match:null,request:null,controller:null});return}if(E.has(X))return;let M=Ad(z,V.path),_=new AbortController,I=rl(o,V.path,_.signal),B=null;if(w.has(X))w.delete(X),B=ml(i,a,I,V.path,z,M,m,t);else if(F)v&&(B=ml(i,a,I,V.path,z,M,m,t));else{let W;typeof O=="boolean"?W=O:Z?W=!1:W=v;let ie={...$,defaultShouldRevalidate:W};tu(M,ie)&&(B=ml(i,a,I,V.path,z,M,m,t,ie))}B&&re.push({key:X,routeId:V.routeId,path:V.path,matches:B,match:M,request:I,controller:_})}),{dsMatches:ee,revalidatingFetchers:re}}function Zy(e){return e.loader!=null||e.middleware!=null&&e.middleware.length>0}function TT(e,t,i){if(e.lazy)return{shouldLoad:!0,renderFallback:!0};if(!Zy(e))return{shouldLoad:!1,renderFallback:!1};let a=t!=null&&e.id in t,o=i!=null&&i[e.id]!==void 0;if(!a&&o)return{shouldLoad:!1,renderFallback:!1};if(typeof e.loader=="function"&&e.loader.hydrate===!0)return{shouldLoad:!0,renderFallback:!a};let c=!a&&!o;return{shouldLoad:c,renderFallback:c}}function Nk(e,t,i){let a=!t||i.route.id!==t.route.id,o=!e.hasOwnProperty(i.route.id);return a||o}function kk(e,t){let i=e.route.path;return e.pathname!==t.pathname||i!=null&&i.endsWith("*")&&e.params["*"]!==t.params["*"]}function tu(e,t){if(e.route.shouldRevalidate){let i=e.route.shouldRevalidate(t);if(typeof i=="boolean")return i}return t.defaultShouldRevalidate}function TS(e,t,i,a,o,c){let u;if(e){let m=a[e];vt(m,`No route found to patch children into: routeId = ${e}`),m.children||(m.children=[]),u=m.children}else u=i.activeRoutes;let f=[],d=[];if(t.forEach(m=>{let y=u.find(v=>AT(m,v));y?d.push({existingRoute:y,newRoute:m}):f.push(m)}),f.length>0){let m=bu(f,o,[e||"_","patch",String(u?.length||"0")],a);u.push(...m)}if(c&&d.length>0)for(let m=0;mt.children?.some(o=>AT(i,o)))??!1:!1}var AS=new WeakMap,jT=({key:e,route:t,manifest:i,mapRouteProperties:a})=>{let o=i[t.id];if(vt(o,"No route found in manifest"),!o.lazy||typeof o.lazy!="object")return;let c=o.lazy[e];if(!c)return;let u=AS.get(o);u||(u={},AS.set(o,u));let f=u[e];if(f)return f;let d=(async()=>{let m=q9(e),v=o[e]!==void 0&&e!=="hasErrorBoundary";if(m)En(!m,"Route property "+e+" is not a supported lazy route property. This property will be ignored."),u[e]=Promise.resolve();else if(v)En(!1,`Route "${o.id}" has a static property "${e}" defined. The lazy property will be ignored.`);else{let w=await c();w!=null&&(Object.assign(o,{[e]:w}),Object.assign(o,a(o)))}typeof o.lazy=="object"&&(o.lazy[e]=void 0,Object.values(o.lazy).every(w=>w===void 0)&&(o.lazy=void 0))})();return u[e]=d,d},jS=new WeakMap;function Ok(e,t,i,a,o){let c=i[e.id];if(vt(c,"No route found in manifest"),!e.lazy)return{lazyRoutePromise:void 0,lazyHandlerPromise:void 0};if(typeof e.lazy=="function"){let y=jS.get(c);if(y)return{lazyRoutePromise:y,lazyHandlerPromise:y};let v=(async()=>{vt(typeof e.lazy=="function","No lazy route function found");let w=await e.lazy(),x={};for(let C in w){let E=w[C];if(E===void 0)continue;let S=K9(C),j=c[C]!==void 0&&C!=="hasErrorBoundary";S?En(!S,"Route property "+C+" is not a supported property to be returned from a lazy route function. This property will be ignored."):j?En(!j,`Route "${c.id}" has a static property "${C}" defined but its lazy function is also returning a value for this property. The lazy route property "${C}" will be ignored.`):x[C]=E}Object.assign(c,x),Object.assign(c,{...a(c),lazy:void 0})})();return jS.set(c,v),v.catch(()=>{}),{lazyRoutePromise:v,lazyHandlerPromise:v}}let u=Object.keys(e.lazy),f=[],d;for(let y of u){if(o&&o.includes(y))continue;let v=jT({key:y,route:e,manifest:i,mapRouteProperties:a});v&&(f.push(v),y===t&&(d=v))}let m=f.length>0?Promise.all(f).then(()=>{}):void 0;return m?.catch(()=>{}),d?.catch(()=>{}),{lazyRoutePromise:m,lazyHandlerPromise:d}}async function MS(e){let t=e.matches.filter(o=>o.shouldLoad),i={};return(await Promise.all(t.map(o=>o.resolve()))).forEach((o,c)=>{i[t[c].route.id]=o}),i}async function Dk(e){return e.matches.some(t=>t.route.middleware)?MT(e,()=>MS(e)):MS(e)}function MT(e,t){return Lk(e,t,a=>{if(Kk(a))throw a;return a},Yk,i);function i(a,o,c){if(c)return Promise.resolve(Object.assign(c.value,{[o]:{type:"error",result:a}}));{let{matches:u}=e,f=Math.min(Math.max(u.findIndex(m=>m.route.id===o),0),Math.max(u.findIndex(m=>m.shouldCallHandler()),0)),d=xs(u,u[f].route.id).route.id;return Promise.resolve({[d]:{type:"error",result:a}})}}}async function Lk(e,t,i,a,o){let{matches:c,...u}=e,f=c.flatMap(m=>m.route.middleware?m.route.middleware.map(y=>[m.route.id,y]):[]);return await NT(u,f,t,i,a,o)}async function NT(e,t,i,a,o,c,u=0){let{request:f}=e;if(f.signal.aborted)throw f.signal.reason??new Error(`Request aborted: ${f.method} ${f.url}`);let d=t[u];if(!d)return await i();let[m,y]=d,v,w=async()=>{if(v)throw new Error("You may only call `next()` once per middleware");try{return v={value:await NT(e,t,i,a,o,c,u+1)},v.value}catch(x){return v={value:await c(x,m,v)},v.value}};try{let x=await y(e,w),C=x!=null?a(x):void 0;return o(C)?C:v?C??v.value:(v={value:await w()},v.value)}catch(x){return await c(x,m,v)}}function kT(e,t,i,a,o){let c=jT({key:"middleware",route:a.route,manifest:t,mapRouteProperties:e}),u=Ok(a.route,mr(i.method)?"action":"loader",t,e,o);return{middleware:c,route:u.lazyRoutePromise,handler:u.lazyHandlerPromise}}function L0(e,t,i,a,o,c,u,f,d,m=null,y){let v=!1,w=kT(e,t,i,c,u);return{...c,_lazyPromises:w,shouldLoad:d,shouldRevalidateArgs:m,shouldCallHandler(x){return v=!0,m?typeof y=="boolean"?tu(c,{...m,defaultShouldRevalidate:y}):typeof x=="boolean"?tu(c,{...m,defaultShouldRevalidate:x}):tu(c,m):d},resolve(x){let{lazy:C,loader:E,middleware:S}=c.route,T=v||d||x&&!mr(i.method)&&(C||E),j=S&&S.length>0&&!E&&!C;return T&&(mr(i.method)||!j)?_k({request:i,path:a,pattern:o,match:c,lazyHandlerPromise:w?.handler,lazyRoutePromise:w?.route,handlerOverride:x,scopedContext:f}):Promise.resolve({type:"data",result:void 0})}}}function ml(e,t,i,a,o,c,u,f,d=null){return o.map(m=>m.route.id!==c.route.id?{...m,shouldLoad:!1,shouldRevalidateArgs:d,shouldCallHandler:()=>!1,_lazyPromises:kT(e,t,i,m,u),resolve:()=>Promise.resolve({type:"data",result:void 0})}:L0(e,t,i,a,Lu(o),m,u,f,!0,d))}async function Pk(e,t,i,a,o,c,u){a.some(y=>y._lazyPromises?.middleware)&&await Promise.all(a.map(y=>y._lazyPromises?.middleware));let f={request:t,url:OT(t,i),pattern:Lu(a),params:a[0].params,context:c,matches:a},m=await e({...f,fetcherKey:o,runClientMiddleware:y=>{let v=f;return MT(v,()=>y({...v,fetcherKey:o,runClientMiddleware:()=>{throw new Error("Cannot call `runClientMiddleware()` from within an `runClientMiddleware` handler")}}))}});try{await Promise.all(a.flatMap(y=>[y._lazyPromises?.handler,y._lazyPromises?.route]))}catch{}return m}async function _k({request:e,path:t,pattern:i,match:a,lazyHandlerPromise:o,lazyRoutePromise:c,handlerOverride:u,scopedContext:f}){let d,m,y=mr(e.method),v=y?"action":"loader",w=x=>{let C,E=new Promise((j,L)=>C=L);m=()=>C(),e.signal.addEventListener("abort",m);let S=j=>typeof x!="function"?Promise.reject(new Error(`You cannot call the handler for a route which defines a boolean "${v}" [routeId: ${a.route.id}]`)):x({request:e,url:OT(e,t),pattern:i,params:a.params,context:f},...j!==void 0?[j]:[]),T=(async()=>{try{return{type:"data",result:await(u?u(L=>S(L)):S())}}catch(j){return{type:"error",result:j}}})();return Promise.race([T,E])};try{let x=y?a.route.action:a.route.loader;if(o||c)if(x){let C,[E]=await Promise.all([w(x).catch(S=>{C=S}),o,c]);if(C!==void 0)throw C;d=E}else{await o;let C=y?a.route.action:a.route.loader;if(C)[d]=await Promise.all([w(C),c]);else if(v==="action"){let E=new URL(e.url),S=E.pathname+E.search;throw yi(405,{method:e.method,pathname:S,routeId:a.route.id})}else return{type:"data",result:void 0}}else if(x)d=await w(x);else{let C=new URL(e.url),E=C.pathname+C.search;throw yi(404,{pathname:E})}}catch(x){return{type:"error",result:x}}finally{m&&e.signal.removeEventListener("abort",m)}return d}async function zk(e){let t=e.headers.get("Content-Type");return t&&/\bapplication\/json\b/.test(t)?e.body==null?null:e.json():e.text()}async function Vk(e){let{result:t,type:i}=e;if(Qy(t)){let a;try{a=await zk(t)}catch(o){return{type:"error",error:o}}return i==="error"?{type:"error",error:new Du(t.status,t.statusText,a),statusCode:t.status,headers:t.headers}:{type:"data",data:a,statusCode:t.status,headers:t.headers}}return i==="error"?PS(t)?t.data instanceof Error?{type:"error",error:t.data,statusCode:t.init?.status,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:"error",error:Fk(t),statusCode:xu(t)?t.status:void 0,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:"error",error:t,statusCode:xu(t)?t.status:void 0}:PS(t)?{type:"data",data:t.data,statusCode:t.init?.status,headers:t.init?.headers?new Headers(t.init.headers):void 0}:{type:"data",data:t}}function Uk(e,t,i,a,o){let c=e.headers.get("Location");if(vt(c,"Redirects returned/thrown from loaders/actions must have a Location header"),!Ky(c)){let u=a.slice(0,a.findIndex(f=>f.route.id===i)+1);c=D0(new URL(t.url),u,o,c),e.headers.set("Location",c)}return e}var Ik=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];function P0(e){try{return Ik.includes(new URL(e).protocol)}catch{return!1}}function NS(e,t,i,a){if(Ky(e)){let o=e,c=Sh.test(o)?new URL(fT(o,t.protocol)):new URL(o);if(P0(c.toString()))throw new Error("Invalid redirect location");let u=Ci(c.pathname,i)!=null;if(c.origin===t.origin&&u)return Xy(c.pathname)+c.search+c.hash}try{let o=a.createURL(e);if(P0(o.toString()))throw new Error("Invalid redirect location")}catch{}return e}function rl(e,t,i,a){let o=e.createURL(DT(t)).toString(),c={signal:i};if(a&&mr(a.formMethod)){let{formMethod:u,formEncType:f}=a;c.method=u.toUpperCase(),f==="application/json"?(c.headers=new Headers({"Content-Type":f}),c.body=JSON.stringify(a.json)):f==="text/plain"?c.body=a.text:f==="application/x-www-form-urlencoded"&&a.formData?c.body=_0(a.formData):c.body=a.formData}return new Request(o,c)}function OT(e,t){let i=new URL(e.url),a=typeof t=="string"?fa(t):t;if(i.pathname=a.pathname||"/",a.search){let o=new URLSearchParams(a.search),c=o.getAll("index");o.delete("index");for(let u of c.filter(Boolean))o.append("index",u);i.search=o.size?`?${o.toString()}`:""}else i.search="";return i.hash=a.hash||"",i}function _0(e){let t=new URLSearchParams;for(let[i,a]of e.entries())t.append(i,typeof a=="string"?a:a.name);return t}function kS(e){let t=new FormData;for(let[i,a]of e.entries())t.append(i,a);return t}function Bk(e,t,i,a=!1,o=!1){let c={},u=null,f,d=!1,m={},y=i&&Qr(i[1])?i[1].error:void 0;return e.forEach(v=>{if(!(v.route.id in t))return;let w=v.route.id,x=t[w];if(vt(!so(x),"Cannot handle redirect results in processLoaderData"),Qr(x)){let C=x.error;if(y!==void 0&&(C=y,y=void 0),u=u||{},o)u[w]=C;else{let E=xs(e,w);u[E.route.id]==null&&(u[E.route.id]=C)}a||(c[w]=RT),d||(d=!0,f=xu(x.error)?x.error.status:500),x.headers&&(m[w]=x.headers)}else c[w]=x.data,x.statusCode&&x.statusCode!==200&&!d&&(f=x.statusCode),x.headers&&(m[w]=x.headers)}),y!==void 0&&i&&(u={[i[0]]:y},i[2]&&(c[i[2]]=void 0)),{loaderData:c,errors:u,statusCode:f||200,loaderHeaders:m}}function OS(e,t,i,a,o,c,u){let{loaderData:f,errors:d}=Bk(t,i,a);return o.filter(m=>!m.matches||m.matches.some(y=>y.shouldLoad)).forEach(m=>{let{key:y,match:v,controller:w}=m;if(w&&w.signal.aborted)return;let x=c[y];if(vt(x,"Did not find corresponding fetcher result"),Qr(x)){let C=xs(e.matches,v?.route.id);d&&d[C.route.id]||(d={...d,[C.route.id]:x.error}),u.delete(y)}else if(so(x))vt(!1,"Unhandled fetcher revalidation redirect");else{let C=ta(x.data);u.set(y,C)}}),{loaderData:f,errors:d}}function DS(e,t,i,a){let o=Object.entries(t).filter(([,c])=>c!==RT).reduce((c,[u,f])=>(c[u]=f,c),{});for(let c of i){let u=c.route.id;if(!t.hasOwnProperty(u)&&e.hasOwnProperty(u)&&c.route.loader&&(o[u]=e[u]),a&&a.hasOwnProperty(u))break}return o}function LS(e){return e?Qr(e[1])?{actionData:{}}:{actionData:{[e[0]]:e[1].data}}:{}}function xs(e,t){return(t?e.slice(0,e.findIndex(a=>a.route.id===t)+1):[...e]).reverse().find(a=>a.route.hasErrorBoundary===!0)||e[0]}function Wf(e){let t=e.length===1?e[0]:e.find(i=>i.index||!i.path||i.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:t}],route:t}}function yi(e,{pathname:t,routeId:i,method:a,type:o,message:c}={}){let u="Unknown Server Error",f="Unknown @remix-run/router error";return e===400?(u="Bad Request",a&&t&&i?f=`You made a ${a} request to "${t}" but did not provide a \`loader\` for route "${i}", so there is no way to handle the request.`:o==="invalid-body"&&(f="Unable to encode submission body")):e===403?(u="Forbidden",f=`Route "${i}" does not match URL "${t}"`):e===404?(u="Not Found",f=`No route matches URL "${t}"`):e===405&&(u="Method Not Allowed",a&&t&&i?f=`You made a ${a.toUpperCase()} request to "${t}" but did not provide an \`action\` for route "${i}", so there is no way to handle the request.`:a&&(f=`Invalid request method "${a.toUpperCase()}"`)),new Du(e||500,u,new Error(f),!0)}function Zf(e){let t=Object.entries(e);for(let i=t.length-1;i>=0;i--){let[a,o]=t[i];if(so(o))return{key:a,result:o}}}function DT(e){let t=typeof e=="string"?fa(e):e;return Ar({...t,hash:""})}function Hk(e,t){return e.pathname!==t.pathname||e.search!==t.search?!1:e.hash===""?t.hash!=="":e.hash===t.hash?!0:t.hash!==""}function Fk(e){return new Du(e.init?.status??500,e.init?.statusText??"Internal Server Error",e.data)}function Yk(e){return e!=null&&typeof e=="object"&&Object.entries(e).every(([t,i])=>typeof t=="string"&&Gk(i))}function Gk(e){return e!=null&&typeof e=="object"&&"type"in e&&"result"in e&&(e.type==="data"||e.type==="error")}function qk(e){return Qy(e.result)&&CT.has(e.result.status)}function Qr(e){return e.type==="error"}function so(e){return(e&&e.type)==="redirect"}function PS(e){return typeof e=="object"&&e!=null&&"type"in e&&"data"in e&&"init"in e&&e.type==="DataWithResponseInit"}function Qy(e){return e!=null&&typeof e.status=="number"&&typeof e.statusText=="string"&&typeof e.headers=="object"&&typeof e.body<"u"}function $k(e){return CT.has(e)}function Kk(e){return Qy(e)&&$k(e.status)&&e.headers.has("Location")}function Xk(e){return Ck.has(e.toUpperCase())}function mr(e){return wk.has(e.toUpperCase())}function Jy(e){return new URLSearchParams(e).getAll("index").some(t=>t==="")}function Ad(e,t){let i=typeof t=="string"?fa(t).search:t.search;if(e[e.length-1].route.index&&Jy(i||""))return e[e.length-1];let a=vT(e);return a[a.length-1]}function _S(e){let{formMethod:t,formAction:i,formEncType:a,text:o,formData:c,json:u}=e;if(!(!t||!i||!a)){if(o!=null)return{formMethod:t,formAction:i,formEncType:a,formData:void 0,json:void 0,text:o};if(c!=null)return{formMethod:t,formAction:i,formEncType:a,formData:c,json:void 0,text:void 0};if(u!==void 0)return{formMethod:t,formAction:i,formEncType:a,formData:void 0,json:u,text:void 0}}}function Rg(e,t,i,a){return a?{state:"loading",location:e,matches:t,historyAction:i,formMethod:a.formMethod,formAction:a.formAction,formEncType:a.formEncType,formData:a.formData,json:a.json,text:a.text}:{state:"loading",location:e,matches:t,historyAction:i,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function Wk(e,t,i,a){return{state:"submitting",location:e,matches:t,historyAction:i,formMethod:a.formMethod,formAction:a.formAction,formEncType:a.formEncType,formData:a.formData,json:a.json,text:a.text}}function Pc(e,t){return e?{state:"loading",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:t}}function Zk(e,t){return{state:"submitting",formMethod:e.formMethod,formAction:e.formAction,formEncType:e.formEncType,formData:e.formData,json:e.json,text:e.text,data:t?t.data:void 0}}function ta(e){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:e}}function Qk(e,t){try{let i=e.sessionStorage.getItem(ET);if(i){let a=JSON.parse(i);for(let[o,c]of Object.entries(a||{}))c&&Array.isArray(c)&&t.set(o,new Set(c||[]))}}catch{}}function Jk(e,t){if(t.size>0){let i={};for(let[a,o]of t)i[a]=[...o];try{e.sessionStorage.setItem(ET,JSON.stringify(i))}catch(a){En(!1,`Failed to save applied view transitions in sessionStorage (${a}).`)}}}function zS(){let e,t,i=new Promise((a,o)=>{e=async c=>{a(c);try{await i}catch{}},t=async c=>{o(c);try{await i}catch{}}});return{promise:i,resolve:e,reject:t}}var xo=b.createContext(null);xo.displayName="DataRouter";var Pu=b.createContext(null);Pu.displayName="DataRouterState";var LT=b.createContext(!1);function PT(){return b.useContext(LT)}var ev=b.createContext({isTransitioning:!1});ev.displayName="ViewTransition";var _T=b.createContext(new Map);_T.displayName="Fetchers";var eO=b.createContext(null);eO.displayName="Await";var ri=b.createContext(null);ri.displayName="Navigation";var Eh=b.createContext(null);Eh.displayName="Location";var Ri=b.createContext({outlet:null,matches:[],isDataRoute:!1});Ri.displayName="Route";var tv=b.createContext(null);tv.displayName="RouteError";var zT="REACT_ROUTER_ERROR",tO="REDIRECT",nO="ROUTE_ERROR_RESPONSE";function rO(e){if(e.startsWith(`${zT}:${tO}:{`))try{let t=JSON.parse(e.slice(28));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string"&&typeof t.location=="string"&&typeof t.reloadDocument=="boolean"&&typeof t.replace=="boolean")return t}catch{}}function iO(e){if(e.startsWith(`${zT}:${nO}:{`))try{let t=JSON.parse(e.slice(40));if(typeof t=="object"&&t&&typeof t.status=="number"&&typeof t.statusText=="string")return new Du(t.status,t.statusText,t.data)}catch{}}function aO(e,{relative:t}={}){vt(zl(),"useHref() may be used only in the context of a component.");let{basename:i,navigator:a}=b.useContext(ri),{hash:o,pathname:c,search:u}=_u(e,{relative:t}),f=c;return i!=="/"&&(f=c==="/"?i:xi([i,c])),a.createHref({pathname:f,search:u,hash:o})}function zl(){return b.useContext(Eh)!=null}function jr(){return vt(zl(),"useLocation() may be used only in the context of a component."),b.useContext(Eh).location}var VT="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function UT(e){b.useContext(ri).static||b.useLayoutEffect(e)}function Vl(){let{isDataRoute:e}=b.useContext(Ri);return e?wO():sO()}function sO(){vt(zl(),"useNavigate() may be used only in the context of a component.");let e=b.useContext(xo),{basename:t,navigator:i}=b.useContext(ri),{matches:a}=b.useContext(Ri),{pathname:o}=jr(),c=JSON.stringify(Ch(a)),u=b.useRef(!1);return UT(()=>{u.current=!0}),b.useCallback((d,m={})=>{if(En(u.current,VT),!u.current)return;if(typeof d=="number"){i.go(d);return}let y=Ou(d,JSON.parse(c),o,m.relative==="path");e==null&&t!=="/"&&(y.pathname=y.pathname==="/"?t:xi([t,y.pathname])),hl(typeof d=="string"?d:Ar(d),i.createHref(y),Wy(i),"reject"),(m.replace?i.replace:i.push)(y,m.state,m)},[t,i,c,o,e])}var IT=b.createContext(null);function oO(){return b.useContext(IT)}function lO(e){let t=b.useContext(Ri).outlet;return b.useMemo(()=>t&&b.createElement(IT.Provider,{value:e},t),[t,e])}function cO(){let{matches:e}=b.useContext(Ri);return e[e.length-1]?.params??{}}function _u(e,{relative:t}={}){let{matches:i}=b.useContext(Ri),{pathname:a}=jr(),o=JSON.stringify(Ch(i));return b.useMemo(()=>Ou(e,JSON.parse(o),a,t==="path"),[e,o,a,t])}function uO(e,t,i){vt(zl(),"useRoutes() may be used only in the context of a component.");let{navigator:a}=b.useContext(ri),{matches:o}=b.useContext(Ri),c=o[o.length-1],u=c?c.params:{},f=c?c.pathname:"/",d=c?c.pathnameBase:"/",m=c&&c.route;{let S=m&&m.path||"";HT(f,!m||S.endsWith("*")||S.endsWith("*?"),`You rendered descendant (or called \`useRoutes()\`) at "${f}" (under ) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render. -Please change the parent to .`)}let y=jr(),v;v=y;let w=v.pathname||"/",x=w;if(d!=="/"){let S=d.replace(/^\//,"").split("/");x="/"+w.replace(/^\//,"").split("/").slice(S.length).join("/")}let C=i&&i.state.matches.length?i.state.matches.map(S=>Object.assign(S,{route:i.manifest[S.route.id]||S.route})):hT(e,{pathname:x});return En(m||C!=null,`No routes matched location "${v.pathname}${v.search}${v.hash}" `),En(C==null||C[C.length-1].route.element!==void 0||C[C.length-1].route.Component!==void 0||C[C.length-1].route.lazy!==void 0,`Matched leaf route at location "${v.pathname}${v.search}${v.hash}" does not have an element or Component. This means it will render an with a null value by default resulting in an "empty" page.`),mO(C&&C.map(S=>Object.assign({},S,{params:Object.assign({},u,S.params),pathname:xi([d,a.encodeLocation?a.encodeLocation(S.pathname.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:S.pathname]),pathnameBase:S.pathnameBase==="/"?d:xi([d,a.encodeLocation?a.encodeLocation(S.pathnameBase.replace(/%/g,"%25").replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:S.pathnameBase])})),o,i)}function uO(){let e=bO(),t=xu(e)?`${e.status} ${e.statusText}`:e instanceof Error?e.message:JSON.stringify(e),i=e instanceof Error?e.stack:null,a="rgba(200,200,200, 0.5)",o={padding:"0.5rem",backgroundColor:a},c={padding:"2px 4px",backgroundColor:a},u=null;return console.error("Error handled by React Router default ErrorBoundary:",e),u=b.createElement(b.Fragment,null,b.createElement("p",null,"💿 Hey developer 👋"),b.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",b.createElement("code",{style:c},"ErrorBoundary")," or"," ",b.createElement("code",{style:c},"errorElement")," prop on your route.")),b.createElement(b.Fragment,null,b.createElement("h2",null,"Unexpected Application Error!"),b.createElement("h3",{style:{fontStyle:"italic"}},t),i?b.createElement("pre",{style:o},i):null,u)}var fO=b.createElement(uO,null),BT=class extends b.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){this.props.onError?this.props.onError(e,t):console.error("React Router caught the following error during render",e)}render(){let e=this.state.error;if(this.context&&typeof e=="object"&&e&&"digest"in e&&typeof e.digest=="string"){const i=rO(e.digest);i&&(e=i)}let t=e!==void 0?b.createElement(Ri.Provider,{value:this.props.routeContext},b.createElement(tv.Provider,{value:e,children:this.props.component})):this.props.children;return this.context?b.createElement(dO,{error:e},t):t}};BT.contextType=LT;var Tg=new WeakMap;function dO({children:e,error:t}){let{basename:i,navigator:a}=b.useContext(ri);if(typeof t=="object"&&t&&"digest"in t&&typeof t.digest=="string"){let o=nO(t.digest);if(o){let c=Tg.get(t);if(c)throw c;let u=xT(o.location,i),f=u.absoluteURL||u.to;if(hl(o.location,f,Wy(a),"allow-explicit"),P0(f))throw new Error("Invalid redirect location");if(bT&&!Tg.get(t))if(u.isExternal||o.reloadDocument)window.location.href=f;else{const d=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(u.to,{replace:o.replace}));throw Tg.set(t,d),d}return b.createElement("meta",{httpEquiv:"refresh",content:`0;url=${f}`})}}return e}function hO({routeContext:e,match:t,children:i}){let a=b.useContext(xo);return a&&a.static&&a.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(a.staticContext._deepestRenderedBoundaryId=t.route.id),b.createElement(Ri.Provider,{value:e},i)}function mO(e,t=[],i){let a=i?.state;if(e==null){if(!a)return null;if(a.errors)e=a.matches;else if(t.length===0&&!a.initialized&&a.matches.length>0)e=a.matches;else return null}let o=e,c=a?.errors;if(c!=null){let y=o.findIndex(v=>v.route.id&&c?.[v.route.id]!==void 0);vt(y>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(c).join(",")}`),o=o.slice(0,Math.min(o.length,y+1))}let u=!1,f=-1;if(i&&a){u=a.renderFallback;for(let y=0;y=0?o=o.slice(0,f+1):o=[o[0]];break}}}}let d=i?.onError,m=a&&d?(y,v)=>{d(y,{location:a.location,params:a.matches?.[0]?.params??{},pattern:Lu(a.matches),errorInfo:v})}:void 0;return o.reduceRight((y,v,w)=>{let x,C=!1,E=null,S=null;a&&(x=c&&v.route.id?c[v.route.id]:void 0,E=v.route.errorElement||fO,u&&(f<0&&w===0?(HT("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),C=!0,S=null):f===w&&(C=!0,S=v.route.hydrateFallbackElement||null)));let T=t.concat(o.slice(0,w+1)),j=()=>{let L;return x?L=E:C?L=S:v.route.Component?L=b.createElement(v.route.Component,null):v.route.element?L=v.route.element:L=y,b.createElement(hO,{match:v,routeContext:{outlet:y,matches:T,isDataRoute:a!=null},children:L})};return a&&(v.route.ErrorBoundary||v.route.errorElement||w===0)?b.createElement(BT,{location:a.location,revalidation:a.revalidation,component:E,error:x,children:j(),routeContext:{outlet:null,matches:T,isDataRoute:!0},onError:m}):j()},null)}function nv(e){return`${e} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function pO(e){let t=b.useContext(xo);return vt(t,nv(e)),t}function gO(e){let t=b.useContext(Pu);return vt(t,nv(e)),t}function yO(e){let t=b.useContext(Ri);return vt(t,nv(e)),t}function rv(e){let t=yO(e),i=t.matches[t.matches.length-1];return vt(i.route.id,`${e} can only be used on routes that contain a unique "id"`),i.route.id}function vO(){return rv("useRouteId")}function bO(){let e=b.useContext(tv),t=gO("useRouteError"),i=rv("useRouteError");return e!==void 0?e:t.errors?.[i]}function xO(){let{router:e}=pO("useNavigate"),t=rv("useNavigate"),i=b.useRef(!1);return UT(()=>{i.current=!0}),b.useCallback(async(o,c={})=>{En(i.current,VT),i.current&&(typeof o=="number"?await e.navigate(o):await e.navigate(o,{fromRouteId:t,...c}))},[e,t])}var VS={};function HT(e,t,i){!t&&!VS[e]&&(VS[e]=!0,En(!1,i))}var US={};function IS(e,t){!e&&!US[t]&&(US[t]=!0,console.warn(t))}var wO="useOptimistic",BS=CE[wO],SO=()=>{};function CO(e){return BS?BS(e):[e,SO]}function EO(e){let t={hasErrorBoundary:e.hasErrorBoundary||e.ErrorBoundary!=null||e.errorElement!=null};return e.Component&&(e.element&&En(!1,"You should not include both `Component` and `element` on your route - `Component` will be used."),Object.assign(t,{element:b.createElement(e.Component),Component:void 0})),e.HydrateFallback&&(e.hydrateFallbackElement&&En(!1,"You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."),Object.assign(t,{hydrateFallbackElement:b.createElement(e.HydrateFallback),HydrateFallback:void 0})),e.ErrorBoundary&&(e.errorElement&&En(!1,"You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."),Object.assign(t,{errorElement:b.createElement(e.ErrorBoundary),ErrorBoundary:void 0})),t}var RO=["HydrateFallback","hydrateFallbackElement"],TO=class{constructor(){this.status="pending",this.promise=new Promise((e,t)=>{this.resolve=i=>{this.status==="pending"&&(this.status="resolved",e(i))},this.reject=i=>{this.status==="pending"&&(this.status="rejected",t(i))}})}};function AO({router:e,flushSync:t,onError:i,useTransitions:a}){a=PT()||a;let[c,u]=b.useState(e.state),[f,d]=CO(c),[m,y]=b.useState(),[v,w]=b.useState({isTransitioning:!1}),[x,C]=b.useState(),[E,S]=b.useState(),[T,j]=b.useState(),L=b.useRef(new Map),N=b.useCallback((A,{deletedFetchers:H,newErrors:Y,flushSync:Z,viewTransitionOpts:$})=>{Y&&i&&Object.values(Y).forEach(ee=>i(ee,{location:A.location,params:A.matches[0]?.params??{},pattern:Lu(A.matches)})),A.fetchers.forEach((ee,re)=>{ee.data!==void 0&&L.current.set(re,ee.data)}),H.forEach(ee=>L.current.delete(ee)),IS(Z===!1||t!=null,'You provided the `flushSync` option to a router update, but you are not using the `` from `react-router/dom` so `ReactDOM.flushSync()` is unavailable. Please update your app to `import { RouterProvider } from "react-router/dom"` and ensure you have `react-dom` installed as a dependency to use the `flushSync` option.');let K=e.window!=null&&e.window.document!=null&&typeof e.window.document.startViewTransition=="function";if(IS($==null||K,"You provided the `viewTransition` option to a router update, but you do not appear to be running in a DOM environment as `window.startViewTransition` is not available."),!$||!K){t&&Z?t(()=>u(A)):a===!1?u(A):b.startTransition(()=>{a===!0&&d(ee=>HS(ee,A)),u(A)});return}if(t&&Z){t(()=>{E&&(x?.resolve(),E.skipTransition()),w({isTransitioning:!0,flushSync:!0,currentLocation:$.currentLocation,nextLocation:$.nextLocation})});let ee=e.window.document.startViewTransition(()=>{t(()=>u(A))});ee.finished.finally(()=>{t(()=>{C(void 0),S(void 0),y(void 0),w({isTransitioning:!1})})}),t(()=>S(ee));return}E?(x?.resolve(),E.skipTransition(),j({state:A,currentLocation:$.currentLocation,nextLocation:$.nextLocation})):(y(A),w({isTransitioning:!0,flushSync:!1,currentLocation:$.currentLocation,nextLocation:$.nextLocation}))},[e.window,t,E,x,a,d,i]);b.useLayoutEffect(()=>e.subscribe(N),[e,N]),b.useEffect(()=>{v.isTransitioning&&!v.flushSync&&C(new TO)},[v]),b.useEffect(()=>{if(x&&m&&e.window){let A=m,H=x.promise,Y=e.window.document.startViewTransition(async()=>{a===!1?u(A):b.startTransition(()=>{a===!0&&d(Z=>HS(Z,A)),u(A)}),await H});Y.finished.finally(()=>{C(void 0),S(void 0),y(void 0),w({isTransitioning:!1})}),S(Y)}},[m,x,e.window,a,d]),b.useEffect(()=>{x&&m&&f.location.key===m.location.key&&x.resolve()},[x,E,f.location,m]),b.useEffect(()=>{!v.isTransitioning&&T&&(y(T.state),w({isTransitioning:!0,flushSync:!1,currentLocation:T.currentLocation,nextLocation:T.nextLocation}),j(void 0))},[v.isTransitioning,T]);let O=b.useMemo(()=>({createHref:e.createHref,createURL:e.createURL,encodeLocation:e.encodeLocation,go:A=>e.navigate(A),push:(A,H,Y)=>e.navigate(A,{state:H,preventScrollReset:Y?.preventScrollReset}),replace:(A,H,Y)=>e.navigate(A,{replace:!0,state:H,preventScrollReset:Y?.preventScrollReset})}),[e]),P=e.basename||"/",k=b.useMemo(()=>({router:e,navigator:O,static:!1,basename:P,onError:i}),[e,O,P,i]);return b.createElement(b.Fragment,null,b.createElement(xo.Provider,{value:k},b.createElement(Pu.Provider,{value:f},b.createElement(_T.Provider,{value:L.current},b.createElement(ev.Provider,{value:v},b.createElement(NO,{basename:P,location:f.location,navigationType:f.historyAction,navigator:O,useTransitions:a},b.createElement(jO,{routes:e.routes,manifest:e.manifest,future:e.future,state:f,isStatic:!1,onError:i})))))),null)}function HS(e,t){return{...e,navigation:t.navigation.state!=="idle"?t.navigation:e.navigation,revalidation:t.revalidation!=="idle"?t.revalidation:e.revalidation,actionData:t.navigation.state!=="submitting"?t.actionData:e.actionData,fetchers:t.fetchers}}var jO=b.memo(MO);function MO({routes:e,manifest:t,future:i,state:a,isStatic:o,onError:c}){return cO(e,void 0,{manifest:t,state:a,isStatic:o,onError:c})}function js({to:e,replace:t,state:i,relative:a}){vt(zl()," may be used only in the context of a component.");let{static:o,navigator:c}=b.useContext(ri);En(!o," must not be used on the initial render in a . This is a no-op, but you should modify your code so the is only ever rendered in response to some user interaction or state change.");let{matches:u}=b.useContext(Ri),{pathname:f}=jr(),d=Vl(),m=Ou(e,Eh(u),f,a==="path");hl(typeof e=="string"?e:Ar(e),c.createHref(m),Wy(c),"reject");let y=JSON.stringify(m);return b.useEffect(()=>{d(JSON.parse(y),{replace:t,state:i,relative:a})},[d,y,a,t,i]),null}function FT(e){return oO(e.context)}function NO({basename:e="/",children:t=null,location:i,navigationType:a="POP",navigator:o,static:c=!1,useTransitions:u}){vt(!zl(),"You cannot render a inside another . You should never have more than one in your app.");let f=e.replace(/^\/*/,"/"),d=b.useMemo(()=>({basename:f,navigator:o,static:c,useTransitions:u,future:{}}),[f,o,c,u]);typeof i=="string"&&(i=fa(i));let{pathname:m="/",search:y="",hash:v="",state:w=null,key:x="default",mask:C}=i,E=b.useMemo(()=>{let S=Ci(m,f);return S==null?null:{location:{pathname:S,search:y,hash:v,state:w,key:x,mask:C},navigationType:a}},[f,m,y,v,w,x,a,C]);return En(E!=null,` is not able to match the URL "${m}${y}${v}" because it does not start with the basename, so the won't render anything.`),E==null?null:b.createElement(ri.Provider,{value:d},b.createElement(Rh.Provider,{children:t,value:E}))}var Md="get",Nd="application/x-www-form-urlencoded";function Th(e){return typeof HTMLElement<"u"&&e instanceof HTMLElement}function kO(e){return Th(e)&&e.tagName.toLowerCase()==="button"}function OO(e){return Th(e)&&e.tagName.toLowerCase()==="form"}function DO(e){return Th(e)&&e.tagName.toLowerCase()==="input"}function LO(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}function PO(e,t){return e.button===0&&(!t||t==="_self")&&!LO(e)}function z0(e=""){return new URLSearchParams(typeof e=="string"||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce((t,i)=>{let a=e[i];return t.concat(Array.isArray(a)?a.map(o=>[i,o]):[[i,a]])},[]))}function _O(e,t){let i=z0(e);return t&&t.forEach((a,o)=>{i.has(o)||t.getAll(o).forEach(c=>{i.append(o,c)})}),i}var Jf=null;function zO(){if(Jf===null)try{new FormData(document.createElement("form"),0),Jf=!1}catch{Jf=!0}return Jf}var VO=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Ag(e){return e!=null&&!VO.has(e)?(En(!1,`"${e}" is not a valid \`encType\` for \`
\`/\`\` and will default to "${Nd}"`),null):e}function UO(e,t){let i,a,o,c,u;if(OO(e)){let f=e.getAttribute("action");a=f?Ci(f,t):null,i=e.getAttribute("method")||Md,o=Ag(e.getAttribute("enctype"))||Nd,c=new FormData(e)}else if(kO(e)||DO(e)&&(e.type==="submit"||e.type==="image")){let f=e.form;if(f==null)throw new Error('Cannot submit a