diff --git a/404.html b/404.html index 6f2dcf9..0ad63e7 100644 --- a/404.html +++ b/404.html @@ -1,18 +1,18 @@ - + An error occurred - + -
🚂🚃
STATETRAIN
Unlock and maintain tone.js context for all following pages / components
+
🚂🚃

STATETRAIN

Gain control of the tone.js transport with a modern routable typescript-react environment. 🚂🚃

* unlocks tone.js context for all following pages / components
- - - + + + \ No newline at end of file diff --git a/assets/chunks/chunk-CwsG006u.js b/assets/chunks/chunk-DDs_QYll.js similarity index 87% rename from assets/chunks/chunk-CwsG006u.js rename to assets/chunks/chunk-DDs_QYll.js index 0ae75be..222cd29 100644 --- a/assets/chunks/chunk-CwsG006u.js +++ b/assets/chunks/chunk-DDs_QYll.js @@ -1,4 +1,4 @@ -import{_ as Ed}from"./chunk-DZeubO4x.js";function sc(u){return u&&u.__esModule&&Object.prototype.hasOwnProperty.call(u,"default")?u.default:u}var Wl={},ac={exports:{}},Xe={},cc={exports:{}},q={};/** +import{_ as Ed}from"./chunk-DZeubO4x.js";function sc(u){return u&&u.__esModule&&Object.prototype.hasOwnProperty.call(u,"default")?u.default:u}var Vl={},ac={exports:{}},Xe={},cc={exports:{}},q={};/** * @license React * react.production.min.js * @@ -6,7 +6,7 @@ import{_ as Ed}from"./chunk-DZeubO4x.js";function sc(u){return u&&u.__esModule&& * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var Ba;function Cd(){if(Ba)return q;Ba=1;var u=Symbol.for("react.element"),p=Symbol.for("react.portal"),s=Symbol.for("react.fragment"),g=Symbol.for("react.strict_mode"),y=Symbol.for("react.profiler"),C=Symbol.for("react.provider"),k=Symbol.for("react.context"),w=Symbol.for("react.forward_ref"),_=Symbol.for("react.suspense"),L=Symbol.for("react.memo"),T=Symbol.for("react.lazy"),z=Symbol.iterator;function M(c){return c===null||typeof c!="object"?null:(c=z&&c[z]||c["@@iterator"],typeof c=="function"?c:null)}var B={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},W=Object.assign,j={};function O(c,S,U){this.props=c,this.context=S,this.refs=j,this.updater=U||B}O.prototype.isReactComponent={},O.prototype.setState=function(c,S){if(typeof c!="object"&&typeof c!="function"&&c!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,c,S,"setState")},O.prototype.forceUpdate=function(c){this.updater.enqueueForceUpdate(this,c,"forceUpdate")};function he(){}he.prototype=O.prototype;function oe(c,S,U){this.props=c,this.context=S,this.refs=j,this.updater=U||B}var Ne=oe.prototype=new he;Ne.constructor=oe,W(Ne,O.prototype),Ne.isPureReactComponent=!0;var ce=Array.isArray,Me=Object.prototype.hasOwnProperty,ie={current:null},ve={key:!0,ref:!0,__self:!0,__source:!0};function ze(c,S,U){var G,Z={},se=null,ne=null;if(S!=null)for(G in S.ref!==void 0&&(ne=S.ref),S.key!==void 0&&(se=""+S.key),S)Me.call(S,G)&&!ve.hasOwnProperty(G)&&(Z[G]=S[G]);var ue=arguments.length-2;if(ue===1)Z.children=U;else if(1"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),_=Object.prototype.hasOwnProperty,L=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,T={},z={};function M(e){return _.call(z,e)?!0:_.call(T,e)?!1:L.test(e)?z[e]=!0:(T[e]=!0,!1)}function B(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function W(e,t,n,r){if(t===null||typeof t>"u"||B(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function j(e,t,n,r,l,o,i){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=l,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=i}var O={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){O[e]=new j(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];O[t]=new j(t,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){O[e]=new j(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){O[e]=new j(e,2,!1,e,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){O[e]=new j(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){O[e]=new j(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){O[e]=new j(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){O[e]=new j(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){O[e]=new j(e,5,!1,e.toLowerCase(),null,!1,!1)});var he=/[\-:]([a-z])/g;function oe(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(he,oe);O[t]=new j(t,1,!1,e,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(he,oe);O[t]=new j(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(he,oe);O[t]=new j(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){O[e]=new j(e,1,!1,e.toLowerCase(),null,!1,!1)}),O.xlinkHref=new j("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){O[e]=new j(e,1,!1,e.toLowerCase(),null,!0,!0)});function Ne(e,t,n,r){var l=O.hasOwnProperty(t)?O[t]:null;(l!==null?l.type!==0:r||!(2"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),_=Object.prototype.hasOwnProperty,L=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,T={},z={};function M(e){return _.call(z,e)?!0:_.call(T,e)?!1:L.test(e)?z[e]=!0:(T[e]=!0,!1)}function B(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function W(e,t,n,r){if(t===null||typeof t>"u"||B(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function j(e,t,n,r,l,o,i){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=l,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=o,this.removeEmptyString=i}var O={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){O[e]=new j(e,0,!1,e,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];O[t]=new j(t,1,!1,e[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(e){O[e]=new j(e,2,!1,e.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){O[e]=new j(e,2,!1,e,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){O[e]=new j(e,3,!1,e.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(e){O[e]=new j(e,3,!0,e,null,!1,!1)}),["capture","download"].forEach(function(e){O[e]=new j(e,4,!1,e,null,!1,!1)}),["cols","rows","size","span"].forEach(function(e){O[e]=new j(e,6,!1,e,null,!1,!1)}),["rowSpan","start"].forEach(function(e){O[e]=new j(e,5,!1,e.toLowerCase(),null,!1,!1)});var he=/[\-:]([a-z])/g;function oe(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var t=e.replace(he,oe);O[t]=new j(t,1,!1,e,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(he,oe);O[t]=new j(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(he,oe);O[t]=new j(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(e){O[e]=new j(e,1,!1,e.toLowerCase(),null,!1,!1)}),O.xlinkHref=new j("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(e){O[e]=new j(e,1,!1,e.toLowerCase(),null,!0,!0)});function Ne(e,t,n,r){var l=O.hasOwnProperty(t)?O[t]:null;(l!==null?l.type!==0:r||!(2a||l[i]!==o[a]){var f=` -`+l[i].replace(" at new "," at ");return e.displayName&&f.includes("")&&(f=f.replace("",e.displayName)),f}while(1<=i&&0<=a);break}}}finally{G=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?U(e):""}function se(e){switch(e.tag){case 5:return U(e.type);case 16:return U("Lazy");case 13:return U("Suspense");case 19:return U("SuspenseList");case 0:case 2:case 15:return e=Z(e.type,!1),e;case 11:return e=Z(e.type.render,!1),e;case 1:return e=Z(e.type,!0),e;default:return""}}function ne(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case ve:return"Fragment";case ie:return"Portal";case nt:return"Profiler";case ze:return"StrictMode";case Oe:return"Suspense";case De:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case ct:return(e.displayName||"Context")+".Consumer";case Ze:return(e._context.displayName||"Context")+".Provider";case b:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case qe:return t=e.displayName||null,t!==null?t:ne(e.type)||"Memo";case Ce:t=e._payload,e=e._init;try{return ne(e(t))}catch{}}return null}function ue(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return ne(t);case 8:return t===ze?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function re(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Be(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function _c(e){var t=Be(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var l=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return l.call(this)},set:function(i){r=""+i,o.call(this,i)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(i){r=""+i},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Rr(e){e._valueTracker||(e._valueTracker=_c(e))}function Yi(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Be(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Lr(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Hl(e,t){var n=t.checked;return c({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Xi(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=re(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Zi(e,t){t=t.checked,t!=null&&Ne(e,"checked",t,!1)}function Ql(e,t){Zi(e,t);var n=re(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Gl(e,t.type,n):t.hasOwnProperty("defaultValue")&&Gl(e,t.type,re(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function qi(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function Gl(e,t,n){(t!=="number"||Lr(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var $n=Array.isArray;function hn(e,t,n,r){if(e=e.options,t){t={};for(var l=0;l"+t.valueOf().toString()+"",t=Mr.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Wn(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Vn={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Pc=["Webkit","ms","Moz","O"];Object.keys(Vn).forEach(function(e){Pc.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Vn[t]=Vn[e]})});function ru(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Vn.hasOwnProperty(e)&&Vn[e]?(""+t).trim():t+"px"}function lu(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,l=ru(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,l):e[n]=l}}var Nc=c({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Xl(e,t){if(t){if(Nc[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(s(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(s(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(s(61))}if(t.style!=null&&typeof t.style!="object")throw Error(s(62))}}function Zl(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var ql=null;function Jl(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var bl=null,vn=null,gn=null;function ou(e){if(e=cr(e)){if(typeof bl!="function")throw Error(s(280));var t=e.stateNode;t&&(t=tl(t),bl(e.stateNode,e.type,t))}}function iu(e){vn?gn?gn.push(e):gn=[e]:vn=e}function uu(){if(vn){var e=vn,t=gn;if(gn=vn=null,ou(e),t)for(e=0;e>>=0,e===0?32:31-(Fc(e)/Uc|0)|0}var Ar=64,Fr=4194304;function Gn(e){switch(e&-e){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: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 e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Ur(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,l=e.suspendedLanes,o=e.pingedLanes,i=n&268435455;if(i!==0){var a=i&~l;a!==0?r=Gn(a):(o&=i,o!==0&&(r=Gn(o)))}else i=n&~l,i!==0?r=Gn(i):o!==0&&(r=Gn(o));if(r===0)return 0;if(t!==0&&t!==r&&!(t&l)&&(l=r&-r,o=t&-t,l>=o||l===16&&(o&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function Kn(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-ft(t),e[t]=n}function Bc(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=tr),Ou=" ",Du=!1;function Au(e,t){switch(e){case"keyup":return yf.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Fu(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Sn=!1;function Sf(e,t){switch(e){case"compositionend":return Fu(t);case"keypress":return t.which!==32?null:(Du=!0,Ou);case"textInput":return e=t.data,e===Ou&&Du?null:e;default:return null}}function kf(e,t){if(Sn)return e==="compositionend"||!yo&&Au(e,t)?(e=Tu(),Hr=fo=At=null,Sn=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Qu(n)}}function Ku(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Ku(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Yu(){for(var e=window,t=Lr();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Lr(e.document)}return t}function ko(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function Rf(e){var t=Yu(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Ku(n.ownerDocument.documentElement,n)){if(r!==null&&ko(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var l=n.textContent.length,o=Math.min(r.start,l);r=r.end===void 0?o:Math.min(r.end,l),!e.extend&&o>r&&(l=r,r=o,o=l),l=Gu(n,o);var i=Gu(n,r);l&&i&&(e.rangeCount!==1||e.anchorNode!==l.node||e.anchorOffset!==l.offset||e.focusNode!==i.node||e.focusOffset!==i.offset)&&(t=t.createRange(),t.setStart(l.node,l.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(i.node,i.offset)):(t.setEnd(i.node,i.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,kn=null,xo=null,or=null,Eo=!1;function Xu(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Eo||kn==null||kn!==Lr(r)||(r=kn,"selectionStart"in r&&ko(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),or&&lr(or,r)||(or=r,r=Jr(xo,"onSelect"),0Pn||(e.current=Oo[Pn],Oo[Pn]=null,Pn--)}function ae(e,t){Pn++,Oo[Pn]=e.current,e.current=t}var Wt={},Ae=$t(Wt),He=$t(!1),tn=Wt;function Nn(e,t){var n=e.type.contextTypes;if(!n)return Wt;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var l={},o;for(o in n)l[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=l),l}function Qe(e){return e=e.childContextTypes,e!=null}function nl(){pe(He),pe(Ae)}function cs(e,t,n){if(Ae.current!==Wt)throw Error(s(168));ae(Ae,t),ae(He,n)}function fs(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var l in r)if(!(l in t))throw Error(s(108,ue(e)||"Unknown",l));return c({},n,r)}function rl(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Wt,tn=Ae.current,ae(Ae,e),ae(He,He.current),!0}function ds(e,t,n){var r=e.stateNode;if(!r)throw Error(s(169));n?(e=fs(e,t,tn),r.__reactInternalMemoizedMergedChildContext=e,pe(He),pe(Ae),ae(Ae,e)):pe(He),ae(He,n)}var Pt=null,ll=!1,Do=!1;function ps(e){Pt===null?Pt=[e]:Pt.push(e)}function Vf(e){ll=!0,ps(e)}function Vt(){if(!Do&&Pt!==null){Do=!0;var e=0,t=le;try{var n=Pt;for(le=1;e>=i,l-=i,Nt=1<<32-ft(t)+l|n<K?(Le=Q,Q=null):Le=Q.sibling;var te=x(m,Q,h[K],N);if(te===null){Q===null&&(Q=Le);break}e&&Q&&te.alternate===null&&t(m,Q),d=o(te,d,K),H===null?$=te:H.sibling=te,H=te,Q=Le}if(K===h.length)return n(m,Q),ge&&rn(m,K),$;if(Q===null){for(;KK?(Le=Q,Q=null):Le=Q.sibling;var qt=x(m,Q,te.value,N);if(qt===null){Q===null&&(Q=Le);break}e&&Q&&qt.alternate===null&&t(m,Q),d=o(qt,d,K),H===null?$=qt:H.sibling=qt,H=qt,Q=Le}if(te.done)return n(m,Q),ge&&rn(m,K),$;if(Q===null){for(;!te.done;K++,te=h.next())te=P(m,te.value,N),te!==null&&(d=o(te,d,K),H===null?$=te:H.sibling=te,H=te);return ge&&rn(m,K),$}for(Q=r(m,Q);!te.done;K++,te=h.next())te=I(Q,m,K,te.value,N),te!==null&&(e&&te.alternate!==null&&Q.delete(te.key===null?K:te.key),d=o(te,d,K),H===null?$=te:H.sibling=te,H=te);return e&&Q.forEach(function(xd){return t(m,xd)}),ge&&rn(m,K),$}function xe(m,d,h,N){if(typeof h=="object"&&h!==null&&h.type===ve&&h.key===null&&(h=h.props.children),typeof h=="object"&&h!==null){switch(h.$$typeof){case Me:e:{for(var $=h.key,H=d;H!==null;){if(H.key===$){if($=h.type,$===ve){if(H.tag===7){n(m,H.sibling),d=l(H,h.props.children),d.return=m,m=d;break e}}else if(H.elementType===$||typeof $=="object"&&$!==null&&$.$$typeof===Ce&&Ns($)===H.type){n(m,H.sibling),d=l(H,h.props),d.ref=fr(m,H,h),d.return=m,m=d;break e}n(m,H);break}else t(m,H);H=H.sibling}h.type===ve?(d=dn(h.props.children,m.mode,N,h.key),d.return=m,m=d):(N=Ml(h.type,h.key,h.props,null,m.mode,N),N.ref=fr(m,d,h),N.return=m,m=N)}return i(m);case ie:e:{for(H=h.key;d!==null;){if(d.key===H)if(d.tag===4&&d.stateNode.containerInfo===h.containerInfo&&d.stateNode.implementation===h.implementation){n(m,d.sibling),d=l(d,h.children||[]),d.return=m,m=d;break e}else{n(m,d);break}else t(m,d);d=d.sibling}d=ji(h,m.mode,N),d.return=m,m=d}return i(m);case Ce:return H=h._init,xe(m,d,H(h._payload),N)}if($n(h))return A(m,d,h,N);if(V(h))return F(m,d,h,N);pl(m,h)}return typeof h=="string"&&h!==""||typeof h=="number"?(h=""+h,d!==null&&d.tag===6?(n(m,d.sibling),d=l(d,h),d.return=m,m=d):(n(m,d),d=Mi(h,m.mode,N),d.return=m,m=d),i(m)):n(m,d)}return xe}var jn=zs(!0),Ts=zs(!1),dr={},kt=$t(dr),pr=$t(dr),mr=$t(dr);function on(e){if(e===dr)throw Error(s(174));return e}function Zo(e,t){switch(ae(mr,t),ae(pr,e),ae(kt,dr),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Yl(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Yl(t,e)}pe(kt),ae(kt,t)}function In(){pe(kt),pe(pr),pe(mr)}function Rs(e){on(mr.current);var t=on(kt.current),n=Yl(t,e.type);t!==n&&(ae(pr,e),ae(kt,n))}function qo(e){pr.current===e&&(pe(kt),pe(pr))}var ye=$t(0);function ml(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Jo=[];function bo(){for(var e=0;en?n:4,e(!0);var r=ei.transition;ei.transition={};try{e(!1),t()}finally{le=n,ei.transition=r}}function Ys(){return it().memoizedState}function Gf(e,t,n){var r=Yt(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Xs(e))Zs(t,n);else if(n=ws(e,t,n,r),n!==null){var l=Ve();gt(n,e,r,l),qs(n,t,r)}}function Kf(e,t,n){var r=Yt(e),l={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Xs(e))Zs(t,l);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var i=t.lastRenderedState,a=o(i,n);if(l.hasEagerState=!0,l.eagerState=a,dt(a,i)){var f=t.interleaved;f===null?(l.next=l,Go(t)):(l.next=f.next,f.next=l),t.interleaved=l;return}}catch{}finally{}n=ws(e,t,l,r),n!==null&&(l=Ve(),gt(n,e,r,l),qs(n,t,r))}}function Xs(e){var t=e.alternate;return e===we||t!==null&&t===we}function Zs(e,t){hr=vl=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function qs(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,io(e,n)}}var wl={readContext:ot,useCallback:Fe,useContext:Fe,useEffect:Fe,useImperativeHandle:Fe,useInsertionEffect:Fe,useLayoutEffect:Fe,useMemo:Fe,useReducer:Fe,useRef:Fe,useState:Fe,useDebugValue:Fe,useDeferredValue:Fe,useTransition:Fe,useMutableSource:Fe,useSyncExternalStore:Fe,useId:Fe,unstable_isNewReconciler:!1},Yf={readContext:ot,useCallback:function(e,t){return xt().memoizedState=[e,t===void 0?null:t],e},useContext:ot,useEffect:$s,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,gl(4194308,4,Bs.bind(null,t,e),n)},useLayoutEffect:function(e,t){return gl(4194308,4,e,t)},useInsertionEffect:function(e,t){return gl(4,2,e,t)},useMemo:function(e,t){var n=xt();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=xt();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=Gf.bind(null,we,e),[r.memoizedState,e]},useRef:function(e){var t=xt();return e={current:e},t.memoizedState=e},useState:Fs,useDebugValue:ui,useDeferredValue:function(e){return xt().memoizedState=e},useTransition:function(){var e=Fs(!1),t=e[0];return e=Qf.bind(null,e[1]),xt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=we,l=xt();if(ge){if(n===void 0)throw Error(s(407));n=n()}else{if(n=t(),Re===null)throw Error(s(349));un&30||js(r,t,n)}l.memoizedState=n;var o={value:n,getSnapshot:t};return l.queue=o,$s(Os.bind(null,r,o,e),[e]),r.flags|=2048,yr(9,Is.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=xt(),t=Re.identifierPrefix;if(ge){var n=zt,r=Nt;n=(r&~(1<<32-ft(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=vr++,0")&&(f=f.replace("",e.displayName)),f}while(1<=i&&0<=a);break}}}finally{G=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?U(e):""}function se(e){switch(e.tag){case 5:return U(e.type);case 16:return U("Lazy");case 13:return U("Suspense");case 19:return U("SuspenseList");case 0:case 2:case 15:return e=Z(e.type,!1),e;case 11:return e=Z(e.type.render,!1),e;case 1:return e=Z(e.type,!0),e;default:return""}}function ne(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case ve:return"Fragment";case ie:return"Portal";case nt:return"Profiler";case ze:return"StrictMode";case Oe:return"Suspense";case De:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case ct:return(e.displayName||"Context")+".Consumer";case Ze:return(e._context.displayName||"Context")+".Provider";case b:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case qe:return t=e.displayName||null,t!==null?t:ne(e.type)||"Memo";case Ce:t=e._payload,e=e._init;try{return ne(e(t))}catch{}}return null}function ue(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return ne(t);case 8:return t===ze?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function re(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Be(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function _c(e){var t=Be(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var l=n.get,o=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return l.call(this)},set:function(i){r=""+i,o.call(this,i)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(i){r=""+i},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function Lr(e){e._valueTracker||(e._valueTracker=_c(e))}function Yi(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=Be(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Mr(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Hl(e,t){var n=t.checked;return c({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Xi(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=re(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Zi(e,t){t=t.checked,t!=null&&Ne(e,"checked",t,!1)}function Ql(e,t){Zi(e,t);var n=re(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?Gl(e,t.type,n):t.hasOwnProperty("defaultValue")&&Gl(e,t.type,re(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function qi(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function Gl(e,t,n){(t!=="number"||Mr(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var $n=Array.isArray;function hn(e,t,n,r){if(e=e.options,t){t={};for(var l=0;l"+t.valueOf().toString()+"",t=jr.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Wn(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Vn={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Pc=["Webkit","ms","Moz","O"];Object.keys(Vn).forEach(function(e){Pc.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Vn[t]=Vn[e]})});function ru(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Vn.hasOwnProperty(e)&&Vn[e]?(""+t).trim():t+"px"}function lu(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,l=ru(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,l):e[n]=l}}var Nc=c({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Xl(e,t){if(t){if(Nc[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(s(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(s(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(s(61))}if(t.style!=null&&typeof t.style!="object")throw Error(s(62))}}function Zl(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var ql=null;function Jl(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var bl=null,vn=null,gn=null;function ou(e){if(e=cr(e)){if(typeof bl!="function")throw Error(s(280));var t=e.stateNode;t&&(t=nl(t),bl(e.stateNode,e.type,t))}}function iu(e){vn?gn?gn.push(e):gn=[e]:vn=e}function uu(){if(vn){var e=vn,t=gn;if(gn=vn=null,ou(e),t)for(e=0;e>>=0,e===0?32:31-(Fc(e)/Uc|0)|0}var Fr=64,Ur=4194304;function Gn(e){switch(e&-e){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: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 e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function $r(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,l=e.suspendedLanes,o=e.pingedLanes,i=n&268435455;if(i!==0){var a=i&~l;a!==0?r=Gn(a):(o&=i,o!==0&&(r=Gn(o)))}else i=n&~l,i!==0?r=Gn(i):o!==0&&(r=Gn(o));if(r===0)return 0;if(t!==0&&t!==r&&!(t&l)&&(l=r&-r,o=t&-t,l>=o||l===16&&(o&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function Kn(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-ft(t),e[t]=n}function Bc(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=tr),Ou=" ",Du=!1;function Au(e,t){switch(e){case"keyup":return yf.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Fu(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Sn=!1;function Sf(e,t){switch(e){case"compositionend":return Fu(t);case"keypress":return t.which!==32?null:(Du=!0,Ou);case"textInput":return e=t.data,e===Ou&&Du?null:e;default:return null}}function kf(e,t){if(Sn)return e==="compositionend"||!yo&&Au(e,t)?(e=Tu(),Qr=fo=At=null,Sn=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=Qu(n)}}function Ku(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Ku(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Yu(){for(var e=window,t=Mr();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Mr(e.document)}return t}function ko(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function Rf(e){var t=Yu(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Ku(n.ownerDocument.documentElement,n)){if(r!==null&&ko(n)){if(t=r.start,e=r.end,e===void 0&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if(e=(t=n.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var l=n.textContent.length,o=Math.min(r.start,l);r=r.end===void 0?o:Math.min(r.end,l),!e.extend&&o>r&&(l=r,r=o,o=l),l=Gu(n,o);var i=Gu(n,r);l&&i&&(e.rangeCount!==1||e.anchorNode!==l.node||e.anchorOffset!==l.offset||e.focusNode!==i.node||e.focusOffset!==i.offset)&&(t=t.createRange(),t.setStart(l.node,l.offset),e.removeAllRanges(),o>r?(e.addRange(t),e.extend(i.node,i.offset)):(t.setEnd(i.node,i.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,kn=null,xo=null,or=null,Eo=!1;function Xu(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Eo||kn==null||kn!==Mr(r)||(r=kn,"selectionStart"in r&&ko(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),or&&lr(or,r)||(or=r,r=br(xo,"onSelect"),0Pn||(e.current=Oo[Pn],Oo[Pn]=null,Pn--)}function ae(e,t){Pn++,Oo[Pn]=e.current,e.current=t}var Wt={},Ae=$t(Wt),He=$t(!1),tn=Wt;function Nn(e,t){var n=e.type.contextTypes;if(!n)return Wt;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var l={},o;for(o in n)l[o]=t[o];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=l),l}function Qe(e){return e=e.childContextTypes,e!=null}function rl(){pe(He),pe(Ae)}function cs(e,t,n){if(Ae.current!==Wt)throw Error(s(168));ae(Ae,t),ae(He,n)}function fs(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var l in r)if(!(l in t))throw Error(s(108,ue(e)||"Unknown",l));return c({},n,r)}function ll(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Wt,tn=Ae.current,ae(Ae,e),ae(He,He.current),!0}function ds(e,t,n){var r=e.stateNode;if(!r)throw Error(s(169));n?(e=fs(e,t,tn),r.__reactInternalMemoizedMergedChildContext=e,pe(He),pe(Ae),ae(Ae,e)):pe(He),ae(He,n)}var Pt=null,ol=!1,Do=!1;function ps(e){Pt===null?Pt=[e]:Pt.push(e)}function Vf(e){ol=!0,ps(e)}function Vt(){if(!Do&&Pt!==null){Do=!0;var e=0,t=le;try{var n=Pt;for(le=1;e>=i,l-=i,Nt=1<<32-ft(t)+l|n<K?(Le=Q,Q=null):Le=Q.sibling;var te=x(m,Q,h[K],N);if(te===null){Q===null&&(Q=Le);break}e&&Q&&te.alternate===null&&t(m,Q),d=o(te,d,K),H===null?$=te:H.sibling=te,H=te,Q=Le}if(K===h.length)return n(m,Q),ge&&rn(m,K),$;if(Q===null){for(;KK?(Le=Q,Q=null):Le=Q.sibling;var qt=x(m,Q,te.value,N);if(qt===null){Q===null&&(Q=Le);break}e&&Q&&qt.alternate===null&&t(m,Q),d=o(qt,d,K),H===null?$=qt:H.sibling=qt,H=qt,Q=Le}if(te.done)return n(m,Q),ge&&rn(m,K),$;if(Q===null){for(;!te.done;K++,te=h.next())te=P(m,te.value,N),te!==null&&(d=o(te,d,K),H===null?$=te:H.sibling=te,H=te);return ge&&rn(m,K),$}for(Q=r(m,Q);!te.done;K++,te=h.next())te=I(Q,m,K,te.value,N),te!==null&&(e&&te.alternate!==null&&Q.delete(te.key===null?K:te.key),d=o(te,d,K),H===null?$=te:H.sibling=te,H=te);return e&&Q.forEach(function(xd){return t(m,xd)}),ge&&rn(m,K),$}function xe(m,d,h,N){if(typeof h=="object"&&h!==null&&h.type===ve&&h.key===null&&(h=h.props.children),typeof h=="object"&&h!==null){switch(h.$$typeof){case Me:e:{for(var $=h.key,H=d;H!==null;){if(H.key===$){if($=h.type,$===ve){if(H.tag===7){n(m,H.sibling),d=l(H,h.props.children),d.return=m,m=d;break e}}else if(H.elementType===$||typeof $=="object"&&$!==null&&$.$$typeof===Ce&&Ns($)===H.type){n(m,H.sibling),d=l(H,h.props),d.ref=fr(m,H,h),d.return=m,m=d;break e}n(m,H);break}else t(m,H);H=H.sibling}h.type===ve?(d=dn(h.props.children,m.mode,N,h.key),d.return=m,m=d):(N=jl(h.type,h.key,h.props,null,m.mode,N),N.ref=fr(m,d,h),N.return=m,m=N)}return i(m);case ie:e:{for(H=h.key;d!==null;){if(d.key===H)if(d.tag===4&&d.stateNode.containerInfo===h.containerInfo&&d.stateNode.implementation===h.implementation){n(m,d.sibling),d=l(d,h.children||[]),d.return=m,m=d;break e}else{n(m,d);break}else t(m,d);d=d.sibling}d=ji(h,m.mode,N),d.return=m,m=d}return i(m);case Ce:return H=h._init,xe(m,d,H(h._payload),N)}if($n(h))return A(m,d,h,N);if(V(h))return F(m,d,h,N);ml(m,h)}return typeof h=="string"&&h!==""||typeof h=="number"?(h=""+h,d!==null&&d.tag===6?(n(m,d.sibling),d=l(d,h),d.return=m,m=d):(n(m,d),d=Mi(h,m.mode,N),d.return=m,m=d),i(m)):n(m,d)}return xe}var jn=zs(!0),Ts=zs(!1),dr={},kt=$t(dr),pr=$t(dr),mr=$t(dr);function on(e){if(e===dr)throw Error(s(174));return e}function Zo(e,t){switch(ae(mr,t),ae(pr,e),ae(kt,dr),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:Yl(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=Yl(t,e)}pe(kt),ae(kt,t)}function In(){pe(kt),pe(pr),pe(mr)}function Rs(e){on(mr.current);var t=on(kt.current),n=Yl(t,e.type);t!==n&&(ae(pr,e),ae(kt,n))}function qo(e){pr.current===e&&(pe(kt),pe(pr))}var ye=$t(0);function hl(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Jo=[];function bo(){for(var e=0;en?n:4,e(!0);var r=ei.transition;ei.transition={};try{e(!1),t()}finally{le=n,ei.transition=r}}function Ys(){return it().memoizedState}function Gf(e,t,n){var r=Yt(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Xs(e))Zs(t,n);else if(n=ws(e,t,n,r),n!==null){var l=Ve();gt(n,e,r,l),qs(n,t,r)}}function Kf(e,t,n){var r=Yt(e),l={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Xs(e))Zs(t,l);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var i=t.lastRenderedState,a=o(i,n);if(l.hasEagerState=!0,l.eagerState=a,dt(a,i)){var f=t.interleaved;f===null?(l.next=l,Go(t)):(l.next=f.next,f.next=l),t.interleaved=l;return}}catch{}finally{}n=ws(e,t,l,r),n!==null&&(l=Ve(),gt(n,e,r,l),qs(n,t,r))}}function Xs(e){var t=e.alternate;return e===we||t!==null&&t===we}function Zs(e,t){hr=gl=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function qs(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,io(e,n)}}var Sl={readContext:ot,useCallback:Fe,useContext:Fe,useEffect:Fe,useImperativeHandle:Fe,useInsertionEffect:Fe,useLayoutEffect:Fe,useMemo:Fe,useReducer:Fe,useRef:Fe,useState:Fe,useDebugValue:Fe,useDeferredValue:Fe,useTransition:Fe,useMutableSource:Fe,useSyncExternalStore:Fe,useId:Fe,unstable_isNewReconciler:!1},Yf={readContext:ot,useCallback:function(e,t){return xt().memoizedState=[e,t===void 0?null:t],e},useContext:ot,useEffect:$s,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,yl(4194308,4,Bs.bind(null,t,e),n)},useLayoutEffect:function(e,t){return yl(4194308,4,e,t)},useInsertionEffect:function(e,t){return yl(4,2,e,t)},useMemo:function(e,t){var n=xt();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=xt();return t=n!==void 0?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=Gf.bind(null,we,e),[r.memoizedState,e]},useRef:function(e){var t=xt();return e={current:e},t.memoizedState=e},useState:Fs,useDebugValue:ui,useDeferredValue:function(e){return xt().memoizedState=e},useTransition:function(){var e=Fs(!1),t=e[0];return e=Qf.bind(null,e[1]),xt().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=we,l=xt();if(ge){if(n===void 0)throw Error(s(407));n=n()}else{if(n=t(),Re===null)throw Error(s(349));un&30||js(r,t,n)}l.memoizedState=n;var o={value:n,getSnapshot:t};return l.queue=o,$s(Os.bind(null,r,o,e),[e]),r.flags|=2048,yr(9,Is.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=xt(),t=Re.identifierPrefix;if(ge){var n=zt,r=Nt;n=(r&~(1<<32-ft(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=vr++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=i.createElement(n,{is:r.is}):(e=i.createElement(n),n==="select"&&(i=e,r.multiple?i.multiple=!0:r.size&&(i.size=r.size))):e=i.createElementNS(e,n),e[St]=t,e[ar]=r,ma(e,t,!1,!1),t.stateNode=e;e:{switch(i=Zl(n,r),n){case"dialog":de("cancel",e),de("close",e),l=r;break;case"iframe":case"object":case"embed":de("load",e),l=r;break;case"video":case"audio":for(l=0;lFn&&(t.flags|=128,r=!0,wr(o,!1),t.lanes=4194304)}else{if(!r)if(e=ml(i),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),wr(o,!0),o.tail===null&&o.tailMode==="hidden"&&!i.alternate&&!ge)return Ue(t),null}else 2*ke()-o.renderingStartTime>Fn&&n!==1073741824&&(t.flags|=128,r=!0,wr(o,!1),t.lanes=4194304);o.isBackwards?(i.sibling=t.child,t.child=i):(n=o.last,n!==null?n.sibling=i:t.child=i,o.last=i)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=ke(),t.sibling=null,n=ye.current,ae(ye,r?n&1|2:n&1),t):(Ue(t),null);case 22:case 23:return Ti(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?tt&1073741824&&(Ue(t),t.subtreeFlags&6&&(t.flags|=8192)):Ue(t),null;case 24:return null;case 25:return null}throw Error(s(156,t.tag))}function nd(e,t){switch(Fo(t),t.tag){case 1:return Qe(t.type)&&nl(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return In(),pe(He),pe(Ae),bo(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return qo(t),null;case 13:if(pe(ye),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(s(340));Rn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return pe(ye),null;case 4:return In(),null;case 10:return Ho(t.type._context),null;case 22:case 23:return Ti(),null;case 24:return null;default:return null}}var xl=!1,$e=!1,rd=typeof WeakSet=="function"?WeakSet:Set,D=null;function Dn(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Se(e,t,r)}else n.current=null}function gi(e,t,n){try{n()}catch(r){Se(e,t,r)}}var ga=!1;function ld(e,t){if(To=Vr,e=Yu(),ko(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var l=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var i=0,a=-1,f=-1,v=0,E=0,P=e,x=null;t:for(;;){for(var I;P!==n||l!==0&&P.nodeType!==3||(a=i+l),P!==o||r!==0&&P.nodeType!==3||(f=i+r),P.nodeType===3&&(i+=P.nodeValue.length),(I=P.firstChild)!==null;)x=P,P=I;for(;;){if(P===e)break t;if(x===n&&++v===l&&(a=i),x===o&&++E===r&&(f=i),(I=P.nextSibling)!==null)break;P=x,x=P.parentNode}P=I}n=a===-1||f===-1?null:{start:a,end:f}}else n=null}n=n||{start:0,end:0}}else n=null;for(Ro={focusedElem:e,selectionRange:n},Vr=!1,D=t;D!==null;)if(t=D,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,D=e;else for(;D!==null;){t=D;try{var A=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(A!==null){var F=A.memoizedProps,xe=A.memoizedState,m=t.stateNode,d=m.getSnapshotBeforeUpdate(t.elementType===t.type?F:mt(t.type,F),xe);m.__reactInternalSnapshotBeforeUpdate=d}break;case 3:var h=t.stateNode.containerInfo;h.nodeType===1?h.textContent="":h.nodeType===9&&h.documentElement&&h.removeChild(h.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(s(163))}}catch(N){Se(t,t.return,N)}if(e=t.sibling,e!==null){e.return=t.return,D=e;break}D=t.return}return A=ga,ga=!1,A}function Sr(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var l=r=r.next;do{if((l.tag&e)===e){var o=l.destroy;l.destroy=void 0,o!==void 0&&gi(t,n,o)}l=l.next}while(l!==r)}}function El(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function yi(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function ya(e){var t=e.alternate;t!==null&&(e.alternate=null,ya(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[St],delete t[ar],delete t[Io],delete t[$f],delete t[Wf])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function wa(e){return e.tag===5||e.tag===3||e.tag===4}function Sa(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||wa(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function wi(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=el));else if(r!==4&&(e=e.child,e!==null))for(wi(e,t,n),e=e.sibling;e!==null;)wi(e,t,n),e=e.sibling}function Si(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Si(e,t,n),e=e.sibling;e!==null;)Si(e,t,n),e=e.sibling}var je=null,ht=!1;function Qt(e,t,n){for(n=n.child;n!==null;)ka(e,t,n),n=n.sibling}function ka(e,t,n){if(wt&&typeof wt.onCommitFiberUnmount=="function")try{wt.onCommitFiberUnmount(Dr,n)}catch{}switch(n.tag){case 5:$e||Dn(n,t);case 6:var r=je,l=ht;je=null,Qt(e,t,n),je=r,ht=l,je!==null&&(ht?(e=je,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):je.removeChild(n.stateNode));break;case 18:je!==null&&(ht?(e=je,n=n.stateNode,e.nodeType===8?jo(e.parentNode,n):e.nodeType===1&&jo(e,n),Jn(e)):jo(je,n.stateNode));break;case 4:r=je,l=ht,je=n.stateNode.containerInfo,ht=!0,Qt(e,t,n),je=r,ht=l;break;case 0:case 11:case 14:case 15:if(!$e&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){l=r=r.next;do{var o=l,i=o.destroy;o=o.tag,i!==void 0&&(o&2||o&4)&&gi(n,t,i),l=l.next}while(l!==r)}Qt(e,t,n);break;case 1:if(!$e&&(Dn(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){Se(n,t,a)}Qt(e,t,n);break;case 21:Qt(e,t,n);break;case 22:n.mode&1?($e=(r=$e)||n.memoizedState!==null,Qt(e,t,n),$e=r):Qt(e,t,n);break;default:Qt(e,t,n)}}function xa(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new rd),t.forEach(function(r){var l=pd.bind(null,e,r);n.has(r)||(n.add(r),r.then(l,l))})}}function vt(e,t){var n=t.deletions;if(n!==null)for(var r=0;rl&&(l=i),r&=~o}if(r=l,r=ke()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*id(r/1960))-r,10e?16:e,Kt===null)var r=!1;else{if(e=Kt,Kt=null,zl=0,ee&6)throw Error(s(331));var l=ee;for(ee|=4,D=e.current;D!==null;){var o=D,i=o.child;if(D.flags&16){var a=o.deletions;if(a!==null){for(var f=0;fke()-Ei?cn(e,0):xi|=n),Ye(e,t)}function Oa(e,t){t===0&&(e.mode&1?(t=Fr,Fr<<=1,!(Fr&130023424)&&(Fr=4194304)):t=1);var n=Ve();e=Tt(e,t),e!==null&&(Kn(e,t,n),Ye(e,n))}function dd(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Oa(e,n)}function pd(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,l=e.memoizedState;l!==null&&(n=l.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(s(314))}r!==null&&r.delete(t),Oa(e,n)}var Da;Da=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||He.current)Ge=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Ge=!1,ed(e,t,n);Ge=!!(e.flags&131072)}else Ge=!1,ge&&t.flags&1048576&&ms(t,il,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;kl(e,t),e=t.pendingProps;var l=Nn(t,Ae.current);Mn(t,n),l=ni(null,t,r,e,l,n);var o=ri();return t.flags|=1,typeof l=="object"&&l!==null&&typeof l.render=="function"&&l.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Qe(r)?(o=!0,rl(t)):o=!1,t.memoizedState=l.state!==null&&l.state!==void 0?l.state:null,Ko(t),l.updater=dl,t.stateNode=l,l._reactInternals=t,Xo(t,r,e,n),t=fi(null,t,r,!0,o,n)):(t.tag=0,ge&&o&&Ao(t),We(null,t,l,n),t=t.child),t;case 16:r=t.elementType;e:{switch(kl(e,t),e=t.pendingProps,l=r._init,r=l(r._payload),t.type=r,l=t.tag=hd(r),e=mt(r,e),l){case 0:t=ci(null,t,r,e,n);break e;case 1:t=sa(null,t,r,e,n);break e;case 11:t=ra(null,t,r,e,n);break e;case 14:t=la(null,t,r,mt(r.type,e),n);break e}throw Error(s(306,r,""))}return t;case 0:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:mt(r,l),ci(e,t,r,l,n);case 1:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:mt(r,l),sa(e,t,r,l,n);case 3:e:{if(aa(t),e===null)throw Error(s(387));r=t.pendingProps,o=t.memoizedState,l=o.element,Ss(e,t),fl(t,r,null,n);var i=t.memoizedState;if(r=i.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:i.cache,pendingSuspenseBoundaries:i.pendingSuspenseBoundaries,transitions:i.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){l=On(Error(s(423)),t),t=ca(e,t,r,n,l);break e}else if(r!==l){l=On(Error(s(424)),t),t=ca(e,t,r,n,l);break e}else for(et=Ut(t.stateNode.containerInfo.firstChild),be=t,ge=!0,pt=null,n=Ts(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Rn(),r===l){t=Lt(e,t,n);break e}We(e,t,r,n)}t=t.child}return t;case 5:return Rs(t),e===null&&$o(t),r=t.type,l=t.pendingProps,o=e!==null?e.memoizedProps:null,i=l.children,Lo(r,l)?i=null:o!==null&&Lo(r,o)&&(t.flags|=32),ua(e,t),We(e,t,i,n),t.child;case 6:return e===null&&$o(t),null;case 13:return fa(e,t,n);case 4:return Zo(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=jn(t,null,r,n):We(e,t,r,n),t.child;case 11:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:mt(r,l),ra(e,t,r,l,n);case 7:return We(e,t,t.pendingProps,n),t.child;case 8:return We(e,t,t.pendingProps.children,n),t.child;case 12:return We(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,l=t.pendingProps,o=t.memoizedProps,i=l.value,ae(sl,r._currentValue),r._currentValue=i,o!==null)if(dt(o.value,i)){if(o.children===l.children&&!He.current){t=Lt(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var a=o.dependencies;if(a!==null){i=o.child;for(var f=a.firstContext;f!==null;){if(f.context===r){if(o.tag===1){f=Rt(-1,n&-n),f.tag=2;var v=o.updateQueue;if(v!==null){v=v.shared;var E=v.pending;E===null?f.next=f:(f.next=E.next,E.next=f),v.pending=f}}o.lanes|=n,f=o.alternate,f!==null&&(f.lanes|=n),Qo(o.return,n,t),a.lanes|=n;break}f=f.next}}else if(o.tag===10)i=o.type===t.type?null:o.child;else if(o.tag===18){if(i=o.return,i===null)throw Error(s(341));i.lanes|=n,a=i.alternate,a!==null&&(a.lanes|=n),Qo(i,n,t),i=o.sibling}else i=o.child;if(i!==null)i.return=o;else for(i=o;i!==null;){if(i===t){i=null;break}if(o=i.sibling,o!==null){o.return=i.return,i=o;break}i=i.return}o=i}We(e,t,l.children,n),t=t.child}return t;case 9:return l=t.type,r=t.pendingProps.children,Mn(t,n),l=ot(l),r=r(l),t.flags|=1,We(e,t,r,n),t.child;case 14:return r=t.type,l=mt(r,t.pendingProps),l=mt(r.type,l),la(e,t,r,l,n);case 15:return oa(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:mt(r,l),kl(e,t),t.tag=1,Qe(r)?(e=!0,rl(t)):e=!1,Mn(t,n),_s(t,r,l),Xo(t,r,l,n),fi(null,t,r,!0,e,n);case 19:return pa(e,t,n);case 22:return ia(e,t,n)}throw Error(s(156,t.tag))};function Aa(e,t){return hu(e,t)}function md(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function st(e,t,n,r){return new md(e,t,n,r)}function Li(e){return e=e.prototype,!(!e||!e.isReactComponent)}function hd(e){if(typeof e=="function")return Li(e)?1:0;if(e!=null){if(e=e.$$typeof,e===b)return 11;if(e===qe)return 14}return 2}function Zt(e,t){var n=e.alternate;return n===null?(n=st(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Ml(e,t,n,r,l,o){var i=2;if(r=e,typeof e=="function")Li(e)&&(i=1);else if(typeof e=="string")i=5;else e:switch(e){case ve:return dn(n.children,l,o,t);case ze:i=8,l|=8;break;case nt:return e=st(12,n,t,l|2),e.elementType=nt,e.lanes=o,e;case Oe:return e=st(13,n,t,l),e.elementType=Oe,e.lanes=o,e;case De:return e=st(19,n,t,l),e.elementType=De,e.lanes=o,e;case fe:return jl(n,l,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Ze:i=10;break e;case ct:i=9;break e;case b:i=11;break e;case qe:i=14;break e;case Ce:i=16,r=null;break e}throw Error(s(130,e==null?e:typeof e,""))}return t=st(i,n,t,l),t.elementType=e,t.type=r,t.lanes=o,t}function dn(e,t,n,r){return e=st(7,e,r,t),e.lanes=n,e}function jl(e,t,n,r){return e=st(22,e,r,t),e.elementType=fe,e.lanes=n,e.stateNode={isHidden:!1},e}function Mi(e,t,n){return e=st(6,e,null,t),e.lanes=n,e}function ji(e,t,n){return t=st(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function vd(e,t,n,r,l){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=oo(0),this.expirationTimes=oo(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=oo(0),this.identifierPrefix=r,this.onRecoverableError=l,this.mutableSourceEagerHydrationData=null}function Ii(e,t,n,r,l,o,i,a,f){return e=new vd(e,t,n,a,f),t===1?(t=1,o===!0&&(t|=8)):t=0,o=st(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Ko(o),e}function gd(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(fc)}catch(u){console.error(u)}}fc(),ac.exports=Nd();var zd=ac.exports,Ka=zd;Wl.createRoot=Ka.createRoot,Wl.hydrateRoot=Ka.hydrateRoot;function Td(u){return u instanceof Function||typeof u=="function"}function $i(u,p){var y;const s=(y=p.configEntries[u])==null?void 0:y[0];if(!s)return;const g=s.configValue;if(typeof g=="string")return g;if(!g)return null;if(Td(g)){const C=g(p);if(typeof C!="string")throw new Error(s.configDefinedAt+" should return a string");return C}else throw new Error(s.configDefinedAt+" should be a string or a function returning a string")}function Rd(u,p){const s=globalThis[Ya]=globalThis[Ya]||{};return s[u]=s[u]||p}const Ya="_vike_react",dc=Rd("PageContextProvider.ts",{reactContext:Ct.createContext(void 0)});function Ld({pageContext:u,children:p}){const{reactContext:s}=dc;return Ct.createElement(s.Provider,{value:u},p)}function Md(){const{reactContext:u}=dc;return Y.useContext(u)}function jd(u){const{Page:p}=u;let s=p?Ct.createElement(p,null):null;return[...u.config.Layout||[],...u.config.Wrapper||[]].forEach(g=>{s=Ct.createElement(g,null,s)}),s=Ct.createElement(Ld,{pageContext:u},s),u.config.reactStrictMode!==!1&&(s=Ct.createElement(Ct.StrictMode,null,s)),s}let _r;const Yp=u=>{var y,C,k,w;(C=(y=u.config).onBeforeRenderClient)==null||C.call(y,u);const p=jd(u),s=(_,L)=>{},g=document.getElementById("root");if(g.innerHTML!==""&&u.isHydration)_r=Wl.hydrateRoot(g,p,{onUncaughtError:s});else{if(!_r)_r=Wl.createRoot(g,{onUncaughtError:s});else{const _=$i("title",u)||"",L=$i("lang",u)||"en",T=$i("favicon",u);_!==void 0&&(document.title=_),L!==void 0&&(document.documentElement.lang=L),T!==void 0&&Id(T)}_r.render(p)}u.page=p,u.root=_r,(w=(k=u.config).onAfterRenderClient)==null||w.call(k,u)};function Id(u){let p=document.querySelector("link[rel~='icon']");if(!u){p&&document.head.removeChild(p);return}p||(p=document.createElement("link"),p.rel="icon",document.head.appendChild(p)),p.href=u}var pc={exports:{}},Pr={};/** +`+o.stack}return{value:e,source:t,stack:l,digest:null}}function si(e,t,n){return{value:e,source:null,stack:n??null,digest:t??null}}function ai(e,t){try{console.error(t.value)}catch(n){setTimeout(function(){throw n})}}var qf=typeof WeakMap=="function"?WeakMap:Map;function Js(e,t,n){n=Rt(-1,n),n.tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Nl||(Nl=!0,Ci=r),ai(e,t)},n}function bs(e,t,n){n=Rt(-1,n),n.tag=3;var r=e.type.getDerivedStateFromError;if(typeof r=="function"){var l=t.value;n.payload=function(){return r(l)},n.callback=function(){ai(e,t)}}var o=e.stateNode;return o!==null&&typeof o.componentDidCatch=="function"&&(n.callback=function(){ai(e,t),typeof r!="function"&&(Gt===null?Gt=new Set([this]):Gt.add(this));var i=t.stack;this.componentDidCatch(t.value,{componentStack:i!==null?i:""})}),n}function ea(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new qf;var l=new Set;r.set(t,l)}else l=r.get(t),l===void 0&&(l=new Set,r.set(t,l));l.has(n)||(l.add(n),e=fd.bind(null,e,t,n),t.then(e,e))}function ta(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function na(e,t,n,r,l){return e.mode&1?(e.flags|=65536,e.lanes=l,e):(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,n.tag===1&&(n.alternate===null?n.tag=17:(t=Rt(-1,1),t.tag=2,Ht(n,t,1))),n.lanes|=1),e)}var Jf=ce.ReactCurrentOwner,Ge=!1;function We(e,t,n,r){t.child=e===null?Ts(t,null,n,r):jn(t,e.child,n,r)}function ra(e,t,n,r,l){n=n.render;var o=t.ref;return Mn(t,l),r=ni(e,t,n,r,o,l),n=ri(),e!==null&&!Ge?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l,Lt(e,t,l)):(ge&&n&&Ao(t),t.flags|=1,We(e,t,r,l),t.child)}function la(e,t,n,r,l){if(e===null){var o=n.type;return typeof o=="function"&&!Li(o)&&o.defaultProps===void 0&&n.compare===null&&n.defaultProps===void 0?(t.tag=15,t.type=o,oa(e,t,o,r,l)):(e=jl(n.type,null,r,t,t.mode,l),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,!(e.lanes&l)){var i=o.memoizedProps;if(n=n.compare,n=n!==null?n:lr,n(i,r)&&e.ref===t.ref)return Lt(e,t,l)}return t.flags|=1,e=Zt(o,r),e.ref=t.ref,e.return=t,t.child=e}function oa(e,t,n,r,l){if(e!==null){var o=e.memoizedProps;if(lr(o,r)&&e.ref===t.ref)if(Ge=!1,t.pendingProps=r=o,(e.lanes&l)!==0)e.flags&131072&&(Ge=!0);else return t.lanes=e.lanes,Lt(e,t,l)}return ci(e,t,n,r,l)}function ia(e,t,n){var r=t.pendingProps,l=r.children,o=e!==null?e.memoizedState:null;if(r.mode==="hidden")if(!(t.mode&1))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},ae(An,tt),tt|=n;else{if(!(n&1073741824))return e=o!==null?o.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,ae(An,tt),tt|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=o!==null?o.baseLanes:n,ae(An,tt),tt|=r}else o!==null?(r=o.baseLanes|n,t.memoizedState=null):r=n,ae(An,tt),tt|=r;return We(e,t,l,n),t.child}function ua(e,t){var n=t.ref;(e===null&&n!==null||e!==null&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function ci(e,t,n,r,l){var o=Qe(n)?tn:Ae.current;return o=Nn(t,o),Mn(t,l),n=ni(e,t,n,r,o,l),r=ri(),e!==null&&!Ge?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~l,Lt(e,t,l)):(ge&&r&&Ao(t),t.flags|=1,We(e,t,n,l),t.child)}function sa(e,t,n,r,l){if(Qe(n)){var o=!0;ll(t)}else o=!1;if(Mn(t,l),t.stateNode===null)xl(e,t),_s(t,n,r),Xo(t,n,r,l),r=!0;else if(e===null){var i=t.stateNode,a=t.memoizedProps;i.props=a;var f=i.context,v=n.contextType;typeof v=="object"&&v!==null?v=ot(v):(v=Qe(n)?tn:Ae.current,v=Nn(t,v));var E=n.getDerivedStateFromProps,P=typeof E=="function"||typeof i.getSnapshotBeforeUpdate=="function";P||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(a!==r||f!==v)&&Ps(t,i,r,v),Bt=!1;var x=t.memoizedState;i.state=x,dl(t,r,i,l),f=t.memoizedState,a!==r||x!==f||He.current||Bt?(typeof E=="function"&&(Yo(t,n,E,r),f=t.memoizedState),(a=Bt||Cs(t,n,a,r,x,f,v))?(P||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount()),typeof i.componentDidMount=="function"&&(t.flags|=4194308)):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=f),i.props=r,i.state=f,i.context=v,r=a):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{i=t.stateNode,Ss(e,t),a=t.memoizedProps,v=t.type===t.elementType?a:mt(t.type,a),i.props=v,P=t.pendingProps,x=i.context,f=n.contextType,typeof f=="object"&&f!==null?f=ot(f):(f=Qe(n)?tn:Ae.current,f=Nn(t,f));var I=n.getDerivedStateFromProps;(E=typeof I=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(a!==P||x!==f)&&Ps(t,i,r,f),Bt=!1,x=t.memoizedState,i.state=x,dl(t,r,i,l);var A=t.memoizedState;a!==P||x!==A||He.current||Bt?(typeof I=="function"&&(Yo(t,n,I,r),A=t.memoizedState),(v=Bt||Cs(t,n,v,r,x,A,f)||!1)?(E||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(r,A,f),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(r,A,f)),typeof i.componentDidUpdate=="function"&&(t.flags|=4),typeof i.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof i.componentDidUpdate!="function"||a===e.memoizedProps&&x===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&x===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=A),i.props=r,i.state=A,i.context=f,r=v):(typeof i.componentDidUpdate!="function"||a===e.memoizedProps&&x===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&x===e.memoizedState||(t.flags|=1024),r=!1)}return fi(e,t,n,r,o,l)}function fi(e,t,n,r,l,o){ua(e,t);var i=(t.flags&128)!==0;if(!r&&!i)return l&&ds(t,n,!1),Lt(e,t,o);r=t.stateNode,Jf.current=t;var a=i&&typeof n.getDerivedStateFromError!="function"?null:r.render();return t.flags|=1,e!==null&&i?(t.child=jn(t,e.child,null,o),t.child=jn(t,null,a,o)):We(e,t,a,o),t.memoizedState=r.state,l&&ds(t,n,!0),t.child}function aa(e){var t=e.stateNode;t.pendingContext?cs(e,t.pendingContext,t.pendingContext!==t.context):t.context&&cs(e,t.context,!1),Zo(e,t.containerInfo)}function ca(e,t,n,r,l){return Rn(),Wo(l),t.flags|=256,We(e,t,n,r),t.child}var di={dehydrated:null,treeContext:null,retryLane:0};function pi(e){return{baseLanes:e,cachePool:null,transitions:null}}function fa(e,t,n){var r=t.pendingProps,l=ye.current,o=!1,i=(t.flags&128)!==0,a;if((a=i)||(a=e!==null&&e.memoizedState===null?!1:(l&2)!==0),a?(o=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(l|=1),ae(ye,l&1),e===null)return $o(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?(t.mode&1?e.data==="$!"?t.lanes=8:t.lanes=1073741824:t.lanes=1,null):(i=r.children,e=r.fallback,o?(r=t.mode,o=t.child,i={mode:"hidden",children:i},!(r&1)&&o!==null?(o.childLanes=0,o.pendingProps=i):o=Il(i,r,0,null),e=dn(e,r,n,null),o.return=t,e.return=t,o.sibling=e,t.child=o,t.child.memoizedState=pi(n),t.memoizedState=di,e):mi(t,i));if(l=e.memoizedState,l!==null&&(a=l.dehydrated,a!==null))return bf(e,t,i,r,a,l,n);if(o){o=r.fallback,i=t.mode,l=e.child,a=l.sibling;var f={mode:"hidden",children:r.children};return!(i&1)&&t.child!==l?(r=t.child,r.childLanes=0,r.pendingProps=f,t.deletions=null):(r=Zt(l,f),r.subtreeFlags=l.subtreeFlags&14680064),a!==null?o=Zt(a,o):(o=dn(o,i,n,null),o.flags|=2),o.return=t,r.return=t,r.sibling=o,t.child=r,r=o,o=t.child,i=e.child.memoizedState,i=i===null?pi(n):{baseLanes:i.baseLanes|n,cachePool:null,transitions:i.transitions},o.memoizedState=i,o.childLanes=e.childLanes&~n,t.memoizedState=di,r}return o=e.child,e=o.sibling,r=Zt(o,{mode:"visible",children:r.children}),!(t.mode&1)&&(r.lanes=n),r.return=t,r.sibling=null,e!==null&&(n=t.deletions,n===null?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=r,t.memoizedState=null,r}function mi(e,t){return t=Il({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function kl(e,t,n,r){return r!==null&&Wo(r),jn(t,e.child,null,n),e=mi(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function bf(e,t,n,r,l,o,i){if(n)return t.flags&256?(t.flags&=-257,r=si(Error(s(422))),kl(e,t,i,r)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(o=r.fallback,l=t.mode,r=Il({mode:"visible",children:r.children},l,0,null),o=dn(o,l,i,null),o.flags|=2,r.return=t,o.return=t,r.sibling=o,t.child=r,t.mode&1&&jn(t,e.child,null,i),t.child.memoizedState=pi(i),t.memoizedState=di,o);if(!(t.mode&1))return kl(e,t,i,null);if(l.data==="$!"){if(r=l.nextSibling&&l.nextSibling.dataset,r)var a=r.dgst;return r=a,o=Error(s(419)),r=si(o,r,void 0),kl(e,t,i,r)}if(a=(i&e.childLanes)!==0,Ge||a){if(r=Re,r!==null){switch(i&-i){case 4:l=2;break;case 16:l=8;break;case 64: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:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:l=32;break;case 536870912:l=268435456;break;default:l=0}l=l&(r.suspendedLanes|i)?0:l,l!==0&&l!==o.retryLane&&(o.retryLane=l,Tt(e,l),gt(r,e,l,-1))}return Ri(),r=si(Error(s(421))),kl(e,t,i,r)}return l.data==="$?"?(t.flags|=128,t.child=e.child,t=dd.bind(null,e),l._reactRetry=t,null):(e=o.treeContext,et=Ut(l.nextSibling),be=t,ge=!0,pt=null,e!==null&&(rt[lt++]=Nt,rt[lt++]=zt,rt[lt++]=nn,Nt=e.id,zt=e.overflow,nn=t),t=mi(t,r.children),t.flags|=4096,t)}function da(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Qo(e.return,t,n)}function hi(e,t,n,r,l){var o=e.memoizedState;o===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:l}:(o.isBackwards=t,o.rendering=null,o.renderingStartTime=0,o.last=r,o.tail=n,o.tailMode=l)}function pa(e,t,n){var r=t.pendingProps,l=r.revealOrder,o=r.tail;if(We(e,t,r.children,n),r=ye.current,r&2)r=r&1|2,t.flags|=128;else{if(e!==null&&e.flags&128)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&da(e,n,t);else if(e.tag===19)da(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(ae(ye,r),!(t.mode&1))t.memoizedState=null;else switch(l){case"forwards":for(n=t.child,l=null;n!==null;)e=n.alternate,e!==null&&hl(e)===null&&(l=n),n=n.sibling;n=l,n===null?(l=t.child,t.child=null):(l=n.sibling,n.sibling=null),hi(t,!1,l,n,o);break;case"backwards":for(n=null,l=t.child,t.child=null;l!==null;){if(e=l.alternate,e!==null&&hl(e)===null){t.child=l;break}e=l.sibling,l.sibling=n,n=l,l=e}hi(t,!0,n,null,o);break;case"together":hi(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function xl(e,t){!(t.mode&1)&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Lt(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),sn|=t.lanes,!(n&t.childLanes))return null;if(e!==null&&t.child!==e.child)throw Error(s(153));if(t.child!==null){for(e=t.child,n=Zt(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=Zt(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function ed(e,t,n){switch(t.tag){case 3:aa(t),Rn();break;case 5:Rs(t);break;case 1:Qe(t.type)&&ll(t);break;case 4:Zo(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,l=t.memoizedProps.value;ae(al,r._currentValue),r._currentValue=l;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated!==null?(ae(ye,ye.current&1),t.flags|=128,null):n&t.child.childLanes?fa(e,t,n):(ae(ye,ye.current&1),e=Lt(e,t,n),e!==null?e.sibling:null);ae(ye,ye.current&1);break;case 19:if(r=(n&t.childLanes)!==0,e.flags&128){if(r)return pa(e,t,n);t.flags|=128}if(l=t.memoizedState,l!==null&&(l.rendering=null,l.tail=null,l.lastEffect=null),ae(ye,ye.current),r)break;return null;case 22:case 23:return t.lanes=0,ia(e,t,n)}return Lt(e,t,n)}var ma,vi,ha,va;ma=function(e,t){for(var n=t.child;n!==null;){if(n.tag===5||n.tag===6)e.appendChild(n.stateNode);else if(n.tag!==4&&n.child!==null){n.child.return=n,n=n.child;continue}if(n===t)break;for(;n.sibling===null;){if(n.return===null||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},vi=function(){},ha=function(e,t,n,r){var l=e.memoizedProps;if(l!==r){e=t.stateNode,on(kt.current);var o=null;switch(n){case"input":l=Hl(e,l),r=Hl(e,r),o=[];break;case"select":l=c({},l,{value:void 0}),r=c({},r,{value:void 0}),o=[];break;case"textarea":l=Kl(e,l),r=Kl(e,r),o=[];break;default:typeof l.onClick!="function"&&typeof r.onClick=="function"&&(e.onclick=tl)}Xl(n,r);var i;n=null;for(v in l)if(!r.hasOwnProperty(v)&&l.hasOwnProperty(v)&&l[v]!=null)if(v==="style"){var a=l[v];for(i in a)a.hasOwnProperty(i)&&(n||(n={}),n[i]="")}else v!=="dangerouslySetInnerHTML"&&v!=="children"&&v!=="suppressContentEditableWarning"&&v!=="suppressHydrationWarning"&&v!=="autoFocus"&&(y.hasOwnProperty(v)?o||(o=[]):(o=o||[]).push(v,null));for(v in r){var f=r[v];if(a=l!=null?l[v]:void 0,r.hasOwnProperty(v)&&f!==a&&(f!=null||a!=null))if(v==="style")if(a){for(i in a)!a.hasOwnProperty(i)||f&&f.hasOwnProperty(i)||(n||(n={}),n[i]="");for(i in f)f.hasOwnProperty(i)&&a[i]!==f[i]&&(n||(n={}),n[i]=f[i])}else n||(o||(o=[]),o.push(v,n)),n=f;else v==="dangerouslySetInnerHTML"?(f=f?f.__html:void 0,a=a?a.__html:void 0,f!=null&&a!==f&&(o=o||[]).push(v,f)):v==="children"?typeof f!="string"&&typeof f!="number"||(o=o||[]).push(v,""+f):v!=="suppressContentEditableWarning"&&v!=="suppressHydrationWarning"&&(y.hasOwnProperty(v)?(f!=null&&v==="onScroll"&&de("scroll",e),o||a===f||(o=[])):(o=o||[]).push(v,f))}n&&(o=o||[]).push("style",n);var v=o;(t.updateQueue=v)&&(t.flags|=4)}},va=function(e,t,n,r){n!==r&&(t.flags|=4)};function wr(e,t){if(!ge)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Ue(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var l=e.child;l!==null;)n|=l.lanes|l.childLanes,r|=l.subtreeFlags&14680064,r|=l.flags&14680064,l.return=e,l=l.sibling;else for(l=e.child;l!==null;)n|=l.lanes|l.childLanes,r|=l.subtreeFlags,r|=l.flags,l.return=e,l=l.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function td(e,t,n){var r=t.pendingProps;switch(Fo(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ue(t),null;case 1:return Qe(t.type)&&rl(),Ue(t),null;case 3:return r=t.stateNode,In(),pe(He),pe(Ae),bo(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),(e===null||e.child===null)&&(sl(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,pt!==null&&(Ni(pt),pt=null))),vi(e,t),Ue(t),null;case 5:qo(t);var l=on(mr.current);if(n=t.type,e!==null&&t.stateNode!=null)ha(e,t,n,r,l),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(t.stateNode===null)throw Error(s(166));return Ue(t),null}if(e=on(kt.current),sl(t)){r=t.stateNode,n=t.type;var o=t.memoizedProps;switch(r[St]=t,r[ar]=o,e=(t.mode&1)!==0,n){case"dialog":de("cancel",r),de("close",r);break;case"iframe":case"object":case"embed":de("load",r);break;case"video":case"audio":for(l=0;l<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=i.createElement(n,{is:r.is}):(e=i.createElement(n),n==="select"&&(i=e,r.multiple?i.multiple=!0:r.size&&(i.size=r.size))):e=i.createElementNS(e,n),e[St]=t,e[ar]=r,ma(e,t,!1,!1),t.stateNode=e;e:{switch(i=Zl(n,r),n){case"dialog":de("cancel",e),de("close",e),l=r;break;case"iframe":case"object":case"embed":de("load",e),l=r;break;case"video":case"audio":for(l=0;lFn&&(t.flags|=128,r=!0,wr(o,!1),t.lanes=4194304)}else{if(!r)if(e=hl(i),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),wr(o,!0),o.tail===null&&o.tailMode==="hidden"&&!i.alternate&&!ge)return Ue(t),null}else 2*ke()-o.renderingStartTime>Fn&&n!==1073741824&&(t.flags|=128,r=!0,wr(o,!1),t.lanes=4194304);o.isBackwards?(i.sibling=t.child,t.child=i):(n=o.last,n!==null?n.sibling=i:t.child=i,o.last=i)}return o.tail!==null?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=ke(),t.sibling=null,n=ye.current,ae(ye,r?n&1|2:n&1),t):(Ue(t),null);case 22:case 23:return Ti(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?tt&1073741824&&(Ue(t),t.subtreeFlags&6&&(t.flags|=8192)):Ue(t),null;case 24:return null;case 25:return null}throw Error(s(156,t.tag))}function nd(e,t){switch(Fo(t),t.tag){case 1:return Qe(t.type)&&rl(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return In(),pe(He),pe(Ae),bo(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return qo(t),null;case 13:if(pe(ye),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(s(340));Rn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return pe(ye),null;case 4:return In(),null;case 10:return Ho(t.type._context),null;case 22:case 23:return Ti(),null;case 24:return null;default:return null}}var El=!1,$e=!1,rd=typeof WeakSet=="function"?WeakSet:Set,D=null;function Dn(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){Se(e,t,r)}else n.current=null}function gi(e,t,n){try{n()}catch(r){Se(e,t,r)}}var ga=!1;function ld(e,t){if(To=Br,e=Yu(),ko(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var l=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var i=0,a=-1,f=-1,v=0,E=0,P=e,x=null;t:for(;;){for(var I;P!==n||l!==0&&P.nodeType!==3||(a=i+l),P!==o||r!==0&&P.nodeType!==3||(f=i+r),P.nodeType===3&&(i+=P.nodeValue.length),(I=P.firstChild)!==null;)x=P,P=I;for(;;){if(P===e)break t;if(x===n&&++v===l&&(a=i),x===o&&++E===r&&(f=i),(I=P.nextSibling)!==null)break;P=x,x=P.parentNode}P=I}n=a===-1||f===-1?null:{start:a,end:f}}else n=null}n=n||{start:0,end:0}}else n=null;for(Ro={focusedElem:e,selectionRange:n},Br=!1,D=t;D!==null;)if(t=D,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,D=e;else for(;D!==null;){t=D;try{var A=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(A!==null){var F=A.memoizedProps,xe=A.memoizedState,m=t.stateNode,d=m.getSnapshotBeforeUpdate(t.elementType===t.type?F:mt(t.type,F),xe);m.__reactInternalSnapshotBeforeUpdate=d}break;case 3:var h=t.stateNode.containerInfo;h.nodeType===1?h.textContent="":h.nodeType===9&&h.documentElement&&h.removeChild(h.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(s(163))}}catch(N){Se(t,t.return,N)}if(e=t.sibling,e!==null){e.return=t.return,D=e;break}D=t.return}return A=ga,ga=!1,A}function Sr(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var l=r=r.next;do{if((l.tag&e)===e){var o=l.destroy;l.destroy=void 0,o!==void 0&&gi(t,n,o)}l=l.next}while(l!==r)}}function Cl(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function yi(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function ya(e){var t=e.alternate;t!==null&&(e.alternate=null,ya(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[St],delete t[ar],delete t[Io],delete t[$f],delete t[Wf])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function wa(e){return e.tag===5||e.tag===3||e.tag===4}function Sa(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||wa(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function wi(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=tl));else if(r!==4&&(e=e.child,e!==null))for(wi(e,t,n),e=e.sibling;e!==null;)wi(e,t,n),e=e.sibling}function Si(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Si(e,t,n),e=e.sibling;e!==null;)Si(e,t,n),e=e.sibling}var je=null,ht=!1;function Qt(e,t,n){for(n=n.child;n!==null;)ka(e,t,n),n=n.sibling}function ka(e,t,n){if(wt&&typeof wt.onCommitFiberUnmount=="function")try{wt.onCommitFiberUnmount(Ar,n)}catch{}switch(n.tag){case 5:$e||Dn(n,t);case 6:var r=je,l=ht;je=null,Qt(e,t,n),je=r,ht=l,je!==null&&(ht?(e=je,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):je.removeChild(n.stateNode));break;case 18:je!==null&&(ht?(e=je,n=n.stateNode,e.nodeType===8?jo(e.parentNode,n):e.nodeType===1&&jo(e,n),Jn(e)):jo(je,n.stateNode));break;case 4:r=je,l=ht,je=n.stateNode.containerInfo,ht=!0,Qt(e,t,n),je=r,ht=l;break;case 0:case 11:case 14:case 15:if(!$e&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){l=r=r.next;do{var o=l,i=o.destroy;o=o.tag,i!==void 0&&(o&2||o&4)&&gi(n,t,i),l=l.next}while(l!==r)}Qt(e,t,n);break;case 1:if(!$e&&(Dn(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(a){Se(n,t,a)}Qt(e,t,n);break;case 21:Qt(e,t,n);break;case 22:n.mode&1?($e=(r=$e)||n.memoizedState!==null,Qt(e,t,n),$e=r):Qt(e,t,n);break;default:Qt(e,t,n)}}function xa(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new rd),t.forEach(function(r){var l=pd.bind(null,e,r);n.has(r)||(n.add(r),r.then(l,l))})}}function vt(e,t){var n=t.deletions;if(n!==null)for(var r=0;rl&&(l=i),r&=~o}if(r=l,r=ke()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*id(r/1960))-r,10e?16:e,Kt===null)var r=!1;else{if(e=Kt,Kt=null,Tl=0,ee&6)throw Error(s(331));var l=ee;for(ee|=4,D=e.current;D!==null;){var o=D,i=o.child;if(D.flags&16){var a=o.deletions;if(a!==null){for(var f=0;fke()-Ei?cn(e,0):xi|=n),Ye(e,t)}function Oa(e,t){t===0&&(e.mode&1?(t=Ur,Ur<<=1,!(Ur&130023424)&&(Ur=4194304)):t=1);var n=Ve();e=Tt(e,t),e!==null&&(Kn(e,t,n),Ye(e,n))}function dd(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Oa(e,n)}function pd(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,l=e.memoizedState;l!==null&&(n=l.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(s(314))}r!==null&&r.delete(t),Oa(e,n)}var Da;Da=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||He.current)Ge=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return Ge=!1,ed(e,t,n);Ge=!!(e.flags&131072)}else Ge=!1,ge&&t.flags&1048576&&ms(t,ul,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;xl(e,t),e=t.pendingProps;var l=Nn(t,Ae.current);Mn(t,n),l=ni(null,t,r,e,l,n);var o=ri();return t.flags|=1,typeof l=="object"&&l!==null&&typeof l.render=="function"&&l.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Qe(r)?(o=!0,ll(t)):o=!1,t.memoizedState=l.state!==null&&l.state!==void 0?l.state:null,Ko(t),l.updater=pl,t.stateNode=l,l._reactInternals=t,Xo(t,r,e,n),t=fi(null,t,r,!0,o,n)):(t.tag=0,ge&&o&&Ao(t),We(null,t,l,n),t=t.child),t;case 16:r=t.elementType;e:{switch(xl(e,t),e=t.pendingProps,l=r._init,r=l(r._payload),t.type=r,l=t.tag=hd(r),e=mt(r,e),l){case 0:t=ci(null,t,r,e,n);break e;case 1:t=sa(null,t,r,e,n);break e;case 11:t=ra(null,t,r,e,n);break e;case 14:t=la(null,t,r,mt(r.type,e),n);break e}throw Error(s(306,r,""))}return t;case 0:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:mt(r,l),ci(e,t,r,l,n);case 1:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:mt(r,l),sa(e,t,r,l,n);case 3:e:{if(aa(t),e===null)throw Error(s(387));r=t.pendingProps,o=t.memoizedState,l=o.element,Ss(e,t),dl(t,r,null,n);var i=t.memoizedState;if(r=i.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:i.cache,pendingSuspenseBoundaries:i.pendingSuspenseBoundaries,transitions:i.transitions},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){l=On(Error(s(423)),t),t=ca(e,t,r,n,l);break e}else if(r!==l){l=On(Error(s(424)),t),t=ca(e,t,r,n,l);break e}else for(et=Ut(t.stateNode.containerInfo.firstChild),be=t,ge=!0,pt=null,n=Ts(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Rn(),r===l){t=Lt(e,t,n);break e}We(e,t,r,n)}t=t.child}return t;case 5:return Rs(t),e===null&&$o(t),r=t.type,l=t.pendingProps,o=e!==null?e.memoizedProps:null,i=l.children,Lo(r,l)?i=null:o!==null&&Lo(r,o)&&(t.flags|=32),ua(e,t),We(e,t,i,n),t.child;case 6:return e===null&&$o(t),null;case 13:return fa(e,t,n);case 4:return Zo(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=jn(t,null,r,n):We(e,t,r,n),t.child;case 11:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:mt(r,l),ra(e,t,r,l,n);case 7:return We(e,t,t.pendingProps,n),t.child;case 8:return We(e,t,t.pendingProps.children,n),t.child;case 12:return We(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,l=t.pendingProps,o=t.memoizedProps,i=l.value,ae(al,r._currentValue),r._currentValue=i,o!==null)if(dt(o.value,i)){if(o.children===l.children&&!He.current){t=Lt(e,t,n);break e}}else for(o=t.child,o!==null&&(o.return=t);o!==null;){var a=o.dependencies;if(a!==null){i=o.child;for(var f=a.firstContext;f!==null;){if(f.context===r){if(o.tag===1){f=Rt(-1,n&-n),f.tag=2;var v=o.updateQueue;if(v!==null){v=v.shared;var E=v.pending;E===null?f.next=f:(f.next=E.next,E.next=f),v.pending=f}}o.lanes|=n,f=o.alternate,f!==null&&(f.lanes|=n),Qo(o.return,n,t),a.lanes|=n;break}f=f.next}}else if(o.tag===10)i=o.type===t.type?null:o.child;else if(o.tag===18){if(i=o.return,i===null)throw Error(s(341));i.lanes|=n,a=i.alternate,a!==null&&(a.lanes|=n),Qo(i,n,t),i=o.sibling}else i=o.child;if(i!==null)i.return=o;else for(i=o;i!==null;){if(i===t){i=null;break}if(o=i.sibling,o!==null){o.return=i.return,i=o;break}i=i.return}o=i}We(e,t,l.children,n),t=t.child}return t;case 9:return l=t.type,r=t.pendingProps.children,Mn(t,n),l=ot(l),r=r(l),t.flags|=1,We(e,t,r,n),t.child;case 14:return r=t.type,l=mt(r,t.pendingProps),l=mt(r.type,l),la(e,t,r,l,n);case 15:return oa(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:mt(r,l),xl(e,t),t.tag=1,Qe(r)?(e=!0,ll(t)):e=!1,Mn(t,n),_s(t,r,l),Xo(t,r,l,n),fi(null,t,r,!0,e,n);case 19:return pa(e,t,n);case 22:return ia(e,t,n)}throw Error(s(156,t.tag))};function Aa(e,t){return hu(e,t)}function md(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function st(e,t,n,r){return new md(e,t,n,r)}function Li(e){return e=e.prototype,!(!e||!e.isReactComponent)}function hd(e){if(typeof e=="function")return Li(e)?1:0;if(e!=null){if(e=e.$$typeof,e===b)return 11;if(e===qe)return 14}return 2}function Zt(e,t){var n=e.alternate;return n===null?(n=st(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&14680064,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function jl(e,t,n,r,l,o){var i=2;if(r=e,typeof e=="function")Li(e)&&(i=1);else if(typeof e=="string")i=5;else e:switch(e){case ve:return dn(n.children,l,o,t);case ze:i=8,l|=8;break;case nt:return e=st(12,n,t,l|2),e.elementType=nt,e.lanes=o,e;case Oe:return e=st(13,n,t,l),e.elementType=Oe,e.lanes=o,e;case De:return e=st(19,n,t,l),e.elementType=De,e.lanes=o,e;case fe:return Il(n,l,o,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Ze:i=10;break e;case ct:i=9;break e;case b:i=11;break e;case qe:i=14;break e;case Ce:i=16,r=null;break e}throw Error(s(130,e==null?e:typeof e,""))}return t=st(i,n,t,l),t.elementType=e,t.type=r,t.lanes=o,t}function dn(e,t,n,r){return e=st(7,e,r,t),e.lanes=n,e}function Il(e,t,n,r){return e=st(22,e,r,t),e.elementType=fe,e.lanes=n,e.stateNode={isHidden:!1},e}function Mi(e,t,n){return e=st(6,e,null,t),e.lanes=n,e}function ji(e,t,n){return t=st(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function vd(e,t,n,r,l){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=oo(0),this.expirationTimes=oo(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=oo(0),this.identifierPrefix=r,this.onRecoverableError=l,this.mutableSourceEagerHydrationData=null}function Ii(e,t,n,r,l,o,i,a,f){return e=new vd(e,t,n,a,f),t===1?(t=1,o===!0&&(t|=8)):t=0,o=st(3,null,null,t),e.current=o,o.stateNode=e,o.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Ko(o),e}function gd(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(fc)}catch(u){console.error(u)}}fc(),ac.exports=Nd();var zd=ac.exports,Ka=zd;Vl.createRoot=Ka.createRoot,Vl.hydrateRoot=Ka.hydrateRoot;function Td(u){return u instanceof Function||typeof u=="function"}function $i(u,p){var y;const s=(y=p.configEntries[u])==null?void 0:y[0];if(!s)return;const g=s.configValue;if(typeof g=="string")return g;if(!g)return null;if(Td(g)){const C=g(p);if(typeof C!="string")throw new Error(s.configDefinedAt+" should return a string");return C}else throw new Error(s.configDefinedAt+" should be a string or a function returning a string")}function Rd(u,p){const s=globalThis[Ya]=globalThis[Ya]||{};return s[u]=s[u]||p}const Ya="_vike_react",dc=Rd("PageContextProvider.ts",{reactContext:Ct.createContext(void 0)});function Ld({pageContext:u,children:p}){const{reactContext:s}=dc;return Ct.createElement(s.Provider,{value:u},p)}function Md(){const{reactContext:u}=dc;return X.useContext(u)}function jd(u){const{Page:p}=u;let s=p?Ct.createElement(p,null):null;return[...u.config.Layout||[],...u.config.Wrapper||[]].forEach(g=>{s=Ct.createElement(g,null,s)}),s=Ct.createElement(Ld,{pageContext:u},s),u.config.reactStrictMode!==!1&&(s=Ct.createElement(Ct.StrictMode,null,s)),s}let _r;const Zp=u=>{var y,C,k,w;(C=(y=u.config).onBeforeRenderClient)==null||C.call(y,u);const p=jd(u),s=(_,L)=>{},g=document.getElementById("root");if(g.innerHTML!==""&&u.isHydration)_r=Vl.hydrateRoot(g,p,{onUncaughtError:s});else{if(!_r)_r=Vl.createRoot(g,{onUncaughtError:s});else{const _=$i("title",u)||"",L=$i("lang",u)||"en",T=$i("favicon",u);_!==void 0&&(document.title=_),L!==void 0&&(document.documentElement.lang=L),T!==void 0&&Id(T)}_r.render(p)}u.page=p,u.root=_r,(w=(k=u.config).onAfterRenderClient)==null||w.call(k,u)};function Id(u){let p=document.querySelector("link[rel~='icon']");if(!u){p&&document.head.removeChild(p);return}p||(p=document.createElement("link"),p.rel="icon",document.head.appendChild(p)),p.href=u}var pc={exports:{}},Pr={};/** * @license React * react-jsx-runtime.production.min.js * @@ -37,7 +37,7 @@ Error generating stack: `+o.message+` * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var Xa;function Od(){if(Xa)return Pr;Xa=1;var u=Y,p=Symbol.for("react.element"),s=Symbol.for("react.fragment"),g=Object.prototype.hasOwnProperty,y=u.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,C={key:!0,ref:!0,__self:!0,__source:!0};function k(w,_,L){var T,z={},M=null,B=null;L!==void 0&&(M=""+L),_.key!==void 0&&(M=""+_.key),_.ref!==void 0&&(B=_.ref);for(T in _)g.call(_,T)&&!C.hasOwnProperty(T)&&(z[T]=_[T]);if(w&&w.defaultProps)for(T in _=w.defaultProps,_)z[T]===void 0&&(z[T]=_[T]);return{$$typeof:p,type:w,key:M,ref:B,props:z,_owner:y.current}}return Pr.Fragment=s,Pr.jsx=k,Pr.jsxs=k,Pr}pc.exports=Od();var X=pc.exports;/** + */var Xa;function Od(){if(Xa)return Pr;Xa=1;var u=X,p=Symbol.for("react.element"),s=Symbol.for("react.fragment"),g=Object.prototype.hasOwnProperty,y=u.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,C={key:!0,ref:!0,__self:!0,__source:!0};function k(w,_,L){var T,z={},M=null,B=null;L!==void 0&&(M=""+L),_.key!==void 0&&(M=""+_.key),_.ref!==void 0&&(B=_.ref);for(T in _)g.call(_,T)&&!C.hasOwnProperty(T)&&(z[T]=_[T]);if(w&&w.defaultProps)for(T in _=w.defaultProps,_)z[T]===void 0&&(z[T]=_[T]);return{$$typeof:p,type:w,key:M,ref:B,props:z,_owner:y.current}}return Pr.Fragment=s,Pr.jsx=k,Pr.jsxs=k,Pr}pc.exports=Od();var Y=pc.exports;/** * @license lucide-react v0.367.0 - ISC * * This source code is licensed under the ISC license. @@ -52,7 +52,7 @@ Error generating stack: `+o.message+` * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const Tr=(u,p)=>{const s=Y.forwardRef(({color:g="currentColor",size:y=24,strokeWidth:C=2,absoluteStrokeWidth:k,className:w="",children:_,...L},T)=>Y.createElement("svg",{ref:T,...Dd,width:y,height:y,stroke:g,strokeWidth:k?Number(C)*24/Number(y):C,className:["lucide",`lucide-${Ad(u)}`,w].join(" "),...L},[...p.map(([z,M])=>Y.createElement(z,M)),...Array.isArray(_)?_:[_]]));return s.displayName=`${u}`,s};/** + */const Tr=(u,p)=>{const s=X.forwardRef(({color:g="currentColor",size:y=24,strokeWidth:C=2,absoluteStrokeWidth:k,className:w="",children:_,...L},T)=>X.createElement("svg",{ref:T,...Dd,width:y,height:y,stroke:g,strokeWidth:k?Number(C)*24/Number(y):C,className:["lucide",`lucide-${Ad(u)}`,w].join(" "),...L},[...p.map(([z,M])=>X.createElement(z,M)),...Array.isArray(_)?_:[_]]));return s.displayName=`${u}`,s};/** * @license lucide-react v0.367.0 - ISC * * This source code is licensed under the ISC license. @@ -77,18 +77,18 @@ Error generating stack: `+o.message+` * * This source code is licensed under the ISC license. * See the LICENSE file in the root directory of this source tree. - */const $d=Tr("Square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]),mc=({children:u,label:p="Button",icon:s,link:g,noGutter:y,disabled:C,onClick:k,ref:w,className:_})=>{const L=Y.useMemo(()=>`flex items-center ${y?"p-0":"px-4 py-2"} rounded-sm gap-2 ${_}`,[_,y]);return g?X.jsxs("a",{href:g,onClick:k,className:`${L}`,ref:w,"aria-label":p,children:[s,u]}):X.jsxs("button",{type:"button",disabled:C,onClick:k,className:`${L}`,ref:w,"aria-label":p,children:[s,u]})};function Wd(){for(var u=0,p,s,g="";uu&&(p=0,g=s,s=new Map)}return{get:function(k){var w=s.get(k);if(w!==void 0)return w;if((w=g.get(k))!==void 0)return y(k,w),w},set:function(k,w){s.has(k)?s.set(k,w):y(k,w)}}}var gc="!";function Yd(u){var p=u.separator||":",s=p.length===1,g=p[0],y=p.length;return function(k){for(var w=[],_=0,L=0,T,z=0;zL?T-L:void 0;return{modifiers:w,hasImportantModifier:W,baseClassName:j,maybePostfixModifierPosition:O}}}function Xd(u){if(u.length<=1)return u;var p=[],s=[];return u.forEach(function(g){var y=g[0]==="[";y?(p.push.apply(p,s.sort().concat([g])),s=[]):s.push(g)}),p.push.apply(p,s.sort()),p}function Zd(u){return{cache:Kd(u.cacheSize),splitModifiers:Yd(u),...Vd(u)}}var qd=/\s+/;function Jd(u,p){var s=p.splitModifiers,g=p.getClassGroupId,y=p.getConflictingClassGroupIds,C=new Set;return u.trim().split(qd).map(function(k){var w=s(k),_=w.modifiers,L=w.hasImportantModifier,T=w.baseClassName,z=w.maybePostfixModifierPosition,M=g(z?T.substring(0,z):T),B=!!z;if(!M){if(!z)return{isTailwindClass:!1,originalClassName:k};if(M=g(T),!M)return{isTailwindClass:!1,originalClassName:k};B=!1}var W=Xd(_).join(":"),j=L?W+gc:W;return{isTailwindClass:!0,modifierId:j,classGroupId:M,originalClassName:k,hasPostfixModifier:B}}).reverse().filter(function(k){if(!k.isTailwindClass)return!0;var w=k.modifierId,_=k.classGroupId,L=k.hasPostfixModifier,T=w+_;return C.has(T)?!1:(C.add(T),y(_,L).forEach(function(z){return C.add(w+z)}),!0)}).reverse().map(function(k){return k.originalClassName}).join(" ")}function bd(){for(var u=arguments.length,p=new Array(u),s=0;su.reduce((s,g,y)=>s.concat(g||[],p[y]||[]),[]),yp=(u,p="")=>{let s=u.join(" ").trim().replace(/\n/g," ").replace(/\s{2,}/g," ").split(" ").filter(y=>y!==","),g=p?p.split(" "):[];return mp(...s.concat(g).filter(y=>y!==" "))},wp=([u])=>u.charAt(0)!=="$",Wi=u=>u[Sc]===!0,kc=u=>(p,...s)=>{let g=(y=[])=>{let C=Ct.forwardRef((k,w)=>{let{$as:_=u,style:L={},...T}=k,z=Wi(u)?u:_,M=y?y.reduce((W,j)=>Object.assign(W,typeof j=="function"?j(k):j),{}):{},B=Wi(z)?T:Object.fromEntries(Object.entries(T).filter(wp));return Ct.createElement(z,{...B,style:{...M,...L},ref:w,className:yp(gp(p,s.map(W=>W({...T,$as:_}))),T.className),...Wi(u)?{$as:_}:{}})});return C[Sc]=!0,typeof u!="string"?C.displayName=u.displayName||u.name||"tw.Component":C.displayName="tw."+u,C.withStyle=k=>g(y.concat(k)),C};return g()},Sp=vp.reduce((u,p)=>({...u,[p]:kc(p)}),{}),kp=Object.assign(kc,Sp),Vl=kp;const xp=Vl.div` + */const $d=Tr("Square",[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}]]),mc=({children:u,label:p="Button",icon:s,link:g,noGutter:y,disabled:C,onClick:k,ref:w,className:_})=>{const L=X.useMemo(()=>`flex items-center ${y?"p-0":"px-4 py-2"} rounded-sm gap-2 ${_}`,[_,y]);return g?Y.jsxs("a",{href:g,onClick:k,className:`${L}`,ref:w,"aria-label":p,children:[s,u]}):Y.jsxs("button",{type:"button",disabled:C,onClick:k,className:`${L}`,ref:w,"aria-label":p,children:[s,u]})};function Wd(){for(var u=0,p,s,g="";uu&&(p=0,g=s,s=new Map)}return{get:function(k){var w=s.get(k);if(w!==void 0)return w;if((w=g.get(k))!==void 0)return y(k,w),w},set:function(k,w){s.has(k)?s.set(k,w):y(k,w)}}}var gc="!";function Yd(u){var p=u.separator||":",s=p.length===1,g=p[0],y=p.length;return function(k){for(var w=[],_=0,L=0,T,z=0;zL?T-L:void 0;return{modifiers:w,hasImportantModifier:W,baseClassName:j,maybePostfixModifierPosition:O}}}function Xd(u){if(u.length<=1)return u;var p=[],s=[];return u.forEach(function(g){var y=g[0]==="[";y?(p.push.apply(p,s.sort().concat([g])),s=[]):s.push(g)}),p.push.apply(p,s.sort()),p}function Zd(u){return{cache:Kd(u.cacheSize),splitModifiers:Yd(u),...Vd(u)}}var qd=/\s+/;function Jd(u,p){var s=p.splitModifiers,g=p.getClassGroupId,y=p.getConflictingClassGroupIds,C=new Set;return u.trim().split(qd).map(function(k){var w=s(k),_=w.modifiers,L=w.hasImportantModifier,T=w.baseClassName,z=w.maybePostfixModifierPosition,M=g(z?T.substring(0,z):T),B=!!z;if(!M){if(!z)return{isTailwindClass:!1,originalClassName:k};if(M=g(T),!M)return{isTailwindClass:!1,originalClassName:k};B=!1}var W=Xd(_).join(":"),j=L?W+gc:W;return{isTailwindClass:!0,modifierId:j,classGroupId:M,originalClassName:k,hasPostfixModifier:B}}).reverse().filter(function(k){if(!k.isTailwindClass)return!0;var w=k.modifierId,_=k.classGroupId,L=k.hasPostfixModifier,T=w+_;return C.has(T)?!1:(C.add(T),y(_,L).forEach(function(z){return C.add(w+z)}),!0)}).reverse().map(function(k){return k.originalClassName}).join(" ")}function bd(){for(var u=arguments.length,p=new Array(u),s=0;su.reduce((s,g,y)=>s.concat(g||[],p[y]||[]),[]),yp=(u,p="")=>{let s=u.join(" ").trim().replace(/\n/g," ").replace(/\s{2,}/g," ").split(" ").filter(y=>y!==","),g=p?p.split(" "):[];return mp(...s.concat(g).filter(y=>y!==" "))},wp=([u])=>u.charAt(0)!=="$",Wi=u=>u[Sc]===!0,kc=u=>(p,...s)=>{let g=(y=[])=>{let C=Ct.forwardRef((k,w)=>{let{$as:_=u,style:L={},...T}=k,z=Wi(u)?u:_,M=y?y.reduce((W,j)=>Object.assign(W,typeof j=="function"?j(k):j),{}):{},B=Wi(z)?T:Object.fromEntries(Object.entries(T).filter(wp));return Ct.createElement(z,{...B,style:{...M,...L},ref:w,className:yp(gp(p,s.map(W=>W({...T,$as:_}))),T.className),...Wi(u)?{$as:_}:{}})});return C[Sc]=!0,typeof u!="string"?C.displayName=u.displayName||u.name||"tw.Component":C.displayName="tw."+u,C.withStyle=k=>g(y.concat(k)),C};return g()},Sp=vp.reduce((u,p)=>({...u,[p]:kc(p)}),{}),kp=Object.assign(kc,Sp),Rr=kp;const xp=Rr.div` p-2 bg-darkLight border-darkLightBorder border-1 rounded -`,Ep=Vl.div` +`,Ep=Rr.div` m-auto ${u=>u.$fullWidth?"w-full":"container max-w-screen-lg"} px-4 px-lg-0 -`,tc=Vl.button` +`,tc=Rr.button` bg-dark border-1 border-darkLightBorder @@ -101,7 +101,7 @@ Error generating stack: `+o.message+` justify-center h-full ${u=>u.$pos==="left"?"rounded-s-lg":"rounded-e-lg"} -`,Cp=Vl.input` +`,Cp=Rr.input` bg-darkLight border-x-0 border-1 @@ -116,7 +116,7 @@ Error generating stack: `+o.message+` w-full min-w-10 h-full -`,nc=({onIncrease:u,onDecrease:p,value:s,label:g})=>X.jsxs("div",{className:"flex justify-between items-center gap-2 items-stretch flex-1",children:[X.jsx("div",{className:"whitespace-nowrap text-sm flex flex-col items-center justify-center",children:g}),X.jsxs("div",{className:"relative flex items-center max-w-24",children:[X.jsx(tc,{$pos:"left",type:"button",onClick:p,"aria-label":"Decrement",children:"-"}),X.jsx(Cp,{type:"text",value:s,readOnly:!0}),X.jsx(tc,{$pos:"right",type:"button",onClick:u,"aria-label":"Increment",children:"+"})]})]}),at={bpm:{default:130,min:60,max:240},loop:{default:!0},timeSignature:{default:4,min:2,max:8},loopLength:{default:4,min:1,max:8},isPlaying:!1},_p=({tone:u,transport:p})=>{const s=Y.useRef(null),g=Y.useRef(null),y=Y.useCallback(()=>{!u||!p||(s.current!==null&&(p.clear(s.current),s.current=null),g.current!=null&&(p.clear(g.current),g.current=null))},[u,p]);return{setMetronome:Y.useCallback(()=>{if(!u||!p)return;y();const k=new u.Synth().toDestination(),w=p.scheduleRepeat(T=>{k.triggerAttackRelease("C5","64n",T)},"1m");s.current=w;const _=new u.Synth().toDestination(),L=p.scheduleRepeat(T=>{_.triggerAttackRelease("C4","64n",T)},"4n");g.current=L},[y,u,p])}},xc=Y.createContext(void 0),Pp=({children:u})=>{const[p,s]=Y.useState(),[g,y]=Y.useState(),{setMetronome:C}=_p({tone:p,transport:g}),k=Y.useMemo(()=>({tone:p,setTone:s,transport:g,setTransport:y,setMetronome:C}),[C,p,g]);return X.jsx(xc.Provider,{value:k,children:u})},Np=()=>{const u=Y.useContext(xc),p=u==null?void 0:u.tone,s=u==null?void 0:u.setTone,g=u==null?void 0:u.transport,y=u==null?void 0:u.setTransport,C=u==null?void 0:u.setMetronome;if(!u)throw new Error("tone must be used within the ToneContextProvider");return{tone:p,setTone:s,transport:g,setTransport:y,setMetronome:C}};var zp={BASE_SERVER:"/statetrain/",BASE_ASSETS:"/statetrain/",BASE_URL:"/statetrain/",MODE:"production",DEV:!1,PROD:!0,SSR:!1};const rc=u=>{let p;const s=new Set,g=(T,z)=>{const M=typeof T=="function"?T(p):T;if(!Object.is(M,p)){const B=p;p=z??(typeof M!="object"||M===null)?M:Object.assign({},p,M),s.forEach(W=>W(p,B))}},y=()=>p,_={setState:g,getState:y,getInitialState:()=>L,subscribe:T=>(s.add(T),()=>s.delete(T)),destroy:()=>{(zp?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),s.clear()}},L=p=u(g,y,_);return _},Tp=u=>u?rc(u):rc;var Ec={exports:{}},Vi={},Bi={exports:{}},Hi={};/** +`,nc=({onIncrease:u,onDecrease:p,value:s,label:g})=>Y.jsxs("div",{className:"flex justify-between items-center gap-2 items-stretch flex-1",children:[Y.jsx("div",{className:"whitespace-nowrap text-sm flex flex-col items-center justify-center",children:g}),Y.jsxs("div",{className:"relative flex items-center max-w-24",children:[Y.jsx(tc,{$pos:"left",type:"button",onClick:p,"aria-label":"Decrement",children:"-"}),Y.jsx(Cp,{type:"text",value:s,readOnly:!0}),Y.jsx(tc,{$pos:"right",type:"button",onClick:u,"aria-label":"Increment",children:"+"})]})]}),at={bpm:{default:130,min:60,max:240},loop:{default:!0},timeSignature:{default:4,min:2,max:8},loopLength:{default:4,min:1,max:8},isPlaying:!1},_p=({tone:u,transport:p})=>{const s=X.useRef(null),g=X.useRef(null),y=X.useCallback(()=>{!u||!p||(s.current!==null&&(p.clear(s.current),s.current=null),g.current!=null&&(p.clear(g.current),g.current=null))},[u,p]);return{setMetronome:X.useCallback(()=>{if(!u||!p)return;y();const k=new u.Synth().toDestination(),w=p.scheduleRepeat(T=>{k.triggerAttackRelease("C5","64n",T)},"1m");s.current=w;const _=new u.Synth().toDestination(),L=p.scheduleRepeat(T=>{_.triggerAttackRelease("C4","64n",T)},"4n");g.current=L},[y,u,p])}},xc=X.createContext(void 0),Pp=({children:u})=>{const[p,s]=X.useState(),[g,y]=X.useState(),{setMetronome:C}=_p({tone:p,transport:g}),k=X.useMemo(()=>({tone:p,setTone:s,transport:g,setTransport:y,setMetronome:C}),[C,p,g]);return Y.jsx(xc.Provider,{value:k,children:u})},Np=()=>{const u=X.useContext(xc),p=u==null?void 0:u.tone,s=u==null?void 0:u.setTone,g=u==null?void 0:u.transport,y=u==null?void 0:u.setTransport,C=u==null?void 0:u.setMetronome;if(!u)throw new Error("tone must be used within the ToneContextProvider");return{tone:p,setTone:s,transport:g,setTransport:y,setMetronome:C}};var zp={BASE_SERVER:"/statetrain/",BASE_ASSETS:"/statetrain/",BASE_URL:"/statetrain/",MODE:"production",DEV:!1,PROD:!0,SSR:!1};const rc=u=>{let p;const s=new Set,g=(T,z)=>{const M=typeof T=="function"?T(p):T;if(!Object.is(M,p)){const B=p;p=z??(typeof M!="object"||M===null)?M:Object.assign({},p,M),s.forEach(W=>W(p,B))}},y=()=>p,_={setState:g,getState:y,getInitialState:()=>L,subscribe:T=>(s.add(T),()=>s.delete(T)),destroy:()=>{(zp?"production":void 0)!=="production"&&console.warn("[DEPRECATED] The `destroy` method will be unsupported in a future version. Instead use unsubscribe function returned by subscribe. Everything will be garbage-collected if store is garbage-collected."),s.clear()}},L=p=u(g,y,_);return _},Tp=u=>u?rc(u):rc;var Ec={exports:{}},Vi={},Bi={exports:{}},Hi={};/** * @license React * use-sync-external-store-shim.production.min.js * @@ -124,7 +124,7 @@ Error generating stack: `+o.message+` * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var lc;function Rp(){if(lc)return Hi;lc=1;var u=Y;function p(z,M){return z===M&&(z!==0||1/z===1/M)||z!==z&&M!==M}var s=typeof Object.is=="function"?Object.is:p,g=u.useState,y=u.useEffect,C=u.useLayoutEffect,k=u.useDebugValue;function w(z,M){var B=M(),W=g({inst:{value:B,getSnapshot:M}}),j=W[0].inst,O=W[1];return C(function(){j.value=B,j.getSnapshot=M,_(j)&&O({inst:j})},[z,B,M]),y(function(){return _(j)&&O({inst:j}),z(function(){_(j)&&O({inst:j})})},[z]),k(B),B}function _(z){var M=z.getSnapshot;z=z.value;try{var B=M();return!s(z,B)}catch{return!0}}function L(z,M){return M()}var T=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?L:w;return Hi.useSyncExternalStore=u.useSyncExternalStore!==void 0?u.useSyncExternalStore:T,Hi}var oc;function Lp(){return oc||(oc=1,Bi.exports=Rp()),Bi.exports}/** + */var lc;function Rp(){if(lc)return Hi;lc=1;var u=X;function p(z,M){return z===M&&(z!==0||1/z===1/M)||z!==z&&M!==M}var s=typeof Object.is=="function"?Object.is:p,g=u.useState,y=u.useEffect,C=u.useLayoutEffect,k=u.useDebugValue;function w(z,M){var B=M(),W=g({inst:{value:B,getSnapshot:M}}),j=W[0].inst,O=W[1];return C(function(){j.value=B,j.getSnapshot=M,_(j)&&O({inst:j})},[z,B,M]),y(function(){return _(j)&&O({inst:j}),z(function(){_(j)&&O({inst:j})})},[z]),k(B),B}function _(z){var M=z.getSnapshot;z=z.value;try{var B=M();return!s(z,B)}catch{return!0}}function L(z,M){return M()}var T=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?L:w;return Hi.useSyncExternalStore=u.useSyncExternalStore!==void 0?u.useSyncExternalStore:T,Hi}var oc;function Lp(){return oc||(oc=1,Bi.exports=Rp()),Bi.exports}/** * @license React * use-sync-external-store-shim/with-selector.production.min.js * @@ -132,4 +132,9 @@ Error generating stack: `+o.message+` * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var ic;function Mp(){if(ic)return Vi;ic=1;var u=Y,p=Lp();function s(L,T){return L===T&&(L!==0||1/L===1/T)||L!==L&&T!==T}var g=typeof Object.is=="function"?Object.is:s,y=p.useSyncExternalStore,C=u.useRef,k=u.useEffect,w=u.useMemo,_=u.useDebugValue;return Vi.useSyncExternalStoreWithSelector=function(L,T,z,M,B){var W=C(null);if(W.current===null){var j={hasValue:!1,value:null};W.current=j}else j=W.current;W=w(function(){function he(ie){if(!oe){if(oe=!0,Ne=ie,ie=M(ie),B!==void 0&&j.hasValue){var ve=j.value;if(B(ve,ie))return ce=ve}return ce=ie}if(ve=ce,g(Ne,ie))return ve;var ze=M(ie);return B!==void 0&&B(ve,ze)?ve:(Ne=ie,ce=ze)}var oe=!1,Ne,ce,Me=z===void 0?null:z;return[function(){return he(T())},Me===null?void 0:function(){return he(Me())}]},[T,z,M,B]);var O=y(L,W[0],W[1]);return k(function(){j.hasValue=!0,j.value=O},[O]),_(O),O},Vi}Ec.exports=Mp();var jp=Ec.exports;const Ip=sc(jp);var Cc={BASE_SERVER:"/statetrain/",BASE_ASSETS:"/statetrain/",BASE_URL:"/statetrain/",MODE:"production",DEV:!1,PROD:!0,SSR:!1};const{useDebugValue:Op}=Ct,{useSyncExternalStoreWithSelector:Dp}=Ip;let uc=!1;const Ap=u=>u;function Fp(u,p=Ap,s){(Cc?"production":void 0)!=="production"&&s&&!uc&&(console.warn("[DEPRECATED] Use `createWithEqualityFn` instead of `create` or use `useStoreWithEqualityFn` instead of `useStore`. They can be imported from 'zustand/traditional'. https://github.com/pmndrs/zustand/discussions/1937"),uc=!0);const g=Dp(u.subscribe,u.getState,u.getServerState||u.getInitialState,p,s);return Op(g),g}const Up=u=>{(Cc?"production":void 0)!=="production"&&typeof u!="function"&&console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");const p=typeof u=="function"?Tp(u):u,s=(g,y)=>Fp(p,g,y);return Object.assign(s,p),s},$p=u=>Up,Wp=$p()(u=>({bpm:at.bpm.default,setBpm:p=>u(()=>({bpm:p})),timeSignature:at.timeSignature.default,setTimeSignature:p=>u(()=>({timeSignature:p})),loopLength:at.loopLength.default,setLoopLength:p=>u(()=>({loopLength:p})),isPlaying:at.isPlaying,setIsPlaying:p=>u(()=>({isPlaying:p}))})),Bl=()=>{const{transport:u,tone:p,setMetronome:s,setTone:g,setTransport:y}=Np(),{setIsPlaying:C,setBpm:k,setTimeSignature:w,isPlaying:_,loopLength:L,bpm:T,timeSignature:z}=Wp(),M=Y.useCallback(()=>{u==null||u.start(),C(!0)},[C,u]),B=Y.useCallback(()=>{u==null||u.stop(),C(!1)},[C,u]),W=Y.useCallback(O=>{O&&O<=at.bpm.max&&O>=at.bpm.min&&u&&(u.bpm.value=O,k(O))},[k,u]),j=Y.useCallback(O=>{u&&s&&O&&O<=at.timeSignature.max&&O>=at.timeSignature.min&&(_&&B(),u.timeSignature=O,u.loopEnd=`${L}m`,w(O),s())},[B,_,L,s,w,u]);return{transport:u,tone:p,isPlaying:_,loopLength:L,bpm:T,timeSignature:z,setTransport:y,setTone:g,setMetronome:s,handlePlay:M,handleStop:B,handleChangeBpm:W,handleChangeTimeSignature:j}},Vp=()=>{const{bpm:u,timeSignature:p,handleChangeBpm:s,handleChangeTimeSignature:g}=Bl();return X.jsxs("div",{className:"flex flex-col items-stretch justify-between gap-1",children:[X.jsx(nc,{label:"Global BPM",value:u,onIncrease:()=>s(u+1),onDecrease:()=>s(u-1)}),X.jsx(nc,{label:"Time Signature",value:`${p}/4`,onIncrease:()=>g(p+1),onDecrease:()=>g(p-1)})]})},Bp=Y.memo(({currentPosition:u,setCurrentPosition:p,transportLength:s})=>{const{transport:g,tone:y,loopLength:C,isPlaying:k,timeSignature:w}=Bl(),_=Y.useRef(),L=Y.useMemo(()=>Array.from({length:C},(W,j)=>j),[C]),T=Y.useMemo(()=>Array.from({length:w},(W,j)=>j),[w]),z=Y.useCallback(()=>{p(W=>(W+1)%(C*w))},[C,p,w]),M=Y.useCallback(()=>{_.current!==void 0&&(y==null||y.getDraw().cancel(),g==null||g.clear(_.current))},[y,g]),B=Y.useCallback(()=>{M();const W=g==null?void 0:g.scheduleRepeat(j=>{var O;(O=y==null?void 0:y.getDraw())==null||O.schedule(()=>{z()},j)},"4n");p(s),_.current=W},[M,z,p,y,g,s]);return Y.useEffect(()=>{s&&(p(s),B())},[s,B,p]),X.jsx("div",{className:"flex flex-col items-stretch justify-between",children:L.map(W=>X.jsx("div",{className:"flex gap-1",children:T.map(j=>{const O=u===W*w+j,he=W===0&&j===0,oe=O&&j===0;return X.jsxs("div",{className:"w-3 h-3 flex items-center justify-center",children:[k&&X.jsxs(X.Fragment,{children:[X.jsx(Za,{strokeWidth:3,className:`text-errorDark ${O||oe?"hidden":"block"}`}),X.jsx(Fd,{strokeWidth:3,className:`text-warningLight ${O&&!oe?"block":"hidden"}`}),X.jsx(qa,{strokeWidth:4,className:`text-white ${oe?"block":"hidden"}`})]}),!k&&he&&X.jsx(qa,{strokeWidth:3,className:"text-white"}),!k&&!he&&X.jsx(Za,{strokeWidth:3,className:"text-errorDark"})]},j)})},W))})}),Hp=()=>{const[u,p]=Y.useState(0),{isPlaying:s,loopLength:g,timeSignature:y,handlePlay:C,handleStop:k,setMetronome:w}=Bl(),_=Y.useMemo(()=>g*y-1,[g,y]),L=Y.useCallback(()=>{s?(k(),p(_)):C()},[C,k,s,_]);return Y.useEffect(()=>{w==null||w()},[w]),X.jsx(Ep,{className:"mt-10 flex",children:X.jsxs(xp,{className:"inline-flex gap-2 items-stretch h-20",children:[X.jsx(Vp,{}),X.jsx(mc,{icon:s?X.jsx($d,{className:"w-10 h-10"}):X.jsx(Ud,{className:"w-10 h-10"}),className:` ${s?"bg-warningDark":" bg-successDark"}`,onClick:L}),X.jsx(Bp,{transportLength:_,currentPosition:u,setCurrentPosition:p})]})})},Qp=u=>{u.loop=at.loop.default,u.loopEnd=`${at.loopLength.default}m`,u.bpm.value=at.bpm.default,u.timeSignature=at.timeSignature.default},Gp=({children:u})=>{const{tone:p,setTone:s,setTransport:g}=Bl(),y=Y.useMemo(()=>p&&X.jsx(Y.Suspense,{children:u}),[u,p]),C=Y.useCallback(async()=>{if(!s||!g)return;const k=await Ed(()=>import("./chunk-ByD2j-fW.js"),[]),w=k.getTransport();Qp(w),s(k),g(w)},[s,g]);return y||X.jsx("div",{className:"flex justify-center",children:X.jsxs("div",{className:"mt-16 p-3",children:[X.jsx("div",{className:"text-5xl text-center mb-6",children:"🚂🚃"}),X.jsx("div",{className:"text-4xl text-center font-black mb-6",children:"STATETRAIN"}),X.jsx(mc,{className:"bg-successDark text-white w-full justify-center",onClick:C,children:"Initialize Tone.js / AudioContext"}),X.jsx("div",{className:"text-sm mt-4 text-gray",children:"Unlock and maintain tone.js context for all following pages / components"})]})})},Xp=({children:u})=>X.jsx(Pp,{children:X.jsxs(Gp,{children:[X.jsx(Hp,{}),u]})}),Zp=({href:u,children:p,label:s,className:g="",button:y})=>{const C=Md(),{urlPathname:k}=C,w=u.replace(/^\/|\/$/g,""),_=k.replace(/^\/|\/$/g,""),L=w.startsWith("#"),T=Y.useMemo(()=>!!(w.startsWith("http")||w.startsWith("mailto")),[w]),z=Y.useMemo(()=>w===""?_===w:_.startsWith(w),[w,_]),M=Y.useMemo(()=>{const W="transition-colors text-primary duration-200 ease-in-out inline-block hover:underline underline";return y?`${z?"bg-primary pointer-events-none":"bg-warningLight bg-opacity-50 hover:bg-opacity-75"} p-3 ${g} ${W} `:`${z?"text-warningLight ":""} ${g} ${W}`},[y,g,z]),B=Y.useMemo(()=>`${T?"":"/statetrain/"}${u}`,[u,T]);return X.jsx("a",{href:L?u:B,className:M,target:T?"_blank":"_self",rel:T?"noreferrer":"","aria-label":s||"",children:p})};export{Xp as A,mc as B,Vl as F,Ep as L,Ud as P,$d as S,Zp as a,X as j,Yp as o,Y as r,Bl as u}; + */var ic;function Mp(){if(ic)return Vi;ic=1;var u=X,p=Lp();function s(L,T){return L===T&&(L!==0||1/L===1/T)||L!==L&&T!==T}var g=typeof Object.is=="function"?Object.is:s,y=p.useSyncExternalStore,C=u.useRef,k=u.useEffect,w=u.useMemo,_=u.useDebugValue;return Vi.useSyncExternalStoreWithSelector=function(L,T,z,M,B){var W=C(null);if(W.current===null){var j={hasValue:!1,value:null};W.current=j}else j=W.current;W=w(function(){function he(ie){if(!oe){if(oe=!0,Ne=ie,ie=M(ie),B!==void 0&&j.hasValue){var ve=j.value;if(B(ve,ie))return ce=ve}return ce=ie}if(ve=ce,g(Ne,ie))return ve;var ze=M(ie);return B!==void 0&&B(ve,ze)?ve:(Ne=ie,ce=ze)}var oe=!1,Ne,ce,Me=z===void 0?null:z;return[function(){return he(T())},Me===null?void 0:function(){return he(Me())}]},[T,z,M,B]);var O=y(L,W[0],W[1]);return k(function(){j.hasValue=!0,j.value=O},[O]),_(O),O},Vi}Ec.exports=Mp();var jp=Ec.exports;const Ip=sc(jp);var Cc={BASE_SERVER:"/statetrain/",BASE_ASSETS:"/statetrain/",BASE_URL:"/statetrain/",MODE:"production",DEV:!1,PROD:!0,SSR:!1};const{useDebugValue:Op}=Ct,{useSyncExternalStoreWithSelector:Dp}=Ip;let uc=!1;const Ap=u=>u;function Fp(u,p=Ap,s){(Cc?"production":void 0)!=="production"&&s&&!uc&&(console.warn("[DEPRECATED] Use `createWithEqualityFn` instead of `create` or use `useStoreWithEqualityFn` instead of `useStore`. They can be imported from 'zustand/traditional'. https://github.com/pmndrs/zustand/discussions/1937"),uc=!0);const g=Dp(u.subscribe,u.getState,u.getServerState||u.getInitialState,p,s);return Op(g),g}const Up=u=>{(Cc?"production":void 0)!=="production"&&typeof u!="function"&&console.warn("[DEPRECATED] Passing a vanilla store will be unsupported in a future version. Instead use `import { useStore } from 'zustand'`.");const p=typeof u=="function"?Tp(u):u,s=(g,y)=>Fp(p,g,y);return Object.assign(s,p),s},$p=u=>Up,Wp=$p()(u=>({bpm:at.bpm.default,setBpm:p=>u(()=>({bpm:p})),timeSignature:at.timeSignature.default,setTimeSignature:p=>u(()=>({timeSignature:p})),loopLength:at.loopLength.default,setLoopLength:p=>u(()=>({loopLength:p})),isPlaying:at.isPlaying,setIsPlaying:p=>u(()=>({isPlaying:p}))})),Bl=()=>{const{transport:u,tone:p,setMetronome:s,setTone:g,setTransport:y}=Np(),{setIsPlaying:C,setBpm:k,setTimeSignature:w,isPlaying:_,loopLength:L,bpm:T,timeSignature:z}=Wp(),M=X.useCallback(()=>{u==null||u.start(),C(!0)},[C,u]),B=X.useCallback(()=>{u==null||u.stop(),C(!1)},[C,u]),W=X.useCallback(O=>{O&&O<=at.bpm.max&&O>=at.bpm.min&&u&&(u.bpm.value=O,k(O))},[k,u]),j=X.useCallback(O=>{u&&s&&O&&O<=at.timeSignature.max&&O>=at.timeSignature.min&&(_&&B(),u.timeSignature=O,u.loopEnd=`${L}m`,w(O),s())},[B,_,L,s,w,u]);return{transport:u,tone:p,isPlaying:_,loopLength:L,bpm:T,timeSignature:z,setTransport:y,setTone:g,setMetronome:s,handlePlay:M,handleStop:B,handleChangeBpm:W,handleChangeTimeSignature:j}},Vp=()=>{const{bpm:u,timeSignature:p,handleChangeBpm:s,handleChangeTimeSignature:g}=Bl();return Y.jsxs("div",{className:"flex flex-col items-stretch justify-between gap-1",children:[Y.jsx(nc,{label:"Global BPM",value:u,onIncrease:()=>s(u+1),onDecrease:()=>s(u-1)}),Y.jsx(nc,{label:"Time Signature",value:`${p}/4`,onIncrease:()=>g(p+1),onDecrease:()=>g(p-1)})]})},Bp=X.memo(({currentPosition:u,setCurrentPosition:p,transportLength:s})=>{const{transport:g,tone:y,loopLength:C,isPlaying:k,timeSignature:w}=Bl(),_=X.useRef(),L=X.useMemo(()=>Array.from({length:C},(W,j)=>j),[C]),T=X.useMemo(()=>Array.from({length:w},(W,j)=>j),[w]),z=X.useCallback(()=>{p(W=>(W+1)%(C*w))},[C,p,w]),M=X.useCallback(()=>{_.current!==void 0&&(y==null||y.getDraw().cancel(),g==null||g.clear(_.current))},[y,g]),B=X.useCallback(()=>{M();const W=g==null?void 0:g.scheduleRepeat(j=>{var O;(O=y==null?void 0:y.getDraw())==null||O.schedule(()=>{z()},j)},"4n");p(s),_.current=W},[M,z,p,y,g,s]);return X.useEffect(()=>{s&&(p(s),B())},[s,B,p]),Y.jsx("div",{className:"flex flex-col items-stretch justify-between",children:L.map(W=>Y.jsx("div",{className:"flex gap-1",children:T.map(j=>{const O=u===W*w+j,he=W===0&&j===0,oe=O&&j===0;return Y.jsxs("div",{className:"w-3 h-3 flex items-center justify-center",children:[k&&Y.jsxs(Y.Fragment,{children:[Y.jsx(Za,{strokeWidth:3,className:`text-errorDark ${O||oe?"hidden":"block"}`}),Y.jsx(Fd,{strokeWidth:3,className:`text-warningLight ${O&&!oe?"block":"hidden"}`}),Y.jsx(qa,{strokeWidth:4,className:`text-white ${oe?"block":"hidden"}`})]}),!k&&he&&Y.jsx(qa,{strokeWidth:3,className:"text-white"}),!k&&!he&&Y.jsx(Za,{strokeWidth:3,className:"text-errorDark"})]},j)})},W))})}),Hp=()=>{const[u,p]=X.useState(0),{isPlaying:s,loopLength:g,timeSignature:y,handlePlay:C,handleStop:k,setMetronome:w}=Bl(),_=X.useMemo(()=>g*y-1,[g,y]),L=X.useCallback(()=>{s?(k(),p(_)):C()},[C,k,s,_]);return X.useEffect(()=>{w==null||w()},[w]),Y.jsx(Ep,{className:"mt-10 flex",children:Y.jsxs(xp,{className:"inline-flex gap-2 items-stretch h-20",children:[Y.jsx(Vp,{}),Y.jsx(mc,{icon:s?Y.jsx($d,{className:"w-10 h-10"}):Y.jsx(Ud,{className:"w-10 h-10"}),className:` ${s?"bg-warningDark":" bg-successDark"}`,onClick:L}),Y.jsx(Bp,{transportLength:_,currentPosition:u,setCurrentPosition:p})]})})},Qp=Rr.h2` + text-4xl + md:text-5xl + font-bold + text-light +`,Gp=({handleClick:u})=>Y.jsx("div",{className:"flex justify-center",children:Y.jsxs("div",{className:"mt-16 p-3",children:[Y.jsx("div",{className:"text-5xl text-center mb-6",children:"🚂🚃"}),Y.jsx(Qp,{className:"text-4xl text-center font-black mb-6",children:"STATETRAIN"}),Y.jsx("p",{className:"text-xl md:w-3/4 mx-auto mb-5 text-center",children:"Gain control of the tone.js transport with a modern routable typescript-react environment. 🚂🚃"}),Y.jsx(mc,{className:"bg-successDark text-white w-full justify-center",onClick:u,children:"Initialize Tone.js *"}),Y.jsx("div",{className:"text-sm mt-3 text-gray text-center",children:"* unlocks tone.js context for all following pages / components"})]})}),Kp=u=>{u.loop=at.loop.default,u.loopEnd=`${at.loopLength.default}m`,u.bpm.value=at.bpm.default,u.timeSignature=at.timeSignature.default},Yp=({children:u})=>{const{tone:p,setTone:s,setTransport:g}=Bl(),y=X.useMemo(()=>p&&Y.jsx(X.Suspense,{children:u}),[u,p]),C=X.useCallback(async()=>{if(!s||!g)return;const k=await Ed(()=>import("./chunk-ByD2j-fW.js"),[]),w=k.getTransport();Kp(w),s(k),g(w)},[s,g]);return y||Y.jsx(Gp,{handleClick:C})},qp=({children:u})=>Y.jsx(Pp,{children:Y.jsxs(Yp,{children:[Y.jsx(Hp,{}),u]})}),Jp=({href:u,children:p,label:s,className:g="",button:y})=>{const C=Md(),{urlPathname:k}=C,w=u.replace(/^\/|\/$/g,""),_=k.replace(/^\/|\/$/g,""),L=w.startsWith("#"),T=X.useMemo(()=>!!(w.startsWith("http")||w.startsWith("mailto")),[w]),z=X.useMemo(()=>w===""?_===w:_.startsWith(w),[w,_]),M=X.useMemo(()=>{const W="transition-colors text-primary duration-200 ease-in-out inline-block hover:underline underline";return y?`${z?"bg-primary pointer-events-none":"bg-warningLight bg-opacity-50 hover:bg-opacity-75"} p-3 ${g} ${W} `:`${z?"text-warningLight ":""} ${g} ${W}`},[y,g,z]),B=X.useMemo(()=>`${T?"":"/statetrain/"}${u}`,[u,T]);return Y.jsx("a",{href:L?u:B,className:M,target:T?"_blank":"_self",rel:T?"noreferrer":"","aria-label":s||"",children:p})};export{qp as A,mc as B,Rr as F,Ep as L,Ud as P,$d as S,Jp as a,Y as j,Zp as o,X as r,Bl as u}; diff --git a/assets/chunks/chunk-DzAPp0u_.js b/assets/chunks/chunk-DEFsEkkq.js similarity index 93% rename from assets/chunks/chunk-DzAPp0u_.js rename to assets/chunks/chunk-DEFsEkkq.js index 054f803..69255fd 100644 --- a/assets/chunks/chunk-DzAPp0u_.js +++ b/assets/chunks/chunk-DEFsEkkq.js @@ -1,4 +1,4 @@ -import{F as i,u as r,r as c,j as a,B as u,S as h,P as x}from"./chunk-CwsG006u.js";const k=i.h4` +import{F as i,u as r,r as c,j as a,B as u,S as h,P as x}from"./chunk-DDs_QYll.js";const k=i.h4` text-2xl text-light `,m=({className:l,...n})=>{const{isPlaying:s,handlePlay:t,handleStop:e}=r(),o=c.useCallback(()=>{s?e():t()},[t,e,s]);return a.jsx(u,{className:`${s?"bg-warningDark":"bg-successDark animate-pulse"} ${l}`,onClick:o,icon:s?a.jsx(h,{className:"w-3 h-3",strokeWidth:4}):a.jsx(x,{className:"w-3 h-3",strokeWidth:4}),...n,children:s?"Stop":"Play"})};export{k as H,m as I}; diff --git a/assets/entries/entry-client-routing.Dx8Er3j6.js b/assets/entries/entry-client-routing.DTyfN4a1.js similarity index 99% rename from assets/entries/entry-client-routing.Dx8Er3j6.js rename to assets/entries/entry-client-routing.DTyfN4a1.js index fd95c19..cebd895 100644 --- a/assets/entries/entry-client-routing.Dx8Er3j6.js +++ b/assets/entries/entry-client-routing.DTyfN4a1.js @@ -1,4 +1,4 @@ -const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/entries/pages_error.OPXz8eTI.js","assets/chunks/chunk-CwsG006u.js","assets/chunks/chunk-DZeubO4x.js","assets/static/Link.CTy-J1Wx.css","assets/entries/pages_index.bLHpNDwf.js","assets/chunks/chunk-DzAPp0u_.js","assets/entries/pages_second-page.BRRyZT6a.js"])))=>i.map(i=>d[i]); +const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/entries/pages_error.CwPDSJjs.js","assets/chunks/chunk-DDs_QYll.js","assets/chunks/chunk-DZeubO4x.js","assets/static/Link.ByHLQopH.css","assets/entries/pages_index.Cxcdhj_4.js","assets/chunks/chunk-DEFsEkkq.js","assets/entries/pages_second-page.ejB7RTih.js"])))=>i.map(i=>d[i]); import{_ as me}from"../chunks/chunk-DZeubO4x.js";function Ie(e){return Array.from(new Set(e))}const bn="0.4.179",Ae={projectName:"Vike",projectVersion:bn},Ke=`_${Ae.projectName.toLowerCase()}`;function k(e,t){const n=wn();return n[e]=n[e]||t}function wn(){return globalThis[Ke]=globalThis[Ke]||{}}const p=new Proxy({},{get:(e,t)=>n=>t!=="code"?n:`\`${n}\``}),A=k("assertPackageInstances.ts",{instances:[],alreadyLogged:new Set}),Sn="The client runtime of Server Routing as well as the client runtime of Client Routing are both being loaded. Make sure they aren't loaded both at the same time for a given page. See https://vike.dev/client-runtimes-conflict",St="Two vike client runtime instances are being loaded. Make sure your client-side bundles don't include vike twice. (In order to reduce the size of your client-side JavaScript bundles.)";function vt(){{const e=Ie(A.instances);Rn(e.length<=1,`vike@${p.bold(e[0])} and vike@${p.bold(e[1])} loaded but only one version should be loaded`)}A.checkSingleInstance&&A.instances.length>1&&Re(!1,St,{onlyOnce:!0,showStackTrace:!0})}function vn(e){Re(A.isClientRouting!==!1,Sn,{onlyOnce:!0,showStackTrace:!0}),Re(A.isClientRouting===void 0,St,{onlyOnce:!0,showStackTrace:!0}),A.isClientRouting=!0,A.checkSingleInstance=!0,vt()}function Pn(){A.instances.push(Ae.projectVersion),vt()}function Rn(e,t){if(e)return;const n=`[vike][Wrong Usage] ${t}`;throw new Error(n)}function Re(e,t,{onlyOnce:n,showStackTrace:r}){if(e)return;const i=`[vike][Warning] ${t}`;if(n){const{alreadyLogged:o}=A,a=n===!0?i:n;if(o.has(a))return;o.add(a)}console.warn(r?new Error(i):i)}function En(){return!(typeof process>"u"||!process.cwd||!process.versions||typeof process.versions.node>"u"||!process.release||process.release.name!=="node")}function fe(e,t){const n=new Error(e);return En()&&(n.stack=Cn(n.stack,t)),n}function Cn(e,t){if(!e)return e;const n=$n(e);let r=0;return n.filter(o=>o.includes(" (internal/")||o.includes(" (node:internal")?!1:r{if(!t)return null;const l=typeof t=="string"?t:JSON.stringify(t);return p.dim(`Debug info (for Vike maintainers; you can ignore this): ${l}`)})();let i=[`You stumbled upon a Vike bug. Go to ${p.blue("https://github.com/vikejs/vike/issues/new")} and copy-paste this error. A maintainer will fix the bug (usually under 24 hours).`,n].filter(Boolean).join(" ");i=Q(i),i=ge(i,"Bug"),i=Z(i,!0);const o=fe(i,de);throw(a=x.onBeforeLog)==null||a.call(x),o}function d(e,t,{showStackTrace:n}={}){var i;if(e)return;n=n||x.alwaysShowStackTrace,t=Q(t),t=ge(t,"Wrong Usage"),t=Z(t);const r=fe(t,de);throw n&&x.showStackTraceList.add(r),(i=x.onBeforeLog)==null||i.call(x),r}function Pt(e){return e=Q(e),e=ge(e,"Error"),e=Z(e),fe(e,de)}function O(e,t,{onlyOnce:n,showStackTrace:r}){var i;if(!e){if(r=r||x.alwaysShowStackTrace,t=Q(t),t=ge(t,"Warning"),t=Z(t),n){const{alreadyLogged:o}=x,a=n===!0?t:n;if(o.has(a))return;o.add(a)}if((i=x.onBeforeLog)==null||i.call(x),r){const o=fe(t,de);x.showStackTraceList.add(o),x.logger(o,"warn")}else x.logger(t,"warn")}}function xn(e,t,{onlyOnce:n}){var r;if(t=Q(t),t=Z(t),n){const{alreadyLogged:i}=x,o=t;if(i.has(o))return;i.add(o)}(r=x.onBeforeLog)==null||r.call(x),x.logger(t,"info")}function ge(e,t){let n=`[${t}]`;const r=t==="Warning"?"yellow":"red";return n=p.bold(p[r](n)),`${n}${e}`}function Q(e){return e.startsWith("[")?e:` ${e}`}function Z(e,t=!1){return`${t?Tn:On}${e}`}function B(){return typeof window<"u"&&typeof window.scrollY=="number"}const Rt=k("utils/assertRouterType.ts",{});function ee(){Fn(kn()),Rt.isClientRouting=!0}function kn(){return Rt.isClientRouting!==!1}function Fn(e){d(B(),`${p.cyan("import { something } from 'vike/client/router'")} is forbidden on the server-side`,{showStackTrace:!0}),O(e,"You shouldn't `import { something } from 'vike/client/router'` when using Server Routing. The 'vike/client/router' utilities work only with Client Routing. In particular, don't `import { navigate }` nor `import { prefetch }` as they unnecessarily bloat your client-side bundle sizes.",{showStackTrace:!0,onlyOnce:!0})}function j(e,t,n){return typeof e=="string"?qe(e.split(""),t,n).join(""):qe(e,t,n)}function qe(e,t,n){const r=[];let i=t>=0?t:e.length+t;s(i>=0&&i<=e.length);let o=n>=0?n:e.length+n;for(s(o>=0&&o<=e.length);!(i===o||(i===e.length&&(i=0),i===o));){const a=e[i];s(a!==void 0),r.push(a),i++}return r}function je(e){return Et(e)||e.startsWith("/")||e.startsWith(".")||e.startsWith("?")||e.startsWith("#")||e===""}function In(e,t){s(t.includes(" but ")),d(typeof e=="string",`${t} should be a string`),!je(e)&&(!e.startsWith("/")&&!e.includes(":")?d(!1,`${t} is ${p.cyan(e)} and it should be /${p.cyan(e)} instead (URL pathnames should start with a leading slash)`):d(!1,`${t} isn't a valid URL`))}function te(e,t){s(je(e)),s(t.startsWith("/"));const[n,...r]=e.split("#");s(n!==void 0);const i=["",...r].join("#")||null;s(i===null||i.startsWith("#"));const o=i===null?"":Ee(i.slice(1)),[a,...l]=n.split("?");s(a!==void 0);const u=["",...l].join("?")||null;s(u===null||u.startsWith("?"));const c={},f={};Array.from(new URLSearchParams(u||"")).forEach(([m,v])=>{c[m]=v,f[m]=[...f.hasOwnProperty(m)?f[m]:[],v]});const{origin:g,pathname:y}=jn(a,t);s(g===null||g===Ee(g)),s(y.startsWith("/")),s(g===null||e.startsWith(g));const h=a.slice((g||"").length);Nn(e,g,h,u,i);let{pathname:R,hasBaseServer:$}=Hn(y,t);return R=An(R),s(R.startsWith("/")),{origin:g,pathname:R,pathnameOriginal:h,hasBaseServer:$,search:c,searchAll:f,searchOriginal:u,hash:o,hashOriginal:i}}function Ee(e){try{return decodeURIComponent(e)}catch{}try{return decodeURI(e)}catch{}return e}function An(e){return e=e.replace(/\s+$/,""),e=e.split("/").map(t=>Ee(t).split("/").join("%2F")).join("/"),e}function jn(e,t){var n;s(!e.includes("?")&&!e.includes("#"));{const{origin:r,pathname:i}=Xe(e);if(r)return{origin:r,pathname:i};s(i===e)}if(e.startsWith("/"))return{origin:null,pathname:e};{const r=typeof window<"u"?(n=window==null?void 0:window.document)==null?void 0:n.baseURI:void 0;let i;return r?i=Xe(r.split("?")[0]).pathname:i=t,{origin:null,pathname:Ln(e,i)}}}function Xe(e){if(Et(e)){const[t,n,r,...i]=e.split("/"),o=[t,n,r].join("/"),a=["",...i].join("/")||"/";return{origin:o,pathname:a}}else return s(!Bn(e)),{pathname:e,origin:null}}function Ln(e,t){const n=t.split("/"),r=e.split("/");let i=t.endsWith("/");e.startsWith(".")&&n.pop();for(const a in r){const l=r[a];l==""&&a==="0"||l!="."&&(l==".."?n.pop():(i=!1,n.push(l)))}let o=n.join("/");return i&&!o.endsWith("/")&&(o+="/"),o.startsWith("/")||(o="/"+o),o}function Wn(e){s(e.startsWith("/")),s(!e.includes("?")),s(!e.includes("#"))}function Hn(e,t){Wn(e),s(Le(t));let n=e;if(s(n.startsWith("/")),s(t.startsWith("/")),t==="/")return{pathname:e,hasBaseServer:!0};let r=t;return t.endsWith("/")&&n===j(t,0,-1)&&(r=j(t,0,-1),s(n===r)),n.startsWith(r)?(s(n.startsWith("/")||n.startsWith("http")),s(n.startsWith(r)),n=n.slice(r.length),n.startsWith("/")||(n="/"+n),s(n.startsWith("/")),{pathname:n,hasBaseServer:!0}):{pathname:e,hasBaseServer:!1}}function Le(e){return e.startsWith("/")}function Nn(e,t,n,r,i){const o=Dn(t,n,r,i);s(e===o)}function Dn(e,t,n,r){return`${e||""}${t}${n||""}${r||""}`}function Bn(e){return/^[a-z][a-z0-9\+\-]*:/i.test(e)}function Et(e){return/^[a-z][a-z0-9\+\-]*:\/\//i.test(e)}function w(e,t){t&&Object.defineProperties(e,Object.getOwnPropertyDescriptors(t))}function V(e){return e instanceof Function||typeof e=="function"}function le(e){return(t,n)=>{const r=e(t),i=e(n);return r===i?0:r>i?-1:1}}function Vn(e){return(t,n)=>{const r=e(t),i=e(n);return r===i?0:r{const r=e(t),i=e(n);if(s([!0,!1,null].includes(r)),s([!0,!1,null].includes(i)),r===i)return 0;if(r===!0||i===!1)return-1;if(i===!0||r===!1)return 1;s(!1)}}function zn(e){return W(t=>{const n=e(t);return n===null?null:!n})}function G(e){return Array.isArray(e)}function Un(e){return G(e)&&e.every(t=>typeof t=="string")}function Gn(e){return T(e)&&Object.values(e).every(t=>typeof t=="string")}function S(e,t,n){if(!T(e))return!1;if(!(t in e))return n==="undefined";if(n===void 0)return!0;const r=e[t];return n==="undefined"?r===void 0:n==="array"?G(r):n==="object"?T(r):n==="string[]"?Un(r):n==="string{}"?Gn(r):n==="function"?V(r):G(n)?typeof r=="string"&&n.includes(r):n==="null"?r===null:n==="true"?r===!0:n==="false"?r===!1:typeof r===n}function D(e){return typeof e!="object"||e===null?!1:Object.getPrototypeOf(e)===null?!0:e.constructor.name==="Object"}function Mn(e,t){return e.toLowerCase()t.toLowerCase()?1:0}const Jn=e=>e!=null;function Qe(e){return"["+e.map(t=>"'"+t+"'").join(", ")+"]"}function Ct(e){const t=n=>`Not a posix path: ${n}`;s(e!==null,t("null")),s(typeof e=="string",t(`typeof path === ${JSON.stringify(typeof e)}`)),s(e!=="",t("(empty string)")),s(e),s(!e.includes("\\"),t(e))}function be(e,t){const n=Object.getOwnPropertyDescriptor(e,t);return!!n&&!("value"in n)&&!!n.get}function Yn(e){return typeof e=="object"&&e!==null&&"then"in e&&V(e.then)}function Kn(e){return[null,void 0].includes(e)?String(e):["boolean","number","string"].includes(typeof e)?JSON.stringify(e):null}function qn(e){return e.replace(/[/\-\\^$*+?.()|[\]{}]/g,"\\$&")}function re(e,t,n){const r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(e,t,{...r,enumerable:n})}function we(e,t,{get:n,...r}){Object.defineProperty(e,t,{...r,get:n})}const Xn=["clientRouting"];function Qn(e){Xn.forEach(t=>{if(s(e.fileExports),!(t in e.fileExports))return;const n=`The value of \`${t}\` is only allowed to be \`true\`.`;d(e.fileExports[t]!==!1,`${e.filePath} has \`export { ${t} }\` with the value \`false\` which is prohibited: remove \`export { ${t} }\` instead. (${n})`),d(e.fileExports[t]===!0,`${e.filePath} has \`export { ${t} }\` with a forbidden value. ${n}`)})}const _t=["render","clientRouting","prerender","doNotPrerender"];function Zn(e,t){d(!_t.includes(e),`${t} has \`export default { ${e} }\` which is prohibited, use \`export { ${e} }\` instead.`)}function er(e){const t=".page.",n=j(e.split(t),0,-1).join(t);return s(!n.includes("\\")),n}function M(e){Ct(e)}function tr(e,t){if(t.length>0){const r=t.filter(i=>i.isErrorPage);return r.length===0?null:(d(r.length===1,"Only one error page can be defined"),r[0].pageId)}const n=Ie(e.map(({pageId:r})=>r).filter(r=>ne(r)));if(d(n.length<=1,`Only one _error.page.js is allowed, but found several: ${n.join(" ")}`),n.length>0){const r=n[0];return s(r),r}return null}function ne(e,t){return s(!e.includes("\\")),e.includes("/_error")}function nr(e,t){if(t.length>0){const n=t.find(r=>r.pageId===e);return s(n),!!n.isErrorPage}else return ne(e)}const $t=["js","ts","cjs","cts","mjs","mts"],rr=["jsx","tsx","cjsx","ctsx","mjsx","mtsx"],Ot=["vue","svelte","marko","md","mdx"],ir=[...$t,...rr,...Ot];function Tt(e){const t=ir.some(n=>e.endsWith("."+n));return or(e)&&s(t),t}function or(e){const t=/\.(c|m)?(j|t)s$/.test(e),n=$t.some(r=>e.endsWith("."+r));return s(t===n),t}function sr(e){return Ot.some(t=>e.endsWith("."+t))}const ar=[".page",".page.server",".page.route",".page.client",".css"];function lr(e){if(Ct(e),e.endsWith(".css"))return".css";s(Tt(e),e);const n=e.split("/").slice(-1)[0].split("."),r=n.slice(-3)[0],i=n.slice(-2)[0];if(i==="page")return".page";if(s(r==="page",e),i==="server")return".page.server";if(i==="client")return".page.client";if(i==="route")return".page.route";s(!1,e)}function xt(e){const t=o=>i.pageId===o||i.isDefaultPageFile&&(Ze(i.filePath)||ur(o,i.filePath)),n=lr(e),i={filePath:e,fileType:n,isEnv:o=>{if(s(n!==".page.route"),o==="CLIENT_ONLY")return n===".page.client"||n===".css";if(o==="SERVER_ONLY")return n===".page.server";if(o==="CLIENT_AND_SERVER")return n===".page";s(!1)},isRelevant:t,isDefaultPageFile:Ce(e),isRendererPageFile:n!==".css"&&Ce(e)&&Ze(e),isErrorPageFile:ne(e),pageId:er(e)};return i}function Ce(e){return M(e),ne(e)?!1:e.includes("/_default")}function Ze(e){return M(e),e.includes("/renderer/")}function ur(e,t){M(e),M(t),s(!e.endsWith("/")),s(!t.endsWith("/")),s(Ce(t));const n=j(t.split("/"),0,-1).filter(r=>r!=="_default").join("/");return e.startsWith(n)}function cr(e,t){if(!e)return null;let[n,...r]=e;if(!n||r.length===0&&["*","default",t].includes(n))return null;s(n!=="*");let i="",o="";return n==="default"?i="export default":(i="export",r=[n,...r]),r.forEach(l=>{i=`${i} { ${l}`,o=` }${o}`}),i+o}function fr(e,t,n){return`${_e(e,t)} at ${q(n,t)}`}function kt(e,t,n){return n?`${_e(e,t)} at ${q(n,t)}`:`${_e(e,t)} internally`}function _e(e,t){return`${e} ${p.cyan(t)} defined`}function q(e,t){let n;return G(e)?n=e:n=[e],s(n.length>=1),n.map(i=>{const{filePathToShowToUser:o,fileExportPathToShowToUser:a}=i;let l=o;const u=cr(a,t);return u&&(l=`${l} > ${p.cyan(u)}`),l}).join(" / ")}const dr=[{is:e=>e===void 0,match:e=>e==="!undefined",serialize:()=>"!undefined",deserialize:()=>{}},{is:e=>e===1/0,match:e=>e==="!Infinity",serialize:()=>"!Infinity",deserialize:()=>1/0},{is:e=>e===-1/0,match:e=>e==="!-Infinity",serialize:()=>"!-Infinity",deserialize:()=>-1/0},{is:e=>typeof e=="number"&&isNaN(e),match:e=>e==="!NaN",serialize:()=>"!NaN",deserialize:()=>NaN},{is:e=>e instanceof Date,match:e=>e.startsWith("!Date:"),serialize:e=>"!Date:"+e.toISOString(),deserialize:e=>new Date(e.slice(6))},{is:e=>typeof e=="bigint",match:e=>e.startsWith("!BigInt:"),serialize:e=>"!BigInt:"+e.toString(),deserialize:e=>{if(typeof BigInt>"u")throw new Error("Your JavaScript environement does not support BigInt. Consider adding a polyfill.");return BigInt(e.slice(8))}},{is:e=>e instanceof RegExp,match:e=>e.startsWith("!RegExp:"),serialize:e=>"!RegExp:"+e.toString(),deserialize:e=>{e=e.slice(8);const t=e.match(/\/(.*)\/(.*)?/),n=t[1],r=t[2];return new RegExp(n,r)}},{is:e=>e instanceof Map,match:e=>e.startsWith("!Map:"),serialize:(e,t)=>"!Map:"+t(Array.from(e.entries())),deserialize:(e,t)=>new Map(t(e.slice(5)))},{is:e=>e instanceof Set,match:e=>e.startsWith("!Set:"),serialize:(e,t)=>"!Set:"+t(Array.from(e.values())),deserialize:(e,t)=>new Set(t(e.slice(5)))},{is:e=>typeof e=="string"&&e.startsWith("!"),match:e=>e.startsWith("!"),serialize:e=>"!"+e,deserialize:e=>e.slice(1)}];function We(e){const t=JSON.parse(e);return He(t)}function He(e){return typeof e=="string"?gr(e):(typeof e=="object"&&e!==null&&Object.entries(e).forEach(([t,n])=>{e[t]=He(n)}),e)}function gr(e){for(const{match:t,deserialize:n}of dr)if(t(e))return n(e,We);return e}const hr=["$$registrations","_rerender_only"],pr=[".md",".mdx"];function yr(e,t,n){const r=Object.keys(e).filter(c=>!hr.includes(c)),i=c=>c==="default"||c===n,o=r.filter(i),a=r.filter(c=>!i(c));if(o.length===1&&a.length===0)return;const l=p.code("export default"),u=p.code(`export { ${n} }`);o.length===0&&d(!1,`${t} should have a ${u} or ${l}`),o.length===2&&O(!1,`${t} is ambiguous: remove ${l} or ${u}`,{onlyOnce:!0}),s(o.length===1),s(a.length>0),pr.some(c=>t.endsWith(c))||a.forEach(c=>{O(!1,`${t} unexpected ${p.cyan(`export { ${c} }`)}`,{onlyOnce:!0})})}function $e(e){return wr(e)}function mr(e,t){const n=e.map(i=>{const o=$e(i.configValuesSerialized),{pageId:a,isErrorPage:l,routeFilesystem:u,loadConfigValuesAll:c}=i;return br(o),{pageId:a,isErrorPage:l,routeFilesystem:u,configValues:o,loadConfigValuesAll:c}}),r={configValues:{}};{const i=$e(t.configValuesSerialized);Object.assign(r.configValues,i)}return{pageConfigs:n,pageConfigGlobal:r}}function br(e){const t="route",n=e[t];if(!n)return;const{value:r,definedAtData:i}=n,o=typeof r;s(i);const a=fr("Config",t,i);d(o==="string"||V(r),`${a} has an invalid type '${o}': it should be a string or a function instead, see https://vike.dev/route`)}function wr(e){const t={};return Object.entries(e).forEach(([r,i])=>{let o;if(i.type==="cumulative"){const{valueSerialized:a,...l}=i;o={value:a.map((c,f)=>{const{value:g,sideExports:y}=et(c,r,()=>{const h=i.definedAtData[f];return s(h),h});return n(y),g}),...l}}else{const{valueSerialized:a,...l}=i,{value:u,sideExports:c}=et(a,r,()=>(s(i.type!=="computed"),i.definedAtData));n(c),o={value:u,...l}}t[r]=o}),t;function n(r){r.forEach(i=>{const{configName:o,configValue:a}=i;t[o]||(t[o]=a)})}}function et(e,t,n){if(e.type==="js-serialized"){let{value:r}=e;return r=He(r),{value:r,sideExports:[]}}if(e.type==="pointer-import"){const{value:r}=e;return{value:r,sideExports:[]}}if(e.type==="plus-file"){const r=n(),{exportValues:i}=e;yr(i,r.filePathToShowToUser,t);let o,a=!1;const l=[];return Object.entries(i).forEach(([u,c])=>{u!=="default"&&u!==t?l.push({configName:u,configValue:{type:"standard",value:c,definedAtData:{filePathToShowToUser:r.filePathToShowToUser,fileExportPathToShowToUser:[u]}}}):(o=c,s(!a),a=!0)}),s(a),{value:o,sideExports:l}}s(!1)}function Sr(e){s(S(e,"pageFilesLazy","object")),s(S(e,"pageFilesEager","object")),s(S(e,"pageFilesExportNamesLazy","object")),s(S(e,"pageFilesExportNamesEager","object")),s(S(e.pageFilesLazy,".page")),s(S(e.pageFilesLazy,".page.client")||S(e.pageFilesLazy,".page.server")),s(S(e,"pageFilesList","string[]")),s(S(e,"pageConfigsSerialized")),s(S(e,"pageConfigGlobalSerialized"));const{pageConfigsSerialized:t,pageConfigGlobalSerialized:n}=e;vr(t),Pr(n);const{pageConfigs:r,pageConfigGlobal:i}=mr(t,n),o={};ie(e.pageFilesLazy).forEach(({filePath:l,pageFile:u,globValue:c})=>{u=o[l]=o[l]??u;const f=c;tt(f),u.loadFile=async()=>{"fileExports"in u||(u.fileExports=await f(),Qn(u))}}),ie(e.pageFilesExportNamesLazy).forEach(({filePath:l,pageFile:u,globValue:c})=>{u=o[l]=o[l]??u;const f=c;tt(f),u.loadExportNames=async()=>{if(!("exportNames"in u)){const g=await f();s(S(g,"exportNames","string[]"),u.filePath),u.exportNames=g.exportNames}}}),ie(e.pageFilesEager).forEach(({filePath:l,pageFile:u,globValue:c})=>{u=o[l]=o[l]??u;const f=c;s(T(f)),u.fileExports=f}),ie(e.pageFilesExportNamesEager).forEach(({filePath:l,pageFile:u,globValue:c})=>{u=o[l]=o[l]??u;const f=c;s(T(f)),s(S(f,"exportNames","string[]"),u.filePath),u.exportNames=f.exportNames}),e.pageFilesList.forEach(l=>{o[l]=o[l]??xt(l)});const a=Object.values(o);return a.forEach(({filePath:l})=>{s(!l.includes("\\"))}),{pageFiles:a,pageConfigs:r,pageConfigGlobal:i}}function ie(e){const t=[];return Object.entries(e).forEach(([n,r])=>{s(ar.includes(n)),s(T(r)),Object.entries(r).forEach(([i,o])=>{const a=xt(i);s(a.fileType===n),t.push({filePath:i,pageFile:a,globValue:o})})}),t}function tt(e){s(V(e))}function vr(e){s(G(e)),e.forEach(t=>{s(T(t)),s(S(t,"pageId","string")),s(S(t,"routeFilesystem")),s(S(t,"configValuesSerialized"))})}function Pr(e){s(S(e,"configValuesSerialized"))}const Y=k("setPageFiles.ts",{});function Rr(e){const{pageFiles:t,pageConfigs:n,pageConfigGlobal:r}=Sr(e);Y.pageFilesAll=t,Y.pageConfigs=n,Y.pageConfigGlobal=r}async function Er(e,t){s(!Y.pageFilesGetter),s(t===void 0);const{pageFilesAll:n,pageConfigs:r,pageConfigGlobal:i}=Y;s(n&&r&&i);const o=Cr(n,r);return{pageFilesAll:n,allPageIds:o,pageConfigs:r,pageConfigGlobal:i}}function Cr(e,t){const n=e.filter(({isDefaultPageFile:o})=>!o).map(({pageId:o})=>o),r=Ie(n),i=t.map(o=>o.pageId);return[...r,...i]}function Ne(e,t){return It(e,t,!0)}function Ft(e,t){return It(e,t,!1)}function It(e,t,n){const r=n?"CLIENT_ONLY":"SERVER_ONLY",i=e.filter(h=>h.isRelevant(t)&&h.fileType!==".page.route").sort(_r(n,t)),o=h=>{const R=i.filter(m=>m.pageId===t&&m.isEnv(h?"CLIENT_AND_SERVER":r));d(R.length<=1,`Merge the following files into a single file: ${R.map(m=>m.filePath).join(" ")}`);const $=R[0];return s($===void 0||!$.isDefaultPageFile),$},a=o(!1),l=o(!0),u=h=>i.filter(R=>R.isRendererPageFile&&R.isEnv(h?"CLIENT_AND_SERVER":r))[0],c=u(!1),f=u(!0),g=i.filter(h=>h.isDefaultPageFile&&!h.isRendererPageFile&&(h.isEnv(r)||h.isEnv("CLIENT_AND_SERVER")));return[a,l,...g,c,f].filter(Jn)}function _r(e,t){const n=e?"CLIENT_ONLY":"SERVER_ONLY",r=-1,i=1,o=0;return(a,l)=>{if(!a.isDefaultPageFile&&l.isDefaultPageFile)return r;if(!l.isDefaultPageFile&&a.isDefaultPageFile)return i;{const u=a.isRendererPageFile,c=l.isRendererPageFile;if(!u&&c)return r;if(!c&&u)return i;s(u===c)}{const u=nt(t,a.filePath),c=nt(t,l.filePath);if(ur.pageId===e);return s(t.length>0),s(n),n}function jt(e){if(!e||G(e))return null;const{filePathToShowToUser:t}=e;return s(t),t}function $r(e){const t=jt(e);return s(t),t}function Or(e,t){const n={},r={},i={};e.forEach(y=>{Tr(y).forEach(({exportName:R,exportValue:$,isFromDefaultExport:m})=>{s(R!=="default"),i[R]=i[R]??[],i[R].push({exportValue:$,exportSource:`${y.filePath} > ${m?`\`export default { ${R} }\``:`\`export { ${R} }\``}`,filePath:y.filePath,_filePath:y.filePath,_fileType:y.fileType,_isFromDefaultExport:m})})});const o={},a={},l=(y,h)=>{o[h]=y,a[h]??(a[h]=[]),a[h].push(y)},u={configsStandard:{},configsCumulative:{},configsComputed:{}};t&&Object.entries(t.configValues).forEach(([y,h])=>{const{value:R}=h,$=jt(h.definedAtData),m=kt("Config",y,h.definedAtData);if(r[y]=r[y]??R,n[y]=n[y]??[],s(n[y].length===0),n[y].push({configValue:R,configDefinedAt:m,configDefinedByFile:$}),h.type==="standard"){const P={type:"configsStandard",value:h.value,definedAt:q(h.definedAtData,y)};l(P,y),u.configsStandard[y]=P}if(h.type==="cumulative"){const P={type:"configsCumulative",values:h.value.map((F,b)=>{const C=h.definedAtData[b];s(C);const E=q(C,y);return{value:F,definedAt:E}})};l(P,y),u.configsCumulative[y]=P}if(h.type==="computed"){const P={type:"configsComputed",value:h.value};l(P,y),u.configsComputed[y]=P}const v=y;i[v]=i[v]??[],i[v].push({exportValue:R,exportSource:m,filePath:$,_filePath:$,_fileType:null,_isFromDefaultExport:null})});const c=xr(),f={};return Object.entries(i).forEach(([y,h])=>{h.forEach(({exportValue:R,_fileType:$,_isFromDefaultExport:m})=>{f[y]=f[y]??R,$===".page"&&!m&&(y in c||(c[y]=R))})}),s(!("default"in f)),s(!("default"in i)),{from:u,source:o,sources:a,config:r,configEntries:n,exports:f,exportsAll:i,pageExports:c}}function Tr(e){const{filePath:t,fileExports:n}=e;s(n),s(Tt(t));const r=[];return Object.entries(n).sort(zn(([i])=>i==="default")).forEach(([i,o])=>{let a=i==="default";if(a)if(sr(t))i="Page";else{d(T(o),`The ${p.cyan("export default")} of ${t} should be an object.`),Object.entries(o).forEach(([l,u])=>{Zn(l,t),r.push({exportName:l,exportValue:u,isFromDefaultExport:a})});return}r.push({exportName:i,exportValue:o,isFromDefaultExport:a})}),r.forEach(({exportName:i,isFromDefaultExport:o})=>{s(!(o&&_t.includes(i)))}),r}function xr(){return new Proxy({},{get(...e){return B()||O(!1,"`pageContext.pageExports` is outdated. Use `pageContext.exports` instead, see https://vike.dev/exports",{onlyOnce:!0,showStackTrace:!0}),Reflect.get(...e)}})}const De={},Lt={},kr={},he={},Fr=[],Wt={},Ir=[{pageId:"/pages/_error",isErrorPage:!0,routeFilesystem:void 0,loadConfigValuesAll:()=>me(()=>import("./pages_error.OPXz8eTI.js"),__vite__mapDeps([0,1,2,3])),configValuesSerialized:{clientEntryLoaded:{type:"computed",definedAtData:null,valueSerialized:{type:"js-serialized",value:!0}},clientRouting:{type:"standard",definedAtData:{filePathToShowToUser:"/pages/+config.ts",fileExportPathToShowToUser:["default","clientRouting"]},valueSerialized:{type:"js-serialized",value:!0}}}},{pageId:"/pages/index",isErrorPage:void 0,routeFilesystem:{routeString:"/",definedBy:"/pages/index/"},loadConfigValuesAll:()=>me(()=>import("./pages_index.bLHpNDwf.js"),__vite__mapDeps([4,1,2,3,5])),configValuesSerialized:{clientEntryLoaded:{type:"computed",definedAtData:null,valueSerialized:{type:"js-serialized",value:!0}},clientRouting:{type:"standard",definedAtData:{filePathToShowToUser:"/pages/+config.ts",fileExportPathToShowToUser:["default","clientRouting"]},valueSerialized:{type:"js-serialized",value:!0}}}},{pageId:"/pages/second-page",isErrorPage:void 0,routeFilesystem:{routeString:"/second-page",definedBy:"/pages/second-page/"},loadConfigValuesAll:()=>me(()=>import("./pages_second-page.BRRyZT6a.js"),__vite__mapDeps([6,1,2,3,5])),configValuesSerialized:{clientEntryLoaded:{type:"computed",definedAtData:null,valueSerialized:{type:"js-serialized",value:!0}},clientRouting:{type:"standard",definedAtData:{filePathToShowToUser:"/pages/+config.ts",fileExportPathToShowToUser:["default","clientRouting"]},valueSerialized:{type:"js-serialized",value:!0}}}}],Ar={configValuesSerialized:{}},jr=Object.assign({}),Lr={...jr};De[".page"]=Lr;const Wr=Object.assign({}),Hr={...Wr};he[".page"]=Hr;const Nr=Object.assign({}),Dr={...Nr};he[".page.server"]=Dr;const Br=Object.assign({}),Vr={...Br};Lt[".page.route"]=Vr;const zr=Object.assign({}),Ur={...zr};De[".page.client"]=Ur;const Gr=Object.assign({}),Mr={...Gr};he[".page.client"]=Mr;const Jr=Object.assign({}),Yr={...Jr};Wt[".page.server"]=Yr;const Kr=Object.freeze(Object.defineProperty({__proto__:null,neverLoaded:Wt,pageConfigGlobalSerialized:Ar,pageConfigsSerialized:Ir,pageFilesEager:Lt,pageFilesExportNamesEager:he,pageFilesExportNamesLazy:kr,pageFilesLazy:De,pageFilesList:Fr},Symbol.toStringTag,{value:"Module"}));Rr(Kr);function Ht(){s(B())}function qr(){Ht(),ee()}function Xr(){Ht()}function rt(e){const t=e/1e3;if(t<120){const n=it(t);return`${n} second${ot(n)}`}{const n=t/60,r=it(n);return`${r} minute${ot(r)}`}}function it(e){let t=e.toFixed(1);return t.endsWith(".0")&&(t=t.slice(0,-2)),t}function ot(e){return e==="1"?"":"s"}const Oe=k("utils/executeHook.ts",{userHookErrors:new WeakMap,pageContext:null});function N(e,t,n){const{hookName:r,hookFilePath:i,hookTimeout:{error:o,warning:a}}=t;let l,u;const c=new Promise((h,R)=>{l=$=>{f(),h($)},u=$=>{f(),R($)}}),f=()=>{g&&clearTimeout(g),y&&clearTimeout(y)},g=st(a)&&setTimeout(()=>{O(!1,`The ${r}() hook defined by ${i} is slow: it's taking more than ${rt(a)} (https://vike.dev/hooksTimeout)`,{onlyOnce:!1})},a),y=st(o)&&setTimeout(()=>{const h=Pt(`The ${r}() hook defined by ${i} timed out: it didn't finish after ${rt(o)} (https://vike.dev/hooksTimeout)`);u(h)},o);return(async()=>{try{Qr(n);const h=await e();l(h)}catch(h){T(h)&&Oe.userHookErrors.set(h,{hookName:r,hookFilePath:i}),u(h)}})(),c}function st(e){return!!e&&e!==1/0}function Qr(e){Oe.pageContext=e,Promise.resolve().then(()=>{Oe.pageContext=null})}function Be(e){const t=window.location.href,{searchOriginal:n,hashOriginal:r,pathname:i}=te(t,"/");let o;return e!=null&&e.withoutHash?o=`${i}${n||""}`:o=`${i}${n||""}${r||""}`,s(o.startsWith("/")),o}function Zr(e){return typeof e=="string"&&/^[a-z0-9\$_]+$/i.test(e)?`.${e}`:`[${JSON.stringify(e)}]`}Xr();function ei(){var r,i,o,a;const e=!!((i=(r=window.__REACT_DEVTOOLS_GLOBAL_HOOK__)==null?void 0:r.renderers)!=null&&i.size),t=!!((a=(o=window.__REACT_DEVTOOLS_GLOBAL_HOOK__)==null?void 0:o.rendererInterfaces)!=null&&a.size),n=!!window.__vite_plugin_react_preamble_installed__;return e||t||n}function at(e,t){return!T(e)||!T(t)?!1:e.message===t.message}function ue(e){window.location.href=e}function ti(e){return new Promise(t=>setTimeout(t,e))}function ni(e,t){let n=!1;return()=>{n||(n=!0,setTimeout(()=>{n=!1,e()},t))}}function Nt(e){window.addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&e()})}function ri(e){window.addEventListener("visibilitychange",()=>{document.visibilityState==="visible"&&e()})}function ii(e){return!e.startsWith("/")&&!e.startsWith(".")&&!e.startsWith("?")&&e!==""}qr();function Dt(){let e=window.history.state;e||(e={_isVikeEnhanced:!0});let t=!1;"timestamp"in e||(t=!0,e.timestamp=Ue()),"scrollPosition"in e||(t=!0,e.scrollPosition=ze()),"triggeredBy"in e||(e.triggeredBy="browser"),Bt(e),t&&Ge(e)}function Ve(){const e=window.history.state||{};return Bt(e),e}function ze(){return{x:window.scrollX,y:window.scrollY}}function Ue(){return new Date().getTime()}function lt(){const e=ze(),t=Ve();Ge({...t,scrollPosition:e})}function oi(e,t){if(t)Ge(Ve(),e);else{const n=Ue();si({timestamp:n,scrollPosition:null,triggeredBy:"vike",_isVikeEnhanced:!0},e)}}function Bt(e){if(s(T(e)),"timestamp"in e){const{timestamp:t}=e;s(typeof t=="number")}if("scrollPosition"in e){const{scrollPosition:t}=e;t!==null&&s(S(t,"x","number")&&S(t,"y","number"))}}function Ge(e,t){const n=t??null;window.history.replaceState(e,"",n)}function si(e,t){window.history.pushState(e,"",t)}function ai(){const e=window.history.pushState.bind(window.history);window.history.pushState=(t={},...n)=>{d(t==null||T(t),"history.pushState(state) argument state must be an object");const r=li(t)?t:{_isVikeEnhanced:!0,scrollPosition:ze(),timestamp:Ue(),triggeredBy:"user",...t};return e(r,...n)}}function li(e){return T(e)&&"_isVikeEnhanced"in e}function ui(){const e="vike_pageContext",t=document.getElementById(e);d(t,`Couldn't find #${e} (which Vike automatically injects in the HTML): make sure it exists (i.e. don't remove it and make sure your HTML isn't malformed)`);const n=t.textContent;s(n);const r=We(n);return s(S(r,"_pageId","string")),s(S(r,"routeParams","string{}")),r}async function ci(e,t){const r=Ft(e,t).filter(o=>o.fileType===".page.server");return await Promise.all(r.map(async o=>{o.exportNames||(s(o.loadExportNames,t),await o.loadExportNames())})),{hasOnBeforeRenderServerSideOnlyHook:r.some(({exportNames:o})=>(s(o),o.includes("onBeforeRender")))}}function fi(e,t,n){const{value:r,definedAtData:i}=e;return n&&di(r,n,t,i),e}function J(e,t,n){const r=e.configValues[t];return r?fi(r,t,n):null}function di(e,t,n,r){s(e!==null);const i=typeof e;if(i===t)return;const o=Kn(e),a=o!==null?`value ${p.cyan(o)}`:`type ${p.cyan(i)}`,u=`${kt("Config",n,r)} has an invalid ${a}: it should be a ${p.cyan(t)} instead`;d(!1,u)}const gi=k("getHook.ts",{isPrerendering:!1});function L(e,t){if(!(t in e.exports))return null;const{hooksTimeout:n}=e.config,r=pi(n,t),i=e.exports[t],o=e.exportsAll[t][0];if(s(o.exportValue===i),i===null)return null;const a=o.filePath;return s(a),s(!a.endsWith(" ")),Vt(i,{hookName:t,hookFilePath:a}),{hookFn:i,hookName:t,hookFilePath:a,hookTimeout:r}}function hi(e,t){const n=e.configValues[t];if(!n)return null;const r=n.value;if(!r)return null;const i=$r(n.definedAtData);s(i),Vt(r,{hookName:t,hookFilePath:i});const o=pe(t);return{hookFn:r,hookName:t,hookFilePath:i,hookTimeout:o}}function Se(e,t){L(e,t)}function Vt(e,{hookName:t,hookFilePath:n}){s(t&&n),s(!t.endsWith(")")),d(V(e),`Hook ${t}() defined by ${n} should be a function`)}function pi(e,t){const n=yi(e);if(n===!1)return{error:!1,warning:!1};const r=n[t],i=pe(t);return(r==null?void 0:r.error)!==void 0&&(i.error=r.error),(r==null?void 0:r.warning)!==void 0&&(i.warning=r.warning),i}function yi(e){if(e===void 0)return{};if(e===!1)return!1;d(T(e),`Setting ${p.cyan("hooksTimeout")} should be ${p.cyan("false")} or an object`);const t={};return Object.entries(e).forEach(([n,r])=>{if(r===!1){t[n]={error:!1,warning:!1};return}d(T(r),`Setting ${p.cyan(`hooksTimeout.${n}`)} should be ${p.cyan("false")} or an object`);const[i,o]=["error","warning"].map(a=>{const l=r[a];if(l===void 0||l===!1)return l;const u=`Setting ${p.cyan(`hooksTimeout.${n}.${a}`)} should be`;return d(typeof l=="number",`${u} ${p.cyan("false")} or a number`),d(l>0,`${u} a positive number`),l});t[n]={error:i,warning:o}}),t}function pe(e){return e==="onBeforeRoute"?{error:5*1e3,warning:1*1e3}:gi.isPrerendering?{error:2*60*1e3,warning:30*1e3}:(s(!e.toLowerCase().includes("prerender")),{error:30*1e3,warning:4*1e3})}function mi(e){let t=Object.getOwnPropertyDescriptors(e);for(const n of Object.keys(e))delete e[n];t=Object.fromEntries(Object.entries(t).sort(([n],[r])=>Mn(n,r))),Object.defineProperties(e,t)}function bi(e){wi(e),Si(e)}function wi(e){nr(e._pageId,e._pageConfigs)&&s(S(e,"is404","boolean"))}function Si(e){if(e.is404===void 0||e.is404===null)return;const t=e.pageProps||{};if(!T(t)){O(!1,"pageContext.pageProps should be an object",{showStackTrace:!0,onlyOnce:!0});return}t.is404=t.is404||e.is404,e.pageProps=t}const vi="not-serializable",oe=k("getPageContextProxyForUser.ts",{});function Pi(e){return s([!0,!1].includes(e._hasPageContextFromServer)),s([!0,!1].includes(e._hasPageContextFromClient)),new Proxy(e,{get(t,n){const r=e[n],i=Zr(n);return d(r!==vi,`pageContext${i} couldn't be serialized and, therefore, is missing on the client-side. Check the server logs for more information.`),Ri(e,n,i),r}})}function Ri(e,t,n){if(_i(t)||t in e||Ci(t)||!e._hasPageContextFromServer)return;const r=`pageContext${n} isn't defined on the client-side, see https://vike.dev/passToClient#error`;e._hasPageContextFromClient?O(!1,r,{onlyOnce:!1,showStackTrace:!0}):d(!1,r)}const Ei=["then","toJSON"];function Ci(e){return!!(Ei.includes(e)||typeof e=="symbol"||typeof e!="string"||e.startsWith("__v_"))}function _i(e){return oe.prev===e||oe.prev==="__v_raw"?!0:(oe.prev=e,window.setTimeout(()=>{oe.prev=void 0},0),!1)}function Me(e,t){{const i=e;s([!0,!1].includes(i.isHydration)),s([!0,!1,null].includes(i.isBackwardNavigation))}s("config"in e),s("configEntries"in e),s("exports"in e),s("exportsAll"in e),s("pageExports"in e),s(T(e.pageExports));const n=e.exports.Page;w(e,{Page:n}),$i(e),mi(e);const r=Pi(e);return bi(e),r}function $i(e){Object.entries(e).forEach(([t,n])=>{delete e[t],e[t]=n})}const ut=["urlPathname","urlParsed"],Oi=["Page","pageExports","exports"];function Ti(e){[...Oi,...ut].forEach(n=>{n in e&&(ut.includes(n)?(s(n.startsWith("url")),O(!1,`pageContext.${n} is already available in the browser when using Client Routing; adding '${n}' to passToClient has no effect`,{onlyOnce:!0})):O(!1,`pageContext.${n} is a built-in that cannot be overriden; adding '${n}' to passToClient has no effect`,{onlyOnce:!0}),delete e[n])})}const xi="/";function ki(e,t,n){const{pathnameOriginal:r,searchOriginal:i,hashOriginal:o}=te(e,xi);e.startsWith("/")&&s(e===`${r}${i||""}${o||""}`,{url:e});const a=r.endsWith("/");let l;return l=r+(a?"":"/")+"index",s(l),l=l+t,`${l}${i||""}${o||""}`}const Fi=".pageContext.json";function Ii(e){return ki(e,Fi)}function zt(e,{hookName:t,hookFilePath:n}){if(e==null)return;s(!t.endsWith(")"));const r=`The ${p.cyan("pageContext")} object provided by the ${t}() hook defined by ${n}`;d(T(e),`${r} should be an object (but it's ${p.cyan(`typeof pageContext === ${JSON.stringify(typeof e)}`)} instead)`),d(!("_objectCreatedByVike"in e),`${r} shouldn't be the whole ${p.cyan("pageContext")} object, see https://vike.dev/pageContext-manipulation#do-not-return-entire-pagecontext`),O(!("_pageId"in e),`${r} sets ${p.cyan("pageContext._pageId")} which means that Vike's routing is overriden. This is an experimental feature: make sure to contact a vike maintainer before using this.`,{onlyOnce:!0}),d(!("is404"in e),`${r} sets ${p.cyan("pageContext.is404")} which is forbidden, use ${p.cyan("throw render()")} instead, see https://vike.dev/render`)}function Ai(e,t,n){s(!n.endsWith(" "));const r=[],i=Object.keys(e);for(const o of i)t.includes(o)||r.push(o);d(r.length===0,[n,"returned an object with following unknown keys:",Qe(r)+".","Only following keys are allowed:",Qe(t)+"."].join(" "))}function ji(e,t){if(e==null)return;const n=`The onBeforeRender() hook defined by ${t}`;d(D(e),`${n} should return a plain JavaScript object, ${p.cyan("undefined")}, or ${p.cyan("null")}`),Ai(e,["pageContext"],n),e.pageContext&&zt(e.pageContext,{hookName:"onBeforeRender",hookFilePath:t})}function Li(e,t){if(!D(e))return!1;for(const n of Object.keys(e))if(!t.includes(n))return!1;return!0}function Wi(e,t,n=r=>r){if(s(e.length>0),e.length===1)return n(e[0]);const r=e.slice(0,e.length-1),i=e[e.length-1];return r.map(n).join(", ")+`, ${t} `+n(i)}B()&&ee();const Ut="The guard() hook defined by";async function Hi(e,t){let n;if(e._pageFilesAll.length>0?(s(e._pageConfigs.length===0),n=Ni(e._pageId,e._pageFilesAll)):n=L(e,"guard"),!n)return;const r=n.hookFn;let i=e;const o=t(e);o&&(i=o);const a=await N(()=>r(i),n,e);d(a===void 0,`${Ut} ${n.hookFilePath} returns a value, but guard() shouldn't return any value`)}function Ni(e,t){const n=t.find(u=>u.pageId===e&&u.fileType===".page.route");if(!n)return null;const{filePath:r,fileExports:i}=n;s(i);const o=i.guard;if(!o)return null;const a=r,l=pe("guard");return d(V(o),`${Ut} ${a} should be a function`),{hookFn:o,hookName:"guard",hookFilePath:a,hookTimeout:l}}function Di(e){const t=new Error("AbortRender");return w(t,{_pageContextAbort:e,[Gt]:!0}),t}const Gt="_isAbortError";function ct(e){return typeof e=="object"&&e!==null&&Gt in e}function Bi(e){return e._urlRewrite||e._urlRedirect||e.abortStatusCode?(s(S(e,"_abortCall","string")),!0):!1}function Vi(e){zi(e);const t={_urlRewrite:null};return e.forEach(n=>{Object.assign(t,n)}),t}function zi(e){const t=[];e.forEach(n=>{const r=n._urlRewrite;{const i=t.indexOf(r);if(i!==-1){const o=[...t.slice(i),r].map(a=>`render('${a}')`).join(" => ");d(!1,`Infinite loop of render() calls: ${o}`)}}t.push(r)})}function Ui(e,t){const n=[e>0&&p.cyan("throw render('/some-url')"),t>0&&p.cyan("throw redirect('/some-url')")].filter(Boolean).join(" and ");d(e+t<=7,`Maximum chain length of 7 ${n} exceeded. Did you define an infinite loop of ${n}?`)}const Gi="_pageContextInitIsPassedToClient",Mt="_isServerSideError",Jt=k("router/getPageContext.ts",{});function Mi(){const e=ui();return d(!("urlOriginal"in e),"Adding 'urlOriginal' to passToClient is forbidden"),qt(e),w(e,{_hasPageContextFromServer:!0}),e}async function Ji(e){const t={isHydration:!0,_hasPageContextFromClient:!1,_hasPageContextFromServer:!0};for(const n of["data","onBeforeRender"]){const r={};if(w(r,e),w(r,t),Kt(n,r)){const i=await Yt(n,r);Object.assign(t,i)}}return t}async function ft(e,t){const n={isHydration:!1,_hasPageContextFromClient:!1},r={};w(r,e),w(r,n);let i=!1;if(!t&&await Ki(r)){const o=await qi(e);if("is404ServerSideRouted"in o)return{is404ServerSideRouted:!0};const{pageContextFromServer:a}=o;i=!0,s(!(Mt in a)),s(!("serverSideError"in a)),w(n,a)}for(const o of["guard","data","onBeforeRender"]){const a={};if(w(a,{_hasPageContextFromServer:i}),w(a,e),w(a,n),o==="guard")!t&&!i&&await Hi(a,l=>Me(l));else if(s(o==="data"||o==="onBeforeRender"),Kt(o,a)||!i){const l=await Yt(o,a);w(n,l)}else s(i)}return w(n,{_hasPageContextFromServer:i}),{pageContextFromHooks:n}}async function Yt(e,t){const n=L(t,e);if(!n)return null;const r=Me(t),i=await N(()=>n.hookFn(r),n,t),o={};if(e==="onBeforeRender"){ji(i,n.hookFilePath);const a=i==null?void 0:i.pageContext;a&&(w(o,{_hasPageContextFromClient:!0}),w(o,a))}else{s(e==="data");const a={data:i};i&&w(o,{_hasPageContextFromClient:!0}),w(o,a)}return o}function Yi(e){e[Gi]&&(Jt.pageContextInitIsPassedToClient=!0)}async function Ki(e){return!!Jt.pageContextInitIsPassedToClient||await dt("data",e)||await dt("onBeforeRender",e)}async function dt(e,t){var n;if(t._pageConfigs.length>0){const r=At(t._pageId,t._pageConfigs),i=((n=J(r,`${e}Env`))==null?void 0:n.value)??{};return s(T(i)),!!i.server&&!i.client}else{if(e==="data")return!1;s(e==="onBeforeRender");const{hasOnBeforeRenderServerSideOnlyHook:r}=await ci(t._pageFilesAll,t._pageId);return r}}function Kt(e,t){var n;if(t._pageConfigs.length>0){const r=At(t._pageId,t._pageConfigs),i=((n=J(r,`${e}Env`))==null?void 0:n.value)??{};return s(T(i)),!!i.client&&!i.server}else return!1}async function qi(e){const t=Ii(e._urlRewrite??e.urlOriginal),n=await fetch(t);{const o=n.headers.get("content-type"),a="application/json",l=o&&o.includes(a);if(!l&&n.status===404)return ue(e.urlOriginal),{is404ServerSideRouted:!0};d(l,`Wrong Content-Type for ${t}: it should be ${a} but it's ${o} instead. Make sure to properly use pageContext.httpResponse.headers, see https://vike.dev/renderPage`)}const r=await n.text(),i=We(r);if(s(T(i)),Bi(i))throw Di(i);if("serverSideError"in i||Mt in i)throw Pt("pageContext couldn't be fetched from server: an error occurred on the server-side (see your server logs)");return s(S(i,"_pageId","string")),qt(i),{pageContextFromServer:i}}function qt(e){Yi(e),Ti(e)}function Xi(e){s(typeof e.urlOriginal=="string"),en(e);const t={};return we(t,"urlPathname",{get:Qt,enumerable:!0,configurable:!0}),we(t,"url",{get:Qi,enumerable:!1,configurable:!0}),we(t,"urlParsed",{get:Zi,enumerable:!0,configurable:!0}),t}function Xt(e){let t=e._urlHandler;t||(t=i=>i);let n=e.urlLogical??e._urlRewrite??e.urlOriginal;n=t(n);const r=e._baseServer;return s(n&&typeof n=="string"),s(r.startsWith("/")),te(n,r)}function Qt(){const{pathname:e}=Xt(this),t=e;return s(t.startsWith("/")),t}function Qi(){return O(!1,"`pageContext.url` is outdated. Use `pageContext.urlPathname`, `pageContext.urlParsed`, or `pageContext.urlOriginal` instead. (See https://vike.dev/migration/0.4.23 for more information.)",{onlyOnce:!0,showStackTrace:!0}),Qt.call(this)}function Zi(){const e=Xt(this),{origin:t,pathname:n,pathnameOriginal:r,search:i,searchAll:o,searchOriginal:a,hash:l,hashOriginal:u}=e,c=B(),f=y=>{O(c,`pageContext.urlParsed.${y} isn't available on the server-side (HTTP requests don't include the URL hash)`,{onlyOnce:!0,showStackTrace:!0})},g={origin:t,pathname:n,pathnameOriginal:r,search:i,searchAll:o,searchOriginal:a,get hash(){return f("hash"),l},get hashOriginal(){return f("hashOriginal"),u},get hashString(){return O(!1,"pageContext.urlParsed.hashString has been renamed to pageContext.urlParsed.hashOriginal",{onlyOnce:!0,showStackTrace:!0}),f("hashString"),u},get searchString(){return O(!1,"pageContext.urlParsed.searchString has been renamed to pageContext.urlParsed.searchOriginal",{onlyOnce:!0,showStackTrace:!0}),a}};return re(g,"hashString",!1),re(g,"searchString",!1),c||(re(g,"hash",!1),re(g,"hashOriginal",!1)),g}function Zt(e){s(typeof e.urlOriginal=="string"),s(typeof e.urlPathname=="string"),s(D(e.urlParsed)),s(e.urlPathname===e.urlParsed.pathname),en(e)}function en(e){"urlPathname"in e?(s(typeof e.urlPathname=="string"),s(be(e,"urlPathname")),s(be(e,"urlParsed")),s(be(e,"url"))):(s(!("urlParsed"in e)),s(!("url"in e)))}function eo(e,t){const r=t.filter(({filesystemRoot:o})=>e.startsWith(o)).sort(le(({filesystemRoot:o})=>o.length))[0];let i;if(r){const{filesystemRoot:o,urlRoot:a}=r,l={pageId:e,filesystemRoot:o,urlRoot:a};s(a.startsWith("/")&&e.startsWith("/")&&o.startsWith("/"),l),s(e.startsWith(o),l),o!=="/"?(s(!o.endsWith("/"),l),i=j(e,o.length,0)):i=e,s(i.startsWith("/"),l),i=a+(a.endsWith("/")?"":"/")+j(i,1,0)}else i=e;return s(i.startsWith("/")),i=i.split("/").filter(o=>o!=="pages"&&o!=="src"&&o!=="index").join("/"),s(!i.includes(".page.")),s(!i.endsWith(".")),i.endsWith("/index")&&(i=j(i,0,-6)),i===""&&(i="/"),s(i.startsWith("/")),s(!i.endsWith("/")||i==="/"),i}async function to(e,t,n){Zt(t);let r=e(t);if(tn(r,`The Route Function ${n}`),r=await r,r===!1)return null;if(r===!0&&(r={}),d(D(r),`The Route Function ${n} should return a boolean or a plain JavaScript object (but it's ${p.cyan(`typeof result === ${JSON.stringify(typeof r)}`)} instead)`),"match"in r){const{match:a}=r;if(d(typeof a=="boolean",`The ${p.cyan("match")} value returned by the Route Function ${n} should be a boolean.`),!a)return null}let i=null;"precedence"in r&&(i=r.precedence,d(typeof i=="number",`The ${p.cyan("precedence")} value returned by the Route Function ${n} should be a number.`)),nn(r,`The ${p.cyan("routeParams")} object returned by the Route Function ${n} should`);const o=r.routeParams||{};return d(!("pageContext"in r),`Providing ${p.cyan("pageContext")} in Route Functions is prohibited, see https://vike.dev/route-function#cannot-provide-pagecontext`),s(D(o)),Object.keys(r).forEach(a=>{d(a==="match"||a==="routeParams"||a==="precedence",`The Route Function ${n} returned an object with an unknown property ${p.cyan(a)} (the known properties are ${p.cyan("match")}, ${p.cyan("routeParams")}, and ${p.cyan("precedence")})`)}),{precedence:i,routeParams:o}}function tn(e,t){O(!Yn(e),`${t} returned a promise, but asynchronous routing is deprecated and will be removed in the next major release, see https://vike.dev/route-function#async`,{onlyOnce:!0})}function gt(){const e=p.cyan("iKnowThePerformanceRisksOfAsyncRouteFunctions");O(!1,`${e} is deprecated and will be removed in the next major release`,{onlyOnce:!0})}function nn(e,t){s(t.endsWith(" should")),S(e,"routeParams")&&(s(t.endsWith(" should")),d(S(e,"routeParams","string{}"),`${t} be an object holding string values.`))}async function no(e,t,n,r){await Promise.all(e.filter(l=>l.fileType===".page.route").map(l=>{var u;return(u=l.loadFile)==null?void 0:u.call(l)}));const{onBeforeRouteHook:i,filesystemRoots:o}=io(e,t,n);return{pageRoutes:ro(o,e,t,r),onBeforeRouteHook:i}}function ro(e,t,n,r){const i=[];if(n.length>0){s(e===null);const o=!0;n.filter(a=>!a.isErrorPage).forEach(a=>{const l=a.pageId;let u=null;{const c="route",f=J(a,c);if(f){const g=f.value;s(f.definedAtData);const y=q(f.definedAtData,c);typeof g=="string"?u={pageId:l,comesFromV1PageConfig:o,routeString:g,routeDefinedAtString:y,routeType:"STRING"}:(s(V(g)),J(a,"iKnowThePerformanceRisksOfAsyncRouteFunctions","boolean")&>(),u={pageId:l,comesFromV1PageConfig:o,routeFunction:g,routeDefinedAtString:y,routeType:"FUNCTION"})}}if(!u){const{routeFilesystem:c}=a;s(c);const{routeString:f,definedBy:g}=c;s(c.routeString.startsWith("/")),u={pageId:l,routeFilesystemDefinedBy:g,comesFromV1PageConfig:o,routeString:f,routeDefinedAtString:null,routeType:"FILESYSTEM"}}s(u),i.push(u)})}if(n.length===0){s(e);const o=!1;r.filter(a=>!ne(a)).forEach(a=>{const l=t.find(u=>u.pageId===a&&u.fileType===".page.route");if(!l||!("default"in l.fileExports)){const u=eo(a,e);s(u.startsWith("/")),s(!u.endsWith("/")||u==="/"),i.push({pageId:a,comesFromV1PageConfig:o,routeString:u,routeDefinedAtString:null,routeFilesystemDefinedBy:`${a}.page.*`,routeType:"FILESYSTEM"})}else{const{filePath:u,fileExports:c}=l;if(s(c.default),S(c,"default","string")){const f=c.default;d(f.startsWith("/"),`A Route String should start with a leading slash '/' but ${u} has \`export default '${f}'\`. Make sure to \`export default '/${f}'\` instead.`),i.push({pageId:a,comesFromV1PageConfig:o,routeString:f,routeDefinedAtString:u,routeType:"STRING"});return}if(S(c,"default","function")){const f=c.default;"iKnowThePerformanceRisksOfAsyncRouteFunctions"in c&>(),i.push({pageId:a,comesFromV1PageConfig:o,routeFunction:f,routeDefinedAtString:u,routeType:"FUNCTION"});return}d(!1,`The default export of ${u} should be a string or a function.`)}})}return i}function io(e,t,n){if(t.length>0)return{onBeforeRouteHook:hi(n,"onBeforeRoute"),filesystemRoots:null};let r=null;const i=[];return e.filter(o=>o.fileType===".page.route"&&o.isDefaultPageFile).forEach(({filePath:o,fileExports:a})=>{if(s(a),"onBeforeRoute"in a){d(S(a,"onBeforeRoute","function"),`\`export { onBeforeRoute }\` of ${o} should be a function.`);const{onBeforeRoute:l}=a,u="onBeforeRoute";r={hookFilePath:o,hookFn:l,hookName:u,hookTimeout:pe(u)}}"filesystemRoutingRoot"in a&&(d(S(a,"filesystemRoutingRoot","string"),`\`export { filesystemRoutingRoot }\` of ${o} should be a string.`),d(S(a,"filesystemRoutingRoot","string"),`\`export { filesystemRoutingRoot }\` of ${o} is \`'${a.filesystemRoutingRoot}'\` but it should start with a leading slash \`/\`.`),i.push({filesystemRoot:oo(o),urlRoot:a.filesystemRoutingRoot}))}),{onBeforeRouteHook:r,filesystemRoots:i}}function oo(e){s(e.startsWith("/")),s(!e.endsWith("/"));const t=e.split("/"),n=j(t,0,-1).join("/")||"/";return s(n.startsWith("/")),s(!n.endsWith("/")||n==="/"),n}function rn(){const e="/statetrain/";return s(so(e)),e}function so(e){return e.startsWith("/")}const ve=k("createPageContext.ts",{});async function on(e){ve.pageFilesData||(ve.pageFilesData=await Er());const{pageFilesAll:t,allPageIds:n,pageConfigs:r,pageConfigGlobal:i}=ve.pageFilesData,{pageRoutes:o,onBeforeRouteHook:a}=await no(t,r,i,n),l=rn();s(Le(l));const u={urlOriginal:e,_objectCreatedByVike:!0,_urlHandler:null,_urlRewrite:null,_baseServer:l,_pageFilesAll:t,_pageConfigs:r,_pageConfigGlobal:i,_allPageIds:n,_pageRoutes:o,_onBeforeRouteHook:a},c=Xi(u);return w(u,c),u}function sn(e,t){const n=e.filter(i=>i.pageId===t);return s(n.length<=1),n[0]??null}async function ao(e,t){if("isAllLoaded"in e&&!t)return e;const n=await e.loadConfigValuesAll(),r=$e(n.configValuesSerialized);return Object.assign(e.configValues,r),w(e,{isAllLoaded:!0}),e}const an="__whileFetchingAssets";async function Te(e,t,n){const r=Ne(t,e),i=sn(n,e);let o;const a=!1;try{o=(await Promise.all([i&&ao(i,a),...r.map(f=>{var g;return(g=f.loadFile)==null?void 0:g.call(f)})]))[0]}catch(c){throw lo(c)&&Object.assign(c,{[an]:!0}),c}const l=Or(r,o),u={};return w(u,l),w(u,{_pageFilesLoaded:r}),u}function Je(e){return e?e[an]===!0:!1}function lo(e){return e instanceof Error?["Failed to fetch dynamically imported module","error loading dynamically imported module","Importing a module script failed","error resolving module specifier","failed to resolve module"].some(n=>e.message.toLowerCase().includes(n.toLowerCase())):!1}function ln(e){const t=e.getAttribute("href");return!!(t===null||t===""||ii(t)||co(e)||fo(t)||!go(t)||!je(t)||!uo(e))}function uo(e){if(ho()){const n=e.getAttribute("data-vike-link");return n!==null&&n!=="false"}else return!0}function co(e){const t=e.getAttribute("target"),n=e.getAttribute("rel");return t==="_blank"||t==="_external"||n==="external"||e.hasAttribute("download")}function fo(e){if(e.startsWith("#"))return!0;const t=n=>n.split("#")[0];return!!(e.includes("#")&&t(e)===t(window.location.href))}function go(e){const t=rn();s(Le(t));const{hasBaseServer:n}=te(e,t);return n}function ho(){return!!window._disableAutomaticLinkInterception}function po(e,t){let n=yo(e,t);return{prefetchStaticAssets:n}}function yo(e,t){{const n=mo(t);if(n!==null)return n}if("prefetchLinks"in e.exports&&d(!1,"`export { prefetchLinks }` is deprecated, use `export { prefetchStaticAssets }` instead."),"prefetchStaticAssets"in e.exports){const{prefetchStaticAssets:n}=e.exports;if(n===!1)return!1;if(n==="hover")return"hover";if(n==="viewport")return"viewport";const r="prefetchStaticAssets value should be false, 'hover', or 'viewport'";d(D(n),r);const i=Object.keys(n);d(i.length===1&&i[0]==="when",r);const{when:o}=n;if(o==="HOVER"||o==="VIEWPORT"){const a=o.toLowerCase();return O(!1,`prefetchStaticAssets value \`{ when: '${o}' }\` is outdated: set prefetchStaticAssets to '${a}' instead`,{onlyOnce:!0}),a}d(!1,r)}return"hover"}function mo(e){const t=e.getAttribute("data-prefetch-static-assets"),n=e.getAttribute("data-prefetch");if(t===null&&n===null)return null;const r="The attribute data-prefetch is outdated, use data-prefetch-static-assets instead.";if(t){if(d(n===null,r),t==="hover"||t==="viewport")return t;if(t==="false")return!1;d(!1,`data-prefetch-static-assets has value "${t}" but it should instead be "false", "hover", or "viewport"`)}if(n){if(s(!t),O(!1,r,{onlyOnce:!0}),n==="true")return"viewport";if(n==="false")return"hover";d(!1,`data-prefetch has value "${n}" but it should instead be "true" or "false"`)}s(!1)}const un=new Map;function bo(e){const t=cn(e);return un.has(t)}function wo(e){const t=cn(e);un.set(t,!0)}function cn(e){return te(e,"/").pathname}function K(e){return e.fileType===".css"?[]:e.exportNames?e.exportNames:(s(e.fileExports,e.filePath),Object.keys(e.fileExports))}function So({pageFilesClientSide:e,pageFilesServerSide:t,pageId:n}){return{isHtmlOnly:r(),isClientRouting:o()};function r(){return t.some(l=>l.pageId===n&&l.fileType===".page")?(i(),!1):!(!t.some(l=>l.pageId===n&&l.fileType===".page.server")||e.some(l=>l.pageId===n&&l.fileType===".page.client"&&K(l).includes("render")))}function i(){const a=e.some(l=>K(l).includes("render"));d(a,["No client-side `render()` hook found.","See https://vike.dev/render-modes for more information.",["Loaded client-side page files (none of them `export { render }`):",...e.map((l,u)=>` (${u+1}): ${l.filePath}`)].join(` +`)}function _n(e){return e.startsWith(" at ")}function $n(e){return e.split(/\r?\n/)}function T(e){return typeof e=="object"&&e!==null}const x=k("utils/assert.ts",{alreadyLogged:new Set,logger(e,t){t==="info"?console.log(e):console.warn(e)},showStackTraceList:new WeakSet});Pn();const On="[vike]",Tn=`[vike@${Ae.projectVersion}]`,de=2;function s(e,t){var a;if(e)return;const n=(()=>{if(!t)return null;const l=typeof t=="string"?t:JSON.stringify(t);return p.dim(`Debug info (for Vike maintainers; you can ignore this): ${l}`)})();let i=[`You stumbled upon a Vike bug. Go to ${p.blue("https://github.com/vikejs/vike/issues/new")} and copy-paste this error. A maintainer will fix the bug (usually under 24 hours).`,n].filter(Boolean).join(" ");i=Q(i),i=ge(i,"Bug"),i=Z(i,!0);const o=fe(i,de);throw(a=x.onBeforeLog)==null||a.call(x),o}function d(e,t,{showStackTrace:n}={}){var i;if(e)return;n=n||x.alwaysShowStackTrace,t=Q(t),t=ge(t,"Wrong Usage"),t=Z(t);const r=fe(t,de);throw n&&x.showStackTraceList.add(r),(i=x.onBeforeLog)==null||i.call(x),r}function Pt(e){return e=Q(e),e=ge(e,"Error"),e=Z(e),fe(e,de)}function O(e,t,{onlyOnce:n,showStackTrace:r}){var i;if(!e){if(r=r||x.alwaysShowStackTrace,t=Q(t),t=ge(t,"Warning"),t=Z(t),n){const{alreadyLogged:o}=x,a=n===!0?t:n;if(o.has(a))return;o.add(a)}if((i=x.onBeforeLog)==null||i.call(x),r){const o=fe(t,de);x.showStackTraceList.add(o),x.logger(o,"warn")}else x.logger(t,"warn")}}function xn(e,t,{onlyOnce:n}){var r;if(t=Q(t),t=Z(t),n){const{alreadyLogged:i}=x,o=t;if(i.has(o))return;i.add(o)}(r=x.onBeforeLog)==null||r.call(x),x.logger(t,"info")}function ge(e,t){let n=`[${t}]`;const r=t==="Warning"?"yellow":"red";return n=p.bold(p[r](n)),`${n}${e}`}function Q(e){return e.startsWith("[")?e:` ${e}`}function Z(e,t=!1){return`${t?Tn:On}${e}`}function B(){return typeof window<"u"&&typeof window.scrollY=="number"}const Rt=k("utils/assertRouterType.ts",{});function ee(){Fn(kn()),Rt.isClientRouting=!0}function kn(){return Rt.isClientRouting!==!1}function Fn(e){d(B(),`${p.cyan("import { something } from 'vike/client/router'")} is forbidden on the server-side`,{showStackTrace:!0}),O(e,"You shouldn't `import { something } from 'vike/client/router'` when using Server Routing. The 'vike/client/router' utilities work only with Client Routing. In particular, don't `import { navigate }` nor `import { prefetch }` as they unnecessarily bloat your client-side bundle sizes.",{showStackTrace:!0,onlyOnce:!0})}function j(e,t,n){return typeof e=="string"?qe(e.split(""),t,n).join(""):qe(e,t,n)}function qe(e,t,n){const r=[];let i=t>=0?t:e.length+t;s(i>=0&&i<=e.length);let o=n>=0?n:e.length+n;for(s(o>=0&&o<=e.length);!(i===o||(i===e.length&&(i=0),i===o));){const a=e[i];s(a!==void 0),r.push(a),i++}return r}function je(e){return Et(e)||e.startsWith("/")||e.startsWith(".")||e.startsWith("?")||e.startsWith("#")||e===""}function In(e,t){s(t.includes(" but ")),d(typeof e=="string",`${t} should be a string`),!je(e)&&(!e.startsWith("/")&&!e.includes(":")?d(!1,`${t} is ${p.cyan(e)} and it should be /${p.cyan(e)} instead (URL pathnames should start with a leading slash)`):d(!1,`${t} isn't a valid URL`))}function te(e,t){s(je(e)),s(t.startsWith("/"));const[n,...r]=e.split("#");s(n!==void 0);const i=["",...r].join("#")||null;s(i===null||i.startsWith("#"));const o=i===null?"":Ee(i.slice(1)),[a,...l]=n.split("?");s(a!==void 0);const u=["",...l].join("?")||null;s(u===null||u.startsWith("?"));const c={},f={};Array.from(new URLSearchParams(u||"")).forEach(([m,v])=>{c[m]=v,f[m]=[...f.hasOwnProperty(m)?f[m]:[],v]});const{origin:g,pathname:y}=jn(a,t);s(g===null||g===Ee(g)),s(y.startsWith("/")),s(g===null||e.startsWith(g));const h=a.slice((g||"").length);Nn(e,g,h,u,i);let{pathname:R,hasBaseServer:$}=Hn(y,t);return R=An(R),s(R.startsWith("/")),{origin:g,pathname:R,pathnameOriginal:h,hasBaseServer:$,search:c,searchAll:f,searchOriginal:u,hash:o,hashOriginal:i}}function Ee(e){try{return decodeURIComponent(e)}catch{}try{return decodeURI(e)}catch{}return e}function An(e){return e=e.replace(/\s+$/,""),e=e.split("/").map(t=>Ee(t).split("/").join("%2F")).join("/"),e}function jn(e,t){var n;s(!e.includes("?")&&!e.includes("#"));{const{origin:r,pathname:i}=Xe(e);if(r)return{origin:r,pathname:i};s(i===e)}if(e.startsWith("/"))return{origin:null,pathname:e};{const r=typeof window<"u"?(n=window==null?void 0:window.document)==null?void 0:n.baseURI:void 0;let i;return r?i=Xe(r.split("?")[0]).pathname:i=t,{origin:null,pathname:Ln(e,i)}}}function Xe(e){if(Et(e)){const[t,n,r,...i]=e.split("/"),o=[t,n,r].join("/"),a=["",...i].join("/")||"/";return{origin:o,pathname:a}}else return s(!Bn(e)),{pathname:e,origin:null}}function Ln(e,t){const n=t.split("/"),r=e.split("/");let i=t.endsWith("/");e.startsWith(".")&&n.pop();for(const a in r){const l=r[a];l==""&&a==="0"||l!="."&&(l==".."?n.pop():(i=!1,n.push(l)))}let o=n.join("/");return i&&!o.endsWith("/")&&(o+="/"),o.startsWith("/")||(o="/"+o),o}function Wn(e){s(e.startsWith("/")),s(!e.includes("?")),s(!e.includes("#"))}function Hn(e,t){Wn(e),s(Le(t));let n=e;if(s(n.startsWith("/")),s(t.startsWith("/")),t==="/")return{pathname:e,hasBaseServer:!0};let r=t;return t.endsWith("/")&&n===j(t,0,-1)&&(r=j(t,0,-1),s(n===r)),n.startsWith(r)?(s(n.startsWith("/")||n.startsWith("http")),s(n.startsWith(r)),n=n.slice(r.length),n.startsWith("/")||(n="/"+n),s(n.startsWith("/")),{pathname:n,hasBaseServer:!0}):{pathname:e,hasBaseServer:!1}}function Le(e){return e.startsWith("/")}function Nn(e,t,n,r,i){const o=Dn(t,n,r,i);s(e===o)}function Dn(e,t,n,r){return`${e||""}${t}${n||""}${r||""}`}function Bn(e){return/^[a-z][a-z0-9\+\-]*:/i.test(e)}function Et(e){return/^[a-z][a-z0-9\+\-]*:\/\//i.test(e)}function w(e,t){t&&Object.defineProperties(e,Object.getOwnPropertyDescriptors(t))}function V(e){return e instanceof Function||typeof e=="function"}function le(e){return(t,n)=>{const r=e(t),i=e(n);return r===i?0:r>i?-1:1}}function Vn(e){return(t,n)=>{const r=e(t),i=e(n);return r===i?0:r{const r=e(t),i=e(n);if(s([!0,!1,null].includes(r)),s([!0,!1,null].includes(i)),r===i)return 0;if(r===!0||i===!1)return-1;if(i===!0||r===!1)return 1;s(!1)}}function zn(e){return W(t=>{const n=e(t);return n===null?null:!n})}function G(e){return Array.isArray(e)}function Un(e){return G(e)&&e.every(t=>typeof t=="string")}function Gn(e){return T(e)&&Object.values(e).every(t=>typeof t=="string")}function S(e,t,n){if(!T(e))return!1;if(!(t in e))return n==="undefined";if(n===void 0)return!0;const r=e[t];return n==="undefined"?r===void 0:n==="array"?G(r):n==="object"?T(r):n==="string[]"?Un(r):n==="string{}"?Gn(r):n==="function"?V(r):G(n)?typeof r=="string"&&n.includes(r):n==="null"?r===null:n==="true"?r===!0:n==="false"?r===!1:typeof r===n}function D(e){return typeof e!="object"||e===null?!1:Object.getPrototypeOf(e)===null?!0:e.constructor.name==="Object"}function Mn(e,t){return e.toLowerCase()t.toLowerCase()?1:0}const Jn=e=>e!=null;function Qe(e){return"["+e.map(t=>"'"+t+"'").join(", ")+"]"}function Ct(e){const t=n=>`Not a posix path: ${n}`;s(e!==null,t("null")),s(typeof e=="string",t(`typeof path === ${JSON.stringify(typeof e)}`)),s(e!=="",t("(empty string)")),s(e),s(!e.includes("\\"),t(e))}function be(e,t){const n=Object.getOwnPropertyDescriptor(e,t);return!!n&&!("value"in n)&&!!n.get}function Yn(e){return typeof e=="object"&&e!==null&&"then"in e&&V(e.then)}function Kn(e){return[null,void 0].includes(e)?String(e):["boolean","number","string"].includes(typeof e)?JSON.stringify(e):null}function qn(e){return e.replace(/[/\-\\^$*+?.()|[\]{}]/g,"\\$&")}function re(e,t,n){const r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(e,t,{...r,enumerable:n})}function we(e,t,{get:n,...r}){Object.defineProperty(e,t,{...r,get:n})}const Xn=["clientRouting"];function Qn(e){Xn.forEach(t=>{if(s(e.fileExports),!(t in e.fileExports))return;const n=`The value of \`${t}\` is only allowed to be \`true\`.`;d(e.fileExports[t]!==!1,`${e.filePath} has \`export { ${t} }\` with the value \`false\` which is prohibited: remove \`export { ${t} }\` instead. (${n})`),d(e.fileExports[t]===!0,`${e.filePath} has \`export { ${t} }\` with a forbidden value. ${n}`)})}const _t=["render","clientRouting","prerender","doNotPrerender"];function Zn(e,t){d(!_t.includes(e),`${t} has \`export default { ${e} }\` which is prohibited, use \`export { ${e} }\` instead.`)}function er(e){const t=".page.",n=j(e.split(t),0,-1).join(t);return s(!n.includes("\\")),n}function M(e){Ct(e)}function tr(e,t){if(t.length>0){const r=t.filter(i=>i.isErrorPage);return r.length===0?null:(d(r.length===1,"Only one error page can be defined"),r[0].pageId)}const n=Ie(e.map(({pageId:r})=>r).filter(r=>ne(r)));if(d(n.length<=1,`Only one _error.page.js is allowed, but found several: ${n.join(" ")}`),n.length>0){const r=n[0];return s(r),r}return null}function ne(e,t){return s(!e.includes("\\")),e.includes("/_error")}function nr(e,t){if(t.length>0){const n=t.find(r=>r.pageId===e);return s(n),!!n.isErrorPage}else return ne(e)}const $t=["js","ts","cjs","cts","mjs","mts"],rr=["jsx","tsx","cjsx","ctsx","mjsx","mtsx"],Ot=["vue","svelte","marko","md","mdx"],ir=[...$t,...rr,...Ot];function Tt(e){const t=ir.some(n=>e.endsWith("."+n));return or(e)&&s(t),t}function or(e){const t=/\.(c|m)?(j|t)s$/.test(e),n=$t.some(r=>e.endsWith("."+r));return s(t===n),t}function sr(e){return Ot.some(t=>e.endsWith("."+t))}const ar=[".page",".page.server",".page.route",".page.client",".css"];function lr(e){if(Ct(e),e.endsWith(".css"))return".css";s(Tt(e),e);const n=e.split("/").slice(-1)[0].split("."),r=n.slice(-3)[0],i=n.slice(-2)[0];if(i==="page")return".page";if(s(r==="page",e),i==="server")return".page.server";if(i==="client")return".page.client";if(i==="route")return".page.route";s(!1,e)}function xt(e){const t=o=>i.pageId===o||i.isDefaultPageFile&&(Ze(i.filePath)||ur(o,i.filePath)),n=lr(e),i={filePath:e,fileType:n,isEnv:o=>{if(s(n!==".page.route"),o==="CLIENT_ONLY")return n===".page.client"||n===".css";if(o==="SERVER_ONLY")return n===".page.server";if(o==="CLIENT_AND_SERVER")return n===".page";s(!1)},isRelevant:t,isDefaultPageFile:Ce(e),isRendererPageFile:n!==".css"&&Ce(e)&&Ze(e),isErrorPageFile:ne(e),pageId:er(e)};return i}function Ce(e){return M(e),ne(e)?!1:e.includes("/_default")}function Ze(e){return M(e),e.includes("/renderer/")}function ur(e,t){M(e),M(t),s(!e.endsWith("/")),s(!t.endsWith("/")),s(Ce(t));const n=j(t.split("/"),0,-1).filter(r=>r!=="_default").join("/");return e.startsWith(n)}function cr(e,t){if(!e)return null;let[n,...r]=e;if(!n||r.length===0&&["*","default",t].includes(n))return null;s(n!=="*");let i="",o="";return n==="default"?i="export default":(i="export",r=[n,...r]),r.forEach(l=>{i=`${i} { ${l}`,o=` }${o}`}),i+o}function fr(e,t,n){return`${_e(e,t)} at ${q(n,t)}`}function kt(e,t,n){return n?`${_e(e,t)} at ${q(n,t)}`:`${_e(e,t)} internally`}function _e(e,t){return`${e} ${p.cyan(t)} defined`}function q(e,t){let n;return G(e)?n=e:n=[e],s(n.length>=1),n.map(i=>{const{filePathToShowToUser:o,fileExportPathToShowToUser:a}=i;let l=o;const u=cr(a,t);return u&&(l=`${l} > ${p.cyan(u)}`),l}).join(" / ")}const dr=[{is:e=>e===void 0,match:e=>e==="!undefined",serialize:()=>"!undefined",deserialize:()=>{}},{is:e=>e===1/0,match:e=>e==="!Infinity",serialize:()=>"!Infinity",deserialize:()=>1/0},{is:e=>e===-1/0,match:e=>e==="!-Infinity",serialize:()=>"!-Infinity",deserialize:()=>-1/0},{is:e=>typeof e=="number"&&isNaN(e),match:e=>e==="!NaN",serialize:()=>"!NaN",deserialize:()=>NaN},{is:e=>e instanceof Date,match:e=>e.startsWith("!Date:"),serialize:e=>"!Date:"+e.toISOString(),deserialize:e=>new Date(e.slice(6))},{is:e=>typeof e=="bigint",match:e=>e.startsWith("!BigInt:"),serialize:e=>"!BigInt:"+e.toString(),deserialize:e=>{if(typeof BigInt>"u")throw new Error("Your JavaScript environement does not support BigInt. Consider adding a polyfill.");return BigInt(e.slice(8))}},{is:e=>e instanceof RegExp,match:e=>e.startsWith("!RegExp:"),serialize:e=>"!RegExp:"+e.toString(),deserialize:e=>{e=e.slice(8);const t=e.match(/\/(.*)\/(.*)?/),n=t[1],r=t[2];return new RegExp(n,r)}},{is:e=>e instanceof Map,match:e=>e.startsWith("!Map:"),serialize:(e,t)=>"!Map:"+t(Array.from(e.entries())),deserialize:(e,t)=>new Map(t(e.slice(5)))},{is:e=>e instanceof Set,match:e=>e.startsWith("!Set:"),serialize:(e,t)=>"!Set:"+t(Array.from(e.values())),deserialize:(e,t)=>new Set(t(e.slice(5)))},{is:e=>typeof e=="string"&&e.startsWith("!"),match:e=>e.startsWith("!"),serialize:e=>"!"+e,deserialize:e=>e.slice(1)}];function We(e){const t=JSON.parse(e);return He(t)}function He(e){return typeof e=="string"?gr(e):(typeof e=="object"&&e!==null&&Object.entries(e).forEach(([t,n])=>{e[t]=He(n)}),e)}function gr(e){for(const{match:t,deserialize:n}of dr)if(t(e))return n(e,We);return e}const hr=["$$registrations","_rerender_only"],pr=[".md",".mdx"];function yr(e,t,n){const r=Object.keys(e).filter(c=>!hr.includes(c)),i=c=>c==="default"||c===n,o=r.filter(i),a=r.filter(c=>!i(c));if(o.length===1&&a.length===0)return;const l=p.code("export default"),u=p.code(`export { ${n} }`);o.length===0&&d(!1,`${t} should have a ${u} or ${l}`),o.length===2&&O(!1,`${t} is ambiguous: remove ${l} or ${u}`,{onlyOnce:!0}),s(o.length===1),s(a.length>0),pr.some(c=>t.endsWith(c))||a.forEach(c=>{O(!1,`${t} unexpected ${p.cyan(`export { ${c} }`)}`,{onlyOnce:!0})})}function $e(e){return wr(e)}function mr(e,t){const n=e.map(i=>{const o=$e(i.configValuesSerialized),{pageId:a,isErrorPage:l,routeFilesystem:u,loadConfigValuesAll:c}=i;return br(o),{pageId:a,isErrorPage:l,routeFilesystem:u,configValues:o,loadConfigValuesAll:c}}),r={configValues:{}};{const i=$e(t.configValuesSerialized);Object.assign(r.configValues,i)}return{pageConfigs:n,pageConfigGlobal:r}}function br(e){const t="route",n=e[t];if(!n)return;const{value:r,definedAtData:i}=n,o=typeof r;s(i);const a=fr("Config",t,i);d(o==="string"||V(r),`${a} has an invalid type '${o}': it should be a string or a function instead, see https://vike.dev/route`)}function wr(e){const t={};return Object.entries(e).forEach(([r,i])=>{let o;if(i.type==="cumulative"){const{valueSerialized:a,...l}=i;o={value:a.map((c,f)=>{const{value:g,sideExports:y}=et(c,r,()=>{const h=i.definedAtData[f];return s(h),h});return n(y),g}),...l}}else{const{valueSerialized:a,...l}=i,{value:u,sideExports:c}=et(a,r,()=>(s(i.type!=="computed"),i.definedAtData));n(c),o={value:u,...l}}t[r]=o}),t;function n(r){r.forEach(i=>{const{configName:o,configValue:a}=i;t[o]||(t[o]=a)})}}function et(e,t,n){if(e.type==="js-serialized"){let{value:r}=e;return r=He(r),{value:r,sideExports:[]}}if(e.type==="pointer-import"){const{value:r}=e;return{value:r,sideExports:[]}}if(e.type==="plus-file"){const r=n(),{exportValues:i}=e;yr(i,r.filePathToShowToUser,t);let o,a=!1;const l=[];return Object.entries(i).forEach(([u,c])=>{u!=="default"&&u!==t?l.push({configName:u,configValue:{type:"standard",value:c,definedAtData:{filePathToShowToUser:r.filePathToShowToUser,fileExportPathToShowToUser:[u]}}}):(o=c,s(!a),a=!0)}),s(a),{value:o,sideExports:l}}s(!1)}function Sr(e){s(S(e,"pageFilesLazy","object")),s(S(e,"pageFilesEager","object")),s(S(e,"pageFilesExportNamesLazy","object")),s(S(e,"pageFilesExportNamesEager","object")),s(S(e.pageFilesLazy,".page")),s(S(e.pageFilesLazy,".page.client")||S(e.pageFilesLazy,".page.server")),s(S(e,"pageFilesList","string[]")),s(S(e,"pageConfigsSerialized")),s(S(e,"pageConfigGlobalSerialized"));const{pageConfigsSerialized:t,pageConfigGlobalSerialized:n}=e;vr(t),Pr(n);const{pageConfigs:r,pageConfigGlobal:i}=mr(t,n),o={};ie(e.pageFilesLazy).forEach(({filePath:l,pageFile:u,globValue:c})=>{u=o[l]=o[l]??u;const f=c;tt(f),u.loadFile=async()=>{"fileExports"in u||(u.fileExports=await f(),Qn(u))}}),ie(e.pageFilesExportNamesLazy).forEach(({filePath:l,pageFile:u,globValue:c})=>{u=o[l]=o[l]??u;const f=c;tt(f),u.loadExportNames=async()=>{if(!("exportNames"in u)){const g=await f();s(S(g,"exportNames","string[]"),u.filePath),u.exportNames=g.exportNames}}}),ie(e.pageFilesEager).forEach(({filePath:l,pageFile:u,globValue:c})=>{u=o[l]=o[l]??u;const f=c;s(T(f)),u.fileExports=f}),ie(e.pageFilesExportNamesEager).forEach(({filePath:l,pageFile:u,globValue:c})=>{u=o[l]=o[l]??u;const f=c;s(T(f)),s(S(f,"exportNames","string[]"),u.filePath),u.exportNames=f.exportNames}),e.pageFilesList.forEach(l=>{o[l]=o[l]??xt(l)});const a=Object.values(o);return a.forEach(({filePath:l})=>{s(!l.includes("\\"))}),{pageFiles:a,pageConfigs:r,pageConfigGlobal:i}}function ie(e){const t=[];return Object.entries(e).forEach(([n,r])=>{s(ar.includes(n)),s(T(r)),Object.entries(r).forEach(([i,o])=>{const a=xt(i);s(a.fileType===n),t.push({filePath:i,pageFile:a,globValue:o})})}),t}function tt(e){s(V(e))}function vr(e){s(G(e)),e.forEach(t=>{s(T(t)),s(S(t,"pageId","string")),s(S(t,"routeFilesystem")),s(S(t,"configValuesSerialized"))})}function Pr(e){s(S(e,"configValuesSerialized"))}const Y=k("setPageFiles.ts",{});function Rr(e){const{pageFiles:t,pageConfigs:n,pageConfigGlobal:r}=Sr(e);Y.pageFilesAll=t,Y.pageConfigs=n,Y.pageConfigGlobal=r}async function Er(e,t){s(!Y.pageFilesGetter),s(t===void 0);const{pageFilesAll:n,pageConfigs:r,pageConfigGlobal:i}=Y;s(n&&r&&i);const o=Cr(n,r);return{pageFilesAll:n,allPageIds:o,pageConfigs:r,pageConfigGlobal:i}}function Cr(e,t){const n=e.filter(({isDefaultPageFile:o})=>!o).map(({pageId:o})=>o),r=Ie(n),i=t.map(o=>o.pageId);return[...r,...i]}function Ne(e,t){return It(e,t,!0)}function Ft(e,t){return It(e,t,!1)}function It(e,t,n){const r=n?"CLIENT_ONLY":"SERVER_ONLY",i=e.filter(h=>h.isRelevant(t)&&h.fileType!==".page.route").sort(_r(n,t)),o=h=>{const R=i.filter(m=>m.pageId===t&&m.isEnv(h?"CLIENT_AND_SERVER":r));d(R.length<=1,`Merge the following files into a single file: ${R.map(m=>m.filePath).join(" ")}`);const $=R[0];return s($===void 0||!$.isDefaultPageFile),$},a=o(!1),l=o(!0),u=h=>i.filter(R=>R.isRendererPageFile&&R.isEnv(h?"CLIENT_AND_SERVER":r))[0],c=u(!1),f=u(!0),g=i.filter(h=>h.isDefaultPageFile&&!h.isRendererPageFile&&(h.isEnv(r)||h.isEnv("CLIENT_AND_SERVER")));return[a,l,...g,c,f].filter(Jn)}function _r(e,t){const n=e?"CLIENT_ONLY":"SERVER_ONLY",r=-1,i=1,o=0;return(a,l)=>{if(!a.isDefaultPageFile&&l.isDefaultPageFile)return r;if(!l.isDefaultPageFile&&a.isDefaultPageFile)return i;{const u=a.isRendererPageFile,c=l.isRendererPageFile;if(!u&&c)return r;if(!c&&u)return i;s(u===c)}{const u=nt(t,a.filePath),c=nt(t,l.filePath);if(ur.pageId===e);return s(t.length>0),s(n),n}function jt(e){if(!e||G(e))return null;const{filePathToShowToUser:t}=e;return s(t),t}function $r(e){const t=jt(e);return s(t),t}function Or(e,t){const n={},r={},i={};e.forEach(y=>{Tr(y).forEach(({exportName:R,exportValue:$,isFromDefaultExport:m})=>{s(R!=="default"),i[R]=i[R]??[],i[R].push({exportValue:$,exportSource:`${y.filePath} > ${m?`\`export default { ${R} }\``:`\`export { ${R} }\``}`,filePath:y.filePath,_filePath:y.filePath,_fileType:y.fileType,_isFromDefaultExport:m})})});const o={},a={},l=(y,h)=>{o[h]=y,a[h]??(a[h]=[]),a[h].push(y)},u={configsStandard:{},configsCumulative:{},configsComputed:{}};t&&Object.entries(t.configValues).forEach(([y,h])=>{const{value:R}=h,$=jt(h.definedAtData),m=kt("Config",y,h.definedAtData);if(r[y]=r[y]??R,n[y]=n[y]??[],s(n[y].length===0),n[y].push({configValue:R,configDefinedAt:m,configDefinedByFile:$}),h.type==="standard"){const P={type:"configsStandard",value:h.value,definedAt:q(h.definedAtData,y)};l(P,y),u.configsStandard[y]=P}if(h.type==="cumulative"){const P={type:"configsCumulative",values:h.value.map((F,b)=>{const C=h.definedAtData[b];s(C);const E=q(C,y);return{value:F,definedAt:E}})};l(P,y),u.configsCumulative[y]=P}if(h.type==="computed"){const P={type:"configsComputed",value:h.value};l(P,y),u.configsComputed[y]=P}const v=y;i[v]=i[v]??[],i[v].push({exportValue:R,exportSource:m,filePath:$,_filePath:$,_fileType:null,_isFromDefaultExport:null})});const c=xr(),f={};return Object.entries(i).forEach(([y,h])=>{h.forEach(({exportValue:R,_fileType:$,_isFromDefaultExport:m})=>{f[y]=f[y]??R,$===".page"&&!m&&(y in c||(c[y]=R))})}),s(!("default"in f)),s(!("default"in i)),{from:u,source:o,sources:a,config:r,configEntries:n,exports:f,exportsAll:i,pageExports:c}}function Tr(e){const{filePath:t,fileExports:n}=e;s(n),s(Tt(t));const r=[];return Object.entries(n).sort(zn(([i])=>i==="default")).forEach(([i,o])=>{let a=i==="default";if(a)if(sr(t))i="Page";else{d(T(o),`The ${p.cyan("export default")} of ${t} should be an object.`),Object.entries(o).forEach(([l,u])=>{Zn(l,t),r.push({exportName:l,exportValue:u,isFromDefaultExport:a})});return}r.push({exportName:i,exportValue:o,isFromDefaultExport:a})}),r.forEach(({exportName:i,isFromDefaultExport:o})=>{s(!(o&&_t.includes(i)))}),r}function xr(){return new Proxy({},{get(...e){return B()||O(!1,"`pageContext.pageExports` is outdated. Use `pageContext.exports` instead, see https://vike.dev/exports",{onlyOnce:!0,showStackTrace:!0}),Reflect.get(...e)}})}const De={},Lt={},kr={},he={},Fr=[],Wt={},Ir=[{pageId:"/pages/_error",isErrorPage:!0,routeFilesystem:void 0,loadConfigValuesAll:()=>me(()=>import("./pages_error.CwPDSJjs.js"),__vite__mapDeps([0,1,2,3])),configValuesSerialized:{clientEntryLoaded:{type:"computed",definedAtData:null,valueSerialized:{type:"js-serialized",value:!0}},clientRouting:{type:"standard",definedAtData:{filePathToShowToUser:"/pages/+config.ts",fileExportPathToShowToUser:["default","clientRouting"]},valueSerialized:{type:"js-serialized",value:!0}}}},{pageId:"/pages/index",isErrorPage:void 0,routeFilesystem:{routeString:"/",definedBy:"/pages/index/"},loadConfigValuesAll:()=>me(()=>import("./pages_index.Cxcdhj_4.js"),__vite__mapDeps([4,1,2,3,5])),configValuesSerialized:{clientEntryLoaded:{type:"computed",definedAtData:null,valueSerialized:{type:"js-serialized",value:!0}},clientRouting:{type:"standard",definedAtData:{filePathToShowToUser:"/pages/+config.ts",fileExportPathToShowToUser:["default","clientRouting"]},valueSerialized:{type:"js-serialized",value:!0}}}},{pageId:"/pages/second-page",isErrorPage:void 0,routeFilesystem:{routeString:"/second-page",definedBy:"/pages/second-page/"},loadConfigValuesAll:()=>me(()=>import("./pages_second-page.ejB7RTih.js"),__vite__mapDeps([6,1,2,3,5])),configValuesSerialized:{clientEntryLoaded:{type:"computed",definedAtData:null,valueSerialized:{type:"js-serialized",value:!0}},clientRouting:{type:"standard",definedAtData:{filePathToShowToUser:"/pages/+config.ts",fileExportPathToShowToUser:["default","clientRouting"]},valueSerialized:{type:"js-serialized",value:!0}}}}],Ar={configValuesSerialized:{}},jr=Object.assign({}),Lr={...jr};De[".page"]=Lr;const Wr=Object.assign({}),Hr={...Wr};he[".page"]=Hr;const Nr=Object.assign({}),Dr={...Nr};he[".page.server"]=Dr;const Br=Object.assign({}),Vr={...Br};Lt[".page.route"]=Vr;const zr=Object.assign({}),Ur={...zr};De[".page.client"]=Ur;const Gr=Object.assign({}),Mr={...Gr};he[".page.client"]=Mr;const Jr=Object.assign({}),Yr={...Jr};Wt[".page.server"]=Yr;const Kr=Object.freeze(Object.defineProperty({__proto__:null,neverLoaded:Wt,pageConfigGlobalSerialized:Ar,pageConfigsSerialized:Ir,pageFilesEager:Lt,pageFilesExportNamesEager:he,pageFilesExportNamesLazy:kr,pageFilesLazy:De,pageFilesList:Fr},Symbol.toStringTag,{value:"Module"}));Rr(Kr);function Ht(){s(B())}function qr(){Ht(),ee()}function Xr(){Ht()}function rt(e){const t=e/1e3;if(t<120){const n=it(t);return`${n} second${ot(n)}`}{const n=t/60,r=it(n);return`${r} minute${ot(r)}`}}function it(e){let t=e.toFixed(1);return t.endsWith(".0")&&(t=t.slice(0,-2)),t}function ot(e){return e==="1"?"":"s"}const Oe=k("utils/executeHook.ts",{userHookErrors:new WeakMap,pageContext:null});function N(e,t,n){const{hookName:r,hookFilePath:i,hookTimeout:{error:o,warning:a}}=t;let l,u;const c=new Promise((h,R)=>{l=$=>{f(),h($)},u=$=>{f(),R($)}}),f=()=>{g&&clearTimeout(g),y&&clearTimeout(y)},g=st(a)&&setTimeout(()=>{O(!1,`The ${r}() hook defined by ${i} is slow: it's taking more than ${rt(a)} (https://vike.dev/hooksTimeout)`,{onlyOnce:!1})},a),y=st(o)&&setTimeout(()=>{const h=Pt(`The ${r}() hook defined by ${i} timed out: it didn't finish after ${rt(o)} (https://vike.dev/hooksTimeout)`);u(h)},o);return(async()=>{try{Qr(n);const h=await e();l(h)}catch(h){T(h)&&Oe.userHookErrors.set(h,{hookName:r,hookFilePath:i}),u(h)}})(),c}function st(e){return!!e&&e!==1/0}function Qr(e){Oe.pageContext=e,Promise.resolve().then(()=>{Oe.pageContext=null})}function Be(e){const t=window.location.href,{searchOriginal:n,hashOriginal:r,pathname:i}=te(t,"/");let o;return e!=null&&e.withoutHash?o=`${i}${n||""}`:o=`${i}${n||""}${r||""}`,s(o.startsWith("/")),o}function Zr(e){return typeof e=="string"&&/^[a-z0-9\$_]+$/i.test(e)?`.${e}`:`[${JSON.stringify(e)}]`}Xr();function ei(){var r,i,o,a;const e=!!((i=(r=window.__REACT_DEVTOOLS_GLOBAL_HOOK__)==null?void 0:r.renderers)!=null&&i.size),t=!!((a=(o=window.__REACT_DEVTOOLS_GLOBAL_HOOK__)==null?void 0:o.rendererInterfaces)!=null&&a.size),n=!!window.__vite_plugin_react_preamble_installed__;return e||t||n}function at(e,t){return!T(e)||!T(t)?!1:e.message===t.message}function ue(e){window.location.href=e}function ti(e){return new Promise(t=>setTimeout(t,e))}function ni(e,t){let n=!1;return()=>{n||(n=!0,setTimeout(()=>{n=!1,e()},t))}}function Nt(e){window.addEventListener("visibilitychange",()=>{document.visibilityState==="hidden"&&e()})}function ri(e){window.addEventListener("visibilitychange",()=>{document.visibilityState==="visible"&&e()})}function ii(e){return!e.startsWith("/")&&!e.startsWith(".")&&!e.startsWith("?")&&e!==""}qr();function Dt(){let e=window.history.state;e||(e={_isVikeEnhanced:!0});let t=!1;"timestamp"in e||(t=!0,e.timestamp=Ue()),"scrollPosition"in e||(t=!0,e.scrollPosition=ze()),"triggeredBy"in e||(e.triggeredBy="browser"),Bt(e),t&&Ge(e)}function Ve(){const e=window.history.state||{};return Bt(e),e}function ze(){return{x:window.scrollX,y:window.scrollY}}function Ue(){return new Date().getTime()}function lt(){const e=ze(),t=Ve();Ge({...t,scrollPosition:e})}function oi(e,t){if(t)Ge(Ve(),e);else{const n=Ue();si({timestamp:n,scrollPosition:null,triggeredBy:"vike",_isVikeEnhanced:!0},e)}}function Bt(e){if(s(T(e)),"timestamp"in e){const{timestamp:t}=e;s(typeof t=="number")}if("scrollPosition"in e){const{scrollPosition:t}=e;t!==null&&s(S(t,"x","number")&&S(t,"y","number"))}}function Ge(e,t){const n=t??null;window.history.replaceState(e,"",n)}function si(e,t){window.history.pushState(e,"",t)}function ai(){const e=window.history.pushState.bind(window.history);window.history.pushState=(t={},...n)=>{d(t==null||T(t),"history.pushState(state) argument state must be an object");const r=li(t)?t:{_isVikeEnhanced:!0,scrollPosition:ze(),timestamp:Ue(),triggeredBy:"user",...t};return e(r,...n)}}function li(e){return T(e)&&"_isVikeEnhanced"in e}function ui(){const e="vike_pageContext",t=document.getElementById(e);d(t,`Couldn't find #${e} (which Vike automatically injects in the HTML): make sure it exists (i.e. don't remove it and make sure your HTML isn't malformed)`);const n=t.textContent;s(n);const r=We(n);return s(S(r,"_pageId","string")),s(S(r,"routeParams","string{}")),r}async function ci(e,t){const r=Ft(e,t).filter(o=>o.fileType===".page.server");return await Promise.all(r.map(async o=>{o.exportNames||(s(o.loadExportNames,t),await o.loadExportNames())})),{hasOnBeforeRenderServerSideOnlyHook:r.some(({exportNames:o})=>(s(o),o.includes("onBeforeRender")))}}function fi(e,t,n){const{value:r,definedAtData:i}=e;return n&&di(r,n,t,i),e}function J(e,t,n){const r=e.configValues[t];return r?fi(r,t,n):null}function di(e,t,n,r){s(e!==null);const i=typeof e;if(i===t)return;const o=Kn(e),a=o!==null?`value ${p.cyan(o)}`:`type ${p.cyan(i)}`,u=`${kt("Config",n,r)} has an invalid ${a}: it should be a ${p.cyan(t)} instead`;d(!1,u)}const gi=k("getHook.ts",{isPrerendering:!1});function L(e,t){if(!(t in e.exports))return null;const{hooksTimeout:n}=e.config,r=pi(n,t),i=e.exports[t],o=e.exportsAll[t][0];if(s(o.exportValue===i),i===null)return null;const a=o.filePath;return s(a),s(!a.endsWith(" ")),Vt(i,{hookName:t,hookFilePath:a}),{hookFn:i,hookName:t,hookFilePath:a,hookTimeout:r}}function hi(e,t){const n=e.configValues[t];if(!n)return null;const r=n.value;if(!r)return null;const i=$r(n.definedAtData);s(i),Vt(r,{hookName:t,hookFilePath:i});const o=pe(t);return{hookFn:r,hookName:t,hookFilePath:i,hookTimeout:o}}function Se(e,t){L(e,t)}function Vt(e,{hookName:t,hookFilePath:n}){s(t&&n),s(!t.endsWith(")")),d(V(e),`Hook ${t}() defined by ${n} should be a function`)}function pi(e,t){const n=yi(e);if(n===!1)return{error:!1,warning:!1};const r=n[t],i=pe(t);return(r==null?void 0:r.error)!==void 0&&(i.error=r.error),(r==null?void 0:r.warning)!==void 0&&(i.warning=r.warning),i}function yi(e){if(e===void 0)return{};if(e===!1)return!1;d(T(e),`Setting ${p.cyan("hooksTimeout")} should be ${p.cyan("false")} or an object`);const t={};return Object.entries(e).forEach(([n,r])=>{if(r===!1){t[n]={error:!1,warning:!1};return}d(T(r),`Setting ${p.cyan(`hooksTimeout.${n}`)} should be ${p.cyan("false")} or an object`);const[i,o]=["error","warning"].map(a=>{const l=r[a];if(l===void 0||l===!1)return l;const u=`Setting ${p.cyan(`hooksTimeout.${n}.${a}`)} should be`;return d(typeof l=="number",`${u} ${p.cyan("false")} or a number`),d(l>0,`${u} a positive number`),l});t[n]={error:i,warning:o}}),t}function pe(e){return e==="onBeforeRoute"?{error:5*1e3,warning:1*1e3}:gi.isPrerendering?{error:2*60*1e3,warning:30*1e3}:(s(!e.toLowerCase().includes("prerender")),{error:30*1e3,warning:4*1e3})}function mi(e){let t=Object.getOwnPropertyDescriptors(e);for(const n of Object.keys(e))delete e[n];t=Object.fromEntries(Object.entries(t).sort(([n],[r])=>Mn(n,r))),Object.defineProperties(e,t)}function bi(e){wi(e),Si(e)}function wi(e){nr(e._pageId,e._pageConfigs)&&s(S(e,"is404","boolean"))}function Si(e){if(e.is404===void 0||e.is404===null)return;const t=e.pageProps||{};if(!T(t)){O(!1,"pageContext.pageProps should be an object",{showStackTrace:!0,onlyOnce:!0});return}t.is404=t.is404||e.is404,e.pageProps=t}const vi="not-serializable",oe=k("getPageContextProxyForUser.ts",{});function Pi(e){return s([!0,!1].includes(e._hasPageContextFromServer)),s([!0,!1].includes(e._hasPageContextFromClient)),new Proxy(e,{get(t,n){const r=e[n],i=Zr(n);return d(r!==vi,`pageContext${i} couldn't be serialized and, therefore, is missing on the client-side. Check the server logs for more information.`),Ri(e,n,i),r}})}function Ri(e,t,n){if(_i(t)||t in e||Ci(t)||!e._hasPageContextFromServer)return;const r=`pageContext${n} isn't defined on the client-side, see https://vike.dev/passToClient#error`;e._hasPageContextFromClient?O(!1,r,{onlyOnce:!1,showStackTrace:!0}):d(!1,r)}const Ei=["then","toJSON"];function Ci(e){return!!(Ei.includes(e)||typeof e=="symbol"||typeof e!="string"||e.startsWith("__v_"))}function _i(e){return oe.prev===e||oe.prev==="__v_raw"?!0:(oe.prev=e,window.setTimeout(()=>{oe.prev=void 0},0),!1)}function Me(e,t){{const i=e;s([!0,!1].includes(i.isHydration)),s([!0,!1,null].includes(i.isBackwardNavigation))}s("config"in e),s("configEntries"in e),s("exports"in e),s("exportsAll"in e),s("pageExports"in e),s(T(e.pageExports));const n=e.exports.Page;w(e,{Page:n}),$i(e),mi(e);const r=Pi(e);return bi(e),r}function $i(e){Object.entries(e).forEach(([t,n])=>{delete e[t],e[t]=n})}const ut=["urlPathname","urlParsed"],Oi=["Page","pageExports","exports"];function Ti(e){[...Oi,...ut].forEach(n=>{n in e&&(ut.includes(n)?(s(n.startsWith("url")),O(!1,`pageContext.${n} is already available in the browser when using Client Routing; adding '${n}' to passToClient has no effect`,{onlyOnce:!0})):O(!1,`pageContext.${n} is a built-in that cannot be overriden; adding '${n}' to passToClient has no effect`,{onlyOnce:!0}),delete e[n])})}const xi="/";function ki(e,t,n){const{pathnameOriginal:r,searchOriginal:i,hashOriginal:o}=te(e,xi);e.startsWith("/")&&s(e===`${r}${i||""}${o||""}`,{url:e});const a=r.endsWith("/");let l;return l=r+(a?"":"/")+"index",s(l),l=l+t,`${l}${i||""}${o||""}`}const Fi=".pageContext.json";function Ii(e){return ki(e,Fi)}function zt(e,{hookName:t,hookFilePath:n}){if(e==null)return;s(!t.endsWith(")"));const r=`The ${p.cyan("pageContext")} object provided by the ${t}() hook defined by ${n}`;d(T(e),`${r} should be an object (but it's ${p.cyan(`typeof pageContext === ${JSON.stringify(typeof e)}`)} instead)`),d(!("_objectCreatedByVike"in e),`${r} shouldn't be the whole ${p.cyan("pageContext")} object, see https://vike.dev/pageContext-manipulation#do-not-return-entire-pagecontext`),O(!("_pageId"in e),`${r} sets ${p.cyan("pageContext._pageId")} which means that Vike's routing is overriden. This is an experimental feature: make sure to contact a vike maintainer before using this.`,{onlyOnce:!0}),d(!("is404"in e),`${r} sets ${p.cyan("pageContext.is404")} which is forbidden, use ${p.cyan("throw render()")} instead, see https://vike.dev/render`)}function Ai(e,t,n){s(!n.endsWith(" "));const r=[],i=Object.keys(e);for(const o of i)t.includes(o)||r.push(o);d(r.length===0,[n,"returned an object with following unknown keys:",Qe(r)+".","Only following keys are allowed:",Qe(t)+"."].join(" "))}function ji(e,t){if(e==null)return;const n=`The onBeforeRender() hook defined by ${t}`;d(D(e),`${n} should return a plain JavaScript object, ${p.cyan("undefined")}, or ${p.cyan("null")}`),Ai(e,["pageContext"],n),e.pageContext&&zt(e.pageContext,{hookName:"onBeforeRender",hookFilePath:t})}function Li(e,t){if(!D(e))return!1;for(const n of Object.keys(e))if(!t.includes(n))return!1;return!0}function Wi(e,t,n=r=>r){if(s(e.length>0),e.length===1)return n(e[0]);const r=e.slice(0,e.length-1),i=e[e.length-1];return r.map(n).join(", ")+`, ${t} `+n(i)}B()&&ee();const Ut="The guard() hook defined by";async function Hi(e,t){let n;if(e._pageFilesAll.length>0?(s(e._pageConfigs.length===0),n=Ni(e._pageId,e._pageFilesAll)):n=L(e,"guard"),!n)return;const r=n.hookFn;let i=e;const o=t(e);o&&(i=o);const a=await N(()=>r(i),n,e);d(a===void 0,`${Ut} ${n.hookFilePath} returns a value, but guard() shouldn't return any value`)}function Ni(e,t){const n=t.find(u=>u.pageId===e&&u.fileType===".page.route");if(!n)return null;const{filePath:r,fileExports:i}=n;s(i);const o=i.guard;if(!o)return null;const a=r,l=pe("guard");return d(V(o),`${Ut} ${a} should be a function`),{hookFn:o,hookName:"guard",hookFilePath:a,hookTimeout:l}}function Di(e){const t=new Error("AbortRender");return w(t,{_pageContextAbort:e,[Gt]:!0}),t}const Gt="_isAbortError";function ct(e){return typeof e=="object"&&e!==null&&Gt in e}function Bi(e){return e._urlRewrite||e._urlRedirect||e.abortStatusCode?(s(S(e,"_abortCall","string")),!0):!1}function Vi(e){zi(e);const t={_urlRewrite:null};return e.forEach(n=>{Object.assign(t,n)}),t}function zi(e){const t=[];e.forEach(n=>{const r=n._urlRewrite;{const i=t.indexOf(r);if(i!==-1){const o=[...t.slice(i),r].map(a=>`render('${a}')`).join(" => ");d(!1,`Infinite loop of render() calls: ${o}`)}}t.push(r)})}function Ui(e,t){const n=[e>0&&p.cyan("throw render('/some-url')"),t>0&&p.cyan("throw redirect('/some-url')")].filter(Boolean).join(" and ");d(e+t<=7,`Maximum chain length of 7 ${n} exceeded. Did you define an infinite loop of ${n}?`)}const Gi="_pageContextInitIsPassedToClient",Mt="_isServerSideError",Jt=k("router/getPageContext.ts",{});function Mi(){const e=ui();return d(!("urlOriginal"in e),"Adding 'urlOriginal' to passToClient is forbidden"),qt(e),w(e,{_hasPageContextFromServer:!0}),e}async function Ji(e){const t={isHydration:!0,_hasPageContextFromClient:!1,_hasPageContextFromServer:!0};for(const n of["data","onBeforeRender"]){const r={};if(w(r,e),w(r,t),Kt(n,r)){const i=await Yt(n,r);Object.assign(t,i)}}return t}async function ft(e,t){const n={isHydration:!1,_hasPageContextFromClient:!1},r={};w(r,e),w(r,n);let i=!1;if(!t&&await Ki(r)){const o=await qi(e);if("is404ServerSideRouted"in o)return{is404ServerSideRouted:!0};const{pageContextFromServer:a}=o;i=!0,s(!(Mt in a)),s(!("serverSideError"in a)),w(n,a)}for(const o of["guard","data","onBeforeRender"]){const a={};if(w(a,{_hasPageContextFromServer:i}),w(a,e),w(a,n),o==="guard")!t&&!i&&await Hi(a,l=>Me(l));else if(s(o==="data"||o==="onBeforeRender"),Kt(o,a)||!i){const l=await Yt(o,a);w(n,l)}else s(i)}return w(n,{_hasPageContextFromServer:i}),{pageContextFromHooks:n}}async function Yt(e,t){const n=L(t,e);if(!n)return null;const r=Me(t),i=await N(()=>n.hookFn(r),n,t),o={};if(e==="onBeforeRender"){ji(i,n.hookFilePath);const a=i==null?void 0:i.pageContext;a&&(w(o,{_hasPageContextFromClient:!0}),w(o,a))}else{s(e==="data");const a={data:i};i&&w(o,{_hasPageContextFromClient:!0}),w(o,a)}return o}function Yi(e){e[Gi]&&(Jt.pageContextInitIsPassedToClient=!0)}async function Ki(e){return!!Jt.pageContextInitIsPassedToClient||await dt("data",e)||await dt("onBeforeRender",e)}async function dt(e,t){var n;if(t._pageConfigs.length>0){const r=At(t._pageId,t._pageConfigs),i=((n=J(r,`${e}Env`))==null?void 0:n.value)??{};return s(T(i)),!!i.server&&!i.client}else{if(e==="data")return!1;s(e==="onBeforeRender");const{hasOnBeforeRenderServerSideOnlyHook:r}=await ci(t._pageFilesAll,t._pageId);return r}}function Kt(e,t){var n;if(t._pageConfigs.length>0){const r=At(t._pageId,t._pageConfigs),i=((n=J(r,`${e}Env`))==null?void 0:n.value)??{};return s(T(i)),!!i.client&&!i.server}else return!1}async function qi(e){const t=Ii(e._urlRewrite??e.urlOriginal),n=await fetch(t);{const o=n.headers.get("content-type"),a="application/json",l=o&&o.includes(a);if(!l&&n.status===404)return ue(e.urlOriginal),{is404ServerSideRouted:!0};d(l,`Wrong Content-Type for ${t}: it should be ${a} but it's ${o} instead. Make sure to properly use pageContext.httpResponse.headers, see https://vike.dev/renderPage`)}const r=await n.text(),i=We(r);if(s(T(i)),Bi(i))throw Di(i);if("serverSideError"in i||Mt in i)throw Pt("pageContext couldn't be fetched from server: an error occurred on the server-side (see your server logs)");return s(S(i,"_pageId","string")),qt(i),{pageContextFromServer:i}}function qt(e){Yi(e),Ti(e)}function Xi(e){s(typeof e.urlOriginal=="string"),en(e);const t={};return we(t,"urlPathname",{get:Qt,enumerable:!0,configurable:!0}),we(t,"url",{get:Qi,enumerable:!1,configurable:!0}),we(t,"urlParsed",{get:Zi,enumerable:!0,configurable:!0}),t}function Xt(e){let t=e._urlHandler;t||(t=i=>i);let n=e.urlLogical??e._urlRewrite??e.urlOriginal;n=t(n);const r=e._baseServer;return s(n&&typeof n=="string"),s(r.startsWith("/")),te(n,r)}function Qt(){const{pathname:e}=Xt(this),t=e;return s(t.startsWith("/")),t}function Qi(){return O(!1,"`pageContext.url` is outdated. Use `pageContext.urlPathname`, `pageContext.urlParsed`, or `pageContext.urlOriginal` instead. (See https://vike.dev/migration/0.4.23 for more information.)",{onlyOnce:!0,showStackTrace:!0}),Qt.call(this)}function Zi(){const e=Xt(this),{origin:t,pathname:n,pathnameOriginal:r,search:i,searchAll:o,searchOriginal:a,hash:l,hashOriginal:u}=e,c=B(),f=y=>{O(c,`pageContext.urlParsed.${y} isn't available on the server-side (HTTP requests don't include the URL hash)`,{onlyOnce:!0,showStackTrace:!0})},g={origin:t,pathname:n,pathnameOriginal:r,search:i,searchAll:o,searchOriginal:a,get hash(){return f("hash"),l},get hashOriginal(){return f("hashOriginal"),u},get hashString(){return O(!1,"pageContext.urlParsed.hashString has been renamed to pageContext.urlParsed.hashOriginal",{onlyOnce:!0,showStackTrace:!0}),f("hashString"),u},get searchString(){return O(!1,"pageContext.urlParsed.searchString has been renamed to pageContext.urlParsed.searchOriginal",{onlyOnce:!0,showStackTrace:!0}),a}};return re(g,"hashString",!1),re(g,"searchString",!1),c||(re(g,"hash",!1),re(g,"hashOriginal",!1)),g}function Zt(e){s(typeof e.urlOriginal=="string"),s(typeof e.urlPathname=="string"),s(D(e.urlParsed)),s(e.urlPathname===e.urlParsed.pathname),en(e)}function en(e){"urlPathname"in e?(s(typeof e.urlPathname=="string"),s(be(e,"urlPathname")),s(be(e,"urlParsed")),s(be(e,"url"))):(s(!("urlParsed"in e)),s(!("url"in e)))}function eo(e,t){const r=t.filter(({filesystemRoot:o})=>e.startsWith(o)).sort(le(({filesystemRoot:o})=>o.length))[0];let i;if(r){const{filesystemRoot:o,urlRoot:a}=r,l={pageId:e,filesystemRoot:o,urlRoot:a};s(a.startsWith("/")&&e.startsWith("/")&&o.startsWith("/"),l),s(e.startsWith(o),l),o!=="/"?(s(!o.endsWith("/"),l),i=j(e,o.length,0)):i=e,s(i.startsWith("/"),l),i=a+(a.endsWith("/")?"":"/")+j(i,1,0)}else i=e;return s(i.startsWith("/")),i=i.split("/").filter(o=>o!=="pages"&&o!=="src"&&o!=="index").join("/"),s(!i.includes(".page.")),s(!i.endsWith(".")),i.endsWith("/index")&&(i=j(i,0,-6)),i===""&&(i="/"),s(i.startsWith("/")),s(!i.endsWith("/")||i==="/"),i}async function to(e,t,n){Zt(t);let r=e(t);if(tn(r,`The Route Function ${n}`),r=await r,r===!1)return null;if(r===!0&&(r={}),d(D(r),`The Route Function ${n} should return a boolean or a plain JavaScript object (but it's ${p.cyan(`typeof result === ${JSON.stringify(typeof r)}`)} instead)`),"match"in r){const{match:a}=r;if(d(typeof a=="boolean",`The ${p.cyan("match")} value returned by the Route Function ${n} should be a boolean.`),!a)return null}let i=null;"precedence"in r&&(i=r.precedence,d(typeof i=="number",`The ${p.cyan("precedence")} value returned by the Route Function ${n} should be a number.`)),nn(r,`The ${p.cyan("routeParams")} object returned by the Route Function ${n} should`);const o=r.routeParams||{};return d(!("pageContext"in r),`Providing ${p.cyan("pageContext")} in Route Functions is prohibited, see https://vike.dev/route-function#cannot-provide-pagecontext`),s(D(o)),Object.keys(r).forEach(a=>{d(a==="match"||a==="routeParams"||a==="precedence",`The Route Function ${n} returned an object with an unknown property ${p.cyan(a)} (the known properties are ${p.cyan("match")}, ${p.cyan("routeParams")}, and ${p.cyan("precedence")})`)}),{precedence:i,routeParams:o}}function tn(e,t){O(!Yn(e),`${t} returned a promise, but asynchronous routing is deprecated and will be removed in the next major release, see https://vike.dev/route-function#async`,{onlyOnce:!0})}function gt(){const e=p.cyan("iKnowThePerformanceRisksOfAsyncRouteFunctions");O(!1,`${e} is deprecated and will be removed in the next major release`,{onlyOnce:!0})}function nn(e,t){s(t.endsWith(" should")),S(e,"routeParams")&&(s(t.endsWith(" should")),d(S(e,"routeParams","string{}"),`${t} be an object holding string values.`))}async function no(e,t,n,r){await Promise.all(e.filter(l=>l.fileType===".page.route").map(l=>{var u;return(u=l.loadFile)==null?void 0:u.call(l)}));const{onBeforeRouteHook:i,filesystemRoots:o}=io(e,t,n);return{pageRoutes:ro(o,e,t,r),onBeforeRouteHook:i}}function ro(e,t,n,r){const i=[];if(n.length>0){s(e===null);const o=!0;n.filter(a=>!a.isErrorPage).forEach(a=>{const l=a.pageId;let u=null;{const c="route",f=J(a,c);if(f){const g=f.value;s(f.definedAtData);const y=q(f.definedAtData,c);typeof g=="string"?u={pageId:l,comesFromV1PageConfig:o,routeString:g,routeDefinedAtString:y,routeType:"STRING"}:(s(V(g)),J(a,"iKnowThePerformanceRisksOfAsyncRouteFunctions","boolean")&>(),u={pageId:l,comesFromV1PageConfig:o,routeFunction:g,routeDefinedAtString:y,routeType:"FUNCTION"})}}if(!u){const{routeFilesystem:c}=a;s(c);const{routeString:f,definedBy:g}=c;s(c.routeString.startsWith("/")),u={pageId:l,routeFilesystemDefinedBy:g,comesFromV1PageConfig:o,routeString:f,routeDefinedAtString:null,routeType:"FILESYSTEM"}}s(u),i.push(u)})}if(n.length===0){s(e);const o=!1;r.filter(a=>!ne(a)).forEach(a=>{const l=t.find(u=>u.pageId===a&&u.fileType===".page.route");if(!l||!("default"in l.fileExports)){const u=eo(a,e);s(u.startsWith("/")),s(!u.endsWith("/")||u==="/"),i.push({pageId:a,comesFromV1PageConfig:o,routeString:u,routeDefinedAtString:null,routeFilesystemDefinedBy:`${a}.page.*`,routeType:"FILESYSTEM"})}else{const{filePath:u,fileExports:c}=l;if(s(c.default),S(c,"default","string")){const f=c.default;d(f.startsWith("/"),`A Route String should start with a leading slash '/' but ${u} has \`export default '${f}'\`. Make sure to \`export default '/${f}'\` instead.`),i.push({pageId:a,comesFromV1PageConfig:o,routeString:f,routeDefinedAtString:u,routeType:"STRING"});return}if(S(c,"default","function")){const f=c.default;"iKnowThePerformanceRisksOfAsyncRouteFunctions"in c&>(),i.push({pageId:a,comesFromV1PageConfig:o,routeFunction:f,routeDefinedAtString:u,routeType:"FUNCTION"});return}d(!1,`The default export of ${u} should be a string or a function.`)}})}return i}function io(e,t,n){if(t.length>0)return{onBeforeRouteHook:hi(n,"onBeforeRoute"),filesystemRoots:null};let r=null;const i=[];return e.filter(o=>o.fileType===".page.route"&&o.isDefaultPageFile).forEach(({filePath:o,fileExports:a})=>{if(s(a),"onBeforeRoute"in a){d(S(a,"onBeforeRoute","function"),`\`export { onBeforeRoute }\` of ${o} should be a function.`);const{onBeforeRoute:l}=a,u="onBeforeRoute";r={hookFilePath:o,hookFn:l,hookName:u,hookTimeout:pe(u)}}"filesystemRoutingRoot"in a&&(d(S(a,"filesystemRoutingRoot","string"),`\`export { filesystemRoutingRoot }\` of ${o} should be a string.`),d(S(a,"filesystemRoutingRoot","string"),`\`export { filesystemRoutingRoot }\` of ${o} is \`'${a.filesystemRoutingRoot}'\` but it should start with a leading slash \`/\`.`),i.push({filesystemRoot:oo(o),urlRoot:a.filesystemRoutingRoot}))}),{onBeforeRouteHook:r,filesystemRoots:i}}function oo(e){s(e.startsWith("/")),s(!e.endsWith("/"));const t=e.split("/"),n=j(t,0,-1).join("/")||"/";return s(n.startsWith("/")),s(!n.endsWith("/")||n==="/"),n}function rn(){const e="/statetrain/";return s(so(e)),e}function so(e){return e.startsWith("/")}const ve=k("createPageContext.ts",{});async function on(e){ve.pageFilesData||(ve.pageFilesData=await Er());const{pageFilesAll:t,allPageIds:n,pageConfigs:r,pageConfigGlobal:i}=ve.pageFilesData,{pageRoutes:o,onBeforeRouteHook:a}=await no(t,r,i,n),l=rn();s(Le(l));const u={urlOriginal:e,_objectCreatedByVike:!0,_urlHandler:null,_urlRewrite:null,_baseServer:l,_pageFilesAll:t,_pageConfigs:r,_pageConfigGlobal:i,_allPageIds:n,_pageRoutes:o,_onBeforeRouteHook:a},c=Xi(u);return w(u,c),u}function sn(e,t){const n=e.filter(i=>i.pageId===t);return s(n.length<=1),n[0]??null}async function ao(e,t){if("isAllLoaded"in e&&!t)return e;const n=await e.loadConfigValuesAll(),r=$e(n.configValuesSerialized);return Object.assign(e.configValues,r),w(e,{isAllLoaded:!0}),e}const an="__whileFetchingAssets";async function Te(e,t,n){const r=Ne(t,e),i=sn(n,e);let o;const a=!1;try{o=(await Promise.all([i&&ao(i,a),...r.map(f=>{var g;return(g=f.loadFile)==null?void 0:g.call(f)})]))[0]}catch(c){throw lo(c)&&Object.assign(c,{[an]:!0}),c}const l=Or(r,o),u={};return w(u,l),w(u,{_pageFilesLoaded:r}),u}function Je(e){return e?e[an]===!0:!1}function lo(e){return e instanceof Error?["Failed to fetch dynamically imported module","error loading dynamically imported module","Importing a module script failed","error resolving module specifier","failed to resolve module"].some(n=>e.message.toLowerCase().includes(n.toLowerCase())):!1}function ln(e){const t=e.getAttribute("href");return!!(t===null||t===""||ii(t)||co(e)||fo(t)||!go(t)||!je(t)||!uo(e))}function uo(e){if(ho()){const n=e.getAttribute("data-vike-link");return n!==null&&n!=="false"}else return!0}function co(e){const t=e.getAttribute("target"),n=e.getAttribute("rel");return t==="_blank"||t==="_external"||n==="external"||e.hasAttribute("download")}function fo(e){if(e.startsWith("#"))return!0;const t=n=>n.split("#")[0];return!!(e.includes("#")&&t(e)===t(window.location.href))}function go(e){const t=rn();s(Le(t));const{hasBaseServer:n}=te(e,t);return n}function ho(){return!!window._disableAutomaticLinkInterception}function po(e,t){let n=yo(e,t);return{prefetchStaticAssets:n}}function yo(e,t){{const n=mo(t);if(n!==null)return n}if("prefetchLinks"in e.exports&&d(!1,"`export { prefetchLinks }` is deprecated, use `export { prefetchStaticAssets }` instead."),"prefetchStaticAssets"in e.exports){const{prefetchStaticAssets:n}=e.exports;if(n===!1)return!1;if(n==="hover")return"hover";if(n==="viewport")return"viewport";const r="prefetchStaticAssets value should be false, 'hover', or 'viewport'";d(D(n),r);const i=Object.keys(n);d(i.length===1&&i[0]==="when",r);const{when:o}=n;if(o==="HOVER"||o==="VIEWPORT"){const a=o.toLowerCase();return O(!1,`prefetchStaticAssets value \`{ when: '${o}' }\` is outdated: set prefetchStaticAssets to '${a}' instead`,{onlyOnce:!0}),a}d(!1,r)}return"hover"}function mo(e){const t=e.getAttribute("data-prefetch-static-assets"),n=e.getAttribute("data-prefetch");if(t===null&&n===null)return null;const r="The attribute data-prefetch is outdated, use data-prefetch-static-assets instead.";if(t){if(d(n===null,r),t==="hover"||t==="viewport")return t;if(t==="false")return!1;d(!1,`data-prefetch-static-assets has value "${t}" but it should instead be "false", "hover", or "viewport"`)}if(n){if(s(!t),O(!1,r,{onlyOnce:!0}),n==="true")return"viewport";if(n==="false")return"hover";d(!1,`data-prefetch has value "${n}" but it should instead be "true" or "false"`)}s(!1)}const un=new Map;function bo(e){const t=cn(e);return un.has(t)}function wo(e){const t=cn(e);un.set(t,!0)}function cn(e){return te(e,"/").pathname}function K(e){return e.fileType===".css"?[]:e.exportNames?e.exportNames:(s(e.fileExports,e.filePath),Object.keys(e.fileExports))}function So({pageFilesClientSide:e,pageFilesServerSide:t,pageId:n}){return{isHtmlOnly:r(),isClientRouting:o()};function r(){return t.some(l=>l.pageId===n&&l.fileType===".page")?(i(),!1):!(!t.some(l=>l.pageId===n&&l.fileType===".page.server")||e.some(l=>l.pageId===n&&l.fileType===".page.client"&&K(l).includes("render")))}function i(){const a=e.some(l=>K(l).includes("render"));d(a,["No client-side `render()` hook found.","See https://vike.dev/render-modes for more information.",["Loaded client-side page files (none of them `export { render }`):",...e.map((l,u)=>` (${u+1}): ${l.filePath}`)].join(` `)].join(" "))}function o(){return e.some(l=>K(l).includes("clientRouting"))}}function vo({pageFilesClientSide:e,pageFilesServerSide:t,isHtmlOnly:n,isClientRouting:r}){let i=[];const o=t.filter(l=>!e.includes(l)),a=[];if(a.push(...e.map(l=>({id:l.filePath,onlyAssets:!1,eagerlyImported:!1}))),a.push(...o.map(l=>({id:l.filePath,onlyAssets:!0,eagerlyImported:!1}))),n)i=e.map(l=>l.filePath);else{const l=Po(r);a.push({id:l,onlyAssets:!1,eagerlyImported:!1}),i=[l]}return{clientEntries:i,clientDependencies:a}}function Po(e){return e?"@@vike/dist/esm/client/client-routing-runtime/entry.js":"@@vike/dist/esm/client/server-routing-runtime/entry.js"}function Ro(e,t){let n=Ne(e,t);const r=Ft(e,t),{isHtmlOnly:i,isClientRouting:o}=So({pageFilesClientSide:n,pageFilesServerSide:r,pageId:t});i&&(n=n.filter(u=>u.isEnv("CLIENT_ONLY")&&!K(u).includes("render")),n=Co(n));const{clientEntries:a,clientDependencies:l}=vo({pageFilesClientSide:n,pageFilesServerSide:r,isHtmlOnly:i,isClientRouting:o});return{isHtmlOnly:i,isClientRouting:o,clientEntries:a,clientDependencies:l,pageFilesClientSide:n,pageFilesServerSide:r}}async function Eo(e,t,{sharedPageFilesAlreadyLoaded:n}){const r=Ne(e,t);await Promise.all(r.map(async i=>{var o;s(i.isEnv("CLIENT_ONLY")||i.isEnv("CLIENT_AND_SERVER")),!(n&&i.isEnv("CLIENT_AND_SERVER"))&&await((o=i.loadExportNames)==null?void 0:o.call(i))}))}function Co(e){const t=[];for(const n of e)if(t.push(n),K(n).includes("overrideDefaultPages"))break;return t}function _o(e,t,n){var r,i;if(e){const o=((r=J(e,"clientRouting","boolean"))==null?void 0:r.value)??!1;return{clientEntryLoaded:((i=J(e,"clientEntryLoaded","boolean"))==null?void 0:i.value)??!1,isClientRouting:o}}else{const{isHtmlOnly:o,isClientRouting:a}=Ro(t,n);return{clientEntryLoaded:!o,isClientRouting:a}}}async function fn(e,t){await Eo(t._pageFilesAll,e,{sharedPageFilesAlreadyLoaded:!1});const n=sn(t._pageConfigs,e),{clientEntryLoaded:r,isClientRouting:i}=_o(n,t._pageFilesAll,e);return r&&i}const dn="@",xe=":";function $o(e,t="Invalid"){let n=`${t} Route String ${H(e)}`;d(e!=="",`${n} (empty string): set it to ${H("/")} instead`),d(["/","*"].includes(e[0]),`${n}: it should start with ${H("/")} or ${H("*")}`),d(!e.includes("**"),`${n}: set it to ${H(e.split("**").join("*"))} instead`)}function ke(e,t){$o(e);const n=gn(e),r=n.map(g=>g.param?"[^/]+":g.glob?".*":qn(g.static)).map(g=>`(${g})`).join(""),i=new RegExp(`^${r}/?$`),o=t.match(i);if(!o)return null;const a={},[l,...u]=o;let c=0;const f=n.filter(g=>g.glob).length>1;return n.forEach((g,y)=>{let h=u[y];if(g.param&&(a[g.param]=h),g.glob){const R=`*${f?++c:""}`;a[R]=h}}),{routeParams:a}}function gn(e){const t=[],n=i=>{const o=t[t.length-1];o!=null&&o.static?o.static+=i:t.push({static:i})},r=e.split("/");return r.forEach((i,o)=>{o!==0&&n("/"),Oo(i)?(O(!i.startsWith(xe),`Outdated Route String ${H(e)}, use ${H(e.split(xe).join(dn))} instead`,{onlyOnce:!0}),t.push({param:i.slice(1)})):i==="*"&&o===r.length-1&&e!=="*"&&e!=="/*"?t.push({glob:!0}):i.split("*").forEach((a,l)=>{l!==0&&t.push({glob:!0}),a!==""&&n(a)})}),t}function se(e){const t=gn(e),n=l=>(l==null?void 0:l.split("/").filter(Boolean).length)||0;let r=0;for(const l of t){if(!l.static)break;r+=n(l.static)}const i=t.map(l=>n(l.static)).reduce((l,u)=>l+u,0),o=t.filter(l=>l.param).length,a=t.filter(l=>l.glob).length;return{numberOfStaticPartsBeginning:r,numberOfStaticParts:i,numberOfParams:o,numberOfGlobs:a}}function Oo(e){return e.startsWith(dn)||e.startsWith(xe)}function ht(e){const n=ke(e,e);return s(n),Object.keys(n.routeParams).length===0}function H(e){return B()?`'${e}'`:(e===""&&(e="''"),p.cyan(e))}function To(e){e.sort(xo).sort(W(t=>t.routeType==="FUNCTION"&&!!t.precedence&&t.precedence<0)).sort(W(t=>t.routeType==="STRING"&&ht(t.routeString)===!1)).sort(W(t=>t.routeType==="FUNCTION"&&!t.precedence)).sort(W(t=>t.routeType==="STRING"&&ht(t.routeString)===!0)).sort(W(t=>t.routeType==="FILESYSTEM")).sort(W(t=>t.routeType==="FUNCTION"&&!!t.precedence&&t.precedence>0))}function xo(e,t){{const n=e.precedence??0,r=t.precedence??0;if(n!==r)return n>r?-1:1}if(!t.routeString||!e.routeString)return 0;{const r=le(i=>se(i).numberOfStaticPartsBeginning)(e.routeString,t.routeString);if(r!==0)return r}{const r=le(i=>se(i).numberOfStaticParts)(e.routeString,t.routeString);if(r!==0)return r}{const r=Vn(i=>se(i).numberOfGlobs)(e.routeString,t.routeString);if(r!==0)return r}{const r=le(i=>se(i).numberOfParams)(e.routeString,t.routeString);if(r!==0)return r}return 0}async function ko(e){const t={};if(!e._onBeforeRouteHook)return null;const n=await Fo(e._onBeforeRouteHook,e);return n&&(w(t,n),S(t,"_pageId","string")||S(t,"_pageId","null"))?(S(t,"routeParams")?s(S(t,"routeParams","object")):w(t,{routeParams:{}}),w(t,{_routingProvidedByOnBeforeRouteHook:!0,_debugRouteMatches:"CUSTOM_ROUTING"}),t):(w(t,{_routingProvidedByOnBeforeRouteHook:!1}),t)}async function Fo(e,t){let n=e.hookFn(t);tn(n,`The onBeforeRoute() hook ${e.hookFilePath}`),n=await N(()=>n,e,t);const r=`The onBeforeRoute() hook defined by ${e.hookFilePath}`;if(d(n==null||Li(n,["pageContext"])&&S(n,"pageContext"),`${r} should return ${p.cyan("null")}, ${p.cyan("undefined")}, or a plain JavaScript object ${p.cyan("{ pageContext: { /* ... */ } }")}`),n==null)return null;if(d(S(n,"pageContext","object"),`${r} returned ${p.cyan("{ pageContext }")} but pageContext should be a plain JavaScript object.`),S(n.pageContext,"_pageId")&&!S(n.pageContext,"_pageId","null")){const a=`${r} returned ${p.cyan("{ pageContext: { _pageId } }")} but ${p.cyan("_pageId")} should be`;d(S(n.pageContext,"_pageId","string"),`${a} a string or null`),d(t._allPageIds.includes(n.pageContext._pageId),`${a} ${Wi(t._allPageIds.map(l=>p.cyan(l)),"or")}`)}S(n.pageContext,"routeParams")&&nn(n.pageContext,`${r} returned ${p.cyan("{ pageContext: { routeParams } }")} but routeParams should`);const i=a=>`${r} returned ${p.cyan(`{ pageContext: { ${a} } }`)} which is deprecated. Return ${p.cyan("{ pageContext: { urlLogical } }")} instead.`;S(n.pageContext,"url")&&(O(!1,i("url"),{onlyOnce:!0}),n.pageContext.urlLogical=n.pageContext.url,delete n.pageContext.url),S(n.pageContext,"urlOriginal")&&(O(!1,i("urlOriginal"),{onlyOnce:!0}),n.pageContext.urlLogical=n.pageContext.urlOriginal,delete n.pageContext.urlOriginal),S(n.pageContext,"urlLogical")&&In(n.pageContext.urlLogical,`${r} returned ${p.cyan("{ pageContext: { urlLogical } }")} but ${p.cyan("urlLogical")}`),zt(n.pageContext,{hookFilePath:e.hookFilePath,hookName:"onBeforeRoute"});const o={};return w(o,n.pageContext),o}var ae;function pt(...e){var t;ae||(ae=(t=globalThis.__brillout_debug_createDebugger)==null?void 0:t.call(globalThis,"vike:routing")),ae&&ae(...e)}B()&&ee();async function hn(e){pt("Pages routes:",e._pageRoutes),Zt(e);const t={},n=await ko(e);if(n){if(n._routingProvidedByOnBeforeRouteHook)return s(n._pageId),n;w(t,n)}const r={};w(r,e),w(r,n);const i=r._allPageIds;d(i.length>0,"No page found. You must create at least one page."),s(r._pageFilesAll.length>0||r._pageConfigs.length>0);const{urlPathname:o}=r;s(o.startsWith("/"));const a=[];await Promise.all(r._pageRoutes.map(async u=>{const{pageId:c,routeType:f}=u;if(u.routeType==="FILESYSTEM"){const{routeString:g}=u,y=ke(g,o);if(y){const{routeParams:h}=y;a.push({pageId:c,routeParams:h,routeString:g,routeType:f})}return}if(u.routeType==="STRING"){const{routeString:g}=u,y=ke(g,o);if(y){const{routeParams:h}=y;s(f==="STRING"),a.push({pageId:c,routeString:g,routeParams:h,routeType:f})}return}if(u.routeType==="FUNCTION"){const{routeFunction:g,routeDefinedAtString:y}=u,h=await to(g,r,y);if(h){const{routeParams:R,precedence:$}=h;a.push({pageId:c,precedence:$,routeParams:R,routeType:f})}return}s(!1)})),To(a);const l=a[0]??null;if(pt(`Route matches for URL ${p.cyan(o)} (in precedence order):`,a),w(t,{_debugRouteMatches:a}),w(t,{_routeMatch:l}),!l)return w(t,{_pageId:null,routeParams:{}}),t;{const{routeParams:u}=l;s(D(u)),w(t,{_pageId:l.pageId,routeParams:l.routeParams})}return t}ee();const yt=k("prefetch.ts",{linkPrefetchHandlerAdded:new WeakMap});async function Io(e,t){try{await Te(e,t._pageFilesAll,t._pageConfigs)}catch(n){if(Je(n))Fe(n,!0);else throw n}}function Ao(e){wo(e.urlPathname),[...document.getElementsByTagName("A")].forEach(n=>{if(yt.linkPrefetchHandlerAdded.has(n))return;yt.linkPrefetchHandlerAdded.set(n,!0);const r=n.getAttribute("href");if(ln(n)||(s(r),bo(r)))return;const{prefetchStaticAssets:i}=po(e,n);if(i&&(i==="hover"&&(n.addEventListener("mouseover",()=>{Pe(r)}),n.addEventListener("touchstart",()=>{Pe(r)},{passive:!0})),i==="viewport")){const o=new IntersectionObserver(a=>{a.forEach(l=>{l.isIntersecting&&(Pe(r),o.disconnect())})});o.observe(n)}})}async function Pe(e){const t=await on(e);let n;try{n=await hn(t)}catch{return}n!=null&&n._pageId&&await fn(n._pageId,t)&&await Io(n._pageId,t)}async function jo(e,t){const n=Me(e);let r=null,i;r=L(e,"render"),i="render";{const l=L(e,"onRenderClient");l&&(r=l,i="onRenderClient")}if(!r){const l=Lo(e);if(s(l),e._pageConfigs.length>0)d(!1,`No onRenderClient() hook defined for URL '${l}', but it's needed, see https://vike.dev/onRenderClient`);else{const u=e._pageFilesLoaded.filter(f=>f.fileType===".page.client");let c;u.length===0?c="No file `*.page.client.*` found for URL "+l:c="One of the following files should export a render() hook: "+u.map(f=>f.filePath).join(" "),d(!1,c)}}s(r);const o=r.hookFn;s(i);const a=await N(()=>o(n),r,e);d(a===void 0,`The ${i}() hook defined by ${r.hookFilePath} isn't allowed to return a value`)}function Lo(e){let t;try{t=e.urlPathname??e.urlOriginal}catch{}return t=t??window.location.href,t}function pn(e){if(e&&"x"in e){yn(e);return}e!=null&&e.preserveScroll||Wo()}function Wo(){const e=Ho();if(!e||e==="top")yn({x:0,y:0});else{const t=document.getElementById(e)||document.getElementsByName(e)[0];t&&t.scrollIntoView()}}function yn(e){const t=()=>window.scrollTo(e.x,e.y),n=()=>window.scrollX===e.x&&window.scrollY===e.y;n()||(t(),!n()&&requestAnimationFrame(()=>{t(),!n()&&setTimeout(async()=>{if(t(),n())return;const r=new Date().getTime();for(;;)if(await ti(10),t(),n()||new Date().getTime()-r>100)return},0)}))}function Ho(){let{hash:e}=window.location;return e===""?null:(s(e.startsWith("#")),e=e.slice(1),e)}function No(){window.addEventListener("scroll",ni(lt,Math.ceil(1e3/3)),{passive:!0}),Nt(lt)}const U=k("onBrowserHistoryNavigation.ts",{previousState:ce()});function Do(){window.addEventListener("popstate",async()=>{const e=ce(),t=e.historyState.scrollPosition||void 0,n=e.historyState.triggeredBy==="user",r=e.urlWithoutHash===U.previousState.urlWithoutHash,i=!e.historyState.timestamp||!U.previousState.historyState.timestamp?null:e.historyState.timestampmn.initialRenderIsDone&&Ye())}function zo(){mn.initialRenderIsDone=!0}function Ye(){"scrollRestoration"in window.history&&(window.history.scrollRestoration="manual")}function mt(){"scrollRestoration"in window.history&&(window.history.scrollRestoration="auto")}const _=k("renderPageClientSide.ts",{renderCounter:0});async function X(e){const{scrollTarget:t,urlOriginal:n=Be(),overwriteLastHistoryEntry:r=!1,isBackwardNavigation:i,pageContextsFromRewrite:o=[],redirectCount:a=0,isUserLandPushStateNavigation:l,isClientSideNavigation:u=!0}=e,{isRenderOutdated:c,setHydrationCanBeAborted:f,isHydrationRender:g}=Go();if(s(u===!g),Ui(o.length,a),_.clientRoutingIsDisabled){ue(n);return}await y();return;async function y(){var F;const m=async b=>{await R({err:b})},v=await h();if(c())return;if(_.isFirstRenderDone){const{previousPageContext:b}=_;if(s(b),Se(b,"onPageTransitionStart"),!_.isTransitioning){_.isTransitioning=!0;const C=L(b,"onPageTransitionStart");if(C){const E=C,{hookFn:z}=E;try{await N(()=>z(v),E,v)}catch(I){await m(I);return}if(c())return}}}let P;if(g)P=Mi();else{let b;try{b=await hn(v)}catch(z){await m(z);return}if(c())return;let C;if(!b._pageId)C=!1;else if(C=await fn(b._pageId,v),c())return;if(!C){ue(n);return}s(S(b,"_pageId","string"));const E=b._pageId&&((F=_.previousPageContext)==null?void 0:F._pageId)&&b._pageId===_.previousPageContext._pageId;if(l&&E)return;P=b}s(!("urlOriginal"in P)),w(v,P);try{w(v,await Te(v._pageId,v._pageFilesAll,v._pageConfigs))}catch(b){if(bt(b,v,g))return;await m(b);return}if(!c()&&(v.exports.hydrationCanBeAborted?f():O(!ei(),"You seem to be using React; we recommend setting hydrationCanBeAborted to true, see https://vike.dev/hydrationCanBeAborted",{onlyOnce:!0}),!c()))if(g){s(S(v,"_hasPageContextFromServer","true"));let b;try{b=await Ji(v)}catch(C){await m(C);return}if(c())return;s(!("urlOriginal"in b)),w(v,b),await $(v)}else{let b;try{b=await ft(v,!1)}catch(E){await m(E);return}if(c()||"is404ServerSideRouted"in b)return;const C=b.pageContextFromHooks;s(!("urlOriginal"in C)),w(v,C),await $(v)}}async function h(){const m=await on(n);w(m,{isBackwardNavigation:i,isClientSideNavigation:u});{const v=Vi(o);s(!("urlOriginal"in v)),w(m,v)}return m}async function R(m){const v=E=>{at(E,m.err)||console.error(E)};if("err"in m){const{err:E}=m;s(E),ct(E)||console.error(E)}const P=await h();if(c())return;if(m.pageContextError&&w(P,m.pageContextError),"err"in m){const{err:E}=m;if(s(!("errorWhileRendering"in P)),P.errorWhileRendering=E,ct(E)){const I=E._pageContextAbort;if(I._urlRewrite){await X({...e,scrollTarget:void 0,pageContextsFromRewrite:[...o,I]});return}if(I._urlRedirect){const ye=I._urlRedirect.url;if(ye.startsWith("http")){window.location.href=ye;return}else await X({...e,scrollTarget:void 0,urlOriginal:ye,overwriteLastHistoryEntry:!1,isBackwardNavigation:!1,redirectCount:a+1});return}s(I.abortStatusCode),s(!("urlOriginal"in I)),w(P,I),I.abortStatusCode===404&&w(P,{is404:!0})}else w(P,{is404:!1})}const F=tr(P._pageFilesAll,P._pageConfigs);if(!F)throw new Error("No error page defined.");w(P,{_pageId:F});try{w(P,await Te(P._pageId,P._pageFilesAll,P._pageConfigs))}catch(E){if(bt(E,P,g))return;v(E);return}if(c())return;let b;try{b=await ft(P,!0)}catch(E){v(E);return}if(c()||"is404ServerSideRouted"in b)return;const C=b.pageContextFromHooks;s(C),s(!("urlOriginal"in C)),w(P,C),await $(P,m)}async function $(m,v){const P=async b=>{v?at(b,v.err)||console.error(b):await R({err:b})};if(_.onRenderClientPromise&&(await _.onRenderClientPromise,s(_.onRenderClientPromise===void 0),c()))return;Uo(n,r),_.previousPageContext=m,s(_.onRenderClientPromise===void 0),_.onRenderClientPromise=(async()=>{let b;try{await jo(m,!0)}catch(C){b=C}return _.onRenderClientPromise=void 0,_.isFirstRenderDone=!0,b})();const F=await _.onRenderClientPromise;if(s(_.onRenderClientPromise===void 0),!(F&&(await P(F),!v))){if(Ao(m),g&&!F){Se(m,"onHydrationEnd");const b=L(m,"onHydrationEnd");if(b){const{hookFn:C}=b;try{await N(()=>C(m),b,m)}catch(E){if(await P(E),!v)return}if(c(!0))return}}if(!c(!0)){if(_.isTransitioning){_.isTransitioning=void 0;const{previousPageContext:b}=_;s(b),Se(b,"onPageTransitionEnd");const C=L(b,"onPageTransitionEnd");if(C){const{hookFn:E}=C;try{await N(()=>E(m),C,m)}catch(z){if(await P(z),!v)return}if(c(!0))return}}pn(t),Ye(),zo()}}}}function Uo(e,t){Be()!==e&&(Ye(),oi(e,t),Bo())}function bt(e,t,n){if(!Je(e))return!1;if(n)throw Fe(e,!1),e;return Fe(e,!0),ue(t.urlOriginal),!0}function Fe(e,t){s(Je(e)),_.clientRoutingIsDisabled=!0,t&&console.log(e),xn(!1,["Failed to fetch static asset.","This usually happens when a new frontend is deployed.","Falling back to Server Routing.","(The next page navigation will use Server Routing instead of Client Routing.)"].filter(Boolean).join(" "),{onlyOnce:!0})}function Go(){const e=++_.renderCounter;s(e>=1);let t=!1;return{isRenderOutdated:i=>e===1&&!t&&!i?!1:e!==_.renderCounter,setHydrationCanBeAborted:()=>{t=!0},isHydrationRender:e===1}}function wt(){return _.renderCounter}function Mo(){document.addEventListener("click",Jo)}async function Jo(e){if(!Yo(e))return;const t=Ko(e.target);if(!t)return;const n=t.getAttribute("href");if(ln(t))return;s(n),e.preventDefault();let r;{const i=t.getAttribute("keep-scroll-position");i!==null&&(r={preserveScroll:i!=="false"})}await X({scrollTarget:r,urlOriginal:n,isBackwardNavigation:!1})}function Yo(e){return e.button===0&&!e.ctrlKey&&!e.shiftKey&&!e.altKey&&!e.metaKey}function Ko(e){for(;e.tagName!=="A";){const{parentNode:t}=e;if(!t)return null;e=t}return e}async function qo(){Qo();const e=Xo();Mo(),await e}function Xo(){s(wt()===0);const e=X({scrollTarget:{preserveScroll:!0},isBackwardNavigation:null,isClientSideNavigation:!1});return s(wt()===1),e}function Qo(){Vo(),Dt(),No(),ai(),Do()}ee();vn();qo(); diff --git a/assets/entries/pages_error.OPXz8eTI.js b/assets/entries/pages_error.CwPDSJjs.js similarity index 93% rename from assets/entries/pages_error.OPXz8eTI.js rename to assets/entries/pages_error.CwPDSJjs.js index ce41021..ab44bf7 100644 --- a/assets/entries/pages_error.OPXz8eTI.js +++ b/assets/entries/pages_error.CwPDSJjs.js @@ -1 +1 @@ -import{j as e,L as r,a as o,o as i,A as l}from"../chunks/chunk-CwsG006u.js";import"../chunks/chunk-DZeubO4x.js";const n=({is404:t,errorInfo:a})=>e.jsxs(r,{className:"mt-20",children:[t?e.jsxs(e.Fragment,{children:[e.jsx("h2",{className:"text-xl mb-4",children:"404 Page Not Found"}),e.jsx("p",{children:"This page could not be found."}),e.jsx("p",{children:a})]}):e.jsxs(e.Fragment,{children:[e.jsx("h2",{className:"text-xl mb-4",children:"500 Internal Server Error"}),e.jsx("p",{children:"Something went wrong."})]}),e.jsx(o,{href:"",children:"Go back to home page"})]}),d=Object.freeze(Object.defineProperty({__proto__:null,default:n},Symbol.toStringTag,{value:"Module"})),u={onBeforeRenderEnv:{type:"computed",definedAtData:null,valueSerialized:{type:"js-serialized",value:null}},dataEnv:{type:"computed",definedAtData:null,valueSerialized:{type:"js-serialized",value:null}},hydrationCanBeAborted:{type:"standard",definedAtData:{filePathToShowToUser:"vike-react/config",fileExportPathToShowToUser:["default","hydrationCanBeAborted"]},valueSerialized:{type:"js-serialized",value:!0}},onRenderClient:{type:"standard",definedAtData:{filePathToShowToUser:"vike-react/renderer/onRenderClient",fileExportPathToShowToUser:[]},valueSerialized:{type:"pointer-import",value:i}},Layout:{type:"cumulative",definedAtData:[{filePathToShowToUser:"/components/App.tsx",fileExportPathToShowToUser:[]}],valueSerialized:[{type:"pointer-import",value:l}]},Page:{type:"standard",definedAtData:{filePathToShowToUser:"/pages/_error/+Page.tsx",fileExportPathToShowToUser:[]},valueSerialized:{type:"plus-file",exportValues:d}},title:{type:"standard",definedAtData:{filePathToShowToUser:"/pages/_error/+config.ts",fileExportPathToShowToUser:["default","title"]},valueSerialized:{type:"js-serialized",value:"An error occurred"}}};export{u as configValuesSerialized}; +import{j as e,L as r,a as o,o as i,A as l}from"../chunks/chunk-DDs_QYll.js";import"../chunks/chunk-DZeubO4x.js";const n=({is404:t,errorInfo:a})=>e.jsxs(r,{className:"mt-20",children:[t?e.jsxs(e.Fragment,{children:[e.jsx("h2",{className:"text-xl mb-4",children:"404 Page Not Found"}),e.jsx("p",{children:"This page could not be found."}),e.jsx("p",{children:a})]}):e.jsxs(e.Fragment,{children:[e.jsx("h2",{className:"text-xl mb-4",children:"500 Internal Server Error"}),e.jsx("p",{children:"Something went wrong."})]}),e.jsx(o,{href:"",children:"Go back to home page"})]}),d=Object.freeze(Object.defineProperty({__proto__:null,default:n},Symbol.toStringTag,{value:"Module"})),u={onBeforeRenderEnv:{type:"computed",definedAtData:null,valueSerialized:{type:"js-serialized",value:null}},dataEnv:{type:"computed",definedAtData:null,valueSerialized:{type:"js-serialized",value:null}},hydrationCanBeAborted:{type:"standard",definedAtData:{filePathToShowToUser:"vike-react/config",fileExportPathToShowToUser:["default","hydrationCanBeAborted"]},valueSerialized:{type:"js-serialized",value:!0}},onRenderClient:{type:"standard",definedAtData:{filePathToShowToUser:"vike-react/renderer/onRenderClient",fileExportPathToShowToUser:[]},valueSerialized:{type:"pointer-import",value:i}},Layout:{type:"cumulative",definedAtData:[{filePathToShowToUser:"/components/App.tsx",fileExportPathToShowToUser:[]}],valueSerialized:[{type:"pointer-import",value:l}]},Page:{type:"standard",definedAtData:{filePathToShowToUser:"/pages/_error/+Page.tsx",fileExportPathToShowToUser:[]},valueSerialized:{type:"plus-file",exportValues:d}},title:{type:"standard",definedAtData:{filePathToShowToUser:"/pages/_error/+config.ts",fileExportPathToShowToUser:["default","title"]},valueSerialized:{type:"js-serialized",value:"An error occurred"}}};export{u as configValuesSerialized}; diff --git a/assets/entries/pages_index.bLHpNDwf.js b/assets/entries/pages_index.Cxcdhj_4.js similarity index 93% rename from assets/entries/pages_index.bLHpNDwf.js rename to assets/entries/pages_index.Cxcdhj_4.js index 0ea7f9f..9f3ee05 100644 --- a/assets/entries/pages_index.bLHpNDwf.js +++ b/assets/entries/pages_index.Cxcdhj_4.js @@ -1 +1 @@ -import{j as e,L as t,a,o,A as i}from"../chunks/chunk-CwsG006u.js";import{H as r,I as l}from"../chunks/chunk-DzAPp0u_.js";import"../chunks/chunk-DZeubO4x.js";const n=()=>e.jsxs(t,{className:"mt-10",children:[e.jsx(r,{className:"mb-5",children:"🏡 This is the start page layout :)"}),e.jsx("p",{children:"For a side project I needed a routable typescript react application with access to a shared tone.js context. To test my code I build a small metronome implementation which needs kind of a communication layer to and from tone.js"}),e.jsx("p",{className:"mb-3",children:"We can control tone JS from here"}),e.jsx(l,{className:"mb-3"}),e.jsxs("p",{children:["or after transitioning to a ",e.jsx(a,{href:"second-page/",children:"alternative page"})," of the application"]})]}),s=Object.freeze(Object.defineProperty({__proto__:null,default:n},Symbol.toStringTag,{value:"Module"})),u={onBeforeRenderEnv:{type:"computed",definedAtData:null,valueSerialized:{type:"js-serialized",value:null}},dataEnv:{type:"computed",definedAtData:null,valueSerialized:{type:"js-serialized",value:null}},hydrationCanBeAborted:{type:"standard",definedAtData:{filePathToShowToUser:"vike-react/config",fileExportPathToShowToUser:["default","hydrationCanBeAborted"]},valueSerialized:{type:"js-serialized",value:!0}},onRenderClient:{type:"standard",definedAtData:{filePathToShowToUser:"vike-react/renderer/onRenderClient",fileExportPathToShowToUser:[]},valueSerialized:{type:"pointer-import",value:o}},Layout:{type:"cumulative",definedAtData:[{filePathToShowToUser:"/components/App.tsx",fileExportPathToShowToUser:[]}],valueSerialized:[{type:"pointer-import",value:i}]},Page:{type:"standard",definedAtData:{filePathToShowToUser:"/pages/index/+Page.tsx",fileExportPathToShowToUser:[]},valueSerialized:{type:"plus-file",exportValues:s}},title:{type:"standard",definedAtData:{filePathToShowToUser:"/pages/index/+config.ts",fileExportPathToShowToUser:["default","title"]},valueSerialized:{type:"js-serialized",value:"Welcome | statetrain"}}};export{u as configValuesSerialized}; +import{j as e,L as t,a,o,A as i}from"../chunks/chunk-DDs_QYll.js";import{H as r,I as l}from"../chunks/chunk-DEFsEkkq.js";import"../chunks/chunk-DZeubO4x.js";const n=()=>e.jsxs(t,{className:"mt-10",children:[e.jsx(r,{className:"mb-5",children:"🏡 This is the start page layout :)"}),e.jsx("p",{children:"For a side project I needed a routable typescript react application with access to a shared tone.js context. To test my code I build a small metronome implementation which needs kind of a communication layer to and from tone.js"}),e.jsx("p",{className:"mb-3",children:"We can control tone JS from here"}),e.jsx(l,{className:"mb-3"}),e.jsxs("p",{children:["or after transitioning to a ",e.jsx(a,{href:"second-page/",children:"alternative page"})," of the application"]})]}),s=Object.freeze(Object.defineProperty({__proto__:null,default:n},Symbol.toStringTag,{value:"Module"})),u={onBeforeRenderEnv:{type:"computed",definedAtData:null,valueSerialized:{type:"js-serialized",value:null}},dataEnv:{type:"computed",definedAtData:null,valueSerialized:{type:"js-serialized",value:null}},hydrationCanBeAborted:{type:"standard",definedAtData:{filePathToShowToUser:"vike-react/config",fileExportPathToShowToUser:["default","hydrationCanBeAborted"]},valueSerialized:{type:"js-serialized",value:!0}},onRenderClient:{type:"standard",definedAtData:{filePathToShowToUser:"vike-react/renderer/onRenderClient",fileExportPathToShowToUser:[]},valueSerialized:{type:"pointer-import",value:o}},Layout:{type:"cumulative",definedAtData:[{filePathToShowToUser:"/components/App.tsx",fileExportPathToShowToUser:[]}],valueSerialized:[{type:"pointer-import",value:i}]},Page:{type:"standard",definedAtData:{filePathToShowToUser:"/pages/index/+Page.tsx",fileExportPathToShowToUser:[]},valueSerialized:{type:"plus-file",exportValues:s}},title:{type:"standard",definedAtData:{filePathToShowToUser:"/pages/index/+config.ts",fileExportPathToShowToUser:["default","title"]},valueSerialized:{type:"js-serialized",value:"Welcome | statetrain"}}};export{u as configValuesSerialized}; diff --git a/assets/entries/pages_second-page.BRRyZT6a.js b/assets/entries/pages_second-page.ejB7RTih.js similarity index 92% rename from assets/entries/pages_second-page.BRRyZT6a.js rename to assets/entries/pages_second-page.ejB7RTih.js index 548038e..78c2b4a 100644 --- a/assets/entries/pages_second-page.BRRyZT6a.js +++ b/assets/entries/pages_second-page.ejB7RTih.js @@ -1 +1 @@ -import{j as e,L as t,a,o,A as i}from"../chunks/chunk-CwsG006u.js";import{H as r,I as l}from"../chunks/chunk-DzAPp0u_.js";import"../chunks/chunk-DZeubO4x.js";const n=()=>e.jsxs(t,{className:"mt-10",children:[e.jsx(r,{className:"mb-5",children:"💫 This is the alternative page layout :)"}),e.jsx("p",{className:"mb-3",children:"We can now control tone.js from here"}),e.jsx(l,{className:"mb-3"}),e.jsxs("p",{children:["or after transitioning to the ",e.jsx(a,{href:"",children:"start page"})," of the app"]})]}),s=Object.freeze(Object.defineProperty({__proto__:null,default:n},Symbol.toStringTag,{value:"Module"})),f={onBeforeRenderEnv:{type:"computed",definedAtData:null,valueSerialized:{type:"js-serialized",value:null}},dataEnv:{type:"computed",definedAtData:null,valueSerialized:{type:"js-serialized",value:null}},hydrationCanBeAborted:{type:"standard",definedAtData:{filePathToShowToUser:"vike-react/config",fileExportPathToShowToUser:["default","hydrationCanBeAborted"]},valueSerialized:{type:"js-serialized",value:!0}},onRenderClient:{type:"standard",definedAtData:{filePathToShowToUser:"vike-react/renderer/onRenderClient",fileExportPathToShowToUser:[]},valueSerialized:{type:"pointer-import",value:o}},Layout:{type:"cumulative",definedAtData:[{filePathToShowToUser:"/components/App.tsx",fileExportPathToShowToUser:[]}],valueSerialized:[{type:"pointer-import",value:i}]},Page:{type:"standard",definedAtData:{filePathToShowToUser:"/pages/second-page/+Page.tsx",fileExportPathToShowToUser:[]},valueSerialized:{type:"plus-file",exportValues:s}},title:{type:"standard",definedAtData:{filePathToShowToUser:"/pages/second-page/+config.ts",fileExportPathToShowToUser:["default","title"]},valueSerialized:{type:"js-serialized",value:"Alternative Page | statetrain"}}};export{f as configValuesSerialized}; +import{j as e,L as t,a,o,A as i}from"../chunks/chunk-DDs_QYll.js";import{H as r,I as l}from"../chunks/chunk-DEFsEkkq.js";import"../chunks/chunk-DZeubO4x.js";const n=()=>e.jsxs(t,{className:"mt-10",children:[e.jsx(r,{className:"mb-5",children:"💫 This is the alternative page layout :)"}),e.jsx("p",{className:"mb-3",children:"We can now control tone.js from here"}),e.jsx(l,{className:"mb-3"}),e.jsxs("p",{children:["or after transitioning to the ",e.jsx(a,{href:"",children:"start page"})," of the app"]})]}),s=Object.freeze(Object.defineProperty({__proto__:null,default:n},Symbol.toStringTag,{value:"Module"})),f={onBeforeRenderEnv:{type:"computed",definedAtData:null,valueSerialized:{type:"js-serialized",value:null}},dataEnv:{type:"computed",definedAtData:null,valueSerialized:{type:"js-serialized",value:null}},hydrationCanBeAborted:{type:"standard",definedAtData:{filePathToShowToUser:"vike-react/config",fileExportPathToShowToUser:["default","hydrationCanBeAborted"]},valueSerialized:{type:"js-serialized",value:!0}},onRenderClient:{type:"standard",definedAtData:{filePathToShowToUser:"vike-react/renderer/onRenderClient",fileExportPathToShowToUser:[]},valueSerialized:{type:"pointer-import",value:o}},Layout:{type:"cumulative",definedAtData:[{filePathToShowToUser:"/components/App.tsx",fileExportPathToShowToUser:[]}],valueSerialized:[{type:"pointer-import",value:i}]},Page:{type:"standard",definedAtData:{filePathToShowToUser:"/pages/second-page/+Page.tsx",fileExportPathToShowToUser:[]},valueSerialized:{type:"plus-file",exportValues:s}},title:{type:"standard",definedAtData:{filePathToShowToUser:"/pages/second-page/+config.ts",fileExportPathToShowToUser:["default","title"]},valueSerialized:{type:"js-serialized",value:"Alternative Page | statetrain"}}};export{f as configValuesSerialized}; diff --git a/assets/static/Link.CTy-J1Wx.css b/assets/static/Link.ByHLQopH.css similarity index 62% rename from assets/static/Link.CTy-J1Wx.css rename to assets/static/Link.ByHLQopH.css index 3dd669a..d1926de 100644 --- a/assets/static/Link.CTy-J1Wx.css +++ b/assets/static/Link.ByHLQopH.css @@ -1 +1 @@ -*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:var(--un-default-border-color, #e5e7eb)}:before,:after{--un-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}*,:before,:after{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / .5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }::backdrop{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / .5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }body,html{background-color:#020617;color:#e2e8f0;font-family:Helvetica Neue,Arial,Tahoma,sans-serif;font-size:16px}:root{--color-inherit: inherit;--color-current: currentColor;--color-transparent: transparent;--color-black: #000;--color-white: #fff;--color-gray: #94a3b8;--color-light: #e2e8f0;--color-dark: #020617;--color-darkLight: #0f172a;--color-darkLightBorder: #1e293b;--color-grayDark: #475569;--color-grayLight: #cbd5e1;--color-primary: #38bdf8;--color-successDark: #047857;--color-successLight: #6ee7b7;--color-warningDark: #b45309;--color-warningLight: #fcd34d;--color-errorDark: #b91c1c;--color-errorLight: #fca5a5;--font-size-xs: .75rem;--font-size-sm: .875rem;--font-size-base: 16px;--font-size-lg: 1.125rem;--font-size-xl: 1.25rem;--font-size-2xl: 1.5rem;--font-size-3xl: 1.875rem;--font-size-4xl: 2.25rem;--font-size-5xl: 3rem;--font-size-6xl: 3.75rem;--font-size-7xl: 4.5rem;--font-size-8xl: 6rem;--font-size-9xl: 8rem;--font-size-small: 14px;--font-size-micro: 10px}.container{width:100%}@media (min-width: 640px){.container{max-width:640px}}@media (min-width: 768px){.container{max-width:768px}}@media (min-width: 1024px){.container{max-width:1024px}}@media (min-width: 1280px){.container{max-width:1280px}}@media (min-width: 1536px){.container{max-width:1536px}}.pointer-events-none{pointer-events:none}.relative{position:relative}.m-auto{margin:auto}.my{margin-top:1rem;margin-bottom:1rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.mb-5{margin-bottom:1.25rem}.mb-6{margin-bottom:1.5rem}.mt-10{margin-top:2.5rem}.mt-16{margin-top:4rem}.mt-20{margin-top:5rem}.mt-4{margin-top:1rem}.block{display:block}.inline-block{display:inline-block}.hidden{display:none}.h-10{height:2.5rem}.h-20{height:5rem}.h-3{height:.75rem}.h-full{height:100%}.max-w-24{max-width:6rem}.min-w-10{min-width:2.5rem}.w-10{width:2.5rem}.w-3{width:.75rem}.w-full{width:100%}.max-w-screen-lg{max-width:1024px}.flex{display:flex}.inline-flex{display:inline-flex}.flex-1{flex:1 1 0%}.flex-col{flex-direction:column}@keyframes pulse{0%,to{opacity:1}50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}.items-center{align-items:center}.items-stretch{align-items:stretch}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.whitespace-nowrap{white-space:nowrap}.border-1{border-width:1px}.border-x-0{border-left-width:0px;border-right-width:0px}.border-darkLightBorder{--un-border-opacity:1;border-color:rgb(30 41 59 / var(--un-border-opacity))}.rounded{border-radius:.25rem}.rounded-sm{border-radius:.125rem}.rounded-e-lg{border-start-end-radius:.5rem;border-end-end-radius:.5rem}.rounded-s-lg{border-end-start-radius:.5rem;border-start-start-radius:.5rem}.bg-dark{--un-bg-opacity:1;background-color:rgb(2 6 23 / var(--un-bg-opacity))}.bg-darkLight{--un-bg-opacity:1;background-color:rgb(15 23 42 / var(--un-bg-opacity))}.bg-primary{--un-bg-opacity:1;background-color:rgb(56 189 248 / var(--un-bg-opacity))}.bg-successDark{--un-bg-opacity:1;background-color:rgb(4 120 87 / var(--un-bg-opacity))}.bg-warningDark{--un-bg-opacity:1;background-color:rgb(180 83 9 / var(--un-bg-opacity))}.bg-warningLight{--un-bg-opacity:1;background-color:rgb(252 211 77 / var(--un-bg-opacity))}.bg-opacity-50{--un-bg-opacity:.5}.hover\:bg-opacity-75:hover{--un-bg-opacity:.75}.p-0{padding:0}.p-2{padding:.5rem}.p-3{padding:.75rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-4{padding-left:1rem;padding-right:1rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.text-center{text-align:center}.text-2xl{font-size:1.5rem;line-height:2rem}.text-4xl{font-size:2.25rem;line-height:2.5rem}.text-5xl{font-size:3rem;line-height:1}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-errorDark{--un-text-opacity:1;color:rgb(185 28 28 / var(--un-text-opacity))}.text-gray{--un-text-opacity:1;color:rgb(148 163 184 / var(--un-text-opacity))}.text-light{--un-text-opacity:1;color:rgb(226 232 240 / var(--un-text-opacity))}.text-primary{--un-text-opacity:1;color:rgb(56 189 248 / var(--un-text-opacity))}.text-warningLight{--un-text-opacity:1;color:rgb(252 211 77 / var(--un-text-opacity))}.text-white{--un-text-opacity:1;color:rgb(255 255 255 / var(--un-text-opacity))}.font-black{font-weight:900}.font-bold{font-weight:700}.underline,.hover\:underline:hover{text-decoration-line:underline}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-200{transition-duration:.2s}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)} +*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:var(--un-default-border-color, #e5e7eb)}:before,:after{--un-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}*,:before,:after{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / .5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }::backdrop{--un-rotate:0;--un-rotate-x:0;--un-rotate-y:0;--un-rotate-z:0;--un-scale-x:1;--un-scale-y:1;--un-scale-z:1;--un-skew-x:0;--un-skew-y:0;--un-translate-x:0;--un-translate-y:0;--un-translate-z:0;--un-pan-x: ;--un-pan-y: ;--un-pinch-zoom: ;--un-scroll-snap-strictness:proximity;--un-ordinal: ;--un-slashed-zero: ;--un-numeric-figure: ;--un-numeric-spacing: ;--un-numeric-fraction: ;--un-border-spacing-x:0;--un-border-spacing-y:0;--un-ring-offset-shadow:0 0 rgb(0 0 0 / 0);--un-ring-shadow:0 0 rgb(0 0 0 / 0);--un-shadow-inset: ;--un-shadow:0 0 rgb(0 0 0 / 0);--un-ring-inset: ;--un-ring-offset-width:0px;--un-ring-offset-color:#fff;--un-ring-width:0px;--un-ring-color:rgb(147 197 253 / .5);--un-blur: ;--un-brightness: ;--un-contrast: ;--un-drop-shadow: ;--un-grayscale: ;--un-hue-rotate: ;--un-invert: ;--un-saturate: ;--un-sepia: ;--un-backdrop-blur: ;--un-backdrop-brightness: ;--un-backdrop-contrast: ;--un-backdrop-grayscale: ;--un-backdrop-hue-rotate: ;--un-backdrop-invert: ;--un-backdrop-opacity: ;--un-backdrop-saturate: ;--un-backdrop-sepia: }body,html{background-color:#020617;color:#e2e8f0;font-family:Helvetica Neue,Arial,Tahoma,sans-serif;font-size:16px}:root{--color-inherit: inherit;--color-current: currentColor;--color-transparent: transparent;--color-black: #000;--color-white: #fff;--color-gray: #94a3b8;--color-light: #e2e8f0;--color-dark: #020617;--color-darkLight: #0f172a;--color-darkLightBorder: #1e293b;--color-grayDark: #475569;--color-grayLight: #cbd5e1;--color-primary: #38bdf8;--color-successDark: #047857;--color-successLight: #6ee7b7;--color-warningDark: #b45309;--color-warningLight: #fcd34d;--color-errorDark: #b91c1c;--color-errorLight: #fca5a5;--font-size-xs: .75rem;--font-size-sm: .875rem;--font-size-base: 16px;--font-size-lg: 1.125rem;--font-size-xl: 1.25rem;--font-size-2xl: 1.5rem;--font-size-3xl: 1.875rem;--font-size-4xl: 2.25rem;--font-size-5xl: 3rem;--font-size-6xl: 3.75rem;--font-size-7xl: 4.5rem;--font-size-8xl: 6rem;--font-size-9xl: 8rem;--font-size-small: 14px;--font-size-micro: 10px}.container{width:100%}@media (min-width: 640px){.container{max-width:640px}}@media (min-width: 768px){.container{max-width:768px}}@media (min-width: 1024px){.container{max-width:1024px}}@media (min-width: 1280px){.container{max-width:1280px}}@media (min-width: 1536px){.container{max-width:1536px}}.pointer-events-none{pointer-events:none}.relative{position:relative}.m-auto{margin:auto}.mx-auto{margin-left:auto;margin-right:auto}.my{margin-top:1rem;margin-bottom:1rem}.mb-3{margin-bottom:.75rem}.mb-4{margin-bottom:1rem}.mb-5{margin-bottom:1.25rem}.mb-6{margin-bottom:1.5rem}.mt-10{margin-top:2.5rem}.mt-16{margin-top:4rem}.mt-20{margin-top:5rem}.mt-3{margin-top:.75rem}.block{display:block}.inline-block{display:inline-block}.hidden{display:none}.h-10{height:2.5rem}.h-20{height:5rem}.h-3{height:.75rem}.h-full{height:100%}.max-w-24{max-width:6rem}.min-w-10{min-width:2.5rem}.w-10{width:2.5rem}.w-3{width:.75rem}.w-full{width:100%}.max-w-screen-lg{max-width:1024px}.flex{display:flex}.inline-flex{display:inline-flex}.flex-1{flex:1 1 0%}.flex-col{flex-direction:column}@keyframes pulse{0%,to{opacity:1}50%{opacity:.5}}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}.items-center{align-items:center}.items-stretch{align-items:stretch}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.gap-1{gap:.25rem}.gap-2{gap:.5rem}.whitespace-nowrap{white-space:nowrap}.border-1{border-width:1px}.border-x-0{border-left-width:0px;border-right-width:0px}.border-darkLightBorder{--un-border-opacity:1;border-color:rgb(30 41 59 / var(--un-border-opacity))}.rounded{border-radius:.25rem}.rounded-sm{border-radius:.125rem}.rounded-e-lg{border-start-end-radius:.5rem;border-end-end-radius:.5rem}.rounded-s-lg{border-end-start-radius:.5rem;border-start-start-radius:.5rem}.bg-dark{--un-bg-opacity:1;background-color:rgb(2 6 23 / var(--un-bg-opacity))}.bg-darkLight{--un-bg-opacity:1;background-color:rgb(15 23 42 / var(--un-bg-opacity))}.bg-primary{--un-bg-opacity:1;background-color:rgb(56 189 248 / var(--un-bg-opacity))}.bg-successDark{--un-bg-opacity:1;background-color:rgb(4 120 87 / var(--un-bg-opacity))}.bg-warningDark{--un-bg-opacity:1;background-color:rgb(180 83 9 / var(--un-bg-opacity))}.bg-warningLight{--un-bg-opacity:1;background-color:rgb(252 211 77 / var(--un-bg-opacity))}.bg-opacity-50{--un-bg-opacity:.5}.hover\:bg-opacity-75:hover{--un-bg-opacity:.75}.p-0{padding:0}.p-2{padding:.5rem}.p-3{padding:.75rem}.px-2{padding-left:.5rem;padding-right:.5rem}.px-4{padding-left:1rem;padding-right:1rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.text-center{text-align:center}.text-2xl{font-size:1.5rem;line-height:2rem}.text-4xl{font-size:2.25rem;line-height:2.5rem}.text-5xl{font-size:3rem;line-height:1}.text-sm{font-size:.875rem;line-height:1.25rem}.text-xl{font-size:1.25rem;line-height:1.75rem}.text-errorDark{--un-text-opacity:1;color:rgb(185 28 28 / var(--un-text-opacity))}.text-gray{--un-text-opacity:1;color:rgb(148 163 184 / var(--un-text-opacity))}.text-light{--un-text-opacity:1;color:rgb(226 232 240 / var(--un-text-opacity))}.text-primary{--un-text-opacity:1;color:rgb(56 189 248 / var(--un-text-opacity))}.text-warningLight{--un-text-opacity:1;color:rgb(252 211 77 / var(--un-text-opacity))}.text-white{--un-text-opacity:1;color:rgb(255 255 255 / var(--un-text-opacity))}.font-black{font-weight:900}.font-bold{font-weight:700}.underline,.hover\:underline:hover{text-decoration-line:underline}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-200{transition-duration:.2s}.ease-in-out{transition-timing-function:cubic-bezier(.4,0,.2,1)}@media (min-width: 768px){.md\:w-3\/4{width:75%}.md\:text-5xl{font-size:3rem;line-height:1}} diff --git a/index.html b/index.html index 04813b6..7495c8d 100644 --- a/index.html +++ b/index.html @@ -1,19 +1,19 @@ - + Welcome | statetrain - + -
🚂🚃
STATETRAIN
Unlock and maintain tone.js context for all following pages / components
+
🚂🚃

STATETRAIN

Gain control of the tone.js transport with a modern routable typescript-react environment. 🚂🚃

* unlocks tone.js context for all following pages / components
- - - + + + - + \ No newline at end of file diff --git a/second-page/index.html b/second-page/index.html index 2bf82b1..e8ac624 100644 --- a/second-page/index.html +++ b/second-page/index.html @@ -1,19 +1,19 @@ - + Alternative Page | statetrain - + -
🚂🚃
STATETRAIN
Unlock and maintain tone.js context for all following pages / components
+
🚂🚃

STATETRAIN

Gain control of the tone.js transport with a modern routable typescript-react environment. 🚂🚃

* unlocks tone.js context for all following pages / components
- - - + + + - + \ No newline at end of file